diff --git a/.gitignore b/.gitignore index 13f41c71db..fb9020a78c 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ *.orig *.rej *~ +*.pyc .DS_Store ._* *.swp diff --git a/CHANGES b/CHANGES index 9ee4cd6e7b..d75d8b172c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,1423 @@ +2013.11, Released November 30th, 2013: + + Minor fixes. + + Updated/fixed packages: apr, binutils, dbus-python, dropwatch, + ecryptfs-utils, eglibc, gdb, gpsd, grantlee, hostapd, + iptables, qlibiscsi, libnspr, libnss, libpfm4, libtool, + lua-ev, lvm2, mplayer, qt, qt5, quagga, ruby, tinymembench, + tvheadend, util-linux, wpa_supplicant + + Issues resolved (http://bugs.uclibc.org): + + #1279: Buildroot compiled Busybox and Coreutils LFS issues + #2995: -fstack-protector-all causes ssh to SIGSEGV + #5570: Cannot compile software on the target machine + #6428: util-linux libmount segfaults with patch from buildroot + #6500: php fails to build for armel + #6554: gdb needs to dependents on host texinfo + #6692: GNU nano fails to compile for x86_64 + #6704: wpa_supplicant: fix wrong path to executable file in D-Bus + +2013.11-rc3, Released November 26th, 2013 + + Fixes all over the tree. + + Architecture: Mark MIPS I, II, III and IV as deprecated. + + Updated/fixed packages: beecrypt, dbus, e2fsprogs, libcap-ng, + libglib2, libroxml, libsigsegv, libvncserver, lxc, mdadm, + mongoose, nut, ola, omniorb, openssl, pcre, php, poco, + protobuf-c, pv, qt5base, ruby, schifra, squid, sunxi-mail, + swig, ti-gfx, tinymembench, uclibc, udisks, vim + +2013.11-rc2, Released November 18th, 2013 + + Fixes all over the tree. + + Defconfigs: qemu_arm_versatile, qemu_arm_nuri, sheevaplug: + Adjust kernel versions. + + Toolchain: avr32: fix for modern kernel headers + + Bootloader: Barebox updated to 2013.10.1 + + Updated/fixed packages: dhcp, e2fsprogs, gst1-plugins-bad, + libcurl, libvncserver, nano, pc, qt5base, squashfs, ttcp, + wayland, wvstreams + + Issues resolved (http://bugs.uclibc.org): + + #3601: DHCPD S80dhcp-server startup script issues + #6320: Fix kernel compile issue if BR2_LINUX_KERNEL_CUSTOM_GIT_VERS.. + #6416: Xenomai package, patch alternative + #6590: directfb-examples build failed whit linaro toolchain + +2013.11-rc1, Released November 12th, 2013 + + Architectures: Nios-II support, MIPS arch handling fixes + + Defconfigs: cubieboard2, freescale i.MX 6sololite evk, + sabre-sd, wandboard added, rpi renamed to raspberrypi_defconfig + + Toolchain: glibc support, upstream uClibc fixes, uClibc 0.9.31 + for avr32, crosstool-ng backend removed, external musl + toolchain support, gcc 4.8.2, updated Linaro external + toolchains. Fortran and objective-C support deprecated, + mudflap support + + Bootloaders: U-Boot: u-boot.imx support, version bumps + + Linux: use kmod instead of module-init-tools + + System: default to devtmpfs for /dev + + Infrastructure: Make 3.82 fixes, locales generation fixes, CVS + download support, post-rsync hooks + + Fs: u-boot image support for cpio + + Updated/fixed packages: aircrack-ng, alsamixergui, apr, + apr-util, atk, automake, bellagio, berkeleydb, bind, binutils, + bison, boost, busybox, can-utils, ccache, ccid, cgilua, + chrony, cifs-utils, cjson, collectd, connman, conntrack-tools, + copas, cppcms, cppzmq, czmq, dash, dbus, dhcpcd, diffutils, + directfb, dmidecode, dnsmaqs, docker, dosfstools, dropbear, + dropwatch, ebtables, eglibc, elf2flt, empty, enchant, erlang, + ethtool, fbgrab, fbv, fdk-aac, feh, ffmpeg, file, findutils, + fltk, fmtools, freetype, gdk-pixbuf, gettext, git, + glib-networking, gmp, gnupg, gnutls, gpu-viv-bin-mx6q, gsl, + gstreamer, gstreamer1, gst1-plugins-{bad,base,good,ugly}, + gtest, gutenprint, hplip, i2c-tools, icu, ifplugd, + imagemagick, iozone, iproute2, ipset, iptables, iw, jamvm, + jansson, jpeg-turbo, kismet, kmod, lcms2, libassuan, libcap, + libcap-ng, libcdaudio, libcec, libcue, libcurl, libdrm, + libedit, libevas, libevent, libfreefare, libfuse, + libgpg-error, libiconv, liblog4c-localtime, libmicrohttpd, + libmnl, libmodbus, + libnetfilter_{acct,conntrack,cthelper,cttimeout,log,queue}, + libnfnetlink, libnl, libpng, libqmi, libqrencode, libroxml, + libsecret, libsigsegv, libsoup, libtirpc, libunwind, libusb, + libvpx, lighttpd, linphone, linux-pam, lmbench, + lockfile-progs, log4cxx, logrotate, logsurfer, ltp-testsuite, + ltrace, luacrypto, luaposix, lvm2, m4, matchbox-lib, + media-ctl, mediastreamer, minicom, minidlna, mongoose, monit, + mpc, mpd, mpg123, mplayer, mrouted, mtdev, mutt, mysql_client, + nano, ncftp, ndisc6, neard, neardal, neon, net-snmp, netatalk, + netcat, netkitbase, netperf, netplug, nettle, nfacct, + nfs-utils, ngircd, ngrep, noip, nuttcp, olsr, openssh, opkg, + oprofile, opus-tools, orc, ortp, pciutils, pcre, pcsc-lite, + perf, perl, perl-cross, php, picocom, pkgconf, polarssl, + poppler, pppd, proftpd, protobuf, proxychains-ng, pulseaudio, + pv, qemu, qt, qt5base, qt5webkit, quagga, radvd, redis, + rpi-{firmware,userland}, rrdtool, rsync, rtorrent, ruby, + samba, scons, screen, sdl_sound, ser2net, setserial, + smartmontools, socat, socketcand, sqlcipher, sqlite, squid, + stress, strongswan, stunnel, sudo, syslinux, systemd, + sysvinit, tcl, ti-gfx, time, transmission, tremor, tslib, + tstools, tvheadend, tzdata, uboot-tools, uclibc, udpcast, + uemacs, ulogd, usb_modeswitch{,_data}, util-linux, vala, + valgrind, vde2, vorbus-tools, vpnc, vsftpd, vtun, wayland, + webkit, webp, webrtc-audio-processing, weston, wget, + wireshark, wsapi, xavante, xdriver_xf86-video-geode, xenomai, + xinetd, xlib_libpthread-stubs, xl2tp, xmlstarlet, + xserver_xorg-server, xz, zeromq, zic, zmqpp + + New packages: aiccu, autossh, bc, civetweb, cppdb, cryptsetup, + duma, eigen, harfbuzz, igmpproxy, iputils, jq, knock, kobs-ng, + lesstif, libcgroup, libsepol, libsoc, libssh2, luasec, luasql, + lxc, nut, ola, omniorb, openpowerlink, orbit, p910nd, psplash, + python-crc16, python-ipy, python-pyzmq, qt5sensors, + qt5serialport, qt5x11extras, snmppp, subversion, tcping, + trace-cmd, xscreensaver, zsh + + Removed packages: module-init-tools + + Issues resolved (http://bugs.uclibc.org): + + #1138: Buildroot fails to build packages if BR2_GCC_SHARED_LIBGCC=y + #5408: qt build failure with Sourcery CodeBench ARM 2010.09 + #5630: makefile error with toolchain helpers.mk + #5672: htop: remove X11 stuff + #5678: linux.mk: linux-menuconfig fails + #5696: python3 installation is too large, patches from python2 needed + #5978: Erlang does not build for arm in 2013.02-rc3 + #6392: Extended ARM uImage kernel options + #6404: Buildroot's coreutils 'uname -p' reports 'Unknown' on recent.. + #6428: util-linux libmount segfaults with patch from buildroot + #6452: eglibc from Linaro 2013.07 not copied to target correctly + #6566: PHP segfault when crosscompiled to mips64 - patch included + #6572: [PowerPC] Buildroot uses wrong external toolchain libraries.. + #6578: udisks package broken + #6602: ebtables 64 bit kernel + 32 bit userland alignment error.. + #6608: ebtables missing ethertypes - fix included + #6620: Sysvinit package missing killall5 and symlinks - patch included + #6632: CMake use host pkg-config + #6638: pkgconf doesn't download + #6644: "all" target doesn't work in out-of-tree builds + #6650: Segmentation fault when trying to build latest buildroot + #6668: iptables limit module alignment problem on mips64 + +2013.08, Released August 31th, 2013: + + Minor fixes. + + Documentation build fixed. + + Updated/fixed packages: ltrace, strongswan + +2013.08-rc3, Released August 29th, 2013: + + Fixes all over the tree. + + External toolchain lib32/lib64 handling, ABI name for EABIhf, + misc fixes for generatelocales, apply-patches and module + stripping. + + Top level menu names reordered and renamed for clarity. + + Updated/fixed packages: acl, attr, bash, dbus, directfb, + dvb-apps, kexec, kmod, libbsd, linux-fusion, mesa3d, minidlna, + openssh, openssl, pulseaudio, python-setuptools, qt5, + qt5webkit, redis, strongswan, sunxi-mali + + Issues resolved (http://bugs.uclibc.org): + + #6464: dbus-daemon-launch-helper needs setuid + +2013.08-rc2, Released August 16th 2013: + + Documentation improvements. + + External toolchains fixes. + + Updated/fixed packages: aircrack-ng, bash, boost, cairo, + cppcms, eglibc, ffmpeg, gcc, git, gnupg, imagemagick, libcec, + libffi, libgcrypt, linux, linux-headers, ltrace, netatalk, + opencv, opengl, readline, samba, strongswan, sunxi-cedarx, + uclibc, udev, wayland, webkit, zeromq. + + Issues resolved (http://bugs.uclibc.org): + + #6440: typo in ffmpeg makefile + +2013.08-rc1, Released August 5th, 2013: + + Architectures: + - improved support for floating point on ARM and Thumb/Thumb2 + - support for ARM OABI removed + + Toolchains: + - support added for Sourcery CodeBench ARM and MIPS 2013.05 + - Linaro ARM and Aarch64 toolchains updated + - support added for the Arago ARMv5 and ARMv7 toolchains + - gcc 4.8.x version bumped + - support for installing both FDPIC and FLAT libraries on + Blackfin + - support for uClibc 0.9.31 removed, + - convert the internal toolchain backend to use the package + infrastructure + - support added for eglibc in the internal toolchain backend + - toolchain components for the ARC architecture updated and + gdb for ARC added. + - support for Blackfin in the internal toolchain fixed + + Defconfigs: beaglebone_defconfig updated, new defconfig for + CubieBoard, for Olimex mx233 Olinuxino, for Calao Systems + TNY-A9G20-LPW. + + A number of packages have been fixed to use the + _CONFIG_SCRIPTS mechanism to get their -config shell + script installed and modified properly. Licensing informations + has been added to a number of packages. + + Use XZ tarballs for a number of packages. + + Noticeable package changes/additions: + - The glib2/libgtk2/webkit stack has been updated to recent + versions. + - Support for Gstreamer 1.x has been added. + - OpenGL support for TI OMAP platforms has been added. + - OpenGL support for Allwinner platforms has been added. + - OpenMAX support for RasberryPi has been added. + + Updated/fixed packages: acl, attr, autoconf, avahi, barebox, + bind, binutils, busybox, bwm-ng, bzip2, cifs-utils, colletctd, + cpanminus, cups, curl, dash, dbus, dhcp, directfb, + directfb-examples, dnsmasq, dosfstools, dropbear, dtc, + e2fsprogs, ed, efl, enlightenment, erlang, ethtool, fbgrab, + fftw, firmware-imx, flot, fltk, freetype, gawk, gdk-pixbuf, + gettext, gmp, gnutls, gsl, gutenprint, gvfs, gzip, haserl, + hiawatha, httping, icu, imagemagick, imlib2, imx-lib, + intltool, iozone, ipset, iptables, jquery, jquery-keyboard, + jquery-sparkline, kmod, less, libart, libcdaudio, libcgicc, + libesmtp, libftdi, libfuse, libglib2, libgtk, libgtk2, libidn, + libiqrf, liblog4c-localtime, libnspr, libnss, libpcap, + libroxml, libserial, libsigsev, libsoup, libtool, libtpl, + libvncserver, libxml2, linphone, lm_sensors, logrotate, + ltrace, lttng, luafilesystem, luajit, minicom, monit, mpg123, + mtd, mutt, mxml, neard, netatask, netsnmp, nettle, + network-manager, nodejs, nss-mdns, openssh, openswan, openvpn, + opkg, opus, pcre, perl-cross, php, pixman, poco, polarssl, + pulseaudio, pv, python, python3, qt, qt5, qt5declarative, + qt5jsbackend, qt5quick1, readline, rpi-firmware, ruby, samba, + sane-backends, sconeserver, sdl_image, sdparm, ser2net, + socketcand, sqlite, squid, strace, tcl, tcpdump, tinyhttpd, + tvheadend, tzdata, uboot, udpcast, usb_modeswitch, + usb_modeswitch_data, usbutils, webkit, wireshark, wvstreams, + xapp_luit, xapp_xmodmap, xenomai, xfsprogs, xlib_libX11, zic, + zlib. + + New packages: a10disp, aespipe, am33x-cm3, cppcms, dhcpcd, + dropwatch, dtc, ecryptfs-utils, eglibc, elf2flt, fdk-aac, + gcc-final, gcc-initial, gcc-intermediate, git, + gpu-viv-bin-mx6q, gst1-plugins-bad, gst1-plugins-base, + gst1-plugins-good, gst1-plugins-ugly, gst-omx, + gst-plugin-x170, gstreamer1, jimtcl, lbase64, libassuan, + libbsd, libcec, libdvbsi, libedit, libgpgme, libqmi, + libqrencode, libsvg, libsvg-cairo, libunwind, libvpx, + linux-headers, lockdev, luabitop, luacrypto, lua-ev, + luaexpatutils, msgpack, ocrad, on2-8170-libs, + on2-8170-modules, p11-kit, pax-utils, ptpd, ptpd2, + python-pyro, ramspeed/smp, snappy, strongswan, sunxi-boards, + sunxi-cedarx, sunxi-mali, sunxi-tools, ti-gfx, tinymembench, + tree, tstools, uclibc, w_scan. + + Issues resolved (http://bugs.uclibc.org): + + #4718: python (built for powerpc) distutils has paths to host + compiler toolchain + #5516: appended device tree blobs on uImage fails + #6302: Versions of packages retrieved from github.com are wrong + #6308: dosfstools download link is wrong + #6326: Dropbear: Add options to allow better config for + different target devices (e.g. routers) + #6338: Wrong download link for minicom package + #6344: Wrong handling of license text files with same name and + different directory + #6374: gnutls package broken if linux cryptodev module + selected + #6410: omap3_beagle has uimage error load address error + +2013.05, Released May 31th, 2013: + + Minor fixes. + + External toolchain wrapper fix for if host/usr/bin is placed + in the patch. + + Updated/fixed packages: acpid, at91bootstrap, czmq, elf2flt, + flex, jamvm, kmod, libplayer, libtirpc, libv4, + lttng-babeltrace, opengl, qt5jsbackend, udpcast, wvstreams + + Issues resolved (http://bugs.uclibc.org): + + #4868: Buildroot compile failure for toolchain/gdb-7.4/intl/reloc... + #4988: flex and m4 problems + #5912: obsolete CVS files + +2013.05-rc3, Released May 25th, 2013: + + Minor fixes. + + Updated/fixed packages: aircrack-ng, bellagio, boost, crda, + dvb-apps, flot, libatomic_ops, libeXosip2, libosip2, libxml2, + mongrel2, poco, portaudio, pptp-linux, tvheadend, urg, weston, + wireshark + +2013.05-rc2, Released May 15th, 2013: + + Fixes all over the tree. + + Default number of parallel jobs is now number of CPUs + 1. + + Defconfigs: Add Telit EVK-PRO3, AT91SAM9260-EK Nand flash. + + Updated/fixed packages: aircrack-ng, busybox, cairo, + classpath, curlftpfs, czmq, dbus, f2fs-tools, fan-ctrl, + filemq, gst-plugin-bad, gutenprint, hplip, json-c, + libatomic_ops, libcurl, libdrm, libglib2, libnspr, libnss, + libsha1, libsigsegv, libxcb, linknx, linux-pam, lttng-modules, + lttng-tools, matchbox-lib, mcookie, mesa3d, neon, pixman, + pulseaudio, python-nfc, qt5imageformats, quota, openssl, + sconeserver, strace, sylpheed, wvstreams, + xapp_{appres,bdftopcf,beforelight,bitmap,edires,fonttosfnt}, + xapp_{fslsfonts,fstobdf,iceauth,ico,listres,luit,mkfontdir}, + xapp_{mkfontscale,oclock,rgb,rstart,scripts,sessreg,setxkbmap}, + xapp_{showfont,smproxy,twm,viewres,x11perf,xauth,xbacklight}, + xapp_x{biff,calc,clipboard,clock,cmsdb,cursorgen,dbedizzy,ditview}, + xapp_x{dm,dpyinfo,driinfo,edit,ev,eyes,f86dga,fd,fontsel,fs,fsinfo}, + xapp_x{gamma,gc,host,input-calibrator,input,kbcomp,kbevd,kbprint}, + xapp_x{kbutils,kill,load,logo,lsatoms,lsclients,lsfonts,mag,man}, + xapp_x{message,mh,modmap,more,pr,prop,randr,rdb,refresh,set,setmode}, + xapp_x{setpointer,setroot,sm,stdcmap,vidtune,vinfo,wd,wininfo,wud}, + xcb-util, xcursor-transparent-theme, xdata_xbitmaps, + xdata_xcursor-themes, + xdriver_xf86-input-{evdev,joystick,keyboard,mouse,synaptics}, + xdriver_xf86-input-{tslib,vmmouse,void}, + xdriver_xf86-video-{ark,ast,ati,cirrus,dummy,fbdev,geode,glide}, + xdriver_xf86-video-{glint,i128,intel,mach64,mga,neomagic,newport}, + xdriver_xf86-video-{nv,openchrome,r128,savage,siliconmotion,sis}, + xdriver_xf86-video-{tdfx,tga,trident,v4l,vesa,vmware,voodoo,wsfb}, + xfont_encodings, xfont_font-adobe-{100,75}dpi, + xfont_font-utopia-{100dpi,75dpi,type1}, + xfont_font-{alias,arabic-misc,bh-100dpi,bh-75dpi}, + xfont_font-bh-lucidatypewriter-{100,75}dpi, xfont_font-bh-{ttf,type1}, + xfont_font-bitstream-{100dpi,75dpi,type1}, xfont_font-cronyx-cyrillic, + xfont_font-{cursor,daewoo,dec,isas,jis,micro}-misc, + xfont_font-ibm-type1, xfont_font-misc-{cyrillic,ethiopic,meltho,misc}, + xfont_font-{mutt,schumacher}-misc, + xfont_font-{screen-cyrillic,sony-misc,sun-misc,util}, + xfont_font-winitzki-cyrillic, xfont_font-xfree86-type1, + xlib_lib{FS,ICE,SM,X11,XScrnSaver,Xau,Xaw,Xcomposite,Xcursor}, + xlib_libX{damage,dmcp,ext,fixes,font,ft,i,inerama,mu,pm,randr}, + xlib_libX{render,res,t,tst,v,vMC,xf86dga,xf86vm}, + xlib_lib{dmx,fontenc,pciaccess,pthread-stubs,xkbfile}, xlib_xtrans, + xproto_{applewm,bigreqs,composite,damage,dmx,dri2,fixes}proto, + xproto_{fontcache,font,gl,input,kb,randr,record,render}proto, + xproto_{resource,scrnsaver,video,windowswm,xcmisc,xext}proto, + xproto_{xf86bigfont,xf86dga,xf86dri,xf86vidmode,xinerama,x}proto, + xserver_xorg-server, xutil_{makedepend,util-macros} + + Readded Packages: xapp_xinit + + Issues resolved (http://bugs.uclibc.org): + + #5054: amd64: cannot find init - due to missing /lib64 folder + +2013.05-rc1, Released May 8th, 2013: + + Architectures: ARC support, Blackfin support, FLAT binary + format, ARM: Drop old CPU variants, add fa526/626, Marvell PJ4 + + Toolchains: Add new Microblaze external toolchains, Linaro + ARM/Aarch64 updates, GCC 4.6.4 / 4.7.3 / 4.8.0 added to + internal toolchain, default to GCC 4.7.x. Internal + Crosstool-ng backend deprecated. + + Defconfigs: Add Atmel at91sam9g45m10ek, freescale mpc8315erdb + & p1010rdb, Armadeus apf27 / apf28, Openblocks A6, Raspberry + pi, gnublin board. + + FS: LZO and XZ compression methods, extra ubifs options, + ext2 rev 0/1 and ext3/4 support. + + Patch handling: apply-patches now has .patch.xz support, + Patch logic reworked as discussed during Febrary dev days: + http://elinux.org/Buildroot:DeveloperDaysFOSDEM2013 + + -rsync now excludes version control files. + + linux: uImage load address for ARM multiplatform kernels + + Infrastructure for multiple OpenGL / ES / EGL / OpenVG + providers, similar to how libjpeg / libjpeg-turbo is handled. + + Infrastructure for packages to add system users. + + kconfig: updated to 3.9-rc2, support make olddefconfig + + Updated/fixed packages: alsa-lib, alsa-utils, apr, apr-util, + argp-standalone, at, at91bootstrap, audiofile, aumix, avahi, + bash, blackbox, bind, binutils, bison, boost, bridge-utils, + busybox, ccache, cifs-utils, cmake, collectd, connman, + conntrack-tools, cpanminus, crosstool-ng, diffutils, directfb, + directfb-examples, divine, dmalloc, dnsmasq, dosfstools, + dropbear, e2fsprogs, ebtables, eeprog, erlang, ethtool, + fb-test-app, fbset, feh, ffmpeg, file, flex, flot, foomatic, + fxload, gd, gdb, gdisk, genimage, gettext, gmp, gnuchess, + gnutls, gob2, gperf, gpsd, gstreamer, haserl, hiawatha, htop, + httping, icu, inotify-tools, intltool, iproute2, ipset, + iptables, iw, jpeg, jquery, jquery-{sparkline,validation}, + json-c, kbd, kexec, kismet, kmod, lcdproc, libarchive, + libatasmart, libcap, libconfig, libconfuse, libcurl, libdrm, + libeet, libev, libevas, libeXosip2, libffi, libfribi, libfuse, + libgcrypt, libglib2, libgtk2, libid3tag, libmicrohttpd, + libnetfilter_acct, libnetfilter_conntrack, libnl, libpcap, + libplayer, libsigc, libv4l, libxcb, linenoise, linux-pam, + lm_sensors, ltp-testsuite, luajit, lzop, madplay, make, mdadm, + mediastreamer, memtester, mesa3d, + mobile-broadband-provider-info, monit, mpd, mpfr, mpg123, + mrouted, msmtp, nbd, ncurses, ndisc6, neard, neardal, neon, + netperf, netsnmp, nettle, nfacct, ntfs-3g, ofono, olsr, + omap-u-boot-utils, openssh, openssl, openswan, openvpn, + oprofile, orc, patch, pciutils, pcre, perl, php, poco, + polarssl, proftpd, psmisc, pulseaudio, python, + python-{bottle,netifaces,serial,setuptools}, qt, quagga, + quota, radvd, rpi-firmware, rpi-userland, rt-tests, sam-ba, + samba, sawman, sdl, ser2net, smartmontools, socat, socketcand, + speex, squid, stress, stunnel, sudo, syslinux, sysstat, + sysvinit, tcl, tcprelay, tinyhttpd, tslib, tvheadend, + uboot-tools, udev, ulogd, util-linux, vala, vtun, webkit, + xapp_{iceauth,luit,makefontscale,sessreg,setxkbmap,smproxy}, + xapp_{xauth,xcmsdb,xdpyinfo,xev,xgamma,xhost,xinput,xkbcomp}, + xapp_{xkbevd,xlsatoms,xlsclients,xmodmap,xpr,xprop,xrandr,xrdb}, + xapp_{xset,xwd,xwininfo}, xcb-{proto,util}, + xdriver_xf86-input-{evdev,joystick,keyboard,mouse,synptics}, + xdriver_xf86-input-{tslib,vmmouse,void}, + xdriver_xf86-video-{ark,ast,ati,cirrus,dummy,geode,glide,glint}, + xdriver_xf86-video-{i128,intel,mach64,mga,neomagic,newport}, + xdriver_xf86-video-{openchrome,r128,savage,siliconmotion,sis}, + xdriver_xf86-video-{tdfx,trident,vesa,vmware,wsfb}, xenomai, + xfont, xinetd, xkeyboard-config, xlib_lib{FS,ICE,SM,X11}, + xlib_libX{scrnSaver,au,aw,cursor,dmcp,ext,fixes,font,ft,i}, + xlib_libX{inerama,mu,pm,randr,res,tst,v,vMC,xf86dga,xf86vm}, + xlib_lib{dmx,fontenc,pciaccess,xkbfile}, xlib_xtrans, + xproto_{applevm,bigreqs,dri2,fonts,gl,input,kbd,record}proto, + xproto_{resource,scrnsaver,xcmisc,xext,x}proto, + xserver_xorg-server, xutil_makedepend, xz, zeromq + + New packages: aircrack-ng, bcusdk, chrony, crda, + cryptodev-linux, cppzmq, czmq, dtach, enscript, exfat, + exfat-utils, f2fs-tools, fan-ctrl, filemq, foomatic-filters, + genimage, genpart, glibmm, gnuplot, gtest, gutenprint, hplip, + iozone, jansson, jhead, jquery-keyboard, jquery-ui, + jquery-ui-themes, json-glib, json-javascript, lcms2, libpfm4, + libpthsem, libserial, libsigsegv, libtasn1, libwebsockets, + libxkbcommon, libxml++, linknx, log4cxx, mongoose, mongrel2, + mtools, ne10, nmap, nodejs, openobex, openpgm, poppler, + protobuf-c, python-m2crypto, python-thrift, qjson, qt5base, + qt5declarative, qt5graphicaleffects, qt5imageformats, + qt5jsbackend, qt5multimedia, qt5quick1, qt5script, qt5svg, + qt5webkit qt5xmlpatterns, rapidjson, redis, swig, texinfo, + tzdata, urg, ussp-push, wayland, webp, weston, wireless-regdb, + wireshark, wvdial, wvstreams, xcb-util-image, xcb-util-wm, + xcursor-transparent-theme, zic, zmqpp, zyre + + Removed packages: microperl, ocf-linux, xapp_xinit, + xapp_xplsprinters, xapp_xprehashprinterlist, + xfont_font-bitstream-speedo, + xlib_lib{Xfontcache,XprintAppUtil,XprintUtil,Xp,oldX,xkbui}, + xproto_{print,xf86rush}proto + + Deprecated packages: vala + + Issues resolved (http://bugs.uclibc.org): + + #1291: Add support for Faraday 526 arm processor (fa526) + #2683: cups does not install correctly to target + #3313: mesa3d fails to build + #5186: initramfs/cpio should support lzo compression + #5636: agetty - cannot get controlling tty error - need updated... + #5906: collectd client headers not exported + #5966: bison unnecessarily required as build dependency + #6140: --enable-fileinfo not applied for php package + #6164: openvpn usage of ip tool from Busybox + +2013.02, Released February 28th, 2013: + + Misc manual updates. + + Updated/fixed packages: busybox, collectd, flashbench, + libgtk2, libupnp, mii-diag, quota + +2013.02-rc3, Released February 26th, 2013 + + Minor fixes. + + Updated/fixed packages: conntrack-tools, dialog, + enlightenment, haserl, keyutils, libfif, libmad, + linux-firmware, linux-fusion, matchbox-desktop, matchbox-wm, + ruby, spawn-fcgi, vtun + + Issues resolved (http://bugs.uclibc.org): + + #5960: fusion.ko driver does not install to target rootfs + +2013.02-rc2, Released February 19th, 2013 + + Fixes all over the tree. + + Various manual updates and fixes. + + Updated/fixed packages: busybox, collectd, gesftpserver, + glib-networking, gnutls, inotify-tools, libcurl, libffi, + libglib2, libtorrent, libvorbis, neard, network-manager, + ntfs-3g, openssl, qt, rpi-userland, rtorrent, thttpd, vim. + + Issues resolved (http://bugs.uclibc.org): + + #5906: collectd client headers not exported + +2013.02-rc1, Released February 10th, 2013 + + Toolchain: Crosstool-ng 1.17.0, default to GCC 4.6.3, target + libraries install fixed. Add Linaro ARM + 2012.11/2012.12/2013.01, AArch64 12.11/12.12/13.01. Sourcery + CodeBench MIPS 2012.03/09. Infrastructure to warn about + missing 32bit support for binary toolchains. Toolchain wrapper + is now relocatable. Add GDB 7.5.1 / Remove 6.8 / 7.0 / + 7.1. Deprecate uClibc 0.9.31. + + Architecture: Xtensa fixes, add missing powerpc variants, arm + 1136jf-s rev1, add A5/A15, neon support toggle, OABI + deprecated. Sparc: drop old unused variants + + Bootloaders: At91bootstap: fix upstream URL, Barebox: add + 2012.12/2013.01/2013.02, remove 2012.08/09/10, lzop fixes, + environment image support, U-Boot: add 2013.01.01 + + Linux: fix appended dtb handling for v3.8+ kernels, support + multiple device trees + + Defconfigs: calao USB-A9260, snowball, QEMU PPC440 on ML507 + board, QEMU ARM Exynos4210, Kernel version in QEMU defconfigs + updated, at91rm9200df: misc fixes. Lock kernel headers to + match kernel. + + Infrastructure: Git download fixes. Toolchain make target + renamed from 'cross' to 'toolchain'. Eclipse integration + support. Option to set root password, post image scripts, + config scripts handling. + + Updated/fixed packages: alsa-lib, argp-standalone, argus, + arptables, atk, audiofile, axel, beecrypt, bind, bison, + bluez_utils, boost, cairo, can-utils, bmon, boa, busybox, + cairo, ccache, cdrkit, cifs-utils, cjson, cmake, collectd, + connman, coreutils, cpanminus, cups, dbus, dhcp, dialog, + diffutils, directfb, distcc, divine, dnsmasq, docker, + dosfstools, dstat, e2fsprogs, ebtables, ed, empty, ethtool, + expedite, fbset, fbv, ffmpeg, flex, fltk, fluxbox, freetype, + gadget-test, gawk, gdb, genext2fs, gettext, giblib, + glib-networking, gmp, gmpc, gnupg, gnutls, gpsd, + gst-plugins-{bad,base,good}, gstreamer, gzip, haserl, hdparm, + heirloom-mailx, hiawanta, hostapd, icu, imagemagick, imlib2, + inadyn, infozip, iproute2, ipset, iptables, iw, jpeg, jquery, + jquery-sparklines, jqeury-validation, kismet, kmod, lame, + libao, libcap, libcurl, libdvdnav, libdvdread, libecore, + libedbus, libedje, libeet, libefreet, libeina, libeio, + liberation, libelementary, libembryo, libethumb, libev, + libevas, libffi, libfribidi, libfuse, libgcrypt, libglib2, + libgpg-error, libgtk2, libhid, libidn, libmicrohttpd, libmpd, + libnl, libnspr, libnss, libogg, libpcap, libplayer, libpng, + libroxml, librsvg, libseccomp, libsigc, libsndfile, libungif, + libupnp, liburcu, libusb-compat, libvncserver, libvorbis, + libxml2, libxslt, lighttpd, links, linux-firmware, + linux-fusion, ltp-testsuite, ltrace, + lttng-{babel,libust,modules,tools}, lvm2, lua, luajit, lzop, + matchbox-{desktop,lib}, mdadm, metacity, midori, minicom, mpd, + mpfr, mplayer, mtd, mysql_client, ncurses, neon, netatalk, + networkmanager, nspr, ntfs-3g, nuttcp, ofone, olsr, openssl, + openvpn, opkg, oprofile, opus, opus-tools, orc, ortp, pango, + pciutils, pcmanfm, pcre, pcsc-lite, perl, php, pixman, + pkgconf, polarssl, pptp-linux, proxychains, pulseaudio, + python, python3, qemu, qextserialport, qt, quagga, radvd, + readline, rng-tools, rt-tests, rubix, ruby, sam-ba, samba, + sane-backends, sconeserver, scons, screen, sdl, sdl_gfx, + sdl_mixer, sdl_ttf, sdparm, sed, ser2net, smartmontools, + speex, sqlite, squid, sshfs, strace, sudo, sylpheed, tn5250, + taglib, tar, torsmo, transmission, tslib, uboot-tools, ulogd, + usb_modeswitch, util-linux, valgrind, vim, vsftpd, wavpack, + webkit, wipe, wireless_tools, wpa_supplicant, xapp_xinit, + xapp_xinput-calibrator, xapp_xman, xapp_xmh, xlib_libX11, + xlib_libXdmcp, xlib_libXft, xlib_libpthread-stubs, + xlib_xtrans, xproto_xcmiscproto, xproto_xextproto, + xserver_xorg-server, xstroke, xvkbd, xz + + New packages: b43-firmware, b43-fwcutter, bustle, + cache-calibrator, cegui06, celt051, classpath, curlftpfs, + dvb-apps, dvbsnoop, elfutils, enlightenment, firmware-imx, + flashbench, gd, gesftpserver, gst-fsl-plugins, httping, iftop, + imx-lib, jamvm, jpeg-turbo, keyutils, libatasmart, libcofi, + libebml, libevas-generic-loaders, libfslcodec, libfslparser, + libfslvpuwrap, libgsasl, libiscsi, libmatroska, libmcrypt, + libmhash, libqwt, libseccomp, libsha1, linenoise, mcrypt, + media-ctl, ncdu, neard, neardal, nettle, perf, polkit, + proxychains, python-bottle, python-pyparsing, rpi-firmware, + rpi-userland, sg3_utils, slirp, snowball-hdmiservice, spice, + spice-protocol, tcllib, tvheadend, udisks, usbredir + ux500-firmware, vde2, xcb-utils-keysyms, yavta, + zd1211-firmware + + Removed packages: customize, xdriver_xf86-input-{acecad,aiptek}, + xdriver_xf86-video-{apm,chips,i740,rendition,s3,s3virge,sisusb}, + xdriver_xf86-video-sun{cg14,cg3,cg6,ffb,leo,tcx}, + xdriver_xf86-video-{tsend,xgi,xgixp} + + Deprecated packages: xstroke + + Issues resolved (http://bugs.uclibc.org): + + #4237: building shared openssl w/-Os fails due to gcc bug + #5690: python3 does not obey to BR2_PACKAGE_PYTHON3_PYC_ONLY=y + #5602: python3 should install a "python" symbolic link + #5846: Extra slash added to last slash in URL + +2012.11.1, Released January 3rd, 2013: + + Toolchain: Fixed non-largefile builds on recent Ubuntu + versions. + + Arch: fix missing x86/generic handling, Build for Xtensa with + longcalls option. + + Updated/fixed packages: dosfstools, qt + +2012.11, Released December 2nd, 2012: + + Git shallow clone fix for older git version. + + Updated/fixed packages: ctuio, libtool + + Issues resolved (http://bugs.uclibc.org): + + #5726: List all the available hook points + +2012.11-rc2, Released November 30th, 2012: + + Minor fixes around the tree. + + Various manual updates and fixes. + + Add checks for legacy features. + + Updated/fixed packages: acpid, alsa-lib, arptables, binutils, + busybox, ccache, cjson, cramfs, directfb, flex, fluxbox, gdb, + hiawatha, igh-ethercat, imagemagick, imlib2, lcdproc, + libdaemon, libecore, libhid, libmad, libpcap, libsigc, libusb, + linux-fusion, matchbox, ocf-linux, owl-linux, python, rrdtool, + scons, strace, sylpheed + + Issues resolved (http://bugs.uclibc.org): + + #5732: Error : package/alsa-lib/alsa-lib.mk + +2012.11-rc1, Released November 17th, 2012 + + Fixes all over the tree and new features. + + Defconfigs: use u-boot 2012.10 on at91 and beaglebone, + sheevaplug + qemu: bump kernel version, add qemu-mips64-malta + + nitrogen6x defconfigs. + + Bootloaders: add u-boot 2012.07/10, ais target format, add + barebox 2012.08/09/10/11, linker overlap issue fix for + at91bootstrap, mxs-bootlets updated for new Barebox versions. + + Toolchains: binutils 2.23.1, gcc 4.7.2, default to gcc 4.6.x, + Codebench arm/sh/x86 2012.03/09, Linaro 2012.08/09/10. + Libtirpc support for modern glibc variants. Toolchain on + target has been deprecated. + + Initial Aarch64 support, Xtensa support re-added. + + Infrastructure: Use shallow git clone when possible, use + tarballs rather than git URLs for github. Moved to pkgconf + rather than pkg-config. System directory added, default + skeleton/device tables moved. More than 1 post-build script + can now be used. output/target now contains a + THIS_IS_NOT_YOUR_ROOT_FILESYSTEM warning, to help people + understand how to (not) use it. + + Manual has been reworked and extended. + + Legal-info: Lots of package annotations, CSV file fixes, + _LICENSE / _REDISTRIBUTE splitup, per-package hooks. + + Updated/fixed packages: acpid, alsa-lib, alsa-utils, + alsamixergui, attr, autoconf, automake, bash, bind, binutils, + bison, blackbox, bluez-utils, busybox, cairo, can-utils, + cifs-utils, cjson, cmake, collectd, connman, conntrack-tools, + coreutils, cups, cvs, dbus, dhcp, directfb, dmalloc, dnsmasq, + dropbear, e2fsprogs, ethtool, fbdump, feh, fftw, file, + flashrom, fluxbox, gdb, gdisk, gdk-pixbuf, genext2fs, gettext, + gnutls, gpsd, gqview, grep, gsl, gst-plugins-{bad,good}, + hdparm, hiawatha, hostapd, input-tools, iproute2, ipset, + iptables, iw, json-c, kexec, kmod, lcdproc, leafpad, less, + libcurl, libdrm, libdvdnav, libdvdread, libffi, libfuse, + libglib2, libhid, liblockfile, libmad, libmbus, libmnl, + libnetfilter_{acct,conntrack,cthelper,cttimeout,queue}, + libnfc, libnfc-llcp, libnfnetlink, libnl, libnspr, libnss, + libpcap, libplayer, libtool, libtorrent, liburcu, libv4l, + libxcb, libxml2, libxslt, links, linux-firmware, lm-sensors, + lmbench, lockfile-progs, logrotate, lshw, lsof, + lttng-babeltrace, lttng-tools, lua, luajit, mesa3d, microperl, + mii-diag, module-init-tools, mpc, mpd, mpg123, mplayer, + mtd-utils, mysql_client, nbd, ncurses, netatalk, netkitbase, + netkittelnet, netsnmp, newt, nfs-utils, openntpd, openssh, + openssl, opkg, patch, pciutils, pcre, php, poco, polarssl, + popt, portmap, pppd, procps, pulseaudio, python, python-nfc, + python-protobuf, qt, quota, rp-pppoe, rtorrent, sam-ba, samba, + scons, sdl_gfx, smartmontools, sqlite, squid, strace, sudo, + sylpheed, tcpdump, tremor, ttcp, tiff, unionfs, + usb_modeswitch, usbutils, util-linux, vala, valgrind, vpnc, + vsftpd, webkit, wget, which, wpa_supplicant, x11vnc, xapp_*, + xdriver_*, xenomai, xfont_*, xinetd, xl2tp, xlib_*, xlsclient, + xproto_*, xserver_xorg-server, xutil_util-macros, xz, zeromq + + New packages: arptables, at91bootstrap3, boot-wrapper-aarch64, + ccid, cpanminus, cpuload, erlang, evtest, fb-test-apps, + fxload, gdbm, gnupg, googlefontdirectory, grantlee, gsl, + lcdapi, liblo, liblog4c-localtime, libtirpc, linux-pam, + lua-msgpack-native, macchanger, mtdev, mtdev2tuio, nfacct, + opus, opus-tools, pcsc-lite, perl, pkgconf, python-meld3, + python3, qemu, qextserialport, qtuio, rpcbind, schifra, + sconeserver, supervisor, time, ulogd, usb_modeswitch_data, + yasm + + Deprecated packages: netkitbase, netkittelnet + + Issues resolved (http://bugs.uclibc.org): + + #807: [PATCH] samba - make iconv and smbd optional + #3049: binutils have a sysroot bug in ld + #5330: update vsftpd to 3.0.0 + #5486: libglib2 build fails on: libs/libglib-2.0.so: undefined... + #5666: Fails to build python 2.7.2 for 2440 arm + +2012.08, Release August 31th, 2012 + + Updated/fixed packages: microperl, cups, luajit, rrdtool, + prboom, oprofile. + + Added license information for: sqlite. + + Changed the source URLs of all packages located on Sourceforge + in order to use the automatic mirror selection URL + downloads.sourceforge.net, and get rid of the + BR2_SOURCEFORGE_MIRROR option. + +2012.08-rc3, Released August 25th, 2012 + + Updated/fixed packages: libglib2, netsnmp, freetype, libfuse, + libpng, x11vnc, zlib, gpsd, ifplugd, bash, distcc. + + Added license informations for: barebox, grub, syslinux, + uboot, xloader, yajl, zlib, zxing, alsa-lib, alsa-utils, + faad2, nano, fbdump, rsync, librsync, fontconfig, + inotify-tools, + +2012.08-rc2, Released August 15th, 2012 + + Updated/fixed packages: imagemagick, sudo, crosstool-ng. + + Added license informations for: mxml, nanocom, empty, expat, + lua, lucjson, xinetd, cjson, luaexpat, lmbench, bwm-ng, + input-event-daemon, luajit, cgilua, copas, coxpcall, + luafilesystem, luasocket, rings, wsapi, xavante, libtpl, + avahi, busybox, libfcgi, ifplugd, libcgicc, libcurl, + libdaemon, libdnet, libgpg-error, libpcap, libpng, lighttpd, + mtd, openssl, psmisc, socat, spawn-fcgi. + + Fixes to Microblaze external toolchains + configuration. Improvements of the pkg-stats + script. Out-of-tree fix for the graph-depends script. + + Kernel headers version bump. + +2012.08-rc1, Released August 1st, 2012 + + Fixes all over the tree and new features. + + Integration of a legal information reporting infrastructure, + which allows to generate detailed informations about the + licenses and source code of all components of a system + generated by Buildroot. License information will progressively + be added on packages. + + Default configuration files added for Calao-systems USB-A9263 + and Calao-systems USB-A9G20-LPW. + + External toolchains update: allow download of a custom + toolchain, add Linaro 2012.05 and 2012.06 for ARM, add + Blackfin toolchain 2012R1-BETA1, add Sourcery CodeBench MIPS + 2011.09. + + Allow the restriction of downloads to the primary site only. + This is useful for project developers who want to ensure that + the project can be built even if the upstream tarball + locations disappear. + + Add a 'System configuration' choice to select between 3 + different init systems: Busybox init, SysV init and Systemd + init. + + Cleanups to the package infrastructure. The visible change to + developers is that $(eval $(call AUTOTARGETS)) is now $(eval + $(autotools-package)), and similarly for other package + infrastructures and host packages. Refer to the documentation + for details. + + By default, automatic detection of the number of compilation + jobs to use, depending on the number of CPUs available. + + Improvements to generate systems with static libraries only + (infrastructure and package fixes). + + Add proper support in the Linux kernel package to generate + Device Tree Blobs or combined Device Tree / Kernel + images. This will be useful on Microblaze, PowerPC and ARM, + which are architectures making extensive use of the Device + Tree. + + Updated/fixed packages: audiofile, autoconf, automake, axel, + barebox, bash, beecrypt, berkeleydb, bind, bison, bluez_utils, + bonnie, boost, busybox, bsdiff, bwm-ng, bzip2, cifs-utils, + cgilua, cmake, connman, conntrack-tools, crosstool-ng, cups, + dbus, dhcp, dnsmasq, e2fsprogs, eeprog, ethtool, faad2, fbv, + ffmpeg, freetype, gmp, gnutls, gob2, gpsd, grep, + gst-plugins-base, gst-plugins-good, gzip, hiawatha, hostapd, + htop, icu, igh-ethercat, imagemagick, input-tools, iostat, + iproute2, ipset, iptables, iw, kmod, less, libcap, libgci, + libconfig, libcurl, libelf, libevas, libeXosip2, libexif, + libfuse, libidn, libmad, libmbus, libmnl, + libnetfilter-conntrack, libnl, libnspr, libnss, libogg, + libosip2, libpcap, libpng, libroxml, liburcu, libusb, libxml2, + libxslt, lighttpd, linux, ltrace, lttng-libust, lttng-modules, + lttng-tools, lua, m4, memtester, midori, mii-diag, + module-init-tools, mpfr, mpg123, mrouted, msmtp, mtd, mxml, + mysql_client, nasm, nbd, ncurses, nfs-utils, opencv, openocd, + openssl, pciutils, php, polarssl, portaudio, pppd, + pthread-stubs, pulseaudio, qt, quagga, quota, radvd, rpm, + rrdtool, samba, sam-ba, scons, sdl_gfx, sdl_sound, speex, + sqlite, squashfs, squid, sudo, synergy, syslinux, systemd, + tar, tcpdump, tcpreplay, udev, usbutils, valgrind, wget, + wpa_supplicant, wsapi, xavante, xserver_xorg-server, zlib + + New packages: cjson, collectd, dfu-util, dmidecode, elftosb, + fbterm, flashrom, freerdp, inadyn, libfreefare, + libnetfilter_cttimeout, libnfc, libnfc-llcp, liboping, + libtorrent, linphone, logsurfer, lshw, luacjson, luaexpat, + luajit, mediastreamer, mobile-broadband-provider-info, monit, + mxs-bootlets, nanocom, nss-mdns, ofone, omap-u-boot-utils, + opkg, ortp, owl-linux, python-id3, python-nfc, quota, + ramspeed, rtorrent, sound-theme-borealis, + sound-theme-freedesktop, sysprof, webrtc-audio-processing, + xinetd, zxing + + Issues resolved (http://bugs.uclibc.org): + + #1315: Allow use of older external toolchains without sysroot + support [won't fix] + #5276: Hiawatha needs to manage IPV6 if so [fixed] + #5360: buildroot fails when building "host-libglib2 2.30.2 + Building" [won't fix, upstream problem] + #5384: Can't build packages relying on gets on newer glibc + [fixed] + +2012.05, Released May 30th, 2012: + + Updated/fixed packages: busybox, netsnmp, pptp-linux + +2012.05-rc3, Released May 25th, 2012: + + Minor fixes around the tree. + + Infra: Fix for DOWNLOAD macro when using primary mirrors with + scp targets. + + Toolchain: Kernel headers 3.2.18 / 3.3.7. + + Updated/fixed packages: binutils, bison, busybox, cifs-utils, + gnuchess, gpsd, iperf, libmpeg2, mtd, ntfs-3g, oprofile, + xserver-xorg + +2012.05-rc2, Released May 18th, 2012: + + Fixes all over the tree. + + Toolchain: uClibc: Use 0.9.33.2, Crosstool-ng: fix gperf + dependency, disable decimal floats support, Linux 3.2.17 / + 3.3.6 kernel headers. Fix sysroot copy handling for toolchains + without C++ support. + + Updated/fixed packages: apr, apr-util, ccache, dnsmasq, + heirloom-mailx, gdb, ndisc6, opencv, openssl, socat, vala + +2012.05-rc1, Released May 10th, 2012: + + Fixes all over the tree and new features. + + Use /etc/os-release for version info rather than + /etc/br-version. + + CMake toolchain file moved to $HOST_DIR/usr/share/buildroot. + + Apply-patches.sh: cleanups, archived patches handling fixes, + support series files. + + Defconfigs: beaglebone, mx53qsb, pandaboard, qemu configs for + arm-vexpress/microblaze/ppc-mpc88544ds, use 3.2.x for + atngw100, use 3.3.x for qemu configs. + + Menu structure: Libraries moved out of multimedia section + + Atom processor support. Prescott fix, blackfin ABI fix, + Microblaze architecture support (using ext toolchain). Cleanup + architecture names, deprecate Xtensa support. + + Toolchain: Add GCC 4.4.7, 4.6.3, 4.7.0. uClibc 0.9.33.1, + default to uClibc 0.9.33.x, enable + UCLIBC_SUPPORT_AI_ADDRCONFIG by default, static and 64bit + fixes for external toolchains, linaro ext toolchains, new + sourcery codebench ext toolchains, GDB 7.4.1, crosstool-ng + 1.15.2. + + Bootloaders: U-Boot: add 2012.04.01, SPL and u-boot.img + support. Barebox: add 2012.04, remove 2011.12. + + Updated/fixed packages: alsa-lib, alsa-utils, at, atk, avahi, + barebox, berkeleydb, bind, bluez_utils, boost, busybox, + can-utils, ccache, cifs-utils, coreutils, cups, dbus, dhcp, + directfb, dnsmasq, doom-wad, dosfstools, e2fsprogs, expat, + fakeroot, feh, ffmpeg, file, fis, freetype, gamin, gawk, + gdk-pixbuf, gettext, giblib, glib-networking, gmp, gnutls, + gpsd, grep, gstreamer, gst-plugins-{bad,base,good,ugly}, + haserl, hdparm, imagemagick, iproute2, iptable, iw, kexec, + kmod, lame, libaio, libarchive, libatomic_ops, libconfig, + libcurl, libdvdnav, libdvdread, libedbus, libethumb, libffi, + libfuse, libglib2, libgtk2, libhid, libmad, libmbus, libmpeg2, + libnl, libplayer, libpng, libsigc, libsoup, libupnp, liburcu, + libusb, libusb-compat, libxml2, libxml-parser-perl, libxslt, + lighttpd, linux-firmware, linux-fusion, lite, lsof, ltrace, + lttng-libust, lua, m4, makedevs, microperl, mpd, mpfr, mpg123, + mrouted, mtd, mysql_client, nbd, ncftp, ncurses, neon, + netsnmp, network-manager, nfs-utils, ngrep, ntfs-3g, openntpd, + openssh, openssl, parted, pango, pcre, php, pixman, poco, + psmisc, pulseaudio, python, qt, quagga, radvd, rpm, rsync, + ruby, samba, sam-ba, sane-backends, sawman, screen, sdl_net, + smartmontools, speex, sqlite, squashfs3, squid, sshfs, sudo, + syslinux, sysstat, taglib, tcpdump, tftp-hpa, transmission, + tiff, tinyhttpd, uboot-tools, udev, uemacs, unionfs, usbutils, + util-linux, vala, valgrind, vim, vsftpd, wget, wipe, + wpa_supplicant, xdriver_xf86-{input-vmmouse,video-fbdev}, + xfsprogs, zlib + + New packages: apr, apr-util, audiofile, bellagio, + conntrack-tools, empty, fmtools, glib-networking, + heirloom-mailx, hiawatha, latencytop, lcdproc, libcap-ng, + libdmtx, libfcgi, libnetfilter_conntrack, libnfnetlink, + libtpl, localedef, minicom, msmtp, ndisc6, netatalk, + ocf-linux, openswan, parted, polarssl, protobuf, read-edid, + socketcand, stress, systemd, ushare, zeromq + + Deprecated packages: ttcp + + Removed packages: ntfsprogs + + Issues resolved (http://bugs.uclibc.org): + + #2353: [lua] fix build with 2010.08-rc1 + #2503: Microperl fails build on MIPSel or with Fedora13.x86_64 + #2557: [PATCH] mkfs.xfs complains about missing libxfs.so.0 + #2881: Can't build project statically with external toolchain + #3751: MIPS: fix BR2_GCC_TARGET_ABI for MIPS n64 + #4808: ccache may build against wrong zlib + #4880: New package lcdproc + #4886: New package protobuf + #4892: build fails on ltp-testsuite-20101031/testcases/kernel/fs/... + #4898: * make: [target-finalize] Error 1 (ignored)* + #4985: Qt 4.7.4 build crashes with Linux 2.6.29 + #4970: udev 181 fails to build if kernel version 3.3 is selected + #5018: dialog broken: exits with assert in uClibc + #5102: qt package moc, uic, rcc read from wrong place + #5144: Patch to fix ixon bug in uemacs + #5198: Line graphics output is broken in GNU Screen + #5204: Missing terminfo file(s) for GNU screen terminal type + +2012.02, Released February 29th, 2012: + + Updated/fixed packages: libecore + +2012.02-rc3, Released February 27th, 2012: + + Fixes all over the tree. + + Automatic host dependencies handling for cmake packages + fixed. Customize package deprecated as using a post-build + script is nowadays the preferred way of adding extra stuff to + the rootfs. + + Linux-headers 3.0.x / 3.2.x stable version bumped. + + QEMU defconfigs updated to 3.2.x kernels and readme fixed. + + Updated/fixed packages: dropbear, ffmpeg, libpng + +2012.02-rc2, Released February 19th, 2012: + + Fixes all over the tree. + + Toolchain: uClibc: Added upstream post-0.9.33 fixes, Bump + linux-headers 3.0.x / 3.2.x stable versions. + + Documentation: Added makedev / _DEVICES / + _PERMISSIONS documentation. + + Updated/fixed packages: busybox, ffmpeg, gst-dsp, libecore, + libvncserver, mxml, python. + +2012.02-rc1, Released February 12th, 2012: + + Fixes all over the tree and new features. + + Toolchain: Default to GCC 4.5.x, add binutils 2.22. Java + support removed, Powerpc SPE ABI support. GDB ELF support fix, + GDB 7.4, crosstool-NG 1.13.4. + + Gentargets: scp and mercurial support. + Autotools: derive host dependencies from target by default. + Packages can now declare device table snippets. + + Host utilities menu with commonly used host tools. + + defconfigs: qemu configs for x86-64, mips and sparc, at91 + defconfigs now use modern U-Boot / mainline Linux, added + lpc3250 defconfigs. + + uClibc: remove 0.9.30, backport unshare() support, add + 0.9.32.1 / 0.9.33, use same config for ctng. + + Bootloaders: U-Boot: add 2011.12, remove 2010.xx versions, + Barebox: add 2012.01/02, remove 2011.10/11, LPC32xx + bootloaders added. + + Various manual updates. Release tarballs now contain generated + manual in text/html/pdf formats. + + Buildroot now calls the stop function of scripts in + /etc/init.d at shutdown. + + Updated/fixed packages: atk, avahi, barebox, bash, beecrypt, + bind, binutils, bison, bluez_utils, bzip2, busybox, cairo, + ccache, cdrkit, coreutils, cramfs, dbus, dbus-glib, dialog, + diffutils, dmalloc, dropbear, e2fsprogs, ebtables, ed, + ethtool, expat, ffmpeg, file, fis, flex, fluxbox, fontconfig, + freetype, gawk, grep, gst-dsp, gst-ffmpeg, gst-plugins-base, + hdparm, hostapd, htop, i2c-tools, icu, iproute2, ipsec-tools, + ipset, iptables, iw, jpeg, kismet, lame, libcap, libcgi, + libev, libeXosip2, libffi, libftdi, libgpg-error, libgtk2, + libidn, libmms, libmnl, libmodbus, libnl, libogg, libosip, + libpcap, libpng, libraw1394, libroxml, libusb, libusb-compat, + libv4l, libvorbis, libxcb, libxml-parser-perl, libxslt, + lighttpd, links, lm-sensors, lua, m4, module-init-tools, mpc, + mesa3d, mpd, mpfr, mplayer, mtd-utils, nano, nbd, ncurses, + netperf, netsnmp, ntp, opencv, openocd, openssl, openvpn, orc, + pciutils, pcre, pixman, pkg-config, poco, popt, proftpd, + python, python-serial, qt, ruby, samba, sdl, sdparm, + squashfs3, sshfs, sqlite, squid, sudo, syslinux, tcl, tcpdump, + ti-utils, tiff, tremor, uboot, uboot-tools, udev, usbmount, + util-linux, vala, valgrind, vsftpd, wpa_supplicant, + xapp_{bdftopcf,mkfontdir,mkfontscale,xkbcomp,xcursorgen,xinit}, + xapp_xinput, xapp_xman, xcb-util, xdm, xenomai, + xf86-video-sis, xfont_{encodings,font-util}, + xlib_lib{fontenc,X11,Xau,Xcursor,Xdmcp,Xfixes,Xfont,Xrender}, + xlib_libxkbfile, xterm, xutil_makedepend, yajl + + New packages: boost, connman, dstat, expedite, explorercanvas, + feh, flot, giblib, igh-ethercat, imlib2, jquery, + jquery-sparklines, jquery-validation, jsmin, kmod, libecore, + libedbus, libedje, libeet, libeina, libelementary, libesmtp, + libethumb, libevas, libical, libmbus, liboauth, liburcu, + libvncserver, linux-firmware, + lttng-{babeltrace,libust,modules,tools}, NetworkManager, + open2300, python-distutilscross, python-dpkt, + python-netifaces, python-pygame, python-setuptools, rt-tests, + sam-ba, sane-backends, sqlcipher, transmission, unionfs, + xf86-input-tslib, xinput-calibrator + + Issues resolved (http://bugs.uclibc.org): + + #743: Add Transmission bit torrent option to buildroot + #755: Add Boost libraries as a package + #2299: Add crypto support to libsoup + #2617: Pixman 0.19.2 & Cairo 1.10.0 + #3403: libgpg-error: bump to version 1.10 + #3409: libgpg-error: download from gnupg.org + #3421: nano: make tiny flag optional + #3691: New EFL packages + #4664: Cannot patch AT91Bootstrap + #4700: setlocalversion not working for combination svn/ubuntu 11.10... + #4760: Qt: add host-pkg-config to dependency-list + +2011.11, Released November 30th, 2011: + + Fixes all over the tree. + + Bump kernel headers / default Linux version to 3.1.4. + + Updated/fixed packages: ruby + +2011.11-rc3, Released November 26th, 2011: + + Fixes all over the tree. + + Toolchain: Fix gdb dependencies for external toolchains, + adjust uClibc patches so they don't confuse modern versions of + patch, bump crosstool-ng, kernel headers and linux versions. + + Updated/fixed packages: busybox, freetype, mplayer, opencv, + php, rsyslog, ruby, thttpd, xapp_xf86dga + + Issues resolved (http://bugs.uclibc.org): + + #4357: Prevent patch commands from accessing source control + #4369: Fix permissions on untared lsof archive + +2011.11-rc2, Released November 18th, 2011: + + Fixes all over the tree and new features. + + Updated asciidoc documentation + + Toolchain: Bumped 3.x stable kernel headers, use wget in + crosstool-ng as well, bump crosstool-ng version, gdb fixes, + uClibc sparc fix. + + Updated/fixed packages: distcc, file, gst-plugins-bad, libxcb, + mplayer, newt, qt, rpm, rrdtool, tar, tftpd + + Issues resolved (http://bugs.uclibc.org): + + #3355: mplayer fails to build + #4021: uClibc: undefined reference to `__GI___errno_location' + #4297: Qt's qmake uses wrong pkg-config + +2011.11-rc1, Released November 11th, 2011: + + Fixes all over the tree and new features. + + Moved misc scripts and support stuff to support/. Renamed + patch-kernel.sh to support/scripts/apply-patches.sh. + + Documentation: Moved to asciidoc format, make targets to + generate text/html/pdf/epub output added. + + Defconfigs: Qemu configs updated to 3.1 kernel and readmes + added. + + Bootloaders: Add support for custom git tree / tarballs for + barebox, similar to how it's handled for u-boot. Clean up + menuconfig options. + + Toolchain: Update external codesourcery toolchain download + URLs after Codesourcery got bought by Mentor, add x86 + toolchain, update toolchain versions and optimize toolchain + sysroot copying. Fix uClibc 0.9.32 builds for e500 PPC, + updated GDB versions / download URLs. Binutils + libbfd/libopcodes static/dynamic linking fix. GCC 4.6.2 added, + use ctng-1.13.0. + + Package infrastructure: Support for local packages / + overrides, package dir / name arguments dropped from + {GEN,AUTO,CMAKE}TARGETS. + + Linux: Kernel extensions infrastructure support, Xenomai + + RTAI support. + + Updated/fixed packages: acpid, bind, busybox, dash, dbus, + dbus-glib, directfb, dnsmasq, drystone, e2fsprogs, ethtool, + fakeroot, fbdump, file, freetype, fuse, gamin, gmp, gmpc, + gnutls, gob2, gst-plugins-{base,bad,good,ugly}, gstreamer, + hostapd, ifplugd, imagemagick, intltool, ipsec-tools, ipset, + iptables, iw, jpeg, kexec, leafpad, less, libargtable2, libao, + libconfuse, libcuefile, libcurl, libdaemon, libevent, + libglib2, libiconv, libmpd, libreplaygain, libroxml, + libsamplerate, libsndfile, libsoup, libsvgtiny, libtool, + libxcb, lighttpd, links, linux-fusion, lite, lrzsz, lsof, lzo, + lzop, makedevs, mcookie, mpg123, mpd, mpfr, mtd, musepack, + mutt, mysql_client, ncftp, ncurses, neon, netcat, netsnmp, + ntfs-3g, ntfsprogs, ntp, openntpd, openssh, openssl, oprofile, + orc, pciutils, psmisc, python, qt, quagga, radvd, rpm, rsync, + samba, sawman, sdl_sound, smartmontools, sqlite, squid, + stunnel, sudo, sylpheed, sysstat, taglib, tar, tcpreplay, + tslib, usbutils, util-linux, valgrind, wget, whetstone, which, + wpa-supplicant, xdata_xcursor-themes, xmlstarlet, xterm + + New packages: bluez-utils, cifs-utils, fftw, fluxbox, json-c, + libev, libftdi, libgeotiff, libmodbus, libplayer, live555, + ngrep, noip, opencv, openocd, picocom, poco, portaudio, + pulseaudio, pv, rtai, vala, xenomai. + + Removed packages: liboil, sfdisk, swfdec, webif + + Issues resolved (http://bugs.uclibc.org): + + #505: live555: new package + #507: Enable live and tv options in MPlayer-1.0rc2 + #531: let e2fsprogs package to export headers to staging dir if needed + #1171: Linuxthreads new cannot find sysdep.h + #1357: Add bluez to buildroot system + #2107: New package: input-event-daemon + #2599: New package: orc (Oil Runtime Compiler) + #2605: gstreamer: Update to 0.10.30 + #2677: introducing util-linux-ng as replacement for util-linux + #2917: Qt: Add declarative module + #3145: jffs2 image generation fails + #3271: netperf-2.4.5 fails to compile + #3331: xdata_xcursor-themes depends on xcursorgen + #3343: Add file:// download SITE_METHOD + #3391: Add support for specifying an external kernel tree + #3631: Error while compiling with Xorg + #3709: oprofile doesn't build for mipsel + #3925: midori not getting compile + #4045: Add support for downloading i386 toolchains from codesourcery + #4165: lrzsz-fix-symlink-at-rebuild.patch + #4171: makedevs-unused-but-set-variable.patch + #4183: Codesourcery toolchain download site has changed + #4231: libneon.so: undefined reference to `SSL_SESSION_cmp' + #4381: Add option to lighttpd to enable Lua support + #4387: Make sure that dest dir exists before installing mtd files + +2011.08, Released August 31th, 2011: + + Fixes all over the tree. + + Toolchain: Fix codesourcery 2009q3 ARM download, Linux 3.0.4 + kernel headers. + + Updated/fixed packages: ipset, python + +2011.08-rc2, Released August 29th, 2011: + + Fixes all over the tree. + + Toolchain: crosstool-NG 1.12.1, use binutils 2.21 on + mips/sh/older uClibc, disallow uClibc 0.9.32 on avr32/sh + (broken). + + Defconfigs: kernel updates, fix mini2440 serial port config, + remove old arm toolchain configs. + + Bootloaders: Fix grub patching, add barebox-{n,x,menuconfig} + targets similar to linux/busybox. + + Updated/fixed packages: barebox, directfb, libsoup, + libxml-parser-perl, mtd, ncurses, python, ti-utils, udev, + usbmount, util-linux, xfont_font-misc-misc + + Issues resolved (http://bugs.uclibc.org): + + #3685: ncurses installation hangs due to old version of tic + #4093: Grub fails to install bz2 patch after conversion to... + +2011.08-rc1, Released August 4th, 2011: + + Fixes all over the tree and new features. + + Toolchain: uClibc 0.9.32 / NPTL support, 0.9.29 removed, + ext-toolchain-wrapper improvements, improved non-MMU + support. GCC 4.3.6 / 4.6.1. + + GENTARGETS infrastructure extended to cover bootloaders and + Linux kernel as well. Options to retrive Linux/U-Boot from a + custom git repo instead of upstream tarballs. + Support for Linux 3.x and release candidate tarballs. + X-Loader bootloader for omap added. + + Make source/external-deps now also works for external + toolchains / crosstool-ng backend. + + Updated/fixed packages: autoconf, berkeleydb, bind, binutils, + bmon, bridge-utils, busybox, cmake, dbus, dbus-glib, + e2fsprogs, ethtool, ffmpeg, gst-plugins-{bad,base,good,ugly}, + gvfs, hostapd, iproute2, iptables, iw, jpeg, lame, libarchive, + libdnet, libdrm, libgcrypt, libgtk2, libmpeg2, libpng, + libsoup, lighttpd, linux-fusion, lzo, midori, mtd-utils, + nfs-utils, openvpn, oprofile, orc, pkg-config, proftpd, qt, + ruby, samba, sdl, shared-mime-info, sudo, sqlite, squid, + synergy, udev, usbmount, usbutils, util-linux, valgrind, + webkit, xorg-xserver, xz, zlib + + New packages: acl, attr, ebtables, gnutls, inotify-tools, + ipset, libargtable2, libiqrf, libmnl, libnspr, libnss, + libroxml, libyaml, live555, mxml, orc, rsyslog, sredird, + statserial, stunnel, ti-utils, uboot-tools, yajl + + Deprecated packages: liboil, swfdec + + Removed packages: hal + + Issues resolved (http://bugs.uclibc.org): + + #3559: libnspr: Add new package + #3595: patch to add libroxml + #3565: libnss: Add new package + #3583: xfonts_font-adobe-100dpi fails due to missing map file + #3649: [PATCH] Add mapdir to existing pkg-config patch + #3907: 2011.05 - Qt 4.7.3 not building on ARM + #3961: Nfs-utils: Remove SUSv3-function index + #3985: "help" target's defconfig list needs sort + #3997: bump libroxml to v2.1.0 + +2011.05, Released May 27th, 2011: + + Updated/fixed packages: makedevs + +2011.05-rc2, Released May 24th, 2011: + + Fixes all over the tree. + + Toolchain: Code sourcery ARM 2009q1 download URL fixed / + 2009q3 external toolchains added. Crosstool-NG bumped to + 1.11.3, eglic/glibc configuration fixes. Linux kernel 2.6.38.x + bumped to 2.6.38.7. + + Updated/fixed packages: bind, fakeroot, kbd, psmisc, qt + +2011.05-rc1, Released May 18th, 2011: + + Fixes all over the tree and new features. + + External toolchain improvements: We now build a binary + toolchain wrapper and install it into HOST_DIR/usr/bin, which + enforces the correct compiler arguments, making an external + toolchain as easy to use outside of Buildroot as the internal + ones are. This also brought a cleanup of CFLAGS, making the + Buildroot build output easier to read. + + Rootfs device handling improvements: Choice between static + /dev, devtmpfs and devtmpfs with either mdev or udev. + + Toolchain: More preconfigured codesourcery external + toolchains, improved Crosstool-NG support, fix for GCC + snapshot versions, GCC 4.4.6 / 4.5.3, experimental GCC 4.6.0 + support, target-GCC fixes, uClibc fixes, 0.9.32-rc3 support. + + Bootloaders: U-boot 2011.03, Barebox 2011.05.0 + + Linux: support for custom kernel image targets, E.G. for + powerpc builds with embedded device trees. + + Misc fixes for qemu defconfigs, ensuring correct serial + terminal setup out of the box. + + Misc gentarget / autotools handling fixes. + + Updated/fixed packages: alsa-lib, alsa-utils, alsamixergui, + atk, avahi, bind, bison, busybox, copas, dbus-glib, dhcp, + dhcpdump, dnsmasq, dropbear, ethtool, fakeroot, ffmpeg, file, + gamin, gnuconfig, gst-ffmpeg, gst-plugins-good, gtk2-engines, + haserl, hostapd, icu, imagemagick, iproute2, iw, kismet, less, + libcap, libdnet, libglade, libglib2, libgtk2, libnl, libpng, + libxml2, libxml2, libxslt, lighttpd, lockfile-progs, makedevs, + midori, mpg123, mpc, mpd, mpfr, mplayer, mtd-utils, ncurses, + netsnmp, openssh, openssl, openvpn, pango, pkg-config, popt, + procps, proftpd, qt, quagga, readline, rsync, samba, sdl, + socat, squashfs, squid, sudo, tslib, udev, usbutils, webkit, + wpa_supplicant, xerces, xfont_font-misc-misc, xlib_libX11, + xlib_libXfont, xlib_xtrans, xorg-server, xterm, xz + + New packages: bonnie++, can-utils, gdisk, htop, + input-event-daemon, libexif, libraw, libv4l, ngircd + + Removed packages: festival + + Issues resolved (http://bugs.uclibc.org): + + #2131: Add OpenMP support to the toolchain + #3379: New Package: bonnie++ + #3445: Not working openssl-10.0.0d on 386sx + #3451: fakeroot package: wrong FAKEROOT_SITE variable + #3457: alsamixergui: broken URL + #3475: Calling sync on large filesystems when not always necessary + #3511: make busybox-menuconfig does not download busybox package + #3541: Quotes in the top Makefile:217 break buildroot/kernel config... + #3571: u-boot: fw_printenv does not build + #3643: popt source url is not responding + #3733: dropbear: make zlib optional + #3757: Buildroot can't build mplayer with libmad + 2011.02, Released February 28th, 2011: Fixes all over the tree. diff --git a/Config.in b/Config.in index f1a743aaa2..d87e0f0c54 100644 --- a/Config.in +++ b/Config.in @@ -10,7 +10,17 @@ config BR2_VERSION string option env="BR2_VERSION_FULL" -source "target/Config.in.arch" +config BR2_HOSTARCH + string + option env="HOSTARCH" + +# Hidden boolean selected by pre-built packages for x86, when they +# need to run on x86-64 machines (example: pre-built external +# toolchains, binary tools like SAM-BA, etc.). +config BR2_HOSTARCH_NEEDS_IA32_LIBS + bool + +source "arch/Config.in" menu "Build options" @@ -32,6 +42,26 @@ config BR2_GIT string "Git command" default "git" +config BR2_CVS + string "CVS command" + default "cvs" + +config BR2_LOCALFILES + string "Local files retrieval command" + default "cp" + +config BR2_SCP + string "Secure copy (scp) command" + default "scp" + +config BR2_SSH + string "Secure shell (ssh) command" + default "ssh" + +config BR2_HG + string "Mercurial (hg) command" + default "hg" + config BR2_ZCAT string "zcat command" default "gzip -d -c" @@ -52,6 +82,13 @@ config BR2_BZCAT Default is "bzcat" Other possible values include "bunzip2 -c" or "bzip2 -d -c". +config BR2_XZCAT + string "xzcat command" + default "xzcat" + help + Command to be used to extract a xz'ed file to stdout. + Default is "xzcat" + config BR2_TAR_OPTIONS string "Tar options" default "" @@ -62,6 +99,18 @@ config BR2_TAR_OPTIONS endmenu +config BR2_DEFCONFIG_FROM_ENV + string + option env="BR2_DEFCONFIG" + +config BR2_DEFCONFIG + string "Location to save buildroot config" + default BR2_DEFCONFIG_FROM_ENV if BR2_DEFCONFIG_FROM_ENV != "" + default "$(CONFIG_DIR)/defconfig" + help + When running 'make savedefconfig', the defconfig file will be saved + in this location. + config BR2_DL_DIR string "Download dir" default "$(TOPDIR)/dl" @@ -91,7 +140,26 @@ config BR2_PRIMARY_SITE Primary site to download from. If this option is set then buildroot will try to download package source first from this site and try the default if the file is not found. - NOTE: This only works for packages using the Makefile.autotools.in + Valid URIs are URIs recognized by $(WGET) and scp URIs of the form + scp://[user@]host:path. + NOTE: This works for all packages using the central package + infrastructure (generic, autotools, cmake, ...) + +config BR2_PRIMARY_SITE_ONLY + bool "Only allow downloads from primary download site" + depends on BR2_PRIMARY_SITE != "" + help + If this option is enabled, downloads will only be attempted + from the primary download site. Other locations, like the + package's official download location or the backup download + site, will not be considered. Therefore, if the package is + not present on the primary site, the download fails. + + This is useful for project developers who want to ensure + that the project can be built even if the upstream tarball + locations disappear. + +if !BR2_PRIMARY_SITE_ONLY config BR2_BACKUP_SITE string "Backup download site" @@ -101,18 +169,6 @@ config BR2_BACKUP_SITE will fall back to download package sources from here if the normal location fails. -config BR2_SOURCEFORGE_MIRROR - string "Sourceforge mirror site" - default "hivelocity" - help - Sourceforge has a system of mirror sites. Some sites may be - closer to your location, and sometimes mirror sites go down - and are no longer available. This option allows you to select - your preferred Sourceforge mirror site. - - The list of mirrors is available here: - http://sourceforge.net/apps/trac/sourceforge/wiki/Mirrors - config BR2_KERNEL_MIRROR string "Kernel.org mirror" default "http://www.kernel.org/pub/" @@ -149,13 +205,17 @@ config BR2_DEBIAN_MIRROR Usually, just add your country code like XX here: http://ftp.XX.debian.org +endif + endmenu config BR2_JLEVEL - int "Number of jobs to run simultaneously" - default "2" + int "Number of jobs to run simultaneously (0 for auto)" + default "0" help - Number of jobs to run simultaneously + Number of jobs to run simultaneously. If 0, determine + automatically according to number of CPUs on the host + system. config BR2_CCACHE bool "Enable compiler cache" @@ -165,6 +225,20 @@ config BR2_CCACHE up future builds. The cache is stored in $HOME/.buildroot-ccache. + Note that Buildroot does not try to invalidate the cache + contents when the compiler changes in an incompatible + way. Therefore, if you make a change to the compiler version + and/or configuration, you are responsible for purging the + ccache cache by removing the $HOME/.buildroot-ccache + directory. + +config BR2_CCACHE_DIR + string "Compiler cache location" + depends on BR2_CCACHE + default "$(HOME)/.buildroot-ccache" + help + Where ccache should store cached files. + config BR2_DEPRECATED bool "Show packages that are deprecated or obsolete" help @@ -172,10 +246,13 @@ config BR2_DEPRECATED config BR2_ENABLE_DEBUG bool "build packages with debugging symbols" - select BR2_PACKAGE_GDB_SERVER help - Build packages with debugging symbols - enabled + Build packages with debugging symbols enabled. All libraries + and binaries in the 'staging' directory will have debugging + symbols, which allows remote debugging even if libraries and + binaries are stripped on the target. Whether libraries and + binaries are stripped on the target is controlled by the + BR2_STRIP_* options below. if BR2_ENABLE_DEBUG choice @@ -208,34 +285,57 @@ endchoice endif choice - prompt "strip" + prompt "strip command for binaries on target" default BR2_STRIP_strip - help - Select whether to strip binaries and libraries for the target - or not. - strip is the normal strip command - sstrip is a strip that discards more than the normal strip - none do not strip (only for debugging!) config BR2_STRIP_strip bool "strip" - depends on !BR2_ELF2FLT + depends on !BR2_PACKAGE_HOST_ELF2FLT help - strip is the normal strip command + Binaries and libraries in the target filesystem will be + stripped using the normal 'strip' command. This allows to + save space, mainly by removing debugging symbols. Debugging + symbols on the target are needed for native debugging, but + not when remote debugging is used. config BR2_STRIP_sstrip bool "sstrip" select BR2_PACKAGE_SSTRIP_HOST - depends on !BR2_ELF2FLT + depends on !BR2_PACKAGE_HOST_ELF2FLT help - sstrip is a strip that discards more than the normal strip + Binaries and libraries in the target filesystem will be + stripped using the 'sstrip' command, which strips a little + bit more than the traditional 'strip' command. This allows to + save space, mainly by removing debugging symbols. Debugging + symbols on the target are needed for native debugging, but + not when remote debugging is used. config BR2_STRIP_none bool "none" help - none do not strip (only for debugging!) + Do not strip binaries and libraries in the target + filesystem. endchoice +config BR2_STRIP_EXCLUDE_FILES + string "executables that should not be stripped" + depends on !BR2_STRIP_none + default "" + help + You may specify a space-separated list of binaries and libraries + here that should not be stripped on the target. + +config BR2_STRIP_EXCLUDE_DIRS + string "directories that should be skipped when stripping" + depends on !BR2_STRIP_none + default "" + help + You may specify a space-separated list of directories that should + be skipped when stripping. Binaries and libraries in these + directories will not be touched. + The directories should be specified relative to the target directory, + without leading slash. + choice prompt "gcc optimization level" default BR2_OPTIMIZE_S @@ -302,6 +402,23 @@ config BR2_OPTIMIZE_S endchoice +config BR2_ENABLE_SSP + bool "build code with Stack Smashing Protection" + depends on BR2_TOOLCHAIN_HAS_SSP + help + Enable stack smashing protection support using GCCs + -fstack-protector-all option. + + See http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt + for details. + + Note that this requires the toolchain to have SSP + support. This is always the case for glibc and eglibc + toolchain, but is optional in uClibc toolchains. + +comment "enabling Stack Smashing Protection requires support in the toolchain" + depends on !BR2_TOOLCHAIN_HAS_SSP + config BR2_PREFER_STATIC_LIB bool "prefer static libraries" help @@ -315,23 +432,46 @@ config BR2_PREFER_STATIC_LIB config BR2_HAVE_DOCUMENTATION bool "documentation on the target" + # We no longer want to support a toolchain on the target + depends on BR2_DEPRECATED help Install the documentation, including manual pages and info pages, on the target. If you say n here, your target will not contain any documentation. -config BR2_HAVE_DEVFILES - bool "development files in target filesystem" +config BR2_PACKAGE_OVERRIDE_FILE + string "location of a package override file" + default "$(TOPDIR)/local.mk" help - Install headers and static libraries in the - target filesystem + A package override file is a short makefile that contains + variable definitions of the form _OVERRIDE_SRCDIR, + which allows to tell Buildroot to use an existing directory + as the source directory for a particular package. See the + Buildroot documentation for more details on this feature. + +config BR2_GLOBAL_PATCH_DIR + string "global patch directory" + help + You may specify a directory containing global package patches. + For a specific version of a specific package + , patches are applied as follows. + + First, the default Buildroot patch set for the package is applied. + + If the directory $(BR2_GLOBAL_PATCH_DIR)// + exists, then all *.patch files in the directory will be applied. + + Otherwise, if the directory $(BR2_GLOBAL_PATCH_DIR)/ exists, + then all *.patch files in the directory will be applied. endmenu source "toolchain/Config.in" -source "target/generic/Config.in" +source "system/Config.in" + +source "linux/Config.in" source "package/Config.in" @@ -339,4 +479,6 @@ source "fs/Config.in" source "boot/Config.in" -source "linux/Config.in" +source "package/Config.in.host" + +source "Config.in.legacy" diff --git a/Config.in.legacy b/Config.in.legacy new file mode 100644 index 0000000000..09935f183a --- /dev/null +++ b/Config.in.legacy @@ -0,0 +1,426 @@ +# +# Config.in.legacy - support for backward compatibility +# +# When an existing Config.in symbol is removed, it should be added again in +# this file, and take appropriate action to approximate backward compatibility. +# This will make the transition for the user more convenient. +# +# When adding legacy symbols to this file, add them to the front. The oldest +# symbols will be removed again after about two years. +# +# The symbol should be copied as-is from the place where it was previously +# defined, but the help text should be removed or replaced with something that +# explains how to fix it. +# +# For bool options, the old symbol should select BR2_LEGACY, so that the user +# is informed at build-time about selected legacy options. +# If there is an equivalent (set of) new symbols, these should be select'ed by +# the old symbol for backwards compatibility. +# +# For string options, it is not possible to directly select another symbol. In +# this case, a hidden wrap bool option has to be added, that defaults to y if +# the old string is not set at its default value. The wrap symbol should select +# BR2_LEGACY. +# If the original symbol has been renamed, the new symbol should use the value +# of the old symbol as default. This requires a change outside of +# Config.in.legacy, and this should be clearly marked as such below, so that +# removal of legacy options also include the removal of these external +# references. +# +# [Example: renaming a string option from FOO to BAR] +# original symbol: +# config BR2_FOO_STRING +# string "Some foo string" +# +# becomes: +# config BR2_BAR_STRING +# string "Some bar string" +# default BR2_FOO_STRING if BR2_FOO_STRING != "" # legacy +# +# and in Config.in.legacy: +# config BR2_FOO_STRING +# string "The foo string has been renamed" +# help +# +# +# config BR2_FOO_STRING_WRAP +# bool +# default y if BR2_FOO_STRING != "" +# select BR2_LEGACY +# +# # Note: BR2_FOO_STRING is still referenced from package/foo/Config.in +# +# [End of example] + +config BR2_LEGACY + bool + help + This option is selected automatically when your old .config uses an + option that no longer exists in current buildroot. In that case, the + build will fail. Look for config options which are selected in the + menu below: they no longer exist and should be replaced by something + else. + +# This comment fits exactly in a 80-column display +comment "Legacy detected: check the content of the menu below" + depends on BR2_LEGACY + +menu "Legacy config options" + +if BR2_LEGACY +comment "----------------------------------------------------" +comment "Your old configuration uses legacy options that no " +comment "longer exist in buildroot, as indicated in the menu " +comment "below. As long as these options stay selected, or in" +comment "case of string options are non-empty, the build " +comment "will fail. " +comment "* " +comment "Where possible, an automatic conversion from old to " +comment "new symbols has been performed. Before making any " +comment "change in this legacy menu, make sure to exit the " +comment "configuration editor a first time and save the " +comment "configuration. Otherwise, the automatic conversion " +comment "of symbols will be lost. " +comment "* " +comment "After this initial save, reopen the configuration " +comment "editor, inspect the options selected below, read " +comment "their help texts, and verify/update the new " +comment "configuration in the corresponding configuration " +comment "menus. When everything is ok, you can disable the " +comment "legacy options in the menu below. Once you have " +comment "disabled all legacy options, this text will " +comment "disappear and you will be able to start the build. " +comment "* " +comment "Note: at some point in the future, the oldest legacy" +comment "options will be removed, and configuration files " +comment "that still have those options set, will fail to " +comment "build, or run, in unpredictable ways. " +comment "----------------------------------------------------" +endif + +############################################################################### +comment "Legacy options removed in 2013.11" + +config BR2_PACKAGE_LVM2_DMSETUP_ONLY + bool "lvm2's 'dmsetup only' option removed" + select BR2_LEGACY + help + The BR2_PACKAGE_LVM2_DMSETUP_ONLY was a negative option, which + led to problems with other packages that need the full lvm2 + suite. Therefore, the option has been replaced with the positive + BR2_PACKAGE_LVM2_STANDARD_INSTALL option. + +# Note: BR2_PACKAGE_LVM2_DMSETUP_ONLY is still referenced in package/lvm2/Config.in +# in order to automatically propagate old configs + +config BR2_PACKAGE_QT_JAVASCRIPTCORE + bool "qt javascriptcore option removed" + select BR2_LEGACY + help + The BR2_PACKAGE_QT_JAVASCRIPTCORE option was available to + force the activation or disabling of the JIT compiler in the + Qt Javascript interpreter. However, the JIT compiler is not + available for all architectures, so forcing its activation + does not always work. Moreover, Qt knows by itself for which + architectures JIT support is possible, and will + automatically enable it if possible. + + Therefore, this option was in fact useless, and causing + build problems when enabled on architectures for which the + JIT support was not available. It has been removed, and + there is no replacement: Qt will enable JIT at compile time + when possible. + +config BR2_PACKAGE_MODULE_INIT_TOOLS + bool "module-init-tools replaced by kmod" + select BR2_PACKAGE_KMOD + select BR2_PACKAGE_KMOD_TOOLS + select BR2_LEGACY + help + The 'module-init-tools' package has been removed, since it + has been depracated upstream and replaced by 'kmod'. + +config BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL + string "u-boot: the git repository URL option has been renamed" + help + The option BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL has + been renamed to BR2_TARGET_UBOOT_CUSTOM_REPO_URL. + +config BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL_WRAP + bool + default y if BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL != "" + select BR2_LEGACY + +# Note: BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL is still referenced from +# boot/uboot/Config.in + +config BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION + string "u-boot: the git repository version option has been renamed" + help + The option BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION has + been renamed to BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION. + +config BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION_WRAP + bool + default y if BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION != "" + select BR2_LEGACY + +# Note: BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION is still referenced from +# boot/uboot/Config.in + +config BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL + string "linux: the git repository URL option has been renamed" + help + The option BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL has + been renamed to + BR2_LINUX_KERNEL_CUSTOM_REPO_URL. + +config BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL_WRAP + bool + default y if BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL != "" + select BR2_LEGACY + +# Note: BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL is still referenced from +# linux/Config.in + +config BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION + string "linux: the git repository version option has been renamed" + help + The option BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION has + been renamed to + BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION. + +config BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION_WRAP + bool + default y if BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION != "" + select BR2_LEGACY + +# Note: BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION is still referenced from +# linux/Config.in + +############################################################################### +comment "Legacy options removed in 2013.08" + +config BR2_ARM_OABI + bool "ARM OABI support has been removed" + select BR2_LEGACY + help + The support for the ARM OABI was deprecated since a while, + and has been removed completely from Buildroot. It is also + deprecated in upstream gcc, since gcc 4.7. People should + switch to EABI instead, which should not be a problem as + long as you don't have pre-built OABI binaries in your + system that you can't recompile. + +config BR2_PACKAGE_DOSFSTOOLS_DOSFSCK + bool "dosfstools dosfsck renamed to fsck.fat" + select BR2_LEGACY + select BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT + help + dosfsck was renamed upstream to fsck.fat for consistency. + +config BR2_PACKAGE_DOSFSTOOLS_DOSFSLABEL + bool "dosfstools dosfslabel renamed to fatlabel" + select BR2_LEGACY + select BR2_PACKAGE_DOSFSTOOLS_FATLABEL + help + doslabel was renamed upstream to fatlabel for consistency. + +config BR2_PACKAGE_DOSFSTOOLS_MKDOSFS + bool "dosfstools mkdosfs renamed to mkfs.fat" + select BR2_LEGACY + select BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT + help + mkdosfs was renamed upstream to mkfs.fat for consistency. + +config BR2_ELF2FLT + bool "the elf2flt option has been renamed" + select BR2_LEGACY + help + The BR2_ELF2FLT option has been renamed to + BR2_PACKAGE_HOST_ELF2FLT due to the conversion of elf2flt to + the package infrastructure. + +config BR2_VFP_FLOAT + bool "the ARM VFP floating point option has been renamed" + select BR2_LEGACY + help + Due to a major refactoring of the floating-point handling of + the ARM architecture support, the BR2_VFP_FLOAT option has + been replaced with a choice of options that allows to select + between various VFP versions/capabilities. + +config BR2_PACKAGE_GCC_TARGET + bool "gcc on the target filesystem has been removed" + select BR2_LEGACY + help + The support for gcc in the target filesystem was deprecated + since a while, and has been removed completely from Buildroot. + See Buildroot's documentation for more explanations. + +config BR2_HAVE_DEVFILES + bool "development files in target filesystem has been removed" + select BR2_LEGACY + help + The installation of the development files in the target + filesystem was deprecated since a while, and has been removed + completely from Buildroot. + See Buildroot's documentation for more explanations. + +############################################################################### +comment "Legacy options removed in 2013.05" + +config BR2_PACKAGE_LINUX_FIRMWARE_RTL_8192 + bool "Realtek 8192 replaced by Realtek 81xx" + select BR2_LEGACY + select BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX + help + Now covers the whole Realtek 81xx familly: 8188/8192. + +config BR2_PACKAGE_LINUX_FIRMWARE_RTL_8712 + bool "Realtek 8712 replaced by Realtek 87xx" + select BR2_LEGACY + select BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX + help + Now covers the whole Realtek 87xx familly: 8712/8723. + +############################################################################### +comment "Legacy options removed in 2013.02" + +config BR2_sa110 + bool "sa110 ARM target switched to strongarm" + select BR2_LEGACY + select BR2_strongarm + help + The SA110 is the same as a generic StrongARM, it just differs + in speed, peripherals and cache. + +config BR2_sa1100 + bool "sa1100 ARM target switched to strongarm" + select BR2_LEGACY + select BR2_strongarm + help + The SA1100 is the same as a generic StrongARM, it just differs + in speed, peripherals and cache. + +config BR2_PACKAGE_GDISK + bool "gdisk has been replaced by gptfdisk" + select BR2_LEGACY + select BR2_PACKAGE_GPTFDISK + help + The option has been renamed BR2_PACKAGE_GPTFDISK. + +config BR2_PACKAGE_GDISK_GDISK + bool "gdisk tool from gdisk has been replaced by gdisk in gptfdisk" + select BR2_LEGACY + select BR2_PACKAGE_GPTFDISK + select BR2_PACKAGE_GPTFDISK_GDISK + help + The option has been renamed BR2_PACKAGE_GPTFDISK_GDISK. + +config BR2_PACKAGE_GDISK_SGDISK + bool "sgdisk tool from gdisk has been replaced by sgdisk in gptfdisk" + select BR2_LEGACY + select BR2_PACKAGE_GPTFDISK + select BR2_PACKAGE_GPTFDISK_SGDISK + help + The option has been renamed BR2_PACKAGE_GPTFDISK_SGDISK. + +config BR2_PACKAGE_GDB_HOST + bool "gdb for the host option has been renamed" + select BR2_PACKAGE_HOST_GDB + select BR2_LEGACY + help + Due to the conversion of gdb to the package infrastructure, + the BR2_PACKAGE_GDB_HOST option has been renamed + BR2_PACKAGE_HOST_GDB. + +config BR2_PACKAGE_DIRECTB_DITHER_RGB16 + bool "DirectFB RGB16 dithering option has been renamed" + select BR2_PACKAGE_DIRECTFB_DITHER_RGB16 + select BR2_LEGACY + help + The option has been renamed + BR2_PACKAGE_DIRECTFB_DITHER_RGB16. + +config BR2_PACKAGE_DIRECTB_TESTS + bool "DirectFB Tests option has been renamed" + select BR2_PACKAGE_DIRECTFB_TESTS + select BR2_LEGACY + help + The option has been renamed + BR2_PACKAGE_DIRECTFB_TESTS. + +############################################################################### +comment "Legacy options removed in 2012.11" + +config BR2_PACKAGE_CUSTOMIZE + bool "customize package has been removed" + select BR2_LEGACY + help + The 'customize' special package has been removed. Instead, + we recommend to create either your own packages, or use a + post-build script to customize your root filesystem. See + Buildroot's documentation for more details. + +config BR2_PACKAGE_XSERVER_xorg + bool "X.org modular server" + select BR2_LEGACY + select BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR + help + The option has been renamed + BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR. + +config BR2_PACKAGE_XSERVER_tinyx + bool "KDrive / TinyX server" + select BR2_LEGACY + select BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE + help + The option has been renamed + BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE. + +config BR2_PACKAGE_PTHREAD_STUBS + bool "pthread-stubs option has been renamed" + select BR2_LEGACY + select BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS + depends on BR2_PACKAGE_XORG7 + help + For consistency reason, the pthread-stubs package has been + renamed to xlib_libpthread-stubs. + +############################################################################### +comment "Legacy options removed in 2012.08" + +config BR2_PACKAGE_GETTEXT_STATIC + bool "libgettext.a is now selected by BR2_PREFER_STATIC_LIB" + select BR2_LEGACY + help + To build a static gettext library, select BR2_PREFER_STATIC_LIB. + + +config BR2_PACKAGE_LIBINTL + bool "libintl" + select BR2_LEGACY + select BR2_PACKAGE_GETTEXT + help + libintl is now installed by selecting BR2_PACKAGE_GETTEXT. This now + only installs the library, not the executables. + +config BR2_PACKAGE_INPUT_TOOLS_EVTEST + bool "input-tools evtest is now a separate package evtest" + select BR2_LEGACY + select BR2_PACKAGE_EVTEST + help + The evtest program from input-tools is now a separate package. + +config BR2_BFIN_FDPIC + bool "BR2_BFIN_FDPIC is now BR2_BINFMT_FDPIC" + select BR2_BINFMT_FDPIC + select BR2_LEGACY + +config BR2_BFIN_FLAT + bool "BR2_BFIN_FLAT is now BR2_BINFMT_FLAT" + select BR2_BINFMT_FLAT + select BR2_LEGACY + +endmenu diff --git a/Makefile b/Makefile index bb531691e4..0480a42144 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ -# Makefile for buildroot2 +# Makefile for buildroot # # Copyright (C) 1999-2005 by Erik Andersen -# Copyright (C) 2006-2011 by the Buildroot developers +# Copyright (C) 2006-2013 by the Buildroot developers # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,7 +24,23 @@ #-------------------------------------------------------------- # Set and export the version string -export BR2_VERSION:=2011.02 +export BR2_VERSION:=2013.11 + +# Check for minimal make version (note: this check will break at make 10.x) +MIN_MAKE_VERSION=3.81 +ifneq ($(firstword $(sort $(MAKE_VERSION) $(MIN_MAKE_VERSION))),$(MIN_MAKE_VERSION)) +$(error You have make '$(MAKE_VERSION)' installed. GNU make >= $(MIN_MAKE_VERSION) is required) +endif + +export HOSTARCH := $(shell uname -m | \ + sed -e s/i.86/x86/ \ + -e s/sun4u/sparc64/ \ + -e s/arm.*/arm/ \ + -e s/sa110/arm/ \ + -e s/ppc64/powerpc/ \ + -e s/ppc/powerpc/ \ + -e s/macppc/powerpc/\ + -e s/sh.*/sh/) # This top-level Makefile can *not* be executed in parallel .NOTPARALLEL: @@ -32,17 +48,17 @@ export BR2_VERSION:=2011.02 # absolute path TOPDIR:=$(shell pwd) CONFIG_CONFIG_IN=Config.in -CONFIG=package/config +CONFIG=support/kconfig DATE:=$(shell date +%Y%m%d) # Compute the full local version string so packages can use it as-is # Need to export it, so it can be got from environment in children (eg. mconf) -export BR2_VERSION_FULL:=$(BR2_VERSION)$(shell $(TOPDIR)/scripts/setlocalversion) +export BR2_VERSION_FULL:=$(BR2_VERSION)$(shell $(TOPDIR)/support/scripts/setlocalversion) noconfig_targets:=menuconfig nconfig gconfig xconfig config oldconfig randconfig \ - defconfig %_defconfig savedefconfig allyesconfig allnoconfig silentoldconfig release \ + %_defconfig allyesconfig allnoconfig silentoldconfig release \ randpackageconfig allyespackageconfig allnopackageconfig \ - source-check help + source-check print-version olddefconfig # Strip quotes and then whitespaces qstrip=$(strip $(subst ",,$(1))) @@ -75,14 +91,35 @@ EXTRAMAKEARGS = O=$(O) NEED_WRAPPER=y endif +# bash prints the name of the directory on 'cd ' if CDPATH is +# set, so unset it here to not cause problems. Notice that the export +# line doesn't affect the environment of $(shell ..) calls, so +# explictly throw away any output from 'cd' here. +export CDPATH:= +BASE_DIR := $(shell mkdir -p $(O) && cd $(O) >/dev/null && pwd) +$(if $(BASE_DIR),, $(error output directory "$(O)" does not exist)) + +BUILD_DIR:=$(BASE_DIR)/build +STAMP_DIR:=$(BASE_DIR)/stamps +BINARIES_DIR:=$(BASE_DIR)/images +TARGET_DIR:=$(BASE_DIR)/target +# initial definition so that 'make clean' works for most users, even without +# .config. HOST_DIR will be overwritten later when .config is included. +HOST_DIR:=$(BASE_DIR)/host + +LEGAL_INFO_DIR=$(BASE_DIR)/legal-info +REDIST_SOURCES_DIR=$(LEGAL_INFO_DIR)/sources +LICENSE_FILES_DIR=$(LEGAL_INFO_DIR)/licenses +LEGAL_MANIFEST_CSV=$(LEGAL_INFO_DIR)/manifest.csv +LEGAL_LICENSES_TXT=$(LEGAL_INFO_DIR)/licenses.txt +LEGAL_WARNINGS=$(LEGAL_INFO_DIR)/.warnings +LEGAL_REPORT=$(LEGAL_INFO_DIR)/README + +BUILDROOT_CONFIG=$(CONFIG_DIR)/.config + # Pull in the user's configuration file ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) --include $(CONFIG_DIR)/.config -endif - -# Override BR2_DL_DIR if shell variable defined -ifneq ($(BUILDROOT_DL_DIR),) -BR2_DL_DIR:=$(BUILDROOT_DL_DIR) +-include $(BUILDROOT_CONFIG) endif # To put more focus on warnings, be less verbose as default @@ -126,13 +163,13 @@ endif ifndef HOSTCC HOSTCC:=gcc HOSTCC:=$(shell which $(HOSTCC) || type -p $(HOSTCC) || echo gcc) -HOSTCC_NOCCACHE:=$(HOSTCC) endif +HOSTCC_NOCCACHE:=$(HOSTCC) ifndef HOSTCXX HOSTCXX:=g++ HOSTCXX:=$(shell which $(HOSTCXX) || type -p $(HOSTCXX) || echo g++) -HOSTCXX_NOCCACHE:=$(HOSTCXX) endif +HOSTCXX_NOCCACHE:=$(HOSTCXX) ifndef HOSTFC HOSTFC:=gfortran endif @@ -159,31 +196,25 @@ HOSTNM:=$(shell which $(HOSTNM) || type -p $(HOSTNM) || echo nm) export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTFC HOSTLD export HOSTCC_NOCCACHE HOSTCXX_NOCCACHE -# bash prints the name of the directory on 'cd ' if CDPATH is -# set, so unset it here to not cause problems. Notice that the export -# line doesn't affect the environment of $(shell ..) calls, so -# explictly throw away any output from 'cd' here. -export CDPATH:= -BASE_DIR := $(shell mkdir -p $(O) && cd $(O) >/dev/null && pwd) -$(if $(BASE_DIR),, $(error output directory "$(O)" does not exist)) +# Make sure pkg-config doesn't look outside the buildroot tree +unexport PKG_CONFIG_PATH +unexport PKG_CONFIG_SYSROOT_DIR +unexport PKG_CONFIG_LIBDIR -BUILD_DIR:=$(BASE_DIR)/build +# Having DESTDIR set in the environment confuses the installation +# steps of some packages. +unexport DESTDIR +# Causes breakage with packages that needs host-ruby +unexport RUBYOPT ifeq ($(BR2_HAVE_DOT_CONFIG),y) -# cc-option -# Usage: cflags-y+=$(call cc-option, -march=winchip-c6, -march=i586) -# sets -march=winchip-c6 if supported else falls back to -march=i586 -# without checking the latter. -cc-option=$(shell if $(TARGET_CC) $(TARGET_CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ - > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) - -############################################################# +################################################################################ # # Hide troublesome environment variables from sub processes # -############################################################# +################################################################################ unexport CROSS_COMPILE unexport ARCH unexport CC @@ -192,63 +223,21 @@ unexport CPP unexport CFLAGS unexport CXXFLAGS unexport GREP_OPTIONS +unexport CONFIG_SITE +unexport QMAKESPEC +unexport TERMINFO -GNU_HOST_NAME:=$(shell package/gnuconfig/config.guess) +GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess) -############################################################# -# -# Setup the proper filename extensions for the host -# -############################################################## -ifneq ($(findstring linux,$(GNU_HOST_NAME)),) -HOST_EXEEXT:= -HOST_LIBEXT:=.a -HOST_SHREXT:=.so -endif -ifneq ($(findstring apple,$(GNU_HOST_NAME)),) -HOST_EXEEXT:= -HOST_LIBEXT:=.a -HOST_SHREXT:=.dylib -endif -ifneq ($(findstring cygwin,$(GNU_HOST_NAME)),) -HOST_EXEEXT:=.exe -HOST_LIBEXT:=.lib -HOST_SHREXT:=.dll -HOST_LOADLIBES="-lcurses -lintl" -export HOST_LOADLIBES -endif -ifneq ($(findstring mingw,$(GNU_HOST_NAME)),) -HOST_EXEEXT:=.exe -HOST_LIBEXT:=.lib -HOST_SHREXT:=.dll -endif - -# The preferred type of libs we build for the target -ifeq ($(BR2_PREFER_STATIC_LIB),y) -LIBTGTEXT=.a -#PREFERRED_LIB_FLAGS:=--disable-shared --enable-static -else -LIBTGTEXT=.so -#PREFERRED_LIB_FLAGS:=--disable-static --enable-shared -endif -PREFERRED_LIB_FLAGS:=--enable-static --enable-shared - -############################################################## +################################################################################ # # The list of stuff to build for the target toolchain # along with the packages to build for the target. # -############################################################## +################################################################################ -ifeq ($(BR2_CCACHE),y) -BASE_TARGETS += host-ccache -endif +BASE_TARGETS = toolchain -ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) -BASE_TARGETS += uclibc-configured host-binutils cross_compiler uclibc-target-utils kernel-headers -else -BASE_TARGETS += uclibc -endif TARGETS:= # silent mode requested? @@ -256,13 +245,13 @@ QUIET:=$(if $(findstring s,$(MAKEFLAGS)),-q) # Strip off the annoying quoting ARCH:=$(call qstrip,$(BR2_ARCH)) -ifeq ($(ARCH),xtensa) -ARCH:=$(ARCH)_$(call qstrip,$(BR2_xtensa_core_name)) -endif KERNEL_ARCH:=$(shell echo "$(ARCH)" | sed -e "s/-.*//" \ -e s/i.86/i386/ -e s/sun4u/sparc64/ \ + -e s/arcle/arc/ \ + -e s/arceb/arc/ \ -e s/arm.*/arm/ -e s/sa110/arm/ \ + -e s/aarch64/arm64/ \ -e s/bfin/blackfin/ \ -e s/parisc64/parisc/ \ -e s/powerpc64/powerpc/ \ @@ -271,59 +260,74 @@ KERNEL_ARCH:=$(shell echo "$(ARCH)" | sed -e "s/-.*//" \ ZCAT:=$(call qstrip,$(BR2_ZCAT)) BZCAT:=$(call qstrip,$(BR2_BZCAT)) +XZCAT:=$(call qstrip,$(BR2_XZCAT)) TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf -GNU_TARGET_SUFFIX:=-$(call qstrip,$(BR2_GNU_TARGET_SUFFIX)) - # packages compiled for the host go here HOST_DIR:=$(call qstrip,$(BR2_HOST_DIR)) -# stamp (dependency) files go here -STAMP_DIR:=$(BASE_DIR)/stamps +# locales to generate +GENERATE_LOCALE=$(call qstrip,$(BR2_GENERATE_LOCALE)) -BINARIES_DIR:=$(BASE_DIR)/images -TARGET_DIR:=$(BASE_DIR)/target -TOOLCHAIN_DIR=$(BASE_DIR)/toolchain -TOOLCHAIN_EXTERNAL_DIR=$(BASE_DIR)/external-toolchain -TARGET_SKELETON=$(TOPDIR)/fs/skeleton +TARGET_SKELETON=$(TOPDIR)/system/skeleton -BR2_DEPENDS_DIR=$(BUILD_DIR)/buildroot-config +# Location of a file giving a big fat warning that output/target +# should not be used as the root filesystem. +TARGET_DIR_WARNING_FILE=$(TARGET_DIR)/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM ifeq ($(BR2_CCACHE),y) CCACHE:=$(HOST_DIR)/usr/bin/ccache -CCACHE_CACHE_DIR=$(HOME)/.buildroot-ccache +BUILDROOT_CACHE_DIR = $(call qstrip,$(BR2_CCACHE_DIR)) +export BUILDROOT_CACHE_DIR HOSTCC := $(CCACHE) $(HOSTCC) HOSTCXX := $(CCACHE) $(HOSTCXX) endif -include toolchain/Makefile.in -include package/Makefile.in +# Scripts in support/ or post-build scripts may need to reference +# these locations, so export them so it is easier to use +export BUILDROOT_CONFIG +export TARGET_DIR +export STAGING_DIR +export HOST_DIR +export BINARIES_DIR +export BASE_DIR -############################################################# +################################################################################ # # You should probably leave this stuff alone unless you know # what you are doing. # -############################################################# +################################################################################ all: world +# Include legacy before the other things, because package .mk files +# may rely on it. +ifneq ($(BR2_DEPRECATED),y) +include Makefile.legacy +endif + +include package/Makefile.in +include support/dependencies/dependencies.mk + # We also need the various per-package makefiles, which also add # each selected package to TARGETS if that package was selected # in the .config file. -ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) -include toolchain/toolchain-buildroot.mk -else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) -include toolchain/toolchain-external.mk -else ifeq ($(BR2_TOOLCHAIN_CTNG),y) -include toolchain/toolchain-crosstool-ng.mk +include toolchain/helpers.mk +include toolchain/*/*.mk + +# Include the package override file if one has been provided in the +# configuration. +PACKAGE_OVERRIDE_FILE=$(call qstrip,$(BR2_PACKAGE_OVERRIDE_FILE)) +ifneq ($(PACKAGE_OVERRIDE_FILE),) +-include $(PACKAGE_OVERRIDE_FILE) endif -include package/*/*.mk +include $(sort $(wildcard package/*/*.mk)) include boot/common.mk -include target/Makefile.in include linux/linux.mk +include system/system.mk TARGETS+=target-finalize @@ -331,9 +335,19 @@ ifeq ($(BR2_ENABLE_LOCALE_PURGE),y) TARGETS+=target-purgelocales endif +ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y) +ifneq ($(GENERATE_LOCALE),) +TARGETS+=target-generatelocales +endif +endif + +ifeq ($(BR2_ECLIPSE_REGISTER),y) +TARGETS+=toolchain-eclipse-register +endif + include fs/common.mk -TARGETS+=erase-fakeroots +TARGETS+=target-post-image TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS)) TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS) $(BASE_TARGETS)) @@ -358,56 +372,52 @@ HOST_DEPS = $(sort $(foreach dep,\ $($(dep)))) HOST_SOURCE += $(addsuffix -source,$(sort $(TARGETS_HOST_DEPS) $(HOST_DEPS))) +TARGETS_LEGAL_INFO:=$(patsubst %,%-legal-info,\ + $(TARGETS) $(BASE_TARGETS) $(TARGETS_HOST_DEPS) $(HOST_DEPS)))) + # all targets depend on the crosscompiler and it's prerequisites $(TARGETS_ALL): __real_tgt_%: $(BASE_TARGETS) % -dirs: $(DL_DIR) $(TOOLCHAIN_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \ - $(HOST_DIR) $(BR2_DEPENDS_DIR) $(BINARIES_DIR) $(STAMP_DIR) +dirs: $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \ + $(HOST_DIR) $(BINARIES_DIR) $(STAMP_DIR) -$(BASE_TARGETS): dirs $(O)/toolchainfile.cmake - -$(BUILD_DIR)/buildroot-config/auto.conf: $(CONFIG_DIR)/.config - $(MAKE) $(EXTRAMAKEARGS) silentoldconfig +$(BUILD_DIR)/buildroot-config/auto.conf: $(BUILDROOT_CONFIG) + $(MAKE) $(EXTRAMAKEARGS) HOSTCC="$(HOSTCC_NOCCACHE)" HOSTCXX="$(HOSTCXX_NOCCACHE)" silentoldconfig prepare: $(BUILD_DIR)/buildroot-config/auto.conf -world: prepare dependencies dirs $(BASE_TARGETS) $(TARGETS_ALL) - -$(O)/toolchainfile.cmake: - @echo -en "\ - set(CMAKE_SYSTEM_NAME Linux)\n\ - set(CMAKE_C_COMPILER $(CMAKE_TARGET_CC))\n\ - set(CMAKE_CXX_COMPILER $(CMAKE_TARGET_CXX))\n\ - set(CMAKE_C_FLAGS \"\$${CMAKE_C_FLAGS} $(CMAKE_TARGET_CFLAGS)\" CACHE STRING \"Buildroot CFLAGS\" FORCE)\n\ - set(CMAKE_CXX_FLAGS \"\$${CMAKE_CXX_FLAGS} $(CMAKE_TARGET_CXXFLAGS)\" CACHE STRING \"Buildroot CXXFLAGS\" FORCE)\n\ - set(CMAKE_INSTALL_SO_NO_EXE 0)\n\ - set(CMAKE_PROGRAM_PATH \"$(HOST_DIR)/usr/bin\")\n\ - set(CMAKE_FIND_ROOT_PATH \"$(STAGING_DIR)\")\n\ - set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\n\ - set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\n\ - set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\n\ - set(ENV{PKG_CONFIG_SYSROOT_DIR} \"$(STAGING_DIR)\")\n\ - " > $@ - -.PHONY: all world dirs clean distclean source outputmakefile \ +world: $(BASE_TARGETS) $(TARGETS_ALL) + +.PHONY: all world toolchain dirs clean distclean source outputmakefile \ + legal-info legal-info-prepare legal-info-clean printvars \ $(BASE_TARGETS) $(TARGETS) $(TARGETS_ALL) \ - $(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) \ - $(DL_DIR) $(TOOLCHAIN_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \ - $(HOST_DIR) $(BR2_DEPENDS_DIR) $(BINARIES_DIR) $(STAMP_DIR) + $(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) $(TARGETS_LEGAL_INFO) \ + $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \ + $(HOST_DIR) $(BINARIES_DIR) $(STAMP_DIR) -############################################################# +################################################################################ # # staging and target directories do NOT list these as # dependencies anywhere else # -############################################################# -$(DL_DIR) $(TOOLCHAIN_DIR) $(BUILD_DIR) $(HOST_DIR) $(BINARIES_DIR) $(STAMP_DIR): +################################################################################ +$(BUILD_DIR) $(HOST_DIR) $(BINARIES_DIR) $(STAMP_DIR) $(LEGAL_INFO_DIR) $(REDIST_SOURCES_DIR): @mkdir -p $@ +# We make a symlink lib32->lib or lib64->lib as appropriate +# MIPS64/n32 requires lib32 even though it's a 64-bit arch. +ifeq ($(BR2_ARCH_IS_64)$(BR2_MIPS_NABI32),y) +LIB_SYMLINK = lib64 +else +LIB_SYMLINK = lib32 +endif + $(STAGING_DIR): @mkdir -p $(STAGING_DIR)/bin @mkdir -p $(STAGING_DIR)/lib + @ln -snf lib $(STAGING_DIR)/$(LIB_SYMLINK) @mkdir -p $(STAGING_DIR)/usr/lib + @ln -snf lib $(STAGING_DIR)/usr/$(LIB_SYMLINK) @mkdir -p $(STAGING_DIR)/usr/include @mkdir -p $(STAGING_DIR)/usr/bin @ln -snf $(STAGING_DIR) $(BASE_DIR)/staging @@ -416,31 +426,37 @@ ifeq ($(BR2_ROOTFS_SKELETON_CUSTOM),y) TARGET_SKELETON=$(BR2_ROOTFS_SKELETON_CUSTOM_PATH) endif +RSYNC_VCS_EXCLUSIONS = \ + --exclude .svn --exclude .git --exclude .hg --exclude .bzr \ + --exclude CVS + $(BUILD_DIR)/.root: mkdir -p $(TARGET_DIR) - if ! [ -d "$(TARGET_DIR)/bin" ]; then \ - if [ -d "$(TARGET_SKELETON)" ]; then \ - cp -fa $(TARGET_SKELETON)/* $(TARGET_DIR)/; \ - fi; \ - touch $(STAGING_DIR)/.fakeroot.00000; \ - fi - -find $(TARGET_DIR) -type d -name CVS -print0 -o -name .svn -print0 | xargs -0 rm -rf - -find $(TARGET_DIR) -type f \( -name .empty -o -name '*~' \) -print0 | xargs -0 rm -rf + rsync -a $(RSYNC_VCS_EXCLUSIONS) \ + --exclude .empty --exclude '*~' \ + $(TARGET_SKELETON)/ $(TARGET_DIR)/ + cp support/misc/target-dir-warning.txt $(TARGET_DIR_WARNING_FILE) + @ln -snf lib $(TARGET_DIR)/$(LIB_SYMLINK) + @mkdir -p $(TARGET_DIR)/usr + @ln -snf lib $(TARGET_DIR)/usr/$(LIB_SYMLINK) touch $@ $(TARGET_DIR): $(BUILD_DIR)/.root -erase-fakeroots: - rm -f $(BUILD_DIR)/.fakeroot* +STRIP_FIND_CMD = find $(TARGET_DIR) +ifneq (,$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS))) +STRIP_FIND_CMD += \( $(call finddirclauses,$(TARGET_DIR),$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS))) \) -prune -o +endif +STRIP_FIND_CMD += -type f -perm /111 +STRIP_FIND_CMD += -not \( $(call findfileclauses,libpthread*.so* $(call qstrip,$(BR2_STRIP_EXCLUDE_FILES))) \) -print target-finalize: -ifeq ($(BR2_HAVE_DEVFILES),y) - ( scripts/copy.sh $(STAGING_DIR) $(TARGET_DIR) ) -else - rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/aclocal + rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/share/aclocal \ + $(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/pkgconfig \ + $(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake + find $(TARGET_DIR)/usr/{lib,share}/ -name '*.cmake' -print0 | xargs -0 rm -f find $(TARGET_DIR)/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f find $(TARGET_DIR)/usr/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f -endif ifneq ($(BR2_PACKAGE_GDB),y) rm -rf $(TARGET_DIR)/usr/share/gdb endif @@ -457,10 +473,18 @@ endif ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY),y) find $(TARGET_DIR)/usr/lib/ -name '*.py' -print0 | xargs -0 rm -f endif - find $(TARGET_DIR) -type f -perm +111 '!' -name 'libthread_db*.so*' -a '!' -name 'libpthread*' \ - xargs $(STRIPCMD) 2>/dev/null || true - find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \ - xargs -r $(KSTRIPCMD) || true + $(STRIP_FIND_CMD) | xargs $(STRIPCMD) 2>/dev/null || true + if test -d $(TARGET_DIR)/lib/modules; then \ + find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \ + xargs -r $(KSTRIPCMD); fi + +# See http://sourceware.org/gdb/wiki/FAQ, "GDB does not see any threads +# besides the one in which crash occurred; or SIGTRAP kills my program when +# I set a breakpoint" +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) + find $(TARGET_DIR)/lib -type f -name 'libpthread*.so*' | \ + xargs -r $(STRIPCMD) $(STRIP_STRIP_DEBUG) +endif mkdir -p $(TARGET_DIR)/etc # Mandatory configuration file and auxilliary cache directory @@ -473,11 +497,23 @@ endif else \ /sbin/ldconfig -r $(TARGET_DIR); \ fi - echo $(BR2_VERSION_FULL) > $(TARGET_DIR)/etc/br-version - -ifneq ($(BR2_ROOTFS_POST_BUILD_SCRIPT),"") - $(BR2_ROOTFS_POST_BUILD_SCRIPT) $(TARGET_DIR) -endif + ( \ + echo "NAME=Buildroot"; \ + echo "VERSION=$(BR2_VERSION_FULL)"; \ + echo "ID=buildroot"; \ + echo "VERSION_ID=$(BR2_VERSION)"; \ + echo "PRETTY_NAME=\"Buildroot $(BR2_VERSION)\"" \ + ) > $(TARGET_DIR)/etc/os-release + + @$(foreach d, $(call qstrip,$(BR2_ROOTFS_OVERLAY)), \ + $(call MESSAGE,"Copying overlay $(d)"); \ + rsync -a $(RSYNC_VCS_EXCLUSIONS) \ + --exclude .empty --exclude '*~' \ + $(d)/ $(TARGET_DIR)$(sep)) + + @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \ + $(call MESSAGE,"Executing post-build script $(s)"); \ + $(s) $(TARGET_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep)) ifeq ($(BR2_ENABLE_LOCALE_PURGE),y) LOCALE_WHITELIST=$(BUILD_DIR)/locales.nopurge @@ -496,14 +532,65 @@ target-purgelocales: done endif -source: $(TARGETS_SOURCE) $(HOST_SOURCE) +ifneq ($(GENERATE_LOCALE),) +# Generate locale data. Basically, we call the localedef program +# (built by the host-localedef package) for each locale. The input +# data comes preferably from the toolchain, or if the toolchain does +# not have them (Linaro toolchains), we use the ones available on the +# host machine. +target-generatelocales: host-localedef + $(Q)mkdir -p $(TARGET_DIR)/usr/lib/locale/ + $(Q)for locale in $(GENERATE_LOCALE) ; do \ + inputfile=`echo $${locale} | cut -f1 -d'.'` ; \ + charmap=`echo $${locale} | cut -f2 -d'.' -s` ; \ + if test -z "$${charmap}" ; then \ + charmap="UTF-8" ; \ + fi ; \ + echo "Generating locale $${inputfile}.$${charmap}" ; \ + I18NPATH=$(STAGING_DIR)/usr/share/i18n:/usr/share/i18n \ + $(HOST_DIR)/usr/bin/localedef \ + --prefix=$(TARGET_DIR) \ + --$(call LOWERCASE,$(BR2_ENDIAN))-endian \ + -i $${inputfile} -f $${charmap} \ + $${locale} ; \ + done +endif + +target-post-image: + @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT)), \ + $(call MESSAGE,"Executing post-image script $(s)"); \ + $(s) $(BINARIES_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep)) -_source-check: - $(MAKE) DL_MODE=SOURCE_CHECK $(EXTRAMAKEARGS) source +toolchain-eclipse-register: + ./support/scripts/eclipse-register-toolchain `readlink -f $(O)` $(notdir $(TARGET_CROSS)) $(BR2_ARCH) + +source: dirs $(TARGETS_SOURCE) $(HOST_SOURCE) external-deps: @$(MAKE) -Bs DL_MODE=SHOW_EXTERNAL_DEPS $(EXTRAMAKEARGS) source | sort -u +legal-info-clean: + @rm -fr $(LEGAL_INFO_DIR) + +legal-info-prepare: $(LEGAL_INFO_DIR) + @$(call MESSAGE,"Collecting legal info") + @$(call legal-license-file,buildroot,COPYING,COPYING) + @$(call legal-manifest,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE) + @$(call legal-manifest,buildroot,$(BR2_VERSION_FULL),GPLv2+,COPYING,not saved) + @$(call legal-warning,the Buildroot source code has not been saved) + @$(call legal-warning,the toolchain has not been saved) + @cp $(BUILDROOT_CONFIG) $(LEGAL_INFO_DIR)/buildroot.config + +legal-info: dirs legal-info-clean legal-info-prepare $(REDIST_SOURCES_DIR) \ + $(TARGETS_LEGAL_INFO) + @cat support/legal-info/README.header >>$(LEGAL_REPORT) + @if [ -r $(LEGAL_WARNINGS) ]; then \ + cat support/legal-info/README.warnings-header \ + $(LEGAL_WARNINGS) >>$(LEGAL_REPORT); \ + cat $(LEGAL_WARNINGS); fi + @echo "Legal info produced in $(LEGAL_INFO_DIR)" + @rm -f $(LEGAL_WARNINGS) + show-targets: @echo $(TARGETS) @@ -511,6 +598,8 @@ else # ifeq ($(BR2_HAVE_DOT_CONFIG),y) all: menuconfig +endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y) + # configuration # --------------------------------------------------------------------------- @@ -521,11 +610,16 @@ $(BUILD_DIR)/buildroot-config/%onf: mkdir -p $(@D)/lxdialog $(MAKE) CC="$(HOSTCC_NOCCACHE)" HOSTCC="$(HOSTCC_NOCCACHE)" obj=$(@D) -C $(CONFIG) -f Makefile.br $(@F) +DEFCONFIG = $(call qstrip,$(BR2_DEFCONFIG)) + +# We don't want to fully expand BR2_DEFCONFIG here, so Kconfig will +# recognize that if it's still at its default $(CONFIG_DIR)/defconfig COMMON_CONFIG_ENV = \ + BR2_DEFCONFIG='$(call qstrip,$(value BR2_DEFCONFIG))' \ KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \ KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \ KCONFIG_TRISTATE=$(BUILD_DIR)/buildroot-config/tristate.config \ - BUILDROOT_CONFIG=$(CONFIG_DIR)/.config + BUILDROOT_CONFIG=$(BUILDROOT_CONFIG) xconfig: $(BUILD_DIR)/buildroot-config/qconf outputmakefile @mkdir -p $(BUILD_DIR)/buildroot-config @@ -565,7 +659,10 @@ allnoconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile randpackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile @mkdir -p $(BUILD_DIR)/buildroot-config - @grep -v BR2_PACKAGE_ $(CONFIG_DIR)/.config > $(CONFIG_DIR)/.config.nopkg + @grep -v BR2_PACKAGE_ $(BUILDROOT_CONFIG) > $(CONFIG_DIR)/.config.nopkg + @grep '^config BR2_PACKAGE_' Config.in.legacy | \ + while read config pkg; do \ + echo "# $$pkg is not set" >> $(CONFIG_DIR)/.config.nopkg; done @$(COMMON_CONFIG_ENV) \ KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \ $< --randconfig $(CONFIG_CONFIG_IN) @@ -573,7 +670,10 @@ randpackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile allyespackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile @mkdir -p $(BUILD_DIR)/buildroot-config - @grep -v BR2_PACKAGE_ $(CONFIG_DIR)/.config > $(CONFIG_DIR)/.config.nopkg + @grep -v BR2_PACKAGE_ $(BUILDROOT_CONFIG) > $(CONFIG_DIR)/.config.nopkg + @grep '^config BR2_PACKAGE_' Config.in.legacy | \ + while read config pkg; do \ + echo "# $$pkg is not set" >> $(CONFIG_DIR)/.config.nopkg; done @$(COMMON_CONFIG_ENV) \ KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \ $< --allyesconfig $(CONFIG_CONFIG_IN) @@ -581,7 +681,7 @@ allyespackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile allnopackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile @mkdir -p $(BUILD_DIR)/buildroot-config - @grep -v BR2_PACKAGE_ $(CONFIG_DIR)/.config > $(CONFIG_DIR)/.config.nopkg + @grep -v BR2_PACKAGE_ $(BUILDROOT_CONFIG) > $(CONFIG_DIR)/.config.nopkg @$(COMMON_CONFIG_ENV) \ KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \ $< --allnoconfig $(CONFIG_CONFIG_IN) @@ -591,9 +691,13 @@ silentoldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile @mkdir -p $(BUILD_DIR)/buildroot-config $(COMMON_CONFIG_ENV) $< --silentoldconfig $(CONFIG_CONFIG_IN) +olddefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile + @mkdir -p $(BUILD_DIR)/buildroot-config + $(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) + defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile @mkdir -p $(BUILD_DIR)/buildroot-config - @$(COMMON_CONFIG_ENV) $< --defconfig $(CONFIG_CONFIG_IN) + @$(COMMON_CONFIG_ENV) $< --defconfig$(if $(DEFCONFIG),=$(DEFCONFIG)) $(CONFIG_CONFIG_IN) %_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig outputmakefile @mkdir -p $(BUILD_DIR)/buildroot-config @@ -601,32 +705,42 @@ defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile @mkdir -p $(BUILD_DIR)/buildroot-config - @$(COMMON_CONFIG_ENV) $< --savedefconfig=$(CONFIG_DIR)/defconfig $(CONFIG_CONFIG_IN) + @$(COMMON_CONFIG_ENV) $< \ + --savedefconfig=$(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig) \ + $(CONFIG_CONFIG_IN) # check if download URLs are outdated -source-check: allyesconfig - $(MAKE) $(EXTRAMAKEARGS) _source-check +source-check: + $(MAKE) DL_MODE=SOURCE_CHECK $(EXTRAMAKEARGS) source -endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y) +.PHONY: defconfig savedefconfig -############################################################# +################################################################################ # # Cleanup and misc junk # -############################################################# +################################################################################ # outputmakefile generates a Makefile in the output directory, if using a # separate output directory. This allows convenient use of make in the # output directory. outputmakefile: ifeq ($(NEED_WRAPPER),y) - $(Q)$(TOPDIR)/scripts/mkmakefile $(TOPDIR) $(O) + $(Q)$(TOPDIR)/support/scripts/mkmakefile $(TOPDIR) $(O) endif +# printvars prints all the variables currently defined in our Makefiles +printvars: + @$(foreach V, \ + $(sort $(.VARIABLES)), \ + $(if $(filter-out environment% default automatic, \ + $(origin $V)), \ + $(info $V=$($V) ($(value $V))))) + clean: - rm -rf $(STAGING_DIR) $(TARGET_DIR) $(BINARIES_DIR) $(HOST_DIR) \ - $(STAMP_DIR) $(BUILD_DIR) $(TOOLCHAIN_DIR) $(BASE_DIR)/staging \ - $(TOOLCHAIN_EXTERNAL_DIR) + rm -rf $(TARGET_DIR) $(BINARIES_DIR) $(HOST_DIR) \ + $(STAMP_DIR) $(BUILD_DIR) $(BASE_DIR)/staging \ + $(LEGAL_INFO_DIR) distclean: clean ifeq ($(DL_DIR),$(TOPDIR)/dl) @@ -635,13 +749,7 @@ endif ifeq ($(O),output) rm -rf $(O) endif - rm -rf $(CONFIG_DIR)/.config $(CONFIG_DIR)/.config.old $(CONFIG_DIR)/.auto.deps - -configured: dirs kernel-headers uclibc-config busybox-config linux26-config - -prepatch: gcc-patched gdb-patched uclibc-patched - -cross: $(BASE_TARGETS) + rm -rf $(BUILDROOT_CONFIG) $(CONFIG_DIR)/.config.old $(CONFIG_DIR)/.auto.deps help: @echo 'Cleaning:' @@ -650,6 +758,9 @@ help: @echo @echo 'Build:' @echo ' all - make world' + @echo ' toolchain - build toolchain' + @echo ' -rebuild - force recompile ' + @echo ' -reconfigure - force reconfigure ' @echo @echo 'Configuration:' @echo ' menuconfig - interactive curses-based configurator' @@ -657,34 +768,70 @@ help: @echo ' xconfig - interactive Qt-based configurator' @echo ' gconfig - interactive GTK-based configurator' @echo ' oldconfig - resolve any unresolved symbols in .config' + @echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps' + @echo ' olddefconfig - Same as silentoldconfig but sets new symbols to their default value' @echo ' randconfig - New config with random answer to all options' @echo ' defconfig - New config with default answer to all options' + @echo ' BR2_DEFCONFIG, if set, is used as input' @echo ' savedefconfig - Save current config as ./defconfig (minimal config)' @echo ' allyesconfig - New config where all options are accepted with yes' @echo ' allnoconfig - New config where all options are answered with no' @echo ' randpackageconfig - New config with random answer to package options' @echo ' allyespackageconfig - New config where pkg options are accepted with yes' @echo ' allnopackageconfig - New config where package options are answered with no' - @echo ' configured - make {uclibc/busybox/linux26}-config' +ifeq ($(BR2_PACKAGE_BUSYBOX),y) + @echo ' busybox-menuconfig - Run BusyBox menuconfig' +endif +ifeq ($(BR2_LINUX_KERNEL),y) + @echo ' linux-menuconfig - Run Linux kernel menuconfig' + @echo ' linux-savedefconfig - Run Linux kernel savedefconfig' +endif +ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) + @echo ' uclibc-menuconfig - Run uClibc menuconfig' +endif +ifeq ($(BR2_TARGET_BAREBOX),y) + @echo ' barebox-menuconfig - Run barebox menuconfig' + @echo ' barebox-savedefconfig - Run barebox savedefconfig' +endif + @echo + @echo 'Documentation:' + @echo ' manual - build manual in all formats' + @echo ' manual-html - build manual in HTML' + @echo ' manual-split-html - build manual in split HTML' + @echo ' manual-pdf - build manual in PDF' + @echo ' manual-text - build manual in text' + @echo ' manual-epub - build manual in ePub' @echo @echo 'Miscellaneous:' @echo ' source - download all sources needed for offline-build' - @echo ' source-check - check all packages for valid download URLs' + @echo ' source-check - check selected packages for valid download URLs' @echo ' external-deps - list external packages used' + @echo ' legal-info - generate info about license compliance' @echo @echo ' make V=0|1 - 0 => quiet build (default), 1 => verbose build' @echo ' make O=dir - Locate all output files in "dir", including .config' @echo - @$(foreach b, $(notdir $(wildcard $(TOPDIR)/configs/*_defconfig)), \ + @$(foreach b, $(sort $(notdir $(wildcard $(TOPDIR)/configs/*_defconfig))), \ printf " %-35s - Build for %s\\n" $(b) $(b:_defconfig=);) @echo - @echo 'See docs/README and docs/buildroot.html for further details' + @echo 'See docs/README, or generate the Buildroot manual for further details' @echo release: OUT=buildroot-$(BR2_VERSION) +# Create release tarballs. We need to fiddle a bit to add the generated +# documentation to the git output release: - git archive --format=tar --prefix=$(OUT)/ master|gzip -9 >$(OUT).tar.gz + git archive --format=tar --prefix=$(OUT)/ HEAD > $(OUT).tar + $(MAKE) O=$(OUT) manual-html manual-text manual-pdf + tar rf $(OUT).tar $(OUT) + gzip -9 -c < $(OUT).tar > $(OUT).tar.gz + bzip2 -9 -c < $(OUT).tar > $(OUT).tar.bz2 + rm -rf $(OUT) $(OUT).tar -.PHONY: $(noconfig_targets) +print-version: + @echo $(BR2_VERSION_FULL) + +include docs/manual/manual.mk +.PHONY: $(noconfig_targets) diff --git a/Makefile.legacy b/Makefile.legacy new file mode 100644 index 0000000000..e0b7ec29c4 --- /dev/null +++ b/Makefile.legacy @@ -0,0 +1,30 @@ +# +# Makefile.legacy - support for backward compatibility +# +# This file contains placeholders to detect backward-compatibility problems. +# When a buildroot "API" feature is being deprecated, a rule should be added +# here that issues an error when the old feature is used. +# +# This file is not included if BR2_DEPRECATED is selected, so it is possible +# to bypass the errors (although that's usually a bad idea). + +ifeq ($(BR2_LEGACY),y) +$(error "You have legacy configuration in your .config! Please check your configuration.") +endif + +# +# Legacy options from 2012.08 +# + +host-pkg-config: + @$(call MESSAGE,host-pkg-config is replaced by host-pkgconf) + @$(call MESSAGE,please update your .mk files) + @false +.PHONY: host-pkg-config + +# +# Legacy options from 2012.05 +# +GENTARGETS = $$(error The GENTARGETS macro no longer exists; use $$$$(eval $$$$(generic-package)) or $$$$(eval $$$$(host-generic-package))) +AUTOTARGETS = $$(error The AUTOTARGETS macro no longer exists; use $$$$(eval $$$$(autotools-package)) or $$$$(eval $$$$(host-autotools-package))) +CMAKETARGETS = $$(error The CMAKETARGETS macro no longer exists; use $$$$(eval $$$$(cmake-package)) or $$$$(eval $$$$(host-cmake-package))) diff --git a/README.md b/README.md index f6592c10a7..8b776bde90 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ In a fresh minimal Debian Unstable install, ```shell % sudo apt-get install git build-essential zip gawk libtool gettext \ automake autoconf nasm unzip gettext flex bison libsdl-image1.2 \ - liblzo2-2 lzma python openjdk-7-jre-headless \ + subversion liblzo2-2 lzma python openjdk-7-jre-headless \ texinfo libxml-parser-perl wget pkg-config swig cpio zlib1g-dev \ libncurses5-dev autopoint ``` diff --git a/arch/Config.in b/arch/Config.in new file mode 100644 index 0000000000..bc81dac7a9 --- /dev/null +++ b/arch/Config.in @@ -0,0 +1,344 @@ +menu "Target options" + +config BR2_ARCH_IS_64 + bool + +config BR2_KERNEL_64_USERLAND_32 + bool + +config BR2_SOFT_FLOAT + bool + +choice + prompt "Target Architecture" + default BR2_i386 + help + Select the target architecture family to build for. + +config BR2_arcle + bool "ARC (little endian)" + help + Synopsys' DesignWare ARC Processor Cores are a family of 32-bit CPUs + that can be used from deeply embedded to high performance host + applications. Little endian. + +config BR2_arceb + bool "ARC (big endian)" + help + Synopsys' DesignWare ARC Processor Cores are a family of 32-bit CPUs + that can be used from deeply embedded to high performance host + applications. Big endian. + +config BR2_arm + bool "ARM (little endian)" + help + ARM is a 32-bit reduced instruction set computer (RISC) instruction + set architecture (ISA) developed by ARM Holdings. Little endian. + http://www.arm.com/ + http://en.wikipedia.org/wiki/ARM + +config BR2_armeb + bool "ARM (big endian)" + help + ARM is a 32-bit reduced instruction set computer (RISC) instruction + set architecture (ISA) developed by ARM Holdings. Big endian. + http://www.arm.com/ + http://en.wikipedia.org/wiki/ARM + +config BR2_aarch64 + bool "AArch64" + select BR2_ARCH_IS_64 + help + Aarch64 is a 64-bit architecture developed by ARM Holdings. + http://www.arm.com/products/processors/instruction-set-architectures/armv8-architecture.php + http://en.wikipedia.org/wiki/ARM + +config BR2_avr32 + bool "AVR32" + select BR2_SOFT_FLOAT + help + The AVR32 is a 32-bit RISC microprocessor architecture designed by + Atmel. + http://www.atmel.com/ + http://en.wikipedia.org/wiki/Avr32 + +config BR2_bfin + bool "Blackfin" + help + The Blackfin is a family of 16 or 32-bit microprocessors developed, + manufactured and marketed by Analog Devices. + http://www.analog.com/ + http://en.wikipedia.org/wiki/Blackfin + +config BR2_i386 + bool "i386" + help + Intel i386 architecture compatible microprocessor + http://en.wikipedia.org/wiki/I386 + +config BR2_m68k + bool "m68k" + depends on BROKEN # ice in uclibc / inet_ntoa_r + help + Motorola 68000 family microprocessor + http://en.wikipedia.org/wiki/M68k + +config BR2_microblazeel + bool "Microblaze AXI (little endian)" + help + Soft processor core designed for Xilinx FPGAs from Xilinx. AXI bus + based architecture (little endian) + http://www.xilinx.com + http://en.wikipedia.org/wiki/Microblaze + +config BR2_microblazebe + bool "Microblaze non-AXI (big endian)" + help + Soft processor core designed for Xilinx FPGAs from Xilinx. PLB bus + based architecture (non-AXI, big endian) + http://www.xilinx.com + http://en.wikipedia.org/wiki/Microblaze + +config BR2_mips + bool "MIPS (big endian)" + help + MIPS is a RISC microprocessor from MIPS Technologies. Big endian. + http://www.mips.com/ + http://en.wikipedia.org/wiki/MIPS_Technologies + +config BR2_mipsel + bool "MIPS (little endian)" + help + MIPS is a RISC microprocessor from MIPS Technologies. Little endian. + http://www.mips.com/ + http://en.wikipedia.org/wiki/MIPS_Technologies + +config BR2_mips64 + bool "MIPS64 (big endian)" + select BR2_ARCH_IS_64 + help + MIPS is a RISC microprocessor from MIPS Technologies. Big endian. + http://www.mips.com/ + http://en.wikipedia.org/wiki/MIPS_Technologies + +config BR2_mips64el + bool "MIPS64 (little endian)" + select BR2_ARCH_IS_64 + help + MIPS is a RISC microprocessor from MIPS Technologies. Little endian. + http://www.mips.com/ + http://en.wikipedia.org/wiki/MIPS_Technologies + +config BR2_nios2 + bool "Nios II" + help + Nios II is a soft core processor from Altera Corporation. + http://www.altera.com/ + http://en.wikipedia.org/wiki/Nios_II + +config BR2_powerpc + bool "PowerPC" + help + PowerPC is a RISC architecture created by Apple-IBM-Motorola alliance. + http://www.power.org/ + http://en.wikipedia.org/wiki/Powerpc + +config BR2_sh + bool "SuperH" + help + SuperH (or SH) is a 32-bit reduced instruction set computer (RISC) + instruction set architecture (ISA) developed by Hitachi. + http://www.hitachi.com/ + http://en.wikipedia.org/wiki/SuperH + +config BR2_sh64 + bool "SuperH64" + help + SuperH64 (or SH) is a 64-bit reduced instruction set computer (RISC) + instruction set architecture (ISA) developed by Hitachi. + http://www.hitachi.com/ + http://en.wikipedia.org/wiki/SuperH + +config BR2_sparc + bool "SPARC" + help + SPARC (from Scalable Processor Architecture) is a RISC instruction + set architecture (ISA) developed by Sun Microsystems. + http://www.oracle.com/sun + http://en.wikipedia.org/wiki/Sparc + +config BR2_x86_64 + bool "x86_64" + select BR2_ARCH_IS_64 + help + x86-64 is an extension of the x86 instruction set (Intel i386 + architecture compatible microprocessor). + http://en.wikipedia.org/wiki/X86_64 + +config BR2_xtensa + bool "Xtensa" + help + Xtensa is a Tensilica processor IP architecture. + http://en.wikipedia.org/wiki/Xtensa + http://www.tensilica.com/ + +endchoice + +# The following string values are defined by the individual +# Config.in.$ARCH files +config BR2_ARCH + string + +config BR2_ENDIAN + string + +config BR2_GCC_TARGET_TUNE + string + +config BR2_GCC_TARGET_ARCH + string + +config BR2_GCC_TARGET_ABI + string + +config BR2_GCC_TARGET_CPU + string + +config BR2_GCC_TARGET_CPU_REVISION + string + +# The value of this option will be passed as --with-fpu= when +# building gcc (internal backend) or -mfpu= in the toolchain +# wrapper (external toolchain) +config BR2_GCC_TARGET_FPU + string + +# The value of this option will be passed as --with-float= when +# building gcc (internal backend) or -mfloat-abi= in the toolchain +# wrapper (external toolchain) +config BR2_GCC_TARGET_FLOAT_ABI + string + +# The value of this option will be passed as --with-mode= when +# building gcc (internal backend) or -m in the toolchain +# wrapper (external toolchain) +config BR2_GCC_TARGET_MODE + string + +# Set up target binary format +choice + prompt "Target Binary Format" + depends on BR2_bfin || BR2_m68k + default BR2_BINFMT_FDPIC + +config BR2_BINFMT_ELF + bool "ELF" + depends on !BR2_bfin && !BR2_m68k + help + ELF (Executable and Linkable Format) is a format for libraries and + executables used across different architectures and operating + systems. + +config BR2_BINFMT_FDPIC + bool "FDPIC" + depends on BR2_bfin || BR2_m68k + help + ELF FDPIC binaries are based on ELF, but allow the individual load + segments of a binary to be located in memory independently of each + other. This makes this format ideal for use in environments where no + MMU is available. + +config BR2_BINFMT_FLAT + bool "FLAT" + depends on BR2_bfin || BR2_m68k + select BR2_PREFER_STATIC_LIB + help + FLAT binary is a relatively simple and lightweight executable format + based on the original a.out format. It is widely used in environment + where no MMU is available. + +endchoice + +# Set up flat binary type +choice + prompt "FLAT Binary type" + depends on BR2_BINFMT_FLAT + default BR2_BINFMT_FLAT_ONE + +config BR2_BINFMT_FLAT_ONE + bool "One memory region" + help + All segments are linked into one memory region. + +config BR2_BINFMT_FLAT_SEP_DATA + bool "Separate data and code region" + depends on BR2_bfin || BR2_m68k + help + Allow for the data and text segments to be separated and placed in + different regions of memory. + +config BR2_BINFMT_FLAT_SHARED + bool "Shared binary" + depends on BR2_bfin || BR2_m68k + help + Allow to load and link indiviual FLAT binaries at run time. + +endchoice + +if BR2_arcle || BR2_arceb +source "arch/Config.in.arc" +endif + +if BR2_arm || BR2_armeb +source "arch/Config.in.arm" +endif + +if BR2_aarch64 +source "arch/Config.in.aarch64" +endif + +if BR2_avr32 +source "arch/Config.in.avr32" +endif + +if BR2_bfin +source "arch/Config.in.bfin" +endif + +if BR2_m68k +source "arch/Config.in.m68k" +endif + +if BR2_microblazeel || BR2_microblazebe +source "arch/Config.in.microblaze" +endif + +if BR2_mips || BR2_mips64 || BR2_mipsel || BR2_mips64el +source "arch/Config.in.mips" +endif + +if BR2_nios2 +source "arch/Config.in.nios2" +endif + +if BR2_powerpc +source "arch/Config.in.powerpc" +endif + +if BR2_sh || BR2_sh64 +source "arch/Config.in.sh" +endif + +if BR2_sparc +source "arch/Config.in.sparc" +endif + +if BR2_i386 || BR2_x86_64 +source "arch/Config.in.x86" +endif + +if BR2_xtensa +source "arch/Config.in.xtensa" +endif + +endmenu # Target options diff --git a/arch/Config.in.aarch64 b/arch/Config.in.aarch64 new file mode 100644 index 0000000000..4c68a378c2 --- /dev/null +++ b/arch/Config.in.aarch64 @@ -0,0 +1,5 @@ +config BR2_ARCH + default "aarch64" if BR2_aarch64 + +config BR2_ENDIAN + default "LITTLE" diff --git a/arch/Config.in.arc b/arch/Config.in.arc new file mode 100644 index 0000000000..9f68b46965 --- /dev/null +++ b/arch/Config.in.arc @@ -0,0 +1,18 @@ +config BR2_ARCH + default "arc" if BR2_arcle + default "arceb" if BR2_arceb + +config BR2_arc + bool + default y if BR2_arcle || BR2_arceb + +config BR2_ENDIAN + default "LITTLE" if BR2_arcle + default "BIG" if BR2_arceb + +config BR2_GCC_TARGET_CPU + default "arc700" + +config BR2_ARC_SITE + string + default "http://www.synopsys.com/apps/arc-developer/" diff --git a/arch/Config.in.arm b/arch/Config.in.arm new file mode 100644 index 0000000000..c0fabb7ca4 --- /dev/null +++ b/arch/Config.in.arm @@ -0,0 +1,408 @@ +# arm cpu features +config BR2_ARM_CPU_HAS_NEON + bool + +# for some cores, NEON support is optional +config BR2_ARM_CPU_MAYBE_HAS_NEON + bool + +# for some cores, VFPv2 is optional +config BR2_ARM_CPU_MAYBE_HAS_VFPV2 + bool + +config BR2_ARM_CPU_HAS_VFPV2 + bool + +# for some cores, VFPv3 is optional +config BR2_ARM_CPU_MAYBE_HAS_VFPV3 + bool + select BR2_ARM_CPU_MAYBE_HAS_VFPV2 + +config BR2_ARM_CPU_HAS_VFPV3 + bool + select BR2_ARM_CPU_HAS_VFPV2 + +# for some cores, VFPv4 is optional +config BR2_ARM_CPU_MAYBE_HAS_VFPV4 + bool + select BR2_ARM_CPU_MAYBE_HAS_VFPV3 + +config BR2_ARM_CPU_HAS_VFPV4 + bool + select BR2_ARM_CPU_HAS_VFPV3 + +config BR2_ARM_CPU_HAS_THUMB + bool + +config BR2_ARM_CPU_HAS_THUMB2 + bool + +choice + prompt "Target Architecture Variant" + depends on BR2_arm || BR2_armeb + default BR2_arm926t + help + Specific CPU variant to use + +config BR2_arm7tdmi + bool "arm7tdmi" + select BR2_ARM_CPU_HAS_THUMB +config BR2_arm720t + bool "arm720t" + select BR2_ARM_CPU_HAS_THUMB +config BR2_arm920t + bool "arm920t" + select BR2_ARM_CPU_HAS_THUMB +config BR2_arm922t + bool "arm922t" + select BR2_ARM_CPU_HAS_THUMB +config BR2_arm926t + bool "arm926t" + select BR2_ARM_CPU_MAYBE_HAS_VFPV2 + select BR2_ARM_CPU_HAS_THUMB +config BR2_arm10t + bool "arm10t" + select BR2_ARM_CPU_HAS_THUMB +config BR2_arm1136jf_s_r0 + bool "arm1136jf_s rev0" + select BR2_ARM_CPU_HAS_VFPV2 + select BR2_ARM_CPU_HAS_THUMB +config BR2_arm1136jf_s_r1 + bool "arm1136jf_s rev1" + select BR2_ARM_CPU_HAS_VFPV2 + select BR2_ARM_CPU_HAS_THUMB +config BR2_arm1176jz_s + bool "arm1176jz-s" + select BR2_ARM_CPU_HAS_THUMB +config BR2_arm1176jzf_s + bool "arm1176jzf-s" + select BR2_ARM_CPU_HAS_VFPV2 + select BR2_ARM_CPU_HAS_THUMB +config BR2_cortex_a5 + bool "cortex-A5" + select BR2_ARM_CPU_MAYBE_HAS_NEON + select BR2_ARM_CPU_MAYBE_HAS_VFPV4 + select BR2_ARM_CPU_HAS_THUMB2 +config BR2_cortex_a7 + bool "cortex-A7" + select BR2_ARM_CPU_HAS_NEON + select BR2_ARM_CPU_HAS_VFPV4 + select BR2_ARM_CPU_HAS_THUMB2 +config BR2_cortex_a8 + bool "cortex-A8" + select BR2_ARM_CPU_HAS_NEON + select BR2_ARM_CPU_HAS_VFPV3 + select BR2_ARM_CPU_HAS_THUMB2 +config BR2_cortex_a9 + bool "cortex-A9" + select BR2_ARM_CPU_MAYBE_HAS_NEON + select BR2_ARM_CPU_MAYBE_HAS_VFPV3 + select BR2_ARM_CPU_HAS_THUMB2 +config BR2_cortex_a15 + bool "cortex-A15" + select BR2_ARM_CPU_HAS_NEON + select BR2_ARM_CPU_HAS_VFPV4 + select BR2_ARM_CPU_HAS_THUMB2 +config BR2_fa526 + bool "fa526/626" +config BR2_pj4 + bool "pj4" + select BR2_ARM_CPU_HAS_VFPV3 +config BR2_strongarm + bool "strongarm sa110/sa1100" +config BR2_xscale + bool "xscale" + select BR2_ARM_CPU_HAS_THUMB +config BR2_iwmmxt + bool "iwmmxt" +endchoice + +config BR2_arm1136jf_s + bool + default BR2_arm1136jf_s_r0 || BR2_arm1136jf_s_r1 + +choice + prompt "Target ABI" + depends on BR2_arm || BR2_armeb + default BR2_ARM_EABI + help + Application Binary Interface to use. The Application Binary + Interface describes the calling conventions (how arguments + are passed to functions, how the return value is passed, how + system calls are made, etc.). + +config BR2_ARM_EABI + bool "EABI" + help + The EABI is currently the standard ARM ABI, which is used in + most projects. It supports both the 'soft' floating point + model (in which floating point instructions are emulated in + software) and the 'softfp' floating point model (in which + floating point instructions are executed using an hardware + floating point unit, but floating point arguments to + functions are passed in integer registers). + + The 'softfp' floating point model is link-compatible with + the 'soft' floating point model, i.e you can link a library + built 'soft' with some other code built 'softfp'. + + However, passing the floating point arguments in integer + registers is a bit inefficient, so if your ARM processor has + a floating point unit, and you don't have pre-compiled + 'soft' or 'softfp' code, using the EABIhf ABI will provide + better floating point performances. + + If your processor does not have a floating point unit, then + you must use this ABI. + +config BR2_ARM_EABIHF + bool "EABIhf" + depends on BR2_ARM_CPU_MAYBE_HAS_VFPV2 || BR2_ARM_CPU_HAS_VFPV2 + help + The EABIhf is an extension of EABI which supports the 'hard' + floating point model. This model uses the floating point + unit to execute floating point instructions, and passes + floating point arguments in floating point registers. + + It is more efficient than EABI for floating point related + workload. However, it does not allow to link against code + that has been pre-built for the 'soft' or 'softfp' floating + point models. + + If your processor has a floating point unit, and you don't + depend on existing pre-compiled code, this option is most + likely the best choice. + +endchoice + +config BR2_ARM_ENABLE_NEON + bool "Enable NEON SIMD extension support" + depends on BR2_ARM_CPU_MAYBE_HAS_NEON + select BR2_ARM_CPU_HAS_NEON + help + For some CPU cores, the NEON SIMD extension is optional. + Select this option if you are certain your particular + implementation has NEON support and you want to use it. + +choice + prompt "Floating point strategy" + depends on BR2_ARM_EABI || BR2_ARM_EABIHF + default BR2_ARM_FPU_VFPV4D16 if BR2_ARM_CPU_HAS_VFPV4 + default BR2_ARM_FPU_VFPV3D16 if BR2_ARM_CPU_HAS_VFPV3 + default BR2_ARM_FPU_VFPV2 if BR2_ARM_CPU_HAS_VFPV2 + default BR2_ARM_SOFT_FLOAT if !BR2_ARM_CPU_HAS_VFPV2 + +config BR2_ARM_SOFT_FLOAT + bool "Soft float" + depends on BR2_ARM_EABI + select BR2_SOFT_FLOAT + help + This option allows to use software emulated floating + point. It should be used for ARM cores that do not include a + Vector Floating Point unit, such as ARMv5 cores (ARM926 for + example) or certain ARMv6 cores. + +config BR2_ARM_FPU_VFPV2 + bool "VFPv2" + depends on BR2_ARM_CPU_HAS_VFPV2 || BR2_ARM_CPU_MAYBE_HAS_VFPV2 + help + This option allows to use the VFPv2 floating point unit, as + available in some ARMv5 processors (ARM926EJ-S) and some + ARMv6 processors (ARM1136JF-S, ARM1176JZF-S and ARM11 + MPCore). + + Note that this option is also safe to use for newer cores + such as Cortex-A, because the VFPv3 and VFPv4 units are + backward compatible with VFPv2. + +config BR2_ARM_FPU_VFPV3 + bool "VFPv3" + depends on BR2_ARM_CPU_HAS_VFPV3 || BR2_ARM_CPU_MAYBE_HAS_VFPV3 + help + This option allows to use the VFPv3 floating point unit, as + available in some ARMv7 processors (Cortex-A{8, 9}). This + option requires a VFPv3 unit that has 32 double-precision + registers, which is not necessarily the case in all SOCs + based on Cortex-A{8, 9}. If you're unsure, use VFPv3-D16 + instead, which is guaranteed to work on all Cortex-A{8, 9}. + + Note that this option is also safe to use for newer cores + that have a VFPv4 unit, because VFPv4 is backward compatible + with VFPv3. They must of course also have 32 + double-precision registers. + +config BR2_ARM_FPU_VFPV3D16 + bool "VFPv3-D16" + depends on BR2_ARM_CPU_HAS_VFPV3 || BR2_ARM_CPU_MAYBE_HAS_VFPV3 + help + This option allows to use the VFPv3 floating point unit, as + available in some ARMv7 processors (Cortex-A{8, 9}). This + option requires a VFPv3 unit that has 16 double-precision + registers, which is generally the case in all SOCs based on + Cortex-A{8, 9}, even though VFPv3 is technically optional on + Cortex-A9. This is the safest option for those cores. + + Note that this option is also safe to use for newer cores + such that have a VFPv4 unit, because the VFPv4 is backward + compatible with VFPv3. + +config BR2_ARM_FPU_VFPV4 + bool "VFPv4" + depends on BR2_ARM_CPU_HAS_VFPV4 || BR2_ARM_CPU_MAYBE_HAS_VFPV4 + help + This option allows to use the VFPv4 floating point unit, as + available in some ARMv7 processors (Cortex-A{5, 7, 12, + 15}). This option requires a VFPv4 unit that has 32 + double-precision registers, which is not necessarily the + case in all SOCs based on Cortex-A{5, 7, 12, 15}. If you're + unsure, you should probably use VFPv4-D16 instead. + + Note that if you want binary code that works on all ARMv7 + cores, including the earlier Cortex-A{8, 9}, you should + instead select VFPv3. + +config BR2_ARM_FPU_VFPV4D16 + bool "VFPv4-D16" + depends on BR2_ARM_CPU_HAS_VFPV4 || BR2_ARM_CPU_MAYBE_HAS_VFPV4 + help + This option allows to use the VFPv4 floating point unit, as + available in some ARMv7 processors (Cortex-A{5, 7, 12, + 15}). This option requires a VFPv4 unit that has 16 + double-precision registers, which is always available on + Cortex-A12 and Cortex-A15, but optional on Cortex-A5 and + Cortex-A7. + + Note that if you want binary code that works on all ARMv7 + cores, including the earlier Cortex-A{8, 9}, you should + instead select VFPv3-D16. + +config BR2_ARM_FPU_NEON + bool "NEON" + depends on BR2_ARM_CPU_HAS_NEON + help + This option allows to use the NEON SIMD unit, as available + in some ARMv7 processors, as a floating-point unit. It + should however be noted that using NEON for floating point + operations doesn't provide a complete compatibility with the + IEEE 754. + +config BR2_ARM_FPU_NEON_VFPV4 + bool "NEON/VFPv4" + depends on BR2_ARM_CPU_HAS_VFPV4 || BR2_ARM_CPU_MAYBE_HAS_VFPV4 + depends on BR2_ARM_CPU_HAS_NEON + help + This option allows to use both the VFPv4 and the NEON SIMD + units for floating point operations. Note that some ARMv7 + cores do not necessarily have VFPv4 and/or NEON support, for + example on Cortex-A5 and Cortex-A7, support for VFPv4 and + NEON is optional. + +endchoice + +choice + prompt "ARM instruction set" + depends on BR2_ARM_CPU_HAS_THUMB || BR2_ARM_CPU_HAS_THUMB2 + +config BR2_ARM_INSTRUCTIONS_ARM_CHOICE + bool "ARM" + help + This option instructs the compiler to generate regular ARM + instructions, that are all 32 bits wide. + +config BR2_ARM_INSTRUCTIONS_THUMB + bool "Thumb" + depends on BR2_ARM_CPU_HAS_THUMB + help + This option instructions the compiler to generate Thumb + instructions, which allows to mix 16 bits instructions and + 32 bits instructions. This generally provides a much smaller + compiled binary size. + +config BR2_ARM_INSTRUCTIONS_THUMB2 + bool "Thumb2" + depends on BR2_ARM_CPU_HAS_THUMB2 + help + This option instructions the compiler to generate Thumb2 + instructions, which allows to mix 16 bits instructions and + 32 bits instructions. This generally provides a much smaller + compiled binary size. + +endchoice + +config BR2_ARM_INSTRUCTIONS_ARM + def_bool y + depends on !(BR2_ARM_INSTRUCTIONS_THUMB || BR2_ARM_INSTRUCTIONS_THUMB2) + +config BR2_ARCH + default "arm" if BR2_arm + default "armeb" if BR2_armeb + +config BR2_ENDIAN + default "LITTLE" if BR2_arm + default "BIG" if BR2_armeb + +config BR2_GCC_TARGET_TUNE + default "arm7tdmi" if BR2_arm7tdmi + default "arm7tdmi" if BR2_arm720t + default "arm7tdmi" if BR2_arm740t + default "arm920" if BR2_arm920 + default "arm920t" if BR2_arm920t + default "arm922t" if BR2_arm922t + default "arm926ej-s" if BR2_arm926t + default "arm1136j-s" if BR2_arm1136j_s + default "arm1136jf-s" if BR2_arm1136jf_s + default "arm1176jz-s" if BR2_arm1176jz_s + default "arm1176jzf-s" if BR2_arm1176jzf_s + default "cortex-a5" if BR2_cortex_a5 + default "cortex-a7" if BR2_cortex_a7 + default "cortex-a8" if BR2_cortex_a8 + default "cortex-a9" if BR2_cortex_a9 + default "cortex-a15" if BR2_cortex_a15 + default "fa526" if BR2_fa526 + default "marvell-pj4" if BR2_pj4 + default "strongarm" if BR2_strongarm + default "xscale" if BR2_xscale + default "iwmmxt" if BR2_iwmmxt + +config BR2_GCC_TARGET_ARCH + default "armv4t" if BR2_arm7tdmi + default "armv4t" if BR2_arm720t + default "armv4t" if BR2_arm920t + default "armv4t" if BR2_arm922t + default "armv5te" if BR2_arm926t + default "armv5t" if BR2_arm10t + default "armv6j" if BR2_arm1136jf_s_r0 + default "armv6k" if BR2_arm1136jf_s_r1 + default "armv6zk" if BR2_arm1176jz_s + default "armv6zk" if BR2_arm1176jzf_s + default "armv7-a" if BR2_cortex_a5 + default "armv7-a" if BR2_cortex_a7 + default "armv7-a" if BR2_cortex_a8 + default "armv7-a" if BR2_cortex_a9 + default "armv7-a" if BR2_cortex_a15 + default "armv4" if BR2_fa526 + default "armv7-a" if BR2_pj4 + default "armv4" if BR2_strongarm + default "armv5te" if BR2_xscale + default "iwmmxt" if BR2_iwmmxt + +config BR2_GCC_TARGET_ABI + default "aapcs-linux" + +config BR2_GCC_TARGET_FPU + default "vfp" if BR2_ARM_FPU_VFPV2 + default "vfpv3" if BR2_ARM_FPU_VFPV3 + default "vfpv3-d16" if BR2_ARM_FPU_VFPV3D16 + default "vfpv4" if BR2_ARM_FPU_VFPV4 + default "vfpv4-d16" if BR2_ARM_FPU_VFPV4D16 + default "neon" if BR2_ARM_FPU_NEON + default "neon-vfpv4" if BR2_ARM_FPU_NEON_VFPV4 + +config BR2_GCC_TARGET_FLOAT_ABI + default "soft" if BR2_ARM_SOFT_FLOAT + default "softfp" if !BR2_ARM_SOFT_FLOAT && BR2_ARM_EABI + default "hard" if !BR2_ARM_SOFT_FLOAT && BR2_ARM_EABIHF + +config BR2_GCC_TARGET_MODE + default "arm" if BR2_ARM_INSTRUCTIONS_ARM + default "thumb" if BR2_ARM_INSTRUCTIONS_THUMB || BR2_ARM_INSTRUCTIONS_THUMB2 diff --git a/arch/Config.in.avr32 b/arch/Config.in.avr32 new file mode 100644 index 0000000000..842958957f --- /dev/null +++ b/arch/Config.in.avr32 @@ -0,0 +1,8 @@ +config BR2_ARCH + default "avr32" + +config BR2_ENDIAN + default "BIG" + +config BR2_GCC_TARGET_ARCH + default "ap" diff --git a/arch/Config.in.bfin b/arch/Config.in.bfin new file mode 100644 index 0000000000..415fc890d8 --- /dev/null +++ b/arch/Config.in.bfin @@ -0,0 +1,107 @@ +choice + prompt "Target CPU" + depends on BR2_bfin + default BR2_bf609 + help + Specify target CPU +config BR2_bf606 + bool "bf606" +config BR2_bf607 + bool "bf607" +config BR2_bf608 + bool "bf608" +config BR2_bf609 + bool "bf609" +config BR2_bf512 + bool "bf512" +config BR2_bf514 + bool "bf514" +config BR2_bf516 + bool "bf516" +config BR2_bf518 + bool "bf518" +config BR2_bf522 + bool "bf522" +config BR2_bf523 + bool "bf523" +config BR2_bf524 + bool "bf524" +config BR2_bf525 + bool "bf525" +config BR2_bf526 + bool "bf526" +config BR2_bf527 + bool "bf527" +config BR2_bf531 + bool "bf531" +config BR2_bf532 + bool "bf532" +config BR2_bf533 + bool "bf533" +config BR2_bf534 + bool "bf534" +config BR2_bf536 + bool "bf536" +config BR2_bf537 + bool "bf537" +config BR2_bf538 + bool "bf538" +config BR2_bf539 + bool "bf539" +config BR2_bf542 + bool "bf542" +config BR2_bf544 + bool "bf544" +config BR2_bf547 + bool "bf547" +config BR2_bf548 + bool "bf548" +config BR2_bf549 + bool "bf549" +config BR2_bf561 + bool "bf561" +endchoice + +config BR2_ARCH + default "bfin" + +config BR2_ENDIAN + default "LITTLE" + +config BR2_GCC_TARGET_CPU + default bf606 if BR2_bf606 + default bf607 if BR2_bf607 + default bf608 if BR2_bf608 + default bf609 if BR2_bf609 + default bf512 if BR2_bf512 + default bf514 if BR2_bf514 + default bf516 if BR2_bf516 + default bf518 if BR2_bf518 + default bf522 if BR2_bf522 + default bf523 if BR2_bf523 + default bf524 if BR2_bf524 + default bf525 if BR2_bf525 + default bf526 if BR2_bf526 + default bf527 if BR2_bf527 + default bf531 if BR2_bf531 + default bf532 if BR2_bf532 + default bf533 if BR2_bf533 + default bf534 if BR2_bf534 + default bf536 if BR2_bf536 + default bf537 if BR2_bf537 + default bf538 if BR2_bf538 + default bf539 if BR2_bf539 + default bf542 if BR2_bf542 + default bf544 if BR2_bf544 + default bf547 if BR2_bf547 + default bf548 if BR2_bf548 + default bf549 if BR2_bf549 + default bf561 if BR2_bf561 + +config BR2_GCC_TARGET_CPU_REVISION + string "Target CPU revision" + help + Specify a target CPU revision, which will be appended to the + value of the -mcpu option. For example, if the selected CPU is + bf609, and then selected CPU revision is "0.0", then gcc will + receive the -mcpu=bf609-0.0 option. diff --git a/arch/Config.in.m68k b/arch/Config.in.m68k new file mode 100644 index 0000000000..ba6cedf7d3 --- /dev/null +++ b/arch/Config.in.m68k @@ -0,0 +1,21 @@ +config BR2_ARCH + default "m68k" if BR2_m68k + +config BR2_ENDIAN + default "BIG" + +config BR2_GCC_TARGET_TUNE + default "68000" if BR2_m68k_68000 + default "68010" if BR2_m68k_68010 + default "68020" if BR2_m68k_68020 + default "68030" if BR2_m68k_68030 + default "68040" if BR2_m68k_68040 + default "68060" if BR2_m68k_68060 + +config BR2_GCC_TARGET_ARCH + default "68000" if BR2_m68k_68000 + default "68010" if BR2_m68k_68010 + default "68020" if BR2_m68k_68020 + default "68030" if BR2_m68k_68030 + default "68040" if BR2_m68k_68040 + default "68060" if BR2_m68k_68060 diff --git a/arch/Config.in.microblaze b/arch/Config.in.microblaze new file mode 100644 index 0000000000..dbdd99a19b --- /dev/null +++ b/arch/Config.in.microblaze @@ -0,0 +1,10 @@ +config BR2_ARCH + default "microblaze" + +config BR2_ENDIAN + default "LITTLE" if BR2_microblazeel + default "BIG" if BR2_microblazebe + +config BR2_microblaze + bool + default y if BR2_microblazeel || BR2_microblazebe diff --git a/arch/Config.in.mips b/arch/Config.in.mips new file mode 100644 index 0000000000..412120076b --- /dev/null +++ b/arch/Config.in.mips @@ -0,0 +1,90 @@ +choice + prompt "Target Architecture Variant" + depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + default BR2_mips_32 if BR2_mips || BR2_mipsel + default BR2_mips_64 if BR2_mips64 || BR2_mips64el + help + Specific CPU variant to use + + 64bit cabable: 3, 4, 64, 64r2 + non-64bit capable: 1, 2, 32, 32r2 + +config BR2_mips_1 + bool "mips I (generic)" + depends on !BR2_ARCH_IS_64 && BR2_DEPRECATED +config BR2_mips_2 + bool "mips II" + depends on !BR2_ARCH_IS_64 && BR2_DEPRECATED +config BR2_mips_3 + bool "mips III" + depends on BR2_DEPRECATED +config BR2_mips_4 + bool "mips IV" + depends on BR2_DEPRECATED +config BR2_mips_32 + bool "mips 32" + depends on !BR2_ARCH_IS_64 +config BR2_mips_32r2 + bool "mips 32r2" + depends on !BR2_ARCH_IS_64 +config BR2_mips_64 + bool "mips 64" +config BR2_mips_64r2 + bool "mips 64r2" +endchoice + + +choice + prompt "Target ABI" + depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + default BR2_MIPS_OABI32 if !BR2_ARCH_IS_64 + default BR2_MIPS_NABI32 if BR2_ARCH_IS_64 + + help + Application Binary Interface to use + +config BR2_MIPS_OABI32 + bool "o32" +config BR2_MIPS_NABI32 + bool "n32" + depends on BR2_ARCH_IS_64 + select BR2_KERNEL_64_USERLAND_32 +config BR2_MIPS_NABI64 + bool "n64" + depends on BR2_ARCH_IS_64 +endchoice + +config BR2_MIPS_SOFT_FLOAT + bool "Use soft-float" + default y + select BR2_SOFT_FLOAT + help + If your target CPU does not have a Floating Point Unit (FPU) + or a kernel FPU emulator, but you still wish to support + floating point functions, then everything will need to be + compiled with soft floating point support (-msoft-float). + +config BR2_ARCH + default "mips" if BR2_mips + default "mipsel" if BR2_mipsel + default "mips64" if BR2_mips64 + default "mips64el" if BR2_mips64el + +config BR2_ENDIAN + default "LITTLE" if BR2_mipsel || BR2_mips64el + default "BIG" if BR2_mips || BR2_mips64 + +config BR2_GCC_TARGET_ARCH + default "mips1" if BR2_mips_1 + default "mips2" if BR2_mips_2 + default "mips3" if BR2_mips_3 + default "mips4" if BR2_mips_4 + default "mips32" if BR2_mips_32 + default "mips32r2" if BR2_mips_32r2 + default "mips64" if BR2_mips_64 + default "mips64r2" if BR2_mips_64r2 + +config BR2_GCC_TARGET_ABI + default "32" if BR2_MIPS_OABI32 + default "n32" if BR2_MIPS_NABI32 + default "64" if BR2_MIPS_NABI64 diff --git a/arch/Config.in.nios2 b/arch/Config.in.nios2 new file mode 100644 index 0000000000..ed638981aa --- /dev/null +++ b/arch/Config.in.nios2 @@ -0,0 +1,5 @@ +config BR2_ARCH + default "nios2" + +config BR2_ENDIAN + default "LITTLE" diff --git a/arch/Config.in.powerpc b/arch/Config.in.powerpc new file mode 100644 index 0000000000..ae70a8aa80 --- /dev/null +++ b/arch/Config.in.powerpc @@ -0,0 +1,146 @@ +choice + prompt "Target Architecture Variant" + depends on BR2_powerpc + default BR2_generic_powerpc + help + Specific CPU variant to use +config BR2_generic_powerpc + bool "generic" +config BR2_powerpc_401 + bool "401" +config BR2_powerpc_403 + bool "403" +config BR2_powerpc_405 + bool "405" +config BR2_powerpc_405fp + bool "405 with FPU" +config BR2_powerpc_440 + bool "440" +config BR2_powerpc_440fp + bool "440 with FPU" +config BR2_powerpc_464 + bool "464" +config BR2_powerpc_464fp + bool "464 with FPU" +config BR2_powerpc_476 + bool "476" +config BR2_powerpc_476fp + bool "476 with FPU" +config BR2_powerpc_505 + bool "505" +config BR2_powerpc_601 + bool "601" +config BR2_powerpc_602 + bool "602" +config BR2_powerpc_603 + bool "603" +config BR2_powerpc_603e + bool "603e" +config BR2_powerpc_604 + bool "604" +config BR2_powerpc_604e + bool "604e" +config BR2_powerpc_620 + bool "620" +config BR2_powerpc_630 + bool "630" +config BR2_powerpc_740 + bool "740" +config BR2_powerpc_7400 + bool "7400" +config BR2_powerpc_7450 + bool "7450" +config BR2_powerpc_750 + bool "750" +config BR2_powerpc_821 + bool "821" +config BR2_powerpc_823 + bool "823" +config BR2_powerpc_860 + bool "860" +config BR2_powerpc_970 + bool "970" +config BR2_powerpc_8540 + bool "8540 / e500v1" +config BR2_powerpc_8548 + bool "8548 / e500v2" +config BR2_powerpc_e300c2 + bool "e300c2" +config BR2_powerpc_e300c3 + bool "e300c3" +config BR2_powerpc_e500mc + bool "e500mc" +endchoice + +choice + prompt "Target ABI" + depends on BR2_powerpc + default BR2_powerpc_SPE if BR2_powerpc_8540 || BR2_powerpc_8548 + default BR2_powerpc_CLASSIC + help + Application Binary Interface to use + +config BR2_powerpc_CLASSIC + bool "Classic" + depends on !(BR2_powerpc_8540 || BR2_powerpc_8548) +config BR2_powerpc_SPE + bool "SPE" + depends on BR2_powerpc_8540 || BR2_powerpc_8548 +endchoice + +config BR2_POWERPC_SOFT_FLOAT + bool "Use soft-float" + select BR2_SOFT_FLOAT + help + If your target CPU does not have a Floating Point Unit (FPU) + or a kernel FPU emulator, but you still wish to support + floating point functions, then everything will need to be + compiled with soft floating point support (-msoft-float). + +config BR2_ARCH + default "powerpc" if BR2_powerpc + +config BR2_ENDIAN + default "BIG" + +config BR2_GCC_TARGET_TUNE + default "401" if BR2_powerpc_401 + default "403" if BR2_powerpc_403 + default "405" if BR2_powerpc_405 + default "405fp" if BR2_powerpc_405fp + default "440" if BR2_powerpc_440 + default "440fp" if BR2_powerpc_440fp + default "464" if BR2_powerpc_464 + default "464fp" if BR2_powerpc_464fp + default "476" if BR2_powerpc_476 + default "476fp" if BR2_powerpc_476fp + default "505" if BR2_powerpc_505 + default "601" if BR2_powerpc_601 + default "602" if BR2_powerpc_602 + default "603" if BR2_powerpc_603 + default "603e" if BR2_powerpc_603e + default "604" if BR2_powerpc_604 + default "604e" if BR2_powerpc_604e + default "620" if BR2_powerpc_620 + default "630" if BR2_powerpc_630 + default "740" if BR2_powerpc_740 + default "7400" if BR2_powerpc_7400 + default "7450" if BR2_powerpc_7450 + default "750" if BR2_powerpc_750 + default "821" if BR2_powerpc_821 + default "823" if BR2_powerpc_823 + default "860" if BR2_powerpc_860 + default "970" if BR2_powerpc_970 + default "8540" if BR2_powerpc_8540 + default "8548" if BR2_powerpc_8548 + default "e300c2" if BR2_powerpc_e300c2 + default "e300c3" if BR2_powerpc_e300c3 + default "e500mc" if BR2_powerpc_e500mc + +config BR2_GCC_TARGET_ABI + default "altivec" if BR2_PPC_ABI_altivec + default "no-altivec" if BR2_PPC_ABI_no-altivec + default "spe" if BR2_PPC_ABI_spe + default "no-spe" if BR2_PPC_ABI_no-spe + default "ibmlongdouble" if BR2_PPC_ABI_ibmlongdouble + default "ieeelongdouble" if BR2_PPC_ABI_ieeelongdouble diff --git a/arch/Config.in.sh b/arch/Config.in.sh new file mode 100644 index 0000000000..cf70fd5ffc --- /dev/null +++ b/arch/Config.in.sh @@ -0,0 +1,41 @@ +choice + prompt "Target Architecture Variant" + depends on BR2_sh + default BR2_sh4 + help + Specific CPU variant to use + +config BR2_sh2 + bool "sh2 (SH2 big endian)" +config BR2_sh2a + bool "sh2a (SH2A big endian)" +config BR2_sh3 + bool "sh3 (SH3 little endian)" +config BR2_sh3eb + bool "sh3eb (SH3 big endian)" +config BR2_sh4 + bool "sh4 (SH4 little endian)" +config BR2_sh4eb + bool "sh4eb (SH4 big endian)" +config BR2_sh4a + bool "sh4a (SH4A little endian)" +config BR2_sh4aeb + bool "sh4aeb (SH4A big endian)" +endchoice + +config BR2_ARCH + default "sh2" if BR2_sh2 + default "sh2a" if BR2_sh2a + default "sh3" if BR2_sh3 + default "sh3eb" if BR2_sh3eb + default "sh4" if BR2_sh4 + default "sh4eb" if BR2_sh4eb + default "sh4a" if BR2_sh4a + default "sh4aeb" if BR2_sh4aeb + default "sh64" if BR2_sh64 + +config BR2_ENDIAN + default "LITTLE" if BR2_sh3 || BR2_sh4 || BR2_sh4a || \ + BR2_x86_64 || BR2_sh64 + default "BIG" if BR2_sh2 || BR2_sh2a || BR2_sh3eb || \ + BR2_sh4eb || BR2_sh4aeb diff --git a/arch/Config.in.sparc b/arch/Config.in.sparc new file mode 100644 index 0000000000..33204a2484 --- /dev/null +++ b/arch/Config.in.sparc @@ -0,0 +1,39 @@ +choice + prompt "Target Architecture Variant" + depends on BR2_sparc + default BR2_sparc_v8 + help + Specific CPU variant to use + +config BR2_sparc_v8 + bool "v8" +config BR2_sparc_sparchfleon + bool "hfleon" +config BR2_sparc_sparchfleonv8 + bool "hfleonv8" +config BR2_sparc_sparcsfleon + bool "sfleon" +config BR2_sparc_sparcsfleonv8 + bool "sfleonv8" +endchoice + +config BR2_ARCH + default "sparc" if BR2_sparc + +config BR2_ENDIAN + default "BIG" + +config BR2_GCC_TARGET_TUNE + default "v8" if BR2_sparc_v8 + default "v9" if BR2_sparc_v9 + default "v9" if BR2_sparc_v9a + default "v9" if BR2_sparc_v9b + default "ultrasparc" if BR2_sparc_ultrasparc + default "ultrasparc3" if BR2_sparc_ultrasparc3 + default "niagara" if BR2_sparc_niagara + +config BR2_GCC_TARGET_CPU + default "sparchfleon" if BR2_sparc_sparchfleon + default "sparchfleonv8" if BR2_sparc_sparchfleonv8 + default "sparcsfleon" if BR2_sparc_sparcsfleon + default "sparcsfleonv8" if BR2_sparc_sparcsfleonv8 diff --git a/arch/Config.in.x86 b/arch/Config.in.x86 new file mode 100644 index 0000000000..ce306056b8 --- /dev/null +++ b/arch/Config.in.x86 @@ -0,0 +1,236 @@ +# i386/x86_64 cpu features +config BR2_X86_CPU_HAS_MMX + bool +config BR2_X86_CPU_HAS_SSE + bool +config BR2_X86_CPU_HAS_SSE2 + bool +config BR2_X86_CPU_HAS_SSE3 + bool +config BR2_X86_CPU_HAS_SSSE3 + bool + +choice + prompt "Target Architecture Variant" + depends on BR2_i386 || BR2_x86_64 + default BR2_x86_i586 if BR2_i386 + default BR2_x86_generic if BR2_x86_64 + help + Specific CPU variant to use + +config BR2_x86_generic + bool "generic" +config BR2_x86_i386 + bool "i386" + depends on !BR2_x86_64 +config BR2_x86_i486 + bool "i486" + depends on !BR2_x86_64 +config BR2_x86_i586 + bool "i586" + depends on !BR2_x86_64 +config BR2_x86_i686 + bool "i686" + depends on !BR2_x86_64 +config BR2_x86_pentiumpro + bool "pentium pro" + depends on !BR2_x86_64 +config BR2_x86_pentium_mmx + bool "pentium MMX" + select BR2_X86_CPU_HAS_MMX + depends on !BR2_x86_64 +config BR2_x86_pentium_m + bool "pentium mobile" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + depends on !BR2_x86_64 +config BR2_x86_pentium2 + bool "pentium2" + select BR2_X86_CPU_HAS_MMX + depends on !BR2_x86_64 +config BR2_x86_pentium3 + bool "pentium3" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + depends on !BR2_x86_64 +config BR2_x86_pentium4 + bool "pentium4" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + depends on !BR2_x86_64 +config BR2_x86_prescott + bool "prescott" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + select BR2_X86_CPU_HAS_SSE3 + depends on !BR2_x86_64 +config BR2_x86_nocona + bool "nocona" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + select BR2_X86_CPU_HAS_SSE3 +config BR2_x86_core2 + bool "core2" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + select BR2_X86_CPU_HAS_SSE3 + select BR2_X86_CPU_HAS_SSSE3 +config BR2_x86_atom + bool "atom" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + select BR2_X86_CPU_HAS_SSE3 + select BR2_X86_CPU_HAS_SSSE3 +config BR2_x86_k6 + bool "k6" + select BR2_X86_CPU_HAS_MMX + depends on !BR2_x86_64 +config BR2_x86_k6_2 + bool "k6-2" + select BR2_X86_CPU_HAS_MMX + depends on !BR2_x86_64 +config BR2_x86_athlon + bool "athlon" + select BR2_X86_CPU_HAS_MMX + depends on !BR2_x86_64 +config BR2_x86_athlon_4 + bool "athlon-4" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + depends on !BR2_x86_64 +config BR2_x86_opteron + bool "opteron" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 +config BR2_x86_opteron_sse3 + bool "opteron w/ SSE3" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + select BR2_X86_CPU_HAS_SSE3 +config BR2_x86_barcelona + bool "barcelona" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + select BR2_X86_CPU_HAS_SSE3 +config BR2_x86_geode + bool "geode" + # Don't include MMX support because there several variant of geode + # processor, some with MMX support, some without. + # See: http://en.wikipedia.org/wiki/Geode_%28processor%29 + depends on !BR2_x86_64 +config BR2_x86_c3 + bool "Via/Cyrix C3 (Samuel/Ezra cores)" + select BR2_X86_CPU_HAS_MMX + depends on !BR2_x86_64 +config BR2_x86_c32 + bool "Via C3-2 (Nehemiah cores)" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + depends on !BR2_x86_64 +config BR2_x86_winchip_c6 + bool "IDT Winchip C6" + select BR2_X86_CPU_HAS_MMX + depends on !BR2_x86_64 +config BR2_x86_winchip2 + bool "IDT Winchip 2" + select BR2_X86_CPU_HAS_MMX + depends on !BR2_x86_64 +endchoice + +config BR2_ARCH + default "i386" if BR2_x86_i386 + default "i486" if BR2_x86_i486 + default "i586" if BR2_x86_i586 + default "i586" if BR2_x86_pentium_mmx + default "i586" if BR2_x86_geode + default "i586" if BR2_x86_c3 + default "i686" if BR2_x86_c32 + default "i586" if BR2_x86_winchip_c6 + default "i586" if BR2_x86_winchip2 + default "i686" if BR2_x86_i686 + default "i686" if BR2_x86_pentium2 + default "i686" if BR2_x86_pentium3 + default "i686" if BR2_x86_pentium4 + default "i686" if BR2_x86_pentium_m + default "i686" if BR2_x86_pentiumpro + default "i686" if BR2_x86_prescott + default "i686" if BR2_x86_nocona && BR2_i386 + default "i686" if BR2_x86_core2 && BR2_i386 + default "i686" if BR2_x86_atom && BR2_i386 + default "i686" if BR2_x86_opteron && BR2_i386 + default "i686" if BR2_x86_opteron_sse3 && BR2_i386 + default "i686" if BR2_x86_barcelona && BR2_i386 + default "i686" if BR2_x86_k6 + default "i686" if BR2_x86_k6_2 + default "i686" if BR2_x86_athlon + default "i686" if BR2_x86_athlon_4 + default "x86_64" if BR2_x86_64 + default "i386" if BR2_x86_generic + +config BR2_ENDIAN + default "LITTLE" + +config BR2_GCC_TARGET_TUNE + default "i386" if BR2_x86_i386 + default "i486" if BR2_x86_i486 + default "i586" if BR2_x86_i586 + default "pentium-mmx" if BR2_x86_pentium_mmx + default "i686" if BR2_x86_i686 + default "pentiumpro" if BR2_x86_pentiumpro + default "pentium-m" if BR2_x86_pentium_m + default "pentium2" if BR2_x86_pentium2 + default "pentium3" if BR2_x86_pentium3 + default "pentium4" if BR2_x86_pentium4 + default "prescott" if BR2_x86_prescott + default "nocona" if BR2_x86_nocona + default "core2" if BR2_x86_core2 + default "atom" if BR2_x86_atom + default "k8" if BR2_x86_opteron + default "k8-sse3" if BR2_x86_opteron_sse3 + default "barcelona" if BR2_x86_barcelona + default "k6" if BR2_x86_k6 + default "k6-2" if BR2_x86_k6_2 + default "athlon" if BR2_x86_athlon + default "athlon-4" if BR2_x86_athlon_4 + default "winchip-c6" if BR2_x86_winchip_c6 + default "winchip2" if BR2_x86_winchip2 + default "c3" if BR2_x86_c3 + default "c3-2" if BR2_x86_c32 + default "geode" if BR2_x86_geode + default "generic" if BR2_x86_generic + +config BR2_GCC_TARGET_ARCH + default "i386" if BR2_x86_i386 + default "i486" if BR2_x86_i486 + default "i586" if BR2_x86_i586 + default "pentium-mmx" if BR2_x86_pentium_mmx + default "i686" if BR2_x86_i686 + default "pentiumpro" if BR2_x86_pentiumpro + default "pentium-m" if BR2_x86_pentium_m + default "pentium2" if BR2_x86_pentium2 + default "pentium3" if BR2_x86_pentium3 + default "pentium4" if BR2_x86_pentium4 + default "prescott" if BR2_x86_prescott + default "nocona" if BR2_x86_nocona + default "core2" if BR2_x86_core2 + default "atom" if BR2_x86_atom + default "k8" if BR2_x86_opteron + default "k8-sse3" if BR2_x86_opteron_sse3 + default "barcelona" if BR2_x86_barcelona + default "k6" if BR2_x86_k6 + default "k6-2" if BR2_x86_k6_2 + default "athlon" if BR2_x86_athlon + default "athlon-4" if BR2_x86_athlon_4 + default "winchip-c6" if BR2_x86_winchip_c6 + default "winchip2" if BR2_x86_winchip2 + default "c3" if BR2_x86_c3 + default "c3-2" if BR2_x86_c32 + default "geode" if BR2_x86_geode diff --git a/arch/Config.in.xtensa b/arch/Config.in.xtensa new file mode 100644 index 0000000000..60c03f5515 --- /dev/null +++ b/arch/Config.in.xtensa @@ -0,0 +1,37 @@ +choice + prompt "Target Architecture Variant" + depends on BR2_xtensa + default BR2_xtensa_fsf +config BR2_XTENSA_CUSTOM + bool "Custom Xtensa processor configuration" +config BR2_xtensa_fsf + bool "fsf - Default configuration" +endchoice + +config BR2_XTENSA_CUSTOM_NAME + string "Custom Xtensa processor configuration name" + depends on BR2_XTENSA_CUSTOM + default "" + help + Name given to a custom Xtensa processor configuration. + +config BR2_XTENSA_CORE_NAME + string + default BR2_XTENSA_CUSTOM_NAME if BR2_XTENSA_CUSTOM + default "" if BR2_xtensa_fsf + +config BR2_XTENSA_OVERLAY_DIR + string "Overlay directory for custom configuration" + depends on BR2_XTENSA_CUSTOM + default "" + help + Provide the directory path that contains the overlay file + for a custom processor configuration. The path is relative + to the top directory of buildroot. + These overlay files are tar packages with updated configuration + files for various toolchain packages and Xtensa processor + configurations. They are provided by the processor vendor or + directly from Tensilica. + +config BR2_ARCH + default "xtensa" if BR2_xtensa diff --git a/board/amlogic/xios/skeleton/run b/board/amlogic/xios/skeleton/run new file mode 120000 index 0000000000..1c2f433de1 --- /dev/null +++ b/board/amlogic/xios/skeleton/run @@ -0,0 +1 @@ +tmp \ No newline at end of file diff --git a/board/arm/foundation-v8/readme.txt b/board/arm/foundation-v8/readme.txt new file mode 100644 index 0000000000..7f419a0e46 --- /dev/null +++ b/board/arm/foundation-v8/readme.txt @@ -0,0 +1,19 @@ +This is the support for the ARM Foundation v8 machine emulated by the +ARM software simulator of the AArch64 architecture. + +First, one has to download the AArch64 software simulator from: + + https://silver.arm.com/download/download.tm?pv=1317469 + +Then, use the arm_foundationv8_defconfig configuration to build your +Buildroot system. + +Finally, boot your system with: + + ${LOCATION_OF_FOUNDATIONV8_SIMULATOR}/Foundation_v8 \ + --image output/images/linux-system.axf \ + --block-device output/images/rootfs.ext2 \ + --network=nat + +You can get network access from within the simulated environment +by requesting an IP address using DHCP (run the command 'udhcpc'). diff --git a/board/armadeus/apf27/linux-3.8.config b/board/armadeus/apf27/linux-3.8.config new file mode 100644 index 0000000000..cff947b6d3 --- /dev/null +++ b/board/armadeus/apf27/linux-3.8.config @@ -0,0 +1,229 @@ +CONFIG_EXPERIMENTAL=y +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_CGROUPS=y +CONFIG_EMBEDDED=y +# CONFIG_COMPAT_BRK is not set +CONFIG_SLAB=y +CONFIG_PROFILING=y +CONFIG_OPROFILE=m +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +# CONFIG_ARCH_MULTI_V7 is not set +CONFIG_ARCH_MXC=y +CONFIG_MXC_IRQ_PRIOR=y +CONFIG_MACH_IMX27_DT=y +CONFIG_PREEMPT=y +CONFIG_AEABI=y +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_FPE_NWFPE=y +CONFIG_FPE_NWFPE_XP=y +CONFIG_PM_DEBUG=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +CONFIG_IPV6=y +CONFIG_CAN=m +CONFIG_CAN_RAW=m +CONFIG_CAN_BCM=m +CONFIG_CAN_VCAN=m +CONFIG_CAN_MCP251X=m +CONFIG_BT=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_HIDP=m +CONFIG_BT_HCIBTUSB=m +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUART_BCSP=y +CONFIG_CFG80211=m +CONFIG_MAC80211=m +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_CFI=y +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_CFI_GEOMETRY=y +# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set +# CONFIG_MTD_CFI_I2 is not set +CONFIG_MTD_CFI_INTELEXT=y +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_MXC=y +CONFIG_MTD_UBI=y +CONFIG_PROC_DEVICETREE=y +CONFIG_EEPROM_AT24=y +CONFIG_EEPROM_AT25=y +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y +CONFIG_NETDEVICES=y +CONFIG_MII=y +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_CIRRUS is not set +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MICROCHIP is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_WIZNET is not set +CONFIG_SMSC_PHY=y +CONFIG_RTL8187=m +CONFIG_LIBERTAS=m +CONFIG_LIBERTAS_SDIO=m +CONFIG_RT2X00=m +CONFIG_RT2500USB=m +CONFIG_RT73USB=m +CONFIG_RT2800USB=m +CONFIG_RTL8192CU=m +CONFIG_ZD1211RW=m +CONFIG_INPUT_JOYDEV=y +CONFIG_INPUT_EVDEV=y +CONFIG_KEYBOARD_GPIO=y +CONFIG_KEYBOARD_IMX=m +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_JOYSTICK=y +CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_IMX=y +CONFIG_SERIAL_IMX_CONSOLE=y +# CONFIG_HW_RANDOM is not set +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_IMX=y +CONFIG_SPI=y +CONFIG_SPI_IMX=y +CONFIG_SPI_SPIDEV=m +CONFIG_GPIO_SYSFS=y +CONFIG_W1=y +CONFIG_W1_MASTER_MXC=y +CONFIG_W1_SLAVE_THERM=y +CONFIG_WATCHDOG=y +CONFIG_IMX2_WDT=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_MEDIA_SUPPORT=m +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_USB_VIDEO_CLASS=m +CONFIG_USB_PWC=m +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_SOC_CAMERA=m +CONFIG_VIDEO_MX2=m +# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set +# CONFIG_DVB_AU8522_V4L is not set +# CONFIG_DVB_TUNER_DIB0070 is not set +# CONFIG_DVB_TUNER_DIB0090 is not set +CONFIG_FB=y +# CONFIG_FB_MX3 is not set +CONFIG_BACKLIGHT_LCD_SUPPORT=y +# CONFIG_LCD_CLASS_DEVICE is not set +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_LOGO=y +# CONFIG_LOGO_LINUX_MONO is not set +# CONFIG_LOGO_LINUX_VGA16 is not set +CONFIG_SOUND=m +CONFIG_SND=m +CONFIG_SND_MIXER_OSS=m +CONFIG_SND_PCM_OSS=m +# CONFIG_SND_DRIVERS is not set +# CONFIG_SND_ARM is not set +# CONFIG_SND_SPI is not set +# CONFIG_SND_USB is not set +CONFIG_SND_SOC=m +CONFIG_SND_IMX_SOC=m +CONFIG_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_MXC=y +CONFIG_USB_CHIPIDEA=y +CONFIG_USB_CHIPIDEA_HOST=y +CONFIG_USB_CHIPIDEA_DEBUG=y +CONFIG_USB_ACM=y +CONFIG_USB_PRINTER=y +CONFIG_USB_STORAGE=y +CONFIG_USB_SERIAL=y +CONFIG_USB_SERIAL_FTDI_SIO=y +CONFIG_USB_SERIAL_PL2303=y +CONFIG_USB_GADGET=y +CONFIG_USB_ETH=m +CONFIG_USB_GADGETFS=m +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_G_HID=m +CONFIG_USB_ULPI=y +CONFIG_MMC=y +CONFIG_MMC_MXC=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_CPU=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_LEDS_TRIGGER_TRANSIENT=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_DS1374=y +CONFIG_RTC_DRV_MXC=m +CONFIG_DMADEVICES=y +CONFIG_IMX_SDMA=y +CONFIG_IMX_DMA=y +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_IIO=m +CONFIG_EXT2_FS=y +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y +# CONFIG_DNOTIFY is not set +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +# CONFIG_PROC_PAGE_MONITOR is not set +CONFIG_TMPFS=y +CONFIG_JFFS2_FS=y +CONFIG_UBIFS_FS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V4=y +CONFIG_ROOT_NFS=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_850=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_15=m +CONFIG_PRINTK_TIME=y +CONFIG_DEBUG_FS=y +# CONFIG_SCHED_DEBUG is not set +# CONFIG_DEBUG_PREEMPT is not set +CONFIG_DEBUG_INFO=y +# CONFIG_FTRACE is not set +CONFIG_DEBUG_LL=y +CONFIG_EARLY_PRINTK=y +# CONFIG_CRYPTO_ANSI_CPRNG is not set diff --git a/board/armadeus/apf28/linux-3.8.config b/board/armadeus/apf28/linux-3.8.config new file mode 100644 index 0000000000..c9f11429f0 --- /dev/null +++ b/board/armadeus/apf28/linux-3.8.config @@ -0,0 +1,180 @@ +CONFIG_EXPERIMENTAL=y +# CONFIG_LOCALVERSION_AUTO is not set +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_EMBEDDED=y +# CONFIG_COMPAT_BRK is not set +CONFIG_SLAB=y +CONFIG_PROFILING=y +CONFIG_OPROFILE=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_BLK_DEV_BSG is not set +CONFIG_PARTITION_ADVANCED=y +CONFIG_BSD_DISKLABEL=y +# CONFIG_IOSCHED_CFQ is not set +CONFIG_ARCH_MXS=y +CONFIG_MACH_MXS_DT=y +CONFIG_PREEMPT=y +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CPU_IDLE=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_PNP=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +CONFIG_IPV6=y +CONFIG_CAN=m +CONFIG_CAN_RAW=m +CONFIG_CAN_BCM=m +CONFIG_CAN_VCAN=m +CONFIG_CAN_FLEXCAN=m +CONFIG_BT=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=m +CONFIG_BT_HCIBTUSB=m +CONFIG_CFG80211=m +CONFIG_MAC80211=m +CONFIG_MAC80211_RC_PID=y +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_FW_LOADER=m +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_GPMI_NAND=y +CONFIG_MTD_UBI=y +CONFIG_EEPROM_AT24=y +CONFIG_EEPROM_AT25=y +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_ST=y +CONFIG_BLK_DEV_SR=y +CONFIG_CHR_DEV_SG=y +CONFIG_CHR_DEV_SCH=y +CONFIG_SCSI_MULTI_LUN=y +CONFIG_SCSI_LOGGING=y +CONFIG_SCSI_SCAN_ASYNC=y +CONFIG_NETDEVICES=y +CONFIG_RTL8187=m +CONFIG_RT2X00=m +CONFIG_RT73USB=m +CONFIG_ZD1211RW=m +CONFIG_INPUT_JOYDEV=y +CONFIG_INPUT_EVDEV=y +CONFIG_KEYBOARD_GPIO=y +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_INPUT_MISC=y +CONFIG_INPUT_UINPUT=m +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_SERIAL_MXS_AUART=y +# CONFIG_HW_RANDOM is not set +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MXS=y +CONFIG_SPI=y +CONFIG_SPI_BITBANG=m +CONFIG_SPI_MXS=y +CONFIG_SPI_SPIDEV=m +CONFIG_GPIO_SYSFS=y +CONFIG_HWMON=m +CONFIG_WATCHDOG=y +CONFIG_MEDIA_SUPPORT=m +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_FB=y +CONFIG_FB_MXS=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +# CONFIG_BACKLIGHT_GENERIC is not set +CONFIG_BACKLIGHT_PWM=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_LOGO=y +# CONFIG_LOGO_LINUX_MONO is not set +# CONFIG_LOGO_LINUX_VGA16 is not set +CONFIG_USB=y +CONFIG_USB_DEBUG=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_MON=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_CHIPIDEA=y +CONFIG_USB_CHIPIDEA_HOST=y +CONFIG_USB_ACM=y +CONFIG_USB_PRINTER=y +CONFIG_USB_WDM=y +CONFIG_USB_STORAGE=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_DEBUG_FILES=y +CONFIG_USB_ETH=m +CONFIG_USB_ULPI=y +CONFIG_USB_MXS_PHY=y +CONFIG_MMC=y +CONFIG_MMC_MXS=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_STMP=y +CONFIG_DMADEVICES=y +CONFIG_MXS_DMA=y +CONFIG_STAGING=y +CONFIG_MXS_LRADC=y +CONFIG_IIO=y +CONFIG_PWM=y +CONFIG_PWM_MXS=y +CONFIG_EXT2_FS=y +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT2_FS_POSIX_ACL=y +CONFIG_EXT2_FS_SECURITY=y +CONFIG_EXT2_FS_XIP=y +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y +CONFIG_AUTOFS4_FS=y +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_UBIFS_FS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V4=y +CONFIG_ROOT_NFS=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_850=y +CONFIG_NLS_ISO8859_1=y +CONFIG_DEBUG_FS=y +# CONFIG_CRYPTO_ANSI_CPRNG is not set +# CONFIG_CRYPTO_HW is not set diff --git a/board/armadeus/apf9328/linux-3.1.1-0001-fixes_arm_mach-types_for_apf9328.patch b/board/armadeus/apf9328/linux-3.1.1-0001-fixes_arm_mach-types_for_apf9328.patch new file mode 100644 index 0000000000..aa464a3445 --- /dev/null +++ b/board/armadeus/apf9328/linux-3.1.1-0001-fixes_arm_mach-types_for_apf9328.patch @@ -0,0 +1,26 @@ +From 053ba505eb0d40287ac5750daf454af0aed2ce75 Mon Sep 17 00:00:00 2001 +From: Gwenhael Goavec-Merou +Date: Tue, 4 Oct 2011 14:19:58 +0200 +Subject: [PATCH 1/2] [ARM] mach-types: Re-add apf9328 + + +Signed-off-by: Gwenhael Goavec-Merou +--- + arch/arm/tools/mach-types | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types +index fff68d0..07811a7 100644 +--- a/arch/arm/tools/mach-types ++++ b/arch/arm/tools/mach-types +@@ -188,6 +188,7 @@ omap_2430sdp MACH_OMAP_2430SDP OMAP_2430SDP 900 + davinci_evm MACH_DAVINCI_EVM DAVINCI_EVM 901 + palmz72 MACH_PALMZ72 PALMZ72 904 + nxdb500 MACH_NXDB500 NXDB500 905 ++apf9328 MACH_APF9328 APF9328 906 + palmt5 MACH_PALMT5 PALMT5 917 + palmtc MACH_PALMTC PALMTC 918 + omap_apollon MACH_OMAP_APOLLON OMAP_APOLLON 919 +-- +1.7.3.4 + diff --git a/board/armadeus/apf9328/linux-3.1.1-0002-add_missing_config_option_for_apf9328.patch b/board/armadeus/apf9328/linux-3.1.1-0002-add_missing_config_option_for_apf9328.patch new file mode 100644 index 0000000000..312b9a03d8 --- /dev/null +++ b/board/armadeus/apf9328/linux-3.1.1-0002-add_missing_config_option_for_apf9328.patch @@ -0,0 +1,16 @@ +APF9328 needs CONFIG_MTD_CFI_INTELEXT to boot on its NOR FLASH. + +Signed-off-by: Julien Boibessot + +Index: linux-3.1.1/arch/arm/mach-imx/Kconfig +=================================================================== +--- linux-3.1.1.orig/arch/arm/mach-imx/Kconfig 2011-11-16 14:45:55.000000000 +0100 ++++ linux-3.1.1/arch/arm/mach-imx/Kconfig 2011-11-16 14:47:20.000000000 +0100 +@@ -84,6 +84,7 @@ + bool "APF9328" + select SOC_IMX1 + select IMX_HAVE_PLATFORM_IMX_UART ++ select MTD_CFI_INTELEXT + help + Say Yes here if you are using the Armadeus APF9328 development board + diff --git a/board/atmel/at91sam9260ek/linux-3.9.config b/board/atmel/at91sam9260ek/linux-3.9.config new file mode 100644 index 0000000000..48dc656f4a --- /dev/null +++ b/board/atmel/at91sam9260ek/linux-3.9.config @@ -0,0 +1,98 @@ +CONFIG_EXPERIMENTAL=y +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_KERNEL_LZO=y +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_BLK_DEV_INITRD=y +CONFIG_SLAB=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_ARCH_AT91=y +CONFIG_ARCH_AT91SAM9260=y +CONFIG_ARCH_AT91SAM9260_SAM9XE=y +CONFIG_MACH_AT91SAM9260EK=y +CONFIG_MACH_CAM60=y +CONFIG_MACH_SAM9_L9260=y +CONFIG_MACH_AFEB9260=y +CONFIG_MACH_USB_A9260=y +CONFIG_MACH_QIL_A9260=y +CONFIG_MACH_CPU9260=y +CONFIG_MACH_FLEXIBITY=y +CONFIG_MACH_SNAPPER_9260=y +CONFIG_MACH_AT91SAM_DT=y +CONFIG_AT91_PROGRAMMABLE_CLOCKS=y +# CONFIG_ARM_THUMB is not set +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ARM_APPENDED_DTB=y +CONFIG_ARM_ATAG_DTB_COMPAT=y +CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" +CONFIG_FPE_NWFPE=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_BOOTP=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_IPV6 is not set +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_ATMEL=y +CONFIG_MTD_UBI=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=8192 +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y +CONFIG_SCSI_MULTI_LUN=y +CONFIG_NETDEVICES=y +CONFIG_MII=y +CONFIG_MACB=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_SERIO is not set +CONFIG_SERIAL_ATMEL=y +CONFIG_SERIAL_ATMEL_CONSOLE=y +# CONFIG_HW_RANDOM is not set +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_GPIO=y +# CONFIG_HWMON is not set +CONFIG_WATCHDOG=y +CONFIG_WATCHDOG_NOWAYOUT=y +CONFIG_AT91SAM9X_WATCHDOG=y +# CONFIG_USB_HID is not set +CONFIG_USB=y +CONFIG_USB_DEVICEFS=y +CONFIG_USB_MON=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_STORAGE=y +CONFIG_USB_STORAGE_DEBUG=y +CONFIG_USB_GADGET=y +CONFIG_USB_ZERO=m +CONFIG_USB_GADGETFS=m +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_G_SERIAL=m +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_AT91SAM9=y +CONFIG_EXT2_FS=y +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_UBIFS_FS=y +CONFIG_CRAMFS=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_850=y +CONFIG_NLS_ISO8859_1=y +CONFIG_DEBUG_KERNEL=y +CONFIG_DEBUG_USER=y +CONFIG_DEBUG_LL=y diff --git a/board/avnet/s6lx9_microboard/lx9_mmu.dts b/board/avnet/s6lx9_microboard/lx9_mmu.dts new file mode 100644 index 0000000000..8ffedd9feb --- /dev/null +++ b/board/avnet/s6lx9_microboard/lx9_mmu.dts @@ -0,0 +1,247 @@ +/* + * Device Tree Generator version: 1.3 + * + * (C) Copyright 2007-2008 Xilinx, Inc. + * (C) Copyright 2007-2009 Michal Simek + * + * Michal SIMEK + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * CAUTION: This file is automatically generated by libgen. + * Version: Xilinx EDK 13.2 EDK_O.61xd + * + * XPS project directory: device-tree_bsp_230-orig + */ + +/dts-v1/; +/ { + #address-cells = <1>; + #size-cells = <1>; + compatible = "xlnx,microblaze"; + model = "testing"; + MCB3_LPDDR: memory@80000000 { + device_type = "memory"; + reg = < 0x80000000 0x4000000 >; + } ; + aliases { + ethernet0 = &Ethernet_MAC; + serial0 = &USB_Uart; + } ; + chosen { + bootargs = "console=ttyUL0"; + linux,stdout-path = "/axi@0/serial@40600000"; + } ; + cpus { + #address-cells = <1>; + #cpus = <0x1>; + #size-cells = <0>; + microblaze_0: cpu@0 { + clock-frequency = <66666667>; + compatible = "xlnx,microblaze-8.20.a"; + d-cache-baseaddr = <0x80000000>; + d-cache-highaddr = <0x83ffffff>; + d-cache-line-size = <0x10>; + d-cache-size = <0x2000>; + device_type = "cpu"; + i-cache-baseaddr = <0x80000000>; + i-cache-highaddr = <0x83ffffff>; + i-cache-line-size = <0x10>; + i-cache-size = <0x2000>; + model = "microblaze,8.20.a"; + reg = <0>; + timebase-frequency = <66666667>; + xlnx,addr-tag-bits = <0xd>; + xlnx,allow-dcache-wr = <0x1>; + xlnx,allow-icache-wr = <0x1>; + xlnx,area-optimized = <0x0>; + xlnx,avoid-primitives = <0x0>; + xlnx,branch-target-cache-size = <0x0>; + xlnx,cache-byte-size = <0x2000>; + xlnx,d-axi = <0x1>; + xlnx,d-lmb = <0x1>; + xlnx,d-plb = <0x0>; + xlnx,data-size = <0x20>; + xlnx,dcache-addr-tag = <0xd>; + xlnx,dcache-always-used = <0x1>; + xlnx,dcache-byte-size = <0x2000>; + xlnx,dcache-data-width = <0x0>; + xlnx,dcache-force-tag-lutram = <0x0>; + xlnx,dcache-interface = <0x0>; + xlnx,dcache-line-len = <0x4>; + xlnx,dcache-use-fsl = <0x0>; + xlnx,dcache-use-writeback = <0x0>; + xlnx,dcache-victims = <0x0>; + xlnx,debug-enabled = <0x1>; + xlnx,div-zero-exception = <0x0>; + xlnx,dynamic-bus-sizing = <0x1>; + xlnx,ecc-use-ce-exception = <0x0>; + xlnx,edge-is-positive = <0x1>; + xlnx,endianness = <0x1>; + xlnx,family = "spartan6"; + xlnx,fault-tolerant = <0x0>; + xlnx,fpu-exception = <0x0>; + xlnx,freq = <0x3f940ab>; + xlnx,fsl-data-size = <0x20>; + xlnx,fsl-exception = <0x0>; + xlnx,fsl-links = <0x0>; + xlnx,i-axi = <0x0>; + xlnx,i-lmb = <0x1>; + xlnx,i-plb = <0x0>; + xlnx,icache-always-used = <0x1>; + xlnx,icache-data-width = <0x0>; + xlnx,icache-force-tag-lutram = <0x0>; + xlnx,icache-interface = <0x0>; + xlnx,icache-line-len = <0x4>; + xlnx,icache-streams = <0x0>; + xlnx,icache-use-fsl = <0x0>; + xlnx,icache-victims = <0x0>; + xlnx,ill-opcode-exception = <0x0>; + xlnx,instance = "microblaze_0"; + xlnx,interconnect = <0x2>; + xlnx,interconnect-m-axi-dc-aw-register = <0x0>; + xlnx,interconnect-m-axi-dc-read-issuing = <0x2>; + xlnx,interconnect-m-axi-dc-w-register = <0x0>; + xlnx,interconnect-m-axi-dc-write-issuing = <0x20>; + xlnx,interconnect-m-axi-dp-read-issuing = <0x1>; + xlnx,interconnect-m-axi-dp-write-issuing = <0x1>; + xlnx,interconnect-m-axi-ic-read-issuing = <0x2>; + xlnx,interconnect-m-axi-ip-read-issuing = <0x1>; + xlnx,interrupt-is-edge = <0x0>; + xlnx,lockstep-slave = <0x0>; + xlnx,mmu-dtlb-size = <0x1>; + xlnx,mmu-itlb-size = <0x1>; + xlnx,mmu-privileged-instr = <0x0>; + xlnx,mmu-tlb-access = <0x3>; + xlnx,mmu-zones = <0x2>; + xlnx,number-of-pc-brk = <0x1>; + xlnx,number-of-rd-addr-brk = <0x0>; + xlnx,number-of-wr-addr-brk = <0x0>; + xlnx,opcode-0x0-illegal = <0x0>; + xlnx,optimization = <0x0>; + xlnx,pvr = <0x0>; + xlnx,pvr-user1 = <0x0>; + xlnx,pvr-user2 = <0x0>; + xlnx,reset-msr = <0x0>; + xlnx,sco = <0x0>; + xlnx,stream-interconnect = <0x0>; + xlnx,unaligned-exceptions = <0x0>; + xlnx,use-barrel = <0x1>; + xlnx,use-branch-target-cache = <0x0>; + xlnx,use-dcache = <0x1>; + xlnx,use-div = <0x0>; + xlnx,use-ext-brk = <0x1>; + xlnx,use-ext-nm-brk = <0x1>; + xlnx,use-extended-fsl-instr = <0x0>; + xlnx,use-fpu = <0x0>; + xlnx,use-hw-mul = <0x1>; + xlnx,use-icache = <0x1>; + xlnx,use-interrupt = <0x1>; + xlnx,use-mmu = <0x3>; + xlnx,use-msr-instr = <0x1>; + xlnx,use-pcmp-instr = <0x0>; + xlnx,use-stack-protection = <0x0>; + } ; + } ; + axi4lite_0: axi@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "xlnx,axi-interconnect-1.03.a", "simple-bus"; + ranges ; + Ethernet_MAC: ethernet@40e00000 { + compatible = "xlnx,axi-ethernetlite-1.00.a", "xlnx,xps-ethernetlite-1.00.a"; + device_type = "network"; + interrupt-parent = <µblaze_0_intc>; + interrupts = < 2 0 >; + local-mac-address = [ 00 0a 35 aa de 00 ]; +// phy-handle = <&phy0>; + reg = < 0x40e00000 0x10000 >; + xlnx,duplex = <0x1>; + xlnx,family = "spartan6"; + xlnx,include-global-buffers = <0x0>; + xlnx,include-internal-loopback = <0x0>; + xlnx,include-mdio = <0x1>; + xlnx,include-phy-constraints = <0x1>; + xlnx,interconnect-s-axi-read-acceptance = <0x1>; + xlnx,interconnect-s-axi-write-acceptance = <0x1>; + xlnx,rx-ping-pong = <0x0>; + xlnx,s-axi-aclk-period-ps = <0x3a98>; + xlnx,s-axi-id-width = <0x1>; + xlnx,s-axi-supports-narrow-burst = <0x0>; + xlnx,tx-ping-pong = <0x0>; +/* + mdio { + #address-cells = <1>; + #size-cells = <0>; + phy0: phy@7 { + compatible = "marvell,88e1111"; + device_type = "ethernet-phy"; + reg = <7>; + } ; + } ; +*/ + } ; + SPI_FLASH: spi@40a00000 { + compatible = "xlnx,axi-spi-1.01.a", "xlnx,xps-spi-2.00.a"; + interrupt-parent = <µblaze_0_intc>; + interrupts = < 1 2 >; + reg = < 0x40a00000 0x10000 >; + xlnx,family = "spartan6"; + xlnx,fifo-exist = <0x1>; + xlnx,num-ss-bits = <0x1>; + xlnx,num-transfer-bits = <0x8>; + xlnx,sck-ratio = <0x4>; + } ; + USB_Uart: serial@40600000 { + clock-frequency = <66666667>; + compatible = "xlnx,axi-uartlite-1.02.a", "xlnx,xps-uartlite-1.00.a"; + current-speed = <115200>; + device_type = "serial"; + interrupt-parent = <µblaze_0_intc>; + interrupts = < 3 0 >; + port-number = <0>; + reg = < 0x40600000 0x10000 >; + xlnx,baudrate = <0x1c200>; + xlnx,data-bits = <0x8>; + xlnx,family = "spartan6"; + xlnx,odd-parity = <0x1>; + xlnx,s-axi-aclk-freq-hz = <0x3f940ab>; + xlnx,use-parity = <0x0>; + } ; + microblaze_0_intc: interrupt-controller@41200000 { + #interrupt-cells = <0x2>; + compatible = "xlnx,axi-intc-1.01.a", "xlnx,xps-intc-1.00.a"; + interrupt-controller ; + reg = < 0x41200000 0x10000 >; + xlnx,kind-of-intr = <0xc>; + xlnx,num-intr-inputs = <0x4>; + } ; + system_timer: timer@41c00000 { + clock-frequency = <66666667>; + compatible = "xlnx,axi-timer-1.02.a", "xlnx,xps-timer-1.00.a"; + interrupt-parent = <µblaze_0_intc>; + interrupts = < 0 2 >; + reg = < 0x41c00000 0x10000 >; + xlnx,count-width = <0x20>; + xlnx,family = "spartan6"; + xlnx,gen0-assert = <0x1>; + xlnx,gen1-assert = <0x1>; + xlnx,one-timer-only = <0x0>; + xlnx,trig0-assert = <0x1>; + xlnx,trig1-assert = <0x1>; + } ; + } ; +} ; diff --git a/board/avnet/s6lx9_microboard/lx9_mmu_defconfig b/board/avnet/s6lx9_microboard/lx9_mmu_defconfig new file mode 100644 index 0000000000..5d01ca00a1 --- /dev/null +++ b/board/avnet/s6lx9_microboard/lx9_mmu_defconfig @@ -0,0 +1,68 @@ +CONFIG_EXPERIMENTAL=y +CONFIG_SYSVIPC=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="rootfs.cpio" +CONFIG_INITRAMFS_COMPRESSION_GZIP=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_EXPERT=y +CONFIG_KALLSYMS_ALL=y +CONFIG_KALLSYMS_EXTRA_PASS=y +# CONFIG_HOTPLUG is not set +# CONFIG_BASE_FULL is not set +# CONFIG_FUTEX is not set +# CONFIG_EPOLL is not set +# CONFIG_SIGNALFD is not set +# CONFIG_SHMEM is not set +CONFIG_SLAB=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_OPT_LIB_ASM is not set +CONFIG_KERNEL_BASE_ADDR=0x80000000 +CONFIG_XILINX_MICROBLAZE0_FAMILY="spartan6" +CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1 +# CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR is not set +CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1 +CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=1 +CONFIG_XILINX_MICROBLAZE0_HW_VER="8.20.a" +CONFIG_HZ_100=y +CONFIG_MMU=y +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE_FORCE=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_INET_LRO is not set +# CONFIG_IPV6 is not set +CONFIG_PROC_DEVICETREE=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=8192 +CONFIG_NETDEVICES=y +CONFIG_NET_ETHERNET=y +CONFIG_XILINX_EMACLITE=y +# CONFIG_INPUT is not set +# CONFIG_SERIO is not set +# CONFIG_VT is not set +CONFIG_SERIAL_UARTLITE=y +CONFIG_SERIAL_UARTLITE_CONSOLE=y +# CONFIG_HW_RANDOM is not set +# CONFIG_HWMON is not set +# CONFIG_USB_SUPPORT is not set +CONFIG_EXT2_FS=y +# CONFIG_DNOTIFY is not set +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_CIFS=y +CONFIG_CIFS_STATS=y +CONFIG_CIFS_STATS2=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_DEBUG_KERNEL=y +CONFIG_DETECT_HUNG_TASK=y +CONFIG_DEBUG_SLAB=y +CONFIG_DEBUG_SPINLOCK=y +CONFIG_DEBUG_INFO=y +CONFIG_EARLY_PRINTK=y +# CONFIG_CRYPTO_ANSI_CPRNG is not set diff --git a/board/avnet/s6lx9_microboard/readme.txt b/board/avnet/s6lx9_microboard/readme.txt new file mode 100644 index 0000000000..3cb2ce982a --- /dev/null +++ b/board/avnet/s6lx9_microboard/readme.txt @@ -0,0 +1,70 @@ +This is the buildroot board support for the Avnet Spartan6 LX9 MicroBoard. + +The Avnet S6LX9 Microboard is a small USB-Stick sized module containing +a Spartan6 FPGA capable of running the Microblaze softcore processor +together with RAM and FLASH memory. + +The board can be bought from Avnet (avnet.com) or from Trenz Electronic +(www.trenz-electronic.de) for a low price. + +To run the Linux built with buildroot you have to install the FPGA bitfile +and u-boot as described in the tutorial AvtS6LX9MicroBoard_SW302_PetaLinux +available on http://www.em.avnet.com/s6microboard + +On this site also is a forum containing information on how to build your own +Microblaze processor for the Microboard. + +The image file (default name is simpleImage.lx9_mmu.ub) has to be copied +to your tftp folder (often /tftpboot/) or can be programmed into the +board's SPI flash. + +Sample session: + +$ make s6lx9_microboard_defconfig +$ make +$ cp build/linux-/arch/microblaze/boot/simpleImage.lx9_mmu.ub /tftpboot/br12.2a.ub +$ minicom + + + Icache:ON + Dcache:ON + U-Boot Start:0x83f00000 +SF: Got idcode 20 ba 18 10 01 +*** Warning - bad CRC, using default environment + +Net: Xilinx_Emaclite +MAC: 00:0a:35:00:63:37 +U-BOOT for Avnet-LX9-Microboard-AXI-tiny-13.1 + +BOOTP broadcast 1 +DHCP client bound to address 192.168.11.122 +Hit any key to stop autoboot: 0 +U-Boot-PetaLinux> tftp br12.2a.ub +Using Xilinx_Emaclite device +TFTP from server 192.168.11.10; our IP address is 192.168.11.122 +Filename 'br12.2a.ub'. +Load address: 0x80002000 +Loading: ################################################################# + ################################################################# + ################################################################# + ################################################################# + ################################################################# + ############################## +done +Bytes transferred = 5207724 (4f76ac hex) +U-Boot-PetaLinux> bootm +## Booting kernel from Legacy Image at 80002000 ... + Image Name: Linux-3.1.0 + Image Type: MicroBlaze Linux Kernel Image (uncompressed) + Data Size: 5207660 Bytes = 5 MB + Load Address: 80000000 + Entry Point: 80000000 + Verifying Checksum ... OK + Loading Kernel Image ... OK +OK +## Transferring control to Linux (at address 80000000), 0x80000000 ramdisk 0x00000000, FDT 0x00000000... +Early console on uartlite at 0x40600000 +..... boot log skipped + +Welcome to Microblaze Buildroot +Microblaze login: diff --git a/board/beaglebone/linux-3.8.config b/board/beaglebone/linux-3.8.config new file mode 100644 index 0000000000..42427716aa --- /dev/null +++ b/board/beaglebone/linux-3.8.config @@ -0,0 +1,203 @@ +CONFIG_EXPERIMENTAL=y +CONFIG_DEFAULT_HOSTNAME="beaglebone" +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=16 +CONFIG_BLK_DEV_INITRD=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_EMBEDDED=y +CONFIG_SLAB=y +CONFIG_PROFILING=y +CONFIG_OPROFILE=m +CONFIG_KPROBES=y +CONFIG_MODULES=y +CONFIG_MODULE_FORCE_LOAD=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +CONFIG_MODVERSIONS=y +# CONFIG_BLK_DEV_BSG is not set +CONFIG_ARCH_OMAP=y +CONFIG_OMAP_RESET_CLOCKS=y +CONFIG_OMAP_MUX_DEBUG=y +# CONFIG_ARCH_OMAP2 is not set +# CONFIG_ARCH_OMAP3 is not set +# CONFIG_ARCH_OMAP4 is not set +CONFIG_ARM_THUMBEE=y +CONFIG_ARM_ERRATA_720789=y +CONFIG_ARM_ARCH_TIMER=y +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyO2,115200" +CONFIG_KEXEC=y +CONFIG_AUTO_ZRELADDR=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_NEON=y +CONFIG_BINFMT_MISC=y +CONFIG_PM_DEBUG=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM_USER=y +CONFIG_NET_KEY=y +CONFIG_NET_KEY_MIGRATE=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +# CONFIG_INET_LRO is not set +# CONFIG_IPV6 is not set +# CONFIG_WIRELESS is not set +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_OMAP_OCP2SCP=y +CONFIG_OMAP_INTERCONNECT=y +CONFIG_CONNECTOR=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=16384 +CONFIG_EEPROM_93CX6=y +CONFIG_BLK_DEV_SD=y +CONFIG_SCSI_MULTI_LUN=y +CONFIG_SCSI_SCAN_ASYNC=y +CONFIG_ATA=y +# CONFIG_SATA_PMP is not set +CONFIG_SATA_AHCI_PLATFORM=m +# CONFIG_ATA_SFF is not set +CONFIG_NETDEVICES=y +CONFIG_MII=y +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_CIRRUS is not set +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MICROCHIP is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +CONFIG_TI_CPSW=y +# CONFIG_NET_VENDOR_WIZNET is not set +CONFIG_SMSC_PHY=y +# CONFIG_WLAN is not set +CONFIG_INPUT_POLLDEV=m +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_MISC=y +CONFIG_VT_HW_CONSOLE_BINDING=y +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=32 +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_MANY_PORTS=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_8250_DETECT_IRQ=y +CONFIG_SERIAL_8250_RSA=y +CONFIG_HW_RANDOM=y +CONFIG_I2C_CHARDEV=y +CONFIG_SPI=y +CONFIG_SPI_OMAP24XX=y +CONFIG_DEBUG_PINCTRL=y +CONFIG_PINCTRL_SINGLE=y +CONFIG_DEBUG_GPIO=y +CONFIG_GPIO_SYSFS=y +CONFIG_W1=y +CONFIG_POWER_SUPPLY=y +CONFIG_THERMAL=y +CONFIG_THERMAL_GOV_FAIR_SHARE=y +CONFIG_THERMAL_GOV_USER_SPACE=y +CONFIG_CPU_THERMAL=y +CONFIG_WATCHDOG=y +CONFIG_OMAP_WATCHDOG=y +CONFIG_MFD_TPS65217=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_TPS65023=y +CONFIG_REGULATOR_TPS6507X=y +CONFIG_REGULATOR_TPS65217=y +CONFIG_USB=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_SUSPEND=y +CONFIG_USB_MON=y +CONFIG_USB_MUSB_HDRC=m +CONFIG_USB_MUSB_AM35X=m +CONFIG_USB_STORAGE=y +CONFIG_USB_TEST=y +CONFIG_OMAP_USB2=m +CONFIG_OMAP_USB3=m +CONFIG_OMAP_CONTROL_USB=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_DEBUG=y +CONFIG_USB_GADGET_DEBUG_FILES=y +CONFIG_USB_GADGET_DEBUG_FS=y +CONFIG_USB_ZERO=m +CONFIG_USB_ETH=m +CONFIG_USB_ETH_EEM=y +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_G_MULTI=m +CONFIG_USB_G_MULTI_CDC=y +CONFIG_MMC=y +CONFIG_MMC_UNSAFE_RESUME=y +CONFIG_SDIO_UART=y +CONFIG_MMC_OMAP=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_CPU=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_OMAP=y +CONFIG_DMADEVICES=y +CONFIG_TI_EDMA=y +CONFIG_DMA_OMAP=y +CONFIG_STAGING=y +CONFIG_EXT2_FS=y +CONFIG_EXT3_FS=y +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_EXT4_FS=y +CONFIG_QUOTA=y +CONFIG_QFMT_V2=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +# CONFIG_MISC_FILESYSTEMS is not set +CONFIG_NFS_FS=y +CONFIG_ROOT_NFS=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ISO8859_1=y +CONFIG_PRINTK_TIME=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_SCHEDSTATS=y +CONFIG_TIMER_STATS=y +CONFIG_PROVE_LOCKING=y +# CONFIG_DEBUG_BUGVERBOSE is not set +CONFIG_DEBUG_INFO=y +CONFIG_CRYPTO_MANAGER=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_LZO=y +# CONFIG_CRYPTO_ANSI_CPRNG is not set +CONFIG_CRC_CCITT=y +CONFIG_CRC_T10DIF=y +CONFIG_CRC_ITU_T=y +CONFIG_CRC7=y +CONFIG_LIBCRC32C=y +CONFIG_AVERAGE=y diff --git a/board/boundarydevices/nitrogen6x/6x_bootscript b/board/boundarydevices/nitrogen6x/6x_bootscript new file mode 100644 index 0000000000..dc9eea481c Binary files /dev/null and b/board/boundarydevices/nitrogen6x/6x_bootscript differ diff --git a/board/boundarydevices/nitrogen6x/6x_upgrade b/board/boundarydevices/nitrogen6x/6x_upgrade new file mode 100644 index 0000000000..cd26b616b0 Binary files /dev/null and b/board/boundarydevices/nitrogen6x/6x_upgrade differ diff --git a/board/boundarydevices/nitrogen6x/post-build.sh b/board/boundarydevices/nitrogen6x/post-build.sh new file mode 100755 index 0000000000..cc6e66acff --- /dev/null +++ b/board/boundarydevices/nitrogen6x/post-build.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# post-build fixups +# for further details, see +# +# http://boundarydevices.com/u-boot-on-i-mx6/ +# + +BOARD_DIR="$(dirname $0)" + +# bd u-boot looks for bootscript here +cp $BOARD_DIR/6x_bootscript $TARGET_DIR + +# u-boot / update script for bd upgradeu command +if [ -e $BINARIES_DIR/u-boot.imx ]; +then + cp $BINARIES_DIR/u-boot.imx $TARGET_DIR + cp $BOARD_DIR/6x_upgrade $TARGET_DIR +fi diff --git a/board/boundarydevices/nitrogen6x/readme.txt b/board/boundarydevices/nitrogen6x/readme.txt new file mode 100644 index 0000000000..a9ded4929c --- /dev/null +++ b/board/boundarydevices/nitrogen6x/readme.txt @@ -0,0 +1,9 @@ +Buildroot for Boundary Devices Nitrogen6X: + +http://boundarydevices.com/products/nitrogen6x-board-imx6-arm-cortex-a9-sbc/ + +To install, simply extract rootfs.ext2 to first partition of a uSD card: + +sudo dd if=output/images/rootfs.ext2 of=/dev/sdX1 + +Where 'sdX1' is the device node of the uSD partition. diff --git a/board/calao/qil-a9260/at91bootstrap-1.16-qil-a9260.patch b/board/calao/qil-a9260/at91bootstrap-1.16-qil-a9260.patch new file mode 100644 index 0000000000..eb9de2a15e --- /dev/null +++ b/board/calao/qil-a9260/at91bootstrap-1.16-qil-a9260.patch @@ -0,0 +1,603 @@ +From a3e08beea8bf5e96e1237eef4a82f4a2fdd5286b Mon Sep 17 00:00:00 2001 +From: Gregory Hermant +Date: Thu, 19 Jul 2012 14:19:59 +0200 +Subject: [PATCH] Add support for the Calao-systems QIL-A9260 + + +Signed-off-by: Gregory Hermant +--- + board/qil_a9260/nandflash/Makefile | 122 ++++++++++++++ + board/qil_a9260/nandflash/qil-a9260.h | 109 ++++++++++++ + board/qil_a9260/qil_a9260.c | 298 +++++++++++++++++++++++++++++++++ + crt0_gnu.S | 7 + + include/part.h | 6 +- + 5 files changed, 541 insertions(+), 1 deletions(-) + create mode 100644 board/qil_a9260/nandflash/Makefile + create mode 100644 board/qil_a9260/nandflash/qil-a9260.h + create mode 100644 board/qil_a9260/qil_a9260.c + +diff --git a/board/qil_a9260/nandflash/Makefile b/board/qil_a9260/nandflash/Makefile +new file mode 100644 +index 0000000..209a25f +--- /dev/null ++++ b/board/qil_a9260/nandflash/Makefile +@@ -0,0 +1,122 @@ ++# TODO: set this appropriately for your local toolchain ++ifndef ERASE_FCT ++ERASE_FCT=rm -f ++endif ++ifndef CROSS_COMPILE ++CROSS_COMPILE=arm-elf- ++endif ++ ++TOOLCHAIN=gcc ++ ++BOOTSTRAP_PATH=../../.. ++ ++# NandFlashBoot Configuration for QIL-A9260 ++ ++# Target name (case sensitive!!!) ++TARGET=AT91SAM9260 ++# Board name (case sensitive!!!) ++BOARD=qil_a9260 ++# Link Address and Top_of_Memory ++LINK_ADDR=0x200000 ++TOP_OF_MEMORY=0x301000 ++# Name of current directory ++PROJECT=nandflash ++ ++ifndef BOOT_NAME ++BOOT_NAME=$(PROJECT)_$(BOARD) ++endif ++ ++INCL=./$(BOOTSTRAP_PATH)/board/$(BOARD)/$(PROJECT) ++ ++ifeq ($(TOOLCHAIN), gcc) ++ ++AS=$(CROSS_COMPILE)gcc ++CC=$(CROSS_COMPILE)gcc ++LD=$(CROSS_COMPILE)gcc ++NM= $(CROSS_COMPILE)nm ++SIZE=$(CROSS_COMPILE)size ++OBJCOPY=$(CROSS_COMPILE)objcopy ++OBJDUMP=$(CROSS_COMPILE)objdump ++CCFLAGS=-g -mcpu=arm926ej-s -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) ++ASFLAGS=-g -mcpu=arm926ej-s -c -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY) ++ ++# Linker flags. ++# -Wl,...: tell GCC to pass this to linker. ++# -Map: create map file ++# --cref: add cross reference to map file ++LDFLAGS+=-nostartfiles -nostdlib -Wl,-Map=$(BOOT_NAME).map,--cref ++LDFLAGS+=-T $(BOOTSTRAP_PATH)/elf32-littlearm.lds -Ttext $(LINK_ADDR) ++OBJS=crt0_gnu.o ++ ++endif ++ ++OBJS+=\ ++ $(BOARD).o \ ++ main.o \ ++ gpio.o \ ++ pmc.o \ ++ debug.o \ ++ sdramc.o \ ++ nandflash.o \ ++ _udivsi3.o \ ++ _umodsi3.o \ ++ div0.o \ ++ udiv.o \ ++ string.o ++ ++ ++rebuild: clean all ++ ++all: $(BOOT_NAME) ++ ++ifeq ($(TOOLCHAIN), gcc) ++$(BOOT_NAME): $(OBJS) ++ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS) ++ $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin ++endif ++ ++ ++$(BOARD).o: $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c -o $(BOARD).o ++ ++main.o: $(BOOTSTRAP_PATH)/main.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/main.c -o main.o ++ ++gpio.o: $(BOOTSTRAP_PATH)/driver/gpio.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/gpio.c -o gpio.o ++ ++pmc.o: $(BOOTSTRAP_PATH)/driver/pmc.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/pmc.c -o pmc.o ++ ++debug.o: $(BOOTSTRAP_PATH)/driver/debug.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/debug.c -o debug.o ++ ++sdramc.o: $(BOOTSTRAP_PATH)/driver/sdramc.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/sdramc.c -o sdramc.o ++ ++dataflash.o: $(BOOTSTRAP_PATH)/driver/dataflash.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/dataflash.c -o dataflash.o ++ ++nandflash.o: $(BOOTSTRAP_PATH)/driver/nandflash.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/nandflash.c -o nandflash.o ++ ++crt0_gnu.o: $(BOOTSTRAP_PATH)/crt0_gnu.S ++ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/crt0_gnu.S -o crt0_gnu.o ++ ++div0.o: $(BOOTSTRAP_PATH)/lib/div0.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/div0.c -o div0.o ++ ++string.o: $(BOOTSTRAP_PATH)/lib/string.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/string.c -o string.o ++ ++udiv.o: $(BOOTSTRAP_PATH)/lib/udiv.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/udiv.c -o udiv.o ++ ++_udivsi3.o: $(BOOTSTRAP_PATH)/lib/_udivsi3.S ++ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/lib/_udivsi3.S -o _udivsi3.o ++ ++_umodsi3.o: $(BOOTSTRAP_PATH)/lib/_umodsi3.S ++ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/lib/_umodsi3.S -o _umodsi3.o ++ ++clean: ++ $(ERASE_FCT) *.o *.bin *.elf *.map +diff --git a/board/qil_a9260/nandflash/qil-a9260.h b/board/qil_a9260/nandflash/qil-a9260.h +new file mode 100644 +index 0000000..c87002e +--- /dev/null ++++ b/board/qil_a9260/nandflash/qil-a9260.h +@@ -0,0 +1,109 @@ ++/* ---------------------------------------------------------------------------- ++ * ATMEL Microcontroller Software Support - ROUSSET - ++ * ---------------------------------------------------------------------------- ++ * Copyright (c) 2006, Atmel Corporation ++ ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the disclaimer below. ++ * ++ * Atmel's name may not be used to endorse or promote products derived from ++ * this software without specific prior written permission. ++ * ++ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR ++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE ++ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, ++ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ++ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ++ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ++ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ---------------------------------------------------------------------------- ++ * File Name : qil-a9260.h ++ * Object : ++ * Creation : GH July 19th 2012 ++ *----------------------------------------------------------------------------- ++ */ ++#ifndef _QIL_A9260_H ++#define _QIL_A9260_H ++ ++/* ******************************************************************* */ ++/* PMC Settings */ ++/* */ ++/* The main oscillator is enabled as soon as possible in the c_startup */ ++/* and MCK is switched on the main oscillator. */ ++/* PLL initialization is done later in the hw_init() function */ ++/* ******************************************************************* */ ++#define MASTER_CLOCK (180000000/2) ++#define PLL_LOCK_TIMEOUT 1000000 ++ ++#define PLLA_SETTINGS 0x20593F06 ++#define PLLB_SETTINGS 0x10483F0E ++ ++/* Switch MCK on PLLA output PCK = PLLA = 2 * MCK */ ++#define MCKR_SETTINGS (AT91C_PMC_PRES_CLK | AT91C_PMC_MDIV_2) ++#define MCKR_CSS_SETTINGS (AT91C_PMC_CSS_PLLA_CLK | MCKR_SETTINGS) ++ ++/* ******************************************************************* */ ++/* NandFlash Settings */ ++/* */ ++/* ******************************************************************* */ ++#define AT91C_SMARTMEDIA_BASE 0x40000000 ++ ++#define AT91_SMART_MEDIA_ALE (1 << 21) /* our ALE is AD21 */ ++#define AT91_SMART_MEDIA_CLE (1 << 22) /* our CLE is AD22 */ ++ ++#define NAND_DISABLE_CE() do { *(volatile unsigned int *)AT91C_PIOC_SODR = AT91C_PIO_PC14;} while(0) ++#define NAND_ENABLE_CE() do { *(volatile unsigned int *)AT91C_PIOC_CODR = AT91C_PIO_PC14;} while(0) ++ ++#define NAND_WAIT_READY() while (!(*(volatile unsigned int *)AT91C_PIOC_PDSR & AT91C_PIO_PC13)) ++ ++ ++/* ******************************************************************** */ ++/* SMC Chip Select 3 Timings for NandFlash for MASTER_CLOCK = 90000000.*/ ++/* Please refer to SMC section in AT91SAM datasheet to learn how */ ++/* to generate these values. */ ++/* ******************************************************************** */ ++#define AT91C_SM_NWE_SETUP (1 << 0) ++#define AT91C_SM_NCS_WR_SETUP (0 << 8) ++#define AT91C_SM_NRD_SETUP (1 << 16) ++#define AT91C_SM_NCS_RD_SETUP (0 << 24) ++ ++#define AT91C_SM_NWE_PULSE (3 << 0) ++#define AT91C_SM_NCS_WR_PULSE (3 << 8) ++#define AT91C_SM_NRD_PULSE (3 << 16) ++#define AT91C_SM_NCS_RD_PULSE (3 << 24) ++ ++#define AT91C_SM_NWE_CYCLE (5 << 0) ++#define AT91C_SM_NRD_CYCLE (5 << 16) ++#define AT91C_SM_TDF (2 << 16) ++ ++/* ******************************************************************* */ ++/* BootStrap Settings */ ++/* */ ++/* ******************************************************************* */ ++#define IMG_ADDRESS 0x20000 /* Image Address in NandFlash */ ++#define IMG_SIZE 0x40000 /* Image Size in NandFlash */ ++ ++#define MACH_TYPE 0x6AF /* QIL-A9260 */ ++#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ ++ ++/* ******************************************************************* */ ++/* Application Settings */ ++/* ******************************************************************* */ ++#undef CFG_DEBUG ++#undef CFG_DATAFLASH ++ ++#define CFG_NANDFLASH ++#undef NANDFLASH_SMALL_BLOCKS /* NANDFLASH_LARGE_BLOCKS used instead */ ++ ++#define CFG_HW_INIT ++#define CFG_SDRAM ++ ++#endif /* _QIL_A9260_H */ +diff --git a/board/qil_a9260/qil_a9260.c b/board/qil_a9260/qil_a9260.c +new file mode 100644 +index 0000000..ae122e7 +--- /dev/null ++++ b/board/qil_a9260/qil_a9260.c +@@ -0,0 +1,298 @@ ++/* ---------------------------------------------------------------------------- ++ * ATMEL Microcontroller Software Support - ROUSSET - ++ * ---------------------------------------------------------------------------- ++ * Copyright (c) 2006, Atmel Corporation ++ ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the disclaiimer below. ++ * ++ * Atmel's name may not be used to endorse or promote products derived from ++ * this software without specific prior written permission. ++ * ++ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR ++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE ++ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, ++ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ++ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ++ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ++ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ---------------------------------------------------------------------------- ++ * File Name : qil_a9260.c ++ * Object : ++ * Creation : GH July 19th 2012 ++ *----------------------------------------------------------------------------- ++ */ ++#include "../../include/part.h" ++#include "../../include/gpio.h" ++#include "../../include/pmc.h" ++#include "../../include/debug.h" ++#include "../../include/sdramc.h" ++#include "../../include/main.h" ++#ifdef CFG_NANDFLASH ++#include "../../include/nandflash.h" ++#endif ++#ifdef CFG_DATAFLASH ++#include "../../include/dataflash.h" ++#endif ++ ++static inline unsigned int get_cp15(void) ++{ ++ unsigned int value; ++ __asm__("mrc p15, 0, %0, c1, c0, 0" : "=r" (value)); ++ return value; ++} ++ ++static inline void set_cp15(unsigned int value) ++{ ++ __asm__("mcr p15, 0, %0, c1, c0, 0" : : "r" (value)); ++} ++ ++#ifdef CFG_HW_INIT ++/*----------------------------------------------------------------------------*/ ++/* \fn hw_init */ ++/* \brief This function performs very low level HW initialization */ ++/* This function is invoked as soon as possible during the c_startup */ ++/* The bss segment must be initialized */ ++/*----------------------------------------------------------------------------*/ ++void hw_init(void) ++{ ++ unsigned int cp15; ++ ++ /* Configure PIOs */ ++ const struct pio_desc hw_pio[] = { ++#ifdef CFG_DEBUG ++ {"RXD", AT91C_PIN_PB(14), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"TXD", AT91C_PIN_PB(15), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++#endif ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++ ++ /* Disable watchdog */ ++ writel(AT91C_WDTC_WDDIS, AT91C_BASE_WDTC + WDTC_WDMR); ++ ++ /* At this stage the main oscillator is supposed to be enabled ++ * PCK = MCK = MOSC */ ++ ++ /* Configure PLLA = MOSC * (PLL_MULA + 1) / PLL_DIVA */ ++ pmc_cfg_plla(PLLA_SETTINGS, PLL_LOCK_TIMEOUT); ++ ++ /* PCK = PLLA = 2 * MCK */ ++ pmc_cfg_mck(MCKR_SETTINGS, PLL_LOCK_TIMEOUT); ++ /* Switch MCK on PLLA output */ ++ pmc_cfg_mck(MCKR_CSS_SETTINGS, PLL_LOCK_TIMEOUT); ++ ++ /* Configure PLLB */ ++ pmc_cfg_pllb(PLLB_SETTINGS, PLL_LOCK_TIMEOUT); ++ ++ /* Configure CP15 */ ++ cp15 = get_cp15(); ++ cp15 |= I_CACHE; ++ set_cp15(cp15); ++ ++ /* Configure the PIO controller */ ++ pio_setup(hw_pio); ++ ++ /* Configure the EBI Slave Slot Cycle to 64 */ ++ writel( (readl((AT91C_BASE_MATRIX + MATRIX_SCFG3)) & ~0xFF) | 0x40, (AT91C_BASE_MATRIX + MATRIX_SCFG3)); ++ ++#ifdef CFG_DEBUG ++ /* Enable Debug messages on the DBGU */ ++ dbg_init(BAUDRATE(MASTER_CLOCK, 115200)); ++ ++ dbg_print("Start AT91Bootstrap...\n\r"); ++#endif /* CFG_DEBUG */ ++ ++#ifdef CFG_SDRAM ++ /* Initialize the matrix */ ++ writel(readl(AT91C_BASE_CCFG + CCFG_EBICSA) | AT91C_EBI_CS1A_SDRAMC, AT91C_BASE_CCFG + CCFG_EBICSA); ++ ++ /* Configure SDRAM Controller */ ++ sdram_init( AT91C_SDRAMC_NC_9 | ++ AT91C_SDRAMC_NR_13 | ++ AT91C_SDRAMC_CAS_2 | ++ AT91C_SDRAMC_NB_4_BANKS | ++ AT91C_SDRAMC_DBW_32_BITS | ++ AT91C_SDRAMC_TWR_2 | ++ AT91C_SDRAMC_TRC_7 | ++ AT91C_SDRAMC_TRP_2 | ++ AT91C_SDRAMC_TRCD_2 | ++ AT91C_SDRAMC_TRAS_5 | ++ AT91C_SDRAMC_TXSR_8, /* Control Register */ ++ (MASTER_CLOCK * 7)/1000000, /* Refresh Timer Register */ ++ AT91C_SDRAMC_MD_SDRAM); /* SDRAM (no low power) */ ++ ++ ++#endif /* CFG_SDRAM */ ++} ++#endif /* CFG_HW_INIT */ ++ ++#ifdef CFG_SDRAM ++/*------------------------------------------------------------------------------*/ ++/* \fn sdramc_hw_init */ ++/* \brief This function performs SDRAMC HW initialization */ ++/*------------------------------------------------------------------------------*/ ++void sdramc_hw_init(void) ++{ ++ /* Configure PIOs */ ++/* const struct pio_desc sdramc_pio[] = { ++ {"D16", AT91C_PIN_PC(16), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D17", AT91C_PIN_PC(17), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D18", AT91C_PIN_PC(18), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D19", AT91C_PIN_PC(19), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D20", AT91C_PIN_PC(20), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D21", AT91C_PIN_PC(21), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D22", AT91C_PIN_PC(22), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D23", AT91C_PIN_PC(23), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D24", AT91C_PIN_PC(24), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D25", AT91C_PIN_PC(25), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D26", AT91C_PIN_PC(26), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D27", AT91C_PIN_PC(27), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D28", AT91C_PIN_PC(28), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D29", AT91C_PIN_PC(29), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D30", AT91C_PIN_PC(30), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D31", AT91C_PIN_PC(31), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++*/ ++ /* Configure the SDRAMC PIO controller to output PCK0 */ ++/* pio_setup(sdramc_pio); */ ++ ++ writel(0xFFFF0000, AT91C_BASE_PIOC + PIO_ASR(0)); ++ writel(0xFFFF0000, AT91C_BASE_PIOC + PIO_PDR(0)); ++ ++} ++#endif /* CFG_SDRAM */ ++ ++#ifdef CFG_DATAFLASH ++ ++/*------------------------------------------------------------------------------*/ ++/* \fn df_recovery */ ++/* \brief This function erases DataFlash Page 0 if USR PB is pressed */ ++/* during boot sequence */ ++/*------------------------------------------------------------------------------*/ ++void df_recovery(AT91PS_DF pDf) ++{ ++#if (AT91C_SPI_PCS_DATAFLASH == AT91C_SPI_PCS0_DATAFLASH) ++ /* Configure PIOs */ ++ const struct pio_desc usrpb_pio[] = { ++ {"USRPB", AT91C_PIN_PB(10), 0, PIO_PULLUP, PIO_INPUT}, ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++ ++ /* Configure the PIO controller */ ++ writel((1 << AT91C_ID_PIOB), PMC_PCER + AT91C_BASE_PMC); ++ pio_setup(usrpb_pio); ++ ++ /* If USR PB is pressed during Boot sequence */ ++ /* Erase DataFlash Page 0*/ ++ if ( !pio_get_value(AT91C_PIN_PB(10)) ) ++ df_page_erase(pDf, 0); ++#endif ++} ++ ++/*------------------------------------------------------------------------------*/ ++/* \fn df_hw_init */ ++/* \brief This function performs DataFlash HW initialization */ ++/*------------------------------------------------------------------------------*/ ++void df_hw_init(void) ++{ ++ /* Configure PIOs */ ++ const struct pio_desc df_pio[] = { ++ {"MISO", AT91C_PIN_PA(0), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"MOSI", AT91C_PIN_PA(1), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"SPCK", AT91C_PIN_PA(2), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++#if (AT91C_SPI_PCS_DATAFLASH == AT91C_SPI_PCS0_DATAFLASH) ++ {"NPCS0", AT91C_PIN_PA(3), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++#endif ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++ ++ /* Configure the PIO controller */ ++ pio_setup(df_pio); ++} ++#endif /* CFG_DATAFLASH */ ++ ++ ++ ++#ifdef CFG_NANDFLASH ++/*------------------------------------------------------------------------------*/ ++/* \fn nand_recovery */ ++/* \brief This function erases NandFlash Block 0 if USR PB is pressed */ ++/* during boot sequence */ ++/*------------------------------------------------------------------------------*/ ++static void nand_recovery(void) ++{ ++ /* Configure PIOs */ ++ const struct pio_desc usrpb_pio[] = { ++ {"USRPB", AT91C_PIN_PB(10), 0, PIO_PULLUP, PIO_INPUT}, ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++ ++ /* Configure the PIO controller */ ++ writel((1 << AT91C_ID_PIOB), PMC_PCER + AT91C_BASE_PMC); ++ pio_setup(usrpb_pio); ++ ++ /* If USR PB is pressed during Boot sequence */ ++ /* Erase NandFlash block 0*/ ++ if (!pio_get_value(AT91C_PIN_PB(10)) ) ++ AT91F_NandEraseBlock0(); ++} ++ ++/*------------------------------------------------------------------------------*/ ++/* \fn nandflash_hw_init */ ++/* \brief NandFlash HW init */ ++/*------------------------------------------------------------------------------*/ ++void nandflash_hw_init(void) ++{ ++ /* Configure PIOs */ ++ const struct pio_desc nand_pio[] = { ++ {"RDY_BSY", AT91C_PIN_PC(13), 0, PIO_PULLUP, PIO_INPUT}, ++ {"NANDCS", AT91C_PIN_PC(14), 0, PIO_PULLUP, PIO_OUTPUT}, ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++ ++ /* Setup Smart Media, first enable the address range of CS3 in HMATRIX user interface */ ++ writel(readl(AT91C_BASE_CCFG + CCFG_EBICSA) | AT91C_EBI_CS3A_SM, AT91C_BASE_CCFG + CCFG_EBICSA); ++ ++ /* Configure SMC CS3 */ ++ writel((AT91C_SM_NWE_SETUP | AT91C_SM_NCS_WR_SETUP | AT91C_SM_NRD_SETUP | AT91C_SM_NCS_RD_SETUP), AT91C_BASE_SMC + SMC_SETUP3); ++ writel((AT91C_SM_NWE_PULSE | AT91C_SM_NCS_WR_PULSE | AT91C_SM_NRD_PULSE | AT91C_SM_NCS_RD_PULSE), AT91C_BASE_SMC + SMC_PULSE3); ++ writel((AT91C_SM_NWE_CYCLE | AT91C_SM_NRD_CYCLE) , AT91C_BASE_SMC + SMC_CYCLE3); ++ writel((AT91C_SMC_READMODE | AT91C_SMC_WRITEMODE | AT91C_SMC_NWAITM_NWAIT_DISABLE | ++ AT91C_SMC_DBW_WIDTH_SIXTEEN_BITS | AT91C_SM_TDF) , AT91C_BASE_SMC + SMC_CTRL3); ++ ++ /* Configure the PIO controller */ ++ writel((1 << AT91C_ID_PIOC), PMC_PCER + AT91C_BASE_PMC); ++ pio_setup(nand_pio); ++ ++ nand_recovery(); ++} ++ ++/*------------------------------------------------------------------------------*/ ++/* \fn nandflash_cfg_16bits_dbw_init */ ++/* \brief Configure SMC in 16 bits mode */ ++/*------------------------------------------------------------------------------*/ ++void nandflash_cfg_16bits_dbw_init(void) ++{ ++ writel(readl(AT91C_BASE_SMC + SMC_CTRL3) | AT91C_SMC_DBW_WIDTH_SIXTEEN_BITS, AT91C_BASE_SMC + SMC_CTRL3); ++} ++ ++/*------------------------------------------------------------------------------*/ ++/* \fn nandflash_cfg_8bits_dbw_init */ ++/* \brief Configure SMC in 8 bits mode */ ++/*------------------------------------------------------------------------------*/ ++void nandflash_cfg_8bits_dbw_init(void) ++{ ++ writel((readl(AT91C_BASE_SMC + SMC_CTRL3) & ~(AT91C_SMC_DBW)) | AT91C_SMC_DBW_WIDTH_EIGTH_BITS, AT91C_BASE_SMC + SMC_CTRL3); ++} ++ ++ ++#endif /* #ifdef CFG_NANDFLASH */ +diff --git a/crt0_gnu.S b/crt0_gnu.S +index 042b617..002feef 100644 +--- a/crt0_gnu.S ++++ b/crt0_gnu.S +@@ -106,6 +106,13 @@ _relocate_to_sram: + #endif /* CFG_NORFLASH */ + + _setup_clocks: ++/* Test if main osc is bypassed */ ++ ldr r0,=AT91C_PMC_MOR ++ ldr r1, [r0] ++ ldr r2,=AT91C_CKGR_OSCBYPASS ++ ands r1, r1, r2 ++ bne _init_data /* branch if OSCBYPASS=1 */ ++ + /* Test if main oscillator is enabled */ + ldr r0,=AT91C_PMC_SR + ldr r1, [r0] +diff --git a/include/part.h b/include/part.h +index ba5985a..bbd33fe 100644 +--- a/include/part.h ++++ b/include/part.h +@@ -35,7 +35,11 @@ + + #ifdef AT91SAM9260 + #include "AT91SAM9260_inc.h" +-#include "at91sam9260ek.h" ++ #ifdef at91sam9260ek ++ #include "at91sam9260ek.h" ++ #elif qil_a9260 ++ #include "qil-a9260.h" ++ #endif + #endif + + #ifdef AT91SAM9XE +-- +1.5.6.3 + diff --git a/board/calao/qil-a9260/barebox-2012.07.0-qil-a9260.patch b/board/calao/qil-a9260/barebox-2012.07.0-qil-a9260.patch new file mode 100644 index 0000000000..a74e657066 --- /dev/null +++ b/board/calao/qil-a9260/barebox-2012.07.0-qil-a9260.patch @@ -0,0 +1,36 @@ +From d076aa6182dc6df6bb311e60bbddb03573b9483b Mon Sep 17 00:00:00 2001 +From: Gregory Hermant +Date: Fri, 3 Aug 2012 11:25:49 +0200 +Subject: [PATCH] Enable pull-up on Rx serial ports for the CALAO MB-QIL-A9260 + + +Signed-off-by: Gregory Hermant +--- + arch/arm/boards/qil-a9260/init.c | 6 ++++++ + 1 files changed, 6 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/boards/qil-a9260/init.c b/arch/arm/boards/qil-a9260/init.c +index 305d733..b43cace 100644 +--- a/arch/arm/boards/qil-a9260/init.c ++++ b/arch/arm/boards/qil-a9260/init.c +@@ -196,11 +196,17 @@ device_initcall(qil_a9260_devices_init); + static int qil_a9260_console_init(void) + { + at91_register_uart(0, 0); ++ at91_set_A_periph(AT91_PIN_PB14, 1); /* Enable pull-up on DRXD */ ++ + at91_register_uart(1, ATMEL_UART_CTS | ATMEL_UART_RTS + | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD + | ATMEL_UART_RI); ++ + at91_register_uart(2, ATMEL_UART_CTS | ATMEL_UART_RTS); ++ at91_set_A_periph(AT91_PIN_PB7, 1); /* Enable pull-up on RXD1 */ ++ + at91_register_uart(3, ATMEL_UART_CTS | ATMEL_UART_RTS); ++ at91_set_A_periph(AT91_PIN_PB9, 1); /* Enable pull-up on RXD2 */ + + return 0; + } +-- +1.5.6.3 + diff --git a/board/calao/qil-a9260/linux-3.4.7.config b/board/calao/qil-a9260/linux-3.4.7.config new file mode 100644 index 0000000000..105d76006a --- /dev/null +++ b/board/calao/qil-a9260/linux-3.4.7.config @@ -0,0 +1,111 @@ +CONFIG_EXPERIMENTAL=y +# CONFIG_LOCALVERSION_AUTO is not set +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_SLAB=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_ARCH_AT91=y +CONFIG_ARCH_AT91SAM9260=y +CONFIG_MACH_QIL_A9260=y +CONFIG_AT91_SLOW_CLOCK=y +CONFIG_AT91_EARLY_USART0=y +# CONFIG_ARM_THUMB is not set +CONFIG_AEABI=y +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="mem=64M console=ttyS1,115200" +CONFIG_FPE_NWFPE=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_ROUTE_VERBOSE=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_IP_MROUTE=y +CONFIG_IP_PIMSM_V1=y +CONFIG_IP_PIMSM_V2=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_IPV6 is not set +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_DATAFLASH=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_ATMEL=y +CONFIG_MTD_NAND_ATMEL_ECC_SOFT=y +CONFIG_MTD_UBI=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y +CONFIG_SCSI_MULTI_LUN=y +CONFIG_NETDEVICES=y +CONFIG_MII=y +CONFIG_MACB=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_EVDEV=y +CONFIG_INPUT_EVBUG=y +# CONFIG_KEYBOARD_ATKBD is not set +CONFIG_KEYBOARD_GPIO=y +# CONFIG_INPUT_MOUSE is not set +# CONFIG_SERIO is not set +CONFIG_SERIAL_ATMEL=y +CONFIG_SERIAL_ATMEL_CONSOLE=y +CONFIG_HW_RANDOM=y +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y +CONFIG_SPI=y +CONFIG_SPI_ATMEL=y +# CONFIG_HWMON is not set +CONFIG_WATCHDOG=y +CONFIG_WATCHDOG_NOWAYOUT=y +# CONFIG_USB_HID is not set +CONFIG_USB=y +CONFIG_USB_DEVICEFS=y +CONFIG_USB_MON=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_STORAGE=y +CONFIG_USB_GADGET=y +CONFIG_USB_ETH=m +CONFIG_MMC=y +CONFIG_MMC_AT91=m +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_M41T94=y +CONFIG_EXT2_FS=y +CONFIG_FUSE_FS=m +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_JFFS2_FS=y +CONFIG_UBIFS_FS=y +CONFIG_UBIFS_FS_XATTR=y +CONFIG_UBIFS_FS_ADVANCED_COMPR=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_ROOT_NFS=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_850=y +CONFIG_NLS_ISO8859_1=y +CONFIG_DEBUG_KERNEL=y +CONFIG_DEBUG_USER=y +CONFIG_DEBUG_LL=y diff --git a/board/calao/qil-a9260/linux-3.4.7.patch b/board/calao/qil-a9260/linux-3.4.7.patch new file mode 100644 index 0000000000..5d355d23cc --- /dev/null +++ b/board/calao/qil-a9260/linux-3.4.7.patch @@ -0,0 +1,27 @@ +From fe6432a9728b62bce3db73c5a4efe026018fd495 Mon Sep 17 00:00:00 2001 +From: Gregory Hermant +Date: Fri, 3 Aug 2012 16:45:37 +0200 +Subject: [PATCH] QIL-A9260: rtc modalias m41t48 renamed to rtc-m41t48 + + +Signed-off-by: Gregory Hermant +--- + arch/arm/mach-at91/board-qil-a9260.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/mach-at91/board-qil-a9260.c b/arch/arm/mach-at91/board-qil-a9260.c +index bf351e2..c0df05c 100644 +--- a/arch/arm/mach-at91/board-qil-a9260.c ++++ b/arch/arm/mach-at91/board-qil-a9260.c +@@ -78,7 +78,7 @@ static struct at91_udc_data __initdata ek_udc_data = { + static struct spi_board_info ek_spi_devices[] = { + #if defined(CONFIG_RTC_DRV_M41T94) + { /* M41T94 RTC */ +- .modalias = "m41t94", ++ .modalias = "rtc-m41t94", + .chip_select = 0, + .max_speed_hz = 1 * 1000 * 1000, + .bus_num = 0, +-- +1.5.6.3 + diff --git a/board/calao/snowball/linux-3.4.patch b/board/calao/snowball/linux-3.4.patch new file mode 100644 index 0000000000..4e6fb518fb --- /dev/null +++ b/board/calao/snowball/linux-3.4.patch @@ -0,0 +1,45 @@ +From 3d1a9b44b9dcd2c0f5d54c09596c96c0524d8340 Mon Sep 17 00:00:00 2001 +From: Gregory Hermant +Date: Tue, 13 Nov 2012 11:47:41 +0100 +Subject: [PATCH] trace-debug[stm]: Fix for BT/WLAN instability + +Pins under mop500_ske_pins array are used for different +functionalities in snowball. Ex: GPIO161 pin configured +for keypad here must stay configured as GPIO alternate +function for operating PMU_EN pin of BT/WLAN chip in snowball. +So forbid configuring these pins, for snowball + +Signed-off-by: Rajanikanth H.V +Signed-off-by: Gregory Hermant +--- + arch/arm/mach-ux500/board-mop500-stm.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-ux500/board-mop500-stm.c b/arch/arm/mach-ux500/board-mop500-stm.c +index 1bef2a0..532fb9e 100644 +--- a/arch/arm/mach-ux500/board-mop500-stm.c ++++ b/arch/arm/mach-ux500/board-mop500-stm.c +@@ -121,7 +121,9 @@ static int stm_ste_disable_ape_on_mipi60(void) + if (retval) + STM_ERR("Failed to disable MIPI60\n"); + else { +- retval = nmk_config_pins(ARRAY_AND_SIZE(mop500_ske_pins)); ++ if (!machine_is_snowball()) ++ retval = nmk_config_pins( ++ ARRAY_AND_SIZE(mop500_ske_pins)); + if (retval) + STM_ERR("Failed to enable SKE gpio\n"); + } +@@ -314,7 +316,8 @@ static int stm_ste_connection(enum stm_connection_type con_type) + /* Enable altC3 on GPIO70-74 (STMMOD) and GPIO75-76 (UARTMOD) */ + prcmu_enable_stm_mod_uart(); + /* Enable APE on MIPI60 */ +- retval = nmk_config_pins_sleep(ARRAY_AND_SIZE(mop500_ske_pins)); ++ if (!machine_is_snowball()) ++ retval = nmk_config_pins_sleep(ARRAY_AND_SIZE(mop500_ske_pins)); + if (retval) + STM_ERR("Failed to disable SKE GPIO\n"); + else { +-- +1.7.9.5 + diff --git a/board/calao/tny-a9g20-lpw/at91bootstrap-1.16-tny-a9g20-lpw.patch b/board/calao/tny-a9g20-lpw/at91bootstrap-1.16-tny-a9g20-lpw.patch new file mode 100644 index 0000000000..71746ce5ae --- /dev/null +++ b/board/calao/tny-a9g20-lpw/at91bootstrap-1.16-tny-a9g20-lpw.patch @@ -0,0 +1,551 @@ +From 53bd82b122f4530a98cba45795832820bb1d0b45 Mon Sep 17 00:00:00 2001 +From: Gregory Hermant +Date: Mon, 13 Aug 2012 11:26:10 +0200 +Subject: [PATCH] Add support for the Calao-systems TNY-A9G20-LPW + + +Signed-off-by: Gregory Hermant +--- + board/tny_a9g20_lpw/nandflash/Makefile | 121 ++++++++++++ + board/tny_a9g20_lpw/nandflash/tny-a9g20-lpw.h | 114 ++++++++++++ + board/tny_a9g20_lpw/tny_a9g20_lpw.c | 243 +++++++++++++++++++++++++ + crt0_gnu.S | 6 + + include/part.h | 6 +- + 5 files changed, 489 insertions(+), 1 deletion(-) + create mode 100644 board/tny_a9g20_lpw/nandflash/Makefile + create mode 100644 board/tny_a9g20_lpw/nandflash/tny-a9g20-lpw.h + create mode 100644 board/tny_a9g20_lpw/tny_a9g20_lpw.c + +diff --git a/board/tny_a9g20_lpw/nandflash/Makefile b/board/tny_a9g20_lpw/nandflash/Makefile +new file mode 100644 +index 0000000..7efbea7 +--- /dev/null ++++ b/board/tny_a9g20_lpw/nandflash/Makefile +@@ -0,0 +1,121 @@ ++# TODO: set this appropriately for your local toolchain ++ifndef ERASE_FCT ++ERASE_FCT=rm -f ++endif ++ifndef CROSS_COMPILE ++CROSS_COMPILE=arm-elf- ++endif ++ ++TOOLCHAIN=gcc ++ ++BOOTSTRAP_PATH=../../.. ++ ++# NandFlashBoot Configuration for AT91SAM9260EK ++ ++# Target name (case sensitive!!!) ++TARGET=AT91SAM9G20 ++# Board name (case sensitive!!!) ++BOARD=tny_a9g20_lpw ++# Link Address and Top_of_Memory ++LINK_ADDR=0x200000 ++TOP_OF_MEMORY=0x301000 ++# Name of current directory ++PROJECT=nandflash ++ ++ifndef BOOT_NAME ++BOOT_NAME=$(PROJECT)_$(BOARD) ++endif ++ ++INCL=./$(BOOTSTRAP_PATH)/board/$(BOARD)/$(PROJECT) ++ ++ifeq ($(TOOLCHAIN), gcc) ++ ++AS=$(CROSS_COMPILE)gcc ++CC=$(CROSS_COMPILE)gcc ++LD=$(CROSS_COMPILE)gcc ++NM= $(CROSS_COMPILE)nm ++SIZE=$(CROSS_COMPILE)size ++OBJCOPY=$(CROSS_COMPILE)objcopy ++OBJDUMP=$(CROSS_COMPILE)objdump ++CCFLAGS=-g -mcpu=arm926ej-s -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) ++ASFLAGS=-g -mcpu=arm926ej-s -c -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY) ++ ++# Linker flags. ++# -Wl,...: tell GCC to pass this to linker. ++# -Map: create map file ++# --cref: add cross reference to map file ++LDFLAGS+=-nostartfiles -nostdlib -Wl,-Map=$(BOOT_NAME).map,--cref ++LDFLAGS+=-T $(BOOTSTRAP_PATH)/elf32-littlearm.lds -Ttext $(LINK_ADDR) ++OBJS=crt0_gnu.o ++ ++endif ++ ++OBJS+=\ ++ $(BOARD).o \ ++ main.o \ ++ gpio.o \ ++ pmc.o \ ++ debug.o \ ++ sdramc.o \ ++ nandflash.o \ ++ _udivsi3.o \ ++ _umodsi3.o \ ++ div0.o \ ++ udiv.o \ ++ string.o ++ ++rebuild: clean all ++ ++all: $(BOOT_NAME) ++ ++ifeq ($(TOOLCHAIN), gcc) ++$(BOOT_NAME): $(OBJS) ++ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS) ++ $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin ++endif ++ ++ ++$(BOARD).o: $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c -o $(BOARD).o ++ ++main.o: $(BOOTSTRAP_PATH)/main.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/main.c -o main.o ++ ++gpio.o: $(BOOTSTRAP_PATH)/driver/gpio.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/gpio.c -o gpio.o ++ ++pmc.o: $(BOOTSTRAP_PATH)/driver/pmc.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/pmc.c -o pmc.o ++ ++debug.o: $(BOOTSTRAP_PATH)/driver/debug.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/debug.c -o debug.o ++ ++sdramc.o: $(BOOTSTRAP_PATH)/driver/sdramc.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/sdramc.c -o sdramc.o ++ ++dataflash.o: $(BOOTSTRAP_PATH)/driver/dataflash.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/dataflash.c -o dataflash.o ++ ++nandflash.o: $(BOOTSTRAP_PATH)/driver/nandflash.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/nandflash.c -o nandflash.o ++ ++crt0_gnu.o: $(BOOTSTRAP_PATH)/crt0_gnu.S ++ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/crt0_gnu.S -o crt0_gnu.o ++ ++div0.o: $(BOOTSTRAP_PATH)/lib/div0.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/div0.c -o div0.o ++ ++string.o: $(BOOTSTRAP_PATH)/lib/string.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/string.c -o string.o ++ ++udiv.o: $(BOOTSTRAP_PATH)/lib/udiv.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/udiv.c -o udiv.o ++ ++_udivsi3.o: $(BOOTSTRAP_PATH)/lib/_udivsi3.S ++ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/lib/_udivsi3.S -o _udivsi3.o ++ ++_umodsi3.o: $(BOOTSTRAP_PATH)/lib/_umodsi3.S ++ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/lib/_umodsi3.S -o _umodsi3.o ++ ++clean: ++ $(ERASE_FCT) *.o *.bin *.elf *.map +diff --git a/board/tny_a9g20_lpw/nandflash/tny-a9g20-lpw.h b/board/tny_a9g20_lpw/nandflash/tny-a9g20-lpw.h +new file mode 100644 +index 0000000..b1f8a1d +--- /dev/null ++++ b/board/tny_a9g20_lpw/nandflash/tny-a9g20-lpw.h +@@ -0,0 +1,114 @@ ++/* ---------------------------------------------------------------------------- ++ * ATMEL Microcontroller Software Support - ROUSSET - ++ * ---------------------------------------------------------------------------- ++ * Copyright (c) 2008, Atmel Corporation ++ ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the disclaimer below. ++ * ++ * Atmel's name may not be used to endorse or promote products derived from ++ * this software without specific prior written permission. ++ * ++ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR ++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE ++ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, ++ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ++ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ++ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ++ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ---------------------------------------------------------------------------- ++ * File Name : tny-a9g20-lpw.h ++ * Object : ++ * Creation : GH August 13th 2012 ++ *----------------------------------------------------------------------------- ++ */ ++#ifndef _TNY_A9G20_LPW_H ++#define _TNY_A9G20_LPW_H ++ ++/* ******************************************************************* */ ++/* PMC Settings */ ++/* */ ++/* The main oscillator is enabled as soon as possible in the c_startup */ ++/* and MCK is switched on the main oscillator. */ ++/* PLL initialization is done later in the hw_init() function */ ++/* ******************************************************************* */ ++#define MASTER_CLOCK (100000000) ++#define PLL_LOCK_TIMEOUT 1000000 ++ ++/* set PLLA to 800Mhz from MAINCK= 12Mhz MULA=199 (0xC7+1= 200), DIVA=0x03 (Fplla=12Mhz x [(199+1)/3]=800Mhz) */ ++#define PLLA_SETTINGS 0x20C73F03 ++#define PLLB_SETTINGS 0x100F3F02 ++ ++/* Switch MCK on PLLA output PCK = PLLA/2 = 3 * MCK */ ++/* LP-SDRAM (fmax=100Mhz) PDIV=0 => PRESCALER CLK=PCLK; */ ++/* MDIV = 2 => PRESCALER CLK / 4 = MCLK=100Mhz */ ++/* PRESCALER CLK = PLLA (800Mhz) / 2 (PRES=1) = 400Mhz */ ++#define MCKR_SETTINGS 0x0204 ++#define MCKR_CSS_SETTINGS (AT91C_PMC_CSS_PLLA_CLK | MCKR_SETTINGS) ++ ++/* ******************************************************************* */ ++/* NandFlash Settings */ ++/* */ ++/* ******************************************************************* */ ++#define AT91C_SMARTMEDIA_BASE 0x40000000 ++ ++#define AT91_SMART_MEDIA_ALE (1 << 21) /* our ALE is AD21 */ ++#define AT91_SMART_MEDIA_CLE (1 << 22) /* our CLE is AD22 */ ++ ++#define NAND_DISABLE_CE() do { *(volatile unsigned int *)AT91C_PIOC_SODR = AT91C_PIO_PC14;} while(0) ++#define NAND_ENABLE_CE() do { *(volatile unsigned int *)AT91C_PIOC_CODR = AT91C_PIO_PC14;} while(0) ++ ++#define NAND_WAIT_READY() while (!(*(volatile unsigned int *)AT91C_PIOC_PDSR & AT91C_PIO_PC13)) ++ ++ ++/* ******************************************************************** */ ++/* SMC Chip Select 3 Timings for NandFlash for MASTER_CLOCK = 100000000.*/ ++/* Please refer to SMC section in AT91SAM9 datasheet to learn how */ ++/* to generate these values. */ ++/* ******************************************************************** */ ++#define AT91C_SM_NWE_SETUP (1 << 0) ++#define AT91C_SM_NCS_WR_SETUP (0 << 8) ++#define AT91C_SM_NRD_SETUP (1 << 16) ++#define AT91C_SM_NCS_RD_SETUP (0 << 24) ++ ++#define AT91C_SM_NWE_PULSE (3 << 0) ++#define AT91C_SM_NCS_WR_PULSE (3 << 8) ++#define AT91C_SM_NRD_PULSE (3 << 16) ++#define AT91C_SM_NCS_RD_PULSE (3 << 24) ++ ++#define AT91C_SM_NWE_CYCLE (5 << 0) ++#define AT91C_SM_NRD_CYCLE (5 << 16) ++ ++#define AT91C_SM_TDF (2 << 16) ++ ++/* ******************************************************************* */ ++/* BootStrap Settings */ ++/* */ ++/* ******************************************************************* */ ++#define IMG_ADDRESS 0x20000 /* Image Address in NandFlash */ ++#define IMG_SIZE 0x40000 /* Image Size in NandFlash */ ++ ++#define MACH_TYPE 0x80B /* TNY-A9G20 */ ++#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ ++ ++/* ******************************************************************* */ ++/* Application Settings */ ++/* ******************************************************************* */ ++#undef CFG_DEBUG ++#undef CFG_DATAFLASH ++ ++#define CFG_NANDFLASH ++#undef NANDFLASH_SMALL_BLOCKS /* NANDFLASH_LARGE_BLOCKS used instead */ ++ ++#define CFG_SDRAM ++#define CFG_HW_INIT ++ ++#endif /* _TNY_A9G20_LPW_H */ +diff --git a/board/tny_a9g20_lpw/tny_a9g20_lpw.c b/board/tny_a9g20_lpw/tny_a9g20_lpw.c +new file mode 100644 +index 0000000..cef9055 +--- /dev/null ++++ b/board/tny_a9g20_lpw/tny_a9g20_lpw.c +@@ -0,0 +1,243 @@ ++/* ---------------------------------------------------------------------------- ++ * ATMEL Microcontroller Software Support - ROUSSET - ++ * ---------------------------------------------------------------------------- ++ * Copyright (c) 2008, Atmel Corporation ++ ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the disclaimer below. ++ * ++ * Atmel's name may not be used to endorse or promote products derived from ++ * this software without specific prior written permission. ++ * ++ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR ++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE ++ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, ++ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ++ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ++ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ++ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ---------------------------------------------------------------------------- ++ * File Name : tny_a9g20_lpw.c ++ * Object : ++ * Creation : GH August 13th 2012 ++ *----------------------------------------------------------------------------- ++ */ ++#include "../../include/part.h" ++#include "../../include/gpio.h" ++#include "../../include/pmc.h" ++#include "../../include/debug.h" ++#include "../../include/sdramc.h" ++#include "../../include/main.h" ++#ifdef CFG_NANDFLASH ++#include "../../include/nandflash.h" ++#endif ++ ++static inline unsigned int get_cp15(void) ++{ ++ unsigned int value; ++ __asm__("mrc p15, 0, %0, c1, c0, 0" : "=r" (value)); ++ return value; ++} ++ ++static inline void set_cp15(unsigned int value) ++{ ++ __asm__("mcr p15, 0, %0, c1, c0, 0" : : "r" (value)); ++} ++ ++#ifdef CFG_HW_INIT ++/*----------------------------------------------------------------------------*/ ++/* \fn hw_init */ ++/* \brief This function performs very low level HW initialization */ ++/* This function is invoked as soon as possible during the c_startup */ ++/* The bss segment must be initialized */ ++/*----------------------------------------------------------------------------*/ ++void hw_init(void) ++{ ++ unsigned int cp15; ++ ++ /* Configure PIOs */ ++ const struct pio_desc hw_pio[] = { ++#ifdef CFG_DEBUG ++ {"RXD", AT91C_PIN_PB(14), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"TXD", AT91C_PIN_PB(15), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++#endif ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++ ++ /* Disable watchdog */ ++ writel(AT91C_WDTC_WDDIS, AT91C_BASE_WDTC + WDTC_WDMR); ++ ++ /* At this stage the main oscillator is supposed to be enabled ++ * PCK = MCK = MOSC */ ++ writel(0x00, AT91C_BASE_PMC + PMC_PLLICPR); ++ ++ /* Configure PLLA = MOSC * (PLL_MULA + 1) / PLL_DIVA */ ++ pmc_cfg_plla(PLLA_SETTINGS, PLL_LOCK_TIMEOUT); ++ ++ /* PCK = PLLA/2 = 3 * MCK */ ++ pmc_cfg_mck(MCKR_SETTINGS, PLL_LOCK_TIMEOUT); ++ /* Switch MCK on PLLA output */ ++ pmc_cfg_mck(MCKR_CSS_SETTINGS, PLL_LOCK_TIMEOUT); ++ ++ /* Configure PLLB */ ++ pmc_cfg_pllb(PLLB_SETTINGS, PLL_LOCK_TIMEOUT); ++ ++ /* Configure CP15 */ ++ cp15 = get_cp15(); ++ cp15 |= I_CACHE; ++ set_cp15(cp15); ++ ++ /* Configure the PIO controller */ ++ pio_setup(hw_pio); ++ ++ /* Configure the EBI Slave Slot Cycle to 64 */ ++ writel((readl((AT91C_BASE_MATRIX + MATRIX_SCFG3)) & ~0xFF) | 0x40, (AT91C_BASE_MATRIX + MATRIX_SCFG3)); ++ ++#ifdef CFG_DEBUG ++ /* Enable Debug messages on the DBGU */ ++ dbg_init(BAUDRATE(MASTER_CLOCK, 115200)); ++ ++ dbg_print("Start AT91Bootstrap...\n\r"); ++#endif /* CFG_DEBUG */ ++ ++#ifdef CFG_SDRAM ++ /* Initialize the matrix (slow slew rate enabled and LPSDRAM memory voltage = 1.8V) */ ++ writel(((readl(AT91C_BASE_CCFG + CCFG_EBICSA)) | AT91C_EBI_CS1A_SDRAMC | (1<<17)) & ~0x00010000, AT91C_BASE_CCFG + CCFG_EBICSA); ++ ++ /* Configure SDRAM Controller */ ++ sdram_init( AT91C_SDRAMC_NC_9 | ++ AT91C_SDRAMC_NR_13 | ++ AT91C_SDRAMC_CAS_3 | ++ AT91C_SDRAMC_NB_4_BANKS | ++ AT91C_SDRAMC_DBW_32_BITS | ++ AT91C_SDRAMC_TWR_2 | ++ AT91C_SDRAMC_TRC_7 | ++ AT91C_SDRAMC_TRP_2 | ++ AT91C_SDRAMC_TRCD_2 | ++ AT91C_SDRAMC_TRAS_5 | ++ AT91C_SDRAMC_TXSR_8, /* Control Register */ ++ (MASTER_CLOCK * 7)/1000000, /* Refresh Timer Register */ ++ AT91C_SDRAMC_MD_LOW_POWER_SDRAM); /* SDRAM (low power) */ ++ ++#endif /* CFG_SDRAM */ ++} ++#endif /* CFG_HW_INIT */ ++ ++#ifdef CFG_SDRAM ++/*------------------------------------------------------------------------------*/ ++/* \fn sdramc_hw_init */ ++/* \brief This function performs SDRAMC HW initialization */ ++/*------------------------------------------------------------------------------*/ ++void sdramc_hw_init(void) ++{ ++ /* Configure PIOs */ ++/* const struct pio_desc sdramc_pio[] = { ++ {"D16", AT91C_PIN_PC(16), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D17", AT91C_PIN_PC(17), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D18", AT91C_PIN_PC(18), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D19", AT91C_PIN_PC(19), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D20", AT91C_PIN_PC(20), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D21", AT91C_PIN_PC(21), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D22", AT91C_PIN_PC(22), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D23", AT91C_PIN_PC(23), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D24", AT91C_PIN_PC(24), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D25", AT91C_PIN_PC(25), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D26", AT91C_PIN_PC(26), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D27", AT91C_PIN_PC(27), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D28", AT91C_PIN_PC(28), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D29", AT91C_PIN_PC(29), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D30", AT91C_PIN_PC(30), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D31", AT91C_PIN_PC(31), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++*/ ++ /* Configure the SDRAMC PIO controller to output PCK0 */ ++/* pio_setup(sdramc_pio); */ ++ ++ writel(0xFFFF0000, AT91C_BASE_PIOC + PIO_ASR(0)); ++ writel(0xFFFF0000, AT91C_BASE_PIOC + PIO_PDR(0)); ++ ++} ++#endif /* CFG_SDRAM */ ++ ++#ifdef CFG_NANDFLASH ++/*------------------------------------------------------------------------------*/ ++/* \fn nand_recovery */ ++/* \brief This function erases NandFlash Block 0 if BP4 is pressed */ ++/* during boot sequence */ ++/*------------------------------------------------------------------------------*/ ++static void nand_recovery(void) ++{ ++ /* Configure PIOs */ ++ const struct pio_desc bp4_pio[] = { ++ {"BP4", AT91C_PIN_PA(31), 0, PIO_PULLUP, PIO_INPUT}, ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++ ++ /* Configure the PIO controller */ ++ writel((1 << AT91C_ID_PIOA), PMC_PCER + AT91C_BASE_PMC); ++ pio_setup(bp4_pio); ++ ++ /* If BP4 is pressed during Boot sequence */ ++ /* Erase NandFlash block 0*/ ++ if (!pio_get_value(AT91C_PIN_PA(31)) ) ++ AT91F_NandEraseBlock0(); ++} ++ ++/*------------------------------------------------------------------------------*/ ++/* \fn nandflash_hw_init */ ++/* \brief NandFlash HW init */ ++/*------------------------------------------------------------------------------*/ ++void nandflash_hw_init(void) ++{ ++ /* Configure PIOs */ ++ const struct pio_desc nand_pio[] = { ++ {"RDY_BSY", AT91C_PIN_PC(13), 0, PIO_PULLUP, PIO_INPUT}, ++ {"NANDCS", AT91C_PIN_PC(14), 0, PIO_PULLUP, PIO_OUTPUT}, ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++ ++ /* Setup Smart Media, first enable the address range of CS3 in HMATRIX user interface */ ++ writel(readl(AT91C_BASE_CCFG + CCFG_EBICSA) | AT91C_EBI_CS3A_SM, AT91C_BASE_CCFG + CCFG_EBICSA); ++ ++ /* Configure SMC CS3 */ ++ writel((AT91C_SM_NWE_SETUP | AT91C_SM_NCS_WR_SETUP | AT91C_SM_NRD_SETUP | AT91C_SM_NCS_RD_SETUP), AT91C_BASE_SMC + SMC_SETUP3); ++ writel((AT91C_SM_NWE_PULSE | AT91C_SM_NCS_WR_PULSE | AT91C_SM_NRD_PULSE | AT91C_SM_NCS_RD_PULSE), AT91C_BASE_SMC + SMC_PULSE3); ++ writel((AT91C_SM_NWE_CYCLE | AT91C_SM_NRD_CYCLE) , AT91C_BASE_SMC + SMC_CYCLE3); ++ writel((AT91C_SMC_READMODE | AT91C_SMC_WRITEMODE | AT91C_SMC_NWAITM_NWAIT_DISABLE | ++ AT91C_SMC_DBW_WIDTH_SIXTEEN_BITS | AT91C_SM_TDF) , AT91C_BASE_SMC + SMC_CTRL3); ++ ++ /* Configure the PIO controller */ ++ writel((1 << AT91C_ID_PIOC), PMC_PCER + AT91C_BASE_PMC); ++ pio_setup(nand_pio); ++ ++ nand_recovery(); ++} ++ ++/*------------------------------------------------------------------------------*/ ++/* \fn nandflash_cfg_16bits_dbw_init */ ++/* \brief Configure SMC in 16 bits mode */ ++/*------------------------------------------------------------------------------*/ ++void nandflash_cfg_16bits_dbw_init(void) ++{ ++ writel(readl(AT91C_BASE_SMC + SMC_CTRL3) | AT91C_SMC_DBW_WIDTH_SIXTEEN_BITS, AT91C_BASE_SMC + SMC_CTRL3); ++} ++ ++/*------------------------------------------------------------------------------*/ ++/* \fn nandflash_cfg_8bits_dbw_init */ ++/* \brief Configure SMC in 8 bits mode */ ++/*------------------------------------------------------------------------------*/ ++void nandflash_cfg_8bits_dbw_init(void) ++{ ++ writel((readl(AT91C_BASE_SMC + SMC_CTRL3) & ~(AT91C_SMC_DBW)) | AT91C_SMC_DBW_WIDTH_EIGTH_BITS, AT91C_BASE_SMC + SMC_CTRL3); ++} ++ ++#endif /* #ifdef CFG_NANDFLASH */ +diff --git a/crt0_gnu.S b/crt0_gnu.S +index 042b617..c6cd49d 100644 +--- a/crt0_gnu.S ++++ b/crt0_gnu.S +@@ -106,6 +106,12 @@ _relocate_to_sram: + #endif /* CFG_NORFLASH */ + + _setup_clocks: ++/* Test if main osc is bypassed */ ++ ldr r0,=AT91C_PMC_MOR ++ ldr r1, [r0] ++ ldr r2,=AT91C_CKGR_OSCBYPASS ++ ands r1, r1, r2 ++ bne _init_data /* branch if OSCBYPASS=1 */ + /* Test if main oscillator is enabled */ + ldr r0,=AT91C_PMC_SR + ldr r1, [r0] +diff --git a/include/part.h b/include/part.h +index ba5985a..ab79af1 100644 +--- a/include/part.h ++++ b/include/part.h +@@ -46,7 +46,11 @@ + + #ifdef AT91SAM9G20 + #include "AT91SAM9260_inc.h" +-#include "at91sam9g20ek.h" ++ #ifdef at91sam9g20ek ++ #include "at91sam9g20ek.h" ++ #elif tny_a9g20_lpw ++ #include "tny-a9g20-lpw.h" ++ #endif + #endif + + #ifdef AT91SAM9261 +-- +1.7.9.5 + diff --git a/board/calao/tny-a9g20-lpw/linux-3.9.config b/board/calao/tny-a9g20-lpw/linux-3.9.config new file mode 100644 index 0000000000..797c15a4dd --- /dev/null +++ b/board/calao/tny-a9g20-lpw/linux-3.9.config @@ -0,0 +1,187 @@ +# CONFIG_LOCALVERSION_AUTO is not set +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_BLK_DEV_INITRD=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_KALLSYMS_ALL=y +CONFIG_EMBEDDED=y +CONFIG_SLAB=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_LBDAF is not set +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_ARCH_AT91=y +CONFIG_SOC_AT91SAM9260=y +CONFIG_SOC_AT91SAM9263=y +CONFIG_SOC_AT91SAM9G45=y +CONFIG_SOC_AT91SAM9X5=y +CONFIG_SOC_AT91SAM9N12=y +CONFIG_MACH_AT91SAM_DT=y +CONFIG_AT91_PROGRAMMABLE_CLOCKS=y +CONFIG_AT91_TIMER_HZ=128 +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +CONFIG_UACCESS_WITH_MEMCPY=y +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ARM_APPENDED_DTB=y +CONFIG_ARM_ATAG_DTB_COMPAT=y +CONFIG_CMDLINE="console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw" +CONFIG_KEXEC=y +CONFIG_AUTO_ZRELADDR=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_PNP=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_DIAG is not set +CONFIG_IPV6=y +# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET6_XFRM_MODE_TUNNEL is not set +# CONFIG_INET6_XFRM_MODE_BEET is not set +CONFIG_IPV6_SIT_6RD=y +# CONFIG_WIRELESS is not set +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +# CONFIG_STANDALONE is not set +# CONFIG_PREVENT_FIRMWARE_BUILD is not set +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_ATMEL=y +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_GLUEBI=y +CONFIG_PROC_DEVICETREE=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=4 +CONFIG_BLK_DEV_RAM_SIZE=8192 +CONFIG_ATMEL_PWM=y +CONFIG_ATMEL_TCLIB=y +CONFIG_EEPROM_93CX6=m +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_LOWLEVEL is not set +CONFIG_NETDEVICES=y +CONFIG_MII=y +CONFIG_MACB=y +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +CONFIG_DAVICOM_PHY=y +CONFIG_MICREL_PHY=y +# CONFIG_WLAN is not set +CONFIG_INPUT_POLLDEV=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_MOUSEDEV_SCREEN_X=480 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=272 +CONFIG_INPUT_JOYDEV=y +CONFIG_INPUT_EVDEV=y +# CONFIG_KEYBOARD_ATKBD is not set +CONFIG_KEYBOARD_GPIO=y +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_SERIO is not set +CONFIG_LEGACY_PTY_COUNT=4 +CONFIG_SERIAL_ATMEL=y +CONFIG_SERIAL_ATMEL_CONSOLE=y +CONFIG_HW_RANDOM=y +CONFIG_I2C=y +CONFIG_I2C_GPIO=y +CONFIG_SPI=y +CONFIG_SPI_ATMEL=y +# CONFIG_HWMON is not set +CONFIG_WATCHDOG=y +CONFIG_AT91SAM9X_WATCHDOG=y +CONFIG_SSB=m +CONFIG_FB=y +CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_ATMEL=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +# CONFIG_LCD_CLASS_DEVICE is not set +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_ATMEL_LCDC=y +# CONFIG_BACKLIGHT_GENERIC is not set +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_FONT_ACORN_8x8=y +CONFIG_FONT_MINI_4x6=y +CONFIG_LOGO=y +CONFIG_USB=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_ACM=y +CONFIG_USB_STORAGE=y +CONFIG_USB_SERIAL=y +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_FTDI_SIO=y +CONFIG_USB_SERIAL_PL2303=y +CONFIG_USB_GADGET=y +CONFIG_USB_AT91=m +CONFIG_USB_ETH=m +CONFIG_USB_GADGETFS=m +CONFIG_USB_CDC_COMPOSITE=m +CONFIG_USB_G_ACM_MS=m +CONFIG_USB_G_MULTI=m +CONFIG_USB_G_MULTI_CDC=y +CONFIG_MMC=y +CONFIG_MMC_ATMELMCI=y +CONFIG_MMC_SPI=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_AT91RM9200=y +CONFIG_RTC_DRV_AT91SAM9=y +CONFIG_DMADEVICES=y +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_EXT2_FS=y +CONFIG_FANOTIFY=y +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_UBIFS_FS=y +CONFIG_UBIFS_FS_ADVANCED_COMPR=y +CONFIG_NFS_FS=y +CONFIG_ROOT_NFS=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_850=y +CONFIG_NLS_ISO8859_1=y +CONFIG_STRIP_ASM_SYMS=y +CONFIG_DEBUG_FS=y +# CONFIG_SCHED_DEBUG is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_FTRACE is not set +CONFIG_DEBUG_USER=y +CONFIG_CRYPTO_ECB=y +CONFIG_CRYPTO_ARC4=y +# CONFIG_CRYPTO_ANSI_CPRNG is not set +CONFIG_CRYPTO_USER_API_HASH=m +CONFIG_CRYPTO_USER_API_SKCIPHER=m +# CONFIG_CRYPTO_HW is not set +CONFIG_CRC_CCITT=m +CONFIG_AVERAGE=y diff --git a/board/calao/usb-a9260/at91bootstrap-1.16-usb-a9260.patch b/board/calao/usb-a9260/at91bootstrap-1.16-usb-a9260.patch new file mode 100644 index 0000000000..1393677dfc --- /dev/null +++ b/board/calao/usb-a9260/at91bootstrap-1.16-usb-a9260.patch @@ -0,0 +1,603 @@ +From 43e8c90f13806405bde8eaaf3a956d0ddc806f64 Mon Sep 17 00:00:00 2001 +From: Gregory Hermant +Date: Tue, 2 Oct 2012 09:19:15 +0200 +Subject: [PATCH] Add support for the USB-A9260 + + +Signed-off-by: Gregory Hermant +--- + board/usb_a9260/nandflash/Makefile | 122 ++++++++++++++ + board/usb_a9260/nandflash/usb-a9260.h | 109 ++++++++++++ + board/usb_a9260/usb_a9260.c | 298 +++++++++++++++++++++++++++++++++ + crt0_gnu.S | 7 + + include/part.h | 6 +- + 5 files changed, 541 insertions(+), 1 deletion(-) + create mode 100644 board/usb_a9260/nandflash/Makefile + create mode 100644 board/usb_a9260/nandflash/usb-a9260.h + create mode 100644 board/usb_a9260/usb_a9260.c + +diff --git a/board/usb_a9260/nandflash/Makefile b/board/usb_a9260/nandflash/Makefile +new file mode 100644 +index 0000000..02f4b50 +--- /dev/null ++++ b/board/usb_a9260/nandflash/Makefile +@@ -0,0 +1,122 @@ ++# TODO: set this appropriately for your local toolchain ++ifndef ERASE_FCT ++ERASE_FCT=rm -f ++endif ++ifndef CROSS_COMPILE ++CROSS_COMPILE=arm-elf- ++endif ++ ++TOOLCHAIN=gcc ++ ++BOOTSTRAP_PATH=../../.. ++ ++# NandFlashBoot Configuration for USB-A9260 ++ ++# Target name (case sensitive!!!) ++TARGET=AT91SAM9260 ++# Board name (case sensitive!!!) ++BOARD=usb_a9260 ++# Link Address and Top_of_Memory ++LINK_ADDR=0x200000 ++TOP_OF_MEMORY=0x301000 ++# Name of current directory ++PROJECT=nandflash ++ ++ifndef BOOT_NAME ++BOOT_NAME=$(PROJECT)_$(BOARD) ++endif ++ ++INCL=./$(BOOTSTRAP_PATH)/board/$(BOARD)/$(PROJECT) ++ ++ifeq ($(TOOLCHAIN), gcc) ++ ++AS=$(CROSS_COMPILE)gcc ++CC=$(CROSS_COMPILE)gcc ++LD=$(CROSS_COMPILE)gcc ++NM= $(CROSS_COMPILE)nm ++SIZE=$(CROSS_COMPILE)size ++OBJCOPY=$(CROSS_COMPILE)objcopy ++OBJDUMP=$(CROSS_COMPILE)objdump ++CCFLAGS=-g -mcpu=arm926ej-s -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) ++ASFLAGS=-g -mcpu=arm926ej-s -c -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY) ++ ++# Linker flags. ++# -Wl,...: tell GCC to pass this to linker. ++# -Map: create map file ++# --cref: add cross reference to map file ++LDFLAGS+=-nostartfiles -nostdlib -Wl,-Map=$(BOOT_NAME).map,--cref ++LDFLAGS+=-T $(BOOTSTRAP_PATH)/elf32-littlearm.lds -Ttext $(LINK_ADDR) ++OBJS=crt0_gnu.o ++ ++endif ++ ++OBJS+=\ ++ $(BOARD).o \ ++ main.o \ ++ gpio.o \ ++ pmc.o \ ++ debug.o \ ++ sdramc.o \ ++ nandflash.o \ ++ _udivsi3.o \ ++ _umodsi3.o \ ++ div0.o \ ++ udiv.o \ ++ string.o ++ ++ ++rebuild: clean all ++ ++all: $(BOOT_NAME) ++ ++ifeq ($(TOOLCHAIN), gcc) ++$(BOOT_NAME): $(OBJS) ++ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS) ++ $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin ++endif ++ ++ ++$(BOARD).o: $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c -o $(BOARD).o ++ ++main.o: $(BOOTSTRAP_PATH)/main.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/main.c -o main.o ++ ++gpio.o: $(BOOTSTRAP_PATH)/driver/gpio.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/gpio.c -o gpio.o ++ ++pmc.o: $(BOOTSTRAP_PATH)/driver/pmc.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/pmc.c -o pmc.o ++ ++debug.o: $(BOOTSTRAP_PATH)/driver/debug.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/debug.c -o debug.o ++ ++sdramc.o: $(BOOTSTRAP_PATH)/driver/sdramc.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/sdramc.c -o sdramc.o ++ ++dataflash.o: $(BOOTSTRAP_PATH)/driver/dataflash.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/dataflash.c -o dataflash.o ++ ++nandflash.o: $(BOOTSTRAP_PATH)/driver/nandflash.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/nandflash.c -o nandflash.o ++ ++crt0_gnu.o: $(BOOTSTRAP_PATH)/crt0_gnu.S ++ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/crt0_gnu.S -o crt0_gnu.o ++ ++div0.o: $(BOOTSTRAP_PATH)/lib/div0.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/div0.c -o div0.o ++ ++string.o: $(BOOTSTRAP_PATH)/lib/string.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/string.c -o string.o ++ ++udiv.o: $(BOOTSTRAP_PATH)/lib/udiv.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/udiv.c -o udiv.o ++ ++_udivsi3.o: $(BOOTSTRAP_PATH)/lib/_udivsi3.S ++ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/lib/_udivsi3.S -o _udivsi3.o ++ ++_umodsi3.o: $(BOOTSTRAP_PATH)/lib/_umodsi3.S ++ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/lib/_umodsi3.S -o _umodsi3.o ++ ++clean: ++ $(ERASE_FCT) *.o *.bin *.elf *.map +diff --git a/board/usb_a9260/nandflash/usb-a9260.h b/board/usb_a9260/nandflash/usb-a9260.h +new file mode 100644 +index 0000000..2aaf759 +--- /dev/null ++++ b/board/usb_a9260/nandflash/usb-a9260.h +@@ -0,0 +1,109 @@ ++/* ---------------------------------------------------------------------------- ++ * ATMEL Microcontroller Software Support - ROUSSET - ++ * ---------------------------------------------------------------------------- ++ * Copyright (c) 2006, Atmel Corporation ++ ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the disclaimer below. ++ * ++ * Atmel's name may not be used to endorse or promote products derived from ++ * this software without specific prior written permission. ++ * ++ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR ++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE ++ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, ++ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ++ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ++ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ++ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ---------------------------------------------------------------------------- ++ * File Name : usb-a9260.h ++ * Object : ++ * Creation : GH Oct 1th 2012 ++ *----------------------------------------------------------------------------- ++ */ ++#ifndef _USB_A9260_H ++#define _USB_A9260_H ++ ++/* ******************************************************************* */ ++/* PMC Settings */ ++/* */ ++/* The main oscillator is enabled as soon as possible in the c_startup */ ++/* and MCK is switched on the main oscillator. */ ++/* PLL initialization is done later in the hw_init() function */ ++/* ******************************************************************* */ ++#define MASTER_CLOCK (180000000/2) ++#define PLL_LOCK_TIMEOUT 1000000 ++ ++#define PLLA_SETTINGS 0x20593F06 ++#define PLLB_SETTINGS 0x10483F0E ++ ++/* Switch MCK on PLLA output PCK = PLLA = 2 * MCK */ ++#define MCKR_SETTINGS (AT91C_PMC_PRES_CLK | AT91C_PMC_MDIV_2) ++#define MCKR_CSS_SETTINGS (AT91C_PMC_CSS_PLLA_CLK | MCKR_SETTINGS) ++ ++/* ******************************************************************* */ ++/* NandFlash Settings */ ++/* */ ++/* ******************************************************************* */ ++#define AT91C_SMARTMEDIA_BASE 0x40000000 ++ ++#define AT91_SMART_MEDIA_ALE (1 << 21) /* our ALE is AD21 */ ++#define AT91_SMART_MEDIA_CLE (1 << 22) /* our CLE is AD22 */ ++ ++#define NAND_DISABLE_CE() do { *(volatile unsigned int *)AT91C_PIOC_SODR = AT91C_PIO_PC14;} while(0) ++#define NAND_ENABLE_CE() do { *(volatile unsigned int *)AT91C_PIOC_CODR = AT91C_PIO_PC14;} while(0) ++ ++#define NAND_WAIT_READY() while (!(*(volatile unsigned int *)AT91C_PIOC_PDSR & AT91C_PIO_PC13)) ++ ++ ++/* ******************************************************************** */ ++/* SMC Chip Select 3 Timings for NandFlash for MASTER_CLOCK = 90000000.*/ ++/* Please refer to SMC section in AT91SAM datasheet to learn how */ ++/* to generate these values. */ ++/* ******************************************************************** */ ++#define AT91C_SM_NWE_SETUP (1 << 0) ++#define AT91C_SM_NCS_WR_SETUP (0 << 8) ++#define AT91C_SM_NRD_SETUP (1 << 16) ++#define AT91C_SM_NCS_RD_SETUP (0 << 24) ++ ++#define AT91C_SM_NWE_PULSE (3 << 0) ++#define AT91C_SM_NCS_WR_PULSE (3 << 8) ++#define AT91C_SM_NRD_PULSE (3 << 16) ++#define AT91C_SM_NCS_RD_PULSE (3 << 24) ++ ++#define AT91C_SM_NWE_CYCLE (5 << 0) ++#define AT91C_SM_NRD_CYCLE (5 << 16) ++#define AT91C_SM_TDF (2 << 16) ++ ++/* ******************************************************************* */ ++/* BootStrap Settings */ ++/* */ ++/* ******************************************************************* */ ++#define IMG_ADDRESS 0x20000 /* Image Address in NandFlash */ ++#define IMG_SIZE 0x40000 /* Image Size in NandFlash */ ++ ++#define MACH_TYPE 0x6AD /* USB-A9260 */ ++#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ ++ ++/* ******************************************************************* */ ++/* Application Settings */ ++/* ******************************************************************* */ ++#undef CFG_DEBUG ++#undef CFG_DATAFLASH ++ ++#define CFG_NANDFLASH ++#undef NANDFLASH_SMALL_BLOCKS /* NANDFLASH_LARGE_BLOCKS used instead */ ++ ++#define CFG_HW_INIT ++#define CFG_SDRAM ++ ++#endif /* _USB_A9260_H */ +diff --git a/board/usb_a9260/usb_a9260.c b/board/usb_a9260/usb_a9260.c +new file mode 100644 +index 0000000..de30f0b +--- /dev/null ++++ b/board/usb_a9260/usb_a9260.c +@@ -0,0 +1,298 @@ ++/* ---------------------------------------------------------------------------- ++ * ATMEL Microcontroller Software Support - ROUSSET - ++ * ---------------------------------------------------------------------------- ++ * Copyright (c) 2006, Atmel Corporation ++ ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the disclaiimer below. ++ * ++ * Atmel's name may not be used to endorse or promote products derived from ++ * this software without specific prior written permission. ++ * ++ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR ++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE ++ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, ++ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ++ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ++ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ++ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ---------------------------------------------------------------------------- ++ * File Name : usb_a9260.c ++ * Object : ++ * Creation : GH Oct 1th 2012 ++ *----------------------------------------------------------------------------- ++ */ ++#include "../../include/part.h" ++#include "../../include/gpio.h" ++#include "../../include/pmc.h" ++#include "../../include/debug.h" ++#include "../../include/sdramc.h" ++#include "../../include/main.h" ++#ifdef CFG_NANDFLASH ++#include "../../include/nandflash.h" ++#endif ++#ifdef CFG_DATAFLASH ++#include "../../include/dataflash.h" ++#endif ++ ++static inline unsigned int get_cp15(void) ++{ ++ unsigned int value; ++ __asm__("mrc p15, 0, %0, c1, c0, 0" : "=r" (value)); ++ return value; ++} ++ ++static inline void set_cp15(unsigned int value) ++{ ++ __asm__("mcr p15, 0, %0, c1, c0, 0" : : "r" (value)); ++} ++ ++#ifdef CFG_HW_INIT ++/*----------------------------------------------------------------------------*/ ++/* \fn hw_init */ ++/* \brief This function performs very low level HW initialization */ ++/* This function is invoked as soon as possible during the c_startup */ ++/* The bss segment must be initialized */ ++/*----------------------------------------------------------------------------*/ ++void hw_init(void) ++{ ++ unsigned int cp15; ++ ++ /* Configure PIOs */ ++ const struct pio_desc hw_pio[] = { ++#ifdef CFG_DEBUG ++ {"RXD", AT91C_PIN_PB(14), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"TXD", AT91C_PIN_PB(15), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++#endif ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++ ++ /* Disable watchdog */ ++ writel(AT91C_WDTC_WDDIS, AT91C_BASE_WDTC + WDTC_WDMR); ++ ++ /* At this stage the main oscillator is supposed to be enabled ++ * PCK = MCK = MOSC */ ++ ++ /* Configure PLLA = MOSC * (PLL_MULA + 1) / PLL_DIVA */ ++ pmc_cfg_plla(PLLA_SETTINGS, PLL_LOCK_TIMEOUT); ++ ++ /* PCK = PLLA = 2 * MCK */ ++ pmc_cfg_mck(MCKR_SETTINGS, PLL_LOCK_TIMEOUT); ++ /* Switch MCK on PLLA output */ ++ pmc_cfg_mck(MCKR_CSS_SETTINGS, PLL_LOCK_TIMEOUT); ++ ++ /* Configure PLLB */ ++ pmc_cfg_pllb(PLLB_SETTINGS, PLL_LOCK_TIMEOUT); ++ ++ /* Configure CP15 */ ++ cp15 = get_cp15(); ++ cp15 |= I_CACHE; ++ set_cp15(cp15); ++ ++ /* Configure the PIO controller */ ++ pio_setup(hw_pio); ++ ++ /* Configure the EBI Slave Slot Cycle to 64 */ ++ writel( (readl((AT91C_BASE_MATRIX + MATRIX_SCFG3)) & ~0xFF) | 0x40, (AT91C_BASE_MATRIX + MATRIX_SCFG3)); ++ ++#ifdef CFG_DEBUG ++ /* Enable Debug messages on the DBGU */ ++ dbg_init(BAUDRATE(MASTER_CLOCK, 115200)); ++ ++ dbg_print("Start AT91Bootstrap...\n\r"); ++#endif /* CFG_DEBUG */ ++ ++#ifdef CFG_SDRAM ++ /* Initialize the matrix */ ++ writel(readl(AT91C_BASE_CCFG + CCFG_EBICSA) | AT91C_EBI_CS1A_SDRAMC, AT91C_BASE_CCFG + CCFG_EBICSA); ++ ++ /* Configure SDRAM Controller */ ++ sdram_init( AT91C_SDRAMC_NC_9 | ++ AT91C_SDRAMC_NR_13 | ++ AT91C_SDRAMC_CAS_2 | ++ AT91C_SDRAMC_NB_4_BANKS | ++ AT91C_SDRAMC_DBW_32_BITS | ++ AT91C_SDRAMC_TWR_2 | ++ AT91C_SDRAMC_TRC_7 | ++ AT91C_SDRAMC_TRP_2 | ++ AT91C_SDRAMC_TRCD_2 | ++ AT91C_SDRAMC_TRAS_5 | ++ AT91C_SDRAMC_TXSR_8, /* Control Register */ ++ (MASTER_CLOCK * 7)/1000000, /* Refresh Timer Register */ ++ AT91C_SDRAMC_MD_SDRAM); /* SDRAM (no low power) */ ++ ++ ++#endif /* CFG_SDRAM */ ++} ++#endif /* CFG_HW_INIT */ ++ ++#ifdef CFG_SDRAM ++/*------------------------------------------------------------------------------*/ ++/* \fn sdramc_hw_init */ ++/* \brief This function performs SDRAMC HW initialization */ ++/*------------------------------------------------------------------------------*/ ++void sdramc_hw_init(void) ++{ ++ /* Configure PIOs */ ++/* const struct pio_desc sdramc_pio[] = { ++ {"D16", AT91C_PIN_PC(16), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D17", AT91C_PIN_PC(17), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D18", AT91C_PIN_PC(18), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D19", AT91C_PIN_PC(19), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D20", AT91C_PIN_PC(20), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D21", AT91C_PIN_PC(21), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D22", AT91C_PIN_PC(22), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D23", AT91C_PIN_PC(23), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D24", AT91C_PIN_PC(24), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D25", AT91C_PIN_PC(25), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D26", AT91C_PIN_PC(26), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D27", AT91C_PIN_PC(27), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D28", AT91C_PIN_PC(28), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D29", AT91C_PIN_PC(29), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D30", AT91C_PIN_PC(30), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D31", AT91C_PIN_PC(31), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++*/ ++ /* Configure the SDRAMC PIO controller to output PCK0 */ ++/* pio_setup(sdramc_pio); */ ++ ++ writel(0xFFFF0000, AT91C_BASE_PIOC + PIO_ASR(0)); ++ writel(0xFFFF0000, AT91C_BASE_PIOC + PIO_PDR(0)); ++ ++} ++#endif /* CFG_SDRAM */ ++ ++#ifdef CFG_DATAFLASH ++ ++/*------------------------------------------------------------------------------*/ ++/* \fn df_recovery */ ++/* \brief This function erases DataFlash Page 0 if USR PB is pressed */ ++/* during boot sequence */ ++/*------------------------------------------------------------------------------*/ ++void df_recovery(AT91PS_DF pDf) ++{ ++#if (AT91C_SPI_PCS_DATAFLASH == AT91C_SPI_PCS0_DATAFLASH) ++ /* Configure PIOs */ ++ const struct pio_desc usrpb_pio[] = { ++ {"USRPB", AT91C_PIN_PB(10), 0, PIO_PULLUP, PIO_INPUT}, ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++ ++ /* Configure the PIO controller */ ++ writel((1 << AT91C_ID_PIOB), PMC_PCER + AT91C_BASE_PMC); ++ pio_setup(usrpb_pio); ++ ++ /* If USR PB is pressed during Boot sequence */ ++ /* Erase DataFlash Page 0*/ ++ if ( !pio_get_value(AT91C_PIN_PB(10)) ) ++ df_page_erase(pDf, 0); ++#endif ++} ++ ++/*------------------------------------------------------------------------------*/ ++/* \fn df_hw_init */ ++/* \brief This function performs DataFlash HW initialization */ ++/*------------------------------------------------------------------------------*/ ++void df_hw_init(void) ++{ ++ /* Configure PIOs */ ++ const struct pio_desc df_pio[] = { ++ {"MISO", AT91C_PIN_PA(0), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"MOSI", AT91C_PIN_PA(1), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"SPCK", AT91C_PIN_PA(2), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++#if (AT91C_SPI_PCS_DATAFLASH == AT91C_SPI_PCS0_DATAFLASH) ++ {"NPCS0", AT91C_PIN_PA(3), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++#endif ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++ ++ /* Configure the PIO controller */ ++ pio_setup(df_pio); ++} ++#endif /* CFG_DATAFLASH */ ++ ++ ++ ++#ifdef CFG_NANDFLASH ++/*------------------------------------------------------------------------------*/ ++/* \fn nand_recovery */ ++/* \brief This function erases NandFlash Block 0 if USR PB is pressed */ ++/* during boot sequence */ ++/*------------------------------------------------------------------------------*/ ++static void nand_recovery(void) ++{ ++ /* Configure PIOs */ ++ const struct pio_desc usrpb_pio[] = { ++ {"USRPB", AT91C_PIN_PB(10), 0, PIO_PULLUP, PIO_INPUT}, ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++ ++ /* Configure the PIO controller */ ++ writel((1 << AT91C_ID_PIOB), PMC_PCER + AT91C_BASE_PMC); ++ pio_setup(usrpb_pio); ++ ++ /* If USR PB is pressed during Boot sequence */ ++ /* Erase NandFlash block 0*/ ++ if (!pio_get_value(AT91C_PIN_PB(10)) ) ++ AT91F_NandEraseBlock0(); ++} ++ ++/*------------------------------------------------------------------------------*/ ++/* \fn nandflash_hw_init */ ++/* \brief NandFlash HW init */ ++/*------------------------------------------------------------------------------*/ ++void nandflash_hw_init(void) ++{ ++ /* Configure PIOs */ ++ const struct pio_desc nand_pio[] = { ++ {"RDY_BSY", AT91C_PIN_PC(13), 0, PIO_PULLUP, PIO_INPUT}, ++ {"NANDCS", AT91C_PIN_PC(14), 0, PIO_PULLUP, PIO_OUTPUT}, ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++ ++ /* Setup Smart Media, first enable the address range of CS3 in HMATRIX user interface */ ++ writel(readl(AT91C_BASE_CCFG + CCFG_EBICSA) | AT91C_EBI_CS3A_SM, AT91C_BASE_CCFG + CCFG_EBICSA); ++ ++ /* Configure SMC CS3 */ ++ writel((AT91C_SM_NWE_SETUP | AT91C_SM_NCS_WR_SETUP | AT91C_SM_NRD_SETUP | AT91C_SM_NCS_RD_SETUP), AT91C_BASE_SMC + SMC_SETUP3); ++ writel((AT91C_SM_NWE_PULSE | AT91C_SM_NCS_WR_PULSE | AT91C_SM_NRD_PULSE | AT91C_SM_NCS_RD_PULSE), AT91C_BASE_SMC + SMC_PULSE3); ++ writel((AT91C_SM_NWE_CYCLE | AT91C_SM_NRD_CYCLE) , AT91C_BASE_SMC + SMC_CYCLE3); ++ writel((AT91C_SMC_READMODE | AT91C_SMC_WRITEMODE | AT91C_SMC_NWAITM_NWAIT_DISABLE | ++ AT91C_SMC_DBW_WIDTH_SIXTEEN_BITS | AT91C_SM_TDF) , AT91C_BASE_SMC + SMC_CTRL3); ++ ++ /* Configure the PIO controller */ ++ writel((1 << AT91C_ID_PIOC), PMC_PCER + AT91C_BASE_PMC); ++ pio_setup(nand_pio); ++ ++ nand_recovery(); ++} ++ ++/*------------------------------------------------------------------------------*/ ++/* \fn nandflash_cfg_16bits_dbw_init */ ++/* \brief Configure SMC in 16 bits mode */ ++/*------------------------------------------------------------------------------*/ ++void nandflash_cfg_16bits_dbw_init(void) ++{ ++ writel(readl(AT91C_BASE_SMC + SMC_CTRL3) | AT91C_SMC_DBW_WIDTH_SIXTEEN_BITS, AT91C_BASE_SMC + SMC_CTRL3); ++} ++ ++/*------------------------------------------------------------------------------*/ ++/* \fn nandflash_cfg_8bits_dbw_init */ ++/* \brief Configure SMC in 8 bits mode */ ++/*------------------------------------------------------------------------------*/ ++void nandflash_cfg_8bits_dbw_init(void) ++{ ++ writel((readl(AT91C_BASE_SMC + SMC_CTRL3) & ~(AT91C_SMC_DBW)) | AT91C_SMC_DBW_WIDTH_EIGTH_BITS, AT91C_BASE_SMC + SMC_CTRL3); ++} ++ ++ ++#endif /* #ifdef CFG_NANDFLASH */ +diff --git a/crt0_gnu.S b/crt0_gnu.S +index 042b617..002feef 100644 +--- a/crt0_gnu.S ++++ b/crt0_gnu.S +@@ -106,6 +106,13 @@ _relocate_to_sram: + #endif /* CFG_NORFLASH */ + + _setup_clocks: ++/* Test if main osc is bypassed */ ++ ldr r0,=AT91C_PMC_MOR ++ ldr r1, [r0] ++ ldr r2,=AT91C_CKGR_OSCBYPASS ++ ands r1, r1, r2 ++ bne _init_data /* branch if OSCBYPASS=1 */ ++ + /* Test if main oscillator is enabled */ + ldr r0,=AT91C_PMC_SR + ldr r1, [r0] +diff --git a/include/part.h b/include/part.h +index ba5985a..212789f 100644 +--- a/include/part.h ++++ b/include/part.h +@@ -35,7 +35,11 @@ + + #ifdef AT91SAM9260 + #include "AT91SAM9260_inc.h" +-#include "at91sam9260ek.h" ++ #ifdef at91sam9260ek ++ #include "at91sam9260ek.h" ++ #elif usb_a9260 ++ #include "usb-a9260.h" ++ #endif + #endif + + #ifdef AT91SAM9XE +-- +1.7.9.5 + diff --git a/board/calao/usb-a9260/linux-3.7.4.config b/board/calao/usb-a9260/linux-3.7.4.config new file mode 100644 index 0000000000..c466bdc88c --- /dev/null +++ b/board/calao/usb-a9260/linux-3.7.4.config @@ -0,0 +1,97 @@ +CONFIG_EXPERIMENTAL=y +# CONFIG_LOCALVERSION_AUTO is not set +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_SLAB=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_ARCH_AT91=y +CONFIG_ARCH_AT91SAM9260=y +CONFIG_MACH_USB_A9260=y +CONFIG_AT91_SLOW_CLOCK=y +# CONFIG_ARM_THUMB is not set +CONFIG_AEABI=y +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="mem=64M console=ttyS0,115200" +CONFIG_FPE_NWFPE=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_ROUTE_VERBOSE=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_IP_MROUTE=y +CONFIG_IP_PIMSM_V1=y +CONFIG_IP_PIMSM_V2=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_IPV6 is not set +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_DATAFLASH=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_ATMEL=y +CONFIG_MTD_UBI=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y +CONFIG_SCSI_MULTI_LUN=y +CONFIG_NETDEVICES=y +CONFIG_MII=y +CONFIG_MACB=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_EVDEV=y +CONFIG_INPUT_EVBUG=y +# CONFIG_KEYBOARD_ATKBD is not set +CONFIG_KEYBOARD_GPIO=y +# CONFIG_INPUT_MOUSE is not set +# CONFIG_SERIO is not set +CONFIG_SERIAL_ATMEL=y +CONFIG_SERIAL_ATMEL_CONSOLE=y +CONFIG_HW_RANDOM=y +CONFIG_SPI=y +CONFIG_SPI_ATMEL=y +# CONFIG_HWMON is not set +# CONFIG_USB_HID is not set +CONFIG_USB=y +CONFIG_USB_MON=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_STORAGE=y +CONFIG_USB_GADGET=y +CONFIG_USB_ETH=m +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_EXT2_FS=y +CONFIG_FUSE_FS=m +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_JFFS2_FS=y +CONFIG_UBIFS_FS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_ROOT_NFS=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_850=y +CONFIG_NLS_ISO8859_1=y +CONFIG_DEBUG_KERNEL=y +CONFIG_DEBUG_USER=y +CONFIG_DEBUG_LL=y diff --git a/board/calao/usb-a9263/at91bootstrap-1.16-usb-a9263.patch b/board/calao/usb-a9263/at91bootstrap-1.16-usb-a9263.patch new file mode 100644 index 0000000000..579893050f --- /dev/null +++ b/board/calao/usb-a9263/at91bootstrap-1.16-usb-a9263.patch @@ -0,0 +1,851 @@ +From 74796655212d321f50ab89e8c5570245901f4cba Mon Sep 17 00:00:00 2001 +From: Gregory Hermant +Date: Thu, 5 Jul 2012 18:44:07 +0200 +Subject: [PATCH] Add support for the Calao-systems USB-A9263 + + +Signed-off-by: Gregory Hermant +--- + board/usb_a9263/dataflash/Makefile | 115 +++++++++++++ + board/usb_a9263/dataflash/usb-a9263.h | 97 +++++++++++ + board/usb_a9263/nandflash/Makefile | 117 ++++++++++++++ + board/usb_a9263/nandflash/usb-a9263.h | 116 +++++++++++++ + board/usb_a9263/usb_a9263.c | 285 +++++++++++++++++++++++++++++++++ + crt0_gnu.S | 7 + + driver/dataflash.c | 6 +- + include/part.h | 6 +- + 8 files changed, 745 insertions(+), 4 deletions(-) + create mode 100644 board/usb_a9263/dataflash/Makefile + create mode 100644 board/usb_a9263/dataflash/usb-a9263.h + create mode 100644 board/usb_a9263/nandflash/Makefile + create mode 100644 board/usb_a9263/nandflash/usb-a9263.h + create mode 100644 board/usb_a9263/usb_a9263.c + +diff --git a/board/usb_a9263/dataflash/Makefile b/board/usb_a9263/dataflash/Makefile +new file mode 100644 +index 0000000..332685e +--- /dev/null ++++ b/board/usb_a9263/dataflash/Makefile +@@ -0,0 +1,115 @@ ++# TODO: set this appropriately for your local toolchain ++#SHELL=C:\CYGWIN_REP\dwn_071004\bin\BASH.exe ++CROSS_COMPILE=arm-elf- ++#CROSS_COMPILE = arm-softfloat-linux-gnu- ++ ++TOOLCHAIN=gcc ++ ++BOOTSTRAP_PATH=../../.. ++ ++# DataFlashBoot Configuration for USB-A9263 ++ ++# Target name (case sensitive!!!) ++TARGET=AT91SAM9263 ++# Board name (case sensitive!!!) ++BOARD=usb_a9263 ++# Link Address and Top_of_Memory ++LINK_ADDR=0x300000 ++TOP_OF_MEMORY=0x314000 ++# Name of current directory ++PROJECT=dataflash ++ ++ifndef BOOT_NAME ++BOOT_NAME=$(PROJECT)_$(BOARD) ++endif ++ ++INCL=./$(BOOTSTRAP_PATH)/board/$(BOARD)/$(PROJECT) ++ ++ifeq ($(TOOLCHAIN), gcc) ++ ++AS=$(CROSS_COMPILE)gcc ++CC=$(CROSS_COMPILE)gcc ++LD=$(CROSS_COMPILE)gcc ++NM= $(CROSS_COMPILE)nm ++SIZE=$(CROSS_COMPILE)size ++OBJCOPY=$(CROSS_COMPILE)objcopy ++OBJDUMP=$(CROSS_COMPILE)objdump ++CCFLAGS=-g -mcpu=arm9 -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) ++ASFLAGS=-g -mcpu=arm9 -c -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY) ++ ++# Linker flags. ++# -Wl,...: tell GCC to pass this to linker. ++# -Map: create map file ++# --cref: add cross reference to map file ++LDFLAGS+=-nostartfiles -nostdlib -Wl,-Map=$(BOOT_NAME).map,--cref ++LDFLAGS+=-T $(BOOTSTRAP_PATH)/elf32-littlearm.lds -Ttext $(LINK_ADDR) ++OBJS=crt0_gnu.o ++ ++endif ++ ++OBJS+=\ ++ $(BOARD).o \ ++ main.o \ ++ gpio.o \ ++ pmc.o \ ++ debug.o \ ++ sdramc.o \ ++ dataflash.o \ ++ _udivsi3.o \ ++ _umodsi3.o \ ++ div0.o \ ++ udiv.o \ ++ string.o ++ ++rebuild: clean all ++ ++all: $(BOOT_NAME) ++ ++ifeq ($(TOOLCHAIN), gcc) ++$(BOOT_NAME): $(OBJS) ++ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS) ++ $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin ++endif ++ ++ ++$(BOARD).o: $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c -o $(BOARD).o ++ ++main.o: $(BOOTSTRAP_PATH)/main.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/main.c -o main.o ++ ++gpio.o: $(BOOTSTRAP_PATH)/driver/gpio.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/gpio.c -o gpio.o ++ ++pmc.o: $(BOOTSTRAP_PATH)/driver/pmc.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/pmc.c -o pmc.o ++ ++debug.o: $(BOOTSTRAP_PATH)/driver/debug.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/debug.c -o debug.o ++ ++sdramc.o: $(BOOTSTRAP_PATH)/driver/sdramc.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/sdramc.c -o sdramc.o ++ ++dataflash.o: $(BOOTSTRAP_PATH)/driver/dataflash.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/dataflash.c -o dataflash.o ++ ++crt0_gnu.o: $(BOOTSTRAP_PATH)/crt0_gnu.S ++ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/crt0_gnu.S -o crt0_gnu.o ++ ++div0.o: $(BOOTSTRAP_PATH)/lib/div0.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/div0.c -o div0.o ++ ++string.o: $(BOOTSTRAP_PATH)/lib/string.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/string.c -o string.o ++ ++udiv.o: $(BOOTSTRAP_PATH)/lib/udiv.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/udiv.c -o udiv.o ++ ++_udivsi3.o: $(BOOTSTRAP_PATH)/lib/_udivsi3.S ++ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/lib/_udivsi3.S -o _udivsi3.o ++ ++_umodsi3.o: $(BOOTSTRAP_PATH)/lib/_umodsi3.S ++ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/lib/_umodsi3.S -o _umodsi3.o ++ ++clean: ++ rm -f *.o *.bin *.elf *.map +diff --git a/board/usb_a9263/dataflash/usb-a9263.h b/board/usb_a9263/dataflash/usb-a9263.h +new file mode 100644 +index 0000000..40a3af8 +--- /dev/null ++++ b/board/usb_a9263/dataflash/usb-a9263.h +@@ -0,0 +1,97 @@ ++/* ---------------------------------------------------------------------------- ++ * ATMEL Microcontroller Software Support - ROUSSET - ++ * ---------------------------------------------------------------------------- ++ * Copyright (c) 2006, Atmel Corporation ++ ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the disclaimer below. ++ * ++ * Atmel's name may not be used to endorse or promote products derived from ++ * this software without specific prior written permission. ++ * ++ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR ++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE ++ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, ++ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ++ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ++ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ++ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ---------------------------------------------------------------------------- ++ * File Name : usb-a9263.h ++ * Object : ++ * Creation : GH Jun 28th 2012 ++ *----------------------------------------------------------------------------- ++ */ ++#ifndef _USB_A9263_H ++#define _USB_A9263_H ++ ++/* ******************************************************************* */ ++/* PMC Settings */ ++/* */ ++/* The main oscillator is enabled as soon as possible in the c_startup */ ++/* and MCK is switched on the main oscillator. */ ++/* PLL initialization is done later in the hw_init() function */ ++/* ******************************************************************* */ ++#define MASTER_CLOCK (180000000/2) ++#define PLL_LOCK_TIMEOUT 1000000 ++ ++#define PLLA_SETTINGS 0x20593F06 ++#define PLLB_SETTINGS 0x10483F0E ++ ++/* Switch MCK on PLLA output PCK = PLLA = 2 * MCK */ ++#define MCKR_SETTINGS (AT91C_PMC_PRES_CLK | AT91C_PMC_MDIV_2) ++#define MCKR_CSS_SETTINGS (AT91C_PMC_CSS_PLLA_CLK | MCKR_SETTINGS) ++ ++/* ******************************************************************* */ ++/* DataFlash Settings */ ++/* */ ++/* ******************************************************************* */ ++#define AT91C_BASE_SPI AT91C_BASE_SPI0 ++#define AT91C_ID_SPI AT91C_ID_SPI0 ++ ++/* SPI CLOCK */ ++#define AT91C_SPI_CLK 8000000 ++/* AC characteristics */ ++/* DLYBS = tCSS= 250ns min and DLYBCT = tCSH = 250ns */ ++#define DATAFLASH_TCSS (0x1a << 16) /* 250ns min (tCSS) <=> 12/48000000 = 250ns */ ++#define DATAFLASH_TCHS (0x1 << 24) /* 250ns min (tCSH) <=> (64*1+SCBR)/(2*48000000) */ ++ ++#define DF_CS_SETTINGS (AT91C_SPI_NCPHA | (AT91C_SPI_DLYBS & DATAFLASH_TCSS) | (AT91C_SPI_DLYBCT & DATAFLASH_TCHS) | ((MASTER_CLOCK / AT91C_SPI_CLK) << 8)) ++ ++/* ******************************************************************* */ ++/* SDRAMC Settings */ ++/* */ ++/* ******************************************************************* */ ++#define AT91C_BASE_SDRAMC AT91C_BASE_SDRAMC0 ++#define AT91C_EBI_SDRAM AT91C_EBI0_SDRAM ++ ++/* ******************************************************************* */ ++/* BootStrap Settings */ ++/* */ ++/* ******************************************************************* */ ++#define AT91C_SPI_PCS_DATAFLASH AT91C_SPI_PCS0_DATAFLASH /* Boot on SPI NCS0 */ ++ ++#define IMG_ADDRESS 0x4000 /* Image Address in DataFlash */ ++#define IMG_SIZE 0x40000 /* Image Size in DataFlash */ ++ ++#define MACH_TYPE 0x6AE /* USB-A9263 */ ++#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ ++ ++/* ******************************************************************* */ ++/* Application Settings */ ++/* ******************************************************************* */ ++#define CFG_HW_INIT ++#define CFG_SDRAM ++#undef CFG_DEBUG ++ ++#define CFG_DATAFLASH ++ ++#endif /* _USB_A9263_H */ +diff --git a/board/usb_a9263/nandflash/Makefile b/board/usb_a9263/nandflash/Makefile +new file mode 100644 +index 0000000..c453098 +--- /dev/null ++++ b/board/usb_a9263/nandflash/Makefile +@@ -0,0 +1,117 @@ ++# TODO: set this appropriately for your local toolchain ++#SHELL=C:\CYGWIN_REP\dwn_071004\bin\BASH.exe ++CROSS_COMPILE=arm-elf- ++ ++TOOLCHAIN=gcc ++ ++BOOTSTRAP_PATH=../../.. ++ ++# NandFlashBoot Configuration for USB-A9263 ++ ++# Target name (case sensitive!!!) ++TARGET=AT91SAM9263 ++# Board name (case sensitive!!!) ++BOARD=usb_a9263 ++# Link Address and Top_of_Memory ++LINK_ADDR=0x300000 ++TOP_OF_MEMORY=0x314000 ++# Name of current directory ++PROJECT=nandflash ++ ++ifndef BOOT_NAME ++BOOT_NAME=$(PROJECT)_$(BOARD) ++endif ++ ++INCL=./$(BOOTSTRAP_PATH)/board/$(BOARD)/$(PROJECT) ++ ++ifeq ($(TOOLCHAIN), gcc) ++ ++AS=$(CROSS_COMPILE)gcc ++CC=$(CROSS_COMPILE)gcc ++LD=$(CROSS_COMPILE)gcc ++NM= $(CROSS_COMPILE)nm ++SIZE=$(CROSS_COMPILE)size ++OBJCOPY=$(CROSS_COMPILE)objcopy ++OBJDUMP=$(CROSS_COMPILE)objdump ++CCFLAGS=-g -mcpu=arm9 -O0 -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) ++ASFLAGS=-g -mcpu=arm9 -c -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY) ++ ++# Linker flags. ++# -Wl,...: tell GCC to pass this to linker. ++# -Map: create map file ++# --cref: add cross reference to map file ++LDFLAGS+=-nostartfiles -nostdlib -Wl,-Map=$(BOOT_NAME).map,--cref ++LDFLAGS+=-T $(BOOTSTRAP_PATH)/elf32-littlearm.lds -Ttext $(LINK_ADDR) ++OBJS=crt0_gnu.o ++ ++endif ++ ++OBJS+=\ ++ $(BOARD).o \ ++ main.o \ ++ gpio.o \ ++ pmc.o \ ++ debug.o \ ++ sdramc.o \ ++ nandflash.o \ ++ _udivsi3.o \ ++ _umodsi3.o \ ++ div0.o \ ++ udiv.o \ ++ string.o ++ ++rebuild: clean all ++ ++all: $(BOOT_NAME) ++ ++ifeq ($(TOOLCHAIN), gcc) ++$(BOOT_NAME): $(OBJS) ++ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS) ++ $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin ++endif ++ ++ ++$(BOARD).o: $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c -o $(BOARD).o ++ ++main.o: $(BOOTSTRAP_PATH)/main.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/main.c -o main.o ++ ++gpio.o: $(BOOTSTRAP_PATH)/driver/gpio.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/gpio.c -o gpio.o ++ ++pmc.o: $(BOOTSTRAP_PATH)/driver/pmc.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/pmc.c -o pmc.o ++ ++debug.o: $(BOOTSTRAP_PATH)/driver/debug.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/debug.c -o debug.o ++ ++sdramc.o: $(BOOTSTRAP_PATH)/driver/sdramc.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/sdramc.c -o sdramc.o ++ ++dataflash.o: $(BOOTSTRAP_PATH)/driver/dataflash.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/dataflash.c -o dataflash.o ++ ++nandflash.o: $(BOOTSTRAP_PATH)/driver/nandflash.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/nandflash.c -o nandflash.o ++ ++crt0_gnu.o: $(BOOTSTRAP_PATH)/crt0_gnu.S ++ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/crt0_gnu.S -o crt0_gnu.o ++ ++div0.o: $(BOOTSTRAP_PATH)/lib/div0.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/div0.c -o div0.o ++ ++string.o: $(BOOTSTRAP_PATH)/lib/string.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/string.c -o string.o ++ ++udiv.o: $(BOOTSTRAP_PATH)/lib/udiv.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/udiv.c -o udiv.o ++ ++_udivsi3.o: $(BOOTSTRAP_PATH)/lib/_udivsi3.S ++ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/lib/_udivsi3.S -o _udivsi3.o ++ ++_umodsi3.o: $(BOOTSTRAP_PATH)/lib/_umodsi3.S ++ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/lib/_umodsi3.S -o _umodsi3.o ++ ++clean: ++ rm -f *.o *.bin *.elf *.map +diff --git a/board/usb_a9263/nandflash/usb-a9263.h b/board/usb_a9263/nandflash/usb-a9263.h +new file mode 100644 +index 0000000..24e2cf1 +--- /dev/null ++++ b/board/usb_a9263/nandflash/usb-a9263.h +@@ -0,0 +1,116 @@ ++/* ---------------------------------------------------------------------------- ++ * ATMEL Microcontroller Software Support - ROUSSET - ++ * ---------------------------------------------------------------------------- ++ * Copyright (c) 2006, Atmel Corporation ++ ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the disclaimer below. ++ * ++ * Atmel's name may not be used to endorse or promote products derived from ++ * this software without specific prior written permission. ++ * ++ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR ++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE ++ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, ++ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ++ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ++ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ++ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ---------------------------------------------------------------------------- ++ * File Name : usb-a9263.h ++ * Object : ++ * Creation : GH Jun 28th 2012 ++ *----------------------------------------------------------------------------- ++ */ ++#ifndef _USB_A9263_H ++#define _USB_A9263_H ++ ++/* ******************************************************************* */ ++/* PMC Settings */ ++/* */ ++/* The main oscillator is enabled as soon as possible in the c_startup */ ++/* and MCK is switched on the main oscillator. */ ++/* PLL initialization is done later in the hw_init() function */ ++/* ******************************************************************* */ ++#define MASTER_CLOCK (180000000/2) ++#define PLL_LOCK_TIMEOUT 1000000 ++ ++#define PLLA_SETTINGS 0x20593F06 ++#define PLLB_SETTINGS 0x10483F0E ++ ++/* Switch MCK on PLLA output PCK = PLLA = 2 * MCK */ ++#define MCKR_SETTINGS (AT91C_PMC_PRES_CLK | AT91C_PMC_MDIV_2) ++#define MCKR_CSS_SETTINGS (AT91C_PMC_CSS_PLLA_CLK | MCKR_SETTINGS) ++ ++/* ******************************************************************* */ ++/* NandFlash Settings */ ++/* */ ++/* ******************************************************************* */ ++#define AT91C_SMARTMEDIA_BASE 0x40000000 ++ ++#define AT91_SMART_MEDIA_ALE (1 << 21) /* our ALE is AD21 */ ++#define AT91_SMART_MEDIA_CLE (1 << 22) /* our CLE is AD22 */ ++ ++#define NAND_DISABLE_CE() do { *(volatile unsigned int *)AT91C_PIOD_SODR = AT91C_PIO_PD15;} while(0) ++#define NAND_ENABLE_CE() do { *(volatile unsigned int *)AT91C_PIOD_CODR = AT91C_PIO_PD15;} while(0) ++#define NAND_WAIT_READY() while (!(*(volatile unsigned int *)AT91C_PIOA_PDSR & AT91C_PIO_PA22)) ++ ++/* ******************************************************************* */ ++/* SDRAMC Settings */ ++/* */ ++/* ******************************************************************* */ ++#define AT91C_BASE_SDRAMC AT91C_BASE_SDRAMC0 ++#define AT91C_EBI_SDRAM AT91C_EBI0_SDRAM ++ ++/* ******************************************************************** */ ++/* SMC Chip Select 3 Timings for NandFlash for MASTER_CLOCK = 90000000. */ ++/* Please refer to SMC section in AT91SAM9x datasheet to learn how */ ++/* to generate these values. */ ++/* ******************************************************************** */ ++#define AT91C_SM_NWE_SETUP (1 << 0) ++#define AT91C_SM_NCS_WR_SETUP (0 << 8) ++#define AT91C_SM_NRD_SETUP (1 << 16) ++#define AT91C_SM_NCS_RD_SETUP (0 << 24) ++ ++#define AT91C_SM_NWE_PULSE (3 << 0) ++#define AT91C_SM_NCS_WR_PULSE (3 << 8) ++#define AT91C_SM_NRD_PULSE (3 << 16) ++#define AT91C_SM_NCS_RD_PULSE (3 << 24) ++ ++#define AT91C_SM_NWE_CYCLE (5 << 0) ++#define AT91C_SM_NRD_CYCLE (5 << 16) ++ ++#define AT91C_SM_TDF (2 << 16) ++ ++/* ******************************************************************* */ ++/* BootStrap Settings */ ++/* */ ++/* ******************************************************************* */ ++#define IMG_ADDRESS 0x20000 /* Image Address in NandFlash */ ++#define IMG_SIZE 0x40000 /* Image Size in NandFlash */ ++ ++#define MACH_TYPE 0x6AE /* USB-A9263 */ ++#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ ++ ++/* ******************************************************************* */ ++/* Application Settings */ ++/* ******************************************************************* */ ++#undef CFG_DEBUG ++#undef CFG_DATAFLASH ++ ++#define CFG_NANDFLASH ++#undef NANDFLASH_SMALL_BLOCKS /* NANDFLASH_LARGE_BLOCKS used instead */ ++ ++#define CFG_HW_INIT ++#define CFG_SDRAM ++ ++ ++#endif /* _USB_A9263_H */ +diff --git a/board/usb_a9263/usb_a9263.c b/board/usb_a9263/usb_a9263.c +new file mode 100644 +index 0000000..5630f99 +--- /dev/null ++++ b/board/usb_a9263/usb_a9263.c +@@ -0,0 +1,285 @@ ++/* ---------------------------------------------------------------------------- ++ * ATMEL Microcontroller Software Support - ROUSSET - ++ * ---------------------------------------------------------------------------- ++ * Copyright (c) 2006, Atmel Corporation ++ ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the disclaiimer below. ++ * ++ * Atmel's name may not be used to endorse or promote products derived from ++ * this software without specific prior written permission. ++ * ++ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR ++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE ++ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, ++ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ++ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ++ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ++ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ---------------------------------------------------------------------------- ++ * File Name : usb_a9263.c ++ * Object : ++ * Creation : GH Jun 28th 2012 ++ *----------------------------------------------------------------------------- ++ */ ++#include "../../include/part.h" ++#include "../../include/gpio.h" ++#include "../../include/pmc.h" ++#include "../../include/debug.h" ++#include "../../include/sdramc.h" ++#include "../../include/main.h" ++#ifdef CFG_NANDFLASH ++#include "../../include/nandflash.h" ++#endif ++#ifdef CFG_DATAFLASH ++#include "../../include/dataflash.h" ++#endif ++ ++static inline unsigned int get_cp15(void) ++{ ++ unsigned int value; ++ __asm__("mrc p15, 0, %0, c1, c0, 0" : "=r" (value)); ++ return value; ++} ++ ++static inline void set_cp15(unsigned int value) ++{ ++ __asm__("mcr p15, 0, %0, c1, c0, 0" : : "r" (value)); ++} ++ ++ ++#ifdef CFG_HW_INIT ++/*---------------------------------------------------------------------------- */ ++/* \fn hw_init */ ++/* \brief This function performs very low level HW initialization */ ++/* This function is invoked as soon as possible during the c_startup */ ++/* The bss segment must be initialized */ ++/*---------------------------------------------------------------------------- */ ++void hw_init(void) ++{ ++ /* Configure PIOs */ ++ const struct pio_desc hw_pio[] = { ++#ifdef CFG_DEBUG ++ {"RXD", AT91C_PIN_PC(30), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"TXD", AT91C_PIN_PC(31), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++#endif ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++ ++ /* Disable watchdog */ ++ writel(AT91C_WDTC_WDDIS, AT91C_BASE_WDTC + WDTC_WDMR); ++ ++ /* At this stage the main oscillator is supposed to be enabled ++ * PCK = MCK = MOSC */ ++ ++ /* Configure PLLA = MOSC * (PLL_MULA + 1) / PLL_DIVA */ ++ pmc_cfg_plla(PLLA_SETTINGS, PLL_LOCK_TIMEOUT); ++ ++ /* PCK = PLLA = 2 * MCK */ ++ pmc_cfg_mck(MCKR_SETTINGS, PLL_LOCK_TIMEOUT); ++ /* Switch MCK on PLLA output */ ++ pmc_cfg_mck(MCKR_CSS_SETTINGS, PLL_LOCK_TIMEOUT); ++ ++ ++ /* Configure PLLB */ ++ pmc_cfg_pllb(PLLB_SETTINGS, PLL_LOCK_TIMEOUT); ++ ++ /* Configure the PIO controller to output PCK0 */ ++ pio_setup(hw_pio); ++ ++ /* Configure the EBI0 Slave Slot Cycle to 64 */ ++ writel( (readl((AT91C_BASE_MATRIX + MATRIX_SCFG4)) & ~0xFF) | 0x40, (AT91C_BASE_MATRIX + MATRIX_SCFG4)); ++ ++#ifdef CFG_DEBUG ++ /* Enable Debug messages on the DBGU */ ++ dbg_init(BAUDRATE(MASTER_CLOCK, 115200)); ++ dbg_print("Start AT91Bootstrap...\n\r"); ++#endif /* CFG_DEBUG */ ++ ++#ifdef CFG_SDRAM ++ /* Initialize the matrix */ ++ /* VDDIOMSEL = 1 -> Memories are 3.3V powered */ ++ writel(readl(AT91C_BASE_CCFG + CCFG_EBI0CSA) | (1 << 16) | AT91C_EBI_CS1A_SDRAMC, AT91C_BASE_CCFG + CCFG_EBI0CSA); ++ ++ /* Configure SDRAM Controller */ ++ sdram_init( AT91C_SDRAMC_NC_9 | ++ AT91C_SDRAMC_NR_13 | ++ AT91C_SDRAMC_CAS_2 | ++ AT91C_SDRAMC_NB_4_BANKS | ++ AT91C_SDRAMC_DBW_32_BITS | ++ AT91C_SDRAMC_TWR_2 | ++ AT91C_SDRAMC_TRC_7 | ++ AT91C_SDRAMC_TRP_2 | ++ AT91C_SDRAMC_TRCD_2 | ++ AT91C_SDRAMC_TRAS_5 | ++ AT91C_SDRAMC_TXSR_8, /* Control Register */ ++ (MASTER_CLOCK * 7)/1000000, /* Refresh Timer Register */ ++ AT91C_SDRAMC_MD_SDRAM); /* SDRAM (no low power) */ ++#endif /* CFG_SDRAM */ ++} ++#endif /* CFG_HW_INIT */ ++ ++ ++#ifdef CFG_SDRAM ++//*---------------------------------------------------------------------------- ++//* \fn sdramc_hw_init ++//* \brief This function performs SDRAMC HW initialization ++//*----------------------------------------------------------------------------*/ ++void sdramc_hw_init(void) ++{ ++ /* Configure PIOs */ ++ const struct pio_desc sdramc_pio[] = { ++ {"D16", AT91C_PIN_PD(16), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D17", AT91C_PIN_PD(17), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D18", AT91C_PIN_PD(18), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D19", AT91C_PIN_PD(19), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D20", AT91C_PIN_PD(20), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D21", AT91C_PIN_PD(21), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D22", AT91C_PIN_PD(22), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D23", AT91C_PIN_PD(23), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D24", AT91C_PIN_PD(24), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D25", AT91C_PIN_PD(25), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D26", AT91C_PIN_PD(26), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D27", AT91C_PIN_PD(27), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D28", AT91C_PIN_PD(28), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D29", AT91C_PIN_PD(29), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D30", AT91C_PIN_PD(30), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D31", AT91C_PIN_PD(31), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++ ++ /* Configure the SDRAMC PIO controller */ ++ pio_setup(sdramc_pio); ++} ++#endif ++ ++#ifdef CFG_DATAFLASH ++/*------------------------------------------------------------------------------*/ ++/* \fn df_recovery */ ++/* \brief This function erases DataFlash Page 0 if USER PB is pressed */ ++/* during boot sequence */ ++/*------------------------------------------------------------------------------*/ ++void df_recovery(AT91PS_DF pDf) ++{ ++#if (AT91C_SPI_PCS_DATAFLASH == AT91C_SPI_PCS0_DATAFLASH) ++ /* Configure PIOs */ ++ const struct pio_desc usrpb_pio[] = { ++ {"USRPB", AT91C_PIN_PB(10), 0, PIO_PULLUP, PIO_INPUT}, ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++ ++ /* Configure the PIO controller */ ++ writel((1 << AT91C_ID_PIOB), PMC_PCER + AT91C_BASE_PMC); ++ pio_setup(usrpb_pio); ++ ++ /* If USER PB is pressed during Boot sequence */ ++ /* Erase NandFlash block 0*/ ++ if ( !pio_get_value(AT91C_PIN_PB(10)) ) ++ df_page_erase(pDf, 0); ++#endif ++} ++/*------------------------------------------------------------------------------*/ ++/* \fn df_hw_init */ ++/* \brief This function performs DataFlash HW initialization */ ++/*------------------------------------------------------------------------------*/ ++void df_hw_init(void) ++{ ++ /* Configure PIOs */ ++ const struct pio_desc df_pio[] = { ++ {"MISO", AT91C_PIN_PA(0), 0, PIO_DEFAULT, PIO_PERIPH_B}, ++ {"MOSI", AT91C_PIN_PA(1), 0, PIO_DEFAULT, PIO_PERIPH_B}, ++ {"SPCK", AT91C_PIN_PA(2), 0, PIO_DEFAULT, PIO_PERIPH_B}, ++ {"NPCS0", AT91C_PIN_PA(5), 0, PIO_DEFAULT, PIO_PERIPH_B}, ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++ ++ /* Configure the PIO controller */ ++ pio_setup(df_pio); ++} ++#endif /* CFG_DATAFLASH */ ++ ++ ++#ifdef CFG_NANDFLASH ++/*------------------------------------------------------------------------------*/ ++/* \fn nand_recovery */ ++/* \brief This function erases NandFlash Block 0 if USER PB is pressed */ ++/* during boot sequence */ ++/*------------------------------------------------------------------------------*/ ++static void nand_recovery(void) ++{ ++ /* Configure PIOs */ ++ const struct pio_desc usrpb_pio[] = { ++ {"USRPB", AT91C_PIN_PB(10), 0, PIO_PULLUP, PIO_INPUT}, ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++ ++ /* Configure the PIO controller */ ++ writel((1 << AT91C_ID_PIOB), PMC_PCER + AT91C_BASE_PMC); ++ pio_setup(usrpb_pio); ++ ++ /* If USER PB is pressed during Boot sequence */ ++ /* Erase NandFlash block 0*/ ++ if (!pio_get_value(AT91C_PIN_PB(10)) ) ++ AT91F_NandEraseBlock0(); ++} ++/*------------------------------------------------------------------------------*/ ++/* \fn nandflash_hw_init */ ++/* \brief NandFlash HW init */ ++/*------------------------------------------------------------------------------*/ ++void nandflash_hw_init(void) ++{ ++ /* Configure PIOs */ ++ const struct pio_desc nand_pio[] = { ++ {"RDY_BSY", AT91C_PIN_PA(22), 0, PIO_PULLUP, PIO_INPUT}, ++ {"NANDCS", AT91C_PIN_PD(15), 0, PIO_PULLUP, PIO_OUTPUT}, ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++ ++ /* Setup Smart Media, first enable the address range of CS3 in HMATRIX user interface */ ++ writel(readl(AT91C_BASE_CCFG + CCFG_EBI0CSA) | AT91C_EBI_CS3A_SM, AT91C_BASE_CCFG + CCFG_EBI0CSA); ++ ++ /* Configure SMC CS3 */ ++ writel((AT91C_SM_NWE_SETUP | AT91C_SM_NCS_WR_SETUP | AT91C_SM_NRD_SETUP | AT91C_SM_NCS_RD_SETUP), AT91C_BASE_SMC0 + SMC_SETUP3); ++ writel((AT91C_SM_NWE_PULSE | AT91C_SM_NCS_WR_PULSE | AT91C_SM_NRD_PULSE | AT91C_SM_NCS_RD_PULSE), AT91C_BASE_SMC0 + SMC_PULSE3); ++ writel((AT91C_SM_NWE_CYCLE | AT91C_SM_NRD_CYCLE) , AT91C_BASE_SMC0 + SMC_CYCLE3); ++ writel((AT91C_SMC_READMODE | AT91C_SMC_WRITEMODE | AT91C_SMC_NWAITM_NWAIT_DISABLE | ++ AT91C_SMC_DBW_WIDTH_SIXTEEN_BITS | AT91C_SM_TDF) , AT91C_BASE_SMC0 + SMC_CTRL3); ++ ++ /* Configure the PIO controller */ ++ writel((1 << AT91C_ID_PIOA), PMC_PCER + AT91C_BASE_PMC); ++ writel((1 << AT91C_ID_PIOCDE), PMC_PCER + AT91C_BASE_PMC); ++ ++ pio_setup(nand_pio); ++ ++ nand_recovery(); ++} ++ ++/*------------------------------------------------------------------------------*/ ++/* \fn nandflash_cfg_16bits_dbw_init */ ++/* \brief Configure SMC in 16 bits mode */ ++/*------------------------------------------------------------------------------*/ ++void nandflash_cfg_16bits_dbw_init(void) ++{ ++ writel(readl(AT91C_BASE_SMC0 + SMC_CTRL3) | AT91C_SMC_DBW_WIDTH_SIXTEEN_BITS, AT91C_BASE_SMC0 + SMC_CTRL3); ++} ++ ++/*------------------------------------------------------------------------------*/ ++/* \fn nandflash_cfg_8bits_dbw_init */ ++/* \brief Configure SMC in 8 bits mode */ ++/*------------------------------------------------------------------------------*/ ++void nandflash_cfg_8bits_dbw_init(void) ++{ ++ writel((readl(AT91C_BASE_SMC0 + SMC_CTRL3) & ~(AT91C_SMC_DBW)) | AT91C_SMC_DBW_WIDTH_EIGTH_BITS, AT91C_BASE_SMC0 + SMC_CTRL3); ++} ++ ++#endif /* #ifdef CFG_NANDFLASH */ ++ ++ +diff --git a/crt0_gnu.S b/crt0_gnu.S +index 042b617..002feef 100644 +--- a/crt0_gnu.S ++++ b/crt0_gnu.S +@@ -106,6 +106,13 @@ _relocate_to_sram: + #endif /* CFG_NORFLASH */ + + _setup_clocks: ++/* Test if main osc is bypassed */ ++ ldr r0,=AT91C_PMC_MOR ++ ldr r1, [r0] ++ ldr r2,=AT91C_CKGR_OSCBYPASS ++ ands r1, r1, r2 ++ bne _init_data /* branch if OSCBYPASS=1 */ ++ + /* Test if main oscillator is enabled */ + ldr r0,=AT91C_PMC_SR + ldr r1, [r0] +diff --git a/driver/dataflash.c b/driver/dataflash.c +index e28e49e..4de295a 100644 +--- a/driver/dataflash.c ++++ b/driver/dataflash.c +@@ -293,14 +293,14 @@ static int df_init (AT91PS_DF pDf) + pDf->dfDescription.pages_size = 264; + pDf->dfDescription.page_offset = 9; + break; +- ++*/ + case AT45DB021B: + pDf->dfDescription.pages_number = 1024; + pDf->dfDescription.pages_size = 264; + pDf->dfDescription.page_offset = 9; + break; + +- case AT45DB041B: ++/* case AT45DB041B: + pDf->dfDescription.pages_number = 2048; + pDf->dfDescription.pages_size = 264; + pDf->dfDescription.page_offset = 9; +@@ -373,7 +373,7 @@ int load_df(unsigned int pcs, unsigned int img_addr, unsigned int img_size, unsi + if (!df_init(pDf)) + return -1; + +-#if defined(AT91SAM9260) || defined(AT91SAM9XE) || defined(AT91SAM9G20) ++#if defined(AT91SAM9260) || defined(AT91SAM9263) || defined(AT91SAM9XE) || defined(AT91SAM9G20) + /* Test if a button has been pressed or not */ + /* Erase Page 0 to avoid infinite loop */ + df_recovery(pDf); +diff --git a/include/part.h b/include/part.h +index ba5985a..a1863d0 100644 +--- a/include/part.h ++++ b/include/part.h +@@ -61,7 +61,11 @@ + + #ifdef AT91SAM9263 + #include "AT91SAM9263_inc.h" +-#include "at91sam9263ek.h" ++ #ifdef at91sam9263ek ++ #include "at91sam9263ek.h" ++ #elif usb_a9263 ++ #include "usb-a9263.h" ++ #endif + #endif + + #ifdef AT91CAP9 +-- +1.5.6.3 + diff --git a/board/calao/usb-a9263/linux-3.4.4.config b/board/calao/usb-a9263/linux-3.4.4.config new file mode 100644 index 0000000000..8c71231f38 --- /dev/null +++ b/board/calao/usb-a9263/linux-3.4.4.config @@ -0,0 +1,102 @@ +CONFIG_EXPERIMENTAL=y +# CONFIG_LOCALVERSION_AUTO is not set +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_SLAB=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_ARCH_AT91=y +CONFIG_ARCH_AT91SAM9263=y +CONFIG_MACH_USB_A9263=y +CONFIG_AT91_SLOW_CLOCK=y +# CONFIG_ARM_THUMB is not set +CONFIG_AEABI=y +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="mem=64M console=ttyS0,115200" +CONFIG_FPE_NWFPE=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_ROUTE_VERBOSE=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_IP_MROUTE=y +CONFIG_IP_PIMSM_V1=y +CONFIG_IP_PIMSM_V2=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_IPV6 is not set +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_DATAFLASH=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_ATMEL=y +CONFIG_MTD_NAND_ATMEL_ECC_SOFT=y +CONFIG_MTD_UBI=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y +CONFIG_SCSI_MULTI_LUN=y +CONFIG_NETDEVICES=y +CONFIG_MII=y +CONFIG_MACB=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_EVDEV=y +CONFIG_INPUT_EVBUG=y +# CONFIG_KEYBOARD_ATKBD is not set +CONFIG_KEYBOARD_GPIO=y +# CONFIG_INPUT_MOUSE is not set +# CONFIG_SERIO is not set +CONFIG_SERIAL_ATMEL=y +CONFIG_SERIAL_ATMEL_CONSOLE=y +CONFIG_HW_RANDOM=y +CONFIG_SPI=y +CONFIG_SPI_ATMEL=y +# CONFIG_HWMON is not set +# CONFIG_USB_HID is not set +CONFIG_USB=y +CONFIG_USB_DEVICEFS=y +CONFIG_USB_MON=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_STORAGE=y +CONFIG_USB_GADGET=y +CONFIG_USB_ETH=m +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_EXT2_FS=y +CONFIG_FUSE_FS=m +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_JFFS2_FS=y +CONFIG_UBIFS_FS=y +CONFIG_UBIFS_FS_XATTR=y +CONFIG_UBIFS_FS_ADVANCED_COMPR=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_ROOT_NFS=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_850=y +CONFIG_NLS_ISO8859_1=y +CONFIG_DEBUG_KERNEL=y +CONFIG_DEBUG_USER=y +CONFIG_DEBUG_LL=y diff --git a/board/calao/usb-a9g20-lpw/at91bootstrap-1.16-usb-a9g20-lpw.patch b/board/calao/usb-a9g20-lpw/at91bootstrap-1.16-usb-a9g20-lpw.patch new file mode 100644 index 0000000000..06a89edd6b --- /dev/null +++ b/board/calao/usb-a9g20-lpw/at91bootstrap-1.16-usb-a9g20-lpw.patch @@ -0,0 +1,610 @@ +From 8d84757d5170969e8bdfebc7951f43c5aa2b05fd Mon Sep 17 00:00:00 2001 +From: Gregory Hermant +Date: Fri, 6 Jul 2012 16:32:47 +0200 +Subject: [PATCH] Add support for the Calao-systems USB-A9G20-LPW + + +Signed-off-by: Gregory Hermant +--- + board/usb_a9g20_lpw/nandflash/Makefile | 121 ++++++++++ + board/usb_a9g20_lpw/nandflash/usb-a9g20-lpw.h | 112 +++++++++ + board/usb_a9g20_lpw/usb_a9g20_lpw.c | 303 +++++++++++++++++++++++++ + crt0_gnu.S | 7 + + include/part.h | 6 +- + 5 files changed, 548 insertions(+), 1 deletions(-) + create mode 100644 board/usb_a9g20_lpw/nandflash/Makefile + create mode 100644 board/usb_a9g20_lpw/nandflash/usb-a9g20-lpw.h + create mode 100644 board/usb_a9g20_lpw/usb_a9g20_lpw.c + +diff --git a/board/usb_a9g20_lpw/nandflash/Makefile b/board/usb_a9g20_lpw/nandflash/Makefile +new file mode 100644 +index 0000000..8c9d99a +--- /dev/null ++++ b/board/usb_a9g20_lpw/nandflash/Makefile +@@ -0,0 +1,121 @@ ++# TODO: set this appropriately for your local toolchain ++ifndef ERASE_FCT ++ERASE_FCT=rm -f ++endif ++ifndef CROSS_COMPILE ++CROSS_COMPILE=arm-elf- ++endif ++ ++TOOLCHAIN=gcc ++ ++BOOTSTRAP_PATH=../../.. ++ ++# NandFlashBoot Configuration for USB-A9G20-LPW ++ ++# Target name (case sensitive!!!) ++TARGET=AT91SAM9G20 ++# Board name (case sensitive!!!) ++BOARD=usb_a9g20_lpw ++# Link Address and Top_of_Memory ++LINK_ADDR=0x200000 ++TOP_OF_MEMORY=0x301000 ++# Name of current directory ++PROJECT=nandflash ++ ++ifndef BOOT_NAME ++BOOT_NAME=$(PROJECT)_$(BOARD) ++endif ++ ++INCL=./$(BOOTSTRAP_PATH)/board/$(BOARD)/$(PROJECT) ++ ++ifeq ($(TOOLCHAIN), gcc) ++ ++AS=$(CROSS_COMPILE)gcc ++CC=$(CROSS_COMPILE)gcc ++LD=$(CROSS_COMPILE)gcc ++NM= $(CROSS_COMPILE)nm ++SIZE=$(CROSS_COMPILE)size ++OBJCOPY=$(CROSS_COMPILE)objcopy ++OBJDUMP=$(CROSS_COMPILE)objdump ++CCFLAGS=-g -mcpu=arm926ej-s -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) ++ASFLAGS=-g -mcpu=arm926ej-s -c -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY) ++ ++# Linker flags. ++# -Wl,...: tell GCC to pass this to linker. ++# -Map: create map file ++# --cref: add cross reference to map file ++LDFLAGS+=-nostartfiles -nostdlib -Wl,-Map=$(BOOT_NAME).map,--cref ++LDFLAGS+=-T $(BOOTSTRAP_PATH)/elf32-littlearm.lds -Ttext $(LINK_ADDR) ++OBJS=crt0_gnu.o ++ ++endif ++ ++OBJS+=\ ++ $(BOARD).o \ ++ main.o \ ++ gpio.o \ ++ pmc.o \ ++ debug.o \ ++ sdramc.o \ ++ nandflash.o \ ++ _udivsi3.o \ ++ _umodsi3.o \ ++ div0.o \ ++ udiv.o \ ++ string.o ++ ++rebuild: clean all ++ ++all: $(BOOT_NAME) ++ ++ifeq ($(TOOLCHAIN), gcc) ++$(BOOT_NAME): $(OBJS) ++ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS) ++ $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin ++endif ++ ++ ++$(BOARD).o: $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c -o $(BOARD).o ++ ++main.o: $(BOOTSTRAP_PATH)/main.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/main.c -o main.o ++ ++gpio.o: $(BOOTSTRAP_PATH)/driver/gpio.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/gpio.c -o gpio.o ++ ++pmc.o: $(BOOTSTRAP_PATH)/driver/pmc.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/pmc.c -o pmc.o ++ ++debug.o: $(BOOTSTRAP_PATH)/driver/debug.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/debug.c -o debug.o ++ ++sdramc.o: $(BOOTSTRAP_PATH)/driver/sdramc.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/sdramc.c -o sdramc.o ++ ++dataflash.o: $(BOOTSTRAP_PATH)/driver/dataflash.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/dataflash.c -o dataflash.o ++ ++nandflash.o: $(BOOTSTRAP_PATH)/driver/nandflash.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/nandflash.c -o nandflash.o ++ ++crt0_gnu.o: $(BOOTSTRAP_PATH)/crt0_gnu.S ++ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/crt0_gnu.S -o crt0_gnu.o ++ ++div0.o: $(BOOTSTRAP_PATH)/lib/div0.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/div0.c -o div0.o ++ ++string.o: $(BOOTSTRAP_PATH)/lib/string.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/string.c -o string.o ++ ++udiv.o: $(BOOTSTRAP_PATH)/lib/udiv.c ++ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/udiv.c -o udiv.o ++ ++_udivsi3.o: $(BOOTSTRAP_PATH)/lib/_udivsi3.S ++ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/lib/_udivsi3.S -o _udivsi3.o ++ ++_umodsi3.o: $(BOOTSTRAP_PATH)/lib/_umodsi3.S ++ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/lib/_umodsi3.S -o _umodsi3.o ++ ++clean: ++ $(ERASE_FCT) *.o *.bin *.elf *.map +diff --git a/board/usb_a9g20_lpw/nandflash/usb-a9g20-lpw.h b/board/usb_a9g20_lpw/nandflash/usb-a9g20-lpw.h +new file mode 100644 +index 0000000..c0bdc6e +--- /dev/null ++++ b/board/usb_a9g20_lpw/nandflash/usb-a9g20-lpw.h +@@ -0,0 +1,112 @@ ++/* ---------------------------------------------------------------------------- ++ * ATMEL Microcontroller Software Support - ROUSSET - ++ * ---------------------------------------------------------------------------- ++ * Copyright (c) 2008, Atmel Corporation ++ ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the disclaimer below. ++ * ++ * Atmel's name may not be used to endorse or promote products derived from ++ * this software without specific prior written permission. ++ * ++ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR ++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE ++ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, ++ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ++ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ++ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ++ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ---------------------------------------------------------------------------- ++ * File Name : usb-a9g20-lpw.h ++ * Object : ++ * Creation : GH July 6th 2012 ++ *----------------------------------------------------------------------------- ++ */ ++#ifndef _USB_A9G20_LPW_H ++#define _USB_A9G20_LPW_H ++ ++/* ******************************************************************* */ ++/* PMC Settings */ ++/* */ ++/* The main oscillator is enabled as soon as possible in the c_startup */ ++/* and MCK is switched on the main oscillator. */ ++/* PLL initialization is done later in the hw_init() function */ ++/* ******************************************************************* */ ++#define MASTER_CLOCK (133000000) ++#define PLL_LOCK_TIMEOUT 1000000 ++ ++/* Set PLLA to 798Mhz */ ++#define PLLA_SETTINGS 0x20843F02 ++#define PLLB_SETTINGS 0x100F3F02 ++ ++/* Switch MCK on PLLA output PCK = PLLA/2 = 3 * MCK */ ++#define MCKR_SETTINGS 0x1300 ++#define MCKR_CSS_SETTINGS (AT91C_PMC_CSS_PLLA_CLK | MCKR_SETTINGS) ++ ++/* ******************************************************************* */ ++/* NandFlash Settings */ ++/* */ ++/* ******************************************************************* */ ++#define AT91C_SMARTMEDIA_BASE 0x40000000 ++ ++#define AT91_SMART_MEDIA_ALE (1 << 21) /* our ALE is AD21 */ ++#define AT91_SMART_MEDIA_CLE (1 << 22) /* our CLE is AD22 */ ++ ++#define NAND_DISABLE_CE() do { *(volatile unsigned int *)AT91C_PIOC_SODR = AT91C_PIO_PC14;} while(0) ++#define NAND_ENABLE_CE() do { *(volatile unsigned int *)AT91C_PIOC_CODR = AT91C_PIO_PC14;} while(0) ++ ++#define NAND_WAIT_READY() while (!(*(volatile unsigned int *)AT91C_PIOC_PDSR & AT91C_PIO_PC13)) ++ ++ ++/* ******************************************************************** */ ++/* SMC Chip Select 3 Timings for NandFlash for MASTER_CLOCK = 133000000.*/ ++/* Please refer to SMC section in AT91SAM9 datasheet to learn how */ ++/* to generate these values. */ ++/* ******************************************************************** */ ++#define AT91C_SM_NWE_SETUP (2 << 0) ++#define AT91C_SM_NCS_WR_SETUP (0 << 8) ++#define AT91C_SM_NRD_SETUP (2 << 16) ++#define AT91C_SM_NCS_RD_SETUP (0 << 24) ++ ++#define AT91C_SM_NWE_PULSE (4 << 0) ++#define AT91C_SM_NCS_WR_PULSE (4 << 8) ++#define AT91C_SM_NRD_PULSE (4 << 16) ++#define AT91C_SM_NCS_RD_PULSE (4 << 24) ++ ++#define AT91C_SM_NWE_CYCLE (7 << 0) ++#define AT91C_SM_NRD_CYCLE (7 << 16) ++ ++#define AT91C_SM_TDF (3 << 16) ++ ++/* ******************************************************************* */ ++/* BootStrap Settings */ ++/* */ ++/* ******************************************************************* */ ++#define IMG_ADDRESS 0x20000 /* Image Address in NandFlash */ ++#define IMG_SIZE 0x40000 /* Image Size in NandFlash */ ++ ++#define MACH_TYPE 0x731 /* USB-A9G20 */ ++#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ ++ ++/* ******************************************************************* */ ++/* Application Settings */ ++/* ******************************************************************* */ ++#undef CFG_DEBUG ++#undef CFG_DATAFLASH ++ ++#define CFG_NANDFLASH ++#undef NANDFLASH_SMALL_BLOCKS /* NANDFLASH_LARGE_BLOCKS used instead */ ++#undef CFG_NANDFLASH_RECOVERY ++ ++#define CFG_SDRAM ++#define CFG_HW_INIT ++ ++#endif /* _USB_A9G20_LPW_H */ +diff --git a/board/usb_a9g20_lpw/usb_a9g20_lpw.c b/board/usb_a9g20_lpw/usb_a9g20_lpw.c +new file mode 100644 +index 0000000..c372307 +--- /dev/null ++++ b/board/usb_a9g20_lpw/usb_a9g20_lpw.c +@@ -0,0 +1,303 @@ ++/* ---------------------------------------------------------------------------- ++ * ATMEL Microcontroller Software Support - ROUSSET - ++ * ---------------------------------------------------------------------------- ++ * Copyright (c) 2008, Atmel Corporation ++ ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the disclaimer below. ++ * ++ * Atmel's name may not be used to endorse or promote products derived from ++ * this software without specific prior written permission. ++ * ++ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR ++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE ++ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, ++ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ++ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ++ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ++ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ---------------------------------------------------------------------------- ++ * File Name : usb_a9g20_lpw.c ++ * Object : ++ * Creation : GH July 6th 2012 ++ *----------------------------------------------------------------------------- ++ */ ++#include "../../include/part.h" ++#include "../../include/gpio.h" ++#include "../../include/pmc.h" ++#include "../../include/debug.h" ++#include "../../include/sdramc.h" ++#include "../../include/main.h" ++#ifdef CFG_NANDFLASH ++#include "../../include/nandflash.h" ++#endif ++#ifdef CFG_DATAFLASH ++#include "../../include/dataflash.h" ++#endif ++ ++static inline unsigned int get_cp15(void) ++{ ++ unsigned int value; ++ __asm__("mrc p15, 0, %0, c1, c0, 0" : "=r" (value)); ++ return value; ++} ++ ++static inline void set_cp15(unsigned int value) ++{ ++ __asm__("mcr p15, 0, %0, c1, c0, 0" : : "r" (value)); ++} ++ ++#ifdef CFG_HW_INIT ++/*----------------------------------------------------------------------------*/ ++/* \fn hw_init */ ++/* \brief This function performs very low level HW initialization */ ++/* This function is invoked as soon as possible during the c_startup */ ++/* The bss segment must be initialized */ ++/*----------------------------------------------------------------------------*/ ++void hw_init(void) ++{ ++ unsigned int cp15; ++ ++ /* Configure PIOs */ ++ const struct pio_desc hw_pio[] = { ++#ifdef CFG_DEBUG ++ {"RXD", AT91C_PIN_PB(14), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"TXD", AT91C_PIN_PB(15), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++#endif ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++ ++ /* Disable watchdog */ ++ writel(AT91C_WDTC_WDDIS, AT91C_BASE_WDTC + WDTC_WDMR); ++ ++ /* At this stage the main oscillator is supposed to be enabled ++ * PCK = MCK = MOSC */ ++ writel(0x00, AT91C_BASE_PMC + PMC_PLLICPR); ++ ++ /* Configure PLLA = MOSC * (PLL_MULA + 1) / PLL_DIVA */ ++ pmc_cfg_plla(PLLA_SETTINGS, PLL_LOCK_TIMEOUT); ++ ++ /* PCK = PLLA/2 = 3 * MCK */ ++ pmc_cfg_mck(MCKR_SETTINGS, PLL_LOCK_TIMEOUT); ++ /* Switch MCK on PLLA output */ ++ pmc_cfg_mck(MCKR_CSS_SETTINGS, PLL_LOCK_TIMEOUT); ++ ++ /* Configure PLLB */ ++ pmc_cfg_pllb(PLLB_SETTINGS, PLL_LOCK_TIMEOUT); ++ ++ /* Configure CP15 */ ++ cp15 = get_cp15(); ++ cp15 |= I_CACHE; ++ set_cp15(cp15); ++ ++ /* Configure the PIO controller */ ++ pio_setup(hw_pio); ++ ++ /* Configure the EBI Slave Slot Cycle to 64 */ ++ writel((readl((AT91C_BASE_MATRIX + MATRIX_SCFG3)) & ~0xFF) | 0x40, (AT91C_BASE_MATRIX + MATRIX_SCFG3)); ++ ++#ifdef CFG_DEBUG ++ /* Enable Debug messages on the DBGU */ ++ dbg_init(BAUDRATE(MASTER_CLOCK, 115200)); ++ ++ dbg_print("Start AT91Bootstrap...\n\r"); ++#endif /* CFG_DEBUG */ ++ ++#ifdef CFG_SDRAM ++ /* Initialize the matrix (VDDIOSEL=0: memory voltage = 1.8V ) */ ++ writel((readl(AT91C_BASE_CCFG + CCFG_EBICSA) & ~0x00010000) | AT91C_EBI_CS1A_SDRAMC , AT91C_BASE_CCFG + CCFG_EBICSA); ++ ++ /* Configure SDRAM Controller */ ++ sdram_init( AT91C_SDRAMC_NC_9 | ++ AT91C_SDRAMC_NR_13 | ++ AT91C_SDRAMC_CAS_3 | ++ AT91C_SDRAMC_NB_4_BANKS | ++ AT91C_SDRAMC_DBW_32_BITS | ++ AT91C_SDRAMC_TWR_3 | ++ AT91C_SDRAMC_TRC_9 | ++ AT91C_SDRAMC_TRP_3 | ++ AT91C_SDRAMC_TRCD_3 | ++ AT91C_SDRAMC_TRAS_6 | ++ AT91C_SDRAMC_TXSR_10, /* Control Register */ ++ (MASTER_CLOCK * 7)/1000000, /* Refresh Timer Register */ ++ AT91C_SDRAMC_MD_SDRAM); /* SDRAM (no low power) */ ++ ++#endif /* CFG_SDRAM */ ++} ++#endif /* CFG_HW_INIT */ ++ ++#ifdef CFG_SDRAM ++/*------------------------------------------------------------------------------*/ ++/* \fn sdramc_hw_init */ ++/* \brief This function performs SDRAMC HW initialization */ ++/*------------------------------------------------------------------------------*/ ++void sdramc_hw_init(void) ++{ ++ /* Configure PIOs */ ++/* const struct pio_desc sdramc_pio[] = { ++ {"D16", AT91C_PIN_PC(16), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D17", AT91C_PIN_PC(17), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D18", AT91C_PIN_PC(18), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D19", AT91C_PIN_PC(19), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D20", AT91C_PIN_PC(20), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D21", AT91C_PIN_PC(21), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D22", AT91C_PIN_PC(22), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D23", AT91C_PIN_PC(23), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D24", AT91C_PIN_PC(24), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D25", AT91C_PIN_PC(25), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D26", AT91C_PIN_PC(26), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D27", AT91C_PIN_PC(27), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D28", AT91C_PIN_PC(28), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D29", AT91C_PIN_PC(29), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D30", AT91C_PIN_PC(30), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"D31", AT91C_PIN_PC(31), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++*/ ++ /* Configure the SDRAMC PIO controller to output PCK0 */ ++/* pio_setup(sdramc_pio); */ ++ ++ writel(0xFFFF0000, AT91C_BASE_PIOC + PIO_ASR(0)); ++ writel(0xFFFF0000, AT91C_BASE_PIOC + PIO_PDR(0)); ++ ++} ++#endif /* CFG_SDRAM */ ++ ++#ifdef CFG_DATAFLASH ++ ++/*------------------------------------------------------------------------------*/ ++/* \fn df_recovery */ ++/* \brief This function erases DataFlash Page 0 if USR PB is pressed */ ++/* during boot sequence */ ++/*------------------------------------------------------------------------------*/ ++void df_recovery(AT91PS_DF pDf) ++{ ++#if (AT91C_SPI_PCS_DATAFLASH == AT91C_SPI_PCS1_DATAFLASH) ++ /* Configure PIOs */ ++ const struct pio_desc usrpb[] = { ++ {"USRPB", AT91C_PIN_PB(10), 0, PIO_PULLUP, PIO_INPUT}, ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++ ++ /* Configure the PIO controller */ ++ writel((1 << AT91C_ID_PIOB), PMC_PCER + AT91C_BASE_PMC); ++ pio_setup(usrpb); ++ ++ /* If USR PB is pressed during Boot sequence */ ++ /* Erase NandFlash block 0*/ ++ if ( !pio_get_value(AT91C_PIN_PB(10)) ) ++ df_page_erase(pDf, 0); ++#endif ++} ++ ++/*------------------------------------------------------------------------------*/ ++/* \fn df_hw_init */ ++/* \brief This function performs DataFlash HW initialization */ ++/*------------------------------------------------------------------------------*/ ++void df_hw_init(void) ++{ ++ /* Configure PIOs */ ++ const struct pio_desc df_pio[] = { ++ {"MISO", AT91C_PIN_PA(0), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"MOSI", AT91C_PIN_PA(1), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ {"SPCK", AT91C_PIN_PA(2), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++#if (AT91C_SPI_PCS_DATAFLASH == AT91C_SPI_PCS0_DATAFLASH) ++ {"NPCS0", AT91C_PIN_PA(3), 0, PIO_DEFAULT, PIO_PERIPH_A}, ++#endif ++#if (AT91C_SPI_PCS_DATAFLASH == AT91C_SPI_PCS1_DATAFLASH) ++ {"NPCS1", AT91C_PIN_PC(11), 0, PIO_DEFAULT, PIO_PERIPH_B}, ++#endif ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++ ++ /* Configure the PIO controller */ ++ pio_setup(df_pio); ++} ++#endif /* CFG_DATAFLASH */ ++ ++ ++ ++#ifdef CFG_NANDFLASH ++/*------------------------------------------------------------------------------*/ ++/* \fn nand_recovery */ ++/* \brief This function erases NandFlash Block 0 if USER PB is pressed */ ++/* during boot sequence */ ++/*------------------------------------------------------------------------------*/ ++#ifdef CFG_NANDFLASH_RECOVERY ++static void nand_recovery(void) ++{ ++ /* Configure PIOs */ ++ const struct pio_desc usrpb[] = { ++ {"USRPB", AT91C_PIN_PB(10), 0, PIO_PULLUP, PIO_INPUT}, ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++ ++ /* Configure the PIO controller */ ++ writel((1 << AT91C_ID_PIOB), PMC_PCER + AT91C_BASE_PMC); ++ pio_setup(usrpb); ++ ++ /* If USER PB is pressed during Boot sequence */ ++ /* Erase NandFlash block 0*/ ++ if (!pio_get_value(AT91C_PIN_PB(10)) ) ++ AT91F_NandEraseBlock0(); ++} ++#else ++static void nand_recovery(void) {} ++#endif ++/*------------------------------------------------------------------------------*/ ++/* \fn nandflash_hw_init */ ++/* \brief NandFlash HW init */ ++/*------------------------------------------------------------------------------*/ ++void nandflash_hw_init(void) ++{ ++ /* Configure PIOs */ ++ const struct pio_desc nand_pio[] = { ++ {"RDY_BSY", AT91C_PIN_PC(13), 0, PIO_PULLUP, PIO_INPUT}, ++ {"NANDCS", AT91C_PIN_PC(14), 0, PIO_PULLUP, PIO_OUTPUT}, ++ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, ++ }; ++ ++ /* Setup Smart Media, first enable the address range of CS3 in HMATRIX user interface */ ++ writel(readl(AT91C_BASE_CCFG + CCFG_EBICSA) | AT91C_EBI_CS3A_SM, AT91C_BASE_CCFG + CCFG_EBICSA); ++ ++ /* Configure SMC CS3 */ ++ writel((AT91C_SM_NWE_SETUP | AT91C_SM_NCS_WR_SETUP | AT91C_SM_NRD_SETUP | AT91C_SM_NCS_RD_SETUP), AT91C_BASE_SMC + SMC_SETUP3); ++ writel((AT91C_SM_NWE_PULSE | AT91C_SM_NCS_WR_PULSE | AT91C_SM_NRD_PULSE | AT91C_SM_NCS_RD_PULSE), AT91C_BASE_SMC + SMC_PULSE3); ++ writel((AT91C_SM_NWE_CYCLE | AT91C_SM_NRD_CYCLE) , AT91C_BASE_SMC + SMC_CYCLE3); ++ writel((AT91C_SMC_READMODE | AT91C_SMC_WRITEMODE | AT91C_SMC_NWAITM_NWAIT_DISABLE | ++ AT91C_SMC_DBW_WIDTH_SIXTEEN_BITS | AT91C_SM_TDF) , AT91C_BASE_SMC + SMC_CTRL3); ++ ++ /* Configure the PIO controller */ ++ writel((1 << AT91C_ID_PIOC), PMC_PCER + AT91C_BASE_PMC); ++ pio_setup(nand_pio); ++ ++ nand_recovery(); ++} ++ ++/*------------------------------------------------------------------------------*/ ++/* \fn nandflash_cfg_16bits_dbw_init */ ++/* \brief Configure SMC in 16 bits mode */ ++/*------------------------------------------------------------------------------*/ ++void nandflash_cfg_16bits_dbw_init(void) ++{ ++ writel(readl(AT91C_BASE_SMC + SMC_CTRL3) | AT91C_SMC_DBW_WIDTH_SIXTEEN_BITS, AT91C_BASE_SMC + SMC_CTRL3); ++} ++ ++/*------------------------------------------------------------------------------*/ ++/* \fn nandflash_cfg_8bits_dbw_init */ ++/* \brief Configure SMC in 8 bits mode */ ++/*------------------------------------------------------------------------------*/ ++void nandflash_cfg_8bits_dbw_init(void) ++{ ++ writel((readl(AT91C_BASE_SMC + SMC_CTRL3) & ~(AT91C_SMC_DBW)) | AT91C_SMC_DBW_WIDTH_EIGTH_BITS, AT91C_BASE_SMC + SMC_CTRL3); ++} ++ ++#endif /* #ifdef CFG_NANDFLASH */ +diff --git a/crt0_gnu.S b/crt0_gnu.S +index 042b617..002feef 100644 +--- a/crt0_gnu.S ++++ b/crt0_gnu.S +@@ -106,6 +106,13 @@ _relocate_to_sram: + #endif /* CFG_NORFLASH */ + + _setup_clocks: ++/* Test if main osc is bypassed */ ++ ldr r0,=AT91C_PMC_MOR ++ ldr r1, [r0] ++ ldr r2,=AT91C_CKGR_OSCBYPASS ++ ands r1, r1, r2 ++ bne _init_data /* branch if OSCBYPASS=1 */ ++ + /* Test if main oscillator is enabled */ + ldr r0,=AT91C_PMC_SR + ldr r1, [r0] +diff --git a/include/part.h b/include/part.h +index ba5985a..1d7392a 100644 +--- a/include/part.h ++++ b/include/part.h +@@ -46,7 +46,11 @@ + + #ifdef AT91SAM9G20 + #include "AT91SAM9260_inc.h" +-#include "at91sam9g20ek.h" ++ #ifdef at91sam9g20ek ++ #include "at91sam9g20ek.h" ++ #elif usb_a9g20_lpw ++ #include "usb-a9g20-lpw.h" ++ #endif + #endif + + #ifdef AT91SAM9261 +-- +1.5.6.3 + diff --git a/board/calao/usb-a9g20-lpw/barebox-2012.07.0-usb-a9g20-lpw.patch b/board/calao/usb-a9g20-lpw/barebox-2012.07.0-usb-a9g20-lpw.patch new file mode 100644 index 0000000000..cea8bb8c0a --- /dev/null +++ b/board/calao/usb-a9g20-lpw/barebox-2012.07.0-usb-a9g20-lpw.patch @@ -0,0 +1,12 @@ +diff --git a/arch/arm/configs/usb_a9g20_defconfig b/arch/arm/configs/usb_a9g20_defconfig +index 30bf380..7716e0e 100644 +--- a/arch/arm/configs/usb_a9g20_defconfig ++++ b/arch/arm/configs/usb_a9g20_defconfig +@@ -15,6 +15,7 @@ CONFIG_HUSH_FANCY_PROMPT=y + CONFIG_CMDLINE_EDITING=y + CONFIG_AUTO_COMPLETE=y + CONFIG_MENU=y ++# CONFIG_ERRNO_MESSAGES is not set + # CONFIG_CONSOLE_ACTIVATE_FIRST is not set + CONFIG_CONSOLE_ACTIVATE_ALL=y + CONFIG_PARTITION=y diff --git a/board/calao/usb-a9g20-lpw/linux-3.4.4.config b/board/calao/usb-a9g20-lpw/linux-3.4.4.config new file mode 100644 index 0000000000..56eb04bd73 --- /dev/null +++ b/board/calao/usb-a9g20-lpw/linux-3.4.4.config @@ -0,0 +1,105 @@ +CONFIG_EXPERIMENTAL=y +# CONFIG_LOCALVERSION_AUTO is not set +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_SLAB=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_ARCH_AT91=y +CONFIG_ARCH_AT91SAM9G20=y +CONFIG_MACH_USB_A9G20=y +CONFIG_AT91_SLOW_CLOCK=y +# CONFIG_ARM_THUMB is not set +CONFIG_AEABI=y +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="mem=64M console=ttyS0,115200" +CONFIG_FPE_NWFPE=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_ROUTE_VERBOSE=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_IP_MROUTE=y +CONFIG_IP_PIMSM_V1=y +CONFIG_IP_PIMSM_V2=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_IPV6 is not set +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_DATAFLASH=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_ATMEL=y +CONFIG_MTD_UBI=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y +CONFIG_SCSI_MULTI_LUN=y +CONFIG_NETDEVICES=y +CONFIG_MII=y +CONFIG_MACB=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_EVDEV=y +CONFIG_INPUT_EVBUG=y +# CONFIG_KEYBOARD_ATKBD is not set +CONFIG_KEYBOARD_GPIO=y +# CONFIG_INPUT_MOUSE is not set +# CONFIG_SERIO is not set +CONFIG_SERIAL_ATMEL=y +CONFIG_SERIAL_ATMEL_CONSOLE=y +CONFIG_HW_RANDOM=y +CONFIG_I2C=y +CONFIG_I2C_GPIO=y +CONFIG_SPI=y +CONFIG_SPI_ATMEL=y +# CONFIG_HWMON is not set +# CONFIG_USB_HID is not set +CONFIG_USB=y +CONFIG_USB_DEVICEFS=y +CONFIG_USB_MON=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_STORAGE=y +CONFIG_USB_GADGET=y +CONFIG_USB_ETH=m +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_RV3029C2=y +CONFIG_EXT2_FS=y +CONFIG_FUSE_FS=m +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_JFFS2_FS=y +CONFIG_UBIFS_FS=y +CONFIG_UBIFS_FS_XATTR=y +CONFIG_UBIFS_FS_ADVANCED_COMPR=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_ROOT_NFS=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_850=y +CONFIG_NLS_ISO8859_1=y +CONFIG_DEBUG_KERNEL=y +CONFIG_DEBUG_USER=y +CONFIG_DEBUG_LL=y diff --git a/board/cubietech/cubieboard/boot.cmd b/board/cubietech/cubieboard/boot.cmd new file mode 100644 index 0000000000..849ed00712 --- /dev/null +++ b/board/cubietech/cubieboard/boot.cmd @@ -0,0 +1,4 @@ +setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10 ${extra} +fatload mmc 0 0x43000000 script.bin +fatload mmc 0 0x48000000 uImage +bootm 0x48000000 diff --git a/board/cubietech/cubieboard/linux-cubieboard2.config b/board/cubietech/cubieboard/linux-cubieboard2.config new file mode 100644 index 0000000000..1ae1519f8f --- /dev/null +++ b/board/cubietech/cubieboard/linux-cubieboard2.config @@ -0,0 +1,749 @@ +CONFIG_EXPERIMENTAL=y +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_SYSVIPC=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y +CONFIG_AUDIT=y +CONFIG_IRQ_DOMAIN_DEBUG=y +CONFIG_RCU_FAST_NO_HZ=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=19 +CONFIG_CGROUPS=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CGROUP_DEVICE=y +CONFIG_CPUSETS=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_RESOURCE_COUNTERS=y +CONFIG_CGROUP_MEM_RES_CTLR=y +CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y +CONFIG_CGROUP_MEM_RES_CTLR_KMEM=y +CONFIG_CGROUP_PERF=y +CONFIG_CGROUP_SCHED=y +CONFIG_CFS_BANDWIDTH=y +CONFIG_RT_GROUP_SCHED=y +CONFIG_BLK_CGROUP=y +CONFIG_RELAY=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_KALLSYMS_ALL=y +CONFIG_PERF_COUNTERS=y +# CONFIG_COMPAT_BRK is not set +CONFIG_JUMP_LABEL=y +CONFIG_MODULES=y +CONFIG_MODULE_FORCE_LOAD=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +CONFIG_BLK_DEV_BSGLIB=y +CONFIG_BLK_DEV_INTEGRITY=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_OSF_PARTITION=y +CONFIG_AMIGA_PARTITION=y +CONFIG_MAC_PARTITION=y +CONFIG_BSD_DISKLABEL=y +CONFIG_MINIX_SUBPARTITION=y +CONFIG_SOLARIS_X86_PARTITION=y +CONFIG_UNIXWARE_DISKLABEL=y +CONFIG_SGI_PARTITION=y +CONFIG_SUN_PARTITION=y +CONFIG_KARMA_PARTITION=y +CONFIG_EFI_PARTITION=y +CONFIG_CFQ_GROUP_IOSCHED=y +CONFIG_ARCH_SUN7I=y +CONFIG_SUNXI_SCALING_MIN=408 +# CONFIG_CACHE_L2X0 is not set +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_SMP=y +CONFIG_ARM_ARCH_TIMER=y +CONFIG_NR_CPUS=2 +CONFIG_PREEMPT=y +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +CONFIG_HIGHMEM=y +CONFIG_COMPACTION=y +CONFIG_KSM=y +CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/mmc0p1 rw init=/init loglevel=8" +CONFIG_KEXEC=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_STAT=m +CONFIG_CPU_FREQ_DEFAULT_GOV_FANTASY=y +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=m +CONFIG_CPU_FREQ_GOV_USERSPACE=m +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_INTERACTIVE=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m +CONFIG_CPU_FREQ_USR_EVNT_NOTIFY=y +CONFIG_CPU_FREQ_DVFS=y +CONFIG_CPU_IDLE=y +CONFIG_VFP=y +CONFIG_NEON=y +CONFIG_BINFMT_MISC=y +CONFIG_PM_RUNTIME=y +CONFIG_PM_DEBUG=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM_USER=y +CONFIG_NET_KEY=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_FIB_TRIE_STATS=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_MULTIPATH=y +CONFIG_IP_ROUTE_VERBOSE=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_NET_IPIP=y +CONFIG_NET_IPGRE_DEMUX=m +CONFIG_NET_IPGRE=m +CONFIG_NET_IPGRE_BROADCAST=y +CONFIG_IP_MROUTE=y +CONFIG_IP_MROUTE_MULTIPLE_TABLES=y +CONFIG_IP_PIMSM_V1=y +CONFIG_IP_PIMSM_V2=y +CONFIG_ARPD=y +CONFIG_SYN_COOKIES=y +CONFIG_INET_AH=y +CONFIG_INET_ESP=y +CONFIG_INET_IPCOMP=y +CONFIG_INET_DIAG=m +CONFIG_INET_UDP_DIAG=m +CONFIG_TCP_CONG_ADVANCED=y +CONFIG_TCP_CONG_BIC=y +CONFIG_TCP_CONG_WESTWOOD=y +CONFIG_TCP_CONG_HTCP=y +CONFIG_TCP_CONG_HSTCP=y +CONFIG_TCP_CONG_HYBLA=y +CONFIG_TCP_CONG_SCALABLE=y +CONFIG_TCP_CONG_LP=y +CONFIG_TCP_CONG_VENO=y +CONFIG_TCP_CONG_YEAH=y +CONFIG_TCP_CONG_ILLINOIS=y +CONFIG_TCP_MD5SIG=y +CONFIG_IPV6=y +CONFIG_IPV6_PRIVACY=y +CONFIG_IPV6_ROUTER_PREF=y +CONFIG_IPV6_ROUTE_INFO=y +CONFIG_IPV6_OPTIMISTIC_DAD=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_IPV6_MIP6=m +CONFIG_INET6_XFRM_MODE_TRANSPORT=m +CONFIG_INET6_XFRM_MODE_TUNNEL=m +CONFIG_INET6_XFRM_MODE_BEET=m +CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m +CONFIG_IPV6_SIT=m +CONFIG_IPV6_SIT_6RD=y +CONFIG_IPV6_TUNNEL=m +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_IPV6_SUBTREES=y +CONFIG_IPV6_MROUTE=y +CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y +CONFIG_IPV6_PIMSM_V2=y +# CONFIG_ANDROID_PARANOID_NETWORK is not set +CONFIG_NETWORK_SECMARK=y +CONFIG_NETWORK_PHY_TIMESTAMPING=y +CONFIG_NETFILTER=y +CONFIG_NF_CONNTRACK=m +CONFIG_NF_CONNTRACK_SECMARK=y +CONFIG_NF_CONNTRACK_ZONES=y +CONFIG_NF_CONNTRACK_EVENTS=y +CONFIG_NF_CONNTRACK_TIMEOUT=y +CONFIG_NF_CONNTRACK_TIMESTAMP=y +CONFIG_NF_CT_PROTO_DCCP=m +CONFIG_NF_CT_PROTO_SCTP=m +CONFIG_NF_CT_PROTO_UDPLITE=m +CONFIG_NF_CONNTRACK_AMANDA=m +CONFIG_NF_CONNTRACK_FTP=m +CONFIG_NF_CONNTRACK_H323=m +CONFIG_NF_CONNTRACK_IRC=m +CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_SNMP=m +CONFIG_NF_CONNTRACK_PPTP=m +CONFIG_NF_CONNTRACK_SANE=m +CONFIG_NF_CONNTRACK_SIP=m +CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_CT_NETLINK=m +CONFIG_NF_CT_NETLINK_TIMEOUT=m +CONFIG_NETFILTER_TPROXY=m +CONFIG_NETFILTER_XT_SET=m +CONFIG_NETFILTER_XT_TARGET_AUDIT=m +CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +CONFIG_NETFILTER_XT_TARGET_CONNMARK=m +CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m +CONFIG_NETFILTER_XT_TARGET_CT=m +CONFIG_NETFILTER_XT_TARGET_DSCP=m +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m +CONFIG_NETFILTER_XT_TARGET_LED=m +CONFIG_NETFILTER_XT_TARGET_LOG=m +CONFIG_NETFILTER_XT_TARGET_MARK=m +CONFIG_NETFILTER_XT_TARGET_NFLOG=m +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_TARGET_TEE=m +CONFIG_NETFILTER_XT_TARGET_TPROXY=m +CONFIG_NETFILTER_XT_TARGET_TRACE=m +CONFIG_NETFILTER_XT_TARGET_SECMARK=m +CONFIG_NETFILTER_XT_TARGET_TCPMSS=m +CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m +CONFIG_NETFILTER_XT_MATCH_CLUSTER=m +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_CPU=m +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m +CONFIG_NETFILTER_XT_MATCH_DSCP=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_IPRANGE=m +CONFIG_NETFILTER_XT_MATCH_IPVS=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_NFACCT=m +CONFIG_NETFILTER_XT_MATCH_OSF=m +CONFIG_NETFILTER_XT_MATCH_OWNER=m +CONFIG_NETFILTER_XT_MATCH_POLICY=m +CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_QUOTA=m +CONFIG_NETFILTER_XT_MATCH_QUOTA2=m +CONFIG_NETFILTER_XT_MATCH_RATEEST=m +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_SCTP=m +CONFIG_NETFILTER_XT_MATCH_SOCKET=m +CONFIG_NETFILTER_XT_MATCH_STATE=m +CONFIG_NETFILTER_XT_MATCH_STATISTIC=m +CONFIG_NETFILTER_XT_MATCH_STRING=m +CONFIG_NETFILTER_XT_MATCH_TCPMSS=m +CONFIG_NETFILTER_XT_MATCH_TIME=m +CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_IP_SET=m +CONFIG_IP_SET_BITMAP_IP=m +CONFIG_IP_SET_BITMAP_IPMAC=m +CONFIG_IP_SET_BITMAP_PORT=m +CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPPORT=m +CONFIG_IP_SET_HASH_IPPORTIP=m +CONFIG_IP_SET_HASH_IPPORTNET=m +CONFIG_IP_SET_HASH_NET=m +CONFIG_IP_SET_HASH_NETPORT=m +CONFIG_IP_SET_HASH_NETIFACE=m +CONFIG_IP_SET_LIST_SET=m +CONFIG_IP_VS=m +CONFIG_IP_VS_IPV6=y +CONFIG_IP_VS_PROTO_TCP=y +CONFIG_IP_VS_PROTO_UDP=y +CONFIG_IP_VS_PROTO_ESP=y +CONFIG_IP_VS_PROTO_AH=y +CONFIG_IP_VS_PROTO_SCTP=y +CONFIG_IP_VS_RR=m +CONFIG_IP_VS_WRR=m +CONFIG_IP_VS_LC=m +CONFIG_IP_VS_WLC=m +CONFIG_IP_VS_LBLC=m +CONFIG_IP_VS_LBLCR=m +CONFIG_IP_VS_DH=m +CONFIG_IP_VS_SH=m +CONFIG_IP_VS_SED=m +CONFIG_IP_VS_NQ=m +CONFIG_IP_VS_FTP=m +CONFIG_IP_VS_PE_SIP=m +CONFIG_NF_CONNTRACK_IPV4=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_RPFILTER=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_REJECT_SKERR=y +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_NF_NAT=m +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m +CONFIG_NF_CONNTRACK_IPV6=m +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_AH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_MH=m +CONFIG_IP6_NF_MATCH_RPFILTER=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_TARGET_HL=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_REJECT_SKERR=y +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_RAW=m +CONFIG_BRIDGE_NF_EBTABLES=m +CONFIG_BRIDGE_EBT_BROUTE=m +CONFIG_BRIDGE_EBT_T_FILTER=m +CONFIG_BRIDGE_EBT_T_NAT=m +CONFIG_BRIDGE_EBT_802_3=m +CONFIG_BRIDGE_EBT_AMONG=m +CONFIG_BRIDGE_EBT_ARP=m +CONFIG_BRIDGE_EBT_IP=m +CONFIG_BRIDGE_EBT_IP6=m +CONFIG_BRIDGE_EBT_LIMIT=m +CONFIG_BRIDGE_EBT_MARK=m +CONFIG_BRIDGE_EBT_PKTTYPE=m +CONFIG_BRIDGE_EBT_STP=m +CONFIG_BRIDGE_EBT_VLAN=m +CONFIG_BRIDGE_EBT_ARPREPLY=m +CONFIG_BRIDGE_EBT_DNAT=m +CONFIG_BRIDGE_EBT_MARK_T=m +CONFIG_BRIDGE_EBT_REDIRECT=m +CONFIG_BRIDGE_EBT_SNAT=m +CONFIG_BRIDGE_EBT_LOG=m +CONFIG_BRIDGE_EBT_ULOG=m +CONFIG_BRIDGE_EBT_NFLOG=m +CONFIG_L2TP=m +CONFIG_L2TP_V3=y +CONFIG_L2TP_IP=m +CONFIG_L2TP_ETH=m +CONFIG_BRIDGE=m +CONFIG_VLAN_8021Q=m +CONFIG_VLAN_8021Q_GVRP=y +CONFIG_BATMAN_ADV=m +CONFIG_OPENVSWITCH=m +CONFIG_NETPRIO_CGROUP=m +CONFIG_NET_PKTGEN=m +CONFIG_IRDA=m +CONFIG_IRLAN=m +CONFIG_IRNET=m +CONFIG_IRCOMM=m +CONFIG_IRDA_ULTRA=y +CONFIG_IRTTY_SIR=m +CONFIG_KINGSUN_DONGLE=m +CONFIG_KSDAZZLE_DONGLE=m +CONFIG_KS959_DONGLE=m +CONFIG_USB_IRDA=m +CONFIG_SIGMATEL_FIR=m +CONFIG_MCS_FIR=m +CONFIG_BT=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=m +CONFIG_BT_HCIBTUSB=m +CONFIG_BT_HCIBTSDIO=m +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBPA10X=m +CONFIG_BT_HCIBFUSB=m +CONFIG_BT_MRVL=m +CONFIG_BT_MRVL_SDIO=m +CONFIG_BT_ATH3K=m +CONFIG_AF_RXRPC=m +CONFIG_RXKAD=m +CONFIG_CFG80211=y +CONFIG_CFG80211_DEVELOPER_WARNINGS=y +CONFIG_WIRELESS_EXT_SYSFS=y +CONFIG_LIB80211=m +CONFIG_CFG80211_ALLOW_RECONNECT=y +CONFIG_MAC80211=m +CONFIG_MAC80211_MESH=y +CONFIG_WIMAX=m +CONFIG_RFKILL=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +# CONFIG_FIRMWARE_IN_KERNEL is not set +CONFIG_CONNECTOR=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=2 +CONFIG_SUNXI_DBGREG=m +CONFIG_BLK_DEV_SD=y +CONFIG_BLK_DEV_SR=y +CONFIG_BLK_DEV_SR_VENDOR=y +CONFIG_SCSI_MULTI_LUN=y +CONFIG_ATA=y +CONFIG_SATA_AHCI_PLATFORM=y +CONFIG_SW_SATA_AHCI_PLATFORM=y +CONFIG_NETDEVICES=y +CONFIG_BONDING=m +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_CHELSIO is not set +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +CONFIG_SUNXI_EMAC=y +CONFIG_PHYLIB=y +CONFIG_PPP=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y +CONFIG_PPP_MPPE=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPPOE=m +CONFIG_PPPOLAC=m +CONFIG_PPPOPNS=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_USB_IPHETH=m +CONFIG_ATH_COMMON=m +CONFIG_ATH9K=m +CONFIG_RTL8192CU=m +CONFIG_RTL8192CU_SW=m +CONFIG_RTL8188EU=m +CONFIG_RTXX7X_SW=m +CONFIG_INPUT_POLLDEV=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_JOYDEV=y +CONFIG_INPUT_EVDEV=y +CONFIG_INPUT_KEYRESET=y +CONFIG_KEYBOARD_HV2605_KEYBOARD=m +CONFIG_INPUT_JOYSTICK=y +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_GT801=m +CONFIG_TOUCHSCREEN_GT811=m +CONFIG_TOUCHSCREEN_GT818=m +CONFIG_TOUCHSCREEN_FT5X_TS=m +CONFIG_TOUCHSCREEN_ZT8031=m +CONFIG_GSENSOR=y +CONFIG_SENSORS_BMA250=m +CONFIG_MEMSIC_ECOMPASS=m +CONFIG_SENSORS_MXC622X=m +CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_DEVPTS_MULTIPLE_INSTANCES=y +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_NONSTANDARD=y +# CONFIG_DEVKMEM is not set +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=8 +CONFIG_SERIAL_8250_RUNTIME_UARTS=8 +# CONFIG_HW_RANDOM is not set +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y +CONFIG_SPI=y +CONFIG_SPI_DEBUG=y +CONFIG_GPIOLIB=y +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_SUNXI=m +CONFIG_POWER_SUPPLY=y +CONFIG_AW_AXP=y +# CONFIG_HWMON is not set +CONFIG_REGULATOR=y +CONFIG_MEDIA_SUPPORT=y +CONFIG_VIDEO_DEV=y +CONFIG_MEDIA_TUNER_CUSTOMISE=y +# CONFIG_MEDIA_TUNER_SIMPLE is not set +# CONFIG_MEDIA_TUNER_TDA8290 is not set +# CONFIG_MEDIA_TUNER_TDA827X is not set +# CONFIG_MEDIA_TUNER_TDA18271 is not set +# CONFIG_MEDIA_TUNER_TDA9887 is not set +# CONFIG_MEDIA_TUNER_TEA5767 is not set +# CONFIG_MEDIA_TUNER_MT20XX is not set +# CONFIG_MEDIA_TUNER_MT2060 is not set +# CONFIG_MEDIA_TUNER_MT2266 is not set +# CONFIG_MEDIA_TUNER_MT2131 is not set +# CONFIG_MEDIA_TUNER_QT1010 is not set +# CONFIG_MEDIA_TUNER_MXL5005S is not set +# CONFIG_MEDIA_TUNER_MXL5007T is not set +# CONFIG_MEDIA_TUNER_MC44S803 is not set +# CONFIG_MEDIA_TUNER_MAX2165 is not set +# CONFIG_MEDIA_TUNER_TDA18218 is not set +# CONFIG_MEDIA_TUNER_TDA18212 is not set +CONFIG_USB_VIDEO_CLASS=m +CONFIG_USB_M5602=m +CONFIG_USB_STV06XX=m +CONFIG_USB_GL860=m +CONFIG_USB_GSPCA_BENQ=m +CONFIG_USB_GSPCA_CONEX=m +CONFIG_USB_GSPCA_CPIA1=m +CONFIG_USB_GSPCA_ETOMS=m +CONFIG_USB_GSPCA_FINEPIX=m +CONFIG_USB_GSPCA_JEILINJ=m +CONFIG_USB_GSPCA_JL2005BCD=m +CONFIG_USB_GSPCA_KINECT=m +CONFIG_USB_GSPCA_KONICA=m +CONFIG_USB_GSPCA_MARS=m +CONFIG_USB_GSPCA_MR97310A=m +CONFIG_USB_GSPCA_NW80X=m +CONFIG_USB_GSPCA_OV519=m +CONFIG_USB_GSPCA_OV534=m +CONFIG_USB_GSPCA_OV534_9=m +CONFIG_USB_GSPCA_PAC207=m +CONFIG_USB_GSPCA_PAC7302=m +CONFIG_USB_GSPCA_PAC7311=m +CONFIG_USB_GSPCA_SE401=m +CONFIG_USB_GSPCA_SN9C2028=m +CONFIG_USB_GSPCA_SN9C20X=m +CONFIG_USB_GSPCA_SONIXB=m +CONFIG_USB_GSPCA_SONIXJ=m +CONFIG_USB_GSPCA_SPCA500=m +CONFIG_USB_GSPCA_SPCA501=m +CONFIG_USB_GSPCA_SPCA505=m +CONFIG_USB_GSPCA_SPCA506=m +CONFIG_USB_GSPCA_SPCA508=m +CONFIG_USB_GSPCA_SPCA561=m +CONFIG_USB_GSPCA_SPCA1528=m +CONFIG_USB_GSPCA_SQ905=m +CONFIG_USB_GSPCA_SQ905C=m +CONFIG_USB_GSPCA_SQ930X=m +CONFIG_USB_GSPCA_STK014=m +CONFIG_USB_GSPCA_STV0680=m +CONFIG_USB_GSPCA_SUNPLUS=m +CONFIG_USB_GSPCA_T613=m +CONFIG_USB_GSPCA_TOPRO=m +CONFIG_USB_GSPCA_TV8532=m +CONFIG_USB_GSPCA_VC032X=m +CONFIG_USB_GSPCA_VICAM=m +CONFIG_USB_GSPCA_XIRLINK_CIT=m +CONFIG_USB_GSPCA_ZC3XX=m +CONFIG_VIDEO_PVRUSB2=m +CONFIG_VIDEO_HDPVR=m +CONFIG_VIDEO_EM28XX=m +CONFIG_VIDEO_EM28XX_ALSA=m +CONFIG_VIDEO_CX231XX=m +CONFIG_VIDEO_CX231XX_ALSA=m +CONFIG_VIDEO_TM6000=m +CONFIG_VIDEO_TM6000_ALSA=m +CONFIG_VIDEO_USBVISION=m +CONFIG_USB_ET61X251=m +CONFIG_USB_SN9C102=m +CONFIG_USB_PWC=m +CONFIG_VIDEO_CPIA2=m +CONFIG_USB_ZR364XX=m +CONFIG_USB_STKWEBCAM=m +CONFIG_USB_S2255=m +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_SOC_CAMERA=m +CONFIG_SOC_CAMERA_IMX074=m +CONFIG_SOC_CAMERA_MT9M001=m +CONFIG_SOC_CAMERA_MT9M111=m +CONFIG_SOC_CAMERA_MT9T031=m +CONFIG_SOC_CAMERA_MT9T112=m +CONFIG_SOC_CAMERA_MT9V022=m +CONFIG_SOC_CAMERA_RJ54N1=m +CONFIG_SOC_CAMERA_TW9910=m +CONFIG_SOC_CAMERA_PLATFORM=m +CONFIG_SOC_CAMERA_OV2640=m +CONFIG_SOC_CAMERA_OV5642=m +CONFIG_SOC_CAMERA_OV6650=m +CONFIG_SOC_CAMERA_OV772X=m +CONFIG_SOC_CAMERA_OV9640=m +CONFIG_SOC_CAMERA_OV9740=m +CONFIG_V4L_MEM2MEM_DRIVERS=y +# CONFIG_VIDEO_CSI_SUN4I is not set +CONFIG_RADIO_SI470X=y +CONFIG_USB_SI470X=m +CONFIG_I2C_SI470X=m +CONFIG_USB_MR800=m +CONFIG_USB_DSBR=m +CONFIG_RADIO_SI4713=m +CONFIG_USB_KEENE=m +CONFIG_RADIO_TEA5764=m +CONFIG_RADIO_SAA7706H=m +CONFIG_RADIO_TEF6862=m +CONFIG_RADIO_WL1273=m +CONFIG_AUDIO_ENGINE=y +CONFIG_PA_CONTROL=y +CONFIG_DRM=m +CONFIG_DRM_MALI=m +CONFIG_DRM_UDL=m +CONFIG_MALI=m +CONFIG_MALI400_DEBUG=y +CONFIG_MALI400_GPU_UTILIZATION=y +CONFIG_FB=y +CONFIG_FB_SUNXI=y +CONFIG_FB_SUNXI_LCD=y +CONFIG_FB_SUNXI_HDMI=y +CONFIG_HDMI_CEC=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_LOGO=y +# CONFIG_LOGO_LINUX_MONO is not set +# CONFIG_LOGO_LINUX_VGA16 is not set +# CONFIG_LOGO_LINUX_CLUT224 is not set +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_SEQUENCER=m +CONFIG_SND_MIXER_OSS=m +CONFIG_SND_PCM_OSS=m +CONFIG_SND_SEQUENCER_OSS=y +CONFIG_SND_HRTIMER=m +CONFIG_SND_VERBOSE_PRINTK=y +CONFIG_SND_ALOOP=m +CONFIG_SND_USB_AUDIO=m +CONFIG_SND_SOC=y +CONFIG_SND_SUNXI_SOC_SPDIF=y +CONFIG_HIDRAW=y +CONFIG_UHID=y +CONFIG_HID_PID=y +CONFIG_USB_HIDDEV=y +CONFIG_HID_KYE=y +CONFIG_HID_LOGITECH_DJ=y +CONFIG_LOGITECH_FF=y +# CONFIG_LOGIWHEELS_FF is not set +CONFIG_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_STORAGE=y +CONFIG_USB_STORAGE_REALTEK=y +CONFIG_USB_STORAGE_DATAFAB=y +CONFIG_USB_STORAGE_FREECOM=y +CONFIG_USB_STORAGE_ISD200=y +CONFIG_USB_STORAGE_USBAT=y +CONFIG_USB_STORAGE_SDDR09=y +CONFIG_USB_STORAGE_SDDR55=y +CONFIG_USB_STORAGE_JUMPSHOT=y +CONFIG_USB_STORAGE_ALAUDA=y +CONFIG_USB_STORAGE_ONETOUCH=y +CONFIG_USB_STORAGE_KARMA=y +CONFIG_USB_STORAGE_CYPRESS_ATACB=y +CONFIG_USB_STORAGE_ENE_UB6250=y +CONFIG_USB_SERIAL=y +CONFIG_USB_SERIAL_CONSOLE=y +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_GADGET=y +CONFIG_USB_FILE_STORAGE=m +CONFIG_USB_FILE_STORAGE_TEST=y +CONFIG_MMC=y +# CONFIG_MMC_BLOCK_BOUNCE is not set +CONFIG_MMC_USHC=y +CONFIG_MMC_SUNXI_POWER_CONTROL=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_SUNXI=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_CPU=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_SUN4I=y +CONFIG_STAGING=y +CONFIG_ANDROID=y +CONFIG_ANDROID_BINDER_IPC=y +CONFIG_ANDROID_LOGGER=y +CONFIG_ANDROID_RAM_CONSOLE=y +CONFIG_ANDROID_LOW_MEMORY_KILLER=y +CONFIG_EXT2_FS=y +CONFIG_EXT3_FS=y +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_REISERFS_FS=y +CONFIG_QUOTA=y +CONFIG_QUOTA_NETLINK_INTERFACE=y +# CONFIG_PRINT_QUOTA_WARNING is not set +CONFIG_QFMT_V2=y +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=y +CONFIG_CUSE=y +CONFIG_FSCACHE=y +CONFIG_FSCACHE_STATS=y +CONFIG_CACHEFILES=y +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_UDF_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_IOCHARSET="ascii" +CONFIG_NTFS_FS=y +CONFIG_NTFS_RW=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_CONFIGFS_FS=y +CONFIG_HFS_FS=y +CONFIG_HFSPLUS_FS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_NFS_V4_1=y +CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="y" +CONFIG_ROOT_NFS=y +CONFIG_NFS_USE_LEGACY_DNS=y +CONFIG_NFSD=m +CONFIG_NFSD_V3_ACL=y +CONFIG_NFSD_V4=y +CONFIG_NFSD_FAULT_INJECTION=y +CONFIG_CIFS=y +CONFIG_CIFS_DFS_UPCALL=y +CONFIG_NLS_DEFAULT="utf8" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_936=y +CONFIG_NLS_CODEPAGE_950=y +CONFIG_NLS_CODEPAGE_932=y +CONFIG_NLS_CODEPAGE_949=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_PRINTK_TIME=y +# CONFIG_ENABLE_WARN_DEPRECATED is not set +CONFIG_FRAME_WARN=2048 +CONFIG_MAGIC_SYSRQ=y +CONFIG_STRIP_ASM_SYMS=y +CONFIG_DEBUG_FS=y +CONFIG_DEBUG_SECTION_MISMATCH=y +CONFIG_DEBUG_KERNEL=y +CONFIG_DEBUG_SHIRQ=y +CONFIG_DETECT_HUNG_TASK=y +CONFIG_SCHEDSTATS=y +CONFIG_TIMER_STATS=y +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_LIST=y +CONFIG_BOOT_PRINTK_DELAY=y +CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y +# CONFIG_FTRACE is not set +CONFIG_DYNAMIC_DEBUG=y +CONFIG_STRICT_DEVMEM=y +CONFIG_DEBUG_LL=y +CONFIG_SECURITYFS=y +# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set +CONFIG_CRYPTO_GF128MUL=y +CONFIG_CRYPTO_SEQIV=y +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_AES=y +CONFIG_CRYPTO_ZLIB=y +CONFIG_CRYPTO_LZO=y +# CONFIG_CRYPTO_ANSI_CPRNG is not set +# CONFIG_CRYPTO_HW is not set +CONFIG_LIBCRC32C=y diff --git a/board/cubietech/cubieboard/mkcubiecard.sh b/board/cubietech/cubieboard/mkcubiecard.sh new file mode 100755 index 0000000000..34afc87088 --- /dev/null +++ b/board/cubietech/cubieboard/mkcubiecard.sh @@ -0,0 +1,124 @@ +#! /bin/sh +# mkCubieCard.sh v0.1: +# 2013, Carlo Caione +# heavely based on : +# mkA10card.sh v0.1 +# 2012, Jason Plum +# loosely based on : +# mkcard.sh v0.5 +# (c) Copyright 2009 Graeme Gregory +# Licensed under terms of GPLv2 +# +# Parts of the procudure base on the work of Denys Dmytriyenko +# http://wiki.omap.com/index.php/MMC_Boot_Format + +IMAGES_DIR=$1 +SPL_IMG=$IMAGES_DIR/sunxi-spl.bin +SPL_UBOOT=$IMAGES_DIR/u-boot-sunxi-with-spl.bin +UBOOT_IMG=$IMAGES_DIR/u-boot.bin +UIMAGE=$IMAGES_DIR/uImage +BIN_BOARD_FILE=$IMAGES_DIR/script.bin +ROOTFS=$IMAGES_DIR/rootfs.tar +BOOT_CMD_H=$IMAGES_DIR/boot.scr + +export LC_ALL=C + +if [ $# -ne 2 ]; then + echo "Usage: $0 " + exit 1; +fi + +if [ $EUID -ne 0 ]; then + echo "This script must be run as root" 1>&2 + exit 1 +fi + +if [ ! -f $SPL_IMG -a ! -f $SPL_UBOOT ] || + [ ! -f $UBOOT_IMG ] || + [ ! -f $UIMAGE ] || + [ ! -f $BIN_BOARD_FILE ] || + [ ! -f $ROOTFS ] || + [ ! -f $BOOT_CMD_H ]; then + echo "File(s) missing." + exit 1 +fi + +DRIVE=$2 +P1=`mktemp -d` +P2=`mktemp -d` + +dd if=/dev/zero of=$DRIVE bs=1M count=3 + +SIZE=`fdisk -l $DRIVE | grep Disk | grep bytes | awk '{print $5}'` + +echo DISK SIZE - $SIZE bytes + + +# ~2048, 16MB, FAT, bootable +# ~rest of drive, Ext4 +{ +echo 32,512,0x0C,* +echo 544,,,- +} | sfdisk -D $DRIVE + +sleep 1 + +if [ -b ${DRIVE}1 ]; then + D1=${DRIVE}1 + umount ${DRIVE}1 + mkfs.vfat -n "boot" ${DRIVE}1 +else + if [ -b ${DRIVE}p1 ]; then + D1=${DRIVE}p1 + umount ${DRIVE}p1 + mkfs.vfat -n "boot" ${DRIVE}p1 + else + echo "Cant find boot partition in /dev" + exit 1 + fi +fi + + +if [ -b ${DRIVE}2 ]; then + D2=${DRIVE}2 + umount ${DRIVE}2 + mkfs.ext4 -L "Cubie" ${DRIVE}2 +else + if [ -b ${DRIVE}p2 ]; then + D2=${DRIVE}p2 + umount ${DRIVE}p2 + mkfs.ext4 -L "Cubie" ${DRIVE}p2 + else + echo "Cant find rootfs partition in /dev" + exit 1 + fi +fi + +mount $D1 $P1 +mount $D2 $P2 + +# write uImage +cp $UIMAGE $P1 +# write board file +cp $BIN_BOARD_FILE $P1 +# write u-boot script +cp $BOOT_CMD_H $P1 +# write rootfs +tar -C $P2 -xvf $ROOTFS + +sync + +umount $D1 +umount $D2 + +rm -fr $P1 +rm -fr $P2 + +if [ -e $SPL_UBOOT ]; then + dd if=$SPL_UBOOT of=$DRIVE bs=1024 seek=8 +else + # write SPL + dd if=$SPL_IMG of=$DRIVE bs=1024 seek=8 + # write mele u-boot + dd if=$UBOOT_IMG of=$DRIVE bs=1024 seek=32 +fi diff --git a/board/cubietech/cubieboard/post-build.sh b/board/cubietech/cubieboard/post-build.sh new file mode 100755 index 0000000000..1b0258c551 --- /dev/null +++ b/board/cubietech/cubieboard/post-build.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# post-build.sh for CubieBoard +# 2013, Carlo Caione + +BOARD_DIR="$(dirname $0)" +MKIMAGE=$HOST_DIR/usr/bin/mkimage +BOOT_CMD=$BOARD_DIR/boot.cmd +BOOT_CMD_H=$BINARIES_DIR/boot.scr + +# U-Boot script +if [ -e $MKIMAGE -a -e $BOOT_CMD ]; +then + $MKIMAGE -C none -A arm -T script -d $BOOT_CMD $BOOT_CMD_H +fi diff --git a/board/cubietech/cubieboard/readme.txt b/board/cubietech/cubieboard/readme.txt new file mode 100644 index 0000000000..81cc5e409b --- /dev/null +++ b/board/cubietech/cubieboard/readme.txt @@ -0,0 +1,62 @@ +cubieboard and cubieboard2 + +----- +Intro +----- + +To be able to use your cubieboard board with the images generated by +Buildroot you have to correctly setup the SD card. + +For more information, please see http://linux-sunxi.org/FirstSteps + +--------------- +How to build it +--------------- + +You need to use the cubieboard_defconfig or cubieboard2_defconfig, to do so: + * make cubieboard_defconfig +or + * make cubieboard2_defconfig + +And to compile: + * make + +----------------- +What is generated +----------------- + +After building, you should obtain this tree: + + output/images/ + +-- rootfs.tar + +-- boot.scr + +-- script.bin + +-- sunxi-spl.bin + +-- u-boot.bin + +-- u-boot-sunxi-with-spl.bin (optional) + `-- uImage + +-------------------------- +How setting up the SD card +-------------------------- + +Depending on the rootfs size, you might want to use a 2GB or larger SD-card. +The script mkcubiecard.sh will take care of partitioning and formatting +the SD-card. + +BEWARE! This process will erase your SD card. + +Use dmesg to find out where the SD card is attached in the /dev tree +() and then: + +# sudo ./mkcubiecard.sh + +where: + - is the directory containing the generated files (usually + output/images) + - is the device file of the SD card (usually /dev/sdX) + + + +-- +Carlo Caione diff --git a/board/freescale/mpc8315erdb/linux-3.12.config b/board/freescale/mpc8315erdb/linux-3.12.config new file mode 100644 index 0000000000..120314c2a1 --- /dev/null +++ b/board/freescale/mpc8315erdb/linux-3.12.config @@ -0,0 +1,107 @@ +CONFIG_EXPERIMENTAL=y +CONFIG_SYSVIPC=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_BLK_DEV_INITRD=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_EXPERT=y +# CONFIG_KALLSYMS is not set +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_PPC_CHRP is not set +# CONFIG_PPC_PMAC is not set +CONFIG_PPC_83xx=y +CONFIG_MPC831x_RDB=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_SPARSE_IRQ=y +CONFIG_PCI=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_SYN_COOKIES=y +# CONFIG_INET_LRO is not set +# CONFIG_IPV6 is not set +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +# CONFIG_FW_LOADER is not set +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_CFI=y +CONFIG_MTD_CFI_AMDSTD=y +CONFIG_MTD_PHYSMAP_OF=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_FSL_ELBC=y +CONFIG_PROC_DEVICETREE=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=32768 +CONFIG_CHR_DEV_SG=y +CONFIG_SCSI_SPI_ATTRS=y +CONFIG_ATA=y +CONFIG_SATA_FSL=y +CONFIG_MD=y +CONFIG_BLK_DEV_MD=y +CONFIG_MD_LINEAR=y +CONFIG_MD_RAID0=y +CONFIG_MD_RAID1=y +CONFIG_NETDEVICES=y +CONFIG_NET_ETHERNET=y +CONFIG_NET_PCI=y +CONFIG_E100=y +CONFIG_GIANFAR=y +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_SERIO is not set +# CONFIG_VT is not set +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_HW_RANDOM=y +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MPC=y +CONFIG_SPI=y +CONFIG_SPI_BITBANG=y +CONFIG_WATCHDOG=y +CONFIG_VIDEO_OUTPUT_CONTROL=m +# CONFIG_USB_HID is not set +CONFIG_USB=y +CONFIG_USB_DEVICEFS=y +CONFIG_USB_MON=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_FSL=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_OHCI_HCD_PPC_OF_BE=y +CONFIG_USB_UHCI_HCD=y +CONFIG_USB_STORAGE=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_NET2280=y +CONFIG_USB_ETH=m +CONFIG_RTC_CLASS=y +CONFIG_RTC_INTF_DEV_UIE_EMUL=y +CONFIG_RTC_DRV_DS1307=y +CONFIG_EXT2_FS=y +CONFIG_EXT3_FS=y +# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set +CONFIG_INOTIFY=y +CONFIG_PROC_KCORE=y +CONFIG_TMPFS=y +CONFIG_JFFS2_FS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_NFS_V4=y +CONFIG_ROOT_NFS=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_DEBUG_KERNEL=y +CONFIG_DETECT_HUNG_TASK=y +# CONFIG_RCU_CPU_STALL_DETECTOR is not set +CONFIG_SYSCTL_SYSCALL_CHECK=y +CONFIG_CRYPTO_PCBC=m +# CONFIG_CRYPTO_ANSI_CPRNG is not set diff --git a/board/freescale/mpc8315erdb/readme.txt b/board/freescale/mpc8315erdb/readme.txt new file mode 100644 index 0000000000..ed707954fd --- /dev/null +++ b/board/freescale/mpc8315erdb/readme.txt @@ -0,0 +1,62 @@ + +******************** WARNING ******************** +The compiled U-Boot binary is intended for NAND flash only! +It won't work for NOR and will brick that bootloader! + +Also don't go playing around with different U-boot versions or flash targets +unless you've got the necessary hardware and/or know-how to unbrick your kit. + +2013.10 is known good for NAND. +******************** WARNING ******************** + +You'll need to program the files created by buildroot into the flash. +The fast way is to tftp transfer the files via one of the network interfaces. + +Alternatively you can transfer the files via serial console with an Ymodem +file transfer from your terminal program by using a "loady" command +from the u-boot prompt instead of the "tftp ..." commands stated below. +Beware that serial console file transfers are quite slow! + +Remember to set the MPC8315ERDB switches to NAND boot if you want to use +your newly built U-Boot. + +1. Program the new U-Boot binary to NAND flash (optional) + If you don't feel confident upgrading your bootloader then don't do it, + it's unnecessary most of the time. + + => tftp $loadaddr u-boot-nand.bin + => nand erase 0 0x80000 + => nand write $loadaddr 0 0x80000 $filesize + +2. Program the kernel to NAND flash + + => tftp $loadaddr uImage + => nand erase 0x100000 0x1e0000 + => nand write $loadaddr 0x100000 0x1e0000 + +3. Program the DTB to NAND flash + + => tftp $loadaddr mpc8315erdb.dtb + => nand erase 0x2e0000 0x20000 + => nand write $loadaddr 0x2e0000 0x20000 + +4. Program the root filesystem to NAND flash + + => tftp $loadaddr rootfs.jffs2 + => nand erase 0x400000 0x1c00000 + => nand write $loadaddr 0x400000 $filesize + +5. Booting your new system + + => setenv nandboot 'setenv bootargs root=/dev/mtdblock3 rootfstype=jffs2 console=$consoledev,$baudrate;nand read $fdtaddr 0x2e0000 0x20000;nand read $loadaddr 0x100000 0x1e0000;bootm $loadaddr - $fdtaddr' + + If you want to set this boot option as default: + + => setenv bootcmd 'run nandboot' + => saveenv + + ...or for a single boot: + + => run nandboot + + You can login with user "root". diff --git a/board/freescale/p1010rdb/linux-3.12.config b/board/freescale/p1010rdb/linux-3.12.config new file mode 100644 index 0000000000..5cdb4131d0 --- /dev/null +++ b/board/freescale/p1010rdb/linux-3.12.config @@ -0,0 +1,143 @@ +CONFIG_PPC_85xx=y +CONFIG_PHYS_64BIT=y +CONFIG_EXPERIMENTAL=y +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_AUDIT=y +CONFIG_IRQ_DOMAIN_DEBUG=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_BLK_DEV_INITRD=y +CONFIG_EXPERT=y +CONFIG_KALLSYMS_ALL=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +CONFIG_MODVERSIONS=y +# CONFIG_BLK_DEV_BSG is not set +CONFIG_P1010_RDB=y +CONFIG_HIGHMEM=y +CONFIG_SWIOTLB=y +CONFIG_FORCE_MAX_ZONEORDER=12 +CONFIG_PCI=y +CONFIG_PCI_MSI=y +CONFIG_RAPIDIO=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM_USER=y +CONFIG_NET_KEY=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_MULTIPATH=y +CONFIG_IP_ROUTE_VERBOSE=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_NET_IPIP=y +CONFIG_IP_MROUTE=y +CONFIG_IP_PIMSM_V1=y +CONFIG_IP_PIMSM_V2=y +CONFIG_ARPD=y +CONFIG_INET_ESP=y +# CONFIG_INET_XFRM_MODE_BEET is not set +CONFIG_INET_LRO=y +CONFIG_IPV6=y +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +CONFIG_FTL=y +CONFIG_MTD_CFI=y +CONFIG_MTD_CFI_INTELEXT=y +CONFIG_MTD_CFI_AMDSTD=y +CONFIG_MTD_PHYSMAP_OF=y +CONFIG_MTD_M25P80=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_FSL_ELBC=y +CONFIG_MTD_NAND_FSL_IFC=y +CONFIG_PROC_DEVICETREE=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_NBD=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=131072 +CONFIG_EEPROM_LEGACY=y +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_ST=y +CONFIG_BLK_DEV_SR=y +CONFIG_CHR_DEV_SG=y +CONFIG_SCSI_MULTI_LUN=y +CONFIG_SCSI_LOGGING=y +CONFIG_ATA=y +CONFIG_SATA_FSL=y +CONFIG_NETDEVICES=y +CONFIG_DUMMY=y +CONFIG_GIANFAR=y +CONFIG_VITESSE_PHY=y +CONFIG_FIXED_PHY=y +CONFIG_SERIO_LIBPS2=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=2 +CONFIG_SERIAL_8250_RUNTIME_UARTS=2 +CONFIG_SERIAL_8250_MANY_PORTS=y +CONFIG_SERIAL_8250_DETECT_IRQ=y +CONFIG_SERIAL_8250_RSA=y +CONFIG_SERIAL_QE=m +CONFIG_NVRAM=y +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_CPM=m +CONFIG_I2C_MPC=y +CONFIG_SPI=y +CONFIG_SPI_FSL_SPI=y +CONFIG_SPI_FSL_ESPI=y +CONFIG_GPIO_MPC8XXX=y +# CONFIG_HWMON is not set +CONFIG_USB=y +CONFIG_USB_MON=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_FSL=y +CONFIG_USB_STORAGE=y +CONFIG_MMC=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_OF_ESDHC=y +CONFIG_EDAC=y +CONFIG_EDAC_MM_EDAC=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_CMOS=y +CONFIG_DMADEVICES=y +CONFIG_FSL_DMA=y +# CONFIG_NET_DMA is not set +CONFIG_EXT4_FS=y +CONFIG_EXT4_USE_FOR_EXT23=y +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=y +CONFIG_PROC_KCORE=y +CONFIG_TMPFS=y +CONFIG_JFFS2_FS=y +CONFIG_SQUASHFS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V4=y +CONFIG_ROOT_NFS=y +CONFIG_NFSD=y +CONFIG_CRC_T10DIF=y +CONFIG_DEBUG_FS=y +CONFIG_DETECT_HUNG_TASK=y +CONFIG_DEBUG_INFO=y +CONFIG_CRYPTO_PCBC=m +CONFIG_CRYPTO_SHA256=y +CONFIG_CRYPTO_SHA512=y +CONFIG_CRYPTO_AES=y +# CONFIG_CRYPTO_ANSI_CPRNG is not set +CONFIG_CRYPTO_DEV_FSL_CAAM=y diff --git a/board/freescale/p1010rdb/readme.txt b/board/freescale/p1010rdb/readme.txt new file mode 100644 index 0000000000..42706fde75 --- /dev/null +++ b/board/freescale/p1010rdb/readme.txt @@ -0,0 +1,63 @@ + +******************** WARNING ******************** +The compiled U-Boot binary is intended for NOR flash only! +It won't work for NAND or SPI and will brick those bootloaders! + +Also don't go playing around with different U-boot versions or flash targets +unless you've got the necessary hardware and/or know-how to unbrick your kit. + +2013.10 is known good for NOR. +******************** WARNING ******************** + +You'll need to program the files created by buildroot into the flash. +The fast way is to tftp transfer the files via one of the network interfaces. + +Alternatively you can transfer the files via serial console with an Ymodem +file transfer from your terminal program by using a "loady" command +from the u-boot prompt instead of the "tftp ..." commands stated below. +Beware that serial console file transfers are quite slow! + +Remember to set the P1010RDB switches to NOR boot if you want to use +your newly built U-Boot. + +1. Program the new U-Boot binary to NOR flash (optional) + If you don't feel confident upgrading your bootloader then don't do it, + it's unnecessary most of the time. + + => tftp $loadaddr u-boot.bin + => protect off 0xeff80000 +$filesize + => erase 0xeff80000 +$filesize + => cp.b $loadaddr 0xeff80000 $filesize + +2. Program the DTB to NOR flash + + => tftp $loadaddr p1010rdb.dtb + => erase 0xee000000 +$filesize + => cp.b $loadaddr 0xee000000 $filesize + +3. Program the kernel to NOR flash + + => tftp $loadaddr uImage + => erase 0xee080000 +$filesize + => cp.b $loadaddr 0xee080000 $filesize + +4. Program the root filesystem to NOR flash + + => tftp $loadaddr rootfs.jffs2 + => erase 0xee800000 0xeff5ffff + => cp.b $loadaddr 0xee800000 $filesize + +5. Booting your new system + + => setenv norboot 'setenv bootargs root=/dev/mtdblock2 rootfstype=jffs2 console=$consoledev,$baudrate;bootm 0xee080000 - 0xee000000' + + If you want to set this boot option as default: + + => setenv bootcmd 'run norboot' + => saveenv + + ...or for a single boot: + + => run norboot + + You can login with user "root". diff --git a/board/friendlyarm/mini2440/linux-2.6.32.2.config b/board/friendlyarm/mini2440/linux-2.6.32.2.config deleted file mode 100644 index b0c383ee78..0000000000 --- a/board/friendlyarm/mini2440/linux-2.6.32.2.config +++ /dev/null @@ -1,1409 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.32.2 -# Fri Jul 2 21:15:21 2010 -# -CONFIG_ARM=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_GENERIC_GPIO=y -CONFIG_NO_IOPORT=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_HAVE_LATENCYTOP_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_ARCH_HAS_CPUFREQ=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y -CONFIG_VECTORS_BASE=0xffff0000 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_CONSTRUCTORS=y - -# -# General setup -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_LOCALVERSION="-FriendlyARM" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set -# CONFIG_AUDIT is not set - -# -# RCU Subsystem -# -CONFIG_TREE_RCU=y -# CONFIG_TREE_PREEMPT_RCU is not set -# CONFIG_RCU_TRACE is not set -CONFIG_RCU_FANOUT=32 -# CONFIG_RCU_FANOUT_EXACT is not set -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_IKCONFIG is not set -CONFIG_LOG_BUF_SHIFT=17 -# CONFIG_GROUP_SCHED is not set -# CONFIG_CGROUPS is not set -# CONFIG_SYSFS_DEPRECATED_V2 is not set -# CONFIG_RELAY is not set -# CONFIG_NAMESPACES is not set -# CONFIG_BLK_DEV_INITRD is not set -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_EMBEDDED=y -CONFIG_UID16=y -CONFIG_SYSCTL_SYSCALL=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_AIO=y - -# -# Kernel Performance Events And Counters -# -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_SLUB_DEBUG=y -# CONFIG_COMPAT_BRK is not set -# CONFIG_SLAB is not set -CONFIG_SLUB=y -# CONFIG_SLOB is not set -# CONFIG_PROFILING is not set -CONFIG_HAVE_OPROFILE=y -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_CLK=y - -# -# GCOV-based kernel profiling -# -CONFIG_SLOW_WORK=y -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_SLABINFO=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -# CONFIG_MODULES is not set -CONFIG_BLOCK=y -CONFIG_LBDAF=y -CONFIG_BLK_DEV_BSG=y -# CONFIG_BLK_DEV_INTEGRITY is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -# CONFIG_DEFAULT_AS is not set -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -CONFIG_DEFAULT_NOOP=y -CONFIG_DEFAULT_IOSCHED="noop" -# CONFIG_FREEZER is not set - -# -# System Type -# -CONFIG_MMU=y -# CONFIG_ARCH_AAEC2000 is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_GEMINI is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_MXC is not set -# CONFIG_ARCH_STMP3XXX is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_NOMADIK is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IXP23XX is not set -# CONFIG_ARCH_IXP2000 is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_KIRKWOOD is not set -# CONFIG_ARCH_LOKI is not set -# CONFIG_ARCH_MV78XX0 is not set -# CONFIG_ARCH_ORION5X is not set -# CONFIG_ARCH_MMP is not set -# CONFIG_ARCH_KS8695 is not set -# CONFIG_ARCH_NS9XXX is not set -# CONFIG_ARCH_W90X900 is not set -# CONFIG_ARCH_PNX4008 is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_MSM is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -CONFIG_ARCH_S3C2410=y -# CONFIG_ARCH_S3C64XX is not set -# CONFIG_ARCH_S5PC1XX is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_LH7A40X is not set -# CONFIG_ARCH_U300 is not set -# CONFIG_ARCH_DAVINCI is not set -# CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_BCMRING is not set -CONFIG_PLAT_S3C24XX=y -CONFIG_S3C2410_CLOCK=y -CONFIG_CPU_S3C244X=y -CONFIG_S3C2440_XTAL_12000000=y -# CONFIG_S3C24XX_PWM is not set -CONFIG_S3C24XX_GPIO_EXTRA=0 -CONFIG_S3C2410_DMA=y -# CONFIG_S3C2410_DMA_DEBUG is not set -CONFIG_S3C24XX_ADC=y -CONFIG_PLAT_S3C=y -CONFIG_CPU_LLSERIAL_S3C2440_ONLY=y -CONFIG_CPU_LLSERIAL_S3C2440=y - -# -# Boot options -# -# CONFIG_S3C_BOOT_WATCHDOG is not set -# CONFIG_S3C_BOOT_ERROR_RESET is not set -CONFIG_S3C_BOOT_UART_FORCE_FIFO=y - -# -# Power management -# -CONFIG_S3C_LOWLEVEL_UART_PORT=0 -CONFIG_S3C_GPIO_SPACE=0 -CONFIG_S3C_DMA=y -CONFIG_S3C_DEV_USB_HOST=y -CONFIG_S3C_DEV_NAND=y - -# -# S3C2400 Machines -# -CONFIG_S3C2410_GPIO=y - -# -# S3C2410 Machines -# -# CONFIG_ARCH_SMDK2410 is not set -# CONFIG_ARCH_H1940 is not set -# CONFIG_MACH_N30 is not set -# CONFIG_ARCH_BAST is not set -# CONFIG_MACH_OTOM is not set -# CONFIG_MACH_AML_M5900 is not set -# CONFIG_MACH_TCT_HAMMER is not set -# CONFIG_MACH_VR1000 is not set -# CONFIG_MACH_QT2410 is not set - -# -# S3C2412 Machines -# -# CONFIG_MACH_JIVE is not set -# CONFIG_MACH_SMDK2413 is not set -# CONFIG_MACH_SMDK2412 is not set -# CONFIG_MACH_VSTMS is not set -CONFIG_CPU_S3C2440=y -CONFIG_S3C2440_DMA=y - -# -# S3C2440 Machines -# -# CONFIG_MACH_ANUBIS is not set -# CONFIG_MACH_OSIRIS is not set -# CONFIG_MACH_RX3715 is not set -# CONFIG_ARCH_S3C2440 is not set -# CONFIG_MACH_NEXCODER_2440 is not set -# CONFIG_MACH_AT2440EVB is not set -CONFIG_MACH_MINI2440=y - -# -# S3C2442 Machines -# -# CONFIG_MACH_NEO1973_GTA02 is not set - -# -# S3C2443 Machines -# -# CONFIG_MACH_SMDK2443 is not set - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_ARM920T=y -CONFIG_CPU_32v4T=y -CONFIG_CPU_ABRT_EV4T=y -CONFIG_CPU_PABRT_LEGACY=y -CONFIG_CPU_CACHE_V4WT=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_COPY_V4WB=y -CONFIG_CPU_TLB_V4WBI=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y - -# -# Processor Features -# -# CONFIG_ARM_THUMB is not set -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_WRITETHROUGH is not set -CONFIG_ARM_L1_CACHE_SHIFT=5 - -# -# Bus support -# -# CONFIG_PCI_SYSCALL is not set -# CONFIG_ARCH_SUPPORTS_MSI is not set -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -# CONFIG_PREEMPT_NONE is not set -CONFIG_PREEMPT_VOLUNTARY=y -# CONFIG_PREEMPT is not set -CONFIG_HZ=200 -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -# CONFIG_HIGHMEM is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_PAGEFLAGS_EXTENDED=y -CONFIG_SPLIT_PTLOCK_CPUS=4096 -# CONFIG_PHYS_ADDR_T_64BIT is not set -CONFIG_ZONE_DMA_FLAG=0 -CONFIG_VIRT_TO_BUS=y -CONFIG_HAVE_MLOCK=y -CONFIG_HAVE_MLOCKED_PAGE_BIT=y -# CONFIG_KSM is not set -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_ALIGNMENT_TRAP=y -# CONFIG_UACCESS_WITH_MEMCPY is not set - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -CONFIG_CMDLINE="" -# CONFIG_XIP_KERNEL is not set -# CONFIG_KEXEC is not set - -# -# CPU Power Management -# -# CONFIG_CPU_FREQ is not set -# CONFIG_CPU_IDLE is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_HAVE_AOUT=y -# CONFIG_BINFMT_AOUT is not set -# CONFIG_BINFMT_MISC is not set - -# -# Power management options -# -# CONFIG_PM is not set -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set -CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -# CONFIG_XFRM_MIGRATE is not set -# CONFIG_XFRM_STATISTICS is not set -CONFIG_NET_KEY=y -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_FIB_HASH=y -# CONFIG_IP_PNP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -# CONFIG_SYN_COOKIES is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set -# CONFIG_INET_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -# CONFIG_IPV6 is not set -# CONFIG_NETWORK_SECMARK is not set -# CONFIG_NETFILTER is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_NET_DSA is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set -# CONFIG_PHONET is not set -# CONFIG_IEEE802154 is not set -# CONFIG_NET_SCHED is not set -# CONFIG_DCB is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_AF_RXRPC is not set -# CONFIG_WIRELESS is not set -# CONFIG_WIMAX is not set -# CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER_PATH="" -# CONFIG_DEVTMPFS is not set -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_FIRMWARE_IN_KERNEL is not set -CONFIG_EXTRA_FIRMWARE="" -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_CONNECTOR is not set -# CONFIG_MTD is not set -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_UB is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_MG_DISK is not set -# CONFIG_MISC_DEVICES is not set -CONFIG_HAVE_IDE=y -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -# CONFIG_SCSI_TGT is not set -# CONFIG_SCSI_NETLINK is not set -# CONFIG_SCSI_PROC_FS is not set - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -CONFIG_CHR_DEV_SG=y -# CONFIG_CHR_DEV_SCH is not set -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -# CONFIG_SCSI_SCAN_ASYNC is not set - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -# CONFIG_ATA is not set -# CONFIG_MD is not set -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_MACVLAN is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set -# CONFIG_VETH is not set -# CONFIG_PHYLIB is not set -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -# CONFIG_AX88796 is not set -# CONFIG_SMC91X is not set -CONFIG_DM9000=y -CONFIG_DM9000_DEBUGLEVEL=4 -# CONFIG_DM9000_FORCE_SIMPLE_PHY_POLL is not set -# CONFIG_ETHOC is not set -# CONFIG_SMC911X is not set -# CONFIG_SMSC911X is not set -# CONFIG_DNET is not set -# CONFIG_IBM_NEW_EMAC_ZMII is not set -# CONFIG_IBM_NEW_EMAC_RGMII is not set -# CONFIG_IBM_NEW_EMAC_TAH is not set -# CONFIG_IBM_NEW_EMAC_EMAC4 is not set -# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set -# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set -# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set -# CONFIG_B44 is not set -# CONFIG_KS8842 is not set -# CONFIG_KS8851_MLL is not set -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -# CONFIG_WLAN is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_WAN is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -# CONFIG_ISDN is not set -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=640 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480 -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_S3C2410=y -# CONFIG_TOUCHSCREEN_AD7879_I2C is not set -# CONFIG_TOUCHSCREEN_AD7879 is not set -# CONFIG_TOUCHSCREEN_EETI is not set -# CONFIG_TOUCHSCREEN_FUJITSU is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set -# CONFIG_TOUCHSCREEN_MCS5000 is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_INEXIO is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set -# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set -# CONFIG_TOUCHSCREEN_TSC2007 is not set -# CONFIG_TOUCHSCREEN_W90X900 is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_CONSOLE_TRANSLATIONS=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_VT_HW_CONSOLE_BINDING is not set -# CONFIG_DEVKMEM is not set -CONFIG_MINI2440_HELLO_MODULE=y -CONFIG_LEDS_MINI2440=y -CONFIG_MINI2440_BUTTONS=y -CONFIG_MINI2440_BUZZER=y -CONFIG_MINI2440_ADC=y -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_SAMSUNG=y -CONFIG_SERIAL_SAMSUNG_UARTS=3 -CONFIG_SERIAL_SAMSUNG_CONSOLE=y -CONFIG_SERIAL_S3C2440=y -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set -# CONFIG_LEGACY_PTYS is not set -# CONFIG_IPMI_HANDLER is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -# CONFIG_I2C_COMPAT is not set -CONFIG_I2C_CHARDEV=y -# CONFIG_I2C_HELPER_AUTO is not set - -# -# I2C Algorithms -# -# CONFIG_I2C_ALGOBIT is not set -# CONFIG_I2C_ALGOPCF is not set -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -# CONFIG_I2C_DESIGNWARE is not set -# CONFIG_I2C_GPIO is not set -# CONFIG_I2C_OCORES is not set -CONFIG_I2C_S3C2410=y -# CONFIG_I2C_SIMTEC is not set - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -# CONFIG_I2C_PCA_PLATFORM is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_DS1682 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set -# CONFIG_SPI is not set - -# -# PPS support -# -# CONFIG_PPS is not set -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_GPIOLIB=y -# CONFIG_GPIO_SYSFS is not set - -# -# Memory mapped GPIO expanders: -# - -# -# I2C GPIO expanders: -# -# CONFIG_GPIO_MAX732X is not set -# CONFIG_GPIO_PCA953X is not set -# CONFIG_GPIO_PCF857X is not set - -# -# PCI GPIO expanders: -# - -# -# SPI GPIO expanders: -# - -# -# AC97 GPIO expanders: -# -# CONFIG_W1 is not set -# CONFIG_POWER_SUPPLY is not set -# CONFIG_HWMON is not set -# CONFIG_THERMAL is not set -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -# CONFIG_SOFT_WATCHDOG is not set -CONFIG_S3C2410_WATCHDOG=y - -# -# USB-based Watchdog Cards -# -# CONFIG_USBPCWATCHDOG is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_ASIC3 is not set -# CONFIG_HTC_EGPIO is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_TPS65010 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_T7L66XB is not set -# CONFIG_MFD_TC6387XB is not set -# CONFIG_MFD_TC6393XB is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_AB3100_CORE is not set -# CONFIG_REGULATOR is not set -# CONFIG_MEDIA_SUPPORT is not set - -# -# Graphics support -# -# CONFIG_VGASTATE is not set -# CONFIG_VIDEO_OUTPUT_CONTROL is not set -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -# CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_S3C2410=y -CONFIG_FB_S3C2410_DEBUG=y -# CONFIG_FB_S3C2410_T240320 is not set -# CONFIG_FB_S3C2410_N240320 is not set -CONFIG_FB_S3C2410_TFT640480=y -# CONFIG_FB_S3C2410_TFT800480 is not set -# CONFIG_FB_S3C2410_VGA1024768 is not set -# CONFIG_BACKLIGHT_MINI2440 is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_MB862XX is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Display device support -# -# CONFIG_DISPLAY_SUPPORT is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set -CONFIG_FONTS=y -# CONFIG_FONT_8x8 is not set -CONFIG_FONT_8x16=y -# CONFIG_FONT_6x11 is not set -# CONFIG_FONT_7x14 is not set -# CONFIG_FONT_PEARL_8x8 is not set -# CONFIG_FONT_ACORN_8x8 is not set -# CONFIG_FONT_MINI_4x6 is not set -# CONFIG_FONT_SUN8x16 is not set -# CONFIG_FONT_SUN12x22 is not set -# CONFIG_FONT_10x18 is not set -# CONFIG_LOGO is not set -CONFIG_SOUND=y -# CONFIG_SOUND_OSS_CORE is not set -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -CONFIG_SND_JACK=y -# CONFIG_SND_SEQUENCER is not set -# CONFIG_SND_MIXER_OSS is not set -# CONFIG_SND_PCM_OSS is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set -# CONFIG_SND_RAWMIDI_SEQ is not set -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_USB is not set -CONFIG_SND_SOC=y -CONFIG_SND_S3C24XX_SOC=y -CONFIG_SND_S3C24XX_SOC_I2S=y -# CONFIG_SND_S3C24XX_SOC_LN2440SBC_ALC650 is not set -CONFIG_SND_S3C24XX_SOC_S3C24XX_UDA134X=y -# CONFIG_SND_S3C24XX_SOC_SIMTEC_TLV320AIC23 is not set -# CONFIG_SND_S3C24XX_SOC_SIMTEC_HERMES is not set -CONFIG_SND_SOC_I2C_AND_SPI=y -# CONFIG_SND_SOC_ALL_CODECS is not set -CONFIG_SND_SOC_L3=y -CONFIG_SND_SOC_UDA134X=y -# CONFIG_SOUND_PRIME is not set -CONFIG_HID_SUPPORT=y -CONFIG_HID=y -# CONFIG_HIDRAW is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -# CONFIG_USB_HIDDEV is not set - -# -# Special HID drivers -# -# CONFIG_HID_A4TECH is not set -# CONFIG_HID_APPLE is not set -# CONFIG_HID_BELKIN is not set -# CONFIG_HID_CHERRY is not set -# CONFIG_HID_CHICONY is not set -# CONFIG_HID_CYPRESS is not set -# CONFIG_HID_DRAGONRISE is not set -# CONFIG_HID_EZKEY is not set -# CONFIG_HID_KYE is not set -# CONFIG_HID_GYRATION is not set -# CONFIG_HID_TWINHAN is not set -# CONFIG_HID_KENSINGTON is not set -# CONFIG_HID_LOGITECH is not set -# CONFIG_HID_MICROSOFT is not set -# CONFIG_HID_MONTEREY is not set -# CONFIG_HID_NTRIG is not set -# CONFIG_HID_PANTHERLORD is not set -# CONFIG_HID_PETALYNX is not set -# CONFIG_HID_SAMSUNG is not set -# CONFIG_HID_SONY is not set -# CONFIG_HID_SUNPLUS is not set -# CONFIG_HID_GREENASIA is not set -# CONFIG_HID_SMARTJOYPLUS is not set -# CONFIG_HID_TOPSEED is not set -# CONFIG_HID_THRUSTMASTER is not set -# CONFIG_HID_ZEROPLUS is not set -CONFIG_USB_SUPPORT=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -# CONFIG_USB_ARCH_HAS_EHCI is not set -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y - -# -# Miscellaneous USB options -# -# CONFIG_USB_DEVICEFS is not set -# CONFIG_USB_DEVICE_CLASS is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1760_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -CONFIG_USB_OHCI_HCD=y -# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set -# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_HWA_HCD is not set -# CONFIG_USB_MUSB_HDRC is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set -# CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_ISD200 is not set -# CONFIG_USB_STORAGE_USBAT is not set -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -# CONFIG_USB_STORAGE_JUMPSHOT is not set -# CONFIG_USB_STORAGE_ALAUDA is not set -# CONFIG_USB_STORAGE_ONETOUCH is not set -# CONFIG_USB_STORAGE_KARMA is not set -# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set - -# -# USB port drivers -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_BERRY_CHARGE is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TRANCEVIBRATOR is not set -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_VST is not set -# CONFIG_USB_GADGET is not set - -# -# OTG and related infrastructure -# -# CONFIG_USB_GPIO_VBUS is not set -# CONFIG_NOP_USB_XCEIV is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -# CONFIG_MMC_UNSAFE_RESUME is not set - -# -# MMC/SD/SDIO Card Drivers -# -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -# CONFIG_MMC_SDHCI is not set -# CONFIG_MMC_AT91 is not set -# CONFIG_MMC_ATMELMCI is not set -CONFIG_MMC_S3C=y -CONFIG_MMC_S3C_HW_SDIO_IRQ=y -CONFIG_MMC_S3C_PIO=y -# CONFIG_MMC_S3C_DMA is not set -# CONFIG_MMC_S3C_PIODMA is not set -# CONFIG_MEMSTICK is not set -# CONFIG_NEW_LEDS is not set -# CONFIG_ACCESSIBILITY is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -CONFIG_RTC_DEBUG=y - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1374 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set -# CONFIG_RTC_DRV_S35390A is not set -# CONFIG_RTC_DRV_FM3130 is not set -# CONFIG_RTC_DRV_RX8581 is not set -# CONFIG_RTC_DRV_RX8025 is not set - -# -# SPI RTC drivers -# - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_DS1286 is not set -# CONFIG_RTC_DRV_DS1511 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T35 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_BQ4802 is not set -# CONFIG_RTC_DRV_V3020 is not set - -# -# on-CPU RTC drivers -# -CONFIG_RTC_DRV_S3C=y -# CONFIG_DMADEVICES is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set - -# -# TI VLYNQ -# -# CONFIG_STAGING is not set - -# -# File systems -# -# CONFIG_EXT2_FS is not set -# CONFIG_EXT3_FS is not set -CONFIG_EXT4_FS=y -CONFIG_EXT4_FS_XATTR=y -# CONFIG_EXT4_FS_POSIX_ACL is not set -# CONFIG_EXT4_FS_SECURITY is not set -CONFIG_EXT4_DEBUG=y -CONFIG_JBD2=y -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_BTRFS_FS is not set -# CONFIG_NILFS2_FS is not set -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y -# CONFIG_DNOTIFY is not set -# CONFIG_INOTIFY is not set -CONFIG_INOTIFY_USER=y -# CONFIG_QUOTA is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_FS is not set -CONFIG_GENERIC_ACL=y - -# -# Caches -# -# CONFIG_FSCACHE is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -# CONFIG_MSDOS_FS is not set -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_CONFIGFS_FS=y -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -# CONFIG_NFS_V3_ACL is not set -# CONFIG_NFS_V4 is not set -# CONFIG_NFSD is not set -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -# CONFIG_RPCSEC_GSS_KRB5 is not set -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set -CONFIG_CIFS=y -# CONFIG_CIFS_STATS is not set -# CONFIG_CIFS_WEAK_PW_HASH is not set -# CONFIG_CIFS_XATTR is not set -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -CONFIG_NLS_CODEPAGE_936=y -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ASCII is not set -CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -CONFIG_NLS_UTF8=y -# CONFIG_DLM is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -# CONFIG_ENABLE_WARN_DEPRECATED is not set -# CONFIG_ENABLE_MUST_CHECK is not set -CONFIG_FRAME_WARN=1024 -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_UNUSED_SYMBOLS is not set -# CONFIG_DEBUG_FS is not set -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_KERNEL is not set -# CONFIG_SLUB_DEBUG_ON is not set -# CONFIG_SLUB_STATS is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_DEBUG_MEMORY_INIT is not set -CONFIG_FRAME_POINTER=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -# CONFIG_LATENCYTOP is not set -# CONFIG_SYSCTL_SYSCALL_CHECK is not set -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_TRACING_SUPPORT=y -# CONFIG_FTRACE is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -# CONFIG_ARM_UNWIND is not set -# CONFIG_DEBUG_USER is not set -CONFIG_DEBUG_S3C_UART=0 - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set -# CONFIG_SECURITYFS is not set -# CONFIG_SECURITY_FILE_CAPABILITIES is not set -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_PCOMP=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_GF128MUL is not set -# CONFIG_CRYPTO_NULL is not set -CONFIG_CRYPTO_WORKQUEUE=y -# CONFIG_CRYPTO_CRYPTD is not set -# CONFIG_CRYPTO_AUTHENC is not set - -# -# Authenticated Encryption with Associated Data -# -# CONFIG_CRYPTO_CCM is not set -# CONFIG_CRYPTO_GCM is not set -# CONFIG_CRYPTO_SEQIV is not set - -# -# Block modes -# -# CONFIG_CRYPTO_CBC is not set -# CONFIG_CRYPTO_CTR is not set -# CONFIG_CRYPTO_CTS is not set -# CONFIG_CRYPTO_ECB is not set -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set - -# -# Hash modes -# -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_GHASH is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -# CONFIG_CRYPTO_SHA256 is not set -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -# CONFIG_CRYPTO_AES is not set -# CONFIG_CRYPTO_ANUBIS is not set -# CONFIG_CRYPTO_ARC4 is not set -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -# CONFIG_CRYPTO_DES is not set -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -# CONFIG_CRYPTO_TWOFISH is not set - -# -# Compression -# -# CONFIG_CRYPTO_DEFLATE is not set -# CONFIG_CRYPTO_ZLIB is not set -# CONFIG_CRYPTO_LZO is not set - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_HW is not set -# CONFIG_BINARY_PRINTF is not set - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_GENERIC_FIND_LAST_BIT=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set -CONFIG_CRC_ITU_T=y -CONFIG_CRC32=y -# CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_DMA=y -CONFIG_NLATTR=y diff --git a/board/gnublin/README b/board/gnublin/README new file mode 100644 index 0000000000..8f6a9f01ea --- /dev/null +++ b/board/gnublin/README @@ -0,0 +1,48 @@ +This the Buildroot support for the LPC3131 based Gnublin board (see here: +http://en.gnublin.org/) and to the Elektor Linux board +(http://www.elektor.com/news/elektor-presents-embedded-linux-made-easy.2147294. +lynkx) + +Unfortunately currently the AD and the pwm modules are not supported, i'm about +to add also those drivers as well to the current kernel later. + +Base kernel version: 3.7 (available here: +https://gitorious.org/linux-3-7-gnublin/linux-3-7-gnublin/commits/gnublin- +support) + +U-boot version: 2009.11 (available here: +https://gitorious.org/u-boot-gnublin-support/u-boot-gnublin-support) + + +Steps to create a bootable SD card (with the given config you need an at least +500 MB SD card): + +1.Config buildroot with the gnublin_defconfig: + +$ make gnublin_defconfig + +2.Tweak the config for your needs: + +$ make menuconfig + +3.Build: + +$ make + +4.Create two partitions on your SD card, one with type of BootIt (fdisk ID: df), +the size should be around 1M, and another partition with all of the left space +on the card, and with the type of normal DOS partition. + +5.From the output/images directory dump the u-boot image to the BootIt partition +(probably you have to modify the output /dev files according to your system): + +$ dd if=output/images/u-boot.bin of=/dev/sdc1 + +6.Dump the root fs image as well: + +$ dd if=output/images/rootfs.ext2 of=/dev/sdc2 + +7.Insert the SD card into the board's slot, and your board should boot up with +your newly created system. + +Any feedback/report is welcome on the mr.zoltan.gyarmati[at]gmail.com diff --git a/board/olimex/imx233_olinuxino/linux-3.12.config b/board/olimex/imx233_olinuxino/linux-3.12.config new file mode 100644 index 0000000000..f7b6aa61d7 --- /dev/null +++ b/board/olimex/imx233_olinuxino/linux-3.12.config @@ -0,0 +1,177 @@ +CONFIG_SYSVIPC=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +# CONFIG_UTS_NS is not set +# CONFIG_IPC_NS is not set +# CONFIG_PID_NS is not set +# CONFIG_NET_NS is not set +CONFIG_RELAY=y +CONFIG_PERF_EVENTS=y +# CONFIG_COMPAT_BRK is not set +CONFIG_MODULES=y +CONFIG_MODULE_FORCE_LOAD=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_BLK_DEV_INTEGRITY=y +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +# CONFIG_ARCH_MULTI_V7 is not set +CONFIG_ARCH_MXS=y +# CONFIG_ARM_THUMB is not set +CONFIG_PREEMPT_VOLUNTARY=y +CONFIG_AEABI=y +CONFIG_ARM_APPENDED_DTB=y +CONFIG_ARM_ATAG_DTB_COMPAT=y +CONFIG_CMDLINE="console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait" +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_SYN_COOKIES=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_IPV6 is not set +CONFIG_CFG80211=y +CONFIG_CFG80211_WEXT=y +CONFIG_MAC80211=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +# CONFIG_FIRMWARE_IN_KERNEL is not set +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_DATAFLASH=y +CONFIG_MTD_M25P80=y +# CONFIG_M25PXX_USE_FAST_READ is not set +CONFIG_MTD_SST25L=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_GPMI_NAND=y +CONFIG_MTD_UBI=y +# CONFIG_BLK_DEV is not set +CONFIG_EEPROM_AT24=y +CONFIG_EEPROM_93CX6=y +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y +CONFIG_NETDEVICES=y +# CONFIG_ETHERNET is not set +CONFIG_USB_USBNET=y +CONFIG_USB_NET_SMSC95XX=y +CONFIG_RTL8187=m +CONFIG_ATH_CARDS=m +CONFIG_ATH9K_HTC=m +CONFIG_RT2X00=m +CONFIG_RT73USB=m +CONFIG_RT2800USB=m +CONFIG_RT2800USB_RT53XX=y +CONFIG_RT2800USB_RT55XX=y +CONFIG_RT2800USB_UNKNOWN=y +CONFIG_RTL_CARDS=m +CONFIG_RTL8192CU=m +# CONFIG_RTLWIFI_DEBUG is not set +CONFIG_ZD1211RW=m +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_SERIO is not set +CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_DEVPTS_MULTIPLE_INSTANCES=y +# CONFIG_LEGACY_PTYS is not set +# CONFIG_DEVKMEM is not set +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_SERIAL_MXS_AUART=y +# CONFIG_HW_RANDOM is not set +CONFIG_I2C=y +# CONFIG_I2C_COMPAT is not set +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MXS=y +CONFIG_SPI=y +CONFIG_SPI_GPIO=m +CONFIG_SPI_MXS=y +CONFIG_PTP_1588_CLOCK=y +CONFIG_GPIO_SYSFS=y +# CONFIG_HWMON is not set +CONFIG_WATCHDOG=y +CONFIG_STMP3XXX_RTC_WATCHDOG=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_FB=y +CONFIG_FB_MXS=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_LCD_CLASS_DEVICE=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_PWM=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_LOGO=y +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_HRTIMER=y +# CONFIG_SND_SUPPORT_OLD_API is not set +# CONFIG_SND_VERBOSE_PROCFS is not set +# CONFIG_SND_DRIVERS is not set +# CONFIG_SND_ARM is not set +# CONFIG_SND_SPI is not set +# CONFIG_SND_USB is not set +CONFIG_SND_SOC=y +CONFIG_SND_MXS_SOC_BUILTIN=y +CONFIG_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_STORAGE=y +CONFIG_USB_CHIPIDEA=y +CONFIG_USB_CHIPIDEA_HOST=y +CONFIG_USB_PHY=y +CONFIG_USB_MXS_PHY=y +CONFIG_MMC=y +CONFIG_MMC_UNSAFE_RESUME=y +CONFIG_MMC_MXS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_STMP=y +CONFIG_DMADEVICES=y +CONFIG_MXS_DMA=y +CONFIG_STAGING=y +CONFIG_MXS_LRADC=y +CONFIG_IIO=y +CONFIG_IIO_SYSFS_TRIGGER=y +CONFIG_PWM=y +CONFIG_PWM_MXS=y +CONFIG_EXT4_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +# CONFIG_MISC_FILESYSTEMS is not set +# CONFIG_NETWORK_FILESYSTEMS is not set +CONFIG_PRINTK_TIME=y +CONFIG_FRAME_WARN=2048 +CONFIG_UNUSED_SYMBOLS=y +CONFIG_DEBUG_FS=y +CONFIG_STRICT_DEVMEM=y +CONFIG_DEBUG_USER=y +CONFIG_KEYS=y +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_LZO=y +# CONFIG_CRYPTO_ANSI_CPRNG is not set +CONFIG_CRYPTO_DEV_DCP=y +CONFIG_CRC_CCITT=y +CONFIG_CRC_ITU_T=y +CONFIG_CRC7=m +CONFIG_FONTS=y diff --git a/board/olimex/imx233_olinuxino/mxs-bootlets/mxs-bootlets-01-olinuxino.patch b/board/olimex/imx233_olinuxino/mxs-bootlets/mxs-bootlets-01-olinuxino.patch new file mode 100644 index 0000000000..54c3ca019e --- /dev/null +++ b/board/olimex/imx233_olinuxino/mxs-bootlets/mxs-bootlets-01-olinuxino.patch @@ -0,0 +1,122 @@ +Forward-ported patch from https://github.com/koliqi/imx23-olinuxino +for mxs-bootlets-10.12.01 + +Signed-off-by: Gustavo Zacarias + +diff -Nura imx-bootlets-src-10.12.01/linux_prep/board/imx23_olinuxino_dev.c imx-bootlets-src-10.12.01-olinuxino/linux_prep/board/imx23_olinuxino_dev.c +--- imx-bootlets-src-10.12.01/linux_prep/board/imx23_olinuxino_dev.c 1969-12-31 21:00:00.000000000 -0300 ++++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/board/imx23_olinuxino_dev.c 2013-05-17 15:07:33.282961551 -0300 +@@ -0,0 +1,54 @@ ++/* ++ * Platform specific data for the IMX23_OLINUXINO development board ++ * ++ * Fadil Berisha ++ * ++ * Copyright 2008 SigmaTel, Inc ++ * Copyright 2008 Embedded Alley Solutions, Inc ++ * Copyright 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved. ++ * ++ * This file is licensed under the terms of the GNU General Public License ++ * version 2. This program is licensed "as is" without any warranty of any ++ * kind, whether express or implied. ++ * ++ * http://www.opensource.org/licenses/gpl-license.html ++ * http://www.gnu.org/copyleft/gpl.html ++ */ ++#include ++#include ++#include ++ ++/************************************************ ++ * LRADC keyboard data * ++ ************************************************/ ++int lradc_keypad_ch = LRADC_CH0; ++int lradc_vddio_ch = LRADC_CH6; ++ ++struct lradc_keycode lradc_keycodes[] = { ++ { 100, KEY4 }, ++ { 306, KEY5 }, ++ { 601, KEY6 }, ++ { 932, KEY7 }, ++ { 1260, KEY8 }, ++ { 1424, KEY9 }, ++ { 1707, KEY10 }, ++ { 2207, KEY11 }, ++ { 2525, KEY12 }, ++ { 2831, KEY13 }, ++ { 3134, KEY14 }, ++ { -1, 0 }, ++}; ++ ++/************************************************ ++ * Magic key combinations for Armadillo * ++ ************************************************/ ++u32 magic_keys[MAGIC_KEY_NR] = { ++ [MAGIC_KEY1] = KEY4, ++ [MAGIC_KEY2] = KEY6, ++ [MAGIC_KEY3] = KEY10, ++}; ++ ++/************************************************ ++ * Default command line * ++ ************************************************/ ++char cmdline_def[] = "console=ttyAMA0,115200"; +diff -Nura imx-bootlets-src-10.12.01/linux_prep/cmdlines/imx23_olinuxino_dev.txt imx-bootlets-src-10.12.01-olinuxino/linux_prep/cmdlines/imx23_olinuxino_dev.txt +--- imx-bootlets-src-10.12.01/linux_prep/cmdlines/imx23_olinuxino_dev.txt 1969-12-31 21:00:00.000000000 -0300 ++++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/cmdlines/imx23_olinuxino_dev.txt 2013-05-17 15:07:49.663496106 -0300 +@@ -0,0 +1,3 @@ ++console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait ++console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait ++console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait +diff -Nura imx-bootlets-src-10.12.01/linux_prep/core/setup.c imx-bootlets-src-10.12.01-olinuxino/linux_prep/core/setup.c +--- imx-bootlets-src-10.12.01/linux_prep/core/setup.c 2010-11-04 04:35:38.000000000 -0300 ++++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/core/setup.c 2013-05-17 15:08:39.246114205 -0300 +@@ -84,6 +84,8 @@ + #include "../../mach-mx28/includes/registers/regsrtc.h" + #elif defined(STMP378X) + #include "../../mach-mx23/includes/registers/regsrtc.h" ++#elif defined(IMX23_OLINUXINO) ++#include "../../mach-mx23/includes/registers/regsrtc.h" + #endif + + #define NAND_SECONDARY_BOOT 0x00000002 +diff -Nura imx-bootlets-src-10.12.01/linux_prep/include/mx23/platform.h imx-bootlets-src-10.12.01-olinuxino/linux_prep/include/mx23/platform.h +--- imx-bootlets-src-10.12.01/linux_prep/include/mx23/platform.h 2010-11-04 04:35:38.000000000 -0300 ++++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/include/mx23/platform.h 2013-05-17 15:09:21.006476997 -0300 +@@ -19,6 +19,8 @@ + + #if defined (BOARD_STMP378X_DEV) + #define MACHINE_ID 0xa45 ++#elif defined (BOARD_IMX23_OLINUXINO_DEV) ++#define MACHINE_ID 0x1009 + #else + #error "Allocate a machine ID for your board" + #endif +diff -Nura imx-bootlets-src-10.12.01/linux_prep/Makefile imx-bootlets-src-10.12.01-olinuxino/linux_prep/Makefile +--- imx-bootlets-src-10.12.01/linux_prep/Makefile 2010-11-04 04:35:38.000000000 -0300 ++++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/Makefile 2013-05-17 15:09:53.554539143 -0300 +@@ -69,6 +69,11 @@ + HW_OBJS = $(LRADC_OBJS) + CFLAGS += -DMX28 -DBOARD_MX28_EVK + endif ++ifeq ($(BOARD), imx23_olinuxino_dev) ++ARCH = mx23 ++HW_OBJS = $(LRADC_OBJS) ++CFLAGS += -DIMX23_OLINUXINO -DBOARD_IMX23_OLINUXINO_DEV ++endif + + # Generic code + CORE_OBJS = entry.o resume.o cmdlines.o setup.o keys.o +diff -Nura imx-bootlets-src-10.12.01/Makefile imx-bootlets-src-10.12.01-olinuxino/Makefile +--- imx-bootlets-src-10.12.01/Makefile 2010-11-04 04:35:38.000000000 -0300 ++++ imx-bootlets-src-10.12.01-olinuxino/Makefile 2013-05-17 15:23:53.709956619 -0300 +@@ -16,6 +16,9 @@ + ifeq ($(BOARD), iMX28_EVK) + ARCH = mx28 + endif ++ifeq ($(BOARD), imx23_olinuxino_dev) ++ARCH = mx23 ++endif + + all: build_prep gen_bootstream + diff --git a/board/olimex/imx233_olinuxino/readme.txt b/board/olimex/imx233_olinuxino/readme.txt new file mode 100644 index 0000000000..1c36a61e74 --- /dev/null +++ b/board/olimex/imx233_olinuxino/readme.txt @@ -0,0 +1,57 @@ +This configuration is intended as a base image. +It includes kernel and firmware support for the common USB WiFi hardware. +Packages for WiFi support are up to the user, you'll probably want +one or more of: hostapd, iw, wireless_tools and/or wpa_supplicant. + +It also pulls up the console on the serial port, not on TV output. + +You'll need a spare MicroSD card with Freescale's special partition layout. +This is basically two partitions: + +1) Type 53, the bootstrap + bootloader/kernel partition, should be 16MB. +2) Anything you like, for this example an ext2 partition, type 83 (linux). + +Assuming you see your MicroSD card as /dev/sdc you'd need to do, as root +and from the buildroot project top level directory: +(remember to replace /dev/sdc* with the appropiate device name!) + +***** WARNING: Double check that /dev/sdc is your MicroSD card ***** +***** It might be /dev/sdb or some other device name ***** +***** Failure to do so may result in you wiping your hard disk ***** + +1. Unmount the filesystem(s) if they're already mounted, usually... + + # for fs in `grep /dev/sdc /proc/mounts|cut -d ' ' -f 1`;do umount $fs;done + + ...should work + +2. Blank the partition table out + + # dd if=/dev/zero of=/dev/sdc bs=1024 count=1024 + +3. Set up the partitions + + # fdisk /dev/sdc + n + p + 1 + + +16MB + t + 53 + n + p + 2 + + + w + +4. Fill up the first (bootstrap + kernel) partition + # dd if=output/images/imx23_olinuxino_dev_linux.sb bs=512 of=/dev/sdc1 seek=4 + +5. Fill up the second (filesystem) partition + # dd if=output/images/rootfs.ext2 of=/dev/sdc2 bs=512 + +6. Remove the MicroSD card from your linux PC and put it into your olinuxino. + +7. Boot! You're done! diff --git a/board/qemu/arm-nuri/readme.txt b/board/qemu/arm-nuri/readme.txt new file mode 100644 index 0000000000..6fdba81dc2 --- /dev/null +++ b/board/qemu/arm-nuri/readme.txt @@ -0,0 +1,10 @@ +Run the emulation with: + + qemu-system-arm -M nuri -kernel output/images/zImage -append "console=ttySAC1,115200" -smp 2 -serial null -serial stdio + +The login prompt will appear in the terminal that started Qemu. The +graphical window is the framebuffer. + +Startup time is slow because of the SMP CPU emulation so be patient. + +Tested with QEMU 1.6.1 diff --git a/board/qemu/arm-versatile/linux-2.6.36.config b/board/qemu/arm-versatile/linux-2.6.36.config deleted file mode 100644 index ac58e1afcd..0000000000 --- a/board/qemu/arm-versatile/linux-2.6.36.config +++ /dev/null @@ -1,88 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MACH_VERSATILE_AB=y -CONFIG_PCI=y -CONFIG_LEDS=y -CONFIG_LEDS_CPU=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=1f03 mem=32M" -CONFIG_FPE_NWFPE=y -CONFIG_VFP=y -CONFIG_PM=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_ARM_INTEGRATOR=y -CONFIG_BLK_DEV_RAM=y -CONFIG_EEPROM_LEGACY=m -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_SYM53C8XX_2=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_SMC91X=y -# CONFIG_SERIO_SERPORT is not set -CONFIG_SERIO_AMBAKMI=y -CONFIG_SERIAL_8250=m -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_RSA=y -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -CONFIG_LEGACY_PTY_COUNT=16 -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=m -# CONFIG_HWMON is not set -CONFIG_FB=y -CONFIG_FB_ARMCLCD=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FONTS=y -CONFIG_FONT_ACORN_8x8=y -CONFIG_SOUND=y -CONFIG_SND=m -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_ARMAACI=m -CONFIG_MMC=y -CONFIG_MMC_ARMMMCI=m -CONFIG_EXT2_FS=y -CONFIG_VFAT_FS=m -CONFIG_JFFS2_FS=y -CONFIG_CRAMFS=y -CONFIG_MINIX_FS=y -CONFIG_ROMFS_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_NFSD=y -CONFIG_NFSD_V3=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_ISO8859_1=m -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y diff --git a/board/qemu/arm-versatile/linux-3.11.config b/board/qemu/arm-versatile/linux-3.11.config new file mode 100644 index 0000000000..da73575b5c --- /dev/null +++ b/board/qemu/arm-versatile/linux-3.11.config @@ -0,0 +1,89 @@ +CONFIG_ARCH_VERSATILE=y +CONFIG_EXPERIMENTAL=y +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_SYSVIPC=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_BLK_DEV_INITRD=y +CONFIG_SLAB=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MACH_VERSATILE_AB=y +CONFIG_PCI=y +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +CONFIG_LEDS=y +CONFIG_LEDS_CPU=y +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="root=1f03 mem=32M" +CONFIG_PM=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_BOOTP=y +# CONFIG_INET_DIAG is not set +# CONFIG_IPV6 is not set +CONFIG_MTD=y +CONFIG_MTD_PARTITIONS=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_CFI=y +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_CFI_INTELEXT=y +CONFIG_MTD_PHYSMAP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y +CONFIG_SCSI_SYM53C8XX_2=y +CONFIG_EEPROM_LEGACY=m +CONFIG_NETDEVICES=y +CONFIG_NET_ETHERNET=y +CONFIG_SMC91X=y +# CONFIG_SERIO_SERPORT is not set +CONFIG_SERIO_AMBAKMI=y +CONFIG_SERIAL_8250=m +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_MANY_PORTS=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_8250_RSA=y +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_LEGACY_PTY_COUNT=16 +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=m +# CONFIG_HWMON is not set +CONFIG_FB=y +CONFIG_FB_ARMCLCD=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FONTS=y +CONFIG_FONT_ACORN_8x8=y +CONFIG_SOUND=y +CONFIG_SND=m +CONFIG_SND_MIXER_OSS=m +CONFIG_SND_PCM_OSS=m +CONFIG_SND_ARMAACI=m +CONFIG_MMC=y +CONFIG_MMC_ARMMMCI=m +CONFIG_EXT2_FS=y +CONFIG_VFAT_FS=m +CONFIG_JFFS2_FS=y +CONFIG_CRAMFS=y +CONFIG_MINIX_FS=y +CONFIG_ROMFS_FS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_ROOT_NFS=y +CONFIG_NFSD=y +CONFIG_NFSD_V3=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_ISO8859_1=m +CONFIG_MAGIC_SYSRQ=y +CONFIG_DEBUG_KERNEL=y +CONFIG_DEBUG_USER=y +CONFIG_DEBUG_ERRORS=y +CONFIG_DEBUG_LL=y diff --git a/board/qemu/arm-versatile/readme.txt b/board/qemu/arm-versatile/readme.txt new file mode 100644 index 0000000000..7d0745f38b --- /dev/null +++ b/board/qemu/arm-versatile/readme.txt @@ -0,0 +1,8 @@ +Run the emulation with: + + qemu-system-arm -M versatilepb -kernel output/images/zImage -drive file=output/images/rootfs.ext2,if=scsi -append "root=/dev/sda console=ttyAMA0,115200" -serial stdio -net nic,model=smc91c111 -net user + +The login prompt will appear in the terminal that started Qemu. The +graphical window is the framebuffer. + +Tested with QEMU 1.6.1 diff --git a/board/qemu/arm-vexpress/readme.txt b/board/qemu/arm-vexpress/readme.txt new file mode 100644 index 0000000000..9a4694d68a --- /dev/null +++ b/board/qemu/arm-vexpress/readme.txt @@ -0,0 +1,8 @@ +Run the emulation with: + + qemu-system-arm -M vexpress-a9 -kernel output/images/zImage -drive file=output/images/rootfs.ext2,if=sd -append "console=ttyAMA0,115200 root=/dev/mmcblk0" -serial stdio -net nic,model=lan9118 -net user + +The login prompt will appear in the terminal that started Qemu. The +graphical window is the framebuffer. + +Tested with QEMU 1.6.1 diff --git a/board/qemu/microblazebe-mmu/linux-3.12.config b/board/qemu/microblazebe-mmu/linux-3.12.config new file mode 100644 index 0000000000..7083cf568e --- /dev/null +++ b/board/qemu/microblazebe-mmu/linux-3.12.config @@ -0,0 +1,68 @@ +CONFIG_EXPERIMENTAL=y +CONFIG_SYSVIPC=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="rootfs.cpio" +CONFIG_INITRAMFS_COMPRESSION_GZIP=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_EXPERT=y +CONFIG_KALLSYMS_ALL=y +CONFIG_KALLSYMS_EXTRA_PASS=y +# CONFIG_HOTPLUG is not set +# CONFIG_BASE_FULL is not set +# CONFIG_FUTEX is not set +# CONFIG_EPOLL is not set +# CONFIG_SIGNALFD is not set +# CONFIG_SHMEM is not set +CONFIG_SLAB=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_BLK_DEV_BSG is not set +CONFIG_OPT_LIB_ASM=y +CONFIG_XILINX_MICROBLAZE0_FAMILY="spartan3adsp" +CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1 +CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1 +CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1 +CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=1 +CONFIG_HZ_100=y +CONFIG_MMU=y +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE_FORCE=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_INET_LRO is not set +# CONFIG_IPV6 is not set +CONFIG_PROC_DEVICETREE=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=8192 +CONFIG_NETDEVICES=y +CONFIG_NET_ETHERNET=y +CONFIG_XILINX_EMACLITE=y +# CONFIG_INPUT is not set +# CONFIG_SERIO is not set +# CONFIG_VT is not set +CONFIG_SERIAL_UARTLITE=y +CONFIG_SERIAL_UARTLITE_CONSOLE=y +# CONFIG_HW_RANDOM is not set +# CONFIG_HWMON is not set +# CONFIG_USB_SUPPORT is not set +CONFIG_EXT2_FS=y +# CONFIG_DNOTIFY is not set +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_CIFS=y +CONFIG_CIFS_STATS=y +CONFIG_CIFS_STATS2=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_DEBUG_KERNEL=y +CONFIG_DETECT_HUNG_TASK=y +CONFIG_DEBUG_SLAB=y +CONFIG_DEBUG_SPINLOCK=y +CONFIG_DEBUG_INFO=y +# CONFIG_RCU_CPU_STALL_DETECTOR is not set +CONFIG_EARLY_PRINTK=y +# CONFIG_CRYPTO_ANSI_CPRNG is not set diff --git a/board/qemu/microblazebe-mmu/readme.txt b/board/qemu/microblazebe-mmu/readme.txt new file mode 100644 index 0000000000..8ade434017 --- /dev/null +++ b/board/qemu/microblazebe-mmu/readme.txt @@ -0,0 +1,7 @@ +Run the emulation with: + + qemu-system-microblaze -M petalogix-s3adsp1800 -kernel output/images/linux.bin -serial stdio + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 1.6.1 diff --git a/board/qemu/microblazebe-mmu/system.dts b/board/qemu/microblazebe-mmu/system.dts new file mode 100644 index 0000000000..3f85df2b73 --- /dev/null +++ b/board/qemu/microblazebe-mmu/system.dts @@ -0,0 +1,367 @@ +/* + * Device Tree Generator version: 1.1 + * + * (C) Copyright 2007-2008 Xilinx, Inc. + * (C) Copyright 2007-2009 Michal Simek + * + * Michal SIMEK + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * CAUTION: This file is automatically generated by libgen. + * Version: Xilinx EDK 10.1.03 EDK_K_SP3.6 + * + * XPS project directory: Xilinx-ML505-ll_temac-sgdma-MMU-FDT-edk101 + */ + +/dts-v1/; +/ { + #address-cells = <1>; + #size-cells = <1>; + compatible = "xlnx,microblaze"; + hard-reset-gpios = <&LEDs_8Bit 2 1>; + model = "testing"; + DDR2_SDRAM: memory@90000000 { + device_type = "memory"; + reg = < 0x90000000 0x10000000 >; + } ; + aliases { + ethernet0 = &Hard_Ethernet_MAC; + serial0 = &RS232_Uart_1; + } ; + chosen { + bootargs = "console=ttyUL0,115200 highres=on"; + linux,stdout-path = "/plb@0/serial@84000000"; + } ; + cpus { + #address-cells = <1>; + #cpus = <0x1>; + #size-cells = <0>; + microblaze_0: cpu@0 { + clock-frequency = <125000000>; + compatible = "xlnx,microblaze-7.10.d"; + d-cache-baseaddr = <0x90000000>; + d-cache-highaddr = <0x9fffffff>; + d-cache-line-size = <0x10>; + d-cache-size = <0x2000>; + device_type = "cpu"; + i-cache-baseaddr = <0x90000000>; + i-cache-highaddr = <0x9fffffff>; + i-cache-line-size = <0x10>; + i-cache-size = <0x2000>; + model = "microblaze,7.10.d"; + reg = <0>; + timebase-frequency = <125000000>; + xlnx,addr-tag-bits = <0xf>; + xlnx,allow-dcache-wr = <0x1>; + xlnx,allow-icache-wr = <0x1>; + xlnx,area-optimized = <0x0>; + xlnx,cache-byte-size = <0x2000>; + xlnx,d-lmb = <0x1>; + xlnx,d-opb = <0x0>; + xlnx,d-plb = <0x1>; + xlnx,data-size = <0x20>; + xlnx,dcache-addr-tag = <0xf>; + xlnx,dcache-always-used = <0x1>; + xlnx,dcache-byte-size = <0x2000>; + xlnx,dcache-line-len = <0x4>; + xlnx,dcache-use-fsl = <0x1>; + xlnx,debug-enabled = <0x1>; + xlnx,div-zero-exception = <0x1>; + xlnx,dopb-bus-exception = <0x0>; + xlnx,dynamic-bus-sizing = <0x1>; + xlnx,edge-is-positive = <0x1>; + xlnx,family = "virtex5"; + xlnx,endianness = <0x1>; + xlnx,fpu-exception = <0x1>; + xlnx,fsl-data-size = <0x20>; + xlnx,fsl-exception = <0x0>; + xlnx,fsl-links = <0x0>; + xlnx,i-lmb = <0x1>; + xlnx,i-opb = <0x0>; + xlnx,i-plb = <0x1>; + xlnx,icache-always-used = <0x1>; + xlnx,icache-line-len = <0x4>; + xlnx,icache-use-fsl = <0x1>; + xlnx,ill-opcode-exception = <0x1>; + xlnx,instance = "microblaze_0"; + xlnx,interconnect = <0x1>; + xlnx,interrupt-is-edge = <0x0>; + xlnx,iopb-bus-exception = <0x0>; + xlnx,mmu-dtlb-size = <0x4>; + xlnx,mmu-itlb-size = <0x2>; + xlnx,mmu-tlb-access = <0x3>; + xlnx,mmu-zones = <0x10>; + xlnx,number-of-pc-brk = <0x1>; + xlnx,number-of-rd-addr-brk = <0x0>; + xlnx,number-of-wr-addr-brk = <0x0>; + xlnx,opcode-0x0-illegal = <0x1>; + xlnx,pvr = <0x2>; + xlnx,pvr-user1 = <0x0>; + xlnx,pvr-user2 = <0x0>; + xlnx,reset-msr = <0x0>; + xlnx,sco = <0x0>; + xlnx,unaligned-exceptions = <0x1>; + xlnx,use-barrel = <0x1>; + xlnx,use-dcache = <0x1>; + xlnx,use-div = <0x1>; + xlnx,use-ext-brk = <0x1>; + xlnx,use-ext-nm-brk = <0x1>; + xlnx,use-extended-fsl-instr = <0x0>; + xlnx,use-fpu = <0x2>; + xlnx,use-hw-mul = <0x2>; + xlnx,use-icache = <0x1>; + xlnx,use-interrupt = <0x1>; + xlnx,use-mmu = <0x3>; + xlnx,use-msr-instr = <0x1>; + xlnx,use-pcmp-instr = <0x1>; + } ; + } ; + mb_plb: plb@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "xlnx,plb-v46-1.03.a", "xlnx,plb-v46-1.00.a", "simple-bus"; + ranges ; + FLASH: flash@a0000000 { + bank-width = <2>; + compatible = "xlnx,xps-mch-emc-2.00.a", "cfi-flash"; + reg = < 0xa0000000 0x2000000 >; + xlnx,family = "virtex5"; + xlnx,include-datawidth-matching-0 = <0x1>; + xlnx,include-datawidth-matching-1 = <0x0>; + xlnx,include-datawidth-matching-2 = <0x0>; + xlnx,include-datawidth-matching-3 = <0x0>; + xlnx,include-negedge-ioregs = <0x0>; + xlnx,include-plb-ipif = <0x1>; + xlnx,include-wrbuf = <0x1>; + xlnx,max-mem-width = <0x10>; + xlnx,mch-native-dwidth = <0x20>; + xlnx,mch-plb-clk-period-ps = <0x1f40>; + xlnx,mch-splb-awidth = <0x20>; + xlnx,mch0-accessbuf-depth = <0x10>; + xlnx,mch0-protocol = <0x0>; + xlnx,mch0-rddatabuf-depth = <0x10>; + xlnx,mch1-accessbuf-depth = <0x10>; + xlnx,mch1-protocol = <0x0>; + xlnx,mch1-rddatabuf-depth = <0x10>; + xlnx,mch2-accessbuf-depth = <0x10>; + xlnx,mch2-protocol = <0x0>; + xlnx,mch2-rddatabuf-depth = <0x10>; + xlnx,mch3-accessbuf-depth = <0x10>; + xlnx,mch3-protocol = <0x0>; + xlnx,mch3-rddatabuf-depth = <0x10>; + xlnx,mem0-width = <0x10>; + xlnx,mem1-width = <0x20>; + xlnx,mem2-width = <0x20>; + xlnx,mem3-width = <0x20>; + xlnx,num-banks-mem = <0x1>; + xlnx,num-channels = <0x0>; + xlnx,priority-mode = <0x0>; + xlnx,synch-mem-0 = <0x0>; + xlnx,synch-mem-1 = <0x0>; + xlnx,synch-mem-2 = <0x0>; + xlnx,synch-mem-3 = <0x0>; + xlnx,synch-pipedelay-0 = <0x2>; + xlnx,synch-pipedelay-1 = <0x2>; + xlnx,synch-pipedelay-2 = <0x2>; + xlnx,synch-pipedelay-3 = <0x2>; + xlnx,tavdv-ps-mem-0 = <0x1adb0>; + xlnx,tavdv-ps-mem-1 = <0x3a98>; + xlnx,tavdv-ps-mem-2 = <0x3a98>; + xlnx,tavdv-ps-mem-3 = <0x3a98>; + xlnx,tcedv-ps-mem-0 = <0x1adb0>; + xlnx,tcedv-ps-mem-1 = <0x3a98>; + xlnx,tcedv-ps-mem-2 = <0x3a98>; + xlnx,tcedv-ps-mem-3 = <0x3a98>; + xlnx,thzce-ps-mem-0 = <0x88b8>; + xlnx,thzce-ps-mem-1 = <0x1b58>; + xlnx,thzce-ps-mem-2 = <0x1b58>; + xlnx,thzce-ps-mem-3 = <0x1b58>; + xlnx,thzoe-ps-mem-0 = <0x1b58>; + xlnx,thzoe-ps-mem-1 = <0x1b58>; + xlnx,thzoe-ps-mem-2 = <0x1b58>; + xlnx,thzoe-ps-mem-3 = <0x1b58>; + xlnx,tlzwe-ps-mem-0 = <0x88b8>; + xlnx,tlzwe-ps-mem-1 = <0x0>; + xlnx,tlzwe-ps-mem-2 = <0x0>; + xlnx,tlzwe-ps-mem-3 = <0x0>; + xlnx,twc-ps-mem-0 = <0x2af8>; + xlnx,twc-ps-mem-1 = <0x3a98>; + xlnx,twc-ps-mem-2 = <0x3a98>; + xlnx,twc-ps-mem-3 = <0x3a98>; + xlnx,twp-ps-mem-0 = <0x11170>; + xlnx,twp-ps-mem-1 = <0x2ee0>; + xlnx,twp-ps-mem-2 = <0x2ee0>; + xlnx,twp-ps-mem-3 = <0x2ee0>; + xlnx,xcl0-linesize = <0x4>; + xlnx,xcl0-writexfer = <0x1>; + xlnx,xcl1-linesize = <0x4>; + xlnx,xcl1-writexfer = <0x1>; + xlnx,xcl2-linesize = <0x4>; + xlnx,xcl2-writexfer = <0x1>; + xlnx,xcl3-linesize = <0x4>; + xlnx,xcl3-writexfer = <0x1>; + } ; + Hard_Ethernet_MAC: xps-ll-temac@81c00000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "xlnx,compound"; + ranges ; + ethernet@81c00000 { + compatible = "xlnx,xps-ll-temac-1.01.b", "xlnx,xps-ll-temac-1.00.a"; + device_type = "network"; + interrupt-parent = <&xps_intc_0>; + interrupts = < 5 2 >; + llink-connected = <&PIM3>; + local-mac-address = [ 00 0a 35 00 00 00 ]; + reg = < 0x81c00000 0x40 >; + xlnx,bus2core-clk-ratio = <0x1>; + xlnx,phy-type = <0x1>; + xlnx,phyaddr = <0x1>; + xlnx,rxcsum = <0x0>; + xlnx,rxfifo = <0x1000>; + xlnx,temac-type = <0x0>; + xlnx,txcsum = <0x0>; + xlnx,txfifo = <0x1000>; + } ; + } ; + IIC_EEPROM: i2c@81600000 { + compatible = "xlnx,xps-iic-2.00.a"; + interrupt-parent = <&xps_intc_0>; + interrupts = < 6 2 >; + reg = < 0x81600000 0x10000 >; + xlnx,clk-freq = <0x7735940>; + xlnx,family = "virtex5"; + xlnx,gpo-width = <0x1>; + xlnx,iic-freq = <0x186a0>; + xlnx,scl-inertial-delay = <0x0>; + xlnx,sda-inertial-delay = <0x0>; + xlnx,ten-bit-adr = <0x0>; + } ; + LEDs_8Bit: gpio@81400000 { + compatible = "xlnx,xps-gpio-1.00.a"; + interrupt-parent = <&xps_intc_0>; + interrupts = < 7 2 >; + reg = < 0x81400000 0x10000 >; + xlnx,all-inputs = <0x0>; + xlnx,all-inputs-2 = <0x0>; + xlnx,dout-default = <0x0>; + xlnx,dout-default-2 = <0x0>; + xlnx,family = "virtex5"; + xlnx,gpio-width = <0x8>; + xlnx,interrupt-present = <0x1>; + xlnx,is-bidir = <0x1>; + xlnx,is-bidir-2 = <0x1>; + xlnx,is-dual = <0x0>; + xlnx,tri-default = <0xffffffff>; + xlnx,tri-default-2 = <0xffffffff>; + #gpio-cells = <2>; + gpio-controller; + } ; + + gpio-leds { + compatible = "gpio-leds"; + + heartbeat { + label = "Heartbeat"; + gpios = <&LEDs_8Bit 4 1>; + linux,default-trigger = "heartbeat"; + }; + + yellow { + label = "Yellow"; + gpios = <&LEDs_8Bit 5 1>; + }; + + red { + label = "Red"; + gpios = <&LEDs_8Bit 6 1>; + }; + + green { + label = "Green"; + gpios = <&LEDs_8Bit 7 1>; + }; + } ; + RS232_Uart_1: serial@84000000 { + clock-frequency = <125000000>; + compatible = "xlnx,xps-uartlite-1.00.a"; + current-speed = <115200>; + device_type = "serial"; + interrupt-parent = <&xps_intc_0>; + interrupts = < 8 0 >; + port-number = <0>; + reg = < 0x84000000 0x10000 >; + xlnx,baudrate = <0x1c200>; + xlnx,data-bits = <0x8>; + xlnx,family = "virtex5"; + xlnx,odd-parity = <0x0>; + xlnx,use-parity = <0x0>; + } ; + SysACE_CompactFlash: sysace@83600000 { + compatible = "xlnx,xps-sysace-1.00.a"; + interrupt-parent = <&xps_intc_0>; + interrupts = < 4 2 >; + reg = < 0x83600000 0x10000 >; + xlnx,family = "virtex5"; + xlnx,mem-width = <0x10>; + } ; + debug_module: debug@84400000 { + compatible = "xlnx,mdm-1.00.d"; + reg = < 0x84400000 0x10000 >; + xlnx,family = "virtex5"; + xlnx,interconnect = <0x1>; + xlnx,jtag-chain = <0x2>; + xlnx,mb-dbg-ports = <0x1>; + xlnx,uart-width = <0x8>; + xlnx,use-uart = <0x1>; + xlnx,write-fsl-ports = <0x0>; + } ; + mpmc@90000000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "xlnx,mpmc-4.02.a"; + ranges ; + PIM3: sdma@84600180 { + compatible = "xlnx,ll-dma-1.00.a"; + interrupt-parent = <&xps_intc_0>; + interrupts = < 2 2 1 2 >; + reg = < 0x84600180 0x80 >; + } ; + } ; + xps_intc_0: interrupt-controller@81800000 { + #interrupt-cells = <0x2>; + compatible = "xlnx,xps-intc-1.00.a"; + interrupt-controller ; + reg = < 0x81800000 0x10000 >; + xlnx,kind-of-intr = <0x100>; + xlnx,num-intr-inputs = <0x9>; + } ; + xps_timer_1: timer@83c00000 { + compatible = "xlnx,xps-timer-1.00.a"; + interrupt-parent = <&xps_intc_0>; + interrupts = < 3 2 >; + reg = < 0x83c00000 0x10000 >; + xlnx,count-width = <0x20>; + xlnx,family = "virtex5"; + xlnx,gen0-assert = <0x1>; + xlnx,gen1-assert = <0x1>; + xlnx,one-timer-only = <0x0>; + xlnx,trig0-assert = <0x1>; + xlnx,trig1-assert = <0x1>; + } ; + } ; +} ; diff --git a/board/qemu/microblazeel-mmu/linux-3.12.config b/board/qemu/microblazeel-mmu/linux-3.12.config new file mode 100644 index 0000000000..cdeb3242df --- /dev/null +++ b/board/qemu/microblazeel-mmu/linux-3.12.config @@ -0,0 +1,67 @@ +CONFIG_EXPERIMENTAL=y +CONFIG_SYSVIPC=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="rootfs.cpio" +CONFIG_INITRAMFS_COMPRESSION_GZIP=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_EXPERT=y +CONFIG_KALLSYMS_ALL=y +CONFIG_KALLSYMS_EXTRA_PASS=y +# CONFIG_HOTPLUG is not set +# CONFIG_BASE_FULL is not set +# CONFIG_FUTEX is not set +# CONFIG_EPOLL is not set +# CONFIG_SIGNALFD is not set +# CONFIG_SHMEM is not set +CONFIG_SLAB=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_BLK_DEV_BSG is not set +CONFIG_XILINX_MICROBLAZE0_FAMILY="spartan3adsp" +CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1 +CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1 +CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1 +CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=1 +CONFIG_HZ_100=y +CONFIG_MMU=y +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE_FORCE=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_INET_LRO is not set +# CONFIG_IPV6 is not set +CONFIG_PROC_DEVICETREE=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=8192 +CONFIG_NETDEVICES=y +CONFIG_NET_ETHERNET=y +CONFIG_XILINX_EMACLITE=y +# CONFIG_INPUT is not set +# CONFIG_SERIO is not set +# CONFIG_VT is not set +CONFIG_SERIAL_UARTLITE=y +CONFIG_SERIAL_UARTLITE_CONSOLE=y +# CONFIG_HW_RANDOM is not set +# CONFIG_HWMON is not set +# CONFIG_USB_SUPPORT is not set +CONFIG_EXT2_FS=y +# CONFIG_DNOTIFY is not set +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_CIFS=y +CONFIG_CIFS_STATS=y +CONFIG_CIFS_STATS2=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_DEBUG_KERNEL=y +CONFIG_DETECT_HUNG_TASK=y +CONFIG_DEBUG_SLAB=y +CONFIG_DEBUG_SPINLOCK=y +CONFIG_DEBUG_INFO=y +# CONFIG_RCU_CPU_STALL_DETECTOR is not set +CONFIG_EARLY_PRINTK=y +# CONFIG_CRYPTO_ANSI_CPRNG is not set diff --git a/board/qemu/microblazeel-mmu/readme.txt b/board/qemu/microblazeel-mmu/readme.txt new file mode 100644 index 0000000000..9ac55dbca6 --- /dev/null +++ b/board/qemu/microblazeel-mmu/readme.txt @@ -0,0 +1,7 @@ +Run the emulation with: + + qemu-system-microblazeel -M petalogix-s3adsp1800 -kernel output/images/linux.bin -serial stdio + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 1.6.1 diff --git a/board/qemu/microblazeel-mmu/system.dts b/board/qemu/microblazeel-mmu/system.dts new file mode 100644 index 0000000000..3f85df2b73 --- /dev/null +++ b/board/qemu/microblazeel-mmu/system.dts @@ -0,0 +1,367 @@ +/* + * Device Tree Generator version: 1.1 + * + * (C) Copyright 2007-2008 Xilinx, Inc. + * (C) Copyright 2007-2009 Michal Simek + * + * Michal SIMEK + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * CAUTION: This file is automatically generated by libgen. + * Version: Xilinx EDK 10.1.03 EDK_K_SP3.6 + * + * XPS project directory: Xilinx-ML505-ll_temac-sgdma-MMU-FDT-edk101 + */ + +/dts-v1/; +/ { + #address-cells = <1>; + #size-cells = <1>; + compatible = "xlnx,microblaze"; + hard-reset-gpios = <&LEDs_8Bit 2 1>; + model = "testing"; + DDR2_SDRAM: memory@90000000 { + device_type = "memory"; + reg = < 0x90000000 0x10000000 >; + } ; + aliases { + ethernet0 = &Hard_Ethernet_MAC; + serial0 = &RS232_Uart_1; + } ; + chosen { + bootargs = "console=ttyUL0,115200 highres=on"; + linux,stdout-path = "/plb@0/serial@84000000"; + } ; + cpus { + #address-cells = <1>; + #cpus = <0x1>; + #size-cells = <0>; + microblaze_0: cpu@0 { + clock-frequency = <125000000>; + compatible = "xlnx,microblaze-7.10.d"; + d-cache-baseaddr = <0x90000000>; + d-cache-highaddr = <0x9fffffff>; + d-cache-line-size = <0x10>; + d-cache-size = <0x2000>; + device_type = "cpu"; + i-cache-baseaddr = <0x90000000>; + i-cache-highaddr = <0x9fffffff>; + i-cache-line-size = <0x10>; + i-cache-size = <0x2000>; + model = "microblaze,7.10.d"; + reg = <0>; + timebase-frequency = <125000000>; + xlnx,addr-tag-bits = <0xf>; + xlnx,allow-dcache-wr = <0x1>; + xlnx,allow-icache-wr = <0x1>; + xlnx,area-optimized = <0x0>; + xlnx,cache-byte-size = <0x2000>; + xlnx,d-lmb = <0x1>; + xlnx,d-opb = <0x0>; + xlnx,d-plb = <0x1>; + xlnx,data-size = <0x20>; + xlnx,dcache-addr-tag = <0xf>; + xlnx,dcache-always-used = <0x1>; + xlnx,dcache-byte-size = <0x2000>; + xlnx,dcache-line-len = <0x4>; + xlnx,dcache-use-fsl = <0x1>; + xlnx,debug-enabled = <0x1>; + xlnx,div-zero-exception = <0x1>; + xlnx,dopb-bus-exception = <0x0>; + xlnx,dynamic-bus-sizing = <0x1>; + xlnx,edge-is-positive = <0x1>; + xlnx,family = "virtex5"; + xlnx,endianness = <0x1>; + xlnx,fpu-exception = <0x1>; + xlnx,fsl-data-size = <0x20>; + xlnx,fsl-exception = <0x0>; + xlnx,fsl-links = <0x0>; + xlnx,i-lmb = <0x1>; + xlnx,i-opb = <0x0>; + xlnx,i-plb = <0x1>; + xlnx,icache-always-used = <0x1>; + xlnx,icache-line-len = <0x4>; + xlnx,icache-use-fsl = <0x1>; + xlnx,ill-opcode-exception = <0x1>; + xlnx,instance = "microblaze_0"; + xlnx,interconnect = <0x1>; + xlnx,interrupt-is-edge = <0x0>; + xlnx,iopb-bus-exception = <0x0>; + xlnx,mmu-dtlb-size = <0x4>; + xlnx,mmu-itlb-size = <0x2>; + xlnx,mmu-tlb-access = <0x3>; + xlnx,mmu-zones = <0x10>; + xlnx,number-of-pc-brk = <0x1>; + xlnx,number-of-rd-addr-brk = <0x0>; + xlnx,number-of-wr-addr-brk = <0x0>; + xlnx,opcode-0x0-illegal = <0x1>; + xlnx,pvr = <0x2>; + xlnx,pvr-user1 = <0x0>; + xlnx,pvr-user2 = <0x0>; + xlnx,reset-msr = <0x0>; + xlnx,sco = <0x0>; + xlnx,unaligned-exceptions = <0x1>; + xlnx,use-barrel = <0x1>; + xlnx,use-dcache = <0x1>; + xlnx,use-div = <0x1>; + xlnx,use-ext-brk = <0x1>; + xlnx,use-ext-nm-brk = <0x1>; + xlnx,use-extended-fsl-instr = <0x0>; + xlnx,use-fpu = <0x2>; + xlnx,use-hw-mul = <0x2>; + xlnx,use-icache = <0x1>; + xlnx,use-interrupt = <0x1>; + xlnx,use-mmu = <0x3>; + xlnx,use-msr-instr = <0x1>; + xlnx,use-pcmp-instr = <0x1>; + } ; + } ; + mb_plb: plb@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "xlnx,plb-v46-1.03.a", "xlnx,plb-v46-1.00.a", "simple-bus"; + ranges ; + FLASH: flash@a0000000 { + bank-width = <2>; + compatible = "xlnx,xps-mch-emc-2.00.a", "cfi-flash"; + reg = < 0xa0000000 0x2000000 >; + xlnx,family = "virtex5"; + xlnx,include-datawidth-matching-0 = <0x1>; + xlnx,include-datawidth-matching-1 = <0x0>; + xlnx,include-datawidth-matching-2 = <0x0>; + xlnx,include-datawidth-matching-3 = <0x0>; + xlnx,include-negedge-ioregs = <0x0>; + xlnx,include-plb-ipif = <0x1>; + xlnx,include-wrbuf = <0x1>; + xlnx,max-mem-width = <0x10>; + xlnx,mch-native-dwidth = <0x20>; + xlnx,mch-plb-clk-period-ps = <0x1f40>; + xlnx,mch-splb-awidth = <0x20>; + xlnx,mch0-accessbuf-depth = <0x10>; + xlnx,mch0-protocol = <0x0>; + xlnx,mch0-rddatabuf-depth = <0x10>; + xlnx,mch1-accessbuf-depth = <0x10>; + xlnx,mch1-protocol = <0x0>; + xlnx,mch1-rddatabuf-depth = <0x10>; + xlnx,mch2-accessbuf-depth = <0x10>; + xlnx,mch2-protocol = <0x0>; + xlnx,mch2-rddatabuf-depth = <0x10>; + xlnx,mch3-accessbuf-depth = <0x10>; + xlnx,mch3-protocol = <0x0>; + xlnx,mch3-rddatabuf-depth = <0x10>; + xlnx,mem0-width = <0x10>; + xlnx,mem1-width = <0x20>; + xlnx,mem2-width = <0x20>; + xlnx,mem3-width = <0x20>; + xlnx,num-banks-mem = <0x1>; + xlnx,num-channels = <0x0>; + xlnx,priority-mode = <0x0>; + xlnx,synch-mem-0 = <0x0>; + xlnx,synch-mem-1 = <0x0>; + xlnx,synch-mem-2 = <0x0>; + xlnx,synch-mem-3 = <0x0>; + xlnx,synch-pipedelay-0 = <0x2>; + xlnx,synch-pipedelay-1 = <0x2>; + xlnx,synch-pipedelay-2 = <0x2>; + xlnx,synch-pipedelay-3 = <0x2>; + xlnx,tavdv-ps-mem-0 = <0x1adb0>; + xlnx,tavdv-ps-mem-1 = <0x3a98>; + xlnx,tavdv-ps-mem-2 = <0x3a98>; + xlnx,tavdv-ps-mem-3 = <0x3a98>; + xlnx,tcedv-ps-mem-0 = <0x1adb0>; + xlnx,tcedv-ps-mem-1 = <0x3a98>; + xlnx,tcedv-ps-mem-2 = <0x3a98>; + xlnx,tcedv-ps-mem-3 = <0x3a98>; + xlnx,thzce-ps-mem-0 = <0x88b8>; + xlnx,thzce-ps-mem-1 = <0x1b58>; + xlnx,thzce-ps-mem-2 = <0x1b58>; + xlnx,thzce-ps-mem-3 = <0x1b58>; + xlnx,thzoe-ps-mem-0 = <0x1b58>; + xlnx,thzoe-ps-mem-1 = <0x1b58>; + xlnx,thzoe-ps-mem-2 = <0x1b58>; + xlnx,thzoe-ps-mem-3 = <0x1b58>; + xlnx,tlzwe-ps-mem-0 = <0x88b8>; + xlnx,tlzwe-ps-mem-1 = <0x0>; + xlnx,tlzwe-ps-mem-2 = <0x0>; + xlnx,tlzwe-ps-mem-3 = <0x0>; + xlnx,twc-ps-mem-0 = <0x2af8>; + xlnx,twc-ps-mem-1 = <0x3a98>; + xlnx,twc-ps-mem-2 = <0x3a98>; + xlnx,twc-ps-mem-3 = <0x3a98>; + xlnx,twp-ps-mem-0 = <0x11170>; + xlnx,twp-ps-mem-1 = <0x2ee0>; + xlnx,twp-ps-mem-2 = <0x2ee0>; + xlnx,twp-ps-mem-3 = <0x2ee0>; + xlnx,xcl0-linesize = <0x4>; + xlnx,xcl0-writexfer = <0x1>; + xlnx,xcl1-linesize = <0x4>; + xlnx,xcl1-writexfer = <0x1>; + xlnx,xcl2-linesize = <0x4>; + xlnx,xcl2-writexfer = <0x1>; + xlnx,xcl3-linesize = <0x4>; + xlnx,xcl3-writexfer = <0x1>; + } ; + Hard_Ethernet_MAC: xps-ll-temac@81c00000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "xlnx,compound"; + ranges ; + ethernet@81c00000 { + compatible = "xlnx,xps-ll-temac-1.01.b", "xlnx,xps-ll-temac-1.00.a"; + device_type = "network"; + interrupt-parent = <&xps_intc_0>; + interrupts = < 5 2 >; + llink-connected = <&PIM3>; + local-mac-address = [ 00 0a 35 00 00 00 ]; + reg = < 0x81c00000 0x40 >; + xlnx,bus2core-clk-ratio = <0x1>; + xlnx,phy-type = <0x1>; + xlnx,phyaddr = <0x1>; + xlnx,rxcsum = <0x0>; + xlnx,rxfifo = <0x1000>; + xlnx,temac-type = <0x0>; + xlnx,txcsum = <0x0>; + xlnx,txfifo = <0x1000>; + } ; + } ; + IIC_EEPROM: i2c@81600000 { + compatible = "xlnx,xps-iic-2.00.a"; + interrupt-parent = <&xps_intc_0>; + interrupts = < 6 2 >; + reg = < 0x81600000 0x10000 >; + xlnx,clk-freq = <0x7735940>; + xlnx,family = "virtex5"; + xlnx,gpo-width = <0x1>; + xlnx,iic-freq = <0x186a0>; + xlnx,scl-inertial-delay = <0x0>; + xlnx,sda-inertial-delay = <0x0>; + xlnx,ten-bit-adr = <0x0>; + } ; + LEDs_8Bit: gpio@81400000 { + compatible = "xlnx,xps-gpio-1.00.a"; + interrupt-parent = <&xps_intc_0>; + interrupts = < 7 2 >; + reg = < 0x81400000 0x10000 >; + xlnx,all-inputs = <0x0>; + xlnx,all-inputs-2 = <0x0>; + xlnx,dout-default = <0x0>; + xlnx,dout-default-2 = <0x0>; + xlnx,family = "virtex5"; + xlnx,gpio-width = <0x8>; + xlnx,interrupt-present = <0x1>; + xlnx,is-bidir = <0x1>; + xlnx,is-bidir-2 = <0x1>; + xlnx,is-dual = <0x0>; + xlnx,tri-default = <0xffffffff>; + xlnx,tri-default-2 = <0xffffffff>; + #gpio-cells = <2>; + gpio-controller; + } ; + + gpio-leds { + compatible = "gpio-leds"; + + heartbeat { + label = "Heartbeat"; + gpios = <&LEDs_8Bit 4 1>; + linux,default-trigger = "heartbeat"; + }; + + yellow { + label = "Yellow"; + gpios = <&LEDs_8Bit 5 1>; + }; + + red { + label = "Red"; + gpios = <&LEDs_8Bit 6 1>; + }; + + green { + label = "Green"; + gpios = <&LEDs_8Bit 7 1>; + }; + } ; + RS232_Uart_1: serial@84000000 { + clock-frequency = <125000000>; + compatible = "xlnx,xps-uartlite-1.00.a"; + current-speed = <115200>; + device_type = "serial"; + interrupt-parent = <&xps_intc_0>; + interrupts = < 8 0 >; + port-number = <0>; + reg = < 0x84000000 0x10000 >; + xlnx,baudrate = <0x1c200>; + xlnx,data-bits = <0x8>; + xlnx,family = "virtex5"; + xlnx,odd-parity = <0x0>; + xlnx,use-parity = <0x0>; + } ; + SysACE_CompactFlash: sysace@83600000 { + compatible = "xlnx,xps-sysace-1.00.a"; + interrupt-parent = <&xps_intc_0>; + interrupts = < 4 2 >; + reg = < 0x83600000 0x10000 >; + xlnx,family = "virtex5"; + xlnx,mem-width = <0x10>; + } ; + debug_module: debug@84400000 { + compatible = "xlnx,mdm-1.00.d"; + reg = < 0x84400000 0x10000 >; + xlnx,family = "virtex5"; + xlnx,interconnect = <0x1>; + xlnx,jtag-chain = <0x2>; + xlnx,mb-dbg-ports = <0x1>; + xlnx,uart-width = <0x8>; + xlnx,use-uart = <0x1>; + xlnx,write-fsl-ports = <0x0>; + } ; + mpmc@90000000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "xlnx,mpmc-4.02.a"; + ranges ; + PIM3: sdma@84600180 { + compatible = "xlnx,ll-dma-1.00.a"; + interrupt-parent = <&xps_intc_0>; + interrupts = < 2 2 1 2 >; + reg = < 0x84600180 0x80 >; + } ; + } ; + xps_intc_0: interrupt-controller@81800000 { + #interrupt-cells = <0x2>; + compatible = "xlnx,xps-intc-1.00.a"; + interrupt-controller ; + reg = < 0x81800000 0x10000 >; + xlnx,kind-of-intr = <0x100>; + xlnx,num-intr-inputs = <0x9>; + } ; + xps_timer_1: timer@83c00000 { + compatible = "xlnx,xps-timer-1.00.a"; + interrupt-parent = <&xps_intc_0>; + interrupts = < 3 2 >; + reg = < 0x83c00000 0x10000 >; + xlnx,count-width = <0x20>; + xlnx,family = "virtex5"; + xlnx,gen0-assert = <0x1>; + xlnx,gen1-assert = <0x1>; + xlnx,one-timer-only = <0x0>; + xlnx,trig0-assert = <0x1>; + xlnx,trig1-assert = <0x1>; + } ; + } ; +} ; diff --git a/board/qemu/mips-malta/linux-3.12.config b/board/qemu/mips-malta/linux-3.12.config new file mode 100644 index 0000000000..7549ccc3c8 --- /dev/null +++ b/board/qemu/mips-malta/linux-3.12.config @@ -0,0 +1,76 @@ +CONFIG_MIPS_MALTA=y +CONFIG_CPU_MIPS32_R2=y +CONFIG_MIPS_MT_SMP=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_HZ_100=y +CONFIG_EXPERIMENTAL=y +CONFIG_SYSVIPC=y +CONFIG_LOG_BUF_SHIFT=15 +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_RELAY=y +CONFIG_NAMESPACES=y +CONFIG_UTS_NS=y +CONFIG_IPC_NS=y +CONFIG_PID_NS=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_EMBEDDED=y +# CONFIG_SYSCTL_SYSCALL is not set +# CONFIG_COMPAT_BRK is not set +CONFIG_SLAB=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +# CONFIG_BLK_DEV_BSG is not set +CONFIG_PCI=y +CONFIG_PM=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_PNP=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_IPV6 is not set +# CONFIG_WIRELESS is not set +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +# CONFIG_MISC_DEVICES is not set +CONFIG_IDE=y +CONFIG_BLK_DEV_IDECD=y +CONFIG_IDE_GENERIC=y +CONFIG_BLK_DEV_GENERIC=y +CONFIG_BLK_DEV_PIIX=y +CONFIG_NETDEVICES=y +CONFIG_NET_ETHERNET=y +CONFIG_NET_PCI=y +CONFIG_PCNET32=y +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set +# CONFIG_WLAN is not set +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_SERIO_I8042 is not set +CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +# CONFIG_HW_RANDOM is not set +# CONFIG_HWMON is not set +# CONFIG_MFD_SUPPORT is not set +CONFIG_FB=y +CONFIG_FB_CIRRUS=y +# CONFIG_VGA_CONSOLE is not set +# CONFIG_HID_SUPPORT is not set +# CONFIG_USB_SUPPORT is not set +CONFIG_EXT2_FS=y +CONFIG_EXT3_FS=y +CONFIG_QUOTA=y +CONFIG_PROC_KCORE=y +CONFIG_TMPFS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_ROOT_NFS=y +# CONFIG_RCU_CPU_STALL_DETECTOR is not set diff --git a/board/qemu/mips-malta/readme.txt b/board/qemu/mips-malta/readme.txt new file mode 100644 index 0000000000..b3679270c0 --- /dev/null +++ b/board/qemu/mips-malta/readme.txt @@ -0,0 +1,9 @@ +Run the emulation with: + + qemu-system-mips -M malta -kernel output/images/vmlinux -serial stdio -hda output/images/rootfs.ext2 -append "root=/dev/hda" -net nic,model=pcnet -net user + +The login prompt will appear in the terminal that started Qemu. The +graphical window is the framebuffer. No keyboard support has been +enabled. + +Tested with QEMU 1.6.1 diff --git a/board/qemu/mips64-malta/linux-3.12.config b/board/qemu/mips64-malta/linux-3.12.config new file mode 100644 index 0000000000..6e7f7eebd5 --- /dev/null +++ b/board/qemu/mips64-malta/linux-3.12.config @@ -0,0 +1,78 @@ +CONFIG_MIPS_MALTA=y +CONFIG_CPU_MIPS64_R1=y +CONFIG_64BIT=y +CONFIG_64BIT_PHYS_ADDR=y +CONFIG_MIPS_MT_SMP=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_HZ_100=y +CONFIG_EXPERIMENTAL=y +CONFIG_SYSVIPC=y +CONFIG_LOG_BUF_SHIFT=15 +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_RELAY=y +CONFIG_NAMESPACES=y +CONFIG_UTS_NS=y +CONFIG_IPC_NS=y +CONFIG_PID_NS=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_EMBEDDED=y +# CONFIG_SYSCTL_SYSCALL is not set +# CONFIG_COMPAT_BRK is not set +CONFIG_SLAB=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +# CONFIG_BLK_DEV_BSG is not set +CONFIG_PCI=y +CONFIG_PM=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_PNP=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_IPV6 is not set +# CONFIG_WIRELESS is not set +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +# CONFIG_MISC_DEVICES is not set +CONFIG_IDE=y +CONFIG_BLK_DEV_IDECD=y +CONFIG_IDE_GENERIC=y +CONFIG_BLK_DEV_GENERIC=y +CONFIG_BLK_DEV_PIIX=y +CONFIG_NETDEVICES=y +CONFIG_NET_ETHERNET=y +CONFIG_NET_PCI=y +CONFIG_PCNET32=y +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set +# CONFIG_WLAN is not set +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_SERIO_I8042 is not set +CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +# CONFIG_HW_RANDOM is not set +# CONFIG_HWMON is not set +# CONFIG_MFD_SUPPORT is not set +CONFIG_FB=y +CONFIG_FB_CIRRUS=y +# CONFIG_VGA_CONSOLE is not set +# CONFIG_HID_SUPPORT is not set +# CONFIG_USB_SUPPORT is not set +CONFIG_EXT2_FS=y +CONFIG_EXT3_FS=y +CONFIG_QUOTA=y +CONFIG_PROC_KCORE=y +CONFIG_TMPFS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_ROOT_NFS=y +# CONFIG_RCU_CPU_STALL_DETECTOR is not set diff --git a/board/qemu/mips64-malta/readme.txt b/board/qemu/mips64-malta/readme.txt new file mode 100644 index 0000000000..4fa8a19b16 --- /dev/null +++ b/board/qemu/mips64-malta/readme.txt @@ -0,0 +1,11 @@ +Run the emulation with: + + qemu-system-mips64 -M malta -kernel output/images/vmlinux -serial stdio -hda output/images/rootfs.ext2 -append "root=/dev/hda" + +The login prompt will appear in the terminal that started Qemu. The +graphical window is the framebuffer. No keyboard support has been +enabled. + +This configuration is known to be flaky. + +Tested with QEMU 1.6.1 diff --git a/board/qemu/mipsel-malta/linux-2.6.36.config b/board/qemu/mipsel-malta/linux-3.12.config similarity index 100% rename from board/qemu/mipsel-malta/linux-2.6.36.config rename to board/qemu/mipsel-malta/linux-3.12.config diff --git a/board/qemu/mipsel-malta/readme.txt b/board/qemu/mipsel-malta/readme.txt index b494976452..b77cc84e20 100644 --- a/board/qemu/mipsel-malta/readme.txt +++ b/board/qemu/mipsel-malta/readme.txt @@ -1,7 +1,9 @@ Run the emulation with: - qemu-system-mipsel -M malta -kernel vmlinux -serial stdio -hda rootfs.ext2 -append "root=/dev/hda" + qemu-system-mipsel -M malta -kernel output/images/vmlinux -serial stdio -hda output/images/rootfs.ext2 -append "root=/dev/hda" -net nic,model=pcnet -net user The login prompt will appear in the terminal that started Qemu. The graphical window is the framebuffer. No keyboard support has been enabled. + +Tested with QEMU 1.6.1 diff --git a/board/qemu/powerpc-g3beige/linux-2.6.36.config b/board/qemu/powerpc-g3beige/linux-3.12.config similarity index 100% rename from board/qemu/powerpc-g3beige/linux-2.6.36.config rename to board/qemu/powerpc-g3beige/linux-3.12.config diff --git a/board/qemu/powerpc-g3beige/readme.txt b/board/qemu/powerpc-g3beige/readme.txt index 1006af9aac..07cb6604a8 100644 --- a/board/qemu/powerpc-g3beige/readme.txt +++ b/board/qemu/powerpc-g3beige/readme.txt @@ -1,6 +1,8 @@ Run the emulation with: - qemu-system-ppc -M g3beige -kernel vmlinux -hda rootfs.ext2 -append "console=ttyS0 root=/dev/hdc" -serial stdio + qemu-system-ppc -M g3beige -kernel output/images/vmlinux -hda output/images/rootfs.ext2 -append "console=ttyS0 root=/dev/hda" -serial stdio -net nic,model=rtl8139 -net user The login prompt will appear in the terminal that started Qemu. The graphical window is the framebuffer. + +Tested with QEMU 1.6.1 diff --git a/board/qemu/powerpc-mpc8544ds/readme.txt b/board/qemu/powerpc-mpc8544ds/readme.txt new file mode 100644 index 0000000000..cd56ddde3c --- /dev/null +++ b/board/qemu/powerpc-mpc8544ds/readme.txt @@ -0,0 +1,7 @@ +Run the emulation with: + + qemu-system-ppc -M mpc8544ds -kernel output/images/vmlinux -serial stdio -net nic,model=e1000 -net user + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 1.6.1 diff --git a/board/qemu/powerpc-virtex-ml507/readme.txt b/board/qemu/powerpc-virtex-ml507/readme.txt new file mode 100644 index 0000000000..a9a63788aa --- /dev/null +++ b/board/qemu/powerpc-virtex-ml507/readme.txt @@ -0,0 +1,8 @@ +Run the emulation with: + + cp output/images/virtex440-ml507.dtb ppc.dtb + qemu-system-ppc -M virtex-ml507 -kernel output/images/vmlinux -m 256 -nographic -append "console=ttyS0" + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 1.6.1 diff --git a/board/qemu/sh4-r2d/kernel-patches/linux-06-17-SH-Add-missing-consts-to-sys_execve-declaration.patch b/board/qemu/sh4-r2d/kernel-patches/linux-06-17-SH-Add-missing-consts-to-sys_execve-declaration.patch deleted file mode 100644 index f702abe042..0000000000 --- a/board/qemu/sh4-r2d/kernel-patches/linux-06-17-SH-Add-missing-consts-to-sys_execve-declaration.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/arch/sh/include/asm/syscalls_32.h b/arch/sh/include/asm/syscalls_32.h -index be201fd..454538a 100644 ---- a/arch/sh/include/asm/syscalls_32.h -+++ b/arch/sh/include/asm/syscalls_32.h -@@ -19,8 +19,10 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, - asmlinkage int sys_vfork(unsigned long r4, unsigned long r5, - unsigned long r6, unsigned long r7, - struct pt_regs __regs); --asmlinkage int sys_execve(const char __user *ufilename, char __user * __user *uargv, -- char __user * __user *uenvp, unsigned long r7, -+asmlinkage int sys_execve(const char __user *ufilename, -+ const char __user *const __user *uargv, -+ const char __user *const __user *uenvp, -+ unsigned long r7, - struct pt_regs __regs); - asmlinkage int sys_sigsuspend(old_sigset_t mask, unsigned long r5, - unsigned long r6, unsigned long r7, diff --git a/board/qemu/sh4-r2d/kernel-patches/linux-sh-fix-kconfig-warning.patch b/board/qemu/sh4-r2d/kernel-patches/linux-sh-fix-kconfig-warning.patch deleted file mode 100644 index 0ac07f2b66..0000000000 --- a/board/qemu/sh4-r2d/kernel-patches/linux-sh-fix-kconfig-warning.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig -index 33990fa..06645b6 100644 ---- a/arch/sh/Kconfig -+++ b/arch/sh/Kconfig -@@ -45,7 +45,7 @@ config SUPERH32 - select HAVE_ARCH_KGDB - select HAVE_HW_BREAKPOINT - select HAVE_MIXED_BREAKPOINTS_REGS -- select PERF_EVENTS if HAVE_HW_BREAKPOINT -+ select PERF_EVENTS - select ARCH_HIBERNATION_POSSIBLE if MMU - - config SUPERH64 diff --git a/board/qemu/sh4-r2d/linux-2.6.36.config b/board/qemu/sh4-r2d/linux-2.6.36.config deleted file mode 100644 index 638e4e031b..0000000000 --- a/board/qemu/sh4-r2d/linux-2.6.36.config +++ /dev/null @@ -1,106 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED_V2=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_SLAB=y -CONFIG_PROFILING=y -CONFIG_OPROFILE=y -CONFIG_MODULES=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_CPU_SUBTYPE_SH7751R=y -CONFIG_MEMORY_START=0x0c000000 -CONFIG_FLATMEM_MANUAL=y -CONFIG_SH_RTS7751R2D=y -CONFIG_RTS7751R2D_PLUS=y -CONFIG_HEARTBEAT=y -CONFIG_PCI=y -CONFIG_HOTPLUG_PCI=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_FW_LOADER=m -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_SD=y -CONFIG_ATA=y -CONFIG_PATA_PLATFORM=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_NET_PCI=y -CONFIG_8139CP=y -CONFIG_8139TOO=y -# CONFIG_8139TOO_PIO is not set -# CONFIG_WLAN is not set -CONFIG_INPUT_FF_MEMLESS=m -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_SH_SCI=y -CONFIG_SERIAL_SH_SCI_NR_UARTS=1 -CONFIG_SERIAL_SH_SCI_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_SPI=y -CONFIG_SPI_SH_SCI=y -CONFIG_MFD_SM501=y -CONFIG_VIDEO_OUTPUT_CONTROL=m -CONFIG_FB=y -CONFIG_FB_SH_MOBILE_LCDC=m -CONFIG_FB_SH_MOBILE_HDMI=m -CONFIG_FB_SM501=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -# CONFIG_LOGO_LINUX_CLUT224 is not set -# CONFIG_LOGO_SUPERH_MONO is not set -# CONFIG_LOGO_SUPERH_VGA16 is not set -CONFIG_SOUND=y -CONFIG_SND=m -CONFIG_SND_YMFPCI=m -CONFIG_SOUND_PRIME=m -CONFIG_HID_A4TECH=y -CONFIG_HID_APPLE=y -CONFIG_HID_BELKIN=y -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -CONFIG_HID_CYPRESS=y -CONFIG_HID_EZKEY=y -CONFIG_HID_GYRATION=y -CONFIG_HID_LOGITECH=y -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -CONFIG_HID_PANTHERLORD=y -CONFIG_HID_PETALYNX=y -CONFIG_HID_SAMSUNG=y -CONFIG_HID_SONY=y -CONFIG_HID_SUNPLUS=y -CONFIG_USB=y -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_USB_LIBUSUAL=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_R9701=y -CONFIG_EXT2_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_PROC_KCORE=y -CONFIG_TMPFS=y -CONFIG_MINIX_FS=y -CONFIG_NLS_CODEPAGE_932=y -CONFIG_DEBUG_FS=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRC_T10DIF=y diff --git a/board/qemu/sh4-r2d/linux-3.2.config b/board/qemu/sh4-r2d/linux-3.2.config new file mode 100644 index 0000000000..287f36a65c --- /dev/null +++ b/board/qemu/sh4-r2d/linux-3.2.config @@ -0,0 +1,105 @@ +CONFIG_EXPERIMENTAL=y +CONFIG_SYSVIPC=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_SYSFS_DEPRECATED_V2=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +# CONFIG_SYSCTL_SYSCALL is not set +CONFIG_SLAB=y +CONFIG_PROFILING=y +CONFIG_OPROFILE=y +CONFIG_MODULES=y +# CONFIG_BLK_DEV_BSG is not set +CONFIG_CPU_SUBTYPE_SH7751R=y +CONFIG_MEMORY_START=0x0c000000 +CONFIG_FLATMEM_MANUAL=y +CONFIG_SH_RTS7751R2D=y +CONFIG_RTS7751R2D_PLUS=y +CONFIG_HEARTBEAT=y +CONFIG_PCI=y +CONFIG_HOTPLUG_PCI=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +# CONFIG_INET_LRO is not set +# CONFIG_IPV6 is not set +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_FW_LOADER=m +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_SD=y +CONFIG_ATA=y +CONFIG_PATA_PLATFORM=y +CONFIG_NETDEVICES=y +CONFIG_NET_ETHERNET=y +CONFIG_NET_PCI=y +CONFIG_8139CP=y +CONFIG_8139TOO=y +# CONFIG_8139TOO_PIO is not set +# CONFIG_WLAN is not set +CONFIG_INPUT_FF_MEMLESS=m +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_SERIO is not set +CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_SH_SCI=y +CONFIG_SERIAL_SH_SCI_CONSOLE=y +CONFIG_HW_RANDOM=y +CONFIG_SPI=y +CONFIG_SPI_SH_SCI=y +CONFIG_MFD_SM501=y +CONFIG_VIDEO_OUTPUT_CONTROL=m +CONFIG_FB=y +CONFIG_FB_SH_MOBILE_LCDC=m +CONFIG_FB_SH_MOBILE_HDMI=m +CONFIG_FB_SM501=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_LOGO=y +# CONFIG_LOGO_LINUX_MONO is not set +# CONFIG_LOGO_LINUX_VGA16 is not set +# CONFIG_LOGO_LINUX_CLUT224 is not set +# CONFIG_LOGO_SUPERH_MONO is not set +# CONFIG_LOGO_SUPERH_VGA16 is not set +CONFIG_SOUND=y +CONFIG_SND=m +CONFIG_SND_YMFPCI=m +CONFIG_SOUND_PRIME=m +CONFIG_HID_A4TECH=y +CONFIG_HID_APPLE=y +CONFIG_HID_BELKIN=y +CONFIG_HID_CHERRY=y +CONFIG_HID_CHICONY=y +CONFIG_HID_CYPRESS=y +CONFIG_HID_EZKEY=y +CONFIG_HID_GYRATION=y +CONFIG_HID_LOGITECH=y +CONFIG_HID_MICROSOFT=y +CONFIG_HID_MONTEREY=y +CONFIG_HID_PANTHERLORD=y +CONFIG_HID_PETALYNX=y +CONFIG_HID_SAMSUNG=y +CONFIG_HID_SONY=y +CONFIG_HID_SUNPLUS=y +CONFIG_USB=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_STORAGE=y +CONFIG_USB_LIBUSUAL=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_R9701=y +CONFIG_EXT2_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_PROC_KCORE=y +CONFIG_TMPFS=y +CONFIG_MINIX_FS=y +CONFIG_NLS_CODEPAGE_932=y +CONFIG_DEBUG_FS=y +# CONFIG_RCU_CPU_STALL_DETECTOR is not set +# CONFIG_CRYPTO_ANSI_CPRNG is not set +CONFIG_CRC_T10DIF=y diff --git a/board/qemu/sh4-r2d/readme.txt b/board/qemu/sh4-r2d/readme.txt index b237596eaa..2a963ebf03 100644 --- a/board/qemu/sh4-r2d/readme.txt +++ b/board/qemu/sh4-r2d/readme.txt @@ -1,17 +1,8 @@ -This little documentation explains how to build a kernel and a rootfs -for qemu with sh4 architecture. +Run the emulation with: -1) Select qemu sh4 configuration and compile it : + qemu-system-sh4 -M r2d -kernel output/images/zImage -drive file=output/images/rootfs.ext2,if=ide -append "root=/dev/sda console=ttySC1,115200 noiotrap" -serial null -serial stdio -net nic,model=rtl8139 -net user -make sh4_defconfig -make all +The login prompt will appear in the terminal that started Qemu. +The graphical window is the framebuffer. -2) Run qemu-system-sh4 with the kernel and rootfs previously generated - -It's recommended to use a git release for qemu (the current stable -version has framebuffer display issues). If you want to avoid building -all target, you can use this option on qemu configure : ---target-list=sh4-softmmu - -The command is : -qemu-system-sh4 -M r2d -kernel output/images/zImage -drive file=output/images/rootfs.ext2,if=ide,format=raw -append root=/dev/sda console=ttySC1,115200 noiotrap +Tested with QEMU 1.6.1 diff --git a/board/qemu/sparc-ss10/readme.txt b/board/qemu/sparc-ss10/readme.txt new file mode 100644 index 0000000000..725ab30f27 --- /dev/null +++ b/board/qemu/sparc-ss10/readme.txt @@ -0,0 +1,8 @@ +Run the emulation with: + + qemu-system-sparc -M SS-10 -kernel output/images/zImage -drive file=output/images/rootfs.ext2 -append "root=/dev/sda console=ttyS0,115200" -serial stdio -net nic,model=lance -net user + +The login prompt will appear in the terminal that started Qemu. +The graphical window is the framebuffer. + +Tested with QEMU 1.6.1 diff --git a/board/qemu/x86/linux-2.6.36.config b/board/qemu/x86/linux-2.6.36.config deleted file mode 100644 index 6b57aff509..0000000000 --- a/board/qemu/x86/linux-2.6.36.config +++ /dev/null @@ -1,67 +0,0 @@ -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -# CONFIG_COMPAT_BRK is not set -# CONFIG_LBDAF is not set -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -# CONFIG_X86_EXTENDED_PLATFORM is not set -# CONFIG_SCHED_OMIT_FRAME_POINTER is not set -# CONFIG_NO_BOOTMEM is not set -# CONFIG_X86_RESERVE_LOW_64K is not set -# CONFIG_MTRR_SANITIZER is not set -# CONFIG_SECCOMP is not set -# CONFIG_RELOCATABLE is not set -# CONFIG_COMPAT_VDSO is not set -CONFIG_NET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -# CONFIG_WIRELESS is not set -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -# CONFIG_FIRMWARE_IN_KERNEL is not set -# CONFIG_BLK_DEV is not set -# CONFIG_MISC_DEVICES is not set -CONFIG_BLK_DEV_SD=y -CONFIG_ATA=y -CONFIG_ATA_PIIX=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_NET_PCI=y -CONFIG_NE2K_PCI=y -CONFIG_8139TOO=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -# CONFIG_WLAN is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO_SERPORT is not set -# CONFIG_DEVKMEM is not set -# CONFIG_LEGACY_PTYS is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -# CONFIG_MFD_SUPPORT is not set -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -# CONFIG_X86_PLATFORM_DEVICES is not set -# CONFIG_DMIID is not set -CONFIG_EXT2_FS=y -# CONFIG_DNOTIFY is not set -# CONFIG_INOTIFY_USER is not set -# CONFIG_MISC_FILESYSTEMS is not set -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -# CONFIG_ENABLE_WARN_DEPRECATED is not set -# CONFIG_ENABLE_MUST_CHECK is not set -# CONFIG_UNUSED_SYMBOLS is not set -# CONFIG_FRAME_POINTER is not set -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -# CONFIG_X86_VERBOSE_BOOTUP is not set -# CONFIG_VIRTUALIZATION is not set diff --git a/board/qemu/x86/linux-3.12.config b/board/qemu/x86/linux-3.12.config new file mode 100644 index 0000000000..5bf6944e3d --- /dev/null +++ b/board/qemu/x86/linux-3.12.config @@ -0,0 +1,67 @@ +CONFIG_EXPERIMENTAL=y +# CONFIG_LOCALVERSION_AUTO is not set +# CONFIG_SWAP is not set +# CONFIG_COMPAT_BRK is not set +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +# CONFIG_X86_EXTENDED_PLATFORM is not set +# CONFIG_SCHED_OMIT_FRAME_POINTER is not set +# CONFIG_MTRR_SANITIZER is not set +# CONFIG_SECCOMP is not set +# CONFIG_RELOCATABLE is not set +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_PNP=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_IPV6 is not set +# CONFIG_WIRELESS is not set +# CONFIG_PREVENT_FIRMWARE_BUILD is not set +# CONFIG_FIRMWARE_IN_KERNEL is not set +# CONFIG_BLK_DEV is not set +CONFIG_BLK_DEV_SD=y +CONFIG_ATA=y +CONFIG_ATA_PIIX=y +CONFIG_NETDEVICES=y +CONFIG_NET_ETHERNET=y +CONFIG_NET_PCI=y +CONFIG_NE2K_PCI=y +CONFIG_8139CP=y +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set +# CONFIG_WLAN is not set +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_SERIO_SERPORT is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_DEVKMEM is not set +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +# CONFIG_HW_RANDOM is not set +# CONFIG_HWMON is not set +# CONFIG_MFD_SUPPORT is not set +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_HDA_INTEL=y +# CONFIG_HID_SUPPORT is not set +# CONFIG_USB_SUPPORT is not set +# CONFIG_X86_PLATFORM_DEVICES is not set +# CONFIG_DMIID is not set +CONFIG_EXT2_FS=y +# CONFIG_DNOTIFY is not set +# CONFIG_INOTIFY_USER is not set +# CONFIG_MISC_FILESYSTEMS is not set +CONFIG_NFS_FS=y +CONFIG_ROOT_NFS=y +# CONFIG_ENABLE_WARN_DEPRECATED is not set +# CONFIG_ENABLE_MUST_CHECK is not set +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_FRAME_POINTER is not set +# CONFIG_X86_VERBOSE_BOOTUP is not set +# CONFIG_VIRTUALIZATION is not set diff --git a/board/qemu/x86/readme.txt b/board/qemu/x86/readme.txt new file mode 100644 index 0000000000..c07000c039 --- /dev/null +++ b/board/qemu/x86/readme.txt @@ -0,0 +1,7 @@ +Run the emulation with: + + qemu-system-i386 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=ide -append root=/dev/sda -net nic,model=rtl8139 -net user + +The login prompt will appear in the graphical window. + +Tested with QEMU 1.6.1 diff --git a/board/qemu/x86_64/linux-3.12.config b/board/qemu/x86_64/linux-3.12.config new file mode 100644 index 0000000000..5bf6944e3d --- /dev/null +++ b/board/qemu/x86_64/linux-3.12.config @@ -0,0 +1,67 @@ +CONFIG_EXPERIMENTAL=y +# CONFIG_LOCALVERSION_AUTO is not set +# CONFIG_SWAP is not set +# CONFIG_COMPAT_BRK is not set +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +# CONFIG_X86_EXTENDED_PLATFORM is not set +# CONFIG_SCHED_OMIT_FRAME_POINTER is not set +# CONFIG_MTRR_SANITIZER is not set +# CONFIG_SECCOMP is not set +# CONFIG_RELOCATABLE is not set +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_PNP=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_IPV6 is not set +# CONFIG_WIRELESS is not set +# CONFIG_PREVENT_FIRMWARE_BUILD is not set +# CONFIG_FIRMWARE_IN_KERNEL is not set +# CONFIG_BLK_DEV is not set +CONFIG_BLK_DEV_SD=y +CONFIG_ATA=y +CONFIG_ATA_PIIX=y +CONFIG_NETDEVICES=y +CONFIG_NET_ETHERNET=y +CONFIG_NET_PCI=y +CONFIG_NE2K_PCI=y +CONFIG_8139CP=y +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set +# CONFIG_WLAN is not set +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_SERIO_SERPORT is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_DEVKMEM is not set +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +# CONFIG_HW_RANDOM is not set +# CONFIG_HWMON is not set +# CONFIG_MFD_SUPPORT is not set +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_HDA_INTEL=y +# CONFIG_HID_SUPPORT is not set +# CONFIG_USB_SUPPORT is not set +# CONFIG_X86_PLATFORM_DEVICES is not set +# CONFIG_DMIID is not set +CONFIG_EXT2_FS=y +# CONFIG_DNOTIFY is not set +# CONFIG_INOTIFY_USER is not set +# CONFIG_MISC_FILESYSTEMS is not set +CONFIG_NFS_FS=y +CONFIG_ROOT_NFS=y +# CONFIG_ENABLE_WARN_DEPRECATED is not set +# CONFIG_ENABLE_MUST_CHECK is not set +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_FRAME_POINTER is not set +# CONFIG_X86_VERBOSE_BOOTUP is not set +# CONFIG_VIRTUALIZATION is not set diff --git a/board/qemu/x86_64/readme.txt b/board/qemu/x86_64/readme.txt new file mode 100644 index 0000000000..3c344f95a8 --- /dev/null +++ b/board/qemu/x86_64/readme.txt @@ -0,0 +1,7 @@ +Run the emulation with: + + qemu-system-x86_64 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=ide -append root=/dev/sda -net nic,model=rtl8139 -net user + +The login prompt will appear in the graphical window. + +Tested with QEMU 1.6.1 diff --git a/board/raspberrypi/readme.txt b/board/raspberrypi/readme.txt new file mode 100644 index 0000000000..2052e2b9e3 --- /dev/null +++ b/board/raspberrypi/readme.txt @@ -0,0 +1,128 @@ +RaspberryPi + +Intro +===== + +To be able to use your RaspberryPi board with the images generated by +Buildroot, you have to choose whether you will use: + + * Volatile rootfs in RAM (the rootfs is an initramfs) or + * Persistent rootfs on the SDCard + +Also, a good source of information is http://elinux.org/R-Pi_Hub + +How to build it +=============== + +Configure Buildroot +------------------- + +The raspberrypi_defconfig configuration is a minimal configuration with +all that is required to bring the Raspberry Pi. You should base your +work on this defconfig: + + $ make raspberrypi_defconfig + +If you want to use a persistent rootfs, skip to "Build the rootfs", below. + +For a volatile rootfs, you have to slightly adjust the configuration: + + $ make menuconfig + * Select "Filesystem images" + * Select "initial RAM filesystem linked into linux kernel" + +You may also deselect "tar the root filesystem". + +Build the rootfs +---------------- + +Note: you will need to have access to the network, since Buildroot will +download the packages' sources. + +You may now build your rootfs with: + + $ make + +(This may take a while; consider getting yourself a coffee ;-) ) + +Result of the build +------------------- + +After building, you should obtain this tree: + + output/images/ + +-- rootfs.tar + +-- rpi-firmware + | +-- bootcode.bin + | +-- config.txt + | +-- fixup_cd.dat + | +-- fixup.dat + | +-- start_cd.elf + | `-- start.elf + `-- zImage + +Note for Volatile: rootfs.tar will only be there if you kept +"tar the root filesystem" option selected in "Filesystem images". + +Prepare you SDCard +================== + +For more information, visit +http://elinux.org/RPi_Advanced_Setup#Advanced_SD_card_setup + +In summary, your SDCard must have first partition in fat32 and marked bootable. + +Create the required partitions: + - for a persistent rootfs, 10MiB is enough memory for the boot fat32 + partition, and a second partition is required for the root filesystem + - for a volatile rootfs, 50MiB is required for the boot fat32 partition + +Note: You can create any number of partitions you desire, the only requirement +is that the first partition must be using fat32 and be bootable. + +Mount the partitions (adjust 'sdX' to match your SDcard device): + + $ sudo mount /dev/sdX1 /mnt/mountpointboot + $ sudo mount /dev/sdX2 /mnt/mountpointroot (only for persistent rootfs) + +Install the binaries to the SDCard +---------------------------------- + +At the root of the boot partition, the RaspberryPi must find the following +files: + + * bootcode.bin + * config.txt + * fixup.dat + * start.elf + * zImage + +For example: + + $ cp output/images/rpi-firmware/* /mnt/mountpointboot + $ cp output/images/zImage /mnt/mountpointboot/zImage.img + +Note: The default name is kernel.img. +Actually, the name is zImage and it's define in the file config.txt like: +kernel=zImage + +If you use a volatile rootfs, Skip to "Finish", below. For a persistent +rootfs, there are further steps to do. + +Extract (as root!) the contents of the rootfs.tar archive into the second +partition you created above: + + $ sudo tar xf rootfs.tar -C /mnt/mountpointroot + +Finish +====== + +Unmount all the partitions: + + $ sudo umount /mnt/mountpointboot + $ sudo umount /mnt/mountpointroot (only for persistent rootfs) + +And eject your SDcard from your computer SDcard reader. + +Insert the SDcard into your Raspberry Pi, and power it up. Your new system +should come up, now. diff --git a/board/telit/evk-pro3/barebox-2013.04.0-0001-watchdog-add-keep-alive-support.patch b/board/telit/evk-pro3/barebox-2013.04.0-0001-watchdog-add-keep-alive-support.patch new file mode 100644 index 0000000000..1551546031 --- /dev/null +++ b/board/telit/evk-pro3/barebox-2013.04.0-0001-watchdog-add-keep-alive-support.patch @@ -0,0 +1,88 @@ +From b5e57a9f158a293b1151638336478af8a5aad0f0 Mon Sep 17 00:00:00 2001 +From: Jean-Christophe PLAGNIOL-VILLARD +Date: Wed, 14 Nov 2012 19:16:35 +0800 +Subject: [PATCH 1/5] watchdog: add keep alive support + +this will allow to ping the watchdog via poller + +Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD +--- + drivers/watchdog/Kconfig | 1 + + drivers/watchdog/wd_core.c | 21 +++++++++++++++++++++ + include/watchdog.h | 2 ++ + 3 files changed, 24 insertions(+) + +diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig +index 2e2900c..0b4dc84 100644 +--- a/drivers/watchdog/Kconfig ++++ b/drivers/watchdog/Kconfig +@@ -4,6 +4,7 @@ config WATCHDOG_IMX_RESET_SOURCE + + menuconfig WATCHDOG + bool "Watchdog support" ++ select GENERIC_POLLER + help + Many platforms support a watchdog to keep track of a working machine. + This framework provides routines to handle these watchdogs. +diff --git a/drivers/watchdog/wd_core.c b/drivers/watchdog/wd_core.c +index 3d0cfc6..a1b9e28 100644 +--- a/drivers/watchdog/wd_core.c ++++ b/drivers/watchdog/wd_core.c +@@ -17,18 +17,39 @@ + #include + #include + #include ++#include + + /* + * Note: this simple framework supports one watchdog only. + */ + static struct watchdog *watchdog; + ++static void watchdog_poller_func(struct poller_struct *poller) ++{ ++ watchdog->keep_alive(watchdog); ++} ++ ++static struct poller_struct watchdog_poller = { ++ .func = watchdog_poller_func, ++}; ++ + int watchdog_register(struct watchdog *wd) + { + if (watchdog != NULL) + return -EBUSY; + + watchdog = wd; ++ ++ if (watchdog->keep_alive) { ++ int ret; ++ ++ ret = poller_register(&watchdog_poller); ++ if (ret) { ++ watchdog = NULL; ++ return ret; ++ } ++ } ++ + return 0; + } + EXPORT_SYMBOL(watchdog_register); +diff --git a/include/watchdog.h b/include/watchdog.h +index 3e2d08e..d5ecf2f 100644 +--- a/include/watchdog.h ++++ b/include/watchdog.h +@@ -13,8 +13,10 @@ + #ifndef INCLUDE_WATCHDOG_H + # define INCLUDE_WATCHDOG_H + ++ + struct watchdog { + int (*set_timeout)(struct watchdog *, unsigned); ++ void (*keep_alive)(struct watchdog *); + }; + + int watchdog_register(struct watchdog *); +-- +1.8.1.4 + diff --git a/board/telit/evk-pro3/barebox-2013.04.0-0002-watchdog-add-at91sam9-watchdog-support.patch b/board/telit/evk-pro3/barebox-2013.04.0-0002-watchdog-add-at91sam9-watchdog-support.patch new file mode 100644 index 0000000000..1ca87695a4 --- /dev/null +++ b/board/telit/evk-pro3/barebox-2013.04.0-0002-watchdog-add-at91sam9-watchdog-support.patch @@ -0,0 +1,228 @@ +From e1d54ffb987c346c45c20968be34c50c62a91c07 Mon Sep 17 00:00:00 2001 +From: Jean-Christophe PLAGNIOL-VILLARD +Date: Wed, 14 Nov 2012 19:17:47 +0800 +Subject: [PATCH 2/5] watchdog: add at91sam9 watchdog support + +with keep alive support + +Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD +--- + drivers/watchdog/Kconfig | 7 +++ + drivers/watchdog/Makefile | 1 + + drivers/watchdog/at91sam9_wdt.c | 131 ++++++++++++++++++++++++++++++++++++++++ + drivers/watchdog/at91sam9_wdt.h | 38 ++++++++++++ + 4 files changed, 177 insertions(+) + create mode 100644 drivers/watchdog/at91sam9_wdt.c + create mode 100644 drivers/watchdog/at91sam9_wdt.h + +diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig +index 0b4dc84..98a21d7 100644 +--- a/drivers/watchdog/Kconfig ++++ b/drivers/watchdog/Kconfig +@@ -11,6 +11,13 @@ menuconfig WATCHDOG + + if WATCHDOG + ++config WATCHDOG_AT91SAM9X ++ tristate "AT91SAM9X / AT91CAP9 watchdog" ++ depends on ARCH_AT91 ++ help ++ Watchdog timer embedded into AT91SAM9X and AT91CAP9 chips. This will ++ reboot your system when the timeout is reached. ++ + config WATCHDOG_MXS28 + bool "i.MX28" + depends on ARCH_IMX28 +diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile +index f522b88..3d15d52 100644 +--- a/drivers/watchdog/Makefile ++++ b/drivers/watchdog/Makefile +@@ -1,3 +1,4 @@ + obj-$(CONFIG_WATCHDOG) += wd_core.o ++obj-$(CONFIG_WATCHDOG_AT91SAM9X) += at91sam9_wdt.o + obj-$(CONFIG_WATCHDOG_MXS28) += im28wd.o + obj-$(CONFIG_WATCHDOG_IMX_RESET_SOURCE) += imxwd.o +diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c +new file mode 100644 +index 0000000..203d83a +--- /dev/null ++++ b/drivers/watchdog/at91sam9_wdt.c +@@ -0,0 +1,131 @@ ++/* ++ * (c) 2012 Juergen Beisert ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * Note: this driver works for the i.MX28 SoC. It might work for the ++ * i.MX23 Soc as well, but is not tested yet. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "at91sam9_wdt.h" ++ ++struct at91sam9_wdt { ++ struct watchdog wdt; ++ void __iomem *base; ++}; ++ ++#define to_at91sam9_wdt(h) container_of(h, struct at91sam9_wdt, wdt) ++ ++#define wdt_read(at91wdt, field) \ ++ __raw_readl(at91wdt->base + field) ++#define wdt_write(at91wdt, field, val) \ ++ __raw_writel((val), at91wdt->base + field) ++ ++static void at91sam9_wdt_keep_alive(struct watchdog *wdt) ++{ ++ struct at91sam9_wdt *at91wdt = to_at91sam9_wdt(wdt); ++ ++ wdt_write(at91wdt, AT91_WDT_CR, AT91_WDT_KEY | AT91_WDT_WDRSTT); ++} ++ ++static int at91sam9_wdt_settimeout(struct watchdog *wdt, unsigned int timeout) ++{ ++ struct at91sam9_wdt *at91wdt = to_at91sam9_wdt(wdt); ++ unsigned int reg; ++ unsigned int mr; ++ ++ /* Check if disabled */ ++ mr = wdt_read(at91wdt, AT91_WDT_MR); ++ if (mr & AT91_WDT_WDDIS) { ++ pr_err("sorry, watchdog is disabled\n"); ++ return -EIO; ++ } ++ ++ if (!timeout) { ++ wdt_write(at91wdt, AT91_WDT_MR, AT91_WDT_WDDIS); ++ return 0; ++ } ++ ++ /* ++ * All counting occurs at SLOW_CLOCK / 128 = 256 Hz ++ * ++ * Since WDV is a 12-bit counter, the maximum period is ++ * 4096 / 256 = 16 seconds. ++ */ ++ reg = AT91_WDT_WDRSTEN /* causes watchdog reset */ ++ /* | AT91_WDT_WDRPROC causes processor reset only */ ++ | AT91_WDT_WDDBGHLT /* disabled in debug mode */ ++ | AT91_WDT_WDD /* restart at any time */ ++ | (timeout & AT91_WDT_WDV); /* timer value */ ++ wdt_write(at91wdt, AT91_WDT_MR, reg); ++ ++ return 0; ++} ++ ++static int at91sam9_wdt_probe(struct device_d *dev) ++{ ++ struct at91sam9_wdt *priv; ++ struct watchdog *wdt; ++ int ret; ++ unsigned int mr; ++ ++ priv = xzalloc(sizeof(struct at91sam9_wdt)); ++ priv->base = dev_request_mem_region(dev, 0); ++ wdt = &priv->wdt; ++ ++ wdt->set_timeout = at91sam9_wdt_settimeout; ++ wdt->keep_alive = at91sam9_wdt_keep_alive; ++ ++ /* Check if disabled */ ++ mr = wdt_read(priv, AT91_WDT_MR); ++ if (mr & AT91_WDT_WDDIS) { ++ dev_err(dev, "sorry, watchdog is disabled\n"); ++ ret = -EIO; ++ goto err; ++ } ++ ++ ret = watchdog_register(wdt); ++ if (ret != 0) ++ goto err; ++ ++ dev->priv = priv; ++ return 0; ++ ++err: ++ free(priv); ++ return ret; ++} ++ ++static void at91sam9_wdt_remove(struct device_d *dev) ++{ ++ struct at91sam9_wdt *priv= dev->priv; ++ watchdog_deregister(&priv->wdt); ++ free(priv); ++} ++ ++static struct driver_d at91sam9_wdt_driver = { ++ .name = "at91sam9_wdt", ++ .probe = at91sam9_wdt_probe, ++ .remove = at91sam9_wdt_remove, ++}; ++ ++static int at91sam9_wdt_init(void) ++{ ++ return platform_driver_register(&at91sam9_wdt_driver); ++} ++coredevice_initcall(at91sam9_wdt_init); +diff --git a/drivers/watchdog/at91sam9_wdt.h b/drivers/watchdog/at91sam9_wdt.h +new file mode 100644 +index 0000000..2b68c1a +--- /dev/null ++++ b/drivers/watchdog/at91sam9_wdt.h +@@ -0,0 +1,38 @@ ++/* ++ * drivers/watchdog/at91sam9_wdt.h ++ * ++ * Copyright (C) 2007 Andrew Victor ++ * Copyright (C) 2007 Atmel Corporation. ++ * ++ * Watchdog Timer (WDT) - System peripherals regsters. ++ * Based on AT91SAM9261 datasheet revision D. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ */ ++ ++#ifndef AT91_WDT_H ++#define AT91_WDT_H ++ ++#define AT91_WDT_CR 0x00 /* Watchdog Control Register */ ++#define AT91_WDT_WDRSTT (1 << 0) /* Restart */ ++#define AT91_WDT_KEY (0xa5 << 24) /* KEY Password */ ++ ++#define AT91_WDT_MR 0x04 /* Watchdog Mode Register */ ++#define AT91_WDT_WDV (0xfff << 0) /* Counter Value */ ++#define AT91_WDT_WDFIEN (1 << 12) /* Fault Interrupt Enable */ ++#define AT91_WDT_WDRSTEN (1 << 13) /* Reset Processor */ ++#define AT91_WDT_WDRPROC (1 << 14) /* Timer Restart */ ++#define AT91_WDT_WDDIS (1 << 15) /* Watchdog Disable */ ++#define AT91_WDT_WDD (0xfff << 16) /* Delta Value */ ++#define AT91_WDT_WDDBGHLT (1 << 28) /* Debug Halt */ ++#define AT91_WDT_WDIDLEHLT (1 << 29) /* Idle Halt */ ++ ++#define AT91_WDT_SR 0x08 /* Watchdog Status Register */ ++#define AT91_WDT_WDUNF (1 << 0) /* Watchdog Underflow */ ++#define AT91_WDT_WDERR (1 << 1) /* Watchdog Error */ ++ ++ ++#endif +-- +1.8.1.4 + diff --git a/board/telit/evk-pro3/barebox-2013.04.0-0003-at91sam9260-9g20-add-wathdog-support.patch b/board/telit/evk-pro3/barebox-2013.04.0-0003-at91sam9260-9g20-add-wathdog-support.patch new file mode 100644 index 0000000000..bf97200308 --- /dev/null +++ b/board/telit/evk-pro3/barebox-2013.04.0-0003-at91sam9260-9g20-add-wathdog-support.patch @@ -0,0 +1,40 @@ +From 3338bcb05479f1149420d4a0ea3904cb9e42eef5 Mon Sep 17 00:00:00 2001 +From: Jean-Christophe PLAGNIOL-VILLARD +Date: Wed, 14 Nov 2012 19:18:22 +0800 +Subject: [PATCH 3/5] at91sam9260/9g20: add wathdog support + +Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD +--- + arch/arm/mach-at91/at91sam9260_devices.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c +index 1c375ee..5885f91 100644 +--- a/arch/arm/mach-at91/at91sam9260_devices.c ++++ b/arch/arm/mach-at91/at91sam9260_devices.c +@@ -10,6 +10,7 @@ + * + */ + #include ++#include + #include + #include + #include +@@ -397,3 +398,14 @@ void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data) + #else + void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data) {} + #endif ++ ++#ifdef CONFIG_WATCHDOG_AT91SAM9X ++static int at91_add_device_watchdog(void) ++{ ++ add_generic_device("at91sam9_wdt", DEVICE_ID_SINGLE, NULL, ++ AT91_WDT + AT91_BASE_SYS, 16, IORESOURCE_MEM, NULL); ++ ++ return 0; ++} ++coredevice_initcall(at91_add_device_watchdog); ++#endif +-- +1.8.1.4 + diff --git a/board/telit/evk-pro3/barebox-2013.04.0-0004-at91sam9260-9g20-fix-wathdog-support.patch b/board/telit/evk-pro3/barebox-2013.04.0-0004-at91sam9260-9g20-fix-wathdog-support.patch new file mode 100644 index 0000000000..cdfd026adf --- /dev/null +++ b/board/telit/evk-pro3/barebox-2013.04.0-0004-at91sam9260-9g20-fix-wathdog-support.patch @@ -0,0 +1,26 @@ +From e03bf0e3ad24898019b89eb9a6935d159c60268f Mon Sep 17 00:00:00 2001 +From: Fabio Porcedda +Date: Thu, 17 Jan 2013 11:32:35 +0100 +Subject: [PATCH 4/5] at91sam9260/9g20: fix wathdog support + +Signed-off-by: Fabio Porcedda +--- + arch/arm/mach-at91/at91sam9260_devices.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c +index 5885f91..df675d2 100644 +--- a/arch/arm/mach-at91/at91sam9260_devices.c ++++ b/arch/arm/mach-at91/at91sam9260_devices.c +@@ -403,7 +403,7 @@ void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data) {} + static int at91_add_device_watchdog(void) + { + add_generic_device("at91sam9_wdt", DEVICE_ID_SINGLE, NULL, +- AT91_WDT + AT91_BASE_SYS, 16, IORESOURCE_MEM, NULL); ++ AT91_BASE_WDT, 16, IORESOURCE_MEM, NULL); + + return 0; + } +-- +1.8.1.4 + diff --git a/board/telit/evk-pro3/barebox-2013.04.0-0005-watchdog-enable-for-evk-pro3.patch b/board/telit/evk-pro3/barebox-2013.04.0-0005-watchdog-enable-for-evk-pro3.patch new file mode 100644 index 0000000000..837e8c632a --- /dev/null +++ b/board/telit/evk-pro3/barebox-2013.04.0-0005-watchdog-enable-for-evk-pro3.patch @@ -0,0 +1,26 @@ +From 98c96ea36a4b3bb9b92dde849db5e8d6918b5168 Mon Sep 17 00:00:00 2001 +From: Fabio Porcedda +Date: Thu, 17 Jan 2013 11:32:59 +0100 +Subject: [PATCH 5/5] watchdog: enable for evk-pro3 + +Signed-off-by: Fabio Porcedda +--- + arch/arm/configs/telit_evk_pro3_defconfig | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/arch/arm/configs/telit_evk_pro3_defconfig b/arch/arm/configs/telit_evk_pro3_defconfig +index 050d176..436cecf 100644 +--- a/arch/arm/configs/telit_evk_pro3_defconfig ++++ b/arch/arm/configs/telit_evk_pro3_defconfig +@@ -68,6 +68,8 @@ CONFIG_MCI_ATMEL=y + CONFIG_LED=y + CONFIG_LED_GPIO=y + CONFIG_LED_TRIGGERS=y ++CONFIG_WATCHDOG=y ++CONFIG_WATCHDOG_AT91SAM9X=y + CONFIG_FS_TFTP=y + CONFIG_FS_FAT=y + CONFIG_FS_FAT_LFN=y +-- +1.8.1.4 + diff --git a/board/telit/evk-pro3/linux-3.9.config b/board/telit/evk-pro3/linux-3.9.config new file mode 100644 index 0000000000..99c2f2d2b6 --- /dev/null +++ b/board/telit/evk-pro3/linux-3.9.config @@ -0,0 +1,201 @@ +CONFIG_EXPERIMENTAL=y +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_KERNEL_LZO=y +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_BLK_DEV_INITRD=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_KALLSYMS_ALL=y +CONFIG_EMBEDDED=y +CONFIG_SLAB=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_LBDAF is not set +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_ARCH_AT91=y +CONFIG_SOC_AT91SAM9260=y +CONFIG_SOC_AT91SAM9263=y +CONFIG_SOC_AT91SAM9G45=y +CONFIG_SOC_AT91SAM9X5=y +CONFIG_SOC_AT91SAM9N12=y +CONFIG_MACH_AT91SAM_DT=y +CONFIG_AT91_PROGRAMMABLE_CLOCKS=y +CONFIG_AT91_TIMER_HZ=128 +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +CONFIG_LEDS=y +CONFIG_LEDS_CPU=y +CONFIG_UACCESS_WITH_MEMCPY=y +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ARM_APPENDED_DTB=y +CONFIG_ARM_ATAG_DTB_COMPAT=y +CONFIG_CMDLINE="console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw" +CONFIG_KEXEC=y +CONFIG_AUTO_ZRELADDR=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_PNP=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_DIAG is not set +CONFIG_IPV6=y +# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET6_XFRM_MODE_TUNNEL is not set +# CONFIG_INET6_XFRM_MODE_BEET is not set +CONFIG_IPV6_SIT_6RD=y +# CONFIG_WIRELESS is not set +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +# CONFIG_STANDALONE is not set +# CONFIG_PREVENT_FIRMWARE_BUILD is not set +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_ATMEL=y +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_GLUEBI=y +CONFIG_PROC_DEVICETREE=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=4 +CONFIG_BLK_DEV_RAM_SIZE=8192 +CONFIG_ATMEL_PWM=y +CONFIG_ATMEL_TCLIB=y +CONFIG_EEPROM_93CX6=m +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_LOWLEVEL is not set +CONFIG_NETDEVICES=y +CONFIG_MII=y +CONFIG_MACB=y +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_CHELSIO is not set +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +CONFIG_DAVICOM_PHY=y +CONFIG_MICREL_PHY=y +# CONFIG_WLAN is not set +CONFIG_INPUT_POLLDEV=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_MOUSEDEV_SCREEN_X=480 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=272 +CONFIG_INPUT_JOYDEV=y +CONFIG_INPUT_EVDEV=y +# CONFIG_KEYBOARD_ATKBD is not set +CONFIG_KEYBOARD_GPIO=y +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_SERIO is not set +CONFIG_LEGACY_PTY_COUNT=4 +CONFIG_SERIAL_ATMEL=y +CONFIG_SERIAL_ATMEL_CONSOLE=y +CONFIG_HW_RANDOM=y +CONFIG_I2C=y +CONFIG_I2C_GPIO=y +CONFIG_SPI=y +CONFIG_SPI_ATMEL=y +CONFIG_PINCTRL_AT91=y +CONFIG_GPIO_SYSFS=y +# CONFIG_HWMON is not set +CONFIG_WATCHDOG=y +CONFIG_AT91SAM9X_WATCHDOG=y +CONFIG_SSB=m +CONFIG_FB=y +CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_ATMEL=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +# CONFIG_LCD_CLASS_DEVICE is not set +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_ATMEL_LCDC=y +# CONFIG_BACKLIGHT_GENERIC is not set +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_FONT_ACORN_8x8=y +CONFIG_FONT_MINI_4x6=y +CONFIG_LOGO=y +# CONFIG_HID_SUPPORT is not set +CONFIG_USB=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_DEVICEFS=y +# CONFIG_USB_DEVICE_CLASS is not set +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_ACM=y +CONFIG_USB_STORAGE=y +CONFIG_USB_SERIAL=y +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_FTDI_SIO=y +CONFIG_USB_SERIAL_PL2303=y +CONFIG_USB_GADGET=y +CONFIG_USB_AT91=m +CONFIG_USB_ATMEL_USBA=m +CONFIG_USB_ETH=m +CONFIG_USB_GADGETFS=m +CONFIG_USB_CDC_COMPOSITE=m +CONFIG_USB_G_ACM_MS=m +CONFIG_USB_G_MULTI=m +CONFIG_USB_G_MULTI_CDC=y +CONFIG_MMC=y +CONFIG_MMC_ATMELMCI=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_AT91RM9200=y +CONFIG_RTC_DRV_AT91SAM9=y +CONFIG_DMADEVICES=y +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_EXT2_FS=y +CONFIG_FANOTIFY=y +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_UBIFS_FS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_ROOT_NFS=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_850=y +CONFIG_NLS_ISO8859_1=y +CONFIG_STRIP_ASM_SYMS=y +CONFIG_DEBUG_FS=y +# CONFIG_SCHED_DEBUG is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_FTRACE is not set +CONFIG_DEBUG_USER=y +CONFIG_CRYPTO=y +CONFIG_CRYPTO_ECB=y +CONFIG_CRYPTO_AES=y +CONFIG_CRYPTO_ARC4=y +# CONFIG_CRYPTO_ANSI_CPRNG is not set +CONFIG_CRYPTO_USER_API_HASH=m +CONFIG_CRYPTO_USER_API_SKCIPHER=m +# CONFIG_CRYPTO_HW is not set +CONFIG_CRC_CCITT=m +CONFIG_CRC_ITU_T=m +CONFIG_CRC7=m +CONFIG_AVERAGE=y diff --git a/board/telit/evk-pro3/readme.txt b/board/telit/evk-pro3/readme.txt new file mode 100644 index 0000000000..ace9dd4c17 --- /dev/null +++ b/board/telit/evk-pro3/readme.txt @@ -0,0 +1,28 @@ +Buildroot board support for Telit EVK-PRO3 with Telit GE863-PRO3 + +Official site: + http://www.telit.com/en/products.php?p_id=3&p_ac=show&p=10 + +Build images: + make telit_evk_pro3_defconfig + make + + images built: + - output/images/barebox.bin + - output/images/zImage + - output/images/rootfs.ubi + + +Flash built images: + The first time you need to bootstrap from Telit Official Release 221.07.1007, + at the U-Boot prompt type: + U-Boot> loadb + send buildroot/output/images/barebox.bin + U-Boot> go 0x20200000 + + flash updated images using barebox through tftp: + barebox:/ erase dev/self0; cp /mnt/tftp/barebox.bin /dev/self0 + barebox:/ erase /dev/nand0.kernel.bb; cp /mnt/tftp/zImage /dev/nand0.kernel.bb + barebox:/ erase /dev/nand0.rootfs.bb; cp /mnt/tftp/rootfs.ubi /dev/nand0.rootfs.bb + barebox:/ erase dev/env0 + barebox:/ reset diff --git a/board/wandboard/readme.txt b/board/wandboard/readme.txt new file mode 100644 index 0000000000..4dd9c2c7f0 --- /dev/null +++ b/board/wandboard/readme.txt @@ -0,0 +1,37 @@ +Minimal board support for the Wandboard + +Wandboard's homepage is here: http://www.wandboard.org/ + +This config is only tested with the dual core wandboard. + +Installing: + +You need a micro SD card and a slot/adapter for your development machine. + +Partition the SD card leaving at least 1 MB in front of the first partition. + +Partition layout (example): + +Disk /dev/sdi: 3965 MB, 3965190144 bytes +255 heads, 63 sectors/track, 482 cylinders +Units = cylinders of 16065 * 512 = 8225280 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / 512 bytes +Disk identifier: 0x77b47445 + + Device Boot Start End Blocks Id System +/dev/sdi1 2 482 3863632+ 83 Linux + +Copy u-boot and its environment to the SD card: +sudo dd if=output/images/u-boot.imx bs=512 seek=2 of=/dev/sd +sudo dd if=output/images/uboot-env.bin bs=512 seek=768 of=/dev/sd + +Copy the root filesystem: +sudo dd if=output/images/rootfs.ext2 of=/dev/sd1 + +Alternative commands to copy root filesystem: +sudo mkfs.ext4 /dev/sd1 +sudo mount /dev/sd1 /mnt +sudo tar xf output/images/rootfs.tar -C /mnt +sudo umount /mnt + diff --git a/board/wandboard/uboot-env.txt b/board/wandboard/uboot-env.txt new file mode 100644 index 0000000000..7ca2b1a85c --- /dev/null +++ b/board/wandboard/uboot-env.txt @@ -0,0 +1,20 @@ +baudrate=115200 +bootcmd=mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript; then run bootscript; else if run loaduimage; then run mmcboot; else run netboot; fi; fi; else run netboot; fi +bootdelay=3 +bootscript=echo Running bootscript from mmc ...; source +console=ttymxc0 +ethact=FEC +ethaddr=00:1f:7b:b2:05:ee +ethprime=FEC +loadaddr=0x12000000 +loadbootscript=ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script}; +loaduimage=ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage} +mmcargs=setenv bootargs console=${console},${baudrate} root=${mmcroot} +mmcboot=echo Booting from mmc ...; run mmcargs; bootm; +mmcdev=0 +mmcpart=1 +mmcroot=/dev/mmcblk0p1 rootwait rw +netargs=setenv bootargs console=${console},${baudrate} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp +netboot=echo Booting from net ...; run netargs; if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; ${get_cmd} ${uimage}; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if ${get_cmd} ${fdt_addr} ${fdt_file}; then bootm ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootm; else echo WARN: Cannot load the DT; fi; fi; else bootm; fi; +script=boot/boot.scr +uimage=boot/uImage diff --git a/boot/Config.in b/boot/Config.in index 6bcc98af54..eb5f7cd67b 100644 --- a/boot/Config.in +++ b/boot/Config.in @@ -1,12 +1,16 @@ menu "Bootloaders" +source "boot/at91bootstrap/Config.in" +source "boot/at91bootstrap3/Config.in" +source "boot/at91dataflashboot/Config.in" source "boot/barebox/Config.in" +source "boot/boot-wrapper-aarch64/Config.in" source "boot/grub/Config.in" -source "boot/grub2/Config.in" +source "boot/lpc32xxcdl/Config.in" +source "boot/mxs-bootlets/Config.in" source "boot/syslinux/Config.in" -source "boot/u-boot/Config.in" -source "boot/at91bootstrap/Config.in" -source "boot/at91dataflashboot/Config.in" +source "boot/uboot/Config.in" +source "boot/xloader/Config.in" endmenu diff --git a/boot/at91bootstrap/Config.in b/boot/at91bootstrap/Config.in index f022dd5c99..9cbaf81eef 100644 --- a/boot/at91bootstrap/Config.in +++ b/boot/at91bootstrap/Config.in @@ -1,5 +1,5 @@ -menuconfig BR2_TARGET_AT91BOOTSTRAP - depends on BR2_arm +config BR2_TARGET_AT91BOOTSTRAP + depends on BR2_arm926t bool "AT91 Bootstrap" help AT91Bootstrap is a first level bootloader for the Atmel AT91 @@ -10,6 +10,15 @@ menuconfig BR2_TARGET_AT91BOOTSTRAP if BR2_TARGET_AT91BOOTSTRAP +config BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR + string "custom patch dir" + help + If your board requires custom patches, add the path to the + directory containing the patches here. The patches must be + named at91bootstrap--.patch. + + Most users may leave this empty + config BR2_TARGET_AT91BOOTSTRAP_BOARD string "Bootstrap board" default "" diff --git a/boot/at91bootstrap/at91bootstrap-1.16-gcc-4.6.x-ldscript-fix.patch b/boot/at91bootstrap/at91bootstrap-1.16-gcc-4.6.x-ldscript-fix.patch new file mode 100644 index 0000000000..e4ed04e865 --- /dev/null +++ b/boot/at91bootstrap/at91bootstrap-1.16-gcc-4.6.x-ldscript-fix.patch @@ -0,0 +1,29 @@ +From b783d1f9bf985c0981e755bd2c13e091e9d6837f Mon Sep 17 00:00:00 2001 +From: Gregory Hermant +Date: Tue, 6 Nov 2012 09:38:50 +0100 +Subject: [PATCH] at91bootstrap: fix overlap linker issue + +The linker script of the at91bootstrap package has to be modified when +built from gcc-4.6.x version. Indeed a section named text.startup is +created and has to be added into the text section. + +Signed-off-by: Gregory Hermant +--- + elf32-littlearm.lds | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/elf32-littlearm.lds b/elf32-littlearm.lds +index a33952f..4f3ba25 100644 +--- a/elf32-littlearm.lds ++++ b/elf32-littlearm.lds +@@ -7,6 +7,7 @@ SECTIONS + .text : { + _stext = .; + *(.text) ++ *(.text*) + *(.rodata) /* read-only data (constants) */ + *(.rodata*) + . = ALIGN(4); +-- +1.7.9.5 + diff --git a/boot/at91bootstrap/at91bootstrap-1.16-u-boot-relocation-fix.patch b/boot/at91bootstrap/at91bootstrap-1.16-u-boot-relocation-fix.patch new file mode 100644 index 0000000000..0c9b9114cb --- /dev/null +++ b/boot/at91bootstrap/at91bootstrap-1.16-u-boot-relocation-fix.patch @@ -0,0 +1,284 @@ +From d4e4a1aad559e35d84b445d1379be94ad036984e Mon Sep 17 00:00:00 2001 +From: Alexandre Belloni +Date: Thu, 25 Oct 2012 22:57:14 +0200 +Subject: [PATCH] u-boot relocation fix + +Every AT91SAM plaforms were broken between 2010.12 and 2011.03 because +of the relocation changes. + +We have to get JUMP_ADDR consistant with what is used by u-boot +(CONFIG_SYS_TEXT_BASE). + +I didn't know what to do with at91sam9m10g45ek as it doesn't seems to be +converted yet. But anyway, that means that it is either not working or +doesn't care so changing it here shouldn't harm. + +We also have to increase the IMG_SIZE as u-boot as grown larger than the +default value. As requested on the u-boot ML, we assume that it could +be up to 495kB big. + +It means that now, you have to flash your kernel at 0x00084000 instead +of 0x00042000. And so you also have to load it from that adress from +u-boot. + +Then, remember that you could decrease IMG_SIZE to boot faster. + +Signed-off-by: Alexandre Belloni +--- + board/at91sam9260ek/dataflash/at91sam9260ek.h | 4 ++-- + board/at91sam9260ek/nandflash/at91sam9260ek.h | 2 +- + board/at91sam9261ek/dataflash/at91sam9261ek.h | 4 ++-- + board/at91sam9261ek/nandflash/at91sam9261ek.h | 2 +- + board/at91sam9263ek/dataflash/at91sam9263ek.h | 4 ++-- + board/at91sam9263ek/nandflash/at91sam9263ek.h | 2 +- + board/at91sam9g10ek/dataflash/at91sam9g10ek.h | 4 ++-- + board/at91sam9g10ek/nandflash/at91sam9g10ek.h | 2 +- + board/at91sam9g20ek/dataflash/at91sam9g20ek.h | 4 ++-- + board/at91sam9g20ek/nandflash/at91sam9g20ek.h | 2 +- + board/at91sam9m10ekes/dataflash/at91sam9m10ekes.h | 2 +- + .../at91sam9m10g45ek/dataflash/at91sam9m10g45ek.h | 2 +- + board/at91sam9rlek/dataflash/at91sam9rlek.h | 4 ++-- + board/at91sam9rlek/nandflash/at91sam9rlek.h | 2 +- + board/at91sam9xeek/dataflash/at91sam9xeek.h | 4 ++-- + board/at91sam9xeek/nandflash/at91sam9xeek.h | 2 +- + 16 files changed, 23 insertions(+), 23 deletions(-) + +diff --git a/board/at91sam9260ek/dataflash/at91sam9260ek.h b/board/at91sam9260ek/dataflash/at91sam9260ek.h +index 1834246..91081a1 100644 +--- a/board/at91sam9260ek/dataflash/at91sam9260ek.h ++++ b/board/at91sam9260ek/dataflash/at91sam9260ek.h +@@ -74,10 +74,10 @@ + #define AT91C_SPI_PCS_DATAFLASH AT91C_SPI_PCS1_DATAFLASH /* Boot on SPI NCS0 */ + + #define IMG_ADDRESS 0x8400 /* Image Address in DataFlash */ +-#define IMG_SIZE 0x33900 /* Image Size in DataFlash */ ++#define IMG_SIZE 0x7BC00 /* Image Size in DataFlash */ + + #define MACH_TYPE 0x44B /* AT91SAM9260-EK */ +-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ ++#define JUMP_ADDR 0x21F00000 /* Final Jump Address */ + + /* ******************************************************************* */ + /* Application Settings */ +diff --git a/board/at91sam9260ek/nandflash/at91sam9260ek.h b/board/at91sam9260ek/nandflash/at91sam9260ek.h +index 2cac601..f8fdff2 100644 +--- a/board/at91sam9260ek/nandflash/at91sam9260ek.h ++++ b/board/at91sam9260ek/nandflash/at91sam9260ek.h +@@ -92,7 +92,7 @@ + #define IMG_SIZE 0x40000 /* Image Size in NandFlash */ + + #define MACH_TYPE 0x44B /* AT91SAM9260-EK */ +-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ ++#define JUMP_ADDR 0x21F00000 /* Final Jump Address */ + + /* ******************************************************************* */ + /* Application Settings */ +diff --git a/board/at91sam9261ek/dataflash/at91sam9261ek.h b/board/at91sam9261ek/dataflash/at91sam9261ek.h +index 8ce30e9..276ba3d 100644 +--- a/board/at91sam9261ek/dataflash/at91sam9261ek.h ++++ b/board/at91sam9261ek/dataflash/at91sam9261ek.h +@@ -97,10 +97,10 @@ + #define AT91C_SPI_PCS_DATAFLASH AT91C_SPI_PCS0_DATAFLASH /* Boot on SPI NCS0 */ + + #define IMG_ADDRESS 0x8400 /* Image Address in DataFlash */ +-#define IMG_SIZE 0x33900 /* Image Size in DataFlash */ ++#define IMG_SIZE 0x7BC00 /* Image Size in DataFlash */ + + #define MACH_TYPE 0x350 /* AT91SAM9261-EK */ +-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ ++#define JUMP_ADDR 0x21F00000 /* Final Jump Address */ + + /* ******************************************************************* */ + /* Application Settings */ +diff --git a/board/at91sam9261ek/nandflash/at91sam9261ek.h b/board/at91sam9261ek/nandflash/at91sam9261ek.h +index badc3ac..e628c97 100644 +--- a/board/at91sam9261ek/nandflash/at91sam9261ek.h ++++ b/board/at91sam9261ek/nandflash/at91sam9261ek.h +@@ -114,7 +114,7 @@ + #define IMG_SIZE 0x40000 /* Image Size in NandFlash */ + + #define MACH_TYPE 0x350 /* AT91SAM9261-EK */ +-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ ++#define JUMP_ADDR 0x21F00000 /* Final Jump Address */ + + /* ******************************************************************* */ + /* Application Settings */ +diff --git a/board/at91sam9263ek/dataflash/at91sam9263ek.h b/board/at91sam9263ek/dataflash/at91sam9263ek.h +index 5c9da4b..870f9e2 100644 +--- a/board/at91sam9263ek/dataflash/at91sam9263ek.h ++++ b/board/at91sam9263ek/dataflash/at91sam9263ek.h +@@ -96,10 +96,10 @@ + #define AT91C_SPI_PCS_DATAFLASH AT91C_SPI_PCS0_DATAFLASH /* Boot on SPI NCS0 */ + + #define IMG_ADDRESS 0x8400 /* Image Address in DataFlash */ +-#define IMG_SIZE 0x33900 /* Image Size in DataFlash */ ++#define IMG_SIZE 0x7BC00 /* Image Size in DataFlash */ + + #define MACH_TYPE 0x4B2 /* AT91SAM9263-EK */ +-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ ++#define JUMP_ADDR 0x21F00000 /* Final Jump Address */ + + /* ******************************************************************* */ + /* Application Settings */ +diff --git a/board/at91sam9263ek/nandflash/at91sam9263ek.h b/board/at91sam9263ek/nandflash/at91sam9263ek.h +index 505afc7..8ab4f46 100644 +--- a/board/at91sam9263ek/nandflash/at91sam9263ek.h ++++ b/board/at91sam9263ek/nandflash/at91sam9263ek.h +@@ -108,7 +108,7 @@ + #define IMG_SIZE 0x40000 /* Image Size in NandFlash */ + + #define MACH_TYPE 1202 /* AT91SAM9263-EK */ +-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ ++#define JUMP_ADDR 0x21F00000 /* Final Jump Address */ + + /* ******************************************************************* */ + /* Application Settings */ +diff --git a/board/at91sam9g10ek/dataflash/at91sam9g10ek.h b/board/at91sam9g10ek/dataflash/at91sam9g10ek.h +index b2faf44..f4f556b 100644 +--- a/board/at91sam9g10ek/dataflash/at91sam9g10ek.h ++++ b/board/at91sam9g10ek/dataflash/at91sam9g10ek.h +@@ -98,10 +98,10 @@ + #define AT91C_SPI_PCS_DATAFLASH AT91C_SPI_PCS0_DATAFLASH /* Boot on SPI NCS0 */ + + #define IMG_ADDRESS 0x8400 /* Image Address in DataFlash */ +-#define IMG_SIZE 0x33900 /* Image Size in DataFlash */ ++#define IMG_SIZE 0x7BC00 /* Image Size in DataFlash */ + + #define MACH_TYPE 0x350 /* AT91SAM9261-EK */ +-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ ++#define JUMP_ADDR 0x21F00000 /* Final Jump Address */ + + /* ******************************************************************* */ + /* Application Settings */ +diff --git a/board/at91sam9g10ek/nandflash/at91sam9g10ek.h b/board/at91sam9g10ek/nandflash/at91sam9g10ek.h +index 66c40a3..6c3ecda 100644 +--- a/board/at91sam9g10ek/nandflash/at91sam9g10ek.h ++++ b/board/at91sam9g10ek/nandflash/at91sam9g10ek.h +@@ -115,7 +115,7 @@ + #define IMG_SIZE 0x40000 /* Image Size in NandFlash */ + + #define MACH_TYPE 0x350 /* AT91SAM9G10-EK */ +-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ ++#define JUMP_ADDR 0x21F00000 /* Final Jump Address */ + + /* ******************************************************************* */ + /* Application Settings */ +diff --git a/board/at91sam9g20ek/dataflash/at91sam9g20ek.h b/board/at91sam9g20ek/dataflash/at91sam9g20ek.h +index eea0439..7fc70d6 100644 +--- a/board/at91sam9g20ek/dataflash/at91sam9g20ek.h ++++ b/board/at91sam9g20ek/dataflash/at91sam9g20ek.h +@@ -75,10 +75,10 @@ + #define AT91C_SPI_PCS_DATAFLASH AT91C_SPI_PCS1_DATAFLASH /* Boot on SPI NCS1 */ + + #define IMG_ADDRESS 0x8400 /* Image Address in DataFlash */ +-#define IMG_SIZE 0x33900 /* Image Size in DataFlash */ ++#define IMG_SIZE 0x7BC00 /* Image Size in DataFlash */ + + #define MACH_TYPE 0x658 /* AT91SAM9G20-EK */ +-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ ++#define JUMP_ADDR 0x21F00000 /* Final Jump Address */ + + /* ******************************************************************* */ + /* Application Settings */ +diff --git a/board/at91sam9g20ek/nandflash/at91sam9g20ek.h b/board/at91sam9g20ek/nandflash/at91sam9g20ek.h +index 31bd499..e797e4d 100644 +--- a/board/at91sam9g20ek/nandflash/at91sam9g20ek.h ++++ b/board/at91sam9g20ek/nandflash/at91sam9g20ek.h +@@ -93,7 +93,7 @@ + #define IMG_SIZE 0x40000 /* Image Size in NandFlash */ + + #define MACH_TYPE 0x658 /* AT91SAM9G20-EK */ +-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ ++#define JUMP_ADDR 0x21F00000 /* Final Jump Address */ + + /* ******************************************************************* */ + /* Application Settings */ +diff --git a/board/at91sam9m10ekes/dataflash/at91sam9m10ekes.h b/board/at91sam9m10ekes/dataflash/at91sam9m10ekes.h +index a60fd41..5587a00 100644 +--- a/board/at91sam9m10ekes/dataflash/at91sam9m10ekes.h ++++ b/board/at91sam9m10ekes/dataflash/at91sam9m10ekes.h +@@ -89,7 +89,7 @@ + #define AT91C_SPI_PCS_DATAFLASH AT91C_SPI_PCS0_DATAFLASH /* Boot on SPI NCS0 */ + + #define IMG_ADDRESS 0x8400 /* Image Address in DataFlash */ +-#define IMG_SIZE 0x33900 /* Image Size in DataFlash */ ++#define IMG_SIZE 0x7BC00 /* Image Size in DataFlash */ + + #define MACH_TYPE 0x9CD /* AT91SAM9M10-EKES */ + #define JUMP_ADDR 0x73F00000 /* Final Jump Address */ +diff --git a/board/at91sam9m10g45ek/dataflash/at91sam9m10g45ek.h b/board/at91sam9m10g45ek/dataflash/at91sam9m10g45ek.h +index 5c726b5..9090097 100644 +--- a/board/at91sam9m10g45ek/dataflash/at91sam9m10g45ek.h ++++ b/board/at91sam9m10g45ek/dataflash/at91sam9m10g45ek.h +@@ -85,7 +85,7 @@ + #define AT91C_SPI_PCS_DATAFLASH AT91C_SPI_PCS0_DATAFLASH /* Boot on SPI NCS0 */ + + #define IMG_ADDRESS 0x8400 /* Image Address in DataFlash */ +-#define IMG_SIZE 0x33900 /* Image Size in DataFlash */ ++#define IMG_SIZE 0x7BC00 /* Image Size in DataFlash */ + + #define MACH_TYPE 0x726 /* AT91SAM9M10G45-EK */ + #define JUMP_ADDR 0x73F00000 /* Final Jump Address */ +diff --git a/board/at91sam9rlek/dataflash/at91sam9rlek.h b/board/at91sam9rlek/dataflash/at91sam9rlek.h +index 05c42dc..150f17e 100644 +--- a/board/at91sam9rlek/dataflash/at91sam9rlek.h ++++ b/board/at91sam9rlek/dataflash/at91sam9rlek.h +@@ -89,10 +89,10 @@ + #define AT91C_SPI_PCS_DATAFLASH AT91C_SPI_PCS0_DATAFLASH /* Boot on SPI NCS0 */ + + #define IMG_ADDRESS 0x8400 /* Image Address in DataFlash */ +-#define IMG_SIZE 0x33900 /* Image Size in DataFlash */ ++#define IMG_SIZE 0x7BC00 /* Image Size in DataFlash */ + + #define MACH_TYPE 1326 /* AT91SAM9RL-EK */ +-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ ++#define JUMP_ADDR 0x21F00000 /* Final Jump Address */ + + /* ******************************************************************* */ + /* Application Settings */ +diff --git a/board/at91sam9rlek/nandflash/at91sam9rlek.h b/board/at91sam9rlek/nandflash/at91sam9rlek.h +index 656b4ba..594db8f 100644 +--- a/board/at91sam9rlek/nandflash/at91sam9rlek.h ++++ b/board/at91sam9rlek/nandflash/at91sam9rlek.h +@@ -112,7 +112,7 @@ + #define IMG_SIZE 0x40000 /* Image Size in NandFlash */ + + #define MACH_TYPE 1326 /* AT91SAM9RL-EK */ +-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ ++#define JUMP_ADDR 0x21F00000 /* Final Jump Address */ + + /* ******************************************************************* */ + /* Application Settings */ +diff --git a/board/at91sam9xeek/dataflash/at91sam9xeek.h b/board/at91sam9xeek/dataflash/at91sam9xeek.h +index 27d1822..08e515d 100644 +--- a/board/at91sam9xeek/dataflash/at91sam9xeek.h ++++ b/board/at91sam9xeek/dataflash/at91sam9xeek.h +@@ -74,10 +74,10 @@ + #define AT91C_SPI_PCS_DATAFLASH AT91C_SPI_PCS1_DATAFLASH /* Boot on SPI NCS1 */ + + #define IMG_ADDRESS 0x8400 /* Image Address in DataFlash */ +-#define IMG_SIZE 0x33900 /* Image Size in DataFlash */ ++#define IMG_SIZE 0x7BC00 /* Image Size in DataFlash */ + + #define MACH_TYPE 0x44B /* AT91SAM9XE-EK same id as AT91SAM9260-EK*/ +-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ ++#define JUMP_ADDR 0x21F00000 /* Final Jump Address */ + + /* ******************************************************************* */ + /* Application Settings */ +diff --git a/board/at91sam9xeek/nandflash/at91sam9xeek.h b/board/at91sam9xeek/nandflash/at91sam9xeek.h +index 5dbc63e..9fac7cb 100644 +--- a/board/at91sam9xeek/nandflash/at91sam9xeek.h ++++ b/board/at91sam9xeek/nandflash/at91sam9xeek.h +@@ -94,7 +94,7 @@ + #define IMG_SIZE 0x40000 /* Image Size in NandFlash */ + + #define MACH_TYPE 0x44B /* AT91SAM9XE-EK same id as AT91SAM9260-EK*/ +-#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ ++#define JUMP_ADDR 0x21F00000 /* Final Jump Address */ + + /* ******************************************************************* */ + /* Application Settings */ +-- +1.7.9.5 + diff --git a/boot/at91bootstrap/at91bootstrap.mk b/boot/at91bootstrap/at91bootstrap.mk index 3d4308edfa..c5fd0999f9 100644 --- a/boot/at91bootstrap/at91bootstrap.mk +++ b/boot/at91bootstrap/at91bootstrap.mk @@ -1,66 +1,51 @@ -############################################################# +################################################################################ # # at91bootstrap # -############################################################# -AT91BOOTSTRAP_VERSION:=1.16 -AT91BOOTSTRAP_NAME:=AT91Bootstrap$(AT91BOOTSTRAP_VERSION) -AT91BOOTSTRAP_SITE:=http://www.atmel.com/dyn/resources/prod_documents/ -AT91BOOTSTRAP_SOURCE:=$(AT91BOOTSTRAP_NAME).zip -AT91BOOTSTRAP_DIR:=$(BUILD_DIR)/at91bootstrap-$(AT91BOOTSTRAP_VERSION) +################################################################################ -AT91BOOTSTRAP_BOARD:=$(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_BOARD)) -AT91BOOTSTRAP_MEMORY:=$(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_MEMORY)) -AT91BOOTSTRAP_BINARY:=$(AT91BOOTSTRAP_MEMORY)_$(AT91BOOTSTRAP_BOARD).bin -AT91BOOTSTRAP_BUILD_DIR:=$(AT91BOOTSTRAP_DIR)/board/$(AT91BOOTSTRAP_BOARD)/$(AT91BOOTSTRAP_MEMORY) -AT91BOOTSTRAP_TARGET:=$(AT91BOOTSTRAP_BUILD_DIR)/$(AT91BOOTSTRAP_BINARY) +AT91BOOTSTRAP_VERSION = 1.16 +AT91BOOTSTRAP_SITE = ftp://www.at91.com/pub/at91bootstrap/ +AT91BOOTSTRAP_SOURCE = AT91Bootstrap$(AT91BOOTSTRAP_VERSION).zip -$(DL_DIR)/$(AT91BOOTSTRAP_SOURCE): - $(call DOWNLOAD,$(AT91BOOTSTRAP_SITE),$(AT91BOOTSTRAP_SOURCE)) +AT91BOOTSTRAP_BOARD = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_BOARD)) +AT91BOOTSTRAP_MEMORY = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_MEMORY)) +AT91BOOTSTRAP_MAKE_SUBDIR = board/$(AT91BOOTSTRAP_BOARD)/$(AT91BOOTSTRAP_MEMORY) +AT91BOOTSTRAP_BINARY = $(AT91BOOTSTRAP_MAKE_SUBDIR)/$(AT91BOOTSTRAP_MEMORY)_$(AT91BOOTSTRAP_BOARD).bin -$(AT91BOOTSTRAP_DIR)/.unpacked: $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE) - mkdir -p $(BUILD_DIR) - unzip -d $(BUILD_DIR) $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE) - mv $(BUILD_DIR)/Bootstrap-v$(AT91BOOTSTRAP_VERSION) $(AT91BOOTSTRAP_DIR) - touch $@ - -$(AT91BOOTSTRAP_DIR)/.patched: $(AT91BOOTSTRAP_DIR)/.unpacked - toolchain/patch-kernel.sh $(AT91BOOTSTRAP_DIR) boot/at91bootstrap/ at91bootstrap-$(AT91BOOTSTRAP_VERSION)\*.patch - touch $@ - -$(AT91BOOTSTRAP_TARGET): $(AT91BOOTSTRAP_DIR)/.patched - $(MAKE) CROSS_COMPILE=$(TARGET_CROSS) \ - -C $(AT91BOOTSTRAP_BUILD_DIR) +AT91BOOTSTRAP_INSTALL_IMAGES = YES +AT91BOOTSTRAP_INSTALL_TARGET = NO -$(BINARIES_DIR)/$(AT91BOOTSTRAP_BINARY): $(AT91BOOTSTRAP_TARGET) - mkdir -p $(dir $@) - cp $^ $@ +define AT91BOOTSTRAP_EXTRACT_CMDS + unzip -d $(BUILD_DIR) $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE) + mv $(BUILD_DIR)/Bootstrap-v$(AT91BOOTSTRAP_VERSION)/* $(@D) + rmdir $(BUILD_DIR)/Bootstrap-v$(AT91BOOTSTRAP_VERSION) +endef -at91bootstrap: $(BINARIES_DIR)/$(AT91BOOTSTRAP_BINARY) +ifneq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR)),) +define AT91BOOTSTRAP_APPLY_CUSTOM_PATCHES + support/scripts/apply-patches.sh $(@D) $(BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR) \ + at91bootstrap-$(AT91BOOTSTRAP_VERSION)-\*.patch +endef -at91bootstrap-source: $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE) +AT91BOOTSTRAP_POST_PATCH_HOOKS += AT91BOOTSTRAP_APPLY_CUSTOM_PATCHES +endif -at91bootstrap-unpacked: $(AT91BOOTSTRAP_DIR)/.unpacked +define AT91BOOTSTRAP_BUILD_CMDS + $(MAKE1) CROSS_COMPILE=$(TARGET_CROSS) -C $(@D)/$(AT91BOOTSTRAP_MAKE_SUBDIR) +endef -at91bootstrap-clean: - make -C $(AT91BOOTSTRAP_BUILD_DIR) clean +define AT91BOOTSTRAP_INSTALL_IMAGES_CMDS + cp $(@D)/$(AT91BOOTSTRAP_BINARY) $(BINARIES_DIR) +endef -at91bootstrap-dirclean: - rm -rf $(AT91BOOTSTRAP_DIR) +$(eval $(generic-package)) -############################################################# -# -# Toplevel Makefile options -# -############################################################# ifeq ($(BR2_TARGET_AT91BOOTSTRAP),y) -TARGETS+=at91bootstrap - # we NEED a board name unless we're at make source ifeq ($(filter source,$(MAKECMDGOALS)),) ifeq ($(AT91BOOTSTRAP_BOARD),) $(error No AT91Bootstrap board name set. Check your BR2_TARGET_AT91BOOTSTRAP_BOARD setting) endif endif - endif diff --git a/boot/at91bootstrap3/Config.in b/boot/at91bootstrap3/Config.in new file mode 100644 index 0000000000..110f808d6c --- /dev/null +++ b/boot/at91bootstrap3/Config.in @@ -0,0 +1,53 @@ +config BR2_TARGET_AT91BOOTSTRAP3 + depends on BR2_arm926t + bool "AT91 Bootstrap 3" + help + AT91Bootstrap is a first level bootloader for the Atmel AT91 + devices. It integrates algorithms for: + - Device initialization such as clock configuration, PIO settings... + - Peripheral drivers such as PIO, PMC or SDRAMC... + - Physical media algorithm such as DataFlash, NandFlash, NOR Flash... + +if BR2_TARGET_AT91BOOTSTRAP3 + +config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_PATCH_DIR + string "custom patch dir" + help + If your board requires custom patches, add the path to the + directory containing the patches here. The patches must be + named at91bootstrap3-.patch. + + Most users may leave this empty + +# +# Configuration selection +# + +choice + prompt "AT91 Bootstrap 3 configuration" + default BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG + +config BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG + bool "Using a defconfig" + +config BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG + bool "Using a custom config file" + +endchoice + +config BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG + string "Defconfig name" + depends on BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG + help + Name of the at91bootstrap3 defconfig file to use, without the + trailing _defconfig. The defconfig is located at + board//_defconfig in the at91bootstrap3 + tree. + +config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE + string "Configuration file path" + depends on BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG + help + Path to the at91bootstrap3 configuration file + +endif # BR2_TARGET_AT91BOOTSTRAP3 diff --git a/boot/at91bootstrap3/at91bootstrap3-u-boot-relocation-fix.patch b/boot/at91bootstrap3/at91bootstrap3-u-boot-relocation-fix.patch new file mode 100644 index 0000000000..62bbd2ab25 --- /dev/null +++ b/boot/at91bootstrap3/at91bootstrap3-u-boot-relocation-fix.patch @@ -0,0 +1,747 @@ +Every AT91SAM plaforms were broken between 2010.12 and 2011.03 because +of the relocation changes. + +We have to get JUMP_ADDR consistent with what is used by u-boot +(CONFIG_SYS_TEXT_BASE). + +I also chose to "repartition" the dataflash. u-boot is now living at +0x4000, letting 16kB for the bootstrap. We also have to increase the +IMG_SIZE as u-boot as grown larger than the default value. +As requested on the u-boot ML, we assume that it could be up to 512kB +big. + +It means that now, you have to flash your kernel at 0x0008C000 instead +of 0x00042000. And so you also have to load it from that address from +u-boot. + +Then, remember that you could decrease IMG_SIZE to boot faster. + +Signed-off-by: Alexandre Belloni +Signed-off-by: Simon Dawson + +diff -Nurp a/board/afeb9260/afeb9260_defconfig b/board/afeb9260/afeb9260_defconfig +--- a/board/afeb9260/afeb9260_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/afeb9260/afeb9260_defconfig 2012-07-25 20:52:17.967694276 +0100 +@@ -97,9 +97,9 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_ADDRESS="0x00004000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_APP_CHECK=y + # CONFIG_LONG_TEST is not set + # CONFIG_DEBUG is not set +diff -Nurp a/board/at91cap9adk/at91cap9adk_defconfig b/board/at91cap9adk/at91cap9adk_defconfig +--- a/board/at91cap9adk/at91cap9adk_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91cap9adk/at91cap9adk_defconfig 2012-07-25 20:52:30.603693814 +0100 +@@ -96,8 +96,8 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" +-CONFIG_IMG_SIZE="0x00040000" ++CONFIG_IMG_ADDRESS="0x00004000" ++CONFIG_IMG_SIZE="0x00080000" + CONFIG_JUMP_ADDR="0x73F00000" + CONFIG_APP_CHECK=y + # CONFIG_LONG_TEST is not set +diff -Nurp a/board/at91cap9adk/at91cap9df_defconfig b/board/at91cap9adk/at91cap9df_defconfig +--- a/board/at91cap9adk/at91cap9df_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91cap9adk/at91cap9df_defconfig 2012-07-25 20:52:23.807694041 +0100 +@@ -96,8 +96,8 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" +-CONFIG_IMG_SIZE="0x00040000" ++CONFIG_IMG_ADDRESS="0x00004000" ++CONFIG_IMG_SIZE="0x00080000" + CONFIG_JUMP_ADDR="0x73F00000" + CONFIG_APP_CHECK=y + # CONFIG_LONG_TEST is not set +diff -Nurp a/board/at91cap9adk/at91cap9f_defconfig b/board/at91cap9adk/at91cap9f_defconfig +--- a/board/at91cap9adk/at91cap9f_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91cap9adk/at91cap9f_defconfig 2012-07-25 21:25:20.839605245 +0100 +@@ -72,7 +72,7 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set + CONFIG_IMG_ADDRESS="0x00008000" +-CONFIG_IMG_SIZE="0x00040000" ++CONFIG_IMG_SIZE="0x00080000" + CONFIG_JUMP_ADDR="0x73F00000" + CONFIG_APP_CHECK=y + # CONFIG_LONG_TEST is not set +diff -Nurp a/board/at91cap9stk/at91cap9stk_defconfig b/board/at91cap9stk/at91cap9stk_defconfig +--- a/board/at91cap9stk/at91cap9stk_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91cap9stk/at91cap9stk_defconfig 2012-07-25 20:52:59.663692456 +0100 +@@ -96,8 +96,8 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" +-CONFIG_IMG_SIZE="0x00040000" ++CONFIG_IMG_ADDRESS="0x00004000" ++CONFIG_IMG_SIZE="0x00080000" + CONFIG_JUMP_ADDR="0x73F00000" + CONFIG_APP_CHECK=y + # CONFIG_LONG_TEST is not set +diff -Nurp a/board/at91cap9stk/at91cap9stkdf_defconfig b/board/at91cap9stk/at91cap9stkdf_defconfig +--- a/board/at91cap9stk/at91cap9stkdf_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91cap9stk/at91cap9stkdf_defconfig 2012-07-25 20:52:52.255692671 +0100 +@@ -96,8 +96,8 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" +-CONFIG_IMG_SIZE="0x00040000" ++CONFIG_IMG_ADDRESS="0x00004000" ++CONFIG_IMG_SIZE="0x00080000" + CONFIG_JUMP_ADDR="0x73F00000" + CONFIG_APP_CHECK=y + # CONFIG_LONG_TEST is not set +diff -Nurp a/board/at91cap9stk/at91cap9stkf_defconfig b/board/at91cap9stk/at91cap9stkf_defconfig +--- a/board/at91cap9stk/at91cap9stkf_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91cap9stk/at91cap9stkf_defconfig 2012-07-25 21:25:35.235605140 +0100 +@@ -72,7 +72,7 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set + CONFIG_IMG_ADDRESS="0x00008000" +-CONFIG_IMG_SIZE="0x00040000" ++CONFIG_IMG_SIZE="0x00080000" + CONFIG_JUMP_ADDR="0x73F00000" + CONFIG_APP_CHECK=y + # CONFIG_LONG_TEST is not set +diff -Nurp a/board/at91sam9260ek/at91sam9260dfc_defconfig b/board/at91sam9260ek/at91sam9260dfc_defconfig +--- a/board/at91sam9260ek/at91sam9260dfc_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9260ek/at91sam9260dfc_defconfig 2012-07-25 20:35:23.259739521 +0100 +@@ -97,9 +97,9 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_ADDRESS="0x00004000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_APP_CHECK=y + # CONFIG_LONG_TEST is not set + # CONFIG_DEBUG is not set +diff -Nurp a/board/at91sam9260ek/at91sam9260df_defconfig b/board/at91sam9260ek/at91sam9260df_defconfig +--- a/board/at91sam9260ek/at91sam9260df_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9260ek/at91sam9260df_defconfig 2012-07-25 20:34:19.231742964 +0100 +@@ -102,11 +102,11 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" ++CONFIG_IMG_ADDRESS="0x00004000" + CONFIG_SETTING_ADDRESS="0x00408400" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_GLBDRV_ADDR="0x20058000" + # CONFIG_LONG_TEST is not set + # CONFIG_DEBUG is not set +diff -Nurp a/board/at91sam9260ek/at91sam9260ek_defconfig b/board/at91sam9260ek/at91sam9260ek_defconfig +--- a/board/at91sam9260ek/at91sam9260ek_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9260ek/at91sam9260ek_defconfig 2012-07-25 20:32:17.711747794 +0100 +@@ -102,11 +102,11 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" ++CONFIG_IMG_ADDRESS="0x00004000" + CONFIG_SETTING_ADDRESS="0x00408400" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_GLBDRV_ADDR="0x20058000" + # CONFIG_LONG_TEST is not set + # CONFIG_DEBUG is not set +diff -Nurp a/board/at91sam9260ek/at91sam9260nf_defconfig b/board/at91sam9260ek/at91sam9260nf_defconfig +--- a/board/at91sam9260ek/at91sam9260nf_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9260ek/at91sam9260nf_defconfig 2012-07-25 21:25:57.079604719 +0100 +@@ -87,8 +87,8 @@ CONFIG_LOAD_UBOOT=y + CONFIG_IMG_ADDRESS="0x00020000" + CONFIG_SETTING_ADDRESS="0x01FE0000" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_GLBDRV_ADDR="0x20058000" + # CONFIG_LONG_TEST is not set + # CONFIG_DEBUG is not set +diff -Nurp a/board/at91sam9261ek/at91sam9261dfc_defconfig b/board/at91sam9261ek/at91sam9261dfc_defconfig +--- a/board/at91sam9261ek/at91sam9261dfc_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9261ek/at91sam9261dfc_defconfig 2012-07-25 20:37:07.515735228 +0100 +@@ -97,9 +97,9 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_ADDRESS="0x00004000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_APP_CHECK=y + # CONFIG_LONG_TEST is not set + CONFIG_DEBUG=y +diff -Nurp a/board/at91sam9261ek/at91sam9261df_defconfig b/board/at91sam9261ek/at91sam9261df_defconfig +--- a/board/at91sam9261ek/at91sam9261df_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9261ek/at91sam9261df_defconfig 2012-07-25 20:36:44.351735615 +0100 +@@ -102,11 +102,11 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" ++CONFIG_IMG_ADDRESS="0x00004000" + CONFIG_SETTING_ADDRESS="0x00408400" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_GLBDRV_ADDR="0x20058000" + # CONFIG_LONG_TEST is not set + CONFIG_DEBUG=y +diff -Nurp a/board/at91sam9261ek/at91sam9261ek_defconfig b/board/at91sam9261ek/at91sam9261ek_defconfig +--- a/board/at91sam9261ek/at91sam9261ek_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9261ek/at91sam9261ek_defconfig 2012-07-25 20:36:09.111737459 +0100 +@@ -102,11 +102,11 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" ++CONFIG_IMG_ADDRESS="0x00004000" + CONFIG_SETTING_ADDRESS="0x00408400" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_GLBDRV_ADDR="0x20058000" + # CONFIG_LONG_TEST is not set + CONFIG_DEBUG=y +diff -Nurp a/board/at91sam9261ek/at91sam9261nf_defconfig b/board/at91sam9261ek/at91sam9261nf_defconfig +--- a/board/at91sam9261ek/at91sam9261nf_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9261ek/at91sam9261nf_defconfig 2012-07-25 21:24:45.843607437 +0100 +@@ -86,8 +86,8 @@ CONFIG_LOAD_UBOOT=y + CONFIG_IMG_ADDRESS="0x00020000" + CONFIG_SETTING_ADDRESS="0x01FE0000" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_GLBDRV_ADDR="0x20058000" + # CONFIG_LONG_TEST is not set + CONFIG_DEBUG=y +diff -Nurp a/board/at91sam9263ek/at91sam9263dfc_defconfig b/board/at91sam9263ek/at91sam9263dfc_defconfig +--- a/board/at91sam9263ek/at91sam9263dfc_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9263ek/at91sam9263dfc_defconfig 2012-07-25 20:38:55.555730059 +0100 +@@ -100,9 +100,9 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_ADDRESS="0x00004000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_APP_CHECK=y + # CONFIG_LONG_TEST is not set + CONFIG_DEBUG=y +diff -Nurp a/board/at91sam9263ek/at91sam9263df_defconfig b/board/at91sam9263ek/at91sam9263df_defconfig +--- a/board/at91sam9263ek/at91sam9263df_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9263ek/at91sam9263df_defconfig 2012-07-25 20:38:37.395730195 +0100 +@@ -105,11 +105,11 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" ++CONFIG_IMG_ADDRESS="0x00004000" + CONFIG_SETTING_ADDRESS="0x00408400" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_GLBDRV_ADDR="0x2006b000" + # CONFIG_LONG_TEST is not set + CONFIG_DEBUG=y +diff -Nurp a/board/at91sam9263ek/at91sam9263ek_defconfig b/board/at91sam9263ek/at91sam9263ek_defconfig +--- a/board/at91sam9263ek/at91sam9263ek_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9263ek/at91sam9263ek_defconfig 2012-07-25 20:38:08.379732395 +0100 +@@ -105,11 +105,11 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" ++CONFIG_IMG_ADDRESS="0x00004000" + CONFIG_SETTING_ADDRESS="0x00408400" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_GLBDRV_ADDR="0x2006b000" + # CONFIG_LONG_TEST is not set + CONFIG_DEBUG=y +diff -Nurp a/board/at91sam9263ek/at91sam9263nf_defconfig b/board/at91sam9263ek/at91sam9263nf_defconfig +--- a/board/at91sam9263ek/at91sam9263nf_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9263ek/at91sam9263nf_defconfig 2012-07-25 21:25:39.195605069 +0100 +@@ -89,8 +89,8 @@ CONFIG_LOAD_UBOOT=y + CONFIG_IMG_ADDRESS="0x00020000" + CONFIG_SETTING_ADDRESS="0x01FE0000" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_GLBDRV_ADDR="0x2006b000" + # CONFIG_LONG_TEST is not set + CONFIG_DEBUG=y +diff -Nurp a/board/at91sam9g10ek/at91sam9g10df_defconfig b/board/at91sam9g10ek/at91sam9g10df_defconfig +--- a/board/at91sam9g10ek/at91sam9g10df_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9g10ek/at91sam9g10df_defconfig 2012-07-25 20:40:18.087726292 +0100 +@@ -102,11 +102,11 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" ++CONFIG_IMG_ADDRESS="0x00004000" + CONFIG_SETTING_ADDRESS="0x00408400" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_GLBDRV_ADDR="0x20068000" + # CONFIG_LONG_TEST is not set + CONFIG_DEBUG=y +diff -Nurp a/board/at91sam9g10ek/at91sam9g10ek_defconfig b/board/at91sam9g10ek/at91sam9g10ek_defconfig +--- a/board/at91sam9g10ek/at91sam9g10ek_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9g10ek/at91sam9g10ek_defconfig 2012-07-25 20:39:53.543727636 +0100 +@@ -102,11 +102,11 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" ++CONFIG_IMG_ADDRESS="0x00004000" + CONFIG_SETTING_ADDRESS="0x00408400" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_GLBDRV_ADDR="0x20068000" + # CONFIG_LONG_TEST is not set + CONFIG_DEBUG=y +diff -Nurp a/board/at91sam9g10ek/at91sam9g10nf_defconfig b/board/at91sam9g10ek/at91sam9g10nf_defconfig +--- a/board/at91sam9g10ek/at91sam9g10nf_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9g10ek/at91sam9g10nf_defconfig 2012-07-25 21:25:28.975605503 +0100 +@@ -86,8 +86,8 @@ CONFIG_LOAD_UBOOT=y + CONFIG_IMG_ADDRESS="0x00020000" + CONFIG_SETTING_ADDRESS="0x01FE0000" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_GLBDRV_ADDR="0x20068000" + # CONFIG_LONG_TEST is not set + CONFIG_DEBUG=y +diff -Nurp a/board/at91sam9g20ek/at91sam9g20dfc_defconfig b/board/at91sam9g20ek/at91sam9g20dfc_defconfig +--- a/board/at91sam9g20ek/at91sam9g20dfc_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9g20ek/at91sam9g20dfc_defconfig 2012-07-25 20:41:48.275722343 +0100 +@@ -97,9 +97,9 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_ADDRESS="0x00004000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_APP_CHECK=y + # CONFIG_LONG_TEST is not set + CONFIG_DEBUG=y +diff -Nurp a/board/at91sam9g20ek/at91sam9g20df_defconfig b/board/at91sam9g20ek/at91sam9g20df_defconfig +--- a/board/at91sam9g20ek/at91sam9g20df_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9g20ek/at91sam9g20df_defconfig 2012-07-25 20:42:07.091721310 +0100 +@@ -102,11 +102,11 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" ++CONFIG_IMG_ADDRESS="0x00004000" + CONFIG_SETTING_ADDRESS="0x00408400" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_GLBDRV_ADDR="0x20058000" + # CONFIG_LONG_TEST is not set + CONFIG_DEBUG=y +diff -Nurp a/board/at91sam9g20ek/at91sam9g20ek_defconfig b/board/at91sam9g20ek/at91sam9g20ek_defconfig +--- a/board/at91sam9g20ek/at91sam9g20ek_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9g20ek/at91sam9g20ek_defconfig 2012-07-25 20:41:23.179723541 +0100 +@@ -102,11 +102,11 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" ++CONFIG_IMG_ADDRESS="0x00004000" + CONFIG_SETTING_ADDRESS="0x00408400" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_GLBDRV_ADDR="0x20058000" + # CONFIG_LONG_TEST is not set + CONFIG_DEBUG=y +diff -Nurp a/board/at91sam9g20ek/at91sam9g20nf_defconfig b/board/at91sam9g20ek/at91sam9g20nf_defconfig +--- a/board/at91sam9g20ek/at91sam9g20nf_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9g20ek/at91sam9g20nf_defconfig 2012-07-25 21:25:49.291603975 +0100 +@@ -87,8 +87,8 @@ CONFIG_LOAD_UBOOT=y + CONFIG_IMG_ADDRESS="0x00020000" + CONFIG_SETTING_ADDRESS="0x01FE0000" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_GLBDRV_ADDR="0x20058000" + # CONFIG_LONG_TEST is not set + CONFIG_DEBUG=y +diff -Nurp a/board/at91sam9g45ek/at91sam9g45df_defconfig b/board/at91sam9g45ek/at91sam9g45df_defconfig +--- a/board/at91sam9g45ek/at91sam9g45df_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9g45ek/at91sam9g45df_defconfig 2012-07-25 20:47:46.055707221 +0100 +@@ -102,10 +102,10 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" ++CONFIG_IMG_ADDRESS="0x00004000" + CONFIG_SETTING_ADDRESS="0x00408400" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" ++CONFIG_IMG_SIZE="0x00080000" + CONFIG_JUMP_ADDR="0x73F00000" + CONFIG_GLBDRV_ADDR="0x7006b000" + # CONFIG_LONG_TEST is not set +diff -Nurp a/board/at91sam9g45ek/at91sam9g45ek_defconfig b/board/at91sam9g45ek/at91sam9g45ek_defconfig +--- a/board/at91sam9g45ek/at91sam9g45ek_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9g45ek/at91sam9g45ek_defconfig 2012-07-25 20:47:02.303708341 +0100 +@@ -102,10 +102,10 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" ++CONFIG_IMG_ADDRESS="0x00004000" + CONFIG_SETTING_ADDRESS="0x00408400" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" ++CONFIG_IMG_SIZE="0x00080000" + CONFIG_JUMP_ADDR="0x73F00000" + CONFIG_GLBDRV_ADDR="0x7006b000" + # CONFIG_LONG_TEST is not set +diff -Nurp a/board/at91sam9g45ek/at91sam9g45nf_defconfig b/board/at91sam9g45ek/at91sam9g45nf_defconfig +--- a/board/at91sam9g45ek/at91sam9g45nf_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9g45ek/at91sam9g45nf_defconfig 2012-07-25 21:25:24.547605601 +0100 +@@ -86,7 +86,7 @@ CONFIG_LOAD_UBOOT=y + CONFIG_IMG_ADDRESS="0x00020000" + CONFIG_SETTING_ADDRESS="0x01FE0000" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" ++CONFIG_IMG_SIZE="0x00080000" + CONFIG_JUMP_ADDR="0x73F00000" + CONFIG_GLBDRV_ADDR="0x7006b000" + # CONFIG_LONG_TEST is not set +diff -Nurp a/board/at91sam9g45ekes/at91sam9g45dfes_defconfig b/board/at91sam9g45ekes/at91sam9g45dfes_defconfig +--- a/board/at91sam9g45ekes/at91sam9g45dfes_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9g45ekes/at91sam9g45dfes_defconfig 2012-07-25 20:47:33.895706968 +0100 +@@ -102,10 +102,10 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" ++CONFIG_IMG_ADDRESS="0x00004000" + CONFIG_SETTING_ADDRESS="0x00408400" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" ++CONFIG_IMG_SIZE="0x00080000" + CONFIG_JUMP_ADDR="0x73F00000" + CONFIG_GLBDRV_ADDR="0x7006b000" + # CONFIG_LONG_TEST is not set +diff -Nurp a/board/at91sam9g45ekes/at91sam9g45ekes_defconfig b/board/at91sam9g45ekes/at91sam9g45ekes_defconfig +--- a/board/at91sam9g45ekes/at91sam9g45ekes_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9g45ekes/at91sam9g45ekes_defconfig 2012-07-25 20:46:49.043708951 +0100 +@@ -102,10 +102,10 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" ++CONFIG_IMG_ADDRESS="0x00004000" + CONFIG_SETTING_ADDRESS="0x00408400" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" ++CONFIG_IMG_SIZE="0x00080000" + CONFIG_JUMP_ADDR="0x73F00000" + CONFIG_GLBDRV_ADDR="0x7006b000" + # CONFIG_LONG_TEST is not set +diff -Nurp a/board/at91sam9g45ekes/at91sam9g45nfes_defconfig b/board/at91sam9g45ekes/at91sam9g45nfes_defconfig +--- a/board/at91sam9g45ekes/at91sam9g45nfes_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9g45ekes/at91sam9g45nfes_defconfig 2012-07-25 21:25:44.823604805 +0100 +@@ -86,7 +86,7 @@ CONFIG_LOAD_UBOOT=y + CONFIG_IMG_ADDRESS="0x00020000" + CONFIG_SETTING_ADDRESS="0x01FE0000" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" ++CONFIG_IMG_SIZE="0x00080000" + CONFIG_JUMP_ADDR="0x73F00000" + CONFIG_GLBDRV_ADDR="0x7006b000" + # CONFIG_LONG_TEST is not set +diff -Nurp a/board/at91sam9m10ek/at91sam9m10df_defconfig b/board/at91sam9m10ek/at91sam9m10df_defconfig +--- a/board/at91sam9m10ek/at91sam9m10df_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9m10ek/at91sam9m10df_defconfig 2012-07-25 20:44:34.975714928 +0100 +@@ -102,10 +102,10 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" ++CONFIG_IMG_ADDRESS="0x00004000" + CONFIG_SETTING_ADDRESS="0x00408400" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" ++CONFIG_IMG_SIZE="0x00080000" + CONFIG_JUMP_ADDR="0x73F00000" + CONFIG_GLBDRV_ADDR="0x7006b000" + # CONFIG_LONG_TEST is not set +diff -Nurp a/board/at91sam9m10ek/at91sam9m10ek_defconfig b/board/at91sam9m10ek/at91sam9m10ek_defconfig +--- a/board/at91sam9m10ek/at91sam9m10ek_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9m10ek/at91sam9m10ek_defconfig 2012-07-25 20:43:34.543717453 +0100 +@@ -102,10 +102,10 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" ++CONFIG_IMG_ADDRESS="0x00004000" + CONFIG_SETTING_ADDRESS="0x00408400" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" ++CONFIG_IMG_SIZE="0x00080000" + CONFIG_JUMP_ADDR="0x73F00000" + CONFIG_GLBDRV_ADDR="0x7006b000" + # CONFIG_LONG_TEST is not set +diff -Nurp a/board/at91sam9m10ek/at91sam9m10nf_defconfig b/board/at91sam9m10ek/at91sam9m10nf_defconfig +--- a/board/at91sam9m10ek/at91sam9m10nf_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9m10ek/at91sam9m10nf_defconfig 2012-07-25 21:21:40.419615800 +0100 +@@ -86,7 +86,7 @@ CONFIG_LOAD_UBOOT=y + CONFIG_IMG_ADDRESS="0x00020000" + CONFIG_SETTING_ADDRESS="0x01FE0000" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" ++CONFIG_IMG_SIZE="0x00080000" + CONFIG_JUMP_ADDR="0x73F00000" + CONFIG_GLBDRV_ADDR="0x7006b000" + # CONFIG_LONG_TEST is not set +diff -Nurp a/board/at91sam9m10ekes/at91sam9m10dfes_defconfig b/board/at91sam9m10ekes/at91sam9m10dfes_defconfig +--- a/board/at91sam9m10ekes/at91sam9m10dfes_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9m10ekes/at91sam9m10dfes_defconfig 2012-07-25 20:44:18.687715650 +0100 +@@ -102,10 +102,10 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" ++CONFIG_IMG_ADDRESS="0x00004000" + CONFIG_SETTING_ADDRESS="0x00408400" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" ++CONFIG_IMG_SIZE="0x00080000" + CONFIG_JUMP_ADDR="0x73F00000" + CONFIG_GLBDRV_ADDR="0x7006b000" + # CONFIG_LONG_TEST is not set +diff -Nurp a/board/at91sam9m10ekes/at91sam9m10ekes_defconfig b/board/at91sam9m10ekes/at91sam9m10ekes_defconfig +--- a/board/at91sam9m10ekes/at91sam9m10ekes_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9m10ekes/at91sam9m10ekes_defconfig 2012-07-25 20:43:57.255716814 +0100 +@@ -102,10 +102,10 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" ++CONFIG_IMG_ADDRESS="0x00004000" + CONFIG_SETTING_ADDRESS="0x00408400" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" ++CONFIG_IMG_SIZE="0x00080000" + CONFIG_JUMP_ADDR="0x73F00000" + CONFIG_GLBDRV_ADDR="0x7006b000" + # CONFIG_LONG_TEST is not set +diff -Nurp a/board/at91sam9m10ekes/at91sam9m10nfes_defconfig b/board/at91sam9m10ekes/at91sam9m10nfes_defconfig +--- a/board/at91sam9m10ekes/at91sam9m10nfes_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9m10ekes/at91sam9m10nfes_defconfig 2012-07-25 21:26:10.179603831 +0100 +@@ -86,7 +86,7 @@ CONFIG_LOAD_UBOOT=y + CONFIG_IMG_ADDRESS="0x00020000" + CONFIG_SETTING_ADDRESS="0x01FE0000" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" ++CONFIG_IMG_SIZE="0x00080000" + CONFIG_JUMP_ADDR="0x73F00000" + CONFIG_GLBDRV_ADDR="0x7006b000" + # CONFIG_LONG_TEST is not set +diff -Nurp a/board/at91sam9n12ek/at91sam9n12df_defconfig b/board/at91sam9n12ek/at91sam9n12df_defconfig +--- a/board/at91sam9n12ek/at91sam9n12df_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9n12ek/at91sam9n12df_defconfig 2012-07-25 20:52:40.675693207 +0100 +@@ -107,7 +107,7 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" ++CONFIG_IMG_ADDRESS="0x00004000" + CONFIG_SETTING_ADDRESS="0x00408400" + CONFIG_SETTING_SIZE="0x00001000" + CONFIG_IMG_SIZE="0x00050000" +diff -Nurp a/board/at91sam9rlek/at91sam9rldf_defconfig b/board/at91sam9rlek/at91sam9rldf_defconfig +--- a/board/at91sam9rlek/at91sam9rldf_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9rlek/at91sam9rldf_defconfig 2012-07-25 20:48:53.183703493 +0100 +@@ -102,11 +102,11 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" ++CONFIG_IMG_ADDRESS="0x00004000" + CONFIG_SETTING_ADDRESS="0x00408400" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_GLBDRV_ADDR="0x2006b000" + # CONFIG_LONG_TEST is not set + CONFIG_DEBUG=y +diff -Nurp a/board/at91sam9rlek/at91sam9rlek_defconfig b/board/at91sam9rlek/at91sam9rlek_defconfig +--- a/board/at91sam9rlek/at91sam9rlek_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9rlek/at91sam9rlek_defconfig 2012-07-25 20:48:29.659704460 +0100 +@@ -102,11 +102,11 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" ++CONFIG_IMG_ADDRESS="0x00004000" + CONFIG_SETTING_ADDRESS="0x00408400" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_GLBDRV_ADDR="0x2006b000" + # CONFIG_LONG_TEST is not set + CONFIG_DEBUG=y +diff -Nurp a/board/at91sam9rlek/at91sam9rlnf_defconfig b/board/at91sam9rlek/at91sam9rlnf_defconfig +--- a/board/at91sam9rlek/at91sam9rlnf_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9rlek/at91sam9rlnf_defconfig 2012-07-25 21:24:49.335607485 +0100 +@@ -85,8 +85,8 @@ CONFIG_LOAD_UBOOT=y + CONFIG_IMG_ADDRESS="0x00020000" + CONFIG_SETTING_ADDRESS="0x01FE0000" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_GLBDRV_ADDR="0x2006b000" + # CONFIG_LONG_TEST is not set + CONFIG_DEBUG=y +diff -Nurp a/board/at91sam9x5ek/at91sam9x5df_defconfig b/board/at91sam9x5ek/at91sam9x5df_defconfig +--- a/board/at91sam9x5ek/at91sam9x5df_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9x5ek/at91sam9x5df_defconfig 2012-07-25 20:52:45.375693059 +0100 +@@ -106,7 +106,7 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" ++CONFIG_IMG_ADDRESS="0x00004000" + CONFIG_SETTING_ADDRESS="0x00408400" + CONFIG_SETTING_SIZE="0x00001000" + CONFIG_IMG_SIZE="0x00050000" +diff -Nurp a/board/at91sam9xeek/at91sam9xedfc_defconfig b/board/at91sam9xeek/at91sam9xedfc_defconfig +--- a/board/at91sam9xeek/at91sam9xedfc_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9xeek/at91sam9xedfc_defconfig 2012-07-25 20:50:10.643699991 +0100 +@@ -96,9 +96,9 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_ADDRESS="0x00004000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_APP_CHECK=y + # CONFIG_LONG_TEST is not set + CONFIG_DEBUG=y +diff -Nurp a/board/at91sam9xeek/at91sam9xedf_defconfig b/board/at91sam9xeek/at91sam9xedf_defconfig +--- a/board/at91sam9xeek/at91sam9xedf_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9xeek/at91sam9xedf_defconfig 2012-07-25 20:50:26.967699568 +0100 +@@ -103,11 +103,11 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" ++CONFIG_IMG_ADDRESS="0x00004000" + CONFIG_SETTING_ADDRESS="0x00408400" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_GLBDRV_ADDR="0x23F00000" + # CONFIG_LONG_TEST is not set + CONFIG_DEBUG=y +diff -Nurp a/board/at91sam9xeek/at91sam9xeek_defconfig b/board/at91sam9xeek/at91sam9xeek_defconfig +--- a/board/at91sam9xeek/at91sam9xeek_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9xeek/at91sam9xeek_defconfig 2012-07-25 20:49:46.131699600 +0100 +@@ -103,11 +103,11 @@ CONFIG_LOAD_UBOOT=y + # CONFIG_LOAD_64KB is not set + # CONFIG_LOAD_1MB is not set + # CONFIG_LOAD_4MB is not set +-CONFIG_IMG_ADDRESS="0x00008400" ++CONFIG_IMG_ADDRESS="0x00004000" + CONFIG_SETTING_ADDRESS="0x00408400" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_GLBDRV_ADDR="0x23F00000" + # CONFIG_LONG_TEST is not set + CONFIG_DEBUG=y +diff -Nurp a/board/at91sam9xeek/at91sam9xenf_defconfig b/board/at91sam9xeek/at91sam9xenf_defconfig +--- a/board/at91sam9xeek/at91sam9xenf_defconfig 2011-11-18 08:13:09.000000000 +0000 ++++ b/board/at91sam9xeek/at91sam9xenf_defconfig 2012-07-25 21:26:05.627603826 +0100 +@@ -88,8 +88,8 @@ CONFIG_LOAD_UBOOT=y + CONFIG_IMG_ADDRESS="0x00020000" + CONFIG_SETTING_ADDRESS="0x01FE0000" + CONFIG_SETTING_SIZE="0x00001000" +-CONFIG_IMG_SIZE="0x00040000" +-CONFIG_JUMP_ADDR="0x23F00000" ++CONFIG_IMG_SIZE="0x00080000" ++CONFIG_JUMP_ADDR="0x21F00000" + CONFIG_GLBDRV_ADDR="0x23F00000" + # CONFIG_LONG_TEST is not set + CONFIG_DEBUG=y diff --git a/boot/at91bootstrap3/at91bootstrap3.mk b/boot/at91bootstrap3/at91bootstrap3.mk new file mode 100644 index 0000000000..4f74b1d982 --- /dev/null +++ b/boot/at91bootstrap3/at91bootstrap3.mk @@ -0,0 +1,68 @@ +################################################################################ +# +# at91bootstrap3 +# +################################################################################ + +AT91BOOTSTRAP3_VERSION = 3.2 +AT91BOOTSTRAP3_SITE = \ + ftp://www.at91.com/pub/at91bootstrap/AT91Bootstrap$(AT91BOOTSTRAP3_VERSION) +AT91BOOTSTRAP3_SOURCE = at91bootstrap_9n12.tar.gz + +AT91BOOTSTRAP3_INSTALL_IMAGES = YES +AT91BOOTSTRAP3_INSTALL_TARGET = NO + +AT91BOOTSTRAP3_DEFCONFIG = \ + $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG)) +AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE = \ + $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE)) +AT91BOOTSTRAP3_CUSTOM_PATCH_DIR = \ + $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_PATCH_DIR)) + +AT91BOOTSTRAP3_MAKE_OPT = CROSS_COMPILE=$(TARGET_CROSS) DESTDIR=$(BINARIES_DIR) + +ifneq ($(AT91BOOTSTRAP3_CUSTOM_PATCH_DIR),) +define AT91BOOTSTRAP3_APPLY_CUSTOM_PATCHES + support/scripts/apply-patches.sh $(@D) $(AT91BOOTSTRAP3_CUSTOM_PATCH_DIR) \ + at91bootstrap3-\*.patch +endef + +AT91BOOTSTRAP3_POST_PATCH_HOOKS += AT91BOOTSTRAP3_APPLY_CUSTOM_PATCHES +endif + +ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG),y) +AT91BOOTSTRAP3_SOURCE_CONFIG = \ + $(@D)/board/*/$(AT91BOOTSTRAP3_DEFCONFIG)_defconfig +else ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG),y) +AT91BOOTSTRAP3_SOURCE_CONFIG = $(AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE) +endif + +define AT91BOOTSTRAP3_CONFIGURE_CMDS + cp $(AT91BOOTSTRAP3_SOURCE_CONFIG) $(@D)/.config + $(SED) 's/image.bin/uImage/' $(@D)/.config +endef + +define AT91BOOTSTRAP3_BUILD_CMDS + $(MAKE) $(AT91BOOTSTRAP3_MAKE_OPT) -C $(@D) boot +endef + +define AT91BOOTSTRAP3_INSTALL_IMAGES_CMDS + $(MAKE) $(AT91BOOTSTRAP3_MAKE_OPT) -C $(@D) bootstrap +endef + +$(eval $(generic-package)) + +# Checks to give errors that the user can understand +ifeq ($(filter source,$(MAKECMDGOALS)),) +ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG),y) +ifeq ($(AT91BOOTSTRAP3_DEFCONFIG),) +$(error No at91bootstrap3 defconfig name specified, check your BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG setting) +endif +endif + +ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG),y) +ifeq ($(AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE),) +$(error No at91bootstrap3 configuration file specified, check your BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE setting) +endif +endif +endif diff --git a/boot/at91dataflashboot/Config.in b/boot/at91dataflashboot/Config.in index 25b9723c85..80b57a4ad0 100644 --- a/boot/at91dataflashboot/Config.in +++ b/boot/at91dataflashboot/Config.in @@ -1,25 +1,3 @@ -menuconfig BR2_TARGET_DATAFLASHBOOT - depends on BR2_arm - bool "AT91 DataFlashBoot" - -if BR2_TARGET_DATAFLASHBOOT - -choice - prompt "Target Architecture" - default BR2_TARGET_DATAFLASHBOOT_AT91RM9200 - help - Select Chip for which Dataflash boot should be built - Currently only AT91RM9200 Supported - -config BR2_TARGET_DATAFLASHBOOT_AT91RM9200 - bool "AT91RM9200" - -config BR2_TARGET_DATAFLASHBOOT_AT91SAM9261 - bool "AT91SAM9261" - -config BR2_TARGET_DATAFLASHBOOT_AT91SAM9261S - bool "AT91SAM9261S" - -endchoice - -endif # BR2_TARGET_DATAFLASHBOOT +config BR2_TARGET_AT91DATAFLASHBOOT + depends on BR2_arm926t + bool "AT91 DataFlashBoot" diff --git a/boot/at91dataflashboot/at91dataflashboot.mk b/boot/at91dataflashboot/at91dataflashboot.mk index 32591f79f3..2c2b4d9ca7 100644 --- a/boot/at91dataflashboot/at91dataflashboot.mk +++ b/boot/at91dataflashboot/at91dataflashboot.mk @@ -1,46 +1,22 @@ -############################################################# +################################################################################ # -# DataFlashBoot +# at91dataflashboot # -############################################################# -DATAFLASHBOOT_VERSION:=1.05 -DATAFLASHBOOT_NAME:=DataflashBoot-$(DATAFLASHBOOT_VERSION) -DATAFLASHBOOT_SITE:=ftp://www.at91.com/pub/buildroot/ -DATAFLASHBOOT_SOURCE:=$(DATAFLASHBOOT_NAME).tar.bz2 -DATAFLASHBOOT_DIR:=$(BUILD_DIR)/at91dataflashboot-$(DATAFLASHBOOT_VERSION) -DATAFLASHBOOT_BINARY:=$(DATAFLASHBOOT_NAME).bin +################################################################################ -$(DL_DIR)/$(DATAFLASHBOOT_SOURCE): - $(call DOWNLOAD,$(DATAFLASHBOOT_SITE),$(DATAFLASHBOOT_SOURCE)) +AT91DATAFLASHBOOT_VERSION = 1.05 +AT91DATAFLASHBOOT_SOURCE = DataflashBoot-$(AT91DATAFLASHBOOT_VERSION).tar.bz2 +AT91DATAFLASHBOOT_SITE = ftp://www.at91.com/pub/buildroot/ -$(DATAFLASHBOOT_DIR)/.unpacked: $(DL_DIR)/$(DATAFLASHBOOT_SOURCE) - mkdir -p $(@D) - $(BZCAT) $(DL_DIR)/$(DATAFLASHBOOT_SOURCE) | tar $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) - - touch $@ +AT91DATAFLASHBOOT_INSTALL_TARGET = NO +AT91DATAFLASHBOOT_INSTALL_IMAGES = YES -$(DATAFLASHBOOT_DIR)/.patched: $(DATAFLASHBOOT_DIR)/.unpacked - toolchain/patch-kernel.sh $(@D) boot/at91dataflashboot \ - at91dataflashboot-$(DATAFLASHBOOT_VERSION)-\*.patch - touch $@ +define AT91DATAFLASHBOOT_BUILD_CMDS + make -C $(@D) CROSS_COMPILE=$(TARGET_CROSS) +endef -$(DATAFLASHBOOT_DIR)/$(DATAFLASHBOOT_BINARY): $(DATAFLASHBOOT_DIR)/.patched - ls $(DATAFLASHBOOT_DIR)/.unpacked - make -C $(DATAFLASHBOOT_DIR) CROSS_COMPILE=$(TARGET_CROSS) +define AT91DATAFLASHBOOT_INSTALL_IMAGES_CMDS + cp $(@D)/DataflashBoot-$(AT91DATAFLASHBOOT_VERSION).bin $(BINARIES_DIR) +endef -dataflashboot-clean: - make -C $(DATAFLASHBOOT_DIR) clean - -dataflashboot-dirclean: - rm -rf $(DATAFLASHBOOT_DIR) - -dataflash: $(DATAFLASHBOOT_DIR)/$(DATAFLASHBOOT_BINARY) - cp $(DATAFLASHBOOT_DIR)/$(DATAFLASHBOOT_BINARY) $(BINARIES_DIR) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_TARGET_DATAFLASHBOOT),y) -TARGETS+=dataflash -endif +$(eval $(generic-package)) diff --git a/boot/barebox/Config.in b/boot/barebox/Config.in index a821c45c00..84db6ae73e 100644 --- a/boot/barebox/Config.in +++ b/boot/barebox/Config.in @@ -1,4 +1,4 @@ -menuconfig BR2_TARGET_BAREBOX +config BR2_TARGET_BAREBOX bool "Barebox" help The Barebox bootloader, formerly known as U-Boot v2. @@ -6,15 +6,113 @@ menuconfig BR2_TARGET_BAREBOX http://www.barebox.org if BR2_TARGET_BAREBOX +choice + prompt "version" + help + Select the specific Barebox version you want to use + +config BR2_TARGET_BAREBOX_LATEST_VERSION + bool "2013.10.1" + +config BR2_TARGET_BAREBOX_CUSTOM_VERSION + bool "Custom version" + help + This option allows to use a specific official versions + +config BR2_TARGET_BAREBOX_CUSTOM_TARBALL + bool "Custom tarball" + +config BR2_TARGET_BAREBOX_CUSTOM_GIT + bool "Custom Git repository" + +endchoice + +config BR2_TARGET_BAREBOX_CUSTOM_VERSION_VALUE + string "Barebox version" + depends on BR2_TARGET_BAREBOX_CUSTOM_VERSION + +if BR2_TARGET_BAREBOX_CUSTOM_TARBALL + +config BR2_TARGET_BAREBOX_CUSTOM_TARBALL_LOCATION + string "URL of custom Barebox tarball" + +endif + +config BR2_TARGET_BAREBOX_VERSION + string + default "2013.10.1" if BR2_TARGET_BAREBOX_LATEST_VERSION + default BR2_TARGET_BAREBOX_CUSTOM_VERSION_VALUE if BR2_TARGET_BAREBOX_CUSTOM_VERSION + default "custom" if BR2_TARGET_BAREBOX_CUSTOM_TARBALL + default BR2_TARGET_BAREBOX_CUSTOM_GIT_VERSION if BR2_TARGET_BAREBOX_CUSTOM_GIT + +config BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR + string "custom patch dir" + help + If your board requires custom patches, add the path to the + directory containing the patches here. The patches must be + named barebox--.patch. + + Most users may leave this empty + +if BR2_TARGET_BAREBOX_CUSTOM_GIT + +config BR2_TARGET_BAREBOX_CUSTOM_GIT_REPO_URL + string "URL of custom Git repository" + +config BR2_TARGET_BAREBOX_CUSTOM_GIT_VERSION + string "Custom Git version" + +endif + + +choice + prompt "Barebox configuration" + default BR2_TARGET_BAREBOX_USE_DEFCONFIG + +config BR2_TARGET_BAREBOX_USE_DEFCONFIG + bool "Using a defconfig" + +config BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG + bool "Using a custom config file" + +endchoice + config BR2_TARGET_BAREBOX_BOARD_DEFCONFIG string "board defconfig" + depends on BR2_TARGET_BAREBOX_USE_DEFCONFIG help Name of the board for which Barebox should be built, without the _defconfig suffix. + +config BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE + string "Configuration file path" + depends on BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG + help + Path to the barebox configuration file + config BR2_TARGET_BAREBOX_BAREBOXENV bool "bareboxenv tool in target" help Install bareboxenv tool in target. +config BR2_TARGET_BAREBOX_CUSTOM_ENV + bool "Generate an environment image" + help + Generate a custom environment image. This environment will + contain the variables and scripts to be used at boot by + barebox. + +config BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH + string "Environment path" + depends on BR2_TARGET_BAREBOX_CUSTOM_ENV + help + Path to the directory containing the custom barebox + environment. Depending on your setup, it will probably be + based on either the content of the defaultenv or + defaultenv-2 directories in the barebox source code, plus + the additions needed. The output will be an image in the + barebox devfs format, stored in the images directory, with + the same name as the directory name given here. + endif diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk index 09deb5cd29..9324c25c8f 100644 --- a/boot/barebox/barebox.mk +++ b/boot/barebox/barebox.mk @@ -1,15 +1,42 @@ -############################################################# +################################################################################ # -# Barebox +# barebox # -############################################################# +################################################################################ -BAREBOX_VERSION:=2011.01.0 -BAREBOX_SOURCE:=barebox-$(BAREBOX_VERSION).tar.bz2 -BAREBOX_SITE:=http://www.barebox.org/download/ -BAREBOX_DIR:=$(BUILD_DIR)/barebox-$(BAREBOX_VERSION) -BAREBOX_CAT:=$(BZCAT) -BAREBOX_BOARD_DEFCONFIG:=$(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG)) +BAREBOX_VERSION = $(call qstrip,$(BR2_TARGET_BAREBOX_VERSION)) + +ifeq ($(BAREBOX_VERSION),custom) +# Handle custom Barebox tarballs as specified by the configuration +BAREBOX_TARBALL = $(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_TARBALL_LOCATION)) +BAREBOX_SITE = $(patsubst %/,%,$(dir $(BAREBOX_TARBALL))) +BAREBOX_SOURCE = $(notdir $(BAREBOX_TARBALL)) +else ifeq ($(BR2_TARGET_BAREBOX_CUSTOM_GIT),y) +BAREBOX_SITE = $(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_GIT_REPO_URL)) +BAREBOX_SITE_METHOD = git +else +# Handle stable official Barebox versions +BAREBOX_SOURCE = barebox-$(BAREBOX_VERSION).tar.bz2 +BAREBOX_SITE = http://www.barebox.org/download/ +endif + +BAREBOX_DEPENDENCIES = host-lzop +BAREBOX_LICENSE = GPLv2 with exceptions +BAREBOX_LICENSE_FILES = COPYING + +ifneq ($(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR)),) +define BAREBOX_APPLY_CUSTOM_PATCHES + support/scripts/apply-patches.sh $(@D) $(BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR) \ + barebox-$(BAREBOX_VERSION)-\*.patch +endef + +BAREBOX_POST_PATCH_HOOKS += BAREBOX_APPLY_CUSTOM_PATCHES +endif + +BAREBOX_INSTALL_IMAGES = YES +ifneq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y) +BAREBOX_INSTALL_TARGET = NO +endif ifeq ($(KERNEL_ARCH),i386) BAREBOX_ARCH=x86 @@ -21,50 +48,85 @@ endif BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" -$(DL_DIR)/$(BAREBOX_SOURCE): - $(call DOWNLOAD,$(BAREBOX_SITE),$(BAREBOX_SOURCE)) -$(BAREBOX_DIR)/.unpacked: $(DL_DIR)/$(BAREBOX_SOURCE) - mkdir -p $(@D) - $(INFLATE$(suffix $(BAREBOX_SOURCE))) $(DL_DIR)/$(BAREBOX_SOURCE) \ - | tar $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) - - touch $@ +ifeq ($(BR2_TARGET_BAREBOX_USE_DEFCONFIG),y) +BAREBOX_SOURCE_CONFIG = $(@D)/arch/$(BAREBOX_ARCH)/configs/$(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))_defconfig +else ifeq ($(BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG),y) +BAREBOX_SOURCE_CONFIG = $(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE) +endif + +define BAREBOX_CONFIGURE_CMDS + cp $(BAREBOX_SOURCE_CONFIG) $(@D)/arch/$(BAREBOX_ARCH)/configs/buildroot_defconfig + $(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) buildroot_defconfig +endef -$(BAREBOX_DIR)/.patched: $(BAREBOX_DIR)/.unpacked - toolchain/patch-kernel.sh $(BAREBOX_DIR) boot/barebox \ - barebox-$(BAREBOX_VERSION)-\*.patch \ - barebox-$(BAREBOX_VERSION)-\*.patch.$(ARCH) - touch $@ +ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y) +define BAREBOX_BUILD_BAREBOXENV_CMDS + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o $(@D)/bareboxenv \ + $(@D)/scripts/bareboxenv.c +endef +endif -$(BAREBOX_DIR)/.configured: $(BAREBOX_DIR)/.patched - $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(BAREBOX_DIR) $(BAREBOX_BOARD_DEFCONFIG)_defconfig - touch $@ +ifeq ($(BR2_TARGET_BAREBOX_CUSTOM_ENV),y) +BAREBOX_ENV_NAME = $(notdir $(call qstrip, $(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH))) +define BAREBOX_BUILD_CUSTOM_ENV + $(@D)/scripts/bareboxenv -s \ + $(call qstrip, $(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)) \ + $(@D)/$(BAREBOX_ENV_NAME) +endef +define BAREBOX_INSTALL_CUSTOM_ENV + cp $(@D)/$(BAREBOX_ENV_NAME) $(BINARIES_DIR) +endef +endif -$(BAREBOX_DIR)/.built: $(BAREBOX_DIR)/.configured - $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(BAREBOX_DIR) - touch $@ +define BAREBOX_BUILD_CMDS + $(BAREBOX_BUILD_BAREBOXENV_CMDS) + $(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) + $(BAREBOX_BUILD_CUSTOM_ENV) +endef -$(BAREBOX_DIR)/.installed: $(BAREBOX_DIR)/.built - cp $(BAREBOX_DIR)/barebox.bin $(BINARIES_DIR) - touch $@ +define BAREBOX_INSTALL_IMAGES_CMDS + if test -h $(@D)/barebox-flash-image ; then \ + cp -L $(@D)/barebox-flash-image $(BINARIES_DIR)/barebox.bin ; \ + else \ + cp $(@D)/barebox.bin $(BINARIES_DIR);\ + fi + $(BAREBOX_INSTALL_CUSTOM_ENV) +endef -# bareboxenv for the target -$(TARGET_DIR)/usr/bin/bareboxenv: $(BAREBOX_DIR)/.configured - mkdir -p $(@D) - $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o $@ \ - $(BAREBOX_DIR)/scripts/bareboxenv.c +ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y) +define BAREBOX_INSTALL_TARGET_CMDS + cp $(@D)/bareboxenv $(TARGET_DIR)/usr/bin +endef +endif -barebox: $(BAREBOX_DIR)/.installed \ - $(if $(BR2_TARGET_BAREBOX_BAREBOXENV),$(TARGET_DIR)/usr/bin/bareboxenv) +$(eval $(generic-package)) ifeq ($(BR2_TARGET_BAREBOX),y) -TARGETS+=barebox - # we NEED a board defconfig file unless we're at make source ifeq ($(filter source,$(MAKECMDGOALS)),) -ifeq ($(BAREBOX_BOARD_DEFCONFIG),) -$(error No Barebox defconfig file. Check your BR2_TARGET_BAREBOX_BOARD_DEFCONFIG setting) +ifeq ($(BAREBOX_SOURCE_CONFIG),) +$(error No Barebox config file. Check your BR2_TARGET_BAREBOX_BOARD_DEFCONFIG or BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE settings) endif endif +barebox-menuconfig barebox-xconfig barebox-gconfig barebox-nconfig: barebox-configure + $(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(BAREBOX_DIR) \ + $(subst barebox-,,$@) + rm -f $(BAREBOX_DIR)/.stamp_{built,target_installed,images_installed} + +barebox-savedefconfig: barebox-configure + $(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(BAREBOX_DIR) \ + $(subst barebox-,,$@) + +ifeq ($(BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG),y) +barebox-update-config: barebox-configure $(BAREBOX_DIR)/.config + cp -f $(BAREBOX_DIR)/.config $(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE) + +barebox-update-defconfig: barebox-savedefconfig + cp -f $(BAREBOX_DIR)/defconfig $(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE) +else +barebox-update-config: ; +barebox-update-defconfig: ; +endif endif diff --git a/boot/boot-wrapper-aarch64/Config.in b/boot/boot-wrapper-aarch64/Config.in new file mode 100644 index 0000000000..6546862964 --- /dev/null +++ b/boot/boot-wrapper-aarch64/Config.in @@ -0,0 +1,31 @@ +config BR2_TARGET_BOOT_WRAPPER_AARCH64 + bool "boot-wrapper-aarch64" + depends on BR2_aarch64 + depends on BR2_LINUX_KERNEL + help + The boot-wrapper-aarch64 is a small bootloader that makes it + possible to start an Aarch64 kernel inside the available + software simulators for the Aarch64 architecture. + + git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/boot-wrapper-aarch64.git + +if BR2_TARGET_BOOT_WRAPPER_AARCH64 + +config BR2_TARGET_BOOT_WRAPPER_AARCH64_DTS + string "Device Tree Source name" + default "" + help + Name of the Device Tree Source file to use to generate the + Device Tree Blob that will be embedded in the image + generated by the boot wrapper. Valid names are the .dts + files from arch/arm64/boot/dts/ in the kernel source + tree. The name must be specified without the .dts suffix. + +config BR2_TARGET_BOOT_WRAPPER_AARCH64_BOOTARGS + string "Kernel bootargs" + default "" + help + Kernel bootargs to embed inside the image generated by the + boot wrapper. + +endif diff --git a/boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk b/boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk new file mode 100644 index 0000000000..d9ddf4877f --- /dev/null +++ b/boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# boot-wrapper-aarch64 +# +################################################################################ + +BOOT_WRAPPER_AARCH64_VERSION = 26b62f586020fd998c6efd43db657eaafeec14da +BOOT_WRAPPER_AARCH64_SITE = git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/boot-wrapper-aarch64.git +BOOT_WRAPPER_AARCH64_LICENSE = BSD3c +BOOT_WRAPPER_AARCH64_LICENSE_FILES = LICENSE.txt +BOOT_WRAPPER_AARCH64_DEPENDENCIES = linux +BOOT_WRAPPER_AARCH64_INSTALL_IMAGES = YES + +BOOT_WRAPPER_AARCH64_DTS = $(call qstrip,$(BR2_TARGET_BOOT_WRAPPER_AARCH64_DTS)) + +define BOOT_WRAPPER_AARCH64_BUILD_CMDS + $(MAKE) \ + KERNEL=$(BINARIES_DIR)/Image \ + DTC=$(LINUX_DIR)/scripts/dtc/dtc \ + FDT_SRC=$(LINUX_DIR)/arch/arm64/boot/dts/$(BOOT_WRAPPER_AARCH64_DTS).dts \ + CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" \ + BOOTARGS='$(BR2_TARGET_BOOT_WRAPPER_AARCH64_BOOTARGS)' -C $(@D) +endef + +define BOOT_WRAPPER_AARCH64_INSTALL_IMAGES_CMDS + cp $(@D)/linux-system.axf $(BINARIES_DIR) +endef + +$(eval $(generic-package)) diff --git a/boot/common.mk b/boot/common.mk index dc0bfb4966..3021e51949 100644 --- a/boot/common.mk +++ b/boot/common.mk @@ -1 +1 @@ -include boot/*/*.mk \ No newline at end of file +include $(sort $(wildcard boot/*/*.mk)) diff --git a/boot/grub/Config.in b/boot/grub/Config.in index bc7a73e73d..ec48d178c1 100644 --- a/boot/grub/Config.in +++ b/boot/grub/Config.in @@ -9,7 +9,7 @@ config BR2_TARGET_GRUB_SPLASH depends on BR2_TARGET_GRUB help Add support for splashimage. - + A splashimage is a 14-color indexed .xpm picture which is displayed as background for the grub menu. diff --git a/boot/grub/grub.400-nic_update2.patch b/boot/grub/grub.400-nic_update2.patch new file mode 100644 index 0000000000..064c953f09 --- /dev/null +++ b/boot/grub/grub.400-nic_update2.patch @@ -0,0 +1,49480 @@ +Submitted By: Jim Gifford (patches at jg555 dot com) +Date: 2005-08-31 +Initial Package Version: 0.97 +Origin: OpenSolaris, Joe Ciccone, Jim Gifford +Upstream Status: N/A +Description: Adds support for Forcedeth and other NIC's + Fixes for GCC 4.x + Removal of bad network drivers + +diff -Naur grub-0.97.orig/configure grub-0.97/configure +--- grub-0.97.orig/configure 2005-05-08 02:48:12.000000000 +0000 ++++ grub-0.97/configure 2005-09-01 00:15:48.000000000 +0000 +@@ -872,47 +872,32 @@ + --disable-packet-retransmission + turn off packet retransmission + --enable-pci-direct access PCI directly instead of using BIOS +- --enable-3c509 enable 3Com509 driver +- --enable-3c529 enable 3Com529 driver + --enable-3c595 enable 3Com595 driver + --enable-3c90x enable 3Com90x driver +- --enable-cs89x0 enable CS89x0 driver + --enable-davicom enable Davicom driver +- --enable-depca enable DEPCA and EtherWORKS driver +- --enable-eepro enable Etherexpress Pro/10 driver ++ --enable-e1000 enable Etherexpress Pro/1000 driver + --enable-eepro100 enable Etherexpress Pro/100 driver + --enable-epic100 enable SMC 83c170 EPIC/100 driver +- --enable-3c507 enable 3Com507 driver +- --enable-exos205 enable EXOS205 driver +- --enable-ni5210 enable Racal-Interlan NI5210 driver +- --enable-lance enable Lance PCI PCNet/32 driver +- --enable-ne2100 enable Novell NE2100 driver +- --enable-ni6510 enable Racal-Interlan NI6510 driver ++ --enable-forcedeth enable Nvidia Geforce driver + --enable-natsemi enable NatSemi DP8381x driver +- --enable-ni5010 enable Racal-Interlan NI5010 driver +- --enable-3c503 enable 3Com503 driver +- --enable-ne enable NE1000/2000 ISA driver ++ --enable-ns83820 enable NS83820 driver + --enable-ns8390 enable NE2000 PCI driver +- --enable-wd enable WD8003/8013, SMC8216/8416 driver +- --enable-otulip enable old Tulip driver ++ --enable-pcnet32 enable AMD Lance/PCI PCNet/32 driver ++ --enable-pnic enable Bochs Pseudo Nic driver + --enable-rtl8139 enable Realtek 8139 driver ++ --enable-r8169 enable Realtek 8169 driver + --enable-sis900 enable SIS 900 and SIS 7016 driver +- --enable-sk-g16 enable Schneider and Koch G16 driver +- --enable-smc9000 enable SMC9000 driver +- --enable-tiara enable Tiara driver ++ --enable-tg3 enable Broadcom Tigon3 driver + --enable-tulip enable Tulip driver ++ --enable-tlan enable TI ThunderLAN driver ++ --enable-undi enable PXE UNDI driver + --enable-via-rhine enable Rhine-I/II driver +- --enable-w89c840 enable Winbond W89c840, Compex RL100-ATX driver +- --enable-3c503-shmem use 3c503 shared memory mode +- --enable-3c503-aui use AUI by default on 3c503 cards ++ --enable-w89c840 enable Winbond W89c840 driver + --enable-compex-rl2000-fix + specify this if you have a Compex RL2000 PCI +- --enable-smc9000-scan=LIST +- probe for SMC9000 I/O addresses using LIST + --enable-ne-scan=LIST probe for NE base address using LIST + --enable-wd-default-mem=MEM + set the default memory location for WD/SMC +- --enable-cs-scan=LIST probe for CS89x0 base address using LIST + --enable-diskless enable diskless support + --disable-hercules disable hercules terminal support + --disable-serial disable serial terminal support +@@ -5559,7 +5544,7 @@ + + fi; + if test "x$enable_packet_retransmission" != xno; then +- NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCONGESTED=1" ++ NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCONGESTED=1 -DCONFIG_PCI" + fi + + # Check whether --enable-pci-direct or --disable-pci-direct was given. +@@ -5571,26 +5556,6 @@ + NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCONFIG_PCI_DIRECT=1" + fi + +-# Check whether --enable-3c509 or --disable-3c509 was given. +-if test "${enable_3c509+set}" = set; then +- enableval="$enable_3c509" +- +-fi; +-if test "x$enable_3c509" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C509" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c509.o" +-fi +- +-# Check whether --enable-3c529 or --disable-3c529 was given. +-if test "${enable_3c529+set}" = set; then +- enableval="$enable_3c529" +- +-fi; +-if test "x$enable_3c529" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C529=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c529.o" +-fi +- + # Check whether --enable-3c595 or --disable-3c595 was given. + if test "${enable_3c595+set}" = set; then + enableval="$enable_3c595" +@@ -5611,16 +5576,6 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c90x.o" + fi + +-# Check whether --enable-cs89x0 or --disable-cs89x0 was given. +-if test "${enable_cs89x0+set}" = set; then +- enableval="$enable_cs89x0" +- +-fi; +-if test "x$enable_cs89x0" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_CS89X0=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS cs89x0.o" +-fi +- + # Check whether --enable-davicom or --disable-davicom was given. + if test "${enable_davicom+set}" = set; then + enableval="$enable_davicom" +@@ -5631,24 +5586,14 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS davicom.o" + fi + +-# Check whether --enable-depca or --disable-depca was given. +-if test "${enable_depca+set}" = set; then +- enableval="$enable_depca" ++# Check whether --enable-e1000 or --disable-e1000 was given. ++if test "${enable_e1000+set}" = set; then ++ enableval="$enable_e1000" + + fi; +-if test "x$enable_depca" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_DEPCA=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS depca.o" +-fi +- +-# Check whether --enable-eepro or --disable-eepro was given. +-if test "${enable_eepro+set}" = set; then +- enableval="$enable_eepro" +- +-fi; +-if test "x$enable_eepro" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_EEPRO=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS eepro.o" ++if test "x$enable_e1000" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_E1000=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS e1000.o" + fi + + # Check whether --enable-eepro100 or --disable-eepro100 was given. +@@ -5671,64 +5616,14 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS epic100.o" + fi + +-# Check whether --enable-3c507 or --disable-3c507 was given. +-if test "${enable_3c507+set}" = set; then +- enableval="$enable_3c507" +- +-fi; +-if test "x$enable_3c507" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C507=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c507.o" +-fi +- +-# Check whether --enable-exos205 or --disable-exos205 was given. +-if test "${enable_exos205+set}" = set; then +- enableval="$enable_exos205" +- +-fi; +-if test "x$enable_exos205" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_EXOS205=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS exos205.o" +-fi +- +-# Check whether --enable-ni5210 or --disable-ni5210 was given. +-if test "${enable_ni5210+set}" = set; then +- enableval="$enable_ni5210" +- +-fi; +-if test "x$enable_ni5210" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NI5210=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ni5210.o" +-fi +- +-# Check whether --enable-lance or --disable-lance was given. +-if test "${enable_lance+set}" = set; then +- enableval="$enable_lance" +- +-fi; +-if test "x$enable_lance" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_LANCE=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS lance.o" +-fi +- +-# Check whether --enable-ne2100 or --disable-ne2100 was given. +-if test "${enable_ne2100+set}" = set; then +- enableval="$enable_ne2100" +- +-fi; +-if test "x$enable_ne2100" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NE2100=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ne2100.o" +-fi +- +-# Check whether --enable-ni6510 or --disable-ni6510 was given. +-if test "${enable_ni6510+set}" = set; then +- enableval="$enable_ni6510" ++# Check whether --enable-forcedeth or --disable-forcedeth was given. ++if test "${enable_forcedeth+set}" = set; then ++ enableval="$enable_forcedeth" + + fi; +-if test "x$enable_ni6510" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NI6510=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ni6510.o" ++if test "x$enable_forcedeth" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_FORCEDETH=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS forcedeth.o" + fi + + # Check whether --enable-natsemi or --disable-natsemi was given. +@@ -5741,34 +5636,14 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS natsemi.o" + fi + +-# Check whether --enable-ni5010 or --disable-ni5010 was given. +-if test "${enable_ni5010+set}" = set; then +- enableval="$enable_ni5010" ++# Check whether --enable-ns83820 or --disable-ns83820 was given. ++if test "${enable_ns83820+set}" = set; then ++ enableval="$enable_ns83820" + + fi; +-if test "x$enable_ni5010" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NI5010=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ni5010.o" +-fi +- +-# Check whether --enable-3c503 or --disable-3c503 was given. +-if test "${enable_3c503+set}" = set; then +- enableval="$enable_3c503" +- +-fi; +-if test "x$enable_3c503" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C503=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c503.o" +-fi +- +-# Check whether --enable-ne or --disable-ne was given. +-if test "${enable_ne+set}" = set; then +- enableval="$enable_ne" +- +-fi; +-if test "x$enable_ne" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NE=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ne.o" ++if test "x$enable_ns83820" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NS83820=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS ns83820.o" + fi + + # Check whether --enable-ns8390 or --disable-ns8390 was given. +@@ -5781,24 +5656,24 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS ns8390.o" + fi + +-# Check whether --enable-wd or --disable-wd was given. +-if test "${enable_wd+set}" = set; then +- enableval="$enable_wd" ++# Check whether --enable-pcnet32 or --disable-pcnet32 was given. ++if test "${enable_pcnet32+set}" = set; then ++ enableval="$enable_pcnet32" + + fi; +-if test "x$enable_wd" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_WD=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS wd.o" ++if test "x$enable_pcnet32" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_PCNET32=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS pcnet32.o" + fi + +-# Check whether --enable-otulip or --disable-otulip was given. +-if test "${enable_otulip+set}" = set; then +- enableval="$enable_otulip" ++# Check whether --enable-pnic or --disable-pnic was given. ++if test "${enable_pnic+set}" = set; then ++ enableval="$enable_pnic" + + fi; +-if test "x$enable_otulip" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_OTULIP=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS otulip.o" ++if test "x$enable_pnic" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_PNIC=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS pnic.o" + fi + + # Check whether --enable-rtl8139 or --disable-rtl8139 was given. +@@ -5811,6 +5686,16 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS rtl8139.o" + fi + ++# Check whether --enable-r8169 or --disable-r8169 was given. ++if test "${enable_r8169+set}" = set; then ++ enableval="$enable_r8169" ++ ++fi; ++if test "x$enable_r8169" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_R8169=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS r8169.o" ++fi ++ + # Check whether --enable-sis900 or --disable-sis900 was given. + if test "${enable_sis900+set}" = set; then + enableval="$enable_sis900" +@@ -5821,34 +5706,14 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS sis900.o" + fi + +-# Check whether --enable-sk-g16 or --disable-sk-g16 was given. +-if test "${enable_sk_g16+set}" = set; then +- enableval="$enable_sk_g16" +- +-fi; +-if test "x$enable_sk_g16" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_SK_G16=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS sk_g16.o" +-fi +- +-# Check whether --enable-smc9000 or --disable-smc9000 was given. +-if test "${enable_smc9000+set}" = set; then +- enableval="$enable_smc9000" +- +-fi; +-if test "x$enable_smc9000" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_SMC9000=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS smc9000.o" +-fi +- +-# Check whether --enable-tiara or --disable-tiara was given. +-if test "${enable_tiara+set}" = set; then +- enableval="$enable_tiara" ++# Check whether --enable-tg3 or --disable-tg3 was given. ++if test "${enable_tg3+set}" = set; then ++ enableval="$enable_tg3" + + fi; +-if test "x$enable_tiara" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_TIARA=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS tiara.o" ++if test "x$enable_tg3" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_TG3=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS tg3.o" + fi + + # Check whether --enable-tulip or --disable-tulip was given. +@@ -5861,6 +5726,16 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS tulip.o" + fi + ++# Check whether --enable-tlan or --disable-tlan was given. ++if test "${enable_tlan+set}" = set; then ++ enableval="$enable_tlan" ++ ++fi; ++if test "x$enable_tlan" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_TLAN=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS tlan.o" ++fi ++ + # Check whether --enable-via-rhine or --disable-via-rhine was given. + if test "${enable_via_rhine+set}" = set; then + enableval="$enable_via_rhine" +@@ -5895,24 +5770,6 @@ + FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_TFTP=1" + fi + +-# Check whether --enable-3c503-shmem or --disable-3c503-shmem was given. +-if test "${enable_3c503_shmem+set}" = set; then +- enableval="$enable_3c503_shmem" +- +-fi; +-if test "x$enable_3c503_shmem" = xyes; then +- NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DT503_SHMEM=1" +-fi +- +-# Check whether --enable-3c503-aui or --disable-3c503-aui was given. +-if test "${enable_3c503_aui+set}" = set; then +- enableval="$enable_3c503_aui" +- +-fi; +-if test "x$enable_3c503_aui" = xyes; then +- NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DT503_AUI=1" +-fi +- + # Check whether --enable-compex-rl2000-fix or --disable-compex-rl2000-fix was given. + if test "${enable_compex_rl2000_fix+set}" = set; then + enableval="$enable_compex_rl2000_fix" +@@ -5922,12 +5779,6 @@ + NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCOMPEX_RL2000_FIX=1" + fi + +-# Check whether --enable-smc9000-scan or --disable-smc9000-scan was given. +-if test "${enable_smc9000_scan+set}" = set; then +- enableval="$enable_smc9000_scan" +- NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DSMC9000_SCAN=$enable_smc9000_scan" +-fi; +- + # Check whether --enable-ne-scan or --disable-ne-scan was given. + if test "${enable_ne_scan+set}" = set; then + enableval="$enable_ne_scan" +@@ -5944,12 +5795,6 @@ + NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DWD_DEFAULT_MEM=0xCC000" + fi; + +-# Check whether --enable-cs-scan or --disable-cs-scan was given. +-if test "${enable_cs_scan+set}" = set; then +- enableval="$enable_cs_scan" +- NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCS_SCAN=$enable_cs_scan" +-fi; +- + # Check whether --enable-diskless or --disable-diskless was given. + if test "${enable_diskless+set}" = set; then + enableval="$enable_diskless" +diff -Naur grub-0.97.orig/configure.ac grub-0.97/configure.ac +--- grub-0.97.orig/configure.ac 2005-05-08 02:36:03.000000000 +0000 ++++ grub-0.97/configure.ac 2005-09-01 00:16:05.000000000 +0000 +@@ -317,7 +317,7 @@ + [ --disable-packet-retransmission + turn off packet retransmission]) + if test "x$enable_packet_retransmission" != xno; then +- NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCONGESTED=1" ++ NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCONGESTED=1 -DCONFIG_PCI" + fi + + AC_ARG_ENABLE(pci-direct, +@@ -327,20 +327,6 @@ + fi + + dnl Device drivers. +-AC_ARG_ENABLE(3c509, +- [ --enable-3c509 enable 3Com509 driver]) +-if test "x$enable_3c509" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C509" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c509.o" +-fi +- +-AC_ARG_ENABLE(3c529, +- [ --enable-3c529 enable 3Com529 driver]) +-if test "x$enable_3c529" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C529=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c529.o" +-fi +- + AC_ARG_ENABLE(3c595, + [ --enable-3c595 enable 3Com595 driver]) + if test "x$enable_3c595" = xyes; then +@@ -355,13 +341,6 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c90x.o" + fi + +-AC_ARG_ENABLE(cs89x0, +- [ --enable-cs89x0 enable CS89x0 driver]) +-if test "x$enable_cs89x0" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_CS89X0=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS cs89x0.o" +-fi +- + AC_ARG_ENABLE(davicom, + [ --enable-davicom enable Davicom driver]) + if test "x$enable_davicom" = xyes; then +@@ -369,18 +348,11 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS davicom.o" + fi + +-AC_ARG_ENABLE(depca, +- [ --enable-depca enable DEPCA and EtherWORKS driver]) +-if test "x$enable_depca" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_DEPCA=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS depca.o" +-fi +- +-AC_ARG_ENABLE(eepro, +- [ --enable-eepro enable Etherexpress Pro/10 driver]) +-if test "x$enable_eepro" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_EEPRO=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS eepro.o" ++AC_ARG_ENABLE(e1000, ++ [ --enable-e1000 enable Etherexpress Pro/1000 driver]) ++if test "x$enable_e1000" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_E1000=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS e1000.o" + fi + + AC_ARG_ENABLE(eepro100, +@@ -397,46 +369,11 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS epic100.o" + fi + +-AC_ARG_ENABLE(3c507, +- [ --enable-3c507 enable 3Com507 driver]) +-if test "x$enable_3c507" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C507=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c507.o" +-fi +- +-AC_ARG_ENABLE(exos205, +- [ --enable-exos205 enable EXOS205 driver]) +-if test "x$enable_exos205" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_EXOS205=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS exos205.o" +-fi +- +-AC_ARG_ENABLE(ni5210, +- [ --enable-ni5210 enable Racal-Interlan NI5210 driver]) +-if test "x$enable_ni5210" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NI5210=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ni5210.o" +-fi +- +-AC_ARG_ENABLE(lance, +- [ --enable-lance enable Lance PCI PCNet/32 driver]) +-if test "x$enable_lance" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_LANCE=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS lance.o" +-fi +- +-AC_ARG_ENABLE(ne2100, +- [ --enable-ne2100 enable Novell NE2100 driver]) +-if test "x$enable_ne2100" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NE2100=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ne2100.o" +-fi +- +-AC_ARG_ENABLE(ni6510, +- [ --enable-ni6510 enable Racal-Interlan NI6510 driver]) +-if test "x$enable_ni6510" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NI6510=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ni6510.o" ++AC_ARG_ENABLE(forcedeth, ++ [ --enable-forcedeth enable Nvidia Geforce driver]) ++if test "x$enable_forcedeth" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_FORCEDETH=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS forcedeth.o" + fi + + AC_ARG_ENABLE(natsemi, +@@ -446,25 +383,11 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS natsemi.o" + fi + +-AC_ARG_ENABLE(ni5010, +- [ --enable-ni5010 enable Racal-Interlan NI5010 driver]) +-if test "x$enable_ni5010" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NI5010=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ni5010.o" +-fi +- +-AC_ARG_ENABLE(3c503, +- [ --enable-3c503 enable 3Com503 driver]) +-if test "x$enable_3c503" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C503=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c503.o" +-fi +- +-AC_ARG_ENABLE(ne, +- [ --enable-ne enable NE1000/2000 ISA driver]) +-if test "x$enable_ne" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NE=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ne.o" ++AC_ARG_ENABLE(ns83820, ++ [ --enable-ns83820 enable NS83820 driver]) ++if test "x$enable_ns83820" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NS83820=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS ns83820.o" + fi + + AC_ARG_ENABLE(ns8390, +@@ -474,18 +397,18 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS ns8390.o" + fi + +-AC_ARG_ENABLE(wd, +- [ --enable-wd enable WD8003/8013, SMC8216/8416 driver]) +-if test "x$enable_wd" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_WD=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS wd.o" ++AC_ARG_ENABLE(pcnet32, ++ [ --enable-pcnet32 enable AMD Lance/PCI PCNet/32 driver]) ++if test "x$enable_pcnet32" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_PCNET32=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS pcnet32.o" + fi + +-AC_ARG_ENABLE(otulip, +- [ --enable-otulip enable old Tulip driver]) +-if test "x$enable_otulip" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_OTULIP=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS otulip.o" ++AC_ARG_ENABLE(pnic, ++ [ --enable-pnic enable Bochs Pseudo Nic driver]) ++if test "x$enable_pnic" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_PNIC=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS pnic.o" + fi + + AC_ARG_ENABLE(rtl8139, +@@ -495,6 +418,13 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS rtl8139.o" + fi + ++AC_ARG_ENABLE(r8169, ++ [ --enable-r8169 enable Realtek 8169 driver]) ++if test "x$enable_r8169" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_R8169=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS r8169.o" ++fi ++ + AC_ARG_ENABLE(sis900, + [ --enable-sis900 enable SIS 900 and SIS 7016 driver]) + if test "x$enable_sis900" = xyes; then +@@ -502,25 +432,11 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS sis900.o" + fi + +-AC_ARG_ENABLE(sk-g16, +- [ --enable-sk-g16 enable Schneider and Koch G16 driver]) +-if test "x$enable_sk_g16" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_SK_G16=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS sk_g16.o" +-fi +- +-AC_ARG_ENABLE(smc9000, +- [ --enable-smc9000 enable SMC9000 driver]) +-if test "x$enable_smc9000" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_SMC9000=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS smc9000.o" +-fi +- +-AC_ARG_ENABLE(tiara, +- [ --enable-tiara enable Tiara driver]) +-if test "x$enable_tiara" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_TIARA=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS tiara.o" ++AC_ARG_ENABLE(tg3, ++ [ --enable-tg3 enable Broadcom Tigon3 driver]) ++if test "x$enable_tg3" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_TG3=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS tg3.o" + fi + + AC_ARG_ENABLE(tulip, +@@ -530,6 +446,13 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS tulip.o" + fi + ++AC_ARG_ENABLE(tlan, ++ [ --enable-tlan enable TI ThunderLAN driver]) ++if test "x$enable_tlan" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_TLAN=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS tlan.o" ++fi ++ + AC_ARG_ENABLE(via-rhine, + [ --enable-via-rhine enable Rhine-I/II driver]) + if test "x$enable_via_rhine" = xyes; then +@@ -538,7 +461,7 @@ + fi + + AC_ARG_ENABLE(w89c840, +- [ --enable-w89c840 enable Winbond W89c840, Compex RL100-ATX driver]) ++ [ --enable-w89c840 enable Winbond W89c840 driver]) + if test "x$enable_w89c840" = xyes; then + NET_CFLAGS="$NET_CFLAGS -DINCLUDE_W89C840=1" + NETBOOT_DRIVERS="$NETBOOT_DRIVERS w89c840.o" +@@ -550,19 +473,7 @@ + FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_TFTP=1" + fi + +-dnl Extra options. +-AC_ARG_ENABLE(3c503-shmem, +- [ --enable-3c503-shmem use 3c503 shared memory mode]) +-if test "x$enable_3c503_shmem" = xyes; then +- NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DT503_SHMEM=1" +-fi +- +-AC_ARG_ENABLE(3c503-aui, +- [ --enable-3c503-aui use AUI by default on 3c503 cards]) +-if test "x$enable_3c503_aui" = xyes; then +- NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DT503_AUI=1" +-fi +- ++dnl extra flag for ns8390.c + AC_ARG_ENABLE(compex-rl2000-fix, + [ --enable-compex-rl2000-fix + specify this if you have a Compex RL2000 PCI]) +@@ -570,11 +481,6 @@ + NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCOMPEX_RL2000_FIX=1" + fi + +-AC_ARG_ENABLE(smc9000-scan, +- [ --enable-smc9000-scan=LIST +- probe for SMC9000 I/O addresses using LIST], +- [NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DSMC9000_SCAN=$enable_smc9000_scan"]) +- + AC_ARG_ENABLE(ne-scan, + [ --enable-ne-scan=LIST probe for NE base address using LIST], + [NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DNE_SCAN=$enable_ne_scan"], +@@ -586,10 +492,6 @@ + [NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DWD_DEFAULT_MEM=$enable_wd_default_mem"], + [NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DWD_DEFAULT_MEM=0xCC000"]) + +-AC_ARG_ENABLE(cs-scan, +- [ --enable-cs-scan=LIST probe for CS89x0 base address using LIST], +- [NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCS_SCAN=$enable_cs_scan"]) +- + dnl Diskless + AC_ARG_ENABLE(diskless, + [ --enable-diskless enable diskless support]) +diff -Naur grub-0.97.orig/netboot/3c509.h grub-0.97/netboot/3c509.h +--- grub-0.97.orig/netboot/3c509.h 2003-07-09 11:45:37.000000000 +0000 ++++ grub-0.97/netboot/3c509.h 1970-01-01 00:00:00.000000000 +0000 +@@ -1,397 +0,0 @@ +-/* +- * Copyright (c) 1993 Herb Peyerl (hpeyerl@novatel.ca) All rights reserved. +- * +- * Redistribution and use in source and binary forms, with or without +- * modification, are permitted provided that the following conditions are +- * met: 1. Redistributions of source code must retain the above copyright +- * notice, this list of conditions and the following disclaimer. 2. The name +- * of the author may not be used to endorse or promote products derived from +- * this software withough specific prior written permission +- * +- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +- * +- * if_epreg.h,v 1.4 1994/11/13 10:12:37 gibbs Exp Modified by: +- * +- October 2, 1994 +- +- Modified by: Andres Vega Garcia +- +- INRIA - Sophia Antipolis, France +- e-mail: avega@sophia.inria.fr +- finger: avega@pax.inria.fr +- +- */ +- +-/* +- * Ethernet software status per interface. +- */ +-/* +- * Some global constants +- */ +- +-#define TX_INIT_RATE 16 +-#define TX_INIT_MAX_RATE 64 +-#define RX_INIT_LATENCY 64 +-#define RX_INIT_EARLY_THRESH 64 +-#define MIN_RX_EARLY_THRESHF 16 /* not less than ether_header */ +-#define MIN_RX_EARLY_THRESHL 4 +- +-#define EEPROMSIZE 0x40 +-#define MAX_EEPROMBUSY 1000 +-#define EP_LAST_TAG 0xd7 +-#define EP_MAX_BOARDS 16 +-#define EP_ID_PORT 0x100 +- +-/* +- * some macros to acces long named fields +- */ +-#define IS_BASE (eth_nic_base) +-#define BASE (eth_nic_base) +- +-/* +- * Commands to read/write EEPROM trough EEPROM command register (Window 0, +- * Offset 0xa) +- */ +-#define EEPROM_CMD_RD 0x0080 /* Read: Address required (5 bits) */ +-#define EEPROM_CMD_WR 0x0040 /* Write: Address required (5 bits) */ +-#define EEPROM_CMD_ERASE 0x00c0 /* Erase: Address required (5 bits) */ +-#define EEPROM_CMD_EWEN 0x0030 /* Erase/Write Enable: No data required */ +- +-#define EEPROM_BUSY (1<<15) +-#define EEPROM_TST_MODE (1<<14) +- +-/* +- * Some short functions, worth to let them be a macro +- */ +-#define is_eeprom_busy(b) (inw((b)+EP_W0_EEPROM_COMMAND)&EEPROM_BUSY) +-#define GO_WINDOW(x) outw(WINDOW_SELECT|(x), BASE+EP_COMMAND) +- +-/************************************************************************** +- * +- * These define the EEPROM data structure. They are used in the probe +- * function to verify the existance of the adapter after having sent +- * the ID_Sequence. +- * +- * There are others but only the ones we use are defined here. +- * +- **************************************************************************/ +- +-#define EEPROM_NODE_ADDR_0 0x0 /* Word */ +-#define EEPROM_NODE_ADDR_1 0x1 /* Word */ +-#define EEPROM_NODE_ADDR_2 0x2 /* Word */ +-#define EEPROM_PROD_ID 0x3 /* 0x9[0-f]50 */ +-#define EEPROM_MFG_ID 0x7 /* 0x6d50 */ +-#define EEPROM_ADDR_CFG 0x8 /* Base addr */ +-#define EEPROM_RESOURCE_CFG 0x9 /* IRQ. Bits 12-15 */ +- +-/************************************************************************** +- * +- * These are the registers for the 3Com 3c509 and their bit patterns when +- * applicable. They have been taken out the the "EtherLink III Parallel +- * Tasking EISA and ISA Technical Reference" "Beta Draft 10/30/92" manual +- * from 3com. +- * +- **************************************************************************/ +- +-#define EP_COMMAND 0x0e /* Write. BASE+0x0e is always a +- * command reg. */ +-#define EP_STATUS 0x0e /* Read. BASE+0x0e is always status +- * reg. */ +-#define EP_WINDOW 0x0f /* Read. BASE+0x0f is always window +- * reg. */ +-/* +- * Window 0 registers. Setup. +- */ +-/* Write */ +-#define EP_W0_EEPROM_DATA 0x0c +-#define EP_W0_EEPROM_COMMAND 0x0a +-#define EP_W0_RESOURCE_CFG 0x08 +-#define EP_W0_ADDRESS_CFG 0x06 +-#define EP_W0_CONFIG_CTRL 0x04 +-/* Read */ +-#define EP_W0_PRODUCT_ID 0x02 +-#define EP_W0_MFG_ID 0x00 +- +-/* +- * Window 1 registers. Operating Set. +- */ +-/* Write */ +-#define EP_W1_TX_PIO_WR_2 0x02 +-#define EP_W1_TX_PIO_WR_1 0x00 +-/* Read */ +-#define EP_W1_FREE_TX 0x0c +-#define EP_W1_TX_STATUS 0x0b /* byte */ +-#define EP_W1_TIMER 0x0a /* byte */ +-#define EP_W1_RX_STATUS 0x08 +-#define EP_W1_RX_PIO_RD_2 0x02 +-#define EP_W1_RX_PIO_RD_1 0x00 +- +-/* +- * Window 2 registers. Station Address Setup/Read +- */ +-/* Read/Write */ +-#define EP_W2_ADDR_5 0x05 +-#define EP_W2_ADDR_4 0x04 +-#define EP_W2_ADDR_3 0x03 +-#define EP_W2_ADDR_2 0x02 +-#define EP_W2_ADDR_1 0x01 +-#define EP_W2_ADDR_0 0x00 +- +-/* +- * Window 3 registers. FIFO Management. +- */ +-/* Read */ +-#define EP_W3_FREE_TX 0x0c +-#define EP_W3_FREE_RX 0x0a +- +-/* +- * Window 4 registers. Diagnostics. +- */ +-/* Read/Write */ +-#define EP_W4_MEDIA_TYPE 0x0a +-#define EP_W4_CTRLR_STATUS 0x08 +-#define EP_W4_NET_DIAG 0x06 +-#define EP_W4_FIFO_DIAG 0x04 +-#define EP_W4_HOST_DIAG 0x02 +-#define EP_W4_TX_DIAG 0x00 +- +-/* +- * Window 5 Registers. Results and Internal status. +- */ +-/* Read */ +-#define EP_W5_READ_0_MASK 0x0c +-#define EP_W5_INTR_MASK 0x0a +-#define EP_W5_RX_FILTER 0x08 +-#define EP_W5_RX_EARLY_THRESH 0x06 +-#define EP_W5_TX_AVAIL_THRESH 0x02 +-#define EP_W5_TX_START_THRESH 0x00 +- +-/* +- * Window 6 registers. Statistics. +- */ +-/* Read/Write */ +-#define TX_TOTAL_OK 0x0c +-#define RX_TOTAL_OK 0x0a +-#define TX_DEFERRALS 0x08 +-#define RX_FRAMES_OK 0x07 +-#define TX_FRAMES_OK 0x06 +-#define RX_OVERRUNS 0x05 +-#define TX_COLLISIONS 0x04 +-#define TX_AFTER_1_COLLISION 0x03 +-#define TX_AFTER_X_COLLISIONS 0x02 +-#define TX_NO_SQE 0x01 +-#define TX_CD_LOST 0x00 +- +-/**************************************** +- * +- * Register definitions. +- * +- ****************************************/ +- +-/* +- * Command register. All windows. +- * +- * 16 bit register. +- * 15-11: 5-bit code for command to be executed. +- * 10-0: 11-bit arg if any. For commands with no args; +- * this can be set to anything. +- */ +-#define GLOBAL_RESET (unsigned short) 0x0000 /* Wait at least 1ms +- * after issuing */ +-#define WINDOW_SELECT (unsigned short) (0x1<<11) +-#define START_TRANSCEIVER (unsigned short) (0x2<<11) /* Read ADDR_CFG reg to +- * determine whether +- * this is needed. If +- * so; wait 800 uSec +- * before using trans- +- * ceiver. */ +-#define RX_DISABLE (unsigned short) (0x3<<11) /* state disabled on +- * power-up */ +-#define RX_ENABLE (unsigned short) (0x4<<11) +-#define RX_RESET (unsigned short) (0x5<<11) +-#define RX_DISCARD_TOP_PACK (unsigned short) (0x8<<11) +-#define TX_ENABLE (unsigned short) (0x9<<11) +-#define TX_DISABLE (unsigned short) (0xa<<11) +-#define TX_RESET (unsigned short) (0xb<<11) +-#define REQ_INTR (unsigned short) (0xc<<11) +-#define SET_INTR_MASK (unsigned short) (0xe<<11) +-#define SET_RD_0_MASK (unsigned short) (0xf<<11) +-#define SET_RX_FILTER (unsigned short) (0x10<<11) +-#define FIL_INDIVIDUAL (unsigned short) (0x1) +-#define FIL_GROUP (unsigned short) (0x2) +-#define FIL_BRDCST (unsigned short) (0x4) +-#define FIL_ALL (unsigned short) (0x8) +-#define SET_RX_EARLY_THRESH (unsigned short) (0x11<<11) +-#define SET_TX_AVAIL_THRESH (unsigned short) (0x12<<11) +-#define SET_TX_START_THRESH (unsigned short) (0x13<<11) +-#define STATS_ENABLE (unsigned short) (0x15<<11) +-#define STATS_DISABLE (unsigned short) (0x16<<11) +-#define STOP_TRANSCEIVER (unsigned short) (0x17<<11) +-/* +- * The following C_* acknowledge the various interrupts. Some of them don't +- * do anything. See the manual. +- */ +-#define ACK_INTR (unsigned short) (0x6800) +-#define C_INTR_LATCH (unsigned short) (ACK_INTR|0x1) +-#define C_CARD_FAILURE (unsigned short) (ACK_INTR|0x2) +-#define C_TX_COMPLETE (unsigned short) (ACK_INTR|0x4) +-#define C_TX_AVAIL (unsigned short) (ACK_INTR|0x8) +-#define C_RX_COMPLETE (unsigned short) (ACK_INTR|0x10) +-#define C_RX_EARLY (unsigned short) (ACK_INTR|0x20) +-#define C_INT_RQD (unsigned short) (ACK_INTR|0x40) +-#define C_UPD_STATS (unsigned short) (ACK_INTR|0x80) +- +-/* +- * Status register. All windows. +- * +- * 15-13: Window number(0-7). +- * 12: Command_in_progress. +- * 11: reserved. +- * 10: reserved. +- * 9: reserved. +- * 8: reserved. +- * 7: Update Statistics. +- * 6: Interrupt Requested. +- * 5: RX Early. +- * 4: RX Complete. +- * 3: TX Available. +- * 2: TX Complete. +- * 1: Adapter Failure. +- * 0: Interrupt Latch. +- */ +-#define S_INTR_LATCH (unsigned short) (0x1) +-#define S_CARD_FAILURE (unsigned short) (0x2) +-#define S_TX_COMPLETE (unsigned short) (0x4) +-#define S_TX_AVAIL (unsigned short) (0x8) +-#define S_RX_COMPLETE (unsigned short) (0x10) +-#define S_RX_EARLY (unsigned short) (0x20) +-#define S_INT_RQD (unsigned short) (0x40) +-#define S_UPD_STATS (unsigned short) (0x80) +-#define S_5_INTS (S_CARD_FAILURE|S_TX_COMPLETE|\ +- S_TX_AVAIL|S_RX_COMPLETE|S_RX_EARLY) +-#define S_COMMAND_IN_PROGRESS (unsigned short) (0x1000) +- +-/* +- * FIFO Registers. +- * RX Status. Window 1/Port 08 +- * +- * 15: Incomplete or FIFO empty. +- * 14: 1: Error in RX Packet 0: Incomplete or no error. +- * 13-11: Type of error. +- * 1000 = Overrun. +- * 1011 = Run Packet Error. +- * 1100 = Alignment Error. +- * 1101 = CRC Error. +- * 1001 = Oversize Packet Error (>1514 bytes) +- * 0010 = Dribble Bits. +- * (all other error codes, no errors.) +- * +- * 10-0: RX Bytes (0-1514) +- */ +-#define ERR_RX_INCOMPLETE (unsigned short) (0x1<<15) +-#define ERR_RX (unsigned short) (0x1<<14) +-#define ERR_RX_OVERRUN (unsigned short) (0x8<<11) +-#define ERR_RX_RUN_PKT (unsigned short) (0xb<<11) +-#define ERR_RX_ALIGN (unsigned short) (0xc<<11) +-#define ERR_RX_CRC (unsigned short) (0xd<<11) +-#define ERR_RX_OVERSIZE (unsigned short) (0x9<<11) +-#define ERR_RX_DRIBBLE (unsigned short) (0x2<<11) +- +-/* +- * FIFO Registers. +- * TX Status. Window 1/Port 0B +- * +- * Reports the transmit status of a completed transmission. Writing this +- * register pops the transmit completion stack. +- * +- * Window 1/Port 0x0b. +- * +- * 7: Complete +- * 6: Interrupt on successful transmission requested. +- * 5: Jabber Error (TP Only, TX Reset required. ) +- * 4: Underrun (TX Reset required. ) +- * 3: Maximum Collisions. +- * 2: TX Status Overflow. +- * 1-0: Undefined. +- * +- */ +-#define TXS_COMPLETE 0x80 +-#define TXS_SUCCES_INTR_REQ 0x40 +-#define TXS_JABBER 0x20 +-#define TXS_UNDERRUN 0x10 +-#define TXS_MAX_COLLISION 0x8 +-#define TXS_STATUS_OVERFLOW 0x4 +- +-/* +- * Configuration control register. +- * Window 0/Port 04 +- */ +-/* Read */ +-#define IS_AUI (1<<13) +-#define IS_BNC (1<<12) +-#define IS_UTP (1<<9) +-/* Write */ +-#define ENABLE_DRQ_IRQ 0x0001 +-#define W0_P4_CMD_RESET_ADAPTER 0x4 +-#define W0_P4_CMD_ENABLE_ADAPTER 0x1 +-/* +- * Media type and status. +- * Window 4/Port 0A +- */ +-#define ENABLE_UTP 0xc0 +-#define DISABLE_UTP 0x0 +- +-/* +- * Resource control register +- */ +- +-#define SET_IRQ(i) ( ((i)<<12) | 0xF00) /* set IRQ i */ +- +-/* +- * Receive status register +- */ +- +-#define RX_BYTES_MASK (unsigned short) (0x07ff) +-#define RX_ERROR 0x4000 +-#define RX_INCOMPLETE 0x8000 +- +- +-/* +- * Misc defines for various things. +- */ +-#define ACTIVATE_ADAPTER_TO_CONFIG 0xff /* to the id_port */ +-#define MFG_ID 0x6d50 /* in EEPROM and W0 ADDR_CONFIG */ +-#define PROD_ID 0x9150 +- +-#define AUI 0x1 +-#define BNC 0x2 +-#define UTP 0x4 +- +-#define RX_BYTES_MASK (unsigned short) (0x07ff) +- +- /* EISA support */ +-#define EP_EISA_START 0x1000 +-#define EP_EISA_W0 0x0c80 +- +-#ifdef INCLUDE_3C529 +- /* MCA support */ +-#define MCA_MOTHERBOARD_SETUP_REG 0x94 +-#define MCA_ADAPTER_SETUP_REG 0x96 +-#define MCA_MAX_SLOT_NR 8 +-#define MCA_POS_REG(n) (0x100+(n)) +-#endif +- +-/* +- * Local variables: +- * c-basic-offset: 8 +- * End: +- */ +diff -Naur grub-0.97.orig/netboot/3c595.c grub-0.97/netboot/3c595.c +--- grub-0.97.orig/netboot/3c595.c 2003-07-09 11:45:37.000000000 +0000 ++++ grub-0.97/netboot/3c595.c 2005-08-31 19:03:35.000000000 +0000 +@@ -20,6 +20,7 @@ + * + * Copyright (c) 1994 Herb Peyerl + * ++* timlegge 08-24-2003 Add Multicast Support + */ + + /* #define EDEBUG */ +@@ -30,7 +31,7 @@ + #include "3c595.h" + #include "timer.h" + +-static unsigned short eth_nic_base, eth_asic_base; ++static unsigned short eth_nic_base; + static unsigned short vx_connector, vx_connectors; + + static struct connector_entry { +@@ -57,14 +58,12 @@ + static void vxgetlink(void); + static void vxsetlink(void); + +-#define udelay(n) waiton_timer2(((n)*TICKS_PER_MS)/1000) +- + /************************************************************************** + ETH_RESET - Reset adapter + ***************************************************************************/ + static void t595_reset(struct nic *nic) + { +- int i, j; ++ int i; + + /*********************************************************** + Reset 3Com 595 card +@@ -133,7 +132,7 @@ + outw(ACK_INTR | 0xff, BASE + VX_COMMAND); + + outw(SET_RX_FILTER | FIL_INDIVIDUAL | +- FIL_BRDCST, BASE + VX_COMMAND); ++ FIL_BRDCST|FIL_MULTICAST, BASE + VX_COMMAND); + + vxsetlink(); + /*{ +@@ -225,10 +224,9 @@ + /************************************************************************** + ETH_POLL - Wait for a frame + ***************************************************************************/ +-static int t595_poll(struct nic *nic) ++static int t595_poll(struct nic *nic, int retrieve) + { + /* common variables */ +- unsigned short type = 0; /* used by EDEBUG */ + /* variables for 3C595 */ + short status, cst; + register short rx_fifo; +@@ -262,6 +260,8 @@ + if (rx_fifo==0) + return 0; + ++ if ( ! retrieve ) return 1; ++ + /* read packet */ + #ifdef EDEBUG + printf("[l=%d",rx_fifo); +@@ -300,12 +300,15 @@ + outw(RX_DISCARD_TOP_PACK, BASE + VX_COMMAND); + while (inw(BASE + VX_STATUS) & S_COMMAND_IN_PROGRESS); + #ifdef EDEBUG ++{ ++ unsigned short type = 0; /* used by EDEBUG */ + type = (nic->packet[12]<<8) | nic->packet[13]; + if(nic->packet[0]+nic->packet[1]+nic->packet[2]+nic->packet[3]+nic->packet[4]+ + nic->packet[5] == 0xFF*ETH_ALEN) + printf(",t=%hX,b]",type); + else + printf(",t=%hX]",type); ++} + #endif + return 1; + } +@@ -382,9 +385,8 @@ + static void + vxsetlink(void) + { +- int i, j, k; ++ int i, j; + char *reason, *warning; +- static short prev_flags; + static char prev_conn = -1; + + if (prev_conn == -1) { +@@ -438,28 +440,47 @@ + GO_WINDOW(1); + } + +-static void t595_disable(struct nic *nic) ++static void t595_disable(struct dev *dev) + { +- outw(STOP_TRANSCEIVER, BASE + VX_COMMAND); +- udelay(8000); +- GO_WINDOW(4); +- outw(0, BASE + VX_W4_MEDIA_TYPE); +- GO_WINDOW(1); ++ struct nic *nic = (struct nic *)dev; ++ t595_reset(nic); ++ ++ outw(STOP_TRANSCEIVER, BASE + VX_COMMAND); ++ udelay(8000); ++ GO_WINDOW(4); ++ outw(0, BASE + VX_W4_MEDIA_TYPE); ++ GO_WINDOW(1); ++} ++ ++static void t595_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } + } + + /************************************************************************** + ETH_PROBE - Look for an adapter + ***************************************************************************/ +-struct nic *t595_probe(struct nic *nic, unsigned short *probeaddrs, struct pci_device *pci) ++static int t595_probe(struct dev *dev, struct pci_device *pci) + { ++ struct nic *nic = (struct nic *)dev; + int i; + unsigned short *p; + +- if (probeaddrs == 0 || probeaddrs[0] == 0) ++ if (pci->ioaddr == 0) + return 0; + /* eth_nic_base = probeaddrs[0] & ~3; */ + eth_nic_base = pci->ioaddr; + ++ nic->irqno = 0; ++ nic->ioaddr = pci->ioaddr & ~3; ++ + GO_WINDOW(0); + outw(GLOBAL_RESET, BASE + VX_COMMAND); + VX_BUSY_WAIT; +@@ -487,14 +508,40 @@ + printf("Ethernet address: %!\n", nic->node_addr); + + t595_reset(nic); +- nic->reset = t595_reset; +- nic->poll = t595_poll; ++ dev->disable = t595_disable; ++ nic->poll = t595_poll; + nic->transmit = t595_transmit; +- nic->disable = t595_disable; +- return nic; ++ nic->irq = t595_irq; ++ return 1; + + } + ++static struct pci_id t595_nics[] = { ++PCI_ROM(0x10b7, 0x5900, "3c590", "3Com590"), /* Vortex 10Mbps */ ++PCI_ROM(0x10b7, 0x5950, "3c595", "3Com595"), /* Vortex 100baseTx */ ++PCI_ROM(0x10b7, 0x5951, "3c595-1", "3Com595"), /* Vortex 100baseT4 */ ++PCI_ROM(0x10b7, 0x5952, "3c595-2", "3Com595"), /* Vortex 100base-MII */ ++PCI_ROM(0x10b7, 0x9000, "3c900-tpo", "3Com900-TPO"), /* 10 Base TPO */ ++PCI_ROM(0x10b7, 0x9001, "3c900-t4", "3Com900-Combo"), /* 10/100 T4 */ ++PCI_ROM(0x10b7, 0x9004, "3c900b-tpo", "3Com900B-TPO"), /* 10 Base TPO */ ++PCI_ROM(0x10b7, 0x9005, "3c900b-combo", "3Com900B-Combo"), /* 10 Base Combo */ ++PCI_ROM(0x10b7, 0x9006, "3c900b-tpb2", "3Com900B-2/T"), /* 10 Base TP and Base2 */ ++PCI_ROM(0x10b7, 0x900a, "3c900b-fl", "3Com900B-FL"), /* 10 Base F */ ++PCI_ROM(0x10b7, 0x9800, "3c980-cyclone-1", "3Com980-Cyclone"), /* Cyclone */ ++PCI_ROM(0x10b7, 0x9805, "3c9805-1", "3Com9805"), /* Dual Port Server Cyclone */ ++PCI_ROM(0x10b7, 0x7646, "3csoho100-tx-1", "3CSOHO100-TX"), /* Hurricane */ ++PCI_ROM(0x10b7, 0x4500, "3c450-1", "3Com450 HomePNA Tornado"), ++}; ++ ++struct pci_driver t595_driver = { ++ .type = NIC_DRIVER, ++ .name = "3C595", ++ .probe = t595_probe, ++ .ids = t595_nics, ++ .id_count = sizeof(t595_nics)/sizeof(t595_nics[0]), ++ .class = 0, ++}; ++ + /* + * Local variables: + * c-basic-offset: 8 +diff -Naur grub-0.97.orig/netboot/3c90x.c grub-0.97/netboot/3c90x.c +--- grub-0.97.orig/netboot/3c90x.c 2003-07-09 11:45:37.000000000 +0000 ++++ grub-0.97/netboot/3c90x.c 2005-08-31 19:03:35.000000000 +0000 +@@ -1,7 +1,7 @@ + /* + * 3c90x.c -- This file implements the 3c90x driver for etherboot. Written + * by Greg Beeley, Greg.Beeley@LightSys.org. Modified by Steve Smith, +- * Steve.Smith@Juno.Com ++ * Steve.Smith@Juno.Com. Alignment bug fix Neil Newell (nn@icenoir.net). + * + * This program Copyright (C) 1999 LightSys Technology Services, Inc. + * Portions Copyright (C) 1999 Steve Smith +@@ -31,13 +31,15 @@ + * Re-wrote poll and transmit for + * better error recovery and heavy + * network traffic operation ++ * v2.01 5-26-2003 NN Fixed driver alignment issue which ++ * caused system lockups if driver structures ++ * not 8-byte aligned. + * + */ + + #include "etherboot.h" + #include "nic.h" + #include "pci.h" +-#include "cards.h" + #include "timer.h" + + #define XCVR_MAGIC (0x5A00) +@@ -47,9 +49,6 @@ + **/ + #define XMIT_RETRIES 250 + +-#undef virt_to_bus +-#define virt_to_bus(x) ((unsigned long)x) +- + /*** Register definitions for the 3c905 ***/ + enum Registers + { +@@ -225,7 +224,7 @@ + unsigned int DataAddr; + unsigned int DataLength; + } +- TXD; ++ TXD __attribute__ ((aligned(8))); /* 64-bit aligned for bus mastering */ + + /*** RX descriptor ***/ + typedef struct +@@ -235,7 +234,7 @@ + unsigned int DataAddr; + unsigned int DataLength; + } +- RXD; ++ RXD __attribute__ ((aligned(8))); /* 64-bit aligned for bus mastering */ + + /*** Global variables ***/ + static struct +@@ -311,6 +310,7 @@ + } + + ++#if 0 + /*** a3c90x_internal_WriteEepromWord - write a physical word of + *** data to the onboard serial eeprom (not the BIOS prom, but the + *** nvram in the card that stores, among other things, the MAC +@@ -344,8 +344,9 @@ + + return 0; + } ++#endif + +- ++#if 0 + /*** a3c90x_internal_WriteEeprom - write data to the serial eeprom, + *** and re-compute the eeprom checksum. + ***/ +@@ -384,8 +385,7 @@ + + return 0; + } +- +- ++#endif + + /*** a3c90x_reset: exported function that resets the card to its default + *** state. This is so the Linux driver can re-set the card up the way +@@ -393,12 +393,10 @@ + *** not alter the selected transceiver that we used to download the boot + *** image. + ***/ +-static void +-a3c90x_reset(struct nic *nic) ++static void a3c90x_reset(void) + { +- int cfg; +- + #ifdef CFG_3C90X_PRESERVE_XCVR ++ int cfg; + /** Read the current InternalConfig value. **/ + a3c90x_internal_SetWindow(INF_3C90X.IOAddr, winTxRxOptions3); + cfg = inl(INF_3C90X.IOAddr + regInternalConfig_3_l); +@@ -473,7 +471,7 @@ + *** p - the pointer to the packet data itself. + ***/ + static void +-a3c90x_transmit(struct nic *nic, const char *d, unsigned int t, ++a3c90x_transmit(struct nic *nic __unused, const char *d, unsigned int t, + unsigned int s, const char *p) + { + +@@ -553,7 +551,7 @@ + if (status & 0x02) + { + printf("3C90X: Tx Reclaim Error (%hhX)\n", status); +- a3c90x_reset(NULL); ++ a3c90x_reset(); + } + else if (status & 0x04) + { +@@ -572,18 +570,18 @@ + else if (status & 0x10) + { + printf("3C90X: Tx Underrun (%hhX)\n", status); +- a3c90x_reset(NULL); ++ a3c90x_reset(); + } + else if (status & 0x20) + { + printf("3C90X: Tx Jabber (%hhX)\n", status); +- a3c90x_reset(NULL); ++ a3c90x_reset(); + } + else if ((status & 0x80) != 0x80) + { + printf("3C90X: Internal Error - Incomplete Transmission (%hhX)\n", + status); +- a3c90x_reset(NULL); ++ a3c90x_reset(); + } + } + +@@ -601,7 +599,7 @@ + *** in nic->packetlen. Return 1 if a packet was found. + ***/ + static int +-a3c90x_poll(struct nic *nic) ++a3c90x_poll(struct nic *nic, int retrieve) + { + int i, errcode; + +@@ -610,6 +608,8 @@ + return 0; + } + ++ if ( ! retrieve ) return 1; ++ + /** we don't need to acknowledge rxComplete -- the upload engine + ** does it for us. + **/ +@@ -663,34 +663,51 @@ + *** [Ken] + ***/ + static void +-a3c90x_disable(struct nic *nic) +- { ++a3c90x_disable(struct dev *dev __unused) ++{ ++ /* reset and disable merge */ ++ a3c90x_reset(); + /* Disable the receiver and transmitter. */ + outw(cmdRxDisable, INF_3C90X.IOAddr + regCommandIntStatus_w); + outw(cmdTxDisable, INF_3C90X.IOAddr + regCommandIntStatus_w); +- } +- ++} + ++static void a3c90x_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } ++} + + /*** a3c90x_probe: exported routine to probe for the 3c905 card and perform + *** initialization. If this routine is called, the pci functions did find the + *** card. We just have to init it here. + ***/ +-struct nic* +-a3c90x_probe(struct nic *nic, unsigned short *probeaddrs, struct pci_device *pci) +- { ++static int a3c90x_probe(struct dev *dev, struct pci_device *pci) ++{ ++ struct nic *nic = (struct nic *)dev; + int i, c; + unsigned short eeprom[0x21]; + unsigned int cfg; + unsigned int mopt; ++ unsigned int mstat; + unsigned short linktype; ++#define HWADDR_OFFSET 10 + +- if (probeaddrs == 0 || probeaddrs[0] == 0) ++ if (pci->ioaddr == 0) + return 0; + + adjust_pci_device(pci); + +- INF_3C90X.IOAddr = probeaddrs[0] & ~3; ++ nic->ioaddr = pci->ioaddr & ~3; ++ nic->irqno = 0; ++ ++ INF_3C90X.IOAddr = pci->ioaddr & ~3; + INF_3C90X.CurrentWindow = 255; + switch (a3c90x_internal_ReadEeprom(INF_3C90X.IOAddr, 0x03)) + { +@@ -756,30 +773,45 @@ + "Copyright 1999 LightSys Technology Services, Inc.\n" + "Portions Copyright 1999 Steve Smith\n"); + printf("Provided with ABSOLUTELY NO WARRANTY.\n"); ++#ifdef CFG_3C90X_BOOTROM_FIX ++ if (INF_3C90X.isBrev) ++ { ++ printf("NOTE: 3c905b bootrom fix enabled; has side " ++ "effects. See 3c90x.txt for info.\n"); ++ } ++#endif + printf("-------------------------------------------------------" + "------------------------\n"); + + /** Retrieve the Hardware address and print it on the screen. **/ +- INF_3C90X.HWAddr[0] = eeprom[0]>>8; +- INF_3C90X.HWAddr[1] = eeprom[0]&0xFF; +- INF_3C90X.HWAddr[2] = eeprom[1]>>8; +- INF_3C90X.HWAddr[3] = eeprom[1]&0xFF; +- INF_3C90X.HWAddr[4] = eeprom[2]>>8; +- INF_3C90X.HWAddr[5] = eeprom[2]&0xFF; ++ INF_3C90X.HWAddr[0] = eeprom[HWADDR_OFFSET + 0]>>8; ++ INF_3C90X.HWAddr[1] = eeprom[HWADDR_OFFSET + 0]&0xFF; ++ INF_3C90X.HWAddr[2] = eeprom[HWADDR_OFFSET + 1]>>8; ++ INF_3C90X.HWAddr[3] = eeprom[HWADDR_OFFSET + 1]&0xFF; ++ INF_3C90X.HWAddr[4] = eeprom[HWADDR_OFFSET + 2]>>8; ++ INF_3C90X.HWAddr[5] = eeprom[HWADDR_OFFSET + 2]&0xFF; + printf("MAC Address = %!\n", INF_3C90X.HWAddr); + ++ /* Test if the link is good, if not continue */ ++ a3c90x_internal_SetWindow(INF_3C90X.IOAddr, winDiagnostics4); ++ mstat = inw(INF_3C90X.IOAddr + regMediaStatus_4_w); ++ if((mstat & (1<<11)) == 0) { ++ printf("Valid link not established\n"); ++ return 0; ++ } ++ + /** Program the MAC address into the station address registers **/ + a3c90x_internal_SetWindow(INF_3C90X.IOAddr, winAddressing2); +- outw(htons(eeprom[0]), INF_3C90X.IOAddr + regStationAddress_2_3w); +- outw(htons(eeprom[1]), INF_3C90X.IOAddr + regStationAddress_2_3w+2); +- outw(htons(eeprom[2]), INF_3C90X.IOAddr + regStationAddress_2_3w+4); ++ outw(htons(eeprom[HWADDR_OFFSET + 0]), INF_3C90X.IOAddr + regStationAddress_2_3w); ++ outw(htons(eeprom[HWADDR_OFFSET + 1]), INF_3C90X.IOAddr + regStationAddress_2_3w+2); ++ outw(htons(eeprom[HWADDR_OFFSET + 2]), INF_3C90X.IOAddr + regStationAddress_2_3w+4); + outw(0, INF_3C90X.IOAddr + regStationMask_2_3w+0); + outw(0, INF_3C90X.IOAddr + regStationMask_2_3w+2); + outw(0, INF_3C90X.IOAddr + regStationMask_2_3w+4); + + /** Fill in our entry in the etherboot arp table **/ + for(i=0;inode_addr[i] = (eeprom[i/2] >> (8*((i&1)^1))) & 0xff; ++ nic->node_addr[i] = (eeprom[HWADDR_OFFSET + i/2] >> (8*((i&1)^1))) & 0xff; + + /** Read the media options register, print a message and set default + ** xcvr. +@@ -903,8 +935,8 @@ + while (inw(INF_3C90X.IOAddr + regCommandIntStatus_w) & INT_CMDINPROGRESS) + ; + +- /** Set the RX filter = receive only individual pkts & bcast. **/ +- a3c90x_internal_IssueCommand(INF_3C90X.IOAddr, cmdSetRxFilter, 0x01 + 0x04); ++ /** Set the RX filter = receive only individual pkts & multicast & bcast. **/ ++ a3c90x_internal_IssueCommand(INF_3C90X.IOAddr, cmdSetRxFilter, 0x01 + 0x02 + 0x04); + a3c90x_internal_IssueCommand(INF_3C90X.IOAddr, cmdRxEnable, 0); + + +@@ -918,12 +950,46 @@ + cmdAcknowledgeInterrupt, 0x661); + + /** Set our exported functions **/ +- nic->reset = a3c90x_reset; ++ dev->disable = a3c90x_disable; + nic->poll = a3c90x_poll; + nic->transmit = a3c90x_transmit; +- nic->disable = a3c90x_disable; ++ nic->irq = a3c90x_irq; + +- return nic; +- } ++ return 1; ++} + + ++static struct pci_id a3c90x_nics[] = { ++/* Original 90x revisions: */ ++PCI_ROM(0x10b7, 0x9000, "3c905-tpo", "3Com900-TPO"), /* 10 Base TPO */ ++PCI_ROM(0x10b7, 0x9001, "3c905-t4", "3Com900-Combo"), /* 10/100 T4 */ ++PCI_ROM(0x10b7, 0x9050, "3c905-tpo100", "3Com905-TX"), /* 100 Base TX / 10/100 TPO */ ++PCI_ROM(0x10b7, 0x9051, "3c905-combo", "3Com905-T4"), /* 100 Base T4 / 10 Base Combo */ ++/* Newer 90xB revisions: */ ++PCI_ROM(0x10b7, 0x9004, "3c905b-tpo", "3Com900B-TPO"), /* 10 Base TPO */ ++PCI_ROM(0x10b7, 0x9005, "3c905b-combo", "3Com900B-Combo"), /* 10 Base Combo */ ++PCI_ROM(0x10b7, 0x9006, "3c905b-tpb2", "3Com900B-2/T"), /* 10 Base TP and Base2 */ ++PCI_ROM(0x10b7, 0x900a, "3c905b-fl", "3Com900B-FL"), /* 10 Base FL */ ++PCI_ROM(0x10b7, 0x9055, "3c905b-tpo100", "3Com905B-TX"), /* 10/100 TPO */ ++PCI_ROM(0x10b7, 0x9056, "3c905b-t4", "3Com905B-T4"), /* 10/100 T4 */ ++PCI_ROM(0x10b7, 0x9058, "3c905b-9058", "3Com905B-9058"), /* Cyclone 10/100/BNC */ ++PCI_ROM(0x10b7, 0x905a, "3c905b-fx", "3Com905B-FL"), /* 100 Base FX / 10 Base FX */ ++/* Newer 90xC revision: */ ++PCI_ROM(0x10b7, 0x9200, "3c905c-tpo", "3Com905C-TXM"), /* 10/100 TPO (3C905C-TXM) */ ++PCI_ROM(0x10b7, 0x9210, "3c920b-emb-wnm","3Com20B-EMB WNM"), ++PCI_ROM(0x10b7, 0x9800, "3c980", "3Com980-Cyclone"), /* Cyclone */ ++PCI_ROM(0x10b7, 0x9805, "3c9805", "3Com9805"), /* Dual Port Server Cyclone */ ++PCI_ROM(0x10b7, 0x7646, "3csoho100-tx", "3CSOHO100-TX"), /* Hurricane */ ++PCI_ROM(0x10b7, 0x4500, "3c450", "3Com450 HomePNA Tornado"), ++PCI_ROM(0x10b7, 0x1201, "3c982a", "3Com982A"), ++PCI_ROM(0x10b7, 0x1202, "3c982b", "3Com982B"), ++}; ++ ++struct pci_driver a3c90x_driver = { ++ .type = NIC_DRIVER, ++ .name = "3C90X", ++ .probe = a3c90x_probe, ++ .ids = a3c90x_nics, ++ .id_count = sizeof(a3c90x_nics)/sizeof(a3c90x_nics[0]), ++ .class = 0, ++}; +diff -Naur grub-0.97.orig/netboot/3c90x.txt grub-0.97/netboot/3c90x.txt +--- grub-0.97.orig/netboot/3c90x.txt 2003-07-09 11:45:37.000000000 +0000 ++++ grub-0.97/netboot/3c90x.txt 1970-01-01 00:00:00.000000000 +0000 +@@ -1,307 +0,0 @@ +- +- Instructions for use of the 3C90X driver for EtherBoot +- +- Original 3C905B support by: +- Greg Beeley (Greg.Beeley@LightSys.org), +- LightSys Technology Services, Inc. +- February 11, 1999 +- +- Updates for 3C90X family by: +- Steve Smith (steve.smith@juno.com) +- October 1, 1999 +- +- Minor documentation updates by +- Greg Beeley (Greg.Beeley@LightSys.org) +- March 29, 2000 +- +-------------------------------------------------------------------------------- +- +-I OVERVIEW +- +- The 3c90X series ethernet cards are a group of high-performance busmaster +- DMA cards from 3Com. This particular driver supports both the 3c90x and +- the 3c90xB revision cards. 3C90xC family support has been tested to some +- degree but not extensively. +- +- Here's the licensing information: +- +- This program Copyright (C) 1999 LightSys Technology Services, Inc. +- Portions Copyright (C) 1999 Steve Smith. +- +- This program may be re-distributed in source or binary form, modified, +- sold, or copied for any purpose, provided that the above copyright message +- and this text are included with all source copies or derivative works, and +- provided that the above copyright message and this text are included in the +- documentation of any binary-only distributions. This program is +- distributed WITHOUT ANY WARRANTY, without even the warranty of FITNESS FOR +- A PARTICULAR PURPOSE or MERCHANTABILITY. Please read the associated +- documentation "3c90x.txt" before compiling and using this driver. +- +- +-II FLASH PROMS +- +- The 3c90xB cards, according to the 3Com documentation, only accept the +- following flash memory chips: +- +- Atmel AT29C512 (64 kilobyte) +- Atmel AT29C010 (128 kilobyte) +- +- The 3c90x cards, according to the 3Com documentation, accept the +- following flash memory chips capacities: +- +- 64 kb (8 kB) +- 128 kb (16 kB) +- 256 kb (32 kB) and +- 512 kb (64 kB) +- +- Atmel AT29C512 (64 kilobyte) chips are specifically listed for both +- adapters, but flashing on the 3c905b cards would only be supported +- through the Atmel parts. Any device, of the supported size, should +- be supported when programmed by a dedicated PROM programmer (e.g. +- not the card). +- +- To use this driver in such a PROM, visit Atmel's web site and download +- their .PDF file containing a list of their distributors. Contact the +- distributors for pricing information. The prices are quite reasonable +- (about $3 US each for the 64 kB part), and are comparable to what one would +- expect for similarly sized standard EPROMs. And, the flash chips are much +- easier to work with, as they don't need to be UV-erased to be reprogrammed. +- The 3C905B card actually provides a method to program the flash memory +- while it is resident on board the card itself; if someone would like to +- write a small DOS program to do the programming, I can provide the +- information about the registers and so forth. +- +- A utility program, 3c90xutil, is provided with Etherboot in the 'contrib' +- directory that allows for the on-board flashing of the ROM while Linux +- is running. The program has been successfully used under Linux, but I +- have heard problem reports of its use under FreeBSD. Anyone willing to +- make it work under FreeBSD is more than welcome to do so! +- +- You also have the option of using EPROM chips - the 3C905B-TX-NM has been +- successfully tested with 27C256 (32kB) and 27C512 (64kB) chips with a +- specified access time of 100ns and faster. +- +- +-III GENERAL USE +- +- Normally, the basic procedure for using this driver is as follows: +- +- 1. Run the 3c90xcfg program on the driver diskette to enable the +- boot PROM and set it to 64k or 128k, as appropriate. +- 2. Build the appropriate 3c90x.fd0 or 3c90x.fd0 floppy image with +- possibly the value CFG_3C90X_XCVR defined to the transceiver type that +- you want to use (i.e., 10/100 rj45, AUI, coax, MII). +- 3. Run the floppy image on the PC to be network booted, to get +- it configured, and to verify that it will boot properly. +- 4. Build the 3c90x.rom or 3c90x.lzrom PROM image and program +- it into the flash or EPROM memory chip. +- 5. Put the PROM in the ethernet card, boot and enable 'boot from +- network first' in the system BIOS, save and reboot. +- +- Here are some issues to be aware of: +- +- 1. If you experience crashes or different behaviour when using the +- boot PROM, add the setting CFG_3C90X_BOOTROM_FIX and go through the +- steps 2-5 above. This works around a bug in some 3c905B cards (see +- below), but has some side-effects which may not be desirable. +- Please note that you have to boot off a floppy (not PROM!) once for +- this fix to take effect. +- 2. The possible need to manually set the CFG_3C90X_XCVR value to +- configure the transceiver type. Values are listed below. +- 3. The possible need to define CFG_3C90X_PRESERVE_XCVR for use in +- operating systems that don't intelligently determine the +- transceiver type. +- +- Some things that are on the 'To-Do' list, perhaps for me, but perhaps +- for any other volunteers out there: +- +- 1. Extend the driver to fully implement the auto-select +- algorithm if the card has multiple media ports. +- 2. Fix any bugs in the code .... +- 3. Extend the driver to support the 3c905c revision cards +- "officially". Right now, the support has been primarily empirical +- and not based on 3c905C documentation. +- +- Now for the details.... +- +- This driver has been tested on roughly 300 systems. The main two +- configuration issues to contend with are: +- +- 1. Ensure that PCI Busmastering is enabled for the adapter (configured +- in the CMOS setup) +- 2. Some systems don't work properly with the adapter when plug and +- play OS is enabled; I always set it to "No" or "Disabled" -- this makes +- it easier and really doesn't adversely affect anything. +- +- Roughly 95% of the systems worked when configured properly. A few +- have issues with booting locally once the boot PROM has been installed +- (this number has been less than 2%). Other configuration issues that +- to check: +- +- 1. Newer BIOS's actually work correctly with the network boot order. +- Set the network adapter first. Most older BIOS's automatically go to +- the network boot PROM first. +- 2. For systems where the adapter was already installed and is just +- having the PROM installed, try setting the "reset configuration data" +- to yes in the CMOS setup if the BIOS isn't seen at first. If your BIOS +- doesn't have this option, remove the card, start the system, shut down, +- install the card and restart (or switch to a different PCI slot). +- 3. Make sure the CMOS security settings aren't preventing a boot. +- +- The 3c905B cards have a significant 'bug' that relates to the flash prom: +- unless the card is set internally to the MII transceiver, it will only +- read the first 8k of the PROM image. Don't ask why -- it seems really +- obscure, but it has to do with the way they mux'd the address lines +- from the PCI bus to the ROM. Unfortunately, most of us are not using +- MII transceivers, and even the .lzrom image ends up being just a little +- bit larger than 8k. Note that the workaround for this is disabled by +- default, because the Windows NT 4.0 driver does not like it (no packets +- are transmitted). +- +- So, the solution that I've used is to internally set the card's nvram +- configuration to use MII when it boots. The 3c905b driver does this +- automatically. This way, the 16k prom image can be loaded into memory, +- and then the 3c905b driver can set the temporary configuration of the +- card to an appropriate value, either configurable by the user or chosen +- by the driver. +- +- To enable the 3c905B bugfix, which is necessary for these cards when +- booting from the Flash ROM, define -DCFG_3C90X_BOOTROM_FIX when building, +- create a floppy image and boot it once. +- Thereafter, the card should accept the larger prom image. +- +- The driver should choose an appropriate transceiver on the card. However, +- if it doesn't on your card or if you need to, for instance, set your +- card to 10mbps when connected to an unmanaged 10/100 hub, you can specify +- which transceiver you want to use. To do this, build the 3c905b.fd0 +- image with -DCFG_3C90X_XCVR=x, where 'x' is one of the following +- values: +- +- 0 10Base-T +- 1 10mbps AUI +- 3 10Base-2 (thinnet/coax) +- 4 100Base-TX +- 5 100Base-FX +- 6 MII +- 8 Auto-negotiation 10Base-T / 100Base-TX (usually the default) +- 9 MII External MAC Mode +- 255 Allow driver to choose an 'appropriate' media port. +- +- Then proceed from step 2 in the above 'general use' instructions. The +- .rom image can be built with CFG_3C90X_XCVR set to a value, but you +- normally don't want to do this, since it is easier to change the +- transceiver type by rebuilding a new floppy, changing the BIOS to floppy +- boot, booting, and then changing the BIOS back to network boot. If +- CFG_3C90X_XCVR is not set in a particular build, it just uses the +- current configuration (either its 'best guess' or whatever the stored +- CFG_3C90X_XCVR value was from the last time it was set). +- +- [[ Note for the more technically inclined: The CFG_3C90X_XCVR value is +- programmed into a register in the card's NVRAM that was reserved for +- LanWorks PROM images to use. When the driver boots, the card comes +- up in MII mode, and the driver checks the LanWorks register to find +- out if the user specified a transceiver type. If it finds that +- information, it uses that, otherwise it picks a transceiver that the +- card has based on the 3c905b's MediaOptions register. This driver isn't +- quite smart enough to always determine which media port is actually +- _connected_; maybe someone else would like to take on that task (it +- actually involves sending a self-directed packet and seeing if it +- comes back. IF it does, that port is connected). ]] +- +- Another issue to keep in mind is that it is possible that some OS'es +- might not be happy with the way I've handled the PROM-image hack with +- setting MII mode on bootup. Linux 2.0.35 does not have this problem. +- Behavior of other systems may vary. The 3com documentation specifically +- says that, at least with the card that I have, the device driver in the +- OS should auto-select the media port, so other drivers should work fine +- with this 'hack'. However, if yours doesn't seem to, you can try defining +- CFG_3C90X_PRESERVE_XCVR when building to cause Etherboot to keep the +- working setting (that allowed the bootp/tftp process) across the eth_reset +- operation. +- +- +-IV FOR DEVELOPERS.... +- +- If you would like to fix/extend/etc. this driver, feel free to do so; just +- be sure you can test the modified version on the 3c905B-TX cards that the +- driver was originally designed for. This section of this document gives +- some information that might be relevant to a programmer. +- +- A. Main Entry Point +- +- a3c90x_probe is the main entry point for this driver. It is referred +- to in an array in 'config.c'. +- +- B. Other Important Functions +- +- The functions a3c90x_transmit, a3c90x_poll, a3c90x_reset, and +- a3c90x_disable are static functions that EtherBoot finds out about +- as a result of a3c90x_probe setting entries in the nic structure +- for them. The EtherBoot framework does not use interrupts. It is +- polled. All transmit and receive operations are initiated by the +- etherboot framework, not by an interrupt or by the driver. +- +- C. Internal Functions +- +- The following functions are internal to the driver: +- +- a3c90x_internal_IssueCommand - sends a command to the 3c905b card. +- a3c90x_internal_SetWindow - shifts between one of eight register +- windows onboard the 3c90x. The bottom 16 bytes of the card's +- I/O space are multiplexed among 128 bytes, only 16 of which are +- visible at any one time. This SetWindow function selects one of +- the eight sets. +- a3c90x_internal_ReadEeprom - reads a word (16 bits) from the +- card's onboard nvram. This is NOT the BIOS boot rom. This is +- where the card stores such things as its hardware address. +- a3c90x_internal_WriteEeprom - writes a word (16 bits) to the +- card's nvram, and recomputes the eeprom checksum. +- a3c90x_internal_WriteEepromWord - writes a word (16 bits) to the +- card's nvram. Used by the above routine. +- a3c90x_internal_WriteEepromWord - writes a word (16 bits) to the +- card's nvram. Used by the above routine. +- +- D. Globals +- +- All global variables are inside a global structure named INF_3C90X. +- So, wherever you see that structure referenced, you know the variable +- is a global. Just keeps things a little neater. +- +- E. Enumerations +- +- There are quite a few enumerated type definitions for registers and +- so forth, many for registers that I didn't even touch in the driver. +- Register types start with 'reg', window numbers (for SetWindow) +- start with 'win', and commands (for IssueCommand) start with 'cmd'. +- Register offsets also include an indication in the name as to the +- size of the register (_b = byte, _w = word, _l = long), and which +- window the register is in, if it is windowed (0-7). +- +- F. Why the 'a3c90x' name? +- +- I had to come up with a letter at the beginning of all of the +- identifiers, since 3com so conveniently had their name start with a +- number. Another driver used 't' (for 'three'?); I chose 'a' for +- no reason at all. +- +-Addendum by Jorge L. deLyra , 22Nov2000 re +-working around the 3C905 hardware bug mentioned above: +- +-Use this floppy to fix any 3COM model 3C905B PCI 10/100 Ethernet cards +-that fail to load and run the boot program the first time around. If +-they have a "Lucent" rather than a "Broadcom" chipset these cards have +-a configuration bug that causes a hang when trying to load the boot +-program from the PROM, if you try to use them right out of the box. +- +-The boot program in this floppy is the file named 3c905b-tpo100.rom +-from Etherboot version 4.6.10, compiled with the bugfix parameter +- +- CFG_3C90X_BOOTROM_FIX +- +-You have to take the chip off the card and boot the system once using +-this floppy. Once loaded from the floppy, the boot program will access +-the card and change some setting in it, correcting the problem. After +-that you may use either this boot program or the normal one, compiled +-without this bugfix parameter, to boot the machine from the PROM chip. +- +-[Any recent Etherboot version should do, not just 4.6.10 - Ed.] +diff -Naur grub-0.97.orig/netboot/Makefile.am grub-0.97/netboot/Makefile.am +--- grub-0.97.orig/netboot/Makefile.am 2003-07-09 11:45:37.000000000 +0000 ++++ grub-0.97/netboot/Makefile.am 2005-08-31 19:03:35.000000000 +0000 +@@ -10,58 +10,72 @@ + + noinst_LIBRARIES = $(LIBDRIVERS) + +-libdrivers_a_SOURCES = cards.h config.c etherboot.h \ +- fsys_tftp.c linux-asm-io.h linux-asm-string.h \ +- main.c misc.c nic.h osdep.h pci.c pci.h timer.c timer.h +-EXTRA_libdrivers_a_SOURCES = 3c509.c 3c509.h 3c595.c 3c595.h 3c90x.c \ +- cs89x0.c cs89x0.h davicom.c depca.c eepro.c eepro100.c \ +- epic100.c epic100.h fa311.c i82586.c lance.c natsemi.c \ +- ni5010.c ns8390.c ns8390.h otulip.c otulip.h rtl8139.c \ +- sis900.c sis900.h sk_g16.c sk_g16.h smc9000.c smc9000.h \ +- tiara.c tlan.c tulip.c via-rhine.c w89c840.c ++libdrivers_a_SOURCES = big_bswap.h bootp.h byteswap.h config.c cpu.h \ ++ dev.h elf.h endian.h etherboot.h fsys_tftp.c grub.h \ ++ i386_byteswap.h i386_elf.h i386_endian.h i386_timer.c \ ++ if_arp.h if_ether.h igmp.h in.h io.h ip.h isa.h latch.h \ ++ little_bswap.h misc.c nic.c nic.h osdep.h pci.c pci.h \ ++ pci_ids.h pci_io.c stdint.h tftp.h timer.c timer.h \ ++ types.h udp.h mii.h pic8259.c pic8259.h pxe.h basemem.c segoff.h ++EXTRA_libdrivers_a_SOURCES = 3c595.c 3c595.h 3c90x.c davicom.c \ ++ e1000.c e1000_hw.h eepro100.c epic100.c epic100.h natsemi.c \ ++ ns8390.c ns8390.h pcnet32.c rtl8139.c sis900.c sis900.h \ ++ sundance.c tg3.c tg3.h tlan.c tlan.h tulip.c via-rhine.c \ ++ w89c840.c r8169.c forcedeth.c ns83820.c pnic.c pnic_api.c \ ++ undi.c undi.h + libdrivers_a_CFLAGS = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + -DFSYS_TFTP=1 $(NET_CFLAGS) $(NET_EXTRAFLAGS) + # Filled by configure. + libdrivers_a_LIBADD = @NETBOOT_DRIVERS@ + libdrivers_a_DEPENDENCIES = $(libdrivers_a_LIBADD) + +-EXTRA_DIST = README.netboot 3c90x.txt cs89x0.txt sis900.txt tulip.txt ++EXTRA_DIST = README.netboot + + # These below are several special rules for the device drivers. + # We cannot use a simple rule for them... + + # What objects are derived from a driver? +-3c509_drivers = 3c509.o 3c529.o ++#3c509_drivers = 3c509.o 3c529.o + 3c595_drivers = 3c595.o + 3c90x_drivers = 3c90x.o +-cs89x0_drivers = cs89x0.o ++#cs89x0_drivers = cs89x0.o + davicom_drivers = davicom.o +-depca_drivers = depca.o +-eepro_drivers = eepro.o ++#depca_drivers = depca.o ++#eepro_drivers = eepro.o ++e1000_drivers = e1000.o + eepro100_drivers = eepro100.o + epic100_drivers = epic100.o + #fa311_drivers = fa311.o +-i82586_drivers = 3c507.o exos205.o ni5210.o +-lance_drivers = lance.o ne2100.o ni6510.o ++forcedeth_drivers = forcedeth.o ++#i82586_drivers = 3c507.o exos205.o ni5210.o ++#lance_drivers = lance.o ne2100.o ni6510.o + natsemi_drivers = natsemi.o +-ni5010_drivers = ni5010.o ++#ni5010_drivers = ni5010.o ++ns83820_drivers = ns83820.o + ns8390_drivers = 3c503.o ne.o ns8390.o wd.o +-otulip_drivers = otulip.o ++#otulip_drivers = otulip.o ++pcnet32_drivers = pcnet32.o ++pnic_drivers = pnic.o ++r8169_drivers = r8169.o + rtl8139_drivers = rtl8139.o + sis900_drivers = sis900.o +-sk_g16_drivers = sk_g16.o +-smc9000_drivers = smc9000.o +-tiara_drivers = tiara.o +-#tlan_drivers = tlan.o ++#sk_g16_drivers = sk_g16.o ++sundance_driver = sundance.o ++#smc9000_drivers = smc9000.o ++tg3_drivers = tg3.o ++#tiara_drivers = tiara.o ++tlan_drivers = tlan.o + tulip_drivers = tulip.o ++undi_drivers = undi.o + via_rhine_drivers = via_rhine.o + w89c840_drivers = w89c840.o + ++ + # Is it really necessary to specify dependecies explicitly? +-$(3c509_drivers): 3c509.c 3c509.h +-$(3c509_drivers): %.o: 3c509.c +- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++#$(3c509_drivers): 3c509.c 3c509.h ++#$(3c509_drivers): %.o: 3c509.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + + $(3c595_drivers): 3c595.c 3c595.h + $(3c595_drivers): %.o: 3c595.c +@@ -73,23 +87,28 @@ + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(cs89x0_drivers): cs89x0.c cs89x0.h +-$(cs89x0_drivers): %.o: cs89x0.c +- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++#$(cs89x0_drivers): cs89x0.c cs89x0.h ++#$(cs89x0_drivers): %.o: cs89x0.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + + $(davicom_drivers): davicom.c + $(davicom_drivers): %.o: davicom.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(depca_drivers): depca.c +-$(depca_drivers): %.o: depca.c +- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++#$(depca_drivers): depca.c ++#$(depca_drivers): %.o: depca.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ ++#$(eepro_drivers): eepro.c ++#$(eepro_drivers): %.o: eepro.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(eepro_drivers): eepro.c +-$(eepro_drivers): %.o: eepro.c ++$(e1000_drivers): e1000.c e1000_hw.h ++$(e1000_drivers): %.o: e1000.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +@@ -103,28 +122,38 @@ + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + ++$(forcedeth_drivers): forcedeth.c ++$(forcedeth_drivers): %.o: forcedeth.c ++ $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++ $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ + #$(fa311_drivers): fa311.c + #$(fa311_drivers): %.o: fa311.c + # $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + # $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(i82586_drivers): i82586.c +-$(i82586_drivers): %.o: i82586.c +- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++#$(i82586_drivers): i82586.c ++#$(i82586_drivers): %.o: i82586.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(lance_drivers): lance.c +-$(lance_drivers): %.o: lance.c +- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++#$(lance_drivers): lance.c ++#$(lance_drivers): %.o: lance.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + + $(natsemi_drivers): natsemi.c + $(natsemi_drivers): %.o: natsemi.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(ni5010_drivers): ni5010.c +-$(ni5010_drivers): %.o: ni5010.c ++#$(ni5010_drivers): ni5010.c ++#$(ni5010_drivers): %.o: ni5010.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ ++$(ns83820_drivers): ns83820.c ++$(ns83820_drivers): %.o: ns83820.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +@@ -133,8 +162,18 @@ + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(otulip_drivers): otulip.c otulip.h +-$(otulip_drivers): %.o: otulip.c ++#$(otulip_drivers): otulip.c otulip.h ++#$(otulip_drivers): %.o: otulip.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ ++$(pcnet32_drivers): pcnet32.c ++$(pcnet32_drivers): %.o: pcnet32.c ++ $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++ $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ ++$(pnic_drivers): pnic.c ++$(pnic_drivers): %.o: pnic.c pnic_api.h + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +@@ -143,36 +182,56 @@ + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(sis900_drivers): sis900.c +-$(sis900_drivers): %.o: sis900.c sis900.h ++$(r8169_drivers): r8169.c ++$(r8169_drivers): %.o: r8169.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(sk_g16_drivers): sk_g16.c sk_g16.h +-$(sk_g16_drivers): %.o: sk_g16.c ++$(sis900_drivers): sis900.c sis900.h ++$(sis900_drivers): %.o: sis900.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(smc9000_drivers): smc9000.c smc9000.h +-$(smc9000_drivers): %.o: smc9000.c ++#$(sk_g16_drivers): sk_g16.c sk_g16.h ++#$(sk_g16_drivers): %.o: sk_g16.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ ++#$(smc9000_drivers): smc9000.c smc9000.h ++#$(smc9000_drivers): %.o: smc9000.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ ++$(sundance_drivers): sundance.c ++$(sundance_drivers): %.o: sundance.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(tiara_drivers): tiara.c +-$(tiara_drivers): %.o: tiara.c ++$(tg3_drivers): tg3.c tg3.h ++$(tg3_drivers): %.o: tg3.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-#$(tlan_drivers): tlan.c +-#$(tlan_drivers): %.o: tlan.c ++#$(tiara_drivers): tiara.c ++#$(tiara_drivers): %.o: tiara.c + # $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + # $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + ++$(tlan_drivers): tlan.c tlan.h ++$(tlan_drivers): %.o: tlan.c ++ $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++ $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ + $(tulip_drivers): tulip.c + $(tulip_drivers): %.o: tulip.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + ++$(undi_drivers): undi.c undi.h ++$(undi_drivers): %.o: undi.c ++ $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++ $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ + $(via_rhine_drivers): via-rhine.c + $(via_rhine_drivers): %.o: via-rhine.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +@@ -184,36 +243,45 @@ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + + # Per-object flags. +-3c509_o_CFLAGS = -DINCLUDE_3C509=1 +-3c529_o_CFLAGS = -DINCLUDE_3C529=1 ++#3c509_o_CFLAGS = -DINCLUDE_3C509=1 ++#3c529_o_CFLAGS = -DINCLUDE_3C529=1 + 3c595_o_CFLAGS = -DINCLUDE_3C595=1 + 3c90x_o_CFLAGS = -DINCLUDE_3C90X=1 +-cs89x0_o_CFLAGS = -DINCLUDE_CS89X0=1 ++#cs89x0_o_CFLAGS = -DINCLUDE_CS89X0=1 + davicom_o_CFLAGS = -DINCLUDE_DAVICOM=1 +-depca_o_CFLAGS = -DINCLUDE_DEPCA=1 +-eepro_o_CFLAGS = -DINCLUDE_EEPRO=1 ++#depca_o_CFLAGS = -DINCLUDE_DEPCA=1 ++#eepro_o_CFLAGS = -DINCLUDE_EEPRO=1 ++e1000_o_CFLAGS = -DINCLUDE_E1000=1 + eepro100_o_CFLAGS = -DINCLUDE_EEPRO100=1 + epic100_o_CFLAGS = -DINCLUDE_EPIC100=1 + #fa311_o_CFLAGS = -DINCLUDE_FA311=1 +-3c507_o_CFLAGS = -DINCLUDE_3C507=1 +-exos205_o_CFLAGS = -DINCLUDE_EXOS205=1 +-ni5210_o_CFLAGS = -DINCLUDE_NI5210=1 +-lance_o_CFLAGS = -DINCLUDE_LANCE=1 +-ne2100_o_CFLAGS = -DINCLUDE_NE2100=1 +-ni6510_o_CFLAGS = -DINCLUDE_NI6510=1 ++forcedeth_o_CFLAGS = -DINCLUDE_FORCEDETH=1 ++#3c507_o_CFLAGS = -DINCLUDE_3C507=1 ++#exos205_o_CFLAGS = -DINCLUDE_EXOS205=1 ++#ni5210_o_CFLAGS = -DINCLUDE_NI5210=1 ++#lance_o_CFLAGS = -DINCLUDE_LANCE=1 ++#ne2100_o_CFLAGS = -DINCLUDE_NE2100=1 ++#ni6510_o_CFLAGS = -DINCLUDE_NI6510=1 + natsemi_o_CFLAGS = -DINCLUDE_NATSEMI=1 +-ni5010_o_CFLAGS = -DINCLUDE_NI5010=1 +-3c503_o_CFLAGS = -DINCLUDE_3C503=1 +-ne_o_CFLAGS = -DINCLUDE_NE=1 ++#ni5010_o_CFLAGS = -DINCLUDE_NI5010=1 ++#3c503_o_CFLAGS = -DINCLUDE_3C503=1 ++#ne_o_CFLAGS = -DINCLUDE_NE=1 ++ns83820_o_CFLAGS = -DINCLUDE_NS83820=1 + ns8390_o_CFLAGS = -DINCLUDE_NS8390=1 +-wd_o_CFLAGS = -DINCLUDE_WD=1 +-otulip_o_CFLAGS = -DINCLUDE_OTULIP=1 ++#wd_o_CFLAGS = -DINCLUDE_WD=1 ++#otulip_o_CFLAGS = -DINCLUDE_OTULIP=1 ++pcnet32_o_CFLAGS = -DINCLUDE_PCNET32=1 ++pnic_o_CFLAGS = -DINCLUDE_PNIC=1 ++r8169_o_CFLAGS = -DINCLUDE_R8169=1 + rtl8139_o_CFLAGS = -DINCLUDE_RTL8139=1 + sis900_o_CFLAGS = -DINCLUDE_SIS900=1 +-sk_g16_o_CFLAGS = -DINCLUDE_SK_G16=1 +-smc9000_o_CFLAGS = -DINCLUDE_SMC9000=1 +-tiara_o_CFLAGS = -DINCLUDE_TIARA=1 +-#tlan_o_CFLAGS = -DINCLUDE_TLAN=1 ++#sk_g16_o_CFLAGS = -DINCLUDE_SK_G16=1 ++#smc9000_o_CFLAGS = -DINCLUDE_SMC9000=1 ++sundance_o_CFLAGS = -DINCLUDE_SUNDANCE=1 ++#tiara_o_CFLAGS = -DINCLUDE_TIARA=1 ++tg3_o_CFLAGS = -DINCLUDE_TG3=1 ++tlan_o_CFLAGS = -DINCLUDE_TLAN=1 + tulip_o_CFLAGS = -DINCLUDE_TULIP=1 ++undi_o_CFLAGS = -DINCLUDE_UNDI=1 + via_rhine_o_CFLAGS = -DINCLUDE_VIA_RHINE=1 + w89c840_o_CFLAGS = -DINCLUDE_W89C840=1 +diff -Naur grub-0.97.orig/netboot/Makefile.in grub-0.97/netboot/Makefile.in +--- grub-0.97.orig/netboot/Makefile.in 2005-05-08 02:42:35.000000000 +0000 ++++ grub-0.97/netboot/Makefile.in 2005-09-01 00:14:15.000000000 +0000 +@@ -48,18 +47,51 @@ + mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs + CONFIG_HEADER = $(top_builddir)/config.h + CONFIG_CLEAN_FILES = +-LIBRARIES = $(noinst_LIBRARIES) + AR = ar + ARFLAGS = cru ++LIBRARIES = $(noinst_LIBRARIES) + libdrivers_a_AR = $(AR) $(ARFLAGS) + am_libdrivers_a_OBJECTS = libdrivers_a-config.$(OBJEXT) \ +- libdrivers_a-fsys_tftp.$(OBJEXT) libdrivers_a-main.$(OBJEXT) \ +- libdrivers_a-misc.$(OBJEXT) libdrivers_a-pci.$(OBJEXT) \ +- libdrivers_a-timer.$(OBJEXT) ++ libdrivers_a-fsys_tftp.$(OBJEXT) \ ++ libdrivers_a-i386_timer.$(OBJEXT) libdrivers_a-misc.$(OBJEXT) \ ++ libdrivers_a-nic.$(OBJEXT) libdrivers_a-pci.$(OBJEXT) \ ++ libdrivers_a-pci_io.$(OBJEXT) libdrivers_a-timer.$(OBJEXT) \ ++ libdrivers_a-pic8259.$(OBJEXT) libdrivers_a-basemem.$(OBJEXT) + libdrivers_a_OBJECTS = $(am_libdrivers_a_OBJECTS) + DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles ++@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/libdrivers_a-3c595.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-3c90x.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-basemem.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-config.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-davicom.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-e1000.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-eepro100.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-epic100.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-forcedeth.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-fsys_tftp.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-i386_timer.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-misc.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-natsemi.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-nic.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-ns83820.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-ns8390.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-pci.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-pci_io.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-pcnet32.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-pic8259.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-pnic.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-pnic_api.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-r8169.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-rtl8139.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-sis900.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-tg3.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-timer.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-tlan.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-tulip.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-via-rhine.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-w89c840.Po + COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + CCLD = $(CC) +@@ -148,8 +180,6 @@ + am__include = @am__include@ + am__leading_dot = @am__leading_dot@ + am__quote = @am__quote@ +-am__tar = @am__tar@ +-am__untar = @am__untar@ + bindir = @bindir@ + build = @build@ + build_alias = @build_alias@ +@@ -186,16 +216,19 @@ + # Don't build the netboot support by default. + @NETBOOT_SUPPORT_TRUE@LIBDRIVERS = libdrivers.a + noinst_LIBRARIES = $(LIBDRIVERS) +-libdrivers_a_SOURCES = cards.h config.c etherboot.h \ +- fsys_tftp.c linux-asm-io.h linux-asm-string.h \ +- main.c misc.c nic.h osdep.h pci.c pci.h timer.c timer.h +- +-EXTRA_libdrivers_a_SOURCES = 3c509.c 3c509.h 3c595.c 3c595.h 3c90x.c \ +- cs89x0.c cs89x0.h davicom.c depca.c eepro.c eepro100.c \ +- epic100.c epic100.h fa311.c i82586.c lance.c natsemi.c \ +- ni5010.c ns8390.c ns8390.h otulip.c otulip.h rtl8139.c \ +- sis900.c sis900.h sk_g16.c sk_g16.h smc9000.c smc9000.h \ +- tiara.c tlan.c tulip.c via-rhine.c w89c840.c ++libdrivers_a_SOURCES = big_bswap.h bootp.h byteswap.h config.c cpu.h \ ++ dev.h elf.h endian.h etherboot.h fsys_tftp.c grub.h \ ++ i386_byteswap.h i386_elf.h i386_endian.h i386_timer.c \ ++ if_arp.h if_ether.h igmp.h in.h io.h ip.h isa.h latch.h \ ++ little_bswap.h misc.c nic.c nic.h osdep.h pci.c pci.h \ ++ pci_ids.h pci_io.c stdint.h tftp.h timer.c timer.h \ ++ types.h udp.h mii.h pic8259.c pic8259.h pxe.h basemem.c segoff.h ++ ++EXTRA_libdrivers_a_SOURCES = 3c595.c 3c595.h 3c90x.c davicom.c \ ++ e1000.c e1000_hw.h eepro100.c epic100.c epic100.h natsemi.c \ ++ ns8390.c ns8390.h pcnet32.c rtl8139.c sis900.c sis900.h \ ++ tg3.c tg3.h tlan.c tlan.h tulip.c via-rhine.c \ ++ w89c840.c r8169.c forcedeth.c ns83820.c pnic.c pnic_api.c + + libdrivers_a_CFLAGS = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + -DFSYS_TFTP=1 $(NET_CFLAGS) $(NET_EXTRAFLAGS) +@@ -203,69 +236,83 @@ + # Filled by configure. + libdrivers_a_LIBADD = @NETBOOT_DRIVERS@ + libdrivers_a_DEPENDENCIES = $(libdrivers_a_LIBADD) +-EXTRA_DIST = README.netboot 3c90x.txt cs89x0.txt sis900.txt tulip.txt ++EXTRA_DIST = README.netboot + + # These below are several special rules for the device drivers. + # We cannot use a simple rule for them... + + # What objects are derived from a driver? +-3c509_drivers = 3c509.o 3c529.o ++#3c509_drivers = 3c509.o 3c529.o + 3c595_drivers = 3c595.o + 3c90x_drivers = 3c90x.o +-cs89x0_drivers = cs89x0.o ++#cs89x0_drivers = cs89x0.o + davicom_drivers = davicom.o +-depca_drivers = depca.o +-eepro_drivers = eepro.o ++#depca_drivers = depca.o ++#eepro_drivers = eepro.o ++e1000_drivers = e1000.o + eepro100_drivers = eepro100.o + epic100_drivers = epic100.o + #fa311_drivers = fa311.o +-i82586_drivers = 3c507.o exos205.o ni5210.o +-lance_drivers = lance.o ne2100.o ni6510.o ++forcedeth_drivers = forcedeth.o ++#i82586_drivers = 3c507.o exos205.o ni5210.o ++#lance_drivers = lance.o ne2100.o ni6510.o + natsemi_drivers = natsemi.o +-ni5010_drivers = ni5010.o ++#ni5010_drivers = ni5010.o ++ns83820_drivers = ns83820.o + ns8390_drivers = 3c503.o ne.o ns8390.o wd.o +-otulip_drivers = otulip.o ++#otulip_drivers = otulip.o ++pcnet32_drivers = pcnet32.o ++pnic_drivers = pnic.o ++r8169_drivers = r8169.o + rtl8139_drivers = rtl8139.o + sis900_drivers = sis900.o +-sk_g16_drivers = sk_g16.o +-smc9000_drivers = smc9000.o +-tiara_drivers = tiara.o +-#tlan_drivers = tlan.o ++#sk_g16_drivers = sk_g16.o ++#smc9000_drivers = smc9000.o ++tg3_drivers = tg3.o ++#tiara_drivers = tiara.o ++tlan_drivers = tlan.o + tulip_drivers = tulip.o + via_rhine_drivers = via_rhine.o + w89c840_drivers = w89c840.o + + # Per-object flags. +-3c509_o_CFLAGS = -DINCLUDE_3C509=1 +-3c529_o_CFLAGS = -DINCLUDE_3C529=1 ++#3c509_o_CFLAGS = -DINCLUDE_3C509=1 ++#3c529_o_CFLAGS = -DINCLUDE_3C529=1 + 3c595_o_CFLAGS = -DINCLUDE_3C595=1 + 3c90x_o_CFLAGS = -DINCLUDE_3C90X=1 +-cs89x0_o_CFLAGS = -DINCLUDE_CS89X0=1 ++#cs89x0_o_CFLAGS = -DINCLUDE_CS89X0=1 + davicom_o_CFLAGS = -DINCLUDE_DAVICOM=1 +-depca_o_CFLAGS = -DINCLUDE_DEPCA=1 +-eepro_o_CFLAGS = -DINCLUDE_EEPRO=1 ++#depca_o_CFLAGS = -DINCLUDE_DEPCA=1 ++#eepro_o_CFLAGS = -DINCLUDE_EEPRO=1 ++e1000_o_CFLAGS = -DINCLUDE_E1000=1 + eepro100_o_CFLAGS = -DINCLUDE_EEPRO100=1 + epic100_o_CFLAGS = -DINCLUDE_EPIC100=1 + #fa311_o_CFLAGS = -DINCLUDE_FA311=1 +-3c507_o_CFLAGS = -DINCLUDE_3C507=1 +-exos205_o_CFLAGS = -DINCLUDE_EXOS205=1 +-ni5210_o_CFLAGS = -DINCLUDE_NI5210=1 +-lance_o_CFLAGS = -DINCLUDE_LANCE=1 +-ne2100_o_CFLAGS = -DINCLUDE_NE2100=1 +-ni6510_o_CFLAGS = -DINCLUDE_NI6510=1 ++forcedeth_o_CFLAGS = -DINCLUDE_FORCEDETH=1 ++#3c507_o_CFLAGS = -DINCLUDE_3C507=1 ++#exos205_o_CFLAGS = -DINCLUDE_EXOS205=1 ++#ni5210_o_CFLAGS = -DINCLUDE_NI5210=1 ++#lance_o_CFLAGS = -DINCLUDE_LANCE=1 ++#ne2100_o_CFLAGS = -DINCLUDE_NE2100=1 ++#ni6510_o_CFLAGS = -DINCLUDE_NI6510=1 + natsemi_o_CFLAGS = -DINCLUDE_NATSEMI=1 +-ni5010_o_CFLAGS = -DINCLUDE_NI5010=1 +-3c503_o_CFLAGS = -DINCLUDE_3C503=1 +-ne_o_CFLAGS = -DINCLUDE_NE=1 ++#ni5010_o_CFLAGS = -DINCLUDE_NI5010=1 ++#3c503_o_CFLAGS = -DINCLUDE_3C503=1 ++#ne_o_CFLAGS = -DINCLUDE_NE=1 ++ns83820_o_CFLAGS = -DINCLUDE_NS83820=1 + ns8390_o_CFLAGS = -DINCLUDE_NS8390=1 +-wd_o_CFLAGS = -DINCLUDE_WD=1 +-otulip_o_CFLAGS = -DINCLUDE_OTULIP=1 ++#wd_o_CFLAGS = -DINCLUDE_WD=1 ++#otulip_o_CFLAGS = -DINCLUDE_OTULIP=1 ++pcnet32_o_CFLAGS = -DINCLUDE_PCNET32=1 ++pnic_o_CFLAGS = -DINCLUDE_PNIC=1 ++r8169_o_CFLAGS = -DINCLUDE_R8169=1 + rtl8139_o_CFLAGS = -DINCLUDE_RTL8139=1 + sis900_o_CFLAGS = -DINCLUDE_SIS900=1 +-sk_g16_o_CFLAGS = -DINCLUDE_SK_G16=1 +-smc9000_o_CFLAGS = -DINCLUDE_SMC9000=1 +-tiara_o_CFLAGS = -DINCLUDE_TIARA=1 +-#tlan_o_CFLAGS = -DINCLUDE_TLAN=1 ++#sk_g16_o_CFLAGS = -DINCLUDE_SK_G16=1 ++#smc9000_o_CFLAGS = -DINCLUDE_SMC9000=1 ++#tiara_o_CFLAGS = -DINCLUDE_TIARA=1 ++tg3_o_CFLAGS = -DINCLUDE_TG3=1 ++tlan_o_CFLAGS = -DINCLUDE_TLAN=1 + tulip_o_CFLAGS = -DINCLUDE_TULIP=1 + via_rhine_o_CFLAGS = -DINCLUDE_VIA_RHINE=1 + w89c840_o_CFLAGS = -DINCLUDE_W89C840=1 +@@ -316,32 +363,32 @@ + distclean-compile: + -rm -f *.tab.c + +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-3c509.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-3c595.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-3c90x.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-basemem.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-config.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-cs89x0.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-davicom.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-depca.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-eepro.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-e1000.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-eepro100.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-epic100.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-fa311.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-forcedeth.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-fsys_tftp.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-i82586.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-lance.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-main.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-i386_timer.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-misc.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-natsemi.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-ni5010.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-nic.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-ns83820.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-ns8390.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-otulip.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-pci.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-pci_io.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-pcnet32.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-pic8259.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-pnic.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-pnic_api.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-r8169.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-rtl8139.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-sis900.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-sk_g16.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-smc9000.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-tiara.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-tg3.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-timer.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-tlan.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-tulip.Po@am__quote@ +@@ -352,450 +399,513 @@ + @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(COMPILE) -c $< + + .c.obj: + @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + + libdrivers_a-config.o: config.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-config.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-config.Tpo" -c -o libdrivers_a-config.o `test -f 'config.c' || echo '$(srcdir)/'`config.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-config.Tpo" "$(DEPDIR)/libdrivers_a-config.Po"; else rm -f "$(DEPDIR)/libdrivers_a-config.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config.c' object='libdrivers_a-config.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-config.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-config.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-config.o `test -f 'config.c' || echo '$(srcdir)/'`config.c + + libdrivers_a-config.obj: config.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-config.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-config.Tpo" -c -o libdrivers_a-config.obj `if test -f 'config.c'; then $(CYGPATH_W) 'config.c'; else $(CYGPATH_W) '$(srcdir)/config.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-config.Tpo" "$(DEPDIR)/libdrivers_a-config.Po"; else rm -f "$(DEPDIR)/libdrivers_a-config.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config.c' object='libdrivers_a-config.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-config.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-config.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-config.obj `if test -f 'config.c'; then $(CYGPATH_W) 'config.c'; else $(CYGPATH_W) '$(srcdir)/config.c'; fi` + + libdrivers_a-fsys_tftp.o: fsys_tftp.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-fsys_tftp.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-fsys_tftp.Tpo" -c -o libdrivers_a-fsys_tftp.o `test -f 'fsys_tftp.c' || echo '$(srcdir)/'`fsys_tftp.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-fsys_tftp.Tpo" "$(DEPDIR)/libdrivers_a-fsys_tftp.Po"; else rm -f "$(DEPDIR)/libdrivers_a-fsys_tftp.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fsys_tftp.c' object='libdrivers_a-fsys_tftp.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-fsys_tftp.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-fsys_tftp.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-fsys_tftp.o `test -f 'fsys_tftp.c' || echo '$(srcdir)/'`fsys_tftp.c + + libdrivers_a-fsys_tftp.obj: fsys_tftp.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-fsys_tftp.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-fsys_tftp.Tpo" -c -o libdrivers_a-fsys_tftp.obj `if test -f 'fsys_tftp.c'; then $(CYGPATH_W) 'fsys_tftp.c'; else $(CYGPATH_W) '$(srcdir)/fsys_tftp.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-fsys_tftp.Tpo" "$(DEPDIR)/libdrivers_a-fsys_tftp.Po"; else rm -f "$(DEPDIR)/libdrivers_a-fsys_tftp.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fsys_tftp.c' object='libdrivers_a-fsys_tftp.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-fsys_tftp.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-fsys_tftp.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-fsys_tftp.obj `if test -f 'fsys_tftp.c'; then $(CYGPATH_W) 'fsys_tftp.c'; else $(CYGPATH_W) '$(srcdir)/fsys_tftp.c'; fi` + +-libdrivers_a-main.o: main.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-main.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-main.Tpo" -c -o libdrivers_a-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-main.Tpo" "$(DEPDIR)/libdrivers_a-main.Po"; else rm -f "$(DEPDIR)/libdrivers_a-main.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='libdrivers_a-main.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c +- +-libdrivers_a-main.obj: main.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-main.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-main.Tpo" -c -o libdrivers_a-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-main.Tpo" "$(DEPDIR)/libdrivers_a-main.Po"; else rm -f "$(DEPDIR)/libdrivers_a-main.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='libdrivers_a-main.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` ++libdrivers_a-i386_timer.o: i386_timer.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-i386_timer.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-i386_timer.Tpo" -c -o libdrivers_a-i386_timer.o `test -f 'i386_timer.c' || echo '$(srcdir)/'`i386_timer.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-i386_timer.Tpo" "$(DEPDIR)/libdrivers_a-i386_timer.Po"; else rm -f "$(DEPDIR)/libdrivers_a-i386_timer.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='i386_timer.c' object='libdrivers_a-i386_timer.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-i386_timer.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-i386_timer.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-i386_timer.o `test -f 'i386_timer.c' || echo '$(srcdir)/'`i386_timer.c ++ ++libdrivers_a-i386_timer.obj: i386_timer.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-i386_timer.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-i386_timer.Tpo" -c -o libdrivers_a-i386_timer.obj `if test -f 'i386_timer.c'; then $(CYGPATH_W) 'i386_timer.c'; else $(CYGPATH_W) '$(srcdir)/i386_timer.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-i386_timer.Tpo" "$(DEPDIR)/libdrivers_a-i386_timer.Po"; else rm -f "$(DEPDIR)/libdrivers_a-i386_timer.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='i386_timer.c' object='libdrivers_a-i386_timer.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-i386_timer.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-i386_timer.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-i386_timer.obj `if test -f 'i386_timer.c'; then $(CYGPATH_W) 'i386_timer.c'; else $(CYGPATH_W) '$(srcdir)/i386_timer.c'; fi` + + libdrivers_a-misc.o: misc.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-misc.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-misc.Tpo" -c -o libdrivers_a-misc.o `test -f 'misc.c' || echo '$(srcdir)/'`misc.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-misc.Tpo" "$(DEPDIR)/libdrivers_a-misc.Po"; else rm -f "$(DEPDIR)/libdrivers_a-misc.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='misc.c' object='libdrivers_a-misc.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-misc.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-misc.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-misc.o `test -f 'misc.c' || echo '$(srcdir)/'`misc.c + + libdrivers_a-misc.obj: misc.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-misc.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-misc.Tpo" -c -o libdrivers_a-misc.obj `if test -f 'misc.c'; then $(CYGPATH_W) 'misc.c'; else $(CYGPATH_W) '$(srcdir)/misc.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-misc.Tpo" "$(DEPDIR)/libdrivers_a-misc.Po"; else rm -f "$(DEPDIR)/libdrivers_a-misc.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='misc.c' object='libdrivers_a-misc.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-misc.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-misc.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-misc.obj `if test -f 'misc.c'; then $(CYGPATH_W) 'misc.c'; else $(CYGPATH_W) '$(srcdir)/misc.c'; fi` + ++libdrivers_a-nic.o: nic.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-nic.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-nic.Tpo" -c -o libdrivers_a-nic.o `test -f 'nic.c' || echo '$(srcdir)/'`nic.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-nic.Tpo" "$(DEPDIR)/libdrivers_a-nic.Po"; else rm -f "$(DEPDIR)/libdrivers_a-nic.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nic.c' object='libdrivers_a-nic.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-nic.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-nic.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-nic.o `test -f 'nic.c' || echo '$(srcdir)/'`nic.c ++ ++libdrivers_a-nic.obj: nic.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-nic.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-nic.Tpo" -c -o libdrivers_a-nic.obj `if test -f 'nic.c'; then $(CYGPATH_W) 'nic.c'; else $(CYGPATH_W) '$(srcdir)/nic.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-nic.Tpo" "$(DEPDIR)/libdrivers_a-nic.Po"; else rm -f "$(DEPDIR)/libdrivers_a-nic.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nic.c' object='libdrivers_a-nic.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-nic.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-nic.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-nic.obj `if test -f 'nic.c'; then $(CYGPATH_W) 'nic.c'; else $(CYGPATH_W) '$(srcdir)/nic.c'; fi` ++ + libdrivers_a-pci.o: pci.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pci.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-pci.Tpo" -c -o libdrivers_a-pci.o `test -f 'pci.c' || echo '$(srcdir)/'`pci.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pci.Tpo" "$(DEPDIR)/libdrivers_a-pci.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pci.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pci.c' object='libdrivers_a-pci.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pci.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pci.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pci.o `test -f 'pci.c' || echo '$(srcdir)/'`pci.c + + libdrivers_a-pci.obj: pci.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pci.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-pci.Tpo" -c -o libdrivers_a-pci.obj `if test -f 'pci.c'; then $(CYGPATH_W) 'pci.c'; else $(CYGPATH_W) '$(srcdir)/pci.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pci.Tpo" "$(DEPDIR)/libdrivers_a-pci.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pci.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pci.c' object='libdrivers_a-pci.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pci.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pci.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pci.obj `if test -f 'pci.c'; then $(CYGPATH_W) 'pci.c'; else $(CYGPATH_W) '$(srcdir)/pci.c'; fi` + ++libdrivers_a-pci_io.o: pci_io.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pci_io.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-pci_io.Tpo" -c -o libdrivers_a-pci_io.o `test -f 'pci_io.c' || echo '$(srcdir)/'`pci_io.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pci_io.Tpo" "$(DEPDIR)/libdrivers_a-pci_io.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pci_io.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pci_io.c' object='libdrivers_a-pci_io.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pci_io.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pci_io.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pci_io.o `test -f 'pci_io.c' || echo '$(srcdir)/'`pci_io.c ++ ++libdrivers_a-pci_io.obj: pci_io.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pci_io.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-pci_io.Tpo" -c -o libdrivers_a-pci_io.obj `if test -f 'pci_io.c'; then $(CYGPATH_W) 'pci_io.c'; else $(CYGPATH_W) '$(srcdir)/pci_io.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pci_io.Tpo" "$(DEPDIR)/libdrivers_a-pci_io.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pci_io.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pci_io.c' object='libdrivers_a-pci_io.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pci_io.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pci_io.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pci_io.obj `if test -f 'pci_io.c'; then $(CYGPATH_W) 'pci_io.c'; else $(CYGPATH_W) '$(srcdir)/pci_io.c'; fi` ++ + libdrivers_a-timer.o: timer.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-timer.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-timer.Tpo" -c -o libdrivers_a-timer.o `test -f 'timer.c' || echo '$(srcdir)/'`timer.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-timer.Tpo" "$(DEPDIR)/libdrivers_a-timer.Po"; else rm -f "$(DEPDIR)/libdrivers_a-timer.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='timer.c' object='libdrivers_a-timer.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-timer.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-timer.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-timer.o `test -f 'timer.c' || echo '$(srcdir)/'`timer.c + + libdrivers_a-timer.obj: timer.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-timer.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-timer.Tpo" -c -o libdrivers_a-timer.obj `if test -f 'timer.c'; then $(CYGPATH_W) 'timer.c'; else $(CYGPATH_W) '$(srcdir)/timer.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-timer.Tpo" "$(DEPDIR)/libdrivers_a-timer.Po"; else rm -f "$(DEPDIR)/libdrivers_a-timer.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='timer.c' object='libdrivers_a-timer.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-timer.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-timer.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-timer.obj `if test -f 'timer.c'; then $(CYGPATH_W) 'timer.c'; else $(CYGPATH_W) '$(srcdir)/timer.c'; fi` + +-libdrivers_a-3c509.o: 3c509.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-3c509.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-3c509.Tpo" -c -o libdrivers_a-3c509.o `test -f '3c509.c' || echo '$(srcdir)/'`3c509.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-3c509.Tpo" "$(DEPDIR)/libdrivers_a-3c509.Po"; else rm -f "$(DEPDIR)/libdrivers_a-3c509.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='3c509.c' object='libdrivers_a-3c509.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-3c509.o `test -f '3c509.c' || echo '$(srcdir)/'`3c509.c +- +-libdrivers_a-3c509.obj: 3c509.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-3c509.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-3c509.Tpo" -c -o libdrivers_a-3c509.obj `if test -f '3c509.c'; then $(CYGPATH_W) '3c509.c'; else $(CYGPATH_W) '$(srcdir)/3c509.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-3c509.Tpo" "$(DEPDIR)/libdrivers_a-3c509.Po"; else rm -f "$(DEPDIR)/libdrivers_a-3c509.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='3c509.c' object='libdrivers_a-3c509.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-3c509.obj `if test -f '3c509.c'; then $(CYGPATH_W) '3c509.c'; else $(CYGPATH_W) '$(srcdir)/3c509.c'; fi` ++libdrivers_a-pic8259.o: pic8259.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pic8259.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-pic8259.Tpo" -c -o libdrivers_a-pic8259.o `test -f 'pic8259.c' || echo '$(srcdir)/'`pic8259.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pic8259.Tpo" "$(DEPDIR)/libdrivers_a-pic8259.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pic8259.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pic8259.c' object='libdrivers_a-pic8259.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pic8259.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pic8259.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pic8259.o `test -f 'pic8259.c' || echo '$(srcdir)/'`pic8259.c ++ ++libdrivers_a-pic8259.obj: pic8259.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pic8259.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-pic8259.Tpo" -c -o libdrivers_a-pic8259.obj `if test -f 'pic8259.c'; then $(CYGPATH_W) 'pic8259.c'; else $(CYGPATH_W) '$(srcdir)/pic8259.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pic8259.Tpo" "$(DEPDIR)/libdrivers_a-pic8259.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pic8259.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pic8259.c' object='libdrivers_a-pic8259.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pic8259.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pic8259.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pic8259.obj `if test -f 'pic8259.c'; then $(CYGPATH_W) 'pic8259.c'; else $(CYGPATH_W) '$(srcdir)/pic8259.c'; fi` ++ ++libdrivers_a-basemem.o: basemem.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-basemem.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-basemem.Tpo" -c -o libdrivers_a-basemem.o `test -f 'basemem.c' || echo '$(srcdir)/'`basemem.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-basemem.Tpo" "$(DEPDIR)/libdrivers_a-basemem.Po"; else rm -f "$(DEPDIR)/libdrivers_a-basemem.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='basemem.c' object='libdrivers_a-basemem.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-basemem.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-basemem.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-basemem.o `test -f 'basemem.c' || echo '$(srcdir)/'`basemem.c ++ ++libdrivers_a-basemem.obj: basemem.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-basemem.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-basemem.Tpo" -c -o libdrivers_a-basemem.obj `if test -f 'basemem.c'; then $(CYGPATH_W) 'basemem.c'; else $(CYGPATH_W) '$(srcdir)/basemem.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-basemem.Tpo" "$(DEPDIR)/libdrivers_a-basemem.Po"; else rm -f "$(DEPDIR)/libdrivers_a-basemem.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='basemem.c' object='libdrivers_a-basemem.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-basemem.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-basemem.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-basemem.obj `if test -f 'basemem.c'; then $(CYGPATH_W) 'basemem.c'; else $(CYGPATH_W) '$(srcdir)/basemem.c'; fi` + + libdrivers_a-3c595.o: 3c595.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-3c595.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-3c595.Tpo" -c -o libdrivers_a-3c595.o `test -f '3c595.c' || echo '$(srcdir)/'`3c595.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-3c595.Tpo" "$(DEPDIR)/libdrivers_a-3c595.Po"; else rm -f "$(DEPDIR)/libdrivers_a-3c595.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='3c595.c' object='libdrivers_a-3c595.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-3c595.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-3c595.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-3c595.o `test -f '3c595.c' || echo '$(srcdir)/'`3c595.c + + libdrivers_a-3c595.obj: 3c595.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-3c595.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-3c595.Tpo" -c -o libdrivers_a-3c595.obj `if test -f '3c595.c'; then $(CYGPATH_W) '3c595.c'; else $(CYGPATH_W) '$(srcdir)/3c595.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-3c595.Tpo" "$(DEPDIR)/libdrivers_a-3c595.Po"; else rm -f "$(DEPDIR)/libdrivers_a-3c595.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='3c595.c' object='libdrivers_a-3c595.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-3c595.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-3c595.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-3c595.obj `if test -f '3c595.c'; then $(CYGPATH_W) '3c595.c'; else $(CYGPATH_W) '$(srcdir)/3c595.c'; fi` + + libdrivers_a-3c90x.o: 3c90x.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-3c90x.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-3c90x.Tpo" -c -o libdrivers_a-3c90x.o `test -f '3c90x.c' || echo '$(srcdir)/'`3c90x.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-3c90x.Tpo" "$(DEPDIR)/libdrivers_a-3c90x.Po"; else rm -f "$(DEPDIR)/libdrivers_a-3c90x.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='3c90x.c' object='libdrivers_a-3c90x.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-3c90x.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-3c90x.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-3c90x.o `test -f '3c90x.c' || echo '$(srcdir)/'`3c90x.c + + libdrivers_a-3c90x.obj: 3c90x.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-3c90x.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-3c90x.Tpo" -c -o libdrivers_a-3c90x.obj `if test -f '3c90x.c'; then $(CYGPATH_W) '3c90x.c'; else $(CYGPATH_W) '$(srcdir)/3c90x.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-3c90x.Tpo" "$(DEPDIR)/libdrivers_a-3c90x.Po"; else rm -f "$(DEPDIR)/libdrivers_a-3c90x.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='3c90x.c' object='libdrivers_a-3c90x.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-3c90x.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-3c90x.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-3c90x.obj `if test -f '3c90x.c'; then $(CYGPATH_W) '3c90x.c'; else $(CYGPATH_W) '$(srcdir)/3c90x.c'; fi` + +-libdrivers_a-cs89x0.o: cs89x0.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-cs89x0.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-cs89x0.Tpo" -c -o libdrivers_a-cs89x0.o `test -f 'cs89x0.c' || echo '$(srcdir)/'`cs89x0.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-cs89x0.Tpo" "$(DEPDIR)/libdrivers_a-cs89x0.Po"; else rm -f "$(DEPDIR)/libdrivers_a-cs89x0.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cs89x0.c' object='libdrivers_a-cs89x0.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-cs89x0.o `test -f 'cs89x0.c' || echo '$(srcdir)/'`cs89x0.c +- +-libdrivers_a-cs89x0.obj: cs89x0.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-cs89x0.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-cs89x0.Tpo" -c -o libdrivers_a-cs89x0.obj `if test -f 'cs89x0.c'; then $(CYGPATH_W) 'cs89x0.c'; else $(CYGPATH_W) '$(srcdir)/cs89x0.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-cs89x0.Tpo" "$(DEPDIR)/libdrivers_a-cs89x0.Po"; else rm -f "$(DEPDIR)/libdrivers_a-cs89x0.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cs89x0.c' object='libdrivers_a-cs89x0.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-cs89x0.obj `if test -f 'cs89x0.c'; then $(CYGPATH_W) 'cs89x0.c'; else $(CYGPATH_W) '$(srcdir)/cs89x0.c'; fi` +- + libdrivers_a-davicom.o: davicom.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-davicom.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-davicom.Tpo" -c -o libdrivers_a-davicom.o `test -f 'davicom.c' || echo '$(srcdir)/'`davicom.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-davicom.Tpo" "$(DEPDIR)/libdrivers_a-davicom.Po"; else rm -f "$(DEPDIR)/libdrivers_a-davicom.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='davicom.c' object='libdrivers_a-davicom.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-davicom.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-davicom.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-davicom.o `test -f 'davicom.c' || echo '$(srcdir)/'`davicom.c + + libdrivers_a-davicom.obj: davicom.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-davicom.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-davicom.Tpo" -c -o libdrivers_a-davicom.obj `if test -f 'davicom.c'; then $(CYGPATH_W) 'davicom.c'; else $(CYGPATH_W) '$(srcdir)/davicom.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-davicom.Tpo" "$(DEPDIR)/libdrivers_a-davicom.Po"; else rm -f "$(DEPDIR)/libdrivers_a-davicom.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='davicom.c' object='libdrivers_a-davicom.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-davicom.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-davicom.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-davicom.obj `if test -f 'davicom.c'; then $(CYGPATH_W) 'davicom.c'; else $(CYGPATH_W) '$(srcdir)/davicom.c'; fi` + +-libdrivers_a-depca.o: depca.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-depca.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-depca.Tpo" -c -o libdrivers_a-depca.o `test -f 'depca.c' || echo '$(srcdir)/'`depca.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-depca.Tpo" "$(DEPDIR)/libdrivers_a-depca.Po"; else rm -f "$(DEPDIR)/libdrivers_a-depca.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='depca.c' object='libdrivers_a-depca.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-depca.o `test -f 'depca.c' || echo '$(srcdir)/'`depca.c +- +-libdrivers_a-depca.obj: depca.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-depca.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-depca.Tpo" -c -o libdrivers_a-depca.obj `if test -f 'depca.c'; then $(CYGPATH_W) 'depca.c'; else $(CYGPATH_W) '$(srcdir)/depca.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-depca.Tpo" "$(DEPDIR)/libdrivers_a-depca.Po"; else rm -f "$(DEPDIR)/libdrivers_a-depca.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='depca.c' object='libdrivers_a-depca.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-depca.obj `if test -f 'depca.c'; then $(CYGPATH_W) 'depca.c'; else $(CYGPATH_W) '$(srcdir)/depca.c'; fi` +- +-libdrivers_a-eepro.o: eepro.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-eepro.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-eepro.Tpo" -c -o libdrivers_a-eepro.o `test -f 'eepro.c' || echo '$(srcdir)/'`eepro.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-eepro.Tpo" "$(DEPDIR)/libdrivers_a-eepro.Po"; else rm -f "$(DEPDIR)/libdrivers_a-eepro.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eepro.c' object='libdrivers_a-eepro.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-eepro.o `test -f 'eepro.c' || echo '$(srcdir)/'`eepro.c +- +-libdrivers_a-eepro.obj: eepro.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-eepro.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-eepro.Tpo" -c -o libdrivers_a-eepro.obj `if test -f 'eepro.c'; then $(CYGPATH_W) 'eepro.c'; else $(CYGPATH_W) '$(srcdir)/eepro.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-eepro.Tpo" "$(DEPDIR)/libdrivers_a-eepro.Po"; else rm -f "$(DEPDIR)/libdrivers_a-eepro.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eepro.c' object='libdrivers_a-eepro.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-eepro.obj `if test -f 'eepro.c'; then $(CYGPATH_W) 'eepro.c'; else $(CYGPATH_W) '$(srcdir)/eepro.c'; fi` ++libdrivers_a-e1000.o: e1000.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-e1000.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-e1000.Tpo" -c -o libdrivers_a-e1000.o `test -f 'e1000.c' || echo '$(srcdir)/'`e1000.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-e1000.Tpo" "$(DEPDIR)/libdrivers_a-e1000.Po"; else rm -f "$(DEPDIR)/libdrivers_a-e1000.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='e1000.c' object='libdrivers_a-e1000.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-e1000.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-e1000.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-e1000.o `test -f 'e1000.c' || echo '$(srcdir)/'`e1000.c ++ ++libdrivers_a-e1000.obj: e1000.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-e1000.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-e1000.Tpo" -c -o libdrivers_a-e1000.obj `if test -f 'e1000.c'; then $(CYGPATH_W) 'e1000.c'; else $(CYGPATH_W) '$(srcdir)/e1000.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-e1000.Tpo" "$(DEPDIR)/libdrivers_a-e1000.Po"; else rm -f "$(DEPDIR)/libdrivers_a-e1000.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='e1000.c' object='libdrivers_a-e1000.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-e1000.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-e1000.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-e1000.obj `if test -f 'e1000.c'; then $(CYGPATH_W) 'e1000.c'; else $(CYGPATH_W) '$(srcdir)/e1000.c'; fi` + + libdrivers_a-eepro100.o: eepro100.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-eepro100.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-eepro100.Tpo" -c -o libdrivers_a-eepro100.o `test -f 'eepro100.c' || echo '$(srcdir)/'`eepro100.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-eepro100.Tpo" "$(DEPDIR)/libdrivers_a-eepro100.Po"; else rm -f "$(DEPDIR)/libdrivers_a-eepro100.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eepro100.c' object='libdrivers_a-eepro100.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-eepro100.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-eepro100.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-eepro100.o `test -f 'eepro100.c' || echo '$(srcdir)/'`eepro100.c + + libdrivers_a-eepro100.obj: eepro100.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-eepro100.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-eepro100.Tpo" -c -o libdrivers_a-eepro100.obj `if test -f 'eepro100.c'; then $(CYGPATH_W) 'eepro100.c'; else $(CYGPATH_W) '$(srcdir)/eepro100.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-eepro100.Tpo" "$(DEPDIR)/libdrivers_a-eepro100.Po"; else rm -f "$(DEPDIR)/libdrivers_a-eepro100.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eepro100.c' object='libdrivers_a-eepro100.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-eepro100.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-eepro100.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-eepro100.obj `if test -f 'eepro100.c'; then $(CYGPATH_W) 'eepro100.c'; else $(CYGPATH_W) '$(srcdir)/eepro100.c'; fi` + + libdrivers_a-epic100.o: epic100.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-epic100.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-epic100.Tpo" -c -o libdrivers_a-epic100.o `test -f 'epic100.c' || echo '$(srcdir)/'`epic100.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-epic100.Tpo" "$(DEPDIR)/libdrivers_a-epic100.Po"; else rm -f "$(DEPDIR)/libdrivers_a-epic100.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='epic100.c' object='libdrivers_a-epic100.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-epic100.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-epic100.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-epic100.o `test -f 'epic100.c' || echo '$(srcdir)/'`epic100.c + + libdrivers_a-epic100.obj: epic100.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-epic100.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-epic100.Tpo" -c -o libdrivers_a-epic100.obj `if test -f 'epic100.c'; then $(CYGPATH_W) 'epic100.c'; else $(CYGPATH_W) '$(srcdir)/epic100.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-epic100.Tpo" "$(DEPDIR)/libdrivers_a-epic100.Po"; else rm -f "$(DEPDIR)/libdrivers_a-epic100.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='epic100.c' object='libdrivers_a-epic100.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-epic100.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-epic100.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-epic100.obj `if test -f 'epic100.c'; then $(CYGPATH_W) 'epic100.c'; else $(CYGPATH_W) '$(srcdir)/epic100.c'; fi` + +-libdrivers_a-fa311.o: fa311.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-fa311.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-fa311.Tpo" -c -o libdrivers_a-fa311.o `test -f 'fa311.c' || echo '$(srcdir)/'`fa311.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-fa311.Tpo" "$(DEPDIR)/libdrivers_a-fa311.Po"; else rm -f "$(DEPDIR)/libdrivers_a-fa311.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fa311.c' object='libdrivers_a-fa311.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-fa311.o `test -f 'fa311.c' || echo '$(srcdir)/'`fa311.c +- +-libdrivers_a-fa311.obj: fa311.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-fa311.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-fa311.Tpo" -c -o libdrivers_a-fa311.obj `if test -f 'fa311.c'; then $(CYGPATH_W) 'fa311.c'; else $(CYGPATH_W) '$(srcdir)/fa311.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-fa311.Tpo" "$(DEPDIR)/libdrivers_a-fa311.Po"; else rm -f "$(DEPDIR)/libdrivers_a-fa311.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fa311.c' object='libdrivers_a-fa311.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-fa311.obj `if test -f 'fa311.c'; then $(CYGPATH_W) 'fa311.c'; else $(CYGPATH_W) '$(srcdir)/fa311.c'; fi` +- +-libdrivers_a-i82586.o: i82586.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-i82586.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-i82586.Tpo" -c -o libdrivers_a-i82586.o `test -f 'i82586.c' || echo '$(srcdir)/'`i82586.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-i82586.Tpo" "$(DEPDIR)/libdrivers_a-i82586.Po"; else rm -f "$(DEPDIR)/libdrivers_a-i82586.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='i82586.c' object='libdrivers_a-i82586.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-i82586.o `test -f 'i82586.c' || echo '$(srcdir)/'`i82586.c +- +-libdrivers_a-i82586.obj: i82586.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-i82586.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-i82586.Tpo" -c -o libdrivers_a-i82586.obj `if test -f 'i82586.c'; then $(CYGPATH_W) 'i82586.c'; else $(CYGPATH_W) '$(srcdir)/i82586.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-i82586.Tpo" "$(DEPDIR)/libdrivers_a-i82586.Po"; else rm -f "$(DEPDIR)/libdrivers_a-i82586.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='i82586.c' object='libdrivers_a-i82586.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-i82586.obj `if test -f 'i82586.c'; then $(CYGPATH_W) 'i82586.c'; else $(CYGPATH_W) '$(srcdir)/i82586.c'; fi` +- +-libdrivers_a-lance.o: lance.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-lance.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-lance.Tpo" -c -o libdrivers_a-lance.o `test -f 'lance.c' || echo '$(srcdir)/'`lance.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-lance.Tpo" "$(DEPDIR)/libdrivers_a-lance.Po"; else rm -f "$(DEPDIR)/libdrivers_a-lance.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lance.c' object='libdrivers_a-lance.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-lance.o `test -f 'lance.c' || echo '$(srcdir)/'`lance.c +- +-libdrivers_a-lance.obj: lance.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-lance.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-lance.Tpo" -c -o libdrivers_a-lance.obj `if test -f 'lance.c'; then $(CYGPATH_W) 'lance.c'; else $(CYGPATH_W) '$(srcdir)/lance.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-lance.Tpo" "$(DEPDIR)/libdrivers_a-lance.Po"; else rm -f "$(DEPDIR)/libdrivers_a-lance.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lance.c' object='libdrivers_a-lance.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-lance.obj `if test -f 'lance.c'; then $(CYGPATH_W) 'lance.c'; else $(CYGPATH_W) '$(srcdir)/lance.c'; fi` +- + libdrivers_a-natsemi.o: natsemi.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-natsemi.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-natsemi.Tpo" -c -o libdrivers_a-natsemi.o `test -f 'natsemi.c' || echo '$(srcdir)/'`natsemi.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-natsemi.Tpo" "$(DEPDIR)/libdrivers_a-natsemi.Po"; else rm -f "$(DEPDIR)/libdrivers_a-natsemi.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='natsemi.c' object='libdrivers_a-natsemi.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-natsemi.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-natsemi.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-natsemi.o `test -f 'natsemi.c' || echo '$(srcdir)/'`natsemi.c + + libdrivers_a-natsemi.obj: natsemi.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-natsemi.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-natsemi.Tpo" -c -o libdrivers_a-natsemi.obj `if test -f 'natsemi.c'; then $(CYGPATH_W) 'natsemi.c'; else $(CYGPATH_W) '$(srcdir)/natsemi.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-natsemi.Tpo" "$(DEPDIR)/libdrivers_a-natsemi.Po"; else rm -f "$(DEPDIR)/libdrivers_a-natsemi.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='natsemi.c' object='libdrivers_a-natsemi.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-natsemi.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-natsemi.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-natsemi.obj `if test -f 'natsemi.c'; then $(CYGPATH_W) 'natsemi.c'; else $(CYGPATH_W) '$(srcdir)/natsemi.c'; fi` + +-libdrivers_a-ni5010.o: ni5010.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-ni5010.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-ni5010.Tpo" -c -o libdrivers_a-ni5010.o `test -f 'ni5010.c' || echo '$(srcdir)/'`ni5010.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-ni5010.Tpo" "$(DEPDIR)/libdrivers_a-ni5010.Po"; else rm -f "$(DEPDIR)/libdrivers_a-ni5010.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ni5010.c' object='libdrivers_a-ni5010.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-ni5010.o `test -f 'ni5010.c' || echo '$(srcdir)/'`ni5010.c +- +-libdrivers_a-ni5010.obj: ni5010.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-ni5010.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-ni5010.Tpo" -c -o libdrivers_a-ni5010.obj `if test -f 'ni5010.c'; then $(CYGPATH_W) 'ni5010.c'; else $(CYGPATH_W) '$(srcdir)/ni5010.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-ni5010.Tpo" "$(DEPDIR)/libdrivers_a-ni5010.Po"; else rm -f "$(DEPDIR)/libdrivers_a-ni5010.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ni5010.c' object='libdrivers_a-ni5010.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-ni5010.obj `if test -f 'ni5010.c'; then $(CYGPATH_W) 'ni5010.c'; else $(CYGPATH_W) '$(srcdir)/ni5010.c'; fi` +- + libdrivers_a-ns8390.o: ns8390.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-ns8390.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-ns8390.Tpo" -c -o libdrivers_a-ns8390.o `test -f 'ns8390.c' || echo '$(srcdir)/'`ns8390.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-ns8390.Tpo" "$(DEPDIR)/libdrivers_a-ns8390.Po"; else rm -f "$(DEPDIR)/libdrivers_a-ns8390.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ns8390.c' object='libdrivers_a-ns8390.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-ns8390.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-ns8390.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-ns8390.o `test -f 'ns8390.c' || echo '$(srcdir)/'`ns8390.c + + libdrivers_a-ns8390.obj: ns8390.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-ns8390.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-ns8390.Tpo" -c -o libdrivers_a-ns8390.obj `if test -f 'ns8390.c'; then $(CYGPATH_W) 'ns8390.c'; else $(CYGPATH_W) '$(srcdir)/ns8390.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-ns8390.Tpo" "$(DEPDIR)/libdrivers_a-ns8390.Po"; else rm -f "$(DEPDIR)/libdrivers_a-ns8390.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ns8390.c' object='libdrivers_a-ns8390.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-ns8390.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-ns8390.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-ns8390.obj `if test -f 'ns8390.c'; then $(CYGPATH_W) 'ns8390.c'; else $(CYGPATH_W) '$(srcdir)/ns8390.c'; fi` + +-libdrivers_a-otulip.o: otulip.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-otulip.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-otulip.Tpo" -c -o libdrivers_a-otulip.o `test -f 'otulip.c' || echo '$(srcdir)/'`otulip.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-otulip.Tpo" "$(DEPDIR)/libdrivers_a-otulip.Po"; else rm -f "$(DEPDIR)/libdrivers_a-otulip.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='otulip.c' object='libdrivers_a-otulip.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-otulip.o `test -f 'otulip.c' || echo '$(srcdir)/'`otulip.c +- +-libdrivers_a-otulip.obj: otulip.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-otulip.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-otulip.Tpo" -c -o libdrivers_a-otulip.obj `if test -f 'otulip.c'; then $(CYGPATH_W) 'otulip.c'; else $(CYGPATH_W) '$(srcdir)/otulip.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-otulip.Tpo" "$(DEPDIR)/libdrivers_a-otulip.Po"; else rm -f "$(DEPDIR)/libdrivers_a-otulip.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='otulip.c' object='libdrivers_a-otulip.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-otulip.obj `if test -f 'otulip.c'; then $(CYGPATH_W) 'otulip.c'; else $(CYGPATH_W) '$(srcdir)/otulip.c'; fi` ++libdrivers_a-pcnet32.o: pcnet32.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pcnet32.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-pcnet32.Tpo" -c -o libdrivers_a-pcnet32.o `test -f 'pcnet32.c' || echo '$(srcdir)/'`pcnet32.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pcnet32.Tpo" "$(DEPDIR)/libdrivers_a-pcnet32.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pcnet32.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pcnet32.c' object='libdrivers_a-pcnet32.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pcnet32.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pcnet32.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pcnet32.o `test -f 'pcnet32.c' || echo '$(srcdir)/'`pcnet32.c ++ ++libdrivers_a-pcnet32.obj: pcnet32.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pcnet32.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-pcnet32.Tpo" -c -o libdrivers_a-pcnet32.obj `if test -f 'pcnet32.c'; then $(CYGPATH_W) 'pcnet32.c'; else $(CYGPATH_W) '$(srcdir)/pcnet32.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pcnet32.Tpo" "$(DEPDIR)/libdrivers_a-pcnet32.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pcnet32.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pcnet32.c' object='libdrivers_a-pcnet32.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pcnet32.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pcnet32.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pcnet32.obj `if test -f 'pcnet32.c'; then $(CYGPATH_W) 'pcnet32.c'; else $(CYGPATH_W) '$(srcdir)/pcnet32.c'; fi` + + libdrivers_a-rtl8139.o: rtl8139.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-rtl8139.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-rtl8139.Tpo" -c -o libdrivers_a-rtl8139.o `test -f 'rtl8139.c' || echo '$(srcdir)/'`rtl8139.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-rtl8139.Tpo" "$(DEPDIR)/libdrivers_a-rtl8139.Po"; else rm -f "$(DEPDIR)/libdrivers_a-rtl8139.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rtl8139.c' object='libdrivers_a-rtl8139.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-rtl8139.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-rtl8139.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-rtl8139.o `test -f 'rtl8139.c' || echo '$(srcdir)/'`rtl8139.c + + libdrivers_a-rtl8139.obj: rtl8139.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-rtl8139.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-rtl8139.Tpo" -c -o libdrivers_a-rtl8139.obj `if test -f 'rtl8139.c'; then $(CYGPATH_W) 'rtl8139.c'; else $(CYGPATH_W) '$(srcdir)/rtl8139.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-rtl8139.Tpo" "$(DEPDIR)/libdrivers_a-rtl8139.Po"; else rm -f "$(DEPDIR)/libdrivers_a-rtl8139.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rtl8139.c' object='libdrivers_a-rtl8139.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-rtl8139.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-rtl8139.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-rtl8139.obj `if test -f 'rtl8139.c'; then $(CYGPATH_W) 'rtl8139.c'; else $(CYGPATH_W) '$(srcdir)/rtl8139.c'; fi` + + libdrivers_a-sis900.o: sis900.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-sis900.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-sis900.Tpo" -c -o libdrivers_a-sis900.o `test -f 'sis900.c' || echo '$(srcdir)/'`sis900.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-sis900.Tpo" "$(DEPDIR)/libdrivers_a-sis900.Po"; else rm -f "$(DEPDIR)/libdrivers_a-sis900.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sis900.c' object='libdrivers_a-sis900.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-sis900.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-sis900.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-sis900.o `test -f 'sis900.c' || echo '$(srcdir)/'`sis900.c + + libdrivers_a-sis900.obj: sis900.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-sis900.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-sis900.Tpo" -c -o libdrivers_a-sis900.obj `if test -f 'sis900.c'; then $(CYGPATH_W) 'sis900.c'; else $(CYGPATH_W) '$(srcdir)/sis900.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-sis900.Tpo" "$(DEPDIR)/libdrivers_a-sis900.Po"; else rm -f "$(DEPDIR)/libdrivers_a-sis900.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sis900.c' object='libdrivers_a-sis900.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-sis900.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-sis900.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-sis900.obj `if test -f 'sis900.c'; then $(CYGPATH_W) 'sis900.c'; else $(CYGPATH_W) '$(srcdir)/sis900.c'; fi` + +-libdrivers_a-sk_g16.o: sk_g16.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-sk_g16.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-sk_g16.Tpo" -c -o libdrivers_a-sk_g16.o `test -f 'sk_g16.c' || echo '$(srcdir)/'`sk_g16.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-sk_g16.Tpo" "$(DEPDIR)/libdrivers_a-sk_g16.Po"; else rm -f "$(DEPDIR)/libdrivers_a-sk_g16.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sk_g16.c' object='libdrivers_a-sk_g16.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-sk_g16.o `test -f 'sk_g16.c' || echo '$(srcdir)/'`sk_g16.c +- +-libdrivers_a-sk_g16.obj: sk_g16.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-sk_g16.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-sk_g16.Tpo" -c -o libdrivers_a-sk_g16.obj `if test -f 'sk_g16.c'; then $(CYGPATH_W) 'sk_g16.c'; else $(CYGPATH_W) '$(srcdir)/sk_g16.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-sk_g16.Tpo" "$(DEPDIR)/libdrivers_a-sk_g16.Po"; else rm -f "$(DEPDIR)/libdrivers_a-sk_g16.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sk_g16.c' object='libdrivers_a-sk_g16.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-sk_g16.obj `if test -f 'sk_g16.c'; then $(CYGPATH_W) 'sk_g16.c'; else $(CYGPATH_W) '$(srcdir)/sk_g16.c'; fi` +- +-libdrivers_a-smc9000.o: smc9000.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-smc9000.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-smc9000.Tpo" -c -o libdrivers_a-smc9000.o `test -f 'smc9000.c' || echo '$(srcdir)/'`smc9000.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-smc9000.Tpo" "$(DEPDIR)/libdrivers_a-smc9000.Po"; else rm -f "$(DEPDIR)/libdrivers_a-smc9000.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='smc9000.c' object='libdrivers_a-smc9000.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-smc9000.o `test -f 'smc9000.c' || echo '$(srcdir)/'`smc9000.c +- +-libdrivers_a-smc9000.obj: smc9000.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-smc9000.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-smc9000.Tpo" -c -o libdrivers_a-smc9000.obj `if test -f 'smc9000.c'; then $(CYGPATH_W) 'smc9000.c'; else $(CYGPATH_W) '$(srcdir)/smc9000.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-smc9000.Tpo" "$(DEPDIR)/libdrivers_a-smc9000.Po"; else rm -f "$(DEPDIR)/libdrivers_a-smc9000.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='smc9000.c' object='libdrivers_a-smc9000.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-smc9000.obj `if test -f 'smc9000.c'; then $(CYGPATH_W) 'smc9000.c'; else $(CYGPATH_W) '$(srcdir)/smc9000.c'; fi` +- +-libdrivers_a-tiara.o: tiara.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-tiara.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-tiara.Tpo" -c -o libdrivers_a-tiara.o `test -f 'tiara.c' || echo '$(srcdir)/'`tiara.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-tiara.Tpo" "$(DEPDIR)/libdrivers_a-tiara.Po"; else rm -f "$(DEPDIR)/libdrivers_a-tiara.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tiara.c' object='libdrivers_a-tiara.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-tiara.o `test -f 'tiara.c' || echo '$(srcdir)/'`tiara.c +- +-libdrivers_a-tiara.obj: tiara.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-tiara.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-tiara.Tpo" -c -o libdrivers_a-tiara.obj `if test -f 'tiara.c'; then $(CYGPATH_W) 'tiara.c'; else $(CYGPATH_W) '$(srcdir)/tiara.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-tiara.Tpo" "$(DEPDIR)/libdrivers_a-tiara.Po"; else rm -f "$(DEPDIR)/libdrivers_a-tiara.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tiara.c' object='libdrivers_a-tiara.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-tiara.obj `if test -f 'tiara.c'; then $(CYGPATH_W) 'tiara.c'; else $(CYGPATH_W) '$(srcdir)/tiara.c'; fi` ++libdrivers_a-tg3.o: tg3.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-tg3.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-tg3.Tpo" -c -o libdrivers_a-tg3.o `test -f 'tg3.c' || echo '$(srcdir)/'`tg3.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-tg3.Tpo" "$(DEPDIR)/libdrivers_a-tg3.Po"; else rm -f "$(DEPDIR)/libdrivers_a-tg3.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tg3.c' object='libdrivers_a-tg3.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-tg3.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-tg3.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-tg3.o `test -f 'tg3.c' || echo '$(srcdir)/'`tg3.c ++ ++libdrivers_a-tg3.obj: tg3.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-tg3.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-tg3.Tpo" -c -o libdrivers_a-tg3.obj `if test -f 'tg3.c'; then $(CYGPATH_W) 'tg3.c'; else $(CYGPATH_W) '$(srcdir)/tg3.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-tg3.Tpo" "$(DEPDIR)/libdrivers_a-tg3.Po"; else rm -f "$(DEPDIR)/libdrivers_a-tg3.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tg3.c' object='libdrivers_a-tg3.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-tg3.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-tg3.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-tg3.obj `if test -f 'tg3.c'; then $(CYGPATH_W) 'tg3.c'; else $(CYGPATH_W) '$(srcdir)/tg3.c'; fi` + + libdrivers_a-tlan.o: tlan.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-tlan.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-tlan.Tpo" -c -o libdrivers_a-tlan.o `test -f 'tlan.c' || echo '$(srcdir)/'`tlan.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-tlan.Tpo" "$(DEPDIR)/libdrivers_a-tlan.Po"; else rm -f "$(DEPDIR)/libdrivers_a-tlan.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tlan.c' object='libdrivers_a-tlan.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-tlan.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-tlan.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-tlan.o `test -f 'tlan.c' || echo '$(srcdir)/'`tlan.c + + libdrivers_a-tlan.obj: tlan.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-tlan.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-tlan.Tpo" -c -o libdrivers_a-tlan.obj `if test -f 'tlan.c'; then $(CYGPATH_W) 'tlan.c'; else $(CYGPATH_W) '$(srcdir)/tlan.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-tlan.Tpo" "$(DEPDIR)/libdrivers_a-tlan.Po"; else rm -f "$(DEPDIR)/libdrivers_a-tlan.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tlan.c' object='libdrivers_a-tlan.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-tlan.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-tlan.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-tlan.obj `if test -f 'tlan.c'; then $(CYGPATH_W) 'tlan.c'; else $(CYGPATH_W) '$(srcdir)/tlan.c'; fi` + + libdrivers_a-tulip.o: tulip.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-tulip.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-tulip.Tpo" -c -o libdrivers_a-tulip.o `test -f 'tulip.c' || echo '$(srcdir)/'`tulip.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-tulip.Tpo" "$(DEPDIR)/libdrivers_a-tulip.Po"; else rm -f "$(DEPDIR)/libdrivers_a-tulip.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tulip.c' object='libdrivers_a-tulip.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-tulip.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-tulip.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-tulip.o `test -f 'tulip.c' || echo '$(srcdir)/'`tulip.c + + libdrivers_a-tulip.obj: tulip.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-tulip.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-tulip.Tpo" -c -o libdrivers_a-tulip.obj `if test -f 'tulip.c'; then $(CYGPATH_W) 'tulip.c'; else $(CYGPATH_W) '$(srcdir)/tulip.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-tulip.Tpo" "$(DEPDIR)/libdrivers_a-tulip.Po"; else rm -f "$(DEPDIR)/libdrivers_a-tulip.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tulip.c' object='libdrivers_a-tulip.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-tulip.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-tulip.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-tulip.obj `if test -f 'tulip.c'; then $(CYGPATH_W) 'tulip.c'; else $(CYGPATH_W) '$(srcdir)/tulip.c'; fi` + + libdrivers_a-via-rhine.o: via-rhine.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-via-rhine.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-via-rhine.Tpo" -c -o libdrivers_a-via-rhine.o `test -f 'via-rhine.c' || echo '$(srcdir)/'`via-rhine.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-via-rhine.Tpo" "$(DEPDIR)/libdrivers_a-via-rhine.Po"; else rm -f "$(DEPDIR)/libdrivers_a-via-rhine.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='via-rhine.c' object='libdrivers_a-via-rhine.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-via-rhine.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-via-rhine.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-via-rhine.o `test -f 'via-rhine.c' || echo '$(srcdir)/'`via-rhine.c + + libdrivers_a-via-rhine.obj: via-rhine.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-via-rhine.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-via-rhine.Tpo" -c -o libdrivers_a-via-rhine.obj `if test -f 'via-rhine.c'; then $(CYGPATH_W) 'via-rhine.c'; else $(CYGPATH_W) '$(srcdir)/via-rhine.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-via-rhine.Tpo" "$(DEPDIR)/libdrivers_a-via-rhine.Po"; else rm -f "$(DEPDIR)/libdrivers_a-via-rhine.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='via-rhine.c' object='libdrivers_a-via-rhine.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-via-rhine.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-via-rhine.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-via-rhine.obj `if test -f 'via-rhine.c'; then $(CYGPATH_W) 'via-rhine.c'; else $(CYGPATH_W) '$(srcdir)/via-rhine.c'; fi` + + libdrivers_a-w89c840.o: w89c840.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-w89c840.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-w89c840.Tpo" -c -o libdrivers_a-w89c840.o `test -f 'w89c840.c' || echo '$(srcdir)/'`w89c840.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-w89c840.Tpo" "$(DEPDIR)/libdrivers_a-w89c840.Po"; else rm -f "$(DEPDIR)/libdrivers_a-w89c840.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='w89c840.c' object='libdrivers_a-w89c840.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-w89c840.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-w89c840.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-w89c840.o `test -f 'w89c840.c' || echo '$(srcdir)/'`w89c840.c + + libdrivers_a-w89c840.obj: w89c840.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-w89c840.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-w89c840.Tpo" -c -o libdrivers_a-w89c840.obj `if test -f 'w89c840.c'; then $(CYGPATH_W) 'w89c840.c'; else $(CYGPATH_W) '$(srcdir)/w89c840.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-w89c840.Tpo" "$(DEPDIR)/libdrivers_a-w89c840.Po"; else rm -f "$(DEPDIR)/libdrivers_a-w89c840.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='w89c840.c' object='libdrivers_a-w89c840.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-w89c840.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-w89c840.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-w89c840.obj `if test -f 'w89c840.c'; then $(CYGPATH_W) 'w89c840.c'; else $(CYGPATH_W) '$(srcdir)/w89c840.c'; fi` +-uninstall-info-am: ++ ++libdrivers_a-r8169.o: r8169.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-r8169.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-r8169.Tpo" -c -o libdrivers_a-r8169.o `test -f 'r8169.c' || echo '$(srcdir)/'`r8169.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-r8169.Tpo" "$(DEPDIR)/libdrivers_a-r8169.Po"; else rm -f "$(DEPDIR)/libdrivers_a-r8169.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='r8169.c' object='libdrivers_a-r8169.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-r8169.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-r8169.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-r8169.o `test -f 'r8169.c' || echo '$(srcdir)/'`r8169.c ++ ++libdrivers_a-r8169.obj: r8169.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-r8169.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-r8169.Tpo" -c -o libdrivers_a-r8169.obj `if test -f 'r8169.c'; then $(CYGPATH_W) 'r8169.c'; else $(CYGPATH_W) '$(srcdir)/r8169.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-r8169.Tpo" "$(DEPDIR)/libdrivers_a-r8169.Po"; else rm -f "$(DEPDIR)/libdrivers_a-r8169.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='r8169.c' object='libdrivers_a-r8169.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-r8169.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-r8169.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-r8169.obj `if test -f 'r8169.c'; then $(CYGPATH_W) 'r8169.c'; else $(CYGPATH_W) '$(srcdir)/r8169.c'; fi` ++ ++libdrivers_a-forcedeth.o: forcedeth.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-forcedeth.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-forcedeth.Tpo" -c -o libdrivers_a-forcedeth.o `test -f 'forcedeth.c' || echo '$(srcdir)/'`forcedeth.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-forcedeth.Tpo" "$(DEPDIR)/libdrivers_a-forcedeth.Po"; else rm -f "$(DEPDIR)/libdrivers_a-forcedeth.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='forcedeth.c' object='libdrivers_a-forcedeth.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-forcedeth.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-forcedeth.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-forcedeth.o `test -f 'forcedeth.c' || echo '$(srcdir)/'`forcedeth.c ++ ++libdrivers_a-forcedeth.obj: forcedeth.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-forcedeth.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-forcedeth.Tpo" -c -o libdrivers_a-forcedeth.obj `if test -f 'forcedeth.c'; then $(CYGPATH_W) 'forcedeth.c'; else $(CYGPATH_W) '$(srcdir)/forcedeth.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-forcedeth.Tpo" "$(DEPDIR)/libdrivers_a-forcedeth.Po"; else rm -f "$(DEPDIR)/libdrivers_a-forcedeth.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='forcedeth.c' object='libdrivers_a-forcedeth.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-forcedeth.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-forcedeth.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-forcedeth.obj `if test -f 'forcedeth.c'; then $(CYGPATH_W) 'forcedeth.c'; else $(CYGPATH_W) '$(srcdir)/forcedeth.c'; fi` ++ ++libdrivers_a-ns83820.o: ns83820.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-ns83820.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-ns83820.Tpo" -c -o libdrivers_a-ns83820.o `test -f 'ns83820.c' || echo '$(srcdir)/'`ns83820.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-ns83820.Tpo" "$(DEPDIR)/libdrivers_a-ns83820.Po"; else rm -f "$(DEPDIR)/libdrivers_a-ns83820.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ns83820.c' object='libdrivers_a-ns83820.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-ns83820.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-ns83820.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-ns83820.o `test -f 'ns83820.c' || echo '$(srcdir)/'`ns83820.c ++ ++libdrivers_a-ns83820.obj: ns83820.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-ns83820.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-ns83820.Tpo" -c -o libdrivers_a-ns83820.obj `if test -f 'ns83820.c'; then $(CYGPATH_W) 'ns83820.c'; else $(CYGPATH_W) '$(srcdir)/ns83820.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-ns83820.Tpo" "$(DEPDIR)/libdrivers_a-ns83820.Po"; else rm -f "$(DEPDIR)/libdrivers_a-ns83820.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ns83820.c' object='libdrivers_a-ns83820.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-ns83820.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-ns83820.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-ns83820.obj `if test -f 'ns83820.c'; then $(CYGPATH_W) 'ns83820.c'; else $(CYGPATH_W) '$(srcdir)/ns83820.c'; fi` ++ ++libdrivers_a-pnic.o: pnic.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pnic.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-pnic.Tpo" -c -o libdrivers_a-pnic.o `test -f 'pnic.c' || echo '$(srcdir)/'`pnic.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pnic.Tpo" "$(DEPDIR)/libdrivers_a-pnic.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pnic.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pnic.c' object='libdrivers_a-pnic.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pnic.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pnic.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pnic.o `test -f 'pnic.c' || echo '$(srcdir)/'`pnic.c ++ ++libdrivers_a-pnic.obj: pnic.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pnic.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-pnic.Tpo" -c -o libdrivers_a-pnic.obj `if test -f 'pnic.c'; then $(CYGPATH_W) 'pnic.c'; else $(CYGPATH_W) '$(srcdir)/pnic.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pnic.Tpo" "$(DEPDIR)/libdrivers_a-pnic.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pnic.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pnic.c' object='libdrivers_a-pnic.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pnic.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pnic.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pnic.obj `if test -f 'pnic.c'; then $(CYGPATH_W) 'pnic.c'; else $(CYGPATH_W) '$(srcdir)/pnic.c'; fi` ++ ++libdrivers_a-pnic_api.o: pnic_api.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pnic_api.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-pnic_api.Tpo" -c -o libdrivers_a-pnic_api.o `test -f 'pnic_api.c' || echo '$(srcdir)/'`pnic_api.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pnic_api.Tpo" "$(DEPDIR)/libdrivers_a-pnic_api.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pnic_api.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pnic_api.c' object='libdrivers_a-pnic_api.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pnic_api.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pnic_api.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pnic_api.o `test -f 'pnic_api.c' || echo '$(srcdir)/'`pnic_api.c ++ ++libdrivers_a-pnic_api.obj: pnic_api.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pnic_api.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-pnic_api.Tpo" -c -o libdrivers_a-pnic_api.obj `if test -f 'pnic_api.c'; then $(CYGPATH_W) 'pnic_api.c'; else $(CYGPATH_W) '$(srcdir)/pnic_api.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pnic_api.Tpo" "$(DEPDIR)/libdrivers_a-pnic_api.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pnic_api.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pnic_api.c' object='libdrivers_a-pnic_api.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pnic_api.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pnic_api.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pnic_api.obj `if test -f 'pnic_api.c'; then $(CYGPATH_W) 'pnic_api.c'; else $(CYGPATH_W) '$(srcdir)/pnic_api.c'; fi` + + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ +@@ -817,11 +927,9 @@ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ +- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ +- test -n "$$unique" || unique=$$empty_fix; \ +- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ +- $$tags $$unique; \ +- fi ++ test -z "$(ETAGS_ARGS)$$tags$$unique" \ ++ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ ++ $$tags $$unique + ctags: CTAGS + CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) +@@ -895,7 +1003,7 @@ + clean-generic: + + distclean-generic: +- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) ++ -rm -f $(CONFIG_CLEAN_FILES) + + maintainer-clean-generic: + @echo "This command is intended for maintainers to use" +@@ -962,10 +1070,10 @@ + + + # Is it really necessary to specify dependecies explicitly? +-$(3c509_drivers): 3c509.c 3c509.h +-$(3c509_drivers): %.o: 3c509.c +- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++#$(3c509_drivers): 3c509.c 3c509.h ++#$(3c509_drivers): %.o: 3c509.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + + $(3c595_drivers): 3c595.c 3c595.h + $(3c595_drivers): %.o: 3c595.c +@@ -977,23 +1085,28 @@ + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(cs89x0_drivers): cs89x0.c cs89x0.h +-$(cs89x0_drivers): %.o: cs89x0.c +- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++#$(cs89x0_drivers): cs89x0.c cs89x0.h ++#$(cs89x0_drivers): %.o: cs89x0.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + + $(davicom_drivers): davicom.c + $(davicom_drivers): %.o: davicom.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(depca_drivers): depca.c +-$(depca_drivers): %.o: depca.c +- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++#$(depca_drivers): depca.c ++#$(depca_drivers): %.o: depca.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(eepro_drivers): eepro.c +-$(eepro_drivers): %.o: eepro.c ++#$(eepro_drivers): eepro.c ++#$(eepro_drivers): %.o: eepro.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ ++$(e1000_drivers): e1000.c e1000_hw.h ++$(e1000_drivers): %.o: e1000.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +@@ -1007,28 +1120,38 @@ + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + ++$(forcedeth_drivers): forcedeth.c ++$(forcedeth_drivers): %.o: forcedeth.c ++ $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++ $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ + #$(fa311_drivers): fa311.c + #$(fa311_drivers): %.o: fa311.c + # $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + # $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(i82586_drivers): i82586.c +-$(i82586_drivers): %.o: i82586.c +- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++#$(i82586_drivers): i82586.c ++#$(i82586_drivers): %.o: i82586.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(lance_drivers): lance.c +-$(lance_drivers): %.o: lance.c +- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++#$(lance_drivers): lance.c ++#$(lance_drivers): %.o: lance.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + + $(natsemi_drivers): natsemi.c + $(natsemi_drivers): %.o: natsemi.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(ni5010_drivers): ni5010.c +-$(ni5010_drivers): %.o: ni5010.c ++#$(ni5010_drivers): ni5010.c ++#$(ni5010_drivers): %.o: ni5010.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ ++$(ns83820_drivers): ns83820.c ++$(ns83820_drivers): %.o: ns83820.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +@@ -1037,41 +1160,62 @@ + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(otulip_drivers): otulip.c otulip.h +-$(otulip_drivers): %.o: otulip.c ++#$(otulip_drivers): otulip.c otulip.h ++#$(otulip_drivers): %.o: otulip.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ ++$(pcnet32_drivers): pcnet32.c ++$(pcnet32_drivers): %.o: pcnet32.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(rtl8139_drivers): rtl8139.c +-$(rtl8139_drivers): %.o: rtl8139.c ++$(pnic_drivers): pnic.c ++$(pnic_drivers): %.o: pnic.c pnic_api.h + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(sis900_drivers): sis900.c +-$(sis900_drivers): %.o: sis900.c sis900.h ++$(rtl8139_drivers): rtl8139.c ++$(rtl8139_drivers): %.o: rtl8139.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(sk_g16_drivers): sk_g16.c sk_g16.h +-$(sk_g16_drivers): %.o: sk_g16.c ++$(r8169_drivers): r8169.c ++$(r8169_drivers): %.o: r8169.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(smc9000_drivers): smc9000.c smc9000.h +-$(smc9000_drivers): %.o: smc9000.c ++$(sis900_drivers): sis900.c sis900.h ++$(sis900_drivers): %.o: sis900.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(tiara_drivers): tiara.c +-$(tiara_drivers): %.o: tiara.c ++#$(sk_g16_drivers): sk_g16.c sk_g16.h ++#$(sk_g16_drivers): %.o: sk_g16.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ ++#$(smc9000_drivers): smc9000.c smc9000.h ++#$(smc9000_drivers): %.o: smc9000.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ ++ ++$(tg3_drivers): tg3.c tg3.h ++$(tg3_drivers): %.o: tg3.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-#$(tlan_drivers): tlan.c +-#$(tlan_drivers): %.o: tlan.c ++#$(tiara_drivers): tiara.c ++#$(tiara_drivers): %.o: tiara.c + # $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + # $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + ++$(tlan_drivers): tlan.c tlan.h ++$(tlan_drivers): %.o: tlan.c ++ $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++ $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ + $(tulip_drivers): tulip.c + $(tulip_drivers): %.o: tulip.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +diff -Naur grub-0.97.orig/netboot/basemem.c grub-0.97/netboot/basemem.c +--- grub-0.97.orig/netboot/basemem.c 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/basemem.c 2005-08-31 19:24:28.000000000 +0000 +@@ -0,0 +1,178 @@ ++#include "etherboot.h" ++#define DEBUG_BASEMEM ++/* Routines to allocate base memory in a BIOS-compatible way, by ++ * updating the Free Base Memory Size counter at 40:13h. ++ * ++ * Michael Brown (mcb30) ++ * $Id: grub-0.95-diskless-patch-2-undi.patch,v 1.1.1.1 2005/06/14 08:18:50 wesolows Exp $ ++ */ ++ ++#define fbms ( ( uint16_t * ) phys_to_virt ( 0x413 ) ) ++#define BASE_MEMORY_MAX ( 640 ) ++#define FREE_BLOCK_MAGIC ( ('!'<<0) + ('F'<<8) + ('R'<<16) + ('E'<<24) ) ++ ++typedef struct free_base_memory_block { ++ uint32_t magic; ++ uint16_t size_kb; ++} free_base_memory_block_t; ++ ++/* Return amount of free base memory in bytes ++ */ ++ ++uint32_t get_free_base_memory ( void ) { ++ return *fbms << 10; ++} ++ ++/* Adjust the real mode stack pointer. We keep the real mode stack at ++ * the top of free base memory, rather than allocating space for it. ++ */ ++ ++inline void adjust_real_mode_stack ( void ) { ++/* real_mode_stack = ( *fbms << 10 ); */ ++} ++ ++/* Allocate N bytes of base memory. Amount allocated will be rounded ++ * up to the nearest kB, since that's the granularity of the BIOS FBMS ++ * counter. Returns NULL if memory cannot be allocated. ++ */ ++ ++void * allot_base_memory ( size_t size ) { ++ uint16_t size_kb = ( size + 1023 ) >> 10; ++ void *ptr = NULL; ++ ++#ifdef DEBUG_BASEMEM ++ printf ( "Trying to allocate %d kB of base memory, %d kB free\n", ++ size_kb, *fbms ); ++#endif ++ ++ /* Free up any unused memory before we start */ ++ free_unused_base_memory(); ++ ++ /* Check available base memory */ ++ if ( size_kb > *fbms ) { return NULL; } ++ ++ /* Reduce available base memory */ ++ *fbms -= size_kb; ++ ++ /* Calculate address of memory allocated */ ++ ptr = phys_to_virt ( *fbms << 10 ); ++ ++#ifdef DEBUG_BASEMEM ++ /* Zero out memory. We do this so that allocation of ++ * already-used space will show up in the form of a crash as ++ * soon as possible. ++ */ ++ memset ( ptr, 0, size_kb << 10 ); ++#endif ++ ++ /* Adjust real mode stack pointer */ ++ adjust_real_mode_stack (); ++ ++ return ptr; ++} ++ ++/* Free base memory allocated by allot_base_memory. The BIOS provides ++ * nothing better than a LIFO mechanism for freeing memory (i.e. it ++ * just has the single "total free memory" counter), but we improve ++ * upon this slightly; as long as you free all the allotted blocks, it ++ * doesn't matter what order you free them in. (This will only work ++ * for blocks that are freed via forget_base_memory()). ++ * ++ * Yes, it's annoying that you have to remember the size of the blocks ++ * you've allotted. However, since our granularity of allocation is ++ * 1K, the alternative is to risk wasting the occasional kB of base ++ * memory, which is a Bad Thing. Really, you should be using as ++ * little base memory as possible, so consider the awkwardness of the ++ * API to be a feature! :-) ++ */ ++ ++void forget_base_memory ( void *ptr, size_t size ) { ++ uint16_t remainder = virt_to_phys(ptr) & 1023; ++ uint16_t size_kb = ( size + remainder + 1023 ) >> 10; ++ free_base_memory_block_t *free_block = ++ ( free_base_memory_block_t * ) ( ptr - remainder ); ++ ++ if ( ( ptr == NULL ) || ( size == 0 ) ) { return; } ++ ++#ifdef DEBUG_BASEMEM ++ printf ( "Trying to free %d bytes base memory at 0x%x\n", ++ size, virt_to_phys ( ptr ) ); ++ if ( remainder > 0 ) { ++ printf ( "WARNING: destructively expanding free block " ++ "downwards to 0x%x\n", ++ virt_to_phys ( ptr - remainder ) ); ++ } ++#endif ++ ++ /* Mark every kilobyte within this block as free. This is ++ * overkill for normal purposes, but helps when something has ++ * allocated base memory with a granularity finer than the ++ * BIOS granularity of 1kB. PXE ROMs tend to do this when ++ * they allocate their own memory. This method allows us to ++ * free their blocks (admittedly in a rather dangerous, ++ * tread-on-anything-either-side sort of way, but there's no ++ * other way to do it). ++ * ++ * Since we're marking every kB as free, there's actually no ++ * need for recording the size of the blocks. However, we ++ * keep this in so that debug messages are friendlier. It ++ * probably adds around 8 bytes to the overall code size. ++ */ ++ while ( size_kb > 0 ) { ++ /* Mark this block as unused */ ++ free_block->magic = FREE_BLOCK_MAGIC; ++ free_block->size_kb = size_kb; ++ /* Move up by 1 kB */ ++ (void *)(free_block += ( 1 << 10 )); ++ size_kb--; ++ } ++ ++ /* Free up unused base memory */ ++ free_unused_base_memory(); ++} ++ ++/* Do the actual freeing of memory. This is split out from ++ * forget_base_memory() so that it may be called separately. It ++ * should be called whenever base memory is deallocated by an external ++ * entity (if we can detect that it has done so) so that we get the ++ * chance to free up our own blocks. ++ */ ++void free_unused_base_memory ( void ) { ++ free_base_memory_block_t *free_block = NULL; ++ ++ /* Try to release memory back to the BIOS. Free all ++ * consecutive blocks marked as free. ++ */ ++ while ( 1 ) { ++ /* Calculate address of next potential free block */ ++ free_block = ( free_base_memory_block_t * ) ++ phys_to_virt ( *fbms << 10 ); ++ ++ /* Stop processing if we're all the way up to 640K or ++ * if this is not a free block ++ */ ++ if ( ( *fbms == BASE_MEMORY_MAX ) || ++ ( free_block->magic != FREE_BLOCK_MAGIC ) ) { ++ break; ++ } ++ ++ /* Return memory to BIOS */ ++ *fbms += free_block->size_kb; ++ ++#ifdef DEBUG_BASEMEM ++ printf ( "Freed %d kB base memory, %d kB now free\n", ++ free_block->size_kb, *fbms ); ++ ++ /* Zero out freed block. We do this in case ++ * the block contained any structures that ++ * might be located by scanning through ++ * memory. ++ */ ++ memset ( free_block, 0, free_block->size_kb << 10 ); ++#endif ++ } ++ ++ /* Adjust real mode stack pointer */ ++ adjust_real_mode_stack (); ++} ++ +diff -Naur grub-0.97.orig/netboot/big_bswap.h grub-0.97/netboot/big_bswap.h +--- grub-0.97.orig/netboot/big_bswap.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/big_bswap.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,17 @@ ++#ifndef ETHERBOOT_BIG_BSWAP_H ++#define ETHERBOOT_BIG_BSWAP_H ++ ++#define ntohl(x) (x) ++#define htonl(x) (x) ++#define ntohs(x) (x) ++#define htons(x) (x) ++#define cpu_to_le32(x) __bswap_32(x) ++#define cpu_to_le16(x) __bswap_16(x) ++#define cpu_to_be32(x) (x) ++#define cpu_to_be16(x) (x) ++#define le32_to_cpu(x) __bswap_32(x) ++#define le16_to_cpu(x) __bswap_16(x) ++#define be32_to_cpu(x) (x) ++#define be16_to_cpu(x) (x) ++ ++#endif /* ETHERBOOT_BIG_BSWAP_H */ +diff -Naur grub-0.97.orig/netboot/bootp.h grub-0.97/netboot/bootp.h +--- grub-0.97.orig/netboot/bootp.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/bootp.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,182 @@ ++#ifndef _BOOTP_H ++#define _BOOTP_H ++ ++#include "if_ether.h" ++#include "ip.h" ++#include "udp.h" ++ ++#ifndef MAX_BOOTP_RETRIES ++#define MAX_BOOTP_RETRIES 20 ++#endif ++ ++#ifdef ALTERNATE_DHCP_PORTS_1067_1068 ++#undef NON_STANDARD_BOOTP_SERVER ++#define NON_STANDARD_BOOTP_SERVER 1067 ++#undef NON_STANDARD_BOOTP_CLIENT ++#define NON_STANDARD_BOOTP_CLIENT 1068 ++#endif ++ ++#ifdef NON_STANDARD_BOOTP_SERVER ++#define BOOTP_SERVER NON_STANDARD_BOOTP_SERVER ++#else ++#define BOOTP_SERVER 67 ++#endif ++#ifdef NON_STANDARD_BOOTP_CLIENT ++#define BOOTP_CLIENT NON_STANDARD_BOOTP_CLIENT ++#else ++#define BOOTP_CLIENT 68 ++#endif ++ ++#define BOOTP_REQUEST 1 ++#define BOOTP_REPLY 2 ++ ++#define TAG_LEN(p) (*((p)+1)) ++#define RFC1533_COOKIE 99, 130, 83, 99 ++#define RFC1533_PAD 0 ++#define RFC1533_NETMASK 1 ++#define RFC1533_TIMEOFFSET 2 ++#define RFC1533_GATEWAY 3 ++#define RFC1533_TIMESERVER 4 ++#define RFC1533_IEN116NS 5 ++#define RFC1533_DNS 6 ++#define RFC1533_LOGSERVER 7 ++#define RFC1533_COOKIESERVER 8 ++#define RFC1533_LPRSERVER 9 ++#define RFC1533_IMPRESSSERVER 10 ++#define RFC1533_RESOURCESERVER 11 ++#define RFC1533_HOSTNAME 12 ++#define RFC1533_BOOTFILESIZE 13 ++#define RFC1533_MERITDUMPFILE 14 ++#define RFC1533_DOMAINNAME 15 ++#define RFC1533_SWAPSERVER 16 ++#define RFC1533_ROOTPATH 17 ++#define RFC1533_EXTENSIONPATH 18 ++#define RFC1533_IPFORWARDING 19 ++#define RFC1533_IPSOURCEROUTING 20 ++#define RFC1533_IPPOLICYFILTER 21 ++#define RFC1533_IPMAXREASSEMBLY 22 ++#define RFC1533_IPTTL 23 ++#define RFC1533_IPMTU 24 ++#define RFC1533_IPMTUPLATEAU 25 ++#define RFC1533_INTMTU 26 ++#define RFC1533_INTLOCALSUBNETS 27 ++#define RFC1533_INTBROADCAST 28 ++#define RFC1533_INTICMPDISCOVER 29 ++#define RFC1533_INTICMPRESPOND 30 ++#define RFC1533_INTROUTEDISCOVER 31 ++#define RFC1533_INTROUTESOLICIT 32 ++#define RFC1533_INTSTATICROUTES 33 ++#define RFC1533_LLTRAILERENCAP 34 ++#define RFC1533_LLARPCACHETMO 35 ++#define RFC1533_LLETHERNETENCAP 36 ++#define RFC1533_TCPTTL 37 ++#define RFC1533_TCPKEEPALIVETMO 38 ++#define RFC1533_TCPKEEPALIVEGB 39 ++#define RFC1533_NISDOMAIN 40 ++#define RFC1533_NISSERVER 41 ++#define RFC1533_NTPSERVER 42 ++#define RFC1533_VENDOR 43 ++#define RFC1533_NBNS 44 ++#define RFC1533_NBDD 45 ++#define RFC1533_NBNT 46 ++#define RFC1533_NBSCOPE 47 ++#define RFC1533_XFS 48 ++#define RFC1533_XDM 49 ++#ifndef NO_DHCP_SUPPORT ++#define RFC2132_REQ_ADDR 50 ++#define RFC2132_MSG_TYPE 53 ++#define RFC2132_SRV_ID 54 ++#define RFC2132_PARAM_LIST 55 ++#define RFC2132_MAX_SIZE 57 ++#define RFC2132_VENDOR_CLASS_ID 60 ++ ++#define DHCPDISCOVER 1 ++#define DHCPOFFER 2 ++#define DHCPREQUEST 3 ++#define DHCPACK 5 ++#endif /* NO_DHCP_SUPPORT */ ++ ++#define RFC1533_VENDOR_MAJOR 0 ++#define RFC1533_VENDOR_MINOR 0 ++ ++#define RFC1533_VENDOR_MAGIC 128 ++#define RFC1533_VENDOR_ADDPARM 129 ++#define RFC1533_VENDOR_ETHDEV 130 ++#ifdef IMAGE_FREEBSD ++#define RFC1533_VENDOR_HOWTO 132 ++#define RFC1533_VENDOR_KERNEL_ENV 133 ++#endif ++#define RFC1533_VENDOR_ETHERBOOT_ENCAP 150 ++#define RFC1533_VENDOR_MNUOPTS 160 ++#define RFC1533_VENDOR_NIC_DEV_ID 175 ++#define RFC1533_VENDOR_SELECTION 176 ++#define RFC1533_VENDOR_ARCH 177 ++#define RFC1533_VENDOR_MOTD 184 ++#define RFC1533_VENDOR_NUMOFMOTD 8 ++#define RFC1533_VENDOR_IMG 192 ++#define RFC1533_VENDOR_NUMOFIMG 16 ++ ++#define RFC1533_VENDOR_CONFIGFILE 150 ++ ++#define RFC1533_END 255 ++ ++#define BOOTP_VENDOR_LEN 64 ++ ++#define DHCP_OPT_LEN 312 ++ ++/* Format of a bootp packet */ ++struct bootp_t { ++ uint8_t bp_op; ++ uint8_t bp_htype; ++ uint8_t bp_hlen; ++ uint8_t bp_hops; ++ uint32_t bp_xid; ++ uint16_t bp_secs; ++ uint16_t unused; ++ in_addr bp_ciaddr; ++ in_addr bp_yiaddr; ++ in_addr bp_siaddr; ++ in_addr bp_giaddr; ++ uint8_t bp_hwaddr[16]; ++ uint8_t bp_sname[64]; ++ char bp_file[128]; ++ uint8_t bp_vend[BOOTP_VENDOR_LEN]; ++}; ++ ++struct dhcp_t { ++ uint8_t bp_op; ++ uint8_t bp_htype; ++ uint8_t bp_hlen; ++ uint8_t bp_hops; ++ uint32_t bp_xid; ++ uint16_t bp_secs; ++ uint16_t bp_flag; ++ in_addr bp_ciaddr; ++ in_addr bp_yiaddr; ++ in_addr bp_siaddr; ++ in_addr bp_giaddr; ++ uint8_t bp_hwaddr[16]; ++ uint8_t bp_sname[64]; ++ char bp_file[128]; ++ uint8_t bp_vend[DHCP_OPT_LEN]; ++}; ++ ++/* Format of a bootp IP packet */ ++struct bootpip_t ++{ ++ struct iphdr ip; ++ struct udphdr udp; ++ struct bootp_t bp; ++}; ++struct dhcpip_t ++{ ++ struct iphdr ip; ++ struct udphdr udp; ++ struct dhcp_t bp; ++}; ++ ++#define MAX_RFC1533_VENDLEN (ETH_MAX_MTU - sizeof(struct bootpip_t) + BOOTP_VENDOR_LEN) ++ ++#define BOOTP_DATA_ADDR (&bootp_data) ++ ++#endif /* _BOOTP_H */ +diff -Naur grub-0.97.orig/netboot/byteswap.h grub-0.97/netboot/byteswap.h +--- grub-0.97.orig/netboot/byteswap.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/byteswap.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,20 @@ ++#ifndef ETHERBOOT_BYTESWAP_H ++#define ETHERBOOT_BYTESWAP_H ++ ++#include "endian.h" ++#include "i386_byteswap.h" ++ ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++#include "little_bswap.h" ++#endif ++#if __BYTE_ORDER == __BIG_ENDIAN ++#include "big_bswap.h" ++#endif ++ ++/* Make routines available to all */ ++#define swap32(x) __bswap_32(x) ++#define swap16(x) __bswap_16(x) ++#define bswap_32(x) __bswap_32(x) ++#define bswap_16(x) __bswap_16(x) ++ ++#endif /* ETHERBOOT_BYTESWAP_H */ +diff -Naur grub-0.97.orig/netboot/cards.h grub-0.97/netboot/cards.h +--- grub-0.97.orig/netboot/cards.h 2003-07-09 11:45:37.000000000 +0000 ++++ grub-0.97/netboot/cards.h 1970-01-01 00:00:00.000000000 +0000 +@@ -1,183 +0,0 @@ +-#ifndef CARDS_H +-#define CARDS_H +- +-/* +- * This program is free software; you can redistribute it and/or +- * modify it under the terms of the GNU General Public License as +- * published by the Free Software Foundation; either version 2, or (at +- * your option) any later version. +- */ +- +-#include "nic.h" +- +-/* OK, this is how the PCI support hack works: if pci.h is included before +- * this file is included, assume that the driver supports PCI. This means that +- * this file is usually included last. */ +- +-#ifdef PCI_H +-#define PCI_ARG(x) ,x +-#else +-#define PCI_ARG(x) +-#endif +- +-#ifdef INCLUDE_WD +-extern struct nic *wd_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_3C503 +-extern struct nic *t503_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_VIA_RHINE +-extern struct nic *rhine_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_NE +-extern struct nic *ne_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_NS8390 +-extern struct nic *nepci_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_3C509 +-extern struct nic *t509_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_3C529 +-extern struct nic *t529_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_3C595 +-extern struct nic *t595_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_3C90X +-extern struct nic *a3c90x_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_EEPRO +-extern struct nic *eepro_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_EEPRO100 +-extern struct nic *eepro100_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_EPIC100 +-extern struct nic *epic100_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_OTULIP +-extern struct nic *otulip_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_TULIP +-extern struct nic *tulip_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_DAVICOM +-extern struct nic *davicom_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_CS89X0 +-extern struct nic *cs89x0_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_LANCE +-extern struct nic *lancepci_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_NE2100 +-extern struct nic *ne2100_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_NI6510 +-extern struct nic *ni6510_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_SK_G16 +-extern struct nic *SK_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_3C507 +-extern struct nic *t507_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_NI5010 +-extern struct nic *ni5010_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_NI5210 +-extern struct nic *ni5210_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_EXOS205 +-extern struct nic *exos205_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_SMC9000 +-extern struct nic *smc9000_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_TIARA +-extern struct nic *tiara_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_DEPCA +-extern struct nic *depca_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_RTL8139 +-extern struct nic *rtl8139_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_W89C840 +-extern struct nic *w89c840_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_SIS900 +-extern struct nic *sis900_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_NATSEMI +-extern struct nic *natsemi_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_TLAN +-extern struct nic *tlan_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#endif /* CARDS_H */ +diff -Naur grub-0.97.orig/netboot/config.c grub-0.97/netboot/config.c +--- grub-0.97.orig/netboot/config.c 2003-07-09 11:45:37.000000000 +0000 ++++ grub-0.97/netboot/config.c 2005-08-31 19:03:35.000000000 +0000 +@@ -1,598 +1,165 @@ + /* +- * GRUB -- GRand Unified Bootloader +- * Copyright (C) 2001,2002 Free Software Foundation, Inc. +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +- */ +- +-/* Based on "src/config.c" in etherboot-5.0.5. */ +- +-/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2, or (at + * your option) any later version. + */ + +-#define GRUB 1 +-#include +-#include ++#include "grub.h" ++#include "pci.h" ++#include "isa.h" ++#include "nic.h" + +-#undef INCLUDE_PCI +-#if defined(INCLUDE_NS8390) || defined(INCLUDE_EEPRO100) || defined(INCLUDE_LANCE) || defined(INCLUDE_EPIC100) || defined(INCLUDE_TULIP) || defined(INCLUDE_OTULIP) || defined(INCLUDE_3C90X) || defined(INCLUDE_3C595) || defined(INCLUDE_RTL8139) || defined(INCLUDE_VIA_RHINE) || defined(INCLUDE_W89C840) || defined(INCLUDE_DAVICOM) || defined(INCLUDE_SIS900) || defined(INCLUDE_NATSEMI) || defined(INCLUDE_TLAN) +- /* || others later */ +-# define INCLUDE_PCI +-# include +-static unsigned short pci_ioaddrs[16]; +- +-static struct pci_device pci_nic_list[] = ++#ifdef CONFIG_PCI ++static int pci_probe(struct dev *dev, const char *type_name) + { +-#ifdef INCLUDE_NS8390 +- { PCI_VENDOR_ID_REALTEK, PCI_DEVICE_ID_REALTEK_8029, +- "Realtek 8029", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_89C940, +- "Winbond NE2000-PCI", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_COMPEX, PCI_DEVICE_ID_COMPEX_RL2000, +- "Compex ReadyLink 2000", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_KTI, PCI_DEVICE_ID_KTI_ET32P2, +- "KTI ET32P2", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_NETVIN, PCI_DEVICE_ID_NETVIN_NV5000SC, +- "NetVin NV5000SC", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_HOLTEK, PCI_DEVICE_ID_HOLTEK_HT80232, +- "Holtek HT80232", 0, 0, 0, 0}, +-#endif +-#ifdef INCLUDE_3C90X +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900TPO, +- "3Com900-TPO", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900COMBO, +- "3Com900-Combo", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905TX, +- "3Com905-TX", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905T4, +- "3Com905-T4", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x9004, +- "3Com900B-TPO", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x9005, +- "3Com900B-Combo", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x9006, +- "3Com900B-2/T", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x900A, +- "3Com900B-FL", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905B_TX, +- "3Com905B-TX", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x9056, +- "3Com905B-T4", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x905A, +- "3Com905B-FL", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905C_TXM, +- "3Com905C-TXM", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x9800, +- "3Com980-Cyclone", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x9805, +- "3Com9805", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x7646, +- "3CSOHO100-TX", 0, 0, 0, 0}, +-#endif +-#ifdef INCLUDE_3C595 +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C590, +- "3Com590", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C595, +- "3Com595", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C595_1, +- "3Com595", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C595_2, +- "3Com595", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900TPO, +- "3Com900-TPO", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900COMBO, +- "3Com900-Combo", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x9004, +- "3Com900B-TPO", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x9005, +- "3Com900B-Combo", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x9006, +- "3Com900B-2/T", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x900A, +- "3Com900B-FL", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x9800, +- "3Com980-Cyclone", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x9805, +- "3Com9805", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x7646, +- "3CSOHO100-TX", 0, 0, 0, 0}, +-#endif +-#ifdef INCLUDE_EEPRO100 +- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82557, +- "Intel EtherExpressPro100", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82559ER, +- "Intel EtherExpressPro100 82559ER", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ID1029, +- "Intel EtherExpressPro100 ID1029", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ID1030, +- "Intel Corporation 82559 InBusiness 10/100", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82562, +- "Intel EtherExpressPro100 82562EM", 0, 0, 0, 0}, +-#endif +-#ifdef INCLUDE_EPIC100 +- { PCI_VENDOR_ID_SMC, PCI_DEVICE_ID_SMC_EPIC100, +- "SMC EtherPowerII", 0, 0, 0, 0}, +-#endif +-#ifdef INCLUDE_LANCE +- { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE, +- "AMD Lance/PCI", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_AMD_HOMEPNA, PCI_DEVICE_ID_AMD_HOMEPNA, +- "AMD Lance/HomePNA", 0, 0, 0, 0}, +-#endif +-#ifdef INCLUDE_RTL8139 +- { PCI_VENDOR_ID_REALTEK, PCI_DEVICE_ID_REALTEK_8139, +- "Realtek 8139", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_DLINK, PCI_DEVICE_ID_DFE530TXP, +- "DFE530TX+/DFE538TX", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_SMC_1211, PCI_DEVICE_ID_SMC_1211, +- "SMC EZ10/100", 0, 0, 0, 0}, +-#endif +-#ifdef INCLUDE_OTULIP +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP, +- "Digital Tulip", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_FAST, +- "Digital Tulip Fast", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_PLUS, +- "Digital Tulip+", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21142, +- "Digital Tulip 21142", 0, 0, 0, 0}, +-#endif +-#ifdef INCLUDE_TULIP +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP, +- "Digital Tulip", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_FAST, +- "Digital Tulip Fast", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_PLUS, +- "Digital Tulip+", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21142, +- "Digital Tulip 21142", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_MACRONIX, PCI_DEVICE_ID_MX987x5, +- "Macronix MX987x5", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_LINKSYS, PCI_DEVICE_ID_LC82C115, +- "LinkSys LNE100TX", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_LINKSYS, PCI_DEVICE_ID_DEC_TULIP, +- "Netgear FA310TX", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9102, +- "Davicom 9102", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9009, +- "Davicom 9009", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_ADMTEK, PCI_DEVICE_ID_ADMTEK_0985, +- "ADMtek Centaur-P", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_ADMTEK, 0x0981, +- "ADMtek AN981 Comet", 0, 0, 0, 0}, +- { 0x125B, 0x1400, +- "ASIX AX88140", 0, 0, 0, 0 }, +- { 0x11F6, 0x9881, +- "Compex RL100-TX", 0, 0, 0, 0 }, +-#endif +-#ifdef INCLUDE_DAVICOM +- { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9102, +- "Davicom 9102", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9009, +- "Davicom 9009", 0, 0, 0, 0}, +-#endif +-#ifdef INCLUDE_VIA_RHINE +- { PCI_VENDOR_ID_VIATEC, PCI_DEVICE_ID_VIA_VT6102, +- "VIA 6102", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_VIATEC, PCI_DEVICE_ID_VIA_RHINE_I, +- "VIA 3043", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_VIATEC, PCI_DEVICE_ID_VIA_86C100A, +- "VIA 86C100A", 0, 0, 0, 0}, +-#endif +-#ifdef INCLUDE_W89C840 +- { PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_89C840, +- "Winbond W89C840F", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_COMPEX, PCI_DEVICE_ID_COMPEX_RL100ATX, +- "Compex RL100ATX", 0, 0, 0, 0}, +-#endif +-#ifdef INCLUDE_SIS900 +- { PCI_VENDOR_ID_SIS, PCI_DEVICE_ID_SIS900, +- "SIS900", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_SIS, PCI_DEVICE_ID_SIS7016, +- "SIS7016", 0, 0, 0, 0}, +-#endif +- +-#ifdef INCLUDE_NATSEMI +- { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_DP83815, +- "DP83815", 0, 0, 0, 0}, +-#endif +- +-#ifdef INCLUDE_TLAN +- { PCI_VENDOR_ID_OLICOM, PCI_DEVICE_ID_OLICOM_OC2326, +- "OC2326", 0, 0, 0, 0}, ++/* ++ * NIC probing is in pci device order, followed by the ++ * link order of the drivers. A driver that matches ++ * on vendor and device id will supersede a driver ++ * that matches on pci class. ++ * ++ * If you want to probe for another device behind the same pci ++ * device just increment index. And the previous probe call ++ * will be repeated. ++ */ ++ struct pci_probe_state *state = &dev->state.pci; ++ printf("Probing pci %s...\n", type_name); ++ if (dev->how_probe == PROBE_FIRST) { ++ state->advance = 1; ++ state->dev.driver = 0; ++ state->dev.bus = 0; ++ state->dev.devfn = 0; ++ dev->index = -1; ++ } ++ for(;;) { ++ if ((dev->how_probe != PROBE_AWAKE) && state->advance) { ++ find_pci(dev->type, &state->dev); ++ dev->index = -1; ++ } ++ state->advance = 1; ++ ++ if (state->dev.driver == 0) ++ break; ++ ++#if 0 ++ /* FIXME the romaddr code needs a total rethought to be useful */ ++ if (state->dev.romaddr != ((unsigned long) rom.rom_segment << 4)) { ++ continue; ++ } ++#endif ++ if (dev->how_probe != PROBE_AWAKE) { ++ dev->type_index++; ++ } ++ dev->devid.bus_type = PCI_BUS_TYPE; ++ dev->devid.vendor_id = htons(state->dev.vendor); ++ dev->devid.device_id = htons(state->dev.dev_id); ++ /* FIXME how do I handle dev->index + PROBE_AGAIN?? */ ++ ++ printf("[%s]", state->dev.name); ++ if (state->dev.driver->probe(dev, &state->dev)) { ++ state->advance = (dev->index == -1); ++ return PROBE_WORKED; ++ } ++ putchar('\n'); ++ } ++ return PROBE_FAILED; ++} + #endif + +- /* other PCI NICs go here */ +- {0, 0, NULL, 0, 0, 0, 0} +-}; +-#endif /* INCLUDE_*PCI */ +- +-#include +- +-#ifdef INCLUDE_PCI +-struct pci_dispatch_table ++#ifdef CONFIG_ISA ++static int isa_probe(struct dev *dev, const char *type_name) + { +- unsigned short vendor; +- unsigned short dev_id; +- struct nic *(*eth_probe) (struct nic *, unsigned short *, +- struct pci_device *); +-}; +- +-static struct pci_dispatch_table PCI_NIC[] = +-{ +-# ifdef INCLUDE_NS8390 +- { PCI_VENDOR_ID_REALTEK, PCI_DEVICE_ID_REALTEK_8029, nepci_probe }, +- { PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_89C940, nepci_probe }, +- { PCI_VENDOR_ID_COMPEX, PCI_DEVICE_ID_COMPEX_RL2000, nepci_probe }, +- { PCI_VENDOR_ID_KTI, PCI_DEVICE_ID_KTI_ET32P2, nepci_probe }, +- { PCI_VENDOR_ID_NETVIN, PCI_DEVICE_ID_NETVIN_NV5000SC, nepci_probe }, +- { PCI_VENDOR_ID_HOLTEK, PCI_DEVICE_ID_HOLTEK_HT80232, nepci_probe }, +-# endif /* INCLUDE_NS8390 */ +-# ifdef INCLUDE_3C90X +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900TPO, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900COMBO, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905TX, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905T4, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, 0x9004, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, 0x9005, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, 0x9006, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, 0x900A, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905B_TX, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, 0x9056, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, 0x905A, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905C_TXM, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, 0x9800, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, 0x9805, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, 0x7646, a3c90x_probe }, +-# endif /* INCLUDE_3C90X */ +-# ifdef INCLUDE_3C595 +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C590, t595_probe }, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C595, t595_probe }, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C595_1, t595_probe }, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C595_2, t595_probe }, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900TPO, t595_probe }, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900COMBO, t595_probe }, +- { PCI_VENDOR_ID_3COM, 0x9004, t595_probe }, +- { PCI_VENDOR_ID_3COM, 0x9005, t595_probe }, +- { PCI_VENDOR_ID_3COM, 0x9006, t595_probe }, +- { PCI_VENDOR_ID_3COM, 0x900A, t595_probe }, +- { PCI_VENDOR_ID_3COM, 0x9800, t595_probe }, +- { PCI_VENDOR_ID_3COM, 0x9805, t595_probe }, +- { PCI_VENDOR_ID_3COM, 0x7646, t595_probe }, +-# endif /* INCLUDE_3C595 */ +-# ifdef INCLUDE_EEPRO100 +- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82557, eepro100_probe }, +- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82559ER, eepro100_probe }, +- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ID1029, eepro100_probe }, +- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ID1030, eepro100_probe }, +- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82562, eepro100_probe }, +-# endif /* INCLUDE_EEPRO100 */ +-# ifdef INCLUDE_EPIC100 +- { PCI_VENDOR_ID_SMC, PCI_DEVICE_ID_SMC_EPIC100, epic100_probe }, +-# endif /* INCLUDE_EPIC100 */ +-# ifdef INCLUDE_LANCE +- { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE, lancepci_probe }, +- { PCI_VENDOR_ID_AMD_HOMEPNA, PCI_DEVICE_ID_AMD_HOMEPNA, lancepci_probe }, +-# endif /* INCLUDE_LANCE */ +-# ifdef INCLUDE_RTL8139 +- { PCI_VENDOR_ID_REALTEK, PCI_DEVICE_ID_REALTEK_8139, rtl8139_probe }, +- { PCI_VENDOR_ID_DLINK, PCI_DEVICE_ID_DFE530TXP, rtl8139_probe }, +- { PCI_VENDOR_ID_SMC_1211, PCI_DEVICE_ID_SMC_1211, rtl8139_probe }, +-# endif /* INCLUDE_RTL8139 */ +-# ifdef INCLUDE_OTULIP +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP, otulip_probe }, +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_FAST, otulip_probe }, +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_PLUS, otulip_probe }, +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21142, otulip_probe }, +-# endif /* INCLUDE_OTULIP */ +-# ifdef INCLUDE_TULIP +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP, tulip_probe }, +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_FAST, tulip_probe }, +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_PLUS, tulip_probe }, +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21142, tulip_probe }, +- { PCI_VENDOR_ID_MACRONIX, PCI_DEVICE_ID_MX987x5, tulip_probe }, +- { PCI_VENDOR_ID_LINKSYS, PCI_DEVICE_ID_LC82C115, tulip_probe }, +- { PCI_VENDOR_ID_LINKSYS, PCI_DEVICE_ID_DEC_TULIP, tulip_probe }, +- { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9102, tulip_probe }, +- { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9009, tulip_probe }, +- { PCI_VENDOR_ID_ADMTEK, PCI_DEVICE_ID_ADMTEK_0985, tulip_probe }, +- { PCI_VENDOR_ID_ADMTEK, 0x0981, tulip_probe }, +- { 0x125B, 0x1400, tulip_probe }, +- { 0x11F6, 0x9881, tulip_probe }, +-# endif /* INCLUDE_TULIP */ +-# ifdef INCLUDE_DAVICOM +- { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9102, davicom_probe }, +- { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9009, davicom_probe }, +-# endif /* INCLUDE_DAVICOM */ +-# ifdef INCLUDE_VIA_RHINE +- { PCI_VENDOR_ID_VIATEC, PCI_DEVICE_ID_VIA_VT6102, rhine_probe }, +- { PCI_VENDOR_ID_VIATEC, PCI_DEVICE_ID_VIA_RHINE_I, rhine_probe }, +- { PCI_VENDOR_ID_VIATEC, PCI_DEVICE_ID_VIA_86C100A, rhine_probe }, +-# endif /* INCLUDE_VIA_RHINE */ +-# ifdef INCLUDE_W89C840 +- { PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_89C840, w89c840_probe }, +- { PCI_VENDOR_ID_COMPEX, PCI_DEVICE_ID_COMPEX_RL100ATX, w89c840_probe }, +-# endif /* INCLUDE_W89C840 */ +-# ifdef INCLUDE_SIS900 +- { PCI_VENDOR_ID_SIS, PCI_DEVICE_ID_SIS900, sis900_probe }, +- { PCI_VENDOR_ID_SIS, PCI_DEVICE_ID_SIS7016, sis900_probe }, +-# endif /* INCLUDE_SIS900 */ +-# ifdef INCLUDE_NATSEMI +- { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_DP83815, natsemi_probe }, +-# endif /* INCLUDE_NATSEMI */ +-# ifdef INCLUDE_TLAN +- { PCI_VENDOR_ID_OLICOM, PCI_DEVICE_ID_OLICOM_OC2326, tlan_probe }, +-# endif /* INCLUDE_TLAN */ +- { 0, 0, 0 } +-}; +-#endif /* GRUB && INCLUDE_PCI */ +- +-struct dispatch_table +-{ +- const char *nic_name; +-#ifdef INCLUDE_PCI +- struct nic *(*eth_probe) (struct nic *, unsigned short *, +- struct pci_device *); +-#else +- struct nic *(*eth_probe) (struct nic *, unsigned short *); +-#endif /* INCLUDE_PCI */ +- unsigned short *probe_ioaddrs; /* for probe overrides */ +-}; +- + /* +- * NIC probing is in order of appearance in this table. ++ * NIC probing is in the order the drivers were linked togeter. + * If for some reason you want to change the order, +- * just rearrange the entries (bracketed by the #ifdef/#endif) ++ * just change the order you list the drivers in. + */ +-static struct dispatch_table NIC[] = +-{ +-#ifdef INCLUDE_RTL8139 +- { "RTL8139", rtl8139_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_SIS900 +- { "SIS900", sis900_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_NATSEMI +- { "NATSEMI", natsemi_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_WD +- { "WD", wd_probe, 0 }, +-#endif +-#ifdef INCLUDE_3C503 +- { "3C503", t503_probe, 0 }, +-#endif +-#ifdef INCLUDE_NE +- { "NE*000", ne_probe, 0 }, +-#endif +-#ifdef INCLUDE_3C509 +- { "3C5x9", t509_probe, 0 }, +-#endif +-#ifdef INCLUDE_3C529 +- { "3C5x9", t529_probe, 0 }, +-#endif +-#ifdef INCLUDE_3C595 +- { "3C595", t595_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_3C90X +- { "3C90X", a3c90x_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_EEPRO +- { "EEPRO", eepro_probe, 0 }, +-#endif +-#ifdef INCLUDE_EEPRO100 +- { "EEPRO100", eepro100_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_EPIC100 +- { "EPIC100", epic100_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_OTULIP +- { "OTulip", otulip_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_TULIP +- { "Tulip", tulip_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_DAVICOM +- { "DAVICOM", davicom_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_CS89X0 +- { "CS89x0", cs89x0_probe, 0 }, +-#endif +-#ifdef INCLUDE_NE2100 +- { "NE2100", ne2100_probe, 0 }, +-#endif +-#ifdef INCLUDE_NI6510 +- { "NI6510", ni6510_probe, 0 }, +-#endif +-#ifdef INCLUDE_SK_G16 +- { "SK_G16", SK_probe, 0 }, +-#endif +-#ifdef INCLUDE_3C507 +- { "3C507", t507_probe, 0 }, +-#endif +-#ifdef INCLUDE_NI5010 +- { "NI5010", ni5010_probe, 0 }, +-#endif +-#ifdef INCLUDE_NI5210 +- { "NI5210", ni5210_probe, 0 }, +-#endif +-#ifdef INCLUDE_EXOS205 +- { "EXOS205", exos205_probe, 0 }, +-#endif +-#ifdef INCLUDE_SMC9000 +- { "SMC9000", smc9000_probe, 0 }, +-#endif +-#ifdef INCLUDE_TIARA +- { "TIARA", tiara_probe, 0 }, +-#endif +-#ifdef INCLUDE_DEPCA +- { "DEPCA", depca_probe, 0 }, +-#endif +-#ifdef INCLUDE_NS8390 +- { "NE2000/PCI", nepci_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_LANCE +- { "LANCE/PCI", lancepci_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_VIA_RHINE +- { "VIA 86C100", rhine_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_W89C840 +- { "W89C840F", w89c840_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_TLAN +- { "Olicom 2326", tlan_probe, pci_ioaddrs }, +-#endif +- /* this entry must always be last to mark the end of list */ +- { 0, 0, 0 } +-}; +- +-#define NIC_TABLE_SIZE (sizeof (NIC) / sizeof (NIC[0])) +- +-static int +-eth_dummy (struct nic *dummy) +-{ +- return 0; ++ struct isa_probe_state *state = &dev->state.isa; ++ printf("Probing isa %s...\n", type_name); ++ if (dev->how_probe == PROBE_FIRST) { ++ state->advance = 0; ++ state->driver = isa_drivers; ++ dev->index = -1; ++ } ++ for(;;) ++ { ++ if ((dev->how_probe != PROBE_AWAKE) && state->advance) { ++ state->driver++; ++ dev->index = -1; ++ } ++ state->advance = 1; ++ ++ if (state->driver >= isa_drivers_end) ++ break; ++ ++ if (state->driver->type != dev->type) ++ continue; ++ ++ if (dev->how_probe != PROBE_AWAKE) { ++ dev->type_index++; ++ } ++ printf("[%s]", state->driver->name); ++ dev->devid.bus_type = ISA_BUS_TYPE; ++ /* FIXME how do I handle dev->index + PROBE_AGAIN?? */ ++ /* driver will fill in vendor and device IDs */ ++ if (state->driver->probe(dev, state->driver->ioaddrs)) { ++ state->advance = (dev->index == -1); ++ return PROBE_WORKED; ++ } ++ putchar('\n'); ++ } ++ return PROBE_FAILED; + } +- +-static char packet[ETH_FRAME_LEN]; +- +-struct nic nic = +-{ +- (void (*) (struct nic *)) eth_dummy, /* reset */ +- eth_dummy, /* poll */ +- (void (*) (struct nic *, const char *, +- unsigned int, unsigned int, +- const char *)) eth_dummy, /* transmit */ +- (void (*) (struct nic *)) eth_dummy, /* disable */ +-#ifdef T503_AUI +- 1, /* aui */ + #else +- 0, /* no aui */ ++#define isa_probe(d,tn) (PROBE_FAILED) + #endif +- &rom, /* rom_info */ +- arptable[ARP_CLIENT].node, /* node_addr */ +- packet, /* packet */ +- 0, /* packetlen */ +- 0, /* priv_data */ ++static const char *driver_name[] = { ++ "nic", ++ "disk", ++ "floppy", + }; +- +-void +-eth_reset (void) ++int probe(struct dev *dev) + { +- (*nic.reset) (&nic); +-} ++ const char *type_name; + +-int +-eth_probe (void) +-{ +- struct pci_device *p; +- const struct dispatch_table *t; +- static int probed = 0; ++ EnterFunction("probe"); + +- /* If already probed, don't try to probe it any longer. */ +- if (probed) +- return 1; +- +- /* Clear the ready flag. */ +- network_ready = 0; +- /* Clear the ARP table. */ +- grub_memset ((char *) arptable, 0, +- MAX_ARP * sizeof (struct arptable_t)); +- +- p = 0; +- +-#ifdef INCLUDE_PCI +- /* In GRUB, the ROM info is initialized here. */ +- rom = *((struct rom_info *) ROM_INFO_LOCATION); +- +- eth_pci_init(pci_nic_list); +- pci_ioaddrs[0] = 0; +- pci_ioaddrs[1] = 0; +- /* at this point we have a list of possible PCI candidates +- we just pick the first one with a non-zero ioaddr */ +- for (p = pci_nic_list; p->vendor != 0; ++p) +- { +- if (p->ioaddr != 0) +- { +- pci_ioaddrs[0] = p->ioaddr; +- break; ++ type_name = ""; ++ if ((dev->type >= 0) && ++ (dev->type < sizeof(driver_name)/sizeof(driver_name[0]))) { ++ type_name = driver_name[dev->type]; + } +- } +-#endif +- +- etherboot_printf("Probing..."); +- +-#ifdef INCLUDE_PCI +- if (p->vendor) +- { +- struct pci_dispatch_table *pt; +- +- for (pt = PCI_NIC; pt->eth_probe != 0; pt++) +- if (p->vendor == pt->vendor && p->dev_id == pt->dev_id) +- { +- etherboot_printf ("[%s]", p->name); +- if ((pt->eth_probe) (&nic, pci_ioaddrs, p)) +- { +- probed = 1; +- return 1; +- } +- } +- } +-#endif /* INCLUDE_PCI */ +- +- for (t = NIC; t->nic_name != 0; ++t) +- { +- etherboot_printf("[%s]", t->nic_name); +-#ifdef INCLUDE_PCI +- if ((*t->eth_probe) (&nic, t->probe_ioaddrs, p)) +- { +- probed = 1; +- return 1; ++ if (dev->how_probe == PROBE_FIRST) { ++ dev->to_probe = PROBE_PCI; ++ memset(&dev->state, 0, sizeof(dev->state)); + } +-#else +- if ((*t->eth_probe) (&nic, t->probe_ioaddrs)) +- { +- probed = 1; +- return 1; ++ if (dev->to_probe == PROBE_PCI) { ++ dev->how_probe = pci_probe(dev, type_name); ++ if (dev->how_probe == PROBE_FAILED) { ++ dev->to_probe = PROBE_ISA; ++ } ++ } ++ if (dev->to_probe == PROBE_ISA) { ++ dev->how_probe = isa_probe(dev, type_name); ++ if (dev->how_probe == PROBE_FAILED) { ++ dev->to_probe = PROBE_NONE; ++ } ++ } ++ if ((dev->to_probe != PROBE_PCI) && ++ (dev->to_probe != PROBE_ISA)) { ++ dev->how_probe = PROBE_FAILED; ++ + } +-#endif /* INCLUDE_PCI */ +- } +- +- return 0; +-} +- +-int +-eth_poll (void) +-{ +- return ((*nic.poll) (&nic)); +-} + +-void +-eth_transmit (const char *d, unsigned int t, unsigned int s, const void *p) +-{ +- (*nic.transmit) (&nic, d, t, s, p); +- if (t == IP) +- twiddle (); ++ LeaveFunction("probe"); ++ return dev->how_probe; + } + +-void +-eth_disable (void) ++void disable(struct dev *dev) + { +- (*nic.disable) (&nic); ++ if (dev->disable) { ++ dev->disable(dev); ++ dev->disable = 0; ++ } + } +diff -Naur grub-0.97.orig/netboot/cpu.h grub-0.97/netboot/cpu.h +--- grub-0.97.orig/netboot/cpu.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/cpu.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,243 @@ ++#ifndef I386_BITS_CPU_H ++#define I386_BITS_CPU_H ++ ++ ++/* Sample usage: CPU_FEATURE_P(cpu.x86_capability, FPU) */ ++#define CPU_FEATURE_P(CAP, FEATURE) \ ++ (!!(CAP[(X86_FEATURE_##FEATURE)/32] & ((X86_FEATURE_##FEATURE) & 0x1f))) ++ ++#define NCAPINTS 4 /* Currently we have 4 32-bit words worth of info */ ++ ++/* Intel-defined CPU features, CPUID level 0x00000001, word 0 */ ++#define X86_FEATURE_FPU (0*32+ 0) /* Onboard FPU */ ++#define X86_FEATURE_VME (0*32+ 1) /* Virtual Mode Extensions */ ++#define X86_FEATURE_DE (0*32+ 2) /* Debugging Extensions */ ++#define X86_FEATURE_PSE (0*32+ 3) /* Page Size Extensions */ ++#define X86_FEATURE_TSC (0*32+ 4) /* Time Stamp Counter */ ++#define X86_FEATURE_MSR (0*32+ 5) /* Model-Specific Registers, RDMSR, WRMSR */ ++#define X86_FEATURE_PAE (0*32+ 6) /* Physical Address Extensions */ ++#define X86_FEATURE_MCE (0*32+ 7) /* Machine Check Architecture */ ++#define X86_FEATURE_CX8 (0*32+ 8) /* CMPXCHG8 instruction */ ++#define X86_FEATURE_APIC (0*32+ 9) /* Onboard APIC */ ++#define X86_FEATURE_SEP (0*32+11) /* SYSENTER/SYSEXIT */ ++#define X86_FEATURE_MTRR (0*32+12) /* Memory Type Range Registers */ ++#define X86_FEATURE_PGE (0*32+13) /* Page Global Enable */ ++#define X86_FEATURE_MCA (0*32+14) /* Machine Check Architecture */ ++#define X86_FEATURE_CMOV (0*32+15) /* CMOV instruction (FCMOVCC and FCOMI too if FPU present) */ ++#define X86_FEATURE_PAT (0*32+16) /* Page Attribute Table */ ++#define X86_FEATURE_PSE36 (0*32+17) /* 36-bit PSEs */ ++#define X86_FEATURE_PN (0*32+18) /* Processor serial number */ ++#define X86_FEATURE_CLFLSH (0*32+19) /* Supports the CLFLUSH instruction */ ++#define X86_FEATURE_DTES (0*32+21) /* Debug Trace Store */ ++#define X86_FEATURE_ACPI (0*32+22) /* ACPI via MSR */ ++#define X86_FEATURE_MMX (0*32+23) /* Multimedia Extensions */ ++#define X86_FEATURE_FXSR (0*32+24) /* FXSAVE and FXRSTOR instructions (fast save and restore */ ++ /* of FPU context), and CR4.OSFXSR available */ ++#define X86_FEATURE_XMM (0*32+25) /* Streaming SIMD Extensions */ ++#define X86_FEATURE_XMM2 (0*32+26) /* Streaming SIMD Extensions-2 */ ++#define X86_FEATURE_SELFSNOOP (0*32+27) /* CPU self snoop */ ++#define X86_FEATURE_HT (0*32+28) /* Hyper-Threading */ ++#define X86_FEATURE_ACC (0*32+29) /* Automatic clock control */ ++#define X86_FEATURE_IA64 (0*32+30) /* IA-64 processor */ ++ ++/* AMD-defined CPU features, CPUID level 0x80000001, word 1 */ ++/* Don't duplicate feature flags which are redundant with Intel! */ ++#define X86_FEATURE_SYSCALL (1*32+11) /* SYSCALL/SYSRET */ ++#define X86_FEATURE_MMXEXT (1*32+22) /* AMD MMX extensions */ ++#define X86_FEATURE_LM (1*32+29) /* Long Mode (x86-64) */ ++#define X86_FEATURE_3DNOWEXT (1*32+30) /* AMD 3DNow! extensions */ ++#define X86_FEATURE_3DNOW (1*32+31) /* 3DNow! */ ++ ++/* Transmeta-defined CPU features, CPUID level 0x80860001, word 2 */ ++#define X86_FEATURE_RECOVERY (2*32+ 0) /* CPU in recovery mode */ ++#define X86_FEATURE_LONGRUN (2*32+ 1) /* Longrun power control */ ++#define X86_FEATURE_LRTI (2*32+ 3) /* LongRun table interface */ ++ ++/* Other features, Linux-defined mapping, word 3 */ ++/* This range is used for feature bits which conflict or are synthesized */ ++#define X86_FEATURE_CXMMX (3*32+ 0) /* Cyrix MMX extensions */ ++#define X86_FEATURE_K6_MTRR (3*32+ 1) /* AMD K6 nonstandard MTRRs */ ++#define X86_FEATURE_CYRIX_ARR (3*32+ 2) /* Cyrix ARRs (= MTRRs) */ ++#define X86_FEATURE_CENTAUR_MCR (3*32+ 3) /* Centaur MCRs (= MTRRs) */ ++ ++#define MAX_X86_VENDOR_ID 16 ++struct cpuinfo_x86 { ++ uint8_t x86; /* CPU family */ ++ uint8_t x86_model; ++ uint8_t x86_mask; ++ ++ int cpuid_level; /* Maximum supported CPUID level, -1=no CPUID */ ++ unsigned x86_capability[NCAPINTS]; ++ char x86_vendor_id[MAX_X86_VENDOR_ID]; ++}; ++ ++ ++#define X86_VENDOR_INTEL 0 ++#define X86_VENDOR_CYRIX 1 ++#define X86_VENDOR_AMD 2 ++#define X86_VENDOR_UMC 3 ++#define X86_VENDOR_NEXGEN 4 ++#define X86_VENDOR_CENTAUR 5 ++#define X86_VENDOR_RISE 6 ++#define X86_VENDOR_TRANSMETA 7 ++#define X86_VENDOR_NSC 8 ++#define X86_VENDOR_UNKNOWN 0xff ++ ++/* ++ * EFLAGS bits ++ */ ++#define X86_EFLAGS_CF 0x00000001 /* Carry Flag */ ++#define X86_EFLAGS_PF 0x00000004 /* Parity Flag */ ++#define X86_EFLAGS_AF 0x00000010 /* Auxillary carry Flag */ ++#define X86_EFLAGS_ZF 0x00000040 /* Zero Flag */ ++#define X86_EFLAGS_SF 0x00000080 /* Sign Flag */ ++#define X86_EFLAGS_TF 0x00000100 /* Trap Flag */ ++#define X86_EFLAGS_IF 0x00000200 /* Interrupt Flag */ ++#define X86_EFLAGS_DF 0x00000400 /* Direction Flag */ ++#define X86_EFLAGS_OF 0x00000800 /* Overflow Flag */ ++#define X86_EFLAGS_IOPL 0x00003000 /* IOPL mask */ ++#define X86_EFLAGS_NT 0x00004000 /* Nested Task */ ++#define X86_EFLAGS_RF 0x00010000 /* Resume Flag */ ++#define X86_EFLAGS_VM 0x00020000 /* Virtual Mode */ ++#define X86_EFLAGS_AC 0x00040000 /* Alignment Check */ ++#define X86_EFLAGS_VIF 0x00080000 /* Virtual Interrupt Flag */ ++#define X86_EFLAGS_VIP 0x00100000 /* Virtual Interrupt Pending */ ++#define X86_EFLAGS_ID 0x00200000 /* CPUID detection flag */ ++ ++/* ++ * Generic CPUID function ++ */ ++static inline void cpuid(int op, ++ unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx) ++{ ++ __asm__("cpuid" ++ : "=a" (*eax), ++ "=b" (*ebx), ++ "=c" (*ecx), ++ "=d" (*edx) ++ : "0" (op)); ++} ++ ++/* ++ * CPUID functions returning a single datum ++ */ ++static inline unsigned int cpuid_eax(unsigned int op) ++{ ++ unsigned int eax; ++ ++ __asm__("cpuid" ++ : "=a" (eax) ++ : "0" (op) ++ : "bx", "cx", "dx"); ++ return eax; ++} ++static inline unsigned int cpuid_ebx(unsigned int op) ++{ ++ unsigned int eax, ebx; ++ ++ __asm__("cpuid" ++ : "=a" (eax), "=b" (ebx) ++ : "0" (op) ++ : "cx", "dx" ); ++ return ebx; ++} ++static inline unsigned int cpuid_ecx(unsigned int op) ++{ ++ unsigned int eax, ecx; ++ ++ __asm__("cpuid" ++ : "=a" (eax), "=c" (ecx) ++ : "0" (op) ++ : "bx", "dx" ); ++ return ecx; ++} ++static inline unsigned int cpuid_edx(unsigned int op) ++{ ++ unsigned int eax, edx; ++ ++ __asm__("cpuid" ++ : "=a" (eax), "=d" (edx) ++ : "0" (op) ++ : "bx", "cx"); ++ return edx; ++} ++ ++/* ++ * Intel CPU features in CR4 ++ */ ++#define X86_CR4_VME 0x0001 /* enable vm86 extensions */ ++#define X86_CR4_PVI 0x0002 /* virtual interrupts flag enable */ ++#define X86_CR4_TSD 0x0004 /* disable time stamp at ipl 3 */ ++#define X86_CR4_DE 0x0008 /* enable debugging extensions */ ++#define X86_CR4_PSE 0x0010 /* enable page size extensions */ ++#define X86_CR4_PAE 0x0020 /* enable physical address extensions */ ++#define X86_CR4_MCE 0x0040 /* Machine check enable */ ++#define X86_CR4_PGE 0x0080 /* enable global pages */ ++#define X86_CR4_PCE 0x0100 /* enable performance counters at ipl 3 */ ++#define X86_CR4_OSFXSR 0x0200 /* enable fast FPU save and restore */ ++#define X86_CR4_OSXMMEXCPT 0x0400 /* enable unmasked SSE exceptions */ ++ ++ ++#define MSR_K6_EFER 0xC0000080 ++/* EFER bits: */ ++#define _EFER_SCE 0 /* SYSCALL/SYSRET */ ++#define _EFER_LME 8 /* Long mode enable */ ++#define _EFER_LMA 10 /* Long mode active (read-only) */ ++#define _EFER_NX 11 /* No execute enable */ ++ ++#define EFER_SCE (1<<_EFER_SCE) ++#define EFER_LME (1< +- +- * disabled all "advanced" features; this should make the code more reliable +- +- * reorganized the reset function +- +- * always reset the address port, so that autoprobing will continue working +- +- * some cosmetic changes +- +- * 2.5 +- +- Thu Dec 5 21:00:00 1996 Markus Gutschke +- +- * tested the code against a CS8900 card +- +- * lots of minor bug fixes and adjustments +- +- * this is the first release, that actually works! it still requires some +- changes in order to be more tolerant to different environments +- +- * 4 +- +- Fri Nov 22 23:00:00 1996 Markus Gutschke +- +- * read the manuals for the CS89x0 chipsets and took note of all the +- changes that will be neccessary in order to adapt Russel Nelson's code +- to the requirements of a BOOT-Prom +- +- * 6 +- +- Thu Nov 19 22:00:00 1996 Markus Gutschke +- +- * Synched with Russel Nelson's current code (v1.00) +- +- * 2 +- +- Thu Nov 12 18:00:00 1996 Markus Gutschke +- +- * Cleaned up some of the code and tried to optimize the code size. +- +- * 1.5 +- +- Sun Nov 10 16:30:00 1996 Markus Gutschke +- +- * First experimental release. This code compiles fine, but I +- have no way of testing whether it actually works. +- +- * I did not (yet) bother to make the code 16bit aware, so for +- the time being, it will only work for Etherboot/32. +- +- * 12 +- +- */ +- +-#include "etherboot.h" +-#include "nic.h" +-#include "cards.h" +-#include "cs89x0.h" +- +-static unsigned short eth_nic_base; +-static unsigned long eth_mem_start; +-static unsigned short eth_irq; +-static unsigned short eth_cs_type; /* one of: CS8900, CS8920, CS8920M */ +-static unsigned short eth_auto_neg_cnf; +-static unsigned short eth_adapter_cnf; +-static unsigned short eth_linectl; +- +-/************************************************************************* +- CS89x0 - specific routines +-**************************************************************************/ +- +-static inline int readreg(int portno) +-{ +- outw(portno, eth_nic_base + ADD_PORT); +- return inw(eth_nic_base + DATA_PORT); +-} +- +-static inline void writereg(int portno, int value) +-{ +- outw(portno, eth_nic_base + ADD_PORT); +- outw(value, eth_nic_base + DATA_PORT); +- return; +-} +- +-/************************************************************************* +-EEPROM access +-**************************************************************************/ +- +-static int wait_eeprom_ready(void) +-{ +- unsigned long tmo = currticks() + 4*TICKS_PER_SEC; +- +- /* check to see if the EEPROM is ready, a timeout is used - +- just in case EEPROM is ready when SI_BUSY in the +- PP_SelfST is clear */ +- while(readreg(PP_SelfST) & SI_BUSY) { +- if (currticks() >= tmo) +- return -1; } +- return 0; +-} +- +-static int get_eeprom_data(int off, int len, unsigned short *buffer) +-{ +- int i; +- +-#ifdef EDEBUG +- printf("\ncs: EEPROM data from %hX for %hX:",off,len); +-#endif +- for (i = 0; i < len; i++) { +- if (wait_eeprom_ready() < 0) +- return -1; +- /* Now send the EEPROM read command and EEPROM location +- to read */ +- writereg(PP_EECMD, (off + i) | EEPROM_READ_CMD); +- if (wait_eeprom_ready() < 0) +- return -1; +- buffer[i] = readreg(PP_EEData); +-#ifdef EDEBUG +- if (!(i%10)) +- printf("\ncs: "); +- printf("%hX ", buffer[i]); +-#endif +- } +-#ifdef EDEBUG +- putchar('\n'); +-#endif +- +- return(0); +-} +- +-static int get_eeprom_chksum(int off, int len, unsigned short *buffer) +-{ +- int i, cksum; +- +- cksum = 0; +- for (i = 0; i < len; i++) +- cksum += buffer[i]; +- cksum &= 0xffff; +- if (cksum == 0) +- return 0; +- return -1; +-} +- +-/************************************************************************* +-Activate all of the available media and probe for network +-**************************************************************************/ +- +-static void clrline(void) +-{ +- int i; +- +- putchar('\r'); +- for (i = 79; i--; ) putchar(' '); +- printf("\rcs: "); +- return; +-} +- +-static void control_dc_dc(int on_not_off) +-{ +- unsigned int selfcontrol; +- unsigned long tmo = currticks() + TICKS_PER_SEC; +- +- /* control the DC to DC convertor in the SelfControl register. */ +- selfcontrol = HCB1_ENBL; /* Enable the HCB1 bit as an output */ +- if (((eth_adapter_cnf & A_CNF_DC_DC_POLARITY) != 0) ^ on_not_off) +- selfcontrol |= HCB1; +- else +- selfcontrol &= ~HCB1; +- writereg(PP_SelfCTL, selfcontrol); +- +- /* Wait for the DC/DC converter to power up - 1000ms */ +- while (currticks() < tmo); +- +- return; +-} +- +-static int detect_tp(void) +-{ +- unsigned long tmo; +- +- /* Turn on the chip auto detection of 10BT/ AUI */ +- +- clrline(); printf("attempting %s:","TP"); +- +- /* If connected to another full duplex capable 10-Base-T card +- the link pulses seem to be lost when the auto detect bit in +- the LineCTL is set. To overcome this the auto detect bit +- will be cleared whilst testing the 10-Base-T interface. +- This would not be necessary for the sparrow chip but is +- simpler to do it anyway. */ +- writereg(PP_LineCTL, eth_linectl &~ AUI_ONLY); +- control_dc_dc(0); +- +- /* Delay for the hardware to work out if the TP cable is +- present - 150ms */ +- for (tmo = currticks() + 4; currticks() < tmo; ); +- +- if ((readreg(PP_LineST) & LINK_OK) == 0) +- return 0; +- +- if (eth_cs_type != CS8900) { +- +- writereg(PP_AutoNegCTL, eth_auto_neg_cnf & AUTO_NEG_MASK); +- +- if ((eth_auto_neg_cnf & AUTO_NEG_BITS) == AUTO_NEG_ENABLE) { +- printf(" negotiating duplex... "); +- while (readreg(PP_AutoNegST) & AUTO_NEG_BUSY) { +- if (currticks() - tmo > 40*TICKS_PER_SEC) { +- printf("time out "); +- break; +- } +- } +- } +- if (readreg(PP_AutoNegST) & FDX_ACTIVE) +- printf("using full duplex"); +- else +- printf("using half duplex"); +- } +- +- return A_CNF_MEDIA_10B_T; +-} +- +-/* send a test packet - return true if carrier bits are ok */ +-static int send_test_pkt(struct nic *nic) +-{ +- static unsigned char testpacket[] = { 0,0,0,0,0,0, 0,0,0,0,0,0, +- 0, 46, /*A 46 in network order */ +- 0, 0, /*DSAP=0 & SSAP=0 fields */ +- 0xf3,0 /*Control (Test Req+P bit set)*/ }; +- unsigned long tmo; +- +- writereg(PP_LineCTL, readreg(PP_LineCTL) | SERIAL_TX_ON); +- +- memcpy(testpacket, nic->node_addr, ETH_ALEN); +- memcpy(testpacket+ETH_ALEN, nic->node_addr, ETH_ALEN); +- +- outw(TX_AFTER_ALL, eth_nic_base + TX_CMD_PORT); +- outw(ETH_ZLEN, eth_nic_base + TX_LEN_PORT); +- +- /* Test to see if the chip has allocated memory for the packet */ +- for (tmo = currticks() + 2; +- (readreg(PP_BusST) & READY_FOR_TX_NOW) == 0; ) +- if (currticks() >= tmo) +- return(0); +- +- /* Write the contents of the packet */ +- outsw(eth_nic_base + TX_FRAME_PORT, testpacket, +- (ETH_ZLEN+1)>>1); +- +- printf(" sending test packet "); +- /* wait a couple of timer ticks for packet to be received */ +- for (tmo = currticks() + 2; currticks() < tmo; ); +- +- if ((readreg(PP_TxEvent) & TX_SEND_OK_BITS) == TX_OK) { +- printf("succeeded"); +- return 1; +- } +- printf("failed"); +- return 0; +-} +- +- +-static int detect_aui(struct nic *nic) +-{ +- clrline(); printf("attempting %s:","AUI"); +- control_dc_dc(0); +- +- writereg(PP_LineCTL, (eth_linectl & ~AUTO_AUI_10BASET) | AUI_ONLY); +- +- if (send_test_pkt(nic)) { +- return A_CNF_MEDIA_AUI; } +- else +- return 0; +-} +- +-static int detect_bnc(struct nic *nic) +-{ +- clrline(); printf("attempting %s:","BNC"); +- control_dc_dc(1); +- +- writereg(PP_LineCTL, (eth_linectl & ~AUTO_AUI_10BASET) | AUI_ONLY); +- +- if (send_test_pkt(nic)) { +- return A_CNF_MEDIA_10B_2; } +- else +- return 0; +-} +- +-/************************************************************************** +-ETH_RESET - Reset adapter +-***************************************************************************/ +- +-static void cs89x0_reset(struct nic *nic) +-{ +- int i; +- unsigned long reset_tmo; +- +- writereg(PP_SelfCTL, readreg(PP_SelfCTL) | POWER_ON_RESET); +- +- /* wait for two ticks; that is 2*55ms */ +- for (reset_tmo = currticks() + 2; currticks() < reset_tmo; ); +- +- if (eth_cs_type != CS8900) { +- /* Hardware problem requires PNP registers to be reconfigured +- after a reset */ +- if (eth_irq != 0xFFFF) { +- outw(PP_CS8920_ISAINT, eth_nic_base + ADD_PORT); +- outb(eth_irq, eth_nic_base + DATA_PORT); +- outb(0, eth_nic_base + DATA_PORT + 1); } +- +- if (eth_mem_start) { +- outw(PP_CS8920_ISAMemB, eth_nic_base + ADD_PORT); +- outb((eth_mem_start >> 8) & 0xff, eth_nic_base + DATA_PORT); +- outb((eth_mem_start >> 24) & 0xff, eth_nic_base + DATA_PORT + 1); } } +- +- /* Wait until the chip is reset */ +- for (reset_tmo = currticks() + 2; +- (readreg(PP_SelfST) & INIT_DONE) == 0 && +- currticks() < reset_tmo; ); +- +- /* disable interrupts and memory accesses */ +- writereg(PP_BusCTL, 0); +- +- /* set the ethernet address */ +- for (i=0; i < ETH_ALEN/2; i++) +- writereg(PP_IA+i*2, +- nic->node_addr[i*2] | +- (nic->node_addr[i*2+1] << 8)); +- +- /* receive only error free packets addressed to this card */ +- writereg(PP_RxCTL, DEF_RX_ACCEPT); +- +- /* do not generate any interrupts on receive operations */ +- writereg(PP_RxCFG, 0); +- +- /* do not generate any interrupts on transmit operations */ +- writereg(PP_TxCFG, 0); +- +- /* do not generate any interrupts on buffer operations */ +- writereg(PP_BufCFG, 0); +- +- /* reset address port, so that autoprobing will keep working */ +- outw(PP_ChipID, eth_nic_base + ADD_PORT); +- +- return; +-} +- +-/************************************************************************** +-ETH_TRANSMIT - Transmit a frame +-***************************************************************************/ +- +-static void cs89x0_transmit( +- struct nic *nic, +- const char *d, /* Destination */ +- unsigned int t, /* Type */ +- unsigned int s, /* size */ +- const char *p) /* Packet */ +-{ +- unsigned long tmo; +- int sr; +- +- /* does this size have to be rounded??? please, +- somebody have a look in the specs */ +- if ((sr = ((s + ETH_HLEN + 1)&~1)) < ETH_ZLEN) +- sr = ETH_ZLEN; +- +-retry: +- /* initiate a transmit sequence */ +- outw(TX_AFTER_ALL, eth_nic_base + TX_CMD_PORT); +- outw(sr, eth_nic_base + TX_LEN_PORT); +- +- /* Test to see if the chip has allocated memory for the packet */ +- if ((readreg(PP_BusST) & READY_FOR_TX_NOW) == 0) { +- /* Oops... this should not happen! */ +- printf("cs: unable to send packet; retrying...\n"); +- for (tmo = currticks() + 5*TICKS_PER_SEC; currticks() < tmo; ); +- cs89x0_reset(nic); +- goto retry; } +- +- /* Write the contents of the packet */ +- outsw(eth_nic_base + TX_FRAME_PORT, d, ETH_ALEN/2); +- outsw(eth_nic_base + TX_FRAME_PORT, nic->node_addr, +- ETH_ALEN/2); +- outw(((t >> 8)&0xFF)|(t << 8), eth_nic_base + TX_FRAME_PORT); +- outsw(eth_nic_base + TX_FRAME_PORT, p, (s+1)/2); +- for (sr = sr/2 - (s+1)/2 - ETH_ALEN - 1; sr-- > 0; +- outw(0, eth_nic_base + TX_FRAME_PORT)); +- +- /* wait for transfer to succeed */ +- for (tmo = currticks()+5*TICKS_PER_SEC; +- (s = readreg(PP_TxEvent)&~0x1F) == 0 && currticks() < tmo;) +- /* nothing */ ; +- if ((s & TX_SEND_OK_BITS) != TX_OK) { +- printf("\ntransmission error %#hX\n", s); +- } +- +- return; +-} +- +-/************************************************************************** +-ETH_POLL - Wait for a frame +-***************************************************************************/ +- +-static int cs89x0_poll(struct nic *nic) +-{ +- int status; +- +- status = readreg(PP_RxEvent); +- +- if ((status & RX_OK) == 0) +- return(0); +- +- status = inw(eth_nic_base + RX_FRAME_PORT); +- nic->packetlen = inw(eth_nic_base + RX_FRAME_PORT); +- insw(eth_nic_base + RX_FRAME_PORT, nic->packet, nic->packetlen >> 1); +- if (nic->packetlen & 1) +- nic->packet[nic->packetlen-1] = inw(eth_nic_base + RX_FRAME_PORT); +- return 1; +-} +- +-static void cs89x0_disable(struct nic *nic) +-{ +- cs89x0_reset(nic); +-} +- +-/************************************************************************** +-ETH_PROBE - Look for an adapter +-***************************************************************************/ +- +-struct nic *cs89x0_probe(struct nic *nic, unsigned short *probe_addrs) +-{ +- static const unsigned int netcard_portlist[] = { +-#ifdef CS_SCAN +- CS_SCAN, +-#else /* use "conservative" default values for autoprobing */ +- 0x300,0x320,0x340,0x200,0x220,0x240, +- 0x260,0x280,0x2a0,0x2c0,0x2e0, +- /* if that did not work, then be more aggressive */ +- 0x301,0x321,0x341,0x201,0x221,0x241, +- 0x261,0x281,0x2a1,0x2c1,0x2e1, +-#endif +- 0}; +- +- int i, result = -1; +- unsigned rev_type = 0, ioaddr, ioidx, isa_cnf, cs_revision; +- unsigned short eeprom_buff[CHKSUM_LEN]; +- +- +- for (ioidx = 0; (ioaddr=netcard_portlist[ioidx++]) != 0; ) { +- /* if they give us an odd I/O address, then do ONE write to +- the address port, to get it back to address zero, where we +- expect to find the EISA signature word. */ +- if (ioaddr & 1) { +- ioaddr &= ~1; +- if ((inw(ioaddr + ADD_PORT) & ADD_MASK) != ADD_SIG) +- continue; +- outw(PP_ChipID, ioaddr + ADD_PORT); +- } +- +- if (inw(ioaddr + DATA_PORT) != CHIP_EISA_ID_SIG) +- continue; +- eth_nic_base = ioaddr; +- +- /* get the chip type */ +- rev_type = readreg(PRODUCT_ID_ADD); +- eth_cs_type = rev_type &~ REVISON_BITS; +- cs_revision = ((rev_type & REVISON_BITS) >> 8) + 'A'; +- +- printf("\ncs: cs89%c0%s rev %c, base %#hX", +- eth_cs_type==CS8900?'0':'2', +- eth_cs_type==CS8920M?"M":"", +- cs_revision, +- eth_nic_base); +- +- /* First check to see if an EEPROM is attached*/ +- if ((readreg(PP_SelfST) & EEPROM_PRESENT) == 0) { +- printf("\ncs: no EEPROM...\n"); +- outw(PP_ChipID, eth_nic_base + ADD_PORT); +- continue; } +- else if (get_eeprom_data(START_EEPROM_DATA,CHKSUM_LEN, +- eeprom_buff) < 0) { +- printf("\ncs: EEPROM read failed...\n"); +- outw(PP_ChipID, eth_nic_base + ADD_PORT); +- continue; } +- else if (get_eeprom_chksum(START_EEPROM_DATA,CHKSUM_LEN, +- eeprom_buff) < 0) { +- printf("\ncs: EEPROM checksum bad...\n"); +- outw(PP_ChipID, eth_nic_base + ADD_PORT); +- continue; } +- +- /* get transmission control word but keep the +- autonegotiation bits */ +- eth_auto_neg_cnf = eeprom_buff[AUTO_NEG_CNF_OFFSET/2]; +- /* Store adapter configuration */ +- eth_adapter_cnf = eeprom_buff[ADAPTER_CNF_OFFSET/2]; +- /* Store ISA configuration */ +- isa_cnf = eeprom_buff[ISA_CNF_OFFSET/2]; +- +- /* store the initial memory base address */ +- eth_mem_start = eeprom_buff[PACKET_PAGE_OFFSET/2] << 8; +- +- printf("%s%s%s, addr ", +- (eth_adapter_cnf & A_CNF_10B_T)?", RJ-45":"", +- (eth_adapter_cnf & A_CNF_AUI)?", AUI":"", +- (eth_adapter_cnf & A_CNF_10B_2)?", BNC":""); +- +- /* If this is a CS8900 then no pnp soft */ +- if (eth_cs_type != CS8900 && +- /* Check if the ISA IRQ has been set */ +- (i = readreg(PP_CS8920_ISAINT) & 0xff, +- (i != 0 && i < CS8920_NO_INTS))) +- eth_irq = i; +- else { +- i = isa_cnf & INT_NO_MASK; +- if (eth_cs_type == CS8900) { +- /* the table that follows is dependent +- upon how you wired up your cs8900 +- in your system. The table is the +- same as the cs8900 engineering demo +- board. irq_map also depends on the +- contents of the table. Also see +- write_irq, which is the reverse +- mapping of the table below. */ +- if (i < 4) i = "\012\013\014\005"[i]; +- else printf("\ncs: BUG: isa_config is %d\n", i); } +- eth_irq = i; } +- +- /* Retrieve and print the ethernet address. */ +- for (i=0; inode_addr[i] = ((unsigned char *)eeprom_buff)[i]; +- } +- printf("%!\n", nic->node_addr); +- +- /* Set the LineCTL quintuplet based on adapter +- configuration read from EEPROM */ +- if ((eth_adapter_cnf & A_CNF_EXTND_10B_2) && +- (eth_adapter_cnf & A_CNF_LOW_RX_SQUELCH)) +- eth_linectl = LOW_RX_SQUELCH; +- else +- eth_linectl = 0; +- +- /* check to make sure that they have the "right" +- hardware available */ +- switch(eth_adapter_cnf & A_CNF_MEDIA_TYPE) { +- case A_CNF_MEDIA_10B_T: result = eth_adapter_cnf & A_CNF_10B_T; +- break; +- case A_CNF_MEDIA_AUI: result = eth_adapter_cnf & A_CNF_AUI; +- break; +- case A_CNF_MEDIA_10B_2: result = eth_adapter_cnf & A_CNF_10B_2; +- break; +- default: result = eth_adapter_cnf & (A_CNF_10B_T | A_CNF_AUI | +- A_CNF_10B_2); +- } +- if (!result) { +- printf("cs: EEPROM is configured for unavailable media\n"); +- error: +- writereg(PP_LineCTL, readreg(PP_LineCTL) & +- ~(SERIAL_TX_ON | SERIAL_RX_ON)); +- outw(PP_ChipID, eth_nic_base + ADD_PORT); +- continue; +- } +- +- /* Initialize the card for probing of the attached media */ +- cs89x0_reset(nic); +- +- /* set the hardware to the configured choice */ +- switch(eth_adapter_cnf & A_CNF_MEDIA_TYPE) { +- case A_CNF_MEDIA_10B_T: +- result = detect_tp(); +- if (!result) { +- clrline(); +- printf("10Base-T (RJ-45%s", +- ") has no cable\n"); } +- /* check "ignore missing media" bit */ +- if (eth_auto_neg_cnf & IMM_BIT) +- /* Yes! I don't care if I see a link pulse */ +- result = A_CNF_MEDIA_10B_T; +- break; +- case A_CNF_MEDIA_AUI: +- result = detect_aui(nic); +- if (!result) { +- clrline(); +- printf("10Base-5 (AUI%s", +- ") has no cable\n"); } +- /* check "ignore missing media" bit */ +- if (eth_auto_neg_cnf & IMM_BIT) +- /* Yes! I don't care if I see a carrrier */ +- result = A_CNF_MEDIA_AUI; +- break; +- case A_CNF_MEDIA_10B_2: +- result = detect_bnc(nic); +- if (!result) { +- clrline(); +- printf("10Base-2 (BNC%s", +- ") has no cable\n"); } +- /* check "ignore missing media" bit */ +- if (eth_auto_neg_cnf & IMM_BIT) +- /* Yes! I don't care if I can xmit a packet */ +- result = A_CNF_MEDIA_10B_2; +- break; +- case A_CNF_MEDIA_AUTO: +- writereg(PP_LineCTL, eth_linectl | AUTO_AUI_10BASET); +- if (eth_adapter_cnf & A_CNF_10B_T) +- if ((result = detect_tp()) != 0) +- break; +- if (eth_adapter_cnf & A_CNF_AUI) +- if ((result = detect_aui(nic)) != 0) +- break; +- if (eth_adapter_cnf & A_CNF_10B_2) +- if ((result = detect_bnc(nic)) != 0) +- break; +- clrline(); printf("no media detected\n"); +- goto error; +- } +- clrline(); +- switch(result) { +- case 0: printf("no network cable attached to configured media\n"); +- goto error; +- case A_CNF_MEDIA_10B_T: printf("using 10Base-T (RJ-45)\n"); +- break; +- case A_CNF_MEDIA_AUI: printf("using 10Base-5 (AUI)\n"); +- break; +- case A_CNF_MEDIA_10B_2: printf("using 10Base-2 (BNC)\n"); +- break; +- } +- +- /* Turn on both receive and transmit operations */ +- writereg(PP_LineCTL, readreg(PP_LineCTL) | SERIAL_RX_ON | +- SERIAL_TX_ON); +- +- break; +- } +- +- if (ioaddr == 0) +- return (0); +- nic->reset = cs89x0_reset; +- nic->poll = cs89x0_poll; +- nic->transmit = cs89x0_transmit; +- nic->disable = cs89x0_disable; +- return (nic); +-} +- +-/* +- * Local variables: +- * c-basic-offset: 8 +- * End: +- */ +- +diff -Naur grub-0.97.orig/netboot/cs89x0.h grub-0.97/netboot/cs89x0.h +--- grub-0.97.orig/netboot/cs89x0.h 2003-07-09 11:45:37.000000000 +0000 ++++ grub-0.97/netboot/cs89x0.h 1970-01-01 00:00:00.000000000 +0000 +@@ -1,461 +0,0 @@ +-/* Copyright, 1988-1992, Russell Nelson, Crynwr Software +- +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU General Public License as published by +- the Free Software Foundation, version 1. +- +- This program is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- GNU General Public License for more details. +- +- You should have received a copy of the GNU General Public License +- along with this program; if not, write to the Free Software +- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +- +-#define PP_ChipID 0x0000 /* offset 0h -> Corp -ID */ +- /* offset 2h -> Model/Product Number */ +- /* offset 3h -> Chip Revision Number */ +- +-#define PP_ISAIOB 0x0020 /* IO base address */ +-#define PP_CS8900_ISAINT 0x0022 /* ISA interrupt select */ +-#define PP_CS8920_ISAINT 0x0370 /* ISA interrupt select */ +-#define PP_CS8900_ISADMA 0x0024 /* ISA Rec DMA channel */ +-#define PP_CS8920_ISADMA 0x0374 /* ISA Rec DMA channel */ +-#define PP_ISASOF 0x0026 /* ISA DMA offset */ +-#define PP_DmaFrameCnt 0x0028 /* ISA DMA Frame count */ +-#define PP_DmaByteCnt 0x002A /* ISA DMA Byte count */ +-#define PP_CS8900_ISAMemB 0x002C /* Memory base */ +-#define PP_CS8920_ISAMemB 0x0348 /* */ +- +-#define PP_ISABootBase 0x0030 /* Boot Prom base */ +-#define PP_ISABootMask 0x0034 /* Boot Prom Mask */ +- +-/* EEPROM data and command registers */ +-#define PP_EECMD 0x0040 /* NVR Interface Command register */ +-#define PP_EEData 0x0042 /* NVR Interface Data Register */ +-#define PP_DebugReg 0x0044 /* Debug Register */ +- +-#define PP_RxCFG 0x0102 /* Rx Bus config */ +-#define PP_RxCTL 0x0104 /* Receive Control Register */ +-#define PP_TxCFG 0x0106 /* Transmit Config Register */ +-#define PP_TxCMD 0x0108 /* Transmit Command Register */ +-#define PP_BufCFG 0x010A /* Bus configuration Register */ +-#define PP_LineCTL 0x0112 /* Line Config Register */ +-#define PP_SelfCTL 0x0114 /* Self Command Register */ +-#define PP_BusCTL 0x0116 /* ISA bus control Register */ +-#define PP_TestCTL 0x0118 /* Test Register */ +-#define PP_AutoNegCTL 0x011C /* Auto Negotiation Ctrl */ +- +-#define PP_ISQ 0x0120 /* Interrupt Status */ +-#define PP_RxEvent 0x0124 /* Rx Event Register */ +-#define PP_TxEvent 0x0128 /* Tx Event Register */ +-#define PP_BufEvent 0x012C /* Bus Event Register */ +-#define PP_RxMiss 0x0130 /* Receive Miss Count */ +-#define PP_TxCol 0x0132 /* Transmit Collision Count */ +-#define PP_LineST 0x0134 /* Line State Register */ +-#define PP_SelfST 0x0136 /* Self State register */ +-#define PP_BusST 0x0138 /* Bus Status */ +-#define PP_TDR 0x013C /* Time Domain Reflectometry */ +-#define PP_AutoNegST 0x013E /* Auto Neg Status */ +-#define PP_TxCommand 0x0144 /* Tx Command */ +-#define PP_TxLength 0x0146 /* Tx Length */ +-#define PP_LAF 0x0150 /* Hash Table */ +-#define PP_IA 0x0158 /* Physical Address Register */ +- +-#define PP_RxStatus 0x0400 /* Receive start of frame */ +-#define PP_RxLength 0x0402 /* Receive Length of frame */ +-#define PP_RxFrame 0x0404 /* Receive frame pointer */ +-#define PP_TxFrame 0x0A00 /* Transmit frame pointer */ +- +-/* Primary I/O Base Address. If no I/O base is supplied by the user, then this */ +-/* can be used as the default I/O base to access the PacketPage Area. */ +-#define DEFAULTIOBASE 0x0300 +-#define FIRST_IO 0x020C /* First I/O port to check */ +-#define LAST_IO 0x037C /* Last I/O port to check (+10h) */ +-#define ADD_MASK 0x3000 /* Mask it use of the ADD_PORT register */ +-#define ADD_SIG 0x3000 /* Expected ID signature */ +- +-#define CHIP_EISA_ID_SIG 0x630E /* Product ID Code for Crystal Chip (CS8900 spec 4.3) */ +- +-#ifdef IBMEIPKT +-#define EISA_ID_SIG 0x4D24 /* IBM */ +-#define PART_NO_SIG 0x1010 /* IBM */ +-#define MONGOOSE_BIT 0x0000 /* IBM */ +-#else +-#define EISA_ID_SIG 0x630E /* PnP Vendor ID (same as chip id for Crystal board) */ +-#define PART_NO_SIG 0x4000 /* ID code CS8920 board (PnP Vendor Product code) */ +-#define MONGOOSE_BIT 0x2000 /* PART_NO_SIG + MONGOOSE_BUT => ID of mongoose */ +-#endif +- +-#define PRODUCT_ID_ADD 0x0002 /* Address of product ID */ +- +-/* Mask to find out the types of registers */ +-#define REG_TYPE_MASK 0x001F +- +-/* Eeprom Commands */ +-#define ERSE_WR_ENBL 0x00F0 +-#define ERSE_WR_DISABLE 0x0000 +- +-/* Defines Control/Config register quintuplet numbers */ +-#define RX_BUF_CFG 0x0003 +-#define RX_CONTROL 0x0005 +-#define TX_CFG 0x0007 +-#define TX_COMMAND 0x0009 +-#define BUF_CFG 0x000B +-#define LINE_CONTROL 0x0013 +-#define SELF_CONTROL 0x0015 +-#define BUS_CONTROL 0x0017 +-#define TEST_CONTROL 0x0019 +- +-/* Defines Status/Count registers quintuplet numbers */ +-#define RX_EVENT 0x0004 +-#define TX_EVENT 0x0008 +-#define BUF_EVENT 0x000C +-#define RX_MISS_COUNT 0x0010 +-#define TX_COL_COUNT 0x0012 +-#define LINE_STATUS 0x0014 +-#define SELF_STATUS 0x0016 +-#define BUS_STATUS 0x0018 +-#define TDR 0x001C +- +-/* PP_RxCFG - Receive Configuration and Interrupt Mask bit definition - Read/write */ +-#define SKIP_1 0x0040 +-#define RX_STREAM_ENBL 0x0080 +-#define RX_OK_ENBL 0x0100 +-#define RX_DMA_ONLY 0x0200 +-#define AUTO_RX_DMA 0x0400 +-#define BUFFER_CRC 0x0800 +-#define RX_CRC_ERROR_ENBL 0x1000 +-#define RX_RUNT_ENBL 0x2000 +-#define RX_EXTRA_DATA_ENBL 0x4000 +- +-/* PP_RxCTL - Receive Control bit definition - Read/write */ +-#define RX_IA_HASH_ACCEPT 0x0040 +-#define RX_PROM_ACCEPT 0x0080 +-#define RX_OK_ACCEPT 0x0100 +-#define RX_MULTCAST_ACCEPT 0x0200 +-#define RX_IA_ACCEPT 0x0400 +-#define RX_BROADCAST_ACCEPT 0x0800 +-#define RX_BAD_CRC_ACCEPT 0x1000 +-#define RX_RUNT_ACCEPT 0x2000 +-#define RX_EXTRA_DATA_ACCEPT 0x4000 +-#define RX_ALL_ACCEPT (RX_PROM_ACCEPT|RX_BAD_CRC_ACCEPT|RX_RUNT_ACCEPT|RX_EXTRA_DATA_ACCEPT) +-/* Default receive mode - individually addressed, broadcast, and error free */ +-#define DEF_RX_ACCEPT (RX_IA_ACCEPT | RX_BROADCAST_ACCEPT | RX_OK_ACCEPT) +- +-/* PP_TxCFG - Transmit Configuration Interrupt Mask bit definition - Read/write */ +-#define TX_LOST_CRS_ENBL 0x0040 +-#define TX_SQE_ERROR_ENBL 0x0080 +-#define TX_OK_ENBL 0x0100 +-#define TX_LATE_COL_ENBL 0x0200 +-#define TX_JBR_ENBL 0x0400 +-#define TX_ANY_COL_ENBL 0x0800 +-#define TX_16_COL_ENBL 0x8000 +- +-/* PP_TxCMD - Transmit Command bit definition - Read-only */ +-#define TX_START_4_BYTES 0x0000 +-#define TX_START_64_BYTES 0x0040 +-#define TX_START_128_BYTES 0x0080 +-#define TX_START_ALL_BYTES 0x00C0 +-#define TX_FORCE 0x0100 +-#define TX_ONE_COL 0x0200 +-#define TX_TWO_PART_DEFF_DISABLE 0x0400 +-#define TX_NO_CRC 0x1000 +-#define TX_RUNT 0x2000 +- +-/* PP_BufCFG - Buffer Configuration Interrupt Mask bit definition - Read/write */ +-#define GENERATE_SW_INTERRUPT 0x0040 +-#define RX_DMA_ENBL 0x0080 +-#define READY_FOR_TX_ENBL 0x0100 +-#define TX_UNDERRUN_ENBL 0x0200 +-#define RX_MISS_ENBL 0x0400 +-#define RX_128_BYTE_ENBL 0x0800 +-#define TX_COL_COUNT_OVRFLOW_ENBL 0x1000 +-#define RX_MISS_COUNT_OVRFLOW_ENBL 0x2000 +-#define RX_DEST_MATCH_ENBL 0x8000 +- +-/* PP_LineCTL - Line Control bit definition - Read/write */ +-#define SERIAL_RX_ON 0x0040 +-#define SERIAL_TX_ON 0x0080 +-#define AUI_ONLY 0x0100 +-#define AUTO_AUI_10BASET 0x0200 +-#define MODIFIED_BACKOFF 0x0800 +-#define NO_AUTO_POLARITY 0x1000 +-#define TWO_PART_DEFDIS 0x2000 +-#define LOW_RX_SQUELCH 0x4000 +- +-/* PP_SelfCTL - Software Self Control bit definition - Read/write */ +-#define POWER_ON_RESET 0x0040 +-#define SW_STOP 0x0100 +-#define SLEEP_ON 0x0200 +-#define AUTO_WAKEUP 0x0400 +-#define HCB0_ENBL 0x1000 +-#define HCB1_ENBL 0x2000 +-#define HCB0 0x4000 +-#define HCB1 0x8000 +- +-/* PP_BusCTL - ISA Bus Control bit definition - Read/write */ +-#define RESET_RX_DMA 0x0040 +-#define MEMORY_ON 0x0400 +-#define DMA_BURST_MODE 0x0800 +-#define IO_CHANNEL_READY_ON 0x1000 +-#define RX_DMA_SIZE_64K 0x2000 +-#define ENABLE_IRQ 0x8000 +- +-/* PP_TestCTL - Test Control bit definition - Read/write */ +-#define LINK_OFF 0x0080 +-#define ENDEC_LOOPBACK 0x0200 +-#define AUI_LOOPBACK 0x0400 +-#define BACKOFF_OFF 0x0800 +-#define FAST_TEST 0x8000 +- +-/* PP_RxEvent - Receive Event Bit definition - Read-only */ +-#define RX_IA_HASHED 0x0040 +-#define RX_DRIBBLE 0x0080 +-#define RX_OK 0x0100 +-#define RX_HASHED 0x0200 +-#define RX_IA 0x0400 +-#define RX_BROADCAST 0x0800 +-#define RX_CRC_ERROR 0x1000 +-#define RX_RUNT 0x2000 +-#define RX_EXTRA_DATA 0x4000 +- +-#define HASH_INDEX_MASK 0x0FC00 +- +-/* PP_TxEvent - Transmit Event Bit definition - Read-only */ +-#define TX_LOST_CRS 0x0040 +-#define TX_SQE_ERROR 0x0080 +-#define TX_OK 0x0100 +-#define TX_LATE_COL 0x0200 +-#define TX_JBR 0x0400 +-#define TX_16_COL 0x8000 +-#define TX_SEND_OK_BITS (TX_OK|TX_LOST_CRS) +-#define TX_COL_COUNT_MASK 0x7800 +- +-/* PP_BufEvent - Buffer Event Bit definition - Read-only */ +-#define SW_INTERRUPT 0x0040 +-#define RX_DMA 0x0080 +-#define READY_FOR_TX 0x0100 +-#define TX_UNDERRUN 0x0200 +-#define RX_MISS 0x0400 +-#define RX_128_BYTE 0x0800 +-#define TX_COL_OVRFLW 0x1000 +-#define RX_MISS_OVRFLW 0x2000 +-#define RX_DEST_MATCH 0x8000 +- +-/* PP_LineST - Ethernet Line Status bit definition - Read-only */ +-#define LINK_OK 0x0080 +-#define AUI_ON 0x0100 +-#define TENBASET_ON 0x0200 +-#define POLARITY_OK 0x1000 +-#define CRS_OK 0x4000 +- +-/* PP_SelfST - Chip Software Status bit definition */ +-#define ACTIVE_33V 0x0040 +-#define INIT_DONE 0x0080 +-#define SI_BUSY 0x0100 +-#define EEPROM_PRESENT 0x0200 +-#define EEPROM_OK 0x0400 +-#define EL_PRESENT 0x0800 +-#define EE_SIZE_64 0x1000 +- +-/* PP_BusST - ISA Bus Status bit definition */ +-#define TX_BID_ERROR 0x0080 +-#define READY_FOR_TX_NOW 0x0100 +- +-/* PP_AutoNegCTL - Auto Negotiation Control bit definition */ +-#define RE_NEG_NOW 0x0040 +-#define ALLOW_FDX 0x0080 +-#define AUTO_NEG_ENABLE 0x0100 +-#define NLP_ENABLE 0x0200 +-#define FORCE_FDX 0x8000 +-#define AUTO_NEG_BITS (FORCE_FDX|NLP_ENABLE|AUTO_NEG_ENABLE) +-#define AUTO_NEG_MASK (FORCE_FDX|NLP_ENABLE|AUTO_NEG_ENABLE|ALLOW_FDX|RE_NEG_NOW) +- +-/* PP_AutoNegST - Auto Negotiation Status bit definition */ +-#define AUTO_NEG_BUSY 0x0080 +-#define FLP_LINK 0x0100 +-#define FLP_LINK_GOOD 0x0800 +-#define LINK_FAULT 0x1000 +-#define HDX_ACTIVE 0x4000 +-#define FDX_ACTIVE 0x8000 +- +-/* The following block defines the ISQ event types */ +-#define ISQ_RECEIVER_EVENT 0x04 +-#define ISQ_TRANSMITTER_EVENT 0x08 +-#define ISQ_BUFFER_EVENT 0x0c +-#define ISQ_RX_MISS_EVENT 0x10 +-#define ISQ_TX_COL_EVENT 0x12 +- +-#define ISQ_EVENT_MASK 0x003F /* ISQ mask to find out type of event */ +-#define ISQ_HIST 16 /* small history buffer */ +-#define AUTOINCREMENT 0x8000 /* Bit mask to set bit-15 for autoincrement */ +- +-#define TXRXBUFSIZE 0x0600 +-#define RXDMABUFSIZE 0x8000 +-#define RXDMASIZE 0x4000 +-#define TXRX_LENGTH_MASK 0x07FF +- +-/* rx options bits */ +-#define RCV_WITH_RXON 1 /* Set SerRx ON */ +-#define RCV_COUNTS 2 /* Use Framecnt1 */ +-#define RCV_PONG 4 /* Pong respondent */ +-#define RCV_DONG 8 /* Dong operation */ +-#define RCV_POLLING 0x10 /* Poll RxEvent */ +-#define RCV_ISQ 0x20 /* Use ISQ, int */ +-#define RCV_AUTO_DMA 0x100 /* Set AutoRxDMAE */ +-#define RCV_DMA 0x200 /* Set RxDMA only */ +-#define RCV_DMA_ALL 0x400 /* Copy all DMA'ed */ +-#define RCV_FIXED_DATA 0x800 /* Every frame same */ +-#define RCV_IO 0x1000 /* Use ISA IO only */ +-#define RCV_MEMORY 0x2000 /* Use ISA Memory */ +- +-#define RAM_SIZE 0x1000 /* The card has 4k bytes or RAM */ +-#define PKT_START PP_TxFrame /* Start of packet RAM */ +- +-#define RX_FRAME_PORT 0x0000 +-#define TX_FRAME_PORT RX_FRAME_PORT +-#define TX_CMD_PORT 0x0004 +-#define TX_NOW 0x0000 /* Tx packet after 5 bytes copied */ +-#define TX_AFTER_381 0x0020 /* Tx packet after 381 bytes copied */ +-#define TX_AFTER_ALL 0x0060 /* Tx packet after all bytes copied */ +-#define TX_LEN_PORT 0x0006 +-#define ISQ_PORT 0x0008 +-#define ADD_PORT 0x000A +-#define DATA_PORT 0x000C +- +-#define EEPROM_WRITE_EN 0x00F0 +-#define EEPROM_WRITE_DIS 0x0000 +-#define EEPROM_WRITE_CMD 0x0100 +-#define EEPROM_READ_CMD 0x0200 +- +-/* Receive Header */ +-/* Description of header of each packet in receive area of memory */ +-#define RBUF_EVENT_LOW 0 /* Low byte of RxEvent - status of received frame */ +-#define RBUF_EVENT_HIGH 1 /* High byte of RxEvent - status of received frame */ +-#define RBUF_LEN_LOW 2 /* Length of received data - low byte */ +-#define RBUF_LEN_HI 3 /* Length of received data - high byte */ +-#define RBUF_HEAD_LEN 4 /* Length of this header */ +- +-#define CHIP_READ 0x1 /* Used to mark state of the repins code (chip or dma) */ +-#define DMA_READ 0x2 /* Used to mark state of the repins code (chip or dma) */ +- +-/* for bios scan */ +-/* */ +-#ifdef CSDEBUG +-/* use these values for debugging bios scan */ +-#define BIOS_START_SEG 0x00000 +-#define BIOS_OFFSET_INC 0x0010 +-#else +-#define BIOS_START_SEG 0x0c000 +-#define BIOS_OFFSET_INC 0x0200 +-#endif +- +-#define BIOS_LAST_OFFSET 0x0fc00 +- +-/* Byte offsets into the EEPROM configuration buffer */ +-#define ISA_CNF_OFFSET 0x6 +-#define TX_CTL_OFFSET (ISA_CNF_OFFSET + 8) /* 8900 eeprom */ +-#define AUTO_NEG_CNF_OFFSET (ISA_CNF_OFFSET + 8) /* 8920 eeprom */ +- +- /* the assumption here is that the bits in the eeprom are generally */ +- /* in the same position as those in the autonegctl register. */ +- /* Of course the IMM bit is not in that register so it must be */ +- /* masked out */ +-#define EE_FORCE_FDX 0x8000 +-#define EE_NLP_ENABLE 0x0200 +-#define EE_AUTO_NEG_ENABLE 0x0100 +-#define EE_ALLOW_FDX 0x0080 +-#define EE_AUTO_NEG_CNF_MASK (EE_FORCE_FDX|EE_NLP_ENABLE|EE_AUTO_NEG_ENABLE|EE_ALLOW_FDX) +- +-#define IMM_BIT 0x0040 /* ignore missing media */ +- +-#define ADAPTER_CNF_OFFSET (AUTO_NEG_CNF_OFFSET + 2) +-#define A_CNF_10B_T 0x0001 +-#define A_CNF_AUI 0x0002 +-#define A_CNF_10B_2 0x0004 +-#define A_CNF_MEDIA_TYPE 0x0060 +-#define A_CNF_MEDIA_AUTO 0x0000 +-#define A_CNF_MEDIA_10B_T 0x0020 +-#define A_CNF_MEDIA_AUI 0x0040 +-#define A_CNF_MEDIA_10B_2 0x0060 +-#define A_CNF_DC_DC_POLARITY 0x0080 +-#define A_CNF_NO_AUTO_POLARITY 0x2000 +-#define A_CNF_LOW_RX_SQUELCH 0x4000 +-#define A_CNF_EXTND_10B_2 0x8000 +- +-#define PACKET_PAGE_OFFSET 0x8 +- +-/* Bit definitions for the ISA configuration word from the EEPROM */ +-#define INT_NO_MASK 0x000F +-#define DMA_NO_MASK 0x0070 +-#define ISA_DMA_SIZE 0x0200 +-#define ISA_AUTO_RxDMA 0x0400 +-#define ISA_RxDMA 0x0800 +-#define DMA_BURST 0x1000 +-#define STREAM_TRANSFER 0x2000 +-#define ANY_ISA_DMA (ISA_AUTO_RxDMA | ISA_RxDMA) +- +-/* DMA controller registers */ +-#define DMA_BASE 0x00 /* DMA controller base */ +-#define DMA_BASE_2 0x0C0 /* DMA controller base */ +- +-#define DMA_STAT 0x0D0 /* DMA controller status register */ +-#define DMA_MASK 0x0D4 /* DMA controller mask register */ +-#define DMA_MODE 0x0D6 /* DMA controller mode register */ +-#define DMA_RESETFF 0x0D8 /* DMA controller first/last flip flop */ +- +-/* DMA data */ +-#define DMA_DISABLE 0x04 /* Disable channel n */ +-#define DMA_ENABLE 0x00 /* Enable channel n */ +-/* Demand transfers, incr. address, auto init, writes, ch. n */ +-#define DMA_RX_MODE 0x14 +-/* Demand transfers, incr. address, auto init, reads, ch. n */ +-#define DMA_TX_MODE 0x18 +- +-#define DMA_SIZE (16*1024) /* Size of dma buffer - 16k */ +- +-#define CS8900 0x0000 +-#define CS8920 0x4000 +-#define CS8920M 0x6000 +-#define REVISON_BITS 0x1F00 +-#define EEVER_NUMBER 0x12 +-#define CHKSUM_LEN 0x14 +-#define CHKSUM_VAL 0x0000 +-#define START_EEPROM_DATA 0x001c /* Offset into eeprom for start of data */ +-#define IRQ_MAP_EEPROM_DATA 0x0046 /* Offset into eeprom for the IRQ map */ +-#define IRQ_MAP_LEN 0x0004 /* No of bytes to read for the IRQ map */ +-#define PNP_IRQ_FRMT 0x0022 /* PNP small item IRQ format */ +-#define CS8900_IRQ_MAP 0x1c20 /* This IRQ map is fixed */ +- +-#define CS8920_NO_INTS 0x0F /* Max CS8920 interrupt select # */ +- +-#define PNP_ADD_PORT 0x0279 +-#define PNP_WRITE_PORT 0x0A79 +- +-#define GET_PNP_ISA_STRUCT 0x40 +-#define PNP_ISA_STRUCT_LEN 0x06 +-#define PNP_CSN_CNT_OFF 0x01 +-#define PNP_RD_PORT_OFF 0x02 +-#define PNP_FUNCTION_OK 0x00 +-#define PNP_WAKE 0x03 +-#define PNP_RSRC_DATA 0x04 +-#define PNP_RSRC_READY 0x01 +-#define PNP_STATUS 0x05 +-#define PNP_ACTIVATE 0x30 +-#define PNP_CNF_IO_H 0x60 +-#define PNP_CNF_IO_L 0x61 +-#define PNP_CNF_INT 0x70 +-#define PNP_CNF_DMA 0x74 +-#define PNP_CNF_MEM 0x48 +- +-#define BIT0 1 +-#define BIT15 0x8000 +- +-/* +- * Local variables: +- * c-basic-offset: 8 +- * End: +- */ +- +diff -Naur grub-0.97.orig/netboot/cs89x0.txt grub-0.97/netboot/cs89x0.txt +--- grub-0.97.orig/netboot/cs89x0.txt 2003-07-09 11:45:37.000000000 +0000 ++++ grub-0.97/netboot/cs89x0.txt 1970-01-01 00:00:00.000000000 +0000 +@@ -1,26 +0,0 @@ +-Permission is granted to distribute the enclosed cs89x0.[ch] driver +-only in conjunction with the Etherboot package. The code is +-ordinarily distributed under the GPL. +- +-Russ Nelson, January 2000 +- +-CREDITS +- +-I want to thank +- +- Mike Cruse +- for providing an evaluation NIC and for sponsoring the +- development of this driver. +- +- Randall Sears +- Deva Bodas +- Andreas Kraemer +- Wolfgang Krause <100303.2673@compuserve.com> +- for excellent technical support and for providing the required +- programming information. I appreciate Crystal Semiconductor's +- commitment towards free software. +- +- Russell Nelson +- for writing the Linux device driver for the CS89x0 +- chipset. Russel's code is very well designed and simplified my +- job a lot. +diff -Naur grub-0.97.orig/netboot/davicom.c grub-0.97/netboot/davicom.c +--- grub-0.97.orig/netboot/davicom.c 2003-07-09 11:45:37.000000000 +0000 ++++ grub-0.97/netboot/davicom.c 2005-08-31 19:03:35.000000000 +0000 +@@ -1,12 +1,12 @@ ++#ifdef ALLMULTI ++#error multicast support is not yet implemented ++#endif + /* + DAVICOM DM9009/DM9102/DM9102A Etherboot Driver V1.00 + +- This driver was ported from Marty Conner's Tulip Etherboot driver. +- Thanks Marty Connor (mdc@thinguin.org) +- You can get Tulip driver source file from this URL: ++ This driver was ported from Marty Connor's Tulip Etherboot driver. ++ Thanks Marty Connor (mdc@etherboot.org) + +- "http://etherboot.sourceforge..net/#Distribution" +- + This davicom etherboot driver supports DM9009/DM9102/DM9102A/ + DM9102A+DM9801/DM9102A+DM9802 NICs. + +@@ -36,7 +36,6 @@ + register(CR6) + */ + +- + /*********************************************************************/ + /* Declarations */ + /*********************************************************************/ +@@ -44,7 +43,6 @@ + #include "etherboot.h" + #include "nic.h" + #include "pci.h" +-#include "cards.h" + + #undef DAVICOM_DEBUG + #undef DAVICOM_DEBUG_WHERE +@@ -99,8 +97,10 @@ + #define eeprom_delay() inl(ee_addr) + + /* helpful macro if on a big_endian machine for changing byte order. +- not strictly needed on Intel */ ++ not strictly needed on Intel ++ Already defined in Etherboot includes + #define le16_to_cpu(val) (val) ++*/ + + /* transmit and receive descriptor format */ + struct txdesc { +@@ -138,20 +138,12 @@ + /* transmit descriptor and buffer */ + #define NTXD 2 + static struct txdesc txd[NTXD] __attribute__ ((aligned(4))); +-#ifdef USE_LOWMEM_BUFFER +-#define txb ((char *)0x10000 - BUFLEN) +-#else + static unsigned char txb[BUFLEN] __attribute__ ((aligned(4))); +-#endif + + /* receive descriptor(s) and buffer(s) */ + #define NRXD 4 + static struct rxdesc rxd[NRXD] __attribute__ ((aligned(4))); +-#ifdef USE_LOWMEM_BUFFER +-#define rxb ((char *)0x10000 - NRXD * BUFLEN - BUFLEN) +-#else + static unsigned char rxb[NRXD * BUFLEN] __attribute__ ((aligned(4))); +-#endif + static int rxd_tail; + static int TxPtr; + +@@ -161,15 +153,13 @@ + /*********************************************************************/ + static void whereami(const char *str); + static int read_eeprom(unsigned long ioaddr, int location, int addr_len); +-struct nic *davicom_probe(struct nic *nic, unsigned short *io_addrs, +- struct pci_device *pci); ++static int davicom_probe(struct dev *dev, struct pci_device *pci); + static void davicom_init_chain(struct nic *nic); /* Sten 10/9 */ + static void davicom_reset(struct nic *nic); + static void davicom_transmit(struct nic *nic, const char *d, unsigned int t, + unsigned int s, const char *p); +-static int davicom_poll(struct nic *nic); +-static void davicom_disable(struct nic *nic); +-static void whereami (const char *str); ++static int davicom_poll(struct nic *nic, int retrieve); ++static void davicom_disable(struct dev *dev); + #ifdef DAVICOM_DEBUG + static void davicom_more(void); + #endif /* DAVICOM_DEBUG */ +@@ -184,13 +174,10 @@ + /*********************************************************************/ + /* Utility Routines */ + /*********************************************************************/ +- +-static inline void whereami (const char *str) ++static inline void whereami(const char *str) + { +-#ifdef DAVICOM_DEBUG_WHERE + printf("%s\n", str); + /* sleep(2); */ +-#endif + } + + #ifdef DAVICOM_DEBUG +@@ -360,7 +347,7 @@ + /* + Sense media mode and set CR6 + */ +-static void davicom_media_chk(struct nic * nic) ++static void davicom_media_chk(struct nic * nic __unused) + { + unsigned long to, csr6; + +@@ -446,8 +433,8 @@ + /* Sten: Set 2 TX descriptor but use one TX buffer because + it transmit a packet and wait complete every time. */ + for (i=0; ipacketlen = (rxd[rxd_tail].status & 0x3FFF0000) >> 16; +@@ -627,10 +615,13 @@ + /*********************************************************************/ + /* eth_disable - Disable the interface */ + /*********************************************************************/ +-static void davicom_disable(struct nic *nic) ++static void davicom_disable(struct dev *dev) + { ++ struct nic *nic = (struct nic *)dev; + whereami("davicom_disable\n"); + ++ davicom_reset(nic); ++ + /* disable interrupts */ + outl(0x00000000, ioaddr + CSR7); + +@@ -640,24 +631,43 @@ + /* Clear the missed-packet counter. */ + (volatile unsigned long)inl(ioaddr + CSR8); + } ++ ++ ++/*********************************************************************/ ++/* eth_irq - enable, disable and force interrupts */ ++/*********************************************************************/ ++static void davicom_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } ++} ++ + + /*********************************************************************/ + /* eth_probe - Look for an adapter */ + /*********************************************************************/ +-struct nic *davicom_probe(struct nic *nic, unsigned short *io_addrs, +- struct pci_device *pci) ++static int davicom_probe(struct dev *dev, struct pci_device *pci) + { ++ struct nic *nic = (struct nic *)dev; + unsigned int i; +- u32 l1, l2; + + whereami("davicom_probe\n"); + +- if (io_addrs == 0 || *io_addrs == 0) ++ if (pci->ioaddr == 0) + return 0; + + vendor = pci->vendor; + dev_id = pci->dev_id; +- ioaddr = *io_addrs; ++ ioaddr = pci->ioaddr & ~3; ++ ++ nic->irqno = 0; ++ nic->ioaddr = pci->ioaddr & ~3; + + /* wakeup chip */ + pcibios_write_config_dword(pci->bus, pci->devfn, 0x40, 0x00000000); +@@ -683,10 +693,26 @@ + /* initialize device */ + davicom_reset(nic); + +- nic->reset = davicom_reset; ++ dev->disable = davicom_disable; + nic->poll = davicom_poll; + nic->transmit = davicom_transmit; +- nic->disable = davicom_disable; ++ nic->irq = davicom_irq; + +- return nic; ++ return 1; + } ++ ++static struct pci_id davicom_nics[] = { ++PCI_ROM(0x1282, 0x9100, "davicom9100", "Davicom 9100"), ++PCI_ROM(0x1282, 0x9102, "davicom9102", "Davicom 9102"), ++PCI_ROM(0x1282, 0x9009, "davicom9009", "Davicom 9009"), ++PCI_ROM(0x1282, 0x9132, "davicom9132", "Davicom 9132"), /* Needs probably some fixing */ ++}; ++ ++struct pci_driver davicom_driver = { ++ .type = NIC_DRIVER, ++ .name = "DAVICOM", ++ .probe = davicom_probe, ++ .ids = davicom_nics, ++ .id_count = sizeof(davicom_nics)/sizeof(davicom_nics[0]), ++ .class = 0, ++}; +diff -Naur grub-0.97.orig/netboot/depca.c grub-0.97/netboot/depca.c +--- grub-0.97.orig/netboot/depca.c 2003-07-09 11:45:37.000000000 +0000 ++++ grub-0.97/netboot/depca.c 1970-01-01 00:00:00.000000000 +0000 +@@ -1,752 +0,0 @@ +-/* Etherboot: depca.h merged, comments from Linux driver retained */ +-/* depca.c: A DIGITAL DEPCA & EtherWORKS ethernet driver for linux. +- +- Written 1994, 1995 by David C. Davies. +- +- +- Copyright 1994 David C. Davies +- and +- United States Government +- (as represented by the Director, National Security Agency). +- +- Copyright 1995 Digital Equipment Corporation. +- +- +- This software may be used and distributed according to the terms of +- the GNU Public License, incorporated herein by reference. +- +- This driver is written for the Digital Equipment Corporation series +- of DEPCA and EtherWORKS ethernet cards: +- +- DEPCA (the original) +- DE100 +- DE101 +- DE200 Turbo +- DE201 Turbo +- DE202 Turbo (TP BNC) +- DE210 +- DE422 (EISA) +- +- The driver has been tested on DE100, DE200 and DE202 cards in a +- relatively busy network. The DE422 has been tested a little. +- +- This driver will NOT work for the DE203, DE204 and DE205 series of +- cards, since they have a new custom ASIC in place of the AMD LANCE +- chip. See the 'ewrk3.c' driver in the Linux source tree for running +- those cards. +- +- I have benchmarked the driver with a DE100 at 595kB/s to (542kB/s from) +- a DECstation 5000/200. +- +- The author may be reached at davies@maniac.ultranet.com +- +- ========================================================================= +- +- The driver was originally based on the 'lance.c' driver from Donald +- Becker which is included with the standard driver distribution for +- linux. V0.4 is a complete re-write with only the kernel interface +- remaining from the original code. +- +- 1) Lance.c code in /linux/drivers/net/ +- 2) "Ethernet/IEEE 802.3 Family. 1992 World Network Data Book/Handbook", +- AMD, 1992 [(800) 222-9323]. +- 3) "Am79C90 CMOS Local Area Network Controller for Ethernet (C-LANCE)", +- AMD, Pub. #17881, May 1993. +- 4) "Am79C960 PCnet-ISA(tm), Single-Chip Ethernet Controller for ISA", +- AMD, Pub. #16907, May 1992 +- 5) "DEC EtherWORKS LC Ethernet Controller Owners Manual", +- Digital Equipment corporation, 1990, Pub. #EK-DE100-OM.003 +- 6) "DEC EtherWORKS Turbo Ethernet Controller Owners Manual", +- Digital Equipment corporation, 1990, Pub. #EK-DE200-OM.003 +- 7) "DEPCA Hardware Reference Manual", Pub. #EK-DEPCA-PR +- Digital Equipment Corporation, 1989 +- 8) "DEC EtherWORKS Turbo_(TP BNC) Ethernet Controller Owners Manual", +- Digital Equipment corporation, 1991, Pub. #EK-DE202-OM.001 +- +- +- Peter Bauer's depca.c (V0.5) was referred to when debugging V0.1 of this +- driver. +- +- The original DEPCA card requires that the ethernet ROM address counter +- be enabled to count and has an 8 bit NICSR. The ROM counter enabling is +- only done when a 0x08 is read as the first address octet (to minimise +- the chances of writing over some other hardware's I/O register). The +- NICSR accesses have been changed to byte accesses for all the cards +- supported by this driver, since there is only one useful bit in the MSB +- (remote boot timeout) and it is not used. Also, there is a maximum of +- only 48kB network RAM for this card. My thanks to Torbjorn Lindh for +- help debugging all this (and holding my feet to the fire until I got it +- right). +- +- The DE200 series boards have on-board 64kB RAM for use as a shared +- memory network buffer. Only the DE100 cards make use of a 2kB buffer +- mode which has not been implemented in this driver (only the 32kB and +- 64kB modes are supported [16kB/48kB for the original DEPCA]). +- +- At the most only 2 DEPCA cards can be supported on the ISA bus because +- there is only provision for two I/O base addresses on each card (0x300 +- and 0x200). The I/O address is detected by searching for a byte sequence +- in the Ethernet station address PROM at the expected I/O address for the +- Ethernet PROM. The shared memory base address is 'autoprobed' by +- looking for the self test PROM and detecting the card name. When a +- second DEPCA is detected, information is placed in the base_addr +- variable of the next device structure (which is created if necessary), +- thus enabling ethif_probe initialization for the device. More than 2 +- EISA cards can be supported, but care will be needed assigning the +- shared memory to ensure that each slot has the correct IRQ, I/O address +- and shared memory address assigned. +- +- ************************************************************************ +- +- NOTE: If you are using two ISA DEPCAs, it is important that you assign +- the base memory addresses correctly. The driver autoprobes I/O 0x300 +- then 0x200. The base memory address for the first device must be less +- than that of the second so that the auto probe will correctly assign the +- I/O and memory addresses on the same card. I can't think of a way to do +- this unambiguously at the moment, since there is nothing on the cards to +- tie I/O and memory information together. +- +- I am unable to test 2 cards together for now, so this code is +- unchecked. All reports, good or bad, are welcome. +- +- ************************************************************************ +- +- The board IRQ setting must be at an unused IRQ which is auto-probed +- using Donald Becker's autoprobe routines. DEPCA and DE100 board IRQs are +- {2,3,4,5,7}, whereas the DE200 is at {5,9,10,11,15}. Note that IRQ2 is +- really IRQ9 in machines with 16 IRQ lines. +- +- No 16MB memory limitation should exist with this driver as DMA is not +- used and the common memory area is in low memory on the network card (my +- current system has 20MB and I've not had problems yet). +- +- The ability to load this driver as a loadable module has been added. To +- utilise this ability, you have to do <8 things: +- +- 0) have a copy of the loadable modules code installed on your system. +- 1) copy depca.c from the /linux/drivers/net directory to your favourite +- temporary directory. +- 2) if you wish, edit the source code near line 1530 to reflect the I/O +- address and IRQ you're using (see also 5). +- 3) compile depca.c, but include -DMODULE in the command line to ensure +- that the correct bits are compiled (see end of source code). +- 4) if you are wanting to add a new card, goto 5. Otherwise, recompile a +- kernel with the depca configuration turned off and reboot. +- 5) insmod depca.o [irq=7] [io=0x200] [mem=0xd0000] [adapter_name=DE100] +- [Alan Cox: Changed the code to allow command line irq/io assignments] +- [Dave Davies: Changed the code to allow command line mem/name +- assignments] +- 6) run the net startup bits for your eth?? interface manually +- (usually /etc/rc.inet[12] at boot time). +- 7) enjoy! +- +- Note that autoprobing is not allowed in loadable modules - the system is +- already up and running and you're messing with interrupts. +- +- To unload a module, turn off the associated interface +- 'ifconfig eth?? down' then 'rmmod depca'. +- +- To assign a base memory address for the shared memory when running as a +- loadable module, see 5 above. To include the adapter name (if you have +- no PROM but know the card name) also see 5 above. Note that this last +- option will not work with kernel built-in depca's. +- +- The shared memory assignment for a loadable module makes sense to avoid +- the 'memory autoprobe' picking the wrong shared memory (for the case of +- 2 depca's in a PC). +- +- ************************************************************************ +- Support for MCA EtherWORKS cards added 11-3-98. +- Verified to work with up to 2 DE212 cards in a system (although not +- fully stress-tested). +- +- Currently known bugs/limitations: +- +- Note: with the MCA stuff as a module, it trusts the MCA configuration, +- not the command line for IRQ and memory address. You can +- specify them if you want, but it will throw your values out. +- You still have to pass the IO address it was configured as +- though. +- +- ************************************************************************ +- TO DO: +- ------ +- +- +- Revision History +- ---------------- +- +- Version Date Description +- +- 0.1 25-jan-94 Initial writing. +- 0.2 27-jan-94 Added LANCE TX hardware buffer chaining. +- 0.3 1-feb-94 Added multiple DEPCA support. +- 0.31 4-feb-94 Added DE202 recognition. +- 0.32 19-feb-94 Tidy up. Improve multi-DEPCA support. +- 0.33 25-feb-94 Fix DEPCA ethernet ROM counter enable. +- Add jabber packet fix from murf@perftech.com +- and becker@super.org +- 0.34 7-mar-94 Fix DEPCA max network memory RAM & NICSR access. +- 0.35 8-mar-94 Added DE201 recognition. Tidied up. +- 0.351 30-apr-94 Added EISA support. Added DE422 recognition. +- 0.36 16-may-94 DE422 fix released. +- 0.37 22-jul-94 Added MODULE support +- 0.38 15-aug-94 Added DBR ROM switch in depca_close(). +- Multi DEPCA bug fix. +- 0.38axp 15-sep-94 Special version for Alpha AXP Linux V1.0. +- 0.381 12-dec-94 Added DE101 recognition, fix multicast bug. +- 0.382 9-feb-95 Fix recognition bug reported by . +- 0.383 22-feb-95 Fix for conflict with VESA SCSI reported by +- +- 0.384 17-mar-95 Fix a ring full bug reported by +- 0.385 3-apr-95 Fix a recognition bug reported by +- +- 0.386 21-apr-95 Fix the last fix...sorry, must be galloping senility +- 0.40 25-May-95 Rewrite for portability & updated. +- ALPHA support from +- 0.41 26-Jun-95 Added verify_area() calls in depca_ioctl() from +- suggestion by +- 0.42 27-Dec-95 Add 'mem' shared memory assignment for loadable +- modules. +- Add 'adapter_name' for loadable modules when no PROM. +- Both above from a suggestion by +- . +- Add new multicasting code. +- 0.421 22-Apr-96 Fix alloc_device() bug +- 0.422 29-Apr-96 Fix depca_hw_init() bug +- 0.423 7-Jun-96 Fix module load bug +- 0.43 16-Aug-96 Update alloc_device() to conform to de4x5.c +- 0.44 1-Sep-97 Fix *_probe() to test check_region() first - bug +- reported by +- 0.45 3-Nov-98 Added support for MCA EtherWORKS (DE210/DE212) cards +- by +- 0.451 5-Nov-98 Fixed mca stuff cuz I'm a dummy. +- 0.5 14-Nov-98 Re-spin for 2.1.x kernels. +- 0.51 27-Jun-99 Correct received packet length for CRC from +- report by +- +- ========================================================================= +-*/ +- +-#include "etherboot.h" +-#include "nic.h" +-#include "cards.h" +- +-/* +-** I/O addresses. Note that the 2k buffer option is not supported in +-** this driver. +-*/ +-#define DEPCA_NICSR ioaddr+0x00 /* Network interface CSR */ +-#define DEPCA_RBI ioaddr+0x02 /* RAM buffer index (2k buffer mode) */ +-#define DEPCA_DATA ioaddr+0x04 /* LANCE registers' data port */ +-#define DEPCA_ADDR ioaddr+0x06 /* LANCE registers' address port */ +-#define DEPCA_HBASE ioaddr+0x08 /* EISA high memory base address reg. */ +-#define DEPCA_PROM ioaddr+0x0c /* Ethernet address ROM data port */ +-#define DEPCA_CNFG ioaddr+0x0c /* EISA Configuration port */ +-#define DEPCA_RBSA ioaddr+0x0e /* RAM buffer starting address (2k buff.) */ +- +-/* +-** These are LANCE registers addressable through DEPCA_ADDR +-*/ +-#define CSR0 0 +-#define CSR1 1 +-#define CSR2 2 +-#define CSR3 3 +- +-/* +-** NETWORK INTERFACE CSR (NI_CSR) bit definitions +-*/ +- +-#define TO 0x0100 /* Time Out for remote boot */ +-#define SHE 0x0080 /* SHadow memory Enable */ +-#define BS 0x0040 /* Bank Select */ +-#define BUF 0x0020 /* BUFfer size (1->32k, 0->64k) */ +-#define RBE 0x0010 /* Remote Boot Enable (1->net boot) */ +-#define AAC 0x0008 /* Address ROM Address Counter (1->enable) */ +-#define _128KB 0x0008 /* 128kB Network RAM (1->enable) */ +-#define IM 0x0004 /* Interrupt Mask (1->mask) */ +-#define IEN 0x0002 /* Interrupt tristate ENable (1->enable) */ +-#define LED 0x0001 /* LED control */ +- +-/* +-** Control and Status Register 0 (CSR0) bit definitions +-*/ +- +-#define ERR 0x8000 /* Error summary */ +-#define BABL 0x4000 /* Babble transmitter timeout error */ +-#define CERR 0x2000 /* Collision Error */ +-#define MISS 0x1000 /* Missed packet */ +-#define MERR 0x0800 /* Memory Error */ +-#define RINT 0x0400 /* Receiver Interrupt */ +-#define TINT 0x0200 /* Transmit Interrupt */ +-#define IDON 0x0100 /* Initialization Done */ +-#define INTR 0x0080 /* Interrupt Flag */ +-#define INEA 0x0040 /* Interrupt Enable */ +-#define RXON 0x0020 /* Receiver on */ +-#define TXON 0x0010 /* Transmitter on */ +-#define TDMD 0x0008 /* Transmit Demand */ +-#define STOP 0x0004 /* Stop */ +-#define STRT 0x0002 /* Start */ +-#define INIT 0x0001 /* Initialize */ +-#define INTM 0xff00 /* Interrupt Mask */ +-#define INTE 0xfff0 /* Interrupt Enable */ +- +-/* +-** CONTROL AND STATUS REGISTER 3 (CSR3) +-*/ +- +-#define BSWP 0x0004 /* Byte SWaP */ +-#define ACON 0x0002 /* ALE control */ +-#define BCON 0x0001 /* Byte CONtrol */ +- +-/* +-** Initialization Block Mode Register +-*/ +- +-#define PROM 0x8000 /* Promiscuous Mode */ +-#define EMBA 0x0080 /* Enable Modified Back-off Algorithm */ +-#define INTL 0x0040 /* Internal Loopback */ +-#define DRTY 0x0020 /* Disable Retry */ +-#define COLL 0x0010 /* Force Collision */ +-#define DTCR 0x0008 /* Disable Transmit CRC */ +-#define LOOP 0x0004 /* Loopback */ +-#define DTX 0x0002 /* Disable the Transmitter */ +-#define DRX 0x0001 /* Disable the Receiver */ +- +-/* +-** Receive Message Descriptor 1 (RMD1) bit definitions. +-*/ +- +-#define R_OWN 0x80000000 /* Owner bit 0 = host, 1 = lance */ +-#define R_ERR 0x4000 /* Error Summary */ +-#define R_FRAM 0x2000 /* Framing Error */ +-#define R_OFLO 0x1000 /* Overflow Error */ +-#define R_CRC 0x0800 /* CRC Error */ +-#define R_BUFF 0x0400 /* Buffer Error */ +-#define R_STP 0x0200 /* Start of Packet */ +-#define R_ENP 0x0100 /* End of Packet */ +- +-/* +-** Transmit Message Descriptor 1 (TMD1) bit definitions. +-*/ +- +-#define T_OWN 0x80000000 /* Owner bit 0 = host, 1 = lance */ +-#define T_ERR 0x4000 /* Error Summary */ +-#define T_ADD_FCS 0x2000 /* More the 1 retry needed to Xmit */ +-#define T_MORE 0x1000 /* >1 retry to transmit packet */ +-#define T_ONE 0x0800 /* 1 try needed to transmit the packet */ +-#define T_DEF 0x0400 /* Deferred */ +-#define T_STP 0x02000000 /* Start of Packet */ +-#define T_ENP 0x01000000 /* End of Packet */ +-#define T_FLAGS 0xff000000 /* TX Flags Field */ +- +-/* +-** Transmit Message Descriptor 3 (TMD3) bit definitions. +-*/ +- +-#define TMD3_BUFF 0x8000 /* BUFFer error */ +-#define TMD3_UFLO 0x4000 /* UnderFLOw error */ +-#define TMD3_RES 0x2000 /* REServed */ +-#define TMD3_LCOL 0x1000 /* Late COLlision */ +-#define TMD3_LCAR 0x0800 /* Loss of CARrier */ +-#define TMD3_RTRY 0x0400 /* ReTRY error */ +- +-/* +-** Ethernet PROM defines +-*/ +-#define PROBE_LENGTH 32 +- +-/* +-** Set the number of Tx and Rx buffers. Ensure that the memory requested +-** here is <= to the amount of shared memory set up by the board switches. +-** The number of descriptors MUST BE A POWER OF 2. +-** +-** total_memory = NUM_RX_DESC*(8+RX_BUFF_SZ) + NUM_TX_DESC*(8+TX_BUFF_SZ) +-*/ +-#define NUM_RX_DESC 2 /* Number of RX descriptors */ +-#define NUM_TX_DESC 2 /* Number of TX descriptors */ +-#define RX_BUFF_SZ 1536 /* Buffer size for each Rx buffer */ +-#define TX_BUFF_SZ 1536 /* Buffer size for each Tx buffer */ +- +-/* +-** ISA Bus defines +-*/ +-#define DEPCA_IO_PORTS {0x300, 0x200, 0} +- +-#ifndef DEPCA_MODEL +-#define DEPCA_MODEL DEPCA +-#endif +- +-static enum { +- DEPCA, DE100, DE101, DE200, DE201, DE202, DE210, DE212, DE422, unknown +-} adapter = DEPCA_MODEL; +- +-/* +-** Name <-> Adapter mapping +-*/ +- +-static char *adapter_name[] = { +- "DEPCA", +- "DE100","DE101", +- "DE200","DE201","DE202", +- "DE210","DE212", +- "DE422", +- "" +-}; +- +-#ifndef DEPCA_RAM_BASE +-#define DEPCA_RAM_BASE 0xd0000 +-#endif +- +-/* +-** Memory Alignment. Each descriptor is 4 longwords long. To force a +-** particular alignment on the TX descriptor, adjust DESC_SKIP_LEN and +-** DESC_ALIGN. ALIGN aligns the start address of the private memory area +-** and hence the RX descriptor ring's first entry. +-*/ +-#define ALIGN4 ((u32)4 - 1) /* 1 longword align */ +-#define ALIGN8 ((u32)8 - 1) /* 2 longword (quadword) align */ +-#define ALIGN ALIGN8 /* Keep the LANCE happy... */ +- +-typedef long s32; +-typedef unsigned long u32; +-typedef short s16; +-typedef unsigned short u16; +-typedef char s8; +-typedef unsigned char u8; +- +-/* +-** The DEPCA Rx and Tx ring descriptors. +-*/ +-struct depca_rx_desc { +- volatile s32 base; +- s16 buf_length; /* This length is negative 2's complement! */ +- s16 msg_length; /* This length is "normal". */ +-}; +- +-struct depca_tx_desc { +- volatile s32 base; +- s16 length; /* This length is negative 2's complement! */ +- s16 misc; /* Errors and TDR info */ +-}; +- +-#define LA_MASK 0x0000ffff /* LANCE address mask for mapping network RAM +- to LANCE memory address space */ +- +-/* +-** The Lance initialization block, described in databook, in common memory. +-*/ +-struct depca_init { +- u16 mode; /* Mode register */ +- u8 phys_addr[ETH_ALEN]; /* Physical ethernet address */ +- u8 mcast_table[8]; /* Multicast Hash Table. */ +- u32 rx_ring; /* Rx ring base pointer & ring length */ +- u32 tx_ring; /* Tx ring base pointer & ring length */ +-}; +- +-struct depca_private { +- struct depca_rx_desc *rx_ring; +- struct depca_tx_desc *tx_ring; +- struct depca_init init_block; /* Shadow init block */ +- char *rx_memcpy[NUM_RX_DESC]; +- char *tx_memcpy[NUM_TX_DESC]; +- u32 bus_offset; /* ISA bus address offset */ +- u32 sh_mem; /* address of shared mem */ +- u32 dma_buffs; /* Rx & Tx buffer start */ +- int rx_cur, tx_cur; /* Next free ring entry */ +- int txRingMask, rxRingMask; +- s32 rx_rlen, tx_rlen; +- /* log2([rt]xRingMask+1) for the descriptors */ +-}; +- +-static Address mem_start = DEPCA_RAM_BASE; +-static Address mem_len, offset; +-static unsigned short ioaddr = 0; +-static struct depca_private lp; +- +-/* +-** Miscellaneous defines... +-*/ +-#define STOP_DEPCA \ +- outw(CSR0, DEPCA_ADDR);\ +- outw(STOP, DEPCA_DATA) +- +-/* Initialize the lance Rx and Tx descriptor rings. */ +-static void depca_init_ring(struct nic *nic) +-{ +- int i; +- u32 p; +- +- lp.rx_cur = lp.tx_cur = 0; +- /* Initialize the base addresses and length of each buffer in the ring */ +- for (i = 0; i <= lp.rxRingMask; i++) { +- writel((p = lp.dma_buffs + i * RX_BUFF_SZ) | R_OWN, &lp.rx_ring[i].base); +- writew(-RX_BUFF_SZ, &lp.rx_ring[i].buf_length); +- lp.rx_memcpy[i] = (char *) (p + lp.bus_offset); +- } +- for (i = 0; i <= lp.txRingMask; i++) { +- writel((p = lp.dma_buffs + (i + lp.txRingMask + 1) * TX_BUFF_SZ) & 0x00ffffff, &lp.tx_ring[i].base); +- lp.tx_memcpy[i] = (char *) (p + lp.bus_offset); +- } +- +- /* Set up the initialization block */ +- lp.init_block.rx_ring = ((u32) ((u32) lp.rx_ring) & LA_MASK) | lp.rx_rlen; +- lp.init_block.tx_ring = ((u32) ((u32) lp.tx_ring) & LA_MASK) | lp.tx_rlen; +- for (i = 0; i < ETH_ALEN; i++) +- lp.init_block.phys_addr[i] = nic->node_addr[i]; +- lp.init_block.mode = 0x0000; /* Enable the Tx and Rx */ +- memset(lp.init_block.mcast_table, 0, sizeof(lp.init_block.mcast_table)); +-} +- +-static void LoadCSRs(void) +-{ +- outw(CSR1, DEPCA_ADDR); /* initialisation block address LSW */ +- outw((u16) (lp.sh_mem & LA_MASK), DEPCA_DATA); +- outw(CSR2, DEPCA_ADDR); /* initialisation block address MSW */ +- outw((u16) ((lp.sh_mem & LA_MASK) >> 16), DEPCA_DATA); +- outw(CSR3, DEPCA_ADDR); /* ALE control */ +- outw(ACON, DEPCA_DATA); +- outw(CSR0, DEPCA_ADDR); /* Point back to CSR0 */ +-} +- +-static int InitRestartDepca(void) +-{ +- int i; +- +- /* Copy the shadow init_block to shared memory */ +- memcpy_toio((char *)lp.sh_mem, &lp.init_block, sizeof(struct depca_init)); +- outw(CSR0, DEPCA_ADDR); /* point back to CSR0 */ +- outw(INIT, DEPCA_DATA); /* initialise DEPCA */ +- +- for (i = 0; i < 100 && !(inw(DEPCA_DATA) & IDON); i++) +- ; +- if (i < 100) { +- /* clear IDON by writing a 1, and start LANCE */ +- outw(IDON | STRT, DEPCA_DATA); +- } else { +- printf("DEPCA not initialised\n"); +- return (1); +- } +- return (0); +-} +- +-/************************************************************************** +-RESET - Reset adapter +-***************************************************************************/ +-static void depca_reset(struct nic *nic) +-{ +- s16 nicsr; +- int i, j; +- +- STOP_DEPCA; +- nicsr = inb(DEPCA_NICSR); +- nicsr = ((nicsr & ~SHE & ~RBE & ~IEN) | IM); +- outb(nicsr, DEPCA_NICSR); +- if (inw(DEPCA_DATA) != STOP) +- { +- printf("depca: Cannot stop NIC\n"); +- return; +- } +- +- /* Initialisation block */ +- lp.sh_mem = mem_start; +- mem_start += sizeof(struct depca_init); +- /* Tx & Rx descriptors (aligned to a quadword boundary) */ +- mem_start = (mem_start + ALIGN) & ~ALIGN; +- lp.rx_ring = (struct depca_rx_desc *) mem_start; +- mem_start += (sizeof(struct depca_rx_desc) * NUM_RX_DESC); +- lp.tx_ring = (struct depca_tx_desc *) mem_start; +- mem_start += (sizeof(struct depca_tx_desc) * NUM_TX_DESC); +- +- lp.bus_offset = mem_start & 0x00ff0000; +- /* LANCE re-mapped start address */ +- lp.dma_buffs = mem_start & LA_MASK; +- +- /* Finish initialising the ring information. */ +- lp.rxRingMask = NUM_RX_DESC - 1; +- lp.txRingMask = NUM_TX_DESC - 1; +- +- /* Calculate Tx/Rx RLEN size for the descriptors. */ +- for (i = 0, j = lp.rxRingMask; j > 0; i++) { +- j >>= 1; +- } +- lp.rx_rlen = (s32) (i << 29); +- for (i = 0, j = lp.txRingMask; j > 0; i++) { +- j >>= 1; +- } +- lp.tx_rlen = (s32) (i << 29); +- +- /* Load the initialisation block */ +- depca_init_ring(nic); +- LoadCSRs(); +- InitRestartDepca(); +-} +- +-/************************************************************************** +-POLL - Wait for a frame +-***************************************************************************/ +-static int depca_poll(struct nic *nic) +-{ +- int entry; +- u32 status; +- +- entry = lp.rx_cur; +- if ((status = readl(&lp.rx_ring[entry].base) & R_OWN)) +- return (0); +- memcpy(nic->packet, lp.rx_memcpy[entry], nic->packetlen = lp.rx_ring[entry].msg_length); +- lp.rx_ring[entry].base |= R_OWN; +- lp.rx_cur = (++lp.rx_cur) & lp.rxRingMask; +- return (1); +-} +- +-/************************************************************************** +-TRANSMIT - Transmit a frame +-***************************************************************************/ +-static void depca_transmit( +- struct nic *nic, +- const char *d, /* Destination */ +- unsigned int t, /* Type */ +- unsigned int s, /* size */ +- const char *p) /* Packet */ +-{ +- int entry, len; +- char *mem; +- +- /* send the packet to destination */ +- /* +- ** Caution: the right order is important here... dont +- ** setup the ownership rights until all the other +- ** information is in place +- */ +- mem = lp.tx_memcpy[entry = lp.tx_cur]; +- memcpy_toio(mem, d, ETH_ALEN); +- memcpy_toio(mem + ETH_ALEN, nic->node_addr, ETH_ALEN); +- mem[ETH_ALEN * 2] = t >> 8; +- mem[ETH_ALEN * 2 + 1] = t; +- memcpy_toio(mem + ETH_HLEN, p, s); +- s += ETH_HLEN; +- len = (s < ETH_ZLEN ? ETH_ZLEN : s); +- /* clean out flags */ +- writel(readl(&lp.tx_ring[entry].base) & ~T_FLAGS, &lp.tx_ring[entry].base); +- /* clears other error flags */ +- writew(0x0000, &lp.tx_ring[entry].misc); +- /* packet length in buffer */ +- writew(-len, &lp.tx_ring[entry].length); +- /* start and end of packet, ownership */ +- writel(readl(&lp.tx_ring[entry].base) | (T_STP|T_ENP|T_OWN), &lp.tx_ring[entry].base); +- /* update current pointers */ +- lp.tx_cur = (++lp.tx_cur) & lp.txRingMask; +-} +- +-/************************************************************************** +-DISABLE - Turn off ethernet interface +-***************************************************************************/ +-static void depca_disable(struct nic *nic) +-{ +- STOP_DEPCA; +-} +- +-/* +-** Look for a special sequence in the Ethernet station address PROM that +-** is common across all DEPCA products. Note that the original DEPCA needs +-** its ROM address counter to be initialized and enabled. Only enable +-** if the first address octet is a 0x08 - this minimises the chances of +-** messing around with some other hardware, but it assumes that this DEPCA +-** card initialized itself correctly. +-** +-** Search the Ethernet address ROM for the signature. Since the ROM address +-** counter can start at an arbitrary point, the search must include the entire +-** probe sequence length plus the (length_of_the_signature - 1). +-** Stop the search IMMEDIATELY after the signature is found so that the +-** PROM address counter is correctly positioned at the start of the +-** ethernet address for later read out. +-*/ +-static int depca_probe1(struct nic *nic) +-{ +- u8 data, nicsr; +- /* This is only correct for little endian machines, but then +- Etherboot doesn't work on anything but a PC */ +- u8 sig[] = { 0xFF, 0x00, 0x55, 0xAA, 0xFF, 0x00, 0x55, 0xAA }; +- int i, j; +- long sum, chksum; +- +- data = inb(DEPCA_PROM); /* clear counter on DEPCA */ +- data = inb(DEPCA_PROM); /* read data */ +- if (data == 0x8) { +- nicsr = inb(DEPCA_NICSR); +- nicsr |= AAC; +- outb(nicsr, DEPCA_NICSR); +- } +- for (i = 0, j = 0; j < (int)sizeof(sig) && i < PROBE_LENGTH+((int)sizeof(sig))-1; ++i) { +- data = inb(DEPCA_PROM); +- if (data == sig[j]) /* track signature */ +- ++j; +- else +- j = (data == sig[0]) ? 1 : 0; +- } +- if (j != sizeof(sig)) +- return (0); +- /* put the card in its initial state */ +- STOP_DEPCA; +- nicsr = ((inb(DEPCA_NICSR) & ~SHE & ~RBE & ~IEN) | IM); +- outb(nicsr, DEPCA_NICSR); +- if (inw(DEPCA_DATA) != STOP) +- return (0); +- memcpy((char *)mem_start, sig, sizeof(sig)); +- if (memcmp((char *)mem_start, sig, sizeof(sig)) != 0) +- return (0); +- for (i = 0, j = 0, sum = 0; j < 3; j++) { +- sum <<= 1; +- if (sum > 0xFFFF) +- sum -= 0xFFFF; +- sum += (u8)(nic->node_addr[i++] = inb(DEPCA_PROM)); +- sum += (u16)((nic->node_addr[i++] = inb(DEPCA_PROM)) << 8); +- if (sum > 0xFFFF) +- sum -= 0xFFFF; +- } +- if (sum == 0xFFFF) +- sum = 0; +- chksum = (u8)inb(DEPCA_PROM); +- chksum |= (u16)(inb(DEPCA_PROM) << 8); +- mem_len = (adapter == DEPCA) ? (48 << 10) : (64 << 10); +- offset = 0; +- if (nicsr & BUF) { +- offset = 0x8000; +- nicsr &= ~BS; +- mem_len -= (32 << 10); +- } +- if (adapter != DEPCA) /* enable shadow RAM */ +- outb(nicsr |= SHE, DEPCA_NICSR); +- printf("%s base %#hX, memory [%#hX-%#hX], addr %!", +- adapter_name[adapter], ioaddr, mem_start, mem_start + mem_len, +- nic->node_addr); +- if (sum != chksum) +- printf(" (bad checksum)"); +- putchar('\n'); +- return (1); +-} +- +-/************************************************************************** +-PROBE - Look for an adapter, this routine's visible to the outside +-***************************************************************************/ +-struct nic *depca_probe(struct nic *nic, unsigned short *probe_addrs) +-{ +- static unsigned short base[] = DEPCA_IO_PORTS; +- int i; +- +- if (probe_addrs == 0 || probe_addrs[0] == 0) +- probe_addrs = base; /* Use defaults */ +- for (i = 0; (ioaddr = base[i]) != 0; ++i) { +- if (depca_probe1(nic)) +- break; +- } +- if (ioaddr == 0) +- return (0); +- depca_reset(nic); +- /* point to NIC specific routines */ +- nic->reset = depca_reset; +- nic->poll = depca_poll; +- nic->transmit = depca_transmit; +- nic->disable = depca_disable; +- return (nic); +-} +diff -Naur grub-0.97.orig/netboot/dev.h grub-0.97/netboot/dev.h +--- grub-0.97.orig/netboot/dev.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/dev.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,83 @@ ++#ifndef _DEV_H ++#define _DEV_H ++ ++#include "isa.h" ++#include "pci.h" ++ ++/* Need to check the packing of this struct if Etherboot is ported */ ++struct dev_id ++{ ++ unsigned short vendor_id; ++ unsigned short device_id; ++ unsigned char bus_type; ++#define PCI_BUS_TYPE 1 ++#define ISA_BUS_TYPE 2 ++}; ++ ++/* Dont use sizeof, that will include the padding */ ++#define DEV_ID_SIZE 8 ++ ++ ++struct pci_probe_state ++{ ++#ifdef CONFIG_PCI ++ struct pci_device dev; ++ int advance; ++#else ++ int dummy; ++#endif ++}; ++struct isa_probe_state ++{ ++#ifdef CONFIG_ISA ++ const struct isa_driver *driver; ++ int advance; ++#else ++ int dummy; ++#endif ++}; ++ ++union probe_state ++{ ++ struct pci_probe_state pci; ++ struct isa_probe_state isa; ++}; ++ ++struct dev ++{ ++ void (*disable)P((struct dev *)); ++ struct dev_id devid; /* device ID string (sent to DHCP server) */ ++ int index; /* Index of next device on this controller to probe */ ++ int type; /* Type of device I am probing for */ ++ int how_probe; /* First, next or awake */ ++ int to_probe; /* Flavor of device I am probing */ ++ int failsafe; /* Failsafe probe requested */ ++ int type_index; /* Index of this device (within type) */ ++#define PROBE_NONE 0 ++#define PROBE_PCI 1 ++#define PROBE_ISA 2 ++ union probe_state state; ++}; ++ ++ ++#define NIC_DRIVER 0 ++#define DISK_DRIVER 1 ++#define FLOPPY_DRIVER 2 ++ ++#define BRIDGE_DRIVER 1000 ++ ++#define PROBE_FIRST (-1) ++#define PROBE_NEXT 0 ++#define PROBE_AWAKE 1 /* After calling disable bring up the same device */ ++ ++/* The probe result codes are selected ++ * to allow them to be fed back into the probe ++ * routine and get a successful probe. ++ */ ++#define PROBE_FAILED PROBE_FIRST ++#define PROBE_WORKED PROBE_NEXT ++ ++extern int probe(struct dev *dev); ++extern void disable(struct dev *dev); ++ ++#endif /* _DEV_H */ +diff -Naur grub-0.97.orig/netboot/e1000.c grub-0.97/netboot/e1000.c +--- grub-0.97.orig/netboot/e1000.c 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/e1000.c 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,3682 @@ ++/************************************************************************** ++Etherboot - BOOTP/TFTP Bootstrap Program ++Inter Pro 1000 for Etherboot ++Drivers are port from Intel's Linux driver e1000-4.3.15 ++ ++***************************************************************************/ ++/******************************************************************************* ++ ++ ++ Copyright(c) 1999 - 2003 Intel Corporation. All rights reserved. ++ ++ This program is free software; you can redistribute it and/or modify it ++ under the terms of the GNU General Public License as published by the Free ++ Software Foundation; either version 2 of the License, or (at your option) ++ any later version. ++ ++ This program is distributed in the hope that it will be useful, but WITHOUT ++ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ more details. ++ ++ You should have received a copy of the GNU General Public License along with ++ this program; if not, write to the Free Software Foundation, Inc., 59 ++ Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ ++ The full GNU General Public License is included in this distribution in the ++ file called LICENSE. ++ ++ Contact Information: ++ Linux NICS ++ Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 ++ ++*******************************************************************************/ ++/* ++ * Copyright (C) Archway Digital Solutions. ++ * ++ * written by Chrsitopher Li or ++ * 2/9/2002 ++ * ++ * Copyright (C) Linux Networx. ++ * Massive upgrade to work with the new intel gigabit NICs. ++ * ++ * ++ * Support for 82541ei & 82547ei chips from Intel's Linux driver 5.1.13 added by ++ * Georg Baum , sponsored by PetaMem GmbH and linkLINE Communications, Inc. ++ * ++ * 01/2004: Updated to Linux driver 5.2.22 by Georg Baum ++ */ ++ ++/* to get some global routines like printf */ ++#include "etherboot.h" ++/* to get the interface to the body of the program */ ++#include "nic.h" ++/* to get the PCI support functions, if this is a PCI NIC */ ++#include "pci.h" ++#include "timer.h" ++ ++typedef unsigned char *dma_addr_t; ++ ++typedef enum { ++ FALSE = 0, ++ TRUE = 1 ++} boolean_t; ++ ++#define DEBUG 0 ++ ++ ++/* Some pieces of code are disabled with #if 0 ... #endif. ++ * They are not deleted to show where the etherboot driver differs ++ * from the linux driver below the function level. ++ * Some member variables of the hw struct have been eliminated ++ * and the corresponding inplace checks inserted instead. ++ * Pieces such as LED handling that we definitely don't need are deleted. ++ * ++ * The following defines should not be needed normally, ++ * but may be helpful for debugging purposes. */ ++ ++/* Define this if you want to program the transmission control register ++ * the way the Linux driver does it. */ ++#undef LINUX_DRIVER_TCTL ++ ++/* Define this to behave more like the Linux driver. */ ++#undef LINUX_DRIVER ++ ++#include "e1000_hw.h" ++ ++/* NIC specific static variables go here */ ++static struct e1000_hw hw; ++static char tx_pool[128 + 16]; ++static char rx_pool[128 + 16]; ++static char packet[2096]; ++ ++static struct e1000_tx_desc *tx_base; ++static struct e1000_rx_desc *rx_base; ++ ++static int tx_tail; ++static int rx_tail, rx_last; ++ ++/* Function forward declarations */ ++static int e1000_setup_link(struct e1000_hw *hw); ++static int e1000_setup_fiber_serdes_link(struct e1000_hw *hw); ++static int e1000_setup_copper_link(struct e1000_hw *hw); ++static int e1000_phy_setup_autoneg(struct e1000_hw *hw); ++static void e1000_config_collision_dist(struct e1000_hw *hw); ++static int e1000_config_mac_to_phy(struct e1000_hw *hw); ++static int e1000_config_fc_after_link_up(struct e1000_hw *hw); ++static int e1000_check_for_link(struct e1000_hw *hw); ++static int e1000_wait_autoneg(struct e1000_hw *hw); ++static void e1000_get_speed_and_duplex(struct e1000_hw *hw, uint16_t *speed, uint16_t *duplex); ++static int e1000_read_phy_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t *phy_data); ++static int e1000_read_phy_reg_ex(struct e1000_hw *hw, uint32_t reg_addr, uint16_t *phy_data); ++static int e1000_write_phy_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t phy_data); ++static int e1000_write_phy_reg_ex(struct e1000_hw *hw, uint32_t reg_addr, uint16_t phy_data); ++static void e1000_phy_hw_reset(struct e1000_hw *hw); ++static int e1000_phy_reset(struct e1000_hw *hw); ++static int e1000_detect_gig_phy(struct e1000_hw *hw); ++ ++/* Printing macros... */ ++ ++#define E1000_ERR(args...) printf("e1000: " args) ++ ++#if DEBUG >= 3 ++#define E1000_DBG(args...) printf("e1000: " args) ++#else ++#define E1000_DBG(args...) ++#endif ++ ++#define MSGOUT(S, A, B) printk(S "\n", A, B) ++#if DEBUG >= 2 ++#define DEBUGFUNC(F) DEBUGOUT(F "\n"); ++#else ++#define DEBUGFUNC(F) ++#endif ++#if DEBUG >= 1 ++#define DEBUGOUT(S) printf(S) ++#define DEBUGOUT1(S,A) printf(S,A) ++#define DEBUGOUT2(S,A,B) printf(S,A,B) ++#define DEBUGOUT3(S,A,B,C) printf(S,A,B,C) ++#define DEBUGOUT7(S,A,B,C,D,E,F,G) printf(S,A,B,C,D,E,F,G) ++#else ++#define DEBUGOUT(S) ++#define DEBUGOUT1(S,A) ++#define DEBUGOUT2(S,A,B) ++#define DEBUGOUT3(S,A,B,C) ++#define DEBUGOUT7(S,A,B,C,D,E,F,G) ++#endif ++ ++#define E1000_WRITE_REG(a, reg, value) ( \ ++ ((a)->mac_type >= e1000_82543) ? \ ++ (writel((value), ((a)->hw_addr + E1000_##reg))) : \ ++ (writel((value), ((a)->hw_addr + E1000_82542_##reg)))) ++ ++#define E1000_READ_REG(a, reg) ( \ ++ ((a)->mac_type >= e1000_82543) ? \ ++ readl((a)->hw_addr + E1000_##reg) : \ ++ readl((a)->hw_addr + E1000_82542_##reg)) ++ ++#define E1000_WRITE_REG_ARRAY(a, reg, offset, value) ( \ ++ ((a)->mac_type >= e1000_82543) ? \ ++ writel((value), ((a)->hw_addr + E1000_##reg + ((offset) << 2))) : \ ++ writel((value), ((a)->hw_addr + E1000_82542_##reg + ((offset) << 2)))) ++ ++#define E1000_READ_REG_ARRAY(a, reg, offset) ( \ ++ ((a)->mac_type >= e1000_82543) ? \ ++ readl((a)->hw_addr + E1000_##reg + ((offset) << 2)) : \ ++ readl((a)->hw_addr + E1000_82542_##reg + ((offset) << 2))) ++ ++#define E1000_WRITE_FLUSH(a) {uint32_t x; x = E1000_READ_REG(a, STATUS);} ++ ++uint32_t ++e1000_io_read(struct e1000_hw *hw __unused, uint32_t port) ++{ ++ return inl(port); ++} ++ ++void ++e1000_io_write(struct e1000_hw *hw __unused, uint32_t port, uint32_t value) ++{ ++ outl(value, port); ++} ++ ++static inline void e1000_pci_set_mwi(struct e1000_hw *hw) ++{ ++ pci_write_config_word(hw->pdev, PCI_COMMAND, hw->pci_cmd_word); ++} ++ ++static inline void e1000_pci_clear_mwi(struct e1000_hw *hw) ++{ ++ pci_write_config_word(hw->pdev, PCI_COMMAND, ++ hw->pci_cmd_word & ~PCI_COMMAND_INVALIDATE); ++} ++ ++/****************************************************************************** ++ * Raises the EEPROM's clock input. ++ * ++ * hw - Struct containing variables accessed by shared code ++ * eecd - EECD's current value ++ *****************************************************************************/ ++static void ++e1000_raise_ee_clk(struct e1000_hw *hw, ++ uint32_t *eecd) ++{ ++ /* Raise the clock input to the EEPROM (by setting the SK bit), and then ++ * wait microseconds. ++ */ ++ *eecd = *eecd | E1000_EECD_SK; ++ E1000_WRITE_REG(hw, EECD, *eecd); ++ E1000_WRITE_FLUSH(hw); ++ udelay(hw->eeprom.delay_usec); ++} ++ ++/****************************************************************************** ++ * Lowers the EEPROM's clock input. ++ * ++ * hw - Struct containing variables accessed by shared code ++ * eecd - EECD's current value ++ *****************************************************************************/ ++static void ++e1000_lower_ee_clk(struct e1000_hw *hw, ++ uint32_t *eecd) ++{ ++ /* Lower the clock input to the EEPROM (by clearing the SK bit), and then ++ * wait 50 microseconds. ++ */ ++ *eecd = *eecd & ~E1000_EECD_SK; ++ E1000_WRITE_REG(hw, EECD, *eecd); ++ E1000_WRITE_FLUSH(hw); ++ udelay(hw->eeprom.delay_usec); ++} ++ ++/****************************************************************************** ++ * Shift data bits out to the EEPROM. ++ * ++ * hw - Struct containing variables accessed by shared code ++ * data - data to send to the EEPROM ++ * count - number of bits to shift out ++ *****************************************************************************/ ++static void ++e1000_shift_out_ee_bits(struct e1000_hw *hw, ++ uint16_t data, ++ uint16_t count) ++{ ++ struct e1000_eeprom_info *eeprom = &hw->eeprom; ++ uint32_t eecd; ++ uint32_t mask; ++ ++ /* We need to shift "count" bits out to the EEPROM. So, value in the ++ * "data" parameter will be shifted out to the EEPROM one bit at a time. ++ * In order to do this, "data" must be broken down into bits. ++ */ ++ mask = 0x01 << (count - 1); ++ eecd = E1000_READ_REG(hw, EECD); ++ if (eeprom->type == e1000_eeprom_microwire) { ++ eecd &= ~E1000_EECD_DO; ++ } else if (eeprom->type == e1000_eeprom_spi) { ++ eecd |= E1000_EECD_DO; ++ } ++ do { ++ /* A "1" is shifted out to the EEPROM by setting bit "DI" to a "1", ++ * and then raising and then lowering the clock (the SK bit controls ++ * the clock input to the EEPROM). A "0" is shifted out to the EEPROM ++ * by setting "DI" to "0" and then raising and then lowering the clock. ++ */ ++ eecd &= ~E1000_EECD_DI; ++ ++ if(data & mask) ++ eecd |= E1000_EECD_DI; ++ ++ E1000_WRITE_REG(hw, EECD, eecd); ++ E1000_WRITE_FLUSH(hw); ++ ++ udelay(eeprom->delay_usec); ++ ++ e1000_raise_ee_clk(hw, &eecd); ++ e1000_lower_ee_clk(hw, &eecd); ++ ++ mask = mask >> 1; ++ ++ } while(mask); ++ ++ /* We leave the "DI" bit set to "0" when we leave this routine. */ ++ eecd &= ~E1000_EECD_DI; ++ E1000_WRITE_REG(hw, EECD, eecd); ++} ++ ++/****************************************************************************** ++ * Shift data bits in from the EEPROM ++ * ++ * hw - Struct containing variables accessed by shared code ++ *****************************************************************************/ ++static uint16_t ++e1000_shift_in_ee_bits(struct e1000_hw *hw, ++ uint16_t count) ++{ ++ uint32_t eecd; ++ uint32_t i; ++ uint16_t data; ++ ++ /* In order to read a register from the EEPROM, we need to shift 'count' ++ * bits in from the EEPROM. Bits are "shifted in" by raising the clock ++ * input to the EEPROM (setting the SK bit), and then reading the value of ++ * the "DO" bit. During this "shifting in" process the "DI" bit should ++ * always be clear. ++ */ ++ ++ eecd = E1000_READ_REG(hw, EECD); ++ ++ eecd &= ~(E1000_EECD_DO | E1000_EECD_DI); ++ data = 0; ++ ++ for(i = 0; i < count; i++) { ++ data = data << 1; ++ e1000_raise_ee_clk(hw, &eecd); ++ ++ eecd = E1000_READ_REG(hw, EECD); ++ ++ eecd &= ~(E1000_EECD_DI); ++ if(eecd & E1000_EECD_DO) ++ data |= 1; ++ ++ e1000_lower_ee_clk(hw, &eecd); ++ } ++ ++ return data; ++} ++ ++/****************************************************************************** ++ * Prepares EEPROM for access ++ * ++ * hw - Struct containing variables accessed by shared code ++ * ++ * Lowers EEPROM clock. Clears input pin. Sets the chip select pin. This ++ * function should be called before issuing a command to the EEPROM. ++ *****************************************************************************/ ++static int32_t ++e1000_acquire_eeprom(struct e1000_hw *hw) ++{ ++ struct e1000_eeprom_info *eeprom = &hw->eeprom; ++ uint32_t eecd, i=0; ++ ++ eecd = E1000_READ_REG(hw, EECD); ++ ++ /* Request EEPROM Access */ ++ if(hw->mac_type > e1000_82544) { ++ eecd |= E1000_EECD_REQ; ++ E1000_WRITE_REG(hw, EECD, eecd); ++ eecd = E1000_READ_REG(hw, EECD); ++ while((!(eecd & E1000_EECD_GNT)) && ++ (i < E1000_EEPROM_GRANT_ATTEMPTS)) { ++ i++; ++ udelay(5); ++ eecd = E1000_READ_REG(hw, EECD); ++ } ++ if(!(eecd & E1000_EECD_GNT)) { ++ eecd &= ~E1000_EECD_REQ; ++ E1000_WRITE_REG(hw, EECD, eecd); ++ DEBUGOUT("Could not acquire EEPROM grant\n"); ++ return -E1000_ERR_EEPROM; ++ } ++ } ++ ++ /* Setup EEPROM for Read/Write */ ++ ++ if (eeprom->type == e1000_eeprom_microwire) { ++ /* Clear SK and DI */ ++ eecd &= ~(E1000_EECD_DI | E1000_EECD_SK); ++ E1000_WRITE_REG(hw, EECD, eecd); ++ ++ /* Set CS */ ++ eecd |= E1000_EECD_CS; ++ E1000_WRITE_REG(hw, EECD, eecd); ++ } else if (eeprom->type == e1000_eeprom_spi) { ++ /* Clear SK and CS */ ++ eecd &= ~(E1000_EECD_CS | E1000_EECD_SK); ++ E1000_WRITE_REG(hw, EECD, eecd); ++ udelay(1); ++ } ++ ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++ * Returns EEPROM to a "standby" state ++ * ++ * hw - Struct containing variables accessed by shared code ++ *****************************************************************************/ ++static void ++e1000_standby_eeprom(struct e1000_hw *hw) ++{ ++ struct e1000_eeprom_info *eeprom = &hw->eeprom; ++ uint32_t eecd; ++ ++ eecd = E1000_READ_REG(hw, EECD); ++ ++ if(eeprom->type == e1000_eeprom_microwire) { ++ ++ /* Deselect EEPROM */ ++ eecd &= ~(E1000_EECD_CS | E1000_EECD_SK); ++ E1000_WRITE_REG(hw, EECD, eecd); ++ E1000_WRITE_FLUSH(hw); ++ udelay(eeprom->delay_usec); ++ ++ /* Clock high */ ++ eecd |= E1000_EECD_SK; ++ E1000_WRITE_REG(hw, EECD, eecd); ++ E1000_WRITE_FLUSH(hw); ++ udelay(eeprom->delay_usec); ++ ++ /* Select EEPROM */ ++ eecd |= E1000_EECD_CS; ++ E1000_WRITE_REG(hw, EECD, eecd); ++ E1000_WRITE_FLUSH(hw); ++ udelay(eeprom->delay_usec); ++ ++ /* Clock low */ ++ eecd &= ~E1000_EECD_SK; ++ E1000_WRITE_REG(hw, EECD, eecd); ++ E1000_WRITE_FLUSH(hw); ++ udelay(eeprom->delay_usec); ++ } else if(eeprom->type == e1000_eeprom_spi) { ++ /* Toggle CS to flush commands */ ++ eecd |= E1000_EECD_CS; ++ E1000_WRITE_REG(hw, EECD, eecd); ++ E1000_WRITE_FLUSH(hw); ++ udelay(eeprom->delay_usec); ++ eecd &= ~E1000_EECD_CS; ++ E1000_WRITE_REG(hw, EECD, eecd); ++ E1000_WRITE_FLUSH(hw); ++ udelay(eeprom->delay_usec); ++ } ++} ++ ++/****************************************************************************** ++ * Terminates a command by inverting the EEPROM's chip select pin ++ * ++ * hw - Struct containing variables accessed by shared code ++ *****************************************************************************/ ++static void ++e1000_release_eeprom(struct e1000_hw *hw) ++{ ++ uint32_t eecd; ++ ++ eecd = E1000_READ_REG(hw, EECD); ++ ++ if (hw->eeprom.type == e1000_eeprom_spi) { ++ eecd |= E1000_EECD_CS; /* Pull CS high */ ++ eecd &= ~E1000_EECD_SK; /* Lower SCK */ ++ ++ E1000_WRITE_REG(hw, EECD, eecd); ++ ++ udelay(hw->eeprom.delay_usec); ++ } else if(hw->eeprom.type == e1000_eeprom_microwire) { ++ /* cleanup eeprom */ ++ ++ /* CS on Microwire is active-high */ ++ eecd &= ~(E1000_EECD_CS | E1000_EECD_DI); ++ ++ E1000_WRITE_REG(hw, EECD, eecd); ++ ++ /* Rising edge of clock */ ++ eecd |= E1000_EECD_SK; ++ E1000_WRITE_REG(hw, EECD, eecd); ++ E1000_WRITE_FLUSH(hw); ++ udelay(hw->eeprom.delay_usec); ++ ++ /* Falling edge of clock */ ++ eecd &= ~E1000_EECD_SK; ++ E1000_WRITE_REG(hw, EECD, eecd); ++ E1000_WRITE_FLUSH(hw); ++ udelay(hw->eeprom.delay_usec); ++ } ++ ++ /* Stop requesting EEPROM access */ ++ if(hw->mac_type > e1000_82544) { ++ eecd &= ~E1000_EECD_REQ; ++ E1000_WRITE_REG(hw, EECD, eecd); ++ } ++} ++ ++/****************************************************************************** ++ * Reads a 16 bit word from the EEPROM. ++ * ++ * hw - Struct containing variables accessed by shared code ++ *****************************************************************************/ ++static int32_t ++e1000_spi_eeprom_ready(struct e1000_hw *hw) ++{ ++ uint16_t retry_count = 0; ++ uint8_t spi_stat_reg; ++ ++ /* Read "Status Register" repeatedly until the LSB is cleared. The ++ * EEPROM will signal that the command has been completed by clearing ++ * bit 0 of the internal status register. If it's not cleared within ++ * 5 milliseconds, then error out. ++ */ ++ retry_count = 0; ++ do { ++ e1000_shift_out_ee_bits(hw, EEPROM_RDSR_OPCODE_SPI, ++ hw->eeprom.opcode_bits); ++ spi_stat_reg = (uint8_t)e1000_shift_in_ee_bits(hw, 8); ++ if (!(spi_stat_reg & EEPROM_STATUS_RDY_SPI)) ++ break; ++ ++ udelay(5); ++ retry_count += 5; ++ ++ } while(retry_count < EEPROM_MAX_RETRY_SPI); ++ ++ /* ATMEL SPI write time could vary from 0-20mSec on 3.3V devices (and ++ * only 0-5mSec on 5V devices) ++ */ ++ if(retry_count >= EEPROM_MAX_RETRY_SPI) { ++ DEBUGOUT("SPI EEPROM Status error\n"); ++ return -E1000_ERR_EEPROM; ++ } ++ ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++ * Reads a 16 bit word from the EEPROM. ++ * ++ * hw - Struct containing variables accessed by shared code ++ * offset - offset of word in the EEPROM to read ++ * data - word read from the EEPROM ++ * words - number of words to read ++ *****************************************************************************/ ++static int ++e1000_read_eeprom(struct e1000_hw *hw, ++ uint16_t offset, ++ uint16_t words, ++ uint16_t *data) ++{ ++ struct e1000_eeprom_info *eeprom = &hw->eeprom; ++ uint32_t i = 0; ++ ++ DEBUGFUNC("e1000_read_eeprom"); ++ ++ /* A check for invalid values: offset too large, too many words, and not ++ * enough words. ++ */ ++ if((offset > eeprom->word_size) || (words > eeprom->word_size - offset) || ++ (words == 0)) { ++ DEBUGOUT("\"words\" parameter out of bounds\n"); ++ return -E1000_ERR_EEPROM; ++ } ++ ++ /* Prepare the EEPROM for reading */ ++ if(e1000_acquire_eeprom(hw) != E1000_SUCCESS) ++ return -E1000_ERR_EEPROM; ++ ++ if(eeprom->type == e1000_eeprom_spi) { ++ uint16_t word_in; ++ uint8_t read_opcode = EEPROM_READ_OPCODE_SPI; ++ ++ if(e1000_spi_eeprom_ready(hw)) { ++ e1000_release_eeprom(hw); ++ return -E1000_ERR_EEPROM; ++ } ++ ++ e1000_standby_eeprom(hw); ++ ++ /* Some SPI eeproms use the 8th address bit embedded in the opcode */ ++ if((eeprom->address_bits == 8) && (offset >= 128)) ++ read_opcode |= EEPROM_A8_OPCODE_SPI; ++ ++ /* Send the READ command (opcode + addr) */ ++ e1000_shift_out_ee_bits(hw, read_opcode, eeprom->opcode_bits); ++ e1000_shift_out_ee_bits(hw, (uint16_t)(offset*2), eeprom->address_bits); ++ ++ /* Read the data. The address of the eeprom internally increments with ++ * each byte (spi) being read, saving on the overhead of eeprom setup ++ * and tear-down. The address counter will roll over if reading beyond ++ * the size of the eeprom, thus allowing the entire memory to be read ++ * starting from any offset. */ ++ for (i = 0; i < words; i++) { ++ word_in = e1000_shift_in_ee_bits(hw, 16); ++ data[i] = (word_in >> 8) | (word_in << 8); ++ } ++ } else if(eeprom->type == e1000_eeprom_microwire) { ++ for (i = 0; i < words; i++) { ++ /* Send the READ command (opcode + addr) */ ++ e1000_shift_out_ee_bits(hw, EEPROM_READ_OPCODE_MICROWIRE, ++ eeprom->opcode_bits); ++ e1000_shift_out_ee_bits(hw, (uint16_t)(offset + i), ++ eeprom->address_bits); ++ ++ /* Read the data. For microwire, each word requires the overhead ++ * of eeprom setup and tear-down. */ ++ data[i] = e1000_shift_in_ee_bits(hw, 16); ++ e1000_standby_eeprom(hw); ++ } ++ } ++ ++ /* End this read operation */ ++ e1000_release_eeprom(hw); ++ ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++ * Verifies that the EEPROM has a valid checksum ++ * ++ * hw - Struct containing variables accessed by shared code ++ * ++ * Reads the first 64 16 bit words of the EEPROM and sums the values read. ++ * If the the sum of the 64 16 bit words is 0xBABA, the EEPROM's checksum is ++ * valid. ++ *****************************************************************************/ ++static int ++e1000_validate_eeprom_checksum(struct e1000_hw *hw) ++{ ++ uint16_t checksum = 0; ++ uint16_t i, eeprom_data; ++ ++ DEBUGFUNC("e1000_validate_eeprom_checksum"); ++ ++ for(i = 0; i < (EEPROM_CHECKSUM_REG + 1); i++) { ++ if(e1000_read_eeprom(hw, i, 1, &eeprom_data) < 0) { ++ DEBUGOUT("EEPROM Read Error\n"); ++ return -E1000_ERR_EEPROM; ++ } ++ checksum += eeprom_data; ++ } ++ ++ if(checksum == (uint16_t) EEPROM_SUM) ++ return E1000_SUCCESS; ++ else { ++ DEBUGOUT("EEPROM Checksum Invalid\n"); ++ return -E1000_ERR_EEPROM; ++ } ++} ++ ++/****************************************************************************** ++ * Reads the adapter's MAC address from the EEPROM and inverts the LSB for the ++ * second function of dual function devices ++ * ++ * hw - Struct containing variables accessed by shared code ++ *****************************************************************************/ ++static int ++e1000_read_mac_addr(struct e1000_hw *hw) ++{ ++ uint16_t offset; ++ uint16_t eeprom_data; ++ int i; ++ ++ DEBUGFUNC("e1000_read_mac_addr"); ++ ++ for(i = 0; i < NODE_ADDRESS_SIZE; i += 2) { ++ offset = i >> 1; ++ if(e1000_read_eeprom(hw, offset, 1, &eeprom_data) < 0) { ++ DEBUGOUT("EEPROM Read Error\n"); ++ return -E1000_ERR_EEPROM; ++ } ++ hw->mac_addr[i] = eeprom_data & 0xff; ++ hw->mac_addr[i+1] = (eeprom_data >> 8) & 0xff; ++ } ++ if(((hw->mac_type == e1000_82546) || (hw->mac_type == e1000_82546_rev_3)) && ++ (E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1)) ++ /* Invert the last bit if this is the second device */ ++ hw->mac_addr[5] ^= 1; ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++ * Initializes receive address filters. ++ * ++ * hw - Struct containing variables accessed by shared code ++ * ++ * Places the MAC address in receive address register 0 and clears the rest ++ * of the receive addresss registers. Clears the multicast table. Assumes ++ * the receiver is in reset when the routine is called. ++ *****************************************************************************/ ++static void ++e1000_init_rx_addrs(struct e1000_hw *hw) ++{ ++ uint32_t i; ++ uint32_t addr_low; ++ uint32_t addr_high; ++ ++ DEBUGFUNC("e1000_init_rx_addrs"); ++ ++ /* Setup the receive address. */ ++ DEBUGOUT("Programming MAC Address into RAR[0]\n"); ++ addr_low = (hw->mac_addr[0] | ++ (hw->mac_addr[1] << 8) | ++ (hw->mac_addr[2] << 16) | (hw->mac_addr[3] << 24)); ++ ++ addr_high = (hw->mac_addr[4] | ++ (hw->mac_addr[5] << 8) | E1000_RAH_AV); ++ ++ E1000_WRITE_REG_ARRAY(hw, RA, 0, addr_low); ++ E1000_WRITE_REG_ARRAY(hw, RA, 1, addr_high); ++ ++ /* Zero out the other 15 receive addresses. */ ++ DEBUGOUT("Clearing RAR[1-15]\n"); ++ for(i = 1; i < E1000_RAR_ENTRIES; i++) { ++ E1000_WRITE_REG_ARRAY(hw, RA, (i << 1), 0); ++ E1000_WRITE_REG_ARRAY(hw, RA, ((i << 1) + 1), 0); ++ } ++} ++ ++/****************************************************************************** ++ * Clears the VLAN filer table ++ * ++ * hw - Struct containing variables accessed by shared code ++ *****************************************************************************/ ++static void ++e1000_clear_vfta(struct e1000_hw *hw) ++{ ++ uint32_t offset; ++ ++ for(offset = 0; offset < E1000_VLAN_FILTER_TBL_SIZE; offset++) ++ E1000_WRITE_REG_ARRAY(hw, VFTA, offset, 0); ++} ++ ++/****************************************************************************** ++* Writes a value to one of the devices registers using port I/O (as opposed to ++* memory mapped I/O). Only 82544 and newer devices support port I/O. * ++* hw - Struct containing variables accessed by shared code ++* offset - offset to write to * value - value to write ++*****************************************************************************/ ++void e1000_write_reg_io(struct e1000_hw *hw, uint32_t offset, uint32_t value){ ++ uint32_t io_addr = hw->io_base; ++ uint32_t io_data = hw->io_base + 4; ++ e1000_io_write(hw, io_addr, offset); ++ e1000_io_write(hw, io_data, value); ++} ++ ++/****************************************************************************** ++ * Set the phy type member in the hw struct. ++ * ++ * hw - Struct containing variables accessed by shared code ++ *****************************************************************************/ ++static int32_t ++e1000_set_phy_type(struct e1000_hw *hw) ++{ ++ DEBUGFUNC("e1000_set_phy_type"); ++ ++ switch(hw->phy_id) { ++ case M88E1000_E_PHY_ID: ++ case M88E1000_I_PHY_ID: ++ case M88E1011_I_PHY_ID: ++ hw->phy_type = e1000_phy_m88; ++ break; ++ case IGP01E1000_I_PHY_ID: ++ hw->phy_type = e1000_phy_igp; ++ break; ++ default: ++ /* Should never have loaded on this device */ ++ hw->phy_type = e1000_phy_undefined; ++ return -E1000_ERR_PHY_TYPE; ++ } ++ ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++ * IGP phy init script - initializes the GbE PHY ++ * ++ * hw - Struct containing variables accessed by shared code ++ *****************************************************************************/ ++static void ++e1000_phy_init_script(struct e1000_hw *hw) ++{ ++ DEBUGFUNC("e1000_phy_init_script"); ++ ++#if 0 ++ /* See e1000_sw_init() of the Linux driver */ ++ if(hw->phy_init_script) { ++#else ++ if((hw->mac_type == e1000_82541) || ++ (hw->mac_type == e1000_82547) || ++ (hw->mac_type == e1000_82541_rev_2) || ++ (hw->mac_type == e1000_82547_rev_2)) { ++#endif ++ mdelay(20); ++ ++ e1000_write_phy_reg(hw,0x0000,0x0140); ++ ++ mdelay(5); ++ ++ if(hw->mac_type == e1000_82541 || hw->mac_type == e1000_82547) { ++ e1000_write_phy_reg(hw, 0x1F95, 0x0001); ++ ++ e1000_write_phy_reg(hw, 0x1F71, 0xBD21); ++ ++ e1000_write_phy_reg(hw, 0x1F79, 0x0018); ++ ++ e1000_write_phy_reg(hw, 0x1F30, 0x1600); ++ ++ e1000_write_phy_reg(hw, 0x1F31, 0x0014); ++ ++ e1000_write_phy_reg(hw, 0x1F32, 0x161C); ++ ++ e1000_write_phy_reg(hw, 0x1F94, 0x0003); ++ ++ e1000_write_phy_reg(hw, 0x1F96, 0x003F); ++ ++ e1000_write_phy_reg(hw, 0x2010, 0x0008); ++ } else { ++ e1000_write_phy_reg(hw, 0x1F73, 0x0099); ++ } ++ ++ e1000_write_phy_reg(hw, 0x0000, 0x3300); ++ ++ ++ if(hw->mac_type == e1000_82547) { ++ uint16_t fused, fine, coarse; ++ ++ /* Move to analog registers page */ ++ e1000_read_phy_reg(hw, IGP01E1000_ANALOG_SPARE_FUSE_STATUS, &fused); ++ ++ if(!(fused & IGP01E1000_ANALOG_SPARE_FUSE_ENABLED)) { ++ e1000_read_phy_reg(hw, IGP01E1000_ANALOG_FUSE_STATUS, &fused); ++ ++ fine = fused & IGP01E1000_ANALOG_FUSE_FINE_MASK; ++ coarse = fused & IGP01E1000_ANALOG_FUSE_COARSE_MASK; ++ ++ if(coarse > IGP01E1000_ANALOG_FUSE_COARSE_THRESH) { ++ coarse -= IGP01E1000_ANALOG_FUSE_COARSE_10; ++ fine -= IGP01E1000_ANALOG_FUSE_FINE_1; ++ } else if(coarse == IGP01E1000_ANALOG_FUSE_COARSE_THRESH) ++ fine -= IGP01E1000_ANALOG_FUSE_FINE_10; ++ ++ fused = (fused & IGP01E1000_ANALOG_FUSE_POLY_MASK) | ++ (fine & IGP01E1000_ANALOG_FUSE_FINE_MASK) | ++ (coarse & IGP01E1000_ANALOG_FUSE_COARSE_MASK); ++ ++ e1000_write_phy_reg(hw, IGP01E1000_ANALOG_FUSE_CONTROL, fused); ++ e1000_write_phy_reg(hw, IGP01E1000_ANALOG_FUSE_BYPASS, ++ IGP01E1000_ANALOG_FUSE_ENABLE_SW_CONTROL); ++ } ++ } ++ } ++} ++ ++/****************************************************************************** ++ * Set the mac type member in the hw struct. ++ * ++ * hw - Struct containing variables accessed by shared code ++ *****************************************************************************/ ++static int ++e1000_set_mac_type(struct e1000_hw *hw) ++{ ++ DEBUGFUNC("e1000_set_mac_type"); ++ ++ switch (hw->device_id) { ++ case E1000_DEV_ID_82542: ++ switch (hw->revision_id) { ++ case E1000_82542_2_0_REV_ID: ++ hw->mac_type = e1000_82542_rev2_0; ++ break; ++ case E1000_82542_2_1_REV_ID: ++ hw->mac_type = e1000_82542_rev2_1; ++ break; ++ default: ++ /* Invalid 82542 revision ID */ ++ return -E1000_ERR_MAC_TYPE; ++ } ++ break; ++ case E1000_DEV_ID_82543GC_FIBER: ++ case E1000_DEV_ID_82543GC_COPPER: ++ hw->mac_type = e1000_82543; ++ break; ++ case E1000_DEV_ID_82544EI_COPPER: ++ case E1000_DEV_ID_82544EI_FIBER: ++ case E1000_DEV_ID_82544GC_COPPER: ++ case E1000_DEV_ID_82544GC_LOM: ++ hw->mac_type = e1000_82544; ++ break; ++ case E1000_DEV_ID_82540EM: ++ case E1000_DEV_ID_82540EM_LOM: ++ case E1000_DEV_ID_82540EP: ++ case E1000_DEV_ID_82540EP_LOM: ++ case E1000_DEV_ID_82540EP_LP: ++ hw->mac_type = e1000_82540; ++ break; ++ case E1000_DEV_ID_82545EM_COPPER: ++ case E1000_DEV_ID_82545EM_FIBER: ++ hw->mac_type = e1000_82545; ++ break; ++ case E1000_DEV_ID_82545GM_COPPER: ++ case E1000_DEV_ID_82545GM_FIBER: ++ case E1000_DEV_ID_82545GM_SERDES: ++ hw->mac_type = e1000_82545_rev_3; ++ break; ++ case E1000_DEV_ID_82546EB_COPPER: ++ case E1000_DEV_ID_82546EB_FIBER: ++ case E1000_DEV_ID_82546EB_QUAD_COPPER: ++ hw->mac_type = e1000_82546; ++ break; ++ case E1000_DEV_ID_82546GB_COPPER: ++ case E1000_DEV_ID_82546GB_FIBER: ++ case E1000_DEV_ID_82546GB_SERDES: ++ hw->mac_type = e1000_82546_rev_3; ++ break; ++ case E1000_DEV_ID_82541EI: ++ case E1000_DEV_ID_82541EI_MOBILE: ++ hw->mac_type = e1000_82541; ++ break; ++ case E1000_DEV_ID_82541ER: ++ case E1000_DEV_ID_82541GI: ++ case E1000_DEV_ID_82541GI_MOBILE: ++ hw->mac_type = e1000_82541_rev_2; ++ break; ++ case E1000_DEV_ID_82547EI: ++ hw->mac_type = e1000_82547; ++ break; ++ case E1000_DEV_ID_82547GI: ++ hw->mac_type = e1000_82547_rev_2; ++ break; ++ default: ++ /* Should never have loaded on this device */ ++ return -E1000_ERR_MAC_TYPE; ++ } ++ ++ return E1000_SUCCESS; ++} ++ ++/***************************************************************************** ++ * Set media type and TBI compatibility. ++ * ++ * hw - Struct containing variables accessed by shared code ++ * **************************************************************************/ ++static void ++e1000_set_media_type(struct e1000_hw *hw) ++{ ++ uint32_t status; ++ ++ DEBUGFUNC("e1000_set_media_type"); ++ ++ if(hw->mac_type != e1000_82543) { ++ /* tbi_compatibility is only valid on 82543 */ ++ hw->tbi_compatibility_en = FALSE; ++ } ++ ++ switch (hw->device_id) { ++ case E1000_DEV_ID_82545GM_SERDES: ++ case E1000_DEV_ID_82546GB_SERDES: ++ hw->media_type = e1000_media_type_internal_serdes; ++ break; ++ default: ++ if(hw->mac_type >= e1000_82543) { ++ status = E1000_READ_REG(hw, STATUS); ++ if(status & E1000_STATUS_TBIMODE) { ++ hw->media_type = e1000_media_type_fiber; ++ /* tbi_compatibility not valid on fiber */ ++ hw->tbi_compatibility_en = FALSE; ++ } else { ++ hw->media_type = e1000_media_type_copper; ++ } ++ } else { ++ /* This is an 82542 (fiber only) */ ++ hw->media_type = e1000_media_type_fiber; ++ } ++ } ++} ++ ++/****************************************************************************** ++ * Reset the transmit and receive units; mask and clear all interrupts. ++ * ++ * hw - Struct containing variables accessed by shared code ++ *****************************************************************************/ ++static void ++e1000_reset_hw(struct e1000_hw *hw) ++{ ++ uint32_t ctrl; ++ uint32_t ctrl_ext; ++ uint32_t icr; ++ uint32_t manc; ++ ++ DEBUGFUNC("e1000_reset_hw"); ++ ++ /* For 82542 (rev 2.0), disable MWI before issuing a device reset */ ++ if(hw->mac_type == e1000_82542_rev2_0) { ++ DEBUGOUT("Disabling MWI on 82542 rev 2.0\n"); ++ e1000_pci_clear_mwi(hw); ++ } ++ ++ /* Clear interrupt mask to stop board from generating interrupts */ ++ DEBUGOUT("Masking off all interrupts\n"); ++ E1000_WRITE_REG(hw, IMC, 0xffffffff); ++ ++ /* Disable the Transmit and Receive units. Then delay to allow ++ * any pending transactions to complete before we hit the MAC with ++ * the global reset. ++ */ ++ E1000_WRITE_REG(hw, RCTL, 0); ++ E1000_WRITE_REG(hw, TCTL, E1000_TCTL_PSP); ++ E1000_WRITE_FLUSH(hw); ++ ++ /* The tbi_compatibility_on Flag must be cleared when Rctl is cleared. */ ++ hw->tbi_compatibility_on = FALSE; ++ ++ /* Delay to allow any outstanding PCI transactions to complete before ++ * resetting the device ++ */ ++ mdelay(10); ++ ++ ctrl = E1000_READ_REG(hw, CTRL); ++ ++ /* Must reset the PHY before resetting the MAC */ ++ if((hw->mac_type == e1000_82541) || (hw->mac_type == e1000_82547)) { ++ E1000_WRITE_REG_IO(hw, CTRL, (ctrl | E1000_CTRL_PHY_RST)); ++ mdelay(5); ++ } ++ ++ /* Issue a global reset to the MAC. This will reset the chip's ++ * transmit, receive, DMA, and link units. It will not effect ++ * the current PCI configuration. The global reset bit is self- ++ * clearing, and should clear within a microsecond. ++ */ ++ DEBUGOUT("Issuing a global reset to MAC\n"); ++ ++ switch(hw->mac_type) { ++ case e1000_82544: ++ case e1000_82540: ++ case e1000_82545: ++ case e1000_82546: ++ case e1000_82541: ++ case e1000_82541_rev_2: ++ /* These controllers can't ack the 64-bit write when issuing the ++ * reset, so use IO-mapping as a workaround to issue the reset */ ++ E1000_WRITE_REG_IO(hw, CTRL, (ctrl | E1000_CTRL_RST)); ++ break; ++ case e1000_82545_rev_3: ++ case e1000_82546_rev_3: ++ /* Reset is performed on a shadow of the control register */ ++ E1000_WRITE_REG(hw, CTRL_DUP, (ctrl | E1000_CTRL_RST)); ++ break; ++ default: ++ E1000_WRITE_REG(hw, CTRL, (ctrl | E1000_CTRL_RST)); ++ break; ++ } ++ ++ /* After MAC reset, force reload of EEPROM to restore power-on settings to ++ * device. Later controllers reload the EEPROM automatically, so just wait ++ * for reload to complete. ++ */ ++ switch(hw->mac_type) { ++ case e1000_82542_rev2_0: ++ case e1000_82542_rev2_1: ++ case e1000_82543: ++ case e1000_82544: ++ /* Wait for reset to complete */ ++ udelay(10); ++ ctrl_ext = E1000_READ_REG(hw, CTRL_EXT); ++ ctrl_ext |= E1000_CTRL_EXT_EE_RST; ++ E1000_WRITE_REG(hw, CTRL_EXT, ctrl_ext); ++ E1000_WRITE_FLUSH(hw); ++ /* Wait for EEPROM reload */ ++ mdelay(2); ++ break; ++ case e1000_82541: ++ case e1000_82541_rev_2: ++ case e1000_82547: ++ case e1000_82547_rev_2: ++ /* Wait for EEPROM reload */ ++ mdelay(20); ++ break; ++ default: ++ /* Wait for EEPROM reload (it happens automatically) */ ++ mdelay(5); ++ break; ++ } ++ ++ /* Disable HW ARPs on ASF enabled adapters */ ++ if(hw->mac_type >= e1000_82540) { ++ manc = E1000_READ_REG(hw, MANC); ++ manc &= ~(E1000_MANC_ARP_EN); ++ E1000_WRITE_REG(hw, MANC, manc); ++ } ++ ++ if((hw->mac_type == e1000_82541) || (hw->mac_type == e1000_82547)) { ++ e1000_phy_init_script(hw); ++ } ++ ++ /* Clear interrupt mask to stop board from generating interrupts */ ++ DEBUGOUT("Masking off all interrupts\n"); ++ E1000_WRITE_REG(hw, IMC, 0xffffffff); ++ ++ /* Clear any pending interrupt events. */ ++ icr = E1000_READ_REG(hw, ICR); ++ ++ /* If MWI was previously enabled, reenable it. */ ++ if(hw->mac_type == e1000_82542_rev2_0) { ++#ifdef LINUX_DRIVER ++ if(hw->pci_cmd_word & CMD_MEM_WRT_INVALIDATE) ++#endif ++ e1000_pci_set_mwi(hw); ++ } ++} ++ ++/****************************************************************************** ++ * Performs basic configuration of the adapter. ++ * ++ * hw - Struct containing variables accessed by shared code ++ * ++ * Assumes that the controller has previously been reset and is in a ++ * post-reset uninitialized state. Initializes the receive address registers, ++ * multicast table, and VLAN filter table. Calls routines to setup link ++ * configuration and flow control settings. Clears all on-chip counters. Leaves ++ * the transmit and receive units disabled and uninitialized. ++ *****************************************************************************/ ++static int ++e1000_init_hw(struct e1000_hw *hw) ++{ ++ uint32_t ctrl, status; ++ uint32_t i; ++ int32_t ret_val; ++ uint16_t pcix_cmd_word; ++ uint16_t pcix_stat_hi_word; ++ uint16_t cmd_mmrbc; ++ uint16_t stat_mmrbc; ++ e1000_bus_type bus_type = e1000_bus_type_unknown; ++ ++ DEBUGFUNC("e1000_init_hw"); ++ ++ /* Set the media type and TBI compatibility */ ++ e1000_set_media_type(hw); ++ ++ /* Disabling VLAN filtering. */ ++ DEBUGOUT("Initializing the IEEE VLAN\n"); ++ E1000_WRITE_REG(hw, VET, 0); ++ ++ e1000_clear_vfta(hw); ++ ++ /* For 82542 (rev 2.0), disable MWI and put the receiver into reset */ ++ if(hw->mac_type == e1000_82542_rev2_0) { ++ DEBUGOUT("Disabling MWI on 82542 rev 2.0\n"); ++ e1000_pci_clear_mwi(hw); ++ E1000_WRITE_REG(hw, RCTL, E1000_RCTL_RST); ++ E1000_WRITE_FLUSH(hw); ++ mdelay(5); ++ } ++ ++ /* Setup the receive address. This involves initializing all of the Receive ++ * Address Registers (RARs 0 - 15). ++ */ ++ e1000_init_rx_addrs(hw); ++ ++ /* For 82542 (rev 2.0), take the receiver out of reset and enable MWI */ ++ if(hw->mac_type == e1000_82542_rev2_0) { ++ E1000_WRITE_REG(hw, RCTL, 0); ++ E1000_WRITE_FLUSH(hw); ++ mdelay(1); ++#ifdef LINUX_DRIVER ++ if(hw->pci_cmd_word & CMD_MEM_WRT_INVALIDATE) ++#endif ++ e1000_pci_set_mwi(hw); ++ } ++ ++ /* Zero out the Multicast HASH table */ ++ DEBUGOUT("Zeroing the MTA\n"); ++ for(i = 0; i < E1000_MC_TBL_SIZE; i++) ++ E1000_WRITE_REG_ARRAY(hw, MTA, i, 0); ++ ++#if 0 ++ /* Set the PCI priority bit correctly in the CTRL register. This ++ * determines if the adapter gives priority to receives, or if it ++ * gives equal priority to transmits and receives. ++ */ ++ if(hw->dma_fairness) { ++ ctrl = E1000_READ_REG(hw, CTRL); ++ E1000_WRITE_REG(hw, CTRL, ctrl | E1000_CTRL_PRIOR); ++ } ++#endif ++ ++ switch(hw->mac_type) { ++ case e1000_82545_rev_3: ++ case e1000_82546_rev_3: ++ break; ++ default: ++ if (hw->mac_type >= e1000_82543) { ++ /* See e1000_get_bus_info() of the Linux driver */ ++ status = E1000_READ_REG(hw, STATUS); ++ bus_type = (status & E1000_STATUS_PCIX_MODE) ? ++ e1000_bus_type_pcix : e1000_bus_type_pci; ++ } ++ ++ /* Workaround for PCI-X problem when BIOS sets MMRBC incorrectly. */ ++ if(bus_type == e1000_bus_type_pcix) { ++ pci_read_config_word(hw->pdev, PCIX_COMMAND_REGISTER, &pcix_cmd_word); ++ pci_read_config_word(hw->pdev, PCIX_STATUS_REGISTER_HI, &pcix_stat_hi_word); ++ cmd_mmrbc = (pcix_cmd_word & PCIX_COMMAND_MMRBC_MASK) >> ++ PCIX_COMMAND_MMRBC_SHIFT; ++ stat_mmrbc = (pcix_stat_hi_word & PCIX_STATUS_HI_MMRBC_MASK) >> ++ PCIX_STATUS_HI_MMRBC_SHIFT; ++ if(stat_mmrbc == PCIX_STATUS_HI_MMRBC_4K) ++ stat_mmrbc = PCIX_STATUS_HI_MMRBC_2K; ++ if(cmd_mmrbc > stat_mmrbc) { ++ pcix_cmd_word &= ~PCIX_COMMAND_MMRBC_MASK; ++ pcix_cmd_word |= stat_mmrbc << PCIX_COMMAND_MMRBC_SHIFT; ++ pci_write_config_word(hw->pdev, PCIX_COMMAND_REGISTER, pcix_cmd_word); ++ } ++ } ++ break; ++ } ++ ++ /* Call a subroutine to configure the link and setup flow control. */ ++ ret_val = e1000_setup_link(hw); ++ ++ /* Set the transmit descriptor write-back policy */ ++ if(hw->mac_type > e1000_82544) { ++ ctrl = E1000_READ_REG(hw, TXDCTL); ++ ctrl = (ctrl & ~E1000_TXDCTL_WTHRESH) | E1000_TXDCTL_FULL_TX_DESC_WB; ++ E1000_WRITE_REG(hw, TXDCTL, ctrl); ++ } ++ ++#if 0 ++ /* Clear all of the statistics registers (clear on read). It is ++ * important that we do this after we have tried to establish link ++ * because the symbol error count will increment wildly if there ++ * is no link. ++ */ ++ e1000_clear_hw_cntrs(hw); ++#endif ++ ++ return ret_val; ++} ++ ++/****************************************************************************** ++ * Adjust SERDES output amplitude based on EEPROM setting. ++ * ++ * hw - Struct containing variables accessed by shared code. ++ *****************************************************************************/ ++static int32_t ++e1000_adjust_serdes_amplitude(struct e1000_hw *hw) ++{ ++ uint16_t eeprom_data; ++ int32_t ret_val; ++ ++ DEBUGFUNC("e1000_adjust_serdes_amplitude"); ++ ++ if(hw->media_type != e1000_media_type_internal_serdes) ++ return E1000_SUCCESS; ++ ++ switch(hw->mac_type) { ++ case e1000_82545_rev_3: ++ case e1000_82546_rev_3: ++ break; ++ default: ++ return E1000_SUCCESS; ++ } ++ ++ if ((ret_val = e1000_read_eeprom(hw, EEPROM_SERDES_AMPLITUDE, 1, ++ &eeprom_data))) { ++ return ret_val; ++ } ++ ++ if(eeprom_data != EEPROM_RESERVED_WORD) { ++ /* Adjust SERDES output amplitude only. */ ++ eeprom_data &= EEPROM_SERDES_AMPLITUDE_MASK; ++ if((ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_EXT_CTRL, ++ eeprom_data))) ++ return ret_val; ++ } ++ ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++ * Configures flow control and link settings. ++ * ++ * hw - Struct containing variables accessed by shared code ++ * ++ * Determines which flow control settings to use. Calls the apropriate media- ++ * specific link configuration function. Configures the flow control settings. ++ * Assuming the adapter has a valid link partner, a valid link should be ++ * established. Assumes the hardware has previously been reset and the ++ * transmitter and receiver are not enabled. ++ *****************************************************************************/ ++static int ++e1000_setup_link(struct e1000_hw *hw) ++{ ++ uint32_t ctrl_ext; ++ int32_t ret_val; ++ uint16_t eeprom_data; ++ ++ DEBUGFUNC("e1000_setup_link"); ++ ++ /* Read and store word 0x0F of the EEPROM. This word contains bits ++ * that determine the hardware's default PAUSE (flow control) mode, ++ * a bit that determines whether the HW defaults to enabling or ++ * disabling auto-negotiation, and the direction of the ++ * SW defined pins. If there is no SW over-ride of the flow ++ * control setting, then the variable hw->fc will ++ * be initialized based on a value in the EEPROM. ++ */ ++ if(e1000_read_eeprom(hw, EEPROM_INIT_CONTROL2_REG, 1, &eeprom_data) < 0) { ++ DEBUGOUT("EEPROM Read Error\n"); ++ return -E1000_ERR_EEPROM; ++ } ++ ++ if(hw->fc == e1000_fc_default) { ++ if((eeprom_data & EEPROM_WORD0F_PAUSE_MASK) == 0) ++ hw->fc = e1000_fc_none; ++ else if((eeprom_data & EEPROM_WORD0F_PAUSE_MASK) == ++ EEPROM_WORD0F_ASM_DIR) ++ hw->fc = e1000_fc_tx_pause; ++ else ++ hw->fc = e1000_fc_full; ++ } ++ ++ /* We want to save off the original Flow Control configuration just ++ * in case we get disconnected and then reconnected into a different ++ * hub or switch with different Flow Control capabilities. ++ */ ++ if(hw->mac_type == e1000_82542_rev2_0) ++ hw->fc &= (~e1000_fc_tx_pause); ++ ++#if 0 ++ /* See e1000_sw_init() of the Linux driver */ ++ if((hw->mac_type < e1000_82543) && (hw->report_tx_early == 1)) ++#else ++ if((hw->mac_type < e1000_82543) && (hw->mac_type >= e1000_82543)) ++#endif ++ hw->fc &= (~e1000_fc_rx_pause); ++ ++#if 0 ++ hw->original_fc = hw->fc; ++#endif ++ ++ DEBUGOUT1("After fix-ups FlowControl is now = %x\n", hw->fc); ++ ++ /* Take the 4 bits from EEPROM word 0x0F that determine the initial ++ * polarity value for the SW controlled pins, and setup the ++ * Extended Device Control reg with that info. ++ * This is needed because one of the SW controlled pins is used for ++ * signal detection. So this should be done before e1000_setup_pcs_link() ++ * or e1000_phy_setup() is called. ++ */ ++ if(hw->mac_type == e1000_82543) { ++ ctrl_ext = ((eeprom_data & EEPROM_WORD0F_SWPDIO_EXT) << ++ SWDPIO__EXT_SHIFT); ++ E1000_WRITE_REG(hw, CTRL_EXT, ctrl_ext); ++ } ++ ++ /* Call the necessary subroutine to configure the link. */ ++ ret_val = (hw->media_type == e1000_media_type_copper) ? ++ e1000_setup_copper_link(hw) : ++ e1000_setup_fiber_serdes_link(hw); ++ if (ret_val < 0) { ++ return ret_val; ++ } ++ ++ /* Initialize the flow control address, type, and PAUSE timer ++ * registers to their default values. This is done even if flow ++ * control is disabled, because it does not hurt anything to ++ * initialize these registers. ++ */ ++ DEBUGOUT("Initializing the Flow Control address, type and timer regs\n"); ++ ++ E1000_WRITE_REG(hw, FCAL, FLOW_CONTROL_ADDRESS_LOW); ++ E1000_WRITE_REG(hw, FCAH, FLOW_CONTROL_ADDRESS_HIGH); ++ E1000_WRITE_REG(hw, FCT, FLOW_CONTROL_TYPE); ++#if 0 ++ E1000_WRITE_REG(hw, FCTTV, hw->fc_pause_time); ++#else ++ E1000_WRITE_REG(hw, FCTTV, FC_DEFAULT_TX_TIMER); ++#endif ++ ++ /* Set the flow control receive threshold registers. Normally, ++ * these registers will be set to a default threshold that may be ++ * adjusted later by the driver's runtime code. However, if the ++ * ability to transmit pause frames in not enabled, then these ++ * registers will be set to 0. ++ */ ++ if(!(hw->fc & e1000_fc_tx_pause)) { ++ E1000_WRITE_REG(hw, FCRTL, 0); ++ E1000_WRITE_REG(hw, FCRTH, 0); ++ } else { ++ /* We need to set up the Receive Threshold high and low water marks ++ * as well as (optionally) enabling the transmission of XON frames. ++ */ ++#if 0 ++ if(hw->fc_send_xon) { ++ E1000_WRITE_REG(hw, FCRTL, (hw->fc_low_water | E1000_FCRTL_XONE)); ++ E1000_WRITE_REG(hw, FCRTH, hw->fc_high_water); ++ } else { ++ E1000_WRITE_REG(hw, FCRTL, hw->fc_low_water); ++ E1000_WRITE_REG(hw, FCRTH, hw->fc_high_water); ++ } ++#else ++ E1000_WRITE_REG(hw, FCRTL, (FC_DEFAULT_LO_THRESH | E1000_FCRTL_XONE)); ++ E1000_WRITE_REG(hw, FCRTH, FC_DEFAULT_HI_THRESH); ++#endif ++ } ++ return ret_val; ++} ++ ++/****************************************************************************** ++ * Sets up link for a fiber based or serdes based adapter ++ * ++ * hw - Struct containing variables accessed by shared code ++ * ++ * Manipulates Physical Coding Sublayer functions in order to configure ++ * link. Assumes the hardware has been previously reset and the transmitter ++ * and receiver are not enabled. ++ *****************************************************************************/ ++static int ++e1000_setup_fiber_serdes_link(struct e1000_hw *hw) ++{ ++ uint32_t ctrl; ++ uint32_t status; ++ uint32_t txcw = 0; ++ uint32_t i; ++ uint32_t signal = 0; ++ int32_t ret_val; ++ ++ DEBUGFUNC("e1000_setup_fiber_serdes_link"); ++ ++ /* On adapters with a MAC newer than 82544, SW Defineable pin 1 will be ++ * set when the optics detect a signal. On older adapters, it will be ++ * cleared when there is a signal. This applies to fiber media only. ++ * If we're on serdes media, adjust the output amplitude to value set in ++ * the EEPROM. ++ */ ++ ctrl = E1000_READ_REG(hw, CTRL); ++ if(hw->media_type == e1000_media_type_fiber) ++ signal = (hw->mac_type > e1000_82544) ? E1000_CTRL_SWDPIN1 : 0; ++ ++ if((ret_val = e1000_adjust_serdes_amplitude(hw))) ++ return ret_val; ++ ++ /* Take the link out of reset */ ++ ctrl &= ~(E1000_CTRL_LRST); ++ ++#if 0 ++ /* Adjust VCO speed to improve BER performance */ ++ if((ret_val = e1000_set_vco_speed(hw))) ++ return ret_val; ++#endif ++ ++ e1000_config_collision_dist(hw); ++ ++ /* Check for a software override of the flow control settings, and setup ++ * the device accordingly. If auto-negotiation is enabled, then software ++ * will have to set the "PAUSE" bits to the correct value in the Tranmsit ++ * Config Word Register (TXCW) and re-start auto-negotiation. However, if ++ * auto-negotiation is disabled, then software will have to manually ++ * configure the two flow control enable bits in the CTRL register. ++ * ++ * The possible values of the "fc" parameter are: ++ * 0: Flow control is completely disabled ++ * 1: Rx flow control is enabled (we can receive pause frames, but ++ * not send pause frames). ++ * 2: Tx flow control is enabled (we can send pause frames but we do ++ * not support receiving pause frames). ++ * 3: Both Rx and TX flow control (symmetric) are enabled. ++ */ ++ switch (hw->fc) { ++ case e1000_fc_none: ++ /* Flow control is completely disabled by a software over-ride. */ ++ txcw = (E1000_TXCW_ANE | E1000_TXCW_FD); ++ break; ++ case e1000_fc_rx_pause: ++ /* RX Flow control is enabled and TX Flow control is disabled by a ++ * software over-ride. Since there really isn't a way to advertise ++ * that we are capable of RX Pause ONLY, we will advertise that we ++ * support both symmetric and asymmetric RX PAUSE. Later, we will ++ * disable the adapter's ability to send PAUSE frames. ++ */ ++ txcw = (E1000_TXCW_ANE | E1000_TXCW_FD | E1000_TXCW_PAUSE_MASK); ++ break; ++ case e1000_fc_tx_pause: ++ /* TX Flow control is enabled, and RX Flow control is disabled, by a ++ * software over-ride. ++ */ ++ txcw = (E1000_TXCW_ANE | E1000_TXCW_FD | E1000_TXCW_ASM_DIR); ++ break; ++ case e1000_fc_full: ++ /* Flow control (both RX and TX) is enabled by a software over-ride. */ ++ txcw = (E1000_TXCW_ANE | E1000_TXCW_FD | E1000_TXCW_PAUSE_MASK); ++ break; ++ default: ++ DEBUGOUT("Flow control param set incorrectly\n"); ++ return -E1000_ERR_CONFIG; ++ break; ++ } ++ ++ /* Since auto-negotiation is enabled, take the link out of reset (the link ++ * will be in reset, because we previously reset the chip). This will ++ * restart auto-negotiation. If auto-neogtiation is successful then the ++ * link-up status bit will be set and the flow control enable bits (RFCE ++ * and TFCE) will be set according to their negotiated value. ++ */ ++ DEBUGOUT("Auto-negotiation enabled\n"); ++ ++ E1000_WRITE_REG(hw, TXCW, txcw); ++ E1000_WRITE_REG(hw, CTRL, ctrl); ++ E1000_WRITE_FLUSH(hw); ++ ++ hw->txcw = txcw; ++ mdelay(1); ++ ++ /* If we have a signal (the cable is plugged in) then poll for a "Link-Up" ++ * indication in the Device Status Register. Time-out if a link isn't ++ * seen in 500 milliseconds seconds (Auto-negotiation should complete in ++ * less than 500 milliseconds even if the other end is doing it in SW). ++ * For internal serdes, we just assume a signal is present, then poll. ++ */ ++ if(hw->media_type == e1000_media_type_internal_serdes || ++ (E1000_READ_REG(hw, CTRL) & E1000_CTRL_SWDPIN1) == signal) { ++ DEBUGOUT("Looking for Link\n"); ++ for(i = 0; i < (LINK_UP_TIMEOUT / 10); i++) { ++ mdelay(10); ++ status = E1000_READ_REG(hw, STATUS); ++ if(status & E1000_STATUS_LU) break; ++ } ++ if(i == (LINK_UP_TIMEOUT / 10)) { ++ DEBUGOUT("Never got a valid link from auto-neg!!!\n"); ++ hw->autoneg_failed = 1; ++ /* AutoNeg failed to achieve a link, so we'll call ++ * e1000_check_for_link. This routine will force the link up if ++ * we detect a signal. This will allow us to communicate with ++ * non-autonegotiating link partners. ++ */ ++ if((ret_val = e1000_check_for_link(hw))) { ++ DEBUGOUT("Error while checking for link\n"); ++ return ret_val; ++ } ++ hw->autoneg_failed = 0; ++ } else { ++ hw->autoneg_failed = 0; ++ DEBUGOUT("Valid Link Found\n"); ++ } ++ } else { ++ DEBUGOUT("No Signal Detected\n"); ++ } ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++* Detects which PHY is present and the speed and duplex ++* ++* hw - Struct containing variables accessed by shared code ++******************************************************************************/ ++static int ++e1000_setup_copper_link(struct e1000_hw *hw) ++{ ++ uint32_t ctrl; ++ int32_t ret_val; ++ uint16_t i; ++ uint16_t phy_data; ++ ++ DEBUGFUNC("e1000_setup_copper_link"); ++ ++ ctrl = E1000_READ_REG(hw, CTRL); ++ /* With 82543, we need to force speed and duplex on the MAC equal to what ++ * the PHY speed and duplex configuration is. In addition, we need to ++ * perform a hardware reset on the PHY to take it out of reset. ++ */ ++ if(hw->mac_type > e1000_82543) { ++ ctrl |= E1000_CTRL_SLU; ++ ctrl &= ~(E1000_CTRL_FRCSPD | E1000_CTRL_FRCDPX); ++ E1000_WRITE_REG(hw, CTRL, ctrl); ++ } else { ++ ctrl |= (E1000_CTRL_FRCSPD | E1000_CTRL_FRCDPX | E1000_CTRL_SLU); ++ E1000_WRITE_REG(hw, CTRL, ctrl); ++ e1000_phy_hw_reset(hw); ++ } ++ ++ /* Make sure we have a valid PHY */ ++ if((ret_val = e1000_detect_gig_phy(hw))) { ++ DEBUGOUT("Error, did not detect valid phy.\n"); ++ return ret_val; ++ } ++ DEBUGOUT1("Phy ID = %x \n", hw->phy_id); ++ ++ if(hw->mac_type <= e1000_82543 || ++ hw->mac_type == e1000_82541 || hw->mac_type == e1000_82547 || ++#if 0 ++ hw->mac_type == e1000_82541_rev_2 || hw->mac_type == e1000_82547_rev_2) ++ hw->phy_reset_disable = FALSE; ++ ++ if(!hw->phy_reset_disable) { ++#else ++ hw->mac_type == e1000_82541_rev_2 || hw->mac_type == e1000_82547_rev_2) { ++#endif ++ if (hw->phy_type == e1000_phy_igp) { ++ ++ if((ret_val = e1000_phy_reset(hw))) { ++ DEBUGOUT("Error Resetting the PHY\n"); ++ return ret_val; ++ } ++ ++ /* Wait 10ms for MAC to configure PHY from eeprom settings */ ++ mdelay(15); ++ ++#if 0 ++ /* disable lplu d3 during driver init */ ++ if((ret_val = e1000_set_d3_lplu_state(hw, FALSE))) { ++ DEBUGOUT("Error Disabling LPLU D3\n"); ++ return ret_val; ++ } ++ ++ /* Configure mdi-mdix settings */ ++ if((ret_val = e1000_read_phy_reg(hw, IGP01E1000_PHY_PORT_CTRL, ++ &phy_data))) ++ return ret_val; ++ ++ if((hw->mac_type == e1000_82541) || (hw->mac_type == e1000_82547)) { ++ hw->dsp_config_state = e1000_dsp_config_disabled; ++ /* Force MDI for IGP B-0 PHY */ ++ phy_data &= ~(IGP01E1000_PSCR_AUTO_MDIX | ++ IGP01E1000_PSCR_FORCE_MDI_MDIX); ++ hw->mdix = 1; ++ ++ } else { ++ hw->dsp_config_state = e1000_dsp_config_enabled; ++ phy_data &= ~IGP01E1000_PSCR_AUTO_MDIX; ++ ++ switch (hw->mdix) { ++ case 1: ++ phy_data &= ~IGP01E1000_PSCR_FORCE_MDI_MDIX; ++ break; ++ case 2: ++ phy_data |= IGP01E1000_PSCR_FORCE_MDI_MDIX; ++ break; ++ case 0: ++ default: ++ phy_data |= IGP01E1000_PSCR_AUTO_MDIX; ++ break; ++ } ++ } ++ if((ret_val = e1000_write_phy_reg(hw, IGP01E1000_PHY_PORT_CTRL, ++ phy_data))) ++ return ret_val; ++ ++ /* set auto-master slave resolution settings */ ++ e1000_ms_type phy_ms_setting = hw->master_slave; ++ ++ if(hw->ffe_config_state == e1000_ffe_config_active) ++ hw->ffe_config_state = e1000_ffe_config_enabled; ++ ++ if(hw->dsp_config_state == e1000_dsp_config_activated) ++ hw->dsp_config_state = e1000_dsp_config_enabled; ++#endif ++ ++ /* when autonegotiation advertisment is only 1000Mbps then we ++ * should disable SmartSpeed and enable Auto MasterSlave ++ * resolution as hardware default. */ ++ if(hw->autoneg_advertised == ADVERTISE_1000_FULL) { ++ /* Disable SmartSpeed */ ++ if((ret_val = e1000_read_phy_reg(hw, ++ IGP01E1000_PHY_PORT_CONFIG, ++ &phy_data))) ++ return ret_val; ++ phy_data &= ~IGP01E1000_PSCFR_SMART_SPEED; ++ if((ret_val = e1000_write_phy_reg(hw, ++ IGP01E1000_PHY_PORT_CONFIG, ++ phy_data))) ++ return ret_val; ++ /* Set auto Master/Slave resolution process */ ++ if((ret_val = e1000_read_phy_reg(hw, PHY_1000T_CTRL, ++ &phy_data))) ++ return ret_val; ++ phy_data &= ~CR_1000T_MS_ENABLE; ++ if((ret_val = e1000_write_phy_reg(hw, PHY_1000T_CTRL, ++ phy_data))) ++ return ret_val; ++ } ++ ++ if((ret_val = e1000_read_phy_reg(hw, PHY_1000T_CTRL, ++ &phy_data))) ++ return ret_val; ++ ++#if 0 ++ /* load defaults for future use */ ++ hw->original_master_slave = (phy_data & CR_1000T_MS_ENABLE) ? ++ ((phy_data & CR_1000T_MS_VALUE) ? ++ e1000_ms_force_master : ++ e1000_ms_force_slave) : ++ e1000_ms_auto; ++ ++ switch (phy_ms_setting) { ++ case e1000_ms_force_master: ++ phy_data |= (CR_1000T_MS_ENABLE | CR_1000T_MS_VALUE); ++ break; ++ case e1000_ms_force_slave: ++ phy_data |= CR_1000T_MS_ENABLE; ++ phy_data &= ~(CR_1000T_MS_VALUE); ++ break; ++ case e1000_ms_auto: ++ phy_data &= ~CR_1000T_MS_ENABLE; ++ default: ++ break; ++ } ++#endif ++ ++ if((ret_val = e1000_write_phy_reg(hw, PHY_1000T_CTRL, ++ phy_data))) ++ return ret_val; ++ } else { ++ /* Enable CRS on TX. This must be set for half-duplex operation. */ ++ if((ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, ++ &phy_data))) ++ return ret_val; ++ ++ phy_data |= M88E1000_PSCR_ASSERT_CRS_ON_TX; ++ ++ /* Options: ++ * MDI/MDI-X = 0 (default) ++ * 0 - Auto for all speeds ++ * 1 - MDI mode ++ * 2 - MDI-X mode ++ * 3 - Auto for 1000Base-T only (MDI-X for 10/100Base-T modes) ++ */ ++#if 0 ++ phy_data &= ~M88E1000_PSCR_AUTO_X_MODE; ++ ++ switch (hw->mdix) { ++ case 1: ++ phy_data |= M88E1000_PSCR_MDI_MANUAL_MODE; ++ break; ++ case 2: ++ phy_data |= M88E1000_PSCR_MDIX_MANUAL_MODE; ++ break; ++ case 3: ++ phy_data |= M88E1000_PSCR_AUTO_X_1000T; ++ break; ++ case 0: ++ default: ++#endif ++ phy_data |= M88E1000_PSCR_AUTO_X_MODE; ++#if 0 ++ break; ++ } ++#endif ++ ++ /* Options: ++ * disable_polarity_correction = 0 (default) ++ * Automatic Correction for Reversed Cable Polarity ++ * 0 - Disabled ++ * 1 - Enabled ++ */ ++ phy_data &= ~M88E1000_PSCR_POLARITY_REVERSAL; ++ if((ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, ++ phy_data))) ++ return ret_val; ++ ++ /* Force TX_CLK in the Extended PHY Specific Control Register ++ * to 25MHz clock. ++ */ ++ if((ret_val = e1000_read_phy_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, ++ &phy_data))) ++ return ret_val; ++ ++ phy_data |= M88E1000_EPSCR_TX_CLK_25; ++ ++#ifdef LINUX_DRIVER ++ if (hw->phy_revision < M88E1011_I_REV_4) { ++#endif ++ /* Configure Master and Slave downshift values */ ++ phy_data &= ~(M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK | ++ M88E1000_EPSCR_SLAVE_DOWNSHIFT_MASK); ++ phy_data |= (M88E1000_EPSCR_MASTER_DOWNSHIFT_1X | ++ M88E1000_EPSCR_SLAVE_DOWNSHIFT_1X); ++ if((ret_val = e1000_write_phy_reg(hw, ++ M88E1000_EXT_PHY_SPEC_CTRL, ++ phy_data))) ++ return ret_val; ++ } ++ ++ /* SW Reset the PHY so all changes take effect */ ++ if((ret_val = e1000_phy_reset(hw))) { ++ DEBUGOUT("Error Resetting the PHY\n"); ++ return ret_val; ++#ifdef LINUX_DRIVER ++ } ++#endif ++ } ++ ++ /* Options: ++ * autoneg = 1 (default) ++ * PHY will advertise value(s) parsed from ++ * autoneg_advertised and fc ++ * autoneg = 0 ++ * PHY will be set to 10H, 10F, 100H, or 100F ++ * depending on value parsed from forced_speed_duplex. ++ */ ++ ++ /* Is autoneg enabled? This is enabled by default or by software ++ * override. If so, call e1000_phy_setup_autoneg routine to parse the ++ * autoneg_advertised and fc options. If autoneg is NOT enabled, then ++ * the user should have provided a speed/duplex override. If so, then ++ * call e1000_phy_force_speed_duplex to parse and set this up. ++ */ ++ /* Perform some bounds checking on the hw->autoneg_advertised ++ * parameter. If this variable is zero, then set it to the default. ++ */ ++ hw->autoneg_advertised &= AUTONEG_ADVERTISE_SPEED_DEFAULT; ++ ++ /* If autoneg_advertised is zero, we assume it was not defaulted ++ * by the calling code so we set to advertise full capability. ++ */ ++ if(hw->autoneg_advertised == 0) ++ hw->autoneg_advertised = AUTONEG_ADVERTISE_SPEED_DEFAULT; ++ ++ DEBUGOUT("Reconfiguring auto-neg advertisement params\n"); ++ if((ret_val = e1000_phy_setup_autoneg(hw))) { ++ DEBUGOUT("Error Setting up Auto-Negotiation\n"); ++ return ret_val; ++ } ++ DEBUGOUT("Restarting Auto-Neg\n"); ++ ++ /* Restart auto-negotiation by setting the Auto Neg Enable bit and ++ * the Auto Neg Restart bit in the PHY control register. ++ */ ++ if((ret_val = e1000_read_phy_reg(hw, PHY_CTRL, &phy_data))) ++ return ret_val; ++ ++ phy_data |= (MII_CR_AUTO_NEG_EN | MII_CR_RESTART_AUTO_NEG); ++ if((ret_val = e1000_write_phy_reg(hw, PHY_CTRL, phy_data))) ++ return ret_val; ++ ++#if 0 ++ /* Does the user want to wait for Auto-Neg to complete here, or ++ * check at a later time (for example, callback routine). ++ */ ++ if(hw->wait_autoneg_complete) { ++ if((ret_val = e1000_wait_autoneg(hw))) { ++ DEBUGOUT("Error while waiting for autoneg to complete\n"); ++ return ret_val; ++ } ++ } ++#else ++ /* If we do not wait for autonegotiation to complete I ++ * do not see a valid link status. ++ */ ++ if((ret_val = e1000_wait_autoneg(hw))) { ++ DEBUGOUT("Error while waiting for autoneg to complete\n"); ++ return ret_val; ++ } ++#endif ++ } /* !hw->phy_reset_disable */ ++ ++ /* Check link status. Wait up to 100 microseconds for link to become ++ * valid. ++ */ ++ for(i = 0; i < 10; i++) { ++ if((ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &phy_data))) ++ return ret_val; ++ if((ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &phy_data))) ++ return ret_val; ++ ++ if(phy_data & MII_SR_LINK_STATUS) { ++ /* We have link, so we need to finish the config process: ++ * 1) Set up the MAC to the current PHY speed/duplex ++ * if we are on 82543. If we ++ * are on newer silicon, we only need to configure ++ * collision distance in the Transmit Control Register. ++ * 2) Set up flow control on the MAC to that established with ++ * the link partner. ++ */ ++ if(hw->mac_type >= e1000_82544) { ++ e1000_config_collision_dist(hw); ++ } else { ++ if((ret_val = e1000_config_mac_to_phy(hw))) { ++ DEBUGOUT("Error configuring MAC to PHY settings\n"); ++ return ret_val; ++ } ++ } ++ if((ret_val = e1000_config_fc_after_link_up(hw))) { ++ DEBUGOUT("Error Configuring Flow Control\n"); ++ return ret_val; ++ } ++#if 0 ++ if(hw->phy_type == e1000_phy_igp) { ++ if((ret_val = e1000_config_dsp_after_link_change(hw, TRUE))) { ++ DEBUGOUT("Error Configuring DSP after link up\n"); ++ return ret_val; ++ } ++ } ++#endif ++ DEBUGOUT("Valid link established!!!\n"); ++ return E1000_SUCCESS; ++ } ++ udelay(10); ++ } ++ ++ DEBUGOUT("Unable to establish link!!!\n"); ++ return -E1000_ERR_NOLINK; ++} ++ ++/****************************************************************************** ++* Configures PHY autoneg and flow control advertisement settings ++* ++* hw - Struct containing variables accessed by shared code ++******************************************************************************/ ++static int ++e1000_phy_setup_autoneg(struct e1000_hw *hw) ++{ ++ int32_t ret_val; ++ uint16_t mii_autoneg_adv_reg; ++ uint16_t mii_1000t_ctrl_reg; ++ ++ DEBUGFUNC("e1000_phy_setup_autoneg"); ++ ++ /* Read the MII Auto-Neg Advertisement Register (Address 4). */ ++ if((ret_val = e1000_read_phy_reg(hw, PHY_AUTONEG_ADV, ++ &mii_autoneg_adv_reg))) ++ return ret_val; ++ ++ /* Read the MII 1000Base-T Control Register (Address 9). */ ++ if((ret_val = e1000_read_phy_reg(hw, PHY_1000T_CTRL, &mii_1000t_ctrl_reg))) ++ return ret_val; ++ ++ /* Need to parse both autoneg_advertised and fc and set up ++ * the appropriate PHY registers. First we will parse for ++ * autoneg_advertised software override. Since we can advertise ++ * a plethora of combinations, we need to check each bit ++ * individually. ++ */ ++ ++ /* First we clear all the 10/100 mb speed bits in the Auto-Neg ++ * Advertisement Register (Address 4) and the 1000 mb speed bits in ++ * the 1000Base-T Control Register (Address 9). ++ */ ++ mii_autoneg_adv_reg &= ~REG4_SPEED_MASK; ++ mii_1000t_ctrl_reg &= ~REG9_SPEED_MASK; ++ ++ DEBUGOUT1("autoneg_advertised %x\n", hw->autoneg_advertised); ++ ++ /* Do we want to advertise 10 Mb Half Duplex? */ ++ if(hw->autoneg_advertised & ADVERTISE_10_HALF) { ++ DEBUGOUT("Advertise 10mb Half duplex\n"); ++ mii_autoneg_adv_reg |= NWAY_AR_10T_HD_CAPS; ++ } ++ ++ /* Do we want to advertise 10 Mb Full Duplex? */ ++ if(hw->autoneg_advertised & ADVERTISE_10_FULL) { ++ DEBUGOUT("Advertise 10mb Full duplex\n"); ++ mii_autoneg_adv_reg |= NWAY_AR_10T_FD_CAPS; ++ } ++ ++ /* Do we want to advertise 100 Mb Half Duplex? */ ++ if(hw->autoneg_advertised & ADVERTISE_100_HALF) { ++ DEBUGOUT("Advertise 100mb Half duplex\n"); ++ mii_autoneg_adv_reg |= NWAY_AR_100TX_HD_CAPS; ++ } ++ ++ /* Do we want to advertise 100 Mb Full Duplex? */ ++ if(hw->autoneg_advertised & ADVERTISE_100_FULL) { ++ DEBUGOUT("Advertise 100mb Full duplex\n"); ++ mii_autoneg_adv_reg |= NWAY_AR_100TX_FD_CAPS; ++ } ++ ++ /* We do not allow the Phy to advertise 1000 Mb Half Duplex */ ++ if(hw->autoneg_advertised & ADVERTISE_1000_HALF) { ++ DEBUGOUT("Advertise 1000mb Half duplex requested, request denied!\n"); ++ } ++ ++ /* Do we want to advertise 1000 Mb Full Duplex? */ ++ if(hw->autoneg_advertised & ADVERTISE_1000_FULL) { ++ DEBUGOUT("Advertise 1000mb Full duplex\n"); ++ mii_1000t_ctrl_reg |= CR_1000T_FD_CAPS; ++ } ++ ++ /* Check for a software override of the flow control settings, and ++ * setup the PHY advertisement registers accordingly. If ++ * auto-negotiation is enabled, then software will have to set the ++ * "PAUSE" bits to the correct value in the Auto-Negotiation ++ * Advertisement Register (PHY_AUTONEG_ADV) and re-start auto-negotiation. ++ * ++ * The possible values of the "fc" parameter are: ++ * 0: Flow control is completely disabled ++ * 1: Rx flow control is enabled (we can receive pause frames ++ * but not send pause frames). ++ * 2: Tx flow control is enabled (we can send pause frames ++ * but we do not support receiving pause frames). ++ * 3: Both Rx and TX flow control (symmetric) are enabled. ++ * other: No software override. The flow control configuration ++ * in the EEPROM is used. ++ */ ++ switch (hw->fc) { ++ case e1000_fc_none: /* 0 */ ++ /* Flow control (RX & TX) is completely disabled by a ++ * software over-ride. ++ */ ++ mii_autoneg_adv_reg &= ~(NWAY_AR_ASM_DIR | NWAY_AR_PAUSE); ++ break; ++ case e1000_fc_rx_pause: /* 1 */ ++ /* RX Flow control is enabled, and TX Flow control is ++ * disabled, by a software over-ride. ++ */ ++ /* Since there really isn't a way to advertise that we are ++ * capable of RX Pause ONLY, we will advertise that we ++ * support both symmetric and asymmetric RX PAUSE. Later ++ * (in e1000_config_fc_after_link_up) we will disable the ++ *hw's ability to send PAUSE frames. ++ */ ++ mii_autoneg_adv_reg |= (NWAY_AR_ASM_DIR | NWAY_AR_PAUSE); ++ break; ++ case e1000_fc_tx_pause: /* 2 */ ++ /* TX Flow control is enabled, and RX Flow control is ++ * disabled, by a software over-ride. ++ */ ++ mii_autoneg_adv_reg |= NWAY_AR_ASM_DIR; ++ mii_autoneg_adv_reg &= ~NWAY_AR_PAUSE; ++ break; ++ case e1000_fc_full: /* 3 */ ++ /* Flow control (both RX and TX) is enabled by a software ++ * over-ride. ++ */ ++ mii_autoneg_adv_reg |= (NWAY_AR_ASM_DIR | NWAY_AR_PAUSE); ++ break; ++ default: ++ DEBUGOUT("Flow control param set incorrectly\n"); ++ return -E1000_ERR_CONFIG; ++ } ++ ++ if((ret_val = e1000_write_phy_reg(hw, PHY_AUTONEG_ADV, ++ mii_autoneg_adv_reg))) ++ return ret_val; ++ ++ DEBUGOUT1("Auto-Neg Advertising %x\n", mii_autoneg_adv_reg); ++ ++ if((ret_val = e1000_write_phy_reg(hw, PHY_1000T_CTRL, mii_1000t_ctrl_reg))) ++ return ret_val; ++ ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++* Sets the collision distance in the Transmit Control register ++* ++* hw - Struct containing variables accessed by shared code ++* ++* Link should have been established previously. Reads the speed and duplex ++* information from the Device Status register. ++******************************************************************************/ ++static void ++e1000_config_collision_dist(struct e1000_hw *hw) ++{ ++ uint32_t tctl; ++ ++ tctl = E1000_READ_REG(hw, TCTL); ++ ++ tctl &= ~E1000_TCTL_COLD; ++ tctl |= E1000_COLLISION_DISTANCE << E1000_COLD_SHIFT; ++ ++ E1000_WRITE_REG(hw, TCTL, tctl); ++ E1000_WRITE_FLUSH(hw); ++} ++ ++/****************************************************************************** ++* Sets MAC speed and duplex settings to reflect the those in the PHY ++* ++* hw - Struct containing variables accessed by shared code ++* mii_reg - data to write to the MII control register ++* ++* The contents of the PHY register containing the needed information need to ++* be passed in. ++******************************************************************************/ ++static int ++e1000_config_mac_to_phy(struct e1000_hw *hw) ++{ ++ uint32_t ctrl; ++ int32_t ret_val; ++ uint16_t phy_data; ++ ++ DEBUGFUNC("e1000_config_mac_to_phy"); ++ ++ /* Read the Device Control Register and set the bits to Force Speed ++ * and Duplex. ++ */ ++ ctrl = E1000_READ_REG(hw, CTRL); ++ ctrl |= (E1000_CTRL_FRCSPD | E1000_CTRL_FRCDPX); ++ ctrl &= ~(E1000_CTRL_SPD_SEL | E1000_CTRL_ILOS); ++ ++ /* Set up duplex in the Device Control and Transmit Control ++ * registers depending on negotiated values. ++ */ ++ if (hw->phy_type == e1000_phy_igp) { ++ if((ret_val = e1000_read_phy_reg(hw, IGP01E1000_PHY_PORT_STATUS, ++ &phy_data))) ++ return ret_val; ++ ++ if(phy_data & IGP01E1000_PSSR_FULL_DUPLEX) ctrl |= E1000_CTRL_FD; ++ else ctrl &= ~E1000_CTRL_FD; ++ ++ e1000_config_collision_dist(hw); ++ ++ /* Set up speed in the Device Control register depending on ++ * negotiated values. ++ */ ++ if((phy_data & IGP01E1000_PSSR_SPEED_MASK) == ++ IGP01E1000_PSSR_SPEED_1000MBPS) ++ ctrl |= E1000_CTRL_SPD_1000; ++ else if((phy_data & IGP01E1000_PSSR_SPEED_MASK) == ++ IGP01E1000_PSSR_SPEED_100MBPS) ++ ctrl |= E1000_CTRL_SPD_100; ++ } else { ++ if((ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_STATUS, ++ &phy_data))) ++ return ret_val; ++ ++ if(phy_data & M88E1000_PSSR_DPLX) ctrl |= E1000_CTRL_FD; ++ else ctrl &= ~E1000_CTRL_FD; ++ ++ e1000_config_collision_dist(hw); ++ ++ /* Set up speed in the Device Control register depending on ++ * negotiated values. ++ */ ++ if((phy_data & M88E1000_PSSR_SPEED) == M88E1000_PSSR_1000MBS) ++ ctrl |= E1000_CTRL_SPD_1000; ++ else if((phy_data & M88E1000_PSSR_SPEED) == M88E1000_PSSR_100MBS) ++ ctrl |= E1000_CTRL_SPD_100; ++ } ++ /* Write the configured values back to the Device Control Reg. */ ++ E1000_WRITE_REG(hw, CTRL, ctrl); ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++ * Forces the MAC's flow control settings. ++ * ++ * hw - Struct containing variables accessed by shared code ++ * ++ * Sets the TFCE and RFCE bits in the device control register to reflect ++ * the adapter settings. TFCE and RFCE need to be explicitly set by ++ * software when a Copper PHY is used because autonegotiation is managed ++ * by the PHY rather than the MAC. Software must also configure these ++ * bits when link is forced on a fiber connection. ++ *****************************************************************************/ ++static int ++e1000_force_mac_fc(struct e1000_hw *hw) ++{ ++ uint32_t ctrl; ++ ++ DEBUGFUNC("e1000_force_mac_fc"); ++ ++ /* Get the current configuration of the Device Control Register */ ++ ctrl = E1000_READ_REG(hw, CTRL); ++ ++ /* Because we didn't get link via the internal auto-negotiation ++ * mechanism (we either forced link or we got link via PHY ++ * auto-neg), we have to manually enable/disable transmit an ++ * receive flow control. ++ * ++ * The "Case" statement below enables/disable flow control ++ * according to the "hw->fc" parameter. ++ * ++ * The possible values of the "fc" parameter are: ++ * 0: Flow control is completely disabled ++ * 1: Rx flow control is enabled (we can receive pause ++ * frames but not send pause frames). ++ * 2: Tx flow control is enabled (we can send pause frames ++ * frames but we do not receive pause frames). ++ * 3: Both Rx and TX flow control (symmetric) is enabled. ++ * other: No other values should be possible at this point. ++ */ ++ ++ switch (hw->fc) { ++ case e1000_fc_none: ++ ctrl &= (~(E1000_CTRL_TFCE | E1000_CTRL_RFCE)); ++ break; ++ case e1000_fc_rx_pause: ++ ctrl &= (~E1000_CTRL_TFCE); ++ ctrl |= E1000_CTRL_RFCE; ++ break; ++ case e1000_fc_tx_pause: ++ ctrl &= (~E1000_CTRL_RFCE); ++ ctrl |= E1000_CTRL_TFCE; ++ break; ++ case e1000_fc_full: ++ ctrl |= (E1000_CTRL_TFCE | E1000_CTRL_RFCE); ++ break; ++ default: ++ DEBUGOUT("Flow control param set incorrectly\n"); ++ return -E1000_ERR_CONFIG; ++ } ++ ++ /* Disable TX Flow Control for 82542 (rev 2.0) */ ++ if(hw->mac_type == e1000_82542_rev2_0) ++ ctrl &= (~E1000_CTRL_TFCE); ++ ++ E1000_WRITE_REG(hw, CTRL, ctrl); ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++ * Configures flow control settings after link is established ++ * ++ * hw - Struct containing variables accessed by shared code ++ * ++ * Should be called immediately after a valid link has been established. ++ * Forces MAC flow control settings if link was forced. When in MII/GMII mode ++ * and autonegotiation is enabled, the MAC flow control settings will be set ++ * based on the flow control negotiated by the PHY. In TBI mode, the TFCE ++ * and RFCE bits will be automaticaly set to the negotiated flow control mode. ++ *****************************************************************************/ ++static int ++e1000_config_fc_after_link_up(struct e1000_hw *hw) ++{ ++ int32_t ret_val; ++ uint16_t mii_status_reg; ++ uint16_t mii_nway_adv_reg; ++ uint16_t mii_nway_lp_ability_reg; ++ uint16_t speed; ++ uint16_t duplex; ++ ++ DEBUGFUNC("e1000_config_fc_after_link_up"); ++ ++ /* Check for the case where we have fiber media and auto-neg failed ++ * so we had to force link. In this case, we need to force the ++ * configuration of the MAC to match the "fc" parameter. ++ */ ++ if(((hw->media_type == e1000_media_type_fiber) && (hw->autoneg_failed)) || ++ ((hw->media_type == e1000_media_type_internal_serdes) && (hw->autoneg_failed))) { ++ if((ret_val = e1000_force_mac_fc(hw))) { ++ DEBUGOUT("Error forcing flow control settings\n"); ++ return ret_val; ++ } ++ } ++ ++ /* Check for the case where we have copper media and auto-neg is ++ * enabled. In this case, we need to check and see if Auto-Neg ++ * has completed, and if so, how the PHY and link partner has ++ * flow control configured. ++ */ ++ if(hw->media_type == e1000_media_type_copper) { ++ /* Read the MII Status Register and check to see if AutoNeg ++ * has completed. We read this twice because this reg has ++ * some "sticky" (latched) bits. ++ */ ++ if((ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &mii_status_reg))) ++ return ret_val; ++ if((ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &mii_status_reg))) ++ return ret_val; ++ ++ if(mii_status_reg & MII_SR_AUTONEG_COMPLETE) { ++ /* The AutoNeg process has completed, so we now need to ++ * read both the Auto Negotiation Advertisement Register ++ * (Address 4) and the Auto_Negotiation Base Page Ability ++ * Register (Address 5) to determine how flow control was ++ * negotiated. ++ */ ++ if((ret_val = e1000_read_phy_reg(hw, PHY_AUTONEG_ADV, ++ &mii_nway_adv_reg))) ++ return ret_val; ++ if((ret_val = e1000_read_phy_reg(hw, PHY_LP_ABILITY, ++ &mii_nway_lp_ability_reg))) ++ return ret_val; ++ ++ /* Two bits in the Auto Negotiation Advertisement Register ++ * (Address 4) and two bits in the Auto Negotiation Base ++ * Page Ability Register (Address 5) determine flow control ++ * for both the PHY and the link partner. The following ++ * table, taken out of the IEEE 802.3ab/D6.0 dated March 25, ++ * 1999, describes these PAUSE resolution bits and how flow ++ * control is determined based upon these settings. ++ * NOTE: DC = Don't Care ++ * ++ * LOCAL DEVICE | LINK PARTNER ++ * PAUSE | ASM_DIR | PAUSE | ASM_DIR | NIC Resolution ++ *-------|---------|-------|---------|-------------------- ++ * 0 | 0 | DC | DC | e1000_fc_none ++ * 0 | 1 | 0 | DC | e1000_fc_none ++ * 0 | 1 | 1 | 0 | e1000_fc_none ++ * 0 | 1 | 1 | 1 | e1000_fc_tx_pause ++ * 1 | 0 | 0 | DC | e1000_fc_none ++ * 1 | DC | 1 | DC | e1000_fc_full ++ * 1 | 1 | 0 | 0 | e1000_fc_none ++ * 1 | 1 | 0 | 1 | e1000_fc_rx_pause ++ * ++ */ ++ /* Are both PAUSE bits set to 1? If so, this implies ++ * Symmetric Flow Control is enabled at both ends. The ++ * ASM_DIR bits are irrelevant per the spec. ++ * ++ * For Symmetric Flow Control: ++ * ++ * LOCAL DEVICE | LINK PARTNER ++ * PAUSE | ASM_DIR | PAUSE | ASM_DIR | Result ++ *-------|---------|-------|---------|-------------------- ++ * 1 | DC | 1 | DC | e1000_fc_full ++ * ++ */ ++ if((mii_nway_adv_reg & NWAY_AR_PAUSE) && ++ (mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE)) { ++ /* Now we need to check if the user selected RX ONLY ++ * of pause frames. In this case, we had to advertise ++ * FULL flow control because we could not advertise RX ++ * ONLY. Hence, we must now check to see if we need to ++ * turn OFF the TRANSMISSION of PAUSE frames. ++ */ ++#if 0 ++ if(hw->original_fc == e1000_fc_full) { ++ hw->fc = e1000_fc_full; ++#else ++ if(hw->fc == e1000_fc_full) { ++#endif ++ DEBUGOUT("Flow Control = FULL.\r\n"); ++ } else { ++ hw->fc = e1000_fc_rx_pause; ++ DEBUGOUT("Flow Control = RX PAUSE frames only.\r\n"); ++ } ++ } ++ /* For receiving PAUSE frames ONLY. ++ * ++ * LOCAL DEVICE | LINK PARTNER ++ * PAUSE | ASM_DIR | PAUSE | ASM_DIR | Result ++ *-------|---------|-------|---------|-------------------- ++ * 0 | 1 | 1 | 1 | e1000_fc_tx_pause ++ * ++ */ ++ else if(!(mii_nway_adv_reg & NWAY_AR_PAUSE) && ++ (mii_nway_adv_reg & NWAY_AR_ASM_DIR) && ++ (mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE) && ++ (mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR)) { ++ hw->fc = e1000_fc_tx_pause; ++ DEBUGOUT("Flow Control = TX PAUSE frames only.\r\n"); ++ } ++ /* For transmitting PAUSE frames ONLY. ++ * ++ * LOCAL DEVICE | LINK PARTNER ++ * PAUSE | ASM_DIR | PAUSE | ASM_DIR | Result ++ *-------|---------|-------|---------|-------------------- ++ * 1 | 1 | 0 | 1 | e1000_fc_rx_pause ++ * ++ */ ++ else if((mii_nway_adv_reg & NWAY_AR_PAUSE) && ++ (mii_nway_adv_reg & NWAY_AR_ASM_DIR) && ++ !(mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE) && ++ (mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR)) { ++ hw->fc = e1000_fc_rx_pause; ++ DEBUGOUT("Flow Control = RX PAUSE frames only.\r\n"); ++ } ++ /* Per the IEEE spec, at this point flow control should be ++ * disabled. However, we want to consider that we could ++ * be connected to a legacy switch that doesn't advertise ++ * desired flow control, but can be forced on the link ++ * partner. So if we advertised no flow control, that is ++ * what we will resolve to. If we advertised some kind of ++ * receive capability (Rx Pause Only or Full Flow Control) ++ * and the link partner advertised none, we will configure ++ * ourselves to enable Rx Flow Control only. We can do ++ * this safely for two reasons: If the link partner really ++ * didn't want flow control enabled, and we enable Rx, no ++ * harm done since we won't be receiving any PAUSE frames ++ * anyway. If the intent on the link partner was to have ++ * flow control enabled, then by us enabling RX only, we ++ * can at least receive pause frames and process them. ++ * This is a good idea because in most cases, since we are ++ * predominantly a server NIC, more times than not we will ++ * be asked to delay transmission of packets than asking ++ * our link partner to pause transmission of frames. ++ */ ++#if 0 ++ else if(hw->original_fc == e1000_fc_none || ++ hw->original_fc == e1000_fc_tx_pause) { ++#else ++ else if(hw->fc == e1000_fc_none) ++ DEBUGOUT("Flow Control = NONE.\r\n"); ++ else if(hw->fc == e1000_fc_tx_pause) { ++#endif ++ hw->fc = e1000_fc_none; ++ DEBUGOUT("Flow Control = NONE.\r\n"); ++ } else { ++ hw->fc = e1000_fc_rx_pause; ++ DEBUGOUT("Flow Control = RX PAUSE frames only.\r\n"); ++ } ++ ++ /* Now we need to do one last check... If we auto- ++ * negotiated to HALF DUPLEX, flow control should not be ++ * enabled per IEEE 802.3 spec. ++ */ ++ e1000_get_speed_and_duplex(hw, &speed, &duplex); ++ ++ if(duplex == HALF_DUPLEX) ++ hw->fc = e1000_fc_none; ++ ++ /* Now we call a subroutine to actually force the MAC ++ * controller to use the correct flow control settings. ++ */ ++ if((ret_val = e1000_force_mac_fc(hw))) { ++ DEBUGOUT("Error forcing flow control settings\n"); ++ return ret_val; ++ } ++ } else { ++ DEBUGOUT("Copper PHY and Auto Neg has not completed.\r\n"); ++ } ++ } ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++ * Checks to see if the link status of the hardware has changed. ++ * ++ * hw - Struct containing variables accessed by shared code ++ * ++ * Called by any function that needs to check the link status of the adapter. ++ *****************************************************************************/ ++static int ++e1000_check_for_link(struct e1000_hw *hw) ++{ ++ uint32_t rxcw; ++ uint32_t ctrl; ++ uint32_t status; ++ uint32_t rctl; ++ uint32_t signal = 0; ++ int32_t ret_val; ++ uint16_t phy_data; ++ uint16_t lp_capability; ++ ++ DEBUGFUNC("e1000_check_for_link"); ++ ++ /* On adapters with a MAC newer than 82544, SW Defineable pin 1 will be ++ * set when the optics detect a signal. On older adapters, it will be ++ * cleared when there is a signal. This applies to fiber media only. ++ */ ++ if(hw->media_type == e1000_media_type_fiber) ++ signal = (hw->mac_type > e1000_82544) ? E1000_CTRL_SWDPIN1 : 0; ++ ++ ctrl = E1000_READ_REG(hw, CTRL); ++ status = E1000_READ_REG(hw, STATUS); ++ rxcw = E1000_READ_REG(hw, RXCW); ++ ++ /* If we have a copper PHY then we only want to go out to the PHY ++ * registers to see if Auto-Neg has completed and/or if our link ++ * status has changed. The get_link_status flag will be set if we ++ * receive a Link Status Change interrupt or we have Rx Sequence ++ * Errors. ++ */ ++#if 0 ++ if((hw->media_type == e1000_media_type_copper) && hw->get_link_status) { ++#else ++ if(hw->media_type == e1000_media_type_copper) { ++#endif ++ /* First we want to see if the MII Status Register reports ++ * link. If so, then we want to get the current speed/duplex ++ * of the PHY. ++ * Read the register twice since the link bit is sticky. ++ */ ++ if((ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &phy_data))) ++ return ret_val; ++ if((ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &phy_data))) ++ return ret_val; ++ ++ if(phy_data & MII_SR_LINK_STATUS) { ++#if 0 ++ hw->get_link_status = FALSE; ++#endif ++ } else { ++ /* No link detected */ ++ return -E1000_ERR_NOLINK; ++ } ++ ++ /* We have a M88E1000 PHY and Auto-Neg is enabled. If we ++ * have Si on board that is 82544 or newer, Auto ++ * Speed Detection takes care of MAC speed/duplex ++ * configuration. So we only need to configure Collision ++ * Distance in the MAC. Otherwise, we need to force ++ * speed/duplex on the MAC to the current PHY speed/duplex ++ * settings. ++ */ ++ if(hw->mac_type >= e1000_82544) ++ e1000_config_collision_dist(hw); ++ else { ++ if((ret_val = e1000_config_mac_to_phy(hw))) { ++ DEBUGOUT("Error configuring MAC to PHY settings\n"); ++ return ret_val; ++ } ++ } ++ ++ /* Configure Flow Control now that Auto-Neg has completed. First, we ++ * need to restore the desired flow control settings because we may ++ * have had to re-autoneg with a different link partner. ++ */ ++ if((ret_val = e1000_config_fc_after_link_up(hw))) { ++ DEBUGOUT("Error configuring flow control\n"); ++ return ret_val; ++ } ++ ++ /* At this point we know that we are on copper and we have ++ * auto-negotiated link. These are conditions for checking the link ++ * parter capability register. We use the link partner capability to ++ * determine if TBI Compatibility needs to be turned on or off. If ++ * the link partner advertises any speed in addition to Gigabit, then ++ * we assume that they are GMII-based, and TBI compatibility is not ++ * needed. If no other speeds are advertised, we assume the link ++ * partner is TBI-based, and we turn on TBI Compatibility. ++ */ ++ if(hw->tbi_compatibility_en) { ++ if((ret_val = e1000_read_phy_reg(hw, PHY_LP_ABILITY, ++ &lp_capability))) ++ return ret_val; ++ if(lp_capability & (NWAY_LPAR_10T_HD_CAPS | ++ NWAY_LPAR_10T_FD_CAPS | ++ NWAY_LPAR_100TX_HD_CAPS | ++ NWAY_LPAR_100TX_FD_CAPS | ++ NWAY_LPAR_100T4_CAPS)) { ++ /* If our link partner advertises anything in addition to ++ * gigabit, we do not need to enable TBI compatibility. ++ */ ++ if(hw->tbi_compatibility_on) { ++ /* If we previously were in the mode, turn it off. */ ++ rctl = E1000_READ_REG(hw, RCTL); ++ rctl &= ~E1000_RCTL_SBP; ++ E1000_WRITE_REG(hw, RCTL, rctl); ++ hw->tbi_compatibility_on = FALSE; ++ } ++ } else { ++ /* If TBI compatibility is was previously off, turn it on. For ++ * compatibility with a TBI link partner, we will store bad ++ * packets. Some frames have an additional byte on the end and ++ * will look like CRC errors to to the hardware. ++ */ ++ if(!hw->tbi_compatibility_on) { ++ hw->tbi_compatibility_on = TRUE; ++ rctl = E1000_READ_REG(hw, RCTL); ++ rctl |= E1000_RCTL_SBP; ++ E1000_WRITE_REG(hw, RCTL, rctl); ++ } ++ } ++ } ++ } ++ /* If we don't have link (auto-negotiation failed or link partner cannot ++ * auto-negotiate), the cable is plugged in (we have signal), and our ++ * link partner is not trying to auto-negotiate with us (we are receiving ++ * idles or data), we need to force link up. We also need to give ++ * auto-negotiation time to complete, in case the cable was just plugged ++ * in. The autoneg_failed flag does this. ++ */ ++ else if((((hw->media_type == e1000_media_type_fiber) && ++ ((ctrl & E1000_CTRL_SWDPIN1) == signal)) || ++ (hw->media_type == e1000_media_type_internal_serdes)) && ++ (!(status & E1000_STATUS_LU)) && ++ (!(rxcw & E1000_RXCW_C))) { ++ if(hw->autoneg_failed == 0) { ++ hw->autoneg_failed = 1; ++ return 0; ++ } ++ DEBUGOUT("NOT RXing /C/, disable AutoNeg and force link.\r\n"); ++ ++ /* Disable auto-negotiation in the TXCW register */ ++ E1000_WRITE_REG(hw, TXCW, (hw->txcw & ~E1000_TXCW_ANE)); ++ ++ /* Force link-up and also force full-duplex. */ ++ ctrl = E1000_READ_REG(hw, CTRL); ++ ctrl |= (E1000_CTRL_SLU | E1000_CTRL_FD); ++ E1000_WRITE_REG(hw, CTRL, ctrl); ++ ++ /* Configure Flow Control after forcing link up. */ ++ if((ret_val = e1000_config_fc_after_link_up(hw))) { ++ DEBUGOUT("Error configuring flow control\n"); ++ return ret_val; ++ } ++ } ++ /* If we are forcing link and we are receiving /C/ ordered sets, re-enable ++ * auto-negotiation in the TXCW register and disable forced link in the ++ * Device Control register in an attempt to auto-negotiate with our link ++ * partner. ++ */ ++ else if(((hw->media_type == e1000_media_type_fiber) || ++ (hw->media_type == e1000_media_type_internal_serdes)) && ++ (ctrl & E1000_CTRL_SLU) && ++ (rxcw & E1000_RXCW_C)) { ++ DEBUGOUT("RXing /C/, enable AutoNeg and stop forcing link.\r\n"); ++ E1000_WRITE_REG(hw, TXCW, hw->txcw); ++ E1000_WRITE_REG(hw, CTRL, (ctrl & ~E1000_CTRL_SLU)); ++ } ++#if 0 ++ /* If we force link for non-auto-negotiation switch, check link status ++ * based on MAC synchronization for internal serdes media type. ++ */ ++ else if((hw->media_type == e1000_media_type_internal_serdes) && ++ !(E1000_TXCW_ANE & E1000_READ_REG(hw, TXCW))) { ++ /* SYNCH bit and IV bit are sticky. */ ++ udelay(10); ++ if(E1000_RXCW_SYNCH & E1000_READ_REG(hw, RXCW)) { ++ if(!(rxcw & E1000_RXCW_IV)) { ++ hw->serdes_link_down = FALSE; ++ DEBUGOUT("SERDES: Link is up.\n"); ++ } ++ } else { ++ hw->serdes_link_down = TRUE; ++ DEBUGOUT("SERDES: Link is down.\n"); ++ } ++ } ++#endif ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++ * Detects the current speed and duplex settings of the hardware. ++ * ++ * hw - Struct containing variables accessed by shared code ++ * speed - Speed of the connection ++ * duplex - Duplex setting of the connection ++ *****************************************************************************/ ++static void ++e1000_get_speed_and_duplex(struct e1000_hw *hw, ++ uint16_t *speed, ++ uint16_t *duplex) ++{ ++ uint32_t status; ++ ++ DEBUGFUNC("e1000_get_speed_and_duplex"); ++ ++ if(hw->mac_type >= e1000_82543) { ++ status = E1000_READ_REG(hw, STATUS); ++ if(status & E1000_STATUS_SPEED_1000) { ++ *speed = SPEED_1000; ++ DEBUGOUT("1000 Mbs, "); ++ } else if(status & E1000_STATUS_SPEED_100) { ++ *speed = SPEED_100; ++ DEBUGOUT("100 Mbs, "); ++ } else { ++ *speed = SPEED_10; ++ DEBUGOUT("10 Mbs, "); ++ } ++ ++ if(status & E1000_STATUS_FD) { ++ *duplex = FULL_DUPLEX; ++ DEBUGOUT("Full Duplex\r\n"); ++ } else { ++ *duplex = HALF_DUPLEX; ++ DEBUGOUT(" Half Duplex\r\n"); ++ } ++ } else { ++ DEBUGOUT("1000 Mbs, Full Duplex\r\n"); ++ *speed = SPEED_1000; ++ *duplex = FULL_DUPLEX; ++ } ++} ++ ++/****************************************************************************** ++* Blocks until autoneg completes or times out (~4.5 seconds) ++* ++* hw - Struct containing variables accessed by shared code ++******************************************************************************/ ++static int ++e1000_wait_autoneg(struct e1000_hw *hw) ++{ ++ int32_t ret_val; ++ uint16_t i; ++ uint16_t phy_data; ++ ++ DEBUGFUNC("e1000_wait_autoneg"); ++ DEBUGOUT("Waiting for Auto-Neg to complete.\n"); ++ ++ /* We will wait for autoneg to complete or 4.5 seconds to expire. */ ++ for(i = PHY_AUTO_NEG_TIME; i > 0; i--) { ++ /* Read the MII Status Register and wait for Auto-Neg ++ * Complete bit to be set. ++ */ ++ if((ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &phy_data))) ++ return ret_val; ++ if((ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &phy_data))) ++ return ret_val; ++ if(phy_data & MII_SR_AUTONEG_COMPLETE) { ++ DEBUGOUT("Auto-Neg complete.\n"); ++ return E1000_SUCCESS; ++ } ++ mdelay(100); ++ } ++ DEBUGOUT("Auto-Neg timedout.\n"); ++ return -E1000_ERR_TIMEOUT; ++} ++ ++/****************************************************************************** ++* Raises the Management Data Clock ++* ++* hw - Struct containing variables accessed by shared code ++* ctrl - Device control register's current value ++******************************************************************************/ ++static void ++e1000_raise_mdi_clk(struct e1000_hw *hw, ++ uint32_t *ctrl) ++{ ++ /* Raise the clock input to the Management Data Clock (by setting the MDC ++ * bit), and then delay 10 microseconds. ++ */ ++ E1000_WRITE_REG(hw, CTRL, (*ctrl | E1000_CTRL_MDC)); ++ E1000_WRITE_FLUSH(hw); ++ udelay(10); ++} ++ ++/****************************************************************************** ++* Lowers the Management Data Clock ++* ++* hw - Struct containing variables accessed by shared code ++* ctrl - Device control register's current value ++******************************************************************************/ ++static void ++e1000_lower_mdi_clk(struct e1000_hw *hw, ++ uint32_t *ctrl) ++{ ++ /* Lower the clock input to the Management Data Clock (by clearing the MDC ++ * bit), and then delay 10 microseconds. ++ */ ++ E1000_WRITE_REG(hw, CTRL, (*ctrl & ~E1000_CTRL_MDC)); ++ E1000_WRITE_FLUSH(hw); ++ udelay(10); ++} ++ ++/****************************************************************************** ++* Shifts data bits out to the PHY ++* ++* hw - Struct containing variables accessed by shared code ++* data - Data to send out to the PHY ++* count - Number of bits to shift out ++* ++* Bits are shifted out in MSB to LSB order. ++******************************************************************************/ ++static void ++e1000_shift_out_mdi_bits(struct e1000_hw *hw, ++ uint32_t data, ++ uint16_t count) ++{ ++ uint32_t ctrl; ++ uint32_t mask; ++ ++ /* We need to shift "count" number of bits out to the PHY. So, the value ++ * in the "data" parameter will be shifted out to the PHY one bit at a ++ * time. In order to do this, "data" must be broken down into bits. ++ */ ++ mask = 0x01; ++ mask <<= (count - 1); ++ ++ ctrl = E1000_READ_REG(hw, CTRL); ++ ++ /* Set MDIO_DIR and MDC_DIR direction bits to be used as output pins. */ ++ ctrl |= (E1000_CTRL_MDIO_DIR | E1000_CTRL_MDC_DIR); ++ ++ while(mask) { ++ /* A "1" is shifted out to the PHY by setting the MDIO bit to "1" and ++ * then raising and lowering the Management Data Clock. A "0" is ++ * shifted out to the PHY by setting the MDIO bit to "0" and then ++ * raising and lowering the clock. ++ */ ++ if(data & mask) ctrl |= E1000_CTRL_MDIO; ++ else ctrl &= ~E1000_CTRL_MDIO; ++ ++ E1000_WRITE_REG(hw, CTRL, ctrl); ++ E1000_WRITE_FLUSH(hw); ++ ++ udelay(10); ++ ++ e1000_raise_mdi_clk(hw, &ctrl); ++ e1000_lower_mdi_clk(hw, &ctrl); ++ ++ mask = mask >> 1; ++ } ++} ++ ++/****************************************************************************** ++* Shifts data bits in from the PHY ++* ++* hw - Struct containing variables accessed by shared code ++* ++* Bits are shifted in in MSB to LSB order. ++******************************************************************************/ ++static uint16_t ++e1000_shift_in_mdi_bits(struct e1000_hw *hw) ++{ ++ uint32_t ctrl; ++ uint16_t data = 0; ++ uint8_t i; ++ ++ /* In order to read a register from the PHY, we need to shift in a total ++ * of 18 bits from the PHY. The first two bit (turnaround) times are used ++ * to avoid contention on the MDIO pin when a read operation is performed. ++ * These two bits are ignored by us and thrown away. Bits are "shifted in" ++ * by raising the input to the Management Data Clock (setting the MDC bit), ++ * and then reading the value of the MDIO bit. ++ */ ++ ctrl = E1000_READ_REG(hw, CTRL); ++ ++ /* Clear MDIO_DIR (SWDPIO1) to indicate this bit is to be used as input. */ ++ ctrl &= ~E1000_CTRL_MDIO_DIR; ++ ctrl &= ~E1000_CTRL_MDIO; ++ ++ E1000_WRITE_REG(hw, CTRL, ctrl); ++ E1000_WRITE_FLUSH(hw); ++ ++ /* Raise and Lower the clock before reading in the data. This accounts for ++ * the turnaround bits. The first clock occurred when we clocked out the ++ * last bit of the Register Address. ++ */ ++ e1000_raise_mdi_clk(hw, &ctrl); ++ e1000_lower_mdi_clk(hw, &ctrl); ++ ++ for(data = 0, i = 0; i < 16; i++) { ++ data = data << 1; ++ e1000_raise_mdi_clk(hw, &ctrl); ++ ctrl = E1000_READ_REG(hw, CTRL); ++ /* Check to see if we shifted in a "1". */ ++ if(ctrl & E1000_CTRL_MDIO) data |= 1; ++ e1000_lower_mdi_clk(hw, &ctrl); ++ } ++ ++ e1000_raise_mdi_clk(hw, &ctrl); ++ e1000_lower_mdi_clk(hw, &ctrl); ++ ++ return data; ++} ++ ++/***************************************************************************** ++* Reads the value from a PHY register, if the value is on a specific non zero ++* page, sets the page first. ++* ++* hw - Struct containing variables accessed by shared code ++* reg_addr - address of the PHY register to read ++******************************************************************************/ ++static int ++e1000_read_phy_reg(struct e1000_hw *hw, ++ uint32_t reg_addr, ++ uint16_t *phy_data) ++{ ++ uint32_t ret_val; ++ ++ DEBUGFUNC("e1000_read_phy_reg"); ++ ++ if(hw->phy_type == e1000_phy_igp && ++ (reg_addr > MAX_PHY_MULTI_PAGE_REG)) { ++ if((ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT, ++ (uint16_t)reg_addr))) ++ return ret_val; ++ } ++ ++ ret_val = e1000_read_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT & reg_addr, ++ phy_data); ++ ++ return ret_val; ++} ++ ++static int ++e1000_read_phy_reg_ex(struct e1000_hw *hw, ++ uint32_t reg_addr, ++ uint16_t *phy_data) ++{ ++ uint32_t i; ++ uint32_t mdic = 0; ++ const uint32_t phy_addr = 1; ++ ++ DEBUGFUNC("e1000_read_phy_reg_ex"); ++ ++ if(reg_addr > MAX_PHY_REG_ADDRESS) { ++ DEBUGOUT1("PHY Address %d is out of range\n", reg_addr); ++ return -E1000_ERR_PARAM; ++ } ++ ++ if(hw->mac_type > e1000_82543) { ++ /* Set up Op-code, Phy Address, and register address in the MDI ++ * Control register. The MAC will take care of interfacing with the ++ * PHY to retrieve the desired data. ++ */ ++ mdic = ((reg_addr << E1000_MDIC_REG_SHIFT) | ++ (phy_addr << E1000_MDIC_PHY_SHIFT) | ++ (E1000_MDIC_OP_READ)); ++ ++ E1000_WRITE_REG(hw, MDIC, mdic); ++ ++ /* Poll the ready bit to see if the MDI read completed */ ++ for(i = 0; i < 64; i++) { ++ udelay(50); ++ mdic = E1000_READ_REG(hw, MDIC); ++ if(mdic & E1000_MDIC_READY) break; ++ } ++ if(!(mdic & E1000_MDIC_READY)) { ++ DEBUGOUT("MDI Read did not complete\n"); ++ return -E1000_ERR_PHY; ++ } ++ if(mdic & E1000_MDIC_ERROR) { ++ DEBUGOUT("MDI Error\n"); ++ return -E1000_ERR_PHY; ++ } ++ *phy_data = (uint16_t) mdic; ++ } else { ++ /* We must first send a preamble through the MDIO pin to signal the ++ * beginning of an MII instruction. This is done by sending 32 ++ * consecutive "1" bits. ++ */ ++ e1000_shift_out_mdi_bits(hw, PHY_PREAMBLE, PHY_PREAMBLE_SIZE); ++ ++ /* Now combine the next few fields that are required for a read ++ * operation. We use this method instead of calling the ++ * e1000_shift_out_mdi_bits routine five different times. The format of ++ * a MII read instruction consists of a shift out of 14 bits and is ++ * defined as follows: ++ * ++ * followed by a shift in of 18 bits. This first two bits shifted in ++ * are TurnAround bits used to avoid contention on the MDIO pin when a ++ * READ operation is performed. These two bits are thrown away ++ * followed by a shift in of 16 bits which contains the desired data. ++ */ ++ mdic = ((reg_addr) | (phy_addr << 5) | ++ (PHY_OP_READ << 10) | (PHY_SOF << 12)); ++ ++ e1000_shift_out_mdi_bits(hw, mdic, 14); ++ ++ /* Now that we've shifted out the read command to the MII, we need to ++ * "shift in" the 16-bit value (18 total bits) of the requested PHY ++ * register address. ++ */ ++ *phy_data = e1000_shift_in_mdi_bits(hw); ++ } ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++* Writes a value to a PHY register ++* ++* hw - Struct containing variables accessed by shared code ++* reg_addr - address of the PHY register to write ++* data - data to write to the PHY ++******************************************************************************/ ++static int ++e1000_write_phy_reg(struct e1000_hw *hw, ++ uint32_t reg_addr, ++ uint16_t phy_data) ++{ ++ uint32_t ret_val; ++ ++ DEBUGFUNC("e1000_write_phy_reg"); ++ ++ if(hw->phy_type == e1000_phy_igp && ++ (reg_addr > MAX_PHY_MULTI_PAGE_REG)) { ++ if((ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT, ++ (uint16_t)reg_addr))) ++ return ret_val; ++ } ++ ++ ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT & reg_addr, ++ phy_data); ++ ++ return ret_val; ++} ++ ++static int ++e1000_write_phy_reg_ex(struct e1000_hw *hw, ++ uint32_t reg_addr, ++ uint16_t phy_data) ++{ ++ uint32_t i; ++ uint32_t mdic = 0; ++ const uint32_t phy_addr = 1; ++ ++ DEBUGFUNC("e1000_write_phy_reg_ex"); ++ ++ if(reg_addr > MAX_PHY_REG_ADDRESS) { ++ DEBUGOUT1("PHY Address %d is out of range\n", reg_addr); ++ return -E1000_ERR_PARAM; ++ } ++ ++ if(hw->mac_type > e1000_82543) { ++ /* Set up Op-code, Phy Address, register address, and data intended ++ * for the PHY register in the MDI Control register. The MAC will take ++ * care of interfacing with the PHY to send the desired data. ++ */ ++ mdic = (((uint32_t) phy_data) | ++ (reg_addr << E1000_MDIC_REG_SHIFT) | ++ (phy_addr << E1000_MDIC_PHY_SHIFT) | ++ (E1000_MDIC_OP_WRITE)); ++ ++ E1000_WRITE_REG(hw, MDIC, mdic); ++ ++ /* Poll the ready bit to see if the MDI read completed */ ++ for(i = 0; i < 640; i++) { ++ udelay(5); ++ mdic = E1000_READ_REG(hw, MDIC); ++ if(mdic & E1000_MDIC_READY) break; ++ } ++ if(!(mdic & E1000_MDIC_READY)) { ++ DEBUGOUT("MDI Write did not complete\n"); ++ return -E1000_ERR_PHY; ++ } ++ } else { ++ /* We'll need to use the SW defined pins to shift the write command ++ * out to the PHY. We first send a preamble to the PHY to signal the ++ * beginning of the MII instruction. This is done by sending 32 ++ * consecutive "1" bits. ++ */ ++ e1000_shift_out_mdi_bits(hw, PHY_PREAMBLE, PHY_PREAMBLE_SIZE); ++ ++ /* Now combine the remaining required fields that will indicate a ++ * write operation. We use this method instead of calling the ++ * e1000_shift_out_mdi_bits routine for each field in the command. The ++ * format of a MII write instruction is as follows: ++ * . ++ */ ++ mdic = ((PHY_TURNAROUND) | (reg_addr << 2) | (phy_addr << 7) | ++ (PHY_OP_WRITE << 12) | (PHY_SOF << 14)); ++ mdic <<= 16; ++ mdic |= (uint32_t) phy_data; ++ ++ e1000_shift_out_mdi_bits(hw, mdic, 32); ++ } ++ ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++* Returns the PHY to the power-on reset state ++* ++* hw - Struct containing variables accessed by shared code ++******************************************************************************/ ++static void ++e1000_phy_hw_reset(struct e1000_hw *hw) ++{ ++ uint32_t ctrl, ctrl_ext; ++ ++ DEBUGFUNC("e1000_phy_hw_reset"); ++ ++ DEBUGOUT("Resetting Phy...\n"); ++ ++ if(hw->mac_type > e1000_82543) { ++ /* Read the device control register and assert the E1000_CTRL_PHY_RST ++ * bit. Then, take it out of reset. ++ */ ++ ctrl = E1000_READ_REG(hw, CTRL); ++ E1000_WRITE_REG(hw, CTRL, ctrl | E1000_CTRL_PHY_RST); ++ E1000_WRITE_FLUSH(hw); ++ mdelay(10); ++ E1000_WRITE_REG(hw, CTRL, ctrl); ++ E1000_WRITE_FLUSH(hw); ++ } else { ++ /* Read the Extended Device Control Register, assert the PHY_RESET_DIR ++ * bit to put the PHY into reset. Then, take it out of reset. ++ */ ++ ctrl_ext = E1000_READ_REG(hw, CTRL_EXT); ++ ctrl_ext |= E1000_CTRL_EXT_SDP4_DIR; ++ ctrl_ext &= ~E1000_CTRL_EXT_SDP4_DATA; ++ E1000_WRITE_REG(hw, CTRL_EXT, ctrl_ext); ++ E1000_WRITE_FLUSH(hw); ++ mdelay(10); ++ ctrl_ext |= E1000_CTRL_EXT_SDP4_DATA; ++ E1000_WRITE_REG(hw, CTRL_EXT, ctrl_ext); ++ E1000_WRITE_FLUSH(hw); ++ } ++ udelay(150); ++} ++ ++/****************************************************************************** ++* Resets the PHY ++* ++* hw - Struct containing variables accessed by shared code ++* ++* Sets bit 15 of the MII Control regiser ++******************************************************************************/ ++static int ++e1000_phy_reset(struct e1000_hw *hw) ++{ ++ int32_t ret_val; ++ uint16_t phy_data; ++ ++ DEBUGFUNC("e1000_phy_reset"); ++ ++ if(hw->mac_type != e1000_82541_rev_2) { ++ if((ret_val = e1000_read_phy_reg(hw, PHY_CTRL, &phy_data))) ++ return ret_val; ++ ++ phy_data |= MII_CR_RESET; ++ if((ret_val = e1000_write_phy_reg(hw, PHY_CTRL, phy_data))) ++ return ret_val; ++ ++ udelay(1); ++ } else e1000_phy_hw_reset(hw); ++ ++ if(hw->phy_type == e1000_phy_igp) ++ e1000_phy_init_script(hw); ++ ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++* Probes the expected PHY address for known PHY IDs ++* ++* hw - Struct containing variables accessed by shared code ++******************************************************************************/ ++static int ++e1000_detect_gig_phy(struct e1000_hw *hw) ++{ ++ int32_t phy_init_status, ret_val; ++ uint16_t phy_id_high, phy_id_low; ++ boolean_t match = FALSE; ++ ++ DEBUGFUNC("e1000_detect_gig_phy"); ++ ++ /* Read the PHY ID Registers to identify which PHY is onboard. */ ++ if((ret_val = e1000_read_phy_reg(hw, PHY_ID1, &phy_id_high))) ++ return ret_val; ++ ++ hw->phy_id = (uint32_t) (phy_id_high << 16); ++ udelay(20); ++ if((ret_val = e1000_read_phy_reg(hw, PHY_ID2, &phy_id_low))) ++ return ret_val; ++ ++ hw->phy_id |= (uint32_t) (phy_id_low & PHY_REVISION_MASK); ++#ifdef LINUX_DRIVER ++ hw->phy_revision = (uint32_t) phy_id_low & ~PHY_REVISION_MASK; ++#endif ++ ++ switch(hw->mac_type) { ++ case e1000_82543: ++ if(hw->phy_id == M88E1000_E_PHY_ID) match = TRUE; ++ break; ++ case e1000_82544: ++ if(hw->phy_id == M88E1000_I_PHY_ID) match = TRUE; ++ break; ++ case e1000_82540: ++ case e1000_82545: ++ case e1000_82545_rev_3: ++ case e1000_82546: ++ case e1000_82546_rev_3: ++ if(hw->phy_id == M88E1011_I_PHY_ID) match = TRUE; ++ break; ++ case e1000_82541: ++ case e1000_82541_rev_2: ++ case e1000_82547: ++ case e1000_82547_rev_2: ++ if(hw->phy_id == IGP01E1000_I_PHY_ID) match = TRUE; ++ break; ++ default: ++ DEBUGOUT1("Invalid MAC type %d\n", hw->mac_type); ++ return -E1000_ERR_CONFIG; ++ } ++ phy_init_status = e1000_set_phy_type(hw); ++ ++ if ((match) && (phy_init_status == E1000_SUCCESS)) { ++ DEBUGOUT1("PHY ID 0x%X detected\n", hw->phy_id); ++ return E1000_SUCCESS; ++ } ++ DEBUGOUT1("Invalid PHY ID 0x%X\n", hw->phy_id); ++ return -E1000_ERR_PHY; ++} ++ ++/****************************************************************************** ++ * Sets up eeprom variables in the hw struct. Must be called after mac_type ++ * is configured. ++ * ++ * hw - Struct containing variables accessed by shared code ++ *****************************************************************************/ ++static void ++e1000_init_eeprom_params(struct e1000_hw *hw) ++{ ++ struct e1000_eeprom_info *eeprom = &hw->eeprom; ++ uint32_t eecd = E1000_READ_REG(hw, EECD); ++ uint16_t eeprom_size; ++ ++ DEBUGFUNC("e1000_init_eeprom_params"); ++ ++ switch (hw->mac_type) { ++ case e1000_82542_rev2_0: ++ case e1000_82542_rev2_1: ++ case e1000_82543: ++ case e1000_82544: ++ eeprom->type = e1000_eeprom_microwire; ++ eeprom->word_size = 64; ++ eeprom->opcode_bits = 3; ++ eeprom->address_bits = 6; ++ eeprom->delay_usec = 50; ++ break; ++ case e1000_82540: ++ case e1000_82545: ++ case e1000_82545_rev_3: ++ case e1000_82546: ++ case e1000_82546_rev_3: ++ eeprom->type = e1000_eeprom_microwire; ++ eeprom->opcode_bits = 3; ++ eeprom->delay_usec = 50; ++ if(eecd & E1000_EECD_SIZE) { ++ eeprom->word_size = 256; ++ eeprom->address_bits = 8; ++ } else { ++ eeprom->word_size = 64; ++ eeprom->address_bits = 6; ++ } ++ break; ++ case e1000_82541: ++ case e1000_82541_rev_2: ++ case e1000_82547: ++ case e1000_82547_rev_2: ++ if (eecd & E1000_EECD_TYPE) { ++ eeprom->type = e1000_eeprom_spi; ++ if (eecd & E1000_EECD_ADDR_BITS) { ++ eeprom->page_size = 32; ++ eeprom->address_bits = 16; ++ } else { ++ eeprom->page_size = 8; ++ eeprom->address_bits = 8; ++ } ++ } else { ++ eeprom->type = e1000_eeprom_microwire; ++ eeprom->opcode_bits = 3; ++ eeprom->delay_usec = 50; ++ if (eecd & E1000_EECD_ADDR_BITS) { ++ eeprom->word_size = 256; ++ eeprom->address_bits = 8; ++ } else { ++ eeprom->word_size = 64; ++ eeprom->address_bits = 6; ++ } ++ } ++ break; ++ default: ++ eeprom->type = e1000_eeprom_spi; ++ if (eecd & E1000_EECD_ADDR_BITS) { ++ eeprom->page_size = 32; ++ eeprom->address_bits = 16; ++ } else { ++ eeprom->page_size = 8; ++ eeprom->address_bits = 8; ++ } ++ break; ++ } ++ ++ if (eeprom->type == e1000_eeprom_spi) { ++ eeprom->opcode_bits = 8; ++ eeprom->delay_usec = 1; ++ eeprom->word_size = 64; ++ if (e1000_read_eeprom(hw, EEPROM_CFG, 1, &eeprom_size) == 0) { ++ eeprom_size &= EEPROM_SIZE_MASK; ++ ++ switch (eeprom_size) { ++ case EEPROM_SIZE_16KB: ++ eeprom->word_size = 8192; ++ break; ++ case EEPROM_SIZE_8KB: ++ eeprom->word_size = 4096; ++ break; ++ case EEPROM_SIZE_4KB: ++ eeprom->word_size = 2048; ++ break; ++ case EEPROM_SIZE_2KB: ++ eeprom->word_size = 1024; ++ break; ++ case EEPROM_SIZE_1KB: ++ eeprom->word_size = 512; ++ break; ++ case EEPROM_SIZE_512B: ++ eeprom->word_size = 256; ++ break; ++ case EEPROM_SIZE_128B: ++ default: ++ break; ++ } ++ } ++ } ++} ++ ++/** ++ * e1000_reset - Reset the adapter ++ */ ++ ++static int ++e1000_reset(struct e1000_hw *hw) ++{ ++ uint32_t pba; ++ /* Repartition Pba for greater than 9k mtu ++ * To take effect CTRL.RST is required. ++ */ ++ ++ if(hw->mac_type < e1000_82547) { ++ pba = E1000_PBA_48K; ++ } else { ++ pba = E1000_PBA_30K; ++ } ++ E1000_WRITE_REG(hw, PBA, pba); ++ ++ /* flow control settings */ ++#if 0 ++ hw->fc_high_water = FC_DEFAULT_HI_THRESH; ++ hw->fc_low_water = FC_DEFAULT_LO_THRESH; ++ hw->fc_pause_time = FC_DEFAULT_TX_TIMER; ++ hw->fc_send_xon = 1; ++ hw->fc = hw->original_fc; ++#endif ++ ++ e1000_reset_hw(hw); ++ if(hw->mac_type >= e1000_82544) ++ E1000_WRITE_REG(hw, WUC, 0); ++ return e1000_init_hw(hw); ++} ++ ++/** ++ * e1000_sw_init - Initialize general software structures (struct e1000_adapter) ++ * @adapter: board private structure to initialize ++ * ++ * e1000_sw_init initializes the Adapter private data structure. ++ * Fields are initialized based on PCI device information and ++ * OS network device settings (MTU size). ++ **/ ++ ++static int ++e1000_sw_init(struct pci_device *pdev, struct e1000_hw *hw) ++{ ++ int result; ++ ++ /* PCI config space info */ ++ pci_read_config_word(pdev, PCI_VENDOR_ID, &hw->vendor_id); ++ pci_read_config_word(pdev, PCI_DEVICE_ID, &hw->device_id); ++ pci_read_config_byte(pdev, PCI_REVISION, &hw->revision_id); ++#if 0 ++ pci_read_config_word(pdev, PCI_SUBSYSTEM_VENDOR_ID, ++ &hw->subsystem_vendor_id); ++ pci_read_config_word(pdev, PCI_SUBSYSTEM_ID, &hw->subsystem_id); ++#endif ++ ++ pci_read_config_word(pdev, PCI_COMMAND, &hw->pci_cmd_word); ++ ++ /* identify the MAC */ ++ ++ result = e1000_set_mac_type(hw); ++ if (result) { ++ E1000_ERR("Unknown MAC Type\n"); ++ return result; ++ } ++ ++ /* initialize eeprom parameters */ ++ ++ e1000_init_eeprom_params(hw); ++ ++#if 0 ++ if((hw->mac_type == e1000_82541) || ++ (hw->mac_type == e1000_82547) || ++ (hw->mac_type == e1000_82541_rev_2) || ++ (hw->mac_type == e1000_82547_rev_2)) ++ hw->phy_init_script = 1; ++#endif ++ ++ e1000_set_media_type(hw); ++ ++#if 0 ++ if(hw->mac_type < e1000_82543) ++ hw->report_tx_early = 0; ++ else ++ hw->report_tx_early = 1; ++ ++ hw->wait_autoneg_complete = FALSE; ++#endif ++ hw->tbi_compatibility_en = TRUE; ++#if 0 ++ hw->adaptive_ifs = TRUE; ++ ++ /* Copper options */ ++ ++ if(hw->media_type == e1000_media_type_copper) { ++ hw->mdix = AUTO_ALL_MODES; ++ hw->disable_polarity_correction = FALSE; ++ hw->master_slave = E1000_MASTER_SLAVE; ++ } ++#endif ++ return E1000_SUCCESS; ++} ++ ++static void fill_rx (void) ++{ ++ struct e1000_rx_desc *rd; ++ rx_last = rx_tail; ++ rd = rx_base + rx_tail; ++ rx_tail = (rx_tail + 1) % 8; ++ memset (rd, 0, 16); ++ rd->buffer_addr = virt_to_bus(&packet); ++ E1000_WRITE_REG (&hw, RDT, rx_tail); ++} ++ ++static void init_descriptor (void) ++{ ++ unsigned long ptr; ++ unsigned long tctl; ++ ++ ptr = virt_to_phys(tx_pool); ++ if (ptr & 0xf) ++ ptr = (ptr + 0x10) & (~0xf); ++ ++ tx_base = phys_to_virt(ptr); ++ ++ E1000_WRITE_REG (&hw, TDBAL, virt_to_bus(tx_base)); ++ E1000_WRITE_REG (&hw, TDBAH, 0); ++ E1000_WRITE_REG (&hw, TDLEN, 128); ++ ++ /* Setup the HW Tx Head and Tail descriptor pointers */ ++ ++ E1000_WRITE_REG (&hw, TDH, 0); ++ E1000_WRITE_REG (&hw, TDT, 0); ++ tx_tail = 0; ++ ++ /* Program the Transmit Control Register */ ++ ++#ifdef LINUX_DRIVER_TCTL ++ tctl = E1000_READ_REG(&hw, TCTL); ++ ++ tctl &= ~E1000_TCTL_CT; ++ tctl |= E1000_TCTL_EN | E1000_TCTL_PSP | ++ (E1000_COLLISION_THRESHOLD << E1000_CT_SHIFT); ++#else ++ tctl = E1000_TCTL_PSP | E1000_TCTL_EN | ++ (E1000_COLLISION_THRESHOLD << E1000_CT_SHIFT) | ++ (E1000_HDX_COLLISION_DISTANCE << E1000_COLD_SHIFT); ++#endif ++ ++ E1000_WRITE_REG (&hw, TCTL, tctl); ++ ++ e1000_config_collision_dist(&hw); ++ ++ ++ rx_tail = 0; ++ /* disable receive */ ++ E1000_WRITE_REG (&hw, RCTL, 0); ++ ptr = virt_to_phys(rx_pool); ++ if (ptr & 0xf) ++ ptr = (ptr + 0x10) & (~0xf); ++ rx_base = phys_to_virt(ptr); ++ ++ /* Setup the Base and Length of the Rx Descriptor Ring */ ++ ++ E1000_WRITE_REG (&hw, RDBAL, virt_to_bus(rx_base)); ++ E1000_WRITE_REG (&hw, RDBAH, 0); ++ ++ E1000_WRITE_REG (&hw, RDLEN, 128); ++ ++ /* Setup the HW Rx Head and Tail Descriptor Pointers */ ++ E1000_WRITE_REG (&hw, RDH, 0); ++ E1000_WRITE_REG (&hw, RDT, 0); ++ ++ E1000_WRITE_REG (&hw, RCTL, ++ E1000_RCTL_EN | ++ E1000_RCTL_BAM | ++ E1000_RCTL_SZ_2048 | ++ E1000_RCTL_MPE); ++ fill_rx(); ++} ++ ++ ++ ++/************************************************************************** ++POLL - Wait for a frame ++***************************************************************************/ ++static int ++e1000_poll (struct nic *nic, int retrieve) ++{ ++ /* return true if there's an ethernet packet ready to read */ ++ /* nic->packet should contain data on return */ ++ /* nic->packetlen should contain length of data */ ++ struct e1000_rx_desc *rd; ++ ++ rd = rx_base + rx_last; ++ if (!rd->status & E1000_RXD_STAT_DD) ++ return 0; ++ ++ if ( ! retrieve ) return 1; ++ ++ // printf("recv: packet %! -> %! len=%d \n", packet+6, packet,rd->Length); ++ memcpy (nic->packet, packet, rd->length); ++ nic->packetlen = rd->length; ++ fill_rx (); ++ return 1; ++} ++ ++/************************************************************************** ++TRANSMIT - Transmit a frame ++***************************************************************************/ ++static void ++e1000_transmit (struct nic *nic, const char *d, /* Destination */ ++ unsigned int type, /* Type */ ++ unsigned int size, /* size */ ++ const char *p) /* Packet */ ++{ ++ /* send the packet to destination */ ++ struct eth_hdr { ++ unsigned char dst_addr[ETH_ALEN]; ++ unsigned char src_addr[ETH_ALEN]; ++ unsigned short type; ++ } hdr; ++ struct e1000_tx_desc *txhd; /* header */ ++ struct e1000_tx_desc *txp; /* payload */ ++ DEBUGFUNC("send"); ++ ++ memcpy (&hdr.dst_addr, d, ETH_ALEN); ++ memcpy (&hdr.src_addr, nic->node_addr, ETH_ALEN); ++ ++ hdr.type = htons (type); ++ txhd = tx_base + tx_tail; ++ tx_tail = (tx_tail + 1) % 8; ++ txp = tx_base + tx_tail; ++ tx_tail = (tx_tail + 1) % 8; ++ ++ txhd->buffer_addr = virt_to_bus (&hdr); ++ txhd->lower.data = sizeof (hdr); ++ txhd->upper.data = 0; ++ ++ txp->buffer_addr = virt_to_bus(p); ++ txp->lower.data = E1000_TXD_CMD_RPS | E1000_TXD_CMD_EOP | E1000_TXD_CMD_IFCS | size; ++ txp->upper.data = 0; ++ ++ E1000_WRITE_REG (&hw, TDT, tx_tail); ++ while (!(txp->upper.data & E1000_TXD_STAT_DD)) { ++ udelay(10); /* give the nic a chance to write to the register */ ++ poll_interruptions(); ++ } ++ DEBUGFUNC("send end"); ++} ++ ++ ++/************************************************************************** ++DISABLE - Turn off ethernet interface ++***************************************************************************/ ++static void e1000_disable (struct dev *dev __unused) ++{ ++ /* Clear the transmit ring */ ++ E1000_WRITE_REG (&hw, TDH, 0); ++ E1000_WRITE_REG (&hw, TDT, 0); ++ ++ /* Clear the receive ring */ ++ E1000_WRITE_REG (&hw, RDH, 0); ++ E1000_WRITE_REG (&hw, RDT, 0); ++ ++ /* put the card in its initial state */ ++ E1000_WRITE_REG (&hw, CTRL, E1000_CTRL_RST); ++ ++ /* Turn off the ethernet interface */ ++ E1000_WRITE_REG (&hw, RCTL, 0); ++ E1000_WRITE_REG (&hw, TCTL, 0); ++ mdelay (10); ++ ++ /* Unmap my window to the device */ ++ iounmap(hw.hw_addr); ++} ++ ++/************************************************************************** ++IRQ - Enable, Disable, or Force interrupts ++***************************************************************************/ ++static void e1000_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } ++} ++ ++#define IORESOURCE_IO 0x00000100 /* Resource type */ ++#define BAR_0 0 ++#define BAR_1 1 ++#define BAR_5 5 ++ ++/************************************************************************** ++PROBE - Look for an adapter, this routine's visible to the outside ++You should omit the last argument struct pci_device * for a non-PCI NIC ++***************************************************************************/ ++static int e1000_probe(struct dev *dev, struct pci_device *p) ++{ ++ struct nic *nic = (struct nic *)dev; ++ unsigned long mmio_start, mmio_len; ++ int ret_val, i; ++ ++ if (p == 0) ++ return 0; ++ /* Initialize hw with default values */ ++ memset(&hw, 0, sizeof(hw)); ++ hw.pdev = p; ++ ++#if 1 ++ /* Are these variables needed? */ ++ hw.fc = e1000_fc_none; ++#if 0 ++ hw.original_fc = e1000_fc_none; ++#endif ++ hw.autoneg_failed = 0; ++#if 0 ++ hw.get_link_status = TRUE; ++#endif ++#endif ++ ++ mmio_start = pci_bar_start(p, PCI_BASE_ADDRESS_0); ++ mmio_len = pci_bar_size(p, PCI_BASE_ADDRESS_0); ++ hw.hw_addr = ioremap(mmio_start, mmio_len); ++ ++ for(i = BAR_1; i <= BAR_5; i++) { ++ if(pci_bar_size(p, i) == 0) ++ continue; ++ if(pci_find_capability(p, i) & IORESOURCE_IO) { ++ hw.io_base = pci_bar_start(p, i); ++ break; ++ } ++ } ++ ++ adjust_pci_device(p); ++ ++ nic->ioaddr = p->ioaddr & ~3; ++ nic->irqno = 0; ++ ++ /* From Matt Hortman */ ++ /* MAC and Phy settings */ ++ ++ /* setup the private structure */ ++ if (e1000_sw_init(p, &hw) < 0) { ++ iounmap(hw.hw_addr); ++ return 0; ++ } ++ ++ /* make sure the EEPROM is good */ ++ ++ if (e1000_validate_eeprom_checksum(&hw) < 0) { ++ printf ("The EEPROM Checksum Is Not Valid\n"); ++ iounmap(hw.hw_addr); ++ return 0; ++ } ++ ++ /* copy the MAC address out of the EEPROM */ ++ ++ e1000_read_mac_addr(&hw); ++ memcpy (nic->node_addr, hw.mac_addr, ETH_ALEN); ++ ++ printf("Ethernet addr: %!\n", nic->node_addr); ++ ++ /* reset the hardware with the new settings */ ++ ++ ret_val = e1000_reset(&hw); ++ if (ret_val < 0) { ++ if ((ret_val == -E1000_ERR_NOLINK) || ++ (ret_val == -E1000_ERR_TIMEOUT)) { ++ E1000_ERR("Valid Link not detected\n"); ++ } else { ++ E1000_ERR("Hardware Initialization Failed\n"); ++ } ++ iounmap(hw.hw_addr); ++ return 0; ++ } ++ init_descriptor(); ++ ++ /* point to NIC specific routines */ ++ dev->disable = e1000_disable; ++ nic->poll = e1000_poll; ++ nic->transmit = e1000_transmit; ++ nic->irq = e1000_irq; ++ ++ return 1; ++} ++ ++static struct pci_id e1000_nics[] = { ++PCI_ROM(0x8086, 0x1000, "e1000-82542", "Intel EtherExpressPro1000"), ++PCI_ROM(0x8086, 0x1001, "e1000-82543gc-fiber", "Intel EtherExpressPro1000 82543GC Fiber"), ++PCI_ROM(0x8086, 0x1004, "e1000-82543gc-copper", "Intel EtherExpressPro1000 82543GC Copper"), ++PCI_ROM(0x8086, 0x1008, "e1000-82544ei-copper", "Intel EtherExpressPro1000 82544EI Copper"), ++PCI_ROM(0x8086, 0x1009, "e1000-82544ei-fiber", "Intel EtherExpressPro1000 82544EI Fiber"), ++PCI_ROM(0x8086, 0x100C, "e1000-82544gc-copper", "Intel EtherExpressPro1000 82544GC Copper"), ++PCI_ROM(0x8086, 0x100D, "e1000-82544gc-lom", "Intel EtherExpressPro1000 82544GC LOM"), ++PCI_ROM(0x8086, 0x100E, "e1000-82540em", "Intel EtherExpressPro1000 82540EM"), ++PCI_ROM(0x8086, 0x100F, "e1000-82545em-copper", "Intel EtherExpressPro1000 82545EM Copper"), ++PCI_ROM(0x8086, 0x1010, "e1000-82546eb-copper", "Intel EtherExpressPro1000 82546EB Copper"), ++PCI_ROM(0x8086, 0x1011, "e1000-82545em-fiber", "Intel EtherExpressPro1000 82545EM Fiber"), ++PCI_ROM(0x8086, 0x1012, "e1000-82546eb-fiber", "Intel EtherExpressPro1000 82546EB Copper"), ++PCI_ROM(0x8086, 0x1013, "e1000-82541ei", "Intel EtherExpressPro1000 82541EI"), ++PCI_ROM(0x8086, 0x1015, "e1000-82540em-lom", "Intel EtherExpressPro1000 82540EM LOM"), ++PCI_ROM(0x8086, 0x1016, "e1000-82540ep-lom", "Intel EtherExpressPro1000 82540EP LOM"), ++PCI_ROM(0x8086, 0x1017, "e1000-82540ep", "Intel EtherExpressPro1000 82540EP"), ++PCI_ROM(0x8086, 0x1018, "e1000-82541ep", "Intel EtherExpressPro1000 82541EP"), ++PCI_ROM(0x8086, 0x1019, "e1000-82547ei", "Intel EtherExpressPro1000 82547EI"), ++PCI_ROM(0x8086, 0x101d, "e1000-82546eb-quad-copper", "Intel EtherExpressPro1000 82546EB Quad Copper"), ++PCI_ROM(0x8086, 0x101e, "e1000-82540ep-lp", "Intel EtherExpressPro1000 82540EP LP"), ++PCI_ROM(0x8086, 0x1026, "e1000-82545gm-copper", "Intel EtherExpressPro1000 82545GM Copper"), ++PCI_ROM(0x8086, 0x1027, "e1000-82545gm-fiber", "Intel EtherExpressPro1000 82545GM Fiber"), ++PCI_ROM(0x8086, 0x1028, "e1000-82545gm-serdes", "Intel EtherExpressPro1000 82545GM SERDES"), ++PCI_ROM(0x8086, 0x1075, "e1000-82547gi", "Intel EtherExpressPro1000 82547GI"), ++PCI_ROM(0x8086, 0x1076, "e1000-82541gi", "Intel EtherExpressPro1000 82541GI"), ++PCI_ROM(0x8086, 0x1077, "e1000-82541gi-mobile", "Intel EtherExpressPro1000 82541GI Mobile"), ++PCI_ROM(0x8086, 0x1078, "e1000-82541er", "Intel EtherExpressPro1000 82541ER"), ++PCI_ROM(0x8086, 0x1079, "e1000-82546gb-copper", "Intel EtherExpressPro1000 82546GB Copper"), ++PCI_ROM(0x8086, 0x107a, "e1000-82546gb-fiber", "Intel EtherExpressPro1000 82546GB Fiber"), ++PCI_ROM(0x8086, 0x107b, "e1000-82546gb-serdes", "Intel EtherExpressPro1000 82546GB SERDES"), ++}; ++ ++struct pci_driver e1000_driver = { ++ .type = NIC_DRIVER, ++ .name = "E1000", ++ .probe = e1000_probe, ++ .ids = e1000_nics, ++ .id_count = sizeof(e1000_nics)/sizeof(e1000_nics[0]), ++ .class = 0, ++}; +diff -Naur grub-0.97.orig/netboot/e1000_hw.h grub-0.97/netboot/e1000_hw.h +--- grub-0.97.orig/netboot/e1000_hw.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/e1000_hw.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,2058 @@ ++/******************************************************************************* ++ ++ ++ Copyright(c) 1999 - 2003 Intel Corporation. All rights reserved. ++ ++ This program is free software; you can redistribute it and/or modify it ++ under the terms of the GNU General Public License as published by the Free ++ Software Foundation; either version 2 of the License, or (at your option) ++ any later version. ++ ++ This program is distributed in the hope that it will be useful, but WITHOUT ++ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ more details. ++ ++ You should have received a copy of the GNU General Public License along with ++ this program; if not, write to the Free Software Foundation, Inc., 59 ++ Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ ++ The full GNU General Public License is included in this distribution in the ++ file called LICENSE. ++ ++ Contact Information: ++ Linux NICS ++ Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 ++ ++*******************************************************************************/ ++ ++/* e1000_hw.h ++ * Structures, enums, and macros for the MAC ++ */ ++ ++#ifndef _E1000_HW_H_ ++#define _E1000_HW_H_ ++ ++/* Forward declarations of structures used by the shared code */ ++struct e1000_hw; ++struct e1000_hw_stats; ++ ++/* Enumerated types specific to the e1000 hardware */ ++/* Media Access Controlers */ ++typedef enum { ++ e1000_undefined = 0, ++ e1000_82542_rev2_0, ++ e1000_82542_rev2_1, ++ e1000_82543, ++ e1000_82544, ++ e1000_82540, ++ e1000_82545, ++ e1000_82545_rev_3, ++ e1000_82546, ++ e1000_82546_rev_3, ++ e1000_82541, ++ e1000_82541_rev_2, ++ e1000_82547, ++ e1000_82547_rev_2, ++ e1000_num_macs ++} e1000_mac_type; ++ ++typedef enum { ++ e1000_eeprom_uninitialized = 0, ++ e1000_eeprom_spi, ++ e1000_eeprom_microwire, ++ e1000_num_eeprom_types ++} e1000_eeprom_type; ++ ++/* Media Types */ ++typedef enum { ++ e1000_media_type_copper = 0, ++ e1000_media_type_fiber = 1, ++ e1000_media_type_internal_serdes = 2, ++ e1000_num_media_types ++} e1000_media_type; ++ ++typedef enum { ++ e1000_10_half = 0, ++ e1000_10_full = 1, ++ e1000_100_half = 2, ++ e1000_100_full = 3 ++} e1000_speed_duplex_type; ++ ++/* Flow Control Settings */ ++typedef enum { ++ e1000_fc_none = 0, ++ e1000_fc_rx_pause = 1, ++ e1000_fc_tx_pause = 2, ++ e1000_fc_full = 3, ++ e1000_fc_default = 0xFF ++} e1000_fc_type; ++ ++/* PCI bus types */ ++typedef enum { ++ e1000_bus_type_unknown = 0, ++ e1000_bus_type_pci, ++ e1000_bus_type_pcix, ++ e1000_bus_type_reserved ++} e1000_bus_type; ++ ++/* PCI bus speeds */ ++typedef enum { ++ e1000_bus_speed_unknown = 0, ++ e1000_bus_speed_33, ++ e1000_bus_speed_66, ++ e1000_bus_speed_100, ++ e1000_bus_speed_120, ++ e1000_bus_speed_133, ++ e1000_bus_speed_reserved ++} e1000_bus_speed; ++ ++/* PCI bus widths */ ++typedef enum { ++ e1000_bus_width_unknown = 0, ++ e1000_bus_width_32, ++ e1000_bus_width_64, ++ e1000_bus_width_reserved ++} e1000_bus_width; ++ ++/* PHY status info structure and supporting enums */ ++typedef enum { ++ e1000_cable_length_50 = 0, ++ e1000_cable_length_50_80, ++ e1000_cable_length_80_110, ++ e1000_cable_length_110_140, ++ e1000_cable_length_140, ++ e1000_cable_length_undefined = 0xFF ++} e1000_cable_length; ++ ++typedef enum { ++ e1000_igp_cable_length_10 = 10, ++ e1000_igp_cable_length_20 = 20, ++ e1000_igp_cable_length_30 = 30, ++ e1000_igp_cable_length_40 = 40, ++ e1000_igp_cable_length_50 = 50, ++ e1000_igp_cable_length_60 = 60, ++ e1000_igp_cable_length_70 = 70, ++ e1000_igp_cable_length_80 = 80, ++ e1000_igp_cable_length_90 = 90, ++ e1000_igp_cable_length_100 = 100, ++ e1000_igp_cable_length_110 = 110, ++ e1000_igp_cable_length_120 = 120, ++ e1000_igp_cable_length_130 = 130, ++ e1000_igp_cable_length_140 = 140, ++ e1000_igp_cable_length_150 = 150, ++ e1000_igp_cable_length_160 = 160, ++ e1000_igp_cable_length_170 = 170, ++ e1000_igp_cable_length_180 = 180 ++} e1000_igp_cable_length; ++ ++typedef enum { ++ e1000_10bt_ext_dist_enable_normal = 0, ++ e1000_10bt_ext_dist_enable_lower, ++ e1000_10bt_ext_dist_enable_undefined = 0xFF ++} e1000_10bt_ext_dist_enable; ++ ++typedef enum { ++ e1000_rev_polarity_normal = 0, ++ e1000_rev_polarity_reversed, ++ e1000_rev_polarity_undefined = 0xFF ++} e1000_rev_polarity; ++ ++typedef enum { ++ e1000_downshift_normal = 0, ++ e1000_downshift_activated, ++ e1000_downshift_undefined = 0xFF ++} e1000_downshift; ++ ++typedef enum { ++ e1000_polarity_reversal_enabled = 0, ++ e1000_polarity_reversal_disabled, ++ e1000_polarity_reversal_undefined = 0xFF ++} e1000_polarity_reversal; ++ ++typedef enum { ++ e1000_auto_x_mode_manual_mdi = 0, ++ e1000_auto_x_mode_manual_mdix, ++ e1000_auto_x_mode_auto1, ++ e1000_auto_x_mode_auto2, ++ e1000_auto_x_mode_undefined = 0xFF ++} e1000_auto_x_mode; ++ ++typedef enum { ++ e1000_1000t_rx_status_not_ok = 0, ++ e1000_1000t_rx_status_ok, ++ e1000_1000t_rx_status_undefined = 0xFF ++} e1000_1000t_rx_status; ++ ++typedef enum { ++ e1000_phy_m88 = 0, ++ e1000_phy_igp, ++ e1000_phy_undefined = 0xFF ++} e1000_phy_type; ++ ++typedef enum { ++ e1000_ms_hw_default = 0, ++ e1000_ms_force_master, ++ e1000_ms_force_slave, ++ e1000_ms_auto ++} e1000_ms_type; ++ ++typedef enum { ++ e1000_ffe_config_enabled = 0, ++ e1000_ffe_config_active, ++ e1000_ffe_config_blocked ++} e1000_ffe_config; ++ ++typedef enum { ++ e1000_dsp_config_disabled = 0, ++ e1000_dsp_config_enabled, ++ e1000_dsp_config_activated, ++ e1000_dsp_config_undefined = 0xFF ++} e1000_dsp_config; ++ ++struct e1000_phy_info { ++ e1000_cable_length cable_length; ++ e1000_10bt_ext_dist_enable extended_10bt_distance; ++ e1000_rev_polarity cable_polarity; ++ e1000_downshift downshift; ++ e1000_polarity_reversal polarity_correction; ++ e1000_auto_x_mode mdix_mode; ++ e1000_1000t_rx_status local_rx; ++ e1000_1000t_rx_status remote_rx; ++}; ++ ++struct e1000_phy_stats { ++ uint32_t idle_errors; ++ uint32_t receive_errors; ++}; ++ ++struct e1000_eeprom_info { ++ e1000_eeprom_type type; ++ uint16_t word_size; ++ uint16_t opcode_bits; ++ uint16_t address_bits; ++ uint16_t delay_usec; ++ uint16_t page_size; ++}; ++ ++ ++ ++/* Error Codes */ ++#define E1000_SUCCESS 0 ++#define E1000_ERR_EEPROM 1 ++#define E1000_ERR_PHY 2 ++#define E1000_ERR_CONFIG 3 ++#define E1000_ERR_PARAM 4 ++#define E1000_ERR_MAC_TYPE 5 ++#define E1000_ERR_PHY_TYPE 6 ++#define E1000_ERR_NOLINK 7 ++#define E1000_ERR_TIMEOUT 8 ++ ++#define E1000_READ_REG_IO(a, reg) \ ++ e1000_read_reg_io((a), E1000_##reg) ++#define E1000_WRITE_REG_IO(a, reg, val) \ ++ e1000_write_reg_io((a), E1000_##reg, val) ++ ++/* PCI Device IDs */ ++#define E1000_DEV_ID_82542 0x1000 ++#define E1000_DEV_ID_82543GC_FIBER 0x1001 ++#define E1000_DEV_ID_82543GC_COPPER 0x1004 ++#define E1000_DEV_ID_82544EI_COPPER 0x1008 ++#define E1000_DEV_ID_82544EI_FIBER 0x1009 ++#define E1000_DEV_ID_82544GC_COPPER 0x100C ++#define E1000_DEV_ID_82544GC_LOM 0x100D ++#define E1000_DEV_ID_82540EM 0x100E ++#define E1000_DEV_ID_82540EM_LOM 0x1015 ++#define E1000_DEV_ID_82540EP_LOM 0x1016 ++#define E1000_DEV_ID_82540EP 0x1017 ++#define E1000_DEV_ID_82540EP_LP 0x101E ++#define E1000_DEV_ID_82545EM_COPPER 0x100F ++#define E1000_DEV_ID_82545EM_FIBER 0x1011 ++#define E1000_DEV_ID_82545GM_COPPER 0x1026 ++#define E1000_DEV_ID_82545GM_FIBER 0x1027 ++#define E1000_DEV_ID_82545GM_SERDES 0x1028 ++#define E1000_DEV_ID_82546EB_COPPER 0x1010 ++#define E1000_DEV_ID_82546EB_FIBER 0x1012 ++#define E1000_DEV_ID_82546EB_QUAD_COPPER 0x101D ++#define E1000_DEV_ID_82541EI 0x1013 ++#define E1000_DEV_ID_82541EI_MOBILE 0x1018 ++#define E1000_DEV_ID_82541ER 0x1078 ++#define E1000_DEV_ID_82547GI 0x1075 ++#define E1000_DEV_ID_82541GI 0x1076 ++#define E1000_DEV_ID_82541GI_MOBILE 0x1077 ++#define E1000_DEV_ID_82546GB_COPPER 0x1079 ++#define E1000_DEV_ID_82546GB_FIBER 0x107A ++#define E1000_DEV_ID_82546GB_SERDES 0x107B ++#define E1000_DEV_ID_82547EI 0x1019 ++ ++#define NODE_ADDRESS_SIZE 6 ++#define ETH_LENGTH_OF_ADDRESS 6 ++ ++/* MAC decode size is 128K - This is the size of BAR0 */ ++#define MAC_DECODE_SIZE (128 * 1024) ++ ++#define E1000_82542_2_0_REV_ID 2 ++#define E1000_82542_2_1_REV_ID 3 ++ ++#define SPEED_10 10 ++#define SPEED_100 100 ++#define SPEED_1000 1000 ++#define HALF_DUPLEX 1 ++#define FULL_DUPLEX 2 ++ ++/* The sizes (in bytes) of a ethernet packet */ ++#define ENET_HEADER_SIZE 14 ++#define MAXIMUM_ETHERNET_FRAME_SIZE 1518 /* With FCS */ ++#define MINIMUM_ETHERNET_FRAME_SIZE 64 /* With FCS */ ++#define ETHERNET_FCS_SIZE 4 ++#define MAXIMUM_ETHERNET_PACKET_SIZE \ ++ (MAXIMUM_ETHERNET_FRAME_SIZE - ETHERNET_FCS_SIZE) ++#define MINIMUM_ETHERNET_PACKET_SIZE \ ++ (MINIMUM_ETHERNET_FRAME_SIZE - ETHERNET_FCS_SIZE) ++#define CRC_LENGTH ETHERNET_FCS_SIZE ++#define MAX_JUMBO_FRAME_SIZE 0x3F00 ++ ++ ++/* 802.1q VLAN Packet Sizes */ ++#define VLAN_TAG_SIZE 4 /* 802.3ac tag (not DMAed) */ ++ ++/* Ethertype field values */ ++#define ETHERNET_IEEE_VLAN_TYPE 0x8100 /* 802.3ac packet */ ++#define ETHERNET_IP_TYPE 0x0800 /* IP packets */ ++#define ETHERNET_ARP_TYPE 0x0806 /* Address Resolution Protocol (ARP) */ ++ ++/* Packet Header defines */ ++#define IP_PROTOCOL_TCP 6 ++#define IP_PROTOCOL_UDP 0x11 ++ ++/* This defines the bits that are set in the Interrupt Mask ++ * Set/Read Register. Each bit is documented below: ++ * o RXDMT0 = Receive Descriptor Minimum Threshold hit (ring 0) ++ * o RXSEQ = Receive Sequence Error ++ */ ++#define POLL_IMS_ENABLE_MASK ( \ ++ E1000_IMS_RXDMT0 | \ ++ E1000_IMS_RXSEQ) ++ ++/* This defines the bits that are set in the Interrupt Mask ++ * Set/Read Register. Each bit is documented below: ++ * o RXT0 = Receiver Timer Interrupt (ring 0) ++ * o TXDW = Transmit Descriptor Written Back ++ * o RXDMT0 = Receive Descriptor Minimum Threshold hit (ring 0) ++ * o RXSEQ = Receive Sequence Error ++ * o LSC = Link Status Change ++ */ ++#define IMS_ENABLE_MASK ( \ ++ E1000_IMS_RXT0 | \ ++ E1000_IMS_TXDW | \ ++ E1000_IMS_RXDMT0 | \ ++ E1000_IMS_RXSEQ | \ ++ E1000_IMS_LSC) ++ ++/* Number of high/low register pairs in the RAR. The RAR (Receive Address ++ * Registers) holds the directed and multicast addresses that we monitor. We ++ * reserve one of these spots for our directed address, allowing us room for ++ * E1000_RAR_ENTRIES - 1 multicast addresses. ++ */ ++#define E1000_RAR_ENTRIES 15 ++ ++#define MIN_NUMBER_OF_DESCRIPTORS 8 ++#define MAX_NUMBER_OF_DESCRIPTORS 0xFFF8 ++ ++/* Receive Descriptor */ ++struct e1000_rx_desc { ++ uint64_t buffer_addr; /* Address of the descriptor's data buffer */ ++ uint16_t length; /* Length of data DMAed into data buffer */ ++ uint16_t csum; /* Packet checksum */ ++ uint8_t status; /* Descriptor status */ ++ uint8_t errors; /* Descriptor Errors */ ++ uint16_t special; ++}; ++ ++/* Receive Decriptor bit definitions */ ++#define E1000_RXD_STAT_DD 0x01 /* Descriptor Done */ ++#define E1000_RXD_STAT_EOP 0x02 /* End of Packet */ ++#define E1000_RXD_STAT_IXSM 0x04 /* Ignore checksum */ ++#define E1000_RXD_STAT_VP 0x08 /* IEEE VLAN Packet */ ++#define E1000_RXD_STAT_TCPCS 0x20 /* TCP xsum calculated */ ++#define E1000_RXD_STAT_IPCS 0x40 /* IP xsum calculated */ ++#define E1000_RXD_STAT_PIF 0x80 /* passed in-exact filter */ ++#define E1000_RXD_ERR_CE 0x01 /* CRC Error */ ++#define E1000_RXD_ERR_SE 0x02 /* Symbol Error */ ++#define E1000_RXD_ERR_SEQ 0x04 /* Sequence Error */ ++#define E1000_RXD_ERR_CXE 0x10 /* Carrier Extension Error */ ++#define E1000_RXD_ERR_TCPE 0x20 /* TCP/UDP Checksum Error */ ++#define E1000_RXD_ERR_IPE 0x40 /* IP Checksum Error */ ++#define E1000_RXD_ERR_RXE 0x80 /* Rx Data Error */ ++#define E1000_RXD_SPC_VLAN_MASK 0x0FFF /* VLAN ID is in lower 12 bits */ ++#define E1000_RXD_SPC_PRI_MASK 0xE000 /* Priority is in upper 3 bits */ ++#define E1000_RXD_SPC_PRI_SHIFT 0x000D /* Priority is in upper 3 of 16 */ ++#define E1000_RXD_SPC_CFI_MASK 0x1000 /* CFI is bit 12 */ ++#define E1000_RXD_SPC_CFI_SHIFT 0x000C /* CFI is bit 12 */ ++ ++/* mask to determine if packets should be dropped due to frame errors */ ++#define E1000_RXD_ERR_FRAME_ERR_MASK ( \ ++ E1000_RXD_ERR_CE | \ ++ E1000_RXD_ERR_SE | \ ++ E1000_RXD_ERR_SEQ | \ ++ E1000_RXD_ERR_CXE | \ ++ E1000_RXD_ERR_RXE) ++ ++/* Transmit Descriptor */ ++struct e1000_tx_desc { ++ uint64_t buffer_addr; /* Address of the descriptor's data buffer */ ++ union { ++ uint32_t data; ++ struct { ++ uint16_t length; /* Data buffer length */ ++ uint8_t cso; /* Checksum offset */ ++ uint8_t cmd; /* Descriptor control */ ++ } flags; ++ } lower; ++ union { ++ uint32_t data; ++ struct { ++ uint8_t status; /* Descriptor status */ ++ uint8_t css; /* Checksum start */ ++ uint16_t special; ++ } fields; ++ } upper; ++}; ++ ++/* Transmit Descriptor bit definitions */ ++#define E1000_TXD_DTYP_D 0x00100000 /* Data Descriptor */ ++#define E1000_TXD_DTYP_C 0x00000000 /* Context Descriptor */ ++#define E1000_TXD_POPTS_IXSM 0x01 /* Insert IP checksum */ ++#define E1000_TXD_POPTS_TXSM 0x02 /* Insert TCP/UDP checksum */ ++#define E1000_TXD_CMD_EOP 0x01000000 /* End of Packet */ ++#define E1000_TXD_CMD_IFCS 0x02000000 /* Insert FCS (Ethernet CRC) */ ++#define E1000_TXD_CMD_IC 0x04000000 /* Insert Checksum */ ++#define E1000_TXD_CMD_RS 0x08000000 /* Report Status */ ++#define E1000_TXD_CMD_RPS 0x10000000 /* Report Packet Sent */ ++#define E1000_TXD_CMD_DEXT 0x20000000 /* Descriptor extension (0 = legacy) */ ++#define E1000_TXD_CMD_VLE 0x40000000 /* Add VLAN tag */ ++#define E1000_TXD_CMD_IDE 0x80000000 /* Enable Tidv register */ ++#define E1000_TXD_STAT_DD 0x00000001 /* Descriptor Done */ ++#define E1000_TXD_STAT_EC 0x00000002 /* Excess Collisions */ ++#define E1000_TXD_STAT_LC 0x00000004 /* Late Collisions */ ++#define E1000_TXD_STAT_TU 0x00000008 /* Transmit underrun */ ++#define E1000_TXD_CMD_TCP 0x01000000 /* TCP packet */ ++#define E1000_TXD_CMD_IP 0x02000000 /* IP packet */ ++#define E1000_TXD_CMD_TSE 0x04000000 /* TCP Seg enable */ ++#define E1000_TXD_STAT_TC 0x00000004 /* Tx Underrun */ ++ ++/* Offload Context Descriptor */ ++struct e1000_context_desc { ++ union { ++ uint32_t ip_config; ++ struct { ++ uint8_t ipcss; /* IP checksum start */ ++ uint8_t ipcso; /* IP checksum offset */ ++ uint16_t ipcse; /* IP checksum end */ ++ } ip_fields; ++ } lower_setup; ++ union { ++ uint32_t tcp_config; ++ struct { ++ uint8_t tucss; /* TCP checksum start */ ++ uint8_t tucso; /* TCP checksum offset */ ++ uint16_t tucse; /* TCP checksum end */ ++ } tcp_fields; ++ } upper_setup; ++ uint32_t cmd_and_length; /* */ ++ union { ++ uint32_t data; ++ struct { ++ uint8_t status; /* Descriptor status */ ++ uint8_t hdr_len; /* Header length */ ++ uint16_t mss; /* Maximum segment size */ ++ } fields; ++ } tcp_seg_setup; ++}; ++ ++/* Offload data descriptor */ ++struct e1000_data_desc { ++ uint64_t buffer_addr; /* Address of the descriptor's buffer address */ ++ union { ++ uint32_t data; ++ struct { ++ uint16_t length; /* Data buffer length */ ++ uint8_t typ_len_ext; /* */ ++ uint8_t cmd; /* */ ++ } flags; ++ } lower; ++ union { ++ uint32_t data; ++ struct { ++ uint8_t status; /* Descriptor status */ ++ uint8_t popts; /* Packet Options */ ++ uint16_t special; /* */ ++ } fields; ++ } upper; ++}; ++ ++/* Filters */ ++#define E1000_NUM_UNICAST 16 /* Unicast filter entries */ ++#define E1000_MC_TBL_SIZE 128 /* Multicast Filter Table (4096 bits) */ ++#define E1000_VLAN_FILTER_TBL_SIZE 128 /* VLAN Filter Table (4096 bits) */ ++ ++ ++/* Receive Address Register */ ++struct e1000_rar { ++ volatile uint32_t low; /* receive address low */ ++ volatile uint32_t high; /* receive address high */ ++}; ++ ++/* Number of entries in the Multicast Table Array (MTA). */ ++#define E1000_NUM_MTA_REGISTERS 128 ++ ++/* IPv4 Address Table Entry */ ++struct e1000_ipv4_at_entry { ++ volatile uint32_t ipv4_addr; /* IP Address (RW) */ ++ volatile uint32_t reserved; ++}; ++ ++/* Four wakeup IP addresses are supported */ ++#define E1000_WAKEUP_IP_ADDRESS_COUNT_MAX 4 ++#define E1000_IP4AT_SIZE E1000_WAKEUP_IP_ADDRESS_COUNT_MAX ++#define E1000_IP6AT_SIZE 1 ++ ++/* IPv6 Address Table Entry */ ++struct e1000_ipv6_at_entry { ++ volatile uint8_t ipv6_addr[16]; ++}; ++ ++/* Flexible Filter Length Table Entry */ ++struct e1000_fflt_entry { ++ volatile uint32_t length; /* Flexible Filter Length (RW) */ ++ volatile uint32_t reserved; ++}; ++ ++/* Flexible Filter Mask Table Entry */ ++struct e1000_ffmt_entry { ++ volatile uint32_t mask; /* Flexible Filter Mask (RW) */ ++ volatile uint32_t reserved; ++}; ++ ++/* Flexible Filter Value Table Entry */ ++struct e1000_ffvt_entry { ++ volatile uint32_t value; /* Flexible Filter Value (RW) */ ++ volatile uint32_t reserved; ++}; ++ ++/* Four Flexible Filters are supported */ ++#define E1000_FLEXIBLE_FILTER_COUNT_MAX 4 ++ ++/* Each Flexible Filter is at most 128 (0x80) bytes in length */ ++#define E1000_FLEXIBLE_FILTER_SIZE_MAX 128 ++ ++#define E1000_FFLT_SIZE E1000_FLEXIBLE_FILTER_COUNT_MAX ++#define E1000_FFMT_SIZE E1000_FLEXIBLE_FILTER_SIZE_MAX ++#define E1000_FFVT_SIZE E1000_FLEXIBLE_FILTER_SIZE_MAX ++ ++/* Register Set. (82543, 82544) ++ * ++ * Registers are defined to be 32 bits and should be accessed as 32 bit values. ++ * These registers are physically located on the NIC, but are mapped into the ++ * host memory address space. ++ * ++ * RW - register is both readable and writable ++ * RO - register is read only ++ * WO - register is write only ++ * R/clr - register is read only and is cleared when read ++ * A - register array ++ */ ++#define E1000_CTRL 0x00000 /* Device Control - RW */ ++#define E1000_CTRL_DUP 0x00004 /* Device Control Duplicate (Shadow) - RW */ ++#define E1000_STATUS 0x00008 /* Device Status - RO */ ++#define E1000_EECD 0x00010 /* EEPROM/Flash Control - RW */ ++#define E1000_EERD 0x00014 /* EEPROM Read - RW */ ++#define E1000_CTRL_EXT 0x00018 /* Extended Device Control - RW */ ++#define E1000_FLA 0x0001C /* Flash Access - RW */ ++#define E1000_MDIC 0x00020 /* MDI Control - RW */ ++#define E1000_FCAL 0x00028 /* Flow Control Address Low - RW */ ++#define E1000_FCAH 0x0002C /* Flow Control Address High -RW */ ++#define E1000_FCT 0x00030 /* Flow Control Type - RW */ ++#define E1000_VET 0x00038 /* VLAN Ether Type - RW */ ++#define E1000_ICR 0x000C0 /* Interrupt Cause Read - R/clr */ ++#define E1000_ITR 0x000C4 /* Interrupt Throttling Rate - RW */ ++#define E1000_ICS 0x000C8 /* Interrupt Cause Set - WO */ ++#define E1000_IMS 0x000D0 /* Interrupt Mask Set - RW */ ++#define E1000_IMC 0x000D8 /* Interrupt Mask Clear - WO */ ++#define E1000_RCTL 0x00100 /* RX Control - RW */ ++#define E1000_FCTTV 0x00170 /* Flow Control Transmit Timer Value - RW */ ++#define E1000_TXCW 0x00178 /* TX Configuration Word - RW */ ++#define E1000_RXCW 0x00180 /* RX Configuration Word - RO */ ++#define E1000_TCTL 0x00400 /* TX Control - RW */ ++#define E1000_TIPG 0x00410 /* TX Inter-packet gap -RW */ ++#define E1000_TBT 0x00448 /* TX Burst Timer - RW */ ++#define E1000_AIT 0x00458 /* Adaptive Interframe Spacing Throttle - RW */ ++#define E1000_LEDCTL 0x00E00 /* LED Control - RW */ ++#define E1000_PBA 0x01000 /* Packet Buffer Allocation - RW */ ++#define E1000_FCRTL 0x02160 /* Flow Control Receive Threshold Low - RW */ ++#define E1000_FCRTH 0x02168 /* Flow Control Receive Threshold High - RW */ ++#define E1000_RDBAL 0x02800 /* RX Descriptor Base Address Low - RW */ ++#define E1000_RDBAH 0x02804 /* RX Descriptor Base Address High - RW */ ++#define E1000_RDLEN 0x02808 /* RX Descriptor Length - RW */ ++#define E1000_RDH 0x02810 /* RX Descriptor Head - RW */ ++#define E1000_RDT 0x02818 /* RX Descriptor Tail - RW */ ++#define E1000_RDTR 0x02820 /* RX Delay Timer - RW */ ++#define E1000_RXDCTL 0x02828 /* RX Descriptor Control - RW */ ++#define E1000_RADV 0x0282C /* RX Interrupt Absolute Delay Timer - RW */ ++#define E1000_RSRPD 0x02C00 /* RX Small Packet Detect - RW */ ++#define E1000_TXDMAC 0x03000 /* TX DMA Control - RW */ ++#define E1000_TDFH 0x03410 /* TX Data FIFO Head - RW */ ++#define E1000_TDFT 0x03418 /* TX Data FIFO Tail - RW */ ++#define E1000_TDFHS 0x03420 /* TX Data FIFO Head Saved - RW */ ++#define E1000_TDFTS 0x03428 /* TX Data FIFO Tail Saved - RW */ ++#define E1000_TDFPC 0x03430 /* TX Data FIFO Packet Count - RW */ ++#define E1000_TDBAL 0x03800 /* TX Descriptor Base Address Low - RW */ ++#define E1000_TDBAH 0x03804 /* TX Descriptor Base Address High - RW */ ++#define E1000_TDLEN 0x03808 /* TX Descriptor Length - RW */ ++#define E1000_TDH 0x03810 /* TX Descriptor Head - RW */ ++#define E1000_TDT 0x03818 /* TX Descripotr Tail - RW */ ++#define E1000_TIDV 0x03820 /* TX Interrupt Delay Value - RW */ ++#define E1000_TXDCTL 0x03828 /* TX Descriptor Control - RW */ ++#define E1000_TADV 0x0382C /* TX Interrupt Absolute Delay Val - RW */ ++#define E1000_TSPMT 0x03830 /* TCP Segmentation PAD & Min Threshold - RW */ ++#define E1000_CRCERRS 0x04000 /* CRC Error Count - R/clr */ ++#define E1000_ALGNERRC 0x04004 /* Alignment Error Count - R/clr */ ++#define E1000_SYMERRS 0x04008 /* Symbol Error Count - R/clr */ ++#define E1000_RXERRC 0x0400C /* Receive Error Count - R/clr */ ++#define E1000_MPC 0x04010 /* Missed Packet Count - R/clr */ ++#define E1000_SCC 0x04014 /* Single Collision Count - R/clr */ ++#define E1000_ECOL 0x04018 /* Excessive Collision Count - R/clr */ ++#define E1000_MCC 0x0401C /* Multiple Collision Count - R/clr */ ++#define E1000_LATECOL 0x04020 /* Late Collision Count - R/clr */ ++#define E1000_COLC 0x04028 /* Collision Count - R/clr */ ++#define E1000_DC 0x04030 /* Defer Count - R/clr */ ++#define E1000_TNCRS 0x04034 /* TX-No CRS - R/clr */ ++#define E1000_SEC 0x04038 /* Sequence Error Count - R/clr */ ++#define E1000_CEXTERR 0x0403C /* Carrier Extension Error Count - R/clr */ ++#define E1000_RLEC 0x04040 /* Receive Length Error Count - R/clr */ ++#define E1000_XONRXC 0x04048 /* XON RX Count - R/clr */ ++#define E1000_XONTXC 0x0404C /* XON TX Count - R/clr */ ++#define E1000_XOFFRXC 0x04050 /* XOFF RX Count - R/clr */ ++#define E1000_XOFFTXC 0x04054 /* XOFF TX Count - R/clr */ ++#define E1000_FCRUC 0x04058 /* Flow Control RX Unsupported Count- R/clr */ ++#define E1000_PRC64 0x0405C /* Packets RX (64 bytes) - R/clr */ ++#define E1000_PRC127 0x04060 /* Packets RX (65-127 bytes) - R/clr */ ++#define E1000_PRC255 0x04064 /* Packets RX (128-255 bytes) - R/clr */ ++#define E1000_PRC511 0x04068 /* Packets RX (255-511 bytes) - R/clr */ ++#define E1000_PRC1023 0x0406C /* Packets RX (512-1023 bytes) - R/clr */ ++#define E1000_PRC1522 0x04070 /* Packets RX (1024-1522 bytes) - R/clr */ ++#define E1000_GPRC 0x04074 /* Good Packets RX Count - R/clr */ ++#define E1000_BPRC 0x04078 /* Broadcast Packets RX Count - R/clr */ ++#define E1000_MPRC 0x0407C /* Multicast Packets RX Count - R/clr */ ++#define E1000_GPTC 0x04080 /* Good Packets TX Count - R/clr */ ++#define E1000_GORCL 0x04088 /* Good Octets RX Count Low - R/clr */ ++#define E1000_GORCH 0x0408C /* Good Octets RX Count High - R/clr */ ++#define E1000_GOTCL 0x04090 /* Good Octets TX Count Low - R/clr */ ++#define E1000_GOTCH 0x04094 /* Good Octets TX Count High - R/clr */ ++#define E1000_RNBC 0x040A0 /* RX No Buffers Count - R/clr */ ++#define E1000_RUC 0x040A4 /* RX Undersize Count - R/clr */ ++#define E1000_RFC 0x040A8 /* RX Fragment Count - R/clr */ ++#define E1000_ROC 0x040AC /* RX Oversize Count - R/clr */ ++#define E1000_RJC 0x040B0 /* RX Jabber Count - R/clr */ ++#define E1000_MGTPRC 0x040B4 /* Management Packets RX Count - R/clr */ ++#define E1000_MGTPDC 0x040B8 /* Management Packets Dropped Count - R/clr */ ++#define E1000_MGTPTC 0x040BC /* Management Packets TX Count - R/clr */ ++#define E1000_TORL 0x040C0 /* Total Octets RX Low - R/clr */ ++#define E1000_TORH 0x040C4 /* Total Octets RX High - R/clr */ ++#define E1000_TOTL 0x040C8 /* Total Octets TX Low - R/clr */ ++#define E1000_TOTH 0x040CC /* Total Octets TX High - R/clr */ ++#define E1000_TPR 0x040D0 /* Total Packets RX - R/clr */ ++#define E1000_TPT 0x040D4 /* Total Packets TX - R/clr */ ++#define E1000_PTC64 0x040D8 /* Packets TX (64 bytes) - R/clr */ ++#define E1000_PTC127 0x040DC /* Packets TX (65-127 bytes) - R/clr */ ++#define E1000_PTC255 0x040E0 /* Packets TX (128-255 bytes) - R/clr */ ++#define E1000_PTC511 0x040E4 /* Packets TX (256-511 bytes) - R/clr */ ++#define E1000_PTC1023 0x040E8 /* Packets TX (512-1023 bytes) - R/clr */ ++#define E1000_PTC1522 0x040EC /* Packets TX (1024-1522 Bytes) - R/clr */ ++#define E1000_MPTC 0x040F0 /* Multicast Packets TX Count - R/clr */ ++#define E1000_BPTC 0x040F4 /* Broadcast Packets TX Count - R/clr */ ++#define E1000_TSCTC 0x040F8 /* TCP Segmentation Context TX - R/clr */ ++#define E1000_TSCTFC 0x040FC /* TCP Segmentation Context TX Fail - R/clr */ ++#define E1000_RXCSUM 0x05000 /* RX Checksum Control - RW */ ++#define E1000_MTA 0x05200 /* Multicast Table Array - RW Array */ ++#define E1000_RA 0x05400 /* Receive Address - RW Array */ ++#define E1000_VFTA 0x05600 /* VLAN Filter Table Array - RW Array */ ++#define E1000_WUC 0x05800 /* Wakeup Control - RW */ ++#define E1000_WUFC 0x05808 /* Wakeup Filter Control - RW */ ++#define E1000_WUS 0x05810 /* Wakeup Status - RO */ ++#define E1000_MANC 0x05820 /* Management Control - RW */ ++#define E1000_IPAV 0x05838 /* IP Address Valid - RW */ ++#define E1000_IP4AT 0x05840 /* IPv4 Address Table - RW Array */ ++#define E1000_IP6AT 0x05880 /* IPv6 Address Table - RW Array */ ++#define E1000_WUPL 0x05900 /* Wakeup Packet Length - RW */ ++#define E1000_WUPM 0x05A00 /* Wakeup Packet Memory - RO A */ ++#define E1000_FFLT 0x05F00 /* Flexible Filter Length Table - RW Array */ ++#define E1000_FFMT 0x09000 /* Flexible Filter Mask Table - RW Array */ ++#define E1000_FFVT 0x09800 /* Flexible Filter Value Table - RW Array */ ++ ++/* Register Set (82542) ++ * ++ * Some of the 82542 registers are located at different offsets than they are ++ * in more current versions of the 8254x. Despite the difference in location, ++ * the registers function in the same manner. ++ */ ++#define E1000_82542_CTRL E1000_CTRL ++#define E1000_82542_CTRL_DUP E1000_CTRL_DUP ++#define E1000_82542_STATUS E1000_STATUS ++#define E1000_82542_EECD E1000_EECD ++#define E1000_82542_EERD E1000_EERD ++#define E1000_82542_CTRL_EXT E1000_CTRL_EXT ++#define E1000_82542_FLA E1000_FLA ++#define E1000_82542_MDIC E1000_MDIC ++#define E1000_82542_FCAL E1000_FCAL ++#define E1000_82542_FCAH E1000_FCAH ++#define E1000_82542_FCT E1000_FCT ++#define E1000_82542_VET E1000_VET ++#define E1000_82542_RA 0x00040 ++#define E1000_82542_ICR E1000_ICR ++#define E1000_82542_ITR E1000_ITR ++#define E1000_82542_ICS E1000_ICS ++#define E1000_82542_IMS E1000_IMS ++#define E1000_82542_IMC E1000_IMC ++#define E1000_82542_RCTL E1000_RCTL ++#define E1000_82542_RDTR 0x00108 ++#define E1000_82542_RDBAL 0x00110 ++#define E1000_82542_RDBAH 0x00114 ++#define E1000_82542_RDLEN 0x00118 ++#define E1000_82542_RDH 0x00120 ++#define E1000_82542_RDT 0x00128 ++#define E1000_82542_FCRTH 0x00160 ++#define E1000_82542_FCRTL 0x00168 ++#define E1000_82542_FCTTV E1000_FCTTV ++#define E1000_82542_TXCW E1000_TXCW ++#define E1000_82542_RXCW E1000_RXCW ++#define E1000_82542_MTA 0x00200 ++#define E1000_82542_TCTL E1000_TCTL ++#define E1000_82542_TIPG E1000_TIPG ++#define E1000_82542_TDBAL 0x00420 ++#define E1000_82542_TDBAH 0x00424 ++#define E1000_82542_TDLEN 0x00428 ++#define E1000_82542_TDH 0x00430 ++#define E1000_82542_TDT 0x00438 ++#define E1000_82542_TIDV 0x00440 ++#define E1000_82542_TBT E1000_TBT ++#define E1000_82542_AIT E1000_AIT ++#define E1000_82542_VFTA 0x00600 ++#define E1000_82542_LEDCTL E1000_LEDCTL ++#define E1000_82542_PBA E1000_PBA ++#define E1000_82542_RXDCTL E1000_RXDCTL ++#define E1000_82542_RADV E1000_RADV ++#define E1000_82542_RSRPD E1000_RSRPD ++#define E1000_82542_TXDMAC E1000_TXDMAC ++#define E1000_82542_TDFHS E1000_TDFHS ++#define E1000_82542_TDFTS E1000_TDFTS ++#define E1000_82542_TDFPC E1000_TDFPC ++#define E1000_82542_TXDCTL E1000_TXDCTL ++#define E1000_82542_TADV E1000_TADV ++#define E1000_82542_TSPMT E1000_TSPMT ++#define E1000_82542_CRCERRS E1000_CRCERRS ++#define E1000_82542_ALGNERRC E1000_ALGNERRC ++#define E1000_82542_SYMERRS E1000_SYMERRS ++#define E1000_82542_RXERRC E1000_RXERRC ++#define E1000_82542_MPC E1000_MPC ++#define E1000_82542_SCC E1000_SCC ++#define E1000_82542_ECOL E1000_ECOL ++#define E1000_82542_MCC E1000_MCC ++#define E1000_82542_LATECOL E1000_LATECOL ++#define E1000_82542_COLC E1000_COLC ++#define E1000_82542_DC E1000_DC ++#define E1000_82542_TNCRS E1000_TNCRS ++#define E1000_82542_SEC E1000_SEC ++#define E1000_82542_CEXTERR E1000_CEXTERR ++#define E1000_82542_RLEC E1000_RLEC ++#define E1000_82542_XONRXC E1000_XONRXC ++#define E1000_82542_XONTXC E1000_XONTXC ++#define E1000_82542_XOFFRXC E1000_XOFFRXC ++#define E1000_82542_XOFFTXC E1000_XOFFTXC ++#define E1000_82542_FCRUC E1000_FCRUC ++#define E1000_82542_PRC64 E1000_PRC64 ++#define E1000_82542_PRC127 E1000_PRC127 ++#define E1000_82542_PRC255 E1000_PRC255 ++#define E1000_82542_PRC511 E1000_PRC511 ++#define E1000_82542_PRC1023 E1000_PRC1023 ++#define E1000_82542_PRC1522 E1000_PRC1522 ++#define E1000_82542_GPRC E1000_GPRC ++#define E1000_82542_BPRC E1000_BPRC ++#define E1000_82542_MPRC E1000_MPRC ++#define E1000_82542_GPTC E1000_GPTC ++#define E1000_82542_GORCL E1000_GORCL ++#define E1000_82542_GORCH E1000_GORCH ++#define E1000_82542_GOTCL E1000_GOTCL ++#define E1000_82542_GOTCH E1000_GOTCH ++#define E1000_82542_RNBC E1000_RNBC ++#define E1000_82542_RUC E1000_RUC ++#define E1000_82542_RFC E1000_RFC ++#define E1000_82542_ROC E1000_ROC ++#define E1000_82542_RJC E1000_RJC ++#define E1000_82542_MGTPRC E1000_MGTPRC ++#define E1000_82542_MGTPDC E1000_MGTPDC ++#define E1000_82542_MGTPTC E1000_MGTPTC ++#define E1000_82542_TORL E1000_TORL ++#define E1000_82542_TORH E1000_TORH ++#define E1000_82542_TOTL E1000_TOTL ++#define E1000_82542_TOTH E1000_TOTH ++#define E1000_82542_TPR E1000_TPR ++#define E1000_82542_TPT E1000_TPT ++#define E1000_82542_PTC64 E1000_PTC64 ++#define E1000_82542_PTC127 E1000_PTC127 ++#define E1000_82542_PTC255 E1000_PTC255 ++#define E1000_82542_PTC511 E1000_PTC511 ++#define E1000_82542_PTC1023 E1000_PTC1023 ++#define E1000_82542_PTC1522 E1000_PTC1522 ++#define E1000_82542_MPTC E1000_MPTC ++#define E1000_82542_BPTC E1000_BPTC ++#define E1000_82542_TSCTC E1000_TSCTC ++#define E1000_82542_TSCTFC E1000_TSCTFC ++#define E1000_82542_RXCSUM E1000_RXCSUM ++#define E1000_82542_WUC E1000_WUC ++#define E1000_82542_WUFC E1000_WUFC ++#define E1000_82542_WUS E1000_WUS ++#define E1000_82542_MANC E1000_MANC ++#define E1000_82542_IPAV E1000_IPAV ++#define E1000_82542_IP4AT E1000_IP4AT ++#define E1000_82542_IP6AT E1000_IP6AT ++#define E1000_82542_WUPL E1000_WUPL ++#define E1000_82542_WUPM E1000_WUPM ++#define E1000_82542_FFLT E1000_FFLT ++#define E1000_82542_TDFH 0x08010 ++#define E1000_82542_TDFT 0x08018 ++#define E1000_82542_FFMT E1000_FFMT ++#define E1000_82542_FFVT E1000_FFVT ++ ++/* Statistics counters collected by the MAC */ ++struct e1000_hw_stats { ++ uint64_t crcerrs; ++ uint64_t algnerrc; ++ uint64_t symerrs; ++ uint64_t rxerrc; ++ uint64_t mpc; ++ uint64_t scc; ++ uint64_t ecol; ++ uint64_t mcc; ++ uint64_t latecol; ++ uint64_t colc; ++ uint64_t dc; ++ uint64_t tncrs; ++ uint64_t sec; ++ uint64_t cexterr; ++ uint64_t rlec; ++ uint64_t xonrxc; ++ uint64_t xontxc; ++ uint64_t xoffrxc; ++ uint64_t xofftxc; ++ uint64_t fcruc; ++ uint64_t prc64; ++ uint64_t prc127; ++ uint64_t prc255; ++ uint64_t prc511; ++ uint64_t prc1023; ++ uint64_t prc1522; ++ uint64_t gprc; ++ uint64_t bprc; ++ uint64_t mprc; ++ uint64_t gptc; ++ uint64_t gorcl; ++ uint64_t gorch; ++ uint64_t gotcl; ++ uint64_t gotch; ++ uint64_t rnbc; ++ uint64_t ruc; ++ uint64_t rfc; ++ uint64_t roc; ++ uint64_t rjc; ++ uint64_t mgprc; ++ uint64_t mgpdc; ++ uint64_t mgptc; ++ uint64_t torl; ++ uint64_t torh; ++ uint64_t totl; ++ uint64_t toth; ++ uint64_t tpr; ++ uint64_t tpt; ++ uint64_t ptc64; ++ uint64_t ptc127; ++ uint64_t ptc255; ++ uint64_t ptc511; ++ uint64_t ptc1023; ++ uint64_t ptc1522; ++ uint64_t mptc; ++ uint64_t bptc; ++ uint64_t tsctc; ++ uint64_t tsctfc; ++}; ++ ++/* Structure containing variables used by the shared code (e1000_hw.c) */ ++struct e1000_hw { ++ struct pci_device *pdev; ++ uint8_t *hw_addr; ++ e1000_mac_type mac_type; ++ e1000_phy_type phy_type; ++#if 0 ++ uint32_t phy_init_script; ++#endif ++ e1000_media_type media_type; ++ e1000_fc_type fc; ++#if 0 ++ e1000_bus_speed bus_speed; ++ e1000_bus_width bus_width; ++ e1000_bus_type bus_type; ++#endif ++ struct e1000_eeprom_info eeprom; ++#if 0 ++ e1000_ms_type master_slave; ++ e1000_ms_type original_master_slave; ++ e1000_ffe_config ffe_config_state; ++#endif ++ uint32_t io_base; ++ uint32_t phy_id; ++#ifdef LINUX_DRIVER ++ uint32_t phy_revision; ++#endif ++ uint32_t phy_addr; ++#if 0 ++ uint32_t original_fc; ++#endif ++ uint32_t txcw; ++ uint32_t autoneg_failed; ++#if 0 ++ uint32_t max_frame_size; ++ uint32_t min_frame_size; ++ uint32_t mc_filter_type; ++ uint32_t num_mc_addrs; ++ uint32_t collision_delta; ++ uint32_t tx_packet_delta; ++ uint32_t ledctl_default; ++ uint32_t ledctl_mode1; ++ uint32_t ledctl_mode2; ++ uint16_t phy_spd_default; ++#endif ++ uint16_t autoneg_advertised; ++ uint16_t pci_cmd_word; ++#if 0 ++ uint16_t fc_high_water; ++ uint16_t fc_low_water; ++ uint16_t fc_pause_time; ++ uint16_t current_ifs_val; ++ uint16_t ifs_min_val; ++ uint16_t ifs_max_val; ++ uint16_t ifs_step_size; ++ uint16_t ifs_ratio; ++#endif ++ uint16_t device_id; ++ uint16_t vendor_id; ++#if 0 ++ uint16_t subsystem_id; ++ uint16_t subsystem_vendor_id; ++#endif ++ uint8_t revision_id; ++#if 0 ++ uint8_t autoneg; ++ uint8_t mdix; ++ uint8_t forced_speed_duplex; ++ uint8_t wait_autoneg_complete; ++ uint8_t dma_fairness; ++#endif ++ uint8_t mac_addr[NODE_ADDRESS_SIZE]; ++#if 0 ++ uint8_t perm_mac_addr[NODE_ADDRESS_SIZE]; ++ boolean_t disable_polarity_correction; ++ boolean_t speed_downgraded; ++ e1000_dsp_config dsp_config_state; ++ boolean_t get_link_status; ++ boolean_t serdes_link_down; ++#endif ++ boolean_t tbi_compatibility_en; ++ boolean_t tbi_compatibility_on; ++#if 0 ++ boolean_t phy_reset_disable; ++ boolean_t fc_send_xon; ++ boolean_t fc_strict_ieee; ++ boolean_t report_tx_early; ++ boolean_t adaptive_ifs; ++ boolean_t ifs_params_forced; ++ boolean_t in_ifs_mode; ++#endif ++}; ++ ++ ++#define E1000_EEPROM_SWDPIN0 0x0001 /* SWDPIN 0 EEPROM Value */ ++#define E1000_EEPROM_LED_LOGIC 0x0020 /* Led Logic Word */ ++ ++/* Register Bit Masks */ ++/* Device Control */ ++#define E1000_CTRL_FD 0x00000001 /* Full duplex.0=half; 1=full */ ++#define E1000_CTRL_BEM 0x00000002 /* Endian Mode.0=little,1=big */ ++#define E1000_CTRL_PRIOR 0x00000004 /* Priority on PCI. 0=rx,1=fair */ ++#define E1000_CTRL_LRST 0x00000008 /* Link reset. 0=normal,1=reset */ ++#define E1000_CTRL_TME 0x00000010 /* Test mode. 0=normal,1=test */ ++#define E1000_CTRL_SLE 0x00000020 /* Serial Link on 0=dis,1=en */ ++#define E1000_CTRL_ASDE 0x00000020 /* Auto-speed detect enable */ ++#define E1000_CTRL_SLU 0x00000040 /* Set link up (Force Link) */ ++#define E1000_CTRL_ILOS 0x00000080 /* Invert Loss-Of Signal */ ++#define E1000_CTRL_SPD_SEL 0x00000300 /* Speed Select Mask */ ++#define E1000_CTRL_SPD_10 0x00000000 /* Force 10Mb */ ++#define E1000_CTRL_SPD_100 0x00000100 /* Force 100Mb */ ++#define E1000_CTRL_SPD_1000 0x00000200 /* Force 1Gb */ ++#define E1000_CTRL_BEM32 0x00000400 /* Big Endian 32 mode */ ++#define E1000_CTRL_FRCSPD 0x00000800 /* Force Speed */ ++#define E1000_CTRL_FRCDPX 0x00001000 /* Force Duplex */ ++#define E1000_CTRL_SWDPIN0 0x00040000 /* SWDPIN 0 value */ ++#define E1000_CTRL_SWDPIN1 0x00080000 /* SWDPIN 1 value */ ++#define E1000_CTRL_SWDPIN2 0x00100000 /* SWDPIN 2 value */ ++#define E1000_CTRL_SWDPIN3 0x00200000 /* SWDPIN 3 value */ ++#define E1000_CTRL_SWDPIO0 0x00400000 /* SWDPIN 0 Input or output */ ++#define E1000_CTRL_SWDPIO1 0x00800000 /* SWDPIN 1 input or output */ ++#define E1000_CTRL_SWDPIO2 0x01000000 /* SWDPIN 2 input or output */ ++#define E1000_CTRL_SWDPIO3 0x02000000 /* SWDPIN 3 input or output */ ++#define E1000_CTRL_RST 0x04000000 /* Global reset */ ++#define E1000_CTRL_RFCE 0x08000000 /* Receive Flow Control enable */ ++#define E1000_CTRL_TFCE 0x10000000 /* Transmit flow control enable */ ++#define E1000_CTRL_RTE 0x20000000 /* Routing tag enable */ ++#define E1000_CTRL_VME 0x40000000 /* IEEE VLAN mode enable */ ++#define E1000_CTRL_PHY_RST 0x80000000 /* PHY Reset */ ++ ++/* Device Status */ ++#define E1000_STATUS_FD 0x00000001 /* Full duplex.0=half,1=full */ ++#define E1000_STATUS_LU 0x00000002 /* Link up.0=no,1=link */ ++#define E1000_STATUS_FUNC_MASK 0x0000000C /* PCI Function Mask */ ++#define E1000_STATUS_FUNC_0 0x00000000 /* Function 0 */ ++#define E1000_STATUS_FUNC_1 0x00000004 /* Function 1 */ ++#define E1000_STATUS_TXOFF 0x00000010 /* transmission paused */ ++#define E1000_STATUS_TBIMODE 0x00000020 /* TBI mode */ ++#define E1000_STATUS_SPEED_MASK 0x000000C0 ++#define E1000_STATUS_SPEED_10 0x00000000 /* Speed 10Mb/s */ ++#define E1000_STATUS_SPEED_100 0x00000040 /* Speed 100Mb/s */ ++#define E1000_STATUS_SPEED_1000 0x00000080 /* Speed 1000Mb/s */ ++#define E1000_STATUS_ASDV 0x00000300 /* Auto speed detect value */ ++#define E1000_STATUS_MTXCKOK 0x00000400 /* MTX clock running OK */ ++#define E1000_STATUS_PCI66 0x00000800 /* In 66Mhz slot */ ++#define E1000_STATUS_BUS64 0x00001000 /* In 64 bit slot */ ++#define E1000_STATUS_PCIX_MODE 0x00002000 /* PCI-X mode */ ++#define E1000_STATUS_PCIX_SPEED 0x0000C000 /* PCI-X bus speed */ ++ ++/* Constants used to intrepret the masked PCI-X bus speed. */ ++#define E1000_STATUS_PCIX_SPEED_66 0x00000000 /* PCI-X bus speed 50-66 MHz */ ++#define E1000_STATUS_PCIX_SPEED_100 0x00004000 /* PCI-X bus speed 66-100 MHz */ ++#define E1000_STATUS_PCIX_SPEED_133 0x00008000 /* PCI-X bus speed 100-133 MHz */ ++ ++/* EEPROM/Flash Control */ ++#define E1000_EECD_SK 0x00000001 /* EEPROM Clock */ ++#define E1000_EECD_CS 0x00000002 /* EEPROM Chip Select */ ++#define E1000_EECD_DI 0x00000004 /* EEPROM Data In */ ++#define E1000_EECD_DO 0x00000008 /* EEPROM Data Out */ ++#define E1000_EECD_FWE_MASK 0x00000030 ++#define E1000_EECD_FWE_DIS 0x00000010 /* Disable FLASH writes */ ++#define E1000_EECD_FWE_EN 0x00000020 /* Enable FLASH writes */ ++#define E1000_EECD_FWE_SHIFT 4 ++#define E1000_EECD_REQ 0x00000040 /* EEPROM Access Request */ ++#define E1000_EECD_GNT 0x00000080 /* EEPROM Access Grant */ ++#define E1000_EECD_PRES 0x00000100 /* EEPROM Present */ ++#define E1000_EECD_SIZE 0x00000200 /* EEPROM Size (0=64 word 1=256 word) */ ++#define E1000_EECD_ADDR_BITS 0x00000400 /* EEPROM Addressing bits based on type ++ * (0-small, 1-large) */ ++#define E1000_EECD_TYPE 0x00002000 /* EEPROM Type (1-SPI, 0-Microwire) */ ++#ifndef E1000_EEPROM_GRANT_ATTEMPTS ++#define E1000_EEPROM_GRANT_ATTEMPTS 1000 /* EEPROM # attempts to gain grant */ ++#endif ++ ++/* EEPROM Read */ ++#define E1000_EERD_START 0x00000001 /* Start Read */ ++#define E1000_EERD_DONE 0x00000010 /* Read Done */ ++#define E1000_EERD_ADDR_SHIFT 8 ++#define E1000_EERD_ADDR_MASK 0x0000FF00 /* Read Address */ ++#define E1000_EERD_DATA_SHIFT 16 ++#define E1000_EERD_DATA_MASK 0xFFFF0000 /* Read Data */ ++ ++/* SPI EEPROM Status Register */ ++#define EEPROM_STATUS_RDY_SPI 0x01 ++#define EEPROM_STATUS_WEN_SPI 0x02 ++#define EEPROM_STATUS_BP0_SPI 0x04 ++#define EEPROM_STATUS_BP1_SPI 0x08 ++#define EEPROM_STATUS_WPEN_SPI 0x80 ++ ++/* Extended Device Control */ ++#define E1000_CTRL_EXT_GPI0_EN 0x00000001 /* Maps SDP4 to GPI0 */ ++#define E1000_CTRL_EXT_GPI1_EN 0x00000002 /* Maps SDP5 to GPI1 */ ++#define E1000_CTRL_EXT_PHYINT_EN E1000_CTRL_EXT_GPI1_EN ++#define E1000_CTRL_EXT_GPI2_EN 0x00000004 /* Maps SDP6 to GPI2 */ ++#define E1000_CTRL_EXT_GPI3_EN 0x00000008 /* Maps SDP7 to GPI3 */ ++#define E1000_CTRL_EXT_SDP4_DATA 0x00000010 /* Value of SW Defineable Pin 4 */ ++#define E1000_CTRL_EXT_SDP5_DATA 0x00000020 /* Value of SW Defineable Pin 5 */ ++#define E1000_CTRL_EXT_PHY_INT E1000_CTRL_EXT_SDP5_DATA ++#define E1000_CTRL_EXT_SDP6_DATA 0x00000040 /* Value of SW Defineable Pin 6 */ ++#define E1000_CTRL_EXT_SDP7_DATA 0x00000080 /* Value of SW Defineable Pin 7 */ ++#define E1000_CTRL_EXT_SDP4_DIR 0x00000100 /* Direction of SDP4 0=in 1=out */ ++#define E1000_CTRL_EXT_SDP5_DIR 0x00000200 /* Direction of SDP5 0=in 1=out */ ++#define E1000_CTRL_EXT_SDP6_DIR 0x00000400 /* Direction of SDP6 0=in 1=out */ ++#define E1000_CTRL_EXT_SDP7_DIR 0x00000800 /* Direction of SDP7 0=in 1=out */ ++#define E1000_CTRL_EXT_ASDCHK 0x00001000 /* Initiate an ASD sequence */ ++#define E1000_CTRL_EXT_EE_RST 0x00002000 /* Reinitialize from EEPROM */ ++#define E1000_CTRL_EXT_IPS 0x00004000 /* Invert Power State */ ++#define E1000_CTRL_EXT_SPD_BYPS 0x00008000 /* Speed Select Bypass */ ++#define E1000_CTRL_EXT_LINK_MODE_MASK 0x00C00000 ++#define E1000_CTRL_EXT_LINK_MODE_GMII 0x00000000 ++#define E1000_CTRL_EXT_LINK_MODE_TBI 0x00C00000 ++#define E1000_CTRL_EXT_WR_WMARK_MASK 0x03000000 ++#define E1000_CTRL_EXT_WR_WMARK_256 0x00000000 ++#define E1000_CTRL_EXT_WR_WMARK_320 0x01000000 ++#define E1000_CTRL_EXT_WR_WMARK_384 0x02000000 ++#define E1000_CTRL_EXT_WR_WMARK_448 0x03000000 ++ ++/* MDI Control */ ++#define E1000_MDIC_DATA_MASK 0x0000FFFF ++#define E1000_MDIC_REG_MASK 0x001F0000 ++#define E1000_MDIC_REG_SHIFT 16 ++#define E1000_MDIC_PHY_MASK 0x03E00000 ++#define E1000_MDIC_PHY_SHIFT 21 ++#define E1000_MDIC_OP_WRITE 0x04000000 ++#define E1000_MDIC_OP_READ 0x08000000 ++#define E1000_MDIC_READY 0x10000000 ++#define E1000_MDIC_INT_EN 0x20000000 ++#define E1000_MDIC_ERROR 0x40000000 ++ ++/* LED Control */ ++#define E1000_LEDCTL_LED0_MODE_MASK 0x0000000F ++#define E1000_LEDCTL_LED0_MODE_SHIFT 0 ++#define E1000_LEDCTL_LED0_IVRT 0x00000040 ++#define E1000_LEDCTL_LED0_BLINK 0x00000080 ++#define E1000_LEDCTL_LED1_MODE_MASK 0x00000F00 ++#define E1000_LEDCTL_LED1_MODE_SHIFT 8 ++#define E1000_LEDCTL_LED1_IVRT 0x00004000 ++#define E1000_LEDCTL_LED1_BLINK 0x00008000 ++#define E1000_LEDCTL_LED2_MODE_MASK 0x000F0000 ++#define E1000_LEDCTL_LED2_MODE_SHIFT 16 ++#define E1000_LEDCTL_LED2_IVRT 0x00400000 ++#define E1000_LEDCTL_LED2_BLINK 0x00800000 ++#define E1000_LEDCTL_LED3_MODE_MASK 0x0F000000 ++#define E1000_LEDCTL_LED3_MODE_SHIFT 24 ++#define E1000_LEDCTL_LED3_IVRT 0x40000000 ++#define E1000_LEDCTL_LED3_BLINK 0x80000000 ++ ++#define E1000_LEDCTL_MODE_LINK_10_1000 0x0 ++#define E1000_LEDCTL_MODE_LINK_100_1000 0x1 ++#define E1000_LEDCTL_MODE_LINK_UP 0x2 ++#define E1000_LEDCTL_MODE_ACTIVITY 0x3 ++#define E1000_LEDCTL_MODE_LINK_ACTIVITY 0x4 ++#define E1000_LEDCTL_MODE_LINK_10 0x5 ++#define E1000_LEDCTL_MODE_LINK_100 0x6 ++#define E1000_LEDCTL_MODE_LINK_1000 0x7 ++#define E1000_LEDCTL_MODE_PCIX_MODE 0x8 ++#define E1000_LEDCTL_MODE_FULL_DUPLEX 0x9 ++#define E1000_LEDCTL_MODE_COLLISION 0xA ++#define E1000_LEDCTL_MODE_BUS_SPEED 0xB ++#define E1000_LEDCTL_MODE_BUS_SIZE 0xC ++#define E1000_LEDCTL_MODE_PAUSED 0xD ++#define E1000_LEDCTL_MODE_LED_ON 0xE ++#define E1000_LEDCTL_MODE_LED_OFF 0xF ++ ++/* Receive Address */ ++#define E1000_RAH_AV 0x80000000 /* Receive descriptor valid */ ++ ++/* Interrupt Cause Read */ ++#define E1000_ICR_TXDW 0x00000001 /* Transmit desc written back */ ++#define E1000_ICR_TXQE 0x00000002 /* Transmit Queue empty */ ++#define E1000_ICR_LSC 0x00000004 /* Link Status Change */ ++#define E1000_ICR_RXSEQ 0x00000008 /* rx sequence error */ ++#define E1000_ICR_RXDMT0 0x00000010 /* rx desc min. threshold (0) */ ++#define E1000_ICR_RXO 0x00000040 /* rx overrun */ ++#define E1000_ICR_RXT0 0x00000080 /* rx timer intr (ring 0) */ ++#define E1000_ICR_MDAC 0x00000200 /* MDIO access complete */ ++#define E1000_ICR_RXCFG 0x00000400 /* RX /c/ ordered set */ ++#define E1000_ICR_GPI_EN0 0x00000800 /* GP Int 0 */ ++#define E1000_ICR_GPI_EN1 0x00001000 /* GP Int 1 */ ++#define E1000_ICR_GPI_EN2 0x00002000 /* GP Int 2 */ ++#define E1000_ICR_GPI_EN3 0x00004000 /* GP Int 3 */ ++#define E1000_ICR_TXD_LOW 0x00008000 ++#define E1000_ICR_SRPD 0x00010000 ++ ++/* Interrupt Cause Set */ ++#define E1000_ICS_TXDW E1000_ICR_TXDW /* Transmit desc written back */ ++#define E1000_ICS_TXQE E1000_ICR_TXQE /* Transmit Queue empty */ ++#define E1000_ICS_LSC E1000_ICR_LSC /* Link Status Change */ ++#define E1000_ICS_RXSEQ E1000_ICR_RXSEQ /* rx sequence error */ ++#define E1000_ICS_RXDMT0 E1000_ICR_RXDMT0 /* rx desc min. threshold */ ++#define E1000_ICS_RXO E1000_ICR_RXO /* rx overrun */ ++#define E1000_ICS_RXT0 E1000_ICR_RXT0 /* rx timer intr */ ++#define E1000_ICS_MDAC E1000_ICR_MDAC /* MDIO access complete */ ++#define E1000_ICS_RXCFG E1000_ICR_RXCFG /* RX /c/ ordered set */ ++#define E1000_ICS_GPI_EN0 E1000_ICR_GPI_EN0 /* GP Int 0 */ ++#define E1000_ICS_GPI_EN1 E1000_ICR_GPI_EN1 /* GP Int 1 */ ++#define E1000_ICS_GPI_EN2 E1000_ICR_GPI_EN2 /* GP Int 2 */ ++#define E1000_ICS_GPI_EN3 E1000_ICR_GPI_EN3 /* GP Int 3 */ ++#define E1000_ICS_TXD_LOW E1000_ICR_TXD_LOW ++#define E1000_ICS_SRPD E1000_ICR_SRPD ++ ++/* Interrupt Mask Set */ ++#define E1000_IMS_TXDW E1000_ICR_TXDW /* Transmit desc written back */ ++#define E1000_IMS_TXQE E1000_ICR_TXQE /* Transmit Queue empty */ ++#define E1000_IMS_LSC E1000_ICR_LSC /* Link Status Change */ ++#define E1000_IMS_RXSEQ E1000_ICR_RXSEQ /* rx sequence error */ ++#define E1000_IMS_RXDMT0 E1000_ICR_RXDMT0 /* rx desc min. threshold */ ++#define E1000_IMS_RXO E1000_ICR_RXO /* rx overrun */ ++#define E1000_IMS_RXT0 E1000_ICR_RXT0 /* rx timer intr */ ++#define E1000_IMS_MDAC E1000_ICR_MDAC /* MDIO access complete */ ++#define E1000_IMS_RXCFG E1000_ICR_RXCFG /* RX /c/ ordered set */ ++#define E1000_IMS_GPI_EN0 E1000_ICR_GPI_EN0 /* GP Int 0 */ ++#define E1000_IMS_GPI_EN1 E1000_ICR_GPI_EN1 /* GP Int 1 */ ++#define E1000_IMS_GPI_EN2 E1000_ICR_GPI_EN2 /* GP Int 2 */ ++#define E1000_IMS_GPI_EN3 E1000_ICR_GPI_EN3 /* GP Int 3 */ ++#define E1000_IMS_TXD_LOW E1000_ICR_TXD_LOW ++#define E1000_IMS_SRPD E1000_ICR_SRPD ++ ++/* Interrupt Mask Clear */ ++#define E1000_IMC_TXDW E1000_ICR_TXDW /* Transmit desc written back */ ++#define E1000_IMC_TXQE E1000_ICR_TXQE /* Transmit Queue empty */ ++#define E1000_IMC_LSC E1000_ICR_LSC /* Link Status Change */ ++#define E1000_IMC_RXSEQ E1000_ICR_RXSEQ /* rx sequence error */ ++#define E1000_IMC_RXDMT0 E1000_ICR_RXDMT0 /* rx desc min. threshold */ ++#define E1000_IMC_RXO E1000_ICR_RXO /* rx overrun */ ++#define E1000_IMC_RXT0 E1000_ICR_RXT0 /* rx timer intr */ ++#define E1000_IMC_MDAC E1000_ICR_MDAC /* MDIO access complete */ ++#define E1000_IMC_RXCFG E1000_ICR_RXCFG /* RX /c/ ordered set */ ++#define E1000_IMC_GPI_EN0 E1000_ICR_GPI_EN0 /* GP Int 0 */ ++#define E1000_IMC_GPI_EN1 E1000_ICR_GPI_EN1 /* GP Int 1 */ ++#define E1000_IMC_GPI_EN2 E1000_ICR_GPI_EN2 /* GP Int 2 */ ++#define E1000_IMC_GPI_EN3 E1000_ICR_GPI_EN3 /* GP Int 3 */ ++#define E1000_IMC_TXD_LOW E1000_ICR_TXD_LOW ++#define E1000_IMC_SRPD E1000_ICR_SRPD ++ ++/* Receive Control */ ++#define E1000_RCTL_RST 0x00000001 /* Software reset */ ++#define E1000_RCTL_EN 0x00000002 /* enable */ ++#define E1000_RCTL_SBP 0x00000004 /* store bad packet */ ++#define E1000_RCTL_UPE 0x00000008 /* unicast promiscuous enable */ ++#define E1000_RCTL_MPE 0x00000010 /* multicast promiscuous enab */ ++#define E1000_RCTL_LPE 0x00000020 /* long packet enable */ ++#define E1000_RCTL_LBM_NO 0x00000000 /* no loopback mode */ ++#define E1000_RCTL_LBM_MAC 0x00000040 /* MAC loopback mode */ ++#define E1000_RCTL_LBM_SLP 0x00000080 /* serial link loopback mode */ ++#define E1000_RCTL_LBM_TCVR 0x000000C0 /* tcvr loopback mode */ ++#define E1000_RCTL_RDMTS_HALF 0x00000000 /* rx desc min threshold size */ ++#define E1000_RCTL_RDMTS_QUAT 0x00000100 /* rx desc min threshold size */ ++#define E1000_RCTL_RDMTS_EIGTH 0x00000200 /* rx desc min threshold size */ ++#define E1000_RCTL_MO_SHIFT 12 /* multicast offset shift */ ++#define E1000_RCTL_MO_0 0x00000000 /* multicast offset 11:0 */ ++#define E1000_RCTL_MO_1 0x00001000 /* multicast offset 12:1 */ ++#define E1000_RCTL_MO_2 0x00002000 /* multicast offset 13:2 */ ++#define E1000_RCTL_MO_3 0x00003000 /* multicast offset 15:4 */ ++#define E1000_RCTL_MDR 0x00004000 /* multicast desc ring 0 */ ++#define E1000_RCTL_BAM 0x00008000 /* broadcast enable */ ++/* these buffer sizes are valid if E1000_RCTL_BSEX is 0 */ ++#define E1000_RCTL_SZ_2048 0x00000000 /* rx buffer size 2048 */ ++#define E1000_RCTL_SZ_1024 0x00010000 /* rx buffer size 1024 */ ++#define E1000_RCTL_SZ_512 0x00020000 /* rx buffer size 512 */ ++#define E1000_RCTL_SZ_256 0x00030000 /* rx buffer size 256 */ ++/* these buffer sizes are valid if E1000_RCTL_BSEX is 1 */ ++#define E1000_RCTL_SZ_16384 0x00010000 /* rx buffer size 16384 */ ++#define E1000_RCTL_SZ_8192 0x00020000 /* rx buffer size 8192 */ ++#define E1000_RCTL_SZ_4096 0x00030000 /* rx buffer size 4096 */ ++#define E1000_RCTL_VFE 0x00040000 /* vlan filter enable */ ++#define E1000_RCTL_CFIEN 0x00080000 /* canonical form enable */ ++#define E1000_RCTL_CFI 0x00100000 /* canonical form indicator */ ++#define E1000_RCTL_DPF 0x00400000 /* discard pause frames */ ++#define E1000_RCTL_PMCF 0x00800000 /* pass MAC control frames */ ++#define E1000_RCTL_BSEX 0x02000000 /* Buffer size extension */ ++ ++/* Receive Descriptor */ ++#define E1000_RDT_DELAY 0x0000ffff /* Delay timer (1=1024us) */ ++#define E1000_RDT_FPDB 0x80000000 /* Flush descriptor block */ ++#define E1000_RDLEN_LEN 0x0007ff80 /* descriptor length */ ++#define E1000_RDH_RDH 0x0000ffff /* receive descriptor head */ ++#define E1000_RDT_RDT 0x0000ffff /* receive descriptor tail */ ++ ++/* Flow Control */ ++#define E1000_FCRTH_RTH 0x0000FFF8 /* Mask Bits[15:3] for RTH */ ++#define E1000_FCRTH_XFCE 0x80000000 /* External Flow Control Enable */ ++#define E1000_FCRTL_RTL 0x0000FFF8 /* Mask Bits[15:3] for RTL */ ++#define E1000_FCRTL_XONE 0x80000000 /* Enable XON frame transmission */ ++ ++/* Receive Descriptor Control */ ++#define E1000_RXDCTL_PTHRESH 0x0000003F /* RXDCTL Prefetch Threshold */ ++#define E1000_RXDCTL_HTHRESH 0x00003F00 /* RXDCTL Host Threshold */ ++#define E1000_RXDCTL_WTHRESH 0x003F0000 /* RXDCTL Writeback Threshold */ ++#define E1000_RXDCTL_GRAN 0x01000000 /* RXDCTL Granularity */ ++ ++/* Transmit Descriptor Control */ ++#define E1000_TXDCTL_PTHRESH 0x000000FF /* TXDCTL Prefetch Threshold */ ++#define E1000_TXDCTL_HTHRESH 0x0000FF00 /* TXDCTL Host Threshold */ ++#define E1000_TXDCTL_WTHRESH 0x00FF0000 /* TXDCTL Writeback Threshold */ ++#define E1000_TXDCTL_GRAN 0x01000000 /* TXDCTL Granularity */ ++#define E1000_TXDCTL_LWTHRESH 0xFE000000 /* TXDCTL Low Threshold */ ++#define E1000_TXDCTL_FULL_TX_DESC_WB 0x01010000 /* GRAN=1, WTHRESH=1 */ ++ ++/* Transmit Configuration Word */ ++#define E1000_TXCW_FD 0x00000020 /* TXCW full duplex */ ++#define E1000_TXCW_HD 0x00000040 /* TXCW half duplex */ ++#define E1000_TXCW_PAUSE 0x00000080 /* TXCW sym pause request */ ++#define E1000_TXCW_ASM_DIR 0x00000100 /* TXCW astm pause direction */ ++#define E1000_TXCW_PAUSE_MASK 0x00000180 /* TXCW pause request mask */ ++#define E1000_TXCW_RF 0x00003000 /* TXCW remote fault */ ++#define E1000_TXCW_NP 0x00008000 /* TXCW next page */ ++#define E1000_TXCW_CW 0x0000ffff /* TxConfigWord mask */ ++#define E1000_TXCW_TXC 0x40000000 /* Transmit Config control */ ++#define E1000_TXCW_ANE 0x80000000 /* Auto-neg enable */ ++ ++/* Receive Configuration Word */ ++#define E1000_RXCW_CW 0x0000ffff /* RxConfigWord mask */ ++#define E1000_RXCW_NC 0x04000000 /* Receive config no carrier */ ++#define E1000_RXCW_IV 0x08000000 /* Receive config invalid */ ++#define E1000_RXCW_CC 0x10000000 /* Receive config change */ ++#define E1000_RXCW_C 0x20000000 /* Receive config */ ++#define E1000_RXCW_SYNCH 0x40000000 /* Receive config synch */ ++#define E1000_RXCW_ANC 0x80000000 /* Auto-neg complete */ ++ ++/* Transmit Control */ ++#define E1000_TCTL_RST 0x00000001 /* software reset */ ++#define E1000_TCTL_EN 0x00000002 /* enable tx */ ++#define E1000_TCTL_BCE 0x00000004 /* busy check enable */ ++#define E1000_TCTL_PSP 0x00000008 /* pad short packets */ ++#define E1000_TCTL_CT 0x00000ff0 /* collision threshold */ ++#define E1000_TCTL_COLD 0x003ff000 /* collision distance */ ++#define E1000_TCTL_SWXOFF 0x00400000 /* SW Xoff transmission */ ++#define E1000_TCTL_PBE 0x00800000 /* Packet Burst Enable */ ++#define E1000_TCTL_RTLC 0x01000000 /* Re-transmit on late collision */ ++#define E1000_TCTL_NRTU 0x02000000 /* No Re-transmit on underrun */ ++ ++/* Receive Checksum Control */ ++#define E1000_RXCSUM_PCSS_MASK 0x000000FF /* Packet Checksum Start */ ++#define E1000_RXCSUM_IPOFL 0x00000100 /* IPv4 checksum offload */ ++#define E1000_RXCSUM_TUOFL 0x00000200 /* TCP / UDP checksum offload */ ++#define E1000_RXCSUM_IPV6OFL 0x00000400 /* IPv6 checksum offload */ ++ ++/* Definitions for power management and wakeup registers */ ++/* Wake Up Control */ ++#define E1000_WUC_APME 0x00000001 /* APM Enable */ ++#define E1000_WUC_PME_EN 0x00000002 /* PME Enable */ ++#define E1000_WUC_PME_STATUS 0x00000004 /* PME Status */ ++#define E1000_WUC_APMPME 0x00000008 /* Assert PME on APM Wakeup */ ++#define E1000_WUC_SPM 0x80000000 /* Enable SPM */ ++ ++/* Wake Up Filter Control */ ++#define E1000_WUFC_LNKC 0x00000001 /* Link Status Change Wakeup Enable */ ++#define E1000_WUFC_MAG 0x00000002 /* Magic Packet Wakeup Enable */ ++#define E1000_WUFC_EX 0x00000004 /* Directed Exact Wakeup Enable */ ++#define E1000_WUFC_MC 0x00000008 /* Directed Multicast Wakeup Enable */ ++#define E1000_WUFC_BC 0x00000010 /* Broadcast Wakeup Enable */ ++#define E1000_WUFC_ARP 0x00000020 /* ARP Request Packet Wakeup Enable */ ++#define E1000_WUFC_IPV4 0x00000040 /* Directed IPv4 Packet Wakeup Enable */ ++#define E1000_WUFC_IPV6 0x00000080 /* Directed IPv6 Packet Wakeup Enable */ ++#define E1000_WUFC_FLX0 0x00010000 /* Flexible Filter 0 Enable */ ++#define E1000_WUFC_FLX1 0x00020000 /* Flexible Filter 1 Enable */ ++#define E1000_WUFC_FLX2 0x00040000 /* Flexible Filter 2 Enable */ ++#define E1000_WUFC_FLX3 0x00080000 /* Flexible Filter 3 Enable */ ++#define E1000_WUFC_ALL_FILTERS 0x000F00FF /* Mask for all wakeup filters */ ++#define E1000_WUFC_FLX_OFFSET 16 /* Offset to the Flexible Filters bits */ ++#define E1000_WUFC_FLX_FILTERS 0x000F0000 /* Mask for the 4 flexible filters */ ++ ++/* Wake Up Status */ ++#define E1000_WUS_LNKC 0x00000001 /* Link Status Changed */ ++#define E1000_WUS_MAG 0x00000002 /* Magic Packet Received */ ++#define E1000_WUS_EX 0x00000004 /* Directed Exact Received */ ++#define E1000_WUS_MC 0x00000008 /* Directed Multicast Received */ ++#define E1000_WUS_BC 0x00000010 /* Broadcast Received */ ++#define E1000_WUS_ARP 0x00000020 /* ARP Request Packet Received */ ++#define E1000_WUS_IPV4 0x00000040 /* Directed IPv4 Packet Wakeup Received */ ++#define E1000_WUS_IPV6 0x00000080 /* Directed IPv6 Packet Wakeup Received */ ++#define E1000_WUS_FLX0 0x00010000 /* Flexible Filter 0 Match */ ++#define E1000_WUS_FLX1 0x00020000 /* Flexible Filter 1 Match */ ++#define E1000_WUS_FLX2 0x00040000 /* Flexible Filter 2 Match */ ++#define E1000_WUS_FLX3 0x00080000 /* Flexible Filter 3 Match */ ++#define E1000_WUS_FLX_FILTERS 0x000F0000 /* Mask for the 4 flexible filters */ ++ ++/* Management Control */ ++#define E1000_MANC_SMBUS_EN 0x00000001 /* SMBus Enabled - RO */ ++#define E1000_MANC_ASF_EN 0x00000002 /* ASF Enabled - RO */ ++#define E1000_MANC_R_ON_FORCE 0x00000004 /* Reset on Force TCO - RO */ ++#define E1000_MANC_RMCP_EN 0x00000100 /* Enable RCMP 026Fh Filtering */ ++#define E1000_MANC_0298_EN 0x00000200 /* Enable RCMP 0298h Filtering */ ++#define E1000_MANC_IPV4_EN 0x00000400 /* Enable IPv4 */ ++#define E1000_MANC_IPV6_EN 0x00000800 /* Enable IPv6 */ ++#define E1000_MANC_SNAP_EN 0x00001000 /* Accept LLC/SNAP */ ++#define E1000_MANC_ARP_EN 0x00002000 /* Enable ARP Request Filtering */ ++#define E1000_MANC_NEIGHBOR_EN 0x00004000 /* Enable Neighbor Discovery ++ * Filtering */ ++#define E1000_MANC_TCO_RESET 0x00010000 /* TCO Reset Occurred */ ++#define E1000_MANC_RCV_TCO_EN 0x00020000 /* Receive TCO Packets Enabled */ ++#define E1000_MANC_REPORT_STATUS 0x00040000 /* Status Reporting Enabled */ ++#define E1000_MANC_SMB_REQ 0x01000000 /* SMBus Request */ ++#define E1000_MANC_SMB_GNT 0x02000000 /* SMBus Grant */ ++#define E1000_MANC_SMB_CLK_IN 0x04000000 /* SMBus Clock In */ ++#define E1000_MANC_SMB_DATA_IN 0x08000000 /* SMBus Data In */ ++#define E1000_MANC_SMB_DATA_OUT 0x10000000 /* SMBus Data Out */ ++#define E1000_MANC_SMB_CLK_OUT 0x20000000 /* SMBus Clock Out */ ++ ++#define E1000_MANC_SMB_DATA_OUT_SHIFT 28 /* SMBus Data Out Shift */ ++#define E1000_MANC_SMB_CLK_OUT_SHIFT 29 /* SMBus Clock Out Shift */ ++ ++/* Wake Up Packet Length */ ++#define E1000_WUPL_LENGTH_MASK 0x0FFF /* Only the lower 12 bits are valid */ ++ ++#define E1000_MDALIGN 4096 ++ ++/* EEPROM Commands - Microwire */ ++#define EEPROM_READ_OPCODE_MICROWIRE 0x6 /* EEPROM read opcode */ ++#define EEPROM_WRITE_OPCODE_MICROWIRE 0x5 /* EEPROM write opcode */ ++#define EEPROM_ERASE_OPCODE_MICROWIRE 0x7 /* EEPROM erase opcode */ ++#define EEPROM_EWEN_OPCODE_MICROWIRE 0x13 /* EEPROM erase/write enable */ ++#define EEPROM_EWDS_OPCODE_MICROWIRE 0x10 /* EEPROM erast/write disable */ ++ ++/* EEPROM Commands - SPI */ ++#define EEPROM_MAX_RETRY_SPI 5000 /* Max wait of 5ms, for RDY signal */ ++#define EEPROM_READ_OPCODE_SPI 0x3 /* EEPROM read opcode */ ++#define EEPROM_WRITE_OPCODE_SPI 0x2 /* EEPROM write opcode */ ++#define EEPROM_A8_OPCODE_SPI 0x8 /* opcode bit-3 = address bit-8 */ ++#define EEPROM_WREN_OPCODE_SPI 0x6 /* EEPROM set Write Enable latch */ ++#define EEPROM_WRDI_OPCODE_SPI 0x4 /* EEPROM reset Write Enable latch */ ++#define EEPROM_RDSR_OPCODE_SPI 0x5 /* EEPROM read Status register */ ++#define EEPROM_WRSR_OPCODE_SPI 0x1 /* EEPROM write Status register */ ++ ++/* EEPROM Size definitions */ ++#define EEPROM_SIZE_16KB 0x1800 ++#define EEPROM_SIZE_8KB 0x1400 ++#define EEPROM_SIZE_4KB 0x1000 ++#define EEPROM_SIZE_2KB 0x0C00 ++#define EEPROM_SIZE_1KB 0x0800 ++#define EEPROM_SIZE_512B 0x0400 ++#define EEPROM_SIZE_128B 0x0000 ++#define EEPROM_SIZE_MASK 0x1C00 ++ ++/* EEPROM Word Offsets */ ++#define EEPROM_COMPAT 0x0003 ++#define EEPROM_ID_LED_SETTINGS 0x0004 ++#define EEPROM_SERDES_AMPLITUDE 0x0006 /* For SERDES output amplitude adjustment. */ ++#define EEPROM_INIT_CONTROL1_REG 0x000A ++#define EEPROM_INIT_CONTROL2_REG 0x000F ++#define EEPROM_INIT_CONTROL3_PORT_B 0x0014 ++#define EEPROM_INIT_CONTROL3_PORT_A 0x0024 ++#define EEPROM_CFG 0x0012 ++#define EEPROM_FLASH_VERSION 0x0032 ++#define EEPROM_CHECKSUM_REG 0x003F ++ ++/* Word definitions for ID LED Settings */ ++#define ID_LED_RESERVED_0000 0x0000 ++#define ID_LED_RESERVED_FFFF 0xFFFF ++#define ID_LED_DEFAULT ((ID_LED_OFF1_ON2 << 12) | \ ++ (ID_LED_OFF1_OFF2 << 8) | \ ++ (ID_LED_DEF1_DEF2 << 4) | \ ++ (ID_LED_DEF1_DEF2)) ++#define ID_LED_DEF1_DEF2 0x1 ++#define ID_LED_DEF1_ON2 0x2 ++#define ID_LED_DEF1_OFF2 0x3 ++#define ID_LED_ON1_DEF2 0x4 ++#define ID_LED_ON1_ON2 0x5 ++#define ID_LED_ON1_OFF2 0x6 ++#define ID_LED_OFF1_DEF2 0x7 ++#define ID_LED_OFF1_ON2 0x8 ++#define ID_LED_OFF1_OFF2 0x9 ++ ++#define IGP_ACTIVITY_LED_MASK 0xFFFFF0FF ++#define IGP_ACTIVITY_LED_ENABLE 0x0300 ++#define IGP_LED3_MODE 0x07000000 ++ ++ ++/* Mask bits for SERDES amplitude adjustment in Word 6 of the EEPROM */ ++#define EEPROM_SERDES_AMPLITUDE_MASK 0x000F ++ ++/* Mask bits for fields in Word 0x0a of the EEPROM */ ++#define EEPROM_WORD0A_ILOS 0x0010 ++#define EEPROM_WORD0A_SWDPIO 0x01E0 ++#define EEPROM_WORD0A_LRST 0x0200 ++#define EEPROM_WORD0A_FD 0x0400 ++#define EEPROM_WORD0A_66MHZ 0x0800 ++ ++/* Mask bits for fields in Word 0x0f of the EEPROM */ ++#define EEPROM_WORD0F_PAUSE_MASK 0x3000 ++#define EEPROM_WORD0F_PAUSE 0x1000 ++#define EEPROM_WORD0F_ASM_DIR 0x2000 ++#define EEPROM_WORD0F_ANE 0x0800 ++#define EEPROM_WORD0F_SWPDIO_EXT 0x00F0 ++ ++/* For checksumming, the sum of all words in the EEPROM should equal 0xBABA. */ ++#define EEPROM_SUM 0xBABA ++ ++/* EEPROM Map defines (WORD OFFSETS)*/ ++#define EEPROM_NODE_ADDRESS_BYTE_0 0 ++#define EEPROM_PBA_BYTE_1 8 ++ ++#define EEPROM_RESERVED_WORD 0xFFFF ++ ++/* EEPROM Map Sizes (Byte Counts) */ ++#define PBA_SIZE 4 ++ ++/* Collision related configuration parameters */ ++#define E1000_COLLISION_THRESHOLD 16 ++#define E1000_CT_SHIFT 4 ++#define E1000_COLLISION_DISTANCE 64 ++#define E1000_FDX_COLLISION_DISTANCE E1000_COLLISION_DISTANCE ++#define E1000_HDX_COLLISION_DISTANCE E1000_COLLISION_DISTANCE ++#define E1000_COLD_SHIFT 12 ++ ++/* Number of Transmit and Receive Descriptors must be a multiple of 8 */ ++#define REQ_TX_DESCRIPTOR_MULTIPLE 8 ++#define REQ_RX_DESCRIPTOR_MULTIPLE 8 ++ ++/* Default values for the transmit IPG register */ ++#define DEFAULT_82542_TIPG_IPGT 10 ++#define DEFAULT_82543_TIPG_IPGT_FIBER 9 ++#define DEFAULT_82543_TIPG_IPGT_COPPER 8 ++ ++#define E1000_TIPG_IPGT_MASK 0x000003FF ++#define E1000_TIPG_IPGR1_MASK 0x000FFC00 ++#define E1000_TIPG_IPGR2_MASK 0x3FF00000 ++ ++#define DEFAULT_82542_TIPG_IPGR1 2 ++#define DEFAULT_82543_TIPG_IPGR1 8 ++#define E1000_TIPG_IPGR1_SHIFT 10 ++ ++#define DEFAULT_82542_TIPG_IPGR2 10 ++#define DEFAULT_82543_TIPG_IPGR2 6 ++#define E1000_TIPG_IPGR2_SHIFT 20 ++ ++#define E1000_TXDMAC_DPP 0x00000001 ++ ++/* Adaptive IFS defines */ ++#define TX_THRESHOLD_START 8 ++#define TX_THRESHOLD_INCREMENT 10 ++#define TX_THRESHOLD_DECREMENT 1 ++#define TX_THRESHOLD_STOP 190 ++#define TX_THRESHOLD_DISABLE 0 ++#define TX_THRESHOLD_TIMER_MS 10000 ++#define MIN_NUM_XMITS 1000 ++#define IFS_MAX 80 ++#define IFS_STEP 10 ++#define IFS_MIN 40 ++#define IFS_RATIO 4 ++ ++/* PBA constants */ ++#define E1000_PBA_16K 0x0010 /* 16KB, default TX allocation */ ++#define E1000_PBA_22K 0x0016 ++#define E1000_PBA_24K 0x0018 ++#define E1000_PBA_30K 0x001E ++#define E1000_PBA_40K 0x0028 ++#define E1000_PBA_48K 0x0030 /* 48KB, default RX allocation */ ++ ++/* Flow Control Constants */ ++#define FLOW_CONTROL_ADDRESS_LOW 0x00C28001 ++#define FLOW_CONTROL_ADDRESS_HIGH 0x00000100 ++#define FLOW_CONTROL_TYPE 0x8808 ++ ++/* The historical defaults for the flow control values are given below. */ ++#define FC_DEFAULT_HI_THRESH (0x8000) /* 32KB */ ++#define FC_DEFAULT_LO_THRESH (0x4000) /* 16KB */ ++#define FC_DEFAULT_TX_TIMER (0x100) /* ~130 us */ ++ ++/* PCIX Config space */ ++#define PCIX_COMMAND_REGISTER 0xE6 ++#define PCIX_STATUS_REGISTER_LO 0xE8 ++#define PCIX_STATUS_REGISTER_HI 0xEA ++ ++#define PCIX_COMMAND_MMRBC_MASK 0x000C ++#define PCIX_COMMAND_MMRBC_SHIFT 0x2 ++#define PCIX_STATUS_HI_MMRBC_MASK 0x0060 ++#define PCIX_STATUS_HI_MMRBC_SHIFT 0x5 ++#define PCIX_STATUS_HI_MMRBC_4K 0x3 ++#define PCIX_STATUS_HI_MMRBC_2K 0x2 ++ ++ ++/* Number of bits required to shift right the "pause" bits from the ++ * EEPROM (bits 13:12) to the "pause" (bits 8:7) field in the TXCW register. ++ */ ++#define PAUSE_SHIFT 5 ++ ++/* Number of bits required to shift left the "SWDPIO" bits from the ++ * EEPROM (bits 8:5) to the "SWDPIO" (bits 25:22) field in the CTRL register. ++ */ ++#define SWDPIO_SHIFT 17 ++ ++/* Number of bits required to shift left the "SWDPIO_EXT" bits from the ++ * EEPROM word F (bits 7:4) to the bits 11:8 of The Extended CTRL register. ++ */ ++#define SWDPIO__EXT_SHIFT 4 ++ ++/* Number of bits required to shift left the "ILOS" bit from the EEPROM ++ * (bit 4) to the "ILOS" (bit 7) field in the CTRL register. ++ */ ++#define ILOS_SHIFT 3 ++ ++ ++#define RECEIVE_BUFFER_ALIGN_SIZE (256) ++ ++/* Number of milliseconds we wait for auto-negotiation to complete */ ++#define LINK_UP_TIMEOUT 500 ++ ++#define E1000_TX_BUFFER_SIZE ((uint32_t)1514) ++ ++/* The carrier extension symbol, as received by the NIC. */ ++#define CARRIER_EXTENSION 0x0F ++ ++/* TBI_ACCEPT macro definition: ++ * ++ * This macro requires: ++ * adapter = a pointer to struct e1000_hw ++ * status = the 8 bit status field of the RX descriptor with EOP set ++ * error = the 8 bit error field of the RX descriptor with EOP set ++ * length = the sum of all the length fields of the RX descriptors that ++ * make up the current frame ++ * last_byte = the last byte of the frame DMAed by the hardware ++ * max_frame_length = the maximum frame length we want to accept. ++ * min_frame_length = the minimum frame length we want to accept. ++ * ++ * This macro is a conditional that should be used in the interrupt ++ * handler's Rx processing routine when RxErrors have been detected. ++ * ++ * Typical use: ++ * ... ++ * if (TBI_ACCEPT) { ++ * accept_frame = TRUE; ++ * e1000_tbi_adjust_stats(adapter, MacAddress); ++ * frame_length--; ++ * } else { ++ * accept_frame = FALSE; ++ * } ++ * ... ++ */ ++ ++#define TBI_ACCEPT(adapter, status, errors, length, last_byte) \ ++ ((adapter)->tbi_compatibility_on && \ ++ (((errors) & E1000_RXD_ERR_FRAME_ERR_MASK) == E1000_RXD_ERR_CE) && \ ++ ((last_byte) == CARRIER_EXTENSION) && \ ++ (((status) & E1000_RXD_STAT_VP) ? \ ++ (((length) > ((adapter)->min_frame_size - VLAN_TAG_SIZE)) && \ ++ ((length) <= ((adapter)->max_frame_size + 1))) : \ ++ (((length) > (adapter)->min_frame_size) && \ ++ ((length) <= ((adapter)->max_frame_size + VLAN_TAG_SIZE + 1))))) ++ ++ ++/* Structures, enums, and macros for the PHY */ ++ ++/* Bit definitions for the Management Data IO (MDIO) and Management Data ++ * Clock (MDC) pins in the Device Control Register. ++ */ ++#define E1000_CTRL_PHY_RESET_DIR E1000_CTRL_SWDPIO0 ++#define E1000_CTRL_PHY_RESET E1000_CTRL_SWDPIN0 ++#define E1000_CTRL_MDIO_DIR E1000_CTRL_SWDPIO2 ++#define E1000_CTRL_MDIO E1000_CTRL_SWDPIN2 ++#define E1000_CTRL_MDC_DIR E1000_CTRL_SWDPIO3 ++#define E1000_CTRL_MDC E1000_CTRL_SWDPIN3 ++#define E1000_CTRL_PHY_RESET_DIR4 E1000_CTRL_EXT_SDP4_DIR ++#define E1000_CTRL_PHY_RESET4 E1000_CTRL_EXT_SDP4_DATA ++ ++/* PHY 1000 MII Register/Bit Definitions */ ++/* PHY Registers defined by IEEE */ ++#define PHY_CTRL 0x00 /* Control Register */ ++#define PHY_STATUS 0x01 /* Status Regiser */ ++#define PHY_ID1 0x02 /* Phy Id Reg (word 1) */ ++#define PHY_ID2 0x03 /* Phy Id Reg (word 2) */ ++#define PHY_AUTONEG_ADV 0x04 /* Autoneg Advertisement */ ++#define PHY_LP_ABILITY 0x05 /* Link Partner Ability (Base Page) */ ++#define PHY_AUTONEG_EXP 0x06 /* Autoneg Expansion Reg */ ++#define PHY_NEXT_PAGE_TX 0x07 /* Next Page TX */ ++#define PHY_LP_NEXT_PAGE 0x08 /* Link Partner Next Page */ ++#define PHY_1000T_CTRL 0x09 /* 1000Base-T Control Reg */ ++#define PHY_1000T_STATUS 0x0A /* 1000Base-T Status Reg */ ++#define PHY_EXT_STATUS 0x0F /* Extended Status Reg */ ++ ++/* M88E1000 Specific Registers */ ++#define M88E1000_PHY_SPEC_CTRL 0x10 /* PHY Specific Control Register */ ++#define M88E1000_PHY_SPEC_STATUS 0x11 /* PHY Specific Status Register */ ++#define M88E1000_INT_ENABLE 0x12 /* Interrupt Enable Register */ ++#define M88E1000_INT_STATUS 0x13 /* Interrupt Status Register */ ++#define M88E1000_EXT_PHY_SPEC_CTRL 0x14 /* Extended PHY Specific Control */ ++#define M88E1000_RX_ERR_CNTR 0x15 /* Receive Error Counter */ ++ ++#define M88E1000_PHY_EXT_CTRL 0x1A /* PHY extend control register */ ++#define M88E1000_PHY_PAGE_SELECT 0x1D /* Reg 29 for page number setting */ ++#define M88E1000_PHY_GEN_CONTROL 0x1E /* Its meaning depends on reg 29 */ ++#define M88E1000_PHY_VCO_REG_BIT8 0x100 /* Bits 8 & 11 are adjusted for */ ++#define M88E1000_PHY_VCO_REG_BIT11 0x800 /* improved BER performance */ ++ ++#define IGP01E1000_IEEE_REGS_PAGE 0x0000 ++#define IGP01E1000_IEEE_RESTART_AUTONEG 0x3300 ++#define IGP01E1000_IEEE_FORCE_GIGA 0x0140 ++ ++/* IGP01E1000 Specific Registers */ ++#define IGP01E1000_PHY_PORT_CONFIG 0x10 /* PHY Specific Port Config Register */ ++#define IGP01E1000_PHY_PORT_STATUS 0x11 /* PHY Specific Status Register */ ++#define IGP01E1000_PHY_PORT_CTRL 0x12 /* PHY Specific Control Register */ ++#define IGP01E1000_PHY_LINK_HEALTH 0x13 /* PHY Link Health Register */ ++#define IGP01E1000_GMII_FIFO 0x14 /* GMII FIFO Register */ ++#define IGP01E1000_PHY_CHANNEL_QUALITY 0x15 /* PHY Channel Quality Register */ ++#define IGP01E1000_PHY_PAGE_SELECT 0x1F /* PHY Page Select Core Register */ ++ ++/* IGP01E1000 AGC Registers - stores the cable length values*/ ++#define IGP01E1000_PHY_AGC_A 0x1172 ++#define IGP01E1000_PHY_AGC_B 0x1272 ++#define IGP01E1000_PHY_AGC_C 0x1472 ++#define IGP01E1000_PHY_AGC_D 0x1872 ++ ++/* IGP01E1000 DSP Reset Register */ ++#define IGP01E1000_PHY_DSP_RESET 0x1F33 ++#define IGP01E1000_PHY_DSP_SET 0x1F71 ++#define IGP01E1000_PHY_DSP_FFE 0x1F35 ++ ++#define IGP01E1000_PHY_CHANNEL_NUM 4 ++#define IGP01E1000_PHY_AGC_PARAM_A 0x1171 ++#define IGP01E1000_PHY_AGC_PARAM_B 0x1271 ++#define IGP01E1000_PHY_AGC_PARAM_C 0x1471 ++#define IGP01E1000_PHY_AGC_PARAM_D 0x1871 ++ ++#define IGP01E1000_PHY_EDAC_MU_INDEX 0xC000 ++#define IGP01E1000_PHY_EDAC_SIGN_EXT_9_BITS 0x8000 ++ ++#define IGP01E1000_PHY_ANALOG_TX_STATE 0x2890 ++#define IGP01E1000_PHY_ANALOG_CLASS_A 0x2000 ++#define IGP01E1000_PHY_FORCE_ANALOG_ENABLE 0x0004 ++#define IGP01E1000_PHY_DSP_FFE_CM_CP 0x0069 ++ ++#define IGP01E1000_PHY_DSP_FFE_DEFAULT 0x002A ++/* IGP01E1000 PCS Initialization register - stores the polarity status when ++ * speed = 1000 Mbps. */ ++#define IGP01E1000_PHY_PCS_INIT_REG 0x00B4 ++#define IGP01E1000_PHY_PCS_CTRL_REG 0x00B5 ++ ++#define IGP01E1000_ANALOG_REGS_PAGE 0x20C0 ++ ++#define MAX_PHY_REG_ADDRESS 0x1F /* 5 bit address bus (0-0x1F) */ ++#define MAX_PHY_MULTI_PAGE_REG 0xF /*Registers that are equal on all pages*/ ++/* PHY Control Register */ ++#define MII_CR_SPEED_SELECT_MSB 0x0040 /* bits 6,13: 10=1000, 01=100, 00=10 */ ++#define MII_CR_COLL_TEST_ENABLE 0x0080 /* Collision test enable */ ++#define MII_CR_FULL_DUPLEX 0x0100 /* FDX =1, half duplex =0 */ ++#define MII_CR_RESTART_AUTO_NEG 0x0200 /* Restart auto negotiation */ ++#define MII_CR_ISOLATE 0x0400 /* Isolate PHY from MII */ ++#define MII_CR_POWER_DOWN 0x0800 /* Power down */ ++#define MII_CR_AUTO_NEG_EN 0x1000 /* Auto Neg Enable */ ++#define MII_CR_SPEED_SELECT_LSB 0x2000 /* bits 6,13: 10=1000, 01=100, 00=10 */ ++#define MII_CR_LOOPBACK 0x4000 /* 0 = normal, 1 = loopback */ ++#define MII_CR_RESET 0x8000 /* 0 = normal, 1 = PHY reset */ ++ ++/* PHY Status Register */ ++#define MII_SR_EXTENDED_CAPS 0x0001 /* Extended register capabilities */ ++#define MII_SR_JABBER_DETECT 0x0002 /* Jabber Detected */ ++#define MII_SR_LINK_STATUS 0x0004 /* Link Status 1 = link */ ++#define MII_SR_AUTONEG_CAPS 0x0008 /* Auto Neg Capable */ ++#define MII_SR_REMOTE_FAULT 0x0010 /* Remote Fault Detect */ ++#define MII_SR_AUTONEG_COMPLETE 0x0020 /* Auto Neg Complete */ ++#define MII_SR_PREAMBLE_SUPPRESS 0x0040 /* Preamble may be suppressed */ ++#define MII_SR_EXTENDED_STATUS 0x0100 /* Ext. status info in Reg 0x0F */ ++#define MII_SR_100T2_HD_CAPS 0x0200 /* 100T2 Half Duplex Capable */ ++#define MII_SR_100T2_FD_CAPS 0x0400 /* 100T2 Full Duplex Capable */ ++#define MII_SR_10T_HD_CAPS 0x0800 /* 10T Half Duplex Capable */ ++#define MII_SR_10T_FD_CAPS 0x1000 /* 10T Full Duplex Capable */ ++#define MII_SR_100X_HD_CAPS 0x2000 /* 100X Half Duplex Capable */ ++#define MII_SR_100X_FD_CAPS 0x4000 /* 100X Full Duplex Capable */ ++#define MII_SR_100T4_CAPS 0x8000 /* 100T4 Capable */ ++ ++/* Autoneg Advertisement Register */ ++#define NWAY_AR_SELECTOR_FIELD 0x0001 /* indicates IEEE 802.3 CSMA/CD */ ++#define NWAY_AR_10T_HD_CAPS 0x0020 /* 10T Half Duplex Capable */ ++#define NWAY_AR_10T_FD_CAPS 0x0040 /* 10T Full Duplex Capable */ ++#define NWAY_AR_100TX_HD_CAPS 0x0080 /* 100TX Half Duplex Capable */ ++#define NWAY_AR_100TX_FD_CAPS 0x0100 /* 100TX Full Duplex Capable */ ++#define NWAY_AR_100T4_CAPS 0x0200 /* 100T4 Capable */ ++#define NWAY_AR_PAUSE 0x0400 /* Pause operation desired */ ++#define NWAY_AR_ASM_DIR 0x0800 /* Asymmetric Pause Direction bit */ ++#define NWAY_AR_REMOTE_FAULT 0x2000 /* Remote Fault detected */ ++#define NWAY_AR_NEXT_PAGE 0x8000 /* Next Page ability supported */ ++ ++/* Link Partner Ability Register (Base Page) */ ++#define NWAY_LPAR_SELECTOR_FIELD 0x0000 /* LP protocol selector field */ ++#define NWAY_LPAR_10T_HD_CAPS 0x0020 /* LP is 10T Half Duplex Capable */ ++#define NWAY_LPAR_10T_FD_CAPS 0x0040 /* LP is 10T Full Duplex Capable */ ++#define NWAY_LPAR_100TX_HD_CAPS 0x0080 /* LP is 100TX Half Duplex Capable */ ++#define NWAY_LPAR_100TX_FD_CAPS 0x0100 /* LP is 100TX Full Duplex Capable */ ++#define NWAY_LPAR_100T4_CAPS 0x0200 /* LP is 100T4 Capable */ ++#define NWAY_LPAR_PAUSE 0x0400 /* LP Pause operation desired */ ++#define NWAY_LPAR_ASM_DIR 0x0800 /* LP Asymmetric Pause Direction bit */ ++#define NWAY_LPAR_REMOTE_FAULT 0x2000 /* LP has detected Remote Fault */ ++#define NWAY_LPAR_ACKNOWLEDGE 0x4000 /* LP has rx'd link code word */ ++#define NWAY_LPAR_NEXT_PAGE 0x8000 /* Next Page ability supported */ ++ ++/* Autoneg Expansion Register */ ++#define NWAY_ER_LP_NWAY_CAPS 0x0001 /* LP has Auto Neg Capability */ ++#define NWAY_ER_PAGE_RXD 0x0002 /* LP is 10T Half Duplex Capable */ ++#define NWAY_ER_NEXT_PAGE_CAPS 0x0004 /* LP is 10T Full Duplex Capable */ ++#define NWAY_ER_LP_NEXT_PAGE_CAPS 0x0008 /* LP is 100TX Half Duplex Capable */ ++#define NWAY_ER_PAR_DETECT_FAULT 0x0010 /* LP is 100TX Full Duplex Capable */ ++ ++/* Next Page TX Register */ ++#define NPTX_MSG_CODE_FIELD 0x0001 /* NP msg code or unformatted data */ ++#define NPTX_TOGGLE 0x0800 /* Toggles between exchanges ++ * of different NP ++ */ ++#define NPTX_ACKNOWLDGE2 0x1000 /* 1 = will comply with msg ++ * 0 = cannot comply with msg ++ */ ++#define NPTX_MSG_PAGE 0x2000 /* formatted(1)/unformatted(0) pg */ ++#define NPTX_NEXT_PAGE 0x8000 /* 1 = addition NP will follow ++ * 0 = sending last NP ++ */ ++ ++/* Link Partner Next Page Register */ ++#define LP_RNPR_MSG_CODE_FIELD 0x0001 /* NP msg code or unformatted data */ ++#define LP_RNPR_TOGGLE 0x0800 /* Toggles between exchanges ++ * of different NP ++ */ ++#define LP_RNPR_ACKNOWLDGE2 0x1000 /* 1 = will comply with msg ++ * 0 = cannot comply with msg ++ */ ++#define LP_RNPR_MSG_PAGE 0x2000 /* formatted(1)/unformatted(0) pg */ ++#define LP_RNPR_ACKNOWLDGE 0x4000 /* 1 = ACK / 0 = NO ACK */ ++#define LP_RNPR_NEXT_PAGE 0x8000 /* 1 = addition NP will follow ++ * 0 = sending last NP ++ */ ++ ++/* 1000BASE-T Control Register */ ++#define CR_1000T_ASYM_PAUSE 0x0080 /* Advertise asymmetric pause bit */ ++#define CR_1000T_HD_CAPS 0x0100 /* Advertise 1000T HD capability */ ++#define CR_1000T_FD_CAPS 0x0200 /* Advertise 1000T FD capability */ ++#define CR_1000T_REPEATER_DTE 0x0400 /* 1=Repeater/switch device port */ ++ /* 0=DTE device */ ++#define CR_1000T_MS_VALUE 0x0800 /* 1=Configure PHY as Master */ ++ /* 0=Configure PHY as Slave */ ++#define CR_1000T_MS_ENABLE 0x1000 /* 1=Master/Slave manual config value */ ++ /* 0=Automatic Master/Slave config */ ++#define CR_1000T_TEST_MODE_NORMAL 0x0000 /* Normal Operation */ ++#define CR_1000T_TEST_MODE_1 0x2000 /* Transmit Waveform test */ ++#define CR_1000T_TEST_MODE_2 0x4000 /* Master Transmit Jitter test */ ++#define CR_1000T_TEST_MODE_3 0x6000 /* Slave Transmit Jitter test */ ++#define CR_1000T_TEST_MODE_4 0x8000 /* Transmitter Distortion test */ ++ ++/* 1000BASE-T Status Register */ ++#define SR_1000T_IDLE_ERROR_CNT 0x00FF /* Num idle errors since last read */ ++#define SR_1000T_ASYM_PAUSE_DIR 0x0100 /* LP asymmetric pause direction bit */ ++#define SR_1000T_LP_HD_CAPS 0x0400 /* LP is 1000T HD capable */ ++#define SR_1000T_LP_FD_CAPS 0x0800 /* LP is 1000T FD capable */ ++#define SR_1000T_REMOTE_RX_STATUS 0x1000 /* Remote receiver OK */ ++#define SR_1000T_LOCAL_RX_STATUS 0x2000 /* Local receiver OK */ ++#define SR_1000T_MS_CONFIG_RES 0x4000 /* 1=Local TX is Master, 0=Slave */ ++#define SR_1000T_MS_CONFIG_FAULT 0x8000 /* Master/Slave config fault */ ++#define SR_1000T_REMOTE_RX_STATUS_SHIFT 12 ++#define SR_1000T_LOCAL_RX_STATUS_SHIFT 13 ++#define SR_1000T_PHY_EXCESSIVE_IDLE_ERR_COUNT 5 ++#define FFE_IDLE_ERR_COUNT_TIMEOUT_20 20 ++#define FFE_IDLE_ERR_COUNT_TIMEOUT_100 100 ++ ++/* Extended Status Register */ ++#define IEEE_ESR_1000T_HD_CAPS 0x1000 /* 1000T HD capable */ ++#define IEEE_ESR_1000T_FD_CAPS 0x2000 /* 1000T FD capable */ ++#define IEEE_ESR_1000X_HD_CAPS 0x4000 /* 1000X HD capable */ ++#define IEEE_ESR_1000X_FD_CAPS 0x8000 /* 1000X FD capable */ ++ ++#define PHY_TX_POLARITY_MASK 0x0100 /* register 10h bit 8 (polarity bit) */ ++#define PHY_TX_NORMAL_POLARITY 0 /* register 10h bit 8 (normal polarity) */ ++ ++#define AUTO_POLARITY_DISABLE 0x0010 /* register 11h bit 4 */ ++ /* (0=enable, 1=disable) */ ++ ++/* M88E1000 PHY Specific Control Register */ ++#define M88E1000_PSCR_JABBER_DISABLE 0x0001 /* 1=Jabber Function disabled */ ++#define M88E1000_PSCR_POLARITY_REVERSAL 0x0002 /* 1=Polarity Reversal enabled */ ++#define M88E1000_PSCR_SQE_TEST 0x0004 /* 1=SQE Test enabled */ ++#define M88E1000_PSCR_CLK125_DISABLE 0x0010 /* 1=CLK125 low, ++ * 0=CLK125 toggling ++ */ ++#define M88E1000_PSCR_MDI_MANUAL_MODE 0x0000 /* MDI Crossover Mode bits 6:5 */ ++ /* Manual MDI configuration */ ++#define M88E1000_PSCR_MDIX_MANUAL_MODE 0x0020 /* Manual MDIX configuration */ ++#define M88E1000_PSCR_AUTO_X_1000T 0x0040 /* 1000BASE-T: Auto crossover, ++ * 100BASE-TX/10BASE-T: ++ * MDI Mode ++ */ ++#define M88E1000_PSCR_AUTO_X_MODE 0x0060 /* Auto crossover enabled ++ * all speeds. ++ */ ++#define M88E1000_PSCR_10BT_EXT_DIST_ENABLE 0x0080 ++ /* 1=Enable Extended 10BASE-T distance ++ * (Lower 10BASE-T RX Threshold) ++ * 0=Normal 10BASE-T RX Threshold */ ++#define M88E1000_PSCR_MII_5BIT_ENABLE 0x0100 ++ /* 1=5-Bit interface in 100BASE-TX ++ * 0=MII interface in 100BASE-TX */ ++#define M88E1000_PSCR_SCRAMBLER_DISABLE 0x0200 /* 1=Scrambler disable */ ++#define M88E1000_PSCR_FORCE_LINK_GOOD 0x0400 /* 1=Force link good */ ++#define M88E1000_PSCR_ASSERT_CRS_ON_TX 0x0800 /* 1=Assert CRS on Transmit */ ++ ++#define M88E1000_PSCR_POLARITY_REVERSAL_SHIFT 1 ++#define M88E1000_PSCR_AUTO_X_MODE_SHIFT 5 ++#define M88E1000_PSCR_10BT_EXT_DIST_ENABLE_SHIFT 7 ++ ++/* M88E1000 PHY Specific Status Register */ ++#define M88E1000_PSSR_JABBER 0x0001 /* 1=Jabber */ ++#define M88E1000_PSSR_REV_POLARITY 0x0002 /* 1=Polarity reversed */ ++#define M88E1000_PSSR_DOWNSHIFT 0x0020 /* 1=Downshifted */ ++#define M88E1000_PSSR_MDIX 0x0040 /* 1=MDIX; 0=MDI */ ++#define M88E1000_PSSR_CABLE_LENGTH 0x0380 /* 0=<50M;1=50-80M;2=80-110M; ++ * 3=110-140M;4=>140M */ ++#define M88E1000_PSSR_LINK 0x0400 /* 1=Link up, 0=Link down */ ++#define M88E1000_PSSR_SPD_DPLX_RESOLVED 0x0800 /* 1=Speed & Duplex resolved */ ++#define M88E1000_PSSR_PAGE_RCVD 0x1000 /* 1=Page received */ ++#define M88E1000_PSSR_DPLX 0x2000 /* 1=Duplex 0=Half Duplex */ ++#define M88E1000_PSSR_SPEED 0xC000 /* Speed, bits 14:15 */ ++#define M88E1000_PSSR_10MBS 0x0000 /* 00=10Mbs */ ++#define M88E1000_PSSR_100MBS 0x4000 /* 01=100Mbs */ ++#define M88E1000_PSSR_1000MBS 0x8000 /* 10=1000Mbs */ ++ ++#define M88E1000_PSSR_REV_POLARITY_SHIFT 1 ++#define M88E1000_PSSR_DOWNSHIFT_SHIFT 5 ++#define M88E1000_PSSR_MDIX_SHIFT 6 ++#define M88E1000_PSSR_CABLE_LENGTH_SHIFT 7 ++ ++/* M88E1000 Extended PHY Specific Control Register */ ++#define M88E1000_EPSCR_FIBER_LOOPBACK 0x4000 /* 1=Fiber loopback */ ++#define M88E1000_EPSCR_DOWN_NO_IDLE 0x8000 /* 1=Lost lock detect enabled. ++ * Will assert lost lock and bring ++ * link down if idle not seen ++ * within 1ms in 1000BASE-T ++ */ ++/* Number of times we will attempt to autonegotiate before downshifting if we ++ * are the master */ ++#define M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK 0x0C00 ++#define M88E1000_EPSCR_MASTER_DOWNSHIFT_1X 0x0000 ++#define M88E1000_EPSCR_MASTER_DOWNSHIFT_2X 0x0400 ++#define M88E1000_EPSCR_MASTER_DOWNSHIFT_3X 0x0800 ++#define M88E1000_EPSCR_MASTER_DOWNSHIFT_4X 0x0C00 ++/* Number of times we will attempt to autonegotiate before downshifting if we ++ * are the slave */ ++#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_MASK 0x0300 ++#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_DIS 0x0000 ++#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_1X 0x0100 ++#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_2X 0x0200 ++#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_3X 0x0300 ++#define M88E1000_EPSCR_TX_CLK_2_5 0x0060 /* 2.5 MHz TX_CLK */ ++#define M88E1000_EPSCR_TX_CLK_25 0x0070 /* 25 MHz TX_CLK */ ++#define M88E1000_EPSCR_TX_CLK_0 0x0000 /* NO TX_CLK */ ++ ++/* IGP01E1000 Specific Port Config Register - R/W */ ++#define IGP01E1000_PSCFR_AUTO_MDIX_PAR_DETECT 0x0010 ++#define IGP01E1000_PSCFR_PRE_EN 0x0020 ++#define IGP01E1000_PSCFR_SMART_SPEED 0x0080 ++#define IGP01E1000_PSCFR_DISABLE_TPLOOPBACK 0x0100 ++#define IGP01E1000_PSCFR_DISABLE_JABBER 0x0400 ++#define IGP01E1000_PSCFR_DISABLE_TRANSMIT 0x2000 ++ ++/* IGP01E1000 Specific Port Status Register - R/O */ ++#define IGP01E1000_PSSR_AUTONEG_FAILED 0x0001 /* RO LH SC */ ++#define IGP01E1000_PSSR_POLARITY_REVERSED 0x0002 ++#define IGP01E1000_PSSR_CABLE_LENGTH 0x007C ++#define IGP01E1000_PSSR_FULL_DUPLEX 0x0200 ++#define IGP01E1000_PSSR_LINK_UP 0x0400 ++#define IGP01E1000_PSSR_MDIX 0x0800 ++#define IGP01E1000_PSSR_SPEED_MASK 0xC000 /* speed bits mask */ ++#define IGP01E1000_PSSR_SPEED_10MBPS 0x4000 ++#define IGP01E1000_PSSR_SPEED_100MBPS 0x8000 ++#define IGP01E1000_PSSR_SPEED_1000MBPS 0xC000 ++#define IGP01E1000_PSSR_CABLE_LENGTH_SHIFT 0x0002 /* shift right 2 */ ++#define IGP01E1000_PSSR_MDIX_SHIFT 0x000B /* shift right 11 */ ++ ++/* IGP01E1000 Specific Port Control Register - R/W */ ++#define IGP01E1000_PSCR_TP_LOOPBACK 0x0001 ++#define IGP01E1000_PSCR_CORRECT_NC_SCMBLR 0x0200 ++#define IGP01E1000_PSCR_TEN_CRS_SELECT 0x0400 ++#define IGP01E1000_PSCR_FLIP_CHIP 0x0800 ++#define IGP01E1000_PSCR_AUTO_MDIX 0x1000 ++#define IGP01E1000_PSCR_FORCE_MDI_MDIX 0x2000 /* 0-MDI, 1-MDIX */ ++ ++/* IGP01E1000 Specific Port Link Health Register */ ++#define IGP01E1000_PLHR_SS_DOWNGRADE 0x8000 ++#define IGP01E1000_PLHR_GIG_SCRAMBLER_ERROR 0x4000 ++#define IGP01E1000_PLHR_GIG_REM_RCVR_NOK 0x0800 /* LH */ ++#define IGP01E1000_PLHR_IDLE_ERROR_CNT_OFLOW 0x0400 /* LH */ ++#define IGP01E1000_PLHR_DATA_ERR_1 0x0200 /* LH */ ++#define IGP01E1000_PLHR_DATA_ERR_0 0x0100 ++#define IGP01E1000_PLHR_AUTONEG_FAULT 0x0010 ++#define IGP01E1000_PLHR_AUTONEG_ACTIVE 0x0008 ++#define IGP01E1000_PLHR_VALID_CHANNEL_D 0x0004 ++#define IGP01E1000_PLHR_VALID_CHANNEL_C 0x0002 ++#define IGP01E1000_PLHR_VALID_CHANNEL_B 0x0001 ++#define IGP01E1000_PLHR_VALID_CHANNEL_A 0x0000 ++ ++/* IGP01E1000 Channel Quality Register */ ++#define IGP01E1000_MSE_CHANNEL_D 0x000F ++#define IGP01E1000_MSE_CHANNEL_C 0x00F0 ++#define IGP01E1000_MSE_CHANNEL_B 0x0F00 ++#define IGP01E1000_MSE_CHANNEL_A 0xF000 ++ ++/* IGP01E1000 DSP reset macros */ ++#define DSP_RESET_ENABLE 0x0 ++#define DSP_RESET_DISABLE 0x2 ++#define E1000_MAX_DSP_RESETS 10 ++ ++/* IGP01E1000 AGC Registers */ ++ ++#define IGP01E1000_AGC_LENGTH_SHIFT 7 /* Coarse - 13:11, Fine - 10:7 */ ++ ++/* 7 bits (3 Coarse + 4 Fine) --> 128 optional values */ ++#define IGP01E1000_AGC_LENGTH_TABLE_SIZE 128 ++ ++/* The precision of the length is +/- 10 meters */ ++#define IGP01E1000_AGC_RANGE 10 ++ ++/* IGP01E1000 PCS Initialization register */ ++/* bits 3:6 in the PCS registers stores the channels polarity */ ++#define IGP01E1000_PHY_POLARITY_MASK 0x0078 ++ ++/* IGP01E1000 GMII FIFO Register */ ++#define IGP01E1000_GMII_FLEX_SPD 0x10 /* Enable flexible speed ++ * on Link-Up */ ++#define IGP01E1000_GMII_SPD 0x20 /* Enable SPD */ ++ ++/* IGP01E1000 Analog Register */ ++#define IGP01E1000_ANALOG_SPARE_FUSE_STATUS 0x20D1 ++#define IGP01E1000_ANALOG_FUSE_STATUS 0x20D0 ++#define IGP01E1000_ANALOG_FUSE_CONTROL 0x20DC ++#define IGP01E1000_ANALOG_FUSE_BYPASS 0x20DE ++ ++#define IGP01E1000_ANALOG_FUSE_POLY_MASK 0xF000 ++#define IGP01E1000_ANALOG_FUSE_FINE_MASK 0x0F80 ++#define IGP01E1000_ANALOG_FUSE_COARSE_MASK 0x0070 ++#define IGP01E1000_ANALOG_SPARE_FUSE_ENABLED 0x0100 ++#define IGP01E1000_ANALOG_FUSE_ENABLE_SW_CONTROL 0x0002 ++ ++#define IGP01E1000_ANALOG_FUSE_COARSE_THRESH 0x0040 ++#define IGP01E1000_ANALOG_FUSE_COARSE_10 0x0010 ++#define IGP01E1000_ANALOG_FUSE_FINE_1 0x0080 ++#define IGP01E1000_ANALOG_FUSE_FINE_10 0x0500 ++ ++/* Bit definitions for valid PHY IDs. */ ++#define M88E1000_E_PHY_ID 0x01410C50 ++#define M88E1000_I_PHY_ID 0x01410C30 ++#define M88E1011_I_PHY_ID 0x01410C20 ++#define IGP01E1000_I_PHY_ID 0x02A80380 ++#define M88E1000_12_PHY_ID M88E1000_E_PHY_ID ++#define M88E1000_14_PHY_ID M88E1000_E_PHY_ID ++#define M88E1011_I_REV_4 0x04 ++ ++/* Miscellaneous PHY bit definitions. */ ++#define PHY_PREAMBLE 0xFFFFFFFF ++#define PHY_SOF 0x01 ++#define PHY_OP_READ 0x02 ++#define PHY_OP_WRITE 0x01 ++#define PHY_TURNAROUND 0x02 ++#define PHY_PREAMBLE_SIZE 32 ++#define MII_CR_SPEED_1000 0x0040 ++#define MII_CR_SPEED_100 0x2000 ++#define MII_CR_SPEED_10 0x0000 ++#define E1000_PHY_ADDRESS 0x01 ++#define PHY_AUTO_NEG_TIME 45 /* 4.5 Seconds */ ++#define PHY_FORCE_TIME 20 /* 2.0 Seconds */ ++#define PHY_REVISION_MASK 0xFFFFFFF0 ++#define DEVICE_SPEED_MASK 0x00000300 /* Device Ctrl Reg Speed Mask */ ++#define REG4_SPEED_MASK 0x01E0 ++#define REG9_SPEED_MASK 0x0300 ++#define ADVERTISE_10_HALF 0x0001 ++#define ADVERTISE_10_FULL 0x0002 ++#define ADVERTISE_100_HALF 0x0004 ++#define ADVERTISE_100_FULL 0x0008 ++#define ADVERTISE_1000_HALF 0x0010 ++#define ADVERTISE_1000_FULL 0x0020 ++#define AUTONEG_ADVERTISE_SPEED_DEFAULT 0x002F /* Everything but 1000-Half */ ++#define AUTONEG_ADVERTISE_10_100_ALL 0x000F /* All 10/100 speeds*/ ++#define AUTONEG_ADVERTISE_10_ALL 0x0003 /* 10Mbps Full & Half speeds*/ ++ ++#endif /* _E1000_HW_H_ */ +diff -Naur grub-0.97.orig/netboot/eepro.c grub-0.97/netboot/eepro.c +--- grub-0.97.orig/netboot/eepro.c 2003-07-09 11:45:37.000000000 +0000 ++++ grub-0.97/netboot/eepro.c 1970-01-01 00:00:00.000000000 +0000 +@@ -1,586 +0,0 @@ +-/************************************************************************** +-Etherboot - BOOTP/TFTP Bootstrap Program +-Intel EEPRO/10 NIC driver for Etherboot +-Adapted from Linux eepro.c from kernel 2.2.17 +- +-This board accepts a 32 pin EEPROM (29C256), however a test with a +-27C010 shows that this EPROM also works in the socket, but it's not clear +-how repeatably. The two top address pins appear to be held low, thus +-the bottom 32kB of the 27C010 is visible in the CPU's address space. +-To be sure you could put 4 copies of the code in the 27C010, then +-it doesn't matter whether the extra lines are held low or high, just +-hopefully not floating as CMOS chips don't like floating inputs. +- +-Be careful with seating the EPROM as the socket on my board actually +-has 34 pins, the top row of 2 are not used. +-***************************************************************************/ +- +-/* +- * This program is free software; you can redistribute it and/or +- * modify it under the terms of the GNU General Public License as +- * published by the Free Software Foundation; either version 2, or (at +- * your option) any later version. +- */ +- +-/* to get some global routines like printf */ +-#include "etherboot.h" +-/* to get the interface to the body of the program */ +-#include "nic.h" +-/* to get our own prototype */ +-#include "cards.h" +-/* we use timer2 for microsecond waits */ +-#include "timer.h" +- +-#undef DEBUG /* only after include files */ +- +-/* Different 82595 chips */ +-#define LAN595 0 +-#define LAN595TX 1 +-#define LAN595FX 2 +-#define LAN595FX_10ISA 3 +- +-#define SLOW_DOWN inb(0x80); +- +-/* The station (ethernet) address prefix, used for IDing the board. */ +-#define SA_ADDR0 0x00 /* Etherexpress Pro/10 */ +-#define SA_ADDR1 0xaa +-#define SA_ADDR2 0x00 +- +-#define GetBit(x,y) ((x & (1<>y) +- +-/* EEPROM Word 0: */ +-#define ee_PnP 0 /* Plug 'n Play enable bit */ +-#define ee_Word1 1 /* Word 1? */ +-#define ee_BusWidth 2 /* 8/16 bit */ +-#define ee_FlashAddr 3 /* Flash Address */ +-#define ee_FlashMask 0x7 /* Mask */ +-#define ee_AutoIO 6 /* */ +-#define ee_reserved0 7 /* =0! */ +-#define ee_Flash 8 /* Flash there? */ +-#define ee_AutoNeg 9 /* Auto Negotiation enabled? */ +-#define ee_IO0 10 /* IO Address LSB */ +-#define ee_IO0Mask 0x /*...*/ +-#define ee_IO1 15 /* IO MSB */ +- +-/* EEPROM Word 1: */ +-#define ee_IntSel 0 /* Interrupt */ +-#define ee_IntMask 0x7 +-#define ee_LI 3 /* Link Integrity 0= enabled */ +-#define ee_PC 4 /* Polarity Correction 0= enabled */ +-#define ee_TPE_AUI 5 /* PortSelection 1=TPE */ +-#define ee_Jabber 6 /* Jabber prevention 0= enabled */ +-#define ee_AutoPort 7 /* Auto Port Selection 1= Disabled */ +-#define ee_SMOUT 8 /* SMout Pin Control 0= Input */ +-#define ee_PROM 9 /* Flash EPROM / PROM 0=Flash */ +-#define ee_reserved1 10 /* .. 12 =0! */ +-#define ee_AltReady 13 /* Alternate Ready, 0=normal */ +-#define ee_reserved2 14 /* =0! */ +-#define ee_Duplex 15 +- +-/* Word2,3,4: */ +-#define ee_IA5 0 /*bit start for individual Addr Byte 5 */ +-#define ee_IA4 8 /*bit start for individual Addr Byte 5 */ +-#define ee_IA3 0 /*bit start for individual Addr Byte 5 */ +-#define ee_IA2 8 /*bit start for individual Addr Byte 5 */ +-#define ee_IA1 0 /*bit start for individual Addr Byte 5 */ +-#define ee_IA0 8 /*bit start for individual Addr Byte 5 */ +- +-/* Word 5: */ +-#define ee_BNC_TPE 0 /* 0=TPE */ +-#define ee_BootType 1 /* 00=None, 01=IPX, 10=ODI, 11=NDIS */ +-#define ee_BootTypeMask 0x3 +-#define ee_NumConn 3 /* Number of Connections 0= One or Two */ +-#define ee_FlashSock 4 /* Presence of Flash Socket 0= Present */ +-#define ee_PortTPE 5 +-#define ee_PortBNC 6 +-#define ee_PortAUI 7 +-#define ee_PowerMgt 10 /* 0= disabled */ +-#define ee_CP 13 /* Concurrent Processing */ +-#define ee_CPMask 0x7 +- +-/* Word 6: */ +-#define ee_Stepping 0 /* Stepping info */ +-#define ee_StepMask 0x0F +-#define ee_BoardID 4 /* Manucaturer Board ID, reserved */ +-#define ee_BoardMask 0x0FFF +- +-/* Word 7: */ +-#define ee_INT_TO_IRQ 0 /* int to IRQ Mapping = 0x1EB8 for Pro/10+ */ +-#define ee_FX_INT2IRQ 0x1EB8 /* the _only_ mapping allowed for FX chips */ +- +-/*..*/ +-#define ee_SIZE 0x40 /* total EEprom Size */ +-#define ee_Checksum 0xBABA /* initial and final value for adding checksum */ +- +- +-/* Card identification via EEprom: */ +-#define ee_addr_vendor 0x10 /* Word offset for EISA Vendor ID */ +-#define ee_addr_id 0x11 /* Word offset for Card ID */ +-#define ee_addr_SN 0x12 /* Serial Number */ +-#define ee_addr_CRC_8 0x14 /* CRC over last thee Bytes */ +- +- +-#define ee_vendor_intel0 0x25 /* Vendor ID Intel */ +-#define ee_vendor_intel1 0xD4 +-#define ee_id_eepro10p0 0x10 /* ID for eepro/10+ */ +-#define ee_id_eepro10p1 0x31 +- +-/* now this section could be used by both boards: the oldies and the ee10: +- * ee10 uses tx buffer before of rx buffer and the oldies the inverse. +- * (aris) +- */ +-#define RAM_SIZE 0x8000 +- +-#define RCV_HEADER 8 +-#define RCV_DEFAULT_RAM 0x6000 +-#define RCV_RAM rcv_ram +- +-static unsigned rcv_ram = RCV_DEFAULT_RAM; +- +-#define XMT_HEADER 8 +-#define XMT_RAM (RAM_SIZE - RCV_RAM) +- +-#define XMT_START ((rcv_start + RCV_RAM) % RAM_SIZE) +- +-#define RCV_LOWER_LIMIT (rcv_start >> 8) +-#define RCV_UPPER_LIMIT (((rcv_start + RCV_RAM) - 2) >> 8) +-#define XMT_LOWER_LIMIT (XMT_START >> 8) +-#define XMT_UPPER_LIMIT (((XMT_START + XMT_RAM) - 2) >> 8) +- +-#define RCV_START_PRO 0x00 +-#define RCV_START_10 XMT_RAM +- /* by default the old driver */ +-static unsigned rcv_start = RCV_START_PRO; +- +-#define RCV_DONE 0x0008 +-#define RX_OK 0x2000 +-#define RX_ERROR 0x0d81 +- +-#define TX_DONE_BIT 0x0080 +-#define CHAIN_BIT 0x8000 +-#define XMT_STATUS 0x02 +-#define XMT_CHAIN 0x04 +-#define XMT_COUNT 0x06 +- +-#define BANK0_SELECT 0x00 +-#define BANK1_SELECT 0x40 +-#define BANK2_SELECT 0x80 +- +-/* Bank 0 registers */ +-#define COMMAND_REG 0x00 /* Register 0 */ +-#define MC_SETUP 0x03 +-#define XMT_CMD 0x04 +-#define DIAGNOSE_CMD 0x07 +-#define RCV_ENABLE_CMD 0x08 +-#define RCV_DISABLE_CMD 0x0a +-#define STOP_RCV_CMD 0x0b +-#define RESET_CMD 0x0e +-#define POWER_DOWN_CMD 0x18 +-#define RESUME_XMT_CMD 0x1c +-#define SEL_RESET_CMD 0x1e +-#define STATUS_REG 0x01 /* Register 1 */ +-#define RX_INT 0x02 +-#define TX_INT 0x04 +-#define EXEC_STATUS 0x30 +-#define ID_REG 0x02 /* Register 2 */ +-#define R_ROBIN_BITS 0xc0 /* round robin counter */ +-#define ID_REG_MASK 0x2c +-#define ID_REG_SIG 0x24 +-#define AUTO_ENABLE 0x10 +-#define INT_MASK_REG 0x03 /* Register 3 */ +-#define RX_STOP_MASK 0x01 +-#define RX_MASK 0x02 +-#define TX_MASK 0x04 +-#define EXEC_MASK 0x08 +-#define ALL_MASK 0x0f +-#define IO_32_BIT 0x10 +-#define RCV_BAR 0x04 /* The following are word (16-bit) registers */ +-#define RCV_STOP 0x06 +- +-#define XMT_BAR_PRO 0x0a +-#define XMT_BAR_10 0x0b +-static unsigned xmt_bar = XMT_BAR_PRO; +- +-#define HOST_ADDRESS_REG 0x0c +-#define IO_PORT 0x0e +-#define IO_PORT_32_BIT 0x0c +- +-/* Bank 1 registers */ +-#define REG1 0x01 +-#define WORD_WIDTH 0x02 +-#define INT_ENABLE 0x80 +-#define INT_NO_REG 0x02 +-#define RCV_LOWER_LIMIT_REG 0x08 +-#define RCV_UPPER_LIMIT_REG 0x09 +- +-#define XMT_LOWER_LIMIT_REG_PRO 0x0a +-#define XMT_UPPER_LIMIT_REG_PRO 0x0b +-#define XMT_LOWER_LIMIT_REG_10 0x0b +-#define XMT_UPPER_LIMIT_REG_10 0x0a +-static unsigned xmt_lower_limit_reg = XMT_LOWER_LIMIT_REG_PRO; +-static unsigned xmt_upper_limit_reg = XMT_UPPER_LIMIT_REG_PRO; +- +-/* Bank 2 registers */ +-#define XMT_Chain_Int 0x20 /* Interrupt at the end of the transmit chain */ +-#define XMT_Chain_ErrStop 0x40 /* Interrupt at the end of the chain even if there are errors */ +-#define RCV_Discard_BadFrame 0x80 /* Throw bad frames away, and continue to receive others */ +-#define REG2 0x02 +-#define PRMSC_Mode 0x01 +-#define Multi_IA 0x20 +-#define REG3 0x03 +-#define TPE_BIT 0x04 +-#define BNC_BIT 0x20 +-#define REG13 0x0d +-#define FDX 0x00 +-#define A_N_ENABLE 0x02 +- +-#define I_ADD_REG0 0x04 +-#define I_ADD_REG1 0x05 +-#define I_ADD_REG2 0x06 +-#define I_ADD_REG3 0x07 +-#define I_ADD_REG4 0x08 +-#define I_ADD_REG5 0x09 +- +-#define EEPROM_REG_PRO 0x0a +-#define EEPROM_REG_10 0x0b +-static unsigned eeprom_reg = EEPROM_REG_PRO; +- +-#define EESK 0x01 +-#define EECS 0x02 +-#define EEDI 0x04 +-#define EEDO 0x08 +- +-/* The horrible routine to read a word from the serial EEPROM. */ +-/* IMPORTANT - the 82595 will be set to Bank 0 after the eeprom is read */ +- +-/* The delay between EEPROM clock transitions. */ +-#define eeprom_delay() { udelay(40); } +-#define EE_READ_CMD (6 << 6) +- +-/* do a full reset */ +-#define eepro_full_reset(ioaddr) outb(RESET_CMD, ioaddr); udelay(40); +- +-/* do a nice reset */ +-#define eepro_sel_reset(ioaddr) { \ +- outb(SEL_RESET_CMD, ioaddr); \ +- SLOW_DOWN; \ +- SLOW_DOWN; \ +- } +- +-/* clear all interrupts */ +-#define eepro_clear_int(ioaddr) outb(ALL_MASK, ioaddr + STATUS_REG) +- +-/* enable rx */ +-#define eepro_en_rx(ioaddr) outb(RCV_ENABLE_CMD, ioaddr) +- +-/* disable rx */ +-#define eepro_dis_rx(ioaddr) outb(RCV_DISABLE_CMD, ioaddr) +- +-/* switch bank */ +-#define eepro_sw2bank0(ioaddr) outb(BANK0_SELECT, ioaddr) +-#define eepro_sw2bank1(ioaddr) outb(BANK1_SELECT, ioaddr) +-#define eepro_sw2bank2(ioaddr) outb(BANK2_SELECT, ioaddr) +- +-static unsigned int rx_start, tx_start; +-static int tx_last; +-static unsigned tx_end; +-static int eepro = 0; +-static unsigned short ioaddr = 0; +-static unsigned int mem_start, mem_end = RCV_DEFAULT_RAM / 1024; +- +-#define udelay(n) waiton_timer2(((n)*TICKS_PER_MS)/1000) +- +-/************************************************************************** +-RESET - Reset adapter +-***************************************************************************/ +-static void eepro_reset(struct nic *nic) +-{ +- int temp_reg, i; +- +- /* put the card in its initial state */ +- eepro_sw2bank2(ioaddr); /* be careful, bank2 now */ +- temp_reg = inb(ioaddr + eeprom_reg); +-#ifdef DEBUG +- printf("Stepping %d\n", temp_reg >> 5); +-#endif +- if (temp_reg & 0x10) /* check the TurnOff Enable bit */ +- outb(temp_reg & 0xEF, ioaddr + eeprom_reg); +- for (i = 0; i < ETH_ALEN; i++) /* fill the MAC address */ +- outb(nic->node_addr[i], ioaddr + I_ADD_REG0 + i); +- temp_reg = inb(ioaddr + REG1); +- /* setup Transmit Chaining and discard bad RCV frames */ +- outb(temp_reg | XMT_Chain_Int | XMT_Chain_ErrStop +- | RCV_Discard_BadFrame, ioaddr + REG1); +- temp_reg = inb(ioaddr + REG2); /* match broadcast */ +- outb(temp_reg | 0x14, ioaddr + REG2); +- temp_reg = inb(ioaddr + REG3); +- outb(temp_reg & 0x3F, ioaddr + REG3); /* clear test mode */ +- /* set the receiving mode */ +- eepro_sw2bank1(ioaddr); /* be careful, bank1 now */ +- /* initialise the RCV and XMT upper and lower limits */ +- outb(RCV_LOWER_LIMIT, ioaddr + RCV_LOWER_LIMIT_REG); +- outb(RCV_UPPER_LIMIT, ioaddr + RCV_UPPER_LIMIT_REG); +- outb(XMT_LOWER_LIMIT, ioaddr + xmt_lower_limit_reg); +- outb(XMT_UPPER_LIMIT, ioaddr + xmt_upper_limit_reg); +- eepro_sw2bank0(ioaddr); /* Switch back to bank 0 */ +- eepro_clear_int(ioaddr); +- /* Initialise RCV */ +- outw(rx_start = (RCV_LOWER_LIMIT << 8), ioaddr + RCV_BAR); +- outw(((RCV_UPPER_LIMIT << 8) | 0xFE), ioaddr + RCV_STOP); +- /* Intialise XMT */ +- outw((XMT_LOWER_LIMIT << 8), ioaddr + xmt_bar); +- eepro_sel_reset(ioaddr); +- tx_start = tx_end = (XMT_LOWER_LIMIT << 8); +- tx_last = 0; +- eepro_en_rx(ioaddr); +-} +- +-/************************************************************************** +-POLL - Wait for a frame +-***************************************************************************/ +-static int eepro_poll(struct nic *nic) +-{ +- int i; +- unsigned int rcv_car = rx_start; +- unsigned int rcv_event, rcv_status, rcv_next_frame, rcv_size; +- +- /* return true if there's an ethernet packet ready to read */ +- /* nic->packet should contain data on return */ +- /* nic->packetlen should contain length of data */ +-#if 0 +- if ((inb(ioaddr + STATUS_REG) & 0x40) == 0) +- return (0); +- outb(0x40, ioaddr + STATUS_REG); +-#endif +- outw(rcv_car, ioaddr + HOST_ADDRESS_REG); +- rcv_event = inw(ioaddr + IO_PORT); +- if (rcv_event != RCV_DONE) +- return (0); +- rcv_status = inw(ioaddr + IO_PORT); +- rcv_next_frame = inw(ioaddr + IO_PORT); +- rcv_size = inw(ioaddr + IO_PORT); +-#if 0 +- printf("%hX %hX %d %hhX\n", rcv_status, rcv_next_frame, rcv_size, +- inb(ioaddr + STATUS_REG)); +-#endif +- if ((rcv_status & (RX_OK|RX_ERROR)) != RX_OK) { +- printf("Receive error %hX\n", rcv_status); +- return (0); +- } +- rcv_size &= 0x3FFF; +- insw(ioaddr + IO_PORT, nic->packet, ((rcv_size + 3) >> 1)); +-#if 0 +- for (i = 0; i < 48; i++) { +- printf("%hhX", nic->packet[i]); +- putchar(i % 16 == 15 ? '\n' : ' '); +- } +-#endif +- nic->packetlen = rcv_size; +- rcv_car = rx_start + RCV_HEADER + rcv_size; +- rx_start = rcv_next_frame; +- if (rcv_car == 0) +- rcv_car = ((RCV_UPPER_LIMIT << 8) | 0xff); +- outw(rcv_car - 1, ioaddr + RCV_STOP); +- return (1); +-} +- +-/************************************************************************** +-TRANSMIT - Transmit a frame +-***************************************************************************/ +-static void eepro_transmit( +- struct nic *nic, +- const char *d, /* Destination */ +- unsigned int t, /* Type */ +- unsigned int s, /* size */ +- const char *p) /* Packet */ +-{ +- unsigned int status, tx_available, last, end, length; +- unsigned short type; +- int boguscount = 20; +- +- length = s + ETH_HLEN; +- if (tx_end > tx_start) +- tx_available = XMT_RAM - (tx_end - tx_start); +- else if (tx_end < tx_start) +- tx_available = tx_start - tx_end; +- else +- tx_available = XMT_RAM; +- last = tx_end; +- end = last + (((length + 3) >> 1) << 1) + XMT_HEADER; +- if (end >= (XMT_UPPER_LIMIT << 8)) { +- last = (XMT_LOWER_LIMIT << 8); +- end = last + (((length + 3) >> 1) << 1) + XMT_HEADER; +- } +- outw(last, ioaddr + HOST_ADDRESS_REG); +- outw(XMT_CMD, ioaddr + IO_PORT); +- outw(0, ioaddr + IO_PORT); +- outw(end, ioaddr + IO_PORT); +- outw(length, ioaddr + IO_PORT); +- outsw(ioaddr + IO_PORT, d, ETH_ALEN / 2); +- outsw(ioaddr + IO_PORT, nic->node_addr, ETH_ALEN / 2); +- type = htons(t); +- outsw(ioaddr + IO_PORT, &type, sizeof(type) / 2); +- outsw(ioaddr + IO_PORT, p, (s + 3) >> 1); +- /* A dummy read to flush the DRAM write pipeline */ +- status = inw(ioaddr + IO_PORT); +- outw(last, ioaddr + xmt_bar); +- outb(XMT_CMD, ioaddr); +- tx_start = last; +- tx_last = last; +- tx_end = end; +-#if 0 +- printf("%d %d\n", tx_start, tx_end); +-#endif +- while (boguscount > 0) { +- if (((status = inw(ioaddr + IO_PORT)) & TX_DONE_BIT) == 0) { +- udelay(40); +- boguscount--; +- continue; +- } +-#if DEBUG +- if ((status & 0x2000) == 0) +- printf("Transmit status %hX\n", status); +-#endif +- } +-} +- +-/************************************************************************** +-DISABLE - Turn off ethernet interface +-***************************************************************************/ +-static void eepro_disable(struct nic *nic) +-{ +- eepro_sw2bank0(ioaddr); /* Switch to bank 0 */ +- /* Flush the Tx and disable Rx */ +- outb(STOP_RCV_CMD, ioaddr); +- tx_start = tx_end = (XMT_LOWER_LIMIT << 8); +- tx_last = 0; +- /* Reset the 82595 */ +- eepro_full_reset(ioaddr); +-} +- +-static int read_eeprom(int location) +-{ +- int i; +- unsigned short retval = 0; +- int ee_addr = ioaddr + eeprom_reg; +- int read_cmd = location | EE_READ_CMD; +- int ctrl_val = EECS; +- +- if (eepro == LAN595FX_10ISA) { +- eepro_sw2bank1(ioaddr); +- outb(0x00, ioaddr + STATUS_REG); +- } +- eepro_sw2bank2(ioaddr); +- outb(ctrl_val, ee_addr); +- /* shift the read command bits out */ +- for (i = 8; i >= 0; i--) { +- short outval = (read_cmd & (1 << i)) ? ctrl_val | EEDI : ctrl_val; +- outb(outval, ee_addr); +- outb(outval | EESK, ee_addr); /* EEPROM clock tick */ +- eeprom_delay(); +- outb(outval, ee_addr); /* finish EEPROM clock tick */ +- eeprom_delay(); +- } +- outb(ctrl_val, ee_addr); +- for (i = 16; i > 0; i--) { +- outb(ctrl_val | EESK, ee_addr); +- eeprom_delay(); +- retval = (retval << 1) | ((inb(ee_addr) & EEDO) ? 1 : 0); +- outb(ctrl_val, ee_addr); +- eeprom_delay(); +- } +- /* terminate the EEPROM access */ +- ctrl_val &= ~EECS; +- outb(ctrl_val | EESK, ee_addr); +- eeprom_delay(); +- outb(ctrl_val, ee_addr); +- eeprom_delay(); +- eepro_sw2bank0(ioaddr); +- return (retval); +-} +- +-static int eepro_probe1(struct nic *nic) +-{ +- int i, id, counter, l_eepro = 0; +- union { +- unsigned char caddr[ETH_ALEN]; +- unsigned short saddr[ETH_ALEN/2]; +- } station_addr; +- char *name; +- +- id = inb(ioaddr + ID_REG); +- if ((id & ID_REG_MASK) != ID_REG_SIG) +- return (0); +- counter = id & R_ROBIN_BITS; +- if (((id = inb(ioaddr + ID_REG)) & R_ROBIN_BITS) != (counter + 0x40)) +- return (0); +- /* yes the 82595 has been found */ +- station_addr.saddr[2] = read_eeprom(2); +- if (station_addr.saddr[2] == 0x0000 || station_addr.saddr[2] == 0xFFFF) { +- l_eepro = 3; +- eepro = LAN595FX_10ISA; +- eeprom_reg= EEPROM_REG_10; +- rcv_start = RCV_START_10; +- xmt_lower_limit_reg = XMT_LOWER_LIMIT_REG_10; +- xmt_upper_limit_reg = XMT_UPPER_LIMIT_REG_10; +- station_addr.saddr[2] = read_eeprom(2); +- } +- station_addr.saddr[1] = read_eeprom(3); +- station_addr.saddr[0] = read_eeprom(4); +- if (l_eepro) +- name = "Intel EtherExpress 10 ISA"; +- else if (read_eeprom(7) == ee_FX_INT2IRQ) { +- name = "Intel EtherExpress Pro/10+ ISA"; +- l_eepro = 2; +- } else if (station_addr.saddr[0] == SA_ADDR1) { +- name = "Intel EtherExpress Pro/10 ISA"; +- l_eepro = 1; +- } else { +- l_eepro = 0; +- name = "Intel 82595-based LAN card"; +- } +- station_addr.saddr[0] = swap16(station_addr.saddr[0]); +- station_addr.saddr[1] = swap16(station_addr.saddr[1]); +- station_addr.saddr[2] = swap16(station_addr.saddr[2]); +- for (i = 0; i < ETH_ALEN; i++) { +- nic->node_addr[i] = station_addr.caddr[i]; +- } +- printf("\n%s ioaddr %#hX, addr %!", name, ioaddr, nic->node_addr); +- mem_start = RCV_LOWER_LIMIT << 8; +- if ((mem_end & 0x3F) < 3 || (mem_end & 0x3F) > 29) +- mem_end = RCV_UPPER_LIMIT << 8; +- else { +- mem_end = mem_end * 1024 + (RCV_LOWER_LIMIT << 8); +- rcv_ram = mem_end - (RCV_LOWER_LIMIT << 8); +- } +- printf(", Rx mem %dK, if %s\n", (mem_end - mem_start) >> 10, +- GetBit(read_eeprom(5), ee_BNC_TPE) ? "BNC" : "TP"); +- return (1); +-} +- +-/************************************************************************** +-PROBE - Look for an adapter, this routine's visible to the outside +-***************************************************************************/ +-struct nic *eepro_probe(struct nic *nic, unsigned short *probe_addrs) +-{ +- unsigned short *p; +- /* same probe list as the Linux driver */ +- static unsigned short ioaddrs[] = { +- 0x300, 0x210, 0x240, 0x280, 0x2C0, 0x200, 0x320, 0x340, 0x360, 0}; +- +- if (probe_addrs == 0 || probe_addrs[0] == 0) +- probe_addrs = ioaddrs; +- for (p = probe_addrs; (ioaddr = *p) != 0; p++) { +- if (eepro_probe1(nic)) +- break; +- } +- if (*p == 0) +- return (0); +- eepro_reset(nic); +- /* point to NIC specific routines */ +- nic->reset = eepro_reset; +- nic->poll = eepro_poll; +- nic->transmit = eepro_transmit; +- nic->disable = eepro_disable; +- return (nic); +-} +diff -Naur grub-0.97.orig/netboot/eepro100.c grub-0.97/netboot/eepro100.c +--- grub-0.97.orig/netboot/eepro100.c 2003-07-09 11:45:37.000000000 +0000 ++++ grub-0.97/netboot/eepro100.c 2005-08-31 19:03:35.000000000 +0000 +@@ -80,8 +80,8 @@ + * + * Caveats: + * +- * The etherboot framework moves the code to the 32k segment from +- * 0x98000 to 0xa0000. There is just a little room between the end of ++ * The Etherboot framework moves the code to the 48k segment from ++ * 0x94000 to 0xa0000. There is just a little room between the end of + * this driver and the 0xa0000 address. If you compile in too many + * features, this will overflow. + * The number under "hex" in the output of size that scrolls by while +@@ -92,17 +92,13 @@ + /* The etherboot authors seem to dislike the argument ordering in + * outb macros that Linux uses. I disklike the confusion that this + * has caused even more.... This file uses the Linux argument ordering. */ +-/* Sorry not us. It's inherted code from FreeBSD. [The authors] */ ++/* Sorry not us. It's inherited code from FreeBSD. [The authors] */ + + #include "etherboot.h" + #include "nic.h" + #include "pci.h" +-#include "cards.h" + #include "timer.h" + +-#undef virt_to_bus +-#define virt_to_bus(x) ((unsigned long)x) +- + static int ioaddr; + + typedef unsigned char u8; +@@ -121,6 +117,18 @@ + SCBEarlyRx = 20, /* Early receive byte count. */ + }; + ++enum SCBCmdBits { ++ SCBMaskCmdDone=0x8000, SCBMaskRxDone=0x4000, SCBMaskCmdIdle=0x2000, ++ SCBMaskRxSuspend=0x1000, SCBMaskEarlyRx=0x0800, SCBMaskFlowCtl=0x0400, ++ SCBTriggerIntr=0x0200, SCBMaskAll=0x0100, ++ /* The rest are Rx and Tx commands. */ ++ CUStart=0x0010, CUResume=0x0020, CUStatsAddr=0x0040, CUShowStats=0x0050, ++ CUCmdBase=0x0060, /* CU Base address (set to zero) . */ ++ CUDumpStats=0x0070, /* Dump then reset stats counters. */ ++ RxStart=0x0001, RxResume=0x0002, RxAbort=0x0004, RxAddrLoad=0x0006, ++ RxResumeNoResources=0x0007, ++}; ++ + static int do_eeprom_cmd(int cmd, int cmd_len); + void hd(void *where, int n); + +@@ -139,8 +147,6 @@ + #define EE_WRITE_1 0x4806 + #define EE_ENB (0x4800 | EE_CS) + +-#define udelay(n) waiton_timer2(((n)*TICKS_PER_MS)/1000) +- + /* The EEPROM commands include the alway-set leading bit. */ + #define EE_READ_CMD 6 + +@@ -184,9 +190,18 @@ + Typically this takes 0 ticks. */ + static inline void wait_for_cmd_done(int cmd_ioaddr) + { +- short wait = 100; +- do ; +- while(inb(cmd_ioaddr) && --wait >= 0); ++ int wait = 0; ++ int delayed_cmd; ++ ++ do ++ if (inb(cmd_ioaddr) == 0) return; ++ while(++wait <= 100); ++ delayed_cmd = inb(cmd_ioaddr); ++ do ++ if (inb(cmd_ioaddr) == 0) break; ++ while(++wait <= 10000); ++ printf("Command %2.2x was not immediately accepted, %d ticks!\n", ++ delayed_cmd, wait); + } + + /* Elements of the dump_statistics block. This block must be lword aligned. */ +@@ -212,35 +227,30 @@ + + /* A speedo3 TX buffer descriptor with two buffers... */ + static struct TxFD { +- volatile s16 status; +- s16 command; +- u32 link; /* void * */ +- u32 tx_desc_addr; /* (almost) Always points to the tx_buf_addr element. */ +- s32 count; /* # of TBD (=2), Tx start thresh., etc. */ +- /* This constitutes two "TBD" entries: hdr and data */ +- u32 tx_buf_addr0; /* void *, header of frame to be transmitted. */ +- s32 tx_buf_size0; /* Length of Tx hdr. */ +- u32 tx_buf_addr1; /* void *, data to be transmitted. */ +- s32 tx_buf_size1; /* Length of Tx data. */ ++ volatile s16 status; ++ s16 command; ++ u32 link; /* void * */ ++ u32 tx_desc_addr; /* (almost) Always points to the tx_buf_addr element. */ ++ s32 count; /* # of TBD (=2), Tx start thresh., etc. */ ++ /* This constitutes two "TBD" entries: hdr and data */ ++ u32 tx_buf_addr0; /* void *, header of frame to be transmitted. */ ++ s32 tx_buf_size0; /* Length of Tx hdr. */ ++ u32 tx_buf_addr1; /* void *, data to be transmitted. */ ++ s32 tx_buf_size1; /* Length of Tx data. */ + } txfd; + + struct RxFD { /* Receive frame descriptor. */ +- volatile s16 status; +- s16 command; +- u32 link; /* struct RxFD * */ +- u32 rx_buf_addr; /* void * */ +- u16 count; +- u16 size; +- char packet[1518]; ++ volatile s16 status; ++ s16 command; ++ u32 link; /* struct RxFD * */ ++ u32 rx_buf_addr; /* void * */ ++ u16 count; ++ u16 size; ++ char packet[1518]; + }; + +-#ifdef USE_LOWMEM_BUFFER +-#define rxfd ((struct RxFD *)(0x10000 - sizeof(struct RxFD))) +-#define ACCESS(x) x-> +-#else + static struct RxFD rxfd; + #define ACCESS(x) x. +-#endif + + static int congenb = 0; /* Enable congestion control in the DP83840. */ + static int txfifo = 8; /* Tx FIFO threshold in 4 byte units, 0-15 */ +@@ -256,8 +266,7 @@ + u32 link; + unsigned char data[22]; + } confcmd = { +- 0, CmdConfigure, +- (u32) & txfd, ++ 0, 0, 0, /* filled in later */ + {22, 0x08, 0, 0, 0, 0x80, 0x32, 0x03, 1, /* 1=Use MII 0=Use AUI */ + 0, 0x2E, 0, 0x60, 0, + 0xf2, 0x48, 0, 0x40, 0xf2, 0x80, /* 0x40=Force full-duplex */ +@@ -276,19 +285,20 @@ + + static int mdio_write(int phy_id, int location, int value) + { +- int val, boguscnt = 64*4; /* <64 usec. to complete, typ 27 ticks */ ++ int val, boguscnt = 64*4; /* <64 usec. to complete, typ 27 ticks */ + +- outl(0x04000000 | (location<<16) | (phy_id<<21) | value, +- ioaddr + SCBCtrlMDI); +- do { +- udelay(16); +- +- val = inl(ioaddr + SCBCtrlMDI); +- if (--boguscnt < 0) { +- printf(" mdio_write() timed out with val = %X.\n", val); +- } +- } while (! (val & 0x10000000)); +- return val & 0xffff; ++ outl(0x04000000 | (location<<16) | (phy_id<<21) | value, ++ ioaddr + SCBCtrlMDI); ++ do { ++ udelay(16); ++ ++ val = inl(ioaddr + SCBCtrlMDI); ++ if (--boguscnt < 0) { ++ printf(" mdio_write() timed out with val = %X.\n", val); ++ break; ++ } ++ } while (! (val & 0x10000000)); ++ return val & 0xffff; + } + + /* Support function: mdio_read +@@ -298,17 +308,19 @@ + */ + static int mdio_read(int phy_id, int location) + { +- int val, boguscnt = 64*4; /* <64 usec. to complete, typ 27 ticks */ +- outl(0x08000000 | (location<<16) | (phy_id<<21), ioaddr + SCBCtrlMDI); +- do { +- udelay(16); +- +- val = inl(ioaddr + SCBCtrlMDI); +- if (--boguscnt < 0) { +- printf( " mdio_read() timed out with val = %X.\n", val); +- } +- } while (! (val & 0x10000000)); +- return val & 0xffff; ++ int val, boguscnt = 64*4; /* <64 usec. to complete, typ 27 ticks */ ++ outl(0x08000000 | (location<<16) | (phy_id<<21), ioaddr + SCBCtrlMDI); ++ do { ++ udelay(16); ++ ++ val = inl(ioaddr + SCBCtrlMDI); ++ ++ if (--boguscnt < 0) { ++ printf( " mdio_read() timed out with val = %X.\n", val); ++ break; ++ } ++ } while (! (val & 0x10000000)); ++ return val & 0xffff; + } + + /* The fixes for the code were kindly provided by Dragan Stancevic +@@ -340,25 +352,26 @@ + return retval; + } + ++#if 0 + static inline void whereami (const char *str) + { +-#if 0 + printf ("%s\n", str); + sleep (2); +-#endif + } ++#else ++#define whereami(s) ++#endif + +-/* function: eepro100_reset +- * resets the card. This is used to allow Etherboot to probe the card again +- * from a "virginal" state.... +- * Arguments: none +- * +- * returns: void. +- */ +- +-static void eepro100_reset(struct nic *nic) ++static void eepro100_irq(struct nic *nic __unused, irq_action_t action __unused) + { +- outl(0, ioaddr + SCBPort); ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } + } + + /* function: eepro100_transmit +@@ -373,61 +386,87 @@ + + static void eepro100_transmit(struct nic *nic, const char *d, unsigned int t, unsigned int s, const char *p) + { +- struct eth_hdr { +- unsigned char dst_addr[ETH_ALEN]; +- unsigned char src_addr[ETH_ALEN]; +- unsigned short type; +- } hdr; +- unsigned short status; +- int to; +- int s1, s2; +- +- status = inw(ioaddr + SCBStatus); +- /* Acknowledge all of the current interrupt sources ASAP. */ +- outw(status & 0xfc00, ioaddr + SCBStatus); ++ struct eth_hdr { ++ unsigned char dst_addr[ETH_ALEN]; ++ unsigned char src_addr[ETH_ALEN]; ++ unsigned short type; ++ } hdr; ++ unsigned short status; ++ int s1, s2; ++ ++ status = inw(ioaddr + SCBStatus); ++ /* Acknowledge all of the current interrupt sources ASAP. */ ++ outw(status & 0xfc00, ioaddr + SCBStatus); + + #ifdef DEBUG +- printf ("transmitting type %hX packet (%d bytes). status = %hX, cmd=%hX\n", +- t, s, status, inw (ioaddr + SCBCmd)); ++ printf ("transmitting type %hX packet (%d bytes). status = %hX, cmd=%hX\n", ++ t, s, status, inw (ioaddr + SCBCmd)); + #endif + +- memcpy (&hdr.dst_addr, d, ETH_ALEN); +- memcpy (&hdr.src_addr, nic->node_addr, ETH_ALEN); ++ memcpy (&hdr.dst_addr, d, ETH_ALEN); ++ memcpy (&hdr.src_addr, nic->node_addr, ETH_ALEN); + +- hdr.type = htons (t); ++ hdr.type = htons (t); + +- txfd.status = 0; +- txfd.command = CmdSuspend | CmdTx | CmdTxFlex; +- txfd.link = virt_to_bus (&txfd); +- txfd.count = 0x02208000; +- txfd.tx_desc_addr = (u32)&txfd.tx_buf_addr0; ++ txfd.status = 0; ++ txfd.command = CmdSuspend | CmdTx | CmdTxFlex; ++ txfd.link = virt_to_bus (&txfd); ++ txfd.count = 0x02208000; ++ txfd.tx_desc_addr = virt_to_bus(&txfd.tx_buf_addr0); + +- txfd.tx_buf_addr0 = virt_to_bus (&hdr); +- txfd.tx_buf_size0 = sizeof (hdr); ++ txfd.tx_buf_addr0 = virt_to_bus (&hdr); ++ txfd.tx_buf_size0 = sizeof (hdr); + +- txfd.tx_buf_addr1 = virt_to_bus (p); +- txfd.tx_buf_size1 = s; ++ txfd.tx_buf_addr1 = virt_to_bus (p); ++ txfd.tx_buf_size1 = s; + + #ifdef DEBUG +- printf ("txfd: \n"); +- hd (&txfd, sizeof (txfd)); ++ printf ("txfd: \n"); ++ hd (&txfd, sizeof (txfd)); + #endif + +- outl(virt_to_bus(&txfd), ioaddr + SCBPointer); +- outw(INT_MASK | CU_START, ioaddr + SCBCmd); +- wait_for_cmd_done(ioaddr + SCBCmd); +- +- s1 = inw (ioaddr + SCBStatus); +- load_timer2(10*TICKS_PER_MS); /* timeout 10 ms for transmit */ +- while (!txfd.status && timer2_running()) +- /* Wait */; +- s2 = inw (ioaddr + SCBStatus); ++ outl(virt_to_bus(&txfd), ioaddr + SCBPointer); ++ outw(INT_MASK | CU_START, ioaddr + SCBCmd); ++ wait_for_cmd_done(ioaddr + SCBCmd); ++ ++ s1 = inw (ioaddr + SCBStatus); ++ load_timer2(10*TICKS_PER_MS); /* timeout 10 ms for transmit */ ++ while (!txfd.status && timer2_running()) ++ /* Wait */; ++ s2 = inw (ioaddr + SCBStatus); + + #ifdef DEBUG +- printf ("s1 = %hX, s2 = %hX.\n", s1, s2); ++ printf ("s1 = %hX, s2 = %hX.\n", s1, s2); + #endif + } + ++/* ++ * Sometimes the receiver stops making progress. This routine knows how to ++ * get it going again, without losing packets or being otherwise nasty like ++ * a chip reset would be. Previously the driver had a whole sequence ++ * of if RxSuspended, if it's no buffers do one thing, if it's no resources, ++ * do another, etc. But those things don't really matter. Separate logic ++ * in the ISR provides for allocating buffers--the other half of operation ++ * is just making sure the receiver is active. speedo_rx_soft_reset does that. ++ * This problem with the old, more involved algorithm is shown up under ++ * ping floods on the order of 60K packets/second on a 100Mbps fdx network. ++ */ ++static void ++speedo_rx_soft_reset(void) ++{ ++ wait_for_cmd_done(ioaddr + SCBCmd); ++ /* ++ * Put the hardware into a known state. ++ */ ++ outb(RX_ABORT, ioaddr + SCBCmd); ++ ++ ACCESS(rxfd)rx_buf_addr = 0xffffffff; ++ ++ wait_for_cmd_done(ioaddr + SCBCmd); ++ ++ outb(RX_START, ioaddr + SCBCmd); ++} ++ + /* function: eepro100_poll / eth_poll + * This recieves a packet from the network. + * +@@ -440,34 +479,87 @@ + * returns the length of the packet in nic->packetlen. + */ + +-static int eepro100_poll(struct nic *nic) ++static int eepro100_poll(struct nic *nic, int retrieve) + { +- if (!ACCESS(rxfd)status) +- return 0; ++ unsigned int status; ++ status = inw(ioaddr + SCBStatus); + +- /* Ok. We got a packet. Now restart the reciever.... */ +- ACCESS(rxfd)status = 0; +- ACCESS(rxfd)command = 0xc000; +- outl(virt_to_bus(&(ACCESS(rxfd)status)), ioaddr + SCBPointer); +- outw(INT_MASK | RX_START, ioaddr + SCBCmd); +- wait_for_cmd_done(ioaddr + SCBCmd); ++ if (!ACCESS(rxfd)status) ++ return 0; ++ ++ /* There is a packet ready */ ++ if ( ! retrieve ) return 1; ++ ++ /* ++ * The chip may have suspended reception for various reasons. ++ * Check for that, and re-prime it should this be the case. ++ */ ++ switch ((status >> 2) & 0xf) { ++ case 0: /* Idle */ ++ break; ++ case 1: /* Suspended */ ++ case 2: /* No resources (RxFDs) */ ++ case 9: /* Suspended with no more RBDs */ ++ case 10: /* No resources due to no RBDs */ ++ case 12: /* Ready with no RBDs */ ++ speedo_rx_soft_reset(); ++ break; ++ case 3: case 5: case 6: case 7: case 8: ++ case 11: case 13: case 14: case 15: ++ /* these are all reserved values */ ++ break; ++ } ++ ++ /* Ok. We got a packet. Now restart the reciever.... */ ++ ACCESS(rxfd)status = 0; ++ ACCESS(rxfd)command = 0xc000; ++ outl(virt_to_bus(&(ACCESS(rxfd)status)), ioaddr + SCBPointer); ++ outw(INT_MASK | RX_START, ioaddr + SCBCmd); ++ wait_for_cmd_done(ioaddr + SCBCmd); + + #ifdef DEBUG +- printf ("Got a packet: Len = %d.\n", ACCESS(rxfd)count & 0x3fff); ++ printf ("Got a packet: Len = %d.\n", ACCESS(rxfd)count & 0x3fff); + #endif +- nic->packetlen = ACCESS(rxfd)count & 0x3fff; +- memcpy (nic->packet, ACCESS(rxfd)packet, nic->packetlen); ++ nic->packetlen = ACCESS(rxfd)count & 0x3fff; ++ memcpy (nic->packet, ACCESS(rxfd)packet, nic->packetlen); + #ifdef DEBUG +- hd (nic->packet, 0x30); ++ hd (nic->packet, 0x30); + #endif +- return 1; ++ return 1; + } + +-static void eepro100_disable(struct nic *nic) ++/* function: eepro100_disable ++ * resets the card. This is used to allow Etherboot or Linux ++ * to probe the card again from a "virginal" state.... ++ * Arguments: none ++ * ++ * returns: void. ++ */ ++static void eepro100_disable(struct dev *dev __unused) + { +- /* See if this PartialReset solves the problem with interfering with +- kernel operation after Etherboot hands over. - Ken 20001102 */ +- outl(2, ioaddr + SCBPort); ++/* from eepro100_reset */ ++ outl(0, ioaddr + SCBPort); ++/* from eepro100_disable */ ++ /* See if this PartialReset solves the problem with interfering with ++ kernel operation after Etherboot hands over. - Ken 20001102 */ ++ outl(2, ioaddr + SCBPort); ++ ++ /* The following is from the Intel e100 driver. ++ * This hopefully solves the problem with hanging hard DOS images. */ ++ ++ /* wait for the reset to take effect */ ++ udelay(20); ++ ++ /* Mask off our interrupt line -- it is unmasked after reset */ ++ { ++ u16 intr_status; ++ /* Disable interrupts on our PCI board by setting the mask bit */ ++ outw(INT_MASK, ioaddr + SCBCmd); ++ intr_status = inw(ioaddr + SCBStatus); ++ /* ack and clear intrs */ ++ outw(intr_status, ioaddr + SCBStatus); ++ inw(ioaddr + SCBStatus); ++ } + } + + /* exported function: eepro100_probe / eth_probe +@@ -478,25 +570,30 @@ + * leaves the 82557 initialized, and ready to recieve packets. + */ + +-struct nic *eepro100_probe(struct nic *nic, unsigned short *probeaddrs, struct pci_device *p) ++static int eepro100_probe(struct dev *dev, struct pci_device *p) + { ++ struct nic *nic = (struct nic *)dev; + unsigned short sum = 0; + int i; + int read_cmd, ee_size; +- unsigned short value; + int options; +- int promisc; ++ int rx_mode; + + /* we cache only the first few words of the EEPROM data + be careful not to access beyond this array */ + unsigned short eeprom[16]; + +- if (probeaddrs == 0 || probeaddrs[0] == 0) ++ if (p->ioaddr == 0) + return 0; +- ioaddr = probeaddrs[0] & ~3; /* Mask the bit that says "this is an io addr" */ ++ ioaddr = p->ioaddr & ~3; /* Mask the bit that says "this is an io addr" */ ++ nic->ioaddr = ioaddr; + + adjust_pci_device(p); + ++ /* Copy IRQ from PCI information */ ++ /* nic->irqno = pci->irq; */ ++ nic->irqno = 0; ++ + if ((do_eeprom_cmd(EE_READ_CMD << 24, 27) & 0xffe0000) + == 0xffe0000) { + ee_size = 0x100; +@@ -513,123 +610,138 @@ + sum += value; + } + +- for (i=0;inode_addr[i] = (eeprom[i/2] >> (8*(i&1))) & 0xff; +- } +- printf ("Ethernet addr: %!\n", nic->node_addr); +- +- if (sum != 0xBABA) +- printf("eepro100: Invalid EEPROM checksum %#hX, " +- "check settings before activating this device!\n", sum); +- outl(0, ioaddr + SCBPort); +- udelay (10000); +- +- whereami ("Got eeprom."); +- +- outl(virt_to_bus(&lstats), ioaddr + SCBPointer); +- outw(INT_MASK | CU_STATSADDR, ioaddr + SCBCmd); +- wait_for_cmd_done(ioaddr + SCBCmd); +- +- whereami ("set stats addr."); +- /* INIT RX stuff. */ +- +- /* Base = 0 */ +- outl(0, ioaddr + SCBPointer); +- outw(INT_MASK | RX_ADDR_LOAD, ioaddr + SCBCmd); +- wait_for_cmd_done(ioaddr + SCBCmd); +- +- whereami ("set rx base addr."); +- +- ACCESS(rxfd)status = 0x0001; +- ACCESS(rxfd)command = 0x0000; +- ACCESS(rxfd)link = virt_to_bus(&(ACCESS(rxfd)status)); +- ACCESS(rxfd)rx_buf_addr = (int) &nic->packet; +- ACCESS(rxfd)count = 0; +- ACCESS(rxfd)size = 1528; +- +- outl(virt_to_bus(&(ACCESS(rxfd)status)), ioaddr + SCBPointer); +- outw(INT_MASK | RX_START, ioaddr + SCBCmd); +- wait_for_cmd_done(ioaddr + SCBCmd); +- +- whereami ("started RX process."); +- +- /* Start the reciever.... */ +- ACCESS(rxfd)status = 0; +- ACCESS(rxfd)command = 0xc000; +- outl(virt_to_bus(&(ACCESS(rxfd)status)), ioaddr + SCBPointer); +- outw(INT_MASK | RX_START, ioaddr + SCBCmd); +- +- /* INIT TX stuff. */ +- +- /* Base = 0 */ +- outl(0, ioaddr + SCBPointer); +- outw(INT_MASK | CU_CMD_BASE, ioaddr + SCBCmd); +- wait_for_cmd_done(ioaddr + SCBCmd); +- +- whereami ("set TX base addr."); +- +- txfd.command = (CmdIASetup); +- txfd.status = 0x0000; +- txfd.link = virt_to_bus (&confcmd); +- +- { +- char *t = (char *)&txfd.tx_desc_addr; ++ for (i=0;inode_addr[i] = (eeprom[i/2] >> (8*(i&1))) & 0xff; ++ } ++ printf ("Ethernet addr: %!\n", nic->node_addr); + +- for (i=0;inode_addr[i]; +- } ++ if (sum != 0xBABA) ++ printf("eepro100: Invalid EEPROM checksum %#hX, " ++ "check settings before activating this device!\n", sum); ++ outl(0, ioaddr + SCBPort); ++ udelay (10000); ++ whereami ("Got eeprom."); ++ ++ /* Base = 0 */ ++ outl(0, ioaddr + SCBPointer); ++ outw(INT_MASK | RX_ADDR_LOAD, ioaddr + SCBCmd); ++ wait_for_cmd_done(ioaddr + SCBCmd); ++ whereami ("set rx base addr."); ++ ++ outl(virt_to_bus(&lstats), ioaddr + SCBPointer); ++ outw(INT_MASK | CU_STATSADDR, ioaddr + SCBCmd); ++ wait_for_cmd_done(ioaddr + SCBCmd); ++ whereami ("set stats addr."); ++ ++ /* INIT RX stuff. */ ++ ACCESS(rxfd)status = 0x0001; ++ ACCESS(rxfd)command = 0x0000; ++ ACCESS(rxfd)link = virt_to_bus(&(ACCESS(rxfd)status)); ++ ACCESS(rxfd)rx_buf_addr = virt_to_bus(&nic->packet); ++ ACCESS(rxfd)count = 0; ++ ACCESS(rxfd)size = 1528; ++ ++ outl(virt_to_bus(&(ACCESS(rxfd)status)), ioaddr + SCBPointer); ++ outw(INT_MASK | RX_START, ioaddr + SCBCmd); ++ wait_for_cmd_done(ioaddr + SCBCmd); ++ ++ whereami ("started RX process."); ++ ++ /* Start the reciever.... */ ++ ACCESS(rxfd)status = 0; ++ ACCESS(rxfd)command = 0xc000; ++ outl(virt_to_bus(&(ACCESS(rxfd)status)), ioaddr + SCBPointer); ++ outw(INT_MASK | RX_START, ioaddr + SCBCmd); ++ ++ /* INIT TX stuff. */ ++ ++ /* Base = 0 */ ++ outl(0, ioaddr + SCBPointer); ++ outw(INT_MASK | CU_CMD_BASE, ioaddr + SCBCmd); ++ wait_for_cmd_done(ioaddr + SCBCmd); ++ ++ whereami ("set TX base addr."); ++ ++ txfd.command = (CmdIASetup); ++ txfd.status = 0x0000; ++ txfd.link = virt_to_bus (&confcmd); ++ ++ { ++ char *t = (char *)&txfd.tx_desc_addr; ++ ++ for (i=0;inode_addr[i]; ++ } + + #ifdef DEBUG +- printf ("Setup_eaddr:\n"); +- hd (&txfd, 0x20); ++ printf ("Setup_eaddr:\n"); ++ hd (&txfd, 0x20); + #endif +- /* options = 0x40; */ /* 10mbps half duplex... */ +- options = 0x00; /* Autosense */ +- +- promisc = 0; +- +- if ( ((eeprom[6]>>8) & 0x3f) == DP83840 +- || ((eeprom[6]>>8) & 0x3f) == DP83840A) { +- int mdi_reg23 = mdio_read(eeprom[6] & 0x1f, 23) | 0x0422; +- if (congenb) +- mdi_reg23 |= 0x0100; +- printf(" DP83840 specific setup, setting register 23 to %hX.\n", +- mdi_reg23); +- mdio_write(eeprom[6] & 0x1f, 23, mdi_reg23); +- } +- whereami ("Done DP8340 special setup."); +- if (options != 0) { +- mdio_write(eeprom[6] & 0x1f, 0, +- ((options & 0x20) ? 0x2000 : 0) | /* 100mbps? */ +- ((options & 0x10) ? 0x0100 : 0)); /* Full duplex? */ +- whereami ("set mdio_register."); +- } ++ /* options = 0x40; */ /* 10mbps half duplex... */ ++ options = 0x00; /* Autosense */ + +- confcmd.command = CmdSuspend | CmdConfigure; +- confcmd.status = 0x0000; +- confcmd.link = virt_to_bus (&txfd); +- confcmd.data[1] = (txfifo << 4) | rxfifo; +- confcmd.data[4] = rxdmacount; +- confcmd.data[5] = txdmacount + 0x80; +- confcmd.data[15] = promisc ? 0x49: 0x48; +- confcmd.data[19] = (options & 0x10) ? 0xC0 : 0x80; +- confcmd.data[21] = promisc ? 0x0D: 0x05; ++#ifdef PROMISC ++ rx_mode = 3; ++#elif ALLMULTI ++ rx_mode = 1; ++#else ++ rx_mode = 0; ++#endif + +- outl(virt_to_bus(&txfd), ioaddr + SCBPointer); +- outw(INT_MASK | CU_START, ioaddr + SCBCmd); +- wait_for_cmd_done(ioaddr + SCBCmd); ++ if ( ((eeprom[6]>>8) & 0x3f) == DP83840 ++ || ((eeprom[6]>>8) & 0x3f) == DP83840A) { ++ int mdi_reg23 = mdio_read(eeprom[6] & 0x1f, 23) | 0x0422; ++ if (congenb) ++ mdi_reg23 |= 0x0100; ++ printf(" DP83840 specific setup, setting register 23 to %hX.\n", ++ mdi_reg23); ++ mdio_write(eeprom[6] & 0x1f, 23, mdi_reg23); ++ } ++ whereami ("Done DP8340 special setup."); ++ if (options != 0) { ++ mdio_write(eeprom[6] & 0x1f, 0, ++ ((options & 0x20) ? 0x2000 : 0) | /* 100mbps? */ ++ ((options & 0x10) ? 0x0100 : 0)); /* Full duplex? */ ++ whereami ("set mdio_register."); ++ } + +- whereami ("started TX thingy (config, iasetup)."); ++ confcmd.command = CmdSuspend | CmdConfigure; ++ confcmd.status = 0x0000; ++ confcmd.link = virt_to_bus (&txfd); ++ confcmd.data[1] = (txfifo << 4) | rxfifo; ++ confcmd.data[4] = rxdmacount; ++ confcmd.data[5] = txdmacount + 0x80; ++ confcmd.data[15] = (rx_mode & 2) ? 0x49: 0x48; ++ confcmd.data[19] = (options & 0x10) ? 0xC0 : 0x80; ++ confcmd.data[21] = (rx_mode & 1) ? 0x0D: 0x05; ++ ++ outl(virt_to_bus(&txfd), ioaddr + SCBPointer); ++ outw(INT_MASK | CU_START, ioaddr + SCBCmd); ++ wait_for_cmd_done(ioaddr + SCBCmd); ++ ++ whereami ("started TX thingy (config, iasetup)."); ++ ++ load_timer2(10*TICKS_PER_MS); ++ while (!txfd.status && timer2_running()) ++ /* Wait */; ++ ++ /* Read the status register once to disgard stale data */ ++ mdio_read(eeprom[6] & 0x1f, 1); ++ /* Check to see if the network cable is plugged in. ++ * This allows for faster failure if there is nothing ++ * we can do. ++ */ ++ if (!(mdio_read(eeprom[6] & 0x1f, 1) & (1 << 2))) { ++ printf("Valid link not established\n"); ++ eepro100_disable(dev); ++ return 0; ++ } + +- load_timer2(10*TICKS_PER_MS); +- while (!txfd.status && timer2_running()) +- /* Wait */; +- +- nic->reset = eepro100_reset; +- nic->poll = eepro100_poll; +- nic->transmit = eepro100_transmit; +- nic->disable = eepro100_disable; +- return nic; ++ dev->disable = eepro100_disable; ++ nic->poll = eepro100_poll; ++ nic->transmit = eepro100_transmit; ++ nic->irq = eepro100_irq; ++ return 1; + } + + /*********************************************************************/ +@@ -639,16 +751,59 @@ + /* Hexdump a number of bytes from memory... */ + void hd (void *where, int n) + { +- int i; ++ int i; + +- while (n > 0) { +- printf ("%X ", where); +- for (i=0;i < ( (n>16)?16:n);i++) +- printf (" %hhX", ((char *)where)[i]); +- printf ("\n"); +- n -= 16; +- where += 16; +- } ++ while (n > 0) { ++ printf ("%X ", where); ++ for (i=0;i < ( (n>16)?16:n);i++) ++ printf (" %hhX", ((char *)where)[i]); ++ printf ("\n"); ++ n -= 16; ++ where += 16; ++ } + } + #endif + ++static struct pci_id eepro100_nics[] = { ++PCI_ROM(0x8086, 0x1029, "id1029", "Intel EtherExpressPro100 ID1029"), ++PCI_ROM(0x8086, 0x1030, "id1030", "Intel EtherExpressPro100 ID1030"), ++PCI_ROM(0x8086, 0x1031, "82801cam", "Intel 82801CAM (ICH3) Chipset Ethernet Controller"), ++PCI_ROM(0x8086, 0x1032, "eepro100-1032", "Intel PRO/100 VE Network Connection"), ++PCI_ROM(0x8086, 0x1033, "eepro100-1033", "Intel PRO/100 VM Network Connection"), ++PCI_ROM(0x8086, 0x1034, "eepro100-1034", "Intel PRO/100 VM Network Connection"), ++PCI_ROM(0x8086, 0x1035, "eepro100-1035", "Intel 82801CAM (ICH3) Chipset Ethernet Controller"), ++PCI_ROM(0x8086, 0x1036, "eepro100-1036", "Intel 82801CAM (ICH3) Chipset Ethernet Controller"), ++PCI_ROM(0x8086, 0x1037, "eepro100-1037", "Intel 82801CAM (ICH3) Chipset Ethernet Controller"), ++PCI_ROM(0x8086, 0x1038, "id1038", "Intel PRO/100 VM Network Connection"), ++PCI_ROM(0x8086, 0x1039, "82562et", "Intel PRO100 VE 82562ET"), ++PCI_ROM(0x8086, 0x103a, "id103a", "Intel Corporation 82559 InBusiness 10/100"), ++PCI_ROM(0x8086, 0x103b, "82562etb", "Intel PRO100 VE 82562ETB"), ++PCI_ROM(0x8086, 0x103c, "eepro100-103c", "Intel PRO/100 VM Network Connection"), ++PCI_ROM(0x8086, 0x103d, "eepro100-103d", "Intel PRO/100 VE Network Connection"), ++PCI_ROM(0x8086, 0x103e, "eepro100-103e", "Intel PRO/100 VM Network Connection"), ++PCI_ROM(0x8086, 0x1059, "82551qm", "Intel PRO/100 M Mobile Connection"), ++PCI_ROM(0x8086, 0x1209, "82559er", "Intel EtherExpressPro100 82559ER"), ++PCI_ROM(0x8086, 0x1227, "82865", "Intel 82865 EtherExpress PRO/100A"), ++PCI_ROM(0x8086, 0x1228, "82556", "Intel 82556 EtherExpress PRO/100 Smart"), ++PCI_ROM(0x8086, 0x1229, "eepro100", "Intel EtherExpressPro100"), ++PCI_ROM(0x8086, 0x2449, "82562em", "Intel EtherExpressPro100 82562EM"), ++PCI_ROM(0x8086, 0x2459, "82562-1", "Intel 82562 based Fast Ethernet Connection"), ++PCI_ROM(0x8086, 0x245d, "82562-2", "Intel 82562 based Fast Ethernet Connection"), ++PCI_ROM(0x8086, 0x1050, "82562ez", "Intel 82562EZ Network Connection"), ++PCI_ROM(0x8086, 0x5200, "eepro100-5200", "Intel EtherExpress PRO/100 Intelligent Server"), ++PCI_ROM(0x8086, 0x5201, "eepro100-5201", "Intel EtherExpress PRO/100 Intelligent Server"), ++}; ++ ++/* Cards with device ids 0x1030 to 0x103F, 0x2449, 0x2459 or 0x245D might need ++ * a workaround for hardware bug on 10 mbit half duplex (see linux driver eepro100.c) ++ * 2003/03/17 gbaum */ ++ ++ ++struct pci_driver eepro100_driver = { ++ .type = NIC_DRIVER, ++ .name = "EEPRO100", ++ .probe = eepro100_probe, ++ .ids = eepro100_nics, ++ .id_count = sizeof(eepro100_nics)/sizeof(eepro100_nics[0]), ++ .class = 0 ++}; +diff -Naur grub-0.97.orig/netboot/elf.h grub-0.97/netboot/elf.h +--- grub-0.97.orig/netboot/elf.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/elf.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,234 @@ ++#ifndef ELF_H ++#define ELF_H ++ ++#define EI_NIDENT 16 /* Size of e_ident array. */ ++ ++/* Values for e_type. */ ++#define ET_NONE 0 /* No file type */ ++#define ET_REL 1 /* Relocatable file */ ++#define ET_EXEC 2 /* Executable file */ ++#define ET_DYN 3 /* Shared object file */ ++#define ET_CORE 4 /* Core file */ ++ ++/* Values for e_machine (architecute). */ ++#define EM_NONE 0 /* No machine */ ++#define EM_M32 1 /* AT&T WE 32100 */ ++#define EM_SPARC 2 /* SUN SPARC */ ++#define EM_386 3 /* Intel 80386+ */ ++#define EM_68K 4 /* Motorola m68k family */ ++#define EM_88K 5 /* Motorola m88k family */ ++#define EM_486 6 /* Perhaps disused */ ++#define EM_860 7 /* Intel 80860 */ ++#define EM_MIPS 8 /* MIPS R3000 big-endian */ ++#define EM_S370 9 /* IBM System/370 */ ++#define EM_MIPS_RS3_LE 10 /* MIPS R3000 little-endian */ ++ ++#define EM_PARISC 15 /* HPPA */ ++#define EM_VPP500 17 /* Fujitsu VPP500 */ ++#define EM_SPARC32PLUS 18 /* Sun's "v8plus" */ ++#define EM_960 19 /* Intel 80960 */ ++#define EM_PPC 20 /* PowerPC */ ++#define EM_PPC64 21 /* PowerPC 64-bit */ ++#define EM_S390 22 /* IBM S390 */ ++ ++#define EM_V800 36 /* NEC V800 series */ ++#define EM_FR20 37 /* Fujitsu FR20 */ ++#define EM_RH32 38 /* TRW RH-32 */ ++#define EM_RCE 39 /* Motorola RCE */ ++#define EM_ARM 40 /* ARM */ ++#define EM_FAKE_ALPHA 41 /* Digital Alpha */ ++#define EM_SH 42 /* Hitachi SH */ ++#define EM_SPARCV9 43 /* SPARC v9 64-bit */ ++#define EM_TRICORE 44 /* Siemens Tricore */ ++#define EM_ARC 45 /* Argonaut RISC Core */ ++#define EM_H8_300 46 /* Hitachi H8/300 */ ++#define EM_H8_300H 47 /* Hitachi H8/300H */ ++#define EM_H8S 48 /* Hitachi H8S */ ++#define EM_H8_500 49 /* Hitachi H8/500 */ ++#define EM_IA_64 50 /* Intel Merced */ ++#define EM_MIPS_X 51 /* Stanford MIPS-X */ ++#define EM_COLDFIRE 52 /* Motorola Coldfire */ ++#define EM_68HC12 53 /* Motorola M68HC12 */ ++#define EM_MMA 54 /* Fujitsu MMA Multimedia Accelerator*/ ++#define EM_PCP 55 /* Siemens PCP */ ++#define EM_NCPU 56 /* Sony nCPU embeeded RISC */ ++#define EM_NDR1 57 /* Denso NDR1 microprocessor */ ++#define EM_STARCORE 58 /* Motorola Start*Core processor */ ++#define EM_ME16 59 /* Toyota ME16 processor */ ++#define EM_ST100 60 /* STMicroelectronic ST100 processor */ ++#define EM_TINYJ 61 /* Advanced Logic Corp. Tinyj emb.fam*/ ++#define EM_X86_64 62 /* AMD x86-64 architecture */ ++#define EM_PDSP 63 /* Sony DSP Processor */ ++ ++#define EM_FX66 66 /* Siemens FX66 microcontroller */ ++#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 mc */ ++#define EM_ST7 68 /* STmicroelectronics ST7 8 bit mc */ ++#define EM_68HC16 69 /* Motorola MC68HC16 microcontroller */ ++#define EM_68HC11 70 /* Motorola MC68HC11 microcontroller */ ++#define EM_68HC08 71 /* Motorola MC68HC08 microcontroller */ ++#define EM_68HC05 72 /* Motorola MC68HC05 microcontroller */ ++#define EM_SVX 73 /* Silicon Graphics SVx */ ++#define EM_AT19 74 /* STMicroelectronics ST19 8 bit mc */ ++#define EM_VAX 75 /* Digital VAX */ ++#define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */ ++#define EM_JAVELIN 77 /* Infineon Technologies 32-bit embedded processor */ ++#define EM_FIREPATH 78 /* Element 14 64-bit DSP Processor */ ++#define EM_ZSP 79 /* LSI Logic 16-bit DSP Processor */ ++#define EM_MMIX 80 /* Donald Knuth's educational 64-bit processor */ ++#define EM_HUANY 81 /* Harvard University machine-independent object files */ ++#define EM_PRISM 82 /* SiTera Prism */ ++#define EM_AVR 83 /* Atmel AVR 8-bit microcontroller */ ++#define EM_FR30 84 /* Fujitsu FR30 */ ++#define EM_D10V 85 /* Mitsubishi D10V */ ++#define EM_D30V 86 /* Mitsubishi D30V */ ++#define EM_V850 87 /* NEC v850 */ ++#define EM_M32R 88 /* Mitsubishi M32R */ ++#define EM_MN10300 89 /* Matsushita MN10300 */ ++#define EM_MN10200 90 /* Matsushita MN10200 */ ++#define EM_PJ 91 /* picoJava */ ++#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */ ++#define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */ ++#define EM_XTENSA 94 /* Tensilica Xtensa Architecture */ ++#define EM_NUM 95 ++ ++/* Values for p_type. */ ++#define PT_NULL 0 /* Unused entry. */ ++#define PT_LOAD 1 /* Loadable segment. */ ++#define PT_DYNAMIC 2 /* Dynamic linking information segment. */ ++#define PT_INTERP 3 /* Pathname of interpreter. */ ++#define PT_NOTE 4 /* Auxiliary information. */ ++#define PT_SHLIB 5 /* Reserved (not used). */ ++#define PT_PHDR 6 /* Location of program header itself. */ ++ ++/* Values for p_flags. */ ++#define PF_X 0x1 /* Executable. */ ++#define PF_W 0x2 /* Writable. */ ++#define PF_R 0x4 /* Readable. */ ++ ++ ++#define ELF_PROGRAM_RETURNS_BIT 0x8000000 /* e_flags bit 31 */ ++ ++#define EI_MAG0 0 ++#define ELFMAG0 0x7f ++ ++#define EI_MAG1 1 ++#define ELFMAG1 'E' ++ ++#define EI_MAG2 2 ++#define ELFMAG2 'L' ++ ++#define EI_MAG3 3 ++#define ELFMAG3 'F' ++ ++#define ELFMAG "\177ELF" ++ ++#define EI_CLASS 4 /* File class byte index */ ++#define ELFCLASSNONE 0 /* Invalid class */ ++#define ELFCLASS32 1 /* 32-bit objects */ ++#define ELFCLASS64 2 /* 64-bit objects */ ++ ++#define EI_DATA 5 /* Data encodeing byte index */ ++#define ELFDATANONE 0 /* Invalid data encoding */ ++#define ELFDATA2LSB 1 /* 2's complement little endian */ ++#define ELFDATA2MSB 2 /* 2's complement big endian */ ++ ++#define EI_VERSION 6 /* File version byte index */ ++ /* Value must be EV_CURRENT */ ++ ++#define EV_NONE 0 /* Invalid ELF Version */ ++#define EV_CURRENT 1 /* Current version */ ++ ++#define ELF32_PHDR_SIZE (8*4) /* Size of an elf program header */ ++ ++#ifndef ASSEMBLY ++/* ++ * ELF definitions common to all 32-bit architectures. ++ */ ++ ++typedef uint32_t Elf32_Addr; ++typedef uint16_t Elf32_Half; ++typedef uint32_t Elf32_Off; ++typedef int32_t Elf32_Sword; ++typedef uint32_t Elf32_Word; ++typedef uint32_t Elf32_Size; ++ ++typedef uint64_t Elf64_Addr; ++typedef uint16_t Elf64_Half; ++typedef uint64_t Elf64_Off; ++typedef int32_t Elf64_Sword; ++typedef uint32_t Elf64_Word; ++typedef uint64_t Elf64_Size; ++ ++/* ++ * ELF header. ++ */ ++typedef struct { ++ unsigned char e_ident[EI_NIDENT]; /* File identification. */ ++ Elf32_Half e_type; /* File type. */ ++ Elf32_Half e_machine; /* Machine architecture. */ ++ Elf32_Word e_version; /* ELF format version. */ ++ Elf32_Addr e_entry; /* Entry point. */ ++ Elf32_Off e_phoff; /* Program header file offset. */ ++ Elf32_Off e_shoff; /* Section header file offset. */ ++ Elf32_Word e_flags; /* Architecture-specific flags. */ ++ Elf32_Half e_ehsize; /* Size of ELF header in bytes. */ ++ Elf32_Half e_phentsize; /* Size of program header entry. */ ++ Elf32_Half e_phnum; /* Number of program header entries. */ ++ Elf32_Half e_shentsize; /* Size of section header entry. */ ++ Elf32_Half e_shnum; /* Number of section header entries. */ ++ Elf32_Half e_shstrndx; /* Section name strings section. */ ++} Elf32_Ehdr; ++ ++typedef struct { ++ unsigned char e_ident[EI_NIDENT]; /* File identification. */ ++ Elf64_Half e_type; /* File type. */ ++ Elf64_Half e_machine; /* Machine architecture. */ ++ Elf64_Word e_version; /* ELF format version. */ ++ Elf64_Addr e_entry; /* Entry point. */ ++ Elf64_Off e_phoff; /* Program header file offset. */ ++ Elf64_Off e_shoff; /* Section header file offset. */ ++ Elf64_Word e_flags; /* Architecture-specific flags. */ ++ Elf64_Half e_ehsize; /* Size of ELF header in bytes. */ ++ Elf64_Half e_phentsize; /* Size of program header entry. */ ++ Elf64_Half e_phnum; /* Number of program header entries. */ ++ Elf64_Half e_shentsize; /* Size of section header entry. */ ++ Elf64_Half e_shnum; /* Number of section header entries. */ ++ Elf64_Half e_shstrndx; /* Section name strings section. */ ++} Elf64_Ehdr; ++ ++/* ++ * Program header. ++ */ ++typedef struct { ++ Elf32_Word p_type; /* Entry type. */ ++ Elf32_Off p_offset; /* File offset of contents. */ ++ Elf32_Addr p_vaddr; /* Virtual address (not used). */ ++ Elf32_Addr p_paddr; /* Physical address. */ ++ Elf32_Size p_filesz; /* Size of contents in file. */ ++ Elf32_Size p_memsz; /* Size of contents in memory. */ ++ Elf32_Word p_flags; /* Access permission flags. */ ++ Elf32_Size p_align; /* Alignment in memory and file. */ ++} Elf32_Phdr; ++ ++typedef struct { ++ Elf64_Word p_type; /* Entry type. */ ++ Elf64_Word p_flags; /* Access permission flags. */ ++ Elf64_Off p_offset; /* File offset of contents. */ ++ Elf64_Addr p_vaddr; /* Virtual address (not used). */ ++ Elf64_Addr p_paddr; /* Physical address. */ ++ Elf64_Size p_filesz; /* Size of contents in file. */ ++ Elf64_Size p_memsz; /* Size of contents in memory. */ ++ Elf64_Size p_align; /* Alignment in memory and file. */ ++} Elf64_Phdr; ++ ++/* Standardized Elf image notes for booting... The name for all of these is ELFBoot */ ++ ++ ++/* ELF Defines for the current architecture */ ++#include "i386_elf.h" ++ ++#endif /* ASSEMBLY */ ++ ++//#include "elf_boot.h" ++ ++#endif /* ELF_H */ +diff -Naur grub-0.97.orig/netboot/endian.h grub-0.97/netboot/endian.h +--- grub-0.97.orig/netboot/endian.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/endian.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,19 @@ ++#ifndef ETHERBOOT_ENDIAN_H ++#define ETHERBOOT_ENDIAN_H ++ ++/* Definitions for byte order, according to significance of bytes, ++ from low addresses to high addresses. The value is what you get by ++ putting '4' in the most significant byte, '3' in the second most ++ significant byte, '2' in the second least significant byte, and '1' ++ in the least significant byte, and then writing down one digit for ++ each byte, starting with the byte at the lowest address at the left, ++ and proceeding to the byte with the highest address at the right. */ ++ ++#define __LITTLE_ENDIAN 1234 ++#define __BIG_ENDIAN 4321 ++#define __PDP_ENDIAN 3412 ++ ++#include "i386_endian.h" ++ ++ ++#endif /* ETHERBOOT_ENDIAN_H */ +diff -Naur grub-0.97.orig/netboot/epic100.c grub-0.97/netboot/epic100.c +--- grub-0.97.orig/netboot/epic100.c 2003-07-09 11:45:37.000000000 +0000 ++++ grub-0.97/netboot/epic100.c 2005-08-31 19:03:35.000000000 +0000 +@@ -1,15 +1,18 @@ ++ + /* epic100.c: A SMC 83c170 EPIC/100 fast ethernet driver for Etherboot */ + ++/* 05/06/2003 timlegge Fixed relocation and implemented Multicast */ + #define LINUX_OUT_MACROS + + #include "etherboot.h" ++#include "pci.h" + #include "nic.h" +-#include "cards.h" + #include "timer.h" + #include "epic100.h" + +-#undef virt_to_bus +-#define virt_to_bus(x) ((unsigned long)x) ++/* Condensed operations for readability */ ++#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr)) ++#define le32desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr)) + + #define TX_RING_SIZE 2 /* use at least 2 buffers for TX */ + #define RX_RING_SIZE 2 +@@ -26,23 +29,18 @@ + + /* The EPIC100 Rx and Tx buffer descriptors. */ + struct epic_rx_desc { +- unsigned short status; +- unsigned short rxlength; +- unsigned long bufaddr; +- unsigned short buflength; +- unsigned short control; +- unsigned long next; ++ unsigned long status; ++ unsigned long bufaddr; ++ unsigned long buflength; ++ unsigned long next; + }; +- + /* description of the tx descriptors control bits commonly used */ + #define TD_STDFLAGS TD_LASTDESC + + struct epic_tx_desc { +- unsigned short status; +- unsigned short txlength; +- unsigned long bufaddr; +- unsigned short buflength; +- unsigned short control; ++ unsigned long status; ++ unsigned long bufaddr; ++ unsigned long buflength; + unsigned long next; + }; + +@@ -51,12 +49,15 @@ + + static void epic100_open(void); + static void epic100_init_ring(void); +-static void epic100_disable(struct nic *nic); +-static int epic100_poll(struct nic *nic); ++static void epic100_disable(struct dev *dev); ++static int epic100_poll(struct nic *nic, int retrieve); + static void epic100_transmit(struct nic *nic, const char *destaddr, + unsigned int type, unsigned int len, const char *data); ++#ifdef DEBUG_EEPROM + static int read_eeprom(int location); ++#endif + static int mii_read(int phy_id, int location); ++static void epic100_irq(struct nic *nic, irq_action_t action); + + static int ioaddr; + +@@ -69,6 +70,7 @@ + static int mmctl ; + static int mmdata ; + static int lan0 ; ++static int mc0 ; + static int rxcon ; + static int txcon ; + static int prcdar ; +@@ -80,37 +82,27 @@ + static unsigned short eeprom[64]; + #endif + static signed char phys[4]; /* MII device addresses. */ +-static struct epic_rx_desc rx_ring[RX_RING_SIZE]; +-static struct epic_tx_desc tx_ring[TX_RING_SIZE]; +-#ifdef USE_LOWMEM_BUFFER +-#define rx_packet ((char *)0x10000 - PKT_BUF_SZ * RX_RING_SIZE) +-#define tx_packet ((char *)0x10000 - PKT_BUF_SZ * RX_RING_SIZE - PKT_BUF_SZ * TX_RING_SIZE) +-#else +-static char rx_packet[PKT_BUF_SZ * RX_RING_SIZE]; +-static char tx_packet[PKT_BUF_SZ * TX_RING_SIZE]; +-#endif ++static struct epic_rx_desc rx_ring[RX_RING_SIZE] ++ __attribute__ ((aligned(4))); ++static struct epic_tx_desc tx_ring[TX_RING_SIZE] ++ __attribute__ ((aligned(4))); ++static unsigned char rx_packet[PKT_BUF_SZ * RX_RING_SIZE]; ++static unsigned char tx_packet[PKT_BUF_SZ * TX_RING_SIZE]; + + /***********************************************************************/ + /* Externally visible functions */ + /***********************************************************************/ + +- static void +-epic100_reset(struct nic *nic) +-{ +- /* Soft reset the chip. */ +- outl(GC_SOFT_RESET, genctl); +-} + +- struct nic* +-epic100_probe(struct nic *nic, unsigned short *probeaddrs) ++ static int ++epic100_probe(struct dev *dev, struct pci_device *pci) + { +- unsigned short sum = 0; +- unsigned short value; ++ struct nic *nic = (struct nic *)dev; + int i; + unsigned short* ap; + unsigned int phy, phy_idx; + +- if (probeaddrs == 0 || probeaddrs[0] == 0) ++ if (pci->ioaddr == 0) + return 0; + + /* Ideally we would detect all network cards in slot order. That would +@@ -118,7 +110,9 @@ + well with the current structure. So instead we detect just the + Epic cards in slot order. */ + +- ioaddr = probeaddrs[0] & ~3; /* Mask the bit that says "this is an io addr" */ ++ ioaddr = pci->ioaddr; ++ nic->irqno = 0; ++ nic->ioaddr = pci->ioaddr & ~3; + + /* compute all used static epic100 registers address */ + command = ioaddr + COMMAND; /* Control Register */ +@@ -130,6 +124,7 @@ + mmctl = ioaddr + MMCTL; /* MII Management Interface Control */ + mmdata = ioaddr + MMDATA; /* MII Management Interface Data */ + lan0 = ioaddr + LAN0; /* MAC address. (0x40-0x48) */ ++ mc0 = ioaddr + MC0; /* Multicast Control */ + rxcon = ioaddr + RXCON; /* Receive Control */ + txcon = ioaddr + TXCON; /* Transmit Control */ + prcdar = ioaddr + PRCDAR; /* PCI Receive Current Descr Address */ +@@ -160,11 +155,15 @@ + } + + #ifdef DEBUG_EEPROM ++{ ++ unsigned short sum = 0; ++ unsigned short value; + for (i = 0; i < 64; i++) { + value = read_eeprom(i); + eeprom[i] = value; + sum += value; + } ++} + + #if (EPIC_DEBUG > 1) + printf("EEPROM contents\n"); +@@ -202,15 +201,26 @@ + + epic100_open(); + +- nic->reset = epic100_reset; ++ dev->disable = epic100_disable; + nic->poll = epic100_poll; + nic->transmit = epic100_transmit; +- nic->disable = epic100_disable; ++ nic->irq = epic100_irq; + +- return nic; ++ return 1; + } + +- static void ++static void set_rx_mode(void) ++{ ++ unsigned char mc_filter[8]; ++ int i; ++ memset(mc_filter, 0xff, sizeof(mc_filter)); ++ outl(0x0C, rxcon); ++ for(i = 0; i < 4; i++) ++ outw(((unsigned short *)mc_filter)[i], mc0 + i*4); ++ return; ++} ++ ++ static void + epic100_open(void) + { + int mii_reg5; +@@ -237,11 +247,11 @@ + outl(tmp, txcon); + + /* Give adress of RX and TX ring to the chip */ +- outl(virt_to_bus(&rx_ring), prcdar); +- outl(virt_to_bus(&tx_ring), ptcdar); ++ outl(virt_to_le32desc(&rx_ring), prcdar); ++ outl(virt_to_le32desc(&tx_ring), ptcdar); + + /* Start the chip's Rx process: receive unicast and broadcast */ +- outl(0x04, rxcon); ++ set_rx_mode(); + outl(CR_START_RX | CR_QUEUE_RX, command); + + putchar('\n'); +@@ -252,34 +262,30 @@ + epic100_init_ring(void) + { + int i; +- char* p; + + cur_rx = cur_tx = 0; + +- p = &rx_packet[0]; + for (i = 0; i < RX_RING_SIZE; i++) { +- rx_ring[i].status = RRING_OWN; /* Owned by Epic chip */ +- rx_ring[i].buflength = PKT_BUF_SZ; +- rx_ring[i].bufaddr = virt_to_bus(p + (PKT_BUF_SZ * i)); +- rx_ring[i].control = 0; +- rx_ring[i].next = virt_to_bus(&(rx_ring[i + 1]) ); ++ rx_ring[i].status = cpu_to_le32(RRING_OWN); /* Owned by Epic chip */ ++ rx_ring[i].buflength = cpu_to_le32(PKT_BUF_SZ); ++ rx_ring[i].bufaddr = virt_to_bus(&rx_packet[i * PKT_BUF_SZ]); ++ rx_ring[i].next = virt_to_le32desc(&rx_ring[i + 1]) ; + } + /* Mark the last entry as wrapping the ring. */ +- rx_ring[i-1].next = virt_to_bus(&rx_ring[0]); ++ rx_ring[i-1].next = virt_to_le32desc(&rx_ring[0]); + + /* + *The Tx buffer descriptor is filled in as needed, + * but we do need to clear the ownership bit. + */ +- p = &tx_packet[0]; + + for (i = 0; i < TX_RING_SIZE; i++) { +- tx_ring[i].status = 0; /* Owned by CPU */ +- tx_ring[i].bufaddr = virt_to_bus(p + (PKT_BUF_SZ * i)); +- tx_ring[i].control = TD_STDFLAGS; +- tx_ring[i].next = virt_to_bus(&(tx_ring[i + 1]) ); ++ tx_ring[i].status = 0x0000; /* Owned by CPU */ ++ tx_ring[i].buflength = 0x0000 | cpu_to_le32(TD_STDFLAGS << 16); ++ tx_ring[i].bufaddr = virt_to_bus(&tx_packet[i * PKT_BUF_SZ]); ++ tx_ring[i].next = virt_to_le32desc(&tx_ring[i + 1]); + } +- tx_ring[i-1].next = virt_to_bus(&tx_ring[0]); ++ tx_ring[i-1].next = virt_to_le32desc(&tx_ring[0]); + } + + /* function: epic100_transmit +@@ -296,7 +302,7 @@ + unsigned int len, const char *data) + { + unsigned short nstype; +- char* txp; ++ unsigned char *txp; + int entry; + + /* Calculate the next Tx descriptor entry. */ +@@ -310,7 +316,7 @@ + return; + } + +- txp = (char*)tx_ring[entry].bufaddr; ++ txp = tx_packet + (entry * PKT_BUF_SZ); + + memcpy(txp, destaddr, ETH_ALEN); + memcpy(txp + ETH_ALEN, nic->node_addr, ETH_ALEN); +@@ -319,26 +325,29 @@ + memcpy(txp + ETH_HLEN, data, len); + + len += ETH_HLEN; +- ++ len &= 0x0FFF; ++ while(len < ETH_ZLEN) ++ txp[len++] = '\0'; + /* + * Caution: the write order is important here, + * set the base address with the "ownership" + * bits last. + */ +- tx_ring[entry].txlength = (len >= 60 ? len : 60); +- tx_ring[entry].buflength = len; +- tx_ring[entry].status = TRING_OWN; /* Pass ownership to the chip. */ ++ ++ tx_ring[entry].buflength |= cpu_to_le32(len); ++ tx_ring[entry].status = cpu_to_le32(len << 16) | ++ cpu_to_le32(TRING_OWN); /* Pass ownership to the chip. */ + + cur_tx++; + + /* Trigger an immediate transmit demand. */ +- outl(CR_QUEUE_TX, command); +- ++ outl(CR_QUEUE_TX, command); ++ + load_timer2(10*TICKS_PER_MS); /* timeout 10 ms for transmit */ +- while ((tx_ring[entry].status & TRING_OWN) && timer2_running()) ++ while ((le32_to_cpu(tx_ring[entry].status) & (TRING_OWN)) && timer2_running()) + /* Wait */; + +- if ((tx_ring[entry].status & TRING_OWN) != 0) ++ if ((le32_to_cpu(tx_ring[entry].status) & TRING_OWN) != 0) + printf("Oops, transmitter timeout, status=%hX\n", + tx_ring[entry].status); + } +@@ -356,17 +365,19 @@ + */ + + static int +-epic100_poll(struct nic *nic) ++epic100_poll(struct nic *nic, int retrieve) + { + int entry; +- int status; + int retcode; +- ++ int status; + entry = cur_rx % RX_RING_SIZE; + +- if ((status = rx_ring[entry].status & RRING_OWN) == RRING_OWN) ++ if ((rx_ring[entry].status & cpu_to_le32(RRING_OWN)) == RRING_OWN) + return (0); + ++ if ( ! retrieve ) return 1; ++ ++ status = le32_to_cpu(rx_ring[entry].status); + /* We own the next entry, it's a new packet. Send it up. */ + + #if (EPIC_DEBUG > 4) +@@ -383,8 +394,8 @@ + retcode = 0; + } else { + /* Omit the four octet CRC from the length. */ +- nic->packetlen = rx_ring[entry].rxlength - 4; +- memcpy(nic->packet, (char*)rx_ring[entry].bufaddr, nic->packetlen); ++ nic->packetlen = le32_to_cpu((rx_ring[entry].buflength))- 4; ++ memcpy(nic->packet, &rx_packet[entry * PKT_BUF_SZ], nic->packetlen); + retcode = 1; + } + +@@ -395,17 +406,30 @@ + rx_ring[entry].status = RRING_OWN; + + /* Restart Receiver */ +- outl(CR_START_RX | CR_QUEUE_RX, command); ++ outl(CR_START_RX | CR_QUEUE_RX, command); + + return retcode; + } + + + static void +-epic100_disable(struct nic *nic) ++epic100_disable(struct dev *dev __unused) + { ++ /* Soft reset the chip. */ ++ outl(GC_SOFT_RESET, genctl); + } + ++static void epic100_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } ++} + + #ifdef DEBUG_EEPROM + /* Serial EEPROM section. */ +@@ -479,3 +503,18 @@ + break; + return inw(mmdata); + } ++ ++ ++static struct pci_id epic100_nics[] = { ++PCI_ROM(0x10b8, 0x0005, "epic100", "SMC EtherPowerII"), /* SMC 83c170 EPIC/100 */ ++PCI_ROM(0x10b8, 0x0006, "smc-83c175", "SMC EPIC/C 83c175"), ++}; ++ ++struct pci_driver epic100_driver = { ++ .type = NIC_DRIVER, ++ .name = "EPIC100", ++ .probe = epic100_probe, ++ .ids = epic100_nics, ++ .id_count = sizeof(epic100_nics)/sizeof(epic100_nics[0]), ++ .class = 0, ++}; +diff -Naur grub-0.97.orig/netboot/etherboot.h grub-0.97/netboot/etherboot.h +--- grub-0.97.orig/netboot/etherboot.h 2003-07-09 11:45:37.000000000 +0000 ++++ grub-0.97/netboot/etherboot.h 2005-08-31 19:03:35.000000000 +0000 +@@ -1,6 +1,6 @@ + /* + * GRUB -- GRand Unified Bootloader +- * Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. ++ * Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -17,531 +17,45 @@ + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +-/* RULE: You must define the macro ``GRUB'' when including this header +- file in GRUB code. */ +- +-/* Based on "src/etherboot.h" in etherboot-5.0.5. */ +- +-/************************************************************************** +-ETHERBOOT - BOOTP/TFTP Bootstrap Program +- +-Author: Martin Renters +- Date: Dec/93 +- +-**************************************************************************/ +- +-/* Include GRUB-specific macros and prototypes here. */ +-#include +- +-/* FIXME: For now, enable the DHCP support. Perhaps I should segregate +- the DHCP support from the BOOTP support, and permit both to +- co-exist. */ +-#undef NO_DHCP_SUPPORT +- +-/* In GRUB, the relocated address in Etherboot doesn't have any sense. +- Just define it as a bogus value. */ +-#define RELOC 0 +- +-/* FIXME: Should be an option. */ +-#define BACKOFF_LIMIT 7 +- +-#include +- +-#define CTRL_C 3 +- +-#ifndef MAX_TFTP_RETRIES +-# define MAX_TFTP_RETRIES 20 +-#endif +- +-#ifndef MAX_BOOTP_RETRIES +-# define MAX_BOOTP_RETRIES 20 +-#endif +- +-#define MAX_BOOTP_EXTLEN (ETH_FRAME_LEN - ETH_HLEN - \ +- sizeof (struct bootp_t)) ++/* ++ * Transport layer to use Etherboot NIC drivers in GRUB. ++ */ + +-#ifndef MAX_ARP_RETRIES +-# define MAX_ARP_RETRIES 20 +-#endif ++#ifndef ETHERBOOT_H ++#define ETHERBOOT_H + +-#ifndef MAX_RPC_RETRIES +-# define MAX_RPC_RETRIES 20 ++#include "shared.h" ++#include "osdep.h" ++#include "if_ether.h" ++#include "in.h" ++ ++/* Link configuration time in tenths of a second */ ++#ifndef VALID_LINK_TIMEOUT ++#define VALID_LINK_TIMEOUT 100 /* 10.0 seconds */ + #endif + +-#define TICKS_PER_SEC 18 +- +-/* Inter-packet retry in ticks */ +-#define TIMEOUT (10 * TICKS_PER_SEC) +- +-/* These settings have sense only if compiled with -DCONGESTED */ +-/* total retransmission timeout in ticks */ +-#define TFTP_TIMEOUT (30 * TICKS_PER_SEC) +-/* packet retransmission timeout in ticks */ +-#define TFTP_REXMT (3 * TICKS_PER_SEC) +- + #ifndef NULL +-# define NULL ((void *) 0) ++#define NULL ((void *)0) + #endif + +-/* +- I'm moving towards the defined names in linux/if_ether.h for clarity. +- The confusion between 60/64 and 1514/1518 arose because the NS8390 +- counts the 4 byte frame checksum in the incoming packet, but not +- in the outgoing packet. 60/1514 are the correct numbers for most +- if not all of the other NIC controllers. I will be retiring the +- 64/1518 defines in the lead-up to 5.0. +-*/ +- +-#define ETH_ALEN 6 /* Size of Ethernet address */ +-#define ETH_HLEN 14 /* Size of ethernet header */ +-#define ETH_ZLEN 60 /* Minimum packet */ +-/*#define ETH_MIN_PACKET 64*/ +-#define ETH_FRAME_LEN 1514 /* Maximum packet */ +-/*#define ETH_MAX_PACKET 1518*/ +-/* Because some DHCP/BOOTP servers don't treat the maximum length the same +- as Etherboot, subtract the size of an IP header and that of an UDP +- header. */ +-#define ETH_MAX_MTU (ETH_FRAME_LEN - ETH_HLEN \ +- - sizeof (struct iphdr) \ +- - sizeof (struct udphdr)) +- +-#define ARP_CLIENT 0 +-#define ARP_SERVER 1 +-#define ARP_GATEWAY 2 +-#define ARP_ROOTSERVER 3 +-#define ARP_SWAPSERVER 4 +-#define MAX_ARP ARP_SWAPSERVER+1 +- +-#define RARP_REQUEST 3 +-#define RARP_REPLY 4 +- +-#define IP 0x0800 +-#define ARP 0x0806 +-#define RARP 0x8035 +- +-#define BOOTP_SERVER 67 +-#define BOOTP_CLIENT 68 +-#define TFTP_PORT 69 +-#define SUNRPC_PORT 111 +- +-#define IP_UDP 17 +-/* Same after going through htonl */ +-#define IP_BROADCAST 0xFFFFFFFF +- +-#define ARP_REQUEST 1 +-#define ARP_REPLY 2 +- +-#define BOOTP_REQUEST 1 +-#define BOOTP_REPLY 2 +- +-#define TAG_LEN(p) (*((p) + 1)) +-#define RFC1533_COOKIE 99, 130, 83, 99 +-#define RFC1533_PAD 0 +-#define RFC1533_NETMASK 1 +-#define RFC1533_TIMEOFFSET 2 +-#define RFC1533_GATEWAY 3 +-#define RFC1533_TIMESERVER 4 +-#define RFC1533_IEN116NS 5 +-#define RFC1533_DNS 6 +-#define RFC1533_LOGSERVER 7 +-#define RFC1533_COOKIESERVER 8 +-#define RFC1533_LPRSERVER 9 +-#define RFC1533_IMPRESSSERVER 10 +-#define RFC1533_RESOURCESERVER 11 +-#define RFC1533_HOSTNAME 12 +-#define RFC1533_BOOTFILESIZE 13 +-#define RFC1533_MERITDUMPFILE 14 +-#define RFC1533_DOMAINNAME 15 +-#define RFC1533_SWAPSERVER 16 +-#define RFC1533_ROOTPATH 17 +-#define RFC1533_EXTENSIONPATH 18 +-#define RFC1533_IPFORWARDING 19 +-#define RFC1533_IPSOURCEROUTING 20 +-#define RFC1533_IPPOLICYFILTER 21 +-#define RFC1533_IPMAXREASSEMBLY 22 +-#define RFC1533_IPTTL 23 +-#define RFC1533_IPMTU 24 +-#define RFC1533_IPMTUPLATEAU 25 +-#define RFC1533_INTMTU 26 +-#define RFC1533_INTLOCALSUBNETS 27 +-#define RFC1533_INTBROADCAST 28 +-#define RFC1533_INTICMPDISCOVER 29 +-#define RFC1533_INTICMPRESPOND 30 +-#define RFC1533_INTROUTEDISCOVER 31 +-#define RFC1533_INTROUTESOLICIT 32 +-#define RFC1533_INTSTATICROUTES 33 +-#define RFC1533_LLTRAILERENCAP 34 +-#define RFC1533_LLARPCACHETMO 35 +-#define RFC1533_LLETHERNETENCAP 36 +-#define RFC1533_TCPTTL 37 +-#define RFC1533_TCPKEEPALIVETMO 38 +-#define RFC1533_TCPKEEPALIVEGB 39 +-#define RFC1533_NISDOMAIN 40 +-#define RFC1533_NISSERVER 41 +-#define RFC1533_NTPSERVER 42 +-#define RFC1533_VENDOR 43 +-#define RFC1533_NBNS 44 +-#define RFC1533_NBDD 45 +-#define RFC1533_NBNT 46 +-#define RFC1533_NBSCOPE 47 +-#define RFC1533_XFS 48 +-#define RFC1533_XDM 49 +-#ifndef NO_DHCP_SUPPORT +-#define RFC2132_REQ_ADDR 50 +-#define RFC2132_MSG_TYPE 53 +-#define RFC2132_SRV_ID 54 +-#define RFC2132_PARAM_LIST 55 +-#define RFC2132_MAX_SIZE 57 +-#define RFC2132_VENDOR_CLASS_ID 60 +- +-#define DHCPDISCOVER 1 +-#define DHCPOFFER 2 +-#define DHCPREQUEST 3 +-#define DHCPACK 5 +-#endif /* NO_DHCP_SUPPORT */ +- +-#define RFC1533_VENDOR_MAJOR 0 +-#define RFC1533_VENDOR_MINOR 0 +- +-#define RFC1533_VENDOR_MAGIC 128 +-#define RFC1533_VENDOR_ADDPARM 129 +-#define RFC1533_VENDOR_MNUOPTS 160 +-#define RFC1533_VENDOR_SELECTION 176 +-#define RFC1533_VENDOR_MOTD 184 +-#define RFC1533_VENDOR_NUMOFMOTD 8 +-#define RFC1533_VENDOR_IMG 192 +-#define RFC1533_VENDOR_NUMOFIMG 16 +- +-#define RFC1533_VENDOR_CONFIGFILE 150 +- +-#define RFC1533_END 255 +- +-#define BOOTP_VENDOR_LEN 64 +-#ifndef NO_DHCP_SUPPORT +-#define DHCP_OPT_LEN 312 +-#endif /* NO_DHCP_SUPPORT */ +- +-#define TFTP_DEFAULTSIZE_PACKET 512 +-#define TFTP_MAX_PACKET 1432 /* 512 */ +- +-#define TFTP_RRQ 1 +-#define TFTP_WRQ 2 +-#define TFTP_DATA 3 +-#define TFTP_ACK 4 +-#define TFTP_ERROR 5 +-#define TFTP_OACK 6 +- +-#define TFTP_CODE_EOF 1 +-#define TFTP_CODE_MORE 2 +-#define TFTP_CODE_ERROR 3 +-#define TFTP_CODE_BOOT 4 +-#define TFTP_CODE_CFG 5 +- +-#define AWAIT_ARP 0 +-#define AWAIT_BOOTP 1 +-#define AWAIT_TFTP 2 +-#define AWAIT_RARP 3 +-#define AWAIT_RPC 4 +-#define AWAIT_QDRAIN 5 /* drain queue, process ARP requests */ +- +-typedef struct +-{ +- unsigned long s_addr; +-} +-in_addr; +- +-struct arptable_t +-{ +- in_addr ipaddr; +- unsigned char node[6]; +-}; +- +-/* +- * A pity sipaddr and tipaddr are not longword aligned or we could use +- * in_addr. No, I don't want to use #pragma packed. +- */ +-struct arprequest +-{ +- unsigned short hwtype; +- unsigned short protocol; +- char hwlen; +- char protolen; +- unsigned short opcode; +- char shwaddr[6]; +- char sipaddr[4]; +- char thwaddr[6]; +- char tipaddr[4]; +-}; +- +-struct iphdr +-{ +- char verhdrlen; +- char service; +- unsigned short len; +- unsigned short ident; +- unsigned short frags; +- char ttl; +- char protocol; +- unsigned short chksum; +- in_addr src; +- in_addr dest; +-}; +- +-struct udphdr +-{ +- unsigned short src; +- unsigned short dest; +- unsigned short len; +- unsigned short chksum; +-}; +- +-/* Format of a bootp packet. */ +-struct bootp_t +-{ +- char bp_op; +- char bp_htype; +- char bp_hlen; +- char bp_hops; +- unsigned long bp_xid; +- unsigned short bp_secs; +- unsigned short unused; +- in_addr bp_ciaddr; +- in_addr bp_yiaddr; +- in_addr bp_siaddr; +- in_addr bp_giaddr; +- char bp_hwaddr[16]; +- char bp_sname[64]; +- char bp_file[128]; +-#ifdef NO_DHCP_SUPPORT +- char bp_vend[BOOTP_VENDOR_LEN]; +-#else +- char bp_vend[DHCP_OPT_LEN]; +-#endif /* NO_DHCP_SUPPORT */ +-}; +- +-/* Format of a bootp IP packet. */ +-struct bootpip_t +-{ +- struct iphdr ip; +- struct udphdr udp; +- struct bootp_t bp; +-}; +- +-/* Format of bootp packet with extensions. */ +-struct bootpd_t +-{ +- struct bootp_t bootp_reply; +- unsigned char bootp_extension[MAX_BOOTP_EXTLEN]; +-}; +- +-struct tftp_t +-{ +- struct iphdr ip; +- struct udphdr udp; +- unsigned short opcode; +- union +- { +- char rrq[TFTP_DEFAULTSIZE_PACKET]; +- +- struct +- { +- unsigned short block; +- char download[TFTP_MAX_PACKET]; +- } +- data; +- +- struct +- { +- unsigned short block; +- } +- ack; +- +- struct +- { +- unsigned short errcode; +- char errmsg[TFTP_DEFAULTSIZE_PACKET]; +- } +- err; +- +- struct +- { +- char data[TFTP_DEFAULTSIZE_PACKET+2]; +- } +- oack; +- } +- u; +-}; +- +-/* Define a smaller tftp packet solely for making requests to conserve stack +- 512 bytes should be enough. */ +-struct tftpreq_t +-{ +- struct iphdr ip; +- struct udphdr udp; +- unsigned short opcode; +- union +- { +- char rrq[512]; +- +- struct +- { +- unsigned short block; +- } +- ack; +- +- struct +- { +- unsigned short errcode; +- char errmsg[512-2]; +- } +- err; +- } +- u; +-}; +- +-#define TFTP_MIN_PACKET (sizeof(struct iphdr) + sizeof(struct udphdr) + 4) +- +-struct rpc_t +-{ +- struct iphdr ip; +- struct udphdr udp; +- union +- { +- char data[300]; /* longest RPC call must fit!!!! */ +- +- struct +- { +- long id; +- long type; +- long rpcvers; +- long prog; +- long vers; +- long proc; +- long data[1]; +- } +- call; +- +- struct +- { +- long id; +- long type; +- long rstatus; +- long verifier; +- long v2; +- long astatus; +- long data[1]; +- } +- reply; +- } +- u; +-}; +- +-#define PROG_PORTMAP 100000 +-#define PROG_NFS 100003 +-#define PROG_MOUNT 100005 +- +-#define MSG_CALL 0 +-#define MSG_REPLY 1 +- +-#define PORTMAP_GETPORT 3 +- +-#define MOUNT_ADDENTRY 1 +-#define MOUNT_UMOUNTALL 4 +- +-#define NFS_LOOKUP 4 +-#define NFS_READ 6 +- +-#define NFS_FHSIZE 32 +- +-#define NFSERR_PERM 1 +-#define NFSERR_NOENT 2 +-#define NFSERR_ACCES 13 +- +-/* Block size used for NFS read accesses. A RPC reply packet (including all +- * headers) must fit within a single Ethernet frame to avoid fragmentation. +- * Chosen to be a power of two, as most NFS servers are optimized for this. */ +-#define NFS_READ_SIZE 1024 +- +-#define FLOPPY_BOOT_LOCATION 0x7c00 +-/* Must match offsets in loader.S */ +-#define ROM_SEGMENT 0x1fa +-#define ROM_LENGTH 0x1fc +- +-#define ROM_INFO_LOCATION (FLOPPY_BOOT_LOCATION + ROM_SEGMENT) +-/* at end of floppy boot block */ +- +-struct rom_info +-{ +- unsigned short rom_segment; +- unsigned short rom_length; +-}; +- +-static inline int +-rom_address_ok (struct rom_info *rom, int assigned_rom_segment) +-{ +- return (assigned_rom_segment < 0xC000 +- || assigned_rom_segment == rom->rom_segment); +-} +- +-/* Define a type for passing info to a loaded program. */ +-struct ebinfo +-{ +- unsigned char major, minor; /* Version */ +- unsigned short flags; /* Bit flags */ +-}; +- +-/*************************************************************************** +-External prototypes +-***************************************************************************/ +-/* main.c */ +-extern void print_network_configuration (void); +-extern int ifconfig (char *ip, char *sm, char *gw, char *svr); +-extern int udp_transmit (unsigned long destip, unsigned int srcsock, +- unsigned int destsock, int len, const void *buf); +-extern int await_reply (int type, int ival, void *ptr, int timeout); +-extern int decode_rfc1533 (unsigned char *, int, int, int); +-extern long rfc2131_sleep_interval (int base, int exp); +-extern void cleanup (void); +-extern int rarp (void); +-extern int bootp (void); +-extern void cleanup_net (void); +- +-/* config.c */ +-extern void print_config (void); +-extern void eth_reset (void); +-extern int eth_probe (void); +-extern int eth_poll (void); +-extern void eth_transmit (const char *d, unsigned int t, +- unsigned int s, const void *p); +-extern void eth_disable (void); +- +-/* misc.c */ +-extern void twiddle (void); +-extern void sleep (int secs); +-extern int getdec (char **s); +-extern void etherboot_printf (const char *, ...); +-extern int etherboot_sprintf (char *, const char *, ...); +-extern int inet_aton (char *p, in_addr *i); +- +-/*************************************************************************** +-External variables +-***************************************************************************/ +-/* main.c */ +-extern int ip_abort; +-extern int network_ready; +-extern struct rom_info rom; +-extern struct arptable_t arptable[MAX_ARP]; +-extern struct bootpd_t bootp_data; +-#define BOOTP_DATA_ADDR (&bootp_data) +-extern unsigned char *end_of_rfc1533; + +-/* config.c */ +-extern struct nic nic; ++#define gateA20_set() gateA20(1) ++#define gateA20_unset() gateA20(0) ++#define EBDEBUG 0 ++/* The 'rom_info' maybe arch depended. It must be moved to some other ++ * place */ ++struct rom_info { ++ unsigned short rom_segment; ++ unsigned short rom_length; ++}; ++ ++extern void poll_interruptions P((void)); ++ ++/* For UNDI drivers */ ++extern void fake_irq ( uint8_t irq ); ++extern void _trivial_irq_handler_start; ++extern uint32_t get_free_base_memory ( void ); ++extern void forget_base_memory ( void*, size_t ); ++extern void free_unused_base_memory ( void ); + +-/* Local hack - define some macros to use etherboot source files "as is". */ +-#ifndef GRUB +-# undef printf +-# define printf etherboot_printf +-# undef sprintf +-# define sprintf etherboot_sprintf +-#endif /* GRUB */ ++#endif /* ETHERBOOT_H */ +diff -Naur grub-0.97.orig/netboot/fa311.c grub-0.97/netboot/fa311.c +--- grub-0.97.orig/netboot/fa311.c 2003-07-09 11:45:37.000000000 +0000 ++++ grub-0.97/netboot/fa311.c 1970-01-01 00:00:00.000000000 +0000 +@@ -1,421 +0,0 @@ +-/* +- Driver for the National Semiconductor DP83810 Ethernet controller. +- +- Portions Copyright (C) 2001 Inprimis Technologies, Inc. +- http://www.inprimis.com/ +- +- This driver is based (heavily) on the Linux driver for this chip +- which is copyright 1999-2001 by Donald Becker. +- +- This software has no warranties expressed or implied for any +- purpose. +- +- This software may be used and distributed according to the terms of +- the GNU General Public License (GPL), incorporated herein by reference. +- Drivers based on or derived from this code fall under the GPL and must +- retain the authorship, copyright and license notice. This file is not +- a complete program and may only be used when the entire operating +- system is licensed under the GPL. License for under other terms may be +- available. Contact the original author for details. +- +- The original author may be reached as becker@scyld.com, or at +- Scyld Computing Corporation +- 410 Severn Ave., Suite 210 +- Annapolis MD 21403 +-*/ +- +- +-typedef unsigned char u8; +-typedef signed char s8; +-typedef unsigned short u16; +-typedef signed short s16; +-typedef unsigned int u32; +-typedef signed int s32; +- +-#include "etherboot.h" +-#include "nic.h" +-#include "pci.h" +- +-#undef virt_to_bus +-#define virt_to_bus(x) ((unsigned long)x) +-#define cpu_to_le32(val) (val) +-#define le32_to_cpu(val) (val) +-#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr)) +-#define le32desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr)) +- +-#define TX_RING_SIZE 1 +-#define RX_RING_SIZE 4 +-#define TIME_OUT 1000000 +-#define PKT_BUF_SZ 1536 +- +-/* Offsets to the device registers. */ +-enum register_offsets { +- ChipCmd=0x00, ChipConfig=0x04, EECtrl=0x08, PCIBusCfg=0x0C, +- IntrStatus=0x10, IntrMask=0x14, IntrEnable=0x18, +- TxRingPtr=0x20, TxConfig=0x24, +- RxRingPtr=0x30, RxConfig=0x34, +- WOLCmd=0x40, PauseCmd=0x44, RxFilterAddr=0x48, RxFilterData=0x4C, +- BootRomAddr=0x50, BootRomData=0x54, StatsCtrl=0x5C, StatsData=0x60, +- RxPktErrs=0x60, RxMissed=0x68, RxCRCErrs=0x64, +-}; +- +-/* Bit in ChipCmd. */ +-enum ChipCmdBits { +- ChipReset=0x100, RxReset=0x20, TxReset=0x10, RxOff=0x08, RxOn=0x04, +- TxOff=0x02, TxOn=0x01, +-}; +- +-/* Bits in the interrupt status/mask registers. */ +-enum intr_status_bits { +- IntrRxDone=0x0001, IntrRxIntr=0x0002, IntrRxErr=0x0004, IntrRxEarly=0x0008, +- IntrRxIdle=0x0010, IntrRxOverrun=0x0020, +- IntrTxDone=0x0040, IntrTxIntr=0x0080, IntrTxErr=0x0100, +- IntrTxIdle=0x0200, IntrTxUnderrun=0x0400, +- StatsMax=0x0800, LinkChange=0x4000, WOLPkt=0x2000, +- RxResetDone=0x1000000, TxResetDone=0x2000000, +- IntrPCIErr=0x00f00000, IntrNormalSummary=0x0251, IntrAbnormalSummary=0xED20, +-}; +- +-/* Bits in the RxMode register. */ +-enum rx_mode_bits { +- AcceptErr=0x20, AcceptRunt=0x10, AcceptBroadcast=0xC0000000, +- AcceptMulticast=0x00200000, AcceptAllMulticast=0x20000000, +- AcceptAllPhys=0x10000000, AcceptMyPhys=0x08000000, +-}; +- +-/* Bits in network_desc.status */ +-enum desc_status_bits { +- DescOwn=0x80000000, DescMore=0x40000000, DescIntr=0x20000000, +- DescNoCRC=0x10000000, +- DescPktOK=0x08000000, RxTooLong=0x00400000, +-}; +- +-/* The Rx and Tx buffer descriptors. */ +-struct netdev_desc { +- u32 next_desc; +- s32 cmd_status; +- u32 addr; +-}; +- +-static struct FA311_DEV { +- unsigned int ioaddr; +- unsigned short vendor; +- unsigned short device; +- unsigned int cur_rx; +- unsigned int cur_tx; +- unsigned int rx_buf_sz; +- volatile struct netdev_desc *rx_head_desc; +- volatile struct netdev_desc rx_ring[RX_RING_SIZE] __attribute__ ((aligned (4))); +- volatile struct netdev_desc tx_ring[TX_RING_SIZE] __attribute__ ((aligned (4))); +-} fa311_dev; +- +-static int eeprom_read(long ioaddr, int location); +-static void init_ring(struct FA311_DEV *dev); +-static void fa311_reset(struct nic *nic); +-static int fa311_poll(struct nic *nic); +-static void fa311_transmit(struct nic *nic, const char *d, unsigned int t, unsigned int s, const char *p); +-static void fa311_disable(struct nic *nic); +- +-static char rx_packet[PKT_BUF_SZ * RX_RING_SIZE] __attribute__ ((aligned (4))); +-static char tx_packet[PKT_BUF_SZ * TX_RING_SIZE] __attribute__ ((aligned (4))); +- +-struct nic * fa311_probe(struct nic *nic, unsigned short *io_addrs, struct pci_device *pci) +-{ +-int prev_eedata; +-int i; +-int duplex; +-int tx_config; +-int rx_config; +-unsigned char macaddr[6]; +-unsigned char mactest; +-unsigned char pci_bus = 0; +-struct FA311_DEV* dev = &fa311_dev; +- +- if (io_addrs == 0 || *io_addrs == 0) +- return (0); +- memset(dev, 0, sizeof(*dev)); +- dev->vendor = pci->vendor; +- dev->device = pci->dev_id; +- dev->ioaddr = pci->membase; +- +- /* Work around the dropped serial bit. */ +- prev_eedata = eeprom_read(dev->ioaddr, 6); +- for (i = 0; i < 3; i++) { +- int eedata = eeprom_read(dev->ioaddr, i + 7); +- macaddr[i*2] = (eedata << 1) + (prev_eedata >> 15); +- macaddr[i*2+1] = eedata >> 7; +- prev_eedata = eedata; +- } +- mactest = 0; +- for (i = 0; i < 6; i++) +- mactest |= macaddr[i]; +- if (mactest == 0) +- return (0); +- for (i = 0; i < 6; i++) +- nic->node_addr[i] = macaddr[i]; +- printf("%! ", nic->node_addr); +- +- adjust_pci_device(pci); +- +- fa311_reset(nic); +- +- nic->reset = fa311_reset; +- nic->disable = fa311_disable; +- nic->poll = fa311_poll; +- nic->transmit = fa311_transmit; +- +- init_ring(dev); +- +- writel(virt_to_bus(dev->rx_ring), dev->ioaddr + RxRingPtr); +- writel(virt_to_bus(dev->tx_ring), dev->ioaddr + TxRingPtr); +- +- for (i = 0; i < 6; i += 2) +- { +- writel(i, dev->ioaddr + RxFilterAddr); +- writew(macaddr[i] + (macaddr[i+1] << 8), +- dev->ioaddr + RxFilterData); +- } +- +- /* Initialize other registers. */ +- /* Configure for standard, in-spec Ethernet. */ +- if (readl(dev->ioaddr + ChipConfig) & 0x20000000) +- { /* Full duplex */ +- tx_config = 0xD0801002; +- rx_config = 0x10000020; +- } +- else +- { +- tx_config = 0x10801002; +- rx_config = 0x0020; +- } +- writel(tx_config, dev->ioaddr + TxConfig); +- writel(rx_config, dev->ioaddr + RxConfig); +- +- duplex = readl(dev->ioaddr + ChipConfig) & 0x20000000 ? 1 : 0; +- if (duplex) { +- rx_config |= 0x10000000; +- tx_config |= 0xC0000000; +- } else { +- rx_config &= ~0x10000000; +- tx_config &= ~0xC0000000; +- } +- writew(tx_config, dev->ioaddr + TxConfig); +- writew(rx_config, dev->ioaddr + RxConfig); +- +- writel(AcceptBroadcast | AcceptAllMulticast | AcceptMyPhys, +- dev->ioaddr + RxFilterAddr); +- +- writel(RxOn | TxOn, dev->ioaddr + ChipCmd); +- writel(4, dev->ioaddr + StatsCtrl); /* Clear Stats */ +- return nic; +- +-} +- +-static void fa311_reset(struct nic *nic) +-{ +-u32 chip_config; +-struct FA311_DEV* dev = &fa311_dev; +- +- /* Reset the chip to erase previous misconfiguration. */ +- outl(ChipReset, dev->ioaddr + ChipCmd); +- +- if ((readl(dev->ioaddr + ChipConfig) & 0xe000) != 0xe000) +- { +- chip_config = readl(dev->ioaddr + ChipConfig); +- } +-} +- +-static int fa311_poll(struct nic *nic) +-{ +-s32 desc_status; +-int to; +-int entry; +-int retcode; +-struct FA311_DEV* dev = &fa311_dev; +- +- retcode = 0; +- entry = dev->cur_rx; +- to = TIME_OUT; +- while (to != 0) +- { +- desc_status = dev->rx_ring[entry].cmd_status; +- if ((desc_status & DescOwn) != 0) +- break; +- else +- --to; +- } +- if (to != 0) +- { +- readl(dev->ioaddr + IntrStatus); /* clear interrrupt bits */ +- /* driver owns the next entry it's a new packet. Send it up. */ +- if ((desc_status & (DescMore|DescPktOK|RxTooLong)) == DescPktOK) +- { +- nic->packetlen = (desc_status & 0x0fff) - 4; /* Omit CRC size. */ +- memcpy(nic->packet, (char*)(dev->rx_ring[entry].addr), nic->packetlen); +- retcode = 1; +- } +- /* Give the descriptor back to the chip */ +- dev->rx_ring[entry].cmd_status = cpu_to_le32(dev->rx_buf_sz); +- dev->cur_rx++; +- if (dev->cur_rx >= RX_RING_SIZE) +- dev->cur_rx = 0; +- dev->rx_head_desc = &dev->rx_ring[dev->cur_rx]; +- } +- /* Restart Rx engine if stopped. */ +- writel(RxOn, dev->ioaddr + ChipCmd); +- return retcode; +-} +- +-static void fa311_transmit(struct nic *nic, const char *destaddr, unsigned int type, unsigned int len, const char *data) +-{ +-unsigned short nstype; +-s32 desc_status; +-int to; +-int entry; +-char* txp; +-unsigned char* s; +-struct FA311_DEV* dev = &fa311_dev; +- +- /* Calculate the next Tx descriptor entry. */ +- entry = dev->cur_tx; +- txp = (char*)(dev->tx_ring[entry].addr); +- +- memcpy(txp, destaddr, ETH_ALEN); +- memcpy(txp + ETH_ALEN, nic->node_addr, ETH_ALEN); +- nstype = htons(type); +- memcpy(txp + 12, (char*)&nstype, 2); +- memcpy(txp + ETH_HLEN, data, len); +- len += ETH_HLEN; +- /* pad frame */ +- if (len < ETH_ZLEN) +- { +- s = (unsigned char*)(txp+len); +- while (s < (unsigned char*)(txp+ETH_ZLEN)) +- *s++ = 0; +- len = ETH_ZLEN; +- } +- dev->tx_ring[entry].cmd_status = cpu_to_le32(DescOwn | len); +- dev->cur_tx++; +- if (dev->cur_tx >= TX_RING_SIZE) +- dev->cur_tx = 0; +- +- /* Wake the potentially-idle transmit channel. */ +- writel(TxOn, dev->ioaddr + ChipCmd); +- +- /* wait for tranmission to complete */ +- to = TIME_OUT; +- while (to != 0) +- { +- desc_status = dev->tx_ring[entry].cmd_status; +- if ((desc_status & DescOwn) == 0) +- break; +- else +- --to; +- } +- +- readl(dev->ioaddr + IntrStatus); /* clear interrrupt bits */ +- return; +-} +- +-static void fa311_disable(struct nic *nic) +-{ +-struct FA311_DEV* dev = &fa311_dev; +- +- /* Stop the chip's Tx and Rx processes. */ +- writel(RxOff | TxOff, dev->ioaddr + ChipCmd); +-} +- +- +-/* Read the EEPROM and MII Management Data I/O (MDIO) interfaces. +- The EEPROM code is for the common 93c06/46 EEPROMs with 6 bit addresses. */ +- +-/* Delay between EEPROM clock transitions. +- No extra delay is needed with 33Mhz PCI, but future 66Mhz access may need +- a delay. Note that pre-2.0.34 kernels had a cache-alignment bug that +- made udelay() unreliable. +- The old method of using an ISA access as a delay, __SLOW_DOWN_IO__, is +- depricated. +-*/ +-#define eeprom_delay(ee_addr) inl(ee_addr) +- +-enum EEPROM_Ctrl_Bits { +- EE_ShiftClk=0x04, EE_DataIn=0x01, EE_ChipSelect=0x08, EE_DataOut=0x02, +-}; +-#define EE_Write0 (EE_ChipSelect) +-#define EE_Write1 (EE_ChipSelect | EE_DataIn) +- +-/* The EEPROM commands include the alway-set leading bit. */ +-enum EEPROM_Cmds { +- EE_WriteCmd=(5 << 6), EE_ReadCmd=(6 << 6), EE_EraseCmd=(7 << 6), +-}; +- +- +-static int eeprom_read(long addr, int location) +-{ +- int i; +- int retval = 0; +- int ee_addr = addr + EECtrl; +- int read_cmd = location | EE_ReadCmd; +- writel(EE_Write0, ee_addr); +- +- /* Shift the read command bits out. */ +- for (i = 10; i >= 0; i--) { +- short dataval = (read_cmd & (1 << i)) ? EE_Write1 : EE_Write0; +- writel(dataval, ee_addr); +- eeprom_delay(ee_addr); +- writel(dataval | EE_ShiftClk, ee_addr); +- eeprom_delay(ee_addr); +- } +- writel(EE_ChipSelect, ee_addr); +- eeprom_delay(ee_addr); +- +- for (i = 0; i < 16; i++) { +- writel(EE_ChipSelect | EE_ShiftClk, ee_addr); +- eeprom_delay(ee_addr); +- retval |= (readl(ee_addr) & EE_DataOut) ? 1 << i : 0; +- writel(EE_ChipSelect, ee_addr); +- eeprom_delay(ee_addr); +- } +- +- /* Terminate the EEPROM access. */ +- writel(EE_Write0, ee_addr); +- writel(0, ee_addr); +- return retval; +-} +- +-/* Initialize the Rx and Tx rings, along with various 'dev' bits. */ +-static void init_ring(struct FA311_DEV *dev) +-{ +- int i; +- +- dev->cur_rx = 0; +- dev->cur_tx = 0; +- +- dev->rx_buf_sz = PKT_BUF_SZ; +- dev->rx_head_desc = &dev->rx_ring[0]; +- +- /* Initialize all Rx descriptors. */ +- for (i = 0; i < RX_RING_SIZE; i++) { +- dev->rx_ring[i].next_desc = virt_to_le32desc(&dev->rx_ring[i+1]); +- dev->rx_ring[i].cmd_status = DescOwn; +- } +- /* Mark the last entry as wrapping the ring. */ +- dev->rx_ring[i-1].next_desc = virt_to_le32desc(&dev->rx_ring[0]); +- +- /* Fill in the Rx buffers. Handle allocation failure gracefully. */ +- for (i = 0; i < RX_RING_SIZE; i++) { +- dev->rx_ring[i].addr = (u32)(&rx_packet[PKT_BUF_SZ * i]); +- dev->rx_ring[i].cmd_status = cpu_to_le32(dev->rx_buf_sz); +- } +- +- for (i = 0; i < TX_RING_SIZE; i++) { +- dev->tx_ring[i].next_desc = virt_to_le32desc(&dev->tx_ring[i+1]); +- dev->tx_ring[i].cmd_status = 0; +- } +- dev->tx_ring[i-1].next_desc = virt_to_le32desc(&dev->tx_ring[0]); +- +- for (i = 0; i < TX_RING_SIZE; i++) +- dev->tx_ring[i].addr = (u32)(&tx_packet[PKT_BUF_SZ * i]); +- return; +-} +- +diff -Naur grub-0.97.orig/netboot/forcedeth.c grub-0.97/netboot/forcedeth.c +--- grub-0.97.orig/netboot/forcedeth.c 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/forcedeth.c 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,1039 @@ ++/************************************************************************** ++* forcedeth.c -- Etherboot device driver for the NVIDIA nForce ++* media access controllers. ++* ++* Note: This driver is based on the Linux driver that was based on ++* a cleanroom reimplementation which was based on reverse ++* engineered documentation written by Carl-Daniel Hailfinger ++* and Andrew de Quincey. It's neither supported nor endorsed ++* by NVIDIA Corp. Use at your own risk. ++* ++* Written 2004 by Timothy Legge ++* ++* This program is free software; you can redistribute it and/or modify ++* it under the terms of the GNU General Public License as published by ++* the Free Software Foundation; either version 2 of the License, or ++* (at your option) any later version. ++* ++* This program is distributed in the hope that it will be useful, ++* but WITHOUT ANY WARRANTY; without even the implied warranty of ++* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++* GNU General Public License for more details. ++* ++* You should have received a copy of the GNU General Public License ++* along with this program; if not, write to the Free Software ++* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++* ++* Portions of this code based on: ++* forcedeth: Ethernet driver for NVIDIA nForce media access controllers: ++* ++* (C) 2003 Manfred Spraul ++* See Linux Driver for full information ++* ++* Linux Driver Version 0.22, 19 Jan 2004 ++* ++* ++* REVISION HISTORY: ++* ================ ++* v1.0 01-31-2004 timlegge Initial port of Linux driver ++* v1.1 02-03-2004 timlegge Large Clean up, first release ++* ++* Indent Options: indent -kr -i8 ++***************************************************************************/ ++ ++/* to get some global routines like printf */ ++#include "etherboot.h" ++/* to get the interface to the body of the program */ ++#include "nic.h" ++/* to get the PCI support functions, if this is a PCI NIC */ ++#include "pci.h" ++/* Include timer support functions */ ++#include "timer.h" ++ ++#define drv_version "v1.1" ++#define drv_date "02-03-2004" ++ ++//#define TFTM_DEBUG ++#ifdef TFTM_DEBUG ++#define dprintf(x) printf x ++#else ++#define dprintf(x) ++#endif ++ ++typedef unsigned char u8; ++typedef signed char s8; ++typedef unsigned short u16; ++typedef signed short s16; ++typedef unsigned int u32; ++typedef signed int s32; ++ ++/* Condensed operations for readability. */ ++#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr)) ++#define le32desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr)) ++ ++unsigned long BASE; ++/* NIC specific static variables go here */ ++ ++ ++/* ++ * Hardware access: ++ */ ++ ++#define DEV_NEED_LASTPACKET1 0x0001 ++#define DEV_IRQMASK_1 0x0002 ++#define DEV_IRQMASK_2 0x0004 ++#define DEV_NEED_TIMERIRQ 0x0008 ++ ++enum { ++ NvRegIrqStatus = 0x000, ++#define NVREG_IRQSTAT_MIIEVENT 0040 ++#define NVREG_IRQSTAT_MASK 0x1ff ++ NvRegIrqMask = 0x004, ++#define NVREG_IRQ_RX 0x0002 ++#define NVREG_IRQ_RX_NOBUF 0x0004 ++#define NVREG_IRQ_TX_ERR 0x0008 ++#define NVREG_IRQ_TX2 0x0010 ++#define NVREG_IRQ_TIMER 0x0020 ++#define NVREG_IRQ_LINK 0x0040 ++#define NVREG_IRQ_TX1 0x0100 ++#define NVREG_IRQMASK_WANTED_1 0x005f ++#define NVREG_IRQMASK_WANTED_2 0x0147 ++#define NVREG_IRQ_UNKNOWN (~(NVREG_IRQ_RX|NVREG_IRQ_RX_NOBUF|NVREG_IRQ_TX_ERR|NVREG_IRQ_TX2|NVREG_IRQ_TIMER|NVREG_IRQ_LINK|NVREG_IRQ_TX1)) ++ ++ NvRegUnknownSetupReg6 = 0x008, ++#define NVREG_UNKSETUP6_VAL 3 ++ ++/* ++ * NVREG_POLL_DEFAULT is the interval length of the timer source on the nic ++ * NVREG_POLL_DEFAULT=97 would result in an interval length of 1 ms ++ */ ++ NvRegPollingInterval = 0x00c, ++#define NVREG_POLL_DEFAULT 970 ++ NvRegMisc1 = 0x080, ++#define NVREG_MISC1_HD 0x02 ++#define NVREG_MISC1_FORCE 0x3b0f3c ++ ++ NvRegTransmitterControl = 0x084, ++#define NVREG_XMITCTL_START 0x01 ++ NvRegTransmitterStatus = 0x088, ++#define NVREG_XMITSTAT_BUSY 0x01 ++ ++ NvRegPacketFilterFlags = 0x8c, ++#define NVREG_PFF_ALWAYS 0x7F0008 ++#define NVREG_PFF_PROMISC 0x80 ++#define NVREG_PFF_MYADDR 0x20 ++ ++ NvRegOffloadConfig = 0x90, ++#define NVREG_OFFLOAD_HOMEPHY 0x601 ++#define NVREG_OFFLOAD_NORMAL 0x5ee ++ NvRegReceiverControl = 0x094, ++#define NVREG_RCVCTL_START 0x01 ++ NvRegReceiverStatus = 0x98, ++#define NVREG_RCVSTAT_BUSY 0x01 ++ ++ NvRegRandomSeed = 0x9c, ++#define NVREG_RNDSEED_MASK 0x00ff ++#define NVREG_RNDSEED_FORCE 0x7f00 ++ ++ NvRegUnknownSetupReg1 = 0xA0, ++#define NVREG_UNKSETUP1_VAL 0x16070f ++ NvRegUnknownSetupReg2 = 0xA4, ++#define NVREG_UNKSETUP2_VAL 0x16 ++ NvRegMacAddrA = 0xA8, ++ NvRegMacAddrB = 0xAC, ++ NvRegMulticastAddrA = 0xB0, ++#define NVREG_MCASTADDRA_FORCE 0x01 ++ NvRegMulticastAddrB = 0xB4, ++ NvRegMulticastMaskA = 0xB8, ++ NvRegMulticastMaskB = 0xBC, ++ ++ NvRegTxRingPhysAddr = 0x100, ++ NvRegRxRingPhysAddr = 0x104, ++ NvRegRingSizes = 0x108, ++#define NVREG_RINGSZ_TXSHIFT 0 ++#define NVREG_RINGSZ_RXSHIFT 16 ++ NvRegUnknownTransmitterReg = 0x10c, ++ NvRegLinkSpeed = 0x110, ++#define NVREG_LINKSPEED_FORCE 0x10000 ++#define NVREG_LINKSPEED_10 10 ++#define NVREG_LINKSPEED_100 100 ++#define NVREG_LINKSPEED_1000 1000 ++ NvRegUnknownSetupReg5 = 0x130, ++#define NVREG_UNKSETUP5_BIT31 (1<<31) ++ NvRegUnknownSetupReg3 = 0x134, ++#define NVREG_UNKSETUP3_VAL1 0x200010 ++ NvRegTxRxControl = 0x144, ++#define NVREG_TXRXCTL_KICK 0x0001 ++#define NVREG_TXRXCTL_BIT1 0x0002 ++#define NVREG_TXRXCTL_BIT2 0x0004 ++#define NVREG_TXRXCTL_IDLE 0x0008 ++#define NVREG_TXRXCTL_RESET 0x0010 ++ NvRegMIIStatus = 0x180, ++#define NVREG_MIISTAT_ERROR 0x0001 ++#define NVREG_MIISTAT_LINKCHANGE 0x0008 ++#define NVREG_MIISTAT_MASK 0x000f ++#define NVREG_MIISTAT_MASK2 0x000f ++ NvRegUnknownSetupReg4 = 0x184, ++#define NVREG_UNKSETUP4_VAL 8 ++ ++ NvRegAdapterControl = 0x188, ++#define NVREG_ADAPTCTL_START 0x02 ++#define NVREG_ADAPTCTL_LINKUP 0x04 ++#define NVREG_ADAPTCTL_PHYVALID 0x4000 ++#define NVREG_ADAPTCTL_RUNNING 0x100000 ++#define NVREG_ADAPTCTL_PHYSHIFT 24 ++ NvRegMIISpeed = 0x18c, ++#define NVREG_MIISPEED_BIT8 (1<<8) ++#define NVREG_MIIDELAY 5 ++ NvRegMIIControl = 0x190, ++#define NVREG_MIICTL_INUSE 0x10000 ++#define NVREG_MIICTL_WRITE 0x08000 ++#define NVREG_MIICTL_ADDRSHIFT 5 ++ NvRegMIIData = 0x194, ++ NvRegWakeUpFlags = 0x200, ++#define NVREG_WAKEUPFLAGS_VAL 0x7770 ++#define NVREG_WAKEUPFLAGS_BUSYSHIFT 24 ++#define NVREG_WAKEUPFLAGS_ENABLESHIFT 16 ++#define NVREG_WAKEUPFLAGS_D3SHIFT 12 ++#define NVREG_WAKEUPFLAGS_D2SHIFT 8 ++#define NVREG_WAKEUPFLAGS_D1SHIFT 4 ++#define NVREG_WAKEUPFLAGS_D0SHIFT 0 ++#define NVREG_WAKEUPFLAGS_ACCEPT_MAGPAT 0x01 ++#define NVREG_WAKEUPFLAGS_ACCEPT_WAKEUPPAT 0x02 ++#define NVREG_WAKEUPFLAGS_ACCEPT_LINKCHANGE 0x04 ++ ++ NvRegPatternCRC = 0x204, ++ NvRegPatternMask = 0x208, ++ NvRegPowerCap = 0x268, ++#define NVREG_POWERCAP_D3SUPP (1<<30) ++#define NVREG_POWERCAP_D2SUPP (1<<26) ++#define NVREG_POWERCAP_D1SUPP (1<<25) ++ NvRegPowerState = 0x26c, ++#define NVREG_POWERSTATE_POWEREDUP 0x8000 ++#define NVREG_POWERSTATE_VALID 0x0100 ++#define NVREG_POWERSTATE_MASK 0x0003 ++#define NVREG_POWERSTATE_D0 0x0000 ++#define NVREG_POWERSTATE_D1 0x0001 ++#define NVREG_POWERSTATE_D2 0x0002 ++#define NVREG_POWERSTATE_D3 0x0003 ++}; ++ ++ ++ ++#define NV_TX_LASTPACKET (1<<0) ++#define NV_TX_RETRYERROR (1<<3) ++#define NV_TX_LASTPACKET1 (1<<8) ++#define NV_TX_DEFERRED (1<<10) ++#define NV_TX_CARRIERLOST (1<<11) ++#define NV_TX_LATECOLLISION (1<<12) ++#define NV_TX_UNDERFLOW (1<<13) ++#define NV_TX_ERROR (1<<14) ++#define NV_TX_VALID (1<<15) ++ ++#define NV_RX_DESCRIPTORVALID (1<<0) ++#define NV_RX_MISSEDFRAME (1<<1) ++#define NV_RX_SUBSTRACT1 (1<<3) ++#define NV_RX_ERROR1 (1<<7) ++#define NV_RX_ERROR2 (1<<8) ++#define NV_RX_ERROR3 (1<<9) ++#define NV_RX_ERROR4 (1<<10) ++#define NV_RX_CRCERR (1<<11) ++#define NV_RX_OVERFLOW (1<<12) ++#define NV_RX_FRAMINGERR (1<<13) ++#define NV_RX_ERROR (1<<14) ++#define NV_RX_AVAIL (1<<15) ++ ++/* Miscelaneous hardware related defines: */ ++#define NV_PCI_REGSZ 0x270 ++ ++/* various timeout delays: all in usec */ ++#define NV_TXRX_RESET_DELAY 4 ++#define NV_TXSTOP_DELAY1 10 ++#define NV_TXSTOP_DELAY1MAX 500000 ++#define NV_TXSTOP_DELAY2 100 ++#define NV_RXSTOP_DELAY1 10 ++#define NV_RXSTOP_DELAY1MAX 500000 ++#define NV_RXSTOP_DELAY2 100 ++#define NV_SETUP5_DELAY 5 ++#define NV_SETUP5_DELAYMAX 50000 ++#define NV_POWERUP_DELAY 5 ++#define NV_POWERUP_DELAYMAX 5000 ++#define NV_MIIBUSY_DELAY 50 ++#define NV_MIIPHY_DELAY 10 ++#define NV_MIIPHY_DELAYMAX 10000 ++ ++#define NV_WAKEUPPATTERNS 5 ++#define NV_WAKEUPMASKENTRIES 4 ++ ++/* General driver defaults */ ++#define NV_WATCHDOG_TIMEO (2*HZ) ++#define DEFAULT_MTU 1500 /* also maximum supported, at least for now */ ++ ++#define RX_RING 4 ++#define TX_RING 2 ++/* limited to 1 packet until we understand NV_TX_LASTPACKET */ ++#define TX_LIMIT_STOP 10 ++#define TX_LIMIT_START 5 ++ ++/* rx/tx mac addr + type + vlan + align + slack*/ ++#define RX_NIC_BUFSIZE (DEFAULT_MTU + 64) ++/* even more slack */ ++#define RX_ALLOC_BUFSIZE (DEFAULT_MTU + 128) ++ ++#define OOM_REFILL (1+HZ/20) ++#define POLL_WAIT (1+HZ/100) ++ ++struct ring_desc { ++ u32 PacketBuffer; ++ u16 Length; ++ u16 Flags; ++}; ++ ++ ++/* Define the TX Descriptor */ ++static struct ring_desc tx_ring[TX_RING]; ++ ++/* Create a static buffer of size RX_BUF_SZ for each ++TX Descriptor. All descriptors point to a ++part of this buffer */ ++static unsigned char txb[TX_RING * RX_NIC_BUFSIZE]; ++ ++/* Define the TX Descriptor */ ++static struct ring_desc rx_ring[RX_RING]; ++ ++/* Create a static buffer of size RX_BUF_SZ for each ++RX Descriptor All descriptors point to a ++part of this buffer */ ++static unsigned char rxb[RX_RING * RX_NIC_BUFSIZE]; ++ ++/* Private Storage for the NIC */ ++struct forcedeth_private { ++ /* General data: ++ * Locking: spin_lock(&np->lock); */ ++ int in_shutdown; ++ u32 linkspeed; ++ int duplex; ++ int phyaddr; ++ ++ /* General data: RO fields */ ++ u8 *ring_addr; ++ u32 orig_mac[2]; ++ u32 irqmask; ++ /* rx specific fields. ++ * Locking: Within irq hander or disable_irq+spin_lock(&np->lock); ++ */ ++ struct ring_desc *rx_ring; ++ unsigned int cur_rx, refill_rx; ++ struct sk_buff *rx_skbuff[RX_RING]; ++ u32 rx_dma[RX_RING]; ++ unsigned int rx_buf_sz; ++ ++ /* ++ * tx specific fields. ++ */ ++ struct ring_desc *tx_ring; ++ unsigned int next_tx, nic_tx; ++ struct sk_buff *tx_skbuff[TX_RING]; ++ u32 tx_dma[TX_RING]; ++ u16 tx_flags; ++} npx; ++ ++static struct forcedeth_private *np; ++ ++static inline void pci_push(u8 * base) ++{ ++ /* force out pending posted writes */ ++ readl(base); ++} ++static int reg_delay(int offset, u32 mask, ++ u32 target, int delay, int delaymax, const char *msg) ++{ ++ u8 *base = (u8 *) BASE; ++ ++ pci_push(base); ++ do { ++ udelay(delay); ++ delaymax -= delay; ++ if (delaymax < 0) { ++ if (msg) ++ printf(msg); ++ return 1; ++ } ++ } while ((readl(base + offset) & mask) != target); ++ return 0; ++} ++ ++#define MII_READ (-1) ++#define MII_PHYSID1 0x02 /* PHYS ID 1 */ ++#define MII_PHYSID2 0x03 /* PHYS ID 2 */ ++#define MII_BMCR 0x00 /* Basic mode control register */ ++#define MII_BMSR 0x01 /* Basic mode status register */ ++#define MII_ADVERTISE 0x04 /* Advertisement control reg */ ++#define MII_LPA 0x05 /* Link partner ability reg */ ++ ++#define BMSR_ANEGCOMPLETE 0x0020 /* Auto-negotiation complete */ ++ ++/* Link partner ability register. */ ++#define LPA_SLCT 0x001f /* Same as advertise selector */ ++#define LPA_10HALF 0x0020 /* Can do 10mbps half-duplex */ ++#define LPA_10FULL 0x0040 /* Can do 10mbps full-duplex */ ++#define LPA_100HALF 0x0080 /* Can do 100mbps half-duplex */ ++#define LPA_100FULL 0x0100 /* Can do 100mbps full-duplex */ ++#define LPA_100BASE4 0x0200 /* Can do 100mbps 4k packets */ ++#define LPA_RESV 0x1c00 /* Unused... */ ++#define LPA_RFAULT 0x2000 /* Link partner faulted */ ++#define LPA_LPACK 0x4000 /* Link partner acked us */ ++#define LPA_NPAGE 0x8000 /* Next page bit */ ++ ++/* mii_rw: read/write a register on the PHY. ++ * ++ * Caller must guarantee serialization ++ */ ++static int mii_rw(struct nic *nic __unused, int addr, int miireg, ++ int value) ++{ ++ u8 *base = (u8 *) BASE; ++ int was_running; ++ u32 reg; ++ int retval; ++ ++ writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus); ++ was_running = 0; ++ reg = readl(base + NvRegAdapterControl); ++ if (reg & NVREG_ADAPTCTL_RUNNING) { ++ was_running = 1; ++ writel(reg & ~NVREG_ADAPTCTL_RUNNING, ++ base + NvRegAdapterControl); ++ } ++ reg = readl(base + NvRegMIIControl); ++ if (reg & NVREG_MIICTL_INUSE) { ++ writel(NVREG_MIICTL_INUSE, base + NvRegMIIControl); ++ udelay(NV_MIIBUSY_DELAY); ++ } ++ ++ reg = ++ NVREG_MIICTL_INUSE | (addr << NVREG_MIICTL_ADDRSHIFT) | miireg; ++ if (value != MII_READ) { ++ writel(value, base + NvRegMIIData); ++ reg |= NVREG_MIICTL_WRITE; ++ } ++ writel(reg, base + NvRegMIIControl); ++ ++ if (reg_delay(NvRegMIIControl, NVREG_MIICTL_INUSE, 0, ++ NV_MIIPHY_DELAY, NV_MIIPHY_DELAYMAX, NULL)) { ++ dprintf(("mii_rw of reg %d at PHY %d timed out.\n", ++ miireg, addr)); ++ retval = -1; ++ } else if (value != MII_READ) { ++ /* it was a write operation - fewer failures are detectable */ ++ dprintf(("mii_rw wrote 0x%x to reg %d at PHY %d\n", ++ value, miireg, addr)); ++ retval = 0; ++ } else if (readl(base + NvRegMIIStatus) & NVREG_MIISTAT_ERROR) { ++ dprintf(("mii_rw of reg %d at PHY %d failed.\n", ++ miireg, addr)); ++ retval = -1; ++ } else { ++ /* FIXME: why is that required? */ ++ udelay(50); ++ retval = readl(base + NvRegMIIData); ++ dprintf(("mii_rw read from reg %d at PHY %d: 0x%x.\n", ++ miireg, addr, retval)); ++ } ++ if (was_running) { ++ reg = readl(base + NvRegAdapterControl); ++ writel(reg | NVREG_ADAPTCTL_RUNNING, ++ base + NvRegAdapterControl); ++ } ++ return retval; ++} ++ ++static void start_rx(struct nic *nic __unused) ++{ ++ u8 *base = (u8 *) BASE; ++ ++ dprintf(("start_rx\n")); ++ /* Already running? Stop it. */ ++ if (readl(base + NvRegReceiverControl) & NVREG_RCVCTL_START) { ++ writel(0, base + NvRegReceiverControl); ++ pci_push(base); ++ } ++ writel(np->linkspeed, base + NvRegLinkSpeed); ++ pci_push(base); ++ writel(NVREG_RCVCTL_START, base + NvRegReceiverControl); ++ pci_push(base); ++} ++ ++static void stop_rx(void) ++{ ++ u8 *base = (u8 *) BASE; ++ ++ dprintf(("stop_rx\n")); ++ writel(0, base + NvRegReceiverControl); ++ reg_delay(NvRegReceiverStatus, NVREG_RCVSTAT_BUSY, 0, ++ NV_RXSTOP_DELAY1, NV_RXSTOP_DELAY1MAX, ++ "stop_rx: ReceiverStatus remained busy"); ++ ++ udelay(NV_RXSTOP_DELAY2); ++ writel(0, base + NvRegLinkSpeed); ++} ++ ++static void start_tx(struct nic *nic __unused) ++{ ++ u8 *base = (u8 *) BASE; ++ ++ dprintf(("start_tx\n")); ++ writel(NVREG_XMITCTL_START, base + NvRegTransmitterControl); ++ pci_push(base); ++} ++ ++static void stop_tx(void) ++{ ++ u8 *base = (u8 *) BASE; ++ ++ dprintf(("stop_tx\n")); ++ writel(0, base + NvRegTransmitterControl); ++ reg_delay(NvRegTransmitterStatus, NVREG_XMITSTAT_BUSY, 0, ++ NV_TXSTOP_DELAY1, NV_TXSTOP_DELAY1MAX, ++ "stop_tx: TransmitterStatus remained busy"); ++ ++ udelay(NV_TXSTOP_DELAY2); ++ writel(0, base + NvRegUnknownTransmitterReg); ++} ++ ++ ++static void txrx_reset(struct nic *nic __unused) ++{ ++ u8 *base = (u8 *) BASE; ++ ++ dprintf(("txrx_reset\n")); ++ writel(NVREG_TXRXCTL_BIT2 | NVREG_TXRXCTL_RESET, ++ base + NvRegTxRxControl); ++ pci_push(base); ++ udelay(NV_TXRX_RESET_DELAY); ++ writel(NVREG_TXRXCTL_BIT2, base + NvRegTxRxControl); ++ pci_push(base); ++} ++ ++/* ++ * alloc_rx: fill rx ring entries. ++ * Return 1 if the allocations for the skbs failed and the ++ * rx engine is without Available descriptors ++ */ ++static int alloc_rx(struct nic *nic __unused) ++{ ++ unsigned int refill_rx = np->refill_rx; ++ int i; ++ //while (np->cur_rx != refill_rx) { ++ for (i = 0; i < RX_RING; i++) { ++ //int nr = refill_rx % RX_RING; ++ rx_ring[i].PacketBuffer = ++ virt_to_le32desc(&rxb[i * RX_NIC_BUFSIZE]); ++ rx_ring[i].Length = cpu_to_le16(RX_NIC_BUFSIZE); ++ wmb(); ++ rx_ring[i].Flags = cpu_to_le16(NV_RX_AVAIL); ++ /* printf("alloc_rx: Packet %d marked as Available\n", ++ refill_rx); */ ++ refill_rx++; ++ } ++ np->refill_rx = refill_rx; ++ if (np->cur_rx - refill_rx == RX_RING) ++ return 1; ++ return 0; ++} ++ ++static int update_linkspeed(struct nic *nic) ++{ ++ int adv, lpa, newdup; ++ u32 newls; ++ adv = mii_rw(nic, np->phyaddr, MII_ADVERTISE, MII_READ); ++ lpa = mii_rw(nic, np->phyaddr, MII_LPA, MII_READ); ++ dprintf(("update_linkspeed: PHY advertises 0x%hX, lpa 0x%hX.\n", ++ adv, lpa)); ++ ++ /* FIXME: handle parallel detection properly, handle gigabit ethernet */ ++ lpa = lpa & adv; ++ if (lpa & LPA_100FULL) { ++ newls = NVREG_LINKSPEED_FORCE | NVREG_LINKSPEED_100; ++ newdup = 1; ++ } else if (lpa & LPA_100HALF) { ++ newls = NVREG_LINKSPEED_FORCE | NVREG_LINKSPEED_100; ++ newdup = 0; ++ } else if (lpa & LPA_10FULL) { ++ newls = NVREG_LINKSPEED_FORCE | NVREG_LINKSPEED_10; ++ newdup = 1; ++ } else if (lpa & LPA_10HALF) { ++ newls = NVREG_LINKSPEED_FORCE | NVREG_LINKSPEED_10; ++ newdup = 0; ++ } else { ++ printf("bad ability %hX - falling back to 10HD.\n", lpa); ++ newls = NVREG_LINKSPEED_FORCE | NVREG_LINKSPEED_10; ++ newdup = 0; ++ } ++ if (np->duplex != newdup || np->linkspeed != newls) { ++ np->duplex = newdup; ++ np->linkspeed = newls; ++ return 1; ++ } ++ return 0; ++} ++ ++ ++ ++static int init_ring(struct nic *nic) ++{ ++ int i; ++ ++ np->next_tx = np->nic_tx = 0; ++ for (i = 0; i < TX_RING; i++) { ++ tx_ring[i].Flags = 0; ++ } ++ ++ np->cur_rx = 0; ++ np->refill_rx = 0; ++ for (i = 0; i < RX_RING; i++) { ++ rx_ring[i].Flags = 0; ++ } ++ return alloc_rx(nic); ++} ++ ++static void set_multicast(struct nic *nic) ++{ ++ ++ u8 *base = (u8 *) BASE; ++ u32 addr[2]; ++ u32 mask[2]; ++ u32 pff; ++ u32 alwaysOff[2]; ++ u32 alwaysOn[2]; ++ ++ memset(addr, 0, sizeof(addr)); ++ memset(mask, 0, sizeof(mask)); ++ ++ pff = NVREG_PFF_MYADDR; ++ ++ alwaysOn[0] = alwaysOn[1] = alwaysOff[0] = alwaysOff[1] = 0; ++ ++ addr[0] = alwaysOn[0]; ++ addr[1] = alwaysOn[1]; ++ mask[0] = alwaysOn[0] | alwaysOff[0]; ++ mask[1] = alwaysOn[1] | alwaysOff[1]; ++ ++ addr[0] |= NVREG_MCASTADDRA_FORCE; ++ pff |= NVREG_PFF_ALWAYS; ++ stop_rx(); ++ writel(addr[0], base + NvRegMulticastAddrA); ++ writel(addr[1], base + NvRegMulticastAddrB); ++ writel(mask[0], base + NvRegMulticastMaskA); ++ writel(mask[1], base + NvRegMulticastMaskB); ++ writel(pff, base + NvRegPacketFilterFlags); ++ start_rx(nic); ++} ++ ++/************************************************************************** ++RESET - Reset the NIC to prepare for use ++***************************************************************************/ ++static int forcedeth_reset(struct nic *nic) ++{ ++ u8 *base = (u8 *) BASE; ++ int ret, oom, i; ++ ret = 0; ++ dprintf(("forcedeth: open\n")); ++ ++ /* 1) erase previous misconfiguration */ ++ /* 4.1-1: stop adapter: ignored, 4.3 seems to be overkill */ ++ writel(NVREG_MCASTADDRA_FORCE, base + NvRegMulticastAddrA); ++ writel(0, base + NvRegMulticastAddrB); ++ writel(0, base + NvRegMulticastMaskA); ++ writel(0, base + NvRegMulticastMaskB); ++ writel(0, base + NvRegPacketFilterFlags); ++ writel(0, base + NvRegAdapterControl); ++ writel(0, base + NvRegLinkSpeed); ++ writel(0, base + NvRegUnknownTransmitterReg); ++ txrx_reset(nic); ++ writel(0, base + NvRegUnknownSetupReg6); ++ ++ /* 2) initialize descriptor rings */ ++ np->in_shutdown = 0; ++ oom = init_ring(nic); ++ ++ /* 3) set mac address */ ++ { ++ u32 mac[2]; ++ ++ mac[0] = ++ (nic->node_addr[0] << 0) + (nic->node_addr[1] << 8) + ++ (nic->node_addr[2] << 16) + (nic->node_addr[3] << 24); ++ mac[1] = ++ (nic->node_addr[4] << 0) + (nic->node_addr[5] << 8); ++ ++ writel(mac[0], base + NvRegMacAddrA); ++ writel(mac[1], base + NvRegMacAddrB); ++ } ++ ++ /* 4) continue setup */ ++ np->linkspeed = NVREG_LINKSPEED_FORCE | NVREG_LINKSPEED_10; ++ np->duplex = 0; ++ writel(NVREG_UNKSETUP3_VAL1, base + NvRegUnknownSetupReg3); ++ writel(0, base + NvRegTxRxControl); ++ pci_push(base); ++ writel(NVREG_TXRXCTL_BIT1, base + NvRegTxRxControl); ++ ++ reg_delay(NvRegUnknownSetupReg5, NVREG_UNKSETUP5_BIT31, ++ NVREG_UNKSETUP5_BIT31, NV_SETUP5_DELAY, ++ NV_SETUP5_DELAYMAX, ++ "open: SetupReg5, Bit 31 remained off\n"); ++ writel(0, base + NvRegUnknownSetupReg4); ++ ++ /* 5) Find a suitable PHY */ ++ writel(NVREG_MIISPEED_BIT8 | NVREG_MIIDELAY, base + NvRegMIISpeed); ++ for (i = 1; i < 32; i++) { ++ int id1, id2; ++ ++ id1 = mii_rw(nic, i, MII_PHYSID1, MII_READ); ++ if (id1 < 0) ++ continue; ++ id2 = mii_rw(nic, i, MII_PHYSID2, MII_READ); ++ if (id2 < 0) ++ continue; ++ dprintf(("open: Found PHY %04x:%04x at address %d.\n", ++ id1, id2, i)); ++ np->phyaddr = i; ++ ++ update_linkspeed(nic); ++ ++ break; ++ } ++ if (i == 32) { ++ printf("open: failing due to lack of suitable PHY.\n"); ++ ret = -1; ++ goto out_drain; ++ } ++ ++ printf("%d-Mbs Link, %s-Duplex\n", ++ np->linkspeed & NVREG_LINKSPEED_10 ? 10 : 100, ++ np->duplex ? "Full" : "Half"); ++ /* 6) continue setup */ ++ writel(NVREG_MISC1_FORCE | (np->duplex ? 0 : NVREG_MISC1_HD), ++ base + NvRegMisc1); ++ writel(readl(base + NvRegTransmitterStatus), ++ base + NvRegTransmitterStatus); ++ writel(NVREG_PFF_ALWAYS, base + NvRegPacketFilterFlags); ++ writel(NVREG_OFFLOAD_NORMAL, base + NvRegOffloadConfig); ++ ++ writel(readl(base + NvRegReceiverStatus), ++ base + NvRegReceiverStatus); ++ ++ /* FIXME: I cheated and used the calculator to get a random number */ ++ i = 75963081; ++ writel(NVREG_RNDSEED_FORCE | (i & NVREG_RNDSEED_MASK), ++ base + NvRegRandomSeed); ++ writel(NVREG_UNKSETUP1_VAL, base + NvRegUnknownSetupReg1); ++ writel(NVREG_UNKSETUP2_VAL, base + NvRegUnknownSetupReg2); ++ writel(NVREG_POLL_DEFAULT, base + NvRegPollingInterval); ++ writel(NVREG_UNKSETUP6_VAL, base + NvRegUnknownSetupReg6); ++ writel((np-> ++ phyaddr << NVREG_ADAPTCTL_PHYSHIFT) | ++ NVREG_ADAPTCTL_PHYVALID, base + NvRegAdapterControl); ++ writel(NVREG_UNKSETUP4_VAL, base + NvRegUnknownSetupReg4); ++ writel(NVREG_WAKEUPFLAGS_VAL, base + NvRegWakeUpFlags); ++ ++ /* 7) start packet processing */ ++ writel((u32) virt_to_le32desc(&rx_ring[0]), ++ base + NvRegRxRingPhysAddr); ++ writel((u32) virt_to_le32desc(&tx_ring[0]), ++ base + NvRegTxRingPhysAddr); ++ ++ ++ writel(((RX_RING - 1) << NVREG_RINGSZ_RXSHIFT) + ++ ((TX_RING - 1) << NVREG_RINGSZ_TXSHIFT), ++ base + NvRegRingSizes); ++ ++ i = readl(base + NvRegPowerState); ++ if ((i & NVREG_POWERSTATE_POWEREDUP) == 0) { ++ writel(NVREG_POWERSTATE_POWEREDUP | i, ++ base + NvRegPowerState); ++ } ++ pci_push(base); ++ udelay(10); ++ writel(readl(base + NvRegPowerState) | NVREG_POWERSTATE_VALID, ++ base + NvRegPowerState); ++ writel(NVREG_ADAPTCTL_RUNNING, base + NvRegAdapterControl); ++ ++ writel(0, base + NvRegIrqMask); ++ pci_push(base); ++ writel(NVREG_IRQSTAT_MASK, base + NvRegIrqStatus); ++ pci_push(base); ++ writel(NVREG_MIISTAT_MASK2, base + NvRegMIIStatus); ++ writel(NVREG_IRQSTAT_MASK, base + NvRegIrqStatus); ++ pci_push(base); ++/* ++ writel(np->irqmask, base + NvRegIrqMask); ++*/ ++ writel(NVREG_MCASTADDRA_FORCE, base + NvRegMulticastAddrA); ++ writel(0, base + NvRegMulticastAddrB); ++ writel(0, base + NvRegMulticastMaskA); ++ writel(0, base + NvRegMulticastMaskB); ++ writel(NVREG_PFF_ALWAYS | NVREG_PFF_MYADDR, ++ base + NvRegPacketFilterFlags); ++ ++ set_multicast(nic); ++ //start_rx(nic); ++ start_tx(nic); ++ ++ if (! ++ (mii_rw(nic, np->phyaddr, MII_BMSR, MII_READ) & ++ BMSR_ANEGCOMPLETE)) { ++ printf("no link during initialization.\n"); ++ } ++ ++ udelay(10000); ++ out_drain: ++ return ret; ++} ++ ++//extern void hex_dump(const char *data, const unsigned int len); ++ ++/************************************************************************** ++POLL - Wait for a frame ++***************************************************************************/ ++static int forcedeth_poll(struct nic *nic, int retrieve) ++{ ++ /* return true if there's an ethernet packet ready to read */ ++ /* nic->packet should contain data on return */ ++ /* nic->packetlen should contain length of data */ ++ ++ struct ring_desc *prd; ++ int len; ++ int i; ++ ++ i = np->cur_rx % RX_RING; ++ prd = &rx_ring[i]; ++ ++ if ( ! (prd->Flags & cpu_to_le16(NV_RX_DESCRIPTORVALID)) ) { ++ return 0; ++ } ++ ++ if ( ! retrieve ) return 1; ++ ++ /* got a valid packet - forward it to the network core */ ++ len = cpu_to_le16(prd->Length); ++ nic->packetlen = len; ++ //hex_dump(rxb + (i * RX_NIC_BUFSIZE), len); ++ memcpy(nic->packet, rxb + ++ (i * RX_NIC_BUFSIZE), nic->packetlen); ++ ++ wmb(); ++ np->cur_rx++; ++ alloc_rx(nic); ++ return 1; ++} ++ ++ ++/************************************************************************** ++TRANSMIT - Transmit a frame ++***************************************************************************/ ++static void forcedeth_transmit(struct nic *nic, const char *d, /* Destination */ ++ unsigned int t, /* Type */ ++ unsigned int s, /* size */ ++ const char *p) ++{ /* Packet */ ++ /* send the packet to destination */ ++ u8 *ptxb; ++ u16 nstype; ++ //u16 status; ++ u8 *base = (u8 *) BASE; ++ int nr = np->next_tx % TX_RING; ++ ++ /* point to the current txb incase multiple tx_rings are used */ ++ ptxb = txb + (nr * RX_NIC_BUFSIZE); ++ //np->tx_skbuff[nr] = ptxb; ++ ++ /* copy the packet to ring buffer */ ++ memcpy(ptxb, d, ETH_ALEN); /* dst */ ++ memcpy(ptxb + ETH_ALEN, nic->node_addr, ETH_ALEN); /* src */ ++ nstype = htons((u16) t); /* type */ ++ memcpy(ptxb + 2 * ETH_ALEN, (u8 *) & nstype, 2); /* type */ ++ memcpy(ptxb + ETH_HLEN, p, s); ++ ++ s += ETH_HLEN; ++ while (s < ETH_ZLEN) /* pad to min length */ ++ ptxb[s++] = '\0'; ++ ++ tx_ring[nr].PacketBuffer = (u32) virt_to_le32desc(ptxb); ++ tx_ring[nr].Length = cpu_to_le16(s - 1); ++ ++ wmb(); ++ tx_ring[nr].Flags = np->tx_flags; ++ ++ writel(NVREG_TXRXCTL_KICK, base + NvRegTxRxControl); ++ pci_push(base); ++ tx_ring[nr].Flags = np->tx_flags; ++ np->next_tx++; ++} ++ ++/************************************************************************** ++DISABLE - Turn off ethernet interface ++***************************************************************************/ ++static void forcedeth_disable(struct dev *dev __unused) ++{ ++ /* put the card in its initial state */ ++ /* This function serves 3 purposes. ++ * This disables DMA and interrupts so we don't receive ++ * unexpected packets or interrupts from the card after ++ * etherboot has finished. ++ * This frees resources so etherboot may use ++ * this driver on another interface ++ * This allows etherboot to reinitialize the interface ++ * if something is something goes wrong. ++ */ ++ u8 *base = (u8 *) BASE; ++ np->in_shutdown = 1; ++ stop_tx(); ++ stop_rx(); ++ ++ /* disable interrupts on the nic or we will lock up */ ++ writel(0, base + NvRegIrqMask); ++ pci_push(base); ++ dprintf(("Irqmask is zero again\n")); ++ ++ /* specia op:o write back the misordered MAC address - otherwise ++ * the next probe_nic would see a wrong address. ++ */ ++ writel(np->orig_mac[0], base + NvRegMacAddrA); ++ writel(np->orig_mac[1], base + NvRegMacAddrB); ++} ++ ++/************************************************************************** ++IRQ - Enable, Disable, or Force interrupts ++***************************************************************************/ ++static void forcedeth_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } ++} ++ ++/************************************************************************** ++PROBE - Look for an adapter, this routine's visible to the outside ++***************************************************************************/ ++#define IORESOURCE_MEM 0x00000200 ++#define board_found 1 ++#define valid_link 0 ++static int forcedeth_probe(struct dev *dev, struct pci_device *pci) ++{ ++ struct nic *nic = (struct nic *) dev; ++ unsigned long addr; ++ int sz; ++ u8 *base; ++ ++ if (pci->ioaddr == 0) ++ return 0; ++ ++ printf("forcedeth.c: Found %s, vendor=0x%hX, device=0x%hX\n", ++ pci->name, pci->vendor, pci->dev_id); ++ ++ nic->irqno = 0; ++ nic->ioaddr = pci->ioaddr & ~3; ++ ++ /* point to private storage */ ++ np = &npx; ++ ++ adjust_pci_device(pci); ++ ++ addr = pci_bar_start(pci, PCI_BASE_ADDRESS_0); ++ sz = pci_bar_size(pci, PCI_BASE_ADDRESS_0); ++ ++ /* BASE is used throughout to address the card */ ++ BASE = (unsigned long) ioremap(addr, sz); ++ if (!BASE) ++ return 0; ++ //rx_ring[0] = rx_ring; ++ //tx_ring[0] = tx_ring; ++ ++ /* read the mac address */ ++ base = (u8 *) BASE; ++ np->orig_mac[0] = readl(base + NvRegMacAddrA); ++ np->orig_mac[1] = readl(base + NvRegMacAddrB); ++ ++ nic->node_addr[0] = (np->orig_mac[1] >> 8) & 0xff; ++ nic->node_addr[1] = (np->orig_mac[1] >> 0) & 0xff; ++ nic->node_addr[2] = (np->orig_mac[0] >> 24) & 0xff; ++ nic->node_addr[3] = (np->orig_mac[0] >> 16) & 0xff; ++ nic->node_addr[4] = (np->orig_mac[0] >> 8) & 0xff; ++ nic->node_addr[5] = (np->orig_mac[0] >> 0) & 0xff; ++#ifdef LINUX ++ if (!is_valid_ether_addr(dev->dev_addr)) { ++ /* ++ * Bad mac address. At least one bios sets the mac address ++ * to 01:23:45:67:89:ab ++ */ ++ printk(KERN_ERR ++ "%s: Invalid Mac address detected: %02x:%02x:%02x:%02x:%02x:%02x\n", ++ pci_name(pci_dev), dev->dev_addr[0], ++ dev->dev_addr[1], dev->dev_addr[2], ++ dev->dev_addr[3], dev->dev_addr[4], ++ dev->dev_addr[5]); ++ printk(KERN_ERR ++ "Please complain to your hardware vendor. Switching to a random MAC.\n"); ++ dev->dev_addr[0] = 0x00; ++ dev->dev_addr[1] = 0x00; ++ dev->dev_addr[2] = 0x6c; ++ get_random_bytes(&dev->dev_addr[3], 3); ++ } ++#endif ++ printf("%s: MAC Address %!, ", pci->name, nic->node_addr); ++ ++ np->tx_flags = ++ cpu_to_le16(NV_TX_LASTPACKET | NV_TX_LASTPACKET1 | ++ NV_TX_VALID); ++ switch (pci->dev_id) { ++ case 0x01C3: // nforce ++ np->irqmask = NVREG_IRQMASK_WANTED_2; ++ np->irqmask |= NVREG_IRQ_TIMER; ++ break; ++ case 0x0066: // nforce2 ++ np->tx_flags |= cpu_to_le16(NV_TX_LASTPACKET1); ++ np->irqmask = NVREG_IRQMASK_WANTED_2; ++ np->irqmask |= NVREG_IRQ_TIMER; ++ break; ++ case 0x00D6: // nforce3 ++ np->tx_flags |= cpu_to_le16(NV_TX_LASTPACKET1); ++ np->irqmask = NVREG_IRQMASK_WANTED_2; ++ np->irqmask |= NVREG_IRQ_TIMER; ++ ++ } ++ dprintf(("%s: forcedeth.c: subsystem: %hX:%hX bound to %s\n", ++ pci->name, pci->vendor, pci->dev_id, pci->name)); ++ ++ forcedeth_reset(nic); ++// if (board_found && valid_link) ++ /* point to NIC specific routines */ ++ dev->disable = forcedeth_disable; ++ nic->poll = forcedeth_poll; ++ nic->transmit = forcedeth_transmit; ++ nic->irq = forcedeth_irq; ++ return 1; ++// } ++ /* else */ ++} ++ ++static struct pci_id forcedeth_nics[] = { ++ PCI_ROM(0x10de, 0x01C3, "nforce", "nForce Ethernet Controller"), ++ PCI_ROM(0x10de, 0x0066, "nforce2", "nForce2 Ethernet Controller"), ++ PCI_ROM(0x10de, 0x00D6, "nforce3", "nForce3 Ethernet Controller"), ++}; ++ ++struct pci_driver forcedeth_driver = { ++ .type = NIC_DRIVER, ++ .name = "forcedeth", ++ .probe = forcedeth_probe, ++ .ids = forcedeth_nics, ++ .id_count = sizeof(forcedeth_nics) / sizeof(forcedeth_nics[0]), ++ .class = 0, ++}; +diff -Naur grub-0.97.orig/netboot/fsys_tftp.c grub-0.97/netboot/fsys_tftp.c +--- grub-0.97.orig/netboot/fsys_tftp.c 2004-04-15 11:38:40.000000000 +0000 ++++ grub-0.97/netboot/fsys_tftp.c 2005-08-31 19:03:35.000000000 +0000 +@@ -29,14 +29,15 @@ + /* #define TFTP_DEBUG 1 */ + + #include ++#include + +-#define GRUB 1 +-#include +-#include ++#include "grub.h" ++#include "tftp.h" ++#include "nic.h" + + static int retry; + static unsigned short iport = 2000; +-static unsigned short oport; ++static unsigned short oport = 0; + static unsigned short block, prevblock; + static int bcounter; + static struct tftp_t tp, saved_tp; +@@ -46,6 +47,172 @@ + static unsigned short len, saved_len; + static char *buf; + ++/** ++ * tftp_read ++ * ++ * Read file with _name_, data handled by _fnc_. In fact, grub never ++ * use it, we just use it to read dhcp config file. ++ */ ++static int await_tftp(int ival, void *ptr __unused, ++ unsigned short ptype __unused, struct iphdr *ip, ++ struct udphdr *udp) ++{ ++ if (!udp) { ++ return 0; ++ } ++ if (arptable[ARP_CLIENT].ipaddr.s_addr != ip->dest.s_addr) ++ return 0; ++ if (ntohs(udp->dest) != ival) ++ return 0; ++ return 1; ++} ++ ++int tftp_file_read(const char *name, int (*fnc)(unsigned char *, unsigned int, unsigned int, int)) ++{ ++ struct tftpreq_t tp; ++ struct tftp_t *tr; ++ int rc; ++ ++ retry = 0; ++ block = 0; ++ prevblock = 0; ++ bcounter = 0; ++ ++ ++ rx_qdrain(); ++ ++ tp.opcode = htons(TFTP_RRQ); ++ /* Warning: the following assumes the layout of bootp_t. ++ But that's fixed by the IP, UDP and BOOTP specs. */ ++ len = sizeof(tp.ip) + sizeof(tp.udp) + sizeof(tp.opcode) + ++ sprintf((char *)tp.u.rrq, "%s%coctet%cblksize%c%d", ++ name, 0, 0, 0, TFTP_MAX_PACKET) + 1; ++ if (!udp_transmit(arptable[ARP_SERVER].ipaddr.s_addr, ++iport, ++ TFTP_PORT, len, &tp)) ++ return (0); ++ for (;;) ++ { ++ long timeout; ++#ifdef CONGESTED ++ timeout = rfc2131_sleep_interval(block?TFTP_REXMT: TIMEOUT, retry); ++#else ++ timeout = rfc2131_sleep_interval(TIMEOUT, retry); ++#endif ++ if (!await_reply(await_tftp, iport, NULL, timeout)) ++ { ++ if (!block && retry++ < MAX_TFTP_RETRIES) ++ { /* maybe initial request was lost */ ++ if (!udp_transmit(arptable[ARP_SERVER].ipaddr.s_addr, ++ ++iport, TFTP_PORT, len, &tp)) ++ return (0); ++ continue; ++ } ++#ifdef CONGESTED ++ if (block && ((retry += TFTP_REXMT) < TFTP_TIMEOUT)) ++ { /* we resend our last ack */ ++#ifdef MDEBUG ++ printf("\n"); ++#endif ++ udp_transmit(arptable[ARP_SERVER].ipaddr.s_addr, ++ iport, oport, ++ TFTP_MIN_PACKET, &tp); ++ continue; ++ } ++#endif ++ break; /* timeout */ ++ } ++ tr = (struct tftp_t *)&nic.packet[ETH_HLEN]; ++ if (tr->opcode == ntohs(TFTP_ERROR)) ++ { ++ printf("TFTP error %d (%s)\n", ++ ntohs(tr->u.err.errcode), ++ tr->u.err.errmsg); ++ break; ++ } ++ ++ if (tr->opcode == ntohs(TFTP_OACK)) { ++ char *p = tr->u.oack.data, *e; ++ ++ if (prevblock) /* shouldn't happen */ ++ continue; /* ignore it */ ++ len = ntohs(tr->udp.len) - sizeof(struct udphdr) - 2; ++ if (len > TFTP_MAX_PACKET) ++ goto noak; ++ e = p + len; ++ while (*p != '\0' && p < e) { ++/* if (!strcasecmp("blksize", p)) { */ ++ if (!grub_strcmp("blksize", p)) { ++ p += 8; ++/* if ((packetsize = strtoul(p, &p, 10)) < */ ++ if ((packetsize = getdec(&p)) < TFTP_DEFAULTSIZE_PACKET) ++ goto noak; ++ while (p < e && *p) p++; ++ if (p < e) ++ p++; ++ } ++ else { ++ noak: ++ tp.opcode = htons(TFTP_ERROR); ++ tp.u.err.errcode = 8; ++/* ++ * Warning: the following assumes the layout of bootp_t. ++ * But that's fixed by the IP, UDP and BOOTP specs. ++ */ ++ len = sizeof(tp.ip) + sizeof(tp.udp) + sizeof(tp.opcode) + sizeof(tp.u.err.errcode) + ++/* ++ * Normally bad form to omit the format string, but in this case ++ * the string we are copying from is fixed. sprintf is just being ++ * used as a strcpy and strlen. ++ */ ++ sprintf((char *)tp.u.err.errmsg, ++ "RFC1782 error") + 1; ++ udp_transmit(arptable[ARP_SERVER].ipaddr.s_addr, ++ iport, ntohs(tr->udp.src), ++ len, &tp); ++ return (0); ++ } ++ } ++ if (p > e) ++ goto noak; ++ block = tp.u.ack.block = 0; /* this ensures, that */ ++ /* the packet does not get */ ++ /* processed as data! */ ++ } ++ else if (tr->opcode == htons(TFTP_DATA)) { ++ len = ntohs(tr->udp.len) - sizeof(struct udphdr) - 4; ++ if (len > packetsize) /* shouldn't happen */ ++ continue; /* ignore it */ ++ block = ntohs(tp.u.ack.block = tr->u.data.block); } ++ else {/* neither TFTP_OACK nor TFTP_DATA */ ++ break; ++ } ++ ++ if ((block || bcounter) && (block != (unsigned short)(prevblock+1))) { ++ /* Block order should be continuous */ ++ tp.u.ack.block = htons(block = prevblock); ++ } ++ tp.opcode = htons(TFTP_ACK); ++ oport = ntohs(tr->udp.src); ++ udp_transmit(arptable[ARP_SERVER].ipaddr.s_addr, iport, ++ oport, TFTP_MIN_PACKET, &tp); /* ack */ ++ if ((unsigned short)(block-prevblock) != 1) { ++ /* Retransmission or OACK, don't process via callback ++ * and don't change the value of prevblock. */ ++ continue; ++ } ++ prevblock = block; ++ retry = 0; /* It's the right place to zero the timer? */ ++ if ((rc = fnc(tr->u.data.download, ++ ++bcounter, len, len < packetsize)) <= 0) ++ return(rc); ++ if (len < packetsize) { /* End of data --- fnc should not have returned */ ++ printf("tftp download complete, but\n"); ++ return (1); ++ } ++ } ++ return (0); ++} ++ + /* Fill the buffer by receiving the data via the TFTP protocol. */ + static int + buf_fill (int abort) +@@ -65,9 +232,9 @@ + timeout = rfc2131_sleep_interval (TIMEOUT, retry); + #endif + +- if (! await_reply (AWAIT_TFTP, iport, NULL, timeout)) ++ if (! await_reply (await_tftp, iport, NULL, timeout)) + { +- if (ip_abort) ++ if (user_abort) + return 0; + + if (! block && retry++ < MAX_TFTP_RETRIES) +@@ -270,13 +437,7 @@ + buf_read = 0; + saved_filepos = 0; + +- /* Clear out the Rx queue first. It contains nothing of interest, +- * except possibly ARP requests from the DHCP/TFTP server. We use +- * polling throughout Etherboot, so some time may have passed since we +- * last polled the receive queue, which may now be filled with +- * broadcast packets. This will cause the reply to the packets we are +- * about to send to be lost immediately. Not very clever. */ +- await_reply (AWAIT_QDRAIN, 0, NULL, 0); ++ rx_qdrain(); + + #ifdef TFTP_DEBUG + grub_printf ("send_rrq ()\n"); +diff -Naur grub-0.97.orig/netboot/grub.h grub-0.97/netboot/grub.h +--- grub-0.97.orig/netboot/grub.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/grub.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,171 @@ ++#ifndef GRUB_H ++#define GRUB_H ++ ++#include "osdep.h" ++#include "byteswap.h" ++#include "in.h" ++#include "ip.h" ++#include "udp.h" ++#include "if_ether.h" ++#include "latch.h" ++#include "io.h" ++#include "nic.h" ++#include ++ ++#define K_ESC '\033' ++#define K_EOF '\04' /* Ctrl-D */ ++#define K_INTR '\03' /* Ctrl-C */ ++ ++#ifndef MAX_RPC_RETRIES ++#define MAX_RPC_RETRIES 20 ++#endif ++ ++ ++/* Inter-packet retry in ticks */ ++#ifndef TIMEOUT ++#define TIMEOUT (10*TICKS_PER_SEC) ++#endif ++ ++#ifndef NULL ++#define NULL ((void *)0) ++#endif ++ ++ ++#define ARP_CLIENT 0 ++#define ARP_SERVER 1 ++#define ARP_GATEWAY 2 ++#define MAX_ARP ARP_GATEWAY+1 ++ ++#define IGMP_SERVER 0 ++#define MAX_IGMP IGMP_SERVER+1 ++ ++#define RARP_REQUEST 3 ++#define RARP_REPLY 4 ++ ++ ++#define MULTICAST_MASK 0xF0000000 ++#define MULTICAST_NETWORK 0xE0000000 ++ ++struct arptable_t { ++ in_addr ipaddr; ++ uint8_t node[6]; ++}; ++ ++struct igmptable_t { ++ in_addr group; ++ unsigned long time; ++}; ++ ++#define KERNEL_BUF (BOOTP_DATA_ADDR->bootp_reply.bp_file) ++ ++#define FLOPPY_BOOT_LOCATION 0x7c00 ++/* Must match offsets in loader.S */ ++#define ROM_SEGMENT 0x1fa ++#define ROM_LENGTH 0x1fc ++ ++#define ROM_INFO_LOCATION (FLOPPY_BOOT_LOCATION+ROM_SEGMENT) ++/* at end of floppy boot block */ ++ ++ ++ ++/* Define a type for passing info to a loaded program */ ++struct ebinfo { ++ uint8_t major, minor; /* Version */ ++ uint16_t flags; /* Bit flags */ ++}; ++ ++/*************************************************************************** ++External prototypes ++***************************************************************************/ ++extern void rx_qdrain P((void)); ++extern int tftp P((const char *name, int (*)(unsigned char *, unsigned int, unsigned int, int))); ++extern int ip_transmit P((int len, const void *buf)); ++extern void build_ip_hdr P((unsigned long destip, int ttl, int protocol, ++ int option_len, int len, const void *buf)); ++extern void build_udp_hdr P((unsigned long destip, ++ unsigned int srcsock, unsigned int destsock, int ttl, ++ int len, const void *buf)); ++extern int udp_transmit P((unsigned long destip, unsigned int srcsock, ++ unsigned int destsock, int len, const void *buf)); ++typedef int (*reply_t)(int ival, void *ptr, unsigned short ptype, struct iphdr *ip, struct udphdr *udp); ++extern int await_reply P((reply_t reply, int ival, void *ptr, long timeout)); ++extern int decode_rfc1533 P((unsigned char *, unsigned int, unsigned int, int)); ++extern void join_group(int slot, unsigned long group); ++extern void leave_group(int slot); ++#define RAND_MAX 2147483647L ++extern uint16_t ipchksum P((const void *ip, unsigned long len)); ++extern uint16_t add_ipchksums P((unsigned long offset, uint16_t sum, uint16_t new)); ++extern int32_t random P((void)); ++extern long rfc2131_sleep_interval P((long base, int exp)); ++extern long rfc1112_sleep_interval P((long base, int exp)); ++#ifndef DOWNLOAD_PROTO_TFTP ++#define tftp(fname, load_block) 0 ++#endif ++extern void cleanup P((void)); ++ ++/* misc.c */ ++extern void twiddle P((void)); ++extern void sleep P((int secs)); ++extern void interruptible_sleep P((int secs)); ++extern void poll_interruptions P((void)); ++extern int strcasecmp P((const char *a, const char *b)); ++extern char *substr P((const char *a, const char *b)); ++extern unsigned long strtoul P((const char *p, const char **, int base)); ++extern void printf P((const char *, ...)); ++extern int sprintf P((char *, const char *, ...)); ++extern int inet_aton P((char *p, in_addr *i)); ++extern void putchar P((int)); ++extern int getchar P((void)); ++extern int iskey P((void)); ++ ++extern void grub_printf(const char *, ...); ++extern char config_file[128]; ++extern void etherboot_printf(const char *, ...); ++extern int etherboot_sprintf(char *, const char *, ...); ++extern int getdec(char **s); ++extern void cleanup_net(void); ++extern void print_network_configuration (void); ++extern int ifconfig (char *, char *, char *, char *); ++extern struct arptable_t arptable[MAX_ARP]; ++ ++#undef printf ++#undef sprintf ++#define printf etherboot_printf ++#define sprintf etherboot_sprintf ++ ++#ifdef DEBUG ++#define EnterFunction(func) printf("Enter: " func "\n"); ++#define LeaveFunction(func) printf("Leave: " func "\n"); ++#else ++#define EnterFunction(func) ++#define LeaveFunction(func) ++#endif ++ ++/* ++ * Some codes from etherboot use a level in DEBUG. Define it to be ++ * zero means no debug info output, that will make them silence in ++ * compiling. Up it as you want. ++ */ ++#ifndef DEBUG ++# define DEBUG 0 ++#endif ++ ++/*#define RPC_DEBUG*/ ++ ++extern char *hostname; ++ ++extern int hostnamelen; ++/* Whether network is ready */ ++extern int network_ready; ++ ++/* User aborted in await_reply if not zero */ ++extern int user_abort; ++ ++extern int rarp(void); ++extern int grub_eth_probe(void); ++extern int bootp(void); ++ ++extern int dhcp(void); ++ ++extern struct nic nic; ++#endif /* GRUB_H */ +diff -Naur grub-0.97.orig/netboot/i386_byteswap.h grub-0.97/netboot/i386_byteswap.h +--- grub-0.97.orig/netboot/i386_byteswap.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/i386_byteswap.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,46 @@ ++#ifndef ETHERBOOT_BITS_BYTESWAP_H ++#define ETHERBOOT_BITS_BYTESWAP_H ++ ++#include "types.h" ++static inline uint16_t __i386_bswap_16(uint16_t x) ++{ ++ __asm__("xchgb %b0,%h0\n\t" ++ : "=q" (x) ++ : "0" (x)); ++ return x; ++} ++ ++static inline uint32_t __i386_bswap_32(uint32_t x) ++{ ++ __asm__("xchgb %b0,%h0\n\t" ++ "rorl $16,%0\n\t" ++ "xchgb %b0,%h0" ++ : "=q" (x) ++ : "0" (x)); ++ return x; ++} ++ ++ ++#define __bswap_constant_16(x) \ ++ ((uint16_t)((((uint16_t)(x) & 0x00ff) << 8) | \ ++ (((uint16_t)(x) & 0xff00) >> 8))) ++ ++#define __bswap_constant_32(x) \ ++ ((uint32_t)((((uint32_t)(x) & 0x000000ffU) << 24) | \ ++ (((uint32_t)(x) & 0x0000ff00U) << 8) | \ ++ (((uint32_t)(x) & 0x00ff0000U) >> 8) | \ ++ (((uint32_t)(x) & 0xff000000U) >> 24))) ++ ++#define __bswap_16(x) \ ++ (__builtin_constant_p(x) ? \ ++ __bswap_constant_16(x) : \ ++ __i386_bswap_16(x)) ++ ++ ++#define __bswap_32(x) \ ++ (__builtin_constant_p(x) ? \ ++ __bswap_constant_32(x) : \ ++ __i386_bswap_32(x)) ++ ++ ++#endif /* ETHERBOOT_BITS_BYTESWAP_H */ +diff -Naur grub-0.97.orig/netboot/i386_elf.h grub-0.97/netboot/i386_elf.h +--- grub-0.97.orig/netboot/i386_elf.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/i386_elf.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,91 @@ ++#ifndef I386_BITS_ELF_H ++#define I386_BITS_ELF_H ++ ++#include "cpu.h" ++ ++#ifdef CONFIG_X86_64 ++/* ELF Defines for the 64bit version of the current architecture */ ++#define EM_CURRENT_64 EM_X86_64 ++#define EM_CURRENT_64_PRESENT ( \ ++ CPU_FEATURE_P(cpu_info.x86_capability, LM) && \ ++ CPU_FEATURE_P(cpu_info.x86_capability, PAE) && \ ++ CPU_FEATURE_P(cpu_info.x86_capability, PSE)) ++ ++#define ELF_CHECK_X86_64_ARCH(x) \ ++ (EM_CURRENT_64_PRESENT && ((x).e_machine == EM_X86_64)) ++#define __unused_i386 ++#else ++#define ELF_CHECK_X86_64_ARCH(x) 0 ++#define __unused_i386 __unused ++#endif ++ ++ ++/* ELF Defines for the current architecture */ ++#define EM_CURRENT EM_386 ++#define ELFDATA_CURRENT ELFDATA2LSB ++ ++#define ELF_CHECK_I386_ARCH(x) \ ++ (((x).e_machine == EM_386) || ((x).e_machine == EM_486)) ++ ++#define ELF_CHECK_ARCH(x) \ ++ ((ELF_CHECK_I386_ARCH(x) || ELF_CHECK_X86_64_ARCH(x)) && \ ++ ((x).e_entry <= 0xffffffffUL)) ++ ++#ifdef IMAGE_FREEBSD ++/* ++ * FreeBSD has this rather strange "feature" of its design. ++ * At some point in its evolution, FreeBSD started to rely ++ * externally on private/static/debug internal symbol information. ++ * That is, some of the interfaces that software uses to access ++ * and work with the FreeBSD kernel are made available not ++ * via the shared library symbol information (the .DYNAMIC section) ++ * but rather the debug symbols. This means that any symbol, not ++ * just publicly defined symbols can be (and are) used by system ++ * tools to make the system work. (such as top, swapinfo, swapon, ++ * etc) ++ * ++ * Even worse, however, is the fact that standard ELF loaders do ++ * not know how to load the symbols since they are not within ++ * an ELF PT_LOAD section. The kernel needs these symbols to ++ * operate so the following changes/additions to the boot ++ * loading of EtherBoot have been made to get the kernel to load. ++ * All of the changes are within IMAGE_FREEBSD such that the ++ * extra/changed code only compiles when FREEBSD support is ++ * enabled. ++ */ ++ ++/* ++ * Section header for FreeBSD (debug symbol kludge!) support ++ */ ++typedef struct { ++ Elf32_Word sh_name; /* Section name (index into the ++ section header string table). */ ++ Elf32_Word sh_type; /* Section type. */ ++ Elf32_Word sh_flags; /* Section flags. */ ++ Elf32_Addr sh_addr; /* Address in memory image. */ ++ Elf32_Off sh_offset; /* Offset in file. */ ++ Elf32_Size sh_size; /* Size in bytes. */ ++ Elf32_Word sh_link; /* Index of a related section. */ ++ Elf32_Word sh_info; /* Depends on section type. */ ++ Elf32_Size sh_addralign; /* Alignment in bytes. */ ++ Elf32_Size sh_entsize; /* Size of each entry in section. */ ++} Elf32_Shdr; ++ ++/* sh_type */ ++#define SHT_SYMTAB 2 /* symbol table section */ ++#define SHT_STRTAB 3 /* string table section */ ++ ++/* ++ * Module information subtypes (for the metadata that we need to build) ++ */ ++#define MODINFO_END 0x0000 /* End of list */ ++#define MODINFO_NAME 0x0001 /* Name of module (string) */ ++#define MODINFO_TYPE 0x0002 /* Type of module (string) */ ++#define MODINFO_METADATA 0x8000 /* Module-specfic */ ++ ++#define MODINFOMD_SSYM 0x0003 /* start of symbols */ ++#define MODINFOMD_ESYM 0x0004 /* end of symbols */ ++ ++#endif /* IMAGE_FREEBSD */ ++ ++#endif /* I386_BITS_ELF_H */ +diff -Naur grub-0.97.orig/netboot/i386_endian.h grub-0.97/netboot/i386_endian.h +--- grub-0.97.orig/netboot/i386_endian.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/i386_endian.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,6 @@ ++#ifndef ETHERBOOT_BITS_ENDIAN_H ++#define ETHERBOOT_BITS_ENDIAN_H ++ ++#define __BYTE_ORDER __LITTLE_ENDIAN ++ ++#endif /* ETHERBOOT_BITS_ENDIAN_H */ +diff -Naur grub-0.97.orig/netboot/i386_timer.c grub-0.97/netboot/i386_timer.c +--- grub-0.97.orig/netboot/i386_timer.c 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/i386_timer.c 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,192 @@ ++/* A couple of routines to implement a low-overhead timer for drivers */ ++ ++ /* ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2, or (at ++ * your option) any later version. ++ */ ++#include "grub.h" ++#include "osdep.h" ++#include "io.h" ++#include "timer.h" ++#include "latch.h" ++ ++void __load_timer2(unsigned int ticks) ++{ ++ /* ++ * Now let's take care of PPC channel 2 ++ * ++ * Set the Gate high, program PPC channel 2 for mode 0, ++ * (interrupt on terminal count mode), binary count, ++ * load 5 * LATCH count, (LSB and MSB) to begin countdown. ++ * ++ * Note some implementations have a bug where the high bits byte ++ * of channel 2 is ignored. ++ */ ++ /* Set up the timer gate, turn off the speaker */ ++ /* Set the Gate high, disable speaker */ ++ outb((inb(PPC_PORTB) & ~PPCB_SPKR) | PPCB_T2GATE, PPC_PORTB); ++ /* binary, mode 0, LSB/MSB, Ch 2 */ ++ outb(TIMER2_SEL|WORD_ACCESS|MODE0|BINARY_COUNT, TIMER_MODE_PORT); ++ /* LSB of ticks */ ++ outb(ticks & 0xFF, TIMER2_PORT); ++ /* MSB of ticks */ ++ outb(ticks >> 8, TIMER2_PORT); ++} ++ ++static int __timer2_running(void) ++{ ++ return ((inb(PPC_PORTB) & PPCB_T2OUT) == 0); ++} ++ ++#if !defined(CONFIG_TSC_CURRTICKS) ++void setup_timers(void) ++{ ++ return; ++} ++ ++void load_timer2(unsigned int ticks) ++{ ++ return __load_timer2(ticks); ++} ++ ++int timer2_running(void) ++{ ++ return __timer2_running(); ++} ++ ++void ndelay(unsigned int nsecs) ++{ ++ waiton_timer2((nsecs * CLOCK_TICK_RATE)/1000000000); ++} ++void udelay(unsigned int usecs) ++{ ++ waiton_timer2((usecs * TICKS_PER_MS)/1000); ++} ++#endif /* !defined(CONFIG_TSC_CURRTICKS) */ ++ ++#if defined(CONFIG_TSC_CURRTICKS) ++ ++#define rdtsc(low,high) \ ++ __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high)) ++ ++#define rdtscll(val) \ ++ __asm__ __volatile__ ("rdtsc" : "=A" (val)) ++ ++ ++/* Number of clock ticks to time with the rtc */ ++#define LATCH 0xFF ++ ++#define LATCHES_PER_SEC ((CLOCK_TICK_RATE + (LATCH/2))/LATCH) ++#define TICKS_PER_LATCH ((LATCHES_PER_SEC + (TICKS_PER_SEC/2))/TICKS_PER_SEC) ++ ++static void sleep_latch(void) ++{ ++ __load_timer2(LATCH); ++ while(__timer2_running()); ++} ++ ++/* ------ Calibrate the TSC ------- ++ * Time how long it takes to excute a loop that runs in known time. ++ * And find the convertion needed to get to CLOCK_TICK_RATE ++ */ ++ ++ ++static unsigned long long calibrate_tsc(void) ++{ ++ unsigned long startlow, starthigh; ++ unsigned long endlow, endhigh; ++ ++ rdtsc(startlow,starthigh); ++ sleep_latch(); ++ rdtsc(endlow,endhigh); ++ ++ /* 64-bit subtract - gcc just messes up with long longs */ ++ __asm__("subl %2,%0\n\t" ++ "sbbl %3,%1" ++ :"=a" (endlow), "=d" (endhigh) ++ :"g" (startlow), "g" (starthigh), ++ "0" (endlow), "1" (endhigh)); ++ ++ /* Error: ECPUTOOFAST */ ++ if (endhigh) ++ goto bad_ctc; ++ ++ endlow *= TICKS_PER_LATCH; ++ return endlow; ++ ++ /* ++ * The CTC wasn't reliable: we got a hit on the very first read, ++ * or the CPU was so fast/slow that the quotient wouldn't fit in ++ * 32 bits.. ++ */ ++bad_ctc: ++ printf("bad_ctc\n"); ++ return 0; ++} ++ ++static unsigned long clocks_per_tick; ++void setup_timers(void) ++{ ++ if (!clocks_per_tick) { ++ clocks_per_tick = calibrate_tsc(); ++ /* Display the CPU Mhz to easily test if the calibration was bad */ ++ printf("CPU %ld Mhz\n", (clocks_per_tick/1000 * TICKS_PER_SEC)/1000); ++ } ++} ++ ++unsigned long currticks(void) ++{ ++ unsigned long clocks_high, clocks_low; ++ unsigned long currticks; ++ /* Read the Time Stamp Counter */ ++ rdtsc(clocks_low, clocks_high); ++ ++ /* currticks = clocks / clocks_per_tick; */ ++ __asm__("divl %1" ++ :"=a" (currticks) ++ :"r" (clocks_per_tick), "0" (clocks_low), "d" (clocks_high)); ++ ++ ++ return currticks; ++} ++ ++static unsigned long long timer_timeout; ++static int __timer_running(void) ++{ ++ unsigned long long now; ++ rdtscll(now); ++ return now < timer_timeout; ++} ++ ++void udelay(unsigned int usecs) ++{ ++ unsigned long long now; ++ rdtscll(now); ++ timer_timeout = now + usecs * ((clocks_per_tick * TICKS_PER_SEC)/(1000*1000)); ++ while(__timer_running()); ++} ++void ndelay(unsigned int nsecs) ++{ ++ unsigned long long now; ++ rdtscll(now); ++ timer_timeout = now + nsecs * ((clocks_per_tick * TICKS_PER_SEC)/(1000*1000*1000)); ++ while(__timer_running()); ++} ++ ++void load_timer2(unsigned int timer2_ticks) ++{ ++ unsigned long long now; ++ unsigned long clocks; ++ rdtscll(now); ++ clocks = timer2_ticks * ((clocks_per_tick * TICKS_PER_SEC)/CLOCK_TICK_RATE); ++ timer_timeout = now + clocks; ++} ++ ++int timer2_running(void) ++{ ++ return __timer_running(); ++} ++ ++#endif /* RTC_CURRTICKS */ +diff -Naur grub-0.97.orig/netboot/i82586.c grub-0.97/netboot/i82586.c +--- grub-0.97.orig/netboot/i82586.c 2003-07-09 11:45:37.000000000 +0000 ++++ grub-0.97/netboot/i82586.c 1970-01-01 00:00:00.000000000 +0000 +@@ -1,825 +0,0 @@ +-/************************************************************************** +-Etherboot - BOOTP/TFTP Bootstrap Program +-i82586 NIC driver for Etherboot +-Ken Yap, January 1998 +-***************************************************************************/ +- +-/* +- * This program is free software; you can redistribute it and/or +- * modify it under the terms of the GNU General Public License as +- * published by the Free Software Foundation; either version 2, or (at +- * your option) any later version. +- */ +- +-#include "etherboot.h" +-#include "nic.h" +-#include "cards.h" +-#include "timer.h" +- +-#define udelay(n) waiton_timer2(((n)*TICKS_PER_MS)/1000) +- +-/* Sources of information: +- +- Donald Becker's excellent 3c507 driver in Linux +- Intel 82596 data sheet (yes, 82596; it has a 586 compatibility mode) +-*/ +- +-/* Code below mostly stolen wholesale from 3c507.c driver in Linux */ +- +-/* +- Details of the i82586. +- +- You'll really need the databook to understand the details of this part, +- but the outline is that the i82586 has two separate processing units. +- Both are started from a list of three configuration tables, of which only +- the last, the System Control Block (SCB), is used after reset-time. The SCB +- has the following fields: +- Status word +- Command word +- Tx/Command block addr. +- Rx block addr. +- The command word accepts the following controls for the Tx and Rx units: +- */ +- +-#define CUC_START 0x0100 +-#define CUC_RESUME 0x0200 +-#define CUC_SUSPEND 0x0300 +-#define RX_START 0x0010 +-#define RX_RESUME 0x0020 +-#define RX_SUSPEND 0x0030 +- +-/* The Rx unit uses a list of frame descriptors and a list of data buffer +- descriptors. We use full-sized (1518 byte) data buffers, so there is +- a one-to-one pairing of frame descriptors to buffer descriptors. +- +- The Tx ("command") unit executes a list of commands that look like: +- Status word Written by the 82586 when the command is done. +- Command word Command in lower 3 bits, post-command action in upper 3 +- Link word The address of the next command. +- Parameters (as needed). +- +- Some definitions related to the Command Word are: +- */ +-#define CMD_EOL 0x8000 /* The last command of the list, stop. */ +-#define CMD_SUSP 0x4000 /* Suspend after doing cmd. */ +-#define CMD_INTR 0x2000 /* Interrupt after doing cmd. */ +- +-enum commands { +- CmdNOp = 0, CmdSASetup = 1, CmdConfigure = 2, CmdMulticastList = 3, +- CmdTx = 4, CmdTDR = 5, CmdDump = 6, CmdDiagnose = 7}; +- +-/* +- Details of the EtherLink16 Implementation +- +- The 3c507 and NI5210 are generic shared-memory i82586 implementations. +- 3c507: The host can map 16K, 32K, 48K, or 64K of the 64K memory into +- 0x0[CD][08]0000, or all 64K into 0xF[02468]0000. +- NI5210: The host can map 8k or 16k at 0x[CDE][048C]000 but we +- assume 8k because to have 16k you cannot put a ROM on the NIC. +- */ +- +-/* Offsets from the base I/O address. */ +- +-#ifdef INCLUDE_3C507 +- +-#define SA_DATA 0 /* Station address data, or 3Com signature. */ +-#define MISC_CTRL 6 /* Switch the SA_DATA banks, and bus config bits. */ +-#define RESET_IRQ 10 /* Reset the latched IRQ line. */ +-#define I82586_ATTN 11 /* Frob the 82586 Channel Attention line. */ +-#define ROM_CONFIG 13 +-#define MEM_CONFIG 14 +-#define IRQ_CONFIG 15 +-#define EL16_IO_EXTENT 16 +- +-/* The ID port is used at boot-time to locate the ethercard. */ +-#define ID_PORT 0x100 +- +-#endif +- +-#ifdef INCLUDE_NI5210 +- +-#define NI52_RESET 0 /* writing to this address, resets the i82586 */ +-#define I82586_ATTN 1 /* channel attention, kick the 586 */ +- +-#endif +- +-#ifdef INCLUDE_EXOS205 +- +-#define EXOS205_RESET 0 /* writing to this address, resets the i82586 */ +-#define I82586_ATTN 1 /* channel attention, kick the 586 */ +- +-#endif +- +-/* Offsets to registers in the mailbox (SCB). */ +-#define iSCB_STATUS 0x8 +-#define iSCB_CMD 0xA +-#define iSCB_CBL 0xC /* Command BLock offset. */ +-#define iSCB_RFA 0xE /* Rx Frame Area offset. */ +- +-/* Since the 3c507 maps the shared memory window so that the last byte is +-at 82586 address FFFF, the first byte is at 82586 address 0, 16K, 32K, or +-48K corresponding to window sizes of 64K, 48K, 32K and 16K respectively. +-We can account for this be setting the 'SBC Base' entry in the ISCP table +-below for all the 16 bit offset addresses, and also adding the 'SCB Base' +-value to all 24 bit physical addresses (in the SCP table and the TX and RX +-Buffer Descriptors). +- -Mark +-*/ +- +-/* +- What follows in 'init_words[]' is the "program" that is downloaded to the +- 82586 memory. It's mostly tables and command blocks, and starts at the +- reset address 0xfffff6. This is designed to be similar to the EtherExpress, +- thus the unusual location of the SCB at 0x0008. +- +- Even with the additional "don't care" values, doing it this way takes less +- program space than initializing the individual tables, and I feel it's much +- cleaner. +- +- The databook is particularly useless for the first two structures, I had +- to use the Crynwr driver as an example. +- +- The memory setup is as follows: +-*/ +- +-#define CONFIG_CMD 0x18 +-#define SET_SA_CMD 0x24 +-#define SA_OFFSET 0x2A +-#define IDLELOOP 0x30 +-#define TDR_CMD 0x38 +-#define TDR_TIME 0x3C +-#define DUMP_CMD 0x40 +-#define DIAG_CMD 0x48 +-#define SET_MC_CMD 0x4E +-#define DUMP_DATA 0x56 /* A 170 byte buffer for dump and Set-MC into. */ +- +-#define TX_BUF_START 0x0100 +-#define TX_BUF_SIZE (1518+14+20+16) /* packet+header+TBD */ +- +-#define RX_BUF_START 0x1000 +-#define RX_BUF_SIZE (1518+14+18) /* packet+header+RBD */ +-#define RX_BUF_END (mem_end - mem_start - 20) +- +-/* +- That's it: only 86 bytes to set up the beast, including every extra +- command available. The 170 byte buffer at DUMP_DATA is shared between the +- Dump command (called only by the diagnostic program) and the SetMulticastList +- command. +- +- To complete the memory setup you only have to write the station address at +- SA_OFFSET and create the Tx & Rx buffer lists. +- +- The Tx command chain and buffer list is setup as follows: +- A Tx command table, with the data buffer pointing to... +- A Tx data buffer descriptor. The packet is in a single buffer, rather than +- chaining together several smaller buffers. +- A NoOp command, which initially points to itself, +- And the packet data. +- +- A transmit is done by filling in the Tx command table and data buffer, +- re-writing the NoOp command, and finally changing the offset of the last +- command to point to the current Tx command. When the Tx command is finished, +- it jumps to the NoOp, when it loops until the next Tx command changes the +- "link offset" in the NoOp. This way the 82586 never has to go through the +- slow restart sequence. +- +- The Rx buffer list is set up in the obvious ring structure. We have enough +- memory (and low enough interrupt latency) that we can avoid the complicated +- Rx buffer linked lists by alway associating a full-size Rx data buffer with +- each Rx data frame. +- +- I currently use one transmit buffer starting at TX_BUF_START (0x0100), and +- use the rest of memory, from RX_BUF_START to RX_BUF_END, for Rx buffers. +- +- */ +- +-static unsigned short init_words[] = { +- /* System Configuration Pointer (SCP). */ +-#if defined(INCLUDE_3C507) +- 0x0000, /* Set bus size to 16 bits. */ +-#else +- 0x0001, /* Set bus size to 8 bits */ +-#endif +- 0,0, /* pad words. */ +- 0x0000,0x0000, /* ISCP phys addr, set in init_82586_mem(). */ +- +- /* Intermediate System Configuration Pointer (ISCP). */ +- 0x0001, /* Status word that's cleared when init is done. */ +- 0x0008,0,0, /* SCB offset, (skip, skip) */ +- +- /* System Control Block (SCB). */ +- 0,0xf000|RX_START|CUC_START, /* SCB status and cmd. */ +- CONFIG_CMD, /* Command list pointer, points to Configure. */ +- RX_BUF_START, /* Rx block list. */ +- 0,0,0,0, /* Error count: CRC, align, buffer, overrun. */ +- +- /* 0x0018: Configure command. Change to put MAC data with packet. */ +- 0, CmdConfigure, /* Status, command. */ +- SET_SA_CMD, /* Next command is Set Station Addr. */ +- 0x0804, /* "4" bytes of config data, 8 byte FIFO. */ +- 0x2e40, /* Magic values, including MAC data location. */ +- 0, /* Unused pad word. */ +- +- /* 0x0024: Setup station address command. */ +- 0, CmdSASetup, +- SET_MC_CMD, /* Next command. */ +- 0xaa00,0xb000,0x0bad, /* Station address (to be filled in) */ +- +- /* 0x0030: NOP, looping back to itself. Point to first Tx buffer to Tx. */ +- 0, CmdNOp, IDLELOOP, 0 /* pad */, +- +- /* 0x0038: A unused Time-Domain Reflectometer command. */ +- 0, CmdTDR, IDLELOOP, 0, +- +- /* 0x0040: An unused Dump State command. */ +- 0, CmdDump, IDLELOOP, DUMP_DATA, +- +- /* 0x0048: An unused Diagnose command. */ +- 0, CmdDiagnose, IDLELOOP, +- +- /* 0x004E: An empty set-multicast-list command. */ +- 0, CmdMulticastList, IDLELOOP, 0, +-}; +- +-/* NIC specific static variables go here */ +- +-static unsigned short ioaddr, irq, scb_base; +-static Address mem_start, mem_end; +-static unsigned short rx_head, rx_tail; +- +-#define read_mem(m,s) fmemcpy((char *)s, m, sizeof(s)) +- +-static void setup_rx_buffers(struct nic *nic) +-{ +- Address write_ptr; +- unsigned short cur_rx_buf; +- static unsigned short rx_cmd[16] = { +- 0x0000, /* Rx status */ +- 0x0000, /* Rx command, only and last */ +- RX_BUF_START, /* Link (will be adjusted) */ +- RX_BUF_START + 22, /* Buffer offset (will be adjusted) */ +- 0x0000, 0x0000, 0x0000, /* Pad for dest addr */ +- 0x0000, 0x0000, 0x0000, /* Pad for source addr */ +- 0x0000, /* Pad for protocol */ +- 0x0000, /* Buffer: Actual count */ +- -1, /* Buffer: Next (none) */ +- RX_BUF_START + 0x20, /* Buffer: Address low (+ scb_base) (will be adjusted) */ +- 0x0000, /* Buffer: Address high */ +- 0x8000 | (RX_BUF_SIZE - 0x20) +- }; +- +- cur_rx_buf = rx_head = RX_BUF_START; +- do { /* While there is room for one more buffer */ +- write_ptr = mem_start + cur_rx_buf; +- /* adjust some contents */ +- rx_cmd[1] = 0x0000; +- rx_cmd[2] = cur_rx_buf + RX_BUF_SIZE; +- rx_cmd[3] = cur_rx_buf + 22; +- rx_cmd[13] = cur_rx_buf + 0x20 + scb_base; +- memcpy((char *)write_ptr, (char *)rx_cmd, sizeof(rx_cmd)); +- rx_tail = cur_rx_buf; +- cur_rx_buf += RX_BUF_SIZE; +- } while (cur_rx_buf <= RX_BUF_END - RX_BUF_SIZE); +- /* Terminate the list by setting the EOL bit and wrap ther pointer +- to make the list a ring. */ +- write_ptr = mem_start + rx_tail; +- rx_cmd[1] = 0xC000; +- rx_cmd[2] = rx_head; +- memcpy((char *)write_ptr, (char *)rx_cmd, sizeof(unsigned short) * 3); +-} +- +-static void ack_status(void) +-{ +- unsigned short cmd, status; +- unsigned short *shmem = (short *)mem_start; +- +- cmd = (status = shmem[iSCB_STATUS>>1]) & 0xf000; +- if (status & 0x100) /* CU suspended? */ +- cmd |= CUC_RESUME; +- if ((status & 0x200) == 0) /* CU not active? */ +- cmd |= CUC_START; +- if (status & 0x010) /* RU suspended? */ +- cmd |= RX_RESUME; +- else if ((status & 0x040) == 0) /* RU not active? */ +- cmd |= RX_START; +- if (cmd == 0) /* Nothing to do */ +- return; +- shmem[iSCB_CMD>>1] = cmd; +-#if defined(DEBUG) +- printf("Status %hX Command %hX\n", status, cmd); +-#endif +- outb(0, ioaddr + I82586_ATTN); +-} +- +-/************************************************************************** +-RESET - Reset adapter +-***************************************************************************/ +- +-static void i82586_reset(struct nic *nic) +-{ +- unsigned long time; +- unsigned short *shmem = (short *)mem_start; +- +- /* put the card in its initial state */ +- +-#ifdef INCLUDE_3C507 +- /* Enable loopback to protect the wire while starting up, +- and hold the 586 in reset during the memory initialisation. */ +- outb(0x20, ioaddr + MISC_CTRL); +-#endif +- +- /* Fix the ISCP address and base. */ +- init_words[3] = scb_base; +- init_words[7] = scb_base; +- +- /* Write the words at 0xfff6. */ +- /* Write the words at 0x0000. */ +- /* Fill in the station address. */ +- memcpy((char *)(mem_end - 10), (char *)init_words, 10); +- memcpy((char *)mem_start, (char *)&init_words[5], sizeof(init_words) - 10); +- memcpy((char *)mem_start + SA_OFFSET, nic->node_addr, ETH_ALEN); +- setup_rx_buffers(nic); +- +-#ifdef INCLUDE_3C507 +- /* Start the 586 by releasing the reset line, but leave loopback. */ +- outb(0xA0, ioaddr + MISC_CTRL); +-#endif +- +- /* This was time consuming to track down; you need to give two channel +- attention signals to reliably start up the i82586. */ +- outb(0, ioaddr + I82586_ATTN); +- time = currticks() + TICKS_PER_SEC; /* allow 1 second to init */ +- while ( +- shmem[iSCB_STATUS>>1] == 0) +- { +- if (currticks() > time) +- { +- printf("i82586 initialisation timed out with status %hX, cmd %hX\n", +- shmem[iSCB_STATUS>>1], shmem[iSCB_CMD>>1]); +- break; +- } +- } +- /* Issue channel-attn -- the 82586 won't start. */ +- outb(0, ioaddr + I82586_ATTN); +- +-#ifdef INCLUDE_3C507 +- /* Disable loopback. */ +- outb(0x80, ioaddr + MISC_CTRL); +-#endif +-#if defined(DEBUG) +- printf("i82586 status %hX, cmd %hX\n", +- shmem[iSCB_STATUS>>1], shmem[iSCB_CMD>>1]); +-#endif +-} +- +-/************************************************************************** +- POLL - Wait for a frame +- ***************************************************************************/ +-static int i82586_poll(struct nic *nic) +-{ +- int status; +- unsigned short rfd_cmd, next_rx_frame, data_buffer_addr, +- frame_status, pkt_len; +- unsigned short *shmem = (short *)mem_start + rx_head; +- +- /* return true if there's an ethernet packet ready to read */ +- if ( +- ((frame_status = shmem[0]) & 0x8000) == 0) +- return (0); /* nope */ +- rfd_cmd = shmem[1]; +- next_rx_frame = shmem[2]; +- data_buffer_addr = shmem[3]; +- pkt_len = shmem[11]; +- status = 0; +- if (rfd_cmd != 0 || data_buffer_addr != rx_head + 22 +- || (pkt_len & 0xC000) != 0xC000) +- printf("\nRx frame corrupt, discarded"); +- else if ((frame_status & 0x2000) == 0) +- printf("\nRx frame had error"); +- else +- { +- /* We have a frame, copy it to our buffer */ +- pkt_len &= 0x3FFF; +- memcpy(nic->packet, (char *)mem_start + rx_head + 0x20, pkt_len); +- /* Only packets not from ourself */ +- if (memcmp(nic->packet + ETH_ALEN, nic->node_addr, ETH_ALEN) != 0) +- { +- nic->packetlen = pkt_len; +- status = 1; +- } +- } +- /* Clear the status word and set EOL on Rx frame */ +- shmem[0] = 0; +- shmem[1] = 0xC000; +- *(short *)(mem_start + rx_tail + 2) = 0; +- rx_tail = rx_head; +- rx_head = next_rx_frame; +- ack_status(); +- return (status); +-} +- +-/************************************************************************** +- TRANSMIT - Transmit a frame +- ***************************************************************************/ +-static void i82586_transmit( +- struct nic *nic, +- const char *d, /* Destination */ +- unsigned int t, /* Type */ +- unsigned int s, /* size */ +- const char *p) /* Packet */ +-{ +- Address bptr; +- unsigned short type, z; +- static unsigned short tx_cmd[11] = { +- 0x0, /* Tx status */ +- CmdTx, /* Tx command */ +- TX_BUF_START+16, /* Next command is a NoOp */ +- TX_BUF_START+8, /* Data Buffer offset */ +- 0x8000, /* | with size */ +- 0xffff, /* No next data buffer */ +- TX_BUF_START+22, /* + scb_base */ +- 0x0, /* Buffer address high bits (always zero) */ +- 0x0, /* Nop status */ +- CmdNOp, /* Nop command */ +- TX_BUF_START+16 /* Next is myself */ +- }; +- unsigned short *shmem = (short *)mem_start + TX_BUF_START; +- +- /* send the packet to destination */ +- /* adjust some contents */ +- type = htons(t); +- if (s < ETH_ZLEN) +- s = ETH_ZLEN; +- tx_cmd[4] = (s + ETH_HLEN) | 0x8000; +- tx_cmd[6] = TX_BUF_START + 22 + scb_base; +- bptr = mem_start + TX_BUF_START; +- memcpy((char *)bptr, (char *)tx_cmd, sizeof(tx_cmd)); +- bptr += sizeof(tx_cmd); +- memcpy((char *)bptr, d, ETH_ALEN); +- bptr += ETH_ALEN; +- memcpy((char *)bptr, nic->node_addr, ETH_ALEN); +- bptr += ETH_ALEN; +- memcpy((char *)bptr, (char *)&type, sizeof(type)); +- bptr += sizeof(type); +- memcpy((char *)bptr, p, s); +- /* Change the offset in the IDLELOOP */ +- *(unsigned short *)(mem_start + IDLELOOP + 4) = TX_BUF_START; +- /* Wait for transmit completion */ +- while ( +- (shmem[0] & 0x2000) == 0) +- ; +- /* Change the offset in the IDLELOOP back and +- change the final loop to point here */ +- *(unsigned short *)(mem_start + IDLELOOP + 4) = IDLELOOP; +- *(unsigned short *)(mem_start + TX_BUF_START + 20) = IDLELOOP; +- ack_status(); +-} +- +-/************************************************************************** +- DISABLE - Turn off ethernet interface +- ***************************************************************************/ +-static void i82586_disable(struct nic *nic) +-{ +- unsigned short *shmem = (short *)mem_start; +- +-#if 0 +- /* Flush the Tx and disable Rx. */ +- shmem[iSCB_CMD>>1] = RX_SUSPEND | CUC_SUSPEND; +- outb(0, ioaddr + I82586_ATTN); +-#ifdef INCLUDE_NI5210 +- outb(0, ioaddr + NI52_RESET); +-#endif +-#endif /* 0 */ +-} +- +-#ifdef INCLUDE_3C507 +- +-static int t507_probe1(struct nic *nic, unsigned short ioaddr) +-{ +- int i; +- Address size; +- char mem_config; +- char if_port; +- +- if (inb(ioaddr) != '*' || inb(ioaddr+1) != '3' +- || inb(ioaddr+2) != 'C' || inb(ioaddr+3) != 'O') +- return (0); +- irq = inb(ioaddr + IRQ_CONFIG) & 0x0f; +- mem_config = inb(ioaddr + MEM_CONFIG); +- if (mem_config & 0x20) +- { +- size = 65536L; +- mem_start = 0xf00000L + (mem_config & 0x08 ? 0x080000L +- : (((Address)mem_config & 0x3) << 17)); +- } +- else +- { +- size = ((((Address)mem_config & 0x3) + 1) << 14); +- mem_start = 0x0c0000L + (((Address)mem_config & 0x18) << 12); +- } +- mem_end = mem_start + size; +- scb_base = 65536L - size; +- if_port = inb(ioaddr + ROM_CONFIG) & 0x80; +- /* Get station address */ +- outb(0x01, ioaddr + MISC_CTRL); +- for (i = 0; i < ETH_ALEN; ++i) +- { +- nic->node_addr[i] = inb(ioaddr+i); +- } +- printf("\n3c507 ioaddr %#hX, IRQ %d, mem [%#X-%#X], %sternal xcvr, addr %!\n", +- ioaddr, irq, mem_start, mem_end, if_port ? "in" : "ex", nic->node_addr); +- return (1); +-} +- +-/************************************************************************** +-PROBE - Look for an adapter, this routine's visible to the outside +-***************************************************************************/ +- +-struct nic *t507_probe(struct nic *nic, unsigned short *probe_addrs) +-{ +- static unsigned char init_ID_done = 0; +- unsigned short lrs_state = 0xff; +- static unsigned short io_addrs[] = { 0x300, 0x320, 0x340, 0x280, 0 }; +- unsigned short *p; +- int i; +- +- if (init_ID_done == 0) +- { +- /* Send the ID sequence to the ID_PORT to enable the board */ +- outb(0x00, ID_PORT); +- for (i = 0; i < 255; ++i) +- { +- outb(lrs_state, ID_PORT); +- lrs_state <<= 1; +- if (lrs_state & 0x100) +- lrs_state ^= 0xe7; +- } +- outb(0x00, ID_PORT); +- init_ID_done = 1; +- } +- /* if probe_addrs is 0, then routine can use a hardwired default */ +- if (probe_addrs == 0) +- probe_addrs = io_addrs; +- for (p = probe_addrs; (ioaddr = *p) != 0; ++p) +- if (t507_probe1(nic, ioaddr)) +- break; +- if (ioaddr != 0) +- { +- /* point to NIC specific routines */ +- i82586_reset(nic); +- nic->reset = i82586_reset; +- nic->poll = i82586_poll; +- nic->transmit = i82586_transmit; +- nic->disable = i82586_disable; +- return nic; +- } +- /* else */ +- { +- return 0; +- } +-} +- +-#endif +- +-#ifdef INCLUDE_NI5210 +- +-static int ni5210_probe2(void) +-{ +- unsigned short i; +- unsigned short shmem[10]; +- +- /* Fix the ISCP address and base. */ +- init_words[3] = scb_base; +- init_words[7] = scb_base; +- +- /* Write the words at 0xfff6. */ +- /* Write the words at 0x0000. */ +- memcpy((char *)(mem_end - 10), (char *)init_words, 10); +- memcpy((char *)mem_start, (char *)&init_words[5], sizeof(init_words) - 10); +- if (*(unsigned short *)mem_start != 1) +- return (0); +- outb(0, ioaddr + NI52_RESET); +- outb(0, ioaddr + I82586_ATTN); +- udelay(32); +- i = 50; +- while ( +- shmem[iSCB_STATUS>>1] == 0) +- { +- if (--i == 0) +- { +- printf("i82586 initialisation timed out with status %hX, cmd %hX\n", +- shmem[iSCB_STATUS>>1], shmem[iSCB_CMD>>1]); +- break; +- } +- } +- /* Issue channel-attn -- the 82586 won't start. */ +- outb(0, ioaddr + I82586_ATTN); +- if (*(unsigned short *)mem_start != 0) +- return (0); +- return (1); +-} +- +-static int ni5210_probe1(struct nic *nic) +-{ +- int i; +- static Address mem_addrs[] = { +- 0xc0000, 0xc4000, 0xc8000, 0xcc000, +- 0xd0000, 0xd4000, 0xd8000, 0xdc000, +- 0xe0000, 0xe4000, 0xe8000, 0xec000, +- 0 }; +- Address *p; +- +- if (inb(ioaddr + 6) != 0x0 || inb(ioaddr + 7) != 0x55) +- return (0); +- scb_base = -8192; /* assume 8k memory */ +- for (p = mem_addrs; (mem_start = *p) != 0; ++p) +- if (mem_end = mem_start + 8192, ni5210_probe2()) +- break; +- if (mem_start == 0) +- return (0); +- /* Get station address */ +- for (i = 0; i < ETH_ALEN; ++i) +- { +- nic->node_addr[i] = inb(ioaddr+i); +- } +- printf("\nNI5210 ioaddr %#hX, mem [%#X-%#X], addr %!\n", +- ioaddr, mem_start, mem_end, nic->node_addr); +- return (1); +-} +- +-struct nic *ni5210_probe(struct nic *nic, unsigned short *probe_addrs) +-{ +- /* missing entries are addresses usually already used */ +- static unsigned short io_addrs[] = { +- 0x200, 0x208, 0x210, 0x218, 0x220, 0x228, 0x230, 0x238, +- 0x240, 0x248, 0x250, 0x258, 0x260, 0x268, 0x270, /*Par*/ +- 0x280, 0x288, 0x290, 0x298, 0x2A0, 0x2A8, 0x2B0, 0x2B8, +- 0x2C0, 0x2C8, 0x2D0, 0x2D8, 0x2E0, 0x2E8, 0x2F0, /*Ser*/ +- 0x300, 0x308, 0x310, 0x318, 0x320, 0x328, 0x330, 0x338, +- 0x340, 0x348, 0x350, 0x358, 0x360, 0x368, 0x370, /*Par*/ +- 0x380, 0x388, 0x390, 0x398, 0x3A0, 0x3A8, /*Vid,Par*/ +- 0x3C0, 0x3C8, 0x3D0, 0x3D8, 0x3E0, 0x3E8, /*Ser*/ +- 0x0 +- }; +- unsigned short *p; +- int i; +- +- /* if probe_addrs is 0, then routine can use a hardwired default */ +- if (probe_addrs == 0) +- probe_addrs = io_addrs; +- for (p = probe_addrs; (ioaddr = *p) != 0; ++p) +- if (ni5210_probe1(nic)) +- break; +- if (ioaddr != 0) +- { +- /* point to NIC specific routines */ +- i82586_reset(nic); +- nic->reset = i82586_reset; +- nic->poll = i82586_poll; +- nic->transmit = i82586_transmit; +- nic->disable = i82586_disable; +- return nic; +- } +- /* else */ +- { +- return 0; +- } +-} +-#endif +- +-#ifdef INCLUDE_EXOS205 +- +-/* +- * Code to download to I186 in EXOS205 +- */ +- +-static unsigned char exos_i186_init[] = +-{ +-0x08,0x00,0x14,0x00,0x00,0x00,0xaa,0xfa,0x33,0xc0,0xba,0xfe,0xff,0xef,0xb8,0xf8, +-0xff,0xe7,0xa0,0xb8,0x7c,0x00,0xe7,0xa4,0xb8,0xbc,0x80,0xe7,0xa8,0x8c,0xc8,0x8e, +-0xd8,0xbb,0x2f,0x0e,0xc6,0x07,0xa5,0x33,0xc9,0xeb,0x00,0xeb,0x00,0xeb,0x00,0xe2, +-0xf8,0xbe,0x2c,0x0e,0xba,0x02,0x05,0x33,0xdb,0xb9,0x03,0x00,0xec,0x24,0x0f,0x8a, +-0xe0,0x02,0xd8,0x42,0x42,0xec,0x02,0xd8,0xd0,0xe0,0xd0,0xe0,0xd0,0xe0,0xd0,0xe0, +-0x0a,0xc4,0x88,0x04,0x42,0x42,0x46,0xe2,0xe3,0x8a,0xe3,0xd0,0xec,0xd0,0xec,0xd0, +-0xec,0xd0,0xec,0x80,0xe3,0x0f,0x02,0xe3,0x80,0xf4,0x05,0xec,0x3a,0xe0,0x74,0x05, +-0xc6,0x04,0x5a,0xeb,0xfe,0xc6,0x04,0x55,0x33,0xc0,0x8e,0xd8,0xbe,0x38,0x00,0xc7, +-0x04,0xce,0x0e,0x46,0x46,0xc7,0x04,0x00,0xff,0xfb,0xba,0x3c,0x00,0xb8,0x03,0x00, +-0xef,0x33,0xdb,0x33,0xc9,0xbd,0x04,0x0f,0x90,0x90,0x90,0x90,0xe2,0xfa,0x43,0x2e, +-0x89,0x5e,0x00,0xeb,0xf3,0x52,0xba,0x00,0x06,0xef,0x50,0x53,0x55,0xbd,0xf8,0x0e, +-0x2e,0x8b,0x5e,0x00,0x43,0x2e,0x89,0x5e,0x00,0xba,0x22,0x00,0xb8,0x00,0x80,0xef, +-0x5d,0x5b,0x58,0x5a,0xcf,0x49,0x4e,0x54,0x52,0x20,0x63,0x6e,0x74,0x2d,0x3e,0x00, +-0x00,0x4c,0x4f,0x4f,0x50,0x20,0x63,0x6e,0x74,0x2d,0x3e,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xea,0x30,0x0e,0x00,0xff,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,00 +-}; +- +-/* These offsets are from the end of the i186 download code */ +- +-#define OFFSET_SEMA 0x1D1 +-#define OFFSET_ADDR 0x1D7 +- +-static int exos205_probe2(void) +-{ +- unsigned short i; +- unsigned short shmem[10]; +- +- /* Fix the ISCP address and base. */ +- init_words[3] = scb_base; +- init_words[7] = scb_base; +- +- /* Write the words at 0xfff6. */ +- /* Write the words at 0x0000. */ +- memcpy((char *)(mem_end - 10), (char *)init_words, 10); +- memcpy((char *)mem_start, (char *)&init_words[5], sizeof(init_words) - 10); +- if (*(unsigned short *)mem_start != 1) +- return (0); +- outb(0, ioaddr + EXOS205_RESET); +- outb(0, ioaddr + I82586_ATTN); +- i = 50; +- while ( +- shmem[iSCB_STATUS>>1] == 0) +- { +- if (--i == 0) +- { +- printf("i82586 initialisation timed out with status %hX, cmd %hX\n", +- shmem[iSCB_STATUS>>1], shmem[iSCB_CMD>>1]); +- break; +- } +- } +- /* Issue channel-attn -- the 82586 won't start. */ +- outb(0, ioaddr + I82586_ATTN); +- if (*(unsigned short *)mem_start != 0) +- return (0); +- return (1); +-} +- +-static int exos205_probe1(struct nic *nic) +-{ +- int i; +- /* If you know the other addresses please let me know */ +- static Address mem_addrs[] = { +- 0xcc000, 0 }; +- Address *p; +- +- scb_base = -16384; /* assume 8k memory */ +- for (p = mem_addrs; (mem_start = *p) != 0; ++p) +- if (mem_end = mem_start + 16384, exos205_probe2()) +- break; +- if (mem_start == 0) +- return (0); +- /* Get station address */ +- for (i = 0; i < ETH_ALEN; ++i) +- { +- nic->node_addr[i] = inb(ioaddr+i); +- } +- printf("\nEXOS205 ioaddr %#hX, mem [%#X-%#X], addr %!\n", +- ioaddr, mem_start, mem_end, nic->node_addr); +- return (1); +-} +- +-struct nic *exos205_probe(struct nic *nic, unsigned short *probe_addrs) +-{ +- /* If you know the other addresses, please let me know */ +- static unsigned short io_addrs[] = { +- 0x310, 0x0 +- }; +- unsigned short *p; +- int i; +- +- /* if probe_addrs is 0, then routine can use a hardwired default */ +- if (probe_addrs == 0) +- probe_addrs = io_addrs; +- for (p = probe_addrs; (ioaddr = *p) != 0; ++p) +- if (exos205_probe1(nic)) +- break; +- if (ioaddr != 0) +- { +- /* point to NIC specific routines */ +- i82586_reset(nic); +- nic->reset = i82586_reset; +- nic->poll = i82586_poll; +- nic->transmit = i82586_transmit; +- nic->disable = i82586_disable; +- return nic; +- } +- /* else */ +- { +- return 0; +- } +-} +- +-#endif +diff -Naur grub-0.97.orig/netboot/if_arp.h grub-0.97/netboot/if_arp.h +--- grub-0.97.orig/netboot/if_arp.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/if_arp.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,29 @@ ++#ifndef _IF_ARP_H ++#define _IF_ARP_H ++ ++#include "types.h" ++ ++#define ARP_REQUEST 1 ++#define ARP_REPLY 2 ++ ++#ifndef MAX_ARP_RETRIES ++#define MAX_ARP_RETRIES 20 ++#endif ++ ++/* ++ * A pity sipaddr and tipaddr are not longword aligned or we could use ++ * in_addr. No, I don't want to use #pragma packed. ++ */ ++struct arprequest { ++ uint16_t hwtype; ++ uint16_t protocol; ++ uint8_t hwlen; ++ uint8_t protolen; ++ uint16_t opcode; ++ uint8_t shwaddr[6]; ++ uint8_t sipaddr[4]; ++ uint8_t thwaddr[6]; ++ uint8_t tipaddr[4]; ++}; ++ ++#endif /* _IF_ARP_H */ +diff -Naur grub-0.97.orig/netboot/if_ether.h grub-0.97/netboot/if_ether.h +--- grub-0.97.orig/netboot/if_ether.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/if_ether.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,21 @@ ++#ifndef _IF_ETHER_H ++#define _IF_ETHER_H ++ ++/* ++ I'm moving towards the defined names in linux/if_ether.h for clarity. ++ The confusion between 60/64 and 1514/1518 arose because the NS8390 ++ counts the 4 byte frame checksum in the incoming packet, but not ++ in the outgoing packet. 60/1514 are the correct numbers for most ++ if not all of the other NIC controllers. ++*/ ++ ++#define ETH_ALEN 6 /* Size of Ethernet address */ ++#define ETH_HLEN 14 /* Size of ethernet header */ ++#define ETH_ZLEN 60 /* Minimum packet */ ++#define ETH_FRAME_LEN 1514 /* Maximum packet */ ++#define ETH_DATA_ALIGN 2 /* Amount needed to align the data after an ethernet header */ ++#ifndef ETH_MAX_MTU ++#define ETH_MAX_MTU (ETH_FRAME_LEN-ETH_HLEN) ++#endif ++ ++#endif /* _IF_ETHER_H */ +diff -Naur grub-0.97.orig/netboot/igmp.h grub-0.97/netboot/igmp.h +--- grub-0.97.orig/netboot/igmp.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/igmp.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,27 @@ ++#ifndef _IGMP_H ++#define _IGMP_H ++ ++/* Max interval between IGMP packets */ ++#define IGMP_INTERVAL (10*TICKS_PER_SEC) ++#define IGMPv1_ROUTER_PRESENT_TIMEOUT (400*TICKS_PER_SEC) ++ ++#define IGMP_QUERY 0x11 ++#define IGMPv1_REPORT 0x12 ++#define IGMPv2_REPORT 0x16 ++#define IGMP_LEAVE 0x17 ++#define GROUP_ALL_HOSTS 0xe0000001 /* 224.0.0.1 Host byte order */ ++ ++struct igmp { ++ uint8_t type; ++ uint8_t response_time; ++ uint16_t chksum; ++ in_addr group; ++}; ++ ++struct igmp_ip_t { /* Format of an igmp ip packet */ ++ struct iphdr ip; ++ uint8_t router_alert[4]; /* Router alert option */ ++ struct igmp igmp; ++}; ++ ++#endif /* _IGMP_H */ +diff -Naur grub-0.97.orig/netboot/in.h grub-0.97/netboot/in.h +--- grub-0.97.orig/netboot/in.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/in.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,21 @@ ++#ifndef _IN_H ++#define _IN_H ++ ++#include "types.h" ++ ++#define IP 0x0800 ++#define ARP 0x0806 ++#define RARP 0x8035 ++ ++#define IP_ICMP 1 ++#define IP_IGMP 2 ++#define IP_UDP 17 ++ ++/* Same after going through htonl */ ++#define IP_BROADCAST 0xFFFFFFFF ++ ++typedef struct { ++ uint32_t s_addr; ++} in_addr; ++ ++#endif /* _IN_H */ +diff -Naur grub-0.97.orig/netboot/io.h grub-0.97/netboot/io.h +--- grub-0.97.orig/netboot/io.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/io.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,239 @@ ++#ifndef IO_H ++#define IO_H ++ ++ ++/* Amount of relocation etherboot is experiencing */ ++extern unsigned long virt_offset; ++ ++/* Don't require identity mapped physical memory, ++ * osloader.c is the only valid user at the moment. ++ */ ++unsigned long virt_to_phys(volatile const void *virt_addr); ++void *phys_to_virt(unsigned long phys_addr); ++ ++/* virt_to_bus converts an addresss inside of etherboot [_start, _end] ++ * into a memory access cards can use. ++ */ ++#define virt_to_bus virt_to_phys ++ ++ ++/* bus_to_virt reverses virt_to_bus, the address must be output ++ * from virt_to_bus to be valid. This function does not work on ++ * all bus addresses. ++ */ ++#define bus_to_virt phys_to_virt ++ ++/* ioremap converts a random 32bit bus address into something ++ * etherboot can access. ++ */ ++static inline void *ioremap(unsigned long bus_addr, unsigned long length __unused) ++{ ++ return bus_to_virt(bus_addr); ++} ++ ++/* iounmap cleans up anything ioremap had to setup */ ++static inline void iounmap(void *virt_addr __unused) ++{ ++ return; ++} ++ ++/* ++ * This file contains the definitions for the x86 IO instructions ++ * inb/inw/inl/outb/outw/outl and the "string versions" of the same ++ * (insb/insw/insl/outsb/outsw/outsl). You can also use "pausing" ++ * versions of the single-IO instructions (inb_p/inw_p/..). ++ * ++ * This file is not meant to be obfuscating: it's just complicated ++ * to (a) handle it all in a way that makes gcc able to optimize it ++ * as well as possible and (b) trying to avoid writing the same thing ++ * over and over again with slight variations and possibly making a ++ * mistake somewhere. ++ */ ++ ++/* ++ * Thanks to James van Artsdalen for a better timing-fix than ++ * the two short jumps: using outb's to a nonexistent port seems ++ * to guarantee better timings even on fast machines. ++ * ++ * On the other hand, I'd like to be sure of a non-existent port: ++ * I feel a bit unsafe about using 0x80 (should be safe, though) ++ * ++ * Linus ++ */ ++ ++#ifdef SLOW_IO_BY_JUMPING ++#define __SLOW_DOWN_IO __asm__ __volatile__("jmp 1f\n1:\tjmp 1f\n1:") ++#else ++#define __SLOW_DOWN_IO __asm__ __volatile__("outb %al,$0x80") ++#endif ++ ++#ifdef REALLY_SLOW_IO ++#define SLOW_DOWN_IO { __SLOW_DOWN_IO; __SLOW_DOWN_IO; __SLOW_DOWN_IO; __SLOW_DOWN_IO; } ++#else ++#define SLOW_DOWN_IO __SLOW_DOWN_IO ++#endif ++ ++/* ++ * readX/writeX() are used to access memory mapped devices. On some ++ * architectures the memory mapped IO stuff needs to be accessed ++ * differently. On the x86 architecture, we just read/write the ++ * memory location directly. ++ */ ++#define readb(addr) (*(volatile unsigned char *) (addr)) ++#define readw(addr) (*(volatile unsigned short *) (addr)) ++#define readl(addr) (*(volatile unsigned int *) (addr)) ++ ++#define writeb(b,addr) ((*(volatile unsigned char *) (addr)) = (b)) ++#define writew(b,addr) ((*(volatile unsigned short *) (addr)) = (b)) ++#define writel(b,addr) ((*(volatile unsigned int *) (addr)) = (b)) ++ ++#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) ++#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) ++ ++/* ++ * Force strict CPU ordering. ++ * And yes, this is required on UP too when we're talking ++ * to devices. ++ * ++ * For now, "wmb()" doesn't actually do anything, as all ++ * Intel CPU's follow what Intel calls a *Processor Order*, ++ * in which all writes are seen in the program order even ++ * outside the CPU. ++ * ++ * I expect future Intel CPU's to have a weaker ordering, ++ * but I'd also expect them to finally get their act together ++ * and add some real memory barriers if so. ++ * ++ * Some non intel clones support out of order store. wmb() ceases to be a ++ * nop for these. ++ */ ++ ++#define mb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)": : :"memory") ++#define rmb() mb() ++#define wmb() mb(); ++ ++ ++/* ++ * Talk about misusing macros.. ++ */ ++ ++#define __OUT1(s,x) \ ++extern void __out##s(unsigned x value, unsigned short port); \ ++extern inline void __out##s(unsigned x value, unsigned short port) { ++ ++#define __OUT2(s,s1,s2) \ ++__asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1" ++ ++#define __OUT(s,s1,x) \ ++__OUT1(s,x) __OUT2(s,s1,"w") : : "a" (value), "d" (port)); } \ ++__OUT1(s##c,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); } \ ++__OUT1(s##_p,x) __OUT2(s,s1,"w") : : "a" (value), "d" (port)); SLOW_DOWN_IO; } \ ++__OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO; } ++ ++#define __IN1(s,x) \ ++extern unsigned x __in##s(unsigned short port); \ ++extern inline unsigned x __in##s(unsigned short port) { unsigned x _v; ++ ++#define __IN2(s,s1,s2) \ ++__asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0" ++ ++#define __IN(s,s1,x,i...) \ ++__IN1(s,x) __IN2(s,s1,"w") : "=a" (_v) : "d" (port) ,##i ); return _v; } \ ++__IN1(s##c,x) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); return _v; } \ ++__IN1(s##_p,x) __IN2(s,s1,"w") : "=a" (_v) : "d" (port) ,##i ); SLOW_DOWN_IO; return _v; } \ ++__IN1(s##c_p,x) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); SLOW_DOWN_IO; return _v; } ++ ++#define __INS(s) \ ++extern void ins##s(unsigned short port, void * addr, unsigned long count); \ ++extern inline void ins##s(unsigned short port, void * addr, unsigned long count) \ ++{ __asm__ __volatile__ ("cld ; rep ; ins" #s \ ++: "=D" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } ++ ++#define __OUTS(s) \ ++extern void outs##s(unsigned short port, const void * addr, unsigned long count); \ ++extern inline void outs##s(unsigned short port, const void * addr, unsigned long count) \ ++{ __asm__ __volatile__ ("cld ; rep ; outs" #s \ ++: "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } ++ ++__IN(b,"", char) ++__IN(w,"",short) ++__IN(l,"", long) ++ ++__OUT(b,"b",char) ++__OUT(w,"w",short) ++__OUT(l,,int) ++ ++__INS(b) ++__INS(w) ++__INS(l) ++ ++__OUTS(b) ++__OUTS(w) ++__OUTS(l) ++ ++/* ++ * Note that due to the way __builtin_constant_p() works, you ++ * - can't use it inside a inline function (it will never be true) ++ * - you don't have to worry about side effects within the __builtin.. ++ */ ++#define outb(val,port) \ ++((__builtin_constant_p((port)) && (port) < 256) ? \ ++ __outbc((val),(port)) : \ ++ __outb((val),(port))) ++ ++#define inb(port) \ ++((__builtin_constant_p((port)) && (port) < 256) ? \ ++ __inbc(port) : \ ++ __inb(port)) ++ ++#define outb_p(val,port) \ ++((__builtin_constant_p((port)) && (port) < 256) ? \ ++ __outbc_p((val),(port)) : \ ++ __outb_p((val),(port))) ++ ++#define inb_p(port) \ ++((__builtin_constant_p((port)) && (port) < 256) ? \ ++ __inbc_p(port) : \ ++ __inb_p(port)) ++ ++#define outw(val,port) \ ++((__builtin_constant_p((port)) && (port) < 256) ? \ ++ __outwc((val),(port)) : \ ++ __outw((val),(port))) ++ ++#define inw(port) \ ++((__builtin_constant_p((port)) && (port) < 256) ? \ ++ __inwc(port) : \ ++ __inw(port)) ++ ++#define outw_p(val,port) \ ++((__builtin_constant_p((port)) && (port) < 256) ? \ ++ __outwc_p((val),(port)) : \ ++ __outw_p((val),(port))) ++ ++#define inw_p(port) \ ++((__builtin_constant_p((port)) && (port) < 256) ? \ ++ __inwc_p(port) : \ ++ __inw_p(port)) ++ ++#define outl(val,port) \ ++((__builtin_constant_p((port)) && (port) < 256) ? \ ++ __outlc((val),(port)) : \ ++ __outl((val),(port))) ++ ++#define inl(port) \ ++((__builtin_constant_p((port)) && (port) < 256) ? \ ++ __inlc(port) : \ ++ __inl(port)) ++ ++#define outl_p(val,port) \ ++((__builtin_constant_p((port)) && (port) < 256) ? \ ++ __outlc_p((val),(port)) : \ ++ __outl_p((val),(port))) ++ ++#define inl_p(port) \ ++((__builtin_constant_p((port)) && (port) < 256) ? \ ++ __inlc_p(port) : \ ++ __inl_p(port)) ++ ++#endif /* ETHERBOOT_IO_H */ +diff -Naur grub-0.97.orig/netboot/ip.h grub-0.97/netboot/ip.h +--- grub-0.97.orig/netboot/ip.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/ip.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,36 @@ ++#ifndef _IP_H ++#define _IP_H ++ ++/* We need 'uint16_t' */ ++#include "types.h" ++/* We need 'in_addr' */ ++#include "in.h" ++ ++struct iphdr { ++ uint8_t verhdrlen; ++ uint8_t service; ++ uint16_t len; ++ uint16_t ident; ++ uint16_t frags; ++ uint8_t ttl; ++ uint8_t protocol; ++ uint16_t chksum; ++ in_addr src; ++ in_addr dest; ++}; ++ ++extern void build_ip_hdr(unsigned long __destip, int __ttl, int __protocol, ++ int __option_len, int __len, const void * __buf); ++ ++extern int ip_transmit(int __len, const void * __buf); ++ ++extern uint16_t ipchksum(const void * __data, unsigned long __length); ++ ++extern uint16_t add_ipchksums(unsigned long __offset, uint16_t __sum, ++ uint16_t __new); ++ ++ ++ ++ ++ ++#endif /* _IP_H */ +diff -Naur grub-0.97.orig/netboot/isa.h grub-0.97/netboot/isa.h +--- grub-0.97.orig/netboot/isa.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/isa.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,27 @@ ++#if !defined(ISA_H) && defined(CONFIG_ISA) ++#define ISA_H ++ ++struct dev; ++ ++#define ISAPNP_VENDOR(a,b,c) (((((a)-'A'+1)&0x3f)<<2)|\ ++ ((((b)-'A'+1)&0x18)>>3)|((((b)-'A'+1)&7)<<13)|\ ++ ((((c)-'A'+1)&0x1f)<<8)) ++ ++#define GENERIC_ISAPNP_VENDOR ISAPNP_VENDOR('P','N','P') ++ ++struct isa_driver ++{ ++ int type; ++ const char *name; ++ int (*probe)(struct dev *, unsigned short *); ++ unsigned short *ioaddrs; ++}; ++ ++#define __isa_driver __attribute__ ((unused,__section__(".drivers.isa"))) ++extern const struct isa_driver isa_drivers[]; ++extern const struct isa_driver isa_drivers_end[]; ++ ++#define ISA_ROM(IMAGE, DESCRIPTION) ++ ++#endif /* ISA_H */ ++ +diff -Naur grub-0.97.orig/netboot/lance.c grub-0.97/netboot/lance.c +--- grub-0.97.orig/netboot/lance.c 2003-07-09 11:45:37.000000000 +0000 ++++ grub-0.97/netboot/lance.c 1970-01-01 00:00:00.000000000 +0000 +@@ -1,564 +0,0 @@ +-/************************************************************************** +-Etherboot - BOOTP/TFTP Bootstrap Program +-LANCE NIC driver for Etherboot +-Large portions borrowed from the Linux LANCE driver by Donald Becker +-Ken Yap, July 1997 +-***************************************************************************/ +- +-/* +- * This program is free software; you can redistribute it and/or +- * modify it under the terms of the GNU General Public License as +- * published by the Free Software Foundation; either version 2, or (at +- * your option) any later version. +- */ +- +-/* to get some global routines like printf */ +-#include "etherboot.h" +-/* to get the interface to the body of the program */ +-#include "nic.h" +-#ifdef INCLUDE_LANCE +-#include "pci.h" +-#endif +-#include "cards.h" +- +-/* Offsets from base I/O address */ +-#if defined(INCLUDE_NE2100) || defined(INCLUDE_LANCE) +-#define LANCE_ETH_ADDR 0x0 +-#define LANCE_DATA 0x10 +-#define LANCE_ADDR 0x12 +-#define LANCE_RESET 0x14 +-#define LANCE_BUS_IF 0x16 +-#define LANCE_TOTAL_SIZE 0x18 +-#endif +-#ifdef INCLUDE_NI6510 +-#define LANCE_ETH_ADDR 0x8 +-#define LANCE_DATA 0x0 +-#define LANCE_ADDR 0x2 +-#define LANCE_RESET 0x4 +-#define LANCE_BUS_IF 0x6 +-#define LANCE_TOTAL_SIZE 0x10 +-#endif +- +-/* lance_poll() now can use multiple Rx buffers to prevent packet loss. Set +- * Set LANCE_LOG_RX_BUFFERS to 0..7 for 1, 2, 4, 8, 16, 32, 64 or 128 Rx +- * buffers. Usually 4 (=16 Rx buffers) is a good value. (Andreas Neuhaus) +- * Decreased to 2 (=4 Rx buffers) (Ken Yap, 20010305) */ +- +-#define LANCE_LOG_RX_BUFFERS 2 /* Use 2^2=4 Rx buffers */ +- +-#define RX_RING_SIZE (1 << (LANCE_LOG_RX_BUFFERS)) +-#define RX_RING_MOD_MASK (RX_RING_SIZE - 1) +-#define RX_RING_LEN_BITS ((LANCE_LOG_RX_BUFFERS) << 29) +- +-struct lance_init_block +-{ +- unsigned short mode; +- unsigned char phys_addr[ETH_ALEN]; +- unsigned long filter[2]; +- Address rx_ring; +- Address tx_ring; +-}; +- +-struct lance_rx_head +-{ +- union { +- Address base; +- unsigned char addr[4]; +- } u; +- short buf_length; /* 2s complement */ +- short msg_length; +-}; +- +-struct lance_tx_head +-{ +- union { +- Address base; +- unsigned char addr[4]; +- } u; +- short buf_length; /* 2s complement */ +- short misc; +-}; +- +-struct lance_interface +-{ +- struct lance_init_block init_block; +- struct lance_rx_head rx_ring[RX_RING_SIZE]; +- struct lance_tx_head tx_ring; +- unsigned char rbuf[RX_RING_SIZE][ETH_FRAME_LEN+4]; +- unsigned char tbuf[ETH_FRAME_LEN]; +- /* +- * Do not alter the order of the struct members above; +- * the hardware depends on the correct alignment. +- */ +- int rx_idx; +-}; +- +-#define LANCE_MUST_PAD 0x00000001 +-#define LANCE_ENABLE_AUTOSELECT 0x00000002 +-#define LANCE_SELECT_PHONELINE 0x00000004 +-#define LANCE_MUST_UNRESET 0x00000008 +- +-/* A mapping from the chip ID number to the part number and features. +- These are from the datasheets -- in real life the '970 version +- reportedly has the same ID as the '965. */ +-static const struct lance_chip_type +-{ +- int id_number; +- const char *name; +- int flags; +-} chip_table[] = { +- {0x0000, "LANCE 7990", /* Ancient lance chip. */ +- LANCE_MUST_PAD + LANCE_MUST_UNRESET}, +- {0x0003, "PCnet/ISA 79C960", /* 79C960 PCnet/ISA. */ +- LANCE_ENABLE_AUTOSELECT}, +- {0x2260, "PCnet/ISA+ 79C961", /* 79C961 PCnet/ISA+, Plug-n-Play. */ +- LANCE_ENABLE_AUTOSELECT}, +- {0x2420, "PCnet/PCI 79C970", /* 79C970 or 79C974 PCnet-SCSI, PCI. */ +- LANCE_ENABLE_AUTOSELECT}, +- /* Bug: the PCnet/PCI actually uses the PCnet/VLB ID number, so just call +- it the PCnet32. */ +- {0x2430, "PCnet32", /* 79C965 PCnet for VL bus. */ +- LANCE_ENABLE_AUTOSELECT}, +- {0x2621, "PCnet/PCI-II 79C970A", /* 79C970A PCInetPCI II. */ +- LANCE_ENABLE_AUTOSELECT}, +- {0x2625, "PCnet-FAST III 79C973", /* 79C973 PCInet-FAST III. */ +- LANCE_ENABLE_AUTOSELECT}, +- {0x2626, "PCnet/HomePNA 79C978", +- LANCE_ENABLE_AUTOSELECT|LANCE_SELECT_PHONELINE}, +- {0x0, "PCnet (unknown)", +- LANCE_ENABLE_AUTOSELECT}, +-}; +- +-/* Define a macro for converting program addresses to real addresses */ +-#undef virt_to_bus +-#define virt_to_bus(x) ((unsigned long)x) +- +-static int chip_version; +-static int lance_version; +-static unsigned short ioaddr; +-#ifndef INCLUDE_LANCE +-static int dma; +-#endif +-static struct lance_interface *lp; +- +-/* additional 8 bytes for 8-byte alignment space */ +-#ifdef USE_LOWMEM_BUFFER +-#define lance ((char *)0x10000 - (sizeof(struct lance_interface)+8)) +-#else +-static char lance[sizeof(struct lance_interface)+8]; +-#endif +- +-#ifndef INCLUDE_LANCE +-/* DMA defines and helper routines */ +- +-/* DMA controller registers */ +-#define DMA1_CMD_REG 0x08 /* command register (w) */ +-#define DMA1_STAT_REG 0x08 /* status register (r) */ +-#define DMA1_REQ_REG 0x09 /* request register (w) */ +-#define DMA1_MASK_REG 0x0A /* single-channel mask (w) */ +-#define DMA1_MODE_REG 0x0B /* mode register (w) */ +-#define DMA1_CLEAR_FF_REG 0x0C /* clear pointer flip-flop (w) */ +-#define DMA1_TEMP_REG 0x0D /* Temporary Register (r) */ +-#define DMA1_RESET_REG 0x0D /* Master Clear (w) */ +-#define DMA1_CLR_MASK_REG 0x0E /* Clear Mask */ +-#define DMA1_MASK_ALL_REG 0x0F /* all-channels mask (w) */ +- +-#define DMA2_CMD_REG 0xD0 /* command register (w) */ +-#define DMA2_STAT_REG 0xD0 /* status register (r) */ +-#define DMA2_REQ_REG 0xD2 /* request register (w) */ +-#define DMA2_MASK_REG 0xD4 /* single-channel mask (w) */ +-#define DMA2_MODE_REG 0xD6 /* mode register (w) */ +-#define DMA2_CLEAR_FF_REG 0xD8 /* clear pointer flip-flop (w) */ +-#define DMA2_TEMP_REG 0xDA /* Temporary Register (r) */ +-#define DMA2_RESET_REG 0xDA /* Master Clear (w) */ +-#define DMA2_CLR_MASK_REG 0xDC /* Clear Mask */ +-#define DMA2_MASK_ALL_REG 0xDE /* all-channels mask (w) */ +- +- +-#define DMA_MODE_READ 0x44 /* I/O to memory, no autoinit, increment, single mode */ +-#define DMA_MODE_WRITE 0x48 /* memory to I/O, no autoinit, increment, single mode */ +-#define DMA_MODE_CASCADE 0xC0 /* pass thru DREQ->HRQ, DACK<-HLDA only */ +- +-/* enable/disable a specific DMA channel */ +-static void enable_dma(unsigned int dmanr) +-{ +- if (dmanr <= 3) +- outb_p(dmanr, DMA1_MASK_REG); +- else +- outb_p(dmanr & 3, DMA2_MASK_REG); +-} +- +-static void disable_dma(unsigned int dmanr) +-{ +- if (dmanr <= 3) +- outb_p(dmanr | 4, DMA1_MASK_REG); +- else +- outb_p((dmanr & 3) | 4, DMA2_MASK_REG); +-} +- +-/* set mode (above) for a specific DMA channel */ +-static void set_dma_mode(unsigned int dmanr, char mode) +-{ +- if (dmanr <= 3) +- outb_p(mode | dmanr, DMA1_MODE_REG); +- else +- outb_p(mode | (dmanr&3), DMA2_MODE_REG); +-} +-#endif /* !INCLUDE_LANCE */ +- +-/************************************************************************** +-RESET - Reset adapter +-***************************************************************************/ +-static void lance_reset(struct nic *nic) +-{ +- int i; +- Address l; +- +- /* Reset the LANCE */ +- (void)inw(ioaddr+LANCE_RESET); +- /* Un-Reset the LANCE, needed only for the NE2100 */ +- if (chip_table[lance_version].flags & LANCE_MUST_UNRESET) +- outw(0, ioaddr+LANCE_RESET); +- if (chip_table[lance_version].flags & LANCE_ENABLE_AUTOSELECT) +- { +- /* This is 79C960 specific; Turn on auto-select of media +- (AUI, BNC). */ +- outw(0x2, ioaddr+LANCE_ADDR); +- /* Don't touch 10base2 power bit. */ +- outw(inw(ioaddr+LANCE_BUS_IF) | 0x2, ioaddr+LANCE_BUS_IF); +- } +- /* HomePNA cards need to explicitly pick the phoneline interface. +- * Some of these cards have ethernet interfaces as well, this +- * code might require some modification for those. +- */ +- if (chip_table[lance_version].flags & LANCE_SELECT_PHONELINE) { +- short media, check ; +- /* this is specific to HomePNA cards... */ +- outw(49, ioaddr+0x12) ; +- media = inw(ioaddr+0x16) ; +-#ifdef DEBUG +- printf("media was %d\n", media) ; +-#endif +- media &= ~3 ; +- media |= 1 ; +-#ifdef DEBUG +- printf("media changed to %d\n", media) ; +-#endif +- media &= ~3 ; +- media |= 1 ; +- outw(49, ioaddr+0x12) ; +- outw(media, ioaddr+0x16) ; +- outw(49, ioaddr+0x12) ; +- check = inw(ioaddr+0x16) ; +-#ifdef DEBUG +- printf("check %s, media was set properly\n", +- check == media ? "passed" : "FAILED" ) ; +-#endif +- } +- +- /* Re-initialise the LANCE, and start it when done. */ +- /* Set station address */ +- for (i = 0; i < ETH_ALEN; ++i) +- lp->init_block.phys_addr[i] = nic->node_addr[i]; +- /* Preset the receive ring headers */ +- for (i=0; irx_ring[i].buf_length = -ETH_FRAME_LEN-4; +- /* OWN */ +- lp->rx_ring[i].u.base = virt_to_bus(lp->rbuf[i]) & 0xffffff; +- /* we set the top byte as the very last thing */ +- lp->rx_ring[i].u.addr[3] = 0x80; +- } +- lp->rx_idx = 0; +- lp->init_block.mode = 0x0; /* enable Rx and Tx */ +- l = (Address)virt_to_bus(&lp->init_block); +- outw(0x1, ioaddr+LANCE_ADDR); +- (void)inw(ioaddr+LANCE_ADDR); +- outw((short)l, ioaddr+LANCE_DATA); +- outw(0x2, ioaddr+LANCE_ADDR); +- (void)inw(ioaddr+LANCE_ADDR); +- outw((short)(l >> 16), ioaddr+LANCE_DATA); +- outw(0x4, ioaddr+LANCE_ADDR); +- (void)inw(ioaddr+LANCE_ADDR); +- outw(0x915, ioaddr+LANCE_DATA); +- outw(0x0, ioaddr+LANCE_ADDR); +- (void)inw(ioaddr+LANCE_ADDR); +- outw(0x4, ioaddr+LANCE_DATA); /* stop */ +- outw(0x1, ioaddr+LANCE_DATA); /* init */ +- for (i = 10000; i > 0; --i) +- if (inw(ioaddr+LANCE_DATA) & 0x100) +- break; +-#ifdef DEBUG +- if (i <= 0) +- printf("Init timed out\n"); +-#endif +- /* Apparently clearing the InitDone bit here triggers a bug +- in the '974. (Mark Stockton) */ +- outw(0x2, ioaddr+LANCE_DATA); /* start */ +-} +- +-/************************************************************************** +-POLL - Wait for a frame +-***************************************************************************/ +-static int lance_poll(struct nic *nic) +-{ +- int status; +- +- status = lp->rx_ring[lp->rx_idx].u.base >> 24; +- if (status & 0x80) +- return (0); +-#ifdef DEBUG +- printf("LANCE packet received rx_ring.u.base %X mcnt %hX csr0 %hX\n", +- lp->rx_ring[lp->rx_idx].u.base, lp->rx_ring[lp->rx_idx].msg_length, +- inw(ioaddr+LANCE_DATA)); +-#endif +- if (status == 0x3) +- memcpy(nic->packet, lp->rbuf[lp->rx_idx], nic->packetlen = lp->rx_ring[lp->rx_idx].msg_length); +- /* Andrew Boyd of QNX reports that some revs of the 79C765 +- clear the buffer length */ +- lp->rx_ring[lp->rx_idx].buf_length = -ETH_FRAME_LEN-4; +- lp->rx_ring[lp->rx_idx].u.addr[3] |= 0x80; /* prime for next receive */ +- +- /* I'm not sure if the following is still ok with multiple Rx buffers, but it works */ +- outw(0x0, ioaddr+LANCE_ADDR); +- (void)inw(ioaddr+LANCE_ADDR); +- outw(0x500, ioaddr+LANCE_DATA); /* clear receive + InitDone */ +- +- /* Switch to the next Rx ring buffer */ +- lp->rx_idx = (lp->rx_idx + 1) & RX_RING_MOD_MASK; +- +- return (status == 0x3); +-} +- +-/************************************************************************** +-TRANSMIT - Transmit a frame +-***************************************************************************/ +-static void lance_transmit( +- struct nic *nic, +- const char *d, /* Destination */ +- unsigned int t, /* Type */ +- unsigned int s, /* size */ +- const char *p) /* Packet */ +-{ +- unsigned long time; +- +- /* copy the packet to ring buffer */ +- memcpy(lp->tbuf, d, ETH_ALEN); /* dst */ +- memcpy(&lp->tbuf[ETH_ALEN], nic->node_addr, ETH_ALEN); /* src */ +- lp->tbuf[ETH_ALEN+ETH_ALEN] = t >> 8; /* type */ +- lp->tbuf[ETH_ALEN+ETH_ALEN+1] = t; /* type */ +- memcpy(&lp->tbuf[ETH_HLEN], p, s); +- s += ETH_HLEN; +- if (chip_table[chip_version].flags & LANCE_MUST_PAD) +- while (s < ETH_ZLEN) /* pad to min length */ +- lp->tbuf[s++] = 0; +- lp->tx_ring.buf_length = -s; +- lp->tx_ring.misc = 0x0; +- /* OWN, STP, ENP */ +- lp->tx_ring.u.base = virt_to_bus(lp->tbuf) & 0xffffff; +- /* we set the top byte as the very last thing */ +- lp->tx_ring.u.addr[3] = 0x83; +- /* Trigger an immediate send poll */ +- outw(0x0, ioaddr+LANCE_ADDR); +- (void)inw(ioaddr+LANCE_ADDR); /* as in the datasheets... */ +- /* Klaus Espenlaub: the value below was 0x48, but that enabled the +- * interrupt line, causing a hang if for some reasone the interrupt +- * controller had the LANCE interrupt enabled. I have no idea why +- * nobody ran into this before... */ +- outw(0x08, ioaddr+LANCE_DATA); +- /* wait for transmit complete */ +- time = currticks() + TICKS_PER_SEC; /* wait one second */ +- while (currticks() < time && (lp->tx_ring.u.base & 0x80000000) != 0) +- ; +- if ((lp->tx_ring.u.base & 0x80000000) != 0) +- printf("LANCE timed out on transmit\n"); +- (void)inw(ioaddr+LANCE_ADDR); +- outw(0x200, ioaddr+LANCE_DATA); /* clear transmit + InitDone */ +-#ifdef DEBUG +- printf("tx_ring.u.base %X tx_ring.buf_length %hX tx_ring.misc %hX csr0 %hX\n", +- lp->tx_ring.u.base, lp->tx_ring.buf_length, lp->tx_ring.misc, +- inw(ioaddr+LANCE_DATA)); +-#endif +-} +- +-static void lance_disable(struct nic *nic) +-{ +- (void)inw(ioaddr+LANCE_RESET); +- if (chip_table[lance_version].flags & LANCE_MUST_UNRESET) +- outw(0, ioaddr+LANCE_RESET); +- +- outw(0, ioaddr+LANCE_ADDR); +- outw(0x0004, ioaddr+LANCE_DATA); /* stop the LANCE */ +- +-#ifndef INCLUDE_LANCE +- disable_dma(dma); +-#endif +-} +- +-#ifdef INCLUDE_LANCE +-static int lance_probe1(struct nic *nic, struct pci_device *pci) +-#else +-static int lance_probe1(struct nic *nic) +-#endif +-{ +- int reset_val ; +- unsigned int i; +- Address l; +- short dma_channels; +-#ifndef INCLUDE_LANCE +- static const char dmas[] = { 5, 6, 7, 3 }; +-#endif +- +- reset_val = inw(ioaddr+LANCE_RESET); +- outw(reset_val, ioaddr+LANCE_RESET); +-#if 1 /* Klaus Espenlaub -- was #ifdef INCLUDE_NE2100*/ +- outw(0x0, ioaddr+LANCE_ADDR); /* Switch to window 0 */ +- if (inw(ioaddr+LANCE_DATA) != 0x4) +- return (-1); +-#endif +- outw(88, ioaddr+LANCE_ADDR); /* Get the version of the chip */ +- if (inw(ioaddr+LANCE_ADDR) != 88) +- lance_version = 0; +- else +- { +- chip_version = inw(ioaddr+LANCE_DATA); +- outw(89, ioaddr+LANCE_ADDR); +- chip_version |= inw(ioaddr+LANCE_DATA) << 16; +- if ((chip_version & 0xfff) != 0x3) +- return (-1); +- chip_version = (chip_version >> 12) & 0xffff; +- for (lance_version = 1; chip_table[lance_version].id_number != 0; ++lance_version) +- if (chip_table[lance_version].id_number == chip_version) +- break; +- } +- /* make sure data structure is 8-byte aligned */ +- l = ((Address)lance + 7) & ~7; +- lp = (struct lance_interface *)l; +- lp->init_block.mode = 0x3; /* disable Rx and Tx */ +- lp->init_block.filter[0] = lp->init_block.filter[1] = 0x0; +- /* using multiple Rx buffer and a single Tx buffer */ +- lp->init_block.rx_ring = (virt_to_bus(&lp->rx_ring) & 0xffffff) | RX_RING_LEN_BITS; +- lp->init_block.tx_ring = virt_to_bus(&lp->tx_ring) & 0xffffff; +- l = virt_to_bus(&lp->init_block); +- outw(0x1, ioaddr+LANCE_ADDR); +- (void)inw(ioaddr+LANCE_ADDR); +- outw((unsigned short)l, ioaddr+LANCE_DATA); +- outw(0x2, ioaddr+LANCE_ADDR); +- (void)inw(ioaddr+LANCE_ADDR); +- outw((unsigned short)(l >> 16), ioaddr+LANCE_DATA); +- outw(0x4, ioaddr+LANCE_ADDR); +- (void)inw(ioaddr+LANCE_ADDR); +- outw(0x915, ioaddr+LANCE_DATA); +- outw(0x0, ioaddr+LANCE_ADDR); +- (void)inw(ioaddr+LANCE_ADDR); +- /* Get station address */ +- for (i = 0; i < ETH_ALEN; ++i) { +- nic->node_addr[i] = inb(ioaddr+LANCE_ETH_ADDR+i); +- } +-#ifndef INCLUDE_LANCE +- /* now probe for DMA channel */ +- dma_channels = ((inb(DMA1_STAT_REG) >> 4) & 0xf) | +- (inb(DMA2_STAT_REG) & 0xf0); +- /* need to fix when PCI provides DMA info */ +- for (i = 0; i < (sizeof(dmas)/sizeof(dmas[0])); ++i) +- { +- int j; +- +- dma = dmas[i]; +- /* Don't enable a permanently busy DMA channel, +- or the machine will hang */ +- if (dma_channels & (1 << dma)) +- continue; +- outw(0x7f04, ioaddr+LANCE_DATA); /* clear memory error bits */ +- set_dma_mode(dma, DMA_MODE_CASCADE); +- enable_dma(dma); +- outw(0x1, ioaddr+LANCE_DATA); /* init */ +- for (j = 100; j > 0; --j) +- if (inw(ioaddr+LANCE_DATA) & 0x900) +- break; +- if (inw(ioaddr+LANCE_DATA) & 0x100) +- break; +- else +- disable_dma(dma); +- } +- if (i >= (sizeof(dmas)/sizeof(dmas[0]))) +- dma = 0; +- printf("\n%s base %#X, DMA %d, addr %!\n", +- chip_table[lance_version].name, ioaddr, dma, nic->node_addr); +-#else +- printf(" %s base %#hX, addr %!\n", chip_table[lance_version].name, ioaddr, nic->node_addr); +-#endif +- if (chip_table[chip_version].flags & LANCE_ENABLE_AUTOSELECT) { +- /* Turn on auto-select of media (10baseT or BNC) so that the +- * user watch the LEDs. */ +- outw(0x0002, ioaddr+LANCE_ADDR); +- /* Don't touch 10base2 power bit. */ +- outw(inw(ioaddr+LANCE_BUS_IF) | 0x0002, ioaddr+LANCE_BUS_IF); +- } +- return (lance_version); +-} +- +-/************************************************************************** +-PROBE - Look for an adapter, this routine's visible to the outside +-***************************************************************************/ +- +-#ifdef INCLUDE_LANCE +-struct nic *lancepci_probe(struct nic *nic, unsigned short *probe_addrs, struct pci_device *pci) +-#endif +-#ifdef INCLUDE_NE2100 +-struct nic *ne2100_probe(struct nic *nic, unsigned short *probe_addrs) +-#endif +-#ifdef INCLUDE_NI6510 +-struct nic *ni6510_probe(struct nic *nic, unsigned short *probe_addrs) +-#endif +-{ +- unsigned short *p; +-#ifndef INCLUDE_LANCE +- static unsigned short io_addrs[] = { 0x300, 0x320, 0x340, 0x360, 0 }; +-#endif +- +- /* if probe_addrs is 0, then routine can use a hardwired default */ +- if (probe_addrs == 0) { +-#ifdef INCLUDE_LANCE +- return 0; +-#else +- probe_addrs = io_addrs; +-#endif +- } +- for (p = probe_addrs; (ioaddr = *p) != 0; ++p) +- { +- char offset15, offset14 = inb(ioaddr + 14); +- unsigned short pci_cmd; +- +-#ifdef INCLUDE_NE2100 +- if ((offset14 == 0x52 || offset14 == 0x57) && +- ((offset15 = inb(ioaddr + 15)) == 0x57 || offset15 == 0x44)) +- if (lance_probe1(nic) >= 0) +- break; +-#endif +-#ifdef INCLUDE_NI6510 +- if ((offset14 == 0x00 || offset14 == 0x52) && +- ((offset15 = inb(ioaddr + 15)) == 0x55 || offset15 == 0x44)) +- if (lance_probe1(nic) >= 0) +- break; +-#endif +-#ifdef INCLUDE_LANCE +- adjust_pci_device(pci); +- if (lance_probe1(nic, pci) >= 0) +- break; +-#endif +- } +- /* if board found */ +- if (ioaddr != 0) +- { +- /* point to NIC specific routines */ +- lance_reset(nic); +- nic->reset = lance_reset; +- nic->poll = lance_poll; +- nic->transmit = lance_transmit; +- nic->disable = lance_disable; +- return nic; +- } +- +- /* no board found */ +- return 0; +-} +diff -Naur grub-0.97.orig/netboot/latch.h grub-0.97/netboot/latch.h +--- grub-0.97.orig/netboot/latch.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/latch.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,10 @@ ++#ifndef LATCH_H ++#define LATCH_H ++ ++#define TICKS_PER_SEC 18 ++ ++/* For different calibrators of the TSC move the declaration of ++ * sleep_latch and the definitions of it's length here... ++ */ ++ ++#endif /* LATCH_H */ +diff -Naur grub-0.97.orig/netboot/linux-asm-io.h grub-0.97/netboot/linux-asm-io.h +--- grub-0.97.orig/netboot/linux-asm-io.h 2003-07-09 11:45:37.000000000 +0000 ++++ grub-0.97/netboot/linux-asm-io.h 1970-01-01 00:00:00.000000000 +0000 +@@ -1,187 +0,0 @@ +-#ifndef _ASM_IO_H +-#define _ASM_IO_H +- +-/* +- * This file contains the definitions for the x86 IO instructions +- * inb/inw/inl/outb/outw/outl and the "string versions" of the same +- * (insb/insw/insl/outsb/outsw/outsl). You can also use "pausing" +- * versions of the single-IO instructions (inb_p/inw_p/..). +- * +- * This file is not meant to be obfuscating: it's just complicated +- * to (a) handle it all in a way that makes gcc able to optimize it +- * as well as possible and (b) trying to avoid writing the same thing +- * over and over again with slight variations and possibly making a +- * mistake somewhere. +- */ +- +-/* +- * Thanks to James van Artsdalen for a better timing-fix than +- * the two short jumps: using outb's to a nonexistent port seems +- * to guarantee better timings even on fast machines. +- * +- * On the other hand, I'd like to be sure of a non-existent port: +- * I feel a bit unsafe about using 0x80 (should be safe, though) +- * +- * Linus +- */ +- +-#ifdef SLOW_IO_BY_JUMPING +-#define __SLOW_DOWN_IO __asm__ __volatile__("jmp 1f\n1:\tjmp 1f\n1:") +-#else +-#define __SLOW_DOWN_IO __asm__ __volatile__("outb %al,$0x80") +-#endif +- +-#ifdef REALLY_SLOW_IO +-#define SLOW_DOWN_IO { __SLOW_DOWN_IO; __SLOW_DOWN_IO; __SLOW_DOWN_IO; __SLOW_DOWN_IO; } +-#else +-#define SLOW_DOWN_IO __SLOW_DOWN_IO +-#endif +- +-/* +- * readX/writeX() are used to access memory mapped devices. On some +- * architectures the memory mapped IO stuff needs to be accessed +- * differently. On the x86 architecture, we just read/write the +- * memory location directly. +- */ +-#define readb(addr) (*(volatile unsigned char *) (addr)) +-#define readw(addr) (*(volatile unsigned short *) (addr)) +-#define readl(addr) (*(volatile unsigned int *) (addr)) +- +-#define writeb(b,addr) ((*(volatile unsigned char *) (addr)) = (b)) +-#define writew(b,addr) ((*(volatile unsigned short *) (addr)) = (b)) +-#define writel(b,addr) ((*(volatile unsigned int *) (addr)) = (b)) +- +-#define memset_io(a,b,c) memset((void *)(a),(b),(c)) +-#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) +-#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) +- +-/* +- * Again, i386 does not require mem IO specific function. +- */ +- +-#define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void *)(b),(c),(d)) +- +-/* +- * Talk about misusing macros.. +- */ +- +-#define __OUT1(s,x) \ +-extern void __out##s(unsigned x value, unsigned short port); \ +-extern inline void __out##s(unsigned x value, unsigned short port) { +- +-#define __OUT2(s,s1,s2) \ +-__asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1" +- +-#define __OUT(s,s1,x) \ +-__OUT1(s,x) __OUT2(s,s1,"w") : : "a" (value), "d" (port)); } \ +-__OUT1(s##c,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); } \ +-__OUT1(s##_p,x) __OUT2(s,s1,"w") : : "a" (value), "d" (port)); SLOW_DOWN_IO; } \ +-__OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO; } +- +-#define __IN1(s,x) \ +-extern unsigned x __in##s(unsigned short port); \ +-extern inline unsigned x __in##s(unsigned short port) { unsigned x _v; +- +-#define __IN2(s,s1,s2) \ +-__asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0" +- +-#define __IN(s,s1,x,i...) \ +-__IN1(s,x) __IN2(s,s1,"w") : "=a" (_v) : "d" (port) ,##i ); return _v; } \ +-__IN1(s##c,x) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); return _v; } \ +-__IN1(s##_p,x) __IN2(s,s1,"w") : "=a" (_v) : "d" (port) ,##i ); SLOW_DOWN_IO; return _v; } \ +-__IN1(s##c_p,x) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); SLOW_DOWN_IO; return _v; } +- +-#define __INS(s) \ +-extern void ins##s(unsigned short port, void * addr, unsigned long count); \ +-extern inline void ins##s(unsigned short port, void * addr, unsigned long count) \ +-{ __asm__ __volatile__ ("cld ; rep ; ins" #s \ +-: "=D" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } +- +-#define __OUTS(s) \ +-extern void outs##s(unsigned short port, const void * addr, unsigned long count); \ +-extern inline void outs##s(unsigned short port, const void * addr, unsigned long count) \ +-{ __asm__ __volatile__ ("cld ; rep ; outs" #s \ +-: "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } +- +-__IN(b,"", char) +-__IN(w,"",short) +-__IN(l,"", long) +- +-__OUT(b,"b",char) +-__OUT(w,"w",short) +-__OUT(l,,int) +- +-__INS(b) +-__INS(w) +-__INS(l) +- +-__OUTS(b) +-__OUTS(w) +-__OUTS(l) +- +-/* +- * Note that due to the way __builtin_constant_p() works, you +- * - can't use it inside a inline function (it will never be true) +- * - you don't have to worry about side effects within the __builtin.. +- */ +-#define outb(val,port) \ +-((__builtin_constant_p((port)) && (port) < 256) ? \ +- __outbc((val),(port)) : \ +- __outb((val),(port))) +- +-#define inb(port) \ +-((__builtin_constant_p((port)) && (port) < 256) ? \ +- __inbc(port) : \ +- __inb(port)) +- +-#define outb_p(val,port) \ +-((__builtin_constant_p((port)) && (port) < 256) ? \ +- __outbc_p((val),(port)) : \ +- __outb_p((val),(port))) +- +-#define inb_p(port) \ +-((__builtin_constant_p((port)) && (port) < 256) ? \ +- __inbc_p(port) : \ +- __inb_p(port)) +- +-#define outw(val,port) \ +-((__builtin_constant_p((port)) && (port) < 256) ? \ +- __outwc((val),(port)) : \ +- __outw((val),(port))) +- +-#define inw(port) \ +-((__builtin_constant_p((port)) && (port) < 256) ? \ +- __inwc(port) : \ +- __inw(port)) +- +-#define outw_p(val,port) \ +-((__builtin_constant_p((port)) && (port) < 256) ? \ +- __outwc_p((val),(port)) : \ +- __outw_p((val),(port))) +- +-#define inw_p(port) \ +-((__builtin_constant_p((port)) && (port) < 256) ? \ +- __inwc_p(port) : \ +- __inw_p(port)) +- +-#define outl(val,port) \ +-((__builtin_constant_p((port)) && (port) < 256) ? \ +- __outlc((val),(port)) : \ +- __outl((val),(port))) +- +-#define inl(port) \ +-((__builtin_constant_p((port)) && (port) < 256) ? \ +- __inlc(port) : \ +- __inl(port)) +- +-#define outl_p(val,port) \ +-((__builtin_constant_p((port)) && (port) < 256) ? \ +- __outlc_p((val),(port)) : \ +- __outl_p((val),(port))) +- +-#define inl_p(port) \ +-((__builtin_constant_p((port)) && (port) < 256) ? \ +- __inlc_p(port) : \ +- __inl_p(port)) +- +-#endif +diff -Naur grub-0.97.orig/netboot/linux-asm-string.h grub-0.97/netboot/linux-asm-string.h +--- grub-0.97.orig/netboot/linux-asm-string.h 2003-07-09 11:45:37.000000000 +0000 ++++ grub-0.97/netboot/linux-asm-string.h 1970-01-01 00:00:00.000000000 +0000 +@@ -1,291 +0,0 @@ +-/* +- * Taken from Linux /usr/include/asm/string.h +- * All except memcpy, memmove, memset and memcmp removed. +- */ +- +-#ifndef _I386_STRING_H_ +-#define _I386_STRING_H_ +- +-/* +- * This string-include defines all string functions as inline +- * functions. Use gcc. It also assumes ds=es=data space, this should be +- * normal. Most of the string-functions are rather heavily hand-optimized, +- * see especially strtok,strstr,str[c]spn. They should work, but are not +- * very easy to understand. Everything is done entirely within the register +- * set, making the functions fast and clean. String instructions have been +- * used through-out, making for "slightly" unclear code :-) +- * +- * NO Copyright (C) 1991, 1992 Linus Torvalds, +- * consider these trivial functions to be PD. +- */ +- +-typedef int size_t; +- +-extern void *__memcpy(void * to, const void * from, size_t n); +-extern void *__constant_memcpy(void * to, const void * from, size_t n); +-extern void *memmove(void * dest,const void * src, size_t n); +-extern void *__memset_generic(void * s, char c,size_t count); +-extern void *__constant_c_memset(void * s, unsigned long c, size_t count); +-extern void *__constant_c_and_count_memset(void * s, unsigned long pattern, size_t count); +- +- +-extern inline void * __memcpy(void * to, const void * from, size_t n) +-{ +-int d0, d1, d2; +-__asm__ __volatile__( +- "cld\n\t" +- "rep ; movsl\n\t" +- "testb $2,%b4\n\t" +- "je 1f\n\t" +- "movsw\n" +- "1:\ttestb $1,%b4\n\t" +- "je 2f\n\t" +- "movsb\n" +- "2:" +- : "=&c" (d0), "=&D" (d1), "=&S" (d2) +- :"0" (n/4), "q" (n),"1" ((long) to),"2" ((long) from) +- : "memory"); +-return (to); +-} +- +-/* +- * This looks horribly ugly, but the compiler can optimize it totally, +- * as the count is constant. +- */ +-extern inline void * __constant_memcpy(void * to, const void * from, size_t n) +-{ +- switch (n) { +- case 0: +- return to; +- case 1: +- *(unsigned char *)to = *(const unsigned char *)from; +- return to; +- case 2: +- *(unsigned short *)to = *(const unsigned short *)from; +- return to; +- case 3: +- *(unsigned short *)to = *(const unsigned short *)from; +- *(2+(unsigned char *)to) = *(2+(const unsigned char *)from); +- return to; +- case 4: +- *(unsigned long *)to = *(const unsigned long *)from; +- return to; +- case 6: /* for Ethernet addresses */ +- *(unsigned long *)to = *(const unsigned long *)from; +- *(2+(unsigned short *)to) = *(2+(const unsigned short *)from); +- return to; +- case 8: +- *(unsigned long *)to = *(const unsigned long *)from; +- *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); +- return to; +- case 12: +- *(unsigned long *)to = *(const unsigned long *)from; +- *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); +- *(2+(unsigned long *)to) = *(2+(const unsigned long *)from); +- return to; +- case 16: +- *(unsigned long *)to = *(const unsigned long *)from; +- *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); +- *(2+(unsigned long *)to) = *(2+(const unsigned long *)from); +- *(3+(unsigned long *)to) = *(3+(const unsigned long *)from); +- return to; +- case 20: +- *(unsigned long *)to = *(const unsigned long *)from; +- *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); +- *(2+(unsigned long *)to) = *(2+(const unsigned long *)from); +- *(3+(unsigned long *)to) = *(3+(const unsigned long *)from); +- *(4+(unsigned long *)to) = *(4+(const unsigned long *)from); +- return to; +- } +-#define COMMON(x) \ +-__asm__ __volatile__( \ +- "cld\n\t" \ +- "rep ; movsl" \ +- x \ +- : "=&c" (d0), "=&D" (d1), "=&S" (d2) \ +- : "0" (n/4),"1" ((long) to),"2" ((long) from) \ +- : "memory"); +-{ +- int d0, d1, d2; +- switch (n % 4) { +- case 0: COMMON(""); return to; +- case 1: COMMON("\n\tmovsb"); return to; +- case 2: COMMON("\n\tmovsw"); return to; +- default: COMMON("\n\tmovsw\n\tmovsb"); return to; +- } +-} +- +-#undef COMMON +-} +- +-#define __HAVE_ARCH_MEMCPY +-#define memcpy(t, f, n) \ +-(__builtin_constant_p(n) ? \ +- __constant_memcpy((t),(f),(n)) : \ +- __memcpy((t),(f),(n))) +- +-#define __HAVE_ARCH_MEMMOVE +-extern inline void * memmove(void * dest,const void * src, size_t n) +-{ +-int d0, d1, d2; +-if (dest +-#include +- +-/* #define DEBUG 1 */ +- +-struct arptable_t arptable[MAX_ARP]; +- +-/* Set if the user pushes Control-C. */ +-int ip_abort = 0; +-/* Set if an ethernet card is probed and IP addresses are set. */ +-int network_ready = 0; +- +-struct rom_info rom; +- +-static int vendorext_isvalid; +-static unsigned long netmask; +-static struct bootpd_t bootp_data; +-static unsigned long xid; +-static unsigned char *end_of_rfc1533 = NULL; +- +-#ifndef NO_DHCP_SUPPORT +-#endif /* NO_DHCP_SUPPORT */ +- +-/* äEth */ +-static unsigned char vendorext_magic[] = {0xE4, 0x45, 0x74, 0x68}; +-static const unsigned char broadcast[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; +- +-#ifdef NO_DHCP_SUPPORT +- +-static unsigned char rfc1533_cookie[5] = {RFC1533_COOKIE, RFC1533_END}; +- +-#else /* ! NO_DHCP_SUPPORT */ +- +-static int dhcp_reply; +-static in_addr dhcp_server = {0L}; +-static in_addr dhcp_addr = {0L}; +-static unsigned char rfc1533_cookie[] = {RFC1533_COOKIE}; +-static unsigned char rfc1533_end[] = {RFC1533_END}; +- +-static const unsigned char dhcpdiscover[] = +-{ +- RFC2132_MSG_TYPE, 1, DHCPDISCOVER, +- RFC2132_MAX_SIZE,2, /* request as much as we can */ +- ETH_MAX_MTU / 256, ETH_MAX_MTU % 256, +- RFC2132_PARAM_LIST, 4, RFC1533_NETMASK, RFC1533_GATEWAY, +- RFC1533_HOSTNAME, RFC1533_EXTENSIONPATH +-}; +- +-static const unsigned char dhcprequest[] = +-{ +- RFC2132_MSG_TYPE, 1, DHCPREQUEST, +- RFC2132_SRV_ID, 4, 0, 0, 0, 0, +- RFC2132_REQ_ADDR, 4, 0, 0, 0, 0, +- RFC2132_MAX_SIZE, 2, /* request as much as we can */ +- ETH_MAX_MTU / 256, ETH_MAX_MTU % 256, +- /* request parameters */ +- RFC2132_PARAM_LIST, +- /* 4 standard + 2 vendortags */ +- 4 + 2, +- /* Standard parameters */ +- RFC1533_NETMASK, RFC1533_GATEWAY, +- RFC1533_HOSTNAME, RFC1533_EXTENSIONPATH, +- /* Etherboot vendortags */ +- RFC1533_VENDOR_MAGIC, +- RFC1533_VENDOR_CONFIGFILE, +-}; +- +-#endif /* ! NO_DHCP_SUPPORT */ +- +-static unsigned short ipchksum (unsigned short *ip, int len); +-static unsigned short udpchksum (struct iphdr *packet); +- +-void +-print_network_configuration (void) +-{ +- if (! eth_probe ()) +- grub_printf ("No ethernet card found.\n"); +- else if (! network_ready) +- grub_printf ("Not initialized yet.\n"); +- else +- { +- etherboot_printf ("Address: %@\n", arptable[ARP_CLIENT].ipaddr.s_addr); +- etherboot_printf ("Netmask: %@\n", netmask); +- etherboot_printf ("Server: %@\n", arptable[ARP_SERVER].ipaddr.s_addr); +- etherboot_printf ("Gateway: %@\n", arptable[ARP_GATEWAY].ipaddr.s_addr); +- } +-} +- +- +-/************************************************************************** +-DEFAULT_NETMASK - Return default netmask for IP address +-**************************************************************************/ +-static inline unsigned long +-default_netmask (void) +-{ +- int net = ntohl (arptable[ARP_CLIENT].ipaddr.s_addr) >> 24; +- if (net <= 127) +- return (htonl (0xff000000)); +- else if (net < 192) +- return (htonl (0xffff0000)); +- else +- return (htonl (0xffffff00)); +-} +- +-/* ifconfig - configure network interface. */ +-int +-ifconfig (char *ip, char *sm, char *gw, char *svr) +-{ +- in_addr tmp; +- +- if (sm) +- { +- if (! inet_aton (sm, &tmp)) +- return 0; +- +- netmask = tmp.s_addr; +- } +- +- if (ip) +- { +- if (! inet_aton (ip, &arptable[ARP_CLIENT].ipaddr)) +- return 0; +- +- if (! netmask && ! sm) +- netmask = default_netmask (); +- } +- +- if (gw && ! inet_aton (gw, &arptable[ARP_GATEWAY].ipaddr)) +- return 0; +- +- /* Clear out the ARP entry. */ +- grub_memset (arptable[ARP_GATEWAY].node, 0, ETH_ALEN); +- +- if (svr && ! inet_aton (svr, &arptable[ARP_SERVER].ipaddr)) +- return 0; +- +- /* Likewise. */ +- grub_memset (arptable[ARP_SERVER].node, 0, ETH_ALEN); +- +- if (ip || sm) +- { +- if (IP_BROADCAST == (netmask | arptable[ARP_CLIENT].ipaddr.s_addr) +- || netmask == (netmask | arptable[ARP_CLIENT].ipaddr.s_addr) +- || ! netmask) +- network_ready = 0; +- else +- network_ready = 1; +- } +- +- return 1; +-} +- +- +-/************************************************************************** +-UDP_TRANSMIT - Send a UDP datagram +-**************************************************************************/ +-int +-udp_transmit (unsigned long destip, unsigned int srcsock, +- unsigned int destsock, int len, const void *buf) +-{ +- struct iphdr *ip; +- struct udphdr *udp; +- struct arprequest arpreq; +- int arpentry, i; +- int retry; +- +- ip = (struct iphdr *) buf; +- udp = (struct udphdr *) ((unsigned long) buf + sizeof (struct iphdr)); +- ip->verhdrlen = 0x45; +- ip->service = 0; +- ip->len = htons (len); +- ip->ident = 0; +- ip->frags = 0; +- ip->ttl = 60; +- ip->protocol = IP_UDP; +- ip->chksum = 0; +- ip->src.s_addr = arptable[ARP_CLIENT].ipaddr.s_addr; +- ip->dest.s_addr = destip; +- ip->chksum = ipchksum ((unsigned short *) buf, sizeof (struct iphdr)); +- udp->src = htons (srcsock); +- udp->dest = htons (destsock); +- udp->len = htons (len - sizeof (struct iphdr)); +- udp->chksum = 0; +- udp->chksum = htons (udpchksum (ip)); +- +- if (udp->chksum == 0) +- udp->chksum = 0xffff; +- +- if (destip == IP_BROADCAST) +- { +- eth_transmit (broadcast, IP, len, buf); +- } +- else +- { +- if (((destip & netmask) +- != (arptable[ARP_CLIENT].ipaddr.s_addr & netmask)) +- && arptable[ARP_GATEWAY].ipaddr.s_addr) +- destip = arptable[ARP_GATEWAY].ipaddr.s_addr; +- +- for (arpentry = 0; arpentry < MAX_ARP; arpentry++) +- if (arptable[arpentry].ipaddr.s_addr == destip) +- break; +- +- if (arpentry == MAX_ARP) +- { +- etherboot_printf ("%@ is not in my arp table!\n", destip); +- return 0; +- } +- +- for (i = 0; i < ETH_ALEN; i++) +- if (arptable[arpentry].node[i]) +- break; +- +- if (i == ETH_ALEN) +- { +- /* Need to do arp request. */ +-#ifdef DEBUG +- grub_printf ("arp request.\n"); +-#endif +- arpreq.hwtype = htons (1); +- arpreq.protocol = htons (IP); +- arpreq.hwlen = ETH_ALEN; +- arpreq.protolen = 4; +- arpreq.opcode = htons (ARP_REQUEST); +- grub_memmove (arpreq.shwaddr, arptable[ARP_CLIENT].node, +- ETH_ALEN); +- grub_memmove (arpreq.sipaddr, (char *) &arptable[ARP_CLIENT].ipaddr, +- sizeof (in_addr)); +- grub_memset (arpreq.thwaddr, 0, ETH_ALEN); +- grub_memmove (arpreq.tipaddr, (char *) &destip, sizeof (in_addr)); +- +- for (retry = 1; retry <= MAX_ARP_RETRIES; retry++) +- { +- long timeout; +- +- eth_transmit (broadcast, ARP, sizeof (arpreq), &arpreq); +- timeout = rfc2131_sleep_interval (TIMEOUT, retry); +- +- if (await_reply (AWAIT_ARP, arpentry, arpreq.tipaddr, timeout)) +- goto xmit; +- +- if (ip_abort) +- return 0; +- } +- +- return 0; +- } +- +- xmit: +- eth_transmit (arptable[arpentry].node, IP, len, buf); +- } +- +- return 1; +-} +- +-/************************************************************************** +-TFTP - Download extended BOOTP data, or kernel image +-**************************************************************************/ +-static int +-tftp (const char *name, int (*fnc) (unsigned char *, int, int, int)) +-{ +- int retry = 0; +- static unsigned short iport = 2000; +- unsigned short oport = 0; +- unsigned short len, block = 0, prevblock = 0; +- int bcounter = 0; +- struct tftp_t *tr; +- struct tftpreq_t tp; +- int rc; +- int packetsize = TFTP_DEFAULTSIZE_PACKET; +- +- /* Clear out the Rx queue first. It contains nothing of interest, +- * except possibly ARP requests from the DHCP/TFTP server. We use +- * polling throughout Etherboot, so some time may have passed since we +- * last polled the receive queue, which may now be filled with +- * broadcast packets. This will cause the reply to the packets we are +- * about to send to be lost immediately. Not very clever. */ +- await_reply (AWAIT_QDRAIN, 0, NULL, 0); +- +- tp.opcode = htons (TFTP_RRQ); +- len = (grub_sprintf ((char *) tp.u.rrq, "%s%coctet%cblksize%c%d", +- name, 0, 0, 0, TFTP_MAX_PACKET) +- + sizeof (tp.ip) + sizeof (tp.udp) + sizeof (tp.opcode) + 1); +- if (! udp_transmit (arptable[ARP_SERVER].ipaddr.s_addr, ++iport, +- TFTP_PORT, len, &tp)) +- return 0; +- +- for (;;) +- { +- long timeout; +- +-#ifdef CONGESTED +- timeout = rfc2131_sleep_interval (block ? TFTP_REXMT : TIMEOUT, retry); +-#else +- timeout = rfc2131_sleep_interval (TIMEOUT, retry); +-#endif +- +- if (! await_reply (AWAIT_TFTP, iport, NULL, timeout)) +- { +- if (! block && retry++ < MAX_TFTP_RETRIES) +- { +- /* Maybe initial request was lost. */ +- if (! udp_transmit (arptable[ARP_SERVER].ipaddr.s_addr, +- ++iport, TFTP_PORT, len, &tp)) +- return 0; +- +- continue; +- } +- +-#ifdef CONGESTED +- if (block && ((retry += TFTP_REXMT) < TFTP_TIMEOUT)) +- { +- /* We resend our last ack. */ +-#ifdef MDEBUG +- grub_printf ("\n"); +-#endif +- udp_transmit (arptable[ARP_SERVER].ipaddr.s_addr, +- iport, oport, +- TFTP_MIN_PACKET, &tp); +- continue; +- } +-#endif +- /* Timeout. */ +- break; +- } +- +- tr = (struct tftp_t *) &nic.packet[ETH_HLEN]; +- if (tr->opcode == ntohs (TFTP_ERROR)) +- { +- grub_printf ("TFTP error %d (%s)\n", +- ntohs (tr->u.err.errcode), +- tr->u.err.errmsg); +- break; +- } +- +- if (tr->opcode == ntohs (TFTP_OACK)) +- { +- char *p = tr->u.oack.data, *e; +- +- /* Shouldn't happen. */ +- if (prevblock) +- /* Ignore it. */ +- continue; +- +- len = ntohs (tr->udp.len) - sizeof (struct udphdr) - 2; +- if (len > TFTP_MAX_PACKET) +- goto noak; +- +- e = p + len; +- while (*p != '\000' && p < e) +- { +- if (! grub_strcmp ("blksize", p)) +- { +- p += 8; +- if ((packetsize = getdec (&p)) < TFTP_DEFAULTSIZE_PACKET) +- goto noak; +- +- while (p < e && *p) +- p++; +- +- if (p < e) +- p++; +- } +- else +- { +- noak: +- tp.opcode = htons (TFTP_ERROR); +- tp.u.err.errcode = 8; +- len = (grub_sprintf ((char *) tp.u.err.errmsg, +- "RFC1782 error") +- + sizeof (tp.ip) + sizeof (tp.udp) +- + sizeof (tp.opcode) + sizeof (tp.u.err.errcode) +- + 1); +- udp_transmit (arptable[ARP_SERVER].ipaddr.s_addr, +- iport, ntohs (tr->udp.src), +- len, &tp); +- return 0; +- } +- } +- +- if (p > e) +- goto noak; +- +- /* This ensures that the packet does not get processed as data! */ +- block = tp.u.ack.block = 0; +- } +- else if (tr->opcode == ntohs (TFTP_DATA)) +- { +- len = ntohs (tr->udp.len) - sizeof (struct udphdr) - 4; +- /* Shouldn't happen. */ +- if (len > packetsize) +- /* Ignore it. */ +- continue; +- +- block = ntohs (tp.u.ack.block = tr->u.data.block); +- } +- else +- /* Neither TFTP_OACK nor TFTP_DATA. */ +- break; +- +- if ((block || bcounter) && (block != prevblock + 1)) +- /* Block order should be continuous */ +- tp.u.ack.block = htons (block = prevblock); +- +- /* Should be continuous. */ +- tp.opcode = htons (TFTP_ACK); +- oport = ntohs (tr->udp.src); +- /* Ack. */ +- udp_transmit (arptable[ARP_SERVER].ipaddr.s_addr, iport, +- oport, TFTP_MIN_PACKET, &tp); +- +- if ((unsigned short) (block - prevblock) != 1) +- /* Retransmission or OACK, don't process via callback +- * and don't change the value of prevblock. */ +- continue; +- +- prevblock = block; +- /* Is it the right place to zero the timer? */ +- retry = 0; +- +- if ((rc = fnc (tr->u.data.download, +- ++bcounter, len, len < packetsize)) >= 0) +- return rc; +- +- /* End of data. */ +- if (len < packetsize) +- return 1; +- } +- +- return 0; +-} +- +-/************************************************************************** +-RARP - Get my IP address and load information +-**************************************************************************/ +-int +-rarp (void) +-{ +- int retry; +- +- /* arp and rarp requests share the same packet structure. */ +- struct arprequest rarpreq; +- +- /* Make sure that an ethernet is probed. */ +- if (! eth_probe ()) +- return 0; +- +- /* Clear the ready flag. */ +- network_ready = 0; +- +- grub_memset (&rarpreq, 0, sizeof (rarpreq)); +- +- rarpreq.hwtype = htons (1); +- rarpreq.protocol = htons (IP); +- rarpreq.hwlen = ETH_ALEN; +- rarpreq.protolen = 4; +- rarpreq.opcode = htons (RARP_REQUEST); +- grub_memmove ((char *) &rarpreq.shwaddr, arptable[ARP_CLIENT].node, +- ETH_ALEN); +- /* sipaddr is already zeroed out */ +- grub_memmove ((char *) &rarpreq.thwaddr, arptable[ARP_CLIENT].node, +- ETH_ALEN); +- /* tipaddr is already zeroed out */ +- +- for (retry = 0; retry < MAX_ARP_RETRIES; ++retry) +- { +- long timeout; +- +- eth_transmit (broadcast, RARP, sizeof (rarpreq), &rarpreq); +- +- timeout = rfc2131_sleep_interval (TIMEOUT, retry); +- if (await_reply (AWAIT_RARP, 0, rarpreq.shwaddr, timeout)) +- break; +- +- if (ip_abort) +- return 0; +- } +- +- if (retry < MAX_ARP_RETRIES) +- { +- network_ready = 1; +- return 1; +- } +- +- return 0; +-} +- +-/************************************************************************** +-BOOTP - Get my IP address and load information +-**************************************************************************/ +-int +-bootp (void) +-{ +- int retry; +-#ifndef NO_DHCP_SUPPORT +- int reqretry; +-#endif /* ! NO_DHCP_SUPPORT */ +- struct bootpip_t ip; +- unsigned long starttime; +- +- /* Make sure that an ethernet is probed. */ +- if (! eth_probe ()) +- return 0; +- +- /* Clear the ready flag. */ +- network_ready = 0; +- +-#ifdef DEBUG +- grub_printf ("network is ready.\n"); +-#endif +- +- grub_memset (&ip, 0, sizeof (struct bootpip_t)); +- ip.bp.bp_op = BOOTP_REQUEST; +- ip.bp.bp_htype = 1; +- ip.bp.bp_hlen = ETH_ALEN; +- starttime = currticks (); +- /* Use lower 32 bits of node address, more likely to be +- distinct than the time since booting */ +- grub_memmove (&xid, &arptable[ARP_CLIENT].node[2], sizeof(xid)); +- ip.bp.bp_xid = xid += htonl (starttime); +- grub_memmove (ip.bp.bp_hwaddr, arptable[ARP_CLIENT].node, ETH_ALEN); +-#ifdef DEBUG +- etherboot_printf ("bp_op = %d\n", ip.bp.bp_op); +- etherboot_printf ("bp_htype = %d\n", ip.bp.bp_htype); +- etherboot_printf ("bp_hlen = %d\n", ip.bp.bp_hlen); +- etherboot_printf ("bp_xid = %d\n", ip.bp.bp_xid); +- etherboot_printf ("bp_hwaddr = %!\n", ip.bp.bp_hwaddr); +- etherboot_printf ("bp_hops = %d\n", (int) ip.bp.bp_hops); +- etherboot_printf ("bp_secs = %d\n", (int) ip.bp.bp_hwaddr); +-#endif +- +-#ifdef NO_DHCP_SUPPORT +- /* Request RFC-style options. */ +- grub_memmove (ip.bp.bp_vend, rfc1533_cookie, 5); +-#else +- /* Request RFC-style options. */ +- grub_memmove (ip.bp.bp_vend, rfc1533_cookie, sizeof rfc1533_cookie); +- grub_memmove (ip.bp.bp_vend + sizeof rfc1533_cookie, dhcpdiscover, +- sizeof dhcpdiscover); +- grub_memmove (ip.bp.bp_vend + sizeof rfc1533_cookie + sizeof dhcpdiscover, +- rfc1533_end, sizeof rfc1533_end); +-#endif /* ! NO_DHCP_SUPPORT */ +- +- for (retry = 0; retry < MAX_BOOTP_RETRIES;) +- { +- long timeout; +- +-#ifdef DEBUG +- grub_printf ("retry = %d\n", retry); +-#endif +- +- /* Clear out the Rx queue first. It contains nothing of +- * interest, except possibly ARP requests from the DHCP/TFTP +- * server. We use polling throughout Etherboot, so some time +- * may have passed since we last polled the receive queue, +- * which may now be filled with broadcast packets. This will +- * cause the reply to the packets we are about to send to be +- * lost immediately. Not very clever. */ +- await_reply (AWAIT_QDRAIN, 0, NULL, 0); +- +- udp_transmit (IP_BROADCAST, BOOTP_CLIENT, BOOTP_SERVER, +- sizeof (struct bootpip_t), &ip); +- timeout = rfc2131_sleep_interval (TIMEOUT, retry++); +-#ifdef NO_DHCP_SUPPORT +- if (await_reply (AWAIT_BOOTP, 0, NULL, timeout)) +- { +- network_ready = 1; +- return 1; +- } +-#else /* ! NO_DHCP_SUPPORT */ +- if (await_reply (AWAIT_BOOTP, 0, NULL, timeout)) +- { +- if (dhcp_reply != DHCPOFFER) +- { +- network_ready = 1; +- return 1; +- } +- +- dhcp_reply = 0; +-#ifdef DEBUG +- etherboot_printf ("bp_op = %d\n", (int) ip.bp.bp_op); +- etherboot_printf ("bp_htype = %d\n", (int) ip.bp.bp_htype); +- etherboot_printf ("bp_hlen = %d\n", (int) ip.bp.bp_hlen); +- etherboot_printf ("bp_xid = %d\n", (int) ip.bp.bp_xid); +- etherboot_printf ("bp_hwaddr = %!\n", ip.bp.bp_hwaddr); +- etherboot_printf ("bp_hops = %d\n", (int) ip.bp.bp_hops); +- etherboot_printf ("bp_secs = %d\n", (int) ip.bp.bp_hwaddr); +-#endif +- grub_memmove (ip.bp.bp_vend, rfc1533_cookie, sizeof rfc1533_cookie); +- grub_memmove (ip.bp.bp_vend + sizeof rfc1533_cookie, +- dhcprequest, sizeof dhcprequest); +- grub_memmove (ip.bp.bp_vend + sizeof rfc1533_cookie +- + sizeof dhcprequest, +- rfc1533_end, sizeof rfc1533_end); +- grub_memmove (ip.bp.bp_vend + 9, (char *) &dhcp_server, +- sizeof (in_addr)); +- grub_memmove (ip.bp.bp_vend + 15, (char *) &dhcp_addr, +- sizeof (in_addr)); +-#ifdef DEBUG +- grub_printf ("errnum = %d\n", errnum); +-#endif +- for (reqretry = 0; reqretry < MAX_BOOTP_RETRIES;) +- { +- int ret; +-#ifdef DEBUG +- grub_printf ("reqretry = %d\n", reqretry); +-#endif +- +- ret = udp_transmit (IP_BROADCAST, BOOTP_CLIENT, BOOTP_SERVER, +- sizeof (struct bootpip_t), &ip); +- if (! ret) +- grub_printf ("udp_transmit failed.\n"); +- +- dhcp_reply = 0; +- timeout = rfc2131_sleep_interval (TIMEOUT, reqretry++); +- if (await_reply (AWAIT_BOOTP, 0, NULL, timeout)) +- if (dhcp_reply == DHCPACK) +- { +- network_ready = 1; +- return 1; +- } +- +-#ifdef DEBUG +- grub_printf ("dhcp_reply = %d\n", dhcp_reply); +-#endif +- +- if (ip_abort) +- return 0; +- } +- } +-#endif /* ! NO_DHCP_SUPPORT */ +- +- if (ip_abort) +- return 0; +- +- ip.bp.bp_secs = htons ((currticks () - starttime) / TICKS_PER_SEC); +- } +- +- /* Timeout. */ +- return 0; +-} +- +-/************************************************************************** +-UDPCHKSUM - Checksum UDP Packet (one of the rare cases when assembly is +- actually simpler...) +- RETURNS: checksum, 0 on checksum error. This +- allows for using the same routine for RX and TX summing: +- RX if (packet->udp.chksum && udpchksum(packet)) +- error("checksum error"); +- TX packet->udp.chksum=0; +- if (0==(packet->udp.chksum=udpchksum(packet))) +- packet->upd.chksum=0xffff; +-**************************************************************************/ +-static inline void +-dosum (unsigned short *start, unsigned int len, unsigned short *sum) +-{ +- __asm__ __volatile__ +- ("clc\n" +- "1:\tlodsw\n\t" +- "xchg %%al,%%ah\n\t" /* convert to host byte order */ +- "adcw %%ax,%0\n\t" /* add carry of previous iteration */ +- "loop 1b\n\t" +- "adcw $0,%0" /* add carry of last iteration */ +- : "=b" (*sum), "=S"(start), "=c"(len) +- : "0"(*sum), "1"(start), "2"(len) +- : "ax", "cc" +- ); +-} +- +-/* UDP sum: +- * proto, src_ip, dst_ip, udp_dport, udp_sport, 2*udp_len, payload +- */ +-static unsigned short +-udpchksum (struct iphdr *packet) +-{ +- int len = ntohs (packet->len); +- unsigned short rval; +- +- /* add udplength + protocol number */ +- rval = (len - sizeof (struct iphdr)) + IP_UDP; +- +- /* pad to an even number of bytes */ +- if (len % 2) { +- ((char *) packet)[len++] = 0; +- } +- +- /* sum over src/dst ipaddr + udp packet */ +- len -= (char *) &packet->src - (char *) packet; +- dosum ((unsigned short *) &packet->src, len >> 1, &rval); +- +- /* take one's complement */ +- return ~rval; +-} +- +-/************************************************************************** +-AWAIT_REPLY - Wait until we get a response for our request +-**************************************************************************/ +-int +-await_reply (int type, int ival, void *ptr, int timeout) +-{ +- unsigned long time; +- struct iphdr *ip; +- struct udphdr *udp; +- struct arprequest *arpreply; +- struct bootp_t *bootpreply; +- unsigned short ptype; +- unsigned int protohdrlen = (ETH_HLEN + sizeof (struct iphdr) +- + sizeof (struct udphdr)); +- +- /* Clear the abort flag. */ +- ip_abort = 0; +- +- time = timeout + currticks (); +- /* The timeout check is done below. The timeout is only checked if +- * there is no packet in the Rx queue. This assumes that eth_poll() +- * needs a negligible amount of time. */ +- for (;;) +- { +- if (eth_poll ()) +- { +- /* We have something! */ +- +- /* Check for ARP - No IP hdr. */ +- if (nic.packetlen >= ETH_HLEN) +- { +- ptype = (((unsigned short) nic.packet[12]) << 8 +- | ((unsigned short) nic.packet[13])); +- } +- else +- /* What else could we do with it? */ +- continue; +- +- if (nic.packetlen >= ETH_HLEN + sizeof (struct arprequest) +- && ptype == ARP) +- { +- unsigned long tmp; +- +- arpreply = (struct arprequest *) &nic.packet[ETH_HLEN]; +- +- if (arpreply->opcode == htons (ARP_REPLY) +- && ! grub_memcmp (arpreply->sipaddr, ptr, sizeof (in_addr)) +- && type == AWAIT_ARP) +- { +- grub_memmove ((char *) arptable[ival].node, +- arpreply->shwaddr, +- ETH_ALEN); +- return 1; +- } +- +- grub_memmove ((char *) &tmp, arpreply->tipaddr, +- sizeof (in_addr)); +- +- if (arpreply->opcode == htons (ARP_REQUEST) +- && tmp == arptable[ARP_CLIENT].ipaddr.s_addr) +- { +- arpreply->opcode = htons (ARP_REPLY); +- grub_memmove (arpreply->tipaddr, arpreply->sipaddr, +- sizeof (in_addr)); +- grub_memmove (arpreply->thwaddr, (char *) arpreply->shwaddr, +- ETH_ALEN); +- grub_memmove (arpreply->sipaddr, +- (char *) &arptable[ARP_CLIENT].ipaddr, +- sizeof (in_addr)); +- grub_memmove (arpreply->shwaddr, +- arptable[ARP_CLIENT].node, +- ETH_ALEN); +- eth_transmit (arpreply->thwaddr, ARP, +- sizeof (struct arprequest), +- arpreply); +-#ifdef MDEBUG +- grub_memmove (&tmp, arpreply->tipaddr, sizeof (in_addr)); +- etherboot_printf ("Sent ARP reply to: %@\n", tmp); +-#endif /* MDEBUG */ +- } +- +- continue; +- } +- +- if (type == AWAIT_QDRAIN) +- continue; +- +- /* Check for RARP - No IP hdr. */ +- if (type == AWAIT_RARP +- && nic.packetlen >= ETH_HLEN + sizeof (struct arprequest) +- && ptype == RARP) +- { +- arpreply = (struct arprequest *) &nic.packet[ETH_HLEN]; +- +- if (arpreply->opcode == htons (RARP_REPLY) +- && ! grub_memcmp (arpreply->thwaddr, ptr, ETH_ALEN)) +- { +- grub_memmove ((char *) arptable[ARP_SERVER].node, +- arpreply->shwaddr, ETH_ALEN); +- grub_memmove ((char *) &arptable[ARP_SERVER].ipaddr, +- arpreply->sipaddr, sizeof (in_addr)); +- grub_memmove ((char *) &arptable[ARP_CLIENT].ipaddr, +- arpreply->tipaddr, sizeof (in_addr)); +- return 1; +- } +- +- continue; +- } +- +- /* Anything else has IP header. */ +- if (nic.packetlen < protohdrlen || ptype != IP) +- continue; +- +- ip = (struct iphdr *) &nic.packet[ETH_HLEN]; +- if (ip->verhdrlen != 0x45 +- || ipchksum ((unsigned short *) ip, sizeof (struct iphdr)) +- || ip->protocol != IP_UDP) +- continue; +- +- /* +- - Till Straumann +- added udp checksum (safer on a wireless link) +- added fragmentation check: I had a corrupted image +- in memory due to fragmented TFTP packets - took me +- 3 days to find the cause for this :-( +- */ +- +- /* If More Fragments bit and Fragment Offset field +- are non-zero then packet is fragmented */ +- if (ip->frags & htons(0x3FFF)) +- { +- grub_printf ("ALERT: got a fragmented packet - reconfigure your server\n"); +- continue; +- } +- +- udp = (struct udphdr *) &nic.packet[(ETH_HLEN +- + sizeof (struct iphdr))]; +- if (udp->chksum && udpchksum (ip)) +- { +- grub_printf ("UDP checksum error\n"); +- continue; +- } +- +- /* BOOTP ? */ +- bootpreply = (struct bootp_t *) +- &nic.packet[(ETH_HLEN + sizeof (struct iphdr) +- + sizeof (struct udphdr))]; +- if (type == AWAIT_BOOTP +-#ifdef NO_DHCP_SUPPORT +- && (nic.packetlen +- >= (ETH_HLEN + sizeof (struct bootp_t) - BOOTP_VENDOR_LEN)) +-#else +- && (nic.packetlen +- >= (ETH_HLEN + sizeof (struct bootp_t) - DHCP_OPT_LEN)) +-#endif /* ! NO_DHCP_SUPPORT */ +- && udp->dest == htons (BOOTP_CLIENT) +- && bootpreply->bp_op == BOOTP_REPLY +- && bootpreply->bp_xid == xid +- && (! grub_memcmp (broadcast, bootpreply->bp_hwaddr, ETH_ALEN) +- || ! grub_memcmp (arptable[ARP_CLIENT].node, +- bootpreply->bp_hwaddr, ETH_ALEN))) +- { +-#ifdef DEBUG +- grub_printf ("BOOTP packet was received.\n"); +-#endif +- arptable[ARP_CLIENT].ipaddr.s_addr +- = bootpreply->bp_yiaddr.s_addr; +-#ifndef NO_DHCP_SUPPORT +- dhcp_addr.s_addr = bootpreply->bp_yiaddr.s_addr; +-#ifdef DEBUG +- etherboot_printf ("dhcp_addr = %@\n", dhcp_addr.s_addr); +-#endif +-#endif /* ! NO_DHCP_SUPPORT */ +- netmask = default_netmask (); +- arptable[ARP_SERVER].ipaddr.s_addr +- = bootpreply->bp_siaddr.s_addr; +- /* Kill arp. */ +- grub_memset (arptable[ARP_SERVER].node, 0, ETH_ALEN); +- arptable[ARP_GATEWAY].ipaddr.s_addr +- = bootpreply->bp_giaddr.s_addr; +- /* Kill arp. */ +- grub_memset (arptable[ARP_GATEWAY].node, 0, ETH_ALEN); +- +- grub_memmove ((char *) BOOTP_DATA_ADDR, (char *) bootpreply, +- sizeof (struct bootpd_t)); +-#ifdef NO_DHCP_SUPPORT +- decode_rfc1533 (BOOTP_DATA_ADDR->bootp_reply.bp_vend, +- 0, BOOTP_VENDOR_LEN + MAX_BOOTP_EXTLEN, 1); +-#else +- decode_rfc1533 (BOOTP_DATA_ADDR->bootp_reply.bp_vend, +- 0, DHCP_OPT_LEN + MAX_BOOTP_EXTLEN, 1); +-#endif /* ! NO_DHCP_SUPPORT */ +- +- return 1; +- } +- +- /* TFTP ? */ +- if (type == AWAIT_TFTP && ntohs (udp->dest) == ival) +- return 1; +- } +- else +- { +- /* Check for abort key only if the Rx queue is empty - +- * as long as we have something to process, don't +- * assume that something failed. It is unlikely that +- * we have no processing time left between packets. */ +- if (checkkey () != -1 && ASCII_CHAR (getkey ()) == CTRL_C) +- { +- ip_abort = 1; +- return 0; +- } +- +- /* Do the timeout after at least a full queue walk. */ +- if ((timeout == 0) || (currticks() > time)) +- { +- break; +- } +- } +- } +- +- return 0; +-} +- +-/************************************************************************** +-DECODE_RFC1533 - Decodes RFC1533 header +-**************************************************************************/ +-int +-decode_rfc1533 (unsigned char *p, int block, int len, int eof) +-{ +- static unsigned char *extdata = NULL, *extend = NULL; +- unsigned char *extpath = NULL; +- unsigned char *endp; +- +- if (block == 0) +- { +- end_of_rfc1533 = NULL; +- vendorext_isvalid = 0; +- +- if (grub_memcmp (p, rfc1533_cookie, 4)) +- /* no RFC 1533 header found */ +- return 0; +- +- p += 4; +- endp = p + len; +- } +- else +- { +- if (block == 1) +- { +- if (grub_memcmp (p, rfc1533_cookie, 4)) +- /* no RFC 1533 header found */ +- return 0; +- +- p += 4; +- len -= 4; +- } +- +- if (extend + len +- <= ((unsigned char *) +- &(BOOTP_DATA_ADDR->bootp_extension[MAX_BOOTP_EXTLEN]))) +- { +- grub_memmove (extend, p, len); +- extend += len; +- } +- else +- { +- grub_printf ("Overflow in vendor data buffer! Aborting...\n"); +- *extdata = RFC1533_END; +- return 0; +- } +- +- p = extdata; +- endp = extend; +- } +- +- if (! eof) +- return -1; +- +- while (p < endp) +- { +- unsigned char c = *p; +- +- if (c == RFC1533_PAD) +- { +- p++; +- continue; +- } +- else if (c == RFC1533_END) +- { +- end_of_rfc1533 = endp = p; +- continue; +- } +- else if (c == RFC1533_NETMASK) +- { +- grub_memmove ((char *) &netmask, p + 2, sizeof (in_addr)); +- } +- else if (c == RFC1533_GATEWAY) +- { +- /* This is a little simplistic, but it will +- usually be sufficient. +- Take only the first entry. */ +- if (TAG_LEN (p) >= sizeof (in_addr)) +- grub_memmove ((char *) &arptable[ARP_GATEWAY].ipaddr, p + 2, +- sizeof (in_addr)); +- } +- else if (c == RFC1533_EXTENSIONPATH) +- extpath = p; +-#ifndef NO_DHCP_SUPPORT +- else if (c == RFC2132_MSG_TYPE) +- { +- dhcp_reply = *(p + 2); +- } +- else if (c == RFC2132_SRV_ID) +- { +- grub_memmove ((char *) &dhcp_server, p + 2, sizeof (in_addr)); +-#ifdef DEBUG +- etherboot_printf ("dhcp_server = %@\n", dhcp_server.s_addr); +-#endif +- } +-#endif /* ! NO_DHCP_SUPPORT */ +- else if (c == RFC1533_VENDOR_MAGIC +- && TAG_LEN(p) >= 6 +- && ! grub_memcmp (p + 2, vendorext_magic, 4) +- && p[6] == RFC1533_VENDOR_MAJOR) +- vendorext_isvalid++; +- /* GRUB now handles its own tag. Get the name of a configuration +- file from the network. Cool... */ +- else if (c == RFC1533_VENDOR_CONFIGFILE) +- { +- int l = TAG_LEN (p); +- +- /* Eliminate the trailing NULs according to RFC 2132. */ +- while (*(p + 2 + l - 1) == '\000' && l > 0) +- l--; +- +- /* XXX: Should check if LEN is less than the maximum length +- of CONFIG_FILE. This kind of robustness will be a goal +- in GRUB 1.0. */ +- grub_memmove (config_file, p + 2, l); +- config_file[l] = 0; +- } +- +- p += TAG_LEN (p) + 2; +- } +- +- extdata = extend = endp; +- +- /* Perhaps we can eliminate this because we doesn't require so +- much information, but I leave this alone. */ +- if (block == 0 && extpath != NULL) +- { +- char fname[64]; +- int fnamelen = TAG_LEN (extpath); +- +- while (*(extpath + 2 + fnamelen - 1) == '\000' && fnamelen > 0) +- fnamelen--; +- +- if (fnamelen + 1 > sizeof (fname)) +- { +- grub_printf ("Too long file name for Extensions Path\n"); +- return 0; +- } +- else if (! fnamelen) +- { +- grub_printf ("Empty file name for Extensions Path\n"); +- return 0; +- } +- +- grub_memmove (fname, extpath + 2, fnamelen); +- fname[fnamelen] = '\000'; +- grub_printf ("Loading BOOTP-extension file: %s\n", fname); +- tftp (fname, decode_rfc1533); +- } +- +- /* Proceed with next block. */ +- return -1; +-} +- +-/************************************************************************** +-IPCHKSUM - Checksum IP Header +-**************************************************************************/ +-static unsigned short +-ipchksum (unsigned short *ip, int len) +-{ +- unsigned long sum = 0; +- len >>= 1; +- while (len--) +- { +- sum += *(ip++); +- if (sum > 0xFFFF) +- sum -= 0xFFFF; +- } +- return (~sum) & 0x0000FFFF; +-} +- +-#define TWO_SECOND_DIVISOR (2147483647l/TICKS_PER_SEC) +- +-/************************************************************************** +-RFC2131_SLEEP_INTERVAL - sleep for expotentially longer times +-**************************************************************************/ +-long +-rfc2131_sleep_interval (int base, int exp) +-{ +- static long seed = 0; +- long q; +- unsigned long tmo; +- +-#ifdef BACKOFF_LIMIT +- if (exp > BACKOFF_LIMIT) +- exp = BACKOFF_LIMIT; +-#endif +- if (!seed) +- /* Initialize linear congruential generator */ +- seed = (currticks () + *((long *) &arptable[ARP_CLIENT].node) +- + ((short *) arptable[ARP_CLIENT].node)[2]); +- /* simplified version of the LCG given in Bruce Schneier's +- "Applied Cryptography" */ +- q = seed / 53668; +- if ((seed = 40014 * (seed - 53668 * q) - 12211 *q ) < 0) +- seed += 2147483563L; +- tmo = (base << exp) + (TICKS_PER_SEC - (seed / TWO_SECOND_DIVISOR)); +- return tmo; +-} +- +-/************************************************************************** +-CLEANUP - shut down networking +-**************************************************************************/ +-void +-cleanup_net (void) +-{ +- if (network_ready) +- { +- /* Stop receiving packets. */ +- eth_disable (); +- network_ready = 0; +- } +-} +diff -Naur grub-0.97.orig/netboot/mii.h grub-0.97/netboot/mii.h +--- grub-0.97.orig/netboot/mii.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/mii.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,105 @@ ++/* ++ * linux/mii.h: definitions for MII-compatible transceivers ++ * Originally drivers/net/sunhme.h. ++ * ++ * Copyright (C) 1996, 1999, 2001 David S. Miller (davem@redhat.com) ++ * ++ * Copied Form Linux 2.4.25 an unneeded items removed by: ++ * Timothy Legge (timlegge at etherboot dot org) ++ * ++ * 03/26/2004 ++ */ ++ ++/* Generic MII registers. */ ++ ++#define MII_BMCR 0x00 /* Basic mode control register */ ++#define MII_BMSR 0x01 /* Basic mode status register */ ++#define MII_PHYSID1 0x02 /* PHYS ID 1 */ ++#define MII_PHYSID2 0x03 /* PHYS ID 2 */ ++#define MII_ADVERTISE 0x04 /* Advertisement control reg */ ++#define MII_LPA 0x05 /* Link partner ability reg */ ++#define MII_EXPANSION 0x06 /* Expansion register */ ++#define MII_DCOUNTER 0x12 /* Disconnect counter */ ++#define MII_FCSCOUNTER 0x13 /* False carrier counter */ ++#define MII_NWAYTEST 0x14 /* N-way auto-neg test reg */ ++#define MII_RERRCOUNTER 0x15 /* Receive error counter */ ++#define MII_SREVISION 0x16 /* Silicon revision */ ++#define MII_RESV1 0x17 /* Reserved... */ ++#define MII_LBRERROR 0x18 /* Lpback, rx, bypass error */ ++#define MII_PHYADDR 0x19 /* PHY address */ ++#define MII_RESV2 0x1a /* Reserved... */ ++#define MII_TPISTATUS 0x1b /* TPI status for 10mbps */ ++#define MII_NCONFIG 0x1c /* Network interface config */ ++ ++/* Basic mode control register. */ ++#define BMCR_RESV 0x007f /* Unused... */ ++#define BMCR_CTST 0x0080 /* Collision test */ ++#define BMCR_FULLDPLX 0x0100 /* Full duplex */ ++#define BMCR_ANRESTART 0x0200 /* Auto negotiation restart */ ++#define BMCR_ISOLATE 0x0400 /* Disconnect DP83840 from MII */ ++#define BMCR_PDOWN 0x0800 /* Powerdown the DP83840 */ ++#define BMCR_ANENABLE 0x1000 /* Enable auto negotiation */ ++#define BMCR_SPEED100 0x2000 /* Select 100Mbps */ ++#define BMCR_LOOPBACK 0x4000 /* TXD loopback bits */ ++#define BMCR_RESET 0x8000 /* Reset the DP83840 */ ++ ++/* Basic mode status register. */ ++#define BMSR_ERCAP 0x0001 /* Ext-reg capability */ ++#define BMSR_JCD 0x0002 /* Jabber detected */ ++#define BMSR_LSTATUS 0x0004 /* Link status */ ++#define BMSR_ANEGCAPABLE 0x0008 /* Able to do auto-negotiation */ ++#define BMSR_RFAULT 0x0010 /* Remote fault detected */ ++#define BMSR_ANEGCOMPLETE 0x0020 /* Auto-negotiation complete */ ++#define BMSR_RESV 0x07c0 /* Unused... */ ++#define BMSR_10HALF 0x0800 /* Can do 10mbps, half-duplex */ ++#define BMSR_10FULL 0x1000 /* Can do 10mbps, full-duplex */ ++#define BMSR_100HALF 0x2000 /* Can do 100mbps, half-duplex */ ++#define BMSR_100FULL 0x4000 /* Can do 100mbps, full-duplex */ ++#define BMSR_100BASE4 0x8000 /* Can do 100mbps, 4k packets */ ++ ++/* Advertisement control register. */ ++#define ADVERTISE_SLCT 0x001f /* Selector bits */ ++#define ADVERTISE_CSMA 0x0001 /* Only selector supported */ ++#define ADVERTISE_10HALF 0x0020 /* Try for 10mbps half-duplex */ ++#define ADVERTISE_10FULL 0x0040 /* Try for 10mbps full-duplex */ ++#define ADVERTISE_100HALF 0x0080 /* Try for 100mbps half-duplex */ ++#define ADVERTISE_100FULL 0x0100 /* Try for 100mbps full-duplex */ ++#define ADVERTISE_100BASE4 0x0200 /* Try for 100mbps 4k packets */ ++#define ADVERTISE_RESV 0x1c00 /* Unused... */ ++#define ADVERTISE_RFAULT 0x2000 /* Say we can detect faults */ ++#define ADVERTISE_LPACK 0x4000 /* Ack link partners response */ ++#define ADVERTISE_NPAGE 0x8000 /* Next page bit */ ++ ++#define ADVERTISE_FULL (ADVERTISE_100FULL | ADVERTISE_10FULL | \ ++ ADVERTISE_CSMA) ++#define ADVERTISE_ALL (ADVERTISE_10HALF | ADVERTISE_10FULL | \ ++ ADVERTISE_100HALF | ADVERTISE_100FULL) ++ ++/* Link partner ability register. */ ++#define LPA_SLCT 0x001f /* Same as advertise selector */ ++#define LPA_10HALF 0x0020 /* Can do 10mbps half-duplex */ ++#define LPA_10FULL 0x0040 /* Can do 10mbps full-duplex */ ++#define LPA_100HALF 0x0080 /* Can do 100mbps half-duplex */ ++#define LPA_100FULL 0x0100 /* Can do 100mbps full-duplex */ ++#define LPA_100BASE4 0x0200 /* Can do 100mbps 4k packets */ ++#define LPA_RESV 0x1c00 /* Unused... */ ++#define LPA_RFAULT 0x2000 /* Link partner faulted */ ++#define LPA_LPACK 0x4000 /* Link partner acked us */ ++#define LPA_NPAGE 0x8000 /* Next page bit */ ++ ++#define LPA_DUPLEX (LPA_10FULL | LPA_100FULL) ++#define LPA_100 (LPA_100FULL | LPA_100HALF | LPA_100BASE4) ++ ++/* Expansion register for auto-negotiation. */ ++#define EXPANSION_NWAY 0x0001 /* Can do N-way auto-nego */ ++#define EXPANSION_LCWP 0x0002 /* Got new RX page code word */ ++#define EXPANSION_ENABLENPAGE 0x0004 /* This enables npage words */ ++#define EXPANSION_NPCAPABLE 0x0008 /* Link partner supports npage */ ++#define EXPANSION_MFAULTS 0x0010 /* Multiple faults detected */ ++#define EXPANSION_RESV 0xffe0 /* Unused... */ ++ ++/* N-way test register. */ ++#define NWAYTEST_RESV1 0x00ff /* Unused... */ ++#define NWAYTEST_LOOPBACK 0x0100 /* Enable loopback for N-way */ ++#define NWAYTEST_RESV2 0xfe00 /* Unused... */ ++ +diff -Naur grub-0.97.orig/netboot/misc.c grub-0.97/netboot/misc.c +--- grub-0.97.orig/netboot/misc.c 2003-07-09 11:45:37.000000000 +0000 ++++ grub-0.97/netboot/misc.c 2005-08-31 19:03:35.000000000 +0000 +@@ -19,37 +19,90 @@ + + /* Based on "src/misc.c" in etherboot-5.0.5. */ + +-#define GRUB 1 +-#include ++#include "grub.h" ++#include "timer.h" + +-void +-sleep (int secs) ++#include "nic.h" ++ ++/************************************************************************** ++RANDOM - compute a random number between 0 and 2147483647L or 2147483562? ++**************************************************************************/ ++int32_t random(void) + { +- unsigned long tmo = currticks () + secs; ++ static int32_t seed = 0; ++ int32_t q; ++ if (!seed) /* Initialize linear congruential generator */ ++ seed = currticks() + *(int32_t *)&arptable[ARP_CLIENT].node ++ + ((int16_t *)arptable[ARP_CLIENT].node)[2]; ++ /* simplified version of the LCG given in Bruce Schneier's ++ "Applied Cryptography" */ ++ q = seed/53668; ++ if ((seed = 40014*(seed-53668*q) - 12211*q) < 0) seed += 2147483563L; ++ return seed; ++} + +- while (currticks () < tmo) +- ; ++/************************************************************************** ++POLL INTERRUPTIONS ++**************************************************************************/ ++void poll_interruptions(void) ++{ ++ if (checkkey() != -1 && ASCII_CHAR(getkey()) == K_INTR) { ++ user_abort++; ++ } + } + +-void +-twiddle (void) ++/************************************************************************** ++SLEEP ++**************************************************************************/ ++void sleep(int secs) + { +- static unsigned long lastticks = 0; +- static int count = 0; +- static const char tiddles[]="-\\|/"; +- unsigned long ticks; ++ unsigned long tmo; + +- if (debug) +- { +- if ((ticks = currticks ()) == lastticks) +- return; +- +- lastticks = ticks; +- grub_putchar (tiddles[(count++) & 3]); +- grub_putchar ('\b'); +- } ++ for (tmo = currticks()+secs*TICKS_PER_SEC; currticks() < tmo; ) { ++ poll_interruptions(); ++ } ++} ++ ++/************************************************************************** ++INTERRUPTIBLE SLEEP ++**************************************************************************/ ++void interruptible_sleep(int secs) ++{ ++ printf("\n"); ++ return sleep(secs); ++} ++ ++/************************************************************************** ++TWIDDLE ++**************************************************************************/ ++void twiddle(void) ++{ ++#ifdef BAR_PROGRESS ++ static int count=0; ++ static const char tiddles[]="-\\|/"; ++ static unsigned long lastticks = 0; ++ unsigned long ticks; ++#endif ++#ifdef FREEBSD_PXEEMU ++ extern char pxeemu_nbp_active; ++ if(pxeemu_nbp_active != 0) ++ return; ++#endif ++#ifdef BAR_PROGRESS ++ /* Limit the maximum rate at which characters are printed */ ++ ticks = currticks(); ++ if ((lastticks + (TICKS_PER_SEC/18)) > ticks) ++ return; ++ lastticks = ticks; ++ ++ putchar(tiddles[(count++)&3]); ++ putchar('\b'); ++#else ++ //putchar('.'); ++#endif /* BAR_PROGRESS */ + } + ++ + /* Because Etherboot uses its own formats for the printf family, + define separate definitions from GRUB. */ + /************************************************************************** +@@ -264,3 +317,5 @@ + + return ret; + } ++ ++ +diff -Naur grub-0.97.orig/netboot/natsemi.c grub-0.97/netboot/natsemi.c +--- grub-0.97.orig/netboot/natsemi.c 2003-07-09 11:45:38.000000000 +0000 ++++ grub-0.97/netboot/natsemi.c 2005-08-31 19:53:07.000000000 +0000 +@@ -47,15 +47,15 @@ + /* Revision History */ + + /* ++ 13 Dec 2003 timlegge 1.1 Enabled Multicast Support + 29 May 2001 mdc 1.0 + Initial Release. Tested with Netgear FA311 and FA312 boards +-*/ ++*/ + /* Includes */ + + #include "etherboot.h" + #include "nic.h" + #include "pci.h" +-#include "cards.h" + + /* defines */ + +@@ -71,21 +71,18 @@ + + #define NUM_RX_DESC 4 /* Number of Rx descriptor registers. */ + +-typedef unsigned char u8; +-typedef signed char s8; +-typedef unsigned short u16; +-typedef signed short s16; +-typedef unsigned int u32; +-typedef signed int s32; ++typedef uint8_t u8; ++typedef int8_t s8; ++typedef uint16_t u16; ++typedef int16_t s16; ++typedef uint32_t u32; ++typedef int32_t s32; + + /* helpful macroes if on a big_endian machine for changing byte order. + not strictly needed on Intel */ +-#define le16_to_cpu(val) (val) +-#define cpu_to_le32(val) (val) + #define get_unaligned(ptr) (*(ptr)) + #define put_unaligned(val, ptr) ((void)( *(ptr) = (val) )) + #define get_u16(ptr) (*(u16 *)(ptr)) +-#define virt_to_bus(x) ((unsigned long)x) + #define virt_to_le32desc(addr) virt_to_bus(addr) + + enum pcistuff { +@@ -161,7 +158,8 @@ + AcceptMulticast = 0x00200000, + AcceptAllMulticast = 0x20000000, + AcceptAllPhys = 0x10000000, +- AcceptMyPhys = 0x08000000 ++ AcceptMyPhys = 0x08000000, ++ RxFilterEnable = 0x80000000 + }; + + typedef struct _BufferDesc { +@@ -207,17 +205,12 @@ + static BufferDesc txd __attribute__ ((aligned(4))); + static BufferDesc rxd[NUM_RX_DESC] __attribute__ ((aligned(4))); + +-#ifdef USE_LOWMEM_BUFFER +-#define txb ((char *)0x10000 - TX_BUF_SIZE) +-#define rxb ((char *)0x10000 - NUM_RX_DESC*RX_BUF_SIZE - TX_BUF_SIZE) +-#else + static unsigned char txb[TX_BUF_SIZE] __attribute__ ((aligned(4))); + static unsigned char rxb[NUM_RX_DESC * RX_BUF_SIZE] __attribute__ ((aligned(4))); +-#endif + + /* Function Prototypes */ + +-struct nic *natsemi_probe(struct nic *nic, unsigned short *io_addrs, struct pci_device *pci); ++static int natsemi_probe(struct dev *dev, struct pci_device *pci); + static int eeprom_read(long addr, int location); + static int mdio_read(int phy_id, int location); + static void natsemi_init(struct nic *nic); +@@ -228,8 +221,9 @@ + static void natsemi_set_rx_mode(struct nic *nic); + static void natsemi_check_duplex(struct nic *nic); + static void natsemi_transmit(struct nic *nic, const char *d, unsigned int t, unsigned int s, const char *p); +-static int natsemi_poll(struct nic *nic); +-static void natsemi_disable(struct nic *nic); ++static int natsemi_poll(struct nic *nic, int retrieve); ++static void natsemi_disable(struct dev *dev); ++static void natsemi_irq(struct nic *nic, irq_action_t action); + + /* + * Function: natsemi_probe +@@ -245,24 +239,28 @@ + * Returns: struct nic *: pointer to NIC data structure + */ + +-struct nic * +-natsemi_probe(struct nic *nic, unsigned short *io_addrs, struct pci_device *pci) ++static int ++natsemi_probe(struct dev *dev, struct pci_device *pci) + { ++ struct nic *nic = (struct nic *)dev; + int i; + int prev_eedata; + u32 tmp; + +- if (io_addrs == 0 || *io_addrs == 0) +- return NULL; ++ if (pci->ioaddr == 0) ++ return 0; ++ ++ adjust_pci_device(pci); + + /* initialize some commonly used globals */ + +- ioaddr = *io_addrs & ~3; ++ nic->irqno = 0; ++ nic->ioaddr = pci->ioaddr & ~3; ++ ++ ioaddr = pci->ioaddr & ~3; + vendor = pci->vendor; + dev_id = pci->dev_id; + nic_name = pci->name; +- +- adjust_pci_device(pci); + + /* natsemi has a non-standard PM control register + * in PCI config space. Some boards apparently need +@@ -317,12 +315,12 @@ + /* initialize device */ + natsemi_init(nic); + +- nic->reset = natsemi_init; ++ dev->disable = natsemi_disable; + nic->poll = natsemi_poll; + nic->transmit = natsemi_transmit; +- nic->disable = natsemi_disable; ++ nic->irq = natsemi_irq; + +- return nic; ++ return 1; + } + + /* Read the EEPROM and MII Management Data I/O (MDIO) interfaces. +@@ -452,7 +450,7 @@ + * Returns: void. + */ + static void +-natsemi_reset(struct nic *nic) ++natsemi_reset(struct nic *nic __unused) + { + outl(ChipReset, ioaddr + ChipCmd); + +@@ -504,14 +502,14 @@ + */ + + static void +-natsemi_init_txd(struct nic *nic) ++natsemi_init_txd(struct nic *nic __unused) + { + txd.link = (u32) 0; + txd.cmdsts = (u32) 0; +- txd.bufptr = (u32) &txb[0]; ++ txd.bufptr = virt_to_bus(&txb[0]); + + /* load Transmit Descriptor Register */ +- outl((u32) &txd, ioaddr + TxRingPtr); ++ outl(virt_to_bus(&txd), ioaddr + TxRingPtr); + if (natsemi_debug > 1) + printf("natsemi_init_txd: TX descriptor register loaded with: %X\n", + inl(ioaddr + TxRingPtr)); +@@ -527,7 +525,7 @@ + */ + + static void +-natsemi_init_rxd(struct nic *nic) ++natsemi_init_rxd(struct nic *nic __unused) + { + int i; + +@@ -535,16 +533,16 @@ + + /* init RX descriptor */ + for (i = 0; i < NUM_RX_DESC; i++) { +- rxd[i].link = (i+1 < NUM_RX_DESC) ? (u32) &rxd[i+1] : (u32) &rxd[0]; ++ rxd[i].link = virt_to_bus((i+1 < NUM_RX_DESC) ? &rxd[i+1] : &rxd[0]); + rxd[i].cmdsts = (u32) RX_BUF_SIZE; +- rxd[i].bufptr = (u32) &rxb[i*RX_BUF_SIZE]; ++ rxd[i].bufptr = virt_to_bus(&rxb[i*RX_BUF_SIZE]); + if (natsemi_debug > 1) + printf("natsemi_init_rxd: rxd[%d]=%X link=%X cmdsts=%X bufptr=%X\n", + i, &rxd[i], rxd[i].link, rxd[i].cmdsts, rxd[i].bufptr); + } + + /* load Receive Descriptor Register */ +- outl((u32) &rxd[0], ioaddr + RxRingPtr); ++ outl(virt_to_bus(&rxd[0]), ioaddr + RxRingPtr); + + if (natsemi_debug > 1) + printf("natsemi_init_rxd: RX descriptor register loaded with: %X\n", +@@ -562,14 +560,15 @@ + * Returns: void. + */ + +-static void natsemi_set_rx_mode(struct nic *nic) ++static void natsemi_set_rx_mode(struct nic *nic __unused) + { +- u32 rx_mode = AcceptBroadcast | AcceptMyPhys; ++ u32 rx_mode = RxFilterEnable | AcceptBroadcast | ++ AcceptAllMulticast | AcceptMyPhys; + + outl(rx_mode, ioaddr + RxFilterAddr); + } + +-static void natsemi_check_duplex(struct nic *nic) ++static void natsemi_check_duplex(struct nic *nic __unused) + { + int duplex = inl(ioaddr + ChipConfig) & 0x20000000 ? 1 : 0; + +@@ -607,14 +606,14 @@ + unsigned int s, /* size */ + const char *p) /* Packet */ + { +- u32 status, to, nstype; ++ u32 to, nstype; + u32 tx_status; + + /* Stop the transmitter */ + outl(TxOff, ioaddr + ChipCmd); + + /* load Transmit Descriptor Register */ +- outl((u32) &txd, ioaddr + TxRingPtr); ++ outl(virt_to_bus(&txd), ioaddr + TxRingPtr); + if (natsemi_debug > 1) + printf("natsemi_transmit: TX descriptor register loaded with: %X\n", + inl(ioaddr + TxRingPtr)); +@@ -636,7 +635,7 @@ + txb[s++] = '\0'; + + /* set the transmit buffer descriptor and enable Transmit State Machine */ +- txd.bufptr = (u32) &txb[0]; ++ txd.bufptr = virt_to_bus(&txb[0]); + txd.cmdsts = (u32) OWN | s; + + /* restart the transmitter */ +@@ -647,7 +646,7 @@ + + to = currticks() + TX_TIMEOUT; + +- while ((((volatile u32) tx_status=txd.cmdsts) & OWN) && (currticks() < to)) ++ while ((volatile u32) ( tx_status=txd.cmdsts & OWN) && (currticks() < to)) + /* wait */ ; + + if (currticks() >= to) { +@@ -674,7 +673,7 @@ + */ + + static int +-natsemi_poll(struct nic *nic) ++natsemi_poll(struct nic *nic, int retrieve) + { + u32 rx_status = rxd[cur_rx].cmdsts; + int retstat = 0; +@@ -685,6 +684,8 @@ + if (!(rx_status & OWN)) + return retstat; + ++ if ( ! retrieve ) return 1; ++ + if (natsemi_debug > 1) + printf("natsemi_poll: got a packet: cur_rx:%d, status:%X\n", + cur_rx, rx_status); +@@ -704,7 +705,7 @@ + + /* return the descriptor and buffer to receive ring */ + rxd[cur_rx].cmdsts = RX_BUF_SIZE; +- rxd[cur_rx].bufptr = (u32) &rxb[cur_rx*RX_BUF_SIZE]; ++ rxd[cur_rx].bufptr = virt_to_bus(&rxb[cur_rx*RX_BUF_SIZE]); + + if (++cur_rx == NUM_RX_DESC) + cur_rx = 0; +@@ -725,8 +726,12 @@ + */ + + static void +-natsemi_disable(struct nic *nic) ++natsemi_disable(struct dev *dev) + { ++ struct nic *nic = (struct nic *)dev; ++ /* merge reset and disable */ ++ natsemi_init(nic); ++ + /* Disable interrupts using the mask. */ + outl(0, ioaddr + IntrMask); + outl(0, ioaddr + IntrEnable); +@@ -737,3 +742,39 @@ + /* Restore PME enable bit */ + outl(SavedClkRun, ioaddr + ClkRun); + } ++ ++/* Function: natsemi_irq ++ * ++ * Description: Enable, Disable, or Force interrupts ++ * ++ * Arguments: struct nic *nic: NIC data structure ++ * irq_action_t action: requested action to perform ++ * ++ * Returns: void. ++ */ ++ ++static void ++natsemi_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } ++} ++ ++static struct pci_id natsemi_nics[] = { ++PCI_ROM(0x100b, 0x0020, "dp83815", "DP83815"), ++}; ++ ++struct pci_driver natsemi_driver = { ++ .type = NIC_DRIVER, ++ .name = "NATSEMI", ++ .probe = natsemi_probe, ++ .ids = natsemi_nics, ++ .id_count = sizeof(natsemi_nics)/sizeof(natsemi_nics[0]), ++ .class = 0, ++}; +diff -Naur grub-0.97.orig/netboot/nfs.h grub-0.97/netboot/nfs.h +--- grub-0.97.orig/netboot/nfs.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/nfs.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,63 @@ ++#ifndef _NFS_H ++#define _NFS_H ++ ++#define SUNRPC_PORT 111 ++ ++#define PROG_PORTMAP 100000 ++#define PROG_NFS 100003 ++#define PROG_MOUNT 100005 ++ ++#define MSG_CALL 0 ++#define MSG_REPLY 1 ++ ++#define PORTMAP_GETPORT 3 ++ ++#define MOUNT_ADDENTRY 1 ++#define MOUNT_UMOUNTALL 4 ++ ++#define NFS_LOOKUP 4 ++#define NFS_READLINK 5 ++#define NFS_READ 6 ++ ++#define NFS_FHSIZE 32 ++ ++#define NFSERR_PERM 1 ++#define NFSERR_NOENT 2 ++#define NFSERR_ACCES 13 ++#define NFSERR_ISDIR 21 ++#define NFSERR_INVAL 22 ++ ++/* Block size used for NFS read accesses. A RPC reply packet (including all ++ * headers) must fit within a single Ethernet frame to avoid fragmentation. ++ * Chosen to be a power of two, as most NFS servers are optimized for this. */ ++#define NFS_READ_SIZE 1024 ++ ++#define NFS_MAXLINKDEPTH 16 ++ ++struct rpc_t { ++ struct iphdr ip; ++ struct udphdr udp; ++ union { ++ uint8_t data[300]; /* longest RPC call must fit!!!! */ ++ struct { ++ uint32_t id; ++ uint32_t type; ++ uint32_t rpcvers; ++ uint32_t prog; ++ uint32_t vers; ++ uint32_t proc; ++ uint32_t data[1]; ++ } call; ++ struct { ++ uint32_t id; ++ uint32_t type; ++ uint32_t rstatus; ++ uint32_t verifier; ++ uint32_t v2; ++ uint32_t astatus; ++ uint32_t data[1]; ++ } reply; ++ } u; ++}; ++ ++#endif /* _NFS_H */ +diff -Naur grub-0.97.orig/netboot/ni5010.c grub-0.97/netboot/ni5010.c +--- grub-0.97.orig/netboot/ni5010.c 2003-07-09 11:45:38.000000000 +0000 ++++ grub-0.97/netboot/ni5010.c 1970-01-01 00:00:00.000000000 +0000 +@@ -1,371 +0,0 @@ +-/************************************************************************** +-Etherboot - BOOTP/TFTP Bootstrap Program +-Driver for NI5010. +-Code freely taken from Jan-Pascal van Best and Andreas Mohr's +-Linux NI5010 driver. +-***************************************************************************/ +- +-/* +- * This program is free software; you can redistribute it and/or +- * modify it under the terms of the GNU General Public License as +- * published by the Free Software Foundation; either version 2, or (at +- * your option) any later version. +- */ +- +-/* to get some global routines like printf */ +-#include "etherboot.h" +-/* to get the interface to the body of the program */ +-#include "nic.h" +-/* to get our own prototype */ +-#include "cards.h" +- +-/* ni5010.h file included verbatim */ +-/* +- * Racal-Interlan ni5010 Ethernet definitions +- * +- * This is an extension to the Linux operating system, and is covered by the +- * same Gnu Public License that covers that work. +- * +- * copyrights (c) 1996 by Jan-Pascal van Best (jvbest@wi.leidenuniv.nl) +- * +- * I have done a look in the following sources: +- * crynwr-packet-driver by Russ Nelson +- */ +- +-#define NI5010_BUFSIZE 2048 /* number of bytes in a buffer */ +- +-#define NI5010_MAGICVAL0 0x00 /* magic-values for ni5010 card */ +-#define NI5010_MAGICVAL1 0x55 +-#define NI5010_MAGICVAL2 0xAA +- +-#define SA_ADDR0 0x02 +-#define SA_ADDR1 0x07 +-#define SA_ADDR2 0x01 +- +-/* The number of low I/O ports used by the ni5010 ethercard. */ +-#define NI5010_IO_EXTENT 32 +- +-#define PRINTK(x) if (NI5010_DEBUG) printk x +-#define PRINTK2(x) if (NI5010_DEBUG>=2) printk x +-#define PRINTK3(x) if (NI5010_DEBUG>=3) printk x +- +-/* The various IE command registers */ +-#define EDLC_XSTAT (ioaddr + 0x00) /* EDLC transmit csr */ +-#define EDLC_XCLR (ioaddr + 0x00) /* EDLC transmit "Clear IRQ" */ +-#define EDLC_XMASK (ioaddr + 0x01) /* EDLC transmit "IRQ Masks" */ +-#define EDLC_RSTAT (ioaddr + 0x02) /* EDLC receive csr */ +-#define EDLC_RCLR (ioaddr + 0x02) /* EDLC receive "Clear IRQ" */ +-#define EDLC_RMASK (ioaddr + 0x03) /* EDLC receive "IRQ Masks" */ +-#define EDLC_XMODE (ioaddr + 0x04) /* EDLC transmit Mode */ +-#define EDLC_RMODE (ioaddr + 0x05) /* EDLC receive Mode */ +-#define EDLC_RESET (ioaddr + 0x06) /* EDLC RESET register */ +-#define EDLC_TDR1 (ioaddr + 0x07) /* "Time Domain Reflectometry" reg1 */ +-#define EDLC_ADDR (ioaddr + 0x08) /* EDLC station address, 6 bytes */ +- /* 0x0E doesn't exist for r/w */ +-#define EDLC_TDR2 (ioaddr + 0x0f) /* "Time Domain Reflectometry" reg2 */ +-#define IE_GP (ioaddr + 0x10) /* GP pointer (word register) */ +- /* 0x11 is 2nd byte of GP Pointer */ +-#define IE_RCNT (ioaddr + 0x10) /* Count of bytes in rcv'd packet */ +- /* 0x11 is 2nd byte of "Byte Count" */ +-#define IE_MMODE (ioaddr + 0x12) /* Memory Mode register */ +-#define IE_DMA_RST (ioaddr + 0x13) /* IE DMA Reset. write only */ +-#define IE_ISTAT (ioaddr + 0x13) /* IE Interrupt Status. read only */ +-#define IE_RBUF (ioaddr + 0x14) /* IE Receive Buffer port */ +-#define IE_XBUF (ioaddr + 0x15) /* IE Transmit Buffer port */ +-#define IE_SAPROM (ioaddr + 0x16) /* window on station addr prom */ +-#define IE_RESET (ioaddr + 0x17) /* any write causes Board Reset */ +- +-/* bits in EDLC_XSTAT, interrupt clear on write, status when read */ +-#define XS_TPOK 0x80 /* transmit packet successful */ +-#define XS_CS 0x40 /* carrier sense */ +-#define XS_RCVD 0x20 /* transmitted packet received */ +-#define XS_SHORT 0x10 /* transmission media is shorted */ +-#define XS_UFLW 0x08 /* underflow. iff failed board */ +-#define XS_COLL 0x04 /* collision occurred */ +-#define XS_16COLL 0x02 /* 16th collision occurred */ +-#define XS_PERR 0x01 /* parity error */ +- +-#define XS_CLR_UFLW 0x08 /* clear underflow */ +-#define XS_CLR_COLL 0x04 /* clear collision */ +-#define XS_CLR_16COLL 0x02 /* clear 16th collision */ +-#define XS_CLR_PERR 0x01 /* clear parity error */ +- +-/* bits in EDLC_XMASK, mask/enable transmit interrupts. register is r/w */ +-#define XM_TPOK 0x80 /* =1 to enable Xmt Pkt OK interrupts */ +-#define XM_RCVD 0x20 /* =1 to enable Xmt Pkt Rcvd ints */ +-#define XM_UFLW 0x08 /* =1 to enable Xmt Underflow ints */ +-#define XM_COLL 0x04 /* =1 to enable Xmt Collision ints */ +-#define XM_COLL16 0x02 /* =1 to enable Xmt 16th Coll ints */ +-#define XM_PERR 0x01 /* =1 to enable Xmt Parity Error ints */ +- /* note: always clear this bit */ +-#define XM_ALL (XM_TPOK | XM_RCVD | XM_UFLW | XM_COLL | XM_COLL16) +- +-/* bits in EDLC_RSTAT, interrupt clear on write, status when read */ +-#define RS_PKT_OK 0x80 /* received good packet */ +-#define RS_RST_PKT 0x10 /* RESET packet received */ +-#define RS_RUNT 0x08 /* Runt Pkt rcvd. Len < 64 Bytes */ +-#define RS_ALIGN 0x04 /* Alignment error. not 8 bit aligned */ +-#define RS_CRC_ERR 0x02 /* Bad CRC on rcvd pkt */ +-#define RS_OFLW 0x01 /* overflow for rcv FIFO */ +-#define RS_VALID_BITS ( RS_PKT_OK | RS_RST_PKT | RS_RUNT | RS_ALIGN | RS_CRC_ERR | RS_OFLW ) +- /* all valid RSTAT bits */ +- +-#define RS_CLR_PKT_OK 0x80 /* clear rcvd packet interrupt */ +-#define RS_CLR_RST_PKT 0x10 /* clear RESET packet received */ +-#define RS_CLR_RUNT 0x08 /* clear Runt Pckt received */ +-#define RS_CLR_ALIGN 0x04 /* clear Alignment error */ +-#define RS_CLR_CRC_ERR 0x02 /* clear CRC error */ +-#define RS_CLR_OFLW 0x01 /* clear rcv FIFO Overflow */ +- +-/* bits in EDLC_RMASK, mask/enable receive interrupts. register is r/w */ +-#define RM_PKT_OK 0x80 /* =1 to enable rcvd good packet ints */ +-#define RM_RST_PKT 0x10 /* =1 to enable RESET packet ints */ +-#define RM_RUNT 0x08 /* =1 to enable Runt Pkt rcvd ints */ +-#define RM_ALIGN 0x04 /* =1 to enable Alignment error ints */ +-#define RM_CRC_ERR 0x02 /* =1 to enable Bad CRC error ints */ +-#define RM_OFLW 0x01 /* =1 to enable overflow error ints */ +- +-/* bits in EDLC_RMODE, set Receive Packet mode. register is r/w */ +-#define RMD_TEST 0x80 /* =1 for Chip testing. normally 0 */ +-#define RMD_ADD_SIZ 0x10 /* =1 5-byte addr match. normally 0 */ +-#define RMD_EN_RUNT 0x08 /* =1 enable runt rcv. normally 0 */ +-#define RMD_EN_RST 0x04 /* =1 to rcv RESET pkt. normally 0 */ +- +-#define RMD_PROMISC 0x03 /* receive *all* packets. unusual */ +-#define RMD_MULTICAST 0x02 /* receive multicasts too. unusual */ +-#define RMD_BROADCAST 0x01 /* receive broadcasts & normal. usual */ +-#define RMD_NO_PACKETS 0x00 /* don't receive any packets. unusual */ +- +-/* bits in EDLC_XMODE, set Transmit Packet mode. register is r/w */ +-#define XMD_COLL_CNT 0xf0 /* coll's since success. read-only */ +-#define XMD_IG_PAR 0x08 /* =1 to ignore parity. ALWAYS set */ +-#define XMD_T_MODE 0x04 /* =1 to power xcvr. ALWAYS set this */ +-#define XMD_LBC 0x02 /* =1 for loopback. normally set */ +-#define XMD_DIS_C 0x01 /* =1 disables contention. normally 0 */ +- +-/* bits in EDLC_RESET, write only */ +-#define RS_RESET 0x80 /* =1 to hold EDLC in reset state */ +- +-/* bits in IE_MMODE, write only */ +-#define MM_EN_DMA 0x80 /* =1 begin DMA xfer, Cplt clrs it */ +-#define MM_EN_RCV 0x40 /* =1 allows Pkt rcv. clr'd by rcv */ +-#define MM_EN_XMT 0x20 /* =1 begin Xmt pkt. Cplt clrs it */ +-#define MM_BUS_PAGE 0x18 /* =00 ALWAYS. Used when MUX=1 */ +-#define MM_NET_PAGE 0x06 /* =00 ALWAYS. Used when MUX=0 */ +-#define MM_MUX 0x01 /* =1 means Rcv Buff on system bus */ +- /* =0 means Xmt Buff on system bus */ +- +-/* bits in IE_ISTAT, read only */ +-#define IS_TDIAG 0x80 /* =1 if Diagnostic problem */ +-#define IS_EN_RCV 0x20 /* =1 until frame is rcv'd cplt */ +-#define IS_EN_XMT 0x10 /* =1 until frame is xmt'd cplt */ +-#define IS_EN_DMA 0x08 /* =1 until DMA is cplt or aborted */ +-#define IS_DMA_INT 0x04 /* =0 iff DMA done interrupt. */ +-#define IS_R_INT 0x02 /* =0 iff unmasked Rcv interrupt */ +-#define IS_X_INT 0x01 /* =0 iff unmasked Xmt interrupt */ +- +-/* NIC specific static variables go here */ +- +-static unsigned short ioaddr = 0; +-static unsigned int bufsize_rcv = 0; +- +-#if 0 +-static void show_registers(void) +-{ +- printf("XSTAT %hhX ", inb(EDLC_XSTAT)); +- printf("XMASK %hhX ", inb(EDLC_XMASK)); +- printf("RSTAT %hhX ", inb(EDLC_RSTAT)); +- printf("RMASK %hhX ", inb(EDLC_RMASK)); +- printf("RMODE %hhX ", inb(EDLC_RMODE)); +- printf("XMODE %hhX ", inb(EDLC_XMODE)); +- printf("ISTAT %hhX\n", inb(IE_ISTAT)); +-} +-#endif +- +-static void reset_receiver(void) +-{ +- outw(0, IE_GP); /* Receive packet at start of buffer */ +- outb(RS_VALID_BITS, EDLC_RCLR); /* Clear all pending Rcv interrupts */ +- outb(MM_EN_RCV, IE_MMODE); /* Enable rcv */ +-} +- +-/************************************************************************** +-RESET - Reset adapter +-***************************************************************************/ +-static void ni5010_reset(struct nic *nic) +-{ +- int i; +- +- /* Reset the hardware here. Don't forget to set the station address. */ +- outb(RS_RESET, EDLC_RESET); /* Hold up EDLC_RESET while configing board */ +- outb(0, IE_RESET); /* Hardware reset of ni5010 board */ +- outb(0, EDLC_XMASK); /* Disable all Xmt interrupts */ +- outb(0, EDLC_RMASK); /* Disable all Rcv interrupt */ +- outb(0xFF, EDLC_XCLR); /* Clear all pending Xmt interrupts */ +- outb(0xFF, EDLC_RCLR); /* Clear all pending Rcv interrupts */ +- outb(XMD_LBC, EDLC_XMODE); /* Only loopback xmits */ +- /* Set the station address */ +- for(i = 0; i < ETH_ALEN; i++) +- outb(nic->node_addr[i], EDLC_ADDR + i); +- outb(XMD_IG_PAR | XMD_T_MODE | XMD_LBC, EDLC_XMODE); +- /* Normal packet xmit mode */ +- outb(RMD_BROADCAST, EDLC_RMODE); +- /* Receive broadcast and normal packets */ +- reset_receiver(); +- outb(0x00, EDLC_RESET); /* Un-reset the ni5010 */ +-} +- +-/************************************************************************** +-POLL - Wait for a frame +-***************************************************************************/ +-static int ni5010_poll(struct nic *nic) +-{ +- int rcv_stat; +- +- if (((rcv_stat = inb(EDLC_RSTAT)) & RS_VALID_BITS) != RS_PKT_OK) { +- outb(rcv_stat, EDLC_RSTAT); /* Clear the status */ +- return (0); +- } +- outb(rcv_stat, EDLC_RCLR); /* Clear the status */ +- nic->packetlen = inw(IE_RCNT); +- /* Read packet into buffer */ +- outb(MM_MUX, IE_MMODE); /* Rcv buffer to system bus */ +- outw(0, IE_GP); /* Seek to beginning of packet */ +- insb(IE_RBUF, nic->packet, nic->packetlen); +- return (1); +-} +- +-/************************************************************************** +-TRANSMIT - Transmit a frame +-***************************************************************************/ +-static void ni5010_transmit(struct nic *nic, +- const char *d, /* Destination */ +- unsigned int t, /* Type */ +- unsigned int s, /* size */ +- const char *p) /* Packet */ +-{ +- unsigned int len; +- int buf_offs, xmt_stat; +- unsigned long time; +- +- len = s + ETH_HLEN; +- if (len < ETH_ZLEN) +- len = ETH_ZLEN; +- buf_offs = NI5010_BUFSIZE - len; +- outb(0, EDLC_RMASK); /* Mask all receive interrupts */ +- outb(0, IE_MMODE); /* Put Xmit buffer on system bus */ +- outb(0xFF, EDLC_RCLR); /* Clear out pending rcv interrupts */ +- outw(buf_offs, IE_GP); /* Point GP at start of packet */ +- outsb(IE_XBUF, d, ETH_ALEN); /* Put dst in buffer */ +- outsb(IE_XBUF, nic->node_addr, ETH_ALEN);/* Put src in buffer */ +- outb(t >> 8, IE_XBUF); +- outb(t, IE_XBUF); +- outsb(IE_XBUF, p, s); /* Put data in buffer */ +- while (s++ < ETH_ZLEN - ETH_HLEN) /* Pad to min size */ +- outb(0, IE_XBUF); +- outw(buf_offs, IE_GP); /* Rewrite where packet starts */ +- /* should work without that outb() (Crynwr used it) */ +- /*outb(MM_MUX, IE_MMODE);*/ +- /* Xmt buffer to EDLC bus */ +- outb(MM_EN_XMT | MM_MUX, IE_MMODE); /* Begin transmission */ +- /* wait for transmit complete */ +- while (((xmt_stat = inb(IE_ISTAT)) & IS_EN_XMT) != 0) +- ; +- reset_receiver(); /* Immediately switch to receive */ +-} +- +-/************************************************************************** +-DISABLE - Turn off ethernet interface +-***************************************************************************/ +-static void ni5010_disable(struct nic *nic) +-{ +- outb(0, IE_MMODE); +- outb(RS_RESET, EDLC_RESET); +-} +- +-static inline int rd_port(void) +-{ +- inb(IE_RBUF); +- return inb(IE_SAPROM); +-} +- +-static int ni5010_probe1(struct nic *nic) +-{ +- int i, boguscount = 40, data; +- +- /* The tests are from the Linux NI5010 driver +- I don't understand it all, but if it works for them... */ +- if (inb(ioaddr) == 0xFF) +- return (0); +- while ((rd_port() & rd_port() & rd_port() +- & rd_port() & rd_port() & rd_port()) != 0xFF) +- { +- if (boguscount-- <= 0) +- return (0); +- } +- for (i = 0; i < 32; i++) +- if ((data = rd_port()) != 0xFF) +- break; +- if (data == 0xFF) +- return (0); +- if (data == SA_ADDR0 && rd_port() == SA_ADDR1 && rd_port() == SA_ADDR2) { +- for (i = 0; i < 4; i++) +- rd_port(); +- if (rd_port() != NI5010_MAGICVAL1 || rd_port() != NI5010_MAGICVAL2) +- return (0); +- } else +- return (0); +- for (i = 0; i < ETH_ALEN; i++) { +- outw(i, IE_GP); +- nic->node_addr[i] = inb(IE_SAPROM); +- } +- printf("\nNI5010 ioaddr %#hX, addr %!\n", ioaddr, nic->node_addr); +-/* get the size of the onboard receive buffer +- * higher addresses than bufsize are wrapped into real buffer +- * i.e. data for offs. 0x801 is written to 0x1 with a 2K onboard buffer +- */ +- if (bufsize_rcv == 0) { +- outb(1, IE_MMODE); /* Put Rcv buffer on system bus */ +- outw(0, IE_GP); /* Point GP at start of packet */ +- outb(0, IE_RBUF); /* set buffer byte 0 to 0 */ +- for (i = 1; i < 0xFF; i++) { +- outw(i << 8, IE_GP); /* Point GP at packet size to be tested */ +- outb(i, IE_RBUF); +- outw(0x0, IE_GP); /* Point GP at start of packet */ +- data = inb(IE_RBUF); +- if (data == i) break; +- } +- bufsize_rcv = i << 8; +- outw(0, IE_GP); /* Point GP at start of packet */ +- outb(0, IE_RBUF); /* set buffer byte 0 to 0 again */ +- } +- printf("Bufsize rcv/xmt=%d/%d\n", bufsize_rcv, NI5010_BUFSIZE); +- return (1); +-} +- +-/************************************************************************** +-PROBE - Look for an adapter, this routine's visible to the outside +-***************************************************************************/ +-struct nic *ni5010_probe(struct nic *nic, unsigned short *probe_addrs) +-{ +- static unsigned short io_addrs[] = { +- 0x300, 0x320, 0x340, 0x360, 0x380, 0x3a0, 0 }; +- unsigned short *p; +- +- /* if probe_addrs is 0, then use list above */ +- if (probe_addrs == 0 || *probe_addrs == 0) +- probe_addrs = io_addrs; +- for (p = probe_addrs; (ioaddr = *p) != 0; p++) { +- if (ni5010_probe1(nic)) +- break; +- } +- if (ioaddr == 0) +- return (0); +- ni5010_reset(nic); +- /* point to NIC specific routines */ +- nic->reset = ni5010_reset; +- nic->poll = ni5010_poll; +- nic->transmit = ni5010_transmit; +- nic->disable = ni5010_disable; +- return (nic); +-} +diff -Naur grub-0.97.orig/netboot/nic.c grub-0.97/netboot/nic.c +--- grub-0.97.orig/netboot/nic.c 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/nic.c 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,1198 @@ ++/************************************************************************** ++Etherboot - Network Bootstrap Program ++ ++Literature dealing with the network protocols: ++ ARP - RFC826 ++ RARP - RFC903 ++ IP - RFC791 ++ UDP - RFC768 ++ BOOTP - RFC951, RFC2132 (vendor extensions) ++ DHCP - RFC2131, RFC2132 (options) ++ TFTP - RFC1350, RFC2347 (options), RFC2348 (blocksize), RFC2349 (tsize) ++ RPC - RFC1831, RFC1832 (XDR), RFC1833 (rpcbind/portmapper) ++ NFS - RFC1094, RFC1813 (v3, useful for clarifications, not implemented) ++ IGMP - RFC1112, RFC2113, RFC2365, RFC2236, RFC3171 ++ ++**************************************************************************/ ++#include "etherboot.h" ++#include "grub.h" ++#include "nic.h" ++#include "elf.h" /* FOR EM_CURRENT */ ++#include "bootp.h" ++#include "if_arp.h" ++#include "tftp.h" ++#include "timer.h" ++#include "ip.h" ++#include "udp.h" ++ ++/* Currently no other module uses rom, but it is available */ ++struct rom_info rom; ++struct arptable_t arptable[MAX_ARP]; ++#if MULTICAST_LEVEL2 ++unsigned long last_igmpv1 = 0; ++struct igmptable_t igmptable[MAX_IGMP]; ++#endif ++static unsigned long netmask; ++/* Used by nfs.c */ ++char *hostname = ""; ++int hostnamelen = 0; ++static uint32_t xid; ++static unsigned char *end_of_rfc1533 = NULL; ++static const unsigned char broadcast[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; ++static const in_addr zeroIP = { 0L }; ++static char rfc1533_venddata[MAX_RFC1533_VENDLEN]; ++static unsigned char rfc1533_cookie[4] = { RFC1533_COOKIE }; ++static unsigned char rfc1533_cookie_bootp[5] = { RFC1533_COOKIE, RFC1533_END }; ++static unsigned char rfc1533_cookie_dhcp[] = { RFC1533_COOKIE }; ++static int dhcp_reply; ++static in_addr dhcp_server = { 0L }; ++static in_addr dhcp_addr = { 0L }; ++ ++static const unsigned char dhcpdiscover[] = { ++ RFC2132_MSG_TYPE, 1, DHCPDISCOVER, ++ RFC2132_MAX_SIZE, 2, /* request as much as we can */ ++ ETH_MAX_MTU / 256, ETH_MAX_MTU % 256, ++ /* Vendor class identifier */ ++ RFC2132_VENDOR_CLASS_ID, 10, 'G', 'R', 'U', 'B', 'C', 'l', 'i', 'e', 'n', 't', ++ RFC2132_PARAM_LIST, 4, RFC1533_NETMASK, RFC1533_GATEWAY, ++ RFC1533_HOSTNAME, RFC1533_EXTENSIONPATH, RFC1533_END ++}; ++static const unsigned char dhcprequest [] = { ++ RFC2132_MSG_TYPE,1,DHCPREQUEST, ++ RFC2132_SRV_ID,4,0,0,0,0, ++ RFC2132_REQ_ADDR,4,0,0,0,0, ++ RFC2132_MAX_SIZE,2, /* request as much as we can */ ++ ETH_MAX_MTU / 256, ETH_MAX_MTU % 256, ++ /* Vendor class identifier */ ++ RFC2132_VENDOR_CLASS_ID, 10, 'G', 'R', 'U', 'B', 'C', 'l', 'i', 'e', 'n', 't', ++ RFC2132_PARAM_LIST, ++ /* 4 standard + 2 vendortags */ ++ 4 + 2, ++ /* Standard parameters */ ++ RFC1533_NETMASK, RFC1533_GATEWAY, ++ RFC1533_HOSTNAME, RFC1533_EXTENSIONPATH, ++ /* Etherboot vendortags */ ++ RFC1533_VENDOR_MAGIC, ++ RFC1533_VENDOR_CONFIGFILE, ++ RFC1533_END ++}; ++ ++/* See nic.h */ ++int user_abort = 0; ++int network_ready = 0; ++ ++#ifdef REQUIRE_VCI_ETHERBOOT ++int vci_etherboot; ++#endif ++ ++static int dummy(void *unused __unused) ++{ ++ return (0); ++} ++ ++/* Careful. We need an aligned buffer to avoid problems on machines ++ * that care about alignment. To trivally align the ethernet data ++ * (the ip hdr and arp requests) we offset the packet by 2 bytes. ++ * leaving the ethernet data 16 byte aligned. Beyond this ++ * we use memmove but this makes the common cast simple and fast. ++ */ ++static char packet[ETH_FRAME_LEN + ETH_DATA_ALIGN] __aligned; ++ ++struct nic nic = ++{ ++ { ++ 0, /* dev.disable */ ++ { ++ 0, ++ 0, ++ PCI_BUS_TYPE, ++ }, /* dev.devid */ ++ 0, /* index */ ++ 0, /* type */ ++ PROBE_FIRST, /* how_pobe */ ++ PROBE_NONE, /* to_probe */ ++ 0, /* failsafe */ ++ 0, /* type_index */ ++ {}, /* state */ ++ }, ++ (int (*)(struct nic *, int))dummy, /* poll */ ++ (void (*)(struct nic *, const char *, ++ unsigned int, unsigned int, ++ const char *))dummy, /* transmit */ ++ (void (*)(struct nic *, irq_action_t))dummy, /* irq */ ++ 0, /* flags */ ++ &rom, /* rom_info */ ++ arptable[ARP_CLIENT].node, /* node_addr */ ++ packet + ETH_DATA_ALIGN, /* packet */ ++ 0, /* packetlen */ ++ 0, /* ioaddr */ ++ 0, /* irqno */ ++ NULL, /* priv_data */ ++}; ++ ++ ++ ++int grub_eth_probe(void) ++{ ++ static int probed = 0; ++ struct dev *dev; ++ ++ EnterFunction("grub_eth_probe"); ++ ++ if (probed) ++ return 1; ++ ++ network_ready = 0; ++ grub_memset((char *)arptable, 0, MAX_ARP * sizeof(struct arptable_t)); ++ dev = &nic.dev; ++ dev->how_probe = -1; ++ dev->type = NIC_DRIVER; ++ dev->failsafe = 1; ++ rom = *((struct rom_info *)ROM_INFO_LOCATION); ++ ++ probed = (eth_probe(dev) == PROBE_WORKED); ++ ++ LeaveFunction("grub_eth_probe"); ++ return probed; ++} ++ ++int eth_probe(struct dev *dev) ++{ ++ return probe(dev); ++} ++ ++int eth_poll(int retrieve) ++{ ++ return ((*nic.poll)(&nic, retrieve)); ++} ++ ++void eth_transmit(const char *d, unsigned int t, unsigned int s, const void *p) ++{ ++ (*nic.transmit)(&nic, d, t, s, p); ++ if (t == IP) twiddle(); ++} ++ ++void eth_disable(void) ++{ ++#ifdef MULTICAST_LEVEL2 ++ int i; ++ for(i = 0; i < MAX_IGMP; i++) { ++ leave_group(i); ++ } ++#endif ++ disable(&nic.dev); ++} ++ ++void eth_irq (irq_action_t action) ++{ ++ (*nic.irq)(&nic,action); ++} ++ ++/************************************************************************** ++IPCHKSUM - Checksum IP Header ++**************************************************************************/ ++uint16_t ipchksum(const void *data, unsigned long length) ++{ ++ unsigned long sum; ++ unsigned long i; ++ const uint8_t *ptr; ++ ++ /* In the most straight forward way possible, ++ * compute an ip style checksum. ++ */ ++ sum = 0; ++ ptr = data; ++ for(i = 0; i < length; i++) { ++ unsigned long value; ++ value = ptr[i]; ++ if (i & 1) { ++ value <<= 8; ++ } ++ /* Add the new value */ ++ sum += value; ++ /* Wrap around the carry */ ++ if (sum > 0xFFFF) { ++ sum = (sum + (sum >> 16)) & 0xFFFF; ++ } ++ } ++ return (~cpu_to_le16(sum)) & 0xFFFF; ++} ++ ++uint16_t add_ipchksums(unsigned long offset, uint16_t sum, uint16_t new) ++{ ++ unsigned long checksum; ++ sum = ~sum & 0xFFFF; ++ new = ~new & 0xFFFF; ++ if (offset & 1) { ++ /* byte swap the sum if it came from an odd offset ++ * since the computation is endian independant this ++ * works. ++ */ ++ new = bswap_16(new); ++ } ++ checksum = sum + new; ++ if (checksum > 0xFFFF) { ++ checksum -= 0xFFFF; ++ } ++ return (~checksum) & 0xFFFF; ++} ++ ++/************************************************************************** ++DEFAULT_NETMASK - Return default netmask for IP address ++**************************************************************************/ ++static inline unsigned long default_netmask(void) ++{ ++ int net = ntohl(arptable[ARP_CLIENT].ipaddr.s_addr) >> 24; ++ if (net <= 127) ++ return(htonl(0xff000000)); ++ else if (net < 192) ++ return(htonl(0xffff0000)); ++ else ++ return(htonl(0xffffff00)); ++} ++ ++/************************************************************************** ++IP_TRANSMIT - Send an IP datagram ++**************************************************************************/ ++static int await_arp(int ival, void *ptr, ++ unsigned short ptype, struct iphdr *ip __unused, struct udphdr *udp __unused) ++{ ++ struct arprequest *arpreply; ++ if (ptype != ARP) ++ return 0; ++ if (nic.packetlen < ETH_HLEN + sizeof(struct arprequest)) ++ return 0; ++ arpreply = (struct arprequest *)&nic.packet[ETH_HLEN]; ++ ++ if (arpreply->opcode != htons(ARP_REPLY)) ++ return 0; ++ if (memcmp(arpreply->sipaddr, ptr, sizeof(in_addr)) != 0) ++ return 0; ++ memcpy(arptable[ival].node, arpreply->shwaddr, ETH_ALEN); ++ return 1; ++} ++ ++int ip_transmit(int len, const void *buf) ++{ ++ unsigned long destip; ++ struct iphdr *ip; ++ struct arprequest arpreq; ++ int arpentry, i; ++ int retry; ++ ++ ip = (struct iphdr *)buf; ++ destip = ip->dest.s_addr; ++ if (destip == IP_BROADCAST) { ++ eth_transmit(broadcast, IP, len, buf); ++#ifdef MULTICAST_LEVEL1 ++ } else if ((destip & htonl(MULTICAST_MASK)) == htonl(MULTICAST_NETWORK)) { ++ unsigned char multicast[6]; ++ unsigned long hdestip; ++ hdestip = ntohl(destip); ++ multicast[0] = 0x01; ++ multicast[1] = 0x00; ++ multicast[2] = 0x5e; ++ multicast[3] = (hdestip >> 16) & 0x7; ++ multicast[4] = (hdestip >> 8) & 0xff; ++ multicast[5] = hdestip & 0xff; ++ eth_transmit(multicast, IP, len, buf); ++#endif ++ } else { ++ if (((destip & netmask) != ++ (arptable[ARP_CLIENT].ipaddr.s_addr & netmask)) && ++ arptable[ARP_GATEWAY].ipaddr.s_addr) ++ destip = arptable[ARP_GATEWAY].ipaddr.s_addr; ++ for(arpentry = 0; arpentryverhdrlen = 0x45; ++ ip->verhdrlen += (option_len/4); ++ ip->service = 0; ++ ip->len = htons(len); ++ ip->ident = 0; ++ ip->frags = 0; /* Should we set don't fragment? */ ++ ip->ttl = ttl; ++ ip->protocol = protocol; ++ ip->chksum = 0; ++ ip->src.s_addr = arptable[ARP_CLIENT].ipaddr.s_addr; ++ ip->dest.s_addr = destip; ++ ip->chksum = ipchksum(buf, sizeof(struct iphdr) + option_len); ++} ++ ++static uint16_t udpchksum(struct iphdr *ip, struct udphdr *udp) ++{ ++ struct udp_pseudo_hdr pseudo; ++ uint16_t checksum; ++ ++ /* Compute the pseudo header */ ++ pseudo.src.s_addr = ip->src.s_addr; ++ pseudo.dest.s_addr = ip->dest.s_addr; ++ pseudo.unused = 0; ++ pseudo.protocol = IP_UDP; ++ pseudo.len = udp->len; ++ ++ /* Sum the pseudo header */ ++ checksum = ipchksum(&pseudo, 12); ++ ++ /* Sum the rest of the udp packet */ ++ checksum = add_ipchksums(12, checksum, ipchksum(udp, ntohs(udp->len))); ++ return checksum; ++} ++ ++ ++void build_udp_hdr(unsigned long destip, ++ unsigned int srcsock, unsigned int destsock, int ttl, ++ int len, const void *buf) ++{ ++ struct iphdr *ip; ++ struct udphdr *udp; ++ ip = (struct iphdr *)buf; ++ build_ip_hdr(destip, ttl, IP_UDP, 0, len, buf); ++ udp = (struct udphdr *)((char *)buf + sizeof(struct iphdr)); ++ udp->src = htons(srcsock); ++ udp->dest = htons(destsock); ++ udp->len = htons(len - sizeof(struct iphdr)); ++ udp->chksum = 0; ++ if ((udp->chksum = udpchksum(ip, udp)) == 0) ++ udp->chksum = 0xffff; ++} ++ ++ ++/************************************************************************** ++UDP_TRANSMIT - Send an UDP datagram ++**************************************************************************/ ++int udp_transmit(unsigned long destip, unsigned int srcsock, ++ unsigned int destsock, int len, const void *buf) ++{ ++ build_udp_hdr(destip, srcsock, destsock, 60, len, buf); ++ return ip_transmit(len, buf); ++} ++ ++/************************************************************************** ++QDRAIN - clear the nic's receive queue ++**************************************************************************/ ++static int await_qdrain(int ival __unused, void *ptr __unused, ++ unsigned short ptype __unused, ++ struct iphdr *ip __unused, struct udphdr *udp __unused) ++{ ++ return 0; ++} ++ ++void rx_qdrain(void) ++{ ++ /* Clear out the Rx queue first. It contains nothing of interest, ++ * except possibly ARP requests from the DHCP/TFTP server. We use ++ * polling throughout Etherboot, so some time may have passed since we ++ * last polled the receive queue, which may now be filled with ++ * broadcast packets. This will cause the reply to the packets we are ++ * about to send to be lost immediately. Not very clever. */ ++ await_reply(await_qdrain, 0, NULL, 0); ++} ++ ++/** ++ * rarp ++ * ++ * Get IP address by rarp. Just copy from etherboot ++ **/ ++static int await_rarp(int ival, void *ptr, unsigned short ptype, ++ struct iphdr *ip, struct udphdr *udp) ++{ ++ struct arprequest *arpreply; ++ if (ptype != RARP) ++ return 0; ++ if (nic.packetlen < ETH_HLEN + sizeof(struct arprequest)) ++ return 0; ++ arpreply = (struct arprequest *)&nic.packet[ETH_HLEN]; ++ if (arpreply->opcode != htons(RARP_REPLY)) ++ return 0; ++ if (memcmp(arpreply->thwaddr, ptr, ETH_ALEN) == 0){ ++ memcpy(arptable[ARP_SERVER].node, arpreply->shwaddr, ETH_ALEN); ++ memcpy(&arptable[ARP_SERVER].ipaddr, arpreply->sipaddr, sizeof(in_addr)); ++ memcpy(&arptable[ARP_CLIENT].ipaddr, arpreply->tipaddr, sizeof(in_addr)); ++ return 1; ++ } ++ return 0; ++} ++ ++int rarp(void) ++{ ++ int retry; ++ ++ /* arp and rarp requests share the same packet structure. */ ++ struct arprequest rarpreq; ++ ++ if(!grub_eth_probe()) ++ return 0; ++ network_ready = 0; ++ ++ memset(&rarpreq, 0, sizeof(rarpreq)); ++ ++ rarpreq.hwtype = htons(1); ++ rarpreq.protocol = htons(IP); ++ rarpreq.hwlen = ETH_ALEN; ++ rarpreq.protolen = 4; ++ rarpreq.opcode = htons(RARP_REQUEST); ++ memcpy(&rarpreq.shwaddr, arptable[ARP_CLIENT].node, ETH_ALEN); ++ /* sipaddr is already zeroed out */ ++ memcpy(&rarpreq.thwaddr, arptable[ARP_CLIENT].node, ETH_ALEN); ++ /* tipaddr is already zeroed out */ ++ ++ for (retry = 0; retry < MAX_ARP_RETRIES; ++retry) { ++ long timeout; ++ eth_transmit(broadcast, RARP, sizeof(rarpreq), &rarpreq); ++ ++ timeout = rfc2131_sleep_interval(TIMEOUT, retry); ++ if (await_reply(await_rarp, 0, rarpreq.shwaddr, timeout)) ++ break; ++ if (user_abort) ++ return 0; ++ } ++ ++ if (retry < MAX_ARP_RETRIES) { ++ network_ready = 1; ++ return (1); ++ } ++ return (0); ++} ++ ++/** ++ * bootp ++ * ++ * Get IP address by bootp, segregate from bootp in etherboot. ++ **/ ++static int await_bootp(int ival __unused, void *ptr __unused, ++ unsigned short ptype __unused, struct iphdr *ip __unused, ++ struct udphdr *udp) ++{ ++ struct bootp_t *bootpreply; ++ int len; /* Length of vendor */ ++ ++ if (!udp) { ++ return 0; ++ } ++ bootpreply = (struct bootp_t *) ++ &nic.packet[ETH_HLEN + sizeof(struct iphdr) + sizeof(struct udphdr)]; ++ len = nic.packetlen - (ETH_HLEN + sizeof(struct iphdr) + ++ sizeof(struct udphdr) + sizeof(struct bootp_t) - BOOTP_VENDOR_LEN); ++ if (len < 0) { ++ return 0; ++ } ++ if (udp->dest != htons(BOOTP_CLIENT)) ++ return 0; ++ if (bootpreply->bp_op != BOOTP_REPLY) ++ return 0; ++ if (bootpreply->bp_xid != xid) ++ return 0; ++ if (memcmp((char *)&bootpreply->bp_siaddr, (char *)&zeroIP, sizeof(in_addr)) == 0) ++ return 0; ++ if ((memcmp(broadcast, bootpreply->bp_hwaddr, ETH_ALEN) != 0) && ++ (memcmp(arptable[ARP_CLIENT].node, bootpreply->bp_hwaddr, ETH_ALEN) != 0)) { ++ return 0; ++ } ++ arptable[ARP_CLIENT].ipaddr.s_addr = bootpreply->bp_yiaddr.s_addr; ++ netmask = default_netmask(); ++ arptable[ARP_SERVER].ipaddr.s_addr = bootpreply->bp_siaddr.s_addr; ++ memset(arptable[ARP_SERVER].node, 0, ETH_ALEN); /* Kill arp */ ++ arptable[ARP_GATEWAY].ipaddr.s_addr = bootpreply->bp_giaddr.s_addr; ++ memset(arptable[ARP_GATEWAY].node, 0, ETH_ALEN); /* Kill arp */ ++ /* We don't care bootpreply->bp_file, it must be 'pxegrub':-) */ ++ memcpy((char *)rfc1533_venddata, (char *)(bootpreply->bp_vend), len); ++ decode_rfc1533(rfc1533_venddata, 0, len, 1); ++ return(1); ++} ++ ++int bootp(void) ++{ ++ int retry; ++ struct bootpip_t ip; ++ unsigned long starttime; ++ ++ EnterFunction("bootp"); ++ ++ if(!grub_eth_probe()) ++ return 0; ++ network_ready = 0; ++ ++ memset(&ip, 0, sizeof(struct bootpip_t)); ++ ip.bp.bp_op = BOOTP_REQUEST; ++ ip.bp.bp_htype = 1; ++ ip.bp.bp_hlen = ETH_ALEN; ++ starttime = currticks(); ++ /* Use lower 32 bits of node address, more likely to be ++ distinct than the time since booting */ ++ memcpy(&xid, &arptable[ARP_CLIENT].node[2], sizeof(xid)); ++ ip.bp.bp_xid = xid += htonl(starttime); ++ /* bp_secs defaults to zero */ ++ memcpy(ip.bp.bp_hwaddr, arptable[ARP_CLIENT].node, ETH_ALEN); ++ memcpy(ip.bp.bp_vend, rfc1533_cookie_bootp, sizeof(rfc1533_cookie_bootp)); /* request RFC-style options */ ++ ++ for (retry = 0; retry < MAX_BOOTP_RETRIES; ) { ++ long timeout; ++ ++ rx_qdrain(); ++ ++ udp_transmit(IP_BROADCAST, BOOTP_CLIENT, BOOTP_SERVER, ++ sizeof(struct bootpip_t), &ip); ++ timeout = rfc2131_sleep_interval(TIMEOUT, retry++); ++ if (await_reply(await_bootp, 0, NULL, timeout)){ ++ network_ready = 1; ++ return(1); ++ } ++ if (user_abort) ++ return 0; ++ ip.bp.bp_secs = htons((currticks()-starttime)/TICKS_PER_SEC); ++ } ++ return(0); ++} ++ ++/** ++ * dhcp ++ * ++ * Get IP address by dhcp, segregate from bootp in etherboot. ++ **/ ++static int await_dhcp(int ival __unused, void *ptr __unused, ++ unsigned short ptype __unused, struct iphdr *ip __unused, ++ struct udphdr *udp) ++{ ++ struct dhcp_t *dhcpreply; ++ int len; ++ ++ if (!udp) { ++ return 0; ++ } ++ dhcpreply = (struct dhcp_t *) ++ &nic.packet[ETH_HLEN + sizeof(struct iphdr) + sizeof(struct udphdr)]; ++ len = nic.packetlen - (ETH_HLEN + sizeof(struct iphdr) + ++ sizeof(struct udphdr) + sizeof(struct dhcp_t) - DHCP_OPT_LEN); ++ if (len < 0){ ++ return 0; ++ } ++ if (udp->dest != htons(BOOTP_CLIENT)) ++ return 0; ++ if (dhcpreply->bp_op != BOOTP_REPLY) ++ return 0; ++ if (dhcpreply->bp_xid != xid) ++ return 0; ++ if (memcmp((char *)&dhcpreply->bp_siaddr, (char *)&zeroIP, sizeof(in_addr)) == 0) ++ return 0; ++ if ((memcmp(broadcast, dhcpreply->bp_hwaddr, ETH_ALEN) != 0) && ++ (memcmp(arptable[ARP_CLIENT].node, dhcpreply->bp_hwaddr, ETH_ALEN) != 0)) { ++ return 0; ++ } ++ arptable[ARP_CLIENT].ipaddr.s_addr = dhcpreply->bp_yiaddr.s_addr; ++ dhcp_addr.s_addr = dhcpreply->bp_yiaddr.s_addr; ++ netmask = default_netmask(); ++ arptable[ARP_SERVER].ipaddr.s_addr = dhcpreply->bp_siaddr.s_addr; ++ memset(arptable[ARP_SERVER].node, 0, ETH_ALEN); /* Kill arp */ ++ arptable[ARP_GATEWAY].ipaddr.s_addr = dhcpreply->bp_giaddr.s_addr; ++ memset(arptable[ARP_GATEWAY].node, 0, ETH_ALEN); /* Kill arp */ ++ /* We don't care bootpreply->bp_file. It must be 'pxegrub' */ ++ memcpy((char *)rfc1533_venddata, (char *)(dhcpreply->bp_vend), len); ++ decode_rfc1533(rfc1533_venddata, 0, len, 1); ++ return(1); ++} ++ ++int dhcp(void) ++{ ++ int retry; ++ int reqretry; ++ struct dhcpip_t ip; ++ unsigned long starttime; ++ ++ if(!grub_eth_probe()) ++ return 0; ++ ++ network_ready = 0; ++ ++ memset(&ip, 0, sizeof(struct dhcpip_t)); ++ ip.bp.bp_op = BOOTP_REQUEST; ++ ip.bp.bp_htype = 1; ++ ip.bp.bp_hlen = ETH_ALEN; ++ starttime = currticks(); ++ /* Use lower 32 bits of node address, more likely to be ++ distinct than the time since booting */ ++ memcpy(&xid, &arptable[ARP_CLIENT].node[2], sizeof(xid)); ++ ip.bp.bp_xid = xid += htonl(starttime); ++ memcpy(ip.bp.bp_hwaddr, arptable[ARP_CLIENT].node, ETH_ALEN); ++ memcpy(ip.bp.bp_vend, rfc1533_cookie_dhcp, sizeof rfc1533_cookie_dhcp); /* request RFC-style options */ ++ memcpy(ip.bp.bp_vend + sizeof rfc1533_cookie_dhcp, dhcpdiscover, sizeof dhcpdiscover); ++ ++ for (retry = 0; retry < MAX_BOOTP_RETRIES; ) { ++ long timeout; ++ ++ rx_qdrain(); ++ ++ udp_transmit(IP_BROADCAST, BOOTP_CLIENT, BOOTP_SERVER, ++ sizeof(struct bootpip_t), &ip); ++ timeout = rfc2131_sleep_interval(TIMEOUT, retry++); ++ if (await_reply(await_dhcp, 0, NULL, timeout)) { ++ /* If not a DHCPOFFER then must be just a ++ BOOTP reply, be backward compatible with ++ BOOTP then. Jscott report a bug here, but I ++ don't know how it happened */ ++ if (dhcp_reply != DHCPOFFER){ ++ network_ready = 1; ++ return(1); ++ } ++ dhcp_reply = 0; ++ memcpy(ip.bp.bp_vend, rfc1533_cookie_dhcp, sizeof rfc1533_cookie_dhcp); ++ memcpy(ip.bp.bp_vend + sizeof rfc1533_cookie_dhcp, dhcprequest, sizeof dhcprequest); ++ /* Beware: the magic numbers 9 and 15 depend on ++ the layout of dhcprequest */ ++ memcpy(&ip.bp.bp_vend[9], &dhcp_server, sizeof(in_addr)); ++ memcpy(&ip.bp.bp_vend[15], &dhcp_addr, sizeof(in_addr)); ++ for (reqretry = 0; reqretry < MAX_BOOTP_RETRIES; ) { ++ udp_transmit(IP_BROADCAST, BOOTP_CLIENT, BOOTP_SERVER, ++ sizeof(struct bootpip_t), &ip); ++ dhcp_reply=0; ++ timeout = rfc2131_sleep_interval(TIMEOUT, reqretry++); ++ if (await_reply(await_dhcp, 0, NULL, timeout)) ++ if (dhcp_reply == DHCPACK){ ++ network_ready = 1; ++ return(1); ++ } ++ if (user_abort) ++ return 0; ++ } ++ } ++ if (user_abort) ++ return 0; ++ ip.bp.bp_secs = htons((currticks()-starttime)/TICKS_PER_SEC); ++ } ++ return(0); ++} ++ ++#ifdef MULTICAST_LEVEL2 ++static void send_igmp_reports(unsigned long now) ++{ ++ int i; ++ for(i = 0; i < MAX_IGMP; i++) { ++ if (igmptable[i].time && (now >= igmptable[i].time)) { ++ struct igmp_ip_t igmp; ++ igmp.router_alert[0] = 0x94; ++ igmp.router_alert[1] = 0x04; ++ igmp.router_alert[2] = 0; ++ igmp.router_alert[3] = 0; ++ build_ip_hdr(igmptable[i].group.s_addr, ++ 1, IP_IGMP, sizeof(igmp.router_alert), sizeof(igmp), &igmp); ++ igmp.igmp.type = IGMPv2_REPORT; ++ if (last_igmpv1 && ++ (now < last_igmpv1 + IGMPv1_ROUTER_PRESENT_TIMEOUT)) { ++ igmp.igmp.type = IGMPv1_REPORT; ++ } ++ igmp.igmp.response_time = 0; ++ igmp.igmp.chksum = 0; ++ igmp.igmp.group.s_addr = igmptable[i].group.s_addr; ++ igmp.igmp.chksum = ipchksum(&igmp.igmp, sizeof(igmp.igmp)); ++ ip_transmit(sizeof(igmp), &igmp); ++#ifdef MDEBUG ++ printf("Sent IGMP report to: %@\n", igmp.igmp.group.s_addr); ++#endif ++ /* Don't send another igmp report until asked */ ++ igmptable[i].time = 0; ++ } ++ } ++} ++ ++static void process_igmp(struct iphdr *ip, unsigned long now) ++{ ++ struct igmp *igmp; ++ int i; ++ unsigned iplen = 0; ++ if (!ip || (ip->protocol == IP_IGMP) || ++ (nic.packetlen < sizeof(struct iphdr) + sizeof(struct igmp))) { ++ return; ++ } ++ iplen = (ip->verhdrlen & 0xf)*4; ++ igmp = (struct igmp *)&nic.packet[sizeof(struct iphdr)]; ++ if (ipchksum(igmp, ntohs(ip->len) - iplen) != 0) ++ return; ++ if ((igmp->type == IGMP_QUERY) && ++ (ip->dest.s_addr == htonl(GROUP_ALL_HOSTS))) { ++ unsigned long interval = IGMP_INTERVAL; ++ if (igmp->response_time == 0) { ++ last_igmpv1 = now; ++ } else { ++ interval = (igmp->response_time * TICKS_PER_SEC)/10; ++ } ++ ++#ifdef MDEBUG ++ printf("Received IGMP query for: %@\n", igmp->group.s_addr); ++#endif ++ for(i = 0; i < MAX_IGMP; i++) { ++ uint32_t group = igmptable[i].group.s_addr; ++ if ((group == 0) || (group == igmp->group.s_addr)) { ++ unsigned long time; ++ time = currticks() + rfc1112_sleep_interval(interval, 0); ++ if (time < igmptable[i].time) { ++ igmptable[i].time = time; ++ } ++ } ++ } ++ } ++ if (((igmp->type == IGMPv1_REPORT) || (igmp->type == IGMPv2_REPORT)) && ++ (ip->dest.s_addr == igmp->group.s_addr)) { ++#ifdef MDEBUG ++ printf("Received IGMP report for: %@\n", igmp->group.s_addr); ++#endif ++ for(i = 0; i < MAX_IGMP; i++) { ++ if ((igmptable[i].group.s_addr == igmp->group.s_addr) && ++ igmptable[i].time != 0) { ++ igmptable[i].time = 0; ++ } ++ } ++ } ++} ++ ++void leave_group(int slot) ++{ ++ /* Be very stupid and always send a leave group message if ++ * I have subscribed. Imperfect but it is standards ++ * compliant, easy and reliable to implement. ++ * ++ * The optimal group leave method is to only send leave when, ++ * we were the last host to respond to a query on this group, ++ * and igmpv1 compatibility is not enabled. ++ */ ++ if (igmptable[slot].group.s_addr) { ++ struct igmp_ip_t igmp; ++ igmp.router_alert[0] = 0x94; ++ igmp.router_alert[1] = 0x04; ++ igmp.router_alert[2] = 0; ++ igmp.router_alert[3] = 0; ++ build_ip_hdr(htonl(GROUP_ALL_HOSTS), ++ 1, IP_IGMP, sizeof(igmp.router_alert), sizeof(igmp), &igmp); ++ igmp.igmp.type = IGMP_LEAVE; ++ igmp.igmp.response_time = 0; ++ igmp.igmp.chksum = 0; ++ igmp.igmp.group.s_addr = igmptable[slot].group.s_addr; ++ igmp.igmp.chksum = ipchksum(&igmp.igmp, sizeof(igmp)); ++ ip_transmit(sizeof(igmp), &igmp); ++#ifdef MDEBUG ++ printf("Sent IGMP leave for: %@\n", igmp.igmp.group.s_addr); ++#endif ++ } ++ memset(&igmptable[slot], 0, sizeof(igmptable[0])); ++} ++ ++void join_group(int slot, unsigned long group) ++{ ++ /* I have already joined */ ++ if (igmptable[slot].group.s_addr == group) ++ return; ++ if (igmptable[slot].group.s_addr) { ++ leave_group(slot); ++ } ++ /* Only join a group if we are given a multicast ip, this way ++ * code can be given a non-multicast (broadcast or unicast ip) ++ * and still work... ++ */ ++ if ((group & htonl(MULTICAST_MASK)) == htonl(MULTICAST_NETWORK)) { ++ igmptable[slot].group.s_addr = group; ++ igmptable[slot].time = currticks(); ++ } ++} ++#else ++#define send_igmp_reports(now); ++#define process_igmp(ip, now) ++#endif ++ ++/************************************************************************** ++AWAIT_REPLY - Wait until we get a response for our request ++************f**************************************************************/ ++int await_reply(reply_t reply, int ival, void *ptr, long timeout) ++{ ++ unsigned long time, now; ++ struct iphdr *ip; ++ unsigned iplen = 0; ++ struct udphdr *udp; ++ unsigned short ptype; ++ int result; ++ ++ user_abort = 0; ++ ++ time = timeout + currticks(); ++ /* The timeout check is done below. The timeout is only checked if ++ * there is no packet in the Rx queue. This assumes that eth_poll() ++ * needs a negligible amount of time. ++ */ ++ for (;;) { ++ now = currticks(); ++ send_igmp_reports(now); ++ result = eth_poll(1); ++ if (result == 0) { ++ /* We don't have anything */ ++ ++ /* Check for abort key only if the Rx queue is empty - ++ * as long as we have something to process, don't ++ * assume that something failed. It is unlikely that ++ * we have no processing time left between packets. */ ++ poll_interruptions(); ++ /* Do the timeout after at least a full queue walk. */ ++ if ((timeout == 0) || (currticks() > time) || user_abort == 1) { ++ break; ++ } ++ continue; ++ } ++ ++ /* We have something! */ ++ ++ /* Find the Ethernet packet type */ ++ if (nic.packetlen >= ETH_HLEN) { ++ ptype = ((unsigned short) nic.packet[12]) << 8 ++ | ((unsigned short) nic.packet[13]); ++ } else continue; /* what else could we do with it? */ ++ /* Verify an IP header */ ++ ip = 0; ++ if ((ptype == IP) && (nic.packetlen >= ETH_HLEN + sizeof(struct iphdr))) { ++ unsigned ipoptlen; ++ ip = (struct iphdr *)&nic.packet[ETH_HLEN]; ++ if ((ip->verhdrlen < 0x45) || (ip->verhdrlen > 0x4F)) ++ continue; ++ iplen = (ip->verhdrlen & 0xf) * 4; ++ if (ipchksum(ip, iplen) != 0) ++ continue; ++ if (ip->frags & htons(0x3FFF)) { ++ static int warned_fragmentation = 0; ++ if (!warned_fragmentation) { ++ printf("ALERT: got a fragmented packet - reconfigure your server\n"); ++ warned_fragmentation = 1; ++ } ++ continue; ++ } ++ if (ntohs(ip->len) > ETH_MAX_MTU) ++ continue; ++ ++ ipoptlen = iplen - sizeof(struct iphdr); ++ if (ipoptlen) { ++ /* Delete the ip options, to guarantee ++ * good alignment, and make etherboot simpler. ++ */ ++ memmove(&nic.packet[ETH_HLEN + sizeof(struct iphdr)], ++ &nic.packet[ETH_HLEN + iplen], ++ nic.packetlen - ipoptlen); ++ nic.packetlen -= ipoptlen; ++ } ++ } ++ udp = 0; ++ if (ip && (ip->protocol == IP_UDP) && ++ (nic.packetlen >= ETH_HLEN + sizeof(struct iphdr) + sizeof(struct udphdr))) { ++ udp = (struct udphdr *)&nic.packet[ETH_HLEN + sizeof(struct iphdr)]; ++ ++ /* Make certain we have a reasonable packet length */ ++ if (ntohs(udp->len) > (ntohs(ip->len) - iplen)) ++ continue; ++ ++ if (udp->chksum && udpchksum(ip, udp)) { ++ printf("UDP checksum error\n"); ++ continue; ++ } ++ } ++ result = reply(ival, ptr, ptype, ip, udp); ++ if (result > 0) { ++ return result; ++ } ++ ++ /* If it isn't a packet the upper layer wants see if there is a default ++ * action. This allows us reply to arp and igmp queryies. ++ */ ++ if ((ptype == ARP) && ++ (nic.packetlen >= ETH_HLEN + sizeof(struct arprequest))) { ++ struct arprequest *arpreply; ++ unsigned long tmp; ++ ++ arpreply = (struct arprequest *)&nic.packet[ETH_HLEN]; ++ memcpy(&tmp, arpreply->tipaddr, sizeof(in_addr)); ++ if ((arpreply->opcode == htons(ARP_REQUEST)) && ++ (tmp == arptable[ARP_CLIENT].ipaddr.s_addr)) { ++ arpreply->opcode = htons(ARP_REPLY); ++ memcpy(arpreply->tipaddr, arpreply->sipaddr, sizeof(in_addr)); ++ memcpy(arpreply->thwaddr, arpreply->shwaddr, ETH_ALEN); ++ memcpy(arpreply->sipaddr, &arptable[ARP_CLIENT].ipaddr, sizeof(in_addr)); ++ memcpy(arpreply->shwaddr, arptable[ARP_CLIENT].node, ETH_ALEN); ++ eth_transmit(arpreply->thwaddr, ARP, ++ sizeof(struct arprequest), ++ arpreply); ++#ifdef MDEBUG ++ memcpy(&tmp, arpreply->tipaddr, sizeof(in_addr)); ++ printf("Sent ARP reply to: %@\n",tmp); ++#endif /* MDEBUG */ ++ } ++ } ++ process_igmp(ip, now); ++ } ++ return(0); ++} ++ ++#ifdef REQUIRE_VCI_ETHERBOOT ++/************************************************************************** ++FIND_VCI_ETHERBOOT - Looks for "Etherboot" in Vendor Encapsulated Identifiers ++On entry p points to byte count of VCI options ++**************************************************************************/ ++static int find_vci_etherboot(unsigned char *p) ++{ ++ unsigned char *end = p + 1 + *p; ++ ++ for (p++; p < end; ) { ++ if (*p == RFC2132_VENDOR_CLASS_ID) { ++ if (strncmp("Etherboot", p + 2, sizeof("Etherboot") - 1) == 0) ++ return (1); ++ } else if (*p == RFC1533_END) ++ return (0); ++ p += TAG_LEN(p) + 2; ++ } ++ return (0); ++} ++#endif /* REQUIRE_VCI_ETHERBOOT */ ++ ++/** ++ * decode_rfc1533 ++ * ++ * Decodes RFC1533 header ++ **/ ++int decode_rfc1533(unsigned char *p, unsigned int block, unsigned int len, int eof) ++{ ++ static unsigned char *extdata = NULL, *extend = NULL; ++ unsigned char *extpath = NULL; ++ unsigned char *endp; ++ ++ if (block == 0) { ++ end_of_rfc1533 = NULL; ++ if (memcmp(p, rfc1533_cookie, sizeof(rfc1533_cookie))) ++ return(0); /* no RFC 1533 header found */ ++ p += 4; ++ endp = p + len; ++ } else { ++ if (block == 1) { ++ if (memcmp(p, rfc1533_cookie, sizeof(rfc1533_cookie))) ++ return(0); /* no RFC 1533 header found */ ++ p += 4; ++ len -= 4; } ++ if (extend + len <= (unsigned char *) ++ rfc1533_venddata + sizeof(rfc1533_venddata)) { ++ memcpy(extend, p, len); ++ extend += len; ++ } else { ++ printf("Overflow in vendor data buffer! Aborting...\n"); ++ *extdata = RFC1533_END; ++ return(0); ++ } ++ p = extdata; endp = extend; ++ } ++ if (!eof) ++ return 1; ++ while (p < endp) { ++ unsigned char c = *p; ++ if (c == RFC1533_PAD) { ++ p++; ++ continue; ++ } ++ else if (c == RFC1533_END) { ++ end_of_rfc1533 = endp = p; ++ continue; ++ } ++ else if (c == RFC1533_NETMASK) ++ memcpy(&netmask, p+2, sizeof(in_addr)); ++ else if (c == RFC1533_GATEWAY) { ++ /* This is a little simplistic, but it will ++ usually be sufficient. ++ Take only the first entry */ ++ if (TAG_LEN(p) >= sizeof(in_addr)) ++ memcpy(&arptable[ARP_GATEWAY].ipaddr, p+2, sizeof(in_addr)); ++ } ++ else if (c == RFC1533_EXTENSIONPATH) ++ extpath = p; ++ else if (c == RFC2132_MSG_TYPE) ++ dhcp_reply=*(p+2); ++ else if (c == RFC2132_SRV_ID) ++ memcpy(&dhcp_server, p+2, sizeof(in_addr)); ++ else if (c == RFC1533_HOSTNAME) { ++ hostname = p + 2; ++ hostnamelen = *(p + 1); ++ } ++ else if (c == RFC1533_VENDOR_CONFIGFILE){ ++ int l = TAG_LEN (p); ++ ++ /* Eliminate the trailing NULs according to RFC 2132. */ ++ while (*(p + 2 + l - 1) == '\000' && l > 0) ++ l--; ++ ++ /* XXX: Should check if LEN is less than the maximum length ++ of CONFIG_FILE. This kind of robustness will be a goal ++ in GRUB 1.0. */ ++ memcpy (config_file, p + 2, l); ++ config_file[l] = 0; ++ } ++ else { ++ ; ++ } ++ p += TAG_LEN(p) + 2; ++ } ++ extdata = extend = endp; ++ if (block <= 0 && extpath != NULL) { ++ char fname[64]; ++ if (TAG_LEN(extpath) >= sizeof(fname)){ ++ printf("Overflow in vendor data buffer! Aborting...\n"); ++ *extdata = RFC1533_END; ++ return(0); ++ } ++ memcpy(fname, extpath+2, TAG_LEN(extpath)); ++ fname[(int)TAG_LEN(extpath)] = '\0'; ++ printf("Loading BOOTP-extension file: %s\n",fname); ++ tftp_file_read(fname, decode_rfc1533); ++ } ++ return 1; /* proceed with next block */ ++} ++ ++ ++/* FIXME double check TWO_SECOND_DIVISOR */ ++#define TWO_SECOND_DIVISOR (RAND_MAX/TICKS_PER_SEC) ++/************************************************************************** ++RFC2131_SLEEP_INTERVAL - sleep for expotentially longer times (base << exp) +- 1 sec) ++**************************************************************************/ ++long rfc2131_sleep_interval(long base, int exp) ++{ ++ unsigned long tmo; ++#ifdef BACKOFF_LIMIT ++ if (exp > BACKOFF_LIMIT) ++ exp = BACKOFF_LIMIT; ++#endif ++ tmo = (base << exp) + (TICKS_PER_SEC - (random()/TWO_SECOND_DIVISOR)); ++ return tmo; ++} ++ ++#ifdef MULTICAST_LEVEL2 ++/************************************************************************** ++RFC1112_SLEEP_INTERVAL - sleep for expotentially longer times, up to (base << exp) ++**************************************************************************/ ++long rfc1112_sleep_interval(long base, int exp) ++{ ++ unsigned long divisor, tmo; ++#ifdef BACKOFF_LIMIT ++ if (exp > BACKOFF_LIMIT) ++ exp = BACKOFF_LIMIT; ++#endif ++ divisor = RAND_MAX/(base << exp); ++ tmo = random()/divisor; ++ return tmo; ++} ++#endif /* MULTICAST_LEVEL_2 */ ++/* ifconfig - configure network interface. */ ++int ++ifconfig (char *ip, char *sm, char *gw, char *svr) ++{ ++ in_addr tmp; ++ ++ if (sm) ++ { ++ if (! inet_aton (sm, &tmp)) ++ return 0; ++ ++ netmask = tmp.s_addr; ++ } ++ ++ if (ip) ++ { ++ if (! inet_aton (ip, &arptable[ARP_CLIENT].ipaddr)) ++ return 0; ++ ++ if (! netmask && ! sm) ++ netmask = default_netmask (); ++ } ++ ++ if (gw && ! inet_aton (gw, &arptable[ARP_GATEWAY].ipaddr)) ++ return 0; ++ ++ /* Clear out the ARP entry. */ ++ grub_memset (arptable[ARP_GATEWAY].node, 0, ETH_ALEN); ++ ++ if (svr && ! inet_aton (svr, &arptable[ARP_SERVER].ipaddr)) ++ return 0; ++ ++ /* Likewise. */ ++ grub_memset (arptable[ARP_SERVER].node, 0, ETH_ALEN); ++ ++ if (ip || sm) ++ { ++ if (IP_BROADCAST == (netmask | arptable[ARP_CLIENT].ipaddr.s_addr) ++ || netmask == (netmask | arptable[ARP_CLIENT].ipaddr.s_addr) ++ || ! netmask) ++ network_ready = 0; ++ else ++ network_ready = 1; ++ } ++ ++ return 1; ++} ++ ++/* ++ * print_network_configuration ++ * ++ * Output the network configuration. It may broke the graphic console now.:-( ++ */ ++void print_network_configuration (void) ++{ ++ EnterFunction("print_network_configuration"); ++ if (! grub_eth_probe ()) ++ grub_printf ("No ethernet card found.\n"); ++ else if (! network_ready) ++ grub_printf ("Not initialized yet.\n"); ++ else { ++ etherboot_printf ("Address: %@\n", arptable[ARP_CLIENT].ipaddr.s_addr); ++ etherboot_printf ("Netmask: %@\n", netmask); ++ etherboot_printf ("Server: %@\n", arptable[ARP_SERVER].ipaddr.s_addr); ++ etherboot_printf ("Gateway: %@\n", arptable[ARP_GATEWAY].ipaddr.s_addr); ++ } ++ LeaveFunction("print_network_configuration"); ++} ++ ++/** ++ * cleanup_net ++ * ++ * Mark network unusable, and disable NICs ++ */ ++void cleanup_net (void) ++{ ++ if (network_ready){ ++ /* Stop receiving packets. */ ++ eth_disable (); ++ network_ready = 0; ++ } ++} +diff -Naur grub-0.97.orig/netboot/nic.h grub-0.97/netboot/nic.h +--- grub-0.97.orig/netboot/nic.h 2003-07-09 11:45:38.000000000 +0000 ++++ grub-0.97/netboot/nic.h 2005-08-31 19:03:35.000000000 +0000 +@@ -8,24 +8,38 @@ + #ifndef NIC_H + #define NIC_H + ++#include "dev.h" ++ ++typedef enum { ++ DISABLE = 0, ++ ENABLE, ++ FORCE ++} irq_action_t; ++ + /* + * Structure returned from eth_probe and passed to other driver + * functions. + */ +- + struct nic + { +- void (*reset)P((struct nic *)); +- int (*poll)P((struct nic *)); ++ struct dev dev; /* This must come first */ ++ int (*poll)P((struct nic *, int retrieve)); + void (*transmit)P((struct nic *, const char *d, + unsigned int t, unsigned int s, const char *p)); +- void (*disable)P((struct nic *)); ++ void (*irq)P((struct nic *, irq_action_t)); + int flags; /* driver specific flags */ + struct rom_info *rom_info; /* -> rom_info from main */ + unsigned char *node_addr; +- char *packet; ++ unsigned char *packet; + unsigned int packetlen; ++ unsigned int ioaddr; ++ unsigned char irqno; + void *priv_data; /* driver can hang private data here */ + }; + ++extern int eth_probe(struct dev *dev); ++extern int eth_poll(int retrieve); ++extern void eth_transmit(const char *d, unsigned int t, unsigned int s, const void *p); ++extern void eth_disable(void); ++extern void eth_irq(irq_action_t action); + #endif /* NIC_H */ +diff -Naur grub-0.97.orig/netboot/ns83820.c grub-0.97/netboot/ns83820.c +--- grub-0.97.orig/netboot/ns83820.c 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/ns83820.c 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,1020 @@ ++/************************************************************************** ++* ns83820.c: Etherboot device driver for the National Semiconductor 83820 ++* Written 2004 by Timothy Legge ++* ++* This program is free software; you can redistribute it and/or modify ++* it under the terms of the GNU General Public License as published by ++* the Free Software Foundation; either version 2 of the License, or ++* (at your option) any later version. ++* ++* This program is distributed in the hope that it will be useful, ++* but WITHOUT ANY WARRANTY; without even the implied warranty of ++* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++* GNU General Public License for more details. ++* ++* You should have received a copy of the GNU General Public License ++* along with this program; if not, write to the Free Software ++* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++* ++* Portions of this code based on: ++* ns83820.c by Benjamin LaHaise with contributions ++* for Linux kernel 2.4.x. ++* ++* Linux Driver Version 0.20, 20020610 ++* ++* This development of this Etherboot driver was funded by: ++* ++* NXTV: http://www.nxtv.com/ ++* ++* REVISION HISTORY: ++* ================ ++* ++* v1.0 02-16-2004 timlegge Initial port of Linux driver ++* v1.1 02-19-2004 timlegge More rohbust transmit and poll ++* ++* Indent Options: indent -kr -i8 ++***************************************************************************/ ++ ++/* to get some global routines like printf */ ++#include "etherboot.h" ++/* to get the interface to the body of the program */ ++#include "nic.h" ++/* to get the PCI support functions, if this is a PCI NIC */ ++#include "pci.h" ++ ++#if ARCH == ia64 /* Support 64-bit addressing */ ++#define USE_64BIT_ADDR ++#endif ++ ++//#define DDEBUG ++#ifdef DDEBUG ++#define dprintf(x) printf x ++#else ++#define dprintf(x) ++#endif ++ ++typedef unsigned char u8; ++typedef signed char s8; ++typedef unsigned short u16; ++typedef signed short s16; ++typedef unsigned int u32; ++typedef signed int s32; ++ ++#define HZ 100 ++ ++/* Condensed operations for readability. */ ++#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr)) ++#define le32desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr)) ++ ++/* NIC specific static variables go here */ ++ ++/* Global parameters. See MODULE_PARM near the bottom. */ ++// static int ihr = 2; ++static int reset_phy = 0; ++static int lnksts = 0; /* CFG_LNKSTS bit polarity */ ++ ++#if defined(CONFIG_HIGHMEM64G) || defined(__ia64__) ++#define USE_64BIT_ADDR "+" ++#endif ++ ++#if defined(USE_64BIT_ADDR) ++#define TRY_DAC 1 ++#else ++#define TRY_DAC 0 ++#endif ++ ++/* tunables */ ++#define RX_BUF_SIZE 1500 /* 8192 */ ++ ++/* Must not exceed ~65000. */ ++#define NR_RX_DESC 64 ++#define NR_TX_DESC 1 ++ ++ /* not tunable *//* Extra 6 bytes for 64 bit alignment (divisable by 8) */ ++#define REAL_RX_BUF_SIZE (RX_BUF_SIZE + 14 + 6) /* rx/tx mac addr + type */ ++ ++#define MIN_TX_DESC_FREE 8 ++ ++/* register defines */ ++#define CFGCS 0x04 ++ ++#define CR_TXE 0x00000001 ++#define CR_TXD 0x00000002 ++/* Ramit : Here's a tip, don't do a RXD immediately followed by an RXE ++ * The Receive engine skips one descriptor and moves ++ * onto the next one!! */ ++#define CR_RXE 0x00000004 ++#define CR_RXD 0x00000008 ++#define CR_TXR 0x00000010 ++#define CR_RXR 0x00000020 ++#define CR_SWI 0x00000080 ++#define CR_RST 0x00000100 ++ ++#define PTSCR_EEBIST_FAIL 0x00000001 ++#define PTSCR_EEBIST_EN 0x00000002 ++#define PTSCR_EELOAD_EN 0x00000004 ++#define PTSCR_RBIST_FAIL 0x000001b8 ++#define PTSCR_RBIST_DONE 0x00000200 ++#define PTSCR_RBIST_EN 0x00000400 ++#define PTSCR_RBIST_RST 0x00002000 ++ ++#define MEAR_EEDI 0x00000001 ++#define MEAR_EEDO 0x00000002 ++#define MEAR_EECLK 0x00000004 ++#define MEAR_EESEL 0x00000008 ++#define MEAR_MDIO 0x00000010 ++#define MEAR_MDDIR 0x00000020 ++#define MEAR_MDC 0x00000040 ++ ++#define ISR_TXDESC3 0x40000000 ++#define ISR_TXDESC2 0x20000000 ++#define ISR_TXDESC1 0x10000000 ++#define ISR_TXDESC0 0x08000000 ++#define ISR_RXDESC3 0x04000000 ++#define ISR_RXDESC2 0x02000000 ++#define ISR_RXDESC1 0x01000000 ++#define ISR_RXDESC0 0x00800000 ++#define ISR_TXRCMP 0x00400000 ++#define ISR_RXRCMP 0x00200000 ++#define ISR_DPERR 0x00100000 ++#define ISR_SSERR 0x00080000 ++#define ISR_RMABT 0x00040000 ++#define ISR_RTABT 0x00020000 ++#define ISR_RXSOVR 0x00010000 ++#define ISR_HIBINT 0x00008000 ++#define ISR_PHY 0x00004000 ++#define ISR_PME 0x00002000 ++#define ISR_SWI 0x00001000 ++#define ISR_MIB 0x00000800 ++#define ISR_TXURN 0x00000400 ++#define ISR_TXIDLE 0x00000200 ++#define ISR_TXERR 0x00000100 ++#define ISR_TXDESC 0x00000080 ++#define ISR_TXOK 0x00000040 ++#define ISR_RXORN 0x00000020 ++#define ISR_RXIDLE 0x00000010 ++#define ISR_RXEARLY 0x00000008 ++#define ISR_RXERR 0x00000004 ++#define ISR_RXDESC 0x00000002 ++#define ISR_RXOK 0x00000001 ++ ++#define TXCFG_CSI 0x80000000 ++#define TXCFG_HBI 0x40000000 ++#define TXCFG_MLB 0x20000000 ++#define TXCFG_ATP 0x10000000 ++#define TXCFG_ECRETRY 0x00800000 ++#define TXCFG_BRST_DIS 0x00080000 ++#define TXCFG_MXDMA1024 0x00000000 ++#define TXCFG_MXDMA512 0x00700000 ++#define TXCFG_MXDMA256 0x00600000 ++#define TXCFG_MXDMA128 0x00500000 ++#define TXCFG_MXDMA64 0x00400000 ++#define TXCFG_MXDMA32 0x00300000 ++#define TXCFG_MXDMA16 0x00200000 ++#define TXCFG_MXDMA8 0x00100000 ++ ++#define CFG_LNKSTS 0x80000000 ++#define CFG_SPDSTS 0x60000000 ++#define CFG_SPDSTS1 0x40000000 ++#define CFG_SPDSTS0 0x20000000 ++#define CFG_DUPSTS 0x10000000 ++#define CFG_TBI_EN 0x01000000 ++#define CFG_MODE_1000 0x00400000 ++/* Ramit : Dont' ever use AUTO_1000, it never works and is buggy. ++ * Read the Phy response and then configure the MAC accordingly */ ++#define CFG_AUTO_1000 0x00200000 ++#define CFG_PINT_CTL 0x001c0000 ++#define CFG_PINT_DUPSTS 0x00100000 ++#define CFG_PINT_LNKSTS 0x00080000 ++#define CFG_PINT_SPDSTS 0x00040000 ++#define CFG_TMRTEST 0x00020000 ++#define CFG_MRM_DIS 0x00010000 ++#define CFG_MWI_DIS 0x00008000 ++#define CFG_T64ADDR 0x00004000 ++#define CFG_PCI64_DET 0x00002000 ++#define CFG_DATA64_EN 0x00001000 ++#define CFG_M64ADDR 0x00000800 ++#define CFG_PHY_RST 0x00000400 ++#define CFG_PHY_DIS 0x00000200 ++#define CFG_EXTSTS_EN 0x00000100 ++#define CFG_REQALG 0x00000080 ++#define CFG_SB 0x00000040 ++#define CFG_POW 0x00000020 ++#define CFG_EXD 0x00000010 ++#define CFG_PESEL 0x00000008 ++#define CFG_BROM_DIS 0x00000004 ++#define CFG_EXT_125 0x00000002 ++#define CFG_BEM 0x00000001 ++ ++#define EXTSTS_UDPPKT 0x00200000 ++#define EXTSTS_TCPPKT 0x00080000 ++#define EXTSTS_IPPKT 0x00020000 ++ ++#define SPDSTS_POLARITY (CFG_SPDSTS1 | CFG_SPDSTS0 | CFG_DUPSTS | (lnksts ? CFG_LNKSTS : 0)) ++ ++#define MIBC_MIBS 0x00000008 ++#define MIBC_ACLR 0x00000004 ++#define MIBC_FRZ 0x00000002 ++#define MIBC_WRN 0x00000001 ++ ++#define PCR_PSEN (1 << 31) ++#define PCR_PS_MCAST (1 << 30) ++#define PCR_PS_DA (1 << 29) ++#define PCR_STHI_8 (3 << 23) ++#define PCR_STLO_4 (1 << 23) ++#define PCR_FFHI_8K (3 << 21) ++#define PCR_FFLO_4K (1 << 21) ++#define PCR_PAUSE_CNT 0xFFFE ++ ++#define RXCFG_AEP 0x80000000 ++#define RXCFG_ARP 0x40000000 ++#define RXCFG_STRIPCRC 0x20000000 ++#define RXCFG_RX_FD 0x10000000 ++#define RXCFG_ALP 0x08000000 ++#define RXCFG_AIRL 0x04000000 ++#define RXCFG_MXDMA512 0x00700000 ++#define RXCFG_DRTH 0x0000003e ++#define RXCFG_DRTH0 0x00000002 ++ ++#define RFCR_RFEN 0x80000000 ++#define RFCR_AAB 0x40000000 ++#define RFCR_AAM 0x20000000 ++#define RFCR_AAU 0x10000000 ++#define RFCR_APM 0x08000000 ++#define RFCR_APAT 0x07800000 ++#define RFCR_APAT3 0x04000000 ++#define RFCR_APAT2 0x02000000 ++#define RFCR_APAT1 0x01000000 ++#define RFCR_APAT0 0x00800000 ++#define RFCR_AARP 0x00400000 ++#define RFCR_MHEN 0x00200000 ++#define RFCR_UHEN 0x00100000 ++#define RFCR_ULM 0x00080000 ++ ++#define VRCR_RUDPE 0x00000080 ++#define VRCR_RTCPE 0x00000040 ++#define VRCR_RIPE 0x00000020 ++#define VRCR_IPEN 0x00000010 ++#define VRCR_DUTF 0x00000008 ++#define VRCR_DVTF 0x00000004 ++#define VRCR_VTREN 0x00000002 ++#define VRCR_VTDEN 0x00000001 ++ ++#define VTCR_PPCHK 0x00000008 ++#define VTCR_GCHK 0x00000004 ++#define VTCR_VPPTI 0x00000002 ++#define VTCR_VGTI 0x00000001 ++ ++#define CR 0x00 ++#define CFG 0x04 ++#define MEAR 0x08 ++#define PTSCR 0x0c ++#define ISR 0x10 ++#define IMR 0x14 ++#define IER 0x18 ++#define IHR 0x1c ++#define TXDP 0x20 ++#define TXDP_HI 0x24 ++#define TXCFG 0x28 ++#define GPIOR 0x2c ++#define RXDP 0x30 ++#define RXDP_HI 0x34 ++#define RXCFG 0x38 ++#define PQCR 0x3c ++#define WCSR 0x40 ++#define PCR 0x44 ++#define RFCR 0x48 ++#define RFDR 0x4c ++ ++#define SRR 0x58 ++ ++#define VRCR 0xbc ++#define VTCR 0xc0 ++#define VDR 0xc4 ++#define CCSR 0xcc ++ ++#define TBICR 0xe0 ++#define TBISR 0xe4 ++#define TANAR 0xe8 ++#define TANLPAR 0xec ++#define TANER 0xf0 ++#define TESR 0xf4 ++ ++#define TBICR_MR_AN_ENABLE 0x00001000 ++#define TBICR_MR_RESTART_AN 0x00000200 ++ ++#define TBISR_MR_LINK_STATUS 0x00000020 ++#define TBISR_MR_AN_COMPLETE 0x00000004 ++ ++#define TANAR_PS2 0x00000100 ++#define TANAR_PS1 0x00000080 ++#define TANAR_HALF_DUP 0x00000040 ++#define TANAR_FULL_DUP 0x00000020 ++ ++#define GPIOR_GP5_OE 0x00000200 ++#define GPIOR_GP4_OE 0x00000100 ++#define GPIOR_GP3_OE 0x00000080 ++#define GPIOR_GP2_OE 0x00000040 ++#define GPIOR_GP1_OE 0x00000020 ++#define GPIOR_GP3_OUT 0x00000004 ++#define GPIOR_GP1_OUT 0x00000001 ++ ++#define LINK_AUTONEGOTIATE 0x01 ++#define LINK_DOWN 0x02 ++#define LINK_UP 0x04 ++ ++ ++#define __kick_rx() writel(CR_RXE, ns->base + CR) ++ ++#define kick_rx() do { \ ++ dprintf(("kick_rx: maybe kicking\n")); \ ++ writel(virt_to_le32desc(&rx_ring[ns->cur_rx]), ns->base + RXDP); \ ++ if (ns->next_rx == ns->next_empty) \ ++ printf("uh-oh: next_rx == next_empty???\n"); \ ++ __kick_rx(); \ ++} while(0) ++ ++ ++#ifdef USE_64BIT_ADDR ++#define HW_ADDR_LEN 8 ++#else ++#define HW_ADDR_LEN 4 ++#endif ++ ++#define CMDSTS_OWN 0x80000000 ++#define CMDSTS_MORE 0x40000000 ++#define CMDSTS_INTR 0x20000000 ++#define CMDSTS_ERR 0x10000000 ++#define CMDSTS_OK 0x08000000 ++#define CMDSTS_LEN_MASK 0x0000ffff ++ ++#define CMDSTS_DEST_MASK 0x01800000 ++#define CMDSTS_DEST_SELF 0x00800000 ++#define CMDSTS_DEST_MULTI 0x01000000 ++ ++#define DESC_SIZE 8 /* Should be cache line sized */ ++ ++#ifdef USE_64BIT_ADDR ++struct ring_desc { ++ uint64_t link; ++ uint64_t bufptr; ++ u32 cmdsts; ++ u32 extsts; /* Extended status field */ ++}; ++#else ++struct ring_desc { ++ u32 link; ++ u32 bufptr; ++ u32 cmdsts; ++ u32 extsts; /* Extended status field */ ++}; ++#endif ++ ++/* Define the TX Descriptor */ ++static struct ring_desc tx_ring[NR_TX_DESC] ++ __attribute__ ((aligned(8))); ++ ++/* Create a static buffer of size REAL_RX_BUF_SIZE for each ++TX Descriptor. All descriptors point to a ++part of this buffer */ ++static unsigned char txb[NR_TX_DESC * REAL_RX_BUF_SIZE]; ++ ++/* Define the TX Descriptor */ ++static struct ring_desc rx_ring[NR_RX_DESC] ++ __attribute__ ((aligned(8))); ++ ++/* Create a static buffer of size REAL_RX_BUF_SIZE for each ++RX Descriptor All descriptors point to a ++part of this buffer */ ++static unsigned char rxb[NR_RX_DESC * REAL_RX_BUF_SIZE] ++ __attribute__ ((aligned(8))); ++ ++/* Private Storage for the NIC */ ++struct ns83820_private { ++ u8 *base; ++ int up; ++ long idle; ++ u32 *next_rx_desc; ++ u16 next_rx, next_empty; ++ u32 cur_rx; ++ u32 *descs; ++ unsigned ihr; ++ u32 CFG_cache; ++ u32 MEAR_cache; ++ u32 IMR_cache; ++ int linkstate; ++ u16 tx_done_idx; ++ u16 tx_idx; ++ u16 tx_intr_idx; ++ u32 phy_descs; ++ u32 *tx_descs; ++ ++} nsx; ++static struct ns83820_private *ns; ++ ++static void phy_intr(struct nic *nic __unused) ++{ ++ static char *speeds[] = ++ { "10", "100", "1000", "1000(?)", "1000F" }; ++ u32 cfg, new_cfg; ++ u32 tbisr, tanar, tanlpar; ++ int speed, fullduplex, newlinkstate; ++ ++ cfg = readl(ns->base + CFG) ^ SPDSTS_POLARITY; ++ if (ns->CFG_cache & CFG_TBI_EN) { ++ /* we have an optical transceiver */ ++ tbisr = readl(ns->base + TBISR); ++ tanar = readl(ns->base + TANAR); ++ tanlpar = readl(ns->base + TANLPAR); ++ dprintf(("phy_intr: tbisr=%hX, tanar=%hX, tanlpar=%hX\n", ++ tbisr, tanar, tanlpar)); ++ ++ if ((fullduplex = (tanlpar & TANAR_FULL_DUP) ++ && (tanar & TANAR_FULL_DUP))) { ++ ++ /* both of us are full duplex */ ++ writel(readl(ns->base + TXCFG) ++ | TXCFG_CSI | TXCFG_HBI | TXCFG_ATP, ++ ns->base + TXCFG); ++ writel(readl(ns->base + RXCFG) | RXCFG_RX_FD, ++ ns->base + RXCFG); ++ /* Light up full duplex LED */ ++ writel(readl(ns->base + GPIOR) | GPIOR_GP1_OUT, ++ ns->base + GPIOR); ++ ++ } else if (((tanlpar & TANAR_HALF_DUP) ++ && (tanar & TANAR_HALF_DUP)) ++ || ((tanlpar & TANAR_FULL_DUP) ++ && (tanar & TANAR_HALF_DUP)) ++ || ((tanlpar & TANAR_HALF_DUP) ++ && (tanar & TANAR_FULL_DUP))) { ++ ++ /* one or both of us are half duplex */ ++ writel((readl(ns->base + TXCFG) ++ & ~(TXCFG_CSI | TXCFG_HBI)) | TXCFG_ATP, ++ ns->base + TXCFG); ++ writel(readl(ns->base + RXCFG) & ~RXCFG_RX_FD, ++ ns->base + RXCFG); ++ /* Turn off full duplex LED */ ++ writel(readl(ns->base + GPIOR) & ~GPIOR_GP1_OUT, ++ ns->base + GPIOR); ++ } ++ ++ speed = 4; /* 1000F */ ++ ++ } else { ++ /* we have a copper transceiver */ ++ new_cfg = ++ ns->CFG_cache & ~(CFG_SB | CFG_MODE_1000 | CFG_SPDSTS); ++ ++ if (cfg & CFG_SPDSTS1) ++ new_cfg |= CFG_MODE_1000; ++ else ++ new_cfg &= ~CFG_MODE_1000; ++ ++ speed = ((cfg / CFG_SPDSTS0) & 3); ++ fullduplex = (cfg & CFG_DUPSTS); ++ ++ if (fullduplex) ++ new_cfg |= CFG_SB; ++ ++ if ((cfg & CFG_LNKSTS) && ++ ((new_cfg ^ ns->CFG_cache) & CFG_MODE_1000)) { ++ writel(new_cfg, ns->base + CFG); ++ ns->CFG_cache = new_cfg; ++ } ++ ++ ns->CFG_cache &= ~CFG_SPDSTS; ++ ns->CFG_cache |= cfg & CFG_SPDSTS; ++ } ++ ++ newlinkstate = (cfg & CFG_LNKSTS) ? LINK_UP : LINK_DOWN; ++ ++ if (newlinkstate & LINK_UP && ns->linkstate != newlinkstate) { ++ printf("link now %s mbps, %s duplex and up.\n", ++ speeds[speed], fullduplex ? "full" : "half"); ++ } else if (newlinkstate & LINK_DOWN ++ && ns->linkstate != newlinkstate) { ++ printf("link now down.\n"); ++ } ++ ns->linkstate = newlinkstate; ++} ++static void ns83820_set_multicast(struct nic *nic __unused); ++static void ns83820_setup_rx(struct nic *nic) ++{ ++ unsigned i; ++ ns->idle = 1; ++ ns->next_rx = 0; ++ ns->next_rx_desc = ns->descs; ++ ns->next_empty = 0; ++ ns->cur_rx = 0; ++ ++ ++ for (i = 0; i < NR_RX_DESC; i++) { ++ rx_ring[i].link = virt_to_le32desc(&rx_ring[i + 1]); ++ rx_ring[i].bufptr = ++ virt_to_le32desc(&rxb[i * REAL_RX_BUF_SIZE]); ++ rx_ring[i].cmdsts = cpu_to_le32(REAL_RX_BUF_SIZE); ++ rx_ring[i].extsts = cpu_to_le32(0); ++ } ++// No need to wrap the ring ++// rx_ring[i].link = virt_to_le32desc(&rx_ring[0]); ++ writel(0, ns->base + RXDP_HI); ++ writel(virt_to_le32desc(&rx_ring[0]), ns->base + RXDP); ++ ++ dprintf(("starting receiver\n")); ++ ++ writel(0x0001, ns->base + CCSR); ++ writel(0, ns->base + RFCR); ++ writel(0x7fc00000, ns->base + RFCR); ++ writel(0xffc00000, ns->base + RFCR); ++ ++ ns->up = 1; ++ ++ phy_intr(nic); ++ ++ /* Okay, let it rip */ ++ ns->IMR_cache |= ISR_PHY; ++ ns->IMR_cache |= ISR_RXRCMP; ++ //dev->IMR_cache |= ISR_RXERR; ++ //dev->IMR_cache |= ISR_RXOK; ++ ns->IMR_cache |= ISR_RXORN; ++ ns->IMR_cache |= ISR_RXSOVR; ++ ns->IMR_cache |= ISR_RXDESC; ++ ns->IMR_cache |= ISR_RXIDLE; ++ ns->IMR_cache |= ISR_TXDESC; ++ ns->IMR_cache |= ISR_TXIDLE; ++ ++ // No reason to enable interupts... ++ // writel(ns->IMR_cache, ns->base + IMR); ++ // writel(1, ns->base + IER); ++ ns83820_set_multicast(nic); ++ kick_rx(); ++} ++ ++ ++static void ns83820_do_reset(struct nic *nic __unused, u32 which) ++{ ++ dprintf(("resetting chip...\n")); ++ writel(which, ns->base + CR); ++ do { ++ ++ } while (readl(ns->base + CR) & which); ++ dprintf(("okay!\n")); ++} ++ ++static void ns83820_reset(struct nic *nic) ++{ ++ unsigned i; ++ dprintf(("ns83820_reset\n")); ++ ++ writel(0, ns->base + PQCR); ++ ++ ns83820_setup_rx(nic); ++ ++ for (i = 0; i < NR_TX_DESC; i++) { ++ tx_ring[i].link = 0; ++ tx_ring[i].bufptr = 0; ++ tx_ring[i].cmdsts = cpu_to_le32(0); ++ tx_ring[i].extsts = cpu_to_le32(0); ++ } ++ ++ ns->tx_idx = 0; ++ ns->tx_done_idx = 0; ++ writel(0, ns->base + TXDP_HI); ++ return; ++} ++static void ns83820_getmac(struct nic *nic __unused, u8 * mac) ++{ ++ unsigned i; ++ for (i = 0; i < 3; i++) { ++ u32 data; ++ /* Read from the perfect match memory: this is loaded by ++ * the chip from the EEPROM via the EELOAD self test. ++ */ ++ writel(i * 2, ns->base + RFCR); ++ data = readl(ns->base + RFDR); ++ *mac++ = data; ++ *mac++ = data >> 8; ++ } ++} ++ ++static void ns83820_set_multicast(struct nic *nic __unused) ++{ ++ u8 *rfcr = ns->base + RFCR; ++ u32 and_mask = 0xffffffff; ++ u32 or_mask = 0; ++ u32 val; ++ ++ /* Support Multicast */ ++ and_mask &= ~(RFCR_AAU | RFCR_AAM); ++ or_mask |= RFCR_AAM; ++ val = (readl(rfcr) & and_mask) | or_mask; ++ /* Ramit : RFCR Write Fix doc says RFEN must be 0 modify other bits */ ++ writel(val & ~RFCR_RFEN, rfcr); ++ writel(val, rfcr); ++ ++} ++static void ns83820_run_bist(struct nic *nic __unused, const char *name, ++ u32 enable, u32 done, u32 fail) ++{ ++ int timed_out = 0; ++ long start; ++ u32 status; ++ int loops = 0; ++ ++ dprintf(("start %s\n", name)) ++ ++ start = currticks(); ++ ++ writel(enable, ns->base + PTSCR); ++ for (;;) { ++ loops++; ++ status = readl(ns->base + PTSCR); ++ if (!(status & enable)) ++ break; ++ if (status & done) ++ break; ++ if (status & fail) ++ break; ++ if ((currticks() - start) >= HZ) { ++ timed_out = 1; ++ break; ++ } ++ } ++ ++ if (status & fail) ++ printf("%s failed! (0x%hX & 0x%hX)\n", name, status, fail); ++ else if (timed_out) ++ printf("run_bist %s timed out! (%hX)\n", name, status); ++ dprintf(("done %s in %d loops\n", name, loops)); ++} ++ ++/************************************* ++Check Link ++*************************************/ ++static void ns83820_check_intr(struct nic *nic) { ++ int i; ++ u32 isr = readl(ns->base + ISR); ++ if(ISR_PHY & isr) ++ phy_intr(nic); ++ if(( ISR_RXIDLE | ISR_RXDESC | ISR_RXERR) & isr) ++ kick_rx(); ++ for (i = 0; i < NR_RX_DESC; i++) { ++ if (rx_ring[i].cmdsts == CMDSTS_OWN) { ++// rx_ring[i].link = virt_to_le32desc(&rx_ring[i + 1]); ++ rx_ring[i].cmdsts = cpu_to_le32(REAL_RX_BUF_SIZE); ++ } ++ } ++} ++/************************************************************************** ++POLL - Wait for a frame ++***************************************************************************/ ++static int ns83820_poll(struct nic *nic, int retrieve) ++{ ++ /* return true if there's an ethernet packet ready to read */ ++ /* nic->packet should contain data on return */ ++ /* nic->packetlen should contain length of data */ ++ u32 cmdsts; ++ int entry = ns->cur_rx; ++ ++ ns83820_check_intr(nic); ++ ++ cmdsts = le32_to_cpu(rx_ring[entry].cmdsts); ++ ++ if ( ! ( (CMDSTS_OWN & (cmdsts)) && (cmdsts != (CMDSTS_OWN)) ) ) ++ return 0; ++ ++ if ( ! retrieve ) return 1; ++ ++ if (! (CMDSTS_OK & cmdsts) ) ++ return 0; ++ ++ nic->packetlen = cmdsts & 0xffff; ++ memcpy(nic->packet, ++ rxb + (entry * REAL_RX_BUF_SIZE), ++ nic->packetlen); ++ // rx_ring[entry].link = 0; ++ rx_ring[entry].cmdsts = cpu_to_le32(CMDSTS_OWN); ++ ++ ns->cur_rx = ++ns->cur_rx % NR_RX_DESC; ++ ++ if (ns->cur_rx == 0) /* We have wrapped the ring */ ++ kick_rx(); ++ ++ return 1; ++} ++ ++static inline void kick_tx(struct nic *nic __unused) ++{ ++ dprintf(("kick_tx\n")); ++ writel(CR_TXE, ns->base + CR); ++} ++ ++/************************************************************************** ++TRANSMIT - Transmit a frame ++***************************************************************************/ ++static void ns83820_transmit(struct nic *nic, const char *d, /* Destination */ ++ unsigned int t, /* Type */ ++ unsigned int s, /* size */ ++ const char *p) ++{ /* Packet */ ++ /* send the packet to destination */ ++ ++ u16 nstype; ++ u32 cmdsts, extsts; ++ int cur_tx = 0; ++ u32 isr = readl(ns->base + ISR); ++ if (ISR_TXIDLE & isr) ++ kick_tx(nic); ++ /* point to the current txb incase multiple tx_rings are used */ ++ memcpy(txb, d, ETH_ALEN); ++ memcpy(txb + ETH_ALEN, nic->node_addr, ETH_ALEN); ++ nstype = htons((u16) t); ++ memcpy(txb + 2 * ETH_ALEN, (u8 *) & nstype, 2); ++ memcpy(txb + ETH_HLEN, p, s); ++ s += ETH_HLEN; ++ s &= 0x0FFF; ++ while (s < ETH_ZLEN) ++ txb[s++] = '\0'; ++ ++ /* Setup the transmit descriptor */ ++ extsts = 0; ++ extsts |= EXTSTS_UDPPKT; ++ ++ tx_ring[cur_tx].bufptr = virt_to_le32desc(&txb); ++ tx_ring[cur_tx].extsts = cpu_to_le32(extsts); ++ ++ cmdsts = cpu_to_le32(0); ++ cmdsts |= cpu_to_le32(CMDSTS_OWN | s); ++ tx_ring[cur_tx].cmdsts = cpu_to_le32(cmdsts); ++ ++ writel(virt_to_le32desc(&tx_ring[0]), ns->base + TXDP); ++ kick_tx(nic); ++} ++ ++/************************************************************************** ++DISABLE - Turn off ethernet interface ++***************************************************************************/ ++static void ns83820_disable(struct dev *dev) ++{ ++ /* put the card in its initial state */ ++ /* This function serves 3 purposes. ++ * This disables DMA and interrupts so we don't receive ++ * unexpected packets or interrupts from the card after ++ * etherboot has finished. ++ * This frees resources so etherboot may use ++ * this driver on another interface ++ * This allows etherboot to reinitialize the interface ++ * if something is something goes wrong. ++ */ ++ /* disable interrupts */ ++ writel(0, ns->base + IMR); ++ writel(0, ns->base + IER); ++ readl(ns->base + IER); ++ ++ ns->up = 0; ++ ++ ns83820_do_reset((struct nic *) dev, CR_RST); ++ ++ ns->IMR_cache &= ++ ~(ISR_RXOK | ISR_RXDESC | ISR_RXERR | ISR_RXEARLY | ++ ISR_RXIDLE); ++ writel(ns->IMR_cache, ns->base + IMR); ++ ++ /* touch the pci bus... */ ++ readl(ns->base + IMR); ++ ++ /* assumes the transmitter is already disabled and reset */ ++ writel(0, ns->base + RXDP_HI); ++ writel(0, ns->base + RXDP); ++} ++ ++/************************************************************************** ++IRQ - Enable, Disable, or Force interrupts ++***************************************************************************/ ++static void ns83820_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } ++} ++ ++/************************************************************************** ++PROBE - Look for an adapter, this routine's visible to the outside ++***************************************************************************/ ++ ++#define board_found 1 ++#define valid_link 0 ++static int ns83820_probe(struct dev *dev, struct pci_device *pci) ++{ ++ struct nic *nic = (struct nic *) dev; ++ int sz; ++ long addr; ++ int using_dac = 0; ++ ++ if (pci->ioaddr == 0) ++ return 0; ++ ++ printf("ns83820.c: Found %s, vendor=0x%hX, device=0x%hX\n", ++ pci->name, pci->vendor, pci->dev_id); ++ ++ /* point to private storage */ ++ ns = &nsx; ++ ++ adjust_pci_device(pci); ++ ++ addr = pci_bar_start(pci, PCI_BASE_ADDRESS_1); ++ sz = pci_bar_size(pci, PCI_BASE_ADDRESS_1); ++ ++ ns->base = ioremap(addr, (1UL << 12)); ++// ns->base = ioremap(addr, sz); ++ ++ if (!ns->base) ++ return 0; ++ ++ nic->irqno = 0; ++ nic->ioaddr = pci->ioaddr & ~3; ++ ++ /* disable interrupts */ ++ writel(0, ns->base + IMR); ++ writel(0, ns->base + IER); ++ readl(ns->base + IER); ++ ++ ns->IMR_cache = 0; ++ ++ ns83820_do_reset(nic, CR_RST); ++ ++ /* Must reset the ram bist before running it */ ++ writel(PTSCR_RBIST_RST, ns->base + PTSCR); ++ ns83820_run_bist(nic, "sram bist", PTSCR_RBIST_EN, ++ PTSCR_RBIST_DONE, PTSCR_RBIST_FAIL); ++ ns83820_run_bist(nic, "eeprom bist", PTSCR_EEBIST_EN, 0, ++ PTSCR_EEBIST_FAIL); ++ ns83820_run_bist(nic, "eeprom load", PTSCR_EELOAD_EN, 0, 0); ++ ++ /* I love config registers */ ++ ns->CFG_cache = readl(ns->base + CFG); ++ ++ if ((ns->CFG_cache & CFG_PCI64_DET)) { ++ printf("%s: detected 64 bit PCI data bus.\n", pci->name); ++ /*dev->CFG_cache |= CFG_DATA64_EN; */ ++ if (!(ns->CFG_cache & CFG_DATA64_EN)) ++ printf ++ ("%s: EEPROM did not enable 64 bit bus. Disabled.\n", ++ pci->name); ++ } else ++ ns->CFG_cache &= ~(CFG_DATA64_EN); ++ ++ ns->CFG_cache &= (CFG_TBI_EN | CFG_MRM_DIS | CFG_MWI_DIS | ++ CFG_T64ADDR | CFG_DATA64_EN | CFG_EXT_125 | ++ CFG_M64ADDR); ++ ns->CFG_cache |= ++ CFG_PINT_DUPSTS | CFG_PINT_LNKSTS | CFG_PINT_SPDSTS | ++ CFG_EXTSTS_EN | CFG_EXD | CFG_PESEL; ++ ns->CFG_cache |= CFG_REQALG; ++ ns->CFG_cache |= CFG_POW; ++ ns->CFG_cache |= CFG_TMRTEST; ++ ++ /* When compiled with 64 bit addressing, we must always enable ++ * the 64 bit descriptor format. ++ */ ++#ifdef USE_64BIT_ADDR ++ ns->CFG_cache |= CFG_M64ADDR; ++#endif ++ ++//FIXME: Enable section on dac or remove this ++ if (using_dac) ++ ns->CFG_cache |= CFG_T64ADDR; ++ ++ /* Big endian mode does not seem to do what the docs suggest */ ++ ns->CFG_cache &= ~CFG_BEM; ++ ++ /* setup optical transceiver if we have one */ ++ if (ns->CFG_cache & CFG_TBI_EN) { ++ dprintf(("%s: enabling optical transceiver\n", pci->name)); ++ writel(readl(ns->base + GPIOR) | 0x3e8, ns->base + GPIOR); ++ ++ /* setup auto negotiation feature advertisement */ ++ writel(readl(ns->base + TANAR) ++ | TANAR_HALF_DUP | TANAR_FULL_DUP, ++ ns->base + TANAR); ++ ++ /* start auto negotiation */ ++ writel(TBICR_MR_AN_ENABLE | TBICR_MR_RESTART_AN, ++ ns->base + TBICR); ++ writel(TBICR_MR_AN_ENABLE, ns->base + TBICR); ++ ns->linkstate = LINK_AUTONEGOTIATE; ++ ++ ns->CFG_cache |= CFG_MODE_1000; ++ } ++ writel(ns->CFG_cache, ns->base + CFG); ++ dprintf(("CFG: %hX\n", ns->CFG_cache)); ++ ++ /* FIXME: reset_phy is defaulted to 0, should we reset anyway? */ ++ if (reset_phy) { ++ dprintf(("%s: resetting phy\n", pci->name)); ++ writel(ns->CFG_cache | CFG_PHY_RST, ns->base + CFG); ++ writel(ns->CFG_cache, ns->base + CFG); ++ } ++#if 0 /* Huh? This sets the PCI latency register. Should be done via ++ * the PCI layer. FIXME. ++ */ ++ if (readl(dev->base + SRR)) ++ writel(readl(dev->base + 0x20c) | 0xfe00, ++ dev->base + 0x20c); ++#endif ++ ++ /* Note! The DMA burst size interacts with packet ++ * transmission, such that the largest packet that ++ * can be transmitted is 8192 - FLTH - burst size. ++ * If only the transmit fifo was larger... ++ */ ++ /* Ramit : 1024 DMA is not a good idea, it ends up banging ++ * some DELL and COMPAQ SMP systems */ ++ writel(TXCFG_CSI | TXCFG_HBI | TXCFG_ATP | TXCFG_MXDMA512 ++ | ((1600 / 32) * 0x100), ns->base + TXCFG); ++ ++ /* Set Rx to full duplex, don't accept runt, errored, long or length ++ * range errored packets. Use 512 byte DMA. ++ */ ++ /* Ramit : 1024 DMA is not a good idea, it ends up banging ++ * some DELL and COMPAQ SMP systems ++ * Turn on ALP, only we are accpeting Jumbo Packets */ ++ writel(RXCFG_AEP | RXCFG_ARP | RXCFG_AIRL | RXCFG_RX_FD ++ | RXCFG_STRIPCRC ++ //| RXCFG_ALP ++ | (RXCFG_MXDMA512) | 0, ns->base + RXCFG); ++ ++ /* Disable priority queueing */ ++ writel(0, ns->base + PQCR); ++ ++ /* Enable IP checksum validation and detetion of VLAN headers. ++ * Note: do not set the reject options as at least the 0x102 ++ * revision of the chip does not properly accept IP fragments ++ * at least for UDP. ++ */ ++ /* Ramit : Be sure to turn on RXCFG_ARP if VLAN's are enabled, since ++ * the MAC it calculates the packetsize AFTER stripping the VLAN ++ * header, and if a VLAN Tagged packet of 64 bytes is received (like ++ * a ping with a VLAN header) then the card, strips the 4 byte VLAN ++ * tag and then checks the packet size, so if RXCFG_ARP is not enabled, ++ * it discrards it!. These guys...... ++ */ ++ writel(VRCR_IPEN | VRCR_VTDEN, ns->base + VRCR); ++ ++ /* Enable per-packet TCP/UDP/IP checksumming */ ++ writel(VTCR_PPCHK, ns->base + VTCR); ++ ++ /* Ramit : Enable async and sync pause frames */ ++// writel(0, ns->base + PCR); ++ writel((PCR_PS_MCAST | PCR_PS_DA | PCR_PSEN | PCR_FFLO_4K | ++ PCR_FFHI_8K | PCR_STLO_4 | PCR_STHI_8 | PCR_PAUSE_CNT), ++ ns->base + PCR); ++ ++ /* Disable Wake On Lan */ ++ writel(0, ns->base + WCSR); ++ ++ ns83820_getmac(nic, nic->node_addr); ++ printf("%! at ioaddr 0x%hX, ", nic->node_addr, ns->base); ++ ++ if (using_dac) { ++ dprintf(("%s: using 64 bit addressing.\n", pci->name)); ++ } ++ ++ dprintf(("%s: DP83820 %d.%d: %! io=0x%hX\n", ++ pci->name, ++ (unsigned) readl(ns->base + SRR) >> 8, ++ (unsigned) readl(ns->base + SRR) & 0xff, ++ nic->node_addr, pci->ioaddr)); ++ ++#ifdef PHY_CODE_IS_FINISHED ++ ns83820_probe_phy(dev); ++#endif ++ ++ ns83820_reset(nic); ++ /* point to NIC specific routines */ ++ dev->disable = ns83820_disable; ++ nic->poll = ns83820_poll; ++ nic->transmit = ns83820_transmit; ++ nic->irq = ns83820_irq; ++ return 1; ++} ++ ++static struct pci_id ns83820_nics[] = { ++ PCI_ROM(0x100b, 0x0022, "ns83820", "National Semiconductor 83820"), ++}; ++ ++struct pci_driver ns83820_driver = { ++ .type = NIC_DRIVER, ++ .name = "NS83820/PCI", ++ .probe = ns83820_probe, ++ .ids = ns83820_nics, ++ .id_count = sizeof(ns83820_nics) / sizeof(ns83820_nics[0]), ++ .class = 0, ++}; +diff -Naur grub-0.97.orig/netboot/ns8390.c grub-0.97/netboot/ns8390.c +--- grub-0.97.orig/netboot/ns8390.c 2003-07-09 11:45:38.000000000 +0000 ++++ grub-0.97/netboot/ns8390.c 2005-08-31 21:13:41.000000000 +0000 +@@ -13,11 +13,15 @@ + the proper functioning of this software, nor do the authors assume any + responsibility for damages incurred with its use. + ++Multicast support added by Timothy Legge (timlegge@users.sourceforge.net) 09/28/2003 ++Relocation support added by Ken Yap (ken_yap@users.sourceforge.net) 28/12/02 + 3c503 support added by Bill Paul (wpaul@ctr.columbia.edu) on 11/15/94 + SMC8416 support added by Bill Paul (wpaul@ctr.columbia.edu) on 12/25/94 + 3c503 PIO support added by Jim Hague (jim.hague@acm.org) on 2/17/98 + RX overrun by Klaus Espenlaub (espenlaub@informatik.uni-ulm.de) on 3/10/99 + parts taken from the Linux 8390 driver (by Donald Becker and Paul Gortmaker) ++SMC8416 PIO support added by Andrew Bettison (andrewb@zip.com.au) on 4/3/02 ++ based on the Linux 8390 driver (by Donald Becker and Paul Gortmaker) + + **************************************************************************/ + +@@ -26,10 +30,16 @@ + #include "ns8390.h" + #ifdef INCLUDE_NS8390 + #include "pci.h" ++#else ++#include "isa.h" + #endif +-#include "cards.h" + +-static unsigned char eth_vendor, eth_flags, eth_laar; ++typedef int Address; ++ ++static unsigned char eth_vendor, eth_flags; ++#ifdef INCLUDE_WD ++static unsigned char eth_laar; ++#endif + static unsigned short eth_nic_base, eth_asic_base; + static unsigned char eth_memsize, eth_rx_start, eth_tx_start; + static Address eth_bmem, eth_rmem; +@@ -66,6 +76,7 @@ + #endif + + #if defined(INCLUDE_WD) ++#define ASIC_PIO WD_IAR + #define eth_probe wd_probe + #if defined(INCLUDE_3C503) || defined(INCLUDE_NE) || defined(INCLUDE_NS8390) + Error you must only define one of INCLUDE_WD, INCLUDE_3C503, INCLUDE_NE, INCLUDE_NS8390 +@@ -101,13 +112,16 @@ + #endif + #endif + +-#if defined(INCLUDE_NE) || defined(INCLUDE_NS8390) || (defined(INCLUDE_3C503) && !defined(T503_SHMEM)) ++#if defined(INCLUDE_NE) || defined(INCLUDE_NS8390) || (defined(INCLUDE_3C503) && !defined(T503_SHMEM)) || (defined(INCLUDE_WD) && defined(WD_790_PIO)) + /************************************************************************** + ETH_PIO_READ - Read a frame via Programmed I/O + **************************************************************************/ + static void eth_pio_read(unsigned int src, unsigned char *dst, unsigned int cnt) + { +- if (eth_flags & FLAG_16BIT) { ++cnt; cnt &= ~1; } ++#ifdef INCLUDE_WD ++ outb(src & 0xff, eth_asic_base + WD_GP2); ++ outb(src >> 8, eth_asic_base + WD_GP2); ++#else + outb(D8390_COMMAND_RD2 | + D8390_COMMAND_STA, eth_nic_base + D8390_P0_COMMAND); + outb(cnt, eth_nic_base + D8390_P0_RBCR0); +@@ -122,9 +136,10 @@ + outb(src >> 8, eth_asic_base + _3COM_DAMSB); + outb(t503_output | _3COM_CR_START, eth_asic_base + _3COM_CR); + #endif ++#endif + + if (eth_flags & FLAG_16BIT) +- cnt >>= 1; ++ cnt = (cnt + 1) >> 1; + + while(cnt--) { + #ifdef INCLUDE_3C503 +@@ -153,7 +168,10 @@ + #ifdef COMPEX_RL2000_FIX + unsigned int x; + #endif /* COMPEX_RL2000_FIX */ +- if (eth_flags & FLAG_16BIT) { ++cnt; cnt &= ~1; } ++#ifdef INCLUDE_WD ++ outb(dst & 0xff, eth_asic_base + WD_GP2); ++ outb(dst >> 8, eth_asic_base + WD_GP2); ++#else + outb(D8390_COMMAND_RD2 | + D8390_COMMAND_STA, eth_nic_base + D8390_P0_COMMAND); + outb(D8390_ISR_RDC, eth_nic_base + D8390_P0_ISR); +@@ -170,9 +188,10 @@ + + outb(t503_output | _3COM_CR_DDIR | _3COM_CR_START, eth_asic_base + _3COM_CR); + #endif ++#endif + + if (eth_flags & FLAG_16BIT) +- cnt >>= 1; ++ cnt = (cnt + 1) >> 1; + + while(cnt--) + { +@@ -201,17 +220,40 @@ + if (x >= COMPEX_RL2000_TRIES) + printf("Warning: Compex RL2000 aborted wait!\n"); + #endif /* COMPEX_RL2000_FIX */ ++#ifndef INCLUDE_WD + while((inb(eth_nic_base + D8390_P0_ISR) & D8390_ISR_RDC) + != D8390_ISR_RDC); + #endif ++#endif + } + #else + /************************************************************************** + ETH_PIO_READ - Dummy routine when NE2000 not compiled in + **************************************************************************/ +-static void eth_pio_read(unsigned int src, unsigned char *dst, unsigned int cnt) {} ++static void eth_pio_read(unsigned int src __unused, unsigned char *dst __unused, unsigned int cnt __unused) {} + #endif + ++ ++/************************************************************************** ++enable_multycast - Enable Multicast ++**************************************************************************/ ++static void enable_multicast(unsigned short eth_nic_base) ++{ ++ unsigned char mcfilter[8]; ++ int i; ++ memset(mcfilter, 0xFF, 8); ++ outb(4, eth_nic_base+D8390_P0_RCR); ++ outb(D8390_COMMAND_RD2 + D8390_COMMAND_PS1, eth_nic_base + D8390_P0_COMMAND); ++ for(i=0;i<8;i++) ++ { ++ outb(mcfilter[i], eth_nic_base + 8 + i); ++ if(inb(eth_nic_base + 8 + i)!=mcfilter[i]) ++ printf("Error SMC 83C690 Multicast filter read/write mishap %d\n",i); ++ } ++ outb(D8390_COMMAND_RD2 + D8390_COMMAND_PS0, eth_nic_base + D8390_P0_COMMAND); ++ outb(4 | 0x08, eth_nic_base+D8390_P0_RCR); ++} ++ + /************************************************************************** + NS8390_RESET - Reset adapter + **************************************************************************/ +@@ -238,7 +280,14 @@ + outb(eth_tx_start, eth_nic_base+D8390_P0_TPSR); + outb(eth_rx_start, eth_nic_base+D8390_P0_PSTART); + #ifdef INCLUDE_WD +- if (eth_flags & FLAG_790) outb(0, eth_nic_base + 0x09); ++ if (eth_flags & FLAG_790) { ++#ifdef WD_790_PIO ++ outb(0x10, eth_asic_base + 0x06); /* disable interrupts, enable PIO */ ++ outb(0x01, eth_nic_base + 0x09); /* enable ring read auto-wrap */ ++#else ++ outb(0, eth_nic_base + 0x09); ++#endif ++ } + #endif + outb(eth_memsize, eth_nic_base+D8390_P0_PSTOP); + outb(eth_memsize - 1, eth_nic_base+D8390_P0_BOUND); +@@ -266,8 +315,10 @@ + outb(D8390_COMMAND_PS0 | + D8390_COMMAND_RD2 | D8390_COMMAND_STA, eth_nic_base+D8390_P0_COMMAND); + outb(0xFF, eth_nic_base+D8390_P0_ISR); +- outb(0, eth_nic_base+D8390_P0_TCR); +- outb(4, eth_nic_base+D8390_P0_RCR); /* allow broadcast frames */ ++ outb(0, eth_nic_base+D8390_P0_TCR); /* transmitter on */ ++ outb(4, eth_nic_base+D8390_P0_RCR); /* allow rx broadcast frames */ ++ ++ enable_multicast(eth_nic_base); + + #ifdef INCLUDE_3C503 + /* +@@ -281,7 +332,7 @@ + #endif + } + +-static int ns8390_poll(struct nic *nic); ++static int ns8390_poll(struct nic *nic, int retrieve); + + #ifndef INCLUDE_3C503 + /************************************************************************** +@@ -324,7 +375,7 @@ + + /* clear the RX ring, acknowledge overrun interrupt */ + eth_drain_receiver = 1; +- while (ns8390_poll(nic)) ++ while (ns8390_poll(nic, 1)) + /* Nothing */; + eth_drain_receiver = 0; + outb(D8390_ISR_OVW, eth_nic_base+D8390_P0_ISR); +@@ -344,50 +395,54 @@ + unsigned int s, /* size */ + const char *p) /* Packet */ + { ++#if defined(INCLUDE_3C503) || (defined(INCLUDE_WD) && ! defined(WD_790_PIO)) ++ Address eth_vmem = bus_to_virt(eth_bmem); ++#endif + #ifdef INCLUDE_3C503 + if (!(eth_flags & FLAG_PIO)) { +- memcpy((char *)eth_bmem, d, ETH_ALEN); /* dst */ +- memcpy((char *)eth_bmem+ETH_ALEN, nic->node_addr, ETH_ALEN); /* src */ +- *((char *)eth_bmem+12) = t>>8; /* type */ +- *((char *)eth_bmem+13) = t; +- memcpy((char *)eth_bmem+ETH_HLEN, p, s); ++ memcpy((char *)eth_vmem, d, ETH_ALEN); /* dst */ ++ memcpy((char *)eth_vmem+ETH_ALEN, nic->node_addr, ETH_ALEN); /* src */ ++ *((char *)eth_vmem+12) = t>>8; /* type */ ++ *((char *)eth_vmem+13) = t; ++ memcpy((char *)eth_vmem+ETH_HLEN, p, s); + s += ETH_HLEN; +- while (s < ETH_ZLEN) *((char *)eth_bmem+(s++)) = 0; ++ while (s < ETH_ZLEN) *((char *)eth_vmem+(s++)) = 0; + } + #endif + + #ifdef INCLUDE_WD +- /* Memory interface */ + if (eth_flags & FLAG_16BIT) { + outb(eth_laar | WD_LAAR_M16EN, eth_asic_base + WD_LAAR); + inb(0x84); + } ++#ifndef WD_790_PIO ++ /* Memory interface */ + if (eth_flags & FLAG_790) { + outb(WD_MSR_MENB, eth_asic_base + WD_MSR); + inb(0x84); + } + inb(0x84); +- memcpy((char *)eth_bmem, d, ETH_ALEN); /* dst */ +- memcpy((char *)eth_bmem+ETH_ALEN, nic->node_addr, ETH_ALEN); /* src */ +- *((char *)eth_bmem+12) = t>>8; /* type */ +- *((char *)eth_bmem+13) = t; +- memcpy((char *)eth_bmem+ETH_HLEN, p, s); ++ memcpy((char *)eth_vmem, d, ETH_ALEN); /* dst */ ++ memcpy((char *)eth_vmem+ETH_ALEN, nic->node_addr, ETH_ALEN); /* src */ ++ *((char *)eth_vmem+12) = t>>8; /* type */ ++ *((char *)eth_vmem+13) = t; ++ memcpy((char *)eth_vmem+ETH_HLEN, p, s); + s += ETH_HLEN; +- while (s < ETH_ZLEN) *((char *)eth_bmem+(s++)) = 0; ++ while (s < ETH_ZLEN) *((char *)eth_vmem+(s++)) = 0; + if (eth_flags & FLAG_790) { + outb(0, eth_asic_base + WD_MSR); + inb(0x84); + } +- if (eth_flags & FLAG_16BIT) { +- outb(eth_laar & ~WD_LAAR_M16EN, eth_asic_base + WD_LAAR); +- inb(0x84); +- } ++#else ++ inb(0x84); ++#endif + #endif + + #if defined(INCLUDE_3C503) +- if (eth_flags & FLAG_PIO) { ++ if (eth_flags & FLAG_PIO) + #endif +-#if defined(INCLUDE_NE) || defined(INCLUDE_NS8390) || (defined(INCLUDE_3C503) && !defined(T503_SHMEM)) ++#if defined(INCLUDE_NE) || defined(INCLUDE_NS8390) || (defined(INCLUDE_3C503) && !defined(T503_SHMEM)) || (defined(INCLUDE_WD) && defined(WD_790_PIO)) ++ { + /* Programmed I/O */ + unsigned short type; + type = (t >> 8) | (t << 8); +@@ -398,12 +453,16 @@ + eth_pio_write(p, (eth_tx_start<<8)+ETH_HLEN, s); + s += ETH_HLEN; + if (s < ETH_ZLEN) s = ETH_ZLEN; ++ } + #endif + #if defined(INCLUDE_3C503) +- } + #endif + + #ifdef INCLUDE_WD ++ if (eth_flags & FLAG_16BIT) { ++ outb(eth_laar & ~WD_LAAR_M16EN, eth_asic_base + WD_LAAR); ++ inb(0x84); ++ } + if (eth_flags & FLAG_790) + outb(D8390_COMMAND_PS0 | + D8390_COMMAND_STA, eth_nic_base+D8390_P0_COMMAND); +@@ -428,7 +487,7 @@ + /************************************************************************** + NS8390_POLL - Wait for a frame + **************************************************************************/ +-static int ns8390_poll(struct nic *nic) ++static int ns8390_poll(struct nic *nic, int retrieve) + { + int ret = 0; + unsigned char rstat, curr, next; +@@ -453,22 +512,27 @@ + outb(D8390_COMMAND_PS0, eth_nic_base+D8390_P0_COMMAND); + if (curr >= eth_memsize) curr=eth_rx_start; + if (curr == next) return(0); ++ ++ if ( ! retrieve ) return 1; ++ + #ifdef INCLUDE_WD + if (eth_flags & FLAG_16BIT) { + outb(eth_laar | WD_LAAR_M16EN, eth_asic_base + WD_LAAR); + inb(0x84); + } ++#ifndef WD_790_PIO + if (eth_flags & FLAG_790) { + outb(WD_MSR_MENB, eth_asic_base + WD_MSR); + inb(0x84); + } ++#endif + inb(0x84); + #endif + pktoff = next << 8; + if (eth_flags & FLAG_PIO) + eth_pio_read(pktoff, (char *)&pkthdr, 4); + else +- memcpy(&pkthdr, (char *)eth_rmem + pktoff, 4); ++ memcpy(&pkthdr, bus_to_virt(eth_rmem + pktoff), 4); + pktoff += sizeof(pkthdr); + /* incoming length includes FCS so must sub 4 */ + len = pkthdr.len - 4; +@@ -486,7 +550,7 @@ + if (eth_flags & FLAG_PIO) + eth_pio_read(pktoff, p, frag); + else +- memcpy(p, (char *)eth_rmem + pktoff, frag); ++ memcpy(p, bus_to_virt(eth_rmem + pktoff), frag); + pktoff = eth_rx_start << 8; + p += frag; + len -= frag; +@@ -495,14 +559,16 @@ + if (eth_flags & FLAG_PIO) + eth_pio_read(pktoff, p, len); + else +- memcpy(p, (char *)eth_rmem + pktoff, len); ++ memcpy(p, bus_to_virt(eth_rmem + pktoff), len); + ret = 1; + } + #ifdef INCLUDE_WD ++#ifndef WD_790_PIO + if (eth_flags & FLAG_790) { + outb(0, eth_asic_base + WD_MSR); + inb(0x84); + } ++#endif + if (eth_flags & FLAG_16BIT) { + outb(eth_laar & ~WD_LAAR_M16EN, eth_asic_base + WD_LAAR); + inb(0x84); +@@ -519,31 +585,56 @@ + /************************************************************************** + NS8390_DISABLE - Turn off adapter + **************************************************************************/ +-static void ns8390_disable(struct nic *nic) ++static void ns8390_disable(struct dev *dev) + { ++ struct nic *nic = (struct nic *)dev; ++ /* reset and disable merge */ ++ ns8390_reset(nic); ++} ++ ++/************************************************************************** ++NS8390_IRQ - Enable, Disable, or Force interrupts ++**************************************************************************/ ++static void ns8390_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } + } + + /************************************************************************** + ETH_PROBE - Look for an adapter + **************************************************************************/ + #ifdef INCLUDE_NS8390 +-struct nic *eth_probe(struct nic *nic, unsigned short *probe_addrs, +- struct pci_device *pci) ++static int eth_probe (struct dev *dev, struct pci_device *pci) + #else +-struct nic *eth_probe(struct nic *nic, unsigned short *probe_addrs) ++static int eth_probe (struct dev *dev, unsigned short *probe_addrs __unused) + #endif + { ++ struct nic *nic = (struct nic *)dev; + int i; +- struct wd_board *brd; +- unsigned short chksum; +- unsigned char c; ++#ifdef INCLUDE_NS8390 ++ unsigned short pci_probe_addrs[] = { pci->ioaddr, 0 }; ++ unsigned short *probe_addrs = pci_probe_addrs; ++#endif + eth_vendor = VENDOR_NONE; + eth_drain_receiver = 0; + ++ nic->irqno = 0; ++ + #ifdef INCLUDE_WD ++{ + /****************************************************************** + Search for WD/SMC cards + ******************************************************************/ ++ struct wd_board *brd; ++ unsigned short chksum; ++ unsigned char c; + for (eth_asic_base = WD_LOW_BASE; eth_asic_base <= WD_HIGH_BASE; + eth_asic_base += 0x20) { + chksum = 0; +@@ -560,6 +651,9 @@ + /* We've found a board */ + eth_vendor = VENDOR_WD; + eth_nic_base = eth_asic_base + WD_NIC_ADDR; ++ ++ nic->ioaddr = eth_nic_base; ++ + c = inb(eth_asic_base+WD_BID); /* Get board id */ + for (brd = wd_boards; brd->name; brd++) + if (brd->id == c) break; +@@ -582,8 +676,9 @@ + } else + eth_bmem = WD_DEFAULT_MEM; + if (brd->id == TYPE_SMC8216T || brd->id == TYPE_SMC8216C) { +- *((unsigned int *)(eth_bmem + 8192)) = (unsigned int)0; +- if (*((unsigned int *)(eth_bmem + 8192))) { ++ /* from Linux driver, 8416BT detects as 8216 sometimes */ ++ unsigned int addr = inb(eth_asic_base + 0xb); ++ if (((addr >> 4) & 3) == 0) { + brd += 2; + eth_memsize = brd->memsize; + } +@@ -592,19 +687,27 @@ + for (i=0; inode_addr[i] = inb(i+eth_asic_base+WD_LAR); + } +- printf("\n%s base %#hx, memory %#hx, addr %!\n", +- brd->name, eth_asic_base, eth_bmem, nic->node_addr); ++ printf("\n%s base %#hx", brd->name, eth_asic_base); + if (eth_flags & FLAG_790) { ++#ifdef WD_790_PIO ++ printf(", PIO mode, addr %!\n", nic->node_addr); ++ eth_bmem = 0; ++ eth_flags |= FLAG_PIO; /* force PIO mode */ ++ outb(0, eth_asic_base+WD_MSR); ++#else ++ printf(", memory %#x, addr %!\n", eth_bmem, nic->node_addr); + outb(WD_MSR_MENB, eth_asic_base+WD_MSR); + outb((inb(eth_asic_base+0x04) | + 0x80), eth_asic_base+0x04); +- outb((((unsigned)eth_bmem >> 13) & 0x0F) | +- (((unsigned)eth_bmem >> 11) & 0x40) | ++ outb(((unsigned)(eth_bmem >> 13) & 0x0F) | ++ ((unsigned)(eth_bmem >> 11) & 0x40) | + (inb(eth_asic_base+0x0B) & 0xB0), eth_asic_base+0x0B); + outb((inb(eth_asic_base+0x04) & + ~0x80), eth_asic_base+0x04); ++#endif + } else { +- outb((((unsigned)eth_bmem >> 13) & 0x3F) | 0x40, eth_asic_base+WD_MSR); ++ printf(", memory %#x, addr %!\n", eth_bmem, nic->node_addr); ++ outb(((unsigned)(eth_bmem >> 13) & 0x3F) | 0x40, eth_asic_base+WD_MSR); + } + if (eth_flags & FLAG_16BIT) { + if (eth_flags & FLAG_790) { +@@ -624,8 +727,14 @@ + } + inb(0x84); + } ++} + #endif + #ifdef INCLUDE_3C503 ++#ifdef T503_AUI ++ nic->flags = 1; /* aui */ ++#else ++ nic->flags = 0; /* no aui */ ++#endif + /****************************************************************** + Search for 3Com 3c503 if no WD/SMC cards + ******************************************************************/ +@@ -708,11 +817,12 @@ + /* Get our ethernet address */ + + outb(_3COM_CR_EALO | _3COM_CR_XSEL, eth_asic_base + _3COM_CR); ++ nic->ioaddr = eth_nic_base; + printf("\n3Com 3c503 base %#hx, ", eth_nic_base); + if (eth_flags & FLAG_PIO) + printf("PIO mode"); + else +- printf("memory %#hx", eth_bmem); ++ printf("memory %#x", eth_bmem); + for (i=0; inode_addr[i] = inb(eth_nic_base+i); + } +@@ -734,9 +844,9 @@ + */ + + if (!(eth_flags & FLAG_PIO)) { +- memset((char *)eth_bmem, 0, 0x2000); ++ memset(bus_to_virt(eth_bmem), 0, 0x2000); + for(i = 0; i < 0x2000; ++i) +- if (*(((char *)eth_bmem)+i)) { ++ if (*((char *)(bus_to_virt(eth_bmem+i)))) { + printf ("Failed to clear 3c503 shared mem.\n"); + return (0); + } +@@ -749,9 +859,11 @@ + } + #endif + #if defined(INCLUDE_NE) || defined(INCLUDE_NS8390) ++{ + /****************************************************************** + Search for NE1000/2000 if no WD/SMC or 3com cards + ******************************************************************/ ++ unsigned char c; + if (eth_vendor == VENDOR_NONE) { + char romdata[16], testbuf[32]; + int idx; +@@ -810,23 +922,94 @@ + for (i=0; inode_addr[i] = romdata[i + ((eth_flags & FLAG_16BIT) ? i : 0)]; + } ++ nic->ioaddr = eth_nic_base; + printf("\nNE%c000 base %#hx, addr %!\n", + (eth_flags & FLAG_16BIT) ? '2' : '1', eth_nic_base, + nic->node_addr); + } ++} + #endif + if (eth_vendor == VENDOR_NONE) + return(0); + if (eth_vendor != VENDOR_3COM) + eth_rmem = eth_bmem; + ns8390_reset(nic); +- nic->reset = ns8390_reset; +- nic->poll = ns8390_poll; ++ ++ dev->disable = ns8390_disable; ++ nic->poll = ns8390_poll; + nic->transmit = ns8390_transmit; +- nic->disable = ns8390_disable; +- return(nic); ++ nic->irq = ns8390_irq; ++ ++ /* Based on PnP ISA map */ ++#ifdef INCLUDE_WD ++ dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR); ++ dev->devid.device_id = htons(0x812a); ++#endif ++#ifdef INCLUDE_3C503 ++ dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR); ++ dev->devid.device_id = htons(0x80f3); ++#endif ++#ifdef INCLUDE_NE ++ dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR); ++ dev->devid.device_id = htons(0x80d6); ++#endif ++ return 1; + } + ++#ifdef INCLUDE_WD ++static struct isa_driver wd_driver __isa_driver = { ++ .type = NIC_DRIVER, ++ .name = "WD", ++ .probe = wd_probe, ++ .ioaddrs = 0, ++}; ++#endif ++ ++#ifdef INCLUDE_3C503 ++static struct isa_driver t503_driver __isa_driver = { ++ .type = NIC_DRIVER, ++ .name = "3C503", ++ .probe = t503_probe, ++ .ioaddrs = 0, ++}; ++#endif ++ ++#ifdef INCLUDE_NE ++static struct isa_driver ne_driver __isa_driver = { ++ .type = NIC_DRIVER, ++ .name = "NE*000", ++ .probe = ne_probe, ++ .ioaddrs = 0, ++}; ++#endif ++ ++#ifdef INCLUDE_NS8390 ++static struct pci_id nepci_nics[] = { ++/* A few NE2000 PCI clones, list not exhaustive */ ++PCI_ROM(0x10ec, 0x8029, "rtl8029", "Realtek 8029"), ++PCI_ROM(0x1186, 0x0300, "dlink-528", "D-Link DE-528"), ++PCI_ROM(0x1050, 0x0940, "winbond940", "Winbond NE2000-PCI"), /* Winbond 86C940 / 89C940 */ ++PCI_ROM(0x1050, 0x5a5a, "winbond940f", "Winbond W89c940F"), /* Winbond 89C940F */ ++PCI_ROM(0x11f6, 0x1401, "compexrl2000", "Compex ReadyLink 2000"), ++PCI_ROM(0x8e2e, 0x3000, "ktiet32p2", "KTI ET32P2"), ++PCI_ROM(0x4a14, 0x5000, "nv5000sc", "NetVin NV5000SC"), ++PCI_ROM(0x12c3, 0x0058, "holtek80232", "Holtek HT80232"), ++PCI_ROM(0x12c3, 0x5598, "holtek80229", "Holtek HT80229"), ++PCI_ROM(0x10bd, 0x0e34, "surecom-ne34", "Surecom NE34"), ++PCI_ROM(0x1106, 0x0926, "via86c926", "Via 86c926"), ++}; ++ ++struct pci_driver nepci_driver = { ++ .type = NIC_DRIVER, ++ .name = "NE2000/PCI", ++ .probe = nepci_probe, ++ .ids = nepci_nics, ++ .id_count = sizeof(nepci_nics)/sizeof(nepci_nics[0]), ++ .class = 0, ++}; ++ ++#endif /* INCLUDE_NS8390 */ ++ + /* + * Local variables: + * c-basic-offset: 8 +diff -Naur grub-0.97.orig/netboot/osdep.h grub-0.97/netboot/osdep.h +--- grub-0.97.orig/netboot/osdep.h 2003-07-09 11:45:38.000000000 +0000 ++++ grub-0.97/netboot/osdep.h 2005-08-31 19:03:35.000000000 +0000 +@@ -1,94 +1,18 @@ +-#ifndef __OSDEP_H__ +-#define __OSDEP_H__ ++#ifndef _OSDEP_H ++#define _OSDEP_H + +-/* +- * This program is free software; you can redistribute it and/or +- * modify it under the terms of the GNU General Public License as +- * published by the Free Software Foundation; either version 2, or (at +- * your option) any later version. +- */ ++#define __unused __attribute__((unused)) ++#define __aligned __attribute__((aligned(16))) + +-#define __LITTLE_ENDIAN /* x86 */ +- +-/* Taken from /usr/include/linux/hfs_sysdep.h */ +-#if defined(__BIG_ENDIAN) +-# if !defined(__constant_htonl) +-# define __constant_htonl(x) (x) +-# endif +-# if !defined(__constant_htons) +-# define __constant_htons(x) (x) +-# endif +-#elif defined(__LITTLE_ENDIAN) +-# if !defined(__constant_htonl) +-# define __constant_htonl(x) \ +- ((unsigned long int)((((unsigned long int)(x) & 0x000000ffU) << 24) | \ +- (((unsigned long int)(x) & 0x0000ff00U) << 8) | \ +- (((unsigned long int)(x) & 0x00ff0000U) >> 8) | \ +- (((unsigned long int)(x) & 0xff000000U) >> 24))) +-# endif +-# if !defined(__constant_htons) +-# define __constant_htons(x) \ +- ((unsigned short int)((((unsigned short int)(x) & 0x00ff) << 8) | \ +- (((unsigned short int)(x) & 0xff00) >> 8))) +-# endif +-#else +-# error "Don't know if bytes are big- or little-endian!" +-#endif +- +-#define ntohl(x) \ +-(__builtin_constant_p(x) ? \ +- __constant_htonl((x)) : \ +- __swap32(x)) +-#define htonl(x) \ +-(__builtin_constant_p(x) ? \ +- __constant_htonl((x)) : \ +- __swap32(x)) +-#define ntohs(x) \ +-(__builtin_constant_p(x) ? \ +- __constant_htons((x)) : \ +- __swap16(x)) +-#define htons(x) \ +-(__builtin_constant_p(x) ? \ +- __constant_htons((x)) : \ +- __swap16(x)) +- +-static inline unsigned long int __swap32(unsigned long int x) +-{ +- __asm__("xchgb %b0,%h0\n\t" +- "rorl $16,%0\n\t" +- "xchgb %b0,%h0" +- : "=q" (x) +- : "0" (x)); +- return x; +-} +- +-static inline unsigned short int __swap16(unsigned short int x) +-{ +- __asm__("xchgb %b0,%h0" +- : "=q" (x) +- : "0" (x)); +- return x; +-} +- +-/* Make routines available to all */ +-#define swap32(x) __swap32(x) +-#define swap16(x) __swap16(x) +- +-#include "linux-asm-io.h" +- +-typedef unsigned long Address; ++#include "io.h" ++#include "byteswap.h" ++#include "latch.h" + + /* ANSI prototyping macro */ + #ifdef __STDC__ +-#define P(x) x ++# define P(x) x + #else +-#define P(x) () ++# define P(x) () + #endif + + #endif +- +-/* +- * Local variables: +- * c-basic-offset: 8 +- * End: +- */ +diff -Naur grub-0.97.orig/netboot/otulip.c grub-0.97/netboot/otulip.c +--- grub-0.97.orig/netboot/otulip.c 2003-07-09 11:45:38.000000000 +0000 ++++ grub-0.97/netboot/otulip.c 1970-01-01 00:00:00.000000000 +0000 +@@ -1,374 +0,0 @@ +-/* +- Etherboot DEC Tulip driver +- adapted by Ken Yap from +- +- FreeBSD netboot DEC 21143 driver +- +- Author: David Sharp +- date: Nov/98 +- +- Known to work on DEC DE500 using 21143-PC chipset. +- Even on cards with the same chipset there can be +- incompatablity problems with the way media selection +- and status LED settings are done. See comments below. +- +- Some code fragments were taken from verious places, +- Ken Yap's etherboot, FreeBSD's if_de.c, and various +- Linux related files. DEC's manuals for the 21143 and +- SROM format were very helpful. The Linux de driver +- development page has a number of links to useful +- related information. Have a look at: +- ftp://cesdis.gsfc.nasa.gov/pub/linux/drivers/tulip-devel.html +- +-*/ +- +-#include "etherboot.h" +-#include "nic.h" +-#include "pci.h" +-#include "cards.h" +-#include "otulip.h" +- +-static unsigned short vendor, dev_id; +-static unsigned short ioaddr; +-static unsigned int *membase; +-static unsigned char srom[1024]; +- +-#define BUFLEN 1536 /* must be longword divisable */ +- /* buffers must be longword aligned */ +- +-/* transmit descriptor and buffer */ +-static struct txdesc txd; +- +-/* receive descriptor(s) and buffer(s) */ +-#define NRXD 4 +-static struct rxdesc rxd[NRXD]; +-static int rxd_tail = 0; +-#ifdef USE_LOWMEM_BUFFER +-#define rxb ((char *)0x10000 - NRXD * BUFLEN) +-#define txb ((char *)0x10000 - NRXD * BUFLEN - BUFLEN) +-#else +-static unsigned char rxb[NRXD * BUFLEN]; +-static unsigned char txb[BUFLEN]; +-#endif +- +-static unsigned char ehdr[ETH_HLEN]; /* buffer for ethernet header */ +- +-enum tulip_offsets { +- CSR0=0, CSR1=0x08, CSR2=0x10, CSR3=0x18, CSR4=0x20, CSR5=0x28, +- CSR6=0x30, CSR7=0x38, CSR8=0x40, CSR9=0x48, CSR10=0x50, CSR11=0x58, +- CSR12=0x60, CSR13=0x68, CSR14=0x70, CSR15=0x78 }; +- +- +-/***************************************************************************/ +-/* 21143 specific stuff */ +-/***************************************************************************/ +- +-/* XXX assume 33MHz PCI bus, this is not very accurate and should be +- used only with gross over estimations of required delay times unless +- you tune UADJUST to your specific processor and I/O subsystem */ +- +-#define UADJUST 870 +-static void udelay(unsigned long usec) { +- unsigned long i; +- for (i=((usec*UADJUST)/33)+1; i>0; i--) (void) TULIP_CSR_READ(csr_0); +-} +- +-/* The following srom related code was taken from FreeBSD's if_de.c */ +-/* with minor alterations to make it work here. the Linux code is */ +-/* better but this was easier to use */ +- +-static void delay_300ns(void) +-{ +- int idx; +- for (idx = (300 / 33) + 1; idx > 0; idx--) +- (void) TULIP_CSR_READ(csr_busmode); +-} +- +-#define EMIT do { TULIP_CSR_WRITE(csr_srom_mii, csr); delay_300ns(); } while (0) +- +-static void srom_idle(void) +-{ +- unsigned bit, csr; +- +- csr = SROMSEL ; EMIT; +- csr = SROMSEL | SROMRD; EMIT; +- csr ^= SROMCS; EMIT; +- csr ^= SROMCLKON; EMIT; +- /* +- * Write 25 cycles of 0 which will force the SROM to be idle. +- */ +- for (bit = 3 + SROM_BITWIDTH + 16; bit > 0; bit--) { +- csr ^= SROMCLKOFF; EMIT; /* clock low; data not valid */ +- csr ^= SROMCLKON; EMIT; /* clock high; data valid */ +- } +- csr ^= SROMCLKOFF; EMIT; +- csr ^= SROMCS; EMIT; +- csr = 0; EMIT; +-} +- +-static void srom_read(void) +-{ +- unsigned idx; +- const unsigned bitwidth = SROM_BITWIDTH; +- const unsigned cmdmask = (SROMCMD_RD << bitwidth); +- const unsigned msb = 1 << (bitwidth + 3 - 1); +- unsigned lastidx = (1 << bitwidth) - 1; +- +- srom_idle(); +- +- for (idx = 0; idx <= lastidx; idx++) { +- unsigned lastbit, data, bits, bit, csr; +- csr = SROMSEL ; EMIT; +- csr = SROMSEL | SROMRD; EMIT; +- csr ^= SROMCSON; EMIT; +- csr ^= SROMCLKON; EMIT; +- +- lastbit = 0; +- for (bits = idx|cmdmask, bit = bitwidth + 3; bit > 0; bit--, bits <<= 1) +- { +- const unsigned thisbit = bits & msb; +- csr ^= SROMCLKOFF; EMIT; /* clock low; data not valid */ +- if (thisbit != lastbit) { +- csr ^= SROMDOUT; EMIT; /* clock low; invert data */ +- } else { +- EMIT; +- } +- csr ^= SROMCLKON; EMIT; /* clock high; data valid */ +- lastbit = thisbit; +- } +- csr ^= SROMCLKOFF; EMIT; +- +- for (data = 0, bits = 0; bits < 16; bits++) { +- data <<= 1; +- csr ^= SROMCLKON; EMIT; /* clock high; data valid */ +- data |= TULIP_CSR_READ(csr_srom_mii) & SROMDIN ? 1 : 0; +- csr ^= SROMCLKOFF; EMIT; /* clock low; data not valid */ +- } +- srom[idx*2] = data & 0xFF; +- srom[idx*2+1] = data >> 8; +- csr = SROMSEL | SROMRD; EMIT; +- csr = 0; EMIT; +- } +- srom_idle(); +-} +- +-/************************************************************************** +-ETH_RESET - Reset adapter +-***************************************************************************/ +-static void tulip_reset(struct nic *nic) +-{ +- int x,cnt=2; +- +- outl(0x00000001, ioaddr + CSR0); +- udelay(1000); +- /* turn off reset and set cache align=16lword, burst=unlimit */ +- outl(0x01A08000, ioaddr + CSR0); +- +- /* for some reason the media selection does not take +- the first time se it is repeated. */ +- +- while(cnt--) { +- /* stop TX,RX processes */ +- if (cnt == 1) +- outl(0x32404000, ioaddr + CSR6); +- else +- outl(0x32000040, ioaddr + CSR6); +- +- /* XXX - media selection is vendor specific and hard coded right +- here. This should be fixed to use the hints in the SROM and +- allow media selection by the user at runtime. MII support +- should also be added. Support for chips other than the +- 21143 should be added here as well */ +- +- /* start set to 10Mbps half-duplex */ +- +- /* setup SIA */ +- outl(0x0, ioaddr + CSR13); /* reset SIA */ +- outl(0x7f3f, ioaddr + CSR14); +- outl(0x8000008, ioaddr + CSR15); +- outl(0x0, ioaddr + CSR13); +- outl(0x1, ioaddr + CSR13); +- outl(0x2404000, ioaddr + CSR6); +- +- /* initalize GP */ +- outl(0x8af0008, ioaddr + CSR15); +- outl(0x50008, ioaddr + CSR15); +- +- /* end set to 10Mbps half-duplex */ +- +- if (vendor == PCI_VENDOR_ID_MACRONIX && dev_id == PCI_DEVICE_ID_MX987x5) { +- /* do stuff for MX98715 */ +- outl(0x01a80000, ioaddr + CSR6); +- outl(0xFFFFFFFF, ioaddr + CSR14); +- outl(0x00001000, ioaddr + CSR12); +- } +- +- outl(0x0, ioaddr + CSR7); /* disable interrupts */ +- +- /* construct setup packet which is used by the 21143 to +- program its CAM to recognize interesting MAC addresses */ +- +- memset(&txd, 0, sizeof(struct txdesc)); +- txd.buf1addr = &txb[0]; +- txd.buf2addr = &txb[0]; /* just in case */ +- txd.buf1sz = 192; /* setup packet must be 192 bytes */ +- txd.buf2sz = 0; +- txd.control = 0x020; /* setup packet */ +- txd.status = 0x80000000; /* give ownership to 21143 */ +- +- /* construct perfect filter frame */ +- /* with mac address as first match */ +- /* and broadcast address for all others */ +- +- for(x=0;x<192;x++) txb[x] = 0xff; +- txb[0] = nic->node_addr[0]; +- txb[1] = nic->node_addr[1]; +- txb[4] = nic->node_addr[2]; +- txb[5] = nic->node_addr[3]; +- txb[8] = nic->node_addr[4]; +- txb[9] = nic->node_addr[5]; +- outl((unsigned long)&txd, ioaddr + CSR4); /* set xmit buf */ +- outl(0x2406000, ioaddr + CSR6); /* start transmiter */ +- +- udelay(50000); /* wait for the setup packet to be processed */ +- +- } +- +- /* setup receive descriptor */ +- { +- int x; +- for(x=0;xnode_addr, ETH_ALEN); +- ehdr[ETH_ALEN*2] = (t >> 8) & 0xff; +- ehdr[ETH_ALEN*2+1] = t & 0xff; +- +- /* setup the transmit descriptor */ +- +- memset(&txd, 0, sizeof(struct txdesc)); +- +- txd.buf1addr = &ehdr[0]; /* ethernet header */ +- txd.buf1sz = ETH_HLEN; +- +- txd.buf2addr = p; /* packet to transmit */ +- txd.buf2sz = s; +- +- txd.control = 0x188; /* LS+FS+TER */ +- +- txd.status = 0x80000000; /* give it to 21143 */ +- +- outl(inl(ioaddr + CSR6) & ~0x00004000, ioaddr + CSR6); +- outl((unsigned long)&txd, ioaddr + CSR4); +- outl(inl(ioaddr + CSR6) | 0x00004000, ioaddr + CSR6); +- +-/* Wait for transmit to complete before returning. not well tested. +- +- time = currticks(); +- while(txd.status & 0x80000000) { +- if (currticks() - time > 20) { +- printf("transmit timeout.\n"); +- break; +- } +- } +-*/ +- +-} +- +-/************************************************************************** +-ETH_POLL - Wait for a frame +-***************************************************************************/ +-static int tulip_poll(struct nic *nic) +-{ +- if (rxd[rxd_tail].status & 0x80000000) return 0; +- +- nic->packetlen = (rxd[rxd_tail].status & 0x3FFF0000) >> 16; +- +- /* copy packet to working buffer */ +- /* XXX - this copy could be avoided with a little more work +- but for now we are content with it because the optimised +- memcpy(, , ) is quite fast */ +- +- memcpy(nic->packet, rxb + rxd_tail * BUFLEN, nic->packetlen); +- +- /* return the descriptor and buffer to recieve ring */ +- rxd[rxd_tail].status = 0x80000000; +- rxd_tail++; +- if (rxd_tail == NRXD) rxd_tail = 0; +- +- return 1; +-} +- +-static void tulip_disable(struct nic *nic) +-{ +- /* nothing for the moment */ +-} +- +-/************************************************************************** +-ETH_PROBE - Look for an adapter +-***************************************************************************/ +-struct nic *otulip_probe(struct nic *nic, unsigned short *io_addrs, struct pci_device *pci) +-{ +- int i; +- +- if (io_addrs == 0 || *io_addrs == 0) +- return (0); +- vendor = pci->vendor; +- dev_id = pci->dev_id; +- ioaddr = *io_addrs; +- membase = (unsigned int *)pci->membase; +- +- /* wakeup chip */ +- pcibios_write_config_dword(pci->bus,pci->devfn,0x40,0x00000000); +- +- /* Stop the chip's Tx and Rx processes. */ +- /* outl(inl(ioaddr + CSR6) & ~0x2002, ioaddr + CSR6); */ +- /* Clear the missed-packet counter. */ +- /* (volatile int)inl(ioaddr + CSR8); */ +- +- srom_read(); +- +- for (i=0; i < ETH_ALEN; i++) +- nic->node_addr[i] = srom[20+i]; +- +- printf("Tulip %! at ioaddr %#hX\n", nic->node_addr, ioaddr); +- +- tulip_reset(nic); +- +- nic->reset = tulip_reset; +- nic->poll = tulip_poll; +- nic->transmit = tulip_transmit; +- nic->disable = tulip_disable; +- return nic; +-} +diff -Naur grub-0.97.orig/netboot/otulip.h grub-0.97/netboot/otulip.h +--- grub-0.97.orig/netboot/otulip.h 2003-07-09 11:45:38.000000000 +0000 ++++ grub-0.97/netboot/otulip.h 1970-01-01 00:00:00.000000000 +0000 +@@ -1,76 +0,0 @@ +-/* mostly stolen from FreeBSD if_de.c, if_devar.h */ +- +-#define TULIP_CSR_READ(csr) (membase[csr*2]) +-#define CSR_READ(csr) (membase[csr*2]) +-#define TULIP_CSR_WRITE(csr, val) (membase[csr*2] = val) +-#define CSR_WRITE(csr, val) (membase[csr*2] = val) +- +-#define csr_0 0 +-#define csr_1 1 +-#define csr_2 2 +-#define csr_3 3 +-#define csr_4 4 +-#define csr_5 5 +-#define csr_6 6 +-#define csr_7 7 +-#define csr_8 8 +-#define csr_9 9 +-#define csr_10 10 +-#define csr_11 11 +-#define csr_12 12 +-#define csr_13 13 +-#define csr_14 14 +-#define csr_15 15 +- +-#define csr_busmode csr_0 +-#define csr_txpoll csr_1 +-#define csr_rxpoll csr_2 +-#define csr_rxlist csr_3 +-#define csr_txlist csr_4 +-#define csr_status csr_5 +-#define csr_command csr_6 +-#define csr_intr csr_7 +-#define csr_missed_frames csr_8 +-#define csr_enetrom csr_9 /* 21040 */ +-#define csr_reserved csr_10 /* 21040 */ +-#define csr_full_duplex csr_11 /* 21040 */ +-#define csr_bootrom csr_10 /* 21041/21140A/?? */ +-#define csr_gp csr_12 /* 21140* */ +-#define csr_watchdog csr_15 /* 21140* */ +-#define csr_gp_timer csr_11 /* 21041/21140* */ +-#define csr_srom_mii csr_9 /* 21041/21140* */ +-#define csr_sia_status csr_12 /* 2104x */ +-#define csr_sia_connectivity csr_13 /* 2104x */ +-#define csr_sia_tx_rx csr_14 /* 2104x */ +-#define csr_sia_general csr_15 /* 2104x */ +- +-#define SROMSEL 0x0800 +-#define SROMCS 0x0001 +-#define SROMCLKON 0x0002 +-#define SROMCLKOFF 0x0002 +-#define SROMRD 0x4000 +-#define SROMWR 0x2000 +-#define SROM_BITWIDTH 6 +-#define SROMCMD_RD 6 +-#define SROMCSON 0x0001 +-#define SROMDOUT 0x0004 +-#define SROMDIN 0x0008 +- +- +-struct txdesc { +- unsigned long status; /* owner, status */ +- unsigned long buf1sz:11, /* size of buffer 1 */ +- buf2sz:11, /* size of buffer 2 */ +- control:10; /* control bits */ +- const unsigned char *buf1addr; /* buffer 1 address */ +- const unsigned char *buf2addr; /* buffer 2 address */ +-}; +- +-struct rxdesc { +- unsigned long status; /* owner, status */ +- unsigned long buf1sz:11, /* size of buffer 1 */ +- buf2sz:11, /* size of buffer 2 */ +- control:10; /* control bits */ +- unsigned char *buf1addr; /* buffer 1 address */ +- unsigned char *buf2addr; /* buffer 2 address */ +-}; +diff -Naur grub-0.97.orig/netboot/pci.c grub-0.97/netboot/pci.c +--- grub-0.97.orig/netboot/pci.c 2003-07-09 11:45:38.000000000 +0000 ++++ grub-0.97/netboot/pci.c 2005-08-31 19:03:35.000000000 +0000 +@@ -1,15 +1,3 @@ +-/* +-** Support for NE2000 PCI clones added David Monro June 1997 +-** Generalised to other NICs by Ken Yap July 1997 +-** +-** Most of this is taken from: +-** +-** /usr/src/linux/drivers/pci/pci.c +-** /usr/src/linux/include/linux/pci.h +-** /usr/src/linux/arch/i386/bios32.c +-** /usr/src/linux/include/linux/bios32.h +-** /usr/src/linux/drivers/net/ne.c +-*/ + + /* + * This program is free software; you can redistribute it and/or +@@ -18,402 +6,294 @@ + * your option) any later version. + */ + +-#include "etherboot.h" ++#include "grub.h" + #include "pci.h" + +-/*#define DEBUG 1*/ +-#define DEBUG 0 +- +-#ifdef CONFIG_PCI_DIRECT +-#define PCIBIOS_SUCCESSFUL 0x00 +- +-/* +- * Functions for accessing PCI configuration space with type 1 accesses +- */ +- +-#define CONFIG_CMD(bus, device_fn, where) (0x80000000 | (bus << 16) | (device_fn << 8) | (where & ~3)) +- +-int pcibios_read_config_byte(unsigned int bus, unsigned int device_fn, +- unsigned int where, unsigned char *value) ++unsigned long virt_offset = 0; ++unsigned long virt_to_phys(volatile const void *virt_addr) + { +- outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); +- *value = inb(0xCFC + (where&3)); +- return PCIBIOS_SUCCESSFUL; ++ return ((unsigned long)virt_addr) + virt_offset; + } + +-int pcibios_read_config_word (unsigned int bus, +- unsigned int device_fn, unsigned int where, unsigned short *value) ++void *phys_to_virt(unsigned long phys_addr) + { +- outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); +- *value = inw(0xCFC + (where&2)); +- return PCIBIOS_SUCCESSFUL; ++ return (void *)(phys_addr - virt_offset); + } + +-int pcibios_read_config_dword (unsigned int bus, unsigned int device_fn, +- unsigned int where, unsigned int *value) +-{ +- outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); +- *value = inl(0xCFC); +- return PCIBIOS_SUCCESSFUL; +-} ++#ifdef INCLUDE_3C595 ++extern struct pci_driver t595_driver; ++#endif /* INCLUDE_3C595 */ + +-int pcibios_write_config_byte (unsigned int bus, unsigned int device_fn, +- unsigned int where, unsigned char value) +-{ +- outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); +- outb(value, 0xCFC + (where&3)); +- return PCIBIOS_SUCCESSFUL; +-} ++#ifdef INCLUDE_3C90X ++extern struct pci_driver a3c90x_driver; ++#endif /* INCLUDE_3C90X */ + +-int pcibios_write_config_word (unsigned int bus, unsigned int device_fn, +- unsigned int where, unsigned short value) +-{ +- outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); +- outw(value, 0xCFC + (where&2)); +- return PCIBIOS_SUCCESSFUL; +-} ++#ifdef INCLUDE_DAVICOM ++extern struct pci_driver davicom_driver; ++#endif /* INCLUDE_DAVICOM */ + +-int pcibios_write_config_dword (unsigned int bus, unsigned int device_fn, unsigned int where, unsigned int value) +-{ +- outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); +- outl(value, 0xCFC); +- return PCIBIOS_SUCCESSFUL; +-} ++#ifdef INCLUDE_E1000 ++extern struct pci_driver e1000_driver; ++#endif /* INCLUDE_E1000 */ + +-#undef CONFIG_CMD ++#ifdef INCLUDE_EEPRO100 ++extern struct pci_driver eepro100_driver; ++#endif /* INCLUDE_EEPRO100 */ + +-#else /* CONFIG_PCI_DIRECT not defined */ ++#ifdef INCLUDE_EPIC100 ++extern struct pci_driver epic100_driver; ++#endif /* INCLUDE_EPIC100 */ + +-static struct { +- unsigned long address; +- unsigned short segment; +-} bios32_indirect = { 0, KERN_CODE_SEG }; +- +-static long pcibios_entry; +-static struct { +- unsigned long address; +- unsigned short segment; +-} pci_indirect = { 0, KERN_CODE_SEG }; ++#ifdef INCLUDE_FORCEDETH ++extern struct pci_driver forcedeth_driver; ++#endif /* INCLUDE_FORCEDETH */ + +-static unsigned long bios32_service(unsigned long service) +-{ +- unsigned char return_code; /* %al */ +- unsigned long address; /* %ebx */ +- unsigned long length; /* %ecx */ +- unsigned long entry; /* %edx */ +- unsigned long flags; +- +- save_flags(flags); +- __asm__( +-#ifdef ABSOLUTE_WITHOUT_ASTERISK +- "lcall (%%edi)" +-#else +- "lcall *(%%edi)" +-#endif +- : "=a" (return_code), +- "=b" (address), +- "=c" (length), +- "=d" (entry) +- : "0" (service), +- "1" (0), +- "D" (&bios32_indirect)); +- restore_flags(flags); +- +- switch (return_code) { +- case 0: +- return address + entry; +- case 0x80: /* Not present */ +- printf("bios32_service(%d) : not present\n", service); +- return 0; +- default: /* Shouldn't happen */ +- printf("bios32_service(%d) : returned %#X, mail drew@colorado.edu\n", +- service, return_code); +- return 0; +- } +-} ++#ifdef INCLUDE_NATSEMI ++extern struct pci_driver natsemi_driver; ++#endif /* INCLUDE_NATSEMI */ + +-int pcibios_read_config_byte(unsigned int bus, +- unsigned int device_fn, unsigned int where, unsigned char *value) +-{ +- unsigned long ret; +- unsigned long bx = (bus << 8) | device_fn; +- unsigned long flags; +- +- save_flags(flags); +- __asm__( +-#ifdef ABSOLUTE_WITHOUT_ASTERISK +- "lcall (%%esi)\n\t" +-#else +- "lcall *(%%esi)\n\t" +-#endif +- "jc 1f\n\t" +- "xor %%ah, %%ah\n" +- "1:" +- : "=c" (*value), +- "=a" (ret) +- : "1" (PCIBIOS_READ_CONFIG_BYTE), +- "b" (bx), +- "D" ((long) where), +- "S" (&pci_indirect)); +- restore_flags(flags); +- return (int) (ret & 0xff00) >> 8; +-} ++#ifdef INCLUDE_NS83820 ++extern struct pci_driver ns83820_driver; ++#endif /* INCLUDE_NS83820 */ + +-int pcibios_read_config_word(unsigned int bus, +- unsigned int device_fn, unsigned int where, unsigned short *value) +-{ +- unsigned long ret; +- unsigned long bx = (bus << 8) | device_fn; +- unsigned long flags; +- +- save_flags(flags); +- __asm__( +-#ifdef ABSOLUTE_WITHOUT_ASTERISK +- "lcall (%%esi)\n\t" +-#else +- "lcall *(%%esi)\n\t" +-#endif +- "jc 1f\n\t" +- "xor %%ah, %%ah\n" +- "1:" +- : "=c" (*value), +- "=a" (ret) +- : "1" (PCIBIOS_READ_CONFIG_WORD), +- "b" (bx), +- "D" ((long) where), +- "S" (&pci_indirect)); +- restore_flags(flags); +- return (int) (ret & 0xff00) >> 8; +-} ++#ifdef INCLUDE_NS8390 ++extern struct pci_driver nepci_driver; ++#endif /* INCLUDE_NS8390 */ + +-int pcibios_read_config_dword(unsigned int bus, +- unsigned int device_fn, unsigned int where, unsigned int *value) +-{ +- unsigned long ret; +- unsigned long bx = (bus << 8) | device_fn; +- unsigned long flags; +- +- save_flags(flags); +- __asm__( +-#ifdef ABSOLUTE_WITHOUT_ASTERISK +- "lcall (%%esi)\n\t" +-#else +- "lcall *(%%esi)\n\t" +-#endif +- "jc 1f\n\t" +- "xor %%ah, %%ah\n" +- "1:" +- : "=c" (*value), +- "=a" (ret) +- : "1" (PCIBIOS_READ_CONFIG_DWORD), +- "b" (bx), +- "D" ((long) where), +- "S" (&pci_indirect)); +- restore_flags(flags); +- return (int) (ret & 0xff00) >> 8; +-} ++#ifdef INCLUDE_PCNET32 ++extern struct pci_driver pcnet32_driver; ++#endif /* INCLUDE_PCNET32 */ + +-int pcibios_write_config_byte (unsigned int bus, +- unsigned int device_fn, unsigned int where, unsigned char value) +-{ +- unsigned long ret; +- unsigned long bx = (bus << 8) | device_fn; +- unsigned long flags; +- +- save_flags(flags); cli(); +- __asm__( +-#ifdef ABSOLUTE_WITHOUT_ASTERISK +- "lcall (%%esi)\n\t" +-#else +- "lcall *(%%esi)\n\t" +-#endif +- "jc 1f\n\t" +- "xor %%ah, %%ah\n" +- "1:" +- : "=a" (ret) +- : "0" (PCIBIOS_WRITE_CONFIG_BYTE), +- "c" (value), +- "b" (bx), +- "D" ((long) where), +- "S" (&pci_indirect)); +- restore_flags(flags); +- return (int) (ret & 0xff00) >> 8; +-} ++#ifdef INCLUDE_PNIC ++extern struct pci_driver pnic_driver; ++#endif /* INCLUDE_PNIC */ + +-int pcibios_write_config_word (unsigned int bus, +- unsigned int device_fn, unsigned int where, unsigned short value) +-{ +- unsigned long ret; +- unsigned long bx = (bus << 8) | device_fn; +- unsigned long flags; +- +- save_flags(flags); cli(); +- __asm__( +-#ifdef ABSOLUTE_WITHOUT_ASTERISK +- "lcall (%%esi)\n\t" +-#else +- "lcall *(%%esi)\n\t" +-#endif +- "jc 1f\n\t" +- "xor %%ah, %%ah\n" +- "1:" +- : "=a" (ret) +- : "0" (PCIBIOS_WRITE_CONFIG_WORD), +- "c" (value), +- "b" (bx), +- "D" ((long) where), +- "S" (&pci_indirect)); +- restore_flags(flags); +- return (int) (ret & 0xff00) >> 8; +-} ++#ifdef INCLUDE_RTL8139 ++extern struct pci_driver rtl8139_driver; ++#endif /* INCLUDE_RTL8139 */ + +-int pcibios_write_config_dword (unsigned int bus, +- unsigned int device_fn, unsigned int where, unsigned int value) +-{ +- unsigned long ret; +- unsigned long bx = (bus << 8) | device_fn; +- unsigned long flags; +- +- save_flags(flags); cli(); +- __asm__( +-#ifdef ABSOLUTE_WITHOUT_ASTERISK +- "lcall (%%esi)\n\t" +-#else +- "lcall *(%%esi)\n\t" +-#endif +- "jc 1f\n\t" +- "xor %%ah, %%ah\n" +- "1:" +- : "=a" (ret) +- : "0" (PCIBIOS_WRITE_CONFIG_DWORD), +- "c" (value), +- "b" (bx), +- "D" ((long) where), +- "S" (&pci_indirect)); +- restore_flags(flags); +- return (int) (ret & 0xff00) >> 8; +-} ++#ifdef INCLUDE_SIS900 ++extern struct pci_driver sis900_driver; ++extern struct pci_driver sis_bridge_driver; ++#endif /* INCLUDE_SIS900 */ + +-static void check_pcibios(void) +-{ +- unsigned long signature; +- unsigned char present_status; +- unsigned char major_revision; +- unsigned char minor_revision; +- unsigned long flags; +- int pack; +- +- if ((pcibios_entry = bios32_service(PCI_SERVICE))) { +- pci_indirect.address = pcibios_entry; +- +- save_flags(flags); +- __asm__( +-#ifdef ABSOLUTE_WITHOUT_ASTERISK +- "lcall (%%edi)\n\t" +-#else +- "lcall *(%%edi)\n\t" +-#endif +- "jc 1f\n\t" +- "xor %%ah, %%ah\n" +- "1:\tshl $8, %%eax\n\t" +- "movw %%bx, %%ax" +- : "=d" (signature), +- "=a" (pack) +- : "1" (PCIBIOS_PCI_BIOS_PRESENT), +- "D" (&pci_indirect) +- : "bx", "cx"); +- restore_flags(flags); +- +- present_status = (pack >> 16) & 0xff; +- major_revision = (pack >> 8) & 0xff; +- minor_revision = pack & 0xff; +- if (present_status || (signature != PCI_SIGNATURE)) { +- printf("ERROR: BIOS32 says PCI BIOS, but no PCI " +- "BIOS????\n"); +- pcibios_entry = 0; +- } +-#if DEBUG +- if (pcibios_entry) { +- printf ("pcibios_init : PCI BIOS revision %hhX.%hhX" +- " entry at %#X\n", major_revision, +- minor_revision, pcibios_entry); +- } +-#endif +- } +-} ++#ifdef INCLUDE_SUNDANCE ++extern struct pci_driver sundance_driver; ++#endif /* INCLUDE_SUNDANCE */ + +-static void pcibios_init(void) +-{ +- union bios32 *check; +- unsigned char sum; +- int i, length; +- unsigned long bios32_entry = 0; +- +- /* +- * Follow the standard procedure for locating the BIOS32 Service +- * directory by scanning the permissible address range from +- * 0xe0000 through 0xfffff for a valid BIOS32 structure. +- * +- */ ++#ifdef INCLUDE_TG3 ++extern struct pci_driver tg3_driver; ++#endif /* INCLUDE_TG3 */ ++ ++#ifdef INCLUDE_TLAN ++extern struct pci_driver tlan_driver; ++#endif /* INCLUDE_TLAN */ ++ ++#ifdef INCLUDE_TULIP ++extern struct pci_driver tulip_driver; ++#endif /* INCLUDE_TULIP */ ++ ++#ifdef INCLUDE_UNDI ++extern struct pci_driver undi_driver; ++#endif /* INCLUDE_UNDI */ ++ ++#ifdef INCLUDE_VIA_RHINE ++extern struct pci_driver rhine_driver; ++#endif/* INCLUDE_VIA_RHINE */ ++ ++#ifdef INCLUDE_W89C840 ++extern struct pci_driver w89c840_driver; ++#endif /* INCLUDE_W89C840 */ ++ ++#ifdef INCLUDE_R8169 ++extern struct pci_driver r8169_driver; ++#endif /* INCLUDE_R8169 */ ++ ++static const struct pci_driver *pci_drivers[] = { ++ ++#ifdef INCLUDE_3C595 ++ &t595_driver, ++#endif /* INCLUDE_3C595 */ ++ ++#ifdef INCLUDE_3C90X ++ &a3c90x_driver, ++#endif /* INCLUDE_3C90X */ ++ ++#ifdef INCLUDE_DAVICOM ++ &davicom_driver, ++#endif /* INCLUDE_DAVICOM */ ++ ++#ifdef INCLUDE_E1000 ++ &e1000_driver, ++#endif /* INCLUDE_E1000 */ ++ ++#ifdef INCLUDE_EEPRO100 ++ &eepro100_driver, ++#endif /* INCLUDE_EEPRO100 */ ++ ++#ifdef INCLUDE_EPIC100 ++ &epic100_driver, ++#endif /* INCLUDE_EPIC100 */ ++ ++#ifdef INCLUDE_FORCEDETH ++ &forcedeth_driver, ++#endif /* INCLUDE_FORCEDETH */ ++ ++#ifdef INCLUDE_NATSEMI ++ &natsemi_driver, ++#endif /* INCLUDE_NATSEMI */ ++ ++#ifdef INCLUDE_NS83820 ++ &ns83820_driver, ++#endif /* INCLUDE_NS83820 */ ++ ++#ifdef INCLUDE_NS8390 ++ &nepci_driver, ++#endif /* INCLUDE_NS8390 */ ++ ++#ifdef INCLUDE_PCNET32 ++ &pcnet32_driver, ++#endif /* INCLUDE_PCNET32 */ ++ ++#ifdef INCLUDE_PNIC ++ &pnic_driver, ++#endif /* INCLUDE_PNIC */ + +- for (check = (union bios32 *) 0xe0000; check <= (union bios32 *) 0xffff0; ++check) { +- if (check->fields.signature != BIOS32_SIGNATURE) ++#ifdef INCLUDE_RTL8139 ++ &rtl8139_driver, ++#endif /* INCLUDE_RTL8139 */ ++ ++#ifdef INCLUDE_SIS900 ++ &sis900_driver, ++ &sis_bridge_driver, ++#endif /* INCLUDE_SIS900 */ ++ ++#ifdef INCLUDE_SUNDANCE ++ &sundance_driver, ++#endif /* INCLUDE_SUNDANCE */ ++ ++#ifdef INCLUDE_TG3 ++ & tg3_driver, ++#endif /* INCLUDE_TG3 */ ++ ++#ifdef INCLUDE_TLAN ++ &tlan_driver, ++#endif /* INCLUDE_TLAN */ ++ ++#ifdef INCLUDE_TULIP ++ & tulip_driver, ++#endif /* INCLUDE_TULIP */ ++ ++#ifdef INCLUDE_VIA_RHINE ++ &rhine_driver, ++#endif/* INCLUDE_VIA_RHINE */ ++ ++#ifdef INCLUDE_W89C840 ++ &w89c840_driver, ++#endif /* INCLUDE_W89C840 */ ++ ++#ifdef INCLUDE_R8169 ++ &r8169_driver, ++#endif /* INCLUDE_R8169 */ ++ ++/* We must be the last one */ ++#ifdef INCLUDE_UNDI ++ &undi_driver, ++#endif /* INCLUDE_UNDI */ ++ ++ 0 ++}; ++ ++static void scan_drivers( ++ int type, ++ uint32_t class, uint16_t vendor, uint16_t device, ++ const struct pci_driver *last_driver, struct pci_device *dev) ++{ ++ const struct pci_driver *skip_driver = last_driver; ++ /* Assume there is only one match of the correct type */ ++ const struct pci_driver *driver; ++ int i, j; ++ ++ for(j = 0; pci_drivers[j] != 0; j++){ ++ driver = pci_drivers[j]; ++ if (driver->type != type) + continue; +- length = check->fields.length * 16; +- if (!length) ++ if (skip_driver) { ++ if (skip_driver == driver) ++ skip_driver = 0; + continue; +- sum = 0; +- for (i = 0; i < length ; ++i) +- sum += check->chars[i]; +- if (sum != 0) ++ } ++ for(i = 0; i < driver->id_count; i++) { ++ if ((vendor == driver->ids[i].vendor) && ++ (device == driver->ids[i].dev_id)) { ++ ++ dev->driver = driver; ++ dev->name = driver->ids[i].name; ++ ++ goto out; ++ } ++ } ++ } ++ if (!class) { ++ goto out; ++ } ++ for(j = 0; pci_drivers[j] != 0; j++){ ++ driver = pci_drivers[j]; ++ if (driver->type != type) + continue; +- if (check->fields.revision != 0) { +- printf("pcibios_init : unsupported revision %d at %#X, mail drew@colorado.edu\n", +- check->fields.revision, check); ++ if (skip_driver) { ++ if (skip_driver == driver) ++ skip_driver = 0; + continue; + } +-#if DEBUG +- printf("pcibios_init : BIOS32 Service Directory " +- "structure at %#X\n", check); +-#endif +- if (!bios32_entry) { +- if (check->fields.entry >= 0x100000) { +- printf("pcibios_init: entry in high " +- "memory, giving up\n"); +- return; +- } else { +- bios32_entry = check->fields.entry; +-#if DEBUG +- printf("pcibios_init : BIOS32 Service Directory" +- " entry at %#X\n", bios32_entry); +-#endif +- bios32_indirect.address = bios32_entry; +- } ++ if (last_driver == driver) ++ continue; ++ if ((class >> 8) == driver->class) { ++ dev->driver = driver; ++ dev->name = driver->name; ++ goto out; + } + } +- if (bios32_entry) +- check_pcibios(); ++ out: ++ return; + } +-#endif /* CONFIG_PCI_DIRECT not defined*/ + +-static void scan_bus(struct pci_device *pcidev) ++void scan_pci_bus(int type, struct pci_device *dev) + { +- unsigned int devfn, l, bus, buses; ++ unsigned int first_bus, first_devfn; ++ const struct pci_driver *first_driver; ++ unsigned int devfn, bus, buses; + unsigned char hdr_type = 0; +- unsigned short vendor, device; +- unsigned int membase, ioaddr, romaddr; +- int i, reg; +- unsigned int pci_ioaddr = 0; +- ++ uint32_t class; ++ uint16_t vendor, device; ++ uint32_t l, membase, ioaddr, romaddr; ++ int reg; ++ ++ EnterFunction("scan_pci_bus"); ++ first_bus = 0; ++ first_devfn = 0; ++ first_driver = 0; ++ if (dev->driver) { ++ first_driver = dev->driver; ++ first_bus = dev->bus; ++ first_devfn = dev->devfn; ++ /* Re read the header type on a restart */ ++ pcibios_read_config_byte(first_bus, first_devfn & ~0x7, ++ PCI_HEADER_TYPE, &hdr_type); ++ dev->driver = 0; ++ dev->bus = 0; ++ dev->devfn = 0; ++ } ++ + /* Scan all PCI buses, until we find our card. +- * We could be smart only scan the required busses but that ++ * We could be smart only scan the required buses but that + * is error prone, and tricky. +- * By scanning all possible pci busses in order we should find ++ * By scanning all possible pci buses in order we should find + * our card eventually. + */ + buses=256; +- for (bus = 0; bus < buses; ++bus) { +- for (devfn = 0; devfn < 0xff; ++devfn) { ++ for (bus = first_bus; bus < buses; ++bus) { ++ for (devfn = first_devfn; devfn < 0xff; ++devfn, first_driver = 0) { + if (PCI_FUNC (devfn) == 0) + pcibios_read_config_byte(bus, devfn, PCI_HEADER_TYPE, &hdr_type); + else if (!(hdr_type & 0x80)) /* not a multi-function device */ +@@ -421,61 +301,90 @@ + pcibios_read_config_dword(bus, devfn, PCI_VENDOR_ID, &l); + /* some broken boards return 0 if a slot is empty: */ + if (l == 0xffffffff || l == 0x00000000) { +- hdr_type = 0; + continue; + } + vendor = l & 0xffff; + device = (l >> 16) & 0xffff; + ++ pcibios_read_config_dword(bus, devfn, PCI_REVISION, &l); ++ class = (l >> 8) & 0xffffff; + #if DEBUG +- printf("bus %hhX, function %hhX, vendor %hX, device %hX\n", +- bus, devfn, vendor, device); ++ { ++ int i; ++ printf("%hhx:%hhx.%hhx [%hX/%hX] ---- ", ++ bus, PCI_SLOT(devfn), PCI_FUNC(devfn), ++ vendor, device); ++#if DEBUG > 1 ++ for(i = 0; i < 256; i++) { ++ unsigned char byte; ++ if ((i & 0xf) == 0) { ++ printf("%hhx: ", i); ++ } ++ pcibios_read_config_byte(bus, devfn, i, &byte); ++ printf("%hhx ", byte); ++ if ((i & 0xf) == 0xf) { ++ printf("\n"); ++ } ++ } ++#endif ++ ++ } ++#endif ++ scan_drivers(type, class, vendor, device, first_driver, dev); ++ if (!dev->driver){ ++#if DEBUG ++ printf("No driver fit.\n"); + #endif +- for (i = 0; pcidev[i].vendor != 0; i++) { +- if (vendor != pcidev[i].vendor +- || device != pcidev[i].dev_id) ++ continue; ++ } ++#if DEBUG ++ printf("Get Driver:\n"); ++#endif ++ dev->devfn = devfn; ++ dev->bus = bus; ++ dev->class = class; ++ dev->vendor = vendor; ++ dev->dev_id = device; ++ ++ ++ /* Get the ROM base address */ ++ pcibios_read_config_dword(bus, devfn, ++ PCI_ROM_ADDRESS, &romaddr); ++ romaddr >>= 10; ++ dev->romaddr = romaddr; ++ ++ /* Get the ``membase'' */ ++ pcibios_read_config_dword(bus, devfn, ++ PCI_BASE_ADDRESS_1, &membase); ++ dev->membase = membase; ++ ++ /* Get the ``ioaddr'' */ ++ for (reg = PCI_BASE_ADDRESS_0; reg <= PCI_BASE_ADDRESS_5; reg += 4) { ++ pcibios_read_config_dword(bus, devfn, reg, &ioaddr); ++ if ((ioaddr & PCI_BASE_ADDRESS_IO_MASK) == 0 || (ioaddr & PCI_BASE_ADDRESS_SPACE_IO) == 0) + continue; +- pcidev[i].devfn = devfn; +- pcidev[i].bus = bus; +- for (reg = PCI_BASE_ADDRESS_0; reg <= PCI_BASE_ADDRESS_5; reg += 4) { +- pcibios_read_config_dword(bus, devfn, reg, &ioaddr); +- +- if ((ioaddr & PCI_BASE_ADDRESS_IO_MASK) == 0 || (ioaddr & PCI_BASE_ADDRESS_SPACE_IO) == 0) +- continue; +- /* Strip the I/O address out of the returned value */ +- ioaddr &= PCI_BASE_ADDRESS_IO_MASK; +- /* Get the memory base address */ +- pcibios_read_config_dword(bus, devfn, +- PCI_BASE_ADDRESS_1, &membase); +- /* Get the ROM base address */ +- pcibios_read_config_dword(bus, devfn, PCI_ROM_ADDRESS, &romaddr); +- romaddr >>= 10; +- printf("Found %s at %#hx, ROM address %#hx\n", +- pcidev[i].name, ioaddr, romaddr); +- /* Take the first one or the one that matches in boot ROM address */ +- if (pci_ioaddr == 0 || romaddr == ((unsigned long) rom.rom_segment << 4)) { +- pcidev[i].membase = membase; +- pcidev[i].ioaddr = ioaddr; +- return; +- } +- } ++ ++ ++ /* Strip the I/O address out of the returned value */ ++ ioaddr &= PCI_BASE_ADDRESS_IO_MASK; ++ ++ /* Take the first one or the one that matches in boot ROM address */ ++ dev->ioaddr = ioaddr; + } ++#if DEBUG > 2 ++ printf("Found %s ROM address %#hx\n", ++ dev->name, romaddr); ++#endif ++ LeaveFunction("scan_pci_bus"); ++ return; + } ++ first_devfn = 0; + } ++ first_bus = 0; ++ LeaveFunction("scan_pci_bus"); + } + +-void eth_pci_init(struct pci_device *pcidev) +-{ +-#ifndef CONFIG_PCI_DIRECT +- pcibios_init(); +- if (!pcibios_entry) { +- printf("pci_init: no BIOS32 detected\n"); +- return; +- } +-#endif +- scan_bus(pcidev); +- /* return values are in pcidev structures */ +-} ++ + + /* + * Set device to be a busmaster in case BIOS neglected to do so. +@@ -489,13 +398,134 @@ + pcibios_read_config_word(p->bus, p->devfn, PCI_COMMAND, &pci_command); + new_command = pci_command | PCI_COMMAND_MASTER|PCI_COMMAND_IO; + if (pci_command != new_command) { +- printf("The PCI BIOS has not enabled this device!\nUpdating PCI command %hX->%hX. pci_bus %hhX pci_device_fn %hhX\n", ++#if DEBUG > 0 ++ printf( ++ "The PCI BIOS has not enabled this device!\n" ++ "Updating PCI command %hX->%hX. pci_bus %hhX pci_device_fn %hhX\n", + pci_command, new_command, p->bus, p->devfn); ++#endif + pcibios_write_config_word(p->bus, p->devfn, PCI_COMMAND, new_command); + } + pcibios_read_config_byte(p->bus, p->devfn, PCI_LATENCY_TIMER, &pci_latency); + if (pci_latency < 32) { +- printf("PCI latency timer (CFLT) is unreasonably low at %d. Setting to 32 clocks.\n", pci_latency); ++#if DEBUG > 0 ++ printf("PCI latency timer (CFLT) is unreasonably low at %d. Setting to 32 clocks.\n", ++ pci_latency); ++#endif + pcibios_write_config_byte(p->bus, p->devfn, PCI_LATENCY_TIMER, 32); + } + } ++ ++/* ++ * Find the start of a pci resource. ++ */ ++unsigned long pci_bar_start(struct pci_device *dev, unsigned int index) ++{ ++ uint32_t lo, hi; ++ unsigned long bar; ++ pci_read_config_dword(dev, index, &lo); ++ if (lo & PCI_BASE_ADDRESS_SPACE_IO) { ++ bar = lo & PCI_BASE_ADDRESS_IO_MASK; ++ } else { ++ bar = 0; ++ if ((lo & PCI_BASE_ADDRESS_MEM_TYPE_MASK) == PCI_BASE_ADDRESS_MEM_TYPE_64) { ++ pci_read_config_dword(dev, index + 4, &hi); ++ if (hi) { ++ if (sizeof(unsigned long) > sizeof(uint32_t)) { ++ bar = hi; ++ /* It's REALLY interesting:-) */ ++ bar <<=32; ++ } ++ else { ++ printf("Unhandled 64bit BAR\n"); ++ return -1UL; ++ } ++ } ++ } ++ bar |= lo & PCI_BASE_ADDRESS_MEM_MASK; ++ } ++ return bar + pcibios_bus_base(dev->bus); ++} ++ ++/* ++ * Find the size of a pci resource. ++ */ ++unsigned long pci_bar_size(struct pci_device *dev, unsigned int bar) ++{ ++ uint32_t start, size; ++ /* Save the original bar */ ++ pci_read_config_dword(dev, bar, &start); ++ /* Compute which bits can be set */ ++ pci_write_config_dword(dev, bar, ~0); ++ pci_read_config_dword(dev, bar, &size); ++ /* Restore the original size */ ++ pci_write_config_dword(dev, bar, start); ++ /* Find the significant bits */ ++ if (start & PCI_BASE_ADDRESS_SPACE_IO) { ++ size &= PCI_BASE_ADDRESS_IO_MASK; ++ } else { ++ size &= PCI_BASE_ADDRESS_MEM_MASK; ++ } ++ /* Find the lowest bit set */ ++ size = size & ~(size - 1); ++ return size; ++} ++ ++/** ++ * pci_find_capability - query for devices' capabilities ++ * @dev: PCI device to query ++ * @cap: capability code ++ * ++ * Tell if a device supports a given PCI capability. ++ * Returns the address of the requested capability structure within the ++ * device's PCI configuration space or 0 in case the device does not ++ * support it. Possible values for @cap: ++ * ++ * %PCI_CAP_ID_PM Power Management ++ * ++ * %PCI_CAP_ID_AGP Accelerated Graphics Port ++ * ++ * %PCI_CAP_ID_VPD Vital Product Data ++ * ++ * %PCI_CAP_ID_SLOTID Slot Identification ++ * ++ * %PCI_CAP_ID_MSI Message Signalled Interrupts ++ * ++ * %PCI_CAP_ID_CHSWP CompactPCI HotSwap ++ */ ++int pci_find_capability(struct pci_device *dev, int cap) ++{ ++ uint16_t status; ++ uint8_t pos, id; ++ uint8_t hdr_type; ++ int ttl = 48; ++ ++ pci_read_config_word(dev, PCI_STATUS, &status); ++ if (!(status & PCI_STATUS_CAP_LIST)) ++ return 0; ++ pci_read_config_byte(dev, PCI_HEADER_TYPE, &hdr_type); ++ switch (hdr_type & 0x7F) { ++ case PCI_HEADER_TYPE_NORMAL: ++ case PCI_HEADER_TYPE_BRIDGE: ++ default: ++ pci_read_config_byte(dev, PCI_CAPABILITY_LIST, &pos); ++ break; ++ case PCI_HEADER_TYPE_CARDBUS: ++ pci_read_config_byte(dev, PCI_CB_CAPABILITY_LIST, &pos); ++ break; ++ } ++ while (ttl-- && pos >= 0x40) { ++ pos &= ~3; ++ pci_read_config_byte(dev, pos + PCI_CAP_LIST_ID, &id); ++#if DEBUG > 0 ++ printf("Capability: %d\n", id); ++#endif ++ if (id == 0xff) ++ break; ++ if (id == cap) ++ return pos; ++ pci_read_config_byte(dev, pos + PCI_CAP_LIST_NEXT, &pos); ++ } ++ return 0; ++} ++ +diff -Naur grub-0.97.orig/netboot/pci.h grub-0.97/netboot/pci.h +--- grub-0.97.orig/netboot/pci.h 2003-07-09 11:45:38.000000000 +0000 ++++ grub-0.97/netboot/pci.h 2005-08-31 21:31:46.000000000 +0000 +@@ -1,4 +1,4 @@ +-#ifndef PCI_H ++#if !defined(PCI_H) && defined(CONFIG_PCI) + #define PCI_H + + /* +@@ -21,10 +21,19 @@ + * your option) any later version. + */ + ++#include "pci_ids.h" ++ + #define PCI_COMMAND_IO 0x1 /* Enable response in I/O space */ + #define PCI_COMMAND_MEM 0x2 /* Enable response in mem space */ + #define PCI_COMMAND_MASTER 0x4 /* Enable bus mastering */ + #define PCI_LATENCY_TIMER 0x0d /* 8 bits */ ++#define PCI_COMMAND_SPECIAL 0x8 /* Enable response to special cycles */ ++#define PCI_COMMAND_INVALIDATE 0x10 /* Use memory write and invalidate */ ++#define PCI_COMMAND_VGA_PALETTE 0x20 /* Enable palette snooping */ ++#define PCI_COMMAND_PARITY 0x40 /* Enable parity checking */ ++#define PCI_COMMAND_WAIT 0x80 /* Enable address/data stepping */ ++#define PCI_COMMAND_SERR 0x100 /* Enable SERR */ ++#define PCI_COMMAND_FAST_BACK 0x200 /* Enable back-to-back writes */ + + #define PCIBIOS_PCI_FUNCTION_ID 0xb1XX + #define PCIBIOS_PCI_BIOS_PRESENT 0xb101 +@@ -42,10 +51,37 @@ + #define PCI_DEVICE_ID 0x02 /* 16 bits */ + #define PCI_COMMAND 0x04 /* 16 bits */ + ++#define PCI_STATUS 0x06 /* 16 bits */ ++#define PCI_STATUS_CAP_LIST 0x10 /* Support Capability List */ ++#define PCI_STATUS_66MHZ 0x20 /* Support 66 Mhz PCI 2.1 bus */ ++#define PCI_STATUS_UDF 0x40 /* Support User Definable Features [obsolete] */ ++#define PCI_STATUS_FAST_BACK 0x80 /* Accept fast-back to back */ ++#define PCI_STATUS_PARITY 0x100 /* Detected parity error */ ++#define PCI_STATUS_DEVSEL_MASK 0x600 /* DEVSEL timing */ ++#define PCI_STATUS_DEVSEL_FAST 0x000 ++#define PCI_STATUS_DEVSEL_MEDIUM 0x200 ++#define PCI_STATUS_DEVSEL_SLOW 0x400 ++#define PCI_STATUS_SIG_TARGET_ABORT 0x800 /* Set on target abort */ ++#define PCI_STATUS_REC_TARGET_ABORT 0x1000 /* Master ack of " */ ++#define PCI_STATUS_REC_MASTER_ABORT 0x2000 /* Set on master abort */ ++#define PCI_STATUS_SIG_SYSTEM_ERROR 0x4000 /* Set when we drive SERR */ ++#define PCI_STATUS_DETECTED_PARITY 0x8000 /* Set on parity error */ ++ + #define PCI_REVISION 0x08 /* 8 bits */ ++#define PCI_REVISION_ID 0x08 /* 8 bits */ ++#define PCI_CLASS_REVISION 0x08 /* 32 bits */ + #define PCI_CLASS_CODE 0x0b /* 8 bits */ + #define PCI_SUBCLASS_CODE 0x0a /* 8 bits */ + #define PCI_HEADER_TYPE 0x0e /* 8 bits */ ++#define PCI_HEADER_TYPE_NORMAL 0 ++#define PCI_HEADER_TYPE_BRIDGE 1 ++#define PCI_HEADER_TYPE_CARDBUS 2 ++ ++ ++/* Header type 0 (normal devices) */ ++#define PCI_CARDBUS_CIS 0x28 ++#define PCI_SUBSYSTEM_VENDOR_ID 0x2c ++#define PCI_SUBSYSTEM_ID 0x2e + + #define PCI_BASE_ADDRESS_0 0x10 /* 32 bits */ + #define PCI_BASE_ADDRESS_1 0x14 /* 32 bits */ +@@ -54,15 +90,155 @@ + #define PCI_BASE_ADDRESS_4 0x20 /* 32 bits */ + #define PCI_BASE_ADDRESS_5 0x24 /* 32 bits */ + ++#define PCI_BASE_ADDRESS_MEM_TYPE_MASK 0x06 ++#define PCI_BASE_ADDRESS_MEM_TYPE_32 0x00 /* 32 bit address */ ++#define PCI_BASE_ADDRESS_MEM_TYPE_1M 0x02 /* Below 1M [obsolete] */ ++#define PCI_BASE_ADDRESS_MEM_TYPE_64 0x04 /* 64 bit address */ ++ + #ifndef PCI_BASE_ADDRESS_IO_MASK + #define PCI_BASE_ADDRESS_IO_MASK (~0x03) + #endif ++#ifndef PCI_BASE_ADDRESS_MEM_MASK ++#define PCI_BASE_ADDRESS_MEM_MASK (~0x0f) ++#endif + #define PCI_BASE_ADDRESS_SPACE_IO 0x01 + #define PCI_ROM_ADDRESS 0x30 /* 32 bits */ + #define PCI_ROM_ADDRESS_ENABLE 0x01 /* Write 1 to enable ROM, + bits 31..11 are address, + 10..2 are reserved */ + ++#define PCI_CAPABILITY_LIST 0x34 /* Offset of first capability list entry */ ++ ++#define PCI_INTERRUPT_LINE 0x3c /* IRQ number (0-15) */ ++#define PCI_INTERRUPT_PIN 0x3d /* IRQ pin on PCI bus (A-D) */ ++ ++/* Header type 1 (PCI-to-PCI bridges) */ ++#define PCI_PRIMARY_BUS 0x18 /* Primary bus number */ ++#define PCI_SECONDARY_BUS 0x19 /* Secondary bus number */ ++#define PCI_SUBORDINATE_BUS 0x1a /* Highest bus number behind the bridge */ ++#define PCI_SEC_LATENCY_TIMER 0x1b /* Latency timer for secondary interface */ ++#define PCI_IO_BASE 0x1c /* I/O range behind the bridge */ ++#define PCI_IO_LIMIT 0x1d ++#define PCI_IO_RANGE_TYPE_MASK 0x0f /* I/O bridging type */ ++#define PCI_IO_RANGE_TYPE_16 0x00 ++#define PCI_IO_RANGE_TYPE_32 0x01 ++#define PCI_IO_RANGE_MASK ~0x0f ++#define PCI_SEC_STATUS 0x1e /* Secondary status register, only bit 14 used */ ++#define PCI_MEMORY_BASE 0x20 /* Memory range behind */ ++#define PCI_MEMORY_LIMIT 0x22 ++#define PCI_MEMORY_RANGE_TYPE_MASK 0x0f ++#define PCI_MEMORY_RANGE_MASK ~0x0f ++#define PCI_PREF_MEMORY_BASE 0x24 /* Prefetchable memory range behind */ ++#define PCI_PREF_MEMORY_LIMIT 0x26 ++#define PCI_PREF_RANGE_TYPE_MASK 0x0f ++#define PCI_PREF_RANGE_TYPE_32 0x00 ++#define PCI_PREF_RANGE_TYPE_64 0x01 ++#define PCI_PREF_RANGE_MASK ~0x0f ++#define PCI_PREF_BASE_UPPER32 0x28 /* Upper half of prefetchable memory range */ ++#define PCI_PREF_LIMIT_UPPER32 0x2c ++#define PCI_IO_BASE_UPPER16 0x30 /* Upper half of I/O addresses */ ++#define PCI_IO_LIMIT_UPPER16 0x32 ++/* 0x34 same as for htype 0 */ ++/* 0x35-0x3b is reserved */ ++#define PCI_ROM_ADDRESS1 0x38 /* Same as PCI_ROM_ADDRESS, but for htype 1 */ ++/* 0x3c-0x3d are same as for htype 0 */ ++#define PCI_BRIDGE_CONTROL 0x3e ++#define PCI_BRIDGE_CTL_PARITY 0x01 /* Enable parity detection on secondary interface */ ++#define PCI_BRIDGE_CTL_SERR 0x02 /* The same for SERR forwarding */ ++#define PCI_BRIDGE_CTL_NO_ISA 0x04 /* Disable bridging of ISA ports */ ++#define PCI_BRIDGE_CTL_VGA 0x08 /* Forward VGA addresses */ ++#define PCI_BRIDGE_CTL_MASTER_ABORT 0x20 /* Report master aborts */ ++#define PCI_BRIDGE_CTL_BUS_RESET 0x40 /* Secondary bus reset */ ++#define PCI_BRIDGE_CTL_FAST_BACK 0x80 /* Fast Back2Back enabled on secondary interface */ ++ ++#define PCI_CB_CAPABILITY_LIST 0x14 ++ ++/* Capability lists */ ++ ++#define PCI_CAP_LIST_ID 0 /* Capability ID */ ++#define PCI_CAP_ID_PM 0x01 /* Power Management */ ++#define PCI_CAP_ID_AGP 0x02 /* Accelerated Graphics Port */ ++#define PCI_CAP_ID_VPD 0x03 /* Vital Product Data */ ++#define PCI_CAP_ID_SLOTID 0x04 /* Slot Identification */ ++#define PCI_CAP_ID_MSI 0x05 /* Message Signalled Interrupts */ ++#define PCI_CAP_ID_CHSWP 0x06 /* CompactPCI HotSwap */ ++#define PCI_CAP_LIST_NEXT 1 /* Next capability in the list */ ++#define PCI_CAP_FLAGS 2 /* Capability defined flags (16 bits) */ ++#define PCI_CAP_SIZEOF 4 ++ ++/* Power Management Registers */ ++ ++#define PCI_PM_PMC 2 /* PM Capabilities Register */ ++#define PCI_PM_CAP_VER_MASK 0x0007 /* Version */ ++#define PCI_PM_CAP_PME_CLOCK 0x0008 /* PME clock required */ ++#define PCI_PM_CAP_RESERVED 0x0010 /* Reserved field */ ++#define PCI_PM_CAP_DSI 0x0020 /* Device specific initialization */ ++#define PCI_PM_CAP_AUX_POWER 0x01C0 /* Auxilliary power support mask */ ++#define PCI_PM_CAP_D1 0x0200 /* D1 power state support */ ++#define PCI_PM_CAP_D2 0x0400 /* D2 power state support */ ++#define PCI_PM_CAP_PME 0x0800 /* PME pin supported */ ++#define PCI_PM_CAP_PME_MASK 0xF800 /* PME Mask of all supported states */ ++#define PCI_PM_CAP_PME_D0 0x0800 /* PME# from D0 */ ++#define PCI_PM_CAP_PME_D1 0x1000 /* PME# from D1 */ ++#define PCI_PM_CAP_PME_D2 0x2000 /* PME# from D2 */ ++#define PCI_PM_CAP_PME_D3 0x4000 /* PME# from D3 (hot) */ ++#define PCI_PM_CAP_PME_D3cold 0x8000 /* PME# from D3 (cold) */ ++#define PCI_PM_CTRL 4 /* PM control and status register */ ++#define PCI_PM_CTRL_STATE_MASK 0x0003 /* Current power state (D0 to D3) */ ++#define PCI_PM_CTRL_PME_ENABLE 0x0100 /* PME pin enable */ ++#define PCI_PM_CTRL_DATA_SEL_MASK 0x1e00 /* Data select (??) */ ++#define PCI_PM_CTRL_DATA_SCALE_MASK 0x6000 /* Data scale (??) */ ++#define PCI_PM_CTRL_PME_STATUS 0x8000 /* PME pin status */ ++#define PCI_PM_PPB_EXTENSIONS 6 /* PPB support extensions (??) */ ++#define PCI_PM_PPB_B2_B3 0x40 /* Stop clock when in D3hot (??) */ ++#define PCI_PM_BPCC_ENABLE 0x80 /* Bus power/clock control enable (??) */ ++#define PCI_PM_DATA_REGISTER 7 /* (??) */ ++#define PCI_PM_SIZEOF 8 ++ ++/* AGP registers */ ++ ++#define PCI_AGP_VERSION 2 /* BCD version number */ ++#define PCI_AGP_RFU 3 /* Rest of capability flags */ ++#define PCI_AGP_STATUS 4 /* Status register */ ++#define PCI_AGP_STATUS_RQ_MASK 0xff000000 /* Maximum number of requests - 1 */ ++#define PCI_AGP_STATUS_SBA 0x0200 /* Sideband addressing supported */ ++#define PCI_AGP_STATUS_64BIT 0x0020 /* 64-bit addressing supported */ ++#define PCI_AGP_STATUS_FW 0x0010 /* FW transfers supported */ ++#define PCI_AGP_STATUS_RATE4 0x0004 /* 4x transfer rate supported */ ++#define PCI_AGP_STATUS_RATE2 0x0002 /* 2x transfer rate supported */ ++#define PCI_AGP_STATUS_RATE1 0x0001 /* 1x transfer rate supported */ ++#define PCI_AGP_COMMAND 8 /* Control register */ ++#define PCI_AGP_COMMAND_RQ_MASK 0xff000000 /* Master: Maximum number of requests */ ++#define PCI_AGP_COMMAND_SBA 0x0200 /* Sideband addressing enabled */ ++#define PCI_AGP_COMMAND_AGP 0x0100 /* Allow processing of AGP transactions */ ++#define PCI_AGP_COMMAND_64BIT 0x0020 /* Allow processing of 64-bit addresses */ ++#define PCI_AGP_COMMAND_FW 0x0010 /* Force FW transfers */ ++#define PCI_AGP_COMMAND_RATE4 0x0004 /* Use 4x rate */ ++#define PCI_AGP_COMMAND_RATE2 0x0002 /* Use 2x rate */ ++#define PCI_AGP_COMMAND_RATE1 0x0001 /* Use 1x rate */ ++#define PCI_AGP_SIZEOF 12 ++ ++/* Slot Identification */ ++ ++#define PCI_SID_ESR 2 /* Expansion Slot Register */ ++#define PCI_SID_ESR_NSLOTS 0x1f /* Number of expansion slots available */ ++#define PCI_SID_ESR_FIC 0x20 /* First In Chassis Flag */ ++#define PCI_SID_CHASSIS_NR 3 /* Chassis Number */ ++ ++/* Message Signalled Interrupts registers */ ++ ++#define PCI_MSI_FLAGS 2 /* Various flags */ ++#define PCI_MSI_FLAGS_64BIT 0x80 /* 64-bit addresses allowed */ ++#define PCI_MSI_FLAGS_QSIZE 0x70 /* Message queue size configured */ ++#define PCI_MSI_FLAGS_QMASK 0x0e /* Maximum queue size available */ ++#define PCI_MSI_FLAGS_ENABLE 0x01 /* MSI feature enabled */ ++#define PCI_MSI_RFU 3 /* Rest of capability flags */ ++#define PCI_MSI_ADDRESS_LO 4 /* Lower 32 bits */ ++#define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */ ++#define PCI_MSI_DATA_32 8 /* 16 bits of data for 32-bit devices */ ++#define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */ ++ ++#define PCI_SLOT(devfn) ((devfn) >> 3) + #define PCI_FUNC(devfn) ((devfn) & 0x07) + + #define BIOS32_SIGNATURE (('_' << 0) + ('3' << 8) + ('2' << 16) + ('_' << 24)) +@@ -85,108 +261,97 @@ + char chars[16]; + }; + +-#define KERN_CODE_SEG 0x8 /* This _MUST_ match start.S */ +- +-/* Stuff for asm */ +-#define save_flags(x) \ +-__asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */ :"memory") +- +-#define cli() __asm__ __volatile__ ("cli": : :"memory") +- +-#define restore_flags(x) \ +-__asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory") +- +-#define PCI_VENDOR_ID_ADMTEK 0x1317 +-#define PCI_DEVICE_ID_ADMTEK_0985 0x0985 +-#define PCI_VENDOR_ID_REALTEK 0x10ec +-#define PCI_DEVICE_ID_REALTEK_8029 0x8029 +-#define PCI_DEVICE_ID_REALTEK_8139 0x8139 +-#define PCI_VENDOR_ID_WINBOND2 0x1050 +-#define PCI_DEVICE_ID_WINBOND2_89C940 0x0940 +-#define PCI_DEVICE_ID_WINBOND2_89C840 0x0840 +-#define PCI_VENDOR_ID_COMPEX 0x11f6 +-#define PCI_DEVICE_ID_COMPEX_RL2000 0x1401 +-#define PCI_DEVICE_ID_COMPEX_RL100ATX 0x2011 +-#define PCI_VENDOR_ID_KTI 0x8e2e +-#define PCI_DEVICE_ID_KTI_ET32P2 0x3000 +-#define PCI_VENDOR_ID_NETVIN 0x4a14 +-#define PCI_DEVICE_ID_NETVIN_NV5000SC 0x5000 +-#define PCI_VENDOR_ID_HOLTEK 0x12c3 +-#define PCI_DEVICE_ID_HOLTEK_HT80232 0x0058 +-#define PCI_VENDOR_ID_3COM 0x10b7 +-#define PCI_DEVICE_ID_3COM_3C590 0x5900 +-#define PCI_DEVICE_ID_3COM_3C595 0x5950 +-#define PCI_DEVICE_ID_3COM_3C595_1 0x5951 +-#define PCI_DEVICE_ID_3COM_3C595_2 0x5952 +-#define PCI_DEVICE_ID_3COM_3C900TPO 0x9000 +-#define PCI_DEVICE_ID_3COM_3C900COMBO 0x9001 +-#define PCI_DEVICE_ID_3COM_3C905TX 0x9050 +-#define PCI_DEVICE_ID_3COM_3C905T4 0x9051 +-#define PCI_DEVICE_ID_3COM_3C905B_TX 0x9055 +-#define PCI_DEVICE_ID_3COM_3C905C_TXM 0x9200 +-#define PCI_VENDOR_ID_INTEL 0x8086 +-#define PCI_DEVICE_ID_INTEL_82557 0x1229 +-#define PCI_DEVICE_ID_INTEL_82559ER 0x1209 +-#define PCI_DEVICE_ID_INTEL_ID1029 0x1029 +-#define PCI_DEVICE_ID_INTEL_ID1030 0x1030 +-#define PCI_DEVICE_ID_INTEL_82562 0x2449 +-#define PCI_VENDOR_ID_AMD 0x1022 +-#define PCI_DEVICE_ID_AMD_LANCE 0x2000 +-#define PCI_VENDOR_ID_AMD_HOMEPNA 0x1022 +-#define PCI_DEVICE_ID_AMD_HOMEPNA 0x2001 +-#define PCI_VENDOR_ID_SMC_1211 0x1113 +-#define PCI_DEVICE_ID_SMC_1211 0x1211 +-#define PCI_VENDOR_ID_DEC 0x1011 +-#define PCI_DEVICE_ID_DEC_TULIP 0x0002 +-#define PCI_DEVICE_ID_DEC_TULIP_FAST 0x0009 +-#define PCI_DEVICE_ID_DEC_TULIP_PLUS 0x0014 +-#define PCI_DEVICE_ID_DEC_21142 0x0019 +-#define PCI_VENDOR_ID_SMC 0x10B8 +-#ifndef PCI_DEVICE_ID_SMC_EPIC100 +-# define PCI_DEVICE_ID_SMC_EPIC100 0x0005 +-#endif +-#define PCI_VENDOR_ID_MACRONIX 0x10d9 +-#define PCI_DEVICE_ID_MX987x5 0x0531 +-#define PCI_VENDOR_ID_LINKSYS 0x11AD +-#define PCI_DEVICE_ID_LC82C115 0xC115 +-#define PCI_VENDOR_ID_VIATEC 0x1106 +-#define PCI_DEVICE_ID_VIA_RHINE_I 0x3043 +-#define PCI_DEVICE_ID_VIA_VT6102 0x3065 +-#define PCI_DEVICE_ID_VIA_86C100A 0x6100 +-#define PCI_VENDOR_ID_DAVICOM 0x1282 +-#define PCI_DEVICE_ID_DM9009 0x9009 +-#define PCI_DEVICE_ID_DM9102 0x9102 +-#define PCI_VENDOR_ID_SIS 0x1039 +-#define PCI_DEVICE_ID_SIS900 0x0900 +-#define PCI_DEVICE_ID_SIS7016 0x7016 +-#define PCI_VENDOR_ID_DLINK 0x1186 +-#define PCI_DEVICE_ID_DFE530TXP 0x1300 +-#define PCI_VENDOR_ID_NS 0x100B +-#define PCI_DEVICE_ID_DP83815 0x0020 +-#define PCI_VENDOR_ID_OLICOM 0x108d +-#define PCI_DEVICE_ID_OLICOM_OC3136 0x0001 +-#define PCI_DEVICE_ID_OLICOM_OC2315 0x0011 +-#define PCI_DEVICE_ID_OLICOM_OC2325 0x0012 +-#define PCI_DEVICE_ID_OLICOM_OC2183 0x0013 +-#define PCI_DEVICE_ID_OLICOM_OC2326 0x0014 +-#define PCI_DEVICE_ID_OLICOM_OC6151 0x0021 ++struct pci_device; ++struct dev; ++typedef int (*pci_probe_t)(struct dev *, struct pci_device *); + + struct pci_device { +- unsigned short vendor, dev_id; +- const char *name; +- unsigned int membase; +- unsigned short ioaddr; +- unsigned char devfn; +- unsigned char bus; ++ uint32_t class; ++ uint16_t vendor, dev_id; ++ const char *name; ++ /* membase and ioaddr are silly and depricated */ ++ unsigned int membase; ++ unsigned int ioaddr; ++ unsigned int romaddr; ++ unsigned char irq; ++ unsigned char devfn; ++ unsigned char bus; ++ unsigned char use_specified; ++ const struct pci_driver *driver; ++}; ++ ++extern void scan_pci_bus(int type, struct pci_device *dev); ++extern void find_pci(int type, struct pci_device *dev); ++ ++extern int pcibios_read_config_byte(unsigned int bus, unsigned int device_fn, unsigned int where, uint8_t *value); ++extern int pcibios_write_config_byte (unsigned int bus, unsigned int device_fn, unsigned int where, uint8_t value); ++extern int pcibios_read_config_word(unsigned int bus, unsigned int device_fn, unsigned int where, uint16_t *value); ++extern int pcibios_write_config_word (unsigned int bus, unsigned int device_fn, unsigned int where, uint16_t value); ++extern int pcibios_read_config_dword(unsigned int bus, unsigned int device_fn, unsigned int where, uint32_t *value); ++extern int pcibios_write_config_dword(unsigned int bus, unsigned int device_fn, unsigned int where, uint32_t value); ++extern unsigned long pcibios_bus_base(unsigned int bus); ++extern void adjust_pci_device(struct pci_device *p); ++ ++ ++static inline int ++pci_read_config_byte(struct pci_device *dev, unsigned int where, uint8_t *value) ++{ ++ return pcibios_read_config_byte(dev->bus, dev->devfn, where, value); ++} ++static inline int ++pci_write_config_byte(struct pci_device *dev, unsigned int where, uint8_t value) ++{ ++ return pcibios_write_config_byte(dev->bus, dev->devfn, where, value); ++} ++static inline int ++pci_read_config_word(struct pci_device *dev, unsigned int where, uint16_t *value) ++{ ++ return pcibios_read_config_word(dev->bus, dev->devfn, where, value); ++} ++static inline int ++pci_write_config_word(struct pci_device *dev, unsigned int where, uint16_t value) ++{ ++ return pcibios_write_config_word(dev->bus, dev->devfn, where, value); ++} ++static inline int ++pci_read_config_dword(struct pci_device *dev, unsigned int where, uint32_t *value) ++{ ++ return pcibios_read_config_dword(dev->bus, dev->devfn, where, value); ++} ++static inline int ++pci_write_config_dword(struct pci_device *dev, unsigned int where, uint32_t value) ++{ ++ return pcibios_write_config_dword(dev->bus, dev->devfn, where, value); ++} ++ ++/* Helper functions to find the size of a pci bar */ ++extern unsigned long pci_bar_start(struct pci_device *dev, unsigned int bar); ++extern unsigned long pci_bar_size(struct pci_device *dev, unsigned int bar); ++/* Helper function to find pci capabilities */ ++extern int pci_find_capability(struct pci_device *dev, int cap); ++struct pci_id { ++ unsigned short vendor, dev_id; ++ const char *name; ++}; ++ ++struct dev; ++/* Most pci drivers will use this */ ++struct pci_driver { ++ int type; ++ const char *name; ++ pci_probe_t probe; ++ struct pci_id *ids; ++ int id_count; ++ ++/* On a few occasions the hardware is standardized enough that ++ * we only need to know the class of the device and not the exact ++ * type to drive the device correctly. If this is the case ++ * set a class value other than 0. ++ */ ++ unsigned short class; + }; + +-extern void eth_pci_init(struct pci_device *); ++#define PCI_ROM(VENDOR_ID, DEVICE_ID, IMAGE, DESCRIPTION) \ ++ { VENDOR_ID, DEVICE_ID, IMAGE, } + +-extern int pcibios_read_config_byte(unsigned int bus, unsigned int device_fn, unsigned int where, unsigned char *value); +-extern int pcibios_write_config_byte (unsigned int bus, unsigned int device_fn, unsigned int where, unsigned char value); +-extern int pcibios_read_config_word(unsigned int bus, unsigned int device_fn, unsigned int where, unsigned short *value); +-extern int pcibios_write_config_word (unsigned int bus, unsigned int device_fn, unsigned int where, unsigned short value); +-extern int pcibios_read_config_dword(unsigned int bus, unsigned int device_fn, unsigned int where, unsigned int *value); +-extern int pcibios_write_config_dword(unsigned int bus, unsigned int device_fn, unsigned int where, unsigned int value); +-void adjust_pci_device(struct pci_device *p); + #endif /* PCI_H */ +diff -Naur grub-0.97.orig/netboot/pci_ids.h grub-0.97/netboot/pci_ids.h +--- grub-0.97.orig/netboot/pci_ids.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/pci_ids.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,1809 @@ ++/* ++ * PCI Class, Vendor and Device IDs ++ * ++ * Please keep sorted. ++ */ ++ ++/* Device classes and subclasses */ ++ ++#define PCI_CLASS_NOT_DEFINED 0x0000 ++#define PCI_CLASS_NOT_DEFINED_VGA 0x0001 ++ ++#define PCI_BASE_CLASS_STORAGE 0x01 ++#define PCI_CLASS_STORAGE_SCSI 0x0100 ++#define PCI_CLASS_STORAGE_IDE 0x0101 ++#define PCI_CLASS_STORAGE_FLOPPY 0x0102 ++#define PCI_CLASS_STORAGE_IPI 0x0103 ++#define PCI_CLASS_STORAGE_RAID 0x0104 ++#define PCI_CLASS_STORAGE_OTHER 0x0180 ++ ++#define PCI_BASE_CLASS_NETWORK 0x02 ++#define PCI_CLASS_NETWORK_ETHERNET 0x0200 ++#define PCI_CLASS_NETWORK_TOKEN_RING 0x0201 ++#define PCI_CLASS_NETWORK_FDDI 0x0202 ++#define PCI_CLASS_NETWORK_ATM 0x0203 ++#define PCI_CLASS_NETWORK_OTHER 0x0280 ++ ++#define PCI_BASE_CLASS_DISPLAY 0x03 ++#define PCI_CLASS_DISPLAY_VGA 0x0300 ++#define PCI_CLASS_DISPLAY_XGA 0x0301 ++#define PCI_CLASS_DISPLAY_3D 0x0302 ++#define PCI_CLASS_DISPLAY_OTHER 0x0380 ++ ++#define PCI_BASE_CLASS_MULTIMEDIA 0x04 ++#define PCI_CLASS_MULTIMEDIA_VIDEO 0x0400 ++#define PCI_CLASS_MULTIMEDIA_AUDIO 0x0401 ++#define PCI_CLASS_MULTIMEDIA_PHONE 0x0402 ++#define PCI_CLASS_MULTIMEDIA_OTHER 0x0480 ++ ++#define PCI_BASE_CLASS_MEMORY 0x05 ++#define PCI_CLASS_MEMORY_RAM 0x0500 ++#define PCI_CLASS_MEMORY_FLASH 0x0501 ++#define PCI_CLASS_MEMORY_OTHER 0x0580 ++ ++#define PCI_BASE_CLASS_BRIDGE 0x06 ++#define PCI_CLASS_BRIDGE_HOST 0x0600 ++#define PCI_CLASS_BRIDGE_ISA 0x0601 ++#define PCI_CLASS_BRIDGE_EISA 0x0602 ++#define PCI_CLASS_BRIDGE_MC 0x0603 ++#define PCI_CLASS_BRIDGE_PCI 0x0604 ++#define PCI_CLASS_BRIDGE_PCMCIA 0x0605 ++#define PCI_CLASS_BRIDGE_NUBUS 0x0606 ++#define PCI_CLASS_BRIDGE_CARDBUS 0x0607 ++#define PCI_CLASS_BRIDGE_RACEWAY 0x0608 ++#define PCI_CLASS_BRIDGE_OTHER 0x0680 ++ ++#define PCI_BASE_CLASS_COMMUNICATION 0x07 ++#define PCI_CLASS_COMMUNICATION_SERIAL 0x0700 ++#define PCI_CLASS_COMMUNICATION_PARALLEL 0x0701 ++#define PCI_CLASS_COMMUNICATION_MULTISERIAL 0x0702 ++#define PCI_CLASS_COMMUNICATION_MODEM 0x0703 ++#define PCI_CLASS_COMMUNICATION_OTHER 0x0780 ++ ++#define PCI_BASE_CLASS_SYSTEM 0x08 ++#define PCI_CLASS_SYSTEM_PIC 0x0800 ++#define PCI_CLASS_SYSTEM_DMA 0x0801 ++#define PCI_CLASS_SYSTEM_TIMER 0x0802 ++#define PCI_CLASS_SYSTEM_RTC 0x0803 ++#define PCI_CLASS_SYSTEM_PCI_HOTPLUG 0x0804 ++#define PCI_CLASS_SYSTEM_OTHER 0x0880 ++ ++#define PCI_BASE_CLASS_INPUT 0x09 ++#define PCI_CLASS_INPUT_KEYBOARD 0x0900 ++#define PCI_CLASS_INPUT_PEN 0x0901 ++#define PCI_CLASS_INPUT_MOUSE 0x0902 ++#define PCI_CLASS_INPUT_SCANNER 0x0903 ++#define PCI_CLASS_INPUT_GAMEPORT 0x0904 ++#define PCI_CLASS_INPUT_OTHER 0x0980 ++ ++#define PCI_BASE_CLASS_DOCKING 0x0a ++#define PCI_CLASS_DOCKING_GENERIC 0x0a00 ++#define PCI_CLASS_DOCKING_OTHER 0x0a80 ++ ++#define PCI_BASE_CLASS_PROCESSOR 0x0b ++#define PCI_CLASS_PROCESSOR_386 0x0b00 ++#define PCI_CLASS_PROCESSOR_486 0x0b01 ++#define PCI_CLASS_PROCESSOR_PENTIUM 0x0b02 ++#define PCI_CLASS_PROCESSOR_ALPHA 0x0b10 ++#define PCI_CLASS_PROCESSOR_POWERPC 0x0b20 ++#define PCI_CLASS_PROCESSOR_MIPS 0x0b30 ++#define PCI_CLASS_PROCESSOR_CO 0x0b40 ++ ++#define PCI_BASE_CLASS_SERIAL 0x0c ++#define PCI_CLASS_SERIAL_FIREWIRE 0x0c00 ++#define PCI_CLASS_SERIAL_ACCESS 0x0c01 ++#define PCI_CLASS_SERIAL_SSA 0x0c02 ++#define PCI_CLASS_SERIAL_USB 0x0c03 ++#define PCI_CLASS_SERIAL_FIBER 0x0c04 ++#define PCI_CLASS_SERIAL_SMBUS 0x0c05 ++ ++#define PCI_BASE_CLASS_INTELLIGENT 0x0e ++#define PCI_CLASS_INTELLIGENT_I2O 0x0e00 ++ ++#define PCI_BASE_CLASS_SATELLITE 0x0f ++#define PCI_CLASS_SATELLITE_TV 0x0f00 ++#define PCI_CLASS_SATELLITE_AUDIO 0x0f01 ++#define PCI_CLASS_SATELLITE_VOICE 0x0f03 ++#define PCI_CLASS_SATELLITE_DATA 0x0f04 ++ ++#define PCI_BASE_CLASS_CRYPT 0x10 ++#define PCI_CLASS_CRYPT_NETWORK 0x1000 ++#define PCI_CLASS_CRYPT_ENTERTAINMENT 0x1001 ++#define PCI_CLASS_CRYPT_OTHER 0x1080 ++ ++#define PCI_BASE_CLASS_SIGNAL_PROCESSING 0x11 ++#define PCI_CLASS_SP_DPIO 0x1100 ++#define PCI_CLASS_SP_OTHER 0x1180 ++ ++#define PCI_CLASS_OTHERS 0xff ++ ++/* Vendors and devices. Sort key: vendor first, device next. */ ++ ++#define PCI_VENDOR_ID_DYNALINK 0x0675 ++#define PCI_DEVICE_ID_DYNALINK_IS64PH 0x1702 ++ ++#define PCI_VENDOR_ID_BERKOM 0x0871 ++#define PCI_DEVICE_ID_BERKOM_A1T 0xffa1 ++#define PCI_DEVICE_ID_BERKOM_T_CONCEPT 0xffa2 ++#define PCI_DEVICE_ID_BERKOM_A4T 0xffa4 ++#define PCI_DEVICE_ID_BERKOM_SCITEL_QUADRO 0xffa8 ++ ++#define PCI_VENDOR_ID_COMPAQ 0x0e11 ++#define PCI_DEVICE_ID_COMPAQ_TOKENRING 0x0508 ++#define PCI_DEVICE_ID_COMPAQ_1280 0x3033 ++#define PCI_DEVICE_ID_COMPAQ_TRIFLEX 0x4000 ++#define PCI_DEVICE_ID_COMPAQ_6010 0x6010 ++#define PCI_DEVICE_ID_COMPAQ_SMART2P 0xae10 ++#define PCI_DEVICE_ID_COMPAQ_NETEL100 0xae32 ++#define PCI_DEVICE_ID_COMPAQ_NETEL10 0xae34 ++#define PCI_DEVICE_ID_COMPAQ_NETFLEX3I 0xae35 ++#define PCI_DEVICE_ID_COMPAQ_NETEL100D 0xae40 ++#define PCI_DEVICE_ID_COMPAQ_NETEL100PI 0xae43 ++#define PCI_DEVICE_ID_COMPAQ_NETEL100I 0xb011 ++#define PCI_DEVICE_ID_COMPAQ_CISS 0xb060 ++#define PCI_DEVICE_ID_COMPAQ_CISSB 0xb178 ++#define PCI_DEVICE_ID_COMPAQ_THUNDER 0xf130 ++#define PCI_DEVICE_ID_COMPAQ_NETFLEX3B 0xf150 ++ ++#define PCI_VENDOR_ID_NCR 0x1000 ++#define PCI_VENDOR_ID_LSI_LOGIC 0x1000 ++#define PCI_DEVICE_ID_NCR_53C810 0x0001 ++#define PCI_DEVICE_ID_NCR_53C820 0x0002 ++#define PCI_DEVICE_ID_NCR_53C825 0x0003 ++#define PCI_DEVICE_ID_NCR_53C815 0x0004 ++#define PCI_DEVICE_ID_LSI_53C810AP 0x0005 ++#define PCI_DEVICE_ID_NCR_53C860 0x0006 ++#define PCI_DEVICE_ID_LSI_53C1510 0x000a ++#define PCI_DEVICE_ID_NCR_53C896 0x000b ++#define PCI_DEVICE_ID_NCR_53C895 0x000c ++#define PCI_DEVICE_ID_NCR_53C885 0x000d ++#define PCI_DEVICE_ID_NCR_53C875 0x000f ++#define PCI_DEVICE_ID_NCR_53C1510 0x0010 ++#define PCI_DEVICE_ID_LSI_53C895A 0x0012 ++#define PCI_DEVICE_ID_LSI_53C875A 0x0013 ++#define PCI_DEVICE_ID_LSI_53C1010_33 0x0020 ++#define PCI_DEVICE_ID_LSI_53C1010_66 0x0021 ++#define PCI_DEVICE_ID_LSI_53C1030 0x0030 ++#define PCI_DEVICE_ID_LSI_53C1035 0x0040 ++#define PCI_DEVICE_ID_NCR_53C875J 0x008f ++#define PCI_DEVICE_ID_LSI_FC909 0x0621 ++#define PCI_DEVICE_ID_LSI_FC929 0x0622 ++#define PCI_DEVICE_ID_LSI_FC929_LAN 0x0623 ++#define PCI_DEVICE_ID_LSI_FC919 0x0624 ++#define PCI_DEVICE_ID_LSI_FC919_LAN 0x0625 ++#define PCI_DEVICE_ID_NCR_YELLOWFIN 0x0701 ++#define PCI_DEVICE_ID_LSI_61C102 0x0901 ++#define PCI_DEVICE_ID_LSI_63C815 0x1000 ++ ++#define PCI_VENDOR_ID_ATI 0x1002 ++/* Mach64 */ ++#define PCI_DEVICE_ID_ATI_68800 0x4158 ++#define PCI_DEVICE_ID_ATI_215CT222 0x4354 ++#define PCI_DEVICE_ID_ATI_210888CX 0x4358 ++#define PCI_DEVICE_ID_ATI_215ET222 0x4554 ++/* Mach64 / Rage */ ++#define PCI_DEVICE_ID_ATI_215GB 0x4742 ++#define PCI_DEVICE_ID_ATI_215GD 0x4744 ++#define PCI_DEVICE_ID_ATI_215GI 0x4749 ++#define PCI_DEVICE_ID_ATI_215GP 0x4750 ++#define PCI_DEVICE_ID_ATI_215GQ 0x4751 ++#define PCI_DEVICE_ID_ATI_215XL 0x4752 ++#define PCI_DEVICE_ID_ATI_215GT 0x4754 ++#define PCI_DEVICE_ID_ATI_215GTB 0x4755 ++#define PCI_DEVICE_ID_ATI_215_IV 0x4756 ++#define PCI_DEVICE_ID_ATI_215_IW 0x4757 ++#define PCI_DEVICE_ID_ATI_215_IZ 0x475A ++#define PCI_DEVICE_ID_ATI_210888GX 0x4758 ++#define PCI_DEVICE_ID_ATI_215_LB 0x4c42 ++#define PCI_DEVICE_ID_ATI_215_LD 0x4c44 ++#define PCI_DEVICE_ID_ATI_215_LG 0x4c47 ++#define PCI_DEVICE_ID_ATI_215_LI 0x4c49 ++#define PCI_DEVICE_ID_ATI_215_LM 0x4c4D ++#define PCI_DEVICE_ID_ATI_215_LN 0x4c4E ++#define PCI_DEVICE_ID_ATI_215_LR 0x4c52 ++#define PCI_DEVICE_ID_ATI_215_LS 0x4c53 ++#define PCI_DEVICE_ID_ATI_264_LT 0x4c54 ++/* Mach64 VT */ ++#define PCI_DEVICE_ID_ATI_264VT 0x5654 ++#define PCI_DEVICE_ID_ATI_264VU 0x5655 ++#define PCI_DEVICE_ID_ATI_264VV 0x5656 ++/* Rage128 Pro GL */ ++#define PCI_DEVICE_ID_ATI_Rage128_PA 0x5041 ++#define PCI_DEVICE_ID_ATI_Rage128_PB 0x5042 ++#define PCI_DEVICE_ID_ATI_Rage128_PC 0x5043 ++#define PCI_DEVICE_ID_ATI_Rage128_PD 0x5044 ++#define PCI_DEVICE_ID_ATI_Rage128_PE 0x5045 ++#define PCI_DEVICE_ID_ATI_RAGE128_PF 0x5046 ++/* Rage128 Pro VR */ ++#define PCI_DEVICE_ID_ATI_RAGE128_PG 0x5047 ++#define PCI_DEVICE_ID_ATI_RAGE128_PH 0x5048 ++#define PCI_DEVICE_ID_ATI_RAGE128_PI 0x5049 ++#define PCI_DEVICE_ID_ATI_RAGE128_PJ 0x504A ++#define PCI_DEVICE_ID_ATI_RAGE128_PK 0x504B ++#define PCI_DEVICE_ID_ATI_RAGE128_PL 0x504C ++#define PCI_DEVICE_ID_ATI_RAGE128_PM 0x504D ++#define PCI_DEVICE_ID_ATI_RAGE128_PN 0x504E ++#define PCI_DEVICE_ID_ATI_RAGE128_PO 0x504F ++#define PCI_DEVICE_ID_ATI_RAGE128_PP 0x5050 ++#define PCI_DEVICE_ID_ATI_RAGE128_PQ 0x5051 ++#define PCI_DEVICE_ID_ATI_RAGE128_PR 0x5052 ++#define PCI_DEVICE_ID_ATI_RAGE128_TR 0x5452 ++#define PCI_DEVICE_ID_ATI_RAGE128_PS 0x5053 ++#define PCI_DEVICE_ID_ATI_RAGE128_PT 0x5054 ++#define PCI_DEVICE_ID_ATI_RAGE128_PU 0x5055 ++#define PCI_DEVICE_ID_ATI_RAGE128_PV 0x5056 ++#define PCI_DEVICE_ID_ATI_RAGE128_PW 0x5057 ++#define PCI_DEVICE_ID_ATI_RAGE128_PX 0x5058 ++/* Rage128 GL */ ++#define PCI_DEVICE_ID_ATI_RAGE128_RE 0x5245 ++#define PCI_DEVICE_ID_ATI_RAGE128_RF 0x5246 ++#define PCI_DEVICE_ID_ATI_RAGE128_RG 0x534b ++#define PCI_DEVICE_ID_ATI_RAGE128_RH 0x534c ++#define PCI_DEVICE_ID_ATI_RAGE128_RI 0x534d ++/* Rage128 VR */ ++#define PCI_DEVICE_ID_ATI_RAGE128_RK 0x524b ++#define PCI_DEVICE_ID_ATI_RAGE128_RL 0x524c ++#define PCI_DEVICE_ID_ATI_RAGE128_RM 0x5345 ++#define PCI_DEVICE_ID_ATI_RAGE128_RN 0x5346 ++#define PCI_DEVICE_ID_ATI_RAGE128_RO 0x5347 ++/* Rage128 M3 */ ++#define PCI_DEVICE_ID_ATI_RAGE128_LE 0x4c45 ++#define PCI_DEVICE_ID_ATI_RAGE128_LF 0x4c46 ++/* Rage128 Pro Ultra */ ++#define PCI_DEVICE_ID_ATI_RAGE128_U1 0x5446 ++#define PCI_DEVICE_ID_ATI_RAGE128_U2 0x544C ++#define PCI_DEVICE_ID_ATI_RAGE128_U3 0x5452 ++/* Radeon M4 */ ++#define PCI_DEVICE_ID_ATI_RADEON_LE 0x4d45 ++#define PCI_DEVICE_ID_ATI_RADEON_LF 0x4d46 ++/* Radeon NV-100 */ ++#define PCI_DEVICE_ID_ATI_RADEON_N1 0x5159 ++#define PCI_DEVICE_ID_ATI_RADEON_N2 0x515a ++/* Radeon */ ++#define PCI_DEVICE_ID_ATI_RADEON_RA 0x5144 ++#define PCI_DEVICE_ID_ATI_RADEON_RB 0x5145 ++#define PCI_DEVICE_ID_ATI_RADEON_RC 0x5146 ++#define PCI_DEVICE_ID_ATI_RADEON_RD 0x5147 ++ ++#define PCI_VENDOR_ID_VLSI 0x1004 ++#define PCI_DEVICE_ID_VLSI_82C592 0x0005 ++#define PCI_DEVICE_ID_VLSI_82C593 0x0006 ++#define PCI_DEVICE_ID_VLSI_82C594 0x0007 ++#define PCI_DEVICE_ID_VLSI_82C597 0x0009 ++#define PCI_DEVICE_ID_VLSI_82C541 0x000c ++#define PCI_DEVICE_ID_VLSI_82C543 0x000d ++#define PCI_DEVICE_ID_VLSI_82C532 0x0101 ++#define PCI_DEVICE_ID_VLSI_82C534 0x0102 ++#define PCI_DEVICE_ID_VLSI_82C535 0x0104 ++#define PCI_DEVICE_ID_VLSI_82C147 0x0105 ++#define PCI_DEVICE_ID_VLSI_VAS96011 0x0702 ++ ++#define PCI_VENDOR_ID_ADL 0x1005 ++#define PCI_DEVICE_ID_ADL_2301 0x2301 ++ ++#define PCI_VENDOR_ID_NS 0x100b ++#define PCI_DEVICE_ID_NS_87415 0x0002 ++#define PCI_DEVICE_ID_NS_87560_LIO 0x000e ++#define PCI_DEVICE_ID_NS_87560_USB 0x0012 ++#define PCI_DEVICE_ID_NS_83815 0x0020 ++#define PCI_DEVICE_ID_DP83815 0x0020 ++#define PCI_DEVICE_ID_NS_83820 0x0022 ++#define PCI_DEVICE_ID_NS_87410 0xd001 ++ ++#define PCI_VENDOR_ID_TSENG 0x100c ++#define PCI_DEVICE_ID_TSENG_W32P_2 0x3202 ++#define PCI_DEVICE_ID_TSENG_W32P_b 0x3205 ++#define PCI_DEVICE_ID_TSENG_W32P_c 0x3206 ++#define PCI_DEVICE_ID_TSENG_W32P_d 0x3207 ++#define PCI_DEVICE_ID_TSENG_ET6000 0x3208 ++ ++#define PCI_VENDOR_ID_WEITEK 0x100e ++#define PCI_DEVICE_ID_WEITEK_P9000 0x9001 ++#define PCI_DEVICE_ID_WEITEK_P9100 0x9100 ++ ++#define PCI_VENDOR_ID_DEC 0x1011 ++#define PCI_DEVICE_ID_DEC_BRD 0x0001 ++#define PCI_DEVICE_ID_DEC_TULIP 0x0002 ++#define PCI_DEVICE_ID_DEC_TGA 0x0004 ++#define PCI_DEVICE_ID_DEC_TULIP_FAST 0x0009 ++#define PCI_DEVICE_ID_DEC_TGA2 0x000D ++#define PCI_DEVICE_ID_DEC_FDDI 0x000F ++#define PCI_DEVICE_ID_DEC_TULIP_PLUS 0x0014 ++#define PCI_DEVICE_ID_DEC_21142 0x0019 ++#define PCI_DEVICE_ID_DEC_21052 0x0021 ++#define PCI_DEVICE_ID_DEC_21150 0x0022 ++#define PCI_DEVICE_ID_DEC_21152 0x0024 ++#define PCI_DEVICE_ID_DEC_21153 0x0025 ++#define PCI_DEVICE_ID_DEC_21154 0x0026 ++#define PCI_DEVICE_ID_DEC_21285 0x1065 ++#define PCI_DEVICE_ID_COMPAQ_42XX 0x0046 ++ ++#define PCI_VENDOR_ID_CIRRUS 0x1013 ++#define PCI_DEVICE_ID_CIRRUS_7548 0x0038 ++#define PCI_DEVICE_ID_CIRRUS_5430 0x00a0 ++#define PCI_DEVICE_ID_CIRRUS_5434_4 0x00a4 ++#define PCI_DEVICE_ID_CIRRUS_5434_8 0x00a8 ++#define PCI_DEVICE_ID_CIRRUS_5436 0x00ac ++#define PCI_DEVICE_ID_CIRRUS_5446 0x00b8 ++#define PCI_DEVICE_ID_CIRRUS_5480 0x00bc ++#define PCI_DEVICE_ID_CIRRUS_5462 0x00d0 ++#define PCI_DEVICE_ID_CIRRUS_5464 0x00d4 ++#define PCI_DEVICE_ID_CIRRUS_5465 0x00d6 ++#define PCI_DEVICE_ID_CIRRUS_6729 0x1100 ++#define PCI_DEVICE_ID_CIRRUS_6832 0x1110 ++#define PCI_DEVICE_ID_CIRRUS_7542 0x1200 ++#define PCI_DEVICE_ID_CIRRUS_7543 0x1202 ++#define PCI_DEVICE_ID_CIRRUS_7541 0x1204 ++ ++#define PCI_VENDOR_ID_IBM 0x1014 ++#define PCI_DEVICE_ID_IBM_FIRE_CORAL 0x000a ++#define PCI_DEVICE_ID_IBM_TR 0x0018 ++#define PCI_DEVICE_ID_IBM_82G2675 0x001d ++#define PCI_DEVICE_ID_IBM_MCA 0x0020 ++#define PCI_DEVICE_ID_IBM_82351 0x0022 ++#define PCI_DEVICE_ID_IBM_PYTHON 0x002d ++#define PCI_DEVICE_ID_IBM_SERVERAID 0x002e ++#define PCI_DEVICE_ID_IBM_TR_WAKE 0x003e ++#define PCI_DEVICE_ID_IBM_MPIC 0x0046 ++#define PCI_DEVICE_ID_IBM_3780IDSP 0x007d ++#define PCI_DEVICE_ID_IBM_CHUKAR 0x0096 ++#define PCI_DEVICE_ID_IBM_405GP 0x0156 ++#define PCI_DEVICE_ID_IBM_SERVERAIDI960 0x01bd ++#define PCI_DEVICE_ID_IBM_MPIC_2 0xffff ++ ++#define PCI_VENDOR_ID_COMPEX2 0x101a // pci.ids says "AT&T GIS (NCR)" ++#define PCI_DEVICE_ID_COMPEX2_100VG 0x0005 ++ ++#define PCI_VENDOR_ID_WD 0x101c ++#define PCI_DEVICE_ID_WD_7197 0x3296 ++ ++#define PCI_VENDOR_ID_AMI 0x101e ++#define PCI_DEVICE_ID_AMI_MEGARAID3 0x1960 ++#define PCI_DEVICE_ID_AMI_MEGARAID 0x9010 ++#define PCI_DEVICE_ID_AMI_MEGARAID2 0x9060 ++ ++#define PCI_VENDOR_ID_AMD 0x1022 ++ ++#define PCI_DEVICE_ID_AMD_LANCE 0x2000 ++#define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 ++#define PCI_DEVICE_ID_AMD_HOMEPNA 0x2001 ++#define PCI_DEVICE_ID_AMD_SCSI 0x2020 ++#define PCI_DEVICE_ID_AMD_FE_GATE_7006 0x7006 ++#define PCI_DEVICE_ID_AMD_FE_GATE_7007 0x7007 ++#define PCI_DEVICE_ID_AMD_FE_GATE_700C 0x700C ++#define PCI_DEVIDE_ID_AMD_FE_GATE_700D 0x700D ++#define PCI_DEVICE_ID_AMD_FE_GATE_700E 0x700E ++#define PCI_DEVICE_ID_AMD_FE_GATE_700F 0x700F ++#define PCI_DEVICE_ID_AMD_COBRA_7400 0x7400 ++#define PCI_DEVICE_ID_AMD_COBRA_7401 0x7401 ++#define PCI_DEVICE_ID_AMD_COBRA_7403 0x7403 ++#define PCI_DEVICE_ID_AMD_COBRA_7404 0x7404 ++#define PCI_DEVICE_ID_AMD_VIPER_7408 0x7408 ++#define PCI_DEVICE_ID_AMD_VIPER_7409 0x7409 ++#define PCI_DEVICE_ID_AMD_VIPER_740B 0x740B ++#define PCI_DEVICE_ID_AMD_VIPER_740C 0x740C ++#define PCI_DEVICE_ID_AMD_VIPER_7410 0x7410 ++#define PCI_DEVICE_ID_AMD_VIPER_7411 0x7411 ++#define PCI_DEVICE_ID_AMD_VIPER_7413 0x7413 ++#define PCI_DEVICE_ID_AMD_VIPER_7414 0x7414 ++#define PCI_DEVICE_ID_AMD_VIPER_7440 0x7440 ++#define PCI_DEVICE_ID_AMD_VIPER_7441 0x7441 ++#define PCI_DEVICE_ID_AMD_VIPER_7443 0x7443 ++#define PCI_DEVICE_ID_AMD_VIPER_7448 0x7448 ++#define PCI_DEVICE_ID_AMD_VIPER_7449 0x7449 ++ ++#define PCI_VENDOR_ID_TRIDENT 0x1023 ++#define PCI_DEVICE_ID_TRIDENT_4DWAVE_DX 0x2000 ++#define PCI_DEVICE_ID_TRIDENT_4DWAVE_NX 0x2001 ++#define PCI_DEVICE_ID_TRIDENT_9320 0x9320 ++#define PCI_DEVICE_ID_TRIDENT_9388 0x9388 ++#define PCI_DEVICE_ID_TRIDENT_9397 0x9397 ++#define PCI_DEVICE_ID_TRIDENT_939A 0x939A ++#define PCI_DEVICE_ID_TRIDENT_9520 0x9520 ++#define PCI_DEVICE_ID_TRIDENT_9525 0x9525 ++#define PCI_DEVICE_ID_TRIDENT_9420 0x9420 ++#define PCI_DEVICE_ID_TRIDENT_9440 0x9440 ++#define PCI_DEVICE_ID_TRIDENT_9660 0x9660 ++#define PCI_DEVICE_ID_TRIDENT_9750 0x9750 ++#define PCI_DEVICE_ID_TRIDENT_9850 0x9850 ++#define PCI_DEVICE_ID_TRIDENT_9880 0x9880 ++#define PCI_DEVICE_ID_TRIDENT_8400 0x8400 ++#define PCI_DEVICE_ID_TRIDENT_8420 0x8420 ++#define PCI_DEVICE_ID_TRIDENT_8500 0x8500 ++ ++#define PCI_VENDOR_ID_AI 0x1025 ++#define PCI_DEVICE_ID_AI_M1435 0x1435 ++ ++#define PCI_VENDOR_ID_DELL 0x1028 ++ ++#define PCI_VENDOR_ID_MATROX 0x102B ++#define PCI_DEVICE_ID_MATROX_MGA_2 0x0518 ++#define PCI_DEVICE_ID_MATROX_MIL 0x0519 ++#define PCI_DEVICE_ID_MATROX_MYS 0x051A ++#define PCI_DEVICE_ID_MATROX_MIL_2 0x051b ++#define PCI_DEVICE_ID_MATROX_MIL_2_AGP 0x051f ++#define PCI_DEVICE_ID_MATROX_MGA_IMP 0x0d10 ++#define PCI_DEVICE_ID_MATROX_G100_MM 0x1000 ++#define PCI_DEVICE_ID_MATROX_G100_AGP 0x1001 ++#define PCI_DEVICE_ID_MATROX_G200_PCI 0x0520 ++#define PCI_DEVICE_ID_MATROX_G200_AGP 0x0521 ++#define PCI_DEVICE_ID_MATROX_G400 0x0525 ++#define PCI_DEVICE_ID_MATROX_G550 0x2527 ++#define PCI_DEVICE_ID_MATROX_VIA 0x4536 ++ ++#define PCI_VENDOR_ID_CT 0x102c ++#define PCI_DEVICE_ID_CT_65545 0x00d8 ++#define PCI_DEVICE_ID_CT_65548 0x00dc ++#define PCI_DEVICE_ID_CT_65550 0x00e0 ++#define PCI_DEVICE_ID_CT_65554 0x00e4 ++#define PCI_DEVICE_ID_CT_65555 0x00e5 ++ ++#define PCI_VENDOR_ID_MIRO 0x1031 ++#define PCI_DEVICE_ID_MIRO_36050 0x5601 ++ ++#define PCI_VENDOR_ID_NEC 0x1033 ++#define PCI_DEVICE_ID_NEC_PCX2 0x0046 ++#define PCI_DEVICE_ID_NEC_NILE4 0x005a ++#define PCI_DEVICE_ID_NEC_VRC5476 0x009b ++ ++#define PCI_VENDOR_ID_FD 0x1036 ++#define PCI_DEVICE_ID_FD_36C70 0x0000 ++ ++#define PCI_VENDOR_ID_SIS 0x1039 ++#define PCI_VENDOR_ID_SI 0x1039 ++#define PCI_DEVICE_ID_SI_5591_AGP 0x0001 ++#define PCI_DEVICE_ID_SI_6202 0x0002 ++#define PCI_DEVICE_ID_SI_503 0x0008 ++#define PCI_DEVICE_ID_SI_ACPI 0x0009 ++#define PCI_DEVICE_ID_SI_5597_VGA 0x0200 ++#define PCI_DEVICE_ID_SI_6205 0x0205 ++#define PCI_DEVICE_ID_SI_501 0x0406 ++#define PCI_DEVICE_ID_SI_496 0x0496 ++#define PCI_DEVICE_ID_SI_300 0x0300 ++#define PCI_DEVICE_ID_SI_315H 0x0310 ++#define PCI_DEVICE_ID_SI_315 0x0315 ++#define PCI_DEVICE_ID_SI_315PRO 0x0325 ++#define PCI_DEVICE_ID_SI_530 0x0530 ++#define PCI_DEVICE_ID_SI_540 0x0540 ++#define PCI_DEVICE_ID_SI_550 0x0550 ++#define PCI_DEVICE_ID_SI_601 0x0601 ++#define PCI_DEVICE_ID_SI_620 0x0620 ++#define PCI_DEVICE_ID_SI_630 0x0630 ++#define PCI_DEVICE_ID_SI_635 0x0635 ++#define PCI_DEVICE_ID_SI_640 0x0640 ++#define PCI_DEVICE_ID_SI_645 0x0645 ++#define PCI_DEVICE_ID_SI_650 0x0650 ++#define PCI_DEVICE_ID_SI_730 0x0730 ++#define PCI_DEVICE_ID_SI_735 0x0735 ++#define PCI_DEVICE_ID_SI_740 0x0740 ++#define PCI_DEVICE_ID_SI_745 0x0745 ++#define PCI_DEVICE_ID_SI_750 0x0750 ++#define PCI_DEVICE_ID_SI_900 0x0900 ++#define PCI_DEVICE_ID_SIS900 0x0900 ++#define PCI_DEVICE_ID_SI_5107 0x5107 ++#define PCI_DEVICE_ID_SI_5300 0x5300 ++#define PCI_DEVICE_ID_SI_540_VGA 0x5300 ++#define PCI_DEVICE_ID_SI_550_VGA 0x5315 ++#define PCI_DEVICE_ID_SI_5511 0x5511 ++#define PCI_DEVICE_ID_SI_5513 0x5513 ++#define PCI_DEVICE_ID_SI_5571 0x5571 ++#define PCI_DEVICE_ID_SI_5591 0x5591 ++#define PCI_DEVICE_ID_SI_5597 0x5597 ++#define PCI_DEVICE_ID_SI_5598 0x5598 ++#define PCI_DEVICE_ID_SI_5600 0x5600 ++#define PCI_DEVICE_ID_SI_6300 0x6300 ++#define PCI_DEVICE_ID_SI_630_VGA 0x6300 ++#define PCI_DEVICE_ID_SI_6306 0x6306 ++#define PCI_DEVICE_ID_SI_6326 0x6326 ++#define PCI_DEVICE_ID_SI_7001 0x7001 ++#define PCI_DEVICE_ID_SI_7016 0x7016 ++#define PCI_DEVICE_ID_SIS7016 0x7016 ++#define PCI_DEVICE_ID_SI_730_VGA 0x7300 ++ ++#define PCI_VENDOR_ID_HP 0x103c ++#define PCI_DEVICE_ID_HP_DONNER_GFX 0x1008 ++#define PCI_DEVICE_ID_HP_TACHYON 0x1028 ++#define PCI_DEVICE_ID_HP_TACHLITE 0x1029 ++#define PCI_DEVICE_ID_HP_J2585A 0x1030 ++#define PCI_DEVICE_ID_HP_J2585B 0x1031 ++#define PCI_DEVICE_ID_HP_SAS 0x1048 ++#define PCI_DEVICE_ID_HP_DIVA1 0x1049 ++#define PCI_DEVICE_ID_HP_DIVA2 0x104A ++#define PCI_DEVICE_ID_HP_SP2_0 0x104B ++ ++#define PCI_VENDOR_ID_PCTECH 0x1042 ++#define PCI_DEVICE_ID_PCTECH_RZ1000 0x1000 ++#define PCI_DEVICE_ID_PCTECH_RZ1001 0x1001 ++#define PCI_DEVICE_ID_PCTECH_SAMURAI_0 0x3000 ++#define PCI_DEVICE_ID_PCTECH_SAMURAI_1 0x3010 ++#define PCI_DEVICE_ID_PCTECH_SAMURAI_IDE 0x3020 ++ ++#define PCI_VENDOR_ID_ASUSTEK 0x1043 ++#define PCI_DEVICE_ID_ASUSTEK_0675 0x0675 ++ ++#define PCI_VENDOR_ID_DPT 0x1044 ++#define PCI_DEVICE_ID_DPT 0xa400 ++ ++#define PCI_VENDOR_ID_OPTI 0x1045 ++#define PCI_DEVICE_ID_OPTI_92C178 0xc178 ++#define PCI_DEVICE_ID_OPTI_82C557 0xc557 ++#define PCI_DEVICE_ID_OPTI_82C558 0xc558 ++#define PCI_DEVICE_ID_OPTI_82C621 0xc621 ++#define PCI_DEVICE_ID_OPTI_82C700 0xc700 ++#define PCI_DEVICE_ID_OPTI_82C701 0xc701 ++#define PCI_DEVICE_ID_OPTI_82C814 0xc814 ++#define PCI_DEVICE_ID_OPTI_82C822 0xc822 ++#define PCI_DEVICE_ID_OPTI_82C861 0xc861 ++#define PCI_DEVICE_ID_OPTI_82C825 0xd568 ++ ++#define PCI_VENDOR_ID_ELSA 0x1048 ++#define PCI_DEVICE_ID_ELSA_MICROLINK 0x1000 ++#define PCI_DEVICE_ID_ELSA_QS3000 0x3000 ++ ++#define PCI_VENDOR_ID_ELSA 0x1048 ++#define PCI_DEVICE_ID_ELSA_MICROLINK 0x1000 ++#define PCI_DEVICE_ID_ELSA_QS3000 0x3000 ++ ++#define PCI_VENDOR_ID_SGS 0x104a ++#define PCI_DEVICE_ID_SGS_2000 0x0008 ++#define PCI_DEVICE_ID_SGS_1764 0x0009 ++ ++#define PCI_VENDOR_ID_BUSLOGIC 0x104B ++#define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC 0x0140 ++#define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER 0x1040 ++#define PCI_DEVICE_ID_BUSLOGIC_FLASHPOINT 0x8130 ++ ++#define PCI_VENDOR_ID_TI 0x104c ++#define PCI_DEVICE_ID_TI_TVP4010 0x3d04 ++#define PCI_DEVICE_ID_TI_TVP4020 0x3d07 ++#define PCI_DEVICE_ID_TI_1130 0xac12 ++#define PCI_DEVICE_ID_TI_1031 0xac13 ++#define PCI_DEVICE_ID_TI_1131 0xac15 ++#define PCI_DEVICE_ID_TI_1250 0xac16 ++#define PCI_DEVICE_ID_TI_1220 0xac17 ++#define PCI_DEVICE_ID_TI_1221 0xac19 ++#define PCI_DEVICE_ID_TI_1210 0xac1a ++#define PCI_DEVICE_ID_TI_1410 0xac50 ++#define PCI_DEVICE_ID_TI_1450 0xac1b ++#define PCI_DEVICE_ID_TI_1225 0xac1c ++#define PCI_DEVICE_ID_TI_1251A 0xac1d ++#define PCI_DEVICE_ID_TI_1211 0xac1e ++#define PCI_DEVICE_ID_TI_1251B 0xac1f ++#define PCI_DEVICE_ID_TI_4410 0xac41 ++#define PCI_DEVICE_ID_TI_4451 0xac42 ++#define PCI_DEVICE_ID_TI_1420 0xac51 ++ ++#define PCI_VENDOR_ID_SONY 0x104d ++#define PCI_DEVICE_ID_SONY_CXD3222 0x8039 ++ ++#define PCI_VENDOR_ID_OAK 0x104e ++#define PCI_DEVICE_ID_OAK_OTI107 0x0107 ++ ++/* Winbond have two vendor IDs! See 0x10ad as well */ ++#define PCI_VENDOR_ID_WINBOND2 0x1050 ++#define PCI_DEVICE_ID_WINBOND2_89C840 0x0840 ++#define PCI_DEVICE_ID_WINBOND2_89C940 0x0940 ++#define PCI_DEVICE_ID_WINBOND2_89C940F 0x5a5a ++#define PCI_DEVICE_ID_WINBOND2_6692 0x6692 ++ ++#define PCI_VENDOR_ID_ANIGMA 0x1051 ++#define PCI_DEVICE_ID_ANIGMA_MC145575 0x0100 ++ ++#define PCI_VENDOR_ID_EFAR 0x1055 ++#define PCI_DEVICE_ID_EFAR_SLC90E66_1 0x9130 ++#define PCI_DEVICE_ID_EFAR_SLC90E66_0 0x9460 ++#define PCI_DEVICE_ID_EFAR_SLC90E66_2 0x9462 ++#define PCI_DEVICE_ID_EFAR_SLC90E66_3 0x9463 ++ ++#define PCI_VENDOR_ID_MOTOROLA 0x1057 ++#define PCI_VENDOR_ID_MOTOROLA_OOPS 0x1507 ++#define PCI_DEVICE_ID_MOTOROLA_MPC105 0x0001 ++#define PCI_DEVICE_ID_MOTOROLA_MPC106 0x0002 ++#define PCI_DEVICE_ID_MOTOROLA_RAVEN 0x4801 ++#define PCI_DEVICE_ID_MOTOROLA_FALCON 0x4802 ++#define PCI_DEVICE_ID_MOTOROLA_CPX8216 0x4806 ++ ++#define PCI_VENDOR_ID_PROMISE 0x105a ++#define PCI_DEVICE_ID_PROMISE_20265 0x0d30 ++#define PCI_DEVICE_ID_PROMISE_20267 0x4d30 ++#define PCI_DEVICE_ID_PROMISE_20246 0x4d33 ++#define PCI_DEVICE_ID_PROMISE_20262 0x4d38 ++#define PCI_DEVICE_ID_PROMISE_20268 0x4d68 ++#define PCI_DEVICE_ID_PROMISE_20268R 0x6268 ++#define PCI_DEVICE_ID_PROMISE_20269 0x4d69 ++#define PCI_DEVICE_ID_PROMISE_20275 0x1275 ++#define PCI_DEVICE_ID_PROMISE_5300 0x5300 ++ ++#define PCI_VENDOR_ID_N9 0x105d ++#define PCI_DEVICE_ID_N9_I128 0x2309 ++#define PCI_DEVICE_ID_N9_I128_2 0x2339 ++#define PCI_DEVICE_ID_N9_I128_T2R 0x493d ++ ++#define PCI_VENDOR_ID_UMC 0x1060 ++#define PCI_DEVICE_ID_UMC_UM8673F 0x0101 ++#define PCI_DEVICE_ID_UMC_UM8891A 0x0891 ++#define PCI_DEVICE_ID_UMC_UM8886BF 0x673a ++#define PCI_DEVICE_ID_UMC_UM8886A 0x886a ++#define PCI_DEVICE_ID_UMC_UM8881F 0x8881 ++#define PCI_DEVICE_ID_UMC_UM8886F 0x8886 ++#define PCI_DEVICE_ID_UMC_UM9017F 0x9017 ++#define PCI_DEVICE_ID_UMC_UM8886N 0xe886 ++#define PCI_DEVICE_ID_UMC_UM8891N 0xe891 ++ ++#define PCI_VENDOR_ID_X 0x1061 ++#define PCI_DEVICE_ID_X_AGX016 0x0001 ++ ++#define PCI_VENDOR_ID_MYLEX 0x1069 ++#define PCI_DEVICE_ID_MYLEX_DAC960_P 0x0001 ++#define PCI_DEVICE_ID_MYLEX_DAC960_PD 0x0002 ++#define PCI_DEVICE_ID_MYLEX_DAC960_PG 0x0010 ++#define PCI_DEVICE_ID_MYLEX_DAC960_LA 0x0020 ++#define PCI_DEVICE_ID_MYLEX_DAC960_LP 0x0050 ++#define PCI_DEVICE_ID_MYLEX_DAC960_BA 0xBA56 ++ ++#define PCI_VENDOR_ID_PICOP 0x1066 ++#define PCI_DEVICE_ID_PICOP_PT86C52X 0x0001 ++#define PCI_DEVICE_ID_PICOP_PT80C524 0x8002 ++ ++#define PCI_VENDOR_ID_APPLE 0x106b ++#define PCI_DEVICE_ID_APPLE_BANDIT 0x0001 ++#define PCI_DEVICE_ID_APPLE_GC 0x0002 ++#define PCI_DEVICE_ID_APPLE_HYDRA 0x000e ++#define PCI_DEVICE_ID_APPLE_UNI_N_FW 0x0018 ++#define PCI_DEVICE_ID_APPLE_KL_USB 0x0019 ++#define PCI_DEVICE_ID_APPLE_UNI_N_AGP 0x0020 ++#define PCI_DEVICE_ID_APPLE_UNI_N_GMAC 0x0021 ++#define PCI_DEVICE_ID_APPLE_UNI_N_FW2 0x0030 ++ ++#define PCI_VENDOR_ID_YAMAHA 0x1073 ++#define PCI_DEVICE_ID_YAMAHA_724 0x0004 ++#define PCI_DEVICE_ID_YAMAHA_724F 0x000d ++#define PCI_DEVICE_ID_YAMAHA_740 0x000a ++#define PCI_DEVICE_ID_YAMAHA_740C 0x000c ++#define PCI_DEVICE_ID_YAMAHA_744 0x0010 ++#define PCI_DEVICE_ID_YAMAHA_754 0x0012 ++ ++#define PCI_VENDOR_ID_NEXGEN 0x1074 ++#define PCI_DEVICE_ID_NEXGEN_82C501 0x4e78 ++ ++#define PCI_VENDOR_ID_QLOGIC 0x1077 ++#define PCI_DEVICE_ID_QLOGIC_ISP1020 0x1020 ++#define PCI_DEVICE_ID_QLOGIC_ISP1022 0x1022 ++#define PCI_DEVICE_ID_QLOGIC_ISP2100 0x2100 ++#define PCI_DEVICE_ID_QLOGIC_ISP2200 0x2200 ++ ++#define PCI_VENDOR_ID_CYRIX 0x1078 ++#define PCI_DEVICE_ID_CYRIX_5510 0x0000 ++#define PCI_DEVICE_ID_CYRIX_PCI_MASTER 0x0001 ++#define PCI_DEVICE_ID_CYRIX_5520 0x0002 ++#define PCI_DEVICE_ID_CYRIX_5530_LEGACY 0x0100 ++#define PCI_DEVICE_ID_CYRIX_5530_SMI 0x0101 ++#define PCI_DEVICE_ID_CYRIX_5530_IDE 0x0102 ++#define PCI_DEVICE_ID_CYRIX_5530_AUDIO 0x0103 ++#define PCI_DEVICE_ID_CYRIX_5530_VIDEO 0x0104 ++ ++#define PCI_VENDOR_ID_LEADTEK 0x107d ++#define PCI_DEVICE_ID_LEADTEK_805 0x0000 ++ ++#define PCI_VENDOR_ID_INTERPHASE 0x107e ++#define PCI_DEVICE_ID_INTERPHASE_5526 0x0004 ++#define PCI_DEVICE_ID_INTERPHASE_55x6 0x0005 ++#define PCI_DEVICE_ID_INTERPHASE_5575 0x0008 ++ ++#define PCI_VENDOR_ID_CONTAQ 0x1080 ++#define PCI_DEVICE_ID_CONTAQ_82C599 0x0600 ++#define PCI_DEVICE_ID_CONTAQ_82C693 0xc693 ++ ++#define PCI_VENDOR_ID_FOREX 0x1083 ++ ++#define PCI_VENDOR_ID_OLICOM 0x108d ++#define PCI_DEVICE_ID_OLICOM_OC3136 0x0001 ++#define PCI_DEVICE_ID_OLICOM_OC2315 0x0011 ++#define PCI_DEVICE_ID_OLICOM_OC2325 0x0012 ++#define PCI_DEVICE_ID_OLICOM_OC2183 0x0013 ++#define PCI_DEVICE_ID_OLICOM_OC2326 0x0014 ++#define PCI_DEVICE_ID_OLICOM_OC6151 0x0021 ++ ++#define PCI_VENDOR_ID_SUN 0x108e ++#define PCI_DEVICE_ID_SUN_EBUS 0x1000 ++#define PCI_DEVICE_ID_SUN_HAPPYMEAL 0x1001 ++#define PCI_DEVICE_ID_SUN_RIO_EBUS 0x1100 ++#define PCI_DEVICE_ID_SUN_RIO_GEM 0x1101 ++#define PCI_DEVICE_ID_SUN_RIO_1394 0x1102 ++#define PCI_DEVICE_ID_SUN_RIO_USB 0x1103 ++#define PCI_DEVICE_ID_SUN_GEM 0x2bad ++#define PCI_DEVICE_ID_SUN_SIMBA 0x5000 ++#define PCI_DEVICE_ID_SUN_PBM 0x8000 ++#define PCI_DEVICE_ID_SUN_SCHIZO 0x8001 ++#define PCI_DEVICE_ID_SUN_SABRE 0xa000 ++#define PCI_DEVICE_ID_SUN_HUMMINGBIRD 0xa001 ++ ++#define PCI_VENDOR_ID_CMD 0x1095 ++#define PCI_DEVICE_ID_CMD_640 0x0640 ++#define PCI_DEVICE_ID_CMD_643 0x0643 ++#define PCI_DEVICE_ID_CMD_646 0x0646 ++#define PCI_DEVICE_ID_CMD_647 0x0647 ++#define PCI_DEVICE_ID_CMD_648 0x0648 ++#define PCI_DEVICE_ID_CMD_649 0x0649 ++#define PCI_DEVICE_ID_CMD_670 0x0670 ++#define PCI_DEVICE_ID_CMD_680 0x0680 ++ ++#define PCI_VENDOR_ID_VISION 0x1098 ++#define PCI_DEVICE_ID_VISION_QD8500 0x0001 ++#define PCI_DEVICE_ID_VISION_QD8580 0x0002 ++ ++#define PCI_VENDOR_ID_BROOKTREE 0x109e ++#define PCI_DEVICE_ID_BROOKTREE_848 0x0350 ++#define PCI_DEVICE_ID_BROOKTREE_849A 0x0351 ++#define PCI_DEVICE_ID_BROOKTREE_878_1 0x036e ++#define PCI_DEVICE_ID_BROOKTREE_878 0x0878 ++#define PCI_DEVICE_ID_BROOKTREE_8474 0x8474 ++ ++#define PCI_VENDOR_ID_SIERRA 0x10a8 ++#define PCI_DEVICE_ID_SIERRA_STB 0x0000 ++ ++#define PCI_VENDOR_ID_SGI 0x10a9 ++#define PCI_DEVICE_ID_SGI_IOC3 0x0003 ++ ++#define PCI_VENDOR_ID_ACC 0x10aa ++#define PCI_DEVICE_ID_ACC_2056 0x0000 ++ ++#define PCI_VENDOR_ID_WINBOND 0x10ad ++#define PCI_DEVICE_ID_WINBOND_83769 0x0001 ++#define PCI_DEVICE_ID_WINBOND_82C105 0x0105 ++#define PCI_DEVICE_ID_WINBOND_83C553 0x0565 ++ ++#define PCI_VENDOR_ID_DATABOOK 0x10b3 ++#define PCI_DEVICE_ID_DATABOOK_87144 0xb106 ++ ++#define PCI_VENDOR_ID_PLX 0x10b5 ++#define PCI_DEVICE_ID_PLX_R685 0x1030 ++#define PCI_DEVICE_ID_PLX_ROMULUS 0x106a ++#define PCI_DEVICE_ID_PLX_SPCOM800 0x1076 ++#define PCI_DEVICE_ID_PLX_1077 0x1077 ++#define PCI_DEVICE_ID_PLX_SPCOM200 0x1103 ++#define PCI_DEVICE_ID_PLX_DJINN_ITOO 0x1151 ++#define PCI_DEVICE_ID_PLX_R753 0x1152 ++#define PCI_DEVICE_ID_PLX_9050 0x9050 ++#define PCI_DEVICE_ID_PLX_9060 0x9060 ++#define PCI_DEVICE_ID_PLX_9060ES 0x906E ++#define PCI_DEVICE_ID_PLX_9060SD 0x906D ++#define PCI_DEVICE_ID_PLX_9080 0x9080 ++#define PCI_DEVICE_ID_PLX_GTEK_SERIAL2 0xa001 ++ ++#define PCI_VENDOR_ID_MADGE 0x10b6 ++#define PCI_DEVICE_ID_MADGE_MK2 0x0002 ++#define PCI_DEVICE_ID_MADGE_C155S 0x1001 ++ ++#define PCI_VENDOR_ID_3COM 0x10b7 ++#define PCI_DEVICE_ID_3COM_3C985 0x0001 ++#define PCI_DEVICE_ID_3COM_3C339 0x3390 ++#define PCI_DEVICE_ID_3COM_3C590 0x5900 ++#define PCI_DEVICE_ID_3COM_3C595 0x5950 ++#define PCI_DEVICE_ID_3COM_3C595TX 0x5950 ++#define PCI_DEVICE_ID_3COM_3C595_1 0x5951 ++#define PCI_DEVICE_ID_3COM_3C595T4 0x5951 ++#define PCI_DEVICE_ID_3COM_3C595_2 0x5952 ++#define PCI_DEVICE_ID_3COM_3C595MII 0x5952 ++#define PCI_DEVICE_ID_3COM_3C900TPO 0x9000 ++#define PCI_DEVICE_ID_3COM_3C900COMBO 0x9001 ++#define PCI_DEVICE_ID_3COM_3C905TX 0x9050 ++#define PCI_DEVICE_ID_3COM_3C905T4 0x9051 ++#define PCI_DEVICE_ID_3COM_3C905B_TX 0x9055 ++#define PCI_DEVICE_ID_3COM_3C905C_TXM 0x9200 ++ ++#define PCI_VENDOR_ID_SMC 0x10b8 ++#define PCI_DEVICE_ID_SMC_EPIC100 0x0005 ++ ++#define PCI_VENDOR_ID_SUNDANCE 0x13F0 ++#define PCI_DEVICE_ID_SUNDANCE_ALTA 0x0201 ++ ++#define PCI_VENDOR_ID_AL 0x10b9 ++#define PCI_DEVICE_ID_AL_M1445 0x1445 ++#define PCI_DEVICE_ID_AL_M1449 0x1449 ++#define PCI_DEVICE_ID_AL_M1451 0x1451 ++#define PCI_DEVICE_ID_AL_M1461 0x1461 ++#define PCI_DEVICE_ID_AL_M1489 0x1489 ++#define PCI_DEVICE_ID_AL_M1511 0x1511 ++#define PCI_DEVICE_ID_AL_M1513 0x1513 ++#define PCI_DEVICE_ID_AL_M1521 0x1521 ++#define PCI_DEVICE_ID_AL_M1523 0x1523 ++#define PCI_DEVICE_ID_AL_M1531 0x1531 ++#define PCI_DEVICE_ID_AL_M1533 0x1533 ++#define PCI_DEVICE_ID_AL_M1541 0x1541 ++#define PCI_DEVICE_ID_AL_M1621 0x1621 ++#define PCI_DEVICE_ID_AL_M1631 0x1631 ++#define PCI_DEVICE_ID_AL_M1641 0x1641 ++#define PCI_DEVICE_ID_AL_M1647 0x1647 ++#define PCI_DEVICE_ID_AL_M1651 0x1651 ++#define PCI_DEVICE_ID_AL_M1543 0x1543 ++#define PCI_DEVICE_ID_AL_M3307 0x3307 ++#define PCI_DEVICE_ID_AL_M4803 0x5215 ++#define PCI_DEVICE_ID_AL_M5219 0x5219 ++#define PCI_DEVICE_ID_AL_M5229 0x5229 ++#define PCI_DEVICE_ID_AL_M5237 0x5237 ++#define PCI_DEVICE_ID_AL_M5243 0x5243 ++#define PCI_DEVICE_ID_AL_M5451 0x5451 ++#define PCI_DEVICE_ID_AL_M7101 0x7101 ++ ++#define PCI_VENDOR_ID_MITSUBISHI 0x10ba ++ ++#define PCI_VENDOR_ID_SURECOM 0x10bd ++#define PCI_DEVICE_ID_SURECOM_NE34 0x0e34 ++ ++#define PCI_VENDOR_ID_NEOMAGIC 0x10c8 ++#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_NM2070 0x0001 ++#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_128V 0x0002 ++#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_128ZV 0x0003 ++#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_NM2160 0x0004 ++#define PCI_DEVICE_ID_NEOMAGIC_MAGICMEDIA_256AV 0x0005 ++#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_128ZVPLUS 0x0083 ++ ++#define PCI_VENDOR_ID_ASP 0x10cd ++#define PCI_DEVICE_ID_ASP_ABP940 0x1200 ++#define PCI_DEVICE_ID_ASP_ABP940U 0x1300 ++#define PCI_DEVICE_ID_ASP_ABP940UW 0x2300 ++ ++#define PCI_VENDOR_ID_MACRONIX 0x10d9 ++#define PCI_DEVICE_ID_MACRONIX_MX98713 0x0512 ++#define PCI_DEVICE_ID_MX987x3 0x0512 ++#define PCI_DEVICE_ID_MACRONIX_MX987x5 0x0531 ++#define PCI_DEVICE_ID_MX987x5 0x0531 ++ ++#define PCI_VENDOR_ID_TCONRAD 0x10da ++#define PCI_DEVICE_ID_TCONRAD_TOKENRING 0x0508 ++ ++#define PCI_VENDOR_ID_CERN 0x10dc ++#define PCI_DEVICE_ID_CERN_SPSB_PMC 0x0001 ++#define PCI_DEVICE_ID_CERN_SPSB_PCI 0x0002 ++#define PCI_DEVICE_ID_CERN_HIPPI_DST 0x0021 ++#define PCI_DEVICE_ID_CERN_HIPPI_SRC 0x0022 ++ ++#define PCI_VENDOR_ID_NVIDIA 0x10de ++#define PCI_DEVICE_ID_NVIDIA_TNT 0x0020 ++#define PCI_DEVICE_ID_NVIDIA_TNT2 0x0028 ++#define PCI_DEVICE_ID_NVIDIA_UTNT2 0x0029 ++#define PCI_DEVICE_ID_NVIDIA_VTNT2 0x002C ++#define PCI_DEVICE_ID_NVIDIA_UVTNT2 0x002D ++#define PCI_DEVICE_ID_NVIDIA_ITNT2 0x00A0 ++#define PCI_DEVICE_ID_NVIDIA_GEFORCE_SDR 0x0100 ++#define PCI_DEVICE_ID_NVIDIA_GEFORCE_DDR 0x0101 ++#define PCI_DEVICE_ID_NVIDIA_QUADRO 0x0103 ++#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_MX 0x0110 ++#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_MX2 0x0111 ++#define PCI_DEVICE_ID_NVIDIA_QUADRO2_MXR 0x0113 ++#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_GTS 0x0150 ++#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_GTS2 0x0151 ++#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_ULTRA 0x0152 ++#define PCI_DEVICE_ID_NVIDIA_QUADRO2_PRO 0x0153 ++ ++#define PCI_VENDOR_ID_IMS 0x10e0 ++#define PCI_DEVICE_ID_IMS_8849 0x8849 ++#define PCI_DEVICE_ID_IMS_TT128 0x9128 ++#define PCI_DEVICE_ID_IMS_TT3D 0x9135 ++ ++#define PCI_VENDOR_ID_TEKRAM2 0x10e1 ++#define PCI_DEVICE_ID_TEKRAM2_690c 0x690c ++ ++#define PCI_VENDOR_ID_TUNDRA 0x10e3 ++#define PCI_DEVICE_ID_TUNDRA_CA91C042 0x0000 ++ ++#define PCI_VENDOR_ID_AMCC 0x10e8 ++#define PCI_DEVICE_ID_AMCC_MYRINET 0x8043 ++#define PCI_DEVICE_ID_AMCC_PARASTATION 0x8062 ++#define PCI_DEVICE_ID_AMCC_S5933 0x807d ++#define PCI_DEVICE_ID_AMCC_S5933_HEPC3 0x809c ++ ++#define PCI_VENDOR_ID_INTERG 0x10ea ++#define PCI_DEVICE_ID_INTERG_1680 0x1680 ++#define PCI_DEVICE_ID_INTERG_1682 0x1682 ++#define PCI_DEVICE_ID_INTERG_2000 0x2000 ++#define PCI_DEVICE_ID_INTERG_2010 0x2010 ++#define PCI_DEVICE_ID_INTERG_5000 0x5000 ++#define PCI_DEVICE_ID_INTERG_5050 0x5050 ++ ++#define PCI_VENDOR_ID_REALTEK 0x10ec ++#define PCI_DEVICE_ID_REALTEK_8029 0x8029 ++#define PCI_DEVICE_ID_REALTEK_8129 0x8129 ++#define PCI_DEVICE_ID_REALTEK_8139 0x8139 ++ ++#define PCI_VENDOR_ID_XILINX 0x10ee ++#define PCI_DEVICE_ID_TURBOPAM 0x4020 ++ ++#define PCI_VENDOR_ID_TRUEVISION 0x10fa ++#define PCI_DEVICE_ID_TRUEVISION_T1000 0x000c ++ ++#define PCI_VENDOR_ID_INIT 0x1101 ++#define PCI_DEVICE_ID_INIT_320P 0x9100 ++#define PCI_DEVICE_ID_INIT_360P 0x9500 ++ ++#define PCI_VENDOR_ID_CREATIVE 0x1102 // duplicate: ECTIVA ++#define PCI_DEVICE_ID_CREATIVE_EMU10K1 0x0002 ++ ++#define PCI_VENDOR_ID_ECTIVA 0x1102 // duplicate: CREATIVE ++#define PCI_DEVICE_ID_ECTIVA_EV1938 0x8938 ++ ++#define PCI_VENDOR_ID_TTI 0x1103 ++#define PCI_DEVICE_ID_TTI_HPT343 0x0003 ++#define PCI_DEVICE_ID_TTI_HPT366 0x0004 ++ ++#define PCI_VENDOR_ID_VIA 0x1106 ++#define PCI_VENDOR_ID_VIATEC 0x1106 ++#define PCI_DEVICE_ID_VIA_8363_0 0x0305 ++#define PCI_DEVICE_ID_VIA_8371_0 0x0391 ++#define PCI_DEVICE_ID_VIA_8501_0 0x0501 ++#define PCI_DEVICE_ID_VIA_82C505 0x0505 ++#define PCI_DEVICE_ID_VIA_82C561 0x0561 ++#define PCI_DEVICE_ID_VIA_82C586_1 0x0571 ++#define PCI_DEVICE_ID_VIA_82C576 0x0576 ++#define PCI_DEVICE_ID_VIA_82C585 0x0585 ++#define PCI_DEVICE_ID_VIA_82C586_0 0x0586 ++#define PCI_DEVICE_ID_VIA_82C595 0x0595 ++#define PCI_DEVICE_ID_VIA_82C596 0x0596 ++#define PCI_DEVICE_ID_VIA_82C597_0 0x0597 ++#define PCI_DEVICE_ID_VIA_82C598_0 0x0598 ++#define PCI_DEVICE_ID_VIA_8601_0 0x0601 ++#define PCI_DEVICE_ID_VIA_8605_0 0x0605 ++#define PCI_DEVICE_ID_VIA_82C680 0x0680 ++#define PCI_DEVICE_ID_VIA_82C686 0x0686 ++#define PCI_DEVICE_ID_VIA_82C691 0x0691 ++#define PCI_DEVICE_ID_VIA_82C693 0x0693 ++#define PCI_DEVICE_ID_VIA_82C693_1 0x0698 ++#define PCI_DEVICE_ID_VIA_82C926 0x0926 ++#define PCI_DEVICE_ID_VIA_82C576_1 0x1571 ++#define PCI_DEVICE_ID_VIA_82C595_97 0x1595 ++#define PCI_DEVICE_ID_VIA_82C586_2 0x3038 ++#define PCI_DEVICE_ID_VIA_82C586_3 0x3040 ++#define PCI_DEVICE_ID_VIA_RHINE_I 0x3043 ++#define PCI_DEVICE_ID_VIA_6305 0x3044 ++#define PCI_DEVICE_ID_VIA_82C596_3 0x3050 ++#define PCI_DEVICE_ID_VIA_82C596B_3 0x3051 ++#define PCI_DEVICE_ID_VIA_82C686_4 0x3057 ++#define PCI_DEVICE_ID_VIA_82C686_5 0x3058 ++#define PCI_DEVICE_ID_VIA_8233_5 0x3059 ++#define PCI_DEVICE_ID_VIA_8233_7 0x3065 ++#define PCI_DEVICE_ID_VIA_VT6102 0x3065 ++#define PCI_DEVICE_ID_VIA_82C686_6 0x3068 ++#define PCI_DEVICE_ID_VIA_8233_0 0x3074 ++#define PCI_DEVICE_ID_VIA_VT6105 0x3106 ++#define PCI_DEVICE_ID_VIA_8233C_0 0x3109 ++#define PCI_DEVICE_ID_VIA_8633_0 0x3091 ++#define PCI_DEVICE_ID_VIA_8367_0 0x3099 ++#define PCI_DEVICE_ID_VIA_86C100A 0x6100 ++#define PCI_DEVICE_ID_VIA_8231 0x8231 ++#define PCI_DEVICE_ID_VIA_8231_4 0x8235 ++#define PCI_DEVICE_ID_VIA_8365_1 0x8305 ++#define PCI_DEVICE_ID_VIA_8371_1 0x8391 ++#define PCI_DEVICE_ID_VIA_8501_1 0x8501 ++#define PCI_DEVICE_ID_VIA_82C597_1 0x8597 ++#define PCI_DEVICE_ID_VIA_82C598_1 0x8598 ++#define PCI_DEVICE_ID_VIA_8601_1 0x8601 ++#define PCI_DEVICE_ID_VIA_8505_1 0X8605 ++#define PCI_DEVICE_ID_VIA_8633_1 0xB091 ++#define PCI_DEVICE_ID_VIA_8367_1 0xB099 ++ ++#define PCI_VENDOR_ID_SIEMENS 0x110A ++#define PCI_DEVICE_ID_SIEMENS_DSCC4 0x2102 ++ ++#define PCI_VENDOR_ID_SMC2 0x1113 ++#define PCI_DEVICE_ID_SMC2_1211TX 0x1211 ++#define PCI_DEVICE_ID_SMC2_1211 0x1211 ++#define PCI_DEVICE_ID_SMC2_1216 0x1216 ++ ++#define PCI_VENDOR_ID_VORTEX 0x1119 ++#define PCI_DEVICE_ID_VORTEX_GDT60x0 0x0000 ++#define PCI_DEVICE_ID_VORTEX_GDT6000B 0x0001 ++#define PCI_DEVICE_ID_VORTEX_GDT6x10 0x0002 ++#define PCI_DEVICE_ID_VORTEX_GDT6x20 0x0003 ++#define PCI_DEVICE_ID_VORTEX_GDT6530 0x0004 ++#define PCI_DEVICE_ID_VORTEX_GDT6550 0x0005 ++#define PCI_DEVICE_ID_VORTEX_GDT6x17 0x0006 ++#define PCI_DEVICE_ID_VORTEX_GDT6x27 0x0007 ++#define PCI_DEVICE_ID_VORTEX_GDT6537 0x0008 ++#define PCI_DEVICE_ID_VORTEX_GDT6557 0x0009 ++#define PCI_DEVICE_ID_VORTEX_GDT6x15 0x000a ++#define PCI_DEVICE_ID_VORTEX_GDT6x25 0x000b ++#define PCI_DEVICE_ID_VORTEX_GDT6535 0x000c ++#define PCI_DEVICE_ID_VORTEX_GDT6555 0x000d ++#define PCI_DEVICE_ID_VORTEX_GDT6x17RP 0x0100 ++#define PCI_DEVICE_ID_VORTEX_GDT6x27RP 0x0101 ++#define PCI_DEVICE_ID_VORTEX_GDT6537RP 0x0102 ++#define PCI_DEVICE_ID_VORTEX_GDT6557RP 0x0103 ++#define PCI_DEVICE_ID_VORTEX_GDT6x11RP 0x0104 ++#define PCI_DEVICE_ID_VORTEX_GDT6x21RP 0x0105 ++#define PCI_DEVICE_ID_VORTEX_GDT6x17RP1 0x0110 ++#define PCI_DEVICE_ID_VORTEX_GDT6x27RP1 0x0111 ++#define PCI_DEVICE_ID_VORTEX_GDT6537RP1 0x0112 ++#define PCI_DEVICE_ID_VORTEX_GDT6557RP1 0x0113 ++#define PCI_DEVICE_ID_VORTEX_GDT6x11RP1 0x0114 ++#define PCI_DEVICE_ID_VORTEX_GDT6x21RP1 0x0115 ++#define PCI_DEVICE_ID_VORTEX_GDT6x17RP2 0x0120 ++#define PCI_DEVICE_ID_VORTEX_GDT6x27RP2 0x0121 ++#define PCI_DEVICE_ID_VORTEX_GDT6537RP2 0x0122 ++#define PCI_DEVICE_ID_VORTEX_GDT6557RP2 0x0123 ++#define PCI_DEVICE_ID_VORTEX_GDT6x11RP2 0x0124 ++#define PCI_DEVICE_ID_VORTEX_GDT6x21RP2 0x0125 ++ ++#define PCI_VENDOR_ID_EF 0x111a ++#define PCI_DEVICE_ID_EF_ATM_FPGA 0x0000 ++#define PCI_DEVICE_ID_EF_ATM_ASIC 0x0002 ++ ++#define PCI_VENDOR_ID_IDT 0x111d ++#define PCI_DEVICE_ID_IDT_IDT77201 0x0001 ++ ++#define PCI_VENDOR_ID_FORE 0x1127 ++#define PCI_DEVICE_ID_FORE_PCA200PC 0x0210 ++#define PCI_DEVICE_ID_FORE_PCA200E 0x0300 ++ ++#define PCI_VENDOR_ID_IMAGINGTECH 0x112f ++#define PCI_DEVICE_ID_IMAGINGTECH_ICPCI 0x0000 ++ ++#define PCI_VENDOR_ID_PHILIPS 0x1131 ++#define PCI_DEVICE_ID_PHILIPS_SAA7145 0x7145 ++#define PCI_DEVICE_ID_PHILIPS_SAA7146 0x7146 ++#define PCI_DEVICE_ID_PHILIPS_SAA9730 0x9730 ++ ++#define PCI_VENDOR_ID_EICON 0x1133 ++#define PCI_DEVICE_ID_EICON_DIVA20PRO 0xe001 ++#define PCI_DEVICE_ID_EICON_DIVA20 0xe002 ++#define PCI_DEVICE_ID_EICON_DIVA20PRO_U 0xe003 ++#define PCI_DEVICE_ID_EICON_DIVA20_U 0xe004 ++#define PCI_DEVICE_ID_EICON_DIVA201 0xe005 ++#define PCI_DEVICE_ID_EICON_MAESTRA 0xe010 ++#define PCI_DEVICE_ID_EICON_MAESTRAQ 0xe012 ++#define PCI_DEVICE_ID_EICON_MAESTRAQ_U 0xe013 ++#define PCI_DEVICE_ID_EICON_MAESTRAP 0xe014 ++ ++#define PCI_VENDOR_ID_CYCLONE 0x113c ++#define PCI_DEVICE_ID_CYCLONE_SDK 0x0001 ++ ++#define PCI_VENDOR_ID_ALLIANCE 0x1142 ++#define PCI_DEVICE_ID_ALLIANCE_PROMOTIO 0x3210 ++#define PCI_DEVICE_ID_ALLIANCE_PROVIDEO 0x6422 ++#define PCI_DEVICE_ID_ALLIANCE_AT24 0x6424 ++#define PCI_DEVICE_ID_ALLIANCE_AT3D 0x643d ++ ++#define PCI_VENDOR_ID_SYSKONNECT 0x1148 ++#define PCI_DEVICE_ID_SYSKONNECT_FP 0x4000 ++#define PCI_DEVICE_ID_SYSKONNECT_TR 0x4200 ++#define PCI_DEVICE_ID_SYSKONNECT_GE 0x4300 ++ ++#define PCI_VENDOR_ID_VMIC 0x114a ++#define PCI_DEVICE_ID_VMIC_VME 0x7587 ++ ++#define PCI_VENDOR_ID_DIGI 0x114f ++#define PCI_DEVICE_ID_DIGI_EPC 0x0002 ++#define PCI_DEVICE_ID_DIGI_RIGHTSWITCH 0x0003 ++#define PCI_DEVICE_ID_DIGI_XEM 0x0004 ++#define PCI_DEVICE_ID_DIGI_XR 0x0005 ++#define PCI_DEVICE_ID_DIGI_CX 0x0006 ++#define PCI_DEVICE_ID_DIGI_XRJ 0x0009 ++#define PCI_DEVICE_ID_DIGI_EPCJ 0x000a ++#define PCI_DEVICE_ID_DIGI_XR_920 0x0027 ++#define PCI_DEVICE_ID_DIGI_DF_M_IOM2_E 0x0070 ++#define PCI_DEVICE_ID_DIGI_DF_M_E 0x0071 ++#define PCI_DEVICE_ID_DIGI_DF_M_IOM2_A 0x0072 ++#define PCI_DEVICE_ID_DIGI_DF_M_A 0x0073 ++ ++#define PCI_VENDOR_ID_MUTECH 0x1159 ++#define PCI_DEVICE_ID_MUTECH_MV1000 0x0001 ++ ++#define PCI_VENDOR_ID_XIRCOM 0x115d ++#define PCI_DEVICE_ID_XIRCOM_X3201_ETH 0x0003 ++#define PCI_DEVICE_ID_XIRCOM_X3201_MDM 0x0103 ++ ++#define PCI_VENDOR_ID_RENDITION 0x1163 ++#define PCI_DEVICE_ID_RENDITION_VERITE 0x0001 ++#define PCI_DEVICE_ID_RENDITION_VERITE2100 0x2000 ++ ++#define PCI_VENDOR_ID_SERVERWORKS 0x1166 ++#define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008 ++#define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009 ++#define PCI_DEVICE_ID_SERVERWORKS_CIOB30 0x0010 ++#define PCI_DEVICE_ID_SERVERWORKS_CMIC_HE 0x0011 ++#define PCI_DEVICE_ID_SERVERWORKS_OSB4 0x0200 ++#define PCI_DEVICE_ID_SERVERWORKS_CSB5 0x0201 ++#define PCI_DEVICE_ID_SERVERWORKS_OSB4IDE 0x0211 ++#define PCI_DEVICE_ID_SERVERWORKS_CSB5IDE 0x0212 ++#define PCI_DEVICE_ID_SERVERWORKS_OSB4USB 0x0220 ++#define PCI_DEVICE_ID_SERVERWORKS_CSB5USB PCI_DEVICE_ID_SERVERWORKS_OSB4USB ++#define PCI_DEVICE_ID_SERVERWORKS_CSB5ISA 0x0230 ++ ++#define PCI_VENDOR_ID_SBE 0x1176 ++#define PCI_DEVICE_ID_SBE_WANXL100 0x0301 ++#define PCI_DEVICE_ID_SBE_WANXL200 0x0302 ++#define PCI_DEVICE_ID_SBE_WANXL400 0x0104 ++ ++#define PCI_VENDOR_ID_TOSHIBA 0x1179 ++#define PCI_DEVICE_ID_TOSHIBA_601 0x0601 ++#define PCI_DEVICE_ID_TOSHIBA_TOPIC95 0x060a ++#define PCI_DEVICE_ID_TOSHIBA_TOPIC97 0x060f ++ ++#define PCI_VENDOR_ID_RICOH 0x1180 ++#define PCI_DEVICE_ID_RICOH_RL5C465 0x0465 ++#define PCI_DEVICE_ID_RICOH_RL5C466 0x0466 ++#define PCI_DEVICE_ID_RICOH_RL5C475 0x0475 ++#define PCI_DEVICE_ID_RICOH_RL5C476 0x0476 ++#define PCI_DEVICE_ID_RICOH_RL5C478 0x0478 ++ ++#define PCI_VENDOR_ID_DLINK 0x1186 ++#define PCI_DEVICE_ID_DFE530TXP 0x1300 ++#define PCI_DEVICE_ID_DFE530TXS 0x1002 ++ ++#define PCI_VENDOR_ID_ARTOP 0x1191 ++#define PCI_DEVICE_ID_ARTOP_ATP8400 0x0004 ++#define PCI_DEVICE_ID_ARTOP_ATP850UF 0x0005 ++#define PCI_DEVICE_ID_ARTOP_ATP860 0x0006 ++#define PCI_DEVICE_ID_ARTOP_ATP860R 0x0007 ++#define PCI_DEVICE_ID_ARTOP_AEC7610 0x8002 ++#define PCI_DEVICE_ID_ARTOP_AEC7612UW 0x8010 ++#define PCI_DEVICE_ID_ARTOP_AEC7612U 0x8020 ++#define PCI_DEVICE_ID_ARTOP_AEC7612S 0x8030 ++#define PCI_DEVICE_ID_ARTOP_AEC7612D 0x8040 ++#define PCI_DEVICE_ID_ARTOP_AEC7612SUW 0x8050 ++#define PCI_DEVICE_ID_ARTOP_8060 0x8060 ++ ++#define PCI_VENDOR_ID_ZEITNET 0x1193 ++#define PCI_DEVICE_ID_ZEITNET_1221 0x0001 ++#define PCI_DEVICE_ID_ZEITNET_1225 0x0002 ++ ++#define PCI_VENDOR_ID_OMEGA 0x119b ++#define PCI_DEVICE_ID_OMEGA_82C092G 0x1221 ++ ++#define PCI_VENDOR_ID_FUJITSU_ME 0x119e ++#define PCI_DEVICE_ID_FUJITSU_FS155 0x0001 ++#define PCI_DEVICE_ID_FUJITSU_FS50 0x0003 ++ ++#define PCI_SUBVENDOR_ID_KEYSPAN 0x11a9 ++#define PCI_SUBDEVICE_ID_KEYSPAN_SX2 0x5334 ++ ++#define PCI_VENDOR_ID_GALILEO 0x11ab ++#define PCI_DEVICE_ID_GALILEO_GT64011 0x4146 ++#define PCI_DEVICE_ID_GALILEO_GT64111 0x4146 ++#define PCI_DEVICE_ID_GALILEO_GT96100 0x9652 ++#define PCI_DEVICE_ID_GALILEO_GT96100A 0x9653 ++ ++#define PCI_VENDOR_ID_LINKSYS 0x11ad ++#define PCI_VENDOR_ID_LITEON 0x11ad ++#define PCI_DEVICE_ID_LITEON_LNE100TX 0x0002 ++#define PCI_DEVICE_ID_LC82C115 0xC115 ++ ++#define PCI_VENDOR_ID_V3 0x11b0 ++#define PCI_DEVICE_ID_V3_V960 0x0001 ++#define PCI_DEVICE_ID_V3_V350 0x0001 ++#define PCI_DEVICE_ID_V3_V961 0x0002 ++#define PCI_DEVICE_ID_V3_V351 0x0002 ++ ++#define PCI_VENDOR_ID_NP 0x11bc ++#define PCI_DEVICE_ID_NP_PCI_FDDI 0x0001 ++ ++#define PCI_VENDOR_ID_ATT 0x11c1 ++#define PCI_DEVICE_ID_ATT_L56XMF 0x0440 ++#define PCI_DEVICE_ID_ATT_VENUS_MODEM 0x480 ++ ++#define PCI_VENDOR_ID_SPECIALIX 0x11cb ++#define PCI_DEVICE_ID_SPECIALIX_IO8 0x2000 ++#define PCI_DEVICE_ID_SPECIALIX_XIO 0x4000 ++#define PCI_DEVICE_ID_SPECIALIX_RIO 0x8000 ++#define PCI_SUBDEVICE_ID_SPECIALIX_SPEED4 0xa004 ++ ++#define PCI_VENDOR_ID_AURAVISION 0x11d1 ++#define PCI_DEVICE_ID_AURAVISION_VXP524 0x01f7 ++ ++#define PCI_VENDOR_ID_ANALOG_DEVICES 0x11d4 ++#define PCI_DEVICE_ID_AD1889JS 0x1889 ++ ++#define PCI_VENDOR_ID_IKON 0x11d5 ++#define PCI_DEVICE_ID_IKON_10115 0x0115 ++#define PCI_DEVICE_ID_IKON_10117 0x0117 ++ ++#define PCI_VENDOR_ID_ZORAN 0x11de ++#define PCI_DEVICE_ID_ZORAN_36057 0x6057 ++#define PCI_DEVICE_ID_ZORAN_36120 0x6120 ++ ++#define PCI_VENDOR_ID_KINETIC 0x11f4 ++#define PCI_DEVICE_ID_KINETIC_2915 0x2915 ++ ++#define PCI_VENDOR_ID_COMPEX 0x11f6 ++#define PCI_DEVICE_ID_COMPEX_ENET100VG4 0x0112 ++#define PCI_DEVICE_ID_COMPEX_RL2000 0x1401 ++#define PCI_DEVICE_ID_COMPEX_RL100ATX 0x2011 ++ ++#define PCI_VENDOR_ID_RP 0x11fe ++#define PCI_DEVICE_ID_RP32INTF 0x0001 ++#define PCI_DEVICE_ID_RP8INTF 0x0002 ++#define PCI_DEVICE_ID_RP16INTF 0x0003 ++#define PCI_DEVICE_ID_RP4QUAD 0x0004 ++#define PCI_DEVICE_ID_RP8OCTA 0x0005 ++#define PCI_DEVICE_ID_RP8J 0x0006 ++#define PCI_DEVICE_ID_RPP4 0x000A ++#define PCI_DEVICE_ID_RPP8 0x000B ++#define PCI_DEVICE_ID_RP8M 0x000C ++ ++#define PCI_VENDOR_ID_CYCLADES 0x120e ++#define PCI_DEVICE_ID_CYCLOM_Y_Lo 0x0100 ++#define PCI_DEVICE_ID_CYCLOM_Y_Hi 0x0101 ++#define PCI_DEVICE_ID_CYCLOM_4Y_Lo 0x0102 ++#define PCI_DEVICE_ID_CYCLOM_4Y_Hi 0x0103 ++#define PCI_DEVICE_ID_CYCLOM_8Y_Lo 0x0104 ++#define PCI_DEVICE_ID_CYCLOM_8Y_Hi 0x0105 ++#define PCI_DEVICE_ID_CYCLOM_Z_Lo 0x0200 ++#define PCI_DEVICE_ID_CYCLOM_Z_Hi 0x0201 ++#define PCI_DEVICE_ID_PC300_RX_2 0x0300 ++#define PCI_DEVICE_ID_PC300_RX_1 0x0301 ++#define PCI_DEVICE_ID_PC300_TE_2 0x0310 ++#define PCI_DEVICE_ID_PC300_TE_1 0x0311 ++ ++#define PCI_VENDOR_ID_ESSENTIAL 0x120f ++#define PCI_DEVICE_ID_ESSENTIAL_ROADRUNNER 0x0001 ++ ++#define PCI_VENDOR_ID_O2 0x1217 ++#define PCI_DEVICE_ID_O2_6729 0x6729 ++#define PCI_DEVICE_ID_O2_6730 0x673a ++#define PCI_DEVICE_ID_O2_6832 0x6832 ++#define PCI_DEVICE_ID_O2_6836 0x6836 ++ ++#define PCI_VENDOR_ID_3DFX 0x121a ++#define PCI_DEVICE_ID_3DFX_VOODOO 0x0001 ++#define PCI_DEVICE_ID_3DFX_VOODOO2 0x0002 ++#define PCI_DEVICE_ID_3DFX_BANSHEE 0x0003 ++#define PCI_DEVICE_ID_3DFX_VOODOO3 0x0005 ++ ++#define PCI_VENDOR_ID_SIGMADES 0x1236 ++#define PCI_DEVICE_ID_SIGMADES_6425 0x6401 ++ ++#define PCI_VENDOR_ID_CCUBE 0x123f ++ ++#define PCI_VENDOR_ID_AVM 0x1244 ++#define PCI_DEVICE_ID_AVM_B1 0x0700 ++#define PCI_DEVICE_ID_AVM_C4 0x0800 ++#define PCI_DEVICE_ID_AVM_A1 0x0a00 ++#define PCI_DEVICE_ID_AVM_A1_V2 0x0e00 ++#define PCI_DEVICE_ID_AVM_C2 0x1100 ++#define PCI_DEVICE_ID_AVM_T1 0x1200 ++ ++#define PCI_VENDOR_ID_DIPIX 0x1246 ++ ++#define PCI_VENDOR_ID_STALLION 0x124d ++#define PCI_DEVICE_ID_STALLION_ECHPCI832 0x0000 ++#define PCI_DEVICE_ID_STALLION_ECHPCI864 0x0002 ++#define PCI_DEVICE_ID_STALLION_EIOPCI 0x0003 ++ ++#define PCI_VENDOR_ID_OPTIBASE 0x1255 ++#define PCI_DEVICE_ID_OPTIBASE_FORGE 0x1110 ++#define PCI_DEVICE_ID_OPTIBASE_FUSION 0x1210 ++#define PCI_DEVICE_ID_OPTIBASE_VPLEX 0x2110 ++#define PCI_DEVICE_ID_OPTIBASE_VPLEXCC 0x2120 ++#define PCI_DEVICE_ID_OPTIBASE_VQUEST 0x2130 ++ ++#define PCI_VENDOR_ID_ESS 0x125d ++#define PCI_DEVICE_ID_ESS_ESS1968 0x1968 ++#define PCI_DEVICE_ID_ESS_AUDIOPCI 0x1969 ++#define PCI_DEVICE_ID_ESS_ESS1978 0x1978 ++ ++#define PCI_VENDOR_ID_HARRIS 0x1260 ++#define PCI_DEVICE_ID_HARRIS_PRISM2 0x3873 ++ ++#define PCI_VENDOR_ID_SATSAGEM 0x1267 ++#define PCI_DEVICE_ID_SATSAGEM_NICCY 0x1016 ++#define PCI_DEVICE_ID_SATSAGEM_PCR2101 0x5352 ++#define PCI_DEVICE_ID_SATSAGEM_TELSATTURBO 0x5a4b ++ ++#define PCI_VENDOR_ID_HUGHES 0x1273 ++#define PCI_DEVICE_ID_HUGHES_DIRECPC 0x0002 ++ ++#define PCI_VENDOR_ID_ENSONIQ 0x1274 ++#define PCI_DEVICE_ID_ENSONIQ_CT5880 0x5880 ++#define PCI_DEVICE_ID_ENSONIQ_ES1370 0x5000 ++#define PCI_DEVICE_ID_ENSONIQ_ES1371 0x1371 ++ ++#define PCI_VENDOR_ID_ROCKWELL 0x127A ++ ++#define PCI_VENDOR_ID_DAVICOM 0x1282 ++#define PCI_DEVICE_ID_DM9009 0x9009 ++#define PCI_DEVICE_ID_DM9102 0x9102 ++ ++#define PCI_VENDOR_ID_ITE 0x1283 ++#define PCI_DEVICE_ID_ITE_IT8172G_AUDIO 0x0801 ++#define PCI_DEVICE_ID_ITE_IT8172G 0x8172 ++#define PCI_DEVICE_ID_ITE_8872 0x8872 ++ ++ ++/* formerly Platform Tech */ ++#define PCI_VENDOR_ID_ESS_OLD 0x1285 ++#define PCI_DEVICE_ID_ESS_ESS0100 0x0100 ++ ++#define PCI_VENDOR_ID_ALTEON 0x12ae ++#define PCI_DEVICE_ID_ALTEON_ACENIC 0x0001 ++ ++#define PCI_VENDOR_ID_USR 0x12B9 ++ ++#define PCI_VENDOR_ID_HOLTEK 0x12c3 ++#define PCI_DEVICE_ID_HOLTEK_HT80232 0x0058 ++ ++#define PCI_SUBVENDOR_ID_CONNECT_TECH 0x12c4 ++#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232 0x0001 ++#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232 0x0002 ++#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_232 0x0003 ++#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485 0x0004 ++#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_4_4 0x0005 ++#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485 0x0006 ++#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485_2_2 0x0007 ++#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_485 0x0008 ++#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_2_6 0x0009 ++#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH081101V1 0x000A ++#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH041101V1 0x000B ++ ++#define PCI_VENDOR_ID_PICTUREL 0x12c5 ++#define PCI_DEVICE_ID_PICTUREL_PCIVST 0x0081 ++ ++#define PCI_VENDOR_ID_NVIDIA_SGS 0x12d2 ++#define PCI_DEVICE_ID_NVIDIA_SGS_RIVA128 0x0018 ++ ++#define PCI_SUBVENDOR_ID_CHASE_PCIFAST 0x12E0 ++#define PCI_SUBDEVICE_ID_CHASE_PCIFAST4 0x0031 ++#define PCI_SUBDEVICE_ID_CHASE_PCIFAST8 0x0021 ++#define PCI_SUBDEVICE_ID_CHASE_PCIFAST16 0x0011 ++#define PCI_SUBDEVICE_ID_CHASE_PCIFAST16FMC 0x0041 ++#define PCI_SUBVENDOR_ID_CHASE_PCIRAS 0x124D ++#define PCI_SUBDEVICE_ID_CHASE_PCIRAS4 0xF001 ++#define PCI_SUBDEVICE_ID_CHASE_PCIRAS8 0xF010 ++ ++#define PCI_VENDOR_ID_AUREAL 0x12eb ++#define PCI_DEVICE_ID_AUREAL_VORTEX_1 0x0001 ++#define PCI_DEVICE_ID_AUREAL_VORTEX_2 0x0002 ++ ++#define PCI_VENDOR_ID_CBOARDS 0x1307 ++#define PCI_DEVICE_ID_CBOARDS_DAS1602_16 0x0001 ++ ++#define PCI_VENDOR_ID_SIIG 0x131f ++#define PCI_DEVICE_ID_SIIG_1S_10x_550 0x1000 ++#define PCI_DEVICE_ID_SIIG_1S_10x_650 0x1001 ++#define PCI_DEVICE_ID_SIIG_1S_10x_850 0x1002 ++#define PCI_DEVICE_ID_SIIG_1S1P_10x_550 0x1010 ++#define PCI_DEVICE_ID_SIIG_1S1P_10x_650 0x1011 ++#define PCI_DEVICE_ID_SIIG_1S1P_10x_850 0x1012 ++#define PCI_DEVICE_ID_SIIG_1P_10x 0x1020 ++#define PCI_DEVICE_ID_SIIG_2P_10x 0x1021 ++#define PCI_DEVICE_ID_SIIG_2S_10x_550 0x1030 ++#define PCI_DEVICE_ID_SIIG_2S_10x_650 0x1031 ++#define PCI_DEVICE_ID_SIIG_2S_10x_850 0x1032 ++#define PCI_DEVICE_ID_SIIG_2S1P_10x_550 0x1034 ++#define PCI_DEVICE_ID_SIIG_2S1P_10x_650 0x1035 ++#define PCI_DEVICE_ID_SIIG_2S1P_10x_850 0x1036 ++#define PCI_DEVICE_ID_SIIG_4S_10x_550 0x1050 ++#define PCI_DEVICE_ID_SIIG_4S_10x_650 0x1051 ++#define PCI_DEVICE_ID_SIIG_4S_10x_850 0x1052 ++#define PCI_DEVICE_ID_SIIG_1S_20x_550 0x2000 ++#define PCI_DEVICE_ID_SIIG_1S_20x_650 0x2001 ++#define PCI_DEVICE_ID_SIIG_1S_20x_850 0x2002 ++#define PCI_DEVICE_ID_SIIG_1P_20x 0x2020 ++#define PCI_DEVICE_ID_SIIG_2P_20x 0x2021 ++#define PCI_DEVICE_ID_SIIG_2S_20x_550 0x2030 ++#define PCI_DEVICE_ID_SIIG_2S_20x_650 0x2031 ++#define PCI_DEVICE_ID_SIIG_2S_20x_850 0x2032 ++#define PCI_DEVICE_ID_SIIG_2P1S_20x_550 0x2040 ++#define PCI_DEVICE_ID_SIIG_2P1S_20x_650 0x2041 ++#define PCI_DEVICE_ID_SIIG_2P1S_20x_850 0x2042 ++#define PCI_DEVICE_ID_SIIG_1S1P_20x_550 0x2010 ++#define PCI_DEVICE_ID_SIIG_1S1P_20x_650 0x2011 ++#define PCI_DEVICE_ID_SIIG_1S1P_20x_850 0x2012 ++#define PCI_DEVICE_ID_SIIG_4S_20x_550 0x2050 ++#define PCI_DEVICE_ID_SIIG_4S_20x_650 0x2051 ++#define PCI_DEVICE_ID_SIIG_4S_20x_850 0x2052 ++#define PCI_DEVICE_ID_SIIG_2S1P_20x_550 0x2060 ++#define PCI_DEVICE_ID_SIIG_2S1P_20x_650 0x2061 ++#define PCI_DEVICE_ID_SIIG_2S1P_20x_850 0x2062 ++ ++#define PCI_VENDOR_ID_ADMTEK 0x1317 ++#define PCI_DEVICE_ID_ADMTEK_0985 0x0985 ++ ++#define PCI_VENDOR_ID_DOMEX 0x134a ++#define PCI_DEVICE_ID_DOMEX_DMX3191D 0x0001 ++ ++#define PCI_VENDOR_ID_QUATECH 0x135C ++#define PCI_DEVICE_ID_QUATECH_QSC100 0x0010 ++#define PCI_DEVICE_ID_QUATECH_DSC100 0x0020 ++#define PCI_DEVICE_ID_QUATECH_DSC200 0x0030 ++#define PCI_DEVICE_ID_QUATECH_QSC200 0x0040 ++#define PCI_DEVICE_ID_QUATECH_ESC100D 0x0050 ++#define PCI_DEVICE_ID_QUATECH_ESC100M 0x0060 ++ ++#define PCI_VENDOR_ID_SEALEVEL 0x135e ++#define PCI_DEVICE_ID_SEALEVEL_U530 0x7101 ++#define PCI_DEVICE_ID_SEALEVEL_UCOMM2 0x7201 ++#define PCI_DEVICE_ID_SEALEVEL_UCOMM422 0x7402 ++#define PCI_DEVICE_ID_SEALEVEL_UCOMM232 0x7202 ++#define PCI_DEVICE_ID_SEALEVEL_COMM4 0x7401 ++#define PCI_DEVICE_ID_SEALEVEL_COMM8 0x7801 ++ ++#define PCI_VENDOR_ID_HYPERCOPE 0x1365 ++#define PCI_DEVICE_ID_HYPERCOPE_PLX 0x9050 ++#define PCI_SUBDEVICE_ID_HYPERCOPE_OLD_ERGO 0x0104 ++#define PCI_SUBDEVICE_ID_HYPERCOPE_ERGO 0x0106 ++#define PCI_SUBDEVICE_ID_HYPERCOPE_METRO 0x0107 ++#define PCI_SUBDEVICE_ID_HYPERCOPE_CHAMP2 0x0108 ++#define PCI_SUBDEVICE_ID_HYPERCOPE_PLEXUS 0x0109 ++ ++#define PCI_VENDOR_ID_KAWASAKI 0x136b ++#define PCI_DEVICE_ID_MCHIP_KL5A72002 0xff01 ++ ++#define PCI_VENDOR_ID_LMC 0x1376 ++#define PCI_DEVICE_ID_LMC_HSSI 0x0003 ++#define PCI_DEVICE_ID_LMC_DS3 0x0004 ++#define PCI_DEVICE_ID_LMC_SSI 0x0005 ++#define PCI_DEVICE_ID_LMC_T1 0x0006 ++ ++#define PCI_VENDOR_ID_NETGEAR 0x1385 ++#define PCI_DEVICE_ID_NETGEAR_MA301 0x4100 ++#define PCI_DEVICE_ID_NETGEAR_GA620 0x620a ++#define PCI_DEVICE_ID_NETGEAR_GA622 0x622a ++ ++#define PCI_VENDOR_ID_APPLICOM 0x1389 ++#define PCI_DEVICE_ID_APPLICOM_PCIGENERIC 0x0001 ++#define PCI_DEVICE_ID_APPLICOM_PCI2000IBS_CAN 0x0002 ++#define PCI_DEVICE_ID_APPLICOM_PCI2000PFB 0x0003 ++ ++#define PCI_VENDOR_ID_MOXA 0x1393 ++#define PCI_DEVICE_ID_MOXA_C104 0x1040 ++#define PCI_DEVICE_ID_MOXA_C168 0x1680 ++#define PCI_DEVICE_ID_MOXA_CP204J 0x2040 ++#define PCI_DEVICE_ID_MOXA_C218 0x2180 ++#define PCI_DEVICE_ID_MOXA_C320 0x3200 ++ ++#define PCI_VENDOR_ID_CCD 0x1397 ++#define PCI_DEVICE_ID_CCD_2BD0 0x2bd0 ++#define PCI_DEVICE_ID_CCD_B000 0xb000 ++#define PCI_DEVICE_ID_CCD_B006 0xb006 ++#define PCI_DEVICE_ID_CCD_B007 0xb007 ++#define PCI_DEVICE_ID_CCD_B008 0xb008 ++#define PCI_DEVICE_ID_CCD_B009 0xb009 ++#define PCI_DEVICE_ID_CCD_B00A 0xb00a ++#define PCI_DEVICE_ID_CCD_B00B 0xb00b ++#define PCI_DEVICE_ID_CCD_B00C 0xb00c ++#define PCI_DEVICE_ID_CCD_B100 0xb100 ++ ++#define PCI_VENDOR_ID_MICROGATE 0x13c0 ++#define PCI_DEVICE_ID_MICROGATE_USC 0x0010 ++#define PCI_DEVICE_ID_MICROGATE_SCC 0x0020 ++#define PCI_DEVICE_ID_MICROGATE_SCA 0x0030 ++ ++#define PCI_VENDOR_ID_3WARE 0x13C1 ++#define PCI_DEVICE_ID_3WARE_1000 0x1000 ++ ++#define PCI_VENDOR_ID_ABOCOM 0x13D1 ++#define PCI_DEVICE_ID_ABOCOM_2BD1 0x2BD1 ++ ++#define PCI_VENDOR_ID_CMEDIA 0x13f6 ++#define PCI_DEVICE_ID_CMEDIA_CM8338A 0x0100 ++#define PCI_DEVICE_ID_CMEDIA_CM8338B 0x0101 ++#define PCI_DEVICE_ID_CMEDIA_CM8738 0x0111 ++#define PCI_DEVICE_ID_CMEDIA_CM8738B 0x0112 ++ ++#define PCI_VENDOR_ID_LAVA 0x1407 ++#define PCI_DEVICE_ID_LAVA_DSERIAL 0x0100 /* 2x 16550 */ ++#define PCI_DEVICE_ID_LAVA_QUATRO_A 0x0101 /* 2x 16550, half of 4 port */ ++#define PCI_DEVICE_ID_LAVA_QUATRO_B 0x0102 /* 2x 16550, half of 4 port */ ++#define PCI_DEVICE_ID_LAVA_PORT_PLUS 0x0200 /* 2x 16650 */ ++#define PCI_DEVICE_ID_LAVA_QUAD_A 0x0201 /* 2x 16650, half of 4 port */ ++#define PCI_DEVICE_ID_LAVA_QUAD_B 0x0202 /* 2x 16650, half of 4 port */ ++#define PCI_DEVICE_ID_LAVA_SSERIAL 0x0500 /* 1x 16550 */ ++#define PCI_DEVICE_ID_LAVA_PORT_650 0x0600 /* 1x 16650 */ ++#define PCI_DEVICE_ID_LAVA_PARALLEL 0x8000 ++#define PCI_DEVICE_ID_LAVA_DUAL_PAR_A 0x8002 /* The Lava Dual Parallel is */ ++#define PCI_DEVICE_ID_LAVA_DUAL_PAR_B 0x8003 /* two PCI devices on a card */ ++#define PCI_DEVICE_ID_LAVA_BOCA_IOPPAR 0x8800 ++ ++#define PCI_VENDOR_ID_TIMEDIA 0x1409 ++#define PCI_DEVICE_ID_TIMEDIA_1889 0x7168 ++ ++#define PCI_VENDOR_ID_OXSEMI 0x1415 ++#define PCI_DEVICE_ID_OXSEMI_12PCI840 0x8403 ++#define PCI_DEVICE_ID_OXSEMI_16PCI954 0x9501 ++#define PCI_DEVICE_ID_OXSEMI_16PCI952 0x950A ++#define PCI_DEVICE_ID_OXSEMI_16PCI95N 0x9511 ++#define PCI_DEVICE_ID_OXSEMI_16PCI954PP 0x9513 ++ ++#define PCI_VENDOR_ID_AIRONET 0x14b9 ++#define PCI_DEVICE_ID_AIRONET_4800_1 0x0001 ++#define PCI_DEVICE_ID_AIRONET_4800 0x4500 // values switched? see ++#define PCI_DEVICE_ID_AIRONET_4500 0x4800 // drivers/net/aironet4500_card.c ++ ++#define PCI_VENDOR_ID_TITAN 0x14D2 ++#define PCI_DEVICE_ID_TITAN_010L 0x8001 ++#define PCI_DEVICE_ID_TITAN_100L 0x8010 ++#define PCI_DEVICE_ID_TITAN_110L 0x8011 ++#define PCI_DEVICE_ID_TITAN_200L 0x8020 ++#define PCI_DEVICE_ID_TITAN_210L 0x8021 ++#define PCI_DEVICE_ID_TITAN_400L 0x8040 ++#define PCI_DEVICE_ID_TITAN_800L 0x8080 ++#define PCI_DEVICE_ID_TITAN_100 0xA001 ++#define PCI_DEVICE_ID_TITAN_200 0xA005 ++#define PCI_DEVICE_ID_TITAN_400 0xA003 ++#define PCI_DEVICE_ID_TITAN_800B 0xA004 ++ ++#define PCI_VENDOR_ID_PANACOM 0x14d4 ++#define PCI_DEVICE_ID_PANACOM_QUADMODEM 0x0400 ++#define PCI_DEVICE_ID_PANACOM_DUALMODEM 0x0402 ++ ++#define PCI_VENDOR_ID_BROADCOM 0x14e4 ++#define PCI_DEVICE_ID_TIGON3_5700 0x1644 ++#define PCI_DEVICE_ID_TIGON3_5701 0x1645 ++#define PCI_DEVICE_ID_TIGON3_5702 0x1646 ++#define PCI_DEVICE_ID_TIGON3_5703 0x1647 ++#define PCI_DEVICE_ID_TIGON3_5704 0x1648 ++#define PCI_DEVICE_ID_TIGON3_5702FE 0x164d ++#define PCI_DEVICE_ID_TIGON3_5705 0x1653 ++#define PCI_DEVICE_ID_TIGON3_5705_2 0x1654 ++#define PCI_DEVICE_ID_TIGON3_5705M 0x165d ++#define PCI_DEVICE_ID_TIGON3_5705M_2 0x165e ++#define PCI_DEVICE_ID_TIGON3_5782 0x1696 ++#define PCI_DEVICE_ID_TIGON3_5788 0x169c ++#define PCI_DEVICE_ID_TIGON3_5702X 0x16a6 ++#define PCI_DEVICE_ID_TIGON3_5703X 0x16a7 ++#define PCI_DEVICE_ID_TIGON3_5704S 0x16a8 ++#define PCI_DEVICE_ID_TIGON3_5702A3 0x16c6 ++#define PCI_DEVICE_ID_TIGON3_5703A3 0x16c7 ++#define PCI_DEVICE_ID_TIGON3_5901 0x170d ++#define PCI_DEVICE_ID_TIGON3_5901_2 0x170e ++ ++#define PCI_VENDOR_ID_SYBA 0x1592 ++#define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 ++#define PCI_DEVICE_ID_SYBA_1P_ECP 0x0783 ++ ++#define PCI_VENDOR_ID_MORETON 0x15aa ++#define PCI_DEVICE_ID_RASTEL_2PORT 0x2000 ++ ++#define PCI_VENDOR_ID_ZOLTRIX 0x15b0 ++#define PCI_DEVICE_ID_ZOLTRIX_2BD0 0x2bd0 ++ ++#define PCI_VENDOR_ID_PDC 0x15e9 ++#define PCI_DEVICE_ID_PDC_1841 0x1841 ++ ++#define PCI_VENDOR_ID_SYMPHONY 0x1c1c ++#define PCI_DEVICE_ID_SYMPHONY_101 0x0001 ++ ++#define PCI_VENDOR_ID_TEKRAM 0x1de1 ++#define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29 ++ ++#define PCI_VENDOR_ID_3DLABS 0x3d3d ++#define PCI_DEVICE_ID_3DLABS_300SX 0x0001 ++#define PCI_DEVICE_ID_3DLABS_500TX 0x0002 ++#define PCI_DEVICE_ID_3DLABS_DELTA 0x0003 ++#define PCI_DEVICE_ID_3DLABS_PERMEDIA 0x0004 ++#define PCI_DEVICE_ID_3DLABS_MX 0x0006 ++#define PCI_DEVICE_ID_3DLABS_PERMEDIA2 0x0007 ++#define PCI_DEVICE_ID_3DLABS_GAMMA 0x0008 ++#define PCI_DEVICE_ID_3DLABS_PERMEDIA2V 0x0009 ++ ++#define PCI_VENDOR_ID_AVANCE 0x4005 ++#define PCI_DEVICE_ID_AVANCE_ALG2064 0x2064 ++#define PCI_DEVICE_ID_AVANCE_2302 0x2302 ++ ++#define PCI_VENDOR_ID_AKS 0x416c ++#define PCI_DEVICE_ID_AKS_ALADDINCARD 0x0100 ++#define PCI_DEVICE_ID_AKS_CPC 0x0200 ++ ++#define PCI_VENDOR_ID_NETVIN 0x4a14 ++#define PCI_DEVICE_ID_NETVIN_NV5000SC 0x5000 ++ ++#define PCI_VENDOR_ID_S3 0x5333 ++#define PCI_DEVICE_ID_S3_PLATO_PXS 0x0551 ++#define PCI_DEVICE_ID_S3_ViRGE 0x5631 ++#define PCI_DEVICE_ID_S3_TRIO 0x8811 ++#define PCI_DEVICE_ID_S3_AURORA64VP 0x8812 ++#define PCI_DEVICE_ID_S3_TRIO64UVP 0x8814 ++#define PCI_DEVICE_ID_S3_ViRGE_VX 0x883d ++#define PCI_DEVICE_ID_S3_868 0x8880 ++#define PCI_DEVICE_ID_S3_928 0x88b0 ++#define PCI_DEVICE_ID_S3_864_1 0x88c0 ++#define PCI_DEVICE_ID_S3_864_2 0x88c1 ++#define PCI_DEVICE_ID_S3_964_1 0x88d0 ++#define PCI_DEVICE_ID_S3_964_2 0x88d1 ++#define PCI_DEVICE_ID_S3_968 0x88f0 ++#define PCI_DEVICE_ID_S3_TRIO64V2 0x8901 ++#define PCI_DEVICE_ID_S3_PLATO_PXG 0x8902 ++#define PCI_DEVICE_ID_S3_ViRGE_DXGX 0x8a01 ++#define PCI_DEVICE_ID_S3_ViRGE_GX2 0x8a10 ++#define PCI_DEVICE_ID_S3_ViRGE_MX 0x8c01 ++#define PCI_DEVICE_ID_S3_ViRGE_MXP 0x8c02 ++#define PCI_DEVICE_ID_S3_ViRGE_MXPMV 0x8c03 ++#define PCI_DEVICE_ID_S3_SONICVIBES 0xca00 ++ ++#define PCI_VENDOR_ID_DCI 0x6666 ++#define PCI_DEVICE_ID_DCI_PCCOM4 0x0001 ++#define PCI_DEVICE_ID_DCI_PCCOM8 0x0002 ++ ++#define PCI_VENDOR_ID_GENROCO 0x5555 ++#define PCI_DEVICE_ID_GENROCO_HFP832 0x0003 ++ ++#define PCI_VENDOR_ID_INTEL 0x8086 ++#define PCI_DEVICE_ID_INTEL_21145 0x0039 ++#define PCI_DEVICE_ID_INTEL_82375 0x0482 ++#define PCI_DEVICE_ID_INTEL_82424 0x0483 ++#define PCI_DEVICE_ID_INTEL_82378 0x0484 ++#define PCI_DEVICE_ID_INTEL_82430 0x0486 ++#define PCI_DEVICE_ID_INTEL_82434 0x04a3 ++#define PCI_DEVICE_ID_INTEL_I960 0x0960 ++#define PCI_DEVICE_ID_INTEL_82542 0x1000 ++#define PCI_DEVICE_ID_INTEL_82543GC_FIBER 0x1001 ++#define PCI_DEVICE_ID_INTEL_82543GC_COPPER 0x1004 ++#define PCI_DEVICE_ID_INTEL_82544EI_COPPER 0x1008 ++#define PCI_DEVICE_ID_INTEL_82544EI_FIBER 0x1009 ++#define PCI_DEVICE_ID_INTEL_82544GC_COPPER 0x100C ++#define PCI_DEVICE_ID_INTEL_82544GC_LOM 0x100D ++#define PCI_DEVICE_ID_INTEL_82540EM 0x100E ++#define PCI_DEVICE_ID_INTEL_82545EM_COPPER 0x100F ++#define PCI_DEVICE_ID_INTEL_82546EB_COPPER 0x1010 ++#define PCI_DEVICE_ID_INTEL_82545EM_FIBER 0x1011 ++#define PCI_DEVICE_ID_INTEL_82546EB_FIBER 0x1012 ++#define PCI_DEVICE_ID_INTEL_82540EM_LOM 0x1015 ++#define PCI_DEVICE_ID_INTEL_ID1029 0x1029 ++#define PCI_DEVICE_ID_INTEL_ID1030 0x1030 ++#define PCI_DEVICE_ID_INTEL_ID1031 0x1031 ++#define PCI_DEVICE_ID_INTEL_ID1038 0x1038 ++#define PCI_DEVICE_ID_INTEL_ID1039 0x1039 ++#define PCI_DEVICE_ID_INTEL_ID103A 0x103A ++#define PCI_DEVICE_ID_INTEL_82562ET 0x1031 ++#define PCI_DEVICE_ID_INTEL_82559ER 0x1209 ++#define PCI_DEVICE_ID_INTEL_82092AA_0 0x1221 ++#define PCI_DEVICE_ID_INTEL_82092AA_1 0x1222 ++#define PCI_DEVICE_ID_INTEL_7116 0x1223 ++#define PCI_DEVICE_ID_INTEL_82596 0x1226 ++#define PCI_DEVICE_ID_INTEL_82865 0x1227 ++#define PCI_DEVICE_ID_INTEL_82557 0x1229 ++#define PCI_DEVICE_ID_INTEL_82437 0x122d ++#define PCI_DEVICE_ID_INTEL_82371FB_0 0x122e ++#define PCI_DEVICE_ID_INTEL_82371FB_1 0x1230 ++#define PCI_DEVICE_ID_INTEL_82371MX 0x1234 ++#define PCI_DEVICE_ID_INTEL_82437MX 0x1235 ++#define PCI_DEVICE_ID_INTEL_82441 0x1237 ++#define PCI_DEVICE_ID_INTEL_82380FB 0x124b ++#define PCI_DEVICE_ID_INTEL_82439 0x1250 ++#define PCI_DEVICE_ID_INTEL_80960_RP 0x1960 ++#define PCI_DEVICE_ID_INTEL_82801AA_0 0x2410 ++#define PCI_DEVICE_ID_INTEL_82801AA_1 0x2411 ++#define PCI_DEVICE_ID_INTEL_82801AA_2 0x2412 ++#define PCI_DEVICE_ID_INTEL_82801AA_3 0x2413 ++#define PCI_DEVICE_ID_INTEL_82801AA_5 0x2415 ++#define PCI_DEVICE_ID_INTEL_82801AA_6 0x2416 ++#define PCI_DEVICE_ID_INTEL_82801AA_8 0x2418 ++#define PCI_DEVICE_ID_INTEL_82801AB_0 0x2420 ++#define PCI_DEVICE_ID_INTEL_82801AB_1 0x2421 ++#define PCI_DEVICE_ID_INTEL_82801AB_2 0x2422 ++#define PCI_DEVICE_ID_INTEL_82801AB_3 0x2423 ++#define PCI_DEVICE_ID_INTEL_82801AB_5 0x2425 ++#define PCI_DEVICE_ID_INTEL_82801AB_6 0x2426 ++#define PCI_DEVICE_ID_INTEL_82801AB_8 0x2428 ++#define PCI_DEVICE_ID_INTEL_82801BA_0 0x2440 ++#define PCI_DEVICE_ID_INTEL_82801BA_1 0x2442 ++#define PCI_DEVICE_ID_INTEL_82801BA_2 0x2443 ++#define PCI_DEVICE_ID_INTEL_82801BA_3 0x2444 ++#define PCI_DEVICE_ID_INTEL_82801BA_4 0x2445 ++#define PCI_DEVICE_ID_INTEL_82801BA_5 0x2446 ++#define PCI_DEVICE_ID_INTEL_82801BA_6 0x2448 ++#define PCI_DEVICE_ID_INTEL_82801BA_7 0x2449 ++#define PCI_DEVICE_ID_INTEL_82562 0x2449 ++#define PCI_DEVICE_ID_INTEL_82801BA_8 0x244a ++#define PCI_DEVICE_ID_INTEL_82801BA_9 0x244b ++#define PCI_DEVICE_ID_INTEL_82801BA_10 0x244c ++#define PCI_DEVICE_ID_INTEL_82801BA_11 0x244e ++#define PCI_DEVICE_ID_INTEL_82801CA_0 0x2480 ++#define PCI_DEVICE_ID_INTEL_82801CA_2 0x2482 ++#define PCI_DEVICE_ID_INTEL_82801CA_3 0x2483 ++#define PCI_DEVICE_ID_INTEL_82801CA_4 0x2484 ++#define PCI_DEVICE_ID_INTEL_82801CA_5 0x2485 ++#define PCI_DEVICE_ID_INTEL_82801CA_6 0x2486 ++#define PCI_DEVICE_ID_INTEL_82801CA_7 0x2487 ++#define PCI_DEVICE_ID_INTEL_82801CA_10 0x248a ++#define PCI_DEVICE_ID_INTEL_82801CA_11 0x248b ++#define PCI_DEVICE_ID_INTEL_82801CA_12 0x248c ++#define PCI_DEVICE_ID_INTEL_80310 0x530d ++#define PCI_DEVICE_ID_INTEL_82371SB_0 0x7000 ++#define PCI_DEVICE_ID_INTEL_82371SB_1 0x7010 ++#define PCI_DEVICE_ID_INTEL_82371SB_2 0x7020 ++#define PCI_DEVICE_ID_INTEL_82437VX 0x7030 ++#define PCI_DEVICE_ID_INTEL_82439TX 0x7100 ++#define PCI_DEVICE_ID_INTEL_82371AB_0 0x7110 ++#define PCI_DEVICE_ID_INTEL_82371AB 0x7111 ++#define PCI_DEVICE_ID_INTEL_82371AB_2 0x7112 ++#define PCI_DEVICE_ID_INTEL_82371AB_3 0x7113 ++#define PCI_DEVICE_ID_INTEL_82810_MC1 0x7120 ++#define PCI_DEVICE_ID_INTEL_82810_IG1 0x7121 ++#define PCI_DEVICE_ID_INTEL_82810_MC3 0x7122 ++#define PCI_DEVICE_ID_INTEL_82810_IG3 0x7123 ++#define PCI_DEVICE_ID_INTEL_82443LX_0 0x7180 ++#define PCI_DEVICE_ID_INTEL_82443LX_1 0x7181 ++#define PCI_DEVICE_ID_INTEL_82443BX_0 0x7190 ++#define PCI_DEVICE_ID_INTEL_82443BX_1 0x7191 ++#define PCI_DEVICE_ID_INTEL_82443BX_2 0x7192 ++#define PCI_DEVICE_ID_INTEL_82443MX_0 0x7198 ++#define PCI_DEVICE_ID_INTEL_82443MX_1 0x7199 ++#define PCI_DEVICE_ID_INTEL_82443MX_2 0x719a ++#define PCI_DEVICE_ID_INTEL_82443MX_3 0x719b ++#define PCI_DEVICE_ID_INTEL_82372FB_0 0x7600 ++#define PCI_DEVICE_ID_INTEL_82372FB_1 0x7601 ++#define PCI_DEVICE_ID_INTEL_82372FB_2 0x7602 ++#define PCI_DEVICE_ID_INTEL_82372FB_3 0x7603 ++#define PCI_DEVICE_ID_INTEL_82454GX 0x84c4 ++#define PCI_DEVICE_ID_INTEL_82450GX 0x84c5 ++#define PCI_DEVICE_ID_INTEL_82451NX 0x84ca ++ ++#define PCI_VENDOR_ID_COMPUTONE 0x8e0e ++#define PCI_DEVICE_ID_COMPUTONE_IP2EX 0x0291 ++#define PCI_DEVICE_ID_COMPUTONE_PG 0x0302 ++#define PCI_SUBVENDOR_ID_COMPUTONE 0x8e0e ++#define PCI_SUBDEVICE_ID_COMPUTONE_PG4 0x0001 ++#define PCI_SUBDEVICE_ID_COMPUTONE_PG8 0x0002 ++#define PCI_SUBDEVICE_ID_COMPUTONE_PG6 0x0003 ++ ++#define PCI_VENDOR_ID_KTI 0x8e2e ++#define PCI_DEVICE_ID_KTI_ET32P2 0x3000 ++ ++#define PCI_VENDOR_ID_ADAPTEC 0x9004 ++#define PCI_DEVICE_ID_ADAPTEC_7810 0x1078 ++#define PCI_DEVICE_ID_ADAPTEC_7821 0x2178 ++#define PCI_DEVICE_ID_ADAPTEC_38602 0x3860 ++#define PCI_DEVICE_ID_ADAPTEC_7850 0x5078 ++#define PCI_DEVICE_ID_ADAPTEC_7855 0x5578 ++#define PCI_DEVICE_ID_ADAPTEC_5800 0x5800 ++#define PCI_DEVICE_ID_ADAPTEC_3860 0x6038 ++#define PCI_DEVICE_ID_ADAPTEC_1480A 0x6075 ++#define PCI_DEVICE_ID_ADAPTEC_7860 0x6078 ++#define PCI_DEVICE_ID_ADAPTEC_7861 0x6178 ++#define PCI_DEVICE_ID_ADAPTEC_7870 0x7078 ++#define PCI_DEVICE_ID_ADAPTEC_7871 0x7178 ++#define PCI_DEVICE_ID_ADAPTEC_7872 0x7278 ++#define PCI_DEVICE_ID_ADAPTEC_7873 0x7378 ++#define PCI_DEVICE_ID_ADAPTEC_7874 0x7478 ++#define PCI_DEVICE_ID_ADAPTEC_7895 0x7895 ++#define PCI_DEVICE_ID_ADAPTEC_7880 0x8078 ++#define PCI_DEVICE_ID_ADAPTEC_7881 0x8178 ++#define PCI_DEVICE_ID_ADAPTEC_7882 0x8278 ++#define PCI_DEVICE_ID_ADAPTEC_7883 0x8378 ++#define PCI_DEVICE_ID_ADAPTEC_7884 0x8478 ++#define PCI_DEVICE_ID_ADAPTEC_7885 0x8578 ++#define PCI_DEVICE_ID_ADAPTEC_7886 0x8678 ++#define PCI_DEVICE_ID_ADAPTEC_7887 0x8778 ++#define PCI_DEVICE_ID_ADAPTEC_7888 0x8878 ++#define PCI_DEVICE_ID_ADAPTEC_1030 0x8b78 ++ ++#define PCI_VENDOR_ID_ADAPTEC2 0x9005 ++#define PCI_DEVICE_ID_ADAPTEC2_2940U2 0x0010 ++#define PCI_DEVICE_ID_ADAPTEC2_2930U2 0x0011 ++#define PCI_DEVICE_ID_ADAPTEC2_7890B 0x0013 ++#define PCI_DEVICE_ID_ADAPTEC2_7890 0x001f ++#define PCI_DEVICE_ID_ADAPTEC2_3940U2 0x0050 ++#define PCI_DEVICE_ID_ADAPTEC2_3950U2D 0x0051 ++#define PCI_DEVICE_ID_ADAPTEC2_7896 0x005f ++#define PCI_DEVICE_ID_ADAPTEC2_7892A 0x0080 ++#define PCI_DEVICE_ID_ADAPTEC2_7892B 0x0081 ++#define PCI_DEVICE_ID_ADAPTEC2_7892D 0x0083 ++#define PCI_DEVICE_ID_ADAPTEC2_7892P 0x008f ++#define PCI_DEVICE_ID_ADAPTEC2_7899A 0x00c0 ++#define PCI_DEVICE_ID_ADAPTEC2_7899B 0x00c1 ++#define PCI_DEVICE_ID_ADAPTEC2_7899D 0x00c3 ++#define PCI_DEVICE_ID_ADAPTEC2_7899P 0x00cf ++ ++#define PCI_VENDOR_ID_ATRONICS 0x907f ++#define PCI_DEVICE_ID_ATRONICS_2015 0x2015 ++ ++#define PCI_VENDOR_ID_HOLTEK2 0x9412 ++#define PCI_DEVICE_ID_HOLTEK2_6565 0x6565 ++ ++#define PCI_VENDOR_ID_NETMOS 0x9710 ++#define PCI_DEVICE_ID_NETMOS_9735 0x9735 ++#define PCI_DEVICE_ID_NETMOS_9835 0x9835 ++ ++#define PCI_SUBVENDOR_ID_EXSYS 0xd84d ++#define PCI_SUBDEVICE_ID_EXSYS_4014 0x4014 ++ ++#define PCI_VENDOR_ID_TIGERJET 0xe159 ++#define PCI_DEVICE_ID_TIGERJET_300 0x0001 ++#define PCI_DEVICE_ID_TIGERJET_100 0x0002 ++ ++#define PCI_VENDOR_ID_ARK 0xedd8 ++#define PCI_DEVICE_ID_ARK_STING 0xa091 ++#define PCI_DEVICE_ID_ARK_STINGARK 0xa099 ++#define PCI_DEVICE_ID_ARK_2000MT 0xa0a1 ++ +diff -Naur grub-0.97.orig/netboot/pci_io.c grub-0.97/netboot/pci_io.c +--- grub-0.97.orig/netboot/pci_io.c 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/pci_io.c 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,431 @@ ++/* ++** Support for NE2000 PCI clones added David Monro June 1997 ++** Generalised to other NICs by Ken Yap July 1997 ++** ++** Most of this is taken from: ++** ++** /usr/src/linux/drivers/pci/pci.c ++** /usr/src/linux/include/linux/pci.h ++** /usr/src/linux/arch/i386/bios32.c ++** /usr/src/linux/include/linux/bios32.h ++** /usr/src/linux/drivers/net/ne.c ++*/ ++#define PCBIOS ++#include "grub.h" ++#include "pci.h" ++ ++#ifdef CONFIG_PCI_DIRECT ++#define PCIBIOS_SUCCESSFUL 0x00 ++ ++#define DEBUG 0 ++ ++/* ++ * Functions for accessing PCI configuration space with type 1 accesses ++ */ ++ ++#define CONFIG_CMD(bus, device_fn, where) (0x80000000 | (bus << 16) | (device_fn << 8) | (where & ~3)) ++ ++int pcibios_read_config_byte(unsigned int bus, unsigned int device_fn, ++ unsigned int where, uint8_t *value) ++{ ++ outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); ++ *value = inb(0xCFC + (where&3)); ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++int pcibios_read_config_word (unsigned int bus, ++ unsigned int device_fn, unsigned int where, uint16_t *value) ++{ ++ outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); ++ *value = inw(0xCFC + (where&2)); ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++int pcibios_read_config_dword (unsigned int bus, unsigned int device_fn, ++ unsigned int where, uint32_t *value) ++{ ++ outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); ++ *value = inl(0xCFC); ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++int pcibios_write_config_byte (unsigned int bus, unsigned int device_fn, ++ unsigned int where, uint8_t value) ++{ ++ outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); ++ outb(value, 0xCFC + (where&3)); ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++int pcibios_write_config_word (unsigned int bus, unsigned int device_fn, ++ unsigned int where, uint16_t value) ++{ ++ outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); ++ outw(value, 0xCFC + (where&2)); ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++int pcibios_write_config_dword (unsigned int bus, unsigned int device_fn, unsigned int where, uint32_t value) ++{ ++ outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); ++ outl(value, 0xCFC); ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++#undef CONFIG_CMD ++ ++#else /* CONFIG_PCI_DIRECT not defined */ ++ ++#if !defined(PCBIOS) ++#error "The pcibios can only be used when the PCBIOS support is compiled in" ++#endif ++ ++ ++#define KERN_CODE_SEG 0X8 ++/* Stuff for asm */ ++#define save_flags(x) \ ++__asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */ :"memory") ++ ++#define cli() __asm__ __volatile__ ("cli": : :"memory") ++ ++#define restore_flags(x) \ ++__asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory") ++ ++ ++ ++static struct { ++ unsigned long address; ++ unsigned short segment; ++} bios32_indirect = { 0, KERN_CODE_SEG }; ++ ++static long pcibios_entry = 0; ++static struct { ++ unsigned long address; ++ unsigned short segment; ++} pci_indirect = { 0, KERN_CODE_SEG }; ++ ++static unsigned long bios32_service(unsigned long service) ++{ ++ unsigned char return_code; /* %al */ ++ unsigned long address; /* %ebx */ ++ unsigned long length; /* %ecx */ ++ unsigned long entry; /* %edx */ ++ unsigned long flags; ++ ++ save_flags(flags); ++ __asm__( ++#ifdef ABSOLUTE_WITHOUT_ASTERISK ++ "lcall (%%edi)" ++#else ++ "lcall *(%%edi)" ++#endif ++ : "=a" (return_code), ++ "=b" (address), ++ "=c" (length), ++ "=d" (entry) ++ : "0" (service), ++ "1" (0), ++ "D" (&bios32_indirect)); ++ restore_flags(flags); ++ ++ switch (return_code) { ++ case 0: ++ return address + entry; ++ case 0x80: /* Not present */ ++ printf("bios32_service(%d) : not present\n", service); ++ return 0; ++ default: /* Shouldn't happen */ ++ printf("bios32_service(%d) : returned %#X, mail drew@colorado.edu\n", ++ service, return_code); ++ return 0; ++ } ++} ++ ++int pcibios_read_config_byte(unsigned int bus, ++ unsigned int device_fn, unsigned int where, uint8_t *value) ++{ ++ unsigned long ret; ++ unsigned long bx = (bus << 8) | device_fn; ++ unsigned long flags; ++ ++ save_flags(flags); ++ __asm__( ++#ifdef ABSOLUTE_WITHOUT_ASTERISK ++ "lcall (%%esi)\n\t" ++#else ++ "lcall *(%%esi)\n\t" ++#endif ++ "jc 1f\n\t" ++ "xor %%ah, %%ah\n" ++ "1:" ++ : "=c" (*value), ++ "=a" (ret) ++ : "1" (PCIBIOS_READ_CONFIG_BYTE), ++ "b" (bx), ++ "D" ((long) where), ++ "S" (&pci_indirect)); ++ restore_flags(flags); ++ return (int) (ret & 0xff00) >> 8; ++} ++ ++int pcibios_read_config_word(unsigned int bus, ++ unsigned int device_fn, unsigned int where, uint16_t *value) ++{ ++ unsigned long ret; ++ unsigned long bx = (bus << 8) | device_fn; ++ unsigned long flags; ++ ++ save_flags(flags); ++ __asm__( ++#ifdef ABSOLUTE_WITHOUT_ASTERISK ++ "lcall (%%esi)\n\t" ++#else ++ "lcall *(%%esi)\n\t" ++#endif ++ "jc 1f\n\t" ++ "xor %%ah, %%ah\n" ++ "1:" ++ : "=c" (*value), ++ "=a" (ret) ++ : "1" (PCIBIOS_READ_CONFIG_WORD), ++ "b" (bx), ++ "D" ((long) where), ++ "S" (&pci_indirect)); ++ restore_flags(flags); ++ return (int) (ret & 0xff00) >> 8; ++} ++ ++int pcibios_read_config_dword(unsigned int bus, ++ unsigned int device_fn, unsigned int where, uint32_t *value) ++{ ++ unsigned long ret; ++ unsigned long bx = (bus << 8) | device_fn; ++ unsigned long flags; ++ ++ save_flags(flags); ++ __asm__( ++#ifdef ABSOLUTE_WITHOUT_ASTERISK ++ "lcall (%%esi)\n\t" ++#else ++ "lcall *(%%esi)\n\t" ++#endif ++ "jc 1f\n\t" ++ "xor %%ah, %%ah\n" ++ "1:" ++ : "=c" (*value), ++ "=a" (ret) ++ : "1" (PCIBIOS_READ_CONFIG_DWORD), ++ "b" (bx), ++ "D" ((long) where), ++ "S" (&pci_indirect)); ++ restore_flags(flags); ++ return (int) (ret & 0xff00) >> 8; ++} ++ ++int pcibios_write_config_byte (unsigned int bus, ++ unsigned int device_fn, unsigned int where, uint8_t value) ++{ ++ unsigned long ret; ++ unsigned long bx = (bus << 8) | device_fn; ++ unsigned long flags; ++ ++ save_flags(flags); cli(); ++ __asm__( ++#ifdef ABSOLUTE_WITHOUT_ASTERISK ++ "lcall (%%esi)\n\t" ++#else ++ "lcall *(%%esi)\n\t" ++#endif ++ "jc 1f\n\t" ++ "xor %%ah, %%ah\n" ++ "1:" ++ : "=a" (ret) ++ : "0" (PCIBIOS_WRITE_CONFIG_BYTE), ++ "c" (value), ++ "b" (bx), ++ "D" ((long) where), ++ "S" (&pci_indirect)); ++ restore_flags(flags); ++ return (int) (ret & 0xff00) >> 8; ++} ++ ++int pcibios_write_config_word (unsigned int bus, ++ unsigned int device_fn, unsigned int where, uint16_t value) ++{ ++ unsigned long ret; ++ unsigned long bx = (bus << 8) | device_fn; ++ unsigned long flags; ++ ++ save_flags(flags); cli(); ++ __asm__( ++#ifdef ABSOLUTE_WITHOUT_ASTERISK ++ "lcall (%%esi)\n\t" ++#else ++ "lcall *(%%esi)\n\t" ++#endif ++ "jc 1f\n\t" ++ "xor %%ah, %%ah\n" ++ "1:" ++ : "=a" (ret) ++ : "0" (PCIBIOS_WRITE_CONFIG_WORD), ++ "c" (value), ++ "b" (bx), ++ "D" ((long) where), ++ "S" (&pci_indirect)); ++ restore_flags(flags); ++ return (int) (ret & 0xff00) >> 8; ++} ++ ++int pcibios_write_config_dword (unsigned int bus, ++ unsigned int device_fn, unsigned int where, uint32_t value) ++{ ++ unsigned long ret; ++ unsigned long bx = (bus << 8) | device_fn; ++ unsigned long flags; ++ ++ save_flags(flags); cli(); ++ __asm__( ++#ifdef ABSOLUTE_WITHOUT_ASTERISK ++ "lcall (%%esi)\n\t" ++#else ++ "lcall *(%%esi)\n\t" ++#endif ++ "jc 1f\n\t" ++ "xor %%ah, %%ah\n" ++ "1:" ++ : "=a" (ret) ++ : "0" (PCIBIOS_WRITE_CONFIG_DWORD), ++ "c" (value), ++ "b" (bx), ++ "D" ((long) where), ++ "S" (&pci_indirect)); ++ restore_flags(flags); ++ return (int) (ret & 0xff00) >> 8; ++} ++ ++static void check_pcibios(void) ++{ ++ unsigned long signature; ++ unsigned char present_status; ++ unsigned char major_revision; ++ unsigned char minor_revision; ++ unsigned long flags; ++ int pack; ++ ++ if ((pcibios_entry = bios32_service(PCI_SERVICE))) { ++ pci_indirect.address = pcibios_entry; ++ ++ save_flags(flags); ++ __asm__( ++#ifdef ABSOLUTE_WITHOUT_ASTERISK ++ "lcall (%%edi)\n\t" ++#else ++ "lcall *(%%edi)\n\t" ++#endif ++ "jc 1f\n\t" ++ "xor %%ah, %%ah\n" ++ "1:\tshl $8, %%eax\n\t" ++ "movw %%bx, %%ax" ++ : "=d" (signature), ++ "=a" (pack) ++ : "1" (PCIBIOS_PCI_BIOS_PRESENT), ++ "D" (&pci_indirect) ++ : "bx", "cx"); ++ restore_flags(flags); ++ ++ present_status = (pack >> 16) & 0xff; ++ major_revision = (pack >> 8) & 0xff; ++ minor_revision = pack & 0xff; ++ if (present_status || (signature != PCI_SIGNATURE)) { ++ printf("ERROR: BIOS32 says PCI BIOS, but no PCI " ++ "BIOS????\n"); ++ pcibios_entry = 0; ++ } ++#if DEBUG ++ if (pcibios_entry) { ++ printf ("pcibios_init : PCI BIOS revision %hhX.%hhX" ++ " entry at %#X\n", major_revision, ++ minor_revision, pcibios_entry); ++ } ++#endif ++ } ++} ++ ++static void pcibios_init(void) ++{ ++ union bios32 *check; ++ unsigned char sum; ++ int i, length; ++ unsigned long bios32_entry = 0; ++ ++ EnterFunction("pcibios_init"); ++ /* ++ * Follow the standard procedure for locating the BIOS32 Service ++ * directory by scanning the permissible address range from ++ * 0xe0000 through 0xfffff for a valid BIOS32 structure. ++ * ++ */ ++ ++ for (check = (union bios32 *) 0xe0000; check <= (union bios32 *) 0xffff0; ++check) { ++ if (check->fields.signature != BIOS32_SIGNATURE) ++ continue; ++ length = check->fields.length * 16; ++ if (!length) ++ continue; ++ sum = 0; ++ for (i = 0; i < length ; ++i) ++ sum += check->chars[i]; ++ if (sum != 0) ++ continue; ++ if (check->fields.revision != 0) { ++ printf("pcibios_init : unsupported revision %d at %#X, mail drew@colorado.edu\n", ++ check->fields.revision, check); ++ continue; ++ } ++#if DEBUG ++ printf("pcibios_init : BIOS32 Service Directory " ++ "structure at %#X\n", check); ++#endif ++ if (!bios32_entry) { ++ if (check->fields.entry >= 0x100000) { ++ printf("pcibios_init: entry in high " ++ "memory, giving up\n"); ++ return; ++ } else { ++ bios32_entry = check->fields.entry; ++#if DEBUG ++ printf("pcibios_init : BIOS32 Service Directory" ++ " entry at %#X\n", bios32_entry); ++#endif ++ bios32_indirect.address = bios32_entry; ++ } ++ } ++ } ++ if (bios32_entry) ++ check_pcibios(); ++ LeaveFunction("pcibios_init"); ++} ++ ++#endif /* CONFIG_PCI_DIRECT not defined*/ ++ ++unsigned long pcibios_bus_base(unsigned int bus __unused) ++{ ++ /* architecturally this must be 0 */ ++ return 0; ++} ++ ++void find_pci(int type, struct pci_device *dev) ++{ ++ EnterFunction("find_pci"); ++#ifndef CONFIG_PCI_DIRECT ++ if (!pcibios_entry) { ++ pcibios_init(); ++ } ++ if (!pcibios_entry) { ++ printf("pci_init: no BIOS32 detected\n"); ++ return; ++ } ++#endif ++ LeaveFunction("find_pci"); ++ return scan_pci_bus(type, dev); ++} +diff -Naur grub-0.97.orig/netboot/pcnet32.c grub-0.97/netboot/pcnet32.c +--- grub-0.97.orig/netboot/pcnet32.c 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/pcnet32.c 2005-08-31 22:57:50.000000000 +0000 +@@ -0,0 +1,1004 @@ ++/************************************************************************** ++* ++* pcnet32.c -- Etherboot device driver for the AMD PCnet32 ++* Written 2003-2003 by Timothy Legge ++* ++* This program is free software; you can redistribute it and/or modify ++* it under the terms of the GNU General Public License as published by ++* the Free Software Foundation; either version 2 of the License, or ++* (at your option) any later version. ++* ++* This program is distributed in the hope that it will be useful, ++* but WITHOUT ANY WARRANTY; without even the implied warranty of ++* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++* GNU General Public License for more details. ++* ++* You should have received a copy of the GNU General Public License ++* along with this program; if not, write to the Free Software ++* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++* ++* Portions of this code based on: ++* pcnet32.c: An AMD PCnet32 ethernet driver for linux: ++* ++* (C) 1996-1999 Thomas Bogendoerfer ++* See Linux Driver for full information ++* ++* The transmit and poll functions were written with reference to: ++* lance.c - LANCE NIC driver for Etherboot written by Ken Yap ++* ++* Linux Driver Version 1.27a, 10.02.2002 ++* ++* ++* REVISION HISTORY: ++* ================ ++* v1.0 08-06-2003 timlegge Initial port of Linux driver ++* v1.1 08-23-2003 timlegge Add multicast support ++* v1.2 01-17-2004 timlegge Initial driver output cleanup ++* v1.3 03-29-2004 timlegge More driver cleanup ++* ++* Indent Options: indent -kr -i8 ++***************************************************************************/ ++ ++/* to get some global routines like printf */ ++#include "etherboot.h" ++/* to get the interface to the body of the program */ ++#include "nic.h" ++/* to get the PCI support functions, if this is a PCI NIC */ ++#include "pci.h" ++/* Include the time functions */ ++#include "timer.h" ++#include "mii.h" ++/* void hex_dump(const char *data, const unsigned int len); */ ++ ++/* Etherboot Specific definations */ ++#define drv_version "v1.3" ++#define drv_date "03-29-2004" ++ ++typedef unsigned char u8; ++typedef signed char s8; ++typedef unsigned short u16; ++typedef signed short s16; ++typedef unsigned int u32; ++typedef signed int s32; ++ ++static u32 ioaddr; /* Globally used for the card's io address */ ++ ++#ifdef EDEBUG ++#define dprintf(x) printf x ++#else ++#define dprintf(x) ++#endif ++ ++/* Condensed operations for readability. */ ++#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr)) ++#define le32desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr)) ++ ++/* End Etherboot Specific */ ++ ++int cards_found /* __initdata */ ; ++ ++#ifdef REMOVE ++/* FIXME: Remove these they are probably pointless */ ++ ++/* ++ * VLB I/O addresses ++ */ ++static unsigned int pcnet32_portlist[] /*__initdata */ = ++{ 0x300, 0x320, 0x340, 0x360, 0 }; ++ ++static int pcnet32_debug = 1; ++static int tx_start = 1; /* Mapping -- 0:20, 1:64, 2:128, 3:~220 (depends on chip vers) */ ++static int pcnet32vlb; /* check for VLB cards ? */ ++ ++static struct net_device *pcnet32_dev; ++ ++static int max_interrupt_work = 80; ++static int rx_copybreak = 200; ++#endif ++#define PCNET32_PORT_AUI 0x00 ++#define PCNET32_PORT_10BT 0x01 ++#define PCNET32_PORT_GPSI 0x02 ++#define PCNET32_PORT_MII 0x03 ++ ++#define PCNET32_PORT_PORTSEL 0x03 ++#define PCNET32_PORT_ASEL 0x04 ++#define PCNET32_PORT_100 0x40 ++#define PCNET32_PORT_FD 0x80 ++ ++#define PCNET32_DMA_MASK 0xffffffff ++ ++/* ++ * table to translate option values from tulip ++ * to internal options ++ */ ++static unsigned char options_mapping[] = { ++ PCNET32_PORT_ASEL, /* 0 Auto-select */ ++ PCNET32_PORT_AUI, /* 1 BNC/AUI */ ++ PCNET32_PORT_AUI, /* 2 AUI/BNC */ ++ PCNET32_PORT_ASEL, /* 3 not supported */ ++ PCNET32_PORT_10BT | PCNET32_PORT_FD, /* 4 10baseT-FD */ ++ PCNET32_PORT_ASEL, /* 5 not supported */ ++ PCNET32_PORT_ASEL, /* 6 not supported */ ++ PCNET32_PORT_ASEL, /* 7 not supported */ ++ PCNET32_PORT_ASEL, /* 8 not supported */ ++ PCNET32_PORT_MII, /* 9 MII 10baseT */ ++ PCNET32_PORT_MII | PCNET32_PORT_FD, /* 10 MII 10baseT-FD */ ++ PCNET32_PORT_MII, /* 11 MII (autosel) */ ++ PCNET32_PORT_10BT, /* 12 10BaseT */ ++ PCNET32_PORT_MII | PCNET32_PORT_100, /* 13 MII 100BaseTx */ ++ PCNET32_PORT_MII | PCNET32_PORT_100 | PCNET32_PORT_FD, /* 14 MII 100BaseTx-FD */ ++ PCNET32_PORT_ASEL /* 15 not supported */ ++}; ++ ++#define MAX_UNITS 8 /* More are supported, limit only on options */ ++static int options[MAX_UNITS]; ++static int full_duplex[MAX_UNITS]; ++ ++/* ++ * Theory of Operation ++ * ++ * This driver uses the same software structure as the normal lance ++ * driver. So look for a verbose description in lance.c. The differences ++ * to the normal lance driver is the use of the 32bit mode of PCnet32 ++ * and PCnetPCI chips. Because these chips are 32bit chips, there is no ++ * 16MB limitation and we don't need bounce buffers. ++ */ ++ ++ ++ ++/* ++ * Set the number of Tx and Rx buffers, using Log_2(# buffers). ++ * Reasonable default values are 4 Tx buffers, and 16 Rx buffers. ++ * That translates to 2 (4 == 2^^2) and 4 (16 == 2^^4). ++ */ ++#ifndef PCNET32_LOG_TX_BUFFERS ++#define PCNET32_LOG_TX_BUFFERS 1 ++#define PCNET32_LOG_RX_BUFFERS 2 ++#endif ++ ++#define TX_RING_SIZE (1 << (PCNET32_LOG_TX_BUFFERS)) ++#define TX_RING_MOD_MASK (TX_RING_SIZE - 1) ++/* FIXME: Fix this to allow multiple tx_ring descriptors */ ++#define TX_RING_LEN_BITS 0x0000 /*PCNET32_LOG_TX_BUFFERS) << 12) */ ++ ++#define RX_RING_SIZE (1 << (PCNET32_LOG_RX_BUFFERS)) ++#define RX_RING_MOD_MASK (RX_RING_SIZE - 1) ++#define RX_RING_LEN_BITS ((PCNET32_LOG_RX_BUFFERS) << 4) ++ ++#define PKT_BUF_SZ 1544 ++ ++/* Offsets from base I/O address. */ ++#define PCNET32_WIO_RDP 0x10 ++#define PCNET32_WIO_RAP 0x12 ++#define PCNET32_WIO_RESET 0x14 ++#define PCNET32_WIO_BDP 0x16 ++ ++#define PCNET32_DWIO_RDP 0x10 ++#define PCNET32_DWIO_RAP 0x14 ++#define PCNET32_DWIO_RESET 0x18 ++#define PCNET32_DWIO_BDP 0x1C ++ ++#define PCNET32_TOTAL_SIZE 0x20 ++ ++/* Buffers for the tx and Rx */ ++ ++/* Create a static buffer of size PKT_BUF_SZ for each ++TX Descriptor. All descriptors point to a ++part of this buffer */ ++static unsigned char txb[PKT_BUF_SZ * TX_RING_SIZE]; ++// __attribute__ ((aligned(16))); ++ ++/* Create a static buffer of size PKT_BUF_SZ for each ++RX Descriptor All descriptors point to a ++part of this buffer */ ++static unsigned char rxb[RX_RING_SIZE * PKT_BUF_SZ]; ++// __attribute__ ((aligned(16))); ++ ++/* The PCNET32 Rx and Tx ring descriptors. */ ++struct pcnet32_rx_head { ++ u32 base; ++ s16 buf_length; ++ s16 status; ++ u32 msg_length; ++ u32 reserved; ++}; ++ ++struct pcnet32_tx_head { ++ u32 base; ++ s16 length; ++ s16 status; ++ u32 misc; ++ u32 reserved; ++}; ++ ++/* The PCNET32 32-Bit initialization block, described in databook. */ ++struct pcnet32_init_block { ++ u16 mode; ++ u16 tlen_rlen; ++ u8 phys_addr[6]; ++ u16 reserved; ++ u32 filter[2]; ++ /* Receive and transmit ring base, along with extra bits. */ ++ u32 rx_ring; ++ u32 tx_ring; ++}; ++/* PCnet32 access functions */ ++struct pcnet32_access { ++ u16(*read_csr) (unsigned long, int); ++ void (*write_csr) (unsigned long, int, u16); ++ u16(*read_bcr) (unsigned long, int); ++ void (*write_bcr) (unsigned long, int, u16); ++ u16(*read_rap) (unsigned long); ++ void (*write_rap) (unsigned long, u16); ++ void (*reset) (unsigned long); ++}; ++ ++/* Define the TX Descriptor */ ++static struct pcnet32_tx_head tx_ring[TX_RING_SIZE] ++ __attribute__ ((aligned(16))); ++ ++ ++/* Define the RX Descriptor */ ++static struct pcnet32_rx_head rx_ring[RX_RING_SIZE] ++ __attribute__ ((aligned(16))); ++ ++/* May need to be moved to mii.h */ ++struct mii_if_info { ++ int phy_id; ++ int advertising; ++ unsigned int full_duplex:1; /* is full duplex? */ ++}; ++ ++/* ++ * The first three fields of pcnet32_private are read by the ethernet device ++ * so we allocate the structure should be allocated by pci_alloc_consistent(). ++ */ ++#define MII_CNT 4 ++struct pcnet32_private { ++ struct pcnet32_init_block init_block; ++ struct pci_dev *pci_dev; /* Pointer to the associated pci device structure */ ++ const char *name; ++ /* The saved address of a sent-in-place packet/buffer, for skfree(). */ ++ struct sk_buff *tx_skbuff[TX_RING_SIZE]; ++ struct sk_buff *rx_skbuff[RX_RING_SIZE]; ++ struct pcnet32_access a; ++ unsigned int cur_rx, cur_tx; /* The next free ring entry */ ++ char tx_full; ++ int options; ++ int shared_irq:1, /* shared irq possible */ ++ ltint:1, /* enable TxDone-intr inhibitor */ ++ dxsuflo:1, /* disable transmit stop on uflo */ ++ mii:1; /* mii port available */ ++ struct mii_if_info mii_if; ++ unsigned char phys[MII_CNT]; ++ struct net_device *next; ++ int full_duplex:1; ++} lpx; ++ ++static struct pcnet32_private *lp; ++ ++static int mdio_read(struct nic *nic __unused, int phy_id, int reg_num); ++#if 0 ++static void mdio_write(struct nic *nic __unused, int phy_id, int reg_num, ++ int val); ++#endif ++enum pci_flags_bit { ++ PCI_USES_IO = 1, PCI_USES_MEM = 2, PCI_USES_MASTER = 4, ++ PCI_ADDR0 = 0x10 << 0, PCI_ADDR1 = 0x10 << 1, PCI_ADDR2 = ++ 0x10 << 2, PCI_ADDR3 = 0x10 << 3, ++}; ++ ++ ++static u16 pcnet32_wio_read_csr(unsigned long addr, int index) ++{ ++ outw(index, addr + PCNET32_WIO_RAP); ++ return inw(addr + PCNET32_WIO_RDP); ++} ++ ++static void pcnet32_wio_write_csr(unsigned long addr, int index, u16 val) ++{ ++ outw(index, addr + PCNET32_WIO_RAP); ++ outw(val, addr + PCNET32_WIO_RDP); ++} ++ ++static u16 pcnet32_wio_read_bcr(unsigned long addr, int index) ++{ ++ outw(index, addr + PCNET32_WIO_RAP); ++ return inw(addr + PCNET32_WIO_BDP); ++} ++ ++static void pcnet32_wio_write_bcr(unsigned long addr, int index, u16 val) ++{ ++ outw(index, addr + PCNET32_WIO_RAP); ++ outw(val, addr + PCNET32_WIO_BDP); ++} ++ ++static u16 pcnet32_wio_read_rap(unsigned long addr) ++{ ++ return inw(addr + PCNET32_WIO_RAP); ++} ++ ++static void pcnet32_wio_write_rap(unsigned long addr, u16 val) ++{ ++ outw(val, addr + PCNET32_WIO_RAP); ++} ++ ++static void pcnet32_wio_reset(unsigned long addr) ++{ ++ inw(addr + PCNET32_WIO_RESET); ++} ++ ++static int pcnet32_wio_check(unsigned long addr) ++{ ++ outw(88, addr + PCNET32_WIO_RAP); ++ return (inw(addr + PCNET32_WIO_RAP) == 88); ++} ++ ++static struct pcnet32_access pcnet32_wio = { ++ read_csr:pcnet32_wio_read_csr, ++ write_csr:pcnet32_wio_write_csr, ++ read_bcr:pcnet32_wio_read_bcr, ++ write_bcr:pcnet32_wio_write_bcr, ++ read_rap:pcnet32_wio_read_rap, ++ write_rap:pcnet32_wio_write_rap, ++ reset:pcnet32_wio_reset ++}; ++ ++static u16 pcnet32_dwio_read_csr(unsigned long addr, int index) ++{ ++ outl(index, addr + PCNET32_DWIO_RAP); ++ return (inl(addr + PCNET32_DWIO_RDP) & 0xffff); ++} ++ ++static void pcnet32_dwio_write_csr(unsigned long addr, int index, u16 val) ++{ ++ outl(index, addr + PCNET32_DWIO_RAP); ++ outl(val, addr + PCNET32_DWIO_RDP); ++} ++ ++static u16 pcnet32_dwio_read_bcr(unsigned long addr, int index) ++{ ++ outl(index, addr + PCNET32_DWIO_RAP); ++ return (inl(addr + PCNET32_DWIO_BDP) & 0xffff); ++} ++ ++static void pcnet32_dwio_write_bcr(unsigned long addr, int index, u16 val) ++{ ++ outl(index, addr + PCNET32_DWIO_RAP); ++ outl(val, addr + PCNET32_DWIO_BDP); ++} ++ ++static u16 pcnet32_dwio_read_rap(unsigned long addr) ++{ ++ return (inl(addr + PCNET32_DWIO_RAP) & 0xffff); ++} ++ ++static void pcnet32_dwio_write_rap(unsigned long addr, u16 val) ++{ ++ outl(val, addr + PCNET32_DWIO_RAP); ++} ++ ++static void pcnet32_dwio_reset(unsigned long addr) ++{ ++ inl(addr + PCNET32_DWIO_RESET); ++} ++ ++static int pcnet32_dwio_check(unsigned long addr) ++{ ++ outl(88, addr + PCNET32_DWIO_RAP); ++ return ((inl(addr + PCNET32_DWIO_RAP) & 0xffff) == 88); ++} ++ ++static struct pcnet32_access pcnet32_dwio = { ++ read_csr:pcnet32_dwio_read_csr, ++ write_csr:pcnet32_dwio_write_csr, ++ read_bcr:pcnet32_dwio_read_bcr, ++ write_bcr:pcnet32_dwio_write_bcr, ++ read_rap:pcnet32_dwio_read_rap, ++ write_rap:pcnet32_dwio_write_rap, ++ reset:pcnet32_dwio_reset ++}; ++ ++ ++/* Initialize the PCNET32 Rx and Tx rings. */ ++static int pcnet32_init_ring(struct nic *nic) ++{ ++ int i; ++ ++ lp->tx_full = 0; ++ lp->cur_rx = lp->cur_tx = 0; ++ ++ for (i = 0; i < RX_RING_SIZE; i++) { ++ rx_ring[i].base = (u32) virt_to_le32desc(&rxb[i]); ++ rx_ring[i].buf_length = le16_to_cpu(-PKT_BUF_SZ); ++ rx_ring[i].status = le16_to_cpu(0x8000); ++ } ++ ++ /* The Tx buffer address is filled in as needed, but we do need to clear ++ the upper ownership bit. */ ++ for (i = 0; i < TX_RING_SIZE; i++) { ++ tx_ring[i].base = 0; ++ tx_ring[i].status = 0; ++ } ++ ++ ++ lp->init_block.tlen_rlen = ++ le16_to_cpu(TX_RING_LEN_BITS | RX_RING_LEN_BITS); ++ for (i = 0; i < 6; i++) ++ lp->init_block.phys_addr[i] = nic->node_addr[i]; ++ lp->init_block.rx_ring = (u32) virt_to_le32desc(&rx_ring[0]); ++ lp->init_block.tx_ring = (u32) virt_to_le32desc(&tx_ring[0]); ++ return 0; ++} ++ ++/************************************************************************** ++RESET - Reset adapter ++***************************************************************************/ ++static void pcnet32_reset(struct nic *nic) ++{ ++ /* put the card in its initial state */ ++ u16 val; ++ int i; ++ ++ /* Reset the PCNET32 */ ++ lp->a.reset(ioaddr); ++ ++ /* switch pcnet32 to 32bit mode */ ++ lp->a.write_bcr(ioaddr, 20, 2); ++ ++ /* set/reset autoselect bit */ ++ val = lp->a.read_bcr(ioaddr, 2) & ~2; ++ if (lp->options & PCNET32_PORT_ASEL) ++ val |= 2; ++ lp->a.write_bcr(ioaddr, 2, val); ++ /* handle full duplex setting */ ++ if (lp->full_duplex) { ++ val = lp->a.read_bcr(ioaddr, 9) & ~3; ++ if (lp->options & PCNET32_PORT_FD) { ++ val |= 1; ++ if (lp->options == ++ (PCNET32_PORT_FD | PCNET32_PORT_AUI)) ++ val |= 2; ++ } else if (lp->options & PCNET32_PORT_ASEL) { ++ /* workaround of xSeries250, turn on for 79C975 only */ ++ i = ((lp->a. ++ read_csr(ioaddr, ++ 88) | (lp->a.read_csr(ioaddr, ++ 89) << 16)) >> ++ 12) & 0xffff; ++ if (i == 0x2627) ++ val |= 3; ++ } ++ lp->a.write_bcr(ioaddr, 9, val); ++ } ++ ++ /* set/reset GPSI bit in test register */ ++ val = lp->a.read_csr(ioaddr, 124) & ~0x10; ++ if ((lp->options & PCNET32_PORT_PORTSEL) == PCNET32_PORT_GPSI) ++ val |= 0x10; ++ lp->a.write_csr(ioaddr, 124, val); ++ ++ if (lp->mii && !(lp->options & PCNET32_PORT_ASEL)) { ++ val = lp->a.read_bcr(ioaddr, 32) & ~0x38; /* disable Auto Negotiation, set 10Mpbs, HD */ ++ if (lp->options & PCNET32_PORT_FD) ++ val |= 0x10; ++ if (lp->options & PCNET32_PORT_100) ++ val |= 0x08; ++ lp->a.write_bcr(ioaddr, 32, val); ++ } else { ++ if (lp->options & PCNET32_PORT_ASEL) { /* enable auto negotiate, setup, disable fd */ ++ val = lp->a.read_bcr(ioaddr, 32) & ~0x98; ++ val |= 0x20; ++ lp->a.write_bcr(ioaddr, 32, val); ++ } ++ } ++ ++#ifdef DO_DXSUFLO ++ if (lp->dxsuflo) { /* Disable transmit stop on underflow */ ++ val = lp->a.read_csr(ioaddr, 3); ++ val |= 0x40; ++ lp->a.write_csr(ioaddr, 3, val); ++ } ++#endif ++ ++ if (lp->ltint) { /* Enable TxDone-intr inhibitor */ ++ val = lp->a.read_csr(ioaddr, 5); ++ val |= (1 << 14); ++ lp->a.write_csr(ioaddr, 5, val); ++ } ++ lp->init_block.mode = ++ le16_to_cpu((lp->options & PCNET32_PORT_PORTSEL) << 7); ++ lp->init_block.filter[0] = 0xffffffff; ++ lp->init_block.filter[1] = 0xffffffff; ++ ++ pcnet32_init_ring(nic); ++ ++ ++ /* Re-initialize the PCNET32, and start it when done. */ ++ lp->a.write_csr(ioaddr, 1, ++ (virt_to_bus(&lp->init_block)) & 0xffff); ++ lp->a.write_csr(ioaddr, 2, (virt_to_bus(&lp->init_block)) >> 16); ++ lp->a.write_csr(ioaddr, 4, 0x0915); ++ lp->a.write_csr(ioaddr, 0, 0x0001); ++ ++ ++ i = 0; ++ while (i++ < 100) ++ if (lp->a.read_csr(ioaddr, 0) & 0x0100) ++ break; ++ /* ++ * We used to clear the InitDone bit, 0x0100, here but Mark Stockton ++ * reports that doing so triggers a bug in the '974. ++ */ ++ lp->a.write_csr(ioaddr, 0, 0x0042); ++ ++ dprintf(("pcnet32 open, csr0 %hX.\n", lp->a.read_csr(ioaddr, 0))); ++ ++} ++ ++/************************************************************************** ++POLL - Wait for a frame ++***************************************************************************/ ++static int pcnet32_poll(struct nic *nic __unused, int retrieve) ++{ ++ /* return true if there's an ethernet packet ready to read */ ++ /* nic->packet should contain data on return */ ++ /* nic->packetlen should contain length of data */ ++ ++ int status; ++ int entry; ++ ++ entry = lp->cur_rx & RX_RING_MOD_MASK; ++ status = ((short) le16_to_cpu(rx_ring[entry].status) >> 8); ++ ++ if (status < 0) ++ return 0; ++ ++ if ( ! retrieve ) return 1; ++ ++ if (status == 0x03) { ++ nic->packetlen = ++ (le32_to_cpu(rx_ring[entry].msg_length) & 0xfff) - 4; ++ memcpy(nic->packet, &rxb[entry], nic->packetlen); ++ ++ /* Andrew Boyd of QNX reports that some revs of the 79C765 ++ * clear the buffer length */ ++ rx_ring[entry].buf_length = le16_to_cpu(-PKT_BUF_SZ); ++ rx_ring[entry].status |= le16_to_cpu(0x8000); /* prime for next receive */ ++ /* Switch to the next Rx ring buffer */ ++ lp->cur_rx++; ++ ++ } else { ++ return 0; ++ } ++ ++ return 1; ++} ++ ++/************************************************************************** ++TRANSMIT - Transmit a frame ++***************************************************************************/ ++static void pcnet32_transmit(struct nic *nic __unused, const char *d, /* Destination */ ++ unsigned int t, /* Type */ ++ unsigned int s, /* size */ ++ const char *p) ++{ /* Packet */ ++ /* send the packet to destination */ ++ unsigned long time; ++ u8 *ptxb; ++ u16 nstype; ++ u16 status; ++ int entry = 0; /*lp->cur_tx & TX_RING_MOD_MASK; */ ++ ++ status = 0x8300; ++ /* point to the current txb incase multiple tx_rings are used */ ++ ptxb = txb + (lp->cur_tx * PKT_BUF_SZ); ++ ++ /* copy the packet to ring buffer */ ++ memcpy(ptxb, d, ETH_ALEN); /* dst */ ++ memcpy(ptxb + ETH_ALEN, nic->node_addr, ETH_ALEN); /* src */ ++ nstype = htons((u16) t); /* type */ ++ memcpy(ptxb + 2 * ETH_ALEN, (u8 *) & nstype, 2); /* type */ ++ memcpy(ptxb + ETH_HLEN, p, s); ++ ++ s += ETH_HLEN; ++ while (s < ETH_ZLEN) /* pad to min length */ ++ ptxb[s++] = '\0'; ++ ++ tx_ring[entry].length = le16_to_cpu(-s); ++ tx_ring[entry].misc = 0x00000000; ++ tx_ring[entry].base = (u32) virt_to_le32desc(ptxb); ++ ++ /* we set the top byte as the very last thing */ ++ tx_ring[entry].status = le16_to_cpu(status); ++ ++ ++ /* Trigger an immediate send poll */ ++ lp->a.write_csr(ioaddr, 0, 0x0048); ++ ++ /* wait for transmit complete */ ++ lp->cur_tx = 0; /* (lp->cur_tx + 1); */ ++ time = currticks() + TICKS_PER_SEC; /* wait one second */ ++ while (currticks() < time && ++ ((short) le16_to_cpu(tx_ring[entry].status) < 0)); ++ ++ if ((short) le16_to_cpu(tx_ring[entry].status) < 0) ++ printf("PCNET32 timed out on transmit\n"); ++ ++ /* Stop pointing at the current txb ++ * otherwise the card continues to send the packet */ ++ tx_ring[entry].base = 0; ++ ++} ++ ++/************************************************************************** ++DISABLE - Turn off ethernet interface ++***************************************************************************/ ++static void pcnet32_disable(struct dev *dev __unused) ++{ ++ /* Stop the PCNET32 here -- it ocassionally polls memory if we don't */ ++ lp->a.write_csr(ioaddr, 0, 0x0004); ++ ++ /* ++ * Switch back to 16-bit mode to avoid problesm with dumb ++ * DOS packet driver after a warm reboot ++ */ ++ lp->a.write_bcr(ioaddr, 20, 4); ++} ++ ++/************************************************************************** ++IRQ - Enable, Disable, or Force interrupts ++***************************************************************************/ ++static void pcnet32_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } ++} ++ ++/************************************************************************** ++PROBE - Look for an adapter, this routine's visible to the outside ++You should omit the last argument struct pci_device * for a non-PCI NIC ++***************************************************************************/ ++static int pcnet32_probe(struct dev *dev, struct pci_device *pci) ++{ ++ struct nic *nic = (struct nic *) dev; ++ int i, media; ++ int fdx, mii, fset, dxsuflo, ltint; ++ int chip_version; ++ char *chipname; ++ struct pcnet32_access *a = NULL; ++ u8 promaddr[6]; ++ ++ int shared = 1; ++ if (pci->ioaddr == 0) ++ return 0; ++ ++ /* BASE is used throughout to address the card */ ++ ioaddr = pci->ioaddr; ++ printf("pcnet32.c: Found %s, Vendor=0x%hX Device=0x%hX\n", ++ pci->name, pci->vendor, pci->dev_id); ++ ++ nic->irqno = 0; ++ nic->ioaddr = pci->ioaddr & ~3; ++ ++ /* reset the chip */ ++ pcnet32_wio_reset(ioaddr); ++ ++ /* NOTE: 16-bit check is first, otherwise some older PCnet chips fail */ ++ if (pcnet32_wio_read_csr(ioaddr, 0) == 4 ++ && pcnet32_wio_check(ioaddr)) { ++ a = &pcnet32_wio; ++ } else { ++ pcnet32_dwio_reset(ioaddr); ++ if (pcnet32_dwio_read_csr(ioaddr, 0) == 4 ++ && pcnet32_dwio_check(ioaddr)) { ++ a = &pcnet32_dwio; ++ } else ++ return 0; ++ } ++ ++ chip_version = ++ a->read_csr(ioaddr, 88) | (a->read_csr(ioaddr, 89) << 16); ++ ++ dprintf(("PCnet chip version is %0xhX\n", chip_version)); ++ if ((chip_version & 0xfff) != 0x003) ++ return 0; ++ ++ /* initialize variables */ ++ fdx = mii = fset = dxsuflo = ltint = 0; ++ chip_version = (chip_version >> 12) & 0xffff; ++ ++ switch (chip_version) { ++ case 0x2420: ++ chipname = "PCnet/PCI 79C970"; /* PCI */ ++ break; ++ case 0x2430: ++ if (shared) ++ chipname = "PCnet/PCI 79C970"; /* 970 gives the wrong chip id back */ ++ else ++ chipname = "PCnet/32 79C965"; /* 486/VL bus */ ++ break; ++ case 0x2621: ++ chipname = "PCnet/PCI II 79C970A"; /* PCI */ ++ fdx = 1; ++ break; ++ case 0x2623: ++ chipname = "PCnet/FAST 79C971"; /* PCI */ ++ fdx = 1; ++ mii = 1; ++ fset = 1; ++ ltint = 1; ++ break; ++ case 0x2624: ++ chipname = "PCnet/FAST+ 79C972"; /* PCI */ ++ fdx = 1; ++ mii = 1; ++ fset = 1; ++ break; ++ case 0x2625: ++ chipname = "PCnet/FAST III 79C973"; /* PCI */ ++ fdx = 1; ++ mii = 1; ++ break; ++ case 0x2626: ++ chipname = "PCnet/Home 79C978"; /* PCI */ ++ fdx = 1; ++ /* ++ * This is based on specs published at www.amd.com. This section ++ * assumes that a card with a 79C978 wants to go into 1Mb HomePNA ++ * mode. The 79C978 can also go into standard ethernet, and there ++ * probably should be some sort of module option to select the ++ * mode by which the card should operate ++ */ ++ /* switch to home wiring mode */ ++ media = a->read_bcr(ioaddr, 49); ++ ++ printf("media reset to %#x.\n", media); ++ a->write_bcr(ioaddr, 49, media); ++ break; ++ case 0x2627: ++ chipname = "PCnet/FAST III 79C975"; /* PCI */ ++ fdx = 1; ++ mii = 1; ++ break; ++ default: ++ printf("PCnet version %#x, no PCnet32 chip.\n", ++ chip_version); ++ return 0; ++ } ++ ++ /* ++ * On selected chips turn on the BCR18:NOUFLO bit. This stops transmit ++ * starting until the packet is loaded. Strike one for reliability, lose ++ * one for latency - although on PCI this isnt a big loss. Older chips ++ * have FIFO's smaller than a packet, so you can't do this. ++ */ ++ ++ if (fset) { ++ a->write_bcr(ioaddr, 18, ++ (a->read_bcr(ioaddr, 18) | 0x0800)); ++ a->write_csr(ioaddr, 80, ++ (a->read_csr(ioaddr, 80) & 0x0C00) | 0x0c00); ++ dxsuflo = 1; ++ ltint = 1; ++ } ++ ++ dprintf(("%s at %hX,", chipname, ioaddr)); ++ ++ /* read PROM address */ ++ for (i = 0; i < 6; i++) ++ promaddr[i] = inb(ioaddr + i); ++ ++ /* Update the nic structure with the MAC Address */ ++ for (i = 0; i < ETH_ALEN; i++) { ++ nic->node_addr[i] = promaddr[i]; ++ } ++ /* Print out some hardware info */ ++ printf("%s: %! at ioaddr %hX, ", pci->name, nic->node_addr, ++ ioaddr); ++ ++ /* Set to pci bus master */ ++ adjust_pci_device(pci); ++ ++ /* point to private storage */ ++ lp = &lpx; ++ ++#if EBDEBUG ++ if (((chip_version + 1) & 0xfffe) == 0x2624) { /* Version 0x2623 or 0x2624 */ ++ i = a->read_csr(ioaddr, 80) & 0x0C00; /* Check tx_start_pt */ ++ dprintf((" tx_start_pt(0x%hX):", i)); ++ switch (i >> 10) { ++ case 0: ++ dprintf((" 20 bytes,")); ++ break; ++ case 1: ++ dprintf((" 64 bytes,")); ++ break; ++ case 2: ++ dprintf((" 128 bytes,")); ++ break; ++ case 3: ++ dprintf(("~220 bytes,")); ++ break; ++ } ++ i = a->read_bcr(ioaddr, 18); /* Check Burst/Bus control */ ++ dprintf((" BCR18(%hX):", i & 0xffff)); ++ if (i & (1 << 5)) ++ dprintf(("BurstWrEn ")); ++ if (i & (1 << 6)) ++ dprintf(("BurstRdEn ")); ++ if (i & (1 << 7)) ++ dprintf(("DWordIO ")); ++ if (i & (1 << 11)) ++ dprintf(("NoUFlow ")); ++ i = a->read_bcr(ioaddr, 25); ++ dprintf((" SRAMSIZE=0x%hX,", i << 8)); ++ i = a->read_bcr(ioaddr, 26); ++ dprintf((" SRAM_BND=0x%hX,", i << 8)); ++ i = a->read_bcr(ioaddr, 27); ++ if (i & (1 << 14)) ++ dprintf(("LowLatRx")); ++ } ++#endif ++ lp->name = chipname; ++ lp->shared_irq = shared; ++ lp->full_duplex = fdx; ++ lp->dxsuflo = dxsuflo; ++ lp->ltint = ltint; ++ lp->mii = mii; ++ /* FIXME: Fix Options for only one card */ ++ if ((cards_found >= MAX_UNITS) ++ || ((unsigned int) options[cards_found] > sizeof(options_mapping))) ++ lp->options = PCNET32_PORT_ASEL; ++ else ++ lp->options = options_mapping[options[cards_found]]; ++ ++ if (fdx && !(lp->options & PCNET32_PORT_ASEL) && ++ ((cards_found >= MAX_UNITS) || full_duplex[cards_found])) ++ lp->options |= PCNET32_PORT_FD; ++ ++ if (!a) { ++ printf("No access methods\n"); ++ return 0; ++ } ++ lp->a = *a; ++ ++ /* detect special T1/E1 WAN card by checking for MAC address */ ++ if (nic->node_addr[0] == 0x00 && nic->node_addr[1] == 0xe0 ++ && nic->node_addr[2] == 0x75) ++ lp->options = PCNET32_PORT_FD | PCNET32_PORT_GPSI; ++ ++ lp->init_block.mode = le16_to_cpu(0x0003); /* Disable Rx and Tx. */ ++ lp->init_block.tlen_rlen = ++ le16_to_cpu(TX_RING_LEN_BITS | RX_RING_LEN_BITS); ++ for (i = 0; i < 6; i++) ++ lp->init_block.phys_addr[i] = nic->node_addr[i]; ++ lp->init_block.filter[0] = 0xffffffff; ++ lp->init_block.filter[1] = 0xffffffff; ++ lp->init_block.rx_ring = virt_to_bus(&rx_ring); ++ lp->init_block.tx_ring = virt_to_bus(&tx_ring); ++ ++ /* switch pcnet32 to 32bit mode */ ++ a->write_bcr(ioaddr, 20, 2); ++ ++ ++ a->write_csr(ioaddr, 1, (virt_to_bus(&lp->init_block)) & 0xffff); ++ a->write_csr(ioaddr, 2, (virt_to_bus(&lp->init_block)) >> 16); ++ ++ /* ++ * To auto-IRQ we enable the initialization-done and DMA error ++ * interrupts. For ISA boards we get a DMA error, but VLB and PCI ++ * boards will work. ++ */ ++ /* Trigger an initialization just for the interrupt. */ ++ ++ a->write_csr(ioaddr, 0, 0x41); ++ mdelay(1); ++ ++ cards_found++; ++ ++ /* point to NIC specific routines */ ++ pcnet32_reset(nic); ++ if (1) { ++ int tmp; ++ int phy, phy_idx = 0; ++ u16 mii_lpa; ++ lp->phys[0] = 1; /* Default Setting */ ++ for (phy = 1; phy < 32 && phy_idx < MII_CNT; phy++) { ++ int mii_status = mdio_read(nic, phy, MII_BMSR); ++ if (mii_status != 0xffff && mii_status != 0x0000) { ++ lp->phys[phy_idx++] = phy; ++ lp->mii_if.advertising = ++ mdio_read(nic, phy, MII_ADVERTISE); ++ if ((mii_status & 0x0040) == 0) { ++ tmp = phy; ++ dprintf (("MII PHY found at address %d, status " ++ "%hX advertising %hX\n", phy, mii_status, ++ lp->mii_if.advertising)); ++ } ++ } ++ } ++ if (phy_idx == 0) ++ printf("No MII transceiver found!\n"); ++ lp->mii_if.phy_id = lp->phys[0]; ++ ++ lp->mii_if.advertising = ++ mdio_read(nic, lp->phys[0], MII_ADVERTISE); ++ ++ mii_lpa = mdio_read(nic, lp->phys[0], MII_LPA); ++ lp->mii_if.advertising &= mii_lpa; ++ if (lp->mii_if.advertising & ADVERTISE_100FULL) ++ printf("100Mbps Full-Duplex\n"); ++ else if (lp->mii_if.advertising & ADVERTISE_100HALF) ++ printf("100Mbps Half-Duplex\n"); ++ else if (lp->mii_if.advertising & ADVERTISE_10FULL) ++ printf("10Mbps Full-Duplex\n"); ++ else if (lp->mii_if.advertising & ADVERTISE_10HALF) ++ printf("10Mbps Half-Duplex\n"); ++ else ++ printf("\n"); ++ } ++ ++ nic->poll = pcnet32_poll; ++ nic->transmit = pcnet32_transmit; ++ dev->disable = pcnet32_disable; ++ nic->irq = pcnet32_irq; ++ ++ return 1; ++} ++static int mdio_read(struct nic *nic __unused, int phy_id, int reg_num) ++{ ++ u16 val_out; ++ int phyaddr; ++ ++ if (!lp->mii) ++ return 0; ++ ++ phyaddr = lp->a.read_bcr(ioaddr, 33); ++ ++ lp->a.write_bcr(ioaddr, 33, ++ ((phy_id & 0x1f) << 5) | (reg_num & 0x1f)); ++ val_out = lp->a.read_bcr(ioaddr, 34); ++ lp->a.write_bcr(ioaddr, 33, phyaddr); ++ ++ return val_out; ++} ++ ++#if 0 ++static void mdio_write(struct nic *nic __unused, int phy_id, int reg_num, ++ int val) ++{ ++ int phyaddr; ++ ++ if (!lp->mii) ++ return; ++ ++ phyaddr = lp->a.read_bcr(ioaddr, 33); ++ ++ lp->a.write_bcr(ioaddr, 33, ++ ((phy_id & 0x1f) << 5) | (reg_num & 0x1f)); ++ lp->a.write_bcr(ioaddr, 34, val); ++ lp->a.write_bcr(ioaddr, 33, phyaddr); ++} ++#endif ++ ++static struct pci_id pcnet32_nics[] = { ++ PCI_ROM(0x1022, 0x2000, "lancepci", "AMD Lance/PCI"), ++ PCI_ROM(0x1022, 0x2625, "pcnetfastiii", "AMD Lance/PCI PCNet/32"), ++ PCI_ROM(0x1022, 0x2001, "amdhomepna", "AMD Lance/HomePNA"), ++}; ++ ++struct pci_driver pcnet32_driver = { ++ .type = NIC_DRIVER, ++ .name = "PCNET32/PCI", ++ .probe = pcnet32_probe, ++ .ids = pcnet32_nics, ++ .id_count = sizeof(pcnet32_nics) / sizeof(pcnet32_nics[0]), ++ .class = 0, ++}; +diff -Naur grub-0.97.orig/netboot/pic8259.c grub-0.97/netboot/pic8259.c +--- grub-0.97.orig/netboot/pic8259.c 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/pic8259.c 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,267 @@ ++/* ++ * Basic support for controlling the 8259 Programmable Interrupt Controllers. ++ * ++ * Initially written by Michael Brown (mcb30). ++ */ ++ ++#include ++#include ++ ++#ifdef DEBUG_IRQ ++#define DBG(...) printf ( __VA_ARGS__ ) ++#else ++#define DBG(...) ++#endif ++ ++/* Current locations of trivial IRQ handler. These will change at ++ * runtime when relocation is used; the handler needs to be copied to ++ * base memory before being installed. ++ */ ++void (*trivial_irq_handler)P((void)) = _trivial_irq_handler; ++uint16_t volatile *trivial_irq_trigger_count = &_trivial_irq_trigger_count; ++segoff_t *trivial_irq_chain_to = &_trivial_irq_chain_to; ++uint8_t *trivial_irq_chain = &_trivial_irq_chain; ++irq_t trivial_irq_installed_on = IRQ_NONE; ++ ++/* Previous trigger count for trivial IRQ handler */ ++static uint16_t trivial_irq_previous_trigger_count = 0; ++ ++/* Install a handler for the specified IRQ. Address of previous ++ * handler will be stored in previous_handler. Enabled/disabled state ++ * of IRQ will be preserved across call, therefore if the handler does ++ * chaining, ensure that either (a) IRQ is disabled before call, or ++ * (b) previous_handler points directly to the place that the handler ++ * picks up its chain-to address. ++ */ ++ ++int install_irq_handler ( irq_t irq, segoff_t *handler, ++ uint8_t *previously_enabled, ++ segoff_t *previous_handler ) { ++ segoff_t *irq_vector = IRQ_VECTOR ( irq ); ++ *previously_enabled = irq_enabled ( irq ); ++ ++ if ( irq > IRQ_MAX ) { ++ DBG ( "Invalid IRQ number %d\n" ); ++ return 0; ++ } ++ ++ previous_handler->segment = irq_vector->segment; ++ previous_handler->offset = irq_vector->offset; ++ if ( *previously_enabled ) disable_irq ( irq ); ++ DBG ( "Installing handler at %hx:%hx for IRQ %d, leaving %s\n", ++ handler->segment, handler->offset, irq, ++ ( *previously_enabled ? "enabled" : "disabled" ) ); ++ DBG ( "...(previous handler at %hx:%hx)\n", ++ previous_handler->segment, previous_handler->offset ); ++ irq_vector->segment = handler->segment; ++ irq_vector->offset = handler->offset; ++ if ( *previously_enabled ) enable_irq ( irq ); ++ return 1; ++} ++ ++/* Remove handler for the specified IRQ. Routine checks that another ++ * handler has not been installed that chains to handler before ++ * uninstalling handler. Enabled/disabled state of the IRQ will be ++ * restored to that specified by previously_enabled. ++ */ ++ ++int remove_irq_handler ( irq_t irq, segoff_t *handler, ++ uint8_t *previously_enabled, ++ segoff_t *previous_handler ) { ++ segoff_t *irq_vector = IRQ_VECTOR ( irq ); ++ ++ if ( irq > IRQ_MAX ) { ++ DBG ( "Invalid IRQ number %d\n" ); ++ return 0; ++ } ++ if ( ( irq_vector->segment != handler->segment ) || ++ ( irq_vector->offset != handler->offset ) ) { ++ DBG ( "Cannot remove handler for IRQ %d\n" ); ++ return 0; ++ } ++ ++ DBG ( "Removing handler for IRQ %d\n", irq ); ++ disable_irq ( irq ); ++ irq_vector->segment = previous_handler->segment; ++ irq_vector->offset = previous_handler->offset; ++ if ( *previously_enabled ) enable_irq ( irq ); ++ return 1; ++} ++ ++/* Install the trivial IRQ handler. This routine installs the ++ * handler, tests it and enables the IRQ. ++ */ ++ ++int install_trivial_irq_handler ( irq_t irq ) { ++ segoff_t trivial_irq_handler_segoff = SEGOFF(trivial_irq_handler); ++ ++ if ( trivial_irq_installed_on != IRQ_NONE ) { ++ DBG ( "Can install trivial IRQ handler only once\n" ); ++ return 0; ++ } ++ if ( SEGMENT(trivial_irq_handler) > 0xffff ) { ++ DBG ( "Trivial IRQ handler not in base memory\n" ); ++ return 0; ++ } ++ ++ DBG ( "Installing trivial IRQ handler on IRQ %d\n", irq ); ++ if ( ! install_irq_handler ( irq, &trivial_irq_handler_segoff, ++ trivial_irq_chain, ++ trivial_irq_chain_to ) ) ++ return 0; ++ trivial_irq_installed_on = irq; ++ ++ DBG ( "Testing trivial IRQ handler\n" ); ++ disable_irq ( irq ); ++ *trivial_irq_trigger_count = 0; ++ trivial_irq_previous_trigger_count = 0; ++ fake_irq ( irq ); ++ if ( ! trivial_irq_triggered ( irq ) ) { ++ DBG ( "Installation of trivial IRQ handler failed\n" ); ++ remove_trivial_irq_handler ( irq ); ++ return 0; ++ } ++ DBG ( "Trivial IRQ handler installed successfully\n" ); ++ enable_irq ( irq ); ++ return 1; ++} ++ ++/* Remove the trivial IRQ handler. ++ */ ++ ++int remove_trivial_irq_handler ( irq_t irq ) { ++ segoff_t trivial_irq_handler_segoff = SEGOFF(trivial_irq_handler); ++ ++ if ( trivial_irq_installed_on == IRQ_NONE ) return 1; ++ if ( irq != trivial_irq_installed_on ) { ++ DBG ( "Cannot uninstall trivial IRQ handler from IRQ %d; " ++ "is installed on IRQ %d\n", irq, ++ trivial_irq_installed_on ); ++ return 0; ++ } ++ ++ if ( ! remove_irq_handler ( irq, &trivial_irq_handler_segoff, ++ trivial_irq_chain, ++ trivial_irq_chain_to ) ) ++ return 0; ++ ++ if ( trivial_irq_triggered ( trivial_irq_installed_on ) ) { ++ DBG ( "Sending EOI for unwanted trivial IRQ\n" ); ++ send_specific_eoi ( trivial_irq_installed_on ); ++ } ++ ++ trivial_irq_installed_on = IRQ_NONE; ++ return 1; ++} ++ ++/* Safe method to detect whether or not trivial IRQ has been ++ * triggered. Using this call avoids potential race conditions. This ++ * call will return success only once per trigger. ++ */ ++ ++int trivial_irq_triggered ( irq_t irq ) { ++ uint16_t trivial_irq_this_trigger_count = *trivial_irq_trigger_count; ++ int triggered = ( trivial_irq_this_trigger_count - ++ trivial_irq_previous_trigger_count ); ++ ++ /* irq is not used at present, but we have it in the API for ++ * future-proofing; in case we want the facility to have ++ * multiple trivial IRQ handlers installed simultaneously. ++ * ++ * Avoid compiler warning about unused variable. ++ */ ++ if ( irq == IRQ_NONE ) {}; ++ ++ trivial_irq_previous_trigger_count = trivial_irq_this_trigger_count; ++ return triggered ? 1 : 0; ++} ++ ++/* Copy trivial IRQ handler to a new location. Typically used to copy ++ * the handler into base memory; when relocation is being used we need ++ * to do this before installing the handler. ++ * ++ * Call with target=NULL in order to restore the handler to its ++ * original location. ++ */ ++ ++int copy_trivial_irq_handler ( void *target, size_t target_size ) { ++ irq_t currently_installed_on = trivial_irq_installed_on; ++ uint32_t offset = ( target == NULL ? 0 : ++ target - &_trivial_irq_handler_start ); ++ ++ if (( target != NULL ) && ( target_size < TRIVIAL_IRQ_HANDLER_SIZE )) { ++ DBG ( "Insufficient space to copy trivial IRQ handler\n" ); ++ return 0; ++ } ++ ++ if ( currently_installed_on != IRQ_NONE ) { ++ DBG ("WARNING: relocating trivial IRQ handler while in use\n"); ++ if ( ! remove_trivial_irq_handler ( currently_installed_on ) ) ++ return 0; ++ } ++ ++ /* Do the actual copy */ ++ if ( target != NULL ) { ++ DBG ( "Copying trivial IRQ handler to %hx:%hx\n", ++ SEGMENT(target), OFFSET(target) ); ++ memcpy ( target, &_trivial_irq_handler_start, ++ TRIVIAL_IRQ_HANDLER_SIZE ); ++ } else { ++ DBG ( "Restoring trivial IRQ handler to original location\n" ); ++ } ++ /* Update all the pointers to structures within the handler */ ++ trivial_irq_handler = ( void (*)P((void)) ) ++ ( (void*)_trivial_irq_handler + offset ); ++ trivial_irq_trigger_count = (uint16_t*) ++ ( (void*)&_trivial_irq_trigger_count + offset ); ++ trivial_irq_chain_to = (segoff_t*) ++ ( (void*)&_trivial_irq_chain_to + offset ); ++ trivial_irq_chain = (uint8_t*) ++ ( (void*)&_trivial_irq_chain + offset ); ++ ++ if ( currently_installed_on != IRQ_NONE ) { ++ if ( ! install_trivial_irq_handler ( currently_installed_on ) ) ++ return 0; ++ } ++ return 1; ++} ++ ++/* Send non-specific EOI(s). This seems to be inherently unsafe. ++ */ ++ ++void send_nonspecific_eoi ( irq_t irq ) { ++ DBG ( "Sending non-specific EOI for IRQ %d\n", irq ); ++ if ( irq >= IRQ_PIC_CUTOFF ) { ++ outb ( ICR_EOI_NON_SPECIFIC, PIC2_ICR ); ++ } ++ outb ( ICR_EOI_NON_SPECIFIC, PIC1_ICR ); ++} ++ ++/* Send specific EOI(s). ++ */ ++ ++void send_specific_eoi ( irq_t irq ) { ++ DBG ( "Sending specific EOI for IRQ %d\n", irq ); ++ outb ( ICR_EOI_SPECIFIC | ICR_VALUE(irq), ICR_REG(irq) ); ++ if ( irq >= IRQ_PIC_CUTOFF ) { ++ outb ( ICR_EOI_SPECIFIC | ICR_VALUE(CHAINED_IRQ), ++ ICR_REG(CHAINED_IRQ) ); ++ } ++} ++ ++/* Dump current 8259 status: enabled IRQs and handler addresses. ++ */ ++ ++#ifdef DEBUG_IRQ ++void dump_irq_status ( void ) { ++ int irq = 0; ++ ++ for ( irq = 0; irq < 16; irq++ ) { ++ if ( irq_enabled ( irq ) ) { ++ printf ( "IRQ%d enabled, ISR at %hx:%hx\n", irq, ++ IRQ_VECTOR(irq)->segment, ++ IRQ_VECTOR(irq)->offset ); ++ } ++ } ++} ++#endif +diff -Naur grub-0.97.orig/netboot/pic8259.h grub-0.97/netboot/pic8259.h +--- grub-0.97.orig/netboot/pic8259.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/pic8259.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,99 @@ ++/* ++ * Basic support for controlling the 8259 Programmable Interrupt Controllers. ++ * ++ * Initially written by Michael Brown (mcb30). ++ */ ++ ++#ifndef PIC8259_H ++#define PIC8259_H ++ ++/* For segoff_t */ ++#include ++ ++#define IRQ_PIC_CUTOFF (8) ++ ++/* 8259 register locations */ ++#define PIC1_ICW1 (0x20) ++#define PIC1_OCW2 (0x20) ++#define PIC1_OCW3 (0x20) ++#define PIC1_ICR (0x20) ++#define PIC1_IRR (0x20) ++#define PIC1_ISR (0x20) ++#define PIC1_ICW2 (0x21) ++#define PIC1_ICW3 (0x21) ++#define PIC1_ICW4 (0x21) ++#define PIC1_IMR (0x21) ++#define PIC2_ICW1 (0xa0) ++#define PIC2_OCW2 (0xa0) ++#define PIC2_OCW3 (0xa0) ++#define PIC2_ICR (0xa0) ++#define PIC2_IRR (0xa0) ++#define PIC2_ISR (0xa0) ++#define PIC2_ICW2 (0xa1) ++#define PIC2_ICW3 (0xa1) ++#define PIC2_ICW4 (0xa1) ++#define PIC2_IMR (0xa1) ++ ++/* Register command values */ ++#define OCW3_ID (0x08) ++#define OCW3_READ_IRR (0x03) ++#define OCW3_READ_ISR (0x02) ++#define ICR_EOI_NON_SPECIFIC (0x20) ++#define ICR_EOI_NOP (0x40) ++#define ICR_EOI_SPECIFIC (0x60) ++#define ICR_EOI_SET_PRIORITY (0xc0) ++ ++/* Macros to enable/disable IRQs */ ++#define IMR_REG(x) ( (x) < IRQ_PIC_CUTOFF ? PIC1_IMR : PIC2_IMR ) ++#define IMR_BIT(x) ( 1 << ( (x) % IRQ_PIC_CUTOFF ) ) ++#define irq_enabled(x) ( ( inb ( IMR_REG(x) ) & IMR_BIT(x) ) == 0 ) ++#define enable_irq(x) outb ( inb( IMR_REG(x) ) & ~IMR_BIT(x), IMR_REG(x) ) ++#define disable_irq(x) outb ( inb( IMR_REG(x) ) | IMR_BIT(x), IMR_REG(x) ) ++ ++/* Macros for acknowledging IRQs */ ++#define ICR_REG(x) ( (x) < IRQ_PIC_CUTOFF ? PIC1_ICR : PIC2_ICR ) ++#define ICR_VALUE(x) ( (x) % IRQ_PIC_CUTOFF ) ++#define CHAINED_IRQ 2 ++ ++/* Utility macros to convert IRQ numbers to INT numbers and INT vectors */ ++#define IRQ_INT(x) ( (x)ioaddr + PNIC_REG_LEN ); ++ /* Write input data */ ++ for ( i = 0; i < input_length; i++ ) { ++ outb( ((char*)input)[i], nic->ioaddr + PNIC_REG_DATA ); ++ } ++ } ++ /* Write command */ ++ outw ( command, nic->ioaddr + PNIC_REG_CMD ); ++ /* Retrieve status */ ++ status = inw ( nic->ioaddr + PNIC_REG_STAT ); ++ /* Retrieve output length */ ++ _output_length = inw ( nic->ioaddr + PNIC_REG_LEN ); ++ if ( output_length == NULL ) { ++ if ( _output_length != output_max_length ) { ++ printf ( "pnic_command %#hx: wrong data length " ++ "returned (expected %d, got %d)\n", command, ++ output_max_length, _output_length ); ++ } ++ } else { ++ *output_length = _output_length; ++ } ++ if ( output != NULL ) { ++ if ( _output_length > output_max_length ) { ++ printf ( "pnic_command %#hx: output buffer too small " ++ "(have %d, need %d)\n", command, ++ output_max_length, _output_length ); ++ _output_length = output_max_length; ++ } ++ /* Retrieve output data */ ++ for ( i = 0; i < _output_length; i++ ) { ++ ((char*)output)[i] = ++ inb ( nic->ioaddr + PNIC_REG_DATA ); ++ } ++ } ++ return status; ++} ++ ++static uint16_t pnic_command ( struct nic *nic, uint16_t command, ++ void *input, uint16_t input_length, ++ void *output, uint16_t output_max_length, ++ uint16_t *output_length ) { ++ pnic_priv_data_t *priv = (pnic_priv_data_t*)nic->priv_data; ++ uint16_t status = pnic_command_quiet ( nic, command, ++ input, input_length, ++ output, output_max_length, ++ output_length ); ++ if ( status == PNIC_STATUS_OK ) return status; ++ printf ( "PNIC command %#hx (len %#hx) failed with status %#hx\n", ++ command, input_length, status ); ++ if ( priv->api_version ) pnic_api_check(priv->api_version); ++ return status; ++} ++ ++/* Check API version matches that of NIC */ ++static int pnic_api_check ( uint16_t api_version ) { ++ if ( api_version != PNIC_API_VERSION ) { ++ printf ( "Warning: API version mismatch! " ++ "(NIC's is %d.%d, ours is %d.%d)\n", ++ api_version >> 8, api_version & 0xff, ++ PNIC_API_VERSION >> 8, PNIC_API_VERSION & 0xff ); ++ } ++ if ( api_version < PNIC_API_VERSION ) { ++ printf ( "*** You may need to update your copy of Bochs ***\n" ); ++ } ++ return ( api_version == PNIC_API_VERSION ); ++} ++ ++/************************************************************************** ++POLL - Wait for a frame ++***************************************************************************/ ++static int pnic_poll(struct nic *nic, int retrieve) ++{ ++ uint16_t length; ++ uint16_t qlen; ++ ++ /* Check receive queue length to see if there's anything to ++ * get. Necessary since once we've called PNIC_CMD_RECV we ++ * have to read out the packet, otherwise it's lost forever. ++ */ ++ if ( pnic_command ( nic, PNIC_CMD_RECV_QLEN, NULL, 0, ++ &qlen, sizeof(qlen), NULL ) ++ != PNIC_STATUS_OK ) return ( 0 ); ++ if ( qlen == 0 ) return ( 0 ); ++ ++ /* There is a packet ready. Return 1 if we're only checking. */ ++ if ( ! retrieve ) return ( 1 ); ++ ++ /* Retrieve the packet */ ++ if ( pnic_command ( nic, PNIC_CMD_RECV, NULL, 0, ++ nic->packet, ETH_FRAME_LEN, &length ) ++ != PNIC_STATUS_OK ) return ( 0 ); ++ nic->packetlen = length; ++ return ( 1 ); ++} ++ ++/************************************************************************** ++TRANSMIT - Transmit a frame ++***************************************************************************/ ++static void pnic_transmit( ++ struct nic *nic, ++ const char *dest, /* Destination */ ++ unsigned int type, /* Type */ ++ unsigned int size, /* size */ ++ const char *data) /* Packet */ ++{ ++ unsigned int nstype = htons ( type ); ++ ++ if ( ( ETH_HLEN + size ) >= ETH_FRAME_LEN ) { ++ printf ( "pnic_transmit: packet too large\n" ); ++ return; ++ } ++ ++ /* Assemble packet */ ++ memcpy ( tx_buffer, dest, ETH_ALEN ); ++ memcpy ( tx_buffer + ETH_ALEN, nic->node_addr, ETH_ALEN ); ++ memcpy ( tx_buffer + 2 * ETH_ALEN, &nstype, 2 ); ++ memcpy ( tx_buffer + ETH_HLEN, data, size ); ++ ++ pnic_command ( nic, PNIC_CMD_XMIT, tx_buffer, ETH_HLEN + size, ++ NULL, 0, NULL ); ++} ++ ++/************************************************************************** ++DISABLE - Turn off ethernet interface ++***************************************************************************/ ++static void pnic_disable(struct dev *dev) ++{ ++ struct nic *nic = (struct nic *)dev; ++ pnic_command ( nic, PNIC_CMD_RESET, NULL, 0, NULL, 0, NULL ); ++} ++ ++/************************************************************************** ++IRQ - Handle card interrupt status ++***************************************************************************/ ++static void pnic_irq ( struct nic *nic, irq_action_t action ) ++{ ++ uint8_t enabled; ++ ++ switch ( action ) { ++ case DISABLE : ++ case ENABLE : ++ enabled = ( action == ENABLE ? 1 : 0 ); ++ pnic_command ( nic, PNIC_CMD_MASK_IRQ, ++ &enabled, sizeof(enabled), NULL, 0, NULL ); ++ break; ++ case FORCE : ++ pnic_command ( nic, PNIC_CMD_FORCE_IRQ, ++ NULL, 0, NULL, 0, NULL ); ++ break; ++ } ++} ++ ++/************************************************************************** ++PROBE - Look for an adapter, this routine's visible to the outside ++***************************************************************************/ ++ ++static int pnic_probe(struct dev *dev, struct pci_device *pci) ++{ ++ struct nic *nic = (struct nic *)dev; ++ static pnic_priv_data_t priv; ++ uint16_t status; ++ ++ printf(" - "); ++ ++ /* Clear private data structure and chain it in */ ++ memset ( &priv, 0, sizeof(priv) ); ++ nic->priv_data = &priv; ++ ++ /* Mask the bit that says "this is an io addr" */ ++ nic->ioaddr = pci->ioaddr & ~3; ++ nic->irqno = pci->irq; ++ /* Not sure what this does, but the rtl8139 driver does it */ ++ adjust_pci_device(pci); ++ ++ status = pnic_command_quiet( nic, PNIC_CMD_API_VER, NULL, 0, ++ &priv.api_version, ++ sizeof(priv.api_version), NULL ); ++ if ( status != PNIC_STATUS_OK ) { ++ printf ( "PNIC failed installation check, code %#hx\n", ++ status ); ++ return 0; ++ } ++ pnic_api_check(priv.api_version); ++ status = pnic_command ( nic, PNIC_CMD_READ_MAC, NULL, 0, ++ nic->node_addr, ETH_ALEN, NULL ); ++ printf ( "Detected Bochs Pseudo NIC MAC %! (API v%d.%d) at %#hx\n", ++ nic->node_addr, priv.api_version>>8, priv.api_version&0xff, ++ nic->ioaddr ); ++ ++ /* point to NIC specific routines */ ++ dev->disable = pnic_disable; ++ nic->poll = pnic_poll; ++ nic->transmit = pnic_transmit; ++ nic->irq = pnic_irq; ++ return 1; ++} ++ ++static struct pci_id pnic_nics[] = { ++/* genrules.pl doesn't let us use macros for PCI IDs...*/ ++PCI_ROM(0xfefe, 0xefef, "pnic", "Bochs Pseudo NIC Adaptor"), ++}; ++ ++struct pci_driver pnic_driver = { ++ .type = NIC_DRIVER, ++ .name = "PNIC", ++ .probe = pnic_probe, ++ .ids = pnic_nics, ++ .id_count = sizeof(pnic_nics)/sizeof(pnic_nics[0]), ++ .class = 0, ++}; +diff -Naur grub-0.97.orig/netboot/pnic_api.h grub-0.97/netboot/pnic_api.h +--- grub-0.97.orig/netboot/pnic_api.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/pnic_api.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,59 @@ ++/* ++ * Constants etc. for the Bochs/Etherboot pseudo-NIC ++ * ++ * This header file must be valid C and C++. ++ * ++ * Operation of the pseudo-NIC (PNIC) is pretty simple. To write a ++ * command plus data, first write the length of the data to ++ * PNIC_REG_LEN, then write the data a byte at a type to ++ * PNIC_REG_DATA, then write the command code to PNIC_REG_CMD. The ++ * status will be available from PNIC_REG_STAT. The length of any ++ * data returned will be in PNIC_REG_LEN and can be read a byte at a ++ * time from PNIC_REG_DATA. ++ */ ++ ++/* ++ * PCI parameters ++ */ ++#define PNIC_PCI_VENDOR 0xfefe /* Hopefully these won't clash with */ ++#define PNIC_PCI_DEVICE 0xefef /* any real PCI device IDs. */ ++ ++/* ++ * 'Hardware' register addresses, offset from io_base ++ */ ++#define PNIC_REG_CMD 0x00 /* Command register, 2 bytes, write only */ ++#define PNIC_REG_STAT 0x00 /* Status register, 2 bytes, read only */ ++#define PNIC_REG_LEN 0x02 /* Length register, 2 bytes, read-write */ ++#define PNIC_REG_DATA 0x04 /* Data port, 1 byte, read-write */ ++/* ++ * PNIC_MAX_REG used in Bochs to claim i/o space ++ */ ++#define PNIC_MAX_REG 0x04 ++ ++/* ++ * Command code definitions: write these into PNIC_REG_CMD ++ */ ++#define PNIC_CMD_NOOP 0x0000 ++#define PNIC_CMD_API_VER 0x0001 ++#define PNIC_CMD_READ_MAC 0x0002 ++#define PNIC_CMD_RESET 0x0003 ++#define PNIC_CMD_XMIT 0x0004 ++#define PNIC_CMD_RECV 0x0005 ++#define PNIC_CMD_RECV_QLEN 0x0006 ++#define PNIC_CMD_MASK_IRQ 0x0007 ++#define PNIC_CMD_FORCE_IRQ 0x0008 ++ ++/* ++ * Status code definitions: read these from PNIC_REG_STAT ++ * ++ * We avoid using status codes that might be confused with ++ * randomly-read data (e.g. 0x0000, 0xffff etc.) ++ */ ++#define PNIC_STATUS_OK 0x4f4b /* 'OK' */ ++#define PNIC_STATUS_UNKNOWN_CMD 0x3f3f /* '??' */ ++ ++/* ++ * Other miscellaneous information ++ */ ++ ++#define PNIC_API_VERSION 0x0101 /* 1.1 */ +diff -Naur grub-0.97.orig/netboot/pxe.h grub-0.97/netboot/pxe.h +--- grub-0.97.orig/netboot/pxe.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/pxe.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,521 @@ ++/* ++ * Copyright (c) 2000 Alfred Perlstein ++ * All rights reserved. ++ * Copyright (c) 2000 Paul Saab ++ * All rights reserved. ++ * Copyright (c) 2000 John Baldwin ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE ++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ * ++ * $FreeBSD: src/sys/boot/i386/libi386/pxe.h,v 1.4.2.2 2000/09/10 02:52:18 ps Exp $ ++ */ ++ ++/* ++ * The typedefs and structures declared in this file ++ * clearly violate style(9), the reason for this is to conform to the ++ * typedefs/structure-names used in the Intel literature to avoid confusion. ++ * ++ * It's for your own good. :) ++ */ ++ ++/* SEGOFF16_t defined in separate header for Etherboot ++ */ ++#include ++ ++/* It seems that intel didn't think about ABI, ++ * either that or 16bit ABI != 32bit ABI (which seems reasonable) ++ * I have to thank Intel for the hair loss I incurred trying to figure ++ * out why PXE was mis-reading structures I was passing it (at least ++ * from my point of view) ++ * ++ * Solution: use gcc's '__attribute__ ((packed))' to correctly align ++ * structures passed into PXE ++ * Question: does this really work for PXE's expected ABI? ++ */ ++#define PACKED __attribute__ ((packed)) ++ ++#define S_SIZE(s) s, sizeof(s) - 1 ++ ++#define IP_STR "%d.%d.%d.%d" ++#define IP_ARGS(ip) \ ++ (int)(ip >> 24) & 0xff, (int)(ip >> 16) & 0xff, \ ++ (int)(ip >> 8) & 0xff, (int)ip & 0xff ++ ++#define MAC_STR "%02x:%02x:%02x:%02x:%02x:%02x" ++#define MAC_ARGS(mac) \ ++ mac[0], mac[1], mac[2], mac[3], mac[4], mac[5] ++ ++#define PXENFSROOTPATH "/pxeroot" ++ ++typedef struct { ++ uint16_t Seg_Addr; ++ uint32_t Phy_Addr; ++ uint16_t Seg_Size; ++} PACKED SEGDESC_t; /* PACKED is required, otherwise gcc pads this out to 12 ++ bytes - mbrown@fensystems.co.uk (mcb30) 17/5/03 */ ++ ++typedef uint16_t SEGSEL_t; ++typedef uint16_t PXENV_STATUS_t; ++typedef uint32_t IP4_t; ++typedef uint32_t ADDR32_t; ++typedef uint16_t UDP_PORT_t; ++ ++#define MAC_ADDR_LEN 16 ++typedef uint8_t MAC_ADDR[MAC_ADDR_LEN]; ++ ++/* PXENV+ */ ++typedef struct { ++ uint8_t Signature[6]; /* 'PXENV+' */ ++ uint16_t Version; /* MSB = major, LSB = minor */ ++ uint8_t Length; /* structure length */ ++ uint8_t Checksum; /* checksum pad */ ++ SEGOFF16_t RMEntry; /* SEG:OFF to PXE entry point */ ++ /* don't use PMOffset and PMSelector (from the 2.1 PXE manual) */ ++ uint32_t PMOffset; /* Protected mode entry */ ++ SEGSEL_t PMSelector; /* Protected mode selector */ ++ SEGSEL_t StackSeg; /* Stack segment address */ ++ uint16_t StackSize; /* Stack segment size (bytes) */ ++ SEGSEL_t BC_CodeSeg; /* BC Code segment address */ ++ uint16_t BC_CodeSize; /* BC Code segment size (bytes) */ ++ SEGSEL_t BC_DataSeg; /* BC Data segment address */ ++ uint16_t BC_DataSize; /* BC Data segment size (bytes) */ ++ SEGSEL_t UNDIDataSeg; /* UNDI Data segment address */ ++ uint16_t UNDIDataSize; /* UNDI Data segment size (bytes) */ ++ SEGSEL_t UNDICodeSeg; /* UNDI Code segment address */ ++ uint16_t UNDICodeSize; /* UNDI Code segment size (bytes) */ ++ SEGOFF16_t PXEPtr; /* SEG:OFF to !PXE struct, ++ only present when Version > 2.1 */ ++} PACKED pxenv_t; ++ ++/* !PXE */ ++typedef struct { ++ uint8_t Signature[4]; ++ uint8_t StructLength; ++ uint8_t StructCksum; ++ uint8_t StructRev; ++ uint8_t reserved_1; ++ SEGOFF16_t UNDIROMID; ++ SEGOFF16_t BaseROMID; ++ SEGOFF16_t EntryPointSP; ++ SEGOFF16_t EntryPointESP; ++ SEGOFF16_t StatusCallout; ++ uint8_t reserved_2; ++ uint8_t SegDescCn; ++ SEGSEL_t FirstSelector; ++ SEGDESC_t Stack; ++ SEGDESC_t UNDIData; ++ SEGDESC_t UNDICode; ++ SEGDESC_t UNDICodeWrite; ++ SEGDESC_t BC_Data; ++ SEGDESC_t BC_Code; ++ SEGDESC_t BC_CodeWrite; ++} PACKED pxe_t; ++ ++#define PXENV_START_UNDI 0x0000 ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint16_t ax; ++ uint16_t bx; ++ uint16_t dx; ++ uint16_t di; ++ uint16_t es; ++} PACKED t_PXENV_START_UNDI; ++ ++#define PXENV_UNDI_STARTUP 0x0001 ++typedef struct { ++ PXENV_STATUS_t Status; ++} PACKED t_PXENV_UNDI_STARTUP; ++ ++#define PXENV_UNDI_CLEANUP 0x0002 ++typedef struct { ++ PXENV_STATUS_t Status; ++} PACKED t_PXENV_UNDI_CLEANUP; ++ ++#define PXENV_UNDI_INITIALIZE 0x0003 ++typedef struct { ++ PXENV_STATUS_t Status; ++ ADDR32_t ProtocolIni; /* Phys addr of a copy of the driver module */ ++ uint8_t reserved[8]; ++} PACKED t_PXENV_UNDI_INITIALIZE; ++ ++ ++#define MAXNUM_MCADDR 8 ++typedef struct { ++ uint16_t MCastAddrCount; ++ MAC_ADDR McastAddr[MAXNUM_MCADDR]; ++} PACKED t_PXENV_UNDI_MCAST_ADDRESS; ++ ++#define PXENV_UNDI_RESET_ADAPTER 0x0004 ++typedef struct { ++ PXENV_STATUS_t Status; ++ t_PXENV_UNDI_MCAST_ADDRESS R_Mcast_Buf; ++} PACKED t_PXENV_UNDI_RESET; ++ ++#define PXENV_UNDI_SHUTDOWN 0x0005 ++typedef struct { ++ PXENV_STATUS_t Status; ++} PACKED t_PXENV_UNDI_SHUTDOWN; ++ ++#define PXENV_UNDI_OPEN 0x0006 ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint16_t OpenFlag; ++ uint16_t PktFilter; ++# define FLTR_DIRECTED 0x0001 ++# define FLTR_BRDCST 0x0002 ++# define FLTR_PRMSCS 0x0003 ++# define FLTR_SRC_RTG 0x0004 ++ ++ t_PXENV_UNDI_MCAST_ADDRESS R_Mcast_Buf; ++} PACKED t_PXENV_UNDI_OPEN; ++ ++#define PXENV_UNDI_CLOSE 0x0007 ++typedef struct { ++ PXENV_STATUS_t Status; ++} PACKED t_PXENV_UNDI_CLOSE; ++ ++#define PXENV_UNDI_TRANSMIT 0x0008 ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint8_t Protocol; ++# define P_UNKNOWN 0 ++# define P_IP 1 ++# define P_ARP 2 ++# define P_RARP 3 ++ ++ uint8_t XmitFlag; ++# define XMT_DESTADDR 0x0000 ++# define XMT_BROADCAST 0x0001 ++ ++ SEGOFF16_t DestAddr; ++ SEGOFF16_t TBD; ++ uint32_t Reserved[2]; ++} PACKED t_PXENV_UNDI_TRANSMIT; ++ ++#define MAX_DATA_BLKS 8 ++typedef struct { ++ uint16_t ImmedLength; ++ SEGOFF16_t Xmit; ++ uint16_t DataBlkCount; ++ struct DataBlk { ++ uint8_t TDPtrType; ++ uint8_t TDRsvdByte; ++ uint16_t TDDataLen; ++ SEGOFF16_t TDDataPtr; ++ } DataBlock[MAX_DATA_BLKS]; ++} PACKED t_PXENV_UNDI_TBD; ++ ++#define PXENV_UNDI_SET_MCAST_ADDRESS 0x0009 ++typedef struct { ++ PXENV_STATUS_t Status; ++ t_PXENV_UNDI_MCAST_ADDRESS R_Mcast_Buf; ++} PACKED t_PXENV_UNDI_SET_MCAST_ADDR; ++ ++#define PXENV_UNDI_SET_STATION_ADDRESS 0x000A ++typedef struct { ++ PXENV_STATUS_t Status; ++ MAC_ADDR StationAddress; /* Temp MAC addres to use */ ++} PACKED t_PXENV_UNDI_SET_STATION_ADDRESS; ++ ++#define PXENV_UNDI_SET_PACKET_FILTER 0x000B ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint8_t filter; /* see UNDI_OPEN (0x0006) */ ++} PACKED t_PXENV_UNDI_SET_PACKET_FILTER; ++ ++#define PXENV_UNDI_GET_INFORMATION 0x000C ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint16_t BaseIo; /* Adapter base I/O address */ ++ uint16_t IntNumber; /* Adapter IRQ number */ ++ uint16_t MaxTranUnit; /* Adapter maximum transmit unit */ ++ uint16_t HwType; /* Type of protocol at the hardware addr */ ++# define ETHER_TYPE 1 ++# define EXP_ETHER_TYPE 2 ++# define IEEE_TYPE 6 ++# define ARCNET_TYPE 7 ++ ++ uint16_t HwAddrLen; /* Length of hardware address */ ++ MAC_ADDR CurrentNodeAddress; /* Current hardware address */ ++ MAC_ADDR PermNodeAddress; /* Permanent hardware address */ ++ SEGSEL_t ROMAddress; /* Real mode ROM segment address */ ++ uint16_t RxBufCt; /* Receive queue length */ ++ uint16_t TxBufCt; /* Transmit queue length */ ++} PACKED t_PXENV_UNDI_GET_INFORMATION; ++ ++#define PXENV_UNDI_GET_STATISTICS 0x000D ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint32_t XmitGoodFrames; /* Number of successful transmissions */ ++ uint32_t RcvGoodFrames; /* Number of good frames received */ ++ uint32_t RcvCRCErrors; /* Number of frames with CRC errors */ ++ uint32_t RcvResourceErrors; /* Number of frames dropped */ ++} PACKED t_PXENV_UNDI_GET_STATISTICS; ++ ++#define PXENV_UNDI_CLEAR_STATISTICS 0x000E ++typedef struct { ++ PXENV_STATUS_t Status; ++} PACKED t_PXENV_UNDI_CLEAR_STATISTICS; ++ ++#define PXENV_UNDI_INITIATE_DIAGS 0x000F ++typedef struct { ++ PXENV_STATUS_t Status; ++} PACKED t_PXENV_UNDI_INITIATE_DIAGS; ++ ++#define PXENV_UNDI_FORCE_INTERRUPT 0x0010 ++typedef struct { ++ PXENV_STATUS_t Status; ++} PACKED t_PXENV_UNDI_FORCE_INTERRUPT; ++ ++#define PXENV_UNDI_GET_MCAST_ADDRESS 0x0011 ++typedef struct { ++ PXENV_STATUS_t Status; ++ IP4_t InetAddr; /* IP mulicast address */ ++ MAC_ADDR MediaAddr; /* MAC multicast address */ ++} PACKED t_PXENV_UNDI_GET_MCAST_ADDR; ++ ++#define PXENV_UNDI_GET_NIC_TYPE 0x0012 ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint8_t NicType; /* Type of NIC */ ++# define PCI_NIC 2 ++# define PnP_NIC 3 ++# define CardBus_NIC 4 ++ ++ union { ++ struct { ++ uint16_t Vendor_ID; ++ uint16_t Dev_ID; ++ uint8_t Base_Class; ++ uint8_t Sub_Class; ++ uint8_t Prog_Intf; ++ uint8_t Rev; ++ uint16_t BusDevFunc; ++ uint16_t SubVendor_ID; ++ uint16_t SubDevice_ID; ++ } pci, cardbus; ++ struct { ++ uint32_t EISA_Dev_ID; ++ uint8_t Base_Class; ++ uint8_t Sub_Class; ++ uint8_t Prog_Intf; ++ uint16_t CardSelNum; ++ } pnp; ++ } info; ++} PACKED t_PXENV_UNDI_GET_NIC_TYPE; ++ ++#define PXENV_UNDI_GET_IFACE_INFO 0x0013 ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint8_t IfaceType[16]; /* Name of MAC type in ASCII. */ ++ uint32_t LinkSpeed; /* Defined in NDIS 2.0 spec */ ++ uint32_t ServiceFlags; /* Defined in NDIS 2.0 spec */ ++ uint32_t Reserved[4]; /* must be 0 */ ++} PACKED t_PXENV_UNDI_GET_IFACE_INFO; ++ ++#define PXENV_UNDI_ISR 0x0014 ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint16_t FuncFlag; /* PXENV_UNDI_ISR_OUT_xxx */ ++ uint16_t BufferLength; /* Length of Frame */ ++ uint16_t FrameLength; /* Total length of reciever frame */ ++ uint16_t FrameHeaderLength; /* Length of the media header in Frame */ ++ SEGOFF16_t Frame; /* receive buffer */ ++ uint8_t ProtType; /* Protocol type */ ++ uint8_t PktType; /* Packet Type */ ++# define PXENV_UNDI_ISR_IN_START 1 ++# define PXENV_UNDI_ISR_IN_PROCESS 2 ++# define PXENV_UNDI_ISR_IN_GET_NEXT 3 ++ ++ /* one of these will be returned for PXENV_UNDI_ISR_IN_START */ ++# define PXENV_UNDI_ISR_OUT_OURS 0 ++# define PXENV_UNDI_ISR_OUT_NOT_OURS 1 ++ ++ /* ++ * one of these will bre returnd for PXEND_UNDI_ISR_IN_PROCESS ++ * and PXENV_UNDI_ISR_IN_GET_NEXT ++ */ ++# define PXENV_UNDI_ISR_OUT_DONE 0 ++# define PXENV_UNDI_ISR_OUT_TRANSMIT 2 ++# define PXENV_UNDI_ISR_OUT_RECEIVE 3 ++# define PXENV_UNDI_ISR_OUT_BUSY 4 ++} PACKED t_PXENV_UNDI_ISR; ++ ++#define PXENV_STOP_UNDI 0x0015 ++typedef struct { ++ PXENV_STATUS_t Status; ++} PACKED t_PXENV_STOP_UNDI; ++ ++#define PXENV_TFTP_OPEN 0x0020 ++typedef struct { ++ PXENV_STATUS_t Status; ++ IP4_t ServerIPAddress; ++ IP4_t GatewayIPAddress; ++ uint8_t FileName[128]; ++ UDP_PORT_t TFTPPort; ++ uint16_t PacketSize; ++} PACKED t_PXENV_TFTP_OPEN; ++ ++#define PXENV_TFTP_CLOSE 0x0021 ++typedef struct { ++ PXENV_STATUS_t Status; ++} PACKED t_PXENV_TFTP_CLOSE; ++ ++#define PXENV_TFTP_READ 0x0022 ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint16_t PacketNumber; ++ uint16_t BufferSize; ++ SEGOFF16_t Buffer; ++} PACKED t_PXENV_TFTP_READ; ++ ++#define PXENV_TFTP_READ_FILE 0x0023 ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint8_t FileName[128]; ++ uint32_t BufferSize; ++ ADDR32_t Buffer; ++ IP4_t ServerIPAddress; ++ IP4_t GatewayIPAdress; ++ IP4_t McastIPAdress; ++ UDP_PORT_t TFTPClntPort; ++ UDP_PORT_t TFTPSrvPort; ++ uint16_t TFTPOpenTimeOut; ++ uint16_t TFTPReopenDelay; ++} PACKED t_PXENV_TFTP_READ_FILE; ++ ++#define PXENV_TFTP_GET_FSIZE 0x0025 ++typedef struct { ++ PXENV_STATUS_t Status; ++ IP4_t ServerIPAddress; ++ IP4_t GatewayIPAdress; ++ uint8_t FileName[128]; ++ uint32_t FileSize; ++} PACKED t_PXENV_TFTP_GET_FSIZE; ++ ++#define PXENV_UDP_OPEN 0x0030 ++typedef struct { ++ PXENV_STATUS_t Status; ++ IP4_t src_ip; /* IP address of this station */ ++} PACKED t_PXENV_UDP_OPEN; ++ ++#define PXENV_UDP_CLOSE 0x0031 ++typedef struct { ++ PXENV_STATUS_t status; ++} PACKED t_PXENV_UDP_CLOSE; ++ ++#define PXENV_UDP_READ 0x0032 ++typedef struct { ++ PXENV_STATUS_t status; ++ IP4_t src_ip; /* IP of sender */ ++ IP4_t dest_ip; /* Only accept packets sent to this IP */ ++ UDP_PORT_t s_port; /* UDP source port of sender */ ++ UDP_PORT_t d_port; /* Only accept packets sent to this port */ ++ uint16_t buffer_size; /* Size of the packet buffer */ ++ SEGOFF16_t buffer; /* SEG:OFF to the packet buffer */ ++} PACKED t_PXENV_UDP_READ; ++ ++#define PXENV_UDP_WRITE 0x0033 ++typedef struct { ++ PXENV_STATUS_t status; ++ IP4_t ip; /* dest ip addr */ ++ IP4_t gw; /* ip gateway */ ++ UDP_PORT_t src_port; /* source udp port */ ++ UDP_PORT_t dst_port; /* destination udp port */ ++ uint16_t buffer_size; /* Size of the packet buffer */ ++ SEGOFF16_t buffer; /* SEG:OFF to the packet buffer */ ++} PACKED t_PXENV_UDP_WRITE; ++ ++#define PXENV_UNLOAD_STACK 0x0070 ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint8_t reserved[10]; ++} PACKED t_PXENV_UNLOAD_STACK; ++ ++ ++#define PXENV_GET_CACHED_INFO 0x0071 ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint16_t PacketType; /* type (defined right here) */ ++# define PXENV_PACKET_TYPE_DHCP_DISCOVER 1 ++# define PXENV_PACKET_TYPE_DHCP_ACK 2 ++# define PXENV_PACKET_TYPE_BINL_REPLY 3 ++ uint16_t BufferSize; /* max to copy, leave at 0 for pointer */ ++ SEGOFF16_t Buffer; /* copy to, leave at 0 for pointer */ ++ uint16_t BufferLimit; /* max size of buffer in BC dataseg ? */ ++} PACKED t_PXENV_GET_CACHED_INFO; ++ ++ ++/* structure filled in by PXENV_GET_CACHED_INFO ++ * (how we determine which IP we downloaded the initial bootstrap from) ++ * words can't describe... ++ */ ++typedef struct { ++ uint8_t opcode; ++# define BOOTP_REQ 1 ++# define BOOTP_REP 2 ++ uint8_t Hardware; /* hardware type */ ++ uint8_t Hardlen; /* hardware addr len */ ++ uint8_t Gatehops; /* zero it */ ++ uint32_t ident; /* random number chosen by client */ ++ uint16_t seconds; /* seconds since did initial bootstrap */ ++ uint16_t Flags; /* seconds since did initial bootstrap */ ++# define BOOTP_BCAST 0x8000 /* ? */ ++ IP4_t cip; /* Client IP */ ++ IP4_t yip; /* Your IP */ ++ IP4_t sip; /* IP to use for next boot stage */ ++ IP4_t gip; /* Relay IP ? */ ++ MAC_ADDR CAddr; /* Client hardware address */ ++ uint8_t Sname[64]; /* Server's hostname (Optional) */ ++ uint8_t bootfile[128]; /* boot filename */ ++ union { ++# if 1 ++# define BOOTP_DHCPVEND 1024 /* DHCP extended vendor field size */ ++# else ++# define BOOTP_DHCPVEND 312 /* DHCP standard vendor field size */ ++# endif ++ uint8_t d[BOOTP_DHCPVEND]; /* raw array of vendor/dhcp options */ ++ struct { ++ uint8_t magic[4]; /* DHCP magic cookie */ ++# ifndef VM_RFC1048 ++# define VM_RFC1048 0x63825363L /* ? */ ++# endif ++ uint32_t flags; /* bootp flags/opcodes */ ++ uint8_t pad[56]; /* I don't think intel knows what a ++ union does... */ ++ } v; ++ } vendor; ++} PACKED BOOTPLAYER; ++ ++#define PXENV_RESTART_TFTP 0x0073 ++#define t_PXENV_RESTART_TFTP t_PXENV_TFTP_READ_FILE ++ ++#define PXENV_START_BASE 0x0075 ++typedef struct { ++ PXENV_STATUS_t Status; ++} PACKED t_PXENV_START_BASE; ++ ++#define PXENV_STOP_BASE 0x0076 ++typedef struct { ++ PXENV_STATUS_t Status; ++} PACKED t_PXENV_STOP_BASE; +diff -Naur grub-0.97.orig/netboot/r8169.c grub-0.97/netboot/r8169.c +--- grub-0.97.orig/netboot/r8169.c 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/r8169.c 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,854 @@ ++/************************************************************************** ++* r8169.c: Etherboot device driver for the RealTek RTL-8169 Gigabit ++* Written 2003 by Timothy Legge ++* ++* This program is free software; you can redistribute it and/or modify ++* it under the terms of the GNU General Public License as published by ++* the Free Software Foundation; either version 2 of the License, or ++* (at your option) any later version. ++* ++* This program is distributed in the hope that it will be useful, ++* but WITHOUT ANY WARRANTY; without even the implied warranty of ++* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++* GNU General Public License for more details. ++* ++* You should have received a copy of the GNU General Public License ++* along with this program; if not, write to the Free Software ++* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++* ++* Portions of this code based on: ++* r8169.c: A RealTek RTL-8169 Gigabit Ethernet driver ++* for Linux kernel 2.4.x. ++* ++* Written 2002 ShuChen ++* See Linux Driver for full information ++* ++* Linux Driver Version 1.27a, 10.02.2002 ++* ++* Thanks to: ++* Jean Chen of RealTek Semiconductor Corp. for ++* providing the evaluation NIC used to develop ++* this driver. RealTek's support for Etherboot ++* is appreciated. ++* ++* REVISION HISTORY: ++* ================ ++* ++* v1.0 11-26-2003 timlegge Initial port of Linux driver ++* v1.5 01-17-2004 timlegge Initial driver output cleanup ++* v1.6 03-27-2004 timlegge Additional Cleanup ++* ++* Indent Options: indent -kr -i8 ++***************************************************************************/ ++ ++/* to get some global routines like printf */ ++#include "etherboot.h" ++/* to get the interface to the body of the program */ ++#include "nic.h" ++/* to get the PCI support functions, if this is a PCI NIC */ ++#include "pci.h" ++#include "timer.h" ++ ++#define drv_version "v1.6" ++#define drv_date "03-27-2004" ++ ++typedef unsigned char u8; ++typedef signed char s8; ++typedef unsigned short u16; ++typedef signed short s16; ++typedef unsigned int u32; ++typedef signed int s32; ++ ++#define HZ 1000 ++ ++static u32 ioaddr; ++ ++#ifdef EDEBUG ++#define dprintf(x) printf x ++#else ++#define dprintf(x) ++#endif ++ ++/* Condensed operations for readability. */ ++#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr)) ++#define le32desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr)) ++ ++#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) ++ ++/* media options ++ _10_Half = 0x01, ++ _10_Full = 0x02, ++ _100_Half = 0x04, ++ _100_Full = 0x08, ++ _1000_Full = 0x10, ++*/ ++static int media = -1; ++ ++#if 0 ++/* Maximum events (Rx packets, etc.) to handle at each interrupt. */ ++static int max_interrupt_work = 20; ++#endif ++ ++#if 0 ++/* Maximum number of multicast addresses to filter (vs. Rx-all-multicast). ++ The RTL chips use a 64 element hash table based on the Ethernet CRC. */ ++static int multicast_filter_limit = 32; ++#endif ++ ++/* MAC address length*/ ++#define MAC_ADDR_LEN 6 ++ ++/* max supported gigabit ethernet frame size -- must be at least (dev->mtu+14+4).*/ ++#define MAX_ETH_FRAME_SIZE 1536 ++ ++#define TX_FIFO_THRESH 256 /* In bytes */ ++ ++#define RX_FIFO_THRESH 7 /* 7 means NO threshold, Rx buffer level before first PCI xfer. */ ++#define RX_DMA_BURST 6 /* Maximum PCI burst, '6' is 1024 */ ++#define TX_DMA_BURST 6 /* Maximum PCI burst, '6' is 1024 */ ++#define EarlyTxThld 0x3F /* 0x3F means NO early transmit */ ++#define RxPacketMaxSize 0x0800 /* Maximum size supported is 16K-1 */ ++#define InterFrameGap 0x03 /* 3 means InterFrameGap = the shortest one */ ++ ++#define NUM_TX_DESC 1 /* Number of Tx descriptor registers */ ++#define NUM_RX_DESC 4 /* Number of Rx descriptor registers */ ++#define RX_BUF_SIZE 1536 /* Rx Buffer size */ ++ ++#define RTL_MIN_IO_SIZE 0x80 ++#define TX_TIMEOUT (6*HZ) ++ ++/* write/read MMIO register */ ++#define RTL_W8(reg, val8) writeb ((val8), ioaddr + (reg)) ++#define RTL_W16(reg, val16) writew ((val16), ioaddr + (reg)) ++#define RTL_W32(reg, val32) writel ((val32), ioaddr + (reg)) ++#define RTL_R8(reg) readb (ioaddr + (reg)) ++#define RTL_R16(reg) readw (ioaddr + (reg)) ++#define RTL_R32(reg) ((unsigned long) readl (ioaddr + (reg))) ++ ++enum RTL8169_registers { ++ MAC0 = 0, /* Ethernet hardware address. */ ++ MAR0 = 8, /* Multicast filter. */ ++ TxDescStartAddr = 0x20, ++ TxHDescStartAddr = 0x28, ++ FLASH = 0x30, ++ ERSR = 0x36, ++ ChipCmd = 0x37, ++ TxPoll = 0x38, ++ IntrMask = 0x3C, ++ IntrStatus = 0x3E, ++ TxConfig = 0x40, ++ RxConfig = 0x44, ++ RxMissed = 0x4C, ++ Cfg9346 = 0x50, ++ Config0 = 0x51, ++ Config1 = 0x52, ++ Config2 = 0x53, ++ Config3 = 0x54, ++ Config4 = 0x55, ++ Config5 = 0x56, ++ MultiIntr = 0x5C, ++ PHYAR = 0x60, ++ TBICSR = 0x64, ++ TBI_ANAR = 0x68, ++ TBI_LPAR = 0x6A, ++ PHYstatus = 0x6C, ++ RxMaxSize = 0xDA, ++ CPlusCmd = 0xE0, ++ RxDescStartAddr = 0xE4, ++ EarlyTxThres = 0xEC, ++ FuncEvent = 0xF0, ++ FuncEventMask = 0xF4, ++ FuncPresetState = 0xF8, ++ FuncForceEvent = 0xFC, ++}; ++ ++enum RTL8169_register_content { ++ /*InterruptStatusBits */ ++ SYSErr = 0x8000, ++ PCSTimeout = 0x4000, ++ SWInt = 0x0100, ++ TxDescUnavail = 0x80, ++ RxFIFOOver = 0x40, ++ RxUnderrun = 0x20, ++ RxOverflow = 0x10, ++ TxErr = 0x08, ++ TxOK = 0x04, ++ RxErr = 0x02, ++ RxOK = 0x01, ++ ++ /*RxStatusDesc */ ++ RxRES = 0x00200000, ++ RxCRC = 0x00080000, ++ RxRUNT = 0x00100000, ++ RxRWT = 0x00400000, ++ ++ /*ChipCmdBits */ ++ CmdReset = 0x10, ++ CmdRxEnb = 0x08, ++ CmdTxEnb = 0x04, ++ RxBufEmpty = 0x01, ++ ++ /*Cfg9346Bits */ ++ Cfg9346_Lock = 0x00, ++ Cfg9346_Unlock = 0xC0, ++ ++ /*rx_mode_bits */ ++ AcceptErr = 0x20, ++ AcceptRunt = 0x10, ++ AcceptBroadcast = 0x08, ++ AcceptMulticast = 0x04, ++ AcceptMyPhys = 0x02, ++ AcceptAllPhys = 0x01, ++ ++ /*RxConfigBits */ ++ RxCfgFIFOShift = 13, ++ RxCfgDMAShift = 8, ++ ++ /*TxConfigBits */ ++ TxInterFrameGapShift = 24, ++ TxDMAShift = 8, /* DMA burst value (0-7) is shift this many bits */ ++ ++ /*rtl8169_PHYstatus */ ++ TBI_Enable = 0x80, ++ TxFlowCtrl = 0x40, ++ RxFlowCtrl = 0x20, ++ _1000bpsF = 0x10, ++ _100bps = 0x08, ++ _10bps = 0x04, ++ LinkStatus = 0x02, ++ FullDup = 0x01, ++ ++ /*GIGABIT_PHY_registers */ ++ PHY_CTRL_REG = 0, ++ PHY_STAT_REG = 1, ++ PHY_AUTO_NEGO_REG = 4, ++ PHY_1000_CTRL_REG = 9, ++ ++ /*GIGABIT_PHY_REG_BIT */ ++ PHY_Restart_Auto_Nego = 0x0200, ++ PHY_Enable_Auto_Nego = 0x1000, ++ ++ /* PHY_STAT_REG = 1; */ ++ PHY_Auto_Neco_Comp = 0x0020, ++ ++ /* PHY_AUTO_NEGO_REG = 4; */ ++ PHY_Cap_10_Half = 0x0020, ++ PHY_Cap_10_Full = 0x0040, ++ PHY_Cap_100_Half = 0x0080, ++ PHY_Cap_100_Full = 0x0100, ++ ++ /* PHY_1000_CTRL_REG = 9; */ ++ PHY_Cap_1000_Full = 0x0200, ++ ++ PHY_Cap_Null = 0x0, ++ ++ /*_MediaType*/ ++ _10_Half = 0x01, ++ _10_Full = 0x02, ++ _100_Half = 0x04, ++ _100_Full = 0x08, ++ _1000_Full = 0x10, ++ ++ /*_TBICSRBit*/ ++ TBILinkOK = 0x02000000, ++}; ++ ++static struct { ++ const char *name; ++ u8 version; /* depend on RTL8169 docs */ ++ u32 RxConfigMask; /* should clear the bits supported by this chip */ ++} rtl_chip_info[] = { ++ { ++"RTL-8169", 0x00, 0xff7e1880,},}; ++ ++enum _DescStatusBit { ++ OWNbit = 0x80000000, ++ EORbit = 0x40000000, ++ FSbit = 0x20000000, ++ LSbit = 0x10000000, ++}; ++ ++struct TxDesc { ++ u32 status; ++ u32 vlan_tag; ++ u32 buf_addr; ++ u32 buf_Haddr; ++}; ++ ++struct RxDesc { ++ u32 status; ++ u32 vlan_tag; ++ u32 buf_addr; ++ u32 buf_Haddr; ++}; ++ ++/* The descriptors for this card are required to be aligned on ++256 byte boundaries. As the align attribute does not do more than ++16 bytes of alignment it requires some extra steps. Add 256 to the ++size of the array and the init_ring adjusts the alignment */ ++ ++/* Define the TX Descriptor */ ++static u8 tx_ring[NUM_TX_DESC * sizeof(struct TxDesc) + 256]; ++ ++/* Create a static buffer of size RX_BUF_SZ for each ++TX Descriptor. All descriptors point to a ++part of this buffer */ ++static unsigned char txb[NUM_TX_DESC * RX_BUF_SIZE]; ++ ++/* Define the RX Descriptor */ ++static u8 rx_ring[NUM_RX_DESC * sizeof(struct TxDesc) + 256]; ++ ++/* Create a static buffer of size RX_BUF_SZ for each ++RX Descriptor All descriptors point to a ++part of this buffer */ ++static unsigned char rxb[NUM_RX_DESC * RX_BUF_SIZE]; ++ ++struct rtl8169_private { ++ void *mmio_addr; /* memory map physical address */ ++ int chipset; ++ unsigned long cur_rx; /* Index into the Rx descriptor buffer of next Rx pkt. */ ++ unsigned long cur_tx; /* Index into the Tx descriptor buffer of next Rx pkt. */ ++ unsigned char *TxDescArrays; /* Index of Tx Descriptor buffer */ ++ unsigned char *RxDescArrays; /* Index of Rx Descriptor buffer */ ++ struct TxDesc *TxDescArray; /* Index of 256-alignment Tx Descriptor buffer */ ++ struct RxDesc *RxDescArray; /* Index of 256-alignment Rx Descriptor buffer */ ++ unsigned char *RxBufferRing[NUM_RX_DESC]; /* Index of Rx Buffer array */ ++ unsigned char *Tx_skbuff[NUM_TX_DESC]; ++} tpx; ++ ++static struct rtl8169_private *tpc; ++ ++static const u16 rtl8169_intr_mask = ++ SYSErr | PCSTimeout | RxUnderrun | RxOverflow | RxFIFOOver | TxErr | ++ TxOK | RxErr | RxOK; ++static const unsigned int rtl8169_rx_config = ++ (RX_FIFO_THRESH << RxCfgFIFOShift) | (RX_DMA_BURST << RxCfgDMAShift); ++ ++void mdio_write(int RegAddr, int value) ++{ ++ int i; ++ ++ RTL_W32(PHYAR, 0x80000000 | (RegAddr & 0xFF) << 16 | value); ++ udelay(1000); ++ ++ for (i = 2000; i > 0; i--) { ++ /* Check if the RTL8169 has completed writing to the specified MII register */ ++ if (!(RTL_R32(PHYAR) & 0x80000000)) { ++ break; ++ } else { ++ udelay(100); ++ } ++ } ++} ++ ++int mdio_read(int RegAddr) ++{ ++ int i, value = -1; ++ ++ RTL_W32(PHYAR, 0x0 | (RegAddr & 0xFF) << 16); ++ udelay(1000); ++ ++ for (i = 2000; i > 0; i--) { ++ /* Check if the RTL8169 has completed retrieving data from the specified MII register */ ++ if (RTL_R32(PHYAR) & 0x80000000) { ++ value = (int) (RTL_R32(PHYAR) & 0xFFFF); ++ break; ++ } else { ++ udelay(100); ++ } ++ } ++ return value; ++} ++ ++static int rtl8169_init_board(struct pci_device *pdev) ++{ ++ int i; ++ unsigned long rtreg_base, rtreg_len; ++ u32 tmp; ++ ++ rtreg_base = pci_bar_start(pdev, PCI_BASE_ADDRESS_1); ++ rtreg_len = pci_bar_size(pdev, PCI_BASE_ADDRESS_1); ++ ++ /* check for weird/broken PCI region reporting */ ++ if (rtreg_len < RTL_MIN_IO_SIZE) { ++ printf("Invalid PCI region size(s), aborting\n"); ++ } ++ ++ adjust_pci_device(pdev); ++/* pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM); */ ++ ++ /* ioremap MMIO region */ ++ ioaddr = (unsigned long) ioremap(rtreg_base, rtreg_len); ++ if (ioaddr == 0) ++ return 0; ++ ++ tpc->mmio_addr = &ioaddr; ++ /* Soft reset the chip. */ ++ RTL_W8(ChipCmd, CmdReset); ++ ++ /* Check that the chip has finished the reset. */ ++ for (i = 1000; i > 0; i--) ++ if ((RTL_R8(ChipCmd) & CmdReset) == 0) ++ break; ++ else ++ udelay(10); ++ ++ /* identify chip attached to board */ ++ tmp = RTL_R32(TxConfig); ++ tmp = ((tmp & 0x7c000000) + ((tmp & 0x00800000) << 2)) >> 24; ++ ++ for (i = ARRAY_SIZE(rtl_chip_info) - 1; i >= 0; i--) ++ if (tmp == rtl_chip_info[i].version) { ++ tpc->chipset = i; ++ goto match; ++ } ++ /* if unknown chip, assume array element #0, original RTL-8169 in this case */ ++ dprintf(("PCI device: unknown chip version, assuming RTL-8169\n")); ++ dprintf(("PCI device: TxConfig = 0x%hX\n", ++ (unsigned long) RTL_R32(TxConfig))); ++ tpc->chipset = 0; ++ return 1; ++ match: ++ return 0; ++ ++} ++ ++/************************************************************************** ++IRQ - Wait for a frame ++***************************************************************************/ ++void r8169_irq ( struct nic *nic __unused, irq_action_t action ) { ++ int intr_status = 0; ++ int interested = RxUnderrun | RxOverflow | RxFIFOOver | RxErr | RxOK; ++ ++ switch ( action ) { ++ case DISABLE: ++ case ENABLE: ++ intr_status = RTL_R16(IntrStatus); ++ /* h/w no longer present (hotplug?) or major error, ++ bail */ ++ if (intr_status == 0xFFFF) ++ break; ++ ++ intr_status = intr_status & ~interested; ++ if ( action == ENABLE ) ++ intr_status = intr_status | interested; ++ RTL_W16(IntrMask, intr_status); ++ break; ++ case FORCE : ++ RTL_W8(TxPoll, (RTL_R8(TxPoll) | 0x01)); ++ break; ++ } ++} ++ ++/************************************************************************** ++POLL - Wait for a frame ++***************************************************************************/ ++static int r8169_poll(struct nic *nic, int retreive) ++{ ++ /* return true if there's an ethernet packet ready to read */ ++ /* nic->packet should contain data on return */ ++ /* nic->packetlen should contain length of data */ ++ int cur_rx; ++ unsigned int intr_status = 0; ++ cur_rx = tpc->cur_rx; ++ if ((tpc->RxDescArray[cur_rx].status & OWNbit) == 0) { ++ /* There is a packet ready */ ++ if(!retreive) ++ return 1; ++ intr_status = RTL_R16(IntrStatus); ++ /* h/w no longer present (hotplug?) or major error, ++ bail */ ++ if (intr_status == 0xFFFF) ++ return 0; ++ RTL_W16(IntrStatus, intr_status & ++ ~(RxFIFOOver | RxOverflow | RxOK)); ++ ++ if (!(tpc->RxDescArray[cur_rx].status & RxRES)) { ++ nic->packetlen = (int) (tpc->RxDescArray[cur_rx]. ++ status & 0x00001FFF) - 4; ++ memcpy(nic->packet, tpc->RxBufferRing[cur_rx], ++ nic->packetlen); ++ if (cur_rx == NUM_RX_DESC - 1) ++ tpc->RxDescArray[cur_rx].status = ++ (OWNbit | EORbit) + RX_BUF_SIZE; ++ else ++ tpc->RxDescArray[cur_rx].status = ++ OWNbit + RX_BUF_SIZE; ++ tpc->RxDescArray[cur_rx].buf_addr = ++ virt_to_bus(tpc->RxBufferRing[cur_rx]); ++ } else ++ printf("Error Rx"); ++ /* FIXME: shouldn't I reset the status on an error */ ++ cur_rx = (cur_rx + 1) % NUM_RX_DESC; ++ tpc->cur_rx = cur_rx; ++ RTL_W16(IntrStatus, intr_status & ++ (RxFIFOOver | RxOverflow | RxOK)); ++ ++ return 1; ++ ++ } ++ tpc->cur_rx = cur_rx; ++ /* FIXME: There is no reason to do this as cur_rx did not change */ ++ ++ return (0); /* initially as this is called to flush the input */ ++ ++} ++ ++/************************************************************************** ++TRANSMIT - Transmit a frame ++***************************************************************************/ ++static void r8169_transmit(struct nic *nic, const char *d, /* Destination */ ++ unsigned int t, /* Type */ ++ unsigned int s, /* size */ ++ const char *p) ++{ /* Packet */ ++ /* send the packet to destination */ ++ ++ u16 nstype; ++ u32 to; ++ u8 *ptxb; ++ int entry = tpc->cur_tx % NUM_TX_DESC; ++ ++ /* point to the current txb incase multiple tx_rings are used */ ++ ptxb = tpc->Tx_skbuff[entry * MAX_ETH_FRAME_SIZE]; ++ memcpy(ptxb, d, ETH_ALEN); ++ memcpy(ptxb + ETH_ALEN, nic->node_addr, ETH_ALEN); ++ nstype = htons((u16) t); ++ memcpy(ptxb + 2 * ETH_ALEN, (u8 *) & nstype, 2); ++ memcpy(ptxb + ETH_HLEN, p, s); ++ s += ETH_HLEN; ++ s &= 0x0FFF; ++ while (s < ETH_ZLEN) ++ ptxb[s++] = '\0'; ++ ++ tpc->TxDescArray[entry].buf_addr = virt_to_bus(ptxb); ++ if (entry != (NUM_TX_DESC - 1)) ++ tpc->TxDescArray[entry].status = ++ (OWNbit | FSbit | LSbit) | ((s > ETH_ZLEN) ? s : ++ ETH_ZLEN); ++ else ++ tpc->TxDescArray[entry].status = ++ (OWNbit | EORbit | FSbit | LSbit) | ((s > ETH_ZLEN) ? s ++ : ETH_ZLEN); ++ RTL_W8(TxPoll, 0x40); /* set polling bit */ ++ ++ tpc->cur_tx++; ++ to = currticks() + TX_TIMEOUT; ++ while ((tpc->TxDescArray[entry].status & OWNbit) && (currticks() < to)); /* wait */ ++ ++ if (currticks() >= to) { ++ printf("TX Time Out"); ++ } ++} ++ ++static void rtl8169_set_rx_mode(struct nic *nic __unused) ++{ ++ u32 mc_filter[2]; /* Multicast hash filter */ ++ int rx_mode; ++ u32 tmp = 0; ++ ++ /* IFF_ALLMULTI */ ++ /* Too many to filter perfectly -- accept all multicasts. */ ++ rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; ++ mc_filter[1] = mc_filter[0] = 0xffffffff; ++ ++ tmp = ++ rtl8169_rx_config | rx_mode | (RTL_R32(RxConfig) & ++ rtl_chip_info[tpc->chipset]. ++ RxConfigMask); ++ ++ RTL_W32(RxConfig, tmp); ++ RTL_W32(MAR0 + 0, mc_filter[0]); ++ RTL_W32(MAR0 + 4, mc_filter[1]); ++} ++static void rtl8169_hw_start(struct nic *nic) ++{ ++ u32 i; ++ ++ /* Soft reset the chip. */ ++ RTL_W8(ChipCmd, CmdReset); ++ ++ /* Check that the chip has finished the reset. */ ++ for (i = 1000; i > 0; i--) { ++ if ((RTL_R8(ChipCmd) & CmdReset) == 0) ++ break; ++ else ++ udelay(10); ++ } ++ ++ RTL_W8(Cfg9346, Cfg9346_Unlock); ++ RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb); ++ RTL_W8(EarlyTxThres, EarlyTxThld); ++ ++ /* For gigabit rtl8169 */ ++ RTL_W16(RxMaxSize, RxPacketMaxSize); ++ ++ /* Set Rx Config register */ ++ i = rtl8169_rx_config | (RTL_R32(RxConfig) & ++ rtl_chip_info[tpc->chipset].RxConfigMask); ++ RTL_W32(RxConfig, i); ++ ++ /* Set DMA burst size and Interframe Gap Time */ ++ RTL_W32(TxConfig, ++ (TX_DMA_BURST << TxDMAShift) | (InterFrameGap << ++ TxInterFrameGapShift)); ++ ++ ++ tpc->cur_rx = 0; ++ ++ RTL_W32(TxDescStartAddr, virt_to_le32desc(tpc->TxDescArray)); ++ RTL_W32(RxDescStartAddr, virt_to_le32desc(tpc->RxDescArray)); ++ RTL_W8(Cfg9346, Cfg9346_Lock); ++ udelay(10); ++ ++ RTL_W32(RxMissed, 0); ++ ++ rtl8169_set_rx_mode(nic); ++ ++ /* no early-rx interrupts */ ++ RTL_W16(MultiIntr, RTL_R16(MultiIntr) & 0xF000); ++} ++ ++static void rtl8169_init_ring(struct nic *nic __unused) ++{ ++ int i; ++ ++ tpc->cur_rx = 0; ++ tpc->cur_tx = 0; ++ memset(tpc->TxDescArray, 0x0, NUM_TX_DESC * sizeof(struct TxDesc)); ++ memset(tpc->RxDescArray, 0x0, NUM_RX_DESC * sizeof(struct RxDesc)); ++ ++ for (i = 0; i < NUM_TX_DESC; i++) { ++ tpc->Tx_skbuff[i] = &txb[i]; ++ } ++ ++ for (i = 0; i < NUM_RX_DESC; i++) { ++ if (i == (NUM_RX_DESC - 1)) ++ tpc->RxDescArray[i].status = ++ (OWNbit | EORbit) + RX_BUF_SIZE; ++ else ++ tpc->RxDescArray[i].status = OWNbit + RX_BUF_SIZE; ++ ++ tpc->RxBufferRing[i] = &rxb[i * RX_BUF_SIZE]; ++ tpc->RxDescArray[i].buf_addr = ++ virt_to_bus(tpc->RxBufferRing[i]); ++ } ++} ++ ++/************************************************************************** ++RESET - Finish setting up the ethernet interface ++***************************************************************************/ ++static void r8169_reset(struct nic *nic) ++{ ++ int i; ++ u8 diff; ++ u32 TxPhyAddr, RxPhyAddr; ++ ++ tpc->TxDescArrays = tx_ring; ++ if (tpc->TxDescArrays == 0) ++ printf("Allot Error"); ++ /* Tx Desscriptor needs 256 bytes alignment; */ ++ TxPhyAddr = virt_to_bus(tpc->TxDescArrays); ++ diff = 256 - (TxPhyAddr - ((TxPhyAddr >> 8) << 8)); ++ TxPhyAddr += diff; ++ tpc->TxDescArray = (struct TxDesc *) (tpc->TxDescArrays + diff); ++ ++ tpc->RxDescArrays = rx_ring; ++ /* Rx Desscriptor needs 256 bytes alignment; */ ++ RxPhyAddr = virt_to_bus(tpc->RxDescArrays); ++ diff = 256 - (RxPhyAddr - ((RxPhyAddr >> 8) << 8)); ++ RxPhyAddr += diff; ++ tpc->RxDescArray = (struct RxDesc *) (tpc->RxDescArrays + diff); ++ ++ if (tpc->TxDescArrays == NULL || tpc->RxDescArrays == NULL) { ++ printf("Allocate RxDescArray or TxDescArray failed\n"); ++ return; ++ } ++ ++ rtl8169_init_ring(nic); ++ rtl8169_hw_start(nic); ++ /* Construct a perfect filter frame with the mac address as first match ++ * and broadcast for all others */ ++ for (i = 0; i < 192; i++) ++ txb[i] = 0xFF; ++ ++ txb[0] = nic->node_addr[0]; ++ txb[1] = nic->node_addr[1]; ++ txb[2] = nic->node_addr[2]; ++ txb[3] = nic->node_addr[3]; ++ txb[4] = nic->node_addr[4]; ++ txb[5] = nic->node_addr[5]; ++} ++ ++/************************************************************************** ++DISABLE - Turn off ethernet interface ++***************************************************************************/ ++static void r8169_disable(struct dev *dev __unused) ++{ ++ int i; ++ /* Stop the chip's Tx and Rx DMA processes. */ ++ RTL_W8(ChipCmd, 0x00); ++ ++ /* Disable interrupts by clearing the interrupt mask. */ ++ RTL_W16(IntrMask, 0x0000); ++ ++ RTL_W32(RxMissed, 0); ++ ++ tpc->TxDescArrays = NULL; ++ tpc->RxDescArrays = NULL; ++ tpc->TxDescArray = NULL; ++ tpc->RxDescArray = NULL; ++ for (i = 0; i < NUM_RX_DESC; i++) { ++ tpc->RxBufferRing[i] = NULL; ++ } ++} ++ ++/************************************************************************** ++PROBE - Look for an adapter, this routine's visible to the outside ++***************************************************************************/ ++ ++#define board_found 1 ++#define valid_link 0 ++static int r8169_probe(struct dev *dev, struct pci_device *pci) ++{ ++ struct nic *nic = (struct nic *) dev; ++ static int board_idx = -1; ++ static int printed_version = 0; ++ int i, rc; ++ int option = -1, Cap10_100 = 0, Cap1000 = 0; ++ ++ printf("r8169.c: Found %s, Vendor=%hX Device=%hX\n", ++ pci->name, pci->vendor, pci->dev_id); ++ ++ board_idx++; ++ ++ printed_version = 1; ++ ++ /* point to private storage */ ++ tpc = &tpx; ++ ++ rc = rtl8169_init_board(pci); /* Return code is meaningless */ ++ ++ /* Get MAC address. FIXME: read EEPROM */ ++ for (i = 0; i < MAC_ADDR_LEN; i++) ++ nic->node_addr[i] = RTL_R8(MAC0 + i); ++ ++ dprintf(("%s: Identified chip type is '%s'.\n", pci->name, ++ rtl_chip_info[tpc->chipset].name)); ++ /* Print out some hardware info */ ++ printf("%s: %! at ioaddr %hX, ", pci->name, nic->node_addr, ++ ioaddr); ++ ++ /* if TBI is not endbled */ ++ if (!(RTL_R8(PHYstatus) & TBI_Enable)) { ++ int val = mdio_read(PHY_AUTO_NEGO_REG); ++ ++ option = media; ++ /* Force RTL8169 in 10/100/1000 Full/Half mode. */ ++ if (option > 0) { ++ printf(" Force-mode Enabled.\n"); ++ Cap10_100 = 0, Cap1000 = 0; ++ switch (option) { ++ case _10_Half: ++ Cap10_100 = PHY_Cap_10_Half; ++ Cap1000 = PHY_Cap_Null; ++ break; ++ case _10_Full: ++ Cap10_100 = PHY_Cap_10_Full; ++ Cap1000 = PHY_Cap_Null; ++ break; ++ case _100_Half: ++ Cap10_100 = PHY_Cap_100_Half; ++ Cap1000 = PHY_Cap_Null; ++ break; ++ case _100_Full: ++ Cap10_100 = PHY_Cap_100_Full; ++ Cap1000 = PHY_Cap_Null; ++ break; ++ case _1000_Full: ++ Cap10_100 = PHY_Cap_Null; ++ Cap1000 = PHY_Cap_1000_Full; ++ break; ++ default: ++ break; ++ } ++ /* leave PHY_AUTO_NEGO_REG bit4:0 unchanged */ ++ mdio_write(PHY_AUTO_NEGO_REG, ++ Cap10_100 | (val & 0x1F)); ++ mdio_write(PHY_1000_CTRL_REG, Cap1000); ++ } else { ++ dprintf(("Auto-negotiation Enabled.\n", ++ pci->name)); ++ ++ /* enable 10/100 Full/Half Mode, leave PHY_AUTO_NEGO_REG bit4:0 unchanged */ ++ mdio_write(PHY_AUTO_NEGO_REG, ++ PHY_Cap_10_Half | PHY_Cap_10_Full | ++ PHY_Cap_100_Half | PHY_Cap_100_Full | ++ (val & 0x1F)); ++ ++ /* enable 1000 Full Mode */ ++ mdio_write(PHY_1000_CTRL_REG, PHY_Cap_1000_Full); ++ ++ } ++ ++ /* Enable auto-negotiation and restart auto-nigotiation */ ++ mdio_write(PHY_CTRL_REG, ++ PHY_Enable_Auto_Nego | PHY_Restart_Auto_Nego); ++ udelay(100); ++ ++ /* wait for auto-negotiation process */ ++ for (i = 10000; i > 0; i--) { ++ /* Check if auto-negotiation complete */ ++ if (mdio_read(PHY_STAT_REG) & PHY_Auto_Neco_Comp) { ++ udelay(100); ++ option = RTL_R8(PHYstatus); ++ if (option & _1000bpsF) { ++ printf ++ ("1000Mbps Full-duplex operation.\n"); ++ } else { ++ printf ++ ("%sMbps %s-duplex operation.\n", ++ (option & _100bps) ? "100" : ++ "10", ++ (option & FullDup) ? "Full" : ++ "Half"); ++ } ++ break; ++ } else { ++ udelay(100); ++ } ++ } /* end for-loop to wait for auto-negotiation process */ ++ ++ } else { ++ udelay(100); ++ printf ++ ("%s: 1000Mbps Full-duplex operation, TBI Link %s!\n", ++ pci->name, ++ (RTL_R32(TBICSR) & TBILinkOK) ? "OK" : "Failed"); ++ ++ } ++ ++ r8169_reset(nic); ++ /* point to NIC specific routines */ ++ dev->disable = r8169_disable; ++ nic->poll = r8169_poll; ++ nic->transmit = r8169_transmit; ++ nic->irqno = pci->irq; ++ nic->irq = r8169_irq; ++ nic->ioaddr = ioaddr; ++ return 1; ++ ++} ++ ++static struct pci_id r8169_nics[] = { ++ PCI_ROM(0x10ec, 0x8169, "r8169", "RealTek RTL8169 Gigabit Ethernet"), ++}; ++ ++struct pci_driver r8169_driver = { ++ .type = NIC_DRIVER, ++ .name = "r8169/PCI", ++ .probe = r8169_probe, ++ .ids = r8169_nics, ++ .id_count = sizeof(r8169_nics) / sizeof(r8169_nics[0]), ++ .class = 0, ++}; +diff -Naur grub-0.97.orig/netboot/rtl8139.c grub-0.97/netboot/rtl8139.c +--- grub-0.97.orig/netboot/rtl8139.c 2003-07-09 11:45:38.000000000 +0000 ++++ grub-0.97/netboot/rtl8139.c 2005-08-31 19:03:35.000000000 +0000 +@@ -17,6 +17,8 @@ + /*********************************************************************/ + + /* ++ 28 Dec 2002 ken_yap@users.sourceforge.net (Ken Yap) ++ Put in virt_to_bus calls to allow Etherboot relocation. + + 06 Apr 2001 ken_yap@users.sourceforge.net (Ken Yap) + Following email from Hyun-Joon Cha, added a disable routine, otherwise +@@ -63,7 +65,6 @@ + #include "etherboot.h" + #include "nic.h" + #include "pci.h" +-#include "cards.h" + #include "timer.h" + + #define RTL_TIMEOUT (1*TICKS_PER_SEC) +@@ -112,9 +113,19 @@ + * definitions we will probably never need to know about. */ + }; + ++enum RxEarlyStatusBits { ++ ERGood=0x08, ERBad=0x04, EROVW=0x02, EROK=0x01 ++}; ++ + enum ChipCmdBits { + CmdReset=0x10, CmdRxEnb=0x08, CmdTxEnb=0x04, RxBufEmpty=0x01, }; + ++enum IntrMaskBits { ++ SERR=0x8000, TimeOut=0x4000, LenChg=0x2000, ++ FOVW=0x40, PUN_LinkChg=0x20, RXOVW=0x10, ++ TER=0x08, TOK=0x04, RER=0x02, ROK=0x01 ++}; ++ + /* Interrupt register bits, using my own meaningful names. */ + enum IntrStatusBits { + PCIErr=0x8000, PCSTimeout=0x4000, CableLenChange= 0x2000, +@@ -155,74 +166,68 @@ + AcceptMulticast=0x04, AcceptMyPhys=0x02, AcceptAllPhys=0x01, + }; + +-static int ioaddr; + static unsigned int cur_rx,cur_tx; + + /* The RTL8139 can only transmit from a contiguous, aligned memory block. */ + static unsigned char tx_buffer[TX_BUF_SIZE] __attribute__((aligned(4))); +- +-/* I know that this is a MEGA HACK, but the tagged boot image specification +- * states that we can do whatever we want below 0x10000 - so we do! */ +-/* But we still give the user the choice of using an internal buffer +- just in case - Ken */ +-#ifdef USE_LOWMEM_BUFFER +-#define rx_ring ((unsigned char *)(0x10000 - (RX_BUF_LEN + 16))) +-#else + static unsigned char rx_ring[RX_BUF_LEN+16] __attribute__((aligned(4))); +-#endif + +-struct nic *rtl8139_probe(struct nic *nic, unsigned short *probeaddrs, +- struct pci_device *pci); +-static int read_eeprom(int location); ++static int rtl8139_probe(struct dev *dev, struct pci_device *pci); ++static int read_eeprom(struct nic *nic, int location, int addr_len); + static void rtl_reset(struct nic *nic); + static void rtl_transmit(struct nic *nic, const char *destaddr, + unsigned int type, unsigned int len, const char *data); +-static int rtl_poll(struct nic *nic); +-static void rtl_disable(struct nic*); ++static int rtl_poll(struct nic *nic, int retrieve); ++static void rtl_disable(struct dev *); ++static void rtl_irq(struct nic *nic, irq_action_t action); + + +-struct nic *rtl8139_probe(struct nic *nic, unsigned short *probeaddrs, +- struct pci_device *pci) ++static int rtl8139_probe(struct dev *dev, struct pci_device *pci) + { ++ struct nic *nic = (struct nic *)dev; + int i; + int speed10, fullduplex; ++ int addr_len; ++ unsigned short *ap = (unsigned short*)nic->node_addr; + + /* There are enough "RTL8139" strings on the console already, so + * be brief and concentrate on the interesting pieces of info... */ + printf(" - "); + + /* Mask the bit that says "this is an io addr" */ +- ioaddr = probeaddrs[0] & ~3; ++ nic->ioaddr = pci->ioaddr & ~3; ++ ++ /* Copy IRQ from PCI information */ ++ nic->irqno = pci->irq; + + adjust_pci_device(pci); + + /* Bring the chip out of low-power mode. */ +- outb(0x00, ioaddr + Config1); +- +- if (read_eeprom(0) != 0xffff) { +- unsigned short *ap = (unsigned short*)nic->node_addr; +- for (i = 0; i < 3; i++) +- *ap++ = read_eeprom(i + 7); +- } else { +- unsigned char *ap = (unsigned char*)nic->node_addr; +- for (i = 0; i < ETH_ALEN; i++) +- *ap++ = inb(ioaddr + MAC0 + i); +- } ++ outb(0x00, nic->ioaddr + Config1); + +- speed10 = inb(ioaddr + MediaStatus) & MSRSpeed10; +- fullduplex = inw(ioaddr + MII_BMCR) & BMCRDuplex; +- printf("ioaddr %#hX, addr %! %sMbps %s-duplex\n", ioaddr, +- nic->node_addr, speed10 ? "10" : "100", +- fullduplex ? "full" : "half"); ++ addr_len = read_eeprom(nic,0,8) == 0x8129 ? 8 : 6; ++ for (i = 0; i < 3; i++) ++ *ap++ = read_eeprom(nic,i + 7,addr_len); ++ ++ speed10 = inb(nic->ioaddr + MediaStatus) & MSRSpeed10; ++ fullduplex = inw(nic->ioaddr + MII_BMCR) & BMCRDuplex; ++ printf("ioaddr %#hX, irq %d, addr %! %sMbps %s-duplex\n", nic->ioaddr, ++ nic->irqno, nic->node_addr, speed10 ? "10" : "100", ++ fullduplex ? "full" : "half"); + + rtl_reset(nic); + +- nic->reset = rtl_reset; +- nic->poll = rtl_poll; ++ if (inb(nic->ioaddr + MediaStatus) & MSRLinkFail) { ++ printf("Cable not connected or other link failure\n"); ++ return(0); ++ } ++ ++ dev->disable = rtl_disable; ++ nic->poll = rtl_poll; + nic->transmit = rtl_transmit; +- nic->disable = rtl_disable; ++ nic->irq = rtl_irq; + +- return nic; ++ return 1; + } + + /* Serial EEPROM section. */ +@@ -244,22 +249,23 @@ + #define eeprom_delay() inl(ee_addr) + + /* The EEPROM commands include the alway-set leading bit. */ +-#define EE_WRITE_CMD (5 << 6) +-#define EE_READ_CMD (6 << 6) +-#define EE_ERASE_CMD (7 << 6) ++#define EE_WRITE_CMD (5) ++#define EE_READ_CMD (6) ++#define EE_ERASE_CMD (7) + +-static int read_eeprom(int location) ++static int read_eeprom(struct nic *nic, int location, int addr_len) + { + int i; + unsigned int retval = 0; +- long ee_addr = ioaddr + Cfg9346; +- int read_cmd = location | EE_READ_CMD; ++ long ee_addr = nic->ioaddr + Cfg9346; ++ int read_cmd = location | (EE_READ_CMD << addr_len); + + outb(EE_ENB & ~EE_CS, ee_addr); + outb(EE_ENB, ee_addr); ++ eeprom_delay(); + + /* Shift the read command bits out. */ +- for (i = 10; i >= 0; i--) { ++ for (i = 4 + addr_len; i >= 0; i--) { + int dataval = (read_cmd & (1 << i)) ? EE_DATA_WRITE : 0; + outb(EE_ENB | dataval, ee_addr); + eeprom_delay(); +@@ -279,31 +285,51 @@ + + /* Terminate the EEPROM access. */ + outb(~EE_CS, ee_addr); ++ eeprom_delay(); + return retval; + } + ++static const unsigned int rtl8139_rx_config = ++ (RX_BUF_LEN_IDX << 11) | ++ (RX_FIFO_THRESH << 13) | ++ (RX_DMA_BURST << 8); ++ ++static void set_rx_mode(struct nic *nic) { ++ unsigned int mc_filter[2]; ++ int rx_mode; ++ /* !IFF_PROMISC */ ++ rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; ++ mc_filter[1] = mc_filter[0] = 0xffffffff; ++ ++ outl(rtl8139_rx_config | rx_mode, nic->ioaddr + RxConfig); ++ ++ outl(mc_filter[0], nic->ioaddr + MAR0 + 0); ++ outl(mc_filter[1], nic->ioaddr + MAR0 + 4); ++} ++ + static void rtl_reset(struct nic* nic) + { + int i; + +- outb(CmdReset, ioaddr + ChipCmd); ++ outb(CmdReset, nic->ioaddr + ChipCmd); + + cur_rx = 0; + cur_tx = 0; + + /* Give the chip 10ms to finish the reset. */ + load_timer2(10*TICKS_PER_MS); +- while ((inb(ioaddr + ChipCmd) & CmdReset) != 0 && timer2_running()) ++ while ((inb(nic->ioaddr + ChipCmd) & CmdReset) != 0 && ++ timer2_running()) + /* wait */; + + for (i = 0; i < ETH_ALEN; i++) +- outb(nic->node_addr[i], ioaddr + MAC0 + i); ++ outb(nic->node_addr[i], nic->ioaddr + MAC0 + i); + + /* Must enable Tx/Rx before setting transfer thresholds! */ +- outb(CmdRxEnb | CmdTxEnb, ioaddr + ChipCmd); ++ outb(CmdRxEnb | CmdTxEnb, nic->ioaddr + ChipCmd); + outl((RX_FIFO_THRESH<<13) | (RX_BUF_LEN_IDX<<11) | (RX_DMA_BURST<<8), +- ioaddr + RxConfig); /* accept no frames yet! */ +- outl((TX_DMA_BURST<<8)|0x03000000, ioaddr + TxConfig); ++ nic->ioaddr + RxConfig); /* accept no frames yet! */ ++ outl((TX_DMA_BURST<<8)|0x03000000, nic->ioaddr + TxConfig); + + /* The Linux driver changes Config1 here to use a different LED pattern + * for half duplex or full/autodetect duplex (for full/autodetect, the +@@ -316,19 +342,26 @@ + #ifdef DEBUG_RX + printf("rx ring address is %X\n",(unsigned long)rx_ring); + #endif +- outl((unsigned long)rx_ring, ioaddr + RxBuf); ++ outl((unsigned long)virt_to_bus(rx_ring), nic->ioaddr + RxBuf); ++ ++ + +- /* Start the chip's Tx and Rx process. */ +- outl(0, ioaddr + RxMissed); +- /* set_rx_mode */ +- outb(AcceptBroadcast|AcceptMyPhys, ioaddr + RxConfig); + /* If we add multicast support, the MAR0 register would have to be + * initialized to 0xffffffffffffffff (two 32 bit accesses). Etherboot + * only needs broadcast (for ARP/RARP/BOOTP/DHCP) and unicast. */ +- outb(CmdRxEnb | CmdTxEnb, ioaddr + ChipCmd); + ++ outb(CmdRxEnb | CmdTxEnb, nic->ioaddr + ChipCmd); ++ ++ outl(rtl8139_rx_config, nic->ioaddr + RxConfig); ++ ++ /* Start the chip's Tx and Rx process. */ ++ outl(0, nic->ioaddr + RxMissed); ++ ++ /* set_rx_mode */ ++ set_rx_mode(nic); ++ + /* Disable all known interrupts by setting the interrupt mask. */ +- outw(0, ioaddr + IntrMask); ++ outw(0, nic->ioaddr + IntrMask); + } + + static void rtl_transmit(struct nic *nic, const char *destaddr, +@@ -337,10 +370,11 @@ + unsigned int status, to, nstype; + unsigned long txstatus; + ++ /* nstype assignment moved up here to avoid gcc 3.0.3 compiler bug */ ++ nstype = htons(type); + memcpy(tx_buffer, destaddr, ETH_ALEN); + memcpy(tx_buffer + ETH_ALEN, nic->node_addr, ETH_ALEN); +- nstype = htons(type); +- memcpy(tx_buffer + 2 * ETH_ALEN, (char*)&nstype, 2); ++ memcpy(tx_buffer + 2 * ETH_ALEN, &nstype, 2); + memcpy(tx_buffer + ETH_HLEN, data, len); + + len += ETH_HLEN; +@@ -354,22 +388,22 @@ + tx_buffer[len++] = '\0'; + } + +- outl((unsigned long)tx_buffer, ioaddr + TxAddr0 + cur_tx*4); ++ outl((unsigned long)virt_to_bus(tx_buffer), nic->ioaddr + TxAddr0 + cur_tx*4); + outl(((TX_FIFO_THRESH<<11) & 0x003f0000) | len, +- ioaddr + TxStatus0 + cur_tx*4); ++ nic->ioaddr + TxStatus0 + cur_tx*4); + + to = currticks() + RTL_TIMEOUT; + + do { +- status = inw(ioaddr + IntrStatus); ++ status = inw(nic->ioaddr + IntrStatus); + /* Only acknlowledge interrupt sources we can properly handle + * here - the RxOverflow/RxFIFOOver MUST be handled in the + * rtl_poll() function. */ +- outw(status & (TxOK | TxErr | PCIErr), ioaddr + IntrStatus); ++ outw(status & (TxOK | TxErr | PCIErr), nic->ioaddr + IntrStatus); + if ((status & (TxOK | TxErr | PCIErr)) != 0) break; + } while (currticks() < to); + +- txstatus = inl(ioaddr+ TxStatus0 + cur_tx*4); ++ txstatus = inl(nic->ioaddr+ TxStatus0 + cur_tx*4); + + if (status & TxOK) { + cur_tx = (cur_tx + 1) % NUM_TX_DESC; +@@ -386,19 +420,22 @@ + } + } + +-static int rtl_poll(struct nic *nic) ++static int rtl_poll(struct nic *nic, int retrieve) + { + unsigned int status; + unsigned int ring_offs; + unsigned int rx_size, rx_status; + +- if (inb(ioaddr + ChipCmd) & RxBufEmpty) { ++ if (inb(nic->ioaddr + ChipCmd) & RxBufEmpty) { + return 0; + } + +- status = inw(ioaddr + IntrStatus); ++ /* There is a packet ready */ ++ if ( ! retrieve ) return 1; ++ ++ status = inw(nic->ioaddr + IntrStatus); + /* See below for the rest of the interrupt acknowledges. */ +- outw(status & ~(RxFIFOOver | RxOverflow | RxOK), ioaddr + IntrStatus); ++ outw(status & ~(RxFIFOOver | RxOverflow | RxOK), nic->ioaddr + IntrStatus); + + #ifdef DEBUG_RX + printf("rtl_poll: int %hX ", status); +@@ -438,21 +475,77 @@ + nic->packet[12], nic->packet[13], rx_status); + #endif + cur_rx = (cur_rx + rx_size + 4 + 3) & ~3; +- outw(cur_rx - 16, ioaddr + RxBufPtr); ++ outw(cur_rx - 16, nic->ioaddr + RxBufPtr); + /* See RTL8139 Programming Guide V0.1 for the official handling of + * Rx overflow situations. The document itself contains basically no + * usable information, except for a few exception handling rules. */ +- outw(status & (RxFIFOOver | RxOverflow | RxOK), ioaddr + IntrStatus); ++ outw(status & (RxFIFOOver | RxOverflow | RxOK), nic->ioaddr + IntrStatus); + return 1; + } + +-static void rtl_disable(struct nic *nic) ++static void rtl_irq(struct nic *nic, irq_action_t action) + { ++ unsigned int mask; ++ /* Bit of a guess as to which interrupts we should allow */ ++ unsigned int interested = ROK | RER | RXOVW | FOVW | SERR; ++ ++ switch ( action ) { ++ case DISABLE : ++ case ENABLE : ++ mask = inw(nic->ioaddr + IntrMask); ++ mask = mask & ~interested; ++ if ( action == ENABLE ) mask = mask | interested; ++ outw(mask, nic->ioaddr + IntrMask); ++ break; ++ case FORCE : ++ /* Apparently writing a 1 to this read-only bit of a ++ * read-only and otherwise unrelated register will ++ * force an interrupt. If you ever want to see how ++ * not to write a datasheet, read the one for the ++ * RTL8139... ++ */ ++ outb(EROK, nic->ioaddr + RxEarlyStatus); ++ break; ++ } ++} ++ ++static void rtl_disable(struct dev *dev) ++{ ++ struct nic *nic = (struct nic *)dev; ++ /* merge reset and disable */ ++ rtl_reset(nic); ++ + /* reset the chip */ +- outb(CmdReset, ioaddr + ChipCmd); ++ outb(CmdReset, nic->ioaddr + ChipCmd); + + /* 10 ms timeout */ + load_timer2(10*TICKS_PER_MS); +- while ((inb(ioaddr + ChipCmd) & CmdReset) != 0 && timer2_running()) ++ while ((inb(nic->ioaddr + ChipCmd) & CmdReset) != 0 && timer2_running()) + /* wait */; + } ++ ++static struct pci_id rtl8139_nics[] = { ++PCI_ROM(0x10ec, 0x8129, "rtl8129", "Realtek 8129"), ++PCI_ROM(0x10ec, 0x8139, "rtl8139", "Realtek 8139"), ++PCI_ROM(0x10ec, 0x8138, "rtl8139b", "Realtek 8139B"), ++PCI_ROM(0x1186, 0x1300, "dfe538", "DFE530TX+/DFE538TX"), ++PCI_ROM(0x1113, 0x1211, "smc1211-1", "SMC EZ10/100"), ++PCI_ROM(0x1112, 0x1211, "smc1211", "SMC EZ10/100"), ++PCI_ROM(0x1500, 0x1360, "delta8139", "Delta Electronics 8139"), ++PCI_ROM(0x4033, 0x1360, "addtron8139", "Addtron Technology 8139"), ++PCI_ROM(0x1186, 0x1340, "dfe690txd", "D-Link DFE690TXD"), ++PCI_ROM(0x13d1, 0xab06, "fe2000vx", "AboCom FE2000VX"), ++PCI_ROM(0x1259, 0xa117, "allied8139", "Allied Telesyn 8139"), ++PCI_ROM(0x14ea, 0xab06, "fnw3603tx", "Planex FNW-3603-TX"), ++PCI_ROM(0x14ea, 0xab07, "fnw3800tx", "Planex FNW-3800-TX"), ++PCI_ROM(0xffff, 0x8139, "clone-rtl8139", "Cloned 8139"), ++}; ++ ++struct pci_driver rtl8139_driver = { ++ .type = NIC_DRIVER, ++ .name = "RTL8139", ++ .probe = rtl8139_probe, ++ .ids = rtl8139_nics, ++ .id_count = sizeof(rtl8139_nics)/sizeof(rtl8139_nics[0]), ++ .class = 0, ++}; +diff -Naur grub-0.97.orig/netboot/segoff.h grub-0.97/netboot/segoff.h +--- grub-0.97.orig/netboot/segoff.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/segoff.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,43 @@ ++/* ++ * Segment:offset types and macros ++ * ++ * Initially written by Michael Brown (mcb30). ++ */ ++ ++#ifndef SEGOFF_H ++#define SEGOFF_H ++ ++#include ++#include ++ ++/* Segment:offset structure. Note that the order within the structure ++ * is offset:segment. ++ */ ++typedef struct { ++ uint16_t offset; ++ uint16_t segment; ++} segoff_t; ++ ++/* For PXE stuff */ ++typedef segoff_t SEGOFF16_t; ++ ++/* Macros for converting from virtual to segment:offset addresses, ++ * when we don't actually care which of the many isomorphic results we ++ * get. ++ */ ++#ifdef DEBUG_SEGMENT ++uint16_t SEGMENT ( const void * const ptr ) { ++ uint32_t phys = virt_to_phys ( ptr ); ++ if ( phys > 0xfffff ) { ++ printf ( "FATAL ERROR: segment address out of range\n" ); ++ } ++ return phys >> 4; ++} ++#else ++#define SEGMENT(x) ( virt_to_phys ( x ) >> 4 ) ++#endif ++#define OFFSET(x) ( virt_to_phys ( x ) & 0xf ) ++#define SEGOFF(x) { OFFSET(x), SEGMENT(x) } ++#define VIRTUAL(x,y) ( phys_to_virt ( ( ( x ) << 4 ) + ( y ) ) ) ++ ++#endif /* SEGOFF_H */ +diff -Naur grub-0.97.orig/netboot/sis900.c grub-0.97/netboot/sis900.c +--- grub-0.97.orig/netboot/sis900.c 2003-07-09 11:45:38.000000000 +0000 ++++ grub-0.97/netboot/sis900.c 2005-08-31 20:02:38.000000000 +0000 +@@ -27,6 +27,11 @@ + /* Revision History */ + + /* ++ 07 Dec 2003 timlegge - Enabled Multicast Support ++ 06 Dec 2003 timlegge - Fixed relocation issue in 5.2 ++ 04 Jan 2002 Chien-Yu Chen, Doug Ambrisko, Marty Connor Patch to Etherboot 5.0.5 ++ Added support for the SiS 630ET plus various bug fixes from linux kernel ++ source 2.4.17. + 01 March 2001 mdc 1.0 + Initial Release. Tested with PCI based sis900 card and ThinkNIC + computer. +@@ -35,13 +40,12 @@ + Testet with SIS730S chipset + ICS1893 + */ + +- + /* Includes */ + + #include "etherboot.h" + #include "nic.h" + #include "pci.h" +-#include "cards.h" ++#include "timer.h" + + #include "sis900.h" + +@@ -51,6 +55,7 @@ + + static unsigned short vendor, dev_id; + static unsigned long ioaddr; ++static u8 pci_revision; + + static unsigned int cur_phy; + +@@ -58,15 +63,10 @@ + + static BufferDesc txd; + static BufferDesc rxd[NUM_RX_DESC]; +- +-#ifdef USE_LOWMEM_BUFFER +-#define txb ((char *)0x10000 - TX_BUF_SIZE) +-#define rxb ((char *)0x10000 - NUM_RX_DESC*RX_BUF_SIZE - TX_BUF_SIZE) +-#else + static unsigned char txb[TX_BUF_SIZE]; + static unsigned char rxb[NUM_RX_DESC * RX_BUF_SIZE]; +-#endif + ++#if 0 + static struct mac_chip_info { + const char *name; + u16 vendor_id, device_id, flags; +@@ -78,11 +78,13 @@ + PCI_COMMAND_IO|PCI_COMMAND_MASTER, SIS900_TOTAL_SIZE}, + {0,0,0,0,0} /* 0 terminated list. */ + }; ++#endif + + static void sis900_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex); + static void amd79c901_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex); + static void ics1893_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex); + static void rtl8201_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex); ++static void vt6103_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex); + + static struct mii_chip_info { + const char * name; +@@ -96,6 +98,7 @@ + {"AMD 79C901 HomePNA PHY", 0x0000, 0x35c8, amd79c901_read_mode}, + {"ICS 1893 Integrated PHYceiver" , 0x0015, 0xf441,ics1893_read_mode}, + {"RTL 8201 10/100Mbps Phyceiver" , 0x0000, 0x8201,rtl8201_read_mode}, ++ {"VIA 6103 10/100Mbps Phyceiver", 0x0101, 0x8f20,vt6103_read_mode}, + {0,0,0,0} + }; + +@@ -106,24 +109,32 @@ + u16 status; + } mii; + +- + // PCI to ISA bridge for SIS640E access +-static struct pci_device pci_isa_bridge_list[] = { ++static struct pci_id pci_isa_bridge_list[] = { + { 0x1039, 0x0008, +- "SIS 85C503/5513 PCI to ISA bridge", 0, 0, 0, 0}, +- {0, 0, NULL, 0, 0, 0, 0} ++ "SIS 85C503/5513 PCI to ISA bridge"}, ++}; ++ ++struct pci_driver sis_bridge_driver = { ++ .type = BRIDGE_DRIVER, ++ .name = "", ++ .probe = 0, ++ .ids = pci_isa_bridge_list, ++ .id_count = sizeof(pci_isa_bridge_list)/sizeof(pci_isa_bridge_list[0]), ++ .class = 0, + }; + + /* Function Prototypes */ + +-struct nic *sis900_probe(struct nic *nic, unsigned short *io_addrs, struct pci_device *pci); ++static int sis900_probe(struct dev *dev, struct pci_device *pci); + + static u16 sis900_read_eeprom(int location); + static void sis900_mdio_reset(long mdio_addr); + static void sis900_mdio_idle(long mdio_addr); + static u16 sis900_mdio_read(int phy_id, int location); ++#if 0 + static void sis900_mdio_write(int phy_id, int location, int val); +- ++#endif + static void sis900_init(struct nic *nic); + + static void sis900_reset(struct nic *nic); +@@ -136,9 +147,11 @@ + + static void sis900_transmit(struct nic *nic, const char *d, + unsigned int t, unsigned int s, const char *p); +-static int sis900_poll(struct nic *nic); ++static int sis900_poll(struct nic *nic, int retrieve); ++ ++static void sis900_disable(struct dev *dev); + +-static void sis900_disable(struct nic *nic); ++static void sis900_irq(struct nic *nic, irq_action_t action); + + /** + * sis900_get_mac_addr: - Get MAC address for stand alone SiS900 model +@@ -149,7 +162,7 @@ + * MAC address is read from read_eeprom() into @net_dev->dev_addr. + */ + +-static int sis900_get_mac_addr(struct pci_device * pci_dev , struct nic *nic) ++static int sis900_get_mac_addr(struct pci_device * pci_dev __unused, struct nic *nic) + { + u16 signature; + int i; +@@ -168,6 +181,50 @@ + } + + /** ++ * sis96x_get_mac_addr: - Get MAC address for SiS962 or SiS963 model ++ * @pci_dev: the sis900 pci device ++ * @net_dev: the net device to get address for ++ * ++ * SiS962 or SiS963 model, use EEPROM to store MAC address. And EEPROM ++ * is shared by ++ * LAN and 1394. When access EEPROM, send EEREQ signal to hardware first ++ * and wait for EEGNT. If EEGNT is ON, EEPROM is permitted to be access ++ * by LAN, otherwise is not. After MAC address is read from EEPROM, send ++ * EEDONE signal to refuse EEPROM access by LAN. ++ * The EEPROM map of SiS962 or SiS963 is different to SiS900. ++ * The signature field in SiS962 or SiS963 spec is meaningless. ++ * MAC address is read into @net_dev->dev_addr. ++ */ ++ ++static int sis96x_get_mac_addr(struct pci_device * pci_dev __unused, struct nic *nic) ++{ ++/* long ioaddr = net_dev->base_addr; */ ++ long ee_addr = ioaddr + mear; ++ u32 waittime = 0; ++ int i; ++ ++ printf("Alternate function\n"); ++ ++ outl(EEREQ, ee_addr); ++ while(waittime < 2000) { ++ if(inl(ee_addr) & EEGNT) { ++ ++ /* get MAC address from EEPROM */ ++ for (i = 0; i < 3; i++) ++ ((u16 *)(nic->node_addr))[i] = sis900_read_eeprom(i+EEPROMMACAddr); ++ ++ outl(EEDONE, ee_addr); ++ return 1; ++ } else { ++ udelay(1); ++ waittime ++; ++ } ++ } ++ outl(EEDONE, ee_addr); ++ return 0; ++} ++ ++/** + * sis630e_get_mac_addr: - Get MAC address for SiS630E model + * @pci_dev: the sis900 pci device + * @net_dev: the net device to get address for +@@ -177,17 +234,21 @@ + * MAC address is read into @net_dev->dev_addr. + */ + +-static int sis630e_get_mac_addr(struct pci_device * pci_dev, struct nic *nic) ++static int sis630e_get_mac_addr(struct pci_device * pci_dev __unused, struct nic *nic) + { + u8 reg; + int i; +- struct pci_device *p; +- +- // find PCI to ISA bridge +- eth_pci_init(pci_isa_bridge_list); ++ struct pci_device p[1]; + +- /* the firts entry in this list should contain bus/devfn */ +- p = pci_isa_bridge_list; ++ /* find PCI to ISA bridge */ ++ memset(p, 0, sizeof(p)); ++ do { ++ find_pci(BRIDGE_DRIVER, p); ++ } while(p->driver && p->driver != &sis_bridge_driver); ++ ++ /* error on failure */ ++ if (!p->driver) ++ return 0; + + pcibios_read_config_byte(p->bus,p->devfn, 0x48, ®); + pcibios_write_config_byte(p->bus,p->devfn, 0x48, reg | 0x40); +@@ -201,7 +262,43 @@ + + return 1; + } +- ++ ++/** ++ * sis630e_get_mac_addr: - Get MAC address for SiS630E model ++ * @pci_dev: the sis900 pci device ++ * @net_dev: the net device to get address for ++ * ++ * SiS630E model, use APC CMOS RAM to store MAC address. ++ * APC CMOS RAM is accessed through ISA bridge. ++ * MAC address is read into @net_dev->dev_addr. ++ */ ++ ++static int sis635_get_mac_addr(struct pci_device * pci_dev __unused, struct nic *nic) ++{ ++ u32 rfcrSave; ++ u32 i; ++ ++ ++ rfcrSave = inl(rfcr + ioaddr); ++ ++ outl(rfcrSave | RELOAD, ioaddr + cr); ++ outl(0, ioaddr + cr); ++ ++ /* disable packet filtering before setting filter */ ++ outl(rfcrSave & ~RFEN, rfcr + ioaddr); ++ ++ /* load MAC addr to filter data register */ ++ for (i = 0 ; i < 3 ; i++) { ++ outl((i << RFADDR_shift), ioaddr + rfcr); ++ *( ((u16 *)nic->node_addr) + i) = inw(ioaddr + rfdr); ++ } ++ ++ /* enable packet filitering */ ++ outl(rfcrSave | RFEN, rfcr + ioaddr); ++ ++ return 1; ++} ++ + /* + * Function: sis900_probe + * +@@ -216,19 +313,21 @@ + * Returns: struct nic *: pointer to NIC data structure + */ + +-struct nic *sis900_probe(struct nic *nic, unsigned short *io_addrs, struct pci_device *pci) ++static int sis900_probe(struct dev *dev, struct pci_device *pci) + { ++ struct nic *nic = (struct nic *)dev; + int i; + int found=0; + int phy_addr; +- u16 signature; + u8 revision; + int ret; + +- if (io_addrs == 0 || *io_addrs == 0) +- return NULL; ++ if (pci->ioaddr == 0) ++ return 0; + +- ioaddr = *io_addrs & ~3; ++ nic->irqno = 0; ++ nic->ioaddr = pci->ioaddr & ~3; ++ ioaddr = pci->ioaddr & ~3; + vendor = pci->vendor; + dev_id = pci->dev_id; + +@@ -240,19 +339,29 @@ + /* get MAC address */ + ret = 0; + pcibios_read_config_byte(pci->bus,pci->devfn, PCI_REVISION, &revision); +- if (revision == SIS630E_900_REV || revision == SIS630EA1_900_REV) +- ret = sis630e_get_mac_addr(pci, nic); +- else if (revision == SIS630S_900_REV) ++ ++ /* save for use later in sis900_reset() */ ++ pci_revision = revision; ++ ++ if (revision == SIS630E_900_REV) + ret = sis630e_get_mac_addr(pci, nic); ++ else if ((revision > 0x81) && (revision <= 0x90)) ++ ret = sis635_get_mac_addr(pci, nic); ++ else if (revision == SIS96x_900_REV) ++ ret = sis96x_get_mac_addr(pci, nic); + else + ret = sis900_get_mac_addr(pci, nic); + + if (ret == 0) + { + printf ("sis900_probe: Error MAC address not found\n"); +- return NULL; ++ return 0; + } + ++ /* 630ET : set the mii access mode as software-mode */ ++ if (revision == SIS630ET_900_REV) ++ outl(ACCESSMODE | inl(ioaddr + cr), ioaddr + cr); ++ + printf("\nsis900_probe: MAC addr %! at ioaddr %#hX\n", + nic->node_addr, ioaddr); + printf("sis900_probe: Vendor:%#hX Device:%#hX\n", vendor, dev_id); +@@ -264,7 +373,7 @@ + for (phy_addr = 0; phy_addr < 32; phy_addr++) { + u16 mii_status; + u16 phy_id0, phy_id1; +- ++ + mii_status = sis900_mdio_read(phy_addr, MII_STATUS); + if (mii_status == 0xffff || mii_status == 0x0000) + /* the mii is not accessable, try next one */ +@@ -272,7 +381,7 @@ + + phy_id0 = sis900_mdio_read(phy_addr, MII_PHY_ID0); + phy_id1 = sis900_mdio_read(phy_addr, MII_PHY_ID1); +- ++ + /* search our mii table for the current mii */ + for (i = 0; mii_chip_table[i].phy_id1; i++) { + +@@ -294,7 +403,7 @@ + + if (found == 0) { + printf("sis900_probe: No MII transceivers found!\n"); +- return NULL; ++ return 0; + } + + /* Arbitrarily select the last PHY found as current PHY */ +@@ -304,15 +413,14 @@ + /* initialize device */ + sis900_init(nic); + +- nic->reset = sis900_init; ++ dev->disable = sis900_disable; + nic->poll = sis900_poll; + nic->transmit = sis900_transmit; +- nic->disable = sis900_disable; ++ nic->irq = sis900_irq; + +- return nic; ++ return 1; + } + +- + /* + * EEPROM Routines: These functions read and write to EEPROM for + * retrieving the MAC address and other configuration information about +@@ -322,7 +430,6 @@ + /* Delay between EEPROM clock transitions. */ + #define eeprom_delay() inl(ee_addr) + +- + /* Function: sis900_read_eeprom + * + * Description: reads and returns a given location from EEPROM +@@ -378,7 +485,6 @@ + + #define sis900_mdio_delay() inl(mdio_addr) + +- + /* + Read and write the MII management registers using software-generated + serial MDIO protocol. Note that the command bits and data bits are +@@ -432,9 +538,11 @@ + outl(MDC, mdio_addr); + sis900_mdio_delay(); + } ++ outl(0x00, mdio_addr); + return retval; + } + ++#if 0 + static void sis900_mdio_write(int phy_id, int location, int value) + { + long mdio_addr = ioaddr + mear; +@@ -471,10 +579,11 @@ + outb(MDC, mdio_addr); + sis900_mdio_delay(); + } ++ outl(0x00, mdio_addr); + return; + } ++#endif + +- + /* Function: sis900_init + * + * Description: resets the ethernet controller chip and various +@@ -500,10 +609,9 @@ + + sis900_check_mode(nic); + +- outl(RxENA, ioaddr + cr); ++ outl(RxENA| inl(ioaddr + cr), ioaddr + cr); + } + +- + /* + * Function: sis900_reset + * +@@ -515,7 +623,7 @@ + */ + + static void +-sis900_reset(struct nic *nic) ++sis900_reset(struct nic *nic __unused) + { + int i = 0; + u32 status = TxRCMP | RxRCMP; +@@ -524,16 +632,19 @@ + outl(0, ioaddr + imr); + outl(0, ioaddr + rfcr); + +- outl(RxRESET | TxRESET | RESET, ioaddr + cr); +- ++ outl(RxRESET | TxRESET | RESET | inl(ioaddr + cr), ioaddr + cr); ++ + /* Check that the chip has finished the reset. */ + while (status && (i++ < 1000)) { + status ^= (inl(isr + ioaddr) & status); + } +- outl(PESEL, ioaddr + cfg); ++ ++ if( (pci_revision == SIS635A_900_REV) || (pci_revision == SIS900B_900_REV) ) ++ outl(PESEL | RND_CNT, ioaddr + cfg); ++ else ++ outl(PESEL, ioaddr + cfg); + } + +- + /* Function: sis_init_rxfilter + * + * Description: sets receive filter address to our MAC address +@@ -552,7 +663,7 @@ + rfcrSave = inl(rfcr + ioaddr); + + /* disable packet filtering before setting filter */ +- outl(rfcrSave & ~RFEN, rfcr); ++ outl(rfcrSave & ~RFEN, rfcr + ioaddr); + + /* load MAC addr to filter data register */ + for (i = 0 ; i < 3 ; i++) { +@@ -571,7 +682,6 @@ + outl(rfcrSave | RFEN, rfcr + ioaddr); + } + +- + /* + * Function: sis_init_txd + * +@@ -583,20 +693,19 @@ + */ + + static void +-sis900_init_txd(struct nic *nic) ++sis900_init_txd(struct nic *nic __unused) + { + txd.link = (u32) 0; + txd.cmdsts = (u32) 0; +- txd.bufptr = (u32) &txb[0]; ++ txd.bufptr = virt_to_bus(&txb[0]); + + /* load Transmit Descriptor Register */ +- outl((u32) &txd, ioaddr + txdp); ++ outl(virt_to_bus(&txd), ioaddr + txdp); + if (sis900_debug > 0) + printf("sis900_init_txd: TX descriptor register loaded with: %X\n", + inl(ioaddr + txdp)); + } + +- + /* Function: sis_init_rxd + * + * Description: initializes the Rx descriptor ring +@@ -607,7 +716,7 @@ + */ + + static void +-sis900_init_rxd(struct nic *nic) ++sis900_init_rxd(struct nic *nic __unused) + { + int i; + +@@ -615,16 +724,16 @@ + + /* init RX descriptor */ + for (i = 0; i < NUM_RX_DESC; i++) { +- rxd[i].link = (i+1 < NUM_RX_DESC) ? (u32) &rxd[i+1] : (u32) &rxd[0]; ++ rxd[i].link = virt_to_bus((i+1 < NUM_RX_DESC) ? &rxd[i+1] : &rxd[0]); + rxd[i].cmdsts = (u32) RX_BUF_SIZE; +- rxd[i].bufptr = (u32) &rxb[i*RX_BUF_SIZE]; ++ rxd[i].bufptr = virt_to_bus(&rxb[i*RX_BUF_SIZE]); + if (sis900_debug > 0) + printf("sis900_init_rxd: rxd[%d]=%X link=%X cmdsts=%X bufptr=%X\n", + i, &rxd[i], rxd[i].link, rxd[i].cmdsts, rxd[i].bufptr); + } + + /* load Receive Descriptor Register */ +- outl((u32) &rxd[0], ioaddr + rxdp); ++ outl(virt_to_bus(&rxd[0]), ioaddr + rxdp); + + if (sis900_debug > 0) + printf("sis900_init_rxd: RX descriptor register loaded with: %X\n", +@@ -632,7 +741,6 @@ + + } + +- + /* Function: sis_init_rxd + * + * Description: +@@ -644,25 +752,36 @@ + * Returns: void. + */ + +-static void sis900_set_rx_mode(struct nic *nic) ++static void sis900_set_rx_mode(struct nic *nic __unused) + { +- int i; ++ int i, table_entries; ++ u32 rx_mode; ++ u16 mc_filter[16] = {0}; /* 256/128 bits multicast hash table */ ++ ++ if((pci_revision == SIS635A_900_REV) || (pci_revision == SIS900B_900_REV)) ++ table_entries = 16; ++ else ++ table_entries = 8; + +- /* Configure Multicast Hash Table in Receive Filter +- to reject all MCAST packets */ +- for (i = 0; i < 8; i++) { ++ /* accept all multicast packet */ ++ rx_mode = RFAAB | RFAAM; ++ for (i = 0; i < table_entries; i++) ++ mc_filter[i] = 0xffff; ++ ++ /* update Multicast Hash Table in Receive Filter */ ++ for (i = 0; i < table_entries; i++) { + /* why plus 0x04? That makes the correct value for hash table. */ + outl((u32)(0x00000004+i) << RFADDR_shift, ioaddr + rfcr); +- outl((u32)(0x0), ioaddr + rfdr); ++ outl(mc_filter[i], ioaddr + rfdr); + } +- /* Accept Broadcast packets, destination addresses that match ++ ++ /* Accept Broadcast and multicast packets, destination addresses that match + our MAC address */ +- outl(RFEN | RFAAB, ioaddr + rfcr); ++ outl(RFEN | rx_mode, ioaddr + rfcr); + + return; + } + +- + /* Function: sis900_check_mode + * + * Description: checks the state of transmit and receive +@@ -674,15 +793,21 @@ + */ + + static void +-sis900_check_mode (struct nic *nic) ++sis900_check_mode(struct nic *nic) + { + int speed, duplex; + u32 tx_flags = 0, rx_flags = 0; + + mii.chip_info->read_mode(nic, cur_phy, &speed, &duplex); + +- tx_flags = TxATP | (TX_DMA_BURST << TxMXDMA_shift) | (TX_FILL_THRESH << TxFILLT_shift); +- rx_flags = RX_DMA_BURST << RxMXDMA_shift; ++ if( inl(ioaddr + cfg) & EDB_MASTER_EN ) { ++ tx_flags = TxATP | (DMA_BURST_64 << TxMXDMA_shift) | (TX_FILL_THRESH << TxFILLT_shift); ++ rx_flags = DMA_BURST_64 << RxMXDMA_shift; ++ } ++ else { ++ tx_flags = TxATP | (DMA_BURST_512 << TxMXDMA_shift) | (TX_FILL_THRESH << TxFILLT_shift); ++ rx_flags = DMA_BURST_512 << RxMXDMA_shift; ++ } + + if (speed == HW_SPEED_HOME || speed == HW_SPEED_10_MBPS) { + rx_flags |= (RxDRNT_10 << RxDRNT_shift); +@@ -702,7 +827,6 @@ + outl (rx_flags, ioaddr + rxcfg); + } + +- + /* Function: sis900_read_mode + * + * Description: retrieves and displays speed and duplex +@@ -714,24 +838,33 @@ + */ + + static void +-sis900_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex) ++sis900_read_mode(struct nic *nic __unused, int phy_addr, int *speed, int *duplex) + { + int i = 0; + u32 status; ++ u16 phy_id0, phy_id1; + + /* STSOUT register is Latched on Transition, read operation updates it */ + while (i++ < 2) + status = sis900_mdio_read(phy_addr, MII_STSOUT); + +- if (status & MII_STSOUT_SPD) +- *speed = HW_SPEED_100_MBPS; +- else +- *speed = HW_SPEED_10_MBPS; +- +- if (status & MII_STSOUT_DPLX) +- *duplex = FDX_CAPABLE_FULL_SELECTED; +- else +- *duplex = FDX_CAPABLE_HALF_SELECTED; ++ *speed = HW_SPEED_10_MBPS; ++ *duplex = FDX_CAPABLE_HALF_SELECTED; ++ ++ if (status & (MII_NWAY_TX | MII_NWAY_TX_FDX)) ++ *speed = HW_SPEED_100_MBPS; ++ if (status & ( MII_NWAY_TX_FDX | MII_NWAY_T_FDX)) ++ *duplex = FDX_CAPABLE_FULL_SELECTED; ++ ++ /* Workaround for Realtek RTL8201 PHY issue */ ++ phy_id0 = sis900_mdio_read(phy_addr, MII_PHY_ID0); ++ phy_id1 = sis900_mdio_read(phy_addr, MII_PHY_ID1); ++ if((phy_id0 == 0x0000) && ((phy_id1 & 0xFFF0) == 0x8200)){ ++ if(sis900_mdio_read(phy_addr, MII_CONTROL) & MII_CNTL_FDX) ++ *duplex = FDX_CAPABLE_FULL_SELECTED; ++ if(sis900_mdio_read(phy_addr, 0x0019) & 0x01) ++ *speed = HW_SPEED_100_MBPS; ++ } + + if (status & MII_STSOUT_LINK_FAIL) + printf("sis900_read_mode: Media Link Off\n"); +@@ -743,7 +876,6 @@ + "full" : "half"); + } + +- + /* Function: amd79c901_read_mode + * + * Description: retrieves and displays speed and duplex +@@ -755,7 +887,7 @@ + */ + + static void +-amd79c901_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex) ++amd79c901_read_mode(struct nic *nic __unused, int phy_addr, int *speed, int *duplex) + { + int i; + u16 status; +@@ -796,7 +928,6 @@ + } + } + +- + /** + * ics1893_read_mode: - read media mode for ICS1893 PHY + * @net_dev: the net device to read mode for +@@ -808,7 +939,7 @@ + * to determine the speed and duplex mode for sis900 + */ + +-static void ics1893_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex) ++static void ics1893_read_mode(struct nic *nic __unused, int phy_addr, int *speed, int *duplex) + { + int i = 0; + u32 status; +@@ -848,7 +979,7 @@ + * to determine the speed and duplex mode for sis900 + */ + +-static void rtl8201_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex) ++static void rtl8201_read_mode(struct nic *nic __unused, int phy_addr, int *speed, int *duplex) + { + u32 status; + +@@ -878,7 +1009,51 @@ + *duplex == FDX_CAPABLE_FULL_SELECTED ? + "full" : "half"); + else +- printf("rtl9201_read_config_mode: Media Link Off\n"); ++ printf("rtl8201_read_config_mode: Media Link Off\n"); ++} ++ ++/** ++ * vt6103_read_mode: - read media mode for vt6103 phy ++ * @nic: the net device to read mode for ++ * @phy_addr: mii phy address ++ * @speed: the transmit speed to be determined ++ * @duplex: the duplex mode to be determined ++ * ++ * read MII_STATUS register from rtl8201 phy ++ * to determine the speed and duplex mode for sis900 ++ */ ++ ++static void vt6103_read_mode(struct nic *nic __unused, int phy_addr, int *speed, int *duplex) ++{ ++ u32 status; ++ ++ status = sis900_mdio_read(phy_addr, MII_STATUS); ++ ++ if (status & MII_STAT_CAN_TX_FDX) { ++ *speed = HW_SPEED_100_MBPS; ++ *duplex = FDX_CAPABLE_FULL_SELECTED; ++ } ++ else if (status & MII_STAT_CAN_TX) { ++ *speed = HW_SPEED_100_MBPS; ++ *duplex = FDX_CAPABLE_HALF_SELECTED; ++ } ++ else if (status & MII_STAT_CAN_T_FDX) { ++ *speed = HW_SPEED_10_MBPS; ++ *duplex = FDX_CAPABLE_FULL_SELECTED; ++ } ++ else if (status & MII_STAT_CAN_T) { ++ *speed = HW_SPEED_10_MBPS; ++ *duplex = FDX_CAPABLE_HALF_SELECTED; ++ } ++ ++ if (status & MII_STAT_LINK) ++ printf("vt6103_read_mode: Media Link On %s %s-duplex \n", ++ *speed == HW_SPEED_100_MBPS ? ++ "100mbps" : "10mbps", ++ *duplex == FDX_CAPABLE_FULL_SELECTED ? ++ "full" : "half"); ++ else ++ printf("vt6103_read_config_mode: Media Link Off\n"); + } + + /* Function: sis900_transmit +@@ -900,14 +1075,14 @@ + unsigned int s, /* size */ + const char *p) /* Packet */ + { +- u32 status, to, nstype; ++ u32 to, nstype; + u32 tx_status; + + /* Stop the transmitter */ +- outl(TxDIS, ioaddr + cr); ++ outl(TxDIS | inl(ioaddr + cr), ioaddr + cr); + + /* load Transmit Descriptor Register */ +- outl((u32) &txd, ioaddr + txdp); ++ outl(virt_to_bus(&txd), ioaddr + txdp); + if (sis900_debug > 1) + printf("sis900_transmit: TX descriptor register loaded with: %X\n", + inl(ioaddr + txdp)); +@@ -929,18 +1104,18 @@ + txb[s++] = '\0'; + + /* set the transmit buffer descriptor and enable Transmit State Machine */ +- txd.bufptr = (u32) &txb[0]; ++ txd.bufptr = virt_to_bus(&txb[0]); + txd.cmdsts = (u32) OWN | s; + + /* restart the transmitter */ +- outl(TxENA, ioaddr + cr); ++ outl(TxENA | inl(ioaddr + cr), ioaddr + cr); + + if (sis900_debug > 1) + printf("sis900_transmit: Queued Tx packet size %d.\n", (int) s); + + to = currticks() + TX_TIMEOUT; + +- while ((((volatile u32) tx_status=txd.cmdsts) & OWN) && (currticks() < to)) ++ while ((volatile u32) ( tx_status=txd.cmdsts & OWN) && (currticks() < to)) + /* wait */ ; + + if (currticks() >= to) { +@@ -955,7 +1130,6 @@ + outl(0, ioaddr + imr); + } + +- + /* Function: sis900_poll + * + * Description: checks for a received packet and returns it if found. +@@ -971,7 +1145,7 @@ + */ + + static int +-sis900_poll(struct nic *nic) ++sis900_poll(struct nic *nic, int retrieve) + { + u32 rx_status = rxd[cur_rx].cmdsts; + int retstat = 0; +@@ -986,6 +1160,8 @@ + printf("sis900_poll: got a packet: cur_rx:%d, status:%X\n", + cur_rx, rx_status); + ++ if ( ! retrieve ) return 1; ++ + nic->packetlen = (rx_status & DSIZE) - CRC_SIZE; + + if (rx_status & (ABORT|OVERRUN|TOOLONG|RUNT|RXISERR|CRCERR|FAERR)) { +@@ -1001,18 +1177,18 @@ + + /* return the descriptor and buffer to receive ring */ + rxd[cur_rx].cmdsts = RX_BUF_SIZE; +- rxd[cur_rx].bufptr = (u32) &rxb[cur_rx*RX_BUF_SIZE]; ++ rxd[cur_rx].bufptr = virt_to_bus(&rxb[cur_rx*RX_BUF_SIZE]); + + if (++cur_rx == NUM_RX_DESC) + cur_rx = 0; + + /* re-enable the potentially idle receive state machine */ +- outl(RxENA , ioaddr + cr); ++ outl(RxENA | inl(ioaddr + cr), ioaddr + cr); + + return retstat; ++ + } + +- + /* Function: sis900_disable + * + * Description: Turns off interrupts and stops Tx and Rx engines +@@ -1023,12 +1199,53 @@ + */ + + static void +-sis900_disable(struct nic *nic) ++sis900_disable(struct dev *dev) + { ++ struct nic *nic = (struct nic *)dev; ++ /* merge reset and disable */ ++ sis900_init(nic); ++ + /* Disable interrupts by clearing the interrupt mask. */ + outl(0, ioaddr + imr); + outl(0, ioaddr + ier); + + /* Stop the chip's Tx and Rx Status Machine */ +- outl(RxDIS | TxDIS, ioaddr + cr); ++ outl(RxDIS | TxDIS | inl(ioaddr + cr), ioaddr + cr); ++} ++ ++/* Function: sis900_irq ++ * ++ * Description: Enable, Disable, or Force, interrupts ++ * ++ * Arguments: struct nic *nic: NIC data structure ++ * irq_action_t action: Requested action ++ * ++ * Returns: void. ++ */ ++ ++static void ++sis900_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } + } ++ ++static struct pci_id sis900_nics[] = { ++PCI_ROM(0x1039, 0x0900, "sis900", "SIS900"), ++PCI_ROM(0x1039, 0x7016, "sis7016", "SIS7016"), ++}; ++ ++struct pci_driver sis900_driver = { ++ .type = NIC_DRIVER, ++ .name = "SIS900", ++ .probe = sis900_probe, ++ .ids = sis900_nics, ++ .id_count = sizeof(sis900_nics)/sizeof(sis900_nics[0]), ++ .class = 0, ++}; +diff -Naur grub-0.97.orig/netboot/sis900.h grub-0.97/netboot/sis900.h +--- grub-0.97.orig/netboot/sis900.h 2003-07-09 11:45:38.000000000 +0000 ++++ grub-0.97/netboot/sis900.h 2005-08-31 19:03:35.000000000 +0000 +@@ -39,14 +39,16 @@ + + /* Symbolic names for bits in various registers */ + enum sis900_command_register_bits { +- RESET = 0x00000100, +- SWI = 0x00000080, +- RxRESET = 0x00000020, +- TxRESET = 0x00000010, +- RxDIS = 0x00000008, +- RxENA = 0x00000004, +- TxDIS = 0x00000002, +- TxENA = 0x00000001 ++ RELOAD = 0x00000400, ++ ACCESSMODE = 0x00000200, ++ RESET = 0x00000100, ++ SWI = 0x00000080, ++ RxRESET = 0x00000020, ++ TxRESET = 0x00000010, ++ RxDIS = 0x00000008, ++ RxENA = 0x00000004, ++ TxDIS = 0x00000002, ++ TxENA = 0x00000001 + }; + + enum sis900_configuration_register_bits { +@@ -57,7 +59,10 @@ + EXD = 0x00000010, + PESEL = 0x00000008, + LPM = 0x00000004, +- BEM = 0x00000001 ++ BEM = 0x00000001, ++ RND_CNT = 0x00000400, ++ FAIR_BACKOFF = 0x00000200, ++ EDB_MASTER_EN = 0x00002000 + }; + + enum sis900_eeprom_access_reigster_bits { +@@ -108,6 +113,10 @@ + #define TX_DMA_BURST 0 + #define RX_DMA_BURST 0 + ++enum sis900_tx_rx_dma{ ++ DMA_BURST_512 = 0, DMA_BURST_64 = 5 ++}; ++ + /* transmit FIFO threshholds */ + #define TX_FILL_THRESH 16 /* 1/4 FIFO size */ + #define TxFILLT_shift 8 +@@ -172,6 +181,11 @@ + EEeraseAll = 0x0120, + EEwriteAll = 0x0110, + EEaddrMask = 0x013F, ++ EEcmdShift = 16 ++}; ++/* For SiS962 or SiS963, request the eeprom software access */ ++enum sis96x_eeprom_command { ++ EEREQ = 0x00000400, EEDONE = 0x00000200, EEGNT = 0x00000100 + }; + + /* Manamgement Data I/O (mdio) frame */ +@@ -236,7 +250,8 @@ + MII_CONFIG1 = 0x0010, + MII_CONFIG2 = 0x0011, + MII_STSOUT = 0x0012, +- MII_MASK = 0x0013 ++ MII_MASK = 0x0013, ++ MII_RESV = 0x0014 + }; + + /* mii registers specific to AMD 79C901 */ +@@ -320,7 +335,9 @@ + + enum sis900_revision_id { + SIS630A_900_REV = 0x80, SIS630E_900_REV = 0x81, +- SIS630S_900_REV = 0x82, SIS630EA1_900_REV = 0x83 ++ SIS630S_900_REV = 0x82, SIS630EA1_900_REV = 0x83, ++ SIS630ET_900_REV = 0x84, SIS635A_900_REV = 0x90, ++ SIS96x_900_REV = 0X91, SIS900B_900_REV = 0x03 + }; + + enum sis630_revision_id { +diff -Naur grub-0.97.orig/netboot/sis900.txt grub-0.97/netboot/sis900.txt +--- grub-0.97.orig/netboot/sis900.txt 2003-07-09 11:45:38.000000000 +0000 ++++ grub-0.97/netboot/sis900.txt 1970-01-01 00:00:00.000000000 +0000 +@@ -1,91 +0,0 @@ +-How I added the SIS900 card to Etherboot +- +-Author: Marty Connor (mdc@thinguin.org) +- +-Date: 25 Febrary 2001 +- +-Description: +- +-This file is intended to help people who want to write an Etherboot +-driver or port another driver to Etherboot. It is a starting point. +-Perhaps someday I may write a more detailed description of writing an +-Etherboot driver. This text should help get people started, and +-studying sis900.[ch] should help show the basic structure and +-techniques involved in writing and Etherboot driver. +- +-*********************************************************************** +- +-0. Back up all the files I need to modify: +- +-cd etherboot-4.7.20/src +-cp Makefile Makefile.orig +-cp config.c config.c.orig +-cp pci.h pci.h.orig +-cp NIC NIC.orig +-cp cards.h cards.h.orig +- +-1. Edit src/Makefile to add SIS900FLAGS to defines +- +-SIS900FLAGS= -DINCLUDE_SIS900 +- +-2. edit src/pci.h to add PCI signatures for card +- +-#define PCI_VENDOR_ID_SIS 0x1039 +-#define PCI_DEVICE_ID_SIS900 0x0900 +-#define PCI_DEVICE_ID_SIS7016 0x7016 +- +-3. Edit src/config.c to add the card to the card probe list +- +-#if defined(INCLUDE_NS8390) || defined(INCLUDE_EEPRO100) || +- defined(INCLUDE_LANCE) || defined(INCLUDE_EPIC100) || +- defined(INCLUDE_TULIP) || defined(INCLUDE_OTULIP) || +- defined(INCLUDE_3C90X) || defined(INCLUDE_3C595) || +- defined(INCLUDE_RTL8139) || defined(INCLUDE_VIA_RHINE) || +- defined(INCLUDE_SIS900) || defined(INCLUDE_W89C840) +- +-... and ... +- +-#ifdef INCLUDE_SIS900 +- { PCI_VENDOR_ID_SIS, PCI_DEVICE_ID_SIS900, +- "SIS900", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_SIS, PCI_DEVICE_ID_SIS7016, +- "SIS7016", 0, 0, 0, 0}, +-#endif +- +-... and ... +- +-#ifdef INCLUDE_SIS900 +- { "SIS900", sis900_probe, pci_ioaddrs }, +-#endif +- +-4. Edit NIC to add sis900 and sis7016 to NIC list +- +-# SIS 900 and SIS 7016 +-sis900 sis900 0x1039,0x0900 +-sis7016 sis900 0x1039,0x7016 +- +-5. Edit cards.h to add sis900 probe routine declaration +- +-#ifdef INCLUDE_SIS900 +-extern struct nic *sis900_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-*********************************************************************** +- +-At this point, you can begin creating your driver source file. See +-the "Writing and Etherboot Driver" section of the Etherboot +-documentation for some hints. See the skel.c file for a starting +-point. If there is a Linux driver for the card, you may be able to +-use that. Copy and learn from existing Etherboot drivers (this is GPL +-/ Open Source software!). +- +-Join the etherboot-developers and etherboot-users mailing lists +-(information is on etherboot.sourceforge.net) for information and +-assistance. We invite more developers to help improve Etherboot. +- +-Visit the http://etherboot.sourceforge.net, http://thinguin.org, +-http://rom-o-matic.net, and http://ltsp.org sites for information and +-assistance. +- +-Enjoy. +diff -Naur grub-0.97.orig/netboot/sk_g16.c grub-0.97/netboot/sk_g16.c +--- grub-0.97.orig/netboot/sk_g16.c 2003-07-09 11:45:38.000000000 +0000 ++++ grub-0.97/netboot/sk_g16.c 1970-01-01 00:00:00.000000000 +0000 +@@ -1,1160 +0,0 @@ +-/************************************************************************** +-Etherboot - BOOTP/TFTP Bootstrap Program +-Schneider & Koch G16 NIC driver for Etherboot +-heavily based on SK G16 driver from Linux 2.0.36 +-Changes to make it work with Etherboot by Georg Baum +-***************************************************************************/ +- +-/*- +- * Copyright (C) 1994 by PJD Weichmann & SWS Bern, Switzerland +- * +- * This software may be used and distributed according to the terms +- * of the GNU Public License, incorporated herein by reference. +- * +- * Module : sk_g16.c +- * +- * Version : $Revision: 1.4 $ +- * +- * Author : Patrick J.D. Weichmann +- * +- * Date Created : 94/05/26 +- * Last Updated : $Date: 2002/01/02 21:56:40 $ +- * +- * Description : Schneider & Koch G16 Ethernet Device Driver for +- * Linux Kernel >= 1.1.22 +- * Update History : +- * +--*/ +- +-/* +- * The Schneider & Koch (SK) G16 Network device driver is based +- * on the 'ni6510' driver from Michael Hipp which can be found at +- * ftp://sunsite.unc.edu/pub/Linux/system/Network/drivers/nidrivers.tar.gz +- * +- * Sources: 1) ni6510.c by M. Hipp +- * 2) depca.c by D.C. Davies +- * 3) skeleton.c by D. Becker +- * 4) Am7990 Local Area Network Controller for Ethernet (LANCE), +- * AMD, Pub. #05698, June 1989 +- * +- * Many Thanks for helping me to get things working to: +- * +- * A. Cox (A.Cox@swansea.ac.uk) +- * M. Hipp (mhipp@student.uni-tuebingen.de) +- * R. Bolz (Schneider & Koch, Germany) +- * +- * See README.sk_g16 for details about limitations and bugs for the +- * current version. +- * +- * To Do: +- * - Support of SK_G8 and other SK Network Cards. +- * - Autoset memory mapped RAM. Check for free memory and then +- * configure RAM correctly. +- * - SK_close should really set card in to initial state. +- * - Test if IRQ 3 is not switched off. Use autoirq() functionality. +- * (as in /drivers/net/skeleton.c) +- * - Implement Multicast addressing. At minimum something like +- * in depca.c. +- * - Redo the statistics part. +- * - Try to find out if the board is in 8 Bit or 16 Bit slot. +- * If in 8 Bit mode don't use IRQ 11. +- * - (Try to make it slightly faster.) +- */ +- +-/* to get some global routines like printf */ +-#include "etherboot.h" +-/* to get the interface to the body of the program */ +-#include "nic.h" +- +-/* From linux/if_ether.h: */ +-#define ETH_ZLEN 60 /* Min. octets in frame sans FCS */ +- +-#include "sk_g16.h" +- +-/* +- * Schneider & Koch Card Definitions +- * ================================= +- */ +- +-#define SK_NAME "SK_G16" +- +-/* +- * SK_G16 Configuration +- * -------------------- +- */ +- +-/* +- * Abbreviations +- * ------------- +- * +- * RAM - used for the 16KB shared memory +- * Boot_ROM, ROM - are used for referencing the BootEPROM +- * +- * SK_ADDR is a symbolic constant used to configure +- * the behaviour of the driver and the SK_G16. +- * +- * SK_ADDR defines the address where the RAM will be mapped into the real +- * host memory. +- * valid addresses are from 0xa0000 to 0xfc000 in 16Kbyte steps. +- */ +- +-#define SK_ADDR 0xcc000 +- +-/* +- * In POS3 are bits A14-A19 of the address bus. These bits can be set +- * to choose the RAM address. That's why we only can choose the RAM address +- * in 16KB steps. +- */ +- +-#define POS_ADDR (rom_addr>>14) /* Do not change this line */ +- +-/* +- * SK_G16 I/O PORT's + IRQ's + Boot_ROM locations +- * ---------------------------------------------- +- */ +- +-/* +- * As nearly every card has also SK_G16 a specified I/O Port region and +- * only a few possible IRQ's. +- * In the Installation Guide from Schneider & Koch is listed a possible +- * Interrupt IRQ2. IRQ2 is always IRQ9 in boards with two cascaded interrupt +- * controllers. So we use in SK_IRQS IRQ9. +- */ +- +-/* Don't touch any of the following #defines. */ +- +-#define SK_IO_PORTS { 0x100, 0x180, 0x208, 0x220, 0x288, 0x320, 0x328, 0x390, 0 } +- +-/* +- * SK_G16 POS REGISTERS +- * -------------------- +- */ +- +-/* +- * SK_G16 has a Programmable Option Select (POS) Register. +- * The POS is composed of 8 separate registers (POS0-7) which +- * are I/O mapped on an address set by the W1 switch. +- * +- */ +- +-#define SK_POS_SIZE 8 /* 8 I/O Ports are used by SK_G16 */ +- +-#define SK_POS0 ioaddr /* Card-ID Low (R) */ +-#define SK_POS1 ioaddr+1 /* Card-ID High (R) */ +-#define SK_POS2 ioaddr+2 /* Card-Enable, Boot-ROM Disable (RW) */ +-#define SK_POS3 ioaddr+3 /* Base address of RAM */ +-#define SK_POS4 ioaddr+4 /* IRQ */ +- +-/* POS5 - POS7 are unused */ +- +-/* +- * SK_G16 MAC PREFIX +- * ----------------- +- */ +- +-/* +- * Scheider & Koch manufacturer code (00:00:a5). +- * This must be checked, that we are sure it is a SK card. +- */ +- +-#define SK_MAC0 0x00 +-#define SK_MAC1 0x00 +-#define SK_MAC2 0x5a +- +-/* +- * SK_G16 ID +- * --------- +- */ +- +-/* +- * If POS0,POS1 contain the following ID, then we know +- * at which I/O Port Address we are. +- */ +- +-#define SK_IDLOW 0xfd +-#define SK_IDHIGH 0x6a +- +- +-/* +- * LANCE POS Bit definitions +- * ------------------------- +- */ +- +-#define SK_ROM_RAM_ON (POS2_CARD) +-#define SK_ROM_RAM_OFF (POS2_EPROM) +-#define SK_ROM_ON (inb(SK_POS2) & POS2_CARD) +-#define SK_ROM_OFF (inb(SK_POS2) | POS2_EPROM) +-#define SK_RAM_ON (inb(SK_POS2) | POS2_CARD) +-#define SK_RAM_OFF (inb(SK_POS2) & POS2_EPROM) +- +-#define POS2_CARD 0x0001 /* 1 = SK_G16 on 0 = off */ +-#define POS2_EPROM 0x0002 /* 1 = Boot EPROM off 0 = on */ +- +-/* +- * SK_G16 Memory mapped Registers +- * ------------------------------ +- * +- */ +- +-#define SK_IOREG (board->ioreg) /* LANCE data registers. */ +-#define SK_PORT (board->port) /* Control, Status register */ +-#define SK_IOCOM (board->iocom) /* I/O Command */ +- +-/* +- * SK_G16 Status/Control Register bits +- * ----------------------------------- +- * +- * (C) Controlreg (S) Statusreg +- */ +- +-/* +- * Register transfer: 0 = no transfer +- * 1 = transferring data between LANCE and I/O reg +- */ +-#define SK_IORUN 0x20 +- +-/* +- * LANCE interrupt: 0 = LANCE interrupt occurred +- * 1 = no LANCE interrupt occurred +- */ +-#define SK_IRQ 0x10 +- +-#define SK_RESET 0x08 /* Reset SK_CARD: 0 = RESET 1 = normal */ +-#define SK_RW 0x02 /* 0 = write to 1 = read from */ +-#define SK_ADR 0x01 /* 0 = REG DataPort 1 = RAP Reg addr port */ +- +- +-#define SK_RREG SK_RW /* Transferdirection to read from lance */ +-#define SK_WREG 0 /* Transferdirection to write to lance */ +-#define SK_RAP SK_ADR /* Destination Register RAP */ +-#define SK_RDATA 0 /* Destination Register REG DataPort */ +- +-/* +- * SK_G16 I/O Command +- * ------------------ +- */ +- +-/* +- * Any bitcombination sets the internal I/O bit (transfer will start) +- * when written to I/O Command +- */ +- +-#define SK_DOIO 0x80 /* Do Transfer */ +- +-/* +- * LANCE RAP (Register Address Port). +- * --------------------------------- +- */ +- +-/* +- * The LANCE internal registers are selected through the RAP. +- * The Registers are: +- * +- * CSR0 - Status and Control flags +- * CSR1 - Low order bits of initialize block (bits 15:00) +- * CSR2 - High order bits of initialize block (bits 07:00, 15:08 are reserved) +- * CSR3 - Allows redefinition of the Bus Master Interface. +- * This register must be set to 0x0002, which means BSWAP = 0, +- * ACON = 1, BCON = 0; +- * +- */ +- +-#define CSR0 0x00 +-#define CSR1 0x01 +-#define CSR2 0x02 +-#define CSR3 0x03 +- +-/* +- * General Definitions +- * =================== +- */ +- +-/* +- * Set the number of Tx and Rx buffers, using Log_2(# buffers). +- * We have 16KB RAM which can be accessed by the LANCE. In the +- * memory are not only the buffers but also the ring descriptors and +- * the initialize block. +- * Don't change anything unless you really know what you do. +- */ +- +-#define LC_LOG_TX_BUFFERS 1 /* (2 == 2^^1) 2 Transmit buffers */ +-#define LC_LOG_RX_BUFFERS 2 /* (8 == 2^^3) 8 Receive buffers */ +- +-/* Descriptor ring sizes */ +- +-#define TMDNUM (1 << (LC_LOG_TX_BUFFERS)) /* 2 Transmit descriptor rings */ +-#define RMDNUM (1 << (LC_LOG_RX_BUFFERS)) /* 8 Receive Buffers */ +- +-/* Define Mask for setting RMD, TMD length in the LANCE init_block */ +- +-#define TMDNUMMASK (LC_LOG_TX_BUFFERS << 29) +-#define RMDNUMMASK (LC_LOG_RX_BUFFERS << 29) +- +-/* +- * Data Buffer size is set to maximum packet length. +- */ +- +-#define PKT_BUF_SZ 1518 +- +-/* +- * The number of low I/O ports used by the ethercard. +- */ +- +-#define ETHERCARD_TOTAL_SIZE SK_POS_SIZE +- +-/* +- * Portreserve is there to mark the Card I/O Port region as used. +- * Check_region is to check if the region at ioaddr with the size "size" +- * is free or not. +- * Snarf_region allocates the I/O Port region. +- */ +- +-#ifndef HAVE_PORTRESERVE +- +-#define check_region(ioaddr1, size) 0 +-#define request_region(ioaddr1, size,name) do ; while (0) +- +-#endif +- +-/* +- * SK_DEBUG +- * +- * Here you can choose what level of debugging wanted. +- * +- * If SK_DEBUG and SK_DEBUG2 are undefined, then only the +- * necessary messages will be printed. +- * +- * If SK_DEBUG is defined, there will be many debugging prints +- * which can help to find some mistakes in configuration or even +- * in the driver code. +- * +- * If SK_DEBUG2 is defined, many many messages will be printed +- * which normally you don't need. I used this to check the interrupt +- * routine. +- * +- * (If you define only SK_DEBUG2 then only the messages for +- * checking interrupts will be printed!) +- * +- * Normal way of live is: +- * +- * For the whole thing get going let both symbolic constants +- * undefined. If you face any problems and you know what's going +- * on (you know something about the card and you can interpret some +- * hex LANCE register output) then define SK_DEBUG +- * +- */ +- +-#undef SK_DEBUG /* debugging */ +-#undef SK_DEBUG2 /* debugging with more verbose report */ +- +-#ifdef SK_DEBUG +-#define PRINTF(x) printf x +-#else +-#define PRINTF(x) /**/ +-#endif +- +-#ifdef SK_DEBUG2 +-#define PRINTF2(x) printf x +-#else +-#define PRINTF2(x) /**/ +-#endif +- +-/* +- * SK_G16 RAM +- * +- * The components are memory mapped and can be set in a region from +- * 0x00000 through 0xfc000 in 16KB steps. +- * +- * The Network components are: dual ported RAM, Prom, I/O Reg, Status-, +- * Controlregister and I/O Command. +- * +- * dual ported RAM: This is the only memory region which the LANCE chip +- * has access to. From the Lance it is addressed from 0x0000 to +- * 0x3fbf. The host accesses it normally. +- * +- * PROM: The PROM obtains the ETHERNET-MAC-Address. It is realised as a +- * 8-Bit PROM, this means only the 16 even addresses are used of the +- * 32 Byte Address region. Access to a odd address results in invalid +- * data. +- * +- * LANCE I/O Reg: The I/O Reg is build of 4 single Registers, Low-Byte Write, +- * Hi-Byte Write, Low-Byte Read, Hi-Byte Read. +- * Transfer from or to the LANCE is always in 16Bit so Low and High +- * registers are always relevant. +- * +- * The Data from the Readregister is not the data in the Writeregister!! +- * +- * Port: Status- and Controlregister. +- * Two different registers which share the same address, Status is +- * read-only, Control is write-only. +- * +- * I/O Command: +- * Any bitcombination written in here starts the transmission between +- * Host and LANCE. +- */ +- +-typedef struct +-{ +- unsigned char ram[0x3fc0]; /* 16KB dual ported ram */ +- unsigned char rom[0x0020]; /* 32Byte PROM containing 6Byte MAC */ +- unsigned char res1[0x0010]; /* reserved */ +- unsigned volatile short ioreg;/* LANCE I/O Register */ +- unsigned volatile char port; /* Statusregister and Controlregister */ +- unsigned char iocom; /* I/O Command Register */ +-} SK_RAM; +- +-/* struct */ +- +-/* +- * This is the structure for the dual ported ram. We +- * have exactly 16 320 Bytes. In here there must be: +- * +- * - Initialize Block (starting at a word boundary) +- * - Receive and Transmit Descriptor Rings (quadword boundary) +- * - Data Buffers (arbitrary boundary) +- * +- * This is because LANCE has on SK_G16 only access to the dual ported +- * RAM and nowhere else. +- */ +- +-struct SK_ram +-{ +- struct init_block ib; +- struct tmd tmde[TMDNUM]; +- struct rmd rmde[RMDNUM]; +- char tmdbuf[TMDNUM][PKT_BUF_SZ]; +- char rmdbuf[RMDNUM][PKT_BUF_SZ]; +-}; +- +-/* +- * Structure where all necessary information is for ring buffer +- * management and statistics. +- */ +- +-struct priv +-{ +- struct SK_ram *ram; /* dual ported ram structure */ +- struct rmd *rmdhead; /* start of receive ring descriptors */ +- struct tmd *tmdhead; /* start of transmit ring descriptors */ +- int rmdnum; /* actual used ring descriptor */ +- int tmdnum; /* actual transmit descriptor for transmitting data */ +- int tmdlast; /* last sent descriptor used for error handling, etc */ +- void *rmdbufs[RMDNUM]; /* pointer to the receive buffers */ +- void *tmdbufs[TMDNUM]; /* pointer to the transmit buffers */ +-}; +- +-/* global variable declaration */ +- +-/* static variables */ +- +-static SK_RAM *board; /* pointer to our memory mapped board components */ +-static unsigned short ioaddr; /* base io address */ +-static struct priv p_data; +- +-/* Macros */ +- +- +-/* Function Prototypes */ +- +-/* +- * Device Driver functions +- * ----------------------- +- * See for short explanation of each function its definitions header. +- */ +- +-static int SK_probe1(struct nic *nic, short ioaddr1); +- +-static void SK_reset(struct nic *nic); +-static int SK_poll(struct nic *nic); +-static void SK_transmit( +-struct nic *nic, +-const char *d, /* Destination */ +-unsigned int t, /* Type */ +-unsigned int s, /* size */ +-const char *p); /* Packet */ +-static void SK_disable(struct nic *nic); +-struct nic *SK_probe(struct nic *nic, unsigned short *probe_addrs); +- +-/* +- * LANCE Functions +- * --------------- +- */ +- +-static int SK_lance_init(struct nic *nic, unsigned short mode); +-static void SK_reset_board(void); +-static void SK_set_RAP(int reg_number); +-static int SK_read_reg(int reg_number); +-static int SK_rread_reg(void); +-static void SK_write_reg(int reg_number, int value); +- +-/* +- * Debugging functions +- * ------------------- +- */ +- +-static void SK_print_pos(struct nic *nic, char *text); +-static void SK_print_ram(struct nic *nic); +- +- +-/************************************************************************** +-RESET - Reset adapter +-***************************************************************************/ +-static void SK_reset(struct nic *nic) +-{ +- /* put the card in its initial state */ +- SK_lance_init(nic, MODE_NORMAL); +-} +- +-/************************************************************************** +-POLL - Wait for a frame +-***************************************************************************/ +-static int SK_poll(struct nic *nic) +-{ +- /* return true if there's an ethernet packet ready to read */ +- struct priv *p; /* SK_G16 private structure */ +- struct rmd *rmdp; +- int csr0, rmdstat, packet_there; +- PRINTF2(("## %s: At beginning of SK_poll(). CSR0: %#hX\n", +- SK_NAME, SK_read_reg(CSR0))); +- +- p = nic->priv_data; +- csr0 = SK_read_reg(CSR0); /* store register for checking */ +- +- /* +- * Acknowledge all of the current interrupt sources, disable +- * Interrupts (INEA = 0) +- */ +- +- SK_write_reg(CSR0, csr0 & CSR0_CLRALL); +- +- if (csr0 & CSR0_ERR) /* LANCE Error */ +- { +- printf("%s: error: %#hX", SK_NAME, csr0); +- +- if (csr0 & CSR0_MISS) /* No place to store packet ? */ +- { +- printf(", Packet dropped."); +- } +- putchar('\n'); +- } +- +- rmdp = p->rmdhead + p->rmdnum; +- packet_there = 0; +- /* As long as we own the next entry, check status and send +- * it up to higher layer +- */ +- +- while (!( (rmdstat = rmdp->u.s.status) & RX_OWN)) +- { +- /* +- * Start and end of packet must be set, because we use +- * the ethernet maximum packet length (1518) as buffer size. +- * +- * Because our buffers are at maximum OFLO and BUFF errors are +- * not to be concerned (see Data sheet) +- */ +- +- if ((rmdstat & (RX_STP | RX_ENP)) != (RX_STP | RX_ENP)) +- { +- /* Start of a frame > 1518 Bytes ? */ +- +- if (rmdstat & RX_STP) +- { +- printf("%s: packet too long\n", SK_NAME); +- } +- +- /* +- * All other packets will be ignored until a new frame with +- * start (RX_STP) set follows. +- * +- * What we do is just give descriptor free for new incoming +- * packets. +- */ +- +- rmdp->u.s.status = RX_OWN; /* Relinquish ownership to LANCE */ +- +- } +- else if (rmdstat & RX_ERR) /* Receive Error ? */ +- { +- printf("%s: RX error: %#hX\n", SK_NAME, (int) rmdstat); +- rmdp->u.s.status = RX_OWN; /* Relinquish ownership to LANCE */ +- } +- else /* We have a packet which can be queued for the upper layers */ +- { +- +- int len = (rmdp->mlen & 0x0fff); /* extract message length from receive buffer */ +- +- /* +- * Copy data out of our receive descriptor into nic->packet. +- * +- * (rmdp->u.buffer & 0x00ffffff) -> get address of buffer and +- * ignore status fields) +- */ +- +- memcpy(nic->packet, (unsigned char *) (rmdp->u.buffer & 0x00ffffff), nic->packetlen = len); +- packet_there = 1; +- +- +- /* +- * Packet is queued and marked for processing so we +- * free our descriptor +- */ +- +- rmdp->u.s.status = RX_OWN; +- +- p->rmdnum++; +- p->rmdnum %= RMDNUM; +- +- rmdp = p->rmdhead + p->rmdnum; +- } +- } +- SK_write_reg(CSR0, CSR0_INEA); /* Enable Interrupts */ +- return (packet_there); +-} +- +-/************************************************************************** +-TRANSMIT - Transmit a frame +-***************************************************************************/ +-static void SK_transmit( +-struct nic *nic, +-const char *d, /* Destination */ +-unsigned int t, /* Type */ +-unsigned int s, /* size */ +-const char *pack) /* Packet */ +-{ +- /* send the packet to destination */ +- struct priv *p; /* SK_G16 private structure */ +- struct tmd *tmdp; +- short len; +- int csr0, i, tmdstat; +- +- PRINTF2(("## %s: At beginning of SK_transmit(). CSR0: %#hX\n", +- SK_NAME, SK_read_reg(CSR0))); +- p = nic->priv_data; +- tmdp = p->tmdhead + p->tmdnum; /* Which descriptor for transmitting */ +- +- /* Copy data into dual ported ram */ +- +- memcpy(&p->ram->tmdbuf[p->tmdnum][0], d, ETH_ALEN); /* dst */ +- memcpy(&p->ram->tmdbuf[p->tmdnum][ETH_ALEN], nic->node_addr, ETH_ALEN); /* src */ +- p->ram->tmdbuf[p->tmdnum][ETH_ALEN + ETH_ALEN] = t >> 8; /* type */ +- p->ram->tmdbuf[p->tmdnum][ETH_ALEN + ETH_ALEN + 1] = t; /* type */ +- memcpy(&p->ram->tmdbuf[p->tmdnum][ETH_HLEN], pack, s); +- s += ETH_HLEN; +- while (s < ETH_ZLEN) /* pad to min length */ +- p->ram->tmdbuf[p->tmdnum][s++] = 0; +- p->ram->tmde[p->tmdnum].status2 = 0x0; +- +- /* Evaluate Packet length */ +- len = ETH_ZLEN < s ? s : ETH_ZLEN; +- +- /* Fill in Transmit Message Descriptor */ +- +- tmdp->blen = -len; /* set length to transmit */ +- +- /* +- * Packet start and end is always set because we use the maximum +- * packet length as buffer length. +- * Relinquish ownership to LANCE +- */ +- +- tmdp->u.s.status = TX_OWN | TX_STP | TX_ENP; +- +- /* Start Demand Transmission */ +- SK_write_reg(CSR0, CSR0_TDMD | CSR0_INEA); +- +- csr0 = SK_read_reg(CSR0); /* store register for checking */ +- +- /* +- * Acknowledge all of the current interrupt sources, disable +- * Interrupts (INEA = 0) +- */ +- +- SK_write_reg(CSR0, csr0 & CSR0_CLRALL); +- +- if (csr0 & CSR0_ERR) /* LANCE Error */ +- { +- printf("%s: error: %#hX", SK_NAME, csr0); +- +- if (csr0 & CSR0_MISS) /* No place to store packet ? */ +- { +- printf(", Packet dropped."); +- } +- putchar('\n'); +- } +- +- +- /* Set next buffer */ +- p->tmdlast++; +- p->tmdlast &= TMDNUM-1; +- +- tmdstat = tmdp->u.s.status & 0xff00; /* filter out status bits 15:08 */ +- +- /* +- * We check status of transmitted packet. +- * see LANCE data-sheet for error explanation +- */ +- if (tmdstat & TX_ERR) /* Error occurred */ +- { +- printf("%s: TX error: %#hX %#hX\n", SK_NAME, (int) tmdstat, +- (int) tmdp->status2); +- +- if (tmdp->status2 & TX_TDR) /* TDR problems? */ +- { +- printf("%s: tdr-problems \n", SK_NAME); +- } +- +- if (tmdp->status2 & TX_UFLO) /* Underflow error ? */ +- { +- /* +- * If UFLO error occurs it will turn transmitter of. +- * So we must reinit LANCE +- */ +- +- SK_lance_init(nic, MODE_NORMAL); +- } +- +- tmdp->status2 = 0; /* Clear error flags */ +- } +- +- SK_write_reg(CSR0, CSR0_INEA); /* Enable Interrupts */ +- +- /* Set pointer to next transmit buffer */ +- p->tmdnum++; +- p->tmdnum &= TMDNUM-1; +- +-} +- +-/************************************************************************** +-DISABLE - Turn off ethernet interface +-***************************************************************************/ +-static void SK_disable(struct nic *nic) +-{ +- PRINTF(("## %s: At beginning of SK_disable(). CSR0: %#hX\n", +- SK_NAME, SK_read_reg(CSR0))); +- PRINTF(("%s: Shutting %s down CSR0 %#hX\n", SK_NAME, SK_NAME, +- (int) SK_read_reg(CSR0))); +- +- SK_write_reg(CSR0, CSR0_STOP); /* STOP the LANCE */ +-} +- +-/************************************************************************** +-PROBE - Look for an adapter, this routine's visible to the outside +-***************************************************************************/ +-struct nic *SK_probe(struct nic *nic, unsigned short *probe_addrs) +-{ +- unsigned short *p; +- static unsigned short io_addrs[] = SK_IO_PORTS; +- /* if probe_addrs is 0, then routine can use a hardwired default */ +- putchar('\n'); +- nic->priv_data = &p_data; +- if (probe_addrs == 0) +- probe_addrs = io_addrs; +- for (p = probe_addrs; (ioaddr = *p) != 0; ++p) +- { +- long offset1, offset0 = inb(ioaddr); +- if ((offset0 == SK_IDLOW) && +- ((offset1 = inb(ioaddr + 1)) == SK_IDHIGH)) +- if (SK_probe1(nic, ioaddr) >= 0) +- break; +- } +- /* if board found */ +- if (ioaddr != 0) +- { +- /* point to NIC specific routines */ +- nic->reset = SK_reset; +- nic->poll = SK_poll; +- nic->transmit = SK_transmit; +- nic->disable = SK_disable; +- return nic; +- } +- /* else */ +- { +- return 0; +- } +-} +- +-int SK_probe1(struct nic *nic, short ioaddr1) +-{ +- int i,j; /* Counters */ +- int sk_addr_flag = 0; /* SK ADDR correct? 1 - no, 0 - yes */ +- unsigned int rom_addr; /* used to store RAM address used for POS_ADDR */ +- +- struct priv *p; /* SK_G16 private structure */ +- +- if (SK_ADDR & 0x3fff || SK_ADDR < 0xa0000) +- { +- /* +- * Now here we could use a routine which searches for a free +- * place in the ram and set SK_ADDR if found. TODO. +- */ +- printf("%s: SK_ADDR %#hX is not valid. Check configuration.\n", +- SK_NAME, SK_ADDR); +- return -1; +- } +- +- rom_addr = SK_ADDR; +- +- outb(SK_ROM_RAM_OFF, SK_POS2); /* Boot_ROM + RAM off */ +- outb(POS_ADDR, SK_POS3); /* Set RAM address */ +- outb(SK_ROM_RAM_ON, SK_POS2); /* RAM on, BOOT_ROM on */ +-#ifdef SK_DEBUG +- SK_print_pos(nic, "POS registers after ROM, RAM config"); +-#endif +- +- board = (SK_RAM *) rom_addr; +- PRINTF(("adr[0]: %hX, adr[1]: %hX, adr[2]: %hX\n", +- board->rom[0], board->rom[2], board->rom[4])); +- +- /* Read in station address */ +- for (i = 0, j = 0; i < ETH_ALEN; i++, j+=2) +- { +- *(nic->node_addr+i) = board->rom[j]; +- } +- +- /* Check for manufacturer code */ +-#ifdef SK_DEBUG +- if (!(*(nic->node_addr+0) == SK_MAC0 && +- *(nic->node_addr+1) == SK_MAC1 && +- *(nic->node_addr+2) == SK_MAC2) ) +- { +- PRINTF(("## %s: We did not find SK_G16 at RAM location.\n", +- SK_NAME)); +- return -1; /* NO SK_G16 found */ +- } +-#endif +- +- p = nic->priv_data; +- +- /* Initialize private structure */ +- +- p->ram = (struct SK_ram *) rom_addr; /* Set dual ported RAM addr */ +- p->tmdhead = &(p->ram)->tmde[0]; /* Set TMD head */ +- p->rmdhead = &(p->ram)->rmde[0]; /* Set RMD head */ +- +- printf("Schneider & Koch G16 at %#hX, mem at %#hX, HW addr: %!\n", +- (unsigned int) ioaddr, (unsigned int) p->ram, nic->node_addr); +- +- /* Initialize buffer pointers */ +- +- for (i = 0; i < TMDNUM; i++) +- { +- p->tmdbufs[i] = p->ram->tmdbuf[i]; +- } +- +- for (i = 0; i < RMDNUM; i++) +- { +- p->rmdbufs[i] = p->ram->rmdbuf[i]; +- } +- i = 0; +- +- if (!(i = SK_lance_init(nic, MODE_NORMAL))) /* LANCE init OK? */ +- { +- +-#ifdef SK_DEBUG +- /* +- * This debug block tries to stop LANCE, +- * reinit LANCE with transmitter and receiver disabled, +- * then stop again and reinit with NORMAL_MODE +- */ +- +- printf("## %s: After lance init. CSR0: %#hX\n", +- SK_NAME, SK_read_reg(CSR0)); +- SK_write_reg(CSR0, CSR0_STOP); +- printf("## %s: LANCE stopped. CSR0: %#hX\n", +- SK_NAME, SK_read_reg(CSR0)); +- SK_lance_init(nic, MODE_DTX | MODE_DRX); +- printf("## %s: Reinit with DTX + DRX off. CSR0: %#hX\n", +- SK_NAME, SK_read_reg(CSR0)); +- SK_write_reg(CSR0, CSR0_STOP); +- printf("## %s: LANCE stopped. CSR0: %#hX\n", +- SK_NAME, SK_read_reg(CSR0)); +- SK_lance_init(nic, MODE_NORMAL); +- printf("## %s: LANCE back to normal mode. CSR0: %#hX\n", +- SK_NAME, SK_read_reg(CSR0)); +- SK_print_pos(nic, "POS regs before returning OK"); +- +-#endif /* SK_DEBUG */ +- +- } +- else /* LANCE init failed */ +- { +- +- PRINTF(("## %s: LANCE init failed: CSR0: %#hX\n", +- SK_NAME, SK_read_reg(CSR0))); +- return -1; +- } +- +-#ifdef SK_DEBUG +- SK_print_pos(nic, "End of SK_probe1"); +- SK_print_ram(nic); +-#endif +- +- return 0; /* Initialization done */ +- +-} /* End of SK_probe1() */ +- +-static int SK_lance_init(struct nic *nic, unsigned short mode) +-{ +- int i; +- struct priv *p = (struct priv *) nic->priv_data; +- struct tmd *tmdp; +- struct rmd *rmdp; +- +- PRINTF(("## %s: At beginning of LANCE init. CSR0: %#hX\n", +- SK_NAME, SK_read_reg(CSR0))); +- +- /* Reset LANCE */ +- SK_reset_board(); +- +- /* Initialize TMD's with start values */ +- p->tmdnum = 0; /* First descriptor for transmitting */ +- p->tmdlast = 0; /* First descriptor for reading stats */ +- +- for (i = 0; i < TMDNUM; i++) /* Init all TMD's */ +- { +- tmdp = p->tmdhead + i; +- +- tmdp->u.buffer = (unsigned long) p->tmdbufs[i]; /* assign buffer */ +- +- /* Mark TMD as start and end of packet */ +- tmdp->u.s.status = TX_STP | TX_ENP; +- } +- +- +- /* Initialize RMD's with start values */ +- +- p->rmdnum = 0; /* First RMD which will be used */ +- +- for (i = 0; i < RMDNUM; i++) /* Init all RMD's */ +- { +- rmdp = p->rmdhead + i; +- +- +- rmdp->u.buffer = (unsigned long) p->rmdbufs[i]; /* assign buffer */ +- +- /* +- * LANCE must be owner at beginning so that he can fill in +- * receiving packets, set status and release RMD +- */ +- +- rmdp->u.s.status = RX_OWN; +- +- rmdp->blen = -PKT_BUF_SZ; /* Buffer Size in a two's complement */ +- +- rmdp->mlen = 0; /* init message length */ +- +- } +- +- /* Fill LANCE Initialize Block */ +- +- (p->ram)->ib.mode = mode; /* Set operation mode */ +- +- for (i = 0; i < ETH_ALEN; i++) /* Set physical address */ +- { +- (p->ram)->ib.paddr[i] = *(nic->node_addr+i); +- } +- +- for (i = 0; i < 8; i++) /* Set multicast, logical address */ +- { +- (p->ram)->ib.laddr[i] = 0; /* We do not use logical addressing */ +- } +- +- /* Set ring descriptor pointers and set number of descriptors */ +- +- (p->ram)->ib.rdrp = (int) p->rmdhead | RMDNUMMASK; +- (p->ram)->ib.tdrp = (int) p->tmdhead | TMDNUMMASK; +- +- /* Prepare LANCE Control and Status Registers */ +- +- SK_write_reg(CSR3, CSR3_ACON); /* Ale Control !!!THIS MUST BE SET!!!! */ +- +- /* +- * LANCE addresses the RAM from 0x0000 to 0x3fbf and has no access to +- * PC Memory locations. +- * +- * In structure SK_ram is defined that the first thing in ram +- * is the initialization block. So his address is for LANCE always +- * 0x0000 +- * +- * CSR1 contains low order bits 15:0 of initialization block address +- * CSR2 is built of: +- * 7:0 High order bits 23:16 of initialization block address +- * 15:8 reserved, must be 0 +- */ +- +- /* Set initialization block address (must be on word boundary) */ +- SK_write_reg(CSR1, 0); /* Set low order bits 15:0 */ +- SK_write_reg(CSR2, 0); /* Set high order bits 23:16 */ +- +- +- PRINTF(("## %s: After setting CSR1-3. CSR0: %#hX\n", +- SK_NAME, SK_read_reg(CSR0))); +- +- /* Initialize LANCE */ +- +- /* +- * INIT = Initialize, when set, causes the LANCE to begin the +- * initialization procedure and access the Init Block. +- */ +- +- SK_write_reg(CSR0, CSR0_INIT); +- +- /* Wait until LANCE finished initialization */ +- +- SK_set_RAP(CSR0); /* Register Address Pointer to CSR0 */ +- +- for (i = 0; (i < 100) && !(SK_rread_reg() & CSR0_IDON); i++) +- ; /* Wait until init done or go ahead if problems (i>=100) */ +- +- if (i >= 100) /* Something is wrong ! */ +- { +- printf("%s: can't init am7990, status: %#hX " +- "init_block: %#hX\n", +- SK_NAME, (int) SK_read_reg(CSR0), +- (unsigned int) &(p->ram)->ib); +- +-#ifdef SK_DEBUG +- SK_print_pos(nic, "LANCE INIT failed"); +-#endif +- +- return -1; /* LANCE init failed */ +- } +- +- PRINTF(("## %s: init done after %d ticks\n", SK_NAME, i)); +- +- /* Clear Initialize done, enable Interrupts, start LANCE */ +- +- SK_write_reg(CSR0, CSR0_IDON | CSR0_INEA | CSR0_STRT); +- +- PRINTF(("## %s: LANCE started. CSR0: %#hX\n", SK_NAME, +- SK_read_reg(CSR0))); +- +- return 0; /* LANCE is up and running */ +- +-} /* End of SK_lance_init() */ +- +-/* LANCE access functions +- * +- * ! CSR1-3 can only be accessed when in CSR0 the STOP bit is set ! +- */ +- +-static void SK_reset_board(void) +-{ +- int i; +- +- PRINTF(("## %s: At beginning of SK_reset_board.\n", SK_NAME)); +- SK_PORT = 0x00; /* Reset active */ +- for (i = 0; i < 10 ; i++) /* Delay min 5ms */ +- ; +- SK_PORT = SK_RESET; /* Set back to normal operation */ +- +-} /* End of SK_reset_board() */ +- +-static void SK_set_RAP(int reg_number) +-{ +- SK_IOREG = reg_number; +- SK_PORT = SK_RESET | SK_RAP | SK_WREG; +- SK_IOCOM = SK_DOIO; +- +- while (SK_PORT & SK_IORUN) +- ; +-} /* End of SK_set_RAP() */ +- +-static int SK_read_reg(int reg_number) +-{ +- SK_set_RAP(reg_number); +- +- SK_PORT = SK_RESET | SK_RDATA | SK_RREG; +- SK_IOCOM = SK_DOIO; +- +- while (SK_PORT & SK_IORUN) +- ; +- return (SK_IOREG); +- +-} /* End of SK_read_reg() */ +- +-static int SK_rread_reg(void) +-{ +- SK_PORT = SK_RESET | SK_RDATA | SK_RREG; +- +- SK_IOCOM = SK_DOIO; +- +- while (SK_PORT & SK_IORUN) +- ; +- return (SK_IOREG); +- +-} /* End of SK_rread_reg() */ +- +-static void SK_write_reg(int reg_number, int value) +-{ +- SK_set_RAP(reg_number); +- +- SK_IOREG = value; +- SK_PORT = SK_RESET | SK_RDATA | SK_WREG; +- SK_IOCOM = SK_DOIO; +- +- while (SK_PORT & SK_IORUN) +- ; +-} /* End of SK_write_reg */ +- +-/* +- * Debugging functions +- * ------------------- +- */ +- +-#ifdef SK_DEBUG +-static void SK_print_pos(struct nic *nic, char *text) +-{ +- +- unsigned char pos0 = inb(SK_POS0), +- pos1 = inb(SK_POS1), +- pos2 = inb(SK_POS2), +- pos3 = inb(SK_POS3), +- pos4 = inb(SK_POS4); +- +- +- printf("## %s: %s.\n" +- "## pos0=%#hX pos1=%#hX pos2=%#hX pos3=%#hX pos4=%#hX\n", +- SK_NAME, text, pos0, pos1, pos2, (pos3<<14), pos4); +- +-} /* End of SK_print_pos() */ +- +-static void SK_print_ram(struct nic *nic) +-{ +- +- int i; +- struct priv *p = (struct priv *) nic->priv_data; +- +- printf("## %s: RAM Details.\n" +- "## RAM at %#hX tmdhead: %#hX rmdhead: %#hX initblock: %#hX\n", +- SK_NAME, +- (unsigned int) p->ram, +- (unsigned int) p->tmdhead, +- (unsigned int) p->rmdhead, +- (unsigned int) &(p->ram)->ib); +- +- printf("## "); +- +- for(i = 0; i < TMDNUM; i++) +- { +- if (!(i % 3)) /* Every third line do a newline */ +- { +- printf("\n## "); +- } +- printf("tmdbufs%d: %#hX ", (i+1), (int) p->tmdbufs[i]); +- } +- printf("## "); +- +- for(i = 0; i < RMDNUM; i++) +- { +- if (!(i % 3)) /* Every third line do a newline */ +- { +- printf("\n## "); +- } +- printf("rmdbufs%d: %#hX ", (i+1), (int) p->rmdbufs[i]); +- } +- putchar('\n'); +- +-} /* End of SK_print_ram() */ +-#endif +diff -Naur grub-0.97.orig/netboot/sk_g16.h grub-0.97/netboot/sk_g16.h +--- grub-0.97.orig/netboot/sk_g16.h 2003-07-09 11:45:38.000000000 +0000 ++++ grub-0.97/netboot/sk_g16.h 1970-01-01 00:00:00.000000000 +0000 +@@ -1,168 +0,0 @@ +-/*- +- * +- * This software may be used and distributed according to the terms +- * of the GNU Public License, incorporated herein by reference. +- * +- * Module : sk_g16.h +- * Version : $Revision: 1.3 $ +- * +- * Author : M.Hipp (mhipp@student.uni-tuebingen.de) +- * changes by : Patrick J.D. Weichmann +- * +- * Date Created : 94/05/25 +- * +- * Description : In here are all necessary definitions of +- * the am7990 (LANCE) chip used for writing a +- * network device driver which uses this chip +- * +- * $Log: sk_g16.h,v $ +- * Revision 1.3 2000/07/29 19:22:54 okuji +- * update the network support to etherboot-4.6.4. +- * +--*/ +- +-#ifndef SK_G16_H +- +-#define SK_G16_H +- +- +-/* +- * Control and Status Register 0 (CSR0) bit definitions +- * +- * (R=Readable) (W=Writeable) (S=Set on write) (C-Clear on write) +- * +- */ +- +-#define CSR0_ERR 0x8000 /* Error summary (R) */ +-#define CSR0_BABL 0x4000 /* Babble transmitter timeout error (RC) */ +-#define CSR0_CERR 0x2000 /* Collision Error (RC) */ +-#define CSR0_MISS 0x1000 /* Missed packet (RC) */ +-#define CSR0_MERR 0x0800 /* Memory Error (RC) */ +-#define CSR0_RINT 0x0400 /* Receiver Interrupt (RC) */ +-#define CSR0_TINT 0x0200 /* Transmit Interrupt (RC) */ +-#define CSR0_IDON 0x0100 /* Initialization Done (RC) */ +-#define CSR0_INTR 0x0080 /* Interrupt Flag (R) */ +-#define CSR0_INEA 0x0040 /* Interrupt Enable (RW) */ +-#define CSR0_RXON 0x0020 /* Receiver on (R) */ +-#define CSR0_TXON 0x0010 /* Transmitter on (R) */ +-#define CSR0_TDMD 0x0008 /* Transmit Demand (RS) */ +-#define CSR0_STOP 0x0004 /* Stop (RS) */ +-#define CSR0_STRT 0x0002 /* Start (RS) */ +-#define CSR0_INIT 0x0001 /* Initialize (RS) */ +- +-#define CSR0_CLRALL 0x7f00 /* mask for all clearable bits */ +- +-/* +- * Control and Status Register 3 (CSR3) bit definitions +- * +- */ +- +-#define CSR3_BSWAP 0x0004 /* Byte Swap (RW) */ +-#define CSR3_ACON 0x0002 /* ALE Control (RW) */ +-#define CSR3_BCON 0x0001 /* Byte Control (RW) */ +- +-/* +- * Initialization Block Mode operation Bit Definitions. +- */ +- +-#define MODE_PROM 0x8000 /* Promiscuous Mode */ +-#define MODE_INTL 0x0040 /* Internal Loopback */ +-#define MODE_DRTY 0x0020 /* Disable Retry */ +-#define MODE_COLL 0x0010 /* Force Collision */ +-#define MODE_DTCR 0x0008 /* Disable Transmit CRC) */ +-#define MODE_LOOP 0x0004 /* Loopback */ +-#define MODE_DTX 0x0002 /* Disable the Transmitter */ +-#define MODE_DRX 0x0001 /* Disable the Receiver */ +- +-#define MODE_NORMAL 0x0000 /* Normal operation mode */ +- +-/* +- * Receive message descriptor status bit definitions. +- */ +- +-#define RX_OWN 0x80 /* Owner bit 0 = host, 1 = lance */ +-#define RX_ERR 0x40 /* Error Summary */ +-#define RX_FRAM 0x20 /* Framing Error */ +-#define RX_OFLO 0x10 /* Overflow Error */ +-#define RX_CRC 0x08 /* CRC Error */ +-#define RX_BUFF 0x04 /* Buffer Error */ +-#define RX_STP 0x02 /* Start of Packet */ +-#define RX_ENP 0x01 /* End of Packet */ +- +- +-/* +- * Transmit message descriptor status bit definitions. +- */ +- +-#define TX_OWN 0x80 /* Owner bit 0 = host, 1 = lance */ +-#define TX_ERR 0x40 /* Error Summary */ +-#define TX_MORE 0x10 /* More the 1 retry needed to Xmit */ +-#define TX_ONE 0x08 /* One retry needed to Xmit */ +-#define TX_DEF 0x04 /* Deferred */ +-#define TX_STP 0x02 /* Start of Packet */ +-#define TX_ENP 0x01 /* End of Packet */ +- +-/* +- * Transmit status (2) (valid if TX_ERR == 1) +- */ +- +-#define TX_BUFF 0x8000 /* Buffering error (no ENP) */ +-#define TX_UFLO 0x4000 /* Underflow (late memory) */ +-#define TX_LCOL 0x1000 /* Late collision */ +-#define TX_LCAR 0x0400 /* Loss of Carrier */ +-#define TX_RTRY 0x0200 /* Failed after 16 retransmissions */ +-#define TX_TDR 0x003f /* Time-domain-reflectometer-value */ +- +- +-/* +- * Structures used for Communication with the LANCE +- */ +- +-/* LANCE Initialize Block */ +- +-struct init_block +-{ +- unsigned short mode; /* Mode Register */ +- unsigned char paddr[6]; /* Physical Address (MAC) */ +- unsigned char laddr[8]; /* Logical Filter Address (not used) */ +- unsigned int rdrp; /* Receive Descriptor Ring pointer */ +- unsigned int tdrp; /* Transmit Descriptor Ring pointer */ +-}; +- +- +-/* Receive Message Descriptor Entry */ +- +-struct rmd +-{ +- union rmd_u +- { +- unsigned long buffer; /* Address of buffer */ +- struct rmd_s +- { +- unsigned char unused[3]; +- unsigned volatile char status; /* Status Bits */ +- } s; +- } u; +- volatile short blen; /* Buffer Length (two's complement) */ +- unsigned short mlen; /* Message Byte Count */ +-}; +- +- +-/* Transmit Message Descriptor Entry */ +- +-struct tmd +-{ +- union tmd_u +- { +- unsigned long buffer; /* Address of buffer */ +- struct tmd_s +- { +- unsigned char unused[3]; +- unsigned volatile char status; /* Status Bits */ +- } s; +- } u; +- unsigned short blen; /* Buffer Length (two's complement) */ +- unsigned volatile short status2; /* Error Status Bits */ +-}; +- +-#endif /* End of SK_G16_H */ +diff -Naur grub-0.97.orig/netboot/smc9000.c grub-0.97/netboot/smc9000.c +--- grub-0.97.orig/netboot/smc9000.c 2003-07-09 11:45:38.000000000 +0000 ++++ grub-0.97/netboot/smc9000.c 1970-01-01 00:00:00.000000000 +0000 +@@ -1,522 +0,0 @@ +- /*------------------------------------------------------------------------ +- * smc9000.c +- * This is a Etherboot driver for SMC's 9000 series of Ethernet cards. +- * +- * Copyright (C) 1998 Daniel Engström +- * Based on the Linux SMC9000 driver, smc9194.c by Eric Stahlman +- * Copyright (C) 1996 by Erik Stahlman +- * +- * This software may be used and distributed according to the terms +- * of the GNU Public License, incorporated herein by reference. +- * +- * "Features" of the SMC chip: +- * 4608 byte packet memory. ( for the 91C92/4. Others have more ) +- * EEPROM for configuration +- * AUI/TP selection +- * +- * Authors +- * Erik Stahlman +- * Daniel Engström +- * +- * History +- * 98-09-25 Daniel Engström Etherboot driver crated from Eric's +- * Linux driver. +- * +- *---------------------------------------------------------------------------*/ +-#define LINUX_OUT_MACROS 1 +-#define SMC9000_VERBOSE 1 +-#define SMC9000_DEBUG 0 +- +-#include "etherboot.h" +-#include "nic.h" +-#include "cards.h" +-#include "smc9000.h" +- +-# define _outb outb +-# define _outw outw +- +-static const char smc9000_version[] = "Version 0.99 98-09-30"; +-static unsigned int smc9000_base=0; +-static const char *interfaces[ 2 ] = { "TP", "AUI" }; +-static const char *chip_ids[ 15 ] = { +- NULL, NULL, NULL, +- /* 3 */ "SMC91C90/91C92", +- /* 4 */ "SMC91C94", +- /* 5 */ "SMC91C95", +- NULL, +- /* 7 */ "SMC91C100", +- /* 8 */ "SMC91C100FD", +- NULL, NULL, NULL, +- NULL, NULL, NULL +-}; +-static const char smc91c96_id[] = "SMC91C96"; +- +-/* +- * Function: smc_reset( int ioaddr ) +- * Purpose: +- * This sets the SMC91xx chip to its normal state, hopefully from whatever +- * mess that any other DOS driver has put it in. +- * +- * Maybe I should reset more registers to defaults in here? SOFTRESET should +- * do that for me. +- * +- * Method: +- * 1. send a SOFT RESET +- * 2. wait for it to finish +- * 3. reset the memory management unit +- * 4. clear all interrupts +- * +-*/ +-static void smc_reset(int ioaddr) +-{ +- /* This resets the registers mostly to defaults, but doesn't +- * affect EEPROM. That seems unnecessary */ +- SMC_SELECT_BANK(ioaddr, 0); +- _outw( RCR_SOFTRESET, ioaddr + RCR ); +- +- /* this should pause enough for the chip to be happy */ +- SMC_DELAY(ioaddr); +- +- /* Set the transmit and receive configuration registers to +- * default values */ +- _outw(RCR_CLEAR, ioaddr + RCR); +- _outw(TCR_CLEAR, ioaddr + TCR); +- +- /* Reset the MMU */ +- SMC_SELECT_BANK(ioaddr, 2); +- _outw( MC_RESET, ioaddr + MMU_CMD ); +- +- /* Note: It doesn't seem that waiting for the MMU busy is needed here, +- * but this is a place where future chipsets _COULD_ break. Be wary +- * of issuing another MMU command right after this */ +- _outb(0, ioaddr + INT_MASK); +-} +- +- +-/*---------------------------------------------------------------------- +- * Function: smc_probe( int ioaddr ) +- * +- * Purpose: +- * Tests to see if a given ioaddr points to an SMC9xxx chip. +- * Returns a 0 on success +- * +- * Algorithm: +- * (1) see if the high byte of BANK_SELECT is 0x33 +- * (2) compare the ioaddr with the base register's address +- * (3) see if I recognize the chip ID in the appropriate register +- * +- * --------------------------------------------------------------------- +- */ +-static int smc_probe( int ioaddr ) +-{ +- word bank; +- word revision_register; +- word base_address_register; +- +- /* First, see if the high byte is 0x33 */ +- bank = inw(ioaddr + BANK_SELECT); +- if ((bank & 0xFF00) != 0x3300) { +- return -1; +- } +- /* The above MIGHT indicate a device, but I need to write to further +- * test this. */ +- _outw(0x0, ioaddr + BANK_SELECT); +- bank = inw(ioaddr + BANK_SELECT); +- if ((bank & 0xFF00) != 0x3300) { +- return -1; +- } +- +- /* well, we've already written once, so hopefully another time won't +- * hurt. This time, I need to switch the bank register to bank 1, +- * so I can access the base address register */ +- SMC_SELECT_BANK(ioaddr, 1); +- base_address_register = inw(ioaddr + BASE); +- +- if (ioaddr != (base_address_register >> 3 & 0x3E0)) { +-#ifdef SMC9000_VERBOSE +- printf("SMC9000: IOADDR %hX doesn't match configuration (%hX)." +- "Probably not a SMC chip\n", +- ioaddr, base_address_register >> 3 & 0x3E0); +-#endif +- /* well, the base address register didn't match. Must not have +- * been a SMC chip after all. */ +- return -1; +- } +- +- +- /* check if the revision register is something that I recognize. +- * These might need to be added to later, as future revisions +- * could be added. */ +- SMC_SELECT_BANK(ioaddr, 3); +- revision_register = inw(ioaddr + REVISION); +- if (!chip_ids[(revision_register >> 4) & 0xF]) { +- /* I don't recognize this chip, so... */ +-#ifdef SMC9000_VERBOSE +- printf("SMC9000: IO %hX: Unrecognized revision register:" +- " %hX, Contact author.\n", ioaddr, revision_register); +-#endif +- return -1; +- } +- +- /* at this point I'll assume that the chip is an SMC9xxx. +- * It might be prudent to check a listing of MAC addresses +- * against the hardware address, or do some other tests. */ +- return 0; +-} +- +- +-/************************************************************************** +- * ETH_RESET - Reset adapter +- ***************************************************************************/ +- +-static void smc9000_reset(struct nic *nic) +-{ +- smc_reset(smc9000_base); +-} +- +-/************************************************************************** +- * ETH_TRANSMIT - Transmit a frame +- ***************************************************************************/ +-static void smc9000_transmit( +- struct nic *nic, +- const char *d, /* Destination */ +- unsigned int t, /* Type */ +- unsigned int s, /* size */ +- const char *p) /* Packet */ +-{ +- word length; /* real, length incl. header */ +- word numPages; +- unsigned long time_out; +- byte packet_no; +- word status; +- int i; +- +- /* We dont pad here since we can have the hardware doing it for us */ +- length = (s + ETH_HLEN + 1)&~1; +- +- /* convert to MMU pages */ +- numPages = length / 256; +- +- if (numPages > 7 ) { +-#ifdef SMC9000_VERBOSE +- printf("SMC9000: Far too big packet error. \n"); +-#endif +- return; +- } +- +- /* dont try more than, say 30 times */ +- for (i=0;i<30;i++) { +- /* now, try to allocate the memory */ +- SMC_SELECT_BANK(smc9000_base, 2); +- _outw(MC_ALLOC | numPages, smc9000_base + MMU_CMD); +- +- status = 0; +- /* wait for the memory allocation to finnish */ +- for (time_out = currticks() + 5*TICKS_PER_SEC; currticks() < time_out; ) { +- status = inb(smc9000_base + INTERRUPT); +- if ( status & IM_ALLOC_INT ) { +- /* acknowledge the interrupt */ +- _outb(IM_ALLOC_INT, smc9000_base + INTERRUPT); +- break; +- } +- } +- +- if ((status & IM_ALLOC_INT) != 0 ) { +- /* We've got the memory */ +- break; +- } else { +- printf("SMC9000: Memory allocation timed out, resetting MMU.\n"); +- _outw(MC_RESET, smc9000_base + MMU_CMD); +- } +- } +- +- /* If I get here, I _know_ there is a packet slot waiting for me */ +- packet_no = inb(smc9000_base + PNR_ARR + 1); +- if (packet_no & 0x80) { +- /* or isn't there? BAD CHIP! */ +- printf("SMC9000: Memory allocation failed. \n"); +- return; +- } +- +- /* we have a packet address, so tell the card to use it */ +- _outb(packet_no, smc9000_base + PNR_ARR); +- +- /* point to the beginning of the packet */ +- _outw(PTR_AUTOINC, smc9000_base + POINTER); +- +-#if SMC9000_DEBUG > 2 +- printf("Trying to xmit packet of length %hX\n", length ); +-#endif +- +- /* send the packet length ( +6 for status, length and ctl byte ) +- * and the status word ( set to zeros ) */ +- _outw(0, smc9000_base + DATA_1 ); +- +- /* send the packet length ( +6 for status words, length, and ctl) */ +- _outb((length+6) & 0xFF, smc9000_base + DATA_1); +- _outb((length+6) >> 8 , smc9000_base + DATA_1); +- +- /* Write the contents of the packet */ +- +- /* The ethernet header first... */ +- outsw(smc9000_base + DATA_1, d, ETH_ALEN >> 1); +- outsw(smc9000_base + DATA_1, nic->node_addr, ETH_ALEN >> 1); +- _outw(htons(t), smc9000_base + DATA_1); +- +- /* ... the data ... */ +- outsw(smc9000_base + DATA_1 , p, s >> 1); +- +- /* ... and the last byte, if there is one. */ +- if ((s & 1) == 0) { +- _outw(0, smc9000_base + DATA_1); +- } else { +- _outb(p[s-1], smc9000_base + DATA_1); +- _outb(0x20, smc9000_base + DATA_1); +- } +- +- /* and let the chipset deal with it */ +- _outw(MC_ENQUEUE , smc9000_base + MMU_CMD); +- +- status = 0; time_out = currticks() + 5*TICKS_PER_SEC; +- do { +- status = inb(smc9000_base + INTERRUPT); +- +- if ((status & IM_TX_INT ) != 0) { +- word tx_status; +- +- /* ack interrupt */ +- _outb(IM_TX_INT, smc9000_base + INTERRUPT); +- +- packet_no = inw(smc9000_base + FIFO_PORTS); +- packet_no &= 0x7F; +- +- /* select this as the packet to read from */ +- _outb( packet_no, smc9000_base + PNR_ARR ); +- +- /* read the first word from this packet */ +- _outw( PTR_AUTOINC | PTR_READ, smc9000_base + POINTER ); +- +- tx_status = inw( smc9000_base + DATA_1 ); +- +- if (0 == (tx_status & TS_SUCCESS)) { +-#ifdef SMC9000_VERBOSE +- printf("SMC9000: TX FAIL STATUS: %hX \n", tx_status); +-#endif +- /* re-enable transmit */ +- SMC_SELECT_BANK(smc9000_base, 0); +- _outw(inw(smc9000_base + TCR ) | TCR_ENABLE, smc9000_base + TCR ); +- } +- +- /* kill the packet */ +- SMC_SELECT_BANK(smc9000_base, 2); +- _outw(MC_FREEPKT, smc9000_base + MMU_CMD); +- +- return; +- } +- }while(currticks() < time_out); +- +- printf("SMC9000: Waring TX timed out, resetting board\n"); +- smc_reset(smc9000_base); +- return; +-} +- +-/************************************************************************** +- * ETH_POLL - Wait for a frame +- ***************************************************************************/ +-static int smc9000_poll(struct nic *nic) +-{ +- if(!smc9000_base) +- return 0; +- +- SMC_SELECT_BANK(smc9000_base, 2); +- if (inw(smc9000_base + FIFO_PORTS) & FP_RXEMPTY) +- return 0; +- +- /* start reading from the start of the packet */ +- _outw(PTR_READ | PTR_RCV | PTR_AUTOINC, smc9000_base + POINTER); +- +- /* First read the status and check that we're ok */ +- if (!(inw(smc9000_base + DATA_1) & RS_ERRORS)) { +- /* Next: read the packet length and mask off the top bits */ +- nic->packetlen = (inw(smc9000_base + DATA_1) & 0x07ff); +- +- /* the packet length includes the 3 extra words */ +- nic->packetlen -= 6; +-#if SMC9000_DEBUG > 2 +- printf(" Reading %d words (and %d byte(s))\n", +- (nic->packetlen >> 1), nic->packetlen & 1); +-#endif +- /* read the packet (and the last "extra" word) */ +- insw(smc9000_base + DATA_1, nic->packet, (nic->packetlen+2) >> 1); +- /* is there an odd last byte ? */ +- if (nic->packet[nic->packetlen+1] & 0x20) +- nic->packetlen++; +- +- /* error or good, tell the card to get rid of this packet */ +- _outw(MC_RELEASE, smc9000_base + MMU_CMD); +- return 1; +- } +- +- printf("SMC9000: RX error\n"); +- /* error or good, tell the card to get rid of this packet */ +- _outw(MC_RELEASE, smc9000_base + MMU_CMD); +- return 0; +-} +- +-static void smc9000_disable(struct nic *nic) +-{ +- if(!smc9000_base) +- return; +- +- /* no more interrupts for me */ +- SMC_SELECT_BANK(smc9000_base, 2); +- _outb( 0, smc9000_base + INT_MASK); +- +- /* and tell the card to stay away from that nasty outside world */ +- SMC_SELECT_BANK(smc9000_base, 0); +- _outb( RCR_CLEAR, smc9000_base + RCR ); +- _outb( TCR_CLEAR, smc9000_base + TCR ); +-} +- +-/************************************************************************** +- * ETH_PROBE - Look for an adapter +- ***************************************************************************/ +- +-struct nic *smc9000_probe(struct nic *nic, unsigned short *probe_addrs) +-{ +- unsigned short revision; +- int memory; +- int media; +- const char * version_string; +- const char * if_string; +- int i; +- +- /* +- * the SMC9000 can be at any of the following port addresses. To change, +- * for a slightly different card, you can add it to the array. Keep in +- * mind that the array must end in zero. +- */ +- static unsigned short portlist[] = { +-#ifdef SMC9000_SCAN +- SMC9000_SCAN, +-#else +- 0x200, 0x220, 0x240, 0x260, 0x280, 0x2A0, 0x2C0, 0x2E0, +- 0x300, 0x320, 0x340, 0x360, 0x380, 0x3A0, 0x3C0, 0x3E0, +-#endif +- 0 }; +- +- printf("\nSMC9000 %s\n", smc9000_version); +-#ifdef SMC9000_VERBOSE +- printf("Copyright (C) 1998 Daniel Engstr\x94m\n"); +- printf("Copyright (C) 1996 Eric Stahlman\n"); +-#endif +- /* if no addresses supplied, fall back on defaults */ +- if (probe_addrs == 0 || probe_addrs[0] == 0) +- probe_addrs = portlist; +- +- /* check every ethernet address */ +- for (i = 0; probe_addrs[i]; i++) { +- /* check this specific address */ +- if (smc_probe(probe_addrs[i]) == 0) +- smc9000_base = probe_addrs[i]; +- } +- +- /* couldn't find anything */ +- if(0 == smc9000_base) +- goto out; +- +- /* +- * Get the MAC address ( bank 1, regs 4 - 9 ) +- */ +- SMC_SELECT_BANK(smc9000_base, 1); +- for ( i = 0; i < 6; i += 2 ) { +- word address; +- +- address = inw(smc9000_base + ADDR0 + i); +- nic->node_addr[i+1] = address >> 8; +- nic->node_addr[i] = address & 0xFF; +- } +- +- +- /* get the memory information */ +- SMC_SELECT_BANK(smc9000_base, 0); +- memory = ( inw(smc9000_base + MCR) >> 9 ) & 0x7; /* multiplier */ +- memory *= 256 * (inw(smc9000_base + MIR) & 0xFF); +- +- /* +- * Now, I want to find out more about the chip. This is sort of +- * redundant, but it's cleaner to have it in both, rather than having +- * one VERY long probe procedure. +- */ +- SMC_SELECT_BANK(smc9000_base, 3); +- revision = inw(smc9000_base + REVISION); +- version_string = chip_ids[(revision >> 4) & 0xF]; +- +- if (((revision & 0xF0) >> 4 == CHIP_9196) && +- ((revision & 0x0F) >= REV_9196)) { +- /* This is a 91c96. 'c96 has the same chip id as 'c94 (4) but +- * a revision starting at 6 */ +- version_string = smc91c96_id; +- } +- +- if ( !version_string ) { +- /* I shouldn't get here because this call was done before.... */ +- goto out; +- } +- +- /* is it using AUI or 10BaseT ? */ +- SMC_SELECT_BANK(smc9000_base, 1); +- if (inw(smc9000_base + CONFIG) & CFG_AUI_SELECT) +- media = 2; +- else +- media = 1; +- +- if_string = interfaces[media - 1]; +- +- /* now, reset the chip, and put it into a known state */ +- smc_reset(smc9000_base); +- +- printf("%s rev:%d I/O port:%hX Interface:%s RAM:%d bytes \n", +- version_string, revision & 0xF, +- smc9000_base, if_string, memory ); +- /* +- * Print the Ethernet address +- */ +- printf("Ethernet MAC address: %!\n", nic->node_addr); +- +- SMC_SELECT_BANK(smc9000_base, 0); +- +- /* see the header file for options in TCR/RCR NORMAL*/ +- _outw(TCR_NORMAL, smc9000_base + TCR); +- _outw(RCR_NORMAL, smc9000_base + RCR); +- +- /* Select which interface to use */ +- SMC_SELECT_BANK(smc9000_base, 1); +- if ( media == 1 ) { +- _outw( inw( smc9000_base + CONFIG ) & ~CFG_AUI_SELECT, +- smc9000_base + CONFIG ); +- } +- else if ( media == 2 ) { +- _outw( inw( smc9000_base + CONFIG ) | CFG_AUI_SELECT, +- smc9000_base + CONFIG ); +- } +- +- nic->reset = smc9000_reset; +- nic->poll = smc9000_poll; +- nic->transmit = smc9000_transmit; +- nic->disable = smc9000_disable; +- +- +- return nic; +- +-out: +-#ifdef SMC9000_VERBOSE +- printf("No SMC9000 adapters found\n"); +-#endif +- smc9000_base = 0; +- +- return (0); +-} +- +- +- +diff -Naur grub-0.97.orig/netboot/smc9000.h grub-0.97/netboot/smc9000.h +--- grub-0.97.orig/netboot/smc9000.h 2003-07-09 11:45:38.000000000 +0000 ++++ grub-0.97/netboot/smc9000.h 1970-01-01 00:00:00.000000000 +0000 +@@ -1,205 +0,0 @@ +-/*------------------------------------------------------------------------ +- * smc9000.h +- * +- * Copyright (C) 1998 by Daniel Engström +- * Copyright (C) 1996 by Erik Stahlman +- * +- * This software may be used and distributed according to the terms +- * of the GNU Public License, incorporated herein by reference. +- * +- * This file contains register information and access macros for +- * the SMC91xxx chipset. +- * +- * Information contained in this file was obtained from the SMC91C94 +- * manual from SMC. To get a copy, if you really want one, you can find +- * information under www.smsc.com in the components division. +- * ( this thanks to advice from Donald Becker ). +- * +- * Authors +- * Daniel Engström +- * Erik Stahlman +- * +- * History +- * 96-01-06 Erik Stahlman moved definitions here from main .c +- * file +- * 96-01-19 Erik Stahlman polished this up some, and added +- * better error handling +- * 98-09-25 Daniel Engström adjusted for Etherboot +- * 98-09-27 Daniel Engström moved some static strings back to the +- * main .c file +- * --------------------------------------------------------------------------*/ +-#ifndef _SMC9000_H_ +-# define _SMC9000_H_ +- +-/* I want some simple types */ +-typedef unsigned char byte; +-typedef unsigned short word; +-typedef unsigned long int dword; +- +-/*--------------------------------------------------------------- +- * +- * A description of the SMC registers is probably in order here, +- * although for details, the SMC datasheet is invaluable. +- * +- * Basically, the chip has 4 banks of registers ( 0 to 3 ), which +- * are accessed by writing a number into the BANK_SELECT register +- * ( I also use a SMC_SELECT_BANK macro for this ). +- * +- * The banks are configured so that for most purposes, bank 2 is all +- * that is needed for simple run time tasks. +- * ----------------------------------------------------------------------*/ +- +-/* +- * Bank Select Register: +- * +- * yyyy yyyy 0000 00xx +- * xx = bank number +- * yyyy yyyy = 0x33, for identification purposes. +- */ +-#define BANK_SELECT 14 +- +-/* BANK 0 */ +- +-#define TCR 0 /* transmit control register */ +-#define TCR_ENABLE 0x0001 /* if this is 1, we can transmit */ +-#define TCR_FDUPLX 0x0800 /* receive packets sent out */ +-#define TCR_STP_SQET 0x1000 /* stop transmitting if Signal quality error */ +-#define TCR_MON_CNS 0x0400 /* monitors the carrier status */ +-#define TCR_PAD_ENABLE 0x0080 /* pads short packets to 64 bytes */ +- +-#define TCR_CLEAR 0 /* do NOTHING */ +-/* the normal settings for the TCR register : */ +-#define TCR_NORMAL (TCR_ENABLE | TCR_PAD_ENABLE) +- +- +-#define EPH_STATUS 2 +-#define ES_LINK_OK 0x4000 /* is the link integrity ok ? */ +- +-#define RCR 4 +-#define RCR_SOFTRESET 0x8000 /* resets the chip */ +-#define RCR_STRIP_CRC 0x200 /* strips CRC */ +-#define RCR_ENABLE 0x100 /* IFF this is set, we can receive packets */ +-#define RCR_ALMUL 0x4 /* receive all multicast packets */ +-#define RCR_PROMISC 0x2 /* enable promiscuous mode */ +- +-/* the normal settings for the RCR register : */ +-#define RCR_NORMAL (RCR_STRIP_CRC | RCR_ENABLE) +-#define RCR_CLEAR 0x0 /* set it to a base state */ +- +-#define COUNTER 6 +-#define MIR 8 +-#define MCR 10 +-/* 12 is reserved */ +- +-/* BANK 1 */ +-#define CONFIG 0 +-#define CFG_AUI_SELECT 0x100 +-#define BASE 2 +-#define ADDR0 4 +-#define ADDR1 6 +-#define ADDR2 8 +-#define GENERAL 10 +-#define CONTROL 12 +-#define CTL_POWERDOWN 0x2000 +-#define CTL_LE_ENABLE 0x80 +-#define CTL_CR_ENABLE 0x40 +-#define CTL_TE_ENABLE 0x0020 +-#define CTL_AUTO_RELEASE 0x0800 +-#define CTL_EPROM_ACCESS 0x0003 /* high if Eprom is being read */ +- +-/* BANK 2 */ +-#define MMU_CMD 0 +-#define MC_BUSY 1 /* only readable bit in the register */ +-#define MC_NOP 0 +-#define MC_ALLOC 0x20 /* or with number of 256 byte packets */ +-#define MC_RESET 0x40 +-#define MC_REMOVE 0x60 /* remove the current rx packet */ +-#define MC_RELEASE 0x80 /* remove and release the current rx packet */ +-#define MC_FREEPKT 0xA0 /* Release packet in PNR register */ +-#define MC_ENQUEUE 0xC0 /* Enqueue the packet for transmit */ +- +-#define PNR_ARR 2 +-#define FIFO_PORTS 4 +- +-#define FP_RXEMPTY 0x8000 +-#define FP_TXEMPTY 0x80 +- +-#define POINTER 6 +-#define PTR_READ 0x2000 +-#define PTR_RCV 0x8000 +-#define PTR_AUTOINC 0x4000 +-#define PTR_AUTO_INC 0x0040 +- +-#define DATA_1 8 +-#define DATA_2 10 +-#define INTERRUPT 12 +- +-#define INT_MASK 13 +-#define IM_RCV_INT 0x1 +-#define IM_TX_INT 0x2 +-#define IM_TX_EMPTY_INT 0x4 +-#define IM_ALLOC_INT 0x8 +-#define IM_RX_OVRN_INT 0x10 +-#define IM_EPH_INT 0x20 +-#define IM_ERCV_INT 0x40 /* not on SMC9192 */ +- +-/* BANK 3 */ +-#define MULTICAST1 0 +-#define MULTICAST2 2 +-#define MULTICAST3 4 +-#define MULTICAST4 6 +-#define MGMT 8 +-#define REVISION 10 /* ( hi: chip id low: rev # ) */ +- +- +-/* this is NOT on SMC9192 */ +-#define ERCV 12 +- +-/* Note that 9194 and 9196 have the smame chip id, +- * the 9196 will have revisions starting at 6 */ +-#define CHIP_9190 3 +-#define CHIP_9194 4 +-#define CHIP_9195 5 +-#define CHIP_9196 4 +-#define CHIP_91100 7 +-#define CHIP_91100FD 8 +- +-#define REV_9196 6 +- +-/* +- * Transmit status bits +- */ +-#define TS_SUCCESS 0x0001 +-#define TS_LOSTCAR 0x0400 +-#define TS_LATCOL 0x0200 +-#define TS_16COL 0x0010 +- +-/* +- * Receive status bits +- */ +-#define RS_ALGNERR 0x8000 +-#define RS_BADCRC 0x2000 +-#define RS_ODDFRAME 0x1000 +-#define RS_TOOLONG 0x0800 +-#define RS_TOOSHORT 0x0400 +-#define RS_MULTICAST 0x0001 +-#define RS_ERRORS (RS_ALGNERR | RS_BADCRC | RS_TOOLONG | RS_TOOSHORT) +- +- +-/*------------------------------------------------------------------------- +- * I define some macros to make it easier to do somewhat common +- * or slightly complicated, repeated tasks. +- --------------------------------------------------------------------------*/ +- +-/* select a register bank, 0 to 3 */ +- +-#define SMC_SELECT_BANK(x, y) { _outw( y, x + BANK_SELECT ); } +- +-/* define a small delay for the reset */ +-#define SMC_DELAY(x) { inw( x + RCR );\ +- inw( x + RCR );\ +- inw( x + RCR ); } +- +- +-#endif /* _SMC_9000_H_ */ +- +diff -Naur grub-0.97.orig/netboot/stdint.h grub-0.97/netboot/stdint.h +--- grub-0.97.orig/netboot/stdint.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/stdint.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,18 @@ ++#ifndef STDINT_H ++#define STDINT_H ++/* ++ * I'm architecture depended. Check me before port GRUB ++ */ ++typedef unsigned size_t; ++ ++typedef unsigned char uint8_t; ++typedef unsigned short uint16_t; ++typedef unsigned long uint32_t; ++typedef unsigned long long uint64_t; ++ ++typedef signed char int8_t; ++typedef signed short int16_t; ++typedef signed long int32_t; ++typedef signed long long int64_t; ++ ++#endif /* STDINT_H */ +diff -Naur grub-0.97.orig/netboot/tftp.h grub-0.97/netboot/tftp.h +--- grub-0.97.orig/netboot/tftp.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/tftp.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,82 @@ ++#ifndef _TFTP_H ++#define _TFTP_H ++ ++#include "if_ether.h" ++#include "ip.h" ++#include "udp.h" ++ ++#ifndef MAX_TFTP_RETRIES ++#define MAX_TFTP_RETRIES 20 ++#endif ++ ++/* These settings have sense only if compiled with -DCONGESTED */ ++/* total retransmission timeout in ticks */ ++#define TFTP_TIMEOUT (30*TICKS_PER_SEC) ++/* packet retransmission timeout in ticks */ ++#define TFTP_REXMT (3*TICKS_PER_SEC) ++ ++#define TFTP_PORT 69 ++#define TFTP_DEFAULTSIZE_PACKET 512 ++#define TFTP_MAX_PACKET 1432 /* 512 */ ++ ++#define TFTP_RRQ 1 ++#define TFTP_WRQ 2 ++#define TFTP_DATA 3 ++#define TFTP_ACK 4 ++#define TFTP_ERROR 5 ++#define TFTP_OACK 6 ++ ++#define TFTP_CODE_EOF 1 ++#define TFTP_CODE_MORE 2 ++#define TFTP_CODE_ERROR 3 ++#define TFTP_CODE_BOOT 4 ++#define TFTP_CODE_CFG 5 ++ ++struct tftp_t { ++ struct iphdr ip; ++ struct udphdr udp; ++ uint16_t opcode; ++ union { ++ uint8_t rrq[TFTP_DEFAULTSIZE_PACKET]; ++ struct { ++ uint16_t block; ++ uint8_t download[TFTP_MAX_PACKET]; ++ } data; ++ struct { ++ uint16_t block; ++ } ack; ++ struct { ++ uint16_t errcode; ++ uint8_t errmsg[TFTP_DEFAULTSIZE_PACKET]; ++ } err; ++ struct { ++ uint8_t data[TFTP_DEFAULTSIZE_PACKET+2]; ++ } oack; ++ } u; ++}; ++ ++/* define a smaller tftp packet solely for making requests to conserve stack ++ 512 bytes should be enough */ ++struct tftpreq_t { ++ struct iphdr ip; ++ struct udphdr udp; ++ uint16_t opcode; ++ union { ++ uint8_t rrq[512]; ++ struct { ++ uint16_t block; ++ } ack; ++ struct { ++ uint16_t errcode; ++ uint8_t errmsg[512-2]; ++ } err; ++ } u; ++}; ++ ++#define TFTP_MIN_PACKET (sizeof(struct iphdr) + sizeof(struct udphdr) + 4) ++ ++typedef int (*read_actor_t)(unsigned char *, unsigned int, unsigned int, int); ++ ++int tftp_file_read(const char *name, read_actor_t); ++ ++#endif /* _TFTP_H */ +diff -Naur grub-0.97.orig/netboot/tg3.c grub-0.97/netboot/tg3.c +--- grub-0.97.orig/netboot/tg3.c 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/tg3.c 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,3322 @@ ++/* $Id: grub-0.95-diskless-patch-2.patch,v 1.1.1.1 2005/06/14 08:18:50 wesolows Exp $ ++ * tg3.c: Broadcom Tigon3 ethernet driver. ++ * ++ * Copyright (C) 2001, 2002 David S. Miller (davem@redhat.com) ++ * Copyright (C) 2001, 2002 Jeff Garzik (jgarzik@mandrakesoft.com) ++ * Copyright (C) 2003 Eric Biederman (ebiederman@lnxi.com) [etherboot port] ++ */ ++ ++/* 11-13-2003 timlegge Fix Issue with NetGear GA302T ++ * 11-18-2003 ebiederm Generalize NetGear Fix to what the code was supposed to be. ++ */ ++ ++#include "etherboot.h" ++#include "nic.h" ++#include "pci.h" ++#include "timer.h" ++/*#include "string.h"*/ ++#include "tg3.h" ++ ++#define SUPPORT_COPPER_PHY 1 ++#define SUPPORT_FIBER_PHY 1 ++#define SUPPORT_LINK_REPORT 1 ++#define SUPPORT_PARTNO_STR 1 ++#define SUPPORT_PHY_STR 1 ++ ++struct tg3 tg3; ++ ++/* Dummy defines for error handling */ ++#define EBUSY 1 ++#define ENODEV 2 ++#define EINVAL 3 ++#define ENOMEM 4 ++ ++ ++/* These numbers seem to be hard coded in the NIC firmware somehow. ++ * You can't change the ring sizes, but you can change where you place ++ * them in the NIC onboard memory. ++ */ ++#define TG3_RX_RING_SIZE 512 ++#define TG3_DEF_RX_RING_PENDING 20 /* RX_RING_PENDING seems to be o.k. at 20 and 200 */ ++#define TG3_RX_RCB_RING_SIZE 1024 ++ ++/* (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 ? \ ++ 512 : 1024) */ ++ #define TG3_TX_RING_SIZE 512 ++#define TG3_DEF_TX_RING_PENDING (TG3_TX_RING_SIZE - 1) ++ ++#define TG3_RX_RING_BYTES (sizeof(struct tg3_rx_buffer_desc) * TG3_RX_RING_SIZE) ++#define TG3_RX_RCB_RING_BYTES (sizeof(struct tg3_rx_buffer_desc) * TG3_RX_RCB_RING_SIZE) ++ ++#define TG3_TX_RING_BYTES (sizeof(struct tg3_tx_buffer_desc) * TG3_TX_RING_SIZE) ++#define NEXT_TX(N) (((N) + 1) & (TG3_TX_RING_SIZE - 1)) ++#define PREV_TX(N) (((N) - 1) & (TG3_TX_RING_SIZE - 1)) ++ ++#define RX_PKT_BUF_SZ (1536 + 2 + 64) ++ ++ ++static struct bss { ++ struct tg3_rx_buffer_desc rx_std[TG3_RX_RING_SIZE]; ++ struct tg3_rx_buffer_desc rx_rcb[TG3_RX_RCB_RING_SIZE]; ++ struct tg3_tx_buffer_desc tx_ring[TG3_TX_RING_SIZE]; ++ struct tg3_hw_status hw_status; ++ struct tg3_hw_stats hw_stats; ++ unsigned char rx_bufs[TG3_DEF_RX_RING_PENDING][RX_PKT_BUF_SZ]; ++} tg3_bss; ++ ++/** ++ * pci_save_state - save the PCI configuration space of a device before suspending ++ * @dev: - PCI device that we're dealing with ++ * @buffer: - buffer to hold config space context ++ * ++ * @buffer must be large enough to hold the entire PCI 2.2 config space ++ * (>= 64 bytes). ++ */ ++static int pci_save_state(struct pci_device *dev, uint32_t *buffer) ++{ ++ int i; ++ for (i = 0; i < 16; i++) ++ pci_read_config_dword(dev, i * 4,&buffer[i]); ++ return 0; ++} ++ ++/** ++ * pci_restore_state - Restore the saved state of a PCI device ++ * @dev: - PCI device that we're dealing with ++ * @buffer: - saved PCI config space ++ * ++ */ ++static int pci_restore_state(struct pci_device *dev, uint32_t *buffer) ++{ ++ int i; ++ ++ for (i = 0; i < 16; i++) ++ pci_write_config_dword(dev,i * 4, buffer[i]); ++ return 0; ++} ++ ++static void tg3_write_indirect_reg32(uint32_t off, uint32_t val) ++{ ++ pci_write_config_dword(tg3.pdev, TG3PCI_REG_BASE_ADDR, off); ++ pci_write_config_dword(tg3.pdev, TG3PCI_REG_DATA, val); ++} ++ ++#define tw32(reg,val) tg3_write_indirect_reg32((reg),(val)) ++#define tw32_mailbox(reg, val) writel(((val) & 0xffffffff), tg3.regs + (reg)) ++#define tw16(reg,val) writew(((val) & 0xffff), tg3.regs + (reg)) ++#define tw8(reg,val) writeb(((val) & 0xff), tg3.regs + (reg)) ++#define tr32(reg) readl(tg3.regs + (reg)) ++#define tr16(reg) readw(tg3.regs + (reg)) ++#define tr8(reg) readb(tg3.regs + (reg)) ++ ++static void tw32_carefully(uint32_t reg, uint32_t val) ++{ ++ tw32(reg, val); ++ tr32(reg); ++ udelay(100); ++} ++ ++static void tw32_mailbox2(uint32_t reg, uint32_t val) ++{ ++ tw32_mailbox(reg, val); ++ tr32(reg); ++} ++ ++static void tg3_write_mem(uint32_t off, uint32_t val) ++{ ++ pci_write_config_dword(tg3.pdev, TG3PCI_MEM_WIN_BASE_ADDR, off); ++ pci_write_config_dword(tg3.pdev, TG3PCI_MEM_WIN_DATA, val); ++ ++ /* Always leave this as zero. */ ++ pci_write_config_dword(tg3.pdev, TG3PCI_MEM_WIN_BASE_ADDR, 0); ++} ++ ++static void tg3_read_mem(uint32_t off, uint32_t *val) ++{ ++ pci_write_config_dword(tg3.pdev, TG3PCI_MEM_WIN_BASE_ADDR, off); ++ pci_read_config_dword(tg3.pdev, TG3PCI_MEM_WIN_DATA, val); ++ ++ /* Always leave this as zero. */ ++ pci_write_config_dword(tg3.pdev, TG3PCI_MEM_WIN_BASE_ADDR, 0); ++} ++ ++static void tg3_disable_ints(struct tg3 *tp) ++{ ++ tw32(TG3PCI_MISC_HOST_CTRL, ++ (tp->misc_host_ctrl | MISC_HOST_CTRL_MASK_PCI_INT)); ++ tw32_mailbox2(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x00000001); ++} ++ ++static void tg3_switch_clocks(struct tg3 *tp) ++{ ++ uint32_t orig_clock_ctrl, clock_ctrl; ++ ++ clock_ctrl = tr32(TG3PCI_CLOCK_CTRL); ++ ++ orig_clock_ctrl = clock_ctrl; ++ clock_ctrl &= (CLOCK_CTRL_FORCE_CLKRUN | CLOCK_CTRL_CLKRUN_OENABLE | 0x1f); ++ tp->pci_clock_ctrl = clock_ctrl; ++ ++ if ((GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) && ++ (orig_clock_ctrl & CLOCK_CTRL_44MHZ_CORE)!=0) { ++ tw32_carefully(TG3PCI_CLOCK_CTRL, ++ clock_ctrl | (CLOCK_CTRL_44MHZ_CORE | CLOCK_CTRL_ALTCLK)); ++ tw32_carefully(TG3PCI_CLOCK_CTRL, ++ clock_ctrl | (CLOCK_CTRL_ALTCLK)); ++ } ++ tw32_carefully(TG3PCI_CLOCK_CTRL, clock_ctrl); ++} ++ ++#define PHY_BUSY_LOOPS 5000 ++ ++static int tg3_readphy(struct tg3 *tp, int reg, uint32_t *val) ++{ ++ uint32_t frame_val; ++ int loops, ret; ++ ++ tw32_carefully(MAC_MI_MODE, tp->mi_mode & ~MAC_MI_MODE_AUTO_POLL); ++ ++ *val = 0xffffffff; ++ ++ frame_val = ((PHY_ADDR << MI_COM_PHY_ADDR_SHIFT) & ++ MI_COM_PHY_ADDR_MASK); ++ frame_val |= ((reg << MI_COM_REG_ADDR_SHIFT) & ++ MI_COM_REG_ADDR_MASK); ++ frame_val |= (MI_COM_CMD_READ | MI_COM_START); ++ ++ tw32_carefully(MAC_MI_COM, frame_val); ++ ++ loops = PHY_BUSY_LOOPS; ++ while (loops-- > 0) { ++ udelay(10); ++ frame_val = tr32(MAC_MI_COM); ++ ++ if ((frame_val & MI_COM_BUSY) == 0) { ++ udelay(5); ++ frame_val = tr32(MAC_MI_COM); ++ break; ++ } ++ } ++ ++ ret = -EBUSY; ++ if (loops > 0) { ++ *val = frame_val & MI_COM_DATA_MASK; ++ ret = 0; ++ } ++ ++ tw32_carefully(MAC_MI_MODE, tp->mi_mode); ++ ++ return ret; ++} ++ ++static int tg3_writephy(struct tg3 *tp, int reg, uint32_t val) ++{ ++ uint32_t frame_val; ++ int loops, ret; ++ ++ tw32_carefully(MAC_MI_MODE, tp->mi_mode & ~MAC_MI_MODE_AUTO_POLL); ++ ++ frame_val = ((PHY_ADDR << MI_COM_PHY_ADDR_SHIFT) & ++ MI_COM_PHY_ADDR_MASK); ++ frame_val |= ((reg << MI_COM_REG_ADDR_SHIFT) & ++ MI_COM_REG_ADDR_MASK); ++ frame_val |= (val & MI_COM_DATA_MASK); ++ frame_val |= (MI_COM_CMD_WRITE | MI_COM_START); ++ ++ tw32_carefully(MAC_MI_COM, frame_val); ++ ++ loops = PHY_BUSY_LOOPS; ++ while (loops-- > 0) { ++ udelay(10); ++ frame_val = tr32(MAC_MI_COM); ++ if ((frame_val & MI_COM_BUSY) == 0) { ++ udelay(5); ++ frame_val = tr32(MAC_MI_COM); ++ break; ++ } ++ } ++ ++ ret = -EBUSY; ++ if (loops > 0) ++ ret = 0; ++ ++ tw32_carefully(MAC_MI_MODE, tp->mi_mode); ++ ++ return ret; ++} ++ ++static int tg3_writedsp(struct tg3 *tp, uint16_t addr, uint16_t val) ++{ ++ int err; ++ err = tg3_writephy(tp, MII_TG3_DSP_ADDRESS, addr); ++ err |= tg3_writephy(tp, MII_TG3_DSP_RW_PORT, val); ++ return err; ++} ++ ++ ++static void tg3_phy_set_wirespeed(struct tg3 *tp) ++{ ++ uint32_t val; ++ ++ if (tp->tg3_flags2 & TG3_FLG2_NO_ETH_WIRE_SPEED) ++ return; ++ ++ tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x7007); ++ tg3_readphy(tp, MII_TG3_AUX_CTRL, &val); ++ tg3_writephy(tp, MII_TG3_AUX_CTRL, (val | (1 << 15) | (1 << 4))); ++} ++ ++static int tg3_bmcr_reset(struct tg3 *tp) ++{ ++ uint32_t phy_control; ++ int limit, err; ++ ++ /* OK, reset it, and poll the BMCR_RESET bit until it ++ * clears or we time out. ++ */ ++ phy_control = BMCR_RESET; ++ err = tg3_writephy(tp, MII_BMCR, phy_control); ++ if (err != 0) ++ return -EBUSY; ++ ++ limit = 5000; ++ while (limit--) { ++ err = tg3_readphy(tp, MII_BMCR, &phy_control); ++ if (err != 0) ++ return -EBUSY; ++ ++ if ((phy_control & BMCR_RESET) == 0) { ++ udelay(40); ++ break; ++ } ++ udelay(10); ++ } ++ if (limit <= 0) ++ return -EBUSY; ++ ++ return 0; ++} ++ ++static int tg3_wait_macro_done(struct tg3 *tp) ++{ ++ int limit = 100; ++ ++ while (limit--) { ++ uint32_t tmp32; ++ ++ tg3_readphy(tp, 0x16, &tmp32); ++ if ((tmp32 & 0x1000) == 0) ++ break; ++ } ++ if (limit <= 0) ++ return -EBUSY; ++ ++ return 0; ++} ++ ++static int tg3_phy_write_and_check_testpat(struct tg3 *tp, int *resetp) ++{ ++ static const uint32_t test_pat[4][6] = { ++ { 0x00005555, 0x00000005, 0x00002aaa, 0x0000000a, 0x00003456, 0x00000003 }, ++ { 0x00002aaa, 0x0000000a, 0x00003333, 0x00000003, 0x0000789a, 0x00000005 }, ++ { 0x00005a5a, 0x00000005, 0x00002a6a, 0x0000000a, 0x00001bcd, 0x00000003 }, ++ { 0x00002a5a, 0x0000000a, 0x000033c3, 0x00000003, 0x00002ef1, 0x00000005 } ++ }; ++ int chan; ++ ++ for (chan = 0; chan < 4; chan++) { ++ int i; ++ ++ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, ++ (chan * 0x2000) | 0x0200); ++ tg3_writephy(tp, 0x16, 0x0002); ++ ++ for (i = 0; i < 6; i++) ++ tg3_writephy(tp, MII_TG3_DSP_RW_PORT, ++ test_pat[chan][i]); ++ ++ tg3_writephy(tp, 0x16, 0x0202); ++ if (tg3_wait_macro_done(tp)) { ++ *resetp = 1; ++ return -EBUSY; ++ } ++ ++ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, ++ (chan * 0x2000) | 0x0200); ++ tg3_writephy(tp, 0x16, 0x0082); ++ if (tg3_wait_macro_done(tp)) { ++ *resetp = 1; ++ return -EBUSY; ++ } ++ ++ tg3_writephy(tp, 0x16, 0x0802); ++ if (tg3_wait_macro_done(tp)) { ++ *resetp = 1; ++ return -EBUSY; ++ } ++ ++ for (i = 0; i < 6; i += 2) { ++ uint32_t low, high; ++ ++ tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &low); ++ tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &high); ++ if (tg3_wait_macro_done(tp)) { ++ *resetp = 1; ++ return -EBUSY; ++ } ++ low &= 0x7fff; ++ high &= 0x000f; ++ if (low != test_pat[chan][i] || ++ high != test_pat[chan][i+1]) { ++ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x000b); ++ tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x4001); ++ tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x4005); ++ ++ return -EBUSY; ++ } ++ } ++ } ++ ++ return 0; ++} ++ ++static int tg3_phy_reset_chanpat(struct tg3 *tp) ++{ ++ int chan; ++ ++ for (chan = 0; chan < 4; chan++) { ++ int i; ++ ++ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, ++ (chan * 0x2000) | 0x0200); ++ tg3_writephy(tp, 0x16, 0x0002); ++ for (i = 0; i < 6; i++) ++ tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x000); ++ tg3_writephy(tp, 0x16, 0x0202); ++ if (tg3_wait_macro_done(tp)) ++ return -EBUSY; ++ } ++ ++ return 0; ++} ++ ++static int tg3_phy_reset_5703_4_5(struct tg3 *tp) ++{ ++ uint32_t reg32, phy9_orig; ++ int retries, do_phy_reset, err; ++ ++ retries = 10; ++ do_phy_reset = 1; ++ do { ++ if (do_phy_reset) { ++ err = tg3_bmcr_reset(tp); ++ if (err) ++ return err; ++ do_phy_reset = 0; ++ } ++ ++ /* Disable transmitter and interrupt. */ ++ tg3_readphy(tp, MII_TG3_EXT_CTRL, ®32); ++ reg32 |= 0x3000; ++ tg3_writephy(tp, MII_TG3_EXT_CTRL, reg32); ++ ++ /* Set full-duplex, 1000 mbps. */ ++ tg3_writephy(tp, MII_BMCR, ++ BMCR_FULLDPLX | TG3_BMCR_SPEED1000); ++ ++ /* Set to master mode. */ ++ tg3_readphy(tp, MII_TG3_CTRL, &phy9_orig); ++ tg3_writephy(tp, MII_TG3_CTRL, ++ (MII_TG3_CTRL_AS_MASTER | ++ MII_TG3_CTRL_ENABLE_AS_MASTER)); ++ ++ /* Enable SM_DSP_CLOCK and 6dB. */ ++ tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0c00); ++ ++ /* Block the PHY control access. */ ++ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x8005); ++ tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x0800); ++ ++ err = tg3_phy_write_and_check_testpat(tp, &do_phy_reset); ++ if (!err) ++ break; ++ } while (--retries); ++ ++ err = tg3_phy_reset_chanpat(tp); ++ if (err) ++ return err; ++ ++ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x8005); ++ tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x0000); ++ ++ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x8200); ++ tg3_writephy(tp, 0x16, 0x0000); ++ ++ tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0400); ++ ++ tg3_writephy(tp, MII_TG3_CTRL, phy9_orig); ++ ++ tg3_readphy(tp, MII_TG3_EXT_CTRL, ®32); ++ reg32 &= ~0x3000; ++ tg3_writephy(tp, MII_TG3_EXT_CTRL, reg32); ++ ++ return err; ++} ++ ++/* This will reset the tigon3 PHY if there is no valid ++ * link. ++ */ ++static int tg3_phy_reset(struct tg3 *tp) ++{ ++ uint32_t phy_status; ++ int err; ++ ++ err = tg3_readphy(tp, MII_BMSR, &phy_status); ++ err |= tg3_readphy(tp, MII_BMSR, &phy_status); ++ if (err != 0) ++ return -EBUSY; ++ ++ if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) || ++ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) || ++ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705)) { ++ err = tg3_phy_reset_5703_4_5(tp); ++ if (err) ++ return err; ++ goto out; ++ } ++ err = tg3_bmcr_reset(tp); ++ if (err) ++ return err; ++ out: ++ tg3_phy_set_wirespeed(tp); ++ return 0; ++} ++ ++static void tg3_set_power_state_0(struct tg3 *tp) ++{ ++ uint16_t power_control; ++ int pm = tp->pm_cap; ++ ++ /* Make sure register accesses (indirect or otherwise) ++ * will function correctly. ++ */ ++ pci_write_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL, tp->misc_host_ctrl); ++ ++ pci_read_config_word(tp->pdev, pm + PCI_PM_CTRL, &power_control); ++ ++ power_control |= PCI_PM_CTRL_PME_STATUS; ++ power_control &= ~(PCI_PM_CTRL_STATE_MASK); ++ power_control |= 0; ++ pci_write_config_word(tp->pdev, pm + PCI_PM_CTRL, power_control); ++ ++ tw32_carefully(GRC_LOCAL_CTRL, tp->grc_local_ctrl); ++ ++ return; ++} ++ ++ ++#if SUPPORT_LINK_REPORT ++static void tg3_link_report(struct tg3 *tp) ++{ ++ if (!tp->carrier_ok) { ++ printf("Link is down.\n"); ++ } else { ++ printf("Link is up at %d Mbps, %s duplex. %s %s %s\n", ++ (tp->link_config.active_speed == SPEED_1000 ? ++ 1000 : ++ (tp->link_config.active_speed == SPEED_100 ? ++ 100 : 10)), ++ (tp->link_config.active_duplex == DUPLEX_FULL ? ++ "full" : "half"), ++ (tp->tg3_flags & TG3_FLAG_TX_PAUSE) ? "TX" : "", ++ (tp->tg3_flags & TG3_FLAG_RX_PAUSE) ? "RX" : "", ++ (tp->tg3_flags & (TG3_FLAG_TX_PAUSE |TG3_FLAG_RX_PAUSE)) ? "flow control" : ""); ++ } ++} ++#else ++#define tg3_link_report(tp) ++#endif ++ ++static void tg3_setup_flow_control(struct tg3 *tp, uint32_t local_adv, uint32_t remote_adv) ++{ ++ uint32_t new_tg3_flags = 0; ++ ++ if (local_adv & ADVERTISE_PAUSE_CAP) { ++ if (local_adv & ADVERTISE_PAUSE_ASYM) { ++ if (remote_adv & LPA_PAUSE_CAP) ++ new_tg3_flags |= ++ (TG3_FLAG_RX_PAUSE | ++ TG3_FLAG_TX_PAUSE); ++ else if (remote_adv & LPA_PAUSE_ASYM) ++ new_tg3_flags |= ++ (TG3_FLAG_RX_PAUSE); ++ } else { ++ if (remote_adv & LPA_PAUSE_CAP) ++ new_tg3_flags |= ++ (TG3_FLAG_RX_PAUSE | ++ TG3_FLAG_TX_PAUSE); ++ } ++ } else if (local_adv & ADVERTISE_PAUSE_ASYM) { ++ if ((remote_adv & LPA_PAUSE_CAP) && ++ (remote_adv & LPA_PAUSE_ASYM)) ++ new_tg3_flags |= TG3_FLAG_TX_PAUSE; ++ } ++ ++ tp->tg3_flags &= ~(TG3_FLAG_RX_PAUSE | TG3_FLAG_TX_PAUSE); ++ tp->tg3_flags |= new_tg3_flags; ++ ++ if (new_tg3_flags & TG3_FLAG_RX_PAUSE) ++ tp->rx_mode |= RX_MODE_FLOW_CTRL_ENABLE; ++ else ++ tp->rx_mode &= ~RX_MODE_FLOW_CTRL_ENABLE; ++ ++ if (new_tg3_flags & TG3_FLAG_TX_PAUSE) ++ tp->tx_mode |= TX_MODE_FLOW_CTRL_ENABLE; ++ else ++ tp->tx_mode &= ~TX_MODE_FLOW_CTRL_ENABLE; ++} ++ ++#if SUPPORT_COPPER_PHY ++static void tg3_aux_stat_to_speed_duplex( ++ struct tg3 *tp __unused, uint32_t val, uint8_t *speed, uint8_t *duplex) ++{ ++ static const uint8_t map[] = { ++ [0] = (SPEED_INVALID << 2) | DUPLEX_INVALID, ++ [MII_TG3_AUX_STAT_10HALF >> 8] = (SPEED_10 << 2) | DUPLEX_HALF, ++ [MII_TG3_AUX_STAT_10FULL >> 8] = (SPEED_10 << 2) | DUPLEX_FULL, ++ [MII_TG3_AUX_STAT_100HALF >> 8] = (SPEED_100 << 2) | DUPLEX_HALF, ++ [MII_TG3_AUX_STAT_100_4 >> 8] = (SPEED_INVALID << 2) | DUPLEX_INVALID, ++ [MII_TG3_AUX_STAT_100FULL >> 8] = (SPEED_100 << 2) | DUPLEX_FULL, ++ [MII_TG3_AUX_STAT_1000HALF >> 8] = (SPEED_1000 << 2) | DUPLEX_HALF, ++ [MII_TG3_AUX_STAT_1000FULL >> 8] = (SPEED_1000 << 2) | DUPLEX_FULL, ++ }; ++ uint8_t result; ++ result = map[(val & MII_TG3_AUX_STAT_SPDMASK) >> 8]; ++ *speed = result >> 2; ++ *duplex = result & 3; ++} ++ ++static int tg3_phy_copper_begin(struct tg3 *tp) ++{ ++ uint32_t new_adv; ++ ++ tp->link_config.advertising = ++ (ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full | ++ ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full | ++ ADVERTISED_1000baseT_Half | ADVERTISED_1000baseT_Full | ++ ADVERTISED_Autoneg | ADVERTISED_MII); ++ ++ if (tp->tg3_flags & TG3_FLAG_10_100_ONLY) { ++ tp->link_config.advertising &= ++ ~(ADVERTISED_1000baseT_Half | ADVERTISED_1000baseT_Full); ++ } ++ ++ new_adv = (ADVERTISE_CSMA | ADVERTISE_PAUSE_CAP); ++ if (tp->link_config.advertising & ADVERTISED_10baseT_Half) { ++ new_adv |= ADVERTISE_10HALF; ++ } ++ if (tp->link_config.advertising & ADVERTISED_10baseT_Full) { ++ new_adv |= ADVERTISE_10FULL; ++ } ++ if (tp->link_config.advertising & ADVERTISED_100baseT_Half) { ++ new_adv |= ADVERTISE_100HALF; ++ } ++ if (tp->link_config.advertising & ADVERTISED_100baseT_Full) { ++ new_adv |= ADVERTISE_100FULL; ++ } ++ tg3_writephy(tp, MII_ADVERTISE, new_adv); ++ ++ if (tp->link_config.advertising & ++ (ADVERTISED_1000baseT_Half | ADVERTISED_1000baseT_Full)) { ++ new_adv = 0; ++ if (tp->link_config.advertising & ADVERTISED_1000baseT_Half) { ++ new_adv |= MII_TG3_CTRL_ADV_1000_HALF; ++ } ++ if (tp->link_config.advertising & ADVERTISED_1000baseT_Full) { ++ new_adv |= MII_TG3_CTRL_ADV_1000_FULL; ++ } ++ if (!(tp->tg3_flags & TG3_FLAG_10_100_ONLY) && ++ (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0 || ++ tp->pci_chip_rev_id == CHIPREV_ID_5701_B0)) { ++ new_adv |= (MII_TG3_CTRL_AS_MASTER | ++ MII_TG3_CTRL_ENABLE_AS_MASTER); ++ } ++ tg3_writephy(tp, MII_TG3_CTRL, new_adv); ++ } else { ++ tg3_writephy(tp, MII_TG3_CTRL, 0); ++ } ++ ++ tg3_writephy(tp, MII_BMCR, BMCR_ANENABLE | BMCR_ANRESTART); ++ ++ return 0; ++} ++ ++static int tg3_init_5401phy_dsp(struct tg3 *tp) ++{ ++ int err; ++ ++ /* Turn off tap power management. */ ++ err = tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0c20); ++ ++ err |= tg3_writedsp(tp, 0x0012, 0x1804); ++ err |= tg3_writedsp(tp, 0x0013, 0x1204); ++ err |= tg3_writedsp(tp, 0x8006, 0x0132); ++ err |= tg3_writedsp(tp, 0x8006, 0x0232); ++ err |= tg3_writedsp(tp, 0x201f, 0x0a20); ++ ++ udelay(40); ++ ++ return err; ++} ++ ++static int tg3_setup_copper_phy(struct tg3 *tp) ++{ ++ int current_link_up; ++ uint32_t bmsr, dummy; ++ int i, err; ++ ++ tw32_carefully(MAC_STATUS, ++ (MAC_STATUS_SYNC_CHANGED | MAC_STATUS_CFG_CHANGED)); ++ ++ tp->mi_mode = MAC_MI_MODE_BASE; ++ tw32_carefully(MAC_MI_MODE, tp->mi_mode); ++ ++ tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x02); ++ ++ /* Some third-party PHYs need to be reset on link going ++ * down. ++ */ ++ if ( ( (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) || ++ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) || ++ (tp->pci_chip_rev_id == CHIPREV_ID_5705_A0)) && ++ (tp->carrier_ok)) { ++ tg3_readphy(tp, MII_BMSR, &bmsr); ++ tg3_readphy(tp, MII_BMSR, &bmsr); ++ if (!(bmsr & BMSR_LSTATUS)) ++ tg3_phy_reset(tp); ++ } ++ ++ if ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5401) { ++ tg3_readphy(tp, MII_BMSR, &bmsr); ++ tg3_readphy(tp, MII_BMSR, &bmsr); ++ ++ if (!(tp->tg3_flags & TG3_FLAG_INIT_COMPLETE)) ++ bmsr = 0; ++ ++ if (!(bmsr & BMSR_LSTATUS)) { ++ err = tg3_init_5401phy_dsp(tp); ++ if (err) ++ return err; ++ ++ tg3_readphy(tp, MII_BMSR, &bmsr); ++ for (i = 0; i < 1000; i++) { ++ udelay(10); ++ tg3_readphy(tp, MII_BMSR, &bmsr); ++ if (bmsr & BMSR_LSTATUS) { ++ udelay(40); ++ break; ++ } ++ } ++ ++ if ((tp->phy_id & PHY_ID_REV_MASK) == PHY_REV_BCM5401_B0 && ++ !(bmsr & BMSR_LSTATUS) && ++ tp->link_config.active_speed == SPEED_1000) { ++ err = tg3_phy_reset(tp); ++ if (!err) ++ err = tg3_init_5401phy_dsp(tp); ++ if (err) ++ return err; ++ } ++ } ++ } else if (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0 || ++ tp->pci_chip_rev_id == CHIPREV_ID_5701_B0) { ++ /* 5701 {A0,B0} CRC bug workaround */ ++ tg3_writephy(tp, 0x15, 0x0a75); ++ tg3_writephy(tp, 0x1c, 0x8c68); ++ tg3_writephy(tp, 0x1c, 0x8d68); ++ tg3_writephy(tp, 0x1c, 0x8c68); ++ } ++ ++ /* Clear pending interrupts... */ ++ tg3_readphy(tp, MII_TG3_ISTAT, &dummy); ++ tg3_readphy(tp, MII_TG3_ISTAT, &dummy); ++ ++ tg3_writephy(tp, MII_TG3_IMASK, ~0); ++ ++ if (tp->led_mode == led_mode_three_link) ++ tg3_writephy(tp, MII_TG3_EXT_CTRL, ++ MII_TG3_EXT_CTRL_LNK3_LED_MODE); ++ else ++ tg3_writephy(tp, MII_TG3_EXT_CTRL, 0); ++ ++ current_link_up = 0; ++ ++ tg3_readphy(tp, MII_BMSR, &bmsr); ++ tg3_readphy(tp, MII_BMSR, &bmsr); ++ ++ if (bmsr & BMSR_LSTATUS) { ++ uint32_t aux_stat, bmcr; ++ ++ tg3_readphy(tp, MII_TG3_AUX_STAT, &aux_stat); ++ for (i = 0; i < 2000; i++) { ++ udelay(10); ++ tg3_readphy(tp, MII_TG3_AUX_STAT, &aux_stat); ++ if (aux_stat) ++ break; ++ } ++ ++ tg3_aux_stat_to_speed_duplex(tp, aux_stat, ++ &tp->link_config.active_speed, ++ &tp->link_config.active_duplex); ++ tg3_readphy(tp, MII_BMCR, &bmcr); ++ tg3_readphy(tp, MII_BMCR, &bmcr); ++ if (bmcr & BMCR_ANENABLE) { ++ uint32_t gig_ctrl; ++ ++ current_link_up = 1; ++ ++ /* Force autoneg restart if we are exiting ++ * low power mode. ++ */ ++ tg3_readphy(tp, MII_TG3_CTRL, &gig_ctrl); ++ if (!(gig_ctrl & (MII_TG3_CTRL_ADV_1000_HALF | ++ MII_TG3_CTRL_ADV_1000_FULL))) { ++ current_link_up = 0; ++ } ++ } else { ++ current_link_up = 0; ++ } ++ } ++ ++ if (current_link_up == 1 && ++ (tp->link_config.active_duplex == DUPLEX_FULL)) { ++ uint32_t local_adv, remote_adv; ++ ++ tg3_readphy(tp, MII_ADVERTISE, &local_adv); ++ local_adv &= (ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM); ++ ++ tg3_readphy(tp, MII_LPA, &remote_adv); ++ remote_adv &= (LPA_PAUSE_CAP | LPA_PAUSE_ASYM); ++ ++ /* If we are not advertising full pause capability, ++ * something is wrong. Bring the link down and reconfigure. ++ */ ++ if (local_adv != ADVERTISE_PAUSE_CAP) { ++ current_link_up = 0; ++ } else { ++ tg3_setup_flow_control(tp, local_adv, remote_adv); ++ } ++ } ++ ++ if (current_link_up == 0) { ++ uint32_t tmp; ++ ++ tg3_phy_copper_begin(tp); ++ ++ tg3_readphy(tp, MII_BMSR, &tmp); ++ tg3_readphy(tp, MII_BMSR, &tmp); ++ if (tmp & BMSR_LSTATUS) ++ current_link_up = 1; ++ } ++ ++ tp->mac_mode &= ~MAC_MODE_PORT_MODE_MASK; ++ if (current_link_up == 1) { ++ if (tp->link_config.active_speed == SPEED_100 || ++ tp->link_config.active_speed == SPEED_10) ++ tp->mac_mode |= MAC_MODE_PORT_MODE_MII; ++ else ++ tp->mac_mode |= MAC_MODE_PORT_MODE_GMII; ++ } else ++ tp->mac_mode |= MAC_MODE_PORT_MODE_GMII; ++ ++ tp->mac_mode &= ~MAC_MODE_HALF_DUPLEX; ++ if (tp->link_config.active_duplex == DUPLEX_HALF) ++ tp->mac_mode |= MAC_MODE_HALF_DUPLEX; ++ ++ tp->mac_mode &= ~MAC_MODE_LINK_POLARITY; ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700) { ++ if ((tp->led_mode == led_mode_link10) || ++ (current_link_up == 1 && ++ tp->link_config.active_speed == SPEED_10)) ++ tp->mac_mode |= MAC_MODE_LINK_POLARITY; ++ } else { ++ if (current_link_up == 1) ++ tp->mac_mode |= MAC_MODE_LINK_POLARITY; ++ tw32(MAC_LED_CTRL, LED_CTRL_PHY_MODE_1); ++ } ++ ++ /* ??? Without this setting Netgear GA302T PHY does not ++ * ??? send/receive packets... ++ * With this other PHYs cannot bring up the link ++ */ ++ if ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5411 && ++ tp->pci_chip_rev_id == CHIPREV_ID_5700_ALTIMA) { ++ tp->mi_mode |= MAC_MI_MODE_AUTO_POLL; ++ tw32_carefully(MAC_MI_MODE, tp->mi_mode); ++ } ++ ++ tw32_carefully(MAC_MODE, tp->mac_mode); ++ ++ /* Link change polled. */ ++ tw32_carefully(MAC_EVENT, 0); ++ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 && ++ current_link_up == 1 && ++ tp->link_config.active_speed == SPEED_1000 && ++ ((tp->tg3_flags & TG3_FLAG_PCIX_MODE) || ++ (tp->tg3_flags & TG3_FLAG_PCI_HIGH_SPEED))) { ++ udelay(120); ++ tw32_carefully(MAC_STATUS, ++ (MAC_STATUS_SYNC_CHANGED | MAC_STATUS_CFG_CHANGED)); ++ tg3_write_mem( ++ NIC_SRAM_FIRMWARE_MBOX, ++ NIC_SRAM_FIRMWARE_MBOX_MAGIC2); ++ } ++ ++ if (current_link_up != tp->carrier_ok) { ++ tp->carrier_ok = current_link_up; ++ tg3_link_report(tp); ++ } ++ ++ return 0; ++} ++#else ++#define tg3_setup_copper_phy(TP) (-EINVAL) ++#endif /* SUPPORT_COPPER_PHY */ ++ ++#if SUPPORT_FIBER_PHY ++struct tg3_fiber_aneginfo { ++ int state; ++#define ANEG_STATE_UNKNOWN 0 ++#define ANEG_STATE_AN_ENABLE 1 ++#define ANEG_STATE_RESTART_INIT 2 ++#define ANEG_STATE_RESTART 3 ++#define ANEG_STATE_DISABLE_LINK_OK 4 ++#define ANEG_STATE_ABILITY_DETECT_INIT 5 ++#define ANEG_STATE_ABILITY_DETECT 6 ++#define ANEG_STATE_ACK_DETECT_INIT 7 ++#define ANEG_STATE_ACK_DETECT 8 ++#define ANEG_STATE_COMPLETE_ACK_INIT 9 ++#define ANEG_STATE_COMPLETE_ACK 10 ++#define ANEG_STATE_IDLE_DETECT_INIT 11 ++#define ANEG_STATE_IDLE_DETECT 12 ++#define ANEG_STATE_LINK_OK 13 ++#define ANEG_STATE_NEXT_PAGE_WAIT_INIT 14 ++#define ANEG_STATE_NEXT_PAGE_WAIT 15 ++ ++ uint32_t flags; ++#define MR_AN_ENABLE 0x00000001 ++#define MR_RESTART_AN 0x00000002 ++#define MR_AN_COMPLETE 0x00000004 ++#define MR_PAGE_RX 0x00000008 ++#define MR_NP_LOADED 0x00000010 ++#define MR_TOGGLE_TX 0x00000020 ++#define MR_LP_ADV_FULL_DUPLEX 0x00000040 ++#define MR_LP_ADV_HALF_DUPLEX 0x00000080 ++#define MR_LP_ADV_SYM_PAUSE 0x00000100 ++#define MR_LP_ADV_ASYM_PAUSE 0x00000200 ++#define MR_LP_ADV_REMOTE_FAULT1 0x00000400 ++#define MR_LP_ADV_REMOTE_FAULT2 0x00000800 ++#define MR_LP_ADV_NEXT_PAGE 0x00001000 ++#define MR_TOGGLE_RX 0x00002000 ++#define MR_NP_RX 0x00004000 ++ ++#define MR_LINK_OK 0x80000000 ++ ++ unsigned long link_time, cur_time; ++ ++ uint32_t ability_match_cfg; ++ int ability_match_count; ++ ++ char ability_match, idle_match, ack_match; ++ ++ uint32_t txconfig, rxconfig; ++#define ANEG_CFG_NP 0x00000080 ++#define ANEG_CFG_ACK 0x00000040 ++#define ANEG_CFG_RF2 0x00000020 ++#define ANEG_CFG_RF1 0x00000010 ++#define ANEG_CFG_PS2 0x00000001 ++#define ANEG_CFG_PS1 0x00008000 ++#define ANEG_CFG_HD 0x00004000 ++#define ANEG_CFG_FD 0x00002000 ++#define ANEG_CFG_INVAL 0x00001f06 ++ ++}; ++#define ANEG_OK 0 ++#define ANEG_DONE 1 ++#define ANEG_TIMER_ENAB 2 ++#define ANEG_FAILED -1 ++ ++#define ANEG_STATE_SETTLE_TIME 10000 ++ ++static int tg3_fiber_aneg_smachine(struct tg3 *tp, ++ struct tg3_fiber_aneginfo *ap) ++{ ++ unsigned long delta; ++ uint32_t rx_cfg_reg; ++ int ret; ++ ++ if (ap->state == ANEG_STATE_UNKNOWN) { ++ ap->rxconfig = 0; ++ ap->link_time = 0; ++ ap->cur_time = 0; ++ ap->ability_match_cfg = 0; ++ ap->ability_match_count = 0; ++ ap->ability_match = 0; ++ ap->idle_match = 0; ++ ap->ack_match = 0; ++ } ++ ap->cur_time++; ++ ++ if (tr32(MAC_STATUS) & MAC_STATUS_RCVD_CFG) { ++ rx_cfg_reg = tr32(MAC_RX_AUTO_NEG); ++ ++ if (rx_cfg_reg != ap->ability_match_cfg) { ++ ap->ability_match_cfg = rx_cfg_reg; ++ ap->ability_match = 0; ++ ap->ability_match_count = 0; ++ } else { ++ if (++ap->ability_match_count > 1) { ++ ap->ability_match = 1; ++ ap->ability_match_cfg = rx_cfg_reg; ++ } ++ } ++ if (rx_cfg_reg & ANEG_CFG_ACK) ++ ap->ack_match = 1; ++ else ++ ap->ack_match = 0; ++ ++ ap->idle_match = 0; ++ } else { ++ ap->idle_match = 1; ++ ap->ability_match_cfg = 0; ++ ap->ability_match_count = 0; ++ ap->ability_match = 0; ++ ap->ack_match = 0; ++ ++ rx_cfg_reg = 0; ++ } ++ ++ ap->rxconfig = rx_cfg_reg; ++ ret = ANEG_OK; ++ ++ switch(ap->state) { ++ case ANEG_STATE_UNKNOWN: ++ if (ap->flags & (MR_AN_ENABLE | MR_RESTART_AN)) ++ ap->state = ANEG_STATE_AN_ENABLE; ++ ++ /* fallthru */ ++ case ANEG_STATE_AN_ENABLE: ++ ap->flags &= ~(MR_AN_COMPLETE | MR_PAGE_RX); ++ if (ap->flags & MR_AN_ENABLE) { ++ ap->link_time = 0; ++ ap->cur_time = 0; ++ ap->ability_match_cfg = 0; ++ ap->ability_match_count = 0; ++ ap->ability_match = 0; ++ ap->idle_match = 0; ++ ap->ack_match = 0; ++ ++ ap->state = ANEG_STATE_RESTART_INIT; ++ } else { ++ ap->state = ANEG_STATE_DISABLE_LINK_OK; ++ } ++ break; ++ ++ case ANEG_STATE_RESTART_INIT: ++ ap->link_time = ap->cur_time; ++ ap->flags &= ~(MR_NP_LOADED); ++ ap->txconfig = 0; ++ tw32(MAC_TX_AUTO_NEG, 0); ++ tp->mac_mode |= MAC_MODE_SEND_CONFIGS; ++ tw32_carefully(MAC_MODE, tp->mac_mode); ++ ++ ret = ANEG_TIMER_ENAB; ++ ap->state = ANEG_STATE_RESTART; ++ ++ /* fallthru */ ++ case ANEG_STATE_RESTART: ++ delta = ap->cur_time - ap->link_time; ++ if (delta > ANEG_STATE_SETTLE_TIME) { ++ ap->state = ANEG_STATE_ABILITY_DETECT_INIT; ++ } else { ++ ret = ANEG_TIMER_ENAB; ++ } ++ break; ++ ++ case ANEG_STATE_DISABLE_LINK_OK: ++ ret = ANEG_DONE; ++ break; ++ ++ case ANEG_STATE_ABILITY_DETECT_INIT: ++ ap->flags &= ~(MR_TOGGLE_TX); ++ ap->txconfig = (ANEG_CFG_FD | ANEG_CFG_PS1); ++ tw32(MAC_TX_AUTO_NEG, ap->txconfig); ++ tp->mac_mode |= MAC_MODE_SEND_CONFIGS; ++ tw32_carefully(MAC_MODE, tp->mac_mode); ++ ++ ap->state = ANEG_STATE_ABILITY_DETECT; ++ break; ++ ++ case ANEG_STATE_ABILITY_DETECT: ++ if (ap->ability_match != 0 && ap->rxconfig != 0) { ++ ap->state = ANEG_STATE_ACK_DETECT_INIT; ++ } ++ break; ++ ++ case ANEG_STATE_ACK_DETECT_INIT: ++ ap->txconfig |= ANEG_CFG_ACK; ++ tw32(MAC_TX_AUTO_NEG, ap->txconfig); ++ tp->mac_mode |= MAC_MODE_SEND_CONFIGS; ++ tw32_carefully(MAC_MODE, tp->mac_mode); ++ ++ ap->state = ANEG_STATE_ACK_DETECT; ++ ++ /* fallthru */ ++ case ANEG_STATE_ACK_DETECT: ++ if (ap->ack_match != 0) { ++ if ((ap->rxconfig & ~ANEG_CFG_ACK) == ++ (ap->ability_match_cfg & ~ANEG_CFG_ACK)) { ++ ap->state = ANEG_STATE_COMPLETE_ACK_INIT; ++ } else { ++ ap->state = ANEG_STATE_AN_ENABLE; ++ } ++ } else if (ap->ability_match != 0 && ++ ap->rxconfig == 0) { ++ ap->state = ANEG_STATE_AN_ENABLE; ++ } ++ break; ++ ++ case ANEG_STATE_COMPLETE_ACK_INIT: ++ if (ap->rxconfig & ANEG_CFG_INVAL) { ++ ret = ANEG_FAILED; ++ break; ++ } ++ ap->flags &= ~(MR_LP_ADV_FULL_DUPLEX | ++ MR_LP_ADV_HALF_DUPLEX | ++ MR_LP_ADV_SYM_PAUSE | ++ MR_LP_ADV_ASYM_PAUSE | ++ MR_LP_ADV_REMOTE_FAULT1 | ++ MR_LP_ADV_REMOTE_FAULT2 | ++ MR_LP_ADV_NEXT_PAGE | ++ MR_TOGGLE_RX | ++ MR_NP_RX); ++ if (ap->rxconfig & ANEG_CFG_FD) ++ ap->flags |= MR_LP_ADV_FULL_DUPLEX; ++ if (ap->rxconfig & ANEG_CFG_HD) ++ ap->flags |= MR_LP_ADV_HALF_DUPLEX; ++ if (ap->rxconfig & ANEG_CFG_PS1) ++ ap->flags |= MR_LP_ADV_SYM_PAUSE; ++ if (ap->rxconfig & ANEG_CFG_PS2) ++ ap->flags |= MR_LP_ADV_ASYM_PAUSE; ++ if (ap->rxconfig & ANEG_CFG_RF1) ++ ap->flags |= MR_LP_ADV_REMOTE_FAULT1; ++ if (ap->rxconfig & ANEG_CFG_RF2) ++ ap->flags |= MR_LP_ADV_REMOTE_FAULT2; ++ if (ap->rxconfig & ANEG_CFG_NP) ++ ap->flags |= MR_LP_ADV_NEXT_PAGE; ++ ++ ap->link_time = ap->cur_time; ++ ++ ap->flags ^= (MR_TOGGLE_TX); ++ if (ap->rxconfig & 0x0008) ++ ap->flags |= MR_TOGGLE_RX; ++ if (ap->rxconfig & ANEG_CFG_NP) ++ ap->flags |= MR_NP_RX; ++ ap->flags |= MR_PAGE_RX; ++ ++ ap->state = ANEG_STATE_COMPLETE_ACK; ++ ret = ANEG_TIMER_ENAB; ++ break; ++ ++ case ANEG_STATE_COMPLETE_ACK: ++ if (ap->ability_match != 0 && ++ ap->rxconfig == 0) { ++ ap->state = ANEG_STATE_AN_ENABLE; ++ break; ++ } ++ delta = ap->cur_time - ap->link_time; ++ if (delta > ANEG_STATE_SETTLE_TIME) { ++ if (!(ap->flags & (MR_LP_ADV_NEXT_PAGE))) { ++ ap->state = ANEG_STATE_IDLE_DETECT_INIT; ++ } else { ++ if ((ap->txconfig & ANEG_CFG_NP) == 0 && ++ !(ap->flags & MR_NP_RX)) { ++ ap->state = ANEG_STATE_IDLE_DETECT_INIT; ++ } else { ++ ret = ANEG_FAILED; ++ } ++ } ++ } ++ break; ++ ++ case ANEG_STATE_IDLE_DETECT_INIT: ++ ap->link_time = ap->cur_time; ++ tp->mac_mode &= ~MAC_MODE_SEND_CONFIGS; ++ tw32_carefully(MAC_MODE, tp->mac_mode); ++ ++ ap->state = ANEG_STATE_IDLE_DETECT; ++ ret = ANEG_TIMER_ENAB; ++ break; ++ ++ case ANEG_STATE_IDLE_DETECT: ++ if (ap->ability_match != 0 && ++ ap->rxconfig == 0) { ++ ap->state = ANEG_STATE_AN_ENABLE; ++ break; ++ } ++ delta = ap->cur_time - ap->link_time; ++ if (delta > ANEG_STATE_SETTLE_TIME) { ++ /* XXX another gem from the Broadcom driver :( */ ++ ap->state = ANEG_STATE_LINK_OK; ++ } ++ break; ++ ++ case ANEG_STATE_LINK_OK: ++ ap->flags |= (MR_AN_COMPLETE | MR_LINK_OK); ++ ret = ANEG_DONE; ++ break; ++ ++ case ANEG_STATE_NEXT_PAGE_WAIT_INIT: ++ /* ??? unimplemented */ ++ break; ++ ++ case ANEG_STATE_NEXT_PAGE_WAIT: ++ /* ??? unimplemented */ ++ break; ++ ++ default: ++ ret = ANEG_FAILED; ++ break; ++ }; ++ ++ return ret; ++} ++ ++static int tg3_setup_fiber_phy(struct tg3 *tp) ++{ ++ uint32_t orig_pause_cfg; ++ uint16_t orig_active_speed; ++ uint8_t orig_active_duplex; ++ int current_link_up; ++ int i; ++ ++ orig_pause_cfg = ++ (tp->tg3_flags & (TG3_FLAG_RX_PAUSE | ++ TG3_FLAG_TX_PAUSE)); ++ orig_active_speed = tp->link_config.active_speed; ++ orig_active_duplex = tp->link_config.active_duplex; ++ ++ tp->mac_mode &= ~(MAC_MODE_PORT_MODE_MASK | MAC_MODE_HALF_DUPLEX); ++ tp->mac_mode |= MAC_MODE_PORT_MODE_TBI; ++ tw32_carefully(MAC_MODE, tp->mac_mode); ++ ++ /* Reset when initting first time or we have a link. */ ++ if (!(tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) || ++ (tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED)) { ++ /* Set PLL lock range. */ ++ tg3_writephy(tp, 0x16, 0x8007); ++ ++ /* SW reset */ ++ tg3_writephy(tp, MII_BMCR, BMCR_RESET); ++ ++ /* Wait for reset to complete. */ ++ mdelay(5); ++ ++ /* Config mode; select PMA/Ch 1 regs. */ ++ tg3_writephy(tp, 0x10, 0x8411); ++ ++ /* Enable auto-lock and comdet, select txclk for tx. */ ++ tg3_writephy(tp, 0x11, 0x0a10); ++ ++ tg3_writephy(tp, 0x18, 0x00a0); ++ tg3_writephy(tp, 0x16, 0x41ff); ++ ++ /* Assert and deassert POR. */ ++ tg3_writephy(tp, 0x13, 0x0400); ++ udelay(40); ++ tg3_writephy(tp, 0x13, 0x0000); ++ ++ tg3_writephy(tp, 0x11, 0x0a50); ++ udelay(40); ++ tg3_writephy(tp, 0x11, 0x0a10); ++ ++ /* Wait for signal to stabilize */ ++ mdelay(150); ++ ++ /* Deselect the channel register so we can read the PHYID ++ * later. ++ */ ++ tg3_writephy(tp, 0x10, 0x8011); ++ } ++ ++ /* Disable link change interrupt. */ ++ tw32_carefully(MAC_EVENT, 0); ++ ++ current_link_up = 0; ++ if (tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED) { ++ if (!(tp->tg3_flags & TG3_FLAG_GOT_SERDES_FLOWCTL)) { ++ struct tg3_fiber_aneginfo aninfo; ++ int status = ANEG_FAILED; ++ unsigned int tick; ++ uint32_t tmp; ++ ++ memset(&aninfo, 0, sizeof(aninfo)); ++ aninfo.flags |= (MR_AN_ENABLE); ++ ++ tw32(MAC_TX_AUTO_NEG, 0); ++ ++ tmp = tp->mac_mode & ~MAC_MODE_PORT_MODE_MASK; ++ tw32_carefully(MAC_MODE, tmp | MAC_MODE_PORT_MODE_GMII); ++ ++ tw32_carefully(MAC_MODE, tp->mac_mode | MAC_MODE_SEND_CONFIGS); ++ ++ aninfo.state = ANEG_STATE_UNKNOWN; ++ aninfo.cur_time = 0; ++ tick = 0; ++ while (++tick < 195000) { ++ status = tg3_fiber_aneg_smachine(tp, &aninfo); ++ if (status == ANEG_DONE || ++ status == ANEG_FAILED) ++ break; ++ ++ udelay(1); ++ } ++ ++ tp->mac_mode &= ~MAC_MODE_SEND_CONFIGS; ++ tw32_carefully(MAC_MODE, tp->mac_mode); ++ ++ if (status == ANEG_DONE && ++ (aninfo.flags & ++ (MR_AN_COMPLETE | MR_LINK_OK | ++ MR_LP_ADV_FULL_DUPLEX))) { ++ uint32_t local_adv, remote_adv; ++ ++ local_adv = ADVERTISE_PAUSE_CAP; ++ remote_adv = 0; ++ if (aninfo.flags & MR_LP_ADV_SYM_PAUSE) ++ remote_adv |= LPA_PAUSE_CAP; ++ if (aninfo.flags & MR_LP_ADV_ASYM_PAUSE) ++ remote_adv |= LPA_PAUSE_ASYM; ++ ++ tg3_setup_flow_control(tp, local_adv, remote_adv); ++ ++ tp->tg3_flags |= ++ TG3_FLAG_GOT_SERDES_FLOWCTL; ++ current_link_up = 1; ++ } ++ for (i = 0; i < 60; i++) { ++ udelay(20); ++ tw32_carefully(MAC_STATUS, ++ (MAC_STATUS_SYNC_CHANGED | MAC_STATUS_CFG_CHANGED)); ++ if ((tr32(MAC_STATUS) & ++ (MAC_STATUS_SYNC_CHANGED | ++ MAC_STATUS_CFG_CHANGED)) == 0) ++ break; ++ } ++ if (current_link_up == 0 && ++ (tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED)) { ++ current_link_up = 1; ++ } ++ } else { ++ /* Forcing 1000FD link up. */ ++ current_link_up = 1; ++ } ++ } ++ ++ tp->mac_mode &= ~MAC_MODE_LINK_POLARITY; ++ tw32_carefully(MAC_MODE, tp->mac_mode); ++ ++ tp->hw_status->status = ++ (SD_STATUS_UPDATED | ++ (tp->hw_status->status & ~SD_STATUS_LINK_CHG)); ++ ++ for (i = 0; i < 100; i++) { ++ udelay(20); ++ tw32_carefully(MAC_STATUS, ++ (MAC_STATUS_SYNC_CHANGED | MAC_STATUS_CFG_CHANGED)); ++ if ((tr32(MAC_STATUS) & ++ (MAC_STATUS_SYNC_CHANGED | ++ MAC_STATUS_CFG_CHANGED)) == 0) ++ break; ++ } ++ ++ if ((tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED) == 0) ++ current_link_up = 0; ++ ++ if (current_link_up == 1) { ++ tp->link_config.active_speed = SPEED_1000; ++ tp->link_config.active_duplex = DUPLEX_FULL; ++ } else { ++ tp->link_config.active_speed = SPEED_INVALID; ++ tp->link_config.active_duplex = DUPLEX_INVALID; ++ } ++ ++ if (current_link_up != tp->carrier_ok) { ++ tp->carrier_ok = current_link_up; ++ tg3_link_report(tp); ++ } else { ++ uint32_t now_pause_cfg = ++ tp->tg3_flags & (TG3_FLAG_RX_PAUSE | ++ TG3_FLAG_TX_PAUSE); ++ if (orig_pause_cfg != now_pause_cfg || ++ orig_active_speed != tp->link_config.active_speed || ++ orig_active_duplex != tp->link_config.active_duplex) ++ tg3_link_report(tp); ++ } ++ ++ if ((tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED) == 0) { ++ tw32_carefully(MAC_MODE, tp->mac_mode | MAC_MODE_LINK_POLARITY); ++ if (tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) { ++ tw32_carefully(MAC_MODE, tp->mac_mode); ++ } ++ } ++ ++ return 0; ++} ++#else ++#define tg3_setup_fiber_phy(TP) (-EINVAL) ++#endif /* SUPPORT_FIBER_PHY */ ++ ++static int tg3_setup_phy(struct tg3 *tp) ++{ ++ int err; ++ ++ if (tp->phy_id == PHY_ID_SERDES) { ++ err = tg3_setup_fiber_phy(tp); ++ } else { ++ err = tg3_setup_copper_phy(tp); ++ } ++ ++ if (tp->link_config.active_speed == SPEED_1000 && ++ tp->link_config.active_duplex == DUPLEX_HALF) ++ tw32(MAC_TX_LENGTHS, ++ ((2 << TX_LENGTHS_IPG_CRS_SHIFT) | ++ (6 << TX_LENGTHS_IPG_SHIFT) | ++ (0xff << TX_LENGTHS_SLOT_TIME_SHIFT))); ++ else ++ tw32(MAC_TX_LENGTHS, ++ ((2 << TX_LENGTHS_IPG_CRS_SHIFT) | ++ (6 << TX_LENGTHS_IPG_SHIFT) | ++ (32 << TX_LENGTHS_SLOT_TIME_SHIFT))); ++ ++ return err; ++} ++ ++ ++#define MAX_WAIT_CNT 1000 ++ ++/* To stop a block, clear the enable bit and poll till it ++ * clears. ++ */ ++static int tg3_stop_block(struct tg3 *tp, unsigned long ofs, uint32_t enable_bit) ++{ ++ unsigned int i; ++ uint32_t val; ++ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) { ++ switch(ofs) { ++ case RCVLSC_MODE: ++ case DMAC_MODE: ++ case MBFREE_MODE: ++ case BUFMGR_MODE: ++ case MEMARB_MODE: ++ /* We can't enable/disable these bits of the ++ * 5705, just say success. ++ */ ++ return 0; ++ default: ++ break; ++ } ++ } ++ val = tr32(ofs); ++ val &= ~enable_bit; ++ tw32(ofs, val); ++ tr32(ofs); ++ ++ for (i = 0; i < MAX_WAIT_CNT; i++) { ++ udelay(100); ++ val = tr32(ofs); ++ if ((val & enable_bit) == 0) ++ break; ++ } ++ ++ if (i == MAX_WAIT_CNT) { ++ printf("tg3_stop_block timed out, ofs=%lx enable_bit=%x\n", ++ ofs, enable_bit); ++ return -ENODEV; ++ } ++ ++ return 0; ++} ++ ++static int tg3_abort_hw(struct tg3 *tp) ++{ ++ int i, err; ++ ++ tg3_disable_ints(tp); ++ ++ tp->rx_mode &= ~RX_MODE_ENABLE; ++ tw32_carefully(MAC_RX_MODE, tp->rx_mode); ++ ++ err = tg3_stop_block(tp, RCVBDI_MODE, RCVBDI_MODE_ENABLE); ++ err |= tg3_stop_block(tp, RCVLPC_MODE, RCVLPC_MODE_ENABLE); ++ err |= tg3_stop_block(tp, RCVLSC_MODE, RCVLSC_MODE_ENABLE); ++ err |= tg3_stop_block(tp, RCVDBDI_MODE, RCVDBDI_MODE_ENABLE); ++ err |= tg3_stop_block(tp, RCVDCC_MODE, RCVDCC_MODE_ENABLE); ++ err |= tg3_stop_block(tp, RCVCC_MODE, RCVCC_MODE_ENABLE); ++ ++ err |= tg3_stop_block(tp, SNDBDS_MODE, SNDBDS_MODE_ENABLE); ++ err |= tg3_stop_block(tp, SNDBDI_MODE, SNDBDI_MODE_ENABLE); ++ err |= tg3_stop_block(tp, SNDDATAI_MODE, SNDDATAI_MODE_ENABLE); ++ err |= tg3_stop_block(tp, RDMAC_MODE, RDMAC_MODE_ENABLE); ++ err |= tg3_stop_block(tp, SNDDATAC_MODE, SNDDATAC_MODE_ENABLE); ++ err |= tg3_stop_block(tp, SNDBDC_MODE, SNDBDC_MODE_ENABLE); ++ if (err) ++ goto out; ++ ++ tp->mac_mode &= ~MAC_MODE_TDE_ENABLE; ++ tw32_carefully(MAC_MODE, tp->mac_mode); ++ ++ tp->tx_mode &= ~TX_MODE_ENABLE; ++ tw32_carefully(MAC_TX_MODE, tp->tx_mode); ++ ++ for (i = 0; i < MAX_WAIT_CNT; i++) { ++ udelay(100); ++ if (!(tr32(MAC_TX_MODE) & TX_MODE_ENABLE)) ++ break; ++ } ++ if (i >= MAX_WAIT_CNT) { ++ printf("tg3_abort_hw timed out TX_MODE_ENABLE will not clear MAC_TX_MODE=%x\n", ++ tr32(MAC_TX_MODE)); ++ return -ENODEV; ++ } ++ ++ err = tg3_stop_block(tp, HOSTCC_MODE, HOSTCC_MODE_ENABLE); ++ err |= tg3_stop_block(tp, WDMAC_MODE, WDMAC_MODE_ENABLE); ++ err |= tg3_stop_block(tp, MBFREE_MODE, MBFREE_MODE_ENABLE); ++ ++ tw32(FTQ_RESET, 0xffffffff); ++ tw32(FTQ_RESET, 0x00000000); ++ ++ err |= tg3_stop_block(tp, BUFMGR_MODE, BUFMGR_MODE_ENABLE); ++ err |= tg3_stop_block(tp, MEMARB_MODE, MEMARB_MODE_ENABLE); ++ if (err) ++ goto out; ++ ++ memset(tp->hw_status, 0, TG3_HW_STATUS_SIZE); ++ ++out: ++ return err; ++} ++ ++static void tg3_chip_reset(struct tg3 *tp) ++{ ++ uint32_t val; ++ ++ if (!(tp->tg3_flags2 & TG3_FLG2_SUN_5704)) { ++ /* Force NVRAM to settle. ++ * This deals with a chip bug which can result in EEPROM ++ * corruption. ++ */ ++ if (tp->tg3_flags & TG3_FLAG_NVRAM) { ++ int i; ++ ++ tw32(NVRAM_SWARB, SWARB_REQ_SET1); ++ for (i = 0; i < 100000; i++) { ++ if (tr32(NVRAM_SWARB) & SWARB_GNT1) ++ break; ++ udelay(10); ++ } ++ } ++ } ++ /* In Etherboot we don't need to worry about the 5701 ++ * REG_WRITE_BUG because we do all register writes indirectly. ++ */ ++ ++ /* do the reset */ ++ val = GRC_MISC_CFG_CORECLK_RESET; ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) ++ val |= GRC_MISC_CFG_KEEP_GPHY_POWER; ++ tw32(GRC_MISC_CFG, val); ++ ++ /* Flush PCI posted writes. The normal MMIO registers ++ * are inaccessible at this time so this is the only ++ * way to make this reliably. I tried to use indirect ++ * register read/write but this upset some 5701 variants. ++ */ ++ pci_read_config_dword(tp->pdev, PCI_COMMAND, &val); ++ ++ udelay(120); ++ ++ /* Re-enable indirect register accesses. */ ++ pci_write_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL, ++ tp->misc_host_ctrl); ++ ++ /* Set MAX PCI retry to zero. */ ++ val = (PCISTATE_ROM_ENABLE | PCISTATE_ROM_RETRY_ENABLE); ++ if (tp->pci_chip_rev_id == CHIPREV_ID_5704_A0 && ++ (tp->tg3_flags & TG3_FLAG_PCIX_MODE)) ++ val |= PCISTATE_RETRY_SAME_DMA; ++ pci_write_config_dword(tp->pdev, TG3PCI_PCISTATE, val); ++ ++ pci_restore_state(tp->pdev, tp->pci_cfg_state); ++ ++ /* Make sure PCI-X relaxed ordering bit is clear. */ ++ pci_read_config_dword(tp->pdev, TG3PCI_X_CAPS, &val); ++ val &= ~PCIX_CAPS_RELAXED_ORDERING; ++ pci_write_config_dword(tp->pdev, TG3PCI_X_CAPS, val); ++ ++ tw32(MEMARB_MODE, MEMARB_MODE_ENABLE); ++ ++ if (((tp->nic_sram_data_cfg & NIC_SRAM_DATA_CFG_MINI_PCI) != 0) && ++ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705)) { ++ tp->pci_clock_ctrl |= ++ (CLOCK_CTRL_FORCE_CLKRUN | CLOCK_CTRL_CLKRUN_OENABLE); ++ tw32(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl); ++ } ++ ++ tw32(TG3PCI_MISC_HOST_CTRL, tp->misc_host_ctrl); ++} ++ ++static void tg3_stop_fw(struct tg3 *tp) ++{ ++ if (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) { ++ uint32_t val; ++ int i; ++ ++ tg3_write_mem(NIC_SRAM_FW_CMD_MBOX, FWCMD_NICDRV_PAUSE_FW); ++ val = tr32(GRC_RX_CPU_EVENT); ++ val |= (1 << 14); ++ tw32(GRC_RX_CPU_EVENT, val); ++ ++ /* Wait for RX cpu to ACK the event. */ ++ for (i = 0; i < 100; i++) { ++ if (!(tr32(GRC_RX_CPU_EVENT) & (1 << 14))) ++ break; ++ udelay(1); ++ } ++ } ++} ++ ++static int tg3_restart_fw(struct tg3 *tp, uint32_t state) ++{ ++ uint32_t val; ++ int i; ++ ++ tg3_write_mem(NIC_SRAM_FIRMWARE_MBOX, ++ NIC_SRAM_FIRMWARE_MBOX_MAGIC1); ++ /* Wait for firmware initialization to complete. */ ++ for (i = 0; i < 100000; i++) { ++ tg3_read_mem(NIC_SRAM_FIRMWARE_MBOX, &val); ++ if (val == (uint32_t) ~NIC_SRAM_FIRMWARE_MBOX_MAGIC1) ++ break; ++ udelay(10); ++ } ++ if (i >= 100000 && ++ !(tp->tg3_flags2 & TG3_FLG2_SUN_5704)) { ++ printf("Firmware will not restart magic=%x\n", ++ val); ++ return -ENODEV; ++ } ++ if (!(tp->tg3_flags & TG3_FLAG_ENABLE_ASF)) { ++ state = DRV_STATE_SUSPEND; ++ } ++ tg3_write_mem(NIC_SRAM_FW_DRV_STATE_MBOX, state); ++ return 0; ++} ++ ++static int tg3_halt(struct tg3 *tp) ++{ ++ tg3_stop_fw(tp); ++ tg3_abort_hw(tp); ++ tg3_chip_reset(tp); ++ return tg3_restart_fw(tp, DRV_STATE_UNLOAD); ++} ++ ++static void __tg3_set_mac_addr(struct tg3 *tp) ++{ ++ uint32_t addr_high, addr_low; ++ int i; ++ ++ addr_high = ((tp->nic->node_addr[0] << 8) | ++ tp->nic->node_addr[1]); ++ addr_low = ((tp->nic->node_addr[2] << 24) | ++ (tp->nic->node_addr[3] << 16) | ++ (tp->nic->node_addr[4] << 8) | ++ (tp->nic->node_addr[5] << 0)); ++ for (i = 0; i < 4; i++) { ++ tw32(MAC_ADDR_0_HIGH + (i * 8), addr_high); ++ tw32(MAC_ADDR_0_LOW + (i * 8), addr_low); ++ } ++ ++ if ((GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700) && ++ (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5701) && ++ (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705)) { ++ for(i = 0; i < 12; i++) { ++ tw32(MAC_EXTADDR_0_HIGH + (i * 8), addr_high); ++ tw32(MAC_EXTADDR_0_LOW + (i * 8), addr_low); ++ } ++ } ++ addr_high = (tp->nic->node_addr[0] + ++ tp->nic->node_addr[1] + ++ tp->nic->node_addr[2] + ++ tp->nic->node_addr[3] + ++ tp->nic->node_addr[4] + ++ tp->nic->node_addr[5]) & ++ TX_BACKOFF_SEED_MASK; ++ tw32(MAC_TX_BACKOFF_SEED, addr_high); ++} ++ ++static void tg3_set_bdinfo(struct tg3 *tp, uint32_t bdinfo_addr, ++ dma_addr_t mapping, uint32_t maxlen_flags, ++ uint32_t nic_addr) ++{ ++ tg3_write_mem((bdinfo_addr + ++ TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_HIGH), ++ ((uint64_t) mapping >> 32)); ++ tg3_write_mem((bdinfo_addr + ++ TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_LOW), ++ ((uint64_t) mapping & 0xffffffff)); ++ tg3_write_mem((bdinfo_addr + ++ TG3_BDINFO_MAXLEN_FLAGS), ++ maxlen_flags); ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) { ++ tg3_write_mem((bdinfo_addr + TG3_BDINFO_NIC_ADDR), nic_addr); ++ } ++} ++ ++ ++static void tg3_init_rings(struct tg3 *tp) ++{ ++ unsigned i; ++ ++ /* Zero out the tg3 variables */ ++ memset(&tg3_bss, 0, sizeof(tg3_bss)); ++ tp->rx_std = &tg3_bss.rx_std[0]; ++ tp->rx_rcb = &tg3_bss.rx_rcb[0]; ++ tp->tx_ring = &tg3_bss.tx_ring[0]; ++ tp->hw_status = &tg3_bss.hw_status; ++ tp->hw_stats = &tg3_bss.hw_stats; ++ tp->mac_mode = 0; ++ ++ ++ /* Initialize tx/rx rings for packet processing. ++ * ++ * The chip has been shut down and the driver detached from ++ * the networking, so no interrupts or new tx packets will ++ * end up in the driver. ++ */ ++ ++ /* Initialize invariants of the rings, we only set this ++ * stuff once. This works because the card does not ++ * write into the rx buffer posting rings. ++ */ ++ for (i = 0; i < TG3_RX_RING_SIZE; i++) { ++ struct tg3_rx_buffer_desc *rxd; ++ ++ rxd = &tp->rx_std[i]; ++ rxd->idx_len = (RX_PKT_BUF_SZ - 2 - 64) << RXD_LEN_SHIFT; ++ rxd->type_flags = (RXD_FLAG_END << RXD_FLAGS_SHIFT); ++ rxd->opaque = (RXD_OPAQUE_RING_STD | (i << RXD_OPAQUE_INDEX_SHIFT)); ++ ++ /* Note where the receive buffer for the ring is placed */ ++ rxd->addr_hi = 0; ++ rxd->addr_lo = virt_to_bus( ++ &tg3_bss.rx_bufs[i%TG3_DEF_RX_RING_PENDING][2]); ++ } ++} ++ ++#define TG3_WRITE_SETTINGS(TABLE) \ ++do { \ ++ const uint32_t *_table, *_end; \ ++ _table = TABLE; \ ++ _end = _table + sizeof(TABLE)/sizeof(TABLE[0]); \ ++ for(; _table < _end; _table += 2) { \ ++ tw32(_table[0], _table[1]); \ ++ } \ ++} while(0) ++ ++ ++/* initialize/reset the tg3 */ ++static int tg3_setup_hw(struct tg3 *tp) ++{ ++ uint32_t val, rdmac_mode; ++ int i, err, limit; ++ ++ /* Simply don't support setups with extremly buggy firmware in etherboot */ ++ if (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0) { ++ printf("Error 5701_A0 firmware bug detected\n"); ++ return -EINVAL; ++ } ++ ++ tg3_disable_ints(tp); ++ ++ /* Originally this was all in tg3_init_hw */ ++ ++ /* Force the chip into D0. */ ++ tg3_set_power_state_0(tp); ++ ++ tg3_switch_clocks(tp); ++ ++ tw32(TG3PCI_MEM_WIN_BASE_ADDR, 0); ++ ++ ++ /* Originally this was all in tg3_reset_hw */ ++ ++ tg3_stop_fw(tp); ++ ++ /* No need to call tg3_abort_hw here, it is called before tg3_setup_hw. */ ++ ++ tg3_chip_reset(tp); ++ ++ tw32(GRC_MODE, tp->grc_mode); /* Redundant? */ ++ ++ err = tg3_restart_fw(tp, DRV_STATE_START); ++ if (err) ++ return err; ++ ++ if (tp->phy_id == PHY_ID_SERDES) { ++ tp->mac_mode = MAC_MODE_PORT_MODE_TBI; ++ } ++ tw32_carefully(MAC_MODE, tp->mac_mode); ++ ++ ++ /* This works around an issue with Athlon chipsets on ++ * B3 tigon3 silicon. This bit has no effect on any ++ * other revision. ++ */ ++ tp->pci_clock_ctrl |= CLOCK_CTRL_DELAY_PCI_GRANT; ++ tw32_carefully(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl); ++ ++ if (tp->pci_chip_rev_id == CHIPREV_ID_5704_A0 && ++ (tp->tg3_flags & TG3_FLAG_PCIX_MODE)) { ++ val = tr32(TG3PCI_PCISTATE); ++ val |= PCISTATE_RETRY_SAME_DMA; ++ tw32(TG3PCI_PCISTATE, val); ++ } ++ ++ /* Descriptor ring init may make accesses to the ++ * NIC SRAM area to setup the TX descriptors, so we ++ * can only do this after the hardware has been ++ * successfully reset. ++ */ ++ tg3_init_rings(tp); ++ ++ /* Clear statistics/status block in chip */ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) { ++ for (i = NIC_SRAM_STATS_BLK; ++ i < NIC_SRAM_STATUS_BLK + TG3_HW_STATUS_SIZE; ++ i += sizeof(uint32_t)) { ++ tg3_write_mem(i, 0); ++ udelay(40); ++ } ++ } ++ ++ /* This value is determined during the probe time DMA ++ * engine test, tg3_setup_dma. ++ */ ++ tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl); ++ ++ tp->grc_mode &= ~(GRC_MODE_HOST_SENDBDS | ++ GRC_MODE_4X_NIC_SEND_RINGS | ++ GRC_MODE_NO_TX_PHDR_CSUM | ++ GRC_MODE_NO_RX_PHDR_CSUM); ++ tp->grc_mode |= GRC_MODE_HOST_SENDBDS; ++ tp->grc_mode |= GRC_MODE_NO_TX_PHDR_CSUM; ++ tp->grc_mode |= GRC_MODE_NO_RX_PHDR_CSUM; ++ ++ tw32(GRC_MODE, ++ tp->grc_mode | ++ (GRC_MODE_IRQ_ON_MAC_ATTN | GRC_MODE_HOST_STACKUP)); ++ ++ /* Setup the timer prescalar register. Clock is always 66Mhz. */ ++ tw32(GRC_MISC_CFG, ++ (65 << GRC_MISC_CFG_PRESCALAR_SHIFT)); ++ ++ /* Initialize MBUF/DESC pool. */ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) { ++ tw32(BUFMGR_MB_POOL_ADDR, NIC_SRAM_MBUF_POOL_BASE); ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) ++ tw32(BUFMGR_MB_POOL_SIZE, NIC_SRAM_MBUF_POOL_SIZE64); ++ else ++ tw32(BUFMGR_MB_POOL_SIZE, NIC_SRAM_MBUF_POOL_SIZE96); ++ tw32(BUFMGR_DMA_DESC_POOL_ADDR, NIC_SRAM_DMA_DESC_POOL_BASE); ++ tw32(BUFMGR_DMA_DESC_POOL_SIZE, NIC_SRAM_DMA_DESC_POOL_SIZE); ++ } ++ if (!(tp->tg3_flags & TG3_FLAG_JUMBO_ENABLE)) { ++ tw32(BUFMGR_MB_RDMA_LOW_WATER, ++ tp->bufmgr_config.mbuf_read_dma_low_water); ++ tw32(BUFMGR_MB_MACRX_LOW_WATER, ++ tp->bufmgr_config.mbuf_mac_rx_low_water); ++ tw32(BUFMGR_MB_HIGH_WATER, ++ tp->bufmgr_config.mbuf_high_water); ++ } else { ++ tw32(BUFMGR_MB_RDMA_LOW_WATER, ++ tp->bufmgr_config.mbuf_read_dma_low_water_jumbo); ++ tw32(BUFMGR_MB_MACRX_LOW_WATER, ++ tp->bufmgr_config.mbuf_mac_rx_low_water_jumbo); ++ tw32(BUFMGR_MB_HIGH_WATER, ++ tp->bufmgr_config.mbuf_high_water_jumbo); ++ } ++ tw32(BUFMGR_DMA_LOW_WATER, ++ tp->bufmgr_config.dma_low_water); ++ tw32(BUFMGR_DMA_HIGH_WATER, ++ tp->bufmgr_config.dma_high_water); ++ ++ tw32(BUFMGR_MODE, BUFMGR_MODE_ENABLE | BUFMGR_MODE_ATTN_ENABLE); ++ for (i = 0; i < 2000; i++) { ++ if (tr32(BUFMGR_MODE) & BUFMGR_MODE_ENABLE) ++ break; ++ udelay(10); ++ } ++ if (i >= 2000) { ++ printf("tg3_setup_hw cannot enable BUFMGR\n"); ++ return -ENODEV; ++ } ++ ++ tw32(FTQ_RESET, 0xffffffff); ++ tw32(FTQ_RESET, 0x00000000); ++ for (i = 0; i < 2000; i++) { ++ if (tr32(FTQ_RESET) == 0x00000000) ++ break; ++ udelay(10); ++ } ++ if (i >= 2000) { ++ printf("tg3_setup_hw cannot reset FTQ\n"); ++ return -ENODEV; ++ } ++ ++ /* Initialize TG3_BDINFO's at: ++ * RCVDBDI_STD_BD: standard eth size rx ring ++ * RCVDBDI_JUMBO_BD: jumbo frame rx ring ++ * RCVDBDI_MINI_BD: small frame rx ring (??? does not work) ++ * ++ * like so: ++ * TG3_BDINFO_HOST_ADDR: high/low parts of DMA address of ring ++ * TG3_BDINFO_MAXLEN_FLAGS: (rx max buffer size << 16) | ++ * ring attribute flags ++ * TG3_BDINFO_NIC_ADDR: location of descriptors in nic SRAM ++ * ++ * Standard receive ring @ NIC_SRAM_RX_BUFFER_DESC, 512 entries. ++ * Jumbo receive ring @ NIC_SRAM_RX_JUMBO_BUFFER_DESC, 256 entries. ++ * ++ * ??? No space allocated for mini receive ring? :( ++ * ++ * The size of each ring is fixed in the firmware, but the location is ++ * configurable. ++ */ ++ { ++ static const uint32_t table_all[] = { ++ /* Setup replenish thresholds. */ ++ RCVBDI_STD_THRESH, TG3_DEF_RX_RING_PENDING / 8, ++ ++ /* Etherboot lives below 4GB */ ++ RCVDBDI_STD_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_HIGH, 0, ++ RCVDBDI_STD_BD + TG3_BDINFO_NIC_ADDR, NIC_SRAM_RX_BUFFER_DESC, ++ }; ++ static const uint32_t table_not_5705[] = { ++ /* Buffer maximum length */ ++ RCVDBDI_STD_BD + TG3_BDINFO_MAXLEN_FLAGS, RX_STD_MAX_SIZE << BDINFO_FLAGS_MAXLEN_SHIFT, ++ ++ /* Disable the mini frame rx ring */ ++ RCVDBDI_MINI_BD + TG3_BDINFO_MAXLEN_FLAGS, BDINFO_FLAGS_DISABLED, ++ ++ /* Disable the jumbo frame rx ring */ ++ RCVBDI_JUMBO_THRESH, 0, ++ RCVDBDI_JUMBO_BD + TG3_BDINFO_MAXLEN_FLAGS, BDINFO_FLAGS_DISABLED, ++ ++ ++ }; ++ TG3_WRITE_SETTINGS(table_all); ++ tw32(RCVDBDI_STD_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_LOW, ++ virt_to_bus(tp->rx_std)); ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) { ++ tw32(RCVDBDI_STD_BD + TG3_BDINFO_MAXLEN_FLAGS, ++ RX_STD_MAX_SIZE_5705 << BDINFO_FLAGS_MAXLEN_SHIFT); ++ } else { ++ TG3_WRITE_SETTINGS(table_not_5705); ++ } ++ } ++ ++ ++ /* There is only one send ring on 5705, no need to explicitly ++ * disable the others. ++ */ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) { ++ /* Clear out send RCB ring in SRAM. */ ++ for (i = NIC_SRAM_SEND_RCB; i < NIC_SRAM_RCV_RET_RCB; i += TG3_BDINFO_SIZE) ++ tg3_write_mem(i + TG3_BDINFO_MAXLEN_FLAGS, BDINFO_FLAGS_DISABLED); ++ } ++ ++ tp->tx_prod = 0; ++ tw32_mailbox(MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW, 0); ++ tw32_mailbox2(MAILBOX_SNDNIC_PROD_IDX_0 + TG3_64BIT_REG_LOW, 0); ++ ++ tg3_set_bdinfo(tp, ++ NIC_SRAM_SEND_RCB, ++ virt_to_bus(tp->tx_ring), ++ (TG3_TX_RING_SIZE << BDINFO_FLAGS_MAXLEN_SHIFT), ++ NIC_SRAM_TX_BUFFER_DESC); ++ ++ /* There is only one receive return ring on 5705, no need to explicitly ++ * disable the others. ++ */ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) { ++ for (i = NIC_SRAM_RCV_RET_RCB; i < NIC_SRAM_STATS_BLK; i += TG3_BDINFO_SIZE) { ++ tg3_write_mem(i + TG3_BDINFO_MAXLEN_FLAGS, ++ BDINFO_FLAGS_DISABLED); ++ } ++ } ++ ++ tp->rx_rcb_ptr = 0; ++ tw32_mailbox2(MAILBOX_RCVRET_CON_IDX_0 + TG3_64BIT_REG_LOW, 0); ++ ++ tg3_set_bdinfo(tp, ++ NIC_SRAM_RCV_RET_RCB, ++ virt_to_bus(tp->rx_rcb), ++ (TG3_RX_RCB_RING_SIZE << BDINFO_FLAGS_MAXLEN_SHIFT), ++ 0); ++ ++ tp->rx_std_ptr = TG3_DEF_RX_RING_PENDING; ++ tw32_mailbox2(MAILBOX_RCV_STD_PROD_IDX + TG3_64BIT_REG_LOW, ++ tp->rx_std_ptr); ++ ++ tw32_mailbox2(MAILBOX_RCV_JUMBO_PROD_IDX + TG3_64BIT_REG_LOW, 0); ++ ++ /* Initialize MAC address and backoff seed. */ ++ __tg3_set_mac_addr(tp); ++ ++ /* Calculate RDMAC_MODE setting early, we need it to determine ++ * the RCVLPC_STATE_ENABLE mask. ++ */ ++ rdmac_mode = (RDMAC_MODE_ENABLE | RDMAC_MODE_TGTABORT_ENAB | ++ RDMAC_MODE_MSTABORT_ENAB | RDMAC_MODE_PARITYERR_ENAB | ++ RDMAC_MODE_ADDROFLOW_ENAB | RDMAC_MODE_FIFOOFLOW_ENAB | ++ RDMAC_MODE_FIFOURUN_ENAB | RDMAC_MODE_FIFOOREAD_ENAB | ++ RDMAC_MODE_LNGREAD_ENAB); ++ if (tp->tg3_flags & TG3_FLAG_SPLIT_MODE) ++ rdmac_mode |= RDMAC_MODE_SPLIT_ENABLE; ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) { ++ if (tp->pci_chip_rev_id != CHIPREV_ID_5705_A0) { ++ if (!(tr32(TG3PCI_PCISTATE) & PCISTATE_BUS_SPEED_HIGH) && ++ !(tp->tg3_flags2 & TG3_FLG2_IS_5788)) { ++ rdmac_mode |= RDMAC_MODE_FIFO_LONG_BURST; ++ } ++ } ++ } ++ ++ /* Setup host coalescing engine. */ ++ tw32(HOSTCC_MODE, 0); ++ for (i = 0; i < 2000; i++) { ++ if (!(tr32(HOSTCC_MODE) & HOSTCC_MODE_ENABLE)) ++ break; ++ udelay(10); ++ } ++ ++ tp->mac_mode = MAC_MODE_TXSTAT_ENABLE | MAC_MODE_RXSTAT_ENABLE | ++ MAC_MODE_TDE_ENABLE | MAC_MODE_RDE_ENABLE | MAC_MODE_FHDE_ENABLE; ++ tw32_carefully(MAC_MODE, tp->mac_mode | MAC_MODE_RXSTAT_CLEAR | MAC_MODE_TXSTAT_CLEAR); ++ ++ tp->grc_local_ctrl = GRC_LCLCTRL_INT_ON_ATTN | GRC_LCLCTRL_AUTO_SEEPROM; ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700) ++ tp->grc_local_ctrl |= (GRC_LCLCTRL_GPIO_OE1 | ++ GRC_LCLCTRL_GPIO_OUTPUT1); ++ tw32_carefully(GRC_LOCAL_CTRL, tp->grc_local_ctrl); ++ ++ tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0); ++ tr32(MAILBOX_INTERRUPT_0); ++ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) { ++ tw32_carefully(DMAC_MODE, DMAC_MODE_ENABLE); ++ } ++ ++ val = ( WDMAC_MODE_ENABLE | WDMAC_MODE_TGTABORT_ENAB | ++ WDMAC_MODE_MSTABORT_ENAB | WDMAC_MODE_PARITYERR_ENAB | ++ WDMAC_MODE_ADDROFLOW_ENAB | WDMAC_MODE_FIFOOFLOW_ENAB | ++ WDMAC_MODE_FIFOURUN_ENAB | WDMAC_MODE_FIFOOREAD_ENAB | ++ WDMAC_MODE_LNGREAD_ENAB); ++ if ((GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) && ++ ((tr32(TG3PCI_PCISTATE) & PCISTATE_BUS_SPEED_HIGH) != 0) && ++ !(tp->tg3_flags2 & TG3_FLG2_IS_5788)) { ++ val |= WDMAC_MODE_RX_ACCEL; ++ } ++ tw32_carefully(WDMAC_MODE, val); ++ ++ if ((tp->tg3_flags & TG3_FLAG_PCIX_MODE) != 0) { ++ val = tr32(TG3PCI_X_CAPS); ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) { ++ val &= PCIX_CAPS_BURST_MASK; ++ val |= (PCIX_CAPS_MAX_BURST_CPIOB << PCIX_CAPS_BURST_SHIFT); ++ } else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) { ++ val &= ~(PCIX_CAPS_SPLIT_MASK | PCIX_CAPS_BURST_MASK); ++ val |= (PCIX_CAPS_MAX_BURST_CPIOB << PCIX_CAPS_BURST_SHIFT); ++ if (tp->tg3_flags & TG3_FLAG_SPLIT_MODE) ++ val |= (tp->split_mode_max_reqs << ++ PCIX_CAPS_SPLIT_SHIFT); ++ } ++ tw32(TG3PCI_X_CAPS, val); ++ } ++ ++ tw32_carefully(RDMAC_MODE, rdmac_mode); ++ { ++ static const uint32_t table_all[] = { ++ /* MTU + ethernet header + FCS + optional VLAN tag */ ++ MAC_RX_MTU_SIZE, ETH_MAX_MTU + ETH_HLEN + 8, ++ ++ /* The slot time is changed by tg3_setup_phy if we ++ * run at gigabit with half duplex. ++ */ ++ MAC_TX_LENGTHS, ++ (2 << TX_LENGTHS_IPG_CRS_SHIFT) | ++ (6 << TX_LENGTHS_IPG_SHIFT) | ++ (32 << TX_LENGTHS_SLOT_TIME_SHIFT), ++ ++ /* Receive rules. */ ++ MAC_RCV_RULE_CFG, RCV_RULE_CFG_DEFAULT_CLASS, ++ RCVLPC_CONFIG, 0x0181, ++ ++ /* Receive/send statistics. */ ++ RCVLPC_STATS_ENABLE, 0xffffff, ++ RCVLPC_STATSCTRL, RCVLPC_STATSCTRL_ENABLE, ++ SNDDATAI_STATSENAB, 0xffffff, ++ SNDDATAI_STATSCTRL, (SNDDATAI_SCTRL_ENABLE |SNDDATAI_SCTRL_FASTUPD), ++ ++ /* Host coalescing engine */ ++ HOSTCC_RXCOL_TICKS, 0, ++ HOSTCC_TXCOL_TICKS, LOW_TXCOL_TICKS, ++ HOSTCC_RXMAX_FRAMES, 1, ++ HOSTCC_TXMAX_FRAMES, LOW_RXMAX_FRAMES, ++ HOSTCC_RXCOAL_MAXF_INT, 1, ++ HOSTCC_TXCOAL_MAXF_INT, 0, ++ ++ /* Status/statistics block address. */ ++ /* Etherboot lives below 4GB, so HIGH == 0 */ ++ HOSTCC_STATUS_BLK_HOST_ADDR + TG3_64BIT_REG_HIGH, 0, ++ ++ /* No need to enable 32byte coalesce mode. */ ++ HOSTCC_MODE, HOSTCC_MODE_ENABLE | 0, ++ ++ RCVCC_MODE, RCVCC_MODE_ENABLE | RCVCC_MODE_ATTN_ENABLE, ++ RCVLPC_MODE, RCVLPC_MODE_ENABLE, ++ ++ RCVDCC_MODE, RCVDCC_MODE_ENABLE | RCVDCC_MODE_ATTN_ENABLE, ++ ++ SNDDATAC_MODE, SNDDATAC_MODE_ENABLE, ++ SNDBDC_MODE, SNDBDC_MODE_ENABLE | SNDBDC_MODE_ATTN_ENABLE, ++ RCVBDI_MODE, RCVBDI_MODE_ENABLE | RCVBDI_MODE_RCB_ATTN_ENAB, ++ RCVDBDI_MODE, RCVDBDI_MODE_ENABLE | RCVDBDI_MODE_INV_RING_SZ, ++ SNDDATAI_MODE, SNDDATAI_MODE_ENABLE, ++ SNDBDI_MODE, SNDBDI_MODE_ENABLE | SNDBDI_MODE_ATTN_ENABLE, ++ SNDBDS_MODE, SNDBDS_MODE_ENABLE | SNDBDS_MODE_ATTN_ENABLE, ++ ++ /* Accept all multicast frames. */ ++ MAC_HASH_REG_0, 0xffffffff, ++ MAC_HASH_REG_1, 0xffffffff, ++ MAC_HASH_REG_2, 0xffffffff, ++ MAC_HASH_REG_3, 0xffffffff, ++ }; ++ static const uint32_t table_not_5705[] = { ++ /* Host coalescing engine */ ++ HOSTCC_RXCOAL_TICK_INT, 0, ++ HOSTCC_TXCOAL_TICK_INT, 0, ++ ++ /* Status/statistics block address. */ ++ /* Etherboot lives below 4GB, so HIGH == 0 */ ++ HOSTCC_STAT_COAL_TICKS, DEFAULT_STAT_COAL_TICKS, ++ HOSTCC_STATS_BLK_HOST_ADDR + TG3_64BIT_REG_HIGH, 0, ++ HOSTCC_STATS_BLK_NIC_ADDR, NIC_SRAM_STATS_BLK, ++ HOSTCC_STATUS_BLK_NIC_ADDR, NIC_SRAM_STATUS_BLK, ++ ++ RCVLSC_MODE, RCVLSC_MODE_ENABLE | RCVLSC_MODE_ATTN_ENABLE, ++ ++ MBFREE_MODE, MBFREE_MODE_ENABLE, ++ }; ++ TG3_WRITE_SETTINGS(table_all); ++ tw32(HOSTCC_STATS_BLK_HOST_ADDR + TG3_64BIT_REG_LOW, ++ virt_to_bus(tp->hw_stats)); ++ tw32(HOSTCC_STATUS_BLK_HOST_ADDR + TG3_64BIT_REG_LOW, ++ virt_to_bus(tp->hw_status)); ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) { ++ TG3_WRITE_SETTINGS(table_not_5705); ++ } ++ } ++ ++ tp->tx_mode = TX_MODE_ENABLE; ++ tw32_carefully(MAC_TX_MODE, tp->tx_mode); ++ ++ tp->rx_mode = RX_MODE_ENABLE; ++ tw32_carefully(MAC_RX_MODE, tp->rx_mode); ++ ++ tp->mi_mode = MAC_MI_MODE_BASE; ++ tw32_carefully(MAC_MI_MODE, tp->mi_mode); ++ ++ tw32(MAC_LED_CTRL, 0); ++ tw32(MAC_MI_STAT, MAC_MI_STAT_LNKSTAT_ATTN_ENAB); ++ if (tp->phy_id == PHY_ID_SERDES) { ++ tw32_carefully(MAC_RX_MODE, RX_MODE_RESET); ++ } ++ tp->rx_mode |= RX_MODE_KEEP_VLAN_TAG; /* drop tagged vlan packets */ ++ tw32_carefully(MAC_RX_MODE, tp->rx_mode); ++ ++ if (tp->pci_chip_rev_id == CHIPREV_ID_5703_A1) ++ tw32(MAC_SERDES_CFG, 0x616000); ++ ++ /* Prevent chip from dropping frames when flow control ++ * is enabled. ++ */ ++ tw32(MAC_LOW_WMARK_MAX_RX_FRAME, 2); ++ tr32(MAC_LOW_WMARK_MAX_RX_FRAME); ++ ++ err = tg3_setup_phy(tp); ++ ++ /* Ignore CRC stats */ ++ ++ /* Initialize receive rules. */ ++ tw32(MAC_RCV_RULE_0, 0xc2000000 & RCV_RULE_DISABLE_MASK); ++ tw32(MAC_RCV_VALUE_0, 0xffffffff & RCV_RULE_DISABLE_MASK); ++ tw32(MAC_RCV_RULE_1, 0x86000004 & RCV_RULE_DISABLE_MASK); ++ tw32(MAC_RCV_VALUE_1, 0xffffffff & RCV_RULE_DISABLE_MASK); ++ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) ++ limit = 8; ++ else ++ limit = 16; ++ if (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) ++ limit -= 4; ++ switch (limit) { ++ case 16: tw32(MAC_RCV_RULE_15, 0); tw32(MAC_RCV_VALUE_15, 0); ++ case 15: tw32(MAC_RCV_RULE_14, 0); tw32(MAC_RCV_VALUE_14, 0); ++ case 14: tw32(MAC_RCV_RULE_13, 0); tw32(MAC_RCV_VALUE_13, 0); ++ case 13: tw32(MAC_RCV_RULE_12, 0); tw32(MAC_RCV_VALUE_12, 0); ++ case 12: tw32(MAC_RCV_RULE_11, 0); tw32(MAC_RCV_VALUE_11, 0); ++ case 11: tw32(MAC_RCV_RULE_10, 0); tw32(MAC_RCV_VALUE_10, 0); ++ case 10: tw32(MAC_RCV_RULE_9, 0); tw32(MAC_RCV_VALUE_9, 0); ++ case 9: tw32(MAC_RCV_RULE_8, 0); tw32(MAC_RCV_VALUE_8, 0); ++ case 8: tw32(MAC_RCV_RULE_7, 0); tw32(MAC_RCV_VALUE_7, 0); ++ case 7: tw32(MAC_RCV_RULE_6, 0); tw32(MAC_RCV_VALUE_6, 0); ++ case 6: tw32(MAC_RCV_RULE_5, 0); tw32(MAC_RCV_VALUE_5, 0); ++ case 5: tw32(MAC_RCV_RULE_4, 0); tw32(MAC_RCV_VALUE_4, 0); ++ case 4: /* tw32(MAC_RCV_RULE_3, 0); tw32(MAC_RCV_VALUE_3, 0); */ ++ case 3: /* tw32(MAC_RCV_RULE_2, 0); tw32(MAC_RCV_VALUE_2, 0); */ ++ case 2: ++ case 1: ++ default: ++ break; ++ }; ++ ++ return err; ++} ++ ++ ++ ++/* Chips other than 5700/5701 use the NVRAM for fetching info. */ ++static void tg3_nvram_init(struct tg3 *tp) ++{ ++ tw32(GRC_EEPROM_ADDR, ++ (EEPROM_ADDR_FSM_RESET | ++ (EEPROM_DEFAULT_CLOCK_PERIOD << ++ EEPROM_ADDR_CLKPERD_SHIFT))); ++ ++ mdelay(1); ++ ++ /* Enable seeprom accesses. */ ++ tw32_carefully(GRC_LOCAL_CTRL, ++ tr32(GRC_LOCAL_CTRL) | GRC_LCLCTRL_AUTO_SEEPROM); ++ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700 && ++ GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5701) { ++ uint32_t nvcfg1 = tr32(NVRAM_CFG1); ++ ++ tp->tg3_flags |= TG3_FLAG_NVRAM; ++ if (nvcfg1 & NVRAM_CFG1_FLASHIF_ENAB) { ++ if (nvcfg1 & NVRAM_CFG1_BUFFERED_MODE) ++ tp->tg3_flags |= TG3_FLAG_NVRAM_BUFFERED; ++ } else { ++ nvcfg1 &= ~NVRAM_CFG1_COMPAT_BYPASS; ++ tw32(NVRAM_CFG1, nvcfg1); ++ } ++ ++ } else { ++ tp->tg3_flags &= ~(TG3_FLAG_NVRAM | TG3_FLAG_NVRAM_BUFFERED); ++ } ++} ++ ++ ++static int tg3_nvram_read_using_eeprom( ++ struct tg3 *tp __unused, uint32_t offset, uint32_t *val) ++{ ++ uint32_t tmp; ++ int i; ++ ++ if (offset > EEPROM_ADDR_ADDR_MASK || ++ (offset % 4) != 0) { ++ return -EINVAL; ++ } ++ ++ tmp = tr32(GRC_EEPROM_ADDR) & ~(EEPROM_ADDR_ADDR_MASK | ++ EEPROM_ADDR_DEVID_MASK | ++ EEPROM_ADDR_READ); ++ tw32(GRC_EEPROM_ADDR, ++ tmp | ++ (0 << EEPROM_ADDR_DEVID_SHIFT) | ++ ((offset << EEPROM_ADDR_ADDR_SHIFT) & ++ EEPROM_ADDR_ADDR_MASK) | ++ EEPROM_ADDR_READ | EEPROM_ADDR_START); ++ ++ for (i = 0; i < 10000; i++) { ++ tmp = tr32(GRC_EEPROM_ADDR); ++ ++ if (tmp & EEPROM_ADDR_COMPLETE) ++ break; ++ udelay(100); ++ } ++ if (!(tmp & EEPROM_ADDR_COMPLETE)) { ++ return -EBUSY; ++ } ++ ++ *val = tr32(GRC_EEPROM_DATA); ++ return 0; ++} ++ ++static int tg3_nvram_read(struct tg3 *tp, uint32_t offset, uint32_t *val) ++{ ++ int i, saw_done_clear; ++ ++ if (!(tp->tg3_flags & TG3_FLAG_NVRAM)) ++ return tg3_nvram_read_using_eeprom(tp, offset, val); ++ ++ if (tp->tg3_flags & TG3_FLAG_NVRAM_BUFFERED) ++ offset = ((offset / NVRAM_BUFFERED_PAGE_SIZE) << ++ NVRAM_BUFFERED_PAGE_POS) + ++ (offset % NVRAM_BUFFERED_PAGE_SIZE); ++ ++ if (offset > NVRAM_ADDR_MSK) ++ return -EINVAL; ++ ++ tw32(NVRAM_SWARB, SWARB_REQ_SET1); ++ for (i = 0; i < 1000; i++) { ++ if (tr32(NVRAM_SWARB) & SWARB_GNT1) ++ break; ++ udelay(20); ++ } ++ ++ tw32(NVRAM_ADDR, offset); ++ tw32(NVRAM_CMD, ++ NVRAM_CMD_RD | NVRAM_CMD_GO | ++ NVRAM_CMD_FIRST | NVRAM_CMD_LAST | NVRAM_CMD_DONE); ++ ++ /* Wait for done bit to clear then set again. */ ++ saw_done_clear = 0; ++ for (i = 0; i < 1000; i++) { ++ udelay(10); ++ if (!saw_done_clear && ++ !(tr32(NVRAM_CMD) & NVRAM_CMD_DONE)) ++ saw_done_clear = 1; ++ else if (saw_done_clear && ++ (tr32(NVRAM_CMD) & NVRAM_CMD_DONE)) ++ break; ++ } ++ if (i >= 1000) { ++ tw32(NVRAM_SWARB, SWARB_REQ_CLR1); ++ return -EBUSY; ++ } ++ ++ *val = bswap_32(tr32(NVRAM_RDDATA)); ++ tw32(NVRAM_SWARB, 0x20); ++ ++ return 0; ++} ++ ++struct subsys_tbl_ent { ++ uint16_t subsys_vendor, subsys_devid; ++ uint32_t phy_id; ++}; ++ ++static struct subsys_tbl_ent subsys_id_to_phy_id[] = { ++ /* Broadcom boards. */ ++ { 0x14e4, 0x1644, PHY_ID_BCM5401 }, /* BCM95700A6 */ ++ { 0x14e4, 0x0001, PHY_ID_BCM5701 }, /* BCM95701A5 */ ++ { 0x14e4, 0x0002, PHY_ID_BCM8002 }, /* BCM95700T6 */ ++ { 0x14e4, 0x0003, PHY_ID_SERDES }, /* BCM95700A9 */ ++ { 0x14e4, 0x0005, PHY_ID_BCM5701 }, /* BCM95701T1 */ ++ { 0x14e4, 0x0006, PHY_ID_BCM5701 }, /* BCM95701T8 */ ++ { 0x14e4, 0x0007, PHY_ID_SERDES }, /* BCM95701A7 */ ++ { 0x14e4, 0x0008, PHY_ID_BCM5701 }, /* BCM95701A10 */ ++ { 0x14e4, 0x8008, PHY_ID_BCM5701 }, /* BCM95701A12 */ ++ { 0x14e4, 0x0009, PHY_ID_BCM5701 }, /* BCM95703Ax1 */ ++ { 0x14e4, 0x8009, PHY_ID_BCM5701 }, /* BCM95703Ax2 */ ++ ++ /* 3com boards. */ ++ { PCI_VENDOR_ID_3COM, 0x1000, PHY_ID_BCM5401 }, /* 3C996T */ ++ { PCI_VENDOR_ID_3COM, 0x1006, PHY_ID_BCM5701 }, /* 3C996BT */ ++ /* { PCI_VENDOR_ID_3COM, 0x1002, PHY_ID_XXX }, 3C996CT */ ++ /* { PCI_VENDOR_ID_3COM, 0x1003, PHY_ID_XXX }, 3C997T */ ++ { PCI_VENDOR_ID_3COM, 0x1004, PHY_ID_SERDES }, /* 3C996SX */ ++ /* { PCI_VENDOR_ID_3COM, 0x1005, PHY_ID_XXX }, 3C997SZ */ ++ { PCI_VENDOR_ID_3COM, 0x1007, PHY_ID_BCM5701 }, /* 3C1000T */ ++ { PCI_VENDOR_ID_3COM, 0x1008, PHY_ID_BCM5701 }, /* 3C940BR01 */ ++ ++ /* DELL boards. */ ++ { PCI_VENDOR_ID_DELL, 0x00d1, PHY_ID_BCM5401 }, /* VIPER */ ++ { PCI_VENDOR_ID_DELL, 0x0106, PHY_ID_BCM5401 }, /* JAGUAR */ ++ { PCI_VENDOR_ID_DELL, 0x0109, PHY_ID_BCM5411 }, /* MERLOT */ ++ { PCI_VENDOR_ID_DELL, 0x010a, PHY_ID_BCM5411 }, /* SLIM_MERLOT */ ++ ++ /* Compaq boards. */ ++ { PCI_VENDOR_ID_COMPAQ, 0x007c, PHY_ID_BCM5701 }, /* BANSHEE */ ++ { PCI_VENDOR_ID_COMPAQ, 0x009a, PHY_ID_BCM5701 }, /* BANSHEE_2 */ ++ { PCI_VENDOR_ID_COMPAQ, 0x007d, PHY_ID_SERDES }, /* CHANGELING */ ++ { PCI_VENDOR_ID_COMPAQ, 0x0085, PHY_ID_BCM5701 }, /* NC7780 */ ++ { PCI_VENDOR_ID_COMPAQ, 0x0099, PHY_ID_BCM5701 } /* NC7780_2 */ ++}; ++ ++static int tg3_phy_probe(struct tg3 *tp) ++{ ++ uint32_t eeprom_phy_id, hw_phy_id_1, hw_phy_id_2; ++ uint32_t hw_phy_id, hw_phy_id_masked; ++ enum phy_led_mode eeprom_led_mode; ++ uint32_t val; ++ unsigned i; ++ int eeprom_signature_found, err; ++ ++ tp->phy_id = PHY_ID_INVALID; ++ ++ for (i = 0; i < sizeof(subsys_id_to_phy_id)/sizeof(subsys_id_to_phy_id[0]); i++) { ++ if ((subsys_id_to_phy_id[i].subsys_vendor == tp->subsystem_vendor) && ++ (subsys_id_to_phy_id[i].subsys_devid == tp->subsystem_device)) { ++ tp->phy_id = subsys_id_to_phy_id[i].phy_id; ++ break; ++ } ++ } ++ ++ eeprom_phy_id = PHY_ID_INVALID; ++ eeprom_led_mode = led_mode_auto; ++ eeprom_signature_found = 0; ++ tg3_read_mem(NIC_SRAM_DATA_SIG, &val); ++ if (val == NIC_SRAM_DATA_SIG_MAGIC) { ++ uint32_t nic_cfg; ++ ++ tg3_read_mem(NIC_SRAM_DATA_CFG, &nic_cfg); ++ tp->nic_sram_data_cfg = nic_cfg; ++ ++ eeprom_signature_found = 1; ++ ++ if ((nic_cfg & NIC_SRAM_DATA_CFG_PHY_TYPE_MASK) == ++ NIC_SRAM_DATA_CFG_PHY_TYPE_FIBER) { ++ eeprom_phy_id = PHY_ID_SERDES; ++ } else { ++ uint32_t nic_phy_id; ++ ++ tg3_read_mem(NIC_SRAM_DATA_PHY_ID, &nic_phy_id); ++ if (nic_phy_id != 0) { ++ uint32_t id1 = nic_phy_id & NIC_SRAM_DATA_PHY_ID1_MASK; ++ uint32_t id2 = nic_phy_id & NIC_SRAM_DATA_PHY_ID2_MASK; ++ ++ eeprom_phy_id = (id1 >> 16) << 10; ++ eeprom_phy_id |= (id2 & 0xfc00) << 16; ++ eeprom_phy_id |= (id2 & 0x03ff) << 0; ++ } ++ } ++ ++ switch (nic_cfg & NIC_SRAM_DATA_CFG_LED_MODE_MASK) { ++ case NIC_SRAM_DATA_CFG_LED_TRIPLE_SPD: ++ eeprom_led_mode = led_mode_three_link; ++ break; ++ ++ case NIC_SRAM_DATA_CFG_LED_LINK_SPD: ++ eeprom_led_mode = led_mode_link10; ++ break; ++ ++ default: ++ eeprom_led_mode = led_mode_auto; ++ break; ++ }; ++ if (((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) || ++ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) || ++ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705)) && ++ (nic_cfg & NIC_SRAM_DATA_CFG_EEPROM_WP)) { ++ tp->tg3_flags |= TG3_FLAG_EEPROM_WRITE_PROT; ++ } ++ ++ if (nic_cfg & NIC_SRAM_DATA_CFG_ASF_ENABLE) ++ tp->tg3_flags |= TG3_FLAG_ENABLE_ASF; ++ if (nic_cfg & NIC_SRAM_DATA_CFG_FIBER_WOL) ++ tp->tg3_flags |= TG3_FLAG_SERDES_WOL_CAP; ++ } ++ ++ /* Now read the physical PHY_ID from the chip and verify ++ * that it is sane. If it doesn't look good, we fall back ++ * to either the hard-coded table based PHY_ID and failing ++ * that the value found in the eeprom area. ++ */ ++ err = tg3_readphy(tp, MII_PHYSID1, &hw_phy_id_1); ++ err |= tg3_readphy(tp, MII_PHYSID2, &hw_phy_id_2); ++ ++ hw_phy_id = (hw_phy_id_1 & 0xffff) << 10; ++ hw_phy_id |= (hw_phy_id_2 & 0xfc00) << 16; ++ hw_phy_id |= (hw_phy_id_2 & 0x03ff) << 0; ++ ++ hw_phy_id_masked = hw_phy_id & PHY_ID_MASK; ++ ++ if (!err && KNOWN_PHY_ID(hw_phy_id_masked)) { ++ tp->phy_id = hw_phy_id; ++ } else { ++ /* phy_id currently holds the value found in the ++ * subsys_id_to_phy_id[] table or PHY_ID_INVALID ++ * if a match was not found there. ++ */ ++ if (tp->phy_id == PHY_ID_INVALID) { ++ if (!eeprom_signature_found || ++ !KNOWN_PHY_ID(eeprom_phy_id & PHY_ID_MASK)) ++ return -ENODEV; ++ tp->phy_id = eeprom_phy_id; ++ } ++ } ++ ++ err = tg3_phy_reset(tp); ++ if (err) ++ return err; ++ ++ if (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0 || ++ tp->pci_chip_rev_id == CHIPREV_ID_5701_B0) { ++ uint32_t mii_tg3_ctrl; ++ ++ /* These chips, when reset, only advertise 10Mb ++ * capabilities. Fix that. ++ */ ++ err = tg3_writephy(tp, MII_ADVERTISE, ++ (ADVERTISE_CSMA | ++ ADVERTISE_PAUSE_CAP | ++ ADVERTISE_10HALF | ++ ADVERTISE_10FULL | ++ ADVERTISE_100HALF | ++ ADVERTISE_100FULL)); ++ mii_tg3_ctrl = (MII_TG3_CTRL_ADV_1000_HALF | ++ MII_TG3_CTRL_ADV_1000_FULL | ++ MII_TG3_CTRL_AS_MASTER | ++ MII_TG3_CTRL_ENABLE_AS_MASTER); ++ if (tp->tg3_flags & TG3_FLAG_10_100_ONLY) ++ mii_tg3_ctrl = 0; ++ ++ err |= tg3_writephy(tp, MII_TG3_CTRL, mii_tg3_ctrl); ++ err |= tg3_writephy(tp, MII_BMCR, ++ (BMCR_ANRESTART | BMCR_ANENABLE)); ++ } ++ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) { ++ tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0c00); ++ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x201f); ++ tg3_writedsp(tp, MII_TG3_DSP_RW_PORT, 0x2aaa); ++ } ++ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) { ++ tg3_writephy(tp, 0x1c, 0x8d68); ++ tg3_writephy(tp, 0x1c, 0x8d68); ++ } ++ ++ /* Enable Ethernet@WireSpeed */ ++ tg3_phy_set_wirespeed(tp); ++ ++ if (!err && ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5401)) { ++ err = tg3_init_5401phy_dsp(tp); ++ } ++ ++ /* Determine the PHY led mode. ++ * Be careful if this gets set wrong it can result in an inability to ++ * establish a link. ++ */ ++ if (tp->phy_id == PHY_ID_SERDES) { ++ tp->led_mode = led_mode_three_link; ++ } ++ else if (tp->subsystem_vendor == PCI_VENDOR_ID_DELL) { ++ tp->led_mode = led_mode_link10; ++ } else { ++ tp->led_mode = led_mode_three_link; ++ if (eeprom_signature_found && ++ eeprom_led_mode != led_mode_auto) ++ tp->led_mode = eeprom_led_mode; ++ } ++ ++ if (tp->phy_id == PHY_ID_SERDES) ++ tp->link_config.advertising = ++ (ADVERTISED_1000baseT_Half | ++ ADVERTISED_1000baseT_Full | ++ ADVERTISED_Autoneg | ++ ADVERTISED_FIBRE); ++ if (tp->tg3_flags & TG3_FLAG_10_100_ONLY) ++ tp->link_config.advertising &= ++ ~(ADVERTISED_1000baseT_Half | ++ ADVERTISED_1000baseT_Full); ++ ++ return err; ++} ++ ++#if SUPPORT_PARTNO_STR ++static void tg3_read_partno(struct tg3 *tp) ++{ ++ unsigned char vpd_data[256]; ++ int i; ++ ++ for (i = 0; i < 256; i += 4) { ++ uint32_t tmp; ++ ++ if (tg3_nvram_read(tp, 0x100 + i, &tmp)) ++ goto out_not_found; ++ ++ vpd_data[i + 0] = ((tmp >> 0) & 0xff); ++ vpd_data[i + 1] = ((tmp >> 8) & 0xff); ++ vpd_data[i + 2] = ((tmp >> 16) & 0xff); ++ vpd_data[i + 3] = ((tmp >> 24) & 0xff); ++ } ++ ++ /* Now parse and find the part number. */ ++ for (i = 0; i < 256; ) { ++ unsigned char val = vpd_data[i]; ++ int block_end; ++ ++ if (val == 0x82 || val == 0x91) { ++ i = (i + 3 + ++ (vpd_data[i + 1] + ++ (vpd_data[i + 2] << 8))); ++ continue; ++ } ++ ++ if (val != 0x90) ++ goto out_not_found; ++ ++ block_end = (i + 3 + ++ (vpd_data[i + 1] + ++ (vpd_data[i + 2] << 8))); ++ i += 3; ++ while (i < block_end) { ++ if (vpd_data[i + 0] == 'P' && ++ vpd_data[i + 1] == 'N') { ++ int partno_len = vpd_data[i + 2]; ++ ++ if (partno_len > 24) ++ goto out_not_found; ++ ++ memcpy(tp->board_part_number, ++ &vpd_data[i + 3], ++ partno_len); ++ ++ /* Success. */ ++ return; ++ } ++ } ++ ++ /* Part number not found. */ ++ goto out_not_found; ++ } ++ ++out_not_found: ++ memcpy(tp->board_part_number, "none", sizeof("none")); ++} ++#else ++#define tg3_read_partno(TP) ((TP)->board_part_number[0] = '\0') ++#endif ++ ++static int tg3_get_invariants(struct tg3 *tp) ++{ ++ uint32_t misc_ctrl_reg; ++ uint32_t pci_state_reg, grc_misc_cfg; ++ uint16_t pci_cmd; ++ uint8_t pci_latency; ++ int err; ++ ++ /* Read the subsystem vendor and device ids */ ++ pci_read_config_word(tp->pdev, PCI_SUBSYSTEM_VENDOR_ID, &tp->subsystem_vendor); ++ pci_read_config_word(tp->pdev, PCI_SUBSYSTEM_ID, &tp->subsystem_device); ++ ++ /* The sun_5704 code needs infrastructure etherboot does have ++ * ignore it for now. ++ */ ++ ++ /* If we have an AMD 762 or Intel ICH/ICH0 chipset, write ++ * reordering to the mailbox registers done by the host ++ * controller can cause major troubles. We read back from ++ * every mailbox register write to force the writes to be ++ * posted to the chip in order. ++ * ++ * TG3_FLAG_MBOX_WRITE_REORDER has been forced on. ++ */ ++ ++ /* Force memory write invalidate off. If we leave it on, ++ * then on 5700_BX chips we have to enable a workaround. ++ * The workaround is to set the TG3PCI_DMA_RW_CTRL boundry ++ * to match the cacheline size. The Broadcom driver have this ++ * workaround but turns MWI off all the times so never uses ++ * it. This seems to suggest that the workaround is insufficient. ++ */ ++ pci_read_config_word(tp->pdev, PCI_COMMAND, &pci_cmd); ++ pci_cmd &= ~PCI_COMMAND_INVALIDATE; ++ /* Also, force SERR#/PERR# in PCI command. */ ++ pci_cmd |= PCI_COMMAND_PARITY | PCI_COMMAND_SERR; ++ pci_write_config_word(tp->pdev, PCI_COMMAND, pci_cmd); ++ ++ /* It is absolutely critical that TG3PCI_MISC_HOST_CTRL ++ * has the register indirect write enable bit set before ++ * we try to access any of the MMIO registers. It is also ++ * critical that the PCI-X hw workaround situation is decided ++ * before that as well. ++ */ ++ pci_read_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL, &misc_ctrl_reg); ++ ++ tp->pci_chip_rev_id = (misc_ctrl_reg >> MISC_HOST_CTRL_CHIPREV_SHIFT); ++ ++ /* Initialize misc host control in PCI block. */ ++ tp->misc_host_ctrl |= (misc_ctrl_reg & ++ MISC_HOST_CTRL_CHIPREV); ++ pci_write_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL, ++ tp->misc_host_ctrl); ++ ++ pci_read_config_byte(tp->pdev, PCI_LATENCY_TIMER, &pci_latency); ++ if (pci_latency < 64) { ++ pci_write_config_byte(tp->pdev, PCI_LATENCY_TIMER, 64); ++ } ++ ++ pci_read_config_dword(tp->pdev, TG3PCI_PCISTATE, &pci_state_reg); ++ ++ /* If this is a 5700 BX chipset, and we are in PCI-X ++ * mode, enable register write workaround. ++ * ++ * The workaround is to use indirect register accesses ++ * for all chip writes not to mailbox registers. ++ * ++ * In etherboot to simplify things we just always use this work around. ++ */ ++ if ((pci_state_reg & PCISTATE_CONV_PCI_MODE) == 0) { ++ tp->tg3_flags |= TG3_FLAG_PCIX_MODE; ++ } ++ /* Back to back register writes can cause problems on the 5701, ++ * the workaround is to read back all reg writes except those to ++ * mailbox regs. ++ * In etherboot we always use indirect register accesses so ++ * we don't see this. ++ */ ++ ++ if ((pci_state_reg & PCISTATE_BUS_SPEED_HIGH) != 0) ++ tp->tg3_flags |= TG3_FLAG_PCI_HIGH_SPEED; ++ if ((pci_state_reg & PCISTATE_BUS_32BIT) != 0) ++ tp->tg3_flags |= TG3_FLAG_PCI_32BIT; ++ ++ /* Chip-specific fixup from Broadcom driver */ ++ if ((tp->pci_chip_rev_id == CHIPREV_ID_5704_A0) && ++ (!(pci_state_reg & PCISTATE_RETRY_SAME_DMA))) { ++ pci_state_reg |= PCISTATE_RETRY_SAME_DMA; ++ pci_write_config_dword(tp->pdev, TG3PCI_PCISTATE, pci_state_reg); ++ } ++ ++ /* Force the chip into D0. */ ++ tg3_set_power_state_0(tp); ++ ++ /* Etherboot does not ask the tg3 to do checksums */ ++ /* Etherboot does not ask the tg3 to do jumbo frames */ ++ /* Ehterboot does not ask the tg3 to use WakeOnLan. */ ++ ++ /* A few boards don't want Ethernet@WireSpeed phy feature */ ++ if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700) || ++ ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) && ++ (tp->pci_chip_rev_id != CHIPREV_ID_5705_A0) && ++ (tp->pci_chip_rev_id != CHIPREV_ID_5705_A1))) { ++ tp->tg3_flags2 |= TG3_FLG2_NO_ETH_WIRE_SPEED; ++ } ++ ++ /* Avoid tagged irq status etherboot does not use irqs */ ++ ++ /* Only 5701 and later support tagged irq status mode. ++ * Also, 5788 chips cannot use tagged irq status. ++ * ++ * However, since etherboot does not use irqs avoid tagged irqs ++ * status because the interrupt condition is more difficult to ++ * fully clear in that mode. ++ */ ++ ++ /* Since some 5700_AX && 5700_BX have problems with 32BYTE ++ * coalesce_mode, and the rest work fine anything set. ++ * Don't enable HOST_CC_MODE_32BYTE in etherboot. ++ */ ++ ++ /* Initialize MAC MI mode, polling disabled. */ ++ tw32_carefully(MAC_MI_MODE, tp->mi_mode); ++ ++ /* Initialize data/descriptor byte/word swapping. */ ++ tw32(GRC_MODE, tp->grc_mode); ++ ++ tg3_switch_clocks(tp); ++ ++ /* Clear this out for sanity. */ ++ tw32(TG3PCI_MEM_WIN_BASE_ADDR, 0); ++ ++ /* Etherboot does not need to check if the PCIX_TARGET_HWBUG ++ * is needed. It always uses it. ++ */ ++ ++ udelay(50); ++ tg3_nvram_init(tp); ++ ++ /* The TX descriptors will reside in main memory. ++ */ ++ ++ /* See which board we are using. ++ */ ++ grc_misc_cfg = tr32(GRC_MISC_CFG); ++ grc_misc_cfg &= GRC_MISC_CFG_BOARD_ID_MASK; ++ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 && ++ grc_misc_cfg == GRC_MISC_CFG_BOARD_ID_5704CIOBE) { ++ tp->tg3_flags |= TG3_FLAG_SPLIT_MODE; ++ tp->split_mode_max_reqs = SPLIT_MODE_5704_MAX_REQ; ++ } ++ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 && ++ (grc_misc_cfg == GRC_MISC_CFG_BOARD_ID_5788 || ++ grc_misc_cfg == GRC_MISC_CFG_BOARD_ID_5788M)) ++ tp->tg3_flags2 |= TG3_FLG2_IS_5788; ++ ++ /* these are limited to 10/100 only */ ++ if (((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) && ++ ((grc_misc_cfg == 0x8000) || (grc_misc_cfg == 0x4000))) || ++ ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) && ++ (tp->pdev->vendor == PCI_VENDOR_ID_BROADCOM) && ++ ((tp->pdev->dev_id == PCI_DEVICE_ID_TIGON3_5901) || ++ (tp->pdev->dev_id == PCI_DEVICE_ID_TIGON3_5901_2)))) { ++ tp->tg3_flags |= TG3_FLAG_10_100_ONLY; ++ } ++ ++ err = tg3_phy_probe(tp); ++ if (err) { ++ printf("phy probe failed, err %d\n", err); ++ } ++ ++ tg3_read_partno(tp); ++ ++ ++ /* 5700 BX chips need to have their TX producer index mailboxes ++ * written twice to workaround a bug. ++ * In etherboot we do this unconditionally to simplify things. ++ */ ++ ++ /* 5700 chips can get confused if TX buffers straddle the ++ * 4GB address boundary in some cases. ++ * ++ * In etherboot we can ignore the problem as etherboot lives below 4GB. ++ */ ++ ++ /* In etherboot wake-on-lan is unconditionally disabled */ ++ return err; ++} ++ ++static int tg3_get_device_address(struct tg3 *tp) ++{ ++ struct nic *nic = tp->nic; ++ uint32_t hi, lo, mac_offset; ++ ++ if (PCI_FUNC(tp->pdev->devfn) == 0) ++ mac_offset = 0x7c; ++ else ++ mac_offset = 0xcc; ++ ++ /* First try to get it from MAC address mailbox. */ ++ tg3_read_mem(NIC_SRAM_MAC_ADDR_HIGH_MBOX, &hi); ++ if ((hi >> 16) == 0x484b) { ++ nic->node_addr[0] = (hi >> 8) & 0xff; ++ nic->node_addr[1] = (hi >> 0) & 0xff; ++ ++ tg3_read_mem(NIC_SRAM_MAC_ADDR_LOW_MBOX, &lo); ++ nic->node_addr[2] = (lo >> 24) & 0xff; ++ nic->node_addr[3] = (lo >> 16) & 0xff; ++ nic->node_addr[4] = (lo >> 8) & 0xff; ++ nic->node_addr[5] = (lo >> 0) & 0xff; ++ } ++ /* Next, try NVRAM. */ ++ else if (!tg3_nvram_read(tp, mac_offset + 0, &hi) && ++ !tg3_nvram_read(tp, mac_offset + 4, &lo)) { ++ nic->node_addr[0] = ((hi >> 16) & 0xff); ++ nic->node_addr[1] = ((hi >> 24) & 0xff); ++ nic->node_addr[2] = ((lo >> 0) & 0xff); ++ nic->node_addr[3] = ((lo >> 8) & 0xff); ++ nic->node_addr[4] = ((lo >> 16) & 0xff); ++ nic->node_addr[5] = ((lo >> 24) & 0xff); ++ } ++ /* Finally just fetch it out of the MAC control regs. */ ++ else { ++ hi = tr32(MAC_ADDR_0_HIGH); ++ lo = tr32(MAC_ADDR_0_LOW); ++ ++ nic->node_addr[5] = lo & 0xff; ++ nic->node_addr[4] = (lo >> 8) & 0xff; ++ nic->node_addr[3] = (lo >> 16) & 0xff; ++ nic->node_addr[2] = (lo >> 24) & 0xff; ++ nic->node_addr[1] = hi & 0xff; ++ nic->node_addr[0] = (hi >> 8) & 0xff; ++ } ++ ++ return 0; ++} ++ ++ ++static int tg3_setup_dma(struct tg3 *tp) ++{ ++ tw32(TG3PCI_CLOCK_CTRL, 0); ++ ++ if ((tp->tg3_flags & TG3_FLAG_PCIX_MODE) == 0) { ++ tp->dma_rwctrl = ++ (0x7 << DMA_RWCTRL_PCI_WRITE_CMD_SHIFT) | ++ (0x6 << DMA_RWCTRL_PCI_READ_CMD_SHIFT) | ++ (0x7 << DMA_RWCTRL_WRITE_WATER_SHIFT) | ++ (0x7 << DMA_RWCTRL_READ_WATER_SHIFT) | ++ (0x0f << DMA_RWCTRL_MIN_DMA_SHIFT); ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) { ++ tp->dma_rwctrl &= ~(DMA_RWCTRL_MIN_DMA << DMA_RWCTRL_MIN_DMA_SHIFT); ++ } ++ } else { ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) ++ tp->dma_rwctrl = ++ (0x7 << DMA_RWCTRL_PCI_WRITE_CMD_SHIFT) | ++ (0x6 << DMA_RWCTRL_PCI_READ_CMD_SHIFT) | ++ (0x3 << DMA_RWCTRL_WRITE_WATER_SHIFT) | ++ (0x7 << DMA_RWCTRL_READ_WATER_SHIFT) | ++ (0x00 << DMA_RWCTRL_MIN_DMA_SHIFT); ++ else ++ tp->dma_rwctrl = ++ (0x7 << DMA_RWCTRL_PCI_WRITE_CMD_SHIFT) | ++ (0x6 << DMA_RWCTRL_PCI_READ_CMD_SHIFT) | ++ (0x3 << DMA_RWCTRL_WRITE_WATER_SHIFT) | ++ (0x3 << DMA_RWCTRL_READ_WATER_SHIFT) | ++ (0x0f << DMA_RWCTRL_MIN_DMA_SHIFT); ++ ++ /* Wheee, some more chip bugs... */ ++ if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) || ++ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704)) { ++ uint32_t ccval = tr32(TG3PCI_CLOCK_CTRL) & 0x1f; ++ ++ if ((ccval == 0x6) || (ccval == 0x7)) { ++ tp->dma_rwctrl |= DMA_RWCTRL_ONE_DMA; ++ } ++ } ++ } ++ ++ if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) || ++ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704)) { ++ tp->dma_rwctrl &= ~(DMA_RWCTRL_MIN_DMA << DMA_RWCTRL_MIN_DMA_SHIFT); ++ } ++ ++ tp->dma_rwctrl |= DMA_RWCTRL_ASSERT_ALL_BE; ++ ++ tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl); ++ ++ return 0; ++} ++ ++static void tg3_init_link_config(struct tg3 *tp) ++{ ++ tp->link_config.advertising = ++ (ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full | ++ ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full | ++ ADVERTISED_1000baseT_Half | ADVERTISED_1000baseT_Full | ++ ADVERTISED_Autoneg | ADVERTISED_MII); ++ tp->carrier_ok = 0; ++ tp->link_config.active_speed = SPEED_INVALID; ++ tp->link_config.active_duplex = DUPLEX_INVALID; ++} ++ ++ ++#if SUPPORT_PHY_STR ++static const char * tg3_phy_string(struct tg3 *tp) ++{ ++ switch (tp->phy_id & PHY_ID_MASK) { ++ case PHY_ID_BCM5400: return "5400"; ++ case PHY_ID_BCM5401: return "5401"; ++ case PHY_ID_BCM5411: return "5411"; ++ case PHY_ID_BCM5701: return "5701"; ++ case PHY_ID_BCM5703: return "5703"; ++ case PHY_ID_BCM5704: return "5704"; ++ case PHY_ID_BCM8002: return "8002"; ++ case PHY_ID_SERDES: return "serdes"; ++ default: return "unknown"; ++ }; ++} ++#else ++#define tg3_phy_string(TP) "?" ++#endif ++ ++ ++static void tg3_poll_link(struct tg3 *tp) ++{ ++ uint32_t mac_stat; ++ ++ mac_stat = tr32(MAC_STATUS); ++ if (tp->phy_id == PHY_ID_SERDES) { ++ if (tp->carrier_ok? ++ (mac_stat & MAC_STATUS_LNKSTATE_CHANGED): ++ (mac_stat & MAC_STATUS_PCS_SYNCED)) { ++ tw32_carefully(MAC_MODE, tp->mac_mode & ~MAC_MODE_PORT_MODE_MASK); ++ tw32_carefully(MAC_MODE, tp->mac_mode); ++ ++ tg3_setup_phy(tp); ++ } ++ } ++ else { ++ if (mac_stat & MAC_STATUS_LNKSTATE_CHANGED) { ++ tg3_setup_phy(tp); ++ } ++ } ++} ++ ++/************************************************************************** ++POLL - Wait for a frame ++***************************************************************************/ ++static void tg3_ack_irqs(struct tg3 *tp) ++{ ++ if (tp->hw_status->status & SD_STATUS_UPDATED) { ++ /* ++ * writing any value to intr-mbox-0 clears PCI INTA# and ++ * chip-internal interrupt pending events. ++ * writing non-zero to intr-mbox-0 additional tells the ++ * NIC to stop sending us irqs, engaging "in-intr-handler" ++ * event coalescing. ++ */ ++ tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, ++ 0x00000001); ++ /* ++ * Flush PCI write. This also guarantees that our ++ * status block has been flushed to host memory. ++ */ ++ tr32(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW); ++ tp->hw_status->status &= ~SD_STATUS_UPDATED; ++ } ++} ++ ++static int tg3_poll(struct nic *nic, int retrieve) ++{ ++ /* return true if there's an ethernet packet ready to read */ ++ /* nic->packet should contain data on return */ ++ /* nic->packetlen should contain length of data */ ++ ++ struct tg3 *tp = &tg3; ++ int result; ++ ++ result = 0; ++ ++ if ( (tp->hw_status->idx[0].rx_producer != tp->rx_rcb_ptr) && !retrieve ) ++ return 1; ++ ++ tg3_ack_irqs(tp); ++ ++ if (tp->hw_status->idx[0].rx_producer != tp->rx_rcb_ptr) { ++ struct tg3_rx_buffer_desc *desc; ++ unsigned int len; ++ desc = &tp->rx_rcb[tp->rx_rcb_ptr]; ++ if ((desc->opaque & RXD_OPAQUE_RING_MASK) == RXD_OPAQUE_RING_STD) { ++ len = ((desc->idx_len & RXD_LEN_MASK) >> RXD_LEN_SHIFT) - 4; /* omit crc */ ++ ++ nic->packetlen = len; ++ memcpy(nic->packet, bus_to_virt(desc->addr_lo), len); ++ result = 1; ++ } ++ tp->rx_rcb_ptr = (tp->rx_rcb_ptr + 1) % TG3_RX_RCB_RING_SIZE; ++ ++ /* ACK the status ring */ ++ tw32_mailbox2(MAILBOX_RCVRET_CON_IDX_0 + TG3_64BIT_REG_LOW, tp->rx_rcb_ptr); ++ ++ /* Refill RX ring. */ ++ if (result) { ++ tp->rx_std_ptr = (tp->rx_std_ptr + 1) % TG3_RX_RING_SIZE; ++ tw32_mailbox2(MAILBOX_RCV_STD_PROD_IDX + TG3_64BIT_REG_LOW, tp->rx_std_ptr); ++ } ++ } ++ tg3_poll_link(tp); ++ return result; ++} ++ ++/************************************************************************** ++TRANSMIT - Transmit a frame ++***************************************************************************/ ++#if 0 ++static void tg3_set_txd(struct tg3 *tp, int entry, ++ dma_addr_t mapping, int len, uint32_t flags, ++ uint32_t mss_and_is_end) ++{ ++ struct tg3_tx_buffer_desc *txd = &tp->tx_ring[entry]; ++ int is_end = (mss_and_is_end & 0x1); ++ if (is_end) { ++ flags |= TXD_FLAG_END; ++ } ++ ++ txd->addr_hi = 0; ++ txd->addr_lo = mapping & 0xffffffff; ++ txd->len_flags = (len << TXD_LEN_SHIFT) | flags; ++ txd->vlan_tag = 0 << TXD_VLAN_TAG_SHIFT; ++} ++#endif ++ ++static void tg3_transmit(struct nic *nic, const char *dst_addr, ++ unsigned int type, unsigned int size, const char *packet) ++{ ++ static struct eth_frame { ++ uint8_t dst_addr[ETH_ALEN]; ++ uint8_t src_addr[ETH_ALEN]; ++ uint16_t type; ++ uint8_t data [ETH_FRAME_LEN - ETH_HLEN]; ++ } frame[2]; ++ static int frame_idx; ++ ++ /* send the packet to destination */ ++ struct tg3_tx_buffer_desc *txd; ++ struct tg3 *tp; ++ uint32_t entry; ++ int i; ++ ++ /* Wait until there is a free packet frame */ ++ tp = &tg3; ++ i = 0; ++ entry = tp->tx_prod; ++ while((tp->hw_status->idx[0].tx_consumer != entry) && ++ (tp->hw_status->idx[0].tx_consumer != PREV_TX(entry))) { ++ mdelay(10); /* give the nick a chance */ ++ poll_interruptions(); ++ if (++i > 500) { /* timeout 5s for transmit */ ++ printf("transmit timed out\n"); ++ tg3_halt(tp); ++ tg3_setup_hw(tp); ++ return; ++ } ++ } ++ if (i != 0) { ++ printf("#"); ++ } ++ ++ /* Copy the packet to the our local buffer */ ++ memcpy(&frame[frame_idx].dst_addr, dst_addr, ETH_ALEN); ++ memcpy(&frame[frame_idx].src_addr, nic->node_addr, ETH_ALEN); ++ frame[frame_idx].type = htons(type); ++ memset(&frame[frame_idx].data, 0, sizeof(frame[frame_idx].data)); ++ memcpy(&frame[frame_idx].data, packet, size); ++ ++ /* Setup the ring buffer entry to transmit */ ++ txd = &tp->tx_ring[entry]; ++ txd->addr_hi = 0; /* Etherboot runs under 4GB */ ++ txd->addr_lo = virt_to_bus(&frame[frame_idx]); ++ txd->len_flags = ((size + ETH_HLEN) << TXD_LEN_SHIFT) | TXD_FLAG_END; ++ txd->vlan_tag = 0 << TXD_VLAN_TAG_SHIFT; ++ ++ /* Advance to the next entry */ ++ entry = NEXT_TX(entry); ++ frame_idx ^= 1; ++ ++ /* Packets are ready, update Tx producer idx local and on card */ ++ tw32_mailbox((MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW), entry); ++ tw32_mailbox2((MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW), entry); ++ tp->tx_prod = entry; ++} ++ ++/************************************************************************** ++DISABLE - Turn off ethernet interface ++***************************************************************************/ ++static void tg3_disable(struct dev *dev __unused) ++{ ++ struct tg3 *tp = &tg3; ++ /* put the card in its initial state */ ++ /* This function serves 3 purposes. ++ * This disables DMA and interrupts so we don't receive ++ * unexpected packets or interrupts from the card after ++ * etherboot has finished. ++ * This frees resources so etherboot may use ++ * this driver on another interface ++ * This allows etherboot to reinitialize the interface ++ * if something is something goes wrong. ++ */ ++ tg3_halt(tp); ++ tp->tg3_flags &= ~(TG3_FLAG_INIT_COMPLETE|TG3_FLAG_GOT_SERDES_FLOWCTL); ++ tp->carrier_ok = 0; ++ iounmap((void *)tp->regs); ++} ++ ++/************************************************************************** ++IRQ - Enable, Disable, or Force interrupts ++***************************************************************************/ ++static void tg3_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } ++} ++ ++/************************************************************************** ++PROBE - Look for an adapter, this routine's visible to the outside ++You should omit the last argument struct pci_device * for a non-PCI NIC ++***************************************************************************/ ++static int tg3_probe(struct dev *dev, struct pci_device *pdev) ++{ ++ struct nic *nic = (struct nic *)dev; ++ struct tg3 *tp = &tg3; ++ unsigned long tg3reg_base, tg3reg_len; ++ int i, err, pm_cap; ++ ++ if (pdev == 0) ++ return 0; ++ ++ memset(tp, 0, sizeof(*tp)); ++ ++ adjust_pci_device(pdev); ++ ++ nic->irqno = 0; ++ nic->ioaddr = pdev->ioaddr & ~3; ++ ++ /* Find power-management capability. */ ++ pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM); ++ if (pm_cap == 0) { ++ printf("Cannot find PowerManagement capability, aborting.\n"); ++ return 0; ++ } ++ tg3reg_base = pci_bar_start(pdev, PCI_BASE_ADDRESS_0); ++ if (tg3reg_base == -1UL) { ++ printf("Unuseable bar\n"); ++ return 0; ++ } ++ tg3reg_len = pci_bar_size(pdev, PCI_BASE_ADDRESS_0); ++ ++ tp->pdev = pdev; ++ tp->nic = nic; ++ tp->pm_cap = pm_cap; ++ tp->rx_mode = 0; ++ tp->tx_mode = 0; ++ tp->mi_mode = MAC_MI_MODE_BASE; ++ tp->tg3_flags = 0 & ~TG3_FLAG_INIT_COMPLETE; ++ ++ /* The word/byte swap controls here control register access byte ++ * swapping. DMA data byte swapping is controlled in the GRC_MODE ++ * setting below. ++ */ ++ tp->misc_host_ctrl = ++ MISC_HOST_CTRL_MASK_PCI_INT | ++ MISC_HOST_CTRL_WORD_SWAP | ++ MISC_HOST_CTRL_INDIR_ACCESS | ++ MISC_HOST_CTRL_PCISTATE_RW; ++ ++ /* The NONFRM (non-frame) byte/word swap controls take effect ++ * on descriptor entries, anything which isn't packet data. ++ * ++ * The StrongARM chips on the board (one for tx, one for rx) ++ * are running in big-endian mode. ++ */ ++ tp->grc_mode = (GRC_MODE_WSWAP_DATA | GRC_MODE_BSWAP_DATA | ++ GRC_MODE_WSWAP_NONFRM_DATA); ++#if __BYTE_ORDER == __BIG_ENDIAN ++ tp->grc_mode |= GRC_MODE_BSWAP_NONFRM_DATA; ++#endif ++ tp->regs = (unsigned long) ioremap(tg3reg_base, tg3reg_len); ++ if (tp->regs == 0UL) { ++ printf("Cannot map device registers, aborting\n"); ++ return 0; ++ } ++ ++ tg3_init_link_config(tp); ++ ++ err = tg3_get_invariants(tp); ++ if (err) { ++ printf("Problem fetching invariants of chip, aborting.\n"); ++ goto err_out_iounmap; ++ } ++ ++ err = tg3_get_device_address(tp); ++ if (err) { ++ printf("Could not obtain valid ethernet address, aborting.\n"); ++ goto err_out_iounmap; ++ } ++ printf("Ethernet addr: %!\n", nic->node_addr); ++ ++ tg3_setup_dma(tp); ++ ++ /* Now that we have fully setup the chip, save away a snapshot ++ * of the PCI config space. We need to restore this after ++ * GRC_MISC_CFG core clock resets and some resume events. ++ */ ++ pci_save_state(tp->pdev, tp->pci_cfg_state); ++ ++ printf("Tigon3 [partno(%s) rev %hx PHY(%s)] (PCI%s:%s:%s)\n", ++ tp->board_part_number, ++ tp->pci_chip_rev_id, ++ tg3_phy_string(tp), ++ ((tp->tg3_flags & TG3_FLAG_PCIX_MODE) ? "X" : ""), ++ ((tp->tg3_flags & TG3_FLAG_PCI_HIGH_SPEED) ? ++ ((tp->tg3_flags & TG3_FLAG_PCIX_MODE) ? "133MHz" : "66MHz") : ++ ((tp->tg3_flags & TG3_FLAG_PCIX_MODE) ? "100MHz" : "33MHz")), ++ ((tp->tg3_flags & TG3_FLAG_PCI_32BIT) ? "32-bit" : "64-bit")); ++ ++ ++ err = tg3_setup_hw(tp); ++ if (err) { ++ goto err_out_disable; ++ } ++ tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE; ++ ++ /* Wait for a reasonable time for the link to come up */ ++ tg3_poll_link(tp); ++ for(i = 0; !tp->carrier_ok && (i < VALID_LINK_TIMEOUT*100); i++) { ++ mdelay(1); ++ tg3_poll_link(tp); ++ } ++ if (!tp->carrier_ok){ ++ printf("Valid link not established\n"); ++ goto err_out_disable; ++ } ++ ++ dev->disable = tg3_disable; ++ nic->poll = tg3_poll; ++ nic->transmit = tg3_transmit; ++ nic->irq = tg3_irq; ++ ++ return 1; ++ ++ err_out_iounmap: ++ iounmap((void *)tp->regs); ++ return 0; ++ err_out_disable: ++ tg3_disable(dev); ++ return 0; ++} ++ ++static struct pci_id tg3_nics[] = { ++PCI_ROM(0x14e4, 0x1644, "tg3-5700", "Broadcom Tigon 3 5700"), ++PCI_ROM(0x14e4, 0x1645, "tg3-5701", "Broadcom Tigon 3 5701"), ++PCI_ROM(0x14e4, 0x1646, "tg3-5702", "Broadcom Tigon 3 5702"), ++PCI_ROM(0x14e4, 0x1647, "tg3-5703", "Broadcom Tigon 3 5703"), ++PCI_ROM(0x14e4, 0x1648, "tg3-5704", "Broadcom Tigon 3 5704"), ++PCI_ROM(0x14e4, 0x164d, "tg3-5702FE", "Broadcom Tigon 3 5702FE"), ++PCI_ROM(0x14e4, 0x1653, "tg3-5705", "Broadcom Tigon 3 5705"), ++PCI_ROM(0x14e4, 0x1654, "tg3-5705_2", "Broadcom Tigon 3 5705_2"), ++PCI_ROM(0x14e4, 0x165d, "tg3-5705M", "Broadcom Tigon 3 5705M"), ++PCI_ROM(0x14e4, 0x165e, "tg3-5705M_2", "Broadcom Tigon 3 5705M_2"), ++PCI_ROM(0x14e4, 0x1696, "tg3-5782", "Broadcom Tigon 3 5782"), ++PCI_ROM(0x14e4, 0x169c, "tg3-5788", "Broadcom Tigon 3 5788"), ++PCI_ROM(0x14e4, 0x16a6, "tg3-5702X", "Broadcom Tigon 3 5702X"), ++PCI_ROM(0x14e4, 0x16a7, "tg3-5703X", "Broadcom Tigon 3 5703X"), ++PCI_ROM(0x14e4, 0x16a8, "tg3-5704S", "Broadcom Tigon 3 5704S"), ++PCI_ROM(0x14e4, 0x16c6, "tg3-5702A3", "Broadcom Tigon 3 5702A3"), ++PCI_ROM(0x14e4, 0x16c7, "tg3-5703A3", "Broadcom Tigon 3 5703A3"), ++PCI_ROM(0x14e4, 0x170d, "tg3-5901", "Broadcom Tigon 3 5901"), ++PCI_ROM(0x14e4, 0x170e, "tg3-5901_2", "Broadcom Tigon 3 5901_2"), ++PCI_ROM(0x1148, 0x4400, "tg3-9DXX", "Syskonnect 9DXX"), ++PCI_ROM(0x1148, 0x4500, "tg3-9MXX", "Syskonnect 9MXX"), ++PCI_ROM(0x173b, 0x03e8, "tg3-ac1000", "Altima AC1000"), ++PCI_ROM(0x173b, 0x03e9, "tg3-ac1001", "Altima AC1001"), ++PCI_ROM(0x173b, 0x03ea, "tg3-ac9100", "Altima AC9100"), ++PCI_ROM(0x173b, 0x03eb, "tg3-ac1003", "Altima AC1003"), ++}; ++ ++struct pci_driver tg3_driver = { ++ .type = NIC_DRIVER, ++ .name = "TG3", ++ .probe = tg3_probe, ++ .ids = tg3_nics, ++ .id_count = sizeof(tg3_nics)/sizeof(tg3_nics[0]), ++ .class = 0, ++}; +diff -Naur grub-0.97.orig/netboot/tg3.h grub-0.97/netboot/tg3.h +--- grub-0.97.orig/netboot/tg3.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/tg3.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,2203 @@ ++/* $Id: grub-0.95-diskless-patch-2.patch,v 1.1.1.1 2005/06/14 08:18:50 wesolows Exp $ ++ * tg3.h: Definitions for Broadcom Tigon3 ethernet driver. ++ * ++ * Copyright (C) 2001, 2002 David S. Miller (davem@redhat.com) ++ * Copyright (C) 2001 Jeff Garzik (jgarzik@mandrakesoft.com) ++ */ ++ ++#ifndef _T3_H ++#define _T3_H ++ ++#include "stdint.h" ++ ++typedef unsigned long dma_addr_t; ++ ++/* From mii.h */ ++ ++/* Indicates what features are advertised by the interface. */ ++#define ADVERTISED_10baseT_Half (1 << 0) ++#define ADVERTISED_10baseT_Full (1 << 1) ++#define ADVERTISED_100baseT_Half (1 << 2) ++#define ADVERTISED_100baseT_Full (1 << 3) ++#define ADVERTISED_1000baseT_Half (1 << 4) ++#define ADVERTISED_1000baseT_Full (1 << 5) ++#define ADVERTISED_Autoneg (1 << 6) ++#define ADVERTISED_TP (1 << 7) ++#define ADVERTISED_AUI (1 << 8) ++#define ADVERTISED_MII (1 << 9) ++#define ADVERTISED_FIBRE (1 << 10) ++#define ADVERTISED_BNC (1 << 11) ++ ++/* The following are all involved in forcing a particular link ++ * mode for the device for setting things. When getting the ++ * devices settings, these indicate the current mode and whether ++ * it was foced up into this mode or autonegotiated. ++ */ ++ ++/* The forced speed, 10Mb, 100Mb, gigabit. */ ++#define SPEED_10 0 ++#define SPEED_100 1 ++#define SPEED_1000 2 ++#define SPEED_INVALID 3 ++ ++ ++/* Duplex, half or full. */ ++#define DUPLEX_HALF 0x00 ++#define DUPLEX_FULL 0x01 ++#define DUPLEX_INVALID 0x02 ++ ++/* Which connector port. */ ++#define PORT_TP 0x00 ++#define PORT_AUI 0x01 ++#define PORT_MII 0x02 ++#define PORT_FIBRE 0x03 ++#define PORT_BNC 0x04 ++ ++/* Which tranceiver to use. */ ++#define XCVR_INTERNAL 0x00 ++#define XCVR_EXTERNAL 0x01 ++#define XCVR_DUMMY1 0x02 ++#define XCVR_DUMMY2 0x03 ++#define XCVR_DUMMY3 0x04 ++ ++/* Enable or disable autonegotiation. If this is set to enable, ++ * the forced link modes above are completely ignored. ++ */ ++#define AUTONEG_DISABLE 0x00 ++#define AUTONEG_ENABLE 0x01 ++ ++/* Wake-On-Lan options. */ ++#define WAKE_PHY (1 << 0) ++#define WAKE_UCAST (1 << 1) ++#define WAKE_MCAST (1 << 2) ++#define WAKE_BCAST (1 << 3) ++#define WAKE_ARP (1 << 4) ++#define WAKE_MAGIC (1 << 5) ++#define WAKE_MAGICSECURE (1 << 6) /* only meaningful if WAKE_MAGIC */ ++ ++/* Generic MII registers. */ ++ ++#define MII_BMCR 0x00 /* Basic mode control register */ ++#define MII_BMSR 0x01 /* Basic mode status register */ ++#define MII_PHYSID1 0x02 /* PHYS ID 1 */ ++#define MII_PHYSID2 0x03 /* PHYS ID 2 */ ++#define MII_ADVERTISE 0x04 /* Advertisement control reg */ ++#define MII_LPA 0x05 /* Link partner ability reg */ ++#define MII_EXPANSION 0x06 /* Expansion register */ ++#define MII_DCOUNTER 0x12 /* Disconnect counter */ ++#define MII_FCSCOUNTER 0x13 /* False carrier counter */ ++#define MII_NWAYTEST 0x14 /* N-way auto-neg test reg */ ++#define MII_RERRCOUNTER 0x15 /* Receive error counter */ ++#define MII_SREVISION 0x16 /* Silicon revision */ ++#define MII_RESV1 0x17 /* Reserved... */ ++#define MII_LBRERROR 0x18 /* Lpback, rx, bypass error */ ++#define MII_PHYADDR 0x19 /* PHY address */ ++#define MII_RESV2 0x1a /* Reserved... */ ++#define MII_TPISTATUS 0x1b /* TPI status for 10mbps */ ++#define MII_NCONFIG 0x1c /* Network interface config */ ++ ++/* Basic mode control register. */ ++#define BMCR_RESV 0x007f /* Unused... */ ++#define BMCR_CTST 0x0080 /* Collision test */ ++#define BMCR_FULLDPLX 0x0100 /* Full duplex */ ++#define BMCR_ANRESTART 0x0200 /* Auto negotiation restart */ ++#define BMCR_ISOLATE 0x0400 /* Disconnect DP83840 from MII */ ++#define BMCR_PDOWN 0x0800 /* Powerdown the DP83840 */ ++#define BMCR_ANENABLE 0x1000 /* Enable auto negotiation */ ++#define BMCR_SPEED100 0x2000 /* Select 100Mbps */ ++#define BMCR_LOOPBACK 0x4000 /* TXD loopback bits */ ++#define BMCR_RESET 0x8000 /* Reset the DP83840 */ ++ ++/* Basic mode status register. */ ++#define BMSR_ERCAP 0x0001 /* Ext-reg capability */ ++#define BMSR_JCD 0x0002 /* Jabber detected */ ++#define BMSR_LSTATUS 0x0004 /* Link status */ ++#define BMSR_ANEGCAPABLE 0x0008 /* Able to do auto-negotiation */ ++#define BMSR_RFAULT 0x0010 /* Remote fault detected */ ++#define BMSR_ANEGCOMPLETE 0x0020 /* Auto-negotiation complete */ ++#define BMSR_RESV 0x07c0 /* Unused... */ ++#define BMSR_10HALF 0x0800 /* Can do 10mbps, half-duplex */ ++#define BMSR_10FULL 0x1000 /* Can do 10mbps, full-duplex */ ++#define BMSR_100HALF 0x2000 /* Can do 100mbps, half-duplex */ ++#define BMSR_100FULL 0x4000 /* Can do 100mbps, full-duplex */ ++#define BMSR_100BASE4 0x8000 /* Can do 100mbps, 4k packets */ ++ ++/* Advertisement control register. */ ++#define ADVERTISE_SLCT 0x001f /* Selector bits */ ++#define ADVERTISE_CSMA 0x0001 /* Only selector supported */ ++#define ADVERTISE_10HALF 0x0020 /* Try for 10mbps half-duplex */ ++#define ADVERTISE_10FULL 0x0040 /* Try for 10mbps full-duplex */ ++#define ADVERTISE_100HALF 0x0080 /* Try for 100mbps half-duplex */ ++#define ADVERTISE_100FULL 0x0100 /* Try for 100mbps full-duplex */ ++#define ADVERTISE_100BASE4 0x0200 /* Try for 100mbps 4k packets */ ++#define ADVERTISE_RESV 0x1c00 /* Unused... */ ++#define ADVERTISE_RFAULT 0x2000 /* Say we can detect faults */ ++#define ADVERTISE_LPACK 0x4000 /* Ack link partners response */ ++#define ADVERTISE_NPAGE 0x8000 /* Next page bit */ ++ ++#define ADVERTISE_FULL (ADVERTISE_100FULL | ADVERTISE_10FULL | \ ++ ADVERTISE_CSMA) ++#define ADVERTISE_ALL (ADVERTISE_10HALF | ADVERTISE_10FULL | \ ++ ADVERTISE_100HALF | ADVERTISE_100FULL) ++ ++/* Link partner ability register. */ ++#define LPA_SLCT 0x001f /* Same as advertise selector */ ++#define LPA_10HALF 0x0020 /* Can do 10mbps half-duplex */ ++#define LPA_10FULL 0x0040 /* Can do 10mbps full-duplex */ ++#define LPA_100HALF 0x0080 /* Can do 100mbps half-duplex */ ++#define LPA_100FULL 0x0100 /* Can do 100mbps full-duplex */ ++#define LPA_100BASE4 0x0200 /* Can do 100mbps 4k packets */ ++#define LPA_RESV 0x1c00 /* Unused... */ ++#define LPA_RFAULT 0x2000 /* Link partner faulted */ ++#define LPA_LPACK 0x4000 /* Link partner acked us */ ++#define LPA_NPAGE 0x8000 /* Next page bit */ ++ ++#define LPA_DUPLEX (LPA_10FULL | LPA_100FULL) ++#define LPA_100 (LPA_100FULL | LPA_100HALF | LPA_100BASE4) ++ ++/* Expansion register for auto-negotiation. */ ++#define EXPANSION_NWAY 0x0001 /* Can do N-way auto-nego */ ++#define EXPANSION_LCWP 0x0002 /* Got new RX page code word */ ++#define EXPANSION_ENABLENPAGE 0x0004 /* This enables npage words */ ++#define EXPANSION_NPCAPABLE 0x0008 /* Link partner supports npage */ ++#define EXPANSION_MFAULTS 0x0010 /* Multiple faults detected */ ++#define EXPANSION_RESV 0xffe0 /* Unused... */ ++ ++/* N-way test register. */ ++#define NWAYTEST_RESV1 0x00ff /* Unused... */ ++#define NWAYTEST_LOOPBACK 0x0100 /* Enable loopback for N-way */ ++#define NWAYTEST_RESV2 0xfe00 /* Unused... */ ++ ++ ++/* From tg3.h */ ++ ++#define TG3_64BIT_REG_HIGH 0x00UL ++#define TG3_64BIT_REG_LOW 0x04UL ++ ++/* Descriptor block info. */ ++#define TG3_BDINFO_HOST_ADDR 0x0UL /* 64-bit */ ++#define TG3_BDINFO_MAXLEN_FLAGS 0x8UL /* 32-bit */ ++#define BDINFO_FLAGS_USE_EXT_RECV 0x00000001 /* ext rx_buffer_desc */ ++#define BDINFO_FLAGS_DISABLED 0x00000002 ++#define BDINFO_FLAGS_MAXLEN_MASK 0xffff0000 ++#define BDINFO_FLAGS_MAXLEN_SHIFT 16 ++#define TG3_BDINFO_NIC_ADDR 0xcUL /* 32-bit */ ++#define TG3_BDINFO_SIZE 0x10UL ++ ++#define RX_COPY_THRESHOLD 256 ++ ++#define RX_STD_MAX_SIZE 1536 ++#define RX_STD_MAX_SIZE_5705 512 ++#define RX_JUMBO_MAX_SIZE 0xdeadbeef /* XXX */ ++ ++/* First 256 bytes are a mirror of PCI config space. */ ++#define TG3PCI_VENDOR 0x00000000 ++#define TG3PCI_VENDOR_BROADCOM 0x14e4 ++#define TG3PCI_DEVICE 0x00000002 ++#define TG3PCI_DEVICE_TIGON3_1 0x1644 /* BCM5700 */ ++#define TG3PCI_DEVICE_TIGON3_2 0x1645 /* BCM5701 */ ++#define TG3PCI_DEVICE_TIGON3_3 0x1646 /* BCM5702 */ ++#define TG3PCI_DEVICE_TIGON3_4 0x1647 /* BCM5703 */ ++#define TG3PCI_COMMAND 0x00000004 ++#define TG3PCI_STATUS 0x00000006 ++#define TG3PCI_CCREVID 0x00000008 ++#define TG3PCI_CACHELINESZ 0x0000000c ++#define TG3PCI_LATTIMER 0x0000000d ++#define TG3PCI_HEADERTYPE 0x0000000e ++#define TG3PCI_BIST 0x0000000f ++#define TG3PCI_BASE0_LOW 0x00000010 ++#define TG3PCI_BASE0_HIGH 0x00000014 ++/* 0x18 --> 0x2c unused */ ++#define TG3PCI_SUBSYSVENID 0x0000002c ++#define TG3PCI_SUBSYSID 0x0000002e ++#define TG3PCI_ROMADDR 0x00000030 ++#define TG3PCI_CAPLIST 0x00000034 ++/* 0x35 --> 0x3c unused */ ++#define TG3PCI_IRQ_LINE 0x0000003c ++#define TG3PCI_IRQ_PIN 0x0000003d ++#define TG3PCI_MIN_GNT 0x0000003e ++#define TG3PCI_MAX_LAT 0x0000003f ++#define TG3PCI_X_CAPS 0x00000040 ++#define PCIX_CAPS_RELAXED_ORDERING 0x00020000 ++#define PCIX_CAPS_SPLIT_MASK 0x00700000 ++#define PCIX_CAPS_SPLIT_SHIFT 20 ++#define PCIX_CAPS_BURST_MASK 0x000c0000 ++#define PCIX_CAPS_BURST_SHIFT 18 ++#define PCIX_CAPS_MAX_BURST_CPIOB 2 ++#define TG3PCI_PM_CAP_PTR 0x00000041 ++#define TG3PCI_X_COMMAND 0x00000042 ++#define TG3PCI_X_STATUS 0x00000044 ++#define TG3PCI_PM_CAP_ID 0x00000048 ++#define TG3PCI_VPD_CAP_PTR 0x00000049 ++#define TG3PCI_PM_CAPS 0x0000004a ++#define TG3PCI_PM_CTRL_STAT 0x0000004c ++#define TG3PCI_BR_SUPP_EXT 0x0000004e ++#define TG3PCI_PM_DATA 0x0000004f ++#define TG3PCI_VPD_CAP_ID 0x00000050 ++#define TG3PCI_MSI_CAP_PTR 0x00000051 ++#define TG3PCI_VPD_ADDR_FLAG 0x00000052 ++#define VPD_ADDR_FLAG_WRITE 0x00008000 ++#define TG3PCI_VPD_DATA 0x00000054 ++#define TG3PCI_MSI_CAP_ID 0x00000058 ++#define TG3PCI_NXT_CAP_PTR 0x00000059 ++#define TG3PCI_MSI_CTRL 0x0000005a ++#define TG3PCI_MSI_ADDR_LOW 0x0000005c ++#define TG3PCI_MSI_ADDR_HIGH 0x00000060 ++#define TG3PCI_MSI_DATA 0x00000064 ++/* 0x66 --> 0x68 unused */ ++#define TG3PCI_MISC_HOST_CTRL 0x00000068 ++#define MISC_HOST_CTRL_CLEAR_INT 0x00000001 ++#define MISC_HOST_CTRL_MASK_PCI_INT 0x00000002 ++#define MISC_HOST_CTRL_BYTE_SWAP 0x00000004 ++#define MISC_HOST_CTRL_WORD_SWAP 0x00000008 ++#define MISC_HOST_CTRL_PCISTATE_RW 0x00000010 ++#define MISC_HOST_CTRL_CLKREG_RW 0x00000020 ++#define MISC_HOST_CTRL_REGWORD_SWAP 0x00000040 ++#define MISC_HOST_CTRL_INDIR_ACCESS 0x00000080 ++#define MISC_HOST_CTRL_IRQ_MASK_MODE 0x00000100 ++#define MISC_HOST_CTRL_TAGGED_STATUS 0x00000200 ++#define MISC_HOST_CTRL_CHIPREV 0xffff0000 ++#define MISC_HOST_CTRL_CHIPREV_SHIFT 16 ++#define GET_CHIP_REV_ID(MISC_HOST_CTRL) \ ++ (((MISC_HOST_CTRL) & MISC_HOST_CTRL_CHIPREV) >> \ ++ MISC_HOST_CTRL_CHIPREV_SHIFT) ++#define CHIPREV_ID_5700_A0 0x7000 ++#define CHIPREV_ID_5700_A1 0x7001 ++#define CHIPREV_ID_5700_B0 0x7100 ++#define CHIPREV_ID_5700_B1 0x7101 ++#define CHIPREV_ID_5700_B3 0x7102 ++#define CHIPREV_ID_5700_ALTIMA 0x7104 ++#define CHIPREV_ID_5700_C0 0x7200 ++#define CHIPREV_ID_5701_A0 0x0000 ++#define CHIPREV_ID_5701_B0 0x0100 ++#define CHIPREV_ID_5701_B2 0x0102 ++#define CHIPREV_ID_5701_B5 0x0105 ++#define CHIPREV_ID_5703_A0 0x1000 ++#define CHIPREV_ID_5703_A1 0x1001 ++#define CHIPREV_ID_5703_A2 0x1002 ++#define CHIPREV_ID_5703_A3 0x1003 ++#define CHIPREV_ID_5704_A0 0x2000 ++#define CHIPREV_ID_5704_A1 0x2001 ++#define CHIPREV_ID_5704_A2 0x2002 ++#define CHIPREV_ID_5705_A0 0x3000 ++#define CHIPREV_ID_5705_A1 0x3001 ++#define CHIPREV_ID_5705_A2 0x3002 ++#define CHIPREV_ID_5705_A3 0x3003 ++#define GET_ASIC_REV(CHIP_REV_ID) ((CHIP_REV_ID) >> 12) ++#define ASIC_REV_5700 0x07 ++#define ASIC_REV_5701 0x00 ++#define ASIC_REV_5703 0x01 ++#define ASIC_REV_5704 0x02 ++#define ASIC_REV_5705 0x03 ++#define GET_CHIP_REV(CHIP_REV_ID) ((CHIP_REV_ID) >> 8) ++#define CHIPREV_5700_AX 0x70 ++#define CHIPREV_5700_BX 0x71 ++#define CHIPREV_5700_CX 0x72 ++#define CHIPREV_5701_AX 0x00 ++#define GET_METAL_REV(CHIP_REV_ID) ((CHIP_REV_ID) & 0xff) ++#define METAL_REV_A0 0x00 ++#define METAL_REV_A1 0x01 ++#define METAL_REV_B0 0x00 ++#define METAL_REV_B1 0x01 ++#define METAL_REV_B2 0x02 ++#define TG3PCI_DMA_RW_CTRL 0x0000006c ++#define DMA_RWCTRL_MIN_DMA 0x000000ff ++#define DMA_RWCTRL_MIN_DMA_SHIFT 0 ++#define DMA_RWCTRL_READ_BNDRY_MASK 0x00000700 ++#define DMA_RWCTRL_READ_BNDRY_DISAB 0x00000000 ++#define DMA_RWCTRL_READ_BNDRY_16 0x00000100 ++#define DMA_RWCTRL_READ_BNDRY_32 0x00000200 ++#define DMA_RWCTRL_READ_BNDRY_64 0x00000300 ++#define DMA_RWCTRL_READ_BNDRY_128 0x00000400 ++#define DMA_RWCTRL_READ_BNDRY_256 0x00000500 ++#define DMA_RWCTRL_READ_BNDRY_512 0x00000600 ++#define DMA_RWCTRL_READ_BNDRY_1024 0x00000700 ++#define DMA_RWCTRL_WRITE_BNDRY_MASK 0x00003800 ++#define DMA_RWCTRL_WRITE_BNDRY_DISAB 0x00000000 ++#define DMA_RWCTRL_WRITE_BNDRY_16 0x00000800 ++#define DMA_RWCTRL_WRITE_BNDRY_32 0x00001000 ++#define DMA_RWCTRL_WRITE_BNDRY_64 0x00001800 ++#define DMA_RWCTRL_WRITE_BNDRY_128 0x00002000 ++#define DMA_RWCTRL_WRITE_BNDRY_256 0x00002800 ++#define DMA_RWCTRL_WRITE_BNDRY_512 0x00003000 ++#define DMA_RWCTRL_WRITE_BNDRY_1024 0x00003800 ++#define DMA_RWCTRL_ONE_DMA 0x00004000 ++#define DMA_RWCTRL_READ_WATER 0x00070000 ++#define DMA_RWCTRL_READ_WATER_SHIFT 16 ++#define DMA_RWCTRL_WRITE_WATER 0x00380000 ++#define DMA_RWCTRL_WRITE_WATER_SHIFT 19 ++#define DMA_RWCTRL_USE_MEM_READ_MULT 0x00400000 ++#define DMA_RWCTRL_ASSERT_ALL_BE 0x00800000 ++#define DMA_RWCTRL_PCI_READ_CMD 0x0f000000 ++#define DMA_RWCTRL_PCI_READ_CMD_SHIFT 24 ++#define DMA_RWCTRL_PCI_WRITE_CMD 0xf0000000 ++#define DMA_RWCTRL_PCI_WRITE_CMD_SHIFT 28 ++#define TG3PCI_PCISTATE 0x00000070 ++#define PCISTATE_FORCE_RESET 0x00000001 ++#define PCISTATE_INT_NOT_ACTIVE 0x00000002 ++#define PCISTATE_CONV_PCI_MODE 0x00000004 ++#define PCISTATE_BUS_SPEED_HIGH 0x00000008 ++#define PCISTATE_BUS_32BIT 0x00000010 ++#define PCISTATE_ROM_ENABLE 0x00000020 ++#define PCISTATE_ROM_RETRY_ENABLE 0x00000040 ++#define PCISTATE_FLAT_VIEW 0x00000100 ++#define PCISTATE_RETRY_SAME_DMA 0x00002000 ++#define TG3PCI_CLOCK_CTRL 0x00000074 ++#define CLOCK_CTRL_CORECLK_DISABLE 0x00000200 ++#define CLOCK_CTRL_RXCLK_DISABLE 0x00000400 ++#define CLOCK_CTRL_TXCLK_DISABLE 0x00000800 ++#define CLOCK_CTRL_ALTCLK 0x00001000 ++#define CLOCK_CTRL_PWRDOWN_PLL133 0x00008000 ++#define CLOCK_CTRL_44MHZ_CORE 0x00040000 ++#define CLOCK_CTRL_625_CORE 0x00100000 ++#define CLOCK_CTRL_FORCE_CLKRUN 0x00200000 ++#define CLOCK_CTRL_CLKRUN_OENABLE 0x00400000 ++#define CLOCK_CTRL_DELAY_PCI_GRANT 0x80000000 ++#define TG3PCI_REG_BASE_ADDR 0x00000078 ++#define TG3PCI_MEM_WIN_BASE_ADDR 0x0000007c ++#define TG3PCI_REG_DATA 0x00000080 ++#define TG3PCI_MEM_WIN_DATA 0x00000084 ++#define TG3PCI_MODE_CTRL 0x00000088 ++#define TG3PCI_MISC_CFG 0x0000008c ++#define TG3PCI_MISC_LOCAL_CTRL 0x00000090 ++/* 0x94 --> 0x98 unused */ ++#define TG3PCI_STD_RING_PROD_IDX 0x00000098 /* 64-bit */ ++#define TG3PCI_RCV_RET_RING_CON_IDX 0x000000a0 /* 64-bit */ ++#define TG3PCI_SND_PROD_IDX 0x000000a8 /* 64-bit */ ++/* 0xb0 --> 0x100 unused */ ++ ++/* 0x100 --> 0x200 unused */ ++ ++/* Mailbox registers */ ++#define MAILBOX_INTERRUPT_0 0x00000200 /* 64-bit */ ++#define MAILBOX_INTERRUPT_1 0x00000208 /* 64-bit */ ++#define MAILBOX_INTERRUPT_2 0x00000210 /* 64-bit */ ++#define MAILBOX_INTERRUPT_3 0x00000218 /* 64-bit */ ++#define MAILBOX_GENERAL_0 0x00000220 /* 64-bit */ ++#define MAILBOX_GENERAL_1 0x00000228 /* 64-bit */ ++#define MAILBOX_GENERAL_2 0x00000230 /* 64-bit */ ++#define MAILBOX_GENERAL_3 0x00000238 /* 64-bit */ ++#define MAILBOX_GENERAL_4 0x00000240 /* 64-bit */ ++#define MAILBOX_GENERAL_5 0x00000248 /* 64-bit */ ++#define MAILBOX_GENERAL_6 0x00000250 /* 64-bit */ ++#define MAILBOX_GENERAL_7 0x00000258 /* 64-bit */ ++#define MAILBOX_RELOAD_STAT 0x00000260 /* 64-bit */ ++#define MAILBOX_RCV_STD_PROD_IDX 0x00000268 /* 64-bit */ ++#define MAILBOX_RCV_JUMBO_PROD_IDX 0x00000270 /* 64-bit */ ++#define MAILBOX_RCV_MINI_PROD_IDX 0x00000278 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_0 0x00000280 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_1 0x00000288 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_2 0x00000290 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_3 0x00000298 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_4 0x000002a0 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_5 0x000002a8 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_6 0x000002b0 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_7 0x000002b8 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_8 0x000002c0 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_9 0x000002c8 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_10 0x000002d0 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_11 0x000002d8 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_12 0x000002e0 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_13 0x000002e8 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_14 0x000002f0 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_15 0x000002f8 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_0 0x00000300 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_1 0x00000308 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_2 0x00000310 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_3 0x00000318 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_4 0x00000320 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_5 0x00000328 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_6 0x00000330 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_7 0x00000338 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_8 0x00000340 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_9 0x00000348 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_10 0x00000350 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_11 0x00000358 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_12 0x00000360 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_13 0x00000368 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_14 0x00000370 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_15 0x00000378 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_0 0x00000380 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_1 0x00000388 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_2 0x00000390 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_3 0x00000398 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_4 0x000003a0 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_5 0x000003a8 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_6 0x000003b0 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_7 0x000003b8 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_8 0x000003c0 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_9 0x000003c8 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_10 0x000003d0 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_11 0x000003d8 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_12 0x000003e0 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_13 0x000003e8 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_14 0x000003f0 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_15 0x000003f8 /* 64-bit */ ++ ++/* MAC control registers */ ++#define MAC_MODE 0x00000400 ++#define MAC_MODE_RESET 0x00000001 ++#define MAC_MODE_HALF_DUPLEX 0x00000002 ++#define MAC_MODE_PORT_MODE_MASK 0x0000000c ++#define MAC_MODE_PORT_MODE_TBI 0x0000000c ++#define MAC_MODE_PORT_MODE_GMII 0x00000008 ++#define MAC_MODE_PORT_MODE_MII 0x00000004 ++#define MAC_MODE_PORT_MODE_NONE 0x00000000 ++#define MAC_MODE_PORT_INT_LPBACK 0x00000010 ++#define MAC_MODE_TAGGED_MAC_CTRL 0x00000080 ++#define MAC_MODE_TX_BURSTING 0x00000100 ++#define MAC_MODE_MAX_DEFER 0x00000200 ++#define MAC_MODE_LINK_POLARITY 0x00000400 ++#define MAC_MODE_RXSTAT_ENABLE 0x00000800 ++#define MAC_MODE_RXSTAT_CLEAR 0x00001000 ++#define MAC_MODE_RXSTAT_FLUSH 0x00002000 ++#define MAC_MODE_TXSTAT_ENABLE 0x00004000 ++#define MAC_MODE_TXSTAT_CLEAR 0x00008000 ++#define MAC_MODE_TXSTAT_FLUSH 0x00010000 ++#define MAC_MODE_SEND_CONFIGS 0x00020000 ++#define MAC_MODE_MAGIC_PKT_ENABLE 0x00040000 ++#define MAC_MODE_ACPI_ENABLE 0x00080000 ++#define MAC_MODE_MIP_ENABLE 0x00100000 ++#define MAC_MODE_TDE_ENABLE 0x00200000 ++#define MAC_MODE_RDE_ENABLE 0x00400000 ++#define MAC_MODE_FHDE_ENABLE 0x00800000 ++#define MAC_STATUS 0x00000404 ++#define MAC_STATUS_PCS_SYNCED 0x00000001 ++#define MAC_STATUS_SIGNAL_DET 0x00000002 ++#define MAC_STATUS_RCVD_CFG 0x00000004 ++#define MAC_STATUS_CFG_CHANGED 0x00000008 ++#define MAC_STATUS_SYNC_CHANGED 0x00000010 ++#define MAC_STATUS_PORT_DEC_ERR 0x00000400 ++#define MAC_STATUS_LNKSTATE_CHANGED 0x00001000 ++#define MAC_STATUS_MI_COMPLETION 0x00400000 ++#define MAC_STATUS_MI_INTERRUPT 0x00800000 ++#define MAC_STATUS_AP_ERROR 0x01000000 ++#define MAC_STATUS_ODI_ERROR 0x02000000 ++#define MAC_STATUS_RXSTAT_OVERRUN 0x04000000 ++#define MAC_STATUS_TXSTAT_OVERRUN 0x08000000 ++#define MAC_EVENT 0x00000408 ++#define MAC_EVENT_PORT_DECODE_ERR 0x00000400 ++#define MAC_EVENT_LNKSTATE_CHANGED 0x00001000 ++#define MAC_EVENT_MI_COMPLETION 0x00400000 ++#define MAC_EVENT_MI_INTERRUPT 0x00800000 ++#define MAC_EVENT_AP_ERROR 0x01000000 ++#define MAC_EVENT_ODI_ERROR 0x02000000 ++#define MAC_EVENT_RXSTAT_OVERRUN 0x04000000 ++#define MAC_EVENT_TXSTAT_OVERRUN 0x08000000 ++#define MAC_LED_CTRL 0x0000040c ++#define LED_CTRL_LNKLED_OVERRIDE 0x00000001 ++#define LED_CTRL_1000MBPS_ON 0x00000002 ++#define LED_CTRL_100MBPS_ON 0x00000004 ++#define LED_CTRL_10MBPS_ON 0x00000008 ++#define LED_CTRL_TRAFFIC_OVERRIDE 0x00000010 ++#define LED_CTRL_TRAFFIC_BLINK 0x00000020 ++#define LED_CTRL_TRAFFIC_LED 0x00000040 ++#define LED_CTRL_1000MBPS_STATUS 0x00000080 ++#define LED_CTRL_100MBPS_STATUS 0x00000100 ++#define LED_CTRL_10MBPS_STATUS 0x00000200 ++#define LED_CTRL_TRAFFIC_STATUS 0x00000400 ++#define LED_CTRL_MAC_MODE 0x00000000 ++#define LED_CTRL_PHY_MODE_1 0x00000800 ++#define LED_CTRL_PHY_MODE_2 0x00001000 ++#define LED_CTRL_BLINK_RATE_MASK 0x7ff80000 ++#define LED_CTRL_BLINK_RATE_SHIFT 19 ++#define LED_CTRL_BLINK_PER_OVERRIDE 0x00080000 ++#define LED_CTRL_BLINK_RATE_OVERRIDE 0x80000000 ++#define MAC_ADDR_0_HIGH 0x00000410 /* upper 2 bytes */ ++#define MAC_ADDR_0_LOW 0x00000414 /* lower 4 bytes */ ++#define MAC_ADDR_1_HIGH 0x00000418 /* upper 2 bytes */ ++#define MAC_ADDR_1_LOW 0x0000041c /* lower 4 bytes */ ++#define MAC_ADDR_2_HIGH 0x00000420 /* upper 2 bytes */ ++#define MAC_ADDR_2_LOW 0x00000424 /* lower 4 bytes */ ++#define MAC_ADDR_3_HIGH 0x00000428 /* upper 2 bytes */ ++#define MAC_ADDR_3_LOW 0x0000042c /* lower 4 bytes */ ++#define MAC_ACPI_MBUF_PTR 0x00000430 ++#define MAC_ACPI_LEN_OFFSET 0x00000434 ++#define ACPI_LENOFF_LEN_MASK 0x0000ffff ++#define ACPI_LENOFF_LEN_SHIFT 0 ++#define ACPI_LENOFF_OFF_MASK 0x0fff0000 ++#define ACPI_LENOFF_OFF_SHIFT 16 ++#define MAC_TX_BACKOFF_SEED 0x00000438 ++#define TX_BACKOFF_SEED_MASK 0x000003ff ++#define MAC_RX_MTU_SIZE 0x0000043c ++#define RX_MTU_SIZE_MASK 0x0000ffff ++#define MAC_PCS_TEST 0x00000440 ++#define PCS_TEST_PATTERN_MASK 0x000fffff ++#define PCS_TEST_PATTERN_SHIFT 0 ++#define PCS_TEST_ENABLE 0x00100000 ++#define MAC_TX_AUTO_NEG 0x00000444 ++#define TX_AUTO_NEG_MASK 0x0000ffff ++#define TX_AUTO_NEG_SHIFT 0 ++#define MAC_RX_AUTO_NEG 0x00000448 ++#define RX_AUTO_NEG_MASK 0x0000ffff ++#define RX_AUTO_NEG_SHIFT 0 ++#define MAC_MI_COM 0x0000044c ++#define MI_COM_CMD_MASK 0x0c000000 ++#define MI_COM_CMD_WRITE 0x04000000 ++#define MI_COM_CMD_READ 0x08000000 ++#define MI_COM_READ_FAILED 0x10000000 ++#define MI_COM_START 0x20000000 ++#define MI_COM_BUSY 0x20000000 ++#define MI_COM_PHY_ADDR_MASK 0x03e00000 ++#define MI_COM_PHY_ADDR_SHIFT 21 ++#define MI_COM_REG_ADDR_MASK 0x001f0000 ++#define MI_COM_REG_ADDR_SHIFT 16 ++#define MI_COM_DATA_MASK 0x0000ffff ++#define MAC_MI_STAT 0x00000450 ++#define MAC_MI_STAT_LNKSTAT_ATTN_ENAB 0x00000001 ++#define MAC_MI_MODE 0x00000454 ++#define MAC_MI_MODE_CLK_10MHZ 0x00000001 ++#define MAC_MI_MODE_SHORT_PREAMBLE 0x00000002 ++#define MAC_MI_MODE_AUTO_POLL 0x00000010 ++#define MAC_MI_MODE_CORE_CLK_62MHZ 0x00008000 ++#define MAC_MI_MODE_BASE 0x000c0000 /* XXX magic values XXX */ ++#define MAC_AUTO_POLL_STATUS 0x00000458 ++#define MAC_AUTO_POLL_ERROR 0x00000001 ++#define MAC_TX_MODE 0x0000045c ++#define TX_MODE_RESET 0x00000001 ++#define TX_MODE_ENABLE 0x00000002 ++#define TX_MODE_FLOW_CTRL_ENABLE 0x00000010 ++#define TX_MODE_BIG_BCKOFF_ENABLE 0x00000020 ++#define TX_MODE_LONG_PAUSE_ENABLE 0x00000040 ++#define MAC_TX_STATUS 0x00000460 ++#define TX_STATUS_XOFFED 0x00000001 ++#define TX_STATUS_SENT_XOFF 0x00000002 ++#define TX_STATUS_SENT_XON 0x00000004 ++#define TX_STATUS_LINK_UP 0x00000008 ++#define TX_STATUS_ODI_UNDERRUN 0x00000010 ++#define TX_STATUS_ODI_OVERRUN 0x00000020 ++#define MAC_TX_LENGTHS 0x00000464 ++#define TX_LENGTHS_SLOT_TIME_MASK 0x000000ff ++#define TX_LENGTHS_SLOT_TIME_SHIFT 0 ++#define TX_LENGTHS_IPG_MASK 0x00000f00 ++#define TX_LENGTHS_IPG_SHIFT 8 ++#define TX_LENGTHS_IPG_CRS_MASK 0x00003000 ++#define TX_LENGTHS_IPG_CRS_SHIFT 12 ++#define MAC_RX_MODE 0x00000468 ++#define RX_MODE_RESET 0x00000001 ++#define RX_MODE_ENABLE 0x00000002 ++#define RX_MODE_FLOW_CTRL_ENABLE 0x00000004 ++#define RX_MODE_KEEP_MAC_CTRL 0x00000008 ++#define RX_MODE_KEEP_PAUSE 0x00000010 ++#define RX_MODE_ACCEPT_OVERSIZED 0x00000020 ++#define RX_MODE_ACCEPT_RUNTS 0x00000040 ++#define RX_MODE_LEN_CHECK 0x00000080 ++#define RX_MODE_PROMISC 0x00000100 ++#define RX_MODE_NO_CRC_CHECK 0x00000200 ++#define RX_MODE_KEEP_VLAN_TAG 0x00000400 ++#define MAC_RX_STATUS 0x0000046c ++#define RX_STATUS_REMOTE_TX_XOFFED 0x00000001 ++#define RX_STATUS_XOFF_RCVD 0x00000002 ++#define RX_STATUS_XON_RCVD 0x00000004 ++#define MAC_HASH_REG_0 0x00000470 ++#define MAC_HASH_REG_1 0x00000474 ++#define MAC_HASH_REG_2 0x00000478 ++#define MAC_HASH_REG_3 0x0000047c ++#define MAC_RCV_RULE_0 0x00000480 ++#define MAC_RCV_VALUE_0 0x00000484 ++#define MAC_RCV_RULE_1 0x00000488 ++#define MAC_RCV_VALUE_1 0x0000048c ++#define MAC_RCV_RULE_2 0x00000490 ++#define MAC_RCV_VALUE_2 0x00000494 ++#define MAC_RCV_RULE_3 0x00000498 ++#define MAC_RCV_VALUE_3 0x0000049c ++#define MAC_RCV_RULE_4 0x000004a0 ++#define MAC_RCV_VALUE_4 0x000004a4 ++#define MAC_RCV_RULE_5 0x000004a8 ++#define MAC_RCV_VALUE_5 0x000004ac ++#define MAC_RCV_RULE_6 0x000004b0 ++#define MAC_RCV_VALUE_6 0x000004b4 ++#define MAC_RCV_RULE_7 0x000004b8 ++#define MAC_RCV_VALUE_7 0x000004bc ++#define MAC_RCV_RULE_8 0x000004c0 ++#define MAC_RCV_VALUE_8 0x000004c4 ++#define MAC_RCV_RULE_9 0x000004c8 ++#define MAC_RCV_VALUE_9 0x000004cc ++#define MAC_RCV_RULE_10 0x000004d0 ++#define MAC_RCV_VALUE_10 0x000004d4 ++#define MAC_RCV_RULE_11 0x000004d8 ++#define MAC_RCV_VALUE_11 0x000004dc ++#define MAC_RCV_RULE_12 0x000004e0 ++#define MAC_RCV_VALUE_12 0x000004e4 ++#define MAC_RCV_RULE_13 0x000004e8 ++#define MAC_RCV_VALUE_13 0x000004ec ++#define MAC_RCV_RULE_14 0x000004f0 ++#define MAC_RCV_VALUE_14 0x000004f4 ++#define MAC_RCV_RULE_15 0x000004f8 ++#define MAC_RCV_VALUE_15 0x000004fc ++#define RCV_RULE_DISABLE_MASK 0x7fffffff ++#define MAC_RCV_RULE_CFG 0x00000500 ++#define RCV_RULE_CFG_DEFAULT_CLASS 0x00000008 ++#define MAC_LOW_WMARK_MAX_RX_FRAME 0x00000504 ++/* 0x508 --> 0x520 unused */ ++#define MAC_HASHREGU_0 0x00000520 ++#define MAC_HASHREGU_1 0x00000524 ++#define MAC_HASHREGU_2 0x00000528 ++#define MAC_HASHREGU_3 0x0000052c ++#define MAC_EXTADDR_0_HIGH 0x00000530 ++#define MAC_EXTADDR_0_LOW 0x00000534 ++#define MAC_EXTADDR_1_HIGH 0x00000538 ++#define MAC_EXTADDR_1_LOW 0x0000053c ++#define MAC_EXTADDR_2_HIGH 0x00000540 ++#define MAC_EXTADDR_2_LOW 0x00000544 ++#define MAC_EXTADDR_3_HIGH 0x00000548 ++#define MAC_EXTADDR_3_LOW 0x0000054c ++#define MAC_EXTADDR_4_HIGH 0x00000550 ++#define MAC_EXTADDR_4_LOW 0x00000554 ++#define MAC_EXTADDR_5_HIGH 0x00000558 ++#define MAC_EXTADDR_5_LOW 0x0000055c ++#define MAC_EXTADDR_6_HIGH 0x00000560 ++#define MAC_EXTADDR_6_LOW 0x00000564 ++#define MAC_EXTADDR_7_HIGH 0x00000568 ++#define MAC_EXTADDR_7_LOW 0x0000056c ++#define MAC_EXTADDR_8_HIGH 0x00000570 ++#define MAC_EXTADDR_8_LOW 0x00000574 ++#define MAC_EXTADDR_9_HIGH 0x00000578 ++#define MAC_EXTADDR_9_LOW 0x0000057c ++#define MAC_EXTADDR_10_HIGH 0x00000580 ++#define MAC_EXTADDR_10_LOW 0x00000584 ++#define MAC_EXTADDR_11_HIGH 0x00000588 ++#define MAC_EXTADDR_11_LOW 0x0000058c ++#define MAC_SERDES_CFG 0x00000590 ++#define MAC_SERDES_STAT 0x00000594 ++/* 0x598 --> 0x600 unused */ ++#define MAC_TX_MAC_STATE_BASE 0x00000600 /* 16 bytes */ ++#define MAC_RX_MAC_STATE_BASE 0x00000610 /* 20 bytes */ ++/* 0x624 --> 0x800 unused */ ++#define MAC_TX_STATS_OCTETS 0x00000800 ++#define MAC_TX_STATS_RESV1 0x00000804 ++#define MAC_TX_STATS_COLLISIONS 0x00000808 ++#define MAC_TX_STATS_XON_SENT 0x0000080c ++#define MAC_TX_STATS_XOFF_SENT 0x00000810 ++#define MAC_TX_STATS_RESV2 0x00000814 ++#define MAC_TX_STATS_MAC_ERRORS 0x00000818 ++#define MAC_TX_STATS_SINGLE_COLLISIONS 0x0000081c ++#define MAC_TX_STATS_MULT_COLLISIONS 0x00000820 ++#define MAC_TX_STATS_DEFERRED 0x00000824 ++#define MAC_TX_STATS_RESV3 0x00000828 ++#define MAC_TX_STATS_EXCESSIVE_COL 0x0000082c ++#define MAC_TX_STATS_LATE_COL 0x00000830 ++#define MAC_TX_STATS_RESV4_1 0x00000834 ++#define MAC_TX_STATS_RESV4_2 0x00000838 ++#define MAC_TX_STATS_RESV4_3 0x0000083c ++#define MAC_TX_STATS_RESV4_4 0x00000840 ++#define MAC_TX_STATS_RESV4_5 0x00000844 ++#define MAC_TX_STATS_RESV4_6 0x00000848 ++#define MAC_TX_STATS_RESV4_7 0x0000084c ++#define MAC_TX_STATS_RESV4_8 0x00000850 ++#define MAC_TX_STATS_RESV4_9 0x00000854 ++#define MAC_TX_STATS_RESV4_10 0x00000858 ++#define MAC_TX_STATS_RESV4_11 0x0000085c ++#define MAC_TX_STATS_RESV4_12 0x00000860 ++#define MAC_TX_STATS_RESV4_13 0x00000864 ++#define MAC_TX_STATS_RESV4_14 0x00000868 ++#define MAC_TX_STATS_UCAST 0x0000086c ++#define MAC_TX_STATS_MCAST 0x00000870 ++#define MAC_TX_STATS_BCAST 0x00000874 ++#define MAC_TX_STATS_RESV5_1 0x00000878 ++#define MAC_TX_STATS_RESV5_2 0x0000087c ++#define MAC_RX_STATS_OCTETS 0x00000880 ++#define MAC_RX_STATS_RESV1 0x00000884 ++#define MAC_RX_STATS_FRAGMENTS 0x00000888 ++#define MAC_RX_STATS_UCAST 0x0000088c ++#define MAC_RX_STATS_MCAST 0x00000890 ++#define MAC_RX_STATS_BCAST 0x00000894 ++#define MAC_RX_STATS_FCS_ERRORS 0x00000898 ++#define MAC_RX_STATS_ALIGN_ERRORS 0x0000089c ++#define MAC_RX_STATS_XON_PAUSE_RECVD 0x000008a0 ++#define MAC_RX_STATS_XOFF_PAUSE_RECVD 0x000008a4 ++#define MAC_RX_STATS_MAC_CTRL_RECVD 0x000008a8 ++#define MAC_RX_STATS_XOFF_ENTERED 0x000008ac ++#define MAC_RX_STATS_FRAME_TOO_LONG 0x000008b0 ++#define MAC_RX_STATS_JABBERS 0x000008b4 ++#define MAC_RX_STATS_UNDERSIZE 0x000008b8 ++/* 0x8bc --> 0xc00 unused */ ++ ++/* Send data initiator control registers */ ++#define SNDDATAI_MODE 0x00000c00 ++#define SNDDATAI_MODE_RESET 0x00000001 ++#define SNDDATAI_MODE_ENABLE 0x00000002 ++#define SNDDATAI_MODE_STAT_OFLOW_ENAB 0x00000004 ++#define SNDDATAI_STATUS 0x00000c04 ++#define SNDDATAI_STATUS_STAT_OFLOW 0x00000004 ++#define SNDDATAI_STATSCTRL 0x00000c08 ++#define SNDDATAI_SCTRL_ENABLE 0x00000001 ++#define SNDDATAI_SCTRL_FASTUPD 0x00000002 ++#define SNDDATAI_SCTRL_CLEAR 0x00000004 ++#define SNDDATAI_SCTRL_FLUSH 0x00000008 ++#define SNDDATAI_SCTRL_FORCE_ZERO 0x00000010 ++#define SNDDATAI_STATSENAB 0x00000c0c ++#define SNDDATAI_STATSINCMASK 0x00000c10 ++/* 0xc14 --> 0xc80 unused */ ++#define SNDDATAI_COS_CNT_0 0x00000c80 ++#define SNDDATAI_COS_CNT_1 0x00000c84 ++#define SNDDATAI_COS_CNT_2 0x00000c88 ++#define SNDDATAI_COS_CNT_3 0x00000c8c ++#define SNDDATAI_COS_CNT_4 0x00000c90 ++#define SNDDATAI_COS_CNT_5 0x00000c94 ++#define SNDDATAI_COS_CNT_6 0x00000c98 ++#define SNDDATAI_COS_CNT_7 0x00000c9c ++#define SNDDATAI_COS_CNT_8 0x00000ca0 ++#define SNDDATAI_COS_CNT_9 0x00000ca4 ++#define SNDDATAI_COS_CNT_10 0x00000ca8 ++#define SNDDATAI_COS_CNT_11 0x00000cac ++#define SNDDATAI_COS_CNT_12 0x00000cb0 ++#define SNDDATAI_COS_CNT_13 0x00000cb4 ++#define SNDDATAI_COS_CNT_14 0x00000cb8 ++#define SNDDATAI_COS_CNT_15 0x00000cbc ++#define SNDDATAI_DMA_RDQ_FULL_CNT 0x00000cc0 ++#define SNDDATAI_DMA_PRIO_RDQ_FULL_CNT 0x00000cc4 ++#define SNDDATAI_SDCQ_FULL_CNT 0x00000cc8 ++#define SNDDATAI_NICRNG_SSND_PIDX_CNT 0x00000ccc ++#define SNDDATAI_STATS_UPDATED_CNT 0x00000cd0 ++#define SNDDATAI_INTERRUPTS_CNT 0x00000cd4 ++#define SNDDATAI_AVOID_INTERRUPTS_CNT 0x00000cd8 ++#define SNDDATAI_SND_THRESH_HIT_CNT 0x00000cdc ++/* 0xce0 --> 0x1000 unused */ ++ ++/* Send data completion control registers */ ++#define SNDDATAC_MODE 0x00001000 ++#define SNDDATAC_MODE_RESET 0x00000001 ++#define SNDDATAC_MODE_ENABLE 0x00000002 ++/* 0x1004 --> 0x1400 unused */ ++ ++/* Send BD ring selector */ ++#define SNDBDS_MODE 0x00001400 ++#define SNDBDS_MODE_RESET 0x00000001 ++#define SNDBDS_MODE_ENABLE 0x00000002 ++#define SNDBDS_MODE_ATTN_ENABLE 0x00000004 ++#define SNDBDS_STATUS 0x00001404 ++#define SNDBDS_STATUS_ERROR_ATTN 0x00000004 ++#define SNDBDS_HWDIAG 0x00001408 ++/* 0x140c --> 0x1440 */ ++#define SNDBDS_SEL_CON_IDX_0 0x00001440 ++#define SNDBDS_SEL_CON_IDX_1 0x00001444 ++#define SNDBDS_SEL_CON_IDX_2 0x00001448 ++#define SNDBDS_SEL_CON_IDX_3 0x0000144c ++#define SNDBDS_SEL_CON_IDX_4 0x00001450 ++#define SNDBDS_SEL_CON_IDX_5 0x00001454 ++#define SNDBDS_SEL_CON_IDX_6 0x00001458 ++#define SNDBDS_SEL_CON_IDX_7 0x0000145c ++#define SNDBDS_SEL_CON_IDX_8 0x00001460 ++#define SNDBDS_SEL_CON_IDX_9 0x00001464 ++#define SNDBDS_SEL_CON_IDX_10 0x00001468 ++#define SNDBDS_SEL_CON_IDX_11 0x0000146c ++#define SNDBDS_SEL_CON_IDX_12 0x00001470 ++#define SNDBDS_SEL_CON_IDX_13 0x00001474 ++#define SNDBDS_SEL_CON_IDX_14 0x00001478 ++#define SNDBDS_SEL_CON_IDX_15 0x0000147c ++/* 0x1480 --> 0x1800 unused */ ++ ++/* Send BD initiator control registers */ ++#define SNDBDI_MODE 0x00001800 ++#define SNDBDI_MODE_RESET 0x00000001 ++#define SNDBDI_MODE_ENABLE 0x00000002 ++#define SNDBDI_MODE_ATTN_ENABLE 0x00000004 ++#define SNDBDI_STATUS 0x00001804 ++#define SNDBDI_STATUS_ERROR_ATTN 0x00000004 ++#define SNDBDI_IN_PROD_IDX_0 0x00001808 ++#define SNDBDI_IN_PROD_IDX_1 0x0000180c ++#define SNDBDI_IN_PROD_IDX_2 0x00001810 ++#define SNDBDI_IN_PROD_IDX_3 0x00001814 ++#define SNDBDI_IN_PROD_IDX_4 0x00001818 ++#define SNDBDI_IN_PROD_IDX_5 0x0000181c ++#define SNDBDI_IN_PROD_IDX_6 0x00001820 ++#define SNDBDI_IN_PROD_IDX_7 0x00001824 ++#define SNDBDI_IN_PROD_IDX_8 0x00001828 ++#define SNDBDI_IN_PROD_IDX_9 0x0000182c ++#define SNDBDI_IN_PROD_IDX_10 0x00001830 ++#define SNDBDI_IN_PROD_IDX_11 0x00001834 ++#define SNDBDI_IN_PROD_IDX_12 0x00001838 ++#define SNDBDI_IN_PROD_IDX_13 0x0000183c ++#define SNDBDI_IN_PROD_IDX_14 0x00001840 ++#define SNDBDI_IN_PROD_IDX_15 0x00001844 ++/* 0x1848 --> 0x1c00 unused */ ++ ++/* Send BD completion control registers */ ++#define SNDBDC_MODE 0x00001c00 ++#define SNDBDC_MODE_RESET 0x00000001 ++#define SNDBDC_MODE_ENABLE 0x00000002 ++#define SNDBDC_MODE_ATTN_ENABLE 0x00000004 ++/* 0x1c04 --> 0x2000 unused */ ++ ++/* Receive list placement control registers */ ++#define RCVLPC_MODE 0x00002000 ++#define RCVLPC_MODE_RESET 0x00000001 ++#define RCVLPC_MODE_ENABLE 0x00000002 ++#define RCVLPC_MODE_CLASS0_ATTN_ENAB 0x00000004 ++#define RCVLPC_MODE_MAPOOR_AATTN_ENAB 0x00000008 ++#define RCVLPC_MODE_STAT_OFLOW_ENAB 0x00000010 ++#define RCVLPC_STATUS 0x00002004 ++#define RCVLPC_STATUS_CLASS0 0x00000004 ++#define RCVLPC_STATUS_MAPOOR 0x00000008 ++#define RCVLPC_STATUS_STAT_OFLOW 0x00000010 ++#define RCVLPC_LOCK 0x00002008 ++#define RCVLPC_LOCK_REQ_MASK 0x0000ffff ++#define RCVLPC_LOCK_REQ_SHIFT 0 ++#define RCVLPC_LOCK_GRANT_MASK 0xffff0000 ++#define RCVLPC_LOCK_GRANT_SHIFT 16 ++#define RCVLPC_NON_EMPTY_BITS 0x0000200c ++#define RCVLPC_NON_EMPTY_BITS_MASK 0x0000ffff ++#define RCVLPC_CONFIG 0x00002010 ++#define RCVLPC_STATSCTRL 0x00002014 ++#define RCVLPC_STATSCTRL_ENABLE 0x00000001 ++#define RCVLPC_STATSCTRL_FASTUPD 0x00000002 ++#define RCVLPC_STATS_ENABLE 0x00002018 ++#define RCVLPC_STATSENAB_LNGBRST_RFIX 0x00400000 ++#define RCVLPC_STATS_INCMASK 0x0000201c ++/* 0x2020 --> 0x2100 unused */ ++#define RCVLPC_SELLST_BASE 0x00002100 /* 16 16-byte entries */ ++#define SELLST_TAIL 0x00000004 ++#define SELLST_CONT 0x00000008 ++#define SELLST_UNUSED 0x0000000c ++#define RCVLPC_COS_CNTL_BASE 0x00002200 /* 16 4-byte entries */ ++#define RCVLPC_DROP_FILTER_CNT 0x00002240 ++#define RCVLPC_DMA_WQ_FULL_CNT 0x00002244 ++#define RCVLPC_DMA_HIPRIO_WQ_FULL_CNT 0x00002248 ++#define RCVLPC_NO_RCV_BD_CNT 0x0000224c ++#define RCVLPC_IN_DISCARDS_CNT 0x00002250 ++#define RCVLPC_IN_ERRORS_CNT 0x00002254 ++#define RCVLPC_RCV_THRESH_HIT_CNT 0x00002258 ++/* 0x225c --> 0x2400 unused */ ++ ++/* Receive Data and Receive BD Initiator Control */ ++#define RCVDBDI_MODE 0x00002400 ++#define RCVDBDI_MODE_RESET 0x00000001 ++#define RCVDBDI_MODE_ENABLE 0x00000002 ++#define RCVDBDI_MODE_JUMBOBD_NEEDED 0x00000004 ++#define RCVDBDI_MODE_FRM_TOO_BIG 0x00000008 ++#define RCVDBDI_MODE_INV_RING_SZ 0x00000010 ++#define RCVDBDI_STATUS 0x00002404 ++#define RCVDBDI_STATUS_JUMBOBD_NEEDED 0x00000004 ++#define RCVDBDI_STATUS_FRM_TOO_BIG 0x00000008 ++#define RCVDBDI_STATUS_INV_RING_SZ 0x00000010 ++#define RCVDBDI_SPLIT_FRAME_MINSZ 0x00002408 ++/* 0x240c --> 0x2440 unused */ ++#define RCVDBDI_JUMBO_BD 0x00002440 /* TG3_BDINFO_... */ ++#define RCVDBDI_STD_BD 0x00002450 /* TG3_BDINFO_... */ ++#define RCVDBDI_MINI_BD 0x00002460 /* TG3_BDINFO_... */ ++#define RCVDBDI_JUMBO_CON_IDX 0x00002470 ++#define RCVDBDI_STD_CON_IDX 0x00002474 ++#define RCVDBDI_MINI_CON_IDX 0x00002478 ++/* 0x247c --> 0x2480 unused */ ++#define RCVDBDI_BD_PROD_IDX_0 0x00002480 ++#define RCVDBDI_BD_PROD_IDX_1 0x00002484 ++#define RCVDBDI_BD_PROD_IDX_2 0x00002488 ++#define RCVDBDI_BD_PROD_IDX_3 0x0000248c ++#define RCVDBDI_BD_PROD_IDX_4 0x00002490 ++#define RCVDBDI_BD_PROD_IDX_5 0x00002494 ++#define RCVDBDI_BD_PROD_IDX_6 0x00002498 ++#define RCVDBDI_BD_PROD_IDX_7 0x0000249c ++#define RCVDBDI_BD_PROD_IDX_8 0x000024a0 ++#define RCVDBDI_BD_PROD_IDX_9 0x000024a4 ++#define RCVDBDI_BD_PROD_IDX_10 0x000024a8 ++#define RCVDBDI_BD_PROD_IDX_11 0x000024ac ++#define RCVDBDI_BD_PROD_IDX_12 0x000024b0 ++#define RCVDBDI_BD_PROD_IDX_13 0x000024b4 ++#define RCVDBDI_BD_PROD_IDX_14 0x000024b8 ++#define RCVDBDI_BD_PROD_IDX_15 0x000024bc ++#define RCVDBDI_HWDIAG 0x000024c0 ++/* 0x24c4 --> 0x2800 unused */ ++ ++/* Receive Data Completion Control */ ++#define RCVDCC_MODE 0x00002800 ++#define RCVDCC_MODE_RESET 0x00000001 ++#define RCVDCC_MODE_ENABLE 0x00000002 ++#define RCVDCC_MODE_ATTN_ENABLE 0x00000004 ++/* 0x2804 --> 0x2c00 unused */ ++ ++/* Receive BD Initiator Control Registers */ ++#define RCVBDI_MODE 0x00002c00 ++#define RCVBDI_MODE_RESET 0x00000001 ++#define RCVBDI_MODE_ENABLE 0x00000002 ++#define RCVBDI_MODE_RCB_ATTN_ENAB 0x00000004 ++#define RCVBDI_STATUS 0x00002c04 ++#define RCVBDI_STATUS_RCB_ATTN 0x00000004 ++#define RCVBDI_JUMBO_PROD_IDX 0x00002c08 ++#define RCVBDI_STD_PROD_IDX 0x00002c0c ++#define RCVBDI_MINI_PROD_IDX 0x00002c10 ++#define RCVBDI_MINI_THRESH 0x00002c14 ++#define RCVBDI_STD_THRESH 0x00002c18 ++#define RCVBDI_JUMBO_THRESH 0x00002c1c ++/* 0x2c20 --> 0x3000 unused */ ++ ++/* Receive BD Completion Control Registers */ ++#define RCVCC_MODE 0x00003000 ++#define RCVCC_MODE_RESET 0x00000001 ++#define RCVCC_MODE_ENABLE 0x00000002 ++#define RCVCC_MODE_ATTN_ENABLE 0x00000004 ++#define RCVCC_STATUS 0x00003004 ++#define RCVCC_STATUS_ERROR_ATTN 0x00000004 ++#define RCVCC_JUMP_PROD_IDX 0x00003008 ++#define RCVCC_STD_PROD_IDX 0x0000300c ++#define RCVCC_MINI_PROD_IDX 0x00003010 ++/* 0x3014 --> 0x3400 unused */ ++ ++/* Receive list selector control registers */ ++#define RCVLSC_MODE 0x00003400 ++#define RCVLSC_MODE_RESET 0x00000001 ++#define RCVLSC_MODE_ENABLE 0x00000002 ++#define RCVLSC_MODE_ATTN_ENABLE 0x00000004 ++#define RCVLSC_STATUS 0x00003404 ++#define RCVLSC_STATUS_ERROR_ATTN 0x00000004 ++/* 0x3408 --> 0x3800 unused */ ++ ++/* Mbuf cluster free registers */ ++#define MBFREE_MODE 0x00003800 ++#define MBFREE_MODE_RESET 0x00000001 ++#define MBFREE_MODE_ENABLE 0x00000002 ++#define MBFREE_STATUS 0x00003804 ++/* 0x3808 --> 0x3c00 unused */ ++ ++/* Host coalescing control registers */ ++#define HOSTCC_MODE 0x00003c00 ++#define HOSTCC_MODE_RESET 0x00000001 ++#define HOSTCC_MODE_ENABLE 0x00000002 ++#define HOSTCC_MODE_ATTN 0x00000004 ++#define HOSTCC_MODE_NOW 0x00000008 ++#define HOSTCC_MODE_FULL_STATUS 0x00000000 ++#define HOSTCC_MODE_64BYTE 0x00000080 ++#define HOSTCC_MODE_32BYTE 0x00000100 ++#define HOSTCC_MODE_CLRTICK_RXBD 0x00000200 ++#define HOSTCC_MODE_CLRTICK_TXBD 0x00000400 ++#define HOSTCC_MODE_NOINT_ON_NOW 0x00000800 ++#define HOSTCC_MODE_NOINT_ON_FORCE 0x00001000 ++#define HOSTCC_STATUS 0x00003c04 ++#define HOSTCC_STATUS_ERROR_ATTN 0x00000004 ++#define HOSTCC_RXCOL_TICKS 0x00003c08 ++#define LOW_RXCOL_TICKS 0x00000032 ++#define DEFAULT_RXCOL_TICKS 0x00000048 ++#define HIGH_RXCOL_TICKS 0x00000096 ++#define HOSTCC_TXCOL_TICKS 0x00003c0c ++#define LOW_TXCOL_TICKS 0x00000096 ++#define DEFAULT_TXCOL_TICKS 0x0000012c ++#define HIGH_TXCOL_TICKS 0x00000145 ++#define HOSTCC_RXMAX_FRAMES 0x00003c10 ++#define LOW_RXMAX_FRAMES 0x00000005 ++#define DEFAULT_RXMAX_FRAMES 0x00000008 ++#define HIGH_RXMAX_FRAMES 0x00000012 ++#define HOSTCC_TXMAX_FRAMES 0x00003c14 ++#define LOW_TXMAX_FRAMES 0x00000035 ++#define DEFAULT_TXMAX_FRAMES 0x0000004b ++#define HIGH_TXMAX_FRAMES 0x00000052 ++#define HOSTCC_RXCOAL_TICK_INT 0x00003c18 ++#define DEFAULT_RXCOAL_TICK_INT 0x00000019 ++#define HOSTCC_TXCOAL_TICK_INT 0x00003c1c ++#define DEFAULT_TXCOAL_TICK_INT 0x00000019 ++#define HOSTCC_RXCOAL_MAXF_INT 0x00003c20 ++#define DEFAULT_RXCOAL_MAXF_INT 0x00000005 ++#define HOSTCC_TXCOAL_MAXF_INT 0x00003c24 ++#define DEFAULT_TXCOAL_MAXF_INT 0x00000005 ++#define HOSTCC_STAT_COAL_TICKS 0x00003c28 ++#define DEFAULT_STAT_COAL_TICKS 0x000f4240 ++/* 0x3c2c --> 0x3c30 unused */ ++#define HOSTCC_STATS_BLK_HOST_ADDR 0x00003c30 /* 64-bit */ ++#define HOSTCC_STATUS_BLK_HOST_ADDR 0x00003c38 /* 64-bit */ ++#define HOSTCC_STATS_BLK_NIC_ADDR 0x00003c40 ++#define HOSTCC_STATUS_BLK_NIC_ADDR 0x00003c44 ++#define HOSTCC_FLOW_ATTN 0x00003c48 ++/* 0x3c4c --> 0x3c50 unused */ ++#define HOSTCC_JUMBO_CON_IDX 0x00003c50 ++#define HOSTCC_STD_CON_IDX 0x00003c54 ++#define HOSTCC_MINI_CON_IDX 0x00003c58 ++/* 0x3c5c --> 0x3c80 unused */ ++#define HOSTCC_RET_PROD_IDX_0 0x00003c80 ++#define HOSTCC_RET_PROD_IDX_1 0x00003c84 ++#define HOSTCC_RET_PROD_IDX_2 0x00003c88 ++#define HOSTCC_RET_PROD_IDX_3 0x00003c8c ++#define HOSTCC_RET_PROD_IDX_4 0x00003c90 ++#define HOSTCC_RET_PROD_IDX_5 0x00003c94 ++#define HOSTCC_RET_PROD_IDX_6 0x00003c98 ++#define HOSTCC_RET_PROD_IDX_7 0x00003c9c ++#define HOSTCC_RET_PROD_IDX_8 0x00003ca0 ++#define HOSTCC_RET_PROD_IDX_9 0x00003ca4 ++#define HOSTCC_RET_PROD_IDX_10 0x00003ca8 ++#define HOSTCC_RET_PROD_IDX_11 0x00003cac ++#define HOSTCC_RET_PROD_IDX_12 0x00003cb0 ++#define HOSTCC_RET_PROD_IDX_13 0x00003cb4 ++#define HOSTCC_RET_PROD_IDX_14 0x00003cb8 ++#define HOSTCC_RET_PROD_IDX_15 0x00003cbc ++#define HOSTCC_SND_CON_IDX_0 0x00003cc0 ++#define HOSTCC_SND_CON_IDX_1 0x00003cc4 ++#define HOSTCC_SND_CON_IDX_2 0x00003cc8 ++#define HOSTCC_SND_CON_IDX_3 0x00003ccc ++#define HOSTCC_SND_CON_IDX_4 0x00003cd0 ++#define HOSTCC_SND_CON_IDX_5 0x00003cd4 ++#define HOSTCC_SND_CON_IDX_6 0x00003cd8 ++#define HOSTCC_SND_CON_IDX_7 0x00003cdc ++#define HOSTCC_SND_CON_IDX_8 0x00003ce0 ++#define HOSTCC_SND_CON_IDX_9 0x00003ce4 ++#define HOSTCC_SND_CON_IDX_10 0x00003ce8 ++#define HOSTCC_SND_CON_IDX_11 0x00003cec ++#define HOSTCC_SND_CON_IDX_12 0x00003cf0 ++#define HOSTCC_SND_CON_IDX_13 0x00003cf4 ++#define HOSTCC_SND_CON_IDX_14 0x00003cf8 ++#define HOSTCC_SND_CON_IDX_15 0x00003cfc ++/* 0x3d00 --> 0x4000 unused */ ++ ++/* Memory arbiter control registers */ ++#define MEMARB_MODE 0x00004000 ++#define MEMARB_MODE_RESET 0x00000001 ++#define MEMARB_MODE_ENABLE 0x00000002 ++#define MEMARB_STATUS 0x00004004 ++#define MEMARB_TRAP_ADDR_LOW 0x00004008 ++#define MEMARB_TRAP_ADDR_HIGH 0x0000400c ++/* 0x4010 --> 0x4400 unused */ ++ ++/* Buffer manager control registers */ ++#define BUFMGR_MODE 0x00004400 ++#define BUFMGR_MODE_RESET 0x00000001 ++#define BUFMGR_MODE_ENABLE 0x00000002 ++#define BUFMGR_MODE_ATTN_ENABLE 0x00000004 ++#define BUFMGR_MODE_BM_TEST 0x00000008 ++#define BUFMGR_MODE_MBLOW_ATTN_ENAB 0x00000010 ++#define BUFMGR_STATUS 0x00004404 ++#define BUFMGR_STATUS_ERROR 0x00000004 ++#define BUFMGR_STATUS_MBLOW 0x00000010 ++#define BUFMGR_MB_POOL_ADDR 0x00004408 ++#define BUFMGR_MB_POOL_SIZE 0x0000440c ++#define BUFMGR_MB_RDMA_LOW_WATER 0x00004410 ++#define DEFAULT_MB_RDMA_LOW_WATER 0x00000050 ++#define DEFAULT_MB_RDMA_LOW_WATER_5705 0x00000000 ++#define DEFAULT_MB_RDMA_LOW_WATER_JUMBO 0x00000130 ++#define BUFMGR_MB_MACRX_LOW_WATER 0x00004414 ++#define DEFAULT_MB_MACRX_LOW_WATER 0x00000020 ++#define DEFAULT_MB_MACRX_LOW_WATER_5705 0x00000010 ++#define DEFAULT_MB_MACRX_LOW_WATER_JUMBO 0x00000098 ++#define BUFMGR_MB_HIGH_WATER 0x00004418 ++#define DEFAULT_MB_HIGH_WATER 0x00000060 ++#define DEFAULT_MB_HIGH_WATER_5705 0x00000060 ++#define DEFAULT_MB_HIGH_WATER_JUMBO 0x0000017c ++#define BUFMGR_RX_MB_ALLOC_REQ 0x0000441c ++#define BUFMGR_MB_ALLOC_BIT 0x10000000 ++#define BUFMGR_RX_MB_ALLOC_RESP 0x00004420 ++#define BUFMGR_TX_MB_ALLOC_REQ 0x00004424 ++#define BUFMGR_TX_MB_ALLOC_RESP 0x00004428 ++#define BUFMGR_DMA_DESC_POOL_ADDR 0x0000442c ++#define BUFMGR_DMA_DESC_POOL_SIZE 0x00004430 ++#define BUFMGR_DMA_LOW_WATER 0x00004434 ++#define DEFAULT_DMA_LOW_WATER 0x00000005 ++#define BUFMGR_DMA_HIGH_WATER 0x00004438 ++#define DEFAULT_DMA_HIGH_WATER 0x0000000a ++#define BUFMGR_RX_DMA_ALLOC_REQ 0x0000443c ++#define BUFMGR_RX_DMA_ALLOC_RESP 0x00004440 ++#define BUFMGR_TX_DMA_ALLOC_REQ 0x00004444 ++#define BUFMGR_TX_DMA_ALLOC_RESP 0x00004448 ++#define BUFMGR_HWDIAG_0 0x0000444c ++#define BUFMGR_HWDIAG_1 0x00004450 ++#define BUFMGR_HWDIAG_2 0x00004454 ++/* 0x4458 --> 0x4800 unused */ ++ ++/* Read DMA control registers */ ++#define RDMAC_MODE 0x00004800 ++#define RDMAC_MODE_RESET 0x00000001 ++#define RDMAC_MODE_ENABLE 0x00000002 ++#define RDMAC_MODE_TGTABORT_ENAB 0x00000004 ++#define RDMAC_MODE_MSTABORT_ENAB 0x00000008 ++#define RDMAC_MODE_PARITYERR_ENAB 0x00000010 ++#define RDMAC_MODE_ADDROFLOW_ENAB 0x00000020 ++#define RDMAC_MODE_FIFOOFLOW_ENAB 0x00000040 ++#define RDMAC_MODE_FIFOURUN_ENAB 0x00000080 ++#define RDMAC_MODE_FIFOOREAD_ENAB 0x00000100 ++#define RDMAC_MODE_LNGREAD_ENAB 0x00000200 ++#define RDMAC_MODE_SPLIT_ENABLE 0x00000800 ++#define RDMAC_MODE_SPLIT_RESET 0x00001000 ++#define RDMAC_MODE_FIFO_SIZE_128 0x00020000 ++#define RDMAC_MODE_FIFO_LONG_BURST 0x00030000 ++#define RDMAC_STATUS 0x00004804 ++#define RDMAC_STATUS_TGTABORT 0x00000004 ++#define RDMAC_STATUS_MSTABORT 0x00000008 ++#define RDMAC_STATUS_PARITYERR 0x00000010 ++#define RDMAC_STATUS_ADDROFLOW 0x00000020 ++#define RDMAC_STATUS_FIFOOFLOW 0x00000040 ++#define RDMAC_STATUS_FIFOURUN 0x00000080 ++#define RDMAC_STATUS_FIFOOREAD 0x00000100 ++#define RDMAC_STATUS_LNGREAD 0x00000200 ++/* 0x4808 --> 0x4c00 unused */ ++ ++/* Write DMA control registers */ ++#define WDMAC_MODE 0x00004c00 ++#define WDMAC_MODE_RESET 0x00000001 ++#define WDMAC_MODE_ENABLE 0x00000002 ++#define WDMAC_MODE_TGTABORT_ENAB 0x00000004 ++#define WDMAC_MODE_MSTABORT_ENAB 0x00000008 ++#define WDMAC_MODE_PARITYERR_ENAB 0x00000010 ++#define WDMAC_MODE_ADDROFLOW_ENAB 0x00000020 ++#define WDMAC_MODE_FIFOOFLOW_ENAB 0x00000040 ++#define WDMAC_MODE_FIFOURUN_ENAB 0x00000080 ++#define WDMAC_MODE_FIFOOREAD_ENAB 0x00000100 ++#define WDMAC_MODE_LNGREAD_ENAB 0x00000200 ++#define WDMAC_MODE_RX_ACCEL 0x00000400 ++#define WDMAC_STATUS 0x00004c04 ++#define WDMAC_STATUS_TGTABORT 0x00000004 ++#define WDMAC_STATUS_MSTABORT 0x00000008 ++#define WDMAC_STATUS_PARITYERR 0x00000010 ++#define WDMAC_STATUS_ADDROFLOW 0x00000020 ++#define WDMAC_STATUS_FIFOOFLOW 0x00000040 ++#define WDMAC_STATUS_FIFOURUN 0x00000080 ++#define WDMAC_STATUS_FIFOOREAD 0x00000100 ++#define WDMAC_STATUS_LNGREAD 0x00000200 ++/* 0x4c08 --> 0x5000 unused */ ++ ++/* Per-cpu register offsets (arm9) */ ++#define CPU_MODE 0x00000000 ++#define CPU_MODE_RESET 0x00000001 ++#define CPU_MODE_HALT 0x00000400 ++#define CPU_STATE 0x00000004 ++#define CPU_EVTMASK 0x00000008 ++/* 0xc --> 0x1c reserved */ ++#define CPU_PC 0x0000001c ++#define CPU_INSN 0x00000020 ++#define CPU_SPAD_UFLOW 0x00000024 ++#define CPU_WDOG_CLEAR 0x00000028 ++#define CPU_WDOG_VECTOR 0x0000002c ++#define CPU_WDOG_PC 0x00000030 ++#define CPU_HW_BP 0x00000034 ++/* 0x38 --> 0x44 unused */ ++#define CPU_WDOG_SAVED_STATE 0x00000044 ++#define CPU_LAST_BRANCH_ADDR 0x00000048 ++#define CPU_SPAD_UFLOW_SET 0x0000004c ++/* 0x50 --> 0x200 unused */ ++#define CPU_R0 0x00000200 ++#define CPU_R1 0x00000204 ++#define CPU_R2 0x00000208 ++#define CPU_R3 0x0000020c ++#define CPU_R4 0x00000210 ++#define CPU_R5 0x00000214 ++#define CPU_R6 0x00000218 ++#define CPU_R7 0x0000021c ++#define CPU_R8 0x00000220 ++#define CPU_R9 0x00000224 ++#define CPU_R10 0x00000228 ++#define CPU_R11 0x0000022c ++#define CPU_R12 0x00000230 ++#define CPU_R13 0x00000234 ++#define CPU_R14 0x00000238 ++#define CPU_R15 0x0000023c ++#define CPU_R16 0x00000240 ++#define CPU_R17 0x00000244 ++#define CPU_R18 0x00000248 ++#define CPU_R19 0x0000024c ++#define CPU_R20 0x00000250 ++#define CPU_R21 0x00000254 ++#define CPU_R22 0x00000258 ++#define CPU_R23 0x0000025c ++#define CPU_R24 0x00000260 ++#define CPU_R25 0x00000264 ++#define CPU_R26 0x00000268 ++#define CPU_R27 0x0000026c ++#define CPU_R28 0x00000270 ++#define CPU_R29 0x00000274 ++#define CPU_R30 0x00000278 ++#define CPU_R31 0x0000027c ++/* 0x280 --> 0x400 unused */ ++ ++#define RX_CPU_BASE 0x00005000 ++#define TX_CPU_BASE 0x00005400 ++ ++/* Mailboxes */ ++#define GRCMBOX_INTERRUPT_0 0x00005800 /* 64-bit */ ++#define GRCMBOX_INTERRUPT_1 0x00005808 /* 64-bit */ ++#define GRCMBOX_INTERRUPT_2 0x00005810 /* 64-bit */ ++#define GRCMBOX_INTERRUPT_3 0x00005818 /* 64-bit */ ++#define GRCMBOX_GENERAL_0 0x00005820 /* 64-bit */ ++#define GRCMBOX_GENERAL_1 0x00005828 /* 64-bit */ ++#define GRCMBOX_GENERAL_2 0x00005830 /* 64-bit */ ++#define GRCMBOX_GENERAL_3 0x00005838 /* 64-bit */ ++#define GRCMBOX_GENERAL_4 0x00005840 /* 64-bit */ ++#define GRCMBOX_GENERAL_5 0x00005848 /* 64-bit */ ++#define GRCMBOX_GENERAL_6 0x00005850 /* 64-bit */ ++#define GRCMBOX_GENERAL_7 0x00005858 /* 64-bit */ ++#define GRCMBOX_RELOAD_STAT 0x00005860 /* 64-bit */ ++#define GRCMBOX_RCVSTD_PROD_IDX 0x00005868 /* 64-bit */ ++#define GRCMBOX_RCVJUMBO_PROD_IDX 0x00005870 /* 64-bit */ ++#define GRCMBOX_RCVMINI_PROD_IDX 0x00005878 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_0 0x00005880 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_1 0x00005888 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_2 0x00005890 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_3 0x00005898 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_4 0x000058a0 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_5 0x000058a8 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_6 0x000058b0 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_7 0x000058b8 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_8 0x000058c0 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_9 0x000058c8 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_10 0x000058d0 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_11 0x000058d8 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_12 0x000058e0 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_13 0x000058e8 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_14 0x000058f0 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_15 0x000058f8 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_0 0x00005900 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_1 0x00005908 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_2 0x00005910 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_3 0x00005918 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_4 0x00005920 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_5 0x00005928 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_6 0x00005930 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_7 0x00005938 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_8 0x00005940 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_9 0x00005948 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_10 0x00005950 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_11 0x00005958 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_12 0x00005960 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_13 0x00005968 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_14 0x00005970 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_15 0x00005978 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_0 0x00005980 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_1 0x00005988 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_2 0x00005990 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_3 0x00005998 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_4 0x000059a0 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_5 0x000059a8 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_6 0x000059b0 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_7 0x000059b8 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_8 0x000059c0 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_9 0x000059c8 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_10 0x000059d0 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_11 0x000059d8 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_12 0x000059e0 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_13 0x000059e8 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_14 0x000059f0 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_15 0x000059f8 /* 64-bit */ ++#define GRCMBOX_HIGH_PRIO_EV_VECTOR 0x00005a00 ++#define GRCMBOX_HIGH_PRIO_EV_MASK 0x00005a04 ++#define GRCMBOX_LOW_PRIO_EV_VEC 0x00005a08 ++#define GRCMBOX_LOW_PRIO_EV_MASK 0x00005a0c ++/* 0x5a10 --> 0x5c00 */ ++ ++/* Flow Through queues */ ++#define FTQ_RESET 0x00005c00 ++/* 0x5c04 --> 0x5c10 unused */ ++#define FTQ_DMA_NORM_READ_CTL 0x00005c10 ++#define FTQ_DMA_NORM_READ_FULL_CNT 0x00005c14 ++#define FTQ_DMA_NORM_READ_FIFO_ENQDEQ 0x00005c18 ++#define FTQ_DMA_NORM_READ_WRITE_PEEK 0x00005c1c ++#define FTQ_DMA_HIGH_READ_CTL 0x00005c20 ++#define FTQ_DMA_HIGH_READ_FULL_CNT 0x00005c24 ++#define FTQ_DMA_HIGH_READ_FIFO_ENQDEQ 0x00005c28 ++#define FTQ_DMA_HIGH_READ_WRITE_PEEK 0x00005c2c ++#define FTQ_DMA_COMP_DISC_CTL 0x00005c30 ++#define FTQ_DMA_COMP_DISC_FULL_CNT 0x00005c34 ++#define FTQ_DMA_COMP_DISC_FIFO_ENQDEQ 0x00005c38 ++#define FTQ_DMA_COMP_DISC_WRITE_PEEK 0x00005c3c ++#define FTQ_SEND_BD_COMP_CTL 0x00005c40 ++#define FTQ_SEND_BD_COMP_FULL_CNT 0x00005c44 ++#define FTQ_SEND_BD_COMP_FIFO_ENQDEQ 0x00005c48 ++#define FTQ_SEND_BD_COMP_WRITE_PEEK 0x00005c4c ++#define FTQ_SEND_DATA_INIT_CTL 0x00005c50 ++#define FTQ_SEND_DATA_INIT_FULL_CNT 0x00005c54 ++#define FTQ_SEND_DATA_INIT_FIFO_ENQDEQ 0x00005c58 ++#define FTQ_SEND_DATA_INIT_WRITE_PEEK 0x00005c5c ++#define FTQ_DMA_NORM_WRITE_CTL 0x00005c60 ++#define FTQ_DMA_NORM_WRITE_FULL_CNT 0x00005c64 ++#define FTQ_DMA_NORM_WRITE_FIFO_ENQDEQ 0x00005c68 ++#define FTQ_DMA_NORM_WRITE_WRITE_PEEK 0x00005c6c ++#define FTQ_DMA_HIGH_WRITE_CTL 0x00005c70 ++#define FTQ_DMA_HIGH_WRITE_FULL_CNT 0x00005c74 ++#define FTQ_DMA_HIGH_WRITE_FIFO_ENQDEQ 0x00005c78 ++#define FTQ_DMA_HIGH_WRITE_WRITE_PEEK 0x00005c7c ++#define FTQ_SWTYPE1_CTL 0x00005c80 ++#define FTQ_SWTYPE1_FULL_CNT 0x00005c84 ++#define FTQ_SWTYPE1_FIFO_ENQDEQ 0x00005c88 ++#define FTQ_SWTYPE1_WRITE_PEEK 0x00005c8c ++#define FTQ_SEND_DATA_COMP_CTL 0x00005c90 ++#define FTQ_SEND_DATA_COMP_FULL_CNT 0x00005c94 ++#define FTQ_SEND_DATA_COMP_FIFO_ENQDEQ 0x00005c98 ++#define FTQ_SEND_DATA_COMP_WRITE_PEEK 0x00005c9c ++#define FTQ_HOST_COAL_CTL 0x00005ca0 ++#define FTQ_HOST_COAL_FULL_CNT 0x00005ca4 ++#define FTQ_HOST_COAL_FIFO_ENQDEQ 0x00005ca8 ++#define FTQ_HOST_COAL_WRITE_PEEK 0x00005cac ++#define FTQ_MAC_TX_CTL 0x00005cb0 ++#define FTQ_MAC_TX_FULL_CNT 0x00005cb4 ++#define FTQ_MAC_TX_FIFO_ENQDEQ 0x00005cb8 ++#define FTQ_MAC_TX_WRITE_PEEK 0x00005cbc ++#define FTQ_MB_FREE_CTL 0x00005cc0 ++#define FTQ_MB_FREE_FULL_CNT 0x00005cc4 ++#define FTQ_MB_FREE_FIFO_ENQDEQ 0x00005cc8 ++#define FTQ_MB_FREE_WRITE_PEEK 0x00005ccc ++#define FTQ_RCVBD_COMP_CTL 0x00005cd0 ++#define FTQ_RCVBD_COMP_FULL_CNT 0x00005cd4 ++#define FTQ_RCVBD_COMP_FIFO_ENQDEQ 0x00005cd8 ++#define FTQ_RCVBD_COMP_WRITE_PEEK 0x00005cdc ++#define FTQ_RCVLST_PLMT_CTL 0x00005ce0 ++#define FTQ_RCVLST_PLMT_FULL_CNT 0x00005ce4 ++#define FTQ_RCVLST_PLMT_FIFO_ENQDEQ 0x00005ce8 ++#define FTQ_RCVLST_PLMT_WRITE_PEEK 0x00005cec ++#define FTQ_RCVDATA_INI_CTL 0x00005cf0 ++#define FTQ_RCVDATA_INI_FULL_CNT 0x00005cf4 ++#define FTQ_RCVDATA_INI_FIFO_ENQDEQ 0x00005cf8 ++#define FTQ_RCVDATA_INI_WRITE_PEEK 0x00005cfc ++#define FTQ_RCVDATA_COMP_CTL 0x00005d00 ++#define FTQ_RCVDATA_COMP_FULL_CNT 0x00005d04 ++#define FTQ_RCVDATA_COMP_FIFO_ENQDEQ 0x00005d08 ++#define FTQ_RCVDATA_COMP_WRITE_PEEK 0x00005d0c ++#define FTQ_SWTYPE2_CTL 0x00005d10 ++#define FTQ_SWTYPE2_FULL_CNT 0x00005d14 ++#define FTQ_SWTYPE2_FIFO_ENQDEQ 0x00005d18 ++#define FTQ_SWTYPE2_WRITE_PEEK 0x00005d1c ++/* 0x5d20 --> 0x6000 unused */ ++ ++/* Message signaled interrupt registers */ ++#define MSGINT_MODE 0x00006000 ++#define MSGINT_MODE_RESET 0x00000001 ++#define MSGINT_MODE_ENABLE 0x00000002 ++#define MSGINT_STATUS 0x00006004 ++#define MSGINT_FIFO 0x00006008 ++/* 0x600c --> 0x6400 unused */ ++ ++/* DMA completion registers */ ++#define DMAC_MODE 0x00006400 ++#define DMAC_MODE_RESET 0x00000001 ++#define DMAC_MODE_ENABLE 0x00000002 ++/* 0x6404 --> 0x6800 unused */ ++ ++/* GRC registers */ ++#define GRC_MODE 0x00006800 ++#define GRC_MODE_UPD_ON_COAL 0x00000001 ++#define GRC_MODE_BSWAP_NONFRM_DATA 0x00000002 ++#define GRC_MODE_WSWAP_NONFRM_DATA 0x00000004 ++#define GRC_MODE_BSWAP_DATA 0x00000010 ++#define GRC_MODE_WSWAP_DATA 0x00000020 ++#define GRC_MODE_SPLITHDR 0x00000100 ++#define GRC_MODE_NOFRM_CRACKING 0x00000200 ++#define GRC_MODE_INCL_CRC 0x00000400 ++#define GRC_MODE_ALLOW_BAD_FRMS 0x00000800 ++#define GRC_MODE_NOIRQ_ON_SENDS 0x00002000 ++#define GRC_MODE_NOIRQ_ON_RCV 0x00004000 ++#define GRC_MODE_FORCE_PCI32BIT 0x00008000 ++#define GRC_MODE_HOST_STACKUP 0x00010000 ++#define GRC_MODE_HOST_SENDBDS 0x00020000 ++#define GRC_MODE_NO_TX_PHDR_CSUM 0x00100000 ++#define GRC_MODE_NO_RX_PHDR_CSUM 0x00800000 ++#define GRC_MODE_IRQ_ON_TX_CPU_ATTN 0x01000000 ++#define GRC_MODE_IRQ_ON_RX_CPU_ATTN 0x02000000 ++#define GRC_MODE_IRQ_ON_MAC_ATTN 0x04000000 ++#define GRC_MODE_IRQ_ON_DMA_ATTN 0x08000000 ++#define GRC_MODE_IRQ_ON_FLOW_ATTN 0x10000000 ++#define GRC_MODE_4X_NIC_SEND_RINGS 0x20000000 ++#define GRC_MODE_MCAST_FRM_ENABLE 0x40000000 ++#define GRC_MISC_CFG 0x00006804 ++#define GRC_MISC_CFG_CORECLK_RESET 0x00000001 ++#define GRC_MISC_CFG_PRESCALAR_MASK 0x000000fe ++#define GRC_MISC_CFG_PRESCALAR_SHIFT 1 ++#define GRC_MISC_CFG_BOARD_ID_MASK 0x0001e000 ++#define GRC_MISC_CFG_BOARD_ID_5700 0x0001e000 ++#define GRC_MISC_CFG_BOARD_ID_5701 0x00000000 ++#define GRC_MISC_CFG_BOARD_ID_5702FE 0x00004000 ++#define GRC_MISC_CFG_BOARD_ID_5703 0x00000000 ++#define GRC_MISC_CFG_BOARD_ID_5703S 0x00002000 ++#define GRC_MISC_CFG_BOARD_ID_5704 0x00000000 ++#define GRC_MISC_CFG_BOARD_ID_5704CIOBE 0x00004000 ++#define GRC_MISC_CFG_BOARD_ID_5704_A2 0x00008000 ++#define GRC_MISC_CFG_BOARD_ID_5788 0x00010000 ++#define GRC_MISC_CFG_BOARD_ID_5788M 0x00018000 ++#define GRC_MISC_CFG_BOARD_ID_AC91002A1 0x00018000 ++#define GRC_MISC_CFG_KEEP_GPHY_POWER 0x04000000 ++#define GRC_LOCAL_CTRL 0x00006808 ++#define GRC_LCLCTRL_INT_ACTIVE 0x00000001 ++#define GRC_LCLCTRL_CLEARINT 0x00000002 ++#define GRC_LCLCTRL_SETINT 0x00000004 ++#define GRC_LCLCTRL_INT_ON_ATTN 0x00000008 ++#define GRC_LCLCTRL_GPIO_INPUT0 0x00000100 ++#define GRC_LCLCTRL_GPIO_INPUT1 0x00000200 ++#define GRC_LCLCTRL_GPIO_INPUT2 0x00000400 ++#define GRC_LCLCTRL_GPIO_OE0 0x00000800 ++#define GRC_LCLCTRL_GPIO_OE1 0x00001000 ++#define GRC_LCLCTRL_GPIO_OE2 0x00002000 ++#define GRC_LCLCTRL_GPIO_OUTPUT0 0x00004000 ++#define GRC_LCLCTRL_GPIO_OUTPUT1 0x00008000 ++#define GRC_LCLCTRL_GPIO_OUTPUT2 0x00010000 ++#define GRC_LCLCTRL_EXTMEM_ENABLE 0x00020000 ++#define GRC_LCLCTRL_MEMSZ_MASK 0x001c0000 ++#define GRC_LCLCTRL_MEMSZ_256K 0x00000000 ++#define GRC_LCLCTRL_MEMSZ_512K 0x00040000 ++#define GRC_LCLCTRL_MEMSZ_1M 0x00080000 ++#define GRC_LCLCTRL_MEMSZ_2M 0x000c0000 ++#define GRC_LCLCTRL_MEMSZ_4M 0x00100000 ++#define GRC_LCLCTRL_MEMSZ_8M 0x00140000 ++#define GRC_LCLCTRL_MEMSZ_16M 0x00180000 ++#define GRC_LCLCTRL_BANK_SELECT 0x00200000 ++#define GRC_LCLCTRL_SSRAM_TYPE 0x00400000 ++#define GRC_LCLCTRL_AUTO_SEEPROM 0x01000000 ++#define GRC_TIMER 0x0000680c ++#define GRC_RX_CPU_EVENT 0x00006810 ++#define GRC_RX_TIMER_REF 0x00006814 ++#define GRC_RX_CPU_SEM 0x00006818 ++#define GRC_REMOTE_RX_CPU_ATTN 0x0000681c ++#define GRC_TX_CPU_EVENT 0x00006820 ++#define GRC_TX_TIMER_REF 0x00006824 ++#define GRC_TX_CPU_SEM 0x00006828 ++#define GRC_REMOTE_TX_CPU_ATTN 0x0000682c ++#define GRC_MEM_POWER_UP 0x00006830 /* 64-bit */ ++#define GRC_EEPROM_ADDR 0x00006838 ++#define EEPROM_ADDR_WRITE 0x00000000 ++#define EEPROM_ADDR_READ 0x80000000 ++#define EEPROM_ADDR_COMPLETE 0x40000000 ++#define EEPROM_ADDR_FSM_RESET 0x20000000 ++#define EEPROM_ADDR_DEVID_MASK 0x1c000000 ++#define EEPROM_ADDR_DEVID_SHIFT 26 ++#define EEPROM_ADDR_START 0x02000000 ++#define EEPROM_ADDR_CLKPERD_SHIFT 16 ++#define EEPROM_ADDR_ADDR_MASK 0x0000ffff ++#define EEPROM_ADDR_ADDR_SHIFT 0 ++#define EEPROM_DEFAULT_CLOCK_PERIOD 0x60 ++#define EEPROM_CHIP_SIZE (64 * 1024) ++#define GRC_EEPROM_DATA 0x0000683c ++#define GRC_EEPROM_CTRL 0x00006840 ++#define GRC_MDI_CTRL 0x00006844 ++#define GRC_SEEPROM_DELAY 0x00006848 ++/* 0x684c --> 0x6c00 unused */ ++ ++/* 0x6c00 --> 0x7000 unused */ ++ ++/* NVRAM Control registers */ ++#define NVRAM_CMD 0x00007000 ++#define NVRAM_CMD_RESET 0x00000001 ++#define NVRAM_CMD_DONE 0x00000008 ++#define NVRAM_CMD_GO 0x00000010 ++#define NVRAM_CMD_WR 0x00000020 ++#define NVRAM_CMD_RD 0x00000000 ++#define NVRAM_CMD_ERASE 0x00000040 ++#define NVRAM_CMD_FIRST 0x00000080 ++#define NVRAM_CMD_LAST 0x00000100 ++#define NVRAM_STAT 0x00007004 ++#define NVRAM_WRDATA 0x00007008 ++#define NVRAM_ADDR 0x0000700c ++#define NVRAM_ADDR_MSK 0x00ffffff ++#define NVRAM_RDDATA 0x00007010 ++#define NVRAM_CFG1 0x00007014 ++#define NVRAM_CFG1_FLASHIF_ENAB 0x00000001 ++#define NVRAM_CFG1_BUFFERED_MODE 0x00000002 ++#define NVRAM_CFG1_PASS_THRU 0x00000004 ++#define NVRAM_CFG1_BIT_BANG 0x00000008 ++#define NVRAM_CFG1_COMPAT_BYPASS 0x80000000 ++#define NVRAM_CFG2 0x00007018 ++#define NVRAM_CFG3 0x0000701c ++#define NVRAM_SWARB 0x00007020 ++#define SWARB_REQ_SET0 0x00000001 ++#define SWARB_REQ_SET1 0x00000002 ++#define SWARB_REQ_SET2 0x00000004 ++#define SWARB_REQ_SET3 0x00000008 ++#define SWARB_REQ_CLR0 0x00000010 ++#define SWARB_REQ_CLR1 0x00000020 ++#define SWARB_REQ_CLR2 0x00000040 ++#define SWARB_REQ_CLR3 0x00000080 ++#define SWARB_GNT0 0x00000100 ++#define SWARB_GNT1 0x00000200 ++#define SWARB_GNT2 0x00000400 ++#define SWARB_GNT3 0x00000800 ++#define SWARB_REQ0 0x00001000 ++#define SWARB_REQ1 0x00002000 ++#define SWARB_REQ2 0x00004000 ++#define SWARB_REQ3 0x00008000 ++#define NVRAM_BUFFERED_PAGE_SIZE 264 ++#define NVRAM_BUFFERED_PAGE_POS 9 ++/* 0x7024 --> 0x7400 unused */ ++ ++/* 0x7400 --> 0x8000 unused */ ++ ++/* 32K Window into NIC internal memory */ ++#define NIC_SRAM_WIN_BASE 0x00008000 ++ ++/* Offsets into first 32k of NIC internal memory. */ ++#define NIC_SRAM_PAGE_ZERO 0x00000000 ++#define NIC_SRAM_SEND_RCB 0x00000100 /* 16 * TG3_BDINFO_... */ ++#define NIC_SRAM_RCV_RET_RCB 0x00000200 /* 16 * TG3_BDINFO_... */ ++#define NIC_SRAM_STATS_BLK 0x00000300 ++#define NIC_SRAM_STATUS_BLK 0x00000b00 ++ ++#define NIC_SRAM_FIRMWARE_MBOX 0x00000b50 ++#define NIC_SRAM_FIRMWARE_MBOX_MAGIC1 0x4B657654 ++#define NIC_SRAM_FIRMWARE_MBOX_MAGIC2 0x4861764b /* !dma on linkchg */ ++ ++#define NIC_SRAM_DATA_SIG 0x00000b54 ++#define NIC_SRAM_DATA_SIG_MAGIC 0x4b657654 /* ascii for 'KevT' */ ++ ++#define NIC_SRAM_DATA_CFG 0x00000b58 ++#define NIC_SRAM_DATA_CFG_LED_MODE_MASK 0x0000000c ++#define NIC_SRAM_DATA_CFG_LED_MODE_UNKNOWN 0x00000000 ++#define NIC_SRAM_DATA_CFG_LED_TRIPLE_SPD 0x00000004 ++#define NIC_SRAM_DATA_CFG_LED_OPEN_DRAIN 0x00000004 ++#define NIC_SRAM_DATA_CFG_LED_LINK_SPD 0x00000008 ++#define NIC_SRAM_DATA_CFG_LED_OUTPUT 0x00000008 ++#define NIC_SRAM_DATA_CFG_PHY_TYPE_MASK 0x00000030 ++#define NIC_SRAM_DATA_CFG_PHY_TYPE_UNKNOWN 0x00000000 ++#define NIC_SRAM_DATA_CFG_PHY_TYPE_COPPER 0x00000010 ++#define NIC_SRAM_DATA_CFG_PHY_TYPE_FIBER 0x00000020 ++#define NIC_SRAM_DATA_CFG_WOL_ENABLE 0x00000040 ++#define NIC_SRAM_DATA_CFG_ASF_ENABLE 0x00000080 ++#define NIC_SRAM_DATA_CFG_EEPROM_WP 0x00000100 ++#define NIC_SRAM_DATA_CFG_MINI_PCI 0x00001000 ++#define NIC_SRAM_DATA_CFG_FIBER_WOL 0x00004000 ++ ++#define NIC_SRAM_DATA_PHY_ID 0x00000b74 ++#define NIC_SRAM_DATA_PHY_ID1_MASK 0xffff0000 ++#define NIC_SRAM_DATA_PHY_ID2_MASK 0x0000ffff ++ ++#define NIC_SRAM_FW_CMD_MBOX 0x00000b78 ++#define FWCMD_NICDRV_ALIVE 0x00000001 ++#define FWCMD_NICDRV_PAUSE_FW 0x00000002 ++#define FWCMD_NICDRV_IPV4ADDR_CHG 0x00000003 ++#define FWCMD_NICDRV_IPV6ADDR_CHG 0x00000004 ++#define FWCMD_NICDRV_FIX_DMAR 0x00000005 ++#define FWCMD_NICDRV_FIX_DMAW 0x00000006 ++#define NIC_SRAM_FW_CMD_LEN_MBOX 0x00000b7c ++#define NIC_SRAM_FW_CMD_DATA_MBOX 0x00000b80 ++#define NIC_SRAM_FW_ASF_STATUS_MBOX 0x00000c00 ++#define NIC_SRAM_FW_DRV_STATE_MBOX 0x00000c04 ++#define DRV_STATE_START 0x00000001 ++#define DRV_STATE_UNLOAD 0x00000002 ++#define DRV_STATE_WOL 0x00000003 ++#define DRV_STATE_SUSPEND 0x00000004 ++ ++#define NIC_SRAM_FW_RESET_TYPE_MBOX 0x00000c08 ++ ++#define NIC_SRAM_MAC_ADDR_HIGH_MBOX 0x00000c14 ++#define NIC_SRAM_MAC_ADDR_LOW_MBOX 0x00000c18 ++ ++#define NIC_SRAM_RX_MINI_BUFFER_DESC 0x00001000 ++ ++#define NIC_SRAM_DMA_DESC_POOL_BASE 0x00002000 ++#define NIC_SRAM_DMA_DESC_POOL_SIZE 0x00002000 ++#define NIC_SRAM_TX_BUFFER_DESC 0x00004000 /* 512 entries */ ++#define NIC_SRAM_RX_BUFFER_DESC 0x00006000 /* 256 entries */ ++#define NIC_SRAM_RX_JUMBO_BUFFER_DESC 0x00007000 /* 256 entries */ ++#define NIC_SRAM_MBUF_POOL_BASE 0x00008000 ++#define NIC_SRAM_MBUF_POOL_SIZE96 0x00018000 ++#define NIC_SRAM_MBUF_POOL_SIZE64 0x00010000 ++#define NIC_SRAM_MBUF_POOL_BASE5705 0x00010000 ++#define NIC_SRAM_MBUF_POOL_SIZE5705 0x0000e000 ++ ++/* Currently this is fixed. */ ++#define PHY_ADDR 0x01 ++ ++/* Tigon3 specific PHY MII registers. */ ++#define TG3_BMCR_SPEED1000 0x0040 ++ ++#define MII_TG3_CTRL 0x09 /* 1000-baseT control register */ ++#define MII_TG3_CTRL_ADV_1000_HALF 0x0100 ++#define MII_TG3_CTRL_ADV_1000_FULL 0x0200 ++#define MII_TG3_CTRL_AS_MASTER 0x0800 ++#define MII_TG3_CTRL_ENABLE_AS_MASTER 0x1000 ++ ++#define MII_TG3_EXT_CTRL 0x10 /* Extended control register */ ++#define MII_TG3_EXT_CTRL_LNK3_LED_MODE 0x0002 ++#define MII_TG3_EXT_CTRL_TBI 0x8000 ++ ++#define MII_TG3_EXT_STAT 0x11 /* Extended status register */ ++#define MII_TG3_EXT_STAT_LPASS 0x0100 ++ ++#define MII_TG3_DSP_RW_PORT 0x15 /* DSP coefficient read/write port */ ++ ++#define MII_TG3_DSP_ADDRESS 0x17 /* DSP address register */ ++ ++#define MII_TG3_AUX_CTRL 0x18 /* auxilliary control register */ ++ ++#define MII_TG3_AUX_STAT 0x19 /* auxilliary status register */ ++#define MII_TG3_AUX_STAT_LPASS 0x0004 ++#define MII_TG3_AUX_STAT_SPDMASK 0x0700 ++#define MII_TG3_AUX_STAT_10HALF 0x0100 ++#define MII_TG3_AUX_STAT_10FULL 0x0200 ++#define MII_TG3_AUX_STAT_100HALF 0x0300 ++#define MII_TG3_AUX_STAT_100_4 0x0400 ++#define MII_TG3_AUX_STAT_100FULL 0x0500 ++#define MII_TG3_AUX_STAT_1000HALF 0x0600 ++#define MII_TG3_AUX_STAT_1000FULL 0x0700 ++ ++#define MII_TG3_ISTAT 0x1a /* IRQ status register */ ++#define MII_TG3_IMASK 0x1b /* IRQ mask register */ ++ ++/* ISTAT/IMASK event bits */ ++#define MII_TG3_INT_LINKCHG 0x0002 ++#define MII_TG3_INT_SPEEDCHG 0x0004 ++#define MII_TG3_INT_DUPLEXCHG 0x0008 ++#define MII_TG3_INT_ANEG_PAGE_RX 0x0400 ++ ++/* XXX Add this to mii.h */ ++#ifndef ADVERTISE_PAUSE ++#define ADVERTISE_PAUSE_CAP 0x0400 ++#endif ++#ifndef ADVERTISE_PAUSE_ASYM ++#define ADVERTISE_PAUSE_ASYM 0x0800 ++#endif ++#ifndef LPA_PAUSE ++#define LPA_PAUSE_CAP 0x0400 ++#endif ++#ifndef LPA_PAUSE_ASYM ++#define LPA_PAUSE_ASYM 0x0800 ++#endif ++ ++/* There are two ways to manage the TX descriptors on the tigon3. ++ * Either the descriptors are in host DMA'able memory, or they ++ * exist only in the cards on-chip SRAM. All 16 send bds are under ++ * the same mode, they may not be configured individually. ++ * ++ * The mode we use is controlled by TG3_FLAG_HOST_TXDS in tp->tg3_flags. ++ * ++ * To use host memory TX descriptors: ++ * 1) Set GRC_MODE_HOST_SENDBDS in GRC_MODE register. ++ * Make sure GRC_MODE_4X_NIC_SEND_RINGS is clear. ++ * 2) Allocate DMA'able memory. ++ * 3) In NIC_SRAM_SEND_RCB (of desired index) of on-chip SRAM: ++ * a) Set TG3_BDINFO_HOST_ADDR to DMA address of memory ++ * obtained in step 2 ++ * b) Set TG3_BDINFO_NIC_ADDR to NIC_SRAM_TX_BUFFER_DESC. ++ * c) Set len field of TG3_BDINFO_MAXLEN_FLAGS to number ++ * of TX descriptors. Leave flags field clear. ++ * 4) Access TX descriptors via host memory. The chip ++ * will refetch into local SRAM as needed when producer ++ * index mailboxes are updated. ++ * ++ * To use on-chip TX descriptors: ++ * 1) Set GRC_MODE_4X_NIC_SEND_RINGS in GRC_MODE register. ++ * Make sure GRC_MODE_HOST_SENDBDS is clear. ++ * 2) In NIC_SRAM_SEND_RCB (of desired index) of on-chip SRAM: ++ * a) Set TG3_BDINFO_HOST_ADDR to zero. ++ * b) Set TG3_BDINFO_NIC_ADDR to NIC_SRAM_TX_BUFFER_DESC ++ * c) TG3_BDINFO_MAXLEN_FLAGS is don't care. ++ * 3) Access TX descriptors directly in on-chip SRAM ++ * using normal {read,write}l(). (and not using ++ * pointer dereferencing of ioremap()'d memory like ++ * the broken Broadcom driver does) ++ * ++ * Note that BDINFO_FLAGS_DISABLED should be set in the flags field of ++ * TG3_BDINFO_MAXLEN_FLAGS of all unused SEND_RCB indices. ++ */ ++struct tg3_tx_buffer_desc { ++ uint32_t addr_hi; ++ uint32_t addr_lo; ++ ++ uint32_t len_flags; ++#define TXD_FLAG_TCPUDP_CSUM 0x0001 ++#define TXD_FLAG_IP_CSUM 0x0002 ++#define TXD_FLAG_END 0x0004 ++#define TXD_FLAG_IP_FRAG 0x0008 ++#define TXD_FLAG_IP_FRAG_END 0x0010 ++#define TXD_FLAG_VLAN 0x0040 ++#define TXD_FLAG_COAL_NOW 0x0080 ++#define TXD_FLAG_CPU_PRE_DMA 0x0100 ++#define TXD_FLAG_CPU_POST_DMA 0x0200 ++#define TXD_FLAG_ADD_SRC_ADDR 0x1000 ++#define TXD_FLAG_CHOOSE_SRC_ADDR 0x6000 ++#define TXD_FLAG_NO_CRC 0x8000 ++#define TXD_LEN_SHIFT 16 ++ ++ uint32_t vlan_tag; ++#define TXD_VLAN_TAG_SHIFT 0 ++#define TXD_MSS_SHIFT 16 ++}; ++ ++#define TXD_ADDR 0x00UL /* 64-bit */ ++#define TXD_LEN_FLAGS 0x08UL /* 32-bit (upper 16-bits are len) */ ++#define TXD_VLAN_TAG 0x0cUL /* 32-bit (upper 16-bits are tag) */ ++#define TXD_SIZE 0x10UL ++ ++struct tg3_rx_buffer_desc { ++ uint32_t addr_hi; ++ uint32_t addr_lo; ++ ++ uint32_t idx_len; ++#define RXD_IDX_MASK 0xffff0000 ++#define RXD_IDX_SHIFT 16 ++#define RXD_LEN_MASK 0x0000ffff ++#define RXD_LEN_SHIFT 0 ++ ++ uint32_t type_flags; ++#define RXD_TYPE_SHIFT 16 ++#define RXD_FLAGS_SHIFT 0 ++ ++#define RXD_FLAG_END 0x0004 ++#define RXD_FLAG_MINI 0x0800 ++#define RXD_FLAG_JUMBO 0x0020 ++#define RXD_FLAG_VLAN 0x0040 ++#define RXD_FLAG_ERROR 0x0400 ++#define RXD_FLAG_IP_CSUM 0x1000 ++#define RXD_FLAG_TCPUDP_CSUM 0x2000 ++#define RXD_FLAG_IS_TCP 0x4000 ++ ++ uint32_t ip_tcp_csum; ++#define RXD_IPCSUM_MASK 0xffff0000 ++#define RXD_IPCSUM_SHIFT 16 ++#define RXD_TCPCSUM_MASK 0x0000ffff ++#define RXD_TCPCSUM_SHIFT 0 ++ ++ uint32_t err_vlan; ++ ++#define RXD_VLAN_MASK 0x0000ffff ++ ++#define RXD_ERR_BAD_CRC 0x00010000 ++#define RXD_ERR_COLLISION 0x00020000 ++#define RXD_ERR_LINK_LOST 0x00040000 ++#define RXD_ERR_PHY_DECODE 0x00080000 ++#define RXD_ERR_ODD_NIBBLE_RCVD_MII 0x00100000 ++#define RXD_ERR_MAC_ABRT 0x00200000 ++#define RXD_ERR_TOO_SMALL 0x00400000 ++#define RXD_ERR_NO_RESOURCES 0x00800000 ++#define RXD_ERR_HUGE_FRAME 0x01000000 ++#define RXD_ERR_MASK 0xffff0000 ++ ++ uint32_t reserved; ++ uint32_t opaque; ++#define RXD_OPAQUE_INDEX_MASK 0x0000ffff ++#define RXD_OPAQUE_INDEX_SHIFT 0 ++#define RXD_OPAQUE_RING_STD 0x00010000 ++#define RXD_OPAQUE_RING_JUMBO 0x00020000 ++#define RXD_OPAQUE_RING_MINI 0x00040000 ++#define RXD_OPAQUE_RING_MASK 0x00070000 ++}; ++ ++struct tg3_ext_rx_buffer_desc { ++ struct { ++ uint32_t addr_hi; ++ uint32_t addr_lo; ++ } addrlist[3]; ++ uint32_t len2_len1; ++ uint32_t resv_len3; ++ struct tg3_rx_buffer_desc std; ++}; ++ ++/* We only use this when testing out the DMA engine ++ * at probe time. This is the internal format of buffer ++ * descriptors used by the chip at NIC_SRAM_DMA_DESCS. ++ */ ++struct tg3_internal_buffer_desc { ++ uint32_t addr_hi; ++ uint32_t addr_lo; ++ uint32_t nic_mbuf; ++ /* XXX FIX THIS */ ++#if __BYTE_ORDER == __BIG_ENDIAN ++ uint16_t cqid_sqid; ++ uint16_t len; ++#else ++ uint16_t len; ++ uint16_t cqid_sqid; ++#endif ++ uint32_t flags; ++ uint32_t __cookie1; ++ uint32_t __cookie2; ++ uint32_t __cookie3; ++}; ++ ++#define TG3_HW_STATUS_SIZE 0x50 ++struct tg3_hw_status { ++ uint32_t status; ++#define SD_STATUS_UPDATED 0x00000001 ++#define SD_STATUS_LINK_CHG 0x00000002 ++#define SD_STATUS_ERROR 0x00000004 ++ ++ uint32_t status_tag; ++ ++#if __BYTE_ORDER == __BIG_ENDIAN ++ uint16_t rx_consumer; ++ uint16_t rx_jumbo_consumer; ++#else ++ uint16_t rx_jumbo_consumer; ++ uint16_t rx_consumer; ++#endif ++ ++#if __BYTE_ORDER == __BIG_ENDIAN ++ uint16_t reserved; ++ uint16_t rx_mini_consumer; ++#else ++ uint16_t rx_mini_consumer; ++ uint16_t reserved; ++#endif ++ struct { ++#if __BYTE_ORDER == __BIG_ENDIAN ++ uint16_t tx_consumer; ++ uint16_t rx_producer; ++#else ++ uint16_t rx_producer; ++ uint16_t tx_consumer; ++#endif ++ } idx[16]; ++}; ++ ++typedef struct { ++ uint32_t high, low; ++} tg3_stat64_t; ++ ++struct tg3_hw_stats { ++ uint8_t __reserved0[0x400-0x300]; ++ ++ /* Statistics maintained by Receive MAC. */ ++ tg3_stat64_t rx_octets; ++ uint64_t __reserved1; ++ tg3_stat64_t rx_fragments; ++ tg3_stat64_t rx_ucast_packets; ++ tg3_stat64_t rx_mcast_packets; ++ tg3_stat64_t rx_bcast_packets; ++ tg3_stat64_t rx_fcs_errors; ++ tg3_stat64_t rx_align_errors; ++ tg3_stat64_t rx_xon_pause_rcvd; ++ tg3_stat64_t rx_xoff_pause_rcvd; ++ tg3_stat64_t rx_mac_ctrl_rcvd; ++ tg3_stat64_t rx_xoff_entered; ++ tg3_stat64_t rx_frame_too_long_errors; ++ tg3_stat64_t rx_jabbers; ++ tg3_stat64_t rx_undersize_packets; ++ tg3_stat64_t rx_in_length_errors; ++ tg3_stat64_t rx_out_length_errors; ++ tg3_stat64_t rx_64_or_less_octet_packets; ++ tg3_stat64_t rx_65_to_127_octet_packets; ++ tg3_stat64_t rx_128_to_255_octet_packets; ++ tg3_stat64_t rx_256_to_511_octet_packets; ++ tg3_stat64_t rx_512_to_1023_octet_packets; ++ tg3_stat64_t rx_1024_to_1522_octet_packets; ++ tg3_stat64_t rx_1523_to_2047_octet_packets; ++ tg3_stat64_t rx_2048_to_4095_octet_packets; ++ tg3_stat64_t rx_4096_to_8191_octet_packets; ++ tg3_stat64_t rx_8192_to_9022_octet_packets; ++ ++ uint64_t __unused0[37]; ++ ++ /* Statistics maintained by Transmit MAC. */ ++ tg3_stat64_t tx_octets; ++ uint64_t __reserved2; ++ tg3_stat64_t tx_collisions; ++ tg3_stat64_t tx_xon_sent; ++ tg3_stat64_t tx_xoff_sent; ++ tg3_stat64_t tx_flow_control; ++ tg3_stat64_t tx_mac_errors; ++ tg3_stat64_t tx_single_collisions; ++ tg3_stat64_t tx_mult_collisions; ++ tg3_stat64_t tx_deferred; ++ uint64_t __reserved3; ++ tg3_stat64_t tx_excessive_collisions; ++ tg3_stat64_t tx_late_collisions; ++ tg3_stat64_t tx_collide_2times; ++ tg3_stat64_t tx_collide_3times; ++ tg3_stat64_t tx_collide_4times; ++ tg3_stat64_t tx_collide_5times; ++ tg3_stat64_t tx_collide_6times; ++ tg3_stat64_t tx_collide_7times; ++ tg3_stat64_t tx_collide_8times; ++ tg3_stat64_t tx_collide_9times; ++ tg3_stat64_t tx_collide_10times; ++ tg3_stat64_t tx_collide_11times; ++ tg3_stat64_t tx_collide_12times; ++ tg3_stat64_t tx_collide_13times; ++ tg3_stat64_t tx_collide_14times; ++ tg3_stat64_t tx_collide_15times; ++ tg3_stat64_t tx_ucast_packets; ++ tg3_stat64_t tx_mcast_packets; ++ tg3_stat64_t tx_bcast_packets; ++ tg3_stat64_t tx_carrier_sense_errors; ++ tg3_stat64_t tx_discards; ++ tg3_stat64_t tx_errors; ++ ++ uint64_t __unused1[31]; ++ ++ /* Statistics maintained by Receive List Placement. */ ++ tg3_stat64_t COS_rx_packets[16]; ++ tg3_stat64_t COS_rx_filter_dropped; ++ tg3_stat64_t dma_writeq_full; ++ tg3_stat64_t dma_write_prioq_full; ++ tg3_stat64_t rxbds_empty; ++ tg3_stat64_t rx_discards; ++ tg3_stat64_t rx_errors; ++ tg3_stat64_t rx_threshold_hit; ++ ++ uint64_t __unused2[9]; ++ ++ /* Statistics maintained by Send Data Initiator. */ ++ tg3_stat64_t COS_out_packets[16]; ++ tg3_stat64_t dma_readq_full; ++ tg3_stat64_t dma_read_prioq_full; ++ tg3_stat64_t tx_comp_queue_full; ++ ++ /* Statistics maintained by Host Coalescing. */ ++ tg3_stat64_t ring_set_send_prod_index; ++ tg3_stat64_t ring_status_update; ++ tg3_stat64_t nic_irqs; ++ tg3_stat64_t nic_avoided_irqs; ++ tg3_stat64_t nic_tx_threshold_hit; ++ ++ uint8_t __reserved4[0xb00-0x9c0]; ++}; ++ ++enum phy_led_mode { ++ led_mode_auto, ++ led_mode_three_link, ++ led_mode_link10 ++}; ++ ++#if 0 ++/* 'mapping' is superfluous as the chip does not write into ++ * the tx/rx post rings so we could just fetch it from there. ++ * But the cache behavior is better how we are doing it now. ++ */ ++struct ring_info { ++ struct sk_buff *skb; ++ DECLARE_PCI_UNMAP_ADDR(mapping) ++}; ++ ++struct tx_ring_info { ++ struct sk_buff *skb; ++ DECLARE_PCI_UNMAP_ADDR(mapping) ++ uint32_t prev_vlan_tag; ++}; ++#endif ++ ++struct tg3_config_info { ++ uint32_t flags; ++}; ++ ++struct tg3_link_config { ++ /* Describes what we're trying to get. */ ++ uint32_t advertising; ++#if 0 ++ uint16_t speed; ++ uint8_t duplex; ++ uint8_t autoneg; ++#define SPEED_INVALID 0xffff ++#define DUPLEX_INVALID 0xff ++#define AUTONEG_INVALID 0xff ++#endif ++ ++ /* Describes what we actually have. */ ++ uint8_t active_speed; ++ uint8_t active_duplex; ++ ++ /* When we go in and out of low power mode we need ++ * to swap with this state. ++ */ ++#if 0 ++ int phy_is_low_power; ++ uint16_t orig_speed; ++ uint8_t orig_duplex; ++ uint8_t orig_autoneg; ++#endif ++}; ++ ++struct tg3_bufmgr_config { ++ uint32_t mbuf_read_dma_low_water; ++ uint32_t mbuf_mac_rx_low_water; ++ uint32_t mbuf_high_water; ++ ++ uint32_t mbuf_read_dma_low_water_jumbo; ++ uint32_t mbuf_mac_rx_low_water_jumbo; ++ uint32_t mbuf_high_water_jumbo; ++ ++ uint32_t dma_low_water; ++ uint32_t dma_high_water; ++}; ++ ++struct tg3 { ++#if 0 ++ /* SMP locking strategy: ++ * ++ * lock: Held during all operations except TX packet ++ * processing. ++ * ++ * tx_lock: Held during tg3_start_xmit{,_4gbug} and tg3_tx ++ * ++ * If you want to shut up all asynchronous processing you must ++ * acquire both locks, 'lock' taken before 'tx_lock'. IRQs must ++ * be disabled to take 'lock' but only softirq disabling is ++ * necessary for acquisition of 'tx_lock'. ++ */ ++ spinlock_t lock; ++ spinlock_t tx_lock; ++#endif ++ ++ uint32_t tx_prod; ++#if 0 ++ uint32_t tx_cons; ++#endif ++ uint32_t rx_rcb_ptr; ++ uint32_t rx_std_ptr; ++#if 0 ++ uint32_t rx_jumbo_ptr; ++ spinlock_t indirect_lock; ++ ++ struct net_device_stats net_stats; ++ struct net_device_stats net_stats_prev; ++#endif ++ unsigned long phy_crc_errors; ++ ++#if 0 ++ uint32_t rx_offset; ++#endif ++ uint32_t tg3_flags; ++#if 0 ++#define TG3_FLAG_HOST_TXDS 0x00000001 ++#endif ++#define TG3_FLAG_TXD_MBOX_HWBUG 0x00000002 ++#define TG3_FLAG_RX_CHECKSUMS 0x00000004 ++#define TG3_FLAG_USE_LINKCHG_REG 0x00000008 ++#define TG3_FLAG_USE_MI_INTERRUPT 0x00000010 ++#define TG3_FLAG_ENABLE_ASF 0x00000020 ++#define TG3_FLAG_5701_REG_WRITE_BUG 0x00000040 ++#define TG3_FLAG_POLL_SERDES 0x00000080 ++#define TG3_FLAG_MBOX_WRITE_REORDER 0x00000100 ++#define TG3_FLAG_PCIX_TARGET_HWBUG 0x00000200 ++#define TG3_FLAG_WOL_SPEED_100MB 0x00000400 ++#define TG3_FLAG_WOL_ENABLE 0x00000800 ++#define TG3_FLAG_EEPROM_WRITE_PROT 0x00001000 ++#define TG3_FLAG_NVRAM 0x00002000 ++#define TG3_FLAG_NVRAM_BUFFERED 0x00004000 ++#define TG3_FLAG_RX_PAUSE 0x00008000 ++#define TG3_FLAG_TX_PAUSE 0x00010000 ++#define TG3_FLAG_PCIX_MODE 0x00020000 ++#define TG3_FLAG_PCI_HIGH_SPEED 0x00040000 ++#define TG3_FLAG_PCI_32BIT 0x00080000 ++#define TG3_FLAG_NO_TX_PSEUDO_CSUM 0x00100000 ++#define TG3_FLAG_NO_RX_PSEUDO_CSUM 0x00200000 ++#define TG3_FLAG_SERDES_WOL_CAP 0x00400000 ++#define TG3_FLAG_JUMBO_ENABLE 0x00800000 ++#define TG3_FLAG_10_100_ONLY 0x01000000 ++#define TG3_FLAG_PAUSE_AUTONEG 0x02000000 ++#define TG3_FLAG_PAUSE_RX 0x04000000 ++#define TG3_FLAG_PAUSE_TX 0x08000000 ++#define TG3_FLAG_BROKEN_CHECKSUMS 0x10000000 ++#define TG3_FLAG_GOT_SERDES_FLOWCTL 0x20000000 ++#define TG3_FLAG_SPLIT_MODE 0x40000000 ++#define TG3_FLAG_INIT_COMPLETE 0x80000000 ++ ++ uint32_t tg3_flags2; ++#define TG3_FLG2_RESTART_TIMER 0x00000001 ++#define TG3_FLG2_SUN_5704 0x00000002 ++#define TG3_FLG2_NO_ETH_WIRE_SPEED 0x00000004 ++#define TG3_FLG2_IS_5788 0x00000008 ++#define TG3_FLG2_MAX_RXPEND_64 0x00000010 ++#define TG3_FLG2_TSO_CAPABLE 0x00000020 ++ ++ ++ ++ uint32_t split_mode_max_reqs; ++#define SPLIT_MODE_5704_MAX_REQ 3 ++ ++#if 0 ++ struct timer_list timer; ++ uint16_t timer_counter; ++ uint16_t timer_multiplier; ++ uint32_t timer_offset; ++ uint16_t asf_counter; ++ uint16_t asf_multiplier; ++#endif ++ ++ struct tg3_link_config link_config; ++ struct tg3_bufmgr_config bufmgr_config; ++ ++#if 0 ++ uint32_t rx_pending; ++ uint32_t rx_jumbo_pending; ++ uint32_t tx_pending; ++#endif ++ ++ /* cache h/w values, often passed straight to h/w */ ++ uint32_t rx_mode; ++ uint32_t tx_mode; ++ uint32_t mac_mode; ++ uint32_t mi_mode; ++ uint32_t misc_host_ctrl; ++ uint32_t grc_mode; ++ uint32_t grc_local_ctrl; ++ uint32_t dma_rwctrl; ++#if 0 ++ uint32_t coalesce_mode; ++#endif ++ ++ /* PCI block */ ++ uint16_t pci_chip_rev_id; ++#if 0 ++ uint8_t pci_cacheline_sz; ++ uint8_t pci_lat_timer; ++ uint8_t pci_hdr_type; ++ uint8_t pci_bist; ++#endif ++ uint32_t pci_cfg_state[64 / sizeof(uint32_t)]; ++ ++ int pm_cap; ++ ++ /* PHY info */ ++ uint32_t phy_id; ++#define PHY_ID_MASK 0xfffffff0 ++#define PHY_ID_BCM5400 0x60008040 ++#define PHY_ID_BCM5401 0x60008050 ++#define PHY_ID_BCM5411 0x60008070 ++#define PHY_ID_BCM5701 0x60008110 ++#define PHY_ID_BCM5703 0x60008160 ++#define PHY_ID_BCM5704 0x60008190 ++#define PHY_ID_BCM5705 0x600081a0 ++#define PHY_ID_BCM8002 0x60010140 ++#define PHY_ID_SERDES 0xfeedbee0 ++#define PHY_ID_INVALID 0xffffffff ++#define PHY_ID_REV_MASK 0x0000000f ++#define PHY_REV_BCM5401_B0 0x1 ++#define PHY_REV_BCM5401_B2 0x3 ++#define PHY_REV_BCM5401_C0 0x6 ++#define PHY_REV_BCM5411_X0 0x1 /* Found on Netgear GA302T */ ++ ++ enum phy_led_mode led_mode; ++ ++ char board_part_number[24]; ++ uint32_t nic_sram_data_cfg; ++ uint32_t pci_clock_ctrl; ++#if 0 ++ struct pci_device *pdev_peer; ++#endif ++ ++ /* This macro assumes the passed PHY ID is already masked ++ * with PHY_ID_MASK. ++ */ ++#define KNOWN_PHY_ID(X) \ ++ ((X) == PHY_ID_BCM5400 || (X) == PHY_ID_BCM5401 || \ ++ (X) == PHY_ID_BCM5411 || (X) == PHY_ID_BCM5701 || \ ++ (X) == PHY_ID_BCM5703 || (X) == PHY_ID_BCM5704 || \ ++ (X) == PHY_ID_BCM5705 || \ ++ (X) == PHY_ID_BCM8002 || (X) == PHY_ID_SERDES) ++ ++ unsigned long regs; ++ struct pci_device *pdev; ++ struct nic *nic; ++#if 0 ++ struct net_device *dev; ++#endif ++#if TG3_VLAN_TAG_USED ++ struct vlan_group *vlgrp; ++#endif ++ ++ struct tg3_rx_buffer_desc *rx_std; ++#if 0 ++ struct ring_info *rx_std_buffers; ++ dma_addr_t rx_std_mapping; ++ struct tg3_rx_buffer_desc *rx_jumbo; ++ struct ring_info *rx_jumbo_buffers; ++ dma_addr_t rx_jumbo_mapping; ++#endif ++ ++ struct tg3_rx_buffer_desc *rx_rcb; ++#if 0 ++ dma_addr_t rx_rcb_mapping; ++#endif ++ ++ /* TX descs are only used if TG3_FLAG_HOST_TXDS is set. */ ++ struct tg3_tx_buffer_desc *tx_ring; ++#if 0 ++ struct tx_ring_info *tx_buffers; ++ dma_addr_t tx_desc_mapping; ++#endif ++ ++ struct tg3_hw_status *hw_status; ++#if 0 ++ dma_addr_t status_mapping; ++#endif ++#if 0 ++ uint32_t msg_enable; ++#endif ++ ++ struct tg3_hw_stats *hw_stats; ++#if 0 ++ dma_addr_t stats_mapping; ++#endif ++ ++ int carrier_ok; ++ uint16_t subsystem_vendor; ++ uint16_t subsystem_device; ++}; ++ ++#endif /* !(_T3_H) */ +diff -Naur grub-0.97.orig/netboot/tiara.c grub-0.97/netboot/tiara.c +--- grub-0.97.orig/netboot/tiara.c 2003-07-09 11:45:38.000000000 +0000 ++++ grub-0.97/netboot/tiara.c 1970-01-01 00:00:00.000000000 +0000 +@@ -1,255 +0,0 @@ +-/************************************************************************** +-Etherboot - BOOTP/TFTP Bootstrap Program +- +-TIARA (Fujitsu Etherstar) NIC driver for Etherboot +-Copyright (c) Ken Yap 1998 +- +-Information gleaned from: +- +-TIARA.ASM Packet driver by Brian Fisher, Queens U, Kingston, Ontario +-Fujitsu MB86960 spec sheet (different chip but same family) +-***************************************************************************/ +- +-/* +- * This program is free software; you can redistribute it and/or +- * modify it under the terms of the GNU General Public License as +- * published by the Free Software Foundation; either version 2, or (at +- * your option) any later version. +- */ +- +-/* to get some global routines like printf */ +-#include "etherboot.h" +-/* to get the interface to the body of the program */ +-#include "nic.h" +-#include "cards.h" +- +-/* +- EtherStar I/O Register offsets +-*/ +- +-/* Offsets of registers */ +-#define DLCR_XMIT_STAT 0x00 +-#define DLCR_XMIT_MASK 0x01 +-#define DLCR_RECV_STAT 0x02 +-#define DLCR_RECV_MASK 0x03 +-#define DLCR_XMIT_MODE 0x04 +-#define DLCR_RECV_MODE 0x05 +-#define DLCR_ENABLE 0x06 +-#define DLCR_TDR_LOW 0x07 +-#define DLCR_NODE_ID 0x08 +-#define DLCR_TDR_HIGH 0x0F +-#define BMPR_MEM_PORT 0x10 +-#define BMPR_PKT_LEN 0x12 +-#define BMPR_DMA_ENABLE 0x14 +-#define PROM_ID 0x18 +- +-#define TMST 0x80 +-#define TMT_OK 0x80 +-#define TMT_16COLL 0x02 +-#define BUF_EMPTY 0x40 +- +-#define CARD_DISABLE 0x80 /* written to DLCR_ENABLE to disable card */ +-#define CARD_ENABLE 0 /* written to DLCR_ENABLE to enable card */ +- +-#define CLEAR_STATUS 0x0F /* used to clear status info */ +-/* +- 00001111B +- !!!!!!!!-------- +- !!!!!!!+--------CLEAR BUS WRITE ERROR +- !!!!!!+---------CLEAR 16 COLLISION +- !!!!!+----------CLEAR COLLISION +- !!!!+-----------CLEAR UNDERFLOW +- !!!+------------NC +- !!+-------------NC +- !+--------------NC +- +---------------NC +-*/ +- +-#define NO_TX_IRQS 0 /* written to clear transmit IRQs */ +- +-#define CLR_RCV_STATUS 0xCF /* clears receive status */ +- +-#define EN_RCV_IRQS 0x80 /* enable receive interrupts */ +-/* +- 10000000B +- !!!!!!!!-------- +- !!!!!!!+--------ENABLE OVERFLOW +- !!!!!!+---------ENABLE CRC +- !!!!!+----------ENABLE ALIGN +- !!!!+-----------ENABLE SHORT PKT +- !!!+------------DISABLE REMOTE RESET +- !!+-------------RESERVED +- !+--------------RESERVED +- +---------------ENABLE PKT READY +-*/ +- +-#define XMIT_MODE 0x02 +-/* +- 00000010B +- !!!!!!!!---------ENABLE CARRIER DETECT +- !!!!!!!+---------DISABLE LOOPBACK +-*/ +- +-#define RECV_MODE 0x02 +-/* +- 00000010B +- !!!!!!!!---------ACCEPT ALL PACKETS +- !!!!!!!+---------ACCEPT PHYSICAL, MULTICAST, AND +- !!!!!!+----------BROADCAST PACKETS +- !!!!!+-----------DISABLE REMOTE RESET +- !!!!+------------DISABLE SHORT PACKETS +- !!!+-------------USE 6 BYTE ADDRESS +- !!+--------------NC +- !+---------------NC +- +----------------DISABLE CRC TEST MODE +-*/ +- +-/* NIC specific static variables go here */ +- +-static unsigned short ioaddr; +- +-/************************************************************************** +-RESET - Reset adapter +-***************************************************************************/ +-static void tiara_reset(struct nic *nic) +-{ +- int i; +- +- outb(CARD_DISABLE, ioaddr + DLCR_ENABLE); +- outb(CLEAR_STATUS, ioaddr + DLCR_XMIT_STAT); +- outb(NO_TX_IRQS, ioaddr + DLCR_XMIT_MASK); +- outb(CLR_RCV_STATUS, ioaddr + DLCR_RECV_STAT); +- outb(XMIT_MODE, ioaddr + DLCR_XMIT_MODE); +- outb(RECV_MODE, ioaddr + DLCR_RECV_MODE); +- /* Vacuum recv buffer */ +- while ((inb(ioaddr + DLCR_RECV_MODE) & BUF_EMPTY) == 0) +- inb(ioaddr + BMPR_MEM_PORT); +- /* Set node address */ +- for (i = 0; i < ETH_ALEN; ++i) +- outb(nic->node_addr[i], ioaddr + DLCR_NODE_ID + i); +- outb(CLR_RCV_STATUS, ioaddr + DLCR_RECV_STAT); +- outb(CARD_ENABLE, ioaddr + DLCR_ENABLE); +-} +- +-/************************************************************************** +-POLL - Wait for a frame +-***************************************************************************/ +-static int tiara_poll(struct nic *nic) +-{ +- unsigned int len; +- +- if (inb(ioaddr + DLCR_RECV_MODE) & BUF_EMPTY) +- return (0); +- /* Ack packet */ +- outw(CLR_RCV_STATUS, ioaddr + DLCR_RECV_STAT); +- len = inw(ioaddr + BMPR_MEM_PORT); /* throw away status */ +- len = inw(ioaddr + BMPR_MEM_PORT); +- /* Drop overlength packets */ +- if (len > ETH_FRAME_LEN) +- return (0); /* should we drain the buffer? */ +- insw(ioaddr + BMPR_MEM_PORT, nic->packet, len / 2); +- /* If it's our own, drop it */ +- if (memcmp(nic->packet + ETH_ALEN, nic->node_addr, ETH_ALEN) == 0) +- return (0); +- nic->packetlen = len; +- return (1); +-} +- +-/************************************************************************** +-TRANSMIT - Transmit a frame +-***************************************************************************/ +-static void tiara_transmit( +-struct nic *nic, +-const char *d, /* Destination */ +-unsigned int t, /* Type */ +-unsigned int s, /* size */ +-const char *p) /* Packet */ +-{ +- unsigned int len; +- unsigned long time; +- +- len = s + ETH_HLEN; +- if (len < ETH_ZLEN) +- len = ETH_ZLEN; +- t = htons(t); +- outsw(ioaddr + BMPR_MEM_PORT, d, ETH_ALEN / 2); +- outsw(ioaddr + BMPR_MEM_PORT, nic->node_addr, ETH_ALEN / 2); +- outw(t, ioaddr + BMPR_MEM_PORT); +- outsw(ioaddr + BMPR_MEM_PORT, p, s / 2); +- if (s & 1) /* last byte */ +- outb(p[s-1], ioaddr + BMPR_MEM_PORT); +- while (s++ < ETH_ZLEN - ETH_HLEN) /* pad */ +- outb(0, ioaddr + BMPR_MEM_PORT); +- outw(len | (TMST << 8), ioaddr + BMPR_PKT_LEN); +- /* wait for transmit complete */ +- time = currticks() + TICKS_PER_SEC; /* wait one second */ +- while (currticks() < time && (inb(ioaddr) & (TMT_OK|TMT_16COLL)) == 0) +- ; +- if ((inb(ioaddr) & (TMT_OK|TMT_16COLL)) == 0) +- printf("Tiara timed out on transmit\n"); +- /* Do we need to ack the transmit? */ +-} +- +-/************************************************************************** +-DISABLE - Turn off ethernet interface +-***************************************************************************/ +-static void tiara_disable(struct nic *nic) +-{ +- /* Apparently only a power down can do this properly */ +- outb(CARD_DISABLE, ioaddr + DLCR_ENABLE); +-} +- +-static int tiara_probe1(struct nic *nic) +-{ +- /* Hope all the Tiara cards have this vendor prefix */ +- static char vendor_prefix[] = { 0x08, 0x00, 0x1A }; +- static char all_ones[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; +- int i; +- +- for (i = 0; i < ETH_ALEN; ++i) +- nic->node_addr[i] = inb(ioaddr + PROM_ID + i); +- if (memcmp(nic->node_addr, vendor_prefix, sizeof(vendor_prefix)) != 0) +- return (0); +- if (memcmp(nic->node_addr, all_ones, sizeof(all_ones)) == 0) +- return (0); +- printf("\nTiara ioaddr %#hX, addr %!\n", ioaddr, nic->node_addr); +- return (1); +-} +- +-/************************************************************************** +-PROBE - Look for an adapter, this routine's visible to the outside +-***************************************************************************/ +-struct nic *tiara_probe(struct nic *nic, unsigned short *probe_addrs) +-{ +- /* missing entries are addresses usually already used */ +- static unsigned short io_addrs[] = { +- 0x100, 0x120, 0x140, 0x160, +- 0x180, 0x1A0, 0x1C0, 0x1E0, +- 0x200, 0x220, 0x240, /*Par*/ +- 0x280, 0x2A0, 0x2C0, /*Ser*/ +- 0x300, 0x320, 0x340, /*Par*/ +- 0x380, /*Vid,Par*/ 0x3C0, /*Ser*/ +- 0x0 +- }; +- unsigned short *p; +- +- /* if probe_addrs is 0, then routine can use a hardwired default */ +- if (probe_addrs == 0) +- probe_addrs = io_addrs; +- for (p = probe_addrs; (ioaddr = *p) != 0; ++p) +- if (tiara_probe1(nic)) +- break; +- /* if board found */ +- if (ioaddr != 0) +- { +- tiara_reset(nic); +- /* point to NIC specific routines */ +- nic->reset = tiara_reset; +- nic->poll = tiara_poll; +- nic->transmit = tiara_transmit; +- nic->disable = tiara_disable; +- return nic; +- } +- else +- return (0); +-} +diff -Naur grub-0.97.orig/netboot/timer.c grub-0.97/netboot/timer.c +--- grub-0.97.orig/netboot/timer.c 2003-07-09 11:45:38.000000000 +0000 ++++ grub-0.97/netboot/timer.c 2005-08-31 19:03:35.000000000 +0000 +@@ -6,122 +6,24 @@ + * published by the Free Software Foundation; either version 2, or (at + * your option) any later version. + */ +- +-#include "etherboot.h" ++#include "grub.h" + #include "timer.h" + +-void load_timer2(unsigned int ticks) +-{ +- /* Set up the timer gate, turn off the speaker */ +- outb((inb(PPC_PORTB) & ~PPCB_SPKR) | PPCB_T2GATE, PPC_PORTB); +- outb(TIMER2_SEL|WORD_ACCESS|MODE0|BINARY_COUNT, TIMER_MODE_PORT); +- outb(ticks & 0xFF, TIMER2_PORT); +- outb(ticks >> 8, TIMER2_PORT); +-} +- +-#if defined(CONFIG_TSC_CURRTICKS) +-#define rdtsc(low,high) \ +- __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high)) +- +-#define rdtscll(val) \ +- __asm__ __volatile__ ("rdtsc" : "=A" (val)) +- +- +-#define HZ TICKS_PER_SEC +-#define CLOCK_TICK_RATE 1193180U /* Underlying HZ */ +-/* LATCH is used in the interval timer and ftape setup. */ +-#define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ ++/* Machine Independant timer helper functions */ + +- +-/* ------ Calibrate the TSC ------- +- * Return 2^32 * (1 / (TSC clocks per usec)) for do_fast_gettimeoffset(). +- * Too much 64-bit arithmetic here to do this cleanly in C, and for +- * accuracy's sake we want to keep the overhead on the CTC speaker (channel 2) +- * output busy loop as low as possible. We avoid reading the CTC registers +- * directly because of the awkward 8-bit access mechanism of the 82C54 +- * device. +- */ +- +-#define CALIBRATE_LATCH (5 * LATCH) +- +-static unsigned long long calibrate_tsc(void) ++void mdelay(unsigned int msecs) + { +- /* Set the Gate high, disable speaker */ +- outb((inb(0x61) & ~0x02) | 0x01, 0x61); +- +- /* +- * Now let's take care of CTC channel 2 +- * +- * Set the Gate high, program CTC channel 2 for mode 0, +- * (interrupt on terminal count mode), binary count, +- * load 5 * LATCH count, (LSB and MSB) to begin countdown. +- */ +- outb(0xb0, 0x43); /* binary, mode 0, LSB/MSB, Ch 2 */ +- outb(CALIBRATE_LATCH & 0xff, 0x42); /* LSB of count */ +- outb(CALIBRATE_LATCH >> 8, 0x42); /* MSB of count */ +- +- { +- unsigned long startlow, starthigh; +- unsigned long endlow, endhigh; +- unsigned long count; +- +- rdtsc(startlow,starthigh); +- count = 0; +- do { +- count++; +- } while ((inb(0x61) & 0x20) == 0); +- rdtsc(endlow,endhigh); +- +- /* Error: ECTCNEVERSET */ +- if (count <= 1) +- goto bad_ctc; +- +- /* 64-bit subtract - gcc just messes up with long longs */ +- __asm__("subl %2,%0\n\t" +- "sbbl %3,%1" +- :"=a" (endlow), "=d" (endhigh) +- :"g" (startlow), "g" (starthigh), +- "0" (endlow), "1" (endhigh)); +- +- /* Error: ECPUTOOFAST */ +- if (endhigh) +- goto bad_ctc; +- +- endlow /= 5; +- return endlow; ++ unsigned int i; ++ for(i = 0; i < msecs; i++) { ++ udelay(1000); ++ poll_interruptions(); + } +- +- /* +- * The CTC wasn't reliable: we got a hit on the very first read, +- * or the CPU was so fast/slow that the quotient wouldn't fit in +- * 32 bits.. +- */ +-bad_ctc: +- printf("bad_ctc\n"); +- return 0; + } + +- +-unsigned long currticks(void) ++void waiton_timer2(unsigned int ticks) + { +- static unsigned long clocks_per_tick; +- unsigned long clocks_high, clocks_low; +- unsigned long currticks; +- if (!clocks_per_tick) { +- clocks_per_tick = calibrate_tsc(); +- printf("clocks_per_tick = %d\n", clocks_per_tick); ++ load_timer2(ticks); ++ while(timer2_running()) { ++ poll_interruptions(); + } +- +- /* Read the Time Stamp Counter */ +- rdtsc(clocks_low, clocks_high); +- +- /* currticks = clocks / clocks_per_tick; */ +- __asm__("divl %1" +- :"=a" (currticks) +- :"r" (clocks_per_tick), "0" (clocks_low), "d" (clocks_high)); +- +- +- return currticks; + } +- +-#endif /* RTC_CURRTICKS */ +diff -Naur grub-0.97.orig/netboot/timer.h grub-0.97/netboot/timer.h +--- grub-0.97.orig/netboot/timer.h 2003-07-09 11:45:38.000000000 +0000 ++++ grub-0.97/netboot/timer.h 2005-08-31 19:03:35.000000000 +0000 +@@ -36,7 +36,8 @@ + #define BCD_COUNT 0x01 + + /* Timers tick over at this rate */ +-#define TICKS_PER_MS 1193 ++#define CLOCK_TICK_RATE 1193180U ++#define TICKS_PER_MS (CLOCK_TICK_RATE/1000) + + /* Parallel Peripheral Controller Port B */ + #define PPC_PORTB 0x61 +@@ -49,16 +50,19 @@ + /* Ticks must be between 0 and 65535 (0 == 65536) + because it is a 16 bit counter */ + extern void load_timer2(unsigned int ticks); +-extern inline int timer2_running(void) +-{ +- return ((inb(PPC_PORTB) & PPCB_T2OUT) == 0); +-} +- +-extern inline void waiton_timer2(unsigned int ticks) +-{ +- load_timer2(ticks); +- while ((inb(PPC_PORTB) & PPCB_T2OUT) == 0) +- ; +-} ++extern inline int timer2_running(void); ++extern void waiton_timer2(unsigned int ticks); ++extern void __load_timer2(unsigned int ticks); ++ ++extern void setup_timers(void); ++extern void ndelay(unsigned int nsecs); ++extern void udelay(unsigned int usecs); ++extern void mdelay(unsigned int msecs); ++//extern unsigned long currticks(void); ++ ++struct timeval { ++ long tv_sec; ++ long tv_usec; ++}; + + #endif /* TIMER_H */ +diff -Naur grub-0.97.orig/netboot/tlan.c grub-0.97/netboot/tlan.c +--- grub-0.97.orig/netboot/tlan.c 2003-07-09 11:45:38.000000000 +0000 ++++ grub-0.97/netboot/tlan.c 2005-09-01 00:05:20.000000000 +0000 +@@ -1,3746 +1,1814 @@ ++#define EB51 ++ ++#ifdef EB50 ++#define __unused __attribute__((unused)) ++#endif ++ + /************************************************************************** +-Etherboot - BOOTP/TFTP Bootstrap Program +-TLAN driver for Etherboot ++* ++* tlan.c -- Etherboot device driver for the Texas Instruments ThunderLAN ++* Written 2003-2003 by Timothy Legge ++* ++* This program is free software; you can redistribute it and/or modify ++* it under the terms of the GNU General Public License as published by ++* the Free Software Foundation; either version 2 of the License, or ++* (at your option) any later version. ++* ++* This program is distributed in the hope that it will be useful, ++* but WITHOUT ANY WARRANTY; without even the implied warranty of ++* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++* GNU General Public License for more details. ++* ++* You should have received a copy of the GNU General Public License ++* along with this program; if not, write to the Free Software ++* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++* ++* Portions of this code based on: ++* lan.c: Linux ThunderLan Driver: ++* ++* by James Banks ++* ++* (C) 1997-1998 Caldera, Inc. ++* (C) 1998 James Banks ++* (C) 1999-2001 Torben Mathiasen ++* (C) 2002 Samuel Chessman ++* ++* REVISION HISTORY: ++* ================ ++* v1.0 07-08-2003 timlegge Initial not quite working version ++* v1.1 07-27-2003 timlegge Sync 5.0 and 5.1 versions ++* v1.2 08-19-2003 timlegge Implement Multicast Support ++* v1.3 08-23-2003 timlegge Fix the transmit Function ++* v1.4 01-17-2004 timlegge Initial driver output cleanup ++* ++* Indent Options: indent -kr -i8 + ***************************************************************************/ + +-/* +- * This program is free software; you can redistribute it and/or +- * modify it under the terms of the GNU General Public License as +- * published by the Free Software Foundation; either version 2, or (at +- * your option) any later version. +- */ +- + /* to get some global routines like printf */ + #include "etherboot.h" + /* to get the interface to the body of the program */ + #include "nic.h" + /* to get the PCI support functions, if this is a PCI NIC */ + #include "pci.h" +-/* to get our own prototype */ +-#include "cards.h" +- +- /***************************************************************** +- * TLan Definitions +- * +- ****************************************************************/ ++#include "timer.h" ++#include "tlan.h" + +-#define TLAN_MIN_FRAME_SIZE 64 +-#define TLAN_MAX_FRAME_SIZE 1600 ++#define drv_version "v1.4" ++#define drv_date "01-17-2004" + +-#define TLAN_NUM_RX_LISTS 32 +-#define TLAN_NUM_TX_LISTS 64 ++/* NIC specific static variables go here */ ++#define HZ 100 ++#define TX_TIME_OUT (6*HZ) + +-#define TLAN_IGNORE 0 +-#define TLAN_RECORD 1 ++#ifdef EB50 ++#define cpu_to_le32(val) (val) ++#define le32_to_cpu(val) (val) ++#define virt_to_bus(x) ((unsigned long) x) ++#define bus_to_virt(x) ((unsigned long) x) ++#endif + +-#define TLAN_DBG(lvl, format, args...) if (debug&lvl) printf("TLAN: " format, ##args ); +-#define TLAN_DEBUG_GNRL 0x0001 +-#define TLAN_DEBUG_TX 0x0002 +-#define TLAN_DEBUG_RX 0x0004 +-#define TLAN_DEBUG_LIST 0x0008 +-#define TLAN_DEBUG_PROBE 0x0010 ++/* Condensed operations for readability. */ ++#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr)) ++#define le32desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr)) + +-#define MAX_TLAN_BOARDS 8 /* Max number of boards installed at a time */ + +- /***************************************************************** +- * Device Identification Definitions +- * +- ****************************************************************/ +- +-#define PCI_DEVICE_ID_NETELLIGENT_10_T2 0xB012 +-#define PCI_DEVICE_ID_NETELLIGENT_10_100_WS_5100 0xB030 +-#ifndef PCI_DEVICE_ID_OLICOM_OC2183 +-#define PCI_DEVICE_ID_OLICOM_OC2183 0x0013 +-#endif +-#ifndef PCI_DEVICE_ID_OLICOM_OC2325 +-#define PCI_DEVICE_ID_OLICOM_OC2325 0x0012 +-#endif +-#ifndef PCI_DEVICE_ID_OLICOM_OC2326 +-#define PCI_DEVICE_ID_OLICOM_OC2326 0x0014 +-#endif +-#define TLAN_ADAPTER_NONE 0x00000000 +-#define TLAN_ADAPTER_UNMANAGED_PHY 0x00000001 +-#define TLAN_ADAPTER_BIT_RATE_PHY 0x00000002 +-#define TLAN_ADAPTER_USE_INTERN_10 0x00000004 +-#define TLAN_ADAPTER_ACTIVITY_LED 0x00000008 +-#define TLAN_SPEED_DEFAULT 0 +-#define TLAN_SPEED_10 10 +-#define TLAN_SPEED_100 100 +-#define TLAN_DUPLEX_DEFAULT 0 +-#define TLAN_DUPLEX_HALF 1 +-#define TLAN_DUPLEX_FULL 2 +-#define TLAN_BUFFERS_PER_LIST 10 +-#define TLAN_LAST_BUFFER 0x80000000 +-#define TLAN_CSTAT_UNUSED 0x8000 +-#define TLAN_CSTAT_FRM_CMP 0x4000 +-#define TLAN_CSTAT_READY 0x3000 +-#define TLAN_CSTAT_EOC 0x0800 +-#define TLAN_CSTAT_RX_ERROR 0x0400 +-#define TLAN_CSTAT_PASS_CRC 0x0200 +-#define TLAN_CSTAT_DP_PR 0x0100 +- +- /***************************************************************** +- * PHY definitions +- * +- ****************************************************************/ +- +-#define TLAN_PHY_MAX_ADDR 0x1F +-#define TLAN_PHY_NONE 0x20 +- +- /***************************************************************** +- * TLan Driver Timer Definitions +- * +- ****************************************************************/ +- +-#define TLAN_TIMER_LINK_BEAT 1 +-#define TLAN_TIMER_ACTIVITY 2 +-#define TLAN_TIMER_PHY_PDOWN 3 +-#define TLAN_TIMER_PHY_PUP 4 +-#define TLAN_TIMER_PHY_RESET 5 +-#define TLAN_TIMER_PHY_START_LINK 6 +-#define TLAN_TIMER_PHY_FINISH_AN 7 +-#define TLAN_TIMER_FINISH_RESET 8 +-#define TLAN_TIMER_ACT_DELAY (HZ/10) +- +- /***************************************************************** +- * TLan Driver Eeprom Definitions +- * +- ****************************************************************/ +- +-#define TLAN_EEPROM_ACK 0 +-#define TLAN_EEPROM_STOP 1 +- +- /***************************************************************** +- * Host Register Offsets and Contents +- * +- ****************************************************************/ +- +-#define TLAN_HOST_CMD 0x00 +-#define TLAN_HC_GO 0x80000000 +-#define TLAN_HC_STOP 0x40000000 +-#define TLAN_HC_ACK 0x20000000 +-#define TLAN_HC_CS_MASK 0x1FE00000 +-#define TLAN_HC_EOC 0x00100000 +-#define TLAN_HC_RT 0x00080000 +-#define TLAN_HC_NES 0x00040000 +-#define TLAN_HC_AD_RST 0x00008000 +-#define TLAN_HC_LD_TMR 0x00004000 +-#define TLAN_HC_LD_THR 0x00002000 +-#define TLAN_HC_REQ_INT 0x00001000 +-#define TLAN_HC_INT_OFF 0x00000800 +-#define TLAN_HC_INT_ON 0x00000400 +-#define TLAN_HC_AC_MASK 0x000000FF +-#define TLAN_CH_PARM 0x04 +-#define TLAN_DIO_ADR 0x08 +-#define TLAN_DA_ADR_INC 0x8000 +-#define TLAN_DA_RAM_ADR 0x4000 +-#define TLAN_HOST_INT 0x0A +-#define TLAN_HI_IV_MASK 0x1FE0 +-#define TLAN_HI_IT_MASK 0x001C +-#define TLAN_DIO_DATA 0x0C +- +-/* ThunderLAN Internal Register DIO Offsets */ +- +-#define TLAN_NET_CMD 0x00 +-#define TLAN_NET_CMD_NRESET 0x80 +-#define TLAN_NET_CMD_NWRAP 0x40 +-#define TLAN_NET_CMD_CSF 0x20 +-#define TLAN_NET_CMD_CAF 0x10 +-#define TLAN_NET_CMD_NOBRX 0x08 +-#define TLAN_NET_CMD_DUPLEX 0x04 +-#define TLAN_NET_CMD_TRFRAM 0x02 +-#define TLAN_NET_CMD_TXPACE 0x01 +-#define TLAN_NET_SIO 0x01 +-#define TLAN_NET_SIO_MINTEN 0x80 +-#define TLAN_NET_SIO_ECLOK 0x40 +-#define TLAN_NET_SIO_ETXEN 0x20 +-#define TLAN_NET_SIO_EDATA 0x10 +-#define TLAN_NET_SIO_NMRST 0x08 +-#define TLAN_NET_SIO_MCLK 0x04 +-#define TLAN_NET_SIO_MTXEN 0x02 +-#define TLAN_NET_SIO_MDATA 0x01 +-#define TLAN_NET_STS 0x02 +-#define TLAN_NET_STS_MIRQ 0x80 +-#define TLAN_NET_STS_HBEAT 0x40 +-#define TLAN_NET_STS_TXSTOP 0x20 +-#define TLAN_NET_STS_RXSTOP 0x10 +-#define TLAN_NET_STS_RSRVD 0x0F +-#define TLAN_NET_MASK 0x03 +-#define TLAN_NET_MASK_MASK7 0x80 +-#define TLAN_NET_MASK_MASK6 0x40 +-#define TLAN_NET_MASK_MASK5 0x20 +-#define TLAN_NET_MASK_MASK4 0x10 +-#define TLAN_NET_MASK_RSRVD 0x0F +-#define TLAN_NET_CONFIG 0x04 +-#define TLAN_NET_CFG_RCLK 0x8000 +-#define TLAN_NET_CFG_TCLK 0x4000 +-#define TLAN_NET_CFG_BIT 0x2000 +-#define TLAN_NET_CFG_RXCRC 0x1000 +-#define TLAN_NET_CFG_PEF 0x0800 +-#define TLAN_NET_CFG_1FRAG 0x0400 +-#define TLAN_NET_CFG_1CHAN 0x0200 +-#define TLAN_NET_CFG_MTEST 0x0100 +-#define TLAN_NET_CFG_PHY_EN 0x0080 +-#define TLAN_NET_CFG_MSMASK 0x007F +-#define TLAN_MAN_TEST 0x06 +-#define TLAN_DEF_VENDOR_ID 0x08 +-#define TLAN_DEF_DEVICE_ID 0x0A +-#define TLAN_DEF_REVISION 0x0C +-#define TLAN_DEF_SUBCLASS 0x0D +-#define TLAN_DEF_MIN_LAT 0x0E +-#define TLAN_DEF_MAX_LAT 0x0F +-#define TLAN_AREG_0 0x10 +-#define TLAN_AREG_1 0x16 +-#define TLAN_AREG_2 0x1C +-#define TLAN_AREG_3 0x22 +-#define TLAN_HASH_1 0x28 +-#define TLAN_HASH_2 0x2C +-#define TLAN_GOOD_TX_FRMS 0x30 +-#define TLAN_TX_UNDERUNS 0x33 +-#define TLAN_GOOD_RX_FRMS 0x34 +-#define TLAN_RX_OVERRUNS 0x37 +-#define TLAN_DEFERRED_TX 0x38 +-#define TLAN_CRC_ERRORS 0x3A +-#define TLAN_CODE_ERRORS 0x3B +-#define TLAN_MULTICOL_FRMS 0x3C +-#define TLAN_SINGLECOL_FRMS 0x3E +-#define TLAN_EXCESSCOL_FRMS 0x40 +-#define TLAN_LATE_COLS 0x41 +-#define TLAN_CARRIER_LOSS 0x42 +-#define TLAN_ACOMMIT 0x43 +-#define TLAN_LED_REG 0x44 +-#define TLAN_LED_ACT 0x10 +-#define TLAN_LED_LINK 0x01 +-#define TLAN_BSIZE_REG 0x45 +-#define TLAN_MAX_RX 0x46 +-#define TLAN_INT_DIS 0x48 +-#define TLAN_ID_TX_EOC 0x04 +-#define TLAN_ID_RX_EOF 0x02 +-#define TLAN_ID_RX_EOC 0x01 +- +-/* ThunderLAN Interrupt Codes */ +- +-#define TLAN_INT_NUMBER_OF_INTS 8 +- +-#define TLAN_INT_NONE 0x0000 +-#define TLAN_INT_TX_EOF 0x0001 +-#define TLAN_INT_STAT_OVERFLOW 0x0002 +-#define TLAN_INT_RX_EOF 0x0003 +-#define TLAN_INT_DUMMY 0x0004 +-#define TLAN_INT_TX_EOC 0x0005 +-#define TLAN_INT_STATUS_CHECK 0x0006 +-#define TLAN_INT_RX_EOC 0x0007 +-#define TLAN_TLPHY_ID 0x10 +-#define TLAN_TLPHY_CTL 0x11 +-#define TLAN_TC_IGLINK 0x8000 +-#define TLAN_TC_SWAPOL 0x4000 +-#define TLAN_TC_AUISEL 0x2000 +-#define TLAN_TC_SQEEN 0x1000 +-#define TLAN_TC_MTEST 0x0800 +-#define TLAN_TC_RESERVED 0x07F8 +-#define TLAN_TC_NFEW 0x0004 +-#define TLAN_TC_INTEN 0x0002 +-#define TLAN_TC_TINT 0x0001 +-#define TLAN_TLPHY_STS 0x12 +-#define TLAN_TS_MINT 0x8000 +-#define TLAN_TS_PHOK 0x4000 +-#define TLAN_TS_POLOK 0x2000 +-#define TLAN_TS_TPENERGY 0x1000 +-#define TLAN_TS_RESERVED 0x0FFF +-#define TLAN_TLPHY_PAR 0x19 +-#define TLAN_PHY_CIM_STAT 0x0020 +-#define TLAN_PHY_SPEED_100 0x0040 +-#define TLAN_PHY_DUPLEX_FULL 0x0080 +-#define TLAN_PHY_AN_EN_STAT 0x0400 +- +- +-/* ThunderLAN MII Registers */ +- +-/* Generic MII/PHY Registers */ +- +-#define MII_GEN_CTL 0x00 +-#define MII_GC_RESET 0x8000 +-#define MII_GC_LOOPBK 0x4000 +-#define MII_GC_SPEEDSEL 0x2000 +-#define MII_GC_AUTOENB 0x1000 +-#define MII_GC_PDOWN 0x0800 +-#define MII_GC_ISOLATE 0x0400 +-#define MII_GC_AUTORSRT 0x0200 +-#define MII_GC_DUPLEX 0x0100 +-#define MII_GC_COLTEST 0x0080 +-#define MII_GC_RESERVED 0x007F +-#define MII_GEN_STS 0x01 +-#define MII_GS_100BT4 0x8000 +-#define MII_GS_100BTXFD 0x4000 +-#define MII_GS_100BTXHD 0x2000 +-#define MII_GS_10BTFD 0x1000 +-#define MII_GS_10BTHD 0x0800 +-#define MII_GS_RESERVED 0x07C0 +-#define MII_GS_AUTOCMPLT 0x0020 +-#define MII_GS_RFLT 0x0010 +-#define MII_GS_AUTONEG 0x0008 +-#define MII_GS_LINK 0x0004 +-#define MII_GS_JABBER 0x0002 +-#define MII_GS_EXTCAP 0x0001 +-#define MII_GEN_ID_HI 0x02 +-#define MII_GEN_ID_LO 0x03 +-#define MII_GIL_OUI 0xFC00 +-#define MII_GIL_MODEL 0x03F0 +-#define MII_GIL_REVISION 0x000F +-#define MII_AN_ADV 0x04 +-#define MII_AN_LPA 0x05 +-#define MII_AN_EXP 0x06 +- +-/* ThunderLAN Specific MII/PHY Registers */ +- +-#define TLAN_TC_IGLINK 0x8000 +-#define TLAN_TC_SWAPOL 0x4000 +-#define TLAN_TC_AUISEL 0x2000 +-#define TLAN_TC_SQEEN 0x1000 +-#define TLAN_TC_MTEST 0x0800 +-#define TLAN_TC_RESERVED 0x07F8 +-#define TLAN_TC_NFEW 0x0004 +-#define TLAN_TC_INTEN 0x0002 +-#define TLAN_TC_TINT 0x0001 +-#define TLAN_TS_MINT 0x8000 +-#define TLAN_TS_PHOK 0x4000 +-#define TLAN_TS_POLOK 0x2000 +-#define TLAN_TS_TPENERGY 0x1000 +-#define TLAN_TS_RESERVED 0x0FFF +-#define TLAN_PHY_CIM_STAT 0x0020 +-#define TLAN_PHY_SPEED_100 0x0040 +-#define TLAN_PHY_DUPLEX_FULL 0x0080 +-#define TLAN_PHY_AN_EN_STAT 0x0400 +- +-/* National Sem. & Level1 PHY id's */ +-#define NAT_SEM_ID1 0x2000 +-#define NAT_SEM_ID2 0x5C01 +-#define LEVEL1_ID1 0x7810 +-#define LEVEL1_ID2 0x0000 +- +-#define TLan_ClearBit( bit, port ) outb_p(inb_p(port) & ~bit, port) +-#define TLan_GetBit( bit, port ) ((int) (inb_p(port) & bit)) +-#define TLan_SetBit( bit, port ) outb_p(inb_p(port) | bit, port) +- +-typedef unsigned int u32; +-typedef unsigned short u16; +-typedef unsigned char u8; ++static void TLan_ResetLists(struct nic *nic __unused); ++static void TLan_ResetAdapter(struct nic *nic __unused); ++static void TLan_FinishReset(struct nic *nic __unused); + +-/* Routines to access internal registers. */ ++static void TLan_EeSendStart(u16); ++static int TLan_EeSendByte(u16, u8, int); ++static void TLan_EeReceiveByte(u16, u8 *, int); ++static int TLan_EeReadByte(u16 io_base, u8, u8 *); + +-inline u8 TLan_DioRead8(u16 base_addr, u16 internal_addr) +-{ +- outw(internal_addr, base_addr + TLAN_DIO_ADR); +- return (inb((base_addr + TLAN_DIO_DATA) + (internal_addr & 0x3))); +- +-} /* TLan_DioRead8 */ ++static void TLan_PhyDetect(struct nic *nic); ++static void TLan_PhyPowerDown(struct nic *nic); ++static void TLan_PhyPowerUp(struct nic *nic); + +-inline u16 TLan_DioRead16(u16 base_addr, u16 internal_addr) +-{ +- outw(internal_addr, base_addr + TLAN_DIO_ADR); +- return (inw((base_addr + TLAN_DIO_DATA) + (internal_addr & 0x2))); + +-} /* TLan_DioRead16 */ ++static void TLan_SetMac(struct nic *nic __unused, int areg, char *mac); + +-inline u32 TLan_DioRead32(u16 base_addr, u16 internal_addr) +-{ +- outw(internal_addr, base_addr + TLAN_DIO_ADR); +- return (inl(base_addr + TLAN_DIO_DATA)); ++static void TLan_PhyReset(struct nic *nic); ++static void TLan_PhyStartLink(struct nic *nic); ++static void TLan_PhyFinishAutoNeg(struct nic *nic); + +-} /* TLan_DioRead32 */ ++#ifdef MONITOR ++static void TLan_PhyMonitor(struct nic *nic); ++#endif + +-inline void TLan_DioWrite8(u16 base_addr, u16 internal_addr, u8 data) +-{ +- outw(internal_addr, base_addr + TLAN_DIO_ADR); +- outb(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x3)); + +-} ++static void refill_rx(struct nic *nic __unused); + +-inline void TLan_DioWrite16(u16 base_addr, u16 internal_addr, u16 data) +-{ +- outw(internal_addr, base_addr + TLAN_DIO_ADR); +- outw(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x2)); ++static int TLan_MiiReadReg(struct nic *nic __unused, u16, u16, u16 *); ++static void TLan_MiiSendData(u16, u32, unsigned); ++static void TLan_MiiSync(u16); ++static void TLan_MiiWriteReg(struct nic *nic __unused, u16, u16, u16); + +-} + +-inline void TLan_DioWrite32(u16 base_addr, u16 internal_addr, u32 data) +-{ +- outw(internal_addr, base_addr + TLAN_DIO_ADR); +- outl(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x2)); ++const char *media[] = { ++ "10BaseT-HD ", "10BaseT-FD ", "100baseTx-HD ", ++ "100baseTx-FD", "100baseT4", 0 ++}; + +-} ++/* This much match tlan_pci_tbl[]! */ ++enum tlan_nics { ++ NETEL10 = 0, NETEL100 = 1, NETFLEX3I = 2, THUNDER = 3, NETFLEX3B = ++ 4, NETEL100PI = 5, ++ NETEL100D = 6, NETEL100I = 7, OC2183 = 8, OC2325 = 9, OC2326 = ++ 10, NETELLIGENT_10_100_WS_5100 = 11, ++ NETELLIGENT_10_T2 = 12 ++}; + +-/* NIC specific static variables go here */ ++struct pci_id_info { ++ const char *name; ++ int nic_id; ++ struct match_info { ++ u32 pci, pci_mask, subsystem, subsystem_mask; ++ u32 revision, revision_mask; /* Only 8 bits. */ ++ } id; ++ u32 flags; ++ u16 addrOfs; /* Address Offset */ ++}; + +-/***************************************************************************** +-****************************************************************************** ++static struct pci_id_info tlan_pci_tbl[] = { ++ {"Compaq Netelligent 10 T PCI UTP", NETEL10, ++ {0xae340e11, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_ACTIVITY_LED, 0x83}, ++ {"Compaq Netelligent 10/100 TX PCI UTP", NETEL100, ++ {0xae320e11, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_ACTIVITY_LED, 0x83}, ++ {"Compaq Integrated NetFlex-3/P", NETFLEX3I, ++ {0xae350e11, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_NONE, 0x83}, ++ {"Compaq NetFlex-3/P", THUNDER, ++ {0xf1300e11, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_UNMANAGED_PHY | TLAN_ADAPTER_BIT_RATE_PHY, 0x83}, ++ {"Compaq NetFlex-3/P", NETFLEX3B, ++ {0xf1500e11, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_NONE, 0x83}, ++ {"Compaq Netelligent Integrated 10/100 TX UTP", NETEL100PI, ++ {0xae430e11, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_ACTIVITY_LED, 0x83}, ++ {"Compaq Netelligent Dual 10/100 TX PCI UTP", NETEL100D, ++ {0xae400e11, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_NONE, 0x83}, ++ {"Compaq Netelligent 10/100 TX Embedded UTP", NETEL100I, ++ {0xb0110e11, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_NONE, 0x83}, ++ {"Olicom OC-2183/2185", OC2183, ++ {0x0013108d, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_USE_INTERN_10, 0x83}, ++ {"Olicom OC-2325", OC2325, ++ {0x0012108d, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_UNMANAGED_PHY, 0xF8}, ++ {"Olicom OC-2326", OC2326, ++ {0x0014108d, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_USE_INTERN_10, 0xF8}, ++ {"Compaq Netelligent 10/100 TX UTP", NETELLIGENT_10_100_WS_5100, ++ {0xb0300e11, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_ACTIVITY_LED, 0x83}, ++ {"Compaq Netelligent 10 T/2 PCI UTP/Coax", NETELLIGENT_10_T2, ++ {0xb0120e11, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_NONE, 0x83}, ++ {"Compaq NetFlex-3/E", 0, /* EISA card */ ++ {0, 0, 0, 0, 0, 0}, ++ TLAN_ADAPTER_ACTIVITY_LED | TLAN_ADAPTER_UNMANAGED_PHY | ++ TLAN_ADAPTER_BIT_RATE_PHY, 0x83}, ++ {"Compaq NetFlex-3/E", 0, /* EISA card */ ++ {0, 0, 0, 0, 0, 0}, ++ TLAN_ADAPTER_ACTIVITY_LED, 0x83}, ++ {0, 0, ++ {0, 0, 0, 0, 0, 0}, ++ 0, 0}, ++}; + +- ThunderLAN Driver Eeprom routines + +- The Compaq Netelligent 10 and 10/100 cards use a Microchip 24C02A +- EEPROM. These functions are based on information in Microchip's +- data sheet. I don't know how well this functions will work with +- other EEPROMs. ++struct TLanList { ++ u32 forward; ++ u16 cStat; ++ u16 frameSize; ++ struct { ++ u32 count; ++ u32 address; ++ } buffer[TLAN_BUFFERS_PER_LIST]; ++}; + +-****************************************************************************** +-*****************************************************************************/ + +- /*************************************************************** +- * TLan_EeSendStart +- * +- * Returns: +- * Nothing +- * Parms: +- * io_base The IO port base address for the +- * TLAN device with the EEPROM to +- * use. +- * +- * This function sends a start cycle to an EEPROM attached +- * to a TLAN chip. +- * +- **************************************************************/ + +-static void TLan_EeSendStart( u16 io_base ) +-{ +- u16 sio; ++struct TLanList tx_ring[TLAN_NUM_TX_LISTS]; ++static unsigned char txb[TLAN_MAX_FRAME_SIZE * TLAN_NUM_TX_LISTS]; + +- outw( TLAN_NET_SIO, io_base + TLAN_DIO_ADR ); +- sio = io_base + TLAN_DIO_DATA + TLAN_NET_SIO; ++struct TLanList rx_ring[TLAN_NUM_RX_LISTS]; ++static unsigned char rxb[TLAN_MAX_FRAME_SIZE * TLAN_NUM_RX_LISTS]; + +- TLan_SetBit( TLAN_NET_SIO_ECLOK, sio ); +- TLan_SetBit( TLAN_NET_SIO_EDATA, sio ); +- TLan_SetBit( TLAN_NET_SIO_ETXEN, sio ); +- TLan_ClearBit( TLAN_NET_SIO_EDATA, sio ); +- TLan_ClearBit( TLAN_NET_SIO_ECLOK, sio ); ++typedef u8 TLanBuffer[TLAN_MAX_FRAME_SIZE]; + +-} /* TLan_EeSendStart */ + +- /*************************************************************** +- * TLan_EeSendByte +- * +- * Returns: +- * If the correct ack was received, 0, otherwise 1 +- * Parms: io_base The IO port base address for the +- * TLAN device with the EEPROM to +- * use. +- * data The 8 bits of information to +- * send to the EEPROM. +- * stop If TLAN_EEPROM_STOP is passed, a +- * stop cycle is sent after the +- * byte is sent after the ack is +- * read. +- * +- * This function sends a byte on the serial EEPROM line, +- * driving the clock to send each bit. The function then +- * reverses transmission direction and reads an acknowledge +- * bit. +- * +- **************************************************************/ ++int chip_idx; + +-static int TLan_EeSendByte( u16 io_base, u8 data, int stop ) +-{ +- int err; +- u8 place; +- u16 sio; + +- outw( TLAN_NET_SIO, io_base + TLAN_DIO_ADR ); +- sio = io_base + TLAN_DIO_DATA + TLAN_NET_SIO; ++/***************************************************************** ++* TLAN Private Information Structure ++* ++****************************************************************/ ++struct tlan_private { ++ unsigned short vendor_id; /* PCI Vendor code */ ++ unsigned short dev_id; /* PCI Device code */ ++ const char *nic_name; ++ u8 *padBuffer; ++ u8 *rxBuffer; ++ struct TLanList *rx_head_desc; ++ u32 rxHead; ++ u32 rxTail; ++ u32 rxEocCount; ++ unsigned int cur_rx, dirty_rx; /* Producer/consumer ring indicies */ ++ unsigned int cur_tx, dirty_tx; ++ unsigned rx_buf_sz; /* Based on mtu + Slack */ ++ struct TLanList *txList; ++ struct TLanList *rxList; ++ u8 *txBuffer; ++ u32 txHead; ++ u32 txInProgress; ++ u32 txTail; ++ int eoc; ++ u32 txBusyCount; ++ u32 phyOnline; ++ u32 timerSetAt; ++ u32 timerType; ++ u32 adapterRev; ++ u32 aui; ++ u32 debug; ++ u32 duplex; ++ u32 phy[2]; ++ u32 phyNum; ++ u32 speed; ++ u8 tlanRev; ++ u8 tlanFullDuplex; ++ char devName[8]; ++ u8 link; ++ u8 is_eisa; ++ u8 neg_be_verbose; ++} TLanPrivateInfo; + +- /* Assume clock is low, tx is enabled; */ +- for ( place = 0x80; place != 0; place >>= 1 ) { +- if ( place & data ) +- TLan_SetBit( TLAN_NET_SIO_EDATA, sio ); +- else +- TLan_ClearBit( TLAN_NET_SIO_EDATA, sio ); +- TLan_SetBit( TLAN_NET_SIO_ECLOK, sio ); +- TLan_ClearBit( TLAN_NET_SIO_ECLOK, sio ); +- } +- TLan_ClearBit( TLAN_NET_SIO_ETXEN, sio ); +- TLan_SetBit( TLAN_NET_SIO_ECLOK, sio ); +- err = TLan_GetBit( TLAN_NET_SIO_EDATA, sio ); +- TLan_ClearBit( TLAN_NET_SIO_ECLOK, sio ); +- TLan_SetBit( TLAN_NET_SIO_ETXEN, sio ); ++static struct tlan_private *priv; + +- if ( ( ! err ) && stop ) { +- TLan_ClearBit( TLAN_NET_SIO_EDATA, sio ); /* STOP, raise data while clock is high */ +- TLan_SetBit( TLAN_NET_SIO_ECLOK, sio ); +- TLan_SetBit( TLAN_NET_SIO_EDATA, sio ); +- } ++u32 BASE; + +- return ( err ); + +-} /* TLan_EeSendByte */ + +- /*************************************************************** +- * TLan_EeReceiveByte +- * +- * Returns: +- * Nothing +- * Parms: +- * io_base The IO port base address for the +- * TLAN device with the EEPROM to +- * use. +- * data An address to a char to hold the +- * data sent from the EEPROM. +- * stop If TLAN_EEPROM_STOP is passed, a +- * stop cycle is sent after the +- * byte is received, and no ack is +- * sent. +- * +- * This function receives 8 bits of data from the EEPROM +- * over the serial link. It then sends and ack bit, or no +- * ack and a stop bit. This function is used to retrieve +- * data after the address of a byte in the EEPROM has been +- * sent. +- * +- **************************************************************/ ++/*************************************************************** ++* TLan_ResetLists ++* ++* Returns: ++* Nothing ++* Parms: ++* dev The device structure with the list ++* stuctures to be reset. ++* ++* This routine sets the variables associated with managing ++* the TLAN lists to their initial values. ++* ++**************************************************************/ + +-static void TLan_EeReceiveByte( u16 io_base, u8 *data, int stop ) ++void TLan_ResetLists(struct nic *nic __unused) + { +- u8 place; +- u16 sio; + +- outw( TLAN_NET_SIO, io_base + TLAN_DIO_ADR ); +- sio = io_base + TLAN_DIO_DATA + TLAN_NET_SIO; +- *data = 0; ++ int i; ++ struct TLanList *list; ++ priv->txHead = 0; ++ priv->txTail = 0; + +- /* Assume clock is low, tx is enabled; */ +- TLan_ClearBit( TLAN_NET_SIO_ETXEN, sio ); +- for ( place = 0x80; place; place >>= 1 ) { +- TLan_SetBit( TLAN_NET_SIO_ECLOK, sio ); +- if ( TLan_GetBit( TLAN_NET_SIO_EDATA, sio ) ) +- *data |= place; +- TLan_ClearBit( TLAN_NET_SIO_ECLOK, sio ); ++ for (i = 0; i < TLAN_NUM_TX_LISTS; i++) { ++ list = &tx_ring[i]; ++ list->cStat = TLAN_CSTAT_UNUSED; ++/* list->buffer[0].address = 0; */ ++ list->buffer[0].address = virt_to_bus(txb + ++ (i * TLAN_MAX_FRAME_SIZE)); ++ list->buffer[2].count = 0; ++ list->buffer[2].address = 0; ++ list->buffer[9].address = 0; ++/* list->forward = 0; */ + } + +- TLan_SetBit( TLAN_NET_SIO_ETXEN, sio ); +- if ( ! stop ) { +- TLan_ClearBit( TLAN_NET_SIO_EDATA, sio ); /* Ack = 0 */ +- TLan_SetBit( TLAN_NET_SIO_ECLOK, sio ); +- TLan_ClearBit( TLAN_NET_SIO_ECLOK, sio ); +- } else { +- TLan_SetBit( TLAN_NET_SIO_EDATA, sio ); /* No ack = 1 (?) */ +- TLan_SetBit( TLAN_NET_SIO_ECLOK, sio ); +- TLan_ClearBit( TLAN_NET_SIO_ECLOK, sio ); +- TLan_ClearBit( TLAN_NET_SIO_EDATA, sio ); /* STOP, raise data while clock is high */ +- TLan_SetBit( TLAN_NET_SIO_ECLOK, sio ); +- TLan_SetBit( TLAN_NET_SIO_EDATA, sio ); +- } ++ priv->cur_rx = 0; ++ priv->rx_buf_sz = (TLAN_MAX_FRAME_SIZE); ++ priv->rx_head_desc = &rx_ring[0]; ++ ++ /* Initialize all the Rx descriptors */ ++ for (i = 0; i < TLAN_NUM_RX_LISTS; i++) { ++ rx_ring[i].forward = virt_to_le32desc(&rx_ring[i + 1]); ++ rx_ring[i].cStat = TLAN_CSTAT_READY; ++ rx_ring[i].frameSize = TLAN_MAX_FRAME_SIZE; ++ rx_ring[i].buffer[0].count = ++ TLAN_MAX_FRAME_SIZE | TLAN_LAST_BUFFER; ++ rx_ring[i].buffer[0].address = ++ virt_to_le32desc(&rxb[i * TLAN_MAX_FRAME_SIZE]); ++ rx_ring[i].buffer[1].count = 0; ++ rx_ring[i].buffer[1].address = 0; ++ } ++ ++ /* Mark the last entry as wrapping the ring */ ++ rx_ring[i - 1].forward = virt_to_le32desc(&rx_ring[0]); ++ priv->dirty_rx = (unsigned int) (i - TLAN_NUM_RX_LISTS); + +-} /* TLan_EeReceiveByte */ ++} /* TLan_ResetLists */ + +- /*************************************************************** +- * TLan_EeReadByte +- * +- * Returns: +- * No error = 0, else, the stage at which the error +- * occurred. +- * Parms: +- * io_base The IO port base address for the +- * TLAN device with the EEPROM to +- * use. +- * ee_addr The address of the byte in the +- * EEPROM whose contents are to be +- * retrieved. +- * data An address to a char to hold the +- * data obtained from the EEPROM. +- * +- * This function reads a byte of information from an byte +- * cell in the EEPROM. +- * +- **************************************************************/ ++/*************************************************************** ++* TLan_Reset ++* ++* Returns: ++* 0 ++* Parms: ++* dev Pointer to device structure of adapter ++* to be reset. ++* ++* This function resets the adapter and it's physical ++* device. See Chap. 3, pp. 9-10 of the "ThunderLAN ++* Programmer's Guide" for details. The routine tries to ++* implement what is detailed there, though adjustments ++* have been made. ++* ++**************************************************************/ + +-static int TLan_EeReadByte( u16 io_base, u8 ee_addr, u8 *data ) ++void TLan_ResetAdapter(struct nic *nic __unused) + { +- int err; +- unsigned long flags = 0; +- int ret=0; ++ int i; ++ u32 addr; ++ u32 data; ++ u8 data8; + +- TLan_EeSendStart( io_base ); +- err = TLan_EeSendByte( io_base, 0xA0, TLAN_EEPROM_ACK ); +- if (err) +- { +- ret=1; +- goto fail; +- } +- err = TLan_EeSendByte( io_base, ee_addr, TLAN_EEPROM_ACK ); +- if (err) +- { +- ret=2; +- goto fail; +- } +- TLan_EeSendStart( io_base ); +- err = TLan_EeSendByte( io_base, 0xA1, TLAN_EEPROM_ACK ); +- if (err) +- { +- ret=3; +- goto fail; +- } +- TLan_EeReceiveByte( io_base, data, TLAN_EEPROM_STOP ); +-fail: ++ priv->tlanFullDuplex = FALSE; ++ priv->phyOnline = 0; ++/* 1. Assert reset bit. */ + +- return ret; ++ data = inl(BASE + TLAN_HOST_CMD); ++ data |= TLAN_HC_AD_RST; ++ outl(data, BASE + TLAN_HOST_CMD); + +-} /* TLan_EeReadByte */ ++ udelay(1000); + +-#if 0 +-/* Not yet converted from Linux driver */ +-/***************************************************************************** +-****************************************************************************** ++/* 2. Turn off interrupts. ( Probably isn't necessary ) */ + +- ThunderLAN Driver PHY Layer Routines ++ data = inl(BASE + TLAN_HOST_CMD); ++ data |= TLAN_HC_INT_OFF; ++ outl(data, BASE + TLAN_HOST_CMD); ++/* 3. Clear AREGs and HASHs. */ + +-****************************************************************************** +-*****************************************************************************/ ++ for (i = TLAN_AREG_0; i <= TLAN_HASH_2; i += 4) { ++ TLan_DioWrite32(BASE, (u16) i, 0); ++ } + +- /********************************************************************* +- * TLan_PhyPrint +- * +- * Returns: +- * Nothing +- * Parms: +- * dev A pointer to the device structure of the +- * TLAN device having the PHYs to be detailed. +- * +- * This function prints the registers a PHY (aka tranceiver). +- * +- ********************************************************************/ ++/* 4. Setup NetConfig register. */ + +-void TLan_PhyPrint( struct net_device *dev ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- u16 i, data0, data1, data2, data3, phy; ++ data = ++ TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN | TLAN_NET_CFG_PHY_EN; ++ TLan_DioWrite16(BASE, TLAN_NET_CONFIG, (u16) data); + +- phy = priv->phy[priv->phyNum]; ++/* 5. Load Ld_Tmr and Ld_Thr in HOST_CMD. */ + +- if ( priv->adapter->flags & TLAN_ADAPTER_UNMANAGED_PHY ) { +- printk( "TLAN: Device %s, Unmanaged PHY.\n", dev->name ); +- } else if ( phy <= TLAN_PHY_MAX_ADDR ) { +- printk( "TLAN: Device %s, PHY 0x%02x.\n", dev->name, phy ); +- printk( "TLAN: Off. +0 +1 +2 +3 \n" ); +- for ( i = 0; i < 0x20; i+= 4 ) { +- printk( "TLAN: 0x%02x", i ); +- TLan_MiiReadReg( dev, phy, i, &data0 ); +- printk( " 0x%04hx", data0 ); +- TLan_MiiReadReg( dev, phy, i + 1, &data1 ); +- printk( " 0x%04hx", data1 ); +- TLan_MiiReadReg( dev, phy, i + 2, &data2 ); +- printk( " 0x%04hx", data2 ); +- TLan_MiiReadReg( dev, phy, i + 3, &data3 ); +- printk( " 0x%04hx\n", data3 ); +- } +- } else { +- printk( "TLAN: Device %s, Invalid PHY.\n", dev->name ); +- } ++ outl(TLAN_HC_LD_TMR | 0x3f, BASE + TLAN_HOST_CMD); ++ outl(TLAN_HC_LD_THR | 0x0, BASE + TLAN_HOST_CMD); + +-} /* TLan_PhyPrint */ ++/* 6. Unreset the MII by setting NMRST (in NetSio) to 1. */ + +- /********************************************************************* +- * TLan_PhyDetect +- * +- * Returns: +- * Nothing +- * Parms: +- * dev A pointer to the device structure of the adapter +- * for which the PHY needs determined. +- * +- * So far I've found that adapters which have external PHYs +- * may also use the internal PHY for part of the functionality. +- * (eg, AUI/Thinnet). This function finds out if this TLAN +- * chip has an internal PHY, and then finds the first external +- * PHY (starting from address 0) if it exists). +- * +- ********************************************************************/ ++ outw(TLAN_NET_SIO, BASE + TLAN_DIO_ADR); ++ addr = BASE + TLAN_DIO_DATA + TLAN_NET_SIO; ++ TLan_SetBit(TLAN_NET_SIO_NMRST, addr); + +-void TLan_PhyDetect( struct net_device *dev ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- u16 control; +- u16 hi; +- u16 lo; +- u32 phy; ++/* 7. Setup the remaining registers. */ + +- if ( priv->adapter->flags & TLAN_ADAPTER_UNMANAGED_PHY ) { +- priv->phyNum = 0xFFFF; +- return; ++ if (priv->tlanRev >= 0x30) { ++ data8 = TLAN_ID_TX_EOC | TLAN_ID_RX_EOC; ++ TLan_DioWrite8(BASE, TLAN_INT_DIS, data8); + } ++ TLan_PhyDetect(nic); ++ data = TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN; + +- TLan_MiiReadReg( dev, TLAN_PHY_MAX_ADDR, MII_GEN_ID_HI, &hi ); +- +- if ( hi != 0xFFFF ) { +- priv->phy[0] = TLAN_PHY_MAX_ADDR; +- } else { +- priv->phy[0] = TLAN_PHY_NONE; ++ if (tlan_pci_tbl[chip_idx].flags & TLAN_ADAPTER_BIT_RATE_PHY) { ++ data |= TLAN_NET_CFG_BIT; ++ if (priv->aui == 1) { ++ TLan_DioWrite8(BASE, TLAN_ACOMMIT, 0x0a); ++ } else if (priv->duplex == TLAN_DUPLEX_FULL) { ++ TLan_DioWrite8(BASE, TLAN_ACOMMIT, 0x00); ++ priv->tlanFullDuplex = TRUE; ++ } else { ++ TLan_DioWrite8(BASE, TLAN_ACOMMIT, 0x08); ++ } + } + +- priv->phy[1] = TLAN_PHY_NONE; +- for ( phy = 0; phy <= TLAN_PHY_MAX_ADDR; phy++ ) { +- TLan_MiiReadReg( dev, phy, MII_GEN_CTL, &control ); +- TLan_MiiReadReg( dev, phy, MII_GEN_ID_HI, &hi ); +- TLan_MiiReadReg( dev, phy, MII_GEN_ID_LO, &lo ); +- if ( ( control != 0xFFFF ) || ( hi != 0xFFFF ) || ( lo != 0xFFFF ) ) { +- TLAN_DBG( TLAN_DEBUG_GNRL, "PHY found at %02x %04x %04x %04x\n", phy, control, hi, lo ); +- if ( ( priv->phy[1] == TLAN_PHY_NONE ) && ( phy != TLAN_PHY_MAX_ADDR ) ) { +- priv->phy[1] = phy; +- } +- } ++ if (priv->phyNum == 0) { ++ data |= TLAN_NET_CFG_PHY_EN; + } ++ TLan_DioWrite16(BASE, TLAN_NET_CONFIG, (u16) data); + +- if ( priv->phy[1] != TLAN_PHY_NONE ) { +- priv->phyNum = 1; +- } else if ( priv->phy[0] != TLAN_PHY_NONE ) { +- priv->phyNum = 0; ++ if (tlan_pci_tbl[chip_idx].flags & TLAN_ADAPTER_UNMANAGED_PHY) { ++ TLan_FinishReset(nic); + } else { +- printk( "TLAN: Cannot initialize device, no PHY was found!\n" ); ++ TLan_PhyPowerDown(nic); + } + +-} /* TLan_PhyDetect */ ++} /* TLan_ResetAdapter */ + +-void TLan_PhyPowerDown( struct net_device *dev ) ++void TLan_FinishReset(struct nic *nic) + { +- TLanPrivateInfo *priv = dev->priv; +- u16 value; + +- TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Powering down PHY(s).\n", dev->name ); +- value = MII_GC_PDOWN | MII_GC_LOOPBK | MII_GC_ISOLATE; +- TLan_MiiSync( dev->base_addr ); +- TLan_MiiWriteReg( dev, priv->phy[priv->phyNum], MII_GEN_CTL, value ); +- if ( ( priv->phyNum == 0 ) && ( priv->phy[1] != TLAN_PHY_NONE ) && ( ! ( priv->adapter->flags & TLAN_ADAPTER_USE_INTERN_10 ) ) ) { +- TLan_MiiSync( dev->base_addr ); +- TLan_MiiWriteReg( dev, priv->phy[1], MII_GEN_CTL, value ); ++ u8 data; ++ u32 phy; ++ u8 sio; ++ u16 status; ++ u16 partner; ++ u16 tlphy_ctl; ++ u16 tlphy_par; ++ u16 tlphy_id1, tlphy_id2; ++ int i; ++ ++ phy = priv->phy[priv->phyNum]; ++ ++ data = TLAN_NET_CMD_NRESET | TLAN_NET_CMD_NWRAP; ++ if (priv->tlanFullDuplex) { ++ data |= TLAN_NET_CMD_DUPLEX; + } ++ TLan_DioWrite8(BASE, TLAN_NET_CMD, data); ++ data = TLAN_NET_MASK_MASK4 | TLAN_NET_MASK_MASK5; ++ if (priv->phyNum == 0) { ++ data |= TLAN_NET_MASK_MASK7; ++ } ++ TLan_DioWrite8(BASE, TLAN_NET_MASK, data); ++ TLan_DioWrite16(BASE, TLAN_MAX_RX, ((1536) + 7) & ~7); ++ TLan_MiiReadReg(nic, phy, MII_GEN_ID_HI, &tlphy_id1); ++ TLan_MiiReadReg(nic, phy, MII_GEN_ID_LO, &tlphy_id2); + +- /* Wait for 50 ms and powerup +- * This is abitrary. It is intended to make sure the +- * tranceiver settles. +- */ +- TLan_SetTimer( dev, (HZ/20), TLAN_TIMER_PHY_PUP ); ++ if ((tlan_pci_tbl[chip_idx].flags & TLAN_ADAPTER_UNMANAGED_PHY) ++ || (priv->aui)) { ++ status = MII_GS_LINK; ++ printf("TLAN: %s: Link forced.\n", priv->nic_name); ++ } else { ++ TLan_MiiReadReg(nic, phy, MII_GEN_STS, &status); ++ udelay(1000); ++ TLan_MiiReadReg(nic, phy, MII_GEN_STS, &status); ++ if ((status & MII_GS_LINK) && /* We only support link info on Nat.Sem. PHY's */ ++ (tlphy_id1 == NAT_SEM_ID1) ++ && (tlphy_id2 == NAT_SEM_ID2)) { ++ TLan_MiiReadReg(nic, phy, MII_AN_LPA, &partner); ++ TLan_MiiReadReg(nic, phy, TLAN_TLPHY_PAR, ++ &tlphy_par); + +-} /* TLan_PhyPowerDown */ ++ printf("TLAN: %s: Link active with ", ++ priv->nic_name); ++ if (!(tlphy_par & TLAN_PHY_AN_EN_STAT)) { ++ printf("forced 10%sMbps %s-Duplex\n", ++ tlphy_par & TLAN_PHY_SPEED_100 ? "" ++ : "0", ++ tlphy_par & TLAN_PHY_DUPLEX_FULL ? ++ "Full" : "Half"); ++ } else { ++ printf ++ ("AutoNegotiation enabled, at 10%sMbps %s-Duplex\n", ++ tlphy_par & TLAN_PHY_SPEED_100 ? "" : ++ "0", ++ tlphy_par & TLAN_PHY_DUPLEX_FULL ? ++ "Full" : "Half"); ++ printf("TLAN: Partner capability: "); ++ for (i = 5; i <= 10; i++) ++ if (partner & (1 << i)) ++ printf("%s", media[i - 5]); ++ printf("\n"); ++ } + +-void TLan_PhyPowerUp( struct net_device *dev ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- u16 value; ++ TLan_DioWrite8(BASE, TLAN_LED_REG, TLAN_LED_LINK); ++#ifdef MONITOR ++ /* We have link beat..for now anyway */ ++ priv->link = 1; ++ /*Enabling link beat monitoring */ ++ /* TLan_SetTimer( nic, (10*HZ), TLAN_TIMER_LINK_BEAT ); */ ++ mdelay(10000); ++ TLan_PhyMonitor(nic); ++#endif ++ } else if (status & MII_GS_LINK) { ++ printf("TLAN: %s: Link active\n", priv->nic_name); ++ TLan_DioWrite8(BASE, TLAN_LED_REG, TLAN_LED_LINK); ++ } ++ } + +- TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Powering up PHY.\n", dev->name ); +- TLan_MiiSync( dev->base_addr ); +- value = MII_GC_LOOPBK; +- TLan_MiiWriteReg( dev, priv->phy[priv->phyNum], MII_GEN_CTL, value ); +- TLan_MiiSync(dev->base_addr); +- /* Wait for 500 ms and reset the +- * tranceiver. The TLAN docs say both 50 ms and +- * 500 ms, so do the longer, just in case. +- */ +- TLan_SetTimer( dev, (HZ/20), TLAN_TIMER_PHY_RESET ); ++ if (priv->phyNum == 0) { ++ TLan_MiiReadReg(nic, phy, TLAN_TLPHY_CTL, &tlphy_ctl); ++ tlphy_ctl |= TLAN_TC_INTEN; ++ TLan_MiiWriteReg(nic, phy, TLAN_TLPHY_CTL, tlphy_ctl); ++ sio = TLan_DioRead8(BASE, TLAN_NET_SIO); ++ sio |= TLAN_NET_SIO_MINTEN; ++ TLan_DioWrite8(BASE, TLAN_NET_SIO, sio); ++ } + +-} /* TLan_PhyPowerUp */ ++ if (status & MII_GS_LINK) { ++ TLan_SetMac(nic, 0, nic->node_addr); ++ priv->phyOnline = 1; ++ outb((TLAN_HC_INT_ON >> 8), BASE + TLAN_HOST_CMD + 1); ++/* if ( debug >= 1 && debug != TLAN_DEBUG_PROBE ) { ++ outb( ( TLAN_HC_REQ_INT >> 8 ), BASE + TLAN_HOST_CMD + 1 ); ++ } + +-void TLan_PhyReset( struct net_device *dev ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- u16 phy; +- u16 value; ++ */ ++ outl(virt_to_bus(&rx_ring), BASE + TLAN_CH_PARM); ++ outl(TLAN_HC_GO | TLAN_HC_RT, BASE + TLAN_HOST_CMD); ++ } else { ++ printf ++ ("TLAN: %s: Link inactive, will retry in 10 secs...\n", ++ priv->nic_name); ++ /* TLan_SetTimer( nic, (10*HZ), TLAN_TIMER_FINISH_RESET ); */ ++ mdelay(10000); ++ TLan_FinishReset(nic); ++ return; + +- phy = priv->phy[priv->phyNum]; ++ } + +- TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Reseting PHY.\n", dev->name ); +- TLan_MiiSync( dev->base_addr ); +- value = MII_GC_LOOPBK | MII_GC_RESET; +- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, value ); +- TLan_MiiReadReg( dev, phy, MII_GEN_CTL, &value ); +- while ( value & MII_GC_RESET ) { +- TLan_MiiReadReg( dev, phy, MII_GEN_CTL, &value ); +- } +- +- /* Wait for 500 ms and initialize. +- * I don't remember why I wait this long. +- * I've changed this to 50ms, as it seems long enough. +- */ +- TLan_SetTimer( dev, (HZ/20), TLAN_TIMER_PHY_START_LINK ); +- +-} /* TLan_PhyReset */ +- +-void TLan_PhyStartLink( struct net_device *dev ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- u16 ability; +- u16 control; +- u16 data; +- u16 phy; +- u16 status; +- u16 tctl; +- +- phy = priv->phy[priv->phyNum]; +- TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Trying to activate link.\n", dev->name ); +- TLan_MiiReadReg( dev, phy, MII_GEN_STS, &status ); +- TLan_MiiReadReg( dev, phy, MII_GEN_STS, &ability ); +- +- if ( ( status & MII_GS_AUTONEG ) && +- ( ! priv->aui ) ) { +- ability = status >> 11; +- if ( priv->speed == TLAN_SPEED_10 && +- priv->duplex == TLAN_DUPLEX_HALF) { +- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x0000); +- } else if ( priv->speed == TLAN_SPEED_10 && +- priv->duplex == TLAN_DUPLEX_FULL) { +- priv->tlanFullDuplex = TRUE; +- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x0100); +- } else if ( priv->speed == TLAN_SPEED_100 && +- priv->duplex == TLAN_DUPLEX_HALF) { +- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x2000); +- } else if ( priv->speed == TLAN_SPEED_100 && +- priv->duplex == TLAN_DUPLEX_FULL) { +- priv->tlanFullDuplex = TRUE; +- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x2100); +- } else { +- +- /* Set Auto-Neg advertisement */ +- TLan_MiiWriteReg( dev, phy, MII_AN_ADV, (ability << 5) | 1); +- /* Enablee Auto-Neg */ +- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x1000 ); +- /* Restart Auto-Neg */ +- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x1200 ); +- /* Wait for 4 sec for autonegotiation +- * to complete. The max spec time is less than this +- * but the card need additional time to start AN. +- * .5 sec should be plenty extra. +- */ +- printk( "TLAN: %s: Starting autonegotiation.\n", dev->name ); +- TLan_SetTimer( dev, (2*HZ), TLAN_TIMER_PHY_FINISH_AN ); +- return; +- } +- +- } +- +- if ( ( priv->aui ) && ( priv->phyNum != 0 ) ) { +- priv->phyNum = 0; +- data = TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN | TLAN_NET_CFG_PHY_EN; +- TLan_DioWrite16( dev->base_addr, TLAN_NET_CONFIG, data ); +- TLan_SetTimer( dev, (40*HZ/1000), TLAN_TIMER_PHY_PDOWN ); +- return; +- } else if ( priv->phyNum == 0 ) { +- TLan_MiiReadReg( dev, phy, TLAN_TLPHY_CTL, &tctl ); +- if ( priv->aui ) { +- tctl |= TLAN_TC_AUISEL; +- } else { +- tctl &= ~TLAN_TC_AUISEL; +- control = 0; +- if ( priv->duplex == TLAN_DUPLEX_FULL ) { +- control |= MII_GC_DUPLEX; +- priv->tlanFullDuplex = TRUE; +- } +- if ( priv->speed == TLAN_SPEED_100 ) { +- control |= MII_GC_SPEEDSEL; +- } +- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, control ); +- } +- TLan_MiiWriteReg( dev, phy, TLAN_TLPHY_CTL, tctl ); +- } +- +- /* Wait for 2 sec to give the tranceiver time +- * to establish link. +- */ +- TLan_SetTimer( dev, (4*HZ), TLAN_TIMER_FINISH_RESET ); +- +-} /* TLan_PhyStartLink */ +- +-void TLan_PhyFinishAutoNeg( struct net_device *dev ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- u16 an_adv; +- u16 an_lpa; +- u16 data; +- u16 mode; +- u16 phy; +- u16 status; +- +- phy = priv->phy[priv->phyNum]; +- +- TLan_MiiReadReg( dev, phy, MII_GEN_STS, &status ); +- udelay( 1000 ); +- TLan_MiiReadReg( dev, phy, MII_GEN_STS, &status ); +- +- if ( ! ( status & MII_GS_AUTOCMPLT ) ) { +- /* Wait for 8 sec to give the process +- * more time. Perhaps we should fail after a while. +- */ +- if (!priv->neg_be_verbose++) { +- printk(KERN_INFO "TLAN: Giving autonegotiation more time.\n"); +- printk(KERN_INFO "TLAN: Please check that your adapter has\n"); +- printk(KERN_INFO "TLAN: been properly connected to a HUB or Switch.\n"); +- printk(KERN_INFO "TLAN: Trying to establish link in the background...\n"); +- } +- TLan_SetTimer( dev, (8*HZ), TLAN_TIMER_PHY_FINISH_AN ); +- return; +- } +- +- printk( "TLAN: %s: Autonegotiation complete.\n", dev->name ); +- TLan_MiiReadReg( dev, phy, MII_AN_ADV, &an_adv ); +- TLan_MiiReadReg( dev, phy, MII_AN_LPA, &an_lpa ); +- mode = an_adv & an_lpa & 0x03E0; +- if ( mode & 0x0100 ) { +- priv->tlanFullDuplex = TRUE; +- } else if ( ! ( mode & 0x0080 ) && ( mode & 0x0040 ) ) { +- priv->tlanFullDuplex = TRUE; +- } +- +- if ( ( ! ( mode & 0x0180 ) ) && ( priv->adapter->flags & TLAN_ADAPTER_USE_INTERN_10 ) && ( priv->phyNum != 0 ) ) { +- priv->phyNum = 0; +- data = TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN | TLAN_NET_CFG_PHY_EN; +- TLan_DioWrite16( dev->base_addr, TLAN_NET_CONFIG, data ); +- TLan_SetTimer( dev, (400*HZ/1000), TLAN_TIMER_PHY_PDOWN ); +- return; +- } +- +- if ( priv->phyNum == 0 ) { +- if ( ( priv->duplex == TLAN_DUPLEX_FULL ) || ( an_adv & an_lpa & 0x0040 ) ) { +- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, MII_GC_AUTOENB | MII_GC_DUPLEX ); +- printk( "TLAN: Starting internal PHY with FULL-DUPLEX\n" ); +- } else { +- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, MII_GC_AUTOENB ); +- printk( "TLAN: Starting internal PHY with HALF-DUPLEX\n" ); +- } +- } +- +- /* Wait for 100 ms. No reason in partiticular. +- */ +- TLan_SetTimer( dev, (HZ/10), TLAN_TIMER_FINISH_RESET ); +- +-} /* TLan_PhyFinishAutoNeg */ +- +-#ifdef MONITOR +- +- /********************************************************************* +- * +- * TLan_phyMonitor +- * +- * Returns: +- * None +- * +- * Params: +- * dev The device structure of this device. +- * +- * +- * This function monitors PHY condition by reading the status +- * register via the MII bus. This can be used to give info +- * about link changes (up/down), and possible switch to alternate +- * media. +- * +- * ******************************************************************/ +- +-void TLan_PhyMonitor( struct net_device *dev ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- u16 phy; +- u16 phy_status; +- +- phy = priv->phy[priv->phyNum]; +- +- /* Get PHY status register */ +- TLan_MiiReadReg( dev, phy, MII_GEN_STS, &phy_status ); +- +- /* Check if link has been lost */ +- if (!(phy_status & MII_GS_LINK)) { +- if (priv->link) { +- priv->link = 0; +- printk(KERN_DEBUG "TLAN: %s has lost link\n", dev->name); +- dev->flags &= ~IFF_RUNNING; +- TLan_SetTimer( dev, (2*HZ), TLAN_TIMER_LINK_BEAT ); +- return; +- } +- } +- +- /* Link restablished? */ +- if ((phy_status & MII_GS_LINK) && !priv->link) { +- priv->link = 1; +- printk(KERN_DEBUG "TLAN: %s has reestablished link\n", dev->name); +- dev->flags |= IFF_RUNNING; +- } +- +- /* Setup a new monitor */ +- TLan_SetTimer( dev, (2*HZ), TLAN_TIMER_LINK_BEAT ); +-} +- +-#endif /* MONITOR */ +- +-/***************************************************************************** +-****************************************************************************** +- +- ThunderLAN Driver MII Routines +- +- These routines are based on the information in Chap. 2 of the +- "ThunderLAN Programmer's Guide", pp. 15-24. +- +-****************************************************************************** +-*****************************************************************************/ +- +- /*************************************************************** +- * TLan_MiiReadReg +- * +- * Returns: +- * 0 if ack received ok +- * 1 otherwise. +- * +- * Parms: +- * dev The device structure containing +- * The io address and interrupt count +- * for this device. +- * phy The address of the PHY to be queried. +- * reg The register whose contents are to be +- * retreived. +- * val A pointer to a variable to store the +- * retrieved value. +- * +- * This function uses the TLAN's MII bus to retreive the contents +- * of a given register on a PHY. It sends the appropriate info +- * and then reads the 16-bit register value from the MII bus via +- * the TLAN SIO register. +- * +- **************************************************************/ +- +-int TLan_MiiReadReg( struct net_device *dev, u16 phy, u16 reg, u16 *val ) +-{ +- u8 nack; +- u16 sio, tmp; +- u32 i; +- int err; +- int minten; +- TLanPrivateInfo *priv = dev->priv; +- unsigned long flags = 0; +- +- err = FALSE; +- outw(TLAN_NET_SIO, dev->base_addr + TLAN_DIO_ADR); +- sio = dev->base_addr + TLAN_DIO_DATA + TLAN_NET_SIO; +- +- if (!in_irq()) +- spin_lock_irqsave(&priv->lock, flags); +- +- TLan_MiiSync(dev->base_addr); +- +- minten = TLan_GetBit( TLAN_NET_SIO_MINTEN, sio ); +- if ( minten ) +- TLan_ClearBit(TLAN_NET_SIO_MINTEN, sio); +- +- TLan_MiiSendData( dev->base_addr, 0x1, 2 ); /* Start ( 01b ) */ +- TLan_MiiSendData( dev->base_addr, 0x2, 2 ); /* Read ( 10b ) */ +- TLan_MiiSendData( dev->base_addr, phy, 5 ); /* Device # */ +- TLan_MiiSendData( dev->base_addr, reg, 5 ); /* Register # */ +- +- TLan_ClearBit(TLAN_NET_SIO_MTXEN, sio); /* Change direction */ +- +- TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); /* Clock Idle bit */ +- TLan_SetBit(TLAN_NET_SIO_MCLK, sio); +- TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); /* Wait 300ns */ +- +- nack = TLan_GetBit(TLAN_NET_SIO_MDATA, sio); /* Check for ACK */ +- TLan_SetBit(TLAN_NET_SIO_MCLK, sio); /* Finish ACK */ +- if (nack) { /* No ACK, so fake it */ +- for (i = 0; i < 16; i++) { +- TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); +- TLan_SetBit(TLAN_NET_SIO_MCLK, sio); +- } +- tmp = 0xffff; +- err = TRUE; +- } else { /* ACK, so read data */ +- for (tmp = 0, i = 0x8000; i; i >>= 1) { +- TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); +- if (TLan_GetBit(TLAN_NET_SIO_MDATA, sio)) +- tmp |= i; +- TLan_SetBit(TLAN_NET_SIO_MCLK, sio); +- } +- } +- +- TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); /* Idle cycle */ +- TLan_SetBit(TLAN_NET_SIO_MCLK, sio); +- +- if ( minten ) +- TLan_SetBit(TLAN_NET_SIO_MINTEN, sio); +- +- *val = tmp; +- +- if (!in_irq()) +- spin_unlock_irqrestore(&priv->lock, flags); +- +- return err; +- +-} /* TLan_MiiReadReg */ +- +- /*************************************************************** +- * TLan_MiiSendData +- * +- * Returns: +- * Nothing +- * Parms: +- * base_port The base IO port of the adapter in +- * question. +- * dev The address of the PHY to be queried. +- * data The value to be placed on the MII bus. +- * num_bits The number of bits in data that are to +- * be placed on the MII bus. +- * +- * This function sends on sequence of bits on the MII +- * configuration bus. +- * +- **************************************************************/ +- +-void TLan_MiiSendData( u16 base_port, u32 data, unsigned num_bits ) +-{ +- u16 sio; +- u32 i; +- +- if ( num_bits == 0 ) +- return; +- +- outw( TLAN_NET_SIO, base_port + TLAN_DIO_ADR ); +- sio = base_port + TLAN_DIO_DATA + TLAN_NET_SIO; +- TLan_SetBit( TLAN_NET_SIO_MTXEN, sio ); +- +- for ( i = ( 0x1 << ( num_bits - 1 ) ); i; i >>= 1 ) { +- TLan_ClearBit( TLAN_NET_SIO_MCLK, sio ); +- (void) TLan_GetBit( TLAN_NET_SIO_MCLK, sio ); +- if ( data & i ) +- TLan_SetBit( TLAN_NET_SIO_MDATA, sio ); +- else +- TLan_ClearBit( TLAN_NET_SIO_MDATA, sio ); +- TLan_SetBit( TLAN_NET_SIO_MCLK, sio ); +- (void) TLan_GetBit( TLAN_NET_SIO_MCLK, sio ); +- } +- +-} /* TLan_MiiSendData */ +- +- /*************************************************************** +- * TLan_MiiSync +- * +- * Returns: +- * Nothing +- * Parms: +- * base_port The base IO port of the adapter in +- * question. +- * +- * This functions syncs all PHYs in terms of the MII configuration +- * bus. +- * +- **************************************************************/ +- +-void TLan_MiiSync( u16 base_port ) +-{ +- int i; +- u16 sio; +- +- outw( TLAN_NET_SIO, base_port + TLAN_DIO_ADR ); +- sio = base_port + TLAN_DIO_DATA + TLAN_NET_SIO; +- +- TLan_ClearBit( TLAN_NET_SIO_MTXEN, sio ); +- for ( i = 0; i < 32; i++ ) { +- TLan_ClearBit( TLAN_NET_SIO_MCLK, sio ); +- TLan_SetBit( TLAN_NET_SIO_MCLK, sio ); +- } +- +-} /* TLan_MiiSync */ +- +- /*************************************************************** +- * TLan_MiiWriteReg +- * +- * Returns: +- * Nothing +- * Parms: +- * dev The device structure for the device +- * to write to. +- * phy The address of the PHY to be written to. +- * reg The register whose contents are to be +- * written. +- * val The value to be written to the register. +- * +- * This function uses the TLAN's MII bus to write the contents of a +- * given register on a PHY. It sends the appropriate info and then +- * writes the 16-bit register value from the MII configuration bus +- * via the TLAN SIO register. +- * +- **************************************************************/ +- +-void TLan_MiiWriteReg( struct net_device *dev, u16 phy, u16 reg, u16 val ) +-{ +- u16 sio; +- int minten; +- unsigned long flags = 0; +- TLanPrivateInfo *priv = dev->priv; +- +- outw(TLAN_NET_SIO, dev->base_addr + TLAN_DIO_ADR); +- sio = dev->base_addr + TLAN_DIO_DATA + TLAN_NET_SIO; +- +- if (!in_irq()) +- spin_lock_irqsave(&priv->lock, flags); +- +- TLan_MiiSync( dev->base_addr ); +- +- minten = TLan_GetBit( TLAN_NET_SIO_MINTEN, sio ); +- if ( minten ) +- TLan_ClearBit( TLAN_NET_SIO_MINTEN, sio ); +- +- TLan_MiiSendData( dev->base_addr, 0x1, 2 ); /* Start ( 01b ) */ +- TLan_MiiSendData( dev->base_addr, 0x1, 2 ); /* Write ( 01b ) */ +- TLan_MiiSendData( dev->base_addr, phy, 5 ); /* Device # */ +- TLan_MiiSendData( dev->base_addr, reg, 5 ); /* Register # */ +- +- TLan_MiiSendData( dev->base_addr, 0x2, 2 ); /* Send ACK */ +- TLan_MiiSendData( dev->base_addr, val, 16 ); /* Send Data */ +- +- TLan_ClearBit( TLAN_NET_SIO_MCLK, sio ); /* Idle cycle */ +- TLan_SetBit( TLAN_NET_SIO_MCLK, sio ); +- +- if ( minten ) +- TLan_SetBit( TLAN_NET_SIO_MINTEN, sio ); +- +- if (!in_irq()) +- spin_unlock_irqrestore(&priv->lock, flags); +- +-} /* TLan_MiiWriteReg */ +-#endif +- +-/************************************************************************** +-RESET - Reset adapter +-***************************************************************************/ +-static void skel_reset(struct nic *nic) +-{ +- /* put the card in its initial state */ +-} +- +-/************************************************************************** +-POLL - Wait for a frame +-***************************************************************************/ +-static int skel_poll(struct nic *nic) +-{ +- /* return true if there's an ethernet packet ready to read */ +- /* nic->packet should contain data on return */ +- /* nic->packetlen should contain length of data */ +- return (0); /* initially as this is called to flush the input */ +-} +- +-/************************************************************************** +-TRANSMIT - Transmit a frame +-***************************************************************************/ +-static void skel_transmit( +- struct nic *nic, +- const char *d, /* Destination */ +- unsigned int t, /* Type */ +- unsigned int s, /* size */ +- const char *p) /* Packet */ +-{ +- /* send the packet to destination */ +-} +- +-/************************************************************************** +-DISABLE - Turn off ethernet interface +-***************************************************************************/ +-static void skel_disable(struct nic *nic) +-{ +-} +- +-/************************************************************************** +-PROBE - Look for an adapter, this routine's visible to the outside +-You should omit the last argument struct pci_device * for a non-PCI NIC +-***************************************************************************/ +-struct nic *tlan_probe(struct nic *nic, unsigned short *probe_addrs, +- struct pci_device *p) +-{ +- /* if probe_addrs is 0, then routine can use a hardwired default */ +- /* if board found */ +- { +- /* point to NIC specific routines */ +- nic->reset = skel_reset; +- nic->poll = skel_poll; +- nic->transmit = skel_transmit; +- nic->disable = skel_disable; +- return nic; +- } +- /* else */ +- return 0; +-} +- +-#if 0 +-#ifndef TLAN_H +-#define TLAN_H +-/******************************************************************** +- * +- * Linux ThunderLAN Driver +- * +- * tlan.h +- * by James Banks +- * +- * (C) 1997-1998 Caldera, Inc. +- * (C) 1999-2001 Torben Mathiasen +- * +- * This software may be used and distributed according to the terms +- * of the GNU General Public License, incorporated herein by reference. +- * +- ** This file is best viewed/edited with tabstop=4, colums>=132 +- * +- * +- * Dec 10, 1999 Torben Mathiasen +- * New Maintainer +- * +- ********************************************************************/ +- +-#include +-#include +-#include +- +-#define FALSE 0 +-#define TRUE 1 +- +-#define TX_TIMEOUT (10*HZ) /* We need time for auto-neg */ +- +-typedef struct tlan_adapter_entry { +- u16 vendorId; +- u16 deviceId; +- char *deviceLabel; +- u32 flags; +- u16 addrOfs; +-} TLanAdapterEntry; +- +- /***************************************************************** +- * EISA Definitions +- * +- ****************************************************************/ +- +-#define EISA_ID 0xc80 /* EISA ID Registers */ +-#define EISA_ID0 0xc80 /* EISA ID Register 0 */ +-#define EISA_ID1 0xc81 /* EISA ID Register 1 */ +-#define EISA_ID2 0xc82 /* EISA ID Register 2 */ +-#define EISA_ID3 0xc83 /* EISA ID Register 3 */ +-#define EISA_CR 0xc84 /* EISA Control Register */ +-#define EISA_REG0 0xc88 /* EISA Configuration Register 0 */ +-#define EISA_REG1 0xc89 /* EISA Configuration Register 1 */ +-#define EISA_REG2 0xc8a /* EISA Configuration Register 2 */ +-#define EISA_REG3 0xc8f /* EISA Configuration Register 3 */ +-#define EISA_APROM 0xc90 /* Ethernet Address PROM */ +- +- /***************************************************************** +- * Rx/Tx List Definitions +- * +- ****************************************************************/ +- +-typedef struct tlan_buffer_ref_tag { +- u32 count; +- u32 address; +-} TLanBufferRef; +- +-typedef struct tlan_list_tag { +- u32 forward; +- u16 cStat; +- u16 frameSize; +- TLanBufferRef buffer[TLAN_BUFFERS_PER_LIST]; +-} TLanList; +- +-typedef u8 TLanBuffer[TLAN_MAX_FRAME_SIZE]; +- +- /***************************************************************** +- * TLAN Private Information Structure +- * +- ****************************************************************/ +- +-typedef struct tlan_private_tag { +- struct net_device *nextDevice; +- void *dmaStorage; +- u8 *padBuffer; +- TLanList *rxList; +- u8 *rxBuffer; +- u32 rxHead; +- u32 rxTail; +- u32 rxEocCount; +- TLanList *txList; +- u8 *txBuffer; +- u32 txHead; +- u32 txInProgress; +- u32 txTail; +- u32 txBusyCount; +- u32 phyOnline; +- u32 timerSetAt; +- u32 timerType; +- struct timer_list timer; +- struct net_device_stats stats; +- struct board *adapter; +- u32 adapterRev; +- u32 aui; +- u32 debug; +- u32 duplex; +- u32 phy[2]; +- u32 phyNum; +- u32 speed; +- u8 tlanRev; +- u8 tlanFullDuplex; +- char devName[8]; +- spinlock_t lock; +- u8 link; +- u8 is_eisa; +- struct tq_struct tlan_tqueue; +- u8 neg_be_verbose; +-} TLanPrivateInfo; +- +-#define TLAN_HC_GO 0x80000000 +-#define TLAN_HC_STOP 0x40000000 +-#define TLAN_HC_ACK 0x20000000 +-#define TLAN_HC_CS_MASK 0x1FE00000 +-#define TLAN_HC_EOC 0x00100000 +-#define TLAN_HC_RT 0x00080000 +-#define TLAN_HC_NES 0x00040000 +-#define TLAN_HC_AD_RST 0x00008000 +-#define TLAN_HC_LD_TMR 0x00004000 +-#define TLAN_HC_LD_THR 0x00002000 +-#define TLAN_HC_REQ_INT 0x00001000 +-#define TLAN_HC_INT_OFF 0x00000800 +-#define TLAN_HC_INT_ON 0x00000400 +-#define TLAN_HC_AC_MASK 0x000000FF +-#define TLAN_DA_ADR_INC 0x8000 +-#define TLAN_DA_RAM_ADR 0x4000 +-#define TLAN_HI_IV_MASK 0x1FE0 +-#define TLAN_HI_IT_MASK 0x001C +- +-#define TLAN_NET_CMD_NRESET 0x80 +-#define TLAN_NET_CMD_NWRAP 0x40 +-#define TLAN_NET_CMD_CSF 0x20 +-#define TLAN_NET_CMD_CAF 0x10 +-#define TLAN_NET_CMD_NOBRX 0x08 +-#define TLAN_NET_CMD_DUPLEX 0x04 +-#define TLAN_NET_CMD_TRFRAM 0x02 +-#define TLAN_NET_CMD_TXPACE 0x01 +-#define TLAN_NET_SIO_MINTEN 0x80 +-#define TLAN_NET_SIO_ECLOK 0x40 +-#define TLAN_NET_SIO_ETXEN 0x20 +-#define TLAN_NET_SIO_EDATA 0x10 +-#define TLAN_NET_SIO_NMRST 0x08 +-#define TLAN_NET_SIO_MCLK 0x04 +-#define TLAN_NET_SIO_MTXEN 0x02 +-#define TLAN_NET_SIO_MDATA 0x01 +-#define TLAN_NET_STS_MIRQ 0x80 +-#define TLAN_NET_STS_HBEAT 0x40 +-#define TLAN_NET_STS_TXSTOP 0x20 +-#define TLAN_NET_STS_RXSTOP 0x10 +-#define TLAN_NET_STS_RSRVD 0x0F +-#define TLAN_NET_MASK_MASK7 0x80 +-#define TLAN_NET_MASK_MASK6 0x40 +-#define TLAN_NET_MASK_MASK5 0x20 +-#define TLAN_NET_MASK_MASK4 0x10 +-#define TLAN_NET_MASK_RSRVD 0x0F +-#define TLAN_NET_CFG_RCLK 0x8000 +-#define TLAN_NET_CFG_TCLK 0x4000 +-#define TLAN_NET_CFG_BIT 0x2000 +-#define TLAN_NET_CFG_RXCRC 0x1000 +-#define TLAN_NET_CFG_PEF 0x0800 +-#define TLAN_NET_CFG_1FRAG 0x0400 +-#define TLAN_NET_CFG_1CHAN 0x0200 +-#define TLAN_NET_CFG_MTEST 0x0100 +-#define TLAN_NET_CFG_PHY_EN 0x0080 +-#define TLAN_NET_CFG_MSMASK 0x007F +-#define TLAN_LED_ACT 0x10 +-#define TLAN_LED_LINK 0x01 +-#define TLAN_ID_TX_EOC 0x04 +-#define TLAN_ID_RX_EOF 0x02 +-#define TLAN_ID_RX_EOC 0x01 +- +-#define CIRC_INC( a, b ) if ( ++a >= b ) a = 0 +- +-#ifdef I_LIKE_A_FAST_HASH_FUNCTION +-/* given 6 bytes, view them as 8 6-bit numbers and return the XOR of those */ +-/* the code below is about seven times as fast as the original code */ +-inline u32 TLan_HashFunc( u8 *a ) +-{ +- u8 hash; +- +- hash = (a[0]^a[3]); /* & 077 */ +- hash ^= ((a[0]^a[3])>>6); /* & 003 */ +- hash ^= ((a[1]^a[4])<<2); /* & 074 */ +- hash ^= ((a[1]^a[4])>>4); /* & 017 */ +- hash ^= ((a[2]^a[5])<<4); /* & 060 */ +- hash ^= ((a[2]^a[5])>>2); /* & 077 */ +- +- return (hash & 077); +-} +- +-#else /* original code */ +- +-inline u32 xor( u32 a, u32 b ) +-{ +- return ( ( a && ! b ) || ( ! a && b ) ); +-} +-#define XOR8( a, b, c, d, e, f, g, h ) xor( a, xor( b, xor( c, xor( d, xor( e, xor( f, xor( g, h ) ) ) ) ) ) ) +-#define DA( a, bit ) ( ( (u8) a[bit/8] ) & ( (u8) ( 1 << bit%8 ) ) ) +- +-inline u32 TLan_HashFunc( u8 *a ) +-{ +- u32 hash; +- +- hash = XOR8( DA(a,0), DA(a, 6), DA(a,12), DA(a,18), DA(a,24), DA(a,30), DA(a,36), DA(a,42) ); +- hash |= XOR8( DA(a,1), DA(a, 7), DA(a,13), DA(a,19), DA(a,25), DA(a,31), DA(a,37), DA(a,43) ) << 1; +- hash |= XOR8( DA(a,2), DA(a, 8), DA(a,14), DA(a,20), DA(a,26), DA(a,32), DA(a,38), DA(a,44) ) << 2; +- hash |= XOR8( DA(a,3), DA(a, 9), DA(a,15), DA(a,21), DA(a,27), DA(a,33), DA(a,39), DA(a,45) ) << 3; +- hash |= XOR8( DA(a,4), DA(a,10), DA(a,16), DA(a,22), DA(a,28), DA(a,34), DA(a,40), DA(a,46) ) << 4; +- hash |= XOR8( DA(a,5), DA(a,11), DA(a,17), DA(a,23), DA(a,29), DA(a,35), DA(a,41), DA(a,47) ) << 5; +- +- return hash; +- +-} +- +-#endif /* I_LIKE_A_FAST_HASH_FUNCTION */ +-#endif +-/******************************************************************************* +- * +- * Linux ThunderLAN Driver +- * +- * tlan.c +- * by James Banks +- * +- * (C) 1997-1998 Caldera, Inc. +- * (C) 1998 James Banks +- * (C) 1999-2001 Torben Mathiasen +- * +- * This software may be used and distributed according to the terms +- * of the GNU General Public License, incorporated herein by reference. +- * +- ** This file is best viewed/edited with columns>=132. +- * +- ** Useful (if not required) reading: +- * +- * Texas Instruments, ThunderLAN Programmer's Guide, +- * TI Literature Number SPWU013A +- * available in PDF format from www.ti.com +- * Level One, LXT901 and LXT970 Data Sheets +- * available in PDF format from www.level1.com +- * National Semiconductor, DP83840A Data Sheet +- * available in PDF format from www.national.com +- * Microchip Technology, 24C01A/02A/04A Data Sheet +- * available in PDF format from www.microchip.com +- * +- * Change History +- * +- * Tigran Aivazian : TLan_PciProbe() now uses +- * new PCI BIOS interface. +- * Alan Cox : Fixed the out of memory +- * handling. +- * +- * Torben Mathiasen New Maintainer! +- * +- * v1.1 Dec 20, 1999 - Removed linux version checking +- * Patch from Tigran Aivazian. +- * - v1.1 includes Alan's SMP updates. +- * - We still have problems on SMP though, +- * but I'm looking into that. +- * +- * v1.2 Jan 02, 2000 - Hopefully fixed the SMP deadlock. +- * - Removed dependency of HZ being 100. +- * - We now allow higher priority timers to +- * overwrite timers like TLAN_TIMER_ACTIVITY +- * Patch from John Cagle . +- * - Fixed a few compiler warnings. +- * +- * v1.3 Feb 04, 2000 - Fixed the remaining HZ issues. +- * - Removed call to pci_present(). +- * - Removed SA_INTERRUPT flag from irq handler. +- * - Added __init and __initdata to reduce resisdent +- * code size. +- * - Driver now uses module_init/module_exit. +- * - Rewrote init_module and tlan_probe to +- * share a lot more code. We now use tlan_probe +- * with builtin and module driver. +- * - Driver ported to new net API. +- * - tlan.txt has been reworked to reflect current +- * driver (almost) +- * - Other minor stuff +- * +- * v1.4 Feb 10, 2000 - Updated with more changes required after Dave's +- * network cleanup in 2.3.43pre7 (Tigran & myself) +- * - Minor stuff. +- * +- * v1.5 March 22, 2000 - Fixed another timer bug that would hang the driver +- * if no cable/link were present. +- * - Cosmetic changes. +- * - TODO: Port completely to new PCI/DMA API +- * Auto-Neg fallback. +- * +- * v1.6 April 04, 2000 - Fixed driver support for kernel-parameters. Haven't +- * tested it though, as the kernel support is currently +- * broken (2.3.99p4p3). +- * - Updated tlan.txt accordingly. +- * - Adjusted minimum/maximum frame length. +- * - There is now a TLAN website up at +- * http://tlan.kernel.dk +- * +- * v1.7 April 07, 2000 - Started to implement custom ioctls. Driver now +- * reports PHY information when used with Donald +- * Beckers userspace MII diagnostics utility. +- * +- * v1.8 April 23, 2000 - Fixed support for forced speed/duplex settings. +- * - Added link information to Auto-Neg and forced +- * modes. When NIC operates with auto-neg the driver +- * will report Link speed & duplex modes as well as +- * link partner abilities. When forced link is used, +- * the driver will report status of the established +- * link. +- * Please read tlan.txt for additional information. +- * - Removed call to check_region(), and used +- * return value of request_region() instead. +- * +- * v1.8a May 28, 2000 - Minor updates. +- * +- * v1.9 July 25, 2000 - Fixed a few remaining Full-Duplex issues. +- * - Updated with timer fixes from Andrew Morton. +- * - Fixed module race in TLan_Open. +- * - Added routine to monitor PHY status. +- * - Added activity led support for Proliant devices. +- * +- * v1.10 Aug 30, 2000 - Added support for EISA based tlan controllers +- * like the Compaq NetFlex3/E. +- * - Rewrote tlan_probe to better handle multiple +- * bus probes. Probing and device setup is now +- * done through TLan_Probe and TLan_init_one. Actual +- * hardware probe is done with kernel API and +- * TLan_EisaProbe. +- * - Adjusted debug information for probing. +- * - Fixed bug that would cause general debug information +- * to be printed after driver removal. +- * - Added transmit timeout handling. +- * - Fixed OOM return values in tlan_probe. +- * - Fixed possible mem leak in tlan_exit +- * (now tlan_remove_one). +- * - Fixed timer bug in TLan_phyMonitor. +- * - This driver version is alpha quality, please +- * send me any bug issues you may encounter. +- * +- * v1.11 Aug 31, 2000 - Do not try to register irq 0 if no irq line was +- * set for EISA cards. +- * - Added support for NetFlex3/E with nibble-rate +- * 10Base-T PHY. This is untestet as I haven't got +- * one of these cards. +- * - Fixed timer being added twice. +- * - Disabled PhyMonitoring by default as this is +- * work in progress. Define MONITOR to enable it. +- * - Now we don't display link info with PHYs that +- * doesn't support it (level1). +- * - Incresed tx_timeout beacuse of auto-neg. +- * - Adjusted timers for forced speeds. +- * +- * v1.12 Oct 12, 2000 - Minor fixes (memleak, init, etc.) +- * +- * v1.13 Nov 28, 2000 - Stop flooding console with auto-neg issues +- * when link can't be established. +- * - Added the bbuf option as a kernel parameter. +- * - Fixed ioaddr probe bug. +- * - Fixed stupid deadlock with MII interrupts. +- * - Added support for speed/duplex selection with +- * multiple nics. +- * - Added partly fix for TX Channel lockup with +- * TLAN v1.0 silicon. This needs to be investigated +- * further. +- * +- * v1.14 Dec 16, 2000 - Added support for servicing multiple frames per. +- * interrupt. Thanks goes to +- * Adam Keys +- * Denis Beaudoin +- * for providing the patch. +- * - Fixed auto-neg output when using multiple +- * adapters. +- * - Converted to use new taskq interface. +- * +- * v1.14a Jan 6, 2001 - Minor adjustments (spinlocks, etc.) +- * +- *******************************************************************************/ +- +- +-#include +- +-#include "tlan.h" +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-typedef u32 (TLanIntVectorFunc)( struct net_device *, u16 ); +- +-/* For removing EISA devices */ +-static struct net_device *TLan_Eisa_Devices; +- +-static int TLanDevicesInstalled; +- +-/* Set speed, duplex and aui settings */ +-static int aui[MAX_TLAN_BOARDS]; +-static int duplex[MAX_TLAN_BOARDS]; +-static int speed[MAX_TLAN_BOARDS]; +-static int boards_found; +- +-MODULE_AUTHOR("Maintainer: Torben Mathiasen "); +-MODULE_DESCRIPTION("Driver for TI ThunderLAN based ethernet PCI adapters"); +-MODULE_LICENSE("GPL"); +- +-MODULE_PARM(aui, "1-" __MODULE_STRING(MAX_TLAN_BOARDS) "i"); +-MODULE_PARM(duplex, "1-" __MODULE_STRING(MAX_TLAN_BOARDS) "i"); +-MODULE_PARM(speed, "1-" __MODULE_STRING(MAX_TLAN_BOARDS) "i"); +-MODULE_PARM(debug, "i"); +-MODULE_PARM(bbuf, "i"); +-MODULE_PARM_DESC(aui, "ThunderLAN use AUI port(s) (0-1)"); +-MODULE_PARM_DESC(duplex, "ThunderLAN duplex setting(s) (0-default, 1-half, 2-full)"); +-MODULE_PARM_DESC(speed, "ThunderLAN port speen setting(s) (0,10,100)"); +-MODULE_PARM_DESC(debug, "ThunderLAN debug mask"); +-MODULE_PARM_DESC(bbuf, "ThunderLAN use big buffer (0-1)"); +-EXPORT_NO_SYMBOLS; +- +-/* Define this to enable Link beat monitoring */ +-#undef MONITOR +- +-/* Turn on debugging. See linux/Documentation/networking/tlan.txt for details */ +-static int debug; +- +-static int bbuf; +-static u8 *TLanPadBuffer; +-static char TLanSignature[] = "TLAN"; +-static const char tlan_banner[] = "ThunderLAN driver v1.14a\n"; +-static int tlan_have_pci; +-static int tlan_have_eisa; +- +-const char *media[] = { +- "10BaseT-HD ", "10BaseT-FD ","100baseTx-HD ", +- "100baseTx-FD", "100baseT4", 0 +-}; +- +-int media_map[] = { 0x0020, 0x0040, 0x0080, 0x0100, 0x0200,}; +- +-static struct board { +- const char *deviceLabel; +- u32 flags; +- u16 addrOfs; +-} board_info[] __devinitdata = { +- { "Compaq Netelligent 10 T PCI UTP", TLAN_ADAPTER_ACTIVITY_LED, 0x83 }, +- { "Compaq Netelligent 10/100 TX PCI UTP", TLAN_ADAPTER_ACTIVITY_LED, 0x83 }, +- { "Compaq Integrated NetFlex-3/P", TLAN_ADAPTER_NONE, 0x83 }, +- { "Compaq NetFlex-3/P", TLAN_ADAPTER_UNMANAGED_PHY | TLAN_ADAPTER_BIT_RATE_PHY, 0x83 }, +- { "Compaq NetFlex-3/P", TLAN_ADAPTER_NONE, 0x83 }, +- { "Compaq Netelligent Integrated 10/100 TX UTP", TLAN_ADAPTER_ACTIVITY_LED, 0x83 }, +- { "Compaq Netelligent Dual 10/100 TX PCI UTP", TLAN_ADAPTER_NONE, 0x83 }, +- { "Compaq Netelligent 10/100 TX Embedded UTP", TLAN_ADAPTER_NONE, 0x83 }, +- { "Olicom OC-2183/2185", TLAN_ADAPTER_USE_INTERN_10, 0x83 }, +- { "Olicom OC-2325", TLAN_ADAPTER_UNMANAGED_PHY, 0xF8 }, +- { "Olicom OC-2326", TLAN_ADAPTER_USE_INTERN_10, 0xF8 }, +- { "Compaq Netelligent 10/100 TX UTP", TLAN_ADAPTER_ACTIVITY_LED, 0x83 }, +- { "Compaq Netelligent 10 T/2 PCI UTP/Coax", TLAN_ADAPTER_NONE, 0x83 }, +- { "Compaq NetFlex-3/E", TLAN_ADAPTER_ACTIVITY_LED | /* EISA card */ +- TLAN_ADAPTER_UNMANAGED_PHY | TLAN_ADAPTER_BIT_RATE_PHY, 0x83 }, +- { "Compaq NetFlex-3/E", TLAN_ADAPTER_ACTIVITY_LED, 0x83 }, /* EISA card */ +-}; +- +-static struct pci_device_id tlan_pci_tbl[] __devinitdata = { +- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL10, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, +- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, +- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETFLEX3I, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2 }, +- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_THUNDER, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3 }, +- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETFLEX3B, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 }, +- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100PI, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5 }, +- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100D, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6 }, +- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100I, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 7 }, +- { PCI_VENDOR_ID_OLICOM, PCI_DEVICE_ID_OLICOM_OC2183, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 }, +- { PCI_VENDOR_ID_OLICOM, PCI_DEVICE_ID_OLICOM_OC2325, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 9 }, +- { PCI_VENDOR_ID_OLICOM, PCI_DEVICE_ID_OLICOM_OC2326, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 10 }, +- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_NETELLIGENT_10_100_WS_5100, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 11 }, +- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_NETELLIGENT_10_T2, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12 }, +- { 0,} +-}; +-MODULE_DEVICE_TABLE(pci, tlan_pci_tbl); +- +-static void TLan_EisaProbe( void ); +-static void TLan_Eisa_Cleanup( void ); +-static int TLan_Init( struct net_device * ); +-static int TLan_Open( struct net_device *dev ); +-static int TLan_StartTx( struct sk_buff *, struct net_device *); +-static void TLan_HandleInterrupt( int, void *, struct pt_regs *); +-static int TLan_Close( struct net_device *); +-static struct net_device_stats *TLan_GetStats( struct net_device *); +-static void TLan_SetMulticastList( struct net_device *); +-static int TLan_ioctl( struct net_device *dev, struct ifreq *rq, int cmd); +-static int TLan_probe1( struct pci_dev *pdev, long ioaddr, int irq, int rev, const struct pci_device_id *ent); +-static void TLan_tx_timeout( struct net_device *dev); +-static int tlan_init_one( struct pci_dev *pdev, const struct pci_device_id *ent); +- +-static u32 TLan_HandleInvalid( struct net_device *, u16 ); +-static u32 TLan_HandleTxEOF( struct net_device *, u16 ); +-static u32 TLan_HandleStatOverflow( struct net_device *, u16 ); +-static u32 TLan_HandleRxEOF( struct net_device *, u16 ); +-static u32 TLan_HandleDummy( struct net_device *, u16 ); +-static u32 TLan_HandleTxEOC( struct net_device *, u16 ); +-static u32 TLan_HandleStatusCheck( struct net_device *, u16 ); +-static u32 TLan_HandleRxEOC( struct net_device *, u16 ); +- +-static void TLan_Timer( unsigned long ); +- +-static void TLan_ResetLists( struct net_device * ); +-static void TLan_FreeLists( struct net_device * ); +-static void TLan_PrintDio( u16 ); +-static void TLan_PrintList( TLanList *, char *, int ); +-static void TLan_ReadAndClearStats( struct net_device *, int ); +-static void TLan_ResetAdapter( struct net_device * ); +-static void TLan_FinishReset( struct net_device * ); +-static void TLan_SetMac( struct net_device *, int areg, char *mac ); +- +-static void TLan_PhyPrint( struct net_device * ); +-static void TLan_PhyDetect( struct net_device * ); +-static void TLan_PhyPowerDown( struct net_device * ); +-static void TLan_PhyPowerUp( struct net_device * ); +-static void TLan_PhyReset( struct net_device * ); +-static void TLan_PhyStartLink( struct net_device * ); +-static void TLan_PhyFinishAutoNeg( struct net_device * ); +-#ifdef MONITOR +-static void TLan_PhyMonitor( struct net_device * ); +-#endif +- +-/* +-static int TLan_PhyNop( struct net_device * ); +-static int TLan_PhyInternalCheck( struct net_device * ); +-static int TLan_PhyInternalService( struct net_device * ); +-static int TLan_PhyDp83840aCheck( struct net_device * ); +-*/ +- +-static int TLan_MiiReadReg( struct net_device *, u16, u16, u16 * ); +-static void TLan_MiiSendData( u16, u32, unsigned ); +-static void TLan_MiiSync( u16 ); +-static void TLan_MiiWriteReg( struct net_device *, u16, u16, u16 ); +- +-static void TLan_EeSendStart( u16 ); +-static int TLan_EeSendByte( u16, u8, int ); +-static void TLan_EeReceiveByte( u16, u8 *, int ); +-static int TLan_EeReadByte( struct net_device *, u8, u8 * ); +- +-static TLanIntVectorFunc *TLanIntVector[TLAN_INT_NUMBER_OF_INTS] = { +- TLan_HandleInvalid, +- TLan_HandleTxEOF, +- TLan_HandleStatOverflow, +- TLan_HandleRxEOF, +- TLan_HandleDummy, +- TLan_HandleTxEOC, +- TLan_HandleStatusCheck, +- TLan_HandleRxEOC +-}; +- +-static inline void +-TLan_SetTimer( struct net_device *dev, u32 ticks, u32 type ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- unsigned long flags = 0; +- +- if (!in_irq()) +- spin_lock_irqsave(&priv->lock, flags); +- if ( priv->timer.function != NULL && +- priv->timerType != TLAN_TIMER_ACTIVITY ) { +- if (!in_irq()) +- spin_unlock_irqrestore(&priv->lock, flags); +- return; +- } +- priv->timer.function = &TLan_Timer; +- if (!in_irq()) +- spin_unlock_irqrestore(&priv->lock, flags); +- +- priv->timer.data = (unsigned long) dev; +- priv->timerSetAt = jiffies; +- priv->timerType = type; +- mod_timer(&priv->timer, jiffies + ticks); +- +-} /* TLan_SetTimer */ +- +-/***************************************************************************** +-****************************************************************************** +- +- ThunderLAN Driver Primary Functions +- +- These functions are more or less common to all Linux network drivers. +- +-****************************************************************************** +-*****************************************************************************/ +- +- /*************************************************************** +- * tlan_remove_one +- * +- * Returns: +- * Nothing +- * Parms: +- * None +- * +- * Goes through the TLanDevices list and frees the device +- * structs and memory associated with each device (lists +- * and buffers). It also ureserves the IO port regions +- * associated with this device. +- * +- **************************************************************/ +- +-static void __devexit tlan_remove_one( struct pci_dev *pdev) +-{ +- struct net_device *dev = pci_get_drvdata( pdev ); +- TLanPrivateInfo *priv = dev->priv; +- +- unregister_netdev( dev ); +- +- if ( priv->dmaStorage ) { +- kfree( priv->dmaStorage ); +- } +- +- release_region( dev->base_addr, 0x10 ); +- +- kfree( dev ); +- +- pci_set_drvdata( pdev, NULL ); +-} +- +-static struct pci_driver tlan_driver = { +- name: "tlan", +- id_table: tlan_pci_tbl, +- probe: tlan_init_one, +- remove: tlan_remove_one, +-}; +- +-static int __init tlan_probe(void) +-{ +- static int pad_allocated; +- +- printk(KERN_INFO "%s", tlan_banner); +- +- TLanPadBuffer = (u8 *) kmalloc(TLAN_MIN_FRAME_SIZE, +- GFP_KERNEL); +- +- if (TLanPadBuffer == NULL) { +- printk(KERN_ERR "TLAN: Could not allocate memory for pad buffer.\n"); +- return -ENOMEM; +- } +- +- memset(TLanPadBuffer, 0, TLAN_MIN_FRAME_SIZE); +- pad_allocated = 1; +- +- TLAN_DBG(TLAN_DEBUG_PROBE, "Starting PCI Probe....\n"); +- +- /* Use new style PCI probing. Now the kernel will +- do most of this for us */ +- pci_register_driver(&tlan_driver); +- +- TLAN_DBG(TLAN_DEBUG_PROBE, "Starting EISA Probe....\n"); +- TLan_EisaProbe(); +- +- printk(KERN_INFO "TLAN: %d device%s installed, PCI: %d EISA: %d\n", +- TLanDevicesInstalled, TLanDevicesInstalled == 1 ? "" : "s", +- tlan_have_pci, tlan_have_eisa); +- +- if (TLanDevicesInstalled == 0) { +- pci_unregister_driver(&tlan_driver); +- kfree(TLanPadBuffer); +- return -ENODEV; +- } +- return 0; +-} +- +- +-static int __devinit tlan_init_one( struct pci_dev *pdev, +- const struct pci_device_id *ent) +-{ +- return TLan_probe1( pdev, -1, -1, 0, ent); +-} +- +-/* +- *************************************************************** +- * tlan_probe1 +- * +- * Returns: +- * 0 on success, error code on error +- * Parms: +- * none +- * +- * The name is lower case to fit in with all the rest of +- * the netcard_probe names. This function looks for +- * another TLan based adapter, setting it up with the +- * allocated device struct if one is found. +- * tlan_probe has been ported to the new net API and +- * now allocates its own device structure. This function +- * is also used by modules. +- * +- **************************************************************/ +- +-static int __devinit TLan_probe1(struct pci_dev *pdev, +- long ioaddr, int irq, int rev, const struct pci_device_id *ent ) +-{ +- +- struct net_device *dev; +- TLanPrivateInfo *priv; +- u8 pci_rev; +- u16 device_id; +- int reg; +- +- if (pdev && pci_enable_device(pdev)) +- return -EIO; +- +- dev = init_etherdev(NULL, sizeof(TLanPrivateInfo)); +- if (dev == NULL) { +- printk(KERN_ERR "TLAN: Could not allocate memory for device.\n"); +- return -ENOMEM; +- } +- SET_MODULE_OWNER(dev); +- +- priv = dev->priv; +- +- /* Is this a PCI device? */ +- if (pdev) { +- u32 pci_io_base = 0; +- +- priv->adapter = &board_info[ent->driver_data]; +- +- pci_read_config_byte ( pdev, PCI_REVISION_ID, &pci_rev); +- +- for ( reg= 0; reg <= 5; reg ++ ) { +- if (pci_resource_flags(pdev, reg) & IORESOURCE_IO) { +- pci_io_base = pci_resource_start(pdev, reg); +- TLAN_DBG( TLAN_DEBUG_GNRL, "IO mapping is available at %x.\n", +- pci_io_base); +- break; +- } +- } +- if (!pci_io_base) { +- printk(KERN_ERR "TLAN: No IO mappings available\n"); +- unregister_netdev(dev); +- kfree(dev); +- return -ENODEV; +- } +- +- dev->base_addr = pci_io_base; +- dev->irq = pdev->irq; +- priv->adapterRev = pci_rev; +- pci_set_master(pdev); +- pci_set_drvdata(pdev, dev); +- +- } else { /* EISA card */ +- /* This is a hack. We need to know which board structure +- * is suited for this adapter */ +- device_id = inw(ioaddr + EISA_ID2); +- priv->is_eisa = 1; +- if (device_id == 0x20F1) { +- priv->adapter = &board_info[13]; /* NetFlex-3/E */ +- priv->adapterRev = 23; /* TLAN 2.3 */ +- } else { +- priv->adapter = &board_info[14]; +- priv->adapterRev = 10; /* TLAN 1.0 */ +- } +- dev->base_addr = ioaddr; +- dev->irq = irq; +- } +- +- /* Kernel parameters */ +- if (dev->mem_start) { +- priv->aui = dev->mem_start & 0x01; +- priv->duplex = ((dev->mem_start & 0x06) == 0x06) ? 0 : (dev->mem_start & 0x06) >> 1; +- priv->speed = ((dev->mem_start & 0x18) == 0x18) ? 0 : (dev->mem_start & 0x18) >> 3; +- +- if (priv->speed == 0x1) { +- priv->speed = TLAN_SPEED_10; +- } else if (priv->speed == 0x2) { +- priv->speed = TLAN_SPEED_100; +- } +- debug = priv->debug = dev->mem_end; +- } else { +- priv->aui = aui[boards_found]; +- priv->speed = speed[boards_found]; +- priv->duplex = duplex[boards_found]; +- priv->debug = debug; +- } +- +- /* This will be used when we get an adapter error from +- * within our irq handler */ +- INIT_LIST_HEAD(&priv->tlan_tqueue.list); +- priv->tlan_tqueue.sync = 0; +- priv->tlan_tqueue.routine = (void *)(void*)TLan_tx_timeout; +- priv->tlan_tqueue.data = dev; +- +- spin_lock_init(&priv->lock); +- +- if (TLan_Init(dev)) { +- printk(KERN_ERR "TLAN: Could not register device.\n"); +- unregister_netdev(dev); +- kfree(dev); +- return -EAGAIN; +- } else { +- +- TLanDevicesInstalled++; +- boards_found++; +- +- /* pdev is NULL if this is an EISA device */ +- if (pdev) +- tlan_have_pci++; +- else { +- priv->nextDevice = TLan_Eisa_Devices; +- TLan_Eisa_Devices = dev; +- tlan_have_eisa++; +- } +- +- printk(KERN_INFO "TLAN: %s irq=%2d, io=%04x, %s, Rev. %d\n", +- dev->name, +- (int) dev->irq, +- (int) dev->base_addr, +- priv->adapter->deviceLabel, +- priv->adapterRev); +- return 0; +- } +- +-} ++} /* TLan_FinishReset */ + +-static void TLan_Eisa_Cleanup(void) +-{ +- struct net_device *dev; +- TLanPrivateInfo *priv; +- +- while( tlan_have_eisa ) { +- dev = TLan_Eisa_Devices; +- priv = dev->priv; +- if (priv->dmaStorage) { +- kfree(priv->dmaStorage); +- } +- release_region( dev->base_addr, 0x10); +- unregister_netdev( dev ); +- TLan_Eisa_Devices = priv->nextDevice; +- kfree( dev ); +- tlan_have_eisa--; +- } +-} +- +- +-static void __exit tlan_exit(void) +-{ +- pci_unregister_driver(&tlan_driver); +- +- if (tlan_have_eisa) +- TLan_Eisa_Cleanup(); +- +- kfree( TLanPadBuffer ); +- +-} +- +-/* Module loading/unloading */ +-module_init(tlan_probe); +-module_exit(tlan_exit); +- +- /************************************************************** +- * TLan_EisaProbe +- * +- * Returns: 0 on success, 1 otherwise +- * +- * Parms: None +- * +- * +- * This functions probes for EISA devices and calls +- * TLan_probe1 when one is found. +- * +- *************************************************************/ +- +-static void __init TLan_EisaProbe (void) ++/************************************************************************** ++POLL - Wait for a frame ++***************************************************************************/ ++static int tlan_poll(struct nic *nic, int retrieve) + { +- long ioaddr; +- int rc = -ENODEV; +- int irq; +- u16 device_id; +- +- if (!EISA_bus) { +- TLAN_DBG(TLAN_DEBUG_PROBE, "No EISA bus present\n"); +- return; +- } +- +- /* Loop through all slots of the EISA bus */ +- for (ioaddr = 0x1000; ioaddr < 0x9000; ioaddr += 0x1000) { +- +- TLAN_DBG(TLAN_DEBUG_PROBE,"EISA_ID 0x%4x: 0x%4x\n", (int) ioaddr + 0xC80, inw(ioaddr + EISA_ID)); +- TLAN_DBG(TLAN_DEBUG_PROBE,"EISA_ID 0x%4x: 0x%4x\n", (int) ioaddr + 0xC82, inw(ioaddr + EISA_ID2)); ++ /* return true if there's an ethernet packet ready to read */ ++ /* nic->packet should contain data on return */ ++ /* nic->packetlen should contain length of data */ ++ u32 framesize; ++ u32 host_cmd = 0; ++ u32 ack = 1; ++ int eoc = 0; ++ int entry = priv->cur_rx % TLAN_NUM_RX_LISTS; ++ u16 tmpCStat = le32_to_cpu(rx_ring[entry].cStat); ++ u16 host_int = inw(BASE + TLAN_HOST_INT); + +- TLAN_DBG(TLAN_DEBUG_PROBE, "Probing for EISA adapter at IO: 0x%4x : ", +- (int) ioaddr); +- if (request_region(ioaddr, 0x10, TLanSignature) == NULL) +- goto out; +- +- if (inw(ioaddr + EISA_ID) != 0x110E) { +- release_region(ioaddr, 0x10); +- goto out; +- } +- +- device_id = inw(ioaddr + EISA_ID2); +- if (device_id != 0x20F1 && device_id != 0x40F1) { +- release_region (ioaddr, 0x10); +- goto out; +- } +- +- if (inb(ioaddr + EISA_CR) != 0x1) { /* Check if adapter is enabled */ +- release_region (ioaddr, 0x10); +- goto out2; +- } +- +- if (debug == 0x10) +- printk("Found one\n"); ++ if ((tmpCStat & TLAN_CSTAT_FRM_CMP) && !retrieve) ++ return 1; + +- /* Get irq from board */ +- switch (inb(ioaddr + 0xCC0)) { +- case(0x10): +- irq=5; +- break; +- case(0x20): +- irq=9; +- break; +- case(0x40): +- irq=10; +- break; +- case(0x80): +- irq=11; +- break; +- default: +- goto out; +- } +- +- +- /* Setup the newly found eisa adapter */ +- rc = TLan_probe1( NULL, ioaddr, irq, +- 12, NULL); +- continue; +- +- out: +- if (debug == 0x10) +- printk("None found\n"); +- continue; +- +- out2: if (debug == 0x10) +- printk("Card found but it is not enabled, skipping\n"); +- continue; +- +- } ++ outw(host_int, BASE + TLAN_HOST_INT); + +-} /* TLan_EisaProbe */ ++ if (!(tmpCStat & TLAN_CSTAT_FRM_CMP)) ++ return 0; + +- ++ /* printf("PI-1: 0x%hX\n", host_int); */ ++ if (tmpCStat & TLAN_CSTAT_EOC) ++ eoc = 1; + +- /*************************************************************** +- * TLan_Init +- * +- * Returns: +- * 0 on success, error code otherwise. +- * Parms: +- * dev The structure of the device to be +- * init'ed. +- * +- * This function completes the initialization of the +- * device structure and driver. It reserves the IO +- * addresses, allocates memory for the lists and bounce +- * buffers, retrieves the MAC address from the eeprom +- * and assignes the device's methods. +- * +- **************************************************************/ ++ framesize = rx_ring[entry].frameSize; + +-static int TLan_Init( struct net_device *dev ) +-{ +- int dma_size; +- int err; +- int i; +- TLanPrivateInfo *priv; ++ nic->packetlen = framesize; + +- priv = dev->priv; +- +- if (!priv->is_eisa) /* EISA devices have already requested IO */ +- if (!request_region( dev->base_addr, 0x10, TLanSignature )) { +- printk(KERN_ERR "TLAN: %s: IO port region 0x%lx size 0x%x in use.\n", +- dev->name, +- dev->base_addr, +- 0x10 ); +- return -EIO; ++#ifdef EBDEBUG ++ printf(".%d.", framesize); ++#endif ++ ++ memcpy(nic->packet, rxb + ++ (priv->cur_rx * TLAN_MAX_FRAME_SIZE), nic->packetlen); ++ ++ rx_ring[entry].cStat = 0; ++#ifdef EBDEBUG ++ //hex_dump(nic->packet, nic->packetlen); ++ printf("%d", entry); ++#endif ++ entry = (entry + 1) % TLAN_NUM_RX_LISTS; ++ priv->cur_rx = entry; ++ if (eoc) { ++ if ((rx_ring[entry].cStat & TLAN_CSTAT_READY) == ++ TLAN_CSTAT_READY) { ++ ack |= TLAN_HC_GO | TLAN_HC_RT; ++ host_cmd = TLAN_HC_ACK | ack | 0x001C0000; ++ outl(host_cmd, BASE + TLAN_HOST_CMD); + } +- +- if ( bbuf ) { +- dma_size = ( TLAN_NUM_RX_LISTS + TLAN_NUM_TX_LISTS ) +- * ( sizeof(TLanList) + TLAN_MAX_FRAME_SIZE ); + } else { +- dma_size = ( TLAN_NUM_RX_LISTS + TLAN_NUM_TX_LISTS ) +- * ( sizeof(TLanList) ); +- } +- priv->dmaStorage = kmalloc(dma_size, GFP_KERNEL | GFP_DMA); +- if ( priv->dmaStorage == NULL ) { +- printk(KERN_ERR "TLAN: Could not allocate lists and buffers for %s.\n", +- dev->name ); +- release_region( dev->base_addr, 0x10 ); +- return -ENOMEM; +- } +- memset( priv->dmaStorage, 0, dma_size ); +- priv->rxList = (TLanList *) +- ( ( ( (u32) priv->dmaStorage ) + 7 ) & 0xFFFFFFF8 ); +- priv->txList = priv->rxList + TLAN_NUM_RX_LISTS; +- if ( bbuf ) { +- priv->rxBuffer = (u8 *) ( priv->txList + TLAN_NUM_TX_LISTS ); +- priv->txBuffer = priv->rxBuffer +- + ( TLAN_NUM_RX_LISTS * TLAN_MAX_FRAME_SIZE ); +- } +- +- err = 0; +- for ( i = 0; i < 6 ; i++ ) +- err |= TLan_EeReadByte( dev, +- (u8) priv->adapter->addrOfs + i, +- (u8 *) &dev->dev_addr[i] ); +- if ( err ) { +- printk(KERN_ERR "TLAN: %s: Error reading MAC from eeprom: %d\n", +- dev->name, +- err ); +- } +- dev->addr_len = 6; +- +- /* Device methods */ +- dev->open = &TLan_Open; +- dev->hard_start_xmit = &TLan_StartTx; +- dev->stop = &TLan_Close; +- dev->get_stats = &TLan_GetStats; +- dev->set_multicast_list = &TLan_SetMulticastList; +- dev->do_ioctl = &TLan_ioctl; +- dev->tx_timeout = &TLan_tx_timeout; +- dev->watchdog_timeo = TX_TIMEOUT; +- +- return 0; +- +-} /* TLan_Init */ +- +- /*************************************************************** +- * TLan_Open +- * +- * Returns: +- * 0 on success, error code otherwise. +- * Parms: +- * dev Structure of device to be opened. +- * +- * This routine puts the driver and TLAN adapter in a +- * state where it is ready to send and receive packets. +- * It allocates the IRQ, resets and brings the adapter +- * out of reset, and allows interrupts. It also delays +- * the startup for autonegotiation or sends a Rx GO +- * command to the adapter, as appropriate. +- * +- **************************************************************/ +- +-static int TLan_Open( struct net_device *dev ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- int err; +- +- priv->tlanRev = TLan_DioRead8( dev->base_addr, TLAN_DEF_REVISION ); +- err = request_irq( dev->irq, TLan_HandleInterrupt, SA_SHIRQ, TLanSignature, dev ); +- +- if ( err ) { +- printk(KERN_ERR "TLAN: Cannot open %s because IRQ %d is already in use.\n", dev->name, dev->irq ); +- return err; ++ host_cmd = TLAN_HC_ACK | ack | (0x000C0000); ++ outl(host_cmd, BASE + TLAN_HOST_CMD); ++#ifdef EBDEBUG ++ printf("AC: 0x%hX\n", inw(BASE + TLAN_CH_PARM)); ++ host_int = inw(BASE + TLAN_HOST_INT); ++ printf("PI-2: 0x%hX\n", host_int); ++#endif + } +- +- init_timer(&priv->timer); +- netif_start_queue(dev); +- +- /* NOTE: It might not be necessary to read the stats before a +- reset if you don't care what the values are. +- */ +- TLan_ResetLists( dev ); +- TLan_ReadAndClearStats( dev, TLAN_IGNORE ); +- TLan_ResetAdapter( dev ); +- +- TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Opened. TLAN Chip Rev: %x\n", dev->name, priv->tlanRev ); +- +- return 0; +- +-} /* TLan_Open */ +- +- /************************************************************** +- * TLan_ioctl +- * +- * Returns: +- * 0 on success, error code otherwise +- * Params: +- * dev structure of device to receive ioctl. +- * +- * rq ifreq structure to hold userspace data. +- * +- * cmd ioctl command. +- * +- * +- *************************************************************/ ++ refill_rx(nic); ++ return (1); /* initially as this is called to flush the input */ ++} + +-static int TLan_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ++static void refill_rx(struct nic *nic __unused) + { +- TLanPrivateInfo *priv = dev->priv; +- struct mii_ioctl_data *data = (struct mii_ioctl_data *)&rq->ifr_data; +- u32 phy = priv->phy[priv->phyNum]; +- +- if (!priv->phyOnline) +- return -EAGAIN; +- +- switch(cmd) { +- case SIOCGMIIPHY: /* Get address of MII PHY in use. */ +- case SIOCDEVPRIVATE: /* for binary compat, remove in 2.5 */ +- data->phy_id = phy; +- +- case SIOCGMIIREG: /* Read MII PHY register. */ +- case SIOCDEVPRIVATE+1: /* for binary compat, remove in 2.5 */ +- TLan_MiiReadReg(dev, data->phy_id & 0x1f, data->reg_num & 0x1f, &data->val_out); +- return 0; +- ++ int entry = 0; + +- case SIOCSMIIREG: /* Write MII PHY register. */ +- case SIOCDEVPRIVATE+2: /* for binary compat, remove in 2.5 */ +- if (!capable(CAP_NET_ADMIN)) +- return -EPERM; +- TLan_MiiWriteReg(dev, data->phy_id & 0x1f, data->reg_num & 0x1f, data->val_in); +- return 0; +- default: +- return -EOPNOTSUPP; ++ for (; ++ (priv->cur_rx - priv->dirty_rx + ++ TLAN_NUM_RX_LISTS) % TLAN_NUM_RX_LISTS > 0; ++ priv->dirty_rx = (priv->dirty_rx + 1) % TLAN_NUM_RX_LISTS) { ++ entry = priv->dirty_rx % TLAN_NUM_TX_LISTS; ++ rx_ring[entry].frameSize = TLAN_MAX_FRAME_SIZE; ++ rx_ring[entry].cStat = TLAN_CSTAT_READY; + } +-} /* tlan_ioctl */ +- +- /*************************************************************** +- * TLan_tx_timeout +- * +- * Returns: nothing +- * +- * Params: +- * dev structure of device which timed out +- * during transmit. +- * +- **************************************************************/ +- +-static void TLan_tx_timeout(struct net_device *dev) +-{ +- +- TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Transmit timed out.\n", dev->name); +- +- /* Ok so we timed out, lets see what we can do about it...*/ +- TLan_FreeLists( dev ); +- TLan_ResetLists( dev ); +- TLan_ReadAndClearStats( dev, TLAN_IGNORE ); +- TLan_ResetAdapter( dev ); +- dev->trans_start = jiffies; +- netif_wake_queue( dev ); + + } +- + +- /*************************************************************** +- * TLan_StartTx +- * +- * Returns: +- * 0 on success, non-zero on failure. +- * Parms: +- * skb A pointer to the sk_buff containing the +- * frame to be sent. +- * dev The device to send the data on. +- * +- * This function adds a frame to the Tx list to be sent +- * ASAP. First it verifies that the adapter is ready and +- * there is room in the queue. Then it sets up the next +- * available list, copies the frame to the corresponding +- * buffer. If the adapter Tx channel is idle, it gives +- * the adapter a Tx Go command on the list, otherwise it +- * sets the forward address of the previous list to point +- * to this one. Then it frees the sk_buff. +- * +- **************************************************************/ ++/* #define EBDEBUG */ ++/************************************************************************** ++TRANSMIT - Transmit a frame ++***************************************************************************/ ++static void tlan_transmit(struct nic *nic, const char *d, /* Destination */ ++ unsigned int t, /* Type */ ++ unsigned int s, /* size */ ++ const char *p) ++{ /* Packet */ ++ u16 nstype; ++ u32 to; ++ struct TLanList *tail_list; ++ struct TLanList *head_list; ++ u8 *tail_buffer; ++ u32 ack = 0; ++ u32 host_cmd; ++ int eoc = 0; ++ u16 tmpCStat; ++#ifdef EBDEBUG ++ u16 host_int = inw(BASE + TLAN_HOST_INT); ++#endif ++ int entry = 0; + +-static int TLan_StartTx( struct sk_buff *skb, struct net_device *dev ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- TLanList *tail_list; +- u8 *tail_buffer; +- int pad; +- unsigned long flags; +- +- if ( ! priv->phyOnline ) { +- TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: %s PHY is not ready\n", dev->name ); +- dev_kfree_skb_any(skb); +- return 0; ++#ifdef EBDEBUG ++ printf("INT0-0x%hX\n", host_int); ++#endif ++ ++ if (!priv->phyOnline) { ++ printf("TRANSMIT: %s PHY is not ready\n", priv->nic_name); ++ return; + } + + tail_list = priv->txList + priv->txTail; +- +- if ( tail_list->cStat != TLAN_CSTAT_UNUSED ) { +- TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: %s is busy (Head=%d Tail=%d)\n", dev->name, priv->txHead, priv->txTail ); +- netif_stop_queue(dev); ++ ++ if (tail_list->cStat != TLAN_CSTAT_UNUSED) { ++ printf("TRANSMIT: %s is busy (Head=%d Tail=%d)\n", ++ priv->nic_name, priv->txList, priv->txTail); ++ tx_ring[entry].cStat = TLAN_CSTAT_UNUSED; + priv->txBusyCount++; +- return 1; ++ return; + } + + tail_list->forward = 0; + +- if ( bbuf ) { +- tail_buffer = priv->txBuffer + ( priv->txTail * TLAN_MAX_FRAME_SIZE ); +- memcpy( tail_buffer, skb->data, skb->len ); +- } else { +- tail_list->buffer[0].address = virt_to_bus( skb->data ); +- tail_list->buffer[9].address = (u32) skb; +- } ++ tail_buffer = txb + (priv->txTail * TLAN_MAX_FRAME_SIZE); + +- pad = TLAN_MIN_FRAME_SIZE - skb->len; +- +- if ( pad > 0 ) { +- tail_list->frameSize = (u16) skb->len + pad; +- tail_list->buffer[0].count = (u32) skb->len; +- tail_list->buffer[1].count = TLAN_LAST_BUFFER | (u32) pad; +- tail_list->buffer[1].address = virt_to_bus( TLanPadBuffer ); +- } else { +- tail_list->frameSize = (u16) skb->len; +- tail_list->buffer[0].count = TLAN_LAST_BUFFER | (u32) skb->len; +- tail_list->buffer[1].count = 0; +- tail_list->buffer[1].address = 0; +- } ++ /* send the packet to destination */ ++ memcpy(tail_buffer, d, ETH_ALEN); ++ memcpy(tail_buffer + ETH_ALEN, nic->node_addr, ETH_ALEN); ++ nstype = htons((u16) t); ++ memcpy(tail_buffer + 2 * ETH_ALEN, (u8 *) & nstype, 2); ++ memcpy(tail_buffer + ETH_HLEN, p, s); ++ ++ s += ETH_HLEN; ++ s &= 0x0FFF; ++ while (s < ETH_ZLEN) ++ tail_buffer[s++] = '\0'; ++ ++ /*=====================================================*/ ++ /* Receive ++ * 0000 0000 0001 1100 ++ * 0000 0000 0000 1100 ++ * 0000 0000 0000 0011 = 0x0003 ++ * ++ * 0000 0000 0000 0000 0000 0000 0000 0011 ++ * 0000 0000 0000 1100 0000 0000 0000 0000 = 0x000C0000 ++ * ++ * Transmit ++ * 0000 0000 0001 1100 ++ * 0000 0000 0000 0100 ++ * 0000 0000 0000 0001 = 0x0001 ++ * ++ * 0000 0000 0000 0000 0000 0000 0000 0001 ++ * 0000 0000 0000 0100 0000 0000 0000 0000 = 0x00040000 ++ * */ ++ ++ /* Setup the transmit descriptor */ ++ tail_list->frameSize = (u16) s; ++ tail_list->buffer[0].count = TLAN_LAST_BUFFER | (u32) s; ++ tail_list->buffer[1].count = 0; ++ tail_list->buffer[1].address = 0; + +- spin_lock_irqsave(&priv->lock, flags); + tail_list->cStat = TLAN_CSTAT_READY; +- if ( ! priv->txInProgress ) { ++ ++#ifdef EBDEBUG ++ host_int = inw(BASE + TLAN_HOST_INT); ++ printf("INT1-0x%hX\n", host_int); ++#endif ++ ++ if (!priv->txInProgress) { + priv->txInProgress = 1; +- TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: Starting TX on buffer %d\n", priv->txTail ); +- outl( virt_to_bus( tail_list ), dev->base_addr + TLAN_CH_PARM ); +- outl( TLAN_HC_GO, dev->base_addr + TLAN_HOST_CMD ); ++ outl(virt_to_le32desc(tail_list), BASE + TLAN_CH_PARM); ++ outl(TLAN_HC_GO, BASE + TLAN_HOST_CMD); + } else { +- TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: Adding buffer %d to TX channel\n", priv->txTail ); +- if ( priv->txTail == 0 ) { +- ( priv->txList + ( TLAN_NUM_TX_LISTS - 1 ) )->forward = virt_to_bus( tail_list ); ++ if (priv->txTail == 0) { ++#ifdef EBDEBUG ++ printf("Out buffer\n"); ++#endif ++ (priv->txList + (TLAN_NUM_TX_LISTS - 1))->forward = ++ virt_to_le32desc(tail_list); + } else { +- ( priv->txList + ( priv->txTail - 1 ) )->forward = virt_to_bus( tail_list ); ++#ifdef EBDEBUG ++ printf("Fix this \n"); ++#endif ++ (priv->txList + (priv->txTail - 1))->forward = ++ virt_to_le32desc(tail_list); + } + } +- spin_unlock_irqrestore(&priv->lock, flags); +- +- CIRC_INC( priv->txTail, TLAN_NUM_TX_LISTS ); +- +- if ( bbuf ) +- dev_kfree_skb_any(skb); +- +- dev->trans_start = jiffies; +- return 0; +- +-} /* TLan_StartTx */ +- +- /*************************************************************** +- * TLan_HandleInterrupt +- * +- * Returns: +- * Nothing +- * Parms: +- * irq The line on which the interrupt +- * occurred. +- * dev_id A pointer to the device assigned to +- * this irq line. +- * regs ??? +- * +- * This function handles an interrupt generated by its +- * assigned TLAN adapter. The function deactivates +- * interrupts on its adapter, records the type of +- * interrupt, executes the appropriate subhandler, and +- * acknowdges the interrupt to the adapter (thus +- * re-enabling adapter interrupts. +- * +- **************************************************************/ +- +-static void TLan_HandleInterrupt(int irq, void *dev_id, struct pt_regs *regs) +-{ +- u32 ack; +- struct net_device *dev; +- u32 host_cmd; +- u16 host_int; +- int type; +- TLanPrivateInfo *priv; +- +- dev = dev_id; +- priv = dev->priv; +- +- spin_lock(&priv->lock); +- +- host_int = inw( dev->base_addr + TLAN_HOST_INT ); +- outw( host_int, dev->base_addr + TLAN_HOST_INT ); ++ ++ CIRC_INC(priv->txTail, TLAN_NUM_TX_LISTS); + +- type = ( host_int & TLAN_HI_IT_MASK ) >> 2; ++#ifdef EBDEBUG ++ host_int = inw(BASE + TLAN_HOST_INT); ++ printf("INT2-0x%hX\n", host_int); ++#endif + +- ack = TLanIntVector[type]( dev, host_int ); ++ to = currticks() + TX_TIME_OUT; ++ while ((tail_list->cStat == TLAN_CSTAT_READY) && currticks() < to); + +- if ( ack ) { +- host_cmd = TLAN_HC_ACK | ack | ( type << 18 ); +- outl( host_cmd, dev->base_addr + TLAN_HOST_CMD ); ++ head_list = priv->txList + priv->txHead; ++ while (((tmpCStat = head_list->cStat) & TLAN_CSTAT_FRM_CMP) ++ && (ack < 255)) { ++ ack++; ++ if(tmpCStat & TLAN_CSTAT_EOC) ++ eoc =1; ++ head_list->cStat = TLAN_CSTAT_UNUSED; ++ CIRC_INC(priv->txHead, TLAN_NUM_TX_LISTS); ++ head_list = priv->txList + priv->txHead; ++ + } ++ if(!ack) ++ printf("Incomplete TX Frame\n"); + +- spin_unlock(&priv->lock); +- +-} /* TLan_HandleInterrupts */ +- +- /*************************************************************** +- * TLan_Close +- * +- * Returns: +- * An error code. +- * Parms: +- * dev The device structure of the device to +- * close. +- * +- * This function shuts down the adapter. It records any +- * stats, puts the adapter into reset state, deactivates +- * its time as needed, and frees the irq it is using. +- * +- **************************************************************/ +- +-static int TLan_Close(struct net_device *dev) +-{ +- TLanPrivateInfo *priv = dev->priv; +- +- netif_stop_queue(dev); +- priv->neg_be_verbose = 0; +- +- TLan_ReadAndClearStats( dev, TLAN_RECORD ); +- outl( TLAN_HC_AD_RST, dev->base_addr + TLAN_HOST_CMD ); +- if ( priv->timer.function != NULL ) { +- del_timer_sync( &priv->timer ); +- priv->timer.function = NULL; ++ if(eoc) { ++ head_list = priv->txList + priv->txHead; ++ if ((head_list->cStat & TLAN_CSTAT_READY) == TLAN_CSTAT_READY) { ++ outl(virt_to_le32desc(head_list), BASE + TLAN_CH_PARM); ++ ack |= TLAN_HC_GO; ++ } else { ++ priv->txInProgress = 0; ++ } + } +- +- free_irq( dev->irq, dev ); +- TLan_FreeLists( dev ); +- TLAN_DBG( TLAN_DEBUG_GNRL, "Device %s closed.\n", dev->name ); +- +- return 0; +- +-} /* TLan_Close */ +- +- /*************************************************************** +- * TLan_GetStats +- * +- * Returns: +- * A pointer to the device's statistics structure. +- * Parms: +- * dev The device structure to return the +- * stats for. +- * +- * This function updates the devices statistics by reading +- * the TLAN chip's onboard registers. Then it returns the +- * address of the statistics structure. +- * +- **************************************************************/ +- +-static struct net_device_stats *TLan_GetStats( struct net_device *dev ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- int i; +- +- /* Should only read stats if open ? */ +- TLan_ReadAndClearStats( dev, TLAN_RECORD ); +- +- TLAN_DBG( TLAN_DEBUG_RX, "RECEIVE: %s EOC count = %d\n", dev->name, priv->rxEocCount ); +- TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: %s Busy count = %d\n", dev->name, priv->txBusyCount ); +- if ( debug & TLAN_DEBUG_GNRL ) { +- TLan_PrintDio( dev->base_addr ); +- TLan_PhyPrint( dev ); +- } +- if ( debug & TLAN_DEBUG_LIST ) { +- for ( i = 0; i < TLAN_NUM_RX_LISTS; i++ ) +- TLan_PrintList( priv->rxList + i, "RX", i ); +- for ( i = 0; i < TLAN_NUM_TX_LISTS; i++ ) +- TLan_PrintList( priv->txList + i, "TX", i ); ++ if(ack) { ++ host_cmd = TLAN_HC_ACK | ack; ++ outl(host_cmd, BASE + TLAN_HOST_CMD); + } + +- return ( &( (TLanPrivateInfo *) dev->priv )->stats ); +- +-} /* TLan_GetStats */ +- +- /*************************************************************** +- * TLan_SetMulticastList +- * +- * Returns: +- * Nothing +- * Parms: +- * dev The device structure to set the +- * multicast list for. +- * +- * This function sets the TLAN adaptor to various receive +- * modes. If the IFF_PROMISC flag is set, promiscuous +- * mode is acitviated. Otherwise, promiscuous mode is +- * turned off. If the IFF_ALLMULTI flag is set, then +- * the hash table is set to receive all group addresses. +- * Otherwise, the first three multicast addresses are +- * stored in AREG_1-3, and the rest are selected via the +- * hash table, as necessary. +- * +- **************************************************************/ +- +-static void TLan_SetMulticastList( struct net_device *dev ) +-{ +- struct dev_mc_list *dmi = dev->mc_list; +- u32 hash1 = 0; +- u32 hash2 = 0; +- int i; +- u32 offset; +- u8 tmp; +- +- if ( dev->flags & IFF_PROMISC ) { +- tmp = TLan_DioRead8( dev->base_addr, TLAN_NET_CMD ); +- TLan_DioWrite8( dev->base_addr, TLAN_NET_CMD, tmp | TLAN_NET_CMD_CAF ); +- } else { +- tmp = TLan_DioRead8( dev->base_addr, TLAN_NET_CMD ); +- TLan_DioWrite8( dev->base_addr, TLAN_NET_CMD, tmp & ~TLAN_NET_CMD_CAF ); +- if ( dev->flags & IFF_ALLMULTI ) { +- for ( i = 0; i < 3; i++ ) +- TLan_SetMac( dev, i + 1, NULL ); +- TLan_DioWrite32( dev->base_addr, TLAN_HASH_1, 0xFFFFFFFF ); +- TLan_DioWrite32( dev->base_addr, TLAN_HASH_2, 0xFFFFFFFF ); ++ if(priv->tlanRev < 0x30 ) { ++ ack = 1; ++ head_list = priv->txList + priv->txHead; ++ if ((head_list->cStat & TLAN_CSTAT_READY) == TLAN_CSTAT_READY) { ++ outl(virt_to_le32desc(head_list), BASE + TLAN_CH_PARM); ++ ack |= TLAN_HC_GO; + } else { +- for ( i = 0; i < dev->mc_count; i++ ) { +- if ( i < 3 ) { +- TLan_SetMac( dev, i + 1, (char *) &dmi->dmi_addr ); +- } else { +- offset = TLan_HashFunc( (u8 *) &dmi->dmi_addr ); +- if ( offset < 32 ) +- hash1 |= ( 1 << offset ); +- else +- hash2 |= ( 1 << ( offset - 32 ) ); +- } +- dmi = dmi->next; +- } +- for ( ; i < 3; i++ ) +- TLan_SetMac( dev, i + 1, NULL ); +- TLan_DioWrite32( dev->base_addr, TLAN_HASH_1, hash1 ); +- TLan_DioWrite32( dev->base_addr, TLAN_HASH_2, hash2 ); ++ priv->txInProgress = 0; + } ++ host_cmd = TLAN_HC_ACK | ack | 0x00140000; ++ outl(host_cmd, BASE + TLAN_HOST_CMD); ++ + } ++ ++ if (currticks() >= to) { ++ printf("TX Time Out"); ++ } ++} + +-} /* TLan_SetMulticastList */ +- +-/***************************************************************************** +-****************************************************************************** +- +- ThunderLAN Driver Interrupt Vectors and Table +- +- Please see Chap. 4, "Interrupt Handling" of the "ThunderLAN +- Programmer's Guide" for more informations on handling interrupts +- generated by TLAN based adapters. +- +-****************************************************************************** +-*****************************************************************************/ +- +- /*************************************************************** +- * TLan_HandleInvalid +- * +- * Returns: +- * 0 +- * Parms: +- * dev Device assigned the IRQ that was +- * raised. +- * host_int The contents of the HOST_INT +- * port. +- * +- * This function handles invalid interrupts. This should +- * never happen unless some other adapter is trying to use +- * the IRQ line assigned to the device. +- * +- **************************************************************/ +- +-u32 TLan_HandleInvalid( struct net_device *dev, u16 host_int ) ++/************************************************************************** ++DISABLE - Turn off ethernet interface ++***************************************************************************/ ++#ifdef EB51 ++static void tlan_disable(struct dev *dev __unused) ++#else ++static void tlan_disable(struct nic *nic __unused) ++#endif + { +- /* printk( "TLAN: Invalid interrupt on %s.\n", dev->name ); */ +- return 0; +- +-} /* TLan_HandleInvalid */ +- +- /*************************************************************** +- * TLan_HandleTxEOF +- * +- * Returns: +- * 1 +- * Parms: +- * dev Device assigned the IRQ that was +- * raised. +- * host_int The contents of the HOST_INT +- * port. +- * +- * This function handles Tx EOF interrupts which are raised +- * by the adapter when it has completed sending the +- * contents of a buffer. If detemines which list/buffer +- * was completed and resets it. If the buffer was the last +- * in the channel (EOC), then the function checks to see if +- * another buffer is ready to send, and if so, sends a Tx +- * Go command. Finally, the driver activates/continues the +- * activity LED. ++ /* put the card in its initial state */ ++ /* This function serves 3 purposes. ++ * This disables DMA and interrupts so we don't receive ++ * unexpected packets or interrupts from the card after ++ * etherboot has finished. ++ * This frees resources so etherboot may use ++ * this driver on another interface ++ * This allows etherboot to reinitialize the interface ++ * if something is something goes wrong. + * +- **************************************************************/ ++ */ ++ outl(TLAN_HC_AD_RST, BASE + TLAN_HOST_CMD); ++} + +-u32 TLan_HandleTxEOF( struct net_device *dev, u16 host_int ) ++/************************************************************************** ++IRQ - Enable, Disable, or Force interrupts ++***************************************************************************/ ++static void tlan_irq(struct nic *nic __unused, irq_action_t action __unused) + { +- TLanPrivateInfo *priv = dev->priv; +- int eoc = 0; +- TLanList *head_list; +- u32 ack = 0; +- u16 tmpCStat; +- +- TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: Handling TX EOF (Head=%d Tail=%d)\n", priv->txHead, priv->txTail ); +- head_list = priv->txList + priv->txHead; ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } ++} + +- while (((tmpCStat = head_list->cStat ) & TLAN_CSTAT_FRM_CMP) && (ack < 255)) { +- ack++; +- if ( ! bbuf ) { +- dev_kfree_skb_any( (struct sk_buff *) head_list->buffer[9].address ); +- head_list->buffer[9].address = 0; +- } +- +- if ( tmpCStat & TLAN_CSTAT_EOC ) +- eoc = 1; +- +- priv->stats.tx_bytes += head_list->frameSize; ++static void TLan_SetMulticastList(struct nic *nic) { ++ int i; ++ u8 tmp; + +- head_list->cStat = TLAN_CSTAT_UNUSED; +- netif_start_queue(dev); +- CIRC_INC( priv->txHead, TLAN_NUM_TX_LISTS ); +- head_list = priv->txList + priv->txHead; +- } ++ /* !IFF_PROMISC */ ++ tmp = TLan_DioRead8(BASE, TLAN_NET_CMD); ++ TLan_DioWrite8(BASE, TLAN_NET_CMD, tmp & ~TLAN_NET_CMD_CAF); ++ ++ /* IFF_ALLMULTI */ ++ for(i = 0; i< 3; i++) ++ TLan_SetMac(nic, i + 1, NULL); ++ TLan_DioWrite32(BASE, TLAN_HASH_1, 0xFFFFFFFF); ++ TLan_DioWrite32(BASE, TLAN_HASH_2, 0xFFFFFFFF); + +- if (!ack) +- printk(KERN_INFO "TLAN: Received interrupt for uncompleted TX frame.\n"); +- +- if ( eoc ) { +- TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: Handling TX EOC (Head=%d Tail=%d)\n", priv->txHead, priv->txTail ); +- head_list = priv->txList + priv->txHead; +- if ( ( head_list->cStat & TLAN_CSTAT_READY ) == TLAN_CSTAT_READY ) { +- outl( virt_to_bus( head_list ), dev->base_addr + TLAN_CH_PARM ); +- ack |= TLAN_HC_GO; +- } else { +- priv->txInProgress = 0; +- } +- } + +- if ( priv->adapter->flags & TLAN_ADAPTER_ACTIVITY_LED ) { +- TLan_DioWrite8( dev->base_addr, TLAN_LED_REG, TLAN_LED_LINK | TLAN_LED_ACT ); +- if ( priv->timer.function == NULL ) { +- priv->timer.function = &TLan_Timer; +- priv->timer.data = (unsigned long) dev; +- priv->timer.expires = jiffies + TLAN_TIMER_ACT_DELAY; +- priv->timerSetAt = jiffies; +- priv->timerType = TLAN_TIMER_ACTIVITY; +- add_timer(&priv->timer); +- } else if ( priv->timerType == TLAN_TIMER_ACTIVITY ) { +- priv->timerSetAt = jiffies; ++} ++/************************************************************************** ++PROBE - Look for an adapter, this routine's visible to the outside ++***************************************************************************/ ++ ++#define board_found 1 ++#define valid_link 0 ++#ifdef EB51 ++static int tlan_probe(struct dev *dev, struct pci_device *pci) ++{ ++ struct nic *nic = (struct nic *) dev; ++#else ++struct nic *tlan_probe(struct nic *nic, unsigned short *io_addrs, struct pci_device *pci) ++{ ++#endif ++ u16 data = 0; ++ int err; ++ int i; ++ ++ if (pci->ioaddr == 0) ++ return 0; ++ ++ nic->irqno = 0; ++ nic->ioaddr = pci->ioaddr & ~3; ++ ++ BASE = pci->ioaddr; ++ printf("\n"); ++ printf("tlan.c: %s, %s\n", drv_version, drv_date); ++ printf("%s: Probing for Vendor 0x%hX, Device 0x%hX", ++ pci->name, pci->vendor, pci->dev_id); ++ ++ ++ /* I really must find out what this does */ ++ adjust_pci_device(pci); ++ ++ /* Point to private storage */ ++ priv = &TLanPrivateInfo; ++ /* Figure out which chip we're dealing with */ ++ i = 0; ++ chip_idx = -1; ++ ++ while (tlan_pci_tbl[i].name) { ++ if ((((u32) pci->dev_id << 16) | pci->vendor) == ++ (tlan_pci_tbl[i].id.pci & 0xffffffff)) { ++ chip_idx = i; ++ break; + } ++ i++; + } + +- return ack; ++ priv->vendor_id = pci->vendor; ++ priv->dev_id = pci->dev_id; ++ priv->nic_name = pci->name; ++ priv->eoc = 0; + +-} /* TLan_HandleTxEOF */ ++ err = 0; ++ for (i = 0; i < 6; i++) ++ err |= TLan_EeReadByte(BASE, ++ (u8) tlan_pci_tbl[chip_idx]. ++ addrOfs + i, ++ (u8 *) & nic->node_addr[i]); ++ if (err) { ++ printf("TLAN: %s: Error reading MAC from eeprom: %d\n", ++ pci->name, err); ++ } else ++ printf("\nAddress: %!\n", nic->node_addr); + +- /*************************************************************** +- * TLan_HandleStatOverflow +- * +- * Returns: +- * 1 +- * Parms: +- * dev Device assigned the IRQ that was +- * raised. +- * host_int The contents of the HOST_INT +- * port. +- * +- * This function handles the Statistics Overflow interrupt +- * which means that one or more of the TLAN statistics +- * registers has reached 1/2 capacity and needs to be read. +- * +- **************************************************************/ ++ priv->tlanRev = TLan_DioRead8(BASE, TLAN_DEF_REVISION); ++ printf("\nRevision = 0x%hX\n", priv->tlanRev); + +-u32 TLan_HandleStatOverflow( struct net_device *dev, u16 host_int ) +-{ +- TLan_ReadAndClearStats( dev, TLAN_RECORD ); ++ TLan_ResetLists(nic); ++ TLan_ResetAdapter(nic); ++/* ++ data = inl(BASE + TLAN_HOST_CMD); ++ data |= TLAN_HC_EOC; ++ outw(data, BASE + TLAN_HOST_CMD); ++*/ ++ ++ data = inl(BASE + TLAN_HOST_CMD); ++ data |= TLAN_HC_INT_OFF; ++ outw(data, BASE + TLAN_HOST_CMD); + ++ TLan_SetMulticastList(nic); ++ udelay(100); ++ priv->txList = tx_ring; ++ priv->rxList = rx_ring; ++/* if (board_found && valid_link) ++ {*/ ++ /* point to NIC specific routines */ ++#ifdef EB51 ++ dev->disable = tlan_disable; ++ nic->poll = tlan_poll; ++ nic->transmit = tlan_transmit; ++ nic->irq = tlan_irq; + return 1; ++#else ++ nic->disable = tlan_disable; ++ nic->poll = tlan_poll; ++ nic->transmit = tlan_transmit; ++ nic->irq = tlan_irq; ++ return nic; ++#endif ++} ++ ++ ++/***************************************************************************** ++****************************************************************************** ++ ++ ThunderLAN Driver Eeprom routines ++ ++ The Compaq Netelligent 10 and 10/100 cards use a Microchip 24C02A ++ EEPROM. These functions are based on information in Microchip's ++ data sheet. I don't know how well this functions will work with ++ other EEPROMs. ++ ++****************************************************************************** ++*****************************************************************************/ + +-} /* TLan_HandleStatOverflow */ + + /*************************************************************** +- * TLan_HandleRxEOF ++ * TLan_EeSendStart + * + * Returns: +- * 1 ++ * Nothing + * Parms: +- * dev Device assigned the IRQ that was +- * raised. +- * host_int The contents of the HOST_INT +- * port. +- * +- * This function handles the Rx EOF interrupt which +- * indicates a frame has been received by the adapter from +- * the net and the frame has been transferred to memory. +- * The function determines the bounce buffer the frame has +- * been loaded into, creates a new sk_buff big enough to +- * hold the frame, and sends it to protocol stack. It +- * then resets the used buffer and appends it to the end +- * of the list. If the frame was the last in the Rx +- * channel (EOC), the function restarts the receive channel +- * by sending an Rx Go command to the adapter. Then it +- * activates/continues the activity LED. ++ * io_base The IO port base address for the ++ * TLAN device with the EEPROM to ++ * use. ++ * ++ * This function sends a start cycle to an EEPROM attached ++ * to a TLAN chip. + * + **************************************************************/ + +-u32 TLan_HandleRxEOF( struct net_device *dev, u16 host_int ) ++void TLan_EeSendStart(u16 io_base) + { +- TLanPrivateInfo *priv = dev->priv; +- u32 ack = 0; +- int eoc = 0; +- u8 *head_buffer; +- TLanList *head_list; +- struct sk_buff *skb; +- TLanList *tail_list; +- void *t; +- u32 frameSize; +- u16 tmpCStat; +- +- TLAN_DBG( TLAN_DEBUG_RX, "RECEIVE: Handling RX EOF (Head=%d Tail=%d)\n", priv->rxHead, priv->rxTail ); +- head_list = priv->rxList + priv->rxHead; +- +- while (((tmpCStat = head_list->cStat) & TLAN_CSTAT_FRM_CMP) && (ack < 255)) { +- frameSize = head_list->frameSize; +- ack++; +- if (tmpCStat & TLAN_CSTAT_EOC) +- eoc = 1; +- +- if (bbuf) { +- skb = dev_alloc_skb(frameSize + 7); +- if (skb == NULL) +- printk(KERN_INFO "TLAN: Couldn't allocate memory for received data.\n"); +- else { +- head_buffer = priv->rxBuffer + (priv->rxHead * TLAN_MAX_FRAME_SIZE); +- skb->dev = dev; +- skb_reserve(skb, 2); +- t = (void *) skb_put(skb, frameSize); +- +- priv->stats.rx_bytes += head_list->frameSize; +- +- memcpy( t, head_buffer, frameSize ); +- skb->protocol = eth_type_trans( skb, dev ); +- netif_rx( skb ); +- } +- } else { +- struct sk_buff *new_skb; +- +- /* +- * I changed the algorithm here. What we now do +- * is allocate the new frame. If this fails we +- * simply recycle the frame. +- */ +- +- new_skb = dev_alloc_skb( TLAN_MAX_FRAME_SIZE + 7 ); +- +- if ( new_skb != NULL ) { +- /* If this ever happened it would be a problem */ +- /* not any more - ac */ +- skb = (struct sk_buff *) head_list->buffer[9].address; +- skb_trim( skb, frameSize ); +- +- priv->stats.rx_bytes += frameSize; ++ u16 sio; + +- skb->protocol = eth_type_trans( skb, dev ); +- netif_rx( skb ); +- +- new_skb->dev = dev; +- skb_reserve( new_skb, 2 ); +- t = (void *) skb_put( new_skb, TLAN_MAX_FRAME_SIZE ); +- head_list->buffer[0].address = virt_to_bus( t ); +- head_list->buffer[8].address = (u32) t; +- head_list->buffer[9].address = (u32) new_skb; +- } else +- printk(KERN_WARNING "TLAN: Couldn't allocate memory for received data.\n" ); +- } ++ outw(TLAN_NET_SIO, io_base + TLAN_DIO_ADR); ++ sio = io_base + TLAN_DIO_DATA + TLAN_NET_SIO; + +- head_list->forward = 0; +- head_list->cStat = 0; +- tail_list = priv->rxList + priv->rxTail; +- tail_list->forward = virt_to_bus( head_list ); +- +- CIRC_INC( priv->rxHead, TLAN_NUM_RX_LISTS ); +- CIRC_INC( priv->rxTail, TLAN_NUM_RX_LISTS ); +- head_list = priv->rxList + priv->rxHead; +- } ++ TLan_SetBit(TLAN_NET_SIO_ECLOK, sio); ++ TLan_SetBit(TLAN_NET_SIO_EDATA, sio); ++ TLan_SetBit(TLAN_NET_SIO_ETXEN, sio); ++ TLan_ClearBit(TLAN_NET_SIO_EDATA, sio); ++ TLan_ClearBit(TLAN_NET_SIO_ECLOK, sio); + +- if (!ack) +- printk(KERN_INFO "TLAN: Received interrupt for uncompleted RX frame.\n"); +- ++} /* TLan_EeSendStart */ + +- if ( eoc ) { +- TLAN_DBG( TLAN_DEBUG_RX, "RECEIVE: Handling RX EOC (Head=%d Tail=%d)\n", priv->rxHead, priv->rxTail ); +- head_list = priv->rxList + priv->rxHead; +- outl( virt_to_bus( head_list ), dev->base_addr + TLAN_CH_PARM ); +- ack |= TLAN_HC_GO | TLAN_HC_RT; +- priv->rxEocCount++; +- } +- +- if ( priv->adapter->flags & TLAN_ADAPTER_ACTIVITY_LED ) { +- TLan_DioWrite8( dev->base_addr, TLAN_LED_REG, TLAN_LED_LINK | TLAN_LED_ACT ); +- if ( priv->timer.function == NULL ) { +- priv->timer.function = &TLan_Timer; +- priv->timer.data = (unsigned long) dev; +- priv->timer.expires = jiffies + TLAN_TIMER_ACT_DELAY; +- priv->timerSetAt = jiffies; +- priv->timerType = TLAN_TIMER_ACTIVITY; +- add_timer(&priv->timer); +- } else if ( priv->timerType == TLAN_TIMER_ACTIVITY ) { +- priv->timerSetAt = jiffies; +- } +- } + +- dev->last_rx = jiffies; +- +- return ack; + +-} /* TLan_HandleRxEOF */ + + /*************************************************************** +- * TLan_HandleDummy ++ * TLan_EeSendByte + * + * Returns: +- * 1 +- * Parms: +- * dev Device assigned the IRQ that was +- * raised. +- * host_int The contents of the HOST_INT +- * port. +- * +- * This function handles the Dummy interrupt, which is +- * raised whenever a test interrupt is generated by setting +- * the Req_Int bit of HOST_CMD to 1. ++ * If the correct ack was received, 0, otherwise 1 ++ * Parms: io_base The IO port base address for the ++ * TLAN device with the EEPROM to ++ * use. ++ * data The 8 bits of information to ++ * send to the EEPROM. ++ * stop If TLAN_EEPROM_STOP is passed, a ++ * stop cycle is sent after the ++ * byte is sent after the ack is ++ * read. ++ * ++ * This function sends a byte on the serial EEPROM line, ++ * driving the clock to send each bit. The function then ++ * reverses transmission direction and reads an acknowledge ++ * bit. + * + **************************************************************/ + +-u32 TLan_HandleDummy( struct net_device *dev, u16 host_int ) ++int TLan_EeSendByte(u16 io_base, u8 data, int stop) + { +- printk( "TLAN: Test interrupt on %s.\n", dev->name ); +- return 1; ++ int err; ++ u8 place; ++ u16 sio; + +-} /* TLan_HandleDummy */ ++ outw(TLAN_NET_SIO, io_base + TLAN_DIO_ADR); ++ sio = io_base + TLAN_DIO_DATA + TLAN_NET_SIO; + +- /*************************************************************** +- * TLan_HandleTxEOC +- * +- * Returns: +- * 1 +- * Parms: +- * dev Device assigned the IRQ that was +- * raised. +- * host_int The contents of the HOST_INT +- * port. +- * +- * This driver is structured to determine EOC occurances by +- * reading the CSTAT member of the list structure. Tx EOC +- * interrupts are disabled via the DIO INTDIS register. +- * However, TLAN chips before revision 3.0 didn't have this +- * functionality, so process EOC events if this is the +- * case. +- * +- **************************************************************/ ++ /* Assume clock is low, tx is enabled; */ ++ for (place = 0x80; place != 0; place >>= 1) { ++ if (place & data) ++ TLan_SetBit(TLAN_NET_SIO_EDATA, sio); ++ else ++ TLan_ClearBit(TLAN_NET_SIO_EDATA, sio); ++ TLan_SetBit(TLAN_NET_SIO_ECLOK, sio); ++ TLan_ClearBit(TLAN_NET_SIO_ECLOK, sio); ++ } ++ TLan_ClearBit(TLAN_NET_SIO_ETXEN, sio); ++ TLan_SetBit(TLAN_NET_SIO_ECLOK, sio); ++ err = TLan_GetBit(TLAN_NET_SIO_EDATA, sio); ++ TLan_ClearBit(TLAN_NET_SIO_ECLOK, sio); ++ TLan_SetBit(TLAN_NET_SIO_ETXEN, sio); + +-u32 TLan_HandleTxEOC( struct net_device *dev, u16 host_int ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- TLanList *head_list; +- u32 ack = 1; +- +- host_int = 0; +- if ( priv->tlanRev < 0x30 ) { +- TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: Handling TX EOC (Head=%d Tail=%d) -- IRQ\n", priv->txHead, priv->txTail ); +- head_list = priv->txList + priv->txHead; +- if ( ( head_list->cStat & TLAN_CSTAT_READY ) == TLAN_CSTAT_READY ) { +- netif_stop_queue(dev); +- outl( virt_to_bus( head_list ), dev->base_addr + TLAN_CH_PARM ); +- ack |= TLAN_HC_GO; +- } else { +- priv->txInProgress = 0; +- } ++ if ((!err) && stop) { ++ TLan_ClearBit(TLAN_NET_SIO_EDATA, sio); /* STOP, raise data while clock is high */ ++ TLan_SetBit(TLAN_NET_SIO_ECLOK, sio); ++ TLan_SetBit(TLAN_NET_SIO_EDATA, sio); + } + +- return ack; ++ return (err); ++ ++} /* TLan_EeSendByte */ ++ ++ + +-} /* TLan_HandleTxEOC */ + + /*************************************************************** +- * TLan_HandleStatusCheck ++ * TLan_EeReceiveByte + * + * Returns: +- * 0 if Adapter check, 1 if Network Status check. ++ * Nothing + * Parms: +- * dev Device assigned the IRQ that was +- * raised. +- * host_int The contents of the HOST_INT +- * port. +- * +- * This function handles Adapter Check/Network Status +- * interrupts generated by the adapter. It checks the +- * vector in the HOST_INT register to determine if it is +- * an Adapter Check interrupt. If so, it resets the +- * adapter. Otherwise it clears the status registers +- * and services the PHY. ++ * io_base The IO port base address for the ++ * TLAN device with the EEPROM to ++ * use. ++ * data An address to a char to hold the ++ * data sent from the EEPROM. ++ * stop If TLAN_EEPROM_STOP is passed, a ++ * stop cycle is sent after the ++ * byte is received, and no ack is ++ * sent. ++ * ++ * This function receives 8 bits of data from the EEPROM ++ * over the serial link. It then sends and ack bit, or no ++ * ack and a stop bit. This function is used to retrieve ++ * data after the address of a byte in the EEPROM has been ++ * sent. + * + **************************************************************/ + +-u32 TLan_HandleStatusCheck( struct net_device *dev, u16 host_int ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- u32 ack; +- u32 error; +- u8 net_sts; +- u32 phy; +- u16 tlphy_ctl; +- u16 tlphy_sts; +- +- ack = 1; +- if ( host_int & TLAN_HI_IV_MASK ) { +- netif_stop_queue( dev ); +- error = inl( dev->base_addr + TLAN_CH_PARM ); +- printk( "TLAN: %s: Adaptor Error = 0x%x\n", dev->name, error ); +- TLan_ReadAndClearStats( dev, TLAN_RECORD ); +- outl( TLAN_HC_AD_RST, dev->base_addr + TLAN_HOST_CMD ); +- +- queue_task(&priv->tlan_tqueue, &tq_immediate); +- mark_bh(IMMEDIATE_BH); +- +- netif_wake_queue(dev); +- ack = 0; +- } else { +- TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Status Check\n", dev->name ); +- phy = priv->phy[priv->phyNum]; ++void TLan_EeReceiveByte(u16 io_base, u8 * data, int stop) ++{ ++ u8 place; ++ u16 sio; + +- net_sts = TLan_DioRead8( dev->base_addr, TLAN_NET_STS ); +- if ( net_sts ) { +- TLan_DioWrite8( dev->base_addr, TLAN_NET_STS, net_sts ); +- TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Net_Sts = %x\n", dev->name, (unsigned) net_sts ); +- } +- if ( ( net_sts & TLAN_NET_STS_MIRQ ) && ( priv->phyNum == 0 ) ) { +- TLan_MiiReadReg( dev, phy, TLAN_TLPHY_STS, &tlphy_sts ); +- TLan_MiiReadReg( dev, phy, TLAN_TLPHY_CTL, &tlphy_ctl ); +- if ( ! ( tlphy_sts & TLAN_TS_POLOK ) && ! ( tlphy_ctl & TLAN_TC_SWAPOL ) ) { +- tlphy_ctl |= TLAN_TC_SWAPOL; +- TLan_MiiWriteReg( dev, phy, TLAN_TLPHY_CTL, tlphy_ctl); +- } else if ( ( tlphy_sts & TLAN_TS_POLOK ) && ( tlphy_ctl & TLAN_TC_SWAPOL ) ) { +- tlphy_ctl &= ~TLAN_TC_SWAPOL; +- TLan_MiiWriteReg( dev, phy, TLAN_TLPHY_CTL, tlphy_ctl); +- } ++ outw(TLAN_NET_SIO, io_base + TLAN_DIO_ADR); ++ sio = io_base + TLAN_DIO_DATA + TLAN_NET_SIO; ++ *data = 0; + +- if (debug) { +- TLan_PhyPrint( dev ); +- } +- } ++ /* Assume clock is low, tx is enabled; */ ++ TLan_ClearBit(TLAN_NET_SIO_ETXEN, sio); ++ for (place = 0x80; place; place >>= 1) { ++ TLan_SetBit(TLAN_NET_SIO_ECLOK, sio); ++ if (TLan_GetBit(TLAN_NET_SIO_EDATA, sio)) ++ *data |= place; ++ TLan_ClearBit(TLAN_NET_SIO_ECLOK, sio); ++ } ++ ++ TLan_SetBit(TLAN_NET_SIO_ETXEN, sio); ++ if (!stop) { ++ TLan_ClearBit(TLAN_NET_SIO_EDATA, sio); /* Ack = 0 */ ++ TLan_SetBit(TLAN_NET_SIO_ECLOK, sio); ++ TLan_ClearBit(TLAN_NET_SIO_ECLOK, sio); ++ } else { ++ TLan_SetBit(TLAN_NET_SIO_EDATA, sio); /* No ack = 1 (?) */ ++ TLan_SetBit(TLAN_NET_SIO_ECLOK, sio); ++ TLan_ClearBit(TLAN_NET_SIO_ECLOK, sio); ++ TLan_ClearBit(TLAN_NET_SIO_EDATA, sio); /* STOP, raise data while clock is high */ ++ TLan_SetBit(TLAN_NET_SIO_ECLOK, sio); ++ TLan_SetBit(TLAN_NET_SIO_EDATA, sio); + } + +- return ack; ++} /* TLan_EeReceiveByte */ ++ + +-} /* TLan_HandleStatusCheck */ + + /*************************************************************** +- * TLan_HandleRxEOC ++ * TLan_EeReadByte + * + * Returns: +- * 1 ++ * No error = 0, else, the stage at which the error ++ * occurred. + * Parms: +- * dev Device assigned the IRQ that was +- * raised. +- * host_int The contents of the HOST_INT +- * port. +- * +- * This driver is structured to determine EOC occurances by +- * reading the CSTAT member of the list structure. Rx EOC +- * interrupts are disabled via the DIO INTDIS register. +- * However, TLAN chips before revision 3.0 didn't have this +- * CSTAT member or a INTDIS register, so if this chip is +- * pre-3.0, process EOC interrupts normally. ++ * io_base The IO port base address for the ++ * TLAN device with the EEPROM to ++ * use. ++ * ee_addr The address of the byte in the ++ * EEPROM whose contents are to be ++ * retrieved. ++ * data An address to a char to hold the ++ * data obtained from the EEPROM. ++ * ++ * This function reads a byte of information from an byte ++ * cell in the EEPROM. + * + **************************************************************/ + +-u32 TLan_HandleRxEOC( struct net_device *dev, u16 host_int ) ++int TLan_EeReadByte(u16 io_base, u8 ee_addr, u8 * data) + { +- TLanPrivateInfo *priv = dev->priv; +- TLanList *head_list; +- u32 ack = 1; ++ int err; ++ int ret = 0; + +- if ( priv->tlanRev < 0x30 ) { +- TLAN_DBG( TLAN_DEBUG_RX, "RECEIVE: Handling RX EOC (Head=%d Tail=%d) -- IRQ\n", priv->rxHead, priv->rxTail ); +- head_list = priv->rxList + priv->rxHead; +- outl( virt_to_bus( head_list ), dev->base_addr + TLAN_CH_PARM ); +- ack |= TLAN_HC_GO | TLAN_HC_RT; +- priv->rxEocCount++; ++ ++ TLan_EeSendStart(io_base); ++ err = TLan_EeSendByte(io_base, 0xA0, TLAN_EEPROM_ACK); ++ if (err) { ++ ret = 1; ++ goto fail; ++ } ++ err = TLan_EeSendByte(io_base, ee_addr, TLAN_EEPROM_ACK); ++ if (err) { ++ ret = 2; ++ goto fail; ++ } ++ TLan_EeSendStart(io_base); ++ err = TLan_EeSendByte(io_base, 0xA1, TLAN_EEPROM_ACK); ++ if (err) { ++ ret = 3; ++ goto fail; + } ++ TLan_EeReceiveByte(io_base, data, TLAN_EEPROM_STOP); ++ fail: + +- return ack; ++ return ret; ++ ++} /* TLan_EeReadByte */ + +-} /* TLan_HandleRxEOC */ + + /***************************************************************************** + ****************************************************************************** + +- ThunderLAN Driver Timer Function ++ ThunderLAN Driver MII Routines ++ ++ These routines are based on the information in Chap. 2 of the ++ "ThunderLAN Programmer's Guide", pp. 15-24. + + ****************************************************************************** + *****************************************************************************/ + ++ + /*************************************************************** +- * TLan_Timer ++ * TLan_MiiReadReg + * + * Returns: +- * Nothing ++ * 0 if ack received ok ++ * 1 otherwise. ++ * + * Parms: +- * data A value given to add timer when +- * add_timer was called. ++ * dev The device structure containing ++ * The io address and interrupt count ++ * for this device. ++ * phy The address of the PHY to be queried. ++ * reg The register whose contents are to be ++ * retreived. ++ * val A pointer to a variable to store the ++ * retrieved value. + * +- * This function handles timed functionality for the +- * TLAN driver. The two current timer uses are for +- * delaying for autonegotionation and driving the ACT LED. +- * - Autonegotiation requires being allowed about +- * 2 1/2 seconds before attempting to transmit a +- * packet. It would be a very bad thing to hang +- * the kernel this long, so the driver doesn't +- * allow transmission 'til after this time, for +- * certain PHYs. It would be much nicer if all +- * PHYs were interrupt-capable like the internal +- * PHY. +- * - The ACT LED, which shows adapter activity, is +- * driven by the driver, and so must be left on +- * for a short period to power up the LED so it +- * can be seen. This delay can be changed by +- * changing the TLAN_TIMER_ACT_DELAY in tlan.h, +- * if desired. 100 ms produces a slightly +- * sluggish response. ++ * This function uses the TLAN's MII bus to retreive the contents ++ * of a given register on a PHY. It sends the appropriate info ++ * and then reads the 16-bit register value from the MII bus via ++ * the TLAN SIO register. + * + **************************************************************/ + +-void TLan_Timer( unsigned long data ) ++int TLan_MiiReadReg(struct nic *nic __unused, u16 phy, u16 reg, u16 * val) + { +- struct net_device *dev = (struct net_device *) data; +- TLanPrivateInfo *priv = dev->priv; +- u32 elapsed; +- unsigned long flags = 0; +- +- priv->timer.function = NULL; +- +- switch ( priv->timerType ) { +-#ifdef MONITOR +- case TLAN_TIMER_LINK_BEAT: +- TLan_PhyMonitor( dev ); +- break; +-#endif +- case TLAN_TIMER_PHY_PDOWN: +- TLan_PhyPowerDown( dev ); +- break; +- case TLAN_TIMER_PHY_PUP: +- TLan_PhyPowerUp( dev ); +- break; +- case TLAN_TIMER_PHY_RESET: +- TLan_PhyReset( dev ); +- break; +- case TLAN_TIMER_PHY_START_LINK: +- TLan_PhyStartLink( dev ); +- break; +- case TLAN_TIMER_PHY_FINISH_AN: +- TLan_PhyFinishAutoNeg( dev ); +- break; +- case TLAN_TIMER_FINISH_RESET: +- TLan_FinishReset( dev ); +- break; +- case TLAN_TIMER_ACTIVITY: +- spin_lock_irqsave(&priv->lock, flags); +- if ( priv->timer.function == NULL ) { +- elapsed = jiffies - priv->timerSetAt; +- if ( elapsed >= TLAN_TIMER_ACT_DELAY ) { +- TLan_DioWrite8( dev->base_addr, TLAN_LED_REG, TLAN_LED_LINK ); +- } else { +- priv->timer.function = &TLan_Timer; +- priv->timer.expires = priv->timerSetAt + TLAN_TIMER_ACT_DELAY; +- spin_unlock_irqrestore(&priv->lock, flags); +- add_timer( &priv->timer ); +- break; +- } +- } +- spin_unlock_irqrestore(&priv->lock, flags); +- break; +- default: +- break; ++ u8 nack; ++ u16 sio, tmp; ++ u32 i; ++ int err; ++ int minten; ++ ++ err = FALSE; ++ outw(TLAN_NET_SIO, BASE + TLAN_DIO_ADR); ++ sio = BASE + TLAN_DIO_DATA + TLAN_NET_SIO; ++ ++ TLan_MiiSync(BASE); ++ ++ minten = TLan_GetBit(TLAN_NET_SIO_MINTEN, sio); ++ if (minten) ++ TLan_ClearBit(TLAN_NET_SIO_MINTEN, sio); ++ ++ TLan_MiiSendData(BASE, 0x1, 2); /* Start ( 01b ) */ ++ TLan_MiiSendData(BASE, 0x2, 2); /* Read ( 10b ) */ ++ TLan_MiiSendData(BASE, phy, 5); /* Device # */ ++ TLan_MiiSendData(BASE, reg, 5); /* Register # */ ++ ++ ++ TLan_ClearBit(TLAN_NET_SIO_MTXEN, sio); /* Change direction */ ++ ++ TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); /* Clock Idle bit */ ++ TLan_SetBit(TLAN_NET_SIO_MCLK, sio); ++ TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); /* Wait 300ns */ ++ ++ nack = TLan_GetBit(TLAN_NET_SIO_MDATA, sio); /* Check for ACK */ ++ TLan_SetBit(TLAN_NET_SIO_MCLK, sio); /* Finish ACK */ ++ if (nack) { /* No ACK, so fake it */ ++ for (i = 0; i < 16; i++) { ++ TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); ++ TLan_SetBit(TLAN_NET_SIO_MCLK, sio); ++ } ++ tmp = 0xffff; ++ err = TRUE; ++ } else { /* ACK, so read data */ ++ for (tmp = 0, i = 0x8000; i; i >>= 1) { ++ TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); ++ if (TLan_GetBit(TLAN_NET_SIO_MDATA, sio)) ++ tmp |= i; ++ TLan_SetBit(TLAN_NET_SIO_MCLK, sio); ++ } + } + +-} /* TLan_Timer */ + +-/***************************************************************************** +-****************************************************************************** ++ TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); /* Idle cycle */ ++ TLan_SetBit(TLAN_NET_SIO_MCLK, sio); + +- ThunderLAN Driver Adapter Related Routines ++ if (minten) ++ TLan_SetBit(TLAN_NET_SIO_MINTEN, sio); + +-****************************************************************************** +-*****************************************************************************/ ++ *val = tmp; ++ ++ return err; ++ ++} /* TLan_MiiReadReg */ + + /*************************************************************** +- * TLan_ResetLists +- * ++ * TLan_MiiSendData ++ * + * Returns: + * Nothing + * Parms: +- * dev The device structure with the list +- * stuctures to be reset. ++ * base_port The base IO port of the adapter in ++ * question. ++ * dev The address of the PHY to be queried. ++ * data The value to be placed on the MII bus. ++ * num_bits The number of bits in data that are to ++ * be placed on the MII bus. + * +- * This routine sets the variables associated with managing +- * the TLAN lists to their initial values. ++ * This function sends on sequence of bits on the MII ++ * configuration bus. + * + **************************************************************/ + +-void TLan_ResetLists( struct net_device *dev ) ++void TLan_MiiSendData(u16 base_port, u32 data, unsigned num_bits) + { +- TLanPrivateInfo *priv = dev->priv; +- int i; +- TLanList *list; +- struct sk_buff *skb; +- void *t = NULL; ++ u16 sio; ++ u32 i; + +- priv->txHead = 0; +- priv->txTail = 0; +- for ( i = 0; i < TLAN_NUM_TX_LISTS; i++ ) { +- list = priv->txList + i; +- list->cStat = TLAN_CSTAT_UNUSED; +- if ( bbuf ) { +- list->buffer[0].address = virt_to_bus( priv->txBuffer + ( i * TLAN_MAX_FRAME_SIZE ) ); +- } else { +- list->buffer[0].address = 0; +- } +- list->buffer[2].count = 0; +- list->buffer[2].address = 0; +- list->buffer[9].address = 0; +- } ++ if (num_bits == 0) ++ return; ++ ++ outw(TLAN_NET_SIO, base_port + TLAN_DIO_ADR); ++ sio = base_port + TLAN_DIO_DATA + TLAN_NET_SIO; ++ TLan_SetBit(TLAN_NET_SIO_MTXEN, sio); + +- priv->rxHead = 0; +- priv->rxTail = TLAN_NUM_RX_LISTS - 1; +- for ( i = 0; i < TLAN_NUM_RX_LISTS; i++ ) { +- list = priv->rxList + i; +- list->cStat = TLAN_CSTAT_READY; +- list->frameSize = TLAN_MAX_FRAME_SIZE; +- list->buffer[0].count = TLAN_MAX_FRAME_SIZE | TLAN_LAST_BUFFER; +- if ( bbuf ) { +- list->buffer[0].address = virt_to_bus( priv->rxBuffer + ( i * TLAN_MAX_FRAME_SIZE ) ); +- } else { +- skb = dev_alloc_skb( TLAN_MAX_FRAME_SIZE + 7 ); +- if ( skb == NULL ) { +- printk( "TLAN: Couldn't allocate memory for received data.\n" ); +- /* If this ever happened it would be a problem */ +- } else { +- skb->dev = dev; +- skb_reserve( skb, 2 ); +- t = (void *) skb_put( skb, TLAN_MAX_FRAME_SIZE ); +- } +- list->buffer[0].address = virt_to_bus( t ); +- list->buffer[8].address = (u32) t; +- list->buffer[9].address = (u32) skb; +- } +- list->buffer[1].count = 0; +- list->buffer[1].address = 0; +- if ( i < TLAN_NUM_RX_LISTS - 1 ) +- list->forward = virt_to_bus( list + 1 ); ++ for (i = (0x1 << (num_bits - 1)); i; i >>= 1) { ++ TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); ++ (void) TLan_GetBit(TLAN_NET_SIO_MCLK, sio); ++ if (data & i) ++ TLan_SetBit(TLAN_NET_SIO_MDATA, sio); + else +- list->forward = 0; ++ TLan_ClearBit(TLAN_NET_SIO_MDATA, sio); ++ TLan_SetBit(TLAN_NET_SIO_MCLK, sio); ++ (void) TLan_GetBit(TLAN_NET_SIO_MCLK, sio); + } + +-} /* TLan_ResetLists */ ++} /* TLan_MiiSendData */ + +-void TLan_FreeLists( struct net_device *dev ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- int i; +- TLanList *list; +- struct sk_buff *skb; +- +- if ( ! bbuf ) { +- for ( i = 0; i < TLAN_NUM_TX_LISTS; i++ ) { +- list = priv->txList + i; +- skb = (struct sk_buff *) list->buffer[9].address; +- if ( skb ) { +- dev_kfree_skb_any( skb ); +- list->buffer[9].address = 0; +- } +- } + +- for ( i = 0; i < TLAN_NUM_RX_LISTS; i++ ) { +- list = priv->rxList + i; +- skb = (struct sk_buff *) list->buffer[9].address; +- if ( skb ) { +- dev_kfree_skb_any( skb ); +- list->buffer[9].address = 0; +- } +- } +- } + +-} /* TLan_FreeLists */ + + /*************************************************************** +- * TLan_PrintDio +- * ++ * TLan_MiiSync ++ * + * Returns: + * Nothing + * Parms: +- * io_base Base IO port of the device of +- * which to print DIO registers. ++ * base_port The base IO port of the adapter in ++ * question. + * +- * This function prints out all the internal (DIO) +- * registers of a TLAN chip. ++ * This functions syncs all PHYs in terms of the MII configuration ++ * bus. + * + **************************************************************/ + +-void TLan_PrintDio( u16 io_base ) ++void TLan_MiiSync(u16 base_port) + { +- u32 data0, data1; +- int i; ++ int i; ++ u16 sio; + +- printk( "TLAN: Contents of internal registers for io base 0x%04hx.\n", io_base ); +- printk( "TLAN: Off. +0 +4\n" ); +- for ( i = 0; i < 0x4C; i+= 8 ) { +- data0 = TLan_DioRead32( io_base, i ); +- data1 = TLan_DioRead32( io_base, i + 0x4 ); +- printk( "TLAN: 0x%02x 0x%08x 0x%08x\n", i, data0, data1 ); ++ outw(TLAN_NET_SIO, base_port + TLAN_DIO_ADR); ++ sio = base_port + TLAN_DIO_DATA + TLAN_NET_SIO; ++ ++ TLan_ClearBit(TLAN_NET_SIO_MTXEN, sio); ++ for (i = 0; i < 32; i++) { ++ TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); ++ TLan_SetBit(TLAN_NET_SIO_MCLK, sio); + } + +-} /* TLan_PrintDio */ ++} /* TLan_MiiSync */ ++ ++ ++ + + /*************************************************************** +- * TLan_PrintList +- * ++ * TLan_MiiWriteReg ++ * + * Returns: + * Nothing + * Parms: +- * list A pointer to the TLanList structure to +- * be printed. +- * type A string to designate type of list, +- * "Rx" or "Tx". +- * num The index of the list. ++ * dev The device structure for the device ++ * to write to. ++ * phy The address of the PHY to be written to. ++ * reg The register whose contents are to be ++ * written. ++ * val The value to be written to the register. + * +- * This function prints out the contents of the list +- * pointed to by the list parameter. ++ * This function uses the TLAN's MII bus to write the contents of a ++ * given register on a PHY. It sends the appropriate info and then ++ * writes the 16-bit register value from the MII configuration bus ++ * via the TLAN SIO register. + * + **************************************************************/ + +-void TLan_PrintList( TLanList *list, char *type, int num) ++void TLan_MiiWriteReg(struct nic *nic __unused, u16 phy, u16 reg, u16 val) + { +- int i; ++ u16 sio; ++ int minten; ++ ++ outw(TLAN_NET_SIO, BASE + TLAN_DIO_ADR); ++ sio = BASE + TLAN_DIO_DATA + TLAN_NET_SIO; ++ ++ TLan_MiiSync(BASE); ++ ++ minten = TLan_GetBit(TLAN_NET_SIO_MINTEN, sio); ++ if (minten) ++ TLan_ClearBit(TLAN_NET_SIO_MINTEN, sio); ++ ++ TLan_MiiSendData(BASE, 0x1, 2); /* Start ( 01b ) */ ++ TLan_MiiSendData(BASE, 0x1, 2); /* Write ( 01b ) */ ++ TLan_MiiSendData(BASE, phy, 5); /* Device # */ ++ TLan_MiiSendData(BASE, reg, 5); /* Register # */ ++ ++ TLan_MiiSendData(BASE, 0x2, 2); /* Send ACK */ ++ TLan_MiiSendData(BASE, val, 16); /* Send Data */ ++ ++ TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); /* Idle cycle */ ++ TLan_SetBit(TLAN_NET_SIO_MCLK, sio); ++ ++ if (minten) ++ TLan_SetBit(TLAN_NET_SIO_MINTEN, sio); + +- printk( "TLAN: %s List %d at 0x%08x\n", type, num, (u32) list ); +- printk( "TLAN: Forward = 0x%08x\n", list->forward ); +- printk( "TLAN: CSTAT = 0x%04hx\n", list->cStat ); +- printk( "TLAN: Frame Size = 0x%04hx\n", list->frameSize ); +- /* for ( i = 0; i < 10; i++ ) { */ +- for ( i = 0; i < 2; i++ ) { +- printk( "TLAN: Buffer[%d].count, addr = 0x%08x, 0x%08x\n", i, list->buffer[i].count, list->buffer[i].address ); +- } + +-} /* TLan_PrintList */ ++} /* TLan_MiiWriteReg */ + + /*************************************************************** +- * TLan_ReadAndClearStats ++ * TLan_SetMac + * + * Returns: + * Nothing + * Parms: + * dev Pointer to device structure of adapter +- * to which to read stats. +- * record Flag indicating whether to add ++ * on which to change the AREG. ++ * areg The AREG to set the address in (0 - 3). ++ * mac A pointer to an array of chars. Each ++ * element stores one byte of the address. ++ * IE, it isn't in ascii. + * +- * This functions reads all the internal status registers +- * of the TLAN chip, which clears them as a side effect. +- * It then either adds the values to the device's status +- * struct, or discards them, depending on whether record +- * is TLAN_RECORD (!=0) or TLAN_IGNORE (==0). ++ * This function transfers a MAC address to one of the ++ * TLAN AREGs (address registers). The TLAN chip locks ++ * the register on writing to offset 0 and unlocks the ++ * register after writing to offset 5. If NULL is passed ++ * in mac, then the AREG is filled with 0's. + * + **************************************************************/ + +-void TLan_ReadAndClearStats( struct net_device *dev, int record ) ++void TLan_SetMac(struct nic *nic __unused, int areg, char *mac) + { +- TLanPrivateInfo *priv = dev->priv; +- u32 tx_good, tx_under; +- u32 rx_good, rx_over; +- u32 def_tx, crc, code; +- u32 multi_col, single_col; +- u32 excess_col, late_col, loss; +- +- outw( TLAN_GOOD_TX_FRMS, dev->base_addr + TLAN_DIO_ADR ); +- tx_good = inb( dev->base_addr + TLAN_DIO_DATA ); +- tx_good += inb( dev->base_addr + TLAN_DIO_DATA + 1 ) << 8; +- tx_good += inb( dev->base_addr + TLAN_DIO_DATA + 2 ) << 16; +- tx_under = inb( dev->base_addr + TLAN_DIO_DATA + 3 ); +- +- outw( TLAN_GOOD_RX_FRMS, dev->base_addr + TLAN_DIO_ADR ); +- rx_good = inb( dev->base_addr + TLAN_DIO_DATA ); +- rx_good += inb( dev->base_addr + TLAN_DIO_DATA + 1 ) << 8; +- rx_good += inb( dev->base_addr + TLAN_DIO_DATA + 2 ) << 16; +- rx_over = inb( dev->base_addr + TLAN_DIO_DATA + 3 ); +- +- outw( TLAN_DEFERRED_TX, dev->base_addr + TLAN_DIO_ADR ); +- def_tx = inb( dev->base_addr + TLAN_DIO_DATA ); +- def_tx += inb( dev->base_addr + TLAN_DIO_DATA + 1 ) << 8; +- crc = inb( dev->base_addr + TLAN_DIO_DATA + 2 ); +- code = inb( dev->base_addr + TLAN_DIO_DATA + 3 ); +- +- outw( TLAN_MULTICOL_FRMS, dev->base_addr + TLAN_DIO_ADR ); +- multi_col = inb( dev->base_addr + TLAN_DIO_DATA ); +- multi_col += inb( dev->base_addr + TLAN_DIO_DATA + 1 ) << 8; +- single_col = inb( dev->base_addr + TLAN_DIO_DATA + 2 ); +- single_col += inb( dev->base_addr + TLAN_DIO_DATA + 3 ) << 8; +- +- outw( TLAN_EXCESSCOL_FRMS, dev->base_addr + TLAN_DIO_ADR ); +- excess_col = inb( dev->base_addr + TLAN_DIO_DATA ); +- late_col = inb( dev->base_addr + TLAN_DIO_DATA + 1 ); +- loss = inb( dev->base_addr + TLAN_DIO_DATA + 2 ); +- +- if ( record ) { +- priv->stats.rx_packets += rx_good; +- priv->stats.rx_errors += rx_over + crc + code; +- priv->stats.tx_packets += tx_good; +- priv->stats.tx_errors += tx_under + loss; +- priv->stats.collisions += multi_col + single_col + excess_col + late_col; +- +- priv->stats.rx_over_errors += rx_over; +- priv->stats.rx_crc_errors += crc; +- priv->stats.rx_frame_errors += code; ++ int i; + +- priv->stats.tx_aborted_errors += tx_under; +- priv->stats.tx_carrier_errors += loss; ++ areg *= 6; ++ ++ if (mac != NULL) { ++ for (i = 0; i < 6; i++) ++ TLan_DioWrite8(BASE, TLAN_AREG_0 + areg + i, ++ mac[i]); ++ } else { ++ for (i = 0; i < 6; i++) ++ TLan_DioWrite8(BASE, TLAN_AREG_0 + areg + i, 0); + } +- +-} /* TLan_ReadAndClearStats */ + +- /*************************************************************** +- * TLan_Reset ++} /* TLan_SetMac */ ++ ++ /********************************************************************* ++ * TLan_PhyDetect + * + * Returns: +- * 0 ++ * Nothing + * Parms: +- * dev Pointer to device structure of adapter +- * to be reset. ++ * dev A pointer to the device structure of the adapter ++ * for which the PHY needs determined. + * +- * This function resets the adapter and it's physical +- * device. See Chap. 3, pp. 9-10 of the "ThunderLAN +- * Programmer's Guide" for details. The routine tries to +- * implement what is detailed there, though adjustments +- * have been made. ++ * So far I've found that adapters which have external PHYs ++ * may also use the internal PHY for part of the functionality. ++ * (eg, AUI/Thinnet). This function finds out if this TLAN ++ * chip has an internal PHY, and then finds the first external ++ * PHY (starting from address 0) if it exists). + * +- **************************************************************/ ++ ********************************************************************/ + +-void +-TLan_ResetAdapter( struct net_device *dev ) ++void TLan_PhyDetect(struct nic *nic) + { +- TLanPrivateInfo *priv = dev->priv; +- int i; +- u32 addr; +- u32 data; +- u8 data8; ++ u16 control; ++ u16 hi; ++ u16 lo; ++ u32 phy; + +- priv->tlanFullDuplex = FALSE; +- priv->phyOnline=0; +-/* 1. Assert reset bit. */ ++ if (tlan_pci_tbl[chip_idx].flags & TLAN_ADAPTER_UNMANAGED_PHY) { ++ priv->phyNum = 0xFFFF; ++ return; ++ } + +- data = inl(dev->base_addr + TLAN_HOST_CMD); +- data |= TLAN_HC_AD_RST; +- outl(data, dev->base_addr + TLAN_HOST_CMD); +- +- udelay(1000); ++ TLan_MiiReadReg(nic, TLAN_PHY_MAX_ADDR, MII_GEN_ID_HI, &hi); + +-/* 2. Turn off interrupts. ( Probably isn't necessary ) */ ++ if (hi != 0xFFFF) { ++ priv->phy[0] = TLAN_PHY_MAX_ADDR; ++ } else { ++ priv->phy[0] = TLAN_PHY_NONE; ++ } + +- data = inl(dev->base_addr + TLAN_HOST_CMD); +- data |= TLAN_HC_INT_OFF; +- outl(data, dev->base_addr + TLAN_HOST_CMD); ++ priv->phy[1] = TLAN_PHY_NONE; ++ for (phy = 0; phy <= TLAN_PHY_MAX_ADDR; phy++) { ++ TLan_MiiReadReg(nic, phy, MII_GEN_CTL, &control); ++ TLan_MiiReadReg(nic, phy, MII_GEN_ID_HI, &hi); ++ TLan_MiiReadReg(nic, phy, MII_GEN_ID_LO, &lo); ++ if ((control != 0xFFFF) || (hi != 0xFFFF) ++ || (lo != 0xFFFF)) { ++ printf("PHY found at %hX %hX %hX %hX\n", phy, ++ control, hi, lo); ++ if ((priv->phy[1] == TLAN_PHY_NONE) ++ && (phy != TLAN_PHY_MAX_ADDR)) { ++ priv->phy[1] = phy; ++ } ++ } ++ } + +-/* 3. Clear AREGs and HASHs. */ ++ if (priv->phy[1] != TLAN_PHY_NONE) { ++ priv->phyNum = 1; ++ } else if (priv->phy[0] != TLAN_PHY_NONE) { ++ priv->phyNum = 0; ++ } else { ++ printf ++ ("TLAN: Cannot initialize device, no PHY was found!\n"); ++ } ++ ++} /* TLan_PhyDetect */ + +- for ( i = TLAN_AREG_0; i <= TLAN_HASH_2; i += 4 ) { +- TLan_DioWrite32( dev->base_addr, (u16) i, 0 ); ++void TLan_PhyPowerDown(struct nic *nic) ++{ ++ ++ u16 value; ++ printf("%s: Powering down PHY(s).\n", priv->nic_name); ++ value = MII_GC_PDOWN | MII_GC_LOOPBK | MII_GC_ISOLATE; ++ TLan_MiiSync(BASE); ++ TLan_MiiWriteReg(nic, priv->phy[priv->phyNum], MII_GEN_CTL, value); ++ if ((priv->phyNum == 0) && (priv->phy[1] != TLAN_PHY_NONE) ++ && ++ (!(tlan_pci_tbl[chip_idx]. ++ flags & TLAN_ADAPTER_USE_INTERN_10))) { ++ TLan_MiiSync(BASE); ++ TLan_MiiWriteReg(nic, priv->phy[1], MII_GEN_CTL, value); + } + +-/* 4. Setup NetConfig register. */ ++ /* Wait for 50 ms and powerup ++ * This is abitrary. It is intended to make sure the ++ * tranceiver settles. ++ */ ++ /* TLan_SetTimer( dev, (HZ/20), TLAN_TIMER_PHY_PUP ); */ ++ mdelay(50); ++ TLan_PhyPowerUp(nic); + +- data = TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN | TLAN_NET_CFG_PHY_EN; +- TLan_DioWrite16( dev->base_addr, TLAN_NET_CONFIG, (u16) data ); ++} /* TLan_PhyPowerDown */ + +-/* 5. Load Ld_Tmr and Ld_Thr in HOST_CMD. */ + +- outl( TLAN_HC_LD_TMR | 0x3f, dev->base_addr + TLAN_HOST_CMD ); +- outl( TLAN_HC_LD_THR | 0x9, dev->base_addr + TLAN_HOST_CMD ); ++void TLan_PhyPowerUp(struct nic *nic) ++{ ++ u16 value; + +-/* 6. Unreset the MII by setting NMRST (in NetSio) to 1. */ ++ printf("%s: Powering up PHY.\n", priv->nic_name); ++ TLan_MiiSync(BASE); ++ value = MII_GC_LOOPBK; ++ TLan_MiiWriteReg(nic, priv->phy[priv->phyNum], MII_GEN_CTL, value); ++ TLan_MiiSync(BASE); ++ /* Wait for 500 ms and reset the ++ * tranceiver. The TLAN docs say both 50 ms and ++ * 500 ms, so do the longer, just in case. ++ */ ++ mdelay(500); ++ TLan_PhyReset(nic); ++ /* TLan_SetTimer( dev, (HZ/20), TLAN_TIMER_PHY_RESET ); */ + +- outw( TLAN_NET_SIO, dev->base_addr + TLAN_DIO_ADR ); +- addr = dev->base_addr + TLAN_DIO_DATA + TLAN_NET_SIO; +- TLan_SetBit( TLAN_NET_SIO_NMRST, addr ); ++} /* TLan_PhyPowerUp */ + +-/* 7. Setup the remaining registers. */ ++void TLan_PhyReset(struct nic *nic) ++{ ++ u16 phy; ++ u16 value; + +- if ( priv->tlanRev >= 0x30 ) { +- data8 = TLAN_ID_TX_EOC | TLAN_ID_RX_EOC; +- TLan_DioWrite8( dev->base_addr, TLAN_INT_DIS, data8 ); ++ phy = priv->phy[priv->phyNum]; ++ ++ printf("%s: Reseting PHY.\n", priv->nic_name); ++ TLan_MiiSync(BASE); ++ value = MII_GC_LOOPBK | MII_GC_RESET; ++ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, value); ++ TLan_MiiReadReg(nic, phy, MII_GEN_CTL, &value); ++ while (value & MII_GC_RESET) { ++ TLan_MiiReadReg(nic, phy, MII_GEN_CTL, &value); + } +- TLan_PhyDetect( dev ); +- data = TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN; +- +- if ( priv->adapter->flags & TLAN_ADAPTER_BIT_RATE_PHY ) { +- data |= TLAN_NET_CFG_BIT; +- if ( priv->aui == 1 ) { +- TLan_DioWrite8( dev->base_addr, TLAN_ACOMMIT, 0x0a ); +- } else if ( priv->duplex == TLAN_DUPLEX_FULL ) { +- TLan_DioWrite8( dev->base_addr, TLAN_ACOMMIT, 0x00 ); ++ ++ /* Wait for 500 ms and initialize. ++ * I don't remember why I wait this long. ++ * I've changed this to 50ms, as it seems long enough. ++ */ ++ /* TLan_SetTimer( dev, (HZ/20), TLAN_TIMER_PHY_START_LINK ); */ ++ mdelay(50); ++ TLan_PhyStartLink(nic); ++ ++} /* TLan_PhyReset */ ++ ++ ++void TLan_PhyStartLink(struct nic *nic) ++{ ++ ++ u16 ability; ++ u16 control; ++ u16 data; ++ u16 phy; ++ u16 status; ++ u16 tctl; ++ ++ phy = priv->phy[priv->phyNum]; ++ printf("%s: Trying to activate link.\n", priv->nic_name); ++ TLan_MiiReadReg(nic, phy, MII_GEN_STS, &status); ++ TLan_MiiReadReg(nic, phy, MII_GEN_STS, &ability); ++ ++ if ((status & MII_GS_AUTONEG) && (!priv->aui)) { ++ ability = status >> 11; ++ if (priv->speed == TLAN_SPEED_10 && ++ priv->duplex == TLAN_DUPLEX_HALF) { ++ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, 0x0000); ++ } else if (priv->speed == TLAN_SPEED_10 && ++ priv->duplex == TLAN_DUPLEX_FULL) { ++ priv->tlanFullDuplex = TRUE; ++ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, 0x0100); ++ } else if (priv->speed == TLAN_SPEED_100 && ++ priv->duplex == TLAN_DUPLEX_HALF) { ++ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, 0x2000); ++ } else if (priv->speed == TLAN_SPEED_100 && ++ priv->duplex == TLAN_DUPLEX_FULL) { + priv->tlanFullDuplex = TRUE; ++ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, 0x2100); + } else { +- TLan_DioWrite8( dev->base_addr, TLAN_ACOMMIT, 0x08 ); ++ ++ /* Set Auto-Neg advertisement */ ++ TLan_MiiWriteReg(nic, phy, MII_AN_ADV, ++ (ability << 5) | 1); ++ /* Enablee Auto-Neg */ ++ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, 0x1000); ++ /* Restart Auto-Neg */ ++ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, 0x1200); ++ /* Wait for 4 sec for autonegotiation ++ * to complete. The max spec time is less than this ++ * but the card need additional time to start AN. ++ * .5 sec should be plenty extra. ++ */ ++ printf("TLAN: %s: Starting autonegotiation.\n", ++ priv->nic_name); ++ mdelay(4000); ++ TLan_PhyFinishAutoNeg(nic); ++ /* TLan_SetTimer( dev, (2*HZ), TLAN_TIMER_PHY_FINISH_AN ); */ ++ return; + } +- } + +- if ( priv->phyNum == 0 ) { +- data |= TLAN_NET_CFG_PHY_EN; + } +- TLan_DioWrite16( dev->base_addr, TLAN_NET_CONFIG, (u16) data ); + +- if ( priv->adapter->flags & TLAN_ADAPTER_UNMANAGED_PHY ) { +- TLan_FinishReset( dev ); +- } else { +- TLan_PhyPowerDown( dev ); ++ if ((priv->aui) && (priv->phyNum != 0)) { ++ priv->phyNum = 0; ++ data = ++ TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN | ++ TLAN_NET_CFG_PHY_EN; ++ TLan_DioWrite16(BASE, TLAN_NET_CONFIG, data); ++ mdelay(50); ++ /* TLan_SetTimer( dev, (40*HZ/1000), TLAN_TIMER_PHY_PDOWN ); */ ++ TLan_PhyPowerDown(nic); ++ return; ++ } else if (priv->phyNum == 0) { ++ control = 0; ++ TLan_MiiReadReg(nic, phy, TLAN_TLPHY_CTL, &tctl); ++ if (priv->aui) { ++ tctl |= TLAN_TC_AUISEL; ++ } else { ++ tctl &= ~TLAN_TC_AUISEL; ++ if (priv->duplex == TLAN_DUPLEX_FULL) { ++ control |= MII_GC_DUPLEX; ++ priv->tlanFullDuplex = TRUE; ++ } ++ if (priv->speed == TLAN_SPEED_100) { ++ control |= MII_GC_SPEEDSEL; ++ } ++ } ++ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, control); ++ TLan_MiiWriteReg(nic, phy, TLAN_TLPHY_CTL, tctl); + } + +-} /* TLan_ResetAdapter */ ++ /* Wait for 2 sec to give the tranceiver time ++ * to establish link. ++ */ ++ /* TLan_SetTimer( dev, (4*HZ), TLAN_TIMER_FINISH_RESET ); */ ++ mdelay(2000); ++ TLan_FinishReset(nic); ++ ++} /* TLan_PhyStartLink */ + +-void +-TLan_FinishReset( struct net_device *dev ) ++void TLan_PhyFinishAutoNeg(struct nic *nic) + { +- TLanPrivateInfo *priv = dev->priv; +- u8 data; +- u32 phy; +- u8 sio; +- u16 status; +- u16 partner; +- u16 tlphy_ctl; +- u16 tlphy_par; +- u16 tlphy_id1, tlphy_id2; +- int i; ++ ++ u16 an_adv; ++ u16 an_lpa; ++ u16 data; ++ u16 mode; ++ u16 phy; ++ u16 status; + + phy = priv->phy[priv->phyNum]; + +- data = TLAN_NET_CMD_NRESET | TLAN_NET_CMD_NWRAP; +- if ( priv->tlanFullDuplex ) { +- data |= TLAN_NET_CMD_DUPLEX; ++ TLan_MiiReadReg(nic, phy, MII_GEN_STS, &status); ++ udelay(1000); ++ TLan_MiiReadReg(nic, phy, MII_GEN_STS, &status); ++ ++ if (!(status & MII_GS_AUTOCMPLT)) { ++ /* Wait for 8 sec to give the process ++ * more time. Perhaps we should fail after a while. ++ */ ++ if (!priv->neg_be_verbose++) { ++ printf ++ ("TLAN: Giving autonegotiation more time.\n"); ++ printf ++ ("TLAN: Please check that your adapter has\n"); ++ printf ++ ("TLAN: been properly connected to a HUB or Switch.\n"); ++ printf ++ ("TLAN: Trying to establish link in the background...\n"); ++ } ++ mdelay(8000); ++ TLan_PhyFinishAutoNeg(nic); ++ /* TLan_SetTimer( dev, (8*HZ), TLAN_TIMER_PHY_FINISH_AN ); */ ++ return; + } +- TLan_DioWrite8( dev->base_addr, TLAN_NET_CMD, data ); +- data = TLAN_NET_MASK_MASK4 | TLAN_NET_MASK_MASK5; +- if ( priv->phyNum == 0 ) { +- data |= TLAN_NET_MASK_MASK7; +- } +- TLan_DioWrite8( dev->base_addr, TLAN_NET_MASK, data ); +- TLan_DioWrite16( dev->base_addr, TLAN_MAX_RX, ((1536)+7)&~7 ); +- TLan_MiiReadReg( dev, phy, MII_GEN_ID_HI, &tlphy_id1 ); +- TLan_MiiReadReg( dev, phy, MII_GEN_ID_LO, &tlphy_id2 ); +- +- if ( ( priv->adapter->flags & TLAN_ADAPTER_UNMANAGED_PHY ) || ( priv->aui ) ) { +- status = MII_GS_LINK; +- printk( "TLAN: %s: Link forced.\n", dev->name ); +- } else { +- TLan_MiiReadReg( dev, phy, MII_GEN_STS, &status ); +- udelay( 1000 ); +- TLan_MiiReadReg( dev, phy, MII_GEN_STS, &status ); +- if ( (status & MII_GS_LINK) && /* We only support link info on Nat.Sem. PHY's */ +- (tlphy_id1 == NAT_SEM_ID1) && +- (tlphy_id2 == NAT_SEM_ID2) ) { +- TLan_MiiReadReg( dev, phy, MII_AN_LPA, &partner ); +- TLan_MiiReadReg( dev, phy, TLAN_TLPHY_PAR, &tlphy_par ); +- +- printk( "TLAN: %s: Link active with ", dev->name ); +- if (!(tlphy_par & TLAN_PHY_AN_EN_STAT)) { +- printk( "forced 10%sMbps %s-Duplex\n", +- tlphy_par & TLAN_PHY_SPEED_100 ? "" : "0", +- tlphy_par & TLAN_PHY_DUPLEX_FULL ? "Full" : "Half"); +- } else { +- printk( "AutoNegotiation enabled, at 10%sMbps %s-Duplex\n", +- tlphy_par & TLAN_PHY_SPEED_100 ? "" : "0", +- tlphy_par & TLAN_PHY_DUPLEX_FULL ? "Full" : "Half"); +- printk("TLAN: Partner capability: "); +- for (i = 5; i <= 10; i++) +- if (partner & (1<base_addr, TLAN_LED_REG, TLAN_LED_LINK ); +-#ifdef MONITOR +- /* We have link beat..for now anyway */ +- priv->link = 1; +- /*Enabling link beat monitoring */ +- TLan_SetTimer( dev, (10*HZ), TLAN_TIMER_LINK_BEAT ); +-#endif +- } else if (status & MII_GS_LINK) { +- printk( "TLAN: %s: Link active\n", dev->name ); +- TLan_DioWrite8( dev->base_addr, TLAN_LED_REG, TLAN_LED_LINK ); +- } ++ printf("TLAN: %s: Autonegotiation complete.\n", priv->nic_name); ++ TLan_MiiReadReg(nic, phy, MII_AN_ADV, &an_adv); ++ TLan_MiiReadReg(nic, phy, MII_AN_LPA, &an_lpa); ++ mode = an_adv & an_lpa & 0x03E0; ++ if (mode & 0x0100) { ++ printf("Full Duplex\n"); ++ priv->tlanFullDuplex = TRUE; ++ } else if (!(mode & 0x0080) && (mode & 0x0040)) { ++ priv->tlanFullDuplex = TRUE; ++ printf("Full Duplex\n"); + } + +- if ( priv->phyNum == 0 ) { +- TLan_MiiReadReg( dev, phy, TLAN_TLPHY_CTL, &tlphy_ctl ); +- tlphy_ctl |= TLAN_TC_INTEN; +- TLan_MiiWriteReg( dev, phy, TLAN_TLPHY_CTL, tlphy_ctl ); +- sio = TLan_DioRead8( dev->base_addr, TLAN_NET_SIO ); +- sio |= TLAN_NET_SIO_MINTEN; +- TLan_DioWrite8( dev->base_addr, TLAN_NET_SIO, sio ); ++ if ((!(mode & 0x0180)) ++ && (tlan_pci_tbl[chip_idx].flags & TLAN_ADAPTER_USE_INTERN_10) ++ && (priv->phyNum != 0)) { ++ priv->phyNum = 0; ++ data = ++ TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN | ++ TLAN_NET_CFG_PHY_EN; ++ TLan_DioWrite16(BASE, TLAN_NET_CONFIG, data); ++ /* TLan_SetTimer( nic, (400*HZ/1000), TLAN_TIMER_PHY_PDOWN ); */ ++ mdelay(400); ++ TLan_PhyPowerDown(nic); ++ return; + } + +- if ( status & MII_GS_LINK ) { +- TLan_SetMac( dev, 0, dev->dev_addr ); +- priv->phyOnline = 1; +- outb( ( TLAN_HC_INT_ON >> 8 ), dev->base_addr + TLAN_HOST_CMD + 1 ); +- if ( debug >= 1 && debug != TLAN_DEBUG_PROBE ) { +- outb( ( TLAN_HC_REQ_INT >> 8 ), dev->base_addr + TLAN_HOST_CMD + 1 ); ++ if (priv->phyNum == 0) { ++ if ((priv->duplex == TLAN_DUPLEX_FULL) ++ || (an_adv & an_lpa & 0x0040)) { ++ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, ++ MII_GC_AUTOENB | MII_GC_DUPLEX); ++ printf ++ ("TLAN: Starting internal PHY with FULL-DUPLEX\n"); ++ } else { ++ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, ++ MII_GC_AUTOENB); ++ printf ++ ("TLAN: Starting internal PHY with HALF-DUPLEX\n"); + } +- outl( virt_to_bus( priv->rxList ), dev->base_addr + TLAN_CH_PARM ); +- outl( TLAN_HC_GO | TLAN_HC_RT, dev->base_addr + TLAN_HOST_CMD ); +- } else { +- printk( "TLAN: %s: Link inactive, will retry in 10 secs...\n", dev->name ); +- TLan_SetTimer( dev, (10*HZ), TLAN_TIMER_FINISH_RESET ); +- return; + } + +-} /* TLan_FinishReset */ ++ /* Wait for 100 ms. No reason in partiticular. ++ */ ++ /* TLan_SetTimer( dev, (HZ/10), TLAN_TIMER_FINISH_RESET ); */ ++ mdelay(100); ++ TLan_FinishReset(nic); + +- /*************************************************************** +- * TLan_SetMac +- * +- * Returns: +- * Nothing +- * Parms: +- * dev Pointer to device structure of adapter +- * on which to change the AREG. +- * areg The AREG to set the address in (0 - 3). +- * mac A pointer to an array of chars. Each +- * element stores one byte of the address. +- * IE, it isn't in ascii. +- * +- * This function transfers a MAC address to one of the +- * TLAN AREGs (address registers). The TLAN chip locks +- * the register on writing to offset 0 and unlocks the +- * register after writing to offset 5. If NULL is passed +- * in mac, then the AREG is filled with 0's. +- * +- **************************************************************/ ++} /* TLan_PhyFinishAutoNeg */ ++ ++#ifdef MONITOR ++ ++ /********************************************************************* ++ * ++ * TLan_phyMonitor ++ * ++ * Returns: ++ * None ++ * ++ * Params: ++ * dev The device structure of this device. ++ * ++ * ++ * This function monitors PHY condition by reading the status ++ * register via the MII bus. This can be used to give info ++ * about link changes (up/down), and possible switch to alternate ++ * media. ++ * ++ * ******************************************************************/ + +-void TLan_SetMac( struct net_device *dev, int areg, char *mac ) ++void TLan_PhyMonitor(struct net_device *dev) + { +- int i; +- +- areg *= 6; ++ TLanPrivateInfo *priv = dev->priv; ++ u16 phy; ++ u16 phy_status; + +- if ( mac != NULL ) { +- for ( i = 0; i < 6; i++ ) +- TLan_DioWrite8( dev->base_addr, TLAN_AREG_0 + areg + i, mac[i] ); +- } else { +- for ( i = 0; i < 6; i++ ) +- TLan_DioWrite8( dev->base_addr, TLAN_AREG_0 + areg + i, 0 ); ++ phy = priv->phy[priv->phyNum]; ++ ++ /* Get PHY status register */ ++ TLan_MiiReadReg(nic, phy, MII_GEN_STS, &phy_status); ++ ++ /* Check if link has been lost */ ++ if (!(phy_status & MII_GS_LINK)) { ++ if (priv->link) { ++ priv->link = 0; ++ printf("TLAN: %s has lost link\n", priv->nic_name); ++ priv->flags &= ~IFF_RUNNING; ++ mdelay(2000); ++ TLan_PhyMonitor(nic); ++ /* TLan_SetTimer( dev, (2*HZ), TLAN_TIMER_LINK_BEAT ); */ ++ return; ++ } + } + +-} /* TLan_SetMac */ ++ /* Link restablished? */ ++ if ((phy_status & MII_GS_LINK) && !priv->link) { ++ priv->link = 1; ++ printf("TLAN: %s has reestablished link\n", ++ priv->nic_name); ++ priv->flags |= IFF_RUNNING; ++ } ++ ++ /* Setup a new monitor */ ++ /* TLan_SetTimer( dev, (2*HZ), TLAN_TIMER_LINK_BEAT ); */ ++ mdelay(2000); ++ TLan_PhyMonitor(nic); ++} + ++#endif /* MONITOR */ ++ ++#ifdef EB51 ++static struct pci_id tlan_nics[] = { ++ PCI_ROM(0x0e11, 0xae34, "netel10", "Compaq Netelligent 10 T PCI UTP"), ++ PCI_ROM(0x0e11, 0xae32, "netel100","Compaq Netelligent 10/100 TX PCI UTP"), ++ PCI_ROM(0x0e11, 0xae35, "netflex3i", "Compaq Integrated NetFlex-3/P"), ++ PCI_ROM(0x0e11, 0xf130, "thunder", "Compaq NetFlex-3/P"), ++ PCI_ROM(0x0e11, 0xf150, "netflex3b", "Compaq NetFlex-3/P"), ++ PCI_ROM(0x0e11, 0xae43, "netel100pi", "Compaq Netelligent Integrated 10/100 TX UTP"), ++ PCI_ROM(0x0e11, 0xae40, "netel100d", "Compaq Netelligent Dual 10/100 TX PCI UTP"), ++ PCI_ROM(0x0e11, 0xb011, "netel100i", "Compaq Netelligent 10/100 TX Embedded UTP"), ++ PCI_ROM(0x108d, 0x0013, "oc2183", "Olicom OC-2183/2185"), ++ PCI_ROM(0x108d, 0x0012, "oc2325", "Olicom OC-2325"), ++ PCI_ROM(0x108d, 0x0014, "oc2326", "Olicom OC-2326"), ++ PCI_ROM(0x0e11, 0xb030, "netelligent_10_100_ws_5100", "Compaq Netelligent 10/100 TX UTP"), ++ PCI_ROM(0x0e11, 0xb012, "netelligent_10_t2", "Compaq Netelligent 10 T/2 PCI UTP/Coax"), ++}; ++ ++struct pci_driver tlan_driver = { ++ .type = NIC_DRIVER, ++ .name = "TLAN/PCI", ++ .probe = tlan_probe, ++ .ids = tlan_nics, ++ .id_count = sizeof(tlan_nics) / sizeof(tlan_nics[0]), ++ .class = 0, ++}; + #endif +diff -Naur grub-0.97.orig/netboot/tlan.h grub-0.97/netboot/tlan.h +--- grub-0.97.orig/netboot/tlan.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/tlan.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,536 @@ ++/************************************************************************** ++* ++* tlan.c -- Etherboot device driver for the Texas Instruments ThunderLAN ++* Written 2003-2003 by Timothy Legge ++* ++* This program is free software; you can redistribute it and/or modify ++* it under the terms of the GNU General Public License as published by ++* the Free Software Foundation; either version 2 of the License, or ++* (at your option) any later version. ++* ++* This program is distributed in the hope that it will be useful, ++* but WITHOUT ANY WARRANTY; without even the implied warranty of ++* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++* GNU General Public License for more details. ++* ++* You should have received a copy of the GNU General Public License ++* along with this program; if not, write to the Free Software ++* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++* ++* Portions of this code (almost all) based on: ++* tlan.c: Linux ThunderLan Driver: ++* ++* by James Banks ++* ++* (C) 1997-1998 Caldera, Inc. ++* (C) 1998 James Banks ++* (C) 1999-2001 Torben Mathiasen ++* (C) 2002 Samuel Chessman ++* ++* REVISION HISTORY: ++* ================ ++* v1.0 07-08-2003 timlegge Initial not quite working version ++* ++* Indent Style: indent -kr -i8 ++***************************************************************************/ ++ ++/* ++#include ++#include ++#include ++*/ ++ ++typedef unsigned char u8; ++typedef signed char s8; ++typedef unsigned short u16; ++typedef signed short s16; ++typedef unsigned int u32; ++typedef signed int s32; ++ /***************************************************************** ++ * TLan Definitions ++ * ++ ****************************************************************/ ++ ++#define FALSE 0 ++#define TRUE 1 ++ ++#define TLAN_MIN_FRAME_SIZE 64 ++#define TLAN_MAX_FRAME_SIZE 1600 ++ ++#define TLAN_NUM_RX_LISTS 4 ++#define TLAN_NUM_TX_LISTS 2 ++ ++#define TLAN_IGNORE 0 ++#define TLAN_RECORD 1 ++/* ++#define TLAN_DBG(lvl, format, args...) if (debug&lvl) printf("TLAN: " format, ##args ); ++*/ ++#define TLAN_DEBUG_GNRL 0x0001 ++#define TLAN_DEBUG_TX 0x0002 ++#define TLAN_DEBUG_RX 0x0004 ++#define TLAN_DEBUG_LIST 0x0008 ++#define TLAN_DEBUG_PROBE 0x0010 ++ ++#define TX_TIMEOUT (10*HZ) /* We need time for auto-neg */ ++#define MAX_TLAN_BOARDS 8 /* Max number of boards installed at a time */ ++ ++ ++ /***************************************************************** ++ * Device Identification Definitions ++ * ++ ****************************************************************/ ++ ++#define PCI_DEVICE_ID_NETELLIGENT_10_T2 0xB012 ++#define PCI_DEVICE_ID_NETELLIGENT_10_100_WS_5100 0xB030 ++#ifndef PCI_DEVICE_ID_OLICOM_OC2183 ++#define PCI_DEVICE_ID_OLICOM_OC2183 0x0013 ++#endif ++#ifndef PCI_DEVICE_ID_OLICOM_OC2325 ++#define PCI_DEVICE_ID_OLICOM_OC2325 0x0012 ++#endif ++#ifndef PCI_DEVICE_ID_OLICOM_OC2326 ++#define PCI_DEVICE_ID_OLICOM_OC2326 0x0014 ++#endif ++ ++typedef struct tlan_adapter_entry { ++ u16 vendorId; ++ u16 deviceId; ++ char *deviceLabel; ++ u32 flags; ++ u16 addrOfs; ++} TLanAdapterEntry; ++ ++#define TLAN_ADAPTER_NONE 0x00000000 ++#define TLAN_ADAPTER_UNMANAGED_PHY 0x00000001 ++#define TLAN_ADAPTER_BIT_RATE_PHY 0x00000002 ++#define TLAN_ADAPTER_USE_INTERN_10 0x00000004 ++#define TLAN_ADAPTER_ACTIVITY_LED 0x00000008 ++ ++#define TLAN_SPEED_DEFAULT 0 ++#define TLAN_SPEED_10 10 ++#define TLAN_SPEED_100 100 ++ ++#define TLAN_DUPLEX_DEFAULT 0 ++#define TLAN_DUPLEX_HALF 1 ++#define TLAN_DUPLEX_FULL 2 ++ ++ ++ ++ /***************************************************************** ++ * EISA Definitions ++ * ++ ****************************************************************/ ++ ++#define EISA_ID 0xc80 /* EISA ID Registers */ ++#define EISA_ID0 0xc80 /* EISA ID Register 0 */ ++#define EISA_ID1 0xc81 /* EISA ID Register 1 */ ++#define EISA_ID2 0xc82 /* EISA ID Register 2 */ ++#define EISA_ID3 0xc83 /* EISA ID Register 3 */ ++#define EISA_CR 0xc84 /* EISA Control Register */ ++#define EISA_REG0 0xc88 /* EISA Configuration Register 0 */ ++#define EISA_REG1 0xc89 /* EISA Configuration Register 1 */ ++#define EISA_REG2 0xc8a /* EISA Configuration Register 2 */ ++#define EISA_REG3 0xc8f /* EISA Configuration Register 3 */ ++#define EISA_APROM 0xc90 /* Ethernet Address PROM */ ++ ++ ++ ++ /***************************************************************** ++ * Rx/Tx List Definitions ++ * ++ ****************************************************************/ ++ ++#define TLAN_BUFFERS_PER_LIST 10 ++#define TLAN_LAST_BUFFER 0x80000000 ++#define TLAN_CSTAT_UNUSED 0x8000 ++#define TLAN_CSTAT_FRM_CMP 0x4000 ++#define TLAN_CSTAT_READY 0x3000 ++#define TLAN_CSTAT_EOC 0x0800 ++#define TLAN_CSTAT_RX_ERROR 0x0400 ++#define TLAN_CSTAT_PASS_CRC 0x0200 ++#define TLAN_CSTAT_DP_PR 0x0100 ++ ++ ++ ++ ++ ++ ++ /***************************************************************** ++ * PHY definitions ++ * ++ ****************************************************************/ ++ ++#define TLAN_PHY_MAX_ADDR 0x1F ++#define TLAN_PHY_NONE 0x20 ++ ++ ++ ++ /***************************************************************** ++ * TLan Driver Timer Definitions ++ * ++ ****************************************************************/ ++ ++#define TLAN_TIMER_LINK_BEAT 1 ++#define TLAN_TIMER_ACTIVITY 2 ++#define TLAN_TIMER_PHY_PDOWN 3 ++#define TLAN_TIMER_PHY_PUP 4 ++#define TLAN_TIMER_PHY_RESET 5 ++#define TLAN_TIMER_PHY_START_LINK 6 ++#define TLAN_TIMER_PHY_FINISH_AN 7 ++#define TLAN_TIMER_FINISH_RESET 8 ++ ++#define TLAN_TIMER_ACT_DELAY (HZ/10) ++ ++ ++ ++ ++ /***************************************************************** ++ * TLan Driver Eeprom Definitions ++ * ++ ****************************************************************/ ++ ++#define TLAN_EEPROM_ACK 0 ++#define TLAN_EEPROM_STOP 1 ++ ++ ++ ++ ++ /***************************************************************** ++ * Host Register Offsets and Contents ++ * ++ ****************************************************************/ ++ ++#define TLAN_HOST_CMD 0x00 ++#define TLAN_HC_GO 0x80000000 ++#define TLAN_HC_STOP 0x40000000 ++#define TLAN_HC_ACK 0x20000000 ++#define TLAN_HC_CS_MASK 0x1FE00000 ++#define TLAN_HC_EOC 0x00100000 ++#define TLAN_HC_RT 0x00080000 ++#define TLAN_HC_NES 0x00040000 ++#define TLAN_HC_AD_RST 0x00008000 ++#define TLAN_HC_LD_TMR 0x00004000 ++#define TLAN_HC_LD_THR 0x00002000 ++#define TLAN_HC_REQ_INT 0x00001000 ++#define TLAN_HC_INT_OFF 0x00000800 ++#define TLAN_HC_INT_ON 0x00000400 ++#define TLAN_HC_AC_MASK 0x000000FF ++#define TLAN_CH_PARM 0x04 ++#define TLAN_DIO_ADR 0x08 ++#define TLAN_DA_ADR_INC 0x8000 ++#define TLAN_DA_RAM_ADR 0x4000 ++#define TLAN_HOST_INT 0x0A ++#define TLAN_HI_IV_MASK 0x1FE0 ++#define TLAN_HI_IT_MASK 0x001C ++#define TLAN_DIO_DATA 0x0C ++ ++ ++/* ThunderLAN Internal Register DIO Offsets */ ++ ++#define TLAN_NET_CMD 0x00 ++#define TLAN_NET_CMD_NRESET 0x80 ++#define TLAN_NET_CMD_NWRAP 0x40 ++#define TLAN_NET_CMD_CSF 0x20 ++#define TLAN_NET_CMD_CAF 0x10 ++#define TLAN_NET_CMD_NOBRX 0x08 ++#define TLAN_NET_CMD_DUPLEX 0x04 ++#define TLAN_NET_CMD_TRFRAM 0x02 ++#define TLAN_NET_CMD_TXPACE 0x01 ++#define TLAN_NET_SIO 0x01 ++#define TLAN_NET_SIO_MINTEN 0x80 ++#define TLAN_NET_SIO_ECLOK 0x40 ++#define TLAN_NET_SIO_ETXEN 0x20 ++#define TLAN_NET_SIO_EDATA 0x10 ++#define TLAN_NET_SIO_NMRST 0x08 ++#define TLAN_NET_SIO_MCLK 0x04 ++#define TLAN_NET_SIO_MTXEN 0x02 ++#define TLAN_NET_SIO_MDATA 0x01 ++#define TLAN_NET_STS 0x02 ++#define TLAN_NET_STS_MIRQ 0x80 ++#define TLAN_NET_STS_HBEAT 0x40 ++#define TLAN_NET_STS_TXSTOP 0x20 ++#define TLAN_NET_STS_RXSTOP 0x10 ++#define TLAN_NET_STS_RSRVD 0x0F ++#define TLAN_NET_MASK 0x03 ++#define TLAN_NET_MASK_MASK7 0x80 ++#define TLAN_NET_MASK_MASK6 0x40 ++#define TLAN_NET_MASK_MASK5 0x20 ++#define TLAN_NET_MASK_MASK4 0x10 ++#define TLAN_NET_MASK_RSRVD 0x0F ++#define TLAN_NET_CONFIG 0x04 ++#define TLAN_NET_CFG_RCLK 0x8000 ++#define TLAN_NET_CFG_TCLK 0x4000 ++#define TLAN_NET_CFG_BIT 0x2000 ++#define TLAN_NET_CFG_RXCRC 0x1000 ++#define TLAN_NET_CFG_PEF 0x0800 ++#define TLAN_NET_CFG_1FRAG 0x0400 ++#define TLAN_NET_CFG_1CHAN 0x0200 ++#define TLAN_NET_CFG_MTEST 0x0100 ++#define TLAN_NET_CFG_PHY_EN 0x0080 ++#define TLAN_NET_CFG_MSMASK 0x007F ++#define TLAN_MAN_TEST 0x06 ++#define TLAN_DEF_VENDOR_ID 0x08 ++#define TLAN_DEF_DEVICE_ID 0x0A ++#define TLAN_DEF_REVISION 0x0C ++#define TLAN_DEF_SUBCLASS 0x0D ++#define TLAN_DEF_MIN_LAT 0x0E ++#define TLAN_DEF_MAX_LAT 0x0F ++#define TLAN_AREG_0 0x10 ++#define TLAN_AREG_1 0x16 ++#define TLAN_AREG_2 0x1C ++#define TLAN_AREG_3 0x22 ++#define TLAN_HASH_1 0x28 ++#define TLAN_HASH_2 0x2C ++#define TLAN_GOOD_TX_FRMS 0x30 ++#define TLAN_TX_UNDERUNS 0x33 ++#define TLAN_GOOD_RX_FRMS 0x34 ++#define TLAN_RX_OVERRUNS 0x37 ++#define TLAN_DEFERRED_TX 0x38 ++#define TLAN_CRC_ERRORS 0x3A ++#define TLAN_CODE_ERRORS 0x3B ++#define TLAN_MULTICOL_FRMS 0x3C ++#define TLAN_SINGLECOL_FRMS 0x3E ++#define TLAN_EXCESSCOL_FRMS 0x40 ++#define TLAN_LATE_COLS 0x41 ++#define TLAN_CARRIER_LOSS 0x42 ++#define TLAN_ACOMMIT 0x43 ++#define TLAN_LED_REG 0x44 ++#define TLAN_LED_ACT 0x10 ++#define TLAN_LED_LINK 0x01 ++#define TLAN_BSIZE_REG 0x45 ++#define TLAN_MAX_RX 0x46 ++#define TLAN_INT_DIS 0x48 ++#define TLAN_ID_TX_EOC 0x04 ++#define TLAN_ID_RX_EOF 0x02 ++#define TLAN_ID_RX_EOC 0x01 ++ ++ ++ ++/* ThunderLAN Interrupt Codes */ ++ ++#define TLAN_INT_NUMBER_OF_INTS 8 ++ ++#define TLAN_INT_NONE 0x0000 ++#define TLAN_INT_TX_EOF 0x0001 ++#define TLAN_INT_STAT_OVERFLOW 0x0002 ++#define TLAN_INT_RX_EOF 0x0003 ++#define TLAN_INT_DUMMY 0x0004 ++#define TLAN_INT_TX_EOC 0x0005 ++#define TLAN_INT_STATUS_CHECK 0x0006 ++#define TLAN_INT_RX_EOC 0x0007 ++ ++ ++ ++/* ThunderLAN MII Registers */ ++ ++/* Generic MII/PHY Registers */ ++ ++#define MII_GEN_CTL 0x00 ++#define MII_GC_RESET 0x8000 ++#define MII_GC_LOOPBK 0x4000 ++#define MII_GC_SPEEDSEL 0x2000 ++#define MII_GC_AUTOENB 0x1000 ++#define MII_GC_PDOWN 0x0800 ++#define MII_GC_ISOLATE 0x0400 ++#define MII_GC_AUTORSRT 0x0200 ++#define MII_GC_DUPLEX 0x0100 ++#define MII_GC_COLTEST 0x0080 ++#define MII_GC_RESERVED 0x007F ++#define MII_GEN_STS 0x01 ++#define MII_GS_100BT4 0x8000 ++#define MII_GS_100BTXFD 0x4000 ++#define MII_GS_100BTXHD 0x2000 ++#define MII_GS_10BTFD 0x1000 ++#define MII_GS_10BTHD 0x0800 ++#define MII_GS_RESERVED 0x07C0 ++#define MII_GS_AUTOCMPLT 0x0020 ++#define MII_GS_RFLT 0x0010 ++#define MII_GS_AUTONEG 0x0008 ++#define MII_GS_LINK 0x0004 ++#define MII_GS_JABBER 0x0002 ++#define MII_GS_EXTCAP 0x0001 ++#define MII_GEN_ID_HI 0x02 ++#define MII_GEN_ID_LO 0x03 ++#define MII_GIL_OUI 0xFC00 ++#define MII_GIL_MODEL 0x03F0 ++#define MII_GIL_REVISION 0x000F ++#define MII_AN_ADV 0x04 ++#define MII_AN_LPA 0x05 ++#define MII_AN_EXP 0x06 ++ ++/* ThunderLAN Specific MII/PHY Registers */ ++ ++#define TLAN_TLPHY_ID 0x10 ++#define TLAN_TLPHY_CTL 0x11 ++#define TLAN_TC_IGLINK 0x8000 ++#define TLAN_TC_SWAPOL 0x4000 ++#define TLAN_TC_AUISEL 0x2000 ++#define TLAN_TC_SQEEN 0x1000 ++#define TLAN_TC_MTEST 0x0800 ++#define TLAN_TC_RESERVED 0x07F8 ++#define TLAN_TC_NFEW 0x0004 ++#define TLAN_TC_INTEN 0x0002 ++#define TLAN_TC_TINT 0x0001 ++#define TLAN_TLPHY_STS 0x12 ++#define TLAN_TS_MINT 0x8000 ++#define TLAN_TS_PHOK 0x4000 ++#define TLAN_TS_POLOK 0x2000 ++#define TLAN_TS_TPENERGY 0x1000 ++#define TLAN_TS_RESERVED 0x0FFF ++#define TLAN_TLPHY_PAR 0x19 ++#define TLAN_PHY_CIM_STAT 0x0020 ++#define TLAN_PHY_SPEED_100 0x0040 ++#define TLAN_PHY_DUPLEX_FULL 0x0080 ++#define TLAN_PHY_AN_EN_STAT 0x0400 ++ ++/* National Sem. & Level1 PHY id's */ ++#define NAT_SEM_ID1 0x2000 ++#define NAT_SEM_ID2 0x5C01 ++#define LEVEL1_ID1 0x7810 ++#define LEVEL1_ID2 0x0000 ++ ++#define CIRC_INC( a, b ) if ( ++a >= b ) a = 0 ++ ++/* Routines to access internal registers. */ ++ ++inline u8 TLan_DioRead8(u16 base_addr, u16 internal_addr) ++{ ++ outw(internal_addr, base_addr + TLAN_DIO_ADR); ++ return (inb((base_addr + TLAN_DIO_DATA) + (internal_addr & 0x3))); ++ ++} /* TLan_DioRead8 */ ++ ++ ++ ++ ++inline u16 TLan_DioRead16(u16 base_addr, u16 internal_addr) ++{ ++ outw(internal_addr, base_addr + TLAN_DIO_ADR); ++ return (inw((base_addr + TLAN_DIO_DATA) + (internal_addr & 0x2))); ++ ++} /* TLan_DioRead16 */ ++ ++ ++ ++ ++inline u32 TLan_DioRead32(u16 base_addr, u16 internal_addr) ++{ ++ outw(internal_addr, base_addr + TLAN_DIO_ADR); ++ return (inl(base_addr + TLAN_DIO_DATA)); ++ ++} /* TLan_DioRead32 */ ++ ++ ++ ++ ++inline void TLan_DioWrite8(u16 base_addr, u16 internal_addr, u8 data) ++{ ++ outw(internal_addr, base_addr + TLAN_DIO_ADR); ++ outb(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x3)); ++ ++} ++ ++ ++ ++ ++inline void TLan_DioWrite16(u16 base_addr, u16 internal_addr, u16 data) ++{ ++ outw(internal_addr, base_addr + TLAN_DIO_ADR); ++ outw(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x2)); ++ ++} ++ ++ ++ ++ ++inline void TLan_DioWrite32(u16 base_addr, u16 internal_addr, u32 data) ++{ ++ outw(internal_addr, base_addr + TLAN_DIO_ADR); ++ outl(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x2)); ++ ++} ++ ++ ++ ++#if 0 ++inline void TLan_ClearBit(u8 bit, u16 port) ++{ ++ outb_p(inb_p(port) & ~bit, port); ++} ++ ++ ++ ++ ++inline int TLan_GetBit(u8 bit, u16 port) ++{ ++ return ((int) (inb_p(port) & bit)); ++} ++ ++ ++ ++ ++inline void TLan_SetBit(u8 bit, u16 port) ++{ ++ outb_p(inb_p(port) | bit, port); ++} ++#endif ++ ++#define TLan_ClearBit( bit, port ) outb_p(inb_p(port) & ~bit, port) ++#define TLan_GetBit( bit, port ) ((int) (inb_p(port) & bit)) ++#define TLan_SetBit( bit, port ) outb_p(inb_p(port) | bit, port) ++ ++#ifdef I_LIKE_A_FAST_HASH_FUNCTION ++/* given 6 bytes, view them as 8 6-bit numbers and return the XOR of those */ ++/* the code below is about seven times as fast as the original code */ ++inline u32 TLan_HashFunc(u8 * a) ++{ ++ u8 hash; ++ ++ hash = (a[0] ^ a[3]); /* & 077 */ ++ hash ^= ((a[0] ^ a[3]) >> 6); /* & 003 */ ++ hash ^= ((a[1] ^ a[4]) << 2); /* & 074 */ ++ hash ^= ((a[1] ^ a[4]) >> 4); /* & 017 */ ++ hash ^= ((a[2] ^ a[5]) << 4); /* & 060 */ ++ hash ^= ((a[2] ^ a[5]) >> 2); /* & 077 */ ++ ++ return (hash & 077); ++} ++ ++#else /* original code */ ++ ++inline u32 xor(u32 a, u32 b) ++{ ++ return ((a && !b) || (!a && b)); ++} ++ ++#define XOR8( a, b, c, d, e, f, g, h ) xor( a, xor( b, xor( c, xor( d, xor( e, xor( f, xor( g, h ) ) ) ) ) ) ) ++#define DA( a, bit ) ( ( (u8) a[bit/8] ) & ( (u8) ( 1 << bit%8 ) ) ) ++ ++inline u32 TLan_HashFunc(u8 * a) ++{ ++ u32 hash; ++ ++ hash = ++ XOR8(DA(a, 0), DA(a, 6), DA(a, 12), DA(a, 18), DA(a, 24), ++ DA(a, 30), DA(a, 36), DA(a, 42)); ++ hash |= ++ XOR8(DA(a, 1), DA(a, 7), DA(a, 13), DA(a, 19), DA(a, 25), ++ DA(a, 31), DA(a, 37), DA(a, 43)) << 1; ++ hash |= ++ XOR8(DA(a, 2), DA(a, 8), DA(a, 14), DA(a, 20), DA(a, 26), ++ DA(a, 32), DA(a, 38), DA(a, 44)) << 2; ++ hash |= ++ XOR8(DA(a, 3), DA(a, 9), DA(a, 15), DA(a, 21), DA(a, 27), ++ DA(a, 33), DA(a, 39), DA(a, 45)) << 3; ++ hash |= ++ XOR8(DA(a, 4), DA(a, 10), DA(a, 16), DA(a, 22), DA(a, 28), ++ DA(a, 34), DA(a, 40), DA(a, 46)) << 4; ++ hash |= ++ XOR8(DA(a, 5), DA(a, 11), DA(a, 17), DA(a, 23), DA(a, 29), ++ DA(a, 35), DA(a, 41), DA(a, 47)) << 5; ++ ++ return hash; ++ ++} ++ ++#endif /* I_LIKE_A_FAST_HASH_FUNCTION */ +diff -Naur grub-0.97.orig/netboot/tulip.c grub-0.97/netboot/tulip.c +--- grub-0.97.orig/netboot/tulip.c 2003-07-09 11:45:38.000000000 +0000 ++++ grub-0.97/netboot/tulip.c 2005-08-31 19:03:35.000000000 +0000 +@@ -48,6 +48,7 @@ + /*********************************************************************/ + + /* ++ 07 Sep 2003 timlegge Multicast Support Added + 11 Apr 2001 mdc [patch to etherboot 4.7.24] + Major rewrite to include Linux tulip driver media detection + code. This driver should support a lot more cards now. +@@ -98,7 +99,6 @@ + and thinguin mailing lists. + */ + +- + /*********************************************************************/ + /* Declarations */ + /*********************************************************************/ +@@ -106,31 +106,29 @@ + #include "etherboot.h" + #include "nic.h" + #include "pci.h" +-#include "cards.h" + + /* User settable parameters */ + +-#undef TULIP_DEBUG +-#undef TULIP_DEBUG_WHERE ++#undef TULIP_DEBUG ++#undef TULIP_DEBUG_WHERE ++#ifdef TULIP_DEBUG + static int tulip_debug = 2; /* 1 normal messages, 0 quiet .. 7 verbose. */ ++#endif + + #define TX_TIME_OUT 2*TICKS_PER_SEC + +-typedef unsigned char u8; +-typedef signed char s8; +-typedef unsigned short u16; +-typedef signed short s16; +-typedef unsigned int u32; +-typedef signed int s32; ++typedef uint8_t u8; ++typedef int8_t s8; ++typedef uint16_t u16; ++typedef int16_t s16; ++typedef uint32_t u32; ++typedef int32_t s32; + + /* helpful macros if on a big_endian machine for changing byte order. + not strictly needed on Intel */ +-#define le16_to_cpu(val) (val) +-#define cpu_to_le32(val) (val) + #define get_unaligned(ptr) (*(ptr)) + #define put_unaligned(val, ptr) ((void)( *(ptr) = (val) )) + #define get_u16(ptr) (*(u16 *)(ptr)) +-#define virt_to_bus(x) ((unsigned long)x) + #define virt_to_le32desc(addr) virt_to_bus(addr) + + #define TULIP_IOTYPE PCI_USES_MASTER | PCI_USES_IO | PCI_ADDR0 +@@ -212,6 +210,8 @@ + TULIP_IOTYPE, 256, PNIC2 }, + { "ADMtek AN981 Comet", { 0x09811317, 0xffffffff, 0, 0, 0, 0 }, + TULIP_IOTYPE, 256, COMET }, ++ { "ADMTek AN983 Comet", { 0x12161113, 0xffffffff, 0, 0, 0, 0 }, ++ TULIP_IOTYPE, 256, COMET }, + { "ADMtek Centaur-P", { 0x09851317, 0xffffffff, 0, 0, 0, 0 }, + TULIP_IOTYPE, 256, COMET }, + { "ADMtek Centaur-C", { 0x19851317, 0xffffffff, 0, 0, 0, 0 }, +@@ -280,9 +280,13 @@ + static u16 t21041_csr14[] = { 0xFFFF, 0xF7FD, 0xF7FD, 0x7F3F, 0x7F3D, }; + static u16 t21041_csr15[] = { 0x0008, 0x0006, 0x000E, 0x0008, 0x0008, }; + ++/* not used + static u16 t21142_csr13[] = { 0x0001, 0x0009, 0x0009, 0x0000, 0x0001, }; ++*/ + static u16 t21142_csr14[] = { 0xFFFF, 0x0705, 0x0705, 0x0000, 0x7F3D, }; ++/* not used + static u16 t21142_csr15[] = { 0x0008, 0x0006, 0x000E, 0x0008, 0x0008, }; ++*/ + + /* Offsets to the Command and Status Registers, "CSRs". All accesses + must be longword instructions and quadword aligned. */ +@@ -300,6 +304,14 @@ + TxFIFOUnderflow=0x20, TxJabber=0x08, TxNoBuf=0x04, TxDied=0x02, TxIntr=0x01, + }; + ++/* The configuration bits in CSR6. */ ++enum csr6_mode_bits { ++ TxOn=0x2000, RxOn=0x0002, FullDuplex=0x0200, ++ AcceptBroadcast=0x0100, AcceptAllMulticast=0x0080, ++ AcceptAllPhys=0x0040, AcceptRunt=0x0008, ++}; ++ ++ + enum desc_status_bits { + DescOwnded=0x80000000, RxDescFatalErr=0x8000, RxWholePkt=0x0300, + }; +@@ -384,21 +396,11 @@ + + #define TX_RING_SIZE 2 + static struct tulip_tx_desc tx_ring[TX_RING_SIZE] __attribute__ ((aligned(4))); +- +-#ifdef USE_LOWMEM_BUFFER +-#define txb ((char *)0x10000 - BUFLEN) +-#else + static unsigned char txb[BUFLEN] __attribute__ ((aligned(4))); +-#endif + + #define RX_RING_SIZE 4 + static struct tulip_rx_desc rx_ring[RX_RING_SIZE] __attribute__ ((aligned(4))); +- +-#ifdef USE_LOWMEM_BUFFER +-#define rxb ((char *)0x10000 - RX_RING_SIZE * BUFLEN - BUFLEN) +-#else + static unsigned char rxb[RX_RING_SIZE * BUFLEN] __attribute__ ((aligned(4))); +-#endif + + static struct tulip_private { + int cur_rx; +@@ -471,7 +473,6 @@ + static const char * block_name[] = {"21140 non-MII", "21140 MII PHY", + "21142 Serial PHY", "21142 MII PHY", "21143 SYM PHY", "21143 reset method"}; + +- + /*********************************************************************/ + /* Function Prototypes */ + /*********************************************************************/ +@@ -479,14 +480,13 @@ + static void mdio_write(struct nic *nic, int phy_id, int location, int value); + static int read_eeprom(unsigned long ioaddr, int location, int addr_len); + static void parse_eeprom(struct nic *nic); +-struct nic *tulip_probe(struct nic *nic, unsigned short *io_addrs, +- struct pci_device *pci); ++static int tulip_probe(struct dev *dev, struct pci_device *pci); + static void tulip_init_ring(struct nic *nic); + static void tulip_reset(struct nic *nic); + static void tulip_transmit(struct nic *nic, const char *d, unsigned int t, + unsigned int s, const char *p); +-static int tulip_poll(struct nic *nic); +-static void tulip_disable(struct nic *nic); ++static int tulip_poll(struct nic *nic, int retrieve); ++static void tulip_disable(struct dev *dev); + static void nway_start(struct nic *nic); + static void pnic_do_nway(struct nic *nic); + static void select_media(struct nic *nic, int startup); +@@ -504,7 +504,6 @@ + static void tulip_more(void); + #endif + +- + /*********************************************************************/ + /* Utility Routines */ + /*********************************************************************/ +@@ -535,7 +534,6 @@ + /* wait */ ; + } + +- + /*********************************************************************/ + /* Media Descriptor Code */ + /*********************************************************************/ +@@ -565,7 +563,7 @@ + MDIO protocol. See the MII specifications or DP83840A data sheet + for details. */ + +-int mdio_read(struct nic *nic, int phy_id, int location) ++int mdio_read(struct nic *nic __unused, int phy_id, int location) + { + int i; + int read_cmd = (0xf6 << 10) | (phy_id << 5) | location; +@@ -626,7 +624,7 @@ + return (retval>>1) & 0xffff; + } + +-void mdio_write(struct nic *nic, int phy_id, int location, int value) ++void mdio_write(struct nic *nic __unused, int phy_id, int location, int value) + { + int i; + int cmd = (0x5002 << 16) | (phy_id << 23) | (location<<18) | value; +@@ -682,7 +680,6 @@ + } + } + +- + /*********************************************************************/ + /* EEPROM Reading Code */ + /*********************************************************************/ +@@ -727,7 +724,6 @@ + return retval; + } + +- + /*********************************************************************/ + /* EEPROM Parsing Code */ + /*********************************************************************/ +@@ -895,11 +891,10 @@ + } + } + +- + /*********************************************************************/ + /* tulip_init_ring - setup the tx and rx descriptors */ + /*********************************************************************/ +-static void tulip_init_ring(struct nic *nic) ++static void tulip_init_ring(struct nic *nic __unused) + { + int i; + +@@ -935,7 +930,22 @@ + /* Mark the last entry as wrapping the ring, though this should never happen */ + tx_ring[1].length = cpu_to_le32(DESC_RING_WRAP | BUFLEN); + } +- ++ ++static void set_rx_mode(struct nic *nic __unused) { ++ int csr6 = inl(ioaddr + CSR6) & ~0x00D5; ++ ++ tp->csr6 &= ~0x00D5; ++ ++ /* !IFF_PROMISC */ ++ tp->csr6 |= AcceptAllMulticast; ++ csr6 |= AcceptAllMulticast; ++ ++ outl(csr6, ioaddr + CSR6); ++ ++ ++ ++} ++ + /*********************************************************************/ + /* eth_reset - Reset adapter */ + /*********************************************************************/ +@@ -943,7 +953,6 @@ + { + int i; + unsigned long to; +- u32 addr_low, addr_high; + + #ifdef TULIP_DEBUG_WHERE + whereami("tulip_reset\n"); +@@ -956,7 +965,7 @@ + if (tp->mii_cnt || (tp->mtable && tp->mtable->has_mii)) { + outl(0x814C0000, ioaddr + CSR6); + } +- ++ + /* Reset the chip, holding bit 0 set at least 50 PCI cycles. */ + outl(0x00000001, ioaddr + CSR0); + tulip_wait(1); +@@ -1022,8 +1031,8 @@ + } + + /* Point to rx and tx descriptors */ +- outl((unsigned long)&rx_ring[0], ioaddr + CSR3); +- outl((unsigned long)&tx_ring[0], ioaddr + CSR4); ++ outl(virt_to_le32desc(&rx_ring[0]), ioaddr + CSR3); ++ outl(virt_to_le32desc(&tx_ring[0]), ioaddr + CSR4); + + init_media(nic); + +@@ -1049,11 +1058,12 @@ + if (tp->chip_id == LC82C168) + tulip_check_duplex(nic); + ++ set_rx_mode(nic); ++ + /* enable transmit and receive */ + outl(tp->csr6 | 0x00002002, ioaddr + CSR6); + } + +- + /*********************************************************************/ + /* eth_transmit - Transmit a frame */ + /*********************************************************************/ +@@ -1095,7 +1105,7 @@ + tx_ring[0].status = cpu_to_le32(0x80000000); + + /* Point to transmit descriptor */ +- outl((u32)&tx_ring[0], ioaddr + CSR4); ++ outl(virt_to_le32desc(&tx_ring[0]), ioaddr + CSR4); + + /* Enable Tx */ + outl(csr6 | 0x00002000, ioaddr + CSR6); +@@ -1113,11 +1123,11 @@ + /* Disable Tx */ + outl(csr6 & ~0x00002000, ioaddr + CSR6); + } +- ++ + /*********************************************************************/ + /* eth_poll - Wait for a frame */ + /*********************************************************************/ +-static int tulip_poll(struct nic *nic) ++static int tulip_poll(struct nic *nic, int retrieve) + { + + #ifdef TULIP_DEBUG_WHERE +@@ -1128,6 +1138,8 @@ + if (rx_ring[tp->cur_rx].status & 0x80000000) + return 0; + ++ if ( ! retrieve ) return 1; ++ + #ifdef TULIP_DEBUG_WHERE + whereami("tulip_poll got one\n"); + #endif +@@ -1151,17 +1163,20 @@ + + return 1; + } +- ++ + /*********************************************************************/ + /* eth_disable - Disable the interface */ + /*********************************************************************/ +-static void tulip_disable(struct nic *nic) ++static void tulip_disable(struct dev *dev) + { +- ++ struct nic *nic = (struct nic *)dev; + #ifdef TULIP_DEBUG_WHERE + whereami("tulip_disable\n"); + #endif + ++ /* merge reset and disable */ ++ tulip_reset(nic); ++ + /* disable interrupts */ + outl(0x00000000, ioaddr + CSR7); + +@@ -1171,24 +1186,41 @@ + /* Clear the missed-packet counter. */ + (volatile unsigned long)inl(ioaddr + CSR8); + } +- ++ ++/*********************************************************************/ ++/*IRQ - Enable, Disable, or Force interrupts */ ++/*********************************************************************/ ++static void tulip_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } ++} ++ + /*********************************************************************/ + /* eth_probe - Look for an adapter */ + /*********************************************************************/ +-struct nic *tulip_probe(struct nic *nic, unsigned short *io_addrs, +- struct pci_device *pci) ++static int tulip_probe(struct dev *dev, struct pci_device *pci) + { +- u32 i, l1, l2; ++ struct nic *nic = (struct nic *)dev; ++ u32 i; + u8 chip_rev; + u8 ee_data[EEPROM_SIZE]; + unsigned short sum; + int chip_idx; + static unsigned char last_phys_addr[ETH_ALEN] = {0x00, 'L', 'i', 'n', 'u', 'x'}; + +- if (io_addrs == 0 || *io_addrs == 0) ++ if (pci->ioaddr == 0) + return 0; + +- ioaddr = *io_addrs; ++ ioaddr = pci->ioaddr; ++ nic->ioaddr = pci->ioaddr & ~3; ++ nic->irqno = 0; + + /* point to private storage */ + tp = &tpx; +@@ -1378,15 +1410,15 @@ + /* reset the device and make ready for tx and rx of packets */ + tulip_reset(nic); + +- nic->reset = tulip_reset; ++ dev->disable = tulip_disable; + nic->poll = tulip_poll; + nic->transmit = tulip_transmit; +- nic->disable = tulip_disable; ++ nic->irq = tulip_irq; + + /* give the board a chance to reset before returning */ + tulip_wait(4*TICKS_PER_SEC); + +- return nic; ++ return 1; + } + + static void start_link(struct nic *nic) +@@ -1508,7 +1540,7 @@ + } + } + +-static void nway_start(struct nic *nic) ++static void nway_start(struct nic *nic __unused) + { + int csr14 = ((tp->sym_advertise & 0x0780) << 9) | + ((tp->sym_advertise&0x0020)<<1) | 0xffbf; +@@ -1662,7 +1694,7 @@ + } + } + +-static void pnic_do_nway(struct nic *nic) ++static void pnic_do_nway(struct nic *nic __unused) + { + u32 phy_reg = inl(ioaddr + 0xB8); + u32 new_csr6 = tp->csr6 & ~0x40C40200; +@@ -1886,8 +1918,8 @@ + } + } else if (tp->chip_id == DC21040) { /* 21040 */ + /* Turn on the xcvr interface. */ +- int csr12 = inl(ioaddr + CSR12); + #ifdef TULIP_DEBUG ++ int csr12 = inl(ioaddr + CSR12); + if (tulip_debug > 1) + printf("%s: 21040 media type is %s, CSR12 is %hhX.\n", + tp->nic_name, medianame[tp->if_port], csr12); +@@ -1987,3 +2019,51 @@ + + return 0; + } ++ ++static struct pci_id tulip_nics[] = { ++PCI_ROM(0x1011, 0x0002, "dc21040", "Digital Tulip"), ++PCI_ROM(0x1011, 0x0009, "ds21140", "Digital Tulip Fast"), ++PCI_ROM(0x1011, 0x0014, "dc21041", "Digital Tulip+"), ++PCI_ROM(0x1011, 0x0019, "ds21142", "Digital Tulip 21142"), ++PCI_ROM(0x10b7, 0x9300, "3csoho100b-tx","3ComSOHO100B-TX"), ++PCI_ROM(0x10b9, 0x5261, "ali1563", "ALi 1563 integrated ethernet"), ++PCI_ROM(0x10d9, 0x0512, "mx98713", "Macronix MX987x3"), ++PCI_ROM(0x10d9, 0x0531, "mx98715", "Macronix MX987x5"), ++PCI_ROM(0x1113, 0x1217, "mxic-98715", "Macronix MX987x5"), ++PCI_ROM(0x11ad, 0xc115, "lc82c115", "LinkSys LNE100TX"), ++PCI_ROM(0x11ad, 0x0002, "82c168", "Netgear FA310TX"), ++PCI_ROM(0x1282, 0x9100, "dm9100", "Davicom 9100"), ++PCI_ROM(0x1282, 0x9102, "dm9102", "Davicom 9102"), ++PCI_ROM(0x1282, 0x9009, "dm9009", "Davicom 9009"), ++PCI_ROM(0x1282, 0x9132, "dm9132", "Davicom 9132"), ++PCI_ROM(0x1317, 0x0985, "centaur-p", "ADMtek Centaur-P"), ++PCI_ROM(0x1317, 0x0981, "an981", "ADMtek AN981 Comet"), /* ADMTek Centaur-P (stmicro) */ ++PCI_ROM(0x1113, 0x1216, "an983", "ADMTek AN983 Comet"), ++PCI_ROM(0x1317, 0x9511, "an983b", "ADMTek Comet 983b"), ++PCI_ROM(0x1317, 0x1985, "centaur-c", "ADMTek Centaur-C"), ++PCI_ROM(0x8086, 0x0039, "intel21145", "Intel Tulip"), ++PCI_ROM(0x125b, 0x1400, "ax88140", "ASIX AX88140"), ++PCI_ROM(0x11f6, 0x9881, "rl100tx", "Compex RL100-TX"), ++PCI_ROM(0x115d, 0x0003, "xircomtulip", "Xircom Tulip"), ++PCI_ROM(0x104a, 0x0981, "tulip-0981", "Tulip 0x104a 0x0981"), ++PCI_ROM(0x104a, 0x2774, "tulip-2774", "Tulip 0x104a 0x2774"), ++PCI_ROM(0x1113, 0x9511, "tulip-9511", "Tulip 0x1113 0x9511"), ++PCI_ROM(0x1186, 0x1561, "tulip-1561", "Tulip 0x1186 0x1561"), ++PCI_ROM(0x1259, 0xa120, "tulip-a120", "Tulip 0x1259 0xa120"), ++PCI_ROM(0x13d1, 0xab02, "tulip-ab02", "Tulip 0x13d1 0xab02"), ++PCI_ROM(0x13d1, 0xab03, "tulip-ab03", "Tulip 0x13d1 0xab03"), ++PCI_ROM(0x13d1, 0xab08, "tulip-ab08", "Tulip 0x13d1 0xab08"), ++PCI_ROM(0x14f1, 0x1803, "lanfinity", "Conexant LANfinity"), ++PCI_ROM(0x1626, 0x8410, "tulip-8410", "Tulip 0x1626 0x8410"), ++PCI_ROM(0x1737, 0xab08, "tulip-1737-ab08","Tulip 0x1737 0xab08"), ++PCI_ROM(0x1737, 0xab09, "tulip-ab09", "Tulip 0x1737 0xab09"), ++}; ++ ++struct pci_driver tulip_driver = { ++ .type = NIC_DRIVER, ++ .name = "Tulip", ++ .probe = tulip_probe, ++ .ids = tulip_nics, ++ .id_count = sizeof(tulip_nics)/sizeof(tulip_nics[0]), ++ .class = 0, ++}; +diff -Naur grub-0.97.orig/netboot/tulip.txt grub-0.97/netboot/tulip.txt +--- grub-0.97.orig/netboot/tulip.txt 2003-07-09 11:45:38.000000000 +0000 ++++ grub-0.97/netboot/tulip.txt 1970-01-01 00:00:00.000000000 +0000 +@@ -1,53 +0,0 @@ +-This software may be used and distributed according to the terms of +-the GNU Public License, incorporated herein by reference. +- +-This is a tulip and clone driver for Etherboot. See the revision +-history in the tulip.c file for information on changes. This version +-of the driver incorporates changes from Bob Edwards and Paul Mackerras +-who cantributed changes to support the TRENDnet TE100-PCIA NIC which +-uses a genuine Intel 21143-PD chipset. There are also various code +-cleanups to make time-based activities more reliable. +- +-Of course you have to have all the usual Etherboot environment +-(bootp/dhcp/NFS) set up, and you need a Linux kernel with v0.91g +-(7.16.99) or later of the tulip.c driver compiled in to support some +-MX98715 based cards. That file is available at: +- +- http://cesdis.gsfc.nasa.gov/linux/drivers/test/tulip.c +- +-NOTES +- +-I've tested this driver with a SOHOware Fast 10/100 Model SDA110A, +-a Linksys LNE100TX v2.0, and a Netgear FA310TX card, and it worked at +-both 10 and 100 mbits. Other cards based on the tulip family may work as +-well. +- +-These cards are about 20$US, are supported by Linux and now Etherboot, +-and being PCI, they auto-configure IRQ and IOADDR and auto-negotiate +-10/100 half/full duplex. It seems like a pretty good value compared to +-some of the pricier cards, and can lower the cost of building/adapting +-thin client workstations substantially while giving a considerable +-performance increase. +- +-On some PCI tulip clone chipsets (MX987x5, LC82C115, LC82C168) this driver +-lets the card choose the fastest speed it can negotiate with the peer +-device. On other cards, it chooses 10mbit half-duplex. +- +-I burned an AM27C256 (32KByte) EPROM with mx987x5.lzrom and it worked. +-According to the data sheet the MX98715A supports up to 64K (27C512) +-EPROMs, +- +-I've liberally commented the code and header files in the hope that it +-will help the next person who hacks the code or needs to support some +-tulip clone card, or wishes to add functionality. +- +-Anyway, please test this if you can on your tulip based card, and let +-me (mdc@thinguin.org) and the netboot list (netboot@baghira.han.de) +-know how things go. I also would appreciate code review by people who +-program. I'm a strong believer in "another set of eyes". +- +-Regards, +- +-Marty Connor +-mdc@thinguin.org +-http://www.thinguin.org/ +diff -Naur grub-0.97.orig/netboot/types.h grub-0.97/netboot/types.h +--- grub-0.97.orig/netboot/types.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/types.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,44 @@ ++#ifndef _TYPES_H ++#define _TYPES_H ++ ++/* I'm architecture independed :-) */ ++ ++/* ++ * It's architecture depended headers for common integer types ++ */ ++#include "stdint.h" ++ ++/* ++ * Here are some RPC types define from linux /usr/include/rpc/types.h ++ */ ++typedef int bool_t; ++typedef int enum_t; ++typedef uint32_t rpcprog_t; ++typedef uint32_t rpcvers_t; ++typedef uint32_t rpcproc_t; ++typedef uint32_t rpcprot_t; ++typedef uint32_t rpcport_t; ++ ++/* For bool_t */ ++/* typedef enum { */ ++/* FALSE = 0, */ ++/* TRUE = 1 */ ++/* } boolean_t; */ ++ ++ ++ ++/* Some BSD or RPC style types */ ++typedef unsigned char u_char; ++typedef unsigned short u_short; ++typedef unsigned int u_int; ++typedef unsigned long u_long; ++typedef long long quad_t; ++typedef unsigned long long u_quad_t; ++typedef struct { ++ int __val[2]; ++}fsid_t; /* Type of file system IDs, from bits/types.h */ ++ ++typedef int daddr_t; /* The type of a disk address, from bits/types.h */ ++typedef char * caddr_t; ++ ++#endif /* _TYPES_H */ +diff -Naur grub-0.97.orig/netboot/udp.h grub-0.97/netboot/udp.h +--- grub-0.97.orig/netboot/udp.h 1970-01-01 00:00:00.000000000 +0000 ++++ grub-0.97/netboot/udp.h 2005-08-31 19:03:35.000000000 +0000 +@@ -0,0 +1,30 @@ ++#ifndef _UDP_H ++#define _UDP_H ++ ++/* We need 'uint16_t' and 'uint8_t' */ ++#include "types.h" ++/* We need 'in_addr' */ ++#include "in.h" ++ ++struct udp_pseudo_hdr { ++ in_addr src; ++ in_addr dest; ++ uint8_t unused; ++ uint8_t protocol; ++ uint16_t len; ++}; ++struct udphdr { ++ uint16_t src; ++ uint16_t dest; ++ uint16_t len; ++ uint16_t chksum; ++}; ++ ++extern void build_udp_hdr(unsigned long __destip, unsigned int __srcsock, ++ unsigned int __destsock, int __ttl, int __len, ++ const void * __buf); ++ ++extern int udp_transmit(unsigned long __destip, unsigned int __srcsock, ++ unsigned int __destsock, int __len, const void * __buf); ++ ++#endif /* _UDP_H */ +diff -Naur grub-0.97.orig/netboot/via-rhine.c grub-0.97/netboot/via-rhine.c +--- grub-0.97.orig/netboot/via-rhine.c 2003-07-09 11:45:38.000000000 +0000 ++++ grub-0.97/netboot/via-rhine.c 2005-08-31 19:03:35.000000000 +0000 +@@ -18,7 +18,7 @@ + + */ + +-static const char *version = "rhine.c v1.0.0 2000-01-07\n"; ++static const char *version = "rhine.c v1.0.1 2003-02-06\n"; + + /* A few user-configurable values. */ + +@@ -46,7 +46,6 @@ + #include "etherboot.h" + #include "nic.h" + #include "pci.h" +-#include "cards.h" + + /* define all ioaddr */ + +@@ -103,6 +102,11 @@ + #define byCFGD ioaddr + 0x7b + #define wTallyCntMPA ioaddr + 0x7c + #define wTallyCntCRC ioaddr + 0x7d ++#define bySTICKHW ioaddr + 0x83 ++#define byWOLcrClr ioaddr + 0xA4 ++#define byWOLcgClr ioaddr + 0xA7 ++#define byPwrcsrClr ioaddr + 0xAC ++ + /*--------------------- Exioaddr Definitions -------------------------*/ + + /* +@@ -617,9 +621,6 @@ + + */ + +-#define PCI_VENDOR_ID_FET 0x1106 +-#define PCI_DEVICE_ID_FET_3043 0x3043 +- + /* The rest of these values should never change. */ + #define NUM_TX_DESC 2 /* Number of Tx descriptor registers. */ + +@@ -652,23 +653,19 @@ + } + rhine; + +-static struct nic *rhine_probe1 (struct nic *dev, int ioaddr, ++static void rhine_probe1 (struct nic *nic, int ioaddr, + int chip_id, int options); + static int QueryAuto (int); + static int ReadMII (int byMIIIndex, int); + static void WriteMII (char, char, char, int); + static void MIIDelay (void); + static void rhine_init_ring (struct nic *dev); +-static void rhine_disable (struct nic *nic); ++static void rhine_disable (struct dev *dev); + static void rhine_reset (struct nic *nic); +-static int rhine_poll (struct nic *nic); ++static int rhine_poll (struct nic *nic, int retreive); + static void rhine_transmit (struct nic *nic, const char *d, unsigned int t, + unsigned int s, const char *p); + +-/* Linux support functions */ +-#define virt_to_bus(x) ((unsigned long)x) +-#define bus_to_virt(x) ((void *)x) +- + /* Initialize the Rx and Tx rings, along with various 'dev' bits. */ + static void + rhine_init_ring (struct nic *nic) +@@ -854,26 +851,99 @@ + } + } + +-struct nic * +-rhine_probe (struct nic *nic, unsigned short *probeaddrs, +- struct pci_device *pci) ++/* Offsets to the device registers. */ ++enum register_offsets { ++ StationAddr=0x00, RxConfig=0x06, TxConfig=0x07, ChipCmd=0x08, ++ IntrStatus=0x0C, IntrEnable=0x0E, ++ MulticastFilter0=0x10, MulticastFilter1=0x14, ++ RxRingPtr=0x18, TxRingPtr=0x1C, GFIFOTest=0x54, ++ MIIPhyAddr=0x6C, MIIStatus=0x6D, PCIBusConfig=0x6E, ++ MIICmd=0x70, MIIRegAddr=0x71, MIIData=0x72, MACRegEEcsr=0x74, ++ ConfigA=0x78, ConfigB=0x79, ConfigC=0x7A, ConfigD=0x7B, ++ RxMissed=0x7C, RxCRCErrs=0x7E, MiscCmd=0x81, ++ StickyHW=0x83, IntrStatus2=0x84, WOLcrClr=0xA4, WOLcgClr=0xA7, ++ PwrcsrClr=0xAC, ++}; ++ ++/* Bits in the interrupt status/mask registers. */ ++enum intr_status_bits { ++ IntrRxDone=0x0001, IntrRxErr=0x0004, IntrRxEmpty=0x0020, ++ IntrTxDone=0x0002, IntrTxError=0x0008, IntrTxUnderrun=0x0210, ++ IntrPCIErr=0x0040, ++ IntrStatsMax=0x0080, IntrRxEarly=0x0100, ++ IntrRxOverflow=0x0400, IntrRxDropped=0x0800, IntrRxNoBuf=0x1000, ++ IntrTxAborted=0x2000, IntrLinkChange=0x4000, ++ IntrRxWakeUp=0x8000, ++ IntrNormalSummary=0x0003, IntrAbnormalSummary=0xC260, ++ IntrTxDescRace=0x080000, /* mapped from IntrStatus2 */ ++ IntrTxErrSummary=0x082218, ++}; ++#define DEFAULT_INTR (IntrRxDone | IntrRxErr | IntrRxEmpty| IntrRxOverflow | \ ++ IntrRxDropped | IntrRxNoBuf) ++ ++/*************************************************************************** ++ IRQ - PXE IRQ Handler ++***************************************************************************/ ++void rhine_irq ( struct nic *nic, irq_action_t action ) { ++ struct rhine_private *tp = (struct rhine_private *) nic->priv_data; ++ /* Enable interrupts by setting the interrupt mask. */ ++ unsigned int intr_status; ++ ++ switch ( action ) { ++ case DISABLE : ++ case ENABLE : ++ intr_status = inw(nic->ioaddr + IntrStatus); ++ /* On Rhine-II, Bit 3 indicates Tx descriptor write-back race. */ ++ if (tp->chip_id == 0x3065) ++ intr_status |= inb(nic->ioaddr + IntrStatus2) << 16; ++ intr_status = (intr_status & ~DEFAULT_INTR); ++ if ( action == ENABLE ) ++ intr_status = intr_status | DEFAULT_INTR; ++ outw(intr_status, nic->ioaddr + IntrEnable); ++ break; ++ case FORCE : ++ outw(0x0010, nic->ioaddr + 0x84); ++ break; ++ } ++} ++ ++static int ++rhine_probe (struct dev *dev, struct pci_device *pci) + { ++ struct nic *nic = (struct nic *)dev; ++ struct rhine_private *tp = &rhine; + if (!pci->ioaddr) +- return NULL; +- nic = rhine_probe1 (nic, pci->ioaddr, 0, -1); ++ return 0; ++ rhine_probe1 (nic, pci->ioaddr, pci->dev_id, -1); + +- if (nic) +- adjust_pci_device(pci); +- nic->poll = rhine_poll; +- nic->transmit = rhine_transmit; +- nic->reset = rhine_reset; +- nic->disable = rhine_disable; ++ adjust_pci_device(pci); + rhine_reset (nic); + +- return nic; ++ dev->disable = rhine_disable; ++ nic->poll = rhine_poll; ++ nic->transmit = rhine_transmit; ++ nic->irqno = pci->irq; ++ nic->irq = rhine_irq; ++ nic->ioaddr = tp->ioaddr; ++ ++ ++ return 1; ++} ++ ++static void set_rx_mode(struct nic *nic __unused) { ++ struct rhine_private *tp = (struct rhine_private *) nic->priv_data; ++ unsigned char rx_mode; ++ int ioaddr = tp->ioaddr; ++ ++ /* ! IFF_PROMISC */ ++ outl(0xffffffff, byMAR0); ++ outl(0xffffffff, byMAR4); ++ rx_mode = 0x0C; ++ ++ outb(0x60 /* thresh */ | rx_mode, byRCR ); + } + +-static struct nic * ++static void + rhine_probe1 (struct nic *nic, int ioaddr, int chip_id, int options) + { + struct rhine_private *tp; +@@ -885,6 +955,29 @@ + + if (rhine_debug > 0 && did_version++ == 0) + printf (version); ++ ++ /* D-Link provided reset code (with comment additions) */ ++ if((chip_id != 0x3043) && (chip_id != 0x6100)) { ++ unsigned char byOrgValue; ++ ++ if(rhine_debug > 0) ++ printf("Enabling Sticky Bit Workaround for Chip_id: 0x%hX\n" ++ , chip_id); ++ /* clear sticky bit before reset & read ethernet address */ ++ byOrgValue = inb(bySTICKHW); ++ byOrgValue = byOrgValue & 0xFC; ++ outb(byOrgValue, bySTICKHW); ++ ++ /* (bits written are cleared?) */ ++ /* disable force PME-enable */ ++ outb(0x80, byWOLcgClr); ++ /* disable power-event config bit */ ++ outb(0xFF, byWOLcrClr); ++ /* clear power status (undocumented in vt6102 docs?) */ ++ outb(0xFF, byPwrcsrClr); ++ ++ } ++ + /* Perhaps this should be read from the EEPROM? */ + for (i = 0; i < ETH_ALEN; i++) + nic->node_addr[i] = inb (byPAR0 + i); +@@ -920,6 +1013,7 @@ + } + #endif + ++ + /* query MII to know LineSpeed,duplex mode */ + byMIIvalue = inb (ioaddr + 0x6d); + LineSpeed = byMIIvalue & MIISR_SPEED; +@@ -971,15 +1065,19 @@ + if (tp->default_port) + tp->medialock = 1; + } +- return nic; ++ return; + } + +-static void +-rhine_disable (struct nic *nic) ++static void ++rhine_disable (struct dev *dev) + { ++ struct nic *nic = (struct nic *)dev; + struct rhine_private *tp = (struct rhine_private *) nic->priv_data; + int ioaddr = tp->ioaddr; + ++ /* merge reset and disable */ ++ rhine_reset(nic); ++ + printf ("rhine disable\n"); + /* Switch to loopback mode to avoid hardware races. */ + writeb(0x60 | 0x01, byTCR); +@@ -1002,17 +1100,10 @@ + int rx_bufs_tmp, rx_bufs_tmp1; + int tx_bufs_tmp, tx_bufs_tmp1; + +-#ifdef USE_LOWMEM_BUFFER +-#define buf1 (0x10000 - (RX_RING_SIZE * PKT_BUF_SZ + 32)) +-#define buf2 (buf1 - (RX_RING_SIZE * PKT_BUF_SZ + 32)) +-#define desc1 (buf2 - (TX_RING_SIZE * sizeof (struct rhine_tx_desc) + 32)) +-#define desc2 (desc1 - (TX_RING_SIZE * sizeof (struct rhine_tx_desc) + 32)) +-#else + static char buf1[RX_RING_SIZE * PKT_BUF_SZ + 32]; + static char buf2[RX_RING_SIZE * PKT_BUF_SZ + 32]; + static char desc1[TX_RING_SIZE * sizeof (struct rhine_tx_desc) + 32]; + static char desc2[TX_RING_SIZE * sizeof (struct rhine_tx_desc) + 32]; +-#endif + + /* printf ("rhine_reset\n"); */ + /* Soft reset the chip. */ +@@ -1069,6 +1160,9 @@ + outl (virt_to_bus (tp->rx_ring), dwCurrentRxDescAddr); + outl (virt_to_bus (tp->tx_ring), dwCurrentTxDescAddr); + ++ /* Setup Multicast */ ++ set_rx_mode(nic); ++ + /* close IMR */ + outw (0x0000, byIMR0); + +@@ -1093,15 +1187,34 @@ + /*set IMR to work */ + outw (IMRShadow, byIMR0); + } ++/* Beware of PCI posted writes */ ++#define IOSYNC do { readb(nic->ioaddr + StationAddr); } while (0) + + static int +-rhine_poll (struct nic *nic) ++rhine_poll (struct nic *nic, int retreive) + { + struct rhine_private *tp = (struct rhine_private *) nic->priv_data; + int rxstatus, good = 0;; + + if (tp->rx_ring[tp->cur_rx].rx_status.bits.own_bit == 0) + { ++ unsigned int intr_status; ++ /* There is a packet ready */ ++ if(!retreive) ++ return 1; ++ ++ intr_status = inw(nic->ioaddr + IntrStatus); ++ /* On Rhine-II, Bit 3 indicates Tx descriptor write-back race. */ ++#if 0 ++ if (tp->chip_id == 0x3065) ++ intr_status |= inb(nic->ioaddr + IntrStatus2) << 16; ++#endif ++ /* Acknowledge all of the current interrupt sources ASAP. */ ++ if (intr_status & IntrTxDescRace) ++ outb(0x08, nic->ioaddr + IntrStatus2); ++ outw(intr_status & 0xffff, nic->ioaddr + IntrStatus); ++ IOSYNC; ++ + rxstatus = tp->rx_ring[tp->cur_rx].rx_status.lw; + if ((rxstatus & 0x0300) != 0x0300) + { +@@ -1124,6 +1237,11 @@ + tp->cur_rx++; + tp->cur_rx = tp->cur_rx % RX_RING_SIZE; + } ++ /* Acknowledge all of the current interrupt sources ASAP. */ ++ outw(DEFAULT_INTR & ~IntrRxDone, nic->ioaddr + IntrStatus); ++ ++ IOSYNC; ++ + return good; + } + +@@ -1152,7 +1270,7 @@ + while (s < ETH_ZLEN) + *((char *) tp->tx_buffs[entry] + ETH_HLEN + (s++)) = 0; + +- tp->tx_ring[entry].tx_ctrl.bits.tx_buf_size = ETH_HLEN + s; ++ tp->tx_ring[entry].tx_ctrl.bits.tx_buf_size = s; + + tp->tx_ring[entry].tx_status.bits.own_bit = 1; + +@@ -1170,6 +1288,9 @@ + /*printf("td4=[%X]",inl(dwCurrentTDSE3)); */ + + outb (CR1bak, byCR1); ++ /* Wait until transmit is finished */ ++ while (tp->tx_ring[entry].tx_status.bits.own_bit != 0) ++ ; + tp->cur_tx++; + + /*outw(IMRShadow,byIMR0); */ +@@ -1177,4 +1298,21 @@ + /*tp->tx_skbuff[entry] = 0; */ + } + ++static struct pci_id rhine_nics[] = { ++PCI_ROM(0x1106, 0x3065, "dlink-530tx", "VIA 6102"), ++PCI_ROM(0x1106, 0x3106, "via-rhine-6105", "VIA 6105"), ++PCI_ROM(0x1106, 0x3043, "dlink-530tx-old", "VIA 3043"), /* Rhine-I 86c100a */ ++PCI_ROM(0x1106, 0x3053, "via6105m", "VIA 6105M"), ++PCI_ROM(0x1106, 0x6100, "via-rhine-old", "VIA 86C100A"), /* Rhine-II */ ++}; ++ ++struct pci_driver rhine_driver = { ++ .type = NIC_DRIVER, ++ .name = "VIA 86C100", ++ .probe = rhine_probe, ++ .ids = rhine_nics, ++ .id_count = sizeof(rhine_nics)/sizeof(rhine_nics[0]), ++ .class = 0, ++}; ++ + /* EOF via-rhine.c */ +diff -Naur grub-0.97.orig/netboot/w89c840.c grub-0.97/netboot/w89c840.c +--- grub-0.97.orig/netboot/w89c840.c 2003-07-09 11:45:38.000000000 +0000 ++++ grub-0.97/netboot/w89c840.c 2005-08-31 19:03:35.000000000 +0000 +@@ -43,6 +43,9 @@ + * using timer2 routines. Proposed + * by Ken Yap to eliminate CPU speed + * dependency. ++ * Dec 12 2003 V0.94 timlegge Fixed issues in 5.2, removed ++ * interrupt usage, enabled ++ * multicast support + * + * This is the etherboot driver for cards based on Winbond W89c840F chip. + * +@@ -77,10 +80,9 @@ + #include "etherboot.h" + #include "nic.h" + #include "pci.h" +-#include "cards.h" + #include "timer.h" + +-static const char *w89c840_version = "diver Version 0.92 - August 27, 2000"; ++static const char *w89c840_version = "driver Version 0.94 - December 12, 2003"; + + typedef unsigned char u8; + typedef signed char s8; +@@ -90,9 +92,6 @@ + typedef signed int s32; + + /* Linux support functions */ +-#define virt_to_bus(x) ((unsigned long)x) +-#define bus_to_virt(x) ((void *)x) +- + #define virt_to_le32desc(addr) virt_to_bus(addr) + #define le32desc_to_virt(addr) bus_to_virt(addr) + +@@ -109,7 +108,6 @@ + bonding and packet priority. + There are no ill effects from too-large receive rings. */ + #define TX_RING_SIZE 2 +- + #define RX_RING_SIZE 2 + + /* The presumed FIFO size for working around the Tx-FIFO-overflow bug. +@@ -260,32 +258,20 @@ + + static int ioaddr; + static unsigned short eeprom [0x40]; +- +-#ifdef USE_LOWMEM_BUFFER +-#define rx_packet ((char *)0x10000 - PKT_BUF_SZ * RX_RING_SIZE) +-#define tx_packet ((char *)0x10000 - PKT_BUF_SZ * RX_RING_SIZE - PKT_BUF_SZ * TX_RING_SIZE) +-#else + static char rx_packet[PKT_BUF_SZ * RX_RING_SIZE]; + static char tx_packet[PKT_BUF_SZ * TX_RING_SIZE]; +-#endif + + static int eeprom_read(long ioaddr, int location); + static int mdio_read(int base_address, int phy_id, int location); ++#if 0 + static void mdio_write(int base_address, int phy_id, int location, int value); ++#endif + + static void check_duplex(void); + static void set_rx_mode(void); + static void init_ring(void); + +-/* +-static void wait_long_time(void) +-{ +- printf("Paused - please read output above this line\n"); +- sleep(3); +-} +-*/ +- +-#if defined W89C840_DEBUG ++#if defined(W89C840_DEBUG) + static void decode_interrupt(u32 intr_status) + { + printf("Interrupt status: "); +@@ -349,15 +335,17 @@ + check_duplex(); + set_rx_mode(); + +- /* Clear and Enable interrupts by setting the interrupt mask. */ ++ /* Do not enable the interrupts Etherboot doesn't need them */ ++/* + writel(0x1A0F5, ioaddr + IntrStatus); + writel(0x1A0F5, ioaddr + IntrEnable); +- ++*/ + #if defined(W89C840_DEBUG) + printf("winbond-840 : Done reset.\n"); + #endif + } + ++#if 0 + static void handle_intr(u32 intr_stat) + { + if ((intr_stat & (NormalIntr|AbnormalIntr)) == 0) { +@@ -372,7 +360,7 @@ + /* There was an abnormal interrupt */ + printf("\n-=- Abnormal interrupt.\n"); + +-#if defined (W89C840_DEBUG) ++#if defined(W89C840_DEBUG) + decode_interrupt(intr_stat); + #endif + +@@ -383,19 +371,21 @@ + } + } + } ++#endif + + /************************************************************************** + w89c840_poll - Wait for a frame + ***************************************************************************/ +-static int w89c840_poll(struct nic *nic) ++static int w89c840_poll(struct nic *nic, int retrieve) + { + /* return true if there's an ethernet packet ready to read */ + /* nic->packet should contain data on return */ + /* nic->packetlen should contain length of data */ + int packet_received = 0; + ++#if defined(W89C840_DEBUG) + u32 intr_status = readl(ioaddr + IntrStatus); +- /* handle_intr(intr_status); */ /* -- handled later */ ++#endif + + do { + /* Code from netdev_rx(dev) */ +@@ -411,6 +401,11 @@ + break; + } + ++ if ( !retrieve ) { ++ packet_received = 1; ++ break; ++ } ++ + if ((status & 0x38008300) != 0x0300) { + if ((status & 0x38000300) != 0x0300) { + /* Ingore earlier buffers. */ +@@ -478,11 +473,7 @@ + entry = (++w840private.cur_rx) % RX_RING_SIZE; + w840private.rx_head_desc = &w840private.rx_ring[entry]; + } while (0); +- +- if (intr_status & (AbnormalIntr | TxFIFOUnderflow | IntrPCIErr |TimerInt | IntrTxStopped)) { +- handle_intr(intr_status); +- } +- ++ + return packet_received; + } + +@@ -521,13 +512,13 @@ + + w840private.tx_ring[entry].buffer1 = virt_to_le32desc(tx_packet); + +- w840private.tx_ring[entry].length = (DescWholePkt | s); ++ w840private.tx_ring[entry].length = (DescWholePkt | (u32) s); + if (entry >= TX_RING_SIZE-1) /* Wrap ring */ + w840private.tx_ring[entry].length |= (DescIntr | DescEndRing); + w840private.tx_ring[entry].status = (DescOwn); + w840private.cur_tx++; + +- w840private.tx_q_bytes += s; ++ w840private.tx_q_bytes = (u16) s; + writel(0, ioaddr + TxStartDemand); + + /* Work around horrible bug in the chip by marking the queue as full +@@ -550,33 +541,29 @@ + load_timer2(TX_TIMEOUT); + + { ++#if defined W89C840_DEBUG + u32 intr_stat = 0; +- ++#endif + while (1) { + +- intr_stat = readl(ioaddr + IntrStatus); + #if defined(W89C840_DEBUG) +- decode_interrupt(intr_stat); ++ decode_interrupt(intr_stat); + #endif + +- if (intr_stat & (NormalIntr | IntrTxDone)) { +- + while ( (transmit_status & DescOwn) && timer2_running()) { + + transmit_status = w840private.tx_ring[entry].status; + } + +- writel(intr_stat & 0x0001ffff, ioaddr + IntrStatus); + break; +- } + } + } + + if ((transmit_status & DescOwn) == 0) { + + #if defined(W89C840_DEBUG) +- printf("winbond-840 : transmission complete after %d wait loop iterations, status %X\n", +- TX_LOOP_COUNT - transmit_loop_counter, w840private.tx_ring[entry].status); ++ printf("winbond-840 : transmission complete after wait loop iterations, status %X\n", ++ w840private.tx_ring[entry].status); + #endif + + return; +@@ -592,8 +579,12 @@ + /************************************************************************** + w89c840_disable - Turn off ethernet interface + ***************************************************************************/ +-static void w89c840_disable(struct nic *nic) ++static void w89c840_disable(struct dev *dev) + { ++ struct nic *nic = (struct nic *)dev; ++ /* merge reset and disable */ ++ w89c840_reset(nic); ++ + /* Don't know what to do to disable the board. Is this needed at all? */ + /* Yes, a live NIC can corrupt the loaded memory later [Ken] */ + /* Stop the chip's Tx and Rx processes. */ +@@ -601,20 +592,37 @@ + } + + /************************************************************************** ++w89c840_irq - Enable, Disable, or Force interrupts ++***************************************************************************/ ++static void w89c840_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } ++} ++ ++/************************************************************************** + w89c840_probe - Look for an adapter, this routine's visible to the outside + ***************************************************************************/ +-struct nic *w89c840_probe(struct nic *nic, unsigned short *probe_addrs, struct pci_device *p) ++static int w89c840_probe(struct dev *dev, struct pci_device *p) + { ++ struct nic *nic = (struct nic *)dev; + u16 sum = 0; +- int i, j, to; ++ int i, j; + unsigned short value; +- int options; +- int promisc; + +- if (probe_addrs == 0 || probe_addrs[0] == 0) ++ if (p->ioaddr == 0) + return 0; + +- ioaddr = probe_addrs[0]; /* Mask the bit that says "this is an io addr" */ ++ ioaddr = p->ioaddr; ++ nic->ioaddr = p->ioaddr & ~3; ++ nic->irqno = 0; ++ + + #if defined(W89C840_DEBUG) + printf("winbond-840: PCI bus %hhX device function %hhX: I/O address: %hX\n", p->bus, p->devfn, ioaddr); +@@ -622,8 +630,6 @@ + + ioaddr = ioaddr & ~3; /* Mask the bit that says "this is an io addr" */ + +- /* if probe_addrs is 0, then routine can use a hardwired default */ +- + /* From Matt Hortman */ + if (p->vendor == PCI_VENDOR_ID_WINBOND2 + && p->dev_id == PCI_DEVICE_ID_WINBOND2_89C840) { +@@ -689,14 +695,14 @@ + } + + /* point to NIC specific routines */ +- nic->reset = w89c840_reset; +- nic->poll = w89c840_poll; ++ dev->disable = w89c840_disable; ++ nic->poll = w89c840_poll; + nic->transmit = w89c840_transmit; +- nic->disable = w89c840_disable; ++ nic->irq = w89c840_irq; + + w89c840_reset(nic); + +- return nic; ++ return 1; + } + + /* Read the EEPROM and MII Management Data I/O (MDIO) interfaces. These are +@@ -814,6 +820,7 @@ + return (retval>>1) & 0xffff; + } + ++#if 0 + static void mdio_write(int base_address, int phy_id, int location, int value) + { + long mdio_addr = base_address + MIICtrl; +@@ -844,6 +851,7 @@ + } + return; + } ++#endif + + static void check_duplex(void) + { +@@ -877,12 +885,10 @@ + memset(mc_filter, 0xff, sizeof(mc_filter)); + + /* +- * Actually, should work OK with multicast enabled. -- iko +- */ +-/* +- * rx_mode = AcceptBroadcast | AcceptMyPhys | AcceptMulticast; ++ * works OK with multicast enabled. + */ +- rx_mode = AcceptBroadcast | AcceptMyPhys; ++ ++ rx_mode = AcceptBroadcast | AcceptMyPhys | AcceptMulticast; + + writel(mc_filter[0], ioaddr + MulticastFilter0); + writel(mc_filter[1], ioaddr + MulticastFilter1); +@@ -932,3 +938,18 @@ + } + return; + } ++ ++ ++static struct pci_id w89c840_nics[] = { ++PCI_ROM(0x1050, 0x0840, "winbond840", "Winbond W89C840F"), ++PCI_ROM(0x11f6, 0x2011, "compexrl100atx", "Compex RL100ATX"), ++}; ++ ++struct pci_driver w89c840_driver = { ++ .type = NIC_DRIVER, ++ .name = "W89C840F", ++ .probe = w89c840_probe, ++ .ids = w89c840_nics, ++ .id_count = sizeof(w89c840_nics)/sizeof(w89c840_nics[0]), ++ .class = 0, ++}; +diff -Naur grub-0.97.orig/stage2/disk_io.c grub-0.97/stage2/disk_io.c +--- grub-0.97.orig/stage2/disk_io.c 2004-05-23 16:35:24.000000000 +0000 ++++ grub-0.97/stage2/disk_io.c 2005-08-31 19:03:35.000000000 +0000 +@@ -25,6 +25,7 @@ + #ifdef SUPPORT_NETBOOT + # define GRUB 1 + # include ++# include + #endif + + #ifdef GRUB_UTIL diff --git a/boot/grub/grub.400-nic_update2.patch.bz2 b/boot/grub/grub.400-nic_update2.patch.bz2 deleted file mode 100644 index 8592f15ff1..0000000000 Binary files a/boot/grub/grub.400-nic_update2.patch.bz2 and /dev/null differ diff --git a/boot/grub/grub.mk b/boot/grub/grub.mk index 401d346406..fd27620fa6 100644 --- a/boot/grub/grub.mk +++ b/boot/grub/grub.mk @@ -1,25 +1,22 @@ -############################################################# +################################################################################ # # grub # -############################################################# -GRUB_SOURCE:=grub_0.97.orig.tar.gz -GRUB_PATCH:=grub_0.97-35.diff.gz -GRUB_SITE:=http://snapshot.debian.net/archive/2008/03/29/debian/pool/main/g/grub/ -GRUB_PATCH_SITE:=$(GRUB_SITE) -GRUB_CAT:=$(ZCAT) -GRUB_DIR:=$(BUILD_DIR)/grub-0.97 -GRUB_BINARY:=grub/grub -GRUB_TARGET_BINARY:=sbin/grub -GRUB_SPLASHIMAGE=$(TOPDIR)/boot/grub/splash.xpm.gz +################################################################################ +GRUB_VERSION = 0.97 +GRUB_SOURCE = grub_$(GRUB_VERSION).orig.tar.gz +GRUB_PATCH = grub_$(GRUB_VERSION)-35.diff.gz +GRUB_SITE = http://snapshot.debian.org/archive/debian/20080329T000000Z/pool/main/g/grub/ + +GRUB_LICENSE = GPLv2+ +GRUB_LICENSE_FILES = COPYING GRUB_CFLAGS=-DSUPPORT_LOOPDEV ifeq ($(BR2_LARGEFILE),) GRUB_CFLAGS+=-U_FILE_OFFSET_BITS endif - GRUB_CONFIG-$(BR2_TARGET_GRUB_SPLASH) += --enable-graphics GRUB_CONFIG-$(BR2_TARGET_GRUB_DISKLESS) += --enable-diskless GRUB_CONFIG-$(BR2_TARGET_GRUB_3c595) += --enable-3c595 @@ -44,75 +41,48 @@ GRUB_CONFIG-$(BR2_TARGET_GRUB_undi) += --enable-undi GRUB_CONFIG-$(BR2_TARGET_GRUB_via_rhine) += --enable-via-rhine GRUB_CONFIG-$(BR2_TARGET_GRUB_w89c840) += --enable-w89c840 -$(DL_DIR)/$(GRUB_SOURCE): - $(call DOWNLOAD,$(GRUB_SITE),$(GRUB_SOURCE)) - -$(DL_DIR)/$(GRUB_PATCH): - $(call DOWNLOAD,$(GRUB_PATCH_SITE),$(GRUB_PATCH)) +define GRUB_DEBIAN_PATCHES + # Apply the patches from the Debian patch + (cd $(@D) ; for f in `cat debian/patches/00list | grep -v ^#` ; do \ + cat debian/patches/$$f | patch -g0 -p1 ; \ + done) +endef -grub-source: $(DL_DIR)/$(GRUB_SOURCE) $(DL_DIR)/$(GRUB_PATCH) +GRUB_POST_PATCH_HOOKS += GRUB_DEBIAN_PATCHES -$(GRUB_DIR)/.unpacked: $(DL_DIR)/$(GRUB_SOURCE) $(DL_DIR)/$(GRUB_PATCH) - $(GRUB_CAT) $(DL_DIR)/$(GRUB_SOURCE) | tar -C $(BUILD_DIR) -xvf - - toolchain/patch-kernel.sh $(GRUB_DIR) $(DL_DIR) $(GRUB_PATCH) - for i in `grep -v "^#" $(GRUB_DIR)/debian/patches/00list`; do \ - cat $(GRUB_DIR)/debian/patches/$$i | patch -p1 -d $(GRUB_DIR); \ - done - toolchain/patch-kernel.sh $(GRUB_DIR) boot/grub grub.\*.patch{,.bz2} - touch $@ +GRUB_CONF_ENV = \ + CFLAGS="$(TARGET_CFLAGS) $(GRUB_CFLAGS)" -$(GRUB_DIR)/.configured: $(GRUB_DIR)/.unpacked - (cd $(GRUB_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="$(GRUB_CFLAGS)" \ - ./configure $(QUIET) \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/ \ - --mandir=/usr/man \ - --infodir=/usr/info \ - --disable-auto-linux-mem-opt \ - $(GRUB_CONFIG-y) \ - ) - touch $@ +GRUB_CONF_OPT = \ + --disable-auto-linux-mem-opt \ + $(GRUB_CONFIG-y) -$(GRUB_DIR)/$(GRUB_BINARY): $(GRUB_DIR)/.configured - $(MAKE) CC="$(TARGET_CC)" -C $(GRUB_DIR) - rm -f $(GRUB_DIR)/$(GRUB_BINARY) - $(MAKE) CC="$(TARGET_CC)" CFLAGS+=-static -C $(GRUB_DIR)/grub grub - mkdir -p $(dir $(STAGING_DIR)/$(GRUB_TARGET_BINARY)) - mv $(GRUB_DIR)/$(GRUB_BINARY) $(STAGING_DIR)/$(GRUB_TARGET_BINARY).static - $(MAKE) CC="$(TARGET_CC)" -C $(GRUB_DIR)/grub +define GRUB_INSTALL_STAGING_CMDS + install -m 0755 -D $(@D)/grub/grub $(STAGING_DIR)/sbin/grub +endef -$(GRUB_DIR)/.installed: $(GRUB_DIR)/$(GRUB_BINARY) - cp $(GRUB_DIR)/$(GRUB_BINARY) $(TARGET_DIR)/$(GRUB_TARGET_BINARY) - test -d $(TARGET_DIR)/boot/grub || mkdir -p $(TARGET_DIR)/boot/grub - cp $(GRUB_DIR)/stage1/stage1 $(GRUB_DIR)/stage2/*1_5 $(GRUB_DIR)/stage2/stage2 $(TARGET_DIR)/boot/grub/ ifeq ($(BR2_TARGET_GRUB_SPLASH),y) - test -f $(TARGET_DIR)/boot/grub/$(GRUB_SPLASHIMAGE) || \ - cp $(GRUB_SPLASHIMAGE) $(TARGET_DIR)/boot/grub/ +define GRUB_INSTALL_SPLASH + cp boot/grub/splash.xpm.gz $(TARGET_DIR)/boot/grub/ +endef endif - touch $@ -grub: $(GRUB_DIR)/.installed +define GRUB_INSTALL_TARGET_CMDS + install -m 0755 -D $(@D)/grub/grub $(TARGET_DIR)/sbin/grub + mkdir -p $(TARGET_DIR)/boot/grub + cp $(@D)/stage1/stage1 $(TARGET_DIR)/boot/grub + cp $(@D)/stage2/*1_5 $(TARGET_DIR)/boot/grub + cp $(@D)/stage2/stage2 $(TARGET_DIR)/boot/grub + $(GRUB_INSTALL_SPLASH) +endef -grub-clean: - $(MAKE) DESTDIR=$(TARGET_DIR) CC="$(TARGET_CC)" -C $(GRUB_DIR) uninstall - -$(MAKE) -C $(GRUB_DIR) clean - rm -f $(TARGET_DIR)/boot/grub/$(GRUB_SPLASHIMAGE) \ - $(TARGET_DIR)/sbin/$(GRUB_BINARY) \ - $(TARGET_DIR)/boot/grub/{stage{1,2},*1_5} +define GRUB_UNINSTALL_STAGING_CMDS + rm -f $(STAGING_DIR)/sbin/grub +endef -grub-dirclean: - rm -rf $(GRUB_DIR) +define GRUB_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/sbin/grub + rm -rf $(TARGET_DIR)/boot/grub +endef -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_TARGET_GRUB),y) -TARGETS+=grub -endif +$(eval $(autotools-package)) diff --git a/boot/grub2/Config.in b/boot/grub2/Config.in deleted file mode 100644 index 1301b5b80d..0000000000 --- a/boot/grub2/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_TARGET_GRUB2 - bool "grub2" - # Only supports PC, Mac (Power, x86 and x86-64), Pegasos - depends on BR2_i386 || BR2_powerpc - # Build process is broken (./configure doesn't work, Ruby - # required, etc.) - depends on BROKEN - help - The GRand Unified Bootloader for x86 systems, take #2. diff --git a/boot/grub2/grub2.mk b/boot/grub2/grub2.mk deleted file mode 100644 index f939d9a435..0000000000 --- a/boot/grub2/grub2.mk +++ /dev/null @@ -1,93 +0,0 @@ -############################################################# -# -# grub2 -# -# TODO -# -# * grub2's autogen uses ruby, which isn't part of the core Debian -# installation. So either decide it is a requirement for Buildroot, -# or build it for the host. -# -# * improve the installation procedure. For the moment, it just -# installs everything in $(TARGET_DIR). -# -############################################################# -GRUB2_SOURCE:=grub2_1.98.orig.tar.gz -GRUB2_PATCH:=grub2_1.98-1.diff.gz -GRUB2_SITE=$(BR2_DEBIAN_MIRROR)/debian/pool/main/g/grub2 -GRUB2_PATCH_SITE:=$(GRUB2_SITE) -GRUB2_CAT:=$(ZCAT) -GRUB2_DIR:=$(BUILD_DIR)/grub-1.98 - -GRUB2_CFLAGS=-DSUPPORT_LOOPDEV -ifeq ($(BR2_LARGEFILE),) -GRUB2_CFLAGS+=-U_FILE_OFFSET_BITS -endif - -$(DL_DIR)/$(GRUB2_SOURCE): - $(call DOWNLOAD,$(GRUB2_SITE),$(GRUB2_SOURCE)) - -$(DL_DIR)/$(GRUB2_PATCH): - $(call DOWNLOAD,$(GRUB2_PATCH_SITE),$(GRUB2_PATCH)) - -grub2-source: $(DL_DIR)/$(GRUB2_SOURCE) $(DL_DIR)/$(GRUB2_PATCH) - -$(GRUB2_DIR)/.unpacked: $(DL_DIR)/$(GRUB2_SOURCE) $(DL_DIR)/$(GRUB2_PATCH) - mkdir -p $(@D) - $(GRUB2_CAT) $(DL_DIR)/$(GRUB2_SOURCE) | tar $(TAR_STRIP_COMPONENTS)=1 -C $(@D) -xvf - - toolchain/patch-kernel.sh $(@D) $(DL_DIR) $(GRUB2_PATCH) - for i in `grep -v "^#" $(@D)/debian/patches/00list`; do \ - cat $(@D)/debian/patches/$$i | patch -p1 -d $(@D); \ - done - toolchain/patch-kernel.sh $(@D) boot/grub2 grub-\*.patch - touch $@ - -$(GRUB2_DIR)/.configured: $(GRUB2_DIR)/.unpacked - (cd $(GRUB2_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) ; \ - ./autogen.sh ; \ - $(TARGET_CONFIGURE_OPTS) \ - $(TARGET_CONFIGURE_ARGS) \ - CPPFLAGS="$(GRUB2_CFLAGS)" \ - grub_cv_i386_check_nested_functions=no \ - ./configure $(QUIET) \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/ \ - --mandir=/usr/man \ - --infodir=/usr/info \ - --disable-grub-mkfont \ - --disable-grub-fstest \ - --disable-grub-emu-usb \ - --disable-werror \ - $(DISABLE_LARGEFILE) \ - $(GRUB2_CONFIG-y) \ - ) - touch $@ - -$(GRUB2_DIR)/.compiled: $(GRUB2_DIR)/.configured - $(MAKE) CC="$(TARGET_CC)" -C $(@D) - touch $@ - -$(GRUB2_DIR)/.installed: $(GRUB2_DIR)/.compiled - $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install - touch $@ - -grub2: host-automake host-autoconf $(GRUB2_DIR)/.installed - -grub2-clean: - $(MAKE) DESTDIR=$(TARGET_DIR) CC="$(TARGET_CC)" -C $(GRUB2_DIR) uninstall - -$(MAKE) -C $(GRUB2_DIR) clean - -grub2-dirclean: - rm -rf $(GRUB2_DIR) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_TARGET_GRUB2),y) -TARGETS+=grub2 -endif diff --git a/boot/lpc32xxcdl/Config.in b/boot/lpc32xxcdl/Config.in new file mode 100644 index 0000000000..ce7589c35c --- /dev/null +++ b/boot/lpc32xxcdl/Config.in @@ -0,0 +1,10 @@ +config BR2_TARGET_LPC32XXCDL + depends on BR2_arm926t + bool "LPC32XX CDL (kickstart and S1L)" + +if BR2_TARGET_LPC32XXCDL + +config BR2_TARGET_LPC32XXCDL_BOARDNAME + string "LPC32xx board name" + +endif #BR2_TARGET_LPC32XXCDL diff --git a/boot/lpc32xxcdl/lpc32xxcdl-2.11-compiler_name.patch b/boot/lpc32xxcdl/lpc32xxcdl-2.11-compiler_name.patch new file mode 100644 index 0000000000..6aecbdeba6 --- /dev/null +++ b/boot/lpc32xxcdl/lpc32xxcdl-2.11-compiler_name.patch @@ -0,0 +1,52 @@ +Use CROSS_COMPILE as compiler name and stop using libc + +Signed-off-by: Alexandre Belloni +--- + makerule/lpc32xx/make.lpc32xx.gnu | 22 +++++++++++----------- + 1 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/makerule/lpc32xx/make.lpc32xx.gnu b/makerule/lpc32xx/make.lpc32xx.gnu +index 1014c28..3277d99 100644 +--- a/makerule/lpc32xx/make.lpc32xx.gnu ++++ b/makerule/lpc32xx/make.lpc32xx.gnu +@@ -27,19 +27,19 @@ CFLAGS += -mno-sched-prolog -fno-hosted -mno-thumb-interwork -ffunction-sectio + CFLAGS += -I$(CSP_INC_DIR) -I$(BSP_INC_DIR) -I$(GEN_INC_DIR) + AFLAGS = -mcpu=arm926ej-s + AFLAGS += -I$(CSP_INC_DIR) -I$(BSP_INC_DIR) -I$(GEN_INC_DIR) +-CC = arm-none-eabi-gcc +-AS = arm-none-eabi-as +-AR = arm-none-eabi-ar -r +-LD = arm-none-eabi-gcc +-NM = arm-none-eabi-nm +-OBJDUMP = arm-none-eabi-objdump +-OBJCOPY = arm-none-eabi-objcopy +-READELF = arm-none-eabi-readelf ++CC = $(CROSS_COMPILE)gcc ++AS = $(CROSS_COMPILE)as ++AR = $(CROSS_COMPILE)ar -r ++LD = $(CROSS_COMPILE)gcc ++NM = $(CROSS_COMPILE)nm ++OBJDUMP = $(CROSS_COMPILE)objdump ++OBJCOPY = $(CROSS_COMPILE)objcopy ++READELF = $(CROSS_COMPILE)readelf + LDFLAGS += -Wl,--gc-sections + + LK = -static + LK += -Wl,--start-group $(TARGET_CSP_LIB) $(TARGET_BSP_LIB) $(TARGET_GEN_LIB) +-LK += -lgcc -lc -lg -lm -lstdc++ -lsupc++ ++LK += -nostdlib -lgcc #-lc -lg -lm -lstdc++ -lsupc++ + LK += -Wl,--end-group + MAP = -Xlinker -Map -Xlinker + LDESC = -Xlinker -T +@@ -47,6 +47,6 @@ ENTRY = -e + BIN = -bin + EXT = .elf + LEXT = +-ELFTOREC =arm-none-eabi-objcopy -O srec --strip-all --verbose +-ELFTOBIN =arm-none-eabi-objcopy -I elf32-littlearm -O binary --strip-all --verbose ++ELFTOREC = $(OBJCOPY) -O srec --strip-all --verbose ++ELFTOBIN = $(OBJCOPY) -I elf32-littlearm -O binary --strip-all --verbose + REC =.srec +-- +1.7.7.3 + diff --git a/boot/lpc32xxcdl/lpc32xxcdl-2.11-delete_redundant_files.patch b/boot/lpc32xxcdl/lpc32xxcdl-2.11-delete_redundant_files.patch new file mode 100644 index 0000000000..39966f01e9 --- /dev/null +++ b/boot/lpc32xxcdl/lpc32xxcdl-2.11-delete_redundant_files.patch @@ -0,0 +1,969 @@ +Remove duplicated files to stop the linker from complaining about duplicate +symbols + +Signed-off-by: Alexandre Belloni +--- +--- a/csps/lpc32xx/bsps/fdi3250/startup/examples/s1l/sysapi_timer.c 2011-10-05 19:10:37.000000000 +0200 ++++ /dev/null 2012-01-01 16:39:47.918907000 +0100 +@@ -1,212 +0,0 @@ +-/*********************************************************************** +- * $Id:: sysapi_timer.c 3394 2010-05-06 17:56:27Z usb10132 $ +- * +- * Project: Time support functions +- * +- * Description: +- * Implements the following functions required for the S1L API +- * time_init +- * time_reset +- * time_start +- * time_stop +- * time_get +- * time_get_rate +- * +- *********************************************************************** +- * Software that is described herein is for illustrative purposes only +- * which provides customers with programming information regarding the +- * products. This software is supplied "AS IS" without any warranties. +- * NXP Semiconductors assumes no responsibility or liability for the +- * use of the software, conveys no license or title under any patent, +- * copyright, or mask work right to the product. NXP Semiconductors +- * reserves the right to make changes in the software without +- * notification. NXP Semiconductors also make no representation or +- * warranty that such application will be suitable for the specified +- * use without further testing or modification. +- **********************************************************************/ +- +-#include "s1l_sys_inf.h" +-#include "lpc32xx_intc_driver.h" +-#include "lpc32xx_timer_driver.h" +- +-static UNS_64 base_rate; +-static INT_32 tdev = 0; +- +-/*********************************************************************** +- * +- * Function: time_init +- * +- * Purpose: Initializes time system +- * +- * Processing: Initializes the system timer. +- * +- * Parameters: None +- * +- * Outputs: None +- * +- * Returns: 0 if the init failed, otherwise non-zero +- * +- * Notes: None +- * +- **********************************************************************/ +-INT_32 time_init(void) +-{ +- TMR_PSCALE_SETUP_T pscale; +- +- /* Open timer driver */ +- if (tdev == 0) +- { +- tdev = timer_open((void *) TIMER_CNTR0, 0); +- if (tdev != 0) +- { +- /* Use a prescale count to 100000 */ +- pscale.ps_tick_val = 100000; +- pscale.ps_us_val = 0; /* Not needed when ps_tick_val != 0 */ +- timer_ioctl(tdev, TMR_SETUP_PSCALE, (INT_32) &pscale); +- +- /* Get timer clock rate */ +- base_rate = (UNS_64) timer_ioctl(tdev, TMR_GET_STATUS, +- TMR_GET_CLOCK); +- } +- } +- +- return tdev; +-} +- +-/*********************************************************************** +- * +- * Function: time_reset +- * +- * Purpose: Resets system timer +- * +- * Processing: +- * See function. +- * +- * Parameters: None +- * +- * Outputs: None +- * +- * Returns: Nothing +- * +- * Notes: None +- * +- **********************************************************************/ +-void time_reset(void) +-{ +- if (tdev != 0) +- { +- timer_ioctl(tdev, TMR_RESET, 1); +- } +-} +- +-/*********************************************************************** +- * +- * Function: time_start +- * +- * Purpose: Starts system timer +- * +- * Processing: +- * See function. +- * +- * Parameters: None +- * +- * Outputs: None +- * +- * Returns: Nothing +- * +- * Notes: None +- * +- **********************************************************************/ +-void time_start(void) +-{ +- if (tdev != 0) +- { +- timer_ioctl(tdev, TMR_ENABLE, 1); +- } +-} +- +-/*********************************************************************** +- * +- * Function: time_stop +- * +- * Purpose: Stops system timer +- * +- * Processing: +- * See function. +- * +- * Parameters: None +- * +- * Outputs: None +- * +- * Returns: Nothing +- * +- * Notes: None +- * +- **********************************************************************/ +-void time_stop(void) +-{ +- if (tdev != 0) +- { +- timer_ioctl(tdev, TMR_ENABLE, 0); +- } +-} +- +-/*********************************************************************** +- * +- * Function: time_get +- * +- * Purpose: Returns current system time value +- * +- * Processing: +- * See function. +- * +- * Parameters: None +- * +- * Outputs: None +- * +- * Returns: The number of ticks of the timer counter +- * +- * Notes: None +- * +- **********************************************************************/ +-UNS_64 time_get(void) +-{ +- TMR_COUNTS_T tcounts; +- UNS_64 ticks = 0; +- +- if (tdev != 0) +- { +- timer_ioctl(tdev, TMR_GET_COUNTS, (INT_32) &tcounts); +- +- /* Compute number of timer ticks */ +- ticks = (UNS_64) tcounts.count_val * 100000; +- ticks = ticks + (UNS_64) tcounts.ps_count_val; +- } +- +- return ticks; +-} +- +-/*********************************************************************** +- * +- * Function: time_get_rate +- * +- * Purpose: +- * Returns base tick rate (ticks per second) of the time counter +- * +- * Processing: +- * See function. +- * +- * Parameters: None +- * +- * Outputs: None +- * +- * Returns: The timer tick rate (in ticks per second) +- * +- * Notes: None +- * +- **********************************************************************/ +-UNS_64 time_get_rate(void) +-{ +- return base_rate; +-} +- +--- a/csps/lpc32xx/bsps/fdi3250/startup/examples/s1l/sys_mmu_cmd_group.c 2011-10-05 19:10:37.000000000 +0200 ++++ /dev/null 2012-01-01 16:39:47.918907000 +0100 +@@ -1,746 +0,0 @@ +-/*********************************************************************** +- * $Id:: sys_mmu_cmd_group.c 3430 2010-05-07 17:39:08Z usb10132 $ +- * +- * Project: Command processor for peek, poke, dump, and fill +- * +- * Description: +- * Processes commands from the command prompt +- * +- *********************************************************************** +- * Software that is described herein is for illustrative purposes only +- * which provides customers with programming information regarding the +- * products. This software is supplied "AS IS" without any warranties. +- * NXP Semiconductors assumes no responsibility or liability for the +- * use of the software, conveys no license or title under any patent, +- * copyright, or mask work right to the product. NXP Semiconductors +- * reserves the right to make changes in the software without +- * notification. NXP Semiconductors also make no representation or +- * warranty that such application will be suitable for the specified +- * use without further testing or modification. +- **********************************************************************/ +- +-#include "lpc_arm922t_cp15_driver.h" +-#include "lpc_string.h" +-#include "startup.h" +-#include "s1l_cmds.h" +-#include "s1l_sys_inf.h" +- +-/* dcache command */ +-BOOL_32 cmd_dcache(void); +-static UNS_32 cmd_dcache_plist[] = +-{ +- (PARSE_TYPE_STR), /* The "dcache" command */ +- (PARSE_TYPE_DEC | PARSE_TYPE_END) +-}; +-static CMD_ROUTE_T core_dcache_cmd = +-{ +- (UNS_8 *) "dcache", +- cmd_dcache, +- (UNS_8 *) "Enables, disables, or flushes data cache", +- (UNS_8 *) "dcache [0(disable), 1(enable), 2(flush)]", +- cmd_dcache_plist, +- NULL +-}; +- +-/* icache command */ +-BOOL_32 cmd_icache(void); +-static UNS_32 cmd_icache_plist[] = +-{ +- (PARSE_TYPE_STR), /* The "icache" command */ +- (PARSE_TYPE_DEC | PARSE_TYPE_END) +-}; +-static CMD_ROUTE_T core_icache_cmd = +-{ +- (UNS_8 *) "icache", +- cmd_icache, +- (UNS_8 *) "Enables or disables instruction cache", +- (UNS_8 *) "icache [0(disable), 1(enable)]", +- cmd_icache_plist, +- NULL +-}; +- +-/* inval command */ +-BOOL_32 cmd_inval(void); +-static UNS_32 cmd_inval_plist[] = +-{ +- (PARSE_TYPE_STR | PARSE_TYPE_END) /* The "inval" command */ +-}; +-static CMD_ROUTE_T core_inval_cmd = +-{ +- (UNS_8 *) "inval", +- cmd_inval, +- (UNS_8 *) "Flushes data cache and invalidates instruction cache", +- (UNS_8 *) "inval", +- cmd_inval_plist, +- NULL +-}; +- +-/* mmuenab command */ +-BOOL_32 cmd_mmuenab(void); +-static UNS_32 cmd_mmuenab_plist[] = +-{ +- (PARSE_TYPE_STR), /* The "mmuenab" command */ +- (PARSE_TYPE_DEC | PARSE_TYPE_END) +-}; +-static CMD_ROUTE_T core_mmuenab_cmd = +-{ +- (UNS_8 *) "mmuenab", +- cmd_mmuenab, +- (UNS_8 *) "Enables or disables the MMU", +- (UNS_8 *) "mmuenab [0(disable), 1(enable)]", +- cmd_mmuenab_plist, +- NULL +-}; +- +-/* map command */ +-BOOL_32 cmd_map(void); +-static UNS_32 cmd_map_plist[] = +-{ +- (PARSE_TYPE_STR), /* The "map" command */ +- (PARSE_TYPE_HEX), +- (PARSE_TYPE_HEX), +- (PARSE_TYPE_DEC), +- (PARSE_TYPE_DEC | PARSE_TYPE_END), +-}; +-static CMD_ROUTE_T core_map_cmd = +-{ +- (UNS_8 *) "map", +- cmd_map, +- (UNS_8 *) "Maps a range of physical address sections to virtual addresses", +- (UNS_8 *) "map [virt hex addr][phy hex addr][sections][0(uncached), 1(cached), 2(unmap)]", +- cmd_map_plist, +- NULL +-}; +- +-/* mmuinfo command */ +-static BOOL_32 cmd_mmuinfo(void); +-static UNS_32 cmd_mmuinfo_plist[] = +-{ +- (PARSE_TYPE_STR | PARSE_TYPE_END) /* The "mmuinfo" command */ +-}; +-static CMD_ROUTE_T core_mmuinfo_cmd = +-{ +- (UNS_8 *) "mmuinfo", +- cmd_mmuinfo, +- (UNS_8 *) "Dumps page table and MMU info", +- (UNS_8 *) "mmuinfo", +- cmd_mmuinfo_plist, +- NULL +-}; +- +-/* MMU group */ +-static GROUP_LIST_T mmu_group = +-{ +- (UNS_8 *) "mmu", /* mmu group */ +- (UNS_8 *) "MMU command group", +- NULL, +- NULL +-}; +- +-static UNS_8 enabled_msg [] =" enabled"; +-static UNS_8 disabled_msg [] =" disabled"; +-static UNS_8 dcache_msg[] = "Data cache"; +-static UNS_8 icache_msg[] = "Instruction cache"; +-static UNS_8 pagetab_msg[] = "Page table at address: "; +-static UNS_8 slist_msg[] = "Type Virt Phy fl Size"; +-static UNS_8 mmu_msg [] ="MMU"; +-static UNS_8 cpage_msg[] = "Coarse page:"; +-static UNS_8 fpage_msg[] = "Fine page :"; +-static UNS_8 sect_msg[] = "Section :"; +-static UNS_8 mbytes_msg[] = "M"; +-static UNS_8 map1_err_msg[] = +- "Error : section addresses must be aligned on a 32-bit boundary"; +-static UNS_8 map2_err_msg[] = +- "Error : Number of sections exceeds address range of device"; +-static UNS_8 phya_msg[] = "Virtual address "; +-static UNS_8 mapped_msg[] = " mapped to physical address "; +-static UNS_8 unmapped_msg[] = " unmapped from physical address "; +-static UNS_8 cached_msg[] = " (cached)"; +-static UNS_8 inval_msg[] = " invalidated"; +-static UNS_8 caches_msg [] ="Caches"; +-static UNS_8 flushed_msg[] = " flushed"; +- +-/*********************************************************************** +- * +- * Function: show_section +- * +- * Purpose: Display section information +- * +- * Processing: +- * See function. +- * +- * Parameters: +- * mmu_reg : MMU settings for this section +- * virt_addr : Starting virtual address for this section +- * segs : Number of 1M segments for this section +- * +- * Outputs: None +- * +- * Returns: Nothing +- * +- * Notes: None +- * +- **********************************************************************/ +-static void show_section(UNS_32 mmu_reg, +- UNS_32 virt_addr, +- UNS_32 segs) +-{ +- UNS_8 straddr [16]; +- UNS_32 mmu_phy; +- +- if ((mmu_reg & ARM922T_L1D_TYPE_PG_SN_MASK) != +- ARM922T_L1D_TYPE_FAULT) +- { +- if ((mmu_reg & ARM922T_L1D_TYPE_PG_SN_MASK) == +- ARM922T_L1D_TYPE_CPAGE) +- { +- term_dat_out(cpage_msg); +- } +- else if ((mmu_reg & ARM922T_L1D_TYPE_PG_SN_MASK) == +- ARM922T_L1D_TYPE_FPAGE) +- { +- term_dat_out(fpage_msg); +- } +- else +- { +- term_dat_out(sect_msg); +- } +- +- /* Compute virtual address */ +- str_makehex(straddr, virt_addr, 8); +- term_dat_out(straddr); +- term_dat_out((UNS_8 *) " "); +- +- /* Compute mapped physical address */ +- if ((mmu_reg & ARM922T_L1D_TYPE_PG_SN_MASK) == +- ARM922T_L1D_TYPE_SECTION) +- { +- mmu_phy = mmu_reg & 0xFFF00000; +- } +- else +- { +- /* Don't compute addresses for non-sections */ +- mmu_phy = 0; +- } +- str_makehex(straddr, mmu_phy, 8); +- term_dat_out(straddr); +- term_dat_out((UNS_8 *) " "); +- +- /* MMU flags */ +- if ((mmu_reg & ARM922T_L1D_BUFFERABLE) != 0) +- { +- term_dat_out((UNS_8 *) "b"); +- } +- else +- { +- term_dat_out((UNS_8 *) " "); +- } +- if ((mmu_reg & ARM922T_L1D_CACHEABLE) != 0) +- { +- term_dat_out((UNS_8 *) "c"); +- } +- else +- { +- term_dat_out((UNS_8 *) " "); +- } +- term_dat_out((UNS_8 *) " "); +- +- /* Displays used megabytes */ +- str_makedec(straddr, segs); +- term_dat_out(straddr); +- term_dat_out_crlf(mbytes_msg); +- } +-} +- +-/*********************************************************************** +- * +- * Function: mmu_dumpinfo +- * +- * Purpose: Display MMU info +- * +- * Processing: +- * Display the MMU information, including enable status, cache +- * status, and page table. +- * +- * Parameters: None +- * +- * Outputs: None +- * +- * Returns: TRUE if the command was processed, otherwise FALSE +- * +- * Notes: None +- * +- **********************************************************************/ +-static BOOL_32 mmu_dumpinfo(void) +-{ +- UNS_32 segsz, last_mmu_reg, mmu_vrt, mmu_reg, mmu_vrtsav = 0, *pt; +- UNS_32 mlast_mmu_reg, mmmu_reg; +- int idx; +- UNS_8 hexaddr [16]; +- +- term_dat_out(mmu_msg); +- if (cp15_mmu_enabled() == FALSE) +- { +- term_dat_out_crlf(disabled_msg); +- } +- else +- { +- term_dat_out_crlf(enabled_msg); +- +- /* Get MMU control register word */ +- mmu_reg = cp15_get_mmu_control_reg(); +- +- /* Instruction cache status */ +- term_dat_out(icache_msg); +- if ((mmu_reg & ARM922T_MMU_CONTROL_I) == 0) +- { +- term_dat_out_crlf(disabled_msg); +- } +- else +- { +- term_dat_out_crlf(enabled_msg); +- } +- +- /* Data cache status */ +- term_dat_out(dcache_msg); +- if ((mmu_reg & ARM922T_MMU_CONTROL_C) == 0) +- { +- term_dat_out_crlf(disabled_msg); +- } +- else +- { +- term_dat_out_crlf(enabled_msg); +- } +- +- term_dat_out(pagetab_msg); +- mmu_reg = (UNS_32) cp15_get_ttb(); +- str_makehex(hexaddr, mmu_reg, 8); +- term_dat_out_crlf(hexaddr); +- term_dat_out_crlf(slist_msg); +- +- /* Process MMU table - assume that the physical and +- virtual locations of table are the same */ +- pt = (UNS_32 *) mmu_reg; +- mmu_vrt = 0x0; +- segsz = 0xFFFFFFFF; +- last_mmu_reg = mlast_mmu_reg = 0xFFFFFFFF; +- for (idx = 0; idx < 4096; idx++) +- { +- mmu_reg = *pt; +- mmmu_reg = (mmu_reg & (ARM922T_L1D_TYPE_PG_SN_MASK | +- ARM922T_L1D_BUFFERABLE | ARM922T_L1D_CACHEABLE)); +- segsz = segsz + 1; +- +- if ((last_mmu_reg != 0xFFFFFFFF) && +- (mlast_mmu_reg != mmmu_reg)) +- { +- show_section(last_mmu_reg, mmu_vrtsav, segsz); +- segsz = 0; +- } +- +- if (mlast_mmu_reg != mmmu_reg) +- { +- mmu_vrtsav = mmu_vrt; +- last_mmu_reg = mmu_reg; +- mlast_mmu_reg = mmmu_reg; +- } +- +- pt++; +- mmu_vrt += 0x00100000; +- } +- } +- +- return TRUE; +-} +- +-/*********************************************************************** +- * +- * Function: mmu_dumpmap +- * +- * Purpose: Map a virtual address range to a physical range +- * +- * Processing: +- * From the input addresses and number of sections, generate the +- * appropriate entries in the page table. +- * +- * Parameters: None +- * +- * Outputs: None +- * +- * Returns: TRUE if the command was processed, otherwise FALSE +- * +- * Notes: None +- * +- **********************************************************************/ +-static BOOL_32 mmu_dumpmap(UNS_32 vrt, +- UNS_32 phy, +- UNS_32 sections, +- UNS_32 cache) +-{ +- BOOL_32 processed = FALSE; +- UNS_32 mmu_phy, mmu_vrt, tmp1 = 0, tmp2, *pt; +- UNS_8 hexaddr [16]; +- +- /* Verify address boundaries are sectional */ +- mmu_vrt = vrt & ~ARM922T_L2D_SN_BASE_MASK; +- mmu_phy = phy & ~ARM922T_L2D_SN_BASE_MASK; +- if ((mmu_vrt != 0) || (mmu_phy != 0)) +- { +- term_dat_out_crlf(map1_err_msg); +- } +- else +- { +- /* Verify that address range and section count will not +- exceed address range of device */ +- tmp1 = vrt >> 20; +- tmp1 = (tmp1 + sections) - 1; +- tmp2 = phy >> 20; +- tmp2 = (tmp2 + sections) - 1; +- if ((tmp1 < 4096) && (tmp2 < 4096)) +- { +- /* Good address range and good section count */ +- processed = TRUE; +- } +- else +- { +- term_dat_out_crlf(map2_err_msg); +- } +- } +- +- /* Generate static part of MMU word */ +- if (cache == 0) +- { +- /* Section mapped with cache disabled */ +- tmp1 = ARM922T_L1D_TYPE_SECTION; +- } +- else if (cache == 1) +- { +- /* Section mapped with cache enabled */ +- tmp1 = (ARM922T_L1D_BUFFERABLE | ARM922T_L1D_CACHEABLE | +- ARM922T_L1D_TYPE_SECTION); +- } +- else if (cache == 2) +- { +- /* Section unmapped */ +- tmp1 = ARM922T_L1D_TYPE_FAULT; +- } +- tmp1 |= ARM922T_L1D_AP_ALL; +- +- /* Offset into page table for virtual address */ +- tmp2 = (vrt >> 20); +- pt = cp15_get_ttb() + tmp2; +- +- /* Loop until all sections are complete */ +- while ((sections > 0) && (processed == TRUE)) +- { +- /* Add in physical address */ +- tmp2 = tmp1 | (phy & ARM922T_L2D_SN_BASE_MASK); +- +- /* Save new section descriptor for virtual address */ +- *pt = tmp2; +- +- /* Output message shown the map */ +- term_dat_out(phya_msg); +- str_makehex(hexaddr, phy, 8); +- term_dat_out(hexaddr); +- if (cache == 2) +- { +- term_dat_out(unmapped_msg); +- } +- else +- { +- term_dat_out(mapped_msg); +- } +- str_makehex(hexaddr, vrt, 8); +- term_dat_out(hexaddr); +- if (cache == 1) +- { +- term_dat_out(cached_msg); +- } +- term_dat_out_crlf((UNS_8 *) ""); +- +- /* Next section and page table entry*/ +- phy += 0x00100000; +- vrt += 0x00100000; +- pt++; +- sections--; +- } +- +- return processed; +-} +- +-/*********************************************************************** +- * +- * Function: cmd_mmuinfo +- * +- * Purpose: Display MMU information +- * +- * Processing: +- * See function. +- * +- * Parameters: None +- * +- * Outputs: None +- * +- * Returns: TRUE if the command was processed, otherwise FALSE +- * +- * Notes: None +- * +- **********************************************************************/ +-static BOOL_32 cmd_mmuinfo(void) +-{ +- mmu_dumpinfo(); +- +- return TRUE; +-} +- +-/*********************************************************************** +- * +- * Function: cmd_map +- * +- * Purpose: Map a physical address region to a virtual region +- * +- * Processing: +- * See function. +- * +- * Parameters: None +- * +- * Outputs: None +- * +- * Returns: TRUE if the command was processed, otherwise FALSE +- * +- * Notes: None +- * +- **********************************************************************/ +-BOOL_32 cmd_map(void) +-{ +- UNS_32 phy, virt, sects, ce = 0; +- +- /* Get arguments */ +- virt = cmd_get_field_val(1); +- phy = cmd_get_field_val(2); +- sects = cmd_get_field_val(3); +- ce = cmd_get_field_val(4); +- +- if (ce <= 2) +- { +- mmu_dumpmap(virt, phy, sects, ce); +- } +- +- return TRUE; +-} +- +-/*********************************************************************** +- * +- * Function: cmd_inval +- * +- * Purpose: MMU cache flush and invalidate +- * +- * Processing: +- * See function. +- * +- * Parameters: None +- * +- * Outputs: None +- * +- * Returns: TRUE if the command was processed, otherwise FALSE +- * +- * Notes: None +- * +- **********************************************************************/ +-BOOL_32 cmd_inval(void) +-{ +- dcache_flush(); +- icache_inval(); +- term_dat_out(caches_msg); +- term_dat_out(inval_msg); +- +- return TRUE; +-} +- +-/*********************************************************************** +- * +- * Function: cmd_dcache +- * +- * Purpose: MMU data cache enable and disable +- * +- * Processing: +- * If the value passed in the parser is 1, enable the data cache, +- * otherwise disable the data cache. +- * +- * Parameters: None +- * +- * Outputs: None +- * +- * Returns: TRUE if the command was processed, otherwise FALSE +- * +- * Notes: None +- * +- **********************************************************************/ +-BOOL_32 cmd_dcache(void) +-{ +- UNS_32 cenable; +- UNS_8 *ppar; +- +- /* Get argument */ +- cenable = cmd_get_field_val(1); +- +- switch (cenable) +- { +- case 0: +- dcache_flush(); +- cp15_set_dcache(0); +- ppar = disabled_msg; +- break; +- +- case 1: +- cp15_invalidate_cache(); +- cp15_set_dcache(1); +- ppar = enabled_msg; +- break; +- +- case 2: +- default: +- dcache_flush(); +- ppar = flushed_msg; +- break; +- } +- +- term_dat_out(dcache_msg); +- term_dat_out_crlf(ppar); +- +- return TRUE; +-} +- +-/*********************************************************************** +- * +- * Function: cmd_icache +- * +- * Purpose: MMU instruction cache enable and disable +- * +- * Processing: +- * If the value passed in the parser is 1, enable the instruction +- * cache, otherwise disable the instruction cache. +- * +- * Parameters: None +- * +- * Outputs: None +- * +- * Returns: TRUE if the command was processed, otherwise FALSE +- * +- * Notes: None +- * +- **********************************************************************/ +-BOOL_32 cmd_icache(void) +-{ +- UNS_32 cenable; +- UNS_8 *ppar; +- +- /* Get argument */ +- cenable = cmd_get_field_val(1); +- +- if (cenable == 1) +- { +- dcache_flush(); +- cp15_invalidate_cache(); +- cp15_set_icache(1); +- ppar = enabled_msg; +- } +- else +- { +- cp15_set_icache(0); +- ppar = disabled_msg; +- } +- +- term_dat_out(icache_msg); +- term_dat_out_crlf(ppar); +- +- return TRUE; +-} +- +- +-/*********************************************************************** +- * +- * Function: cmd_mmuenab +- * +- * Purpose: Enable or disable MMU +- * +- * Processing: +- * See function. +- * +- * Parameters: None +- * +- * Outputs: None +- * +- * Returns: TRUE if the command was processed, otherwise FALSE +- * +- * Notes: None +- * +- **********************************************************************/ +-BOOL_32 cmd_mmuenab(void) +-{ +- UNS_8 *ppar; +- UNS_32 cenable; +- +- term_dat_out_crlf((UNS_8 *) "Warning: Changing MMU status on " +- " cached and buffered code can cause system crashes."); +- +- /* Get argument */ +- cenable = cmd_get_field_val(1); +- +- if (cenable == 1) +- { +- if ((cp15_get_mmu_control_reg() & ARM922T_MMU_CONTROL_C) != 0) +- { +- cp15_invalidate_cache(); +- } +- +- cp15_set_mmu(1); +- ppar = enabled_msg; +- } +- else +- { +- cp15_dcache_flush(); +- cp15_write_buffer_flush(); +- cp15_invalidate_cache(); +- cp15_set_mmu(0); +- ppar = disabled_msg; +- } +- +- term_dat_out(mmu_msg); +- term_dat_out_crlf(ppar); +- +- return TRUE; +-} +- +-/*********************************************************************** +- * +- * Function: mmu_cmd_group_init +- * +- * Purpose: Initialize MMU command group +- * +- * Processing: +- * See function. +- * +- * Parameters: None +- * +- * Outputs: None +- * +- * Returns: Nothin +- * +- * Notes: None +- * +- **********************************************************************/ +-void mmu_cmd_group_init(void) +-{ +- /* Add MMU group */ +- cmd_add_group(&mmu_group); +- +- /* Add commands to the MMU group */ +- cmd_add_new_command(&mmu_group, &core_dcache_cmd); +- cmd_add_new_command(&mmu_group, &core_icache_cmd); +- cmd_add_new_command(&mmu_group, &core_inval_cmd); +- cmd_add_new_command(&mmu_group, &core_mmuenab_cmd); +- cmd_add_new_command(&mmu_group, &core_map_cmd); +- cmd_add_new_command(&mmu_group, &core_mmuinfo_cmd); +-} diff --git a/boot/lpc32xxcdl/lpc32xxcdl-2.11-libnosys_gnu.patch b/boot/lpc32xxcdl/lpc32xxcdl-2.11-libnosys_gnu.patch new file mode 100644 index 0000000000..cfd77bead6 --- /dev/null +++ b/boot/lpc32xxcdl/lpc32xxcdl-2.11-libnosys_gnu.patch @@ -0,0 +1,188 @@ +Fix compilation and eabi issues + +Since we are not linking with libc anymore, we need to define our own memset, +strlen and memcpy. Also, as we are using a *libc compiler, we need to "handle" +exceptions (mostly division by 0) by defining raise() and +__aeabi_unwind_cpp_pr0. + +Signed-off-by: Alexandre Belloni +--- + csps/lpc32xx/bsps/ea3250/source/libnosys_gnu.c | 41 +++++++++++++++++++++++ + csps/lpc32xx/bsps/fdi3250/source/libnosys_gnu.c | 41 +++++++++++++++++++++++ + csps/lpc32xx/bsps/phy3250/source/libnosys_gnu.c | 41 +++++++++++++++++++++++ + 3 files changed, 123 insertions(+), 0 deletions(-) + +diff --git a/csps/lpc32xx/bsps/ea3250/source/libnosys_gnu.c b/csps/lpc32xx/bsps/ea3250/source/libnosys_gnu.c +index 385b0ab..f1f0a0a 100644 +--- a/csps/lpc32xx/bsps/ea3250/source/libnosys_gnu.c ++++ b/csps/lpc32xx/bsps/ea3250/source/libnosys_gnu.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + /* errno definition */ + #undef errno +@@ -125,4 +126,44 @@ int _write(int file, char *ptr, int len){ + return 0; + } + ++void * memset(void * s,int c,size_t count) ++{ ++ char *xs = (char *) s; ++ ++ while (count--) ++ *xs++ = c; ++ ++ return s; ++} ++ ++ ++size_t strlen(const char * s) ++{ ++ const char *sc; ++ ++ for (sc = s; *sc != '\0'; ++sc) ++ /* nothing */; ++ return sc - s; ++} ++ ++void * memcpy(void * dest,const void *src,size_t count) ++{ ++ char *tmp = (char *) dest, *s = (char *) src; ++ ++ while (count--) ++ *tmp++ = *s++; ++ ++ return dest; ++} ++ ++ ++/* Dummy functions to avoid linker complaints */ ++void __aeabi_unwind_cpp_pr0(void) ++{ ++}; ++ ++void raise(void) ++{ ++}; ++ + #endif /*__GNUC__*/ +diff --git a/csps/lpc32xx/bsps/fdi3250/source/libnosys_gnu.c b/csps/lpc32xx/bsps/fdi3250/source/libnosys_gnu.c +index 385b0ab..f1f0a0a 100644 +--- a/csps/lpc32xx/bsps/fdi3250/source/libnosys_gnu.c ++++ b/csps/lpc32xx/bsps/fdi3250/source/libnosys_gnu.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + /* errno definition */ + #undef errno +@@ -125,4 +126,44 @@ int _write(int file, char *ptr, int len){ + return 0; + } + ++void * memset(void * s,int c,size_t count) ++{ ++ char *xs = (char *) s; ++ ++ while (count--) ++ *xs++ = c; ++ ++ return s; ++} ++ ++ ++size_t strlen(const char * s) ++{ ++ const char *sc; ++ ++ for (sc = s; *sc != '\0'; ++sc) ++ /* nothing */; ++ return sc - s; ++} ++ ++void * memcpy(void * dest,const void *src,size_t count) ++{ ++ char *tmp = (char *) dest, *s = (char *) src; ++ ++ while (count--) ++ *tmp++ = *s++; ++ ++ return dest; ++} ++ ++ ++/* Dummy functions to avoid linker complaints */ ++void __aeabi_unwind_cpp_pr0(void) ++{ ++}; ++ ++void raise(void) ++{ ++}; ++ + #endif /*__GNUC__*/ +diff --git a/csps/lpc32xx/bsps/phy3250/source/libnosys_gnu.c b/csps/lpc32xx/bsps/phy3250/source/libnosys_gnu.c +index cfdb674..6b50c60 100644 +--- a/csps/lpc32xx/bsps/phy3250/source/libnosys_gnu.c ++++ b/csps/lpc32xx/bsps/phy3250/source/libnosys_gnu.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + /* errno definition */ + #undef errno +@@ -125,4 +126,44 @@ int _write(int file, char *ptr, int len){ + return 0; + } + ++void * memset(void * s,int c,size_t count) ++{ ++ char *xs = (char *) s; ++ ++ while (count--) ++ *xs++ = c; ++ ++ return s; ++} ++ ++ ++size_t strlen(const char * s) ++{ ++ const char *sc; ++ ++ for (sc = s; *sc != '\0'; ++sc) ++ /* nothing */; ++ return sc - s; ++} ++ ++void * memcpy(void * dest,const void *src,size_t count) ++{ ++ char *tmp = (char *) dest, *s = (char *) src; ++ ++ while (count--) ++ *tmp++ = *s++; ++ ++ return dest; ++} ++ ++ ++/* Dummy functions to avoid linker complaints */ ++void __aeabi_unwind_cpp_pr0(void) ++{ ++}; ++ ++void raise(void) ++{ ++}; ++ + #endif /*__GNUC__*/ +-- +1.7.7.3 + diff --git a/boot/lpc32xxcdl/lpc32xxcdl-2.11-slashes.patch b/boot/lpc32xxcdl/lpc32xxcdl-2.11-slashes.patch new file mode 100644 index 0000000000..94c184780e --- /dev/null +++ b/boot/lpc32xxcdl/lpc32xxcdl-2.11-slashes.patch @@ -0,0 +1,521 @@ +Use slashes instead of backslashes + +Signed-off-by: Alexandre Belloni +--- + .../bsps/common/examples/buildfiles/makefile | 10 +++--- + .../startup/examples/burners/makefile.burner | 16 +++++----- + csps/lpc32xx/bsps/ea3250/source/makefile | 10 +++--- + csps/lpc32xx/bsps/fdi3250/source/makefile | 12 ++++---- + csps/lpc32xx/bsps/phy3250/examples/makefile | 2 +- + csps/lpc32xx/bsps/phy3250/source/makefile | 2 +- + .../examples/Burners/nor/kickstart/makefile | 2 +- + .../startup/examples/Burners/nor/norerase/makefile | 2 +- + .../startup/examples/Burners/nor/s1lapp/makefile | 2 +- + .../examples/Burners/spi/kickstart/makefile | 2 +- + csps/lpc32xx/source/makefile | 10 +++--- + lpc/source/makefile | 10 +++--- + makefile | 2 +- + makerule/common/make.rules.environment | 30 ++++++++++---------- + makerule/lpc32xx/make.lpc32xx.gnu | 2 +- + makerule/lpc32xx/make.lpc32xx.iar | 12 ++++---- + makerule/lpc32xx/make.lpc32xx.keil | 6 ++-- + makerule/lpc32xx/make.lpc32xx.rvw | 2 +- + 18 files changed, 67 insertions(+), 67 deletions(-) + +diff --git a/csps/lpc32xx/bsps/common/examples/buildfiles/makefile b/csps/lpc32xx/bsps/common/examples/buildfiles/makefile +index cf4977c..1da2201 100644 +--- a/csps/lpc32xx/bsps/common/examples/buildfiles/makefile ++++ b/csps/lpc32xx/bsps/common/examples/buildfiles/makefile +@@ -25,16 +25,16 @@ + # + ######################################################################## + +-include $(NXPMCU_SOFTWARE)\makerule\$(CSP)\make.$(CSP).$(TOOL) ++include $(NXPMCU_SOFTWARE)/makerule/$(CSP)/make.$(CSP).$(TOOL) + + ######################################################################## + # + # Pick up the assembler and C source files in the directory + # + ######################################################################## +-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.ftypes +-AFLAGS +=-I..\Include +-CFLAGS +=-I..\Include ++include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.ftypes ++AFLAGS +=-I../Include ++CFLAGS +=-I../Include + + ######################################################################## + # +@@ -42,6 +42,6 @@ CFLAGS +=-I..\Include + # + ######################################################################## + +-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.build ++include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.build + + +diff --git a/csps/lpc32xx/bsps/common/startup/examples/burners/makefile.burner b/csps/lpc32xx/bsps/common/startup/examples/burners/makefile.burner +index fca3947..18bd703 100644 +--- a/csps/lpc32xx/bsps/common/startup/examples/burners/makefile.burner ++++ b/csps/lpc32xx/bsps/common/startup/examples/burners/makefile.burner +@@ -22,9 +22,9 @@ + # + ######################################################################## + +-COMMON_BASE := $(NXPMCU_SOFTWARE)\csps\$(CSP)\bsps\common +-include $(NXPMCU_SOFTWARE)\makerule\$(CSP)\make.$(CSP).$(TOOL) +-include $(COMMON_BASE)\startup\examples\buildfiles\make.env ++COMMON_BASE := $(NXPMCU_SOFTWARE)/csps/$(CSP)/bsps/common ++include $(NXPMCU_SOFTWARE)/makerule/$(CSP)/make.$(CSP).$(TOOL) ++include $(COMMON_BASE)/startup/examples/buildfiles/make.env + + ######################################################################## + # ARM Realview +@@ -38,7 +38,7 @@ AFLAGS += --predefine "USE_ALL_STACKS SETL {TRUE}" + #AFLAGS += --predefine "RW_RELOC SETL {TRUE}" + + # This runs from IRAM +-LDSCRIPT =$(COMMON_BASE)\startup\examples\buildfiles\ldscript_iram_rvw.ld ++LDSCRIPT =$(COMMON_BASE)/startup/examples/buildfiles/ldscript_iram_rvw.ld + LDFLAGS = --remove + MAP = --map --info=totals,sizes,unused --symbols --list + endif +@@ -55,7 +55,7 @@ AFLAGS += --predefine "USE_ALL_STACKS SETL {TRUE}" + #AFLAGS += --predefine "RW_RELOC SETL {TRUE}" + + # This runs from IRAM +-LDSCRIPT =$(COMMON_BASE)\startup\examples\buildfiles\ldscript_iram_rvw.ld ++LDSCRIPT =$(COMMON_BASE)/startup/examples/buildfiles/ldscript_iram_rvw.ld + LDFLAGS = --remove + MAP = --map --info=totals,sizes,unused --symbols --list + endif +@@ -72,7 +72,7 @@ AFLAGS += --defsym USE_ALL_STACKS=1 + #AFLAGS += --defsym RW_RELOC=1 + + # This runs from IRAM +-LDSCRIPT =$(COMMON_BASE)\startup\examples\buildfiles\ldscript_iram_gnu.ld ++LDSCRIPT =$(COMMON_BASE)/startup/examples/buildfiles/ldscript_iram_gnu.ld + + endif + +@@ -108,7 +108,7 @@ endif + # Pick up the assembler and C source files in the directory + # + ######################################################################## +-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.ftypes ++include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.ftypes + + ######################################################################## + # +@@ -157,6 +157,6 @@ endif + # + ######################################################################## + +-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.build ++include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.build + + .PHONY: debug bin +diff --git a/csps/lpc32xx/bsps/ea3250/source/makefile b/csps/lpc32xx/bsps/ea3250/source/makefile +index 7cada25..2899b20 100644 +--- a/csps/lpc32xx/bsps/ea3250/source/makefile ++++ b/csps/lpc32xx/bsps/ea3250/source/makefile +@@ -22,16 +22,16 @@ + # + ######################################################################## + +-include $(NXPMCU_SOFTWARE)\makerule\$(CSP)\make.$(CSP).$(TOOL) ++include $(NXPMCU_SOFTWARE)/makerule/$(CSP)/make.$(CSP).$(TOOL) + + ######################################################################## + # + # Pick up the assembler and C source files in the directory + # + ######################################################################## +-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.ftypes +-AFLAGS +=-I..\Include +-CFLAGS +=-I..\Include ++include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.ftypes ++AFLAGS +=-I../Include ++CFLAGS +=-I../Include + + ######################################################################## + # +@@ -64,7 +64,7 @@ realclean: lib_realclean + # + ######################################################################## + +-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.build ++include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.build + + .PHONY: all lib_clean lib_realclean + +diff --git a/csps/lpc32xx/bsps/fdi3250/source/makefile b/csps/lpc32xx/bsps/fdi3250/source/makefile +index 4e153bb..11e4b63 100644 +--- a/csps/lpc32xx/bsps/fdi3250/source/makefile ++++ b/csps/lpc32xx/bsps/fdi3250/source/makefile +@@ -22,16 +22,16 @@ + # + ######################################################################## + +-include $(NXPMCU_SOFTWARE)\makerule\$(CSP)\make.$(CSP).$(TOOL) ++include $(NXPMCU_SOFTWARE)/makerule/$(CSP)/make.$(CSP).$(TOOL) + + ######################################################################## + # + # Pick up the assembler and C source files in the directory + # + ######################################################################## +-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.ftypes +-AFLAGS +=-I..\Include +-CFLAGS +=-I..\Include ++include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.ftypes ++AFLAGS +=-I../Include ++CFLAGS +=-I../Include + + ######################################################################## + # +@@ -53,7 +53,7 @@ lib_clean: + # delete all targets this Makefile can make and all built libraries + # linked in + lib_realclean: +- -@$(RM) $(BSP_LIB_DIR)\*.a ++ -@$(RM) $(BSP_LIB_DIR)/*.a + -@$(RMDIR) $(BSP_LIB_DIR) + + clean: lib_clean +@@ -65,7 +65,7 @@ realclean: lib_realclean + # + ######################################################################## + +-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.build ++include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.build + + .PHONY: all lib_clean lib_realclean + +diff --git a/csps/lpc32xx/bsps/phy3250/examples/makefile b/csps/lpc32xx/bsps/phy3250/examples/makefile +index b939252..e7feaa6 100644 +--- a/csps/lpc32xx/bsps/phy3250/examples/makefile ++++ b/csps/lpc32xx/bsps/phy3250/examples/makefile +@@ -25,7 +25,7 @@ + # + ######################################################################## + +-include $(NXPMCU_SOFTWARE)\makerule\$(CSP)\make.$(CSP).$(TOOL) ++include $(NXPMCU_SOFTWARE)/makerule/$(CSP)/make.$(CSP).$(TOOL) + + SUBDIRS = adc dram_self_refresh hstimer hsuart i2c kscan lcd_colorbars + SUBDIRS += lcd_tsc mi2c mstimer pwm pwm_simple rtc sdcard sdcard_dma +diff --git a/csps/lpc32xx/bsps/phy3250/source/makefile b/csps/lpc32xx/bsps/phy3250/source/makefile +index 7c48e7d..750b776 100644 +--- a/csps/lpc32xx/bsps/phy3250/source/makefile ++++ b/csps/lpc32xx/bsps/phy3250/source/makefile +@@ -32,7 +32,7 @@ include $(NXPMCU_SOFTWARE)/makerule/$(CSP)/make.$(CSP).$(TOOL) + # Pick up the assembler and C source files in the directory + # + ######################################################################## +-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.ftypes ++include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.ftypes + AFLAGS +=-I../Include + CFLAGS +=-I../Include + +diff --git a/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/nor/kickstart/makefile b/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/nor/kickstart/makefile +index 01e2b38..526d6cc 100644 +--- a/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/nor/kickstart/makefile ++++ b/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/nor/kickstart/makefile +@@ -78,7 +78,7 @@ endif + + ######################################################################## + # +-# Compiler\linker specific stuff ++# Compiler/linker specific stuff + # + ######################################################################## + +diff --git a/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/nor/norerase/makefile b/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/nor/norerase/makefile +index ce329f5..e81b8db 100644 +--- a/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/nor/norerase/makefile ++++ b/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/nor/norerase/makefile +@@ -77,7 +77,7 @@ endif + + ######################################################################## + # +-# Compiler\linker specific stuff ++# Compiler/linker specific stuff + # + ######################################################################## + +diff --git a/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/nor/s1lapp/makefile b/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/nor/s1lapp/makefile +index 4426fc7..196faec 100644 +--- a/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/nor/s1lapp/makefile ++++ b/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/nor/s1lapp/makefile +@@ -77,7 +77,7 @@ endif + + ######################################################################## + # +-# Compiler\linker specific stuff ++# Compiler/linker specific stuff + # + ######################################################################## + +diff --git a/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/spi/kickstart/makefile b/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/spi/kickstart/makefile +index dc73b64..39fc304 100644 +--- a/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/spi/kickstart/makefile ++++ b/csps/lpc32xx/bsps/phy3250/startup/examples/Burners/spi/kickstart/makefile +@@ -78,7 +78,7 @@ endif + + ######################################################################## + # +-# Compiler\linker specific stuff ++# Compiler/linker specific stuff + # + ######################################################################## + +diff --git a/csps/lpc32xx/source/makefile b/csps/lpc32xx/source/makefile +index 8e05456..16bd944 100644 +--- a/csps/lpc32xx/source/makefile ++++ b/csps/lpc32xx/source/makefile +@@ -25,16 +25,16 @@ + # + ######################################################################## + +-include $(NXPMCU_SOFTWARE)\makerule\$(CSP)\make.$(CSP).$(TOOL) ++include $(NXPMCU_SOFTWARE)/makerule/$(CSP)/make.$(CSP).$(TOOL) + + ######################################################################## + # + # Pick up the assembler and C source files in the directory + # + ######################################################################## +-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.ftypes +-AFLAGS +=-I..\Include +-CFLAGS +=-I..\Include ++include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.ftypes ++AFLAGS +=-I../Include ++CFLAGS +=-I../Include + + + ######################################################################## +@@ -68,7 +68,7 @@ realclean: lib_realclean + # + ######################################################################## + +-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.build ++include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.build + + .PHONY: all lib_clean lib_realclean + +diff --git a/lpc/source/makefile b/lpc/source/makefile +index 2860db9..ae7d612 100644 +--- a/lpc/source/makefile ++++ b/lpc/source/makefile +@@ -25,16 +25,16 @@ + # + ######################################################################## + +-include $(NXPMCU_SOFTWARE)\makerule\$(CSP)\make.$(CSP).$(TOOL) ++include $(NXPMCU_SOFTWARE)/makerule/$(CSP)/make.$(CSP).$(TOOL) + + ######################################################################## + # + # Pick up the assembler and C source files in the directory + # + ######################################################################## +-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.ftypes +-AFLAGS +=-I..\Include +-CFLAGS +=-I..\Include ++include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.ftypes ++AFLAGS +=-I../Include ++CFLAGS +=-I../Include + + ######################################################################## + # +@@ -67,7 +67,7 @@ realclean: lib_realclean + # + ######################################################################## + +-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.build ++include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.build + + .PHONY: all lib_clean lib_realclean + +diff --git a/makefile b/makefile +index 8645fcc..86fa6bc 100644 +--- a/makefile ++++ b/makefile +@@ -34,7 +34,7 @@ TARGETS_CLN =gen_clean csp_clean bsp_clean + # + ######################################################################## + +-include $(NXPMCU_SOFTWARE)\makerule\$(CSP)\make.$(CSP).$(TOOL) ++include $(NXPMCU_SOFTWARE)/makerule/$(CSP)/make.$(CSP).$(TOOL) + + ######################################################################## + # +diff --git a/makerule/common/make.rules.environment b/makerule/common/make.rules.environment +index d5737fe..4e6df48 100644 +--- a/makerule/common/make.rules.environment ++++ b/makerule/common/make.rules.environment +@@ -52,7 +52,7 @@ ASTYLE =astyle --options=$(BUILD_ROOT)/tools/astyle.cfg + # + ######################################################################## + +-CSP_LIB_DIR =$(BUILD_ROOT)\csps\$(CSP)\lib ++CSP_LIB_DIR =$(BUILD_ROOT)/csps/$(CSP)/lib + + ######################################################################## + # +@@ -60,7 +60,7 @@ CSP_LIB_DIR =$(BUILD_ROOT)\csps\$(CSP)\lib + # + ######################################################################## + +-BSP_LIB_DIR =$(BUILD_ROOT)\csps\$(CSP)\bsps\$(BSP)\lib ++BSP_LIB_DIR =$(BUILD_ROOT)/csps/$(CSP)/bsps/$(BSP)/lib + + ######################################################################## + # +@@ -68,7 +68,7 @@ BSP_LIB_DIR =$(BUILD_ROOT)\csps\$(CSP)\bsps\$(BSP)\lib + # + ######################################################################## + +-GEN_LIB_DIR =$(BUILD_ROOT)\$(GEN)\lib ++GEN_LIB_DIR =$(BUILD_ROOT)/$(GEN)/lib + + ######################################################################## + # +@@ -76,9 +76,9 @@ GEN_LIB_DIR =$(BUILD_ROOT)\$(GEN)\lib + # + ######################################################################## + +-CSP_DIR =$(BUILD_ROOT)\csps\$(CSP) +-CSP_SRC_DIR =$(CSP_DIR)\source +-CSP_INC_DIR =$(CSP_DIR)\include ++CSP_DIR =$(BUILD_ROOT)/csps/$(CSP) ++CSP_SRC_DIR =$(CSP_DIR)/source ++CSP_INC_DIR =$(CSP_DIR)/include + + ######################################################################## + # +@@ -86,9 +86,9 @@ CSP_INC_DIR =$(CSP_DIR)\include + # + ######################################################################## + +-BSP_DIR =$(BUILD_ROOT)\csps\$(CSP)\bsps\$(BSP) +-BSP_SRC_DIR =$(BSP_DIR)\source +-BSP_INC_DIR =$(BSP_DIR)\include ++BSP_DIR =$(BUILD_ROOT)/csps/$(CSP)/bsps/$(BSP) ++BSP_SRC_DIR =$(BSP_DIR)/source ++BSP_INC_DIR =$(BSP_DIR)/include + + ######################################################################## + # +@@ -96,9 +96,9 @@ BSP_INC_DIR =$(BSP_DIR)\include + # + ######################################################################## + +-GEN_DIR =$(BUILD_ROOT)\$(GEN) +-GEN_SRC_DIR =$(GEN_DIR)\source +-GEN_INC_DIR =$(GEN_DIR)\include ++GEN_DIR =$(BUILD_ROOT)/$(GEN) ++GEN_SRC_DIR =$(GEN_DIR)/source ++GEN_INC_DIR =$(GEN_DIR)/include + + ######################################################################## + # +@@ -151,6 +151,6 @@ endif + # + ######################################################################## + +-TARGET_CSP_LIB =$(CSP_LIB_DIR)\$(CSP_ARCHIVE) +-TARGET_BSP_LIB =$(BSP_LIB_DIR)\$(BSP_ARCHIVE) +-TARGET_GEN_LIB =$(GEN_LIB_DIR)\$(GEN_ARCHIVE) ++TARGET_CSP_LIB =$(CSP_LIB_DIR)/$(CSP_ARCHIVE) ++TARGET_BSP_LIB =$(BSP_LIB_DIR)/$(BSP_ARCHIVE) ++TARGET_GEN_LIB =$(GEN_LIB_DIR)/$(GEN_ARCHIVE) +diff --git a/makerule/lpc32xx/make.lpc32xx.gnu b/makerule/lpc32xx/make.lpc32xx.gnu +index 3277d99..d80b98d 100644 +--- a/makerule/lpc32xx/make.lpc32xx.gnu ++++ b/makerule/lpc32xx/make.lpc32xx.gnu +@@ -19,7 +19,7 @@ + # use without further testing or modification. + ######################################################################## + +-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.environment ++include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.environment + + CPU = arm926ej-s + CFLAGS = -mcpu=arm926ej-s -Wall -Os +diff --git a/makerule/lpc32xx/make.lpc32xx.iar b/makerule/lpc32xx/make.lpc32xx.iar +index 238ebbf..27d163f 100644 +--- a/makerule/lpc32xx/make.lpc32xx.iar ++++ b/makerule/lpc32xx/make.lpc32xx.iar +@@ -19,12 +19,12 @@ + # use without further testing or modification. + ######################################################################## + +-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.environment ++include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.environment + +-IARBASE = $(IAR_ROOT)\ARM +-IARTOOLS = $(IARBASE)\bin +-IAR_LIB = $(IARBASE)\lib +-IAR_INC = $(IARBASE)\inc ++IARBASE = $(IAR_ROOT)/ARM ++IARTOOLS = $(IARBASE)/bin ++IAR_LIB = $(IARBASE)/lib ++IAR_INC = $(IARBASE)/inc + CC = iccarm + CCP = iccarm + AS = iasmarm +@@ -36,7 +36,7 @@ CFLAGS += -I"$(IAR_INC)" + AFLAGS = --cpu 5TEJ + LDFLAGS = + LK = "$(TARGET_GEN_LIB)" "$(TARGET_CSP_LIB)" "$(TARGET_BSP_LIB)" +-;LK += "$(IAR_LIB)\dl4tpannl8f.r79" ++;LK += "$(IAR_LIB)/dl4tpannl8f.r79" + MAP = --map + LDESC = --config + ENTRY = --entry +diff --git a/makerule/lpc32xx/make.lpc32xx.keil b/makerule/lpc32xx/make.lpc32xx.keil +index dd27583..7334d3f 100644 +--- a/makerule/lpc32xx/make.lpc32xx.keil ++++ b/makerule/lpc32xx/make.lpc32xx.keil +@@ -19,7 +19,7 @@ + # use without further testing or modification. + ######################################################################## + +-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.environment ++include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.environment + + CC =armcc + CCP =armcc +@@ -27,11 +27,11 @@ AS =armasm + LD =armlink + AR =armar -r -s + CFLAGS =--arm -O3 -g --device DARMP3 -D__MICROLIB +-CFLAGS +=-I$(KEIL_RVCT)\inc -I$(CSP_INC_DIR) -I$(BSP_INC_DIR) -I$(GEN_INC_DIR) ++CFLAGS +=-I$(KEIL_RVCT)/inc -I$(CSP_INC_DIR) -I$(BSP_INC_DIR) -I$(GEN_INC_DIR) + AFLAGS =--arm --device=DARMP3 + AFLAGS +=-I$(CSP_INC_DIR) -I$(BSP_INC_DIR) -I$(GEN_INC_DIR) + LDFLAGS =--noremove +-LK =--device DARMP3 --libpath $(KEIL_RVCT)\lib --scan $(TARGET_CSP_LIB) ++LK =--device DARMP3 --libpath $(KEIL_RVCT)/lib --scan $(TARGET_CSP_LIB) + LK +=--scan $(TARGET_BSP_LIB) + LK +=--scan $(TARGET_GEN_LIB) + MAP =--map --list +diff --git a/makerule/lpc32xx/make.lpc32xx.rvw b/makerule/lpc32xx/make.lpc32xx.rvw +index 59961dd..2419976 100644 +--- a/makerule/lpc32xx/make.lpc32xx.rvw ++++ b/makerule/lpc32xx/make.lpc32xx.rvw +@@ -19,7 +19,7 @@ + # use without further testing or modification. + ######################################################################## + +-include $(NXPMCU_SOFTWARE)\makerule\common\make.rules.environment ++include $(NXPMCU_SOFTWARE)/makerule/common/make.rules.environment + + CC =armcc + CCP =armcpp +-- +1.7.7.3 + diff --git a/boot/lpc32xxcdl/lpc32xxcdl.mk b/boot/lpc32xxcdl/lpc32xxcdl.mk new file mode 100644 index 0000000000..04c1c7f060 --- /dev/null +++ b/boot/lpc32xxcdl/lpc32xxcdl.mk @@ -0,0 +1,70 @@ +################################################################################ +# +# lpc32xxcdl +# +################################################################################ + +LPC32XXCDL_VERSION = lpc32xx_cdl_v2.11 +LPC32XXCDL_SITE = http://git.lpcware.com/lpc3xxx_cdl.git +LPC32XXCDL_SITE_METHOD = git + +LPC32XXCDL_INSTALL_TARGET = NO +LPC32XXCDL_INSTALL_IMAGES = YES + +ifeq ($(BR2_TARGET_LPC32XXCDL_BOARDNAME),"ea3250") +LPC32XXCDL_KICKSTART = kickstart/nand +LPC32XXCDL_KICKSTART_BURNER = nand/kickstart +LPC32XXCDL_S1L = s1l +LPC32XXCDL_S1L_BURNER = nand/s1lapp +endif + +ifeq ($(BR2_TARGET_LPC32XXCDL_BOARDNAME),"phy3250") +LPC32XXCDL_KICKSTART = kickstart/kickstart_nand +LPC32XXCDL_KICKSTART_BURNER = nand/kickstart +LPC32XXCDL_S1L = s1l/s1l_nand_boot +LPC32XXCDL_S1L_BURNER = nand/s1lapp +endif + +ifeq ($(BR2_TARGET_LPC32XXCDL_BOARDNAME),"fdi3250") +LPC32XXCDL_KICKSTART = kickstart/nand +LPC32XXCDL_KICKSTART_BURNER = nand/kickstart_jtag +LPC32XXCDL_S1L = s1l +LPC32XXCDL_S1L_BURNER = nand/s1lapp_jtag +endif + +LPC32XXCDL_BUILD_FLAGS = \ + CROSS_COMPILE=$(TARGET_CROSS) \ + NXPMCU_WINBASE=$(@D) \ + NXPMCU_SOFTWARE=$(@D) \ + BSP=$(BR2_TARGET_LPC32XXCDL_BOARDNAME) \ + CSP=lpc32xx TOOL=gnu GEN=lpc + +LPC32XXCDL_BOARD_STARTUP_DIR = \ + csps/lpc32xx/bsps/$(BR2_TARGET_LPC32XXCDL_BOARDNAME)/startup/examples/ + +# Source files are with dos newlines, which our patch infrastructure doesn't +# handle. Work around it by converting the affected files to unix newlines +# before patching +define LPC32XXCDL_DOS2UNIX_FOR_PATCH + sed -n 's|^[+-]\{3\} [^/]\+\([^ \t]*\)\(.*\)|$(@D)\1|p' \ + boot/lpc32xxcdl/*.patch| sort -u | xargs $(SED) 's/\x0D$$//' +endef + +LPC32XXCDL_POST_EXTRACT_HOOKS += LPC32XXCDL_DOS2UNIX_FOR_PATCH + +define LPC32XXCDL_BUILD_CMDS + $(MAKE1) $(LPC32XXCDL_BUILD_FLAGS) -C $(@D) + $(MAKE1) $(LPC32XXCDL_BUILD_FLAGS) -C $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/Burners/$(LPC32XXCDL_KICKSTART_BURNER) + $(MAKE1) $(LPC32XXCDL_BUILD_FLAGS) -C $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/$(LPC32XXCDL_KICKSTART) + $(MAKE1) $(LPC32XXCDL_BUILD_FLAGS) -C $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/Burners/$(LPC32XXCDL_S1L_BURNER) + $(MAKE1) $(LPC32XXCDL_BUILD_FLAGS) -C $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/$(LPC32XXCDL_S1L) +endef + +define LPC32XXCDL_INSTALL_IMAGES_CMDS + cp $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/Burners/$(LPC32XXCDL_KICKSTART_BURNER)/*gnu.bin $(BINARIES_DIR) + cp $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/$(LPC32XXCDL_KICKSTART)/*gnu.bin $(BINARIES_DIR) + cp $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/Burners/$(LPC32XXCDL_S1L_BURNER)/*gnu.bin $(BINARIES_DIR) + cp $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/$(LPC32XXCDL_S1L)/*gnu.bin $(BINARIES_DIR) +endef + +$(eval $(generic-package)) diff --git a/boot/mxs-bootlets/Config.in b/boot/mxs-bootlets/Config.in new file mode 100644 index 0000000000..4bb07a06f5 --- /dev/null +++ b/boot/mxs-bootlets/Config.in @@ -0,0 +1,90 @@ +config BR2_TARGET_MXS_BOOTLETS + bool "mxs-bootlets" + depends on BR2_arm + help + Stage1 bootloaders for Freescale iMX23/iMX28 SoCs + +if BR2_TARGET_MXS_BOOTLETS + +choice + prompt "Source" + default BR2_TARGET_MXS_BOOTLETS_FREESCALE + help + Select the location of the bootlets you want to use + +config BR2_TARGET_MXS_BOOTLETS_FREESCALE + bool "Freescale 10.12.01 version" + +config BR2_TARGET_MXS_BOOTLETS_CUSTOM_TARBALL + bool "Custom tarball" + +config BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT + bool "Custom Git repository" + +endchoice + +config BR2_TARGET_MXS_BOOTLETS_CUSTOM_TARBALL_URL + depends on BR2_TARGET_MXS_BOOTLETS_CUSTOM_TARBALL + string "URL of custom bootlets tarball" + +if BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT + +config BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT_URL + string "URL of custom Git repository" + +config BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT_VERSION + string "Custom Git version" + +endif + +choice + prompt "Bootstream" + help + Select which bootstream to generate + +config BR2_TARGET_MXS_BOOTLETS_BAREBOX + depends on BR2_TARGET_BAREBOX + bool "Barebox Bootloader" + +config BR2_TARGET_MXS_BOOTLETS_LINUX + depends on BR2_LINUX_KERNEL + bool "Linux Kernel" + +config BR2_TARGET_MXS_BOOTLETS_UBOOT + depends on BR2_TARGET_UBOOT + bool "U-boot bootloader" + +endchoice + +config BR2_TARGET_MXS_BOOTLETS_HAS_IVT + bool "HAB Support" + help + Enable this option if you are building bootlets + for the iMX28 platform that needs to include instructions + for the secure boot mechanism present on these SoCs + +choice + prompt "Board" + help + Select the board to build the bootlets for + +config BR2_TARGET_MXS_BOOTLETS_STMP37xx + bool "Sigmatel ST-MP3-7xx Board" + +config BR2_TARGET_MXS_BOOTLETS_STMP378x + bool "Sigmatel ST-MP3-78x Board" + +config BR2_TARGET_MXS_BOOTLETS_IMX28EVK + bool "Freescale iMX28 EVK Board" + +config BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD + bool "Custom board" +endchoice + +config BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD_NAME + string "Custom board name" + depends on BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD + help + Name of the board to build the bootlets for + +endif diff --git a/boot/mxs-bootlets/barebox_ivt.bd b/boot/mxs-bootlets/barebox_ivt.bd new file mode 100644 index 0000000000..0c67e9cfce --- /dev/null +++ b/boot/mxs-bootlets/barebox_ivt.bd @@ -0,0 +1,34 @@ +// STMP378x ROM command script to load and run U-Boot + +sources { + power_prep="./power_prep/power_prep"; + sdram_prep="./boot_prep/boot_prep"; + barebox="./barebox"; +} + +section (0) { + + //---------------------------------------------------------- + // Power Supply initialization + //---------------------------------------------------------- + + load power_prep; + load ivt (entry = power_prep:_start) > 0x8000; + hab call 0x8000; + + //---------------------------------------------------------- + // SDRAM initialization + //---------------------------------------------------------- + + load sdram_prep; + load ivt (entry = sdram_prep:_start) > 0x8000; + hab call 0x8000; + //---------------------------------------------------------- + // Load and call u_boot - ELF ARM image + //---------------------------------------------------------- + + load barebox; + load ivt (entry = barebox:start) > 0x8000; + hab call 0x8000; + +} diff --git a/boot/mxs-bootlets/mxs-bootlets.mk b/boot/mxs-bootlets/mxs-bootlets.mk new file mode 100644 index 0000000000..6b81030c18 --- /dev/null +++ b/boot/mxs-bootlets/mxs-bootlets.mk @@ -0,0 +1,103 @@ +################################################################################ +# +# mxs-bootlets +# +################################################################################ + +ifeq ($(BR2_TARGET_MXS_BOOTLETS_CUSTOM_TARBALL),y) + MXS_BOOTLETS_TARBALL = $(call qstrip,$(BR2_TARGET_MXS_BOOTLETS_CUSTOM_TARBALL_URL)) + MXS_BOOTLETS_SITE = $(patsubst %/,%,$(dir $(MXS_BOOTLETS_TARBALL))) + MXS_BOOTLETS_SOURCE = $(notdir $(MXS_BOOTLETS_TARBALL)) +else ifeq ($(BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT),y) + MXS_BOOTLETS_SITE = $(BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT_URL) + MXS_BOOTLETS_SITE_METHOD = git + MXS_BOOTLETS_VERSION = $(call qstrip,$(BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT_VERSION)) +else + MXS_BOOTLETS_VERSION = 10.12.01 + MXS_BOOTLETS_SITE = http://download.ossystems.com.br/bsp/freescale/source/ + MXS_BOOTLETS_SOURCE = imx-bootlets-src-$(MXS_BOOTLETS_VERSION).tar.gz +endif + +ifeq ($(BR2_TARGET_MXS_BOOTLETS_STMP37xx),y) + MXS_BOOTLETS_BOARD = stmp37xx_dev +else ifeq ($(BR2_TARGET_MXS_BOOTLETS_STMP378x),y) + MXS_BOOTLETS_BOARD = stmp378x_dev +else ifeq ($(BR2_TARGET_MXS_BOOTLETS_IMX28EVK),y) + MXS_BOOTLETS_BOARD = iMX28_EVK +else ifeq ($(BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD),y) + MXS_BOOTLETS_BOARD = $(call qstrip,$(BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD_NAME)) +endif + +ifeq ($(BR2_TARGET_MXS_BOOTLETS_HAS_IVT),y) + MXS_BOOTLETS_IVT_SUFFIX = _ivt + MXS_BOOTLETS_ELFTOSB_OPTIONS += -f imx28 +endif + +MXS_BOOTLETS_DEPENDENCIES = host-elftosb + +ifeq ($(BR2_TARGET_MXS_BOOTLETS_BAREBOX),y) +MXS_BOOTLETS_DEPENDENCIES += barebox +MXS_BOOTLETS_BOOTDESC = barebox$(MXS_BOOTLETS_IVT_SUFFIX).bd +MXS_BOOTLETS_BOOTSTREAM = $(MXS_BOOTLETS_BOARD)_barebox$(MXS_BOOTLETS_IVT_SUFFIX).sb + +else ifeq ($(BR2_TARGET_MXS_BOOTLETS_LINUX),y) +MXS_BOOTLETS_DEPENDENCIES += linux +MXS_BOOTLETS_BOOTDESC = linux$(MXS_BOOTLETS_IVT_SUFFIX).bd +MXS_BOOTLETS_BOOTSTREAM = $(MXS_BOOTLETS_BOARD)_linux$(MXS_BOOTLETS_IVT_SUFFIX).sb + +else ifeq ($(BR2_TARGET_MXS_BOOTLETS_UBOOT),y) +MXS_BOOTLETS_DEPENDENCIES += uboot +MXS_BOOTLETS_BOOTDESC = uboot$(MXS_BOOTLETS_IVT_SUFFIX).bd +MXS_BOOTLETS_BOOTSTREAM = $(MXS_BOOTLETS_BOARD)_uboot$(MXS_BOOTLETS_IVT_SUFFIX).sb +endif + +ifeq ($(BR2_TARGET_MXS_BOOTLETS_BAREBOX),y) +define MXS_BOOTLETS_SED_BAREBOX + sed -i 's,[^ *]barebox.*;,\tbarebox="$(BAREBOX_DIR)/barebox";,' $(@D)/$(MXS_BOOTLETS_BOOTDESC) +endef +endif + +ifeq ($(BR2_TARGET_MXS_BOOTLETS_LINUX),y) +define MXS_BOOTLETS_BUILD_LINUX_PREP + BOARD=$(MXS_BOOTLETS_BOARD) CROSS_COMPILE="$(TARGET_CROSS)" \ + $(MAKE1) -C $(@D) linux_prep +endef +define MXS_BOOTLETS_SED_LINUX + sed -i 's,[^ *]linux_prep.*;,\tlinux_prep="$(@D)/linux_prep/output-target/linux_prep";,' $(@D)/$(MXS_BOOTLETS_BOOTDESC) + sed -i 's,[^ *]zImage.*;,\tzImage="$(LINUX_DIR)/arch/arm/boot/zImage";,' $(@D)/$(MXS_BOOTLETS_BOOTDESC) +endef +endif + +ifeq ($(BR2_TARGET_MXS_BOOTLETS_UBOOT),y) +define MXS_BOOTLETS_SED_UBOOT + sed -i 's,[^ *]u_boot.*;,\tu_boot="$(UBOOT_DIR)/u-boot";,' $(@D)/$(MXS_BOOTLETS_BOOTDESC) +endef +endif + +define MXS_BOOTLETS_INSTALL_BAREBOX_BOOTDESC + cp boot/mxs-bootlets/barebox_ivt.bd $(@D)/ +endef + +MXS_BOOTLETS_POST_EXTRACT_HOOKS += MXS_BOOTLETS_INSTALL_BAREBOX_BOOTDESC + +define MXS_BOOTLETS_BUILD_CMDS + BOARD=$(MXS_BOOTLETS_BOARD) CROSS_COMPILE="$(TARGET_CROSS)" \ + $(MAKE1) -C $(@D) power_prep + BOARD=$(MXS_BOOTLETS_BOARD) CROSS_COMPILE="$(TARGET_CROSS)" \ + $(MAKE1) -C $(@D) boot_prep + $(MXS_BOOTLETS_BUILD_LINUX_PREP) + sed -i 's,[^ *]power_prep.*;,\tpower_prep="$(@D)/power_prep/power_prep";,' $(@D)/$(MXS_BOOTLETS_BOOTDESC) + sed -i 's,[^ *]sdram_prep.*;,\tsdram_prep="$(@D)/boot_prep/boot_prep";,' $(@D)/$(MXS_BOOTLETS_BOOTDESC) + $(MXS_BOOTLETS_SED_BAREBOX) + $(MXS_BOOTLETS_SED_LINUX) + $(MXS_BOOTLETS_SED_UBOOT) + $(HOST_DIR)/usr/bin/elftosb $(MXS_BOOTLETS_ELFTOSB_OPTIONS) \ + -z -c $(@D)/$(MXS_BOOTLETS_BOOTDESC) \ + -o $(@D)/$(MXS_BOOTLETS_BOOTSTREAM) +endef + +define MXS_BOOTLETS_INSTALL_TARGET_CMDS + cp $(@D)/$(MXS_BOOTLETS_BOOTSTREAM) $(BINARIES_DIR)/ +endef + +$(eval $(generic-package)) diff --git a/boot/syslinux/Config.in b/boot/syslinux/Config.in index 5650f91ba9..1928651ba3 100644 --- a/boot/syslinux/Config.in +++ b/boot/syslinux/Config.in @@ -5,8 +5,14 @@ config BR2_TARGET_SYSLINUX The syslinux bootloader for x86 systems. This includes: syslinux, pxelinux, extlinux. -config BR2_TARGET_PXELINUX - bool "pxelinux" - depends on BR2_i386 || BR2_x86_64 - help - The pxelinux loader for x86 systems. + http://syslinux.org + +config BR2_TARGET_SYSLINUX_ISOLINUX + bool "Install isolinux" + depends on BR2_TARGET_SYSLINUX + default y + +config BR2_TARGET_SYSLINUX_PXELINUX + bool "Install pxelinux" + depends on BR2_TARGET_SYSLINUX + default y diff --git a/boot/syslinux/syslinux-3.85-makefile.patch b/boot/syslinux/syslinux-3.85-makefile.patch deleted file mode 100644 index ff85b8dc9f..0000000000 --- a/boot/syslinux/syslinux-3.85-makefile.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: syslinux-3.85/Makefile -=================================================================== ---- syslinux-3.85.orig/Makefile -+++ syslinux-3.85/Makefile -@@ -43,7 +43,7 @@ - mbr/mbr_c.bin mbr/altmbr_c.bin mbr/gptmbr_c.bin \ - mbr/mbr_f.bin mbr/altmbr_f.bin mbr/gptmbr_f.bin \ - core/pxelinux.0 core/isolinux.bin core/isolinux-debug.bin \ -- gpxe/gpxelinux.0 dos/syslinux.com win32/syslinux.exe \ -+ gpxe/gpxelinux.0 dos/syslinux.com \ - dosutil/*.com dosutil/*.sys \ - $(MODULES) - diff --git a/boot/syslinux/syslinux.mk b/boot/syslinux/syslinux.mk index 192e90502c..b6b804e462 100644 --- a/boot/syslinux/syslinux.mk +++ b/boot/syslinux/syslinux.mk @@ -1,54 +1,49 @@ -############################################################# +################################################################################ # # syslinux to make target msdos/iso9660 filesystems bootable # -############################################################# +################################################################################ -SYSLINUX_VERSION:=3.85 -SYSLINUX_DIR=$(BUILD_DIR)/syslinux-$(SYSLINUX_VERSION) -SYSLINUX_SOURCE=syslinux-$(SYSLINUX_VERSION).tar.bz2 -SYSLINUX_CAT:=$(BZCAT) -SYSLINUX_SITE=$(BR2_KERNEL_MIRROR)/linux/utils/boot/syslinux/3.xx/ +SYSLINUX_VERSION = 4.07 +SYSLINUX_SOURCE = syslinux-$(SYSLINUX_VERSION).tar.bz2 +SYSLINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/boot/syslinux/4.xx/ -$(DL_DIR)/$(SYSLINUX_SOURCE): - $(call DOWNLOAD,$(SYSLINUX_SITE),$(SYSLINUX_SOURCE)) +SYSLINUX_LICENSE = GPLv2+ +SYSLINUX_LICENSE_FILES = COPYING -syslinux-source: $(DL_DIR)/$(SYSLINUX_SOURCE) +SYSLINUX_INSTALL_TARGET = NO +SYSLINUX_INSTALL_IMAGES = YES -$(SYSLINUX_DIR)/.unpacked: $(DL_DIR)/$(SYSLINUX_SOURCE) $(SYSLINUX_PATCH) - mkdir -p $(@D) - $(SYSLINUX_CAT) $(DL_DIR)/$(SYSLINUX_SOURCE) | tar $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) - - toolchain/patch-kernel.sh $(@D) boot/syslinux/ \*.patch - touch -c $@ +SYSLINUX_DEPENDENCIES = host-nasm host-util-linux -$(SYSLINUX_DIR)/.compiled: $(SYSLINUX_DIR)/.unpacked - $(TARGET_MAKE_ENV) $(MAKE) CC="$(HOSTCC)" AR="$(HOSTAR)" -C $(SYSLINUX_DIR) - touch -c $@ +# syslinux build system has no convenient way to pass CFLAGS, +# and the internal zlib should take precedence so -I shouldn't +# be used. +define SYSLINUX_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) CC="$(HOSTCC) -idirafter $(HOST_DIR)/usr/include $(HOST_LDFLAGS)" AR="$(HOSTAR)" -C $(@D) +endef -$(BINARIES_DIR)/isolinux.bin: $(SYSLINUX_DIR)/.compiled - cp -a $(SYSLINUX_DIR)/core/isolinux.bin $@ +SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_ISOLINUX) += isolinux.bin +SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_PXELINUX) += pxelinux.bin -$(BINARIES_DIR)/pxelinux.bin: $(SYSLINUX_DIR)/.compiled - cp -a $(SYSLINUX_DIR)/core/pxelinux.bin $@ +define SYSLINUX_INSTALL_IMAGES_CMDS + for i in $(SYSLINUX_IMAGES-y); do \ + $(INSTALL) -D -m 0755 $(@D)/core/$$i $(BINARIES_DIR)/$$i; \ + done +endef -syslinux: host-nasm $(BINARIES_DIR)/isolinux.bin -pxelinux: host-nasm $(BINARIES_DIR)/pxelinux.bin -pxelinux-clean syslinux-clean: - rm -f $(BINARIES_DIR)/isolinux.bin $(BINARIES_DIR)/pxelinux.bin - -$(MAKE) -C $(SYSLINUX_DIR) clean +define HOST_SYSLINUX_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) +endef -pxelinux-dirclean syslinux-dirclean: - rm -rf $(SYSLINUX_DIR) +define HOST_SYSLINUX_INSTALL_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) INSTALLROOT=$(HOST_DIR) install +endef -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_TARGET_SYSLINUX),y) -TARGETS+=syslinux -endif -ifeq ($(BR2_TARGET_PXELINUX),y) -TARGETS+=pxelinux -endif +define HOST_SYSLINUX_CLEAN_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) clean +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/boot/u-boot/Config.in b/boot/u-boot/Config.in deleted file mode 100644 index 3ba1ef3a92..0000000000 --- a/boot/u-boot/Config.in +++ /dev/null @@ -1,132 +0,0 @@ -menuconfig BR2_TARGET_UBOOT - bool "U-Boot" - help - Build "Das U-Boot" Boot Monitor - -if BR2_TARGET_UBOOT -config BR2_TARGET_UBOOT_BOARDNAME - string "U-Boot board name" - help - One of U-Boot supported boards to be built. - This will be suffixed with _config to meet U-Boot standard naming. - -choice - prompt "U-Boot Version" - default BR2_TARGET_UBOOT_2010_12 - help - Select the specific U-Boot version you want to use - -config BR2_TARGET_UBOOT_2010_12 - bool "2010.12" - -config BR2_TARGET_UBOOT_2010_09 - bool "2010.09" - -config BR2_TARGET_UBOOT_2010_06 - bool "2010.06" - -config BR2_TARGET_UBOOT_2010_03 - bool "2010.03" - -config BR2_TARGET_UBOOT_CUSTOM_TARBALL - bool "Custom tarball" - -endchoice - -if BR2_TARGET_UBOOT_CUSTOM_TARBALL - -config BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION - string "URL of custom U-Boot tarball" - -endif - -config BR2_TARGET_UBOOT_VERSION - string - default "2010.12" if BR2_TARGET_UBOOT_2010_12 - default "2010.09" if BR2_TARGET_UBOOT_2010_09 - default "2010.06" if BR2_TARGET_UBOOT_2010_06 - default "2010.03" if BR2_TARGET_UBOOT_2010_03 - default "custom" if BR2_TARGET_UBOOT_CUSTOM_TARBALL - -config BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR - string "custom patch dir" - help - If your board requires custom patches, add the path to the - directory containing the patches here. The patches must be - named u-boot--.patch. - - Most users may leave this empty - -choice - prompt "U-Boot binary format" - -config BR2_TARGET_UBOOT_FORMAT_BIN - bool "u-boot.bin" - -config BR2_TARGET_UBOOT_FORMAT_KWB - depends on BR2_arm - bool "u-boot.kwb (Marvell)" - -config BR2_TARGET_UBOOT_FORMAT_LDR - depends on BR2_bfin - bool "u-boot.ldr" - -endchoice - -config BR2_TARGET_UBOOT_TOOL_MKIMAGE - bool "mkimage tool in target" - help - Install mkimage tool in target. - -config BR2_TARGET_UBOOT_TOOL_ENV - bool "fw_printenv tool in target" - help - Install fw_printenv / fw_setenv tools in target. - -menuconfig BR2_TARGET_UBOOT_NETWORK - bool "Network Settings" - default y - help - Network settings for U-boot - -if BR2_TARGET_UBOOT_NETWORK - -config BR2_TARGET_UBOOT_SERVERIP - string "server ip" - default "10.175.196.221" - help - TFTP server ip address - -config BR2_TARGET_UBOOT_IPADDR - string "ip address" - default "10.175.196.18" - help - Target ip address - -config BR2_TARGET_UBOOT_GATEWAY - string "gateway ip" - default "10.175.196.1" - help - Gateway ip address - -config BR2_TARGET_UBOOT_NETMASK - string "netmask" - default "255.255.255.0" - help - Network Mask - -config BR2_TARGET_UBOOT_ETHADDR - string "ethernet address" - default "04:25:fe:ed:00:18" - help - Target MAC address for the ethernet interface. - This should be changed for production units - -config BR2_TARGET_UBOOT_ETH1ADDR - string "ethernet 2 address" - help - Target MAC address for the second ethernet interface. - -endif # BR2_TARGET_UBOOT_NETWORK - -endif # BR2_TARGET_UBOOT diff --git a/boot/u-boot/u-boot-2010.03-fix-avr32.patch b/boot/u-boot/u-boot-2010.03-fix-avr32.patch deleted file mode 100644 index 1f9aab8f0e..0000000000 --- a/boot/u-boot/u-boot-2010.03-fix-avr32.patch +++ /dev/null @@ -1,5 +0,0 @@ -diff -Naur u-boot-2010.03-orig/include/asm-avr32/unaligned.h u-boot-2010.03/include/asm-avr32/unaligned.h ---- u-boot-2010.03-orig/include/asm-avr32/unaligned.h 1969-12-31 21:00:00.000000000 -0300 -+++ u-boot-2010.03/include/asm-avr32/unaligned.h 2010-06-22 23:09:49.000000000 -0300 -@@ -0,0 +1 @@ -+#include diff --git a/boot/u-boot/u-boot.mk b/boot/u-boot/u-boot.mk deleted file mode 100644 index a86819b5d8..0000000000 --- a/boot/u-boot/u-boot.mk +++ /dev/null @@ -1,205 +0,0 @@ -############################################################# -# -# U-Boot -# -############################################################# -U_BOOT_VERSION:=$(call qstrip,$(BR2_TARGET_UBOOT_VERSION)) -U_BOOT_BOARD_NAME:=$(call qstrip,$(BR2_TARGET_UBOOT_BOARDNAME)) - -# U-Boot may not be selected in the configuration, but mkimage might -# be needed to build/prepare a kernel image. In this case, we just -# pick some random stable U-Boot version that will be used just to -# build mkimage. -ifeq ($(U_BOOT_VERSION),) -U_BOOT_VERSION=2010.12 -endif - -ifeq ($(U_BOOT_VERSION),custom) -# Handle custom U-Boot tarballs as specified by the configuration -U_BOOT_TARBALL=$(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION)) -U_BOOT_SITE:=$(dir $(U_BOOT_TARBALL)) -U_BOOT_SOURCE:=$(notdir $(U_BOOT_TARBALL)) -else -# Handle stable official U-Boot versions -U_BOOT_SITE:=ftp://ftp.denx.de/pub/u-boot -U_BOOT_SOURCE:=u-boot-$(U_BOOT_VERSION).tar.bz2 -endif - -U_BOOT_DIR:=$(BUILD_DIR)/u-boot-$(U_BOOT_VERSION) -U_BOOT_CAT:=$(BZCAT) - -ifeq ($(BR2_TARGET_UBOOT_FORMAT_KWB),y) -U_BOOT_BIN:=u-boot.kwb -U_BOOT_MAKE_OPT:=$(U_BOOT_BIN) -else ifeq ($(BR2_TARGET_UBOOT_FORMAT_LDR),y) -U_BOOT_BIN:=u-boot.ldr -else -U_BOOT_BIN:=u-boot.bin -endif - -MKIMAGE:=$(HOST_DIR)/usr/bin/mkimage - -U_BOOT_TARGETS:=$(BINARIES_DIR)/$(U_BOOT_BIN) $(MKIMAGE) -U_BOOT_ARCH=$(KERNEL_ARCH) - -# u-boot in the past used arch=ppc for powerpc -ifneq ($(findstring x2010.03,x$(U_BOOT_VERSION)),) -U_BOOT_ARCH=$(KERNEL_ARCH:powerpc=ppc) -endif - -U_BOOT_INC_CONF_FILE:=$(U_BOOT_DIR)/include/config.h - -ifeq ($(BR2_TARGET_UBOOT_TOOL_MKIMAGE),y) -U_BOOT_TARGETS+=$(TARGET_DIR)/usr/bin/mkimage -endif -ifeq ($(BR2_TARGET_UBOOT_TOOL_ENV),y) -U_BOOT_TARGETS+=$(TARGET_DIR)/usr/sbin/fw_printenv -endif - -U_BOOT_CONFIGURE_OPTS += CONFIG_NOSOFTFLOAT=1 - -# Define a helper function -define insert_define -@echo "#ifdef $(strip $(1))" >> $(U_BOOT_INC_CONF_FILE) -@echo "#undef $(strip $(1))" >> $(U_BOOT_INC_CONF_FILE) -@echo "#endif" >> $(U_BOOT_INC_CONF_FILE) -@echo '#define $(strip $(1)) $(call qstrip,$(2))' >> $(U_BOOT_INC_CONF_FILE) -endef - -$(DL_DIR)/$(U_BOOT_SOURCE): - $(call DOWNLOAD,$(U_BOOT_SITE),$(U_BOOT_SOURCE)) - -$(U_BOOT_DIR)/.unpacked: $(DL_DIR)/$(U_BOOT_SOURCE) - mkdir -p $(@D) - $(INFLATE$(suffix $(U_BOOT_SOURCE))) $(DL_DIR)/$(U_BOOT_SOURCE) \ - | tar $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) - - touch $@ - -$(U_BOOT_DIR)/.patched: $(U_BOOT_DIR)/.unpacked - toolchain/patch-kernel.sh $(U_BOOT_DIR) boot/u-boot \ - u-boot-$(U_BOOT_VERSION)-\*.patch \ - u-boot-$(U_BOOT_VERSION)-\*.patch.$(ARCH) -ifneq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR)),) - toolchain/patch-kernel.sh $(U_BOOT_DIR) $(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR) u-boot-$(U_BOOT_VERSION)-\*.patch -endif - touch $@ - -$(U_BOOT_DIR)/.configured: $(U_BOOT_DIR)/.patched -ifeq ($(U_BOOT_BOARD_NAME),) - $(error NO U-Boot board name set. Check your BR2_TARGET_UBOOT_BOARDNAME setting) -endif - $(TARGET_CONFIGURE_OPTS) \ - $(U_BOOT_CONFIGURE_OPTS) \ - $(MAKE) -C $(U_BOOT_DIR) \ - CROSS_COMPILE="$(TARGET_CROSS)" ARCH=$(U_BOOT_ARCH) \ - $(U_BOOT_BOARD_NAME)_config - touch $@ - -$(U_BOOT_DIR)/.header_modified: $(U_BOOT_DIR)/.configured - # Modify configuration header in $(U_BOOT_INC_CONF_FILE) -ifdef BR2_TARGET_UBOOT_NETWORK - @echo >> $(U_BOOT_INC_CONF_FILE) - @echo "/* Add a wrapper around the values Buildroot sets. */" >> $(U_BOOT_INC_CONF_FILE) - @echo "#ifndef __BR2_ADDED_CONFIG_H" >> $(U_BOOT_INC_CONF_FILE) - @echo "#define __BR2_ADDED_CONFIG_H" >> $(U_BOOT_INC_CONF_FILE) - $(call insert_define, DATE, $(DATE)) - $(call insert_define, CONFIG_LOAD_SCRIPTS, 1) -ifneq ($(strip $(BR2_TARGET_UBOOT_IPADDR)),"") - $(call insert_define, CONFIG_IPADDR, $(BR2_TARGET_UBOOT_IPADDR)) -endif -ifneq ($(strip $(BR2_TARGET_UBOOT_GATEWAY)),"") - $(call insert_define, CONFIG_GATEWAYIP, $(BR2_TARGET_UBOOT_GATEWAY)) -endif -ifneq ($(strip $(BR2_TARGET_UBOOT_NETMASK)),"") - $(call insert_define, CONFIG_NETMASK, $(BR2_TARGET_UBOOT_NETMASK)) -endif -ifneq ($(strip $(BR2_TARGET_UBOOT_SERVERIP)),"") - $(call insert_define, CONFIG_SERVERIP, $(BR2_TARGET_UBOOT_SERVERIP)) -endif -ifneq ($(strip $(BR2_TARGET_UBOOT_ETHADDR)),"") - $(call insert_define, CONFIG_ETHADDR, $(BR2_TARGET_UBOOT_ETHADDR)) -endif -ifneq ($(strip $(BR2_TARGET_UBOOT_ETH1ADDR)),"") - $(call insert_define, CONFIG_ETH1ADDR, $(BR2_TARGET_UBOOT_ETH1ADDR)) -endif - @echo "#endif /* __BR2_ADDED_CONFIG_H */" >> $(U_BOOT_INC_CONF_FILE) -endif # BR2_TARGET_UBOOT_NETWORK - touch $@ - -# Build U-Boot itself -$(U_BOOT_DIR)/$(U_BOOT_BIN): $(U_BOOT_DIR)/.header_modified - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - $(U_BOOT_CONFIGURE_OPTS) \ - $(MAKE) CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" ARCH=$(U_BOOT_ARCH) \ - $(U_BOOT_MAKE_OPT) -C $(U_BOOT_DIR) - -# Copy the result to the images/ directory -$(BINARIES_DIR)/$(U_BOOT_BIN): $(U_BOOT_DIR)/$(U_BOOT_BIN) - rm -f $(BINARIES_DIR)/$(U_BOOT_BIN) - cp -dpf $(U_BOOT_DIR)/$(U_BOOT_BIN) $(BINARIES_DIR)/ - -# Build just mkimage for the host. It might have already been built by -# the U-Boot build procedure, but mkimage may also be needed even if -# U-Boot isn't selected in the configuration, to generate a kernel -# uImage. -$(MKIMAGE): $(U_BOOT_DIR)/.patched - mkdir -p $(@D) - $(MAKE) -C $(U_BOOT_DIR) CROSS_COMPILE="$(TARGET_CROSS)" ARCH=$(U_BOOT_ARCH) tools - cp -dpf $(U_BOOT_DIR)/tools/mkimage $(@D) - -# Build manually mkimage for the target -$(TARGET_DIR)/usr/bin/mkimage: $(U_BOOT_DIR)/.configured - mkdir -p $(@D) - $(TARGET_CC) -I$(U_BOOT_DIR)/include -I$(U_BOOT_DIR)/tools \ - -DUSE_HOSTCC -o $@ \ - $(U_BOOT_DIR)/common/image.c \ - $(wildcard $(addprefix $(U_BOOT_DIR)/tools/,default_image.c \ - fit_image.c imximage.c kwbimage.c mkimage.c)) \ - $(addprefix $(U_BOOT_DIR)/lib*/,crc32.c md5.c sha1.c) \ - $(U_BOOT_DIR)/tools/os_support.c \ - $(wildcard $(U_BOOT_DIR)/libfdt/fdt*.c $(U_BOOT_DIR)/lib/libfdt/fdt*.c) - - $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $@ - -# Build manually fw_printenv for the target -$(TARGET_DIR)/usr/sbin/fw_printenv: $(U_BOOT_DIR)/.configured - mkdir -p $(@D) - $(TARGET_CC) -I$(U_BOOT_DIR)/include -I$(LINUX_HEADERS_DIR)/include \ - -DUSE_HOSTCC -o $@ \ - $(U_BOOT_DIR)/tools/env/*.c $(U_BOOT_DIR)/lib*/crc32.c - $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $@ - ln -sf fw_printenv $(TARGET_DIR)/usr/sbin/fw_setenv - -u-boot: $(U_BOOT_TARGETS) - -u-boot-clean: - -$(MAKE) -C $(U_BOOT_DIR) clean - rm -f $(MKIMAGE) - -u-boot-dirclean: - rm -rf $(U_BOOT_DIR) - -u-boot-source: $(DL_DIR)/$(U_BOOT_SOURCE) - -u-boot-unpacked: $(U_BOOT_DIR)/.patched - -u-boot-configured: $(U_BOOT_DIR)/.header_modified - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_TARGET_UBOOT),y) -TARGETS+=u-boot - -# we NEED a board name unless we're at make source -ifeq ($(filter source,$(MAKECMDGOALS)),) -ifeq ($(U_BOOT_BOARD_NAME),) -$(error NO U-Boot board name set. Check your BR2_TARGET_UBOOT_BOARDNAME setting) -endif -endif - -endif diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in new file mode 100644 index 0000000000..77553c13bd --- /dev/null +++ b/boot/uboot/Config.in @@ -0,0 +1,256 @@ +config BR2_TARGET_UBOOT + bool "U-Boot" + help + Build "Das U-Boot" Boot Monitor + +if BR2_TARGET_UBOOT +config BR2_TARGET_UBOOT_BOARDNAME + string "U-Boot board name" + help + One of U-Boot supported boards to be built. + This will be suffixed with _config to meet U-Boot standard naming. + See boards.cfg in U-Boot source code for the list of available + configurations. + +choice + prompt "U-Boot Version" + help + Select the specific U-Boot version you want to use + +config BR2_TARGET_UBOOT_LATEST_VERSION + bool "2013.10" + +config BR2_TARGET_UBOOT_CUSTOM_VERSION + bool "Custom version" + help + This option allows to use a specific official versions + +config BR2_TARGET_UBOOT_CUSTOM_TARBALL + bool "Custom tarball" + +config BR2_TARGET_UBOOT_CUSTOM_GIT + bool "Custom Git repository" + +config BR2_TARGET_UBOOT_CUSTOM_HG + bool "Custom Mercurial repository" + +endchoice + +config BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE + string "U-Boot version" + depends on BR2_TARGET_UBOOT_CUSTOM_VERSION + +config BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION + string "URL of custom U-Boot tarball" + depends on BR2_TARGET_UBOOT_CUSTOM_TARBALL + +if BR2_TARGET_UBOOT_CUSTOM_GIT || BR2_TARGET_UBOOT_CUSTOM_HG + +config BR2_TARGET_UBOOT_CUSTOM_REPO_URL + string "URL of custom repository" + default BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL \ + if BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL != "" # legacy + +config BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION + string "Custom repository version" + default BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION \ + if BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION != "" # legacy + help + Revision to use in the typical format used by Git/Mercurial + E.G. a sha id, a tag, branch, .. + +endif + +config BR2_TARGET_UBOOT_VERSION + string + default "2013.10" if BR2_TARGET_UBOOT_LATEST_VERSION + default BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE \ + if BR2_TARGET_UBOOT_CUSTOM_VERSION + default "custom" if BR2_TARGET_UBOOT_CUSTOM_TARBALL + default BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION \ + if BR2_TARGET_UBOOT_CUSTOM_GIT || BR2_TARGET_UBOOT_CUSTOM_HG + +config BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR + string "custom patch dir" + help + If your board requires custom patches, add the path to the + directory containing the patches here. The patches must be + named uboot-.patch. + + Most users may leave this empty + +choice + prompt "U-Boot binary format" + default BR2_TARGET_UBOOT_FORMAT_BIN + +config BR2_TARGET_UBOOT_FORMAT_AIS + bool "u-boot.ais" + help + AIS (Application Image Script) is a format defined by TI. + It is required to load code/data on OMAP-L1 processors. + u-boot.ais contains U-Boot with the SPL support. + +config BR2_TARGET_UBOOT_FORMAT_BIN + bool "u-boot.bin" + +config BR2_TARGET_UBOOT_FORMAT_IMG + bool "u-boot.img" + +config BR2_TARGET_UBOOT_FORMAT_IMX + bool "u-boot.imx" + +config BR2_TARGET_UBOOT_FORMAT_NAND_BIN + bool "u-boot-nand.bin" + +config BR2_TARGET_UBOOT_FORMAT_KWB + depends on BR2_arm + bool "u-boot.kwb (Marvell)" + +config BR2_TARGET_UBOOT_FORMAT_LDR + depends on BR2_bfin + bool "u-boot.ldr" + +config BR2_TARGET_UBOOT_FORMAT_ELF + bool "u-boot.elf" + +config BR2_TARGET_UBOOT_FORMAT_SB + depends on BR2_arm + bool "u-boot.sb" + +config BR2_TARGET_UBOOT_FORMAT_CUSTOM + bool "Custom (specify below)" + help + On some platforms, the standard U-Boot binary is not called + u-boot.bin, but u-boot.bin. If this is your case, + you should select this option and specify the correct name + in BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME. + +endchoice + +config BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME + string "U-Boot binary format: custom name" + depends on BR2_TARGET_UBOOT_FORMAT_CUSTOM + help + Specify the correct name of the output binary created by + U-Boot, if it is not one of the default names. For example: + u-boot_magic.bin + +config BR2_TARGET_UBOOT_OMAP_IFT + depends on BR2_TARGET_UBOOT_FORMAT_BIN + depends on BR2_arm || BR2_armeb + select BR2_PACKAGE_HOST_OMAP_U_BOOT_UTILS + bool "produce a .ift signed image (OMAP)" + help + Use gpsign to produce an image of u-boot.bin signed with + a Configuration Header for booting on OMAP processors. + This allows U-Boot to boot without the need for an + intermediate bootloader (e.g. x-loader) if it is written + on the first sector of the boot medium. + This only works for some media, such as NAND. Check your + chip documentation for details. You might also want to + read the documentation of gpsign, the tool that generates + the .ift image, at: + https://github.com/nmenon/omap-u-boot-utils/blob/master/README + +if BR2_TARGET_UBOOT_OMAP_IFT + +config BR2_TARGET_UBOOT_OMAP_IFT_CONFIG + string "gpsign Configuration Header config file" + help + The Configuration Header (CH) config file defines the + desired content of the CH for the signed image. + It usually contains external RAM settings and + possibly other external devices initialization. + The omap-u-boot-utils software contains example + configuration files for some boards: + https://github.com/nmenon/omap-u-boot-utils/tree/master/configs + +endif + +menuconfig BR2_TARGET_UBOOT_NETWORK + bool "Custom Network Settings" + help + Custom network settings for U-boot + +if BR2_TARGET_UBOOT_NETWORK + +config BR2_TARGET_UBOOT_SERVERIP + string "server ip" + default "10.175.196.221" + help + TFTP server ip address + +config BR2_TARGET_UBOOT_IPADDR + string "ip address" + default "10.175.196.18" + help + Target ip address + +config BR2_TARGET_UBOOT_GATEWAY + string "gateway ip" + default "10.175.196.1" + help + Gateway ip address + +config BR2_TARGET_UBOOT_NETMASK + string "netmask" + default "255.255.255.0" + help + Network Mask + +config BR2_TARGET_UBOOT_ETHADDR + string "ethernet address" + default "04:25:fe:ed:00:18" + help + Target MAC address for the ethernet interface. + This should be changed for production units + +config BR2_TARGET_UBOOT_ETH1ADDR + string "ethernet 2 address" + help + Target MAC address for the second ethernet interface. + +endif # BR2_TARGET_UBOOT_NETWORK + +config BR2_TARGET_UBOOT_SPL + bool "U-Boot SPL support" + depends on !BR2_TARGET_XLOADER + help + Enable the U-Boot SPL support. SPL is a first stage + bootloader loaded into internal memory in charge of + enabling and configuring the external memory (DDR), + and load the u-boot program into DDR. + +config BR2_TARGET_UBOOT_SPL_NAME + string "U-Boot SPL target name" + default "u-boot-spl.bin" + depends on BR2_TARGET_UBOOT_SPL + help + This is the name of the SPL binary, generated during + u-boot build. For most platform it is u-boot-spl.bin + but not always. It is MLO on OMAP for example. + +menuconfig BR2_TARGET_UBOOT_ENVIMAGE + bool "Environment image" + help + Generate a valid binary environment image from a text file + describing the key=value pairs of the environment. + + The environment image will be called uboot-env.bin. + +if BR2_TARGET_UBOOT_ENVIMAGE + +config BR2_TARGET_UBOOT_ENVIMAGE_SOURCE + string "Source file for environment" + help + Text file describing the environment. + +config BR2_TARGET_UBOOT_ENVIMAGE_SIZE + string "Size of environment" + help + Size of envronment, can be prefixed with 0x for hexadecimal + values. + +endif # BR2_TARGET_UBOOT_ENVIMAGE + +endif # BR2_TARGET_UBOOT diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk new file mode 100644 index 0000000000..06b75eddeb --- /dev/null +++ b/boot/uboot/uboot.mk @@ -0,0 +1,167 @@ +################################################################################ +# +# uboot +# +################################################################################ + +UBOOT_VERSION = $(call qstrip,$(BR2_TARGET_UBOOT_VERSION)) +UBOOT_BOARD_NAME = $(call qstrip,$(BR2_TARGET_UBOOT_BOARDNAME)) + +UBOOT_LICENSE = GPLv2+ +UBOOT_LICENSE_FILES = COPYING + +UBOOT_INSTALL_IMAGES = YES + +ifeq ($(UBOOT_VERSION),custom) +# Handle custom U-Boot tarballs as specified by the configuration +UBOOT_TARBALL = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION)) +UBOOT_SITE = $(patsubst %/,%,$(dir $(UBOOT_TARBALL))) +UBOOT_SOURCE = $(notdir $(UBOOT_TARBALL)) +else ifeq ($(BR2_TARGET_UBOOT_CUSTOM_GIT),y) +UBOOT_SITE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL)) +UBOOT_SITE_METHOD = git +else ifeq ($(BR2_TARGET_UBOOT_CUSTOM_HG),y) +UBOOT_SITE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL)) +UBOOT_SITE_METHOD = hg +else +# Handle stable official U-Boot versions +UBOOT_SITE = ftp://ftp.denx.de/pub/u-boot +UBOOT_SOURCE = u-boot-$(UBOOT_VERSION).tar.bz2 +endif + +ifeq ($(BR2_TARGET_UBOOT_FORMAT_ELF),y) +UBOOT_BIN = u-boot +else ifeq ($(BR2_TARGET_UBOOT_FORMAT_KWB),y) +UBOOT_BIN = u-boot.kwb +UBOOT_MAKE_TARGET = $(UBOOT_BIN) +else ifeq ($(BR2_TARGET_UBOOT_FORMAT_AIS),y) +UBOOT_BIN = u-boot.ais +UBOOT_MAKE_TARGET = $(UBOOT_BIN) +else ifeq ($(BR2_TARGET_UBOOT_FORMAT_LDR),y) +UBOOT_BIN = u-boot.ldr +else ifeq ($(BR2_TARGET_UBOOT_FORMAT_NAND_BIN),y) +UBOOT_BIN = u-boot-nand.bin +else ifeq ($(BR2_TARGET_UBOOT_FORMAT_IMG),y) +UBOOT_BIN = u-boot.img +else ifeq ($(BR2_TARGET_UBOOT_FORMAT_IMX),y) +UBOOT_BIN = u-boot.imx +else ifeq ($(BR2_TARGET_UBOOT_FORMAT_SB),y) +UBOOT_BIN = u-boot.sb +UBOOT_MAKE_TARGET = $(UBOOT_BIN) +UBOOT_DEPENDENCIES += host-elftosb +else ifeq ($(BR2_TARGET_UBOOT_FORMAT_CUSTOM),y) +UBOOT_BIN = $(call qstrip,$(BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME)) +else +UBOOT_BIN = u-boot.bin +UBOOT_BIN_IFT = $(UBOOT_BIN).ift +endif + +UBOOT_ARCH=$(KERNEL_ARCH) + +UBOOT_CONFIGURE_OPTS += CONFIG_NOSOFTFLOAT=1 +UBOOT_MAKE_OPTS += \ + CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" \ + ARCH=$(UBOOT_ARCH) + +# Helper function to fill the U-Boot config.h file. +# Argument 1: option name +# Argument 2: option value +# If the option value is empty, this function does nothing. +define insert_define +$(if $(call qstrip,$(2)), + @echo "#ifdef $(strip $(1))" >> $(@D)/include/config.h + @echo "#undef $(strip $(1))" >> $(@D)/include/config.h + @echo "#endif" >> $(@D)/include/config.h + @echo '#define $(strip $(1)) $(call qstrip,$(2))' >> $(@D)/include/config.h) +endef + +ifneq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR)),) +define UBOOT_APPLY_CUSTOM_PATCHES + support/scripts/apply-patches.sh $(@D) $(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR) \ + uboot-\*.patch +endef + +UBOOT_POST_PATCH_HOOKS += UBOOT_APPLY_CUSTOM_PATCHES +endif + +define UBOOT_CONFIGURE_CMDS + $(TARGET_CONFIGURE_OPTS) $(UBOOT_CONFIGURE_OPTS) \ + $(MAKE) -C $(@D) $(UBOOT_MAKE_OPTS) \ + $(UBOOT_BOARD_NAME)_config + @echo >> $(@D)/include/config.h + @echo "/* Add a wrapper around the values Buildroot sets. */" >> $(@D)/include/config.h + @echo "#ifndef __BR2_ADDED_CONFIG_H" >> $(@D)/include/config.h + @echo "#define __BR2_ADDED_CONFIG_H" >> $(@D)/include/config.h + $(call insert_define,DATE,$(DATE)) + $(call insert_define,CONFIG_LOAD_SCRIPTS,1) + $(call insert_define,CONFIG_IPADDR,$(BR2_TARGET_UBOOT_IPADDR)) + $(call insert_define,CONFIG_GATEWAYIP,$(BR2_TARGET_UBOOT_GATEWAY)) + $(call insert_define,CONFIG_NETMASK,$(BR2_TARGET_UBOOT_NETMASK)) + $(call insert_define,CONFIG_SERVERIP,$(BR2_TARGET_UBOOT_SERVERIP)) + $(call insert_define,CONFIG_ETHADDR,$(BR2_TARGET_UBOOT_ETHADDR)) + $(call insert_define,CONFIG_ETH1ADDR,$(BR2_TARGET_UBOOT_ETH1ADDR)) + @echo "#endif /* __BR2_ADDED_CONFIG_H */" >> $(@D)/include/config.h +endef + +define UBOOT_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(UBOOT_CONFIGURE_OPTS) \ + $(MAKE) -C $(@D) $(UBOOT_MAKE_OPTS) \ + $(UBOOT_MAKE_TARGET) +endef + +define UBOOT_BUILD_OMAP_IFT + $(HOST_DIR)/usr/bin/gpsign -f $(@D)/u-boot.bin \ + -c $(call qstrip,$(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG)) +endef + +define UBOOT_INSTALL_IMAGES_CMDS + cp -dpf $(@D)/$(UBOOT_BIN) $(BINARIES_DIR)/ + $(if $(BR2_TARGET_UBOOT_SPL), + cp -dpf $(@D)/$(BR2_TARGET_UBOOT_SPL_NAME) $(BINARIES_DIR)/) + $(if $(BR2_TARGET_UBOOT_ENVIMAGE), + $(HOST_DIR)/usr/bin/mkenvimage -s $(BR2_TARGET_UBOOT_ENVIMAGE_SIZE) \ + -o $(BINARIES_DIR)/uboot-env.bin $(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE)) +endef + +define UBOOT_INSTALL_OMAP_IFT_IMAGE + cp -dpf $(@D)/$(UBOOT_BIN_IFT) $(BINARIES_DIR)/ +endef + +ifeq ($(BR2_TARGET_UBOOT_OMAP_IFT),y) +# we NEED a config file unless we're at make source +ifeq ($(filter source,$(MAKECMDGOALS)),) +ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG)),) +$(error No gpsign config file. Check your BR2_TARGET_UBOOT_OMAP_IFT_CONFIG setting) +endif +ifeq ($(wildcard $(call qstrip,$(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG))),) +$(error gpsign config file $(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG) not found. Check your BR2_TARGET_UBOOT_OMAP_IFT_CONFIG setting) +endif +endif +UBOOT_DEPENDENCIES += host-omap-u-boot-utils +UBOOT_POST_BUILD_HOOKS += UBOOT_BUILD_OMAP_IFT +UBOOT_POST_INSTALL_IMAGES_HOOKS += UBOOT_INSTALL_OMAP_IFT_IMAGE +endif + +ifeq ($(BR2_TARGET_UBOOT_ENVIMAGE),y) +# we NEED a environment settings unless we're at make source +ifeq ($(filter source,$(MAKECMDGOALS)),) +ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE)),) +$(error Please define a source file for Uboot environment (BR2_TARGET_UBOOT_ENVIMAGE_SOURCE setting)) +endif +ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SIZE)),) +$(error Please provide Uboot environment size (BR2_TARGET_UBOOT_ENVIMAGE_SIZE setting)) +endif +endif +UBOOT_DEPENDENCIES += host-uboot-tools +endif + +$(eval $(generic-package)) + +ifeq ($(BR2_TARGET_UBOOT),y) +# we NEED a board name unless we're at make source +ifeq ($(filter source,$(MAKECMDGOALS)),) +ifeq ($(UBOOT_BOARD_NAME),) +$(error NO U-Boot board name set. Check your BR2_TARGET_UBOOT_BOARDNAME setting) +endif +endif +endif diff --git a/boot/xloader/Config.in b/boot/xloader/Config.in new file mode 100644 index 0000000000..c411be478b --- /dev/null +++ b/boot/xloader/Config.in @@ -0,0 +1,15 @@ +config BR2_TARGET_XLOADER + bool "X-loader" + depends on BR2_cortex_a8 || BR2_cortex_a9 + help + The x-loader bootloader. It is mainly used on OMAP-based + platforms. + +if BR2_TARGET_XLOADER +config BR2_TARGET_XLOADER_BOARDNAME + string "x-loader board name" + help + One of x-loader supported boards to be built. + This will be suffixed with _config to meet x-loader + standard naming. +endif diff --git a/boot/xloader/xloader.mk b/boot/xloader/xloader.mk new file mode 100644 index 0000000000..00c63b1efb --- /dev/null +++ b/boot/xloader/xloader.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# x-loader +# +################################################################################ + +XLOADER_VERSION = 6f3a26101303051e0f91b6213735b68ce804e94e +XLOADER_SITE = git://gitorious.org/x-loader/x-loader.git +XLOADER_BOARD_NAME = $(call qstrip,$(BR2_TARGET_XLOADER_BOARDNAME)) + +XLOADER_LICENSE = GPLv2+ +XLOADER_LICENSE_FILES = README + +XLOADER_INSTALL_IMAGES = YES + +define XLOADER_BUILD_CMDS + $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) $(XLOADER_BOARD_NAME)_config + $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) all + $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) ift +endef + +define XLOADER_INSTALL_IMAGES_CMDS + $(INSTALL) -D -m 0755 $(@D)/MLO $(BINARIES_DIR)/ +endef + +$(eval $(generic-package)) + +ifeq ($(BR2_TARGET_XLOADER),y) +# we NEED a board name unless we're at make source +ifeq ($(filter source,$(MAKECMDGOALS)),) +ifeq ($(XLOADER_BOARD_NAME),) +$(error NO x-loader board name set. Check your BR2_BOOT_XLOADER_BOARDNAME setting) +endif +endif + +endif diff --git a/configs/amlogic_xios-xbmc-qt-webkit_defconfig b/configs/amlogic_xios-xbmc-qt-webkit_defconfig index 529f4aa433..441b11448d 100644 --- a/configs/amlogic_xios-xbmc-qt-webkit_defconfig +++ b/configs/amlogic_xios-xbmc-qt-webkit_defconfig @@ -1,40 +1,49 @@ BR2_arm=y BR2_cortex_a9=y -BR2_KERNEL_MIRROR="git://github.com/Pivosgroup/buildroot-linux-kernel.git" +# BR2_SOFT_FLOAT is not set BR2_OPTIMIZE_3=y BR2_TOOLCHAIN_EXTERNAL=y -BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2010Q1=y -BR2_PACKAGE_GDB=y -BR2_PACKAGE_GDB_SERVER=y -BR2_GDB_VERSION_7_1=y +BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y +BR2_TOOLCHAIN_EXTERNAL_URL="http://sourcery.mentor.com/sgpp/lite/arm/portal/package6488/public/arm-none-linux-gnueabi/arm-2010q1-202-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2" +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-none-linux-gnueabi" +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y +BR2_TOOLCHAIN_EXTERNAL_INET_RPC=y +BR2_TOOLCHAIN_EXTERNAL_CXX=y +BR2_GDB_VERSION_7_4=y BR2_ENABLE_LOCALE_PURGE=y BR2_ENABLE_LOCALE_WHITELIST="" BR2_EXT_TOOL_DIRS_EXTRA="/usr/lib/gconv /usr/share/zoneinfo" -# BR2_SOFT_FLOAT is not set BR2_TARGET_OPTIMIZATION="-pipe -mfloat-abi=softfp -mfpu=neon" BR2_BOARD_TYPE_AMLOGIC_M1=y BR2_TARGET_GENERIC_GETTY=y -BR2_BUSYBOX_VERSION_1_17_X=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV=y +BR2_ROOTFS_SKELETON_CUSTOM=y +BR2_ROOTFS_SKELETON_CUSTOM_PATH="board/amlogic/xios/skeleton" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://github.com/Pivosgroup/buildroot-linux-kernel.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="e4430d8a0b5d7d18b112b920d2fe1a4e36397f87" +BR2_LINUX_KERNEL_DEFCONFIG="meson_xios" +BR2_BUSYBOX_VERSION_1_20_X=y BR2_PACKAGE_BUSYBOX_CONFIG="board/amlogic/xios/busybox.config" BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y BR2_PACKAGE_UBOOTAML=y BR2_PACKAGE_LIRC=y BR2_PACKAGE_XBMC=y -BR2_PACKAGE_XIOS=y -BR2_PACKAGE_DBUS_PYTHON=y +BR2_PACKAGE_XIOS_SKIN=y +BR2_PACKAGE_GDB=y +BR2_PACKAGE_GDB_SERVER=y BR2_PACKAGE_DOSFSTOOLS=y -BR2_PACKAGE_DOSFSTOOLS_MKDOSFS=y -BR2_PACKAGE_DOSFSTOOLS_DOSFSCK=y -BR2_PACKAGE_DOSFSTOOLS_DOSFSLABEL=y +BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y +BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y +BR2_PACKAGE_DOSFSTOOLS_FATLABEL=y BR2_PACKAGE_E2FSPROGS=y -BR2_PACKAGE_E2FSPROGS_UTILS=y BR2_PACKAGE_MTD=y BR2_PACKAGE_MTD_FLASH_OTP_DUMP=y BR2_PACKAGE_MTD_FLASH_OTP_INFO=y BR2_PACKAGE_NTFS_3G=y -BR2_PACKAGE_NTFSPROGS=y -# BR2_PACKAGE_UDEV_MTD_PROBE is not set -BR2_PACKAGE_LIBDAEMON=y +BR2_PACKAGE_NTFS_3G_NTFSPROGS=y BR2_PACKAGE_QT=y BR2_PACKAGE_QT_DEMOS=y BR2_PACKAGE_QT_LICENSE_APPROVED=y @@ -49,11 +58,42 @@ BR2_PACKAGE_QT_KEYBOARD_LINUXINPUT=y BR2_PACKAGE_QT_DBUS=y BR2_PACKAGE_QT_SVG=y BR2_PACKAGE_QT_WEBKIT=y +BR2_PACKAGE_DBUS_PYTHON=y +# BR2_PACKAGE_UDEV_MTD_PROBE is not set BR2_PACKAGE_MYSQL_CLIENT_LIB_ONLY=y +BR2_PACKAGE_JPEG_TURBO=y +BR2_PACKAGE_LIBDAEMON=y BR2_PACKAGE_DROPBEAR=y BR2_PACKAGE_IPROUTE2=y BR2_PACKAGE_NTP=y BR2_PACKAGE_NTP_NTPDATE=y +BR2_PACKAGE_SAMBA_CIFS=n +BR2_PACKAGE_SAMBA_EVENTLOGADM=n +BR2_PACKAGE_SAMBA_NET=n +BR2_PACKAGE_SAMBA_NMBD=n +BR2_PACKAGE_SAMBA_NMBLOOKUP=n +BR2_PACKAGE_SAMBA_NTLM_AUTH=n +BR2_PACKAGE_SAMBA_PDBEDIT=n +BR2_PACKAGE_SAMBA_PROFILES=n +BR2_PACKAGE_SAMBA_RPCCLIENT=n +BR2_PACKAGE_SAMBA_SMBCACLS=n +BR2_PACKAGE_SAMBA_SMBCLIENT=n +BR2_PACKAGE_SAMBA_SMBCONTROL=n +BR2_PACKAGE_SAMBA_SMBCQUOTAS=n +BR2_PACKAGE_SAMBA_SMBD=n +BR2_PACKAGE_SAMBA_SMBGET=n +BR2_PACKAGE_SAMBA_SMBLDBTOOLS=n +BR2_PACKAGE_SAMBA_SMBPASSWD=n +BR2_PACKAGE_SAMBA_SMBSHARESEC=n +BR2_PACKAGE_SAMBA_SMBSPOOL=n +BR2_PACKAGE_SAMBA_SMBSTATUS=n +BR2_PACKAGE_SAMBA_SMBTREE=n +BR2_PACKAGE_SAMBA_SWAT=n +BR2_PACKAGE_SAMBA_SMBTAR=n +BR2_PACKAGE_SAMBA_TDB=n +BR2_PACKAGE_SAMBA_TESTPARM=n +BR2_PACKAGE_SAMBA_WINBINDD=n +BR2_PACKAGE_SAMBA_WBINFO=n BR2_PACKAGE_WIRELESS_TOOLS=y BR2_PACKAGE_WIRELESS_TOOLS_LIB=y BR2_PACKAGE_WPA_SUPPLICANT=y @@ -61,13 +101,6 @@ BR2_PACKAGE_WPA_SUPPLICANT_CLI=y BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y BR2_PACKAGE_WPA_SUPPLICANT_WPS=y BR2_PACKAGE_NANO=y -BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV=y -BR2_ROOTFS_SKELETON_CUSTOM=y -BR2_ROOTFS_SKELETON_CUSTOM_PATH="board/amlogic/xios/skeleton" # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_ROOTFS_RECOVERY_AML=y BR2_TARGET_ROOTFS_RECOVERY_AML_BOARDNAME="stvm3" -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="e4430d8a0b5d7d18b112b920d2fe1a4e36397f87" -BR2_LINUX_KERNEL_DEFCONFIG="meson_xios" diff --git a/configs/amlogic_xios-xbmc_defconfig b/configs/amlogic_xios-xbmc_defconfig index 515480faba..11a3a77246 100644 --- a/configs/amlogic_xios-xbmc_defconfig +++ b/configs/amlogic_xios-xbmc_defconfig @@ -1,57 +1,91 @@ BR2_arm=y BR2_cortex_a9=y -BR2_KERNEL_MIRROR="git://github.com/Pivosgroup/buildroot-linux-kernel.git" +# BR2_SOFT_FLOAT is not set BR2_OPTIMIZE_3=y BR2_TOOLCHAIN_EXTERNAL=y -BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2010Q1=y -BR2_PACKAGE_GDB=y -BR2_PACKAGE_GDB_SERVER=y -BR2_GDB_VERSION_7_1=y +BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y +BR2_TOOLCHAIN_EXTERNAL_URL="http://sourcery.mentor.com/sgpp/lite/arm/portal/package6488/public/arm-none-linux-gnueabi/arm-2010q1-202-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2" +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-none-linux-gnueabi" +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y +BR2_TOOLCHAIN_EXTERNAL_INET_RPC=y +BR2_TOOLCHAIN_EXTERNAL_CXX=y +BR2_GDB_VERSION_7_5=y BR2_ENABLE_LOCALE_PURGE=y BR2_ENABLE_LOCALE_WHITELIST="" BR2_EXT_TOOL_DIRS_EXTRA="/usr/lib/gconv /usr/share/zoneinfo" -# BR2_SOFT_FLOAT is not set BR2_TARGET_OPTIMIZATION="-pipe -mfloat-abi=softfp -mfpu=neon" BR2_BOARD_TYPE_AMLOGIC_M1=y BR2_TARGET_GENERIC_GETTY=y -BR2_BUSYBOX_VERSION_1_17_X=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV=y +BR2_ROOTFS_SKELETON_CUSTOM=y +BR2_ROOTFS_SKELETON_CUSTOM_PATH="board/amlogic/xios/skeleton" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://github.com/Pivosgroup/buildroot-linux-kernel.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="e4430d8a0b5d7d18b112b920d2fe1a4e36397f87" +BR2_LINUX_KERNEL_DEFCONFIG="meson_xios" +BR2_BUSYBOX_VERSION_1_20_X=y BR2_PACKAGE_BUSYBOX_CONFIG="board/amlogic/xios/busybox.config" BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y BR2_PACKAGE_UBOOTAML=y BR2_PACKAGE_LIRC=y BR2_PACKAGE_XBMC=y -BR2_PACKAGE_XIOS=y +BR2_PACKAGE_XIOS_SKIN=y +BR2_PACKAGE_GDB=y +BR2_PACKAGE_GDB_SERVER=y BR2_PACKAGE_DOSFSTOOLS=y -BR2_PACKAGE_DOSFSTOOLS_MKDOSFS=y -BR2_PACKAGE_DOSFSTOOLS_DOSFSCK=y -BR2_PACKAGE_DOSFSTOOLS_DOSFSLABEL=y +BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y +BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y +BR2_PACKAGE_DOSFSTOOLS_FATLABEL=y BR2_PACKAGE_E2FSPROGS=y -BR2_PACKAGE_E2FSPROGS_UTILS=y BR2_PACKAGE_MTD=y BR2_PACKAGE_NTFS_3G=y -BR2_PACKAGE_NTFSPROGS=n +BR2_PACKAGE_NTFS_3G_NTFSPROGS=n # BR2_PACKAGE_UDEV_MTD_PROBE is not set BR2_PACKAGE_USBMOUNT=y -BR2_PACKAGE_UTIL_LINUX_MOUNT=y BR2_PACKAGE_MYSQL_CLIENT_LIB_ONLY=y +BR2_PACKAGE_JPEG_TURBO=y BR2_PACKAGE_DROPBEAR=y BR2_PACKAGE_IPROUTE2=y BR2_PACKAGE_NTP=y BR2_PACKAGE_NTP_NTPDATE=y +BR2_PACKAGE_SAMBA_CIFS=n +BR2_PACKAGE_SAMBA_EVENTLOGADM=n +BR2_PACKAGE_SAMBA_NET=n +BR2_PACKAGE_SAMBA_NMBD=n +BR2_PACKAGE_SAMBA_NMBLOOKUP=n +BR2_PACKAGE_SAMBA_NTLM_AUTH=n +BR2_PACKAGE_SAMBA_PDBEDIT=n +BR2_PACKAGE_SAMBA_PROFILES=n +BR2_PACKAGE_SAMBA_RPCCLIENT=n +BR2_PACKAGE_SAMBA_SMBCACLS=n +BR2_PACKAGE_SAMBA_SMBCLIENT=n +BR2_PACKAGE_SAMBA_SMBCONTROL=n +BR2_PACKAGE_SAMBA_SMBCQUOTAS=n +BR2_PACKAGE_SAMBA_SMBD=n +BR2_PACKAGE_SAMBA_SMBGET=n +BR2_PACKAGE_SAMBA_SMBLDBTOOLS=n +BR2_PACKAGE_SAMBA_SMBPASSWD=n +BR2_PACKAGE_SAMBA_SMBSHARESEC=n +BR2_PACKAGE_SAMBA_SMBSPOOL=n +BR2_PACKAGE_SAMBA_SMBSTATUS=n +BR2_PACKAGE_SAMBA_SMBTREE=n +BR2_PACKAGE_SAMBA_SWAT=n +BR2_PACKAGE_SAMBA_SMBTAR=n +BR2_PACKAGE_SAMBA_TDB=n +BR2_PACKAGE_SAMBA_TESTPARM=n +BR2_PACKAGE_SAMBA_WINBINDD=n +BR2_PACKAGE_SAMBA_WBINFO=n BR2_PACKAGE_WIRELESS_TOOLS=y BR2_PACKAGE_WIRELESS_TOOLS_LIB=y BR2_PACKAGE_WPA_SUPPLICANT=y BR2_PACKAGE_WPA_SUPPLICANT_CLI=y BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y BR2_PACKAGE_WPA_SUPPLICANT_WPS=y +BR2_PACKAGE_UTIL_LINUX_BINARIES=y +BR2_PACKAGE_UTIL_LINUX_MOUNT=y BR2_PACKAGE_NANO=y -BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV=y -BR2_ROOTFS_SKELETON_CUSTOM=y -BR2_ROOTFS_SKELETON_CUSTOM_PATH="board/amlogic/xios/skeleton" # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_ROOTFS_RECOVERY_AML=y BR2_TARGET_ROOTFS_RECOVERY_AML_BOARDNAME="stvm3" -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="e4430d8a0b5d7d18b112b920d2fe1a4e36397f87" -BR2_LINUX_KERNEL_DEFCONFIG="meson_xios" diff --git a/configs/amlogic_xios_m3-xbmc_defconfig b/configs/amlogic_xios_m3-xbmc_defconfig index bd2371ac9b..c9b6a98f9a 100644 --- a/configs/amlogic_xios_m3-xbmc_defconfig +++ b/configs/amlogic_xios_m3-xbmc_defconfig @@ -1,58 +1,92 @@ BR2_arm=y BR2_cortex_a9=y -BR2_KERNEL_MIRROR="git://github.com/Pivosgroup/buildroot-linux-kernel-m3.git" +# BR2_SOFT_FLOAT is not set BR2_OPTIMIZE_3=y BR2_TOOLCHAIN_EXTERNAL=y -BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2010Q1=y -BR2_PACKAGE_GDB=y -BR2_PACKAGE_GDB_HOST=y -BR2_PACKAGE_GDB_SERVER=y -BR2_GDB_VERSION_7_1=y +BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y +BR2_TOOLCHAIN_EXTERNAL_URL="http://sourcery.mentor.com/sgpp/lite/arm/portal/package6488/public/arm-none-linux-gnueabi/arm-2010q1-202-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2" +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-none-linux-gnueabi" +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y +BR2_TOOLCHAIN_EXTERNAL_INET_RPC=y +BR2_TOOLCHAIN_EXTERNAL_CXX=y +BR2_PACKAGE_HOST_GDB=y +BR2_GDB_VERSION_7_5=y BR2_ENABLE_LOCALE_PURGE=y BR2_ENABLE_LOCALE_WHITELIST="" BR2_EXT_TOOL_DIRS_EXTRA="/usr/lib/gconv /usr/share/zoneinfo" -# BR2_SOFT_FLOAT is not set BR2_TARGET_OPTIMIZATION="-pipe -mfloat-abi=softfp -mfpu=neon" BR2_TARGET_GENERIC_GETTY=y -BR2_BUSYBOX_VERSION_1_17_X=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV=y +BR2_ROOTFS_SKELETON_CUSTOM=y +BR2_ROOTFS_SKELETON_CUSTOM_PATH="board/amlogic/xios/skeleton" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://github.com/Pivosgroup/buildroot-linux-kernel-m3.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="6854f5fafcf287f2c76c35fc641d44106d3888a3" +BR2_LINUX_KERNEL_DEFCONFIG="meson_xios_m3" +BR2_BUSYBOX_VERSION_1_20_X=y BR2_PACKAGE_BUSYBOX_CONFIG="board/amlogic/xios/busybox.config" BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y BR2_PACKAGE_UBOOTAML=y BR2_PACKAGE_LIRC=y BR2_PACKAGE_XBMC=y -BR2_PACKAGE_XIOS=y +BR2_PACKAGE_XIOS_SKIN=y +BR2_PACKAGE_GDB=y +BR2_PACKAGE_GDB_SERVER=y BR2_PACKAGE_DOSFSTOOLS=y -BR2_PACKAGE_DOSFSTOOLS_MKDOSFS=y -BR2_PACKAGE_DOSFSTOOLS_DOSFSCK=y -BR2_PACKAGE_DOSFSTOOLS_DOSFSLABEL=y +BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y +BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y +BR2_PACKAGE_DOSFSTOOLS_FATLABEL=y BR2_PACKAGE_E2FSPROGS=y -BR2_PACKAGE_E2FSPROGS_UTILS=y BR2_PACKAGE_MTD=y BR2_PACKAGE_NTFS_3G=y -BR2_PACKAGE_NTFSPROGS=n +BR2_PACKAGE_NTFS_3G_NTFSPROGS=n # BR2_PACKAGE_UDEV_MTD_PROBE is not set BR2_PACKAGE_USBMOUNT=y -BR2_PACKAGE_UTIL_LINUX_MOUNT=y BR2_PACKAGE_MYSQL_CLIENT_LIB_ONLY=y +BR2_PACKAGE_JPEG_TURBO=y BR2_PACKAGE_DROPBEAR=y -BR2_PACKAGE_PROFTPD=y BR2_PACKAGE_IPROUTE2=y BR2_PACKAGE_NTP=y BR2_PACKAGE_NTP_NTPDATE=y +BR2_PACKAGE_PROFTPD=y +BR2_PACKAGE_SAMBA_CIFS=n +BR2_PACKAGE_SAMBA_EVENTLOGADM=n +BR2_PACKAGE_SAMBA_NET=n +BR2_PACKAGE_SAMBA_NMBD=n +BR2_PACKAGE_SAMBA_NMBLOOKUP=n +BR2_PACKAGE_SAMBA_NTLM_AUTH=n +BR2_PACKAGE_SAMBA_PDBEDIT=n +BR2_PACKAGE_SAMBA_PROFILES=n +BR2_PACKAGE_SAMBA_RPCCLIENT=n +BR2_PACKAGE_SAMBA_SMBCACLS=n +BR2_PACKAGE_SAMBA_SMBCLIENT=n +BR2_PACKAGE_SAMBA_SMBCONTROL=n +BR2_PACKAGE_SAMBA_SMBCQUOTAS=n +BR2_PACKAGE_SAMBA_SMBD=n +BR2_PACKAGE_SAMBA_SMBGET=n +BR2_PACKAGE_SAMBA_SMBLDBTOOLS=n +BR2_PACKAGE_SAMBA_SMBPASSWD=n +BR2_PACKAGE_SAMBA_SMBSHARESEC=n +BR2_PACKAGE_SAMBA_SMBSPOOL=n +BR2_PACKAGE_SAMBA_SMBSTATUS=n +BR2_PACKAGE_SAMBA_SMBTREE=n +BR2_PACKAGE_SAMBA_SWAT=n +BR2_PACKAGE_SAMBA_SMBTAR=n +BR2_PACKAGE_SAMBA_TDB=n +BR2_PACKAGE_SAMBA_TESTPARM=n +BR2_PACKAGE_SAMBA_WINBINDD=n +BR2_PACKAGE_SAMBA_WBINFO=n BR2_PACKAGE_WIRELESS_TOOLS=y BR2_PACKAGE_WIRELESS_TOOLS_LIB=y BR2_PACKAGE_WPA_SUPPLICANT=y BR2_PACKAGE_WPA_SUPPLICANT_CLI=y BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y BR2_PACKAGE_WPA_SUPPLICANT_WPS=y +BR2_PACKAGE_UTIL_LINUX_BINARIES=y +BR2_PACKAGE_UTIL_LINUX_MOUNT=y BR2_PACKAGE_NANO=y -BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV=y -BR2_ROOTFS_SKELETON_CUSTOM=y -BR2_ROOTFS_SKELETON_CUSTOM_PATH="board/amlogic/xios/skeleton" # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_ROOTFS_RECOVERY_AML=y BR2_TARGET_ROOTFS_RECOVERY_AML_BOARDNAME="xiosm3" -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6854f5fafcf287f2c76c35fc641d44106d3888a3" -BR2_LINUX_KERNEL_DEFCONFIG="meson_xios_m3" diff --git a/configs/arm_foundationv8_defconfig b/configs/arm_foundationv8_defconfig new file mode 100644 index 0000000000..c8de16da86 --- /dev/null +++ b/configs/arm_foundationv8_defconfig @@ -0,0 +1,15 @@ +BR2_aarch64=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_BOOT_WRAPPER_AARCH64=y +BR2_TARGET_BOOT_WRAPPER_AARCH64_DTS="vexpress-foundation-v8" +BR2_TARGET_BOOT_WRAPPER_AARCH64_BOOTARGS="root=/dev/vda consolelog=9 console=ttyAMA0 rw" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.linaro.org/kernel/linaro-aarch64.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="7181edd0539e195f78adedbb6c3878f9f1e0c4bb" +BR2_LINUX_KERNEL_DEFCONFIG="vexpress" +BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y +BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image" diff --git a/configs/arm_nptl_toolchain_defconfig b/configs/arm_nptl_toolchain_defconfig deleted file mode 100644 index 8100073b39..0000000000 --- a/configs/arm_nptl_toolchain_defconfig +++ /dev/null @@ -1,17 +0,0 @@ -# Architecture -BR2_arm=y -BR2_arm926t=y - -# Toolchain options -BR2_LARGEFILE=y -BR2_INET_IPV6=y -BR2_INET_RPC=y -BR2_ENABLE_LOCALE=y -BR2_USE_WCHAR=y -BR2_PTHREADS_NATIVE=y -BR2_INSTALL_LIBSTDCPP=y - -# No package -# BR2_PACKAGE_BUSYBOX is not set - -# No filesystem (toolchain only) diff --git a/configs/arm_toolchain_defconfig b/configs/arm_toolchain_defconfig deleted file mode 100644 index 8bc97c98cf..0000000000 --- a/configs/arm_toolchain_defconfig +++ /dev/null @@ -1,15 +0,0 @@ -# Architecture -BR2_arm=y - -# Common Toolchain Options -BR2_LARGEFILE=y -BR2_INET_IPV6=y -BR2_INET_RPC=y -BR2_ENABLE_LOCALE=y -BR2_USE_WCHAR=y -BR2_INSTALL_LIBSTDCPP=y - -# No package -# BR2_PACKAGE_BUSYBOX is not set - -# No filesystem (toolchain only) diff --git a/configs/armadeus_apf27_defconfig b/configs/armadeus_apf27_defconfig new file mode 100644 index 0000000000..09d491c644 --- /dev/null +++ b/configs/armadeus_apf27_defconfig @@ -0,0 +1,28 @@ +# Architecture +BR2_arm=y +BR2_arm926t=y + +# Lock down headers to avoid breaking with new defaults +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.8.4" + +# System +BR2_TARGET_GENERIC_HOSTNAME="apf27" +BR2_TARGET_GENERIC_ISSUE="Welcome to Armadeus development platform !" +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" + +# Filesystem +BR2_TARGET_ROOTFS_UBIFS=y +BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=2047 +BR2_TARGET_ROOTFS_UBI=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.8.4" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/armadeus/apf27/linux-3.8.config" +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0xA0008000" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx27-apf27" diff --git a/configs/armadeus_apf28_defconfig b/configs/armadeus_apf28_defconfig new file mode 100644 index 0000000000..ae443e11de --- /dev/null +++ b/configs/armadeus_apf28_defconfig @@ -0,0 +1,29 @@ +# Architecture +BR2_arm=y +BR2_arm926t=y + +# Lock down headers to avoid breaking with new defaults +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.8.1" + +# System +BR2_TARGET_GENERIC_HOSTNAME="apf28" +BR2_TARGET_GENERIC_ISSUE="Welcome to Armadeus development platform !" +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + +# Filesystem +BR2_TARGET_ROOTFS_UBIFS=y +BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x1f000 +BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=4227 +BR2_TARGET_ROOTFS_UBI=y +BR2_TARGET_ROOTFS_UBI_SUBSIZE=0 + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.8.1" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/armadeus/apf28/linux-3.8.config" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx28-apf28dev" diff --git a/configs/armadeus_apf9328_defconfig b/configs/armadeus_apf9328_defconfig new file mode 100644 index 0000000000..33e9a766bc --- /dev/null +++ b/configs/armadeus_apf9328_defconfig @@ -0,0 +1,36 @@ +# Architecture +BR2_arm=y +BR2_arm920t=y + +# Toolchain +BR2_STRIP_sstrip=y +BR2_GCC_VERSION_4_4_X=y +BR2_PACKAGE_GDB=y +BR2_PACKAGE_HOST_GDB=y +BR2_ENABLE_LOCALE_PURGE=y +BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y +BR2_TOOLCHAIN_BUILDROOT_INET_IPV6=y +BR2_TOOLCHAIN_BUILDROOT_INET_RPC=y +BR2_TOOLCHAIN_BUILDROOT_LOCALE=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y + + +# Lock down headers to avoid breaking with new defaults +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.1.1" + +# System +BR2_TARGET_GENERIC_HOSTNAME="apf9328" +BR2_TARGET_GENERIC_ISSUE="Welcome to Armadeus development platform !" +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" + +# Filesystem +BR2_TARGET_ROOTFS_JFFS2=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.1.1" +BR2_LINUX_KERNEL_PATCH="board/armadeus/apf9328" +BR2_LINUX_KERNEL_DEFCONFIG="mx1" diff --git a/configs/at91rm9200df_defconfig b/configs/at91rm9200df_defconfig index 4229155a7c..5994f43e99 100644 --- a/configs/at91rm9200df_defconfig +++ b/configs/at91rm9200df_defconfig @@ -1,5 +1,6 @@ # Architecture BR2_arm=y +BR2_arm920t=y # Filesystem BR2_TARGET_ROOTFS_JFFS2=y @@ -9,15 +10,21 @@ BR2_TARGET_ROOTFS_JFFS2_EBSIZE=0x2100 BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER=y BR2_TARGET_ROOTFS_JFFS2_LE=y +# Lock down headers to avoid breaking with new defaults +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="2.6.38.8" +BR2_DEFAULT_KERNEL_HEADERS="2.6.38.8" + # Bootloader BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BOARDNAME="at91rm9200ek" -BR2_TARGET_UBOOT_2010_06=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2010.06" # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.33" -BR2_LINUX_KERNEL_PATCH="http://maxim.org.za/AT91RM9200/2.6/2.6.33-at91.patch.gz" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.38.8" +BR2_LINUX_KERNEL_PATCH="http://maxim.org.za/AT91RM9200/2.6/2.6.38-at91.patch.gz" BR2_LINUX_KERNEL_USE_DEFCONFIG=y BR2_LINUX_KERNEL_DEFCONFIG="at91rm9200ek" diff --git a/configs/at91sam9260dfc_defconfig b/configs/at91sam9260dfc_defconfig index 13748d37a5..20389f3ffb 100644 --- a/configs/at91sam9260dfc_defconfig +++ b/configs/at91sam9260dfc_defconfig @@ -1,23 +1,19 @@ # Architecture BR2_arm=y +BR2_arm926t=y + +# Host utilities +# +BR2_PACKAGE_HOST_SAM_BA=y # First stage bootloader BR2_TARGET_AT91BOOTSTRAP=y BR2_TARGET_AT91BOOTSTRAP_BOARD="at91sam9260ek" -BR2_TARGET_AT91BOOTSTRAP_DATAFLASHCARD=y # Second stage bootloader BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="at91sam9260ek" -BR2_TARGET_UBOOT_2010_06=y +BR2_TARGET_UBOOT_BOARDNAME="at91sam9260ek_dataflash_cs0" # Kernel BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.33" -BR2_LINUX_KERNEL_PATCH="http://maxim.org.za/AT91RM9200/2.6/2.6.33-at91.patch.gz" -BR2_LINUX_KERNEL_USE_DEFCONFIG=y -BR2_LINUX_KERNEL_DEFCONFIG="at91sam9260ek" - -# Filesystem -BR2_TARGET_ROOTFS_TAR=y +BR2_LINUX_KERNEL_DEFCONFIG="at91sam9260_9g20" diff --git a/configs/at91sam9260eknf_defconfig b/configs/at91sam9260eknf_defconfig new file mode 100644 index 0000000000..895add141a --- /dev/null +++ b/configs/at91sam9260eknf_defconfig @@ -0,0 +1,32 @@ +# Architecture +BR2_arm=y +BR2_arm926t=y + +# Toolchain +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.9.1" + +# System +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y + +# Packages +BR2_PACKAGE_HOST_SAM_BA=y + +# Filesystem +BR2_TARGET_ROOTFS_UBIFS=y +BR2_TARGET_ROOTFS_UBI=y + +# Bootloaders +BR2_TARGET_AT91BOOTSTRAP=y +BR2_TARGET_AT91BOOTSTRAP_BOARD="at91sam9260ek" +BR2_TARGET_AT91BOOTSTRAP_NANDFLASH=y +BR2_TARGET_BAREBOX=y +BR2_TARGET_BAREBOX_BOARD_DEFCONFIG="at91sam9260ek" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.9.1" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/atmel/at91sam9260ek/linux-3.9.config" +BR2_LINUX_KERNEL_ZIMAGE=y diff --git a/configs/at91sam9261ek_defconfig b/configs/at91sam9261ek_defconfig index cea28cbd95..0824a00fac 100644 --- a/configs/at91sam9261ek_defconfig +++ b/configs/at91sam9261ek_defconfig @@ -2,23 +2,18 @@ BR2_arm=y BR2_arm926t=y +# Host utilities +# +BR2_PACKAGE_HOST_SAM_BA=y + # First stage bootloader BR2_TARGET_AT91BOOTSTRAP=y BR2_TARGET_AT91BOOTSTRAP_BOARD="at91sam9261ek" -BR2_TARGET_AT91BOOTSTRAP_DATAFLASHCARD=y # Second stage bootloader BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="at91sam9261ek" -BR2_TARGET_UBOOT_2010_06=y +BR2_TARGET_UBOOT_BOARDNAME="at91sam9261ek_dataflash_cs0" # Kernel BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.33" -BR2_LINUX_KERNEL_PATCH="http://maxim.org.za/AT91RM9200/2.6/2.6.33-at91.patch.gz" -BR2_LINUX_KERNEL_USE_DEFCONFIG=y -BR2_LINUX_KERNEL_DEFCONFIG="at91sam9261ek" - -# Filesystem -BR2_TARGET_ROOTFS_TAR=y +BR2_LINUX_KERNEL_DEFCONFIG="at91sam9261_9g10" diff --git a/configs/at91sam9263ek_defconfig b/configs/at91sam9263ek_defconfig index 1a79482709..208e0574d7 100644 --- a/configs/at91sam9263ek_defconfig +++ b/configs/at91sam9263ek_defconfig @@ -2,23 +2,18 @@ BR2_arm=y BR2_arm926t=y +# Host utilities +# +BR2_PACKAGE_HOST_SAM_BA=y + # First stage bootloader BR2_TARGET_AT91BOOTSTRAP=y BR2_TARGET_AT91BOOTSTRAP_BOARD="at91sam9263ek" -BR2_TARGET_AT91BOOTSTRAP_DATAFLASHCARD=y # Second stage bootloader BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="at91sam9263ek" -BR2_TARGET_UBOOT_2010_06=y +BR2_TARGET_UBOOT_BOARDNAME="at91sam9263ek_dataflash_cs0" # Kernel BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.33" -BR2_LINUX_KERNEL_PATCH="http://maxim.org.za/AT91RM9200/2.6/2.6.33-at91.patch.gz" -BR2_LINUX_KERNEL_USE_DEFCONFIG=y -BR2_LINUX_KERNEL_DEFCONFIG="at91sam9263ek" - -# Filesystem -BR2_TARGET_ROOTFS_TAR=y \ No newline at end of file +BR2_LINUX_KERNEL_DEFCONFIG="at91sam9263" diff --git a/configs/at91sam9g20dfc_defconfig b/configs/at91sam9g20dfc_defconfig index 16fd023d57..60764e64ad 100644 --- a/configs/at91sam9g20dfc_defconfig +++ b/configs/at91sam9g20dfc_defconfig @@ -2,6 +2,14 @@ BR2_arm=y BR2_arm926t=y +# Lock down headers to avoid breaking with new defaults +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.1.6" + +# Host utilities +# +BR2_PACKAGE_HOST_SAM_BA=y + # First stage bootloader BR2_TARGET_AT91BOOTSTRAP=y BR2_TARGET_AT91BOOTSTRAP_BOARD="at91sam9g20ek" @@ -9,14 +17,12 @@ BR2_TARGET_AT91BOOTSTRAP_DATAFLASHCARD=y # Second stage bootloader BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="at91sam9g20ek" -BR2_TARGET_UBOOT_2010_06=y +BR2_TARGET_UBOOT_BOARDNAME="at91sam9g20ek_nandflash" # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.33" -BR2_LINUX_KERNEL_PATCH="http://maxim.org.za/AT91RM9200/2.6/2.6.33-at91.patch.gz" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.1.6" BR2_LINUX_KERNEL_USE_DEFCONFIG=y BR2_LINUX_KERNEL_DEFCONFIG="at91sam9g20ek" diff --git a/configs/at91sam9g45m10ek_defconfig b/configs/at91sam9g45m10ek_defconfig new file mode 100644 index 0000000000..c958859df1 --- /dev/null +++ b/configs/at91sam9g45m10ek_defconfig @@ -0,0 +1,9 @@ +BR2_arm=y +BR2_arm926t=y +BR2_PACKAGE_HOST_SAM_BA=y +BR2_TARGET_AT91BOOTSTRAP=y +BR2_TARGET_AT91BOOTSTRAP_BOARD="at91sam9m10g45ek" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="at91sam9m10g45ek_nandflash" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_DEFCONFIG="at91sam9g45" diff --git a/configs/atngw100_defconfig b/configs/atngw100_defconfig index 5373b44992..5490241c60 100644 --- a/configs/atngw100_defconfig +++ b/configs/atngw100_defconfig @@ -1,6 +1,11 @@ # Architecture BR2_avr32=y +# Lock down kernel headers version, to match the kernel version used +# below. +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.9.11" + # Filesystems BR2_TARGET_ROOTFS_JFFS2=y BR2_TARGET_ROOTFS_JFFS2_FLASH_128=y @@ -14,11 +19,13 @@ BR2_TARGET_ROOTFS_TAR_NONE=y # Bootloader BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BOARDNAME="atngw100" -BR2_TARGET_UBOOT_2010_09=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2010.09" -# Kernel +# Kernel. Locked to 3.9.x, because 3.10.x fails to build with +# relocation truncated to fit: R_AVR32_16N_PCREL against symbol +# `_ctype' BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.35" -BR2_LINUX_KERNEL_USE_DEFCONFIG=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.9.11" BR2_LINUX_KERNEL_DEFCONFIG="atngw100" diff --git a/configs/atstk100x_defconfig b/configs/atstk100x_defconfig index 1af5001115..f73497cf81 100644 --- a/configs/atstk100x_defconfig +++ b/configs/atstk100x_defconfig @@ -1,19 +1,22 @@ # Architecture BR2_avr32=y +# Lock to same version as kernel +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.9.11" + # U-Boot BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BOARDNAME="atstk1002" -BR2_TARGET_UBOOT_2010_09=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2010.09" # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.35" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.9.11" BR2_LINUX_KERNEL_USE_DEFCONFIG=y BR2_LINUX_KERNEL_DEFCONFIG="atstk1002" # Filesystem BR2_TARGET_ROOTFS_TAR=y - - diff --git a/configs/beaglebone_defconfig b/configs/beaglebone_defconfig new file mode 100644 index 0000000000..97b4b0bf18 --- /dev/null +++ b/configs/beaglebone_defconfig @@ -0,0 +1,38 @@ +# architecture +BR2_arm=y +BR2_cortex_a8=y +BR2_ARM_EABIHF=y + +# system +BR2_TARGET_GENERIC_HOSTNAME="beaglebone" +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyO0" +# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set + +# filesystem +BR2_PACKAGE_AM33X_CM3=y +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set + +# lock down headers to avoid breaking with new defaults +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.8.12" + +# bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="am335x_evm" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2013.04" +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="MLO" + +# kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="935f6c2f82056d538b528272e2bdbb5c08d69a58" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/beaglebone/linux-3.8.config" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="am335x-bone" diff --git a/configs/calao_qil_a9260_defconfig b/configs/calao_qil_a9260_defconfig new file mode 100644 index 0000000000..f05e95c56e --- /dev/null +++ b/configs/calao_qil_a9260_defconfig @@ -0,0 +1,17 @@ +BR2_arm=y +BR2_arm926t=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS1" +BR2_PACKAGE_HOST_SAM_BA=y +BR2_TARGET_ROOTFS_UBIFS=y +BR2_TARGET_AT91BOOTSTRAP=y +BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR="board/calao/qil-a9260/" +BR2_TARGET_AT91BOOTSTRAP_BOARD="qil_a9260" +BR2_TARGET_AT91BOOTSTRAP_NANDFLASH=y +BR2_TARGET_BAREBOX=y +BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR="board/calao/qil-a9260/" +BR2_TARGET_BAREBOX_BOARD_DEFCONFIG="qil_a9260" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_PATCH="board/calao/qil-a9260/linux-3.4.7.patch" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/calao/qil-a9260/linux-3.4.7.config" +BR2_LINUX_KERNEL_ZIMAGE=y diff --git a/configs/calao_snowball_defconfig b/configs/calao_snowball_defconfig new file mode 100644 index 0000000000..4c30a6b98a --- /dev/null +++ b/configs/calao_snowball_defconfig @@ -0,0 +1,23 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_KERNEL_HEADERS_3_4=y +BR2_ARM_FPU_VFPV3D16=y +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA2" +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_SNOWBALL_HDMISERVICE=y +BR2_PACKAGE_LIBNL=y +BR2_PACKAGE_SNOWBALL_INIT=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_TARGET_ROOTFS_TAR_GZIP=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="snowball" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/igloocommunity/igloo-kernel" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="stable-linux-ux500-3.4" +BR2_LINUX_KERNEL_PATCH="board/calao/snowball/" +BR2_LINUX_KERNEL_DEFCONFIG="u8500" +BR2_LINUX_KERNEL_INSTALL_TARGET=y diff --git a/configs/calao_tny_a9g20_lpw_defconfig b/configs/calao_tny_a9g20_lpw_defconfig new file mode 100644 index 0000000000..c8c341a987 --- /dev/null +++ b/configs/calao_tny_a9g20_lpw_defconfig @@ -0,0 +1,32 @@ +# architecture +BR2_arm=y +BR2_arm926t=y + +# system +BR2_PACKAGE_HOST_SAM_BA=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y + +# filesystem +BR2_TARGET_ROOTFS_UBIFS=y + +# lock down headers to avoid breaking with new defaults +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.9.4" + +# bootloaders +BR2_TARGET_AT91BOOTSTRAP=y +BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR="board/calao/tny-a9g20-lpw/" +BR2_TARGET_AT91BOOTSTRAP_BOARD="tny_a9g20_lpw" +BR2_TARGET_AT91BOOTSTRAP_NANDFLASH=y +BR2_TARGET_BAREBOX=y +BR2_TARGET_BAREBOX_BOARD_DEFCONFIG="tny_a9g20" + +# linux +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.9.4" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/calao/tny-a9g20-lpw/linux-3.9.config" +BR2_LINUX_KERNEL_ZIMAGE=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="tny_a9g20" diff --git a/configs/calao_usb_a9260_defconfig b/configs/calao_usb_a9260_defconfig new file mode 100644 index 0000000000..304dc50237 --- /dev/null +++ b/configs/calao_usb_a9260_defconfig @@ -0,0 +1,17 @@ +BR2_arm=y +BR2_arm926t=y +BR2_PACKAGE_MTD=y +BR2_PACKAGE_HOST_SAM_BA=y +BR2_TARGET_ROOTFS_UBIFS=y +BR2_TARGET_AT91BOOTSTRAP=y +BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR="board/calao/usb-a9260" +BR2_TARGET_AT91BOOTSTRAP_BOARD="usb_a9260" +BR2_TARGET_AT91BOOTSTRAP_NANDFLASH=y +BR2_TARGET_BAREBOX=y +BR2_TARGET_BAREBOX_BOARD_DEFCONFIG="usb_a9260" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.10.10" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/calao/usb-a9260/linux-3.7.4.config" +BR2_LINUX_KERNEL_ZIMAGE=y diff --git a/configs/calao_usb_a9263_defconfig b/configs/calao_usb_a9263_defconfig new file mode 100644 index 0000000000..8dc948a1d7 --- /dev/null +++ b/configs/calao_usb_a9263_defconfig @@ -0,0 +1,16 @@ +BR2_arm=y +BR2_arm926t=y +BR2_PACKAGE_HOST_SAM_BA=y +BR2_TARGET_ROOTFS_UBIFS=y +BR2_TARGET_AT91BOOTSTRAP=y +BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR="board/calao/usb-a9263/" +BR2_TARGET_AT91BOOTSTRAP_BOARD="usb_a9263" +BR2_TARGET_AT91BOOTSTRAP_NANDFLASH=y +BR2_TARGET_BAREBOX=y +BR2_TARGET_BAREBOX_BOARD_DEFCONFIG="usb_a9263" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.10.10" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/calao/usb-a9263/linux-3.4.4.config" +BR2_LINUX_KERNEL_ZIMAGE=y diff --git a/configs/calao_usb_a9g20_lpw_defconfig b/configs/calao_usb_a9g20_lpw_defconfig new file mode 100644 index 0000000000..cf114d9cd8 --- /dev/null +++ b/configs/calao_usb_a9g20_lpw_defconfig @@ -0,0 +1,17 @@ +BR2_arm=y +BR2_arm926t=y +BR2_PACKAGE_HOST_SAM_BA=y +BR2_TARGET_ROOTFS_UBIFS=y +BR2_TARGET_AT91BOOTSTRAP=y +BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR="board/calao/usb-a9g20-lpw/" +BR2_TARGET_AT91BOOTSTRAP_BOARD="usb_a9g20_lpw" +BR2_TARGET_AT91BOOTSTRAP_NANDFLASH=y +BR2_TARGET_BAREBOX=y +BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR="board/calao/usb-a9g20-lpw/" +BR2_TARGET_BAREBOX_BOARD_DEFCONFIG="usb_a9g20" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.10.10" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/calao/usb-a9g20-lpw/linux-3.4.4.config" +BR2_LINUX_KERNEL_ZIMAGE=y diff --git a/configs/cubieboard2_defconfig b/configs/cubieboard2_defconfig new file mode 100644 index 0000000000..f85760d511 --- /dev/null +++ b/configs/cubieboard2_defconfig @@ -0,0 +1,40 @@ +# Architecture +BR2_arm=y +BR2_cortex_a7=y + +# System configuration +BR2_TARGET_GENERIC_HOSTNAME="Cubieboard2" +BR2_TARGET_GENERIC_ISSUE="Welcome to use Cubieboard!" +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/cubietech/cubieboard/post-build.sh" + +# Additional tools +BR2_PACKAGE_HOST_SUNXI_TOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_SUNXI_TOOLS=y +BR2_PACKAGE_SUNXI_BOARDS=y +BR2_PACKAGE_SUNXI_BOARDS_FEX_FILE="a20/cubieboard2.fex" + +# Kernel headers +BR2_KERNEL_HEADERS_3_4=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/linux-sunxi/linux-sunxi.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="5dda5145c877335e17bd9ca48954841acc0f785a" +BR2_LINUX_KERNEL_VERSION="sunxi-3.4" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/cubietech/cubieboard/linux-cubieboard2.config" + +# Bootloaders +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="cubieboard2" +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_VERSION="sunxi" +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/linux-sunxi/u-boot-sunxi.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="b4bca5e0651b460a4511582f07a935cb48f74948" +BR2_TARGET_UBOOT_FORMAT_BIN=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" diff --git a/configs/cubieboard_defconfig b/configs/cubieboard_defconfig new file mode 100644 index 0000000000..1da019f218 --- /dev/null +++ b/configs/cubieboard_defconfig @@ -0,0 +1,39 @@ +# Architecture +BR2_arm=y +BR2_cortex_a8=y + +# System configuration +BR2_TARGET_GENERIC_HOSTNAME="Cubieboard" +BR2_TARGET_GENERIC_ISSUE="Welcome to use Cubieboard!" +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/cubietech/cubieboard/post-build.sh" + +# Additional tools +BR2_PACKAGE_HOST_SUNXI_TOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_SUNXI_TOOLS=y +BR2_PACKAGE_SUNXI_BOARDS=y +BR2_PACKAGE_SUNXI_BOARDS_FEX_FILE="a10/cubieboard.fex" + +# Kernel headers +BR2_KERNEL_HEADERS_3_4=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/linux-sunxi/linux-sunxi.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="274a66a7bfcbaabb88d63e4eba161965383cc416" +BR2_LINUX_KERNEL_VERSION="sunxi-3.4" +BR2_LINUX_KERNEL_DEFCONFIG="sun4i" + +# Bootloaders +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="cubieboard" +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_VERSION="sunxi" +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/linux-sunxi/u-boot-sunxi.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="1a8ac55429f7f8cc9f100c1cf2dc0195cf81e76f" +BR2_TARGET_UBOOT_FORMAT_BIN=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin" diff --git a/configs/ea3250_defconfig b/configs/ea3250_defconfig new file mode 100644 index 0000000000..b7ce18ba7c --- /dev/null +++ b/configs/ea3250_defconfig @@ -0,0 +1,49 @@ +# Architecture +BR2_arm=y +BR2_arm926t=y + +BR2_ARM_TYPE="ARM926T" +BR2_ARM_EABI=y + +# +# GCC Options +# We need to force GCC 4.3.x because it is the last version +# that will compile a kernel with ethernet working correctly +BR2_GCC_VERSION_4_3_X=y + +# Lock down headers to avoid breaking with new defaults +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="2.6.34.7" +BR2_DEFAULT_KERNEL_HEADERS="2.6.34.7" + +# +# Host utilities +# +BR2_PACKAGE_HOST_LPC3250LOADER=y + + +# Bootloaders +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="ea3250" +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_VERSION="master" +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.lpclinux.com/uboot-2009.03-lpc32xx" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="master" +BR2_TARGET_UBOOT_FORMAT_BIN=y +BR2_TARGET_LPC32XXCDL=y +BR2_TARGET_LPC32XXCDL_BOARDNAME="ea3250" + + +# +# Kernel +# +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.lpclinux.com/linux-2.6.34-lpc32xx" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="master" +BR2_LINUX_KERNEL_VERSION="master" +BR2_LINUX_KERNEL_PATCH="" +BR2_LINUX_KERNEL_USE_DEFCONFIG=y +BR2_LINUX_KERNEL_DEFCONFIG="ea3250" +BR2_LINUX_KERNEL_UIMAGE=y + diff --git a/configs/fdi3250_defconfig b/configs/fdi3250_defconfig new file mode 100644 index 0000000000..b7f6ad7c1c --- /dev/null +++ b/configs/fdi3250_defconfig @@ -0,0 +1,49 @@ +# Architecture +BR2_arm=y +BR2_arm926t=y + +BR2_ARM_TYPE="ARM926T" +BR2_ARM_EABI=y + +# +# GCC Options +# We need to force GCC 4.3.x because it is the last version +# that will compile a kernel with ethernet working correctly +BR2_GCC_VERSION_4_3_X=y + +# Lock down headers to avoid breaking with new defaults +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="2.6.34.7" +BR2_DEFAULT_KERNEL_HEADERS="2.6.34.7" + +# +# Host utilities +# +BR2_PACKAGE_HOST_LPC3250LOADER=y + + +# Bootloaders +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="fdi3250" +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_VERSION="master" +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.lpclinux.com/uboot-2009.03-lpc32xx" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="master" +BR2_TARGET_UBOOT_FORMAT_BIN=y +BR2_TARGET_LPC32XXCDL=y +BR2_TARGET_LPC32XXCDL_BOARDNAME="fdi3250" + + +# +# Kernel +# +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.lpclinux.com/linux-2.6.34-lpc32xx" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="master" +BR2_LINUX_KERNEL_VERSION="master" +BR2_LINUX_KERNEL_PATCH="" +BR2_LINUX_KERNEL_USE_DEFCONFIG=y +BR2_LINUX_KERNEL_DEFCONFIG="fdi3250" +BR2_LINUX_KERNEL_UIMAGE=y + diff --git a/configs/freescale_imx6sabresd_defconfig b/configs/freescale_imx6sabresd_defconfig new file mode 100644 index 0000000000..368e00b3ae --- /dev/null +++ b/configs/freescale_imx6sabresd_defconfig @@ -0,0 +1,23 @@ +# architecture +BR2_arm=y +BR2_cortex_a9=y + +# system +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" + +# kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.freescale.com/imx/linux-2.6-imx.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_3.0.35_4.1.0" +BR2_LINUX_KERNEL_DEFCONFIG="imx6" + +# filesystem +BR2_TARGET_ROOTFS_EXT2=y + +# bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx6q_sabresd" +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.freescale.com/imx/uboot-imx.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_3.0.35_4.1.0" diff --git a/configs/freescale_imx6sololiteevk_defconfig b/configs/freescale_imx6sololiteevk_defconfig new file mode 100644 index 0000000000..997d44fece --- /dev/null +++ b/configs/freescale_imx6sololiteevk_defconfig @@ -0,0 +1,23 @@ +# architecture +BR2_arm=y +BR2_cortex_a9=y + +# system +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" + +# kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.freescale.com/imx/linux-2.6-imx.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_3.0.35_4.1.0" +BR2_LINUX_KERNEL_DEFCONFIG="imx6s" + +# filesystem +BR2_TARGET_ROOTFS_EXT2=y + +# bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx6sl_evk" +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.freescale.com/imx/uboot-imx.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_3.0.35_4.1.0" diff --git a/configs/freescale_mpc8315erdb_defconfig b/configs/freescale_mpc8315erdb_defconfig new file mode 100644 index 0000000000..11e64db182 --- /dev/null +++ b/configs/freescale_mpc8315erdb_defconfig @@ -0,0 +1,35 @@ +# Architecture +BR2_powerpc=y +BR2_powerpc_e300c3=y + +# Filesystem +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ROOTFS_JFFS2=y +BR2_TARGET_ROOTFS_JFFS2_CUSTOM=y +BR2_TARGET_ROOTFS_JFFS2_CUSTOM_PAGESIZE=0x200 +BR2_TARGET_ROOTFS_JFFS2_CUSTOM_EBSIZE=0x4000 +BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER=y + +# Lock headers version to match and avoid breakage +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.12" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.12" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/freescale/mpc8315erdb/linux-3.12.config" +BR2_LINUX_KERNEL_UIMAGE=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="mpc8315erdb" + +# Serial port config +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="MPC8315ERDB_NAND" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2013.10" diff --git a/configs/freescale_p1010rdb_defconfig b/configs/freescale_p1010rdb_defconfig new file mode 100644 index 0000000000..0a727c4deb --- /dev/null +++ b/configs/freescale_p1010rdb_defconfig @@ -0,0 +1,34 @@ +# Architecture +BR2_powerpc=y +BR2_powerpc_8548=y + +# Filesystem +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ROOTFS_JFFS2=y +BR2_TARGET_ROOTFS_JFFS2_CUSTOM=y +BR2_TARGET_ROOTFS_JFFS2_CUSTOM_PAGESIZE=0x20 +BR2_TARGET_ROOTFS_JFFS2_CUSTOM_EBSIZE=0x20000 + +# Lock headers version to match and avoid breakage +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.12" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.12" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/freescale/p1010rdb/linux-3.12.config" +BR2_LINUX_KERNEL_UIMAGE=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="p1010rdb" + +# Serial port config +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="P1010RDB_NOR" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2013.10" diff --git a/configs/gnublin_defconfig b/configs/gnublin_defconfig new file mode 100644 index 0000000000..acb455130b --- /dev/null +++ b/configs/gnublin_defconfig @@ -0,0 +1,27 @@ +# Architecture +BR2_arm=y +BR2_arm926t=y + +# System +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.7" +BR2_TARGET_GENERIC_ISSUE="Welcome to Gnublin" + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_BLOCKS=475000 + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="GNUBLIN" +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://gitorious.org/u-boot-gnublin-support/u-boot-gnublin-support.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="2009.11_gnublin_support_v2" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://gitorious.org/linux-3-7-gnublin/linux-3-7-gnublin.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="v3.7-gnublin-2" +BR2_LINUX_KERNEL_DEFCONFIG="gnublin" +BR2_LINUX_KERNEL_INSTALL_TARGET=y diff --git a/configs/integrator926_defconfig b/configs/integrator926_defconfig index e596d3389c..e63f455df2 100644 --- a/configs/integrator926_defconfig +++ b/configs/integrator926_defconfig @@ -4,13 +4,16 @@ BR2_arm926t=y # Bootloader BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="cp926ejs" -BR2_TARGET_UBOOT_2010_06=y +BR2_TARGET_UBOOT_BOARDNAME="integratorcp_cm926ejs" + +# Lock down headers to avoid breaking with new defaults +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="2.6.35" # Kernel BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_2_6_35= -BR2_LINUX_KERNEL_USE_DEFCONFIG=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.35" BR2_LINUX_KERNEL_DEFCONFIG="integrator" # Filesystem diff --git a/configs/kb9202_defconfig b/configs/kb9202_defconfig index 50b278c528..1d01a22a00 100644 --- a/configs/kb9202_defconfig +++ b/configs/kb9202_defconfig @@ -5,10 +5,14 @@ BR2_arm920t=y # Filesystem BR2_TARGET_ROOTFS_TAR=y +# Lock down headers to avoid breaking with new defaults +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="2.6.38.8" + # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.33" -BR2_LINUX_KERNEL_PATCH="http://maxim.org.za/AT91RM9200/2.6/2.6.33-at91.patch.gz" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.38.8" +BR2_LINUX_KERNEL_PATCH="http://maxim.org.za/AT91RM9200/2.6/2.6.38-at91.patch.gz" BR2_LINUX_KERNEL_USE_DEFCONFIG=y BR2_LINUX_KERNEL_DEFCONFIG="kb9202" diff --git a/configs/mini2440_defconfig b/configs/mini2440_defconfig index d1be8e1d0e..6adcea0f4e 100644 --- a/configs/mini2440_defconfig +++ b/configs/mini2440_defconfig @@ -3,7 +3,8 @@ BR2_arm=y BR2_arm920t=y # Serial port -BR2_TARGET_GENERIC_GETTY_TTYSAC0=y +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttySAC0" # Filesystem BR2_TARGET_ROOTFS_JFFS2=y @@ -14,6 +15,11 @@ BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER=y BR2_TARGET_ROOTFS_JFFS2_LE=y BR2_TARGET_ROOTFS_TAR=y + +# Lock down headers to avoid breaking with new defaults +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.0.4" + # Bootloader BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BOARDNAME="mini2440" @@ -24,8 +30,7 @@ BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="http://repo.or.cz/w/u-boot-openmoko/mi # Kernel # BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="http://www.pauljones.id.au/temp/linux-2.6.32.2-mini2440_20100113.tgz" -BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/friendlyarm/mini2440/linux-2.6.32.2.config" +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.0.4" +BR2_LINUX_KERNEL_DEFCONFIG="mini2440" BR2_LINUX_KERNEL_UIMAGE=y diff --git a/configs/mx53loco_defconfig b/configs/mx53loco_defconfig new file mode 100644 index 0000000000..8b12238cd5 --- /dev/null +++ b/configs/mx53loco_defconfig @@ -0,0 +1,22 @@ +# Architecture +BR2_arm=y +BR2_cortex_a8=y +BR2_ARM_FPU_VFPV3D16=y + +# System +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx53_loco" +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.freescale.com/imx/uboot-imx.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_2.6.35_11.09.01" + +# filesystem +BR2_TARGET_ROOTFS_EXT2=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.freescale.com/imx/linux-2.6-imx.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_2.6.35_11.09.01" +BR2_LINUX_KERNEL_DEFCONFIG="imx5" diff --git a/configs/nitrogen6x_defconfig b/configs/nitrogen6x_defconfig new file mode 100644 index 0000000000..0c026db18f --- /dev/null +++ b/configs/nitrogen6x_defconfig @@ -0,0 +1,26 @@ +# architecture +BR2_arm=y +BR2_cortex_a9=y + +# system +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/boundarydevices/nitrogen6x/post-build.sh" + +# filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_2r1=y + +# bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="nitrogen6q" +BR2_TARGET_UBOOT_FORMAT_IMX=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="http://github.com/boundarydevices/u-boot-imx6/tarball/4034391/u-boot-4034391.tar.gz" + +# kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="http://github.com/boundarydevices/linux-imx6/tarball/5809938/linux-imx6-5809938.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="nitrogen6x" +BR2_LINUX_KERNEL_INSTALL_TARGET=y diff --git a/configs/olimex_imx233_olinuxino_defconfig b/configs/olimex_imx233_olinuxino_defconfig new file mode 100644 index 0000000000..e43ee0818e --- /dev/null +++ b/configs/olimex_imx233_olinuxino_defconfig @@ -0,0 +1,46 @@ +# Architecture +BR2_arm=y +BR2_arm926t=y + +# Patches (mxs-bootlets) +BR2_GLOBAL_PATCH_DIR="board/olimex/imx233_olinuxino" + +# System +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Lock headers version to match and avoid breakage +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.12" + +# Bootloader +BR2_TARGET_MXS_BOOTLETS=y +BR2_TARGET_MXS_BOOTLETS_CUSTOM_PATCH_DIR="board/olimex/imx233_olinuxino" +BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD=y +BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD_NAME="imx23_olinuxino_dev" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.12" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/olimex/imx233_olinuxino/linux-3.12.config" +BR2_LINUX_KERNEL_PATCH="http://github.com/koliqi/imx23-olinuxino/raw/3.12-rc2/kernel/101-soc-audio-dts.patch http://github.com/koliqi/imx23-olinuxino/raw/3.12-rc2/kernel/ASoC_driver_for_i.MX233.patch" +BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx23-olinuxino" + +# For automatic firmware loading +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y + +# Firmware for WiFi +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_7010=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9271=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT2XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX=y +BR2_PACKAGE_ZD1211_FIRMWARE=y diff --git a/configs/openblocks_a6_defconfig b/configs/openblocks_a6_defconfig new file mode 100644 index 0000000000..98017ad1e8 --- /dev/null +++ b/configs/openblocks_a6_defconfig @@ -0,0 +1,20 @@ +# Architecture +BR2_arm=y +BR2_arm926t=y + +# system +BR2_TARGET_GENERIC_HOSTNAME="openblocks-a6" +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# filesystem +BR2_TARGET_ROOTFS_JFFS2=y +BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_2K_128K=y + +# kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.9.1" +BR2_LINUX_KERNEL_DEFCONFIG="kirkwood" +BR2_LINUX_KERNEL_APPENDED_UIMAGE=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="kirkwood-openblocks_a6" diff --git a/configs/pandaboard_defconfig b/configs/pandaboard_defconfig new file mode 100644 index 0000000000..95cfdd6ea9 --- /dev/null +++ b/configs/pandaboard_defconfig @@ -0,0 +1,31 @@ +# Architecture +BR2_arm=y +BR2_cortex_a9=y + +# system +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyO2" +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y + +# filesystem +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Lock to 3.8 headers to avoid breaking with newer kernels +BR2_KERNEL_HEADERS_3_8=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.8.11" +BR2_LINUX_KERNEL_DEFCONFIG="omap2plus" + +# GCC +BR2_GCC_VERSION_4_6_X=y + +# Bootloaders +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_BOARDNAME="omap4_panda" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="MLO" diff --git a/configs/phy3250_defconfig b/configs/phy3250_defconfig new file mode 100644 index 0000000000..fe49653c56 --- /dev/null +++ b/configs/phy3250_defconfig @@ -0,0 +1,49 @@ +# Architecture +BR2_arm=y +BR2_arm926t=y + +BR2_ARM_TYPE="ARM926T" +BR2_ARM_EABI=y + +# +# GCC Options +# We need to force GCC 4.3.x because it is the last version +# that will compile a kernel with ethernet working correctly +BR2_GCC_VERSION_4_3_X=y + +# Lock down headers to avoid breaking with new defaults +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="2.6.34.7" +BR2_DEFAULT_KERNEL_HEADERS="2.6.34.7" + +# +# Host utilities +# +BR2_PACKAGE_HOST_LPC3250LOADER=y + + +# Bootloaders +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="phy3250" +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_VERSION="master" +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.lpclinux.com/uboot-2009.03-lpc32xx" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="master" +BR2_TARGET_UBOOT_FORMAT_BIN=y +BR2_TARGET_LPC32XXCDL=y +BR2_TARGET_LPC32XXCDL_BOARDNAME="phy3250" + + +# +# Kernel +# +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.lpclinux.com/linux-2.6.34-lpc32xx" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="master" +BR2_LINUX_KERNEL_VERSION="master" +BR2_LINUX_KERNEL_PATCH="" +BR2_LINUX_KERNEL_USE_DEFCONFIG=y +BR2_LINUX_KERNEL_DEFCONFIG="phy3250" +BR2_LINUX_KERNEL_UIMAGE=y + diff --git a/configs/qemu_arm_nuri_defconfig b/configs/qemu_arm_nuri_defconfig new file mode 100644 index 0000000000..f6fc12e47a --- /dev/null +++ b/configs/qemu_arm_nuri_defconfig @@ -0,0 +1,25 @@ +# Architecture +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_FPU_VFPV3D16=y + +# System +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttySAC1" + +# Filesystem +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ROOTFS_INITRAMFS=y + +# Lock to 3.10 headers to avoid breaking with newer kernels +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.10.20" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.10.20" +BR2_LINUX_KERNEL_DEFCONFIG="exynos4" +BR2_LINUX_KERNEL_ZIMAGE=y diff --git a/configs/qemu_arm_versatile_defconfig b/configs/qemu_arm_versatile_defconfig index 4d8233d19f..c65b9c1242 100644 --- a/configs/qemu_arm_versatile_defconfig +++ b/configs/qemu_arm_versatile_defconfig @@ -2,14 +2,22 @@ BR2_arm=y BR2_arm926t=y +# system +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + # filesystem BR2_TARGET_ROOTFS_EXT2=y # BR2_TARGET_ROOTFS_TAR is not set +# Lock to 3.11 headers to avoid breaking with newer kernels +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.11.9" + # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.36" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.11.9" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/arm-versatile/linux-2.6.36.config" +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/arm-versatile/linux-3.11.config" BR2_LINUX_KERNEL_ZIMAGE=y diff --git a/configs/qemu_arm_vexpress_defconfig b/configs/qemu_arm_vexpress_defconfig new file mode 100644 index 0000000000..6b393ef009 --- /dev/null +++ b/configs/qemu_arm_vexpress_defconfig @@ -0,0 +1,25 @@ +# Architecture +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_FPU_VFPV3D16=y + +# System +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Lock to 3.12 headers to avoid breaking with newer kernels +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.12.1" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.12.1" +BR2_LINUX_KERNEL_DEFCONFIG="vexpress" +BR2_LINUX_KERNEL_ZIMAGE=y diff --git a/configs/qemu_microblazebe_mmu_defconfig b/configs/qemu_microblazebe_mmu_defconfig new file mode 100644 index 0000000000..ea75624bc2 --- /dev/null +++ b/configs/qemu_microblazebe_mmu_defconfig @@ -0,0 +1,27 @@ +# Architecture +BR2_microblaze=y +BR2_microblazebe=y + +# Special toolchain +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEBE_V2=y +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y +BR2_TOOLCHAIN_EXTERNAL_CXX=y + +# System +BR2_TARGET_GENERIC_GETTY_PORT="ttyUL0" + +# Filesystem +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ROOTFS_INITRAMFS=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.12.1" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/microblazebe-mmu/linux-3.12.config" +BR2_LINUX_KERNEL_LINUX_BIN=y +BR2_LINUX_KERNEL_USE_CUSTOM_DTS=y +BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/qemu/microblazebe-mmu/system.dts" diff --git a/configs/qemu_microblazeel_mmu_defconfig b/configs/qemu_microblazeel_mmu_defconfig new file mode 100644 index 0000000000..82c56c03dc --- /dev/null +++ b/configs/qemu_microblazeel_mmu_defconfig @@ -0,0 +1,27 @@ +# Architecture +BR2_microblaze=y +BR2_microblazeel=y + +# Toolchain +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEEL_V2=y +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y +BR2_TOOLCHAIN_EXTERNAL_CXX=y + +# System +BR2_TARGET_GENERIC_GETTY_PORT="ttyUL0" + +# Filesystem +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ROOTFS_INITRAMFS=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.12.1" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/microblazeel-mmu/linux-3.12.config" +BR2_LINUX_KERNEL_LINUX_BIN=y +BR2_LINUX_KERNEL_USE_CUSTOM_DTS=y +BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/qemu/microblazeel-mmu/system.dts" diff --git a/configs/qemu_mips64_malta_defconfig b/configs/qemu_mips64_malta_defconfig new file mode 100644 index 0000000000..e1295dd451 --- /dev/null +++ b/configs/qemu_mips64_malta_defconfig @@ -0,0 +1,27 @@ +# Architecture +BR2_mips64=y +BR2_MIPS_NABI64=y + +# Toolchain +# uClibc dynamic loader seems broken for mips64 +BR2_PREFER_STATIC_LIB=y + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Lock to 3.12 headers to avoid breaking with newer kernels +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.12.1" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.12.1" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/mips64-malta/linux-3.12.config" +BR2_LINUX_KERNEL_VMLINUX=y + +# Serial port config +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" diff --git a/configs/qemu_mips_malta_defconfig b/configs/qemu_mips_malta_defconfig new file mode 100644 index 0000000000..8a6ed26918 --- /dev/null +++ b/configs/qemu_mips_malta_defconfig @@ -0,0 +1,23 @@ +# Architecture +BR2_mips=y +BR2_mips_32r2=y + +# filesystem +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Lock to 3.12 headers to avoid breaking with newer kernels +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.12.1" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.12.1" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/mips-malta/linux-3.12.config" +BR2_LINUX_KERNEL_VMLINUX=y + +# Serial port config +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" diff --git a/configs/qemu_mipsel_malta_defconfig b/configs/qemu_mipsel_malta_defconfig index ea3ba88048..9a4164db77 100644 --- a/configs/qemu_mipsel_malta_defconfig +++ b/configs/qemu_mipsel_malta_defconfig @@ -6,12 +6,16 @@ BR2_mips_32r2=y BR2_TARGET_ROOTFS_EXT2=y # BR2_TARGET_ROOTFS_TAR is not set +# Lock to 3.12 headers to avoid breaking with newer kernels +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.12.1" + # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.36" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.12.1" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/mipsel-malta/linux-2.6.36.config" +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/mipsel-malta/linux-3.12.config" BR2_LINUX_KERNEL_VMLINUX=y # Serial port config diff --git a/configs/qemu_ppc_g3beige_defconfig b/configs/qemu_ppc_g3beige_defconfig index db7ef74323..f284b9be6f 100644 --- a/configs/qemu_ppc_g3beige_defconfig +++ b/configs/qemu_ppc_g3beige_defconfig @@ -1,17 +1,21 @@ # Architecture BR2_powerpc=y -BR2_powerpc_440fp=y +BR2_powerpc_750=y # filesystem BR2_TARGET_ROOTFS_EXT2=y # BR2_TARGET_ROOTFS_TAR is not set +# Lock to 3.12 headers to avoid breaking with newer kernels +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.12.1" + # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.36" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.12.1" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/powerpc-g3beige/linux-2.6.36.config" +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/powerpc-g3beige/linux-3.12.config" BR2_LINUX_KERNEL_VMLINUX=y # Serial port config diff --git a/configs/qemu_ppc_mpc8544ds_defconfig b/configs/qemu_ppc_mpc8544ds_defconfig new file mode 100644 index 0000000000..bf94c9fd26 --- /dev/null +++ b/configs/qemu_ppc_mpc8544ds_defconfig @@ -0,0 +1,22 @@ +# Architecture +BR2_powerpc=y +BR2_powerpc_8548=y + +# filesystem +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ROOTFS_INITRAMFS=y + +# Lock to 3.12 headers to avoid breaking with newer kernels +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.12.1" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.12.1" +BR2_LINUX_KERNEL_DEFCONFIG="mpc85xx" +BR2_LINUX_KERNEL_VMLINUX=y + +# Serial port config +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" diff --git a/configs/qemu_ppc_virtex_ml507_defconfig b/configs/qemu_ppc_virtex_ml507_defconfig new file mode 100644 index 0000000000..2d57338ce9 --- /dev/null +++ b/configs/qemu_ppc_virtex_ml507_defconfig @@ -0,0 +1,23 @@ +# Architecture +BR2_powerpc=y +BR2_powerpc_440=y + +# Filesystem +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ROOTFS_INITRAMFS=y + +# Lock to 3.12 headers to avoid breaking with newer kernels +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.12.1" + +# Use soft float +BR2_SOFT_FLOAT=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.12.1" +BR2_LINUX_KERNEL_DEFCONFIG="44x/virtex5" +BR2_LINUX_KERNEL_VMLINUX=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="virtex440-ml507" diff --git a/configs/qemu_sh4_r2d_defconfig b/configs/qemu_sh4_r2d_defconfig index f40633c62f..f7671d1679 100644 --- a/configs/qemu_sh4_r2d_defconfig +++ b/configs/qemu_sh4_r2d_defconfig @@ -2,20 +2,26 @@ BR2_sh=y BR2_sh4=y +# system +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttySC1" + # filesystem BR2_TARGET_ROOTFS_EXT2=y # BR2_TARGET_ROOTFS_TAR is not set +# Lock to 3.2 headers to avoid breaking with newer kernels +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.2.52" + # The kernel wants to use the -m4-nofpu option to make sure that it # doesn't use floating point operations. -BR2_GCC_VERSION_4_5_X=y BR2_EXTRA_GCC_CONFIG_OPTIONS="--with-multilib-list=m4,m4-nofpu" # Linux kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.36" -BR2_LINUX_KERNEL_PATCH="board/qemu/sh4-r2d/kernel-patches/" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.2.52" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/sh4-r2d/linux-2.6.36.config" +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/sh4-r2d/linux-3.2.config" BR2_LINUX_KERNEL_ZIMAGE=y diff --git a/configs/qemu_sparc_ss10_defconfig b/configs/qemu_sparc_ss10_defconfig new file mode 100644 index 0000000000..0f11fa3cc1 --- /dev/null +++ b/configs/qemu_sparc_ss10_defconfig @@ -0,0 +1,18 @@ +# Architecture +BR2_sparc=y +BR2_sparc_v8=y + +# filesystem +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Lock to 3.12 headers to avoid breaking with newer kernels +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.12.1" + +# Linux kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.12.1" +BR2_LINUX_KERNEL_DEFCONFIG="sparc32" +BR2_LINUX_KERNEL_ZIMAGE=y diff --git a/configs/qemu_x86_64_defconfig b/configs/qemu_x86_64_defconfig new file mode 100644 index 0000000000..0e33da31fe --- /dev/null +++ b/configs/qemu_x86_64_defconfig @@ -0,0 +1,21 @@ +# Architecture +BR2_x86_64=y + +# system +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="tty1" + +# filesystem +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Lock to 3.12 headers to avoid breaking with newer kernels +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.12.1" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.12.1" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86_64/linux-3.12.config" diff --git a/configs/qemu_x86_defconfig b/configs/qemu_x86_defconfig index 2e7d813aa7..05404ba4ad 100644 --- a/configs/qemu_x86_defconfig +++ b/configs/qemu_x86_defconfig @@ -2,13 +2,21 @@ BR2_i386=y BR2_x86_pentiumpro=y +# system +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="tty1" + # filesystem BR2_TARGET_ROOTFS_EXT2=y # BR2_TARGET_ROOTFS_TAR is not set +# Lock to 3.12 headers to avoid breaking with newer kernels +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.12.1" + # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.36" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.12.1" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86/linux-2.6.36.config" +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86/linux-3.12.config" diff --git a/configs/raspberrypi_defconfig b/configs/raspberrypi_defconfig new file mode 100644 index 0000000000..da877fbe1f --- /dev/null +++ b/configs/raspberrypi_defconfig @@ -0,0 +1,23 @@ +BR2_arm=y +BR2_arm1176jzf_s=y + +BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y + +BR2_TARGET_GENERIC_GETTY_PORT="tty1" + +BR2_PACKAGE_RPI_FIRMWARE=y +BR2_PACKAGE_RPI_USERLAND=y +BR2_PACKAGE_LIBCOFI=y + +# Lock to 3.6 headers as the RPi kernel is based off the 3.6 branch +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.6.11" + +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://github.com/raspberrypi/linux.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="1587f77" +BR2_LINUX_KERNEL_USE_DEFCONFIG=y +BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi_quick" +BR2_LINUX_KERNEL_ZIMAGE=y diff --git a/configs/s6lx9_microboard_defconfig b/configs/s6lx9_microboard_defconfig new file mode 100644 index 0000000000..05b4443521 --- /dev/null +++ b/configs/s6lx9_microboard_defconfig @@ -0,0 +1,16 @@ +BR2_microblaze=y +BR2_microblazeel=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEEL_V2=y +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="microblazeel-unknown-linux-gnu" +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y +BR2_TOOLCHAIN_EXTERNAL_CXX=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyUL0" +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ROOTFS_INITRAMFS=y +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/avnet/s6lx9_microboard/lx9_mmu_defconfig" +BR2_LINUX_KERNEL_USE_CUSTOM_DTS=y +BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/avnet/s6lx9_microboard/lx9_mmu.dts" diff --git a/configs/sheevaplug_defconfig b/configs/sheevaplug_defconfig new file mode 100644 index 0000000000..4161766f25 --- /dev/null +++ b/configs/sheevaplug_defconfig @@ -0,0 +1,31 @@ +# Architecture +BR2_arm=y +BR2_arm926t=y + +# system +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# filesystem +BR2_TARGET_ROOTFS_JFFS2=y +BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_2K_128K=y + + +# Lock down headers to avoid breaking with new defaults +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.11.8" + +# bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="sheevaplug" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2013.10" +BR2_TARGET_UBOOT_FORMAT_KWB=y +# BR2_TARGET_UBOOT_NETWORK is not set + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.11.8" +BR2_LINUX_KERNEL_DEFCONFIG="kirkwood" +BR2_LINUX_KERNEL_UIMAGE=y diff --git a/configs/telit_evk_pro3_defconfig b/configs/telit_evk_pro3_defconfig new file mode 100644 index 0000000000..fa9f8980e5 --- /dev/null +++ b/configs/telit_evk_pro3_defconfig @@ -0,0 +1,33 @@ +# Architecture +BR2_arm=y +BR2_arm926t=y + +# Toolchain +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.9.1" + +# System +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y + +# Watchdog is armed by the first stage bootloader +BR2_PACKAGE_BUSYBOX_WATCHDOG=y + +# Filesystem +BR2_TARGET_ROOTFS_UBIFS=y +BR2_TARGET_ROOTFS_UBI=y + +# Bootloader +BR2_TARGET_BAREBOX=y +BR2_TARGET_BAREBOX_CUSTOM_VERSION=y +BR2_TARGET_BAREBOX_CUSTOM_VERSION_VALUE="2013.04.0" +BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR="board/telit/evk-pro3" +BR2_TARGET_BAREBOX_BOARD_DEFCONFIG="telit_evk_pro3" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.9.1" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/telit/evk-pro3/linux-3.9.config" +BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="evk-pro3" diff --git a/configs/wandboard_defconfig b/configs/wandboard_defconfig new file mode 100644 index 0000000000..996a70a664 --- /dev/null +++ b/configs/wandboard_defconfig @@ -0,0 +1,22 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_KERNEL_HEADERS_3_0=y +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="wandboard_dl" +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.denx.de/u-boot-imx.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="326ea986ac150acdc7656d57fca647db80b50158" +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.imx" +BR2_TARGET_UBOOT_ENVIMAGE=y +BR2_TARGET_UBOOT_ENVIMAGE_SOURCE="board/wandboard/uboot-env.txt" +BR2_TARGET_UBOOT_ENVIMAGE_SIZE="0x2000" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://repo.or.cz/wandboard.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="86429847b5152f040f190015faedcac49b243328" +BR2_LINUX_KERNEL_DEFCONFIG="wandboard" +BR2_LINUX_KERNEL_INSTALL_TARGET=y diff --git a/docs/Glibc_vs_uClibc.html b/docs/Glibc_vs_uClibc.html deleted file mode 100644 index c14eb8cf20..0000000000 --- a/docs/Glibc_vs_uClibc.html +++ /dev/null @@ -1,240 +0,0 @@ - - -

uClibc vs. glibc

- -

- uClibc and Glibc are not the same -- there are a number of differences which - may or may not cause you problems. This document attempts to list these - differences and, when completed, will contain a full list of all relevant - differences. -

-
    -
  1. uClibc is smaller than glibc. We attempt to maintain a glibc compatible - interface, allowing applications that compile with glibc to easily compile with - uClibc. However, we do not include _everything_ that glibc includes, and - therefore some applications may not compile. If this happens to you, please - report the failure to the uclibc mailing list, with detailed error messages. -

  2. -
  3. uClibc is much more configurable then glibc. This means that a developer - may have compiled uClibc in such a way that significant amounts of - functionality have been omitted. -

  4. -
  5. uClibc does not even attempt to ensure binary compatibility across releases. - When a new version of uClibc is released, you may or may not need to recompile - all your binaries. -

  6. -
    • malloc(0) in glibc returns a valid pointer to something(!?!?) while in - uClibc calling malloc(0) returns a NULL. The behavior of malloc(0) is listed - as implementation-defined by SuSv3, so both libraries are equally correct. - This difference also applies to realloc(NULL, 0). I personally feel glibc's - behavior is not particularly safe. To enable glibc behavior, one has to - explicitly enable the MALLOC_GLIBC_COMPAT option. -

    • - glibc's malloc() implementation has behavior that is tunable via the - MALLOC_CHECK_ environment variable. This is primarily used to provide extra - malloc debugging features. These extended malloc debugging features are not - available within uClibc. There are many good malloc debugging libraries - available for Linux (dmalloc, electric fence, valgrind, etc) that work much - better than the glibc extended malloc debugging. So our omitting this - functionality from uClibc is not a great loss. -

    • -
  7. -
  8. uClibc does not provide a database library (libdb). -

  9. -
  10. uClibc does not support NSS (/lib/libnss_*), which allows glibc to easily - support various methods of authentication and DNS resolution. uClibc only - supports flat password files and shadow password files for storing - authentication information. If you need something more complex than this, - you can compile and install pam. -

  11. -
  12. uClibc's libresolv is only a stub. Some, but not all of the functionality - provided by glibc's libresolv is provided internal to uClibc. Other functions - are not at all implemented. -

  13. -
  14. libnsl provides support for Network Information Service (NIS) which was - originally called "Yellow Pages" or "YP", which is an extension of RPC invented - by Sun to share Unix password files over the network. I personally think NIS - is an evil abomination and should not be used. These days, using ldap is much - more effective mechanism for doing the same thing. uClibc provides a stub - libnsl, but has no actual support for Network Information Service (NIS). - We therefore, also do not provide any of the headers files provided by glibc - under /usr/include/rpcsvc. -

  15. -
  16. uClibc's locale support is not 100% complete yet. We are working on it. -

  17. -
  18. uClibc's math library only supports long double as inlines, and even - then the long double support is quite limited. Also, very few of the - float math functions are implemented. Stick with double and you should - be just fine. -

  19. -
  20. uClibc's libcrypt does not support the reentrant crypt_r, setkey_r and - encrypt_r, since these are not required by SuSv3. -

  21. -
  22. uClibc directly uses kernel types to define most opaque data types. -

  23. -
  24. uClibc directly uses the linux kernel's arch specific 'stuct stat'. -

  25. -
  26. uClibc's librt library currently lacks all aio routines, all clock - routines, and all shm routines (only the timer routines and the mq - routines are implemented). -

  27. -
-
-

Manuel's Notes

- - Some general comments...
-

- The intended target for all my uClibc code is ANSI/ISO C99 and SUSv3 - compliance. While some glibc extensions are present, many will eventually - be configurable. Also, even when present, the glibc-like extensions may - differ slightly or be more restrictive than the native glibc counterparts. - They are primarily meant to be porting _aides_ and not necessarily - drop-in replacements. -


-Now for some details...

- -time functions
-
    -
  1. Leap seconds are not supported.

  2. -
  3. /etc/timezone and the whole zoneinfo directory tree are not supported. - To set the timezone, set the TZ environment variable as specified in - http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap08.html - or you may also create an /etc/TZ file of a single line, ending with a - newline, containing the TZ setting. For example - echo CST6CDT > /etc/TZ -

  4. -
  5. Currently, locale specific eras and alternate digits are not supported. - They are on my TODO list. -
  6. -

-wide char support
-
    -
  1. The only multibyte encoding currently supported is UTF-8. The various - ISO-8859-* encodings are (optionally) supported. The internal - representation of wchar's is assumed to be 31 bit unicode values in - native endian representation. Also, the underlying char encoding is - assumed to match ASCII in the range 0-0x7f. -
  2. -
  3. In the next iteration of locale support, I plan to add support for - (at least some) other multibyte encodings. -
  4. -
-locale support
-
    -
  1. The target for support is SUSv3 locale functionality. While nl_langinfo - has been extended, similar to glibc, it only returns values for related - locale entries. -
  2. -
  3. Currently, all SUSv3 libc locale functionality should be implemented - except for wcsftime and collating item support in regex. -
  4. -
-stdio
-
    -
  1. Conversion of large magnitude floating-point values by printf suffers a loss - of precision due to the algorithm used. -

  2. -
  3. uClibc's printf is much stricter than glibcs, especially regarding positional - args. The entire format string is parsed first and an error is returned if - a problem is detected. In locales other than C, the format string is checked - to be a valid multibyte sequence as well. Also, currently at most 10 positional - args are allowed (although this is configurable). -

  4. -
  5. BUFSIZ is configurable, but no attempt is made at automatic tuning of internal - buffer sizes for stdio streams. In fact, the stdio code in general sacrifices - sophistication/performace for minimal size. -

  6. -
  7. uClibc allows glibc-like custom printf functions. However, while not - currently checked, the specifier must be <= 0x7f. -

  8. -
  9. uClibc allows glibc-like custom streams. However, no in-buffer seeking is - done. -

  10. -
  11. The functions fcloseall() and __fpending() can behave differently than their - glibc counterparts. -

  12. -
  13. uClibc's setvbuf is more restrictive about when it can be called than glibc's - is. The standards specify that setvbuf must occur before any other operations - take place on the stream. -

  14. -
  15. Right now, %m is not handled properly by printf when the format uses positional - args. -

  16. -
  17. The FILEs created by glibc's fmemopen(), open_memstream(), and fopencookie() - are not capable of wide orientation. The corresponding uClibc routines do - not have this limitation. -

  18. -
  19. For scanf, the C99 standard states "The fscanf function returns the value of - the macro EOF if an input failure occurs before any conversion." But glibc's - scanf does not respect conversions for which assignment was surpressed, even - though the standard states that the value is converted but not stored. -

-

Glibc bugs


-glibc bugs that Ulrich Drepper has refused to acknowledge or comment on - ( http://sources.redhat.com/ml/libc-alpha/2003-09/ ) -
-
    -
  1. The C99 standard says that for printf, a %s conversion makes no special - provisions for multibyte characters. SUSv3 is even more clear, stating - that bytes are written and a specified precision is in bytes. Yet glibc - treats the arg as a multibyte string when a precision is specified and - not otherwise. -

  2. -
  3. Both C99 and C89 state that the %c conversion for scanf reads the exact - number of bytes specified by the optional field width (or 1 if not specified). - uClibc complies with the standard. There is an argument that perhaps the - specified width should be treated as an upper bound, based on some historical - use. However, such behavior should be mentioned in the Conformance document. -

  4. -
  5. glibc's scanf is broken regarding some numeric patterns. Some invalid - strings are accepted as valid ("0x.p", "1e", digit grouped strings). - In spite of my posting examples clearly illustrating the bugs, they remain - unacknowledged by the glibc developers. -

  6. -
  7. glibc's scanf seems to require a 'p' exponent for hexadecimal float strings. - According to the standard, this is optional. -

  8. -
  9. C99 requires that once an EOF is encountered, the stream should be treated - as if at end-of-file even if more data becomes available. Further reading - can be attempted by clearing the EOF flag though, via clearerr() or a file - positioning function. For details concerning the original change, see - Defect Report #141. glibc is currently non-compliant, and the developers - did not comment when I asked for their official position on this issue. -

  10. -
  11. glibc's collation routines and/or localedef are broken regarding implicit - and explicit UNDEFINED rules. -

-More to follow as I think of it... -


-

Profiling:

-

-uClibc no longer supports 'gcc -fprofile-arcs -pg' style profiling, which -causes your application to generate a 'gmon.out' file that can then be analyzed -by 'gprof'. Not only does this require explicit extra support in uClibc, it -requires that you rebuild everything with profiling support. There is both a -size and performance penalty to profiling your applications this way, as well -as Heisenberg effects, where the act of measuring changes what is measured. -

-

-There exist a number of less invasive alternatives that do not require you to -specially instrument your application, and recompile and relink everything. -

-The OProfile system-wide profiler is an excellent alternative: - http://oprofile.sourceforge.net/ -

-Many people have had good results using the combination of Valgrind -to generate profiling information and KCachegrind for analysis: - http://developer.kde.org/~sewardj/ - http://kcachegrind.sourceforge.net/ -

-Prospect is another alternative based on OProfile: - http://prospect.sourceforge.net/ -

-And the Linux Trace Toolkit (LTT) is also a fine tool: - http://www.opersys.com/LTT/ -

-FunctionCheck: - http://www710.univ-lyon1.fr/~yperret/fnccheck/ -

- - diff --git a/docs/about.html b/docs/about.html index bf78db3383..ae409fc36c 100644 --- a/docs/about.html +++ b/docs/about.html @@ -45,8 +45,8 @@

Buildroot: making Embedded Linux easy

filesystem image: JFFS2, UBIFS, tarballs, romfs, cramfs, squashfs and more. -
  • Can generate an uClibc cross-compilation toolchain, or re-use - your existing glibc, eglibc or uClibc cross-compilation +
  • Can generate an (e)glibc or uClibc cross-compilation toolchain, + or re-use your existing glibc, eglibc or uClibc cross-compilation toolchain
  • Has a simple structure that makes it easy to understand diff --git a/docs/buildroot.html b/docs/buildroot.html deleted file mode 100644 index 2314d1095c..0000000000 --- a/docs/buildroot.html +++ /dev/null @@ -1,1819 +0,0 @@ - - - - - Buildroot - Usage and documentation - - - - - -
    -
    -

    Buildroot

    -
    - -

    Buildroot usage and documentation - by Thomas Petazzoni. Contributions from Karsten Kruse, Ned Ludd, Martin - Herren and others.

    - - - -

    About Buildroot

    - -

    Buildroot is a set of Makefiles and patches that allows you to easily - generate a cross-compilation toolchain, a root filesystem and a Linux - kernel image for your target. Buildroot can be used for one, two or all - of these options, independently.

    - -

    Buildroot is useful mainly for people working with embedded systems. - Embedded systems often use processors that are not the regular x86 - processors everyone is used to having in his PC. They can be PowerPC - processors, MIPS processors, ARM processors, etc.

    - -

    A compilation toolchain is the set of tools that allows you to - compile code for your system. It consists of a compiler (in our case, - gcc), binary utils like assembler and linker (in our case, - binutils) and a C standard library (for example - GNU Libc, - uClibc or - dietlibc). The system installed - on your development station certainly already has a compilation - toolchain that you can use to compile an application that runs on your - system. If you're using a PC, your compilation toolchain runs on an x86 - processor and generates code for an x86 processor. Under most Linux - systems, the compilation toolchain uses the GNU libc (glibc) as the C - standard library. This compilation toolchain is called the "host - compilation toolchain". The machine on which it is running, and on - which you're working, is called the "host system". The - compilation toolchain is provided by your distribution, and Buildroot - has nothing to do with it (other than using it to build a - cross-compilation toolchain and other tools that are run on the - development host).

    - -

    As said above, the compilation toolchain that comes with your system - runs on and generates code for the processor in your host system. As - your embedded system has a different processor, you need a - cross-compilation toolchain — a compilation toolchain that runs on - your host system but generates code for your target system (and target - processor). For example, if your host system uses x86 and your target - system uses ARM, the regular compilation toolchain on your host runs on - x86 and generates code for x86, while the cross-compilation toolchain - runs on x86 and generates code for ARM.

    - -

    Even if your embedded system uses an x86 processor, you might be - interested in Buildroot for two reasons:

    - -
      -
    • The compilation toolchain on your host certainly uses the GNU Libc - which is a complete but huge C standard library. Instead of using GNU - Libc on your target system, you can use uClibc which is a tiny C - standard library. If you want to use this C library, then you need a - compilation toolchain to generate binaries linked with it. Buildroot - can do that for you.
    • - -
    • Buildroot automates the building of a root filesystem with all needed - tools like busybox. That makes it much easier than doing it by hand.
    • -
    - -

    You might wonder why such a tool is needed when you can compile - gcc, binutils, uClibc and all - the other tools by hand. Of course doing so is possible but, dealing with - all of the configure options and problems of every gcc or - binutils version is very time-consuming and uninteresting. - Buildroot automates this process through the use of Makefiles and has a - collection of patches for each gcc and binutils - version to make them work on most architectures.

    - -

    Moreover, Buildroot provides an infrastructure for reproducing - the build process of your kernel, cross-toolchain, and embedded root - filesystem. Being able to reproduce the build process will be useful when a - component needs to be patched or updated or when another person is supposed - to take over the project.

    - -

    Obtaining Buildroot

    - -

    Buildroot releases are made approximately every 3 - months. Direct Git access and daily snapshots are also - available, if you want more bleeding edge.

    - -

    Releases are available at - http://buildroot.net/downloads/.

    - -

    The latest snapshot is always available at - http://buildroot.net/downloads/snapshots/buildroot-snapshot.tar.bz2, - and previous snapshots are also available at - http://buildroot.net/downloads/snapshots/.

    - -

    To download Buildroot using Git, you can simply follow - the rules described on the "Accessing Git" page - (http://buildroot.net/git.html) - of the Buildroot website - (http://buildroot.net). - For the impatient, here's a quick recipe:

    - -
    - $ git clone git://git.buildroot.net/buildroot
    -
    - -

    Using Buildroot

    - -

    Buildroot has a nice configuration tool similar to the one you can find - in the Linux kernel - (http://www.kernel.org/) or in Busybox - (http://www.busybox.org/). Note that - you can (and should) build everything as a normal user. There is no need to - be root to configure and use Buildroot. The first step is to run the - configuration assistant:

    - -
    - $ make menuconfig
    -
    - -

    to run the curses-based configurator, or

    - -
    - $ make xconfig
    -
    - -

    or

    - -
    - $ make gconfig
    -
    - -

    to run the Qt or GTK-based configurators.

    - -

    All of these "make" commands will need to build a configuration - utility, so you may need to install "development" packages for relevant - libraries used by the configuration utilities. On Debian-like systems, - the libncurses5-dev package is required to use the - menuconfig interface, libqt4-dev is required to use - the xconfig interface, and libglib2.0-dev, libgtk2.0-dev - and libglade2-dev are needed to use the gconfig interface.

    - -

    For each menu entry in the configuration tool, you can find associated - help that describes the purpose of the entry.

    - -

    Once everything is configured, the configuration tool generates a - .config file that contains the description of your - configuration. It will be used by the Makefiles to do what's needed.

    - - -

    Let's go:

    - -
    - $ make
    -
    - -

    You should never use make -jN with - Buildroot: it does not support top-level parallel - make. Instead, use the BR2_JLEVEL option to tell - Buildroot to run each package compilation with make - -jN.

    - -

    This command will generally perform the following steps:

    -
      -
    • Download source files (as required)
    • -
    • Configure, build and install the cross-compiling toolchain - if an internal toolchain is used, or import a toolchain if an - external toolchain is used
    • -
    • Build/install selected target packages
    • -
    • Build a kernel image, if selected
    • -
    • Build a bootloader image, if selected
    • -
    • Create a root filesystem in selected formats
    • -
    - -

    Buildroot output is stored in a single directory, output/. - This directory contains several subdirectories:

    - -
      -
    • images/ where all the images (kernel image, - bootloader and root filesystem images) are stored.
    • - -
    • build/ where all the components except for the - cross-compilation toolchain are built (this includes tools needed to - run Buildroot on the host and packages compiled for the target). The - build/ directory contains one subdirectory for each of - these components.
    • - -
    • staging/ which contains a hierarchy similar to a root - filesystem hierarchy. This directory contains the installation of the - cross-compilation toolchain and all the userspace packages selected - for the target. However, this directory is not intended to be - the root filesystem for the target: it contains a lot of development - files, unstripped binaries and libraries that make it far too big for - an embedded system. These development files are used to compile - libraries and applications for the target that depend on other - libraries.
    • - -
    • target/ which contains almost the complete - root filesystem for the target: everything needed is present except - the device files in /dev/ (Buildroot can't create them - because Buildroot doesn't run as root and doesn't want to run as - root). Therefore, this directory should not be used on your target. - Instead, you should use one of the images built in the - images/ directory. If you need an extracted image of the - root filesystem for booting over NFS, then use the tarball image - generated in images/ and extract it as root.
      Compared - to staging/, target/ contains only the - files and libraries needed to run the selected target applications: - the development files (headers, etc.) are not present, unless the - development files in target filesystem option is selected. -
    • - -
    • host/ contains the installation of tools compiled for - the host that are needed for the proper execution of Buildroot, - including the cross-compilation toolchain.
    • - -
    • toolchain/ contains the build directories for the - various components of the cross-compilation toolchain.
    • -
    - -

    Offline builds

    - -

    If you intend to do an offline build and just want to download - all sources that you previously selected in the configurator - (menuconfig, xconfig or gconfig), then issue:

    - -
    - $ make source
    -
    - -

    You can now disconnect or copy the content of your dl - directory to the build-host.

    - -

    Building out-of-tree

    - -

    Buildroot supports building out of tree with a syntax similar to the - Linux kernel. To use it, add O=<directory> to the make command - line:

    - -
    - $ make O=/tmp/build
    -
    - -

    Or:

    - -
    - $ cd /tmp/build; make O=$PWD -C path/to/buildroot
    -
    - -

    All the output files will be located under /tmp/build.

    - -

    When using out-of-tree builds, the Buildroot .config and - temporary files are also stored in the output directory. This means that - you can safely run multiple builds in parallel using the same source - tree as long as they use unique output directories.

    - -

    For ease of use, Buildroot generates a Makefile wrapper in the output - directory - So after the first run, you no longer need to pass - O=.. and -C .., simply run (in the output - directory):

    - -
    - $ make <target>
    -
    - -

    Environment variables

    - -

    Buildroot also honors some environment variables, when they are passed - to make or set in the environment:

    -
      -
    • HOSTCXX, the host C++ compiler to use
    • -
    • HOSTCC, the host C compiler to use
    • -
    • UCLIBC_CONFIG_FILE=<path/to/.config>, path to - the uClibc configuration file, used to compile uClibc, if an - internal toolchain is being built
    • -
    • BUSYBOX_CONFIG_FILE=<path/to/.config>, path to - the Busybox configuration file
    • -
    • BUILDROOT_DL_DIR to override the directory in which - Buildroot stores/retrieves downloaded files
    • -
    - -

    An example that uses config files located in the toplevel directory and - in your $HOME:

    - -
    - $ make UCLIBC_CONFIG_FILE=uClibc.config BUSYBOX_CONFIG_FILE=$HOME/bb.config
    -
    - -

    If you want to use a compiler other than the default gcc - or g++ for building helper-binaries on your host, then do

    - -
    - $ make HOSTCXX=g++-4.3-HEAD HOSTCC=gcc-4.3-HEAD
    -
    - -

    Customizing the generated target filesystem

    - -

    There are a few ways to customize the resulting target filesystem:

    - -
      -
    • Customize the target filesystem directly and rebuild the image. - The target filesystem is available under output/target/. - You can simply make your changes here and run make afterwards — - this will rebuild the target filesystem image. This method allows you - to do anything to the target filesystem, but if you decide to - completely rebuild your toolchain and tools, these changes will be - lost.
    • - -
    • Create your own target skeleton. You can start with - the default skeleton available under fs/skeleton - and then customize it to suit your - needs. The BR2_ROOTFS_SKELETON_CUSTOM - and BR2_ROOTFS_SKELETON_CUSTOM_PATH will allow you - to specify the location of your custom skeleton. At build time, - the contents of the skeleton are copied to output/target before - any package installation.
    • - -
    • In the Buildroot configuration, you can specify the path to a - post-build script, that gets called after Buildroot builds all - the selected software, but before the rootfs packages are - assembled. The destination root filesystem folder is given as the - first argument to this script, and this script can then be used to - copy programs, static data or any other needed file to your target - filesystem.
      You should, however, use this feature with care. - Whenever you find that a certain package generates wrong or unneeded - files, you should fix that package rather than work around it with a - post-build cleanup script.
    • - -
    • A special package, customize, stored in - package/customize can be used. You can put all the - files that you want to see in the final target root filesystem - in package/customize/source, and then enable this - special package in the configuration system.
    • -
    - -

    Customizing the Busybox configuration

    - -

    Busybox is very configurable, - and you may want to customize it. You can follow these simple steps to - do so. This method isn't optimal, but it's simple, and it works:

    - -
      -
    1. Do an initial compilation of Buildroot, with busybox, without - trying to customize it.
    2. - -
    3. Invoke make busybox-menuconfig. - The nice configuration tool appears, and you can - customize everything.
    4. - -
    5. Run the compilation of Buildroot again.
    6. -
    - -

    Otherwise, you can simply change the - package/busybox/busybox-<version>.config file, if you - know the options you want to change, without using the configuration tool. -

    - -

    If you want to use an existing config file for busybox, then see - section environment variables.

    - -

    Customizing the uClibc configuration

    - -

    Just like BusyBox, - uClibc offers a lot of - configuration options. They allow you to select various - functionalities depending on your needs and limitations.

    - -

    The easiest way to modify the configuration of uClibc is to - follow these steps:

    - -
      -
    1. Do an initial compilation of Buildroot without trying to - customize uClibc.
    2. - -
    3. Invoke make uclibc-menuconfig. - The nice configuration assistant, similar to - the one used in the Linux kernel or Buildroot, appears. Make - your configuration changes as appropriate.
    4. - -
    5. Copy the $(O)/toolchain/uclibc-VERSION/.config - file to a different place - (like toolchain/uClibc/uClibc-myconfig.config, - or board/mymanufacturer/myboard/uClibc.config) and - adjust the uClibc configuration (configuration - option BR2_UCLIBC_CONFIG) to use this configuration - instead of the default one.
    6. - -
    7. Run the compilation of Buildroot again.
    8. -
    - -

    Otherwise, you can simply change - toolchain/uClibc/uClibc.config, without running the - configuration assistant.

    - -

    If you want to use an existing config file for uclibc, then see - section environment variables.

    - -

    Customizing the Linux kernel configuration

    - -

    The Linux kernel configuration can be customized just like - BusyBox and - uClibc using make linux-menuconfig - . Make sure you have enabled the kernel build in make - menuconfig first. Once done, run make to (re)build - everything.

    - -

    If you want to use an existing config file for Linux, then see - section environment variables.

    - -

    Understanding how to rebuild packages

    - -

    One of the most common questions asked by Buildroot - users is how to rebuild a given package or how to - remove a package without rebuilding everything from scratch.

    - -

    Removing a package is currently unsupported by Buildroot - without rebuilding from scratch. This is because Buildroot doesn't - keep track of which package installs what files in the - output/staging and output/target - directories. However, implementing clean package removal is on the - TODO-list of Buildroot developers.

    - -

    The easiest way to rebuild a single package from scratch is to - remove its build directory in output/build. Buildroot - will then re-extract, re-configure, re-compile and re-install this - package from scratch.

    - -

    However, if you don't want to rebuild the package completely - from scratch, a better understanding of the Buildroot internals is - needed. Internally, to keep track of which steps have been done - and which steps remain to be done, Buildroot maintains stamp - files (empty files that just tell whether this or that action - has been done). The problem is that these stamp files are not - uniformly named and handled by the different packages, so some - understanding of the particular package is needed.

    - -

    For packages relying on Buildroot packages infrastructures (see - this section for details), the - following stamp files are relevant:

    - -
      -
    • output/build/packagename-version/.stamp_configured. If - removed, Buildroot will trigger the recompilation of the package - from the configuration step (execution of - ./configure).
    • - -
    • output/build/packagename-version/.stamp_built. If - removed, Buildroot will trigger the recompilation of the package - from the compilation step (execution of make).
    • -
    - -

    For other packages, an analysis of the specific package.mk - file is needed. For example, the zlib Makefile used to look like this - (before it was converted to the generic package infrastructure):

    - -
    -$(ZLIB_DIR)/.configured: $(ZLIB_DIR)/.patched
    -	(cd $(ZLIB_DIR); rm -rf config.cache; \
    -		[...]
    -	)
    -	touch $@
    -
    -$(ZLIB_DIR)/libz.a: $(ZLIB_DIR)/.configured
    -	$(MAKE) -C $(ZLIB_DIR) all libz.a
    -	touch -c $@
    -
    - -

    If you want to trigger the reconfiguration, you need to - remove output/build/zlib-version/.configured. If - you want to trigger only the recompilation, you need to remove - output/build/zlib-version/libz.a.

    - -

    Note that most packages, if not all, will progressively be - ported over to the generic or autotools infrastructure, making it - much easier to rebuild individual packages.

    - -

    How Buildroot works

    - -

    As mentioned above, Buildroot is basically a set of Makefiles that - download, configure, and compile software with the correct options. It - also includes patches for various software packages — mainly the - ones involved in the cross-compilation tool chain (gcc, - binutils and uClibc).

    - -

    There is basically one Makefile per software package, and they are - named with the .mk extension. Makefiles are split into - three main sections:

    - -
      -
    • toolchain (in the toolchain/ directory) contains - the Makefiles and associated files for all software related to the - cross-compilation toolchain: binutils, gcc, - gdb, kernel-headers and uClibc.
    • - -
    • package (in the package/ directory) contains the - Makefiles and associated files for all user-space tools that Buildroot - can compile and add to the target root filesystem. There is one - sub-directory per tool.
    • - -
    • target (in the target directory) contains the - Makefiles and associated files for software related to the generation of - the target root filesystem image. Four types of filesystems are supported: - ext2, jffs2, cramfs and squashfs. For each of them there is a - sub-directory with the required files. There is also a - default/ directory that contains the target filesystem - skeleton.
    • -
    - -

    Each directory contains at least 2 files:

    - -
      -
    • something.mk is the Makefile that downloads, configures, - compiles and installs the package something.
    • - -
    • Config.in is a part of the configuration tool - description file. It describes the options related to the - package.
    • -
    - -

    The main Makefile performs the following steps (once the - configuration is done):

    - -
      -
    1. Create all the output directories: staging, - target, build, stamps, - etc. in the output directory (output/ by default, - another value can be specified using O=)
    2. - -
    3. Generate all the targets listed in the - BASE_TARGETS variable. When an internal toolchain - is used, this means generating the cross-compilation - toolchain. When an external toolchain is used, this means checking - the features of the external toolchain and importing it into the - Buildroot environment.
    4. - -
    5. Generate all the targets listed in the TARGETS - variable. This variable is filled by all the individual - components' Makefiles. Generating these targets will - trigger the compilation of the userspace packages (libraries, - programs), the kernel, the bootloader and the generation of the - root filesystem images, depending on the configuration.
    6. -
    - -

    Creating your own board support

    - -

    Creating your own board support in Buildroot allows users of a - particular hardware platform to easily build a system that is - known to work.

    - -

    To do so, you need to create a normal Buildroot configuration - that builds a basic system for the hardware: toolchain, kernel, - bootloader, filesystem and a simple Busybox-only userspace. No - specific package should be selected: the configuration should be - as minimal as possible, and should only build a working basic - Busybox system for the target platform. You can of course use more - complicated configurations for your internal projects, but the - Buildroot project will only integrate basic board - configurations. This is because package selections are highly - application-specific.

    - -

    Once you have a known working configuration, run make - savedefconfig. This will generate a - minimal defconfig file at the root of the Buildroot - source tree. Move this file into the configs/ - directory, and rename it MYBOARD_defconfig.

    - -

    It is recommended to use as much as possible upstream versions - of the Linux kernel and bootloaders, and to use as much as - possible default kernel and bootloader configurations. If they are - incorrect for your platform, we encourage you to send fixes to the - corresponding upstream projects.

    - -

    However, in the mean time, you may want to store kernel or - bootloader configuration or patches specific to your target - platform. To do so, create a - directory board/MANUFACTURER and a - subdirectory board/MANUFACTURER/BOARDNAME (after - replacing, of course, MANUFACTURER and BOARDNAME with the - appropriate values, in lower case letters). You can then store - your patches and configurations in these directories, and - reference them from the main Buildroot configuration.

    - -

    Using the generated toolchain outside Buildroot

    - -

    You may want to compile, for your target, your own programs or other - software that are not packaged in Buildroot. In order to do this you can - use the toolchain that was generated by Buildroot.

    - -

    The toolchain generated by Buildroot is located by default in - output/host/. The simplest way to use it is to add - output/host/usr/bin/ to your PATH environment variable and - then to use ARCH-linux-gcc, ARCH-linux-objdump, - ARCH-linux-ld, etc.

    - -

    It is possible to relocate the toolchain — but - then --sysroot must be passed every time the compiler - is called to tell where the libraries and header files are.

    - -

    It is also possible to generate the Buildroot toolchain in a - directory other than output/host by using the - Build options -> Host dir option. - This could be useful if the toolchain must be shared with other users.

    - -

    Using ccache in Buildroot

    - -

    ccache is a compiler - cache. It stores the object files resulting from each compilation - process, and is able to skip future compilation of the same source - file (with same compiler and same arguments) by using the - pre-existing object files. When doing almost identical builds from - scratch a number of times, it can nicely speed up the build - process.

    - -

    ccache support is integrated in Buildroot. You - just have to enable Enable compiler cache - in Build options. This will automatically build - ccache and use it for every host and target - compilation.

    - -

    The cache is located - in $HOME/.buildroot-ccache. It is stored outside of - Buildroot output directory so that it can be shared by separate - Buildroot builds. If you want to get rid of the cache, simply - remove this directory.

    - -

    You can get statistics on the cache (its size, number of hits, - misses, etc.) by running make ccache-stats.

    - -

    Location of downloaded packages

    - -

    It might be useful to know that the various tarballs that are - downloaded by the Makefiles are all stored in the DL_DIR - which by default is the dl directory. It's useful, for - example, if you want to keep a complete version of Buildroot which is - known to be working with the associated tarballs. This will allow you to - regenerate the toolchain and the target filesystem with exactly the same - versions.

    - -

    If you maintain several Buildroot trees, it might be better to have a - shared download location. This can be accessed by creating a symbolic - link from the dl directory to the shared download location:

    - -
    - $ ln -s <shared download location> dl
    -
    - -

    Another way of accessing a shared download location is to - create the BUILDROOT_DL_DIR environment variable. - If this is set, then the value of DL_DIR in the project is - overridden. The following line should be added to - "~/.bashrc".

    - -
    - $ export BUILDROOT_DL_DIR <shared download location>
    -
    - -

    Using an external toolchain

    - -

    Using an already existing toolchain is useful for different - reasons:

    - -
      -
    • you already have a toolchain that is known to work for your - specific CPU
    • -
    • you want to speed up the Buildroot build process by skipping - the long toolchain build part
    • -
    • the toolchain generation feature of Buildroot is not - sufficiently flexible for you (for example if you need to - generate a system with glibc instead of - uClibc)
    • -
    - -

    Buildroot supports using existing toolchains through a - mechanism called external toolchain. The external toolchain - mechanism is enabled in the Toolchain menu, by - selecting External toolchain in Toolchain - type.

    - -

    Then, you have three solutions to use an external - toolchain:

    - -
      - -
    • Use a predefined external toolchain profile, and let - Buildroot download, extract and install the toolchain. Buildroot - already knows about a few CodeSourcery toolchains for ARM, - PowerPC, MIPS and SuperH. Just select the toolchain profile - in Toolchain through the available ones. This is - definitely the easiest solution.
    • - -
    • Use a predefined external toolchain profile, but instead of - having Buildroot download and extract the toolchain, you can - tell Buildroot where your toolchain is already installed on your - system. Just select the toolchain profile - in Toolchain through the available ones, - unselect Download toolchain automatically, and fill - the Toolchain path text entry with the path to your - cross-compiling toolchain.
    • - -
    • Use a completely custom external toolchain. This is - particularly useful for toolchains generated using - Crosstool-NG. To do this, select the Custom - toolchain solution in the Toolchain - list. You need to fill the Toolchain - path, Toolchain prefix and External - toolchain C library options. Then, you have to tell - Buildroot what your external toolchain supports. If your - external toolchain uses the glibc library, you only have - to tell whether your toolchain supports C++ or not. If your - external toolchain uses the uclibc library, then you have - to tell Buildroot if it supports largefile, IPv6, RPC, - wide-char, locale, program invocation, threads and C++. At the - beginning of the execution, Buildroot will tell you if the - selected options do not match the toolchain configuration.
    • - -
    - -

    Our external toolchain support has been tested with toolchains - from CodeSourcery, toolchains generated - by Crosstool-NG, - and toolchains generated by Buildroot itself. In general, all - toolchains that support the sysroot feature should - work. If not, do not hesitate to contact the developers.

    - -

    We do not support toolchains from - the ELDK of Denx, - for two reasons:

    - -
      - -
    • The ELDK does not contain a pure toolchain (i.e just the - compiler, binutils, the C and C++ libraries), but a toolchain - that comes with a very large set of pre-compiled libraries and - programs. Therefore, Buildroot cannot import the sysroot - of the toolchain, as it would contain hundreds of megabytes of - pre-compiled libraries that are normally built by - Buildroot.
    • - -
    • The ELDK toolchains have a completely non-standard custom - mechanism to handle multiple library variants. Instead of using - the standard GCC multilib mechanism, the ARM ELDK uses - different symbolic links to the compiler to differentiate - between library variants (for ARM soft-float and ARM VFP), and - the PowerPC ELDK compiler uses a CROSS_COMPILE - environment variable. This non-standard behaviour makes it - difficult to support ELDK in Buildroot.
    • - -
    - -

    We also do not support using the distribution toolchain (i.e - the gcc/binutils/C library installed by your distribution) as the - toolchain to build software for the target. This is because your - distribution toolchain is not a "pure" toolchain (i.e only with - the C/C++ library), so we cannot import it properly into the - Buildroot build environment. So even if you are building a system - for a x86 or x86_64 target, you have to generate a - cross-compilation toolchain with Buildroot or Crosstool-NG.

    - -

    Adding new packages to Buildroot

    - -

    This section covers how new packages (userspace libraries or - applications) can be integrated into Buildroot. It also shows how existing - packages are integrated, which is needed for fixing issues or tuning their - configuration.

    - - - -

    Package directory

    - -

    First of all, create a directory under the package - directory for your software, for example libfoo.

    - -

    Some packages have been grouped by topic in a sub-directory: - multimedia, java, x11r7, and - games. If your package fits in one of these - categories, then create your package directory in these.

    - -

    Config.in file

    - -

    Then, create a file named Config.in. This file - will contain the option descriptions related to our - libfoo software that will be used and displayed in the - configuration tool. It should basically contain :

    - -
    -config BR2_PACKAGE_LIBFOO
    -	bool "libfoo"
    -	help
    -	  This is a comment that explains what libfoo is.
    -
    -	  http://foosoftware.org/libfoo/
    -
    - -

    Of course, you can add other options to configure particular - things in your software. You can look at examples in other - packages. The syntax of the Config.in file is the same as the one - for the kernel Kconfig file. The documentation for this syntax is - available at - http://lxr.free-electrons.com/source/Documentation/kbuild/kconfig-language.txt -

    - -

    Finally you have to add your new libfoo/Config.in to - package/Config.in (or in a category subdirectory if - you decided to put your package in one of the existing - categories). The files included there are sorted - alphabetically per category and are NOT supposed to - contain anything but the bare name of the package.

    - -
    -source "package/libfoo/Config.in"
    -
    - -

    The .mk file

    - -

    Finally, here's the hardest part. Create a file named - libfoo.mk. It describes how the package should be - downloaded, configured, built, installed, etc.

    - -

    Depending on the package type, the .mk file must be - written in a different way, using different infrastructures:

    - -
      -
    • Makefiles for generic packages (not using autotools): These - are based on an infrastructure similar to the one used for - autotools-based packages, but requires a little more work from the - developer. They specify what should be done for the configuration, - compilation, installation and cleanup of the package. This - infrastructure must be used for all packages that do not use the - autotools as their build system. In the future, other specialized - infrastructures might be written for other build systems.
      We cover - them through a tutorial and a - reference.
    • - -
    • Makefiles for autotools-based software (autoconf, automake, - etc.): We provide a dedicated infrastructure for such packages, since - autotools is a very common build system. This infrastructure must - be used for new packages that rely on the autotools as their - build system.
      We cover them through a - tutorial and a - reference.
    • - -
    • Manual Makefiles: These are currently obsolete, and no new - manual Makefiles should be added. However, since there are still many - of them in the tree, we keep them documented in a - tutorial.
    • -
    - -

    Makefile for generic packages : tutorial

    - -
    -01: #############################################################
    -02: #
    -03: # libfoo
    -04: #
    -05: #############################################################
    -06: LIBFOO_VERSION = 1.0
    -07: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz
    -08: LIBFOO_SITE = http://www.foosoftware.org/download
    -09: LIBFOO_INSTALL_STAGING = YES
    -10: LIBFOO_DEPENDENCIES = host-libaaa libbbb
    -11:
    -12: define LIBFOO_BUILD_CMDS
    -13: 	$(MAKE) CC=$(TARGET_CC) LD=$(TARGET_LD) -C $(@D) all
    -14: endef
    -15:
    -16: define LIBFOO_INSTALL_STAGING_CMDS
    -17: 	$(INSTALL) -D -m 0755 $(@D)/libfoo.a $(STAGING_DIR)/usr/lib/libfoo.a
    -18: 	$(INSTALL) -D -m 0644 $(@D)/foo.h $(STAGING_DIR)/usr/include/foo.h
    -19: 	$(INSTALL) -D -m 0755 $(@D)/libfoo.so* $(STAGING_DIR)/usr/lib
    -20: endef
    -21:
    -22: define LIBFOO_INSTALL_TARGET_CMDS
    -23: 	$(INSTALL) -D -m 0755 $(@D)/libfoo.so* $(TARGET_DIR)/usr/lib
    -24: 	$(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/foo.d
    -25: endef
    -26:
    -27: $(eval $(call GENTARGETS,package,libfoo))
    -
    - -

    The Makefile begins on line 6 to 8 with metadata information: the - version of the package (LIBFOO_VERSION), the name of the - tarball containing the package (LIBFOO_SOURCE) and the - Internet location at which the tarball can be downloaded - (LIBFOO_SITE). All variables must start with the same prefix, - LIBFOO_ in this case. This prefix is always the uppercased - version of the package name (see below to understand where the package - name is defined).

    - -

    On line 9, we specify that this package wants to install something to - the staging space. This is often needed for libraries, since they must - install header files and other development files in the staging space. - This will ensure that the commands listed in the - LIBFOO_INSTALL_STAGING_CMDS variable will be executed.

    - -

    On line 10, we specify the list of dependencies this package relies - on. These dependencies are listed in terms of lower-case package names, - which can be packages for the target (without the host- - prefix) or packages for the host (with the host-) prefix). - Buildroot will ensure that all these packages are built and installed - before the current package starts its configuration.

    - -

    The rest of the Makefile defines what should be done at the different - steps of the package configuration, compilation and installation. - LIBFOO_BUILD_CMDS tells what steps should be performed to - build the package. LIBFOO_INSTALL_STAGING_CMDS tells what - steps should be performed to install the package in the staging space. - LIBFOO_INSTALL_TARGET_CMDS tells what steps should be - performed to install the package in the target space.

    - -

    All these steps rely on the $(@D) variable, which - contains the directory where the source code of the package has been - extracted.

    - -

    Finally, on line 27, we call the GENTARGETS which - generates, according to the variables defined previously, all the - Makefile code necessary to make your package working.

    - -

    Makefile for generic packages : reference

    - -

    The GENTARGETS macro takes three arguments:

    - -
      -
    • The first argument is the package directory prefix. If your - package is in package/libfoo, then the directory prefix - is package. If your package is in - package/editors/foo, then the directory prefix must be - package/editors.
    • - -
    • The second argument is the lower-cased package name. It must match - the prefix of the variables in the .mk file and must - match the configuration option name in the Config.in - file. For example, if the package name is libfoo, then the - variables in the .mk file must start with - LIBFOO_ and the configuration option in the - Config.in file must be BR2_PACKAGE_LIBFOO.
    • - -
    • The third argument is optional. It can be used to tell if the - package is a target package (cross-compiled for the target) or a host - package (natively compiled for the host). If unspecified, it is - assumed that it is a target package. See below for details.
    • -
    - -

    For a given package, in a single .mk file, it is - possible to call GENTARGETS twice, once to create the rules to generate - a target package and once to create the rules to generate a host package: -

    - -
    -$(eval $(call GENTARGETS,package,libfoo))
    -$(eval $(call GENTARGETS,package,libfoo,host))
    -
    - -

    This might be useful if the compilation of the target package - requires some tools to be installed on the host. If the package name is - libfoo, then the name of the package for the target is also - libfoo, while the name of the package for the host is - host-libfoo. These names should be used in the DEPENDENCIES - variables of other packages, if they depend on libfoo or - host-libfoo.

    - -

    The call to the GENTARGETS macro must be at the - end of the .mk file, after all variable definitions.

    - -

    For the target package, the GENTARGETS uses the - variables defined by the .mk file and prefixed by the uppercased package - name: LIBFOO_*. For the host package, it uses the - HOST_LIBFOO_*. For some variables, if the - HOST_LIBFOO_ prefixed variable doesn't exist, the package - infrastructure uses the corresponding variable prefixed by - LIBFOO_. This is done for variables that are likely to have - the same value for both the target and host packages. See below for - details.

    - -

    The list of variables that can be set in a .mk file to - give metadata information is (assuming the package name is - libfoo) :

    - -
      -
    • LIBFOO_VERSION, mandatory, must contain the - version of the package. Note that - if HOST_LIBFOO_VERSION doesn't exist, it is assumed - to be the same as LIBFOO_VERSION. It can also be a - Subversion or Git branch or tag, for packages that are fetched - directly from their revision control system.
      - Example: LIBFOO_VERSION = 0.1.2
    • - -
    • LIBFOO_SOURCE may contain the name of the tarball of - the package. If HOST_LIBFOO_SOURCE is not specified, it - defaults to LIBFOO_VERSION. If none are specified, then - the value is assumed to be - packagename-$(LIBFOO_VERSION).tar.gz.
      Example: - LIBFOO_SOURCE = foobar-$(LIBFOO_VERSION).tar.bz2
    • - -
    • LIBFOO_PATCH may contain the name of a patch, that - will be downloaded from the same location as the tarball indicated in - LIBFOO_SOURCE. If HOST_LIBFOO_PATCH is not - specified, it defaults to LIBFOO_PATCH. Also note that - another mechanism is available to patch a package: all files of the - form packagename-packageversion-description.patch present - in the package directory inside Buildroot will be applied to the - package after extraction.
    • - -
    • LIBFOO_SITE may contain the Internet location - of the package. It can either be the HTTP or FTP location of a - tarball, or the URL of a Git or Subversion repository - (see LIBFOO_SITE_METHOD - below). If HOST_LIBFOO_SITE is not specified, it - defaults to LIBFOO_SITE. If none are specified, - then the location is assumed to be - http://$$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/packagename. -
      Examples:
      - LIBFOO_SITE=http://www.libfoosoftware.org/libfoo
      - LIBFOO_SITE=http://svn.xiph.org/trunk/Tremor/
    • - -
    • LIBFOO_SITE_METHOD may contain the method to - fetch the package source code. It can either - be wget (for normal FTP/HTTP downloads of - tarballs), svn, git or bzr. - When not specified, it is guessed from the URL given - in LIBFOO_SITE: svn://, git:// - and bzr:// URLs will use the svn, - git and bzr methods respectively. All other - URL-types will use the wget method. So for example, in the - case of a package whose source code is available through - Subversion repository on HTTP, one must - specifiy LIBFOO_SITE_METHOD=svn. For svn - and git methods, what Buildroot does is a - checkout/clone of the repository which is then tarballed and - stored into the download cache. Next builds will not - checkout/clone again, but will use the tarball - directly. When HOST_LIBFOO_SITE_METHOD is not - specified, it defaults to the value - of LIBFOO_SITE_METHOD. See package/multimedia/tremor/ - for an example.
    • - -
    • LIBFOO_DEPENDENCIES lists the dependencies (in terms - of package name) that are required for the current target package to - compile. These dependencies are guaranteed to be compiled and - installed before the configuration of the current package starts. In a - similar way, HOST_LIBFOO_DEPENDENCIES lists the - dependency for the current host package.
    • - -
    • LIBFOO_INSTALL_STAGING can be set to YES - or NO (default). If set to YES, then the - commands in the LIBFOO_INSTALL_STAGING_CMDS variables are - executed to install the package into the staging directory.
    • - -
    • LIBFOO_INSTALL_TARGET can be set to YES - (default) or NO. If set to YES, then the - commands in the LIBFOO_INSTALL_TARGET_CMDS variables are - executed to install the package into the target directory.
    - -

    The recommended way to define these variables is to use the following - syntax:

    - -
    -LIBFOO_VERSION = 2.32
    -
    - -

    Now, the variables that define what should be performed at the - different steps of the build process.

    - -
      -
    • LIBFOO_CONFIGURE_CMDS, used to list the actions to be - performed to configure the package before its compilation
    • - -
    • LIBFOO_BUILD_CMDS, used to list the actions to be - performed to compile the package
    • - -
    • HOST_LIBFOO_INSTALL_CMDS, used to list the actions to - be performed to install the package, when the package is a host - package. The package must install its files to the directory given by - $(HOST_DIR). All files, including development files such - as headers should be installed, since other packages might be compiled - on top of this package.
    • - -
    • LIBFOO_INSTALL_TARGET_CMDS, used to list the actions - to be performed to install the package to the target directory, when - the package is a target package. The package must install its files to - the directory given by $(TARGET_DIR). Only the files - required for documentation and execution of the package - should be installed. Header files should not be installed, they will - be copied to the target, if the - development files in target filesystem option is selected. -
    • - -
    • LIBFOO_INSTALL_STAGING_CMDS, used to list the actions - to be performed to install the package to the staging directory, when - the package is a target package. The package must install its files to - the directory given by $(STAGING_DIR). All development - files should be installed, since they might be needed to compile other - packages.
    • - -
    • LIBFOO_CLEAN_CMDS, used to list the actions to - perform to clean up the build directory of the package.
    • - -
    • LIBFOO_UNINSTALL_TARGET_CMDS, used to list the actions - to uninstall the package from the target directory - $(TARGET_DIR)
    • - -
    • LIBFOO_UNINSTALL_STAGING_CMDS, used to list the - actions to uninstall the package from the staging directory - $(STAGING_DIR).
    • -
    - -

    The preferred way to define these variables is:

    - -
    -define LIBFOO_CONFIGURE_CMDS
    -	action 1
    -	action 2
    -	action 3
    -endef
    -
    - -

    In the action definitions, you can use the following variables:

    - -
      -
    • $(@D), which contains the directory in which the - package source code has been uncompressed.
    • - -
    • $(TARGET_CC), $(TARGET_LD), etc. to get - the target cross-compilation utilities
    • - -
    • $(TARGET_CROSS) to get the cross-compilation - toolchain prefix
    • - -
    • Of course the $(HOST_DIR), $(STAGING_DIR) - and $(TARGET_DIR) variables to install the packages - properly.
    • -
    - -

    The last feature of the generic infrastructure is the ability to add - hooks. These define further actions to perform after existing steps. - Most hooks aren't really useful for generic packages, since the - .mk file already has full control over the actions - performed in each step of the package construction. The hooks are more - useful for packages using the autotools infrastructure described below. - However, since they are provided by the generic infrastructure, they are - documented here. The exception is LIBFOO_POST_PATCH_HOOKS. - Patching the package is not user definable, so - LIBFOO_POST_PATCH_HOOKS will be userful for generic packages. -

    - -

    The following hook points are available:

    - -
      -
    • LIBFOO_POST_PATCH_HOOKS
    • -
    • LIBFOO_PRE_CONFIGURE_HOOKS
    • -
    • LIBFOO_POST_CONFIGURE_HOOKS
    • -
    • LIBFOO_POST_BUILD_HOOKS
    • -
    • LIBFOO_POST_INSTALL_HOOKS (for host packages only)
    • -
    • LIBFOO_POST_INSTALL_STAGING_HOOKS (for target packages only)
    • -
    • LIBFOO_POST_INSTALL_TARGET_HOOKS (for target packages only)
    • -
    - -

    These variables are lists of variable names containing actions - to be performed at this hook point. This allows several hooks to be - registered at a given hook point. Here is an example:

    - -
    -define LIBFOO_POST_PATCH_FIXUP
    -	action1
    -	action2
    -endef
    -
    -LIBFOO_POST_PATCH_HOOKS += LIBFOO_POST_PATCH_FIXUP
    -
    - -

    Makefile for autotools-based packages : tutorial

    - -

    First, let's see how to write a .mk file for an - autotools-based package, with an example :

    - -
    -01: #############################################################
    -02: #
    -03: # libfoo
    -04: #
    -05: #############################################################
    -06: LIBFOO_VERSION = 1.0
    -07: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz
    -08: LIBFOO_SITE = http://www.foosoftware.org/download
    -09: LIBFOO_INSTALL_STAGING = YES
    -10: LIBFOO_INSTALL_TARGET = YES
    -11: LIBFOO_CONF_OPT = --enable-shared
    -12: LIBFOO_DEPENDENCIES = libglib2 host-pkg-config
    -13:
    -14: $(eval $(call AUTOTARGETS,package,libfoo))
    -
    - -

    On line 6, we declare the version of the package.

    - -

    On line 7 and 8, we declare the name of the tarball and the location - of the tarball on the Web. Buildroot will automatically download the - tarball from this location.

    - -

    On line 9, we tell Buildroot to install the package to the staging - directory. The staging directory, located in output/staging/ - is the directory where all the packages are installed, including their - development files, etc. By default, packages are not installed to the - staging directory, since usually, only libraries need to be installed in - the staging directory: their development files are needed to compile - other libraries or applications depending on them. Also by default, when - staging installation is enabled, packages are installed in this location - using the make install command.

    - -

    On line 10, we tell Buildroot to also install the package to the - target directory. This directory contains what will become the root - filesystem running on the target. Usually, we try not to install header - files and to install stripped versions of the binary. By default, target - installation is enabled, so in fact, this line is not strictly - necessary. Also by default, packages are installed in this location - using the make install command.

    - -

    On line 11, we tell Buildroot to pass a custom configure option, that - will be passed to the ./configure script before configuring - and building the package.

    - -

    On line 12, we declare our dependencies, so that they are built - before the build process of our package starts.

    - -

    Finally, on line line 14, we invoke the AUTOTARGETS - macro that generates all the Makefile rules that actually allows the - package to be built.

    - -

    Makefile for autotools packages : reference

    - -

    The main macro of the autotools package infrastructure is - AUTOTARGETS. It has the same number of arguments and the - same semantic as the GENTARGETS macro, which is the main - macro of the generic package infrastructure. For autotools packages, the - ability to have target and host packages is also available (and is - actually widely used).

    - -

    Just like the generic infrastructure, the autotools infrastructure - works by defining a number of variables before calling the - AUTOTARGETS macro.

    - -

    First, all the package metadata information variables that exist in the - generic infrastructure also exist in the autotools infrastructure: - LIBFOO_VERSION, LIBFOO_SOURCE, - LIBFOO_PATCH, LIBFOO_SITE, - LIBFOO_SUBDIR, LIBFOO_DEPENDENCIES, - LIBFOO_INSTALL_STAGING, LIBFOO_INSTALL_TARGET.

    - -

    A few additional variables, specific to the autotools infrastructure, - can also be defined. Many of them are only useful in very specific - cases, typical packages will therefore only use a few of them.

    - -
      -
    • LIBFOO_SUBDIR may contain the name of a subdirectory - inside the package that contains the configure script. This is useful, - if for example, the main configure script is not at the root of the - tree extracted by the tarball. If HOST_LIBFOO_SUBDIR is - not specified, it defaults to LIBFOO_SUBDIR.
    • - -
    • LIBFOO_CONF_ENV, to specify additional environment - variables to pass to the configure script. By default, empty.
    • - -
    • LIBFOO_CONF_OPT, to specify additional configure - options to pass to the configure script. By default, empty.
    • - -
    • LIBFOO_MAKE, to specify an alternate make - command. This is typically useful when parallel make is enabled in - the configuration (using BR2_JLEVEL) but that this - feature should be disabled for the given package, for one reason or - another. By default, set to $(MAKE). If parallel building - is not supported by the package, then it should be set to - LIBFOO_MAKE=$(MAKE1).
    • - -
    • LIBFOO_MAKE_ENV, to specify additional environment - variables to pass to make in the build step. These are passed before - the make command. By default, empty.
    • - -
    • LIBFOO_MAKE_OPT, to specify additional variables to - pass to make in the build step. These are passed after the - make command. By default, empty.
    • - -
    • LIBFOO_AUTORECONF, tells whether the package should - be autoreconfigured or not (i.e, if the configure script and - Makefile.in files should be re-generated by re-running autoconf, - automake, libtool, etc.). Valid values are YES and - NO. By default, the value is NO
    • - -
    • LIBFOO_AUTORECONF_OPT to specify additional options - passed to the autoreconf program if - LIBFOO_AUTORECONF=YES. By default, empty.
    • - -
    • LIBFOO_LIBTOOL_PATCH tells whether the Buildroot - patch to fix libtool cross-compilation issues should be applied or - not. Valid values are YES and NO. By - default, the value is YES
    • - -
    • LIBFOO_INSTALL_STAGING_OPT contains the make options - used to install the package to the staging directory. By default, the - value is DESTDIR=$$(STAGING_DIR) install, which is - correct for most autotools packages. It is still possible to override - it.
    • - -
    • LIBFOO_INSTALL_TARGET_OPT contains the make options - used to install the package to the target directory. By default, the - value is DESTDIR=$$(TARGET_DIR) install. The default - value is correct for most autotools packages, but it is still possible - to override it if needed.
    • - -
    • LIBFOO_CLEAN_OPT contains the make options used to - clean the package. By default, the value is clean.
    • - -
    • LIBFOO_UNINSTALL_STAGING_OPT, contains the make - options used to uninstall the package from the staging directory. By - default, the value is DESTDIR=$$(STAGING_DIR) uninstall.
    • - -
    • LIBFOO_UNINSTALL_TARGET_OPT, contains the make - options used to uninstall the package from the target directory. By - default, the value is DESTDIR=$$(TARGET_DIR) uninstall.
    • -
    - -

    With the autotools infrastructure, all the steps required to build - and install the packages are already defined, and they generally work - well for most autotools-based packages. However, when required, it is - still possible to customize what is done in any particular step:

    - -
      -
    • By adding a post-operation hook (after extract, patch, configure, - build or install). See the reference documentation of the generic - infrastructure for details.
    • - -
    • By overriding one of the steps. For example, even if the autotools - infrastructure is used, if the package .mk file defines its - own LIBFOO_CONFIGURE_CMDS variable, it will be used - instead of the default autotools one. However, using this method - should be restricted to very specific cases. Do not use it in the - general case.
    • -
    - -

    Makefile for CMake-based packages : tutorial

    - -

    First, let's see how to write a .mk file for a CMake-based - package, with an example :

    - -
    -01: #############################################################
    -02: #
    -03: # libfoo
    -04: #
    -05: #############################################################
    -06: LIBFOO_VERSION = 1.0
    -07: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz
    -08: LIBFOO_SITE = http://www.foosoftware.org/download
    -09: LIBFOO_INSTALL_STAGING = YES
    -10: LIBFOO_INSTALL_TARGET = YES
    -11: LIBFOO_CONF_OPT = -DBUILD_DEMOS=ON
    -12: LIBFOO_DEPENDENCIES = libglib2 host-pkg-config
    -13:
    -14: $(eval $(call CMAKETARGETS,package,libfoo))
    -
    - -

    On line 6, we declare the version of the package.

    - -

    On line 7 and 8, we declare the name of the tarball and the location - of the tarball on the Web. Buildroot will automatically download the - tarball from this location.

    - -

    On line 9, we tell Buildroot to install the package to the staging - directory. The staging directory, located in output/staging/ - is the directory where all the packages are installed, including their - development files, etc. By default, packages are not installed to the - staging directory, since usually, only libraries need to be installed in - the staging directory: their development files are needed to compile - other libraries or applications depending on them. Also by default, when - staging installation is enabled, packages are installed in this location - using the make install command.

    - -

    On line 10, we tell Buildroot to also install the package to the - target directory. This directory contains what will become the root - filesystem running on the target. Usually, we try not to install header - files and to install stripped versions of the binary. By default, target - installation is enabled, so in fact, this line is not strictly - necessary. Also by default, packages are installed in this location - using the make install command.

    - -

    On line 11, we tell Buildroot to pass custom options to CMake when it is - configuring the package.

    - -

    On line 12, we declare our dependencies, so that they are built - before the build process of our package starts.

    - -

    Finally, on line line 14, we invoke the CMAKETARGETS - macro that generates all the Makefile rules that actually allows the - package to be built.

    - -

    Makefile for CMake packages : reference

    - -

    The main macro of the CMake package infrastructure is - CMAKETARGETS. It has the same number of arguments and the - same semantic as the GENTARGETS macro, which is the main - macro of the generic package infrastructure. For CMake packages, the - ability to have target and host packages is also available.

    - -

    Just like the generic infrastructure, the CMake infrastructure - works by defining a number of variables before calling the - CMAKETARGETS macro.

    - -

    First, all the package metadata information variables that exist in the - generic infrastructure also exist in the CMake infrastructure: - LIBFOO_VERSION, LIBFOO_SOURCE, - LIBFOO_PATCH, LIBFOO_SITE, - LIBFOO_SUBDIR, LIBFOO_DEPENDENCIES, - LIBFOO_INSTALL_STAGING, LIBFOO_INSTALL_TARGET.

    - -

    A few additional variables, specific to the CMake infrastructure, - can also be defined. Many of them are only useful in very specific - cases, typical packages will therefore only use a few of them.

    - -
      -
    • LIBFOO_SUBDIR may contain the name of a subdirectory - inside the package that contains the main CMakeLists.txt file. This is - useful, if for example, the main CMakeLists.txt file is not at the root - of the tree extracted by the tarball. If HOST_LIBFOO_SUBDIR - is not specified, it defaults to LIBFOO_SUBDIR.
    • - -
    • LIBFOO_CONF_ENV, to specify additional environment - variables to pass to CMake. By default, empty.
    • - -
    • LIBFOO_CONF_OPT, to specify additional configure - options to pass to CMake. By default, empty.
    • - -
    • LIBFOO_MAKE, to specify an alternate make - command. This is typically useful when parallel make is enabled in - the configuration (using BR2_JLEVEL) but that this - feature should be disabled for the given package, for one reason or - another. By default, set to $(MAKE). If parallel building - is not supported by the package, then it should be set to - LIBFOO_MAKE=$(MAKE1).
    • - -
    • LIBFOO_MAKE_ENV, to specify additional environment - variables to pass to make in the build step. These are passed before - the make command. By default, empty.
    • - -
    • LIBFOO_MAKE_OPT, to specify additional variables to - pass to make in the build step. These are passed after the - make command. By default, empty.
    • - -
    • LIBFOO_INSTALL_STAGING_OPT contains the make options - used to install the package to the staging directory. By default, the - value is DESTDIR=$$(STAGING_DIR) install, which is - correct for most CMake packages. It is still possible to override - it.
    • - -
    • LIBFOO_INSTALL_TARGET_OPT contains the make options - used to install the package to the target directory. By default, the - value is DESTDIR=$$(TARGET_DIR) install. The default - value is correct for most CMake packages, but it is still possible - to override it if needed.
    • - -
    • LIBFOO_CLEAN_OPT contains the make options used to - clean the package. By default, the value is clean.
    • -
    - -

    With the CMake infrastructure, all the steps required to build - and install the packages are already defined, and they generally work - well for most CMake-based packages. However, when required, it is - still possible to customize what is done in any particular step:

    - -
      -
    • By adding a post-operation hook (after extract, patch, configure, - build or install). See the reference documentation of the generic - infrastructure for details.
    • - -
    • By overriding one of the steps. For example, even if the CMake - infrastructure is used, if the package .mk file defines its - own LIBFOO_CONFIGURE_CMDS variable, it will be used - instead of the default CMake one. However, using this method - should be restricted to very specific cases. Do not use it in the - general case.
    • -
    - -

    Manual Makefile : tutorial

    - -

    NOTE: new manual makefiles should not be created, and existing - manual makefiles should be converted either to the generic, autotools - or cmake infrastructure. This section is only kept to document the existing - manual makefiles and to help understand how they work.

    - -
    -01: #############################################################
    -02: #
    -03: # libfoo
    -04: #
    -05: #############################################################
    -06: LIBFOO_VERSION:=1.0
    -07: LIBFOO_SOURCE:=libfoo-$(LIBFOO_VERSION).tar.gz
    -08: LIBFOO_SITE:=http://www.foosoftware.org/downloads
    -09: LIBFOO_DIR:=$(BUILD_DIR)/foo-$(FOO_VERSION)
    -10: LIBFOO_BINARY:=foo
    -11: LIBFOO_TARGET_BINARY:=usr/bin/foo
    -12:
    -13: $(DL_DIR)/$(LIBFOO_SOURCE):
    -14: 	$(call DOWNLOAD,$(LIBFOO_SITE),$(LIBFOO_SOURCE))
    -15:
    -16: $(LIBFOO_DIR)/.source: $(DL_DIR)/$(LIBFOO_SOURCE)
    -17: 	$(ZCAT) $(DL_DIR)/$(LIBFOO_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
    -18: 	touch $@
    -19:
    -20: $(LIBFOO_DIR)/.configured: $(LIBFOO_DIR)/.source
    -21: 	(cd $(LIBFOO_DIR); rm -rf config.cache; \
    -22: 		$(TARGET_CONFIGURE_OPTS) \
    -23: 		$(TARGET_CONFIGURE_ARGS) \
    -24: 		./configure \
    -25: 		--target=$(GNU_TARGET_NAME) \
    -26: 		--host=$(GNU_TARGET_NAME) \
    -27: 		--build=$(GNU_HOST_NAME) \
    -28: 		--prefix=/usr \
    -29: 		--sysconfdir=/etc \
    -30: 	)
    -31: 	touch $@
    -32:
    -33: $(LIBFOO_DIR)/$(LIBFOO_BINARY): $(LIBFOO_DIR)/.configured
    -34: 	$(MAKE) CC=$(TARGET_CC) -C $(LIBFOO_DIR)
    -35:
    -36: $(TARGET_DIR)/$(LIBFOO_TARGET_BINARY): $(LIBFOO_DIR)/$(LIBFOO_BINARY)
    -37: 	$(MAKE) DESTDIR=$(TARGET_DIR) -C $(LIBFOO_DIR) install-strip
    -38: 	rm -Rf $(TARGET_DIR)/usr/man
    -39:
    -40: libfoo: uclibc ncurses $(TARGET_DIR)/$(LIBFOO_TARGET_BINARY)
    -41:
    -42: libfoo-source: $(DL_DIR)/$(LIBFOO_SOURCE)
    -43:
    -44: libfoo-clean:
    -45: 	$(MAKE) prefix=$(TARGET_DIR)/usr -C $(LIBFOO_DIR) uninstall
    -46: 	-$(MAKE) -C $(LIBFOO_DIR) clean
    -47:
    -48: libfoo-dirclean:
    -49: 	rm -rf $(LIBFOO_DIR)
    -50:
    -51: #############################################################
    -52: #
    -53: # Toplevel Makefile options
    -54: #
    -55: #############################################################
    -56: ifeq ($(BR2_PACKAGE_LIBFOO),y)
    -57: TARGETS+=libfoo
    -58: endif
    -
    - -

    First of all, this Makefile example works for a package which - comprises a single binary executable. For other software, such as - libraries or more complex stuff with multiple binaries, it must be - adapted. For examples look at the other *.mk files in the - package directory.

    - -

    At lines 6-11, a couple of useful variables are - defined:

    - -
      -
    • LIBFOO_VERSION: The version of libfoo that - should be downloaded.
    • - -
    • LIBFOO_SOURCE: The name of the tarball of libfoo - on the download website or FTP site. As you can see - LIBFOO_VERSION is used.
    • - -
    • LIBFOO_SITE: The HTTP or FTP site from which - libfoo archive is downloaded. It must include the complete path to - the directory where LIBFOO_SOURCE can be found.
    • - -
    • LIBFOO_DIR: The directory into which the software will - be configured and compiled. Basically, it's a subdirectory of - BUILD_DIR which is created upon decompression of the tarball. -
    • - -
    • LIBFOO_BINARY: Software binary name. As said previously, - this is an example for a package with a single binary.
    • - -
    • LIBFOO_TARGET_BINARY: The full path of the binary inside - the target filesystem.
    - -

    Lines 13-14 define a target that downloads - the tarball from the remote site to the download directory - (DL_DIR).

    - -

    Lines 16-18 define a target and associated - rules that uncompress the downloaded tarball. As you can see, this - target depends on the tarball file so that the previous target (lines - 13-14) is called before executing the rules of - the current target. Uncompressing is followed by touching a - hidden file to mark the software as having been uncompressed. This trick - is used everywhere in a Buildroot Makefile to split steps (download, - uncompress, configure, compile, install) while still having correct - dependencies.

    - -

    Lines 20-31 define a target and associated - rules that configure the software. It depends on the previous target - (the hidden .source file) so that we are sure the software - has been uncompressed. In order to configure the package, it basically - runs the well-known ./configure script. As we may be doing - cross-compilation, target, host and - build arguments are given. The prefix is also set to - /usr, not because the software will be installed in - /usr on your host system, but because the software will be - installed in /usr on the target filesystem. Finally it - creates a .configured file to mark the software as - configured.

    - -

    Lines 33-34 define a target and a rule that - compile the software. This target will create the binary file in the - compilation directory and depends on the software being already - configured (hence the reference to the .configured file). - It basically runs make inside the source directory.

    - -

    Lines 36-38 define a target and associated - rules that install the software inside the target filesystem. They - depend on the binary file in the source directory to make sure the - software has been compiled. They use the install-strip - target of the software Makefile by passing a - DESTDIR argument so that the Makefile doesn't - try to install the software in the host /usr but rather in - the target /usr. After the installation, the - /usr/man directory inside the target filesystem is removed - to save space.

    - -

    Line 40 defines the main target of the - software — the one that will eventually be used by the top level - Makefile to download, compile, and then install this - package. This target should first of all depend on all needed - dependencies of the software (in our example, uclibc and - ncurses) and also depend on the final binary. This last dependency - will call all previous dependencies in the correct order.

    - -

    Line 42 defines a simple target that only - downloads the code source. This is not used during normal operation of - Buildroot, but is needed if you intend to download all required sources - at once for later offline build. Note that if you add a new package, - providing a libfoo-source target is mandatory to - support users that wish to do offline-builds. Furthermore, it eases - checking if all package-sources are downloadable.

    - -

    Lines 44-46 define a simple target to clean - the software build by calling the Makefile with the appropriate options. - The -clean target should run make clean on - $(BUILD_DIR)/package-version and MUST uninstall all files of the package - from $(STAGING_DIR) and from $(TARGET_DIR).

    - -

    Lines 48-49 define a simple target to - completely remove the directory in which the software was uncompressed, - configured and compiled. The -dirclean target MUST - completely rm $(BUILD_DIR)/ package-version.

    - -

    Lines 51-58 add the target libfoo - to the list of targets to be compiled by Buildroot, by first checking if - the configuration option for this package has been enabled using the - configuration tool. If so, it then "subscribes" this package - to be compiled by adding the package to the TARGETS global variable. - The name added to the TARGETS global variable is the name of this - package's target, as defined on line 40, which - is used by Buildroot to download, compile, and then install this package. -

    - -

    Gettext integration and interaction with packages

    - -

    Many packages that support internationalization use the gettext - library. Dependencies for this library are fairly complicated and therefore, - deserves some explanation.

    - -

    The uClibc C library doesn't implement gettext functionality, - therefore with this C library, a separate gettext must be compiled. On - the other hand, the glibc C library does integrate its own - gettext, and in this case, the separate gettext library should not be - compiled, because it creates various kinds of build failures.

    - -

    Additionally, some packages (such as libglib2) do require gettext - unconditionally, while other packages (those who support - --disable-nls in general) only require gettext when locale - support is enabled.

    - -

    Therefore, Buildroot defines two configuration options:

    - -
      -
    • BR2_NEEDS_GETTEXT, which is true as soon as the - toolchain doesn't provide its own gettext implementation
    • - -
    • BR2_NEEDS_GETTEXT_IF_LOCALE, which is true if the - toolchain doesn't provide its own gettext implementation and if locale - support is enabled
    - -

    Therefore, packages that unconditionally need gettext should:

    - -
      -
    1. Use select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT - and possibly select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT, - if libintl is also needed
    2. - -
    3. Use $(if $(BR2_NEEDS_GETTEXT),gettext) in the package - DEPENDENCIES variable
    4. -
    - -

    Packages that need gettext only when locale support is enabled should: -

    - -
      -
    1. Use - select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE - and possibly - select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE, - if libintl is also needed
    2. - -
    3. Use $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) in - the package DEPENDENCIES variable
    4. -
    - -

    Conclusion

    - -

    As you can see, adding a software package to Buildroot is simply a - matter of writing a Makefile using an existing example and modifying it - according to the compilation process required by the package.

    - -

    If you package software that might be useful for other people, don't - forget to send a patch to Buildroot developers!

    - -

    Frequently asked questions

    - - - -

    The boot hangs after Starting - network...

    - -

    If the boot process seems to hang after the following messages - (messages not necessarly exactly similar, depending on the list of - packages selected):

    - -
    Freeing init memory: 3972K
    -Initializing random number generator... done.
    -Starting network...
    -Starting dropbear sshd: generating rsa key... generating dsa key... OK
    - -

    then it means that your system is running, but didn't start a - shell on the serial console. In order to have the system start a - shell on your serial console, you have to go in the Buildroot - configuration, Target options, enable Generic - serial port config, and select the serial port and speed - you would like to use for the shell. This will automatically tune - the /etc/inittab file of the generated system so that - a shell starts on the correct serial port.

    - -

    module-init-tools - fails to build with cannot find -lc

    - -

    If the build of module-init-tools for the host fails - with:

    - -
    /usr/bin/ld: cannot find -lc 
    - -

    then probably you are running a Fedora (or similar) - distribution, and you should install the glibc-static - package. This is because the module-init-tools build - process wants to link statically against the C library.

    - - - -

    To learn more about Buildroot you can visit these websites:

    - - -
    - - diff --git a/docs/copyright.txt b/docs/copyright.txt index 83382f4cfb..497d67b190 100644 --- a/docs/copyright.txt +++ b/docs/copyright.txt @@ -1,6 +1,6 @@ The code and graphics on this website (and it's mirror sites, if any) are -Copyright (c) 1999-2005 by Erik Andersen, 2006-2011 The Buildroot +Copyright (c) 1999-2005 by Erik Andersen, 2006-2013 The Buildroot developers. All rights reserved. Documents on this Web site including their graphical elements, design, and diff --git a/docs/docs.html b/docs/docs.html index 57f4bf64ec..1393498922 100644 --- a/docs/docs.html +++ b/docs/docs.html @@ -2,16 +2,19 @@

    Documentation

    -

    Our document "Buildroot usage and documentation" is where you want -to start reading if you wish to understand how Buildroot work, or wish -to change/extend/fix things. If you find any errors (factual, -grammatical, whatever) please report them. Choose between:

    +

    The Buildroot user manual is where you want to start reading if you +wish to understand how Buildroot works, or wish to change/extend/fix +things. It is available as:

    +

    If you find any errors (factual, grammatical, whatever) please +report them to us.

    +

    If you find that you need help with Buildroot, you can ask for help:

    @@ -20,8 +23,8 @@

    Documentation

  • On the buildroot mailing list at buildroot at uclibc.org
  • -
  • On the Buildroot IRC - channel, #uclibc on Freenode
  • +
  • On the Buildroot IRC + channel, #buildroot on Freenode
  • On our bugtracker.
  • diff --git a/docs/download.html b/docs/download.html index de7b98000f..b9a9fcf1e7 100644 --- a/docs/download.html +++ b/docs/download.html @@ -6,20 +6,21 @@

    Download

    -The latest stable release is 2011.02, which can be downloaded +The latest stable release is 2013.11, which can be downloaded here:

    -buildroot-2011.02.tar.gz +buildroot-2013.11.tar.gz or -buildroot-2011.02.tar.bz2. +buildroot-2013.11.tar.bz2. +

    This and earlier releases can always be downloaded from diff --git a/docs/favicon.ico b/docs/favicon.ico new file mode 100644 index 0000000000..fa9d24079b Binary files /dev/null and b/docs/favicon.ico differ diff --git a/docs/footer.html b/docs/footer.html index 86e7ffa7b2..a5de2140d1 100644 --- a/docs/footer.html +++ b/docs/footer.html @@ -10,7 +10,7 @@

    Copyright © 1999-2005 Erik Andersen, - 2006-2011 The Buildroot developers + 2006-2013 The Buildroot developers
    Mail all comments, insults, suggestions and bribes to
    diff --git a/docs/git.html b/docs/git.html index 111a29a305..0c99251a9d 100644 --- a/docs/git.html +++ b/docs/git.html @@ -4,7 +4,7 @@

    Git Access

    The buildroot repository can be browsed online through cgit at -http://git.buildroot.net/buildroot. +http://git.buildroot.net/buildroot. To grab a copy of the repository use
    @@ -36,8 +36,8 @@ 

    Git Access

    Because you've only been granted anonymous access to the tree, you won't be -able to commit any changes. Changes can be submitted for inclusion by posting -them to the buildroot mailing list or to the Bug and Patch Tracking System. diff --git a/docs/header.html b/docs/header.html index beb85e98a7..b987d85e95 100644 --- a/docs/header.html +++ b/docs/header.html @@ -15,6 +15,21 @@ td.c2 {font-family: arial, helvetica, sans-serif; font-size: 80%} td.c1 {font-family: lucida, helvetica; font-size: 248%} + @@ -34,32 +49,14 @@
    About
    Latest News
    Download -
    Browse Source +
    Browse Source
    Accessing Source
    Bug Tracking
    Documentation
    Mailing Lists - -

    Related Sites -
    BusyBox -
    uClibc.org -
    uClibc++ -
    udhcp -
    Scratchbox -
    OpenEmbedded -
    uCdot -
    LinuxDevices -
    Slashdot -
    Freshmeat -
    Linux Today -
    Linux Weekly News -
    Linux HOWTOs - - +
    Autobuilder +
    Patchwork +
    Sponsors diff --git a/docs/lists.html b/docs/lists.html index 31d47d4d01..b806d77db7 100644 --- a/docs/lists.html +++ b/docs/lists.html @@ -21,16 +21,20 @@

    Search the List Archives

    -
    - - - -
    - -
    -Google -
    -
    +
    Loading
    + + +
    diff --git a/docs/manual/adding-packages-autotools.txt b/docs/manual/adding-packages-autotools.txt new file mode 100644 index 0000000000..19ec2c15fb --- /dev/null +++ b/docs/manual/adding-packages-autotools.txt @@ -0,0 +1,172 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Infrastructure for autotools-based packages +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[[autotools-package-tutorial]] + ++autotools-package+ tutorial +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +First, let's see how to write a +.mk+ file for an autotools-based +package, with an example : + +------------------------ +01: ################################################################################ +02: # +03: # libfoo +04: # +05: ################################################################################ +06: +07: LIBFOO_VERSION = 1.0 +08: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz +09: LIBFOO_SITE = http://www.foosoftware.org/download +10: LIBFOO_INSTALL_STAGING = YES +11: LIBFOO_INSTALL_TARGET = NO +12: LIBFOO_CONF_OPT = --disable-shared +13: LIBFOO_DEPENDENCIES = libglib2 host-pkgconf +14: +15: $(eval $(autotools-package)) +------------------------ + +On line 7, we declare the version of the package. + +On line 8 and 9, we declare the name of the tarball (xz-ed tarball recommended) +and the location of the tarball on the Web. Buildroot will automatically +download the tarball from this location. + +On line 10, we tell Buildroot to install the package to the staging +directory. The staging directory, located in +output/staging/+ +is the directory where all the packages are installed, including their +development files, etc. By default, packages are not installed to the +staging directory, since usually, only libraries need to be installed in +the staging directory: their development files are needed to compile +other libraries or applications depending on them. Also by default, when +staging installation is enabled, packages are installed in this location +using the +make install+ command. + +On line 11, we tell Buildroot to not install the package to the +target directory. This directory contains what will become the root +filesystem running on the target. For purely static libraries, it is +not necessary to install them in the target directory because they will +not be used at runtime. By default, target installation is enabled; setting +this variable to NO is almost never needed. Also by default, packages are +installed in this location using the +make install+ command. + +On line 12, we tell Buildroot to pass a custom configure option, that +will be passed to the +./configure+ script before configuring +and building the package. + +On line 13, we declare our dependencies, so that they are built +before the build process of our package starts. + +Finally, on line line 15, we invoke the +autotools-package+ +macro that generates all the Makefile rules that actually allows the +package to be built. + +[[autotools-package-reference]] + ++autotools-package+ reference +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The main macro of the autotools package infrastructure is ++autotools-package+. It is similar to the +generic-package+ macro. The ability to +have target and host packages is also available, with the ++host-autotools-package+ macro. + +Just like the generic infrastructure, the autotools infrastructure +works by defining a number of variables before calling the ++autotools-package+ macro. + +First, all the package metadata information variables that exist in the +generic infrastructure also exist in the autotools infrastructure: ++LIBFOO_VERSION+, +LIBFOO_SOURCE+, ++LIBFOO_PATCH+, +LIBFOO_SITE+, ++LIBFOO_SUBDIR+, +LIBFOO_DEPENDENCIES+, ++LIBFOO_INSTALL_STAGING+, +LIBFOO_INSTALL_TARGET+. + +A few additional variables, specific to the autotools infrastructure, +can also be defined. Many of them are only useful in very specific +cases, typical packages will therefore only use a few of them. + +* +LIBFOO_SUBDIR+ may contain the name of a subdirectory + inside the package that contains the configure script. This is useful, + if for example, the main configure script is not at the root of the + tree extracted by the tarball. If +HOST_LIBFOO_SUBDIR+ is + not specified, it defaults to +LIBFOO_SUBDIR+. + +* +LIBFOO_CONF_ENV+, to specify additional environment + variables to pass to the configure script. By default, empty. + +* +LIBFOO_CONF_OPT+, to specify additional configure + options to pass to the configure script. By default, empty. + +* +LIBFOO_MAKE+, to specify an alternate +make+ + command. This is typically useful when parallel make is enabled in + the configuration (using +BR2_JLEVEL+) but that this + feature should be disabled for the given package, for one reason or + another. By default, set to +$(MAKE)+. If parallel building + is not supported by the package, then it should be set to + +LIBFOO_MAKE=$(MAKE1)+. + +* +LIBFOO_MAKE_ENV+, to specify additional environment + variables to pass to make in the build step. These are passed before + the +make+ command. By default, empty. + +* +LIBFOO_MAKE_OPT+, to specify additional variables to + pass to make in the build step. These are passed after the + +make+ command. By default, empty. + +* +LIBFOO_AUTORECONF+, tells whether the package should + be autoreconfigured or not (i.e, if the configure script and + Makefile.in files should be re-generated by re-running autoconf, + automake, libtool, etc.). Valid values are +YES+ and + +NO+. By default, the value is +NO+ + +* +LIBFOO_AUTORECONF_OPT+ to specify additional options + passed to the 'autoreconf' program if + +LIBFOO_AUTORECONF=YES+. By default, empty. + +* +LIBFOO_LIBTOOL_PATCH+ tells whether the Buildroot + patch to fix libtool cross-compilation issues should be applied or + not. Valid values are +YES+ and +NO+. By + default, the value is +YES+ + +* +LIBFOO_INSTALL_STAGING_OPT+ contains the make options + used to install the package to the staging directory. By default, the + value is +DESTDIR=$(STAGING_DIR) install+, which is + correct for most autotools packages. It is still possible to override + it. + +* +LIBFOO_INSTALL_TARGET_OPT+ contains the make options + used to install the package to the target directory. By default, the + value is +DESTDIR=$(TARGET_DIR) install+. The default + value is correct for most autotools packages, but it is still possible + to override it if needed. + +* +LIBFOO_CLEAN_OPT+ contains the make options used to + clean the package. By default, the value is +clean+. + +* +LIBFOO_UNINSTALL_STAGING_OPT+, contains the make + options used to uninstall the package from the staging directory. By + default, the value is +DESTDIR=$$(STAGING_DIR) uninstall+. + +* +LIBFOO_UNINSTALL_TARGET_OPT+, contains the make + options used to uninstall the package from the target directory. By + default, the value is +DESTDIR=$$(TARGET_DIR) uninstall+. + +With the autotools infrastructure, all the steps required to build +and install the packages are already defined, and they generally work +well for most autotools-based packages. However, when required, it is +still possible to customize what is done in any particular step: + +* By adding a post-operation hook (after extract, patch, configure, + build or install). See xref:hooks[] for details. + +* By overriding one of the steps. For example, even if the autotools + infrastructure is used, if the package +.mk+ file defines its + own +LIBFOO_CONFIGURE_CMDS+ variable, it will be used + instead of the default autotools one. However, using this method + should be restricted to very specific cases. Do not use it in the + general case. diff --git a/docs/manual/adding-packages-cmake.txt b/docs/manual/adding-packages-cmake.txt new file mode 100644 index 0000000000..4373423d33 --- /dev/null +++ b/docs/manual/adding-packages-cmake.txt @@ -0,0 +1,144 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Infrastructure for CMake-based packages +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[[cmake-package-tutorial]] + ++cmake-package+ tutorial +^^^^^^^^^^^^^^^^^^^^^^^^ + +First, let's see how to write a +.mk+ file for a CMake-based package, +with an example : + +------------------------ +01: ################################################################################ +02: # +03: # libfoo +04: # +05: ################################################################################ +06: +07: LIBFOO_VERSION = 1.0 +08: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz +09: LIBFOO_SITE = http://www.foosoftware.org/download +10: LIBFOO_INSTALL_STAGING = YES +11: LIBFOO_INSTALL_TARGET = NO +12: LIBFOO_CONF_OPT = -DBUILD_DEMOS=ON +13: LIBFOO_DEPENDENCIES = libglib2 host-pkgconf +14: +15: $(eval $(cmake-package)) +------------------------ + +On line 7, we declare the version of the package. + +On line 8 and 9, we declare the name of the tarball (xz-ed tarball recommended) +and the location of the tarball on the Web. Buildroot will automatically +download the tarball from this location. + +On line 10, we tell Buildroot to install the package to the staging +directory. The staging directory, located in +output/staging/+ +is the directory where all the packages are installed, including their +development files, etc. By default, packages are not installed to the +staging directory, since usually, only libraries need to be installed in +the staging directory: their development files are needed to compile +other libraries or applications depending on them. Also by default, when +staging installation is enabled, packages are installed in this location +using the +make install+ command. + +On line 11, we tell Buildroot to not install the package to the +target directory. This directory contains what will become the root +filesystem running on the target. For purely static libraries, it is +not necessary to install them in the target directory because they will +not be used at runtime. By default, target installation is enabled; setting +this variable to NO is almost never needed. Also by default, packages are +installed in this location using the +make install+ command. + +On line 12, we tell Buildroot to pass custom options to CMake when it is +configuring the package. + +On line 13, we declare our dependencies, so that they are built +before the build process of our package starts. + +Finally, on line line 15, we invoke the +cmake-package+ +macro that generates all the Makefile rules that actually allows the +package to be built. + +[[cmake-package-reference]] + ++cmake-package+ reference +^^^^^^^^^^^^^^^^^^^^^^^^^ + +The main macro of the CMake package infrastructure is ++cmake-package+. It is similar to the +generic-package+ macro. The ability to +have target and host packages is also available, with the ++host-cmake-package+ macro. + +Just like the generic infrastructure, the CMake infrastructure works +by defining a number of variables before calling the +cmake-package+ +macro. + +First, all the package metadata information variables that exist in +the generic infrastructure also exist in the CMake infrastructure: ++LIBFOO_VERSION+, +LIBFOO_SOURCE+, +LIBFOO_PATCH+, +LIBFOO_SITE+, ++LIBFOO_SUBDIR+, +LIBFOO_DEPENDENCIES+, +LIBFOO_INSTALL_STAGING+, ++LIBFOO_INSTALL_TARGET+. + +A few additional variables, specific to the CMake infrastructure, can +also be defined. Many of them are only useful in very specific cases, +typical packages will therefore only use a few of them. + +* +LIBFOO_SUBDIR+ may contain the name of a subdirectory inside the + package that contains the main CMakeLists.txt file. This is useful, + if for example, the main CMakeLists.txt file is not at the root of + the tree extracted by the tarball. If +HOST_LIBFOO_SUBDIR+ is not + specified, it defaults to +LIBFOO_SUBDIR+. + +* +LIBFOO_CONF_ENV+, to specify additional environment variables to + pass to CMake. By default, empty. + +* +LIBFOO_CONF_OPT+, to specify additional configure options to pass + to CMake. By default, empty. + +* +LIBFOO_MAKE+, to specify an alternate +make+ command. This is + typically useful when parallel make is enabled in the configuration + (using +BR2_JLEVEL+) but that this feature should be disabled for + the given package, for one reason or another. By default, set to + +$(MAKE)+. If parallel building is not supported by the package, + then it should be set to +LIBFOO_MAKE=$(MAKE1)+. + +* +LIBFOO_MAKE_ENV+, to specify additional environment variables to + pass to make in the build step. These are passed before the +make+ + command. By default, empty. + +* +LIBFOO_MAKE_OPT+, to specify additional variables to pass to make + in the build step. These are passed after the +make+ command. By + default, empty. + +* +LIBFOO_INSTALL_STAGING_OPT+ contains the make options used to + install the package to the staging directory. By default, the value + is +DESTDIR=$(STAGING_DIR) install+, which is correct for most + CMake packages. It is still possible to override it. + +* +LIBFOO_INSTALL_TARGET_OPT+ contains the make options used to + install the package to the target directory. By default, the value + is +DESTDIR=$(TARGET_DIR) install+. The default value is correct + for most CMake packages, but it is still possible to override it if + needed. + +* +LIBFOO_CLEAN_OPT+ contains the make options used to clean the + package. By default, the value is +clean+. + +With the CMake infrastructure, all the steps required to build and +install the packages are already defined, and they generally work well +for most CMake-based packages. However, when required, it is still +possible to customize what is done in any particular step: + +* By adding a post-operation hook (after extract, patch, configure, + build or install). See xref:hooks[] for details. + +* By overriding one of the steps. For example, even if the CMake + infrastructure is used, if the package +.mk+ file defines its own + +LIBFOO_CONFIGURE_CMDS+ variable, it will be used instead of the + default CMake one. However, using this method should be restricted + to very specific cases. Do not use it in the general case. diff --git a/docs/manual/adding-packages-conclusion.txt b/docs/manual/adding-packages-conclusion.txt new file mode 100644 index 0000000000..8e1b2c6a73 --- /dev/null +++ b/docs/manual/adding-packages-conclusion.txt @@ -0,0 +1,14 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Conclusion +~~~~~~~~~~ + +As you can see, adding a software package to Buildroot is simply a +matter of writing a Makefile using an existing example and modifying it +according to the compilation process required by the package. + +If you package software that might be useful for other people, don't +forget to send a patch to the Buildroot mailing list (see +xref:submitting-patches[])! + diff --git a/docs/manual/adding-packages-directory.txt b/docs/manual/adding-packages-directory.txt new file mode 100644 index 0000000000..700ec4fdbd --- /dev/null +++ b/docs/manual/adding-packages-directory.txt @@ -0,0 +1,294 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Package directory +~~~~~~~~~~~~~~~~~ + +First of all, create a directory under the +package+ directory for +your software, for example +libfoo+. + +Some packages have been grouped by topic in a sub-directory: ++x11r7+, +efl+ and +matchbox+. If your package fits in +one of these categories, then create your package directory in these. +New subdirectories are discouraged, however. + + ++Config.in+ file +~~~~~~~~~~~~~~~~ + +Then, create a file named +Config.in+. This file will contain the +option descriptions related to our +libfoo+ software that will be used +and displayed in the configuration tool. It should basically contain: + +--------------------------- +config BR2_PACKAGE_LIBFOO + bool "libfoo" + help + This is a comment that explains what libfoo is. + + http://foosoftware.org/libfoo/ +--------------------------- + +The +bool+ line, +help+ line and other meta-informations about the +configuration option must be indented with one tab. The help text +itself should be indented with one tab and two spaces, and it must +mention the upstream URL of the project. + +You can add other sub-options into a +if +BR2_PACKAGE_LIBFOO...endif+ statement to configure particular things +in your software. You can look at examples in other packages. The +syntax of the +Config.in+ file is the same as the one for the kernel +Kconfig file. The documentation for this syntax is available at +http://kernel.org/doc/Documentation/kbuild/kconfig-language.txt[] + +Finally you have to add your new +libfoo/Config.in+ to ++package/Config.in+ (or in a category subdirectory if you decided to +put your package in one of the existing categories). The files +included there are 'sorted alphabetically' per category and are 'NOT' +supposed to contain anything but the 'bare' name of the package. + +-------------------------- +source "package/libfoo/Config.in" +-------------------------- + +[[depends-on-vs-select]] +Choosing +depends on+ or +select+ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The +Config.in+ file of your package must also ensure that +dependencies are enabled. Typically, Buildroot uses the following +rules: + +* Use a +select+ type of dependency for dependencies on + libraries. These dependencies are generally not obvious and it + therefore make sense to have the kconfig system ensure that the + dependencies are selected. For example, the _libgtk2_ package uses + +select BR2_PACKAGE_LIBGLIB2+ to make sure this library is also + enabled. + The +select+ keyword expresses the dependency with a backward + semantic. + +* Use a +depends on+ type of dependency when the user really needs to + be aware of the dependency. Typically, Buildroot uses this type of + dependency for dependencies on target architecture, MMU support and + toolchain options (see xref:dependencies-target-toolchain-options[]), + or for dependencies on "big" things, such as the X.org system. + The +depends on+ keyword expresses the dependency with a forward + semantic. + +.Note +The current problem with the _kconfig_ language is that these two +dependency semantics are not internally linked. Therefore, it may be +possible to select a package, whom one of its dependencies/requirement +is not met. + +An example illustrates both the usage of +select+ and +depends on+. + +-------------------------- +config BR2_PACKAGE_ACL + bool "acl" + select BR2_PACKAGE_ATTR + depends on BR2_LARGEFILE + help + POSIX Access Control Lists, which are used to define more + fine-grained discretionary access rights for files and + directories. + This package also provides libacl. + + http://savannah.nongnu.org/projects/acl + +comment "acl needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE +-------------------------- + + +Note that these two dependency types are only transitive with the +dependencies of the same kind. + +This means, in the following example: + +-------------------------- +config BR2_PACKAGE_A + bool "Package A" + +config BR2_PACKAGE_B + bool "Package B" + depends on BR2_PACKAGE_A + +config BR2_PACKAGE_C + bool "Package C" + depends on BR2_PACKAGE_B + +config BR2_PACKAGE_D + bool "Package D" + select BR2_PACKAGE_B + +config BR2_PACKAGE_E + bool "Package E" + select BR2_PACKAGE_D +-------------------------- + +* Selecting +Package C+ will be visible if +Package B+ has been + selected, which in turn is only visible if +Package A+ has been + selected. + +* Selecting +Package E+ will select +Package D+, which will select + +Package B+, it will not check for the dependencies of +Package B+, + so it will not select +Package A+. + +* Since +Package B+ is selected but +Package A+ is not, this violates + the dependency of +Package B+ on +Package A+. Therefore, in such a + situation, the transitive dependency has to be added explicitly: + +-------------------------- +config BR2_PACKAGE_D + bool "Package D" + select BR2_PACKAGE_B + depends on BR2_PACKAGE_A + +config BR2_PACKAGE_E + bool "Package E" + select BR2_PACKAGE_D + depends on BR2_PACKAGE_A +-------------------------- + +Overall, for package library dependencies, +select+ should be +preferred. + +Note that such dependencies will ensure that the dependency option +is also enabled, but not necessarily built before your package. To do +so, the dependency also needs to be expressed in the +.mk+ file of the +package. + +Further formatting details: see xref:writing-rules-config-in[the +coding style]. + +[[dependencies-target-toolchain-options]] +Dependencies on target and toolchain options +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Many packages depend on certain options of the toolchain: the choice of +C library, C++ support, largefile support, thread support, RPC support, +IPv6 support, wchar support, or dynamic library support. Some packages +can only be built on certain target architectures, or if an MMU is +available in the processor. + +These dependencies have to be expressed with the appropriate 'depends +on' statements in the Config.in file. Additionally, for dependencies on +toolchain options, a +comment+ should be displayed when the option is +not enabled, so that the user knows why the package is not available. +Dependencies on target architecture or MMU support should not be +made visible in a comment: since it is unlikely that the user can +freely choose another target, it makes little sense to show these +dependencies explicitly. + +The +comment+ should only be visible if the +config+ option itself would +be visible when the toolchain option dependencies are met. This means +that all other dependencies of the package (including dependencies on +target architecture and MMU support) have to be repeated on the ++comment+ definition. To keep it clear, the +depends on+ statement for +these non-toolchain option should be kept separate from the +depends on+ +statement for the toolchain options. +If there is a dependency on a config option in that same file (typically +the main package) it is preferable to have a global +if ... endif+ +construct rather than repeating the +depends on+ statement on the +comment and other config options. + +The general format of a dependency +comment+ for package foo is: +-------------------------- +foo needs a toolchain w/ featA, featB, featC +-------------------------- + +for example: +-------------------------- +aircrack-ng needs a toolchain w/ largefile, threads +-------------------------- + +Note that this text is kept brief on purpose, so that it will fit on a +80-character terminal. + +The rest of this section enumerates the different target and toolchain +options, the corresponding config symbols to depend on, and the text to +use in the comment. + +* Target architecture +** Dependency symbol: +BR2_powerpc+, +BR2_mips+, ... (see +arch/Config.in+) +** Comment string: no comment to be added + +* MMU support +** Dependency symbol: +BR2_USE_MMU+ +** Comment string: no comment to be added + +* C library +** Dependency symbol: +BR2_TOOLCHAIN_USES_GLIBC+, ++BR2_TOOLCHAIN_USES_UCLIBC+ +** Comment string: for the C library, a slightly different comment text + is used: +foo needs an (e)glibc toolchain+, or `foo needs an (e)glibc + toolchain w/ C++ support` + +* C++ support +** Dependency symbol: +BR2_INSTALL_LIBSTDCPP+ +** Comment string: `C++` + +* largefile support +** Dependency symbol: +BR2_LARGEFILE+ +** Comment string: +largefile+ + +* thread support +** Dependency symbol: +BR2_TOOLCHAIN_HAS_THREADS+ +** Comment string: +threads+ + +* RPC support +** Dependency symbol: +BR2_TOOLCHAIN_HAS_NATIVE_RPC+ +** Comment string: +RPC+ + +* IPv6 support +** Dependency symbol: +BR2_INET_IPV6+ +** Comment string: +IPv6+ (lowercase v) + +* wchar support +** Dependency symbol: +BR2_USE_WCHAR+ +** Comment string: +wchar+ + +* dynamic library +** Dependency symbol: +!BR2_PREFER_STATIC_LIB+ +** Comment string: +dynamic library+ + + +The +.mk+ file +~~~~~~~~~~~~~~ +[[adding-packages-mk]] + +Finally, here's the hardest part. Create a file named +libfoo.mk+. It +describes how the package should be downloaded, configured, built, +installed, etc. + +Depending on the package type, the +.mk+ file must be written in a +different way, using different infrastructures: + +* *Makefiles for generic packages* (not using autotools or CMake): + These are based on an infrastructure similar to the one used for + autotools-based packages, but require a little more work from the + developer. They specify what should be done for the configuration, + compilation, installation and cleanup of the package. This + infrastructure must be used for all packages that do not use the + autotools as their build system. In the future, other specialized + infrastructures might be written for other build systems. We cover + them through in a xref:generic-package-tutorial[tutorial] and a + xref:generic-package-reference[reference]. + +* *Makefiles for autotools-based software* (autoconf, automake, etc.): + We provide a dedicated infrastructure for such packages, since + autotools is a very common build system. This infrastructure 'must' + be used for new packages that rely on the autotools as their build + system. We cover them through a xref:autotools-package-tutorial[tutorial] + and xref:autotools-package-reference[reference]. + +* *Makefiles for cmake-based software*: We provide a dedicated + infrastructure for such packages, as CMake is a more and more + commonly used build system and has a standardized behaviour. This + infrastructure 'must' be used for new packages that rely on + CMake. We cover them through a xref:cmake-package-tutorial[tutorial] + and xref:cmake-package-reference[reference]. + +Further formatting details: see xref:writing-rules-mk[the writing +rules]. diff --git a/docs/manual/adding-packages-generic.txt b/docs/manual/adding-packages-generic.txt new file mode 100644 index 0000000000..fb7a9e5a14 --- /dev/null +++ b/docs/manual/adding-packages-generic.txt @@ -0,0 +1,454 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Infrastructure for packages with specific build systems +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +By 'packages with specific build systems' we mean all the packages +whose build system is not one of the standard ones, such as +'autotools' or 'CMake'. This typically includes packages whose build +system is based on hand-written Makefiles or shell scripts. + +[[generic-package-tutorial]] + ++generic-package+ Tutorial +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +------------------------------ +01: ################################################################################ +02: # +03: # libfoo +04: # +05: ################################################################################ +06: +07: LIBFOO_VERSION = 1.0 +08: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz +09: LIBFOO_SITE = http://www.foosoftware.org/download +10: LIBFOO_LICENSE = GPLv3+ +11: LIBFOO_LICENSE_FILES = COPYING +12: LIBFOO_INSTALL_STAGING = YES +13: LIBFOO_CONFIG_SCRIPTS = libfoo-config +14: LIBFOO_DEPENDENCIES = host-libaaa libbbb +15: +16: define LIBFOO_BUILD_CMDS +17: $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) all +18: endef +19: +20: define LIBFOO_INSTALL_STAGING_CMDS +21: $(INSTALL) -D -m 0755 $(@D)/libfoo.a $(STAGING_DIR)/usr/lib/libfoo.a +22: $(INSTALL) -D -m 0644 $(@D)/foo.h $(STAGING_DIR)/usr/include/foo.h +23: $(INSTALL) -D -m 0755 $(@D)/libfoo.so* $(STAGING_DIR)/usr/lib +24: endef +25: +26: define LIBFOO_INSTALL_TARGET_CMDS +27: $(INSTALL) -D -m 0755 $(@D)/libfoo.so* $(TARGET_DIR)/usr/lib +28: $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/foo.d +29: endef +30: +31: define LIBFOO_DEVICES +32: /dev/foo c 666 0 0 42 0 - - - +33: endef +34: +35: define LIBFOO_PERMISSIONS +36: /bin/foo f 4755 0 0 - - - - - +37: endef +38: +39: define LIBFOO_USERS +40: foo -1 libfoo -1 * - - - LibFoo daemon +41: endef +42: +43: $(eval $(generic-package)) +-------------------------------- + +The Makefile begins on line 7 to 11 with metadata information: the +version of the package (+LIBFOO_VERSION+), the name of the +tarball containing the package (+LIBFOO_SOURCE+) (xz-ed tarball recommended) +the Internet location at which the tarball can be downloaded from +(+LIBFOO_SITE+), the license (+LIBFOO_LICENSE+) and file with the +license text (+LIBFOO_LICENSE_FILES+). All variables must start with +the same prefix, +LIBFOO_+ in this case. This prefix is always the +uppercased version of the package name (see below to understand where +the package name is defined). + +On line 12, we specify that this package wants to install something to +the staging space. This is often needed for libraries, since they must +install header files and other development files in the staging space. +This will ensure that the commands listed in the ++LIBFOO_INSTALL_STAGING_CMDS+ variable will be executed. + +On line 13, we specify that there is some fixing to be done to some +of the 'libfoo-config' files that were installed during ++LIBFOO_INSTALL_STAGING_CMDS+ phase. +These *-config files are executable shell script files that are +located in '$(STAGING_DIR)/usr/bin' directory and are executed +by other 3rd party packages to find out the location and the linking +flags of this particular package. + +The problem is that all these *-config files by default give wrong, +host system linking flags that are unsuitable for cross-compiling. + +For example: '-I/usr/include' instead of '-I$(STAGING_DIR)/usr/include' +or: '-L/usr/lib' instead of '-L$(STAGING_DIR)/usr/lib' + +So some sed magic is done to these scripts to make them give correct +flags. +The argument to be given to +LIBFOO_CONFIG_SCRIPTS+ is the file name(s) +of the shell script(s) needing fixing. All these names are relative to +'$(STAGING_DIR)/usr/bin' and if needed multiple names can be given. + +In addition, the scripts listed in +LIBFOO_CONFIG_SCRIPTS+ are removed +from +$(TARGET_DIR)/usr/bin+, since they are not needed on the target. + +.Config script: 'divine' package +================================ +Package divine installs shell script '$(STAGING_DIR)/usr/bin/divine-config'. + +So its fixup would be: + +-------------------------------- +DIVINE_CONFIG_SCRIPTS = divine-config +-------------------------------- +================================ + +.Config script: 'imagemagick' package: +================================ +Package imagemagick installs the following scripts: +'$(STAGING_DIR)/usr/bin/{Magick,Magick++,MagickCore,MagickWand,Wand}-config' + +So it's fixup would be: + +-------------------------------- +IMAGEMAGICK_CONFIG_SCRIPTS = \ + Magick-config Magick++-config \ + MagickCore-config MagickWand-config Wand-config +-------------------------------- +================================ + +On line 14, we specify the list of dependencies this package relies +on. These dependencies are listed in terms of lower-case package names, +which can be packages for the target (without the +host-+ +prefix) or packages for the host (with the +host-+) prefix). +Buildroot will ensure that all these packages are built and installed +'before' the current package starts its configuration. + +The rest of the Makefile, lines 16..29, defines what should be done +at the different steps of the package configuration, compilation and +installation. ++LIBFOO_BUILD_CMDS+ tells what steps should be performed to +build the package. +LIBFOO_INSTALL_STAGING_CMDS+ tells what +steps should be performed to install the package in the staging space. ++LIBFOO_INSTALL_TARGET_CMDS+ tells what steps should be +performed to install the package in the target space. + +All these steps rely on the +$(@D)+ variable, which +contains the directory where the source code of the package has been +extracted. + +On line 31..33, we define a device-node file used by this package +(+LIBFOO_DEVICES+). + +On line 35..37, we define the permissions to set to specific files +installed by this package (+LIBFOO_PERMISSIONS+). + +On lines 39..41, we define a user that is used by this package (eg. +to run a daemon as non-root) (+LIBFOO_USERS+). + +Finally, on line 43, we call the +generic-package+ function, which +generates, according to the variables defined previously, all the +Makefile code necessary to make your package working. + +[[generic-package-reference]] + ++generic-package+ Reference +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +There are two variants of the generic target. The +generic-package+ macro is +used for packages to be cross-compiled for the target. The ++host-generic-package+ macro is used for host packages, natively compiled +for the host. It is possible to call both of them in a single +.mk+ +file: once to create the rules to generate a target +package and once to create the rules to generate a host package: + +---------------------- +$(eval $(generic-package)) +$(eval $(host-generic-package)) +---------------------- + +This might be useful if the compilation of the target package requires +some tools to be installed on the host. If the package name is ++libfoo+, then the name of the package for the target is also ++libfoo+, while the name of the package for the host is ++host-libfoo+. These names should be used in the DEPENDENCIES +variables of other packages, if they depend on +libfoo+ or ++host-libfoo+. + +The call to the +generic-package+ and/or +host-generic-package+ macro *must* be +at the end of the +.mk+ file, after all variable definitions. + +For the target package, the +generic-package+ uses the variables defined by +the .mk file and prefixed by the uppercased package name: ++LIBFOO_*+. +host-generic-package+ uses the +HOST_LIBFOO_*+ variables. For +'some' variables, if the +HOST_LIBFOO_+ prefixed variable doesn't +exist, the package infrastructure uses the corresponding variable +prefixed by +LIBFOO_+. This is done for variables that are likely to +have the same value for both the target and host packages. See below +for details. + +The list of variables that can be set in a +.mk+ file to give metadata +information is (assuming the package name is +libfoo+) : + +* +LIBFOO_VERSION+, mandatory, must contain the version of the + package. Note that if +HOST_LIBFOO_VERSION+ doesn't exist, it is + assumed to be the same as +LIBFOO_VERSION+. It can also be a + revision number, branch or tag for packages that are fetched + directly from their revision control system. + + Examples: + + +LIBFOO_VERSION = 0.1.2+ + + +LIBFOO_VERSION = cb9d6aa9429e838f0e54faa3d455bcbab5eef057+ + + +LIBFOO_VERSION = stable+ + +* +LIBFOO_SOURCE+ may contain the name of the tarball of + the package. If +HOST_LIBFOO_SOURCE+ is not specified, it + defaults to +LIBFOO_SOURCE+. If none are specified, then + the value is assumed to be + +packagename-$(LIBFOO_VERSION).tar.gz+. + + Example: +LIBFOO_SOURCE = foobar-$(LIBFOO_VERSION).tar.bz2+ + +* +LIBFOO_PATCH+ may contain a space-separated list of patch file + names, that will be downloaded from the same location as the tarball + indicated in +LIBFOO_SOURCE+, and then applied to the package source + code. If +HOST_LIBFOO_PATCH+ is not specified, it defaults to + +LIBFOO_PATCH+. Note that patches that are included in Buildroot + itself use a different mechanism: all files of the form + +-*.patch+ present in the package directory inside + Buildroot will be applied to the package after extraction (see + xref:patch-policy[patching a package]). Finally, patches listed in + the +LIBFOO_PATCH+ variable are applied _before_ the patches stored + in the Buildroot package directory. + +* +LIBFOO_SITE+ provides the location of the package, which can be a + URL or a local filesystem path. HTTP, FTP and SCP are supported URL + types for retrieving package tarballs. Git, Subversion, Mercurial, + and Bazaar are supported URL types for retrieving packages directly + from source code management systems. A filesystem path may be used + to specify either a tarball or a directory containing the package + source code. See +LIBFOO_SITE_METHOD+ below for more details on how + retrieval works. + + Note that SCP URLs should be of the form + +scp://[user@]host:filepath+, and that filepath is relative to the + user's home directory, so you may want to prepend the path with a + slash for absolute paths: + +scp://[user@]host:/absolutepath+. + + If +HOST_LIBFOO_SITE+ is not specified, it defaults to + +LIBFOO_SITE+. + Examples: + + +LIBFOO_SITE=http://www.libfoosoftware.org/libfoo+ + + +LIBFOO_SITE=http://svn.xiph.org/trunk/Tremor/+ + + +LIBFOO_SITE=git://github.com/kergoth/tslib.git+ + + +LIBFOO_SITE=/opt/software/libfoo.tar.gz+ + + +LIBFOO_SITE=$(TOPDIR)/../src/libfoo/+ + +* +LIBFOO_EXTRA_DOWNLOADS+ lists a number of additional files that + Buildroot should download from +LIBFOO_SITE+ in addition to the main + +LIBFOO_SOURCE+ (which usually is a tarball). Buildroot will not do + anything with those additional files, except download files: it will + be up to the package recipe to use them from +$(DL_DIR)+. + +* +LIBFOO_SITE_METHOD+ determines the method used to fetch or copy the + package source code. In many cases, Buildroot guesses the method + from the contents of +LIBFOO_SITE+ and setting +LIBFOO_SITE_METHOD+ + is unnecessary. When +HOST_LIBFOO_SITE_METHOD+ is not specified, it + defaults to the value of +LIBFOO_SITE_METHOD+. + + The possible values of +LIBFOO_SITE_METHOD+ are: + ** +wget+ for normal FTP/HTTP downloads of tarballs. Used by + default when +LIBFOO_SITE+ begins with +http://+, +https://+ or + +ftp://+. + ** +scp+ for downloads of tarballs over SSH with scp. Used by + default when +LIBFOO_SITE+ begins with +scp://+. + ** +svn+ for retrieving source code from a Subversion repository. + Used by default when +LIBFOO_SITE+ begins with +svn://+. When a + +http://+ Subversion repository URL is specified in + +LIBFOO_SITE+, one 'must' specify +LIBFOO_SITE_METHOD=svn+. + Buildroot performs a checkout which is preserved as a tarball in + the download cache; subsequent builds use the tarball instead of + performing another checkout. + ** +cvs+ for retrieving source code from a CVS repository. + Used by default when +LIBFOO_SITE+ begins with +cvs://+. + The downloaded source code is cached as with the +svn+ method. + Only anonymous pserver mode is supported. + +LIBFOO_SITE+ 'must' contain the source URL as well as the remote + repository directory. The module is the package name. + +LIBFOO_VERSION+ is 'mandatory' and 'must' be a timestamp. + ** +git+ for retrieving source code from a Git repository. Used by + default when +LIBFOO_SITE+ begins with +git://+. The downloaded + source code is cached as with the +svn+ + method. + ** +hg+ for retrieving source code from a Mercurial repository. One + 'must' specify +LIBFOO_SITE_METHOD=hg+ when +LIBFOO_SITE+ + contains a Mercurial repository URL. The downloaded source code + is cached as with the +svn+ method. + ** +bzr+ for retrieving source code from a Bazaar repository. Used + by default when +LIBFOO_SITE+ begins with +bzr://+. The + downloaded source code is cached as with the +svn+ method. + ** +file+ for a local tarball. One should use this when + +LIBFOO_SITE+ specifies a package tarball as a local filename. + Useful for software that isn't available publicly or in version + control. + ** +local+ for a local source code directory. One should use this + when +LIBFOO_SITE+ specifies a local directory path containing + the package source code. Buildroot copies the contents of the + source directory into the package's build directory. + +* +LIBFOO_DEPENDENCIES+ lists the dependencies (in terms of package + name) that are required for the current target package to + compile. These dependencies are guaranteed to be compiled and + installed before the configuration of the current package starts. In + a similar way, +HOST_LIBFOO_DEPENDENCIES+ lists the dependencies for + the current host package. + +* +LIBFOO_INSTALL_STAGING+ can be set to +YES+ or +NO+ (default). If + set to +YES+, then the commands in the +LIBFOO_INSTALL_STAGING_CMDS+ + variables are executed to install the package into the staging + directory. + +* +LIBFOO_INSTALL_TARGET+ can be set to +YES+ (default) or +NO+. If + set to +YES+, then the commands in the +LIBFOO_INSTALL_TARGET_CMDS+ + variables are executed to install the package into the target + directory. + +* +LIBFOO_CONFIG_SCRIPTS+ lists the names of the files in + '$(STAGING_DIR)/usr/bin' that need some special fixing to make them + cross-compiling friendly. Multiple file names separated by space can + be given and all are relative to '$(STAGING_DIR)/usr/bin'. The files + listed in +LIBFOO_CONFIG_SCRIPTS+ are also removed from + +$(TARGET_DIR)/usr/bin+ since they are not needed on the target. + +* +LIBFOO_DEVICES+ lists the device files to be created by Buildroot + when using the static device table. The syntax to use is the + makedevs one. You can find some documentation for this syntax in the + xref:makedev-syntax[]. This variable is optional. + +* +LIBFOO_PERMISSIONS+ lists the changes of permissions to be done at + the end of the build process. The syntax is once again the makedevs one. + You can find some documentation for this syntax in the xref:makedev-syntax[]. + This variable is optional. + +* +LIBFOO_USERS+ lists the users to create for this package, if it installs + a program you want to run as a specific user (eg. as a daemon, or as a + cron-job). The syntax is similar in spirit to the makedevs one, and is + described in the xref:makeuser-syntax[]. This variable is optional. + +* +LIBFOO_LICENSE+ defines the license (or licenses) under which the package + is released. + This name will appear in the manifest file produced by +make legal-info+. + If the license appears in xref:legal-info-list-licenses[the following list], + use the same string to make the manifest file uniform. + Otherwise, describe the license in a precise and concise way, avoiding + ambiguous names such as +BSD+ which actually name a family of licenses. + This variable is optional. If it is not defined, +unknown+ will appear in + the +license+ field of the manifest file for this package. + +* +LIBFOO_LICENSE_FILES+ is a space-separated list of files in the package + tarball that contain the license(s) under which the package is released. + +make legal-info+ copies all of these files in the +legal-info+ directory. + See xref:legal-info[] for more information. + This variable is optional. If it is not defined, a warning will be produced + to let you know, and +not saved+ will appear in the +license files+ field + of the manifest file for this package. + +* +LIBFOO_REDISTRIBUTE+ can be set to +YES+ (default) or +NO+ to indicate if + the package source code is allowed to be redistributed. Set it to +NO+ for + non-opensource packages: Buildroot will not save the source code for this + package when collecting the +legal-info+. + +* +LIBFOO_FLAT_STACKSIZE+ defines the stack size of an application built into + the FLAT binary format. The application stack size on the NOMMU architecture + processors can't be enlarged at run time. The default stack size for the + FLAT binary format is only 4k bytes. If the application consumes more stack, + append the required number here. + +The recommended way to define these variables is to use the following +syntax: + +---------------------- +LIBFOO_VERSION = 2.32 +---------------------- + +Now, the variables that define what should be performed at the +different steps of the build process. + +* +LIBFOO_EXTRACT_CMDS+ lists the actions to be performed to extract + the package. This is generally not needed as tarballs are + automatically handled by Buildroot. However, if the package uses a + non-standard archive format, such as a ZIP or RAR file, or has a + tarball with a non-standard organization, this variable allows to + override the package infrastructure default behavior. + +* +LIBFOO_CONFIGURE_CMDS+ lists the actions to be performed to + configure the package before its compilation. + +* +LIBFOO_BUILD_CMDS+ lists the actions to be performed to + compile the package. + +* +HOST_LIBFOO_INSTALL_CMDS+ lists the actions to be performed + to install the package, when the package is a host package. The + package must install its files to the directory given by + +$(HOST_DIR)+. All files, including development files such as + headers should be installed, since other packages might be compiled + on top of this package. + +* +LIBFOO_INSTALL_TARGET_CMDS+ lists the actions to be + performed to install the package to the target directory, when the + package is a target package. The package must install its files to + the directory given by +$(TARGET_DIR)+. Only the files required for + 'execution' of the package have to be + installed. Header files, static libraries and documentation will be + removed again when the target filesystem is finalized. + +* +LIBFOO_INSTALL_STAGING_CMDS+ lists the actions to be + performed to install the package to the staging directory, when the + package is a target package. The package must install its files to + the directory given by +$(STAGING_DIR)+. All development files + should be installed, since they might be needed to compile other + packages. + +* +LIBFOO_CLEAN_CMDS+, lists the actions to perform to clean up + the build directory of the package. + +* +LIBFOO_UNINSTALL_TARGET_CMDS+ lists the actions to + uninstall the package from the target directory +$(TARGET_DIR)+ + +* +LIBFOO_UNINSTALL_STAGING_CMDS+ lists the actions to + uninstall the package from the staging directory +$(STAGING_DIR)+. + +* +LIBFOO_INSTALL_INIT_SYSV+ and +LIBFOO_INSTALL_INIT_SYSTEMD+ list the + actions to install init scripts either for the systemV-like init systems + (busybox, sysvinit, etc.) or for the systemd units. These commands + will be run only when the relevant init system is installed (i.e. if + systemd is selected as the init system in the configuration, only + +LIBFOO_INSTALL_INIT_SYSTEMD+ will be run). + +The preferred way to define these variables is: + +---------------------- +define LIBFOO_CONFIGURE_CMDS + action 1 + action 2 + action 3 +endef +---------------------- + +In the action definitions, you can use the following variables: + +* +$(@D)+, which contains the directory in which the package source + code has been uncompressed. + +* +$(TARGET_CC)+, +$(TARGET_LD)+, etc. to get the target + cross-compilation utilities + +* +$(TARGET_CROSS)+ to get the cross-compilation toolchain prefix + +* Of course the +$(HOST_DIR)+, +$(STAGING_DIR)+ and +$(TARGET_DIR)+ + variables to install the packages properly. + +Finally, you can also use hooks. See xref:hooks[] for more information. diff --git a/docs/manual/adding-packages-gettext.txt b/docs/manual/adding-packages-gettext.txt new file mode 100644 index 0000000000..98c994cdaf --- /dev/null +++ b/docs/manual/adding-packages-gettext.txt @@ -0,0 +1,47 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Gettext integration and interaction with packages +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Many packages that support internationalization use the gettext +library. Dependencies for this library are fairly complicated and +therefore, deserve some explanation. + +The 'uClibc' C library doesn't implement gettext functionality; +therefore with this C library, a separate gettext must be compiled. On +the other hand, the 'glibc' C library does integrate its own gettext, +and in this case the separate gettext library should not be compiled, +because it creates various kinds of build failures. + +Additionally, some packages (such as +libglib2+) do require gettext +unconditionally, while other packages (those who support ++--disable-nls+ in general) only require gettext when locale support +is enabled. + +Therefore, Buildroot defines two configuration options: + +* +BR2_NEEDS_GETTEXT+, which is true as soon as the toolchain doesn't + provide its own gettext implementation + +* +BR2_NEEDS_GETTEXT_IF_LOCALE+, which is true if the toolchain + doesn't provide its own gettext implementation and if locale support + is enabled + +Packages that need gettext only when locale support is enabled should: + +* use +select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE+ in the + +Config.in+ file; + +* use +$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)+ in the package + +DEPENDENCIES+ variable in the +.mk+ file. + +Packages that unconditionally need gettext (which should be very rare) +should: + +* use +select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT+ in the +Config.in+ + file; + +* use +$(if $(BR2_NEEDS_GETTEXT),gettext)+ in the package + +DEPENDENCIES+ variable in the +.mk+ file. + diff --git a/docs/manual/adding-packages-hooks.txt b/docs/manual/adding-packages-hooks.txt new file mode 100644 index 0000000000..d96c991cb0 --- /dev/null +++ b/docs/manual/adding-packages-hooks.txt @@ -0,0 +1,61 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[hooks]] +Hooks available in the various build steps +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The generic infrastructure (and as a result also the derived autotools +and cmake infrastructures) allow packages to specify hooks. +These define further actions to perform after existing steps. +Most hooks aren't really useful for generic packages, since the +.mk+ +file already has full control over the actions performed in each step +of the package construction. + +The following hook points are available: + +* +LIBFOO_POST_DOWNLOAD_HOOKS+ +* +LIBFOO_POST_EXTRACT_HOOKS+ +* +LIBFOO_POST_RSYNC_HOOKS+ +* +LIBFOO_PRE_PATCH_HOOKS+ +* +LIBFOO_POST_PATCH_HOOKS+ +* +LIBFOO_PRE_CONFIGURE_HOOKS+ +* +LIBFOO_POST_CONFIGURE_HOOKS+ +* +LIBFOO_POST_BUILD_HOOKS+ +* +LIBFOO_POST_INSTALL_HOOKS+ (for host packages only) +* +LIBFOO_POST_INSTALL_STAGING_HOOKS+ (for target packages only) +* +LIBFOO_POST_INSTALL_TARGET_HOOKS+ (for target packages only) +* +LIBFOO_POST_LEGAL_INFO_HOOKS+ + +These variables are 'lists' of variable names containing actions to be +performed at this hook point. This allows several hooks to be +registered at a given hook point. Here is an example: + +---------------------- +define LIBFOO_POST_PATCH_FIXUP + action1 + action2 +endef + +LIBFOO_POST_PATCH_HOOKS += LIBFOO_POST_PATCH_FIXUP +---------------------- + +Using the +POST_RSYNC+ hook +^^^^^^^^^^^^^^^^^^^^^^^^^^^ +The +POST_RSYNC+ hook is run only for packages that use a local source, +either through the +local+ site method or the +OVERRIDE_SRCDIR+ +mechanism. In this case, package sources are copied using +rsync+ from +the local location into the buildroot build directory. The +rsync+ +command does not copy all files from the source directory, though. +Files belonging to a version control system, like the directories ++.git+, +.hg+, etc. are not copied. For most packages this is +sufficient, but a given package can perform additional actions using +the +POST_RSYNC+ hook. + +In principle, the hook can contain any command you want. One specific +use case, though, is the intentional copying of the version control +directory using +rsync+. The +rsync+ command you use in the hook can, among +others, use the following variables: + +* +$(SRCDIR)+: the path to the overridden source directory +* +$(@D)+: the path to the build directory diff --git a/docs/manual/adding-packages-tips.txt b/docs/manual/adding-packages-tips.txt new file mode 100644 index 0000000000..00244fe7b2 --- /dev/null +++ b/docs/manual/adding-packages-tips.txt @@ -0,0 +1,56 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Tips and tricks +~~~~~~~~~~~~~~~ + +[[package-name-variable-relation]] +Package name, config entry name and makefile variable relationship +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +In Buildroot, there is some relationship between: + +* the _package name_, which is the package directory name (and the + name of the +*.mk+ file); + +* the config entry name that is declared in the +Config.in+ file; + +* the makefile variable prefix. + +It is mandatory to maintain consistency between these elements, +using the following rules: + +* the package directory and the +*.mk+ name are the _package name_ + itself (e.g.: +package/foo-bar_boo/foo-bar_boo.mk+); + +* the _make_ target name is the _package name_ itself (e.g.: + +foo-bar_boo+); + +* the config entry is the upper case _package name_ with `.` and `-` + characters substituted with `_`, prefixed with +BR2_PACKAGE_+ (e.g.: + +BR2_PACKAGE_FOO_BAR_BOO+); + +* the +*.mk+ file variable prefix is the upper case _package name_ + `.` and `-` characters substituted with `_` (e.g.: + +FOO_BAR_BOO_VERSION+). + + +[[github-download-url]] +How to add a package from github +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Packages on github often don't have a download area with release tarballs. +However, it is possible to download tarballs directly from the repository +on github. + +------------------------ +FOO_VERSION = v1.0 # tag or full commit ID +FOO_SITE = http://github.com///tarball/$(FOO_VERSION) +------------------------ + +.Notes +- The FOO_VERSION can either be a tag or a commit ID. +- The tarball name generated by github matches the default one from + Buildroot (e.g.: +foo-f6fb6654af62045239caed5950bc6c7971965e60.tar.gz+), + so it is not necessary to specify it in the +.mk+ file. +- When using a commit ID as version, you should use the full 40 hex characters. diff --git a/docs/manual/adding-packages.txt b/docs/manual/adding-packages.txt new file mode 100644 index 0000000000..ae76e74e21 --- /dev/null +++ b/docs/manual/adding-packages.txt @@ -0,0 +1,27 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[adding-packages]] +Adding new packages to Buildroot +-------------------------------- + +This section covers how new packages (userspace libraries or +applications) can be integrated into Buildroot. It also shows how +existing packages are integrated, which is needed for fixing issues or +tuning their configuration. + +include::adding-packages-directory.txt[] + +include::adding-packages-generic.txt[] + +include::adding-packages-autotools.txt[] + +include::adding-packages-cmake.txt[] + +include::adding-packages-hooks.txt[] + +include::adding-packages-gettext.txt[] + +include::adding-packages-tips.txt[] + +include::adding-packages-conclusion.txt[] diff --git a/docs/manual/advanced.txt b/docs/manual/advanced.txt new file mode 100644 index 0000000000..764b71a5c7 --- /dev/null +++ b/docs/manual/advanced.txt @@ -0,0 +1,13 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Advanced usage +-------------- + +include::using-buildroot-toolchain.txt[] + +include::ccache-support.txt[] + +include::download-location.txt[] + +include::package-make-target.txt[] diff --git a/docs/manual/appendix.txt b/docs/manual/appendix.txt new file mode 100644 index 0000000000..74ee8fd4b8 --- /dev/null +++ b/docs/manual/appendix.txt @@ -0,0 +1,34 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Appendix +======== + +include::makedev-syntax.txt[] +include::makeusers-syntax.txt[] + + +// Automatically generated lists: + +[[package-list]] +List of target packages available in Buildroot +---------------------------------------------- + +include::package-list.txt[] + +[[host-package-list]] +List of host utilities available in Buildroot +--------------------------------------------- + +The following packages are all available in the menu +Host utilities+. + +include::host-package-list.txt[] + +[[deprecated-list]] +Deprecated features +------------------- + +The following features are marked as _deprecated_ in Buildroot due to +their status either too old or unmaintained. + +include::deprecated-list.txt[] diff --git a/docs/manual/beyond-buildroot.txt b/docs/manual/beyond-buildroot.txt new file mode 100644 index 0000000000..a0d4af0a74 --- /dev/null +++ b/docs/manual/beyond-buildroot.txt @@ -0,0 +1,41 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Beyond Buildroot +================ + +Boot the generated images +------------------------- + +NFS boot +~~~~~~~~ + +To achieve NFS-boot, enable _tar root filesystem_ in the _Filesystem +images_ menu. + +After a complete build, just run the following commands to setup the +NFS-root directory: + +------------------- +sudo tar -xavf /path/to/output_dir/rootfs.tar -C /path/to/nfs_root_dir +------------------- + +Remember to add this path to +/etc/exports+. + +Then, you can execute a NFS-boot from your target. + +Chroot +------ + +If you want to chroot in a generated image, then there are few thing +you should be aware of: + +* you should setup the new root from the _tar root filesystem_ image; + +* either the selected target architecture is compatible with your host + machine, or you should use some +qemu-*+ binary and correctly set it + within the +binfmt+ properties to be able to run the binaries built + for the target on your host machine; + +* Buildroot does not currently provide +host-qemu+ and +binfmt+ + correctly built and set for that kind of use. diff --git a/docs/manual/ccache-support.txt b/docs/manual/ccache-support.txt new file mode 100644 index 0000000000..fe06a01faf --- /dev/null +++ b/docs/manual/ccache-support.txt @@ -0,0 +1,36 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[ccache]] +Using +ccache+ in Buildroot +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +http://ccache.samba.org[ccache] is a compiler cache. It stores the +object files resulting from each compilation process, and is able to +skip future compilation of the same source file (with same compiler +and same arguments) by using the pre-existing object files. When doing +almost identical builds from scratch a number of times, it can nicely +speed up the build process. + ++ccache+ support is integrated in Buildroot. You just have to enable ++Enable compiler cache+ in +Build options+. This will automatically +build +ccache+ and use it for every host and target compilation. + +The cache is located in +$HOME/.buildroot-ccache+. It is stored +outside of Buildroot output directory so that it can be shared by +separate Buildroot builds. If you want to get rid of the cache, simply +remove this directory. + +You can get statistics on the cache (its size, number of hits, +misses, etc.) by running +make ccache-stats+. + +The make target +ccache-options+ and the +CCACHE_OPTIONS+ variable +provide more generic access to the ccache. For example + +----------------- +# set cache limit size +make CCACHE_OPTIONS="--max-size=5G" ccache-options + +# zero statistics counters +make CCACHE_OPTIONS="--zero-stats" ccache-options +----------------- diff --git a/docs/manual/common-usage.txt b/docs/manual/common-usage.txt new file mode 100644 index 0000000000..c7f511ad70 --- /dev/null +++ b/docs/manual/common-usage.txt @@ -0,0 +1,102 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Daily use +--------- + +include::rebuilding-packages.txt[] + +Offline builds +~~~~~~~~~~~~~~ + +If you intend to do an offline build and just want to download +all sources that you previously selected in the configurator +('menuconfig', 'xconfig' or 'gconfig'), then issue: + +-------------------- + $ make source +-------------------- + +You can now disconnect or copy the content of your +dl+ +directory to the build-host. + +Building out-of-tree +~~~~~~~~~~~~~~~~~~~~ + +As default, everything built by Buildroot is stored in the directory ++output+ in the Buildroot tree. + +Buildroot also supports building out of tree with a syntax similar to +the Linux kernel. To use it, add +O=+ to the make command +line: + +-------------------- + $ make O=/tmp/build +-------------------- + +Or: + +-------------------- + $ cd /tmp/build; make O=$PWD -C path/to/buildroot +-------------------- + +All the output files will be located under +/tmp/build+. + +When using out-of-tree builds, the Buildroot +.config+ and temporary +files are also stored in the output directory. This means that you can +safely run multiple builds in parallel using the same source tree as +long as they use unique output directories. + +For ease of use, Buildroot generates a Makefile wrapper in the output +directory - so after the first run, you no longer need to pass +O=..+ +and +-C ..+, simply run (in the output directory): + +-------------------- + $ make +-------------------- + +[[env-vars]] + +Environment variables +~~~~~~~~~~~~~~~~~~~~~ + +Buildroot also honors some environment variables, when they are passed +to +make+ or set in the environment: + +* +HOSTCXX+, the host C++ compiler to use +* +HOSTCC+, the host C compiler to use +* +UCLIBC_CONFIG_FILE=+, path to + the uClibc configuration file, used to compile uClibc, if an + internal toolchain is being built. + + + Note that the uClibc configuration file can also be set from the + configuration interface, so through the Buildroot +.config+ file; this + is the recommended way of setting it. + + +* +BUSYBOX_CONFIG_FILE=+, path to + the Busybox configuration file. + + + Note that the Busybox configuration file can also be set from the + configuration interface, so through the Buildroot +.config+ file; this + is the recommended way of setting it. + + +* +BUILDROOT_DL_DIR+ to override the directory in which + Buildroot stores/retrieves downloaded files + + + Note that the Buildroot download directory can also be set from the + configuration interface, so through the Buildroot +.config+ file; this + is the recommended way of setting it. + +An example that uses config files located in the toplevel directory and +in your $HOME: + +-------------------- + $ make UCLIBC_CONFIG_FILE=uClibc.config BUSYBOX_CONFIG_FILE=$HOME/bb.config +-------------------- + +If you want to use a compiler other than the default +gcc+ +or +g+++ for building helper-binaries on your host, then do + +-------------------- + $ make HOSTCXX=g++-4.3-HEAD HOSTCC=gcc-4.3-HEAD +-------------------- diff --git a/docs/manual/configure.txt b/docs/manual/configure.txt new file mode 100644 index 0000000000..8912a81560 --- /dev/null +++ b/docs/manual/configure.txt @@ -0,0 +1,380 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[configure]] +Details on Buildroot configuration +---------------------------------- + +All the configuration options in +make *config+ have a help text +providing details about the option. However, a number of topics +require additional details that cannot easily be covered in the help +text and are there covered in the following sections. + +Cross-compilation toolchain +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A compilation toolchain is the set of tools that allows you to compile +code for your system. It consists of a compiler (in our case, +gcc+), +binary utils like assembler and linker (in our case, +binutils+) and a +C standard library (for example +http://www.gnu.org/software/libc/libc.html[GNU Libc], +http://www.uclibc.org/[uClibc]). + +The system installed on your development station certainly already has +a compilation toolchain that you can use to compile an application +that runs on your system. If you're using a PC, your compilation +toolchain runs on an x86 processor and generates code for an x86 +processor. Under most Linux systems, the compilation toolchain uses +the GNU libc (glibc) as the C standard library. This compilation +toolchain is called the "host compilation toolchain". The machine on +which it is running, and on which you're working, is called the "host +system" footnote:[This terminology differs from what is used by GNU +configure, where the host is the machine on which the application will +run (which is usually the same as target)]. + +The compilation toolchain is provided by your distribution, and +Buildroot has nothing to do with it (other than using it to build a +cross-compilation toolchain and other tools that are run on the +development host). + +As said above, the compilation toolchain that comes with your system +runs on and generates code for the processor in your host system. As +your embedded system has a different processor, you need a +cross-compilation toolchain - a compilation toolchain that runs on +your _host system_ but generates code for your _target system_ (and +target processor). For example, if your host system uses x86 and your +target system uses ARM, the regular compilation toolchain on your host +runs on x86 and generates code for x86, while the cross-compilation +toolchain runs on x86 and generates code for ARM. + +Buildroot provides two solutions for the cross-compilation toolchain: + + * The *internal toolchain backend*, called +Buildroot toolchain+ in + the configuration interface. + + * The *external toolchain backend*, called +External toolchain+ in + the configuration interface. + +The choice between these two solutions is done using the +Toolchain +Type+ option in the +Toolchain+ menu. Once one solution has been +chosen, a number of configuration options appear, they are detailed in +the following sections. + +[[internal-toolchain-backend]] +Internal toolchain backend +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The _internal toolchain backend_ is the backend where Buildroot builds +by itself a cross-compilation toolchain, before building the userspace +applications and libraries for your target embedded system. + +This backend is the historical backend of Buildroot, and has been +limited for a long time to the usage of the +http://www.uclibc.org[uClibc C library]. Support for the _eglibc_ C +library has been added in 2013 and is at this point considered +experimental. See the _External toolchain backend_ for another +solution to use _glibc_ or _eglibc_. + +Once you have selected this backend, a number of options appear. The +most important ones allow to: + + * Change the version of the Linux kernel headers used to build the + toolchain. This item deserves a few explanations. In the process of + building a cross-compilation toolchain, the C library is being + built. This library provides the interface between userspace + applications and the Linux kernel. In order to know how to "talk" + to the Linux kernel, the C library needs to have access to the + _Linux kernel headers_ (i.e, the +.h+ files from the kernel), which + define the interface between userspace and the kernel (system + calls, data structures, etc.). Since this interface is backward + compatible, the version of the Linux kernel headers used to build + your toolchain do not need to match _exactly_ the version of the + Linux kernel you intend to run on your embedded system. They only + need to have a version equal or older to the version of the Linux + kernel you intend to run. If you use kernel headers that are more + recent than the Linux kernel you run on your embedded system, then + the C library might be using interfaces that are not provided by + your Linux kernel. + + * Change the version and the configuration of the uClibc C library + (if uClibc is selected). The default options are usually + fine. However, if you really need to specifically customize the + configuration of your uClibc C library, you can pass a specific + configuration file here. Or alternatively, you can run the +make + uclibc-menuconfig+ command to get access to uClibc's configuration + interface. Note that all packages in Buildroot are tested against + the default uClibc configuration bundled in Buildroot: if you + deviate from this configuration by removing features from uClibc, + some packages may no longer build. + + * Change the version of the GCC compiler and binutils. + + * Select a number of toolchain options (uClibc only): whether the + toolchain should have largefile support (i.e support for files + larger than 2 GB on 32 bits systems), IPv6 support, RPC support + (used mainly for NFS), wide-char support, locale support (for + internationalization), C++ support, thread support. Depending on + which options you choose, the number of userspace applications and + libraries visible in Buildroot menus will change: many applications + and libraries require certain toolchain options to be enabled. Most + packages show a comment when a certain toolchain option is required + to be able to enable those packages. + +It is worth noting that whenever one of those options is modified, +then the entire toolchain and system must be rebuilt. See +xref:full-rebuild[]. + +Advantages of this backend: + +* Well integrated with Buildroot +* Fast, only builds what's necessary + +Drawbacks of this backend: + +* Rebuilding the toolchain is needed when doing +make clean+, which + takes time. If you're trying to reduce your build time, consider + using the _External toolchain backend_. + +[[external-toolchain-backend]] +External toolchain backend +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The _external toolchain backend_ allows to use existing pre-built +cross-compilation toolchains. Buildroot knows about a number of +well-known cross-compilation toolchains (from +http://www.linaro.org[Linaro] for ARM, +http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/[Sourcery +CodeBench] for ARM, x86, x86-64, PowerPC, MIPS and SuperH, +https://blackfin.uclinux.org/gf/project/toolchain[Blackfin toolchains +from ADI], http://git.xilinx.com/[Xilinx toolchains for Microblaze], +etc.) and is capable of downloading them automatically, or it can be +pointed to a custom toolchain, either available for download or +installed locally. + +Then, you have three solutions to use an external toolchain: + +* Use a predefined external toolchain profile, and let Buildroot + download, extract and install the toolchain. Buildroot already knows + about a few CodeSourcery, Linaro, Blackfin and Xilinx toolchains. + Just select the toolchain profile in +Toolchain+ from the + available ones. This is definitely the easiest solution. + +* Use a predefined external toolchain profile, but instead of having + Buildroot download and extract the toolchain, you can tell Buildroot + where your toolchain is already installed on your system. Just + select the toolchain profile in +Toolchain+ through the available + ones, unselect +Download toolchain automatically+, and fill the + +Toolchain path+ text entry with the path to your cross-compiling + toolchain. + +* Use a completely custom external toolchain. This is particularly + useful for toolchains generated using crosstool-NG. To do this, + select the +Custom toolchain+ solution in the +Toolchain+ list. You + need to fill the +Toolchain path+, +Toolchain prefix+ and +External + toolchain C library+ options. Then, you have to tell Buildroot what + your external toolchain supports. If your external toolchain uses + the 'glibc' library, you only have to tell whether your toolchain + supports C\+\+ or not and whether it has built-in RPC support. If + your external toolchain uses the 'uClibc' + library, then you have to tell Buildroot if it supports largefile, + IPv6, RPC, wide-char, locale, program invocation, threads and + C++. At the beginning of the execution, Buildroot will tell you if + the selected options do not match the toolchain configuration. + +Our external toolchain support has been tested with toolchains from +CodeSourcery and Linaro, toolchains generated by +http://crosstool-ng.org[crosstool-NG], and toolchains generated by +Buildroot itself. In general, all toolchains that support the +'sysroot' feature should work. If not, do not hesitate to contact the +developers. + +We do not support toolchains from the +http://www.denx.de/wiki/DULG/ELDK[ELDK] of Denx, for two reasons: + +* The ELDK does not contain a pure toolchain (i.e just the compiler, + binutils, the C and C++ libraries), but a toolchain that comes with + a very large set of pre-compiled libraries and programs. Therefore, + Buildroot cannot import the 'sysroot' of the toolchain, as it would + contain hundreds of megabytes of pre-compiled libraries that are + normally built by Buildroot. + +* The ELDK toolchains have a completely non-standard custom mechanism + to handle multiple library variants. Instead of using the standard + GCC 'multilib' mechanism, the ARM ELDK uses different symbolic links + to the compiler to differentiate between library variants (for ARM + soft-float and ARM VFP), and the PowerPC ELDK compiler uses a + +CROSS_COMPILE+ environment variable. This non-standard behaviour + makes it difficult to support ELDK in Buildroot. + +We also do not support using the distribution toolchain (i.e the +gcc/binutils/C library installed by your distribution) as the +toolchain to build software for the target. This is because your +distribution toolchain is not a "pure" toolchain (i.e only with the +C/C++ library), so we cannot import it properly into the Buildroot +build environment. So even if you are building a system for a x86 or +x86_64 target, you have to generate a cross-compilation toolchain with +Buildroot or crosstool-NG. + +If you want to generate a custom toolchain for your project, that can +be used as an external toolchain in Buildroot, our recommandation is +definitely to build it with http://crosstool-ng.org[crosstool-NG]. We +recommend to build the toolchain separately from Buildroot, and then +_import_ it in Buildroot using the external toolchain backend. + +Advantages of this backend: + +* Allows to use well-known and well-tested cross-compilation + toolchains. + +* Avoids the build time of the cross-compilation toolchain, which is + often very significant in the overall build time of an embedded + Linux system. + +* Not limited to uClibc: glibc and eglibc toolchains are supported. + +Drawbacks of this backend: + +* If your pre-built external toolchain has a bug, may be hard to get a + fix from the toolchain vendor, unless you build your external + toolchain by yourself using Crosstool-NG. + +/dev management +~~~~~~~~~~~~~~~ + +On a Linux system, the +/dev+ directory contains special files, called +_device files_, that allow userspace applications to access the +hardware devices managed by the Linux kernel. Without these _device +files_, your userspace applications would not be able to use the +hardware devices, even if they are properly recognized by the Linux +kernel. + +Under +System configuration+, +/dev management+, Buildroot offers four +different solutions to handle the +/dev+ directory : + + * The first solution is *Static using device table*. This is the old + classical way of handling device files in Linux. With this method, + the device files are persistently stored in the root filesystem + (i.e they persist accross reboots), and there is nothing that will + automatically create and remove those device files when hardware + devices are added or removed from the system. Buildroot therefore + creates a standard set of device files using a _device table_, the + default one being stored in +system/device_table_dev.txt+ in the + Buildroot source code. This file is processed when Buildroot + generates the final root filesystem image, and the _device files_ + are therefore not visible in the +output/target+ directory. The + +BR2_ROOTFS_STATIC_DEVICE_TABLE+ option allows to change the + default device table used by Buildroot, or to add an additional + device table, so that additional _device files_ are created by + Buildroot during the build. So, if you use this method, and a + _device file_ is missing in your system, you can for example create + a +board///device_table_dev.txt+ file + that contains the description of your additional _device files_, + and then you can set +BR2_ROOTFS_STATIC_DEVICE_TABLE+ to + +system/device_table_dev.txt + board///device_table_dev.txt+. For more + details about the format of the device table file, see + xref:makedev-syntax[]. + + * The second solution is *Dynamic using devtmpfs only*. _devtmpfs_ is + a virtual filesystem inside the Linux kernel that has been + introduced in kernel 2.6.32 (if you use an older kernel, it is not + possible to use this option). When mounted in +/dev+, this virtual + filesystem will automatically make _device files_ appear and + disappear as hardware devices are added and removed from the + system. This filesystem is not persistent accross reboots: it is + filled dynamically by the kernel. Using _devtmpfs_ requires the + following kernel configuration options to be enabled: + +CONFIG_DEVTMPFS+ and +CONFIG_DEVTMPFS_MOUNT+. When Buildroot is in + charge of building the Linux kernel for your embedded device, it + makes sure that those two options are enabled. However, if you + build your Linux kernel outside of Buildroot, then it is your + responsability to enable those two options (if you fail to do so, + your Buildroot system will not boot). + + * The third solution is *Dynamic using mdev*. This method also relies + on the _devtmpfs_ virtual filesystem detailed above (so the + requirement to have +CONFIG_DEVTMPFS+ and +CONFIG_DEVTMPFS_MOUNT+ + enabled in the kernel configuration still apply), but adds the + +mdev+ userspace utility on top of it. +mdev+ is a program part of + Busybox that the kernel will call every time a device is added or + removed. Thanks to the +/etc/mdev.conf+ configuration file, +mdev+ + can be configured to for example, set specific permissions or + ownership on a device file, call a script or application whenever a + device appears or disappear, etc. Basically, it allows _userspace_ + to react on device addition and removal events. +mdev+ can for + example be used to automatically load kernel modules when devices + appear on the system. +mdev+ is also important if you have devices + that require a firmware, as it will be responsible for pushing the + firmware contents to the kernel. +mdev+ is a lightweight + implementation (with fewer features) of +udev+. For more details + about +mdev+ and the syntax of its configuration file, see + http://git.busybox.net/busybox/tree/docs/mdev.txt. + + * The fourth solution is *Dynamic using udev*. This method also + relies on the _devtmpfs_ virtual filesystem detailed above, but + adds the +udev+ userspace daemon on top of it. +udev+ is a daemon + that runs in the background, and gets called by the kernel when a + device gets added or removed from the system. It is a more + heavyweight solution than +mdev+, but provides higher flexibility + and is sometimes mandatory for some system components (systemd for + example). +udev+ is the mechanism used in most desktop Linux + distributions. For more details about +udev+, see + http://en.wikipedia.org/wiki/Udev. + +The Buildroot developers recommandation is to start with the *Dynamic +using devtmpfs only* solution, until you have the need for userspace +to be notified when devices are added/removed, or if firmwares are +needed, in which case *Dynamic using mdev* is usually a good solution. + +init system +~~~~~~~~~~~ + +The _init_ program is the first userspace program started by the +kernel (it carries the PID number 1), and is responsible for starting +the userspace services and programs (for example: web server, +graphical applications, other network servers, etc.). + +Buildroot allows to use three different types of init systems, which +can be chosen from +System configuration+, +Init system+: + + * The first solution is *Busybox*. Amongst many programs, Busybox has + an implementation of a basic +init+ program, which is sufficient + for most embedded systems. Enabling the +BR2_INIT_BUSYBOX+ will + ensure Busybox will build and install its +init+ program. This is + the default solution in Buildroot. The Busybox +init+ program will + read the +/etc/inittab+ file at boot to know what to do. The syntax + of this file can be found in + http://git.busybox.net/busybox/tree/examples/inittab (note that + Busybox +inittab+ syntax is special: do not use a random +inittab+ + documentation from the Internet to learn about Busybox + +inittab+). The default +inittab+ in Buildroot is stored in + +system/skeleton/etc/inittab+. Apart from mounting a few important + filesystems, the main job the default inittab does is to start the + +/etc/init.d/rcS+ shell script, and start a +getty+ program (which + provides a login prompt). + + * The second solution is *systemV*. This solution uses the old + traditional _sysvinit_ program, packed in Buildroot in + +package/sysvinit+. This was the solution used in most desktop + Linux distributions, until they switched to more recent + alternatives such as Upstart or Systemd. +sysvinit+ also works with + an +inittab+ file (which has a slightly different syntax than the + one from Busybox). The default +inittab+ installed with this init + solution is located in +package/sysvinit/inittab+. + + * The third solution is *systemd*. +systemd+ is the new generation + init system for Linux. It does far more than traditional _init_ + programs: aggressive parallelization capabilities, uses socket and + D-Bus activation for starting services, offers on-demand starting + of daemons, keeps track of processes using Linux control groups, + supports snapshotting and restoring of the system state, + etc. +systemd+ will be useful on relatively complex embedded + systems, for example the ones requiring D-Bus and services + communicating between each other. It is worth noting that +systemd+ + brings a fairly big number of large dependencies: +dbus+, +glib+ + and more. For more details about +systemd+, see + http://www.freedesktop.org/wiki/Software/systemd. + +The solution recommended by Buildroot developers is to use the +*Busybox init* as it is sufficient for most embedded +systems. *systemd* can be used for more complex situations. diff --git a/docs/manual/contribute.txt b/docs/manual/contribute.txt new file mode 100644 index 0000000000..201685cc78 --- /dev/null +++ b/docs/manual/contribute.txt @@ -0,0 +1,203 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Contributing to Buildroot +======================== + +If you want to contribute to Buildroot, you will need a git view of +the project. Refer to xref:getting-buildroot[] to get it. + +Currently, the mailing list is the central place for contribution. +If you have not already subscribed to it, then refer to +xref:mailing-list-subscribe[]. + +Recently, a web interface is also used to manage patches sent to the +mailing list, see xref:patchwork[]. + +[NOTE] +_Please, do not attach patches to bugs, send them to the mailing list +instead_ (see xref:submitting-patches[]). + +[[submitting-patches]] +Submitting patches +------------------ + +When your changes are done, and committed in your local git view, +_rebase_ your development branch on top of the upstream tree before +generating the patch set. To do so, run: + +--------------------- +$ git fetch --all --tags +$ git rebase origin/master +--------------------- + +Here, you are ready to generate then submit your patch set. + +To generate it, run: + +--------------------- +$ git format-patch -M -n -s -o outgoing origin/master +--------------------- + +This will generate patch files in the +outgoing+ subdirectory, +automatically adding the +Signed-off-by+ line. + +Once patch files are generated, you can review/edit the commit message +before submitting them using your favorite text editor. + +Lastly, send/submit your patch set to the Buildroot mailing list: + +--------------------- +$ git send-email --to buildroot@busybox.net outgoing/* +--------------------- + +Note that +git+ should be configured to use your mail account. +To configure +git+, see +man git-send-email+ or google it. + +Make sure posted *patches are not line-wrapped*, otherwise they cannot +easily be applied. In such a case, fix your e-mail client, or better, +use +git send-email+ to send your patches. + +Cover letter +~~~~~~~~~~~~ + +If you want to present the whole patch set in a separate mail, add ++--cover-letter+ to the +git format-patch+ command (see +man +git-format-patch+ for further information). This will generate a +template for an introduction e-mail to your patch series. + +A 'cover letter' may be useful to introduce the changes you propose +in the following cases: + +* large number of commits in the series; + +* deep impact of the changes in the rest of the project; + +* RFC footnote:[RFC: (Request for comments) change proposal]; + +* whenever you feel it will help presenting your work, your choices, + the review process, etc. + +Patch revision changelog +~~~~~~~~~~~~~~~~~~~~~~~~ + +When improvements are requested, the new revision of each commit +should include a changelog of the modifications between each +submission. Note that when your patch series is introduced by a cover +letter, the changelog may be added in the cover letter rather than in +the individual commits. + +When added to the individual commits, this changelog is added when +editing the commit message. Below the +Signed-off-by+ section, add ++---+ and your changelog. + +Although the changelog will be visible for the reviewers in the mail +thread, as well as in http://patchwork.buildroot.org[patchwork], +git+ +will automatically ignores lines below +---+ when the patch will be +merged. This is the intended behavior: the changelog is not meant to +be preserved forever in the +git+ history of the project. + +Hereafter the recommended layout: + +--------------- +Patch title less than 80-character length + +Some more paragraph giving some more details. + +And yet another paragraph giving more details. + +Signed-off-by: John Doe +--- +Changes v2 -> v3: + - foo bar (suggested by Jane) + - bar buz + +Changes v1 -> v2: + - alpha bravo (suggested by John) + - charly delta +--------------- + +Any patch revision should include the version number. The version number +is simply composed of the letter +v+ followed by an +integer+ greater or +equal to two (i.e. "PATCH v2", "PATCH v3" ...). + +This can be easily handled with +git format-patch+ by using the option ++--subject-prefix+: + +--------------------- +$ git format-patch --subject-prefix "PATCH v4" \ + -M -o outgoing origin/master +--------------------- + +Reviewing/Testing patches +------------------------- + +The review process for new patches is done over the mailing list. Once +a patch is submitted to the mailing list, other developers will provide +feedback to the patch via emails sent through the mailing list. + +In the review process, do not hesitate to respond to patch submissions +for remarks, suggestions or anything that will help everyone to +understand the patches and make them better. Please use internet +style replies in plain text emails when responding to patch +submissions. + +Some tags are used to help following the state of any patch posted on +the mailing-list: + +Acked-by:: Indicates that the patch can be committed. + +Tested-by:: Indicates that the patch has been tested. It is useful + but not necessary to add a comment about what has been tested. + +Buildroot's Patchwork website can be used to pull in patches for testing +purposes. Please see xref:apply-patches-patchwork[] for more +information on using Buildroot's Patchwork website to apply patches. + +Autobuild +--------- + +The Buildroot community is currently setting up automatic builds in +order to test more and more configurations. All build results are +available at http://autobuild.buildroot.org[] + +A good way to contribute is by fixing broken builds. + +In the commit message of a patch fixing an _autobuild_, add a +reference to the _build result directory_ (the +dir+ link in the _data +column_): + +--------------------- +Fixes http://autobuild.buildroot.org/results/51000a9d4656afe9e0ea6f07b9f8ed374c2e4069 +--------------------- + +[[reporting-bugs]] +Reporting issues/bugs, get help +------------------------------- + +Before reporting any issue, please check +xref:mailing-list-subscribe[the mailing list archive] in case someone has +already reported and fixed a similar problem. + +However you choose to report bugs or get help, +xref:bugtracker[opening a bug] or +xref:mailing-list-subscribe[send a mail to the mailing list], there are +a number of details to provide in order to help people reproduce and +find a solution to the issue. + +Try to think as if you were trying to help someone else; in +that case, what would you need? + +Here is a short list of details to provide in such case: + +* host machine (OS/release) +* version of Buildroot +* target for which the build fails +* package(s) which the build fails +* the command that fails and its output +* any information you think that may be relevant + +Additionnally, your can add the +.config+ file. + +If some of these details are too large, do not hesitate to use a +pastebin service (see http://www.similarsitesearch.com/alternatives-to/pastebin.com[]). diff --git a/docs/manual/customize-busybox-config.txt b/docs/manual/customize-busybox-config.txt new file mode 100644 index 0000000000..981d534af7 --- /dev/null +++ b/docs/manual/customize-busybox-config.txt @@ -0,0 +1,27 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[busybox-custom]] +Customizing the Busybox configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +http://www.busybox.net/[Busybox] is very configurable, and you may +want to customize it. You can follow these simple steps to do so. This +method isn't optimal, but it's simple, and it works: + +* Do an initial compilation of Buildroot, with busybox, without + trying to customize it. + +* Invoke +make busybox-menuconfig+. + The nice configuration tool appears, and you can + customize everything. + +* Run the compilation of Buildroot again. + +Otherwise, you can simply change the ++package/busybox/busybox-.config+ file, if you know the +options you want to change, without using the configuration tool. + +If you want to use an existing config file for busybox, then see +xref:env-vars[]. + diff --git a/docs/manual/customize-kernel-config.txt b/docs/manual/customize-kernel-config.txt new file mode 100644 index 0000000000..a2d31ed849 --- /dev/null +++ b/docs/manual/customize-kernel-config.txt @@ -0,0 +1,16 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[kernel-custom]] +Customizing the Linux kernel configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The Linux kernel configuration can be customized just like +xref:busybox-custom[BusyBox] and xref:uclibc-custom[uClibc] using ++make linux-menuconfig+. Make sure you have enabled the kernel build +in +make menuconfig+ first. Once done, run +make+ to (re)build +everything. + +If you want to use an existing config file for Linux, then see +xref:env-vars[]. + diff --git a/docs/manual/customize-packages.txt b/docs/manual/customize-packages.txt new file mode 100644 index 0000000000..1820c544e5 --- /dev/null +++ b/docs/manual/customize-packages.txt @@ -0,0 +1,23 @@ +// -*- mode:doc -*- ; + +[[packages-custom]] +Customizing packages +~~~~~~~~~~~~~~~~~~~~ + +It is sometimes useful to apply 'extra' patches to packages - over and +above those provided in Buildroot. This might be used to support custom +features in a project, for example, or when working on a new architecture. + +The +BR2_GLOBAL_PATCH_DIR+ configuration file option can be +used to specify a directory containing global package patches. + +For a specific version of a specific package , +patches are applied as follows. + +First, the default Buildroot patch set for the package is applied. + +If the directory +$(BR2_GLOBAL_PATCH_DIR)//+ +exists, then all +*.patch+ files in the directory will be applied. + +Otherwise, if the directory +$(BR2_GLOBAL_PATCH_DIR)/+ +exists, then all +*.patch+ files in the directory will be applied. diff --git a/docs/manual/customize-rootfs.txt b/docs/manual/customize-rootfs.txt new file mode 100644 index 0000000000..49a6b4b442 --- /dev/null +++ b/docs/manual/customize-rootfs.txt @@ -0,0 +1,88 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[rootfs-custom]] +Customizing the generated target filesystem +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Besides changing one or another configuration through +make *config+, +there are a few ways to customize the resulting target filesystem. + +* Customize the target filesystem directly and rebuild the image. The + target filesystem is available under +output/target/+. You can + simply make your changes here and run make afterwards - this will + rebuild the target filesystem image. This method allows you to do + anything to the target filesystem, but if you decide to completely + rebuild your toolchain and tools, these changes will be lost. This + solution is therefore only useful for quick tests only: _changes do + not survive the +make clean+ command_. Once you have validated your + changes, you should make sure that they will persist after a +make + clean+ by using one of the following methods. + +* Create a filesystem overlay: a tree of files that are copied directly + over the target filesystem after it has been built. Set + +BR2_ROOTFS_OVERLAY+ to the top of the tree. +.git+, +.svn+, +.hg+ + directories, +.empty+ files and files ending with +~+ are excluded. + _Among these first 3 methods, this one should be preferred_. + +* In the Buildroot configuration, you can specify the paths to one or + more *post-build scripts*. These scripts are called in the given order, + 'after' Buildroot builds all the selected software, but 'before' the + rootfs images are assembled. The +BR2_ROOTFS_POST_BUILD_SCRIPT+ allows + you to specify the location of your post-build scripts. This option can be + found in the +System configuration+ menu. The destination root + filesystem folder is given as the first argument to these scripts, + and these scripts can then be used to remove or modify any file in your + target filesystem. You should, however, use this feature with care. + Whenever you find that a certain package generates wrong or unneeded + files, you should fix that package rather than work around it with some + post-build cleanup scripts. + You may also use these variables in your post-build script: + - +BUILDROOT_CONFIG+: the path to the Buildroot .config file + - +HOST_DIR+, +STAGING_DIR+, +TARGET_DIR+: see + xref:generic-package-reference[] + - +BINARIES_DIR+: the place where all binary files (aka images) are + stored + - +BASE_DIR+: the base output directory + +* Create your own 'target skeleton'. You can start with the default + skeleton available under +system/skeleton+ and then customize it to + suit your needs. The +BR2_ROOTFS_SKELETON_CUSTOM+ and + +BR2_ROOTFS_SKELETON_CUSTOM_PATH+ will allow you to specify the + location of your custom skeleton. These options can be found in the + +System configuration+ menu. At build time, the contents of the + skeleton are copied to output/target before any package + installation. Note that this method is *not recommended*, as it + duplicates the entire skeleton, which prevents from taking advantage + of the fixes or improvements brought to the default Buildroot + skeleton. The recommended method is to use the _post-build scripts_ + mechanism described in the previous item. + +Note also that you can use the *post-image scripts* +if you want to perform some specific actions 'after' all +filesystem images have been created (for example to automatically +extract your root filesystem tarball in a location exported by your +NFS server, or to create a special firmware image that bundles your +root filesystem and kernel image, or any other custom action), you can +specify a space-separated list of scripts in the ++BR2_ROOTFS_POST_IMAGE_SCRIPT+ configuration option. This option can be +found in the +System configuration+ menu as well. + +Each of those scripts will be called with the path to the +images+ +output directory as first argument, and will be executed with the main +Buildroot source directory as the current directory. Those scripts will +be executed as the user that executes Buildroot, which should normally +not be the root user. Therefore, any action requiring root permissions +in one of these _post-image scripts_ will require special handling +(usage of fakeroot or sudo), which is left to the script developer. + +Just like for the _post-build scripts_ mentioned above, you also have +access to the following environment variables from your _post-image +scripts_: +BUILDROOT_CONFIG+, +HOST_DIR+, +STAGING_DIR+, +TARGET_DIR+, ++BINARIES_DIR+ and +BASE_DIR+. + +Additionally, each of the +BR2_ROOTFS_POST_BUILD_SCRIPT+ and ++BR2_ROOTFS_POST_IMAGE_SCRIPT+ scripts will be passed the arguments +specified in +BR2_ROOTFS_POST_SCRIPT_ARGS+ (if that is not empty). +All the scripts will be passed the exact same set of arguments, it +is not possible to pass different sets of arguments to each script. diff --git a/docs/manual/customize-store.txt b/docs/manual/customize-store.txt new file mode 100644 index 0000000000..8fb5b57bb5 --- /dev/null +++ b/docs/manual/customize-store.txt @@ -0,0 +1,163 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[customize-store]] +Storing the configuration +------------------------- + +When you have a buildroot configuration that you are satisfied with and +you want to share it with others, put it under revision control or move +on to a different buildroot project, you need to store the configuration +so it can be rebuilt later. The configuration that needs to be stored +consists of the buildroot configuration, the configuration files for +packages that you use (kernel, busybox, uClibc, ...), and your rootfs +modifications. + + +[[customize-store-basics]] +Basics for storing the configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +[[customize-store-buildroot-config]] +Buildroot configuration +^^^^^^^^^^^^^^^^^^^^^^^ + +For storing the buildroot configuration itself, buildroot offers the +following command: +make savedefconfig+. + +This strips the buildroot configuration down by removing configuration +options that are at their default value. The result is stored in a file +called +defconfig+. If you want to save it in another place, change +the +BR2_DEFCONFIG+ option, or call make with +make savedefconfig +BR2_DEFCONFIG=+. The usual place is ++configs/_defconfig+. The configuration can then be rebuilt by +running +make _defconfig+. + +Alternatively, you can copy the file to any other place and rebuild with ++make defconfig BR2_DEFCONFIG=+. + + +[[customize-store-package-config]] +Other package configuration +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The configuration files for busybox, the linux kernel, barebox and +uClibc should be stored as well if changed. For each of these, a +buildroot configuration option exists to point to an input +configuration file, e.g. +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE+. To +save their configuration, set those configuration options to a path +outside your output directory, +e.g. +board///linux.config+. Then, copy the +configuration files to that path. + +Make sure that you create a configuration file 'before' changing +the +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE+ etc. options. Otherwise, +buildroot will try to access this config file, which doesn't exist +yet, and will fail. You can create the configuration file by running ++make linux-menuconfig+ etc. + +Buildroot provides a few helper targets to make the saving of +configuration files easier. + +* +make linux-update-defconfig+ saves the linux configuration to the + path specified by +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE+. It + simplifies the config file by removing default values. However, + this only works with kernels starting from 2.6.33. For earlier + kernels, use +make linux-update-config+. +* +make busybox-update-config+ saves the busybox configuration to the + path specified by +BR2_PACKAGE_BUSYBOX_CONFIG+. +* +make uclibc-update-config+ saves the uClibc configuration to the + path specified by +BR2_UCLIBC_CONFIG+. +* +make barebox-update-defconfig+ saves the barebox configuration to the + path specified by +BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE+. +* For at91bootstrap3, no helper exists so you have to copy the config + file manually to +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE+. + + +[[customize-store-board-support]] +Creating your own board support +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Creating your own board support in Buildroot allows users of a +particular hardware platform to easily build a system that is known to +work. + +To do so, you need to create a normal Buildroot configuration that +builds a basic system for the hardware: toolchain, kernel, bootloader, +filesystem and a simple Busybox-only userspace. No specific package +should be selected: the configuration should be as minimal as +possible, and should only build a working basic Busybox system for the +target platform. You can of course use more complicated configurations +for your internal projects, but the Buildroot project will only +integrate basic board configurations. This is because package +selections are highly application-specific. + +Once you have a known working configuration, run +make +savedefconfig+. This will generate a minimal +defconfig+ file at the +root of the Buildroot source tree. Move this file into the +configs/+ +directory, and rename it +_defconfig+. + +It is recommended to use as much as possible upstream versions of the +Linux kernel and bootloaders, and to use as much as possible default +kernel and bootloader configurations. If they are incorrect for your +board, or no default exists, we encourage you to send fixes to the +corresponding upstream projects. + +However, in the mean time, you may want to store kernel or bootloader +configuration or patches specific to your target platform. To do so, +create a directory +board/+ and a subdirectory ++board//+. You can then store your patches +and configurations in these directories, and reference them from the main +Buildroot configuration. + + +Step-by-step instructions for storing configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To store the configuration for a specific product, device or +application, it is advisable to use the same conventions as for the +board support: put the buildroot defconfig in the +configs+ directory, +and any other files in a subdirectory of the +boards+ directory. This +section gives step-by-step instructions about how to do that. Of course, +you can skip the steps that are not relevant for your use case. + +1. +make menuconfig+ to configure toolchain, packages and kernel. +1. +make linux-menuconfig+ to update the kernel config, similar for + other configuration. +1. +mkdir -p board//+ +1. Set the following options to +board///.config+ + (as far as they are relevant): + * +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE+ + * +BR2_PACKAGE_BUSYBOX_CONFIG+ + * +BR2_UCLIBC_CONFIG+ + * +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE+ + * +BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE+ +1. Write the configuration files: + * +make linux-update-defconfig+ + * +make busybox-update-config+ + * +make uclibc-update-config+ + * +cp /build/at91bootstrap3-*/.config board///at91bootstrap3.config+ + * +make barebox-update-defconfig+ +1. Create +board///fs-overlay/+ and fill it + with additional files you need on your rootfs, e.g. + +board///fs-overlay/etc/inittab+. + Set +BR2_ROOTFS_OVERLAY+ + to +board///fs-overlay+. +1. Create a post-build script + +board///post-build.sh+. Set + +BR2_ROOTFS_POST_BUILD_SCRIPT+ to + +board///post-build.sh+ +1. If additional setuid permissions have to be set or device nodes have + to be created, create +board///device_table.txt+ + and add that path to +BR2_ROOTFS_DEVICE_TABLE+. +1. +make savedefconfig+ to save the buildroot configuration. +1. +cp defconfig configs/_defconfig+ +1. To add patches to the linux build, set +BR2_LINUX_KERNEL_PATCH+ to + +board///patches/linux/+ and add your + patches in that directory. Each patch should be called + +linux--.patch+. Similar for U-Boot, barebox, + at91bootstrap and at91bootstrap3. +1. If you need modifications to other packages, or if you need to add + packages, do that directly in the +packages/+ directory, following the + instructions in xref:adding-packages[]. diff --git a/docs/manual/customize-toolchain.txt b/docs/manual/customize-toolchain.txt new file mode 100644 index 0000000000..31c9140433 --- /dev/null +++ b/docs/manual/customize-toolchain.txt @@ -0,0 +1,51 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[toolchain-custom]] +Customizing the toolchain +~~~~~~~~~~~~~~~~~~~~~~~~~ + +There are three distinct types of toolchain backend supported in Buildroot, +available under the menu +Toolchain+, invoking +make menuconfig+. + +Using the external toolchain backend +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +There is no way of tuning an external toolchain since Buildroot does not +generate it. + +It also requires to set the Buildroot settings according to the toolchain ones +(see xref:external-toolchain-backend[]). + +When using an external toolchain, Buildroot generates a wrapper program, that +passes the appropriate options (according to the configuration) to the +external toolchain programs. In case you need to debug this wrapper, you can +set the environment variable BR_DEBUG_WRAPPER to either one of: + +* +0+, empty or not set: no debug + +* +1+: trace all arguments on a single line + +* +2+: trace one argument per line + +Using the internal Buildroot toolchain backend +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The internal Buildroot toolchain backend allows to generate toolchains +based on http://www.uclibc.org/[uClibc], +https://www.gnu.org/software/libc/[glibc] and +http://www.eglibc.org/[eglibc]. +Generation of (e)glibc-based toolchains is still experimental in +Buildroot. + +It allows to tune major settings, such as: + +* Linux headers version; + +* C library configuration (only available for + http://www.uclibc.org/[uClibc], see xref:uclibc-custom[uClibc]); + +* Binutils, GCC, Gdb and toolchain options. + +These settings are available after selecting the +Buildroot toolchain+ type in +the menu +Toolchain+. diff --git a/docs/manual/customize-uclibc-config.txt b/docs/manual/customize-uclibc-config.txt new file mode 100644 index 0000000000..53dea92db3 --- /dev/null +++ b/docs/manual/customize-uclibc-config.txt @@ -0,0 +1,34 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[uclibc-custom]] +Customizing the uClibc configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Just like xref:busybox-custom[BusyBox], http://www.uclibc.org/[uClibc] +offers a lot of configuration options. They allow you to select +various functionalities depending on your needs and limitations. + +The easiest way to modify the configuration of uClibc is to +follow these steps: + +* Do an initial compilation of Buildroot without trying to customize + uClibc. + +* Invoke +make uclibc-menuconfig+. The nice configuration assistant, + similar to the one used in the Linux kernel or Buildroot, + appears. Make your configuration changes as appropriate. + +* Copy the +$(O)/build/uClibc-VERSION/.config+ file to a different + place (e.g. +board/MANUFACTURER/BOARDNAME/uClibc.config+) and adjust + the uClibc configuration file option +BR2_UCLIBC_CONFIG+ to refer to this + configuration instead of the default one. + +* Run the compilation of Buildroot again. + +Otherwise, you can simply change +package/uclibc/uClibc-VERSION.config+, +without running the configuration assistant. + +If you want to use an existing config file for uClibc, then see +xref:env-vars[]. + diff --git a/docs/manual/customize.txt b/docs/manual/customize.txt new file mode 100644 index 0000000000..0456ef16f0 --- /dev/null +++ b/docs/manual/customize.txt @@ -0,0 +1,19 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Customization +------------- + +include::customize-rootfs.txt[] + +include::customize-busybox-config.txt[] + +include::customize-uclibc-config.txt[] + +include::customize-kernel-config.txt[] + +include::customize-toolchain.txt[] + +include::customize-store.txt[] + +include::customize-packages.txt[] diff --git a/docs/manual/developer-guide.txt b/docs/manual/developer-guide.txt new file mode 100644 index 0000000000..8125ad5ca3 --- /dev/null +++ b/docs/manual/developer-guide.txt @@ -0,0 +1,13 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Developer Guidelines +==================== + +include::writing-rules.txt[] + +include::adding-packages.txt[] + +include::patch-policy.txt[] + +include::download-infra.txt[] diff --git a/docs/manual/download-infra.txt b/docs/manual/download-infra.txt new file mode 100644 index 0000000000..fe031a640e --- /dev/null +++ b/docs/manual/download-infra.txt @@ -0,0 +1,9 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[download-infra]] + +Download infrastructure +----------------------- + +TODO diff --git a/docs/manual/download-location.txt b/docs/manual/download-location.txt new file mode 100644 index 0000000000..4aa8cead3e --- /dev/null +++ b/docs/manual/download-location.txt @@ -0,0 +1,26 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Location of downloaded packages +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The various tarballs that are downloaded by Buildroot are all stored +in +BR2_DL_DIR+, which by default is the +dl+ directory. If you want +to keep a complete version of Buildroot which is known to be working +with the associated tarballs, you can make a copy of this directory. +This will allow you to regenerate the toolchain and the target +filesystem with exactly the same versions. + +If you maintain several Buildroot trees, it might be better to have a +shared download location. This can be achieved by pointing the ++BUILDROOT_DL_DIR+ environment variable to a directory. If this is +set, then the value of +BR2_DL_DIR+ in the Buildroot configuration is +overridden. The following line should be added to +<~/.bashrc>+. + +----------------- + $ export BUILDROOT_DL_DIR +----------------- + +The download location can also be set in the +.config+ file, with the ++BR2_DL_DIR+ option. This value is overridden by the +BUILDROOT_DL_DIR+ +environment variable. diff --git a/docs/manual/eclipse-integration.txt b/docs/manual/eclipse-integration.txt new file mode 100644 index 0000000000..d1a42cf074 --- /dev/null +++ b/docs/manual/eclipse-integration.txt @@ -0,0 +1,31 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Integration with Eclipse +------------------------ + +While a part of the embedded Linux developers like classical text +editors like Vim or Emacs, and command-line based interfaces, a number +of other embedded Linux developers like richer graphical interfaces to +do their development work. Eclipse being one of the most popular +Integrated Development Environment, Buildroot integrates with Eclipse +in order to ease the development work of Eclipse users. + +Our integration with Eclipse simplifies the compilation, remote +execution and remote debugging of applications and libraries that are +built on top of a Buildroot system. It does not integrate the +Buildroot configuration and build processes themselves with +Eclipse. Therefore, the typical usage model of our Eclipse integration +would be: + +* Configure your Buildroot system with +make menuconfig+, +make + xconfig+ or any other configuration interface provided with + Buildroot. +* Build your Buildroot system by running +make+. +* Start Eclipse to develop, execute and debug your own custom + applications and libraries, that will rely on the libraries built + and installed by Buildroot. + +The Buildroot Eclipse integration installation process and usage is +described in detail at +https://github.com/mbats/eclipse-buildroot-bundle/wiki. diff --git a/docs/manual/faq-troubleshooting.txt b/docs/manual/faq-troubleshooting.txt new file mode 100644 index 0000000000..4e0612b8d7 --- /dev/null +++ b/docs/manual/faq-troubleshooting.txt @@ -0,0 +1,113 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Frequently Asked Questions & Troubleshooting +============================================ + +[[faq-boot-hang-after-starting]] +The boot hangs after 'Starting network...' +------------------------------------------ + +If the boot process seems to hang after the following messages +(messages not necessarily exactly similar, depending on the list of +packages selected): + +------------------------ +Freeing init memory: 3972K +Initializing random number generator... done. +Starting network... +Starting dropbear sshd: generating rsa key... generating dsa key... OK +------------------------ + +then it means that your system is running, but didn't start a shell on +the serial console. In order to have the system start a shell on your +serial console, you have to go into the Buildroot configuration, +System +configuration+, and modify +Port to run a getty (login prompt) on+ and ++Baudrate to use+ as appropriate. This will automatically tune the ++/etc/inittab+ file of the generated system so that a shell starts on +the correct serial port. + +[[faq-no-compiler-on-target]] +Why is there no compiler on the target? +--------------------------------------- + +It has been decided that support for the _native compiler on the +target_ would be stopped from the Buildroot-2012.11 release because: + +* this feature was neither maintained nor tested, and often broken; +* this feature was only available for Buildroot toolchains; +* Buildroot mostly targets _small_ or _very small_ target hardware + with limited resource onboard (CPU, ram, mass-storage), for which + compiling does not make much sense. + +If you need a compiler on your target anyway, then Buildroot is not +suitable for your purpose. In such case, you need a _real +distribution_ and you should opt for something like: + +* http://www.openembedded.org[openembedded] +* https://www.yoctoproject.org[yocto] +* http://www.emdebian.org[emdebian] +* https://fedoraproject.org/wiki/Architectures[Fedora] +* http://en.opensuse.org/Portal:ARM[openSUSE ARM] +* http://archlinuxarm.org[Arch Linux ARM] +* ... + +[[faq-no-dev-files-on-target]] +Why are there no development files on the target? +------------------------------------------------- + +Since there is no compiler available on the target (see +xref:faq-no-compiler-on-target[]), it does not make sense to waste +space with headers or static libraries. + +Therefore, those files are always removed from the target since the +Buildroot-2012.11 release. + +[[faq-no-doc-on-target]] +Why is there no documentation on the target? +-------------------------------------------- + +Because Buildroot mostly targets _small_ or _very small_ target +hardware with limited resource onboard (CPU, ram, mass-storage), it +does not make sense to waste space with the documentation data. + +If you need documentation data on your target anyway, then Buildroot +is not suitable for your purpose, and you should look for a _real +distribution_ (see: xref:faq-no-compiler-on-target[]). + +[[faq-why-not-visible-package]] +Why are some packages not visible in the Buildroot config menu? +--------------------------------------------------------------- + +If a package exists in the Buildroot tree and does not appear in the +config menu, this most likely means that some of the package's +dependencies are not met. + +To know more about the dependencies of a package, search for the +package symbol in the config menu (see xref:make-tips[]). + +Then, you may have to recursively enable several options (which +correspond to the unmet dependencies) to finally be able to select +the package. + +If the package is not visible due to some unmet toolchain options, +then you should certainly run a full rebuild (see xref:make-tips[] for +more explanations). + +[[faq-why-not-use-target-as-chroot]] +Why not use the target directory as a chroot directory? +------------------------------------------------------- + +There are plenty of reasons to *not* use the target directory a chroot +one, among these: + +* file ownerships, modes and permissions are not correctly set in the + target directory; +* device nodes are not created in the target directory. + +For these reasons, commands run through chroot, using the target +directory as the new root, will most likely fail. + +If you want to run the target filesystem inside a chroot, or as an NFS +root, then use the tarball image generated in +images/+ and extract it +as root. diff --git a/docs/manual/get-involved.txt b/docs/manual/get-involved.txt new file mode 100644 index 0000000000..8475038d18 --- /dev/null +++ b/docs/manual/get-involved.txt @@ -0,0 +1,134 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Getting involved +================ + +Like any open source project, Buildroot has different ways to share +information in its community and outside. + +One piece of it is the document you are currently reading ;-). + +Each of those ways may interest you if you are looking for some help, +want to understand Buildroot or contribute to the project. + +Mailing List +------------ + +Buildroot has a mailing list +http://lists.busybox.net/pipermail/buildroot[] for discussion and +development. + +[[mailing-list-subscribe]] + +Subscribing to the mailing list +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can subscribe by visiting +http://lists.busybox.net/mailman/listinfo/buildroot[]. +Only subscribers to the Buildroot mailing list are allowed to post to +this list. + +The list is also available through _Gmane_ http://gmane.org[], at ++gmane.comp.lib.uclibc.buildroot+ +http://dir.gmane.org/gmane.comp.lib.uclibc.buildroot[]. + +Searching the List Archives +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Please search the mailing list archives before asking questions on the +mailing list, since there is a good chance someone else has asked the +same question before. Checking the archives is a great way to avoid +annoying everyone on the list with frequently asked questions... + +IRC +--- + +The Buildroot IRC is irc://freenode.net/#buildroot[]. +The channel +#buildroot+ is hosted on Freenode +http://webchat.freenode.net[]. + +When asking for help on IRC, share relevant logs or pieces of code +using a code sharing website. + +[[patchwork]] +Patchwork +--------- + +Patchwork is a web-based patch tracking system designed to facilitate +the contribution and management of contributions to an open-source +project. Patches that have been sent to a mailing list are \'caught' by +the system, and appear on a web page. Any comments posted that +reference the patch are appended to the patch page too. For more +information on Patchwork see +http://jk.ozlabs.org/projects/patchwork[]. + +Buildroot's Patchwork website is mainly for use by Buildroot's +maintainer to ensure patches aren't missed. The website however, +exposes patches and their corresponding review comments in a clean +and concise web interface. + +The Buildroot patch management interface is available at +http://patchwork.buildroot.org[]. + +[[apply-patches-patchwork]] +Applying Patches from Patchwork +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The main use of Buildroot's Patchwork website for a developer is for +pulling in patches into their local git repository for testing +purposes. + +When browsing patches in the patchwork management interface, an +mbox+ +link is provided at the top of the page. Copy this link address and +run the following commands: + +--------------------- +$ git checkout -b +$ wget -O - | git am +--------------------- + +Another option for applying patches is to create a bundle. A bundle is +a set of patches that you can group together using the patchwork +interface. Once the bundle is created and the bundle is made public, +you can copy the +mbox+ link for the bundle and apply the bundle +using the above commands. + +[[bugtracker]] +Bugtracker +---------- + +The Buildroot bugtracker is at https://bugs.busybox.net[]. + +To open a bug, see xref:reporting-bugs[]. + +Buildroot wikipage +------------------ + +After the Buildroot developer day on February 3, 2012, +a page dedicated to Buildroot has been created on +http://elinux.org[elinux.org]. + +This page is reachable at http://elinux.org/Buildroot[]. + +Currently, this page is mainly used as a _todo-list_. + +[[events]] +Events +------ + +Buildroot Developer Days aside ELC-E 2012 (November 3-4, 2012 - Barcelona) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* Event page: http://elinux.org/Buildroot:DeveloperDaysELCE2012[] + +Buildroot presentation at LSM 2012 (July 12-14, 2012 - Geneva) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* Announcement: http://lists.busybox.net/pipermail/buildroot/2012-May/053845.html[] + +Buildroot Developer Days aside FOSDEM 2012 (February 3, 2012 - Brussels) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* Announcement & agenda thread: http://lists.busybox.net/pipermail/buildroot/2012-January/049340.html[] +* Report: http://lists.busybox.net/pipermail/buildroot/2012-February/050371.html[] diff --git a/docs/manual/getting.txt b/docs/manual/getting.txt new file mode 100644 index 0000000000..6b2a824f9d --- /dev/null +++ b/docs/manual/getting.txt @@ -0,0 +1,27 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[getting-buildroot]] +Getting Buildroot +----------------- + +Buildroot releases are made approximately every 3 months. Direct Git +access and daily snapshots are also available, if you want more +bleeding edge. + +Releases are available at http://buildroot.net/downloads/[]. + +The latest snapshot is always available at +http://buildroot.net/downloads/snapshots/buildroot-snapshot.tar.bz2[], +and previous snapshots are also available at +http://buildroot.net/downloads/snapshots/[]. + +To download Buildroot using Git, you can simply follow the rules +described on the "Accessing Git" page +(http://buildroot.net/git.html[]) of the Buildroot website +(http://buildroot.net[]). For the impatient, here's a quick recipe: + +--------------------- + $ git clone git://git.buildroot.net/buildroot +--------------------- + diff --git a/docs/manual/going-further.txt b/docs/manual/going-further.txt new file mode 100644 index 0000000000..d3f183037a --- /dev/null +++ b/docs/manual/going-further.txt @@ -0,0 +1,9 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Going further in Buildroot's innards +==================================== + +include::how-buildroot-works.txt[] + +include::advanced.txt[] diff --git a/docs/manual/how-buildroot-works.txt b/docs/manual/how-buildroot-works.txt new file mode 100644 index 0000000000..68ddd13793 --- /dev/null +++ b/docs/manual/how-buildroot-works.txt @@ -0,0 +1,71 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +How Buildroot works +------------------- + +As mentioned above, Buildroot is basically a set of Makefiles that +download, configure, and compile software with the correct options. It +also includes patches for various software packages - mainly the ones +involved in the cross-compilation toolchain (+gcc+, +binutils+ and ++uClibc+). + +There is basically one Makefile per software package, and they are +named with the +.mk+ extension. Makefiles are split into many different +parts. + +* The +toolchain/+ directory contains the Makefiles + and associated files for all software related to the + cross-compilation toolchain: +binutils+, +gcc+, +gdb+, + +kernel-headers+ and +uClibc+. + +* The +arch/+ directory contains the definitions for all the processor + architectures that are supported by Buildroot. + +* The +package/+ directory contains the Makefiles and + associated files for all user-space tools and libraries that Buildroot + can compile and add to the target root filesystem. There is one + sub-directory per package. + +* The +linux/+ directory contains the Makefiles and associated files for + the Linux kernel. + +* The +boot/+ directory contains the Makefiles and associated files for + the bootloaders supported by Buildroot. + +* The +system/+ directory contains support for system integration, e.g. + the target filesystem skeleton and the selection of an init system. + +* The +fs/+ directory contains the Makefiles and + associated files for software related to the generation of the + target root filesystem image. + +Each directory contains at least 2 files: + +* +something.mk+ is the Makefile that downloads, configures, + compiles and installs the package +something+. + +* +Config.in+ is a part of the configuration tool + description file. It describes the options related to the + package. + +The main Makefile performs the following steps (once the +configuration is done): + +* Create all the output directories: +staging+, +target+, +build+, + +stamps+, etc. in the output directory (+output/+ by default, + another value can be specified using +O=+) + +* Generate all the targets listed in the +BASE_TARGETS+ variable. When + an internal toolchain is used, this means generating the + cross-compilation toolchain. When an external toolchain is used, + this means checking the features of the external toolchain and + importing it into the Buildroot environment. + +* Generate all the targets listed in the +TARGETS+ variable. This + variable is filled by all the individual components' + Makefiles. Generating these targets will trigger the compilation of + the userspace packages (libraries, programs), the kernel, the + bootloader and the generation of the root filesystem images, + depending on the configuration. + diff --git a/docs/manual/introduction.txt b/docs/manual/introduction.txt new file mode 100644 index 0000000000..c014565ab1 --- /dev/null +++ b/docs/manual/introduction.txt @@ -0,0 +1,27 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +About Buildroot +=============== + +Buildroot is a tool that simplifies and automates the process of +building a complete Linux system for an embedded system, using +cross-compilation. + +In order to achieve this, Buildroot is able to generate a +cross-compilation toolchain, a root filesystem, a Linux kernel image +and a bootloader for your target. Buildroot can be used for any +combination of these options, independently (you can for example use +an existing cross-compilation toolchain, and build only your root +filesystem with Buildroot). + +Buildroot is useful mainly for people working with embedded systems. +Embedded systems often use processors that are not the regular x86 +processors everyone is used to having in his PC. They can be PowerPC +processors, MIPS processors, ARM processors, etc. + +Buildroot supports numerous processors and their variants; it also +comes with default configurations for several boards available +off-the-shelf. Besides this, a number of third-party projects are based on, +or develop their BSP footnote:[BSP: Board Support Package] or +SDK footnote:[SDK: Software Development Kit] on top of Buildroot. diff --git a/docs/manual/known-issues.txt b/docs/manual/known-issues.txt new file mode 100644 index 0000000000..22710fb136 --- /dev/null +++ b/docs/manual/known-issues.txt @@ -0,0 +1,32 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Known issues +============ + +* The +ltp-testsuite+ package does not build with the default uClibc + configuration used by the Buildroot toolchain backend. The LTP + testsuite uses several functions that are considered obsolete, such + as sigset() and others. uClibc configuration options such as + DO_XSI_MATH, UCLIBC_HAS_OBSOLETE_BSD_SIGNAL and + UCLIBC_SV4_DEPRECATED are needed if one wants to build the + +ltp-testsuite+ package with uClibc. You need to either use a glibc + or eglibc based toolchain, or enable the appropriate options in the + uClibc configuration. + +* The +xfsprogs+ package does not build with the default uClibc + configuration used by the Buildroot toolchain backend. You need to + either use a glibc or eglibc based toolchain, or enable the + appropriate options in the uClibc configuration. + +* The +mrouted+ package does not build with the default uClibc + configuration used by the Buildroot toolchain backend. You need to + either use a glibc or eglibc based toolchain, or enable the + appropriate options in the uClibc configuration. + +* The +libffi+ package is not supported on the SuperH 2 and ARC + architectures. + +* The +prboom+ package triggers a compiler failure with the SuperH 4 + compiler from Sourcery CodeBench, version 2012.09. + diff --git a/docs/manual/legal-notice.txt b/docs/manual/legal-notice.txt new file mode 100644 index 0000000000..51292f6d3e --- /dev/null +++ b/docs/manual/legal-notice.txt @@ -0,0 +1,148 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[legal-info]] + +Legal notice and licensing +========================== + +Complying with open source licenses +----------------------------------- + +All of the end products of Buildroot (toolchain, root filesystem, kernel, +bootloaders) contain open source software, released under various licenses. + +Using open source software gives you the freedom to build rich embedded +systems, choosing from a wide range of packages, but also imposes some +obligations that you must know and honour. +Some licenses require you to publish the license text in the documentation of +your product. Others require you to redistribute the source code of the +software to those that receive your product. + +The exact requirements of each license are documented in each package, and +it is your responsibility (or that of your legal office) to comply with those +requirements. +To make this easier for you, Buildroot can collect for you some material you +will probably need. To produce this material, after you have configured +Buildroot with +make menuconfig+, +make xconfig+ or +make gconfig+, run: + +-------------------- +make legal-info +-------------------- + +Buildroot will collect legally-relevant material in your output directory, +under the +legal-info/+ subdirectory. +There you will find: + +* A +README+ file, that summarizes the produced material and contains warnings + about material that Buildroot could not produce. +* +buildroot.config+: this is the Buildroot configuration file that is usually + produced with +make menuconfig+, and which is necessary to reproduce the + build. +* The source code for all packages; this is saved in the +sources/+ + subdirectory (except for proprietary packages, whose source code is not + saved); + patches applied to some packages by Buildroot are distributed with the + Buildroot sources and are not duplicated in the +sources/+ subdirectory. +* A manifest file listing the configured packages, their version, license and + related information. + Some of this information might not be defined in Buildroot; such items are + marked as "unknown". +* A +licenses/+ subdirectory, which contains the license text of packages. + If the license file(s) are not defined in Buildroot, the file is not produced + and a warning in the +README+ indicates this. + +Please note that the aim of the +legal-info+ feature of Buildroot is to +produce all the material that is somehow relevant for legal compliance with the +package licenses. Buildroot does not try to produce the exact material that +you must somehow make public. Certainly, more material is produced than is +needed for a strict legal compliance. For example, it produces the source code +for packages released under BSD-like licenses, that you are not required to +redistribute in source form. + +Moreover, due to technical limitations, Buildroot does not produce some +material that you will or may need, such as the toolchain source code and the +Buildroot source code itself (including patches to packages for which source +distribution is required). +When you run +make legal-info+, Buildroot produces warnings in the +README+ +file to inform you of relevant material that could not be saved. + +[[legal-info-list-licenses]] +License abbreviations +--------------------- + +Here is a list of the licenses that are most widely used by packages in +Buildroot, with the name used in the manifest file: + +* `GPLv2`: + http://www.gnu.org/licenses/old-licenses/gpl-2.0.html[ + GNU General Public License, version 2]; +* `GPLv2+`: + http://www.gnu.org/licenses/old-licenses/gpl-2.0.html[ + GNU General Public License, version 2] + or (at your option) any later version; +* `GPLv3`: + http://www.gnu.org/licenses/gpl.html[ + GNU General Public License, version 3]; +* `GPLv3+`: + http://www.gnu.org/licenses/gpl.html[ + GNU General Public License, version 3] + or (at your option) any later version; +* `GPL`: + http://www.gnu.org/licenses/gpl.html[ + GNU General Public License] (any version); +* `LGPLv2`: + http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html[ + GNU Library General Public License, version 2]; +* `LGPLv2+`: + http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html[ + GNU Library General Public License, version 2.1] + or (at your option) any later version; +* `LGPLv2.1`: + http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html[ + GNU Lesser General Public License, version 2.1]; +* `LGPLv2.1+`: + http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html[ + GNU Lesser General Public License, version 2.1] + or (at your option) any later version; +* `LGPLv3`: + http://www.gnu.org/licenses/lgpl.html[ + GNU Lesser General Public License, version 3]; +* `LGPLv3+`: + http://www.gnu.org/licenses/lgpl.html[ + GNU Lesser General Public License, version 3] + or (at your option) any later version; +* `LGPL`: + http://www.gnu.org/licenses/lgpl.html[ + GNU Lesser General Public License] (any version); +* `BSD-4c`: Original BSD 4-clause license; +* `BSD-3c`: BSD 3-clause license; +* `BSD-2c`: BSD 2-clause license; +* `MIT`: MIT-style license. + +Complying with the Buildroot license +------------------------------------ + +Buildroot itself is an open source software, released under the +http://www.gnu.org/licenses/old-licenses/gpl-2.0.html[GNU General Public +License, version 2] or (at your option) any later version. +However, being a build system, it is not normally part of the end product: +if you develop the root filesystem, kernel, bootloader or toolchain for a +device, the code of Buildroot is only present on the development machine, not +in the device storage. + +Nevertheless, the general view of the Buildroot developers is that you should +release the Buildroot source code along with the source code of other packages +when releasing a product that contains GPL-licensed software. +This is because the +http://www.gnu.org/licenses/old-licenses/gpl-2.0.html[GNU GPL] +defines the "'complete source code'" for an executable work as "'all the +source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable'". +Buildroot is part of the 'scripts used to control compilation and +installation of the executable', and as such it is considered part of the +material that must be redistributed. + +Keep in mind that this is only the Buildroot developers' opinion, and you +should consult your legal department or lawyer in case of any doubt. diff --git a/docs/manual/make-tips.txt b/docs/manual/make-tips.txt new file mode 100644 index 0000000000..0159ffe7ce --- /dev/null +++ b/docs/manual/make-tips.txt @@ -0,0 +1,81 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[make-tips]] +'make' tips +----------- + +This is a collection of tips that help you make the most of Buildroot. + +.Configuration searches: + +The +make *config+ commands offer a search tool. Read the help message in +the different frontend menus to know how to use it: + +* in _menuconfig_, the search tool is called by pressing +/+; +* in _xconfig_, the search tool is called by pressing +Ctrl+ + +f+. + +The result of the search shows the help message of the matching items. + +.Display all commands executed by make: + +-------------------- + $ make V=1 +-------------------- + +.Display all available targets: + +-------------------- + $ make help +-------------------- + +Not all targets are always available, +some settings in the +.config+ file may hide some targets: + +* +linux-menuconfig+ and +linux-savedefconfig+ only work when + +linux+ is enabled; +* +uclibc-menuconfig+ is only available when the + Buildroot internal toolchain backend is used; +* +barebox-menuconfig+ and +barebox-savedefconfig+ only work when the + +barebox+ bootloader is enabled. + +.Cleaning: + +Explicit cleaning is required when any of the architecture or toolchain +configuration options are changed. + +To delete all build products (including build directories, host, staging +and target trees, the images and the toolchain): + +-------------------- + $ make clean +-------------------- + +.Generating the manual: + +The present manual sources are located in the 'docs/manual' directory. +To generate the manual: + +--------------------------------- + $ make manual-clean + $ make manual +--------------------------------- + +The manual outputs will be generated in 'output/docs/manual'. + +.Notes +- A few tools are required to build the documentation (see: + xref:requirement-optional[]). + +.Reseting Buildroot for a new target: + +To delete all build products as well as the configuration: + +-------------------- + $ make distclean +-------------------- + +.Notes +If +ccache+ is enabled, running +make clean+ or +distclean+ does +not empty the compiler cache used by Buildroot. To delete it, refer +to xref:ccache[]. diff --git a/docs/manual/makedev-syntax.txt b/docs/manual/makedev-syntax.txt new file mode 100644 index 0000000000..2c985312b4 --- /dev/null +++ b/docs/manual/makedev-syntax.txt @@ -0,0 +1,57 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[makedev-syntax]] +Makedev syntax documentation +---------------------------- + +The makedev syntax is used in several places in Buildroot to +define changes to be made for permissions, or which device files to +create and how to create them, in order to avoid calls to mknod. + +This syntax is derived from the makedev utility, and more complete +documentation can be found in the +package/makedevs/README+ file. + +It takes the form of a line for each file, with the following layout: + +|=========================================================== +|name |type |mode |uid |gid |major |minor |start |inc |count +|=========================================================== + +There are a few non-trivial blocks here: + +- +name+ is the path to the file you want to create/modify +- +type+ is the type of the file, being one of: + * f: a regular file + * d: a directory + * c: a character device file + * b: a block device file + * p: a named pipe +- +mode+, +uid+ and +gid+ are the usual permissions settings +- +major+ and +minor+ are here for device files - set to - for other + files +- +start+, +inc+ and +count+ are for when you want to create a batch + of files, and can be reduced to a loop, beginning at +start+, + incrementing its counter by +inc+ until it reaches +count+ + +Let's say you want to change the permissions of a given file; using +this syntax, you will need to put: +------------------------------------------------------------------- +/usr/bin/foobar f 644 0 0 - - - - - +------------------------------------------------------------------- + +On the other hand, if you want to create the device file +/dev/hda+ +and the corresponding 15 files for the partitions, you will need for ++/dev/hda+: + +------------------------------------------------------------------- +/dev/hda b 640 0 0 3 0 0 0 - +------------------------------------------------------------------- + +and then for device files corresponding to the partitions of ++/dev/hda+, +/dev/hdaX+, +X+ ranging from 1 to 15: + +------------------------------------------------------------------- +/dev/hda b 640 0 0 3 1 1 1 15 +------------------------------------------------------------------- + diff --git a/docs/manual/makeusers-syntax.txt b/docs/manual/makeusers-syntax.txt new file mode 100644 index 0000000000..21996546c7 --- /dev/null +++ b/docs/manual/makeusers-syntax.txt @@ -0,0 +1,87 @@ +// -*- mode:doc -*- ; + +[[makeuser-syntax]] +Makeuser syntax documentation +----------------------------- + +The syntax to create users is inspired by the makedev syntax, above, but +is specific to Buildroot. + +The syntax for adding a user is a space-separated list of fields, one +user per line; the fields are: + +|================================================================= +|username |uid |group |gid |password |home |shell |groups |comment +|================================================================= + +Where: + +- +username+ is the desired user name (aka login name) for the user. + It can not be +root+, and must be unique. +- +uid+ is the desired UID for the user. It must be unique, and not + +0+. If set to +-1+, then a unique UID will be computed by Buildroot + in the range [1000...1999] +- +group+ is the desired name for the user's main group. It can not + be +root+. If the group does not exist, it will be created. +- +gid+ is the desired GID for the user's main group. It must be unique, + and not +0+. If set to +-1+, and the group does not already exist, then + a unique GID will be computed by Buildroot in the range [1000..1999] +- +password+ is the crypt(3)-encoded password. If prefixed with +!+, + then login is disabled. If prefixed with +=+, then it is interpreted + as clear-text, and will be crypt-encoded (using MD5). If prefixed with + +!=+, then the password will be crypt-encoded (using MD5) and login + will be disabled. If set to +*+, then login is not allowed. +- +home+ is the desired home directory for the user. If set to '-', no + home directory will be created, and the user's home will be +/+. + Explicitly setting +home+ to +/+ is not allowed. +- +shell+ is the desired shell for the user. If set to +-+, then + +/bin/false+ is set as the user's shell. +- +groups+ is the comma-separated list of additional groups the user + should be part of. If set to +-+, then the user will be a member of + no additional group. Missing groups will be created with an arbitrary + +gid+. +- +comment+ (aka https://en.wikipedia.org/wiki/Gecos_field[GECOS] + field) is an almost-free-form text. + +There are a few restrictions on the content of each field: + +* except for +comment+, all fields are mandatory. +* except for +comment+, fields may not contain spaces. +* no field may contain a colon (+:+). + +If +home+ is not +-+, then the home directory, and all files below, +will belong to the user and its main group. + +Examples: + +---- +foo -1 bar -1 !=blabla /home/foo /bin/sh alpha,bravo Foo user +---- + +This will create this user: + +- +username+ (aka login name) is: +foo+ +- +uid+ is computed by Buildroot +- main +group+ is: +bar+ +- main group +gid+ is computed by Buildroot +- clear-text +password+ is: +blabla+, will be crypt(3)-encoded, and login is disabled. +- +home+ is: +/home/foo+ +- +shell+ is: +/bin/sh+ +- +foo+ is also a member of +groups+: +alpha+ and +bravo+ +- +comment+ is: +Foo user+ + +---- +test 8000 wheel -1 = - /bin/sh - Test user +---- + +This will create this user: + +- +username+ (aka login name) is: +test+ +- +uid+ is : +8000+ +- main +group+ is: +wheel+ +- main group +gid+ is computed by Buildroot, and will use the value defined in the rootfs skeleton +- +password+ is empty (aka no password). +- +home+ is +/+ but will not belong to +test+ +- +shell+ is: +/bin/sh+ +- +test+ is not a member of any additional +groups+ +- +comment+ is: +Test user+ diff --git a/docs/manual/manual.mk b/docs/manual/manual.mk new file mode 100644 index 0000000000..aeafd10d7a --- /dev/null +++ b/docs/manual/manual.mk @@ -0,0 +1,87 @@ +manual-update-lists: manual-check-dependencies-lists + $(Q)$(call MESSAGE,"Updating the manual lists...") + $(Q)BR2_DEFCONFIG="" TOPDIR=$(TOPDIR) O=$(O)/docs/manual/.build \ + $(TOPDIR)/support/scripts/gen-manual-lists.py + +# we can't use suitable-host-package here because that's not available in +# the context of 'make release' +manual-check-dependencies: + $(Q)if [ -z "$(shell support/dependencies/check-host-asciidoc.sh)" ]; then \ + echo "You need a sufficiently recent asciidoc on your host" \ + "to generate the manual"; \ + exit 1; \ + fi + $(Q)if [ -z "`which w3m 2>/dev/null`" ]; then \ + echo "You need w3m on your host to generate the manual"; \ + exit 1; \ + fi + +manual-check-dependencies-pdf: + $(Q)if [ -z "`which dblatex 2>/dev/null`" ]; then \ + echo "You need dblatex on your host to generate the pdf manual"; \ + exit 1; \ + fi + +manual-check-dependencies-lists: + $(Q)if ! python -c "import argparse" >/dev/null 2>&1 ; then \ + echo "You need python with argparse on your host to generate" \ + "the list of packages in the manual"; \ + exit 1; \ + fi + +################################################################################ +# GENDOC -- generates the make targets needed to build a specific type of +# asciidoc documentation. +# +# argument 1 is the name of the document and must be a subdirectory of docs/; +# the top-level asciidoc file must have the same name +# argument 2 is the type of document to generate (-f argument of a2x) +# argument 3 is the document type as used in the make target +# argument 4 is the output file extension for the document type +# argument 5 is the human text for the document type +# argument 6 (optional) are extra arguments for a2x +# +# The variable _SOURCES defines the dependencies. +################################################################################ +define GENDOC_INNER +$(1): $(1)-$(3) +.PHONY: $(1)-$(3) +$(1)-$(3): $$(O)/docs/$(1)/$(1).$(4) + +manual-check-dependencies-$(3): + +$$(O)/docs/$(1)/$(1).$(4): docs/$(1)/$(1).txt \ + $$($(call UPPERCASE,$(1))_SOURCES) \ + manual-check-dependencies \ + manual-check-dependencies-$(3) \ + manual-update-lists + $(Q)$(call MESSAGE,"Generating $(5) $(1)...") + $(Q)mkdir -p $$(@D)/.build + $(Q)rsync -au docs/$(1)/*.txt $$(@D)/.build + $(Q)a2x $(6) -f $(2) -d book -L -r $(TOPDIR)/docs/images \ + -D $$(@D) $$(@D)/.build/$(1).txt + -$(Q)rm -rf $$(@D)/.build +endef + +################################################################################ +# GENDOC -- generates the make targets needed to build asciidoc documentation. +# +# argument 1 is the name of the document and must be a subdirectory of docs/; +# the top-level asciidoc file must have the same name +# +# The variable _SOURCES defines the dependencies. +################################################################################ +define GENDOC +$(call GENDOC_INNER,$(1),xhtml,html,html,HTML,--xsltproc-opts "--stringparam toc.section.depth 4") +$(call GENDOC_INNER,$(1),chunked,split-html,chunked,split HTML,--xsltproc-opts "--stringparam toc.section.depth 4") +$(call GENDOC_INNER,$(1),pdf,pdf,pdf,PDF,--dblatex-opts "-P latex.output.revhistory=0") +$(call GENDOC_INNER,$(1),text,text,text,text) +$(call GENDOC_INNER,$(1),epub,epub,epub,ePUB) +clean: $(1)-clean +$(1)-clean: + $(Q)$(RM) -rf $(O)/docs/$(1) +.PHONY: $(1) $(1)-clean manual-update-lists +endef + +MANUAL_SOURCES = $(sort $(wildcard docs/manual/*.txt) $(wildcard docs/images/*)) +$(eval $(call GENDOC,manual)) diff --git a/docs/manual/manual.txt b/docs/manual/manual.txt new file mode 100644 index 0000000000..9ae658eecb --- /dev/null +++ b/docs/manual/manual.txt @@ -0,0 +1,40 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +The Buildroot user manual +========================= +:toc: + +Buildroot usage and documentation by Thomas Petazzoni. Contributions +from Karsten Kruse, Ned Ludd, Martin Herren and others. + +Buildroot {sys:echo $\{BR2_VERSION%%-git*\}} manual generated on {docdate} +{doctime} from git revision {sys:git rev-parse --short HEAD} + +image::logo.png[] + +:leveloffset: 1 + +include::introduction.txt[] + +include::starting-up.txt[] + +include::working-with.txt[] + +include::faq-troubleshooting.txt[] + +include::known-issues.txt[] + +include::going-further.txt[] + +include::developer-guide.txt[] + +include::legal-notice.txt[] + +include::beyond-buildroot.txt[] + +include::get-involved.txt[] + +include::contribute.txt[] + +include::appendix.txt[] diff --git a/docs/manual/package-make-target.txt b/docs/manual/package-make-target.txt new file mode 100644 index 0000000000..dc9d31072e --- /dev/null +++ b/docs/manual/package-make-target.txt @@ -0,0 +1,80 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[pkg-build-steps]] + +Package-specific _make_ targets +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Running +make + builds and installs that particular package +and its dependencies. + +For packages relying on the Buildroot infrastructure, there are +numerous special make targets that can be called independently like +this: + +------------ +make - +------------ + +The package build targets are (in the order they are executed): + +[width="90%",cols="^1,4",options="header"] +|=================================================== +| command/target | Description + +| +source+ | Fetch the source (download the tarball, clone +the source repository, etc) + +| +depends+ | Build and install all dependencies required to +build the package + +| +extract+ | Put the source in the package build directory +(extract the tarball, copy the source, etc) + +| +patch+ | Apply the patches, if any + +| +configure+ | Run the configure commands, if any + +| +build+ | Run the compilation commands + +| +install-staging+ | +*target package:* Run the installation of the package in the +staging directory, if necessary + +| +install-target+ | +*target package:* Run the installation of the package in the +target directory, if necessary + +| +install+ | +*target package:* Run the 2 previous installation commands + +*host package:* Run the installation of the package in the host +directory + +|=================================================== + +Additionally, there are some other useful make targets: + +[width="90%",cols="^1,4",options="header"] +|=================================================== +| command/target | Description + +| +show-depends+ | Displays the dependencies required to build the +package + +| +clean+ | Run the clean command of the package, also +uninstall the package from both the target and the staging directory; _note +that this is not implemented for all packages_ + +| +dirclean+ | Remove the whole package build directory + +| +rebuild+ | Re-run the compilation commands - this only makes +sense when using the +OVERRIDE_SRCDIR+ feature or when you modified a file +directly in the build directory + +| +reconfigure+ | Re-run the configure commands, then rebuild - this only +makes sense when using the +OVERRIDE_SRCDIR+ feature or when you modified a +file directly in the build directory + +|=================================================== diff --git a/docs/manual/patch-policy.txt b/docs/manual/patch-policy.txt new file mode 100644 index 0000000000..d9bc8ca852 --- /dev/null +++ b/docs/manual/patch-policy.txt @@ -0,0 +1,148 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[patch-policy]] + +Patching a package +------------------ + +While integrating a new package or updating an existing one, it may be +necessary to patch the source of the software to get it cross-built within +Buildroot. + +Buildroot offers an infrastructure to automatically handle this during +the builds. It supports three ways of applying patch sets: downloaded patches, +patches supplied within buildroot and patches located in a user-defined +global patch directory. + +Providing patches +~~~~~~~~~~~~~~~~~ + +Downloaded +^^^^^^^^^^ + +If it is necessary to apply a patch that is available for download, then add it +to the +_PATCH+ variable. It is downloaded from the same site +as the package itself. It can be a single patch, or a tarball containing a +patch series. + +This method is typically used for packages from Debian. + +Within Buildroot +^^^^^^^^^^^^^^^^ + +Most patches are provided within Buildroot, in the package +directory; these typically aim to fix cross-compilation, libc support, +or other such issues. + +These patch files should be named +--.patch+. + +A +series+ file, as used by +quilt+, may also be added in the +package directory. In that case, the +series+ file defines the patch +application order. + +.Notes +- The patch files coming with Buildroot should not contain any package version +reference in their filename. +- The field ++ in the patch file name refers to the 'apply order'. + +Global patch directory +^^^^^^^^^^^^^^^^^^^^^^ + +The +BR2_GLOBAL_PATCH_DIR+ configuration file option can be +used to specify a directory containing global package patches. See +xref:packages-custom[] for details. + + +How patches are applied +~~~~~~~~~~~~~~~~~~~~~~~ + +. Run the +_PRE_PATCH_HOOKS+ commands if defined; + +. Cleanup the build directory, removing any existing +*.rej+ files; + +. If +_PATCH+ is defined, then patches from these + tarballs are applied; + +. If there are some +*.patch+ files in the package directory or in the + a package subdirectory named ++, then: ++ +* If a +series+ file exists in the package directory, then patches are + applied according to the +series+ file; ++ +* Otherwise, patch files matching +-*.patch+ + are applied in alphabetical order. + So, to ensure they are applied in the right order, it is hightly + recommended to named the patch files like this: + +--.patch+, where ++ + refers to the 'apply order'. + +. Run the +_POST_PATCH_HOOKS+ commands if defined. + +If something goes wrong in the steps _3_ or _4_, then the build fails. + +Format and licensing of the package patches +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Patches are released under the same license as the software that is +modified. + +A message explaining what the patch does, and why it is needed, should +be added in the header commentary of the patch. + +You should add a +Signed-off-by+ statement in the header of the each +patch to help with keeping track of the changes and to certify that the +patch is released under the same license as the software that is modified. + +If the software is under version control, it is recommended to use the +upstream SCM software to generate the patch set. + +Otherwise, concatenate the header with the output of the ++diff -purN package-version.orig/ package-version/+ command. + +At the end, the patch should look like: + +--------------- +configure.ac: add C++ support test + +Signed-off-by: John Doe + +--- configure.ac.orig ++++ configure.ac +@@ -40,2 +40,12 @@ + +AC_PROG_MAKE_SET ++ ++AC_CACHE_CHECK([whether the C++ compiler works], ++ [rw_cv_prog_cxx_works], ++ [AC_LANG_PUSH([C++]) ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], ++ [rw_cv_prog_cxx_works=yes], ++ [rw_cv_prog_cxx_works=no]) ++ AC_LANG_POP([C++])]) ++ ++AM_CONDITIONAL([CXX_WORKS], [test "x$rw_cv_prog_cxx_works" = "xyes"]) +--------------- + +Integrating patches found on the Web +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When integrating a patch of which you are not the author, you have to +add a few things in the header of the patch itself. + +Depending on whether the patch has been obtained from the project +repository itself, or from somewhere on the web, add one of the +following tags: + +--------------- +Backported from: +--------------- + +or + +--------------- +Fetch from: +--------------- + +It is also sensible to add a few words about any changes to the patch +that may have been necessary. diff --git a/docs/manual/prerequisite.txt b/docs/manual/prerequisite.txt new file mode 100644 index 0000000000..adc23eec51 --- /dev/null +++ b/docs/manual/prerequisite.txt @@ -0,0 +1,82 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[requirement]] +System requirements +------------------- + +Buildroot is designed to run on Linux systems. + +Buildroot needs some software to be already installed on the host +system; here are the lists of the mandatory and optional packages +(package names may vary between distributions). + +Take care to _install both runtime and development data_, especially +for the libraries that may be packaged in 2 distinct packages. + + +[[requirement-mandatory]] + +Mandatory packages +~~~~~~~~~~~~~~~~~~ + +* Build tools: + +** +which+ +** +sed+ +** +make+ (version 3.81 or any later) +** +binutils+ +** +build-essential+ (only for Debian based systems) +** +gcc+ (version 2.95 or any later) +** `g++` (version 2.95 or any later) +** +bash+ +** +patch+ +** +gzip+ +** +bzip2+ +** +perl+ (version 5.8.7 or any later) +** +tar+ +** +cpio+ +** +python+ (version 2.6 or 2.7) +** +unzip+ +** +rsync+ + +* Source fetching tools: +** +wget+ + +[[requirement-optional]] + +Optional packages +~~~~~~~~~~~~~~~~~ + +* Source fetching tools: ++ +In the official tree, most of the package sources are retrieved +using +wget+; a few are only available through their +git+, +mercurial+, ++svn+ or +cvs+ repository. ++ +All other source fetching methods are implemented and may be used in a +development context (further details: refer to xref:download-infra[]). ++ +** +bazaar+ +** +cvs+ +** +git+ +** +mercurial+ +** +rsync+ +** +scp+ +** +subversion+ + +* Configuration interface dependencies (requires development libraries): +** +ncurses5+ to use the 'menuconfig' interface +** +qt4+ to use the 'xconfig' interface +** +glib2+, +gtk2+ and +glade2+ to use the 'gconfig' interface + +* Java-related packages, if the Java Classpath needs to be built for + the target system: +** The +javac+ compiler +** The +jar+ tool + +* Documentation generation tools: +** +asciidoc+, version 8.6.3 or higher +** +w3m+ +** +python+ with the +argparse+ module (automatically present in 2.7+ and 3.2+) +** +dblatex+ (required for the pdf manual only) diff --git a/docs/manual/rebuilding-packages.txt b/docs/manual/rebuilding-packages.txt new file mode 100644 index 0000000000..88d667015d --- /dev/null +++ b/docs/manual/rebuilding-packages.txt @@ -0,0 +1,76 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[full-rebuild]] +Understanding when a full rebuild is necessary +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A full rebuild is achieved by running: + +--------------- +$ make clean all +--------------- + +In some cases, a full rebuild is mandatory: + +* each time the toolchain properties are changed, this includes: + +** after changing any toolchain option under the _Toolchain_ menu (if + the internal Buildroot backend is used); +** after running +make uclibc-menuconfig+. + +* after removing some libraries from the package selection. + +In some cases, a full rebuild is recommended: + +* after adding some libraries to the package selection (otherwise, + packages that can be optionally linked against those libraries + won't be rebuilt, so they won't support those new available + features). + +In other cases, it is up to you to decide if you should run a +full rebuild, but you should know what is impacted and understand what +you are doing anyway. + +[[rebuild-pkg]] +Understanding how to rebuild packages +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +One of the most common questions asked by Buildroot users is how to +rebuild a given package or how to remove a package without rebuilding +everything from scratch. + +Removing a package is unsupported by Buildroot without +rebuilding from scratch. This is because Buildroot doesn't keep track +of which package installs what files in the +output/staging+ and ++output/target+ directories, or which package would be compiled differently +depending on the availability of another package. + +The easiest way to rebuild a single package from scratch is to remove +its build directory in +output/build+. Buildroot will then re-extract, +re-configure, re-compile and re-install this package from scratch. You +can ask buildroot to do this with the +make -dirclean+ command. + +For convenience, the special make targets +-reconfigure and -rebuild repeat the configure +resp. build steps. + +However, if you don't want to rebuild the package completely from +scratch, a better understanding of the Buildroot internals is +needed. Internally, to keep track of which steps have been done and +which steps remain to be done, Buildroot maintains stamp files (empty +files that just tell whether this or that action has been done): + +* +output/build/-/.stamp_configured+. If removed, + Buildroot will trigger the recompilation of the package from the + configuration step (execution of +./configure+). + +* +output/build/-/.stamp_built+. If removed, + Buildroot will trigger the recompilation of the package from the + compilation step (execution of +make+). + +Note: toolchain packages use custom makefiles. Their stamp files are named +differently. + +Further details about package special make targets are explained in +xref:pkg-build-steps[]. diff --git a/docs/manual/starting-up.txt b/docs/manual/starting-up.txt new file mode 100644 index 0000000000..7326f60c77 --- /dev/null +++ b/docs/manual/starting-up.txt @@ -0,0 +1,12 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Starting up +=========== + +include::prerequisite.txt[] + +include::getting.txt[] + +include::using.txt[] + diff --git a/docs/manual/using-buildroot-toolchain.txt b/docs/manual/using-buildroot-toolchain.txt new file mode 100644 index 0000000000..b4db686256 --- /dev/null +++ b/docs/manual/using-buildroot-toolchain.txt @@ -0,0 +1,23 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Using the generated toolchain outside Buildroot +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You may want to compile, for your target, your own programs or other +software that are not packaged in Buildroot. In order to do this you +can use the toolchain that was generated by Buildroot. + +The toolchain generated by Buildroot is located by default in ++output/host/+. The simplest way to use it is to add ++output/host/usr/bin/+ to your PATH environment variable and then to +use +ARCH-linux-gcc+, +ARCH-linux-objdump+, +ARCH-linux-ld+, etc. + +It is possible to relocate the toolchain - but then +--sysroot+ must +be passed every time the compiler is called to tell where the +libraries and header files are. + +It is also possible to generate the Buildroot toolchain in a directory +other than +output/host+ by using the +Build options -> Host dir+ +option. This could be useful if the toolchain must be shared with +other users. diff --git a/docs/manual/using.txt b/docs/manual/using.txt new file mode 100644 index 0000000000..de29ad6b57 --- /dev/null +++ b/docs/manual/using.txt @@ -0,0 +1,113 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Using Buildroot +--------------- + +Buildroot has a nice configuration tool similar to the one you can +find in the http://www.kernel.org/[Linux kernel] or in +http://www.busybox.net/[Busybox]. Note that you can *and should build +everything as a normal user*. There is no need to be root to configure +and use Buildroot. The first step is to run the configuration +assistant: + +-------------------- + $ make menuconfig +-------------------- + +to run the curses-based configurator, or + +-------------------- + $ make xconfig +-------------------- + +or + +-------------------- + $ make gconfig +-------------------- + +to run the Qt or GTK-based configurators. + +All of these "make" commands will need to build a configuration +utility (including the interface), so you may need to install +"development" packages for relevant libraries used by the +configuration utilities. Check xref:requirement[] to know what +Buildroot needs, and specifically the xref:requirement-optional[optional requirements] +to get the dependencies of your favorite interface. + +For each menu entry in the configuration tool, you can find associated +help that describes the purpose of the entry. + +Once everything is configured, the configuration tool generates a ++.config+ file that contains the description of your +configuration. It will be used by the Makefiles to do what's needed. + +Let's go: + +-------------------- + $ make +-------------------- + +You *should never* use +make -jN+ with Buildroot: it does not support +'top-level parallel make'. Instead, use the +BR2_JLEVEL+ option to +tell Buildroot to run each package compilation with +make -jN+. + +The `make` command will generally perform the following steps: + +* download source files (as required); +* configure, build and install the cross-compiling toolchain using the + appropriate toolchain backend, or simply import an external toolchain; +* build/install selected target packages; +* build a kernel image, if selected; +* build a bootloader image, if selected; +* create a root filesystem in selected formats. + +Buildroot output is stored in a single directory, +output/+. +This directory contains several subdirectories: + +* +images/+ where all the images (kernel image, bootloader and root + filesystem images) are stored. + +* +build/+ where all the components except for the cross-compilation + toolchain are built (this includes tools needed to run Buildroot on + the host and packages compiled for the target). The +build/+ + directory contains one subdirectory for each of these components. + +* +staging/+ which contains a hierarchy similar to a root filesystem + hierarchy. This directory contains the installation of the + cross-compilation toolchain and all the userspace packages selected + for the target. However, this directory is 'not' intended to be + the root filesystem for the target: it contains a lot of development + files, unstripped binaries and libraries that make it far too big + for an embedded system. These development files are used to compile + libraries and applications for the target that depend on other + libraries. + +* +target/+ which contains 'almost' the complete root filesystem for + the target: everything needed is present except the device files in + +/dev/+ (Buildroot can't create them because Buildroot doesn't run + as root and doesn't want to run as root). Also, it doesn't have the correct + permissions (e.g. setuid for the busybox binary). Therefore, this directory + *should not be used on your target*. Instead, you should use one of + the images built in the +images/+ directory. If you need an + extracted image of the root filesystem for booting over NFS, then + use the tarball image generated in +images/+ and extract it as + root. Compared to +staging/+, +target/+ contains only the files and + libraries needed to run the selected target applications: the + development files (headers, etc.) are not present, the binaries are + stripped. + +* +host/+ contains the installation of tools compiled for the host + that are needed for the proper execution of Buildroot, including the + cross-compilation toolchain. + +* +toolchain/+ contains the build directories for the various + components of the cross-compilation toolchain. + +These commands, +make menuconfig|gconfig|xconfig+ and +make+, are the +basic ones that allow to easily and quickly generate images fitting +your needs, with all the supports and applications you enabled. + +More details about the "make" command usage are given in +xref:make-tips[]. diff --git a/docs/manual/working-with.txt b/docs/manual/working-with.txt new file mode 100644 index 0000000000..4432b548db --- /dev/null +++ b/docs/manual/working-with.txt @@ -0,0 +1,29 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Working with Buildroot +====================== + +This section explains how you can customize Buildroot to fit your +needs. + +include::configure.txt[] + +include::make-tips.txt[] + +include::customize.txt[] + +include::common-usage.txt[] + +include::eclipse-integration.txt[] + +Hacking Buildroot +----------------- + +If Buildroot does not yet fit all your requirements, you may be +interested in hacking it to add: + +* new packages: refer to the xref:adding-packages[Developer guide] + +* new board support: refer to the + xref:customize-store-board-support[Developer guide]. diff --git a/docs/manual/writing-rules.txt b/docs/manual/writing-rules.txt new file mode 100644 index 0000000000..b649c9fd8b --- /dev/null +++ b/docs/manual/writing-rules.txt @@ -0,0 +1,151 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Coding style +------------ + +Overall, these coding style rules are here to help you to add new files in +Buildroot or refactor existing ones. + +If you slightly modify some existing file, the important thing is +to keep the consistency of the whole file, so you can: + +* either follow the potentially deprecated coding style used in this +file, + +* or entirely rework it in order to make it comply with these rules. + +[[writing-rules-config-in]] + ++Config.in+ file +~~~~~~~~~~~~~~~~ + ++Config.in+ files contain entries for almost anything configurable in +Buildroot. + +An entry has the following pattern: + +--------------------- +config BR2_PACKAGE_LIBFOO + bool "libfoo" + depends on BR2_PACKAGE_LIBBAZ + select BR2_PACKAGE_LIBBAR + help + This is a comment that explains what libfoo is. + + http://foosoftware.org/libfoo/ +--------------------- + +* The +bool+, +depends on+, +select+ and +help+ lines are indented + with one tab. + +* The help text itself should be indented with one tab and two + spaces. + +The +Config.in+ files are the input for the configuration tool +used in Buildroot, which is the regular _Kconfig_. For further +details about the _Kconfig_ language, refer to +http://kernel.org/doc/Documentation/kbuild/kconfig-language.txt[]. + +[[writing-rules-mk]] + +The +.mk+ file +~~~~~~~~~~~~~~ + +* Header: The file starts with a header. It contains the module name, +preferably in lowercase, enclosed between separators made of 80 hashes. A +blank line is mandatory after the header: ++ +--------------------- +################################################################################ +# +# libfoo +# +################################################################################ +--------------------- ++ +* Assignment: use +=+ preceded and followed by one space: ++ +--------------------- +LIBFOO_VERSION = 1.0 +LIBFOO_CONF_OPT += --without-python-support +--------------------- ++ +It is also possible to align the +=+ signs: ++ +--------------------- +LIBFOO_VERSION = 1.0 +LIBFOO_SOURCE = foo-$(LIBFOO_VERSION).tar.gz +LIBFOO_CONF_OPT += --without-python-support +--------------------- + +* Indentation: use tab only: ++ +--------------------- +define LIBFOO_REMOVE_DOC + $(RM) -fr $(TARGET_DIR)/usr/share/libfoo/doc \ + $(TARGET_DIR)/usr/share/man/man3/libfoo* +endef +--------------------- ++ +Note that commands inside a +define+ block should always start with a tab, +so _make_ recognizes them as commands. + +* Optional dependency: + +** Prefer multi-line syntax. ++ +YES: ++ +--------------------- +ifeq ($(BR2_PACKAGE_PYTHON),y) +LIBFOO_CONF_OPT += --with-python-support +LIBFOO_DEPENDENCIES += python +else +LIBFOO_CONF_OPT += --without-python-support +endif +--------------------- ++ +NO: ++ +--------------------- +LIBFOO_CONF_OPT += --with$(if $(BR2_PACKAGE_PYTHON),,out)-python-support +LIBFOO_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON),python,) +--------------------- + +** Keep configure options and dependencies close together. + +* Optional hooks: keep hook definition and assignment together in one + if block. ++ +YES: ++ +--------------------- +ifneq ($(BR2_LIBFOO_INSTALL_DATA),y) +define LIBFOO_REMOVE_DATA + $(RM) -fr $(TARGET_DIR)/usr/share/libfoo/data +endef +LIBFOO_POST_INSTALL_TARGET_HOOKS += LIBFOO_REMOVE_DATA +endif +--------------------- ++ +NO: ++ +--------------------- +define LIBFOO_REMOVE_DATA + $(RM) -fr $(TARGET_DIR)/usr/share/libfoo/data +endef + +ifneq ($(BR2_LIBFOO_INSTALL_DATA),y) +LIBFOO_POST_INSTALL_TARGET_HOOKS += LIBFOO_REMOVE_DATA +endif +--------------------- + +The documentation +~~~~~~~~~~~~~~~~~ + +The documentation uses the +http://www.methods.co.nz/asciidoc/[asciidoc] format. + +For further details about the http://www.methods.co.nz/asciidoc/[asciidoc] +syntax, refer to http://www.methods.co.nz/asciidoc/userguide.html[]. diff --git a/docs/news.html b/docs/news.html index f642024e17..efa8fd1528 100644 --- a/docs/news.html +++ b/docs/news.html @@ -5,12 +5,670 @@

    News

      +
    • 30 November 2013 -- 2013.11 released + +

      The stable 2013.11 release is out - Thanks to everyone + contributing and testing the release candidates. See the + CHANGES + file for more details + and go to the downloads page to pick up the + 2013.11 release.

      + +
    • 30 November 2013 -- Slides from Embedded Linux Conference Europe + +

      The slides from the Buildroot presentation at the recent + Embedded Linux Conference Europe 2013 + are now + available.

      + +
    • 18 November 2013 -- 2013.11-rc3 released + +

      Another week, another release candidate with more fixes. See the CHANGES + file for details.

      + +

      Head to the downloads page to pick up the + 2013.11-rc3 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 18 November 2013 -- 2013.11-rc2 released + +

      Another week, another release candidate with more cleanups and + build fixes. See the CHANGES + file for details.

      + +

      Head to the downloads page to pick up the + 2013.11-rc2 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 13 November 2013 -- Announcement of the next Buildroot Developer Days + +

      The next Buildroot Developer Days meeting will take + place on Monday 3rd and Tuesday 4th February 2014 in Brussels, + Belgium - Just after + FOSDEM (February + 1st/2nd). This two days meeting is mainly open to Buildroot + developers and contributors, or Buildroot users having a prior + experience with the tool. It will allow developers to work on + Buildroot and discuss current issues, the future directions, and + more.

      + +

      In addition to the Buildroot event, we encourage embedded Linux + developers to propose talks for the Embedded and Mobile Developer + Room at FOSDEM. See + the CFP.

      + +

      We would like to thank our + sponsor Google for sponsoring + the event by providing all the needed logistics.

      + +

      For more details, see the + wiki + page dedicated to the meeting.

      + +
    • 12 November 2013 -- 2013.11-rc1 released + +

      We have a new release candidate! Lots of changes all over the + tree, see the CHANGES + file for details, and read the + announcement.

      + +

      Head to the downloads page to pick up the + 2013.11-rc1 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 11 November 2013 -- Report from Buildroot Developers Meeting + +

      A report from the recent + + Buildroot Developers Meeting is now + available.

      + +

      Once again, thanks to all the participants and to + Imagination Technologies + for sponsoring the event.

      + +
    • 17 September 2013 -- 2013.08.1 released + +

      The 2013.08.1 bugfix release is out - Thanks to everyone + contributing. This release fixes critical issues discovered since + the 2013.08 release. See the + CHANGES + file for more details, + and go to the downloads page to pick up the + 2013.08.1 release.

      + +
    • 16 September 2013 -- Buildroot Developer Days + +

      The next Buildroot Developer Days meeting will take + place on Saturday October 26th and Sunday October 27th 2013 in + Edinburgh, UK - Just after the + Embedded Linux Conference Europe (October 23th-24th). This two + days meeting is mainly open to Buildroot developers and + contributors, or Buildroot users having a prior experience with + the tool. It will allow developers to work on Buildroot and + discuss current issues, the future directions, and more.

      + +

      For more details, see the + wiki + page dedicated to the meeting.

      + +
    • 31 August 2013 -- 2013.08 released + +

      The stable 2013.08 release is out - Thanks to everyone + contributing and testing the release candidates. See the + CHANGES + file for more details, read the announcement + and go to the downloads page to pick up the + 2013.08 release.

      + +
    • 29 August 2013 -- 2013.08-rc3 released + +

      Another week, another release candidate with more cleanups and + build fixes. See the CHANGES + file for details.

      + +

      Head to the downloads page to pick up the + 2013.08-rc3 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 16 August 2013 -- 2013.08-rc2 released + +

      We have a new release candidate! Lots of changes all over the + tree, see + the CHANGES + file for details.

      + +

      Head to the downloads page to pick up the + 2013.08-rc2 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 5 August 2013 -- 2013.08-rc1 released + +

      We have a new release candidate! Lots of changes all over the + tree, see + the CHANGES + file for details.

      + +

      Head to the downloads page to pick up the + 2013.08-rc1 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 31 May 2013 -- 2013.05 released + +

      The stable 2013.05 release is out - Thanks to everyone + contributing and testing the release candidates. See the + CHANGES + file for more details, read the + announcement + and go to the downloads page to pick up the + 2013.05 release.

      + +
    • 25 May 2013 -- 2013.05-rc3 released + +

      Another week, another release candidate with more cleanups and + build fixes. See the CHANGES + file for details.

      + +

      Head to the downloads page to pick up the + 2013.05-rc3 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 15 May 2013 -- 2013.05-rc2 released + +

      Another week, another release candidate with more cleanups and + build fixes. See the CHANGES + file for details.

      + +

      Head to the downloads page to pick up the + 2013.05-rc2 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 8 May 2013 -- 2013.05-rc1 released + +

      We have a new release candidate! Lots of changes all over the + tree, see the CHANGES + file for details, and read the + announcement.

      + +

      Head to the downloads page to pick up the + 2013.05-rc1 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 28 February 2013 -- 2013.02 released + +

      The stable 2013.02 release is out - Thanks to everyone + contributing and testing the release candidates. See the + CHANGES + file for more details + and go to the downloads page to pick up the + 2013.02 release.

      + +
    • 26 February 2013 -- 2013.02-rc3 released + +

      Another week, another release candidate with more cleanups and + build fixes. See the CHANGES + file for details.

      + +

      Head to the downloads page to pick up the + 2013.02-rc3 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 19 February 2013 -- 2013.02-rc2 released + +

      Another week, another release candidate with more cleanups and + build fixes. See the CHANGES + file for details.

      + +

      Head to the downloads page to pick up the + 2013.02-rc2 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 10 February 2013 -- 2013.02-rc1 released + +

      We have a new release candidate! Lots of changes all over the + tree, see the CHANGES + file for details, and read the + announcement.

      + +

      Head to the downloads page to pick up the + 2013.02-rc1 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 10 February 2013 -- Report from Buildroot Developers Meeting + +

      A report from the recent Buildroot Developers Meeting is now + available. + Embedded Linux News also has a + + writeup about the event, including photos.

      + +

      Once again, thanks to all the participants and to + Google for sponsoring the event.

      + +
    • 12 January 2013 -- Next Buildroot Developers Meeting next to FOSDEM, Brussels + +

      The next Buildroot Developers Meeting will take place on Monday + 4th February 2013 and Tuesday 5th February 2013 in Brussels, + Belgium. Those dates have been chosen to immediately follow the + great FOSDEM conference.

      + +

      Attending this meeting is free, after registration by + contacting Thomas + Petazzoni. For more details about the meeting, please see + the related + Wiki page.

      + +

      We would like to + thank Google for providing the + meeting location and the Internet connection, and offering free + lunch and refreshments to the participants.

      + +
    • 3 January 2013 -- 2012.11.1 released + +

      The 2012.11.1 bugfix release is out - Thanks to everyone + contributing. This release fixes critical issues discovered since + the 2012.11 release, most importantly with non-largefile builds on + recent Ubuntu versions. See the + CHANGES + file for more details, + and go to the downloads page to pick up the + 2012.11.1 release.

      + +
    • 2 December 2012 -- 2012.11 released + +

      The stable 2012.11 release is out - Thanks to everyone + contributing and testing the release candidates. See the + CHANGES + file for more details + and go to the downloads page to pick up the + 2012.11 release.

      + +
    • 30 November 2012 -- 2012.11-rc2 released + +

      RC2 is out with more bugfixes - See the CHANGES + file for details. + +

      Head to the downloads page to pick up the + 2012.11-rc2 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 17 November 2012 -- 2012.11-rc1 released + +

      We have a new release candidate! Lots of changes all over the + tree, see the CHANGES + file for details, and read the + announcement.

      + +

      Head to the downloads page to pick up the + 2012.11-rc1 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 17 November 2012 -- Buildroot Developer Day + +

      A report from the recent Buildroot Developer Days meeting + in Barcelona, Spain is now available. + Many thanks to all the participants, and a special thanks to Arnout + Vandecappelle from mind for taking + notes and Thomas Petazzoni from Free Electrons for handling + all the practical arrangements, and naturally our sponsors, Fluendo and Synopsis. +

      +

      The next Developer Days will take place on February 4th and 5th + in Brussels, Belgium, right after FOSDEM.

      + +
    • 31 August 2012 -- 2012.08 released + +

      The stable 2012.08 release is out - Thanks to everyone + contributing and testing the release candidates. See the + CHANGES + file for more details and go to the downloads page to pick up the + 2012.08 release.

      + +
    • 25 August 2012 -- 2012.08-rc3 released + +

      We have a new release candidate! Various fixes, and addition + of licensing informations on many + packages. See CHANGES + file for details

      + +

      Head to the downloads page to pick up the + 2012.08-rc3 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 15 August 2012 -- 2012.08-rc2 released + +

      We have a new release candidate! Various fixes, and addition + of licensing informations on many + packages. See CHANGES + file for details

      + +

      Head to the downloads page to pick up the + 2012.08-rc2 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 1 August 2012 -- 2012.08-rc1 released + +

      We have a new release candidate! Lots of changes all over the + tree, see the CHANGES + file for details

      + +

      Head to the downloads page to pick up the + 2012.08-rc1 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 22 July 2012 -- Buildroot Developer Day + +

      The next Buildroot Developer Day meeting will take place + on Saturday November 3th and Sunday November 4th 2012 in + Barcelona, Spain, just before + the Embedded + Linux Conference Europe (November 5th-7th). This two days + meeting is mainly opened to Buildroot developers and contributors, + or Buildroot users having a prior experience with the tool. This + meeting will allow developers to work and Buildroot, and discuss + current issues, the future directions, and more.

      + +

      For more details, see + the wiki + page dedicated to the meeting.

      + +
    • 30 May 2012 -- 2012.05 released + +

      The stable 2012.05 release is out - Thanks to everyone + contributing and testing the release candidates. See the + CHANGES + file for more details, read the + announcement + and go to the downloads page to pick up the + 2012.05 release.

      + +
    • 25 May 2012 -- 2012.05-rc3 released + +

      RC3 is out with more bugfixes - See the CHANGES + file for details. + +

      Head to the downloads page to pick up the + 2012.05-rc3 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 18 May 2012 -- 2012.05-rc2 released + +

      Another week, another release candidate with more cleanups and + build fixes. See the CHANGES + file for details.

      + +

      Head to the downloads page to pick up the + 2012.05-rc2 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 10 May 2012 -- 2012.05-rc1 released + +

      We have a new release candidate! Lots of changes all over the + tree, see the CHANGES + file for details, and read the + announcement.

      + +

      Head to the downloads page to pick up the + 2012.05-rc1 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 20 April 2012 -- Autobuilder Results Online + +

      The status of the autobuilders, which do repeated + randpackageconfig builds for continuous integration + testing, is now online at autobuild.buildroot.org. The + code behind it can be found in git.

      + +

      Thanks to Thomas Petazzoni for running the web interface, and + to The GCC Compile + Farm and Free + Electrons for hosting builders. Thomas also sends out a daily + summary of the build status to the mailing list.

      + +
    • 29 February 2012 -- 2012.02 released + +

      The stable 2012.02 release is out - Thanks to everyone + contributing and testing the release candidates. See the + CHANGES + file for more details, read the + announcement + and go to the downloads page to pick up the + 2012.02 release.

      + +
    • 27 February 2012 -- 2012.02-rc3 released + +

      RC3 is out with more bugfixes - See the CHANGES + file for details. + +

      Head to the downloads page to pick up the + 2012.02-rc3 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 19 February 2012 -- 2012.02-rc2 released + +

      Another week, another release candidate with more cleanups and + build fixes. See the CHANGES + file for details.

      + +

      Head to the downloads page to pick up the + 2012.02-rc2 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 12 February 2012 -- 2012.02-rc1 released + +

      We have a new release candidate! Lots of changes all over the + tree, see the CHANGES + file for details, and read the + announcement.

      + +

      Head to the downloads page to pick up the + 2012.02-rc1 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 31 January 2012 -- Buildroot Developer Day + +

      Another Buildroot Developer Day will take place on + Friday, February 3rd in Brussels, Belgium - The day before FOSDEM. See the + announcement + or the Free Electrons blog + for more info.

      + +
    • 30 November 2011 -- 2011.11 released + +

      The stable 2011.11 release is out - Thanks to everyone + contributing and testing the release candidates. See the + CHANGES + file for more details, read the + announcement + and go to the downloads page to pick up the + 2011.11 release.

      + +
    • 26 November 2011 -- 2011.11-rc3 released + +

      RC3 is out with more bugfixes - See the CHANGES + file for details. + +

      Head to the downloads page to pick up the + 2011.11-rc3 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 18 November 2011 -- 2011.11-rc2 released + +

      Another week, another release candidate with a bunch of + cleanups and build fixes. See the CHANGES + file for details.

      + +

      Head to the downloads page to pick up the + 2011.11-rc2 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 11 November 2011 -- 2011.11-rc1 released + +

      We have a new release candidate! Lots of changes all over the + tree, see the CHANGES + file for details, and read the + announcement + +

      Head to the downloads page to pick up the + 2011.11-rc1 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 31 August 2011 -- 2011.08 released + +

      The stable 2011.08 release is out - Thanks to everyone + contributing and testing the release candidates. See the + CHANGES + file for more details, and go to the downloads page to pick up the + 2011.08 release.

      + +
    • 29 August 2011 -- 2011.08-rc2 released + +

      RC2 is out with more bugfixes. See the CHANGES + file for details, and read the + announcement. + +

      Head to the downloads page to pick up the + 2011.08-rc2 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 4 August 2011 -- 2011.08-rc1 released + +

      We have a new release candidate! Lots of changes all over the + tree, see the CHANGES + file for details, and read the + announcement. + +

      Head to the downloads page to pick up the + 2011.08-rc1 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 27 May 2011 -- 2011.05 released + +

      The stable 2011.05 release is out - Thanks to everyone + contributing and testing the release candidates. See the + CHANGES + file for more details, and go to the downloads page to pick up the + 2011.05 release.

      + +
    • 24 May 2011 -- 2011.05-rc2 released + +

      RC2 is out with more bugfixes. See the CHANGES + file for details. + +

      Head to the downloads page to pick up the + 2011.05-rc2 + release candidate, and report any problems found to the mailing list or bug tracker.

      + +
    • 18 May 2011 -- 2011.05-rc1 released + +

      We have a new release candidate! Lots of changes all over the + tree, see the CHANGES + file for details, and read the + announcement. + +

      Head to the downloads page to pick up the + 2011.05-rc1 + release candidate, and report any problems found to the mailing list or bug tracker.

      +
    • 28 February 2011 -- 2011.02 released

      The stable 2011.02 release is out - Thanks to everyone contributing and testing the release candidates. See the CHANGES - file for more details, + file for more details, read the + announcement and go to the downloads page to pick up the 2011.02 release.

      diff --git a/docs/robots.txt b/docs/robots.txt new file mode 100644 index 0000000000..1b425ee0f5 --- /dev/null +++ b/docs/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: /cgi-bin/ diff --git a/docs/sponsors.html b/docs/sponsors.html new file mode 100644 index 0000000000..a048b1db01 --- /dev/null +++ b/docs/sponsors.html @@ -0,0 +1,41 @@ + + +

      Sponsors

      + +

      Throughout its history, the Buildroot project has been sponsored by +various companies, that we would like to thank below:

      + +
        + +
      • Google, for providing all + the logistics for the FOSDEM 2013 and FOSDEM 2014 Developer Days in + Brussels, Belgium.
      • + +
      • Imagination Technologies, + for sponsoring the meeting room and dinner of the ELCE 2013 + Developer Days in Edinburgh, UK.
      • + +
      • CircuitCo, for sponsoring + several development boards for the Google Summer of Code 2013 + project on Buildroot.
      • + +
      • BoundaryDevices, for + sponsoring an i.MX6 development board for the Google Summer of Code + 2013 project on Buildroot.
      • + +
      • Fluendo, for sponsoring + the meeting room for the ELCE 2012 Developer Days in Barcelona + Spain.
      • + +
      • Synopsys, for sponsoring + the dinner for the ELCE 2012 Developer Days in Barcelona, + Spain.
      • + +
      • Calao Systems + and Free Electrons for + providing a meeting room and offering lunch for the ELCE 2009 + Developer Days in Grenoble, France.
      • + +
      + + diff --git a/fs/Config.in b/fs/Config.in index 78718c016b..e8aa5d49cc 100644 --- a/fs/Config.in +++ b/fs/Config.in @@ -1,83 +1,16 @@ -menu "Target filesystem options" +menu "Filesystem images" -config BR2_ROOTFS_POST_BUILD_SCRIPT - string "Custom script to run before packing files" - default "" - help - Specify a script to be run after the build has finished and before - the BR2 starts packing the files into selected packages. - - This gives users the oportunity to do board-specific cleanups, - add-ons and the like, so the generated files can be used directly - without further processing. - - The script is called with the target directory name as first and - only argument. Make sure the exit code of that script is 0, - otherwise make will stop after calling it. - -choice - prompt "/dev management" - default BR2_ROOTFS_DEVICE_CREATION_STATIC - -config BR2_ROOTFS_DEVICE_CREATION_STATIC - bool "Static using device table" - -config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS - bool "Dynamic using devtmpfs only" - -config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV - bool "Dynamic using mdev" - select BR2_PACKAGE_BUSYBOX - -config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV - bool "Dynamic using udev" - select BR2_PACKAGE_UDEV - -endchoice - -config BR2_ROOTFS_DEVICE_TABLE - string "Path to the device table" - depends on BR2_ROOTFS_DEVICE_CREATION_STATIC - default "target/generic/device_table.txt" - help - Specify the location of a device table, that will be passed - to the makedevs utility to create all the special device - files in the target filesystem. - -choice - prompt "Root FS skeleton" - -config BR2_ROOTFS_SKELETON_DEFAULT - bool "default target skeleton" - help - Use default target skeleton - -config BR2_ROOTFS_SKELETON_CUSTOM - bool "custom target skeleton" - help - Use custom target skeleton. - -endchoice - -if BR2_ROOTFS_SKELETON_CUSTOM -config BR2_ROOTFS_SKELETON_CUSTOM_PATH - string "custom target skeleton path" - default "fs/skeleton" - help - Path custom target skeleton. -endif - -source "fs/cramfs/Config.in" source "fs/cloop/Config.in" +source "fs/cpio/Config.in" +source "fs/cramfs/Config.in" source "fs/ext2/Config.in" +source "fs/initramfs/Config.in" +source "fs/iso9660/Config.in" source "fs/jffs2/Config.in" -source "fs/ubifs/Config.in" +source "fs/romfs/Config.in" source "fs/squashfs/Config.in" source "fs/tar/Config.in" -source "fs/cpio/Config.in" -source "fs/iso9660/Config.in" -source "fs/initramfs/Config.in" -source "fs/romfs/Config.in" +source "fs/ubifs/Config.in" source "fs/tar_aml/Config.in" source "fs/recovery_aml/Config.in" diff --git a/fs/cloop/cloop.mk b/fs/cloop/cloop.mk index c1d6abb802..f783adeb00 100644 --- a/fs/cloop/cloop.mk +++ b/fs/cloop/cloop.mk @@ -1,13 +1,13 @@ -############################################################# +################################################################################ # # Build the compressed loop root filesystem image # -############################################################# +################################################################################ ROOTFS_CLOOP_DEPENDENCIES = host-cloop host-cdrkit define ROOTFS_CLOOP_CMD - $(HOST_DIR)/usr/bin/genisoimage -r $(TARGET_DIR) | $(HOST_DIR)/usr/bin/create_compressed_fs - 65536 > $$@ + $(HOST_DIR)/usr/bin/genisoimage -r $(TARGET_DIR) | $(HOST_DIR)/usr/bin/create_compressed_fs - 65536 > $@ endef $(eval $(call ROOTFS_TARGET,cloop)) \ No newline at end of file diff --git a/fs/common.mk b/fs/common.mk index 92be00cc0c..aa9d961964 100644 --- a/fs/common.mk +++ b/fs/common.mk @@ -16,9 +16,6 @@ # ROOTFS_$(FSTYPE)_PRE_GEN_HOOKS, a list of hooks to call before # generating the filesystem image # -# ROOTFS_$(FSTYPE)_POST_GEN_HOOKS, a list of hooks to call after -# generating the filesystem image -# # ROOTFS_$(FSTYPE)_POST_TARGETS, the list of targets that should be # run after running the main filesystem target. This is useful for # initramfs, to rebuild the kernel once the initramfs is generated. @@ -32,42 +29,69 @@ # macro will automatically generate a compressed filesystem image. FAKEROOT_SCRIPT = $(BUILD_DIR)/_fakeroot.fs -ROOTFS_DEVICE_TABLE = $(call qstrip,$(BR2_ROOTFS_DEVICE_TABLE)) +FULL_DEVICE_TABLE = $(BUILD_DIR)/_device_table.txt +ROOTFS_DEVICE_TABLES = $(call qstrip,$(BR2_ROOTFS_DEVICE_TABLE) \ + $(BR2_ROOTFS_STATIC_DEVICE_TABLE)) +USERS_TABLE = $(BUILD_DIR)/_users_table.txt define ROOTFS_TARGET_INTERNAL # extra deps -$(eval ROOTFS_$(2)_DEPENDENCIES += host-fakeroot host-makedevs $(if $(BR2_TARGET_ROOTFS_$(2)_LZMA),host-lzma)) +ROOTFS_$(2)_DEPENDENCIES += host-fakeroot host-makedevs -$(BINARIES_DIR)/rootfs.$(1): $(ROOTFS_$(2)_DEPENDENCIES) - @$(call MESSAGE,"Generating root filesystem image rootfs.$(1)") - $(foreach hook,$(ROOTFS_$(2)_PRE_GEN_HOOKS),$(call $(hook))$(sep)) - rm -f $(FAKEROOT_SCRIPT) - touch $(BUILD_DIR)/.fakeroot.00000 - cat $(BUILD_DIR)/.fakeroot* > $(FAKEROOT_SCRIPT) - echo "chown -R 0:0 $(TARGET_DIR)" >> $(FAKEROOT_SCRIPT) -ifneq ($(ROOTFS_DEVICE_TABLE),) - echo "$(HOST_DIR)/usr/bin/makedevs -d $(ROOTFS_DEVICE_TABLE) $(TARGET_DIR)" >> $(FAKEROOT_SCRIPT) -endif - echo "$(ROOTFS_$(2)_CMD)" >> $(FAKEROOT_SCRIPT) - chmod a+x $(FAKEROOT_SCRIPT) - $(HOST_DIR)/usr/bin/fakeroot -- $(FAKEROOT_SCRIPT) - -@rm -f $(FAKEROOT_SCRIPT) - $(foreach hook,$(ROOTFS_$(2)_POST_GEN_HOOKS),$(call $(hook))$(sep)) ifeq ($$(BR2_TARGET_ROOTFS_$(2)_GZIP),y) - gzip -9 -c $$@ > $$@.gz +ROOTFS_$(2)_COMPRESS_EXT = .gz +ROOTFS_$(2)_COMPRESS_CMD = gzip -9 -c endif ifeq ($$(BR2_TARGET_ROOTFS_$(2)_BZIP2),y) - bzip2 -9 -c $$@ > $$@.bz2 +ROOTFS_$(2)_COMPRESS_EXT = .bz2 +ROOTFS_$(2)_COMPRESS_CMD = bzip2 -9 -c endif ifeq ($$(BR2_TARGET_ROOTFS_$(2)_LZMA),y) - $(LZMA) -9 -c $$@ > $$@.lzma +ROOTFS_$(2)_DEPENDENCIES += host-lzma +ROOTFS_$(2)_COMPRESS_EXT = .lzma +ROOTFS_$(2)_COMPRESS_CMD = $$(LZMA) -9 -c +endif +ifeq ($$(BR2_TARGET_ROOTFS_$(2)_LZO),y) +ROOTFS_$(2)_DEPENDENCIES += host-lzop +ROOTFS_$(2)_COMPRESS_EXT = .lzo +ROOTFS_$(2)_COMPRESS_CMD = $$(LZOP) -9 -c +endif +ifeq ($$(BR2_TARGET_ROOTFS_$(2)_XZ),y) +ROOTFS_$(2)_DEPENDENCIES += host-xz +ROOTFS_$(2)_COMPRESS_EXT = .xz +ROOTFS_$(2)_COMPRESS_CMD = $$(XZ) -9 -C crc32 -c +endif + +$$(BINARIES_DIR)/rootfs.$(1): $$(ROOTFS_$(2)_DEPENDENCIES) + @$$(call MESSAGE,"Generating root filesystem image rootfs.$(1)") + $$(foreach hook,$$(ROOTFS_$(2)_PRE_GEN_HOOKS),$$(call $$(hook))$$(sep)) + rm -f $$(FAKEROOT_SCRIPT) + rm -f $$(TARGET_DIR_WARNING_FILE) + echo "chown -R 0:0 $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT) +ifneq ($$(ROOTFS_DEVICE_TABLES),) + cat $$(ROOTFS_DEVICE_TABLES) > $$(FULL_DEVICE_TABLE) +ifeq ($$(BR2_ROOTFS_DEVICE_CREATION_STATIC),y) + printf '$$(subst $$(sep),\n,$$(PACKAGES_DEVICES_TABLE))' >> $$(FULL_DEVICE_TABLE) +endif + printf '$$(subst $$(sep),\n,$$(PACKAGES_PERMISSIONS_TABLE))' >> $$(FULL_DEVICE_TABLE) + echo "$$(HOST_DIR)/usr/bin/makedevs -d $$(FULL_DEVICE_TABLE) $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT) +endif + printf '$(subst $(sep),\n,$(PACKAGES_USERS))' > $(USERS_TABLE) + $(TOPDIR)/support/scripts/mkusers $(USERS_TABLE) $(TARGET_DIR) >> $(FAKEROOT_SCRIPT) + echo "$$(ROOTFS_$(2)_CMD)" >> $$(FAKEROOT_SCRIPT) + chmod a+x $$(FAKEROOT_SCRIPT) + $$(HOST_DIR)/usr/bin/fakeroot -- $$(FAKEROOT_SCRIPT) + cp support/misc/target-dir-warning.txt $$(TARGET_DIR_WARNING_FILE) + -@rm -f $$(FAKEROOT_SCRIPT) $$(FULL_DEVICE_TABLE) +ifneq ($$(ROOTFS_$(2)_COMPRESS_CMD),) + $$(ROOTFS_$(2)_COMPRESS_CMD) $$@ > $$@$$(ROOTFS_$(2)_COMPRESS_EXT) endif rootfs-$(1)-show-depends: - @echo $(ROOTFS_$(2)_DEPENDENCIES) + @echo $$(ROOTFS_$(2)_DEPENDENCIES) -rootfs-$(1): $(BINARIES_DIR)/rootfs.$(1) $(ROOTFS_$(2)_POST_TARGETS) +rootfs-$(1): $$(BINARIES_DIR)/rootfs.$(1) $$(ROOTFS_$(2)_POST_TARGETS) ifeq ($$(BR2_TARGET_ROOTFS_$(2)),y) TARGETS += rootfs-$(1) @@ -78,4 +102,4 @@ define ROOTFS_TARGET $(call ROOTFS_TARGET_INTERNAL,$(1),$(call UPPERCASE,$(1))) endef -include fs/*/*.mk +include $(sort $(wildcard fs/*/*.mk)) diff --git a/fs/cpio/Config.in b/fs/cpio/Config.in index 374cfe0cd5..206baca677 100644 --- a/fs/cpio/Config.in +++ b/fs/cpio/Config.in @@ -1,34 +1,60 @@ config BR2_TARGET_ROOTFS_CPIO - bool "cpio the root filesystem" + bool "cpio the root filesystem (for use as an initial RAM filesystem)" help - Build a cpio archive of the root filesystem + Build a cpio archive of the root filesystem. This is typically + used for an initial RAM filesystem that is passed to the kernel + by the bootloader. + +if BR2_TARGET_ROOTFS_CPIO choice - prompt "Compression method" - default BR2_TARGET_ROOTFS_CPIO_NONE - depends on BR2_TARGET_ROOTFS_CPIO - help - Select compressor for cpio filesystem of the root filesystem + prompt "Compression method" + default BR2_TARGET_ROOTFS_CPIO_NONE + help + Select compressor for cpio filesystem of the root filesystem. + If you use the cpio archive as an initial RAM filesystem, make + sure the kernel contains the decompression algorithm selected + here. config BR2_TARGET_ROOTFS_CPIO_NONE - bool "no compression" - help - Do not compress the cpio filesystem. + bool "no compression" + help + Do not compress the cpio filesystem. config BR2_TARGET_ROOTFS_CPIO_GZIP - bool "gzip" - help - Do compress the cpio filesystem with gzip. + bool "gzip" + help + Do compress the cpio filesystem with gzip. config BR2_TARGET_ROOTFS_CPIO_BZIP2 - bool "bzip2" - help - Do compress the cpio filesystem with bzip2. + bool "bzip2" + help + Do compress the cpio filesystem with bzip2. config BR2_TARGET_ROOTFS_CPIO_LZMA - bool "lzma" - help - Do compress the cpio filesystem with lzma. + bool "lzma" + help + Do compress the cpio filesystem with lzma. + +config BR2_TARGET_ROOTFS_CPIO_LZO + bool "lzo" + help + Do compress the cpio filesystem with lzop. + +config BR2_TARGET_ROOTFS_CPIO_XZ + bool "xz" + help + Do compress the cpio filesystem with xz. endchoice +config BR2_TARGET_ROOTFS_CPIO_UIMAGE + bool "Create U-Boot image of the root filesystem" + select BR2_PACKAGE_HOST_UBOOT_TOOLS + help + Add a U-Boot header to the cpio root filesystem. This allows + the initramfs to be loaded with the bootm command in U-Boot. + + The U-Boot image will be called rootfs.cpio.uboot + +endif # BR2_TARGET_ROOTFS_CPIO diff --git a/fs/cpio/cpio.mk b/fs/cpio/cpio.mk index ab7d546185..771306ced9 100644 --- a/fs/cpio/cpio.mk +++ b/fs/cpio/cpio.mk @@ -1,18 +1,42 @@ -############################################################# +################################################################################ # # cpio to archive target filesystem # -############################################################# +################################################################################ -define ROOTFS_CPIO_INIT_SYMLINK - rm -f $(TARGET_DIR)/init - ln -s sbin/init $(TARGET_DIR)/init +ifeq ($(BR2_ROOTFS_DEVICE_CREATION_STATIC),y) + +define ROOTFS_CPIO_ADD_INIT + if [ ! -e $(TARGET_DIR)/init ]; then \ + ln -sf sbin/init $(TARGET_DIR)/init; \ + fi +endef + +else +# devtmpfs does not get automounted when initramfs is used. +# Add a pre-init script to mount it before running init +define ROOTFS_CPIO_ADD_INIT + if [ ! -e $(TARGET_DIR)/init ]; then \ + $(INSTALL) -m 0755 fs/cpio/init $(TARGET_DIR)/init; \ + fi endef -ROOTFS_CPIO_PRE_GEN_HOOKS += ROOTFS_CPIO_INIT_SYMLINK +PACKAGES_PERMISSIONS_TABLE += /dev/console c 622 0 0 5 1 - - -$(sep) + +endif # BR2_ROOTFS_DEVICE_CREATION_STATIC + +ROOTFS_CPIO_PRE_GEN_HOOKS += ROOTFS_CPIO_ADD_INIT define ROOTFS_CPIO_CMD - cd $(TARGET_DIR) && find . | cpio --quiet -o -H newc > $$@ + cd $(TARGET_DIR) && find . | cpio --quiet -o -H newc > $@ endef -$(eval $(call ROOTFS_TARGET,cpio)) \ No newline at end of file +$(BINARIES_DIR)/rootfs.cpio.uboot: $(BINARIES_DIR)/rootfs.cpio host-uboot-tools + $(MKIMAGE) -A $(MKIMAGE_ARCH) -T ramdisk \ + -C none -d $<$(ROOTFS_CPIO_COMPRESS_EXT) $@ + +ifeq ($(BR2_TARGET_ROOTFS_CPIO_UIMAGE),y) +ROOTFS_CPIO_POST_TARGETS += $(BINARIES_DIR)/rootfs.cpio.uboot +endif + +$(eval $(call ROOTFS_TARGET,cpio)) diff --git a/fs/cpio/init b/fs/cpio/init new file mode 100755 index 0000000000..a275482177 --- /dev/null +++ b/fs/cpio/init @@ -0,0 +1,7 @@ +#!/bin/sh +# devtmpfs does not get automounted for initramfs +/bin/mount -t devtmpfs devtmpfs /dev +exec 0/dev/console +exec 2>/dev/console +exec /sbin/init $* diff --git a/fs/cramfs/cramfs.mk b/fs/cramfs/cramfs.mk index e0deb7e2af..402d19ffb1 100644 --- a/fs/cramfs/cramfs.mk +++ b/fs/cramfs/cramfs.mk @@ -1,22 +1,19 @@ -############################################################# +################################################################################ # # Build the cramfs root filesystem image # -############################################################# +################################################################################ + ifeq ($(BR2_ENDIAN),"BIG") CRAMFS_OPTS=-b else CRAMFS_OPTS=-l endif -ifneq ($(ROOTFS_DEVICE_TABLE),) -CRAMFS_OPTS += -D $(ROOTFS_DEVICE_TABLE) -endif - define ROOTFS_CRAMFS_CMD - $(HOST_DIR)/usr/bin/mkcramfs -q $(CRAMFS_OPTS) $(TARGET_DIR) $$@ + $(HOST_DIR)/usr/bin/mkcramfs $(CRAMFS_OPTS) $(TARGET_DIR) $@ endef ROOTFS_CRAMFS_DEPENDENCIES = host-cramfs -$(eval $(call ROOTFS_TARGET,cramfs)) \ No newline at end of file +$(eval $(call ROOTFS_TARGET,cramfs)) diff --git a/fs/ext2/Config.in b/fs/ext2/Config.in index 2af44a826e..c26482f1dd 100644 --- a/fs/ext2/Config.in +++ b/fs/ext2/Config.in @@ -1,49 +1,95 @@ config BR2_TARGET_ROOTFS_EXT2 - bool "ext2 root filesystem" + bool "ext2/3/4 root filesystem" + select BR2_PACKAGE_HOST_GENEXT2FS + select BR2_PACKAGE_HOST_E2FSPROGS help - Build an ext2 root filesystem + Build an ext2/3/4 root filesystem + +if BR2_TARGET_ROOTFS_EXT2 + +config BR2_TARGET_ROOTFS_EXT2_2 + bool + +choice + bool "ext2/3/4 variant" + default BR2_TARGET_ROOTFS_EXT2_2r0 + +config BR2_TARGET_ROOTFS_EXT2_2r0 + bool "ext2 (rev0)" + select BR2_TARGET_ROOTFS_EXT2_2 + +config BR2_TARGET_ROOTFS_EXT2_2r1 + bool "ext2 (rev1)" + select BR2_TARGET_ROOTFS_EXT2_2 + +config BR2_TARGET_ROOTFS_EXT2_3 + bool "ext3" + +config BR2_TARGET_ROOTFS_EXT2_4 + bool "ext4" + +endchoice + +config BR2_TARGET_ROOTFS_EXT2_GEN + int + default 2 if BR2_TARGET_ROOTFS_EXT2_2 + default 3 if BR2_TARGET_ROOTFS_EXT2_3 + default 4 if BR2_TARGET_ROOTFS_EXT2_4 + +# All ext generations are revision 1, except ext2r0, which is revision 0 +config BR2_TARGET_ROOTFS_EXT2_REV + int + default 0 if BR2_TARGET_ROOTFS_EXT2_2r0 + default 1 if !BR2_TARGET_ROOTFS_EXT2_2r0 config BR2_TARGET_ROOTFS_EXT2_BLOCKS int "size in blocks (leave at 0 for auto calculation)" - depends on BR2_TARGET_ROOTFS_EXT2 default 0 config BR2_TARGET_ROOTFS_EXT2_INODES int "inodes (leave at 0 for auto calculation)" - depends on BR2_TARGET_ROOTFS_EXT2 default 0 config BR2_TARGET_ROOTFS_EXT2_RESBLKS int "reserved blocks percentage" - depends on BR2_TARGET_ROOTFS_EXT2 default 0 choice prompt "Compression method" default BR2_TARGET_ROOTFS_EXT2_NONE - depends on BR2_TARGET_ROOTFS_EXT2 help - Select compressor for ext2 filesystem of the root filesystem + Select compressor for ext2/3/4 filesystem of the root filesystem config BR2_TARGET_ROOTFS_EXT2_NONE bool "no compression" help - Do not compress the ext2 filesystem. + Do not compress the ext2/3/4 filesystem. config BR2_TARGET_ROOTFS_EXT2_GZIP bool "gzip" help - Do compress the ext2 filesystem with gzip. + Do compress the ext2/3/4 filesystem with gzip. config BR2_TARGET_ROOTFS_EXT2_BZIP2 bool "bzip2" help - Do compress the ext2 filesystem with bzip2. + Do compress the ext2/3/4 filesystem with bzip2. config BR2_TARGET_ROOTFS_EXT2_LZMA bool "lzma" help - Do compress the ext2 filesystem with lzma. + Do compress the ext2/3/4 filesystem with lzma. + +config BR2_TARGET_ROOTFS_EXT2_LZO + bool "lzo" + help + Do compress the ext2 filesystem with lzop. + +config BR2_TARGET_ROOTFS_EXT2_XZ + bool "xz" + help + Do compress the ext2 filesystem with xz. endchoice +endif # BR2_TARGET_ROOTFS_EXT2 diff --git a/fs/ext2/ext2.mk b/fs/ext2/ext2.mk index cc8da0e4dd..0af955fb6a 100644 --- a/fs/ext2/ext2.mk +++ b/fs/ext2/ext2.mk @@ -1,8 +1,8 @@ -############################################################# +################################################################################ # # Build the ext2 root filesystem image # -############################################################# +################################################################################ EXT2_OPTS := @@ -18,10 +18,20 @@ ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)),0) EXT2_OPTS += -m $(BR2_TARGET_ROOTFS_EXT2_RESBLKS) endif -ROOTFS_EXT2_DEPENDENCIES = host-genext2fs +ROOTFS_EXT2_DEPENDENCIES = host-genext2fs host-e2fsprogs + +EXT2_ENV = GEN=$(BR2_TARGET_ROOTFS_EXT2_GEN) +EXT2_ENV += REV=$(BR2_TARGET_ROOTFS_EXT2_REV) define ROOTFS_EXT2_CMD - PATH=$(TARGET_PATH) fs/ext2/genext2fs.sh -d $(TARGET_DIR) $(EXT2_OPTS) $$@ + PATH=$(TARGET_PATH) $(EXT2_ENV) fs/ext2/genext2fs.sh -d $(TARGET_DIR) $(EXT2_OPTS) $@ endef +rootfs-ext2-symlink: + ln -sf rootfs.ext2$(ROOTFS_EXT2_COMPRESS_EXT) $(BINARIES_DIR)/rootfs.ext$(BR2_TARGET_ROOTFS_EXT2_GEN)$(ROOTFS_EXT2_COMPRESS_EXT) + +ifneq ($(BR2_TARGET_ROOTFS_EXT2_GEN),2) +ROOTFS_EXT2_POST_TARGETS += rootfs-ext2-symlink +endif + $(eval $(call ROOTFS_TARGET,ext2)) diff --git a/fs/ext2/genext2fs.sh b/fs/ext2/genext2fs.sh index 7a518aea74..a6cd7d22ba 100755 --- a/fs/ext2/genext2fs.sh +++ b/fs/ext2/genext2fs.sh @@ -1,10 +1,13 @@ #!/bin/sh # genext2fs wrapper calculating needed blocks/inodes values if not specified +set -e export LC_ALL=C CALC_BLOCKS=1 CALC_INODES=1 +EXT_OPTS= +EXT_OPTS_O= while getopts x:d:D:b:i:N:m:g:e:zfqUPhVv f do @@ -14,6 +17,7 @@ do d) TARGET_DIR=$OPTARG ;; esac done +eval IMG="\"\${${OPTIND}}\"" # calculate needed inodes if [ $CALC_INODES -eq 1 ]; @@ -30,7 +34,86 @@ then # we scale inodes / blocks with 10% to compensate for bitmaps size + slack BLOCKS=$(du -s -c -k $TARGET_DIR | grep total | sed -e "s/total//") BLOCKS=$(expr 500 + \( $BLOCKS + $INODES / 8 \) \* 11 / 10) + # we add 1300 blocks (a bit more than 1 MiB, assuming 1KiB blocks) for + # the journal if ext3/4 + # Note: I came to 1300 blocks after trial-and-error checks. YMMV. + if [ ${GEN} -ge 3 ]; then + BLOCKS=$(expr 1300 + $BLOCKS ) + fi set -- $@ -b $BLOCKS fi -exec genext2fs $@ +e2tunefsck() { + # Upgrade the file system + if [ $# -ne 0 ]; then + tune2fs "$@" "${IMG}" + fi + + # genext2fs does not generate a UUID, but fsck will whine if one is + # is missing, so we need to add a UUID. + # Of course, this has to happend _before_ we run fsck. + # Although a random UUID may seem bad for reproducibility, there + # already are so many things that are not reproducible in a + # filesystem: file dates, file ordering, content of the files... + tune2fs -U random "${IMG}" + + # After changing filesystem options, running fsck is required + # (see: man tune2fs). Running e2fsck in other cases will ensure + # coherency of the filesystem, although it is not required. + # 'e2fsck -pDf' means: + # - automatically repair + # - optimise and check for duplicate entries + # - force checking + # Sending output to oblivion, as e2fsck can be *very* verbose, + # especially with filesystems generated by genext2fs. + # Exit codes 1 & 2 are OK, it means fs errors were successfully + # corrected, hence our little trick with $ret. + ret=0 + e2fsck -pDf "${IMG}" >/dev/null || ret=$? + case ${ret} in + 0|1|2) ;; + *) exit ${ret};; + esac + printf "\ne2fsck was successfully run on '%s' (ext%d)\n\n" \ + "${IMG##*/}" "${GEN}" + + # Remove count- and time-based checks, they are not welcome + # on embedded devices, where they can cause serious boot-time + # issues by tremendously slowing down the boot. + tune2fs -c 0 -i 0 "${IMG}" +} + +# Check we know what generation to generate +case "${GEN}:${REV}" in + 2:0|2:1|3:1|4:1) + ;; + *) + printf "%s: unknown ext generation '%s' and/or revision '%s'\n" \ + "${0##*/}" "${GEN}" "${REV}" >&2 + exit 1 + ;; +esac + +# Upgrade to rev1 if needed +if [ ${REV} -ge 1 ]; then + EXT_OPTS_O="${EXT_OPTS_O},filetype" +fi + +# Add a journal for ext3 and above +if [ ${GEN} -ge 3 ]; then + EXT_OPTS="${EXT_OPTS} -j -J size=1" +fi + +# Add ext4 specific features +if [ ${GEN} -ge 4 ]; then + EXT_OPTS_O="${EXT_OPTS_O},extents,uninit_bg,dir_index" +fi + +# Add our -O options (there will be at most one leading comma, remove it) +if [ -n "${EXT_OPTS_O}" ]; then + EXT_OPTS="${EXT_OPTS} -O ${EXT_OPTS_O#,}" +fi + +# Generate and upgrade the filesystem +genext2fs "$@" +e2tunefsck ${EXT_OPTS} diff --git a/fs/initramfs/Config.in b/fs/initramfs/Config.in index abb3c0cc03..ac45030512 100644 --- a/fs/initramfs/Config.in +++ b/fs/initramfs/Config.in @@ -1,20 +1,21 @@ config BR2_TARGET_ROOTFS_INITRAMFS - bool "initramfs for initial ramdisk of linux kernel" + bool "initial RAM filesystem linked into linux kernel" depends on BR2_LINUX_KERNEL + select BR2_TARGET_ROOTFS_CPIO help Integrate the root filesystem generated by Buildroot as an initramfs inside the kernel image. This integration will take place automatically. - The rootfs.initramfs file generated in the images/ directory - is only a text file describing the contents of the initramfs - in a format understood by the CONFIG_INITRAMFS_SOURCE kernel - configuration option. + A rootfs.cpio file will be generated in the images/ directory. + This is the archive that will be included in the kernel image. + The default rootfs compression set in the kernel configuration + is used, regardless of how buildroot's cpio archive is configured. - Note that enabling initramfs together with other filesystem + Note that enabling initramfs together with another filesystem formats doesn't make sense: you would end up having two identical root filesystems, one embedded inside the kernel - image, and one separatly. + image, and one separately. comment "initramfs requires a Linux kernel to be built" depends on !BR2_LINUX_KERNEL diff --git a/fs/initramfs/gen_initramfs_list.sh b/fs/initramfs/gen_initramfs_list.sh deleted file mode 100644 index 26252b6199..0000000000 --- a/fs/initramfs/gen_initramfs_list.sh +++ /dev/null @@ -1,203 +0,0 @@ -#!/bin/sh -# Copyright (C) Martin Schlemmer -# Released under the terms of the GNU GPL -# -# Generate a newline separated list of entries from the file/directory -# supplied as an argument. -# -# If a file/directory is not supplied then generate a small dummy file. -# -# The output is suitable for gen_init_cpio built from usr/gen_init_cpio.c. -# - -default_initramfs() { - cat <<-EOF - # This is a very simple, default initramfs - - dir /dev 0755 0 0 - nod /dev/console 0600 0 0 c 5 1 - dir /root 0700 0 0 - EOF -} - -filetype() { - local argv1="$1" - - # symlink test must come before file test - if [ -L "$argv1" ]; then - echo "slink" - elif [ -f "$argv1" ]; then - echo "file" - elif [ -d "$argv1" ]; then - echo "dir" - elif [ -b "$argv1" -o -c "$argv1" ]; then - echo "nod" - elif [ -p "$argv1" ]; then - echo "pipe" - elif [ -S "$argv1" ]; then - echo "sock" - else - echo "invalid" - fi - return 0 -} - -print_mtime() { - local argv1="$1" - local mymtime="0" - - if [ -e "$argv1" ]; then - mymtime=$(find "$argv1" -printf "%T@\n" | sort -r | head -n 1) - fi - - echo "# Last modified: $mymtime" - echo -} - -parse() { - local location="$1" - local name=$(echo "$location" | sed -e "s,$srcdir,,") - # change '//' into '/' - name=$(echo $name | sed -e 's,/[/]*,/,g') - local mode="$2" - local uid="$3" - local gid="$4" - local ftype=$(filetype "$location") - # remap uid/gid to 0 if necessary - [ "x$uid" != "x" ] && [ $uid -eq $root_uid ] && uid=0 - [ "x$gid" != "x" ] && [ $gid -eq $root_gid ] && gid=0 - local str="$mode $uid $gid" - - [ "$ftype" = "invalid" ] && return 0 - [ "$location" = "$srcdir" ] && return 0 - - case "$ftype" in - "file") - str="$ftype $name $location $str" - ;; - "nod") - local devtype= - local maj=$(LC_ALL=C ls -l "$location" | \ - awk '{sub(/,/, "", $5); print $5}') - local min=$(LC_ALL=C ls -l "$location" | \ - awk '{print $6}') - - if [ -b "$location" ]; then - devtype="b" - else - devtype="c" - fi - str="$ftype $name $str $devtype $maj $min" - ;; - "slink") - local target=$(LC_ALL=C ls -l "$location" | \ - awk '{print $11}') - str="$ftype $name $target $str" - ;; - *) - str="$ftype $name $str" - ;; - esac - - echo "$str" - - return 0 -} - -usage() { - printf "Usage:\n" - printf "$0 [ [-u ] [-g ] [-d | ] ] . . .\n" - printf "\n" - printf -- "-u User ID to map to user ID 0 (root).\n" - printf " is only meaningful if \n" - printf " is a directory.\n" - printf -- "-g Group ID to map to group ID 0 (root).\n" - printf " is only meaningful if \n" - printf " is a directory.\n" - printf " File list or directory for cpio archive.\n" - printf " If is not provided then a\n" - printf " a default list will be output.\n" - printf -- "-d Output the default cpio list. If no \n" - printf " is given then the default cpio list will be output.\n" - printf "\n" - printf "All options may be repeated and are interpreted sequentially\n" - printf "and immediately. -u and -g states are preserved across\n" - printf " options so an explicit \"-u 0 -g 0\" is required\n" - printf "to reset the root/group mapping.\n" -} - -build_list() { - printf "\n#####################\n# $cpio_source\n" - - if [ -f "$cpio_source" ]; then - print_mtime "$cpio_source" - cat "$cpio_source" - elif [ -d "$cpio_source" ]; then - srcdir=$(echo "$cpio_source" | sed -e 's://*:/:g;s:/$::') - dirlist=$(find "$srcdir" -printf "%p %m %U %G\n" 2>/dev/null) - - # If $dirlist is only one line, then the directory is empty - if [ "$(echo "$dirlist" | wc -l)" -gt 1 ]; then - print_mtime "$cpio_source" - - echo "$dirlist" | \ - while read x; do - parse $x - done - else - # Failsafe in case directory is empty - default_initramfs - fi - else - echo " $0: Cannot open '$cpio_source'" >&2 - exit 1 - fi -} - - -root_uid=0 -root_gid=0 - -while [ $# -gt 0 ]; do - arg="$1" - shift - case "$arg" in - "-u") - root_uid="$1" - shift - ;; - "-g") - root_gid="$1" - shift - ;; - "-d") - default_list="$arg" - default_initramfs - ;; - "-h") - usage - exit 0 - ;; - *) - case "$arg" in - "-"*) - printf "ERROR: unknown option \"$arg\"\n" >&2 - printf "If the filename validly begins with '-', then it must be prefixed\n" >&2 - printf "by './' so that it won't be interpreted as an option." >&2 - printf "\n" >&2 - usage >&2 - exit 1 - ;; - *) - cpio_source="$arg" - build_list - ;; - esac - ;; - esac -done - -# spit out the default cpio list if a source hasn't been specified -[ -z "$cpio_source" -a -z "$default_list" ] && default_initramfs - -exit 0 diff --git a/fs/initramfs/initramfs.mk b/fs/initramfs/initramfs.mk index 73122a8411..7820d65a42 100644 --- a/fs/initramfs/initramfs.mk +++ b/fs/initramfs/initramfs.mk @@ -1,23 +1,22 @@ -############################################################# +################################################################################ # -# Make a initramfs_list file to be used by gen_init_cpio -# gen_init_cpio is part of the 2.6 linux kernels to build an -# initial ramdisk filesystem based on cpio +# Build a kernel with an integrated initial ramdisk +# filesystem based on cpio. # -############################################################# +################################################################################ -define ROOTFS_INITRAMFS_INIT_SYMLINK - if [ ! -e $(TARGET_DIR)/init ]; then \ - ln -sf sbin/init $(TARGET_DIR)/init; \ - fi -endef +ROOTFS_INITRAMFS_DEPENDENCIES += rootfs-cpio -ROOTFS_INITRAMFS_PRE_GEN_HOOKS += ROOTFS_INITRAMFS_INIT_SYMLINK +ROOTFS_INITRAMFS_POST_TARGETS += linux26-rebuild-with-initramfs -define ROOTFS_INITRAMFS_CMD - $(SHELL) fs/initramfs/gen_initramfs_list.sh -u 0 -g 0 $(TARGET_DIR) > $$@ -endef -ROOTFS_INITRAMFS_POST_TARGETS += linux26-rebuild-with-initramfs +# The generic fs infrastructure isn't very useful here. + +rootfs-initramfs: $(ROOTFS_INITRAMFS_DEPENDENCIES) $(ROOTFS_INITRAMFS_POST_TARGETS) + +rootfs-initramfs-show-depends: + @echo $(ROOTFS_INITRAMFS_DEPENDENCIES) -$(eval $(call ROOTFS_TARGET,initramfs)) +ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y) +TARGETS += rootfs-initramfs +endif diff --git a/fs/iso9660/Config.in b/fs/iso9660/Config.in index 4c00583dc4..90c3998dcf 100644 --- a/fs/iso9660/Config.in +++ b/fs/iso9660/Config.in @@ -2,7 +2,7 @@ config BR2_TARGET_ROOTFS_ISO9660 bool "iso image" depends on (BR2_i386 || BR2_x86_64) depends on BR2_LINUX_KERNEL - select BR2_TARGET_ROOTFS_EXT2 + select BR2_TARGET_ROOTFS_CPIO select BR2_TARGET_GRUB help Build a bootable iso9660 image @@ -13,4 +13,5 @@ config BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU default "fs/iso9660/menu.lst" comment "iso image requires a Linux kernel to be built" - depends on (BR2_i386 || BR2_x86_64) && !BR2_LINUX_KERNEL + depends on BR2_i386 || BR2_x86_64 + depends on !BR2_LINUX_KERNEL diff --git a/fs/iso9660/iso9660.mk b/fs/iso9660/iso9660.mk index 2a5288c336..979a0b2fe7 100644 --- a/fs/iso9660/iso9660.mk +++ b/fs/iso9660/iso9660.mk @@ -1,32 +1,25 @@ -############################################################# +################################################################################ # # Build the iso96600 root filesystem image # # Cannot be converted to the ROOTFS_TARGET infrastructure, because of # the temporary construction in ISO9660_TARGET_DIR. # -############################################################# +################################################################################ -ISO9660_TARGET_DIR=$(BUILD_DIR)/iso9660 -ISO9660_BOOT_MENU:=$(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU)) -ISO9660_OPTS:= +ISO9660_TARGET_DIR = $(BUILD_DIR)/iso9660 +ISO9660_BOOT_MENU := $(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU)) -ifeq ($(BR2_TARGET_ROOTFS_ISO9660_SQUASH),y) -ISO9660_OPTS+=-U -endif - -$(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot linux26 rootfs-ext2 grub +$(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot linux rootfs-cpio grub @$(call MESSAGE,"Generating root filesystem image rootfs.iso9660") mkdir -p $(ISO9660_TARGET_DIR) mkdir -p $(ISO9660_TARGET_DIR)/boot/grub cp $(GRUB_DIR)/stage2/stage2_eltorito $(ISO9660_TARGET_DIR)/boot/grub/ cp $(ISO9660_BOOT_MENU) $(ISO9660_TARGET_DIR)/boot/grub/menu.lst - cp $(LINUX26_IMAGE_PATH) $(ISO9660_TARGET_DIR)/kernel - cp $(BINARIES_DIR)/rootfs.ext2 $(ISO9660_TARGET_DIR)/initrd + cp $(LINUX_IMAGE_PATH) $(ISO9660_TARGET_DIR)/kernel + cp $(BINARIES_DIR)/rootfs.cpio$(ROOTFS_CPIO_COMPRESS_EXT) $(ISO9660_TARGET_DIR)/initrd # Use fakeroot to pretend all target binaries are owned by root rm -f $(FAKEROOT_SCRIPT) - touch $(BUILD_DIR)/.fakeroot.00000 - cat $(BUILD_DIR)/.fakeroot* > $(FAKEROOT_SCRIPT) echo "chown -R 0:0 $(ISO9660_TARGET_DIR)" >> $(FAKEROOT_SCRIPT) # Use fakeroot so mkisofs believes the previous fakery echo "$(HOST_DIR)/usr/bin/genisoimage -R -b boot/grub/stage2_eltorito -no-emul-boot " \ @@ -39,11 +32,11 @@ $(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot linux26 rootfs-ext2 gr rootfs-iso9660: $(BINARIES_DIR)/rootfs.iso9660 -############################################################# +################################################################################ # # Toplevel Makefile options # -############################################################# +################################################################################ ifeq ($(BR2_TARGET_ROOTFS_ISO9660),y) TARGETS+=rootfs-iso9660 endif diff --git a/fs/jffs2/Config.in b/fs/jffs2/Config.in index 5748fbb634..e2a3ee9021 100644 --- a/fs/jffs2/Config.in +++ b/fs/jffs2/Config.in @@ -58,7 +58,7 @@ config BR2_TARGET_ROOTFS_JFFS2_PAGESIZE default 0x800 if BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_2K_128K default 0x1000 if BR2_TARGET_ROOTFS_JFFS2_FLASH_128 default 0x1000 if BR2_TARGET_ROOTFS_JFFS2_FLASH_64 - default $(BR2_TARGET_ROOTFS_JFFS2_CUSTOM_PAGESIZE) if BR2_TARGET_ROOTFS_JFFS2_CUSTOM + default BR2_TARGET_ROOTFS_JFFS2_CUSTOM_PAGESIZE if BR2_TARGET_ROOTFS_JFFS2_CUSTOM config BR2_TARGET_ROOTFS_JFFS2_EBSIZE hex @@ -68,7 +68,7 @@ config BR2_TARGET_ROOTFS_JFFS2_EBSIZE default 0x20000 if BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_2K_128K default 0x20000 if BR2_TARGET_ROOTFS_JFFS2_FLASH_128 default 0x10000 if BR2_TARGET_ROOTFS_JFFS2_FLASH_64 - default $(BR2_TARGET_ROOTFS_JFFS2_CUSTOM_EBSIZE) if BR2_TARGET_ROOTFS_JFFS2_CUSTOM + default BR2_TARGET_ROOTFS_JFFS2_CUSTOM_EBSIZE if BR2_TARGET_ROOTFS_JFFS2_CUSTOM config BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER bool "Do not use Cleanmarker" @@ -92,10 +92,7 @@ config BR2_TARGET_ROOTFS_JFFS2_PADSIZE choice prompt "Endianess" - default BR2_TARGET_ROOTFS_JFFS2_BE if BR2_armeb || \ - BR2_avr32 || BR2_m68k || BR2_mips || \ - BR2_powerpc || BR2_sh2a_nofpueb || BR2_sh2eb || \ - BR2_sh3eb || BR2_sh4eb || BR2_sparc + default BR2_TARGET_ROOTFS_JFFS2_BE if BR2_ENDIAN = "BIG" config BR2_TARGET_ROOTFS_JFFS2_LE bool "little-endian" diff --git a/fs/jffs2/jffs2.mk b/fs/jffs2/jffs2.mk index 2a69849cd5..0232199be5 100644 --- a/fs/jffs2/jffs2.mk +++ b/fs/jffs2/jffs2.mk @@ -1,8 +1,8 @@ -############################################################# +################################################################################ # # Build the jffs2 root filesystem image # -############################################################# +################################################################################ JFFS2_OPTS := -e $(BR2_TARGET_ROOTFS_JFFS2_EBSIZE) SUMTOOL_OPTS := $(JFFS2_OPTS) @@ -36,13 +36,13 @@ ROOTFS_JFFS2_DEPENDENCIES = host-mtd ifneq ($(BR2_TARGET_ROOTFS_JFFS2_SUMMARY),) define ROOTFS_JFFS2_CMD - $(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $$@.nosummary && \ - $(SUMTOOL) $(SUMTOOL_OPTS) -i $$@.nosummary -o $$@ && \ - rm $$@.nosummary + $(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $@.nosummary && \ + $(SUMTOOL) $(SUMTOOL_OPTS) -i $@.nosummary -o $@ && \ + rm $@.nosummary endef else define ROOTFS_JFFS2_CMD - $(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $$@ + $(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $@ endef endif diff --git a/fs/recovery_aml/recovery_aml.mk b/fs/recovery_aml/recovery_aml.mk index d2d8feadeb..adaf5afdb2 100755 --- a/fs/recovery_aml/recovery_aml.mk +++ b/fs/recovery_aml/recovery_aml.mk @@ -4,7 +4,7 @@ # ############################################################# -ROOTFS_RECOVERY_AML_DEPENDENCIES = linux26 rootfs-tar_aml host-python +ROOTFS_RECOVERY_AML_DEPENDENCIES = linux rootfs-tar_aml host-python RECOVERY_AML_ARGS = -b $(BR2_TARGET_ROOTFS_RECOVERY_AML_BOARDNAME) ifeq ($(BR2_TARGET_ROOTFS_RECOVERY_AML_WIPE_USERDATA),y) diff --git a/fs/romfs/romfs.mk b/fs/romfs/romfs.mk index 971947880b..63eb99448f 100644 --- a/fs/romfs/romfs.mk +++ b/fs/romfs/romfs.mk @@ -1,15 +1,15 @@ -############################################################# +################################################################################ # # Build the romfs root filesystem image # -############################################################# +################################################################################ ROMFS_TARGET=$(IMAGE).romfs ROOTFS_ROMFS_DEPENDENCIES = host-genromfs define ROOTFS_ROMFS_CMD - $(HOST_DIR)/usr/bin/genromfs -d $(TARGET_DIR) -f $$@ + $(HOST_DIR)/usr/bin/genromfs -d $(TARGET_DIR) -f $@ endef $(eval $(call ROOTFS_TARGET,romfs)) \ No newline at end of file diff --git a/fs/skeleton/etc/TZ b/fs/skeleton/etc/TZ deleted file mode 100644 index 9fcb2a3c56..0000000000 --- a/fs/skeleton/etc/TZ +++ /dev/null @@ -1 +0,0 @@ -MST7MDT diff --git a/fs/skeleton/etc/group b/fs/skeleton/etc/group deleted file mode 100644 index df12dbae3f..0000000000 --- a/fs/skeleton/etc/group +++ /dev/null @@ -1,18 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -wheel:x:10:root -audio:x:29: -utmp:x:43: -staff:x:50: -haldaemon:x:68: -dbus:x:81: -netdev:x:82: -nobody:x:99: -nogroup:x:99: -users:x:100: -default:x:1000: diff --git a/fs/skeleton/etc/hostname b/fs/skeleton/etc/hostname deleted file mode 100644 index 5b26b355e3..0000000000 --- a/fs/skeleton/etc/hostname +++ /dev/null @@ -1 +0,0 @@ -buildroot diff --git a/fs/skeleton/etc/inittab b/fs/skeleton/etc/inittab deleted file mode 100644 index 873db29c7e..0000000000 --- a/fs/skeleton/etc/inittab +++ /dev/null @@ -1,46 +0,0 @@ -# /etc/inittab -# -# Copyright (C) 2001 Erik Andersen -# -# Note: BusyBox init doesn't support runlevels. The runlevels field is -# completely ignored by BusyBox init. If you want runlevels, use -# sysvinit. -# -# Format for each entry: ::: -# -# id == tty to run on, or empty for /dev/console -# runlevels == ignored -# action == one of sysinit, respawn, askfirst, wait, and once -# process == program to run - -# Startup the system -null::sysinit:/bin/mount -t proc proc /proc -null::sysinit:/bin/mount -o remount,rw / -null::sysinit:/bin/mkdir -p /dev/pts -null::sysinit:/bin/mount -a -null::sysinit:/bin/hostname -F /etc/hostname -# now run any rc scripts -::sysinit:/etc/init.d/rcS - -# Set up a couple of getty's -tty1::respawn:/sbin/getty 38400 tty1 -tty2::respawn:/sbin/getty 38400 tty2 - -# Put a getty on the serial port -#ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 # GENERIC_SERIAL - -# Logging junk -null::sysinit:/bin/touch /var/log/messages -null::respawn:/sbin/syslogd -n -m 0 -null::respawn:/sbin/klogd -n -tty3::respawn:/usr/bin/tail -f /var/log/messages - -# Stuff to do for the 3-finger salute -::ctrlaltdel:/sbin/reboot - -# Stuff to do before rebooting -null::shutdown:/usr/bin/killall klogd -null::shutdown:/usr/bin/killall syslogd -null::shutdown:/bin/umount -a -r -null::shutdown:/sbin/swapoff -a - diff --git a/fs/skeleton/etc/mtab b/fs/skeleton/etc/mtab deleted file mode 120000 index e1c204547b..0000000000 --- a/fs/skeleton/etc/mtab +++ /dev/null @@ -1 +0,0 @@ -../proc/mounts \ No newline at end of file diff --git a/fs/skeleton/etc/protocols b/fs/skeleton/etc/protocols deleted file mode 100644 index 1ac8a40967..0000000000 --- a/fs/skeleton/etc/protocols +++ /dev/null @@ -1,31 +0,0 @@ -# /etc/protocols: -# $Id: protocols,v 1.1 2004/10/09 02:49:18 andersen Exp $ -# -# Internet (IP) protocols -# -# from: @(#)protocols 5.1 (Berkeley) 4/17/89 -# -# Updated for NetBSD based on RFC 1340, Assigned Numbers (July 1992). - -ip 0 IP # internet protocol, pseudo protocol number -icmp 1 ICMP # internet control message protocol -igmp 2 IGMP # Internet Group Management -ggp 3 GGP # gateway-gateway protocol -ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'') -st 5 ST # ST datagram mode -tcp 6 TCP # transmission control protocol -egp 8 EGP # exterior gateway protocol -pup 12 PUP # PARC universal packet protocol -udp 17 UDP # user datagram protocol -hmp 20 HMP # host monitoring protocol -xns-idp 22 XNS-IDP # Xerox NS IDP -rdp 27 RDP # "reliable datagram" protocol -iso-tp4 29 ISO-TP4 # ISO Transport Protocol class 4 -xtp 36 XTP # Xpress Tranfer Protocol -ddp 37 DDP # Datagram Delivery Protocol -idpr-cmtp 39 IDPR-CMTP # IDPR Control Message Transport -rspf 73 RSPF #Radio Shortest Path First. -vmtp 81 VMTP # Versatile Message Transport -ospf 89 OSPFIGP # Open Shortest Path First IGP -ipip 94 IPIP # Yet Another IP encapsulation -encap 98 ENCAP # Yet Another IP encapsulation diff --git a/fs/squashfs/Config.in b/fs/squashfs/Config.in index 85416becbb..fb696bdf84 100644 --- a/fs/squashfs/Config.in +++ b/fs/squashfs/Config.in @@ -12,11 +12,11 @@ choice root filesystem. config BR2_TARGET_ROOTFS_SQUASHFS4 - bool "4.x" + bool "4.x" config BR2_TARGET_ROOTFS_SQUASHFS3 - depends on BR2_DEPRECATED - bool "3.x" + depends on BR2_DEPRECATED + bool "3.x" endchoice @@ -29,13 +29,16 @@ choice generating the filesystem. config BR2_TARGET_ROOTFS_SQUASHFS4_GZIP - bool "gzip" + bool "gzip" config BR2_TARGET_ROOTFS_SQUASHFS4_LZMA - bool "lzma" + bool "lzma" config BR2_TARGET_ROOTFS_SQUASHFS4_LZO - bool "lzo" + bool "lzo" + +config BR2_TARGET_ROOTFS_SQUASHFS4_XZ + bool "xz" endchoice endif diff --git a/fs/squashfs/squashfs.mk b/fs/squashfs/squashfs.mk index 7efe979e85..ae5182a1a0 100644 --- a/fs/squashfs/squashfs.mk +++ b/fs/squashfs/squashfs.mk @@ -1,8 +1,8 @@ -############################################################# +################################################################################ # # Build the squashfs root filesystem image # -############################################################# +################################################################################ ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4),y) ROOTFS_SQUASHFS_DEPENDENCIES = host-squashfs @@ -13,9 +13,13 @@ else ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZMA),y) ROOTFS_SQUASHFS_ARGS += -comp lzma else +ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_XZ),y) +ROOTFS_SQUASHFS_ARGS += -comp xz +else ROOTFS_SQUASHFS_ARGS += -comp gzip endif endif +endif else ROOTFS_SQUASHFS_DEPENDENCIES = host-squashfs3 @@ -29,9 +33,9 @@ endif endif define ROOTFS_SQUASHFS_CMD - $(HOST_DIR)/usr/bin/mksquashfs $(TARGET_DIR) $$@ -noappend \ + $(HOST_DIR)/usr/bin/mksquashfs $(TARGET_DIR) $@ -noappend \ $(ROOTFS_SQUASHFS_ARGS) && \ - chmod 0644 $$@ + chmod 0644 $@ endef $(eval $(call ROOTFS_TARGET,squashfs)) diff --git a/fs/tar/Config.in b/fs/tar/Config.in index 60b8bf434d..63663ecd6f 100644 --- a/fs/tar/Config.in +++ b/fs/tar/Config.in @@ -14,22 +14,32 @@ choice config BR2_TARGET_ROOTFS_TAR_NONE bool "no compression" help - Do not compress the tarball. + Do not compress the tarball. config BR2_TARGET_ROOTFS_TAR_GZIP bool "gzip" help - Do compress the tarball with gzip. + Do compress the tarball with gzip. config BR2_TARGET_ROOTFS_TAR_BZIP2 bool "bzip2" help - Do compress the tarball with bzip2. + Do compress the tarball with bzip2. config BR2_TARGET_ROOTFS_TAR_LZMA bool "lzma" help - Do compress the tarball with lzma. + Do compress the tarball with lzma. + +config BR2_TARGET_ROOTFS_TAR_LZO + bool "lzo" + help + Do compress the tarball with lzop. + +config BR2_TARGET_ROOTFS_TAR_XZ + bool "xz" + help + Do compress the tarball with xz. endchoice diff --git a/fs/tar/tar.mk b/fs/tar/tar.mk index 4d435cb33b..c93888cd56 100644 --- a/fs/tar/tar.mk +++ b/fs/tar/tar.mk @@ -1,13 +1,13 @@ -############################################################# +################################################################################ # # tar to archive target filesystem # -############################################################# +################################################################################ -TAR_OPTS:=$(BR2_TARGET_ROOTFS_TAR_OPTIONS) +TAR_OPTS := $(BR2_TARGET_ROOTFS_TAR_OPTIONS) define ROOTFS_TAR_CMD - tar -c$(TAR_OPTS)f $$@ -C $(TARGET_DIR) . + tar -c$(TAR_OPTS)f $@ -C $(TARGET_DIR) . endef $(eval $(call ROOTFS_TARGET,tar)) diff --git a/fs/ubifs/Config.in b/fs/ubifs/Config.in index a5ef5f2b29..70ea81e5d7 100644 --- a/fs/ubifs/Config.in +++ b/fs/ubifs/Config.in @@ -3,32 +3,36 @@ config BR2_TARGET_ROOTFS_UBIFS help Build a ubifs root filesystem +if BR2_TARGET_ROOTFS_UBIFS + config BR2_TARGET_ROOTFS_UBIFS_LEBSIZE - hex "UBI logical erase block size" - depends on BR2_TARGET_ROOTFS_UBIFS + hex "logical eraseblock size" default 0x1f800 + help + Logical eraseblock (LEB) size. The value provided here is + passed to the -e/--leb-size option of mkfs.ubifs. config BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE - hex "UBI minimum I/O size" - depends on BR2_TARGET_ROOTFS_UBIFS + hex "minimum I/O unit size" default 0x800 help - Some comment required here + Minimum I/O unit size. The value provided here is passed + to the -m/--min-io-size option of mkfs.ubifs/ubinize. config BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT - int "Maximum LEB count" - depends on BR2_TARGET_ROOTFS_UBIFS + int "maximum logical eraseblock count" default 2048 help - Some comment required here + Maximum logical eraseblock (LEB) count. The value provided + here is passed to the -c/--max-leb-cnt option of mkfs.ubifs. choice prompt "ubifs runtime compression" default BR2_TARGET_ROOTFS_UBIFS_RT_LZO - depends on BR2_TARGET_ROOTFS_UBIFS help Select which compression format to use at run-time within - the ubifs file system. + the ubifs file system. The choice made here is passed to + the -x/--compr option of mkfs.ubifs config BR2_TARGET_ROOTFS_UBIFS_RT_NONE bool "no compression" @@ -50,7 +54,6 @@ endchoice choice prompt "Compression method" default BR2_TARGET_ROOTFS_UBIFS_NONE - depends on BR2_TARGET_ROOTFS_UBIFS help Select which compression format to compress the final image into. @@ -75,26 +78,52 @@ config BR2_TARGET_ROOTFS_UBIFS_LZMA help Do compress the ubifs filesystem with lzma. +config BR2_TARGET_ROOTFS_UBIFS_LZO + bool "lzo" + help + Do compress the ubifs filesystem with lzop. + +config BR2_TARGET_ROOTFS_UBIFS_XZ + bool "xz" + help + Do compress the ubifs filesystem with xz. + endchoice +config BR2_TARGET_ROOTFS_UBIFS_OPTS + string "Additional mkfs.ubifs options" + help + Any additional mkfs.ubifs options you may want to include. + config BR2_TARGET_ROOTFS_UBI - depends on BR2_TARGET_ROOTFS_UBIFS bool "Embed into an UBI image" help Build an ubi image from the ubifs one (with ubinize). +if BR2_TARGET_ROOTFS_UBI + config BR2_TARGET_ROOTFS_UBI_PEBSIZE - hex "UBI physical erase block size" - depends on BR2_TARGET_ROOTFS_UBI + hex "physical eraseblock size" default 0x20000 help - Tells ubinize the physical eraseblock size of the flash chip - the ubi image is created for. + Tells ubinize the physical eraseblock (PEB) size of the + flash chip the ubi image is created for. The value provided + here is passed to the -p/--peb-size option of ubinize. config BR2_TARGET_ROOTFS_UBI_SUBSIZE - int "UBI sub-page size" - depends on BR2_TARGET_ROOTFS_UBI + int "sub-page size" default 512 help Tells ubinize that the flash supports sub-pages and the sub-page - size. Use 0 if subpages are not supported on flash chip. + size. Use 0 if sub-pages are not supported on flash chip. + The value provided here is passed to the -s/--sub-page-size + option of ubinize. + +config BR2_TARGET_ROOTFS_UBI_OPTS + string "Additional ubinize options" + help + Any additional ubinize options you may want to include. + +endif # BR2_TARGET_ROOTFS_UBI + +endif # BR2_TARGET_ROOTFS_UBIFS diff --git a/fs/ubifs/ubi.mk b/fs/ubifs/ubi.mk index c88e33639f..08c952c296 100644 --- a/fs/ubifs/ubi.mk +++ b/fs/ubifs/ubi.mk @@ -1,8 +1,8 @@ -############################################################# +################################################################################ # # Embed the ubifs image into an ubi one # -############################################################# +################################################################################ UBI_UBINIZE_OPTS := -m $(BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE) UBI_UBINIZE_OPTS += -p $(BR2_TARGET_ROOTFS_UBI_PEBSIZE) @@ -10,13 +10,15 @@ ifneq ($(BR2_TARGET_ROOTFS_UBI_SUBSIZE),0) UBI_UBINIZE_OPTS += -s $(BR2_TARGET_ROOTFS_UBI_SUBSIZE) endif +UBI_UBINIZE_OPTS += $(call qstrip,$(BR2_TARGET_ROOTFS_UBI_OPTS)) + ROOTFS_UBI_DEPENDENCIES = rootfs-ubifs define ROOTFS_UBI_CMD cp fs/ubifs/ubinize.cfg . ;\ - echo "image=$$@fs" \ + echo "image=$@fs" \ >> ./ubinize.cfg ;\ - $(HOST_DIR)/usr/sbin/ubinize -o $$@ $(UBI_UBINIZE_OPTS) ubinize.cfg ;\ + $(HOST_DIR)/usr/sbin/ubinize -o $@ $(UBI_UBINIZE_OPTS) ubinize.cfg ;\ rm ubinize.cfg endef diff --git a/fs/ubifs/ubifs.mk b/fs/ubifs/ubifs.mk index 337180edc0..f1e4126e86 100644 --- a/fs/ubifs/ubifs.mk +++ b/fs/ubifs/ubifs.mk @@ -1,8 +1,8 @@ -############################################################# +################################################################################ # # Build the ubifs root filesystem image # -############################################################# +################################################################################ UBIFS_OPTS := -e $(BR2_TARGET_ROOTFS_UBIFS_LEBSIZE) -c $(BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT) -m $(BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE) @@ -16,10 +16,12 @@ ifeq ($(BR2_TARGET_ROOTFS_UBIFS_RT_NONE),y) UBIFS_OPTS += -x none endif +UBIFS_OPTS += $(call qstrip,$(BR2_TARGET_ROOTFS_UBIFS_OPTS)) + ROOTFS_UBIFS_DEPENDENCIES = host-mtd define ROOTFS_UBIFS_CMD - $(HOST_DIR)/usr/sbin/mkfs.ubifs -d $(TARGET_DIR) $(UBIFS_OPTS) -o $$@ + $(HOST_DIR)/usr/sbin/mkfs.ubifs -d $(TARGET_DIR) $(UBIFS_OPTS) -o $@ endef -$(eval $(call ROOTFS_TARGET,ubifs)) \ No newline at end of file +$(eval $(call ROOTFS_TARGET,ubifs)) diff --git a/linux/Config.ext.in b/linux/Config.ext.in new file mode 100644 index 0000000000..40c468424a --- /dev/null +++ b/linux/Config.ext.in @@ -0,0 +1,45 @@ +menu "Linux Kernel Extensions" + +# Xenomai +config BR2_LINUX_KERNEL_EXT_XENOMAI + bool "Adeos/Xenomai Real-time patch" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_i386 || BR2_x86_64 || BR2_arm || \ + BR2_bfin || BR2_powerpc || BR2_sh4 + select BR2_PACKAGE_XENOMAI + help + Xenomai Kernel part. + + In the current version of Xenomai, the following kernel + versions are supported: on Blackfin, 2.6.34 and 2.6.36.9, on + SH4, 2.6.32.10, on x86, 2.6.35.9, 2.6.37.6, 2.6.38.8, on + ARM, 2.6.35.9, 2.6.37.6, 2.6.38.8, on NIOS2, 2.6.35, on + PowerPC, 2.6.35.7, 2.6.36.4, 3.0.8. + +comment "xenomai needs a toolchain w/ threads" + depends on BR2_i386 || BR2_x86_64 || BR2_arm || \ + BR2_bfin || BR2_powerpc || BR2_sh4 + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_LINUX_KERNEL_EXT_XENOMAI_ADEOS_PATCH + depends on BR2_LINUX_KERNEL_EXT_XENOMAI + string "Path for Adeos patch file" + help + Optionally, explicitly specify the Adeos patch to use. + Download it at http://download.gna.org/adeos/patches/v2.6/$(ARCH)/ + and verify that your kernel version in buildroot matches. + +# RTAI +config BR2_LINUX_KERNEL_EXT_RTAI + bool "RTAI Real-time patch" + select BR2_PACKAGE_RTAI + help + RTAI Kernel part. + +config BR2_LINUX_KERNEL_EXT_RTAI_PATCH + depends on BR2_LINUX_KERNEL_EXT_RTAI + string "Path for RTAI patch file" + help + Optionally, explicitly specify the RTAI patch to use. + +endmenu diff --git a/linux/Config.in b/linux/Config.in index 9d514c55dc..3061809606 100644 --- a/linux/Config.in +++ b/linux/Config.in @@ -19,10 +19,9 @@ if BR2_LINUX_KERNEL # choice prompt "Kernel version" - default BR2_LINUX_KERNEL_2_6_37 -config BR2_LINUX_KERNEL_2_6_37 - bool "2.6.37.2" +config BR2_LINUX_KERNEL_LATEST_VERSION + bool "3.12.1" config BR2_LINUX_KERNEL_SAME_AS_HEADERS bool "Same as toolchain kernel headers" @@ -38,8 +37,8 @@ config BR2_LINUX_KERNEL_SAME_AS_HEADERS config BR2_LINUX_KERNEL_CUSTOM_VERSION bool "Custom version" help - This option allows to use a specific 2.6.x or 2.6.x.y - official versions, as available on kernel.org + This option allows to use a specific official version from + kernel.org, like 2.6.x, 2.6.x.y, 3.x.y, ... config BR2_LINUX_KERNEL_CUSTOM_TARBALL bool "Custom tarball" @@ -47,23 +46,54 @@ config BR2_LINUX_KERNEL_CUSTOM_TARBALL This option allows to specify the http or ftp location of a specific kernel source tarball +config BR2_LINUX_KERNEL_CUSTOM_GIT + bool "Custom Git repository" + help + This option allows Buildroot to get the Linux kernel source + code from a Git repository. + +config BR2_LINUX_KERNEL_CUSTOM_HG + bool "Custom Mercurial repository" + help + This option allows Buildroot to get the Linux kernel source + code from a Mercurial repository. + endchoice config BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE string "Kernel version" depends on BR2_LINUX_KERNEL_CUSTOM_VERSION - default "2.6.37.2" config BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION string "URL of custom kernel tarball" depends on BR2_LINUX_KERNEL_CUSTOM_TARBALL +if BR2_LINUX_KERNEL_CUSTOM_GIT || BR2_LINUX_KERNEL_CUSTOM_HG + +config BR2_LINUX_KERNEL_CUSTOM_REPO_URL + string "URL of custom repository" + default BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL \ + if BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL != "" # legacy + +config BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION + string "Custom repository version" + default BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION \ + if BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION != "" # legacy + help + Revision to use in the typical format used by Git/Mercurial + E.G. a sha id, a tag, branch, .. + +endif + config BR2_LINUX_KERNEL_VERSION string - default "2.6.37" if BR2_LINUX_KERNEL_2_6_37 + default "3.12.1" if BR2_LINUX_KERNEL_LATEST_VERSION default BR2_DEFAULT_KERNEL_HEADERS if BR2_LINUX_KERNEL_SAME_AS_HEADERS - default BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE if BR2_LINUX_KERNEL_CUSTOM_VERSION + default BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE \ + if BR2_LINUX_KERNEL_CUSTOM_VERSION default "custom" if BR2_LINUX_KERNEL_CUSTOM_TARBALL + default BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION \ + if BR2_LINUX_KERNEL_CUSTOM_GIT || BR2_LINUX_KERNEL_CUSTOM_HG # # Patch selection @@ -97,8 +127,9 @@ config BR2_LINUX_KERNEL_DEFCONFIG string "Defconfig name" depends on BR2_LINUX_KERNEL_USE_DEFCONFIG help - Name of the defconfig file to use, without the trailing - _defconfig + Name of the kernel defconfig file to use, without the + trailing _defconfig. The defconfig is located in + arch//configs in the kernel tree. config BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE string "Configuration file path" @@ -110,12 +141,23 @@ config BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE # Binary format # +config BR2_LINUX_KERNEL_UBOOT_IMAGE + bool + choice prompt "Kernel binary format" config BR2_LINUX_KERNEL_UIMAGE bool "uImage" depends on BR2_arm || BR2_armeb || BR2_bfin || BR2_powerpc || BR2_avr32 || BR2_sh || BR2_sh64 + select BR2_LINUX_KERNEL_UBOOT_IMAGE + +config BR2_LINUX_KERNEL_APPENDED_UIMAGE + bool "uImage with appended DT" + depends on BR2_arm || BR2_armeb + select BR2_LINUX_KERNEL_DTS_SUPPORT + select BR2_LINUX_KERNEL_APPENDED_DTB + select BR2_LINUX_KERNEL_UBOOT_IMAGE config BR2_LINUX_KERNEL_BZIMAGE bool "bzImage" @@ -123,7 +165,35 @@ config BR2_LINUX_KERNEL_BZIMAGE config BR2_LINUX_KERNEL_ZIMAGE bool "zImage" - depends on BR2_arm || BR2_armeb || BR2_powerpc || BR2_sparc || BR2_sh || BR2_sh64 || BR2_xtensa + depends on BR2_arm || BR2_armeb || BR2_powerpc || BR2_sparc || \ + BR2_sh || BR2_sh64 || BR2_xtensa + +config BR2_LINUX_KERNEL_APPENDED_ZIMAGE + bool "zImage with appended DT" + depends on BR2_arm || BR2_armeb + select BR2_LINUX_KERNEL_DTS_SUPPORT + select BR2_LINUX_KERNEL_APPENDED_DTB + +config BR2_LINUX_KERNEL_CUIMAGE + bool "cuImage" + depends on BR2_powerpc + select BR2_LINUX_KERNEL_UBOOT_IMAGE + select BR2_LINUX_KERNEL_DTS_SUPPORT + select BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT + +config BR2_LINUX_KERNEL_SIMPLEIMAGE + bool "simpleImage" + depends on BR2_microblaze + select BR2_LINUX_KERNEL_UBOOT_IMAGE + select BR2_LINUX_KERNEL_DTS_SUPPORT + select BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT + +config BR2_LINUX_KERNEL_LINUX_BIN + bool "linux.bin" + depends on BR2_microblaze + select BR2_LINUX_KERNEL_UBOOT_IMAGE + select BR2_LINUX_KERNEL_DTS_SUPPORT + select BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT config BR2_LINUX_KERNEL_VMLINUX_BIN bool "vmlinux.bin" @@ -131,10 +201,122 @@ config BR2_LINUX_KERNEL_VMLINUX_BIN config BR2_LINUX_KERNEL_VMLINUX bool "vmlinux" + +config BR2_LINUX_KERNEL_VMLINUZ + bool "vmlinuz" depends on BR2_mips || BR2_mipsel +config BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM + bool "custom target" + help + For certain cases a board-specific target image must be + used. For example, on powerPC where the OpenFirmware + description is attached in a board-specific kernel image + target like 'cuImage.mpc8379_rdb'. + + Select this option and specify the make target in "Kernel + image target name". + endchoice +config BR2_LINUX_KERNEL_IMAGE_TARGET_NAME + string "Kernel image target name" + depends on BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM + help + Specify the kernel make target to build the kernel that you + need. + +config BR2_LINUX_KERNEL_UIMAGE_LOADADDR + string "load address (for 3.7+ multi-platform image)" + depends on BR2_arm || BR2_armeb + depends on BR2_LINUX_KERNEL_UIMAGE || BR2_LINUX_KERNEL_APPENDED_UIMAGE + help + If your ARM system's Linux kernel is configured with the new (3.7+) + multi-architecture support (CONFIG_ARCH_MULTIPLATFORM=y in your + kernel config), then it is necessary to specify a kernel load address + when building the uImage. This should be a hexadecimal string + beginning with 0x, for example: 0x00008000. + + If unsure, let this option empty. + +config BR2_LINUX_KERNEL_DTS_SUPPORT + bool "Device tree support" + help + Compile a device tree source into a device tree blob. + Select the dts file to compile in the options below. + +if BR2_LINUX_KERNEL_DTS_SUPPORT + +# We have mainly three cases when it comes to device tree support: +# 1) We don't want any support at all. Then the ..DTS_SUPPORT +# variable won't be set +# 2) We want device tree support, so we need the user to enter +# the device tree name or the the path to the custom device +# he uses, but the kernel abstracts this from us and only +# build an image that looks like a regular kernel image. In +# this case, we only need to derive the kernel image name from +# the given device tree name, and all the rest is as usual +# 3) We want device tree support, but the kernel requires us to +# build the device tree blob separately. In this case, some +# more logic will be needed. +# The variable below address the second case, were you only want +# limited actions from buildroot. +config BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT + bool + +config BR2_LINUX_KERNEL_APPENDED_DTB + bool + +choice + prompt "Device tree source" + default BR2_LINUX_KERNEL_USE_INTREE_DTS + +config BR2_LINUX_KERNEL_USE_INTREE_DTS + bool "Use a device tree present in the kernel." + help + Use a device tree source distributed with + the kernel sources. The dts files are located + in the arch//boot/dts folder. + +config BR2_LINUX_KERNEL_USE_CUSTOM_DTS + bool "Use a custom device tree file" + help + Use a custom device tree file, i.e, a device + tree file that does not belong to the kernel + source tree. +endchoice + +config BR2_LINUX_KERNEL_INTREE_DTS_NAME + string "Device Tree Source file names" + depends on BR2_LINUX_KERNEL_USE_INTREE_DTS + help + Name of the device tree source file, without + the trailing .dts. You can provide a list of + dts files to build, separated by spaces. + +config BR2_LINUX_KERNEL_CUSTOM_DTS_PATH + string "Device Tree Source file path" + depends on BR2_LINUX_KERNEL_USE_CUSTOM_DTS + help + Path to the device tree source file + +endif + +config BR2_LINUX_KERNEL_INSTALL_TARGET + bool "Install kernel image to /boot in target" + depends on !BR2_TARGET_ROOTFS_INITRAMFS + help + Select this option to have the kernel image installed to + /boot in the target root filesystem, as is typically done on + x86/x86_64 systems. + + Note that this option also installs the Device Tree Blobs to + /boot if DTBs have been generated by the kernel build + process. + +# Linux extensions +source "linux/Config.ext.in" + endif # BR2_LINUX_KERNEL endmenu diff --git a/linux/linux-ext-rtai.mk b/linux/linux-ext-rtai.mk new file mode 100644 index 0000000000..dcfab49831 --- /dev/null +++ b/linux/linux-ext-rtai.mk @@ -0,0 +1,47 @@ +################################################################################ +# Linux RTAI extensions +# +# Patch the linux kernel with RTAI extension +################################################################################ + +ifeq ($(BR2_LINUX_KERNEL_EXT_RTAI),y) +# Add dependency to RTAI (user-space) which provide kernel patches +LINUX_DEPENDENCIES += rtai-patch + +RTAI_PATCH = $(call qstrip,$(BR2_LINUX_KERNEL_EXT_RTAI_PATCH)) + +ifeq ($(KERNEL_ARCH),i386) +RTAI_ARCH = x86 +else ifeq ($(KERNEL_ARCH),x86_64) +RTAI_ARCH = x86 +else ifeq ($(KERNEL_ARCH),powerpc) +RTAI_ARCH = ppc +else +RTAI_ARCH = $(KERNEL_ARCH) +endif + +# Prepare kernel patch +ifeq ($(RTAI_PATCH),) +define RTAI_PREPARE_KERNEL + kver=`$(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) --no-print-directory -s kernelversion` ; \ + if test -f $(RTAI_DIR)/base/arch/$(RTAI_ARCH)/patches/hal-linux-$${kver}-*patch ; then \ + support/scripts/apply-patches.sh $(LINUX_DIR) \ + $(RTAI_DIR)/base/arch/$(RTAI_ARCH)/patches/ \ + hal-linux-$${kver}-*patch ; \ + else \ + echo "No RTAI patch for your kernel version" ; \ + exit 1 ; \ + fi +endef +else +define RTAI_PREPARE_KERNEL + support/scripts/apply-patches.sh \ + $(LINUX_DIR) \ + $(dir $(RTAI_PATCH)) \ + $(notdir $(RTAI_PATCH)) +endef +endif + +LINUX_PRE_PATCH_HOOKS += RTAI_PREPARE_KERNEL + +endif #BR2_LINUX_EXT_RTAI diff --git a/linux/linux-ext-xenomai.mk b/linux/linux-ext-xenomai.mk new file mode 100644 index 0000000000..115d4a844f --- /dev/null +++ b/linux/linux-ext-xenomai.mk @@ -0,0 +1,30 @@ +################################################################################ +# Linux Adeos/Xenomai extensions +# +# Patch the linux kernel with xenomai extension +################################################################################ + +ifeq ($(BR2_LINUX_KERNEL_EXT_XENOMAI),y) +# Add dependency to xenomai (user-space) which provide ksrc part +LINUX_DEPENDENCIES += xenomai + +# Adeos patch version +XENOMAI_ADEOS_PATCH = $(call qstrip,$(BR2_LINUX_KERNEL_EXT_XENOMAI_ADEOS_PATCH)) +ifeq ($(XENOMAI_ADEOS_PATCH),) +XENOMAI_ADEOS_OPT = --default +else +XENOMAI_ADEOS_OPT = --adeos=$(XENOMAI_ADEOS_PATCH) +endif + +# Prepare kernel patch +define XENOMAI_PREPARE_KERNEL + $(XENOMAI_DIR)/scripts/prepare-kernel.sh \ + --linux=$(LINUX_DIR) \ + --arch=$(KERNEL_ARCH) \ + $(XENOMAI_ADEOS_OPT) \ + --verbose +endef + +LINUX_PRE_PATCH_HOOKS += XENOMAI_PREPARE_KERNEL + +endif #BR2_LINUX_EXT_XENOMAI diff --git a/linux/linux.mk b/linux/linux.mk index 505a0ea8db..5fe0c84bba 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -1,51 +1,113 @@ -############################################################################### +################################################################################ # -# Linux kernel 2.6 target +# Linux kernel target # -############################################################################### -LINUX26_VERSION=$(call qstrip,$(BR2_LINUX_KERNEL_VERSION)) - -# Compute LINUX26_SOURCE and LINUX26_SITE from the configuration -ifeq ($(LINUX26_VERSION),custom) -LINUX26_TARBALL:=$(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION)) -LINUX26_SITE:=$(dir $(LINUX26_TARBALL)) -LINUX26_SOURCE:=$(notdir $(LINUX26_TARBALL)) +################################################################################ + +LINUX_VERSION = $(call qstrip,$(BR2_LINUX_KERNEL_VERSION)) +LINUX_LICENSE = GPLv2 +LINUX_LICENSE_FILES = COPYING + +# Compute LINUX_SOURCE and LINUX_SITE from the configuration +ifeq ($(LINUX_VERSION),custom) +LINUX_TARBALL = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION)) +LINUX_SITE = $(patsubst %/,%,$(dir $(LINUX_TARBALL))) +LINUX_SOURCE = $(notdir $(LINUX_TARBALL)) +else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_GIT),y) +LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL)) +LINUX_SITE_METHOD = git +else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_HG),y) +LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL)) +LINUX_SITE_METHOD = hg +else +LINUX_SOURCE = linux-$(LINUX_VERSION).tar.xz +# In X.Y.Z, get X and Y. We replace dots and dashes by spaces in order +# to use the $(word) function. We support versions such as 3.1, +# 2.6.32, 2.6.32-rc1, 3.0-rc6, etc. +ifeq ($(findstring x2.6.,x$(LINUX_VERSION)),x2.6.) +LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v2.6/ else -LINUX26_SOURCE:=linux-$(LINUX26_VERSION).tar.bz2 -LINUX26_SITE:=$(BR2_KERNEL_MIRROR) +LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v3.x/ endif +# release candidates are in testing/ subdir +ifneq ($(findstring -rc,$(LINUX_VERSION)),) +LINUX_SITE := $(LINUX_SITE)testing/ +endif # -rc +endif + +LINUX_PATCHES = $(call qstrip,$(BR2_LINUX_KERNEL_PATCH)) -LINUX26_DIR:=$(BUILD_DIR)/linux-$(LINUX26_VERSION) -LINUX26_PATCH=$(call qstrip,$(BR2_LINUX_KERNEL_PATCH)) +LINUX_INSTALL_IMAGES = YES +LINUX_DEPENDENCIES += host-kmod host-lzop -LINUX26_MAKE_FLAGS = \ +ifeq ($(BR2_LINUX_KERNEL_UBOOT_IMAGE),y) + LINUX_DEPENDENCIES += host-uboot-tools +endif + +LINUX_MAKE_FLAGS = \ HOSTCC="$(HOSTCC)" \ HOSTCFLAGS="$(HOSTCFLAGS)" \ ARCH=$(KERNEL_ARCH) \ INSTALL_MOD_PATH=$(TARGET_DIR) \ CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" \ - LZMA="$(LZMA)" + DEPMOD=$(HOST_DIR)/sbin/depmod # Get the real Linux version, which tells us where kernel modules are # going to be installed in the target filesystem. -LINUX26_VERSION_PROBED = $(shell $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) --no-print-directory -s kernelrelease) +LINUX_VERSION_PROBED = $(shell $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) --no-print-directory -s kernelrelease) -ifeq ($(BR2_LINUX_KERNEL_UIMAGE),y) -ifeq ($(KERNEL_ARCH),blackfin) -# a uImage, but with a different file name -LINUX26_IMAGE_NAME=vmImage -else -LINUX26_IMAGE_NAME=uImage +ifeq ($(BR2_LINUX_KERNEL_USE_INTREE_DTS),y) +KERNEL_DTS_NAME = $(call qstrip,$(BR2_LINUX_KERNEL_INTREE_DTS_NAME)) +else ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_DTS),y) +KERNEL_DTS_NAME = $(basename $(notdir $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)))) endif -LINUX26_DEPENDENCIES+=ubootaml + +ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT)$(KERNEL_DTS_NAME),y) +$(error No kernel device tree source specified, check your \ +BR2_LINUX_KERNEL_USE_INTREE_DTS / BR2_LINUX_KERNEL_USE_CUSTOM_DTS settings) +endif + +ifeq ($(BR2_LINUX_KERNEL_APPENDED_DTB),y) +ifneq ($(words $(KERNEL_DTS_NAME)),1) +$(error Kernel with appended device tree needs exactly one DTS source.\ + Check BR2_LINUX_KERNEL_INTREE_DTS_NAME or BR2_LINUX_KERNEL_CUSTOM_DTS_PATH.) +endif +endif + +KERNEL_DTBS = $(addsuffix .dtb,$(KERNEL_DTS_NAME)) + +ifeq ($(BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM),y) +LINUX_IMAGE_NAME=$(call qstrip,$(BR2_LINUX_KERNEL_IMAGE_TARGET_NAME)) +else +ifeq ($(BR2_LINUX_KERNEL_UIMAGE),y) +LINUX_IMAGE_NAME=uImage +LINUX_DEPENDENCIES+=ubootaml +else ifeq ($(BR2_LINUX_KERNEL_APPENDED_UIMAGE),y) +LINUX_IMAGE_NAME=uImage else ifeq ($(BR2_LINUX_KERNEL_BZIMAGE),y) -LINUX26_IMAGE_NAME=bzImage +LINUX_IMAGE_NAME=bzImage else ifeq ($(BR2_LINUX_KERNEL_ZIMAGE),y) -LINUX26_IMAGE_NAME=zImage +LINUX_IMAGE_NAME=zImage +else ifeq ($(BR2_LINUX_KERNEL_APPENDED_ZIMAGE),y) +LINUX_IMAGE_NAME=zImage +else ifeq ($(BR2_LINUX_KERNEL_CUIMAGE),y) +LINUX_IMAGE_NAME=cuImage.$(KERNEL_DTS_NAME) +else ifeq ($(BR2_LINUX_KERNEL_SIMPLEIMAGE),y) +LINUX_IMAGE_NAME=simpleImage.$(KERNEL_DTS_NAME) +else ifeq ($(BR2_LINUX_KERNEL_LINUX_BIN),y) +LINUX_IMAGE_NAME=linux.bin else ifeq ($(BR2_LINUX_KERNEL_VMLINUX_BIN),y) -LINUX26_IMAGE_NAME=vmlinux.bin +LINUX_IMAGE_NAME=vmlinux.bin else ifeq ($(BR2_LINUX_KERNEL_VMLINUX),y) -LINUX26_IMAGE_NAME=vmlinux +LINUX_IMAGE_NAME=vmlinux +else ifeq ($(BR2_LINUX_KERNEL_VMLINUZ),y) +LINUX_IMAGE_NAME=vmlinuz +endif +endif + +LINUX_KERNEL_UIMAGE_LOADADDR=$(call qstrip,$(BR2_LINUX_KERNEL_UIMAGE_LOADADDR)) +ifneq ($(LINUX_KERNEL_UIMAGE_LOADADDR),) +LINUX_MAKE_FLAGS+=LOADADDR="$(LINUX_KERNEL_UIMAGE_LOADADDR)" endif # Compute the arch path, since i386 and x86_64 are in arch/x86 and not @@ -53,166 +115,217 @@ endif # for bzImage, arch/i386 and arch/x86_64 do not exist when copying the # defconfig file. ifeq ($(KERNEL_ARCH),i386) -KERNEL_ARCH_PATH=$(LINUX26_DIR)/arch/x86 +KERNEL_ARCH_PATH=$(LINUX_DIR)/arch/x86 else ifeq ($(KERNEL_ARCH),x86_64) -KERNEL_ARCH_PATH=$(LINUX26_DIR)/arch/x86 +KERNEL_ARCH_PATH=$(LINUX_DIR)/arch/x86 else -KERNEL_ARCH_PATH=$(LINUX26_DIR)/arch/$(KERNEL_ARCH) +KERNEL_ARCH_PATH=$(LINUX_DIR)/arch/$(KERNEL_ARCH) endif ifeq ($(BR2_LINUX_KERNEL_VMLINUX),y) -LINUX26_IMAGE_PATH=$(LINUX26_DIR)/$(LINUX26_IMAGE_NAME) +LINUX_IMAGE_PATH=$(LINUX_DIR)/$(LINUX_IMAGE_NAME) +else ifeq ($(BR2_LINUX_KERNEL_VMLINUZ),y) +LINUX_IMAGE_PATH=$(LINUX_DIR)/$(LINUX_IMAGE_NAME) else ifeq ($(KERNEL_ARCH),avr32) -LINUX26_IMAGE_PATH=$(KERNEL_ARCH_PATH)/boot/images/$(LINUX26_IMAGE_NAME) +LINUX_IMAGE_PATH=$(KERNEL_ARCH_PATH)/boot/images/$(LINUX_IMAGE_NAME) else -LINUX26_IMAGE_PATH=$(KERNEL_ARCH_PATH)/boot/$(LINUX26_IMAGE_NAME) +LINUX_IMAGE_PATH=$(KERNEL_ARCH_PATH)/boot/$(LINUX_IMAGE_NAME) endif endif # BR2_LINUX_KERNEL_VMLINUX -define DOWNLOAD_GIT_KERNEL - ( mkdir -p $(DL_DIR)/git; export GIT_DIR=$(DL_DIR)/git/linux/.git; \ - (test -d $(DL_DIR)/git/linux/.git && $(GIT) cat-file -e $(LINUX26_VERSION) 2>/dev/null || \ - (test -d $(DL_DIR)/git/linux/.git && $(GIT) fetch --all && \ - $(GIT) cat-file -e $(LINUX26_VERSION) 2>/dev/null) || \ - (test -d $(DL_DIR)/git/linux/.git && $(GIT) remote -v show -n | grep "$(LINUX26_SITE)" > /dev/null || \ - (test -d $(DL_DIR)/git/linux/.git && $(GIT) ls-remote $(LINUX26_SITE) >/dev/null 2>/dev/null && \ - $(GIT) remote add -f `basename $(LINUX26_SITE)` $(LINUX26_SITE) && $(GIT) cat-file -e $(LINUX26_VERSION))) || \ - (test ! -e $(DL_DIR)/git/linux/.git && $(GIT) clone --no-checkout $(LINUX26_SITE) $(DL_DIR)/git/linux) && \ - $(GIT) cat-file -e $(LINUX26_VERSION) 2>/dev/null)) || \ - (echo "Error extracting revision: $(LINUX26_VERSION)" ; false) +define LINUX_DOWNLOAD_PATCHES + $(if $(LINUX_PATCHES), + @$(call MESSAGE,"Download additional patches")) + $(foreach patch,$(filter ftp://% http://%,$(LINUX_PATCHES)),\ + $(call DOWNLOAD,$(patch))$(sep)) endef -define EXTRACT_GIT_KERNEL - $(Q)( \ - if test -d $(DL_DIR)/git/linux/.git -a ! -s $(DL_DIR)/$(LINUX26_SOURCE) ; then \ - $(call MESSAGE,"Checking out cached revision"); \ - $(GIT) --work-tree=$(@D) --git-dir=$(DL_DIR)/git/linux/.git checkout -f -q $(LINUX26_VERSION); \ - touch $(LINUX26_DIR)/.stamp_extracted; touch $(LINUX26_DIR)/.stamp_patched; \ - else \ - $(call MESSAGE,"Extracting"); \ - $(INFLATE$(suffix $(LINUX26_SOURCE))) $(DL_DIR)/$(LINUX26_SOURCE) | \ - $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) - ;\ - fi; \ - ) -endef +LINUX_POST_DOWNLOAD_HOOKS += LINUX_DOWNLOAD_PATCHES -# Download -$(LINUX26_DIR)/.stamp_downloaded: - @$(call MESSAGE,"Downloading kernel") - $(Q)$(DOWNLOAD_GIT_KERNEL) - mkdir -p $(@D) - touch $@ - -# Extraction -$(LINUX26_DIR)/.stamp_extracted: $(LINUX26_DIR)/.stamp_downloaded - @$(call MESSAGE,"Extracting kernel") - mkdir -p $(@D) - $(EXTRACT_GIT_KERNEL) - -# Patch -$(LINUX26_DIR)/.stamp_patched: $(LINUX26_DIR)/.stamp_extracted - @$(call MESSAGE,"Patching kernel") - for p in $(LINUX26_PATCH) ; do \ +define LINUX_APPLY_PATCHES + for p in $(LINUX_PATCHES) ; do \ if echo $$p | grep -q -E "^ftp://|^http://" ; then \ - toolchain/patch-kernel.sh $(@D) $(DL_DIR) `basename $$p` ; \ + support/scripts/apply-patches.sh $(@D) $(DL_DIR) `basename $$p` ; \ elif test -d $$p ; then \ - toolchain/patch-kernel.sh $(@D) $$p linux-\*.patch ; \ + support/scripts/apply-patches.sh $(@D) $$p linux-\*.patch ; \ else \ - toolchain/patch-kernel.sh $(@D) `dirname $$p` `basename $$p` ; \ + support/scripts/apply-patches.sh $(@D) `dirname $$p` `basename $$p` ; \ fi \ done - $(Q)touch $@ +endef + +LINUX_POST_PATCH_HOOKS += LINUX_APPLY_PATCHES -# Configuration -$(LINUX26_DIR)/.stamp_configured: $(LINUX26_DIR)/.stamp_patched - @$(call MESSAGE,"Configuring kernel") ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y) - $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX26_MAKE_FLAGS) -C $(@D) $(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG))_defconfig +KERNEL_SOURCE_CONFIG = $(KERNEL_ARCH_PATH)/configs/$(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG))_defconfig else ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG),y) - cp $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE) $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig - $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX26_MAKE_FLAGS) -C $(@D) buildroot_defconfig - rm $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig +KERNEL_SOURCE_CONFIG = $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE) endif -ifeq ($(BR2_ARM_EABI),y) - $(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(@D)/.config) -else - $(call KCONFIG_DISABLE_OPT,CONFIG_AEABI,$(@D)/.config) -endif -ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y) + +define LINUX_CONFIGURE_CMDS + cp $(KERNEL_SOURCE_CONFIG) $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig + $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) buildroot_defconfig + rm $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig + $(if $(BR2_arm)$(BR2_armeb), + $(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(@D)/.config)) # As the kernel gets compiled before root filesystems are - # built, we create a fake initramfs file list. It'll be - # replaced later by the real list, and the kernel will be + # built, we create a fake cpio file. It'll be + # replaced later by the real cpio archive, and the kernel will be # rebuilt using the linux26-rebuild-with-initramfs target. - touch $(BINARIES_DIR)/rootfs.initramfs - $(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(@D)/.config) - $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,\"$(BINARIES_DIR)/rootfs.initramfs\",$(@D)/.config) - $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_UID,0,$(@D)/.config) - $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_GID,0,$(@D)/.config) - $(call KCONFIG_DISABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_NONE,$(@D)/.config) - $(call KCONFIG_ENABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_GZIP,$(@D)/.config) -endif -ifneq ($(BR2_ROOTFS_DEVICE_CREATION_STATIC),y) - $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS,$(@D)/.config) - $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(@D)/.config) -endif -ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),y) - $(call KCONFIG_SET_OPT,CONFIG_UEVENT_HELPER_PATH,\"/sbin/mdev\",$(@D)/.config) -endif - $(TARGET_MAKE_ENV) $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(@D) oldconfig - $(Q)touch $@ + $(if $(BR2_TARGET_ROOTFS_INITRAMFS), + touch $(BINARIES_DIR)/rootfs.cpio + $(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(@D)/.config) + $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,\"$(BINARIES_DIR)/rootfs.cpio\",$(@D)/.config) + $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_UID,0,$(@D)/.config) + $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_GID,0,$(@D)/.config)) + $(if $(BR2_ROOTFS_DEVICE_CREATION_STATIC),, + $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(@D)/.config)) + $(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV), + $(call KCONFIG_SET_OPT,CONFIG_UEVENT_HELPER_PATH,\"/sbin/mdev\",$(@D)/.config)) + $(if $(BR2_PACKAGE_SYSTEMD), + $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS,$(@D)/.config)) + $(if $(BR2_LINUX_KERNEL_APPENDED_DTB), + $(call KCONFIG_ENABLE_OPT,CONFIG_ARM_APPENDED_DTB,$(@D)/.config)) + yes '' | $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) oldconfig +endef + +ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT),y) +ifeq ($(BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT),) +define LINUX_BUILD_DTB + $(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(KERNEL_DTBS) +endef +define LINUX_INSTALL_DTB + # dtbs moved from arch//boot to arch//boot/dts since 3.8-rc1 + cp $(addprefix \ + $(KERNEL_ARCH_PATH)/boot/$(if $(wildcard \ + $(addprefix $(KERNEL_ARCH_PATH)/boot/dts/,$(KERNEL_DTBS))),dts/),$(KERNEL_DTBS)) \ + $(BINARIES_DIR)/ +endef +define LINUX_INSTALL_DTB_TARGET + # dtbs moved from arch//boot to arch//boot/dts since 3.8-rc1 + cp $(addprefix \ + $(KERNEL_ARCH_PATH)/boot/$(if $(wildcard \ + $(addprefix $(KERNEL_ARCH_PATH)/boot/dts/,$(KERNEL_DTBS))),dts/),$(KERNEL_DTBS)) \ + $(TARGET_DIR)/boot/ +endef +endif +endif + +ifeq ($(BR2_LINUX_KERNEL_APPENDED_DTB),y) +# dtbs moved from arch/$ARCH/boot to arch/$ARCH/boot/dts since 3.8-rc1 +define LINUX_APPEND_DTB + if [ -e $(KERNEL_ARCH_PATH)/boot/$(KERNEL_DTS_NAME).dtb ]; then \ + cat $(KERNEL_ARCH_PATH)/boot/$(KERNEL_DTS_NAME).dtb; \ + else \ + cat $(KERNEL_ARCH_PATH)/boot/dts/$(KERNEL_DTS_NAME).dtb; \ + fi >> $(KERNEL_ARCH_PATH)/boot/zImage +endef +ifeq ($(BR2_LINUX_KERNEL_APPENDED_UIMAGE),y) +# We need to generate a new u-boot image that takes into +# account the extra-size added by the device tree at the end +# of the image. To do so, we first need to retrieve both load +# address and entry point for the kernel from the already +# generate uboot image before using mkimage -l. +LINUX_APPEND_DTB += $(sep) MKIMAGE_ARGS=`$(MKIMAGE) -l $(LINUX_IMAGE_PATH) |\ + sed -n -e 's/Image Name:[ ]*\(.*\)/-n \1/p' -e 's/Load Address:/-a/p' -e 's/Entry Point:/-e/p'`; \ + $(MKIMAGE) -A $(MKIMAGE_ARCH) -O linux \ + -T kernel -C none $${MKIMAGE_ARGS} \ + -d $(KERNEL_ARCH_PATH)/boot/zImage $(LINUX_IMAGE_PATH); +endif +endif # Compilation. We make sure the kernel gets rebuilt when the # configuration has changed. -$(LINUX26_DIR)/.stamp_compiled: $(LINUX26_DIR)/.stamp_configured $(LINUX26_DIR)/.config - @$(call MESSAGE,"Compiling kernel") - $(TARGET_MAKE_ENV) $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(@D) $(LINUX26_IMAGE_NAME) - @if [ $(shell grep -c "CONFIG_MODULES=y" $(LINUX26_DIR)/.config) != 0 ] ; then \ - $(TARGET_MAKE_ENV) $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(@D) modules ; \ +define LINUX_BUILD_CMDS + $(if $(BR2_LINUX_KERNEL_USE_CUSTOM_DTS), + cp $(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH) $(KERNEL_ARCH_PATH)/boot/dts/) + $(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_IMAGE_NAME) + @if grep -q "CONFIG_MODULES=y" $(@D)/.config; then \ + $(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) modules ; \ fi - $(Q)touch $@ + $(LINUX_BUILD_DTB) + $(LINUX_APPEND_DTB) +endef + + +ifeq ($(BR2_LINUX_KERNEL_INSTALL_TARGET),y) +define LINUX_INSTALL_KERNEL_IMAGE_TO_TARGET + install -m 0644 -D $(LINUX_IMAGE_PATH) $(TARGET_DIR)/boot/$(LINUX_IMAGE_NAME) + $(LINUX_INSTALL_DTB_TARGET) +endef +endif + + +define LINUX_INSTALL_HOST_TOOLS + # Installing dtc (device tree compiler) as host tool, if selected + if grep -q "CONFIG_DTC=y" $(@D)/.config; then \ + $(INSTALL) -D -m 0755 $(@D)/scripts/dtc/dtc $(HOST_DIR)/usr/bin/dtc ; \ + fi +endef + -# Installation -$(LINUX26_DIR)/.stamp_installed: $(LINUX26_DIR)/.stamp_compiled - @$(call MESSAGE,"Installing kernel") - cp $(LINUX26_IMAGE_PATH) $(BINARIES_DIR)/$(LINUX26_IMAGE_NAME)-$(LINUX26_VERSION_PROBED) +define LINUX_INSTALL_IMAGES_CMDS + cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR)/$(LINUX_IMAGE_NAME)-$(LINUX_VERSION_PROBED) + $(LINUX_INSTALL_DTB) +endef + +define LINUX_INSTALL_TARGET_CMDS + $(LINUX_INSTALL_KERNEL_IMAGE_TO_TARGET) # Install modules and remove symbolic links pointing to build # directories, not relevant on the target - @if [ $(shell grep -c "CONFIG_MODULES=y" $(LINUX26_DIR)/.config) != 0 ] ; then \ - $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX26_MAKE_FLAGS) -C $(@D) \ - DEPMOD="$(HOST_DIR)/usr/sbin/depmod" modules_install ; \ - rm -f $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/build ; \ - rm -f $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/source ; \ + @if grep -q "CONFIG_MODULES=y" $(@D)/.config; then \ + $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) modules_install; \ + rm -f $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/build ; \ + rm -f $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/source ; \ fi - $(Q)touch $@ + $(LINUX_INSTALL_HOST_TOOLS) +endef + +include $(sort $(wildcard linux/linux-ext-*.mk)) -linux linux26: host-module-init-tools $(LINUX26_DEPENDENCIES) $(LINUX26_DIR)/.stamp_installed +$(eval $(generic-package)) -linux-menuconfig linux-xconfig linux-gconfig linux-nconfig linux26-menuconfig linux26-xconfig linux26-gconfig linux26-nconfig: dirs $(LINUX26_DIR)/.stamp_configured - $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) \ +ifeq ($(BR2_LINUX_KERNEL),y) +linux-menuconfig linux-xconfig linux-gconfig linux-nconfig linux26-menuconfig linux26-xconfig linux26-gconfig linux26-nconfig: dirs linux-configure + $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) \ + $(subst linux-,,$(subst linux26-,,$@)) + rm -f $(LINUX_DIR)/.stamp_{built,target_installed,images_installed} + +linux-savedefconfig linux26-savedefconfig: dirs linux-configure + $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) \ $(subst linux-,,$(subst linux26-,,$@)) -# Support for rebuilding the kernel after the initramfs file list has -# been generated in $(BINARIES_DIR)/rootfs.initramfs. -$(LINUX26_DIR)/.stamp_initramfs_rebuilt: $(LINUX26_DIR)/.stamp_installed $(BINARIES_DIR)/rootfs.initramfs +ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG),y) +linux-update-config linux26-update-config: linux-configure $(LINUX_DIR)/.config + cp -f $(LINUX_DIR)/.config $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE) + +linux-update-defconfig linux26-update-defconfig: linux-savedefconfig + cp -f $(LINUX_DIR)/defconfig $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE) +else +linux-update-config linux26-update-config: ; +linux-update-defconfig linux26-update-defconfig: ; +endif +endif + +# Support for rebuilding the kernel after the cpio archive has +# been generated in $(BINARIES_DIR)/rootfs.cpio. +$(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_target_installed $(LINUX_DIR)/.stamp_images_installed $(BINARIES_DIR)/rootfs.cpio @$(call MESSAGE,"Rebuilding kernel with initramfs") - # Remove the previously generated initramfs which was empty, - # to make sure the kernel will actually regenerate it. - $(RM) -f $(@D)/usr/initramfs_data.cpio* # Build the kernel. - $(TARGET_MAKE_ENV) $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(@D) $(LINUX26_IMAGE_NAME) + $(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_IMAGE_NAME) + $(LINUX_APPEND_DTB) # Copy the kernel image to its final destination - cp $(LINUX26_IMAGE_PATH) $(BINARIES_DIR) + cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR) + # If there is a .ub file copy it to the final destination + test ! -f $(LINUX_IMAGE_PATH).ub || cp $(LINUX_IMAGE_PATH).ub $(BINARIES_DIR) $(Q)touch $@ # The initramfs building code must make sure this target gets called # after it generated the initramfs list of files. -linux-rebuild-with-initramfs linux26-rebuild-with-initramfs: $(LINUX26_DIR)/.stamp_initramfs_rebuilt - -ifeq ($(BR2_LINUX_KERNEL),y) -TARGETS+=linux26 -endif +linux-rebuild-with-initramfs linux26-rebuild-with-initramfs: $(LINUX_DIR)/.stamp_initramfs_rebuilt # Checks to give errors that the user can understand ifeq ($(filter source,$(MAKECMDGOALS)),) diff --git a/package/Config.in b/package/Config.in index a1d130d44d..93ebda2939 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1,7 +1,6 @@ -menu "Package Selection for the target" +menu "Target packages" source "package/busybox/Config.in" -source "package/customize/Config.in" # AMLogic libs and programs source "package/amlogic/Config.in" @@ -9,33 +8,80 @@ source "package/amlogic/Config.in" #Non-buildroot libs and programs source "package/thirdparty/Config.in" -# Audio and video applications -source "package/multimedia/Config.in" +menu "Audio and video applications" +source "package/alsa-utils/Config.in" +source "package/aumix/Config.in" +source "package/bellagio/Config.in" +source "package/faad2/Config.in" +source "package/ffmpeg/Config.in" +source "package/flac/Config.in" +source "package/gstreamer/Config.in" +source "package/gstreamer1/Config.in" +source "package/lame/Config.in" +source "package/libvpx/Config.in" +source "package/madplay/Config.in" +source "package/mpd/Config.in" +source "package/mpg123/Config.in" +source "package/mplayer/Config.in" +source "package/musepack/Config.in" +source "package/on2-8170-libs/Config.in" +source "package/opus-tools/Config.in" +source "package/pulseaudio/Config.in" +source "package/tidsp-binaries/Config.in" +source "package/tstools/Config.in" +source "package/vorbis-tools/Config.in" +source "package/wavpack/Config.in" +source "package/yavta/Config.in" +endmenu menu "Compressors and decompressors" source "package/bzip2/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/gzip/Config.in" endif -source "package/lzop/Config.in" +source "package/infozip/Config.in" source "package/lzma/Config.in" +source "package/lzop/Config.in" source "package/xz/Config.in" endmenu menu "Debugging, profiling and benchmark" +source "package/bonnie/Config.in" +source "package/cache-calibrator/Config.in" source "package/dhrystone/Config.in" source "package/dmalloc/Config.in" +source "package/dropwatch/Config.in" +source "package/dstat/Config.in" +source "package/duma/Config.in" +source "package/gdb/Config.in" +source "package/iozone/Config.in" source "package/kexec/Config.in" +source "package/latencytop/Config.in" source "package/lmbench/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/lsof/Config.in" +endif source "package/ltp-testsuite/Config.in" source "package/ltrace/Config.in" +source "package/lttng-babeltrace/Config.in" +source "package/lttng-modules/Config.in" +source "package/lttng-tools/Config.in" source "package/memstat/Config.in" source "package/netperf/Config.in" source "package/oprofile/Config.in" +source "package/pax-utils/Config.in" +source "package/perf/Config.in" +source "package/pv/Config.in" +source "package/ramsmp/Config.in" +source "package/ramspeed/Config.in" +source "package/rt-tests/Config.in" source "package/strace/Config.in" -source "package/whetstone/Config.in" +source "package/stress/Config.in" +source "package/sysprof/Config.in" +source "package/tinymembench/Config.in" +source "package/trace-cmd/Config.in" source "package/valgrind/Config.in" +source "package/whetstone/Config.in" endmenu menu "Development tools" @@ -44,6 +90,7 @@ source "package/automake/Config.in" source "package/binutils/Config.in" source "package/bison/Config.in" source "package/bsdiff/Config.in" +source "package/bustle/Config.in" source "package/ccache/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/coreutils/Config.in" @@ -53,7 +100,6 @@ if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/diffutils/Config.in" endif source "package/distcc/Config.in" -source "package/fakeroot/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/findutils/Config.in" endif @@ -61,45 +107,77 @@ source "package/flex/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/gawk/Config.in" endif -source "toolchain/gcc/Config.in.2" source "package/gettext/Config.in" -source "package/gmp/Config.in" +source "package/git/Config.in" source "package/gperf/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/grep/Config.in" endif source "package/intltool/Config.in" -source "package/make/Config.in" -source "package/mpc/Config.in" -source "package/mpfr/Config.in" +source "package/jq/Config.in" source "package/libtool/Config.in" source "package/m4/Config.in" +source "package/make/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/patch/Config.in" endif source "package/pkg-config/Config.in" +source "package/pkgconf/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/sed/Config.in" endif source "package/sstrip/Config.in" +source "package/subversion/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/tar/Config.in" endif +source "package/tree/Config.in" +source "package/vala/Config.in" +source "package/yasm/Config.in" +endmenu + +menu "Filesystem and flash utilities" +source "package/cifs-utils/Config.in" +source "package/cramfs/Config.in" +source "package/curlftpfs/Config.in" +source "package/dosfstools/Config.in" +source "package/e2fsprogs/Config.in" +source "package/ecryptfs-utils/Config.in" +source "package/exfat/Config.in" +source "package/exfat-utils/Config.in" +source "package/f2fs-tools/Config.in" +source "package/flashbench/Config.in" +source "package/genext2fs/Config.in" +source "package/genromfs/Config.in" +source "package/kobs-ng/Config.in" +source "package/makedevs/Config.in" +source "package/mtd/Config.in" +source "package/nfs-utils/Config.in" +source "package/ntfs-3g/Config.in" +source "package/squashfs/Config.in" +source "package/squashfs3/Config.in" +source "package/sshfs/Config.in" +source "package/sunxi-tools/Config.in" +source "package/unionfs/Config.in" +source "package/xfsprogs/Config.in" endmenu menu "Games" -source "package/games/gnuchess/Config.in" -source "package/games/prboom/Config.in" -source "package/games/doom-wad/Config.in" -source "package/games/rubix/Config.in" +source "package/doom-wad/Config.in" +source "package/gnuchess/Config.in" +source "package/prboom/Config.in" +source "package/rubix/Config.in" endmenu menu "Graphic libraries and applications (graphic/text)" comment "Graphic applications" +source "package/gnuplot/Config.in" +source "package/jhead/Config.in" source "package/rrdtool/Config.in" -comment "graphic libraries" +comment "Graphic libraries" +source "package/cegui06/Config.in" source "package/directfb/Config.in" source "package/directfb-examples/Config.in" source "package/divine/Config.in" @@ -108,38 +186,48 @@ source "package/fbgrab/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/fbset/Config.in" endif +source "package/fbterm/Config.in" source "package/fbv/Config.in" +source "package/fb-test-app/Config.in" source "package/imagemagick/Config.in" source "package/linux-fusion/Config.in" source "package/lite/Config.in" +source "package/ocrad/Config.in" +source "package/psplash/Config.in" source "package/sawman/Config.in" source "package/sdl/Config.in" +source "package/sdl_gfx/Config.in" source "package/sdl_image/Config.in" source "package/sdl_mixer/Config.in" -source "package/sdl_sound/Config.in" source "package/sdl_net/Config.in" +source "package/sdl_sound/Config.in" source "package/sdl_ttf/Config.in" -source "package/sdl_gfx/Config.in" -comment "other GUIs" +comment "Other GUIs" +source "package/efl/Config.in" source "package/qt/Config.in" -source "package/x11r7/Config.in" -comment "X libraries and helper libraries" -source "package/liberation/Config.in" -source "package/libsexy/Config.in" +if BR2_PACKAGE_QT +comment "QT libraries and helper libraries" +source "package/grantlee/Config.in" +source "package/qextserialport/Config.in" +source "package/qjson/Config.in" +source "package/qtuio/Config.in" +source "package/qwt/Config.in" +endif -comment "X Window managers" -source "package/matchbox/Config.in" -source "package/metacity/Config.in" -source "package/blackbox/Config.in" +source "package/qt5/Config.in" +source "package/x11r7/Config.in" +source "package/weston/Config.in" comment "X applications" source "package/alsamixergui/Config.in" source "package/docker/Config.in" -source "package/gqview/Config.in" +source "package/feh/Config.in" +source "package/freerdp/Config.in" source "package/gmpc/Config.in" source "package/gob2/Config.in" +source "package/gqview/Config.in" source "package/gtkperf/Config.in" source "package/leafpad/Config.in" source "package/midori/Config.in" @@ -149,113 +237,252 @@ source "package/sylpheed/Config.in" source "package/synergy/Config.in" source "package/torsmo/Config.in" source "package/x11vnc/Config.in" +source "package/xscreensaver/Config.in" source "package/xstroke/Config.in" source "package/xterm/Config.in" source "package/xvkbd/Config.in" + +comment "X libraries and helper libraries" +source "package/liberation/Config.in" +source "package/libsexy/Config.in" +source "package/x11r7/xkeyboard-config/Config.in" + +comment "X window managers" +source "package/blackbox/Config.in" +source "package/enlightenment/Config.in" +source "package/fluxbox/Config.in" +source "package/matchbox/Config.in" +source "package/metacity/Config.in" endmenu menu "Hardware handling" +menu "Firmware" +source "package/am33x-cm3/Config.in" +source "package/b43-firmware/Config.in" +source "package/linux-firmware/Config.in" +source "package/rpi-firmware/Config.in" +source "package/sunxi-boards/Config.in" +source "package/ux500-firmware/Config.in" +source "package/zd1211-firmware/Config.in" +endmenu +source "package/a10disp/Config.in" source "package/acpid/Config.in" source "package/cdrkit/Config.in" -source "package/cramfs/Config.in" +source "package/cryptsetup/Config.in" source "package/dbus/Config.in" source "package/dbus-glib/Config.in" source "package/dbus-python/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/devmem2/Config.in" endif +source "package/dmidecode/Config.in" source "package/dmraid/Config.in" -source "package/dosfstools/Config.in" -source "package/e2fsprogs/Config.in" +source "package/dvb-apps/Config.in" +source "package/dvbsnoop/Config.in" source "package/eeprog/Config.in" +source "package/evtest/Config.in" +source "package/fan-ctrl/Config.in" source "package/fconfig/Config.in" source "package/fis/Config.in" +source "package/flashrom/Config.in" +source "package/fmtools/Config.in" +source "package/freescale-imx/Config.in" +source "package/fxload/Config.in" source "package/gadgetfs-test/Config.in" -source "package/genext2fs/Config.in" -source "package/genromfs/Config.in" source "package/gpsd/Config.in" +source "package/gptfdisk/Config.in" source "package/gvfs/Config.in" -source "package/hal/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/hdparm/Config.in" endif source "package/hwdata/Config.in" source "package/i2c-tools/Config.in" +source "package/input-event-daemon/Config.in" source "package/input-tools/Config.in" source "package/iostat/Config.in" source "package/irda-utils/Config.in" source "package/kbd/Config.in" +source "package/lcdproc/Config.in" source "package/lm-sensors/Config.in" +source "package/lshw/Config.in" source "package/lsuio/Config.in" source "package/lvm2/Config.in" -source "package/makedevs/Config.in" source "package/mdadm/Config.in" +source "package/media-ctl/Config.in" source "package/memtester/Config.in" -source "package/mtd/Config.in" -source "package/ntfs-3g/Config.in" -source "package/ntfsprogs/Config.in" +source "package/minicom/Config.in" +source "package/nanocom/Config.in" +source "package/neard/Config.in" +source "package/ofono/Config.in" +source "package/ola/Config.in" +source "package/on2-8170-modules/Config.in" +source "package/open2300/Config.in" +source "package/openocd/Config.in" +source "package/openpowerlink/Config.in" +source "package/owl-linux/Config.in" +source "package/parted/Config.in" source "package/pciutils/Config.in" +source "package/picocom/Config.in" +source "package/read-edid/Config.in" source "package/rng-tools/Config.in" +source "package/rpi-userland/Config.in" +source "package/sane-backends/Config.in" source "package/sdparm/Config.in" source "package/setserial/Config.in" -if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS -# busybox has fdisk -source "package/sfdisk/Config.in" -endif +source "package/sg3_utils/Config.in" source "package/smartmontools/Config.in" -source "package/squashfs/Config.in" -source "package/squashfs3/Config.in" -source "package/sshfs/Config.in" +source "package/snowball-hdmiservice/Config.in" +source "package/sredird/Config.in" +source "package/statserial/Config.in" +source "package/sunxi-cedarx/Config.in" +source "package/sunxi-mali/Config.in" +source "package/sunxi-mali-prop/Config.in" source "package/sysstat/Config.in" +source "package/ti-gfx/Config.in" +source "package/ti-utils/Config.in" +source "package/uboot-tools/Config.in" source "package/udev/Config.in" +source "package/udisks/Config.in" source "package/usb_modeswitch/Config.in" +source "package/usb_modeswitch_data/Config.in" source "package/usbmount/Config.in" source "package/usbutils/Config.in" source "package/wipe/Config.in" -source "package/xfsprogs/Config.in" +source "package/w_scan/Config.in" endmenu menu "Interpreter languages and scripting" +source "package/erlang/Config.in" +source "package/enscript/Config.in" source "package/haserl/Config.in" -source "package/java/jamvm/Config.in" +source "package/jamvm/Config.in" +source "package/jimtcl/Config.in" source "package/lua/Config.in" -if BR2_PACKAGE_LUA -menu "LUA libraries/modules" +source "package/luajit/Config.in" +if BR2_PACKAGE_LUA || BR2_PACKAGE_LUAJIT +menu "Lua libraries/modules" source "package/cgilua/Config.in" source "package/copas/Config.in" source "package/coxpcall/Config.in" +source "package/lbase64/Config.in" +source "package/luabitop/Config.in" +source "package/luacjson/Config.in" +source "package/luacrypto/Config.in" +source "package/luaexpat/Config.in" +source "package/luaexpatutils/Config.in" source "package/luafilesystem/Config.in" +source "package/luaposix/Config.in" +source "package/luasec/Config.in" source "package/luasocket/Config.in" +source "package/luasql/Config.in" +source "package/lua-ev/Config.in" +source "package/lua-msgpack-native/Config.in" +source "package/orbit/Config.in" source "package/rings/Config.in" source "package/wsapi/Config.in" source "package/xavante/Config.in" endmenu endif -source "package/microperl/Config.in" +source "package/nodejs/Config.in" +source "package/perl/Config.in" +if BR2_PACKAGE_PERL +menu "Perl libraries/modules" +source "package/cpanminus/Config.in" +endmenu +endif source "package/php/Config.in" source "package/python/Config.in" +if BR2_PACKAGE_PYTHON +menu "external python modules" +source "package/python-bottle/Config.in" +source "package/python-crc16/Config.in" +source "package/python-dpkt/Config.in" +source "package/python-id3/Config.in" +source "package/python-ipy/Config.in" +source "package/python-mad/Config.in" +source "package/python-meld3/Config.in" +source "package/python-netifaces/Config.in" +source "package/python-nfc/Config.in" +source "package/python-protobuf/Config.in" +source "package/python-pygame/Config.in" +source "package/python-pyparsing/Config.in" +source "package/python-pyro/Config.in" +source "package/python-pyzmq/Config.in" +source "package/python-serial/Config.in" +source "package/python-setuptools/Config.in" +source "package/python-thrift/Config.in" +endmenu +endif +source "package/python3/Config.in" source "package/ruby/Config.in" source "package/tcl/Config.in" +if BR2_PACKAGE_TCL +menu "tcl libraries/modules" +source "package/tcllib/Config.in" +endmenu +endif endmenu menu "Libraries" +menu "Audio/Sound" +source "package/alsa-lib/Config.in" +source "package/audiofile/Config.in" +source "package/celt051/Config.in" +source "package/fdk-aac/Config.in" +source "package/libao/Config.in" +source "package/libcdaudio/Config.in" +source "package/libcue/Config.in" +source "package/libcuefile/Config.in" +source "package/libid3tag/Config.in" +source "package/liblo/Config.in" +source "package/libmad/Config.in" +source "package/libmpd/Config.in" +source "package/libreplaygain/Config.in" +source "package/libsamplerate/Config.in" +source "package/libsndfile/Config.in" +source "package/libvorbis/Config.in" +source "package/opus/Config.in" +source "package/portaudio/Config.in" +source "package/speex/Config.in" +source "package/taglib/Config.in" +source "package/tremor/Config.in" +source "package/webrtc-audio-processing/Config.in" +endmenu + menu "Compression and decompression" source "package/libarchive/Config.in" source "package/lzo/Config.in" +source "package/snappy/Config.in" source "package/zlib/Config.in" endmenu menu "Crypto" source "package/beecrypt/Config.in" +source "package/cryptodev/Config.in" +source "package/gnutls/Config.in" +source "package/libassuan/Config.in" source "package/libgcrypt/Config.in" source "package/libgpg-error/Config.in" +source "package/libgpgme/Config.in" +source "package/libmcrypt/Config.in" +source "package/libmhash/Config.in" +source "package/libnss/Config.in" +source "package/libsecret/Config.in" +source "package/libsha1/Config.in" +source "package/libssh2/Config.in" +source "package/nettle/Config.in" source "package/openssl/Config.in" +source "package/polarssl/Config.in" endmenu menu "Database" source "package/berkeleydb/Config.in" +source "package/cppdb/Config.in" +source "package/gdbm/Config.in" source "package/mysql_client/Config.in" +source "package/redis/Config.in" +source "package/sqlcipher/Config.in" source "package/sqlite/Config.in" endmenu @@ -263,9 +490,10 @@ menu "Filesystem" source "package/gamin/Config.in" source "package/libconfig/Config.in" source "package/libconfuse/Config.in" -source "package/fuse/Config.in" +source "package/libfuse/Config.in" source "package/liblockfile/Config.in" source "package/libsysfs/Config.in" +source "package/lockdev/Config.in" endmenu menu "Graphics" @@ -274,77 +502,244 @@ source "package/cairo/Config.in" source "package/fltk/Config.in" source "package/fontconfig/Config.in" source "package/freetype/Config.in" +source "package/gd/Config.in" +source "package/gdk-pixbuf/Config.in" +source "package/giblib/Config.in" source "package/gtk2-engines/Config.in" source "package/gtk2-themes/Config.in" +source "package/harfbuzz/Config.in" +source "package/imlib2/Config.in" source "package/jpeg/Config.in" +source "package/lcms2/Config.in" +source "package/lesstif/Config.in" source "package/libart/Config.in" +source "package/libdmtx/Config.in" source "package/libdrm/Config.in" +source "package/libexif/Config.in" source "package/libgail/Config.in" +source "package/libgeotiff/Config.in" source "package/libglade/Config.in" -source "package/gdk-pixbuf/Config.in" source "package/libgtk2/Config.in" source "package/libpng/Config.in" +source "package/libqrencode/Config.in" +source "package/libraw/Config.in" source "package/librsvg/Config.in" +source "package/libsvg/Config.in" +source "package/libsvg-cairo/Config.in" source "package/libsvgtiny/Config.in" source "package/libungif/Config.in" +source "package/opencv/Config.in" +source "package/opengl/Config.in" source "package/pango/Config.in" source "package/pixman/Config.in" +source "package/poppler/Config.in" +source "package/powervr/Config.in" source "package/tiff/Config.in" +source "package/wayland/Config.in" source "package/webkit/Config.in" +source "package/webp/Config.in" +source "package/zxing/Config.in" endmenu menu "Hardware handling" +source "package/ccid/Config.in" +source "package/dtc/Config.in" +source "package/lcdapi/Config.in" source "package/libaio/Config.in" -source "package/libraw1394/Config.in" -source "package/tslib/Config.in" +source "package/libatasmart/Config.in" +source "package/libcec/Config.in" +source "package/libfreefare/Config.in" +source "package/libftdi/Config.in" source "package/libhid/Config.in" +source "package/libiqrf/Config.in" +source "package/libnfc/Config.in" +source "package/libnfc-llcp/Config.in" +source "package/libqmi/Config.in" +source "package/libraw1394/Config.in" +source "package/libserial/Config.in" +source "package/libsoc/Config.in" source "package/libusb/Config.in" source "package/libusb-compat/Config.in" -source "package/python-serial/Config.in" +source "package/libv4l/Config.in" +source "package/libxkbcommon/Config.in" +source "package/mtdev/Config.in" +source "package/ne10/Config.in" +source "package/neardal/Config.in" +source "package/pcsc-lite/Config.in" +source "package/tslib/Config.in" +source "package/urg/Config.in" endmenu -if BROKEN -menu "Java" -source "package/java/classpath/Config.in" -source "package/java/concierge/Config.in" +menu "Javascript" +source "package/explorercanvas/Config.in" +source "package/flot/Config.in" +source "package/jquery/Config.in" +source "package/jquery-keyboard/Config.in" +source "package/jquery-sparkline/Config.in" +source "package/jquery-ui/Config.in" +source "package/jquery-ui-themes/Config.in" +source "package/jquery-validation/Config.in" +source "package/jsmin/Config.in" +source "package/json-javascript/Config.in" +endmenu + +menu "JSON/XML" +source "package/cjson/Config.in" +source "package/expat/Config.in" +source "package/ezxml/Config.in" +source "package/jansson/Config.in" +source "package/json-c/Config.in" +source "package/json-glib/Config.in" +source "package/libjson/Config.in" +source "package/libroxml/Config.in" +source "package/libxml-parser-perl/Config.in" +source "package/libxml2/Config.in" +source "package/libxmlpp/Config.in" +source "package/libxslt/Config.in" +source "package/libyaml/Config.in" +source "package/mxml/Config.in" +source "package/rapidjson/Config.in" +source "package/xerces/Config.in" +source "package/yajl/Config.in" +endmenu + +menu "Multimedia" +source "package/libdvbsi/Config.in" +source "package/libdvdnav/Config.in" +source "package/libdvdread/Config.in" +source "package/libebml/Config.in" +source "package/libfslcodec/Config.in" +source "package/libfslparser/Config.in" +source "package/libfslvpuwrap/Config.in" +source "package/libmatroska/Config.in" +source "package/libmms/Config.in" +source "package/libmpeg2/Config.in" +source "package/libogg/Config.in" +source "package/libplayer/Config.in" +source "package/libtheora/Config.in" +source "package/live555/Config.in" +source "package/mediastreamer/Config.in" endmenu -endif menu "Networking" -source "package/libcgi/Config.in" +source "package/cppzmq/Config.in" +source "package/czmq/Config.in" +source "package/filemq/Config.in" +source "package/glib-networking/Config.in" source "package/libcgicc/Config.in" +source "package/libcgi/Config.in" source "package/libcurl/Config.in" source "package/libdnet/Config.in" +source "package/libesmtp/Config.in" source "package/libeXosip2/Config.in" +source "package/libfcgi/Config.in" +source "package/libgsasl/Config.in" source "package/libidn/Config.in" +source "package/libiscsi/Config.in" +source "package/libmbus/Config.in" source "package/libmicrohttpd/Config.in" -source "package/neon/Config.in" +source "package/libmnl/Config.in" +source "package/libmodbus/Config.in" +source "package/libnetfilter_acct/Config.in" +source "package/libnetfilter_conntrack/Config.in" +source "package/libnetfilter_cthelper/Config.in" +source "package/libnetfilter_cttimeout/Config.in" +source "package/libnetfilter_log/Config.in" +source "package/libnetfilter_queue/Config.in" +source "package/libnfnetlink/Config.in" source "package/libnl/Config.in" -source "package/libpcap/Config.in" +source "package/liboauth/Config.in" +source "package/liboping/Config.in" source "package/libosip2/Config.in" +source "package/libpcap/Config.in" source "package/librsync/Config.in" source "package/libsoup/Config.in" +source "package/libtirpc/Config.in" +source "package/libtorrent/Config.in" source "package/libupnp/Config.in" +source "package/libvncserver/Config.in" +source "package/libwebsockets/Config.in" +source "package/neon/Config.in" +source "package/nss-mdns/Config.in" +source "package/omniorb/Config.in" +source "package/openpgm/Config.in" +source "package/ortp/Config.in" +source "package/slirp/Config.in" +source "package/snmppp/Config.in" +source "package/usbredir/Config.in" +source "package/wvstreams/Config.in" +source "package/zeromq/Config.in" +source "package/zmqpp/Config.in" +source "package/zyre/Config.in" endmenu menu "Other" +source "package/apr/Config.in" +source "package/apr-util/Config.in" source "package/argp-standalone/Config.in" +source "package/boost/Config.in" +source "package/classpath/Config.in" +source "package/cppcms/Config.in" +source "package/eigen/Config.in" +source "package/elfutils/Config.in" +source "package/fftw/Config.in" +source "package/glibmm/Config.in" +source "package/gmp/Config.in" +source "package/gsl/Config.in" +source "package/gtest/Config.in" +source "package/libargtable2/Config.in" source "package/libatomic_ops/Config.in" +source "package/libbsd/Config.in" source "package/libcap/Config.in" +source "package/libcap-ng/Config.in" +source "package/libcgroup/Config.in" +source "package/libcofi/Config.in" source "package/libdaemon/Config.in" source "package/libelf/Config.in" +source "package/libev/Config.in" source "package/libevent/Config.in" source "package/libffi/Config.in" source "package/libglib2/Config.in" -source "package/liboil/Config.in" +source "package/libical/Config.in" +source "package/liblog4c-localtime/Config.in" +source "package/libnspr/Config.in" +source "package/libpfm4/Config.in" +source "package/libpthsem/Config.in" +source "package/libseccomp/Config.in" source "package/libsigc/Config.in" +source "package/libsigsegv/Config.in" +source "package/libtasn1/Config.in" +source "package/libtpl/Config.in" +source "package/libunwind/Config.in" +source "package/liburcu/Config.in" +source "package/linux-pam/Config.in" +source "package/log4cxx/Config.in" +source "package/lttng-libust/Config.in" +source "package/mpc/Config.in" +source "package/mpfr/Config.in" +source "package/msgpack/Config.in" +source "package/mtdev2tuio/Config.in" +source "package/orc/Config.in" +source "package/p11-kit/Config.in" +source "package/poco/Config.in" +source "package/protobuf/Config.in" +source "package/protobuf-c/Config.in" +source "package/schifra/Config.in" source "package/startup-notification/Config.in" +source "package/tzdata/Config.in" +endmenu + +menu "Security" +source "package/libsepol/Config.in" endmenu menu "Text and terminal handling" source "package/enchant/Config.in" source "package/icu/Config.in" +source "package/libedit/Config.in" +source "package/libfribidi/Config.in" source "package/libiconv/Config.in" +source "package/linenoise/Config.in" source "package/ncurses/Config.in" source "package/newt/Config.in" source "package/pcre/Config.in" @@ -353,59 +748,95 @@ source "package/readline/Config.in" source "package/slang/Config.in" endmenu -menu "XML" -source "package/expat/Config.in" -source "package/ezxml/Config.in" -source "package/libxml-parser-perl/Config.in" -source "package/libxml2/Config.in" -source "package/libxslt/Config.in" -source "package/xerces/Config.in" -endmenu - endmenu menu "Miscellaneous" +source "package/aespipe/Config.in" +source "package/bc/Config.in" +source "package/collectd/Config.in" +source "package/empty/Config.in" +source "package/googlefontdirectory/Config.in" +source "package/mcrypt/Config.in" +source "package/mobile-broadband-provider-info/Config.in" source "package/shared-mime-info/Config.in" +source "package/snowball-init/Config.in" +source "package/sound-theme-borealis/Config.in" +source "package/sound-theme-freedesktop/Config.in" endmenu menu "Networking applications" +source "package/aiccu/Config.in" +source "package/aircrack-ng/Config.in" source "package/argus/Config.in" +source "package/arptables/Config.in" +source "package/autossh/Config.in" source "package/avahi/Config.in" source "package/axel/Config.in" -if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS -source "package/boa/Config.in" -endif +source "package/bcusdk/Config.in" source "package/bind/Config.in" +source "package/bluez_utils/Config.in" source "package/bmon/Config.in" +source "package/boa/Config.in" source "package/bridge-utils/Config.in" +source "package/bwm-ng/Config.in" +source "package/can-utils/Config.in" +source "package/chrony/Config.in" +source "package/civetweb/Config.in" source "package/connman/Config.in" +source "package/conntrack-tools/Config.in" +source "package/crda/Config.in" source "package/ctorrent/Config.in" source "package/cups/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/dhcp/Config.in" endif +source "package/dhcpcd/Config.in" +source "package/dhcpdump/Config.in" source "package/dnsmasq/Config.in" source "package/dropbear/Config.in" +source "package/ebtables/Config.in" source "package/ethtool/Config.in" +source "package/foomatic-filters/Config.in" +source "package/gesftpserver/Config.in" +source "package/gutenprint/Config.in" +source "package/heirloom-mailx/Config.in" +source "package/hiawatha/Config.in" source "package/hostapd/Config.in" +source "package/hplip/Config.in" +source "package/httping/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/ifplugd/Config.in" +endif +source "package/iftop/Config.in" +source "package/igh-ethercat/Config.in" +source "package/igmpproxy/Config.in" +source "package/inadyn/Config.in" source "package/iperf/Config.in" source "package/iproute2/Config.in" source "package/ipsec-tools/Config.in" +source "package/ipset/Config.in" source "package/iptables/Config.in" +source "package/iputils/Config.in" source "package/iw/Config.in" source "package/kismet/Config.in" -source "package/xl2tp/Config.in" -if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS +source "package/knock/Config.in" source "package/lighttpd/Config.in" -endif +source "package/linknx/Config.in" source "package/links/Config.in" +source "package/linphone/Config.in" source "package/lrzsz/Config.in" +source "package/macchanger/Config.in" source "package/mii-diag/Config.in" +source "package/minidlna/Config.in" +source "package/mongoose/Config.in" +source "package/mongrel2/Config.in" source "package/mrouted/Config.in" +source "package/msmtp/Config.in" source "package/mutt/Config.in" source "package/nbd/Config.in" source "package/ncftp/Config.in" +source "package/ndisc6/Config.in" +source "package/netatalk/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/netcat/Config.in" source "package/netkitbase/Config.in" @@ -414,83 +845,150 @@ endif source "package/netplug/Config.in" source "package/netsnmp/Config.in" source "package/netstat-nat/Config.in" -source "package/nfs-utils/Config.in" +source "package/network-manager/Config.in" +source "package/nfacct/Config.in" +source "package/ngircd/Config.in" +source "package/ngrep/Config.in" +source "package/nmap/Config.in" +source "package/noip/Config.in" source "package/ntp/Config.in" source "package/nuttcp/Config.in" source "package/olsr/Config.in" source "package/openntpd/Config.in" +source "package/openobex/Config.in" source "package/openssh/Config.in" +source "package/openswan/Config.in" source "package/openvpn/Config.in" +source "package/p910nd/Config.in" source "package/portmap/Config.in" source "package/pppd/Config.in" -source "package/radvd/Config.in" -source "package/rp-pppoe/Config.in" source "package/pptp-linux/Config.in" source "package/proftpd/Config.in" +source "package/proxychains-ng/Config.in" +source "package/ptpd/Config.in" +source "package/ptpd2/Config.in" source "package/quagga/Config.in" +source "package/radvd/Config.in" +source "package/rp-pppoe/Config.in" +source "package/rpcbind/Config.in" source "package/rsh-redone/Config.in" source "package/rsync/Config.in" +source "package/rtorrent/Config.in" source "package/samba/Config.in" +source "package/sconeserver/Config.in" source "package/ser2net/Config.in" source "package/socat/Config.in" +source "package/socketcand/Config.in" source "package/spawn-fcgi/Config.in" +source "package/spice/Config.in" +source "package/spice-protocol/Config.in" source "package/squid/Config.in" +source "package/strongswan/Config.in" +source "package/stunnel/Config.in" source "package/tcpdump/Config.in" +source "package/tcping/Config.in" source "package/tcpreplay/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/tftpd/Config.in" +endif source "package/thttpd/Config.in" source "package/tinyhttpd/Config.in" -endif source "package/tn5250/Config.in" +source "package/transmission/Config.in" source "package/ttcp/Config.in" +source "package/tvheadend/Config.in" source "package/udpcast/Config.in" +source "package/ulogd/Config.in" +source "package/ushare/Config.in" +source "package/ussp-push/Config.in" +source "package/vde2/Config.in" source "package/vpnc/Config.in" source "package/vsftpd/Config.in" source "package/vtun/Config.in" -source "package/webif/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/wget/Config.in" endif +source "package/wireless-regdb/Config.in" source "package/wireless_tools/Config.in" +source "package/wireshark/Config.in" source "package/wpa_supplicant/Config.in" +source "package/wvdial/Config.in" +source "package/xinetd/Config.in" +source "package/xl2tp/Config.in" endmenu menu "Package managers" source "package/ipkg/Config.in" +source "package/opkg/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/rpm/Config.in" endif endmenu +menu "Real-Time" +source "package/rtai/Config.in" +source "package/xenomai/Config.in" +endmenu + menu "Shell and utilities" source "package/at/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/bash/Config.in" source "package/dash/Config.in" +source "package/zsh/Config.in" endif source "package/dialog/Config.in" +source "package/dtach/Config.in" source "package/file/Config.in" +source "package/gnupg/Config.in" +source "package/inotify-tools/Config.in" source "package/lockfile-progs/Config.in" source "package/logrotate/Config.in" +source "package/logsurfer/Config.in" source "package/screen/Config.in" source "package/sudo/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS +source "package/time/Config.in" source "package/which/Config.in" +endif source "package/xmlstarlet/Config.in" endmenu menu "System tools" +source "package/acl/Config.in" +source "package/attr/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/bootutils/Config.in" -source "package/module-init-tools/Config.in" +endif +source "package/cpuload/Config.in" +source "package/dsp-tools/Config.in" +source "package/htop/Config.in" +source "package/keyutils/Config.in" +source "package/kmod/Config.in" +source "package/lxc/Config.in" +source "package/monit/Config.in" +source "package/ncdu/Config.in" +source "package/numactl/Config.in" +source "package/nut/Config.in" +source "package/polkit/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/procps/Config.in" source "package/psmisc/Config.in" +endif +source "package/quota/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS +source "package/rsyslog/Config.in" +endif +source "package/supervisor/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/sysklogd/Config.in" +endif +source "package/systemd/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/sysvinit/Config.in" -source "package/util-linux/Config.in" endif -source "package/dsp-tools/Config.in" +source "package/util-linux/Config.in" endmenu menu "Text editors and viewers" diff --git a/package/Config.in.host b/package/Config.in.host new file mode 100644 index 0000000000..5fd25703cb --- /dev/null +++ b/package/Config.in.host @@ -0,0 +1,17 @@ +menu "Host utilities" + +source "package/dfu-util/Config.in.host" +source "package/dosfstools/Config.in.host" +source "package/e2fsprogs/Config.in.host" +source "package/genext2fs/Config.in.host" +source "package/genimage/Config.in.host" +source "package/genpart/Config.in.host" +source "package/lpc3250loader/Config.in.host" +source "package/mtools/Config.in.host" +source "package/omap-u-boot-utils/Config.in.host" +source "package/openocd/Config.in.host" +source "package/sam-ba/Config.in.host" +source "package/sunxi-tools/Config.in.host" +source "package/uboot-tools/Config.in.host" + +endmenu diff --git a/package/Makefile.autotools.in b/package/Makefile.autotools.in deleted file mode 100644 index d445348d2b..0000000000 --- a/package/Makefile.autotools.in +++ /dev/null @@ -1,281 +0,0 @@ -################################################################################ -# Autotools package infrastructure -# -# This file implements an infrastructure that eases development of -# package .mk files for autotools packages. It should be used for all -# packages that use the autotools as their build system. Non-autotools -# packages should use the generic infrastructure in -# package/Makefile.package.in. -# -# See the Buildroot documentation for details on the usage of this -# infrastructure -# -# In terms of implementation, this autotools infrastructure requires -# the .mk file to only specify metadata informations about the -# package: name, version, download URL, etc. -# -# We still allow the package .mk file to override what the different -# steps are doing, if needed. For example, if _BUILD_CMDS is -# already defined, it is used as the list of commands to perform to -# build the package, instead of the default autotools behaviour. The -# package can also define some post operation hooks. -# -################################################################################ - -################################################################################ -# AUTOTARGETS_INNER -- defines how the configuration, compilation and -# installation of an autotools package should be done, implements a -# few hooks to tune the build process for autotools specifities and -# calls the generic package infrastructure to generate the necessary -# make targets -# -# argument 1 is the lowercase package name -# argument 2 is the uppercase package name, including an HOST_ prefix -# for host packages -# argument 3 is the uppercase package name, without the HOST_ prefix -# for host packages -# argument 4 is the package directory prefix -# argument 5 is the type (target or host) -################################################################################ - -define AUTOTARGETS_INNER - -# define package-specific variables to default values -ifndef $(2)_SUBDIR - ifdef $(3)_SUBDIR - $(2)_SUBDIR = $($(3)_SUBDIR) - else - $(2)_SUBDIR ?= - endif -endif - -ifndef $(2)_LIBTOOL_PATCH - ifdef $(3)_LIBTOOL_PATCH - $(2)_LIBTOOL_PATCH = $($(3)_LIBTOOL_PATCH) - else - $(2)_LIBTOOL_PATCH ?= YES - endif -endif - -$(2)_CONF_ENV ?= -$(2)_CONF_OPT ?= -$(2)_MAKE ?= $(MAKE) -$(2)_MAKE_ENV ?= -$(2)_MAKE_OPT ?= -$(2)_AUTORECONF ?= NO -$(2)_AUTORECONF_OPT ?= -$(2)_INSTALL_STAGING_OPT ?= DESTDIR=$$(STAGING_DIR) install -$(2)_INSTALL_TARGET_OPT ?= DESTDIR=$$(TARGET_DIR) install -$(2)_CLEAN_OPT ?= clean -$(2)_UNINSTALL_STAGING_OPT ?= DESTDIR=$$(STAGING_DIR) uninstall -$(2)_UNINSTALL_TARGET_OPT ?= DESTDIR=$$(TARGET_DIR) uninstall - -$(2)_SRCDIR = $$($(2)_DIR)/$($(2)_SUBDIR) - -# -# Configure step. Only define it if not already defined by the package -# .mk file. And take care of the differences between host and target -# packages. -# -ifndef $(2)_CONFIGURE_CMDS -ifeq ($(5),target) - -# Configure package for target -define $(2)_CONFIGURE_CMDS - (cd $$($$(PKG)_SRCDIR) && rm -rf config.cache && \ - $$(TARGET_CONFIGURE_OPTS) \ - $$(TARGET_CONFIGURE_ARGS) \ - $$($$(PKG)_CONF_ENV) \ - ./configure \ - --target=$$(GNU_TARGET_NAME) \ - --host=$$(GNU_TARGET_NAME) \ - --build=$$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --sysconfdir=/etc \ - $$(DISABLE_DOCUMENTATION) \ - $$(DISABLE_NLS) \ - $$(DISABLE_LARGEFILE) \ - $$(DISABLE_IPV6) \ - $$(QUIET) $$($$(PKG)_CONF_OPT) \ - ) -endef -else - -# Configure package for host -define $(2)_CONFIGURE_CMDS - (cd $$($$(PKG)_SRCDIR) && rm -rf config.cache; \ - $$(HOST_CONFIGURE_OPTS) \ - CFLAGS="$$(HOST_CFLAGS)" \ - LDFLAGS="$$(HOST_LDFLAGS)" \ - $$($$(PKG)_CONF_ENV) \ - ./configure \ - --prefix="$$(HOST_DIR)/usr" \ - --sysconfdir="$$(HOST_DIR)/etc" \ - $$($$(PKG)_CONF_OPT) \ - ) -endef -endif -endif - -# -# Hook to update config.sub and config.guess if needed -# -define UPDATE_CONFIG_HOOK - for file in config.guess config.sub; do \ - for i in $$$$(find $$(@D) -name $$$$file); do \ - cp package/gnuconfig/$$$$file $$$$i; \ - done; \ - done -endef - -$(2)_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK - -# -# Hook to patch libtool to make it work properly for cross-compilation -# -define LIBTOOL_PATCH_HOOK - @$$(call MESSAGE,"Patching libtool") - $(Q)if test "$$($$(PKG)_LIBTOOL_PATCH)" = "YES" \ - -a "$$($$(PKG)_AUTORECONF)" != "YES"; then \ - for i in `find $$($$(PKG)_SRCDIR) -name ltmain.sh`; do \ - ltmain_version=`sed -n '/^[ ]*VERSION=/{s/^[ ]*VERSION=//;p;q;}' $$$$i | \ - sed -e 's/\([0-9].[0-9]*\).*/\1/' -e 's/\"//'`; \ - if test $$$${ltmain_version} = '1.5'; then \ - toolchain/patch-kernel.sh $$$${i%/*} package buildroot-libtool-v1.5.patch; \ - elif test $$$${ltmain_version} = "2.2"; then\ - toolchain/patch-kernel.sh $$$${i%/*} package buildroot-libtool-v2.2.patch; \ - fi \ - done \ - fi -endef - -# default values are not evaluated yet, so don't rely on this defaulting to YES -ifneq ($$($(2)_LIBTOOL_PATCH),NO) -$(2)_POST_PATCH_HOOKS += LIBTOOL_PATCH_HOOK -endif - -# -# Hook to autoreconf the package if needed -# -define AUTORECONF_HOOK - @$$(call MESSAGE,"Autoreconfiguring") - $(Q)cd $$($$(PKG)_SRCDIR) && $(AUTORECONF) $$($$(PKG)_AUTORECONF_OPT) - $(Q)if test "$$($$(PKG)_LIBTOOL_PATCH)" = "YES"; then \ - for i in `find $$($$(PKG)_SRCDIR) -name ltmain.sh`; do \ - ltmain_version=`sed -n '/^[ ]*VERSION=/{s/^[ ]*VERSION=//;p;q;}' $$$$i | sed 's/\([0-9].[0-9]*\).*/\1/'`; \ - if test $$$${ltmain_version} = "1.5"; then \ - toolchain/patch-kernel.sh $$$${i%/*} package buildroot-libtool-v1.5.patch; \ - elif test $$$${ltmain_version} = "2.2"; then\ - toolchain/patch-kernel.sh $$$${i%/*} package buildroot-libtool-v2.2.patch; \ - fi \ - done \ - fi -endef - -ifeq ($$($(2)_AUTORECONF),YES) -$(2)_PRE_CONFIGURE_HOOKS += AUTORECONF_HOOK -$(2)_DEPENDENCIES += host-automake host-autoconf host-libtool -endif - -# -# Build step. Only define it if not already defined by the package .mk -# file. -# -ifndef $(2)_BUILD_CMDS -ifeq ($(5),target) -define $(2)_BUILD_CMDS - $(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) -C $$($$(PKG)_SRCDIR) -endef -else -define $(2)_BUILD_CMDS - $(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) -C $$($$(PKG)_SRCDIR) -endef -endif -endif - -# -# Host installation step. Only define it if not already defined by the -# package .mk file. -# -ifndef $(2)_INSTALL_CMDS -define $(2)_INSTALL_CMDS - $(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) -C $$($$(PKG)_SRCDIR) install -endef -endif - -# -# Staging installation step. Only define it if not already defined by -# the package .mk file. -# -ifndef $(2)_INSTALL_STAGING_CMDS -define $(2)_INSTALL_STAGING_CMDS - $(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_INSTALL_STAGING_OPT) -C $$($$(PKG)_SRCDIR) - for i in $$$$(find $(STAGING_DIR)/usr/lib* -name "*.la"); do \ - cp -f $$$$i $$$$i~; \ - $$(SED) "s:\(['= ]\)/usr:\\1$(STAGING_DIR)/usr:g" $$$$i; \ - done -endef -endif - -# -# Target installation step. Only define it if not already defined by -# the package .mk file. -# -ifndef $(2)_INSTALL_TARGET_CMDS -define $(2)_INSTALL_TARGET_CMDS - $(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_INSTALL_TARGET_OPT) -C $$($$(PKG)_SRCDIR) -endef -endif - -# -# Clean step. Only define it if not already defined by -# the package .mk file. -# -ifndef $(2)_CLEAN_CMDS -define $(2)_CLEAN_CMDS - -$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_CLEAN_OPT) -C $$($$(PKG)_SRCDIR) -endef -endif - -# -# Uninstall from staging step. Only define it if not already defined by -# the package .mk file. -# -ifndef $(2)_UNINSTALL_STAGING_CMDS -define $(2)_UNINSTALL_STAGING_CMDS - $(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_UNINSTALL_STAGING_OPT) -C $$($$(PKG)_SRCDIR) -endef -endif - -# -# Uninstall from target step. Only define it if not already defined -# by the package .mk file. -# -ifndef $(2)_UNINSTALL_TARGET_CMDS -define $(2)_UNINSTALL_TARGET_CMDS - $(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_UNINSTALL_TARGET_OPT) -C $$($$(PKG)_SRCDIR) -endef -endif - -# Call the generic package infrastructure to generate the necessary -# make targets -$(call GENTARGETS_INNER,$(1),$(2),$(3),$(4),$(5)) - -endef - -################################################################################ -# AUTOTARGETS -- the target generator macro for autotools packages -# -# Argument 1 is the package directory prefix [mandatory] -# Argument 2 is the lowercase package name [mandatory] -# Argument 3 is "target" or "host" [optional, default: "target"] -################################################################################ - -define AUTOTARGETS -ifeq ($(3),host) -$(call AUTOTARGETS_INNER,$(3)-$(2),$(call UPPERCASE,$(3)-$(2)),$(call UPPERCASE,$(2)),$(1),host) -else -$(call AUTOTARGETS_INNER,$(2),$(call UPPERCASE,$(2)),$(call UPPERCASE,$(2)),$(1),target) -endif -endef diff --git a/package/Makefile.cmake.in b/package/Makefile.cmake.in deleted file mode 100644 index 1263eb993a..0000000000 --- a/package/Makefile.cmake.in +++ /dev/null @@ -1,197 +0,0 @@ -################################################################################ -# CMake package infrastructure -# -# This file implements an infrastructure that eases development of -# package .mk files for CMake packages. It should be used for all -# packages that use CMake as their build system. -# -# See the Buildroot documentation for details on the usage of this -# infrastructure -# -# In terms of implementation, this CMake infrastructure requires -# the .mk file to only specify metadata informations about the -# package: name, version, download URL, etc. -# -# We still allow the package .mk file to override what the different -# steps are doing, if needed. For example, if _BUILD_CMDS is -# already defined, it is used as the list of commands to perform to -# build the package, instead of the default CMake behaviour. The -# package can also define some post operation hooks. -# -################################################################################ - -################################################################################ -# CMAKETARGETS_INNER -- defines how the configuration, compilation and -# installation of a CMake package should be done, implements a few hooks to -# tune the build process and calls the generic package infrastructure to -# generate the necessary make targets -# -# argument 1 is the lowercase package name -# argument 2 is the uppercase package name, including an HOST_ prefix -# for host packages -# argument 3 is the uppercase package name, without the HOST_ prefix -# for host packages -# argument 4 is the package directory prefix -# argument 5 is the type (target or host) -################################################################################ - -define CMAKETARGETS_INNER - -# define package-specific variables to default values -ifndef $(2)_SUBDIR - ifdef $(3)_SUBDIR - $(2)_SUBDIR = $($(3)_SUBDIR) - else - $(2)_SUBDIR ?= - endif -endif - -$(2)_CONF_ENV ?= -$(2)_CONF_OPT ?= -$(2)_MAKE ?= $(MAKE) -$(2)_MAKE_ENV ?= -$(2)_MAKE_OPT ?= -$(2)_INSTALL_HOST_OPT ?= install -$(2)_INSTALL_STAGING_OPT ?= DESTDIR=$$(STAGING_DIR) install -$(2)_INSTALL_TARGET_OPT ?= DESTDIR=$$(TARGET_DIR) install -$(2)_CLEAN_OPT ?= clean - -$(2)_SRCDIR = $$($(2)_DIR)/$($(2)_SUBDIR) -$(2)_BUILDDIR = $$($(2)_SRCDIR) - -# -# Configure step. Only define it if not already defined by the package -# .mk file. And take care of the differences between host and target -# packages. -# -ifndef $(2)_CONFIGURE_CMDS -ifeq ($(5),target) - -# Configure package for target -define $(2)_CONFIGURE_CMDS - (cd $$($$(PKG)_BUILDDIR) && \ - rm -f CMakeCache.txt && \ - $$($$(PKG)_CONF_ENV) $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \ - -DCMAKE_TOOLCHAIN_FILE="$$(BASE_DIR)/toolchainfile.cmake" \ - -DCMAKE_INSTALL_PREFIX="/usr" \ - $$($$(PKG)_CONF_OPT) \ - ) -endef -else - -# Configure package for host -define $(2)_CONFIGURE_CMDS - (cd $$($$(PKG)_BUILDDIR) && \ - rm -f CMakeCache.txt && \ - $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \ - -DCMAKE_INSTALL_SO_NO_EXE=0 \ - -DCMAKE_FIND_ROOT_PATH="$$(HOST_DIR)" \ - -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="BOTH" \ - -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY="BOTH" \ - -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE="BOTH" \ - -DCMAKE_INSTALL_PREFIX="$$(HOST_DIR)/usr" \ - $$($$(PKG)_CONF_OPT) \ - ) -endef -endif -endif - -$(2)_DEPENDENCIES += host-cmake - -# -# Build step. Only define it if not already defined by the package .mk -# file. -# -ifndef $(2)_BUILD_CMDS -ifeq ($(5),target) -define $(2)_BUILD_CMDS - $(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) -C $$($$(PKG)_BUILDDIR) -endef -else -define $(2)_BUILD_CMDS - $(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) -C $$($$(PKG)_BUILDDIR) -endef -endif -endif - -# -# Host installation step. Only define it if not already defined by the -# package .mk file. -# -ifndef $(2)_INSTALL_CMDS -define $(2)_INSTALL_CMDS - $(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) $$($$(PKG)_INSTALL_HOST_OPT) -C $$($$(PKG)_BUILDDIR) -endef -endif - -# -# Staging installation step. Only define it if not already defined by -# the package .mk file. -# -ifndef $(2)_INSTALL_STAGING_CMDS -define $(2)_INSTALL_STAGING_CMDS - $(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) $$($$(PKG)_INSTALL_STAGING_OPT) -C $$($$(PKG)_BUILDDIR) -endef -endif - -# -# Target installation step. Only define it if not already defined by -# the package .mk file. -# -ifndef $(2)_INSTALL_TARGET_CMDS -define $(2)_INSTALL_TARGET_CMDS - $(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) $$($$(PKG)_INSTALL_TARGET_OPT) -C $$($$(PKG)_BUILDDIR) -endef -endif - -# -# Clean step. Only define it if not already defined by -# the package .mk file. -# -ifndef $(2)_CLEAN_CMDS -define $(2)_CLEAN_CMDS - -$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) $$($$(PKG)_CLEAN_OPT) -C $$($$(PKG)_BUILDDIR) -endef -endif - -# -# Uninstall from staging step. Only define it if not already defined by -# the package .mk file. -# -ifndef $(2)_UNINSTALL_STAGING_CMDS -define $(2)_UNINSTALL_STAGING_CMDS - (cd $$($$(PKG)_BUILDDIR) && sed "s:\(.*\):$$(STAGING_DIR)\1:" install_manifest.txt | xargs rm -f) -endef -endif - -# -# Uninstall from target step. Only define it if not already defined -# by the package .mk file. -# -ifndef $(2)_UNINSTALL_TARGET_CMDS -define $(2)_UNINSTALL_TARGET_CMDS - (cd $$($$(PKG)_BUILDDIR) && sed "s:\(.*\):$$(TARGET_DIR)\1:" install_manifest.txt | xargs rm -f) -endef -endif - -# Call the generic package infrastructure to generate the necessary -# make targets -$(call GENTARGETS_INNER,$(1),$(2),$(3),$(4),$(5)) - -endef - -################################################################################ -# CMAKETARGETS -- the target generator macro for CMake packages -# -# Argument 1 is the package directory prefix [mandatory] -# Argument 2 is the lowercase package name [mandatory] -# Argument 3 is "target" or "host" [optional, default: "target"] -################################################################################ - -define CMAKETARGETS -ifeq ($(3),host) -$(call CMAKETARGETS_INNER,$(3)-$(2),$(call UPPERCASE,$(3)-$(2)),$(call UPPERCASE,$(2)),$(1),host) -else -$(call CMAKETARGETS_INNER,$(2),$(call UPPERCASE,$(2)),$(call UPPERCASE,$(2)),$(1),target) -endif -endef diff --git a/package/Makefile.in b/package/Makefile.in index e1ffe158b5..612f3c744a 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -6,34 +6,80 @@ HOSTMAKE=$(MAKE) endif HOSTMAKE :=$(shell which $(HOSTMAKE) || type -p $(HOSTMAKE) || echo make) +# If BR2_LEVEL is 0, scale the maximum concurrency with the number of +# CPUs. An additional job is used in order to keep processors busy +# while waiting on I/O. +# If the number of processors is not available, assume one. +ifeq ($(BR2_JLEVEL),0) +PARALLEL_JOBS:=$(shell echo \ + $$((1 + `getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1`))) +else +PARALLEL_JOBS:=$(BR2_JLEVEL) +endif + MAKE1:=$(HOSTMAKE) -j1 -MAKE:=$(HOSTMAKE) -j$(BR2_JLEVEL) +MAKE:=$(HOSTMAKE) $(if $(PARALLEL_JOBS),-j$(PARALLEL_JOBS)) -# Compute GNU_TARGET_NAME and REAL_GNU_TARGET_NAME -GNU_TARGET_NAME=$(ARCH)-linux +# Compute GNU_TARGET_NAME +GNU_TARGET_NAME=$(ARCH)-buildroot-$(TARGET_OS)-$(LIBC)$(ABI) -ifeq ($(BR2_TOOLCHAIN_BUILDROOT)$(BR2_TOOLCHAIN_CTNG_uClibc)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y) +# Blackfin FLAT needs uclinux +ifeq ($(BR2_bfin)$(BR2_BINFMT_FLAT),yy) +TARGET_OS=uclinux +else +TARGET_OS=linux +endif + +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) LIBC=uclibc else LIBC=gnu endif # The ABI suffix is a bit special on ARM, as it needs to be -# -uclibcgnueabi for uClibc EABI, -uclibc for uClibc OABI, -gnueabi -# for glibc EABI and -gnu for glibc OABI. This means that the LIBC and -# ABI aren't strictly orthogonal, which explains why we need the test -# on LIBC below. -ifeq ($(BR2_ARM_EABI),y) +# -uclibcgnueabi for uClibc EABI, and -gnueabi for glibc EABI. +# This means that the LIBC and ABI aren't strictly orthogonal, +# which explains why we need the test on LIBC below. +ifeq ($(BR2_arm)$(BR2_armeb),y) ifeq ($(LIBC),uclibc) ABI=gnueabi else ABI=eabi endif + +ifeq ($(BR2_ARM_EABIHF),y) +ABI:=$(ABI)hf +endif +endif + +# For FSL PowerPC there's SPE +ifeq ($(BR2_powerpc_SPE),y) +ABI=spe +# MPC8540s are e500v1 with single precision FP +ifeq ($(BR2_powerpc_8540),y) +TARGET_ABI+=-mabi=spe -mfloat-gprs=single -Wa,-me500 +endif +ifeq ($(BR2_powerpc_8548),y) +TARGET_ABI+=-mabi=spe -mfloat-gprs=double -Wa,-me500x2 +endif +ifeq ($(BR2_powerpc_e500mc),y) +TARGET_ABI+=-mabi=spe -mfloat-gprs=double -Wa,-me500mc +endif endif -REAL_GNU_TARGET_NAME=$(ARCH)-unknown-linux-$(LIBC)$(ABI) +# Use longcalls option for Xtensa globally. +# The 'longcalls' option allows calls across a greater range of addresses, +# and is required for some packages. While this option can degrade both +# code size and performance, the linker can usually optimize away the +# overhead when a call ends up within a certain range. +ifeq ($(BR2_xtensa),y) +TARGET_ABI += -mlongcalls +endif -STAGING_DIR=$(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/sysroot +STAGING_SUBDIR = usr/$(GNU_TARGET_NAME)/sysroot +STAGING_DIR = $(HOST_DIR)/$(STAGING_SUBDIR) + +TARGET_OPTIMIZATION:=$(call qstrip,$(BR2_TARGET_OPTIMIZATION)) ifeq ($(BR2_OPTIMIZE_0),y) TARGET_OPTIMIZATION+=-O0 @@ -60,78 +106,58 @@ ifeq ($(BR2_DEBUG_3),y) TARGET_DEBUGGING=-g3 endif -TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) - -CC_TARGET_TUNE_:=$(call qstrip,$(BR2_GCC_TARGET_TUNE)) -CC_TARGET_ARCH_:=$(call qstrip,$(BR2_GCC_TARGET_ARCH)) -CC_TARGET_ABI_:=$(call qstrip,$(BR2_GCC_TARGET_ABI)) - -ifneq ($(CC_TARGET_TUNE_),) -TARGET_CFLAGS+=-mtune=$(CC_TARGET_TUNE_) -endif -ifneq ($(CC_TARGET_ARCH_),) -TARGET_CFLAGS+=-march=$(CC_TARGET_ARCH_) -endif -ifneq ($(CC_TARGET_ABI_),) -TARGET_CFLAGS+=-mabi=$(CC_TARGET_ABI_) +ifeq ($(BR2_LARGEFILE),y) +TARGET_CPPFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 endif -ifneq ($(BR2_PREFER_STATIC_LIB),y) -ifeq ($(BR2_x86_64),y) -TARGET_CFLAGS+=-fPIC -DPIC -endif # PIC for dynamic objects on x86_64 -endif +TARGET_CFLAGS = $(TARGET_CPPFLAGS) $(TARGET_ABI) $(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) +TARGET_CXXFLAGS = $(TARGET_CFLAGS) +TARGET_LDFLAGS = $(call qstrip,$(BR2_TARGET_LDFLAGS)) -ifeq ($(BR2_SOFT_FLOAT),y) -TARGET_CFLAGS+=-msoft-float +ifeq ($(BR2_BINFMT_FLAT),y) +TARGET_CFLAGS += $(if $($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt=-s$($(PKG)_FLAT_STACKSIZE),\ + -Wl$(comma)-elf2flt) +TARGET_CXXFLAGS += $(if $($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt=-s$($(PKG)_FLAT_STACKSIZE),\ + -Wl$(comma)-elf2flt) +TARGET_LDFLAGS += $(if $($(PKG)_FLAT_STACKSIZE),-elf2flt=-s$($(PKG)_FLAT_STACKSIZE),-elf2flt) endif -ifeq ($(BR2_VFP_FLOAT),y) -TARGET_CFLAGS+=-mfpu=vfp +ifeq ($(BR2_BINFMT_FLAT_SHARED),y) +TARGET_LDFLAGS += -mid-shared-library -mshared-library-id=0 +TARGET_CFLAGS += -mid-shared-library -mshared-library-id=0 +TARGET_CXXFLAGS += -mid-shared-library -mshared-library-id=0 endif - -ifeq ($(findstring yy,$(BR2_mips)$(BR2_MIPS_ABI64)),yy) -TARGET_CFLAGS+=-fno-pic -mno-abicalls +ifeq ($(BR2_BINFMT_FLAT_SEP_DATA),y) +TARGET_LDFLAGS += -msep-data +TARGET_CFLAGS += -msep-data +TARGET_CXXFLAGS += -msep-data endif -ifeq ($(BR2_LARGEFILE),y) -TARGET_CFLAGS+=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +ifeq ($(BR2_ENABLE_SSP),y) +TARGET_CFLAGS += -fstack-protector-all +TARGET_CXXFLAGS += -fstack-protector-all endif ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) -TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -endif - -TARGET_LDFLAGS+=-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib -TARGET_CXXFLAGS=$(TARGET_CFLAGS) -TARGET_SYSROOT_OPT=--sysroot=$(STAGING_DIR) - -ifeq ($(BR2_TOOLCHAIN_BUILDROOT)$(BR2_TOOLCHAIN_CTNG),y) -TARGET_CROSS=$(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)- -else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) -TOOLCHAIN_EXTERNAL_PREFIX=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX)) -ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y) -TOOLCHAIN_EXTERNAL_LOCATION=$(TOOLCHAIN_EXTERNAL_DIR) +TARGET_CROSS=$(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)- else -TOOLCHAIN_EXTERNAL_LOCATION=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH)) -endif -TARGET_CROSS=$(TOOLCHAIN_EXTERNAL_LOCATION)/bin/$(TOOLCHAIN_EXTERNAL_PREFIX)- +TARGET_CROSS=$(HOST_DIR)/usr/bin/$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))- endif # Quotes are needed for spaces et al in path components. TARGET_PATH="$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin/:$(PATH)" -# Define TARGET_xx variables for all common binutils/gcc tools by -# including the --sysroot option where necessary. +# Define TARGET_xx variables for all common binutils/gcc TARGET_AR = $(TARGET_CROSS)ar TARGET_AS = $(TARGET_CROSS)as -TARGET_CC = $(TARGET_CROSS)gcc $(TARGET_SYSROOT_OPT) -TARGET_CPP = $(TARGET_CROSS)cpp $(TARGET_SYSROOT_OPT) -TARGET_CXX = $(TARGET_CROSS)g++ $(TARGET_SYSROOT_OPT) -TARGET_FC = $(TARGET_CROSS)gfortran $(TARGET_SYSROOT_OPT) -TARGET_LD = $(TARGET_CROSS)ld $(TARGET_SYSROOT_OPT) +TARGET_CC = $(TARGET_CROSS)gcc +TARGET_CPP = $(TARGET_CROSS)cpp +TARGET_CXX = $(TARGET_CROSS)g++ +TARGET_FC = $(TARGET_CROSS)gfortran +TARGET_LD = $(TARGET_CROSS)ld TARGET_NM = $(TARGET_CROSS)nm TARGET_RANLIB = $(TARGET_CROSS)ranlib +TARGET_READELF = $(TARGET_CROSS)readelf TARGET_OBJCOPY = $(TARGET_CROSS)objcopy TARGET_OBJDUMP = $(TARGET_CROSS)objdump @@ -143,16 +169,8 @@ TARGET_CC := $(CCACHE) $(TARGET_CC) TARGET_CXX := $(CCACHE) $(TARGET_CXX) endif -# * CMake doesn't support having the --sysroot option directly in the -# compiler path, so move this option to CFLAGS/CXXFLAGS variables. -# * Don't use ccache because then CMake will fail to detect compiler. -CMAKE_TARGET_CC = $(filter-out --sysroot=%,$(TARGET_CC_NOCCACHE)) -CMAKE_TARGET_CXX = $(filter-out --sysroot=%,$(TARGET_CXX_NOCCACHE)) -CMAKE_TARGET_CFLAGS = $(filter --sysroot=%,$(TARGET_CC_NOCCACHE)) $(TARGET_CFLAGS) -CMAKE_TARGET_CXXFLAGS = $(filter --sysroot=%,$(TARGET_CXX_NOCCACHE)) $(TARGET_CXXFLAGS) - ifeq ($(BR2_STRIP_strip),y) -STRIP_DISCARD_ALL:=--discard-all +STRIP_STRIP_DEBUG:=--strip-debug STRIP_STRIP_UNNEEDED:=--strip-unneeded STRIP_STRIP_ALL:=--strip-all TARGET_STRIP=$(TARGET_CROSS)strip @@ -160,10 +178,10 @@ STRIPCMD=$(TARGET_CROSS)strip --remove-section=.comment --remove-section=.note KSTRIPCMD=$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) endif ifeq ($(BR2_STRIP_sstrip),y) -STRIP_DISCARD_ALL:= +STRIP_STRIP_DEBUG:= STRIP_STRIP_UNNEEDED:= STRIP_STRIP_ALL:= -TARGET_STRIP=$(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-sstrip +TARGET_STRIP=$(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-sstrip STRIPCMD=$(TARGET_STRIP) KSTRIPCMD=$(TARGET_CROSS)strip --remove-section=.comment --remove-section=.note --strip-unneeded endif @@ -177,9 +195,10 @@ FLEX:=$(shell which flex || type -p flex) BISON:=$(shell which bison || type -p bison) SED:=$(shell which sed || type -p sed) -i -e +HOST_CPPFLAGS = -I$(HOST_DIR)/usr/include HOST_CFLAGS ?= -O2 -HOST_CFLAGS += -I$(HOST_DIR)/include -I$(HOST_DIR)/usr/include -HOST_CXXFLAGS += -I$(HOST_DIR)/include -I$(HOST_DIR)/usr/include +HOST_CFLAGS += $(HOST_CPPFLAGS) +HOST_CXXFLAGS += $(HOST_CFLAGS) HOST_LDFLAGS += -L$(HOST_DIR)/lib -L$(HOST_DIR)/usr/lib -Wl,-rpath,$(HOST_DIR)/usr/lib HOST_PATH=$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(PATH) @@ -198,6 +217,7 @@ TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \ CXX="$(TARGET_CXX)" \ FC="$(TARGET_FC)" \ RANLIB="$(TARGET_RANLIB)" \ + READELF="$(TARGET_READELF)" \ STRIP="$(TARGET_STRIP)" \ OBJCOPY="$(TARGET_OBJCOPY)" \ OBJDUMP="$(TARGET_OBJDUMP)" \ @@ -208,12 +228,14 @@ TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \ CXX_FOR_BUILD="$(HOSTCXX)" \ FC_FOR_BUILD="$(HOSTFC)" \ LD_FOR_BUILD="$(HOSTLD)" \ + CPPFLAGS_FOR_BUILD="$(HOST_CPPFLAGS)" \ CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \ CXXFLAGS_FOR_BUILD="$(HOST_CXXFLAGS)" \ LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \ FCFLAGS_FOR_BUILD="$(HOST_FCFLAGS)" \ DEFAULT_ASSEMBLER="$(TARGET_AS)" \ DEFAULT_LINKER="$(TARGET_LD)" \ + CPPFLAGS="$(TARGET_CPPFLAGS)" \ CFLAGS="$(TARGET_CFLAGS)" \ CXXFLAGS="$(TARGET_CXXFLAGS)" \ LDFLAGS="$(TARGET_LDFLAGS)" \ @@ -234,6 +256,7 @@ HOST_CONFIGURE_OPTS=PATH=$(HOST_PATH) \ GCC="$(HOSTCC)" \ CXX="$(HOSTCXX)" \ CPP="$(HOSTCPP)" \ + CPPFLAGS="$(HOST_CPPFLAGS)" \ CFLAGS="$(HOST_CFLAGS)" \ CXXFLAGS="$(HOST_CXXFLAGS)" \ LDFLAGS="$(HOST_LDFLAGS)" \ @@ -248,11 +271,12 @@ HOST_CONFIGURE_OPTS=PATH=$(HOST_PATH) \ HOST_MAKE_ENV=PATH=$(HOST_PATH) \ LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)" \ PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \ + PKG_CONFIG_SYSROOT_DIR="/" \ PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig" \ PERLLIB="$(HOST_DIR)/usr/lib/perl" -####################################################################### +################################################################################ # settings we need to pass to configure # does unaligned access trap? @@ -285,9 +309,10 @@ TARGET_CONFIGURE_ARGS= \ ac_cv_func_malloc_0_nonnull=yes \ ac_cv_func_calloc_0_nonnull=yes \ ac_cv_func_realloc_0_nonnull=yes \ + lt_cv_sys_lib_search_path_spec="" \ $(BR2_AC_CV_C_BIGENDIAN) -####################################################################### +################################################################################ ifeq ($(BR2_ENABLE_LOCALE),y) DISABLE_NLS:= @@ -300,10 +325,20 @@ DISABLE_LARGEFILE= --disable-largefile endif ifneq ($(BR2_HAVE_DOCUMENTATION),y) -DISABLE_DOCUMENTATION=--disable-gtk-doc -endif - -ifneq ($(BR2_INET_IPV6),y) +# The configure option varies, but since unknown options are ignored +# we can pass all of them. +DISABLE_DOCUMENTATION = \ + --disable-gtk-doc \ + --disable-doc \ + --disable-docs \ + --disable-documentation \ + --with-xmlto=no \ + --with-fop=no +endif + +ifeq ($(BR2_INET_IPV6),y) +DISABLE_IPV6= --enable-ipv6 +else DISABLE_IPV6= --disable-ipv6 endif @@ -317,6 +352,15 @@ else ENABLE_DEBUG:= endif -include package/Makefile.autotools.in -include package/Makefile.cmake.in -include package/Makefile.package.in +ifeq ($(BR2_PREFER_STATIC_LIB),y) +SHARED_STATIC_LIBS_OPTS=--enable-static --disable-shared +TARGET_LDFLAGS += --static +else +SHARED_STATIC_LIBS_OPTS=--enable-static --enable-shared +endif + +include package/pkg-utils.mk +include package/pkg-download.mk +include package/pkg-autotools.mk +include package/pkg-cmake.mk +include package/pkg-generic.mk diff --git a/package/Makefile.package.in b/package/Makefile.package.in deleted file mode 100644 index 7afd0d0444..0000000000 --- a/package/Makefile.package.in +++ /dev/null @@ -1,555 +0,0 @@ -################################################################################ -# Generic package infrastructure -# -# This file implements an infrastructure that eases development of -# package .mk files. It should be used for all non-autotools based -# packages. Autotools-based packages should use the specialized -# autotools infrastructure in package/Makefile.autotools.in. -# -# See the Buildroot documentation for details on the usage of this -# infrastructure -# -# In terms of implementation, this generic infrastructure requires the -# .mk file to specify: -# -# 1. Metadata informations about the package: name, version, -# download URL, etc. -# -# 2. Description of the commands to be executed to configure, build -# and install the package -# -# The autotools infrastructure specializes this generic infrastructure -# by already implementing the configure, build and install steps. -################################################################################ - -# UPPERCASE Macro -- transform its argument to uppercase and replace dots and -# hyphens to underscores - -# Heavily inspired by the up macro from gmsl (http://gmsl.sf.net) -# This is approx 5 times faster than forking a shell and tr, and -# as this macro is used a lot it matters -# This works by creating translation character pairs (E.G. a:A b:B) -# and then looping though all of them running $(subst from,to,text) -[FROM] := a b c d e f g h i j k l m n o p q r s t u v w x y z . - -[TO] := A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _ _ - -UPPERCASE = $(strip $(eval __tmp := $1) \ - $(foreach c, $(join $(addsuffix :,$([FROM])),$([TO])), \ - $(eval __tmp := \ - $(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)),\ - $(__tmp)))) \ - $(__tmp)) - -define KCONFIG_ENABLE_OPT - $(SED) "/\\<$(1)\\>/d" $(2) - echo "$(1)=y" >> $(2) -endef - -define KCONFIG_SET_OPT - $(SED) "/\\<$(1)\\>/d" $(3) - echo "$(1)=$(2)" >> $(3) -endef - -define KCONFIG_DISABLE_OPT - $(SED) "/\\<$(1)\\>/d" $(2) - echo "# $(1) is not set" >> $(2) -endef - -# Define extractors for different archive suffixes -INFLATE.bz2 = $(BZCAT) -INFLATE.gz = $(ZCAT) -INFLATE.tbz = $(BZCAT) -INFLATE.tbz2 = $(BZCAT) -INFLATE.tgz = $(ZCAT) -INFLATE.tar = cat - -# MESSAGE Macro -- display a message in bold type -MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)" -TERM_BOLD := $(shell tput smso) -TERM_RESET := $(shell tput rmso) - -# Download method commands -WGET:=$(call qstrip,$(BR2_WGET)) $(QUIET) -SVN:=$(call qstrip,$(BR2_SVN)) $(QUIET) -BZR:=$(call qstrip,$(BR2_BZR)) $(QUIET) -CP:=$(call qstrip,$(BR2_CP)) $(QUIET) -GIT:=$(call qstrip,$(BR2_GIT)) $(QUIET) - -# Default spider mode is 'DOWNLOAD'. Other possible values are 'SOURCE_CHECK' -# used by the _source-check target and 'SHOW_EXTERNAL_DEPS', used by the -# external-deps target. -DL_MODE=DOWNLOAD - -DL_DIR=$(call qstrip,$(BR2_DL_DIR)) -ifeq ($(DL_DIR),) -DL_DIR:=$(TOPDIR)/dl -endif - -################################################################################ -# The DOWNLOAD_{GIT,SVN,BZR} helpers are in charge of getting a -# working copy of the source repository for their corresponding SCM, -# checking out the requested version / commit / tag, and create an -# archive out of it. DOWNLOAD_WGET is the normal wget-based download -# mechanism. -# -# The SOURCE_CHECK_{GIT,SVN,BZR,WGET} helpers are in charge of simply -# checking that the source is available for download. This can be used -# to make sure one will be able to get all the sources needed for -# one's build configuration. -# -# The SHOW_EXTERNAL_DEPS_{GIT,SVN,BZR,WGET} helpers simply output to -# the console the names of the files that will be downloaded, or path -# and revision of the source repositories, producing a list of all the -# "external dependencies" of a given build configuration. -################################################################################ - -define DOWNLOAD_GIT - ( export GIT_DIR=$(DL_DIR)/git/$($(PKG)_NAME)/.git; \ - (test -d $(DL_DIR)/git/$($(PKG)_NAME)/.git && $(GIT) cat-file -e $($(PKG)_DL_VERSION) && \ - touch $(DL_DIR)/$($(PKG)_SOURCE)) || \ - (test -d $(DL_DIR)/git/$($(PKG)_NAME)/.git && $(GIT) fetch --all && \ - $(GIT) cat-file -e $($(PKG)_DL_VERSION) && \ - touch $(DL_DIR)/$($(PKG)_SOURCE)) || \ - (test ! -e $(DL_DIR)/git/$($(PKG)_NAME)/.git && $(GIT) clone --no-checkout $($(PKG)_SITE) $(DL_DIR)/git/$($(PKG)_NAME) && \ - $(GIT) cat-file -e $($(PKG)_DL_VERSION) && \ - touch $(DL_DIR)/$($(PKG)_SOURCE))) || \ - echo "Error extracting revision: $($(PKG)_DL_VERSION)" ; false -endef - -# TODO: improve to check that the given PKG_DL_VERSION exists on the remote -# repository -define SOURCE_CHECK_GIT - $(GIT) ls-remote --heads $($(PKG)_SITE) > /dev/null -endef - -define SHOW_EXTERNAL_DEPS_GIT - echo "$($(PKG)_SITE) [git: $($(PKG)_DL_VERSION)]" -endef - - -define DOWNLOAD_BZR - test -e $(DL_DIR)/$($(PKG)_SOURCE) || \ - $(BZR) export $(DL_DIR)/$($(PKG)_SOURCE) $($(PKG)_SITE) -r $($(PKG)_DL_VERSION) -endef - -define SOURCE_CHECK_BZR - $(BZR) ls --quiet $($(PKG)_SITE) > /dev/null -endef - -define SHOW_EXTERNAL_DEPS_BZR - echo "$($(PKG)_SITE) [bzr: $($(PKG)_DL_VERSION)]" -endef - - -define DOWNLOAD_CP - (test -e $(DL_DIR)/$($(PKG)_SOURCE) && test -z `find $($(PKG)_SITE) -newer $(DL_DIR)/$($(PKG)_SOURCE)`) || \ - tar -C $($(PKG)_SITE) . -czf $(DL_DIR)/$($(PKG)_SOURCE) -endef - - -define DOWNLOAD_SVN - test -e $(DL_DIR)/$($(PKG)_SOURCE) || \ - (pushd $(DL_DIR) > /dev/null && \ - $(SVN) export -r $($(PKG)_DL_VERSION) $($(PKG)_SITE) $($(PKG)_DL_DIR) && \ - $(TAR) czf $($(PKG)_SOURCE) $($(PKG)_BASE_NAME)/ && \ - rm -rf $($(PKG)_DL_DIR) && \ - popd > /dev/null) -endef - -define SOURCE_CHECK_SVN - $(SVN) ls $($(PKG)_SITE) > /dev/null -endef - -define SHOW_EXTERNAL_DEPS_SVN - echo "$($(PKG)_SITE) [svn: $($(PKG)_DL_VERSION)]" -endef - - -define DOWNLOAD_WGET - test -e $(DL_DIR)/$(2) || \ - $(WGET) -P $(DL_DIR) $(call qstrip,$(1))/$(2) -endef - -define SOURCE_CHECK_WGET - $(WGET) --spider $(call qstrip,$(1))/$(2) -endef - -define SHOW_EXTERNAL_DEPS_WGET - echo $(2) -endef - -################################################################################ -# DOWNLOAD -- Download helper. Will try to download source from: -# 1) BR2_PRIMARY_SITE if enabled -# 2) Download site -# 3) BR2_BACKUP_SITE if enabled -# -# Argument 1 is the source location -# Argument 2 is the source filename -# -# E.G. use like this: -# $(call DOWNLOAD,$(FOO_SITE),$(FOO_SOURCE)) -################################################################################ - -define DOWNLOAD - $(Q)if test -n "$(call qstrip,$(BR2_PRIMARY_SITE))" ; then \ - $(call $(DL_MODE)_WGET,$(BR2_PRIMARY_SITE),$(2)) && exit ; \ - fi ; \ - if test -n "$(1)" ; then \ - case "$($(PKG)_SITE_METHOD)" in \ - git) $($(DL_MODE)_GIT) && exit ;; \ - svn) $($(DL_MODE)_SVN) && exit ;; \ - bzr) $($(DL_MODE)_BZR) && exit ;; \ - cp) $($(DL_MODE)_CP) && exit ;; \ - *) $(call $(DL_MODE)_WGET,$(1),$(2)) && exit ;; \ - esac ; \ - fi ; \ - if test -n "$(call qstrip,$(BR2_BACKUP_SITE))" ; then \ - $(call $(DL_MODE)_WGET,$(BR2_BACKUP_SITE),$(2)) && exit ; \ - fi ; \ - exit 1 -endef - -# Utility programs used to build packages -TAR ?= tar - -# Automatically detect tar --strip-path/components option -TAR_STRIP_COMPONENTS := \ - $(shell $(TAR) --help | grep strip-path > /dev/null ; \ - if test $$? = 0 ; then \ - echo '--strip-path' ; \ - else \ - echo '--strip-components' ; \ - fi) - -# Needed for the foreach loops to loop over the list of hooks, so that -# each hook call is properly separated by a newline. -define sep - - -endef - -################################################################################ -# Implicit targets -- produce a stamp file for each step of a package build -################################################################################ - -# Retrieve the archive -$(BUILD_DIR)/%/.stamp_downloaded: -ifeq ($(DL_MODE),DOWNLOAD) -# Only show the download message if it isn't already downloaded - $(Q)(test -e $(DL_DIR)/$($(PKG)_SOURCE) && \ - (test -z $($(PKG)_PATCH) || test -e $(DL_DIR)$($(PKG)_PATCH))) || \ - $(call MESSAGE,"Downloading") -endif - $(call DOWNLOAD,$($(PKG)_SITE),$($(PKG)_SOURCE)) - $(if $($(PKG)_PATCH),$(call DOWNLOAD,$($(PKG)_SITE),$($(PKG)_PATCH))) -ifeq ($(DL_MODE),DOWNLOAD) - $(Q)mkdir -p $(@D) - $(Q)touch $@ -endif - -# Unpack the archive -$(BUILD_DIR)/%/.stamp_extracted: - $(Q)mkdir -p $(@D) - $(Q)( \ - if test -d $(DL_DIR)/git/$($(PKG)_NAME)/.git -a ! -s $(DL_DIR)/$($(PKG)_SOURCE) ; then \ - $(call MESSAGE,"Checking out cached revision"); \ - $(GIT) --work-tree=$(@D) --git-dir=$(DL_DIR)/git/$($(PKG)_NAME)/.git checkout -f -q $($(PKG)_DL_VERSION); \ - else \ - $(call MESSAGE,"Extracting"); \ - $(INFLATE$(suffix $($(PKG)_SOURCE))) $(DL_DIR)/$($(PKG)_SOURCE) | \ - $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) - ;\ - fi; \ - ) -# some packages have messed up permissions inside - $(Q)chmod -R ug+rw $(@D) - $(foreach hook,$($(PKG)_POST_EXTRACT_HOOKS),$(call $(hook))$(sep)) - $(Q)touch $@ - -# Patch -# -# The NOHOSTPKG variable is the uppercased package name, without the -# HOST_ prefix, even for host packages. This allows to find the -# patches in the package directory, because $($(NOHOSTPKG)_NAME) -# expands to the package directory name. -# -$(BUILD_DIR)/%/.stamp_patched: NAMEVER = $($(NOHOSTPKG)_NAME)-$($(PKG)_VERSION) -$(BUILD_DIR)/%/.stamp_patched: - @$(call MESSAGE,"Patching $($(PKG)_DIR_PREFIX)/$($(PKG)_NAME)") - $(if $($(PKG)_PATCH),toolchain/patch-kernel.sh $(@D) $(DL_DIR) $($(PKG)_PATCH)) - $(Q)( \ - if test -d $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME); then \ - if test "$(wildcard $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME)/$(NAMEVER)*.patch*)"; then \ - toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME) $(NAMEVER)\*.patch $(NAMEVER)\*.patch.$(ARCH) || exit 1; \ - else \ - toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME) $($(NOHOSTPKG)_NAME)\*.patch $($(NOHOSTPKG)_NAME)\*.patch.$(ARCH) || exit 1; \ - if test -d $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME)/$(NAMEVER); then \ - toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME)/$(NAMEVER) \*.patch \*.patch.$(ARCH) || exit 1; \ - fi; \ - fi; \ - fi; \ - ) - $(foreach hook,$($(PKG)_POST_PATCH_HOOKS),$(call $(hook))$(sep)) - $(Q)touch $@ - -# Configure -$(BUILD_DIR)/%/.stamp_configured: - $(foreach hook,$($(PKG)_PRE_CONFIGURE_HOOKS),$(call $(hook))$(sep)) - @$(call MESSAGE,"Configuring") - $($(PKG)_CONFIGURE_CMDS) - $(foreach hook,$($(PKG)_POST_CONFIGURE_HOOKS),$(call $(hook))$(sep)) - $(Q)touch $@ - -# Build -$(BUILD_DIR)/%/.stamp_built:: - @$(call MESSAGE,"Building") - $($(PKG)_BUILD_CMDS) - $(foreach hook,$($(PKG)_POST_BUILD_HOOKS),$(call $(hook))$(sep)) - $(Q)touch $@ - -# Install to host dir -$(BUILD_DIR)/%/.stamp_host_installed: - @$(call MESSAGE,'Installing to host directory') - $($(PKG)_INSTALL_CMDS) - $(foreach hook,$($(PKG)_POST_INSTALL_HOOKS),$(call $(hook))$(sep)) - $(Q)touch $@ - -# Install to staging dir -$(BUILD_DIR)/%/.stamp_staging_installed: - @$(call MESSAGE,'Installing to staging directory') - $($(PKG)_INSTALL_STAGING_CMDS) - $(foreach hook,$($(PKG)_POST_INSTALL_STAGING_HOOKS),$(call $(hook))$(sep)) - $(Q)touch $@ - -# Install to target dir -$(BUILD_DIR)/%/.stamp_target_installed: - @$(call MESSAGE,"Installing to target") - $($(PKG)_INSTALL_TARGET_CMDS) - $(foreach hook,$($(PKG)_POST_INSTALL_TARGET_HOOKS),$(call $(hook))$(sep)) - $(Q)touch $@ - -# Clean package -$(BUILD_DIR)/%/.stamp_cleaned: - @$(call MESSAGE,"Cleaning up") - $($(PKG)_CLEAN_CMDS) - rm -f $(@D)/.stamp_built - -# Uninstall package from target and staging -$(BUILD_DIR)/%/.stamp_uninstalled: - @$(call MESSAGE,"Uninstalling") - $($(PKG)_UNINSTALL_STAGING_CMDS) - rm -f $($(PKG)_TARGET_INSTALL_STAGING) - $($(PKG)_UNINSTALL_TARGET_CMDS) - rm -f $($(PKG)_TARGET_INSTALL_TARGET) $($(PKG)_HOOK_POST_INSTALL) - -# Remove package sources -$(BUILD_DIR)/%/.stamp_dircleaned: - rm -Rf $(@D) - -################################################################################ -# GENTARGETS_INNER -- generates the make targets needed to build a -# generic package -# -# argument 1 is the lowercase package name -# argument 2 is the uppercase package name, including an HOST_ prefix -# for host packages -# argument 3 is the uppercase package name, without the HOST_ prefix -# for host packages -# argument 4 is the package directory prefix -# argument 5 is the type (target or host) -################################################################################ - -define GENTARGETS_INNER - -# Define default values for various package-related variables, if not -# already defined. For some variables (version, source, site and -# subdir), if they are undefined, we try to see if a variable without -# the HOST_ prefix is defined. If so, we use such a variable, so that -# these informations have only to be specified once, for both the -# target and host packages of a given .mk file. - -$(2)_TYPE = $(5) -$(2)_NAME = $(1) - -# Keep the package version that may contain forward slashes in the _DL_VERSION -# variable, then replace all forward slashes ('/') by underscores ('_') to -# sanitize the package version that is used in paths, directory and file names. -# Forward slashes may appear in the package's version when pointing to a -# version control system branch or tag, for example remotes/origin/1_10_stable. -$(2)_DL_VERSION = $($(2)_VERSION) -ifndef $(2)_VERSION - ifdef $(3)_VERSION - $(2)_VERSION = $($(3)_VERSION) - else - $(2)_VERSION = undefined - endif -else - $(2)_VERSION = $(subst /,_,$($(2)_VERSION)) -endif - -$(2)_BASE_NAME = $(1)-$$($(2)_VERSION) -$(2)_DL_DIR = $$(DL_DIR)/$$($(2)_BASE_NAME) -$(2)_DIR = $$(BUILD_DIR)/$$($(2)_BASE_NAME) - -ifndef $(2)_SOURCE - ifdef $(3)_SOURCE - $(2)_SOURCE = $($(3)_SOURCE) - else - $(2)_SOURCE ?= $$($(2)_BASE_NAME).tar.gz - endif -endif - -ifndef $(2)_PATCH - ifdef $(3)_PATCH - $(2)_PATCH = $($(3)_PATCH) - endif -endif - -ifndef $(2)_SITE - ifdef $(3)_SITE - $(2)_SITE = $($(3)_SITE) - else - $(2)_SITE ?= \ - http://$$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/$(1) - endif -endif - -ifndef $(2)_SITE_METHOD - ifdef $(3)_SITE_METHOD - $(2)_SITE_METHOD = $($(3)_SITE_METHOD) - else - # Try automatic detection using the scheme part of the URI - $(2)_SITE_METHOD = $(firstword $(subst ://, ,$(call qstrip,$($(2)_SITE)))) - endif -endif - -$(2)_DEPENDENCIES ?= -$(2)_INSTALL_STAGING ?= NO -$(2)_INSTALL_TARGET ?= YES -$(2)_DIR_PREFIX = $(if $(4),$(4),$(TOP_SRCDIR)/package) - -# define sub-target stamps -$(2)_TARGET_INSTALL_TARGET = $$($(2)_DIR)/.stamp_target_installed -$(2)_TARGET_INSTALL_STAGING = $$($(2)_DIR)/.stamp_staging_installed -$(2)_TARGET_INSTALL_HOST = $$($(2)_DIR)/.stamp_host_installed -$(2)_TARGET_BUILD = $$($(2)_DIR)/.stamp_built -$(2)_TARGET_CONFIGURE = $$($(2)_DIR)/.stamp_configured -$(2)_TARGET_PATCH = $$($(2)_DIR)/.stamp_patched -$(2)_TARGET_EXTRACT = $$($(2)_DIR)/.stamp_extracted -$(2)_TARGET_SOURCE = $$($(2)_DIR)/.stamp_downloaded -$(2)_TARGET_UNINSTALL = $$($(2)_DIR)/.stamp_uninstalled -$(2)_TARGET_CLEAN = $$($(2)_DIR)/.stamp_cleaned -$(2)_TARGET_DIRCLEAN = $$($(2)_DIR)/.stamp_dircleaned - -# post-steps hooks -$(2)_POST_EXTRACT_HOOKS ?= -$(2)_POST_PATCH_HOOKS ?= -$(2)_PRE_CONFIGURE_HOOKS ?= -$(2)_POST_CONFIGURE_HOOKS ?= -$(2)_POST_BUILD_HOOKS ?= -$(2)_POST_INSTALL_HOOKS ?= -$(2)_POST_INSTALL_STAGING_HOOKS ?= -$(2)_POST_INSTALL_TARGET_HOOKS ?= - -# human-friendly targets and target sequencing -$(1): $(1)-install - -ifeq ($$($(2)_TYPE),host) -$(1)-install: $(1)-install-host -else -$(1)-install: $(1)-install-staging $(1)-install-target -endif - -ifeq ($$($(2)_INSTALL_TARGET),YES) -$(1)-install-target: $(1)-build \ - $$($(2)_TARGET_INSTALL_TARGET) -else -$(1)-install-target: -endif - -ifeq ($$($(2)_INSTALL_STAGING),YES) -$(1)-install-staging: $(1)-build \ - $$($(2)_TARGET_INSTALL_STAGING) -else -$(1)-install-staging: -endif - -$(1)-install-host: $(1)-build $$($(2)_TARGET_INSTALL_HOST) - -$(1)-build: $(1)-configure \ - $$($(2)_TARGET_BUILD) - -$(1)-configure: $(1)-patch \ - $$($(2)_TARGET_CONFIGURE) - -$(1)-patch: $(1)-extract $$($(2)_TARGET_PATCH) - -$(1)-extract: $(1)-depends \ - $$($(2)_TARGET_EXTRACT) - -$(1)-depends: $(1)-source $$($(2)_DEPENDENCIES) - -$(1)-show-depends: - @echo $$($(2)_DEPENDENCIES) - -$(1)-source: $$($(2)_TARGET_SOURCE) - -$(1)-uninstall: $(1)-configure $$($(2)_TARGET_UNINSTALL) - -$(1)-clean: $(1)-uninstall \ - $$($(2)_TARGET_CLEAN) - -$(1)-dirclean: $$($(2)_TARGET_DIRCLEAN) - -# define the PKG variable for all targets, containing the -# uppercase package variable prefix -$$($(2)_TARGET_INSTALL_TARGET): PKG=$(2) -$$($(2)_TARGET_INSTALL_STAGING): PKG=$(2) -$$($(2)_TARGET_INSTALL_HOST): PKG=$(2) -$$($(2)_TARGET_BUILD): PKG=$(2) -$$($(2)_TARGET_CONFIGURE): PKG=$(2) -$$($(2)_TARGET_PATCH): PKG=$(2) -$$($(2)_TARGET_PATCH): NOHOSTPKG=$(3) -$$($(2)_TARGET_EXTRACT): PKG=$(2) -$$($(2)_TARGET_SOURCE): PKG=$(2) -$$($(2)_TARGET_UNINSTALL): PKG=$(2) -$$($(2)_TARGET_CLEAN): PKG=$(2) -$$($(2)_TARGET_DIRCLEAN): PKG=$(2) - -# add package to the general list of targets if requested by the buildroot -# configuration - -ifeq ($$(BR2_PACKAGE_$(2)),y) - -TARGETS += $(1) - -ifeq ($$($(2)_SITE_METHOD),svn) -DL_TOOLS_DEPENDENCIES += svn -else ifeq ($$($(2)_SITE_METHOD),git) -DL_TOOLS_DEPENDENCIES += git -else ifeq ($$($(2)_SITE_METHOD),bzr) -DL_TOOLS_DEPENDENCIES += bzr -endif # SITE_METHOD - -endif # BR2_PACKAGE_$(2) -endef # GENTARGETS_INNER - -################################################################################ -# GENTARGETS -- the target generator macro for generic packages -# -# Argument 1 is the package directory prefix [mandatory] -# Argument 2 is the lowercase package name [mandatory] -# Argument 3 is "target" or "host" [optional, default: "target"] -################################################################################ - -define GENTARGETS -ifeq ($(3),host) -# In the case of host packages, turn the package name "pkg" into "host-pkg" -$(call GENTARGETS_INNER,$(3)-$(2),$(call UPPERCASE,$(3)-$(2)),$(call UPPERCASE,$(2)),$(1),host) -else -# In the case of target packages, keep the package name "pkg" -$(call GENTARGETS_INNER,$(2),$(call UPPERCASE,$(2)),$(call UPPERCASE,$(2)),$(1),target) -endif -endef - -# :mode=makefile: diff --git a/package/a10disp/Config.in b/package/a10disp/Config.in new file mode 100644 index 0000000000..fd350b20a1 --- /dev/null +++ b/package/a10disp/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_A10DISP + bool "a10disp" + depends on BR2_arm + depends on BR2_LINUX_KERNEL + help + Program to change the display mode of Allwinner ARM SOCs running + the linux-sunxi kernel (and not the mainline kernel.) + + http://github.com/hglm/a10disp + +comment "a10disp requires the linux kernel" + depends on BR2_arm + depends on !BR2_LINUX_KERNEL diff --git a/package/a10disp/a10disp.mk b/package/a10disp/a10disp.mk new file mode 100644 index 0000000000..486db44a90 --- /dev/null +++ b/package/a10disp/a10disp.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# a10disp +# +################################################################################ + +A10DISP_VERSION = a899cc6dcf909360aac00482ede5369f3656f226 +A10DISP_SITE = http://github.com/hglm/a10disp/tarball/$(A10DISP_VERSION) +A10DISP_LICENSE = MIT + +A10DISP_DEPENDENCIES = linux + +define A10DISP_BUILD_CMDS + cp -f $(LINUX_DIR)/include/video/sunxi_disp_ioctl.h $(@D)/ + $(TARGET_CC) $(TARGET_CFLAGS) $(@D)/a10disp.c -o $(@D)/a10disp +endef + +define A10DISP_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/a10disp $(TARGET_DIR)/usr/bin/a10disp +endef + +$(eval $(generic-package)) diff --git a/package/acl/Config.in b/package/acl/Config.in new file mode 100644 index 0000000000..73ceb7245e --- /dev/null +++ b/package/acl/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_ACL + bool "acl" + select BR2_PACKAGE_ATTR + depends on BR2_LARGEFILE + help + POSIX Access Control Lists, which are used to define more + fine-grained discretionary access rights for files and + directories. + This package also provides libacl. + + http://savannah.nongnu.org/projects/acl + +comment "acl needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE diff --git a/package/acl/acl-01-support-static-installation.patch b/package/acl/acl-01-support-static-installation.patch new file mode 100644 index 0000000000..4cb473ffc2 --- /dev/null +++ b/package/acl/acl-01-support-static-installation.patch @@ -0,0 +1,29 @@ +Support installation of .a file when doing static linking + +When doing static linking (i.e ENABLE_SHARED != yes), the acl build +logic wasn't installing any library at all, not even the .a file which +is needed for static linking. This patch fixes that. + +Signed-off-by: Thomas Petazzoni + +Index: b/include/buildmacros +=================================================================== +--- a/include/buildmacros ++++ b/include/buildmacros +@@ -97,7 +97,15 @@ + + INSTALL_LTLIB_STATIC = \ + cd $(TOPDIR)/$(LIBNAME)/.libs; \ +- ../$(INSTALL) -m 755 -d $(PKG_DEVLIB_DIR); ++ ../$(INSTALL) -m 755 -d $(PKG_DEVLIB_DIR); \ ++ ../$(INSTALL) -m 644 -T old_lib $(LIBNAME).la $(PKG_DEVLIB_DIR); \ ++ ../$(INSTALL) -m 644 $(LIBNAME).la $(PKG_DEVLIB_DIR)/$(LIBNAME).la ; \ ++ ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \ ++ ../$(INSTALL) -T so_base $(LIBNAME).la $(PKG_LIB_DIR); \ ++ if test "x$(PKG_DEVLIB_DIR)" != "x$(PKG_LIB_DIR)" ; then \ ++ ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \ ++ ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \ ++ fi + + INSTALL_MAN = \ + @for d in $(MAN_PAGES); do \ diff --git a/package/acl/acl.mk b/package/acl/acl.mk new file mode 100644 index 0000000000..130ad10258 --- /dev/null +++ b/package/acl/acl.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# acl +# +################################################################################ + +ACL_VERSION = 2.2.52 +ACL_SOURCE = acl-$(ACL_VERSION).src.tar.gz +ACL_SITE = http://download.savannah.gnu.org/releases/acl +ACL_INSTALL_STAGING = YES +ACL_DEPENDENCIES = attr +ACL_CONF_OPT = --enable-gettext=no + +# While the configuration system uses autoconf, the Makefiles are +# hand-written and do not use automake. Therefore, we have to hack +# around their deficiencies by passing installation paths. +ACL_INSTALL_STAGING_OPT = \ + prefix=$(STAGING_DIR)/usr \ + exec_prefix=$(STAGING_DIR)/usr \ + PKG_DEVLIB_DIR=$(STAGING_DIR)/usr/lib \ + install-dev install-lib + +ACL_INSTALL_TARGET_OPT = \ + prefix=$(TARGET_DIR)/usr \ + exec_prefix=$(TARGET_DIR)/usr \ + install install-lib + +$(eval $(autotools-package)) diff --git a/package/acpid/S02acpid b/package/acpid/S02acpid new file mode 100755 index 0000000000..ec686d8f55 --- /dev/null +++ b/package/acpid/S02acpid @@ -0,0 +1,22 @@ +#!/bin/sh + +case "$1" in + start) + echo -n "Starting acpid: " + start-stop-daemon -S -q -m -b -p /var/run/acpid.pid --exec /usr/sbin/acpid -- -n + echo "done" + ;; + stop) + echo -n "Stopping acpid: " + start-stop-daemon -K -q -p /var/run/acpid.pid + echo "done" + ;; + restart) + "$0" stop + sleep 1 + "$0" start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + ;; +esac diff --git a/package/acpid/acpid.mk b/package/acpid/acpid.mk index d61ca4164f..6a18f46ef9 100644 --- a/package/acpid/acpid.mk +++ b/package/acpid/acpid.mk @@ -1,11 +1,14 @@ -############################################################# +################################################################################ # # acpid # -############################################################# -ACPID_VERSION = 2.0.6 +################################################################################ + +ACPID_VERSION = 2.0.11 ACPID_SOURCE = acpid_$(ACPID_VERSION).orig.tar.gz ACPID_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/a/acpid +ACPID_LICENSE = GPLv2+ +ACPID_LICENSE_FILES = COPYING define ACPID_BUILD_CMDS $(MAKE) CC="$(TARGET_CC)" -C $(@D) @@ -18,16 +21,17 @@ define ACPID_INSTALL_TARGET_CMDS install -D -m 644 $(@D)/acpi_listen.8 $(TARGET_DIR)/usr/share/man/man8/acpi_listen.8 mkdir -p $(TARGET_DIR)/etc/acpi/events /bin/echo -e "event=button[ /]power\naction=/sbin/poweroff" > $(TARGET_DIR)/etc/acpi/events/powerbtn + $(INSTALL) -D -m 0755 package/acpid/S02acpid $(TARGET_DIR)/etc/init.d/S02acpid endef define ACPID_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/sbin/acpid rm -f $(TARGET_DIR)/usr/bin/acpi_listen - rm -f $(addprefix )$(TARGET_DIR)/usr/share/man/man8/,acpid.8 acpi_listen.8) + rm -f $(addprefix $(TARGET_DIR)/usr/share/man/man8/,acpid.8 acpi_listen.8) endef define ACPID_CLEAN_CMDS -$(MAKE) -C $(@D) clean endef -$(eval $(call GENTARGETS,package,acpid)) +$(eval $(generic-package)) diff --git a/package/aespipe/Config.in b/package/aespipe/Config.in new file mode 100644 index 0000000000..df99523be2 --- /dev/null +++ b/package/aespipe/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_AESPIPE + bool "aespipe" + depends on BR2_USE_MMU # fork() + help + aespipe program is AES encrypting or decrypting pipe. It reads from + standard input and writes to standard output. It can be used to + create and restore encrypted tar or cpio archives. It can be used to + encrypt and decrypt loop-AES compatible encrypted disk images. + + http://koti.tnnet.fi/jari.ruusu/linux/ diff --git a/package/aespipe/aespipe.mk b/package/aespipe/aespipe.mk new file mode 100644 index 0000000000..ed40568f73 --- /dev/null +++ b/package/aespipe/aespipe.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# aespipe +# +################################################################################ + +AESPIPE_VERSION = 2.4c +AESPIPE_SOURCE = aespipe-v$(AESPIPE_VERSION).tar.bz2 +AESPIPE_SITE = http://loop-aes.sourceforge.net/aespipe/ +AESPIPE_LICENSE = GPL + +$(eval $(autotools-package)) diff --git a/package/aiccu/Config.in b/package/aiccu/Config.in new file mode 100644 index 0000000000..f56ad75a47 --- /dev/null +++ b/package/aiccu/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_AICCU + bool "aiccu" + depends on BR2_INET_IPV6 + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_GNUTLS + help + SixXS Automatic IPv6 Connectivity Client Utility + + AICCU (Automatic IPv6 Connectivity Client Utility) makes it + easy for users to get IPv6 connectivity. After having + requested an account, tunnel and optionally a subnet, AICCU + can be used to automatically configure the tunnel. AICCU + supports TIC (Tunnel Information & Control protocol), which it + uses for retrieving the tunnel configuration information, + AYIYA, which allows tunnels to be created even behind + firewalls and NAT's. + + http://www.sixxs.net/tools/aiccu/ + +comment "aiccu needs a toolchain w/ IPv6, wchar, threads" + depends on BR2_USE_MMU + depends on !(BR2_INET_IPV6 && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/aiccu/aiccu-0001-gnutls-and-uclibc-fixes.patch b/package/aiccu/aiccu-0001-gnutls-and-uclibc-fixes.patch new file mode 100644 index 0000000000..d316f8f6ca --- /dev/null +++ b/package/aiccu/aiccu-0001-gnutls-and-uclibc-fixes.patch @@ -0,0 +1,104 @@ +aiccu.h, common.c, common.h: fixes for deprecated GNUTLS functions and types +resolver.c: fixes for selection of wrong resolver function under uclibc + +Signed-off-by: Michael Rommel + +diff -purN aiccu_20070115.orig/common/aiccu.h aiccu_20070115/common/aiccu.h +--- aiccu_20070115.orig/common/aiccu.h 2007-01-15 13:01:43.000000000 +0100 ++++ aiccu_20070115/common/aiccu.h 2013-08-31 23:50:53.651936146 +0200 +@@ -111,7 +111,7 @@ struct AICCU_conf + #endif + + #ifdef AICCU_GNUTLS +- gnutls_certificate_credentials tls_cred; /* GNUTLS credentials */ ++ gnutls_certificate_credentials_t tls_cred; /* GNUTLS credentials */ + #endif + + bool daemonize; /* Daemonize? */ +diff -purN aiccu_20070115.orig/common/common.c aiccu_20070115/common/common.c +--- aiccu_20070115.orig/common/common.c 2006-12-21 15:08:50.000000000 +0100 ++++ aiccu_20070115/common/common.c 2013-09-01 01:21:36.031396740 +0200 +@@ -271,9 +271,8 @@ TLSSOCKET sock_alloc(void); + TLSSOCKET sock_alloc(void) + { + #ifdef AICCU_GNUTLS +- /* Allow connections to servers that have OpenPGP keys as well */ +- const int cert_type_priority[3] = { GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0 }; + int ret; ++ const char *err; + #endif /* AICCU_GNUTLS*/ + + TLSSOCKET sock; +@@ -297,11 +296,16 @@ TLSSOCKET sock_alloc(void) + } + + /* Use default priorities */ +- gnutls_set_default_priority(sock->session); +- /* XXX: Return value is not documented in GNUTLS documentation! */ +- +- gnutls_certificate_type_set_priority(sock->session, cert_type_priority); +- /* XXX: Return value is not documented in GNUTLS documentation! */ ++ ret = gnutls_priority_set_direct(sock->session, "NORMAL", &err); ++ if (ret < 0) ++ { ++ if (ret == GNUTLS_E_INVALID_REQUEST) ++ { ++ dolog( LOG_ERR, "TLS set priority failed, syntax error at: %s\n", err); ++ } ++ free(sock); ++ return NULL; ++ } + + /* Configure the x509 credentials for the current session */ + gnutls_credentials_set(sock->session, GNUTLS_CRD_CERTIFICATE, g_aiccu->tls_cred); +@@ -474,7 +478,7 @@ bool sock_gotls(TLSSOCKET sock) + } + + /* Set the transport */ +- gnutls_transport_set_ptr(sock->session, (gnutls_transport_ptr)sock->socket); ++ gnutls_transport_set_ptr(sock->session, (gnutls_transport_ptr_t) sock->socket); + + /* Perform the TLS handshake */ + ret = gnutls_handshake(sock->session); +diff -purN aiccu_20070115.orig/common/common.h aiccu_20070115/common/common.h +--- aiccu_20070115.orig/common/common.h 2007-01-11 15:50:51.000000000 +0100 ++++ aiccu_20070115/common/common.h 2013-08-31 23:26:13.683659455 +0200 +@@ -381,7 +381,7 @@ struct tlssocket + SOCKET socket; + #ifdef AICCU_GNUTLS + bool tls_active; /* TLS active? */ +- gnutls_session session; /* The GnuTLS sesision */ ++ gnutls_session_t session; /* The GnuTLS sesision */ + #endif + }; + +diff -purN aiccu_20070115.orig/common/resolver.c aiccu_20070115/common/resolver.c +--- aiccu_20070115.orig/common/resolver.c 2006-07-23 16:55:14.000000000 +0200 ++++ aiccu_20070115/common/resolver.c 2013-08-31 23:44:31.574866862 +0200 +@@ -26,7 +26,7 @@ + + int getrrs(const char *label, int rrtype, void gotrec(unsigned int num, int type, const char *record)) + { +-#ifdef _LINUX ++#if defined(_LINUX) && !defined(__UCLIBC__) + struct __res_state res; + #endif + unsigned char answer[8192]; +@@ -38,7 +38,7 @@ int getrrs(const char *label, int rrtype + uint16_t type = 0, class = 0; + uint32_t ttl = 0; + +-#ifdef _LINUX ++#if defined(_LINUX) && !defined(__UCLIBC__) + memset(&res, 0, sizeof(res)); + res.options = RES_DEBUG; + res_ninit(&res); +@@ -47,7 +47,7 @@ int getrrs(const char *label, int rrtype + #endif + + memset(answer, 0, sizeof(answer)); +-#ifdef _LINUX ++#if defined(_LINUX) && !defined(__UCLIBC__) + ret = res_nquery(&res, label, C_IN, rrtype, answer, sizeof(answer)); + #else + ret = res_query(label, C_IN, rrtype, answer, sizeof(answer)); diff --git a/package/aiccu/aiccu-0002-makefile-reorder-linked-libraries.patch b/package/aiccu/aiccu-0002-makefile-reorder-linked-libraries.patch new file mode 100644 index 0000000000..22f04a91a4 --- /dev/null +++ b/package/aiccu/aiccu-0002-makefile-reorder-linked-libraries.patch @@ -0,0 +1,15 @@ +Makefile: change LDFLAGS order on the compile line for --static + +Signed-off-by: Michael Rommel + +--- aiccu_20070115.orig/unix-console/Makefile 2007-01-15 12:04:27.000000000 +0100 ++++ aiccu_20070115/unix-console/Makefile 2013-09-29 22:54:42.742963861 +0200 +@@ -144,7 +144,7 @@ endif + all: aiccu + + aiccu: $(OBJS) ${SRCS} ${INCS} +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) ++ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS) + ifeq ($(shell echo $(CFLAGS) | grep -c "DEBUG"),0) + ifeq ($(shell echo "$(RPM_OPT_FLAGS)" | wc -c),1) + strip $@ diff --git a/package/aiccu/aiccu.mk b/package/aiccu/aiccu.mk new file mode 100644 index 0000000000..d698fa7a8a --- /dev/null +++ b/package/aiccu/aiccu.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# aiccu +# +################################################################################ + +AICCU_VERSION = 20070115 +AICCU_SOURCE = aiccu_$(AICCU_VERSION).tar.gz +AICCU_SITE = http://www.sixxs.net/archive/sixxs/aiccu/unix/ +AICCU_LICENSE = SixXS License, concise redistribution license +AICCU_LICENSE_FILES = doc/LICENSE +AICCU_DEPENDENCIES = gnutls + +AICCU_LFDLAGS = $(TARGET_LDFLAGS) + +# aiccu forgets to link with gnutls' dependencies breaking the build when +# linking statically +ifeq ($(BR2_PREFER_STATIC_LIB),y) +AICCU_LDFLAGS += $(shell $(PKG_CONFIG_HOST_BINARY) --static --libs gnutls) +endif + +# dummy RPM_OPT_FLAGS to disable stripping +define AICCU_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) LDFLAGS="$(AICCU_LDFLAGS)" $(MAKE) \ + CC="$(TARGET_CC)" RPM_OPT_FLAGS=1 -C $(@D)/unix-console all +endef + +define AICCU_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/unix-console/aiccu \ + $(TARGET_DIR)/usr/sbin/aiccu + [ -f $(TARGET_DIR)/etc/aiccu.conf ] || \ + $(INSTALL) -D -m 0644 $(@D)/doc/aiccu.conf \ + $(TARGET_DIR)/etc/aiccu.conf +endef + +define AICCU_INSTALL_INIT_SYSV + [ -f $(TARGET_DIR)/etc/init.d/S50aiccu ] || \ + $(INSTALL) -D -m 0755 $(@D)/doc/aiccu.init \ + $(TARGET_DIR)/etc/init.d/S50aiccu +endef + +$(eval $(generic-package)) diff --git a/package/aircrack-ng/Config.in b/package/aircrack-ng/Config.in new file mode 100644 index 0000000000..0c0345632a --- /dev/null +++ b/package/aircrack-ng/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_AIRCRACK_NG + bool "aircrack-ng" + depends on BR2_LARGEFILE + depends on BR2_USE_MMU # uses fork() + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_IW # runtime + depends on BR2_TOOLCHAIN_HAS_THREADS + help + A set of tools for auditing wireless networks + + http://www.aircrack-ng.org/ + +comment "aircrack-ng needs a toolchain w/ largefile, threads" + depends on BR2_USE_MMU + depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS + diff --git a/package/aircrack-ng/aircrack-ng-01-CVE-2010-1159.patch b/package/aircrack-ng/aircrack-ng-01-CVE-2010-1159.patch new file mode 100644 index 0000000000..634a01e391 --- /dev/null +++ b/package/aircrack-ng/aircrack-ng-01-CVE-2010-1159.patch @@ -0,0 +1,24 @@ +Fix for buffer overflow CVE-2010-1159. + +Signed-off-by: Gustavo Zacarias + +--- a/src/airodump-ng.c ++++ b/src/airodump-ng.c +@@ -2126,7 +2126,7 @@ + st_cur->wpa.eapol_size = ( h80211[z + 2] << 8 ) + + h80211[z + 3] + 4; + +- if ((int)pkh.len - z < st_cur->wpa.eapol_size || st_cur->wpa.eapol_size == 0) ++ if (caplen - z < st_cur->wpa.eapol_size || st_cur->wpa.eapol_size == 0 || caplen - z < 81 + 16 || st_cur->wpa.eapol_size > 256) + { + // Ignore the packet trying to crash us. + goto write_packet; +@@ -2158,7 +2158,7 @@ + st_cur->wpa.eapol_size = ( h80211[z + 2] << 8 ) + + h80211[z + 3] + 4; + +- if ((int)pkh.len - z < st_cur->wpa.eapol_size || st_cur->wpa.eapol_size == 0) ++ if (caplen - z < st_cur->wpa.eapol_size || st_cur->wpa.eapol_size == 0 || caplen - z < 81 + 16 || st_cur->wpa.eapol_size > 256) + { + // Ignore the packet trying to crash us. + goto write_packet; diff --git a/package/aircrack-ng/aircrack-ng.mk b/package/aircrack-ng/aircrack-ng.mk new file mode 100644 index 0000000000..f4a2188c40 --- /dev/null +++ b/package/aircrack-ng/aircrack-ng.mk @@ -0,0 +1,47 @@ +################################################################################ +# +# aircrack-ng +# +################################################################################ + +AIRCRACK_NG_VERSION = 1.1 +AIRCRACK_NG_SITE = http://download.aircrack-ng.org +AIRCRACK_NG_LICENSE = GPLv2+ +AIRCRACK_NG_LICENSE_FILES = LICENSE +AIRCRACK_NG_DEPENDENCIES = openssl + +ifeq ($(BR2_PACKAGE_SQLITE),y) + AIRCRACK_NG_MAKE_OPTS = sqlite=true + AIRCRACK_NG_MAKE_OPTS += \ + LIBSQL="-lsqlite3$(if $(BR2_PREFER_STATIC_LIB), -ldl -lpthread)" + + AIRCRACK_NG_DEPENDENCIES += sqlite +else + AIRCRACK_NG_MAKE_OPTS = sqlite=false +endif + +AIRCRACK_NG_LDFLAGS = $(TARGET_LDFLAGS) -lz \ + $(if $(BR2_PREFER_STATIC_LIB),-ldl -lpthread) + +define AIRCRACK_NG_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE1) CC="$(TARGET_CC)" LD="$(TARGET_LD)" \ + LDFLAGS="$(AIRCRACK_NG_LDFLAGS)" \ + -C $(@D) $(AIRCRACK_NG_MAKE_OPTS) all +endef + +define AIRCRACK_NG_CLEAN_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE1) CC="$(TARGET_CC)" LD="$(TARGET_LD)" \ + -C $(@D) $(AIRCRACK_NG_MAKE_OPTS) clean +endef + +define AIRCRACK_NG_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE1) -C $(@D) DESTDIR=$(TARGET_DIR) \ + prefix=/usr $(AIRCRACK_NG_MAKE_OPTS) install +endef + +define AIRCRACK_NG_UNINSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE1) -C $(@D) DESTDIR=$(TARGET_DIR) \ + $(AIRCRACK_NG_MAKE_OPTS) uninstall +endef + +$(eval $(generic-package)) diff --git a/package/alsa-lib/Config.in b/package/alsa-lib/Config.in new file mode 100644 index 0000000000..df05240423 --- /dev/null +++ b/package/alsa-lib/Config.in @@ -0,0 +1,83 @@ +config BR2_PACKAGE_ALSA_LIB + bool "alsa-lib" + # Temporary until + # https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4913 + # is fixed + select BR2_PACKAGE_ALSA_LIB_PCM + # Even though some parts of alsa-lib use threads only when + # available, some PCM plugins use them unconditionally. Since + # the usage of alsa-lib on no-thread systems is pretty + # unlikely, just require thread support globally for alsa-lib. + depends on BR2_TOOLCHAIN_HAS_THREADS + help + The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI + functionality to the Linux operating system. + + http://www.alsa-project.org/ + +comment "alsa-lib needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +if BR2_PACKAGE_ALSA_LIB + +config BR2_PACKAGE_ALSA_LIB_PYTHON + bool "Python support for alsa-lib" + depends on BR2_PACKAGE_PYTHON + help + Add python support for alsa-lib. + Python will be built and libpython will be installed + in the target directory + http://www.alsa-project.org/ + +menu "ALSA lib selection" + +config BR2_PACKAGE_ALSA_LIB_DEVDIR + string "directory with ALSA device files" + default "/dev/snd" + +config BR2_PACKAGE_ALSA_LIB_PCM_PLUGINS + string "built PCM plugins" + default "all" if BR2_USE_MMU + default "copy linear route mulaw alaw adpcm rate plug multi file null empty share meter hooks lfloat ladspa dmix dshare dsnoop asym iec958 softvol extplug ioplug mmap_emul" if !BR2_MMU + +config BR2_PACKAGE_ALSA_LIB_CTL_PLUGINS + string "built control plugins" + default "all" + +config BR2_PACKAGE_ALSA_LIB_ALOAD + bool "aload" + default y + +config BR2_PACKAGE_ALSA_LIB_MIXER + bool "mixer" + default y + +config BR2_PACKAGE_ALSA_LIB_PCM + bool "pcm" + default y + +config BR2_PACKAGE_ALSA_LIB_RAWMIDI + bool "rawmidi" + default y + +config BR2_PACKAGE_ALSA_LIB_HWDEP + bool "hwdep" + default y + +config BR2_PACKAGE_ALSA_LIB_SEQ + bool "seq" + default y + +config BR2_PACKAGE_ALSA_LIB_ALISP + bool "alisp" + depends on BR2_USE_MMU + default y + +config BR2_PACKAGE_ALSA_LIB_OLD_SYMBOLS + bool "old-symbols" + default y + +endmenu + +endif + diff --git a/package/multimedia/alsa-lib/alsa-lib-1.0.18-avr32-bad-inline.patch b/package/alsa-lib/alsa-lib-avr32-bad-inline.patch similarity index 100% rename from package/multimedia/alsa-lib/alsa-lib-1.0.18-avr32-bad-inline.patch rename to package/alsa-lib/alsa-lib-avr32-bad-inline.patch diff --git a/package/alsa-lib/alsa-lib-no-mmu.patch b/package/alsa-lib/alsa-lib-no-mmu.patch new file mode 100644 index 0000000000..317676af4c --- /dev/null +++ b/package/alsa-lib/alsa-lib-no-mmu.patch @@ -0,0 +1,44 @@ +Don't use fork() on noMMU platforms + +Signed-off-by: Thomas Petazzoni + +Index: alsa-lib-1.0.26/configure.in +=================================================================== +--- alsa-lib-1.0.26.orig/configure.in 2012-09-06 10:55:14.000000000 +0200 ++++ alsa-lib-1.0.26/configure.in 2013-03-09 16:22:08.000000000 +0100 +@@ -66,6 +66,8 @@ + AM_CONDITIONAL(ALSA_HSEARCH_R, [test "x$HAVE_HSEARCH_R" != xyes]) + AC_CHECK_FUNCS([uselocale]) + ++AC_CHECK_FUNC([fork]) ++ + SAVE_LIBRARY_VERSION + AC_SUBST(LIBTOOL_VERSION_INFO) + +Index: alsa-lib-1.0.26/src/pcm/pcm_direct.c +=================================================================== +--- alsa-lib-1.0.26.orig/src/pcm/pcm_direct.c 2012-09-06 10:55:14.000000000 +0200 ++++ alsa-lib-1.0.26/src/pcm/pcm_direct.c 2013-03-09 16:22:51.000000000 +0100 +@@ -424,13 +424,21 @@ + close(dmix->server_fd); + return ret; + } +- ++ ++#ifdef HAVE_FORK + ret = fork(); ++#else ++ ret = vfork(); ++#endif + if (ret < 0) { + close(dmix->server_fd); + return ret; + } else if (ret == 0) { ++#ifdef HAVE_FORK + ret = fork(); ++#else ++ ret = vfork(); ++#endif + if (ret == 0) + server_job(dmix); + _exit(EXIT_SUCCESS); diff --git a/package/alsa-lib/alsa-lib.mk b/package/alsa-lib/alsa-lib.mk new file mode 100644 index 0000000000..fba982a393 --- /dev/null +++ b/package/alsa-lib/alsa-lib.mk @@ -0,0 +1,96 @@ +################################################################################ +# +# alsa-lib +# +################################################################################ + +ALSA_LIB_VERSION = 1.0.26 +ALSA_LIB_SOURCE = alsa-lib-$(ALSA_LIB_VERSION).tar.bz2 +ALSA_LIB_SITE = http://alsa.cybermirror.org/lib +ALSA_LIB_LICENSE = LGPLv2.1+ +ALSA_LIB_LICENSE_FILES = COPYING +ALSA_LIB_INSTALL_STAGING = YES +ALSA_LIB_CFLAGS=$(TARGET_CFLAGS) +ALSA_LIB_AUTORECONF = YES +ALSA_LIB_CONF_OPT = --with-alsa-devdir=$(call qstrip,$(BR2_PACKAGE_ALSA_LIB_DEVDIR)) \ + --with-pcm-plugins="$(call qstrip,$(BR2_PACKAGE_ALSA_LIB_PCM_PLUGINS))" \ + --with-ctl-plugins="$(call qstrip,$(BR2_PACKAGE_ALSA_LIB_CTL_PLUGINS))" \ + --without-versioned + +# Can't build with static & shared at the same time (1.0.25+) +ifeq ($(BR2_PREFER_STATIC_LIB),y) +ALSA_LIB_CONF_OPT += --enable-shared=no +else +ALSA_LIB_CONF_OPT += --enable-static=no +endif + +ifneq ($(BR2_PACKAGE_ALSA_LIB_ALOAD),y) +ALSA_LIB_CONF_OPT += --disable-aload +endif +ifneq ($(BR2_PACKAGE_ALSA_LIB_MIXER),y) +ALSA_LIB_CONF_OPT += --disable-mixer +endif +ifneq ($(BR2_PACKAGE_ALSA_LIB_PCM),y) +ALSA_LIB_CONF_OPT += --disable-pcm +endif +ifneq ($(BR2_PACKAGE_ALSA_LIB_RAWMIDI),y) +ALSA_LIB_CONF_OPT += --disable-rawmidi +endif +ifneq ($(BR2_PACKAGE_ALSA_LIB_HWDEP),y) +ALSA_LIB_CONF_OPT += --disable-hwdep +endif +ifneq ($(BR2_PACKAGE_ALSA_LIB_SEQ),y) +ALSA_LIB_CONF_OPT += --disable-seq +endif +ifneq ($(BR2_PACKAGE_ALSA_LIB_ALISP),y) +ALSA_LIB_CONF_OPT += --disable-alisp +endif +ifneq ($(BR2_PACKAGE_ALSA_LIB_OLD_SYMBOLS),y) +ALSA_LIB_CONF_OPT += --disable-old-symbols +endif + +ifeq ($(BR2_ENABLE_DEBUG),y) +ALSA_LIB_CONF_OPT += --enable-debug +endif + +ifeq ($(BR2_avr32),y) +ALSA_LIB_CFLAGS+=-DAVR32_INLINE_BUG +endif + +ifeq ($(BR2_PACKAGE_ALSA_LIB_PYTHON),y) +ALSA_LIB_CONF_OPT += \ + --with-pythonlibs=-lpython$(PYTHON_VERSION_MAJOR) \ + --with-pythonincludes=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) +ALSA_LIB_CFLAGS+=-I$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) +ALSA_LIB_DEPENDENCIES = python +else +ALSA_LIB_CONF_OPT += --disable-python +endif + +ifeq ($(BR2_SOFT_FLOAT),y) +ALSA_LIB_CONF_OPT += --with-softfloat +endif + +ifeq ($(BR2_bfin),y) +# blackfin external toolchains don't have versionsort. Fake it using alphasort +# instead +ALSA_LIB_CFLAGS += -Dversionsort=alphasort +endif + +ALSA_LIB_CONF_ENV = CFLAGS="$(ALSA_LIB_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS) -lm" + +define ALSA_LIB_UNINSTALL_TARGET_CMDS + -rm -f $(TARGET_DIR)/usr/lib/libasound.so* + -rm -rf $(TARGET_DIR)/usr/lib/alsa-lib + -rm -rf $(TARGET_DIR)/usr/share/alsa +endef + +define ALSA_LIB_UNINSTALL_STAGING_CMDS + -rm -f $(STAGING_DIR)/usr/lib/libasound.* + -rm -rf $(STAGING_DIR)/usr/lib/alsa-lib + -rm -rf $(STAGING_DIR)/usr/share/alsa +endef + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/alsa-utils/Config.in b/package/alsa-utils/Config.in new file mode 100644 index 0000000000..db9f00708f --- /dev/null +++ b/package/alsa-utils/Config.in @@ -0,0 +1,81 @@ +config BR2_PACKAGE_ALSA_UTILS + bool "alsa-utils" + depends on BR2_LARGEFILE + depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib + select BR2_PACKAGE_ALSA_LIB + help + This package contains the command line utilities for the ALSA + project. + + http://www.alsa-project.org/ + +comment "alsa-utils needs a toolchain w/ largefile, threads" + depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS + +if BR2_PACKAGE_ALSA_UTILS +menu "ALSA utils selection" + +config BR2_PACKAGE_ALSA_UTILS_ALSACONF + bool "alsaconf" + +config BR2_PACKAGE_ALSA_UTILS_ALSACTL + bool "alsactl" + default y + +config BR2_PACKAGE_ALSA_UTILS_ALSAMIXER + bool "alsamixer" + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_NCURSES_TARGET_PANEL + select BR2_PACKAGE_NCURSES_TARGET_FORM + select BR2_PACKAGE_NCURSES_TARGET_MENU + select BR2_PACKAGE_ALSA_LIB_MIXER + depends on BR2_USE_WCHAR + default y + +comment "alsamixer needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR + +config BR2_PACKAGE_ALSA_UTILS_AMIDI + select BR2_PACKAGE_ALSA_LIB_RAWMIDI + bool "amidi" + +config BR2_PACKAGE_ALSA_UTILS_AMIXER + select BR2_PACKAGE_ALSA_LIB_MIXER + bool "amixer" + +config BR2_PACKAGE_ALSA_UTILS_APLAY + select BR2_PACKAGE_ALSA_LIB_PCM + bool "aplay/arecord" + +config BR2_PACKAGE_ALSA_UTILS_IECSET + select BR2_PACKAGE_ALSA_LIB_PCM + bool "iecset" + +config BR2_PACKAGE_ALSA_UTILS_ACONNECT + select BR2_PACKAGE_ALSA_LIB_SEQ + bool "aconnect" + +config BR2_PACKAGE_ALSA_UTILS_APLAYMIDI + select BR2_PACKAGE_ALSA_LIB_SEQ + bool "aplaymidi" + +config BR2_PACKAGE_ALSA_UTILS_ARECORDMIDI + select BR2_PACKAGE_ALSA_LIB_SEQ + bool "arecordmidi" + +config BR2_PACKAGE_ALSA_UTILS_ASEQDUMP + select BR2_PACKAGE_ALSA_LIB_SEQ + bool "aseqdump" + +config BR2_PACKAGE_ALSA_UTILS_ASEQNET + select BR2_PACKAGE_ALSA_LIB_SEQ + bool "aseqnet" + +config BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST + select BR2_PACKAGE_ALSA_LIB_PCM + bool "speaker-test" + +endmenu + +endif + diff --git a/package/multimedia/alsa-utils/alsa-utils.mk b/package/alsa-utils/alsa-utils.mk similarity index 83% rename from package/multimedia/alsa-utils/alsa-utils.mk rename to package/alsa-utils/alsa-utils.mk index 4ab49d3d63..b951112c58 100644 --- a/package/multimedia/alsa-utils/alsa-utils.mk +++ b/package/alsa-utils/alsa-utils.mk @@ -1,13 +1,16 @@ -############################################################# +################################################################################ # # alsa-utils # -############################################################# -ALSA_UTILS_VERSION = 1.0.23 +################################################################################ + +ALSA_UTILS_VERSION = 1.0.26 ALSA_UTILS_SOURCE = alsa-utils-$(ALSA_UTILS_VERSION).tar.bz2 -ALSA_UTILS_SITE = ftp://ftp.alsa-project.org/pub/utils +ALSA_UTILS_SITE = http://alsa.cybermirror.org/utils +ALSA_UTILS_LICENSE = GPLv2 +ALSA_UTILS_LICENSE_FILES = COPYING ALSA_UTILS_INSTALL_STAGING = YES -ALSA_UTILS_DEPENDENCIES = alsa-lib \ +ALSA_UTILS_DEPENDENCIES = host-gettext alsa-lib \ $(if $(BR2_PACKAGE_NCURSES),ncurses) ALSA_UTILS_CONF_ENV = \ @@ -26,8 +29,7 @@ ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSACTL) += usr/sbin/alsactl ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSAMIXER) += usr/bin/alsamixer ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_AMIDI) += usr/bin/amidi ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_AMIXER) += usr/bin/amixer -ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_APLAY) += usr/bin/aplay -ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ARECORD) += usr/bin/arecord +ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_APLAY) += usr/bin/aplay usr/bin/arecord ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_IECSET) += usr/bin/iecset ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ACONNECT) += usr/bin/aconnect ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_APLAYMIDI) += usr/bin/aplaymidi @@ -37,6 +39,7 @@ ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ASEQNET) += usr/bin/aseqnet ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST) += usr/bin/speaker-test define ALSA_UTILS_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/var/lib/alsa for i in $(ALSA_UTILS_TARGETS_y); do \ install -D -m 755 $(STAGING_DIR)/$$i $(TARGET_DIR)/$$i; \ done @@ -57,4 +60,4 @@ define ALSA_UTILS_UNINSTALL_TARGET_CMDS rm -f $(addprefix $(TARGET_DIR)/,$(ALSA_UTILS_TARGETS_) $(ALSA_UTILS_TARGETS_y)) endef -$(eval $(call AUTOTARGETS,package/multimedia,alsa-utils)) +$(eval $(autotools-package)) diff --git a/package/alsamixergui/Config.in b/package/alsamixergui/Config.in index 3afc31416c..5b61f3861d 100644 --- a/package/alsamixergui/Config.in +++ b/package/alsamixergui/Config.in @@ -1,15 +1,18 @@ config BR2_PACKAGE_ALSAMIXERGUI depends on BR2_PACKAGE_XORG7 - depends on BR2_PACKAGE_ALSA_LIB depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # fltk fork() select BR2_PACKAGE_FLTK + select BR2_PACKAGE_ALSA_LIB select BR2_PACKAGE_ALSA_LIB_PCM select BR2_PACKAGE_ALSA_LIB_MIXER + depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib bool "alsamixergui" help A nice GUI mixer for Alsa using fltk http://www.iua.upf.es/~mdeboer/projects/alsamixergui/ -comment "alsamixergui requires a toolchain with C++ support enabled" - depends on !BR2_INSTALL_LIBSTDCPP && BR2_PACKAGE_XORG7 && BR2_PACKAGE_ALSA_LIB +comment "alsamixergui needs a toolchain w/ C++, threads" + depends on BR2_PACKAGE_XORG7 && BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/alsamixergui/alsamixergui.mk b/package/alsamixergui/alsamixergui.mk index 374e9e33da..8f05350971 100644 --- a/package/alsamixergui/alsamixergui.mk +++ b/package/alsamixergui/alsamixergui.mk @@ -1,14 +1,13 @@ -############################################################# +################################################################################ # # alsamixergui # -############################################################# +################################################################################ + ALSAMIXERGUI_VERSION = 0.9.0rc2-1 ALSAMIXERGUI_SOURCE = alsamixergui_$(ALSAMIXERGUI_VERSION).orig.tar.gz -ALSAMIXERGUI_SITE = http://snapshot.debian.net/archive/2008/03/19/debian/pool/main/a/alsamixergui +ALSAMIXERGUI_SITE = http://snapshot.debian.org/archive/debian/20080319T000000Z/pool/main/a/alsamixergui/ ALSAMIXERGUI_AUTORECONF = YES -ALSAMIXERGUI_INSTALL_STAGING = NO -ALSAMIXERGUI_INSTALL_TARGET = YES ALSAMIXERGUI_CONF_ENV = ac_cv_lib_fltk_numericsort=yes \ ac_cv_lib_fltk_fl_numericsort=yes \ @@ -16,5 +15,4 @@ ALSAMIXERGUI_CONF_ENV = ac_cv_lib_fltk_numericsort=yes \ ALSAMIXERGUI_DEPENDENCIES = fltk alsa-lib -$(eval $(call AUTOTARGETS,package,alsamixergui)) - +$(eval $(autotools-package)) diff --git a/package/am33x-cm3/Config.in b/package/am33x-cm3/Config.in new file mode 100644 index 0000000000..060d0efc8d --- /dev/null +++ b/package/am33x-cm3/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_AM33X_CM3 + bool "am33x-cm3" + depends on BR2_arm # only relevant for TI am335x + help + Cortex-M3 binary blob for suspend-resume on am335x + + http://arago-project.org/git/projects/am33x-cm3.git diff --git a/package/am33x-cm3/S93-am335x-pm-firmware-load b/package/am33x-cm3/S93-am335x-pm-firmware-load new file mode 100755 index 0000000000..56c17b334d --- /dev/null +++ b/package/am33x-cm3/S93-am335x-pm-firmware-load @@ -0,0 +1,6 @@ +#!/bin/sh + +# Load the PM CM3 firmware +echo 1 > /sys/devices/ocp.2/44d00000.wkup_m3/firmware/am335x-pm-firmware.bin/loading +cat /lib/firmware/am335x-pm-firmware.bin > /sys/devices/ocp.2/44d00000.wkup_m3/firmware/am335x-pm-firmware.bin/data +echo 0 > /sys/devices/ocp.2/44d00000.wkup_m3/firmware/am335x-pm-firmware.bin/loading diff --git a/package/am33x-cm3/am33x-cm3-0001-fix-makefile.patch b/package/am33x-cm3/am33x-cm3-0001-fix-makefile.patch new file mode 100644 index 0000000000..77ba11c778 --- /dev/null +++ b/package/am33x-cm3/am33x-cm3-0001-fix-makefile.patch @@ -0,0 +1,26 @@ +Enforce correct -march option + +Buildroot uses a normal ARM compiler to build the AM33X CM3 firmware +(which runs on a Cortex-M3 processor), but Buildroot will have a +default -march value that doesn't necessarily match the one needed for +Cortex-M3, leading to build failures (gcc complains that the +-mcpu=cortex-m3 option being passed is not compatible with the +selected -march). + +Fix this by explicitly indicating -march=armv7-m. + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -13,7 +13,7 @@ + BINDIR = bin + + INCLUDES = $(SRCDIR)/include +-CFLAGS =-mcpu=cortex-m3 -mthumb -nostdlib -Wall -g -I$(INCLUDES) ++CFLAGS =-march=armv7-m -mcpu=cortex-m3 -mthumb -nostdlib -Wall -g -I$(INCLUDES) + LDFLAGS =-nostartfiles -fno-exceptions -Tfirmware.ld + + EXECUTABLE=am335x-pm-firmware.elf diff --git a/package/am33x-cm3/am33x-cm3.mk b/package/am33x-cm3/am33x-cm3.mk new file mode 100644 index 0000000000..929c4a5cd9 --- /dev/null +++ b/package/am33x-cm3/am33x-cm3.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# am33x-cm3 +# +################################################################################ + +AM33X_CM3_VERSION = AM335xPSP_04.06.00.10-rc1 +AM33X_CM3_SITE = http://arago-project.org/git/projects/am33x-cm3.git +AM33X_CM3_SITE_METHOD = git +AM33X_CM3_LICENSE = TI Publicly Available Software License +AM33X_CM3_LICENSE_FILES = License.txt + +# The build command below will use the standard cross-compiler (normally +# build for Cortex-A8, to build the FW for the Cortex-M3. +define AM33X_CM3_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) all +endef + +# Not all of the firmware files are used +define AM33X_CM3_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D $(@D)/bin/am335x-pm-firmware.bin \ + $(TARGET_DIR)/lib/firmware/am335x-pm-firmware.bin +endef + +define AM33X_CM3_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/am33x-cm3/S93-am335x-pm-firmware-load \ + $(TARGET_DIR)/etc/init.d/S93-am335x-pm-firmware-load +endef + +$(eval $(generic-package)) diff --git a/package/amlogic/amremote_config/amremote_config.mk b/package/amlogic/amremote_config/amremote_config.mk index 6012cdfc96..63ccb8c5fd 100644 --- a/package/amlogic/amremote_config/amremote_config.mk +++ b/package/amlogic/amremote_config/amremote_config.mk @@ -18,4 +18,4 @@ define AMREMOTE_CONFIG_INSTALL_TARGET_CMDS install -m 755 -t $(TARGET_DIR)/usr/bin $(@D)/amremote_config endef -$(eval $(call GENTARGETS,package/amlogic,amremote_config)) +$(eval $(generic-package)) diff --git a/package/amlogic/cmem/cmem.mk b/package/amlogic/cmem/cmem.mk index 37833407b6..7b1ab72161 100644 --- a/package/amlogic/cmem/cmem.mk +++ b/package/amlogic/cmem/cmem.mk @@ -17,4 +17,4 @@ define CMEM_INSTALL_STAGING_CMDS install -m 755 $(@D)/libcmem.a $(TARGET_DIR)/usr/lib endef -$(eval $(call GENTARGETS,package/amlogic,cmem)) +$(eval $(generic-package)) diff --git a/package/amlogic/libamplayerm1/libamplayerm1.mk b/package/amlogic/libamplayerm1/libamplayerm1.mk index f455c25437..404f378e5e 100644 --- a/package/amlogic/libamplayerm1/libamplayerm1.mk +++ b/package/amlogic/libamplayerm1/libamplayerm1.mk @@ -35,7 +35,7 @@ define LIBAMPLAYERM1_INSTALL_STAGING_CMDS install -m 644 $(@D)/usr/include/amlplayer/ppmgr/*.h $(STAGING_DIR)/usr/include/amlplayer/ppmgr mkdir -p $(STAGING_DIR)/usr/lib install -m 755 $(@D)/usr/lib/*.so* $(STAGING_DIR)/usr/lib - ln -s $(STAGING_DIR)/usr/lib/libamcodec.so.0.0 $(STAGING_DIR)/usr/lib/libamcodec.so + ln -s -r $(STAGING_DIR)/usr/lib/libamcodec.so.0.0 $(STAGING_DIR)/usr/lib/libamcodec.so #temporary, until we sync with mainline xbmc cp -rf $(@D)/usr/include/amlplayer/* $(STAGING_DIR)/usr/include @@ -48,7 +48,7 @@ define LIBAMPLAYERM1_INSTALL_TARGET_CMDS install -m 644 $(@D)/lib/firmware/*.bin $(TARGET_DIR)/lib/firmware mkdir -p $(TARGET_DIR)/usr/lib install -m 755 $(@D)/usr/lib/*.so* $(TARGET_DIR)/usr/lib - ln -s $(TARGET_DIR)/usr/lib/libamcodec.so.0.0 $(TARGET_DIR)/usr/lib/libamcodec.so + ln -s -r $(TARGET_DIR)/usr/lib/libamcodec.so.0.0 $(TARGET_DIR)/usr/lib/libamcodec.so endef -$(eval $(call GENTARGETS,package/amlogic,libamplayerm1)) +$(eval $(generic-package)) diff --git a/package/amlogic/libamplayerm3/libamplayerm3.mk b/package/amlogic/libamplayerm3/libamplayerm3.mk index fcbbcdca6d..dddd6cebe1 100644 --- a/package/amlogic/libamplayerm3/libamplayerm3.mk +++ b/package/amlogic/libamplayerm3/libamplayerm3.mk @@ -37,7 +37,7 @@ define LIBAMPLAYERM3_INSTALL_STAGING_CMDS install -m 644 $(@D)/usr/include/amlplayer/ppmgr/*.h $(STAGING_DIR)/usr/include/amlplayer/ppmgr mkdir -p $(STAGING_DIR)/usr/lib install -m 755 $(@D)/usr/lib/*.so* $(STAGING_DIR)/usr/lib - ln -s $(STAGING_DIR)/usr/lib/libamcodec.so.0.0 $(STAGING_DIR)/usr/lib/libamcodec.so + ln -s -r $(STAGING_DIR)/usr/lib/libamcodec.so.0.0 $(STAGING_DIR)/usr/lib/libamcodec.so #find $(@D)/usr -type f -exec install -m 644 {} $(STAGING_DIR)/usr \; #temporary, until we sync with mainline xbmc @@ -52,9 +52,9 @@ define LIBAMPLAYERM3_INSTALL_TARGET_CMDS install -m 644 $(@D)/lib/firmware/*.bin $(TARGET_DIR)/lib/firmware mkdir -p $(TARGET_DIR)/usr/lib install -m 755 $(@D)/usr/lib/*.so* $(TARGET_DIR)/usr/lib - ln -s $(TARGET_DIR)/usr/lib/libamcodec.so.0.0 $(TARGET_DIR)/usr/lib/libamcodec.so + ln -s -r $(TARGET_DIR)/usr/lib/libamcodec.so.0.0 $(TARGET_DIR)/usr/lib/libamcodec.so # find $(@D)/lib -type f -exec install -m 644 {} $(TARGET_DIR)/lib \; # find $(@D)/usr/lib -type f -exec install -m 644 {} $(TARGET_DIR)/usr/lib \; endef -$(eval $(call GENTARGETS,package/amlogic,libamplayerm3)) +$(eval $(generic-package)) diff --git a/package/amlogic/opengl/opengl.mk b/package/amlogic/opengl/opengl.mk index c3b48e084c..1446b0a7c1 100644 --- a/package/amlogic/opengl/opengl.mk +++ b/package/amlogic/opengl/opengl.mk @@ -24,4 +24,4 @@ define OPENGL_INSTALL_TARGET_CMDS cd $(TARGET_DIR)/usr/lib; mv libGLESv2.so.2.0 libGLESv2.so endef -$(eval $(call GENTARGETS,package/amlogic,opengl)) +$(eval $(generic-package)) diff --git a/package/amlogic/ubootaml/ubootaml.mk b/package/amlogic/ubootaml/ubootaml.mk index 114800c946..af494ab77a 100644 --- a/package/amlogic/ubootaml/ubootaml.mk +++ b/package/amlogic/ubootaml/ubootaml.mk @@ -18,4 +18,4 @@ define UBOOTAML_INSTALL_STAGING_CMDS install $(@D)/build/tools/mkimage $(HOST_DIR)/usr/bin/mkimage endef -$(eval $(call GENTARGETS,package/amlogic,ubootaml)) +$(eval $(generic-package)) diff --git a/package/amlogic/ubootamltoolchain/ubootamltoolchain.mk b/package/amlogic/ubootamltoolchain/ubootamltoolchain.mk index 335ef2e644..06337c7a68 100644 --- a/package/amlogic/ubootamltoolchain/ubootamltoolchain.mk +++ b/package/amlogic/ubootamltoolchain/ubootamltoolchain.mk @@ -10,4 +10,4 @@ define UBOOTAMLTOOLCHAIN_BUILD_CMDS cp -rf $(@D)/share $(TOOLCHAIN_EXTERNAL_DIR) endef -$(eval $(call GENTARGETS,package/amlogic,ubootamltoolchain)) +$(eval $(generic-package)) diff --git a/package/apr-util/Config.in b/package/apr-util/Config.in new file mode 100644 index 0000000000..3d4ec2303d --- /dev/null +++ b/package/apr-util/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_APR_UTIL + bool "apr-util" + select BR2_PACKAGE_APR + select BR2_PACKAGE_SQLITE + select BR2_PACKAGE_NEON + select BR2_PACKAGE_NEON_ZLIB + select BR2_PACKAGE_ZLIB + # apr really needs shared library support + depends on !BR2_PREFER_STATIC_LIB + depends on BR2_USE_MMU # apr + help + The utility library for the apache runtime project + + http://apr.apache.org/ diff --git a/package/apr-util/apr-util-01-remove-checkapr.patch b/package/apr-util/apr-util-01-remove-checkapr.patch new file mode 100644 index 0000000000..42ad12fcbe --- /dev/null +++ b/package/apr-util/apr-util-01-remove-checkapr.patch @@ -0,0 +1,21 @@ +remove check apr + +this patch removes the check of apr which fails the build + +Signed-off-by: Rico Bachmann +--- +v1: disable the check for APU_FIND_APR because the check only looks into folders +named apr, and our source-tree is called apr-versionnumber (e.g. apr-1.4.6) + +diff -rupN apr-util-1.4.1/configure.in apr-util-1.4.1-fix/configure.in +--- apr-util-1.4.1/configure.in 2009-12-17 20:15:19.000000000 +0100 ++++ apr-util-1.4.1-fix/configure.in 2012-04-24 10:10:32.000000000 +0200 +@@ -99,7 +99,7 @@ fi + dnl + dnl Find the APR includes directory and (possibly) the source (base) dir. + dnl +-APU_FIND_APR ++dnl APU_FIND_APR + + dnl + dnl even though we use apr_rules.mk for building apr-util, we need diff --git a/package/apr-util/apr-util.mk b/package/apr-util/apr-util.mk new file mode 100644 index 0000000000..51852e4a43 --- /dev/null +++ b/package/apr-util/apr-util.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# apr-util +# +################################################################################ + +APR_UTIL_VERSION = 1.5.2 +APR_UTIL_SITE = http://archive.apache.org/dist/apr +APR_UTIL_LICENSE = Apache-2.0 +APR_UTIL_LICENSE_FILES = LICENSE +APR_UTIL_INSTALL_STAGING = YES +APR_UTIL_DEPENDENCIES = apr sqlite neon zlib +APR_UTIL_CONF_OPT = \ + --with-apr=$(STAGING_DIR)/usr/bin/apr-1-config +APR_UTIL_CONFIG_SCRIPTS = apu-1-config + +# When iconv is available, then use it to provide charset conversion +# features. +APR_UTIL_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBICONV),libiconv) + +$(eval $(autotools-package)) diff --git a/package/apr/Config.in b/package/apr/Config.in new file mode 100644 index 0000000000..e06d2546a8 --- /dev/null +++ b/package/apr/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_APR + bool "apr" + # apr really needs shared library support + depends on !BR2_PREFER_STATIC_LIB + depends on BR2_USE_MMU # fork() in apr_proc_fork() + help + The mission of the Apache Portable Runtime (APR) project is to create + and maintain software libraries that provide a predictable and + consistent interface to underlying platform-specific implementations + + http://apr.apache.org/ diff --git a/package/apr/apr.mk b/package/apr/apr.mk new file mode 100644 index 0000000000..1a4c0e261b --- /dev/null +++ b/package/apr/apr.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# apr +# +################################################################################ + +APR_VERSION = 1.4.8 +APR_SITE = http://archive.apache.org/dist/apr +APR_LICENSE = Apache-2.0 +APR_LICENSE_FILES = LICENSE +APR_INSTALL_STAGING = YES +APR_CONF_ENV = \ + ac_cv_file__dev_zero=yes \ + ac_cv_func_setpgrp_void=yes \ + apr_cv_process_shared_works=yes \ + apr_cv_mutex_robust_shared=no \ + apr_cv_tcp_nodelay_with_cork=yes \ + ac_cv_sizeof_struct_iovec=8 \ + apr_cv_mutex_recursive=yes +APR_CONFIG_SCRIPTS = apr-1-config + +# Doesn't even try to guess when cross compiling +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +APR_CONF_ENV += apr_cv_pthreads_lib="-lpthread" +endif + +define APR_CLEANUP_UNNEEDED_FILES + $(RM) -rf $(TARGET_DIR)/usr/build-1/ +endef + +APR_POST_INSTALL_TARGET_HOOKS += APR_CLEANUP_UNNEEDED_FILES + +define APR_FIXUP_RULES_MK + $(SED) 's%apr_builddir=%apr_builddir=$(STAGING_DIR)%' \ + $(STAGING_DIR)/usr/build-1/apr_rules.mk + $(SED) 's%apr_builders=%apr_builders=$(STAGING_DIR)%' \ + $(STAGING_DIR)/usr/build-1/apr_rules.mk +endef + +APR_POST_INSTALL_STAGING_HOOKS += APR_FIXUP_RULES_MK + +$(eval $(autotools-package)) diff --git a/package/argp-standalone/argp-standalone.mk b/package/argp-standalone/argp-standalone.mk index f48d0e699e..b87b923f49 100644 --- a/package/argp-standalone/argp-standalone.mk +++ b/package/argp-standalone/argp-standalone.mk @@ -1,12 +1,16 @@ -############################################################# +################################################################################ # # argp-standalone # -############################################################# +################################################################################ ARGP_STANDALONE_VERSION = 1.3 ARGP_STANDALONE_SITE = http://www.lysator.liu.se/~nisse/archive ARGP_STANDALONE_INSTALL_STAGING = YES +ARGP_STANDALONE_LICENSE = LGPLv2+ + +ARGP_STANDALONE_CONF_ENV = \ + CFLAGS="$(TARGET_CFLAGS) -fPIC" define ARGP_STANDALONE_INSTALL_STAGING_CMDS $(INSTALL) -D $(@D)/libargp.a $(STAGING_DIR)/usr/lib/libargp.a @@ -18,4 +22,4 @@ define ARGP_STANDALONE_INSTALL_TARGET_CMDS $(INSTALL) -D $(@D)/argp.h $(TARGET_DIR)/usr/include/argp.h endef -$(eval $(call AUTOTARGETS,package,argp-standalone)) +$(eval $(autotools-package)) diff --git a/package/argus/argus.mk b/package/argus/argus.mk index 2705bac745..f169506fc9 100644 --- a/package/argus/argus.mk +++ b/package/argus/argus.mk @@ -1,20 +1,23 @@ -############################################################# +################################################################################ # # argus # -############################################################# -ARGUS_VERSION:=3.0.0.rc.34 -ARGUS_SOURCE:=argus_$(ARGUS_VERSION).orig.tar.gz -ARGUS_PATCH:=argus_$(ARGUS_VERSION)-1.diff.gz -ARGUS_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/a/argus/ -ARGUS_DEPENDENCIES=libpcap +################################################################################ + +ARGUS_VERSION = 3.0.0.rc.34 +ARGUS_SOURCE = argus_$(ARGUS_VERSION).orig.tar.gz +ARGUS_PATCH = argus_$(ARGUS_VERSION)-1.diff.gz +ARGUS_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/a/argus/ +ARGUS_DEPENDENCIES = libpcap +ARGUS_LICENSE = GPLv2+ +ARGUS_LICENSE_FILES = COPYING define ARGUS_DEBIAN_PATCH_APPLY if [ -d $(@D)/debian/patches ]; then \ - toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches \*.patch; \ + support/scripts/apply-patches.sh $(@D) $(@D)/debian/patches \*.patch; \ fi endef ARGUS_POST_PATCH_HOOKS += ARGUS_DEBIAN_PATCH_APPLY -$(eval $(call AUTOTARGETS,package,argus)) +$(eval $(autotools-package)) diff --git a/package/arptables/Config.in b/package/arptables/Config.in new file mode 100644 index 0000000000..414fabb258 --- /dev/null +++ b/package/arptables/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_ARPTABLES + bool "arptables" + # needs fork() + depends on BR2_USE_MMU + help + Tool to set up, maintain, and inspect the tables of ARP rules. + + http://ebtables.sourceforge.net diff --git a/package/arptables/arptables.mk b/package/arptables/arptables.mk new file mode 100644 index 0000000000..4f101c7b12 --- /dev/null +++ b/package/arptables/arptables.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# arptables +# +################################################################################ + +ARPTABLES_VERSION = 0.0.4 +ARPTABLES_SOURCE = arptables-v$(ARPTABLES_VERSION).tar.gz +ARPTABLES_SITE = http://downloads.sourceforge.net/project/ebtables/arptables/arptables-v$(ARPTABLES_VERSION) +ARPTABLES_LICENSE = GPLv2+ + +define ARPTABLES_BUILD_CMDS + $(MAKE) -C $(@D) \ + CC="$(TARGET_CC)" COPT_FLAGS="$(TARGET_CFLAGS)" +endef + +define ARPTABLES_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 -D $(@D)/arptables $(TARGET_DIR)/usr/sbin/arptables +endef + +$(eval $(generic-package)) diff --git a/package/at/Config.in b/package/at/Config.in index a5d5ef8264..17fabf7f6b 100644 --- a/package/at/Config.in +++ b/package/at/Config.in @@ -1,9 +1,10 @@ config BR2_PACKAGE_AT bool "at" + depends on BR2_USE_MMU help - At and batch read shell commands from standard input and - store them as jobs to be scheduled for execution in the - future. + At and batch read shell commands from standard input and + store them as jobs to be scheduled for execution in the + future. at - run the job at a specified time batch - run the job when system load levels permit diff --git a/package/at/S99at b/package/at/S99at index c3be80c64e..accaa316fa 100755 --- a/package/at/S99at +++ b/package/at/S99at @@ -31,7 +31,7 @@ case "$1" in restart ;; *) - echo $"Usage: $0 {start|stop|restart}" + echo "Usage: $0 {start|stop|restart}" exit 1 esac diff --git a/package/at/at-3.1.12-0001-configure.ac-remove-manual-compiler-check-with-AC_TR.patch b/package/at/at-0001-configure.ac-remove-manual-compiler-check-with-AC_TR.patch similarity index 100% rename from package/at/at-3.1.12-0001-configure.ac-remove-manual-compiler-check-with-AC_TR.patch rename to package/at/at-0001-configure.ac-remove-manual-compiler-check-with-AC_TR.patch diff --git a/package/at/at-0002-configure.ac-convert-AC_TRY_COMPILE-AC_COMPILE_IFELS.patch b/package/at/at-0002-configure.ac-convert-AC_TRY_COMPILE-AC_COMPILE_IFELS.patch new file mode 100644 index 0000000000..e4276ac208 --- /dev/null +++ b/package/at/at-0002-configure.ac-convert-AC_TRY_COMPILE-AC_COMPILE_IFELS.patch @@ -0,0 +1,34 @@ +From e12c96cccab550eda31cf7bb1dedddd3670ffe69 Mon Sep 17 00:00:00 2001 +From: Marc Kleine-Budde +Date: Tue, 1 Dec 2009 17:22:22 +0100 +Subject: [PATCH 2/5] configure.ac: convert AC_TRY_COMPILE -> AC_COMPILE_IFELSE + +Signed-off-by: Marc Kleine-Budde +--- + configure.ac | 10 +++++----- + 1 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 997a37f..cab80ed 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -40,11 +40,11 @@ case "$host" in + esac + + AC_MSG_CHECKING(__attribute__((noreturn))) +-AC_TRY_COMPILE([], [void __attribute__((noreturn)) panic(void);], +- AC_MSG_RESULT(yes) +- AC_DEFINE(HAVE_ATTRIBUTE_NORETURN, 1, +- [Define to 1 if compiler supports __attribute__((noreturn))]), +- AC_MSG_RESULT(no) ++AC_COMPILE_IFELSE( ++ [AC_LANG_PROGRAM([[]], [[void __attribute__((noreturn)) panic(void);]])], ++ [AC_MSG_RESULT(yes) ++ AC_DEFINE(HAVE_ATTRIBUTE_NORETURN, 1, Define to 1 if compiler supports __attribute__((noreturn)))], ++ [AC_MSG_RESULT(no)] + ) + dnl Checks for libraries. + +-- +1.6.5.3 + diff --git a/package/at/at-3.1.12-0003-Makefile.in-add-LDFLAGS-to-linking-stage.patch b/package/at/at-0003-Makefile.in-add-LDFLAGS-to-linking-stage.patch similarity index 100% rename from package/at/at-3.1.12-0003-Makefile.in-add-LDFLAGS-to-linking-stage.patch rename to package/at/at-0003-Makefile.in-add-LDFLAGS-to-linking-stage.patch diff --git a/package/at/at-0004-Makefile.in-replace-IROOT-by-DESTDIR.patch b/package/at/at-0004-Makefile.in-replace-IROOT-by-DESTDIR.patch new file mode 100644 index 0000000000..0d1d5f6e3e --- /dev/null +++ b/package/at/at-0004-Makefile.in-replace-IROOT-by-DESTDIR.patch @@ -0,0 +1,97 @@ +From 195d30e2e01fe2f91ed3bdaeec3982aa66b309dd Mon Sep 17 00:00:00 2001 +From: Marc Kleine-Budde +Date: Tue, 1 Dec 2009 20:57:45 +0100 +Subject: [PATCH 5/5] Makefile.in: replace IROOT by DESTDIR + +This patch replaces IROOT by DESTDIR, which is the autotools standard +variable. For backwards compatibilty IROOT overwrites the DESTDIR. + +Signed-off-by: Marc Kleine-Budde +--- + Makefile.in | 64 +++++++++++++++++++++++++++++++----------------------------- + 1 file changed, 34 insertions(+), 30 deletions(-) + +Index: at-3.1.13/Makefile.in +=================================================================== +--- at-3.1.13.orig/Makefile.in ++++ at-3.1.13/Makefile.in +@@ -16,6 +16,10 @@ docdir = $(prefix)/doc + atdocdir = $(docdir)/at + etcdir = @ETCDIR@ + ++ifdef IROOT ++DESTDIR = $(IROOT) ++endif ++ + DAEMON_USERNAME = @DAEMON_USERNAME@ + DAEMON_GROUPNAME= @DAEMON_GROUPNAME@ + LOADAVG_MX = @LOADAVG_MX@ +@@ -86,38 +90,38 @@ atrun: atrun.in + $(CC) -c $(CFLAGS) $(DEFS) $*.c + + install: all +- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(etcdir) +- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(bindir) +- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(sbindir) +- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(docdir) +- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(atdocdir) +- $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 755 -d $(IROOT)$(ATSPOOL_DIR) $(IROOT)$(ATJOB_DIR) +- chmod 1770 $(IROOT)$(ATSPOOL_DIR) $(IROOT)$(ATJOB_DIR) +- touch $(IROOT)$(LFILE) +- chmod 600 $(IROOT)$(LFILE) +- chown $(DAEMON_USERNAME):$(DAEMON_GROUPNAME) $(IROOT)$(LFILE) +- test -f $(IROOT)$(etcdir)/at.allow || test -f $(IROOT)$(etcdir)/at.deny || $(INSTALL) -o root -g $(DAEMON_GROUPNAME) -m 640 at.deny $(IROOT)$(etcdir)/ +- $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 6755 at $(IROOT)$(bindir) +- $(LN_S) -f at $(IROOT)$(bindir)/atq +- $(LN_S) -f at $(IROOT)$(bindir)/atrm +- $(INSTALL) -g root -o root -m 755 batch $(IROOT)$(bindir) +- $(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man1dir) +- $(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man5dir) +- $(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man8dir) +- $(INSTALL) -g root -o root -m 755 atd $(IROOT)$(sbindir) +- $(INSTALL) -g root -o root -m 755 atrun $(IROOT)$(sbindir) +- $(INSTALL) -g root -o root -m 644 at.1 $(IROOT)$(man1dir)/ +- cd $(IROOT)$(man1dir) && $(LN_S) -f at.1 atq.1 && $(LN_S) -f at.1 batch.1 && $(LN_S) -f at.1 atrm.1 +- $(INSTALL) -g root -o root -m 644 atd.8 $(IROOT)$(man8dir)/ ++ $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(etcdir) ++ $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(bindir) ++ $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(sbindir) ++ $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(docdir) ++ $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(atdocdir) ++ $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 755 -d $(DESTDIR)$(ATSPOOL_DIR) $(DESTDIR)$(ATJOB_DIR) ++ chmod 1770 $(DESTDIR)$(ATSPOOL_DIR) $(DESTDIR)$(ATJOB_DIR) ++ touch $(DESTDIR)$(LFILE) ++ chmod 600 $(DESTDIR)$(LFILE) ++ chown $(DAEMON_USERNAME):$(DAEMON_GROUPNAME) $(DESTDIR)$(LFILE) ++ test -f $(DESTDIR)$(etcdir)/at.allow || test -f $(DESTDIR)$(etcdir)/at.deny || $(INSTALL) -o root -g $(DAEMON_GROUPNAME) -m 640 at.deny $(DESTDIR$ ++ $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 6755 -s at $(DESTDIR)$(bindir) ++ $(LN_S) -f at $(DESTDIR)$(bindir)/atq ++ $(LN_S) -f at $(DESTDIR)$(bindir)/atrm ++ $(INSTALL) -g root -o root -m 755 batch $(DESTDIR)$(bindir) ++ $(INSTALL) -d -o root -g root -m 755 $(DESTDIR)$(man1dir) ++ $(INSTALL) -d -o root -g root -m 755 $(DESTDIR)$(man5dir) ++ $(INSTALL) -d -o root -g root -m 755 $(DESTDIR)$(man8dir) ++ $(INSTALL) -g root -o root -m 755 -s atd $(DESTDIR)$(sbindir) ++ $(INSTALL) -g root -o root -m 755 atrun $(DESTDIR)$(sbindir) ++ $(INSTALL) -g root -o root -m 644 at.1 $(DESTDIR)$(man1dir)/ ++ cd $(DESTDIR)$(man1dir) && $(LN_S) -f at.1 atq.1 && $(LN_S) -f at.1 batch.1 && $(LN_S) -f at.1 atrm.1 ++ $(INSTALL) -g root -o root -m 644 atd.8 $(DESTDIR)$(man8dir)/ + sed "s,\$${exec_prefix},$(exec_prefix),g" tmpman +- $(INSTALL) -g root -o root -m 644 tmpman $(IROOT)$(man8dir)/atrun.8 ++ $(INSTALL) -g root -o root -m 644 tmpman $(DESTDIR)$(man8dir)/atrun.8 + rm -f tmpman +- $(INSTALL) -g root -o root -m 644 at.allow.5 $(IROOT)$(man5dir)/ +- cd $(IROOT)$(man5dir) && $(LN_S) -f at.allow.5 at.deny.5 +- $(INSTALL) -g root -o root -m 644 $(DOCS) $(IROOT)$(atdocdir) +- rm -f $(IROOT)$(mandir)/cat1/at.1* $(IROOT)$(mandir)/cat1/batch.1* \ +- $(IROOT)$(mandir)/cat1/atq.1* +- rm -f $(IROOT)$(mandir)/cat1/atd.8* ++ $(INSTALL) -g root -o root -m 644 at.allow.5 $(DESTDIR)$(man5dir)/ ++ cd $(DESTDIR)$(man5dir) && $(LN_S) -f at.allow.5 at.deny.5 ++ $(INSTALL) -g root -o root -m 644 $(DOCS) $(DESTDIR)$(atdocdir) ++ rm -f $(DESTDIR)$(mandir)/cat1/at.1* $(DESTDIR)$(mandir)/cat1/batch.1* \ ++ $(DESTDIR)$(mandir)/cat1/atq.1* ++ rm -f $(DESTDIR)$(mandir)/cat1/atd.8* + + dist: checkin $(DIST) $(LIST) Filelist.asc + (cd ..; tar cf - `for a in $(DIST) $(LIST); do echo at-$(VERSION)/$$a; done` |\ diff --git a/package/at/at-0005-Makefile.in-make-install-fix.patch b/package/at/at-0005-Makefile.in-make-install-fix.patch new file mode 100644 index 0000000000..ad843449a2 --- /dev/null +++ b/package/at/at-0005-Makefile.in-make-install-fix.patch @@ -0,0 +1,69 @@ +[PATCH]: Makefile.in: fix make install for non-root, don't strip + +Buildroot will ensure all files are owned by root and stripped anyway +(if needed) before the rootfs is created. + +Signed-off-by: Peter Korsgaard +--- + Makefile.in | 39 +++++++++++++++++++-------------------- + 1 file changed, 19 insertions(+), 20 deletions(-) + +Index: at-3.1.13/Makefile.in +=================================================================== +--- at-3.1.13.orig/Makefile.in ++++ at-3.1.13/Makefile.in +@@ -90,35 +90,34 @@ atrun: atrun.in + $(CC) -c $(CFLAGS) $(DEFS) $*.c + + install: all +- $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(etcdir) +- $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(bindir) +- $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(sbindir) +- $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(docdir) +- $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(atdocdir) +- $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 755 -d $(DESTDIR)$(ATSPOOL_DIR) $(DESTDIR)$(ATJOB_DIR) ++ $(INSTALL) -m 755 -d $(DESTDIR)$(etcdir) ++ $(INSTALL) -m 755 -d $(DESTDIR)$(bindir) ++ $(INSTALL) -m 755 -d $(DESTDIR)$(sbindir) ++ $(INSTALL) -m 755 -d $(DESTDIR)$(docdir) ++ $(INSTALL) -m 755 -d $(DESTDIR)$(atdocdir) ++ $(INSTALL) -m 755 -d $(DESTDIR)$(ATSPOOL_DIR) $(DESTDIR)$(ATJOB_DIR) + chmod 1770 $(DESTDIR)$(ATSPOOL_DIR) $(DESTDIR)$(ATJOB_DIR) + touch $(DESTDIR)$(LFILE) + chmod 600 $(DESTDIR)$(LFILE) +- chown $(DAEMON_USERNAME):$(DAEMON_GROUPNAME) $(DESTDIR)$(LFILE) +- test -f $(DESTDIR)$(etcdir)/at.allow || test -f $(DESTDIR)$(etcdir)/at.deny || $(INSTALL) -o root -g $(DAEMON_GROUPNAME) -m 640 at.deny $(DESTDIR$ +- $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 6755 -s at $(DESTDIR)$(bindir) ++ test -f $(DESTDIR)$(etcdir)/at.allow || test -f $(DESTDIR)$(etcdir)/at.deny || $(INSTALL) -m 640 at.deny $(DESTDIR)$(etcdir)/ ++ $(INSTALL) -m 6755 at $(DESTDIR)$(bindir) + $(LN_S) -f at $(DESTDIR)$(bindir)/atq + $(LN_S) -f at $(DESTDIR)$(bindir)/atrm +- $(INSTALL) -g root -o root -m 755 batch $(DESTDIR)$(bindir) +- $(INSTALL) -d -o root -g root -m 755 $(DESTDIR)$(man1dir) +- $(INSTALL) -d -o root -g root -m 755 $(DESTDIR)$(man5dir) +- $(INSTALL) -d -o root -g root -m 755 $(DESTDIR)$(man8dir) +- $(INSTALL) -g root -o root -m 755 -s atd $(DESTDIR)$(sbindir) +- $(INSTALL) -g root -o root -m 755 atrun $(DESTDIR)$(sbindir) +- $(INSTALL) -g root -o root -m 644 at.1 $(DESTDIR)$(man1dir)/ ++ $(INSTALL) -m 755 batch $(DESTDIR)$(bindir) ++ $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir) ++ $(INSTALL) -d -m 755 $(DESTDIR)$(man5dir) ++ $(INSTALL) -d -m 755 $(DESTDIR)$(man8dir) ++ $(INSTALL) -m 755 atd $(DESTDIR)$(sbindir) ++ $(INSTALL) -m 755 atrun $(DESTDIR)$(sbindir) ++ $(INSTALL) -m 644 at.1 $(DESTDIR)$(man1dir)/ + cd $(DESTDIR)$(man1dir) && $(LN_S) -f at.1 atq.1 && $(LN_S) -f at.1 batch.1 && $(LN_S) -f at.1 atrm.1 +- $(INSTALL) -g root -o root -m 644 atd.8 $(DESTDIR)$(man8dir)/ ++ $(INSTALL) -m 644 atd.8 $(DESTDIR)$(man8dir)/ + sed "s,\$${exec_prefix},$(exec_prefix),g" tmpman +- $(INSTALL) -g root -o root -m 644 tmpman $(DESTDIR)$(man8dir)/atrun.8 ++ $(INSTALL) -m 644 tmpman $(DESTDIR)$(man8dir)/atrun.8 + rm -f tmpman +- $(INSTALL) -g root -o root -m 644 at.allow.5 $(DESTDIR)$(man5dir)/ ++ $(INSTALL) -m 644 at.allow.5 $(DESTDIR)$(man5dir)/ + cd $(DESTDIR)$(man5dir) && $(LN_S) -f at.allow.5 at.deny.5 +- $(INSTALL) -g root -o root -m 644 $(DOCS) $(DESTDIR)$(atdocdir) ++ $(INSTALL) -m 644 $(DOCS) $(DESTDIR)$(atdocdir) + rm -f $(DESTDIR)$(mandir)/cat1/at.1* $(DESTDIR)$(mandir)/cat1/batch.1* \ + $(DESTDIR)$(mandir)/cat1/atq.1* + rm -f $(DESTDIR)$(mandir)/cat1/atd.8* diff --git a/package/at/at-0006-getloadavg.c-fix.patch b/package/at/at-0006-getloadavg.c-fix.patch new file mode 100644 index 0000000000..e0739271ef --- /dev/null +++ b/package/at/at-0006-getloadavg.c-fix.patch @@ -0,0 +1,30 @@ +[PATCH]: fix getloadavg.c compilation, revert to 3.1.10 version + +getloadavg.c shipped with 3.1.13 doesn't compile because it references +headers not shipped. Fix it by simply reverting to the 3.1.10 version. + +Signed-off-by: Peter Korsgaard +--- + getloadavg.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +Index: at-3.1.13/getloadavg.c +=================================================================== +--- at-3.1.13.orig/getloadavg.c ++++ at-3.1.13/getloadavg.c +@@ -66,11 +66,12 @@ Boston, MA 02110-1301 USA */ + + /* This should always be first. */ + #ifdef HAVE_CONFIG_H +-#include ++#include "config.h" + #endif + +-#include "lisp.h" +-#include "sysfile.h" /* for encapsulated open, close, read, write */ ++#include ++#include ++#include + + #ifndef HAVE_GETLOADAVG + diff --git a/package/at/at-0007-parsetime.l-include-config-h.patch b/package/at/at-0007-parsetime.l-include-config-h.patch new file mode 100644 index 0000000000..f4111ebf67 --- /dev/null +++ b/package/at/at-0007-parsetime.l-include-config-h.patch @@ -0,0 +1,16 @@ +Make sure to include config.h so that NEEDS_* macros are properly +taken into account. This was a problem for NEEDS_YYWRAP, which was set +to 1 in config.h, but the corresponding code wasn't compiled in. + +Index: at-3.1.13/parsetime.l +=================================================================== +--- at-3.1.13.orig/parsetime.l ++++ at-3.1.13/parsetime.l +@@ -4,6 +4,7 @@ + #include + #include "y.tab.h" + #include "parsetime.h" ++#include "config.h" + + char *last_token = NULL; + char **my_argv; diff --git a/package/at/at-3.1.12-0002-configure.ac-convert-AC_TRY_COMPILE-AC_COMPILE_IFELS.patch b/package/at/at-3.1.12-0002-configure.ac-convert-AC_TRY_COMPILE-AC_COMPILE_IFELS.patch deleted file mode 100644 index ab6de44283..0000000000 --- a/package/at/at-3.1.12-0002-configure.ac-convert-AC_TRY_COMPILE-AC_COMPILE_IFELS.patch +++ /dev/null @@ -1,34 +0,0 @@ -From e12c96cccab550eda31cf7bb1dedddd3670ffe69 Mon Sep 17 00:00:00 2001 -From: Marc Kleine-Budde -Date: Tue, 1 Dec 2009 17:22:22 +0100 -Subject: [PATCH 2/5] configure.ac: convert AC_TRY_COMPILE -> AC_COMPILE_IFELSE - -Signed-off-by: Marc Kleine-Budde ---- - configure.ac | 10 +++++----- - 1 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 997a37f..cab80ed 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -40,11 +40,11 @@ case "$host" in - esac - - AC_MSG_CHECKING(__attribute__((noreturn))) --AC_TRY_COMPILE([], [void __attribute__((noreturn)) panic(void);], -- AC_MSG_RESULT(yes) -- AC_DEFINE(HAVE_ATTRIBUTE_NORETURN, 1, -- [Define to 1 if compiler supports __attribute__((noreturn))]), -- AC_MSG_RESULT(no) -+AC_COMPILE_IFELSE( -+ [AC_LANG_PROGRAM([[]], [[void __attribute__((noreturn)) panic(void);]])], -+ [AC_MSG_RESULT(yes) -+ AC_DEFINE(HAVE_ATTRIBUTE_NORETURN, 1, Define to 1 if compiler supports __attribute__((noreturn)))], -+ [AC_MSG_RESULT(no)] - ) - dnl Checks for libraries. - --- -1.6.5.3 - diff --git a/package/at/at-3.1.12-0005-Makefile.in-replace-IROOT-by-DESTDIR.patch b/package/at/at-3.1.12-0005-Makefile.in-replace-IROOT-by-DESTDIR.patch deleted file mode 100644 index 6a295e37cf..0000000000 --- a/package/at/at-3.1.12-0005-Makefile.in-replace-IROOT-by-DESTDIR.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 195d30e2e01fe2f91ed3bdaeec3982aa66b309dd Mon Sep 17 00:00:00 2001 -From: Marc Kleine-Budde -Date: Tue, 1 Dec 2009 20:57:45 +0100 -Subject: [PATCH 5/5] Makefile.in: replace IROOT by DESTDIR - -This patch replaces IROOT by DESTDIR, which is the autotools standard -variable. For backwards compatibilty IROOT overwrites the DESTDIR. - -Signed-off-by: Marc Kleine-Budde ---- - Makefile.in | 64 +++++++++++++++++++++++++++++++----------------------------- - 1 file changed, 34 insertions(+), 30 deletions(-) - -Index: at-3.1.12/Makefile.in -=================================================================== ---- at-3.1.12.orig/Makefile.in -+++ at-3.1.12/Makefile.in -@@ -16,6 +16,10 @@ docdir = $(prefix)/doc - atdocdir = $(docdir)/at - etcdir = @ETCDIR@ - -+ifdef IROOT -+DESTDIR = $(IROOT) -+endif -+ - DAEMON_USERNAME = @DAEMON_USERNAME@ - DAEMON_GROUPNAME= @DAEMON_GROUPNAME@ - LOADAVG_MX = @LOADAVG_MX@ -@@ -86,38 +90,38 @@ atrun: atrun.in - $(CC) -c $(CFLAGS) $(DEFS) $*.c - - install: all -- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(etcdir) -- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(bindir) -- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(sbindir) -- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(docdir) -- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(atdocdir) -- $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 755 -d $(IROOT)$(ATSPOOL_DIR) $(IROOT)$(ATJOB_DIR) -- chmod 1770 $(IROOT)$(ATSPOOL_DIR) $(IROOT)$(ATJOB_DIR) -- touch $(IROOT)$(LFILE) -- chmod 600 $(IROOT)$(LFILE) -- chown $(DAEMON_USERNAME):$(DAEMON_GROUPNAME) $(IROOT)$(LFILE) -- test -f $(IROOT)$(etcdir)/at.allow || test -f $(IROOT)$(etcdir)/at.deny || $(INSTALL) -o root -g $(DAEMON_GROUPNAME) -m 640 at.deny $(IROOT)$(etcdir)/ -- $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 6755 -s at $(IROOT)$(bindir) -- $(LN_S) -f at $(IROOT)$(bindir)/atq -- $(LN_S) -f at $(IROOT)$(bindir)/atrm -- $(INSTALL) -g root -o root -m 755 batch $(IROOT)$(bindir) -- $(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man1dir) -- $(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man5dir) -- $(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man8dir) -- $(INSTALL) -g root -o root -m 755 -s atd $(IROOT)$(sbindir) -- $(INSTALL) -g root -o root -m 755 atrun $(IROOT)$(sbindir) -- $(INSTALL) -g root -o root -m 644 at.1 $(IROOT)$(man1dir)/ -- cd $(IROOT)$(man1dir) && $(LN_S) -f at.1 atq.1 && $(LN_S) -f at.1 batch.1 && $(LN_S) -f at.1 atrm.1 -- $(INSTALL) -g root -o root -m 644 atd.8 $(IROOT)$(man8dir)/ -+ $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(etcdir) -+ $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(bindir) -+ $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(sbindir) -+ $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(docdir) -+ $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(atdocdir) -+ $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 755 -d $(DESTDIR)$(ATSPOOL_DIR) $(DESTDIR)$(ATJOB_DIR) -+ chmod 1770 $(DESTDIR)$(ATSPOOL_DIR) $(DESTDIR)$(ATJOB_DIR) -+ touch $(DESTDIR)$(LFILE) -+ chmod 600 $(DESTDIR)$(LFILE) -+ chown $(DAEMON_USERNAME):$(DAEMON_GROUPNAME) $(DESTDIR)$(LFILE) -+ test -f $(DESTDIR)$(etcdir)/at.allow || test -f $(DESTDIR)$(etcdir)/at.deny || $(INSTALL) -o root -g $(DAEMON_GROUPNAME) -m 640 at.deny $(DESTDIR)$(etcdir)/ -+ $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 6755 -s at $(DESTDIR)$(bindir) -+ $(LN_S) -f at $(DESTDIR)$(bindir)/atq -+ $(LN_S) -f at $(DESTDIR)$(bindir)/atrm -+ $(INSTALL) -g root -o root -m 755 batch $(DESTDIR)$(bindir) -+ $(INSTALL) -d -o root -g root -m 755 $(DESTDIR)$(man1dir) -+ $(INSTALL) -d -o root -g root -m 755 $(DESTDIR)$(man5dir) -+ $(INSTALL) -d -o root -g root -m 755 $(DESTDIR)$(man8dir) -+ $(INSTALL) -g root -o root -m 755 -s atd $(DESTDIR)$(sbindir) -+ $(INSTALL) -g root -o root -m 755 atrun $(DESTDIR)$(sbindir) -+ $(INSTALL) -g root -o root -m 644 at.1 $(DESTDIR)$(man1dir)/ -+ cd $(DESTDIR)$(man1dir) && $(LN_S) -f at.1 atq.1 && $(LN_S) -f at.1 batch.1 && $(LN_S) -f at.1 atrm.1 -+ $(INSTALL) -g root -o root -m 644 atd.8 $(DESTDIR)$(man8dir)/ - sed "s,\$${exec_prefix},$(exec_prefix),g" tmpman -- $(INSTALL) -g root -o root -m 644 tmpman $(IROOT)$(man8dir)/atrun.8 -+ $(INSTALL) -g root -o root -m 644 tmpman $(DESTDIR)$(man8dir)/atrun.8 - rm -f tmpman -- $(INSTALL) -g root -o root -m 644 at_allow.5 $(IROOT)$(man5dir)/ -- cd $(IROOT)$(man5dir) && $(LN_S) -f at_allow.5 at_deny.5 -- $(INSTALL) -g root -o root -m 644 $(DOCS) $(IROOT)$(atdocdir) -- rm -f $(IROOT)$(mandir)/cat1/at.1* $(IROOT)$(mandir)/cat1/batch.1* \ -- $(IROOT)$(mandir)/cat1/atq.1* -- rm -f $(IROOT)$(mandir)/cat1/atd.8* -+ $(INSTALL) -g root -o root -m 644 at_allow.5 $(DESTDIR)$(man5dir)/ -+ cd $(DESTDIR)$(man5dir) && $(LN_S) -f at_allow.5 at_deny.5 -+ $(INSTALL) -g root -o root -m 644 $(DOCS) $(DESTDIR)$(atdocdir) -+ rm -f $(DESTDIR)$(mandir)/cat1/at.1* $(DESTDIR)$(mandir)/cat1/batch.1* \ -+ $(DESTDIR)$(mandir)/cat1/atq.1* -+ rm -f $(DESTDIR)$(mandir)/cat1/atd.8* - - dist: checkin $(DIST) $(LIST) Filelist.asc - (cd ..; tar cf - `for a in $(DIST) $(LIST); do echo at-$(VERSION)/$$a; done` |\ diff --git a/package/at/at-3.1.12-0006-Makefile.in-make-install-fix.patch b/package/at/at-3.1.12-0006-Makefile.in-make-install-fix.patch deleted file mode 100644 index b9a4e56480..0000000000 --- a/package/at/at-3.1.12-0006-Makefile.in-make-install-fix.patch +++ /dev/null @@ -1,69 +0,0 @@ -[PATCH]: Makefile.in: fix make install for non-root, don't strip - -Buildroot will ensure all files are owned by root and stripped anyway -(if needed) before the rootfs is created. - -Signed-off-by: Peter Korsgaard ---- - Makefile.in | 39 +++++++++++++++++++-------------------- - 1 file changed, 19 insertions(+), 20 deletions(-) - -Index: at-3.1.12/Makefile.in -=================================================================== ---- at-3.1.12.orig/Makefile.in -+++ at-3.1.12/Makefile.in -@@ -90,35 +90,34 @@ atrun: atrun.in - $(CC) -c $(CFLAGS) $(DEFS) $*.c - - install: all -- $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(etcdir) -- $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(bindir) -- $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(sbindir) -- $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(docdir) -- $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(atdocdir) -- $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 755 -d $(DESTDIR)$(ATSPOOL_DIR) $(DESTDIR)$(ATJOB_DIR) -+ $(INSTALL) -m 755 -d $(DESTDIR)$(etcdir) -+ $(INSTALL) -m 755 -d $(DESTDIR)$(bindir) -+ $(INSTALL) -m 755 -d $(DESTDIR)$(sbindir) -+ $(INSTALL) -m 755 -d $(DESTDIR)$(docdir) -+ $(INSTALL) -m 755 -d $(DESTDIR)$(atdocdir) -+ $(INSTALL) -m 755 -d $(DESTDIR)$(ATSPOOL_DIR) $(DESTDIR)$(ATJOB_DIR) - chmod 1770 $(DESTDIR)$(ATSPOOL_DIR) $(DESTDIR)$(ATJOB_DIR) - touch $(DESTDIR)$(LFILE) - chmod 600 $(DESTDIR)$(LFILE) -- chown $(DAEMON_USERNAME):$(DAEMON_GROUPNAME) $(DESTDIR)$(LFILE) -- test -f $(DESTDIR)$(etcdir)/at.allow || test -f $(DESTDIR)$(etcdir)/at.deny || $(INSTALL) -o root -g $(DAEMON_GROUPNAME) -m 640 at.deny $(DESTDIR)$(etcdir)/ -- $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 6755 -s at $(DESTDIR)$(bindir) -+ test -f $(DESTDIR)$(etcdir)/at.allow || test -f $(DESTDIR)$(etcdir)/at.deny || $(INSTALL) -m 640 at.deny $(DESTDIR)$(etcdir)/ -+ $(INSTALL) -m 6755 at $(DESTDIR)$(bindir) - $(LN_S) -f at $(DESTDIR)$(bindir)/atq - $(LN_S) -f at $(DESTDIR)$(bindir)/atrm -- $(INSTALL) -g root -o root -m 755 batch $(DESTDIR)$(bindir) -- $(INSTALL) -d -o root -g root -m 755 $(DESTDIR)$(man1dir) -- $(INSTALL) -d -o root -g root -m 755 $(DESTDIR)$(man5dir) -- $(INSTALL) -d -o root -g root -m 755 $(DESTDIR)$(man8dir) -- $(INSTALL) -g root -o root -m 755 -s atd $(DESTDIR)$(sbindir) -- $(INSTALL) -g root -o root -m 755 atrun $(DESTDIR)$(sbindir) -- $(INSTALL) -g root -o root -m 644 at.1 $(DESTDIR)$(man1dir)/ -+ $(INSTALL) -m 755 batch $(DESTDIR)$(bindir) -+ $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir) -+ $(INSTALL) -d -m 755 $(DESTDIR)$(man5dir) -+ $(INSTALL) -d -m 755 $(DESTDIR)$(man8dir) -+ $(INSTALL) -m 755 atd $(DESTDIR)$(sbindir) -+ $(INSTALL) -m 755 atrun $(DESTDIR)$(sbindir) -+ $(INSTALL) -m 644 at.1 $(DESTDIR)$(man1dir)/ - cd $(DESTDIR)$(man1dir) && $(LN_S) -f at.1 atq.1 && $(LN_S) -f at.1 batch.1 && $(LN_S) -f at.1 atrm.1 -- $(INSTALL) -g root -o root -m 644 atd.8 $(DESTDIR)$(man8dir)/ -+ $(INSTALL) -m 644 atd.8 $(DESTDIR)$(man8dir)/ - sed "s,\$${exec_prefix},$(exec_prefix),g" tmpman -- $(INSTALL) -g root -o root -m 644 tmpman $(DESTDIR)$(man8dir)/atrun.8 -+ $(INSTALL) -m 644 tmpman $(DESTDIR)$(man8dir)/atrun.8 - rm -f tmpman -- $(INSTALL) -g root -o root -m 644 at_allow.5 $(DESTDIR)$(man5dir)/ -+ $(INSTALL) -m 644 at_allow.5 $(DESTDIR)$(man5dir)/ - cd $(DESTDIR)$(man5dir) && $(LN_S) -f at_allow.5 at_deny.5 -- $(INSTALL) -g root -o root -m 644 $(DOCS) $(DESTDIR)$(atdocdir) -+ $(INSTALL) -m 644 $(DOCS) $(DESTDIR)$(atdocdir) - rm -f $(DESTDIR)$(mandir)/cat1/at.1* $(DESTDIR)$(mandir)/cat1/batch.1* \ - $(DESTDIR)$(mandir)/cat1/atq.1* - rm -f $(DESTDIR)$(mandir)/cat1/atd.8* diff --git a/package/at/at-3.1.12-0007-getloadavg-fix.patch b/package/at/at-3.1.12-0007-getloadavg-fix.patch deleted file mode 100644 index 2edb4f0d58..0000000000 --- a/package/at/at-3.1.12-0007-getloadavg-fix.patch +++ /dev/null @@ -1,30 +0,0 @@ -[PATCH]: fix getloadavg.c compilation, revert to 3.1.10 version - -getloadavg.c shipped with 3.1.12 doesn't compile because it references -headers not shipped. Fix it by simply reverting to the 3.1.10 version. - -Signed-off-by: Peter Korsgaard ---- - getloadavg.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -Index: at-3.1.12/getloadavg.c -=================================================================== ---- at-3.1.12.orig/getloadavg.c -+++ at-3.1.12/getloadavg.c -@@ -66,11 +66,12 @@ Boston, MA 02110-1301 USA */ - - /* This should always be first. */ - #ifdef HAVE_CONFIG_H --#include -+#include "config.h" - #endif - --#include "lisp.h" --#include "sysfile.h" /* for encapsulated open, close, read, write */ -+#include -+#include -+#include - - #ifndef HAVE_GETLOADAVG - diff --git a/package/at/at-3.1.12-0007-include-config-h.patch b/package/at/at-3.1.12-0007-include-config-h.patch deleted file mode 100644 index 8afc502c8d..0000000000 --- a/package/at/at-3.1.12-0007-include-config-h.patch +++ /dev/null @@ -1,16 +0,0 @@ -Make sure to include config.h so that NEEDS_* macros are properly -taken into account. This was a problem for NEEDS_YYWRAP, which was set -to 1 in config.h, but the corresponding code wasn't compiled in. - -Index: at-3.1.12/parsetime.l -=================================================================== ---- at-3.1.12.orig/parsetime.l 2010-02-10 00:17:46.000000000 +0100 -+++ at-3.1.12/parsetime.l 2010-02-10 00:18:07.000000000 +0100 -@@ -4,6 +4,7 @@ - #include - #include "y.tab.h" - #include "parsetime.h" -+#include "config.h" - - char *last_token = NULL; - char **my_argv; diff --git a/package/at/at.mk b/package/at/at.mk index e9873f8f8b..3bed6d5c19 100644 --- a/package/at/at.mk +++ b/package/at/at.mk @@ -1,18 +1,16 @@ -############################################################# +################################################################################ # # at # -############################################################# -AT_VERSION = 3.1.12 +################################################################################ + +AT_VERSION = 3.1.13 AT_SOURCE = at_$(AT_VERSION).orig.tar.gz AT_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/a/at # missing deps for parsetime.l AT_MAKE = $(MAKE1) AT_AUTORECONF = YES -AT_INSTALL_STAGING = NO -AT_INSTALL_TARGET = YES - -AT_DEPENDENCIES = $(if $(BR2_PACKAGE_FLEX),flex) +AT_DEPENDENCIES = $(if $(BR2_PACKAGE_FLEX),flex) host-bison host-flex AT_CONF_OPT = \ --with-jobdir=/var/spool/cron/atjobs \ @@ -41,4 +39,4 @@ define AT_UNINSTALL_TARGET_CMDS at.1 atq.1 atrm.1 batch.1 at_allow.5 at_deny.5 atd.8 atrun.8) endef -$(eval $(call AUTOTARGETS,package,at)) +$(eval $(autotools-package)) diff --git a/package/atk/Config.in b/package/atk/Config.in index 928fae7463..1120a94dd0 100644 --- a/package/atk/Config.in +++ b/package/atk/Config.in @@ -2,8 +2,11 @@ config BR2_PACKAGE_ATK bool "atk" select BR2_PACKAGE_LIBGLIB2 depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 help The ATK accessibility toolkit, needed to build GTK+-2.x. -comment "atk requires a toolchain with WCHAR support" - depends on !BR2_USE_WCHAR +comment "atk needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/atk/atk.mk b/package/atk/atk.mk index 0ac9b77409..1a8bbea6c9 100644 --- a/package/atk/atk.mk +++ b/package/atk/atk.mk @@ -1,14 +1,16 @@ -############################################################# +################################################################################ # # atk # -############################################################# -ATK_VERSION_MAJOR = 1.30 +################################################################################ + +ATK_VERSION_MAJOR = 2.10 ATK_VERSION = $(ATK_VERSION_MAJOR).0 -ATK_SOURCE = atk-$(ATK_VERSION).tar.bz2 +ATK_SOURCE = atk-$(ATK_VERSION).tar.xz ATK_SITE = http://ftp.gnome.org/pub/gnome/sources/atk/$(ATK_VERSION_MAJOR)/ +ATK_LICENSE = LGPLv2+ +ATK_LICENSE_FILES = COPYING ATK_INSTALL_STAGING = YES -ATK_INSTALL_TARGET = YES ATK_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) LDFLAGS=-L$(STAGING_DIR)/usr/lib install ATK_CONF_ENV = ac_cv_func_posix_getpwuid_r=yes \ @@ -39,27 +41,9 @@ ATK_CONF_ENV = ac_cv_func_posix_getpwuid_r=yes \ jm_cv_func_working_re_compile_pattern=yes ac_use_included_regex=no \ gl_cv_c_restrict=no ac_cv_prog_F77=no -ATK_CONF_OPT = --enable-shared \ - --enable-static \ - --disable-glibtest --enable-explicit-deps=no \ +ATK_CONF_OPT = --disable-glibtest --enable-explicit-deps=no \ --disable-debug -ifeq ($(BR2_PACKAGE_XORG7),y) -ATK_CONF_OPT += --with-x \ - --x-includes=$(STAGING_DIR)/usr/include/X11 \ - --x-libraries=$(STAGING_DIR)/usr/lib --disable-glibtest -else -ATK_CONF_OPT += --without-x -endif - -ATK_DEPENDENCIES = libglib2 host-pkg-config - -HOST_ATK_DEPENDENCIES = host-libglib2 host-pkg-config - -HOST_ATK_CONF_OPT = \ - --enable-shared \ - --disable-static \ - --disable-glibtest +ATK_DEPENDENCIES = libglib2 host-pkgconf -$(eval $(call AUTOTARGETS,package,atk)) -$(eval $(call AUTOTARGETS,package,atk,host)) +$(eval $(autotools-package)) diff --git a/package/attr/Config.in b/package/attr/Config.in new file mode 100644 index 0000000000..db229de51f --- /dev/null +++ b/package/attr/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_ATTR + bool "attr" + depends on BR2_LARGEFILE + help + Commands for Manipulating Filesystem Extended Attributes. + This package also provides libattr. + + http://savannah.nongnu.org/projects/attr + +comment "attr needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE diff --git a/package/attr/attr-01-support-static-installation.patch b/package/attr/attr-01-support-static-installation.patch new file mode 100644 index 0000000000..87858ac75e --- /dev/null +++ b/package/attr/attr-01-support-static-installation.patch @@ -0,0 +1,29 @@ +Support installation of .a file when doing static linking + +When doing static linking (i.e ENABLE_SHARED != yes), the attr build +logic wasn't installing any library at all, not even the .a file which +is needed for static linking. This patch fixes that. + +Signed-off-by: Thomas Petazzoni + +Index: b/include/buildmacros +=================================================================== +--- a/include/buildmacros ++++ b/include/buildmacros +@@ -97,7 +97,15 @@ + + INSTALL_LTLIB_STATIC = \ + cd $(TOPDIR)/$(LIBNAME)/.libs; \ +- ../$(INSTALL) -m 755 -d $(PKG_DEVLIB_DIR); ++ ../$(INSTALL) -m 755 -d $(PKG_DEVLIB_DIR); \ ++ ../$(INSTALL) -m 644 -T old_lib $(LIBNAME).la $(PKG_DEVLIB_DIR); \ ++ ../$(INSTALL) -m 644 $(LIBNAME).la $(PKG_DEVLIB_DIR)/$(LIBNAME).la ; \ ++ ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \ ++ ../$(INSTALL) -T so_base $(LIBNAME).la $(PKG_LIB_DIR); \ ++ if test "x$(PKG_DEVLIB_DIR)" != "x$(PKG_LIB_DIR)" ; then \ ++ ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \ ++ ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \ ++ fi + + INSTALL_MAN = \ + @for d in $(MAN_PAGES); do \ diff --git a/package/attr/attr.mk b/package/attr/attr.mk new file mode 100644 index 0000000000..f7179a26d0 --- /dev/null +++ b/package/attr/attr.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# attr +# +################################################################################ + +ATTR_VERSION = 2.4.47 +ATTR_SOURCE = attr-$(ATTR_VERSION).src.tar.gz +ATTR_SITE = http://download.savannah.gnu.org/releases/attr +ATTR_INSTALL_STAGING = YES +ATTR_CONF_OPT = --enable-gettext=no + +# While the configuration system uses autoconf, the Makefiles are +# hand-written and do not use automake. Therefore, we have to hack +# around their deficiencies by passing installation paths. +ATTR_INSTALL_STAGING_OPT = \ + prefix=$(STAGING_DIR)/usr \ + exec_prefix=$(STAGING_DIR)/usr \ + PKG_DEVLIB_DIR=$(STAGING_DIR)/usr/lib \ + install-dev install-lib + +ATTR_INSTALL_TARGET_OPT = \ + prefix=$(TARGET_DIR)/usr \ + exec_prefix=$(TARGET_DIR)/usr \ + install install-lib + +$(eval $(autotools-package)) diff --git a/package/audiofile/Config.in b/package/audiofile/Config.in new file mode 100644 index 0000000000..4aa8d69c87 --- /dev/null +++ b/package/audiofile/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_AUDIOFILE + bool "audiofile" + depends on BR2_INSTALL_LIBSTDCPP + help + The Audio File Library handles reading and writing audio files + in many common formats. + + http://www.68k.org/~michael/audiofile/ + +comment "audiofile needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/audiofile/audiofile.mk b/package/audiofile/audiofile.mk new file mode 100644 index 0000000000..cfd87dc8fc --- /dev/null +++ b/package/audiofile/audiofile.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# audiofile +# +################################################################################ + +AUDIOFILE_VERSION = 0.3.6 +AUDIOFILE_SITE = http://audiofile.68k.org +AUDIOFILE_INSTALL_STAGING = YES +AUDIOFILE_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' +AUDIOFILE_CONF_OPT = --disable-examples --disable-docs +AUDIOFILE_DEPENDENCIES = host-pkgconf +# configure is outdated and has old bugs because of it +AUDIOFILE_AUTORECONF = YES +AUDIOFILE_LICENSE = GPLv2+ LGPLv2.1+ +AUDIOFILE_LICENSE_FILES = COPYING COPYING.GPL + +ifeq ($(BR2_PACKAGE_FLAC),y) +AUDIOFILE_DEPENDENCIES += flac +AUDIOFILE_CONF_OPT += --enable-flac +else +AUDIOFILE_CONF_OPT += --disable-flac +endif + +$(eval $(autotools-package)) diff --git a/package/multimedia/aumix/Config.in b/package/aumix/Config.in similarity index 100% rename from package/multimedia/aumix/Config.in rename to package/aumix/Config.in diff --git a/package/multimedia/aumix/aumix-2.8-fix-incorrect-makefile-am.patch b/package/aumix/aumix-2.8-fix-incorrect-makefile-am.patch similarity index 100% rename from package/multimedia/aumix/aumix-2.8-fix-incorrect-makefile-am.patch rename to package/aumix/aumix-2.8-fix-incorrect-makefile-am.patch diff --git a/package/aumix/aumix.mk b/package/aumix/aumix.mk new file mode 100644 index 0000000000..de0902a4ab --- /dev/null +++ b/package/aumix/aumix.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# aumix +# +################################################################################ + +AUMIX_VERSION = 2.8 +AUMIX_SOURCE = aumix-$(AUMIX_VERSION).tar.bz2 +AUMIX_SITE = http://jpj.net/~trevor/aumix/releases +AUMIX_AUTORECONF = YES + +AUMIX_CONF_OPT = \ + --without-gtk \ + --without-gtk1 \ + --without-alsa \ + --without-gpm \ + --without-sysmouse + +AUMIX_DEPENDENCIES = host-gettext ncurses + +$(eval $(autotools-package)) diff --git a/package/autoconf/Config.in b/package/autoconf/Config.in index 00b3e2c5dd..60128e9cb7 100644 --- a/package/autoconf/Config.in +++ b/package/autoconf/Config.in @@ -1,6 +1,8 @@ config BR2_PACKAGE_AUTOCONF bool "autoconf" - select BR2_PACKAGE_MICROPERL + # We no longer support a toolchain on the target + depends on BR2_DEPRECATED + select BR2_PACKAGE_PERL help Extensible program for developing configure scripts. These scripts handle all the mundane system/feature detection. diff --git a/package/autoconf/autoconf-2.65-dont-add-dirty-to-version.patch b/package/autoconf/autoconf-2.65-dont-add-dirty-to-version.patch deleted file mode 100644 index 38ac16382f..0000000000 --- a/package/autoconf/autoconf-2.65-dont-add-dirty-to-version.patch +++ /dev/null @@ -1,30 +0,0 @@ -autoconf: don't append -dirty to version - -Don't append -dirty to autoconf version number if the buildroot git tree -has uncommited changes. - -This script is meant for the autoconf developers, but it also activates -if you build autoconf in a subdirectory of a git tree (E.G. like how it's -commonly done in buildroot). - -The affect is that autoconf gets built as being version 2.65-dirty, which -breaks programs (like Python) which explicitly checks for autoconf-2.65. - -Signed-off-by: Peter Korsgaard ---- - build-aux/git-version-gen | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: autoconf-2.65/build-aux/git-version-gen -=================================================================== ---- autoconf-2.65.orig/build-aux/git-version-gen -+++ autoconf-2.65/build-aux/git-version-gen -@@ -135,7 +135,7 @@ case "$dirty" in - *) # Append the suffix only if there isn't one already. - case $v in - *-dirty) ;; -- *) v="$v-dirty" ;; -+ #*) v="$v-dirty" ;; - esac ;; - esac - diff --git a/package/autoconf/autoconf-2.65-fix-m4-detection-test-on-dash.patch b/package/autoconf/autoconf-2.65-fix-m4-detection-test-on-dash.patch deleted file mode 100644 index 35f99b2fd7..0000000000 --- a/package/autoconf/autoconf-2.65-fix-m4-detection-test-on-dash.patch +++ /dev/null @@ -1,36 +0,0 @@ -Patch taken upstream at -http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=7f75858f577f11a844781764f30cd42cfe8a5669, -with the following modifications: - - * Changes to NEWS file removed to avoid conflicts - - * Changes also made manually to the generated configure - script. Otherwise, host-autoconf is needed to compile - host-autoconf ! - -Index: autoconf-2.65.old/configure -=================================================================== ---- autoconf-2.65.old.orig/configure 2009-12-15 16:11:05.175566911 +0100 -+++ autoconf-2.65.old/configure 2009-12-15 16:11:37.739562146 +0100 -@@ -2380,7 +2380,7 @@ - ac_snippet=change'quote(<,>)in''dir(,mac,bug)' - ac_snippet=${ac_snippet}pat'subst(a,\(b\)\|\(a\),\1)d'nl - test -z "`$ac_path_M4 -F conftest.m4f &1`" \ -- && test -z "`echo $ac_snippet | $ac_path_M4 --trace=mac 2>&1`" \ -+ && test -z "`$as_echo $ac_snippet | $ac_path_M4 --trace=mac 2>&1`" \ - && test -f conftest.m4f \ - && ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=: - rm -f conftest.m4f -Index: autoconf-2.65.old/m4/m4.m4 -=================================================================== ---- autoconf-2.65.old.orig/m4/m4.m4 2009-12-15 16:11:05.207566124 +0100 -+++ autoconf-2.65.old/m4/m4.m4 2009-12-15 16:11:18.595562030 +0100 -@@ -29,7 +29,7 @@ - ac_snippet=change'quote(<,>)in''dir(,mac,bug)' - ac_snippet=${ac_snippet}pat'subst(a,\(b\)\|\(a\),\1)d'nl - test -z "`$ac_path_M4 -F conftest.m4f &1`" \ -- && test -z "`echo $ac_snippet | $ac_path_M4 --trace=mac 2>&1`" \ -+ && test -z "`AS_ECHO([$ac_snippet]) | $ac_path_M4 --trace=mac 2>&1`" \ - && test -f conftest.m4f \ - && ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=: - rm -f conftest.m4f], diff --git a/package/autoconf/autoconf-dont-add-dirty-to-version.patch b/package/autoconf/autoconf-dont-add-dirty-to-version.patch new file mode 100644 index 0000000000..e8d9f6a29d --- /dev/null +++ b/package/autoconf/autoconf-dont-add-dirty-to-version.patch @@ -0,0 +1,28 @@ +autoconf: don't append -dirty to version + +Don't append -dirty to autoconf version number if the buildroot git tree +has uncommited changes. + +This script is meant for the autoconf developers, but it also activates +if you build autoconf in a subdirectory of a git tree (E.G. like how it's +commonly done in buildroot). + +The affect is that autoconf gets built as being version 2.65-dirty, which +breaks programs (like Python) which explicitly checks for autoconf-2.65. + +[Gustavo: update for autoconf 2.69] +Signed-off-by: Peter Korsgaard +Signed-off-by: Gustavo Zacarias + +diff -Nura autoconf-2.69.orig/build-aux/git-version-gen autoconf-2.69/build-aux/git-version-gen +--- autoconf-2.69.orig/build-aux/git-version-gen 2013-06-27 11:31:02.340200154 -0300 ++++ autoconf-2.69/build-aux/git-version-gen 2013-06-27 11:31:13.734577033 -0300 +@@ -203,7 +203,7 @@ + *) # Append the suffix only if there isn't one already. + case $v in + *-dirty) ;; +- *) v="$v-dirty" ;; ++ #*) v="$v-dirty" ;; + esac ;; + esac + fi diff --git a/package/autoconf/autoconf.mk b/package/autoconf/autoconf.mk index 0ff0644f94..e70aa391eb 100644 --- a/package/autoconf/autoconf.mk +++ b/package/autoconf/autoconf.mk @@ -1,26 +1,30 @@ -############################################################# +################################################################################ # # autoconf # -############################################################# -AUTOCONF_VERSION = 2.65 -AUTOCONF_SOURCE = autoconf-$(AUTOCONF_VERSION).tar.bz2 +################################################################################ + +AUTOCONF_VERSION = 2.69 +AUTOCONF_SOURCE = autoconf-$(AUTOCONF_VERSION).tar.xz AUTOCONF_SITE = $(BR2_GNU_MIRROR)/autoconf +AUTOCONF_LICENSE = GPLv3+ with exceptions +AUTOCONF_LICENSE_FILES = COPYINGv3 COPYING.EXCEPTION + AUTOCONF_CONF_ENV = EMACS="no" ac_cv_path_M4=$(HOST_DIR)/usr/bin/m4 \ ac_cv_prog_gnu_m4_gnu=no -AUTOCONF_DEPENDENCIES = microperl host-m4 +AUTOCONF_DEPENDENCIES = host-m4 perl -HOST_AUTOCONF_CONF_ENV = ac_cv_path_M4=$(HOST_DIR)/usr/bin/m4 \ +HOST_AUTOCONF_CONF_ENV = EMACS="no" ac_cv_path_M4=$(HOST_DIR)/usr/bin/m4 \ ac_cv_prog_gnu_m4_gnu=no HOST_AUTOCONF_DEPENDENCIES = host-m4 host-libtool -$(eval $(call AUTOTARGETS,package,autoconf)) -$(eval $(call AUTOTARGETS,package,autoconf,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) # variables used by other packages -AUTOCONF:=$(HOST_DIR)/usr/bin/autoconf -AUTOHEADER:=$(HOST_DIR)/usr/bin/autoheader -AUTORECONF=$(HOST_CONFIGURE_OPTS) ACLOCAL="$(ACLOCAL)" AUTOCONF="$(AUTOCONF)" AUTOHEADER="$(AUTOHEADER)" AUTOMAKE="$(AUTOMAKE)" $(HOST_DIR)/usr/bin/autoreconf -f -i -I "$(ACLOCAL_DIR)" -I "$(ACLOCAL_HOST_DIR)" +AUTOCONF = $(HOST_DIR)/usr/bin/autoconf +AUTOHEADER = $(HOST_DIR)/usr/bin/autoheader +AUTORECONF = $(HOST_CONFIGURE_OPTS) ACLOCAL="$(ACLOCAL)" AUTOCONF="$(AUTOCONF)" AUTOHEADER="$(AUTOHEADER)" AUTOMAKE="$(AUTOMAKE)" AUTOPOINT=/bin/true $(HOST_DIR)/usr/bin/autoreconf -f -i -I "$(ACLOCAL_DIR)" -I "$(ACLOCAL_HOST_DIR)" diff --git a/package/automake/Config.in b/package/automake/Config.in index 935f1f1454..e2f6cc7f61 100644 --- a/package/automake/Config.in +++ b/package/automake/Config.in @@ -1,7 +1,9 @@ config BR2_PACKAGE_AUTOMAKE bool "automake" + # We no longer support a toolchain on the target + depends on BR2_DEPRECATED select BR2_PACKAGE_AUTOCONF - select BR2_PACKAGE_MICROPERL + select BR2_PACKAGE_PERL help Tool for automatically generating Makefile's for input to configure scripts (made by autoconf). diff --git a/package/automake/automake.mk b/package/automake/automake.mk index 8857e98827..94a84ddf94 100644 --- a/package/automake/automake.mk +++ b/package/automake/automake.mk @@ -1,13 +1,16 @@ -############################################################# +################################################################################ # # automake # -############################################################# -AUTOMAKE_VERSION = 1.11.1 -AUTOMAKE_SOURCE = automake-$(AUTOMAKE_VERSION).tar.bz2 +################################################################################ + +AUTOMAKE_VERSION = 1.12.6 +AUTOMAKE_SOURCE = automake-$(AUTOMAKE_VERSION).tar.xz AUTOMAKE_SITE = $(BR2_GNU_MIRROR)/automake +AUTOMAKE_LICENSE = GPLv2+ +AUTOMAKE_LICENSE_FILES = COPYING -AUTOMAKE_DEPENDENCIES = host-autoconf autoconf microperl +AUTOMAKE_DEPENDENCIES = host-autoconf autoconf perl HOST_AUTOMAKE_DEPENDENCIES = host-autoconf @@ -23,8 +26,8 @@ endef HOST_AUTOMAKE_POST_INSTALL_HOOKS += GTK_DOC_M4_INSTALL HOST_AUTOMAKE_POST_INSTALL_HOOKS += HOST_AUTOMAKE_MAKE_ACLOCAL -$(eval $(call AUTOTARGETS,package,automake)) -$(eval $(call AUTOTARGETS,package,automake,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) # variables used by other packages AUTOMAKE = $(HOST_DIR)/usr/bin/automake diff --git a/package/autossh/Config.in b/package/autossh/Config.in new file mode 100644 index 0000000000..6d1a0853ed --- /dev/null +++ b/package/autossh/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_AUTOSSH + bool "autossh" + depends on BR2_USE_MMU # fork() + depends on BR2_PACKAGE_DROPBEAR || BR2_PACKAGE_OPENSSH + help + autossh is a program to start a copy of ssh and monitor it, + restarting it as necessary should it die or stop passing traffic. + + http://www.harding.motd.ca/autossh/ diff --git a/package/autossh/autossh.mk b/package/autossh/autossh.mk new file mode 100644 index 0000000000..75d78928bd --- /dev/null +++ b/package/autossh/autossh.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# autossh +# +################################################################################ + +AUTOSSH_VERSION = 1.4c +AUTOSSH_SITE = http://www.harding.motd.ca/autossh +AUTOSSH_SOURCE = autossh-$(AUTOSSH_VERSION).tgz +AUTOSSH_LICENSE = Modified BSD +AUTOSSH_LICENSE_FILES = autossh.c + +define AUTOSSH_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 -D $(@D)/autossh $(TARGET_DIR)/usr/bin/autossh +endef + +$(eval $(autotools-package)) diff --git a/package/avahi/Config.in b/package/avahi/Config.in index eb3ccb67b0..fd4d229edb 100644 --- a/package/avahi/Config.in +++ b/package/avahi/Config.in @@ -1,17 +1,20 @@ config BR2_PACKAGE_AVAHI bool "avahi" + # libdaemon uses fork() + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_THREADS select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE - select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE help Avahi is a system which facilitates service discovery on a local network. http://www.avahi.org/ +if BR2_PACKAGE_AVAHI + config BR2_PACKAGE_AVAHI_AUTOIPD bool "IPv4LL network address configuration daemon" default y - depends on BR2_PACKAGE_AVAHI select BR2_PACKAGE_LIBDAEMON help Avahi-autoipd implements IPv4LL, "Dynamic Configuration of @@ -23,7 +26,6 @@ config BR2_PACKAGE_AVAHI_AUTOIPD config BR2_PACKAGE_AVAHI_DAEMON bool "mDNS/DNS-SD daemon" - depends on BR2_PACKAGE_AVAHI select BR2_PACKAGE_LIBDAEMON select BR2_PACKAGE_EXPAT help @@ -31,3 +33,9 @@ config BR2_PACKAGE_AVAHI_DAEMON architecture (also known as "Rendezvous" or "Bonjour"). The daemon registers local IP addresses and services using mDNS/DNS-SD. + +endif + +comment "avahi needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/avahi/avahi.mk b/package/avahi/avahi.mk index a44860b62e..89aa023a78 100644 --- a/package/avahi/avahi.mk +++ b/package/avahi/avahi.mk @@ -1,8 +1,9 @@ -############################################################# +################################################################################ # -# avahi (zeroconf implementation) +# avahi # -############################################################# +################################################################################ + # # This program is free software; you can redistribute it # and/or modify it under the terms of the GNU Lesser General @@ -11,10 +12,10 @@ # later version. AVAHI_VERSION = 0.6.31 -AVAHI_SOURCE = avahi-$(AVAHI_VERSION).tar.gz AVAHI_SITE = http://www.avahi.org/download/ +AVAHI_LICENSE = LGPLv2.1+ +AVAHI_LICENSE_FILES = LICENSE AVAHI_INSTALL_STAGING = YES -AVAHI_INSTALL_TARGET = YES AVAHI_CONF_ENV = ac_cv_func_strtod=yes \ ac_fsusage_space=yes \ @@ -79,12 +80,13 @@ AVAHI_CONF_OPT = --localstatedir=/var \ --with-distro=none \ $(if $(BR2_HAVE_DOCUMENTATION),--enable,--disable)-manpages \ $(if $(BR2_PACKAGE_AVAHI_AUTOIPD),--enable,--disable)-autoipd \ - --with-avahi-user=root \ - --with-avahi-group=root \ + --with-avahi-user=default \ + --with-avahi-group=default \ --with-autoipd-user=default \ --with-autoipd-group=default -AVAHI_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl) host-intltool host-pkg-config +AVAHI_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-intltool \ + host-pkgconf host-gettext ifneq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_AVAHI_AUTOIPD),) AVAHI_DEPENDENCIES += libdaemon @@ -132,10 +134,7 @@ else AVAHI_CONF_OPT += --disable-python endif -ifeq ($(BR2_PACKAGE_LIBINTL),y) -AVAHI_DEPENDENCIES += libintl -AVAHI_MAKE_OPT = LIBS=-lintl -endif +AVAHI_MAKE_OPT += $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),LIBS=-lintl) define AVAHI_REMOVE_INITSCRIPT rm -rf $(TARGET_DIR)/etc/init.d/avahi-* @@ -144,8 +143,6 @@ endef AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_REMOVE_INITSCRIPT define AVAHI_INSTALL_AUTOIPD - rm -rf $(TARGET_DIR)/etc/dhcp3/ - $(INSTALL) -D -m 0755 package/avahi/busybox-udhcpc-default.script $(TARGET_DIR)/usr/share/udhcpc/default.script $(INSTALL) -m 0755 package/avahi/S05avahi-setup.sh $(TARGET_DIR)/etc/init.d/ rm -f $(TARGET_DIR)/var/lib/avahi-autoipd $(INSTALL) -d -m 0755 $(TARGET_DIR)/var/lib @@ -162,7 +159,6 @@ endef ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y) AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_INSTALL_DAEMON_INITSCRIPT - endif -$(eval $(call AUTOTARGETS,package,avahi)) +$(eval $(autotools-package)) diff --git a/package/avahi/busybox-udhcpc-default.script b/package/avahi/busybox-udhcpc-default.script deleted file mode 100755 index 5205677754..0000000000 --- a/package/avahi/busybox-udhcpc-default.script +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh - -# udhcpc script edited by Tim Riker - -[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1 - -RESOLV_CONF="/etc/resolv.conf" -[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" -[ -n "$subnet" ] && NETMASK="netmask $subnet" - -case "$1" in - deconfig) - grep -q -v ip= /proc/cmdline - if [ $? -eq 0 ]; then - /sbin/ifconfig $interface up - fi - grep -q -v nfsroot= /proc/cmdline - if [ $? -eq 0 ]; then - /sbin/ifconfig $interface 0.0.0.0 - fi - if [ -x /usr/sbin/avahi-autoipd ]; then - /usr/sbin/avahi-autoipd -k $interface - fi - ;; - - leasefail|nak) - if [ -x /usr/sbin/avahi-autoipd ]; then - /usr/sbin/avahi-autoipd -wD $interface --no-chroot - fi - ;; - - renew|bound) - if [ -x /usr/sbin/avahi-autoipd ]; then - /usr/sbin/avahi-autoipd -k $interface - fi - /sbin/ifconfig $interface $ip $BROADCAST $NETMASK - - if [ -n "$router" ] ; then - echo "deleting routers" - while route del default gw 0.0.0.0 dev $interface ; do - : - done - - for i in $router ; do - route add default gw $i dev $interface - done - fi - - if [ -f /root/.xbmc/myResolv.conf ] ; then - echo overriding dns with myResolv.conf - cp -f /root/.xbmc/myResolv.conf $RESOLV_CONF - else - echo -n > $RESOLV_CONF - [ -n "$domain" ] && echo search $domain >> $RESOLV_CONF - for i in $dns ; do - echo adding dns $i - echo nameserver $i >> $RESOLV_CONF - done - fi - ;; -esac - -exit 0 diff --git a/package/axel/Config.in b/package/axel/Config.in index cb9af322be..aa93f2a11f 100644 --- a/package/axel/Config.in +++ b/package/axel/Config.in @@ -1,8 +1,11 @@ config BR2_PACKAGE_AXEL bool "axel" select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE - select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE + depends on BR2_TOOLCHAIN_HAS_THREADS help HTTP/FTP download accelerator. http://axel.alioth.debian.org/ + +comment "axel needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/axel/axel.mk b/package/axel/axel.mk index 1bf4d813f2..c0e2e653ef 100644 --- a/package/axel/axel.mk +++ b/package/axel/axel.mk @@ -1,16 +1,18 @@ -############################################################# +################################################################################ # # axel # -############################################################# +################################################################################ + AXEL_VERSION = 2.4 -AXEL_SOURCE = axel-$(AXEL_VERSION).tar.gz -AXEL_SITE = https://alioth.debian.org/frs/download.php/3015 +AXEL_SITE = https://alioth.debian.org/frs/download.php/file/3015 +AXEL_LICENSE = GPLv2+ +AXEL_LICENSE_FILES = COPYING AXEL_LDFLAGS = -lpthread ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) -AXEL_DEPENDENCIES += gettext libintl +AXEL_DEPENDENCIES += gettext AXEL_LDFLAGS += -lintl endif @@ -44,4 +46,4 @@ define AXEL_CLEAN_CMDS -$(MAKE) -C $(@D) clean endef -$(eval $(call GENTARGETS,package,axel)) +$(eval $(generic-package)) diff --git a/package/b43-firmware/Config.in b/package/b43-firmware/Config.in new file mode 100644 index 0000000000..bc69bbcbed --- /dev/null +++ b/package/b43-firmware/Config.in @@ -0,0 +1,25 @@ +config BR2_PACKAGE_B43_FIRMWARE + bool "b43-firmware" + help + Firmware for the Broadcom Wifi devices supported by the b43 + kernel driver. + +if BR2_PACKAGE_B43_FIRMWARE + +choice + prompt "Kernel version" + default BR2_PACKAGE_B43_FIRMWARE_KERNEL_AFTER_3_2 + help + Select the kernel version you're using. The b43 driver in + kernel >= 3.2 need a different firmware than the b43 drivers + from kernel < 3.2. + + config BR2_PACKAGE_B43_FIRMWARE_KERNEL_AFTER_3_2 + bool ">= 3.2" + + config BR2_PACKAGE_B43_FIRMWARE_KERNEL_BEFORE_3_2 + bool "< 3.2" + +endchoice + +endif diff --git a/package/b43-firmware/b43-firmware.mk b/package/b43-firmware/b43-firmware.mk new file mode 100644 index 0000000000..5d036e0276 --- /dev/null +++ b/package/b43-firmware/b43-firmware.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# b43-firmware +# +################################################################################ + +ifeq ($(BR2_PACKAGE_B43_FIRMWARE_KERNEL_AFTER_3_2),y) +B43_FIRMWARE_VERSION = 5.100.138 +B43_FIRMWARE_SITE = http://www.lwfinger.com/b43-firmware/ +B43_FIRMWARE_SOURCE = broadcom-wl-$(B43_FIRMWARE_VERSION).tar.bz2 +B43_FIRMWARE_DRIVER_FILE = linux/wl_apsta.o +else ifeq ($(BR2_PACKAGE_B43_FIRMWARE_KERNEL_BEFORE_3_2),y) +B43_FIRMWARE_VERSION = 5.10.56.27.3 +B43_FIRMWARE_SITE = http://mirror2.openwrt.org/sources/ +B43_FIRMWARE_SOURCE = broadcom-wl-$(B43_FIRMWARE_VERSION)_mipsel.tar.bz2 +B43_FIRMWARE_DRIVER_FILE = driver/wl_apsta/wl_prebuilt.o +endif + +B43_FIRMWARE_LICENSE = PROPRIETARY +B43_FIRMWARE_REDISTRIBUTE = NO + +B43_FIRMWARE_DEPENDENCIES = host-b43-fwcutter + +define B43_FIRMWARE_INSTALL_TARGET_CMDS + $(INSTALL) -d -m 0755 $(TARGET_DIR)/lib/firmware/ + $(HOST_DIR)/usr/bin/b43-fwcutter -w $(TARGET_DIR)/lib/firmware/ $(@D)/$(B43_FIRMWARE_DRIVER_FILE) +endef + +$(eval $(generic-package)) diff --git a/package/b43-fwcutter/b43-fwcutter.mk b/package/b43-fwcutter/b43-fwcutter.mk new file mode 100644 index 0000000000..bc11c0b8a0 --- /dev/null +++ b/package/b43-fwcutter/b43-fwcutter.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# b43-fwcutter +# +################################################################################ + +B43_FWCUTTER_VERSION = 015 +B43_FWCUTTER_SITE = http://bues.ch/b43/fwcutter/ +B43_FWCUTTER_SOURCE = b43-fwcutter-$(B43_FWCUTTER_VERSION).tar.bz2 +B43_FWCUTTER_LICENSE = BSD-2c +B43_FWCUTTER_LICENSE_FILES = COPYING + +define HOST_B43_FWCUTTER_BUILD_CMDS + $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define HOST_B43_FWCUTTER_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/b43-fwcutter $(HOST_DIR)/usr/bin/b43-fwcutter +endef + +$(eval $(host-generic-package)) diff --git a/package/bash/Config.in b/package/bash/Config.in index 9ee46e87a3..228d5a4f79 100644 --- a/package/bash/Config.in +++ b/package/bash/Config.in @@ -1,6 +1,8 @@ config BR2_PACKAGE_BASH bool "bash" select BR2_PACKAGE_NCURSES + # uses fork() + depends on BR2_USE_MMU help The standard GNU Bourne again shell. diff --git a/package/bash/bash-4.1-001.patch b/package/bash/bash-4.1-001.patch deleted file mode 100644 index be5f9823e8..0000000000 --- a/package/bash/bash-4.1-001.patch +++ /dev/null @@ -1,48 +0,0 @@ - BASH PATCH REPORT - ================= - -Bash-Release: 4.1 -Patch-ID: bash41-001 - -Bug-Reported-by: Yann Rouillard -Bug-Reference-ID: <4B44A410.4070107@pleiades.fr.eu.org> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-01/msg00018.html - -Bug-Description: - -A prototype for vsnprintf was incorrect, and caused compilation failures -on systems that did not have a suitable vsnprintf, but had a declaration in -one of the system header files. - -Patch (apply with `patch -p0'): - -*** ../bash-4.1-patched/builtins/printf.def 2009-11-20 15:31:23.000000000 -0500 ---- ./builtins/printf.def 2010-01-07 08:50:06.000000000 -0500 -*************** -*** 173,177 **** - - #if !HAVE_VSNPRINTF -! extern int vsnprintf __P((char *, size_t, const char *, ...)) __attribute__((__format__ (printf, 3, 4))); - #endif - ---- 173,177 ---- - - #if !HAVE_VSNPRINTF -! extern int vsnprintf __P((char *, size_t, const char *, va_list)) __attribute__((__format__ (printf, 3, 0))); - #endif - -*** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400 ---- ./patchlevel.h 2010-01-14 09:38:08.000000000 -0500 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 0 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 1 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.1-002.patch b/package/bash/bash-4.1-002.patch deleted file mode 100644 index 7601ab2d65..0000000000 --- a/package/bash/bash-4.1-002.patch +++ /dev/null @@ -1,65 +0,0 @@ - BASH PATCH REPORT - ================= - -Bash-Release: 4.1 -Patch-ID: bash41-002 - -Bug-Reported-by: guillaume.outters@free.fr -Bug-Reference-ID: <20100105230441.70D171AA7F52@asterix.local> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-01/msg00017.html - -Bug-Description: - -Bash-4.1/Readline-6.1 introduced a hook function that allows applications -to rewrite or modify filenames read from the file system before comparing -them with a word to be completed. The converted filename, if it matches, -needs to be inserted into the line buffer, replacing the original contents. - -This fixes a completion bug on Mac OS X involving filenames containing -UTF-8 characters. - -Patch (apply with `patch -p0'): - -*** ../bash-4.1-patched/lib/readline/complete.c 2009-11-29 18:39:30.000000000 -0500 ---- ./lib/readline/complete.c 2010-01-06 08:30:23.000000000 -0500 -*************** -*** 2139,2143 **** - if (filename_len == 0) - { -! if (_rl_match_hidden_files == 0 && HIDDEN_FILE (entry->d_name)) - continue; - ---- 2139,2143 ---- - if (filename_len == 0) - { -! if (_rl_match_hidden_files == 0 && HIDDEN_FILE (convfn)) - continue; - -*************** -*** 2220,2224 **** - } - -! strcpy (temp + dirlen, entry->d_name); - } - else ---- 2220,2224 ---- - } - -! strcpy (temp + dirlen, convfn); - } - else -*** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400 ---- ./patchlevel.h 2010-01-14 09:38:08.000000000 -0500 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 1 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 2 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.1-003.patch b/package/bash/bash-4.1-003.patch deleted file mode 100644 index fc12bb54d5..0000000000 --- a/package/bash/bash-4.1-003.patch +++ /dev/null @@ -1,48 +0,0 @@ - BASH PATCH REPORT - ================= - -Bash-Release: 4.1 -Patch-ID: bash41-003 - -Bug-Reported-by: coyote@wariat.org.pl -Bug-Reference-ID: <4b64a1f8.06e2660a.60af.4bfb@mx.google.com> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-01/msg00135.html - -Bug-Description: - -If command completion is attempted on a word with a quoted globbing -character (e.g., `*' or `?'), bash can reference a NULL pointer and -dump core. - -Patch (apply with `patch -p0'): - -*** ../bash-4.1-patched/bashline.c 2009-10-24 14:10:19.000000000 -0400 ---- ./bashline.c 2010-01-30 21:53:49.000000000 -0500 -*************** -*** 1681,1685 **** - characters in the common prefix are bad) will ever be returned on - regular completion. */ -! if (glob_pattern_p (hint)) - { - if (state == 0) ---- 1681,1685 ---- - characters in the common prefix are bad) will ever be returned on - regular completion. */ -! if (globpat) - { - if (state == 0) -*** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400 ---- ./patchlevel.h 2010-01-14 09:38:08.000000000 -0500 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 2 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 3 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.1-004.patch b/package/bash/bash-4.1-004.patch deleted file mode 100644 index a6b83358e1..0000000000 --- a/package/bash/bash-4.1-004.patch +++ /dev/null @@ -1,47 +0,0 @@ - BASH PATCH REPORT - ================= - -Bash-Release: 4.1 -Patch-ID: bash41-004 - -Bug-Reported-by: Crestez Dan Leonard -Bug-Reference-ID: <1265592839.30682.21.camel@deskbox> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-02/msg00034.html - -Bug-Description: - -When running in Posix mode and executing a shell function without local -variables, bash will not propagate a variable in a special builtin's temporary -environment to have global scope. - -Patch (apply with `patch -p0'): - -*** ../bash-4.1-patched/variables.c 2009-11-03 14:13:58.000000000 -0500 ---- ./variables.c 2010-02-08 17:36:18.000000000 -0500 -*************** -*** 3809,3812 **** ---- 3809,3817 ---- - if (tempvar_p (var) && (posixly_correct || (var->attributes & att_propagate))) - { -+ /* Make sure we have a hash table to store the variable in while it is -+ being propagated down to the global variables table. Create one if -+ we have to */ -+ if ((vc_isfuncenv (shell_variables) || vc_istempenv (shell_variables)) && shell_variables->table == 0) -+ shell_variables->table = hash_create (0); - /* XXX - should we set v->context here? */ - v = bind_variable_internal (var->name, value_cell (var), shell_variables->table, 0, 0); -*** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400 ---- ./patchlevel.h 2010-01-14 09:38:08.000000000 -0500 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 3 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 4 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.1-005.patch b/package/bash/bash-4.1-005.patch deleted file mode 100644 index 79745475cc..0000000000 --- a/package/bash/bash-4.1-005.patch +++ /dev/null @@ -1,56 +0,0 @@ - BASH PATCH REPORT - ================= - -Bash-Release: 4.1 -Patch-ID: bash41-005 - -Bug-Reported-by: werner@suse.de -Bug-Reference-ID: <201002251238.o1PCcYcg016893@boole.suse.de> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-02/msg00132.html - -Bug-Description: - -When the `read' builtin times out after the timeout specified with -t is -exceeded, it does not reset the flags that tell signal handlers to process -signals immediately instead of deferring their handling. This can result -in unsafe functions being called from signal handlers, which can cause bash -to hang or dump core. - -Patch (apply with `patch -p0'): - -*** ../bash-4.1-patched/builtins/read.def 2009-10-08 11:35:46.000000000 -0400 ---- ./builtins/read.def 2010-03-17 17:35:39.000000000 -0400 -*************** -*** 616,621 **** - zsyncfd (fd); - -- interrupt_immediately--; -- terminate_immediately--; - discard_unwind_frame ("read_builtin"); - ---- 616,619 ---- -*************** -*** 624,627 **** ---- 622,628 ---- - assign_vars: - -+ interrupt_immediately--; -+ terminate_immediately--; -+ - #if defined (ARRAY_VARS) - /* If -a was given, take the string read, break it into a list of words, -*** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400 ---- ./patchlevel.h 2010-01-14 09:38:08.000000000 -0500 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 4 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 5 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.1-006.patch b/package/bash/bash-4.1-006.patch deleted file mode 100644 index c33d0bd0fe..0000000000 --- a/package/bash/bash-4.1-006.patch +++ /dev/null @@ -1,76 +0,0 @@ - BASH PATCH REPORT - ================= - -Bash-Release: 4.1 -Patch-ID: bash41-006 - -Bug-Reported-by: Mike Frysinger -Bug-Reference-ID: <201003210155.56618.vapier@gentoo.org> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-03/msg00063.html - -Bug-Description: - -Bash did not correctly print/reproduce here documents attached to commands -inside compound commands such as for and while. This affected the -execution of such commands inside a shell function when the function -definition is saved and later restored using `.' or `eval'. - -Patch (apply with `patch -p0'): - -*** ../bash-4.1-patched/print_cmd.c 2009-09-16 15:32:26.000000000 -0400 ---- ./print_cmd.c 2010-03-22 21:15:30.000000000 -0400 -*************** -*** 114,117 **** ---- 114,123 ---- - #define CHECK_XTRACE_FP xtrace_fp = (xtrace_fp ? xtrace_fp : stderr) - -+ #define PRINT_DEFERRED_HEREDOCS(x) \ -+ do { \ -+ if (deferred_heredocs) \ -+ print_deferred_heredocs (x); \ -+ } while (0) -+ - /* Non-zero means the stuff being printed is inside of a function def. */ - static int inside_function_def; -*************** -*** 561,571 **** - { - print_for_command_head (for_command); -- - cprintf (";"); - newline ("do\n"); - indentation += indentation_amount; - make_command_string_internal (for_command->action); - semicolon (); - indentation -= indentation_amount; - newline ("done"); - } ---- 566,578 ---- - { - print_for_command_head (for_command); - cprintf (";"); - newline ("do\n"); -+ - indentation += indentation_amount; - make_command_string_internal (for_command->action); -+ PRINT_DEFERRED_HEREDOCS (""); - semicolon (); - indentation -= indentation_amount; -+ - newline ("done"); - } -*** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400 ---- ./patchlevel.h 2010-01-14 09:38:08.000000000 -0500 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 5 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 6 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.1-007.patch b/package/bash/bash-4.1-007.patch deleted file mode 100644 index a421b0c418..0000000000 --- a/package/bash/bash-4.1-007.patch +++ /dev/null @@ -1,47 +0,0 @@ - BASH PATCH REPORT - ================= - -Bash-Release: 4.1 -Patch-ID: bash41-007 - -Bug-Reported-by: Rob Robason -Bug-Reference-ID: <1269513145.22336.9.camel@home.robason.homelinux.net> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-03/msg00089.html - -Bug-Description: - -A typo caused bash to not honor a precision specification in a printf -format. - -Patch (apply with `patch -p0'): - -*** ../bash-4.1-patched/builtins/printf.def 2010-01-18 10:50:22.000000000 -0500 ---- ./builtins/printf.def 2010-03-25 09:40:56.000000000 -0400 -*************** -*** 118,122 **** - nw = vflag ? vbprintf (f, fieldwidth, func) : printf (f, fieldwidth, func); \ - else if (have_precision) \ -! nw = vflag ? vbprintf (f, precision, func) : printf (f, fieldwidth, func); \ - else \ - nw = vflag ? vbprintf (f, func) : printf (f, func); \ ---- 118,122 ---- - nw = vflag ? vbprintf (f, fieldwidth, func) : printf (f, fieldwidth, func); \ - else if (have_precision) \ -! nw = vflag ? vbprintf (f, precision, func) : printf (f, precision, func); \ - else \ - nw = vflag ? vbprintf (f, func) : printf (f, func); \ -*** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400 ---- ./patchlevel.h 2010-01-14 09:38:08.000000000 -0500 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 6 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 7 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.1-008.patch b/package/bash/bash-4.1-008.patch deleted file mode 100644 index 72b855ee70..0000000000 --- a/package/bash/bash-4.1-008.patch +++ /dev/null @@ -1,49 +0,0 @@ - BASH PATCH REPORT - ================= - -Bash-Release: 4.1 -Patch-ID: bash41-008 - -Bug-Reported-by: Dennis van Dok -Bug-Reference-ID: <4BBF2501.5050703@gmail.com> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-04/msg00038.html - -Bug-Description: - -When declaring an associative array and implicitly assigning a value -to element "0", bash does not correctly allocate memory, leading to -a segmentation violation when that element or the array itself is -unset. - -Patch (apply with `patch -p0'): - -*** ../bash-4.1-patched/builtins/declare.def 2009-11-25 19:42:00.000000000 -0500 ---- ./builtins/declare.def 2010-05-30 18:25:21.000000000 -0400 -*************** -*** 513,517 **** - /* let bind_{array,assoc}_variable take care of this. */ - if (assoc_p (var)) -! bind_assoc_variable (var, name, "0", value, aflags); - else - bind_array_variable (name, 0, value, aflags); ---- 519,523 ---- - /* let bind_{array,assoc}_variable take care of this. */ - if (assoc_p (var)) -! bind_assoc_variable (var, name, savestring ("0"), value, aflags); - else - bind_array_variable (name, 0, value, aflags); -*** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400 ---- ./patchlevel.h 2010-01-14 09:38:08.000000000 -0500 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 7 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 8 - - #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.1-009.patch b/package/bash/bash-4.1-009.patch deleted file mode 100644 index ed136a9fd7..0000000000 --- a/package/bash/bash-4.1-009.patch +++ /dev/null @@ -1,48 +0,0 @@ - BASH PATCH REPORT - ================= - -Bash-Release: 4.1 -Patch-ID: bash41-009 - -Bug-Reported-by: Tomas Trnka -Bug-Reference-ID: <201003242030.02166.tomastrnka@gmx.com> -Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-03/msg00090.html - -Bug-Description: - -An arriving SIGCHLD will interrupt `slow' system calls such as write(2) to -or read(2) from a terminal. This results in an error message and truncated -input or output. - -Patch (apply with `patch -p0'): - -*** ../bash-4.1-patched/sig.c Fri Aug 14 16:31:52 2009 ---- ./sig.c Fri Mar 26 22:34:11 2010 -*************** -*** 655,660 **** ---- 655,663 ---- - act.sa_flags |= SA_INTERRUPT; /* XXX */ - else - act.sa_flags |= SA_RESTART; /* XXX */ -+ #else -+ if (sig == SIGCHLD) -+ act.sa_flags |= SA_RESTART; - #endif - sigemptyset (&act.sa_mask); - sigemptyset (&oact.sa_mask); -*** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400 ---- ./patchlevel.h 2010-01-14 09:38:08.000000000 -0500 -*************** -*** 26,30 **** - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 8 - - #endif /* _PATCHLEVEL_H_ */ ---- 26,30 ---- - looks for to find the patch level (for the sccs version string). */ - -! #define PATCHLEVEL 9 - - #endif /* _PATCHLEVEL_H_ */ - diff --git a/package/bash/bash-4.2-001.patch b/package/bash/bash-4.2-001.patch new file mode 100644 index 0000000000..b5c0aa905c --- /dev/null +++ b/package/bash/bash-4.2-001.patch @@ -0,0 +1,78 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-001 + +Bug-Reported-by: Juergen Daubert +Bug-Reference-ID: <20110214175132.GA19813@jue.netz> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00125.html + +Bug-Description: + +When running in Posix mode, bash does not correctly expand the right-hand +side of a double-quoted word expansion containing single quotes. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/subst.c 2011-01-02 16:12:51.000000000 -0500 +--- ./subst.c 2011-02-19 00:00:00.000000000 -0500 +*************** +*** 1380,1387 **** + + /* The handling of dolbrace_state needs to agree with the code in parse.y: +! parse_matched_pair() */ +! dolbrace_state = 0; +! if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) +! dolbrace_state = (flags & SX_POSIXEXP) ? DOLBRACE_QUOTE : DOLBRACE_PARAM; + + i = *sindex; +--- 1380,1389 ---- + + /* The handling of dolbrace_state needs to agree with the code in parse.y: +! parse_matched_pair(). The different initial value is to handle the +! case where this function is called to parse the word in +! ${param op word} (SX_WORD). */ +! dolbrace_state = (flags & SX_WORD) ? DOLBRACE_WORD : DOLBRACE_PARAM; +! if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && (flags & SX_POSIXEXP)) +! dolbrace_state = DOLBRACE_QUOTE; + + i = *sindex; +*************** +*** 7177,7181 **** + /* Extract the contents of the ${ ... } expansion + according to the Posix.2 rules. */ +! value = extract_dollar_brace_string (string, &sindex, quoted, (c == '%' || c == '#') ? SX_POSIXEXP : 0); + if (string[sindex] == RBRACE) + sindex++; +--- 7181,7185 ---- + /* Extract the contents of the ${ ... } expansion + according to the Posix.2 rules. */ +! value = extract_dollar_brace_string (string, &sindex, quoted, (c == '%' || c == '#' || c =='/' || c == '^' || c == ',' || c ==':') ? SX_POSIXEXP|SX_WORD : SX_WORD); + if (string[sindex] == RBRACE) + sindex++; +*** ../bash-4.2-patched/subst.h 2010-12-02 20:21:29.000000000 -0500 +--- ./subst.h 2011-02-16 21:12:09.000000000 -0500 +*************** +*** 57,60 **** +--- 57,61 ---- + #define SX_ARITHSUB 0x0080 /* extracting $(( ... )) (currently unused) */ + #define SX_POSIXEXP 0x0100 /* extracting new Posix pattern removal expansions in extract_dollar_brace_string */ ++ #define SX_WORD 0x0200 /* extracting word in ${param op word} */ + + /* Remove backslashes which are quoting backquotes from STRING. Modifies +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 0 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 1 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-002.patch b/package/bash/bash-4.2-002.patch new file mode 100644 index 0000000000..0d35ad2671 --- /dev/null +++ b/package/bash/bash-4.2-002.patch @@ -0,0 +1,60 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-002 + +Bug-Reported-by: Clark J. Wang +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00157.html + +Bug-Description: + +The readline vi-mode `cc', `dd', and `yy' commands failed to modify the +entire line. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/lib/readline/vi_mode.c 2010-11-20 19:51:39.000000000 -0500 +--- ./lib/readline/vi_mode.c 2011-02-17 20:24:25.000000000 -0500 +*************** +*** 1115,1119 **** + _rl_vi_last_motion = c; + RL_UNSETSTATE (RL_STATE_VIMOTION); +! return (0); + } + #if defined (READLINE_CALLBACKS) +--- 1115,1119 ---- + _rl_vi_last_motion = c; + RL_UNSETSTATE (RL_STATE_VIMOTION); +! return (vidomove_dispatch (m)); + } + #if defined (READLINE_CALLBACKS) +*** ../bash-4.2-patched/lib/readline/callback.c 2010-06-06 12:18:58.000000000 -0400 +--- ./lib/readline/callback.c 2011-02-17 20:43:28.000000000 -0500 +*************** +*** 149,152 **** +--- 149,155 ---- + /* Should handle everything, including cleanup, numeric arguments, + and turning off RL_STATE_VIMOTION */ ++ if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0) ++ _rl_internal_char_cleanup (); ++ + return; + } +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 1 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 2 + + #endif /* _PATCHLEVEL_H_ */ + diff --git a/package/bash/bash-4.2-003.patch b/package/bash/bash-4.2-003.patch new file mode 100644 index 0000000000..a17b12764c --- /dev/null +++ b/package/bash/bash-4.2-003.patch @@ -0,0 +1,318 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-003 + +Bug-Reported-by: Clark J. Wang +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00136.html + +Bug-Description: + +When using the pattern replacement and pattern removal word expansions, bash +miscalculates the possible match length in the presence of an unescaped left +bracket without a closing right bracket, resulting in a failure to match +the pattern. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/lib/glob/gmisc.c 2011-02-05 16:11:17.000000000 -0500 +--- ./lib/glob/gmisc.c 2011-02-18 23:53:42.000000000 -0500 +*************** +*** 78,83 **** + size_t wmax; + { +! wchar_t wc, *wbrack; +! int matlen, t, in_cclass, in_collsym, in_equiv; + + if (*wpat == 0) +--- 78,83 ---- + size_t wmax; + { +! wchar_t wc; +! int matlen, bracklen, t, in_cclass, in_collsym, in_equiv; + + if (*wpat == 0) +*************** +*** 119,123 **** + case L'[': + /* scan for ending `]', skipping over embedded [:...:] */ +! wbrack = wpat; + wc = *wpat++; + do +--- 119,123 ---- + case L'[': + /* scan for ending `]', skipping over embedded [:...:] */ +! bracklen = 1; + wc = *wpat++; + do +*************** +*** 125,140 **** + if (wc == 0) + { +! matlen += wpat - wbrack - 1; /* incremented below */ +! break; + } + else if (wc == L'\\') + { +! wc = *wpat++; +! if (*wpat == 0) +! break; + } + else if (wc == L'[' && *wpat == L':') /* character class */ + { + wpat++; + in_cclass = 1; + } +--- 125,148 ---- + if (wc == 0) + { +! wpat--; /* back up to NUL */ +! matlen += bracklen; +! goto bad_bracket; + } + else if (wc == L'\\') + { +! /* *wpat == backslash-escaped character */ +! bracklen++; +! /* If the backslash or backslash-escape ends the string, +! bail. The ++wpat skips over the backslash escape */ +! if (*wpat == 0 || *++wpat == 0) +! { +! matlen += bracklen; +! goto bad_bracket; +! } + } + else if (wc == L'[' && *wpat == L':') /* character class */ + { + wpat++; ++ bracklen++; + in_cclass = 1; + } +*************** +*** 142,145 **** +--- 150,154 ---- + { + wpat++; ++ bracklen++; + in_cclass = 0; + } +*************** +*** 147,152 **** + { + wpat++; + if (*wpat == L']') /* right bracket can appear as collating symbol */ +! wpat++; + in_collsym = 1; + } +--- 156,165 ---- + { + wpat++; ++ bracklen++; + if (*wpat == L']') /* right bracket can appear as collating symbol */ +! { +! wpat++; +! bracklen++; +! } + in_collsym = 1; + } +*************** +*** 154,157 **** +--- 167,171 ---- + { + wpat++; ++ bracklen++; + in_collsym = 0; + } +*************** +*** 159,164 **** + { + wpat++; + if (*wpat == L']') /* right bracket can appear as equivalence class */ +! wpat++; + in_equiv = 1; + } +--- 173,182 ---- + { + wpat++; ++ bracklen++; + if (*wpat == L']') /* right bracket can appear as equivalence class */ +! { +! wpat++; +! bracklen++; +! } + in_equiv = 1; + } +*************** +*** 166,174 **** +--- 184,196 ---- + { + wpat++; ++ bracklen++; + in_equiv = 0; + } ++ else ++ bracklen++; + } + while ((wc = *wpat++) != L']'); + matlen++; /* bracket expression can only match one char */ ++ bad_bracket: + break; + } +*************** +*** 214,219 **** + size_t max; + { +! char c, *brack; +! int matlen, t, in_cclass, in_collsym, in_equiv; + + if (*pat == 0) +--- 236,241 ---- + size_t max; + { +! char c; +! int matlen, bracklen, t, in_cclass, in_collsym, in_equiv; + + if (*pat == 0) +*************** +*** 255,259 **** + case '[': + /* scan for ending `]', skipping over embedded [:...:] */ +! brack = pat; + c = *pat++; + do +--- 277,281 ---- + case '[': + /* scan for ending `]', skipping over embedded [:...:] */ +! bracklen = 1; + c = *pat++; + do +*************** +*** 261,276 **** + if (c == 0) + { +! matlen += pat - brack - 1; /* incremented below */ +! break; + } + else if (c == '\\') + { +! c = *pat++; +! if (*pat == 0) +! break; + } + else if (c == '[' && *pat == ':') /* character class */ + { + pat++; + in_cclass = 1; + } +--- 283,306 ---- + if (c == 0) + { +! pat--; /* back up to NUL */ +! matlen += bracklen; +! goto bad_bracket; + } + else if (c == '\\') + { +! /* *pat == backslash-escaped character */ +! bracklen++; +! /* If the backslash or backslash-escape ends the string, +! bail. The ++pat skips over the backslash escape */ +! if (*pat == 0 || *++pat == 0) +! { +! matlen += bracklen; +! goto bad_bracket; +! } + } + else if (c == '[' && *pat == ':') /* character class */ + { + pat++; ++ bracklen++; + in_cclass = 1; + } +*************** +*** 278,281 **** +--- 308,312 ---- + { + pat++; ++ bracklen++; + in_cclass = 0; + } +*************** +*** 283,288 **** + { + pat++; + if (*pat == ']') /* right bracket can appear as collating symbol */ +! pat++; + in_collsym = 1; + } +--- 314,323 ---- + { + pat++; ++ bracklen++; + if (*pat == ']') /* right bracket can appear as collating symbol */ +! { +! pat++; +! bracklen++; +! } + in_collsym = 1; + } +*************** +*** 290,293 **** +--- 325,329 ---- + { + pat++; ++ bracklen++; + in_collsym = 0; + } +*************** +*** 295,300 **** + { + pat++; + if (*pat == ']') /* right bracket can appear as equivalence class */ +! pat++; + in_equiv = 1; + } +--- 331,340 ---- + { + pat++; ++ bracklen++; + if (*pat == ']') /* right bracket can appear as equivalence class */ +! { +! pat++; +! bracklen++; +! } + in_equiv = 1; + } +*************** +*** 302,310 **** +--- 342,354 ---- + { + pat++; ++ bracklen++; + in_equiv = 0; + } ++ else ++ bracklen++; + } + while ((c = *pat++) != ']'); + matlen++; /* bracket expression can only match one char */ ++ bad_bracket: + break; + } +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 2 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 3 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-004.patch b/package/bash/bash-4.2-004.patch new file mode 100644 index 0000000000..fe419fa772 --- /dev/null +++ b/package/bash/bash-4.2-004.patch @@ -0,0 +1,53 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-004 + +Bug-Reported-by: Mike Frysinger +Bug-Reference-ID: <201102182106.17834.vapier@gentoo.org> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00222.html + +Bug-Description: + +When used in contexts where word splitting and quote removal were not +performed, such as pattern removal or pattern substitution, empty strings +(either literal or resulting from quoted variables that were unset or +null) were not matched correctly, resulting in failure. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/subst.c 2011-01-02 16:12:51.000000000 -0500 +--- ./subst.c 2011-02-18 22:30:13.000000000 -0500 +*************** +*** 3373,3379 **** + if (string == 0 || *string == '\0') + return (WORD_LIST *)NULL; + +! td.flags = 0; + td.word = string; + tresult = call_expand_word_internal (&td, quoted, 1, dollar_at_p, has_dollar_at); + return (tresult); +--- 3373,3379 ---- + if (string == 0 || *string == '\0') + return (WORD_LIST *)NULL; + +! td.flags = W_NOSPLIT2; /* no splitting, remove "" and '' */ + td.word = string; + tresult = call_expand_word_internal (&td, quoted, 1, dollar_at_p, has_dollar_at); + return (tresult); +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 3 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 4 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-005.patch b/package/bash/bash-4.2-005.patch new file mode 100644 index 0000000000..c53a4e9c96 --- /dev/null +++ b/package/bash/bash-4.2-005.patch @@ -0,0 +1,131 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-005 + +Bug-Reported-by: Dennis Williamson +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00147.html + +Bug-Description: + +Systems that use tzset() to set the local timezone require the TZ variable +to be in the environment. Bash must make sure the environment has been +modified with any updated value for TZ before calling tzset(). This +affects prompt string expansions and the `%T' printf conversion specification +on systems that do not allow bash to supply a replacement for getenv(3). + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/variables.h 2010-12-02 20:22:01.000000000 -0500 +--- ./variables.h 2011-02-19 19:57:12.000000000 -0500 +*************** +*** 314,317 **** +--- 314,318 ---- + extern void sort_variables __P((SHELL_VAR **)); + ++ extern int chkexport __P((char *)); + extern void maybe_make_export_env __P((void)); + extern void update_export_env_inplace __P((char *, int, char *)); +*** ../bash-4.2-patched/variables.c 2011-01-24 20:07:48.000000000 -0500 +--- ./variables.c 2011-02-19 20:04:50.000000000 -0500 +*************** +*** 3654,3657 **** +--- 3654,3673 ---- + } + ++ int ++ chkexport (name) ++ char *name; ++ { ++ SHELL_VAR *v; ++ ++ v = find_variable (name); ++ if (exported_p (v)) ++ { ++ array_needs_making = 1; ++ maybe_make_export_env (); ++ return 1; ++ } ++ return 0; ++ } ++ + void + maybe_make_export_env () +*************** +*** 4215,4219 **** + { "TEXTDOMAINDIR", sv_locale }, + +! #if defined (HAVE_TZSET) && defined (PROMPT_STRING_DECODE) + { "TZ", sv_tz }, + #endif +--- 4231,4235 ---- + { "TEXTDOMAINDIR", sv_locale }, + +! #if defined (HAVE_TZSET) + { "TZ", sv_tz }, + #endif +*************** +*** 4559,4568 **** + #endif /* HISTORY */ + +! #if defined (HAVE_TZSET) && defined (PROMPT_STRING_DECODE) + void + sv_tz (name) + char *name; + { +! tzset (); + } + #endif +--- 4575,4585 ---- + #endif /* HISTORY */ + +! #if defined (HAVE_TZSET) + void + sv_tz (name) + char *name; + { +! if (chkexport (name)) +! tzset (); + } + #endif +*** ../bash-4.2-patched/parse.y 2011-01-02 15:48:11.000000000 -0500 +--- ./parse.y 2011-02-19 20:05:00.000000000 -0500 +*************** +*** 5136,5139 **** +--- 5136,5142 ---- + /* Make the current time/date into a string. */ + (void) time (&the_time); ++ #if defined (HAVE_TZSET) ++ sv_tz ("TZ"); /* XXX -- just make sure */ ++ #endif + tm = localtime (&the_time); + +*** ../bash-4.2-patched/builtins/printf.def 2010-11-23 10:02:55.000000000 -0500 +--- ./builtins/printf.def 2011-02-19 20:05:04.000000000 -0500 +*************** +*** 466,469 **** +--- 466,472 ---- + else + secs = arg; ++ #if defined (HAVE_TZSET) ++ sv_tz ("TZ"); /* XXX -- just make sure */ ++ #endif + tm = localtime (&secs); + n = strftime (timebuf, sizeof (timebuf), timefmt, tm); +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 4 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 5 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-006.patch b/package/bash/bash-4.2-006.patch new file mode 100644 index 0000000000..ce8d9890d7 --- /dev/null +++ b/package/bash/bash-4.2-006.patch @@ -0,0 +1,46 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-006 + +Bug-Reported-by: Allan McRae +Bug-Reference-ID: <4D6D0D0B.50908@archlinux.org> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-03/msg00001.html + +Bug-Description: + +A problem with bash42-005 caused it to dump core if TZ was unset. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/variables.c 2011-02-25 12:07:41.000000000 -0500 +--- ./variables.c 2011-03-01 10:13:04.000000000 -0500 +*************** +*** 3661,3665 **** + + v = find_variable (name); +! if (exported_p (v)) + { + array_needs_making = 1; +--- 3661,3665 ---- + + v = find_variable (name); +! if (v && exported_p (v)) + { + array_needs_making = 1; +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 5 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 6 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-007.patch b/package/bash/bash-4.2-007.patch new file mode 100644 index 0000000000..6fca89662c --- /dev/null +++ b/package/bash/bash-4.2-007.patch @@ -0,0 +1,46 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-007 + +Bug-Reported-by: Matthias Klose +Bug-Reference-ID: <4D6FD2AC.1010500@debian.org> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-03/msg00015.html + +Bug-Description: + +When used in contexts where word splitting and quote removal were not +performed, such as case statement word expansion, empty strings +(either literal or resulting from quoted variables that were unset or +null) were not expanded correctly, resulting in failure. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/subst.c 2011-02-25 12:03:58.000000000 -0500 +--- ./subst.c 2011-03-03 14:08:23.000000000 -0500 +*************** +*** 4609,4614 **** +--- 4611,4617 ---- + if (ifs_firstc == 0) + #endif + word->flags |= W_NOSPLIT; ++ word->flags |= W_NOSPLIT2; + result = call_expand_word_internal (word, quoted, 0, (int *)NULL, (int *)NULL); + expand_no_split_dollar_star = 0; + +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 6 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 7 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-008.patch b/package/bash/bash-4.2-008.patch new file mode 100644 index 0000000000..91f888272c --- /dev/null +++ b/package/bash/bash-4.2-008.patch @@ -0,0 +1,74 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-008 + +Bug-Reported-by: Doug McMahon +Bug-Reference-ID: <1299441211.2535.11.camel@doug-XPS-M1330> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-03/msg00050.html + +Bug-Description: + +Bash-4.2 does not attempt to save the shell history on receipt of a +terminating signal that is handled synchronously. Unfortunately, the +`close' button on most X11 terminal emulators sends SIGHUP, which +kills the shell. + +This is a very small patch to save the history in the case that an +interactive shell receives a SIGHUP or SIGTERM while in readline and +reading a command. + +The next version of bash will do this differently. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/sig.c Tue Nov 23 08:21:22 2010 +--- ./sig.c Tue Mar 8 21:28:32 2011 +*************** +*** 47,50 **** +--- 47,51 ---- + #if defined (READLINE) + # include "bashline.h" ++ # include + #endif + +*************** +*** 63,66 **** +--- 64,68 ---- + extern int history_lines_this_session; + #endif ++ extern int no_line_editing; + + extern void initialize_siglist (); +*************** +*** 506,510 **** + #if defined (HISTORY) + /* XXX - will inhibit history file being written */ +! history_lines_this_session = 0; + #endif + terminate_immediately = 0; +--- 508,515 ---- + #if defined (HISTORY) + /* XXX - will inhibit history file being written */ +! # if defined (READLINE) +! if (interactive_shell == 0 || interactive == 0 || (sig != SIGHUP && sig != SIGTERM) || no_line_editing || (RL_ISSTATE (RL_STATE_READCMD) == 0)) +! # endif +! history_lines_this_session = 0; + #endif + terminate_immediately = 0; +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 7 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 8 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-009.patch b/package/bash/bash-4.2-009.patch new file mode 100644 index 0000000000..a4a5ded81a --- /dev/null +++ b/package/bash/bash-4.2-009.patch @@ -0,0 +1,82 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-009 + +Bug-Reported-by: +Bug-Reference-ID: <4DAAC0DB.7060606@piumalab.org> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-04/msg00075.html + +Bug-Description: + +Under certain circumstances, running `fc -l' two times in succession with a +relative history offset at the end of the history will result in an incorrect +calculation of the last history entry and a seg fault. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/builtins/fc.def 2010-05-30 18:25:38.000000000 -0400 +--- ./builtins/fc.def 2011-04-19 15:46:17.000000000 -0400 +*************** +*** 305,309 **** + + /* XXX */ +! if (saved_command_line_count > 0 && i == last_hist && hlist[last_hist] == 0) + while (last_hist >= 0 && hlist[last_hist] == 0) + last_hist--; +--- 305,309 ---- + + /* XXX */ +! if (i == last_hist && hlist[last_hist] == 0) + while (last_hist >= 0 && hlist[last_hist] == 0) + last_hist--; +*************** +*** 476,480 **** + { + int sign, n, clen, rh; +! register int i, j; + register char *s; + +--- 476,480 ---- + { + int sign, n, clen, rh; +! register int i, j, last_hist; + register char *s; + +*************** +*** 496,500 **** + calculation as if it were on. */ + rh = remember_on_history || ((subshell_environment & SUBSHELL_COMSUB) && enable_history_list); +! i -= rh + hist_last_line_added; + + /* No specification defaults to most recent command. */ +--- 496,508 ---- + calculation as if it were on. */ + rh = remember_on_history || ((subshell_environment & SUBSHELL_COMSUB) && enable_history_list); +! last_hist = i - rh - hist_last_line_added; +! +! if (i == last_hist && hlist[last_hist] == 0) +! while (last_hist >= 0 && hlist[last_hist] == 0) +! last_hist--; +! if (last_hist < 0) +! return (-1); +! +! i = last_hist; + + /* No specification defaults to most recent command. */ +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 8 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 9 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-010.patch b/package/bash/bash-4.2-010.patch new file mode 100644 index 0000000000..0970c37754 --- /dev/null +++ b/package/bash/bash-4.2-010.patch @@ -0,0 +1,61 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-010 + +Bug-Reported-by: Mike Frysinger +Bug-Reference-ID: <201104122356.20160.vapier@gentoo.org> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-04/msg00058.html + +Bug-Description: + +Bash did not correctly print/reproduce here documents attached to commands +inside compound commands such as arithmetic for loops and user-specified +subshells. This affected the execution of such commands inside a shell +function when the function definition is saved and later restored using +`.' or `eval'. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/print_cmd.c 2010-05-30 18:34:08.000000000 -0400 +--- ./print_cmd.c 2011-04-14 10:43:18.000000000 -0400 +*************** +*** 316,319 **** +--- 317,321 ---- + skip_this_indent++; + make_command_string_internal (command->value.Subshell->command); ++ PRINT_DEFERRED_HEREDOCS (""); + cprintf (" )"); + break; +*************** +*** 593,596 **** +--- 606,610 ---- + indentation += indentation_amount; + make_command_string_internal (arith_for_command->action); ++ PRINT_DEFERRED_HEREDOCS (""); + semicolon (); + indentation -= indentation_amount; +*************** +*** 654,657 **** +--- 668,672 ---- + + make_command_string_internal (group_command->command); ++ PRINT_DEFERRED_HEREDOCS (""); + + if (inside_function_def) +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 9 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 10 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-011.patch b/package/bash/bash-4.2-011.patch new file mode 100644 index 0000000000..802c1f1229 --- /dev/null +++ b/package/bash/bash-4.2-011.patch @@ -0,0 +1,46 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-011 + +Bug-Reported-by: "David Parks" +Bug-Reference-ID: <014101cc82c6$46ac1540$d4043fc0$@com> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-10/msg00031.html + +Bug-Description: + +Overwriting a value in an associative array causes the memory allocated to +store the key on the second and subsequent assignments to leak. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/assoc.c 2009-08-05 20:19:40.000000000 -0400 +--- ./assoc.c 2011-10-04 20:23:07.000000000 -0400 +*************** +*** 78,81 **** +--- 78,86 ---- + if (b == 0) + return -1; ++ /* If we are overwriting an existing element's value, we're not going to ++ use the key. Nothing in the array assignment code path frees the key ++ string, so we can free it here to avoid a memory leak. */ ++ if (b->key != key) ++ free (key); + FREE (b->data); + b->data = value ? savestring (value) : (char *)0; +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 10 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 11 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-012.patch b/package/bash/bash-4.2-012.patch new file mode 100644 index 0000000000..9a1c49c714 --- /dev/null +++ b/package/bash/bash-4.2-012.patch @@ -0,0 +1,151 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-012 + +Bug-Reported-by: Rui Santos +Bug-Reference-ID: <4E04C6D0.2020507@grupopie.com> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-06/msg00079.html + +Bug-Description: + +When calling the parser to recursively parse a command substitution within +an arithmetic expansion, the shell overwrote the saved shell input line and +associated state, resulting in a garbled command. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/parse.y 2011-02-26 19:19:05.000000000 -0500 +--- ./parse.y 2011-06-24 20:08:22.000000000 -0400 +*************** +*** 3843,3846 **** +--- 3849,3853 ---- + { + sh_parser_state_t ps; ++ sh_input_line_state_t ls; + int orig_ind, nc, sflags; + char *ret, *s, *ep, *ostring; +*************** +*** 3850,3857 **** +--- 3857,3866 ---- + ostring = string; + ++ /*itrace("xparse_dolparen: size = %d shell_input_line = `%s'", shell_input_line_size, shell_input_line);*/ + sflags = SEVAL_NONINT|SEVAL_NOHIST|SEVAL_NOFREE; + if (flags & SX_NOLONGJMP) + sflags |= SEVAL_NOLONGJMP; + save_parser_state (&ps); ++ save_input_line_state (&ls); + + /*(*/ +*************** +*** 3862,3865 **** +--- 3871,3876 ---- + restore_parser_state (&ps); + reset_parser (); ++ /* reset_parser clears shell_input_line and associated variables */ ++ restore_input_line_state (&ls); + if (interactive) + token_to_read = 0; +*************** +*** 5909,5912 **** +--- 5920,5929 ---- + ps->echo_input_at_read = echo_input_at_read; + ++ ps->token = token; ++ ps->token_buffer_size = token_buffer_size; ++ /* Force reallocation on next call to read_token_word */ ++ token = 0; ++ token_buffer_size = 0; ++ + return (ps); + } +*************** +*** 5950,5953 **** +--- 5967,6006 ---- + expand_aliases = ps->expand_aliases; + echo_input_at_read = ps->echo_input_at_read; ++ ++ FREE (token); ++ token = ps->token; ++ token_buffer_size = ps->token_buffer_size; ++ } ++ ++ sh_input_line_state_t * ++ save_input_line_state (ls) ++ sh_input_line_state_t *ls; ++ { ++ if (ls == 0) ++ ls = (sh_input_line_state_t *)xmalloc (sizeof (sh_input_line_state_t)); ++ if (ls == 0) ++ return ((sh_input_line_state_t *)NULL); ++ ++ ls->input_line = shell_input_line; ++ ls->input_line_size = shell_input_line_size; ++ ls->input_line_len = shell_input_line_len; ++ ls->input_line_index = shell_input_line_index; ++ ++ /* force reallocation */ ++ shell_input_line = 0; ++ shell_input_line_size = shell_input_line_len = shell_input_line_index = 0; ++ } ++ ++ void ++ restore_input_line_state (ls) ++ sh_input_line_state_t *ls; ++ { ++ FREE (shell_input_line); ++ shell_input_line = ls->input_line; ++ shell_input_line_size = ls->input_line_size; ++ shell_input_line_len = ls->input_line_len; ++ shell_input_line_index = ls->input_line_index; ++ ++ set_line_mbstate (); + } + +*** ../bash-4.2-patched/shell.h 2011-01-06 22:16:55.000000000 -0500 +--- ./shell.h 2011-06-24 19:12:25.000000000 -0400 +*************** +*** 137,140 **** +--- 139,145 ---- + int *token_state; + ++ char *token; ++ int token_buffer_size; ++ + /* input line state -- line number saved elsewhere */ + int input_line_terminator; +*************** +*** 167,171 **** +--- 172,186 ---- + } sh_parser_state_t; + ++ typedef struct _sh_input_line_state_t { ++ char *input_line; ++ int input_line_index; ++ int input_line_size; ++ int input_line_len; ++ } sh_input_line_state_t; ++ + /* Let's try declaring these here. */ + extern sh_parser_state_t *save_parser_state __P((sh_parser_state_t *)); + extern void restore_parser_state __P((sh_parser_state_t *)); ++ ++ extern sh_input_line_state_t *save_input_line_state __P((sh_input_line_state_t *)); ++ extern void restore_input_line_state __P((sh_input_line_state_t *)); +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 11 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 12 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-013.patch b/package/bash/bash-4.2-013.patch new file mode 100644 index 0000000000..06840a356c --- /dev/null +++ b/package/bash/bash-4.2-013.patch @@ -0,0 +1,52 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-013 + +Bug-Reported-by: Marten Wikstrom +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-05/msg00049.html + +Bug-Description: + +An off-by-one error caused the shell to skip over CTLNUL characters, +which are used internally to mark quoted null strings. The effect +was to have stray 0x7f characters left after expanding words like +""""""""aa. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/subst.c 2011-03-06 14:11:11.000000000 -0500 +--- ./subst.c 2011-05-11 11:23:33.000000000 -0400 +*************** +*** 3707,3711 **** + } + else if (string[i] == CTLNUL) +! i++; + + prev_i = i; +--- 3710,3717 ---- + } + else if (string[i] == CTLNUL) +! { +! i++; +! continue; +! } + + prev_i = i; +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 12 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 13 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-014.patch b/package/bash/bash-4.2-014.patch new file mode 100644 index 0000000000..d6652eb5a4 --- /dev/null +++ b/package/bash/bash-4.2-014.patch @@ -0,0 +1,47 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-014 + +Bug-Reported-by: Shawn Bohrer +Bug-Reference-ID: <20110504152320.6E8F28130527@dev1.rgmadvisors.com> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-05/msg00018.html + +Bug-Description: + +The regular expression matching operator did not correctly match +expressions with an embedded ^A. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/pathexp.c 2010-08-13 23:21:57.000000000 -0400 +--- ./pathexp.c 2011-05-05 16:40:58.000000000 -0400 +*************** +*** 197,201 **** + if ((qflags & QGLOB_FILENAME) && pathname[i+1] == '/') + continue; +! if ((qflags & QGLOB_REGEXP) && ere_char (pathname[i+1]) == 0) + continue; + temp[j++] = '\\'; +--- 197,201 ---- + if ((qflags & QGLOB_FILENAME) && pathname[i+1] == '/') + continue; +! if (pathname[i+1] != CTLESC && (qflags & QGLOB_REGEXP) && ere_char (pathname[i+1]) == 0) + continue; + temp[j++] = '\\'; +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 13 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 14 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-015.patch b/package/bash/bash-4.2-015.patch new file mode 100644 index 0000000000..5bcca34cea --- /dev/null +++ b/package/bash/bash-4.2-015.patch @@ -0,0 +1,81 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-015 + +Bug-Reported-by: +Bug-Reference-ID: <728_1312188080_4E3666B0_728_118711_1_3B5D3E0F95CC5C478D6500CDCE8B691F7AAAA4AA3D@PUEXCB2B.nanterre.francetelecom.fr> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-08/msg00000.html + +Bug-Description: + +When in a context where arithmetic evaluation is not taking place, the +evaluator should not check for division by 0. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/expr.c 2010-12-21 11:12:13.000000000 -0500 +--- ./expr.c 2011-08-02 20:58:28.000000000 -0400 +*************** +*** 477,480 **** +--- 481,492 ---- + if (special) + { ++ if ((op == DIV || op == MOD) && value == 0) ++ { ++ if (noeval == 0) ++ evalerror (_("division by 0")); ++ else ++ value = 1; ++ } ++ + switch (op) + { +*************** +*** 483,493 **** + break; + case DIV: +- if (value == 0) +- evalerror (_("division by 0")); + lvalue /= value; + break; + case MOD: +- if (value == 0) +- evalerror (_("division by 0")); + lvalue %= value; + break; +--- 495,501 ---- +*************** +*** 805,809 **** + + if (((op == DIV) || (op == MOD)) && (val2 == 0)) +! evalerror (_("division by 0")); + + if (op == MUL) +--- 813,822 ---- + + if (((op == DIV) || (op == MOD)) && (val2 == 0)) +! { +! if (noeval == 0) +! evalerror (_("division by 0")); +! else +! val2 = 1; +! } + + if (op == MUL) +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 14 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 15 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-016.patch b/package/bash/bash-4.2-016.patch new file mode 100644 index 0000000000..04f9432d0c --- /dev/null +++ b/package/bash/bash-4.2-016.patch @@ -0,0 +1,46 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-016 + +Bug-Reported-by: Martin von Gagern +Bug-Reference-ID: <4E43AD9E.8060501@gmx.net> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-08/msg00141.html + +Bug-Description: + +Bash should not check for mail while executing the `eval' builtin. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/parse.y Fri Feb 25 12:07:41 2011 +--- ./parse.y Thu Aug 11 19:02:26 2011 +*************** +*** 2500,2504 **** + is the mail alarm reset; nothing takes place in check_mail () + except the checking of mail. Please don't change this. */ +! if (prompt_is_ps1 && time_to_check_mail ()) + { + check_mail (); +--- 2498,2502 ---- + is the mail alarm reset; nothing takes place in check_mail () + except the checking of mail. Please don't change this. */ +! if (prompt_is_ps1 && parse_and_execute_level == 0 && time_to_check_mail ()) + { + check_mail (); +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 15 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 16 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-017.patch b/package/bash/bash-4.2-017.patch new file mode 100644 index 0000000000..fdecffa22f --- /dev/null +++ b/package/bash/bash-4.2-017.patch @@ -0,0 +1,47 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-017 + +Bug-Reported-by: Curtis Doty +Bug-Reference-ID: <20110621035324.A4F70849F59@mx1.iParadigms.net> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-06/msg00053.html + +Bug-Description: + +Using `read -a foo' where foo was an already-declared associative array +caused the shell to die with a segmentation fault. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/builtins/read.def 2011-01-04 11:43:36.000000000 -0500 +--- ./builtins/read.def 2011-06-21 10:31:02.000000000 -0400 +*************** +*** 643,646 **** +--- 642,651 ---- + return EXECUTION_FAILURE; /* readonly or noassign */ + } ++ if (assoc_p (var)) ++ { ++ builtin_error (_("%s: cannot convert associative to indexed array"), arrayname); ++ xfree (input_string); ++ return EXECUTION_FAILURE; /* existing associative array */ ++ } + array_flush (array_cell (var)); + +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 16 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 17 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-018.patch b/package/bash/bash-4.2-018.patch new file mode 100644 index 0000000000..c96b901f3e --- /dev/null +++ b/package/bash/bash-4.2-018.patch @@ -0,0 +1,74 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-018 + +Bug-Reported-by: Thomas Cort +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-06/msg00110.html + +Bug-Description: + +Bash fails to compile unless JOB_CONTROL is defined. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/execute_cmd.c 2011-02-09 17:32:25.000000000 -0500 +--- ./execute_cmd.c 2011-11-06 15:12:48.000000000 -0500 +*************** +*** 2197,2200 **** +--- 2315,2319 ---- + cmd->flags |= CMD_IGNORE_RETURN; + ++ #if defined (JOB_CONTROL) + lastpipe_flag = 0; + begin_unwind_frame ("lastpipe-exec"); +*************** +*** 2216,2228 **** + add_unwind_protect (lastpipe_cleanup, lastpipe_jid); + } +! cmd->flags |= CMD_LASTPIPE; + } + if (prev >= 0) + add_unwind_protect (close, prev); + + exec_result = execute_command_internal (cmd, asynchronous, prev, pipe_out, fds_to_close); + + if (lstdin > 0) + restore_stdin (lstdin); + + if (prev >= 0) +--- 2335,2351 ---- + add_unwind_protect (lastpipe_cleanup, lastpipe_jid); + } +! if (cmd) +! cmd->flags |= CMD_LASTPIPE; + } + if (prev >= 0) + add_unwind_protect (close, prev); ++ #endif + + exec_result = execute_command_internal (cmd, asynchronous, prev, pipe_out, fds_to_close); + ++ #if defined (JOB_CONTROL) + if (lstdin > 0) + restore_stdin (lstdin); ++ #endif + + if (prev >= 0) +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 17 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 18 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-019.patch b/package/bash/bash-4.2-019.patch new file mode 100644 index 0000000000..01603a933a --- /dev/null +++ b/package/bash/bash-4.2-019.patch @@ -0,0 +1,47 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-019 + +Bug-Reported-by: Diego Augusto Molina +Bug-Reference-ID: +Bug-Reference-URL: lists.gnu.org/archive/html/bug-bash/2011-09/msg00047.html + +Bug-Description: + +Using `declare' with attributes and an invalid array variable name or +assignment reference resulted in a segmentation fault instead of a +declaration error. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/builtins/declare.def 2010-05-30 18:25:21.000000000 -0400 +--- ./builtins/declare.def 2011-09-15 15:20:20.000000000 -0400 +*************** +*** 514,517 **** +--- 514,522 ---- + var = assign_array_element (name, value, 0); /* XXX - not aflags */ + *subscript_start = '\0'; ++ if (var == 0) /* some kind of assignment error */ ++ { ++ assign_error++; ++ NEXT_VARIABLE (); ++ } + } + else if (simple_array_assign) +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 18 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 19 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-020.patch b/package/bash/bash-4.2-020.patch new file mode 100644 index 0000000000..77e31dfa1c --- /dev/null +++ b/package/bash/bash-4.2-020.patch @@ -0,0 +1,60 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-020 + +Bug-Reported-by: Vincent Sheffer +Bug-Reference-ID: +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2011-08/msg00000.html + +Bug-Description: + +The shared object helper script needs to be updated for Mac OS X 10.7 +(Lion, darwin11). + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/support/shobj-conf 2009-10-28 09:20:21.000000000 -0400 +--- ./support/shobj-conf 2011-08-27 13:25:23.000000000 -0400 +*************** +*** 158,162 **** + + # Darwin/MacOS X +! darwin[89]*|darwin10*) + SHOBJ_STATUS=supported + SHLIB_STATUS=supported +--- 172,176 ---- + + # Darwin/MacOS X +! darwin[89]*|darwin1[012]*) + SHOBJ_STATUS=supported + SHLIB_STATUS=supported +*************** +*** 187,191 **** + + case "${host_os}" in +! darwin[789]*|darwin10*) SHOBJ_LDFLAGS='' + SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' + ;; +--- 201,205 ---- + + case "${host_os}" in +! darwin[789]*|darwin1[012]*) SHOBJ_LDFLAGS='' + SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' + ;; +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 19 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 20 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-021.patch b/package/bash/bash-4.2-021.patch new file mode 100644 index 0000000000..82e00fd3be --- /dev/null +++ b/package/bash/bash-4.2-021.patch @@ -0,0 +1,61 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-021 + +Bug-Reported-by: Dan Douglas +Bug-Reference-ID: <4585554.nZWb4q7YoZ@smorgbox> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-12/msg00084.html + +Bug-Description: + +Using `read -N' to assign values to an array can result in NUL values being +assigned to some array elements. These values cause seg faults when referenced +later. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/builtins/read.def 2011-11-21 18:03:38.000000000 -0500 +--- ./builtins/read.def 2011-12-19 19:52:12.000000000 -0500 +*************** +*** 738,742 **** + } + else +! var = bind_read_variable (varname, t); + } + else +--- 775,779 ---- + } + else +! var = bind_read_variable (varname, t ? t : ""); + } + else +*************** +*** 799,803 **** + } + else +! var = bind_read_variable (list->word->word, input_string); + + if (var) +--- 836,840 ---- + } + else +! var = bind_read_variable (list->word->word, input_string ? input_string : ""); + + if (var) +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 20 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 21 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-022.patch b/package/bash/bash-4.2-022.patch new file mode 100644 index 0000000000..cb0ac3f1c1 --- /dev/null +++ b/package/bash/bash-4.2-022.patch @@ -0,0 +1,61 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-022 + +Bug-Reported-by: Gregory Margo +Bug-Reference-ID: <20110727174529.GA3333@pacbell.net> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-07/msg00102.html + +Bug-Description: + +The return value from lseek is `off_t'. This can cause corrupted return +values when the file offset is greater than 2**31 - 1. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/lib/sh/zread.c Mon Mar 2 08:54:45 2009 +--- ./lib/sh/zread.c Thu Jul 28 18:16:53 2011 +*************** +*** 161,166 **** + int fd; + { +! off_t off; +! int r; + + off = lused - lind; +--- 161,165 ---- + int fd; + { +! off_t off, r; + + off = lused - lind; +*************** +*** 169,173 **** + r = lseek (fd, -off, SEEK_CUR); + +! if (r >= 0) + lused = lind = 0; + } +--- 168,172 ---- + r = lseek (fd, -off, SEEK_CUR); + +! if (r != -1) + lused = lind = 0; + } +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 21 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 22 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-023.patch b/package/bash/bash-4.2-023.patch new file mode 100644 index 0000000000..8c5addeb01 --- /dev/null +++ b/package/bash/bash-4.2-023.patch @@ -0,0 +1,62 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-023 + +Bug-Reported-by: Ewan Mellor +Bug-Reference-ID: <6005BE083BF501439A84DC3523BAC82DC4B964FD12@LONPMAILBOX01.citrite.net> +Bug-Reference-URL: + +Bug-Description: + +Under some circumstances, an exit trap triggered by a bad substitution +error when errexit is enabled will cause the shell to exit with an +incorrect exit status (0). + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/subst.c 2011-11-21 12:04:38.000000000 -0500 +--- ./subst.c 2012-02-08 13:36:28.000000000 -0500 +*************** +*** 7275,7278 **** +--- 7281,7285 ---- + case '\0': + bad_substitution: ++ last_command_exit_value = EXECUTION_FAILURE; + report_error (_("%s: bad substitution"), string ? string : "??"); + FREE (value); +*** ../bash-4.2-patched/error.c 2009-08-21 22:31:31.000000000 -0400 +--- ./error.c 2012-02-25 15:54:40.000000000 -0500 +*************** +*** 201,205 **** + va_end (args); + if (exit_immediately_on_error) +! exit_shell (1); + } + +--- 201,209 ---- + va_end (args); + if (exit_immediately_on_error) +! { +! if (last_command_exit_value == 0) +! last_command_exit_value = 1; +! exit_shell (last_command_exit_value); +! } + } + +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 22 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 23 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-024.patch b/package/bash/bash-4.2-024.patch new file mode 100644 index 0000000000..6ee6d8fbeb --- /dev/null +++ b/package/bash/bash-4.2-024.patch @@ -0,0 +1,45 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-024 + +Bug-Reported-by: Jim Avera +Bug-Reference-ID: <4F29E07A.80405@yahoo.com> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-02/msg00001.html + +Bug-Description: + +When `printf -v' is used to set an array element, the format string contains +`%b', and the corresponding argument is the empty string, the buffer used +to store the value to be assigned can be NULL, which results in NUL being +assigned to the array element. This causes a seg fault when it's used later. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/builtins/printf.def 2011-02-25 12:07:41.000000000 -0500 +--- ./builtins/printf.def 2012-02-02 08:37:12.000000000 -0500 +*************** +*** 256,259 **** +--- 257,262 ---- + { + vflag = 1; ++ if (vbsize == 0) ++ vbuf = xmalloc (vbsize = 16); + vblen = 0; + if (vbuf) +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 23 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 24 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-025.patch b/package/bash/bash-4.2-025.patch new file mode 100644 index 0000000000..b57ee7d55c --- /dev/null +++ b/package/bash/bash-4.2-025.patch @@ -0,0 +1,143 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-025 + +Bug-Reported-by: Bill Gradwohl +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/help-bash/2012-03/msg00078.html + +Bug-Description: + +When used in a shell function, `declare -g -a array=(compound assignment)' +creates a local variable instead of a global one. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/command.h 2010-08-02 19:36:51.000000000 -0400 +--- ./command.h 2012-04-01 12:38:35.000000000 -0400 +*************** +*** 98,101 **** +--- 98,102 ---- + #define W_ASSIGNASSOC 0x400000 /* word looks like associative array assignment */ + #define W_ARRAYIND 0x800000 /* word is an array index being expanded */ ++ #define W_ASSNGLOBAL 0x1000000 /* word is a global assignment to declare (declare/typeset -g) */ + + /* Possible values for subshell_environment */ +*** ../bash-4.2-patched/execute_cmd.c 2011-11-21 18:03:41.000000000 -0500 +--- ./execute_cmd.c 2012-04-01 12:42:03.000000000 -0400 +*************** +*** 3581,3585 **** + WORD_LIST *w; + struct builtin *b; +! int assoc; + + if (words == 0) +--- 3581,3585 ---- + WORD_LIST *w; + struct builtin *b; +! int assoc, global; + + if (words == 0) +*************** +*** 3587,3591 **** + + b = 0; +! assoc = 0; + + for (w = words; w; w = w->next) +--- 3587,3591 ---- + + b = 0; +! assoc = global = 0; + + for (w = words; w; w = w->next) +*************** +*** 3604,3607 **** +--- 3604,3609 ---- + if (assoc) + w->word->flags |= W_ASSIGNASSOC; ++ if (global) ++ w->word->flags |= W_ASSNGLOBAL; + #endif + } +*************** +*** 3609,3613 **** + /* Note that we saw an associative array option to a builtin that takes + assignment statements. This is a bit of a kludge. */ +! else if (w->word->word[0] == '-' && strchr (w->word->word, 'A')) + { + if (b == 0) +--- 3611,3618 ---- + /* Note that we saw an associative array option to a builtin that takes + assignment statements. This is a bit of a kludge. */ +! else if (w->word->word[0] == '-' && (strchr (w->word->word+1, 'A') || strchr (w->word->word+1, 'g'))) +! #else +! else if (w->word->word[0] == '-' && strchr (w->word->word+1, 'g')) +! #endif + { + if (b == 0) +*************** +*** 3619,3626 **** + words->word->flags |= W_ASSNBLTIN; + } +! if (words->word->flags & W_ASSNBLTIN) + assoc = 1; + } +- #endif + } + +--- 3624,3632 ---- + words->word->flags |= W_ASSNBLTIN; + } +! if ((words->word->flags & W_ASSNBLTIN) && strchr (w->word->word+1, 'A')) + assoc = 1; ++ if ((words->word->flags & W_ASSNBLTIN) && strchr (w->word->word+1, 'g')) ++ global = 1; + } + } + +*** ../bash-4.2-patched/subst.c 2012-03-11 17:35:13.000000000 -0400 +--- ./subst.c 2012-04-01 12:38:35.000000000 -0400 +*************** +*** 367,370 **** +--- 367,375 ---- + fprintf (stderr, "W_ASSNBLTIN%s", f ? "|" : ""); + } ++ if (f & W_ASSNGLOBAL) ++ { ++ f &= ~W_ASSNGLOBAL; ++ fprintf (stderr, "W_ASSNGLOBAL%s", f ? "|" : ""); ++ } + if (f & W_COMPASSIGN) + { +*************** +*** 2804,2808 **** + else if (assign_list) + { +! if (word->flags & W_ASSIGNARG) + aflags |= ASS_MKLOCAL; + if (word->flags & W_ASSIGNASSOC) +--- 2809,2813 ---- + else if (assign_list) + { +! if ((word->flags & W_ASSIGNARG) && (word->flags & W_ASSNGLOBAL) == 0) + aflags |= ASS_MKLOCAL; + if (word->flags & W_ASSIGNASSOC) + +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 24 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 25 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-026.patch b/package/bash/bash-4.2-026.patch new file mode 100644 index 0000000000..06f8bb7aa2 --- /dev/null +++ b/package/bash/bash-4.2-026.patch @@ -0,0 +1,58 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-026 + +Bug-Reported-by: Greg Wooledge +Bug-Reference-ID: <20120425180443.GO22241@eeg.ccf.org> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-04/msg00172.html + +Bug-Description: + +The `lastpipe' option does not behave correctly on machines where the +open file limit is less than 256. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/execute_cmd.c 2011-11-21 12:04:47.000000000 -0500 +--- ./execute_cmd.c 2012-04-26 11:09:30.000000000 -0400 +*************** +*** 2206,2210 **** + if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0) + { +! lstdin = move_to_high_fd (0, 0, 255); + if (lstdin > 0) + { +--- 2325,2329 ---- + if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0) + { +! lstdin = move_to_high_fd (0, 1, -1); + if (lstdin > 0) + { +*************** +*** 2252,2256 **** +--- 2371,2377 ---- + } + ++ #if defined (JOB_CONTROL) + discard_unwind_frame ("lastpipe-exec"); ++ #endif + + return (exec_result); + +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 25 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 26 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-027.patch b/package/bash/bash-4.2-027.patch new file mode 100644 index 0000000000..381ffe124f --- /dev/null +++ b/package/bash/bash-4.2-027.patch @@ -0,0 +1,47 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-027 + +Bug-Reported-by: Mike Frysinger +Bug-Reference-ID: <201204211243.30163.vapier@gentoo.org> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-04/msg00134.html + +Bug-Description: + +When the `extglob' shell option is enabled, pattern substitution does not +work correctly in the presence of multibyte characters. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/subst.c 2012-03-11 17:52:57.000000000 -0400 +--- ./subst.c 2012-04-22 16:19:10.000000000 -0400 +*************** +*** 4167,4171 **** + #if defined (EXTENDED_GLOB) + if (extended_glob) +! simple |= (wpat[1] != L'(' || (wpat[0] != L'*' && wpat[0] != L'?' && wpat[0] != L'+' && wpat[0] != L'!' && wpat[0] != L'@')); /*)*/ + #endif + +--- 4167,4171 ---- + #if defined (EXTENDED_GLOB) + if (extended_glob) +! simple &= (wpat[1] != L'(' || (wpat[0] != L'*' && wpat[0] != L'?' && wpat[0] != L'+' && wpat[0] != L'!' && wpat[0] != L'@')); /*)*/ + #endif + +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 26 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 27 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-028.patch b/package/bash/bash-4.2-028.patch new file mode 100644 index 0000000000..28dfc71d59 --- /dev/null +++ b/package/bash/bash-4.2-028.patch @@ -0,0 +1,52 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-028 + +Bug-Reported-by: Mark Edgar +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-03/msg00109.html + +Bug-Description: + +When using a word expansion for which the right hand side is evaluated, +certain expansions of quoted null strings include spurious ^? characters. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/subst.c 2012-03-11 17:35:13.000000000 -0400 +--- ./subst.c 2012-03-20 19:30:13.000000000 -0400 +*************** +*** 5810,5813 **** +--- 5810,5823 ---- + if (qdollaratp && ((hasdol && quoted) || l->next)) + *qdollaratp = 1; ++ /* If we have a quoted null result (QUOTED_NULL(temp)) and the word is ++ a quoted null (l->next == 0 && QUOTED_NULL(l->word->word)), the ++ flags indicate it (l->word->flags & W_HASQUOTEDNULL), and the ++ expansion is quoted (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) ++ (which is more paranoia than anything else), we need to return the ++ quoted null string and set the flags to indicate it. */ ++ if (l->next == 0 && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && QUOTED_NULL(temp) && QUOTED_NULL(l->word->word) && (l->word->flags & W_HASQUOTEDNULL)) ++ { ++ w->flags |= W_HASQUOTEDNULL; ++ } + dispose_words (l); + } + +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 27 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 28 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-029.patch b/package/bash/bash-4.2-029.patch new file mode 100644 index 0000000000..31322f2577 --- /dev/null +++ b/package/bash/bash-4.2-029.patch @@ -0,0 +1,524 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-029 + +Bug-Reported-by: "Michael Kalisz" +Bug-Reference-ID: <50241.78.69.11.112.1298585641.squirrel@kalisz.homelinux.net> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00274.html + +Bug-Description: + +Bash-4.2 tries to leave completed directory names as the user typed them, +without expanding them to a full pathname. One effect of this is that +shell variables used in pathnames being completed (e.g., $HOME) are left +unchanged, but the `$' is quoted by readline because it is a special +character to the shell. + +This patch introduces two things: + +1. A new shell option, `direxpand', which, if set, attempts to emulate the + bash-4.1 behavior of expanding words to full pathnames during + completion; +2. A set of heuristics that reduce the number of times special characters + such as `$' are quoted when the directory name is not expanded. + +Patch (apply with `patch -p0'): + +diff -NrC 2 ../bash-4.2-patched/bashline.c ./bashline.c +*** ../bash-4.2-patched/bashline.c 2011-01-16 15:32:47.000000000 -0500 +--- ./bashline.c 2012-05-07 16:27:18.000000000 -0400 +*************** +*** 122,125 **** +--- 122,128 ---- + static int bash_push_line __P((void)); + ++ static rl_icppfunc_t *save_directory_hook __P((void)); ++ static void reset_directory_hook __P((rl_icppfunc_t *)); ++ + static void cleanup_expansion_error __P((void)); + static void maybe_make_readline_line __P((char *)); +*************** +*** 244,251 **** +--- 247,261 ---- + int dircomplete_spelling = 0; + ++ /* Expand directory names during word/filename completion. */ ++ int dircomplete_expand = 0; ++ int dircomplete_expand_relpath = 0; ++ + static char *bash_completer_word_break_characters = " \t\n\"'@><=;|&(:"; + static char *bash_nohostname_word_break_characters = " \t\n\"'><=;|&(:"; + /* )) */ + ++ static const char *default_filename_quote_characters = " \t\n\\\"'@<>=;|&()#$`?*[!:{~"; /*}*/ ++ static char *custom_filename_quote_characters = 0; ++ + static rl_hook_func_t *old_rl_startup_hook = (rl_hook_func_t *)NULL; + +*************** +*** 502,506 **** + /* Tell the completer that we might want to follow symbolic links or + do other expansion on directory names. */ +! rl_directory_rewrite_hook = bash_directory_completion_hook; + + rl_filename_rewrite_hook = bash_filename_rewrite_hook; +--- 512,516 ---- + /* Tell the completer that we might want to follow symbolic links or + do other expansion on directory names. */ +! set_directory_hook (); + + rl_filename_rewrite_hook = bash_filename_rewrite_hook; +*************** +*** 530,534 **** + + /* characters that need to be quoted when appearing in filenames. */ +! rl_filename_quote_characters = " \t\n\\\"'@<>=;|&()#$`?*[!:{~"; /*}*/ + + rl_filename_quoting_function = bash_quote_filename; +--- 540,544 ---- + + /* characters that need to be quoted when appearing in filenames. */ +! rl_filename_quote_characters = default_filename_quote_characters; + + rl_filename_quoting_function = bash_quote_filename; +*************** +*** 565,570 **** + rl_attempted_completion_function = attempt_shell_completion; + rl_completion_entry_function = NULL; +- rl_directory_rewrite_hook = bash_directory_completion_hook; + rl_ignore_some_completions_function = filename_completion_ignore; + } + +--- 575,582 ---- + rl_attempted_completion_function = attempt_shell_completion; + rl_completion_entry_function = NULL; + rl_ignore_some_completions_function = filename_completion_ignore; ++ rl_filename_quote_characters = default_filename_quote_characters; ++ ++ set_directory_hook (); + } + +*************** +*** 1280,1283 **** +--- 1292,1298 ---- + rl_ignore_some_completions_function = filename_completion_ignore; + ++ rl_filename_quote_characters = default_filename_quote_characters; ++ set_directory_hook (); ++ + /* Determine if this could be a command word. It is if it appears at + the start of the line (ignoring preceding whitespace), or if it +*************** +*** 1592,1595 **** +--- 1607,1616 ---- + else + { ++ if (dircomplete_expand && dot_or_dotdot (filename_hint)) ++ { ++ dircomplete_expand = 0; ++ set_directory_hook (); ++ dircomplete_expand = 1; ++ } + mapping_over = 4; + goto inner; +*************** +*** 1792,1795 **** +--- 1813,1819 ---- + inner: + val = rl_filename_completion_function (filename_hint, istate); ++ if (mapping_over == 4 && dircomplete_expand) ++ set_directory_hook (); ++ + istate = 1; + +*************** +*** 2694,2697 **** +--- 2718,2767 ---- + } + ++ /* Functions to save and restore the appropriate directory hook */ ++ /* This is not static so the shopt code can call it */ ++ void ++ set_directory_hook () ++ { ++ if (dircomplete_expand) ++ { ++ rl_directory_completion_hook = bash_directory_completion_hook; ++ rl_directory_rewrite_hook = (rl_icppfunc_t *)0; ++ } ++ else ++ { ++ rl_directory_rewrite_hook = bash_directory_completion_hook; ++ rl_directory_completion_hook = (rl_icppfunc_t *)0; ++ } ++ } ++ ++ static rl_icppfunc_t * ++ save_directory_hook () ++ { ++ rl_icppfunc_t *ret; ++ ++ if (dircomplete_expand) ++ { ++ ret = rl_directory_completion_hook; ++ rl_directory_completion_hook = (rl_icppfunc_t *)NULL; ++ } ++ else ++ { ++ ret = rl_directory_rewrite_hook; ++ rl_directory_rewrite_hook = (rl_icppfunc_t *)NULL; ++ } ++ ++ return ret; ++ } ++ ++ static void ++ restore_directory_hook (hookf) ++ rl_icppfunc_t *hookf; ++ { ++ if (dircomplete_expand) ++ rl_directory_completion_hook = hookf; ++ else ++ rl_directory_rewrite_hook = hookf; ++ } ++ + /* Handle symbolic link references and other directory name + expansions while hacking completion. This should return 1 if it modifies +*************** +*** 2703,2720 **** + { + char *local_dirname, *new_dirname, *t; +! int return_value, should_expand_dirname; + WORD_LIST *wl; + struct stat sb; + +! return_value = should_expand_dirname = 0; + local_dirname = *dirname; + +! if (mbschr (local_dirname, '$')) +! should_expand_dirname = 1; + else + { + t = mbschr (local_dirname, '`'); + if (t && unclosed_pair (local_dirname, strlen (local_dirname), "`") == 0) +! should_expand_dirname = 1; + } + +--- 2773,2801 ---- + { + char *local_dirname, *new_dirname, *t; +! int return_value, should_expand_dirname, nextch, closer; + WORD_LIST *wl; + struct stat sb; + +! return_value = should_expand_dirname = nextch = closer = 0; + local_dirname = *dirname; + +! if (t = mbschr (local_dirname, '$')) +! { +! should_expand_dirname = '$'; +! nextch = t[1]; +! /* Deliberately does not handle the deprecated $[...] arithmetic +! expansion syntax */ +! if (nextch == '(') +! closer = ')'; +! else if (nextch == '{') +! closer = '}'; +! else +! nextch = 0; +! } + else + { + t = mbschr (local_dirname, '`'); + if (t && unclosed_pair (local_dirname, strlen (local_dirname), "`") == 0) +! should_expand_dirname = '`'; + } + +*************** +*** 2740,2743 **** +--- 2821,2841 ---- + dispose_words (wl); + local_dirname = *dirname; ++ /* XXX - change rl_filename_quote_characters here based on ++ should_expand_dirname/nextch/closer. This is the only place ++ custom_filename_quote_characters is modified. */ ++ if (rl_filename_quote_characters && *rl_filename_quote_characters) ++ { ++ int i, j, c; ++ i = strlen (default_filename_quote_characters); ++ custom_filename_quote_characters = xrealloc (custom_filename_quote_characters, i+1); ++ for (i = j = 0; c = default_filename_quote_characters[i]; i++) ++ { ++ if (c == should_expand_dirname || c == nextch || c == closer) ++ continue; ++ custom_filename_quote_characters[j++] = c; ++ } ++ custom_filename_quote_characters[j] = '\0'; ++ rl_filename_quote_characters = custom_filename_quote_characters; ++ } + } + else +*************** +*** 2759,2762 **** +--- 2857,2871 ---- + } + ++ /* no_symbolic_links == 0 -> use (default) logical view of the file system. ++ local_dirname[0] == '.' && local_dirname[1] == '/' means files in the ++ current directory (./). ++ local_dirname[0] == '.' && local_dirname[1] == 0 means relative pathnames ++ in the current directory (e.g., lib/sh). ++ XXX - should we do spelling correction on these? */ ++ ++ /* This is test as it was in bash-4.2: skip relative pathnames in current ++ directory. Change test to ++ (local_dirname[0] != '.' || (local_dirname[1] && local_dirname[1] != '/')) ++ if we want to skip paths beginning with ./ also. */ + if (no_symbolic_links == 0 && (local_dirname[0] != '.' || local_dirname[1])) + { +*************** +*** 2764,2767 **** +--- 2873,2885 ---- + int len1, len2; + ++ /* If we have a relative path ++ (local_dirname[0] != '/' && local_dirname[0] != '.') ++ that is canonical after appending it to the current directory, then ++ temp1 = temp2+'/' ++ That is, ++ strcmp (temp1, temp2) == 0 ++ after adding a slash to temp2 below. It should be safe to not ++ change those. ++ */ + t = get_working_directory ("symlink-hook"); + temp1 = make_absolute (local_dirname, t); +*************** +*** 2798,2802 **** + } + } +! return_value |= STREQ (local_dirname, temp2) == 0; + free (local_dirname); + *dirname = temp2; +--- 2916,2928 ---- + } + } +! +! /* dircomplete_expand_relpath == 0 means we want to leave relative +! pathnames that are unchanged by canonicalization alone. +! *local_dirname != '/' && *local_dirname != '.' == relative pathname +! (consistent with general.c:absolute_pathname()) +! temp1 == temp2 (after appending a slash to temp2) means the pathname +! is not changed by canonicalization as described above. */ +! if (dircomplete_expand_relpath || ((local_dirname[0] != '/' && local_dirname[0] != '.') && STREQ (temp1, temp2) == 0)) +! return_value |= STREQ (local_dirname, temp2) == 0; + free (local_dirname); + *dirname = temp2; +*************** +*** 3003,3012 **** + orig_func = rl_completion_entry_function; + orig_attempt_func = rl_attempted_completion_function; +- orig_dir_func = rl_directory_rewrite_hook; + orig_ignore_func = rl_ignore_some_completions_function; + orig_rl_completer_word_break_characters = rl_completer_word_break_characters; + rl_completion_entry_function = rl_filename_completion_function; + rl_attempted_completion_function = (rl_completion_func_t *)NULL; +- rl_directory_rewrite_hook = (rl_icppfunc_t *)NULL; + rl_ignore_some_completions_function = filename_completion_ignore; + rl_completer_word_break_characters = " \t\n\"\'"; +--- 3129,3139 ---- + orig_func = rl_completion_entry_function; + orig_attempt_func = rl_attempted_completion_function; + orig_ignore_func = rl_ignore_some_completions_function; + orig_rl_completer_word_break_characters = rl_completer_word_break_characters; ++ ++ orig_dir_func = save_directory_hook (); ++ + rl_completion_entry_function = rl_filename_completion_function; + rl_attempted_completion_function = (rl_completion_func_t *)NULL; + rl_ignore_some_completions_function = filename_completion_ignore; + rl_completer_word_break_characters = " \t\n\"\'"; +*************** +*** 3016,3023 **** + rl_completion_entry_function = orig_func; + rl_attempted_completion_function = orig_attempt_func; +- rl_directory_rewrite_hook = orig_dir_func; + rl_ignore_some_completions_function = orig_ignore_func; + rl_completer_word_break_characters = orig_rl_completer_word_break_characters; + + return r; + } +--- 3143,3151 ---- + rl_completion_entry_function = orig_func; + rl_attempted_completion_function = orig_attempt_func; + rl_ignore_some_completions_function = orig_ignore_func; + rl_completer_word_break_characters = orig_rl_completer_word_break_characters; + ++ restore_directory_hook (orig_dir_func); ++ + return r; + } +diff -NrC 2 ../bash-4.2-patched/bashline.h ./bashline.h +*** ../bash-4.2-patched/bashline.h 2009-01-04 14:32:22.000000000 -0500 +--- ./bashline.h 2012-05-07 16:27:18.000000000 -0400 +*************** +*** 34,41 **** +--- 34,46 ---- + extern int bash_re_edit __P((char *)); + ++ extern void bashline_set_event_hook __P((void)); ++ extern void bashline_reset_event_hook __P((void)); ++ + extern int bind_keyseq_to_unix_command __P((char *)); + + extern char **bash_default_completion __P((const char *, int, int, int, int)); + ++ void set_directory_hook __P((void)); ++ + /* Used by programmable completion code. */ + extern char *command_word_completion_function __P((const char *, int)); +diff -NrC 2 ../bash-4.2-patched/builtins/shopt.def ./builtins/shopt.def +*** ../bash-4.2-patched/builtins/shopt.def 2010-07-02 22:42:44.000000000 -0400 +--- ./builtins/shopt.def 2012-05-07 16:27:18.000000000 -0400 +*************** +*** 62,65 **** +--- 62,69 ---- + #include "bashgetopt.h" + ++ #if defined (READLINE) ++ # include "../bashline.h" ++ #endif ++ + #if defined (HISTORY) + # include "../bashhist.h" +*************** +*** 95,99 **** + extern int no_empty_command_completion; + extern int force_fignore; +! extern int dircomplete_spelling; + + extern int enable_hostname_completion __P((int)); +--- 99,103 ---- + extern int no_empty_command_completion; + extern int force_fignore; +! extern int dircomplete_spelling, dircomplete_expand; + + extern int enable_hostname_completion __P((int)); +*************** +*** 122,125 **** +--- 126,133 ---- + #endif + ++ #if defined (READLINE) ++ static int shopt_set_complete_direxpand __P((char *, int)); ++ #endif ++ + static int shopt_login_shell; + static int shopt_compat31; +*************** +*** 151,154 **** +--- 159,163 ---- + { "compat41", &shopt_compat41, set_compatibility_level }, + #if defined (READLINE) ++ { "direxpand", &dircomplete_expand, shopt_set_complete_direxpand }, + { "dirspell", &dircomplete_spelling, (shopt_set_func_t *)NULL }, + #endif +*************** +*** 536,539 **** +--- 545,559 ---- + } + ++ #if defined (READLINE) ++ static int ++ shopt_set_complete_direxpand (option_name, mode) ++ char *option_name; ++ int mode; ++ { ++ set_directory_hook (); ++ return 0; ++ } ++ #endif ++ + #if defined (RESTRICTED_SHELL) + /* Don't allow the value of restricted_shell to be modified. */ +Binary files ../bash-4.2-patched/doc/._bashref.pdf and ./doc/._bashref.pdf differ +diff -NrC 2 ../bash-4.2-patched/doc/bash.1 ./doc/bash.1 +*** ../bash-4.2-patched/doc/bash.1 2011-01-16 15:31:39.000000000 -0500 +--- ./doc/bash.1 2012-05-07 16:27:18.000000000 -0400 +*************** +*** 8949,8952 **** +--- 8949,8962 ---- + The default bash behavior remains as in previous versions. + .TP 8 ++ .B direxpand ++ If set, ++ .B bash ++ replaces directory names with the results of word expansion when performing ++ filename completion. This changes the contents of the readline editing ++ buffer. ++ If not set, ++ .B bash ++ attempts to preserve what the user typed. ++ .TP 8 + .B dirspell + If set, +diff -NrC 2 ../bash-4.2-patched/doc/bashref.texi ./doc/bashref.texi +*** ../bash-4.2-patched/doc/bashref.texi 2011-01-16 15:31:57.000000000 -0500 +--- ./doc/bashref.texi 2012-05-07 16:27:18.000000000 -0400 +*************** +*** 4536,4539 **** +--- 4536,4546 ---- + The default Bash behavior remains as in previous versions. + ++ @item direxpand ++ If set, Bash ++ replaces directory names with the results of word expansion when performing ++ filename completion. This changes the contents of the readline editing ++ buffer. ++ If not set, Bash attempts to preserve what the user typed. ++ + @item dirspell + If set, Bash +diff -NrC 2 ../bash-4.2-patched/tests/shopt.right ./tests/shopt.right +*** ../bash-4.2-patched/tests/shopt.right 2010-07-02 23:36:30.000000000 -0400 +--- ./tests/shopt.right 2012-05-07 16:27:18.000000000 -0400 +*************** +*** 13,16 **** +--- 13,17 ---- + shopt -u compat40 + shopt -u compat41 ++ shopt -u direxpand + shopt -u dirspell + shopt -u dotglob +*************** +*** 69,72 **** +--- 70,74 ---- + shopt -u compat40 + shopt -u compat41 ++ shopt -u direxpand + shopt -u dirspell + shopt -u dotglob +*************** +*** 102,105 **** +--- 104,108 ---- + compat40 off + compat41 off ++ direxpand off + dirspell off + dotglob off +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 28 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 29 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-030.patch b/package/bash/bash-4.2-030.patch new file mode 100644 index 0000000000..7c6fef02bf --- /dev/null +++ b/package/bash/bash-4.2-030.patch @@ -0,0 +1,178 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-030 + +Bug-Reported-by: Roman Rakus +Bug-Reference-ID: <4D7DD91E.7040808@redhat.com> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-03/msg00126.html + +Bug-Description: + +When attempting to glob strings in a multibyte locale, and those strings +contain invalid multibyte characters that cause mbsnrtowcs to return 0, +the globbing code loops infinitely. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/lib/glob/xmbsrtowcs.c 2010-05-30 18:36:27.000000000 -0400 +--- ./lib/glob/xmbsrtowcs.c 2011-03-22 16:06:47.000000000 -0400 +*************** +*** 36,39 **** +--- 36,41 ---- + #if HANDLE_MULTIBYTE + ++ #define WSBUF_INC 32 ++ + #ifndef FREE + # define FREE(x) do { if (x) free (x); } while (0) +*************** +*** 149,153 **** + size_t wcnum; /* Number of wide characters in WSBUF */ + mbstate_t state; /* Conversion State */ +! size_t wcslength; /* Number of wide characters produced by the conversion. */ + const char *end_or_backslash; + size_t nms; /* Number of multibyte characters to convert at one time. */ +--- 151,155 ---- + size_t wcnum; /* Number of wide characters in WSBUF */ + mbstate_t state; /* Conversion State */ +! size_t n, wcslength; /* Number of wide characters produced by the conversion. */ + const char *end_or_backslash; + size_t nms; /* Number of multibyte characters to convert at one time. */ +*************** +*** 172,176 **** + tmp_p = p; + tmp_state = state; +! wcslength = mbsnrtowcs(NULL, &tmp_p, nms, 0, &tmp_state); + + /* Conversion failed. */ +--- 174,189 ---- + tmp_p = p; + tmp_state = state; +! +! if (nms == 0 && *p == '\\') /* special initial case */ +! nms = wcslength = 1; +! else +! wcslength = mbsnrtowcs (NULL, &tmp_p, nms, 0, &tmp_state); +! +! if (wcslength == 0) +! { +! tmp_p = p; /* will need below */ +! tmp_state = state; +! wcslength = 1; /* take a single byte */ +! } + + /* Conversion failed. */ +*************** +*** 187,191 **** + wchar_t *wstmp; + +! wsbuf_size = wcnum+wcslength+1; /* 1 for the L'\0' or the potential L'\\' */ + + wstmp = (wchar_t *) realloc (wsbuf, wsbuf_size * sizeof (wchar_t)); +--- 200,205 ---- + wchar_t *wstmp; + +! while (wsbuf_size < wcnum+wcslength+1) /* 1 for the L'\0' or the potential L'\\' */ +! wsbuf_size += WSBUF_INC; + + wstmp = (wchar_t *) realloc (wsbuf, wsbuf_size * sizeof (wchar_t)); +*************** +*** 200,207 **** + + /* Perform the conversion. This is assumed to return 'wcslength'. +! * It may set 'p' to NULL. */ +! mbsnrtowcs(wsbuf+wcnum, &p, nms, wsbuf_size-wcnum, &state); + +! wcnum += wcslength; + + if (mbsinit (&state) && (p != NULL) && (*p == '\\')) +--- 214,229 ---- + + /* Perform the conversion. This is assumed to return 'wcslength'. +! It may set 'p' to NULL. */ +! n = mbsnrtowcs(wsbuf+wcnum, &p, nms, wsbuf_size-wcnum, &state); + +! /* Compensate for taking single byte on wcs conversion failure above. */ +! if (wcslength == 1 && (n == 0 || n == (size_t)-1)) +! { +! state = tmp_state; +! p = tmp_p; +! wsbuf[wcnum++] = *p++; +! } +! else +! wcnum += wcslength; + + if (mbsinit (&state) && (p != NULL) && (*p == '\\')) +*************** +*** 231,236 **** + of DESTP and INDICESP are NULL. */ + +- #define WSBUF_INC 32 +- + size_t + xdupmbstowcs (destp, indicesp, src) +--- 253,256 ---- +*** ../bash-4.2-patched/lib/glob/glob.c 2009-11-14 18:39:30.000000000 -0500 +--- ./lib/glob/glob.c 2012-07-07 12:09:56.000000000 -0400 +*************** +*** 201,206 **** + size_t pat_n, dn_n; + + pat_n = xdupmbstowcs (&pat_wc, NULL, pat); +! dn_n = xdupmbstowcs (&dn_wc, NULL, dname); + + ret = 0; +--- 201,209 ---- + size_t pat_n, dn_n; + ++ pat_wc = dn_wc = (wchar_t *)NULL; ++ + pat_n = xdupmbstowcs (&pat_wc, NULL, pat); +! if (pat_n != (size_t)-1) +! dn_n = xdupmbstowcs (&dn_wc, NULL, dname); + + ret = 0; +*************** +*** 222,225 **** +--- 225,230 ---- + ret = 1; + } ++ else ++ ret = skipname (pat, dname, flags); + + FREE (pat_wc); +*************** +*** 267,272 **** + n = xdupmbstowcs (&wpathname, NULL, pathname); + if (n == (size_t) -1) +! /* Something wrong. */ +! return; + orig_wpathname = wpathname; + +--- 272,280 ---- + n = xdupmbstowcs (&wpathname, NULL, pathname); + if (n == (size_t) -1) +! { +! /* Something wrong. Fall back to single-byte */ +! udequote_pathname (pathname); +! return; +! } + orig_wpathname = wpathname; + +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 29 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 30 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-031.patch b/package/bash/bash-4.2-031.patch new file mode 100644 index 0000000000..d0077f3ef7 --- /dev/null +++ b/package/bash/bash-4.2-031.patch @@ -0,0 +1,80 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-031 + +Bug-Reported-by: Max Horn +Bug-Reference-ID: <20CC5C60-07C3-4E41-9817-741E48D407C5@quendi.de> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2012-06/msg00005.html + +Bug-Description: + +A change between bash-4.1 and bash-4.2 to prevent the readline input hook +from being called too frequently had the side effect of causing delays +when reading pasted input on systems such as Mac OS X. This patch fixes +those delays while retaining the bash-4.2 behavior. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/lib/readline/input.c 2010-05-30 18:33:01.000000000 -0400 +--- ./lib/readline/input.c 2012-06-25 21:08:42.000000000 -0400 +*************** +*** 410,414 **** + rl_read_key () + { +! int c; + + rl_key_sequence_length++; +--- 412,416 ---- + rl_read_key () + { +! int c, r; + + rl_key_sequence_length++; +*************** +*** 430,441 **** + while (rl_event_hook) + { +! if (rl_gather_tyi () < 0) /* XXX - EIO */ + { + rl_done = 1; + return ('\n'); + } + RL_CHECK_SIGNALS (); +- if (rl_get_char (&c) != 0) +- break; + if (rl_done) /* XXX - experimental */ + return ('\n'); +--- 432,447 ---- + while (rl_event_hook) + { +! if (rl_get_char (&c) != 0) +! break; +! +! if ((r = rl_gather_tyi ()) < 0) /* XXX - EIO */ + { + rl_done = 1; + return ('\n'); + } ++ else if (r == 1) /* read something */ ++ continue; ++ + RL_CHECK_SIGNALS (); + if (rl_done) /* XXX - experimental */ + return ('\n'); +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 30 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 31 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-032.patch b/package/bash/bash-4.2-032.patch new file mode 100644 index 0000000000..c3f38a6c86 --- /dev/null +++ b/package/bash/bash-4.2-032.patch @@ -0,0 +1,75 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-032 + +Bug-Reported-by: Ruediger Kuhlmann +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-05/msg00010.html + +Bug-Description: + +Bash-4.2 has problems with DEL characters in the expanded value of variables +used in the same quoted string as variables that expand to nothing. + +Patch (apply with `patch -p0'): + +*** ../bash-20120427/subst.c 2012-04-22 16:19:10.000000000 -0400 +--- ./subst.c 2012-05-07 16:06:35.000000000 -0400 +*************** +*** 8152,8155 **** +--- 8152,8163 ---- + dispose_word_desc (tword); + ++ /* Kill quoted nulls; we will add them back at the end of ++ expand_word_internal if nothing else in the string */ ++ if (had_quoted_null && temp && QUOTED_NULL (temp)) ++ { ++ FREE (temp); ++ temp = (char *)NULL; ++ } ++ + goto add_string; + break; +*************** +*** 8556,8560 **** + if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) + tword->flags |= W_QUOTED; +! if (had_quoted_null) + tword->flags |= W_HASQUOTEDNULL; + list = make_word_list (tword, (WORD_LIST *)NULL); +--- 8564,8568 ---- + if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) + tword->flags |= W_QUOTED; +! if (had_quoted_null && QUOTED_NULL (istring)) + tword->flags |= W_HASQUOTEDNULL; + list = make_word_list (tword, (WORD_LIST *)NULL); +*************** +*** 8587,8591 **** + if (word->flags & W_NOEXPAND) + tword->flags |= W_NOEXPAND; +! if (had_quoted_null) + tword->flags |= W_HASQUOTEDNULL; /* XXX */ + list = make_word_list (tword, (WORD_LIST *)NULL); +--- 8595,8599 ---- + if (word->flags & W_NOEXPAND) + tword->flags |= W_NOEXPAND; +! if (had_quoted_null && QUOTED_NULL (istring)) + tword->flags |= W_HASQUOTEDNULL; /* XXX */ + list = make_word_list (tword, (WORD_LIST *)NULL); +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 31 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 32 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-033.patch b/package/bash/bash-4.2-033.patch new file mode 100644 index 0000000000..9eb19540ff --- /dev/null +++ b/package/bash/bash-4.2-033.patch @@ -0,0 +1,57 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-033 + +Bug-Reported-by: David Leverton +Bug-Reference-ID: <4FCCE737.1060603@googlemail.com> +Bug-Reference-URL: + +Bug-Description: + +Bash uses a static buffer when expanding the /dev/fd prefix for the test +and conditional commands, among other uses, when it should use a dynamic +buffer to avoid buffer overflow. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/lib/sh/eaccess.c 2011-01-08 20:50:10.000000000 -0500 +--- ./lib/sh/eaccess.c 2012-06-04 21:06:43.000000000 -0400 +*************** +*** 83,86 **** +--- 83,88 ---- + struct stat *finfo; + { ++ static char *pbuf = 0; ++ + if (*path == '\0') + { +*************** +*** 107,111 **** + On most systems, with the notable exception of linux, this is + effectively a no-op. */ +! char pbuf[32]; + strcpy (pbuf, DEV_FD_PREFIX); + strcat (pbuf, path + 8); +--- 109,113 ---- + On most systems, with the notable exception of linux, this is + effectively a no-op. */ +! pbuf = xrealloc (pbuf, sizeof (DEV_FD_PREFIX) + strlen (path + 8)); + strcpy (pbuf, DEV_FD_PREFIX); + strcat (pbuf, path + 8); +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 32 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 33 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-034.patch b/package/bash/bash-4.2-034.patch new file mode 100644 index 0000000000..7eb2ebaf13 --- /dev/null +++ b/package/bash/bash-4.2-034.patch @@ -0,0 +1,46 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-034 + +Bug-Reported-by: "Davide Brini" +Bug-Reference-ID: <20120604164154.69781EC04B@imaps.oficinas.atrapalo.com> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-06/msg00030.html + +Bug-Description: + +In bash-4.2, the history code would inappropriately add a semicolon to +multi-line compound array assignments when adding them to the history. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/parse.y 2011-11-21 18:03:36.000000000 -0500 +--- ./parse.y 2012-06-07 12:48:47.000000000 -0400 +*************** +*** 4900,4905 **** +--- 4916,4924 ---- + return (current_command_line_count == 2 ? "\n" : ""); + } + ++ if (parser_state & PST_COMPASSIGN) ++ return (" "); ++ + /* First, handle some special cases. */ + /*(*/ + /* If we just read `()', assume it's a function definition, and don't +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 33 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 34 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-035.patch b/package/bash/bash-4.2-035.patch new file mode 100644 index 0000000000..b04364e207 --- /dev/null +++ b/package/bash/bash-4.2-035.patch @@ -0,0 +1,66 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-035 + +Bug-Reported-by: Dan Douglas +Bug-Reference-ID: <2766482.Ksm3GrSoYi@smorgbox> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-06/msg00071.html + +Bug-Description: + +When given a number of lines to read, `mapfile -n lines' reads one too many. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/builtins/mapfile.def 2010-05-29 22:09:47.000000000 -0400 +--- ./builtins/mapfile.def 2012-06-20 09:48:33.000000000 -0400 +*************** +*** 196,206 **** + interrupt_immediately++; + for (array_index = origin, line_count = 1; +! zgetline (fd, &line, &line_length, unbuffered_read) != -1; +! array_index++, line_count++) + { +- /* Have we exceeded # of lines to store? */ +- if (line_count_goal != 0 && line_count > line_count_goal) +- break; +- + /* Remove trailing newlines? */ + if (flags & MAPF_CHOP) +--- 196,202 ---- + interrupt_immediately++; + for (array_index = origin, line_count = 1; +! zgetline (fd, &line, &line_length, unbuffered_read) != -1; +! array_index++) + { + /* Remove trailing newlines? */ + if (flags & MAPF_CHOP) +*************** +*** 218,221 **** +--- 214,222 ---- + + bind_array_element (entry, array_index, line, 0); ++ ++ /* Have we exceeded # of lines to store? */ ++ line_count++; ++ if (line_count_goal != 0 && line_count > line_count_goal) ++ break; + } + +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 34 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 35 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-036.patch b/package/bash/bash-4.2-036.patch new file mode 100644 index 0000000000..1f62dc03c5 --- /dev/null +++ b/package/bash/bash-4.2-036.patch @@ -0,0 +1,92 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-036 + +Bug-Reported-by: gregrwm +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-05/msg00108.html + +Bug-Description: + +Bash-4.2 produces incorrect word splitting results when expanding +double-quoted $@ in the same string as and adjacent to other variable +expansions. The $@ should be split, the other expansions should not. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/subst.c 2012-05-02 12:02:33.000000000 -0400 +--- ./subst.c 2012-07-08 21:19:32.000000000 -0400 +*************** +*** 7923,7927 **** + /* State flags */ + int had_quoted_null; +! int has_dollar_at; + int tflag; + int pflags; /* flags passed to param_expand */ +--- 7923,7927 ---- + /* State flags */ + int had_quoted_null; +! int has_dollar_at, temp_has_dollar_at; + int tflag; + int pflags; /* flags passed to param_expand */ +*************** +*** 8128,8138 **** + *expanded_something = 1; + +! has_dollar_at = 0; + pflags = (word->flags & W_NOCOMSUB) ? PF_NOCOMSUB : 0; + if (word->flags & W_NOSPLIT2) + pflags |= PF_NOSPLIT2; + tword = param_expand (string, &sindex, quoted, expanded_something, +! &has_dollar_at, "ed_dollar_at, + &had_quoted_null, pflags); + + if (tword == &expand_wdesc_error || tword == &expand_wdesc_fatal) +--- 8128,8139 ---- + *expanded_something = 1; + +! temp_has_dollar_at = 0; + pflags = (word->flags & W_NOCOMSUB) ? PF_NOCOMSUB : 0; + if (word->flags & W_NOSPLIT2) + pflags |= PF_NOSPLIT2; + tword = param_expand (string, &sindex, quoted, expanded_something, +! &temp_has_dollar_at, "ed_dollar_at, + &had_quoted_null, pflags); ++ has_dollar_at += temp_has_dollar_at; + + if (tword == &expand_wdesc_error || tword == &expand_wdesc_fatal) +*************** +*** 8275,8281 **** + temp = (char *)NULL; + +! has_dollar_at = 0; + /* Need to get W_HASQUOTEDNULL flag through this function. */ +! list = expand_word_internal (tword, Q_DOUBLE_QUOTES, 0, &has_dollar_at, (int *)NULL); + + if (list == &expand_word_error || list == &expand_word_fatal) +--- 8276,8283 ---- + temp = (char *)NULL; + +! temp_has_dollar_at = 0; /* XXX */ + /* Need to get W_HASQUOTEDNULL flag through this function. */ +! list = expand_word_internal (tword, Q_DOUBLE_QUOTES, 0, &temp_has_dollar_at, (int *)NULL); +! has_dollar_at += temp_has_dollar_at; + + if (list == &expand_word_error || list == &expand_word_fatal) +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 35 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 36 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.2-037.patch b/package/bash/bash-4.2-037.patch new file mode 100644 index 0000000000..f5f1dc45ac --- /dev/null +++ b/package/bash/bash-4.2-037.patch @@ -0,0 +1,112 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-037 + +Bug-Reported-by: Jakub Filak +Bug-Reference-ID: +Bug-Reference-URL: https://bugzilla.redhat.com/show_bug.cgi?id=813289 + +Bug-Description: + +Attempting to redo (using `.') the vi editing mode `cc', `dd', or `yy' +commands leads to an infinite loop. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/lib/readline/vi_mode.c 2011-02-25 11:17:02.000000000 -0500 +--- ./lib/readline/vi_mode.c 2012-06-02 12:24:47.000000000 -0400 +*************** +*** 1235,1243 **** + r = rl_domove_motion_callback (_rl_vimvcxt); + } +! else if (vi_redoing) + { + _rl_vimvcxt->motion = _rl_vi_last_motion; + r = rl_domove_motion_callback (_rl_vimvcxt); + } + #if defined (READLINE_CALLBACKS) + else if (RL_ISSTATE (RL_STATE_CALLBACK)) +--- 1297,1313 ---- + r = rl_domove_motion_callback (_rl_vimvcxt); + } +! else if (vi_redoing && _rl_vi_last_motion != 'd') /* `dd' is special */ + { + _rl_vimvcxt->motion = _rl_vi_last_motion; + r = rl_domove_motion_callback (_rl_vimvcxt); + } ++ else if (vi_redoing) /* handle redoing `dd' here */ ++ { ++ _rl_vimvcxt->motion = _rl_vi_last_motion; ++ rl_mark = rl_end; ++ rl_beg_of_line (1, key); ++ RL_UNSETSTATE (RL_STATE_VIMOTION); ++ r = vidomove_dispatch (_rl_vimvcxt); ++ } + #if defined (READLINE_CALLBACKS) + else if (RL_ISSTATE (RL_STATE_CALLBACK)) +*************** +*** 1317,1325 **** + r = rl_domove_motion_callback (_rl_vimvcxt); + } +! else if (vi_redoing) + { + _rl_vimvcxt->motion = _rl_vi_last_motion; + r = rl_domove_motion_callback (_rl_vimvcxt); + } + #if defined (READLINE_CALLBACKS) + else if (RL_ISSTATE (RL_STATE_CALLBACK)) +--- 1387,1403 ---- + r = rl_domove_motion_callback (_rl_vimvcxt); + } +! else if (vi_redoing && _rl_vi_last_motion != 'c') /* `cc' is special */ + { + _rl_vimvcxt->motion = _rl_vi_last_motion; + r = rl_domove_motion_callback (_rl_vimvcxt); + } ++ else if (vi_redoing) /* handle redoing `cc' here */ ++ { ++ _rl_vimvcxt->motion = _rl_vi_last_motion; ++ rl_mark = rl_end; ++ rl_beg_of_line (1, key); ++ RL_UNSETSTATE (RL_STATE_VIMOTION); ++ r = vidomove_dispatch (_rl_vimvcxt); ++ } + #if defined (READLINE_CALLBACKS) + else if (RL_ISSTATE (RL_STATE_CALLBACK)) +*************** +*** 1378,1381 **** +--- 1456,1472 ---- + r = rl_domove_motion_callback (_rl_vimvcxt); + } ++ else if (vi_redoing && _rl_vi_last_motion != 'y') /* `yy' is special */ ++ { ++ _rl_vimvcxt->motion = _rl_vi_last_motion; ++ r = rl_domove_motion_callback (_rl_vimvcxt); ++ } ++ else if (vi_redoing) /* handle redoing `yy' here */ ++ { ++ _rl_vimvcxt->motion = _rl_vi_last_motion; ++ rl_mark = rl_end; ++ rl_beg_of_line (1, key); ++ RL_UNSETSTATE (RL_STATE_VIMOTION); ++ r = vidomove_dispatch (_rl_vimvcxt); ++ } + #if defined (READLINE_CALLBACKS) + else if (RL_ISSTATE (RL_STATE_CALLBACK)) +*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 +--- ./patchlevel.h Thu Feb 24 21:41:34 2011 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 36 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 37 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/bash-4.1-mkbuiltins-cross.patch b/package/bash/bash-4.2-mkbuiltins-cross.patch similarity index 100% rename from package/bash/bash-4.1-mkbuiltins-cross.patch rename to package/bash/bash-4.2-mkbuiltins-cross.patch diff --git a/package/bash/bash.mk b/package/bash/bash.mk index 2bcf0c43a7..0c8a954b20 100644 --- a/package/bash/bash.mk +++ b/package/bash/bash.mk @@ -1,12 +1,29 @@ -############################################################# +################################################################################ # # bash # -############################################################# +################################################################################ -BASH_VERSION = 4.1 +BASH_VERSION = 4.2 BASH_SITE = $(BR2_GNU_MIRROR)/bash -BASH_DEPENDENCIES = ncurses +BASH_DEPENDENCIES = ncurses host-bison +BASH_LICENSE = GPLv3+ +BASH_LICENSE_FILES = COPYING + +BASH_CONF_ENV += \ + bash_cv_job_control_missing=present \ + bash_cv_sys_named_pipes=present \ + bash_cv_func_sigsetjmp=present \ + bash_cv_printf_a_format=yes + +# Parallel build sometimes fails because some of the generator tools +# are built twice (i.e. while executing). +BASH_MAKE = $(MAKE1) + +# The static build needs some trickery +ifeq ($(BR2_PREFER_STATIC_LIB),y) +BASH_CONF_OPT += --enable-static-link --without-bash-malloc +endif # Make sure we build after busybox so that /bin/sh links to bash ifeq ($(BR2_PACKAGE_BUSYBOX),y) @@ -34,4 +51,4 @@ define BASH_UNINSTALL_TARGET_CMDS fi endef -$(eval $(call AUTOTARGETS,package,bash)) +$(eval $(autotools-package)) diff --git a/package/bc/Config.in b/package/bc/Config.in new file mode 100644 index 0000000000..a28978d2e5 --- /dev/null +++ b/package/bc/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_BC + bool "bc" + help + 'bc' is an arbitrary precision numeric processing language + Its syntax is similar to C, but differs in many substantial + areas. It supports interactive execution of statements. 'Bc' + is a utility included in the POSIX P1003.2/D11 draft standard. + This version does not use the historical method of having bc + be a compiler for the dc calculator (the POSIX document doesn't + specify how bc must be implemented). This version has a single + executable that both compiles the language and runs the resulting + 'byte code.' The byte code is not the dc language. + + http://www.gnu.org/software/bc diff --git a/package/bc/bc.mk b/package/bc/bc.mk new file mode 100644 index 0000000000..293b80d9fd --- /dev/null +++ b/package/bc/bc.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# bc +# +################################################################################ + +BC_VERSION = 1.06 +BC_SITE = $(BR2_GNU_MIRROR)/bc/ +BC_DEPENDENCIES = host-flex +BC_LICENSE = GPLv2+ LGPLv2.1+ +BC_LICENSE_FILES = COPYING COPYING.LIB + +# Build after busybox so target ends up with bc's "dc" version +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +BC_DEPENDENCIES += busybox +endif + +$(eval $(autotools-package)) diff --git a/package/bcusdk/Config.in b/package/bcusdk/Config.in new file mode 100644 index 0000000000..658c5921ea --- /dev/null +++ b/package/bcusdk/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_BCUSDK + bool "bcusdk" + depends on BR2_USE_MMU # libpthsem + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_LIBPTHSEM + help + A free development environment for the Bus Coupling Units of + the European Installation Bus. + + The European Installation Bus EIB is a home and building + automation bus system. It is optimized for low-speed control + applications like lighting and blinds control. + + BCUs (Bus Coupling Units) are standardized, generic + platforms for embedded EIB devices. They include the entire + physical layer network interface, power supply and a + microcontroller with an implementation of the EIB protocol + stack stored in the ROM. + + http://www.auto.tuwien.ac.at/~mkoegler/eib/ + +comment "bcusdk needs a toolchain w/ C++" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/bcusdk/bcusdk.mk b/package/bcusdk/bcusdk.mk new file mode 100644 index 0000000000..880b7d9746 --- /dev/null +++ b/package/bcusdk/bcusdk.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# bcusdk +# +################################################################################ + +BCUSDK_VERSION = 0.0.5 +BCUSDK_SOURCE = bcusdk_$(BCUSDK_VERSION).tar.gz +BCUSDK_SITE = http://www.auto.tuwien.ac.at/~mkoegler/eib/ +BCUSDK_LICENSE = GPLv2+ +BCUSDK_LICENSE_FILES = COPYING +BCUSDK_INSTALL_STAGING = YES +BCUSDK_CONF_OPT = --enable-onlyeibd --enable-ft12 --enable-pei16 \ + --enable-eibnetip --enable-eibnetipserver \ + --enable-eibnetiptunnel --without-pth-test \ + --with-pth=$(STAGING_DIR)/usr + +BCUSDK_DEPENDENCIES = libpthsem + +define BCUSDK_REMOVE_EXAMPLES + $(RM) -rf $(TARGET_DIR)/usr/share/bcusdk +endef + +BCUSDK_POST_INSTALL_TARGET_HOOKS += BCUSDK_REMOVE_EXAMPLES + +$(eval $(autotools-package)) diff --git a/package/beecrypt/Config.in b/package/beecrypt/Config.in index 264516eba4..033742c8f8 100644 --- a/package/beecrypt/Config.in +++ b/package/beecrypt/Config.in @@ -1,6 +1,16 @@ config BR2_PACKAGE_BEECRYPT bool "beecrypt" + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_ICU if BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR && \ + !BR2_arc help Beecrypt is a general-purpose cryptography library. http://beecrypt.sf.net + +comment "beecrypt needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +comment "beecrypt C++ support needs a toolchain w/ wchar" + depends on !BR2_arc + depends on BR2_INSTALL_LIBSTDCPP && !BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/beecrypt/beecrypt-0001-cppglue.cxx-cplusplus-only.patch b/package/beecrypt/beecrypt-0001-cppglue.cxx-cplusplus-only.patch new file mode 100644 index 0000000000..298e3eba93 --- /dev/null +++ b/package/beecrypt/beecrypt-0001-cppglue.cxx-cplusplus-only.patch @@ -0,0 +1,28 @@ +Makefile.am: Only compile/link cppglue.cxx if --with-cplusplus is used + +Bloats libbeecrypt for no use and breaks build on systems without a C++ +compiler. + +Signed-off-by: Peter Korsgaard +--- + Makefile.am | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +Index: beecrypt-4.2.1/Makefile.am +=================================================================== +--- beecrypt-4.2.1.orig/Makefile.am ++++ beecrypt-4.2.1/Makefile.am +@@ -62,7 +62,12 @@ + + lib_LTLIBRARIES = libbeecrypt.la + +-libbeecrypt_la_SOURCES = aes.c base64.c beecrypt.c blockmode.c blockpad.c blowfish.c dhies.c dldp.c dlkp.c dlpk.c dlsvdp-dh.c dsa.c elgamal.c endianness.c entropy.c fips186.c hmac.c hmacmd5.c hmacsha1.c hmacsha224.c hmacsha256.c md4.c md5.c hmacsha384.c hmacsha512.c memchunk.c mp.c mpbarrett.c mpnumber.c mpprime.c mtprng.c pkcs1.c pkcs12.c ripemd128.c ripemd160.c ripemd256.c ripemd320.c rsa.c rsakp.c rsapk.c sha1.c sha224.c sha256.c sha384.c sha512.c sha2k32.c sha2k64.c timestamp.c cppglue.cxx ++libbeecrypt_la_SOURCES = aes.c base64.c beecrypt.c blockmode.c blockpad.c blowfish.c dhies.c dldp.c dlkp.c dlpk.c dlsvdp-dh.c dsa.c elgamal.c endianness.c entropy.c fips186.c hmac.c hmacmd5.c hmacsha1.c hmacsha224.c hmacsha256.c md4.c md5.c hmacsha384.c hmacsha512.c memchunk.c mp.c mpbarrett.c mpnumber.c mpprime.c mtprng.c pkcs1.c pkcs12.c ripemd128.c ripemd160.c ripemd256.c ripemd320.c rsa.c rsakp.c rsapk.c sha1.c sha224.c sha256.c sha384.c sha512.c sha2k32.c sha2k64.c timestamp.c ++ ++if WITH_CPLUSPLUS ++libbeecrypt_la_SOURCES += cppglue.cxx ++endif ++ + libbeecrypt_la_DEPENDENCIES = $(BEECRYPT_OBJECTS) + libbeecrypt_la_LIBADD = blowfishopt.lo mpopt.lo sha1opt.lo $(OPENMP_LIBS) + libbeecrypt_la_LDFLAGS = -no-undefined -version-info $(LIBBEECRYPT_LT_CURRENT):$(LIBBEECRYPT_LT_REVISION):$(LIBBEECRYPT_LT_AGE) diff --git a/package/beecrypt/beecrypt-0002-icu-check-cross-compile.patch b/package/beecrypt/beecrypt-0002-icu-check-cross-compile.patch new file mode 100644 index 0000000000..cc02116506 --- /dev/null +++ b/package/beecrypt/beecrypt-0002-icu-check-cross-compile.patch @@ -0,0 +1,31 @@ +configure: Use AC_COMPILE_IFELSE for ICU check for cross compilation compat + +AC_RUN_IFELSE doesn't work when cross compiling, but we can do the +check in the preprocessor instead, so use AC_COMPILE_IFELSE instead. + +Signed-off-by: Peter Korsgaard +--- + configure.ac | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +Index: beecrypt-4.2.1/configure.ac +=================================================================== +--- beecrypt-4.2.1.orig/configure.ac ++++ beecrypt-4.2.1/configure.ac +@@ -295,13 +295,13 @@ + if test "$ac_with_cplusplus" = yes; then + AC_MSG_CHECKING([for IBM's ICU library version >= 2.8]) + AC_LANG_PUSH(C) +- AC_RUN_IFELSE([ ++ AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[#include ]],[[ + #if U_ICU_VERSION_MAJOR_NUM < 2 +- exit(1); ++ #error too old + #elif U_ICU_VERSION_MAJOR_NUM == 2 + # if U_ICU_VERSION_MINOR_NUM < 8 +- exit(1); ++ #error too old + # else + exit(0); + # endif diff --git a/package/beecrypt/beecrypt-4.1.2_no-cxx-glue.patch b/package/beecrypt/beecrypt-4.1.2_no-cxx-glue.patch deleted file mode 100644 index 6c4093677c..0000000000 --- a/package/beecrypt/beecrypt-4.1.2_no-cxx-glue.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ru beecrypt-4.1.2_vanilla/Makefile.am beecrypt-4.1.2_disable-cxxglue/Makefile.am ---- beecrypt-4.1.2_vanilla/Makefile.am 2004-12-22 07:06:31.000000000 +0000 -+++ beecrypt-4.1.2_disable-cxxglue/Makefile.am 2008-03-21 23:24:51.000000000 +0000 -@@ -49,7 +49,7 @@ - - libalt_LTLIBRARIES = libbeecrypt.la - --libbeecrypt_la_SOURCES = aes.c base64.c beecrypt.c blockmode.c blockpad.c blowfish.c dhaes.c dldp.c dlkp.c dlpk.c dlsvdp-dh.c dsa.c elgamal.c endianness.c entropy.c fips186.c hmac.c hmacmd5.c hmacsha1.c hmacsha256.c md5.c hmacsha384.c hmacsha512.c memchunk.c mp.c mpbarrett.c mpnumber.c mpprime.c mtprng.c pkcs1.c pkcs12.c rsa.c rsakp.c rsapk.c sha1.c sha256.c sha384.c sha512.c sha_k.c timestamp.c cppglue.cxx -+libbeecrypt_la_SOURCES = aes.c base64.c beecrypt.c blockmode.c blockpad.c blowfish.c dhaes.c dldp.c dlkp.c dlpk.c dlsvdp-dh.c dsa.c elgamal.c endianness.c entropy.c fips186.c hmac.c hmacmd5.c hmacsha1.c hmacsha256.c md5.c hmacsha384.c hmacsha512.c memchunk.c mp.c mpbarrett.c mpnumber.c mpprime.c mtprng.c pkcs1.c pkcs12.c rsa.c rsakp.c rsapk.c sha1.c sha256.c sha384.c sha512.c sha_k.c timestamp.c - libbeecrypt_la_DEPENDENCIES = $(BEECRYPT_OBJECTS) - libbeecrypt_la_LIBADD = aesopt.lo blowfishopt.lo mpopt.lo sha1opt.lo - libbeecrypt_la_LDFLAGS = -no-undefined -version-info $(LIBBEECRYPT_LT_CURRENT):$(LIBBEECRYPT_LT_REVISION):$(LIBBEECRYPT_LT_AGE) diff --git a/package/beecrypt/beecrypt.mk b/package/beecrypt/beecrypt.mk index 5fffd1f2fd..223b44fb33 100644 --- a/package/beecrypt/beecrypt.mk +++ b/package/beecrypt/beecrypt.mk @@ -1,16 +1,40 @@ -############################################################# +################################################################################ # # beecrypt # -############################################################# -BEECRYPT_VERSION = 4.1.2 -BEECRYPT_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/beecrypt +################################################################################ + +BEECRYPT_VERSION = 4.2.1 +BEECRYPT_SITE = http://downloads.sourceforge.net/project/beecrypt/beecrypt/$(BEECRYPT_VERSION) BEECRYPT_AUTORECONF = YES BEECRYPT_INSTALL_STAGING = YES +BEECRYPT_LICENSE = LGPLv2.1+ +BEECRYPT_LICENSE_FILES = COPYING.LIB + +# beecrypt contains C++ code that g++ 4.7 doesn't really +# like. Upstream does not seem to be really active, so workaround this +# by passing -fpermissive. +BEECRYPT_CONF_ENV = \ + CXXFLAGS="$(TARGET_CXXFLAGS) -fpermissive" -BEECRYPT_CONF_OPT = --without-cplusplus \ +BEECRYPT_CONF_OPT = \ --without-java \ - --without-python \ - --disable-rpath + --without-python \ + --disable-openmp + +ifeq ($(BR2_PACKAGE_ICU),y) +# C++ support needs icu +BEECRYPT_DEPENDENCIES += icu +else +BEECRYPT_CONF_OPT += --without-cplusplus + +# automake/libtool uses the C++ compiler to link libbeecrypt because of +# (the optional) cppglue.cxx. Force it to use the C compiler instead. +define BEECRYPT_LINK_WITH_CC + $(SED) 's/--tag=CXX/--tag=CC/g' $(@D)/Makefile +endef + +BEECRYPT_POST_CONFIGURE_HOOKS += BEECRYPT_LINK_WITH_CC +endif -$(eval $(call AUTOTARGETS,package,beecrypt)) +$(eval $(autotools-package)) diff --git a/package/bellagio/Config.in b/package/bellagio/Config.in new file mode 100644 index 0000000000..e3da4323c6 --- /dev/null +++ b/package/bellagio/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_BELLAGIO + bool "bellagio" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_PREFER_STATIC_LIB + select BR2_PACKAGE_HAS_OPENMAX + help + Bellagio is an opensource implementation of the + OpenMAX IL API. + + OpenMAX Integration Layer (IL) is a standard API + to access Multimedia Components on mobile platforms. + It has been defined by the Khronos group. + By means of the OpenMAX IL API, multimedia frameworks + can access hardware accelerators on platforms that + provide it. + + http://omxil.sourceforge.net/ + +comment "bellagio needs a toolchain w/ C++, threads, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || BR2_PREFER_STATIC_LIB diff --git a/package/bellagio/bellagio-0.9.3-drop-werror.patch b/package/bellagio/bellagio-0.9.3-drop-werror.patch new file mode 100644 index 0000000000..39baf421bb --- /dev/null +++ b/package/bellagio/bellagio-0.9.3-drop-werror.patch @@ -0,0 +1,22 @@ +[PATCH] don't force -Werror in CFLAGS + +Released software shouldn't get built with -Werror. + +Signed-of-by: Peter Korsgaard +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: libomxil-bellagio-0.9.3/configure.ac +=================================================================== +--- libomxil-bellagio-0.9.3.orig/configure.ac ++++ libomxil-bellagio-0.9.3/configure.ac +@@ -5,7 +5,7 @@ + AC_PREREQ([2.59]) + + AC_CONFIG_HEADERS([config.h]) +-CFLAGS="${CFLAGS} -Wall -Werror" ++CFLAGS="${CFLAGS} -Wall" + + ################################################################################ + # Set the shared versioning info, according to section 6.3 of the libtool info # diff --git a/package/bellagio/bellagio-0.9.3-dynamicloader-linking.patch b/package/bellagio/bellagio-0.9.3-dynamicloader-linking.patch new file mode 100644 index 0000000000..5e4243d5e1 --- /dev/null +++ b/package/bellagio/bellagio-0.9.3-dynamicloader-linking.patch @@ -0,0 +1,16 @@ +When libomxdynamicloader.so is loaded, it complains that RM_Deinit can't be resolved. +Link explicitly against omxil-bellagio so that ld.so can find the reference. + +Signed-off-by: Qais Yousef + +--- bellagio-0.9.3/src/dynamic_loader/Makefile.am.old 2012-03-23 15:07:47.379021034 +0000 ++++ bellagio-0.9.3/src/dynamic_loader/Makefile.am 2012-03-23 15:08:47.563034818 +0000 +@@ -3,7 +3,7 @@ + omxdynamicloader_LTLIBRARIES = libomxdynamicloader.la + libomxdynamicloader_la_SOURCES = ste_dynamic_component_loader.c ste_dynamic_component_loader.h + +-libomxdynamicloader_la_LDFLAGS = ++libomxdynamicloader_la_LDFLAGS = -lomxil-bellagio -L$(abs_top_srcdir)/src/.libs + libomxdynamicloader_la_CFLAGS = -I$(top_srcdir)/include \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/base \ diff --git a/package/bellagio/bellagio-0.9.3-parallel-build.patch b/package/bellagio/bellagio-0.9.3-parallel-build.patch new file mode 100644 index 0000000000..767bbeb2aa --- /dev/null +++ b/package/bellagio/bellagio-0.9.3-parallel-build.patch @@ -0,0 +1,16 @@ +Fix dependency issue to allow parallel build + +Signed-off-by: Qais Yousef + +Index: bellagio-0.9.3/src/Makefile.am +=================================================================== +--- bellagio-0.9.3.orig/src/Makefile.am ++++ bellagio-0.9.3/src/Makefile.am +@@ -8,6 +8,7 @@ omxregister_bellagio_SOURCES = omxregist + omxregister_bellagio_CFLAGS = -DOMXILCOMPONENTSPATH=\"$(plugindir)/\" \ + -I$(top_srcdir)/include + omxregister_bellagio_LDFLAGS = -lomxil-bellagio -L$(builddir) ++omxregister_bellagio_DEPENDENCIES = libomxil-bellagio.la + + lib_LTLIBRARIES = libomxil-bellagio.la + libomxil_bellagio_la_SOURCES = component_loader.h \ diff --git a/package/bellagio/bellagio-0.9.3-segfault-on-removeFromWaitResource.patch b/package/bellagio/bellagio-0.9.3-segfault-on-removeFromWaitResource.patch new file mode 100644 index 0000000000..f52a2c33f4 --- /dev/null +++ b/package/bellagio/bellagio-0.9.3-segfault-on-removeFromWaitResource.patch @@ -0,0 +1,37 @@ +We always access globalComponentList[] at indexComponent=-1 which causes a +segfault. Use i as the index instead. + +Signed-off-by: Qais Yousef + +--- bellagio-0.9.3/src/omx_reference_resource_manager.c.old 2012-03-13 10:15:25.743940980 +0000 ++++ bellagio-0.9.3/src/omx_reference_resource_manager.c 2012-03-13 10:18:02.201971009 +0000 +@@ -485,7 +485,6 @@ + OMX_ERRORTYPE RM_removeFromWaitForResource(OMX_COMPONENTTYPE *openmaxStandComp) { + omx_base_component_PrivateType* omx_base_component_Private; + int i = 0; +- int indexComponent = -1; + + DEBUG(DEB_LEV_FUNCTION_NAME, "In %s\n", __func__); + omx_base_component_Private = (omx_base_component_PrivateType*)openmaxStandComp->pComponentPrivate; +@@ -493,16 +492,13 @@ + while(listOfcomponentRegistered[i].component_name != NULL ) { + if (!strcmp(listOfcomponentRegistered[i].component_name, omx_base_component_Private->name)) { + // found component in the list of the resource manager +- removeElemFromList(&globalComponentList[indexComponent], openmaxStandComp); +- break; ++ removeElemFromList(&globalComponentList[i], openmaxStandComp); ++ DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s\n", __func__); ++ return OMX_ErrorNone; + } + i++; + } +- if (indexComponent <0) { +- // No resource to be handled +- DEBUG(DEB_LEV_ERR, "In %s No resource to be handled\n", __func__); +- return OMX_ErrorNone; +- } +- DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s\n", __func__); ++ // No resource to be handled ++ DEBUG(DEB_LEV_ERR, "In %s No resource to be handled\n", __func__); + return OMX_ErrorNone; + } diff --git a/package/bellagio/bellagio.mk b/package/bellagio/bellagio.mk new file mode 100644 index 0000000000..993015cf2b --- /dev/null +++ b/package/bellagio/bellagio.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# bellagio +# +################################################################################ + +BELLAGIO_VERSION = 0.9.3 +BELLAGIO_SOURCE = libomxil-bellagio-$(BELLAGIO_VERSION).tar.gz +BELLAGIO_SITE = http://downloads.sourceforge.net/project/omxil/omxil/Bellagio%20$(BELLAGIO_VERSION) +BELLAGIO_AUTORECONF = YES +BELLAGIO_INSTALL_STAGING = YES +BELLAGIO_LICENSE = LGPLv2.1+ +BELLAGIO_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/berkeleydb/Config.in b/package/berkeleydb/Config.in index 9568d4425f..a597abbe8a 100644 --- a/package/berkeleydb/Config.in +++ b/package/berkeleydb/Config.in @@ -5,3 +5,9 @@ config BR2_PACKAGE_BERKELEYDB applications. http://www.sleepycat.com/products/db.shtml + +config BR2_PACKAGE_BERKELEYDB_TOOLS + bool "install tools" + depends on BR2_PACKAGE_BERKELEYDB + help + Install berkeleydb tools, mostly useful for debugging purposes. diff --git a/package/berkeleydb/berkeleydb.mk b/package/berkeleydb/berkeleydb.mk index 1b9d092462..0e3e830685 100644 --- a/package/berkeleydb/berkeleydb.mk +++ b/package/berkeleydb/berkeleydb.mk @@ -1,17 +1,26 @@ -############################################################# +################################################################################ # -# berkeley db +# berkeleydb # -############################################################# -BERKELEYDB_VERSION:=4.4.20 -BERKELEYDB_SO_VERSION:=4.4 -BERKELEYDB_SITE:=http://download.oracle.com/berkeley-db -BERKELEYDB_SOURCE:=db-$(BERKELEYDB_VERSION).NC.tar.gz -BERKELEYDB_SHARLIB:=libdb-$(BERKELEYDB_SO_VERSION).so -BERKELEYDB_SUBDIR=build_unix +################################################################################ + +# Since BerkeleyDB version 6 and above are licensed under the Affero +# GPL (AGPL), we want to keep this 'bdb' package at version 5.x to +# avoid licensing issues. +# BerkeleyDB version 6 or above should be provided by a dedicated +# package instead. +BERKELEYDB_VERSION = 5.3.21 +BERKELEYDB_SITE = http://download.oracle.com/berkeley-db +BERKELEYDB_SOURCE = db-$(BERKELEYDB_VERSION).NC.tar.gz +BERKELEYDB_SUBDIR = build_unix +BERKELEYDB_LICENSE = BerkeleyDB License +BERKELEYDB_LICENSE_FILES = LICENSE BERKELEYDB_INSTALL_STAGING = YES +BERKELEYDB_BINARIES = db_archive db_checkpoint db_deadlock db_dump \ + db_hotbackup db_load db_log_verify db_printlog db_recover db_replicate \ + db_stat db_tuner db_upgrade db_verify -#build directory can't be the directory where configure are there, so.. +# build directory can't be the directory where configure are there, so.. define BERKELEYDB_CONFIGURE_CMDS (cd $(@D)/build_unix; rm -rf config.cache; \ $(TARGET_CONFIGURE_OPTS) \ @@ -22,42 +31,37 @@ define BERKELEYDB_CONFIGURE_CMDS --build=$(GNU_HOST_NAME) \ --prefix=/usr \ --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libdir=/lib \ - --libexecdir=/usr/lib \ --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --includedir=/usr/include \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ --with-gnu-ld \ - --enable-shared \ - --disable-cxx \ + $(if $(BR2_INSTALL_LIBSTDCPP),--enable-cxx,--disable-cxx) \ --disable-java \ - --disable-rpc \ --disable-tcl \ --disable-compat185 \ + $(SHARED_STATIC_LIBS_OPTS) \ --with-pic \ + --enable-o_direct \ ) $(SED) 's/\.lo/.o/g' $(@D)/build_unix/Makefile endef -ifeq ($(BR2_HAVE_DEVFILES),y) -define BERKELEYDB_INSTALL_TARGET_DEVFILES_CMDS - cp -dpf $(STAGING_DIR)/usr/include/db.h $(TARGET_DIR)/usr/include/ - cp -dpf $(STAGING_DIR)/lib/libdb*.a $(TARGET_DIR)/usr/lib/ - cp -dpf $(STAGING_DIR)/lib/libdb*.la $(TARGET_DIR)/usr/lib/ +ifneq ($(BR2_PACKAGE_BERKELEYDB_TOOLS),y) + +define BERKELEYDB_REMOVE_TOOLS + rm -f $(addprefix $(TARGET_DIR)/usr/bin/, $(BERKELEYDB_BINARIES)) endef + +BERKELEYDB_POST_INSTALL_TARGET_HOOKS += BERKELEYDB_REMOVE_TOOLS + endif -define BERKELEYDB_INSTALL_TARGET_CMDS - rm -rf $(TARGET_DIR)/lib/libdb* - cp -a $(STAGING_DIR)/lib/libdb*so* $(TARGET_DIR)/lib/ - rm -f $(addprefix $(TARGET_DIR)/lib/,libdb.so libdb.la libdb.a) - (cd $(TARGET_DIR)/usr/lib; ln -fs /lib/$(BERKELEYDB_SHARLIB) libdb.so) - $(BERKELEYDB_INSTALL_TARGET_DEVFILES_CMDS) +ifneq ($(BR2_HAVE_DOCUMENTATION),y) + +define BERKELEYDB_REMOVE_DOCS + rm -rf $(TARGET_DIR)/usr/docs endef -$(eval $(call AUTOTARGETS,package,berkeleydb)) +BERKELEYDB_POST_INSTALL_TARGET_HOOKS += BERKELEYDB_REMOVE_DOCS + +endif + +$(eval $(autotools-package)) diff --git a/package/bind/Config.in b/package/bind/Config.in index 827ee261f0..047f682b2e 100644 --- a/package/bind/Config.in +++ b/package/bind/Config.in @@ -1,6 +1,9 @@ config BR2_PACKAGE_BIND bool "bind" + depends on BR2_INET_IPV6 depends on BR2_LARGEFILE + # fork() + depends on BR2_USE_MMU help BIND (Berkeley Internet Name Domain) is an implementation of the Domain Name System (DNS) protocols and provides an openly @@ -21,11 +24,21 @@ config BR2_PACKAGE_BIND http://www.isc.org/sw/bind/ +if BR2_PACKAGE_BIND + +config BR2_PACKAGE_BIND_SERVER + bool "Install server components" + default y + help + Install server components (named, lwresd) + config BR2_PACKAGE_BIND_TOOLS bool "Install tools" - depends on BR2_PACKAGE_BIND help Install tools (host, nslookup, dig, nsupdate) -comment "bind requires a toolchain with LARGEFILE support" - depends on !BR2_LARGEFILE +endif + +comment "bind needs a toolchain w/ largefile, IPv6" + depends on BR2_USE_MMU + depends on !(BR2_LARGEFILE || BR2_INET_IPV6) diff --git a/package/bind/S81named b/package/bind/S81named new file mode 100644 index 0000000000..0160c11440 --- /dev/null +++ b/package/bind/S81named @@ -0,0 +1,56 @@ +#!/bin/sh +# +# System-V init to control the bind DNS Daemon +# + +NAME=named +DAEMON=/usr/sbin/$NAME + +# this file contains a few tunable parameters +test -r /etc/default/named && . /etc/default/named + +test -f $DAEMON || exit 0 + +set -e + +case "$1" in + start) + test -z "$CHROOT" || ARGS="$ARGS -t $CHROOT" + test -z "$SETUID" || ARGS="$ARGS -u $SETUID" + if [ ! -f $CHROOT/etc/rndc.key ]; then + echo "Initializing $NAME control key: rndc-confgen" + set +e + + # if rndc.key is a symlink, the target must exist + touch $CHROOT/etc/rndc.key + touch etc/rndc.key + + rndc-confgen -a -r /dev/urandom $ARGS || true + set -e + fi + test -z "$CONF" || ARGS="$ARGS -c $CONF" + echo -n "Starting domain name daemon: $NAME" + trap 'echo failed' 0 + start-stop-daemon -S -x $DAEMON -- $ARGS + trap - 0 + echo "." + ;; + stop) + echo -n "Stopping domain name daemon: $NAME" + rndc stop || start-stop-daemon -K -x $DAEMON + echo "." + ;; + restart) + $0 stop || true + sleep 2 + $0 start + ;; + reload|force-reload) + rndc reload || $0 restart + ;; + *) + echo "Usage: $0 {start|stop|restart|reload|force-reload}" + exit 1 +esac + +exit 0 diff --git a/package/bind/bind-01-disable-tests.patch b/package/bind/bind-01-disable-tests.patch new file mode 100644 index 0000000000..9c3d52ed7d --- /dev/null +++ b/package/bind/bind-01-disable-tests.patch @@ -0,0 +1,16 @@ +Disable tests to avoid cross-compilation issues (tries to run genrandom). + +Signed-off-by: Gustavo Zacarias + +diff -Nura bind-9.6-ESV-R9-P1.orig/bin/Makefile.in bind-9.6-ESV-R9-P1/bin/Makefile.in +--- bind-9.6-ESV-R9-P1.orig/bin/Makefile.in 2013-06-04 15:30:48.000000000 -0300 ++++ bind-9.6-ESV-R9-P1/bin/Makefile.in 2013-07-19 15:32:19.018287733 -0300 +@@ -19,7 +19,7 @@ + VPATH = @srcdir@ + top_srcdir = @top_srcdir@ + +-SUBDIRS = named rndc dig dnssec tests nsupdate check ++SUBDIRS = named rndc dig dnssec nsupdate check + TARGETS = + + @BIND9_MAKE_RULES@ diff --git a/package/bind/bind-02-cross.patch b/package/bind/bind-02-cross.patch new file mode 100644 index 0000000000..5b4b1cd836 --- /dev/null +++ b/package/bind/bind-02-cross.patch @@ -0,0 +1,18 @@ +Use host compiler to build 'gen' since it's run when building. + +Signed-off-by: Gustavo Zacarias + +diff -Nura bind-9.5.1-P1/lib/dns/Makefile.in bind-9.5.1-P1.gencross/lib/dns/Makefile.in +--- bind-9.5.1-P1/lib/dns/Makefile.in 2007-09-11 22:09:08.000000000 -0300 ++++ bind-9.5.1-P1.gencross/lib/dns/Makefile.in 2009-03-04 16:35:23.000000000 -0200 +@@ -160,8 +160,8 @@ + ./gen -s ${srcdir} > code.h + + gen: gen.c +- ${BUILD_CC} ${BUILD_CFLAGS} -I${top_srcdir}/lib/isc/include \ +- ${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} -o $@ ${srcdir}/gen.c ${BUILD_LIBS} ++ ${HOSTCC} ${HOST_CFLAGS} -I${top_srcdir}/lib/isc/include \ ++ ${HOST_LDFLAGS} -o $@ ${srcdir}/gen.c + + rbtdb64.@O@: rbtdb.c + diff --git a/package/bind/bind-cross.patch b/package/bind/bind-cross.patch deleted file mode 100644 index cdbf4cb899..0000000000 --- a/package/bind/bind-cross.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -Nura bind-9.5.1-P1/lib/dns/Makefile.in bind-9.5.1-P1.gencross/lib/dns/Makefile.in ---- bind-9.5.1-P1/lib/dns/Makefile.in 2007-09-11 22:09:08.000000000 -0300 -+++ bind-9.5.1-P1.gencross/lib/dns/Makefile.in 2009-03-04 16:35:23.000000000 -0200 -@@ -160,8 +160,8 @@ - ./gen -s ${srcdir} > code.h - - gen: gen.c -- ${BUILD_CC} ${BUILD_CFLAGS} -I${top_srcdir}/lib/isc/include \ -- ${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} -o $@ ${srcdir}/gen.c ${BUILD_LIBS} -+ ${HOSTCC} ${HOST_CFLAGS} -I${top_srcdir}/lib/isc/include \ -+ ${HOST_LDFLAGS} -o $@ ${srcdir}/gen.c - - rbtdb64.@O@: rbtdb.c - diff --git a/package/bind/bind-susv3-legacy.patch b/package/bind/bind-susv3-legacy.patch deleted file mode 100644 index 99be15c6f6..0000000000 --- a/package/bind/bind-susv3-legacy.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nura bind-9.5.2-P1/lib/isc/unix/ifiter_ioctl.c bind-9.5.2-P1.nosusv3/lib/isc/unix/ifiter_ioctl.c ---- bind-9.5.2-P1/lib/isc/unix/ifiter_ioctl.c 2009-02-15 22:53:58.000000000 -0200 -+++ bind-9.5.2-P1.nosusv3/lib/isc/unix/ifiter_ioctl.c 2009-12-03 13:12:56.000000000 -0300 -@@ -17,6 +17,8 @@ - - /* $Id: ifiter_ioctl.c,v 1.58.90.3 2009/02/16 00:53:58 marka Exp $ */ - -+#include -+ - /*! \file - * \brief - * Obtain the list of network interfaces using the SIOCGLIFCONF ioctl. diff --git a/package/bind/bind.mk b/package/bind/bind.mk index ff0ec04d2c..2e01e8ba49 100644 --- a/package/bind/bind.mk +++ b/package/bind/bind.mk @@ -1,50 +1,73 @@ -############################################################# +################################################################################ # # bind # -############################################################# +################################################################################ -BIND_VERSION = 9.5.2-P4 +BIND_VERSION = 9.6-ESV-R10 BIND_SITE = ftp://ftp.isc.org/isc/bind9/$(BIND_VERSION) +BIND_MAKE = $(MAKE1) +BIND_INSTALL_STAGING = YES +BIND_LICENSE = ISC +BIND_LICENSE_FILES = COPYRIGHT BIND_TARGET_SBINS = lwresd named named-checkconf named-checkzone -BIND_TARGET_SBINS += named-compilezone rndc rndc-confgen -BIND_TARGET_SBINS += dnssec-keygen dnssec-signzone +BIND_TARGET_SBINS += named-compilezone rndc rndc-confgen dnssec-dsfromkey +BIND_TARGET_SBINS += dnssec-keyfromlabel dnssec-keygen dnssec-signzone BIND_TARGET_BINS = dig host nslookup nsupdate -BIND_TARGET_LIBS = libbind9.* libdns.* libisccc.* libisccfg.* libisc.* liblwres.* -BIND_MAKE = $(MAKE1) +BIND_TARGET_LIBS = libbind9.* libdns.* libisc.* libisccc.* libisccfg.* liblwres.* BIND_CONF_ENV = BUILD_CC="$(TARGET_CC)" \ BUILD_CFLAGS="$(TARGET_CFLAGS)" -BIND_CONF_OPT = \ - --sysconfdir=/etc \ +BIND_CONF_OPT = --sysconfdir=/etc \ --localstatedir=/var \ --with-randomdev=/dev/urandom \ - --with-openssl=no \ - --with-libxml2=no \ - --with-pic \ - --with-libtool \ - --disable-epoll \ - --disable-threads + --enable-epoll --with-libtool + +ifeq ($(BR2_PACKAGE_LIBXML2),y) + BIND_CONF_OPT += --with-libxml2=$(STAGING_DIR)/usr + BIND_DEPENDENCIES += libxml2 +else + BIND_CONF_OPT += --with-libxml2=no +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) + BIND_DEPENDENCIES += openssl + BIND_CONF_OPT += --with-openssl=$(STAGING_DIR)/usr LIBS="-lz" +else + BIND_CONF_OPT += --with-openssl=no +endif + +define BIND_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/bind/S81named \ + $(TARGET_DIR)/etc/init.d/S81named +endef define BIND_TARGET_INSTALL_FIXES rm -f $(TARGET_DIR)/usr/bin/isc-config.sh - $(INSTALL) -m 0755 -D package/bind/bind.sysvinit $(TARGET_DIR)/etc/init.d/S81named endef BIND_POST_INSTALL_TARGET_HOOKS += BIND_TARGET_INSTALL_FIXES +define BIND_TARGET_REMOVE_SERVER + rm -rf $(addprefix $(TARGET_DIR)/usr/sbin/, $(BIND_TARGET_SBINS)) +endef + define BIND_TARGET_REMOVE_TOOLS rm -rf $(addprefix $(TARGET_DIR)/usr/bin/, $(BIND_TARGET_BINS)) endef +ifneq ($(BR2_PACKAGE_BIND_SERVER),y) +BIND_POST_INSTALL_TARGET_HOOKS += BIND_TARGET_REMOVE_SERVER +endif + ifneq ($(BR2_PACKAGE_BIND_TOOLS),y) BIND_POST_INSTALL_TARGET_HOOKS += BIND_TARGET_REMOVE_TOOLS endif define BIND_UNINSTALL_TARGET_CMDS - rm -rf $(addprefix $(TARGET_DIR)/usr/sbin/, $(BIND_TARGET_SBINS)) - rm -rf $(addprefix $(TARGET_DIR)/usr/bin/, $(BIND_TARGET_BINS)) - rm -rf $(addprefix $(TARGET_DIR)/usr/lib/, $(BIND_TARGET_LIBS)) + $(BIND_TARGET_REMOVE_SERVER) + $(BIND_TARGET_REMOVE_TOOLS) rm -f $(TARGET_DIR)/etc/init.d/S81named + rm -rf $(addprefix $(TARGET_DIR)/usr/lib/, $(BIND_TARGET_LIBS)) endef -$(eval $(call AUTOTARGETS,package,bind)) +$(eval $(autotools-package)) diff --git a/package/bind/bind.sysvinit b/package/bind/bind.sysvinit deleted file mode 100644 index 171d3208aa..0000000000 --- a/package/bind/bind.sysvinit +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh -# -# System-V init to control the bind DNS Daemon -# - -NAME=named -DAEMON=/usr/sbin/$NAME - -# this file contains a few tunable parameters -test -r /etc/default/named && . /etc/default/named - -test -f $DAEMON || exit 0 - -set -e - -case "$1" in - start) - test -z "$CHROOT" || ARGS="$ARGS -t $CHROOT" - test -z "$SETUID" || ARGS="$ARGS -u $SETUID" - if [ ! -f $CHROOT/etc/rndc.key ]; then - echo "Initializing $NAME control key: rndc-confgen" - set +e - - # if rndc.key is a symlink, the target must exist - touch $CHROOT/etc/rndc.key - touch etc/rndc.key - - rndc-confgen -a -r /dev/urandom $ARGS || true - set -e - fi - test -z "$CONF" || ARGS="$ARGS -c $CONF" - echo -n "Starting domain name daemon: $NAME" - trap 'echo failed' 0 - start-stop-daemon -S -x $DAEMON -- $ARGS - trap - 0 - echo "." - ;; - stop) - echo -n "Stopping domain name daemon: $NAME" - rndc stop || start-stop-daemon -K -x $DAEMON - echo "." - ;; - restart) - $0 stop || true - sleep 2 - $0 start - ;; - reload|force-reload) - rndc reload || $0 restart - ;; - *) - echo "Usage: $0 {start|stop|restart|reload|force-reload}" - exit 1 -esac - -exit 0 diff --git a/package/binutils/binutils-2.19.1/110-arm-eabi-conf.patch b/package/binutils/2.20.1/110-arm-eabi-conf.patch similarity index 100% rename from package/binutils/binutils-2.19.1/110-arm-eabi-conf.patch rename to package/binutils/2.20.1/110-arm-eabi-conf.patch diff --git a/package/binutils/binutils-2.19.1/120-sh-conf.patch b/package/binutils/2.20.1/120-sh-conf.patch similarity index 100% rename from package/binutils/binutils-2.19.1/120-sh-conf.patch rename to package/binutils/2.20.1/120-sh-conf.patch diff --git a/package/binutils/binutils-2.18/300-001_ld_makefile_patch.patch b/package/binutils/2.20.1/300-001_ld_makefile_patch.patch similarity index 100% rename from package/binutils/binutils-2.18/300-001_ld_makefile_patch.patch rename to package/binutils/2.20.1/300-001_ld_makefile_patch.patch diff --git a/package/binutils/binutils-2.18/300-012_check_ldrunpath_length.patch b/package/binutils/2.20.1/300-012_check_ldrunpath_length.patch similarity index 100% rename from package/binutils/binutils-2.18/300-012_check_ldrunpath_length.patch rename to package/binutils/2.20.1/300-012_check_ldrunpath_length.patch diff --git a/package/binutils/binutils-2.20.1/400-arm_link_speed.patch b/package/binutils/2.20.1/400-arm_link_speed.patch similarity index 100% rename from package/binutils/binutils-2.20.1/400-arm_link_speed.patch rename to package/binutils/2.20.1/400-arm_link_speed.patch diff --git a/package/binutils/2.20.1/500-sysroot.patch b/package/binutils/2.20.1/500-sysroot.patch new file mode 100644 index 0000000000..d21e4cb105 --- /dev/null +++ b/package/binutils/2.20.1/500-sysroot.patch @@ -0,0 +1,36 @@ +Signed-off-by: Sven Rebhan + +Always try to prepend the sysroot prefix to absolute filenames first. + +http://bugs.gentoo.org/275666 +http://sourceware.org/bugzilla/show_bug.cgi?id=10340 + +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -308,18 +308,24 @@ + directory first. */ + if (! entry->is_archive) + { +- if (entry->sysrooted && IS_ABSOLUTE_PATH (entry->filename)) ++ /* For absolute pathnames, try to always open the file in the ++ sysroot first. If this fails, try to open the file at the ++ given location. */ ++ entry->sysrooted = is_sysrooted_pathname(entry->filename, FALSE); ++ if (IS_ABSOLUTE_PATH (entry->filename) && ld_sysroot && ! entry->sysrooted) + { + char *name = concat (ld_sysroot, entry->filename, + (const char *) NULL); + if (ldfile_try_open_bfd (name, entry)) + { + entry->filename = name; ++ entry->sysrooted = TRUE; + return TRUE; + } + free (name); + } +- else if (ldfile_try_open_bfd (entry->filename, entry)) ++ ++ if (ldfile_try_open_bfd (entry->filename, entry)) + { + entry->sysrooted = IS_ABSOLUTE_PATH (entry->filename) + && is_sysrooted_pathname (entry->filename, TRUE); diff --git a/package/binutils/binutils-2.19/110-arm-eabi-conf.patch b/package/binutils/2.21.1/110-arm-eabi-conf.patch similarity index 100% rename from package/binutils/binutils-2.19/110-arm-eabi-conf.patch rename to package/binutils/2.21.1/110-arm-eabi-conf.patch diff --git a/package/binutils/binutils-2.19/120-sh-conf.patch b/package/binutils/2.21.1/120-sh-conf.patch similarity index 100% rename from package/binutils/binutils-2.19/120-sh-conf.patch rename to package/binutils/2.21.1/120-sh-conf.patch diff --git a/package/binutils/binutils-2.19.1/300-001_ld_makefile_patch.patch b/package/binutils/2.21.1/300-001_ld_makefile_patch.patch similarity index 100% rename from package/binutils/binutils-2.19.1/300-001_ld_makefile_patch.patch rename to package/binutils/2.21.1/300-001_ld_makefile_patch.patch diff --git a/package/binutils/binutils-2.21/300-012_check_ldrunpath_length.patch b/package/binutils/2.21.1/300-012_check_ldrunpath_length.patch similarity index 100% rename from package/binutils/binutils-2.21/300-012_check_ldrunpath_length.patch rename to package/binutils/2.21.1/300-012_check_ldrunpath_length.patch diff --git a/package/binutils/2.21.1/500-sysroot.patch b/package/binutils/2.21.1/500-sysroot.patch new file mode 100644 index 0000000000..d21e4cb105 --- /dev/null +++ b/package/binutils/2.21.1/500-sysroot.patch @@ -0,0 +1,36 @@ +Signed-off-by: Sven Rebhan + +Always try to prepend the sysroot prefix to absolute filenames first. + +http://bugs.gentoo.org/275666 +http://sourceware.org/bugzilla/show_bug.cgi?id=10340 + +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -308,18 +308,24 @@ + directory first. */ + if (! entry->is_archive) + { +- if (entry->sysrooted && IS_ABSOLUTE_PATH (entry->filename)) ++ /* For absolute pathnames, try to always open the file in the ++ sysroot first. If this fails, try to open the file at the ++ given location. */ ++ entry->sysrooted = is_sysrooted_pathname(entry->filename, FALSE); ++ if (IS_ABSOLUTE_PATH (entry->filename) && ld_sysroot && ! entry->sysrooted) + { + char *name = concat (ld_sysroot, entry->filename, + (const char *) NULL); + if (ldfile_try_open_bfd (name, entry)) + { + entry->filename = name; ++ entry->sysrooted = TRUE; + return TRUE; + } + free (name); + } +- else if (ldfile_try_open_bfd (entry->filename, entry)) ++ ++ if (ldfile_try_open_bfd (entry->filename, entry)) + { + entry->sysrooted = IS_ABSOLUTE_PATH (entry->filename) + && is_sysrooted_pathname (entry->filename, TRUE); diff --git a/package/binutils/binutils-2.20.1/110-arm-eabi-conf.patch b/package/binutils/2.21/110-arm-eabi-conf.patch similarity index 100% rename from package/binutils/binutils-2.20.1/110-arm-eabi-conf.patch rename to package/binutils/2.21/110-arm-eabi-conf.patch diff --git a/package/binutils/binutils-2.20.1/120-sh-conf.patch b/package/binutils/2.21/120-sh-conf.patch similarity index 100% rename from package/binutils/binutils-2.20.1/120-sh-conf.patch rename to package/binutils/2.21/120-sh-conf.patch diff --git a/package/binutils/binutils-2.19/300-001_ld_makefile_patch.patch b/package/binutils/2.21/300-001_ld_makefile_patch.patch similarity index 100% rename from package/binutils/binutils-2.19/300-001_ld_makefile_patch.patch rename to package/binutils/2.21/300-001_ld_makefile_patch.patch diff --git a/package/binutils/2.21/300-012_check_ldrunpath_length.patch b/package/binutils/2.21/300-012_check_ldrunpath_length.patch new file mode 100644 index 0000000000..df783109bb --- /dev/null +++ b/package/binutils/2.21/300-012_check_ldrunpath_length.patch @@ -0,0 +1,21 @@ +diff -Nura binutils-2.21.orig/ld/emultempl/elf32.em binutils-2.21/ld/emultempl/elf32.em +--- binutils-2.21.orig/ld/emultempl/elf32.em 2010-10-29 09:10:36.000000000 -0300 ++++ binutils-2.21/ld/emultempl/elf32.em 2010-12-10 09:26:56.746102724 -0300 +@@ -1270,6 +1270,8 @@ + && command_line.rpath == NULL) + { + lib_path = (const char *) getenv ("LD_RUN_PATH"); ++ if ((lib_path) && (strlen (lib_path) == 0)) ++ lib_path = NULL; + if (gld${EMULATION_NAME}_search_needed (lib_path, &n, + force)) + break; +@@ -1497,6 +1499,8 @@ + rpath = command_line.rpath; + if (rpath == NULL) + rpath = (const char *) getenv ("LD_RUN_PATH"); ++ if ((rpath) && (strlen (rpath) == 0)) ++ rpath = NULL; + + for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next) + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) diff --git a/package/binutils/2.21/500-sysroot.patch b/package/binutils/2.21/500-sysroot.patch new file mode 100644 index 0000000000..d21e4cb105 --- /dev/null +++ b/package/binutils/2.21/500-sysroot.patch @@ -0,0 +1,36 @@ +Signed-off-by: Sven Rebhan + +Always try to prepend the sysroot prefix to absolute filenames first. + +http://bugs.gentoo.org/275666 +http://sourceware.org/bugzilla/show_bug.cgi?id=10340 + +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -308,18 +308,24 @@ + directory first. */ + if (! entry->is_archive) + { +- if (entry->sysrooted && IS_ABSOLUTE_PATH (entry->filename)) ++ /* For absolute pathnames, try to always open the file in the ++ sysroot first. If this fails, try to open the file at the ++ given location. */ ++ entry->sysrooted = is_sysrooted_pathname(entry->filename, FALSE); ++ if (IS_ABSOLUTE_PATH (entry->filename) && ld_sysroot && ! entry->sysrooted) + { + char *name = concat (ld_sysroot, entry->filename, + (const char *) NULL); + if (ldfile_try_open_bfd (name, entry)) + { + entry->filename = name; ++ entry->sysrooted = TRUE; + return TRUE; + } + free (name); + } +- else if (ldfile_try_open_bfd (entry->filename, entry)) ++ ++ if (ldfile_try_open_bfd (entry->filename, entry)) + { + entry->sysrooted = IS_ABSOLUTE_PATH (entry->filename) + && is_sysrooted_pathname (entry->filename, TRUE); diff --git a/package/binutils/2.22/120-sh-conf.patch b/package/binutils/2.22/120-sh-conf.patch new file mode 100644 index 0000000000..ea3d1b6068 --- /dev/null +++ b/package/binutils/2.22/120-sh-conf.patch @@ -0,0 +1,29 @@ +r10231 | lethal | 2005-05-02 09:58:00 -0400 (Mon, 02 May 2005) | 13 lines + +Likewise, binutils has no idea about any of these new targets either, so we +fix that up too.. now we're able to actually build a real toolchain for +sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more +inept targets than that one, really. Go look, I promise). + +--- a/configure ++++ b/configure +@@ -1495,7 +1495,7 @@ + mips*-*-*) + noconfigdirs="$noconfigdirs gprof" + ;; +- sh-*-* | sh64-*-*) ++ sh*-*-* | sh64-*-*) + case "${target}" in + sh*-*-elf) + ;; +--- a/configure.ac ++++ b/configure.ac +@@ -712,7 +712,7 @@ + mips*-*-*) + noconfigdirs="$noconfigdirs gprof" + ;; +- sh-*-* | sh64-*-*) ++ sh*-*-* | sh64-*-*) + case "${target}" in + sh*-*-elf) + ;; diff --git a/package/binutils/binutils-2.20.1/300-001_ld_makefile_patch.patch b/package/binutils/2.22/300-001_ld_makefile_patch.patch similarity index 100% rename from package/binutils/binutils-2.20.1/300-001_ld_makefile_patch.patch rename to package/binutils/2.22/300-001_ld_makefile_patch.patch diff --git a/package/binutils/2.22/300-012_check_ldrunpath_length.patch b/package/binutils/2.22/300-012_check_ldrunpath_length.patch new file mode 100644 index 0000000000..df783109bb --- /dev/null +++ b/package/binutils/2.22/300-012_check_ldrunpath_length.patch @@ -0,0 +1,21 @@ +diff -Nura binutils-2.21.orig/ld/emultempl/elf32.em binutils-2.21/ld/emultempl/elf32.em +--- binutils-2.21.orig/ld/emultempl/elf32.em 2010-10-29 09:10:36.000000000 -0300 ++++ binutils-2.21/ld/emultempl/elf32.em 2010-12-10 09:26:56.746102724 -0300 +@@ -1270,6 +1270,8 @@ + && command_line.rpath == NULL) + { + lib_path = (const char *) getenv ("LD_RUN_PATH"); ++ if ((lib_path) && (strlen (lib_path) == 0)) ++ lib_path = NULL; + if (gld${EMULATION_NAME}_search_needed (lib_path, &n, + force)) + break; +@@ -1497,6 +1499,8 @@ + rpath = command_line.rpath; + if (rpath == NULL) + rpath = (const char *) getenv ("LD_RUN_PATH"); ++ if ((rpath) && (strlen (rpath) == 0)) ++ rpath = NULL; + + for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next) + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) diff --git a/package/binutils/2.22/500-sysroot.patch b/package/binutils/2.22/500-sysroot.patch new file mode 100644 index 0000000000..d21e4cb105 --- /dev/null +++ b/package/binutils/2.22/500-sysroot.patch @@ -0,0 +1,36 @@ +Signed-off-by: Sven Rebhan + +Always try to prepend the sysroot prefix to absolute filenames first. + +http://bugs.gentoo.org/275666 +http://sourceware.org/bugzilla/show_bug.cgi?id=10340 + +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -308,18 +308,24 @@ + directory first. */ + if (! entry->is_archive) + { +- if (entry->sysrooted && IS_ABSOLUTE_PATH (entry->filename)) ++ /* For absolute pathnames, try to always open the file in the ++ sysroot first. If this fails, try to open the file at the ++ given location. */ ++ entry->sysrooted = is_sysrooted_pathname(entry->filename, FALSE); ++ if (IS_ABSOLUTE_PATH (entry->filename) && ld_sysroot && ! entry->sysrooted) + { + char *name = concat (ld_sysroot, entry->filename, + (const char *) NULL); + if (ldfile_try_open_bfd (name, entry)) + { + entry->filename = name; ++ entry->sysrooted = TRUE; + return TRUE; + } + free (name); + } +- else if (ldfile_try_open_bfd (entry->filename, entry)) ++ ++ if (ldfile_try_open_bfd (entry->filename, entry)) + { + entry->sysrooted = IS_ABSOLUTE_PATH (entry->filename) + && is_sysrooted_pathname (entry->filename, TRUE); diff --git a/package/binutils/2.22/999-ppc-textrels.patch b/package/binutils/2.22/999-ppc-textrels.patch new file mode 100644 index 0000000000..c1efacf249 --- /dev/null +++ b/package/binutils/2.22/999-ppc-textrels.patch @@ -0,0 +1,80 @@ +http://bugs.gentoo.org/392645 +http://sourceware.org/bugzilla/show_bug.cgi?id=13470 + +2011-12-03 Alan Modra + + PR ld/13470 + * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Revert substantive + change in 2011-07-01 commit. Comment. + * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise. + +=================================================================== +RCS file: /cvs/src/src/bfd/elf32-ppc.c,v +retrieving revision 1.302.2.1 +retrieving revision 1.302.2.2 +diff -u -r1.302.2.1 -r1.302.2.2 +--- src/bfd/elf32-ppc.c 2011/11/15 11:36:52 1.302.2.1 ++++ src/bfd/elf32-ppc.c 2011/12/03 00:58:01 1.302.2.2 +@@ -2987,10 +2987,6 @@ + edir->elf.needs_plt |= eind->elf.needs_plt; + edir->elf.pointer_equality_needed |= eind->elf.pointer_equality_needed; + +- /* If we were called to copy over info for a weak sym, that's all. */ +- if (eind->elf.root.type != bfd_link_hash_indirect) +- return; +- + if (eind->dyn_relocs != NULL) + { + if (edir->dyn_relocs != NULL) +@@ -3022,6 +3018,16 @@ + eind->dyn_relocs = NULL; + } + ++ /* If we were called to copy over info for a weak sym, that's all. ++ You might think dyn_relocs need not be copied over; After all, ++ both syms will be dynamic or both non-dynamic so we're just ++ moving reloc accounting around. However, ELIMINATE_COPY_RELOCS ++ code in ppc_elf_adjust_dynamic_symbol needs to check for ++ dyn_relocs in read-only sections, and it does so on what is the ++ DIR sym here. */ ++ if (eind->elf.root.type != bfd_link_hash_indirect) ++ return; ++ + /* Copy over the GOT refcount entries that we may have already seen to + the symbol which just became indirect. */ + edir->elf.got.refcount += eind->elf.got.refcount; +=================================================================== +RCS file: /cvs/src/src/bfd/elf64-ppc.c,v +retrieving revision 1.363.2.4 +retrieving revision 1.363.2.5 +diff -u -r1.363.2.4 -r1.363.2.5 +--- src/bfd/elf64-ppc.c 2011/11/08 13:46:36 1.363.2.4 ++++ src/bfd/elf64-ppc.c 2011/12/03 00:58:02 1.363.2.5 +@@ -4435,10 +4435,6 @@ + edir->elf.ref_regular_nonweak |= eind->elf.ref_regular_nonweak; + edir->elf.needs_plt |= eind->elf.needs_plt; + +- /* If we were called to copy over info for a weak sym, that's all. */ +- if (eind->elf.root.type != bfd_link_hash_indirect) +- return; +- + /* Copy over any dynamic relocs we may have on the indirect sym. */ + if (eind->dyn_relocs != NULL) + { +@@ -4471,6 +4467,16 @@ + eind->dyn_relocs = NULL; + } + ++ /* If we were called to copy over info for a weak sym, that's all. ++ You might think dyn_relocs need not be copied over; After all, ++ both syms will be dynamic or both non-dynamic so we're just ++ moving reloc accounting around. However, ELIMINATE_COPY_RELOCS ++ code in ppc64_elf_adjust_dynamic_symbol needs to check for ++ dyn_relocs in read-only sections, and it does so on what is the ++ DIR sym here. */ ++ if (eind->elf.root.type != bfd_link_hash_indirect) ++ return; ++ + /* Copy over got entries that we may have already seen to the + symbol which just became indirect. */ + if (eind->elf.got.glist != NULL) diff --git a/package/binutils/2.23.1/120-sh-conf.patch b/package/binutils/2.23.1/120-sh-conf.patch new file mode 100644 index 0000000000..ea3d1b6068 --- /dev/null +++ b/package/binutils/2.23.1/120-sh-conf.patch @@ -0,0 +1,29 @@ +r10231 | lethal | 2005-05-02 09:58:00 -0400 (Mon, 02 May 2005) | 13 lines + +Likewise, binutils has no idea about any of these new targets either, so we +fix that up too.. now we're able to actually build a real toolchain for +sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more +inept targets than that one, really. Go look, I promise). + +--- a/configure ++++ b/configure +@@ -1495,7 +1495,7 @@ + mips*-*-*) + noconfigdirs="$noconfigdirs gprof" + ;; +- sh-*-* | sh64-*-*) ++ sh*-*-* | sh64-*-*) + case "${target}" in + sh*-*-elf) + ;; +--- a/configure.ac ++++ b/configure.ac +@@ -712,7 +712,7 @@ + mips*-*-*) + noconfigdirs="$noconfigdirs gprof" + ;; +- sh-*-* | sh64-*-*) ++ sh*-*-* | sh64-*-*) + case "${target}" in + sh*-*-elf) + ;; diff --git a/package/binutils/binutils-2.20/300-001_ld_makefile_patch.patch b/package/binutils/2.23.1/300-001_ld_makefile_patch.patch similarity index 100% rename from package/binutils/binutils-2.20/300-001_ld_makefile_patch.patch rename to package/binutils/2.23.1/300-001_ld_makefile_patch.patch diff --git a/package/binutils/2.23.1/300-012_check_ldrunpath_length.patch b/package/binutils/2.23.1/300-012_check_ldrunpath_length.patch new file mode 100644 index 0000000000..df783109bb --- /dev/null +++ b/package/binutils/2.23.1/300-012_check_ldrunpath_length.patch @@ -0,0 +1,21 @@ +diff -Nura binutils-2.21.orig/ld/emultempl/elf32.em binutils-2.21/ld/emultempl/elf32.em +--- binutils-2.21.orig/ld/emultempl/elf32.em 2010-10-29 09:10:36.000000000 -0300 ++++ binutils-2.21/ld/emultempl/elf32.em 2010-12-10 09:26:56.746102724 -0300 +@@ -1270,6 +1270,8 @@ + && command_line.rpath == NULL) + { + lib_path = (const char *) getenv ("LD_RUN_PATH"); ++ if ((lib_path) && (strlen (lib_path) == 0)) ++ lib_path = NULL; + if (gld${EMULATION_NAME}_search_needed (lib_path, &n, + force)) + break; +@@ -1497,6 +1499,8 @@ + rpath = command_line.rpath; + if (rpath == NULL) + rpath = (const char *) getenv ("LD_RUN_PATH"); ++ if ((rpath) && (strlen (rpath) == 0)) ++ rpath = NULL; + + for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next) + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) diff --git a/package/binutils/2.23.1/500-sysroot.patch b/package/binutils/2.23.1/500-sysroot.patch new file mode 100644 index 0000000000..e49c795332 --- /dev/null +++ b/package/binutils/2.23.1/500-sysroot.patch @@ -0,0 +1,37 @@ +Signed-off-by: Sven Rebhan + +Always try to prepend the sysroot prefix to absolute filenames first. + +http://bugs.gentoo.org/275666 +http://sourceware.org/bugzilla/show_bug.cgi?id=10340 + +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -308,18 +308,25 @@ + directory first. */ + if (! entry->flags.maybe_archive) + { +- if (entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename)) ++ /* For absolute pathnames, try to always open the file in the ++ sysroot first. If this fails, try to open the file at the ++ given location. */ ++ entry->flags.sysrooted = is_sysrooted_pathname (entry->filename); ++ if (!entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename) ++ && ld_sysroot) + { + char *name = concat (ld_sysroot, entry->filename, + (const char *) NULL); + if (ldfile_try_open_bfd (name, entry)) + { + entry->filename = name; ++ entry->flags.sysrooted = TRUE; + return TRUE; + } + free (name); + } +- else if (ldfile_try_open_bfd (entry->filename, entry)) ++ ++ if (ldfile_try_open_bfd (entry->filename, entry)) + return TRUE; + + if (IS_ABSOLUTE_PATH (entry->filename)) diff --git a/package/binutils/2.23.2/120-sh-conf.patch b/package/binutils/2.23.2/120-sh-conf.patch new file mode 100644 index 0000000000..ea3d1b6068 --- /dev/null +++ b/package/binutils/2.23.2/120-sh-conf.patch @@ -0,0 +1,29 @@ +r10231 | lethal | 2005-05-02 09:58:00 -0400 (Mon, 02 May 2005) | 13 lines + +Likewise, binutils has no idea about any of these new targets either, so we +fix that up too.. now we're able to actually build a real toolchain for +sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more +inept targets than that one, really. Go look, I promise). + +--- a/configure ++++ b/configure +@@ -1495,7 +1495,7 @@ + mips*-*-*) + noconfigdirs="$noconfigdirs gprof" + ;; +- sh-*-* | sh64-*-*) ++ sh*-*-* | sh64-*-*) + case "${target}" in + sh*-*-elf) + ;; +--- a/configure.ac ++++ b/configure.ac +@@ -712,7 +712,7 @@ + mips*-*-*) + noconfigdirs="$noconfigdirs gprof" + ;; +- sh-*-* | sh64-*-*) ++ sh*-*-* | sh64-*-*) + case "${target}" in + sh*-*-elf) + ;; diff --git a/package/binutils/binutils-2.21/300-001_ld_makefile_patch.patch b/package/binutils/2.23.2/300-001_ld_makefile_patch.patch similarity index 100% rename from package/binutils/binutils-2.21/300-001_ld_makefile_patch.patch rename to package/binutils/2.23.2/300-001_ld_makefile_patch.patch diff --git a/package/binutils/2.23.2/300-012_check_ldrunpath_length.patch b/package/binutils/2.23.2/300-012_check_ldrunpath_length.patch new file mode 100644 index 0000000000..df783109bb --- /dev/null +++ b/package/binutils/2.23.2/300-012_check_ldrunpath_length.patch @@ -0,0 +1,21 @@ +diff -Nura binutils-2.21.orig/ld/emultempl/elf32.em binutils-2.21/ld/emultempl/elf32.em +--- binutils-2.21.orig/ld/emultempl/elf32.em 2010-10-29 09:10:36.000000000 -0300 ++++ binutils-2.21/ld/emultempl/elf32.em 2010-12-10 09:26:56.746102724 -0300 +@@ -1270,6 +1270,8 @@ + && command_line.rpath == NULL) + { + lib_path = (const char *) getenv ("LD_RUN_PATH"); ++ if ((lib_path) && (strlen (lib_path) == 0)) ++ lib_path = NULL; + if (gld${EMULATION_NAME}_search_needed (lib_path, &n, + force)) + break; +@@ -1497,6 +1499,8 @@ + rpath = command_line.rpath; + if (rpath == NULL) + rpath = (const char *) getenv ("LD_RUN_PATH"); ++ if ((rpath) && (strlen (rpath) == 0)) ++ rpath = NULL; + + for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next) + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) diff --git a/package/binutils/2.23.2/500-sysroot.patch b/package/binutils/2.23.2/500-sysroot.patch new file mode 100644 index 0000000000..e49c795332 --- /dev/null +++ b/package/binutils/2.23.2/500-sysroot.patch @@ -0,0 +1,37 @@ +Signed-off-by: Sven Rebhan + +Always try to prepend the sysroot prefix to absolute filenames first. + +http://bugs.gentoo.org/275666 +http://sourceware.org/bugzilla/show_bug.cgi?id=10340 + +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -308,18 +308,25 @@ + directory first. */ + if (! entry->flags.maybe_archive) + { +- if (entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename)) ++ /* For absolute pathnames, try to always open the file in the ++ sysroot first. If this fails, try to open the file at the ++ given location. */ ++ entry->flags.sysrooted = is_sysrooted_pathname (entry->filename); ++ if (!entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename) ++ && ld_sysroot) + { + char *name = concat (ld_sysroot, entry->filename, + (const char *) NULL); + if (ldfile_try_open_bfd (name, entry)) + { + entry->filename = name; ++ entry->flags.sysrooted = TRUE; + return TRUE; + } + free (name); + } +- else if (ldfile_try_open_bfd (entry->filename, entry)) ++ ++ if (ldfile_try_open_bfd (entry->filename, entry)) + return TRUE; + + if (IS_ABSOLUTE_PATH (entry->filename)) diff --git a/package/binutils/Config.in b/package/binutils/Config.in index 9e4821a7ff..38d519a4c2 100644 --- a/package/binutils/Config.in +++ b/package/binutils/Config.in @@ -1,12 +1,9 @@ config BR2_PACKAGE_BINUTILS - bool "libbfd (binutils)" - depends on BR2_TOOLCHAIN_BUILDROOT + bool "binutils" select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE - select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE + depends on !BR2_aarch64 help - Install libbfd from binutils in the target. - - This is used by oprofile to avoid a full-blown target binutils. + Install binutils on the target config BR2_PACKAGE_BINUTILS_TARGET bool "binutils binaries" diff --git a/package/binutils/Config.in.host b/package/binutils/Config.in.host index 4a5e8eff9a..8f19597060 100644 --- a/package/binutils/Config.in.host +++ b/package/binutils/Config.in.host @@ -2,52 +2,55 @@ comment "Binutils Options" choice prompt "Binutils Version" - default BR2_BINUTILS_VERSION_2_21 + depends on !BR2_arc + default BR2_BINUTILS_VERSION_2_21 if (BR2_mips || BR2_mipsel || BR2_sh) + default BR2_BINUTILS_VERSION_2_22 help Select the version of binutils you wish to use. - config BR2_BINUTILS_VERSION_2_18 - depends on !BR2_avr32 - depends on BR2_DEPRECATED - bool "binutils 2.18" - config BR2_BINUTILS_VERSION_2_18_AVR32_1_0_1 depends on BR2_avr32 bool "binutils 2.18-avr32-1.0.1" - config BR2_BINUTILS_VERSION_2_19 + config BR2_BINUTILS_VERSION_2_20_1 + depends on !BR2_avr32 + depends on !BR2_ARM_EABIHF + bool "binutils 2.20.1" + + config BR2_BINUTILS_VERSION_2_21 depends on !BR2_avr32 - depends on BR2_DEPRECATED - bool "binutils 2.19" + depends on !BR2_ARM_EABIHF + bool "binutils 2.21" - config BR2_BINUTILS_VERSION_2_19_1 + config BR2_BINUTILS_VERSION_2_21_1 depends on !BR2_avr32 - depends on BR2_DEPRECATED - bool "binutils 2.19.1" + depends on !BR2_ARM_EABIHF + bool "binutils 2.21.1" - config BR2_BINUTILS_VERSION_2_20 + config BR2_BINUTILS_VERSION_2_22 depends on !BR2_avr32 - bool "binutils 2.20" + bool "binutils 2.22" - config BR2_BINUTILS_VERSION_2_20_1 + config BR2_BINUTILS_VERSION_2_23_1 depends on !BR2_avr32 - bool "binutils 2.20.1" + bool "binutils 2.23.1" - config BR2_BINUTILS_VERSION_2_21 + config BR2_BINUTILS_VERSION_2_23_2 depends on !BR2_avr32 - bool "binutils 2.21" + bool "binutils 2.23.2" endchoice config BR2_BINUTILS_VERSION string - default "2.18" if BR2_BINUTILS_VERSION_2_18 default "2.18-avr32-1.0.1" if BR2_BINUTILS_VERSION_2_18_AVR32_1_0_1 - default "2.19" if BR2_BINUTILS_VERSION_2_19 - default "2.19.1" if BR2_BINUTILS_VERSION_2_19_1 - default "2.20" if BR2_BINUTILS_VERSION_2_20 + default "2.23.2-arc" if BR2_arc default "2.20.1" if BR2_BINUTILS_VERSION_2_20_1 default "2.21" if BR2_BINUTILS_VERSION_2_21 + default "2.21.1" if BR2_BINUTILS_VERSION_2_21_1 + default "2.22" if BR2_BINUTILS_VERSION_2_22 + default "2.23.1" if BR2_BINUTILS_VERSION_2_23_1 + default "2.23.2" if BR2_BINUTILS_VERSION_2_23_2 config BR2_BINUTILS_EXTRA_CONFIG_OPTIONS string "Additional binutils options" diff --git a/package/binutils/binutils-2.18/100-makeinfo-version.patch b/package/binutils/binutils-2.18/100-makeinfo-version.patch deleted file mode 100644 index d911d6236e..0000000000 --- a/package/binutils/binutils-2.18/100-makeinfo-version.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -u binutils-2.18-orig/configure binutils-2.18/configure ---- binutils-2.18-orig/configure 2007-08-06 16:29:40.000000000 -0400 -+++ binutils-2.18/configure 2007-09-27 22:41:51.000000000 -0400 -@@ -6125,10 +6125,10 @@ - *" texinfo "*) MAKEINFO='$$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo' ;; - *) - -- # For an installed makeinfo, we require it to be from texinfo 4.4 or -+ # For an installed makeinfo, we require it to be from texinfo 4.6 or - # higher, else we use the "missing" dummy. - if ${MAKEINFO} --version \ -- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|[5-9])' >/dev/null 2>&1; then -+ | egrep 'texinfo[^0-9]*(4\.([6-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then - : - else - MAKEINFO="$MISSING makeinfo" -diff -u binutils-2.18-orig/configure.ac binutils-2.18/configure.ac ---- binutils-2.18-orig/configure.ac 2007-08-28 16:24:26.000000000 -0400 -+++ binutils-2.18/configure.ac 2007-09-27 22:41:00.000000000 -0400 -@@ -2400,10 +2400,10 @@ - *" texinfo "*) MAKEINFO='$$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo' ;; - *) - changequote(,) -- # For an installed makeinfo, we require it to be from texinfo 4.4 or -+ # For an installed makeinfo, we require it to be from texinfo 4.6 or - # higher, else we use the "missing" dummy. - if ${MAKEINFO} --version \ -- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|[5-9])' >/dev/null 2>&1; then -+ | egrep 'texinfo[^0-9]*(4\.([6-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then - : - else - MAKEINFO="$MISSING makeinfo" diff --git a/package/binutils/binutils-2.18/110-arm-eabi-conf.patch b/package/binutils/binutils-2.18/110-arm-eabi-conf.patch deleted file mode 100644 index 04e19bea39..0000000000 --- a/package/binutils/binutils-2.18/110-arm-eabi-conf.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -u binutils-2.17.50.0.17.oorig/configure binutils-2.17.50.0.17/configure ---- binutils-2.17.50.0.17.oorig/configure 2007-06-18 19:29:28.000000000 +0200 -+++ binutils-2.17.50.0.17/configure 2007-06-25 09:58:36.000000000 +0200 -@@ -2224,7 +2224,7 @@ - arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* ) - noconfigdirs="$noconfigdirs target-libffi target-qthreads" - ;; -- arm*-*-linux-gnueabi) -+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi) - noconfigdirs="$noconfigdirs target-libffi target-qthreads" - noconfigdirs="$noconfigdirs target-libjava target-libobjc" - ;; -diff -u binutils-2.17.50.0.17.oorig/configure.ac binutils-2.17.50.0.17/configure.ac ---- binutils-2.17.50.0.17.oorig/configure.ac 2007-06-18 19:29:28.000000000 +0200 -+++ binutils-2.17.50.0.17/configure.ac 2007-06-25 09:58:36.000000000 +0200 -@@ -513,7 +513,7 @@ - arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* ) - noconfigdirs="$noconfigdirs target-libffi target-qthreads" - ;; -- arm*-*-linux-gnueabi) -+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi) - noconfigdirs="$noconfigdirs target-libffi target-qthreads" - noconfigdirs="$noconfigdirs target-libjava target-libobjc" - ;; diff --git a/package/binutils/binutils-2.19.1/300-012_check_ldrunpath_length.patch b/package/binutils/binutils-2.19.1/300-012_check_ldrunpath_length.patch deleted file mode 100644 index 6e809213d8..0000000000 --- a/package/binutils/binutils-2.19.1/300-012_check_ldrunpath_length.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -u binutils-2.17.50.0.17.oorig/ld/emultempl/elf32.em binutils-2.17.50.0.17/ld/emultempl/elf32.em ---- binutils-2.17.50.0.17.oorig/ld/emultempl/elf32.em 2007-06-18 19:31:40.000000000 +0200 -+++ binutils-2.17.50.0.17/ld/emultempl/elf32.em 2007-06-25 10:01:25.000000000 +0200 -@@ -1007,6 +1007,8 @@ - && command_line.rpath == NULL) - { - lib_path = (const char *) getenv ("LD_RUN_PATH"); -+ if ((lib_path) && (strlen (lib_path) == 0)) -+ lib_path = NULL; - if (gld${EMULATION_NAME}_search_needed (lib_path, &n, - force)) - break; -@@ -1191,6 +1193,8 @@ - rpath = command_line.rpath; - if (rpath == NULL) - rpath = (const char *) getenv ("LD_RUN_PATH"); -+ if ((rpath) && (strlen (rpath) == 0)) -+ rpath = NULL; - if (! (bfd_elf_size_dynamic_sections - (output_bfd, command_line.soname, rpath, - command_line.filter_shlib, diff --git a/package/binutils/binutils-2.19/300-012_check_ldrunpath_length.patch b/package/binutils/binutils-2.19/300-012_check_ldrunpath_length.patch deleted file mode 100644 index 6e809213d8..0000000000 --- a/package/binutils/binutils-2.19/300-012_check_ldrunpath_length.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -u binutils-2.17.50.0.17.oorig/ld/emultempl/elf32.em binutils-2.17.50.0.17/ld/emultempl/elf32.em ---- binutils-2.17.50.0.17.oorig/ld/emultempl/elf32.em 2007-06-18 19:31:40.000000000 +0200 -+++ binutils-2.17.50.0.17/ld/emultempl/elf32.em 2007-06-25 10:01:25.000000000 +0200 -@@ -1007,6 +1007,8 @@ - && command_line.rpath == NULL) - { - lib_path = (const char *) getenv ("LD_RUN_PATH"); -+ if ((lib_path) && (strlen (lib_path) == 0)) -+ lib_path = NULL; - if (gld${EMULATION_NAME}_search_needed (lib_path, &n, - force)) - break; -@@ -1191,6 +1193,8 @@ - rpath = command_line.rpath; - if (rpath == NULL) - rpath = (const char *) getenv ("LD_RUN_PATH"); -+ if ((rpath) && (strlen (rpath) == 0)) -+ rpath = NULL; - if (! (bfd_elf_size_dynamic_sections - (output_bfd, command_line.soname, rpath, - command_line.filter_shlib, diff --git a/package/binutils/binutils-2.20.1/300-012_check_ldrunpath_length.patch b/package/binutils/binutils-2.20.1/300-012_check_ldrunpath_length.patch deleted file mode 100644 index 6e809213d8..0000000000 --- a/package/binutils/binutils-2.20.1/300-012_check_ldrunpath_length.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -u binutils-2.17.50.0.17.oorig/ld/emultempl/elf32.em binutils-2.17.50.0.17/ld/emultempl/elf32.em ---- binutils-2.17.50.0.17.oorig/ld/emultempl/elf32.em 2007-06-18 19:31:40.000000000 +0200 -+++ binutils-2.17.50.0.17/ld/emultempl/elf32.em 2007-06-25 10:01:25.000000000 +0200 -@@ -1007,6 +1007,8 @@ - && command_line.rpath == NULL) - { - lib_path = (const char *) getenv ("LD_RUN_PATH"); -+ if ((lib_path) && (strlen (lib_path) == 0)) -+ lib_path = NULL; - if (gld${EMULATION_NAME}_search_needed (lib_path, &n, - force)) - break; -@@ -1191,6 +1193,8 @@ - rpath = command_line.rpath; - if (rpath == NULL) - rpath = (const char *) getenv ("LD_RUN_PATH"); -+ if ((rpath) && (strlen (rpath) == 0)) -+ rpath = NULL; - if (! (bfd_elf_size_dynamic_sections - (output_bfd, command_line.soname, rpath, - command_line.filter_shlib, diff --git a/package/binutils/binutils-2.20/110-arm-eabi-conf.patch b/package/binutils/binutils-2.20/110-arm-eabi-conf.patch deleted file mode 100644 index af26329d90..0000000000 --- a/package/binutils/binutils-2.20/110-arm-eabi-conf.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -rdup binutils-2.18.50.0.3.orig/configure binutils-2.18.50.0.3/configure ---- binutils-2.18.50.0.3.orig/configure 2007-11-22 12:41:26.000000000 +0100 -+++ binutils-2.18.50.0.3/configure 2007-11-22 12:45:01.000000000 +0100 -@@ -2245,7 +2245,7 @@ case "${target}" in - noconfigdirs="$noconfigdirs target-libffi target-qthreads" - libgloss_dir=arm - ;; -- arm*-*-linux-gnueabi) -+ arm*-*-linux-*gnueabi) - noconfigdirs="$noconfigdirs target-qthreads" - noconfigdirs="$noconfigdirs target-libobjc" - case ${with_newlib} in -diff -rdup binutils-2.18.50.0.3.orig/configure.ac binutils-2.18.50.0.3/configure.ac ---- binutils-2.18.50.0.3.orig/configure.ac 2007-11-22 12:41:26.000000000 +0100 -+++ binutils-2.18.50.0.3/configure.ac 2007-11-22 12:44:54.000000000 +0100 -@@ -522,7 +522,7 @@ case "${target}" in - noconfigdirs="$noconfigdirs target-libffi target-qthreads" - libgloss_dir=arm - ;; -- arm*-*-linux-gnueabi) -+ arm*-*-linux-*gnueabi) - noconfigdirs="$noconfigdirs target-qthreads" - noconfigdirs="$noconfigdirs target-libobjc" - case ${with_newlib} in diff --git a/package/binutils/binutils-2.20/120-sh-conf.patch b/package/binutils/binutils-2.20/120-sh-conf.patch deleted file mode 100644 index 071d15a41b..0000000000 --- a/package/binutils/binutils-2.20/120-sh-conf.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -rdup binutils-2.18.50.0.9.old/configure binutils-2.18.50.0.9/configure ---- binutils-2.18.50.0.9.old/configure 2008-08-23 17:36:13.000000000 +0200 -+++ binutils-2.18.50.0.9/configure 2008-10-14 14:25:22.000000000 +0200 -@@ -2281,7 +2281,7 @@ case "${target}" in - am33_2.0-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; -- sh-*-linux*) -+ sh*-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; - sh*-*-pe|mips*-*-pe|*arm-wince-pe) -@@ -2606,7 +2606,7 @@ case "${target}" in - romp-*-*) - noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}" - ;; -- sh-*-* | sh64-*-*) -+ sh*-*-* | sh64-*-*) - case "${host}" in - i[3456789]86-*-vsta) ;; # don't add gprof back in - i[3456789]86-*-go32*) ;; # don't add gprof back in -diff -rdup binutils-2.18.50.0.9.old/configure.ac binutils-2.18.50.0.9/configure.ac ---- binutils-2.18.50.0.9.old/configure.ac 2008-08-23 17:36:13.000000000 +0200 -+++ binutils-2.18.50.0.9/configure.ac 2008-10-14 14:25:11.000000000 +0200 -@@ -530,7 +530,7 @@ case "${target}" in - am33_2.0-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; -- sh-*-linux*) -+ sh*-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; - sh*-*-pe|mips*-*-pe|*arm-wince-pe) -@@ -855,7 +855,7 @@ case "${target}" in - romp-*-*) - noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}" - ;; -- sh-*-* | sh64-*-*) -+ sh*-*-* | sh64-*-*) - case "${host}" in - i[[3456789]]86-*-vsta) ;; # don't add gprof back in - i[[3456789]]86-*-go32*) ;; # don't add gprof back in diff --git a/package/binutils/binutils-2.20/300-012_check_ldrunpath_length.patch b/package/binutils/binutils-2.20/300-012_check_ldrunpath_length.patch deleted file mode 100644 index 6e809213d8..0000000000 --- a/package/binutils/binutils-2.20/300-012_check_ldrunpath_length.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -u binutils-2.17.50.0.17.oorig/ld/emultempl/elf32.em binutils-2.17.50.0.17/ld/emultempl/elf32.em ---- binutils-2.17.50.0.17.oorig/ld/emultempl/elf32.em 2007-06-18 19:31:40.000000000 +0200 -+++ binutils-2.17.50.0.17/ld/emultempl/elf32.em 2007-06-25 10:01:25.000000000 +0200 -@@ -1007,6 +1007,8 @@ - && command_line.rpath == NULL) - { - lib_path = (const char *) getenv ("LD_RUN_PATH"); -+ if ((lib_path) && (strlen (lib_path) == 0)) -+ lib_path = NULL; - if (gld${EMULATION_NAME}_search_needed (lib_path, &n, - force)) - break; -@@ -1191,6 +1193,8 @@ - rpath = command_line.rpath; - if (rpath == NULL) - rpath = (const char *) getenv ("LD_RUN_PATH"); -+ if ((rpath) && (strlen (rpath) == 0)) -+ rpath = NULL; - if (! (bfd_elf_size_dynamic_sections - (output_bfd, command_line.soname, rpath, - command_line.filter_shlib, diff --git a/package/binutils/binutils-2.20/400-arm_link_speed.patch b/package/binutils/binutils-2.20/400-arm_link_speed.patch deleted file mode 100644 index d03385a13b..0000000000 --- a/package/binutils/binutils-2.20/400-arm_link_speed.patch +++ /dev/null @@ -1,183 +0,0 @@ -From Binutils CVS: - -http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf32-arm.c?rev=1.230&content-type=text/x-cvsweb-markup&cvsroot=src - -Improves linking time from large projects on ARM. -diff -dupr binutils-2.20.orig/bfd/elf32-arm.c binutils-2.20/bfd/elf32-arm.c ---- binutils-2.20.orig/bfd/elf32-arm.c 2010-04-19 10:08:50.000000000 -0700 -+++ binutils-2.20/bfd/elf32-arm.c 2010-04-19 10:12:45.000000000 -0700 -@@ -12736,108 +12736,15 @@ elf32_arm_section_from_shdr (bfd *abfd, - return TRUE; - } - --/* A structure used to record a list of sections, independently -- of the next and prev fields in the asection structure. */ --typedef struct section_list --{ -- asection * sec; -- struct section_list * next; -- struct section_list * prev; --} --section_list; -- --/* Unfortunately we need to keep a list of sections for which -- an _arm_elf_section_data structure has been allocated. This -- is because it is possible for functions like elf32_arm_write_section -- to be called on a section which has had an elf_data_structure -- allocated for it (and so the used_by_bfd field is valid) but -- for which the ARM extended version of this structure - the -- _arm_elf_section_data structure - has not been allocated. */ --static section_list * sections_with_arm_elf_section_data = NULL; -- --static void --record_section_with_arm_elf_section_data (asection * sec) --{ -- struct section_list * entry; -- -- entry = bfd_malloc (sizeof (* entry)); -- if (entry == NULL) -- return; -- entry->sec = sec; -- entry->next = sections_with_arm_elf_section_data; -- entry->prev = NULL; -- if (entry->next != NULL) -- entry->next->prev = entry; -- sections_with_arm_elf_section_data = entry; --} -- --static struct section_list * --find_arm_elf_section_entry (asection * sec) --{ -- struct section_list * entry; -- static struct section_list * last_entry = NULL; -- -- /* This is a short cut for the typical case where the sections are added -- to the sections_with_arm_elf_section_data list in forward order and -- then looked up here in backwards order. This makes a real difference -- to the ld-srec/sec64k.exp linker test. */ -- entry = sections_with_arm_elf_section_data; -- if (last_entry != NULL) -- { -- if (last_entry->sec == sec) -- entry = last_entry; -- else if (last_entry->next != NULL -- && last_entry->next->sec == sec) -- entry = last_entry->next; -- } -- -- for (; entry; entry = entry->next) -- if (entry->sec == sec) -- break; -- -- if (entry) -- /* Record the entry prior to this one - it is the entry we are most -- likely to want to locate next time. Also this way if we have been -- called from unrecord_section_with_arm_elf_section_data() we will not -- be caching a pointer that is about to be freed. */ -- last_entry = entry->prev; -- -- return entry; --} -- - static _arm_elf_section_data * - get_arm_elf_section_data (asection * sec) - { -- struct section_list * entry; -- -- entry = find_arm_elf_section_entry (sec); -- -- if (entry) -- return elf32_arm_section_data (entry->sec); -+ if (sec && sec->owner && is_arm_elf (sec->owner)) -+ return elf32_arm_section_data (sec); - else - return NULL; - } - --static void --unrecord_section_with_arm_elf_section_data (asection * sec) --{ -- struct section_list * entry; -- -- entry = find_arm_elf_section_entry (sec); -- -- if (entry) -- { -- if (entry->prev != NULL) -- entry->prev->next = entry->next; -- if (entry->next != NULL) -- entry->next->prev = entry->prev; -- if (entry == sections_with_arm_elf_section_data) -- sections_with_arm_elf_section_data = entry->next; -- free (entry); -- } --} -- -- - typedef struct - { - void *finfo; -@@ -13230,8 +13137,6 @@ elf32_arm_new_section_hook (bfd *abfd, a - sec->used_by_bfd = sdata; - } - -- record_section_with_arm_elf_section_data (sec); -- - return _bfd_elf_new_section_hook (abfd, sec); - } - -@@ -13659,44 +13564,13 @@ elf32_arm_write_section (bfd *output_bfd - } - - free (map); -- arm_data->mapcount = 0; -+ arm_data->mapcount = -1; - arm_data->mapsize = 0; - arm_data->map = NULL; -- unrecord_section_with_arm_elf_section_data (sec); - - return FALSE; - } - --static void --unrecord_section_via_map_over_sections (bfd * abfd ATTRIBUTE_UNUSED, -- asection * sec, -- void * ignore ATTRIBUTE_UNUSED) --{ -- unrecord_section_with_arm_elf_section_data (sec); --} -- --static bfd_boolean --elf32_arm_close_and_cleanup (bfd * abfd) --{ -- if (abfd->sections) -- bfd_map_over_sections (abfd, -- unrecord_section_via_map_over_sections, -- NULL); -- -- return _bfd_elf_close_and_cleanup (abfd); --} -- --static bfd_boolean --elf32_arm_bfd_free_cached_info (bfd * abfd) --{ -- if (abfd->sections) -- bfd_map_over_sections (abfd, -- unrecord_section_via_map_over_sections, -- NULL); -- -- return _bfd_free_cached_info (abfd); --} -- - /* Display STT_ARM_TFUNC symbols as functions. */ - - static void -@@ -13882,8 +13756,6 @@ const struct elf_size_info elf32_arm_siz - #define bfd_elf32_find_inliner_info elf32_arm_find_inliner_info - #define bfd_elf32_new_section_hook elf32_arm_new_section_hook - #define bfd_elf32_bfd_is_target_special_symbol elf32_arm_is_target_special_symbol --#define bfd_elf32_close_and_cleanup elf32_arm_close_and_cleanup --#define bfd_elf32_bfd_free_cached_info elf32_arm_bfd_free_cached_info - #define bfd_elf32_bfd_final_link elf32_arm_final_link - - #define elf_backend_get_symbol_type elf32_arm_get_symbol_type diff --git a/package/binutils/binutils-2.21/110-arm-eabi-conf.patch b/package/binutils/binutils-2.21/110-arm-eabi-conf.patch deleted file mode 100644 index af26329d90..0000000000 --- a/package/binutils/binutils-2.21/110-arm-eabi-conf.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -rdup binutils-2.18.50.0.3.orig/configure binutils-2.18.50.0.3/configure ---- binutils-2.18.50.0.3.orig/configure 2007-11-22 12:41:26.000000000 +0100 -+++ binutils-2.18.50.0.3/configure 2007-11-22 12:45:01.000000000 +0100 -@@ -2245,7 +2245,7 @@ case "${target}" in - noconfigdirs="$noconfigdirs target-libffi target-qthreads" - libgloss_dir=arm - ;; -- arm*-*-linux-gnueabi) -+ arm*-*-linux-*gnueabi) - noconfigdirs="$noconfigdirs target-qthreads" - noconfigdirs="$noconfigdirs target-libobjc" - case ${with_newlib} in -diff -rdup binutils-2.18.50.0.3.orig/configure.ac binutils-2.18.50.0.3/configure.ac ---- binutils-2.18.50.0.3.orig/configure.ac 2007-11-22 12:41:26.000000000 +0100 -+++ binutils-2.18.50.0.3/configure.ac 2007-11-22 12:44:54.000000000 +0100 -@@ -522,7 +522,7 @@ case "${target}" in - noconfigdirs="$noconfigdirs target-libffi target-qthreads" - libgloss_dir=arm - ;; -- arm*-*-linux-gnueabi) -+ arm*-*-linux-*gnueabi) - noconfigdirs="$noconfigdirs target-qthreads" - noconfigdirs="$noconfigdirs target-libobjc" - case ${with_newlib} in diff --git a/package/binutils/binutils-2.21/120-sh-conf.patch b/package/binutils/binutils-2.21/120-sh-conf.patch deleted file mode 100644 index 071d15a41b..0000000000 --- a/package/binutils/binutils-2.21/120-sh-conf.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -rdup binutils-2.18.50.0.9.old/configure binutils-2.18.50.0.9/configure ---- binutils-2.18.50.0.9.old/configure 2008-08-23 17:36:13.000000000 +0200 -+++ binutils-2.18.50.0.9/configure 2008-10-14 14:25:22.000000000 +0200 -@@ -2281,7 +2281,7 @@ case "${target}" in - am33_2.0-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; -- sh-*-linux*) -+ sh*-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; - sh*-*-pe|mips*-*-pe|*arm-wince-pe) -@@ -2606,7 +2606,7 @@ case "${target}" in - romp-*-*) - noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}" - ;; -- sh-*-* | sh64-*-*) -+ sh*-*-* | sh64-*-*) - case "${host}" in - i[3456789]86-*-vsta) ;; # don't add gprof back in - i[3456789]86-*-go32*) ;; # don't add gprof back in -diff -rdup binutils-2.18.50.0.9.old/configure.ac binutils-2.18.50.0.9/configure.ac ---- binutils-2.18.50.0.9.old/configure.ac 2008-08-23 17:36:13.000000000 +0200 -+++ binutils-2.18.50.0.9/configure.ac 2008-10-14 14:25:11.000000000 +0200 -@@ -530,7 +530,7 @@ case "${target}" in - am33_2.0-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; -- sh-*-linux*) -+ sh*-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; - sh*-*-pe|mips*-*-pe|*arm-wince-pe) -@@ -855,7 +855,7 @@ case "${target}" in - romp-*-*) - noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}" - ;; -- sh-*-* | sh64-*-*) -+ sh*-*-* | sh64-*-*) - case "${host}" in - i[[3456789]]86-*-vsta) ;; # don't add gprof back in - i[[3456789]]86-*-go32*) ;; # don't add gprof back in diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk index 5454af89c4..b3ccee2bcb 100644 --- a/package/binutils/binutils.mk +++ b/package/binutils/binutils.mk @@ -1,24 +1,44 @@ -############################################################# +################################################################################ # # binutils # -############################################################# +################################################################################ +# Version is set when using buildroot toolchain. +# If not, we do like other packages BINUTILS_VERSION = $(call qstrip,$(BR2_BINUTILS_VERSION)) +ifeq ($(BINUTILS_VERSION),) +ifeq ($(BR2_avr32),y) +# avr32 uses a special version +BINUTILS_VERSION = 2.18-avr32-1.0.1 +else +BINUTILS_VERSION = 2.21 +endif +endif + +ifeq ($(BINUTILS_VERSION),2.23) +BINUTILS_SOURCE = binutils-$(BINUTILS_VERSION).tar.gz +else BINUTILS_SOURCE = binutils-$(BINUTILS_VERSION).tar.bz2 +endif + BINUTILS_SITE = $(BR2_GNU_MIRROR)/binutils ifeq ($(ARCH),avr32) BINUTILS_SITE = ftp://www.at91.com/pub/buildroot endif +ifeq ($(BR2_arc),y) +BINUTILS_SITE = $(BR2_ARC_SITE) +endif BINUTILS_EXTRA_CONFIG_OPTIONS = $(call qstrip,$(BR2_BINUTILS_EXTRA_CONFIG_OPTIONS)) BINUTILS_INSTALL_STAGING = YES -BINUTILS_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl) +BINUTILS_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) +BINUTILS_LICENSE = GPLv3+, libiberty LGPLv2.1+ +BINUTILS_LICENSE_FILES = COPYING3 COPYING.LIB # We need to specify host & target to avoid breaking ARM EABI BINUTILS_CONF_OPT = --disable-multilib --disable-werror \ - --host=$(REAL_GNU_TARGET_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - --enable-shared \ + --host=$(GNU_TARGET_NAME) \ + --target=$(GNU_TARGET_NAME) \ $(BINUTILS_EXTRA_CONFIG_OPTIONS) # Install binutils after busybox to prefer full-blown utilities @@ -29,27 +49,36 @@ endif # "host" binutils should actually be "cross" # We just keep the convention of "host utility" for now HOST_BINUTILS_CONF_OPT = --disable-multilib --disable-werror \ - --target=$(REAL_GNU_TARGET_NAME) \ - $(BR2_CONFIGURE_STAGING_SYSROOT) \ + --target=$(GNU_TARGET_NAME) \ + --disable-shared --enable-static \ + --with-sysroot=$(STAGING_DIR) \ $(BINUTILS_EXTRA_CONFIG_OPTIONS) -# We just want libbfd, not the full-blown binutils in staging +HOST_BINUTILS_DEPENDENCIES = + +# We just want libbfd and libiberty, not the full-blown binutils in staging define BINUTILS_INSTALL_STAGING_CMDS $(MAKE) -C $(@D)/bfd DESTDIR=$(STAGING_DIR) install + $(MAKE) -C $(@D)/libiberty DESTDIR=$(STAGING_DIR) install endef -# only libbfd in the target... -BINUTILS_INSTALL_FROM = $(@D)/bfd - -# unless we want full... -ifeq ($(BR2_PACKAGE_BINUTILS_TARGET),y) -BINUTILS_INSTALL_FROM = $(@D) +# If we don't want full binutils on target +ifneq ($(BR2_PACKAGE_BINUTILS_TARGET),y) +define BINUTILS_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/bfd DESTDIR=$(TARGET_DIR) install + $(MAKE) -C $(@D)/libiberty DESTDIR=$(STAGING_DIR) install +endef endif -define BINUTILS_INSTALL_TARGET_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(BINUTILS_INSTALL_FROM) \ - DESTDIR=$(TARGET_DIR) install +XTENSA_CORE_NAME = $(call qstrip, $(BR2_XTENSA_CORE_NAME)) +ifneq ($(XTENSA_CORE_NAME),) +define BINUTILS_XTENSA_PRE_PATCH + tar xf $(BR2_XTENSA_OVERLAY_DIR)/xtensa_$(XTENSA_CORE_NAME).tar \ + -C $(@D) --strip-components=1 binutils endef +BINUTILS_PRE_PATCH_HOOKS += BINUTILS_XTENSA_PRE_PATCH +HOST_BINUTILS_PRE_PATCH_HOOKS += BINUTILS_XTENSA_PRE_PATCH +endif -$(eval $(call AUTOTARGETS,package,binutils)) -$(eval $(call AUTOTARGETS,package,binutils,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/bison/Config.in b/package/bison/Config.in index e8aa0b60f0..4a50f41bf8 100644 --- a/package/bison/Config.in +++ b/package/bison/Config.in @@ -1,6 +1,9 @@ config BR2_PACKAGE_BISON bool "bison" depends on BR2_USE_WCHAR + select BR2_PACKAGE_M4 + # m4 uses fork() + depends on BR2_USE_MMU help General-purpose parser generator that converts a grammar description for an LALR context-free grammar into a C @@ -8,5 +11,5 @@ config BR2_PACKAGE_BISON http://www.gnu.org/software/bison/ -comment "bison requires a toolchain with WCHAR support" +comment "bison needs a toolchain w/ wchar" depends on !BR2_USE_WCHAR diff --git a/package/bison/bison-01-no-docs-regen.patch b/package/bison/bison-01-no-docs-regen.patch new file mode 100644 index 0000000000..7c375d657c --- /dev/null +++ b/package/bison/bison-01-no-docs-regen.patch @@ -0,0 +1,53 @@ +bison regenerates the docs to see if they changed which requires running +the recently built bison. This obviously doesn't work for cross compiles +hence breaks for many target bison builds. +Just disable it. + +Signed-off-by: Gustavo Zacarias + +diff -Nura bison-3.0.orig/doc/local.mk bison-3.0/doc/local.mk +--- bison-3.0.orig/doc/local.mk 2013-10-02 16:52:48.711890121 -0300 ++++ bison-3.0/doc/local.mk 2013-10-02 17:14:59.329341143 -0300 +@@ -37,15 +37,6 @@ + CROSS_OPTIONS_PL = $(top_srcdir)/build-aux/cross-options.pl + CROSS_OPTIONS_TEXI = $(top_srcdir)/doc/cross-options.texi + $(CROSS_OPTIONS_TEXI): doc/bison.help $(CROSS_OPTIONS_PL) +-# Create $@~ which is the previous contents. Don't use 'mv' here so +-# that even if we are interrupted, the file is still available for +-# diff in the next run. Note that $@ might not exist yet. +- $(AM_V_GEN){ test ! -f $@ || cat $@; } >$@~ +- $(AM_V_at)test ! -f $@.tmp || rm -f $@.tmp +- $(AM_V_at)src/bison$(EXEEXT) --help | \ +- $(PERL) $(CROSS_OPTIONS_PL) $(top_srcdir)/src/scan-gram.l >$@.tmp +- $(AM_V_at)diff -u $@~ $@.tmp || true +- $(AM_V_at)mv $@.tmp $@ + MAINTAINERCLEANFILES = $(CROSS_OPTIONS_TEXI) + + ## ---------- ## +@@ -86,9 +77,6 @@ + EXTRA_DIST += $(top_srcdir)/doc/bison.help + MAINTAINERCLEANFILES += $(top_srcdir)/doc/bison.help + $(top_srcdir)/doc/bison.help: src/bison$(EXEEXT) +- $(AM_V_GEN)src/bison$(EXEEXT) --version >doc/bison.help.tmp +- $(AM_V_at) src/bison$(EXEEXT) --help >>doc/bison.help.tmp +- $(AM_V_at)$(top_srcdir)/build-aux/move-if-change doc/bison.help.tmp $@ + + + ## ----------- ## +@@ -106,16 +94,6 @@ + + # Depend on configure to get version number changes. + $(top_srcdir)/doc/bison.1: doc/bison.help doc/bison.x $(top_srcdir)/configure +- $(AM_V_GEN)$(HELP2MAN) \ +- --include=$(top_srcdir)/doc/bison.x \ +- --output=$@.t src/bison$(EXEEXT) +- $(AM_V_at)if $(remove_time_stamp) $@ >$@a.t 2>/dev/null && \ +- $(remove_time_stamp) $@.t | cmp $@a.t - >/dev/null 2>&1; then \ +- touch $@; \ +- else \ +- mv $@.t $@; \ +- fi +- $(AM_V_at)rm -f $@*.t + + nodist_man_MANS = doc/yacc.1 + diff --git a/package/bison/bison-2.4.3-uclibc-sched_param-def.patch b/package/bison/bison-2.4.3-uclibc-sched_param-def.patch deleted file mode 100644 index 50652d8bab..0000000000 --- a/package/bison/bison-2.4.3-uclibc-sched_param-def.patch +++ /dev/null @@ -1,19 +0,0 @@ -uclibc defines __GLIBC__ but it does not expose struct shed_param as much as glibc -and is not needed too per standard. gnulib attempts to use it but we have to account -for it because in this case uclibc does not behave like glibc. - --Khem - -http://bugs.gentoo.org/336484 - ---- m4-1.4.14/lib/spawn.in.h -+++ m4-1.4.14/lib/spawn.in.h -@@ -31,7 +31,7 @@ - - /* Get definitions of 'struct sched_param' and 'sigset_t'. - But avoid namespace pollution on glibc systems. */ --#ifndef __GLIBC__ -+#if !defined __GLIBC__ || defined __UCLIBC__ - # include - # include - #endif diff --git a/package/bison/bison.mk b/package/bison/bison.mk index 8849030a28..1bead3916a 100644 --- a/package/bison/bison.mk +++ b/package/bison/bison.mk @@ -1,11 +1,17 @@ -############################################################# +################################################################################ # # bison # -############################################################# +################################################################################ -BISON_VERSION = 2.4.3 +BISON_VERSION = 3.0 +BISON_SOURCE = bison-$(BISON_VERSION).tar.xz BISON_SITE = $(BR2_GNU_MIRROR)/bison +BISON_LICENSE = GPLv3+ +BISON_LICENSE_FILES = COPYING +BISON_CONF_ENV = ac_cv_path_M4=/usr/bin/m4 +BISON_DEPENDENCIES = m4 +BISON_AUTORECONF = YES define BISON_DISABLE_EXAMPLES echo 'all install:' > $(@D)/examples/Makefile @@ -13,4 +19,5 @@ endef BISON_POST_CONFIGURE_HOOKS += BISON_DISABLE_EXAMPLES -$(eval $(call AUTOTARGETS,package,bison)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/blackbox/Config.in b/package/blackbox/Config.in index 70f7eb4b57..e9086550d9 100644 --- a/package/blackbox/Config.in +++ b/package/blackbox/Config.in @@ -2,6 +2,7 @@ config BR2_PACKAGE_BLACKBOX bool "blackbox" depends on BR2_PACKAGE_XORG7 depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # fork() select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE select BR2_PACKAGE_XLIB_LIBX11 help @@ -10,5 +11,6 @@ config BR2_PACKAGE_BLACKBOX http://blackboxwm.sourceforge.net/ -comment "blackbox requires a toolchain with C++ support enabled" - depends on BR2_PACKAGE_XORG7 && !BR2_INSTALL_LIBSTDCPP +comment "blackbox needs a toolchain w/ C++" + depends on BR2_PACKAGE_XORG7 && BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/blackbox/blackbox-0.70.1-gcc46-textpropertytostring.patch b/package/blackbox/blackbox-0.70.1-gcc46-textpropertytostring.patch new file mode 100644 index 0000000000..af03be4b9c --- /dev/null +++ b/package/blackbox/blackbox-0.70.1-gcc46-textpropertytostring.patch @@ -0,0 +1,34 @@ +[PATCH] fix build issue with gcc 4.6+ + +Debian patch from http://patch-tracker.debian.org/patch/series/dl/blackbox/0.70.1-13/textpropertytostring-unconditional.diff + +Signed-off-by: Peter Korsgaard + +Description: Declare bt::textPropertyToString unconditionally. +Author: Jakub Wilk +Forwarded: no +Bug-Debian: http://bugs.debian.org/614468 +Last-Update: 2011-03-12 + +--- a/lib/Util.hh ++++ b/lib/Util.hh +@@ -25,6 +25,8 @@ + #ifndef __Util_hh + #define __Util_hh + ++#include ++ + #include + #include + +@@ -94,10 +96,8 @@ + + std::string tolower(const std::string &string); + +-#ifdef _XUTIL_H_ + std::string textPropertyToString(::Display *display, + ::XTextProperty& text_prop); +-#endif + + } // namespace bt + diff --git a/package/blackbox/blackbox.mk b/package/blackbox/blackbox.mk index e3c8c341b3..09d15f1d3f 100644 --- a/package/blackbox/blackbox.mk +++ b/package/blackbox/blackbox.mk @@ -1,17 +1,14 @@ -############################################################# +################################################################################ # # blackbox # -############################################################# +################################################################################ -BLACKBOX_VERSION:=0.70.1 -BLACKBOX_SOURCE:=blackbox-$(BLACKBOX_VERSION).tar.bz2 -BLACKBOX_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/blackboxwm/ -BLACKBOX_AUTORECONF:=NO -BLACKBOX_INSTALL_STAGING:=NO -BLACKBOX_INSTALL_TARGET:=YES +BLACKBOX_VERSION = 0.70.1 +BLACKBOX_SOURCE = blackbox-$(BLACKBOX_VERSION).tar.bz2 +BLACKBOX_SITE = http://downloads.sourceforge.net/project/blackboxwm/blackboxwm/Blackbox%20$(BLACKBOX_VERSION) -BLACKBOX_CONF_OPT:=--x-includes=$(STAGING_DIR)/usr/include/X11 \ +BLACKBOX_CONF_OPT = --x-includes=$(STAGING_DIR)/usr/include/X11 \ --x-libraries=$(STAGING_DIR)/usr/lib BLACKBOX_DEPENDENCIES = xlib_libX11 @@ -20,4 +17,4 @@ ifneq ($(BR2_ENABLE_LOCALE),y) BLACKBOX_DEPENDENCIES += libiconv endif -$(eval $(call AUTOTARGETS,package,blackbox)) +$(eval $(autotools-package)) diff --git a/package/bluez_utils/Config.in b/package/bluez_utils/Config.in new file mode 100644 index 0000000000..e08e9be2db --- /dev/null +++ b/package/bluez_utils/Config.in @@ -0,0 +1,43 @@ +config BR2_PACKAGE_BLUEZ_UTILS + bool "bluez-utils" + depends on !BR2_avr32 + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, alsa-lib, libglib2 + depends on BR2_USE_MMU # dbus, libglib2 + select BR2_PACKAGE_DBUS + select BR2_PACKAGE_LIBGLIB2 + help + bluez utils + + http://www.kernel.org/pub/linux/bluetooth + +if BR2_PACKAGE_BLUEZ_UTILS + +config BR2_PACKAGE_BLUEZ_UTILS_COMPAT + bool "BlueZ 3.x compatibility binaries" + help + BlueZ 3.x compatibility binaries like pand, hidd, sdp + +config BR2_PACKAGE_BLUEZ_UTILS_AUDIO + bool "audio support" + select BR2_PACKAGE_ALSA_LIB + select BR2_PACKAGE_LIBSNDFILE + depends on BR2_LARGEFILE + help + Audio support + +comment "bluez-utils audio needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE + +config BR2_PACKAGE_BLUEZ_UTILS_USB + bool "USB support" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_LIBUSB + help + USB support + +endif + +comment "bluez-utils needs a toolchain w/ wchar, threads" + depends on !BR2_avr32 && BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/bluez_utils/bluez_utils-4.101-enable_cg2900_on_upstream_4.91.patch b/package/bluez_utils/bluez_utils-4.101-enable_cg2900_on_upstream_4.91.patch new file mode 100644 index 0000000000..e80af5fd90 --- /dev/null +++ b/package/bluez_utils/bluez_utils-4.101-enable_cg2900_on_upstream_4.91.patch @@ -0,0 +1,106 @@ +From ac7992081abba87627c9e91735b3309584b48585 Mon Sep 17 00:00:00 2001 +From: Gregory Hermant +Date: Wed, 14 Nov 2012 14:27:02 +0100 +Subject: [PATCH] add support for the ST-Ericsson CG2900 GPS FM Bluetooth + combo controller + + +Signed-off-by: Gregory Hermant +--- + tools/hciattach.c | 22 +++++++++++++++------- + tools/hciattach.h | 1 + + 2 files changed, 16 insertions(+), 7 deletions(-) + +diff --git a/tools/hciattach.c b/tools/hciattach.c +index e4d5aa1..7f08243 100644 +--- a/tools/hciattach.c ++++ b/tools/hciattach.c +@@ -1066,6 +1066,11 @@ struct uart_t uart[] = { + { "texasalt", 0x0000, 0x0000, HCI_UART_LL, 115200, 115200, + FLOW_CTL, DISABLE_PM, NULL, texasalt, NULL }, + ++ /* ST-Ericsson CG2900 GPS FM Bluetooth combo controller */ ++ { "cg2900", 0x0000, 0x0000, HCI_UART_STE, 115200, 115200, ++ FLOW_CTL, DISABLE_PM, NULL, NULL }, ++ ++ + /* ST Microelectronics minikits based on STLC2410/STLC2415 */ + { "st", 0x0000, 0x0000, HCI_UART_H4, 57600, 115200, + FLOW_CTL, DISABLE_PM, NULL, st }, +@@ -1157,10 +1162,10 @@ static struct uart_t * get_by_type(char *type) + } + + /* Initialize UART driver */ +-static int init_uart(char *dev, struct uart_t *u, int send_break, int raw) ++static int init_uart(char *dev, struct uart_t *u, int send_break, int raw, int line_disc) + { + struct termios ti; +- int fd, i; ++ int fd; + unsigned long flags = 0; + + if (raw) +@@ -1217,8 +1222,7 @@ static int init_uart(char *dev, struct uart_t *u, int send_break, int raw) + } + + /* Set TTY to N_HCI line discipline */ +- i = N_HCI; +- if (ioctl(fd, TIOCSETD, &i) < 0) { ++ if (ioctl(fd, TIOCSETD, &line_disc) < 0) { + perror("Can't set line discipline"); + return -1; + } +@@ -1243,7 +1247,7 @@ static void usage(void) + { + printf("hciattach - HCI UART driver initialization utility\n"); + printf("Usage:\n"); +- printf("\thciattach [-n] [-p] [-b] [-r] [-t timeout] [-s initial_speed] [speed] [flow|noflow] [bdaddr]\n"); ++ printf("\thciattach [-n] [-p] [-a line_disc_nr] [-b] [-r] [-t timeout] [-s initial_speed] [speed] [flow|noflow] [bdaddr]\n"); + printf("\thciattach -l\n"); + } + +@@ -1252,6 +1256,7 @@ int main(int argc, char *argv[]) + struct uart_t *u = NULL; + int detach, printpid, raw, opt, i, n, ld, err; + int to = 10; ++ int line_disc = N_HCI; + int init_speed = 0; + int send_break = 0; + pid_t pid; +@@ -1264,8 +1269,11 @@ int main(int argc, char *argv[]) + printpid = 0; + raw = 0; + +- while ((opt=getopt(argc, argv, "bnpt:s:lr")) != EOF) { ++ while ((opt=getopt(argc, argv, "bnpt:s:lra:")) != EOF) { + switch(opt) { ++ case 'a': ++ line_disc = atoi(optarg); ++ break; + case 'b': + send_break = 1; + break; +@@ -1381,7 +1389,7 @@ int main(int argc, char *argv[]) + alarm(to); + bcsp_max_retries = to; + +- n = init_uart(dev, u, send_break, raw); ++ n = init_uart(dev, u, send_break, raw, line_disc); + if (n < 0) { + perror("Can't initialize device"); + exit(1); +diff --git a/tools/hciattach.h b/tools/hciattach.h +index fed0d11..09b534d 100644 +--- a/tools/hciattach.h ++++ b/tools/hciattach.h +@@ -39,6 +39,7 @@ + #define HCI_UART_H4DS 3 + #define HCI_UART_LL 4 + #define HCI_UART_ATH3K 5 ++#define HCI_UART_STE 6 + + #define HCI_UART_RAW_DEVICE 0 + +-- +1.7.9.5 + diff --git a/package/bluez_utils/bluez_utils.mk b/package/bluez_utils/bluez_utils.mk new file mode 100644 index 0000000000..7038638a07 --- /dev/null +++ b/package/bluez_utils/bluez_utils.mk @@ -0,0 +1,50 @@ +################################################################################ +# +# bluez_utils +# +################################################################################ + +BLUEZ_UTILS_VERSION = 4.101 +BLUEZ_UTILS_SOURCE = bluez-$(BLUEZ_UTILS_VERSION).tar.xz +BLUEZ_UTILS_SITE = $(BR2_KERNEL_MIRROR)/linux/bluetooth +BLUEZ_UTILS_INSTALL_STAGING = YES +BLUEZ_UTILS_DEPENDENCIES = dbus libglib2 +BLUEZ_UTILS_CONF_OPT = --enable-test --enable-tools +BLUEZ_UTILS_AUTORECONF = YES +BLUEZ_UTILS_LICENSE = GPLv2+ LGPLv2.1+ +BLUEZ_UTILS_LICENSE_FILES = COPYING COPYING.LIB + +# BlueZ 3.x compatibility +ifeq ($(BR2_PACKAGE_BLUEZ_UTILS_COMPAT),y) +BLUEZ_UTILS_CONF_OPT += \ + --enable-hidd \ + --enable-pand \ + --enable-sdp \ + --enable-dund +endif + +# audio support +ifeq ($(BR2_PACKAGE_BLUEZ_UTILS_AUDIO),y) +BLUEZ_UTILS_DEPENDENCIES += \ + alsa-lib \ + libsndfile +BLUEZ_UTILS_CONF_OPT += \ + --enable-alsa \ + --enable-audio +else +BLUEZ_UTILS_CONF_OPT += \ + --disable-alsa \ + --disable-audio +endif + +# USB support +ifeq ($(BR2_PACKAGE_BLUEZ_UTILS_USB),y) +BLUEZ_UTILS_DEPENDENCIES += libusb +BLUEZ_UTILS_CONF_OPT += \ + --enable-usb +else +BLUEZ_UTILS_CONF_OPT += \ + --disable-usb +endif + +$(eval $(autotools-package)) diff --git a/package/bmon/Config.in b/package/bmon/Config.in index 667788bc0a..9f0dfa79f3 100644 --- a/package/bmon/Config.in +++ b/package/bmon/Config.in @@ -1,9 +1,10 @@ config BR2_PACKAGE_BMON bool "bmon" depends on BR2_INET_IPV6 - select BR2_PACKAGE_NCURSES + depends on BR2_USE_MMU # fork() help Linux bandwidth monitor -comment "bmon requires a toolchain with IPv6 support" +comment "bmon needs a toolchain w/ IPv6" + depends on BR2_USE_MMU depends on !BR2_INET_IPV6 diff --git a/package/bmon/bmon-curses.patch b/package/bmon/bmon-curses.patch new file mode 100644 index 0000000000..0eb164e323 --- /dev/null +++ b/package/bmon/bmon-curses.patch @@ -0,0 +1,26 @@ +[PATCH] fix build without curses + +bmon supports a --disable-curses configure option, but still #error +out if curses wasn't detected, even though the rest of the code is +written to work without curses support. + +Fix it by removing the bogus #error line. + +Signed-off-by: Peter Korsgaard +--- + include/bmon/config.h | 2 -- + 1 file changed, 2 deletions(-) + +Index: bmon-2.1.0/include/bmon/config.h +=================================================================== +--- bmon-2.1.0.orig/include/bmon/config.h ++++ bmon-2.1.0/include/bmon/config.h +@@ -118,8 +118,6 @@ + # endif /* !HAVE_CURSES */ + #elif defined HAVE_CURSES + # include +-#else +-# error "*** ERROR: Neither ncurses nor curses is present on your system. ***" + #endif /* HAVE_[N]CURSES */ + + #if defined HAVE_RRD diff --git a/package/bmon/bmon.mk b/package/bmon/bmon.mk index e9b10b0147..f852f49f17 100644 --- a/package/bmon/bmon.mk +++ b/package/bmon/bmon.mk @@ -1,16 +1,31 @@ -############################################################# +################################################################################ # # bmon # -############################################################# +################################################################################ BMON_VERSION = 2.1.0 -BMON_SOURCE = bmon-$(BMON_VERSION).tar.gz BMON_SITE = http://distfiles.gentoo.org/distfiles -BMON_DEPENDENCIES = ncurses + +ifeq ($(BR2_PACKAGE_NCURSES),y) +BMON_DEPENDENCIES += ncurses +else +BMON_CONF_OPT += --disable-curses +endif + +ifeq ($(BR2_PACKAGE_ALSA_LIB),y) +BMON_DEPENDENCIES += alsa-lib +else +BMON_CONF_OPT += --disable-asound +endif + +ifneq ($(BR2_PREFER_STATIC_LIB),y) +# link dynamically unless explicitly requested otherwise +BMON_CONF_OPT += --disable-static +endif define BMON_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/bin/bmon endef -$(eval $(call AUTOTARGETS,package,bmon)) +$(eval $(autotools-package)) diff --git a/package/boa/Config.in b/package/boa/Config.in index 48943ff046..982833aefb 100644 --- a/package/boa/Config.in +++ b/package/boa/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_BOA bool "boa" + depends on BR2_USE_MMU # uses fork() help A very small and very fast http daemon. Not intended as a feature-packed server. diff --git a/package/boa/boa.mk b/package/boa/boa.mk index 702193d2e8..d6a8e23deb 100644 --- a/package/boa/boa.mk +++ b/package/boa/boa.mk @@ -1,11 +1,13 @@ -############################################################# +################################################################################ # # boa # -############################################################# +################################################################################ + BOA_VERSION = 0.94.14rc21 -BOA_SOURCE = boa-$(BOA_VERSION).tar.gz BOA_SITE = http://www.boa.org/ +BOA_LICENSE = GPLv2+ +BOA_LICENSE_FILES = COPYING define BOA_INSTALL_TARGET_CMDS install -D -m 755 $(@D)/src/boa $(TARGET_DIR)/usr/sbin/boa @@ -25,4 +27,4 @@ define BOA_UNINSTALL_TARGET_CMDS $(TARGET_DIR)/etc/mime.types $(TARGET_DIR)/etc/boa endef -$(eval $(call AUTOTARGETS,package,boa)) +$(eval $(autotools-package)) diff --git a/package/bonnie/Config.in b/package/bonnie/Config.in new file mode 100644 index 0000000000..6dbd06df58 --- /dev/null +++ b/package/bonnie/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_BONNIE + bool "bonnie++" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # fork() + help + Filesystem tester + + http://www.coker.com.au/bonnie++/ + +comment "bonnie++ needs a toolchain w/ C++" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/bonnie/bonnie.mk b/package/bonnie/bonnie.mk new file mode 100644 index 0000000000..75cb15574b --- /dev/null +++ b/package/bonnie/bonnie.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# bonnie +# +################################################################################ + +BONNIE_VERSION = 1.03e +BONNIE_SOURCE = bonnie++-$(BONNIE_VERSION).tgz +BONNIE_SITE = http://www.coker.com.au/bonnie++/ + +define BONNIE_INSTALL_TARGET_CMDS + install -D -m 755 $(@D)/bonnie++ $(TARGET_DIR)/usr/sbin/bonnie++ + install -D -m 755 $(@D)/zcav $(TARGET_DIR)/usr/sbin/zcav +endef + +define BONNIE_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/sbin/bonnie++ $(TARGET_DIR)/usr/sbin/zcav +endef + +$(eval $(autotools-package)) diff --git a/package/boost/Config.in b/package/boost/Config.in new file mode 100644 index 0000000000..17390c0150 --- /dev/null +++ b/package/boost/Config.in @@ -0,0 +1,91 @@ +comment "boost needs a toolchain w/ C++, largefile, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_BOOST + bool "boost" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_LARGEFILE + # Boost could theorically be built with threading=single, but + # that unfortunately doesn't work. Until someone fixes that, + # let's depend on threads. + depends on BR2_TOOLCHAIN_HAS_THREADS + help + A general purpose C++ library + + http://www.boost.org/ + +if BR2_PACKAGE_BOOST + +config BR2_PACKAGE_BOOST_CHRONO + bool "boost-chrono" + +config BR2_PACKAGE_BOOST_CONTEXT + bool "boost-context" + depends on (BR2_arm || BR2_armeb || BR2_i386 || BR2_mips || BR2_mipsel \ + || BR2_powerpc || BR2_sparc || BR2_x86_64) + +config BR2_PACKAGE_BOOST_DATE_TIME + bool "boost-date_time" + +config BR2_PACKAGE_BOOST_EXCEPTION + bool "boost-exception" + +config BR2_PACKAGE_BOOST_FILESYSTEM + bool "boost-filesystem" + +config BR2_PACKAGE_BOOST_GRAPH + bool "boost-graph" + +config BR2_PACKAGE_BOOST_GRAPH_PARALLEL + bool "boost-graph_parallel" + +config BR2_PACKAGE_BOOST_IOSTREAMS + bool "boost-iostreams" + select BR2_PACKAGE_BZIP2 + select BR2_PACKAGE_ZLIB + +config BR2_PACKAGE_BOOST_LOCALE + depends on BR2_USE_WCHAR + bool "boost-locale" + +comment "boost-locale needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR + +config BR2_PACKAGE_BOOST_MATH + bool "boost-math" + +config BR2_PACKAGE_BOOST_MPI + bool "boost-mpi" + +config BR2_PACKAGE_BOOST_PROGRAM_OPTIONS + bool "boost-program_options" + +config BR2_PACKAGE_BOOST_RANDOM + bool "boost-random" + +config BR2_PACKAGE_BOOST_REGEX + bool "boost-regex" + +config BR2_PACKAGE_BOOST_SERIALIZATION + bool "boost-serialization" + +config BR2_PACKAGE_BOOST_SIGNALS + bool "boost-signals" + +config BR2_PACKAGE_BOOST_SYSTEM + bool "boost-system" + +config BR2_PACKAGE_BOOST_TEST + bool "boost-test" + +config BR2_PACKAGE_BOOST_THREAD + bool "boost-thread" + +config BR2_PACKAGE_BOOST_TIMER + bool "boost-timer" + +config BR2_PACKAGE_BOOST_WAVE + bool "boost-wave" + +endif + diff --git a/package/boost/boost-0001-fix-ambiguous-format-call-on-64bit-builds.patch b/package/boost/boost-0001-fix-ambiguous-format-call-on-64bit-builds.patch new file mode 100644 index 0000000000..e8972fd726 --- /dev/null +++ b/package/boost/boost-0001-fix-ambiguous-format-call-on-64bit-builds.patch @@ -0,0 +1,27 @@ +boost: fix ambiguous format call on 64-bit builds + +Fixes problem: + +libs/locale/src/icu/formatter.cpp: In member function +'virtual std::basic_string<_CharT, std::char_traits<_CharT>, std::allocator<_CharT> > boost::locale::impl_icu::number_format::format(boost::int64_t, size_t&) const': +libs/locale/src/icu/formatter.cpp:61: error: call of overloaded 'format(boost::int64_t&, icu_49::UnicodeString&)' is ambiguous +/ec/include/unicode/numfmt.h:317: note: candidates are: icu_49::UnicodeString& icu_49::NumberFormat::format(double, icu_49::UnicodeString&) const +/ec/include/unicode/numfmt.h:330: note: icu_49::UnicodeString& icu_49::NumberFormat::format(int32_t, icu_49::UnicodeString&) const +/ec/include/unicode/numfmt.h:343: note: icu_49::UnicodeString& icu_49::NumberFormat::format(int64_t, icu_49::UnicodeString&) const + +Signed-off-by: Thomas De Schampheleire +Backported-from: https://svn.boost.org/trac/boost/ticket/6851 + + +diff -ruN boost_1_49_0.orig/libs/locale/src/icu/formatter.cpp boost_1_49_0/libs/locale/src/icu/formatter.cpp +--- boost_1_49_0.orig/libs/locale/src/icu/formatter.cpp 2011-07-12 14:57:36.000000000 +0100 ++++ boost_1_49_0/libs/locale/src/icu/formatter.cpp 2012-05-01 14:27:54.000000000 +0100 +@@ -58,7 +58,7 @@ + virtual string_type format(int64_t value,size_t &code_points) const + { + icu::UnicodeString tmp; +- icu_fmt_->format(value,tmp); ++ icu_fmt_->format(::int64_t(value),tmp); + code_points=tmp.countChar32(); + return cvt_.std(tmp); + } diff --git a/package/boost/boost-0002-Fix-compilation-of-Boost.Variants-move-assignment.patch b/package/boost/boost-0002-Fix-compilation-of-Boost.Variants-move-assignment.patch new file mode 100644 index 0000000000..00dc7c619a --- /dev/null +++ b/package/boost/boost-0002-Fix-compilation-of-Boost.Variants-move-assignment.patch @@ -0,0 +1,50 @@ +Fix compilation of Boost.Variants move assignment for situations when one of the variant template classes has nothrow copy constructor and throwing move constructor (refs #8772) + +Fixes compilation error: + +.../output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/boost/variant/variant.hpp: In member function 'void boost::variant::move_assigner::internal_visit(RhsT&, int) [with RhsT = boost::shared_ptr, T0_ = boost::shared_ptr, T1 = boost::signals2::detail::foreign_void_shared_ptr, T2 = boost::detail::variant::void_, ..., T18 = boost::detail::variant::void_, T19 = boost::detail::variant::void_]': +... +.../output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/boost/variant/variant.hpp:2058:13: error: no matching function for call to 'boost::variant, boost::signals2::detail::foreign_void_shared_ptr>::move_assigner::assign_impl(boost::shared_ptr&, nothrow_copy, nothrow_move_constructor, boost::variant, boost::signals2::detail::foreign_void_shared_ptr>::has_fallback_type_)' + +Reported here: https://svn.boost.org/trac/boost/ticket/8772 + +Signed-off-by: Luca Ceresoli +Backported-from: https://svn.boost.org/trac/boost/changeset/85080 + +--- a/boost/variant/variant.hpp (revision 85079) ++++ b/boost/variant/variant.hpp (revision 85080) +@@ -1981,5 +1981,5 @@ + private: // helpers, for internal visitor interface (below) + +- template ++ template + void assign_impl( + RhsT& rhs_content +--- a/libs/variant/test/rvalue_test.cpp (revision 85079) ++++ b/libs/variant/test/rvalue_test.cpp (revision 85080) +@@ -197,4 +197,19 @@ + #endif + ++struct nothrow_copyable_throw_movable { ++ nothrow_copyable_throw_movable(){} ++ nothrow_copyable_throw_movable(const nothrow_copyable_throw_movable&) BOOST_NOEXCEPT {} ++#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES ++ nothrow_copyable_throw_movable(nothrow_copyable_throw_movable&&) BOOST_NOEXCEPT_IF(false) {} ++#endif ++}; ++ ++// This test is created to cover the following situation: ++// https://svn.boost.org/trac/boost/ticket/8772 ++void run_tricky_compilation_test() ++{ ++ boost::variant v; ++ v = nothrow_copyable_throw_movable(); ++} + + int test_main(int , char* []) +@@ -204,4 +219,5 @@ + run_move_only(); + run_moves_are_noexcept(); ++ run_tricky_compilation_test(); + return 0; + } diff --git a/package/boost/boost-0003-fix-64bit-build-with-recent-gcc.patch b/package/boost/boost-0003-fix-64bit-build-with-recent-gcc.patch new file mode 100644 index 0000000000..5fdfb01ac7 --- /dev/null +++ b/package/boost/boost-0003-fix-64bit-build-with-recent-gcc.patch @@ -0,0 +1,33 @@ +Patch for recent versions of glibc which always assume int64_t support. + +Fixes compilation error with aarch64 target: + +./boost/atomic/atomic.hpp: At global scope: +./boost/atomic/atomic.hpp:202:16: error: 'uintptr_t' was not declared in this scope + typedef atomic atomic_uintptr_t; + ^ +./boost/atomic/atomic.hpp:202:25: error: template argument 1 is invalid + typedef atomic atomic_uintptr_t; + ^ +./boost/atomic/atomic.hpp:202:43: error: invalid type in declaration before ';' token + typedef atomic atomic_uintptr_t; + ^ + +Reported here: https://svn.boost.org/trac/boost/ticket/8973 +Fix reported here: https://svn.boost.org/trac/boost/ticket/8731 + +Signed-off-by: Luca Ceresoli +Backported-from: https://svn.boost.org/trac/boost/changeset/84950 + +--- a/boost/cstdint.hpp (revision 84805) ++++ b/boost/cstdint.hpp (revision 84950) +@@ -42,5 +42,8 @@ + // See https://svn.boost.org/trac/boost/ticket/3548 and http://sources.redhat.com/bugzilla/show_bug.cgi?id=10990 + // +-#if defined(BOOST_HAS_STDINT_H) && (!defined(__GLIBC__) || defined(__GLIBC_HAVE_LONG_LONG)) ++#if defined(BOOST_HAS_STDINT_H) \ ++ && (!defined(__GLIBC__) \ ++ || defined(__GLIBC_HAVE_LONG_LONG) \ ++ || (defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 17))))) + + // The following #include is an implementation artifact; not part of interface. diff --git a/package/boost/boost.mk b/package/boost/boost.mk new file mode 100644 index 0000000000..b0b3352726 --- /dev/null +++ b/package/boost/boost.mk @@ -0,0 +1,97 @@ +################################################################################ +# +# boost +# +################################################################################ + +BOOST_VERSION = 1.54.0 +BOOST_FILE_VERSION = $(subst .,_,$(BOOST_VERSION)) +BOOST_SOURCE = boost_$(BOOST_FILE_VERSION).tar.bz2 +BOOST_SITE = http://downloads.sourceforge.net/project/boost/boost/$(BOOST_VERSION) +BOOST_INSTALL_STAGING = YES + +TARGET_CC_VERSION = $(shell $(TARGET_CC) -dumpversion) + +BOOST_DEPENDENCIES = + +BOOST_FLAGS = + +# atomic library compile only with upstream version, wait for next release +# coroutine breaks on some weak toolchains and it's new for 1.54+ +# log breaks with some toolchain combinations and it's new for 1.54+ +BOOST_WITHOUT_FLAGS = atomic coroutine log python + +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_CHRONO),,chrono) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_CONTEXT),,context) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_DATE_TIME),,date_time) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_EXCEPTION),,exception) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_FILESYSTEM),,filesystem) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_GRAPH),,graph) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_GRAPH_PARALLEL),,graph_parallel) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_IOSTREAMS),,iostreams) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_LOCALE),,locale) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_MATH),,math) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_MPI),,mpi) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_PROGRAM_OPTIONS),,program_options) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_RANDOM),,random) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_REGEX),,regex) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_SERIALIZATION),,serialization) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_SIGNALS),,signals) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_SYSTEM),,system) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_TEST),,test) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_THREAD),,thread) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_TIMER),,timer) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_WAVE),,wave) + +ifeq ($(BR2_PACKAGE_ICU),y) +BOOST_FLAGS += --with-icu=$(STAGING_DIR)/usr +BOOST_DEPENDENCIES += icu +else +BOOST_FLAGS += --without-icu +endif + +ifeq ($(BR2_PACKAGE_BOOST_IOSTREAMS),y) +BOOST_DEPENDENCIES += bzip2 zlib +endif + +BOOST_OPT += toolset=gcc \ + threading=multi \ + variant=$(if $(BR2_ENABLE_DEBUG),debug,release) \ + link=$(if $(BR2_PREFER_STATIC_LIB),static,shared) \ + runtime-link=$(if $(BR2_PREFER_STATIC_LIB),static,shared) + +ifeq ($(BR2_PACKAGE_BOOST_LOCALE),y) +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +# posix backend needs monetary.h which isn't available on uClibc +BOOST_OPT += boost.locale.posix=off +endif + +BOOST_DEPENDENCIES += $(if $(BR2_ENABLE_LOCALE),,libiconv) +endif + +BOOST_WITHOUT_FLAGS_COMMASEPERATED += $(subst $(space),$(comma),$(strip $(BOOST_WITHOUT_FLAGS))) +BOOST_FLAGS += $(if $(BOOST_WITHOUT_FLAGS_COMMASEPERATED), --without-libraries=$(BOOST_WITHOUT_FLAGS_COMMASEPERATED)) + +define BOOST_CONFIGURE_CMDS + (cd $(@D) && ./bootstrap.sh $(BOOST_FLAGS)) + echo "using gcc : $(TARGET_CC_VERSION) : $(TARGET_CXX) : \"$(TARGET_CXXFLAGS)\" \"$(TARGET_LDFLAGS)\" ;" > $(@D)/user-config.jam + echo "" >> $(@D)/user-config.jam +endef + +define BOOST_INSTALL_TARGET_CMDS + (cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q -d+1 \ + --user-config=$(@D)/user-config.jam \ + $(BOOST_OPT) \ + --prefix=$(TARGET_DIR)/usr \ + --layout=system install ) +endef + +define BOOST_INSTALL_STAGING_CMDS + (cd $(@D) && ./bjam -j$(PARALLEL_JOBS) -d+1 \ + --user-config=$(@D)/user-config.jam \ + $(BOOST_OPT) \ + --prefix=$(STAGING_DIR)/usr \ + --layout=system install) +endef + +$(eval $(generic-package)) diff --git a/package/bootutils/Config.in b/package/bootutils/Config.in index 06a8fd8e02..192089e312 100644 --- a/package/bootutils/Config.in +++ b/package/bootutils/Config.in @@ -9,5 +9,5 @@ config BR2_PACKAGE_BOOTUTILS http://bootutils.pr.linuxrulz.org/ -comment "bootutils requires a toolchain with LARGEFILE support" +comment "bootutils needs a toolchain w/ largefile" depends on !BR2_LARGEFILE diff --git a/package/bootutils/bootutils.mk b/package/bootutils/bootutils.mk index d5748124f0..caee2fd950 100644 --- a/package/bootutils/bootutils.mk +++ b/package/bootutils/bootutils.mk @@ -1,11 +1,12 @@ -############################################################# +################################################################################ # # bootutils # -############################################################# +################################################################################ + BOOTUTILS_VERSION = 1.0.0 -BOOTUTILS_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/bootutils +BOOTUTILS_SITE = http://downloads.sourceforge.net/project/bootutils/Stable/v$(BOOTUTILS_VERSION) BOOTUTILS_CONF_OPT = --prefix=/ --exec-prefix=/ -$(eval $(call AUTOTARGETS,package,bootutils)) +$(eval $(autotools-package)) diff --git a/package/bridge-utils/Config.in b/package/bridge-utils/Config.in index 9feb230447..537eb1f59f 100644 --- a/package/bridge-utils/Config.in +++ b/package/bridge-utils/Config.in @@ -1,7 +1,7 @@ -config BR2_PACKAGE_BRIDGE +config BR2_PACKAGE_BRIDGE_UTILS bool "bridge-utils" help Manage ethernet bridging; a way to connect networks together to form a larger network. - http://bridge.sourceforge.net/ + http://linux-net.osdl.org/index.php/Bridge diff --git a/package/bridge-utils/bridge.patch b/package/bridge-utils/bridge-utils-000-build-system.patch similarity index 100% rename from package/bridge-utils/bridge.patch rename to package/bridge-utils/bridge-utils-000-build-system.patch diff --git a/package/bridge-utils/bridge-utils-001-fix-for-kernel-headers-3.8+.patch b/package/bridge-utils/bridge-utils-001-fix-for-kernel-headers-3.8+.patch new file mode 100644 index 0000000000..0455a9085c --- /dev/null +++ b/package/bridge-utils/bridge-utils-001-fix-for-kernel-headers-3.8+.patch @@ -0,0 +1,30 @@ +commit 5eebb7f9288b7881ffb929b1fd494fe3ac3be27d +Author: Russell Senior +Date: Wed Mar 6 12:49:42 2013 -0800 + + bridge-utils: Fix compile against linux-3.8.x + + Linux 3.8 has a header, include/uapi/linux/if_bridge.h that uses a + struct in6_addr but doesn't define it. The trivial seeming fix of + including the header that does define it causes more problems. The + problem was discussed on mailing lists in January 2013. The final + suggestion I found was here: + + http://www.redhat.com/archives/libvir-list/2013-January/msg01253.html + + This is intended to implement that suggestion. + + Signed-off-by: Russell Senior + +diff --git a/libbridge/libbridge.h b/libbridge/libbridge.h +index 39964f2..dd14bae 100644 +--- a/libbridge/libbridge.h ++++ b/libbridge/libbridge.h +@@ -20,6 +20,7 @@ + #define _LIBBRIDGE_H + + #include ++#include + #include + #include + diff --git a/package/bridge-utils/bridge-utils.mk b/package/bridge-utils/bridge-utils.mk new file mode 100644 index 0000000000..4a2199058c --- /dev/null +++ b/package/bridge-utils/bridge-utils.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# bridge-utils +# +################################################################################ + +BRIDGE_UTILS_VERSION = 1.5 +BRIDGE_UTILS_SITE = http://downloads.sourceforge.net/project/bridge/bridge +BRIDGE_UTILS_AUTORECONF = YES +BRIDGE_UTILS_CONF_OPT = --with-linux-headers=$(LINUX_HEADERS_DIR) +BRIDGE_UTILS_LICENSE = GPLv2+ +BRIDGE_UTILS_LICENSE_FILES = COPYING + +define BRIDGE_UTILS_UNINSTALL_TARGET_CMDS + rm -f $(addprefix $(TARGET_DIR)/usr/,lib/libbridge.a \ + include/libbridge.h share/man/man8/brctl.8 sbin/brctl) +endef + +$(eval $(autotools-package)) diff --git a/package/bridge-utils/bridge.mk b/package/bridge-utils/bridge.mk deleted file mode 100644 index f8736b1bf4..0000000000 --- a/package/bridge-utils/bridge.mk +++ /dev/null @@ -1,20 +0,0 @@ -############################################################# -# -# bridge-utils - User Space Program For Controlling Bridging -# -############################################################# -# -BRIDGE_VERSION:=1.4 -BRIDGE_SOURCE:=bridge-utils-$(BRIDGE_VERSION).tar.gz -BRIDGE_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/bridge/ -BRIDGE_AUTORECONF:=YES -BRIDGE_INSTALL_STAGING:=NO -BRIDGE_INSTALL_TARGET:=YES -BRIDGE_CONF_OPT:=--with-linux-headers=$(LINUX_HEADERS_DIR) - -define BRIDGE_UNINSTALL_TARGET_CMDS - rm -f $(addprefix $(TARGET_DIR)/usr/,lib/libbridge.a \ - include/libbridge.h man/man8/brctl.8 sbin/brctl) -endef - -$(eval $(call AUTOTARGETS,package,bridge)) diff --git a/package/bsdiff/bsdiff.mk b/package/bsdiff/bsdiff.mk index 276c6be1a3..259dc4f2c0 100644 --- a/package/bsdiff/bsdiff.mk +++ b/package/bsdiff/bsdiff.mk @@ -1,18 +1,18 @@ -############################################################# +################################################################################ # # bsdiff # -############################################################# +################################################################################ + BSDIFF_VERSION = 4.3 -BSDIFF_SOURCE = bsdiff-$(BSDIFF_VERSION).tar.gz BSDIFF_SITE = http://www.daemonology.net/bsdiff BSDIFF_DEPENDENCIES = bzip2 define BSDIFF_BUILD_CMDS - $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -lbz2 \ - $(@D)/bsdiff.c -o $(@D)/bsdiff - $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -lbz2 \ - $(@D)/bspatch.c -o $(@D)/bspatch + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \ + $(@D)/bsdiff.c -lbz2 -o $(@D)/bsdiff + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \ + $(@D)/bspatch.c -lbz2 -o $(@D)/bspatch endef define BSDIFF_INSTALL_TARGET_CMDS @@ -28,4 +28,4 @@ define BSDIFF_CLEAN_CMDS rm -f $(@D)/bsdiff $(@D)/bspatch endef -$(eval $(call GENTARGETS,package,bsdiff)) +$(eval $(generic-package)) diff --git a/package/bustle/Config.in b/package/bustle/Config.in new file mode 100644 index 0000000000..f213da503e --- /dev/null +++ b/package/bustle/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_BUSTLE + bool "bustle" + select BR2_PACKAGE_LIBPCAP + select BR2_PACKAGE_LIBGLIB2 + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + depends on BR2_PACKAGE_DBUS # runtime + help + Bustle is a better dbus-monitor! It records and draws + sequence diagrams of D-Bus activity, showing signal + emissions, method calls and their corresponding returns, + with timestamps for each individual event and the duration + of each method call. This can help you check for unwanted + D-Bus traffic, and pinpoint why your D-Bus-based application + isn't performing as well as you like. + + This only installs the command line bustle-pcap tool, not + the graphical viewer. + + http://www.willthompson.co.uk/bustle/ + +comment "bustle needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_DBUS + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/bustle/bustle.mk b/package/bustle/bustle.mk new file mode 100644 index 0000000000..68b7b24418 --- /dev/null +++ b/package/bustle/bustle.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# bustle +# +################################################################################ + +BUSTLE_VERSION = 0.4.2 +BUSTLE_SITE = http://www.willthompson.co.uk/bustle/releases/$(BUSTLE_VERSION)/ +BUSTLE_LICENSE = LGPLv2.1+ +BUSTLE_LICENSE_FILES = LICENSE +BUSTLE_DEPENDENCIES = libglib2 libpcap host-pkgconf + +define BUSTLE_BUILD_CMDS + PATH=$(TARGET_PATH) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + PCAP_FLAGS='-lpcap' -C $(@D) dist/build/bustle-pcap +endef + +define BUSTLE_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/dist/build/bustle-pcap \ + $(TARGET_DIR)/usr/bin/bustle-pcap +endef + +$(eval $(generic-package)) diff --git a/package/busybox/1.19.4/busybox-1.19.4-udhcp.patch b/package/busybox/1.19.4/busybox-1.19.4-udhcp.patch new file mode 100644 index 0000000000..94d5f34a16 --- /dev/null +++ b/package/busybox/1.19.4/busybox-1.19.4-udhcp.patch @@ -0,0 +1,164 @@ +--- busybox-1.19.4/networking/udhcp/common.c ++++ busybox-1.19.4-udhcp/networking/udhcp/common.c +@@ -29,16 +29,16 @@ const struct dhcp_optflag dhcp_optflags[ + // { OPTION_IP | OPTION_LIST , 0x07 }, /* DHCP_LOG_SERVER */ + // { OPTION_IP | OPTION_LIST , 0x08 }, /* DHCP_COOKIE_SERVER */ + { OPTION_IP | OPTION_LIST , 0x09 }, /* DHCP_LPR_SERVER */ +- { OPTION_STRING | OPTION_REQ, 0x0c }, /* DHCP_HOST_NAME */ ++ { OPTION_STRING_HOST | OPTION_REQ, 0x0c }, /* DHCP_HOST_NAME */ + { OPTION_U16 , 0x0d }, /* DHCP_BOOT_SIZE */ +- { OPTION_STRING | OPTION_REQ, 0x0f }, /* DHCP_DOMAIN_NAME */ ++ { OPTION_STRING_HOST | OPTION_REQ, 0x0f }, /* DHCP_DOMAIN_NAME */ + { OPTION_IP , 0x10 }, /* DHCP_SWAP_SERVER */ + { OPTION_STRING , 0x11 }, /* DHCP_ROOT_PATH */ + { OPTION_U8 , 0x17 }, /* DHCP_IP_TTL */ + { OPTION_U16 , 0x1a }, /* DHCP_MTU */ + { OPTION_IP | OPTION_REQ, 0x1c }, /* DHCP_BROADCAST */ + { OPTION_IP_PAIR | OPTION_LIST , 0x21 }, /* DHCP_ROUTES */ +- { OPTION_STRING , 0x28 }, /* DHCP_NIS_DOMAIN */ ++ { OPTION_STRING_HOST , 0x28 }, /* DHCP_NIS_DOMAIN */ + { OPTION_IP | OPTION_LIST , 0x29 }, /* DHCP_NIS_SERVER */ + { OPTION_IP | OPTION_LIST | OPTION_REQ, 0x2a }, /* DHCP_NTP_SERVER */ + { OPTION_IP | OPTION_LIST , 0x2c }, /* DHCP_WINS_SERVER */ +@@ -46,7 +46,7 @@ const struct dhcp_optflag dhcp_optflags[ + { OPTION_IP , 0x36 }, /* DHCP_SERVER_ID */ + { OPTION_STRING , 0x38 }, /* DHCP_ERR_MESSAGE */ + //TODO: must be combined with 'sname' and 'file' handling: +- { OPTION_STRING , 0x42 }, /* DHCP_TFTP_SERVER_NAME */ ++ { OPTION_STRING_HOST , 0x42 }, /* DHCP_TFTP_SERVER_NAME */ + { OPTION_STRING , 0x43 }, /* DHCP_BOOT_FILE */ + //TODO: not a string, but a set of LASCII strings: + // { OPTION_STRING , 0x4D }, /* DHCP_USER_CLASS */ +@@ -143,6 +143,7 @@ const uint8_t dhcp_option_lengths[] ALIG + [OPTION_IP_PAIR] = 8, + // [OPTION_BOOLEAN] = 1, + [OPTION_STRING] = 1, /* ignored by udhcp_str2optset */ ++ [OPTION_STRING_HOST] = 1, /* ignored by udhcp_str2optset */ + #if ENABLE_FEATURE_UDHCP_RFC3397 + [OPTION_DNS_STRING] = 1, /* ignored by both udhcp_str2optset and xmalloc_optname_optval */ + [OPTION_SIP_SERVERS] = 1, +@@ -411,7 +412,9 @@ static NOINLINE void attach_option( + /* actually 255 is ok too, but adding a space can overlow it */ + + existing->data = xrealloc(existing->data, OPT_DATA + 1 + old_len + length); +- if ((optflag->flags & OPTION_TYPE_MASK) == OPTION_STRING) { ++ if ((optflag->flags & OPTION_TYPE_MASK) == OPTION_STRING ++ || (optflag->flags & OPTION_TYPE_MASK) == OPTION_STRING_HOST ++ ) { + /* add space separator between STRING options in a list */ + existing->data[OPT_DATA + old_len] = ' '; + old_len++; +@@ -475,6 +478,7 @@ int FAST_FUNC udhcp_str2optset(const cha + retval = udhcp_str2nip(val, buffer + 4); + break; + case OPTION_STRING: ++ case OPTION_STRING_HOST: + #if ENABLE_FEATURE_UDHCP_RFC3397 + case OPTION_DNS_STRING: + #endif +--- busybox-1.19.4/networking/udhcp/common.h ++++ busybox-1.19.4-udhcp/networking/udhcp/common.h +@@ -80,6 +80,9 @@ enum { + OPTION_IP = 1, + OPTION_IP_PAIR, + OPTION_STRING, ++ /* Opts of STRING_HOST type will be sanitized before they are passed ++ * to udhcpc script's environment: */ ++ OPTION_STRING_HOST, + // OPTION_BOOLEAN, + OPTION_U8, + OPTION_U16, +--- busybox-1.19.4/networking/udhcp/dhcpc.c ++++ busybox-1.19.4-udhcp/networking/udhcp/dhcpc.c +@@ -101,6 +101,7 @@ static const uint8_t len_of_option_as_st + [OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2, + [OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "), + [OPTION_STRING ] = 1, ++ [OPTION_STRING_HOST ] = 1, + #if ENABLE_FEATURE_UDHCP_RFC3397 + [OPTION_DNS_STRING ] = 1, /* unused */ + /* Hmmm, this severely overestimates size if SIP_SERVERS option +@@ -135,6 +136,63 @@ static int mton(uint32_t mask) + return i; + } + ++/* Check if a given label represents a valid DNS label ++ * Return pointer to the first character after the label upon success, ++ * NULL otherwise. ++ * See RFC1035, 2.3.1 ++ */ ++/* We don't need to be particularly anal. For example, allowing _, hyphen ++ * at the end, or leading and trailing dots would be ok, since it ++ * can't be used for attacks. (Leading hyphen can be, if someone uses ++ * cmd "$hostname" ++ * in the script: then hostname may be treated as an option) ++ */ ++static const char *valid_domain_label(const char *label) ++{ ++ unsigned char ch; ++ unsigned pos = 0; ++ ++ for (;;) { ++ ch = *label; ++ if ((ch|0x20) < 'a' || (ch|0x20) > 'z') { ++ if (pos == 0) { ++ /* label must begin with letter */ ++ return NULL; ++ } ++ if (ch < '0' || ch > '9') { ++ if (ch == '\0' || ch == '.') ++ return label; ++ /* DNS allows only '-', but we are more permissive */ ++ if (ch != '-' && ch != '_') ++ return NULL; ++ } ++ } ++ label++; ++ pos++; ++ //Do we want this? ++ //if (pos > 63) /* NS_MAXLABEL; labels must be 63 chars or less */ ++ // return NULL; ++ } ++} ++ ++/* Check if a given name represents a valid DNS name */ ++/* See RFC1035, 2.3.1 */ ++static int good_hostname(const char *name) ++{ ++ //const char *start = name; ++ ++ for (;;) { ++ name = valid_domain_label(name); ++ if (!name) ++ return 0; ++ if (!name[0]) ++ return 1; ++ //Do we want this? ++ //return ((name - start) < 1025); /* NS_MAXDNAME */ ++ name++; ++ } ++} ++ + /* Create "opt_name=opt_value" string */ + static NOINLINE char *xmalloc_optname_optval(uint8_t *option, const struct dhcp_optflag *optflag, const char *opt_name) + { +@@ -185,8 +243,11 @@ static NOINLINE char *xmalloc_optname_op + break; + } + case OPTION_STRING: ++ case OPTION_STRING_HOST: + memcpy(dest, option, len); + dest[len] = '\0'; ++ if (type == OPTION_STRING_HOST && !good_hostname(dest)) ++ safe_strncpy(dest, "bad", len); + return ret; /* Short circuit this case */ + case OPTION_STATIC_ROUTES: { + /* Option binary format: +@@ -314,6 +375,7 @@ static char **fill_envp(struct dhcp_pack + /* +1 element for each option, +2 for subnet option: */ + if (packet) { + /* note: do not search for "pad" (0) and "end" (255) options */ ++//TODO: change logic to scan packet _once_ + for (i = 1; i < 255; i++) { + temp = udhcp_get_option(packet, i); + if (temp) { diff --git a/package/busybox/1.20.2/busybox-1.20.2-kernel_ver.patch b/package/busybox/1.20.2/busybox-1.20.2-kernel_ver.patch new file mode 100644 index 0000000000..456fb08e11 --- /dev/null +++ b/package/busybox/1.20.2/busybox-1.20.2-kernel_ver.patch @@ -0,0 +1,25 @@ +--- busybox-1.20.2/libbb/kernel_version.c ++++ busybox-1.20.2-kernel_ver/libbb/kernel_version.c +@@ -20,18 +20,15 @@ + int FAST_FUNC get_linux_version_code(void) + { + struct utsname name; +- char *s; ++ char *s, *t; + int i, r; + +- if (uname(&name) == -1) { +- bb_perror_msg("can't get system information"); +- return 0; +- } +- ++ uname(&name); /* never fails */ + s = name.release; + r = 0; + for (i = 0; i < 3; i++) { +- r = r * 256 + atoi(strtok(s, ".")); ++ t = strtok(s, "."); ++ r = r * 256 + (t ? atoi(t) : 0); + s = NULL; + } + return r; diff --git a/package/busybox/1.20.2/busybox-1.20.2-ntpd.patch b/package/busybox/1.20.2/busybox-1.20.2-ntpd.patch new file mode 100644 index 0000000000..17fc0b1c4a --- /dev/null +++ b/package/busybox/1.20.2/busybox-1.20.2-ntpd.patch @@ -0,0 +1,11 @@ +--- busybox-1.20.2/networking/ntpd.c ++++ busybox-1.20.2-ntpd/networking/ntpd.c +@@ -1840,7 +1840,7 @@ recv_and_process_client_pkt(void /*int f + + /* Build a reply packet */ + memset(&msg, 0, sizeof(msg)); +- msg.m_status = G.stratum < MAXSTRAT ? G.ntp_status : LI_ALARM; ++ msg.m_status = G.stratum < MAXSTRAT ? (G.ntp_status & LI_MASK) : LI_ALARM; + msg.m_status |= (query_status & VERSION_MASK); + msg.m_status |= ((query_status & MODE_MASK) == MODE_CLIENT) ? + MODE_SERVER : MODE_SYM_PAS; diff --git a/package/busybox/1.20.2/busybox-1.20.2-pkg-config-selinux.patch b/package/busybox/1.20.2/busybox-1.20.2-pkg-config-selinux.patch new file mode 100644 index 0000000000..f39250c859 --- /dev/null +++ b/package/busybox/1.20.2/busybox-1.20.2-pkg-config-selinux.patch @@ -0,0 +1,67 @@ +From b1cec5003b73080a8aa7ea277621bf1c71c3e8d6 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Sat, 20 Oct 2012 15:01:26 -0400 +Subject: [PATCH] build system: use pkg-config to look up selinux libs + +Newer versions of libselinux has started linking against more libs. +Rather than continuing hardcoding things, switch to using pkg-config +to query for its dependencies. + +Signed-off-by: Mike Frysinger +--- + Makefile | 1 + + Makefile.flags | 12 +++++++++++- + 2 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index fccde4a..3a0a5e1 100644 +--- a/Makefile ++++ b/Makefile +@@ -297,6 +297,7 @@ NM = $(CROSS_COMPILE)nm + STRIP = $(CROSS_COMPILE)strip + OBJCOPY = $(CROSS_COMPILE)objcopy + OBJDUMP = $(CROSS_COMPILE)objdump ++PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config + AWK = awk + GENKSYMS = scripts/genksyms/genksyms + DEPMOD = /sbin/depmod +diff --git a/Makefile.flags b/Makefile.flags +index c43c8dc..15dcc1f 100644 +--- a/Makefile.flags ++++ b/Makefile.flags +@@ -74,6 +74,12 @@ ARCH_FPIC ?= -fpic + ARCH_FPIE ?= -fpie + ARCH_PIE ?= -pie + ++# Usage: $(eval $(call pkg_check_modules,VARIABLE-PREFIX,MODULES)) ++define pkg_check_modules ++$(1)_CFLAGS := $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags $(2)) ++$(1)_LIBS := $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs $(2)) ++endef ++ + ifeq ($(CONFIG_BUILD_LIBBUSYBOX),y) + # on i386: 14% smaller libbusybox.so + # (code itself is 9% bigger, we save on relocs/PLT/GOT) +@@ -85,6 +91,7 @@ endif + + ifeq ($(CONFIG_STATIC),y) + CFLAGS_busybox += -static ++PKG_CONFIG_FLAGS += --static + endif + + ifeq ($(CONFIG_PIE),y) +@@ -127,7 +134,10 @@ LDLIBS += pam pam_misc pthread + endif + + ifeq ($(CONFIG_SELINUX),y) +-LDLIBS += selinux sepol ++SELINUX_PC_MODULES = libselinux libsepol ++$(eval $(call pkg_check_modules,SELINUX,$(SELINUX_PC_MODULES))) ++CPPFLAGS += $(SELINUX_CFLAGS) ++LDLIBS += $(if $(SELINUX_LIBS),$(SELINUX_LIBS:-l%=%),$(SELINUX_PC_MODULES:lib%=%)) + endif + + ifeq ($(CONFIG_EFENCE),y) +-- +1.7.12 + diff --git a/package/busybox/1.20.2/busybox-1.20.2-sys-resource.patch b/package/busybox/1.20.2/busybox-1.20.2-sys-resource.patch new file mode 100644 index 0000000000..7b18500847 --- /dev/null +++ b/package/busybox/1.20.2/busybox-1.20.2-sys-resource.patch @@ -0,0 +1,123 @@ +From 5a5dfcad6ba96d12d68bd7b39279215a8fee70d3 Mon Sep 17 00:00:00 2001 +From: Tias Guns +Date: Sun, 10 Jun 2012 14:19:01 +0200 +Subject: [PATCH] inetd: fix build failure in Android + +Signed-off-by: Tias Guns +Signed-off-by: Denys Vlasenko +(cherry picked from commit 64f763b42a43cbf36e401690ff6767c25575e520) +--- + networking/inetd.c | 1 + + 1 file changed, 1 insertion(+) +-- +1.7.12 + +From 246ea72843d5b7e9d4cd902dc5e9d71359196303 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Thu, 5 Jul 2012 23:19:09 -0400 +Subject: [PATCH] include sys/resource.h where needed + +We use functions from sys/resource.h in misc applets, but don't include +the header. This breaks building with newer glibc versions, so add the +include where needed. + +Signed-off-by: Mike Frysinger +(cherry picked from commit c5fe9f7b723f949457263ef8e22ab807d5b549ce) +--- + loginutils/passwd.c | 1 + + miscutils/time.c | 1 + + networking/inetd.c | 1 + + networking/ntpd.c | 1 + + networking/ntpd_simple.c | 1 + + runit/chpst.c | 1 + + shell/shell_common.c | 1 + + 7 files changed, 7 insertions(+) + +diff --git a/loginutils/passwd.c b/loginutils/passwd.c +index b83db00..a7006f0 100644 +--- a/loginutils/passwd.c ++++ b/loginutils/passwd.c +@@ -15,6 +15,7 @@ + + #include "libbb.h" + #include ++#include /* setrlimit */ + + static void nuke_str(char *str) + { +diff --git a/miscutils/time.c b/miscutils/time.c +index 945f15f..ffed386 100644 +--- a/miscutils/time.c ++++ b/miscutils/time.c +@@ -16,6 +16,7 @@ + //usage: "\n -v Verbose" + + #include "libbb.h" ++#include /* getrusage */ + + /* Information on the resources used by a child process. */ + typedef struct { +diff --git a/networking/inetd.c b/networking/inetd.c +index 1308d74..00baf69 100644 +--- a/networking/inetd.c ++++ b/networking/inetd.c +@@ -165,6 +165,8 @@ + //usage: "\n (default: 0 - disabled)" + + #include ++#include /* setrlimit */ ++#include /* un.h may need this */ + #include + + #include "libbb.h" +diff --git a/networking/ntpd.c b/networking/ntpd.c +index 603801e..b885215 100644 +--- a/networking/ntpd.c ++++ b/networking/ntpd.c +@@ -46,6 +46,7 @@ + #include "libbb.h" + #include + #include /* For IPTOS_LOWDELAY definition */ ++#include /* setpriority */ + #include + #ifndef IPTOS_LOWDELAY + # define IPTOS_LOWDELAY 0x10 +diff --git a/networking/ntpd_simple.c b/networking/ntpd_simple.c +index 4ad44e4..1b7c66b 100644 +--- a/networking/ntpd_simple.c ++++ b/networking/ntpd_simple.c +@@ -7,6 +7,7 @@ + */ + #include "libbb.h" + #include /* For IPTOS_LOWDELAY definition */ ++#include /* setpriority */ + #ifndef IPTOS_LOWDELAY + # define IPTOS_LOWDELAY 0x10 + #endif +diff --git a/runit/chpst.c b/runit/chpst.c +index ac296ba..ed72c8b 100644 +--- a/runit/chpst.c ++++ b/runit/chpst.c +@@ -91,6 +91,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + //usage: "\n a SIGXCPU after N seconds" + + #include "libbb.h" ++#include /* getrlimit */ + + /* + Five applets here: chpst, envdir, envuidgid, setuidgid, softlimit. +diff --git a/shell/shell_common.c b/shell/shell_common.c +index 51c92d6..780e27e 100644 +--- a/shell/shell_common.c ++++ b/shell/shell_common.c +@@ -18,6 +18,7 @@ + */ + #include "libbb.h" + #include "shell_common.h" ++#include /* getrlimit */ + + const char defifsvar[] ALIGN1 = "IFS= \t\n"; + +-- +1.7.12 + diff --git a/package/busybox/1.21.1/0001-libbb-use-poll.h-instead-of-sys-poll.h.patch b/package/busybox/1.21.1/0001-libbb-use-poll.h-instead-of-sys-poll.h.patch new file mode 100644 index 0000000000..089d85817e --- /dev/null +++ b/package/busybox/1.21.1/0001-libbb-use-poll.h-instead-of-sys-poll.h.patch @@ -0,0 +1,32 @@ +From 676452a92d1fc4f85e8d89930d7729197c031026 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 5 Oct 2013 15:51:56 +0200 +Subject: [PATCH 1/3] libbb: use instead of + +As the pol() manpage recommends, include the header instead +of . This allows to get rid of gazillions of warnings when +building Busybox against the musl C library, which prints a warning +when the internal header is included directly instead of +the header. + +Signed-off-by: Thomas Petazzoni +--- + include/libbb.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/libbb.h b/include/libbb.h +index e520060..f03f454 100644 +--- a/include/libbb.h ++++ b/include/libbb.h +@@ -37,7 +37,7 @@ + #include /* dirname,basename */ + #undef basename + #define basename dont_use_basename +-#include ++#include + #include + #include + #include +-- +1.8.1.2 + diff --git a/package/busybox/1.21.1/0002-network-ifconfig-include-linux-if_slip.h-instead-of-.patch b/package/busybox/1.21.1/0002-network-ifconfig-include-linux-if_slip.h-instead-of-.patch new file mode 100644 index 0000000000..ed35719906 --- /dev/null +++ b/package/busybox/1.21.1/0002-network-ifconfig-include-linux-if_slip.h-instead-of-.patch @@ -0,0 +1,33 @@ +From 5eae213031a3ef88fe8d9d0a387f44264ea635cc Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 5 Oct 2013 15:53:16 +0200 +Subject: [PATCH 2/3] network/ifconfig: include instead of + + +The musl C library doesn't provide the since userspace +applications can just as well use the kernel header. + +This commit fixes the build of the ifconfig applet with the musl C +library. + +Signed-off-by: Thomas Petazzoni +--- + networking/ifconfig.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/networking/ifconfig.c b/networking/ifconfig.c +index 782374b..c90ed6b 100644 +--- a/networking/ifconfig.c ++++ b/networking/ifconfig.c +@@ -56,7 +56,7 @@ + #endif + + #if ENABLE_FEATURE_IFCONFIG_SLIP +-# include ++# include + #endif + + /* I don't know if this is needed for busybox or not. Anyone? */ +-- +1.8.1.2 + diff --git a/package/busybox/1.21.1/0003-networking-libiproute-use-linux-if_packet.h-instead-.patch b/package/busybox/1.21.1/0003-networking-libiproute-use-linux-if_packet.h-instead-.patch new file mode 100644 index 0000000000..7b7465653b --- /dev/null +++ b/package/busybox/1.21.1/0003-networking-libiproute-use-linux-if_packet.h-instead-.patch @@ -0,0 +1,36 @@ +From d4fec31889ad660a58dab633c511221feb66e817 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 5 Oct 2013 15:55:06 +0200 +Subject: [PATCH 3/3] networking/libiproute: use instead of + + +The musl C library doesn't provide the since the +corresponding kernel headers already provides the +necessary definitions. Replacing by + also removes the need to include + + +This commit fixes the build of iplink with the musl C library. + +Signed-off-by: Thomas Petazzoni +--- + networking/libiproute/iplink.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c +index bad2017..32ccb1c 100644 +--- a/networking/libiproute/iplink.c ++++ b/networking/libiproute/iplink.c +@@ -5,8 +5,7 @@ + * Licensed under GPLv2 or later, see file LICENSE in this source tree. + */ + #include +-#include +-#include ++#include + #include + + #include "ip_common.h" /* #include "libbb.h" is inside */ +-- +1.8.1.2 + diff --git a/package/busybox/Config.in b/package/busybox/Config.in index ecb3d4004d..2d55aa60f9 100644 --- a/package/busybox/Config.in +++ b/package/busybox/Config.in @@ -13,22 +13,18 @@ if BR2_PACKAGE_BUSYBOX choice prompt "BusyBox Version" - default BR2_BUSYBOX_VERSION_1_18_X + default BR2_BUSYBOX_VERSION_1_21_X help Select the version of BusyBox you wish to use. - config BR2_BUSYBOX_VERSION_1_15_X - bool "BusyBox 1.15.x" - depends on BR2_DEPRECATED + config BR2_BUSYBOX_VERSION_1_19_X + bool "BusyBox 1.19.x" - config BR2_BUSYBOX_VERSION_1_16_X - bool "BusyBox 1.16.x" + config BR2_BUSYBOX_VERSION_1_20_X + bool "BusyBox 1.20.x" - config BR2_BUSYBOX_VERSION_1_17_X - bool "BusyBox 1.17.x" - - config BR2_BUSYBOX_VERSION_1_18_X - bool "BusyBox 1.18.x" + config BR2_BUSYBOX_VERSION_1_21_X + bool "BusyBox 1.21.x" config BR2_PACKAGE_BUSYBOX_SNAPSHOT bool "daily snapshot" @@ -37,18 +33,16 @@ endchoice config BR2_BUSYBOX_VERSION string - default "1.15.3" if BR2_BUSYBOX_VERSION_1_15_X - default "1.16.2" if BR2_BUSYBOX_VERSION_1_16_X - default "1.17.4" if BR2_BUSYBOX_VERSION_1_17_X - default "1.18.3" if BR2_BUSYBOX_VERSION_1_18_X + default "1.19.4" if BR2_BUSYBOX_VERSION_1_19_X + default "1.20.2" if BR2_BUSYBOX_VERSION_1_20_X + default "1.21.1" if BR2_BUSYBOX_VERSION_1_21_X config BR2_PACKAGE_BUSYBOX_CONFIG string "BusyBox configuration file to use?" - default "package/busybox/busybox-1.18.x.config" if BR2_PACKAGE_BUSYBOX_SNAPSHOT - default "package/busybox/busybox-1.13.x.config" if BR2_BUSYBOX_VERSION_1_15_X - default "package/busybox/busybox-1.16.x.config" if BR2_BUSYBOX_VERSION_1_16_X - default "package/busybox/busybox-1.17.x.config" if BR2_BUSYBOX_VERSION_1_17_X - default "package/busybox/busybox-1.18.x.config" if BR2_BUSYBOX_VERSION_1_18_X + default "package/busybox/busybox-1.21.x.config" if BR2_PACKAGE_BUSYBOX_SNAPSHOT + default "package/busybox/busybox-1.19.x.config" if BR2_BUSYBOX_VERSION_1_19_X + default "package/busybox/busybox-1.20.x.config" if BR2_BUSYBOX_VERSION_1_20_X + default "package/busybox/busybox-1.21.x.config" if BR2_BUSYBOX_VERSION_1_21_X help Some people may wish to use their own modified BusyBox configuration file, and will specify their config file location with this option. @@ -56,11 +50,30 @@ config BR2_PACKAGE_BUSYBOX_CONFIG Most people will just use the default BusyBox configuration file. config BR2_PACKAGE_BUSYBOX_SHOW_OTHERS - bool "Show packages that are also provided by busybox" if BR2_PACKAGE_BUSYBOX + bool "Show packages that are also provided by busybox" help Show packages in menuconfig that are potentially also provided by busybox. +config BR2_PACKAGE_BUSYBOX_WATCHDOG + bool "Install the watchdog daemon startup script" + help + Install the watchdog daemon startup script, + that just start at the boot the busybox watchdog daemon. + +if BR2_PACKAGE_BUSYBOX_WATCHDOG + +config BR2_PACKAGE_BUSYBOX_WATCHDOG_PERIOD + string "Delay between reset" + default "5" + help + Select the number of seconds between each + reset of the watchdog (default 5) + + Use ms suffix to specify milliseconds (e.g. 500ms) + +endif + endif if !BR2_PACKAGE_BUSYBOX # kconfig doesn't support else @@ -68,5 +81,5 @@ if !BR2_PACKAGE_BUSYBOX # kconfig doesn't support else # add dummy config so the stuff with busybox alternatives are shown # when busybox is disabled config BR2_PACKAGE_BUSYBOX_SHOW_OTHERS - default y + default y endif diff --git a/package/busybox/S01logging b/package/busybox/S01logging new file mode 100644 index 0000000000..b7af2a7d5d --- /dev/null +++ b/package/busybox/S01logging @@ -0,0 +1,26 @@ +#!/bin/sh +# +# Start logging +# + +case "$1" in + start) + echo -n "Starting logging: " + start-stop-daemon -b -S -q -m -p /var/run/syslogd.pid --exec /sbin/syslogd -- -n + start-stop-daemon -b -S -q -m -p /var/run/klogd.pid --exec /sbin/klogd -- -n + echo "OK" + ;; + stop) + echo -n "Stopping logging: " + start-stop-daemon -K -q -p /var/run/syslogd.pid + start-stop-daemon -K -q -p /var/run/klogd.pid + echo "OK" + ;; + restart|reload) + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/busybox/S10mdev b/package/busybox/S10mdev index d2643d0234..d386d420b5 100644 --- a/package/busybox/S10mdev +++ b/package/busybox/S10mdev @@ -6,6 +6,7 @@ case "$1" in start) echo "Starting mdev..." + echo /sbin/mdev >/proc/sys/kernel/hotplug /sbin/mdev -s ;; stop) @@ -13,7 +14,7 @@ case "$1" in restart|reload) ;; *) - echo $"Usage: $0 {start|stop|restart}" + echo "Usage: $0 {start|stop|restart}" exit 1 esac diff --git a/package/busybox/S15watchdog b/package/busybox/S15watchdog new file mode 100644 index 0000000000..7f1110c46e --- /dev/null +++ b/package/busybox/S15watchdog @@ -0,0 +1,20 @@ +#!/bin/sh +# +# Start watchdog +# + +case "$1" in + start) + echo "Starting watchdog..." + watchdog -t PERIOD /dev/watchdog + ;; + stop) + ;; + restart|reload) + ;; + *) + echo $"Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/busybox/busybox-1.13.x.config b/package/busybox/busybox-1.13.x.config deleted file mode 100644 index 059a0b3a30..0000000000 --- a/package/busybox/busybox-1.13.x.config +++ /dev/null @@ -1,870 +0,0 @@ -# -# Automatically generated make config: don't edit -# Busybox version: 1.13.0 -# Sat Nov 15 17:33:29 2008 -# -CONFIG_HAVE_DOT_CONFIG=y - -# -# Busybox Settings -# - -# -# General Configuration -# -CONFIG_DESKTOP=y -# CONFIG_EXTRA_COMPAT is not set -# CONFIG_FEATURE_ASSUME_UNICODE is not set -CONFIG_FEATURE_BUFFERS_USE_MALLOC=y -# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set -# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set -CONFIG_SHOW_USAGE=y -CONFIG_FEATURE_VERBOSE_USAGE=y -# CONFIG_FEATURE_COMPRESS_USAGE is not set -CONFIG_FEATURE_INSTALLER=y -# CONFIG_LOCALE_SUPPORT is not set -CONFIG_GETOPT_LONG=y -CONFIG_FEATURE_DEVPTS=y -CONFIG_FEATURE_CLEAN_UP=y -# CONFIG_FEATURE_PIDFILE is not set -CONFIG_FEATURE_SUID=y -# CONFIG_FEATURE_SUID_CONFIG is not set -# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set -# CONFIG_SELINUX is not set -# CONFIG_FEATURE_PREFER_APPLETS is not set -CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" -CONFIG_FEATURE_SYSLOG=y -# CONFIG_FEATURE_HAVE_RPC is not set - -# -# Build Options -# -# CONFIG_STATIC is not set -# CONFIG_PIE is not set -# CONFIG_NOMMU is not set -# CONFIG_BUILD_LIBBUSYBOX is not set -# CONFIG_FEATURE_INDIVIDUAL is not set -# CONFIG_FEATURE_SHARED_BUSYBOX is not set -# CONFIG_LFS is not set -CONFIG_CROSS_COMPILER_PREFIX="" -CONFIG_EXTRA_CFLAGS="" - -# -# Debugging Options -# -# CONFIG_DEBUG is not set -# CONFIG_DEBUG_PESSIMIZE is not set -# CONFIG_WERROR is not set -CONFIG_NO_DEBUG_LIB=y -# CONFIG_DMALLOC is not set -# CONFIG_EFENCE is not set -CONFIG_INCLUDE_SUSv2=y - -# -# Installation Options -# -# CONFIG_INSTALL_NO_USR is not set -CONFIG_INSTALL_APPLET_SYMLINKS=y -# CONFIG_INSTALL_APPLET_HARDLINKS is not set -# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set -# CONFIG_INSTALL_APPLET_DONT is not set -# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set -# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set -# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set -CONFIG_PREFIX="./_install" - -# -# Busybox Library Tuning -# -CONFIG_PASSWORD_MINLEN=6 -CONFIG_MD5_SIZE_VS_SPEED=2 -# CONFIG_FEATURE_FAST_TOP is not set -# CONFIG_FEATURE_ETC_NETWORKS is not set -CONFIG_FEATURE_EDITING=y -CONFIG_FEATURE_EDITING_MAX_LEN=1024 -CONFIG_FEATURE_EDITING_VI=y -CONFIG_FEATURE_EDITING_HISTORY=999 -CONFIG_FEATURE_EDITING_SAVEHISTORY=y -CONFIG_FEATURE_TAB_COMPLETION=y -# CONFIG_FEATURE_USERNAME_COMPLETION is not set -CONFIG_FEATURE_EDITING_FANCY_PROMPT=y -# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set -CONFIG_FEATURE_COPYBUF_KB=4 -CONFIG_MONOTONIC_SYSCALL=y -CONFIG_IOCTL_HEX2STR_ERROR=y -CONFIG_FEATURE_HWIB=y - -# -# Applets -# - -# -# Archival Utilities -# -# CONFIG_FEATURE_SEAMLESS_LZMA is not set -# CONFIG_FEATURE_SEAMLESS_BZ2 is not set -# CONFIG_FEATURE_SEAMLESS_GZ is not set -# CONFIG_FEATURE_SEAMLESS_Z is not set -CONFIG_AR=y -# CONFIG_FEATURE_AR_LONG_FILENAMES is not set -CONFIG_BUNZIP2=y -# CONFIG_BZIP2 is not set -CONFIG_CPIO=y -# CONFIG_FEATURE_CPIO_O is not set -# CONFIG_DPKG is not set -# CONFIG_DPKG_DEB is not set -# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set -CONFIG_GUNZIP=y -CONFIG_GZIP=y -# CONFIG_RPM2CPIO is not set -# CONFIG_RPM is not set -CONFIG_TAR=y -CONFIG_FEATURE_TAR_CREATE=y -# CONFIG_FEATURE_TAR_AUTODETECT is not set -CONFIG_FEATURE_TAR_FROM=y -# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set -# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set -CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y -CONFIG_FEATURE_TAR_LONG_OPTIONS=y -# CONFIG_FEATURE_TAR_UNAME_GNAME is not set -# CONFIG_UNCOMPRESS is not set -CONFIG_UNLZMA=y -# CONFIG_FEATURE_LZMA_FAST is not set -CONFIG_UNZIP=y - -# -# Coreutils -# -CONFIG_BASENAME=y -# CONFIG_CAL is not set -CONFIG_CAT=y -CONFIG_CATV=y -CONFIG_CHGRP=y -CONFIG_CHMOD=y -CONFIG_CHOWN=y -CONFIG_CHROOT=y -CONFIG_CKSUM=y -# CONFIG_COMM is not set -CONFIG_CP=y -CONFIG_CUT=y -CONFIG_DATE=y -CONFIG_FEATURE_DATE_ISOFMT=y -CONFIG_DD=y -CONFIG_FEATURE_DD_SIGNAL_HANDLING=y -CONFIG_FEATURE_DD_IBS_OBS=y -CONFIG_DF=y -# CONFIG_FEATURE_DF_FANCY is not set -CONFIG_DIRNAME=y -CONFIG_DOS2UNIX=y -CONFIG_UNIX2DOS=y -CONFIG_DU=y -CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y -CONFIG_ECHO=y -CONFIG_FEATURE_FANCY_ECHO=y -CONFIG_ENV=y -# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set -# CONFIG_EXPAND is not set -# CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set -CONFIG_EXPR=y -CONFIG_EXPR_MATH_SUPPORT_64=y -CONFIG_FALSE=y -CONFIG_FOLD=y -CONFIG_HEAD=y -CONFIG_FEATURE_FANCY_HEAD=y -CONFIG_HOSTID=y -CONFIG_ID=y -CONFIG_INSTALL=y -CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y -CONFIG_LENGTH=y -CONFIG_LN=y -CONFIG_LOGNAME=y -CONFIG_LS=y -CONFIG_FEATURE_LS_FILETYPES=y -CONFIG_FEATURE_LS_FOLLOWLINKS=y -CONFIG_FEATURE_LS_RECURSIVE=y -CONFIG_FEATURE_LS_SORTFILES=y -CONFIG_FEATURE_LS_TIMESTAMPS=y -CONFIG_FEATURE_LS_USERNAME=y -CONFIG_FEATURE_LS_COLOR=y -CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y -CONFIG_MD5SUM=y -CONFIG_MKDIR=y -CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y -CONFIG_MKFIFO=y -CONFIG_MKNOD=y -CONFIG_MV=y -CONFIG_FEATURE_MV_LONG_OPTIONS=y -CONFIG_NICE=y -CONFIG_NOHUP=y -CONFIG_OD=y -CONFIG_PRINTENV=y -CONFIG_PRINTF=y -CONFIG_PWD=y -CONFIG_READLINK=y -CONFIG_FEATURE_READLINK_FOLLOW=y -CONFIG_REALPATH=y -CONFIG_RM=y -CONFIG_RMDIR=y -# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set -CONFIG_SEQ=y -CONFIG_SHA1SUM=y -CONFIG_SLEEP=y -# CONFIG_FEATURE_FANCY_SLEEP is not set -# CONFIG_FEATURE_FLOAT_SLEEP is not set -CONFIG_SORT=y -CONFIG_FEATURE_SORT_BIG=y -# CONFIG_SPLIT is not set -# CONFIG_FEATURE_SPLIT_FANCY is not set -# CONFIG_STAT is not set -# CONFIG_FEATURE_STAT_FORMAT is not set -CONFIG_STTY=y -# CONFIG_SUM is not set -CONFIG_SYNC=y -# CONFIG_TAC is not set -CONFIG_TAIL=y -CONFIG_FEATURE_FANCY_TAIL=y -CONFIG_TEE=y -CONFIG_FEATURE_TEE_USE_BLOCK_IO=y -CONFIG_TEST=y -CONFIG_FEATURE_TEST_64=y -CONFIG_TOUCH=y -CONFIG_TR=y -CONFIG_FEATURE_TR_CLASSES=y -CONFIG_FEATURE_TR_EQUIV=y -CONFIG_TRUE=y -CONFIG_TTY=y -CONFIG_UNAME=y -# CONFIG_UNEXPAND is not set -# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set -CONFIG_UNIQ=y -CONFIG_USLEEP=y -CONFIG_UUDECODE=y -CONFIG_UUENCODE=y -CONFIG_WC=y -# CONFIG_FEATURE_WC_LARGE is not set -CONFIG_WHO=y -CONFIG_WHOAMI=y -CONFIG_YES=y - -# -# Common options for cp and mv -# -CONFIG_FEATURE_PRESERVE_HARDLINKS=y - -# -# Common options for ls, more and telnet -# -CONFIG_FEATURE_AUTOWIDTH=y - -# -# Common options for df, du, ls -# -CONFIG_FEATURE_HUMAN_READABLE=y - -# -# Common options for md5sum, sha1sum -# -CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y - -# -# Console Utilities -# -CONFIG_CHVT=y -CONFIG_CLEAR=y -CONFIG_DEALLOCVT=y -CONFIG_DUMPKMAP=y -# CONFIG_KBD_MODE is not set -CONFIG_LOADFONT=y -CONFIG_LOADKMAP=y -CONFIG_OPENVT=y -CONFIG_RESET=y -CONFIG_RESIZE=y -CONFIG_FEATURE_RESIZE_PRINT=y -CONFIG_SETCONSOLE=y -# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set -# CONFIG_SETFONT is not set -# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set -CONFIG_DEFAULT_SETFONT_DIR="" -CONFIG_SETKEYCODES=y -CONFIG_SETLOGCONS=y -# CONFIG_SHOWKEY is not set - -# -# Debian Utilities -# -CONFIG_MKTEMP=y -CONFIG_PIPE_PROGRESS=y -CONFIG_RUN_PARTS=y -CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y -# CONFIG_FEATURE_RUN_PARTS_FANCY is not set -CONFIG_START_STOP_DAEMON=y -CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y -CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y -CONFIG_WHICH=y - -# -# Editors -# -CONFIG_AWK=y -# CONFIG_FEATURE_AWK_LIBM is not set -CONFIG_CMP=y -CONFIG_DIFF=y -CONFIG_FEATURE_DIFF_BINARY=y -CONFIG_FEATURE_DIFF_DIR=y -# CONFIG_FEATURE_DIFF_MINIMAL is not set -# CONFIG_ED is not set -CONFIG_PATCH=y -CONFIG_SED=y -CONFIG_VI=y -CONFIG_FEATURE_VI_MAX_LEN=4096 -CONFIG_FEATURE_VI_8BIT=y -CONFIG_FEATURE_VI_COLON=y -CONFIG_FEATURE_VI_YANKMARK=y -CONFIG_FEATURE_VI_SEARCH=y -CONFIG_FEATURE_VI_USE_SIGNALS=y -CONFIG_FEATURE_VI_DOT_CMD=y -CONFIG_FEATURE_VI_READONLY=y -CONFIG_FEATURE_VI_SETOPTS=y -CONFIG_FEATURE_VI_SET=y -CONFIG_FEATURE_VI_WIN_RESIZE=y -CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y -CONFIG_FEATURE_ALLOW_EXEC=y - -# -# Finding Utilities -# -CONFIG_FIND=y -CONFIG_FEATURE_FIND_PRINT0=y -CONFIG_FEATURE_FIND_MTIME=y -CONFIG_FEATURE_FIND_MMIN=y -CONFIG_FEATURE_FIND_PERM=y -CONFIG_FEATURE_FIND_TYPE=y -CONFIG_FEATURE_FIND_XDEV=y -CONFIG_FEATURE_FIND_MAXDEPTH=y -CONFIG_FEATURE_FIND_NEWER=y -# CONFIG_FEATURE_FIND_INUM is not set -CONFIG_FEATURE_FIND_EXEC=y -CONFIG_FEATURE_FIND_USER=y -CONFIG_FEATURE_FIND_GROUP=y -CONFIG_FEATURE_FIND_NOT=y -CONFIG_FEATURE_FIND_DEPTH=y -CONFIG_FEATURE_FIND_PAREN=y -CONFIG_FEATURE_FIND_SIZE=y -CONFIG_FEATURE_FIND_PRUNE=y -# CONFIG_FEATURE_FIND_DELETE is not set -CONFIG_FEATURE_FIND_PATH=y -CONFIG_FEATURE_FIND_REGEX=y -# CONFIG_FEATURE_FIND_CONTEXT is not set -CONFIG_GREP=y -CONFIG_FEATURE_GREP_EGREP_ALIAS=y -CONFIG_FEATURE_GREP_FGREP_ALIAS=y -CONFIG_FEATURE_GREP_CONTEXT=y -CONFIG_XARGS=y -# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set -CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y -CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y -CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y - -# -# Init Utilities -# -CONFIG_INIT=y -CONFIG_FEATURE_USE_INITTAB=y -CONFIG_FEATURE_KILL_REMOVED=y -CONFIG_FEATURE_KILL_DELAY=0 -CONFIG_FEATURE_INIT_SCTTY=y -CONFIG_FEATURE_INIT_SYSLOG=y -CONFIG_FEATURE_EXTRA_QUIET=y -# CONFIG_FEATURE_INIT_COREDUMPS is not set -CONFIG_FEATURE_INITRD=y -CONFIG_HALT=y -CONFIG_MESG=y - -# -# Login/Password Management Utilities -# -CONFIG_FEATURE_SHADOWPASSWDS=y -# CONFIG_USE_BB_PWD_GRP is not set -# CONFIG_USE_BB_SHADOW is not set -CONFIG_USE_BB_CRYPT=y -CONFIG_ADDGROUP=y -# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set -CONFIG_DELGROUP=y -# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set -# CONFIG_FEATURE_CHECK_NAMES is not set -CONFIG_ADDUSER=y -# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set -CONFIG_DELUSER=y -CONFIG_GETTY=y -CONFIG_FEATURE_UTMP=y -CONFIG_FEATURE_WTMP=y -CONFIG_LOGIN=y -# CONFIG_PAM is not set -# CONFIG_LOGIN_SCRIPTS is not set -CONFIG_FEATURE_NOLOGIN=y -CONFIG_FEATURE_SECURETTY=y -CONFIG_PASSWD=y -CONFIG_FEATURE_PASSWD_WEAK_CHECK=y -# CONFIG_CRYPTPW is not set -# CONFIG_CHPASSWD is not set -CONFIG_SU=y -CONFIG_FEATURE_SU_SYSLOG=y -CONFIG_FEATURE_SU_CHECKS_SHELLS=y -CONFIG_SULOGIN=y -CONFIG_VLOCK=y - -# -# Linux Ext2 FS Progs -# -CONFIG_CHATTR=y -CONFIG_FSCK=y -CONFIG_LSATTR=y - -# -# Linux Module Utilities -# -CONFIG_DEFAULT_MODULES_DIR="/lib/modules" -CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" -# CONFIG_MODPROBE_SMALL is not set -# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set -# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set -CONFIG_INSMOD=y -CONFIG_RMMOD=y -CONFIG_LSMOD=y -CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y -CONFIG_MODPROBE=y -# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set -# CONFIG_DEPMOD is not set - -# -# Options common to multiple modutils -# -# CONFIG_FEATURE_2_4_MODULES is not set -# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set -# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set -# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set -# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set -# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set -CONFIG_FEATURE_CHECK_TAINTED_MODULE=y -CONFIG_FEATURE_MODUTILS_ALIAS=y -CONFIG_FEATURE_MODUTILS_SYMBOLS=y - -# -# Linux System Utilities -# -# CONFIG_BLKID is not set -CONFIG_DMESG=y -CONFIG_FEATURE_DMESG_PRETTY=y -# CONFIG_FBSET is not set -# CONFIG_FEATURE_FBSET_FANCY is not set -# CONFIG_FEATURE_FBSET_READMODE is not set -CONFIG_FDFLUSH=y -CONFIG_FDFORMAT=y -# CONFIG_FDISK is not set -# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set -# CONFIG_FEATURE_FDISK_WRITABLE is not set -# CONFIG_FEATURE_AIX_LABEL is not set -# CONFIG_FEATURE_SGI_LABEL is not set -# CONFIG_FEATURE_SUN_LABEL is not set -# CONFIG_FEATURE_OSF_LABEL is not set -# CONFIG_FEATURE_FDISK_ADVANCED is not set -# CONFIG_FINDFS is not set -CONFIG_FREERAMDISK=y -# CONFIG_FSCK_MINIX is not set -# CONFIG_MKFS_MINIX is not set -# CONFIG_FEATURE_MINIX2 is not set -CONFIG_GETOPT=y -CONFIG_HEXDUMP=y -# CONFIG_FEATURE_HEXDUMP_REVERSE is not set -# CONFIG_HD is not set -CONFIG_HWCLOCK=y -CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y -CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y -CONFIG_IPCRM=y -CONFIG_IPCS=y -CONFIG_LOSETUP=y -CONFIG_MDEV=y -CONFIG_FEATURE_MDEV_CONF=y -# CONFIG_FEATURE_MDEV_RENAME is not set -# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set -CONFIG_FEATURE_MDEV_EXEC=y -# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set -CONFIG_MKSWAP=y -# CONFIG_FEATURE_MKSWAP_V0 is not set -CONFIG_MORE=y -CONFIG_FEATURE_USE_TERMIOS=y -# CONFIG_VOLUMEID is not set -# CONFIG_FEATURE_VOLUMEID_EXT is not set -# CONFIG_FEATURE_VOLUMEID_REISERFS is not set -# CONFIG_FEATURE_VOLUMEID_FAT is not set -# CONFIG_FEATURE_VOLUMEID_HFS is not set -# CONFIG_FEATURE_VOLUMEID_JFS is not set -# CONFIG_FEATURE_VOLUMEID_XFS is not set -# CONFIG_FEATURE_VOLUMEID_NTFS is not set -# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set -# CONFIG_FEATURE_VOLUMEID_UDF is not set -# CONFIG_FEATURE_VOLUMEID_LUKS is not set -# CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set -# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set -# CONFIG_FEATURE_VOLUMEID_ROMFS is not set -# CONFIG_FEATURE_VOLUMEID_SYSV is not set -# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set -# CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set -CONFIG_MOUNT=y -# CONFIG_FEATURE_MOUNT_FAKE is not set -# CONFIG_FEATURE_MOUNT_VERBOSE is not set -# CONFIG_FEATURE_MOUNT_HELPERS is not set -# CONFIG_FEATURE_MOUNT_LABEL is not set -# CONFIG_FEATURE_MOUNT_NFS is not set -CONFIG_FEATURE_MOUNT_CIFS=y -CONFIG_FEATURE_MOUNT_FLAGS=y -CONFIG_FEATURE_MOUNT_FSTAB=y -CONFIG_PIVOT_ROOT=y -CONFIG_RDATE=y -# CONFIG_RDEV is not set -CONFIG_READPROFILE=y -# CONFIG_RTCWAKE is not set -# CONFIG_SCRIPT is not set -CONFIG_SETARCH=y -CONFIG_SWAPONOFF=y -# CONFIG_FEATURE_SWAPON_PRI is not set -CONFIG_SWITCH_ROOT=y -CONFIG_UMOUNT=y -CONFIG_FEATURE_UMOUNT_ALL=y - -# -# Common options for mount/umount -# -CONFIG_FEATURE_MOUNT_LOOP=y -# CONFIG_FEATURE_MTAB_SUPPORT is not set - -# -# Miscellaneous Utilities -# -# CONFIG_ADJTIMEX is not set -# CONFIG_BBCONFIG is not set -# CONFIG_CHAT is not set -# CONFIG_FEATURE_CHAT_NOFAIL is not set -# CONFIG_FEATURE_CHAT_TTY_HIFI is not set -# CONFIG_FEATURE_CHAT_IMPLICIT_CR is not set -# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set -# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set -# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set -# CONFIG_FEATURE_CHAT_CLR_ABORT is not set -CONFIG_CHRT=y -CONFIG_CROND=y -# CONFIG_FEATURE_CROND_D is not set -# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set -CONFIG_CRONTAB=y -CONFIG_DC=y -# CONFIG_FEATURE_DC_LIBM is not set -# CONFIG_DEVFSD is not set -# CONFIG_DEVFSD_MODLOAD is not set -# CONFIG_DEVFSD_FG_NP is not set -# CONFIG_DEVFSD_VERBOSE is not set -# CONFIG_FEATURE_DEVFS is not set -CONFIG_DEVMEM=y -CONFIG_EJECT=y -# CONFIG_FEATURE_EJECT_SCSI is not set -# CONFIG_FBSPLASH is not set -# CONFIG_INOTIFYD is not set -CONFIG_LAST=y -CONFIG_FEATURE_LAST_SMALL=y -# CONFIG_FEATURE_LAST_FANCY is not set -CONFIG_LESS=y -CONFIG_FEATURE_LESS_MAXLINES=9999999 -CONFIG_FEATURE_LESS_BRACKETS=y -CONFIG_FEATURE_LESS_FLAGS=y -# CONFIG_FEATURE_LESS_DASHCMD is not set -# CONFIG_FEATURE_LESS_MARKS is not set -CONFIG_FEATURE_LESS_REGEXP=y -# CONFIG_FEATURE_LESS_LINENUMS is not set -# CONFIG_FEATURE_LESS_WINCH is not set -CONFIG_HDPARM=y -CONFIG_FEATURE_HDPARM_GET_IDENTITY=y -# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set -# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set -# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set -# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set -# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set -CONFIG_MAKEDEVS=y -# CONFIG_FEATURE_MAKEDEVS_LEAF is not set -CONFIG_FEATURE_MAKEDEVS_TABLE=y -# CONFIG_MAN is not set -# CONFIG_MICROCOM is not set -CONFIG_MOUNTPOINT=y -CONFIG_MT=y -# CONFIG_RAIDAUTORUN is not set -# CONFIG_READAHEAD is not set -CONFIG_RUNLEVEL=y -# CONFIG_RX is not set -CONFIG_SETSID=y -CONFIG_STRINGS=y -# CONFIG_TASKSET is not set -# CONFIG_FEATURE_TASKSET_FANCY is not set -CONFIG_TIME=y -# CONFIG_TTYSIZE is not set -CONFIG_WATCHDOG=y - -# -# Networking Utilities -# -# CONFIG_FEATURE_IPV6 is not set -# CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set -# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set -# CONFIG_ARP is not set -CONFIG_ARPING=y -# CONFIG_BRCTL is not set -# CONFIG_FEATURE_BRCTL_FANCY is not set -# CONFIG_FEATURE_BRCTL_SHOW is not set -CONFIG_DNSD=y -CONFIG_ETHER_WAKE=y -# CONFIG_FAKEIDENTD is not set -# CONFIG_FTPGET is not set -# CONFIG_FTPPUT is not set -# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set -CONFIG_HOSTNAME=y -# CONFIG_HTTPD is not set -# CONFIG_FEATURE_HTTPD_RANGES is not set -# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set -# CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP is not set -# CONFIG_FEATURE_HTTPD_SETUID is not set -# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set -# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set -# CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES is not set -# CONFIG_FEATURE_HTTPD_CGI is not set -# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set -# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set -# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set -# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set -# CONFIG_FEATURE_HTTPD_PROXY is not set -CONFIG_IFCONFIG=y -CONFIG_FEATURE_IFCONFIG_STATUS=y -CONFIG_FEATURE_IFCONFIG_SLIP=y -CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y -CONFIG_FEATURE_IFCONFIG_HW=y -# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set -# CONFIG_IFENSLAVE is not set -CONFIG_IFUPDOWN=y -CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate" -CONFIG_FEATURE_IFUPDOWN_IP=y -# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set -# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set -CONFIG_FEATURE_IFUPDOWN_IPV4=y -# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set -CONFIG_FEATURE_IFUPDOWN_MAPPING=y -# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set -CONFIG_INETD=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y -# CONFIG_FEATURE_INETD_RPC is not set -CONFIG_IP=y -CONFIG_FEATURE_IP_ADDRESS=y -CONFIG_FEATURE_IP_LINK=y -CONFIG_FEATURE_IP_ROUTE=y -CONFIG_FEATURE_IP_TUNNEL=y -CONFIG_FEATURE_IP_RULE=y -CONFIG_FEATURE_IP_SHORT_FORMS=y -# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set -CONFIG_IPADDR=y -CONFIG_IPLINK=y -CONFIG_IPROUTE=y -CONFIG_IPTUNNEL=y -CONFIG_IPRULE=y -# CONFIG_IPCALC is not set -# CONFIG_FEATURE_IPCALC_FANCY is not set -# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set -CONFIG_NAMEIF=y -# CONFIG_FEATURE_NAMEIF_EXTENDED is not set -# CONFIG_NC is not set -# CONFIG_NC_SERVER is not set -# CONFIG_NC_EXTRA is not set -CONFIG_NETSTAT=y -# CONFIG_FEATURE_NETSTAT_WIDE is not set -# CONFIG_FEATURE_NETSTAT_PRG is not set -CONFIG_NSLOOKUP=y -CONFIG_PING=y -# CONFIG_PING6 is not set -CONFIG_FEATURE_FANCY_PING=y -# CONFIG_PSCAN is not set -CONFIG_ROUTE=y -# CONFIG_SLATTACH is not set -CONFIG_TELNET=y -CONFIG_FEATURE_TELNET_TTYPE=y -CONFIG_FEATURE_TELNET_AUTOLOGIN=y -# CONFIG_TELNETD is not set -# CONFIG_FEATURE_TELNETD_STANDALONE is not set -CONFIG_TFTP=y -# CONFIG_TFTPD is not set -CONFIG_FEATURE_TFTP_GET=y -CONFIG_FEATURE_TFTP_PUT=y -CONFIG_FEATURE_TFTP_BLOCKSIZE=y -# CONFIG_TFTP_DEBUG is not set -CONFIG_TRACEROUTE=y -# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set -# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set -# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set -CONFIG_APP_UDHCPD=y -CONFIG_APP_DHCPRELAY=y -CONFIG_APP_DUMPLEASES=y -# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set -CONFIG_DHCPD_LEASES_FILE="/var/lib/misc/udhcpd.leases" -CONFIG_APP_UDHCPC=y -CONFIG_FEATURE_UDHCPC_ARPING=y -# CONFIG_FEATURE_UDHCP_PORT is not set -# CONFIG_UDHCP_DEBUG is not set -# CONFIG_FEATURE_UDHCP_RFC3397 is not set -CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script" -CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 -CONFIG_VCONFIG=y -CONFIG_WGET=y -CONFIG_FEATURE_WGET_STATUSBAR=y -CONFIG_FEATURE_WGET_AUTHENTICATION=y -CONFIG_FEATURE_WGET_LONG_OPTIONS=y -# CONFIG_ZCIP is not set -# CONFIG_TCPSVD is not set -# CONFIG_UDPSVD is not set - -# -# Print Utilities -# -# CONFIG_LPD is not set -# CONFIG_LPR is not set -# CONFIG_LPQ is not set - -# -# Mail Utilities -# -# CONFIG_MAKEMIME is not set -CONFIG_FEATURE_MIME_CHARSET="" -# CONFIG_POPMAILDIR is not set -# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set -# CONFIG_REFORMIME is not set -# CONFIG_FEATURE_REFORMIME_COMPAT is not set -# CONFIG_SENDMAIL is not set -# CONFIG_FEATURE_SENDMAIL_MAILX is not set -# CONFIG_FEATURE_SENDMAIL_MAILXX is not set - -# -# Process Utilities -# -CONFIG_FREE=y -CONFIG_FUSER=y -CONFIG_KILL=y -CONFIG_KILLALL=y -CONFIG_KILLALL5=y -# CONFIG_NMETER is not set -# CONFIG_PGREP is not set -CONFIG_PIDOF=y -CONFIG_FEATURE_PIDOF_SINGLE=y -CONFIG_FEATURE_PIDOF_OMIT=y -# CONFIG_PKILL is not set -CONFIG_PS=y -CONFIG_FEATURE_PS_WIDE=y -# CONFIG_FEATURE_PS_TIME is not set -# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set -CONFIG_RENICE=y -CONFIG_BB_SYSCTL=y -CONFIG_TOP=y -CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y -CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y -# CONFIG_FEATURE_TOP_SMP_CPU is not set -# CONFIG_FEATURE_TOP_DECIMALS is not set -# CONFIG_FEATURE_TOP_SMP_PROCESS is not set -# CONFIG_FEATURE_TOPMEM is not set -CONFIG_UPTIME=y -CONFIG_WATCH=y - -# -# Runit Utilities -# -# CONFIG_RUNSV is not set -# CONFIG_RUNSVDIR is not set -# CONFIG_FEATURE_RUNSVDIR_LOG is not set -# CONFIG_SV is not set -CONFIG_SV_DEFAULT_SERVICE_DIR="" -# CONFIG_SVLOGD is not set -# CONFIG_CHPST is not set -# CONFIG_SETUIDGID is not set -# CONFIG_ENVUIDGID is not set -# CONFIG_ENVDIR is not set -# CONFIG_SOFTLIMIT is not set -# CONFIG_CHCON is not set -# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set -# CONFIG_GETENFORCE is not set -# CONFIG_GETSEBOOL is not set -# CONFIG_LOAD_POLICY is not set -# CONFIG_MATCHPATHCON is not set -# CONFIG_RESTORECON is not set -# CONFIG_RUNCON is not set -# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set -# CONFIG_SELINUXENABLED is not set -# CONFIG_SETENFORCE is not set -# CONFIG_SETFILES is not set -# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set -# CONFIG_SETSEBOOL is not set -# CONFIG_SESTATUS is not set - -# -# Shells -# -CONFIG_FEATURE_SH_IS_ASH=y -# CONFIG_FEATURE_SH_IS_HUSH is not set -# CONFIG_FEATURE_SH_IS_MSH is not set -# CONFIG_FEATURE_SH_IS_NONE is not set -CONFIG_ASH=y - -# -# Ash Shell Options -# -CONFIG_ASH_BASH_COMPAT=y -CONFIG_ASH_JOB_CONTROL=y -CONFIG_ASH_READ_NCHARS=y -CONFIG_ASH_READ_TIMEOUT=y -CONFIG_ASH_ALIAS=y -CONFIG_ASH_MATH_SUPPORT=y -CONFIG_ASH_MATH_SUPPORT_64=y -# CONFIG_ASH_GETOPTS is not set -CONFIG_ASH_BUILTIN_ECHO=y -CONFIG_ASH_BUILTIN_PRINTF=y -CONFIG_ASH_BUILTIN_TEST=y -CONFIG_ASH_CMDCMD=y -# CONFIG_ASH_MAIL is not set -CONFIG_ASH_OPTIMIZE_FOR_SIZE=y -CONFIG_ASH_RANDOM_SUPPORT=y -CONFIG_ASH_EXPAND_PRMT=y -# CONFIG_HUSH is not set -# CONFIG_HUSH_HELP is not set -# CONFIG_HUSH_INTERACTIVE is not set -# CONFIG_HUSH_JOB is not set -# CONFIG_HUSH_TICK is not set -# CONFIG_HUSH_IF is not set -# CONFIG_HUSH_LOOPS is not set -# CONFIG_HUSH_CASE is not set -# CONFIG_LASH is not set -# CONFIG_MSH is not set - -# -# Bourne Shell Options -# -CONFIG_FEATURE_SH_EXTRA_QUIET=y -# CONFIG_FEATURE_SH_STANDALONE is not set -# CONFIG_FEATURE_SH_NOFORK is not set -# CONFIG_CTTYHACK is not set - -# -# System Logging Utilities -# -CONFIG_SYSLOGD=y -CONFIG_FEATURE_ROTATE_LOGFILE=y -CONFIG_FEATURE_REMOTE_LOG=y -# CONFIG_FEATURE_SYSLOGD_DUP is not set -# CONFIG_FEATURE_IPC_SYSLOG is not set -CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE= -# CONFIG_LOGREAD is not set -# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set -CONFIG_KLOGD=y -CONFIG_LOGGER=y diff --git a/package/busybox/busybox-1.16.2/busybox-devmem.patch b/package/busybox/busybox-1.16.2/busybox-devmem.patch deleted file mode 100644 index f7d1d1df70..0000000000 --- a/package/busybox/busybox-1.16.2/busybox-devmem.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 351ef7188a1a2e2f154bbda6f703c2d3f4af6d79 Mon Sep 17 00:00:00 2001 -From: Denys Vlasenko -Date: Wed, 14 Apr 2010 13:37:25 -0700 -Subject: [PATCH] devmem: map two pages only if it is necessary - -function old new delta -devmem_main 463 469 +6 - -Signed-off-by: Denys Vlasenko ---- - miscutils/devmem.c | 21 ++++++++++++++------- - 1 files changed, 14 insertions(+), 7 deletions(-) - -diff --git a/miscutils/devmem.c b/miscutils/devmem.c -index e13dedc..39b5808 100644 ---- a/miscutils/devmem.c -+++ b/miscutils/devmem.c -@@ -13,9 +13,9 @@ int devmem_main(int argc UNUSED_PARAM, char **argv) - uint64_t read_result; - uint64_t writeval = writeval; /* for compiler */ - off_t target; -- unsigned page_size = getpagesize(); -+ unsigned page_size, mapped_size, offset_in_page; - int fd; -- int width = 8 * sizeof(int); -+ unsigned width = 8 * sizeof(int); - - /* devmem ADDRESS [WIDTH [VALUE]] */ - // TODO: options? -@@ -50,15 +50,22 @@ int devmem_main(int argc UNUSED_PARAM, char **argv) - if (argv[3]) - writeval = bb_strtoull(argv[3], NULL, 0); - } else { /* argv[2] == NULL */ -- /* make argv[3] to be a valid thing to use */ -+ /* make argv[3] to be a valid thing to fetch */ - argv--; - } - if (errno) -- bb_show_usage(); /* bb_strtouXX failed */ -+ bb_show_usage(); /* one of bb_strtouXX failed */ - - fd = xopen("/dev/mem", argv[3] ? (O_RDWR | O_SYNC) : (O_RDONLY | O_SYNC)); -+ mapped_size = page_size = getpagesize(); -+ offset_in_page = (unsigned)target & (page_size - 1); -+ if (offset_in_page + width > page_size) { -+ /* This access spans pages. -+ * Must map two pages to make it possible: */ -+ mapped_size *= 2; -+ } - map_base = mmap(NULL, -- page_size * 2 /* in case value spans page */, -+ mapped_size, - argv[3] ? (PROT_READ | PROT_WRITE) : PROT_READ, - MAP_SHARED, - fd, -@@ -68,7 +75,7 @@ int devmem_main(int argc UNUSED_PARAM, char **argv) - - // printf("Memory mapped at address %p.\n", map_base); - -- virt_addr = (char*)map_base + (target & (page_size - 1)); -+ virt_addr = (char*)map_base + offset_in_page; - - if (!argv[3]) { - switch (width) { -@@ -119,7 +126,7 @@ int devmem_main(int argc UNUSED_PARAM, char **argv) - } - - if (ENABLE_FEATURE_CLEAN_UP) { -- if (munmap(map_base, page_size * 2) == -1) -+ if (munmap(map_base, mapped_size) == -1) - bb_perror_msg_and_die("munmap"); - close(fd); - } --- -1.7.1 - diff --git a/package/busybox/busybox-1.16.x.config b/package/busybox/busybox-1.16.x.config deleted file mode 100644 index e5f51023a6..0000000000 --- a/package/busybox/busybox-1.16.x.config +++ /dev/null @@ -1,920 +0,0 @@ -# -# Automatically generated make config: don't edit -# Busybox version: 1.16.0 -# Sun Jan 31 20:49:46 2010 -# -CONFIG_HAVE_DOT_CONFIG=y - -# -# Busybox Settings -# - -# -# General Configuration -# -CONFIG_DESKTOP=y -# CONFIG_EXTRA_COMPAT is not set -CONFIG_INCLUDE_SUSv2=y -# CONFIG_USE_PORTABLE_CODE is not set -CONFIG_FEATURE_BUFFERS_USE_MALLOC=y -# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set -# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set -CONFIG_SHOW_USAGE=y -CONFIG_FEATURE_VERBOSE_USAGE=y -# CONFIG_FEATURE_COMPRESS_USAGE is not set -CONFIG_FEATURE_INSTALLER=y -# CONFIG_LOCALE_SUPPORT is not set -# CONFIG_FEATURE_ASSUME_UNICODE is not set -# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set -CONFIG_LONG_OPTS=y -CONFIG_FEATURE_DEVPTS=y -CONFIG_FEATURE_CLEAN_UP=y -# CONFIG_FEATURE_PIDFILE is not set -CONFIG_FEATURE_SUID=y -# CONFIG_FEATURE_SUID_CONFIG is not set -# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set -# CONFIG_SELINUX is not set -# CONFIG_FEATURE_PREFER_APPLETS is not set -CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" -CONFIG_FEATURE_SYSLOG=y -# CONFIG_FEATURE_HAVE_RPC is not set - -# -# Build Options -# -# CONFIG_STATIC is not set -# CONFIG_PIE is not set -# CONFIG_NOMMU is not set -# CONFIG_BUILD_LIBBUSYBOX is not set -# CONFIG_FEATURE_INDIVIDUAL is not set -# CONFIG_FEATURE_SHARED_BUSYBOX is not set -# CONFIG_LFS is not set -CONFIG_CROSS_COMPILER_PREFIX="" -CONFIG_EXTRA_CFLAGS="" - -# -# Debugging Options -# -# CONFIG_DEBUG is not set -# CONFIG_DEBUG_PESSIMIZE is not set -# CONFIG_WERROR is not set -CONFIG_NO_DEBUG_LIB=y -# CONFIG_DMALLOC is not set -# CONFIG_EFENCE is not set - -# -# Installation Options -# -# CONFIG_INSTALL_NO_USR is not set -CONFIG_INSTALL_APPLET_SYMLINKS=y -# CONFIG_INSTALL_APPLET_HARDLINKS is not set -# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set -# CONFIG_INSTALL_APPLET_DONT is not set -# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set -# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set -# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set -CONFIG_PREFIX="./_install" - -# -# Busybox Library Tuning -# -CONFIG_PASSWORD_MINLEN=6 -CONFIG_MD5_SIZE_VS_SPEED=2 -# CONFIG_FEATURE_FAST_TOP is not set -# CONFIG_FEATURE_ETC_NETWORKS is not set -CONFIG_FEATURE_EDITING=y -CONFIG_FEATURE_EDITING_MAX_LEN=1024 -CONFIG_FEATURE_EDITING_VI=y -CONFIG_FEATURE_EDITING_HISTORY=999 -CONFIG_FEATURE_EDITING_SAVEHISTORY=y -CONFIG_FEATURE_TAB_COMPLETION=y -# CONFIG_FEATURE_USERNAME_COMPLETION is not set -CONFIG_FEATURE_EDITING_FANCY_PROMPT=y -# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set -CONFIG_FEATURE_NON_POSIX_CP=y -# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set -CONFIG_FEATURE_COPYBUF_KB=4 -CONFIG_MONOTONIC_SYSCALL=y -CONFIG_IOCTL_HEX2STR_ERROR=y -CONFIG_FEATURE_HWIB=y - -# -# Applets -# - -# -# Archival Utilities -# -# CONFIG_FEATURE_SEAMLESS_LZMA is not set -# CONFIG_FEATURE_SEAMLESS_BZ2 is not set -# CONFIG_FEATURE_SEAMLESS_GZ is not set -# CONFIG_FEATURE_SEAMLESS_Z is not set -CONFIG_AR=y -# CONFIG_FEATURE_AR_LONG_FILENAMES is not set -CONFIG_BUNZIP2=y -# CONFIG_BZIP2 is not set -CONFIG_CPIO=y -# CONFIG_FEATURE_CPIO_O is not set -# CONFIG_FEATURE_CPIO_P is not set -# CONFIG_DPKG is not set -# CONFIG_DPKG_DEB is not set -# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set -CONFIG_GUNZIP=y -CONFIG_GZIP=y -# CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set -# CONFIG_LZOP is not set -# CONFIG_LZOP_COMPR_HIGH is not set -# CONFIG_RPM2CPIO is not set -# CONFIG_RPM is not set -CONFIG_TAR=y -CONFIG_FEATURE_TAR_CREATE=y -# CONFIG_FEATURE_TAR_AUTODETECT is not set -CONFIG_FEATURE_TAR_FROM=y -# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set -# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set -CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y -CONFIG_FEATURE_TAR_LONG_OPTIONS=y -# CONFIG_FEATURE_TAR_UNAME_GNAME is not set -# CONFIG_FEATURE_TAR_NOPRESERVE_TIME is not set -# CONFIG_UNCOMPRESS is not set -CONFIG_UNLZMA=y -# CONFIG_FEATURE_LZMA_FAST is not set -CONFIG_UNZIP=y - -# -# Coreutils -# -CONFIG_BASENAME=y -# CONFIG_CAL is not set -CONFIG_CAT=y -CONFIG_CATV=y -CONFIG_CHGRP=y -CONFIG_CHMOD=y -CONFIG_CHOWN=y -# CONFIG_FEATURE_CHOWN_LONG_OPTIONS is not set -CONFIG_CHROOT=y -CONFIG_CKSUM=y -# CONFIG_COMM is not set -CONFIG_CP=y -# CONFIG_FEATURE_CP_LONG_OPTIONS is not set -CONFIG_CUT=y -CONFIG_DATE=y -CONFIG_FEATURE_DATE_ISOFMT=y -CONFIG_FEATURE_DATE_COMPAT=y -CONFIG_DD=y -CONFIG_FEATURE_DD_SIGNAL_HANDLING=y -# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set -CONFIG_FEATURE_DD_IBS_OBS=y -CONFIG_DF=y -# CONFIG_FEATURE_DF_FANCY is not set -CONFIG_DIRNAME=y -CONFIG_DOS2UNIX=y -CONFIG_UNIX2DOS=y -CONFIG_DU=y -CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y -CONFIG_ECHO=y -CONFIG_FEATURE_FANCY_ECHO=y -CONFIG_ENV=y -# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set -# CONFIG_EXPAND is not set -# CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set -CONFIG_EXPR=y -CONFIG_EXPR_MATH_SUPPORT_64=y -CONFIG_FALSE=y -CONFIG_FOLD=y -# CONFIG_FSYNC is not set -CONFIG_HEAD=y -CONFIG_FEATURE_FANCY_HEAD=y -CONFIG_HOSTID=y -CONFIG_ID=y -CONFIG_INSTALL=y -CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y -CONFIG_LENGTH=y -CONFIG_LN=y -CONFIG_LOGNAME=y -CONFIG_LS=y -CONFIG_FEATURE_LS_FILETYPES=y -CONFIG_FEATURE_LS_FOLLOWLINKS=y -CONFIG_FEATURE_LS_RECURSIVE=y -CONFIG_FEATURE_LS_SORTFILES=y -CONFIG_FEATURE_LS_TIMESTAMPS=y -CONFIG_FEATURE_LS_USERNAME=y -CONFIG_FEATURE_LS_COLOR=y -CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y -CONFIG_MD5SUM=y -CONFIG_MKDIR=y -CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y -CONFIG_MKFIFO=y -CONFIG_MKNOD=y -CONFIG_MV=y -CONFIG_FEATURE_MV_LONG_OPTIONS=y -CONFIG_NICE=y -CONFIG_NOHUP=y -CONFIG_OD=y -CONFIG_PRINTENV=y -CONFIG_PRINTF=y -CONFIG_PWD=y -CONFIG_READLINK=y -CONFIG_FEATURE_READLINK_FOLLOW=y -CONFIG_REALPATH=y -CONFIG_RM=y -CONFIG_RMDIR=y -# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set -CONFIG_SEQ=y -CONFIG_SHA1SUM=y -CONFIG_SHA256SUM=y -CONFIG_SHA512SUM=y -CONFIG_SLEEP=y -# CONFIG_FEATURE_FANCY_SLEEP is not set -# CONFIG_FEATURE_FLOAT_SLEEP is not set -CONFIG_SORT=y -CONFIG_FEATURE_SORT_BIG=y -# CONFIG_SPLIT is not set -# CONFIG_FEATURE_SPLIT_FANCY is not set -# CONFIG_STAT is not set -# CONFIG_FEATURE_STAT_FORMAT is not set -CONFIG_STTY=y -# CONFIG_SUM is not set -CONFIG_SYNC=y -# CONFIG_TAC is not set -CONFIG_TAIL=y -CONFIG_FEATURE_FANCY_TAIL=y -CONFIG_TEE=y -CONFIG_FEATURE_TEE_USE_BLOCK_IO=y -CONFIG_TEST=y -CONFIG_FEATURE_TEST_64=y -CONFIG_TOUCH=y -CONFIG_TR=y -CONFIG_FEATURE_TR_CLASSES=y -CONFIG_FEATURE_TR_EQUIV=y -CONFIG_TRUE=y -CONFIG_TTY=y -CONFIG_UNAME=y -# CONFIG_UNEXPAND is not set -# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set -CONFIG_UNIQ=y -CONFIG_USLEEP=y -CONFIG_UUDECODE=y -CONFIG_UUENCODE=y -CONFIG_WC=y -# CONFIG_FEATURE_WC_LARGE is not set -CONFIG_WHO=y -CONFIG_WHOAMI=y -CONFIG_YES=y - -# -# Common options for cp and mv -# -CONFIG_FEATURE_PRESERVE_HARDLINKS=y - -# -# Common options for ls, more and telnet -# -CONFIG_FEATURE_AUTOWIDTH=y - -# -# Common options for df, du, ls -# -CONFIG_FEATURE_HUMAN_READABLE=y - -# -# Common options for md5sum, sha1sum, sha256sum, sha512sum -# -CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y - -# -# Console Utilities -# -CONFIG_CHVT=y -CONFIG_CLEAR=y -CONFIG_DEALLOCVT=y -CONFIG_DUMPKMAP=y -# CONFIG_KBD_MODE is not set -CONFIG_LOADFONT=y -CONFIG_LOADKMAP=y -CONFIG_OPENVT=y -CONFIG_RESET=y -CONFIG_RESIZE=y -CONFIG_FEATURE_RESIZE_PRINT=y -CONFIG_SETCONSOLE=y -# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set -# CONFIG_SETFONT is not set -# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set -CONFIG_DEFAULT_SETFONT_DIR="" -CONFIG_SETKEYCODES=y -CONFIG_SETLOGCONS=y -# CONFIG_SHOWKEY is not set - -# -# Debian Utilities -# -CONFIG_MKTEMP=y -CONFIG_PIPE_PROGRESS=y -CONFIG_RUN_PARTS=y -CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y -# CONFIG_FEATURE_RUN_PARTS_FANCY is not set -CONFIG_START_STOP_DAEMON=y -CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y -CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y -CONFIG_WHICH=y - -# -# Editors -# -CONFIG_AWK=y -# CONFIG_FEATURE_AWK_LIBM is not set -CONFIG_CMP=y -CONFIG_DIFF=y -# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set -CONFIG_FEATURE_DIFF_DIR=y -# CONFIG_ED is not set -CONFIG_PATCH=y -CONFIG_SED=y -CONFIG_VI=y -CONFIG_FEATURE_VI_MAX_LEN=4096 -CONFIG_FEATURE_VI_8BIT=y -CONFIG_FEATURE_VI_COLON=y -CONFIG_FEATURE_VI_YANKMARK=y -CONFIG_FEATURE_VI_SEARCH=y -CONFIG_FEATURE_VI_USE_SIGNALS=y -CONFIG_FEATURE_VI_DOT_CMD=y -CONFIG_FEATURE_VI_READONLY=y -CONFIG_FEATURE_VI_SETOPTS=y -CONFIG_FEATURE_VI_SET=y -CONFIG_FEATURE_VI_WIN_RESIZE=y -CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y -CONFIG_FEATURE_ALLOW_EXEC=y - -# -# Finding Utilities -# -CONFIG_FIND=y -CONFIG_FEATURE_FIND_PRINT0=y -CONFIG_FEATURE_FIND_MTIME=y -CONFIG_FEATURE_FIND_MMIN=y -CONFIG_FEATURE_FIND_PERM=y -CONFIG_FEATURE_FIND_TYPE=y -CONFIG_FEATURE_FIND_XDEV=y -CONFIG_FEATURE_FIND_MAXDEPTH=y -CONFIG_FEATURE_FIND_NEWER=y -# CONFIG_FEATURE_FIND_INUM is not set -CONFIG_FEATURE_FIND_EXEC=y -CONFIG_FEATURE_FIND_USER=y -CONFIG_FEATURE_FIND_GROUP=y -CONFIG_FEATURE_FIND_NOT=y -CONFIG_FEATURE_FIND_DEPTH=y -CONFIG_FEATURE_FIND_PAREN=y -CONFIG_FEATURE_FIND_SIZE=y -CONFIG_FEATURE_FIND_PRUNE=y -# CONFIG_FEATURE_FIND_DELETE is not set -CONFIG_FEATURE_FIND_PATH=y -CONFIG_FEATURE_FIND_REGEX=y -# CONFIG_FEATURE_FIND_CONTEXT is not set -# CONFIG_FEATURE_FIND_LINKS is not set -CONFIG_GREP=y -CONFIG_FEATURE_GREP_EGREP_ALIAS=y -CONFIG_FEATURE_GREP_FGREP_ALIAS=y -CONFIG_FEATURE_GREP_CONTEXT=y -CONFIG_XARGS=y -# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set -CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y -CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y -CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y - -# -# Init Utilities -# -CONFIG_INIT=y -CONFIG_FEATURE_USE_INITTAB=y -CONFIG_FEATURE_KILL_REMOVED=y -CONFIG_FEATURE_KILL_DELAY=0 -CONFIG_FEATURE_INIT_SCTTY=y -CONFIG_FEATURE_INIT_SYSLOG=y -CONFIG_FEATURE_EXTRA_QUIET=y -# CONFIG_FEATURE_INIT_COREDUMPS is not set -CONFIG_FEATURE_INITRD=y -CONFIG_HALT=y -# CONFIG_FEATURE_CALL_TELINIT is not set -CONFIG_TELINIT_PATH="" -CONFIG_MESG=y - -# -# Login/Password Management Utilities -# -CONFIG_FEATURE_SHADOWPASSWDS=y -# CONFIG_USE_BB_PWD_GRP is not set -# CONFIG_USE_BB_SHADOW is not set -CONFIG_USE_BB_CRYPT=y -# CONFIG_USE_BB_CRYPT_SHA is not set -CONFIG_ADDGROUP=y -# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set -# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set -CONFIG_DELGROUP=y -# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set -# CONFIG_FEATURE_CHECK_NAMES is not set -CONFIG_ADDUSER=y -# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set -CONFIG_FIRST_SYSTEM_ID=100 -CONFIG_LAST_SYSTEM_ID=999 -CONFIG_DELUSER=y -CONFIG_GETTY=y -CONFIG_FEATURE_UTMP=y -CONFIG_FEATURE_WTMP=y -CONFIG_LOGIN=y -# CONFIG_PAM is not set -# CONFIG_LOGIN_SCRIPTS is not set -CONFIG_FEATURE_NOLOGIN=y -CONFIG_FEATURE_SECURETTY=y -CONFIG_PASSWD=y -CONFIG_FEATURE_PASSWD_WEAK_CHECK=y -# CONFIG_CRYPTPW is not set -# CONFIG_CHPASSWD is not set -CONFIG_SU=y -CONFIG_FEATURE_SU_SYSLOG=y -CONFIG_FEATURE_SU_CHECKS_SHELLS=y -CONFIG_SULOGIN=y -CONFIG_VLOCK=y - -# -# Linux Ext2 FS Progs -# -CONFIG_CHATTR=y -CONFIG_FSCK=y -CONFIG_LSATTR=y - -# -# Linux Module Utilities -# -# CONFIG_MODPROBE_SMALL is not set -# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set -# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set -CONFIG_INSMOD=y -CONFIG_RMMOD=y -CONFIG_LSMOD=y -CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y -CONFIG_MODPROBE=y -# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set -# CONFIG_DEPMOD is not set - -# -# Options common to multiple modutils -# -# CONFIG_FEATURE_2_4_MODULES is not set -# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set -# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set -# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set -# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set -# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set -# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set -CONFIG_FEATURE_CHECK_TAINTED_MODULE=y -CONFIG_FEATURE_MODUTILS_ALIAS=y -CONFIG_FEATURE_MODUTILS_SYMBOLS=y -CONFIG_DEFAULT_MODULES_DIR="/lib/modules" -CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" - -# -# Linux System Utilities -# -# CONFIG_ACPID is not set -# CONFIG_FEATURE_ACPID_COMPAT is not set -# CONFIG_BLKID is not set -CONFIG_DMESG=y -CONFIG_FEATURE_DMESG_PRETTY=y -# CONFIG_FBSET is not set -# CONFIG_FEATURE_FBSET_FANCY is not set -# CONFIG_FEATURE_FBSET_READMODE is not set -CONFIG_FDFLUSH=y -CONFIG_FDFORMAT=y -# CONFIG_FDISK is not set -# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set -# CONFIG_FEATURE_FDISK_WRITABLE is not set -# CONFIG_FEATURE_AIX_LABEL is not set -# CONFIG_FEATURE_SGI_LABEL is not set -# CONFIG_FEATURE_SUN_LABEL is not set -# CONFIG_FEATURE_OSF_LABEL is not set -# CONFIG_FEATURE_FDISK_ADVANCED is not set -# CONFIG_FINDFS is not set -CONFIG_FREERAMDISK=y -# CONFIG_FSCK_MINIX is not set -# CONFIG_MKFS_EXT2 is not set -# CONFIG_MKFS_MINIX is not set -# CONFIG_FEATURE_MINIX2 is not set -# CONFIG_MKFS_REISER is not set -# CONFIG_MKFS_VFAT is not set -CONFIG_GETOPT=y -CONFIG_FEATURE_GETOPT_LONG=y -CONFIG_HEXDUMP=y -# CONFIG_FEATURE_HEXDUMP_REVERSE is not set -# CONFIG_HD is not set -CONFIG_HWCLOCK=y -CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y -CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y -CONFIG_IPCRM=y -CONFIG_IPCS=y -CONFIG_LOSETUP=y -CONFIG_LSPCI=y -CONFIG_LSUSB=y -CONFIG_MDEV=y -CONFIG_FEATURE_MDEV_CONF=y -# CONFIG_FEATURE_MDEV_RENAME is not set -# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set -CONFIG_FEATURE_MDEV_EXEC=y -# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set -CONFIG_MKSWAP=y -# CONFIG_FEATURE_MKSWAP_UUID is not set -CONFIG_MORE=y -CONFIG_FEATURE_USE_TERMIOS=y -# CONFIG_VOLUMEID is not set -# CONFIG_FEATURE_VOLUMEID_EXT is not set -# CONFIG_FEATURE_VOLUMEID_BTRFS is not set -# CONFIG_FEATURE_VOLUMEID_REISERFS is not set -# CONFIG_FEATURE_VOLUMEID_FAT is not set -# CONFIG_FEATURE_VOLUMEID_HFS is not set -# CONFIG_FEATURE_VOLUMEID_JFS is not set -# CONFIG_FEATURE_VOLUMEID_XFS is not set -# CONFIG_FEATURE_VOLUMEID_NTFS is not set -# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set -# CONFIG_FEATURE_VOLUMEID_UDF is not set -# CONFIG_FEATURE_VOLUMEID_LUKS is not set -# CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set -# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set -# CONFIG_FEATURE_VOLUMEID_ROMFS is not set -# CONFIG_FEATURE_VOLUMEID_SYSV is not set -# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set -# CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set -CONFIG_MOUNT=y -# CONFIG_FEATURE_MOUNT_FAKE is not set -# CONFIG_FEATURE_MOUNT_VERBOSE is not set -# CONFIG_FEATURE_MOUNT_HELPERS is not set -# CONFIG_FEATURE_MOUNT_LABEL is not set -# CONFIG_FEATURE_MOUNT_NFS is not set -CONFIG_FEATURE_MOUNT_CIFS=y -CONFIG_FEATURE_MOUNT_FLAGS=y -CONFIG_FEATURE_MOUNT_FSTAB=y -CONFIG_PIVOT_ROOT=y -CONFIG_RDATE=y -# CONFIG_RDEV is not set -CONFIG_READPROFILE=y -# CONFIG_RTCWAKE is not set -# CONFIG_SCRIPT is not set -# CONFIG_SCRIPTREPLAY is not set -CONFIG_SETARCH=y -CONFIG_SWAPONOFF=y -# CONFIG_FEATURE_SWAPON_PRI is not set -CONFIG_SWITCH_ROOT=y -CONFIG_UMOUNT=y -CONFIG_FEATURE_UMOUNT_ALL=y - -# -# Common options for mount/umount -# -CONFIG_FEATURE_MOUNT_LOOP=y -# CONFIG_FEATURE_MTAB_SUPPORT is not set - -# -# Miscellaneous Utilities -# -# CONFIG_ADJTIMEX is not set -# CONFIG_BBCONFIG is not set -# CONFIG_BEEP is not set -CONFIG_FEATURE_BEEP_FREQ=0 -CONFIG_FEATURE_BEEP_LENGTH_MS=0 -# CONFIG_CHAT is not set -# CONFIG_FEATURE_CHAT_NOFAIL is not set -# CONFIG_FEATURE_CHAT_TTY_HIFI is not set -# CONFIG_FEATURE_CHAT_IMPLICIT_CR is not set -# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set -# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set -# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set -# CONFIG_FEATURE_CHAT_CLR_ABORT is not set -CONFIG_CHRT=y -CONFIG_CROND=y -# CONFIG_FEATURE_CROND_D is not set -# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set -CONFIG_FEATURE_CROND_DIR="/var/spool/cron" -CONFIG_CRONTAB=y -CONFIG_DC=y -# CONFIG_FEATURE_DC_LIBM is not set -# CONFIG_DEVFSD is not set -# CONFIG_DEVFSD_MODLOAD is not set -# CONFIG_DEVFSD_FG_NP is not set -# CONFIG_DEVFSD_VERBOSE is not set -# CONFIG_FEATURE_DEVFS is not set -CONFIG_DEVMEM=y -CONFIG_EJECT=y -# CONFIG_FEATURE_EJECT_SCSI is not set -# CONFIG_FBSPLASH is not set -# CONFIG_FLASHCP is not set -# CONFIG_FLASH_LOCK is not set -# CONFIG_FLASH_UNLOCK is not set -# CONFIG_FLASH_ERASEALL is not set -# CONFIG_IONICE is not set -# CONFIG_INOTIFYD is not set -CONFIG_LAST=y -CONFIG_FEATURE_LAST_SMALL=y -# CONFIG_FEATURE_LAST_FANCY is not set -CONFIG_LESS=y -CONFIG_FEATURE_LESS_MAXLINES=9999999 -CONFIG_FEATURE_LESS_BRACKETS=y -CONFIG_FEATURE_LESS_FLAGS=y -# CONFIG_FEATURE_LESS_MARKS is not set -CONFIG_FEATURE_LESS_REGEXP=y -# CONFIG_FEATURE_LESS_WINCH is not set -# CONFIG_FEATURE_LESS_DASHCMD is not set -# CONFIG_FEATURE_LESS_LINENUMS is not set -CONFIG_HDPARM=y -CONFIG_FEATURE_HDPARM_GET_IDENTITY=y -# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set -# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set -# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set -# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set -# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set -CONFIG_MAKEDEVS=y -# CONFIG_FEATURE_MAKEDEVS_LEAF is not set -CONFIG_FEATURE_MAKEDEVS_TABLE=y -# CONFIG_MAN is not set -# CONFIG_MICROCOM is not set -CONFIG_MOUNTPOINT=y -CONFIG_MT=y -# CONFIG_RAIDAUTORUN is not set -# CONFIG_READAHEAD is not set -CONFIG_RUNLEVEL=y -# CONFIG_RX is not set -CONFIG_SETSID=y -CONFIG_STRINGS=y -# CONFIG_TASKSET is not set -# CONFIG_FEATURE_TASKSET_FANCY is not set -CONFIG_TIME=y -# CONFIG_TIMEOUT is not set -# CONFIG_TTYSIZE is not set -# CONFIG_VOLNAME is not set -# CONFIG_WALL is not set -CONFIG_WATCHDOG=y - -# -# Networking Utilities -# -# CONFIG_FEATURE_IPV6 is not set -# CONFIG_FEATURE_UNIX_LOCAL is not set -# CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set -# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set -# CONFIG_ARP is not set -CONFIG_ARPING=y -# CONFIG_BRCTL is not set -# CONFIG_FEATURE_BRCTL_FANCY is not set -# CONFIG_FEATURE_BRCTL_SHOW is not set -CONFIG_DNSD=y -CONFIG_ETHER_WAKE=y -# CONFIG_FAKEIDENTD is not set -# CONFIG_FTPD is not set -# CONFIG_FEATURE_FTP_WRITE is not set -# CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set -# CONFIG_FTPGET is not set -# CONFIG_FTPPUT is not set -# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set -CONFIG_HOSTNAME=y -# CONFIG_HTTPD is not set -# CONFIG_FEATURE_HTTPD_RANGES is not set -# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set -# CONFIG_FEATURE_HTTPD_SETUID is not set -# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set -# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set -# CONFIG_FEATURE_HTTPD_CGI is not set -# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set -# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set -# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set -# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set -# CONFIG_FEATURE_HTTPD_PROXY is not set -CONFIG_IFCONFIG=y -CONFIG_FEATURE_IFCONFIG_STATUS=y -CONFIG_FEATURE_IFCONFIG_SLIP=y -CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y -CONFIG_FEATURE_IFCONFIG_HW=y -# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set -# CONFIG_IFENSLAVE is not set -# CONFIG_IFPLUGD is not set -CONFIG_IFUPDOWN=y -CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate" -CONFIG_FEATURE_IFUPDOWN_IP=y -# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set -# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set -CONFIG_FEATURE_IFUPDOWN_IPV4=y -# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set -CONFIG_FEATURE_IFUPDOWN_MAPPING=y -# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set -CONFIG_INETD=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y -# CONFIG_FEATURE_INETD_RPC is not set -CONFIG_IP=y -CONFIG_FEATURE_IP_ADDRESS=y -CONFIG_FEATURE_IP_LINK=y -CONFIG_FEATURE_IP_ROUTE=y -CONFIG_FEATURE_IP_TUNNEL=y -CONFIG_FEATURE_IP_RULE=y -CONFIG_FEATURE_IP_SHORT_FORMS=y -# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set -CONFIG_IPADDR=y -CONFIG_IPLINK=y -CONFIG_IPROUTE=y -CONFIG_IPTUNNEL=y -CONFIG_IPRULE=y -# CONFIG_IPCALC is not set -# CONFIG_FEATURE_IPCALC_FANCY is not set -# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set -CONFIG_NAMEIF=y -# CONFIG_FEATURE_NAMEIF_EXTENDED is not set -# CONFIG_NC is not set -# CONFIG_NC_SERVER is not set -# CONFIG_NC_EXTRA is not set -CONFIG_NETSTAT=y -# CONFIG_FEATURE_NETSTAT_WIDE is not set -# CONFIG_FEATURE_NETSTAT_PRG is not set -CONFIG_NSLOOKUP=y -# CONFIG_NTPD is not set -# CONFIG_FEATURE_NTPD_SERVER is not set -CONFIG_PING=y -# CONFIG_PING6 is not set -CONFIG_FEATURE_FANCY_PING=y -# CONFIG_PSCAN is not set -CONFIG_ROUTE=y -# CONFIG_SLATTACH is not set -CONFIG_TELNET=y -CONFIG_FEATURE_TELNET_TTYPE=y -CONFIG_FEATURE_TELNET_AUTOLOGIN=y -# CONFIG_TELNETD is not set -# CONFIG_FEATURE_TELNETD_STANDALONE is not set -# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set -CONFIG_TFTP=y -# CONFIG_TFTPD is not set -CONFIG_FEATURE_TFTP_GET=y -CONFIG_FEATURE_TFTP_PUT=y -CONFIG_FEATURE_TFTP_BLOCKSIZE=y -# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set -# CONFIG_TFTP_DEBUG is not set -CONFIG_TRACEROUTE=y -# CONFIG_TRACEROUTE6 is not set -# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set -# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set -# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set -# CONFIG_UDHCPD is not set -# CONFIG_DHCPRELAY is not set -# CONFIG_DUMPLEASES is not set -# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set -CONFIG_DHCPD_LEASES_FILE="" -CONFIG_UDHCPC=y -CONFIG_FEATURE_UDHCPC_ARPING=y -# CONFIG_FEATURE_UDHCP_PORT is not set -CONFIG_UDHCP_DEBUG=0 -# CONFIG_FEATURE_UDHCP_RFC3397 is not set -CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script" -CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 -CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n" -CONFIG_VCONFIG=y -CONFIG_WGET=y -CONFIG_FEATURE_WGET_STATUSBAR=y -CONFIG_FEATURE_WGET_AUTHENTICATION=y -CONFIG_FEATURE_WGET_LONG_OPTIONS=y -# CONFIG_ZCIP is not set -# CONFIG_TCPSVD is not set -# CONFIG_TUNCTL is not set -# CONFIG_FEATURE_TUNCTL_UG is not set -# CONFIG_UDPSVD is not set - -# -# Print Utilities -# -# CONFIG_LPD is not set -# CONFIG_LPR is not set -# CONFIG_LPQ is not set - -# -# Mail Utilities -# -# CONFIG_MAKEMIME is not set -CONFIG_FEATURE_MIME_CHARSET="" -# CONFIG_POPMAILDIR is not set -# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set -# CONFIG_REFORMIME is not set -# CONFIG_FEATURE_REFORMIME_COMPAT is not set -# CONFIG_SENDMAIL is not set - -# -# Process Utilities -# -CONFIG_FREE=y -CONFIG_FUSER=y -CONFIG_KILL=y -CONFIG_KILLALL=y -CONFIG_KILLALL5=y -# CONFIG_NMETER is not set -# CONFIG_PGREP is not set -CONFIG_PIDOF=y -CONFIG_FEATURE_PIDOF_SINGLE=y -CONFIG_FEATURE_PIDOF_OMIT=y -# CONFIG_PKILL is not set -CONFIG_PS=y -CONFIG_FEATURE_PS_WIDE=y -# CONFIG_FEATURE_PS_TIME is not set -# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set -# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set -CONFIG_RENICE=y -CONFIG_BB_SYSCTL=y -CONFIG_TOP=y -CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y -CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y -# CONFIG_FEATURE_TOP_SMP_CPU is not set -# CONFIG_FEATURE_TOP_DECIMALS is not set -# CONFIG_FEATURE_TOP_SMP_PROCESS is not set -# CONFIG_FEATURE_TOPMEM is not set -# CONFIG_FEATURE_SHOW_THREADS is not set -CONFIG_UPTIME=y -CONFIG_WATCH=y - -# -# Runit Utilities -# -# CONFIG_RUNSV is not set -# CONFIG_RUNSVDIR is not set -# CONFIG_FEATURE_RUNSVDIR_LOG is not set -# CONFIG_SV is not set -CONFIG_SV_DEFAULT_SERVICE_DIR="" -# CONFIG_SVLOGD is not set -# CONFIG_CHPST is not set -# CONFIG_SETUIDGID is not set -# CONFIG_ENVUIDGID is not set -# CONFIG_ENVDIR is not set -# CONFIG_SOFTLIMIT is not set -# CONFIG_CHCON is not set -# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set -# CONFIG_GETENFORCE is not set -# CONFIG_GETSEBOOL is not set -# CONFIG_LOAD_POLICY is not set -# CONFIG_MATCHPATHCON is not set -# CONFIG_RESTORECON is not set -# CONFIG_RUNCON is not set -# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set -# CONFIG_SELINUXENABLED is not set -# CONFIG_SETENFORCE is not set -# CONFIG_SETFILES is not set -# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set -# CONFIG_SETSEBOOL is not set -# CONFIG_SESTATUS is not set - -# -# Shells -# -CONFIG_FEATURE_SH_IS_ASH=y -# CONFIG_FEATURE_SH_IS_HUSH is not set -# CONFIG_FEATURE_SH_IS_NONE is not set -CONFIG_ASH=y -CONFIG_ASH_BASH_COMPAT=y -CONFIG_ASH_JOB_CONTROL=y -CONFIG_ASH_ALIAS=y -# CONFIG_ASH_GETOPTS is not set -CONFIG_ASH_BUILTIN_ECHO=y -CONFIG_ASH_BUILTIN_PRINTF=y -CONFIG_ASH_BUILTIN_TEST=y -CONFIG_ASH_CMDCMD=y -# CONFIG_ASH_MAIL is not set -CONFIG_ASH_OPTIMIZE_FOR_SIZE=y -CONFIG_ASH_RANDOM_SUPPORT=y -CONFIG_ASH_EXPAND_PRMT=y -# CONFIG_HUSH is not set -# CONFIG_HUSH_BASH_COMPAT is not set -# CONFIG_HUSH_HELP is not set -# CONFIG_HUSH_INTERACTIVE is not set -# CONFIG_HUSH_JOB is not set -# CONFIG_HUSH_TICK is not set -# CONFIG_HUSH_IF is not set -# CONFIG_HUSH_LOOPS is not set -# CONFIG_HUSH_CASE is not set -# CONFIG_HUSH_FUNCTIONS is not set -# CONFIG_HUSH_LOCAL is not set -# CONFIG_HUSH_EXPORT_N is not set -# CONFIG_HUSH_RANDOM_SUPPORT is not set -# CONFIG_LASH is not set -# CONFIG_MSH is not set -CONFIG_SH_MATH_SUPPORT=y -# CONFIG_SH_MATH_SUPPORT_64 is not set -CONFIG_FEATURE_SH_EXTRA_QUIET=y -# CONFIG_FEATURE_SH_STANDALONE is not set -# CONFIG_FEATURE_SH_NOFORK is not set -# CONFIG_CTTYHACK is not set - -# -# System Logging Utilities -# -CONFIG_SYSLOGD=y -CONFIG_FEATURE_ROTATE_LOGFILE=y -CONFIG_FEATURE_REMOTE_LOG=y -# CONFIG_FEATURE_SYSLOGD_DUP is not set -# CONFIG_FEATURE_IPC_SYSLOG is not set -CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0 -# CONFIG_LOGREAD is not set -# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set -CONFIG_KLOGD=y -CONFIG_LOGGER=y diff --git a/package/busybox/busybox-1.17.x.config b/package/busybox/busybox-1.17.x.config deleted file mode 100644 index d131dd6385..0000000000 --- a/package/busybox/busybox-1.17.x.config +++ /dev/null @@ -1,966 +0,0 @@ -# -# Automatically generated make config: don't edit -# Busybox version: 1.17.0 -# Tue Jul 6 10:53:37 2010 -# -CONFIG_HAVE_DOT_CONFIG=y - -# -# Busybox Settings -# - -# -# General Configuration -# -CONFIG_DESKTOP=y -# CONFIG_EXTRA_COMPAT is not set -CONFIG_INCLUDE_SUSv2=y -# CONFIG_USE_PORTABLE_CODE is not set -CONFIG_FEATURE_BUFFERS_USE_MALLOC=y -# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set -# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set -CONFIG_SHOW_USAGE=y -CONFIG_FEATURE_VERBOSE_USAGE=y -# CONFIG_FEATURE_COMPRESS_USAGE is not set -CONFIG_FEATURE_INSTALLER=y -# CONFIG_LOCALE_SUPPORT is not set -# CONFIG_UNICODE_SUPPORT is not set -# CONFIG_UNICODE_USING_LOCALE is not set -# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set -CONFIG_SUBST_WCHAR=0 -CONFIG_LAST_SUPPORTED_WCHAR=0 -# CONFIG_UNICODE_COMBINING_WCHARS is not set -# CONFIG_UNICODE_WIDE_WCHARS is not set -# CONFIG_UNICODE_BIDI_SUPPORT is not set -# CONFIG_UNICODE_NEUTRAL_TABLE is not set -# CONFIG_UNICODE_PRESERVE_BROKEN is not set -CONFIG_LONG_OPTS=y -CONFIG_FEATURE_DEVPTS=y -CONFIG_FEATURE_CLEAN_UP=y -CONFIG_FEATURE_UTMP=y -CONFIG_FEATURE_WTMP=y -# CONFIG_FEATURE_PIDFILE is not set -CONFIG_FEATURE_SUID=y -# CONFIG_FEATURE_SUID_CONFIG is not set -# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set -# CONFIG_SELINUX is not set -# CONFIG_FEATURE_PREFER_APPLETS is not set -CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" -CONFIG_FEATURE_SYSLOG=y -# CONFIG_FEATURE_HAVE_RPC is not set - -# -# Build Options -# -# CONFIG_STATIC is not set -# CONFIG_PIE is not set -# CONFIG_NOMMU is not set -# CONFIG_BUILD_LIBBUSYBOX is not set -# CONFIG_FEATURE_INDIVIDUAL is not set -# CONFIG_FEATURE_SHARED_BUSYBOX is not set -# CONFIG_LFS is not set -CONFIG_CROSS_COMPILER_PREFIX="" -CONFIG_EXTRA_CFLAGS="" - -# -# Debugging Options -# -# CONFIG_DEBUG is not set -# CONFIG_DEBUG_PESSIMIZE is not set -# CONFIG_WERROR is not set -CONFIG_NO_DEBUG_LIB=y -# CONFIG_DMALLOC is not set -# CONFIG_EFENCE is not set - -# -# Installation Options -# -# CONFIG_INSTALL_NO_USR is not set -CONFIG_INSTALL_APPLET_SYMLINKS=y -# CONFIG_INSTALL_APPLET_HARDLINKS is not set -# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set -# CONFIG_INSTALL_APPLET_DONT is not set -# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set -# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set -# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set -CONFIG_PREFIX="./_install" - -# -# Busybox Library Tuning -# -CONFIG_PASSWORD_MINLEN=6 -CONFIG_MD5_SIZE_VS_SPEED=2 -# CONFIG_FEATURE_FAST_TOP is not set -# CONFIG_FEATURE_ETC_NETWORKS is not set -CONFIG_FEATURE_EDITING=y -CONFIG_FEATURE_EDITING_MAX_LEN=1024 -CONFIG_FEATURE_EDITING_VI=y -CONFIG_FEATURE_EDITING_HISTORY=999 -CONFIG_FEATURE_EDITING_SAVEHISTORY=y -CONFIG_FEATURE_TAB_COMPLETION=y -# CONFIG_FEATURE_USERNAME_COMPLETION is not set -CONFIG_FEATURE_EDITING_FANCY_PROMPT=y -# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set -CONFIG_FEATURE_NON_POSIX_CP=y -# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set -CONFIG_FEATURE_COPYBUF_KB=4 -CONFIG_MONOTONIC_SYSCALL=y -CONFIG_IOCTL_HEX2STR_ERROR=y -CONFIG_FEATURE_HWIB=y - -# -# Applets -# - -# -# Archival Utilities -# -# CONFIG_FEATURE_SEAMLESS_XZ is not set -# CONFIG_FEATURE_SEAMLESS_LZMA is not set -# CONFIG_FEATURE_SEAMLESS_BZ2 is not set -# CONFIG_FEATURE_SEAMLESS_GZ is not set -# CONFIG_FEATURE_SEAMLESS_Z is not set -CONFIG_AR=y -# CONFIG_FEATURE_AR_LONG_FILENAMES is not set -CONFIG_FEATURE_AR_CREATE=y -CONFIG_BUNZIP2=y -# CONFIG_BZIP2 is not set -CONFIG_CPIO=y -# CONFIG_FEATURE_CPIO_O is not set -# CONFIG_FEATURE_CPIO_P is not set -# CONFIG_DPKG is not set -# CONFIG_DPKG_DEB is not set -# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set -CONFIG_GUNZIP=y -CONFIG_GZIP=y -# CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set -# CONFIG_LZOP is not set -# CONFIG_LZOP_COMPR_HIGH is not set -# CONFIG_RPM2CPIO is not set -# CONFIG_RPM is not set -CONFIG_TAR=y -CONFIG_FEATURE_TAR_CREATE=y -# CONFIG_FEATURE_TAR_AUTODETECT is not set -CONFIG_FEATURE_TAR_FROM=y -# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set -# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set -CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y -CONFIG_FEATURE_TAR_LONG_OPTIONS=y -CONFIG_FEATURE_TAR_TO_COMMAND=y -# CONFIG_FEATURE_TAR_UNAME_GNAME is not set -# CONFIG_FEATURE_TAR_NOPRESERVE_TIME is not set -# CONFIG_FEATURE_TAR_SELINUX is not set -# CONFIG_UNCOMPRESS is not set -CONFIG_UNLZMA=y -# CONFIG_FEATURE_LZMA_FAST is not set -CONFIG_LZMA=y -CONFIG_UNXZ=y -CONFIG_XZ=y -CONFIG_UNZIP=y - -# -# Coreutils -# -CONFIG_BASENAME=y -CONFIG_CAT=y -CONFIG_DATE=y -CONFIG_FEATURE_DATE_ISOFMT=y -# CONFIG_FEATURE_DATE_NANO is not set -CONFIG_FEATURE_DATE_COMPAT=y -CONFIG_TEST=y -CONFIG_FEATURE_TEST_64=y -CONFIG_TR=y -CONFIG_FEATURE_TR_CLASSES=y -CONFIG_FEATURE_TR_EQUIV=y -# CONFIG_CAL is not set -CONFIG_CATV=y -CONFIG_CHGRP=y -CONFIG_CHMOD=y -CONFIG_CHOWN=y -# CONFIG_FEATURE_CHOWN_LONG_OPTIONS is not set -CONFIG_CHROOT=y -CONFIG_CKSUM=y -# CONFIG_COMM is not set -CONFIG_CP=y -# CONFIG_FEATURE_CP_LONG_OPTIONS is not set -CONFIG_CUT=y -CONFIG_DD=y -CONFIG_FEATURE_DD_SIGNAL_HANDLING=y -# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set -CONFIG_FEATURE_DD_IBS_OBS=y -CONFIG_DF=y -# CONFIG_FEATURE_DF_FANCY is not set -CONFIG_DIRNAME=y -CONFIG_DOS2UNIX=y -CONFIG_UNIX2DOS=y -CONFIG_DU=y -CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y -CONFIG_ECHO=y -CONFIG_FEATURE_FANCY_ECHO=y -CONFIG_ENV=y -# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set -# CONFIG_EXPAND is not set -# CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set -CONFIG_EXPR=y -CONFIG_EXPR_MATH_SUPPORT_64=y -CONFIG_FALSE=y -CONFIG_FOLD=y -# CONFIG_FSYNC is not set -CONFIG_HEAD=y -CONFIG_FEATURE_FANCY_HEAD=y -CONFIG_HOSTID=y -CONFIG_ID=y -CONFIG_INSTALL=y -CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y -CONFIG_LENGTH=y -CONFIG_LN=y -CONFIG_LOGNAME=y -CONFIG_LS=y -CONFIG_FEATURE_LS_FILETYPES=y -CONFIG_FEATURE_LS_FOLLOWLINKS=y -CONFIG_FEATURE_LS_RECURSIVE=y -CONFIG_FEATURE_LS_SORTFILES=y -CONFIG_FEATURE_LS_TIMESTAMPS=y -CONFIG_FEATURE_LS_USERNAME=y -CONFIG_FEATURE_LS_COLOR=y -CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y -CONFIG_MD5SUM=y -CONFIG_MKDIR=y -CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y -CONFIG_MKFIFO=y -CONFIG_MKNOD=y -CONFIG_MV=y -CONFIG_FEATURE_MV_LONG_OPTIONS=y -CONFIG_NICE=y -CONFIG_NOHUP=y -CONFIG_OD=y -CONFIG_PRINTENV=y -CONFIG_PRINTF=y -CONFIG_PWD=y -CONFIG_READLINK=y -CONFIG_FEATURE_READLINK_FOLLOW=y -CONFIG_REALPATH=y -CONFIG_RM=y -CONFIG_RMDIR=y -# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set -CONFIG_SEQ=y -CONFIG_SHA1SUM=y -CONFIG_SHA256SUM=y -CONFIG_SHA512SUM=y -CONFIG_SLEEP=y -# CONFIG_FEATURE_FANCY_SLEEP is not set -# CONFIG_FEATURE_FLOAT_SLEEP is not set -CONFIG_SORT=y -CONFIG_FEATURE_SORT_BIG=y -# CONFIG_SPLIT is not set -# CONFIG_FEATURE_SPLIT_FANCY is not set -# CONFIG_STAT is not set -# CONFIG_FEATURE_STAT_FORMAT is not set -CONFIG_STTY=y -# CONFIG_SUM is not set -CONFIG_SYNC=y -# CONFIG_TAC is not set -CONFIG_TAIL=y -CONFIG_FEATURE_FANCY_TAIL=y -CONFIG_TEE=y -CONFIG_FEATURE_TEE_USE_BLOCK_IO=y -CONFIG_TOUCH=y -CONFIG_TRUE=y -CONFIG_TTY=y -CONFIG_UNAME=y -# CONFIG_UNEXPAND is not set -# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set -CONFIG_UNIQ=y -CONFIG_USLEEP=y -CONFIG_UUDECODE=y -CONFIG_UUENCODE=y -CONFIG_WC=y -# CONFIG_FEATURE_WC_LARGE is not set -CONFIG_WHO=y -CONFIG_WHOAMI=y -CONFIG_YES=y - -# -# Common options for cp and mv -# -CONFIG_FEATURE_PRESERVE_HARDLINKS=y - -# -# Common options for ls, more and telnet -# -CONFIG_FEATURE_AUTOWIDTH=y - -# -# Common options for df, du, ls -# -CONFIG_FEATURE_HUMAN_READABLE=y - -# -# Common options for md5sum, sha1sum, sha256sum, sha512sum -# -CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y - -# -# Console Utilities -# -CONFIG_CHVT=y -# CONFIG_FGCONSOLE is not set -CONFIG_CLEAR=y -CONFIG_DEALLOCVT=y -CONFIG_DUMPKMAP=y -# CONFIG_KBD_MODE is not set -CONFIG_LOADFONT=y -CONFIG_LOADKMAP=y -CONFIG_OPENVT=y -CONFIG_RESET=y -CONFIG_RESIZE=y -CONFIG_FEATURE_RESIZE_PRINT=y -CONFIG_SETCONSOLE=y -# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set -# CONFIG_SETFONT is not set -# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set -CONFIG_DEFAULT_SETFONT_DIR="" -CONFIG_SETKEYCODES=y -CONFIG_SETLOGCONS=y -# CONFIG_SHOWKEY is not set - -# -# Common options for loadfont and setfont -# -CONFIG_FEATURE_LOADFONT_PSF2=y -CONFIG_FEATURE_LOADFONT_RAW=y - -# -# Debian Utilities -# -CONFIG_MKTEMP=y -CONFIG_PIPE_PROGRESS=y -CONFIG_RUN_PARTS=y -CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y -# CONFIG_FEATURE_RUN_PARTS_FANCY is not set -CONFIG_START_STOP_DAEMON=y -CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y -CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y -CONFIG_WHICH=y - -# -# Editors -# -CONFIG_AWK=y -# CONFIG_FEATURE_AWK_LIBM is not set -CONFIG_CMP=y -CONFIG_DIFF=y -# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set -CONFIG_FEATURE_DIFF_DIR=y -# CONFIG_ED is not set -CONFIG_PATCH=y -CONFIG_SED=y -CONFIG_VI=y -CONFIG_FEATURE_VI_MAX_LEN=4096 -CONFIG_FEATURE_VI_8BIT=y -CONFIG_FEATURE_VI_COLON=y -CONFIG_FEATURE_VI_YANKMARK=y -CONFIG_FEATURE_VI_SEARCH=y -CONFIG_FEATURE_VI_USE_SIGNALS=y -CONFIG_FEATURE_VI_DOT_CMD=y -CONFIG_FEATURE_VI_READONLY=y -CONFIG_FEATURE_VI_SETOPTS=y -CONFIG_FEATURE_VI_SET=y -CONFIG_FEATURE_VI_WIN_RESIZE=y -CONFIG_FEATURE_VI_ASK_TERMINAL=y -CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y -CONFIG_FEATURE_ALLOW_EXEC=y - -# -# Finding Utilities -# -CONFIG_FIND=y -CONFIG_FEATURE_FIND_PRINT0=y -CONFIG_FEATURE_FIND_MTIME=y -CONFIG_FEATURE_FIND_MMIN=y -CONFIG_FEATURE_FIND_PERM=y -CONFIG_FEATURE_FIND_TYPE=y -CONFIG_FEATURE_FIND_XDEV=y -CONFIG_FEATURE_FIND_MAXDEPTH=y -CONFIG_FEATURE_FIND_NEWER=y -# CONFIG_FEATURE_FIND_INUM is not set -CONFIG_FEATURE_FIND_EXEC=y -CONFIG_FEATURE_FIND_USER=y -CONFIG_FEATURE_FIND_GROUP=y -CONFIG_FEATURE_FIND_NOT=y -CONFIG_FEATURE_FIND_DEPTH=y -CONFIG_FEATURE_FIND_PAREN=y -CONFIG_FEATURE_FIND_SIZE=y -CONFIG_FEATURE_FIND_PRUNE=y -# CONFIG_FEATURE_FIND_DELETE is not set -CONFIG_FEATURE_FIND_PATH=y -CONFIG_FEATURE_FIND_REGEX=y -# CONFIG_FEATURE_FIND_CONTEXT is not set -# CONFIG_FEATURE_FIND_LINKS is not set -CONFIG_GREP=y -CONFIG_FEATURE_GREP_EGREP_ALIAS=y -CONFIG_FEATURE_GREP_FGREP_ALIAS=y -CONFIG_FEATURE_GREP_CONTEXT=y -CONFIG_XARGS=y -# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set -CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y -CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y -CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y - -# -# Init Utilities -# -# CONFIG_BOOTCHARTD is not set -# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set -# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set -CONFIG_INIT=y -CONFIG_FEATURE_USE_INITTAB=y -CONFIG_FEATURE_KILL_REMOVED=y -CONFIG_FEATURE_KILL_DELAY=0 -CONFIG_FEATURE_INIT_SCTTY=y -CONFIG_FEATURE_INIT_SYSLOG=y -CONFIG_FEATURE_EXTRA_QUIET=y -# CONFIG_FEATURE_INIT_COREDUMPS is not set -CONFIG_FEATURE_INITRD=y -CONFIG_HALT=y -# CONFIG_FEATURE_CALL_TELINIT is not set -CONFIG_TELINIT_PATH="" -CONFIG_MESG=y - -# -# Login/Password Management Utilities -# -CONFIG_FEATURE_SHADOWPASSWDS=y -# CONFIG_USE_BB_PWD_GRP is not set -# CONFIG_USE_BB_SHADOW is not set -CONFIG_USE_BB_CRYPT=y -# CONFIG_USE_BB_CRYPT_SHA is not set -CONFIG_ADDGROUP=y -# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set -# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set -CONFIG_DELGROUP=y -# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set -# CONFIG_FEATURE_CHECK_NAMES is not set -CONFIG_ADDUSER=y -# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set -CONFIG_FIRST_SYSTEM_ID=100 -CONFIG_LAST_SYSTEM_ID=999 -CONFIG_DELUSER=y -CONFIG_GETTY=y -CONFIG_LOGIN=y -# CONFIG_PAM is not set -# CONFIG_LOGIN_SCRIPTS is not set -CONFIG_FEATURE_NOLOGIN=y -CONFIG_FEATURE_SECURETTY=y -CONFIG_PASSWD=y -CONFIG_FEATURE_PASSWD_WEAK_CHECK=y -# CONFIG_CRYPTPW is not set -# CONFIG_CHPASSWD is not set -CONFIG_SU=y -CONFIG_FEATURE_SU_SYSLOG=y -CONFIG_FEATURE_SU_CHECKS_SHELLS=y -CONFIG_SULOGIN=y -CONFIG_VLOCK=y - -# -# Linux Ext2 FS Progs -# -CONFIG_CHATTR=y -CONFIG_FSCK=y -CONFIG_LSATTR=y -# CONFIG_TUNE2FS is not set - -# -# Linux Module Utilities -# -# CONFIG_MODINFO is not set -# CONFIG_MODPROBE_SMALL is not set -# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set -# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set -CONFIG_INSMOD=y -CONFIG_RMMOD=y -CONFIG_LSMOD=y -CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y -CONFIG_MODPROBE=y -# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set -# CONFIG_DEPMOD is not set - -# -# Options common to multiple modutils -# -# CONFIG_FEATURE_2_4_MODULES is not set -# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set -# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set -# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set -# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set -# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set -# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set -CONFIG_FEATURE_CHECK_TAINTED_MODULE=y -CONFIG_FEATURE_MODUTILS_ALIAS=y -CONFIG_FEATURE_MODUTILS_SYMBOLS=y -CONFIG_DEFAULT_MODULES_DIR="/lib/modules" -CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" - -# -# Linux System Utilities -# -# CONFIG_REV is not set -# CONFIG_ACPID is not set -# CONFIG_FEATURE_ACPID_COMPAT is not set -# CONFIG_BLKID is not set -CONFIG_DMESG=y -CONFIG_FEATURE_DMESG_PRETTY=y -# CONFIG_FBSET is not set -# CONFIG_FEATURE_FBSET_FANCY is not set -# CONFIG_FEATURE_FBSET_READMODE is not set -CONFIG_FDFLUSH=y -CONFIG_FDFORMAT=y -# CONFIG_FDISK is not set -# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set -# CONFIG_FEATURE_FDISK_WRITABLE is not set -# CONFIG_FEATURE_AIX_LABEL is not set -# CONFIG_FEATURE_SGI_LABEL is not set -# CONFIG_FEATURE_SUN_LABEL is not set -# CONFIG_FEATURE_OSF_LABEL is not set -# CONFIG_FEATURE_FDISK_ADVANCED is not set -# CONFIG_FINDFS is not set -# CONFIG_FLOCK is not set -CONFIG_FREERAMDISK=y -# CONFIG_FSCK_MINIX is not set -# CONFIG_MKFS_EXT2 is not set -# CONFIG_MKFS_MINIX is not set -# CONFIG_FEATURE_MINIX2 is not set -# CONFIG_MKFS_REISER is not set -# CONFIG_MKFS_VFAT is not set -CONFIG_GETOPT=y -CONFIG_FEATURE_GETOPT_LONG=y -CONFIG_HEXDUMP=y -# CONFIG_FEATURE_HEXDUMP_REVERSE is not set -# CONFIG_HD is not set -CONFIG_HWCLOCK=y -CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y -CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y -CONFIG_IPCRM=y -CONFIG_IPCS=y -CONFIG_LOSETUP=y -CONFIG_LSPCI=y -CONFIG_LSUSB=y -CONFIG_MDEV=y -CONFIG_FEATURE_MDEV_CONF=y -# CONFIG_FEATURE_MDEV_RENAME is not set -# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set -CONFIG_FEATURE_MDEV_EXEC=y -# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set -CONFIG_MKSWAP=y -# CONFIG_FEATURE_MKSWAP_UUID is not set -CONFIG_MORE=y -CONFIG_FEATURE_USE_TERMIOS=y -# CONFIG_VOLUMEID is not set -# CONFIG_FEATURE_VOLUMEID_EXT is not set -# CONFIG_FEATURE_VOLUMEID_BTRFS is not set -# CONFIG_FEATURE_VOLUMEID_REISERFS is not set -# CONFIG_FEATURE_VOLUMEID_FAT is not set -# CONFIG_FEATURE_VOLUMEID_HFS is not set -# CONFIG_FEATURE_VOLUMEID_JFS is not set -# CONFIG_FEATURE_VOLUMEID_XFS is not set -# CONFIG_FEATURE_VOLUMEID_NTFS is not set -# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set -# CONFIG_FEATURE_VOLUMEID_UDF is not set -# CONFIG_FEATURE_VOLUMEID_LUKS is not set -# CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set -# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set -# CONFIG_FEATURE_VOLUMEID_ROMFS is not set -# CONFIG_FEATURE_VOLUMEID_SYSV is not set -# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set -# CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set -CONFIG_MOUNT=y -# CONFIG_FEATURE_MOUNT_FAKE is not set -# CONFIG_FEATURE_MOUNT_VERBOSE is not set -# CONFIG_FEATURE_MOUNT_HELPERS is not set -# CONFIG_FEATURE_MOUNT_LABEL is not set -# CONFIG_FEATURE_MOUNT_NFS is not set -CONFIG_FEATURE_MOUNT_CIFS=y -CONFIG_FEATURE_MOUNT_FLAGS=y -CONFIG_FEATURE_MOUNT_FSTAB=y -CONFIG_PIVOT_ROOT=y -CONFIG_RDATE=y -# CONFIG_RDEV is not set -CONFIG_READPROFILE=y -# CONFIG_RTCWAKE is not set -# CONFIG_SCRIPT is not set -# CONFIG_SCRIPTREPLAY is not set -CONFIG_SETARCH=y -CONFIG_SWAPONOFF=y -# CONFIG_FEATURE_SWAPON_PRI is not set -CONFIG_SWITCH_ROOT=y -CONFIG_UMOUNT=y -CONFIG_FEATURE_UMOUNT_ALL=y - -# -# Common options for mount/umount -# -CONFIG_FEATURE_MOUNT_LOOP=y -CONFIG_FEATURE_MOUNT_LOOP_CREATE=y -# CONFIG_FEATURE_MTAB_SUPPORT is not set - -# -# Miscellaneous Utilities -# -# CONFIG_CONSPY is not set -# CONFIG_UBIATTACH is not set -# CONFIG_UBIDETACH is not set -# CONFIG_ADJTIMEX is not set -# CONFIG_BBCONFIG is not set -# CONFIG_BEEP is not set -CONFIG_FEATURE_BEEP_FREQ=0 -CONFIG_FEATURE_BEEP_LENGTH_MS=0 -# CONFIG_CHAT is not set -# CONFIG_FEATURE_CHAT_NOFAIL is not set -# CONFIG_FEATURE_CHAT_TTY_HIFI is not set -# CONFIG_FEATURE_CHAT_IMPLICIT_CR is not set -# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set -# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set -# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set -# CONFIG_FEATURE_CHAT_CLR_ABORT is not set -CONFIG_CHRT=y -CONFIG_CROND=y -# CONFIG_FEATURE_CROND_D is not set -# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set -CONFIG_FEATURE_CROND_DIR="/var/spool/cron" -CONFIG_CRONTAB=y -CONFIG_DC=y -# CONFIG_FEATURE_DC_LIBM is not set -# CONFIG_DEVFSD is not set -# CONFIG_DEVFSD_MODLOAD is not set -# CONFIG_DEVFSD_FG_NP is not set -# CONFIG_DEVFSD_VERBOSE is not set -# CONFIG_FEATURE_DEVFS is not set -CONFIG_DEVMEM=y -CONFIG_EJECT=y -# CONFIG_FEATURE_EJECT_SCSI is not set -# CONFIG_FBSPLASH is not set -# CONFIG_FLASHCP is not set -# CONFIG_FLASH_LOCK is not set -# CONFIG_FLASH_UNLOCK is not set -# CONFIG_FLASH_ERASEALL is not set -# CONFIG_IONICE is not set -# CONFIG_INOTIFYD is not set -CONFIG_LAST=y -CONFIG_FEATURE_LAST_SMALL=y -# CONFIG_FEATURE_LAST_FANCY is not set -CONFIG_LESS=y -CONFIG_FEATURE_LESS_MAXLINES=9999999 -CONFIG_FEATURE_LESS_BRACKETS=y -CONFIG_FEATURE_LESS_FLAGS=y -# CONFIG_FEATURE_LESS_MARKS is not set -CONFIG_FEATURE_LESS_REGEXP=y -# CONFIG_FEATURE_LESS_WINCH is not set -# CONFIG_FEATURE_LESS_DASHCMD is not set -# CONFIG_FEATURE_LESS_LINENUMS is not set -CONFIG_HDPARM=y -CONFIG_FEATURE_HDPARM_GET_IDENTITY=y -# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set -# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set -# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set -# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set -# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set -CONFIG_MAKEDEVS=y -# CONFIG_FEATURE_MAKEDEVS_LEAF is not set -CONFIG_FEATURE_MAKEDEVS_TABLE=y -# CONFIG_MAN is not set -CONFIG_MICROCOM=y -CONFIG_MOUNTPOINT=y -CONFIG_MT=y -# CONFIG_RAIDAUTORUN is not set -# CONFIG_READAHEAD is not set -# CONFIG_RFKILL is not set -CONFIG_RUNLEVEL=y -# CONFIG_RX is not set -CONFIG_SETSID=y -CONFIG_STRINGS=y -# CONFIG_TASKSET is not set -# CONFIG_FEATURE_TASKSET_FANCY is not set -CONFIG_TIME=y -# CONFIG_TIMEOUT is not set -# CONFIG_TTYSIZE is not set -# CONFIG_VOLNAME is not set -# CONFIG_WALL is not set -CONFIG_WATCHDOG=y - -# -# Networking Utilities -# -# CONFIG_NC is not set -# CONFIG_NC_SERVER is not set -# CONFIG_NC_EXTRA is not set -# CONFIG_NC_110_COMPAT is not set -# CONFIG_FEATURE_IPV6 is not set -# CONFIG_FEATURE_UNIX_LOCAL is not set -# CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set -# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set -# CONFIG_ARP is not set -CONFIG_ARPING=y -# CONFIG_BRCTL is not set -# CONFIG_FEATURE_BRCTL_FANCY is not set -# CONFIG_FEATURE_BRCTL_SHOW is not set -CONFIG_DNSD=y -CONFIG_ETHER_WAKE=y -# CONFIG_FAKEIDENTD is not set -# CONFIG_FTPD is not set -# CONFIG_FEATURE_FTP_WRITE is not set -# CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set -# CONFIG_FTPGET is not set -# CONFIG_FTPPUT is not set -# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set -CONFIG_HOSTNAME=y -# CONFIG_HTTPD is not set -# CONFIG_FEATURE_HTTPD_RANGES is not set -# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set -# CONFIG_FEATURE_HTTPD_SETUID is not set -# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set -# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set -# CONFIG_FEATURE_HTTPD_CGI is not set -# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set -# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set -# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set -# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set -# CONFIG_FEATURE_HTTPD_PROXY is not set -CONFIG_IFCONFIG=y -CONFIG_FEATURE_IFCONFIG_STATUS=y -CONFIG_FEATURE_IFCONFIG_SLIP=y -CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y -CONFIG_FEATURE_IFCONFIG_HW=y -# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set -# CONFIG_IFENSLAVE is not set -# CONFIG_IFPLUGD is not set -CONFIG_IFUPDOWN=y -CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate" -CONFIG_FEATURE_IFUPDOWN_IP=y -# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set -# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set -CONFIG_FEATURE_IFUPDOWN_IPV4=y -# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set -CONFIG_FEATURE_IFUPDOWN_MAPPING=y -# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set -CONFIG_INETD=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y -# CONFIG_FEATURE_INETD_RPC is not set -CONFIG_IP=y -CONFIG_FEATURE_IP_ADDRESS=y -CONFIG_FEATURE_IP_LINK=y -CONFIG_FEATURE_IP_ROUTE=y -CONFIG_FEATURE_IP_TUNNEL=y -CONFIG_FEATURE_IP_RULE=y -CONFIG_FEATURE_IP_SHORT_FORMS=y -# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set -CONFIG_IPADDR=y -CONFIG_IPLINK=y -CONFIG_IPROUTE=y -CONFIG_IPTUNNEL=y -CONFIG_IPRULE=y -# CONFIG_IPCALC is not set -# CONFIG_FEATURE_IPCALC_FANCY is not set -# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set -CONFIG_NAMEIF=y -# CONFIG_FEATURE_NAMEIF_EXTENDED is not set -CONFIG_NETSTAT=y -# CONFIG_FEATURE_NETSTAT_WIDE is not set -# CONFIG_FEATURE_NETSTAT_PRG is not set -CONFIG_NSLOOKUP=y -# CONFIG_NTPD is not set -# CONFIG_FEATURE_NTPD_SERVER is not set -CONFIG_PING=y -# CONFIG_PING6 is not set -CONFIG_FEATURE_FANCY_PING=y -# CONFIG_PSCAN is not set -CONFIG_ROUTE=y -# CONFIG_SLATTACH is not set -# CONFIG_TCPSVD is not set -CONFIG_TELNET=y -CONFIG_FEATURE_TELNET_TTYPE=y -CONFIG_FEATURE_TELNET_AUTOLOGIN=y -# CONFIG_TELNETD is not set -# CONFIG_FEATURE_TELNETD_STANDALONE is not set -# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set -CONFIG_TFTP=y -# CONFIG_TFTPD is not set - -# -# Common options for tftp/tftpd -# -CONFIG_FEATURE_TFTP_GET=y -CONFIG_FEATURE_TFTP_PUT=y -CONFIG_FEATURE_TFTP_BLOCKSIZE=y -# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set -# CONFIG_TFTP_DEBUG is not set -CONFIG_TRACEROUTE=y -# CONFIG_TRACEROUTE6 is not set -# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set -# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set -# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set -# CONFIG_TUNCTL is not set -# CONFIG_FEATURE_TUNCTL_UG is not set -# CONFIG_UDHCPD is not set -# CONFIG_DHCPRELAY is not set -# CONFIG_DUMPLEASES is not set -# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set -CONFIG_DHCPD_LEASES_FILE="" -CONFIG_UDHCPC=y -CONFIG_FEATURE_UDHCPC_ARPING=y -# CONFIG_FEATURE_UDHCP_PORT is not set -CONFIG_UDHCP_DEBUG=0 -# CONFIG_FEATURE_UDHCP_RFC3397 is not set -CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script" -CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 -CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n" -# CONFIG_UDPSVD is not set -CONFIG_VCONFIG=y -CONFIG_WGET=y -CONFIG_FEATURE_WGET_STATUSBAR=y -CONFIG_FEATURE_WGET_AUTHENTICATION=y -CONFIG_FEATURE_WGET_LONG_OPTIONS=y -# CONFIG_ZCIP is not set - -# -# Print Utilities -# -# CONFIG_LPD is not set -# CONFIG_LPR is not set -# CONFIG_LPQ is not set - -# -# Mail Utilities -# -# CONFIG_MAKEMIME is not set -CONFIG_FEATURE_MIME_CHARSET="" -# CONFIG_POPMAILDIR is not set -# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set -# CONFIG_REFORMIME is not set -# CONFIG_FEATURE_REFORMIME_COMPAT is not set -# CONFIG_SENDMAIL is not set - -# -# Process Utilities -# -# CONFIG_SMEMCAP is not set -CONFIG_FREE=y -CONFIG_FUSER=y -CONFIG_KILL=y -CONFIG_KILLALL=y -CONFIG_KILLALL5=y -# CONFIG_NMETER is not set -# CONFIG_PGREP is not set -CONFIG_PIDOF=y -CONFIG_FEATURE_PIDOF_SINGLE=y -CONFIG_FEATURE_PIDOF_OMIT=y -# CONFIG_PKILL is not set -CONFIG_PS=y -CONFIG_FEATURE_PS_WIDE=y -# CONFIG_FEATURE_PS_TIME is not set -# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set -# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set -CONFIG_RENICE=y -CONFIG_BB_SYSCTL=y -CONFIG_TOP=y -CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y -CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y -# CONFIG_FEATURE_TOP_SMP_CPU is not set -# CONFIG_FEATURE_TOP_DECIMALS is not set -# CONFIG_FEATURE_TOP_SMP_PROCESS is not set -# CONFIG_FEATURE_TOPMEM is not set -# CONFIG_FEATURE_SHOW_THREADS is not set -CONFIG_UPTIME=y -CONFIG_WATCH=y - -# -# Runit Utilities -# -# CONFIG_RUNSV is not set -# CONFIG_RUNSVDIR is not set -# CONFIG_FEATURE_RUNSVDIR_LOG is not set -# CONFIG_SV is not set -CONFIG_SV_DEFAULT_SERVICE_DIR="" -# CONFIG_SVLOGD is not set -# CONFIG_CHPST is not set -# CONFIG_SETUIDGID is not set -# CONFIG_ENVUIDGID is not set -# CONFIG_ENVDIR is not set -# CONFIG_SOFTLIMIT is not set -# CONFIG_CHCON is not set -# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set -# CONFIG_GETENFORCE is not set -# CONFIG_GETSEBOOL is not set -# CONFIG_LOAD_POLICY is not set -# CONFIG_MATCHPATHCON is not set -# CONFIG_RESTORECON is not set -# CONFIG_RUNCON is not set -# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set -# CONFIG_SELINUXENABLED is not set -# CONFIG_SETENFORCE is not set -# CONFIG_SETFILES is not set -# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set -# CONFIG_SETSEBOOL is not set -# CONFIG_SESTATUS is not set - -# -# Shells -# -CONFIG_ASH=y -CONFIG_ASH_BASH_COMPAT=y -CONFIG_ASH_JOB_CONTROL=y -CONFIG_ASH_ALIAS=y -# CONFIG_ASH_GETOPTS is not set -CONFIG_ASH_BUILTIN_ECHO=y -CONFIG_ASH_BUILTIN_PRINTF=y -CONFIG_ASH_BUILTIN_TEST=y -CONFIG_ASH_CMDCMD=y -# CONFIG_ASH_MAIL is not set -CONFIG_ASH_OPTIMIZE_FOR_SIZE=y -CONFIG_ASH_RANDOM_SUPPORT=y -CONFIG_ASH_EXPAND_PRMT=y -# CONFIG_HUSH is not set -# CONFIG_HUSH_BASH_COMPAT is not set -# CONFIG_HUSH_HELP is not set -# CONFIG_HUSH_INTERACTIVE is not set -# CONFIG_HUSH_JOB is not set -# CONFIG_HUSH_TICK is not set -# CONFIG_HUSH_IF is not set -# CONFIG_HUSH_LOOPS is not set -# CONFIG_HUSH_CASE is not set -# CONFIG_HUSH_FUNCTIONS is not set -# CONFIG_HUSH_LOCAL is not set -# CONFIG_HUSH_EXPORT_N is not set -# CONFIG_HUSH_RANDOM_SUPPORT is not set -CONFIG_FEATURE_SH_IS_ASH=y -# CONFIG_FEATURE_SH_IS_HUSH is not set -# CONFIG_FEATURE_SH_IS_NONE is not set -# CONFIG_FEATURE_BASH_IS_ASH is not set -# CONFIG_FEATURE_BASH_IS_HUSH is not set -CONFIG_FEATURE_BASH_IS_NONE=y -# CONFIG_LASH is not set -# CONFIG_MSH is not set -CONFIG_SH_MATH_SUPPORT=y -# CONFIG_SH_MATH_SUPPORT_64 is not set -CONFIG_FEATURE_SH_EXTRA_QUIET=y -# CONFIG_FEATURE_SH_STANDALONE is not set -# CONFIG_FEATURE_SH_NOFORK is not set -# CONFIG_CTTYHACK is not set - -# -# System Logging Utilities -# -CONFIG_SYSLOGD=y -CONFIG_FEATURE_ROTATE_LOGFILE=y -CONFIG_FEATURE_REMOTE_LOG=y -# CONFIG_FEATURE_SYSLOGD_DUP is not set -CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256 -# CONFIG_FEATURE_IPC_SYSLOG is not set -CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0 -# CONFIG_LOGREAD is not set -# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set -CONFIG_KLOGD=y -CONFIG_LOGGER=y diff --git a/package/busybox/busybox-1.18.3/busybox-1.18.3-buildsys.patch b/package/busybox/busybox-1.18.3/busybox-1.18.3-buildsys.patch deleted file mode 100644 index 330b73fbb8..0000000000 --- a/package/busybox/busybox-1.18.3/busybox-1.18.3-buildsys.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- busybox-1.18.3/Config.in -+++ busybox-1.18.3-buildsys/Config.in -@@ -126,7 +126,6 @@ config FEATURE_INSTALLER - config INSTALL_NO_USR - bool "Don't use /usr" - default n -- depends on FEATURE_INSTALLER - help - Disable use of /usr. busybox --install and "make install" - will install applets only to /bin and /sbin, diff --git a/package/busybox/busybox-1.18.3/busybox-1.18.3-wget.patch b/package/busybox/busybox-1.18.3/busybox-1.18.3-wget.patch deleted file mode 100644 index c7ea7365db..0000000000 --- a/package/busybox/busybox-1.18.3/busybox-1.18.3-wget.patch +++ /dev/null @@ -1,69 +0,0 @@ ---- busybox-1.18.3/networking/wget.c -+++ busybox-1.18.3-wget/networking/wget.c -@@ -446,7 +446,7 @@ static FILE* prepare_ftp_session(FILE ** - - static void NOINLINE retrieve_file_data(FILE *dfp, int output_fd) - { -- char buf[512]; -+ char buf[4*1024]; /* made bigger to speed up local xfers */ - #if ENABLE_FEATURE_WGET_STATUSBAR || ENABLE_FEATURE_WGET_TIMEOUT - # if ENABLE_FEATURE_WGET_TIMEOUT - unsigned second_cnt; -@@ -506,8 +506,11 @@ static void NOINLINE retrieve_file_data( - G.transferred += n; - progress_meter(PROGRESS_BUMP); - #endif -- if (G.got_clen) -+ if (G.got_clen) { - G.content_len -= n; -+ if (G.content_len == 0) -+ break; -+ } - } - - if (!G.chunked) -@@ -706,6 +709,11 @@ int wget_main(int argc UNUSED_PARAM, cha - fprintf(sfp, "Host: %s\r\nUser-Agent: %s\r\n", - target.host, user_agent); - -+ /* Ask server to close the connection as soon as we are done -+ * (IOW: we do not intend to send more requests) -+ */ -+ fprintf(sfp, "Connection: close\r\n"); -+ - #if ENABLE_FEATURE_WGET_AUTHENTICATION - if (target.user) { - fprintf(sfp, "Proxy-Authorization: Basic %s\r\n"+6, -@@ -719,22 +727,25 @@ int wget_main(int argc UNUSED_PARAM, cha - - if (G.beg_range) - fprintf(sfp, "Range: bytes=%"OFF_FMT"u-\r\n", G.beg_range); -+ - #if ENABLE_FEATURE_WGET_LONG_OPTIONS - if (extra_headers) - fputs(extra_headers, sfp); - - if (opt & WGET_OPT_POST_DATA) { - char *estr = URL_escape(post_data); -- fprintf(sfp, "Content-Type: application/x-www-form-urlencoded\r\n"); -- fprintf(sfp, "Content-Length: %u\r\n" "\r\n" "%s", -- (int) strlen(estr), estr); -- /*fprintf(sfp, "Connection: Keep-Alive\r\n\r\n");*/ -- /*fprintf(sfp, "%s\r\n", estr);*/ -+ fprintf(sfp, -+ "Content-Type: application/x-www-form-urlencoded\r\n" -+ "Content-Length: %u\r\n" -+ "\r\n" -+ "%s", -+ (int) strlen(estr), estr -+ ); - free(estr); - } else - #endif -- { /* If "Connection:" is needed, document why */ -- fprintf(sfp, /* "Connection: close\r\n" */ "\r\n"); -+ { -+ fprintf(sfp, "\r\n"); - } - - fflush(sfp); diff --git a/package/busybox/busybox-1.18.x.config b/package/busybox/busybox-1.18.x.config deleted file mode 100644 index 4c43b7a789..0000000000 --- a/package/busybox/busybox-1.18.x.config +++ /dev/null @@ -1,986 +0,0 @@ -# -# Automatically generated make config: don't edit -# Busybox version: 1.18.0 -# Tue Nov 30 09:51:07 2010 -# -CONFIG_HAVE_DOT_CONFIG=y - -# -# Busybox Settings -# - -# -# General Configuration -# -CONFIG_DESKTOP=y -# CONFIG_EXTRA_COMPAT is not set -CONFIG_INCLUDE_SUSv2=y -# CONFIG_USE_PORTABLE_CODE is not set -CONFIG_PLATFORM_LINUX=y -CONFIG_FEATURE_BUFFERS_USE_MALLOC=y -# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set -# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set -CONFIG_SHOW_USAGE=y -CONFIG_FEATURE_VERBOSE_USAGE=y -# CONFIG_FEATURE_COMPRESS_USAGE is not set -CONFIG_FEATURE_INSTALLER=y -# CONFIG_INSTALL_NO_USR is not set -# CONFIG_LOCALE_SUPPORT is not set -# CONFIG_UNICODE_SUPPORT is not set -# CONFIG_UNICODE_USING_LOCALE is not set -# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set -CONFIG_SUBST_WCHAR=0 -CONFIG_LAST_SUPPORTED_WCHAR=0 -# CONFIG_UNICODE_COMBINING_WCHARS is not set -# CONFIG_UNICODE_WIDE_WCHARS is not set -# CONFIG_UNICODE_BIDI_SUPPORT is not set -# CONFIG_UNICODE_NEUTRAL_TABLE is not set -# CONFIG_UNICODE_PRESERVE_BROKEN is not set -CONFIG_LONG_OPTS=y -CONFIG_FEATURE_DEVPTS=y -CONFIG_FEATURE_CLEAN_UP=y -CONFIG_FEATURE_WTMP=y -CONFIG_FEATURE_UTMP=y -# CONFIG_FEATURE_PIDFILE is not set -CONFIG_FEATURE_SUID=y -# CONFIG_FEATURE_SUID_CONFIG is not set -# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set -# CONFIG_SELINUX is not set -# CONFIG_FEATURE_PREFER_APPLETS is not set -CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" -CONFIG_FEATURE_SYSLOG=y -# CONFIG_FEATURE_HAVE_RPC is not set - -# -# Build Options -# -# CONFIG_STATIC is not set -# CONFIG_PIE is not set -# CONFIG_NOMMU is not set -# CONFIG_BUILD_LIBBUSYBOX is not set -# CONFIG_FEATURE_INDIVIDUAL is not set -# CONFIG_FEATURE_SHARED_BUSYBOX is not set -# CONFIG_LFS is not set -CONFIG_CROSS_COMPILER_PREFIX="" -CONFIG_EXTRA_CFLAGS="" - -# -# Debugging Options -# -# CONFIG_DEBUG is not set -# CONFIG_DEBUG_PESSIMIZE is not set -# CONFIG_WERROR is not set -CONFIG_NO_DEBUG_LIB=y -# CONFIG_DMALLOC is not set -# CONFIG_EFENCE is not set - -# -# Installation Options ("make install" behavior) -# -CONFIG_INSTALL_APPLET_SYMLINKS=y -# CONFIG_INSTALL_APPLET_HARDLINKS is not set -# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set -# CONFIG_INSTALL_APPLET_DONT is not set -# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set -# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set -# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set -CONFIG_PREFIX="./_install" - -# -# Busybox Library Tuning -# -CONFIG_PASSWORD_MINLEN=6 -CONFIG_MD5_SIZE_VS_SPEED=2 -# CONFIG_FEATURE_FAST_TOP is not set -# CONFIG_FEATURE_ETC_NETWORKS is not set -CONFIG_FEATURE_USE_TERMIOS=y -CONFIG_FEATURE_EDITING=y -CONFIG_FEATURE_EDITING_MAX_LEN=1024 -CONFIG_FEATURE_EDITING_VI=y -CONFIG_FEATURE_EDITING_HISTORY=999 -CONFIG_FEATURE_EDITING_SAVEHISTORY=y -CONFIG_FEATURE_TAB_COMPLETION=y -# CONFIG_FEATURE_USERNAME_COMPLETION is not set -CONFIG_FEATURE_EDITING_FANCY_PROMPT=y -# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set -CONFIG_FEATURE_NON_POSIX_CP=y -# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set -CONFIG_FEATURE_COPYBUF_KB=4 -CONFIG_MONOTONIC_SYSCALL=y -CONFIG_IOCTL_HEX2STR_ERROR=y -CONFIG_FEATURE_HWIB=y - -# -# Applets -# - -# -# Archival Utilities -# -# CONFIG_FEATURE_SEAMLESS_XZ is not set -# CONFIG_FEATURE_SEAMLESS_LZMA is not set -# CONFIG_FEATURE_SEAMLESS_BZ2 is not set -# CONFIG_FEATURE_SEAMLESS_GZ is not set -# CONFIG_FEATURE_SEAMLESS_Z is not set -CONFIG_AR=y -# CONFIG_FEATURE_AR_LONG_FILENAMES is not set -CONFIG_FEATURE_AR_CREATE=y -CONFIG_BUNZIP2=y -# CONFIG_BZIP2 is not set -CONFIG_CPIO=y -# CONFIG_FEATURE_CPIO_O is not set -# CONFIG_FEATURE_CPIO_P is not set -# CONFIG_DPKG is not set -# CONFIG_DPKG_DEB is not set -# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set -CONFIG_GUNZIP=y -CONFIG_GZIP=y -# CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set -# CONFIG_LZOP is not set -# CONFIG_LZOP_COMPR_HIGH is not set -# CONFIG_RPM2CPIO is not set -# CONFIG_RPM is not set -CONFIG_TAR=y -CONFIG_FEATURE_TAR_CREATE=y -# CONFIG_FEATURE_TAR_AUTODETECT is not set -CONFIG_FEATURE_TAR_FROM=y -# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set -# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set -CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y -CONFIG_FEATURE_TAR_LONG_OPTIONS=y -CONFIG_FEATURE_TAR_TO_COMMAND=y -# CONFIG_FEATURE_TAR_UNAME_GNAME is not set -# CONFIG_FEATURE_TAR_NOPRESERVE_TIME is not set -# CONFIG_FEATURE_TAR_SELINUX is not set -# CONFIG_UNCOMPRESS is not set -CONFIG_UNLZMA=y -# CONFIG_FEATURE_LZMA_FAST is not set -CONFIG_LZMA=y -CONFIG_UNXZ=y -CONFIG_XZ=y -CONFIG_UNZIP=y - -# -# Coreutils -# -CONFIG_BASENAME=y -CONFIG_CAT=y -CONFIG_DATE=y -CONFIG_FEATURE_DATE_ISOFMT=y -# CONFIG_FEATURE_DATE_NANO is not set -CONFIG_FEATURE_DATE_COMPAT=y -CONFIG_TEST=y -CONFIG_FEATURE_TEST_64=y -CONFIG_TR=y -CONFIG_FEATURE_TR_CLASSES=y -CONFIG_FEATURE_TR_EQUIV=y -# CONFIG_BASE64 is not set -# CONFIG_CAL is not set -CONFIG_CATV=y -CONFIG_CHGRP=y -CONFIG_CHMOD=y -CONFIG_CHOWN=y -# CONFIG_FEATURE_CHOWN_LONG_OPTIONS is not set -CONFIG_CHROOT=y -CONFIG_CKSUM=y -# CONFIG_COMM is not set -CONFIG_CP=y -# CONFIG_FEATURE_CP_LONG_OPTIONS is not set -CONFIG_CUT=y -CONFIG_DD=y -CONFIG_FEATURE_DD_SIGNAL_HANDLING=y -# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set -CONFIG_FEATURE_DD_IBS_OBS=y -CONFIG_DF=y -# CONFIG_FEATURE_DF_FANCY is not set -CONFIG_DIRNAME=y -CONFIG_DOS2UNIX=y -CONFIG_UNIX2DOS=y -CONFIG_DU=y -CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y -CONFIG_ECHO=y -CONFIG_FEATURE_FANCY_ECHO=y -CONFIG_ENV=y -# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set -# CONFIG_EXPAND is not set -# CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set -CONFIG_EXPR=y -CONFIG_EXPR_MATH_SUPPORT_64=y -CONFIG_FALSE=y -CONFIG_FOLD=y -# CONFIG_FSYNC is not set -CONFIG_HEAD=y -CONFIG_FEATURE_FANCY_HEAD=y -CONFIG_HOSTID=y -CONFIG_ID=y -CONFIG_INSTALL=y -CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y -CONFIG_LENGTH=y -CONFIG_LN=y -CONFIG_LOGNAME=y -CONFIG_LS=y -CONFIG_FEATURE_LS_FILETYPES=y -CONFIG_FEATURE_LS_FOLLOWLINKS=y -CONFIG_FEATURE_LS_RECURSIVE=y -CONFIG_FEATURE_LS_SORTFILES=y -CONFIG_FEATURE_LS_TIMESTAMPS=y -CONFIG_FEATURE_LS_USERNAME=y -CONFIG_FEATURE_LS_COLOR=y -CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y -CONFIG_MD5SUM=y -CONFIG_MKDIR=y -CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y -CONFIG_MKFIFO=y -CONFIG_MKNOD=y -CONFIG_MV=y -CONFIG_FEATURE_MV_LONG_OPTIONS=y -CONFIG_NICE=y -CONFIG_NOHUP=y -CONFIG_OD=y -CONFIG_PRINTENV=y -CONFIG_PRINTF=y -CONFIG_PWD=y -CONFIG_READLINK=y -CONFIG_FEATURE_READLINK_FOLLOW=y -CONFIG_REALPATH=y -CONFIG_RM=y -CONFIG_RMDIR=y -# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set -CONFIG_SEQ=y -CONFIG_SHA1SUM=y -CONFIG_SHA256SUM=y -CONFIG_SHA512SUM=y -CONFIG_SLEEP=y -# CONFIG_FEATURE_FANCY_SLEEP is not set -# CONFIG_FEATURE_FLOAT_SLEEP is not set -CONFIG_SORT=y -CONFIG_FEATURE_SORT_BIG=y -# CONFIG_SPLIT is not set -# CONFIG_FEATURE_SPLIT_FANCY is not set -# CONFIG_STAT is not set -# CONFIG_FEATURE_STAT_FORMAT is not set -CONFIG_STTY=y -# CONFIG_SUM is not set -CONFIG_SYNC=y -# CONFIG_TAC is not set -CONFIG_TAIL=y -CONFIG_FEATURE_FANCY_TAIL=y -CONFIG_TEE=y -CONFIG_FEATURE_TEE_USE_BLOCK_IO=y -CONFIG_TOUCH=y -CONFIG_TRUE=y -CONFIG_TTY=y -CONFIG_UNAME=y -# CONFIG_UNEXPAND is not set -# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set -CONFIG_UNIQ=y -CONFIG_USLEEP=y -CONFIG_UUDECODE=y -CONFIG_UUENCODE=y -CONFIG_WC=y -# CONFIG_FEATURE_WC_LARGE is not set -CONFIG_WHO=y -CONFIG_WHOAMI=y -CONFIG_YES=y - -# -# Common options for cp and mv -# -CONFIG_FEATURE_PRESERVE_HARDLINKS=y - -# -# Common options for ls, more and telnet -# -CONFIG_FEATURE_AUTOWIDTH=y - -# -# Common options for df, du, ls -# -CONFIG_FEATURE_HUMAN_READABLE=y - -# -# Common options for md5sum, sha1sum, sha256sum, sha512sum -# -CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y - -# -# Console Utilities -# -CONFIG_CHVT=y -# CONFIG_FGCONSOLE is not set -CONFIG_CLEAR=y -CONFIG_DEALLOCVT=y -CONFIG_DUMPKMAP=y -# CONFIG_KBD_MODE is not set -CONFIG_LOADFONT=y -CONFIG_LOADKMAP=y -CONFIG_OPENVT=y -CONFIG_RESET=y -CONFIG_RESIZE=y -CONFIG_FEATURE_RESIZE_PRINT=y -CONFIG_SETCONSOLE=y -# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set -# CONFIG_SETFONT is not set -# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set -CONFIG_DEFAULT_SETFONT_DIR="" -CONFIG_SETKEYCODES=y -CONFIG_SETLOGCONS=y -# CONFIG_SHOWKEY is not set - -# -# Common options for loadfont and setfont -# -CONFIG_FEATURE_LOADFONT_PSF2=y -CONFIG_FEATURE_LOADFONT_RAW=y - -# -# Debian Utilities -# -CONFIG_MKTEMP=y -CONFIG_PIPE_PROGRESS=y -CONFIG_RUN_PARTS=y -CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y -# CONFIG_FEATURE_RUN_PARTS_FANCY is not set -CONFIG_START_STOP_DAEMON=y -CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y -CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y -CONFIG_WHICH=y - -# -# Editors -# -CONFIG_PATCH=y -CONFIG_AWK=y -# CONFIG_FEATURE_AWK_LIBM is not set -CONFIG_CMP=y -CONFIG_DIFF=y -# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set -CONFIG_FEATURE_DIFF_DIR=y -# CONFIG_ED is not set -CONFIG_SED=y -CONFIG_VI=y -CONFIG_FEATURE_VI_MAX_LEN=4096 -CONFIG_FEATURE_VI_8BIT=y -CONFIG_FEATURE_VI_COLON=y -CONFIG_FEATURE_VI_YANKMARK=y -CONFIG_FEATURE_VI_SEARCH=y -CONFIG_FEATURE_VI_USE_SIGNALS=y -CONFIG_FEATURE_VI_DOT_CMD=y -CONFIG_FEATURE_VI_READONLY=y -CONFIG_FEATURE_VI_SETOPTS=y -CONFIG_FEATURE_VI_SET=y -CONFIG_FEATURE_VI_WIN_RESIZE=y -CONFIG_FEATURE_VI_ASK_TERMINAL=y -CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y -CONFIG_FEATURE_ALLOW_EXEC=y - -# -# Finding Utilities -# -CONFIG_FIND=y -CONFIG_FEATURE_FIND_PRINT0=y -CONFIG_FEATURE_FIND_MTIME=y -CONFIG_FEATURE_FIND_MMIN=y -CONFIG_FEATURE_FIND_PERM=y -CONFIG_FEATURE_FIND_TYPE=y -CONFIG_FEATURE_FIND_XDEV=y -CONFIG_FEATURE_FIND_MAXDEPTH=y -CONFIG_FEATURE_FIND_NEWER=y -# CONFIG_FEATURE_FIND_INUM is not set -CONFIG_FEATURE_FIND_EXEC=y -CONFIG_FEATURE_FIND_USER=y -CONFIG_FEATURE_FIND_GROUP=y -CONFIG_FEATURE_FIND_NOT=y -CONFIG_FEATURE_FIND_DEPTH=y -CONFIG_FEATURE_FIND_PAREN=y -CONFIG_FEATURE_FIND_SIZE=y -CONFIG_FEATURE_FIND_PRUNE=y -# CONFIG_FEATURE_FIND_DELETE is not set -CONFIG_FEATURE_FIND_PATH=y -CONFIG_FEATURE_FIND_REGEX=y -# CONFIG_FEATURE_FIND_CONTEXT is not set -# CONFIG_FEATURE_FIND_LINKS is not set -CONFIG_GREP=y -CONFIG_FEATURE_GREP_EGREP_ALIAS=y -CONFIG_FEATURE_GREP_FGREP_ALIAS=y -CONFIG_FEATURE_GREP_CONTEXT=y -CONFIG_XARGS=y -# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set -CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y -CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y -CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y - -# -# Init Utilities -# -# CONFIG_BOOTCHARTD is not set -# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set -# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set -CONFIG_HALT=y -# CONFIG_FEATURE_CALL_TELINIT is not set -CONFIG_TELINIT_PATH="" -CONFIG_INIT=y -CONFIG_FEATURE_USE_INITTAB=y -CONFIG_FEATURE_KILL_REMOVED=y -CONFIG_FEATURE_KILL_DELAY=0 -CONFIG_FEATURE_INIT_SCTTY=y -CONFIG_FEATURE_INIT_SYSLOG=y -CONFIG_FEATURE_EXTRA_QUIET=y -# CONFIG_FEATURE_INIT_COREDUMPS is not set -CONFIG_FEATURE_INITRD=y -CONFIG_INIT_TERMINAL_TYPE="linux" -CONFIG_MESG=y - -# -# Login/Password Management Utilities -# -# CONFIG_ADD_SHELL is not set -# CONFIG_REMOVE_SHELL is not set -CONFIG_FEATURE_SHADOWPASSWDS=y -# CONFIG_USE_BB_PWD_GRP is not set -# CONFIG_USE_BB_SHADOW is not set -CONFIG_USE_BB_CRYPT=y -# CONFIG_USE_BB_CRYPT_SHA is not set -CONFIG_ADDUSER=y -# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set -# CONFIG_FEATURE_CHECK_NAMES is not set -CONFIG_FIRST_SYSTEM_ID=100 -CONFIG_LAST_SYSTEM_ID=999 -CONFIG_ADDGROUP=y -# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set -# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set -CONFIG_DELUSER=y -CONFIG_DELGROUP=y -# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set -CONFIG_GETTY=y -CONFIG_LOGIN=y -# CONFIG_PAM is not set -# CONFIG_LOGIN_SCRIPTS is not set -CONFIG_FEATURE_NOLOGIN=y -CONFIG_FEATURE_SECURETTY=y -CONFIG_PASSWD=y -CONFIG_FEATURE_PASSWD_WEAK_CHECK=y -# CONFIG_CRYPTPW is not set -# CONFIG_CHPASSWD is not set -CONFIG_SU=y -CONFIG_FEATURE_SU_SYSLOG=y -CONFIG_FEATURE_SU_CHECKS_SHELLS=y -CONFIG_SULOGIN=y -CONFIG_VLOCK=y - -# -# Linux Ext2 FS Progs -# -CONFIG_CHATTR=y -CONFIG_FSCK=y -CONFIG_LSATTR=y -# CONFIG_TUNE2FS is not set - -# -# Linux Module Utilities -# -# CONFIG_MODINFO is not set -# CONFIG_MODPROBE_SMALL is not set -# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set -# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set -CONFIG_INSMOD=y -CONFIG_RMMOD=y -CONFIG_LSMOD=y -CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y -CONFIG_MODPROBE=y -# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set -# CONFIG_DEPMOD is not set - -# -# Options common to multiple modutils -# -# CONFIG_FEATURE_2_4_MODULES is not set -# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set -# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set -# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set -# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set -# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set -# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set -CONFIG_FEATURE_CHECK_TAINTED_MODULE=y -CONFIG_FEATURE_MODUTILS_ALIAS=y -CONFIG_FEATURE_MODUTILS_SYMBOLS=y -CONFIG_DEFAULT_MODULES_DIR="/lib/modules" -CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" - -# -# Linux System Utilities -# -# CONFIG_BLOCKDEV is not set -# CONFIG_REV is not set -# CONFIG_ACPID is not set -# CONFIG_FEATURE_ACPID_COMPAT is not set -# CONFIG_BLKID is not set -CONFIG_DMESG=y -CONFIG_FEATURE_DMESG_PRETTY=y -# CONFIG_FBSET is not set -# CONFIG_FEATURE_FBSET_FANCY is not set -# CONFIG_FEATURE_FBSET_READMODE is not set -CONFIG_FDFLUSH=y -CONFIG_FDFORMAT=y -# CONFIG_FDISK is not set -# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set -# CONFIG_FEATURE_FDISK_WRITABLE is not set -# CONFIG_FEATURE_AIX_LABEL is not set -# CONFIG_FEATURE_SGI_LABEL is not set -# CONFIG_FEATURE_SUN_LABEL is not set -# CONFIG_FEATURE_OSF_LABEL is not set -# CONFIG_FEATURE_GPT_LABEL is not set -# CONFIG_FEATURE_FDISK_ADVANCED is not set -# CONFIG_FINDFS is not set -# CONFIG_FLOCK is not set -CONFIG_FREERAMDISK=y -# CONFIG_FSCK_MINIX is not set -# CONFIG_MKFS_EXT2 is not set -# CONFIG_MKFS_MINIX is not set -# CONFIG_FEATURE_MINIX2 is not set -# CONFIG_MKFS_REISER is not set -# CONFIG_MKFS_VFAT is not set -CONFIG_GETOPT=y -CONFIG_FEATURE_GETOPT_LONG=y -CONFIG_HEXDUMP=y -# CONFIG_FEATURE_HEXDUMP_REVERSE is not set -# CONFIG_HD is not set -CONFIG_HWCLOCK=y -CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y -CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y -CONFIG_IPCRM=y -CONFIG_IPCS=y -CONFIG_LOSETUP=y -CONFIG_LSPCI=y -CONFIG_LSUSB=y -CONFIG_MDEV=y -CONFIG_FEATURE_MDEV_CONF=y -# CONFIG_FEATURE_MDEV_RENAME is not set -# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set -CONFIG_FEATURE_MDEV_EXEC=y -# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set -CONFIG_MKSWAP=y -# CONFIG_FEATURE_MKSWAP_UUID is not set -CONFIG_MORE=y -CONFIG_MOUNT=y -# CONFIG_FEATURE_MOUNT_FAKE is not set -# CONFIG_FEATURE_MOUNT_VERBOSE is not set -# CONFIG_FEATURE_MOUNT_HELPERS is not set -# CONFIG_FEATURE_MOUNT_LABEL is not set -# CONFIG_FEATURE_MOUNT_NFS is not set -CONFIG_FEATURE_MOUNT_CIFS=y -CONFIG_FEATURE_MOUNT_FLAGS=y -CONFIG_FEATURE_MOUNT_FSTAB=y -CONFIG_PIVOT_ROOT=y -CONFIG_RDATE=y -# CONFIG_RDEV is not set -CONFIG_READPROFILE=y -# CONFIG_RTCWAKE is not set -# CONFIG_SCRIPT is not set -# CONFIG_SCRIPTREPLAY is not set -CONFIG_SETARCH=y -CONFIG_SWAPONOFF=y -# CONFIG_FEATURE_SWAPON_PRI is not set -CONFIG_SWITCH_ROOT=y -CONFIG_UMOUNT=y -CONFIG_FEATURE_UMOUNT_ALL=y - -# -# Common options for mount/umount -# -CONFIG_FEATURE_MOUNT_LOOP=y -CONFIG_FEATURE_MOUNT_LOOP_CREATE=y -# CONFIG_FEATURE_MTAB_SUPPORT is not set -# CONFIG_VOLUMEID is not set -# CONFIG_FEATURE_VOLUMEID_EXT is not set -# CONFIG_FEATURE_VOLUMEID_BTRFS is not set -# CONFIG_FEATURE_VOLUMEID_REISERFS is not set -# CONFIG_FEATURE_VOLUMEID_FAT is not set -# CONFIG_FEATURE_VOLUMEID_HFS is not set -# CONFIG_FEATURE_VOLUMEID_JFS is not set -# CONFIG_FEATURE_VOLUMEID_XFS is not set -# CONFIG_FEATURE_VOLUMEID_NTFS is not set -# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set -# CONFIG_FEATURE_VOLUMEID_UDF is not set -# CONFIG_FEATURE_VOLUMEID_LUKS is not set -# CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set -# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set -# CONFIG_FEATURE_VOLUMEID_ROMFS is not set -# CONFIG_FEATURE_VOLUMEID_SYSV is not set -# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set -# CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set - -# -# Miscellaneous Utilities -# -# CONFIG_CONSPY is not set -# CONFIG_NANDWRITE is not set -# CONFIG_NANDDUMP is not set -# CONFIG_UBIATTACH is not set -# CONFIG_UBIDETACH is not set -# CONFIG_ADJTIMEX is not set -# CONFIG_BBCONFIG is not set -# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set -# CONFIG_BEEP is not set -CONFIG_FEATURE_BEEP_FREQ=0 -CONFIG_FEATURE_BEEP_LENGTH_MS=0 -# CONFIG_CHAT is not set -# CONFIG_FEATURE_CHAT_NOFAIL is not set -# CONFIG_FEATURE_CHAT_TTY_HIFI is not set -# CONFIG_FEATURE_CHAT_IMPLICIT_CR is not set -# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set -# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set -# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set -# CONFIG_FEATURE_CHAT_CLR_ABORT is not set -CONFIG_CHRT=y -CONFIG_CROND=y -# CONFIG_FEATURE_CROND_D is not set -# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set -CONFIG_FEATURE_CROND_DIR="/var/spool/cron" -CONFIG_CRONTAB=y -CONFIG_DC=y -# CONFIG_FEATURE_DC_LIBM is not set -# CONFIG_DEVFSD is not set -# CONFIG_DEVFSD_MODLOAD is not set -# CONFIG_DEVFSD_FG_NP is not set -# CONFIG_DEVFSD_VERBOSE is not set -# CONFIG_FEATURE_DEVFS is not set -CONFIG_DEVMEM=y -CONFIG_EJECT=y -# CONFIG_FEATURE_EJECT_SCSI is not set -# CONFIG_FBSPLASH is not set -# CONFIG_FLASHCP is not set -# CONFIG_FLASH_LOCK is not set -# CONFIG_FLASH_UNLOCK is not set -# CONFIG_FLASH_ERASEALL is not set -# CONFIG_IONICE is not set -# CONFIG_INOTIFYD is not set -CONFIG_LAST=y -CONFIG_FEATURE_LAST_SMALL=y -# CONFIG_FEATURE_LAST_FANCY is not set -CONFIG_LESS=y -CONFIG_FEATURE_LESS_MAXLINES=9999999 -CONFIG_FEATURE_LESS_BRACKETS=y -CONFIG_FEATURE_LESS_FLAGS=y -# CONFIG_FEATURE_LESS_MARKS is not set -CONFIG_FEATURE_LESS_REGEXP=y -# CONFIG_FEATURE_LESS_WINCH is not set -# CONFIG_FEATURE_LESS_DASHCMD is not set -# CONFIG_FEATURE_LESS_LINENUMS is not set -CONFIG_HDPARM=y -CONFIG_FEATURE_HDPARM_GET_IDENTITY=y -# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set -# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set -# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set -# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set -# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set -CONFIG_MAKEDEVS=y -# CONFIG_FEATURE_MAKEDEVS_LEAF is not set -CONFIG_FEATURE_MAKEDEVS_TABLE=y -# CONFIG_MAN is not set -CONFIG_MICROCOM=y -CONFIG_MOUNTPOINT=y -CONFIG_MT=y -# CONFIG_RAIDAUTORUN is not set -# CONFIG_READAHEAD is not set -# CONFIG_RFKILL is not set -CONFIG_RUNLEVEL=y -# CONFIG_RX is not set -CONFIG_SETSID=y -CONFIG_STRINGS=y -# CONFIG_TASKSET is not set -# CONFIG_FEATURE_TASKSET_FANCY is not set -CONFIG_TIME=y -# CONFIG_TIMEOUT is not set -# CONFIG_TTYSIZE is not set -# CONFIG_VOLNAME is not set -# CONFIG_WALL is not set -CONFIG_WATCHDOG=y - -# -# Networking Utilities -# -# CONFIG_NBDCLIENT is not set -# CONFIG_NC is not set -# CONFIG_NC_SERVER is not set -# CONFIG_NC_EXTRA is not set -# CONFIG_NC_110_COMPAT is not set -# CONFIG_FEATURE_IPV6 is not set -# CONFIG_FEATURE_UNIX_LOCAL is not set -# CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set -# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set -# CONFIG_ARP is not set -CONFIG_ARPING=y -# CONFIG_BRCTL is not set -# CONFIG_FEATURE_BRCTL_FANCY is not set -# CONFIG_FEATURE_BRCTL_SHOW is not set -CONFIG_DNSD=y -CONFIG_ETHER_WAKE=y -# CONFIG_FAKEIDENTD is not set -# CONFIG_FTPD is not set -# CONFIG_FEATURE_FTP_WRITE is not set -# CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set -# CONFIG_FTPGET is not set -# CONFIG_FTPPUT is not set -# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set -CONFIG_HOSTNAME=y -# CONFIG_HTTPD is not set -# CONFIG_FEATURE_HTTPD_RANGES is not set -# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set -# CONFIG_FEATURE_HTTPD_SETUID is not set -# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set -# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set -# CONFIG_FEATURE_HTTPD_CGI is not set -# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set -# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set -# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set -# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set -# CONFIG_FEATURE_HTTPD_PROXY is not set -# CONFIG_FEATURE_HTTPD_GZIP is not set -CONFIG_IFCONFIG=y -CONFIG_FEATURE_IFCONFIG_STATUS=y -CONFIG_FEATURE_IFCONFIG_SLIP=y -CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y -CONFIG_FEATURE_IFCONFIG_HW=y -# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set -# CONFIG_IFENSLAVE is not set -# CONFIG_IFPLUGD is not set -CONFIG_IFUPDOWN=y -CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate" -CONFIG_FEATURE_IFUPDOWN_IP=y -# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set -# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set -CONFIG_FEATURE_IFUPDOWN_IPV4=y -# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set -CONFIG_FEATURE_IFUPDOWN_MAPPING=y -# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set -CONFIG_INETD=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y -# CONFIG_FEATURE_INETD_RPC is not set -CONFIG_IP=y -CONFIG_FEATURE_IP_ADDRESS=y -CONFIG_FEATURE_IP_LINK=y -CONFIG_FEATURE_IP_ROUTE=y -CONFIG_FEATURE_IP_TUNNEL=y -CONFIG_FEATURE_IP_RULE=y -CONFIG_FEATURE_IP_SHORT_FORMS=y -# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set -CONFIG_IPADDR=y -CONFIG_IPLINK=y -CONFIG_IPROUTE=y -CONFIG_IPTUNNEL=y -CONFIG_IPRULE=y -# CONFIG_IPCALC is not set -# CONFIG_FEATURE_IPCALC_FANCY is not set -# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set -CONFIG_NAMEIF=y -# CONFIG_FEATURE_NAMEIF_EXTENDED is not set -CONFIG_NETSTAT=y -# CONFIG_FEATURE_NETSTAT_WIDE is not set -# CONFIG_FEATURE_NETSTAT_PRG is not set -CONFIG_NSLOOKUP=y -# CONFIG_NTPD is not set -# CONFIG_FEATURE_NTPD_SERVER is not set -CONFIG_PING=y -# CONFIG_PING6 is not set -CONFIG_FEATURE_FANCY_PING=y -# CONFIG_PSCAN is not set -CONFIG_ROUTE=y -# CONFIG_SLATTACH is not set -# CONFIG_TCPSVD is not set -CONFIG_TELNET=y -CONFIG_FEATURE_TELNET_TTYPE=y -CONFIG_FEATURE_TELNET_AUTOLOGIN=y -# CONFIG_TELNETD is not set -# CONFIG_FEATURE_TELNETD_STANDALONE is not set -# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set -CONFIG_TFTP=y -# CONFIG_TFTPD is not set - -# -# Common options for tftp/tftpd -# -CONFIG_FEATURE_TFTP_GET=y -CONFIG_FEATURE_TFTP_PUT=y -CONFIG_FEATURE_TFTP_BLOCKSIZE=y -# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set -# CONFIG_TFTP_DEBUG is not set -CONFIG_TRACEROUTE=y -# CONFIG_TRACEROUTE6 is not set -# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set -# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set -# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set -# CONFIG_TUNCTL is not set -# CONFIG_FEATURE_TUNCTL_UG is not set -# CONFIG_UDHCPD is not set -# CONFIG_DHCPRELAY is not set -# CONFIG_DUMPLEASES is not set -# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set -CONFIG_DHCPD_LEASES_FILE="" -CONFIG_UDHCPC=y -CONFIG_FEATURE_UDHCPC_ARPING=y -# CONFIG_FEATURE_UDHCP_PORT is not set -CONFIG_UDHCP_DEBUG=0 -# CONFIG_FEATURE_UDHCP_RFC3397 is not set -CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script" -CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 -CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n" -# CONFIG_UDPSVD is not set -CONFIG_VCONFIG=y -CONFIG_WGET=y -CONFIG_FEATURE_WGET_STATUSBAR=y -CONFIG_FEATURE_WGET_AUTHENTICATION=y -CONFIG_FEATURE_WGET_LONG_OPTIONS=y -CONFIG_FEATURE_WGET_TIMEOUT=y -# CONFIG_ZCIP is not set - -# -# Print Utilities -# -# CONFIG_LPD is not set -# CONFIG_LPR is not set -# CONFIG_LPQ is not set - -# -# Mail Utilities -# -# CONFIG_MAKEMIME is not set -CONFIG_FEATURE_MIME_CHARSET="" -# CONFIG_POPMAILDIR is not set -# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set -# CONFIG_REFORMIME is not set -# CONFIG_FEATURE_REFORMIME_COMPAT is not set -# CONFIG_SENDMAIL is not set - -# -# Process Utilities -# -# CONFIG_IOSTAT is not set -# CONFIG_MPSTAT is not set -# CONFIG_PMAP is not set -# CONFIG_POWERTOP is not set -# CONFIG_SMEMCAP is not set -CONFIG_FREE=y -CONFIG_FUSER=y -CONFIG_KILL=y -CONFIG_KILLALL=y -CONFIG_KILLALL5=y -# CONFIG_NMETER is not set -# CONFIG_PGREP is not set -CONFIG_PIDOF=y -CONFIG_FEATURE_PIDOF_SINGLE=y -CONFIG_FEATURE_PIDOF_OMIT=y -# CONFIG_PKILL is not set -CONFIG_PS=y -CONFIG_FEATURE_PS_WIDE=y -# CONFIG_FEATURE_PS_TIME is not set -# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set -# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set -CONFIG_RENICE=y -CONFIG_BB_SYSCTL=y -CONFIG_TOP=y -CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y -CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y -# CONFIG_FEATURE_TOP_SMP_CPU is not set -# CONFIG_FEATURE_TOP_DECIMALS is not set -# CONFIG_FEATURE_TOP_SMP_PROCESS is not set -# CONFIG_FEATURE_TOPMEM is not set -# CONFIG_FEATURE_SHOW_THREADS is not set -CONFIG_UPTIME=y -CONFIG_WATCH=y - -# -# Runit Utilities -# -# CONFIG_RUNSV is not set -# CONFIG_RUNSVDIR is not set -# CONFIG_FEATURE_RUNSVDIR_LOG is not set -# CONFIG_SV is not set -CONFIG_SV_DEFAULT_SERVICE_DIR="" -# CONFIG_SVLOGD is not set -# CONFIG_CHPST is not set -# CONFIG_SETUIDGID is not set -# CONFIG_ENVUIDGID is not set -# CONFIG_ENVDIR is not set -# CONFIG_SOFTLIMIT is not set -# CONFIG_CHCON is not set -# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set -# CONFIG_GETENFORCE is not set -# CONFIG_GETSEBOOL is not set -# CONFIG_LOAD_POLICY is not set -# CONFIG_MATCHPATHCON is not set -# CONFIG_RESTORECON is not set -# CONFIG_RUNCON is not set -# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set -# CONFIG_SELINUXENABLED is not set -# CONFIG_SETENFORCE is not set -# CONFIG_SETFILES is not set -# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set -# CONFIG_SETSEBOOL is not set -# CONFIG_SESTATUS is not set - -# -# Shells -# -CONFIG_ASH=y -CONFIG_ASH_BASH_COMPAT=y -CONFIG_ASH_JOB_CONTROL=y -CONFIG_ASH_ALIAS=y -# CONFIG_ASH_GETOPTS is not set -CONFIG_ASH_BUILTIN_ECHO=y -CONFIG_ASH_BUILTIN_PRINTF=y -CONFIG_ASH_BUILTIN_TEST=y -CONFIG_ASH_CMDCMD=y -# CONFIG_ASH_MAIL is not set -CONFIG_ASH_OPTIMIZE_FOR_SIZE=y -CONFIG_ASH_RANDOM_SUPPORT=y -CONFIG_ASH_EXPAND_PRMT=y -# CONFIG_CTTYHACK is not set -# CONFIG_HUSH is not set -# CONFIG_HUSH_BASH_COMPAT is not set -# CONFIG_HUSH_BRACE_EXPANSION is not set -# CONFIG_HUSH_HELP is not set -# CONFIG_HUSH_INTERACTIVE is not set -# CONFIG_HUSH_SAVEHISTORY is not set -# CONFIG_HUSH_JOB is not set -# CONFIG_HUSH_TICK is not set -# CONFIG_HUSH_IF is not set -# CONFIG_HUSH_LOOPS is not set -# CONFIG_HUSH_CASE is not set -# CONFIG_HUSH_FUNCTIONS is not set -# CONFIG_HUSH_LOCAL is not set -# CONFIG_HUSH_RANDOM_SUPPORT is not set -# CONFIG_HUSH_EXPORT_N is not set -# CONFIG_HUSH_MODE_X is not set -# CONFIG_MSH is not set -CONFIG_FEATURE_SH_IS_ASH=y -# CONFIG_FEATURE_SH_IS_HUSH is not set -# CONFIG_FEATURE_SH_IS_NONE is not set -# CONFIG_FEATURE_BASH_IS_ASH is not set -# CONFIG_FEATURE_BASH_IS_HUSH is not set -CONFIG_FEATURE_BASH_IS_NONE=y -CONFIG_SH_MATH_SUPPORT=y -# CONFIG_SH_MATH_SUPPORT_64 is not set -CONFIG_FEATURE_SH_EXTRA_QUIET=y -# CONFIG_FEATURE_SH_STANDALONE is not set -# CONFIG_FEATURE_SH_NOFORK is not set - -# -# System Logging Utilities -# -CONFIG_SYSLOGD=y -CONFIG_FEATURE_ROTATE_LOGFILE=y -CONFIG_FEATURE_REMOTE_LOG=y -# CONFIG_FEATURE_SYSLOGD_DUP is not set -CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256 -# CONFIG_FEATURE_IPC_SYSLOG is not set -CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0 -# CONFIG_LOGREAD is not set -# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set -CONFIG_KLOGD=y -CONFIG_FEATURE_KLOGD_KLOGCTL=y -CONFIG_LOGGER=y diff --git a/package/busybox/busybox-1.19.x.config b/package/busybox/busybox-1.19.x.config new file mode 100644 index 0000000000..bf5e8df765 --- /dev/null +++ b/package/busybox/busybox-1.19.x.config @@ -0,0 +1,1013 @@ +# +# Automatically generated make config: don't edit +# Busybox version: 1.19.0 +# Tue Aug 23 11:28:35 2011 +# +CONFIG_HAVE_DOT_CONFIG=y + +# +# Busybox Settings +# + +# +# General Configuration +# +CONFIG_DESKTOP=y +# CONFIG_EXTRA_COMPAT is not set +CONFIG_INCLUDE_SUSv2=y +# CONFIG_USE_PORTABLE_CODE is not set +CONFIG_PLATFORM_LINUX=y +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_SHOW_USAGE=y +CONFIG_FEATURE_VERBOSE_USAGE=y +# CONFIG_FEATURE_COMPRESS_USAGE is not set +CONFIG_FEATURE_INSTALLER=y +# CONFIG_INSTALL_NO_USR is not set +# CONFIG_LOCALE_SUPPORT is not set +# CONFIG_UNICODE_SUPPORT is not set +# CONFIG_UNICODE_USING_LOCALE is not set +# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set +CONFIG_SUBST_WCHAR=0 +CONFIG_LAST_SUPPORTED_WCHAR=0 +# CONFIG_UNICODE_COMBINING_WCHARS is not set +# CONFIG_UNICODE_WIDE_WCHARS is not set +# CONFIG_UNICODE_BIDI_SUPPORT is not set +# CONFIG_UNICODE_NEUTRAL_TABLE is not set +# CONFIG_UNICODE_PRESERVE_BROKEN is not set +CONFIG_LONG_OPTS=y +CONFIG_FEATURE_DEVPTS=y +CONFIG_FEATURE_CLEAN_UP=y +CONFIG_FEATURE_UTMP=y +CONFIG_FEATURE_WTMP=y +# CONFIG_FEATURE_PIDFILE is not set +CONFIG_FEATURE_SUID=y +# CONFIG_FEATURE_SUID_CONFIG is not set +# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set +# CONFIG_SELINUX is not set +# CONFIG_FEATURE_PREFER_APPLETS is not set +CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" +CONFIG_FEATURE_SYSLOG=y +# CONFIG_FEATURE_HAVE_RPC is not set + +# +# Build Options +# +# CONFIG_STATIC is not set +# CONFIG_PIE is not set +# CONFIG_NOMMU is not set +# CONFIG_BUILD_LIBBUSYBOX is not set +# CONFIG_FEATURE_INDIVIDUAL is not set +# CONFIG_FEATURE_SHARED_BUSYBOX is not set +# CONFIG_LFS is not set +CONFIG_CROSS_COMPILER_PREFIX="" +CONFIG_EXTRA_CFLAGS="" + +# +# Debugging Options +# +# CONFIG_DEBUG is not set +# CONFIG_DEBUG_PESSIMIZE is not set +# CONFIG_WERROR is not set +CONFIG_NO_DEBUG_LIB=y +# CONFIG_DMALLOC is not set +# CONFIG_EFENCE is not set + +# +# Installation Options ("make install" behavior) +# +CONFIG_INSTALL_APPLET_SYMLINKS=y +# CONFIG_INSTALL_APPLET_HARDLINKS is not set +# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set +# CONFIG_INSTALL_APPLET_DONT is not set +# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set +# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set +# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set +CONFIG_PREFIX="./_install" + +# +# Busybox Library Tuning +# +# CONFIG_FEATURE_SYSTEMD is not set +CONFIG_FEATURE_RTMINMAX=y +CONFIG_PASSWORD_MINLEN=6 +CONFIG_MD5_SIZE_VS_SPEED=2 +# CONFIG_FEATURE_FAST_TOP is not set +# CONFIG_FEATURE_ETC_NETWORKS is not set +CONFIG_FEATURE_USE_TERMIOS=y +CONFIG_FEATURE_EDITING=y +CONFIG_FEATURE_EDITING_MAX_LEN=1024 +CONFIG_FEATURE_EDITING_VI=y +CONFIG_FEATURE_EDITING_HISTORY=999 +CONFIG_FEATURE_EDITING_SAVEHISTORY=y +CONFIG_FEATURE_REVERSE_SEARCH=y +CONFIG_FEATURE_TAB_COMPLETION=y +# CONFIG_FEATURE_USERNAME_COMPLETION is not set +CONFIG_FEATURE_EDITING_FANCY_PROMPT=y +# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set +CONFIG_FEATURE_NON_POSIX_CP=y +# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set +CONFIG_FEATURE_COPYBUF_KB=4 +CONFIG_FEATURE_SKIP_ROOTFS=y +CONFIG_MONOTONIC_SYSCALL=y +CONFIG_IOCTL_HEX2STR_ERROR=y +CONFIG_FEATURE_HWIB=y + +# +# Applets +# + +# +# Archival Utilities +# +# CONFIG_FEATURE_SEAMLESS_XZ is not set +# CONFIG_FEATURE_SEAMLESS_LZMA is not set +# CONFIG_FEATURE_SEAMLESS_BZ2 is not set +# CONFIG_FEATURE_SEAMLESS_GZ is not set +# CONFIG_FEATURE_SEAMLESS_Z is not set +CONFIG_AR=y +# CONFIG_FEATURE_AR_LONG_FILENAMES is not set +CONFIG_FEATURE_AR_CREATE=y +CONFIG_BUNZIP2=y +# CONFIG_BZIP2 is not set +CONFIG_CPIO=y +# CONFIG_FEATURE_CPIO_O is not set +# CONFIG_FEATURE_CPIO_P is not set +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set +CONFIG_GUNZIP=y +CONFIG_GZIP=y +# CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set +# CONFIG_LZOP is not set +# CONFIG_LZOP_COMPR_HIGH is not set +# CONFIG_RPM2CPIO is not set +# CONFIG_RPM is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +# CONFIG_FEATURE_TAR_AUTODETECT is not set +CONFIG_FEATURE_TAR_FROM=y +# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set +# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +CONFIG_FEATURE_TAR_LONG_OPTIONS=y +CONFIG_FEATURE_TAR_TO_COMMAND=y +# CONFIG_FEATURE_TAR_UNAME_GNAME is not set +# CONFIG_FEATURE_TAR_NOPRESERVE_TIME is not set +# CONFIG_FEATURE_TAR_SELINUX is not set +# CONFIG_UNCOMPRESS is not set +CONFIG_UNLZMA=y +# CONFIG_FEATURE_LZMA_FAST is not set +CONFIG_LZMA=y +CONFIG_UNXZ=y +CONFIG_XZ=y +CONFIG_UNZIP=y + +# +# Coreutils +# +CONFIG_BASENAME=y +CONFIG_CAT=y +CONFIG_DATE=y +CONFIG_FEATURE_DATE_ISOFMT=y +# CONFIG_FEATURE_DATE_NANO is not set +CONFIG_FEATURE_DATE_COMPAT=y +CONFIG_ID=y +# CONFIG_GROUPS is not set +CONFIG_TEST=y +CONFIG_FEATURE_TEST_64=y +CONFIG_TOUCH=y +CONFIG_TR=y +CONFIG_FEATURE_TR_CLASSES=y +CONFIG_FEATURE_TR_EQUIV=y +# CONFIG_BASE64 is not set +CONFIG_WHO=y +# CONFIG_USERS is not set +# CONFIG_CAL is not set +CONFIG_CATV=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +# CONFIG_FEATURE_CHOWN_LONG_OPTIONS is not set +CONFIG_CHROOT=y +CONFIG_CKSUM=y +# CONFIG_COMM is not set +CONFIG_CP=y +# CONFIG_FEATURE_CP_LONG_OPTIONS is not set +CONFIG_CUT=y +CONFIG_DD=y +CONFIG_FEATURE_DD_SIGNAL_HANDLING=y +# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set +CONFIG_FEATURE_DD_IBS_OBS=y +CONFIG_DF=y +# CONFIG_FEATURE_DF_FANCY is not set +CONFIG_DIRNAME=y +CONFIG_DOS2UNIX=y +CONFIG_UNIX2DOS=y +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set +# CONFIG_EXPAND is not set +# CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set +CONFIG_EXPR=y +CONFIG_EXPR_MATH_SUPPORT_64=y +CONFIG_FALSE=y +CONFIG_FOLD=y +# CONFIG_FSYNC is not set +CONFIG_HEAD=y +CONFIG_FEATURE_FANCY_HEAD=y +CONFIG_HOSTID=y +CONFIG_INSTALL=y +CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y +CONFIG_LN=y +CONFIG_LOGNAME=y +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +CONFIG_FEATURE_MV_LONG_OPTIONS=y +CONFIG_NICE=y +CONFIG_NOHUP=y +CONFIG_OD=y +CONFIG_PRINTENV=y +CONFIG_PRINTF=y +CONFIG_PWD=y +CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y +CONFIG_REALPATH=y +CONFIG_RM=y +CONFIG_RMDIR=y +# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set +CONFIG_SEQ=y +CONFIG_SHA1SUM=y +CONFIG_SHA256SUM=y +CONFIG_SHA512SUM=y +CONFIG_SLEEP=y +# CONFIG_FEATURE_FANCY_SLEEP is not set +# CONFIG_FEATURE_FLOAT_SLEEP is not set +CONFIG_SORT=y +CONFIG_FEATURE_SORT_BIG=y +# CONFIG_SPLIT is not set +# CONFIG_FEATURE_SPLIT_FANCY is not set +# CONFIG_STAT is not set +# CONFIG_FEATURE_STAT_FORMAT is not set +CONFIG_STTY=y +# CONFIG_SUM is not set +CONFIG_SYNC=y +# CONFIG_TAC is not set +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +CONFIG_FEATURE_TEE_USE_BLOCK_IO=y +CONFIG_TRUE=y +CONFIG_TTY=y +CONFIG_UNAME=y +# CONFIG_UNEXPAND is not set +# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set +CONFIG_UNIQ=y +CONFIG_USLEEP=y +CONFIG_UUDECODE=y +CONFIG_UUENCODE=y +CONFIG_WC=y +# CONFIG_FEATURE_WC_LARGE is not set +CONFIG_WHOAMI=y +CONFIG_YES=y + +# +# Common options for cp and mv +# +CONFIG_FEATURE_PRESERVE_HARDLINKS=y + +# +# Common options for ls, more and telnet +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum, sha256sum, sha512sum +# +CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y + +# +# Console Utilities +# +CONFIG_CHVT=y +# CONFIG_FGCONSOLE is not set +CONFIG_CLEAR=y +CONFIG_DEALLOCVT=y +CONFIG_DUMPKMAP=y +# CONFIG_KBD_MODE is not set +CONFIG_LOADFONT=y +CONFIG_LOADKMAP=y +CONFIG_OPENVT=y +CONFIG_RESET=y +CONFIG_RESIZE=y +CONFIG_FEATURE_RESIZE_PRINT=y +CONFIG_SETCONSOLE=y +# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set +# CONFIG_SETFONT is not set +# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set +CONFIG_DEFAULT_SETFONT_DIR="" +CONFIG_SETKEYCODES=y +CONFIG_SETLOGCONS=y +# CONFIG_SHOWKEY is not set + +# +# Common options for loadfont and setfont +# +CONFIG_FEATURE_LOADFONT_PSF2=y +CONFIG_FEATURE_LOADFONT_RAW=y + +# +# Debian Utilities +# +CONFIG_MKTEMP=y +CONFIG_PIPE_PROGRESS=y +CONFIG_RUN_PARTS=y +CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y +# CONFIG_FEATURE_RUN_PARTS_FANCY is not set +CONFIG_START_STOP_DAEMON=y +CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y +CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_PATCH=y +CONFIG_VI=y +CONFIG_FEATURE_VI_MAX_LEN=4096 +CONFIG_FEATURE_VI_8BIT=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +# CONFIG_FEATURE_VI_REGEX_SEARCH is not set +CONFIG_FEATURE_VI_USE_SIGNALS=y +CONFIG_FEATURE_VI_DOT_CMD=y +CONFIG_FEATURE_VI_READONLY=y +CONFIG_FEATURE_VI_SETOPTS=y +CONFIG_FEATURE_VI_SET=y +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_ASK_TERMINAL=y +CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y +CONFIG_AWK=y +# CONFIG_FEATURE_AWK_LIBM is not set +CONFIG_CMP=y +CONFIG_DIFF=y +# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set +CONFIG_FEATURE_DIFF_DIR=y +# CONFIG_ED is not set +CONFIG_SED=y +CONFIG_FEATURE_ALLOW_EXEC=y + +# +# Finding Utilities +# +CONFIG_FIND=y +CONFIG_FEATURE_FIND_PRINT0=y +CONFIG_FEATURE_FIND_MTIME=y +CONFIG_FEATURE_FIND_MMIN=y +CONFIG_FEATURE_FIND_PERM=y +CONFIG_FEATURE_FIND_TYPE=y +CONFIG_FEATURE_FIND_XDEV=y +CONFIG_FEATURE_FIND_MAXDEPTH=y +CONFIG_FEATURE_FIND_NEWER=y +# CONFIG_FEATURE_FIND_INUM is not set +CONFIG_FEATURE_FIND_EXEC=y +CONFIG_FEATURE_FIND_USER=y +CONFIG_FEATURE_FIND_GROUP=y +CONFIG_FEATURE_FIND_NOT=y +CONFIG_FEATURE_FIND_DEPTH=y +CONFIG_FEATURE_FIND_PAREN=y +CONFIG_FEATURE_FIND_SIZE=y +CONFIG_FEATURE_FIND_PRUNE=y +# CONFIG_FEATURE_FIND_DELETE is not set +CONFIG_FEATURE_FIND_PATH=y +CONFIG_FEATURE_FIND_REGEX=y +# CONFIG_FEATURE_FIND_CONTEXT is not set +# CONFIG_FEATURE_FIND_LINKS is not set +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set +CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y +CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y +CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y + +# +# Init Utilities +# +# CONFIG_BOOTCHARTD is not set +# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set +# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set +CONFIG_HALT=y +# CONFIG_FEATURE_CALL_TELINIT is not set +CONFIG_TELINIT_PATH="" +CONFIG_INIT=y +CONFIG_FEATURE_USE_INITTAB=y +CONFIG_FEATURE_KILL_REMOVED=y +CONFIG_FEATURE_KILL_DELAY=0 +CONFIG_FEATURE_INIT_SCTTY=y +CONFIG_FEATURE_INIT_SYSLOG=y +CONFIG_FEATURE_EXTRA_QUIET=y +# CONFIG_FEATURE_INIT_COREDUMPS is not set +CONFIG_FEATURE_INITRD=y +CONFIG_INIT_TERMINAL_TYPE="linux" +CONFIG_MESG=y +CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y + +# +# Login/Password Management Utilities +# +# CONFIG_ADD_SHELL is not set +# CONFIG_REMOVE_SHELL is not set +CONFIG_FEATURE_SHADOWPASSWDS=y +# CONFIG_USE_BB_PWD_GRP is not set +# CONFIG_USE_BB_SHADOW is not set +CONFIG_USE_BB_CRYPT=y +# CONFIG_USE_BB_CRYPT_SHA is not set +CONFIG_ADDUSER=y +# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set +# CONFIG_FEATURE_CHECK_NAMES is not set +CONFIG_FIRST_SYSTEM_ID=100 +CONFIG_LAST_SYSTEM_ID=999 +CONFIG_ADDGROUP=y +# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set +# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set +CONFIG_DELUSER=y +CONFIG_DELGROUP=y +# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set +CONFIG_GETTY=y +CONFIG_LOGIN=y +# CONFIG_PAM is not set +# CONFIG_LOGIN_SCRIPTS is not set +CONFIG_FEATURE_NOLOGIN=y +CONFIG_FEATURE_SECURETTY=y +CONFIG_PASSWD=y +CONFIG_FEATURE_PASSWD_WEAK_CHECK=y +# CONFIG_CRYPTPW is not set +# CONFIG_CHPASSWD is not set +CONFIG_SU=y +CONFIG_FEATURE_SU_SYSLOG=y +CONFIG_FEATURE_SU_CHECKS_SHELLS=y +CONFIG_SULOGIN=y +CONFIG_VLOCK=y + +# +# Linux Ext2 FS Progs +# +CONFIG_CHATTR=y +CONFIG_FSCK=y +CONFIG_LSATTR=y +# CONFIG_TUNE2FS is not set + +# +# Linux Module Utilities +# +# CONFIG_MODINFO is not set +# CONFIG_MODPROBE_SMALL is not set +# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set +# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set +CONFIG_INSMOD=y +CONFIG_RMMOD=y +CONFIG_LSMOD=y +CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y +CONFIG_MODPROBE=y +# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set +# CONFIG_DEPMOD is not set + +# +# Options common to multiple modutils +# +# CONFIG_FEATURE_2_4_MODULES is not set +# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set +# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set +# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set +# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set +CONFIG_FEATURE_CHECK_TAINTED_MODULE=y +CONFIG_FEATURE_MODUTILS_ALIAS=y +CONFIG_FEATURE_MODUTILS_SYMBOLS=y +CONFIG_DEFAULT_MODULES_DIR="/lib/modules" +CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" + +# +# Linux System Utilities +# +# CONFIG_BLOCKDEV is not set +# CONFIG_REV is not set +# CONFIG_ACPID is not set +# CONFIG_FEATURE_ACPID_COMPAT is not set +CONFIG_BLKID=y +# CONFIG_FEATURE_BLKID_TYPE is not set +CONFIG_DMESG=y +CONFIG_FEATURE_DMESG_PRETTY=y +# CONFIG_FBSET is not set +# CONFIG_FEATURE_FBSET_FANCY is not set +# CONFIG_FEATURE_FBSET_READMODE is not set +CONFIG_FDFLUSH=y +CONFIG_FDFORMAT=y +# CONFIG_FDISK is not set +# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set +# CONFIG_FEATURE_FDISK_WRITABLE is not set +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_GPT_LABEL is not set +# CONFIG_FEATURE_FDISK_ADVANCED is not set +# CONFIG_FINDFS is not set +# CONFIG_FLOCK is not set +CONFIG_FREERAMDISK=y +# CONFIG_FSCK_MINIX is not set +# CONFIG_MKFS_EXT2 is not set +# CONFIG_MKFS_MINIX is not set +# CONFIG_FEATURE_MINIX2 is not set +# CONFIG_MKFS_REISER is not set +# CONFIG_MKFS_VFAT is not set +CONFIG_GETOPT=y +CONFIG_FEATURE_GETOPT_LONG=y +CONFIG_HEXDUMP=y +# CONFIG_FEATURE_HEXDUMP_REVERSE is not set +# CONFIG_HD is not set +CONFIG_HWCLOCK=y +CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y +CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y +CONFIG_IPCRM=y +CONFIG_IPCS=y +CONFIG_LOSETUP=y +CONFIG_LSPCI=y +CONFIG_LSUSB=y +CONFIG_MDEV=y +CONFIG_FEATURE_MDEV_CONF=y +CONFIG_FEATURE_MDEV_RENAME=y +# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set +CONFIG_FEATURE_MDEV_EXEC=y +# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set +CONFIG_MKSWAP=y +# CONFIG_FEATURE_MKSWAP_UUID is not set +CONFIG_MORE=y +CONFIG_MOUNT=y +# CONFIG_FEATURE_MOUNT_FAKE is not set +# CONFIG_FEATURE_MOUNT_VERBOSE is not set +# CONFIG_FEATURE_MOUNT_HELPERS is not set +# CONFIG_FEATURE_MOUNT_LABEL is not set +# CONFIG_FEATURE_MOUNT_NFS is not set +CONFIG_FEATURE_MOUNT_CIFS=y +CONFIG_FEATURE_MOUNT_FLAGS=y +CONFIG_FEATURE_MOUNT_FSTAB=y +CONFIG_PIVOT_ROOT=y +CONFIG_RDATE=y +# CONFIG_RDEV is not set +CONFIG_READPROFILE=y +# CONFIG_RTCWAKE is not set +# CONFIG_SCRIPT is not set +# CONFIG_SCRIPTREPLAY is not set +CONFIG_SETARCH=y +CONFIG_SWAPONOFF=y +# CONFIG_FEATURE_SWAPON_PRI is not set +CONFIG_SWITCH_ROOT=y +CONFIG_UMOUNT=y +CONFIG_FEATURE_UMOUNT_ALL=y + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +CONFIG_FEATURE_MOUNT_LOOP_CREATE=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set +CONFIG_VOLUMEID=y + +# +# Filesystem/Volume identification +# +# CONFIG_FEATURE_VOLUMEID_EXT is not set +# CONFIG_FEATURE_VOLUMEID_BTRFS is not set +# CONFIG_FEATURE_VOLUMEID_REISERFS is not set +# CONFIG_FEATURE_VOLUMEID_FAT is not set +# CONFIG_FEATURE_VOLUMEID_HFS is not set +# CONFIG_FEATURE_VOLUMEID_JFS is not set +# CONFIG_FEATURE_VOLUMEID_XFS is not set +# CONFIG_FEATURE_VOLUMEID_NTFS is not set +# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set +# CONFIG_FEATURE_VOLUMEID_UDF is not set +# CONFIG_FEATURE_VOLUMEID_LUKS is not set +# CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set +# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set +# CONFIG_FEATURE_VOLUMEID_ROMFS is not set +# CONFIG_FEATURE_VOLUMEID_SYSV is not set +# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set +# CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set + +# +# Miscellaneous Utilities +# +# CONFIG_CONSPY is not set +CONFIG_LESS=y +CONFIG_FEATURE_LESS_MAXLINES=9999999 +CONFIG_FEATURE_LESS_BRACKETS=y +CONFIG_FEATURE_LESS_FLAGS=y +# CONFIG_FEATURE_LESS_MARKS is not set +CONFIG_FEATURE_LESS_REGEXP=y +# CONFIG_FEATURE_LESS_WINCH is not set +# CONFIG_FEATURE_LESS_ASK_TERMINAL is not set +# CONFIG_FEATURE_LESS_DASHCMD is not set +# CONFIG_FEATURE_LESS_LINENUMS is not set +# CONFIG_NANDWRITE is not set +# CONFIG_NANDDUMP is not set +CONFIG_SETSERIAL=y +# CONFIG_UBIATTACH is not set +# CONFIG_UBIDETACH is not set +# CONFIG_UBIMKVOL is not set +# CONFIG_UBIRMVOL is not set +# CONFIG_UBIRSVOL is not set +# CONFIG_UBIUPDATEVOL is not set +# CONFIG_ADJTIMEX is not set +# CONFIG_BBCONFIG is not set +# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set +# CONFIG_BEEP is not set +CONFIG_FEATURE_BEEP_FREQ=0 +CONFIG_FEATURE_BEEP_LENGTH_MS=0 +# CONFIG_CHAT is not set +# CONFIG_FEATURE_CHAT_NOFAIL is not set +# CONFIG_FEATURE_CHAT_TTY_HIFI is not set +# CONFIG_FEATURE_CHAT_IMPLICIT_CR is not set +# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set +# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set +# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set +# CONFIG_FEATURE_CHAT_CLR_ABORT is not set +CONFIG_CHRT=y +CONFIG_CROND=y +# CONFIG_FEATURE_CROND_D is not set +# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set +CONFIG_FEATURE_CROND_DIR="/var/spool/cron" +CONFIG_CRONTAB=y +CONFIG_DC=y +# CONFIG_FEATURE_DC_LIBM is not set +# CONFIG_DEVFSD is not set +# CONFIG_DEVFSD_MODLOAD is not set +# CONFIG_DEVFSD_FG_NP is not set +# CONFIG_DEVFSD_VERBOSE is not set +# CONFIG_FEATURE_DEVFS is not set +CONFIG_DEVMEM=y +CONFIG_EJECT=y +# CONFIG_FEATURE_EJECT_SCSI is not set +# CONFIG_FBSPLASH is not set +# CONFIG_FLASHCP is not set +# CONFIG_FLASH_LOCK is not set +# CONFIG_FLASH_UNLOCK is not set +# CONFIG_FLASH_ERASEALL is not set +# CONFIG_IONICE is not set +# CONFIG_INOTIFYD is not set +CONFIG_LAST=y +CONFIG_FEATURE_LAST_SMALL=y +# CONFIG_FEATURE_LAST_FANCY is not set +CONFIG_HDPARM=y +CONFIG_FEATURE_HDPARM_GET_IDENTITY=y +# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set +# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set +CONFIG_MAKEDEVS=y +# CONFIG_FEATURE_MAKEDEVS_LEAF is not set +CONFIG_FEATURE_MAKEDEVS_TABLE=y +# CONFIG_MAN is not set +CONFIG_MICROCOM=y +CONFIG_MOUNTPOINT=y +CONFIG_MT=y +# CONFIG_RAIDAUTORUN is not set +# CONFIG_READAHEAD is not set +# CONFIG_RFKILL is not set +CONFIG_RUNLEVEL=y +# CONFIG_RX is not set +CONFIG_SETSID=y +CONFIG_STRINGS=y +# CONFIG_TASKSET is not set +# CONFIG_FEATURE_TASKSET_FANCY is not set +CONFIG_TIME=y +# CONFIG_TIMEOUT is not set +# CONFIG_TTYSIZE is not set +# CONFIG_VOLNAME is not set +# CONFIG_WALL is not set +CONFIG_WATCHDOG=y + +# +# Networking Utilities +# +CONFIG_NAMEIF=y +# CONFIG_FEATURE_NAMEIF_EXTENDED is not set +# CONFIG_NBDCLIENT is not set +# CONFIG_NC is not set +# CONFIG_NC_SERVER is not set +# CONFIG_NC_EXTRA is not set +# CONFIG_NC_110_COMPAT is not set +CONFIG_PING=y +# CONFIG_PING6 is not set +CONFIG_FEATURE_FANCY_PING=y +# CONFIG_WHOIS is not set +# CONFIG_FEATURE_IPV6 is not set +# CONFIG_FEATURE_UNIX_LOCAL is not set +# CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set +# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set +# CONFIG_ARP is not set +CONFIG_ARPING=y +# CONFIG_BRCTL is not set +# CONFIG_FEATURE_BRCTL_FANCY is not set +# CONFIG_FEATURE_BRCTL_SHOW is not set +CONFIG_DNSD=y +CONFIG_ETHER_WAKE=y +# CONFIG_FAKEIDENTD is not set +# CONFIG_FTPD is not set +# CONFIG_FEATURE_FTP_WRITE is not set +# CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set +CONFIG_HOSTNAME=y +# CONFIG_HTTPD is not set +# CONFIG_FEATURE_HTTPD_RANGES is not set +# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set +# CONFIG_FEATURE_HTTPD_SETUID is not set +# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set +# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set +# CONFIG_FEATURE_HTTPD_CGI is not set +# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set +# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set +# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set +# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set +# CONFIG_FEATURE_HTTPD_PROXY is not set +# CONFIG_FEATURE_HTTPD_GZIP is not set +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +CONFIG_FEATURE_IFCONFIG_SLIP=y +CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y +CONFIG_FEATURE_IFCONFIG_HW=y +# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set +# CONFIG_IFENSLAVE is not set +# CONFIG_IFPLUGD is not set +CONFIG_IFUPDOWN=y +CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate" +CONFIG_FEATURE_IFUPDOWN_IP=y +# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set +# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set +CONFIG_FEATURE_IFUPDOWN_IPV4=y +# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set +CONFIG_FEATURE_IFUPDOWN_MAPPING=y +# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set +CONFIG_INETD=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y +# CONFIG_FEATURE_INETD_RPC is not set +CONFIG_IP=y +CONFIG_FEATURE_IP_ADDRESS=y +CONFIG_FEATURE_IP_LINK=y +CONFIG_FEATURE_IP_ROUTE=y +CONFIG_FEATURE_IP_TUNNEL=y +CONFIG_FEATURE_IP_RULE=y +CONFIG_FEATURE_IP_SHORT_FORMS=y +# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set +CONFIG_IPADDR=y +CONFIG_IPLINK=y +CONFIG_IPROUTE=y +CONFIG_IPTUNNEL=y +CONFIG_IPRULE=y +# CONFIG_IPCALC is not set +# CONFIG_FEATURE_IPCALC_FANCY is not set +# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set +CONFIG_NETSTAT=y +# CONFIG_FEATURE_NETSTAT_WIDE is not set +# CONFIG_FEATURE_NETSTAT_PRG is not set +CONFIG_NSLOOKUP=y +# CONFIG_NTPD is not set +# CONFIG_FEATURE_NTPD_SERVER is not set +# CONFIG_PSCAN is not set +CONFIG_ROUTE=y +# CONFIG_SLATTACH is not set +# CONFIG_TCPSVD is not set +CONFIG_TELNET=y +CONFIG_FEATURE_TELNET_TTYPE=y +CONFIG_FEATURE_TELNET_AUTOLOGIN=y +# CONFIG_TELNETD is not set +# CONFIG_FEATURE_TELNETD_STANDALONE is not set +# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set +CONFIG_TFTP=y +# CONFIG_TFTPD is not set + +# +# Common options for tftp/tftpd +# +CONFIG_FEATURE_TFTP_GET=y +CONFIG_FEATURE_TFTP_PUT=y +CONFIG_FEATURE_TFTP_BLOCKSIZE=y +# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set +# CONFIG_TFTP_DEBUG is not set +CONFIG_TRACEROUTE=y +# CONFIG_TRACEROUTE6 is not set +# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set +# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set +# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set +# CONFIG_TUNCTL is not set +# CONFIG_FEATURE_TUNCTL_UG is not set +# CONFIG_UDHCPD is not set +# CONFIG_DHCPRELAY is not set +# CONFIG_DUMPLEASES is not set +# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set +# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set +CONFIG_DHCPD_LEASES_FILE="" +CONFIG_UDHCPC=y +CONFIG_FEATURE_UDHCPC_ARPING=y +# CONFIG_FEATURE_UDHCP_PORT is not set +CONFIG_UDHCP_DEBUG=0 +# CONFIG_FEATURE_UDHCP_RFC3397 is not set +CONFIG_FEATURE_UDHCP_8021Q=y +CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script" +CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 +CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n" +# CONFIG_UDPSVD is not set +CONFIG_VCONFIG=y +CONFIG_WGET=y +CONFIG_FEATURE_WGET_STATUSBAR=y +CONFIG_FEATURE_WGET_AUTHENTICATION=y +CONFIG_FEATURE_WGET_LONG_OPTIONS=y +CONFIG_FEATURE_WGET_TIMEOUT=y +# CONFIG_ZCIP is not set + +# +# Print Utilities +# +# CONFIG_LPD is not set +# CONFIG_LPR is not set +# CONFIG_LPQ is not set + +# +# Mail Utilities +# +# CONFIG_MAKEMIME is not set +CONFIG_FEATURE_MIME_CHARSET="" +# CONFIG_POPMAILDIR is not set +# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set +# CONFIG_REFORMIME is not set +# CONFIG_FEATURE_REFORMIME_COMPAT is not set +# CONFIG_SENDMAIL is not set + +# +# Process Utilities +# +# CONFIG_IOSTAT is not set +# CONFIG_MPSTAT is not set +# CONFIG_NMETER is not set +# CONFIG_PMAP is not set +# CONFIG_POWERTOP is not set +# CONFIG_PSTREE is not set +# CONFIG_PWDX is not set +# CONFIG_SMEMCAP is not set +CONFIG_UPTIME=y +# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set +CONFIG_FREE=y +CONFIG_FUSER=y +CONFIG_KILL=y +CONFIG_KILLALL=y +CONFIG_KILLALL5=y +# CONFIG_PGREP is not set +CONFIG_PIDOF=y +CONFIG_FEATURE_PIDOF_SINGLE=y +CONFIG_FEATURE_PIDOF_OMIT=y +# CONFIG_PKILL is not set +CONFIG_PS=y +CONFIG_FEATURE_PS_WIDE=y +# CONFIG_FEATURE_PS_TIME is not set +# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set +# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set +CONFIG_RENICE=y +CONFIG_BB_SYSCTL=y +CONFIG_TOP=y +CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y +CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y +# CONFIG_FEATURE_TOP_SMP_CPU is not set +# CONFIG_FEATURE_TOP_DECIMALS is not set +# CONFIG_FEATURE_TOP_SMP_PROCESS is not set +# CONFIG_FEATURE_TOPMEM is not set +# CONFIG_FEATURE_SHOW_THREADS is not set +CONFIG_WATCH=y + +# +# Runit Utilities +# +# CONFIG_RUNSV is not set +# CONFIG_RUNSVDIR is not set +# CONFIG_FEATURE_RUNSVDIR_LOG is not set +# CONFIG_SV is not set +CONFIG_SV_DEFAULT_SERVICE_DIR="" +# CONFIG_SVLOGD is not set +# CONFIG_CHPST is not set +# CONFIG_SETUIDGID is not set +# CONFIG_ENVUIDGID is not set +# CONFIG_ENVDIR is not set +# CONFIG_SOFTLIMIT is not set +# CONFIG_CHCON is not set +# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set +# CONFIG_GETENFORCE is not set +# CONFIG_GETSEBOOL is not set +# CONFIG_LOAD_POLICY is not set +# CONFIG_MATCHPATHCON is not set +# CONFIG_RESTORECON is not set +# CONFIG_RUNCON is not set +# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set +# CONFIG_SELINUXENABLED is not set +# CONFIG_SETENFORCE is not set +# CONFIG_SETFILES is not set +# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set +# CONFIG_SETSEBOOL is not set +# CONFIG_SESTATUS is not set + +# +# Shells +# +CONFIG_ASH=y +CONFIG_ASH_BASH_COMPAT=y +CONFIG_ASH_IDLE_TIMEOUT=y +CONFIG_ASH_JOB_CONTROL=y +CONFIG_ASH_ALIAS=y +# CONFIG_ASH_GETOPTS is not set +CONFIG_ASH_BUILTIN_ECHO=y +CONFIG_ASH_BUILTIN_PRINTF=y +CONFIG_ASH_BUILTIN_TEST=y +CONFIG_ASH_CMDCMD=y +# CONFIG_ASH_MAIL is not set +CONFIG_ASH_OPTIMIZE_FOR_SIZE=y +CONFIG_ASH_RANDOM_SUPPORT=y +CONFIG_ASH_EXPAND_PRMT=y +# CONFIG_CTTYHACK is not set +# CONFIG_HUSH is not set +# CONFIG_HUSH_BASH_COMPAT is not set +# CONFIG_HUSH_BRACE_EXPANSION is not set +# CONFIG_HUSH_HELP is not set +# CONFIG_HUSH_INTERACTIVE is not set +# CONFIG_HUSH_SAVEHISTORY is not set +# CONFIG_HUSH_JOB is not set +# CONFIG_HUSH_TICK is not set +# CONFIG_HUSH_IF is not set +# CONFIG_HUSH_LOOPS is not set +# CONFIG_HUSH_CASE is not set +# CONFIG_HUSH_FUNCTIONS is not set +# CONFIG_HUSH_LOCAL is not set +# CONFIG_HUSH_RANDOM_SUPPORT is not set +# CONFIG_HUSH_EXPORT_N is not set +# CONFIG_HUSH_MODE_X is not set +# CONFIG_MSH is not set +CONFIG_FEATURE_SH_IS_ASH=y +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_NONE is not set +# CONFIG_FEATURE_BASH_IS_ASH is not set +# CONFIG_FEATURE_BASH_IS_HUSH is not set +CONFIG_FEATURE_BASH_IS_NONE=y +CONFIG_SH_MATH_SUPPORT=y +# CONFIG_SH_MATH_SUPPORT_64 is not set +CONFIG_FEATURE_SH_EXTRA_QUIET=y +# CONFIG_FEATURE_SH_STANDALONE is not set +# CONFIG_FEATURE_SH_NOFORK is not set +# CONFIG_FEATURE_SH_HISTFILESIZE is not set + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +CONFIG_FEATURE_ROTATE_LOGFILE=y +CONFIG_FEATURE_REMOTE_LOG=y +# CONFIG_FEATURE_SYSLOGD_DUP is not set +# CONFIG_FEATURE_SYSLOGD_CFG is not set +CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256 +# CONFIG_FEATURE_IPC_SYSLOG is not set +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0 +# CONFIG_LOGREAD is not set +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +CONFIG_KLOGD=y +CONFIG_FEATURE_KLOGD_KLOGCTL=y +CONFIG_LOGGER=y diff --git a/package/busybox/busybox-1.20.x.config b/package/busybox/busybox-1.20.x.config new file mode 100644 index 0000000000..55254343f0 --- /dev/null +++ b/package/busybox/busybox-1.20.x.config @@ -0,0 +1,1024 @@ +# +# Automatically generated make config: don't edit +# Busybox version: 1.20.0 +# Sun Apr 22 10:09:56 2012 +# +CONFIG_HAVE_DOT_CONFIG=y + +# +# Busybox Settings +# + +# +# General Configuration +# +CONFIG_DESKTOP=y +# CONFIG_EXTRA_COMPAT is not set +CONFIG_INCLUDE_SUSv2=y +# CONFIG_USE_PORTABLE_CODE is not set +CONFIG_PLATFORM_LINUX=y +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_SHOW_USAGE=y +CONFIG_FEATURE_VERBOSE_USAGE=y +# CONFIG_FEATURE_COMPRESS_USAGE is not set +CONFIG_FEATURE_INSTALLER=y +# CONFIG_INSTALL_NO_USR is not set +# CONFIG_LOCALE_SUPPORT is not set +# CONFIG_UNICODE_SUPPORT is not set +# CONFIG_UNICODE_USING_LOCALE is not set +# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set +CONFIG_SUBST_WCHAR=0 +CONFIG_LAST_SUPPORTED_WCHAR=0 +# CONFIG_UNICODE_COMBINING_WCHARS is not set +# CONFIG_UNICODE_WIDE_WCHARS is not set +# CONFIG_UNICODE_BIDI_SUPPORT is not set +# CONFIG_UNICODE_NEUTRAL_TABLE is not set +# CONFIG_UNICODE_PRESERVE_BROKEN is not set +CONFIG_LONG_OPTS=y +CONFIG_FEATURE_DEVPTS=y +CONFIG_FEATURE_CLEAN_UP=y +CONFIG_FEATURE_UTMP=y +CONFIG_FEATURE_WTMP=y +# CONFIG_FEATURE_PIDFILE is not set +CONFIG_FEATURE_SUID=y +# CONFIG_FEATURE_SUID_CONFIG is not set +# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set +# CONFIG_SELINUX is not set +# CONFIG_FEATURE_PREFER_APPLETS is not set +CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" +CONFIG_FEATURE_SYSLOG=y +# CONFIG_FEATURE_HAVE_RPC is not set + +# +# Build Options +# +# CONFIG_STATIC is not set +# CONFIG_PIE is not set +# CONFIG_NOMMU is not set +# CONFIG_BUILD_LIBBUSYBOX is not set +# CONFIG_FEATURE_INDIVIDUAL is not set +# CONFIG_FEATURE_SHARED_BUSYBOX is not set +# CONFIG_LFS is not set +CONFIG_CROSS_COMPILER_PREFIX="" +CONFIG_SYSROOT="" +CONFIG_EXTRA_CFLAGS="" +CONFIG_EXTRA_LDFLAGS="" +CONFIG_EXTRA_LDLIBS="" + +# +# Debugging Options +# +# CONFIG_DEBUG is not set +# CONFIG_DEBUG_PESSIMIZE is not set +# CONFIG_WERROR is not set +CONFIG_NO_DEBUG_LIB=y +# CONFIG_DMALLOC is not set +# CONFIG_EFENCE is not set + +# +# Installation Options ("make install" behavior) +# +CONFIG_INSTALL_APPLET_SYMLINKS=y +# CONFIG_INSTALL_APPLET_HARDLINKS is not set +# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set +# CONFIG_INSTALL_APPLET_DONT is not set +# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set +# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set +# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set +CONFIG_PREFIX="./_install" + +# +# Busybox Library Tuning +# +# CONFIG_FEATURE_SYSTEMD is not set +CONFIG_FEATURE_RTMINMAX=y +CONFIG_PASSWORD_MINLEN=6 +CONFIG_MD5_SMALL=1 +# CONFIG_FEATURE_FAST_TOP is not set +# CONFIG_FEATURE_ETC_NETWORKS is not set +CONFIG_FEATURE_USE_TERMIOS=y +CONFIG_FEATURE_EDITING=y +CONFIG_FEATURE_EDITING_MAX_LEN=1024 +CONFIG_FEATURE_EDITING_VI=y +CONFIG_FEATURE_EDITING_HISTORY=999 +CONFIG_FEATURE_EDITING_SAVEHISTORY=y +# CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is not set +CONFIG_FEATURE_REVERSE_SEARCH=y +CONFIG_FEATURE_TAB_COMPLETION=y +# CONFIG_FEATURE_USERNAME_COMPLETION is not set +CONFIG_FEATURE_EDITING_FANCY_PROMPT=y +# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set +CONFIG_FEATURE_NON_POSIX_CP=y +# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set +CONFIG_FEATURE_COPYBUF_KB=4 +CONFIG_FEATURE_SKIP_ROOTFS=y +CONFIG_MONOTONIC_SYSCALL=y +CONFIG_IOCTL_HEX2STR_ERROR=y +CONFIG_FEATURE_HWIB=y + +# +# Applets +# + +# +# Archival Utilities +# +# CONFIG_FEATURE_SEAMLESS_XZ is not set +# CONFIG_FEATURE_SEAMLESS_LZMA is not set +# CONFIG_FEATURE_SEAMLESS_BZ2 is not set +# CONFIG_FEATURE_SEAMLESS_GZ is not set +# CONFIG_FEATURE_SEAMLESS_Z is not set +CONFIG_AR=y +# CONFIG_FEATURE_AR_LONG_FILENAMES is not set +CONFIG_FEATURE_AR_CREATE=y +CONFIG_BUNZIP2=y +# CONFIG_BZIP2 is not set +CONFIG_CPIO=y +# CONFIG_FEATURE_CPIO_O is not set +# CONFIG_FEATURE_CPIO_P is not set +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set +CONFIG_GUNZIP=y +CONFIG_GZIP=y +# CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set +CONFIG_GZIP_FAST=0 +# CONFIG_LZOP is not set +# CONFIG_LZOP_COMPR_HIGH is not set +# CONFIG_RPM2CPIO is not set +# CONFIG_RPM is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +# CONFIG_FEATURE_TAR_AUTODETECT is not set +CONFIG_FEATURE_TAR_FROM=y +# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set +# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +CONFIG_FEATURE_TAR_LONG_OPTIONS=y +CONFIG_FEATURE_TAR_TO_COMMAND=y +# CONFIG_FEATURE_TAR_UNAME_GNAME is not set +# CONFIG_FEATURE_TAR_NOPRESERVE_TIME is not set +# CONFIG_FEATURE_TAR_SELINUX is not set +# CONFIG_UNCOMPRESS is not set +CONFIG_UNLZMA=y +# CONFIG_FEATURE_LZMA_FAST is not set +CONFIG_LZMA=y +CONFIG_UNXZ=y +CONFIG_XZ=y +CONFIG_UNZIP=y + +# +# Coreutils +# +CONFIG_BASENAME=y +CONFIG_CAT=y +CONFIG_DATE=y +CONFIG_FEATURE_DATE_ISOFMT=y +# CONFIG_FEATURE_DATE_NANO is not set +CONFIG_FEATURE_DATE_COMPAT=y +CONFIG_HOSTID=y +CONFIG_ID=y +# CONFIG_GROUPS is not set +CONFIG_TEST=y +CONFIG_FEATURE_TEST_64=y +CONFIG_TOUCH=y +CONFIG_FEATURE_TOUCH_SUSV3=y +CONFIG_TR=y +CONFIG_FEATURE_TR_CLASSES=y +CONFIG_FEATURE_TR_EQUIV=y +# CONFIG_BASE64 is not set +CONFIG_WHO=y +# CONFIG_USERS is not set +# CONFIG_CAL is not set +CONFIG_CATV=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +# CONFIG_FEATURE_CHOWN_LONG_OPTIONS is not set +CONFIG_CHROOT=y +CONFIG_CKSUM=y +# CONFIG_COMM is not set +CONFIG_CP=y +# CONFIG_FEATURE_CP_LONG_OPTIONS is not set +CONFIG_CUT=y +CONFIG_DD=y +CONFIG_FEATURE_DD_SIGNAL_HANDLING=y +# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set +CONFIG_FEATURE_DD_IBS_OBS=y +CONFIG_DF=y +# CONFIG_FEATURE_DF_FANCY is not set +CONFIG_DIRNAME=y +CONFIG_DOS2UNIX=y +CONFIG_UNIX2DOS=y +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set +# CONFIG_EXPAND is not set +# CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set +CONFIG_EXPR=y +CONFIG_EXPR_MATH_SUPPORT_64=y +CONFIG_FALSE=y +CONFIG_FOLD=y +# CONFIG_FSYNC is not set +CONFIG_HEAD=y +CONFIG_FEATURE_FANCY_HEAD=y +CONFIG_INSTALL=y +CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y +CONFIG_LN=y +CONFIG_LOGNAME=y +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +CONFIG_FEATURE_MV_LONG_OPTIONS=y +CONFIG_NICE=y +CONFIG_NOHUP=y +CONFIG_OD=y +CONFIG_PRINTENV=y +CONFIG_PRINTF=y +CONFIG_PWD=y +CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y +CONFIG_REALPATH=y +CONFIG_RM=y +CONFIG_RMDIR=y +# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set +CONFIG_SEQ=y +CONFIG_SHA1SUM=y +CONFIG_SHA256SUM=y +CONFIG_SHA512SUM=y +CONFIG_SLEEP=y +# CONFIG_FEATURE_FANCY_SLEEP is not set +# CONFIG_FEATURE_FLOAT_SLEEP is not set +CONFIG_SORT=y +CONFIG_FEATURE_SORT_BIG=y +# CONFIG_SPLIT is not set +# CONFIG_FEATURE_SPLIT_FANCY is not set +# CONFIG_STAT is not set +# CONFIG_FEATURE_STAT_FORMAT is not set +CONFIG_STTY=y +# CONFIG_SUM is not set +CONFIG_SYNC=y +# CONFIG_TAC is not set +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +CONFIG_FEATURE_TEE_USE_BLOCK_IO=y +CONFIG_TRUE=y +CONFIG_TTY=y +CONFIG_UNAME=y +# CONFIG_UNEXPAND is not set +# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set +CONFIG_UNIQ=y +CONFIG_USLEEP=y +CONFIG_UUDECODE=y +CONFIG_UUENCODE=y +CONFIG_WC=y +# CONFIG_FEATURE_WC_LARGE is not set +CONFIG_WHOAMI=y +CONFIG_YES=y + +# +# Common options for cp and mv +# +CONFIG_FEATURE_PRESERVE_HARDLINKS=y + +# +# Common options for ls, more and telnet +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum, sha256sum, sha512sum +# +CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y + +# +# Console Utilities +# +CONFIG_CHVT=y +# CONFIG_FGCONSOLE is not set +CONFIG_CLEAR=y +CONFIG_DEALLOCVT=y +CONFIG_DUMPKMAP=y +# CONFIG_KBD_MODE is not set +CONFIG_LOADFONT=y +CONFIG_LOADKMAP=y +CONFIG_OPENVT=y +CONFIG_RESET=y +CONFIG_RESIZE=y +CONFIG_FEATURE_RESIZE_PRINT=y +CONFIG_SETCONSOLE=y +# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set +# CONFIG_SETFONT is not set +# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set +CONFIG_DEFAULT_SETFONT_DIR="" +CONFIG_SETKEYCODES=y +CONFIG_SETLOGCONS=y +# CONFIG_SHOWKEY is not set + +# +# Common options for loadfont and setfont +# +CONFIG_FEATURE_LOADFONT_PSF2=y +CONFIG_FEATURE_LOADFONT_RAW=y + +# +# Debian Utilities +# +CONFIG_MKTEMP=y +CONFIG_PIPE_PROGRESS=y +CONFIG_RUN_PARTS=y +CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y +# CONFIG_FEATURE_RUN_PARTS_FANCY is not set +CONFIG_START_STOP_DAEMON=y +CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y +CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_PATCH=y +CONFIG_VI=y +CONFIG_FEATURE_VI_MAX_LEN=4096 +CONFIG_FEATURE_VI_8BIT=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +# CONFIG_FEATURE_VI_REGEX_SEARCH is not set +CONFIG_FEATURE_VI_USE_SIGNALS=y +CONFIG_FEATURE_VI_DOT_CMD=y +CONFIG_FEATURE_VI_READONLY=y +CONFIG_FEATURE_VI_SETOPTS=y +CONFIG_FEATURE_VI_SET=y +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_ASK_TERMINAL=y +CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y +CONFIG_AWK=y +# CONFIG_FEATURE_AWK_LIBM is not set +CONFIG_CMP=y +CONFIG_DIFF=y +# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set +CONFIG_FEATURE_DIFF_DIR=y +# CONFIG_ED is not set +CONFIG_SED=y +CONFIG_FEATURE_ALLOW_EXEC=y + +# +# Finding Utilities +# +CONFIG_FIND=y +CONFIG_FEATURE_FIND_PRINT0=y +CONFIG_FEATURE_FIND_MTIME=y +CONFIG_FEATURE_FIND_MMIN=y +CONFIG_FEATURE_FIND_PERM=y +CONFIG_FEATURE_FIND_TYPE=y +CONFIG_FEATURE_FIND_XDEV=y +CONFIG_FEATURE_FIND_MAXDEPTH=y +CONFIG_FEATURE_FIND_NEWER=y +# CONFIG_FEATURE_FIND_INUM is not set +CONFIG_FEATURE_FIND_EXEC=y +CONFIG_FEATURE_FIND_USER=y +CONFIG_FEATURE_FIND_GROUP=y +CONFIG_FEATURE_FIND_NOT=y +CONFIG_FEATURE_FIND_DEPTH=y +CONFIG_FEATURE_FIND_PAREN=y +CONFIG_FEATURE_FIND_SIZE=y +CONFIG_FEATURE_FIND_PRUNE=y +# CONFIG_FEATURE_FIND_DELETE is not set +CONFIG_FEATURE_FIND_PATH=y +CONFIG_FEATURE_FIND_REGEX=y +# CONFIG_FEATURE_FIND_CONTEXT is not set +# CONFIG_FEATURE_FIND_LINKS is not set +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set +CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y +CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y +CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y + +# +# Init Utilities +# +# CONFIG_BOOTCHARTD is not set +# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set +# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set +CONFIG_HALT=y +# CONFIG_FEATURE_CALL_TELINIT is not set +CONFIG_TELINIT_PATH="" +CONFIG_INIT=y +CONFIG_FEATURE_USE_INITTAB=y +CONFIG_FEATURE_KILL_REMOVED=y +CONFIG_FEATURE_KILL_DELAY=0 +CONFIG_FEATURE_INIT_SCTTY=y +CONFIG_FEATURE_INIT_SYSLOG=y +CONFIG_FEATURE_EXTRA_QUIET=y +# CONFIG_FEATURE_INIT_COREDUMPS is not set +CONFIG_FEATURE_INITRD=y +CONFIG_INIT_TERMINAL_TYPE="linux" +CONFIG_MESG=y +CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y + +# +# Login/Password Management Utilities +# +# CONFIG_ADD_SHELL is not set +# CONFIG_REMOVE_SHELL is not set +CONFIG_FEATURE_SHADOWPASSWDS=y +# CONFIG_USE_BB_PWD_GRP is not set +# CONFIG_USE_BB_SHADOW is not set +CONFIG_USE_BB_CRYPT=y +# CONFIG_USE_BB_CRYPT_SHA is not set +CONFIG_ADDUSER=y +# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set +# CONFIG_FEATURE_CHECK_NAMES is not set +CONFIG_FIRST_SYSTEM_ID=100 +CONFIG_LAST_SYSTEM_ID=999 +CONFIG_ADDGROUP=y +# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set +# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set +CONFIG_DELUSER=y +CONFIG_DELGROUP=y +# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set +CONFIG_GETTY=y +CONFIG_LOGIN=y +# CONFIG_LOGIN_SESSION_AS_CHILD is not set +# CONFIG_PAM is not set +# CONFIG_LOGIN_SCRIPTS is not set +CONFIG_FEATURE_NOLOGIN=y +CONFIG_FEATURE_SECURETTY=y +CONFIG_PASSWD=y +CONFIG_FEATURE_PASSWD_WEAK_CHECK=y +# CONFIG_CRYPTPW is not set +# CONFIG_CHPASSWD is not set +CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="des" +CONFIG_SU=y +CONFIG_FEATURE_SU_SYSLOG=y +CONFIG_FEATURE_SU_CHECKS_SHELLS=y +CONFIG_SULOGIN=y +CONFIG_VLOCK=y + +# +# Linux Ext2 FS Progs +# +CONFIG_CHATTR=y +CONFIG_FSCK=y +CONFIG_LSATTR=y +# CONFIG_TUNE2FS is not set + +# +# Linux Module Utilities +# +# CONFIG_MODINFO is not set +# CONFIG_MODPROBE_SMALL is not set +# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set +# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set +CONFIG_INSMOD=y +CONFIG_RMMOD=y +CONFIG_LSMOD=y +CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y +CONFIG_MODPROBE=y +# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set +# CONFIG_DEPMOD is not set + +# +# Options common to multiple modutils +# +# CONFIG_FEATURE_2_4_MODULES is not set +# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set +# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set +# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set +# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set +CONFIG_FEATURE_CHECK_TAINTED_MODULE=y +CONFIG_FEATURE_MODUTILS_ALIAS=y +CONFIG_FEATURE_MODUTILS_SYMBOLS=y +CONFIG_DEFAULT_MODULES_DIR="/lib/modules" +CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" + +# +# Linux System Utilities +# +# CONFIG_BLOCKDEV is not set +CONFIG_MDEV=y +CONFIG_FEATURE_MDEV_CONF=y +CONFIG_FEATURE_MDEV_RENAME=y +# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set +CONFIG_FEATURE_MDEV_EXEC=y +# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set +# CONFIG_REV is not set +# CONFIG_ACPID is not set +# CONFIG_FEATURE_ACPID_COMPAT is not set +CONFIG_BLKID=y +# CONFIG_FEATURE_BLKID_TYPE is not set +CONFIG_DMESG=y +CONFIG_FEATURE_DMESG_PRETTY=y +# CONFIG_FBSET is not set +# CONFIG_FEATURE_FBSET_FANCY is not set +# CONFIG_FEATURE_FBSET_READMODE is not set +CONFIG_FDFLUSH=y +CONFIG_FDFORMAT=y +# CONFIG_FDISK is not set +# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set +# CONFIG_FEATURE_FDISK_WRITABLE is not set +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_GPT_LABEL is not set +# CONFIG_FEATURE_FDISK_ADVANCED is not set +# CONFIG_FINDFS is not set +# CONFIG_FLOCK is not set +CONFIG_FREERAMDISK=y +# CONFIG_FSCK_MINIX is not set +# CONFIG_MKFS_EXT2 is not set +# CONFIG_MKFS_MINIX is not set +# CONFIG_FEATURE_MINIX2 is not set +# CONFIG_MKFS_REISER is not set +# CONFIG_MKFS_VFAT is not set +CONFIG_GETOPT=y +CONFIG_FEATURE_GETOPT_LONG=y +CONFIG_HEXDUMP=y +# CONFIG_FEATURE_HEXDUMP_REVERSE is not set +# CONFIG_HD is not set +CONFIG_HWCLOCK=y +CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y +CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y +CONFIG_IPCRM=y +CONFIG_IPCS=y +CONFIG_LOSETUP=y +CONFIG_LSPCI=y +CONFIG_LSUSB=y +CONFIG_MKSWAP=y +# CONFIG_FEATURE_MKSWAP_UUID is not set +CONFIG_MORE=y +CONFIG_MOUNT=y +# CONFIG_FEATURE_MOUNT_FAKE is not set +# CONFIG_FEATURE_MOUNT_VERBOSE is not set +# CONFIG_FEATURE_MOUNT_HELPERS is not set +# CONFIG_FEATURE_MOUNT_LABEL is not set +# CONFIG_FEATURE_MOUNT_NFS is not set +CONFIG_FEATURE_MOUNT_CIFS=y +CONFIG_FEATURE_MOUNT_FLAGS=y +CONFIG_FEATURE_MOUNT_FSTAB=y +CONFIG_PIVOT_ROOT=y +CONFIG_RDATE=y +# CONFIG_RDEV is not set +CONFIG_READPROFILE=y +# CONFIG_RTCWAKE is not set +# CONFIG_SCRIPT is not set +# CONFIG_SCRIPTREPLAY is not set +CONFIG_SETARCH=y +CONFIG_SWAPONOFF=y +# CONFIG_FEATURE_SWAPON_PRI is not set +CONFIG_SWITCH_ROOT=y +CONFIG_UMOUNT=y +CONFIG_FEATURE_UMOUNT_ALL=y + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +CONFIG_FEATURE_MOUNT_LOOP_CREATE=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set +CONFIG_VOLUMEID=y + +# +# Filesystem/Volume identification +# +# CONFIG_FEATURE_VOLUMEID_EXT is not set +# CONFIG_FEATURE_VOLUMEID_BTRFS is not set +# CONFIG_FEATURE_VOLUMEID_REISERFS is not set +# CONFIG_FEATURE_VOLUMEID_FAT is not set +# CONFIG_FEATURE_VOLUMEID_HFS is not set +# CONFIG_FEATURE_VOLUMEID_JFS is not set +# CONFIG_FEATURE_VOLUMEID_XFS is not set +# CONFIG_FEATURE_VOLUMEID_NTFS is not set +# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set +# CONFIG_FEATURE_VOLUMEID_UDF is not set +# CONFIG_FEATURE_VOLUMEID_LUKS is not set +# CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set +# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set +# CONFIG_FEATURE_VOLUMEID_ROMFS is not set +# CONFIG_FEATURE_VOLUMEID_SYSV is not set +# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set +# CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set + +# +# Miscellaneous Utilities +# +# CONFIG_CONSPY is not set +CONFIG_LESS=y +CONFIG_FEATURE_LESS_MAXLINES=9999999 +CONFIG_FEATURE_LESS_BRACKETS=y +CONFIG_FEATURE_LESS_FLAGS=y +# CONFIG_FEATURE_LESS_MARKS is not set +CONFIG_FEATURE_LESS_REGEXP=y +# CONFIG_FEATURE_LESS_WINCH is not set +# CONFIG_FEATURE_LESS_ASK_TERMINAL is not set +# CONFIG_FEATURE_LESS_DASHCMD is not set +# CONFIG_FEATURE_LESS_LINENUMS is not set +# CONFIG_NANDWRITE is not set +# CONFIG_NANDDUMP is not set +CONFIG_SETSERIAL=y +# CONFIG_UBIATTACH is not set +# CONFIG_UBIDETACH is not set +# CONFIG_UBIMKVOL is not set +# CONFIG_UBIRMVOL is not set +# CONFIG_UBIRSVOL is not set +# CONFIG_UBIUPDATEVOL is not set +# CONFIG_ADJTIMEX is not set +# CONFIG_BBCONFIG is not set +# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set +# CONFIG_BEEP is not set +CONFIG_FEATURE_BEEP_FREQ=0 +CONFIG_FEATURE_BEEP_LENGTH_MS=0 +# CONFIG_CHAT is not set +# CONFIG_FEATURE_CHAT_NOFAIL is not set +# CONFIG_FEATURE_CHAT_TTY_HIFI is not set +# CONFIG_FEATURE_CHAT_IMPLICIT_CR is not set +# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set +# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set +# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set +# CONFIG_FEATURE_CHAT_CLR_ABORT is not set +CONFIG_CHRT=y +CONFIG_CROND=y +# CONFIG_FEATURE_CROND_D is not set +# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set +CONFIG_FEATURE_CROND_DIR="/var/spool/cron" +CONFIG_CRONTAB=y +CONFIG_DC=y +# CONFIG_FEATURE_DC_LIBM is not set +# CONFIG_DEVFSD is not set +# CONFIG_DEVFSD_MODLOAD is not set +# CONFIG_DEVFSD_FG_NP is not set +# CONFIG_DEVFSD_VERBOSE is not set +# CONFIG_FEATURE_DEVFS is not set +CONFIG_DEVMEM=y +CONFIG_EJECT=y +# CONFIG_FEATURE_EJECT_SCSI is not set +# CONFIG_FBSPLASH is not set +# CONFIG_FLASHCP is not set +# CONFIG_FLASH_LOCK is not set +# CONFIG_FLASH_UNLOCK is not set +# CONFIG_FLASH_ERASEALL is not set +# CONFIG_IONICE is not set +# CONFIG_INOTIFYD is not set +CONFIG_LAST=y +CONFIG_FEATURE_LAST_SMALL=y +# CONFIG_FEATURE_LAST_FANCY is not set +CONFIG_HDPARM=y +CONFIG_FEATURE_HDPARM_GET_IDENTITY=y +# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set +# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set +CONFIG_MAKEDEVS=y +# CONFIG_FEATURE_MAKEDEVS_LEAF is not set +CONFIG_FEATURE_MAKEDEVS_TABLE=y +# CONFIG_MAN is not set +CONFIG_MICROCOM=y +CONFIG_MOUNTPOINT=y +CONFIG_MT=y +# CONFIG_RAIDAUTORUN is not set +# CONFIG_READAHEAD is not set +# CONFIG_RFKILL is not set +CONFIG_RUNLEVEL=y +# CONFIG_RX is not set +CONFIG_SETSID=y +CONFIG_STRINGS=y +# CONFIG_TASKSET is not set +# CONFIG_FEATURE_TASKSET_FANCY is not set +CONFIG_TIME=y +# CONFIG_TIMEOUT is not set +# CONFIG_TTYSIZE is not set +# CONFIG_VOLNAME is not set +# CONFIG_WALL is not set +CONFIG_WATCHDOG=y + +# +# Networking Utilities +# +CONFIG_NAMEIF=y +# CONFIG_FEATURE_NAMEIF_EXTENDED is not set +# CONFIG_NBDCLIENT is not set +# CONFIG_NC is not set +# CONFIG_NC_SERVER is not set +# CONFIG_NC_EXTRA is not set +# CONFIG_NC_110_COMPAT is not set +CONFIG_PING=y +# CONFIG_PING6 is not set +CONFIG_FEATURE_FANCY_PING=y +# CONFIG_WHOIS is not set +# CONFIG_FEATURE_IPV6 is not set +# CONFIG_FEATURE_UNIX_LOCAL is not set +# CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set +# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set +# CONFIG_ARP is not set +CONFIG_ARPING=y +# CONFIG_BRCTL is not set +# CONFIG_FEATURE_BRCTL_FANCY is not set +# CONFIG_FEATURE_BRCTL_SHOW is not set +CONFIG_DNSD=y +CONFIG_ETHER_WAKE=y +# CONFIG_FAKEIDENTD is not set +# CONFIG_FTPD is not set +# CONFIG_FEATURE_FTP_WRITE is not set +# CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set +CONFIG_HOSTNAME=y +# CONFIG_HTTPD is not set +# CONFIG_FEATURE_HTTPD_RANGES is not set +# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set +# CONFIG_FEATURE_HTTPD_SETUID is not set +# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set +# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set +# CONFIG_FEATURE_HTTPD_CGI is not set +# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set +# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set +# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set +# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set +# CONFIG_FEATURE_HTTPD_PROXY is not set +# CONFIG_FEATURE_HTTPD_GZIP is not set +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +CONFIG_FEATURE_IFCONFIG_SLIP=y +CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y +CONFIG_FEATURE_IFCONFIG_HW=y +# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set +# CONFIG_IFENSLAVE is not set +# CONFIG_IFPLUGD is not set +CONFIG_IFUPDOWN=y +CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate" +CONFIG_FEATURE_IFUPDOWN_IP=y +# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set +# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set +CONFIG_FEATURE_IFUPDOWN_IPV4=y +# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set +CONFIG_FEATURE_IFUPDOWN_MAPPING=y +# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set +CONFIG_INETD=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y +# CONFIG_FEATURE_INETD_RPC is not set +CONFIG_IP=y +CONFIG_FEATURE_IP_ADDRESS=y +CONFIG_FEATURE_IP_LINK=y +CONFIG_FEATURE_IP_ROUTE=y +CONFIG_FEATURE_IP_TUNNEL=y +CONFIG_FEATURE_IP_RULE=y +CONFIG_FEATURE_IP_SHORT_FORMS=y +# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set +CONFIG_IPADDR=y +CONFIG_IPLINK=y +CONFIG_IPROUTE=y +CONFIG_IPTUNNEL=y +CONFIG_IPRULE=y +# CONFIG_IPCALC is not set +# CONFIG_FEATURE_IPCALC_FANCY is not set +# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set +CONFIG_NETSTAT=y +# CONFIG_FEATURE_NETSTAT_WIDE is not set +# CONFIG_FEATURE_NETSTAT_PRG is not set +CONFIG_NSLOOKUP=y +# CONFIG_NTPD is not set +# CONFIG_FEATURE_NTPD_SERVER is not set +# CONFIG_PSCAN is not set +CONFIG_ROUTE=y +# CONFIG_SLATTACH is not set +# CONFIG_TCPSVD is not set +CONFIG_TELNET=y +CONFIG_FEATURE_TELNET_TTYPE=y +CONFIG_FEATURE_TELNET_AUTOLOGIN=y +# CONFIG_TELNETD is not set +# CONFIG_FEATURE_TELNETD_STANDALONE is not set +# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set +CONFIG_TFTP=y +# CONFIG_TFTPD is not set + +# +# Common options for tftp/tftpd +# +CONFIG_FEATURE_TFTP_GET=y +CONFIG_FEATURE_TFTP_PUT=y +CONFIG_FEATURE_TFTP_BLOCKSIZE=y +# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set +# CONFIG_TFTP_DEBUG is not set +CONFIG_TRACEROUTE=y +# CONFIG_TRACEROUTE6 is not set +# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set +# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set +# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set +# CONFIG_TUNCTL is not set +# CONFIG_FEATURE_TUNCTL_UG is not set +# CONFIG_UDHCPC6 is not set +# CONFIG_UDHCPD is not set +# CONFIG_DHCPRELAY is not set +# CONFIG_DUMPLEASES is not set +# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set +# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set +CONFIG_DHCPD_LEASES_FILE="" +CONFIG_UDHCPC=y +CONFIG_FEATURE_UDHCPC_ARPING=y +# CONFIG_FEATURE_UDHCP_PORT is not set +CONFIG_UDHCP_DEBUG=0 +# CONFIG_FEATURE_UDHCP_RFC3397 is not set +CONFIG_FEATURE_UDHCP_8021Q=y +CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script" +CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 +CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n" +# CONFIG_UDPSVD is not set +CONFIG_VCONFIG=y +CONFIG_WGET=y +CONFIG_FEATURE_WGET_STATUSBAR=y +CONFIG_FEATURE_WGET_AUTHENTICATION=y +CONFIG_FEATURE_WGET_LONG_OPTIONS=y +CONFIG_FEATURE_WGET_TIMEOUT=y +# CONFIG_ZCIP is not set + +# +# Print Utilities +# +# CONFIG_LPD is not set +# CONFIG_LPR is not set +# CONFIG_LPQ is not set + +# +# Mail Utilities +# +# CONFIG_MAKEMIME is not set +CONFIG_FEATURE_MIME_CHARSET="" +# CONFIG_POPMAILDIR is not set +# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set +# CONFIG_REFORMIME is not set +# CONFIG_FEATURE_REFORMIME_COMPAT is not set +# CONFIG_SENDMAIL is not set + +# +# Process Utilities +# +# CONFIG_IOSTAT is not set +CONFIG_LSOF=y +# CONFIG_MPSTAT is not set +# CONFIG_NMETER is not set +# CONFIG_PMAP is not set +# CONFIG_POWERTOP is not set +# CONFIG_PSTREE is not set +# CONFIG_PWDX is not set +# CONFIG_SMEMCAP is not set +CONFIG_UPTIME=y +# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set +CONFIG_FREE=y +CONFIG_FUSER=y +CONFIG_KILL=y +CONFIG_KILLALL=y +CONFIG_KILLALL5=y +# CONFIG_PGREP is not set +CONFIG_PIDOF=y +CONFIG_FEATURE_PIDOF_SINGLE=y +CONFIG_FEATURE_PIDOF_OMIT=y +# CONFIG_PKILL is not set +CONFIG_PS=y +# CONFIG_FEATURE_PS_WIDE is not set +# CONFIG_FEATURE_PS_LONG is not set +# CONFIG_FEATURE_PS_TIME is not set +# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set +# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set +CONFIG_RENICE=y +CONFIG_BB_SYSCTL=y +CONFIG_TOP=y +CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y +CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y +# CONFIG_FEATURE_TOP_SMP_CPU is not set +# CONFIG_FEATURE_TOP_DECIMALS is not set +# CONFIG_FEATURE_TOP_SMP_PROCESS is not set +# CONFIG_FEATURE_TOPMEM is not set +# CONFIG_FEATURE_SHOW_THREADS is not set +CONFIG_WATCH=y + +# +# Runit Utilities +# +# CONFIG_RUNSV is not set +# CONFIG_RUNSVDIR is not set +# CONFIG_FEATURE_RUNSVDIR_LOG is not set +# CONFIG_SV is not set +CONFIG_SV_DEFAULT_SERVICE_DIR="" +# CONFIG_SVLOGD is not set +# CONFIG_CHPST is not set +# CONFIG_SETUIDGID is not set +# CONFIG_ENVUIDGID is not set +# CONFIG_ENVDIR is not set +# CONFIG_SOFTLIMIT is not set +# CONFIG_CHCON is not set +# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set +# CONFIG_GETENFORCE is not set +# CONFIG_GETSEBOOL is not set +# CONFIG_LOAD_POLICY is not set +# CONFIG_MATCHPATHCON is not set +# CONFIG_RESTORECON is not set +# CONFIG_RUNCON is not set +# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set +# CONFIG_SELINUXENABLED is not set +# CONFIG_SETENFORCE is not set +# CONFIG_SETFILES is not set +# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set +# CONFIG_SETSEBOOL is not set +# CONFIG_SESTATUS is not set + +# +# Shells +# +CONFIG_ASH=y +CONFIG_ASH_BASH_COMPAT=y +CONFIG_ASH_IDLE_TIMEOUT=y +CONFIG_ASH_JOB_CONTROL=y +CONFIG_ASH_ALIAS=y +# CONFIG_ASH_GETOPTS is not set +CONFIG_ASH_BUILTIN_ECHO=y +CONFIG_ASH_BUILTIN_PRINTF=y +CONFIG_ASH_BUILTIN_TEST=y +CONFIG_ASH_CMDCMD=y +# CONFIG_ASH_MAIL is not set +CONFIG_ASH_OPTIMIZE_FOR_SIZE=y +CONFIG_ASH_RANDOM_SUPPORT=y +CONFIG_ASH_EXPAND_PRMT=y +# CONFIG_CTTYHACK is not set +# CONFIG_HUSH is not set +# CONFIG_HUSH_BASH_COMPAT is not set +# CONFIG_HUSH_BRACE_EXPANSION is not set +# CONFIG_HUSH_HELP is not set +# CONFIG_HUSH_INTERACTIVE is not set +# CONFIG_HUSH_SAVEHISTORY is not set +# CONFIG_HUSH_JOB is not set +# CONFIG_HUSH_TICK is not set +# CONFIG_HUSH_IF is not set +# CONFIG_HUSH_LOOPS is not set +# CONFIG_HUSH_CASE is not set +# CONFIG_HUSH_FUNCTIONS is not set +# CONFIG_HUSH_LOCAL is not set +# CONFIG_HUSH_RANDOM_SUPPORT is not set +# CONFIG_HUSH_EXPORT_N is not set +# CONFIG_HUSH_MODE_X is not set +# CONFIG_MSH is not set +CONFIG_FEATURE_SH_IS_ASH=y +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_NONE is not set +# CONFIG_FEATURE_BASH_IS_ASH is not set +# CONFIG_FEATURE_BASH_IS_HUSH is not set +CONFIG_FEATURE_BASH_IS_NONE=y +CONFIG_SH_MATH_SUPPORT=y +# CONFIG_SH_MATH_SUPPORT_64 is not set +CONFIG_FEATURE_SH_EXTRA_QUIET=y +# CONFIG_FEATURE_SH_STANDALONE is not set +# CONFIG_FEATURE_SH_NOFORK is not set +# CONFIG_FEATURE_SH_HISTFILESIZE is not set + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +CONFIG_FEATURE_ROTATE_LOGFILE=y +CONFIG_FEATURE_REMOTE_LOG=y +# CONFIG_FEATURE_SYSLOGD_DUP is not set +# CONFIG_FEATURE_SYSLOGD_CFG is not set +CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256 +# CONFIG_FEATURE_IPC_SYSLOG is not set +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0 +# CONFIG_LOGREAD is not set +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +CONFIG_KLOGD=y +CONFIG_FEATURE_KLOGD_KLOGCTL=y +CONFIG_LOGGER=y diff --git a/package/busybox/busybox-1.21.x.config b/package/busybox/busybox-1.21.x.config new file mode 100644 index 0000000000..e46b528ab9 --- /dev/null +++ b/package/busybox/busybox-1.21.x.config @@ -0,0 +1,1030 @@ +# +# Automatically generated make config: don't edit +# Busybox version: 1.21.0 +# Mon Jan 21 18:54:12 2013 +# +CONFIG_HAVE_DOT_CONFIG=y + +# +# Busybox Settings +# + +# +# General Configuration +# +CONFIG_DESKTOP=y +# CONFIG_EXTRA_COMPAT is not set +CONFIG_INCLUDE_SUSv2=y +# CONFIG_USE_PORTABLE_CODE is not set +CONFIG_PLATFORM_LINUX=y +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_SHOW_USAGE=y +CONFIG_FEATURE_VERBOSE_USAGE=y +# CONFIG_FEATURE_COMPRESS_USAGE is not set +CONFIG_FEATURE_INSTALLER=y +# CONFIG_INSTALL_NO_USR is not set +# CONFIG_LOCALE_SUPPORT is not set +# CONFIG_UNICODE_SUPPORT is not set +# CONFIG_UNICODE_USING_LOCALE is not set +# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set +CONFIG_SUBST_WCHAR=0 +CONFIG_LAST_SUPPORTED_WCHAR=0 +# CONFIG_UNICODE_COMBINING_WCHARS is not set +# CONFIG_UNICODE_WIDE_WCHARS is not set +# CONFIG_UNICODE_BIDI_SUPPORT is not set +# CONFIG_UNICODE_NEUTRAL_TABLE is not set +# CONFIG_UNICODE_PRESERVE_BROKEN is not set +CONFIG_LONG_OPTS=y +CONFIG_FEATURE_DEVPTS=y +CONFIG_FEATURE_CLEAN_UP=y +CONFIG_FEATURE_UTMP=y +CONFIG_FEATURE_WTMP=y +# CONFIG_FEATURE_PIDFILE is not set +CONFIG_PID_FILE_PATH="" +CONFIG_FEATURE_SUID=y +# CONFIG_FEATURE_SUID_CONFIG is not set +# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set +# CONFIG_SELINUX is not set +# CONFIG_FEATURE_PREFER_APPLETS is not set +CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" +CONFIG_FEATURE_SYSLOG=y +# CONFIG_FEATURE_HAVE_RPC is not set + +# +# Build Options +# +# CONFIG_STATIC is not set +# CONFIG_PIE is not set +# CONFIG_NOMMU is not set +# CONFIG_BUILD_LIBBUSYBOX is not set +# CONFIG_FEATURE_INDIVIDUAL is not set +# CONFIG_FEATURE_SHARED_BUSYBOX is not set +# CONFIG_LFS is not set +CONFIG_CROSS_COMPILER_PREFIX="" +CONFIG_SYSROOT="" +CONFIG_EXTRA_CFLAGS="" +CONFIG_EXTRA_LDFLAGS="" +CONFIG_EXTRA_LDLIBS="" + +# +# Debugging Options +# +# CONFIG_DEBUG is not set +# CONFIG_DEBUG_PESSIMIZE is not set +# CONFIG_WERROR is not set +CONFIG_NO_DEBUG_LIB=y +# CONFIG_DMALLOC is not set +# CONFIG_EFENCE is not set + +# +# Installation Options ("make install" behavior) +# +CONFIG_INSTALL_APPLET_SYMLINKS=y +# CONFIG_INSTALL_APPLET_HARDLINKS is not set +# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set +# CONFIG_INSTALL_APPLET_DONT is not set +# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set +# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set +# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set +CONFIG_PREFIX="./_install" + +# +# Busybox Library Tuning +# +# CONFIG_FEATURE_SYSTEMD is not set +CONFIG_FEATURE_RTMINMAX=y +CONFIG_PASSWORD_MINLEN=6 +CONFIG_MD5_SMALL=1 +CONFIG_SHA3_SMALL=1 +# CONFIG_FEATURE_FAST_TOP is not set +# CONFIG_FEATURE_ETC_NETWORKS is not set +CONFIG_FEATURE_USE_TERMIOS=y +CONFIG_FEATURE_EDITING=y +CONFIG_FEATURE_EDITING_MAX_LEN=1024 +CONFIG_FEATURE_EDITING_VI=y +CONFIG_FEATURE_EDITING_HISTORY=999 +CONFIG_FEATURE_EDITING_SAVEHISTORY=y +# CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is not set +CONFIG_FEATURE_REVERSE_SEARCH=y +CONFIG_FEATURE_TAB_COMPLETION=y +# CONFIG_FEATURE_USERNAME_COMPLETION is not set +CONFIG_FEATURE_EDITING_FANCY_PROMPT=y +# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set +CONFIG_FEATURE_NON_POSIX_CP=y +# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set +CONFIG_FEATURE_COPYBUF_KB=4 +CONFIG_FEATURE_SKIP_ROOTFS=y +CONFIG_MONOTONIC_SYSCALL=y +CONFIG_IOCTL_HEX2STR_ERROR=y +CONFIG_FEATURE_HWIB=y + +# +# Applets +# + +# +# Archival Utilities +# +# CONFIG_FEATURE_SEAMLESS_XZ is not set +# CONFIG_FEATURE_SEAMLESS_LZMA is not set +# CONFIG_FEATURE_SEAMLESS_BZ2 is not set +# CONFIG_FEATURE_SEAMLESS_GZ is not set +# CONFIG_FEATURE_SEAMLESS_Z is not set +CONFIG_AR=y +# CONFIG_FEATURE_AR_LONG_FILENAMES is not set +CONFIG_FEATURE_AR_CREATE=y +CONFIG_BUNZIP2=y +# CONFIG_BZIP2 is not set +CONFIG_CPIO=y +# CONFIG_FEATURE_CPIO_O is not set +# CONFIG_FEATURE_CPIO_P is not set +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set +CONFIG_GUNZIP=y +CONFIG_GZIP=y +# CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set +CONFIG_GZIP_FAST=0 +# CONFIG_LZOP is not set +# CONFIG_LZOP_COMPR_HIGH is not set +# CONFIG_RPM2CPIO is not set +# CONFIG_RPM is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +# CONFIG_FEATURE_TAR_AUTODETECT is not set +CONFIG_FEATURE_TAR_FROM=y +# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set +# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +CONFIG_FEATURE_TAR_LONG_OPTIONS=y +CONFIG_FEATURE_TAR_TO_COMMAND=y +# CONFIG_FEATURE_TAR_UNAME_GNAME is not set +# CONFIG_FEATURE_TAR_NOPRESERVE_TIME is not set +# CONFIG_FEATURE_TAR_SELINUX is not set +# CONFIG_UNCOMPRESS is not set +CONFIG_UNLZMA=y +# CONFIG_FEATURE_LZMA_FAST is not set +CONFIG_LZMA=y +CONFIG_UNXZ=y +CONFIG_XZ=y +CONFIG_UNZIP=y + +# +# Coreutils +# +CONFIG_BASENAME=y +CONFIG_CAT=y +CONFIG_DATE=y +CONFIG_FEATURE_DATE_ISOFMT=y +# CONFIG_FEATURE_DATE_NANO is not set +CONFIG_FEATURE_DATE_COMPAT=y +CONFIG_HOSTID=y +CONFIG_ID=y +# CONFIG_GROUPS is not set +CONFIG_TEST=y +CONFIG_FEATURE_TEST_64=y +CONFIG_TOUCH=y +CONFIG_FEATURE_TOUCH_SUSV3=y +CONFIG_TR=y +CONFIG_FEATURE_TR_CLASSES=y +CONFIG_FEATURE_TR_EQUIV=y +# CONFIG_BASE64 is not set +CONFIG_WHO=y +# CONFIG_USERS is not set +# CONFIG_CAL is not set +CONFIG_CATV=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +# CONFIG_FEATURE_CHOWN_LONG_OPTIONS is not set +CONFIG_CHROOT=y +CONFIG_CKSUM=y +# CONFIG_COMM is not set +CONFIG_CP=y +# CONFIG_FEATURE_CP_LONG_OPTIONS is not set +CONFIG_CUT=y +CONFIG_DD=y +CONFIG_FEATURE_DD_SIGNAL_HANDLING=y +# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set +CONFIG_FEATURE_DD_IBS_OBS=y +CONFIG_DF=y +# CONFIG_FEATURE_DF_FANCY is not set +CONFIG_DIRNAME=y +CONFIG_DOS2UNIX=y +CONFIG_UNIX2DOS=y +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set +# CONFIG_EXPAND is not set +# CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set +CONFIG_EXPR=y +CONFIG_EXPR_MATH_SUPPORT_64=y +CONFIG_FALSE=y +CONFIG_FOLD=y +# CONFIG_FSYNC is not set +CONFIG_HEAD=y +CONFIG_FEATURE_FANCY_HEAD=y +CONFIG_INSTALL=y +CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y +CONFIG_LN=y +CONFIG_LOGNAME=y +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +CONFIG_FEATURE_MV_LONG_OPTIONS=y +CONFIG_NICE=y +CONFIG_NOHUP=y +CONFIG_OD=y +CONFIG_PRINTENV=y +CONFIG_PRINTF=y +CONFIG_PWD=y +CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y +CONFIG_REALPATH=y +CONFIG_RM=y +CONFIG_RMDIR=y +# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set +CONFIG_SEQ=y +CONFIG_SHA1SUM=y +CONFIG_SHA256SUM=y +CONFIG_SHA512SUM=y +CONFIG_SHA3SUM=y +CONFIG_SLEEP=y +# CONFIG_FEATURE_FANCY_SLEEP is not set +# CONFIG_FEATURE_FLOAT_SLEEP is not set +CONFIG_SORT=y +CONFIG_FEATURE_SORT_BIG=y +# CONFIG_SPLIT is not set +# CONFIG_FEATURE_SPLIT_FANCY is not set +# CONFIG_STAT is not set +# CONFIG_FEATURE_STAT_FORMAT is not set +CONFIG_STTY=y +# CONFIG_SUM is not set +CONFIG_SYNC=y +# CONFIG_TAC is not set +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +CONFIG_FEATURE_TEE_USE_BLOCK_IO=y +CONFIG_TRUE=y +CONFIG_TTY=y +CONFIG_UNAME=y +# CONFIG_UNEXPAND is not set +# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set +CONFIG_UNIQ=y +CONFIG_USLEEP=y +CONFIG_UUDECODE=y +CONFIG_UUENCODE=y +CONFIG_WC=y +# CONFIG_FEATURE_WC_LARGE is not set +CONFIG_WHOAMI=y +CONFIG_YES=y + +# +# Common options for cp and mv +# +CONFIG_FEATURE_PRESERVE_HARDLINKS=y + +# +# Common options for ls, more and telnet +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum +# +CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y + +# +# Console Utilities +# +CONFIG_CHVT=y +# CONFIG_FGCONSOLE is not set +CONFIG_CLEAR=y +CONFIG_DEALLOCVT=y +CONFIG_DUMPKMAP=y +# CONFIG_KBD_MODE is not set +CONFIG_LOADFONT=y +CONFIG_LOADKMAP=y +CONFIG_OPENVT=y +CONFIG_RESET=y +CONFIG_RESIZE=y +CONFIG_FEATURE_RESIZE_PRINT=y +CONFIG_SETCONSOLE=y +# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set +# CONFIG_SETFONT is not set +# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set +CONFIG_DEFAULT_SETFONT_DIR="" +CONFIG_SETKEYCODES=y +CONFIG_SETLOGCONS=y +# CONFIG_SHOWKEY is not set + +# +# Common options for loadfont and setfont +# +CONFIG_FEATURE_LOADFONT_PSF2=y +CONFIG_FEATURE_LOADFONT_RAW=y + +# +# Debian Utilities +# +CONFIG_MKTEMP=y +CONFIG_PIPE_PROGRESS=y +CONFIG_RUN_PARTS=y +CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y +# CONFIG_FEATURE_RUN_PARTS_FANCY is not set +CONFIG_START_STOP_DAEMON=y +CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y +CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_PATCH=y +CONFIG_VI=y +CONFIG_FEATURE_VI_MAX_LEN=4096 +CONFIG_FEATURE_VI_8BIT=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +# CONFIG_FEATURE_VI_REGEX_SEARCH is not set +CONFIG_FEATURE_VI_USE_SIGNALS=y +CONFIG_FEATURE_VI_DOT_CMD=y +CONFIG_FEATURE_VI_READONLY=y +CONFIG_FEATURE_VI_SETOPTS=y +CONFIG_FEATURE_VI_SET=y +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_ASK_TERMINAL=y +CONFIG_AWK=y +# CONFIG_FEATURE_AWK_LIBM is not set +CONFIG_CMP=y +CONFIG_DIFF=y +# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set +CONFIG_FEATURE_DIFF_DIR=y +# CONFIG_ED is not set +CONFIG_SED=y +CONFIG_FEATURE_ALLOW_EXEC=y + +# +# Finding Utilities +# +CONFIG_FIND=y +CONFIG_FEATURE_FIND_PRINT0=y +CONFIG_FEATURE_FIND_MTIME=y +CONFIG_FEATURE_FIND_MMIN=y +CONFIG_FEATURE_FIND_PERM=y +CONFIG_FEATURE_FIND_TYPE=y +CONFIG_FEATURE_FIND_XDEV=y +CONFIG_FEATURE_FIND_MAXDEPTH=y +CONFIG_FEATURE_FIND_NEWER=y +# CONFIG_FEATURE_FIND_INUM is not set +CONFIG_FEATURE_FIND_EXEC=y +CONFIG_FEATURE_FIND_USER=y +CONFIG_FEATURE_FIND_GROUP=y +CONFIG_FEATURE_FIND_NOT=y +CONFIG_FEATURE_FIND_DEPTH=y +CONFIG_FEATURE_FIND_PAREN=y +CONFIG_FEATURE_FIND_SIZE=y +CONFIG_FEATURE_FIND_PRUNE=y +# CONFIG_FEATURE_FIND_DELETE is not set +CONFIG_FEATURE_FIND_PATH=y +CONFIG_FEATURE_FIND_REGEX=y +# CONFIG_FEATURE_FIND_CONTEXT is not set +# CONFIG_FEATURE_FIND_LINKS is not set +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set +CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y +CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y +CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y + +# +# Init Utilities +# +# CONFIG_BOOTCHARTD is not set +# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set +# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set +CONFIG_HALT=y +# CONFIG_FEATURE_CALL_TELINIT is not set +CONFIG_TELINIT_PATH="" +CONFIG_INIT=y +CONFIG_FEATURE_USE_INITTAB=y +CONFIG_FEATURE_KILL_REMOVED=y +CONFIG_FEATURE_KILL_DELAY=0 +CONFIG_FEATURE_INIT_SCTTY=y +CONFIG_FEATURE_INIT_SYSLOG=y +CONFIG_FEATURE_EXTRA_QUIET=y +# CONFIG_FEATURE_INIT_COREDUMPS is not set +CONFIG_FEATURE_INITRD=y +CONFIG_INIT_TERMINAL_TYPE="linux" +CONFIG_MESG=y +CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y + +# +# Login/Password Management Utilities +# +# CONFIG_ADD_SHELL is not set +# CONFIG_REMOVE_SHELL is not set +CONFIG_FEATURE_SHADOWPASSWDS=y +# CONFIG_USE_BB_PWD_GRP is not set +# CONFIG_USE_BB_SHADOW is not set +CONFIG_USE_BB_CRYPT=y +# CONFIG_USE_BB_CRYPT_SHA is not set +CONFIG_ADDUSER=y +# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set +# CONFIG_FEATURE_CHECK_NAMES is not set +CONFIG_FIRST_SYSTEM_ID=100 +CONFIG_LAST_SYSTEM_ID=999 +CONFIG_ADDGROUP=y +# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set +# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set +CONFIG_DELUSER=y +CONFIG_DELGROUP=y +# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set +CONFIG_GETTY=y +CONFIG_LOGIN=y +# CONFIG_LOGIN_SESSION_AS_CHILD is not set +# CONFIG_PAM is not set +# CONFIG_LOGIN_SCRIPTS is not set +CONFIG_FEATURE_NOLOGIN=y +CONFIG_FEATURE_SECURETTY=y +CONFIG_PASSWD=y +CONFIG_FEATURE_PASSWD_WEAK_CHECK=y +# CONFIG_CRYPTPW is not set +# CONFIG_CHPASSWD is not set +CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="des" +CONFIG_SU=y +CONFIG_FEATURE_SU_SYSLOG=y +CONFIG_FEATURE_SU_CHECKS_SHELLS=y +CONFIG_SULOGIN=y +CONFIG_VLOCK=y + +# +# Linux Ext2 FS Progs +# +CONFIG_CHATTR=y +CONFIG_FSCK=y +CONFIG_LSATTR=y +# CONFIG_TUNE2FS is not set + +# +# Linux Module Utilities +# +# CONFIG_MODINFO is not set +# CONFIG_MODPROBE_SMALL is not set +# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set +# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set +CONFIG_INSMOD=y +CONFIG_RMMOD=y +CONFIG_LSMOD=y +CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y +CONFIG_MODPROBE=y +# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set +# CONFIG_DEPMOD is not set + +# +# Options common to multiple modutils +# +# CONFIG_FEATURE_2_4_MODULES is not set +# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set +# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set +# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set +# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set +CONFIG_FEATURE_CHECK_TAINTED_MODULE=y +CONFIG_FEATURE_MODUTILS_ALIAS=y +CONFIG_FEATURE_MODUTILS_SYMBOLS=y +CONFIG_DEFAULT_MODULES_DIR="/lib/modules" +CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" + +# +# Linux System Utilities +# +# CONFIG_BLOCKDEV is not set +CONFIG_MDEV=y +CONFIG_FEATURE_MDEV_CONF=y +CONFIG_FEATURE_MDEV_RENAME=y +# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set +CONFIG_FEATURE_MDEV_EXEC=y +# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set +# CONFIG_REV is not set +# CONFIG_ACPID is not set +# CONFIG_FEATURE_ACPID_COMPAT is not set +CONFIG_BLKID=y +# CONFIG_FEATURE_BLKID_TYPE is not set +CONFIG_DMESG=y +CONFIG_FEATURE_DMESG_PRETTY=y +# CONFIG_FBSET is not set +# CONFIG_FEATURE_FBSET_FANCY is not set +# CONFIG_FEATURE_FBSET_READMODE is not set +CONFIG_FDFLUSH=y +CONFIG_FDFORMAT=y +# CONFIG_FDISK is not set +# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set +# CONFIG_FEATURE_FDISK_WRITABLE is not set +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_GPT_LABEL is not set +# CONFIG_FEATURE_FDISK_ADVANCED is not set +# CONFIG_FINDFS is not set +# CONFIG_FLOCK is not set +CONFIG_FREERAMDISK=y +# CONFIG_FSCK_MINIX is not set +# CONFIG_MKFS_EXT2 is not set +# CONFIG_MKFS_MINIX is not set +# CONFIG_FEATURE_MINIX2 is not set +# CONFIG_MKFS_REISER is not set +# CONFIG_MKFS_VFAT is not set +CONFIG_GETOPT=y +CONFIG_FEATURE_GETOPT_LONG=y +CONFIG_HEXDUMP=y +# CONFIG_FEATURE_HEXDUMP_REVERSE is not set +# CONFIG_HD is not set +CONFIG_HWCLOCK=y +CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y +CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y +CONFIG_IPCRM=y +CONFIG_IPCS=y +CONFIG_LOSETUP=y +CONFIG_LSPCI=y +CONFIG_LSUSB=y +CONFIG_MKSWAP=y +# CONFIG_FEATURE_MKSWAP_UUID is not set +CONFIG_MORE=y +CONFIG_MOUNT=y +# CONFIG_FEATURE_MOUNT_FAKE is not set +# CONFIG_FEATURE_MOUNT_VERBOSE is not set +# CONFIG_FEATURE_MOUNT_HELPERS is not set +# CONFIG_FEATURE_MOUNT_LABEL is not set +# CONFIG_FEATURE_MOUNT_NFS is not set +CONFIG_FEATURE_MOUNT_CIFS=y +CONFIG_FEATURE_MOUNT_FLAGS=y +CONFIG_FEATURE_MOUNT_FSTAB=y +CONFIG_PIVOT_ROOT=y +CONFIG_RDATE=y +# CONFIG_RDEV is not set +CONFIG_READPROFILE=y +# CONFIG_RTCWAKE is not set +# CONFIG_SCRIPT is not set +# CONFIG_SCRIPTREPLAY is not set +CONFIG_SETARCH=y +CONFIG_SWAPONOFF=y +# CONFIG_FEATURE_SWAPON_PRI is not set +CONFIG_SWITCH_ROOT=y +CONFIG_UMOUNT=y +CONFIG_FEATURE_UMOUNT_ALL=y + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +CONFIG_FEATURE_MOUNT_LOOP_CREATE=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set +CONFIG_VOLUMEID=y + +# +# Filesystem/Volume identification +# +CONFIG_FEATURE_VOLUMEID_EXT=y +# CONFIG_FEATURE_VOLUMEID_BTRFS is not set +# CONFIG_FEATURE_VOLUMEID_REISERFS is not set +CONFIG_FEATURE_VOLUMEID_FAT=y +CONFIG_FEATURE_VOLUMEID_EXFAT=y +# CONFIG_FEATURE_VOLUMEID_HFS is not set +# CONFIG_FEATURE_VOLUMEID_JFS is not set +# CONFIG_FEATURE_VOLUMEID_XFS is not set +# CONFIG_FEATURE_VOLUMEID_NILFS is not set +# CONFIG_FEATURE_VOLUMEID_NTFS is not set +# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set +# CONFIG_FEATURE_VOLUMEID_UDF is not set +# CONFIG_FEATURE_VOLUMEID_LUKS is not set +# CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set +# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set +# CONFIG_FEATURE_VOLUMEID_ROMFS is not set +# CONFIG_FEATURE_VOLUMEID_SQUASHFS is not set +# CONFIG_FEATURE_VOLUMEID_SYSV is not set +# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set +# CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set + +# +# Miscellaneous Utilities +# +# CONFIG_CONSPY is not set +CONFIG_LESS=y +CONFIG_FEATURE_LESS_MAXLINES=9999999 +CONFIG_FEATURE_LESS_BRACKETS=y +CONFIG_FEATURE_LESS_FLAGS=y +# CONFIG_FEATURE_LESS_MARKS is not set +CONFIG_FEATURE_LESS_REGEXP=y +# CONFIG_FEATURE_LESS_WINCH is not set +# CONFIG_FEATURE_LESS_ASK_TERMINAL is not set +# CONFIG_FEATURE_LESS_DASHCMD is not set +# CONFIG_FEATURE_LESS_LINENUMS is not set +# CONFIG_NANDWRITE is not set +# CONFIG_NANDDUMP is not set +CONFIG_SETSERIAL=y +# CONFIG_UBIATTACH is not set +# CONFIG_UBIDETACH is not set +# CONFIG_UBIMKVOL is not set +# CONFIG_UBIRMVOL is not set +# CONFIG_UBIRSVOL is not set +# CONFIG_UBIUPDATEVOL is not set +# CONFIG_ADJTIMEX is not set +# CONFIG_BBCONFIG is not set +# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set +# CONFIG_BEEP is not set +CONFIG_FEATURE_BEEP_FREQ=0 +CONFIG_FEATURE_BEEP_LENGTH_MS=0 +# CONFIG_CHAT is not set +# CONFIG_FEATURE_CHAT_NOFAIL is not set +# CONFIG_FEATURE_CHAT_TTY_HIFI is not set +# CONFIG_FEATURE_CHAT_IMPLICIT_CR is not set +# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set +# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set +# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set +# CONFIG_FEATURE_CHAT_CLR_ABORT is not set +CONFIG_CHRT=y +CONFIG_CROND=y +# CONFIG_FEATURE_CROND_D is not set +# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set +CONFIG_FEATURE_CROND_DIR="/var/spool/cron" +CONFIG_CRONTAB=y +CONFIG_DC=y +# CONFIG_FEATURE_DC_LIBM is not set +# CONFIG_DEVFSD is not set +# CONFIG_DEVFSD_MODLOAD is not set +# CONFIG_DEVFSD_FG_NP is not set +# CONFIG_DEVFSD_VERBOSE is not set +# CONFIG_FEATURE_DEVFS is not set +CONFIG_DEVMEM=y +CONFIG_EJECT=y +# CONFIG_FEATURE_EJECT_SCSI is not set +# CONFIG_FBSPLASH is not set +# CONFIG_FLASHCP is not set +# CONFIG_FLASH_LOCK is not set +# CONFIG_FLASH_UNLOCK is not set +# CONFIG_FLASH_ERASEALL is not set +# CONFIG_IONICE is not set +# CONFIG_INOTIFYD is not set +CONFIG_LAST=y +CONFIG_FEATURE_LAST_SMALL=y +# CONFIG_FEATURE_LAST_FANCY is not set +CONFIG_HDPARM=y +CONFIG_FEATURE_HDPARM_GET_IDENTITY=y +# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set +# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set +CONFIG_MAKEDEVS=y +# CONFIG_FEATURE_MAKEDEVS_LEAF is not set +CONFIG_FEATURE_MAKEDEVS_TABLE=y +# CONFIG_MAN is not set +CONFIG_MICROCOM=y +CONFIG_MOUNTPOINT=y +CONFIG_MT=y +# CONFIG_RAIDAUTORUN is not set +# CONFIG_READAHEAD is not set +# CONFIG_RFKILL is not set +CONFIG_RUNLEVEL=y +# CONFIG_RX is not set +CONFIG_SETSID=y +CONFIG_STRINGS=y +# CONFIG_TASKSET is not set +# CONFIG_FEATURE_TASKSET_FANCY is not set +CONFIG_TIME=y +# CONFIG_TIMEOUT is not set +# CONFIG_TTYSIZE is not set +# CONFIG_VOLNAME is not set +# CONFIG_WALL is not set +CONFIG_WATCHDOG=y + +# +# Networking Utilities +# +CONFIG_NAMEIF=y +# CONFIG_FEATURE_NAMEIF_EXTENDED is not set +# CONFIG_NBDCLIENT is not set +# CONFIG_NC is not set +# CONFIG_NC_SERVER is not set +# CONFIG_NC_EXTRA is not set +# CONFIG_NC_110_COMPAT is not set +CONFIG_PING=y +# CONFIG_PING6 is not set +CONFIG_FEATURE_FANCY_PING=y +# CONFIG_WHOIS is not set +# CONFIG_FEATURE_IPV6 is not set +# CONFIG_FEATURE_UNIX_LOCAL is not set +# CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set +# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set +# CONFIG_ARP is not set +CONFIG_ARPING=y +# CONFIG_BRCTL is not set +# CONFIG_FEATURE_BRCTL_FANCY is not set +# CONFIG_FEATURE_BRCTL_SHOW is not set +CONFIG_DNSD=y +CONFIG_ETHER_WAKE=y +# CONFIG_FAKEIDENTD is not set +# CONFIG_FTPD is not set +# CONFIG_FEATURE_FTP_WRITE is not set +# CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set +CONFIG_HOSTNAME=y +# CONFIG_HTTPD is not set +# CONFIG_FEATURE_HTTPD_RANGES is not set +# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set +# CONFIG_FEATURE_HTTPD_SETUID is not set +# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set +# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set +# CONFIG_FEATURE_HTTPD_CGI is not set +# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set +# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set +# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set +# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set +# CONFIG_FEATURE_HTTPD_PROXY is not set +# CONFIG_FEATURE_HTTPD_GZIP is not set +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +CONFIG_FEATURE_IFCONFIG_SLIP=y +CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y +CONFIG_FEATURE_IFCONFIG_HW=y +# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set +# CONFIG_IFENSLAVE is not set +# CONFIG_IFPLUGD is not set +CONFIG_IFUPDOWN=y +CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate" +CONFIG_FEATURE_IFUPDOWN_IP=y +# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set +# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set +CONFIG_FEATURE_IFUPDOWN_IPV4=y +# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set +CONFIG_FEATURE_IFUPDOWN_MAPPING=y +# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set +CONFIG_INETD=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y +# CONFIG_FEATURE_INETD_RPC is not set +CONFIG_IP=y +CONFIG_FEATURE_IP_ADDRESS=y +CONFIG_FEATURE_IP_LINK=y +CONFIG_FEATURE_IP_ROUTE=y +CONFIG_FEATURE_IP_TUNNEL=y +CONFIG_FEATURE_IP_RULE=y +CONFIG_FEATURE_IP_SHORT_FORMS=y +# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set +CONFIG_IPADDR=y +CONFIG_IPLINK=y +CONFIG_IPROUTE=y +CONFIG_IPTUNNEL=y +CONFIG_IPRULE=y +# CONFIG_IPCALC is not set +# CONFIG_FEATURE_IPCALC_FANCY is not set +# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set +CONFIG_NETSTAT=y +# CONFIG_FEATURE_NETSTAT_WIDE is not set +# CONFIG_FEATURE_NETSTAT_PRG is not set +CONFIG_NSLOOKUP=y +# CONFIG_NTPD is not set +# CONFIG_FEATURE_NTPD_SERVER is not set +# CONFIG_PSCAN is not set +CONFIG_ROUTE=y +# CONFIG_SLATTACH is not set +# CONFIG_TCPSVD is not set +CONFIG_TELNET=y +CONFIG_FEATURE_TELNET_TTYPE=y +CONFIG_FEATURE_TELNET_AUTOLOGIN=y +# CONFIG_TELNETD is not set +# CONFIG_FEATURE_TELNETD_STANDALONE is not set +# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set +CONFIG_TFTP=y +# CONFIG_TFTPD is not set + +# +# Common options for tftp/tftpd +# +CONFIG_FEATURE_TFTP_GET=y +CONFIG_FEATURE_TFTP_PUT=y +CONFIG_FEATURE_TFTP_BLOCKSIZE=y +# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set +# CONFIG_TFTP_DEBUG is not set +CONFIG_TRACEROUTE=y +# CONFIG_TRACEROUTE6 is not set +# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set +# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set +# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set +# CONFIG_TUNCTL is not set +# CONFIG_FEATURE_TUNCTL_UG is not set +# CONFIG_UDHCPC6 is not set +# CONFIG_UDHCPD is not set +# CONFIG_DHCPRELAY is not set +# CONFIG_DUMPLEASES is not set +# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set +# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set +CONFIG_DHCPD_LEASES_FILE="" +CONFIG_UDHCPC=y +CONFIG_FEATURE_UDHCPC_ARPING=y +# CONFIG_FEATURE_UDHCP_PORT is not set +CONFIG_UDHCP_DEBUG=0 +# CONFIG_FEATURE_UDHCP_RFC3397 is not set +CONFIG_FEATURE_UDHCP_8021Q=y +CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script" +CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 +CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n" +# CONFIG_UDPSVD is not set +CONFIG_VCONFIG=y +CONFIG_WGET=y +CONFIG_FEATURE_WGET_STATUSBAR=y +CONFIG_FEATURE_WGET_AUTHENTICATION=y +CONFIG_FEATURE_WGET_LONG_OPTIONS=y +CONFIG_FEATURE_WGET_TIMEOUT=y +# CONFIG_ZCIP is not set + +# +# Print Utilities +# +# CONFIG_LPD is not set +# CONFIG_LPR is not set +# CONFIG_LPQ is not set + +# +# Mail Utilities +# +# CONFIG_MAKEMIME is not set +CONFIG_FEATURE_MIME_CHARSET="" +# CONFIG_POPMAILDIR is not set +# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set +# CONFIG_REFORMIME is not set +# CONFIG_FEATURE_REFORMIME_COMPAT is not set +# CONFIG_SENDMAIL is not set + +# +# Process Utilities +# +# CONFIG_IOSTAT is not set +CONFIG_LSOF=y +# CONFIG_MPSTAT is not set +# CONFIG_NMETER is not set +# CONFIG_PMAP is not set +# CONFIG_POWERTOP is not set +# CONFIG_PSTREE is not set +# CONFIG_PWDX is not set +# CONFIG_SMEMCAP is not set +CONFIG_TOP=y +CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y +CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y +# CONFIG_FEATURE_TOP_SMP_CPU is not set +# CONFIG_FEATURE_TOP_DECIMALS is not set +# CONFIG_FEATURE_TOP_SMP_PROCESS is not set +# CONFIG_FEATURE_TOPMEM is not set +CONFIG_UPTIME=y +# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set +CONFIG_FREE=y +CONFIG_FUSER=y +CONFIG_KILL=y +CONFIG_KILLALL=y +CONFIG_KILLALL5=y +# CONFIG_PGREP is not set +CONFIG_PIDOF=y +CONFIG_FEATURE_PIDOF_SINGLE=y +CONFIG_FEATURE_PIDOF_OMIT=y +# CONFIG_PKILL is not set +CONFIG_PS=y +# CONFIG_FEATURE_PS_WIDE is not set +# CONFIG_FEATURE_PS_LONG is not set +# CONFIG_FEATURE_PS_TIME is not set +# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set +# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set +CONFIG_RENICE=y +CONFIG_BB_SYSCTL=y +# CONFIG_FEATURE_SHOW_THREADS is not set +CONFIG_WATCH=y + +# +# Runit Utilities +# +# CONFIG_RUNSV is not set +# CONFIG_RUNSVDIR is not set +# CONFIG_FEATURE_RUNSVDIR_LOG is not set +# CONFIG_SV is not set +CONFIG_SV_DEFAULT_SERVICE_DIR="" +# CONFIG_SVLOGD is not set +# CONFIG_CHPST is not set +# CONFIG_SETUIDGID is not set +# CONFIG_ENVUIDGID is not set +# CONFIG_ENVDIR is not set +# CONFIG_SOFTLIMIT is not set +# CONFIG_CHCON is not set +# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set +# CONFIG_GETENFORCE is not set +# CONFIG_GETSEBOOL is not set +# CONFIG_LOAD_POLICY is not set +# CONFIG_MATCHPATHCON is not set +# CONFIG_RESTORECON is not set +# CONFIG_RUNCON is not set +# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set +# CONFIG_SELINUXENABLED is not set +# CONFIG_SETENFORCE is not set +# CONFIG_SETFILES is not set +# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set +# CONFIG_SETSEBOOL is not set +# CONFIG_SESTATUS is not set + +# +# Shells +# +CONFIG_ASH=y +CONFIG_ASH_BASH_COMPAT=y +CONFIG_ASH_IDLE_TIMEOUT=y +CONFIG_ASH_JOB_CONTROL=y +CONFIG_ASH_ALIAS=y +# CONFIG_ASH_GETOPTS is not set +CONFIG_ASH_BUILTIN_ECHO=y +CONFIG_ASH_BUILTIN_PRINTF=y +CONFIG_ASH_BUILTIN_TEST=y +CONFIG_ASH_CMDCMD=y +# CONFIG_ASH_MAIL is not set +CONFIG_ASH_OPTIMIZE_FOR_SIZE=y +CONFIG_ASH_RANDOM_SUPPORT=y +CONFIG_ASH_EXPAND_PRMT=y +# CONFIG_CTTYHACK is not set +# CONFIG_HUSH is not set +# CONFIG_HUSH_BASH_COMPAT is not set +# CONFIG_HUSH_BRACE_EXPANSION is not set +# CONFIG_HUSH_HELP is not set +# CONFIG_HUSH_INTERACTIVE is not set +# CONFIG_HUSH_SAVEHISTORY is not set +# CONFIG_HUSH_JOB is not set +# CONFIG_HUSH_TICK is not set +# CONFIG_HUSH_IF is not set +# CONFIG_HUSH_LOOPS is not set +# CONFIG_HUSH_CASE is not set +# CONFIG_HUSH_FUNCTIONS is not set +# CONFIG_HUSH_LOCAL is not set +# CONFIG_HUSH_RANDOM_SUPPORT is not set +# CONFIG_HUSH_EXPORT_N is not set +# CONFIG_HUSH_MODE_X is not set +# CONFIG_MSH is not set +CONFIG_FEATURE_SH_IS_ASH=y +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_NONE is not set +# CONFIG_FEATURE_BASH_IS_ASH is not set +# CONFIG_FEATURE_BASH_IS_HUSH is not set +CONFIG_FEATURE_BASH_IS_NONE=y +CONFIG_SH_MATH_SUPPORT=y +# CONFIG_SH_MATH_SUPPORT_64 is not set +CONFIG_FEATURE_SH_EXTRA_QUIET=y +# CONFIG_FEATURE_SH_STANDALONE is not set +# CONFIG_FEATURE_SH_NOFORK is not set +# CONFIG_FEATURE_SH_HISTFILESIZE is not set + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +CONFIG_FEATURE_ROTATE_LOGFILE=y +CONFIG_FEATURE_REMOTE_LOG=y +# CONFIG_FEATURE_SYSLOGD_DUP is not set +# CONFIG_FEATURE_SYSLOGD_CFG is not set +CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256 +# CONFIG_FEATURE_IPC_SYSLOG is not set +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0 +# CONFIG_LOGREAD is not set +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +# CONFIG_FEATURE_KMSG_SYSLOG is not set +CONFIG_KLOGD=y +CONFIG_FEATURE_KLOGD_KLOGCTL=y +CONFIG_LOGGER=y diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk index 2a1b8397bc..ad8bdaf702 100644 --- a/package/busybox/busybox.mk +++ b/package/busybox/busybox.mk @@ -1,8 +1,8 @@ -############################################################# +################################################################################ # # busybox # -############################################################# +################################################################################ ifeq ($(BR2_PACKAGE_BUSYBOX_SNAPSHOT),y) BUSYBOX_VERSION = snapshot @@ -12,14 +12,36 @@ BUSYBOX_VERSION = $(call qstrip,$(BR2_BUSYBOX_VERSION)) BUSYBOX_SITE = http://www.busybox.net/downloads endif BUSYBOX_SOURCE = busybox-$(BUSYBOX_VERSION).tar.bz2 +BUSYBOX_LICENSE = GPLv2 +BUSYBOX_LICENSE_FILES = LICENSE + +BUSYBOX_CFLAGS = \ + $(TARGET_CFLAGS) + +BUSYBOX_LDFLAGS = \ + $(TARGET_LDFLAGS) + +# Link against libtirpc if available so that we can leverage its RPC +# support for NFS mounting with Busybox +ifeq ($(BR2_PACKAGE_LIBTIRPC),y) +BUSYBOX_DEPENDENCIES += libtirpc +BUSYBOX_CFLAGS += -I$(STAGING_DIR)/usr/include/tirpc/ +# Don't use LDFLAGS for -ltirpc, because LDFLAGS is used for +# the non-final link of modules as well. +BUSYBOX_CFLAGS_busybox += -ltirpc +endif + BUSYBOX_BUILD_CONFIG = $(BUSYBOX_DIR)/.config # Allows the build system to tweak CFLAGS -BUSYBOX_MAKE_ENV = $(TARGET_MAKE_ENV) CFLAGS="$(TARGET_CFLAGS) -I$(LINUX_HEADERS_DIR)/include" +BUSYBOX_MAKE_ENV = \ + $(TARGET_MAKE_ENV) \ + CFLAGS="$(BUSYBOX_CFLAGS)" \ + CFLAGS_busybox="$(BUSYBOX_CFLAGS_busybox)" BUSYBOX_MAKE_OPTS = \ CC="$(TARGET_CC)" \ ARCH=$(KERNEL_ARCH) \ PREFIX="$(TARGET_DIR)" \ - EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \ + EXTRA_LDFLAGS="$(BUSYBOX_LDFLAGS)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ CONFIG_PREFIX="$(TARGET_DIR)" \ SKIP_STRIP=y @@ -28,10 +50,22 @@ ifndef BUSYBOX_CONFIG_FILE BUSYBOX_CONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_BUSYBOX_CONFIG)) endif +define BUSYBOX_PERMISSIONS +/bin/busybox f 4755 0 0 - - - - - +/usr/share/udhcpc/default.script f 755 0 0 - - - - - +endef + # If mdev will be used for device creation enable it and copy S10mdev to /etc/init.d ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),y) define BUSYBOX_INSTALL_MDEV_SCRIPT - install -m 0755 package/busybox/S10mdev $(TARGET_DIR)/etc/init.d + [ -f $(TARGET_DIR)/etc/init.d/S10mdev ] || \ + install -D -m 0755 package/busybox/S10mdev \ + $(TARGET_DIR)/etc/init.d/S10mdev +endef +define BUSYBOX_INSTALL_MDEV_CONF + [ -f $(TARGET_DIR)/etc/mdev.conf ] || \ + install -D -m 0644 package/busybox/mdev.conf \ + $(TARGET_DIR)/etc/mdev.conf endef define BUSYBOX_SET_MDEV $(call KCONFIG_ENABLE_OPT,CONFIG_MDEV,$(BUSYBOX_BUILD_CONFIG)) @@ -41,22 +75,16 @@ define BUSYBOX_SET_MDEV endef endif -# If we have external syslogd, force busybox to use it -ifeq ($(BR2_PACKAGE_SYSKLOGD),y) -define BUSYBOX_SET_SYSKLOGD - @$(SED) "/#include.*busybox\.h/a#define CONFIG_SYSLOGD" \ - $(BUSYBOX_DIR)/init/init.c +ifeq ($(BR2_USE_MMU),y) +define BUSYBOX_SET_MMU + $(call KCONFIG_DISABLE_OPT,CONFIG_NOMMU,$(BUSYBOX_BUILD_CONFIG)) endef -endif - -# id applet breaks on >=1.13.0 with old uclibc unless the bb pwd routines are used -ifeq ($(BR2_BUSYBOX_VERSION_1_13_X)$(BR2_BUSYBOX_VERSION_1_14_X)$(BR2_UCLIBC_VERSION_0_9_29),yy) -define BUSYBOX_SET_BB_PWD - if grep -q 'CONFIG_ID=y' $(BUSYBOX_BUILD_CONFIG); \ - then \ - echo 'warning: CONFIG_ID needs BB_PWD_GRP with old uclibc, enabling' >&2;\ - $(SED) "s/^.*CONFIG_USE_BB_PWD_GRP.*/CONFIG_USE_BB_PWD_GRP=y/;" $(BUSYBOX_BUILD_CONFIG); \ - fi +else +define BUSYBOX_SET_MMU + $(call KCONFIG_ENABLE_OPT,CONFIG_NOMMU,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_DISABLE_OPT,CONFIG_SWAPONOFF,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_DISABLE_OPT,CONFIG_ASH,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_HUSH,$(BUSYBOX_BUILD_CONFIG)) endef endif @@ -85,26 +113,11 @@ define BUSYBOX_SET_IPV6 endef endif -# If RPC is enabled then enable nfs mounts -ifeq ($(BR2_INET_RPC),y) -define BUSYBOX_SET_RPC - $(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_MOUNT_NFS,$(BUSYBOX_BUILD_CONFIG)) -endef -else -define BUSYBOX_SET_RPC - $(call KCONFIG_DISABLE_OPT,CONFIG_FEATURE_MOUNT_NFS,$(BUSYBOX_BUILD_CONFIG)) -endef -endif - # If we're using static libs do the same for busybox ifeq ($(BR2_PREFER_STATIC_LIB),y) define BUSYBOX_PREFER_STATIC $(call KCONFIG_ENABLE_OPT,CONFIG_STATIC,$(BUSYBOX_BUILD_CONFIG)) endef -else -define BUSYBOX_PREFER_STATIC - $(call KCONFIG_DISABLE_OPT,CONFIG_STATIC,$(BUSYBOX_BUILD_CONFIG)) -endef endif # Disable usage of inetd if netkit-base package is selected @@ -125,19 +138,55 @@ define BUSYBOX_COPY_CONFIG cp -f $(BUSYBOX_CONFIG_FILE) $(BUSYBOX_BUILD_CONFIG) endef +# Disable shadow passwords support if unsupported by the C library +ifeq ($(BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS),) +define BUSYBOX_INTERNAL_SHADOW_PASSWORDS + $(call KCONFIG_ENABLE_OPT,CONFIG_USE_BB_PWD_GRP,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_USE_BB_SHADOW,$(BUSYBOX_BUILD_CONFIG)) +endef +endif + +ifeq ($(BR2_INIT_BUSYBOX),y) +define BUSYBOX_SET_INIT + $(call KCONFIG_ENABLE_OPT,CONFIG_INIT,$(BUSYBOX_BUILD_CONFIG)) +endef +endif + +define BUSYBOX_INSTALL_LOGGING_SCRIPT + if grep -q CONFIG_SYSLOGD=y $(@D)/.config; then \ + [ -f $(TARGET_DIR)/etc/init.d/S01logging ] || \ + $(INSTALL) -m 0755 -D package/busybox/S01logging \ + $(TARGET_DIR)/etc/init.d/S01logging; \ + else rm -f $(TARGET_DIR)/etc/init.d/S01logging; fi +endef + +ifeq ($(BR2_PACKAGE_BUSYBOX_WATCHDOG),y) +define BUSYBOX_SET_WATCHDOG + $(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG,$(BUSYBOX_BUILD_CONFIG)) +endef +define BUSYBOX_INSTALL_WATCHDOG_SCRIPT + [ -f $(TARGET_DIR)/etc/init.d/S15watchdog ] || \ + install -D -m 0755 package/busybox/S15watchdog \ + $(TARGET_DIR)/etc/init.d/S15watchdog && \ + sed -i s/PERIOD/$(call qstrip,$(BR2_PACKAGE_BUSYBOX_WATCHDOG_PERIOD))/ \ + $(TARGET_DIR)/etc/init.d/S15watchdog +endef +endif + # We do this here to avoid busting a modified .config in configure BUSYBOX_POST_EXTRACT_HOOKS += BUSYBOX_COPY_CONFIG define BUSYBOX_CONFIGURE_CMDS - $(BUSYBOX_SET_SYSKLOGD) - $(BUSYBOX_SET_BB_PWD) + $(BUSYBOX_SET_MMU) $(BUSYBOX_SET_LARGEFILE) $(BUSYBOX_SET_IPV6) - $(BUSYBOX_SET_RPC) $(BUSYBOX_PREFER_STATIC) $(BUSYBOX_SET_MDEV) $(BUSYBOX_NETKITBASE) $(BUSYBOX_NETKITTELNET) + $(BUSYBOX_INTERNAL_SHADOW_PASSWORDS) + $(BUSYBOX_SET_INIT) + $(BUSYBOX_SET_WATCHDOG) @yes "" | $(MAKE) ARCH=$(KERNEL_ARCH) CROSS_COMPILE="$(TARGET_CROSS)" \ -C $(@D) oldconfig endef @@ -153,6 +202,9 @@ define BUSYBOX_INSTALL_TARGET_CMDS $(TARGET_DIR)/usr/share/udhcpc/default.script; \ fi $(BUSYBOX_INSTALL_MDEV_SCRIPT) + $(BUSYBOX_INSTALL_MDEV_CONF) + $(BUSYBOX_INSTALL_LOGGING_SCRIPT) + $(BUSYBOX_INSTALL_WATCHDOG_SCRIPT) endef define BUSYBOX_UNINSTALL_TARGET_CMDS @@ -163,12 +215,13 @@ define BUSYBOX_CLEAN_CMDS $(BUSYBOX_MAKE_ENV) $(MAKE) $(BUSYBOX_MAKE_OPTS) -C $(@D) clean endef -$(eval $(call GENTARGETS,package,busybox)) +$(eval $(generic-package)) -busybox-menuconfig: $(BUSYBOX_DIR)/.stamp_extracted - $(BUSYBOX_MAKE_ENV) $(MAKE) $(BUSYBOX_MAKE_OPTS) -C $(BUSYBOX_DIR) menuconfig +busybox-menuconfig busybox-xconfig busybox-gconfig: busybox-patch + $(BUSYBOX_MAKE_ENV) $(MAKE) $(BUSYBOX_MAKE_OPTS) -C $(BUSYBOX_DIR) \ + $(subst busybox-,,$@) rm -f $(BUSYBOX_DIR)/.stamp_built rm -f $(BUSYBOX_DIR)/.stamp_target_installed -busybox-update: +busybox-update-config: busybox-configure cp -f $(BUSYBOX_BUILD_CONFIG) $(BUSYBOX_CONFIG_FILE) diff --git a/package/busybox/mdev.conf b/package/busybox/mdev.conf new file mode 100644 index 0000000000..247c0ed02d --- /dev/null +++ b/package/busybox/mdev.conf @@ -0,0 +1,35 @@ +# null may already exist; therefore ownership has to be changed with command +null root:root 666 @chmod 666 $MDEV +zero root:root 666 +full root:root 666 +random root:root 444 +urandom root:root 444 +hwrandom root:root 444 +grsec root:root 660 + +kmem root:root 640 +mem root:root 640 +port root:root 640 +# console may already exist; therefore ownership has to be changed with command +console root:tty 600 @chmod 600 $MDEV +ptmx root:tty 666 +pty.* root:tty 660 + +# Typical devices +tty root:tty 666 +tty[0-9]* root:tty 660 +vcsa*[0-9]* root:tty 660 +ttyS[0-9]* root:root 660 + +# alsa sound devices +pcm.* root:audio 660 =snd/ +control.* root:audio 660 =snd/ +midi.* root:audio 660 =snd/ +seq root:audio 660 =snd/ +timer root:audio 660 =snd/ + +# input stuff +event[0-9]+ root:root 640 =input/ +mice root:root 640 =input/ +mouse[0-9] root:root 640 =input/ +ts[0-9] root:root 600 =input/ diff --git a/package/busybox/udhcpc.script b/package/busybox/udhcpc.script index a52a7f8122..43742fbd53 100755 --- a/package/busybox/udhcpc.script +++ b/package/busybox/udhcpc.script @@ -10,10 +10,31 @@ RESOLV_CONF="/etc/resolv.conf" case "$1" in deconfig) + /sbin/ifconfig $interface up /sbin/ifconfig $interface 0.0.0.0 + + # drop info from this interface + # resolv.conf may be a symlink to /tmp/, so take care + TMPFILE=$(mktemp) + grep -vE "# $interface\$" $RESOLV_CONF > $TMPFILE + cat $TMPFILE > $RESOLV_CONF + rm -f $TMPFILE + + if [ -x /usr/sbin/avahi-autoipd ]; then + /usr/sbin/avahi-autoipd -k $interface + fi + ;; + + leasefail|nak) + if [ -x /usr/sbin/avahi-autoipd ]; then + /usr/sbin/avahi-autoipd -wD $interface --no-chroot + fi ;; renew|bound) + if [ -x /usr/sbin/avahi-autoipd ]; then + /usr/sbin/avahi-autoipd -k $interface + fi /sbin/ifconfig $interface $ip $BROADCAST $NETMASK if [ -n "$router" ] ; then @@ -27,11 +48,17 @@ case "$1" in done fi - echo -n > $RESOLV_CONF - [ -n "$domain" ] && echo search $domain >> $RESOLV_CONF + # drop info from this interface + # resolv.conf may be a symlink to /tmp/, so take care + TMPFILE=$(mktemp) + grep -vE "# $interface\$" $RESOLV_CONF > $TMPFILE + cat $TMPFILE > $RESOLV_CONF + rm -f $TMPFILE + + [ -n "$domain" ] && echo "search $domain # $interface" >> $RESOLV_CONF for i in $dns ; do echo adding dns $i - echo nameserver $i >> $RESOLV_CONF + echo "nameserver $i # $interface" >> $RESOLV_CONF done ;; esac diff --git a/package/bwm-ng/Config.in b/package/bwm-ng/Config.in new file mode 100644 index 0000000000..25e7cbe8f7 --- /dev/null +++ b/package/bwm-ng/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_BWM_NG + bool "bwm-ng" + help + Bandwidth Monitor NG is a small and console-based live + network and disk-io bandwidth monitor for Linux, BSD, + Solaris, Mac OS X and others. + + http://sourceforge.net/projects/bwmng/ diff --git a/package/bwm-ng/bwm-ng.mk b/package/bwm-ng/bwm-ng.mk new file mode 100644 index 0000000000..b7dc8b2a56 --- /dev/null +++ b/package/bwm-ng/bwm-ng.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# bwm-ng +# +################################################################################ + +BWM_NG_VERSION = 0.6 +BWM_NG_SITE = http://downloads.sourceforge.net/project/bwmng/bwmng/$(BWM_NG_VERSION)/ +BWM_NG_CONF_OPT = --with-procnetdev --with-diskstats +BWM_NG_LICENSE = GPLv2 +BWM_NG_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_NCURSES),y) +BWM_NG_CONF_OPT += --with-ncurses +BWM_NG_DEPENDENCIES += ncurses +endif + +$(eval $(autotools-package)) diff --git a/package/bzip2/bzip2-build-objects-twice.patch b/package/bzip2/bzip2-build-objects-twice.patch new file mode 100644 index 0000000000..9bde0f6488 --- /dev/null +++ b/package/bzip2/bzip2-build-objects-twice.patch @@ -0,0 +1,56 @@ +Build objects twice for shared and static libraries + +The existing Makefile causes problems on MIPS because the same object +files (not compiled with -fPIC) are used in static and shared libraries. +MIPS will refuce to link non-pic objects in shared libraries. +We fix this problems by creating a new rule for the shared library +and build the shared objects as *.sho instead of *.o. +Then, we use these objects to create the shared library. + +Signed-off-by: Markos Chandras + +Index: bzip2-1.0.6/Makefile-libbz2_so +=================================================================== +--- bzip2-1.0.6.orig/Makefile-libbz2_so ++++ bzip2-1.0.6/Makefile-libbz2_so +@@ -25,13 +25,13 @@ SHELL=/bin/sh + CC=gcc + override CFLAGS += -fpic -fPIC -Wall + +-OBJS= blocksort.o \ +- huffman.o \ +- crctable.o \ +- randtable.o \ +- compress.o \ +- decompress.o \ +- bzlib.o ++OBJS= blocksort.sho \ ++ huffman.sho \ ++ crctable.sho \ ++ randtable.sho \ ++ compress.sho \ ++ decompress.sho \ ++ bzlib.sho + + all: $(OBJS) + $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS) +@@ -45,17 +45,5 @@ install: + clean: + rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared + +-blocksort.o: blocksort.c +- $(CC) $(CFLAGS) -c blocksort.c +-huffman.o: huffman.c +- $(CC) $(CFLAGS) -c huffman.c +-crctable.o: crctable.c +- $(CC) $(CFLAGS) -c crctable.c +-randtable.o: randtable.c +- $(CC) $(CFLAGS) -c randtable.c +-compress.o: compress.c +- $(CC) $(CFLAGS) -c compress.c +-decompress.o: decompress.c +- $(CC) $(CFLAGS) -c decompress.c +-bzlib.o: bzlib.c +- $(CC) $(CFLAGS) -c bzlib.c ++%.sho: %.c ++ $(CC) $(CFLAGS) -o $@ -c $< diff --git a/package/bzip2/bzip2-improve-build-system.patch b/package/bzip2/bzip2-improve-build-system.patch new file mode 100644 index 0000000000..90099aa288 --- /dev/null +++ b/package/bzip2/bzip2-improve-build-system.patch @@ -0,0 +1,84 @@ +Improve bzip2 build system + +This patch makes a number of improvements to the bzip2 build system: + + * Remove the BIGFILE variable that was used to force largefile + support. Now, the user of the Makefile is supposed to pass + -D_FILE_OFFSET_BITS=64 when largefile support is desired. + + * Use override CFLAGS += so that additional CFLAGS can be passed on + the command line. + + * Removed "forced" CFLAGS -O2, -g and -Winline. We don't want them by + default, and want the build system to use its own ones. + + * When creating the symbolic links bzegrep, bzfgrep, bzless and + bzcmp, don't link them to an absolute path, or they'll point to + some path on the build machine. + + * Provide an install target for the shared library, which creates the + appropriate symbolic links. + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -20,8 +20,7 @@ + RANLIB=ranlib + LDFLAGS= + +-BIGFILES=-D_FILE_OFFSET_BITS=64 +-CFLAGS=-Wall -Winline -O2 -g $(BIGFILES) ++override CFLAGS += -Wall + + # Where you want it installed when you do 'make install' + PREFIX=/usr/local +@@ -90,14 +89,14 @@ + cp -f libbz2.a $(PREFIX)/lib + chmod a+r $(PREFIX)/lib/libbz2.a + cp -f bzgrep $(PREFIX)/bin/bzgrep +- ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep +- ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep ++ ln -s -f bzgrep $(PREFIX)/bin/bzegrep ++ ln -s -f bzgrep $(PREFIX)/bin/bzfgrep + chmod a+x $(PREFIX)/bin/bzgrep + cp -f bzmore $(PREFIX)/bin/bzmore +- ln -s -f $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless ++ ln -s -f bzmore $(PREFIX)/bin/bzless + chmod a+x $(PREFIX)/bin/bzmore + cp -f bzdiff $(PREFIX)/bin/bzdiff +- ln -s -f $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp ++ ln -s -f bzdiff $(PREFIX)/bin/bzcmp + chmod a+x $(PREFIX)/bin/bzdiff + cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1 + chmod a+r $(PREFIX)/man/man1/bzgrep.1 +Index: b/Makefile-libbz2_so +=================================================================== +--- a/Makefile-libbz2_so ++++ b/Makefile-libbz2_so +@@ -23,8 +23,7 @@ + + SHELL=/bin/sh + CC=gcc +-BIGFILES=-D_FILE_OFFSET_BITS=64 +-CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES) ++override CFLAGS += -fpic -fPIC -Wall + + OBJS= blocksort.o \ + huffman.o \ +@@ -37,8 +36,11 @@ + all: $(OBJS) + $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS) + $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6 +- rm -f libbz2.so.1.0 +- ln -s libbz2.so.1.0.6 libbz2.so.1.0 ++ ++install: ++ install -m 0755 -D libbz2.so.1.0.6 $(PREFIX)/lib/libbz2.so.1.0.6 ++ ln -sf libbz2.so.1.0.6 $(PREFIX)/lib/libbz2.so ++ ln -sf libbz2.so.1.0.6 $(PREFIX)/lib/libbz2.so.1.0 + + clean: + rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared diff --git a/package/bzip2/bzip2.mk b/package/bzip2/bzip2.mk index 123e579fc2..45d5108fd2 100644 --- a/package/bzip2/bzip2.mk +++ b/package/bzip2/bzip2.mk @@ -1,74 +1,54 @@ -############################################################# +################################################################################ # # bzip2 # -############################################################# -BZIP2_VERSION:=1.0.5 -BZIP2_SONAME=1.0.4 -BZIP2_SOURCE:=bzip2-$(BZIP2_VERSION).tar.gz -BZIP2_SITE:=http://www.bzip.org/$(BZIP2_VERSION) -BZIP2_INSTALL_STAGING=YES +################################################################################ -define BZIP2_FIX_MAKEFILE - $(SED) "s,ln \$$(,ln -snf \$$(,g" $(@D)/Makefile - $(SED) "s,ln -s (lib.*),ln -snf \$$1; ln -snf libbz2.so.$(BZIP2_SONAME) \ - libbz2.so,g" $(@D)/Makefile-libbz2_so - $(SED) "s:-O2:$(TARGET_CFLAGS):" $(@D)/Makefile - $(SED) "s:-O2:$(TARGET_CFLAGS):" $(@D)/Makefile-libbz2_so -endef - -BZIP2_POST_PATCH_HOOKS += BZIP2_FIX_MAKEFILE +BZIP2_VERSION = 1.0.6 +BZIP2_SITE = http://www.bzip.org/$(BZIP2_VERSION) +BZIP2_INSTALL_STAGING = YES +BZIP2_LICENSE = bzip2 license +BZIP2_LICENSE_FILES = LICENSE -define BZIP2_NOLARGEFILE_FIX_MAKEFILE - $(SED) "s,^BIGFILES,#BIGFILES,g" $(@D)/Makefile - $(SED) "s,^BIGFILES,#BIGFILES,g" $(@D)/Makefile-libbz2_so +ifeq ($(BR2_PREFER_STATIC_LIB),) +define BZIP2_BUILD_SHARED_CMDS + $(TARGET_MAKE_ENV) + $(MAKE) -C $(@D) -f Makefile-libbz2_so $(TARGET_CONFIGURE_OPTS) endef - -ifneq ($(BR2_LARGEFILE),y) -BZIP2_POST_PATCH_HOOKS += BZIP2_NOLARGEFILE_FIX_MAKEFILE endif define BZIP2_BUILD_CMDS - $(TARGET_MAKE_ENV) \ - $(MAKE) -C $(@D) -f Makefile-libbz2_so \ - CC="$(TARGET_CC)" RANLIB="$(TARGET_RANLIB)" AR="$(TARGET_AR)" - $(TARGET_MAKE_ENV) \ - $(MAKE) -C $(@D) \ - CC="$(TARGET_CC)" RANLIB="$(TARGET_RANLIB)" AR="$(TARGET_AR)" \ - libbz2.a bzip2 bzip2recover + $(TARGET_MAKE_ENV) + $(MAKE) -C $(@D) libbz2.a bzip2 bzip2recover $(TARGET_CONFIGURE_OPTS) + $(BZIP2_BUILD_SHARED_CMDS) endef +ifeq ($(BR2_PREFER_STATIC_LIB),) +define BZIP2_INSTALL_STAGING_SHARED_CMDS + $(TARGET_MAKE_ENV) $(MAKE) \ + -f Makefile-libbz2_so PREFIX=$(STAGING_DIR)/usr -C $(@D) install +endef +endif + define BZIP2_INSTALL_STAGING_CMDS - $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) \ - $(MAKE) PREFIX=$(STAGING_DIR)/usr -C $(@D) install - $(INSTALL) -m 0755 -d $(STAGING_DIR)/usr/lib - cp $(@D)/libbz2.so.$(BZIP2_SONAME) $(STAGING_DIR)/usr/lib/ - cp $(@D)/libbz2.a $(STAGING_DIR)/usr/lib/ - (cd $(STAGING_DIR)/usr/lib/; \ - ln -snf libbz2.so.$(BZIP2_SONAME) libbz2.so; \ - ln -snf libbz2.so.$(BZIP2_SONAME) libbz2.so.1.0; \ - ln -snf libbz2.so.$(BZIP2_SONAME) libbz2.so.1; \ - ) + $(TARGET_MAKE_ENV) $(MAKE) \ + PREFIX=$(STAGING_DIR)/usr -C $(@D) install + $(BZIP2_INSTALL_STAGING_SHARED_CMDS) endef +ifeq ($(BR2_PREFER_STATIC_LIB),) +define BZIP2_INSTALL_TARGET_SHARED_CMDS + $(TARGET_MAKE_ENV) $(MAKE) \ + -f Makefile-libbz2_so PREFIX=$(TARGET_DIR)/usr -C $(@D) install +endef +endif + # make sure busybox doesn't get overwritten by make install define BZIP2_INSTALL_TARGET_CMDS rm -f $(addprefix $(TARGET_DIR)/usr/bin/,bzip2 bunzip2 bzcat) - $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) \ - $(MAKE) PREFIX=$(TARGET_DIR)/usr -C $(@D) install - cp $(@D)/libbz2.so.$(BZIP2_SONAME) $(TARGET_DIR)/usr/lib/ - (cd $(TARGET_DIR)/usr/lib; \ - ln -snf libbz2.so.$(BZIP2_SONAME) libbz2.so.1.0; \ - ln -snf libbz2.so.$(BZIP2_SONAME) libbz2.so; \ - ) - (cd $(TARGET_DIR)/usr/bin; \ - ln -snf bzip2 bunzip2; \ - ln -snf bzip2 bzcat; \ - ln -snf bzdiff bzcmp; \ - ln -snf bzmore bzless; \ - ln -snf bzgrep bzegrep; \ - ln -snf bzgrep bzfgrep; \ - ) + $(TARGET_MAKE_ENV) $(MAKE) \ + PREFIX=$(TARGET_DIR)/usr -C $(@D) install + $(BZIP2_INSTALL_TARGET_SHARED_CMDS) endef define BZIP2_CLEAN_CMDS @@ -81,25 +61,17 @@ define BZIP2_CLEAN_CMDS -$(MAKE) -C $(@D) clean endef -define HOST_BZIP2_FIX_MAKEFILE - $(SED) "s,ln \$$(,ln -snf \$$(,g" $(@D)/Makefile - $(SED) "s,ln -s (lib.*),ln -snf \$$1; ln -snf libbz2.so.$(BZIP2_SONAME) \ - libbz2.so,g" $(@D)/Makefile-libbz2_so - $(SED) "s:-O2:$(HOST_CFLAGS):" $(@D)/Makefile - $(SED) "s:-O2:$(HOST_CFLAGS):" $(@D)/Makefile-libbz2_so -endef - -HOST_BZIP2_POST_PATCH_HOOKS += HOST_BZIP2_FIX_MAKEFILE - define HOST_BZIP2_BUILD_CMDS - $(HOST_MAKE_ENV) $(MAKE) -C $(@D) -f Makefile-libbz2_so - $(HOST_MAKE_ENV) $(MAKE) -C $(@D) libbz2.a bzip2 bzip2recover + $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) \ + $(MAKE) -C $(@D) -f Makefile-libbz2_so + $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) \ + $(MAKE) -C $(@D) libbz2.a bzip2 bzip2recover endef define HOST_BZIP2_INSTALL_CMDS $(HOST_MAKE_ENV) \ - $(MAKE) PREFIX=$(HOST_DIR)/usr -C $(@D) install + $(MAKE) PREFIX=$(HOST_DIR)/usr -C $(@D) install endef -$(eval $(call GENTARGETS,package,bzip2)) -$(eval $(call GENTARGETS,package,bzip2,host)) \ No newline at end of file +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/cache-calibrator/Config.in b/package/cache-calibrator/Config.in new file mode 100644 index 0000000000..db780e9fcd --- /dev/null +++ b/package/cache-calibrator/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_CACHE_CALIBRATOR + bool "cache-calibrator" + help + Cache calibrator is a small C program that is supposed to + analyze a computers (cache-) memory system and extract + useful information + + http://homepages.cwi.nl/~manegold/Calibrator/ + + It is also recommended as a load generator for realtime + testing in: + + https://rt.wiki.kernel.org/index.php/RT_PREEMPT_HOWTO diff --git a/package/cache-calibrator/cache-calibrator-Fix-conflicting-round-function.patch b/package/cache-calibrator/cache-calibrator-Fix-conflicting-round-function.patch new file mode 100644 index 0000000000..71181a6387 --- /dev/null +++ b/package/cache-calibrator/cache-calibrator-Fix-conflicting-round-function.patch @@ -0,0 +1,108 @@ +From 39ac7268c4350040976005da98daf10edf676d3e Mon Sep 17 00:00:00 2001 +From: Stephan Hoffmann +Date: Mon, 28 Jan 2013 17:32:10 +0100 +Subject: [PATCH] Fix conflicting round() function + +calibrator.c defines a local round() function that conflicts +with the one from the standard library. + +This is fixed by renaming the local function. + +Signed-off-by: Stephan Hoffmann +--- + calibrator.c | 30 +++++++++++++++--------------- + 1 files changed, 15 insertions(+), 15 deletions(-) + +diff --git a/calibrator.c b/calibrator.c +index e045dfd..8471c04 100644 +--- a/calibrator.c ++++ b/calibrator.c +@@ -128,7 +128,7 @@ void ErrXit(char *format, ...) { + exit(1); + } + +-lng round(dbl x) ++lng lng_round(dbl x) + { + return (lng)(x + 0.5); + } +@@ -890,16 +890,16 @@ void plotCache(cacheInfo *cache, lng **result, lng MHz, char *fn, FILE *fp, lng + fprintf(fp, ")\n"); + fprintf(fp, "set y2tics"); + for (l = 0, s = " ("; l <= cache->levels; l++, s = ", ") { +- if (!delay) fprintf(fp, "%s'(%ld)' %f", s, round(CYperIt(cache->latency1[l] - delay)), NSperIt(cache->latency1[l] - delay)); +- else fprintf(fp, "%s'(%ld)' %f", s, round(CYperIt(cache->latency2[l] - delay)), NSperIt(cache->latency2[l] - delay)); ++ if (!delay) fprintf(fp, "%s'(%ld)' %f", s, lng_round(CYperIt(cache->latency1[l] - delay)), NSperIt(cache->latency1[l] - delay)); ++ else fprintf(fp, "%s'(%ld)' %f", s, lng_round(CYperIt(cache->latency2[l] - delay)), NSperIt(cache->latency2[l] - delay)); + } + for (y = 1; y <= yh; y *= 10) { + fprintf(fp, "%s'%1.3g' %ld", s, (dbl)(y * MHz) / 1000.0, y); + } + fprintf(fp, ")\n"); + for (l = 0; l <= cache->levels; l++) { +- if (!delay) z = (dbl)round(CYperIt(cache->latency1[l] - delay)) * 1000.0 / (dbl)MHz; +- else z = (dbl)round(CYperIt(cache->latency2[l] - delay)) * 1000.0 / (dbl)MHz; ++ if (!delay) z = (dbl)lng_round(CYperIt(cache->latency1[l] - delay)) * 1000.0 / (dbl)MHz; ++ else z = (dbl)lng_round(CYperIt(cache->latency2[l] - delay)) * 1000.0 / (dbl)MHz; + fprintf(fp, "set label %ld '(%1.3g) ' at %f,%f right\n", l + 1, z, xl, z); + fprintf(fp, "set arrow %ld from %f,%f to %f,%f nohead lt 0\n", l + 1, xl, z, xh, z); + } +@@ -986,16 +986,16 @@ void plotTLB(TLBinfo *TLB, lng **result, lng MHz, char *fn, FILE *fp, lng delay) + fprintf(fp, "%s'' %ld)\n", s, TLB->mincachelines); + fprintf(fp, "set y2tics"); + for (l = 0, s = " ("; l <= TLB->levels; l++, s = ", ") { +- if (!delay) fprintf(fp, "%s'(%ld)' %f", s, round(CYperIt(TLB->latency1[l] - delay)), NSperIt(TLB->latency1[l] - delay)); +- else fprintf(fp, "%s'(%ld)' %f", s, round(CYperIt(TLB->latency2[l] - delay)), NSperIt(TLB->latency2[l] - delay)); ++ if (!delay) fprintf(fp, "%s'(%ld)' %f", s, lng_round(CYperIt(TLB->latency1[l] - delay)), NSperIt(TLB->latency1[l] - delay)); ++ else fprintf(fp, "%s'(%ld)' %f", s, lng_round(CYperIt(TLB->latency2[l] - delay)), NSperIt(TLB->latency2[l] - delay)); + } + for (y = 1; y <= yh; y *= 10) { + fprintf(fp, "%s'%1.3g' %ld", s, (dbl)(y * MHz) / 1000.0, y); + } + fprintf(fp, ")\n"); + for (l = 0; l <= TLB->levels; l++) { +- if (!delay) z = (dbl)round(CYperIt(TLB->latency1[l] - delay)) * 1000.0 / (dbl)MHz; +- else z = (dbl)round(CYperIt(TLB->latency2[l] - delay)) * 1000.0 / (dbl)MHz; ++ if (!delay) z = (dbl)lng_round(CYperIt(TLB->latency1[l] - delay)) * 1000.0 / (dbl)MHz; ++ else z = (dbl)lng_round(CYperIt(TLB->latency2[l] - delay)) * 1000.0 / (dbl)MHz; + fprintf(fp, "set label %ld '(%1.3g) ' at %f,%f right\n", l + 1, z, xl, z); + fprintf(fp, "set arrow %ld from %f,%f to %f,%f nohead lt 0\n", l + 1, xl, z, xh, z); + } +@@ -1023,9 +1023,9 @@ void printCPU(cacheInfo *cache, lng MHz, lng delay) + FILE *fp = stdout; + + fprintf(fp, "CPU loop + L1 access: "); +- fprintf(fp, " %6.2f ns = %3ld cy\n", NSperIt(cache->latency1[0]), round(CYperIt(cache->latency1[0]))); ++ fprintf(fp, " %6.2f ns = %3ld cy\n", NSperIt(cache->latency1[0]), lng_round(CYperIt(cache->latency1[0]))); + fprintf(fp, " ( delay: "); +- fprintf(fp, " %6.2f ns = %3ld cy )\n", NSperIt(delay), round(CYperIt(delay))); ++ fprintf(fp, " %6.2f ns = %3ld cy )\n", NSperIt(delay), lng_round(CYperIt(delay))); + fprintf(fp, "\n"); + fflush(fp); + } +@@ -1047,8 +1047,8 @@ void printCache(cacheInfo *cache, lng MHz) + fprintf(fp, " %3ld KB ", cache->size[l] / 1024); + } + fprintf(fp, " %3ld bytes ", cache->linesize[l + 1]); +- fprintf(fp, " %6.2f ns = %3ld cy " , NSperIt(cache->latency2[l + 1] - cache->latency2[l]), round(CYperIt(cache->latency2[l + 1] - cache->latency2[l]))); +- fprintf(fp, " %6.2f ns = %3ld cy\n", NSperIt(cache->latency1[l + 1] - cache->latency1[l]), round(CYperIt(cache->latency1[l + 1] - cache->latency1[l]))); ++ fprintf(fp, " %6.2f ns = %3ld cy " , NSperIt(cache->latency2[l + 1] - cache->latency2[l]), lng_round(CYperIt(cache->latency2[l + 1] - cache->latency2[l]))); ++ fprintf(fp, " %6.2f ns = %3ld cy\n", NSperIt(cache->latency1[l + 1] - cache->latency1[l]), lng_round(CYperIt(cache->latency1[l + 1] - cache->latency1[l]))); + } + fprintf(fp, "\n"); + fflush(fp); +@@ -1075,9 +1075,9 @@ void printTLB(TLBinfo *TLB, lng MHz) + } else { + fprintf(fp, " %3ld KB ", TLB->pagesize[l + 1] / 1024); + } +- fprintf(fp, " %6.2f ns = %3ld cy ", NSperIt(TLB->latency2[l + 1] - TLB->latency2[l]), round(CYperIt(TLB->latency2[l + 1] - TLB->latency2[l]))); ++ fprintf(fp, " %6.2f ns = %3ld cy ", NSperIt(TLB->latency2[l + 1] - TLB->latency2[l]), lng_round(CYperIt(TLB->latency2[l + 1] - TLB->latency2[l]))); + /* +- fprintf(fp, " %6.2f ns = %3ld cy" , NSperIt(TLB->latency1[l + 1] - TLB->latency1[l]), round(CYperIt(TLB->latency1[l + 1] - TLB->latency1[l]))); ++ fprintf(fp, " %6.2f ns = %3ld cy" , NSperIt(TLB->latency1[l + 1] - TLB->latency1[l]), lng_round(CYperIt(TLB->latency1[l + 1] - TLB->latency1[l]))); + */ + fprintf(fp, "\n"); + } +-- +1.7.0.4 + diff --git a/package/cache-calibrator/cache-calibrator.mk b/package/cache-calibrator/cache-calibrator.mk new file mode 100644 index 0000000000..d0620655c7 --- /dev/null +++ b/package/cache-calibrator/cache-calibrator.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# cache-calibrator +# +################################################################################ + +CACHE_CALIBRATOR_SOURCE = calibrator.c +CACHE_CALIBRATOR_SITE = http://homepages.cwi.nl/~manegold/Calibrator/src +CACHE_CALIBRATOR_LICENSE = Cache calibrator license +CACHE_CALIBRATOR_LICENSE_FILES = calibrator.c + +define CACHE_CALIBRATOR_EXTRACT_CMDS + cp $(DL_DIR)/$(CACHE_CALIBRATOR_SOURCE) $(@D) +endef + +define CACHE_CALIBRATOR_BUILD_CMDS + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) $(@D)/calibrator.c -o $(@D)/cache_calibrator -lm +endef + +define CACHE_CALIBRATOR_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/cache_calibrator $(TARGET_DIR)/usr/bin/cache_calibrator +endef + +$(eval $(generic-package)) diff --git a/package/cairo/Config.in b/package/cairo/Config.in index 19c47231dd..9a177a744a 100644 --- a/package/cairo/Config.in +++ b/package/cairo/Config.in @@ -2,6 +2,8 @@ config BR2_PACKAGE_CAIRO bool "cairo" select BR2_PACKAGE_PIXMAN select BR2_PACKAGE_FONTCONFIG + select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7 help Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include @@ -27,9 +29,21 @@ config BR2_PACKAGE_CAIRO_PNG select BR2_PACKAGE_LIBPNG select BR2_PACKAGE_ZLIB +config BR2_PACKAGE_CAIRO_SCRIPT + bool "script support" + select BR2_PACKAGE_CAIRO_PNG + config BR2_PACKAGE_CAIRO_SVG bool "svg support" select BR2_PACKAGE_CAIRO_PNG select BR2_PACKAGE_CAIRO_PDF +config BR2_PACKAGE_CAIRO_TEE + bool "tee support" + +config BR2_PACKAGE_CAIRO_XML + bool "xml support" + select BR2_PACKAGE_CAIRO_PNG + endif + diff --git a/package/cairo/cairo-001-blackfin-build-fix.patch b/package/cairo/cairo-001-blackfin-build-fix.patch new file mode 100644 index 0000000000..94dff6bb0f --- /dev/null +++ b/package/cairo/cairo-001-blackfin-build-fix.patch @@ -0,0 +1,36 @@ +Fix build on platforms where __USER_LABEL_PREFIX__ is not empty + +On most platforms, a C language symbol and its assembly equivalent are +identical. However, on the Blackfin architecture, this isn't the case, +the corresponding C language symbol in assembly is prepended with a +"_". Blackfin therefore has __USER_LABEL_PREFIX__ defined to "_". + +Cairo already has some code to cope with __USER_LABEL_PREFIX__, but +this code isn't completely correct: it prepends both assembly symbols +and C symbols with __USER_LABEL_PREFIX__, which cannot work. + +This patch fixes that by using the existing slim_hidden_asmname() to +define assembly symbols, and introduce a new slim_hidden_realname() +for C symbols. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/cairo-compiler-private.h +=================================================================== +--- a/src/cairo-compiler-private.h ++++ b/src/cairo-compiler-private.h +@@ -93,12 +93,13 @@ + __asm__ (slim_hidden_asmname (internal)) + # define slim_hidden_def1(name, internal) \ + extern __typeof (name) EXT_##name __asm__(slim_hidden_asmname(name)) \ +- __attribute__((__alias__(slim_hidden_asmname(internal)))) ++ __attribute__((__alias__(slim_hidden_realname(internal)))) + # define slim_hidden_ulp slim_hidden_ulp1(__USER_LABEL_PREFIX__) + # define slim_hidden_ulp1(x) slim_hidden_ulp2(x) + # define slim_hidden_ulp2(x) #x + # define slim_hidden_asmname(name) slim_hidden_asmname1(name) + # define slim_hidden_asmname1(name) slim_hidden_ulp #name ++# define slim_hidden_realname(name) #name + #else + # define slim_hidden_proto(name) int _cairo_dummy_prototype(void) + # define slim_hidden_proto_no_warn(name) int _cairo_dummy_prototype(void) diff --git a/package/cairo/cairo-1.8.10-directfb.patch b/package/cairo/cairo-1.8.10-directfb.patch deleted file mode 100644 index 12a51ec5eb..0000000000 --- a/package/cairo/cairo-1.8.10-directfb.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/src/cairo-directfb-surface.c b/src/cairo-directfb-surface.c -index bb02dbf..65f2d55 100644 ---- a/src/cairo-directfb-surface.c -+++ b/src/cairo-directfb-surface.c -@@ -609,6 +609,8 @@ _cairo_directfb_surface_release_dest_image (void *abstract_surf - surface->dfbsurface->Blit (surface->dfbsurface, - buffer, NULL, - image_rect->x, image_rect->y)); -+ -+ surface->dfbsurface->ReleaseSource (surface->dfbsurface); - } - - cairo_surface_destroy (&image->base); -@@ -848,6 +850,9 @@ _directfb_finish_composite (cairo_directfb_surface_t *dst, - cairo_surface_attributes_t *src_attr) - { - _cairo_pattern_release_surface (src_pattern, src, src_attr); -+ -+ if (dst->dfbsurface) -+ dst->dfbsurface->ReleaseSource( dst->dfbsurface ); - } - #endif /* DFB_COMPOSITE || DFB_COMPOSITE_TRAPEZOIDS */ - -@@ -1555,6 +1560,7 @@ _directfb_acquire_font_cache (cairo_directfb_surface_t *surface, - - new_cache->dfbsurface->Blit (new_cache->dfbsurface, - cache->dfbsurface, NULL, 0, 0); -+ new_cache->dfbsurface->ReleaseSource (new_cache->dfbsurface); - - _directfb_destroy_font_cache (cache); - scaled_font->surface_private = cache = new_cache; -@@ -1778,6 +1784,7 @@ _cairo_directfb_surface_show_glyphs (void *abstract_dst, - RUN_CLIPPED (dst, NULL, - dst->dfbsurface->BatchBlit (dst->dfbsurface, - cache->dfbsurface, rects, points, num)); -+ dst->dfbsurface->ReleaseSource (dst->dfbsurface); - - return CAIRO_STATUS_SUCCESS; - } diff --git a/package/cairo/cairo.mk b/package/cairo/cairo.mk index 7955e08c31..347bb75250 100644 --- a/package/cairo/cairo.mk +++ b/package/cairo/cairo.mk @@ -1,14 +1,15 @@ -############################################################# +################################################################################ # # cairo # -############################################################# -CAIRO_VERSION = 1.8.10 -CAIRO_SOURCE = cairo-$(CAIRO_VERSION).tar.gz +################################################################################ + +CAIRO_VERSION = 1.12.10 +CAIRO_SOURCE = cairo-$(CAIRO_VERSION).tar.xz +CAIRO_LICENSE = LGPLv2.1+ +CAIRO_LICENSE_FILES = COPYING CAIRO_SITE = http://cairographics.org/releases -CAIRO_AUTORECONF = NO CAIRO_INSTALL_STAGING = YES -CAIRO_INSTALL_TARGET = YES CAIRO_CONF_ENV = ac_cv_func_posix_getpwuid_r=yes glib_cv_stack_grows=no \ glib_cv_uscore=no ac_cv_func_strtod=yes \ @@ -36,7 +37,15 @@ CAIRO_CONF_ENV = ac_cv_func_posix_getpwuid_r=yes glib_cv_stack_grows=no \ ac_cv_func_working_mktime=yes jm_cv_func_working_re_compile_pattern=yes \ ac_use_included_regex=no gl_cv_c_restrict=no -CAIRO_DEPENDENCIES = host-pkg-config fontconfig pixman +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),) + CAIRO_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) -DCAIRO_NO_MUTEX=1" +endif + +CAIRO_CONF_OPT = \ + --enable-trace=no \ + --enable-interpreter=no + +CAIRO_DEPENDENCIES = host-pkgconf fontconfig pixman ifeq ($(BR2_PACKAGE_DIRECTFB),y) CAIRO_CONF_OPT += --enable-directfb @@ -46,10 +55,17 @@ else endif ifeq ($(BR2_PACKAGE_XORG7),y) - CAIRO_CONF_OPT += --enable-xlib --with-x - CAIRO_DEPENDENCIES += xserver_xorg-server + CAIRO_CONF_OPT += --enable-xlib --enable-xcb --with-x + CAIRO_DEPENDENCIES += xlib_libX11 xlib_libXext else - CAIRO_CONF_OPT += --disable-xlib --without-x + CAIRO_CONF_OPT += --disable-xlib --disable-xcb --without-x +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXRENDER),y) + CAIRO_CONF_OPT += --enable-xlib-xrender + CAIRO_DEPENDENCIES += xlib_libXrender +else + CAIRO_CONF_OPT += --disable-xlib-xrender endif ifeq ($(BR2_PACKAGE_CAIRO_PS),y) @@ -73,18 +89,28 @@ else CAIRO_CONF_OPT += --disable-png endif +ifeq ($(BR2_PACKAGE_CAIRO_SCRIPT),y) + CAIRO_CONF_OPT += --enable-script +else + CAIRO_CONF_OPT += --disable-script +endif + ifeq ($(BR2_PACKAGE_CAIRO_SVG),y) CAIRO_CONF_OPT += --enable-svg else CAIRO_CONF_OPT += --disable-svg endif -HOST_CAIRO_CONF_OPT = \ - --enable-ps \ - --enable-pdf \ - --enable-xlib \ - --with-x \ - --disable-png \ - --disable-svg +ifeq ($(BR2_PACKAGE_CAIRO_TEE),y) + CAIRO_CONF_OPT += --enable-tee +else + CAIRO_CONF_OPT += --disable-tee +endif + +ifeq ($(BR2_PACKAGE_CAIRO_XML),y) + CAIRO_CONF_OPT += --enable-xml +else + CAIRO_CONF_OPT += --disable-xml +endif -$(eval $(call AUTOTARGETS,package,cairo)) +$(eval $(autotools-package)) diff --git a/package/can-utils/Config.in b/package/can-utils/Config.in new file mode 100644 index 0000000000..d5d429761d --- /dev/null +++ b/package/can-utils/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_CAN_UTILS + bool "can-utils" + depends on BR2_USE_MMU # fork() + help + SocketCAN is a set of open source CAN drivers and a + networking stack. + This package provides various tools for this stack. + + http://developer.berlios.de/projects/socketcan/ diff --git a/package/can-utils/can-utils.mk b/package/can-utils/can-utils.mk new file mode 100644 index 0000000000..743fe7ce0b --- /dev/null +++ b/package/can-utils/can-utils.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# can-utils +# +################################################################################ + +CAN_UTILS_VERSION = 16c970d40e6c19dde705bad4751bab1a3a4f3a0d +CAN_UTILS_SITE = git://gitorious.org/linux-can/can-utils.git +CAN_UTILS_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/ccache/Config.in b/package/ccache/Config.in index f4f7f8f9cb..41ace52de6 100644 --- a/package/ccache/Config.in +++ b/package/ccache/Config.in @@ -1,9 +1,13 @@ config BR2_PACKAGE_CCACHE bool "ccache" + # needs fork() + depends on BR2_USE_MMU + # We no longer support a toolchain on the target + depends on BR2_DEPRECATED help ccache is a compiler cache. It speeds up recompilation by caching previous compilations and detecting when the same compilation is being done again - http://samba.ccache.org + http://ccache.samba.org diff --git a/package/ccache/ccache.mk b/package/ccache/ccache.mk index dd25b76f14..82a53f34c9 100644 --- a/package/ccache/ccache.mk +++ b/package/ccache/ccache.mk @@ -1,33 +1,56 @@ -############################################################# +################################################################################ # # ccache # -############################################################# +################################################################################ -CCACHE_VERSION = 3.1.4 +CCACHE_VERSION = 3.1.8 CCACHE_SITE = http://samba.org/ftp/ccache -CCACHE_SOURCE = ccache-$(CCACHE_VERSION).tar.bz2 +CCACHE_SOURCE = ccache-$(CCACHE_VERSION).tar.xz +CCACHE_LICENSE = GPLv3+, others +CCACHE_LICENSE_FILES = LICENSE.txt GPL-3.0.txt -# When ccache is being built for the host, ccache is not yet -# available, so we have to use the special C compiler without the -# cache. -HOST_CCACHE_CONF_ENV = \ - CC="$(HOSTCC_NOCCACHE)" +# Force ccache to use its internal zlib. The problem is that without +# this, ccache would link against the zlib of the build system, but we +# might build and install a different version of zlib in $(O)/host +# afterwards, which ccache will pick up. This might break if there is +# a version mismatch. A solution would be to add host-zlib has a +# dependency of ccache, but it would require tuning the zlib .mk file +# to use HOSTCC_NOCCACHE as the compiler. Instead, we take the easy +# path: tell ccache to use its internal copy of zlib, so that ccache +# has zero dependency besides the C library. +HOST_CCACHE_CONF_OPT += ccache_cv_zlib_1_2_3=no -# We directly hardcode the cache location into the binary, as it is -# much easier to handle than passing an environment variable. -define HOST_CCACHE_FIX_CCACHE_DIR - sed -i 's,getenv("CCACHE_DIR"),"$(CCACHE_CACHE_DIR)",' $(@D)/ccache.c +# Patch host-ccache as follows: +# - Use BUILDROOT_CACHE_DIR instead of CCACHE_DIR, because CCACHE_DIR +# is already used by autotargets for the ccache package. +# BUILDROOT_CACHE_DIR is exported by Makefile based on config option +# BR2_CCACHE_DIR. +# - ccache shouldn't use the compiler binary mtime to detect a change in +# the compiler, because in the context of Buildroot, that completely +# defeats the purpose of ccache. Of course, that leaves the user +# responsible for purging its cache when the compiler changes. +define HOST_CCACHE_PATCH_CONFIGURATION + sed -i 's,getenv("CCACHE_DIR"),getenv("BUILDROOT_CACHE_DIR"),' $(@D)/ccache.c + sed -i 's,getenv("CCACHE_COMPILERCHECK"),"none",' $(@D)/ccache.c endef HOST_CCACHE_POST_CONFIGURE_HOOKS += \ - HOST_CCACHE_FIX_CCACHE_DIR + HOST_CCACHE_PATCH_CONFIGURATION -$(eval $(call AUTOTARGETS,package,ccache)) -$(eval $(call AUTOTARGETS,package,ccache,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) ifeq ($(BR2_CCACHE),y) ccache-stats: host-ccache $(Q)$(CCACHE) -s -endif +ccache-options: host-ccache +ifeq ($(CCACHE_OPTIONS),) + $(Q)echo "Usage: make ccache-options CCACHE_OPTIONS=\"opts\"" + $(Q)echo "where 'opts' corresponds to one or more valid ccache options" \ + "(see ccache help text below)" + $(Q)echo +endif + $(Q)$(CCACHE) $(CCACHE_OPTIONS) +endif diff --git a/package/ccid/Config.in b/package/ccid/Config.in new file mode 100644 index 0000000000..e960986aea --- /dev/null +++ b/package/ccid/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_CCID + bool "ccid" + select BR2_PACKAGE_PCSC_LITE + select BR2_PACKAGE_LIBUSB + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + depends on BR2_USE_MMU # pcsc-lite + help + PC/SC driver for USB CCID smart card readers + + http://pcsclite.alioth.debian.org/ccid.html + +comment "ccid needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/ccid/ccid.mk b/package/ccid/ccid.mk new file mode 100644 index 0000000000..aabc0c0003 --- /dev/null +++ b/package/ccid/ccid.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# ccid +# +################################################################################ + +CCID_VERSION = 1.4.13 +CCID_SOURCE = ccid-$(CCID_VERSION).tar.bz2 +CCID_SITE = http://alioth.debian.org/frs/download.php/file/3959 +CCID_LICENSE = LGPLv2.1+ +CCID_LICENSE_FILES = COPYING +CCID_INSTALL_STAGING = YES +CCID_DEPENDENCIES = pcsc-lite host-pkgconf libusb + +ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV),y) +define CCID_INSTALL_UDEV_RULES + if test -d $(TARGET_DIR)/etc/udev/rules.d ; then \ + cp $(@D)/src/92_pcscd_ccid.rules $(TARGET_DIR)/etc/udev/rules.d/ ; \ + fi; +endef + +CCID_POST_INSTALL_TARGET_HOOKS += CCID_INSTALL_UDEV_RULES +endif + +$(eval $(autotools-package)) diff --git a/package/cdrkit/Config.in b/package/cdrkit/Config.in index 7ff50f3f47..9ba5dbf22f 100644 --- a/package/cdrkit/Config.in +++ b/package/cdrkit/Config.in @@ -3,6 +3,7 @@ config BR2_PACKAGE_CDRKIT select BR2_PACKAGE_BZIP2 select BR2_PACKAGE_LIBCAP depends on BR2_LARGEFILE + depends on BR2_USE_MMU # fork bool "cdrkit" help cdrkit is a suite of programs for recording CDs and DVDs, @@ -11,5 +12,6 @@ config BR2_PACKAGE_CDRKIT http://www.cdrkit.org/ -comment "cdrkit requires a toolchain with LARGEFILE support" +comment "cdrkit needs a toolchain w/ largefile" + depends on BR2_USE_MMU depends on !BR2_LARGEFILE diff --git a/package/cdrkit/cdrkit-1.1.10-no-rcmd.patch b/package/cdrkit/cdrkit-1.1.11-no-rcmd.patch similarity index 100% rename from package/cdrkit/cdrkit-1.1.10-no-rcmd.patch rename to package/cdrkit/cdrkit-1.1.11-no-rcmd.patch diff --git a/package/cdrkit/cdrkit.mk b/package/cdrkit/cdrkit.mk index a57a8fd112..ee98013e22 100644 --- a/package/cdrkit/cdrkit.mk +++ b/package/cdrkit/cdrkit.mk @@ -1,9 +1,14 @@ -CDRKIT_VERSION=1.1.10 -CDRKIT_SOURCE=cdrkit-$(CDRKIT_VERSION).tar.gz -CDRKIT_SITE=http://www.cdrkit.org/releases/ +################################################################################ +# +# cdrkit +# +################################################################################ -CDRKIT_DEPENDENCIES=libcap bzip2 zlib -HOST_CDRKIT_DEPENDENCIES=host-libcap host-bzip2 host-zlib +CDRKIT_VERSION = 1.1.11 +CDRKIT_SITE = http://www.cdrkit.org/releases +CDRKIT_DEPENDENCIES = libcap bzip2 zlib +CDRKIT_LICENSE = GPLv2 +CDRKIT_LICENSE_FILES = COPYING ifeq ($(BR2_ENDIAN),"BIG") CMAKE_ENDIAN_OPT=-DBITFIELDS_HTOL=1 @@ -20,5 +25,5 @@ CDRKIT_CONF_OPT += -DCMAKE_EXE_LINKER_FLAGS="$(TARGET_LDFLAGS)" HOST_CDRKIT_CONF_OPT += -DCMAKE_C_FLAGS="-I$(HOST_DIR)/usr/include" HOST_CDRKIT_CONF_OPT += -DCMAKE_EXE_LINKER_FLAGS="$(HOST_LDFLAGS)" -$(eval $(call CMAKETARGETS,package,cdrkit)) -$(eval $(call CMAKETARGETS,package,cdrkit,host)) +$(eval $(cmake-package)) +$(eval $(host-cmake-package)) diff --git a/package/cegui06/Config.in b/package/cegui06/Config.in new file mode 100644 index 0000000000..92bbb70b81 --- /dev/null +++ b/package/cegui06/Config.in @@ -0,0 +1,19 @@ +comment "cegui06 needs a toolchain w/ C++, threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_CEGUI06 + bool "cegui06" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_PCRE + help + Crazy Eddie's GUI System is a free library providing windowing and + widgets for graphics APIs / engines where such functionality is not + natively available, or severely lacking. The library is object + orientated, written in C++, and targeted at games developers who + should be spending their time creating great games, not building + GUI sub-systems! + + http://www.cegui.org.uk/ diff --git a/package/cegui06/cegui06-stddef.h.patch b/package/cegui06/cegui06-stddef.h.patch new file mode 100644 index 0000000000..cc16effc25 --- /dev/null +++ b/package/cegui06/cegui06-stddef.h.patch @@ -0,0 +1,26 @@ +includes: ptrdiff_t is defined in stddef.h + +ptrdiff_t is defined in the stddef.h header, so this +header must be included. + +Do the #include in a common header to avoid doing it +all over the place. + +Signed-off-by: "Yann E. MORIN" + +--- +Patch not sent upstream, it's a no-longer-maintained branch. +To be noted, however, is that the current devel branch is +still missing that include. + +diff -durN cegui06-0.6.2.orig/include/CEGUIBase.h cegui06-0.6.2/include/CEGUIBase.h +--- cegui06-0.6.2.orig//include/CEGUIBase.h 2008-02-11 15:38:27.000000000 +0100 ++++ cegui06-0.6.2/include/CEGUIBase.h 2012-08-19 22:51:50.260385978 +0200 +@@ -34,6 +34,7 @@ + #define _CEGUIBase_h_ + + #include ++#include + + // bring in configuration options + #include "CEGUIConfig.h" diff --git a/package/cegui06/cegui06.mk b/package/cegui06/cegui06.mk new file mode 100644 index 0000000000..8dd1a37a4a --- /dev/null +++ b/package/cegui06/cegui06.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# cegui06 +# +################################################################################ + +# Do not update the version, we need exactly that one for Spice. +CEGUI06_VERSION_MAJOR = 0.6.2 +CEGUI06_VERSION = $(CEGUI06_VERSION_MAJOR)b +CEGUI06_SOURCE = CEGUI-$(CEGUI06_VERSION).tar.gz +CEGUI06_SITE = http://downloads.sourceforge.net/project/crayzedsgui/CEGUI%20Mk-2/$(CEGUI06_VERSION_MAJOR) +CEGUI06_LICENSE = MIT +CEGUI06_LICENSE_FILES = COPYING +CEGUI06_INSTALL_STAGING = YES + +CEGUI06_DEPENDENCIES = \ + expat \ + freetype \ + pcre \ + +CEGUI06_CONF_OPT = \ + --enable-expat \ + --disable-external-tinyxml \ + --disable-xerces-c \ + --disable-libxml \ + --disable-tinyxml \ + --disable-opengl-renderer \ + --disable-external-glew \ + --disable-irrlicht-renderer \ + --disable-directfb-renderer \ + --disable-samples \ + --disable-lua-module \ + --disable-toluacegui \ + --disable-external-toluapp \ + +$(eval $(autotools-package)) diff --git a/package/celt051/Config.in b/package/celt051/Config.in new file mode 100644 index 0000000000..035e262d74 --- /dev/null +++ b/package/celt051/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_CELT051 + bool "celt051" + select BR2_PACKAGE_LIBOGG + help + The CELT ultra-low delay audio codec + + The CELT codec is a compression algorithm for audio. Like MP3, + Vorbis, and AAC it is suitable for transmitting music with high + quality. Unlike these formats CELT imposes very little delay on + the signal, even less than is typical for speech centric formats + like Speex, GSM, or G.729. + + Note: this is version 0.5.1.3 of celt. + + http://www.celt-codec.org/ diff --git a/package/celt051/celt.mk b/package/celt051/celt.mk new file mode 100644 index 0000000000..528dfcecf2 --- /dev/null +++ b/package/celt051/celt.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# celt +# +################################################################################ + +# Although version newer than 0.5.1.3 exists, we're +# stuck with 0.5.1.3 for use by Spice (coming later) +CELT051_VERSION = 0.5.1.3 +CELT051_SOURCE = celt-$(CELT051_VERSION).tar.gz +CELT051_SITE = http://downloads.xiph.org/releases/celt +CELT051_LICENSE = BSD-2c +CELT051_LICENSE_FILES = COPYING +CELT051_INSTALL_STAGING = YES +CELT051_DEPENDENCIES = libogg + +# Need to specify --with-ogg, otherwise /usr/lib may be searched for +# if target is the same kind as host (ie. same arch, same bitness, +# same endianness, so that /usr/lib contains libraries linkable by +# our cross-compiler) +CELT051_CONF_OPT = \ + --enable-fixed-point \ + --disable-fixed-point-debug \ + --disable-experimental-postfilter \ + --disable-static-modes \ + --disable-assertions \ + --disable-oggtest \ + --with-ogg=$(STAGING_DIR)/usr \ + +$(eval $(autotools-package)) diff --git a/package/cgilua/Config.in b/package/cgilua/Config.in index b43ba97d15..d1e7fbf0e8 100644 --- a/package/cgilua/Config.in +++ b/package/cgilua/Config.in @@ -1,9 +1,9 @@ config BR2_PACKAGE_CGILUA bool "cgilua" - select BR2_PACKAGE_LUA_SHARED_LIBRARY + # Runtime dependency only select BR2_PACKAGE_LUAFILESYSTEM help CGILua is a tool for creating dynamic HTML pages and manipulating input data from Web forms. - http://luaforge.net/projects/cgilua/ + http://keplerproject.github.com/cgilua diff --git a/package/cgilua/cgilua.mk b/package/cgilua/cgilua.mk index 9d524cd33b..e327fed212 100644 --- a/package/cgilua/cgilua.mk +++ b/package/cgilua/cgilua.mk @@ -1,12 +1,12 @@ -############################################################# +################################################################################ # # cgilua # -############################################################# +################################################################################ -CGILUA_VERSION = 5.1.3 -CGILUA_SITE = http://luaforge.net/frs/download.php/3970 -CGILUA_DEPENDENCIES = luafilesystem +CGILUA_VERSION = 5.1.4 +CGILUA_SITE = http://github.com/downloads/keplerproject/cgilua +CGILUA_LICENSE = MIT define CGILUA_INSTALL_TARGET_CMDS $(MAKE) -C $(@D) install LUA_DIR="$(TARGET_DIR)/usr/share/lua" @@ -17,4 +17,4 @@ define CGILUA_UNINSTALL_TARGET_CMDS rm -f "$(TARGET_DIR)/usr/share/lua/cgilua.lua" endef -$(eval $(call GENTARGETS,package,cgilua)) +$(eval $(generic-package)) diff --git a/package/chrony/Config.in b/package/chrony/Config.in new file mode 100644 index 0000000000..05d6fc1a25 --- /dev/null +++ b/package/chrony/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_CHRONY + bool "chrony" + depends on BR2_USE_MMU # fork() + help + Chrony is a pair of programs which are used to maintain the + accuracy of the system clock. + + http://chrony.tuxfamily.org/ diff --git a/package/chrony/chrony.mk b/package/chrony/chrony.mk new file mode 100644 index 0000000000..f000e4af6a --- /dev/null +++ b/package/chrony/chrony.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# chrony +# +################################################################################ + +CHRONY_VERSION = 1.29 +CHRONY_SITE = http://download.tuxfamily.org/chrony/ +CHRONY_LICENSE = GPLv2 +CHRONY_LICENSE_FILES = COPYING + +CHRONY_CONF_OPT = --host-system=Linux --host-machine=$(BR2_ARCH) --prefix=/usr + +ifeq ($(BR2_PACKAGE_LIBNSS),y) +CHRONY_DEPENDENCIES += host-pkgconf libnss +else +CHRONY_CONF_OPT += --without-nss +endif + +ifeq ($(BR2_PACKAGE_READLINE),y) +CHRONY_DEPENDENCIES += readline +else +CHRONY_CONF_OPT += --disable-readline +endif + +ifneq ($(BR2_INET_IPV6),y) +CHRONY_CONF_OPT += --disable-ipv6 +endif + +define CHRONY_CONFIGURE_CMDS + cd $(@D) && $(TARGET_CONFIGURE_OPTS) ./configure $(CHRONY_CONF_OPT) +endef + +define CHRONY_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define CHRONY_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install +endef + +define CHRONY_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/bin/chronyc $(TARGET_DIR)/usr/sbin/chronyd +endef + +$(eval $(generic-package)) diff --git a/package/cifs-utils/Config.in b/package/cifs-utils/Config.in new file mode 100644 index 0000000000..b433850a18 --- /dev/null +++ b/package/cifs-utils/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_CIFS_UTILS + bool "cifs-utils" + # uses fork() + depends on BR2_USE_MMU + help + The in-kernel CIFS filesystem is generally the preferred + method for mounting SMB/CIFS shares on Linux. The in-kernel + CIFS filesystem relies on a set of user-space tools. That + package of tools is called cifs-utils. Although not really + part of Samba proper, these tools were originally part of + the Samba package. For several reasons, shipping these tools + as part of Samba was problematic and it was deemed better to + split them off into their own package. + + http://wiki.samba.org/index.php/LinuxCIFS_utils diff --git a/package/cifs-utils/cifs-utils.mk b/package/cifs-utils/cifs-utils.mk new file mode 100644 index 0000000000..f715e360a4 --- /dev/null +++ b/package/cifs-utils/cifs-utils.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# cifs-utils +# +################################################################################ + +CIFS_UTILS_VERSION = 6.1 +CIFS_UTILS_SOURCE = cifs-utils-$(CIFS_UTILS_VERSION).tar.bz2 +CIFS_UTILS_SITE = http://ftp.samba.org/pub/linux-cifs/cifs-utils +CIFS_UTILS_LICENSE = GPLv3+ +CIFS_UTILS_LICENSE_FILES = COPYING + +define CIFS_UTILS_NO_WERROR + $(SED) 's/-Werror//' $(@D)/Makefile.in +endef + +CIFS_UTILS_POST_PATCH_HOOKS += CIFS_UTILS_NO_WERROR + +$(eval $(autotools-package)) diff --git a/package/civetweb/Config.in b/package/civetweb/Config.in new file mode 100644 index 0000000000..33f4ef1091 --- /dev/null +++ b/package/civetweb/Config.in @@ -0,0 +1,28 @@ +config BR2_PACKAGE_CIVETWEB + bool "civetweb" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + help + Full featured embedded web server with Lua support. + + https://sourceforge.net/projects/civetweb + +if BR2_PACKAGE_CIVETWEB + +config BR2_CIVETWEB_WITH_LUA + bool "enable Lua support" + # required by the bundled Sqlite3 and Lua code + depends on BR2_LARGEFILE + help + Enable Lua support in Civetweb. Note that this will use a + version of Lua and Sqlite bundled within the Civetweb + sources, and not the packages from Buildroot. + +comment "Lua support needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE + +endif + +comment "civetweb needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/civetweb/civetweb.mk b/package/civetweb/civetweb.mk new file mode 100644 index 0000000000..dd74d97d42 --- /dev/null +++ b/package/civetweb/civetweb.mk @@ -0,0 +1,56 @@ +################################################################################ +# +# civetweb +# +################################################################################ + +CIVETWEB_VERSION = v1.3 +CIVETWEB_SITE = http://github.com/sunsetbrew/civetweb/tarball/$(CIVETWEB_VERSION) +CIVETWEB_LICENSE = MIT +CIVETWEB_LICENSE_FILES = LICENSE.md + +CIVETWEB_CONF_OPT = TARGET_OS=LINUX +CIVETWEB_COPT = $(TARGET_CFLAGS) -DHAVE_POSIX_FALLOCATE=0 +CIVETWEB_LIBS = -lpthread -lm -ldl +CIVETWEB_SYSCONFDIR = /etc +CIVETWEB_HTMLDIR = /var/www + +ifneq ($(BR2_LARGEFILE),y) + CIVETWEB_COPT += -DSQLITE_DISABLE_LFS +endif + +ifeq ($(BR2_INET_IPV6),y) + CIVETWEB_CONF_OPT += WITH_IPV6=1 +endif + +ifeq ($(BR2_CIVETWEB_WITH_LUA),y) + CIVETWEB_CONF_OPT += WITH_LUA=1 +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) + CIVETWEB_COPT += -DNO_SSL_DL + CIVETWEB_LIBS += -lssl -lcrypto -lz + CIVETWEB_DEPENDENCIES += openssl +else + CIVETWEB_COPT += -DNO_SSL +endif + +define CIVETWEB_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D) build \ + $(CIVETWEB_CONF_OPT) \ + COPT="$(CIVETWEB_COPT)" LIBS="$(CIVETWEB_LIBS)" +endef + +define CIVETWEB_INSTALL_TARGET_CMDS + $(MAKE) CC="$(TARGET_CC)" -C $(@D) install \ + DOCUMENT_ROOT="$(CIVETWEB_HTMLDIR)" \ + CONFIG_FILE2="$(CIVETWEB_SYSCONFDIR)/civetweb.conf" \ + HTMLDIR="$(TARGET_DIR)$(CIVETWEB_HTMLDIR)" \ + SYSCONFDIR="$(TARGET_DIR)$(CIVETWEB_SYSCONFDIR)" \ + PREFIX="$(TARGET_DIR)/usr" \ + $(CIVETWEB_CONF_OPT) \ + COPT='$(CIVETWEB_COPT)' +endef + +$(eval $(generic-package)) + diff --git a/package/cjson/Config.in b/package/cjson/Config.in new file mode 100644 index 0000000000..fed61d76c7 --- /dev/null +++ b/package/cjson/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_CJSON + bool "cJSON" + # For static build with cJSON.c directly see README + depends on !BR2_PREFER_STATIC_LIB + help + An ultra-lightweight, portable, single-file, simple-as-can-be ANSI-C + compliant JSON parser, under MIT license. + + http://cjson.sourceforge.net/ diff --git a/package/cjson/cjson.mk b/package/cjson/cjson.mk new file mode 100644 index 0000000000..2093b02d7a --- /dev/null +++ b/package/cjson/cjson.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# cjson +# +################################################################################ + +CJSON_VERSION = 58 +CJSON_SITE_METHOD = svn +CJSON_SITE = http://svn.code.sf.net/p/cjson/code +CJSON_INSTALL_STAGING = YES +CJSON_LICENSE = MIT +CJSON_LICENSE_FILES = LICENSE + +define CJSON_BUILD_CMDS + cd $(@D) && $(TARGET_CC) $(TARGET_CFLAGS) -shared -fPIC -lm \ + cJSON.c -o libcJSON.so +endef + +define CJSON_INSTALL_STAGING_CMDS + $(INSTALL) -D $(@D)/cJSON.h $(STAGING_DIR)/usr/include/cJSON.h + $(INSTALL) -D $(@D)/libcJSON.so $(STAGING_DIR)/usr/lib/libcJSON.so +endef + +define CJSON_INSTALL_TARGET_CMDS + $(INSTALL) -D $(@D)/cJSON.h $(TARGET_DIR)/usr/include/cJSON.h + $(INSTALL) -D $(@D)/libcJSON.so $(TARGET_DIR)/usr/lib/libcJSON.so +endef + +define CJSON_UNINSTALL_STAGING_CMDS + rm -f $(STAGING_DIR)/usr/include/cJSON.h + rm -f $(STAGING_DIR)/usr/lib/libcJSON.so +endef + +define CJSON_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/include/cJSON.h + rm -f $(TARGET_DIR)/usr/lib/libcJSON.so +endef + +define CJSON_CLEAN_CMDS + rm -f $(@D)/libcJSON.so +endef + +$(eval $(generic-package)) diff --git a/package/classpath/Config.in b/package/classpath/Config.in new file mode 100644 index 0000000000..0153bca070 --- /dev/null +++ b/package/classpath/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_CLASSPATH + bool "classpath" + depends on BR2_PACKAGE_JAMVM + depends on BR2_INET_IPV6 + help + GNU Classpath, Essential Libraries for Java, is a GNU + project to create free core class libraries for use with + virtual machines and compilers for the java programming + language. + + http://classpath.org + +comment "classpath needs a toolchain w/ IPv6" + depends on BR2_PACKAGE_JAMVM + depends on !BR2_INET_IPV6 diff --git a/package/classpath/classpath-01-fix-gmp-include.patch b/package/classpath/classpath-01-fix-gmp-include.patch new file mode 100644 index 0000000000..f7a392093f --- /dev/null +++ b/package/classpath/classpath-01-fix-gmp-include.patch @@ -0,0 +1,46 @@ +The GMP include is hardcoded to /usr/include causing obvious problems. + +From classpath CVS: +http://cvs.savannah.gnu.org/viewvc/classpath/configure.ac?root=classpath&r1=1.245&r2=1.246 + +[Gustavo: ditch -L or libtool complains loudly] + +Signed-off-by: Gustavo Zacarias + +--- a/configure.ac 2010/01/30 01:33:50 1.245 ++++ b/configure.ac 2010/05/04 12:29:23 1.246 +@@ -752,10 +752,32 @@ + dnl __gmpz_mul_si for earlier versions (>= 3.1). + dnl IMPORTANT: if you decide to look for __gmpz_combit, don't forget to + dnl change the name of the corresponding ac_ variable on lines 860... ++ AC_ARG_WITH(gmp, [ --with-gmp=PATH specify prefix directory for the installed GMP package. ++ Equivalent to --with-gmp-include=PATH/include ++ plus --with-gmp-lib=PATH/lib]) ++ AC_ARG_WITH(gmp_include, [ --with-gmp-include=PATH specify directory for installed GMP include files]) ++ AC_ARG_WITH(gmp_lib, [ --with-gmp-lib=PATH specify directory for the installed GMP library]) ++ + if test "x${COMPILE_GMP}" = xyes; then ++ AC_MSG_CHECKING([for GMP directories]) ++ if test "x$with_gmp" != x; then ++ gmplibs="-lgmp" ++ gmpinc="-I$with_gmp/include" ++ if test "x$with_gmp_include" != x; then ++ gmpinc="-I$with_gmp_include $gmpinc" ++ fi ++ if test "x$with_gmp_lib" != x; then ++ gmplibs="$gmplibs" ++ fi ++ else ++ with_gmp="/usr" ++ gmplibs="-lgmp" ++ gmpinc="-I/usr/include" ++ fi ++ AC_MSG_RESULT([prefix=$with_gmp, libs=$gmplibs, inc=$gmpinc]) + AC_CHECK_LIB(gmp, __gmpz_mul_si, +- [GMP_CFLAGS=-I/usr/include +- GMP_LIBS=-lgmp ], ++ [GMP_CFLAGS="$gmpinc" ++ GMP_LIBS="$gmplibs" ], + [GMP_CFLAGS= + GMP_LIBS= ]) + AC_SUBST(GMP_CFLAGS) diff --git a/package/classpath/classpath-02-add-config-rpath.patch b/package/classpath/classpath-02-add-config-rpath.patch new file mode 100644 index 0000000000..3a8a7d0952 --- /dev/null +++ b/package/classpath/classpath-02-add-config-rpath.patch @@ -0,0 +1,680 @@ +Add config.rpath from upstream CVS to avoid (re)autoconfiguring errors. + +Signed-off-by: Gustavo Zacarias + +diff -Nura classpath-0.98.orig/config.rpath classpath-0.98/config.rpath +--- classpath-0.98.orig/config.rpath 1969-12-31 21:00:00.000000000 -0300 ++++ classpath-0.98/config.rpath 2013-07-10 09:36:51.894281025 -0300 +@@ -0,0 +1,672 @@ ++#! /bin/sh ++# Output a system dependent set of variables, describing how to set the ++# run time search path of shared libraries in an executable. ++# ++# Copyright 1996-2010 Free Software Foundation, Inc. ++# Taken from GNU libtool, 2001 ++# Originally by Gordon Matzigkeit , 1996 ++# ++# This file is free software; the Free Software Foundation gives ++# unlimited permission to copy and/or distribute it, with or without ++# modifications, as long as this notice is preserved. ++# ++# The first argument passed to this file is the canonical host specification, ++# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM ++# or ++# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM ++# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld ++# should be set by the caller. ++# ++# The set of defined variables is at the end of this script. ++ ++# Known limitations: ++# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer ++# than 256 bytes, otherwise the compiler driver will dump core. The only ++# known workaround is to choose shorter directory names for the build ++# directory and/or the installation directory. ++ ++# All known linkers require a `.a' archive for static linking (except MSVC, ++# which needs '.lib'). ++libext=a ++shrext=.so ++ ++host="$1" ++host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` ++host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` ++host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ++ ++# Code taken from libtool.m4's _LT_CC_BASENAME. ++ ++for cc_temp in $CC""; do ++ case $cc_temp in ++ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; ++ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; ++ \-*) ;; ++ *) break;; ++ esac ++done ++cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` ++ ++# Code taken from libtool.m4's _LT_COMPILER_PIC. ++ ++wl= ++if test "$GCC" = yes; then ++ wl='-Wl,' ++else ++ case "$host_os" in ++ aix*) ++ wl='-Wl,' ++ ;; ++ darwin*) ++ case $cc_basename in ++ xlc*) ++ wl='-Wl,' ++ ;; ++ esac ++ ;; ++ mingw* | cygwin* | pw32* | os2* | cegcc*) ++ ;; ++ hpux9* | hpux10* | hpux11*) ++ wl='-Wl,' ++ ;; ++ irix5* | irix6* | nonstopux*) ++ wl='-Wl,' ++ ;; ++ newsos6) ++ ;; ++ linux* | k*bsd*-gnu) ++ case $cc_basename in ++ ecc*) ++ wl='-Wl,' ++ ;; ++ icc* | ifort*) ++ wl='-Wl,' ++ ;; ++ lf95*) ++ wl='-Wl,' ++ ;; ++ pgcc | pgf77 | pgf90) ++ wl='-Wl,' ++ ;; ++ ccc*) ++ wl='-Wl,' ++ ;; ++ como) ++ wl='-lopt=' ++ ;; ++ *) ++ case `$CC -V 2>&1 | sed 5q` in ++ *Sun\ C*) ++ wl='-Wl,' ++ ;; ++ esac ++ ;; ++ esac ++ ;; ++ osf3* | osf4* | osf5*) ++ wl='-Wl,' ++ ;; ++ rdos*) ++ ;; ++ solaris*) ++ wl='-Wl,' ++ ;; ++ sunos4*) ++ wl='-Qoption ld ' ++ ;; ++ sysv4 | sysv4.2uw2* | sysv4.3*) ++ wl='-Wl,' ++ ;; ++ sysv4*MP*) ++ ;; ++ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) ++ wl='-Wl,' ++ ;; ++ unicos*) ++ wl='-Wl,' ++ ;; ++ uts4*) ++ ;; ++ esac ++fi ++ ++# Code taken from libtool.m4's _LT_LINKER_SHLIBS. ++ ++hardcode_libdir_flag_spec= ++hardcode_libdir_separator= ++hardcode_direct=no ++hardcode_minus_L=no ++ ++case "$host_os" in ++ cygwin* | mingw* | pw32* | cegcc*) ++ # FIXME: the MSVC++ port hasn't been tested in a loooong time ++ # When not using gcc, we currently assume that we are using ++ # Microsoft Visual C++. ++ if test "$GCC" != yes; then ++ with_gnu_ld=no ++ fi ++ ;; ++ interix*) ++ # we just hope/assume this is gcc and not c89 (= MSVC++) ++ with_gnu_ld=yes ++ ;; ++ openbsd*) ++ with_gnu_ld=no ++ ;; ++esac ++ ++ld_shlibs=yes ++if test "$with_gnu_ld" = yes; then ++ # Set some defaults for GNU ld with shared library support. These ++ # are reset later if shared libraries are not supported. Putting them ++ # here allows them to be overridden if necessary. ++ # Unlike libtool, we use -rpath here, not --rpath, since the documented ++ # option of GNU ld is called -rpath, not --rpath. ++ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' ++ case "$host_os" in ++ aix[3-9]*) ++ # On AIX/PPC, the GNU linker is very broken ++ if test "$host_cpu" != ia64; then ++ ld_shlibs=no ++ fi ++ ;; ++ amigaos*) ++ hardcode_libdir_flag_spec='-L$libdir' ++ hardcode_minus_L=yes ++ # Samuel A. Falvo II reports ++ # that the semantics of dynamic libraries on AmigaOS, at least up ++ # to version 4, is to share data among multiple programs linked ++ # with the same dynamic library. Since this doesn't match the ++ # behavior of shared libraries on other platforms, we cannot use ++ # them. ++ ld_shlibs=no ++ ;; ++ beos*) ++ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then ++ : ++ else ++ ld_shlibs=no ++ fi ++ ;; ++ cygwin* | mingw* | pw32* | cegcc*) ++ # hardcode_libdir_flag_spec is actually meaningless, as there is ++ # no search path for DLLs. ++ hardcode_libdir_flag_spec='-L$libdir' ++ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then ++ : ++ else ++ ld_shlibs=no ++ fi ++ ;; ++ interix[3-9]*) ++ hardcode_direct=no ++ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ++ ;; ++ gnu* | linux* | k*bsd*-gnu) ++ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then ++ : ++ else ++ ld_shlibs=no ++ fi ++ ;; ++ netbsd*) ++ ;; ++ solaris*) ++ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ++ ld_shlibs=no ++ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then ++ : ++ else ++ ld_shlibs=no ++ fi ++ ;; ++ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) ++ case `$LD -v 2>&1` in ++ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ++ ld_shlibs=no ++ ;; ++ *) ++ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then ++ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' ++ else ++ ld_shlibs=no ++ fi ++ ;; ++ esac ++ ;; ++ sunos4*) ++ hardcode_direct=yes ++ ;; ++ *) ++ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then ++ : ++ else ++ ld_shlibs=no ++ fi ++ ;; ++ esac ++ if test "$ld_shlibs" = no; then ++ hardcode_libdir_flag_spec= ++ fi ++else ++ case "$host_os" in ++ aix3*) ++ # Note: this linker hardcodes the directories in LIBPATH if there ++ # are no directories specified by -L. ++ hardcode_minus_L=yes ++ if test "$GCC" = yes; then ++ # Neither direct hardcoding nor static linking is supported with a ++ # broken collect2. ++ hardcode_direct=unsupported ++ fi ++ ;; ++ aix[4-9]*) ++ if test "$host_cpu" = ia64; then ++ # On IA64, the linker does run time linking by default, so we don't ++ # have to do anything special. ++ aix_use_runtimelinking=no ++ else ++ aix_use_runtimelinking=no ++ # Test if we are trying to use run time linking or normal ++ # AIX style linking. If -brtl is somewhere in LDFLAGS, we ++ # need to do runtime linking. ++ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) ++ for ld_flag in $LDFLAGS; do ++ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then ++ aix_use_runtimelinking=yes ++ break ++ fi ++ done ++ ;; ++ esac ++ fi ++ hardcode_direct=yes ++ hardcode_libdir_separator=':' ++ if test "$GCC" = yes; then ++ case $host_os in aix4.[012]|aix4.[012].*) ++ collect2name=`${CC} -print-prog-name=collect2` ++ if test -f "$collect2name" && \ ++ strings "$collect2name" | grep resolve_lib_name >/dev/null ++ then ++ # We have reworked collect2 ++ : ++ else ++ # We have old collect2 ++ hardcode_direct=unsupported ++ hardcode_minus_L=yes ++ hardcode_libdir_flag_spec='-L$libdir' ++ hardcode_libdir_separator= ++ fi ++ ;; ++ esac ++ fi ++ # Begin _LT_AC_SYS_LIBPATH_AIX. ++ echo 'int main () { return 0; }' > conftest.c ++ ${CC} ${LDFLAGS} conftest.c -o conftest ++ aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } ++}'` ++ if test -z "$aix_libpath"; then ++ aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } ++}'` ++ fi ++ if test -z "$aix_libpath"; then ++ aix_libpath="/usr/lib:/lib" ++ fi ++ rm -f conftest.c conftest ++ # End _LT_AC_SYS_LIBPATH_AIX. ++ if test "$aix_use_runtimelinking" = yes; then ++ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" ++ else ++ if test "$host_cpu" = ia64; then ++ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' ++ else ++ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" ++ fi ++ fi ++ ;; ++ amigaos*) ++ hardcode_libdir_flag_spec='-L$libdir' ++ hardcode_minus_L=yes ++ # see comment about different semantics on the GNU ld section ++ ld_shlibs=no ++ ;; ++ bsdi[45]*) ++ ;; ++ cygwin* | mingw* | pw32* | cegcc*) ++ # When not using gcc, we currently assume that we are using ++ # Microsoft Visual C++. ++ # hardcode_libdir_flag_spec is actually meaningless, as there is ++ # no search path for DLLs. ++ hardcode_libdir_flag_spec=' ' ++ libext=lib ++ ;; ++ darwin* | rhapsody*) ++ hardcode_direct=no ++ if test "$GCC" = yes ; then ++ : ++ else ++ case $cc_basename in ++ xlc*) ++ ;; ++ *) ++ ld_shlibs=no ++ ;; ++ esac ++ fi ++ ;; ++ dgux*) ++ hardcode_libdir_flag_spec='-L$libdir' ++ ;; ++ freebsd1*) ++ ld_shlibs=no ++ ;; ++ freebsd2.2*) ++ hardcode_libdir_flag_spec='-R$libdir' ++ hardcode_direct=yes ++ ;; ++ freebsd2*) ++ hardcode_direct=yes ++ hardcode_minus_L=yes ++ ;; ++ freebsd* | dragonfly*) ++ hardcode_libdir_flag_spec='-R$libdir' ++ hardcode_direct=yes ++ ;; ++ hpux9*) ++ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' ++ hardcode_libdir_separator=: ++ hardcode_direct=yes ++ # hardcode_minus_L: Not really in the search PATH, ++ # but as the default location of the library. ++ hardcode_minus_L=yes ++ ;; ++ hpux10*) ++ if test "$with_gnu_ld" = no; then ++ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' ++ hardcode_libdir_separator=: ++ hardcode_direct=yes ++ # hardcode_minus_L: Not really in the search PATH, ++ # but as the default location of the library. ++ hardcode_minus_L=yes ++ fi ++ ;; ++ hpux11*) ++ if test "$with_gnu_ld" = no; then ++ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' ++ hardcode_libdir_separator=: ++ case $host_cpu in ++ hppa*64*|ia64*) ++ hardcode_direct=no ++ ;; ++ *) ++ hardcode_direct=yes ++ # hardcode_minus_L: Not really in the search PATH, ++ # but as the default location of the library. ++ hardcode_minus_L=yes ++ ;; ++ esac ++ fi ++ ;; ++ irix5* | irix6* | nonstopux*) ++ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' ++ hardcode_libdir_separator=: ++ ;; ++ netbsd*) ++ hardcode_libdir_flag_spec='-R$libdir' ++ hardcode_direct=yes ++ ;; ++ newsos6) ++ hardcode_direct=yes ++ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' ++ hardcode_libdir_separator=: ++ ;; ++ openbsd*) ++ if test -f /usr/libexec/ld.so; then ++ hardcode_direct=yes ++ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ++ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ++ else ++ case "$host_os" in ++ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) ++ hardcode_libdir_flag_spec='-R$libdir' ++ ;; ++ *) ++ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ++ ;; ++ esac ++ fi ++ else ++ ld_shlibs=no ++ fi ++ ;; ++ os2*) ++ hardcode_libdir_flag_spec='-L$libdir' ++ hardcode_minus_L=yes ++ ;; ++ osf3*) ++ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' ++ hardcode_libdir_separator=: ++ ;; ++ osf4* | osf5*) ++ if test "$GCC" = yes; then ++ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' ++ else ++ # Both cc and cxx compiler support -rpath directly ++ hardcode_libdir_flag_spec='-rpath $libdir' ++ fi ++ hardcode_libdir_separator=: ++ ;; ++ solaris*) ++ hardcode_libdir_flag_spec='-R$libdir' ++ ;; ++ sunos4*) ++ hardcode_libdir_flag_spec='-L$libdir' ++ hardcode_direct=yes ++ hardcode_minus_L=yes ++ ;; ++ sysv4) ++ case $host_vendor in ++ sni) ++ hardcode_direct=yes # is this really true??? ++ ;; ++ siemens) ++ hardcode_direct=no ++ ;; ++ motorola) ++ hardcode_direct=no #Motorola manual says yes, but my tests say they lie ++ ;; ++ esac ++ ;; ++ sysv4.3*) ++ ;; ++ sysv4*MP*) ++ if test -d /usr/nec; then ++ ld_shlibs=yes ++ fi ++ ;; ++ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ++ ;; ++ sysv5* | sco3.2v5* | sco5v6*) ++ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' ++ hardcode_libdir_separator=':' ++ ;; ++ uts4*) ++ hardcode_libdir_flag_spec='-L$libdir' ++ ;; ++ *) ++ ld_shlibs=no ++ ;; ++ esac ++fi ++ ++# Check dynamic linker characteristics ++# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. ++# Unlike libtool.m4, here we don't care about _all_ names of the library, but ++# only about the one the linker finds when passed -lNAME. This is the last ++# element of library_names_spec in libtool.m4, or possibly two of them if the ++# linker has special search rules. ++library_names_spec= # the last element of library_names_spec in libtool.m4 ++libname_spec='lib$name' ++case "$host_os" in ++ aix3*) ++ library_names_spec='$libname.a' ++ ;; ++ aix[4-9]*) ++ library_names_spec='$libname$shrext' ++ ;; ++ amigaos*) ++ library_names_spec='$libname.a' ++ ;; ++ beos*) ++ library_names_spec='$libname$shrext' ++ ;; ++ bsdi[45]*) ++ library_names_spec='$libname$shrext' ++ ;; ++ cygwin* | mingw* | pw32* | cegcc*) ++ shrext=.dll ++ library_names_spec='$libname.dll.a $libname.lib' ++ ;; ++ darwin* | rhapsody*) ++ shrext=.dylib ++ library_names_spec='$libname$shrext' ++ ;; ++ dgux*) ++ library_names_spec='$libname$shrext' ++ ;; ++ freebsd1*) ++ ;; ++ freebsd* | dragonfly*) ++ case "$host_os" in ++ freebsd[123]*) ++ library_names_spec='$libname$shrext$versuffix' ;; ++ *) ++ library_names_spec='$libname$shrext' ;; ++ esac ++ ;; ++ gnu*) ++ library_names_spec='$libname$shrext' ++ ;; ++ hpux9* | hpux10* | hpux11*) ++ case $host_cpu in ++ ia64*) ++ shrext=.so ++ ;; ++ hppa*64*) ++ shrext=.sl ++ ;; ++ *) ++ shrext=.sl ++ ;; ++ esac ++ library_names_spec='$libname$shrext' ++ ;; ++ interix[3-9]*) ++ library_names_spec='$libname$shrext' ++ ;; ++ irix5* | irix6* | nonstopux*) ++ library_names_spec='$libname$shrext' ++ case "$host_os" in ++ irix5* | nonstopux*) ++ libsuff= shlibsuff= ++ ;; ++ *) ++ case $LD in ++ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; ++ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; ++ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; ++ *) libsuff= shlibsuff= ;; ++ esac ++ ;; ++ esac ++ ;; ++ linux*oldld* | linux*aout* | linux*coff*) ++ ;; ++ linux* | k*bsd*-gnu) ++ library_names_spec='$libname$shrext' ++ ;; ++ knetbsd*-gnu) ++ library_names_spec='$libname$shrext' ++ ;; ++ netbsd*) ++ library_names_spec='$libname$shrext' ++ ;; ++ newsos6) ++ library_names_spec='$libname$shrext' ++ ;; ++ nto-qnx*) ++ library_names_spec='$libname$shrext' ++ ;; ++ openbsd*) ++ library_names_spec='$libname$shrext$versuffix' ++ ;; ++ os2*) ++ libname_spec='$name' ++ shrext=.dll ++ library_names_spec='$libname.a' ++ ;; ++ osf3* | osf4* | osf5*) ++ library_names_spec='$libname$shrext' ++ ;; ++ rdos*) ++ ;; ++ solaris*) ++ library_names_spec='$libname$shrext' ++ ;; ++ sunos4*) ++ library_names_spec='$libname$shrext$versuffix' ++ ;; ++ sysv4 | sysv4.3*) ++ library_names_spec='$libname$shrext' ++ ;; ++ sysv4*MP*) ++ library_names_spec='$libname$shrext' ++ ;; ++ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) ++ library_names_spec='$libname$shrext' ++ ;; ++ uts4*) ++ library_names_spec='$libname$shrext' ++ ;; ++esac ++ ++sed_quote_subst='s/\(["`$\\]\)/\\\1/g' ++escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` ++shlibext=`echo "$shrext" | sed -e 's,^\.,,'` ++escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` ++escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` ++escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` ++ ++LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' < -Date: Fri, 14 Jan 2011 21:26:19 -0700 -Subject: [PATCH] Change to use fphsa to check required variables and version. - -Also, set the required variables based on components, if specified. -Also, don't make finding uic required if not using QtGui. ---- - Modules/FindQt4.cmake | 179 +++++++++++++------------------------------------ - 1 files changed, 46 insertions(+), 133 deletions(-) - -diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake -index d9d6ea7..70e69b0 100644 ---- a/Modules/FindQt4.cmake -+++ b/Modules/FindQt4.cmake -@@ -9,7 +9,7 @@ - # QT_LIBRARIES variable. - # - # Typical usage could be something like: --# find_package(Qt4 4.4.3 COMPONENTS QtCore QtGui QtXml REQUIRED ) -+# find_package(Qt4 4.4.3 REQUIRED QtCore QtGui QtXml) - # include(${QT_USE_FILE}) - # add_executable(myexe main.cpp) - # target_link_libraries(myexe ${QT_LIBRARIES}) -@@ -354,6 +354,7 @@ ENDIF(QT_QT_LIBRARY) - - INCLUDE(CheckSymbolExists) - INCLUDE(MacroAddFileDependencies) -+INCLUDE(FindPackageHandleStandardArgs) - - SET(QT_USE_FILE ${CMAKE_ROOT}/Modules/UseQt4.cmake) - -@@ -469,6 +470,7 @@ FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 qmake-mac PATHS - DOC "The qmake executable for the Qt installation to use" - ) - -+# double check that it was a Qt4 qmake, if not, re-find with different names - IF (QT_QMAKE_EXECUTABLE) - - IF(QT_QMAKE_EXECUTABLE_LAST) -@@ -477,8 +479,6 @@ IF (QT_QMAKE_EXECUTABLE) - - SET(QT_QMAKE_EXECUTABLE_LAST "${QT_QMAKE_EXECUTABLE}" CACHE INTERNAL "" FORCE) - -- SET(QT4_QMAKE_FOUND FALSE) -- - _qt4_query_qmake(QT_VERSION QTVERSION) - - # check for qt3 qmake and then try and find qmake4 or qmake-qt4 in the path -@@ -495,74 +495,9 @@ IF (QT_QMAKE_EXECUTABLE) - ENDIF(QT_QMAKE_EXECUTABLE) - ENDIF(NOT QTVERSION) - -- # check that we found the Qt4 qmake, Qt3 qmake output won't match here -- STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" qt_version_tmp "${QTVERSION}") -- IF (qt_version_tmp) -- -- # we need at least version 4.0.0 -- IF (NOT QT_MIN_VERSION) -- SET(QT_MIN_VERSION "4.0.0") -- ENDIF (NOT QT_MIN_VERSION) -- -- #now parse the parts of the user given version string into variables -- STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" req_qt_major_vers "${QT_MIN_VERSION}") -- IF (NOT req_qt_major_vers) -- MESSAGE( FATAL_ERROR "Invalid Qt version string given: \"${QT_MIN_VERSION}\", expected e.g. \"4.0.1\"") -- ENDIF (NOT req_qt_major_vers) -- -- # now parse the parts of the user given version string into variables -- STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" req_qt_major_vers "${QT_MIN_VERSION}") -- STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" req_qt_minor_vers "${QT_MIN_VERSION}") -- STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" req_qt_patch_vers "${QT_MIN_VERSION}") -- -- # Suppport finding at least a particular version, for instance FIND_PACKAGE( Qt4 4.4.3 ) -- # This implementation is a hack to avoid duplicating code and make sure we stay -- # source-compatible with CMake 2.6.x -- IF( Qt4_FIND_VERSION ) -- SET( QT_MIN_VERSION ${Qt4_FIND_VERSION} ) -- SET( req_qt_major_vers ${Qt4_FIND_VERSION_MAJOR} ) -- SET( req_qt_minor_vers ${Qt4_FIND_VERSION_MINOR} ) -- SET( req_qt_patch_vers ${Qt4_FIND_VERSION_PATCH} ) -- ENDIF( Qt4_FIND_VERSION ) -- -- IF (NOT req_qt_major_vers EQUAL 4) -- MESSAGE( FATAL_ERROR "Invalid Qt version string given: \"${QT_MIN_VERSION}\", major version 4 is required, e.g. \"4.0.1\"") -- ENDIF (NOT req_qt_major_vers EQUAL 4) -- -- # and now the version string given by qmake -- STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}") -- STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}") -- STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}") -- -- # compute an overall version number which can be compared at once -- MATH(EXPR req_vers "${req_qt_major_vers}*10000 + ${req_qt_minor_vers}*100 + ${req_qt_patch_vers}") -- MATH(EXPR found_vers "${QT_VERSION_MAJOR}*10000 + ${QT_VERSION_MINOR}*100 + ${QT_VERSION_PATCH}") -- -- # Support finding *exactly* a particular version, for instance FIND_PACKAGE( Qt4 4.4.3 EXACT ) -- IF( Qt4_FIND_VERSION_EXACT ) -- IF(found_vers EQUAL req_vers) -- SET( QT4_QMAKE_FOUND TRUE ) -- ELSE(found_vers EQUAL req_vers) -- SET( QT4_QMAKE_FOUND FALSE ) -- IF (found_vers LESS req_vers) -- SET(QT4_INSTALLED_VERSION_TOO_OLD TRUE) -- ELSE (found_vers LESS req_vers) -- SET(QT4_INSTALLED_VERSION_TOO_NEW TRUE) -- ENDIF (found_vers LESS req_vers) -- ENDIF(found_vers EQUAL req_vers) -- ELSE( Qt4_FIND_VERSION_EXACT ) -- IF (found_vers LESS req_vers) -- SET(QT4_QMAKE_FOUND FALSE) -- SET(QT4_INSTALLED_VERSION_TOO_OLD TRUE) -- ELSE (found_vers LESS req_vers) -- SET(QT4_QMAKE_FOUND TRUE) -- ENDIF (found_vers LESS req_vers) -- ENDIF( Qt4_FIND_VERSION_EXACT ) -- ENDIF (qt_version_tmp) -- - ENDIF (QT_QMAKE_EXECUTABLE) - --IF (QT4_QMAKE_FOUND) -+IF (QT_QMAKE_EXECUTABLE AND QTVERSION) - - # ask qmake for the mkspecs directory - # we do this first because QT_LIBINFIX might be set -@@ -1072,32 +1007,7 @@ IF (QT4_QMAKE_FOUND) - # get the directory of the current file, used later on in the file - GET_FILENAME_COMPONENT( _qt4_current_dir "${CMAKE_CURRENT_LIST_FILE}" PATH) - -- ###################################### -- # -- # decide if Qt got found -- # -- ###################################### -- -- # if the includes,libraries,moc,uic and rcc are found then we have it -- IF( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND -- QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE AND QT_QTCORE_LIBRARY) -- SET( QT4_FOUND "YES" ) -- INCLUDE(FindPackageMessage) -- FIND_PACKAGE_MESSAGE(Qt4 "Found Qt-Version ${QTVERSION} (using ${QT_QMAKE_EXECUTABLE})" -- "[${QT_LIBRARY_DIR}][${QT_INCLUDE_DIR}][${QT_MOC_EXECUTABLE}][${QT_UIC_EXECUTABLE}][${QT_RCC_EXECUTABLE}]") -- ELSE( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND -- QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE AND QT_QTCORE_LIBRARY) -- SET( QT4_FOUND "NO") -- SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE) -- IF( Qt4_FIND_REQUIRED) -- MESSAGE( FATAL_ERROR "Qt libraries, includes, moc, uic or/and rcc NOT found!") -- ENDIF( Qt4_FIND_REQUIRED) -- ENDIF( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND -- QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE AND QT_QTCORE_LIBRARY) - -- SET(QT_FOUND ${QT4_FOUND}) -- -- - ############################################### - # - # configuration/system dependent settings -@@ -1189,44 +1099,47 @@ IF (QT4_QMAKE_FOUND) - - INCLUDE("${_qt4_current_dir}/Qt4Macros.cmake") - -+ENDIF(QT_QMAKE_EXECUTABLE AND QTVERSION) - -- ####################################### -- # -- # compatibility settings -- # -- ####################################### -- # Backwards compatibility for CMake1.4 and 1.2 -- SET (QT_MOC_EXE ${QT_MOC_EXECUTABLE} ) -- SET (QT_UIC_EXE ${QT_UIC_EXECUTABLE} ) -- -- SET( QT_QT_LIBRARY "") -- --ELSE(QT4_QMAKE_FOUND) -- -- SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE) -- -- # The code below is overly complex to make sure we do not break compatibility with CMake 2.6.x -- # For CMake 2.8, it should be simplified by getting rid of QT4_INSTALLED_VERSION_TOO_OLD and -- # QT4_INSTALLED_VERSION_TOO_NEW -- IF(Qt4_FIND_REQUIRED) -- IF(QT4_INSTALLED_VERSION_TOO_OLD) -- IF( Qt4_FIND_VERSION_EXACT ) -- MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too old, version ${QT_MIN_VERSION} is required") -- ELSE( Qt4_FIND_VERSION_EXACT ) -- MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too old, at least version ${QT_MIN_VERSION} is required") -- ENDIF( Qt4_FIND_VERSION_EXACT ) -- ELSE(QT4_INSTALLED_VERSION_TOO_OLD) -- IF( Qt4_FIND_VERSION_EXACT AND QT4_INSTALLED_VERSION_TOO_NEW ) -- MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too new, version ${QT_MIN_VERSION} is required") -- ELSE( Qt4_FIND_VERSION_EXACT AND QT4_INSTALLED_VERSION_TOO_NEW ) -- MESSAGE( FATAL_ERROR "Qt qmake not found!") -- ENDIF( Qt4_FIND_VERSION_EXACT AND QT4_INSTALLED_VERSION_TOO_NEW ) -- ENDIF(QT4_INSTALLED_VERSION_TOO_OLD) -- ELSE(Qt4_FIND_REQUIRED) -- IF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY) -- MESSAGE(STATUS "The installed Qt version ${QTVERSION} is too old, at least version ${QT_MIN_VERSION} is required") -- ENDIF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY) -- ENDIF(Qt4_FIND_REQUIRED) -- --ENDIF (QT4_QMAKE_FOUND) -+#support old QT_MIN_VERSION if set, but not if version is supplied by find_package() -+IF(NOT Qt4_FIND_VERSION AND QT_MIN_VERSION) -+ SET(Qt4_FIND_VERSION ${QT_MIN_VERSION}) -+ENDIF(NOT Qt4_FIND_VERSION AND QT_MIN_VERSION) -+ -+IF( Qt4_FIND_COMPONENTS ) -+ -+ # if components specified in find_package(), make sure each of those pieces were found -+ SET(_QT4_FOUND_REQUIRED_VARS QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR) -+ FOREACH( component ${Qt4_FIND_COMPONENTS} ) -+ STRING( TOUPPER ${component} _COMPONENT ) -+ SET(_QT4_FOUND_REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} QT_${_COMPONENT}_INCLUDE_DIR QT_${_COMPONENT}_LIBRARY) -+ ENDFOREACH( component ) -+ -+ if(Qt4_FIND_COMPONENTS MATCHES QtGui) -+ SET(_QT4_FOUND_REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} QT_UIC_EXECUTABLE) -+ endif(Qt4_FIND_COMPONENTS MATCHES QtGui) -+ -+ELSE( Qt4_FIND_COMPONENTS ) -+ -+ # if no components specified, we'll make a default set of required variables to say Qt is found -+ SET(_QT4_FOUND_REQUIRED_VARS QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_UIC_EXECUTABLE QT_INCLUDE_DIR -+ QT_LIBRARY_DIR QT_QTCORE_LIBRARY) -+ -+ENDIF( Qt4_FIND_COMPONENTS ) -+ -+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qt4 -+ REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} -+ VERSION_VAR QTVERSION -+ ) -+ -+####################################### -+# -+# compatibility settings -+# -+####################################### -+# Backwards compatibility for CMake1.4 and 1.2 -+SET (QT_MOC_EXE ${QT_MOC_EXECUTABLE} ) -+SET (QT_UIC_EXE ${QT_UIC_EXECUTABLE} ) -+SET( QT_QT_LIBRARY "") -+SET(QT_FOUND ${QT4_FOUND}) - --- -1.7.0 diff --git a/package/cmake/cmake.mk b/package/cmake/cmake.mk index efff5a5e40..fd1cdd287c 100644 --- a/package/cmake/cmake.mk +++ b/package/cmake/cmake.mk @@ -1,22 +1,28 @@ -CMAKE_VERSION=2.8.3 -CMAKE_SOURCE=cmake-$(CMAKE_VERSION).tar.gz -CMAKE_SITE=http://www.cmake.org/files/v2.8/ +################################################################################ +# +# cmake +# +################################################################################ + +CMAKE_VERSION = 2.8.10.2 +CMAKE_SITE = http://www.cmake.org/files/v2.8/ +CMAKE_LICENSE = BSD-3c +CMAKE_LICENSE_FILES = Copyright.txt define HOST_CMAKE_CONFIGURE_CMDS - (cd $(@D); \ - LDFLAGS="$(HOST_LDFLAGS)" \ - CFLAGS="$(HOST_CFLAGS)" \ - ./bootstrap --prefix=$(HOST_DIR)/usr --parallel=$(BR2_JLEVEL) \ - ) + (cd $(@D); \ + LDFLAGS="$(HOST_LDFLAGS)" \ + CFLAGS="$(HOST_CFLAGS)" \ + ./bootstrap --prefix=$(HOST_DIR)/usr --parallel=$(PARALLEL_JOBS) \ + ) endef define HOST_CMAKE_BUILD_CMDS - $(HOST_MAKE_ENV) $(MAKE) -C $(@D) + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) endef define HOST_CMAKE_INSTALL_CMDS - $(HOST_MAKE_ENV) $(MAKE) -C $(@D) install + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) install endef -$(eval $(call GENTARGETS,package,cmake)) -$(eval $(call GENTARGETS,package,cmake,host)) \ No newline at end of file +$(eval $(host-generic-package)) diff --git a/package/collectd/Config.in b/package/collectd/Config.in new file mode 100644 index 0000000000..8123162248 --- /dev/null +++ b/package/collectd/Config.in @@ -0,0 +1,440 @@ +config BR2_PACKAGE_COLLECTD + bool "collectd" + # Uses fork() + depends on BR2_USE_MMU + depends on BR2_INET_IPV6 + depends on BR2_TOOLCHAIN_HAS_THREADS + help + collectd is a daemon which collects system performance + statistics periodically and provides mechanisms to store + the values in a variety of ways, for example in RRD files. + + http://collectd.org/ + +if BR2_PACKAGE_COLLECTD + +menu "match plugins" + +config BR2_PACKAGE_COLLECTD_EMPTY_COUNTER + bool "empty counter" + help + Match counter values which are currently zero. + +config BR2_PACKAGE_COLLECTD_HASHED + bool "hashed" + help + Match values using a hash function of the hostname. + +config BR2_PACKAGE_COLLECTD_REGEX + bool "regex" + help + Match values by their identifier based on regular expressions. + +config BR2_PACKAGE_COLLECTD_TIMEDIFF + bool "timediff" + help + Match values with an invalid timestamp. + +config BR2_PACKAGE_COLLECTD_VALUE + bool "value" + help + Select values by their data sources' values. +endmenu + +menu "misc plugins" + +config BR2_PACKAGE_COLLECTD_AGGREGATION + bool "aggregation" + help + The Aggregate plugin allows to aggregate multiple values into + a single value using one or several consolidation functions, + e.g. summation and average. + +config BR2_PACKAGE_COLLECTD_LOGFILE + bool "logfile" + default y + help + Writes log messages to a file or STDOUT/STDERR. + +config BR2_PACKAGE_COLLECTD_NOTIFY_EMAIL + bool "notify_email" + select BR2_PACKAGE_LIBESMTP + select BR2_PACKAGE_OPENSSL + help + Send an E-mail with the notification message to the + configured recipients. + +config BR2_PACKAGE_COLLECTD_SYSLOG + bool "syslog" + default y + help + Logs to the standard UNIX logging mechanism. + +config BR2_PACKAGE_THRESHOLD + bool "threshold" + help + Checks values against configured thresholds and creates notifications + if values are out of bounds. + +endmenu + +menu "read plugins" + +comment "Select at least one for collectd to be useful" + +config BR2_PACKAGE_COLLECTD_APACHE + bool "apache" + select BR2_PACKAGE_LIBCURL + help + Collects Apache's mod_status information. + +config BR2_PACKAGE_COLLECTD_APCUPS + bool "apcups" + help + Collects UPS statistics from apcupsd. + +config BR2_PACKAGE_COLLECTD_BATTERY + bool "battery" + help + Collects the battery's charge, the drawn current and voltage. + +config BR2_PACKAGE_COLLECTD_BIND + bool "bind" + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_LIBXML2 + help + Collects BIND DNS statistics. + +config BR2_PACKAGE_COLLECTD_CGROUPS + bool "cgroups" + help + Collects CGroups CPU usage accounting. + +config BR2_PACKAGE_COLLECTD_CONNTRACK + bool "conntrack" + help + Collects the number of entries in Linux's connection tracking table. + +config BR2_PACKAGE_COLLECTD_CONTEXTSWITCH + bool "contextswitch" + help + Collects the number of context switches done by the operating system. + +config BR2_PACKAGE_COLLECTD_CPU + bool "cpu" + help + Collects the amount of time spent by the CPU in various states. + +config BR2_PACKAGE_COLLECTD_CPUFREQ + bool "cpufreq" + help + Collects the current CPU's frequency. + +config BR2_PACKAGE_COLLECTD_CURL + bool "curl" + select BR2_PACKAGE_LIBCURL + help + Uses libcurl to read files and then parses them according + to the configuration. + +config BR2_PACKAGE_COLLECTD_CURL_JSON + bool "curl-json" + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_YAJL + help + Queries JSON data using the cURL library and parses it + according to the user's configuration using YAJL. + +config BR2_PACKAGE_COLLECTD_CURL_XML + bool "curl-xml" + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_LIBXML2 + help + Reads files using libcurl and parses it as XML. + +config BR2_PACKAGE_COLLECTD_DF + bool "df" + help + Collects file system usage information. + +config BR2_PACKAGE_COLLECTD_DISK + bool "disk" + help + Collects performance statistics of hard-disks and partitions. + +config BR2_PACKAGE_COLLECTD_DNS + bool "dns" + select BR2_PACKAGE_LIBPCAP + help + Collects statistics of DNS traffic using libpcap. + +config BR2_PACKAGE_COLLECTD_ENTROPY + bool "entropy" + help + Collects the available entropy on a system. + +config BR2_PACKAGE_COLLECTD_ETHSTAT + bool "ethstat" + help + Collects network interface card statistics. + +config BR2_PACKAGE_COLLECTD_EXEC + bool "exec" + help + Executes scripts and reads values back that are printed + to STDOUT by that program. + +config BR2_PACKAGE_COLLECTD_FILECOUNT + bool "filecount" + help + Counts the number of files in a directory and all its subdirectories. + +config BR2_PACKAGE_COLLECTD_FSCACHE + bool "fscache" + help + Collects information about the file-system based caching + infrastructure for network file-systems and other slow media. + +config BR2_PACKAGE_COLLECTD_INTERFACE + bool "interface" + help + Collects information about the traffic of network interfaces. + +config BR2_PACKAGE_COLLECTD_IPTABLES + bool "iptables" + select BR2_PACKAGE_IPTABLES + help + Gather statistics from iptables packet filter. + +config BR2_PACKAGE_COLLECTD_IRQ + bool "irq" + help + Collects the number of interrupts. + +config BR2_PACKAGE_COLLECTD_LOAD + bool "load" + help + Collects the system load. + +config BR2_PACKAGE_COLLECTD_MD + bool "md" + help + Collects software-RAID device information. + +config BR2_PACKAGE_COLLECTD_MEMCACHED + bool "memcached" + help + Collects statistics from a memcached daemon. + +config BR2_PACKAGE_COLLECTD_MEMORY + bool "memory" + help + Collects physical memory utilization. + +config BR2_PACKAGE_COLLECTD_MYSQL + bool "mysql" + depends on BR2_INSTALL_LIBSTDCPP # mysql + depends on BR2_USE_MMU # mysql + depends on BR2_TOOLCHAIN_HAS_THREADS # mysql + select BR2_PACKAGE_MYSQL_CLIENT + help + Connects to a MySQL database and issues a "show status" command. + +config BR2_PACKAGE_COLLECTD_NFS + bool "nfs" + help + Collects information about the usage of the Network File System. + +config BR2_PACKAGE_COLLECTD_NTPD + bool "ntpd" + help + Queries an NTP server and extracts parameters. + +config BR2_PACKAGE_COLLECTD_OLSRD + bool "olsrd" + help + Reads information about meshed networks from olsrd. + +config BR2_PACKAGE_COLLECTD_OPENVPN + bool "openvpn" + help + Reads the status file of OpenVPN to collect statistics. + +config BR2_PACKAGE_COLLECTD_PING + bool "ping" + depends on BR2_INET_IPV6 + select BR2_PACKAGE_LIBOPING + help + Mesures network latency using ICMP "echo requests". + +config BR2_PACKAGE_COLLECTD_PROCESSES + bool "processes" + help + Collects the number of processes gruped by state. + +config BR2_PACKAGE_COLLECTD_PROTOCOLS + bool "protocols" + help + Collects information about the network protocols. + +config BR2_PACKAGE_COLLECTD_SENSORS + bool "sensors" + select BR2_PACKAGE_LM_SENSORS + help + Collects data from lm-sensors. + +config BR2_PACKAGE_COLLECTD_SERIAL + bool "serial" + help + Collects the traffic on serial interfaces. + +config BR2_PACKAGE_COLLECTD_STATSD + bool "StatsD" + help + StatsD network protocol to allow clients to report "events". + +config BR2_PACKAGE_COLLECTD_SNMP + bool "snmp" + select BR2_PACKAGE_NETSNMP + help + Reads values from SNMP devices. + +config BR2_PACKAGE_COLLECTD_SWAP + bool "swap" + help + Collects the amount of memory currently written to disk. + +config BR2_PACKAGE_COLLECTD_TABLE + bool "table" + help + Parses table-like structured plain-text files. + +config BR2_PACKAGE_COLLECTD_TAIL + bool "tail" + help + Tails log files and each line is given to one or more matches + which test if the line is relevant for any statistics. + +config BR2_PACKAGE_COLLECTD_TAIL_CSV + bool "tail csv" + help + Follows (tails) files in CSV format, parses each line and submits + extracted values. + +config BR2_PACKAGE_COLLECTD_TCPCONNS + bool "tcpconns" + help + Counts the number of TCP connections to/from a specified port. + +config BR2_PACKAGE_COLLECTD_THERMAL + bool "thermal" + help + Reads ACPI thermal zone information. + +config BR2_PACKAGE_COLLECTD_UPTIME + bool "uptime" + help + Keeps track of the system uptime. + +config BR2_PACKAGE_COLLECTD_USERS + bool "users" + help + Counts the number of users currently logged in. + +config BR2_PACKAGE_COLLECTD_VMEM + bool "vmem" + help + Collects information about the virtual memory subsystem. + +config BR2_PACKAGE_COLLECTD_WIRELESS + bool "wireless" + help + Collects signal quality, power and noise ratio for WLAN cards. + +endmenu + +menu "target plugins" + +config BR2_PACKAGE_COLLECTD_NOTIFICATION + bool "notification" + help + Create and dispatch a notification. + +config BR2_PACKAGE_COLLECTD_REPLACE + bool "replace" + help + Replace parts of an identifier using regular expressions. + +config BR2_PACKAGE_COLLECTD_SCALE + bool "scale" + help + Scale (multiply) values by an arbitrary number. + +config BR2_PACKAGE_COLLECTD_SET + bool "set" + help + Set (overwrite) entire parts of an identifier. + +endmenu + +menu "write plugins" + +comment "Select at least one for collectd to be useful" + +config BR2_PACKAGE_COLLECTD_CSV + bool "csv" + help + Writes values to a plain-text file in Comma Separated Values format. + +config BR2_PACKAGE_COLLECTD_GRAPHITE + bool "graphite" + help + Writes data collected to Carbon (Graphite's) storage API. + http://graphite.wikidot.com/start + +config BR2_PACKAGE_COLLECTD_NETWORK + bool "network" + depends on BR2_INET_IPV6 + help + Send/receive values from other instances of collectd. + +config BR2_PACKAGE_COLLECTD_RRDTOOL + bool "rrdtool" + depends on BR2_USE_WCHAR # rrdtool + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_LIBART + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_RRDTOOL + select BR2_PACKAGE_ZLIB + help + Writes values to RRD-files. + +comment "rrdtool support needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR + +config BR2_PACKAGE_COLLECTD_RIEMANN + bool "riemann" + depends on BR2_INSTALL_LIBSTDCPP # protobuf + select BR2_PACKAGE_PROTOBUF_C + help + Sends data to Riemann, a stream processing and monitoring system. + +config BR2_PACKAGE_COLLECTD_UNIXSOCK + bool "unixsock" + help + Opens a UNIX domain socket and accepts connections. + One can send commands to the daemon and receive information. + +config BR2_PACKAGE_COLLECTD_WRITEHTTP + bool "writehttp" + select BR2_PACKAGE_LIBCURL + help + Sends values collected to a web-server using HTTP POST and PUTVAL. + +endmenu + +endif + +comment "collectd needs a toolchain w/ IPv6, threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INET_IPV6 + depends on BR2_USE_MMU diff --git a/package/collectd/collectd.mk b/package/collectd/collectd.mk new file mode 100644 index 0000000000..e7dc093555 --- /dev/null +++ b/package/collectd/collectd.mk @@ -0,0 +1,150 @@ +################################################################################ +# +# collectd +# +################################################################################ + +COLLECTD_VERSION = 5.4.0 +COLLECTD_SITE = http://collectd.org/files +COLLECTD_MAKE_OPT = LDFLAGS="$(TARGET_LDFLAGS) -lm" +COLLECTD_CONF_ENV = ac_cv_lib_yajl_yajl_alloc=yes +COLLECTD_INSTALL_STAGING = YES +COLLECTD_LICENSE = GPLv2 LGPLv2.1 +COLLECTD_LICENSE_FILES = COPYING + +# These require unmet dependencies, are fringe, pointless or deprecated +COLLECTD_PLUGINS_DISABLE = amqp apple_sensors aquaero ascent dbi email \ + gmond hddtemp ipmi ipvs java libvirt lpar lvm madwifi mbmon \ + memcachec modbus multimeter netapp netlink nginx \ + notify_desktop notify_email numa nut onewire oracle perl pf \ + pinba postgresql powerdns python redis routeros rrdcached \ + sigrok tape target_v5upgrade teamspeak2 ted \ + tokyotyrant uuid varnish vserver write_mongodb write_redis \ + xmms zfs_arc + +COLLECTD_CONF_OPT += --with-nan-emulation --with-fp-layout=nothing \ + --localstatedir=/var --with-perl-bindings=no \ + $(foreach p, $(COLLECTD_PLUGINS_DISABLE), --disable-$(p)) \ + $(if $(BR2_PACKAGE_COLLECTD_AGGREGATION),--enable-aggregation,--disable-aggregation) \ + $(if $(BR2_PACKAGE_COLLECTD_APACHE),--enable-apache,--disable-apache) \ + $(if $(BR2_PACKAGE_COLLECTD_APCUPS),--enable-apcups,--disable-apcups) \ + $(if $(BR2_PACKAGE_COLLECTD_BATTERY),--enable-battery,--disable-battery) \ + $(if $(BR2_PACKAGE_COLLECTD_BIND),--enable-bind,--disable-bind) \ + $(if $(BR2_PACKAGE_COLLECTD_CGROUPS),--enable-cgroups,--disable-cgroups) \ + $(if $(BR2_PACKAGE_COLLECTD_CONNTRACK),--enable-conntrack,--disable-conntrack) \ + $(if $(BR2_PACKAGE_COLLECTD_CONTEXTSWITCH),--enable-contextswitch,--disable-contextswitch) \ + $(if $(BR2_PACKAGE_COLLECTD_CPU),--enable-cpu,--disable-cpu) \ + $(if $(BR2_PACKAGE_COLLECTD_CPUFREQ),--enable-cpufreq,--disable-cpufreq) \ + $(if $(BR2_PACKAGE_COLLECTD_CSV),--enable-csv,--disable-csv) \ + $(if $(BR2_PACKAGE_COLLECTD_CURL),--enable-curl,--disable-curl) \ + $(if $(BR2_PACKAGE_COLLECTD_CURL_JSON),--enable-curl_json,--disable-curl_json) \ + $(if $(BR2_PACKAGE_COLLECTD_CURL_XML),--enable-curl_xml,--disable-curl_xml) \ + $(if $(BR2_PACKAGE_COLLECTD_DF),--enable-df,--disable-df) \ + $(if $(BR2_PACKAGE_COLLECTD_DISK),--enable-disk,--disable-disk) \ + $(if $(BR2_PACKAGE_COLLECTD_DNS),--enable-dns,--disable-dns) \ + $(if $(BR2_PACKAGE_COLLECTD_EMPTY_COUNTER),--enable-match_empty_counter,--disable-match_empty_counter) \ + $(if $(BR2_PACKAGE_COLLECTD_ENTROPY),--enable-entropy,--disable-entropy) \ + $(if $(BR2_PACKAGE_COLLECTD_ETHSTAT),--enable-ethstat,--disable-ethstat) \ + $(if $(BR2_PACKAGE_COLLECTD_EXEC),--enable-exec,--disable-exec) \ + $(if $(BR2_PACKAGE_COLLECTD_FILECOUNT),--enable-filecount,--disable-filecount) \ + $(if $(BR2_PACKAGE_COLLECTD_FSCACHE),--enable-fscache,--disable-fscache) \ + $(if $(BR2_PACKAGE_COLLECTD_GRAPHITE),--enable-write_graphite,--disable-write_graphite) \ + $(if $(BR2_PACKAGE_COLLECTD_HASHED),--enable-match_hashed,--disable-match_hashed) \ + $(if $(BR2_PACKAGE_COLLECTD_INTERFACE),--enable-interface,--disable-interface) \ + $(if $(BR2_PACKAGE_COLLECTD_IPTABLES),--enable-iptables,--disable-iptables) \ + $(if $(BR2_PACKAGE_COLLECTD_IRQ),--enable-irq,--disable-irq) \ + $(if $(BR2_PACKAGE_COLLECTD_LOAD),--enable-load,--disable-load) \ + $(if $(BR2_PACKAGE_COLLECTD_LOGFILE),--enable-logfile,--disable-logfile) \ + $(if $(BR2_PACKAGE_COLLECTD_MD),--enable-md,--disable-md) \ + $(if $(BR2_PACKAGE_COLLECTD_MEMCACHED),--enable-memcached,--disable-memcached) \ + $(if $(BR2_PACKAGE_COLLECTD_MEMORY),--enable-memory,--disable-memory) \ + $(if $(BR2_PACKAGE_COLLECTD_MYSQL),--enable-mysql,--disable-mysql) \ + $(if $(BR2_PACKAGE_COLLECTD_NETWORK),--enable-network,--disable-network) \ + $(if $(BR2_PACKAGE_COLLECTD_NFS),--enable-nfs,--disable-nfs) \ + $(if $(BR2_PACKAGE_COLLECTD_NOTIFICATION),--enable-target_notification,--disable-target_notification) \ + $(if $(BR2_PACKAGE_COLLECTD_NOTIFY_EMAIL),--enable-notify_email,--disable-notify_email) \ + $(if $(BR2_PACKAGE_COLLECTD_NTPD),--enable-ntpd,--disable-ntpd) \ + $(if $(BR2_PACKAGE_COLLECTD_OLSRD),--enable-olsrd,--disable-olsrd) \ + $(if $(BR2_PACKAGE_COLLECTD_OPENVPN),--enable-openvpn,--disable-openvpn) \ + $(if $(BR2_PACKAGE_COLLECTD_PING),--enable-ping,--disable-ping) \ + $(if $(BR2_PACKAGE_COLLECTD_PROCESSES),--enable-processes,--disable-processes) \ + $(if $(BR2_PACKAGE_COLLECTD_PROTOCOLS),--enable-protocols,--disable-protocols) \ + $(if $(BR2_PACKAGE_COLLECTD_REGEX),--enable-match_regex,--disable-match-regex) \ + $(if $(BR2_PACKAGE_COLLECTD_REPLACE),--enable-target_replace,--disable-target_replace) \ + $(if $(BR2_PACKAGE_COLLECTD_RIEMANN),--enable-write_riemann,--disable-write_riemann) \ + $(if $(BR2_PACKAGE_COLLECTD_RRDTOOL),--enable-rrdtool,--disable-rrdtool) \ + $(if $(BR2_PACKAGE_COLLECTD_SCALE),--enable-target_scale,--disable-target_scale) \ + $(if $(BR2_PACKAGE_COLLECTD_SENSORS),--enable-sensors,--disable-sensors) \ + $(if $(BR2_PACKAGE_COLLECTD_SERIAL),--enable-serial,--disable-serial) \ + $(if $(BR2_PACKAGE_COLLECTD_STATSD),--enable-statsd,--disable-statsd) \ + $(if $(BR2_PACKAGE_COLLECTD_SET),--enable-target_set,--disable-target_set) \ + $(if $(BR2_PACKAGE_COLLECTD_SNMP),--enable-snmp,--disable-snmp) \ + $(if $(BR2_PACKAGE_COLLECTD_SWAP),--enable-swap,--disable-swap) \ + $(if $(BR2_PACKAGE_COLLECTD_SYSLOG),--enable-syslog,--disable-syslog) \ + $(if $(BR2_PACKAGE_COLLECTD_TABLE),--enable-table,--disable-table) \ + $(if $(BR2_PACKAGE_COLLECTD_TAIL),--enable-tail,--disable-tail) \ + $(if $(BR2_PACKAGE_COLLECTD_TAIL_CSV),--enable-tail_csv,--disable-tail_csv) \ + $(if $(BR2_PACKAGE_COLLECTD_TCPCONNS),--enable-tcpconns,--disable-tcpconns) \ + $(if $(BR2_PACKAGE_COLLECTD_THERMAL),--enable-thermal,--disable-thermal) \ + $(if $(BR2_PACKAGE_COLLECTD_THRESHOLD),--enable-threshold,--disable-threshold) \ + $(if $(BR2_PACKAGE_COLLECTD_TIMEDIFF),--enable-match_timediff,--disable-match_timediff) \ + $(if $(BR2_PACKAGE_COLLECTD_UNIXSOCK),--enable-unixsock,--disable-unixsock) \ + $(if $(BR2_PACKAGE_COLLECTD_UPTIME),--enable-uptime,--disable-uptime) \ + $(if $(BR2_PACKAGE_COLLECTD_USERS),--enable-users,--disable-users) \ + $(if $(BR2_PACKAGE_COLLECTD_VALUE),--enable-match_value,--disable-match_value) \ + $(if $(BR2_PACKAGE_COLLECTD_VMEM),--enable-vmem,--disable-vmem) \ + $(if $(BR2_PACKAGE_COLLECTD_WIRELESS),--enable-wireless,--disable-wireless) \ + $(if $(BR2_PACKAGE_COLLECTD_WRITEHTTP),--enable-write_http,--disable-write_http) + +COLLECTD_DEPENDENCIES = host-pkgconf \ + $(if $(BR2_PACKAGE_COLLECTD_APACHE),libcurl) \ + $(if $(BR2_PACKAGE_COLLECTD_BIND),libcurl libxml2) \ + $(if $(BR2_PACKAGE_COLLECTD_CURL),libcurl) \ + $(if $(BR2_PACKAGE_COLLECTD_CURL_JSON),libcurl yajl) \ + $(if $(BR2_PACKAGE_COLLECTD_CURL_XML),libcurl libxml2) \ + $(if $(BR2_PACKAGE_COLLECTD_DNS),libpcap) \ + $(if $(BR2_PACKAGE_COLLECTD_IPTABLES),iptables) \ + $(if $(BR2_PACKAGE_COLLECTD_MYSQL),mysql_client) \ + $(if $(BR2_PACKAGE_COLLECTD_NOTIFY_EMAIL),libesmtp) \ + $(if $(BR2_PACKAGE_COLLECTD_PING),liboping) \ + $(if $(BR2_PACKAGE_COLLECTD_RIEMANN),protobuf-c) \ + $(if $(BR2_PACKAGE_COLLECTD_RRDTOOL),rrdtool) \ + $(if $(BR2_PACKAGE_COLLECTD_SENSORS),lm-sensors) \ + $(if $(BR2_PACKAGE_COLLECTD_SNMP),netsnmp) \ + $(if $(BR2_PACKAGE_COLLECTD_WRITEHTTP),libcurl) + +# include/library fixups +ifeq ($(BR2_PACKAGE_LIBCURL),y) + COLLECTD_CONF_OPT += --with-libcurl=$(STAGING_DIR)/usr +endif +ifeq ($(BR2_PACKAGE_MYSQL_CLIENT),y) + COLLECTD_CONF_OPT += --with-libmysql=$(STAGING_DIR)/usr +endif +ifeq ($(BR2_PACKAGE_NETSNMP),y) + COLLECTD_CONF_OPT += --with-libnetsnmp=$(STAGING_DIR)/usr/bin/net-snmp-config +endif +ifeq ($(BR2_PACKAGE_YAJL),y) + COLLECTD_CONF_OPT += --with-yajl=$(STAGING_DIR)/usr +endif + +# network can use libgcrypt +ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) + COLLECTD_DEPENDENCIES += libgcrypt + COLLECTD_CONF_OPT += --with-libgcrypt=$(STAGING_DIR)/usr +endif + +# released software should not break on minor warnings +define COLLECTD_DROP_WERROR + $(SED) 's/-Werror//' \ + $(@D)/src/Makefile.in $(@D)/src/libcollectdclient/Makefile.in +endef + +COLLECTD_POST_PATCH_HOOKS += COLLECTD_DROP_WERROR + +define COLLECTD_INSTALL_TARGET_CMDS + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install + rm -f $(TARGET_DIR)/usr/bin/collectd-nagios + rm -f $(TARGET_DIR)/usr/share/collectd/postgresql_default.conf +endef + +$(eval $(autotools-package)) diff --git a/package/config/Makefile b/package/config/Makefile deleted file mode 100644 index ece2a822fc..0000000000 --- a/package/config/Makefile +++ /dev/null @@ -1,372 +0,0 @@ -# =========================================================================== -# Kernel configuration targets -# These targets are used from top-level makefile - -PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \ - localmodconfig localyesconfig - -ifdef KBUILD_KCONFIG -Kconfig := $(KBUILD_KCONFIG) -else -Kconfig := Kconfig -endif - -xconfig: $(obj)/qconf - $< $(Kconfig) - -gconfig: $(obj)/gconf - $< $(Kconfig) - -menuconfig: $(obj)/mconf - $< $(Kconfig) - -config: $(obj)/conf - $< --oldaskconfig $(Kconfig) - -nconfig: $(obj)/nconf - $< $(Kconfig) - -oldconfig: $(obj)/conf - $< --$@ $(Kconfig) - -silentoldconfig: $(obj)/conf - $(Q)mkdir -p include/generated - $< --$@ $(Kconfig) - -# if no path is given, then use src directory to find file -ifdef LSMOD -LSMOD_F := $(LSMOD) -ifeq ($(findstring /,$(LSMOD)),) - LSMOD_F := $(objtree)/$(LSMOD) -endif -endif - -localmodconfig: $(obj)/streamline_config.pl $(obj)/conf - $(Q)mkdir -p include/generated - $(Q)perl $< $(srctree) $(Kconfig) $(LSMOD_F) > .tmp.config - $(Q)if [ -f .config ]; then \ - cmp -s .tmp.config .config || \ - (mv -f .config .config.old.1; \ - mv -f .tmp.config .config; \ - $(obj)/conf --silentoldconfig $(Kconfig); \ - mv -f .config.old.1 .config.old) \ - else \ - mv -f .tmp.config .config; \ - $(obj)/conf --silentoldconfig $(Kconfig); \ - fi - $(Q)rm -f .tmp.config - -localyesconfig: $(obj)/streamline_config.pl $(obj)/conf - $(Q)mkdir -p include/generated - $(Q)perl $< $(srctree) $(Kconfig) $(LSMOD_F) > .tmp.config - $(Q)sed -i s/=m/=y/ .tmp.config - $(Q)if [ -f .config ]; then \ - cmp -s .tmp.config .config || \ - (mv -f .config .config.old.1; \ - mv -f .tmp.config .config; \ - $(obj)/conf --silentoldconfig $(Kconfig); \ - mv -f .config.old.1 .config.old) \ - else \ - mv -f .tmp.config .config; \ - $(obj)/conf --silentoldconfig $(Kconfig); \ - fi - $(Q)rm -f .tmp.config - -# Create new linux.pot file -# Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files -# The symlink is used to repair a deficiency in arch/um -update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h - $(Q)echo " GEN config" - $(Q)xgettext --default-domain=linux \ - --add-comments --keyword=_ --keyword=N_ \ - --from-code=UTF-8 \ - --files-from=scripts/kconfig/POTFILES.in \ - --output $(obj)/config.pot - $(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot - $(Q)ln -fs Kconfig.i386 arch/um/Kconfig.arch - $(Q)(for i in `ls arch/*/Kconfig`; \ - do \ - echo " GEN $$i"; \ - $(obj)/kxgettext $$i \ - >> $(obj)/config.pot; \ - done ) - $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \ - --output $(obj)/linux.pot - $(Q)rm -f arch/um/Kconfig.arch - $(Q)rm -f $(obj)/config.pot - -PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig - -allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf - $< --$@ $(Kconfig) - -PHONY += listnewconfig oldnoconfig savedefconfig defconfig - -listnewconfig oldnoconfig: $(obj)/conf - $< --$@ $(Kconfig) - -savedefconfig: $(obj)/conf - $< --$@=defconfig $(Kconfig) - -defconfig: $(obj)/conf -ifeq ($(KBUILD_DEFCONFIG),) - $< --defconfig $(Kconfig) -else - @echo "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'" - $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) -endif - -%_defconfig: $(obj)/conf - $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig) - -# Help text used by make help -help: - @echo ' config - Update current config utilising a line-oriented program' - @echo ' nconfig - Update current config utilising a ncurses menu based program' - @echo ' menuconfig - Update current config utilising a menu based program' - @echo ' xconfig - Update current config utilising a QT based front-end' - @echo ' gconfig - Update current config utilising a GTK based front-end' - @echo ' oldconfig - Update current config utilising a provided .config as base' - @echo ' localmodconfig - Update current config disabling modules not loaded' - @echo ' localyesconfig - Update current config converting local mods to core' - @echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps' - @echo ' defconfig - New config with default from ARCH supplied defconfig' - @echo ' savedefconfig - Save current config as ./defconfig (minimal config)' - @echo ' allnoconfig - New config where all options are answered with no' - @echo ' allyesconfig - New config where all options are accepted with yes' - @echo ' allmodconfig - New config selecting modules when possible' - @echo ' alldefconfig - New config with all symbols set to default' - @echo ' randconfig - New config with random answer to all options' - @echo ' listnewconfig - List new options' - @echo ' oldnoconfig - Same as silentoldconfig but set new symbols to n (unset)' - -# lxdialog stuff -check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh - -# Use recursively expanded variables so we do not call gcc unless -# we really need to do so. (Do not call gcc as part of make mrproper) -HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \ - -DLOCALE - -# =========================================================================== -# Shared Makefile for the various kconfig executables: -# conf: Used for defconfig, oldconfig and related targets -# nconf: Used for the nconfig target. -# Utilizes ncurses -# mconf: Used for the menuconfig target -# Utilizes the lxdialog package -# qconf: Used for the xconfig target -# Based on QT which needs to be installed to compile it -# gconf: Used for the gconfig target -# Based on GTK which needs to be installed to compile it -# object files used by all kconfig flavours - -lxdialog := lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o -lxdialog += lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o - -conf-objs := conf.o zconf.tab.o -mconf-objs := mconf.o zconf.tab.o $(lxdialog) -nconf-objs := nconf.o zconf.tab.o nconf.gui.o -kxgettext-objs := kxgettext.o zconf.tab.o - -hostprogs-y := conf qconf gconf kxgettext - -ifeq ($(MAKECMDGOALS),nconfig) - hostprogs-y += nconf -endif -ifeq ($(findstring nconf,$(MAKECMDGOALS)),nconf) - hostprogs-y += nconf -endif - -ifeq ($(MAKECMDGOALS),menuconfig) - hostprogs-y += mconf -endif -ifeq ($(findstring mconf,$(MAKECMDGOALS)),mconf) - hostprogs-y += mconf -endif - -ifeq ($(MAKECMDGOALS),xconfig) - qconf-target := 1 -endif -ifeq ($(findstring qconf,$(MAKECMDGOALS)),qconf) - qconf-target := 1 -endif - -ifeq ($(MAKECMDGOALS),gconfig) - gconf-target := 1 -endif -ifeq ($(findstring gconf,$(MAKECMDGOALS)),gconf) - gconf-target := 1 -endif - -ifeq ($(qconf-target),1) -qconf-cxxobjs := qconf.o -qconf-objs := kconfig_load.o zconf.tab.o -endif - -ifeq ($(gconf-target),1) -gconf-objs := gconf.o kconfig_load.o zconf.tab.o -endif - -clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \ - .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h -clean-files += config.pot linux.pot -clean-files += conf $(conf-objs) -clean-files += mconf $(mconf-objs) -clean-files += nconf $(nconf-objs) -clean-files += qconf qconf.o -clean-files += gconf gconf.o -clean-files += kconfig_load.o zconf.tab.o -clean-files += $(kxgettext-objs) - -# Check that we have the required ncurses stuff installed for lxdialog (menuconfig) -PHONY += $(obj)/dochecklxdialog -$(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog -$(obj)/dochecklxdialog: - $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf) - -always := dochecklxdialog - -# Add environment specific flags -HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS)) - -# generated files seem to need this to find local include files -HOSTCFLAGS_lex.zconf.o := -I$(src) -HOSTCFLAGS_zconf.tab.o := -I$(src) - -HOSTLOADLIBES_qconf = $(KC_QT_LIBS) -ldl -HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK - -HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0` -ldl -HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \ - -D LKC_DIRECT_LINK - -HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) - -HOSTLOADLIBES_nconf = -lmenu -lpanel -lncurses -$(obj)/qconf.o: $(obj)/.tmp_qtcheck - -ifeq ($(qconf-target),1) -$(obj)/.tmp_qtcheck: $(src)/Makefile --include $(obj)/.tmp_qtcheck - -# QT needs some extra effort... -$(obj)/.tmp_qtcheck: - @set -e; echo " CHECK qt"; dir=""; pkg=""; \ - if ! pkg-config --exists QtCore 2> /dev/null; then \ - echo "* Unable to find the QT4 tool qmake. Trying to use QT3"; \ - pkg-config --exists qt 2> /dev/null && pkg=qt; \ - pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \ - if [ -n "$$pkg" ]; then \ - cflags="\$$(shell pkg-config $$pkg --cflags)"; \ - libs="\$$(shell pkg-config $$pkg --libs)"; \ - moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \ - dir="$$(pkg-config $$pkg --variable=prefix)"; \ - else \ - for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \ - if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \ - done; \ - if [ -z "$$dir" ]; then \ - echo "*"; \ - echo "* Unable to find any QT installation. Please make sure that"; \ - echo "* the QT4 or QT3 development package is correctly installed and"; \ - echo "* either qmake can be found or install pkg-config or set"; \ - echo "* the QTDIR environment variable to the correct location."; \ - echo "*"; \ - false; \ - fi; \ - libpath=$$dir/lib; lib=qt; osdir=""; \ - $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \ - osdir=x$$($(HOSTCXX) -print-multi-os-directory); \ - test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \ - test -f $$libpath/libqt-mt.so && lib=qt-mt; \ - cflags="-I$$dir/include"; \ - libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \ - moc="$$dir/bin/moc"; \ - fi; \ - if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \ - echo "*"; \ - echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \ - echo "*"; \ - moc="/usr/bin/moc"; \ - fi; \ - else \ - cflags="\$$(shell pkg-config QtCore QtGui Qt3Support --cflags)"; \ - libs="\$$(shell pkg-config QtCore QtGui Qt3Support --libs)"; \ - binpath="\$$(shell pkg-config QtCore --variable=prefix)"; \ - moc="$$binpath/bin/moc"; \ - fi; \ - echo "KC_QT_CFLAGS=$$cflags" > $@; \ - echo "KC_QT_LIBS=$$libs" >> $@; \ - echo "KC_QT_MOC=$$moc" >> $@ -endif - -$(obj)/gconf.o: $(obj)/.tmp_gtkcheck - -ifeq ($(gconf-target),1) --include $(obj)/.tmp_gtkcheck - -# GTK needs some extra effort, too... -$(obj)/.tmp_gtkcheck: - @if `pkg-config --exists gtk+-2.0 gmodule-2.0 libglade-2.0`; then \ - if `pkg-config --atleast-version=2.0.0 gtk+-2.0`; then \ - touch $@; \ - else \ - echo "*"; \ - echo "* GTK+ is present but version >= 2.0.0 is required."; \ - echo "*"; \ - false; \ - fi \ - else \ - echo "*"; \ - echo "* Unable to find the GTK+ installation. Please make sure that"; \ - echo "* the GTK+ 2.0 development package is correctly installed..."; \ - echo "* You need gtk+-2.0, glib-2.0 and libglade-2.0."; \ - echo "*"; \ - false; \ - fi -endif - -$(obj)/zconf.tab.o: $(obj)/lex.zconf.c $(obj)/zconf.hash.c - -$(obj)/kconfig_load.o: $(obj)/lkc_defs.h - -$(obj)/qconf.o: $(obj)/qconf.moc $(obj)/lkc_defs.h - -$(obj)/gconf.o: $(obj)/lkc_defs.h - -$(obj)/%.moc: $(src)/%.h - $(KC_QT_MOC) -i $< -o $@ - -$(obj)/lkc_defs.h: $(src)/lkc_proto.h - sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' - -# Extract gconf menu items for I18N support -$(obj)/gconf.glade.h: $(obj)/gconf.glade - intltool-extract --type=gettext/glade $(obj)/gconf.glade - -### -# The following requires flex/bison/gperf -# By default we use the _shipped versions, uncomment the following line if -# you are modifying the flex/bison src. -# LKC_GENPARSER := 1 - -ifdef LKC_GENPARSER - -$(obj)/zconf.tab.c: $(src)/zconf.y -$(obj)/lex.zconf.c: $(src)/zconf.l -$(obj)/zconf.hash.c: $(src)/zconf.gperf - -%.tab.c: %.y - bison -l -b $* -p $(notdir $*) $< - cp $@ $@_shipped - -lex.%.c: %.l - flex -L -P$(notdir $*) -o$@ $< - cp $@ $@_shipped - -%.hash.c: %.gperf - gperf < $< > $@ - cp $@ $@_shipped - -endif diff --git a/package/config/README.buildroot2 b/package/config/README.buildroot2 deleted file mode 100644 index 8ff0d095bd..0000000000 --- a/package/config/README.buildroot2 +++ /dev/null @@ -1,20 +0,0 @@ -This is a copy of the kconfig code in the kernel (currently 2.6.36-rc1) tweaked -to suit Buildroot. - -To update: - cp -r /usr/src/linux/scripts/kconfig package/config.new - cd package/config.new - cp -a ../config/patches ../config/README.buildroot2 . - quilt push -a - # Fix any conflict - cd .. - rm -rf config - mv config.new config - -Then verify the toplevel targets work: - config - defconfig - menuconfig - xconfig - gconfig - oldconfig diff --git a/package/config/kconfig_load.c b/package/config/kconfig_load.c deleted file mode 100644 index dbdcaad823..0000000000 --- a/package/config/kconfig_load.c +++ /dev/null @@ -1,35 +0,0 @@ -#include -#include -#include - -#include "lkc.h" - -#define P(name,type,arg) type (*name ## _p) arg -#include "lkc_proto.h" -#undef P - -void kconfig_load(void) -{ - void *handle; - char *error; - - handle = dlopen("./libkconfig.so", RTLD_LAZY); - if (!handle) { - handle = dlopen("./scripts/kconfig/libkconfig.so", RTLD_LAZY); - if (!handle) { - fprintf(stderr, "%s\n", dlerror()); - exit(1); - } - } - -#define P(name,type,arg) \ -{ \ - name ## _p = dlsym(handle, #name); \ - if ((error = dlerror())) { \ - fprintf(stderr, "%s\n", error); \ - exit(1); \ - } \ -} -#include "lkc_proto.h" -#undef P -} diff --git a/package/config/lex.zconf.c_shipped b/package/config/lex.zconf.c_shipped deleted file mode 100644 index 6eb0397182..0000000000 --- a/package/config/lex.zconf.c_shipped +++ /dev/null @@ -1,2430 +0,0 @@ - -#line 3 "scripts/kconfig/lex.zconf.c" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define yy_create_buffer zconf_create_buffer -#define yy_delete_buffer zconf_delete_buffer -#define yy_flex_debug zconf_flex_debug -#define yy_init_buffer zconf_init_buffer -#define yy_flush_buffer zconf_flush_buffer -#define yy_load_buffer_state zconf_load_buffer_state -#define yy_switch_to_buffer zconf_switch_to_buffer -#define yyin zconfin -#define yyleng zconfleng -#define yylex zconflex -#define yylineno zconflineno -#define yyout zconfout -#define yyrestart zconfrestart -#define yytext zconftext -#define yywrap zconfwrap -#define yyalloc zconfalloc -#define yyrealloc zconfrealloc -#define yyfree zconffree - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! C99 */ - -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN (yy_start) = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START (((yy_start) - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE zconfrestart(zconfin ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else -#define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -extern int zconfleng; - -extern FILE *zconfin, *zconfout; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up zconftext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = (yy_hold_char); \ - YY_RESTORE_YY_MORE_OFFSET \ - (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up zconftext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, (yytext_ptr) ) - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via zconfrestart()), so that the user can continue scanning by - * just pointing zconfin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* Stack of input buffers. */ -static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ -static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ - ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] - -/* yy_hold_char holds the character lost when zconftext is formed. */ -static char yy_hold_char; -static int yy_n_chars; /* number of characters read into yy_ch_buf */ -int zconfleng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; -static int yy_init = 0; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* Flag which is used to allow zconfwrap()'s to do buffer switches - * instead of setting up a fresh zconfin. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -void zconfrestart (FILE *input_file ); -void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer ); -YY_BUFFER_STATE zconf_create_buffer (FILE *file,int size ); -void zconf_delete_buffer (YY_BUFFER_STATE b ); -void zconf_flush_buffer (YY_BUFFER_STATE b ); -void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer ); -void zconfpop_buffer_state (void ); - -static void zconfensure_buffer_stack (void ); -static void zconf_load_buffer_state (void ); -static void zconf_init_buffer (YY_BUFFER_STATE b,FILE *file ); - -#define YY_FLUSH_BUFFER zconf_flush_buffer(YY_CURRENT_BUFFER ) - -YY_BUFFER_STATE zconf_scan_buffer (char *base,yy_size_t size ); -YY_BUFFER_STATE zconf_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE zconf_scan_bytes (yyconst char *bytes,int len ); - -void *zconfalloc (yy_size_t ); -void *zconfrealloc (void *,yy_size_t ); -void zconffree (void * ); - -#define yy_new_buffer zconf_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - zconfensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - zconf_create_buffer(zconfin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - zconfensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - zconf_create_buffer(zconfin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -#define zconfwrap(n) 1 -#define YY_SKIP_YYWRAP - -typedef unsigned char YY_CHAR; - -FILE *zconfin = (FILE *) 0, *zconfout = (FILE *) 0; - -typedef int yy_state_type; - -extern int zconflineno; - -int zconflineno = 1; - -extern char *zconftext; -#define yytext_ptr zconftext -static yyconst flex_int16_t yy_nxt[][17] = - { - { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0 - }, - - { - 11, 12, 13, 14, 12, 12, 15, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12 - }, - - { - 11, 12, 13, 14, 12, 12, 15, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12 - }, - - { - 11, 16, 16, 17, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 18, 16, 16, 16 - }, - - { - 11, 16, 16, 17, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 18, 16, 16, 16 - - }, - - { - 11, 19, 20, 21, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19 - }, - - { - 11, 19, 20, 21, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19 - }, - - { - 11, 22, 22, 23, 22, 24, 22, 22, 24, 22, - 22, 22, 22, 22, 22, 25, 22 - }, - - { - 11, 22, 22, 23, 22, 24, 22, 22, 24, 22, - 22, 22, 22, 22, 22, 25, 22 - }, - - { - 11, 26, 26, 27, 28, 29, 30, 31, 29, 32, - 33, 34, 35, 35, 36, 37, 38 - - }, - - { - 11, 26, 26, 27, 28, 29, 30, 31, 29, 32, - 33, 34, 35, 35, 36, 37, 38 - }, - - { - -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, - -11, -11, -11, -11, -11, -11, -11 - }, - - { - 11, -12, -12, -12, -12, -12, -12, -12, -12, -12, - -12, -12, -12, -12, -12, -12, -12 - }, - - { - 11, -13, 39, 40, -13, -13, 41, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13 - }, - - { - 11, -14, -14, -14, -14, -14, -14, -14, -14, -14, - -14, -14, -14, -14, -14, -14, -14 - - }, - - { - 11, 42, 42, 43, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42 - }, - - { - 11, -16, -16, -16, -16, -16, -16, -16, -16, -16, - -16, -16, -16, -16, -16, -16, -16 - }, - - { - 11, -17, -17, -17, -17, -17, -17, -17, -17, -17, - -17, -17, -17, -17, -17, -17, -17 - }, - - { - 11, -18, -18, -18, -18, -18, -18, -18, -18, -18, - -18, -18, -18, 44, -18, -18, -18 - }, - - { - 11, 45, 45, -19, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45 - - }, - - { - 11, -20, 46, 47, -20, -20, -20, -20, -20, -20, - -20, -20, -20, -20, -20, -20, -20 - }, - - { - 11, 48, -21, -21, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48 - }, - - { - 11, 49, 49, 50, 49, -22, 49, 49, -22, 49, - 49, 49, 49, 49, 49, -22, 49 - }, - - { - 11, -23, -23, -23, -23, -23, -23, -23, -23, -23, - -23, -23, -23, -23, -23, -23, -23 - }, - - { - 11, -24, -24, -24, -24, -24, -24, -24, -24, -24, - -24, -24, -24, -24, -24, -24, -24 - - }, - - { - 11, 51, 51, 52, 51, 51, 51, 51, 51, 51, - 51, 51, 51, 51, 51, 51, 51 - }, - - { - 11, -26, -26, -26, -26, -26, -26, -26, -26, -26, - -26, -26, -26, -26, -26, -26, -26 - }, - - { - 11, -27, -27, -27, -27, -27, -27, -27, -27, -27, - -27, -27, -27, -27, -27, -27, -27 - }, - - { - 11, -28, -28, -28, -28, -28, -28, -28, -28, -28, - -28, -28, -28, -28, 53, -28, -28 - }, - - { - 11, -29, -29, -29, -29, -29, -29, -29, -29, -29, - -29, -29, -29, -29, -29, -29, -29 - - }, - - { - 11, 54, 54, -30, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54 - }, - - { - 11, -31, -31, -31, -31, -31, -31, 55, -31, -31, - -31, -31, -31, -31, -31, -31, -31 - }, - - { - 11, -32, -32, -32, -32, -32, -32, -32, -32, -32, - -32, -32, -32, -32, -32, -32, -32 - }, - - { - 11, -33, -33, -33, -33, -33, -33, -33, -33, -33, - -33, -33, -33, -33, -33, -33, -33 - }, - - { - 11, -34, -34, -34, -34, -34, -34, -34, -34, -34, - -34, 56, 57, 57, -34, -34, -34 - - }, - - { - 11, -35, -35, -35, -35, -35, -35, -35, -35, -35, - -35, 57, 57, 57, -35, -35, -35 - }, - - { - 11, -36, -36, -36, -36, -36, -36, -36, -36, -36, - -36, -36, -36, -36, -36, -36, -36 - }, - - { - 11, -37, -37, 58, -37, -37, -37, -37, -37, -37, - -37, -37, -37, -37, -37, -37, -37 - }, - - { - 11, -38, -38, -38, -38, -38, -38, -38, -38, -38, - -38, -38, -38, -38, -38, -38, 59 - }, - - { - 11, -39, 39, 40, -39, -39, 41, -39, -39, -39, - -39, -39, -39, -39, -39, -39, -39 - - }, - - { - 11, -40, -40, -40, -40, -40, -40, -40, -40, -40, - -40, -40, -40, -40, -40, -40, -40 - }, - - { - 11, 42, 42, 43, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42 - }, - - { - 11, 42, 42, 43, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42 - }, - - { - 11, -43, -43, -43, -43, -43, -43, -43, -43, -43, - -43, -43, -43, -43, -43, -43, -43 - }, - - { - 11, -44, -44, -44, -44, -44, -44, -44, -44, -44, - -44, -44, -44, 44, -44, -44, -44 - - }, - - { - 11, 45, 45, -45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45 - }, - - { - 11, -46, 46, 47, -46, -46, -46, -46, -46, -46, - -46, -46, -46, -46, -46, -46, -46 - }, - - { - 11, 48, -47, -47, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48 - }, - - { - 11, -48, -48, -48, -48, -48, -48, -48, -48, -48, - -48, -48, -48, -48, -48, -48, -48 - }, - - { - 11, 49, 49, 50, 49, -49, 49, 49, -49, 49, - 49, 49, 49, 49, 49, -49, 49 - - }, - - { - 11, -50, -50, -50, -50, -50, -50, -50, -50, -50, - -50, -50, -50, -50, -50, -50, -50 - }, - - { - 11, -51, -51, 52, -51, -51, -51, -51, -51, -51, - -51, -51, -51, -51, -51, -51, -51 - }, - - { - 11, -52, -52, -52, -52, -52, -52, -52, -52, -52, - -52, -52, -52, -52, -52, -52, -52 - }, - - { - 11, -53, -53, -53, -53, -53, -53, -53, -53, -53, - -53, -53, -53, -53, -53, -53, -53 - }, - - { - 11, 54, 54, -54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54 - - }, - - { - 11, -55, -55, -55, -55, -55, -55, -55, -55, -55, - -55, -55, -55, -55, -55, -55, -55 - }, - - { - 11, -56, -56, -56, -56, -56, -56, -56, -56, -56, - -56, 60, 57, 57, -56, -56, -56 - }, - - { - 11, -57, -57, -57, -57, -57, -57, -57, -57, -57, - -57, 57, 57, 57, -57, -57, -57 - }, - - { - 11, -58, -58, -58, -58, -58, -58, -58, -58, -58, - -58, -58, -58, -58, -58, -58, -58 - }, - - { - 11, -59, -59, -59, -59, -59, -59, -59, -59, -59, - -59, -59, -59, -59, -59, -59, -59 - - }, - - { - 11, -60, -60, -60, -60, -60, -60, -60, -60, -60, - -60, 57, 57, 57, -60, -60, -60 - }, - - } ; - -static yy_state_type yy_get_previous_state (void ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); -static int yy_get_next_buffer (void ); -static void yy_fatal_error (yyconst char msg[] ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up zconftext. - */ -#define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - zconfleng = (size_t) (yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ - *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; - -#define YY_NUM_RULES 33 -#define YY_END_OF_BUFFER 34 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[61] = - { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 34, 5, 4, 2, 3, 7, 8, 6, 32, 29, - 31, 24, 28, 27, 26, 22, 17, 13, 16, 20, - 22, 11, 12, 19, 19, 14, 22, 22, 4, 2, - 3, 3, 1, 6, 32, 29, 31, 30, 24, 23, - 26, 25, 15, 20, 9, 19, 19, 21, 10, 18 - } ; - -static yyconst flex_int32_t yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 5, 6, 1, 1, 7, 8, 9, - 10, 1, 1, 1, 11, 12, 12, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 1, 1, 1, - 14, 1, 1, 1, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 1, 15, 1, 1, 13, 1, 13, 13, 13, 13, - - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 1, 16, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -extern int zconf_flex_debug; -int zconf_flex_debug = 0; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -char *zconftext; -#define YY_NO_INPUT 1 - -/* - * Copyright (C) 2002 Roman Zippel - * Released under the terms of the GNU GPL v2.0. - */ - -#include -#include -#include -#include -#include - -#define LKC_DIRECT_LINK -#include "lkc.h" - -#define START_STRSIZE 16 - -static struct { - struct file *file; - int lineno; -} current_pos; - -static char *text; -static int text_size, text_asize; - -struct buffer { - struct buffer *parent; - YY_BUFFER_STATE state; -}; - -struct buffer *current_buf; - -static int last_ts, first_ts; - -static void zconf_endhelp(void); -static void zconf_endfile(void); - -static void new_string(void) -{ - text = malloc(START_STRSIZE); - text_asize = START_STRSIZE; - text_size = 0; - *text = 0; -} - -static void append_string(const char *str, int size) -{ - int new_size = text_size + size + 1; - if (new_size > text_asize) { - new_size += START_STRSIZE - 1; - new_size &= -START_STRSIZE; - text = realloc(text, new_size); - text_asize = new_size; - } - memcpy(text + text_size, str, size); - text_size += size; - text[text_size] = 0; -} - -static void alloc_string(const char *str, int size) -{ - text = malloc(size + 1); - memcpy(text, str, size); - text[size] = 0; -} - -#define INITIAL 0 -#define COMMAND 1 -#define HELP 2 -#define STRING 3 -#define PARAM 4 - -#ifndef YY_NO_UNISTD_H -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -#include -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -static int yy_init_globals (void ); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int zconflex_destroy (void ); - -int zconfget_debug (void ); - -void zconfset_debug (int debug_flag ); - -YY_EXTRA_TYPE zconfget_extra (void ); - -void zconfset_extra (YY_EXTRA_TYPE user_defined ); - -FILE *zconfget_in (void ); - -void zconfset_in (FILE * in_str ); - -FILE *zconfget_out (void ); - -void zconfset_out (FILE * out_str ); - -int zconfget_leng (void ); - -char *zconfget_text (void ); - -int zconfget_lineno (void ); - -void zconfset_lineno (int line_number ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int zconfwrap (void ); -#else -extern int zconfwrap (void ); -#endif -#endif - - static void yyunput (int c,char *buf_ptr ); - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (void ); -#else -static int input (void ); -#endif - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else -#define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO do { if (fwrite( zconftext, zconfleng, 1, zconfout )) {} } while (0) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - errno=0; \ - while ( (result = read( fileno(zconfin), (char *) buf, max_size )) < 0 ) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(zconfin); \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int zconflex (void); - -#define YY_DECL int zconflex (void) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after zconftext and zconfleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - - int str = 0; - int ts, i; - - if ( !(yy_init) ) - { - (yy_init) = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! (yy_start) ) - (yy_start) = 1; /* first start state */ - - if ( ! zconfin ) - zconfin = stdin; - - if ( ! zconfout ) - zconfout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - zconfensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - zconf_create_buffer(zconfin,YY_BUF_SIZE ); - } - - zconf_load_buffer_state( ); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = (yy_c_buf_p); - - /* Support of zconftext. */ - *yy_cp = (yy_hold_char); - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = (yy_start); -yy_match: - while ( (yy_current_state = yy_nxt[yy_current_state][ yy_ec[YY_SC_TO_UI(*yy_cp)] ]) > 0 ) - ++yy_cp; - - yy_current_state = -yy_current_state; - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ -case 1: -/* rule 1 can match eol */ -case 2: -/* rule 2 can match eol */ -YY_RULE_SETUP -{ - current_file->lineno++; - return T_EOL; -} - YY_BREAK -case 3: -YY_RULE_SETUP - - YY_BREAK -case 4: -YY_RULE_SETUP -{ - BEGIN(COMMAND); -} - YY_BREAK -case 5: -YY_RULE_SETUP -{ - unput(zconftext[0]); - BEGIN(COMMAND); -} - YY_BREAK - -case 6: -YY_RULE_SETUP -{ - struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng); - BEGIN(PARAM); - current_pos.file = current_file; - current_pos.lineno = current_file->lineno; - if (id && id->flags & TF_COMMAND) { - zconflval.id = id; - return id->token; - } - alloc_string(zconftext, zconfleng); - zconflval.string = text; - return T_WORD; - } - YY_BREAK -case 7: -YY_RULE_SETUP - - YY_BREAK -case 8: -/* rule 8 can match eol */ -YY_RULE_SETUP -{ - BEGIN(INITIAL); - current_file->lineno++; - return T_EOL; - } - YY_BREAK - -case 9: -YY_RULE_SETUP -return T_AND; - YY_BREAK -case 10: -YY_RULE_SETUP -return T_OR; - YY_BREAK -case 11: -YY_RULE_SETUP -return T_OPEN_PAREN; - YY_BREAK -case 12: -YY_RULE_SETUP -return T_CLOSE_PAREN; - YY_BREAK -case 13: -YY_RULE_SETUP -return T_NOT; - YY_BREAK -case 14: -YY_RULE_SETUP -return T_EQUAL; - YY_BREAK -case 15: -YY_RULE_SETUP -return T_UNEQUAL; - YY_BREAK -case 16: -YY_RULE_SETUP -{ - str = zconftext[0]; - new_string(); - BEGIN(STRING); - } - YY_BREAK -case 17: -/* rule 17 can match eol */ -YY_RULE_SETUP -BEGIN(INITIAL); current_file->lineno++; return T_EOL; - YY_BREAK -case 18: -YY_RULE_SETUP -/* ignore */ - YY_BREAK -case 19: -YY_RULE_SETUP -{ - struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng); - if (id && id->flags & TF_PARAM) { - zconflval.id = id; - return id->token; - } - alloc_string(zconftext, zconfleng); - zconflval.string = text; - return T_WORD; - } - YY_BREAK -case 20: -YY_RULE_SETUP -/* comment */ - YY_BREAK -case 21: -/* rule 21 can match eol */ -YY_RULE_SETUP -current_file->lineno++; - YY_BREAK -case 22: -YY_RULE_SETUP - - YY_BREAK -case YY_STATE_EOF(PARAM): -{ - BEGIN(INITIAL); - } - YY_BREAK - -case 23: -/* rule 23 can match eol */ -*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ -(yy_c_buf_p) = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up zconftext again */ -YY_RULE_SETUP -{ - append_string(zconftext, zconfleng); - zconflval.string = text; - return T_WORD_QUOTE; - } - YY_BREAK -case 24: -YY_RULE_SETUP -{ - append_string(zconftext, zconfleng); - } - YY_BREAK -case 25: -/* rule 25 can match eol */ -*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ -(yy_c_buf_p) = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up zconftext again */ -YY_RULE_SETUP -{ - append_string(zconftext + 1, zconfleng - 1); - zconflval.string = text; - return T_WORD_QUOTE; - } - YY_BREAK -case 26: -YY_RULE_SETUP -{ - append_string(zconftext + 1, zconfleng - 1); - } - YY_BREAK -case 27: -YY_RULE_SETUP -{ - if (str == zconftext[0]) { - BEGIN(PARAM); - zconflval.string = text; - return T_WORD_QUOTE; - } else - append_string(zconftext, 1); - } - YY_BREAK -case 28: -/* rule 28 can match eol */ -YY_RULE_SETUP -{ - printf("%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno()); - current_file->lineno++; - BEGIN(INITIAL); - return T_EOL; - } - YY_BREAK -case YY_STATE_EOF(STRING): -{ - BEGIN(INITIAL); - } - YY_BREAK - -case 29: -YY_RULE_SETUP -{ - ts = 0; - for (i = 0; i < zconfleng; i++) { - if (zconftext[i] == '\t') - ts = (ts & ~7) + 8; - else - ts++; - } - last_ts = ts; - if (first_ts) { - if (ts < first_ts) { - zconf_endhelp(); - return T_HELPTEXT; - } - ts -= first_ts; - while (ts > 8) { - append_string(" ", 8); - ts -= 8; - } - append_string(" ", ts); - } - } - YY_BREAK -case 30: -/* rule 30 can match eol */ -*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ -(yy_c_buf_p) = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up zconftext again */ -YY_RULE_SETUP -{ - current_file->lineno++; - zconf_endhelp(); - return T_HELPTEXT; - } - YY_BREAK -case 31: -/* rule 31 can match eol */ -YY_RULE_SETUP -{ - current_file->lineno++; - append_string("\n", 1); - } - YY_BREAK -case 32: -YY_RULE_SETUP -{ - while (zconfleng) { - if ((zconftext[zconfleng-1] != ' ') && (zconftext[zconfleng-1] != '\t')) - break; - zconfleng--; - } - append_string(zconftext, zconfleng); - if (!first_ts) - first_ts = last_ts; - } - YY_BREAK -case YY_STATE_EOF(HELP): -{ - zconf_endhelp(); - return T_HELPTEXT; - } - YY_BREAK - -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(COMMAND): -{ - if (current_file) { - zconf_endfile(); - return T_EOL; - } - fclose(zconfin); - yyterminate(); -} - YY_BREAK -case 33: -YY_RULE_SETUP -YY_FATAL_ERROR( "flex scanner jammed" ); - YY_BREAK - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = (yy_hold_char); - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed zconfin at a new source and called - * zconflex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = zconfin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++(yy_c_buf_p); - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = (yy_c_buf_p); - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_END_OF_FILE: - { - (yy_did_buffer_switch_on_eof) = 0; - - if ( zconfwrap( ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * zconftext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = - (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - (yy_c_buf_p) = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ -} /* end of zconflex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (void) -{ - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = (yytext_ptr); - register int number_to_move, i; - int ret_val; - - if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; - - int yy_c_buf_p_offset = - (int) ((yy_c_buf_p) - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - zconfrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), (size_t) num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - if ( (yy_n_chars) == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - zconfrestart(zconfin ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) zconfrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - (yy_n_chars) += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; - - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (void) -{ - register yy_state_type yy_current_state; - register char *yy_cp; - - yy_current_state = (yy_start); - - for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) - { - yy_current_state = yy_nxt[yy_current_state][(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1)]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) -{ - register int yy_is_jam; - - yy_current_state = yy_nxt[yy_current_state][1]; - yy_is_jam = (yy_current_state <= 0); - - return yy_is_jam ? 0 : yy_current_state; -} - - static void yyunput (int c, register char * yy_bp ) -{ - register char *yy_cp; - - yy_cp = (yy_c_buf_p); - - /* undo effects of setting up zconftext */ - *yy_cp = (yy_hold_char); - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - register int number_to_move = (yy_n_chars) + 2; - register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - register char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - (yytext_ptr) = yy_bp; - (yy_hold_char) = *yy_cp; - (yy_c_buf_p) = yy_cp; -} - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (void) -#else - static int input (void) -#endif - -{ - int c; - - *(yy_c_buf_p) = (yy_hold_char); - - if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - /* This was really a NUL. */ - *(yy_c_buf_p) = '\0'; - - else - { /* need more input */ - int offset = (yy_c_buf_p) - (yytext_ptr); - ++(yy_c_buf_p); - - switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - zconfrestart(zconfin ); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( zconfwrap( ) ) - return EOF; - - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(); -#else - return input(); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + offset; - break; - } - } - } - - c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve zconftext */ - (yy_hold_char) = *++(yy_c_buf_p); - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * - * @note This function does not reset the start condition to @c INITIAL . - */ - void zconfrestart (FILE * input_file ) -{ - - if ( ! YY_CURRENT_BUFFER ){ - zconfensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - zconf_create_buffer(zconfin,YY_BUF_SIZE ); - } - - zconf_init_buffer(YY_CURRENT_BUFFER,input_file ); - zconf_load_buffer_state( ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * - */ - void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer ) -{ - - /* TODO. We should be able to replace this entire function body - * with - * zconfpop_buffer_state(); - * zconfpush_buffer_state(new_buffer); - */ - zconfensure_buffer_stack (); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - zconf_load_buffer_state( ); - - /* We don't actually know whether we did this switch during - * EOF (zconfwrap()) processing, but the only time this flag - * is looked at is after zconfwrap() is called, so it's safe - * to go ahead and always set it. - */ - (yy_did_buffer_switch_on_eof) = 1; -} - -static void zconf_load_buffer_state (void) -{ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - zconfin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - (yy_hold_char) = *(yy_c_buf_p); -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * - * @return the allocated buffer state. - */ - YY_BUFFER_STATE zconf_create_buffer (FILE * file, int size ) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) zconfalloc(b->yy_buf_size + 2 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - zconf_init_buffer(b,file ); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with zconf_create_buffer() - * - */ - void zconf_delete_buffer (YY_BUFFER_STATE b ) -{ - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - zconffree((void *) b->yy_ch_buf ); - - zconffree((void *) b ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a zconfrestart() or at EOF. - */ - static void zconf_init_buffer (YY_BUFFER_STATE b, FILE * file ) - -{ - int oerrno = errno; - - zconf_flush_buffer(b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then zconf_init_buffer was _probably_ - * called from zconfrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * - */ - void zconf_flush_buffer (YY_BUFFER_STATE b ) -{ - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - zconf_load_buffer_state( ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * - */ -void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer ) -{ - if (new_buffer == NULL) - return; - - zconfensure_buffer_stack(); - - /* This block is copied from zconf_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - (yy_buffer_stack_top)++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from zconf_switch_to_buffer. */ - zconf_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * - */ -void zconfpop_buffer_state (void) -{ - if (!YY_CURRENT_BUFFER) - return; - - zconf_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - zconf_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void zconfensure_buffer_stack (void) -{ - int num_to_alloc; - - if (!(yy_buffer_stack)) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; - (yy_buffer_stack) = (struct yy_buffer_state**)zconfalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in zconfensure_buffer_stack()" ); - - memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - (yy_buffer_stack_max) = num_to_alloc; - (yy_buffer_stack_top) = 0; - return; - } - - if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**)zconfrealloc - ((yy_buffer_stack), - num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in zconfensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); - (yy_buffer_stack_max) = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE zconf_scan_buffer (char * base, yy_size_t size ) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - zconf_switch_to_buffer(b ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to zconflex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * zconf_scan_bytes() instead. - */ -YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr ) -{ - - return zconf_scan_bytes(yystr,strlen(yystr) ); -} - -/** Setup the input buffer state to scan the given bytes. The next call to zconflex() will - * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE zconf_scan_bytes (yyconst char * yybytes, int _yybytes_len ) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) zconfalloc(n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = zconf_scan_buffer(buf,n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in zconf_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yy_fatal_error (yyconst char* msg ) -{ - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up zconftext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - zconftext[zconfleng] = (yy_hold_char); \ - (yy_c_buf_p) = zconftext + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - zconfleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the current line number. - * - */ -int zconfget_lineno (void) -{ - - return zconflineno; -} - -/** Get the input stream. - * - */ -FILE *zconfget_in (void) -{ - return zconfin; -} - -/** Get the output stream. - * - */ -FILE *zconfget_out (void) -{ - return zconfout; -} - -/** Get the length of the current token. - * - */ -int zconfget_leng (void) -{ - return zconfleng; -} - -/** Get the current token. - * - */ - -char *zconfget_text (void) -{ - return zconftext; -} - -/** Set the current line number. - * @param line_number - * - */ -void zconfset_lineno (int line_number ) -{ - - zconflineno = line_number; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param in_str A readable stream. - * - * @see zconf_switch_to_buffer - */ -void zconfset_in (FILE * in_str ) -{ - zconfin = in_str ; -} - -void zconfset_out (FILE * out_str ) -{ - zconfout = out_str ; -} - -int zconfget_debug (void) -{ - return zconf_flex_debug; -} - -void zconfset_debug (int bdebug ) -{ - zconf_flex_debug = bdebug ; -} - -static int yy_init_globals (void) -{ - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from zconflex_destroy(), so don't allocate here. - */ - - (yy_buffer_stack) = 0; - (yy_buffer_stack_top) = 0; - (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = (char *) 0; - (yy_init) = 0; - (yy_start) = 0; - -/* Defined in main.c */ -#ifdef YY_STDINIT - zconfin = stdin; - zconfout = stdout; -#else - zconfin = (FILE *) 0; - zconfout = (FILE *) 0; -#endif - - /* For future reference: Set errno on error, since we are called by - * zconflex_init() - */ - return 0; -} - -/* zconflex_destroy is for both reentrant and non-reentrant scanners. */ -int zconflex_destroy (void) -{ - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - zconf_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - zconfpop_buffer_state(); - } - - /* Destroy the stack itself. */ - zconffree((yy_buffer_stack) ); - (yy_buffer_stack) = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * zconflex() is called, initialization will occur. */ - yy_init_globals( ); - - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) -{ - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s ) -{ - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *zconfalloc (yy_size_t size ) -{ - return (void *) malloc( size ); -} - -void *zconfrealloc (void * ptr, yy_size_t size ) -{ - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); -} - -void zconffree (void * ptr ) -{ - free( (char *) ptr ); /* see zconfrealloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -void zconf_starthelp(void) -{ - new_string(); - last_ts = first_ts = 0; - BEGIN(HELP); -} - -static void zconf_endhelp(void) -{ - zconflval.string = text; - BEGIN(INITIAL); -} - -/* - * Try to open specified file with following names: - * ./name - * $(srctree)/name - * The latter is used when srctree is separate from objtree - * when compiling the kernel. - * Return NULL if file is not found. - */ -FILE *zconf_fopen(const char *name) -{ - char *env, fullname[PATH_MAX+1]; - FILE *f; - - f = fopen(name, "r"); - if (!f && name != NULL && name[0] != '/') { - env = getenv(SRCTREE); - if (env) { - sprintf(fullname, "%s/%s", env, name); - f = fopen(fullname, "r"); - } - } - return f; -} - -void zconf_initscan(const char *name) -{ - zconfin = zconf_fopen(name); - if (!zconfin) { - printf("can't find file %s\n", name); - exit(1); - } - - current_buf = malloc(sizeof(*current_buf)); - memset(current_buf, 0, sizeof(*current_buf)); - - current_file = file_lookup(name); - current_file->lineno = 1; - current_file->flags = FILE_BUSY; -} - -void zconf_nextfile(const char *name) -{ - struct file *file = file_lookup(name); - struct buffer *buf = malloc(sizeof(*buf)); - memset(buf, 0, sizeof(*buf)); - - current_buf->state = YY_CURRENT_BUFFER; - zconfin = zconf_fopen(file->name); - if (!zconfin) { - printf("%s:%d: can't open file \"%s\"\n", - zconf_curname(), zconf_lineno(), file->name); - exit(1); - } - zconf_switch_to_buffer(zconf_create_buffer(zconfin,YY_BUF_SIZE)); - buf->parent = current_buf; - current_buf = buf; - - if (file->flags & FILE_BUSY) { - printf("%s:%d: do not source '%s' from itself\n", - zconf_curname(), zconf_lineno(), name); - exit(1); - } - if (file->flags & FILE_SCANNED) { - printf("%s:%d: file '%s' is already sourced from '%s'\n", - zconf_curname(), zconf_lineno(), name, - file->parent->name); - exit(1); - } - file->flags |= FILE_BUSY; - file->lineno = 1; - file->parent = current_file; - current_file = file; -} - -static void zconf_endfile(void) -{ - struct buffer *parent; - - current_file->flags |= FILE_SCANNED; - current_file->flags &= ~FILE_BUSY; - current_file = current_file->parent; - - parent = current_buf->parent; - if (parent) { - fclose(zconfin); - zconf_delete_buffer(YY_CURRENT_BUFFER); - zconf_switch_to_buffer(parent->state); - } - free(current_buf); - current_buf = parent; -} - -int zconf_lineno(void) -{ - return current_pos.lineno; -} - -const char *zconf_curname(void) -{ - return current_pos.file ? current_pos.file->name : ""; -} - diff --git a/package/config/lxdialog/inputbox.c b/package/config/lxdialog/inputbox.c deleted file mode 100644 index dd8e587c50..0000000000 --- a/package/config/lxdialog/inputbox.c +++ /dev/null @@ -1,238 +0,0 @@ -/* - * inputbox.c -- implements the input box - * - * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) - * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "dialog.h" - -char dialog_input_result[MAX_LEN + 1]; - -/* - * Print the termination buttons - */ -static void print_buttons(WINDOW * dialog, int height, int width, int selected) -{ - int x = width / 2 - 11; - int y = height - 2; - - print_button(dialog, gettext(" Ok "), y, x, selected == 0); - print_button(dialog, gettext(" Help "), y, x + 14, selected == 1); - - wmove(dialog, y, x + 1 + 14 * selected); - wrefresh(dialog); -} - -/* - * Display a dialog box for inputing a string - */ -int dialog_inputbox(const char *title, const char *prompt, int height, int width, - const char *init) -{ - int i, x, y, box_y, box_x, box_width; - int input_x = 0, scroll = 0, key = 0, button = -1; - char *instr = dialog_input_result; - WINDOW *dialog; - - if (!init) - instr[0] = '\0'; - else - strcpy(instr, init); - -do_resize: - if (getmaxy(stdscr) <= (height - 2)) - return -ERRDISPLAYTOOSMALL; - if (getmaxx(stdscr) <= (width - 2)) - return -ERRDISPLAYTOOSMALL; - - /* center dialog box on screen */ - x = (COLS - width) / 2; - y = (LINES - height) / 2; - - draw_shadow(stdscr, y, x, height, width); - - dialog = newwin(height, width, y, x); - keypad(dialog, TRUE); - - draw_box(dialog, 0, 0, height, width, - dlg.dialog.atr, dlg.border.atr); - wattrset(dialog, dlg.border.atr); - mvwaddch(dialog, height - 3, 0, ACS_LTEE); - for (i = 0; i < width - 2; i++) - waddch(dialog, ACS_HLINE); - wattrset(dialog, dlg.dialog.atr); - waddch(dialog, ACS_RTEE); - - print_title(dialog, title, width); - - wattrset(dialog, dlg.dialog.atr); - print_autowrap(dialog, prompt, width - 2, 1, 3); - - /* Draw the input field box */ - box_width = width - 6; - getyx(dialog, y, x); - box_y = y + 2; - box_x = (width - box_width) / 2; - draw_box(dialog, y + 1, box_x - 1, 3, box_width + 2, - dlg.dialog.atr, dlg.border.atr); - - print_buttons(dialog, height, width, 0); - - /* Set up the initial value */ - wmove(dialog, box_y, box_x); - wattrset(dialog, dlg.inputbox.atr); - - input_x = strlen(instr); - - if (input_x >= box_width) { - scroll = input_x - box_width + 1; - input_x = box_width - 1; - for (i = 0; i < box_width - 1; i++) - waddch(dialog, instr[scroll + i]); - } else { - waddstr(dialog, instr); - } - - wmove(dialog, box_y, box_x + input_x); - - wrefresh(dialog); - - while (key != KEY_ESC) { - key = wgetch(dialog); - - if (button == -1) { /* Input box selected */ - switch (key) { - case TAB: - case KEY_UP: - case KEY_DOWN: - break; - case KEY_LEFT: - continue; - case KEY_RIGHT: - continue; - case KEY_BACKSPACE: - case 127: - if (input_x || scroll) { - wattrset(dialog, dlg.inputbox.atr); - if (!input_x) { - scroll = scroll < box_width - 1 ? 0 : scroll - (box_width - 1); - wmove(dialog, box_y, box_x); - for (i = 0; i < box_width; i++) - waddch(dialog, - instr[scroll + input_x + i] ? - instr[scroll + input_x + i] : ' '); - input_x = strlen(instr) - scroll; - } else - input_x--; - instr[scroll + input_x] = '\0'; - mvwaddch(dialog, box_y, input_x + box_x, ' '); - wmove(dialog, box_y, input_x + box_x); - wrefresh(dialog); - } - continue; - default: - if (key < 0x100 && isprint(key)) { - if (scroll + input_x < MAX_LEN) { - wattrset(dialog, dlg.inputbox.atr); - instr[scroll + input_x] = key; - instr[scroll + input_x + 1] = '\0'; - if (input_x == box_width - 1) { - scroll++; - wmove(dialog, box_y, box_x); - for (i = 0; i < box_width - 1; i++) - waddch(dialog, instr [scroll + i]); - } else { - wmove(dialog, box_y, input_x++ + box_x); - waddch(dialog, key); - } - wrefresh(dialog); - } else - flash(); /* Alarm user about overflow */ - continue; - } - } - } - switch (key) { - case 'O': - case 'o': - delwin(dialog); - return 0; - case 'H': - case 'h': - delwin(dialog); - return 1; - case KEY_UP: - case KEY_LEFT: - switch (button) { - case -1: - button = 1; /* Indicates "Help" button is selected */ - print_buttons(dialog, height, width, 1); - break; - case 0: - button = -1; /* Indicates input box is selected */ - print_buttons(dialog, height, width, 0); - wmove(dialog, box_y, box_x + input_x); - wrefresh(dialog); - break; - case 1: - button = 0; /* Indicates "OK" button is selected */ - print_buttons(dialog, height, width, 0); - break; - } - break; - case TAB: - case KEY_DOWN: - case KEY_RIGHT: - switch (button) { - case -1: - button = 0; /* Indicates "OK" button is selected */ - print_buttons(dialog, height, width, 0); - break; - case 0: - button = 1; /* Indicates "Help" button is selected */ - print_buttons(dialog, height, width, 1); - break; - case 1: - button = -1; /* Indicates input box is selected */ - print_buttons(dialog, height, width, 0); - wmove(dialog, box_y, box_x + input_x); - wrefresh(dialog); - break; - } - break; - case ' ': - case '\n': - delwin(dialog); - return (button == -1 ? 0 : button); - case 'X': - case 'x': - key = KEY_ESC; - break; - case KEY_ESC: - key = on_key_esc(dialog); - break; - case KEY_RESIZE: - delwin(dialog); - on_key_resize(); - goto do_resize; - } - } - - delwin(dialog); - return KEY_ESC; /* ESC pressed */ -} diff --git a/package/config/lxdialog/textbox.c b/package/config/lxdialog/textbox.c deleted file mode 100644 index c704712d02..0000000000 --- a/package/config/lxdialog/textbox.c +++ /dev/null @@ -1,391 +0,0 @@ -/* - * textbox.c -- implements the text box - * - * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) - * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "dialog.h" - -static void back_lines(int n); -static void print_page(WINDOW * win, int height, int width); -static void print_line(WINDOW * win, int row, int width); -static char *get_line(void); -static void print_position(WINDOW * win); - -static int hscroll; -static int begin_reached, end_reached, page_length; -static const char *buf; -static const char *page; - -/* - * refresh window content - */ -static void refresh_text_box(WINDOW *dialog, WINDOW *box, int boxh, int boxw, - int cur_y, int cur_x) -{ - print_page(box, boxh, boxw); - print_position(dialog); - wmove(dialog, cur_y, cur_x); /* Restore cursor position */ - wrefresh(dialog); -} - - -/* - * Display text from a file in a dialog box. - */ -int dialog_textbox(const char *title, const char *tbuf, - int initial_height, int initial_width) -{ - int i, x, y, cur_x, cur_y, key = 0; - int height, width, boxh, boxw; - int passed_end; - WINDOW *dialog, *box; - - begin_reached = 1; - end_reached = 0; - page_length = 0; - hscroll = 0; - buf = tbuf; - page = buf; /* page is pointer to start of page to be displayed */ - -do_resize: - getmaxyx(stdscr, height, width); - if (height < 8 || width < 8) - return -ERRDISPLAYTOOSMALL; - if (initial_height != 0) - height = initial_height; - else - if (height > 4) - height -= 4; - else - height = 0; - if (initial_width != 0) - width = initial_width; - else - if (width > 5) - width -= 5; - else - width = 0; - - /* center dialog box on screen */ - x = (COLS - width) / 2; - y = (LINES - height) / 2; - - draw_shadow(stdscr, y, x, height, width); - - dialog = newwin(height, width, y, x); - keypad(dialog, TRUE); - - /* Create window for box region, used for scrolling text */ - boxh = height - 4; - boxw = width - 2; - box = subwin(dialog, boxh, boxw, y + 1, x + 1); - wattrset(box, dlg.dialog.atr); - wbkgdset(box, dlg.dialog.atr & A_COLOR); - - keypad(box, TRUE); - - /* register the new window, along with its borders */ - draw_box(dialog, 0, 0, height, width, - dlg.dialog.atr, dlg.border.atr); - - wattrset(dialog, dlg.border.atr); - mvwaddch(dialog, height - 3, 0, ACS_LTEE); - for (i = 0; i < width - 2; i++) - waddch(dialog, ACS_HLINE); - wattrset(dialog, dlg.dialog.atr); - wbkgdset(dialog, dlg.dialog.atr & A_COLOR); - waddch(dialog, ACS_RTEE); - - print_title(dialog, title, width); - - print_button(dialog, gettext(" Exit "), height - 2, width / 2 - 4, TRUE); - wnoutrefresh(dialog); - getyx(dialog, cur_y, cur_x); /* Save cursor position */ - - /* Print first page of text */ - attr_clear(box, boxh, boxw, dlg.dialog.atr); - refresh_text_box(dialog, box, boxh, boxw, cur_y, cur_x); - - while ((key != KEY_ESC) && (key != '\n')) { - key = wgetch(dialog); - switch (key) { - case 'E': /* Exit */ - case 'e': - case 'X': - case 'x': - delwin(box); - delwin(dialog); - return 0; - case 'g': /* First page */ - case KEY_HOME: - if (!begin_reached) { - begin_reached = 1; - page = buf; - refresh_text_box(dialog, box, boxh, boxw, - cur_y, cur_x); - } - break; - case 'G': /* Last page */ - case KEY_END: - - end_reached = 1; - /* point to last char in buf */ - page = buf + strlen(buf); - back_lines(boxh); - refresh_text_box(dialog, box, boxh, boxw, - cur_y, cur_x); - break; - case 'K': /* Previous line */ - case 'k': - case KEY_UP: - if (!begin_reached) { - back_lines(page_length + 1); - - /* We don't call print_page() here but use - * scrolling to ensure faster screen update. - * However, 'end_reached' and 'page_length' - * should still be updated, and 'page' should - * point to start of next page. This is done - * by calling get_line() in the following - * 'for' loop. */ - scrollok(box, TRUE); - wscrl(box, -1); /* Scroll box region down one line */ - scrollok(box, FALSE); - page_length = 0; - passed_end = 0; - for (i = 0; i < boxh; i++) { - if (!i) { - /* print first line of page */ - print_line(box, 0, boxw); - wnoutrefresh(box); - } else - /* Called to update 'end_reached' and 'page' */ - get_line(); - if (!passed_end) - page_length++; - if (end_reached && !passed_end) - passed_end = 1; - } - - print_position(dialog); - wmove(dialog, cur_y, cur_x); /* Restore cursor position */ - wrefresh(dialog); - } - break; - case 'B': /* Previous page */ - case 'b': - case KEY_PPAGE: - if (begin_reached) - break; - back_lines(page_length + boxh); - refresh_text_box(dialog, box, boxh, boxw, - cur_y, cur_x); - break; - case 'J': /* Next line */ - case 'j': - case KEY_DOWN: - if (!end_reached) { - begin_reached = 0; - scrollok(box, TRUE); - scroll(box); /* Scroll box region up one line */ - scrollok(box, FALSE); - print_line(box, boxh - 1, boxw); - wnoutrefresh(box); - print_position(dialog); - wmove(dialog, cur_y, cur_x); /* Restore cursor position */ - wrefresh(dialog); - } - break; - case KEY_NPAGE: /* Next page */ - case ' ': - if (end_reached) - break; - - begin_reached = 0; - refresh_text_box(dialog, box, boxh, boxw, - cur_y, cur_x); - break; - case '0': /* Beginning of line */ - case 'H': /* Scroll left */ - case 'h': - case KEY_LEFT: - if (hscroll <= 0) - break; - - if (key == '0') - hscroll = 0; - else - hscroll--; - /* Reprint current page to scroll horizontally */ - back_lines(page_length); - refresh_text_box(dialog, box, boxh, boxw, - cur_y, cur_x); - break; - case 'L': /* Scroll right */ - case 'l': - case KEY_RIGHT: - if (hscroll >= MAX_LEN) - break; - hscroll++; - /* Reprint current page to scroll horizontally */ - back_lines(page_length); - refresh_text_box(dialog, box, boxh, boxw, - cur_y, cur_x); - break; - case KEY_ESC: - key = on_key_esc(dialog); - break; - case KEY_RESIZE: - back_lines(height); - delwin(box); - delwin(dialog); - on_key_resize(); - goto do_resize; - } - } - delwin(box); - delwin(dialog); - return key; /* ESC pressed */ -} - -/* - * Go back 'n' lines in text. Called by dialog_textbox(). - * 'page' will be updated to point to the desired line in 'buf'. - */ -static void back_lines(int n) -{ - int i; - - begin_reached = 0; - /* Go back 'n' lines */ - for (i = 0; i < n; i++) { - if (*page == '\0') { - if (end_reached) { - end_reached = 0; - continue; - } - } - if (page == buf) { - begin_reached = 1; - return; - } - page--; - do { - if (page == buf) { - begin_reached = 1; - return; - } - page--; - } while (*page != '\n'); - page++; - } -} - -/* - * Print a new page of text. Called by dialog_textbox(). - */ -static void print_page(WINDOW * win, int height, int width) -{ - int i, passed_end = 0; - - page_length = 0; - for (i = 0; i < height; i++) { - print_line(win, i, width); - if (!passed_end) - page_length++; - if (end_reached && !passed_end) - passed_end = 1; - } - wnoutrefresh(win); -} - -/* - * Print a new line of text. Called by dialog_textbox() and print_page(). - */ -static void print_line(WINDOW * win, int row, int width) -{ - int y, x; - char *line; - - line = get_line(); - line += MIN(strlen(line), hscroll); /* Scroll horizontally */ - wmove(win, row, 0); /* move cursor to correct line */ - waddch(win, ' '); - waddnstr(win, line, MIN(strlen(line), width - 2)); - - getyx(win, y, x); - /* Clear 'residue' of previous line */ -#if OLD_NCURSES - { - int i; - for (i = 0; i < width - x; i++) - waddch(win, ' '); - } -#else - wclrtoeol(win); -#endif -} - -/* - * Return current line of text. Called by dialog_textbox() and print_line(). - * 'page' should point to start of current line before calling, and will be - * updated to point to start of next line. - */ -static char *get_line(void) -{ - int i = 0; - static char line[MAX_LEN + 1]; - - end_reached = 0; - while (*page != '\n') { - if (*page == '\0') { - if (!end_reached) { - end_reached = 1; - break; - } - } else if (i < MAX_LEN) - line[i++] = *(page++); - else { - /* Truncate lines longer than MAX_LEN characters */ - if (i == MAX_LEN) - line[i++] = '\0'; - page++; - } - } - if (i <= MAX_LEN) - line[i] = '\0'; - if (!end_reached) - page++; /* move pass '\n' */ - - return line; -} - -/* - * Print current position - */ -static void print_position(WINDOW * win) -{ - int percent; - - wattrset(win, dlg.position_indicator.atr); - wbkgdset(win, dlg.position_indicator.atr & A_COLOR); - percent = (page - buf) * 100 / strlen(buf); - wmove(win, getmaxy(win) - 3, getmaxx(win) - 9); - wprintw(win, "(%3d%%)", percent); -} diff --git a/package/config/lxdialog/util.c b/package/config/lxdialog/util.c deleted file mode 100644 index f2375ad7eb..0000000000 --- a/package/config/lxdialog/util.c +++ /dev/null @@ -1,657 +0,0 @@ -/* - * util.c - * - * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) - * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - -#include "dialog.h" - -struct dialog_info dlg; - -static void set_mono_theme(void) -{ - dlg.screen.atr = A_NORMAL; - dlg.shadow.atr = A_NORMAL; - dlg.dialog.atr = A_NORMAL; - dlg.title.atr = A_BOLD; - dlg.border.atr = A_NORMAL; - dlg.button_active.atr = A_REVERSE; - dlg.button_inactive.atr = A_DIM; - dlg.button_key_active.atr = A_REVERSE; - dlg.button_key_inactive.atr = A_BOLD; - dlg.button_label_active.atr = A_REVERSE; - dlg.button_label_inactive.atr = A_NORMAL; - dlg.inputbox.atr = A_NORMAL; - dlg.inputbox_border.atr = A_NORMAL; - dlg.searchbox.atr = A_NORMAL; - dlg.searchbox_title.atr = A_BOLD; - dlg.searchbox_border.atr = A_NORMAL; - dlg.position_indicator.atr = A_BOLD; - dlg.menubox.atr = A_NORMAL; - dlg.menubox_border.atr = A_NORMAL; - dlg.item.atr = A_NORMAL; - dlg.item_selected.atr = A_REVERSE; - dlg.tag.atr = A_BOLD; - dlg.tag_selected.atr = A_REVERSE; - dlg.tag_key.atr = A_BOLD; - dlg.tag_key_selected.atr = A_REVERSE; - dlg.check.atr = A_BOLD; - dlg.check_selected.atr = A_REVERSE; - dlg.uarrow.atr = A_BOLD; - dlg.darrow.atr = A_BOLD; -} - -#define DLG_COLOR(dialog, f, b, h) \ -do { \ - dlg.dialog.fg = (f); \ - dlg.dialog.bg = (b); \ - dlg.dialog.hl = (h); \ -} while (0) - -static void set_classic_theme(void) -{ - DLG_COLOR(screen, COLOR_CYAN, COLOR_BLUE, true); - DLG_COLOR(shadow, COLOR_BLACK, COLOR_BLACK, true); - DLG_COLOR(dialog, COLOR_BLACK, COLOR_WHITE, false); - DLG_COLOR(title, COLOR_YELLOW, COLOR_WHITE, true); - DLG_COLOR(border, COLOR_WHITE, COLOR_WHITE, true); - DLG_COLOR(button_active, COLOR_WHITE, COLOR_BLUE, true); - DLG_COLOR(button_inactive, COLOR_BLACK, COLOR_WHITE, false); - DLG_COLOR(button_key_active, COLOR_WHITE, COLOR_BLUE, true); - DLG_COLOR(button_key_inactive, COLOR_RED, COLOR_WHITE, false); - DLG_COLOR(button_label_active, COLOR_YELLOW, COLOR_BLUE, true); - DLG_COLOR(button_label_inactive, COLOR_BLACK, COLOR_WHITE, true); - DLG_COLOR(inputbox, COLOR_BLACK, COLOR_WHITE, false); - DLG_COLOR(inputbox_border, COLOR_BLACK, COLOR_WHITE, false); - DLG_COLOR(searchbox, COLOR_BLACK, COLOR_WHITE, false); - DLG_COLOR(searchbox_title, COLOR_YELLOW, COLOR_WHITE, true); - DLG_COLOR(searchbox_border, COLOR_WHITE, COLOR_WHITE, true); - DLG_COLOR(position_indicator, COLOR_YELLOW, COLOR_WHITE, true); - DLG_COLOR(menubox, COLOR_BLACK, COLOR_WHITE, false); - DLG_COLOR(menubox_border, COLOR_WHITE, COLOR_WHITE, true); - DLG_COLOR(item, COLOR_BLACK, COLOR_WHITE, false); - DLG_COLOR(item_selected, COLOR_WHITE, COLOR_BLUE, true); - DLG_COLOR(tag, COLOR_YELLOW, COLOR_WHITE, true); - DLG_COLOR(tag_selected, COLOR_YELLOW, COLOR_BLUE, true); - DLG_COLOR(tag_key, COLOR_YELLOW, COLOR_WHITE, true); - DLG_COLOR(tag_key_selected, COLOR_YELLOW, COLOR_BLUE, true); - DLG_COLOR(check, COLOR_BLACK, COLOR_WHITE, false); - DLG_COLOR(check_selected, COLOR_WHITE, COLOR_BLUE, true); - DLG_COLOR(uarrow, COLOR_GREEN, COLOR_WHITE, true); - DLG_COLOR(darrow, COLOR_GREEN, COLOR_WHITE, true); -} - -static void set_blackbg_theme(void) -{ - DLG_COLOR(screen, COLOR_RED, COLOR_BLACK, true); - DLG_COLOR(shadow, COLOR_BLACK, COLOR_BLACK, false); - DLG_COLOR(dialog, COLOR_WHITE, COLOR_BLACK, false); - DLG_COLOR(title, COLOR_RED, COLOR_BLACK, false); - DLG_COLOR(border, COLOR_BLACK, COLOR_BLACK, true); - - DLG_COLOR(button_active, COLOR_YELLOW, COLOR_RED, false); - DLG_COLOR(button_inactive, COLOR_YELLOW, COLOR_BLACK, false); - DLG_COLOR(button_key_active, COLOR_YELLOW, COLOR_RED, true); - DLG_COLOR(button_key_inactive, COLOR_RED, COLOR_BLACK, false); - DLG_COLOR(button_label_active, COLOR_WHITE, COLOR_RED, false); - DLG_COLOR(button_label_inactive, COLOR_BLACK, COLOR_BLACK, true); - - DLG_COLOR(inputbox, COLOR_YELLOW, COLOR_BLACK, false); - DLG_COLOR(inputbox_border, COLOR_YELLOW, COLOR_BLACK, false); - - DLG_COLOR(searchbox, COLOR_YELLOW, COLOR_BLACK, false); - DLG_COLOR(searchbox_title, COLOR_YELLOW, COLOR_BLACK, true); - DLG_COLOR(searchbox_border, COLOR_BLACK, COLOR_BLACK, true); - - DLG_COLOR(position_indicator, COLOR_RED, COLOR_BLACK, false); - - DLG_COLOR(menubox, COLOR_YELLOW, COLOR_BLACK, false); - DLG_COLOR(menubox_border, COLOR_BLACK, COLOR_BLACK, true); - - DLG_COLOR(item, COLOR_WHITE, COLOR_BLACK, false); - DLG_COLOR(item_selected, COLOR_WHITE, COLOR_RED, false); - - DLG_COLOR(tag, COLOR_RED, COLOR_BLACK, false); - DLG_COLOR(tag_selected, COLOR_YELLOW, COLOR_RED, true); - DLG_COLOR(tag_key, COLOR_RED, COLOR_BLACK, false); - DLG_COLOR(tag_key_selected, COLOR_YELLOW, COLOR_RED, true); - - DLG_COLOR(check, COLOR_YELLOW, COLOR_BLACK, false); - DLG_COLOR(check_selected, COLOR_YELLOW, COLOR_RED, true); - - DLG_COLOR(uarrow, COLOR_RED, COLOR_BLACK, false); - DLG_COLOR(darrow, COLOR_RED, COLOR_BLACK, false); -} - -static void set_bluetitle_theme(void) -{ - set_classic_theme(); - DLG_COLOR(title, COLOR_BLUE, COLOR_WHITE, true); - DLG_COLOR(button_key_active, COLOR_YELLOW, COLOR_BLUE, true); - DLG_COLOR(button_label_active, COLOR_WHITE, COLOR_BLUE, true); - DLG_COLOR(searchbox_title, COLOR_BLUE, COLOR_WHITE, true); - DLG_COLOR(position_indicator, COLOR_BLUE, COLOR_WHITE, true); - DLG_COLOR(tag, COLOR_BLUE, COLOR_WHITE, true); - DLG_COLOR(tag_key, COLOR_BLUE, COLOR_WHITE, true); - -} - -/* - * Select color theme - */ -static int set_theme(const char *theme) -{ - int use_color = 1; - if (!theme) - set_bluetitle_theme(); - else if (strcmp(theme, "classic") == 0) - set_classic_theme(); - else if (strcmp(theme, "bluetitle") == 0) - set_bluetitle_theme(); - else if (strcmp(theme, "blackbg") == 0) - set_blackbg_theme(); - else if (strcmp(theme, "mono") == 0) - use_color = 0; - - return use_color; -} - -static void init_one_color(struct dialog_color *color) -{ - static int pair = 0; - - pair++; - init_pair(pair, color->fg, color->bg); - if (color->hl) - color->atr = A_BOLD | COLOR_PAIR(pair); - else - color->atr = COLOR_PAIR(pair); -} - -static void init_dialog_colors(void) -{ - init_one_color(&dlg.screen); - init_one_color(&dlg.shadow); - init_one_color(&dlg.dialog); - init_one_color(&dlg.title); - init_one_color(&dlg.border); - init_one_color(&dlg.button_active); - init_one_color(&dlg.button_inactive); - init_one_color(&dlg.button_key_active); - init_one_color(&dlg.button_key_inactive); - init_one_color(&dlg.button_label_active); - init_one_color(&dlg.button_label_inactive); - init_one_color(&dlg.inputbox); - init_one_color(&dlg.inputbox_border); - init_one_color(&dlg.searchbox); - init_one_color(&dlg.searchbox_title); - init_one_color(&dlg.searchbox_border); - init_one_color(&dlg.position_indicator); - init_one_color(&dlg.menubox); - init_one_color(&dlg.menubox_border); - init_one_color(&dlg.item); - init_one_color(&dlg.item_selected); - init_one_color(&dlg.tag); - init_one_color(&dlg.tag_selected); - init_one_color(&dlg.tag_key); - init_one_color(&dlg.tag_key_selected); - init_one_color(&dlg.check); - init_one_color(&dlg.check_selected); - init_one_color(&dlg.uarrow); - init_one_color(&dlg.darrow); -} - -/* - * Setup for color display - */ -static void color_setup(const char *theme) -{ - int use_color; - - use_color = set_theme(theme); - if (use_color && has_colors()) { - start_color(); - init_dialog_colors(); - } else - set_mono_theme(); -} - -/* - * Set window to attribute 'attr' - */ -void attr_clear(WINDOW * win, int height, int width, chtype attr) -{ - int i, j; - - wattrset(win, attr); - for (i = 0; i < height; i++) { - wmove(win, i, 0); - for (j = 0; j < width; j++) - waddch(win, ' '); - } - touchwin(win); -} - -void dialog_clear(void) -{ - attr_clear(stdscr, LINES, COLS, dlg.screen.atr); - /* Display background title if it exists ... - SLH */ - if (dlg.backtitle != NULL) { - int i; - - wattrset(stdscr, dlg.screen.atr); - mvwaddstr(stdscr, 0, 1, (char *)dlg.backtitle); - wmove(stdscr, 1, 1); - for (i = 1; i < COLS - 1; i++) - waddch(stdscr, ACS_HLINE); - } - wnoutrefresh(stdscr); -} - -/* - * Do some initialization for dialog - */ -int init_dialog(const char *backtitle) -{ - int height, width; - - initscr(); /* Init curses */ - getmaxyx(stdscr, height, width); - if (height < 19 || width < 80) { - endwin(); - return -ERRDISPLAYTOOSMALL; - } - - dlg.backtitle = backtitle; - color_setup(getenv("MENUCONFIG_COLOR")); - - keypad(stdscr, TRUE); - cbreak(); - noecho(); - dialog_clear(); - - return 0; -} - -void set_dialog_backtitle(const char *backtitle) -{ - dlg.backtitle = backtitle; -} - -/* - * End using dialog functions. - */ -void end_dialog(int x, int y) -{ - /* move cursor back to original position */ - move(y, x); - refresh(); - endwin(); -} - -/* Print the title of the dialog. Center the title and truncate - * tile if wider than dialog (- 2 chars). - **/ -void print_title(WINDOW *dialog, const char *title, int width) -{ - if (title) { - int tlen = MIN(width - 2, strlen(title)); - wattrset(dialog, dlg.title.atr); - mvwaddch(dialog, 0, (width - tlen) / 2 - 1, ' '); - mvwaddnstr(dialog, 0, (width - tlen)/2, title, tlen); - waddch(dialog, ' '); - } -} - -/* - * Print a string of text in a window, automatically wrap around to the - * next line if the string is too long to fit on one line. Newline - * characters '\n' are replaced by spaces. We start on a new line - * if there is no room for at least 4 nonblanks following a double-space. - */ -void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x) -{ - int newl, cur_x, cur_y; - int i, prompt_len, room, wlen; - char tempstr[MAX_LEN + 1], *word, *sp, *sp2; - - strcpy(tempstr, prompt); - - prompt_len = strlen(tempstr); - - /* - * Remove newlines - */ - for (i = 0; i < prompt_len; i++) { - if (tempstr[i] == '\n') - tempstr[i] = ' '; - } - - if (prompt_len <= width - x * 2) { /* If prompt is short */ - wmove(win, y, (width - prompt_len) / 2); - waddstr(win, tempstr); - } else { - cur_x = x; - cur_y = y; - newl = 1; - word = tempstr; - while (word && *word) { - sp = strchr(word, ' '); - if (sp) - *sp++ = 0; - - /* Wrap to next line if either the word does not fit, - or it is the first word of a new sentence, and it is - short, and the next word does not fit. */ - room = width - cur_x; - wlen = strlen(word); - if (wlen > room || - (newl && wlen < 4 && sp - && wlen + 1 + strlen(sp) > room - && (!(sp2 = strchr(sp, ' ')) - || wlen + 1 + (sp2 - sp) > room))) { - cur_y++; - cur_x = x; - } - wmove(win, cur_y, cur_x); - waddstr(win, word); - getyx(win, cur_y, cur_x); - cur_x++; - if (sp && *sp == ' ') { - cur_x++; /* double space */ - while (*++sp == ' ') ; - newl = 1; - } else - newl = 0; - word = sp; - } - } -} - -/* - * Print a button - */ -void print_button(WINDOW * win, const char *label, int y, int x, int selected) -{ - int i, temp; - - wmove(win, y, x); - wattrset(win, selected ? dlg.button_active.atr - : dlg.button_inactive.atr); - waddstr(win, "<"); - temp = strspn(label, " "); - label += temp; - wattrset(win, selected ? dlg.button_label_active.atr - : dlg.button_label_inactive.atr); - for (i = 0; i < temp; i++) - waddch(win, ' '); - wattrset(win, selected ? dlg.button_key_active.atr - : dlg.button_key_inactive.atr); - waddch(win, label[0]); - wattrset(win, selected ? dlg.button_label_active.atr - : dlg.button_label_inactive.atr); - waddstr(win, (char *)label + 1); - wattrset(win, selected ? dlg.button_active.atr - : dlg.button_inactive.atr); - waddstr(win, ">"); - wmove(win, y, x + temp + 1); -} - -/* - * Draw a rectangular box with line drawing characters - */ -void -draw_box(WINDOW * win, int y, int x, int height, int width, - chtype box, chtype border) -{ - int i, j; - - wattrset(win, 0); - for (i = 0; i < height; i++) { - wmove(win, y + i, x); - for (j = 0; j < width; j++) - if (!i && !j) - waddch(win, border | ACS_ULCORNER); - else if (i == height - 1 && !j) - waddch(win, border | ACS_LLCORNER); - else if (!i && j == width - 1) - waddch(win, box | ACS_URCORNER); - else if (i == height - 1 && j == width - 1) - waddch(win, box | ACS_LRCORNER); - else if (!i) - waddch(win, border | ACS_HLINE); - else if (i == height - 1) - waddch(win, box | ACS_HLINE); - else if (!j) - waddch(win, border | ACS_VLINE); - else if (j == width - 1) - waddch(win, box | ACS_VLINE); - else - waddch(win, box | ' '); - } -} - -/* - * Draw shadows along the right and bottom edge to give a more 3D look - * to the boxes - */ -void draw_shadow(WINDOW * win, int y, int x, int height, int width) -{ - int i; - - if (has_colors()) { /* Whether terminal supports color? */ - wattrset(win, dlg.shadow.atr); - wmove(win, y + height, x + 2); - for (i = 0; i < width; i++) - waddch(win, winch(win) & A_CHARTEXT); - for (i = y + 1; i < y + height + 1; i++) { - wmove(win, i, x + width); - waddch(win, winch(win) & A_CHARTEXT); - waddch(win, winch(win) & A_CHARTEXT); - } - wnoutrefresh(win); - } -} - -/* - * Return the position of the first alphabetic character in a string. - */ -int first_alpha(const char *string, const char *exempt) -{ - int i, in_paren = 0, c; - - for (i = 0; i < strlen(string); i++) { - c = tolower(string[i]); - - if (strchr("<[(", c)) - ++in_paren; - if (strchr(">])", c) && in_paren > 0) - --in_paren; - - if ((!in_paren) && isalpha(c) && strchr(exempt, c) == 0) - return i; - } - - return 0; -} - -/* - * ncurses uses ESC to detect escaped char sequences. This resutl in - * a small timeout before ESC is actually delivered to the application. - * lxdialog suggest which is correctly translated to two - * times esc. But then we need to ignore the second esc to avoid stepping - * out one menu too much. Filter away all escaped key sequences since - * keypad(FALSE) turn off ncurses support for escape sequences - and thats - * needed to make notimeout() do as expected. - */ -int on_key_esc(WINDOW *win) -{ - int key; - int key2; - int key3; - - nodelay(win, TRUE); - keypad(win, FALSE); - key = wgetch(win); - key2 = wgetch(win); - do { - key3 = wgetch(win); - } while (key3 != ERR); - nodelay(win, FALSE); - keypad(win, TRUE); - if (key == KEY_ESC && key2 == ERR) - return KEY_ESC; - else if (key != ERR && key != KEY_ESC && key2 == ERR) - ungetch(key); - - return -1; -} - -/* redraw screen in new size */ -int on_key_resize(void) -{ - dialog_clear(); - return KEY_RESIZE; -} - -struct dialog_list *item_cur; -struct dialog_list item_nil; -struct dialog_list *item_head; - -void item_reset(void) -{ - struct dialog_list *p, *next; - - for (p = item_head; p; p = next) { - next = p->next; - free(p); - } - item_head = NULL; - item_cur = &item_nil; -} - -void item_make(const char *fmt, ...) -{ - va_list ap; - struct dialog_list *p = malloc(sizeof(*p)); - - if (item_head) - item_cur->next = p; - else - item_head = p; - item_cur = p; - memset(p, 0, sizeof(*p)); - - va_start(ap, fmt); - vsnprintf(item_cur->node.str, sizeof(item_cur->node.str), fmt, ap); - va_end(ap); -} - -void item_add_str(const char *fmt, ...) -{ - va_list ap; - size_t avail; - - avail = sizeof(item_cur->node.str) - strlen(item_cur->node.str); - - va_start(ap, fmt); - vsnprintf(item_cur->node.str + strlen(item_cur->node.str), - avail, fmt, ap); - item_cur->node.str[sizeof(item_cur->node.str) - 1] = '\0'; - va_end(ap); -} - -void item_set_tag(char tag) -{ - item_cur->node.tag = tag; -} -void item_set_data(void *ptr) -{ - item_cur->node.data = ptr; -} - -void item_set_selected(int val) -{ - item_cur->node.selected = val; -} - -int item_activate_selected(void) -{ - item_foreach() - if (item_is_selected()) - return 1; - return 0; -} - -void *item_data(void) -{ - return item_cur->node.data; -} - -char item_tag(void) -{ - return item_cur->node.tag; -} - -int item_count(void) -{ - int n = 0; - struct dialog_list *p; - - for (p = item_head; p; p = p->next) - n++; - return n; -} - -void item_set(int n) -{ - int i = 0; - item_foreach() - if (i++ == n) - return; -} - -int item_n(void) -{ - int n = 0; - struct dialog_list *p; - - for (p = item_head; p; p = p->next) { - if (p == item_cur) - return n; - n++; - } - return 0; -} - -const char *item_str(void) -{ - return item_cur->node.str; -} - -int item_is_selected(void) -{ - return (item_cur->node.selected != 0); -} - -int item_is_tag(char tag) -{ - return (item_cur->node.tag == tag); -} diff --git a/package/config/patches/01-kconfig-kernel-to-buildroot.patch b/package/config/patches/01-kconfig-kernel-to-buildroot.patch deleted file mode 100644 index ef3a05e43c..0000000000 --- a/package/config/patches/01-kconfig-kernel-to-buildroot.patch +++ /dev/null @@ -1,62 +0,0 @@ ---- - gconf.glade | 2 +- - mconf.c | 4 ++-- - zconf.tab.c_shipped | 2 +- - zconf.y | 2 +- - 4 files changed, 5 insertions(+), 5 deletions(-) - -Index: config/gconf.glade -=================================================================== ---- config.orig/gconf.glade -+++ config/gconf.glade -@@ -4,7 +4,7 @@ - - - True -- Gtk Kernel Configurator -+ Gtk Buildroot Configurator - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False -Index: config/mconf.c -=================================================================== ---- config.orig/mconf.c -+++ config/mconf.c -@@ -178,9 +178,9 @@ - "Arrow keys navigate the menu. " - " selects submenus --->. " - "Highlighted letters are hotkeys. " -- "Pressing includes, excludes, modularizes features. " -+ "Pressing selectes a feature, while will exclude a feature. " - "Press to exit, for Help, for Search. " -- "Legend: [*] built-in [ ] excluded module < > module capable"), -+ "Legend: [*] feature is selected [ ] feature is excluded"), - radiolist_instructions[] = N_( - "Use the arrow keys to navigate this window or " - "press the hotkey of the item you wish to select " -Index: config/zconf.tab.c_shipped -=================================================================== ---- config.orig/zconf.tab.c_shipped -+++ config/zconf.tab.c_shipped -@@ -2256,7 +2256,7 @@ - modules_sym = sym_lookup(NULL, 0); - modules_sym->type = S_BOOLEAN; - modules_sym->flags |= SYMBOL_AUTO; -- rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); -+ rootmenu.prompt = menu_add_prompt(P_MENU, "Buildroot Configuration", NULL); - - #if YYDEBUG - if (getenv("ZCONF_DEBUG")) -Index: config/zconf.y -=================================================================== ---- config.orig/zconf.y -+++ config/zconf.y -@@ -501,7 +501,7 @@ - modules_sym = sym_lookup(NULL, 0); - modules_sym->type = S_BOOLEAN; - modules_sym->flags |= SYMBOL_AUTO; -- rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); -+ rootmenu.prompt = menu_add_prompt(P_MENU, "Buildroot Configuration", NULL); - - #if YYDEBUG - if (getenv("ZCONF_DEBUG")) diff --git a/package/config/patches/03-change-config-option-prefix.patch b/package/config/patches/03-change-config-option-prefix.patch deleted file mode 100644 index d387236e7e..0000000000 --- a/package/config/patches/03-change-config-option-prefix.patch +++ /dev/null @@ -1,198 +0,0 @@ ---- - confdata.c | 57 +++++++++++++++++++++++++++++---------------------------- - lkc.h | 2 +- - menu.c | 2 +- - 3 files changed, 31 insertions(+), 30 deletions(-) - -Index: config/confdata.c -=================================================================== ---- config.orig/confdata.c -+++ config/confdata.c -@@ -12,6 +12,7 @@ - #include - #include - #include -+#include - - #define LKC_DIRECT_LINK - #include "lkc.h" -@@ -25,7 +26,7 @@ - static const char *conf_filename; - static int conf_lineno, conf_warnings, conf_unsaved; - --const char conf_defname[] = "arch/$ARCH/defconfig"; -+const char conf_defname[] = ".defconfig"; - - static void conf_warning(const char *fmt, ...) - { -@@ -63,7 +64,7 @@ - - const char *conf_get_configname(void) - { -- char *name = getenv("KCONFIG_CONFIG"); -+ char *name = getenv("BUILDROOT_CONFIG"); - - return name ? name : ".config"; - } -@@ -249,20 +250,20 @@ - if (line[0] == '#') { - if (memcmp(line + 2, CONFIG_, strlen(CONFIG_))) - continue; -- p = strchr(line + 2 + strlen(CONFIG_), ' '); -+ p = strchr(line + 2, ' '); - if (!p) - continue; - *p++ = 0; - if (strncmp(p, "is not set", 10)) - continue; - if (def == S_DEF_USER) { -- sym = sym_find(line + 2 + strlen(CONFIG_)); -+ sym = sym_find(line + 2); - if (!sym) { - sym_add_change_count(1); - goto setsym; - } - } else { -- sym = sym_lookup(line + 2 + strlen(CONFIG_), 0); -+ sym = sym_lookup(line + 2, 0); - if (sym->type == S_UNKNOWN) - sym->type = S_BOOLEAN; - } -@@ -278,8 +279,8 @@ - default: - ; - } -- } else if (memcmp(line, CONFIG_, strlen(CONFIG_)) == 0) { -- p = strchr(line + strlen(CONFIG_), '='); -+ } else if (isupper(line[0])) { -+ p = strchr(line, '='); - if (!p) - continue; - *p++ = 0; -@@ -290,13 +291,13 @@ - *p2 = 0; - } - if (def == S_DEF_USER) { -- sym = sym_find(line + strlen(CONFIG_)); -+ sym = sym_find(line); - if (!sym) { - sym_add_change_count(1); - goto setsym; - } - } else { -- sym = sym_lookup(line + strlen(CONFIG_), 0); -+ sym = sym_lookup(line, 0); - if (sym->type == S_UNKNOWN) - sym->type = S_OTHER; - } -@@ -423,9 +424,9 @@ - { - int l; - if (headerfile) -- fprintf(out, "#define %s%s \"", CONFIG_, name); -+ fprintf(out, "#define %s \"", name); - else -- fprintf(out, "%s%s=\"", CONFIG_, name); -+ fprintf(out, "%s=\"", name); - - while (1) { - l = strcspn(str, "\"\\"); -@@ -450,14 +451,14 @@ - switch (sym_get_tristate_value(sym)) { - case no: - if (write_no) -- fprintf(out, "# %s%s is not set\n", -- CONFIG_, sym->name); -+ fprintf(out, "# %s is not set\n", -+ sym->name); - break; - case mod: -- fprintf(out, "%s%s=m\n", CONFIG_, sym->name); -+ fprintf(out, "%s=m\n", sym->name); - break; - case yes: -- fprintf(out, "%s%s=y\n", CONFIG_, sym->name); -+ fprintf(out, "%s=y\n", sym->name); - break; - } - break; -@@ -467,7 +468,7 @@ - case S_HEX: - case S_INT: - str = sym_get_string_value(sym); -- fprintf(out, "%s%s=%s\n", CONFIG_, sym->name, str); -+ fprintf(out, "%s=%s\n", sym->name, str); - break; - case S_OTHER: - case S_UNKNOWN: -@@ -844,17 +845,17 @@ - case no: - break; - case mod: -- fprintf(tristate, "%s%s=M\n", -- CONFIG_, sym->name); -- fprintf(out_h, "#define %s%s_MODULE 1\n", -- CONFIG_, sym->name); -+ fprintf(tristate, "%s=M\n", -+ sym->name); -+ fprintf(out_h, "#define %s_MODULE 1\n", -+ sym->name); - break; - case yes: - if (sym->type == S_TRISTATE) -- fprintf(tristate,"%s%s=Y\n", -- CONFIG_, sym->name); -- fprintf(out_h, "#define %s%s 1\n", -- CONFIG_, sym->name); -+ fprintf(tristate,"%s=Y\n", -+ sym->name); -+ fprintf(out_h, "#define %s 1\n", -+ sym->name); - break; - } - break; -@@ -864,14 +865,14 @@ - case S_HEX: - str = sym_get_string_value(sym); - if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) { -- fprintf(out_h, "#define %s%s 0x%s\n", -- CONFIG_, sym->name, str); -+ fprintf(out_h, "#define %s 0x%s\n", -+ sym->name, str); - break; - } - case S_INT: - str = sym_get_string_value(sym); -- fprintf(out_h, "#define %s%s %s\n", -- CONFIG_, sym->name, str); -+ fprintf(out_h, "#define %s %s\n", -+ sym->name, str); - break; - default: - break; -Index: config/lkc.h -=================================================================== ---- config.orig/lkc.h -+++ config/lkc.h -@@ -42,7 +42,7 @@ - #define N_(text) (text) - - #ifndef CONFIG_ --#define CONFIG_ "CONFIG_" -+#define CONFIG_ "BR2_" - #endif - - #define TF_COMMAND 0x0001 -Index: config/menu.c -=================================================================== ---- config.orig/menu.c -+++ config/menu.c -@@ -597,7 +597,7 @@ - - if (menu_has_help(menu)) { - if (sym->name) { -- str_printf(help, "%s%s:\n\n", CONFIG_, sym->name); -+ str_printf(help, "%s:\n\n", sym->name); - str_append(help, _(menu_get_help(menu))); - str_append(help, "\n"); - } diff --git a/package/config/patches/05-really-clean-everything.patch b/package/config/patches/05-really-clean-everything.patch deleted file mode 100644 index a1517542ea..0000000000 --- a/package/config/patches/05-really-clean-everything.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- - Makefile | 14 ++++++++++---- - 1 file changed, 10 insertions(+), 4 deletions(-) - -Index: config/Makefile -=================================================================== ---- config.orig/Makefile -+++ config/Makefile -@@ -196,10 +196,16 @@ - gconf-objs := gconf.o kconfig_load.o zconf.tab.o - endif - --clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \ -- .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h --clean-files += mconf qconf gconf nconf --clean-files += config.pot linux.pot -+clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \ -+ .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h -+clean-files += config.pot linux.pot -+clean-files += conf $(conf-objs) -+clean-files += mconf $(mconf-objs) -+clean-files += nconf $(nconf-objs) -+clean-files += qconf qconf.o -+clean-files += gconf gconf.o -+clean-files += kconfig_load.o zconf.tab.o -+clean-files += $(kxgettext-objs) - - # Check that we have the required ncurses stuff installed for lxdialog (menuconfig) - PHONY += $(obj)/dochecklxdialog diff --git a/package/config/patches/06-br-build-system-integration.patch b/package/config/patches/06-br-build-system-integration.patch deleted file mode 100644 index 8a27e251ea..0000000000 --- a/package/config/patches/06-br-build-system-integration.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- - Makefile | 14 +++++++++++++- - 1 file changed, 13 insertions(+), 1 deletion(-) - -Index: config/Makefile -=================================================================== ---- config.orig/Makefile -+++ config/Makefile -@@ -174,18 +174,30 @@ - ifeq ($(MAKECMDGOALS),nconfig) - hostprogs-y += nconf - endif -+ifeq ($(findstring nconf,$(MAKECMDGOALS)),nconf) -+ hostprogs-y += nconf -+endif - - ifeq ($(MAKECMDGOALS),menuconfig) - hostprogs-y += mconf - endif -+ifeq ($(findstring mconf,$(MAKECMDGOALS)),mconf) -+ hostprogs-y += mconf -+endif - - ifeq ($(MAKECMDGOALS),xconfig) - qconf-target := 1 - endif -+ifeq ($(findstring qconf,$(MAKECMDGOALS)),qconf) -+ qconf-target := 1 -+endif -+ - ifeq ($(MAKECMDGOALS),gconfig) - gconf-target := 1 - endif -- -+ifeq ($(findstring gconf,$(MAKECMDGOALS)),gconf) -+ gconf-target := 1 -+endif - - ifeq ($(qconf-target),1) - qconf-cxxobjs := qconf.o diff --git a/package/config/patches/08-make-write-deps.patch b/package/config/patches/08-make-write-deps.patch deleted file mode 100644 index 0f9c7e308f..0000000000 --- a/package/config/patches/08-make-write-deps.patch +++ /dev/null @@ -1,139 +0,0 @@ ---- - util.c | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 116 insertions(+), 1 deletion(-) - -Index: config/util.c -=================================================================== ---- config.orig/util.c -+++ config/util.c -@@ -29,6 +29,121 @@ - return file; - } - -+static char* br2_symbol_printer(const char * const in) -+{ -+ ssize_t i, j, len = strlen(in); -+ char *ret; -+ if (len < 1) -+ return NULL; -+ ret = malloc(len); -+ if (!ret) { -+ printf("Out of memory!"); -+ exit(1); -+ } -+ memset(ret, 0, len); -+ i = j = 0; -+ if (strncmp("BR2_", in, 4) == 0) -+ i += 4; -+ if (strncmp("PACKAGE_", in + i, 8) == 0) -+ i += 8; -+ else if (strncmp("TARGET_", in + i, 7) == 0) -+ i += 7; -+ while (i <= len) -+ ret[j++] = tolower(in[i++]); -+ return ret; -+} -+ -+/* write dependencies of the infividual config-symbols */ -+static int write_make_deps(const char *name) -+{ -+ char *str; -+ char dir[PATH_MAX+1], buf[PATH_MAX+1], buf2[PATH_MAX+1]; -+ struct menu *menu; -+ struct symbol *sym; -+ struct property *prop, *p; -+ unsigned done; -+ const char * const name_tmp = "..make.deps.tmp"; -+ FILE *out; -+ if (!name) -+ name = ".auto.deps"; -+ -+ strcpy(dir, conf_get_configname()); -+ str = strrchr(dir, '/'); -+ if (str) -+ str[1] = 0; -+ else -+ dir[0] = 0; -+ -+ sprintf(buf, "%s%s", dir, name_tmp); -+ out = fopen(buf, "w"); -+ if (!out) -+ return 1; -+ fprintf(out, "# ATTENTION! This does not handle 'depends', just 'select'! \n" -+ "# See package/config/util.c write_make_deps()\n#\n"); -+ menu = &rootmenu;//rootmenu.list; -+ while (menu) { -+ sym = menu->sym; -+ if (!sym) { -+ if (!menu_is_visible(menu)) -+ goto next; -+ } else if (!(sym->flags & SYMBOL_CHOICE)) { -+ sym_calc_value(sym); -+ if (sym->type == S_BOOLEAN -+ && sym_get_tristate_value(sym) != no) { -+ done = 0; -+ for_all_prompts(sym, prop) { -+ struct expr *e; -+//printf("\nname=%s\n", sym->name); -+ for_all_properties(sym, p, P_SELECT) { -+ e = p->expr; -+ if (e && e->left.sym->name) { -+ if (!done) { -+ fprintf(out, "%s: $(BASE_TARGETS)", br2_symbol_printer(sym->name)); -+ done = 1; -+ } -+//printf("SELECTS %s\n",e->left.sym->name); -+ fprintf(out, " %s",br2_symbol_printer(e->left.sym->name)); -+ } -+ } -+ if (done) -+ fprintf(out, "\n"); -+#if 0 -+ e = sym->rev_dep.expr; -+ if (e && e->type == E_SYMBOL -+ && e->left.sym->name) { -+ fprintf(out, "%s: %s", br2_symbol_printer(e->left.sym->name), -+ br2_symbol_printer(sym->name)); -+printf("%s is Selected BY: %s", sym->name, e->left.sym->name); -+ } -+#endif -+ } -+ } -+ } -+next: -+ if (menu->list) { -+ menu = menu->list; -+ continue; -+ } -+ if (menu->next) -+ menu = menu->next; -+ else while ((menu = menu->parent)) { -+ if (menu->next) { -+ menu = menu->next; -+ break; -+ } -+ } -+ } -+ fclose(out); -+ sprintf(buf2, "%s%s", dir, name); -+ rename(buf, buf2); -+ printf(_("#\n" -+ "# make dependencies written to %s\n" -+ "# ATTENTION buildroot devels!\n" -+ "# See top of this file before playing with this auto-preprequisites!\n" -+ "#\n"), name); -+ return 0; -+} -+ - /* write a dependency file as used by kbuild to track dependencies */ - int file_write_dep(const char *name) - { -@@ -71,7 +186,7 @@ - fprintf(out, "\n$(deps_config): ;\n"); - fclose(out); - rename("..config.tmp", name); -- return 0; -+ return write_make_deps(NULL); - } - - diff --git a/package/config/patches/11-use-mktemp-for-lxdialog.patch b/package/config/patches/11-use-mktemp-for-lxdialog.patch deleted file mode 100644 index 21ca228831..0000000000 --- a/package/config/patches/11-use-mktemp-for-lxdialog.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - lxdialog/check-lxdialog.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: config/lxdialog/check-lxdialog.sh -=================================================================== ---- config.orig/lxdialog/check-lxdialog.sh -+++ config/lxdialog/check-lxdialog.sh -@@ -33,7 +33,7 @@ - } - - # Temp file, try to clean up after us --tmp=.lxdialog.tmp -+tmp=$(mktemp) - trap "rm -f $tmp" 0 1 2 3 15 - - # Check if we can link to ncurses diff --git a/package/config/patches/12-fix-glade-file-path.patch b/package/config/patches/12-fix-glade-file-path.patch deleted file mode 100644 index 5b080c94bb..0000000000 --- a/package/config/patches/12-fix-glade-file-path.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - gconf.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: config/gconf.c -=================================================================== ---- config.orig/gconf.c -+++ config/gconf.c -@@ -1521,7 +1521,7 @@ - /* Determine GUI path */ - env = getenv(SRCTREE); - if (env) -- glade_file = g_strconcat(env, "/scripts/kconfig/gconf.glade", NULL); -+ glade_file = g_strconcat(env, "/package/config/gconf.glade", NULL); - else if (av[0][0] == '/') - glade_file = g_strconcat(av[0], ".glade", NULL); - else diff --git a/package/config/patches/series b/package/config/patches/series deleted file mode 100644 index defdf58996..0000000000 --- a/package/config/patches/series +++ /dev/null @@ -1,11 +0,0 @@ -01-kconfig-kernel-to-buildroot.patch -02-cpp-comments-to-c-comments.patch -03-change-config-option-prefix.patch -05-really-clean-everything.patch -06-br-build-system-integration.patch -08-make-write-deps.patch -09-implement-kconfig-probability.patch -10-br-build-system.patch -11-use-mktemp-for-lxdialog.patch -12-fix-glade-file-path.patch -14-support-out-of-tree-config.patch diff --git a/package/config/streamline_config.pl b/package/config/streamline_config.pl deleted file mode 100644 index fd81fc33d6..0000000000 --- a/package/config/streamline_config.pl +++ /dev/null @@ -1,451 +0,0 @@ -#!/usr/bin/perl -w -# -# Copywrite 2005-2009 - Steven Rostedt -# Licensed under the terms of the GNU GPL License version 2 -# -# It's simple enough to figure out how this works. -# If not, then you can ask me at stripconfig@goodmis.org -# -# What it does? -# -# If you have installed a Linux kernel from a distribution -# that turns on way too many modules than you need, and -# you only want the modules you use, then this program -# is perfect for you. -# -# It gives you the ability to turn off all the modules that are -# not loaded on your system. -# -# Howto: -# -# 1. Boot up the kernel that you want to stream line the config on. -# 2. Change directory to the directory holding the source of the -# kernel that you just booted. -# 3. Copy the configuraton file to this directory as .config -# 4. Have all your devices that you need modules for connected and -# operational (make sure that their corresponding modules are loaded) -# 5. Run this script redirecting the output to some other file -# like config_strip. -# 6. Back up your old config (if you want too). -# 7. copy the config_strip file to .config -# 8. Run "make oldconfig" -# -# Now your kernel is ready to be built with only the modules that -# are loaded. -# -# Here's what I did with my Debian distribution. -# -# cd /usr/src/linux-2.6.10 -# cp /boot/config-2.6.10-1-686-smp .config -# ~/bin/streamline_config > config_strip -# mv .config config_sav -# mv config_strip .config -# make oldconfig -# -use strict; - -my $config = ".config"; - -my $uname = `uname -r`; -chomp $uname; - -my @searchconfigs = ( - { - "file" => ".config", - "exec" => "cat", - }, - { - "file" => "/proc/config.gz", - "exec" => "zcat", - }, - { - "file" => "/boot/config-$uname", - "exec" => "cat", - }, - { - "file" => "/boot/vmlinuz-$uname", - "exec" => "scripts/extract-ikconfig", - "test" => "scripts/extract-ikconfig", - }, - { - "file" => "vmlinux", - "exec" => "scripts/extract-ikconfig", - "test" => "scripts/extract-ikconfig", - }, - { - "file" => "/lib/modules/$uname/kernel/kernel/configs.ko", - "exec" => "scripts/extract-ikconfig", - "test" => "scripts/extract-ikconfig", - }, - { - "file" => "kernel/configs.ko", - "exec" => "scripts/extract-ikconfig", - "test" => "scripts/extract-ikconfig", - }, - { - "file" => "kernel/configs.o", - "exec" => "scripts/extract-ikconfig", - "test" => "scripts/extract-ikconfig", - }, -); - -sub find_config { - foreach my $conf (@searchconfigs) { - my $file = $conf->{"file"}; - - next if ( ! -f "$file"); - - if (defined($conf->{"test"})) { - `$conf->{"test"} $conf->{"file"} 2>/dev/null`; - next if ($?); - } - - my $exec = $conf->{"exec"}; - - print STDERR "using config: '$file'\n"; - - open(CIN, "$exec $file |") || die "Failed to run $exec $file"; - return; - } - die "No config file found"; -} - -find_config; - -# Get the build source and top level Kconfig file (passed in) -my $ksource = $ARGV[0]; -my $kconfig = $ARGV[1]; -my $lsmod_file = $ARGV[2]; - -my @makefiles = `find $ksource -name Makefile 2>/dev/null`; -chomp @makefiles; - -my %depends; -my %selects; -my %prompts; -my %objects; -my $var; -my $iflevel = 0; -my @ifdeps; - -# prevent recursion -my %read_kconfigs; - -sub read_kconfig { - my ($kconfig) = @_; - - my $state = "NONE"; - my $config; - my @kconfigs; - - my $cont = 0; - my $line; - - my $source = "$ksource/$kconfig"; - my $last_source = ""; - - # Check for any environment variables used - while ($source =~ /\$(\w+)/ && $last_source ne $source) { - my $env = $1; - $last_source = $source; - $source =~ s/\$$env/$ENV{$env}/; - } - - open(KIN, "$source") || die "Can't open $kconfig"; - while () { - chomp; - - # Make sure that lines ending with \ continue - if ($cont) { - $_ = $line . " " . $_; - } - - if (s/\\$//) { - $cont = 1; - $line = $_; - next; - } - - $cont = 0; - - # collect any Kconfig sources - if (/^source\s*"(.*)"/) { - $kconfigs[$#kconfigs+1] = $1; - } - - # configs found - if (/^\s*(menu)?config\s+(\S+)\s*$/) { - $state = "NEW"; - $config = $2; - - for (my $i = 0; $i < $iflevel; $i++) { - if ($i) { - $depends{$config} .= " " . $ifdeps[$i]; - } else { - $depends{$config} = $ifdeps[$i]; - } - $state = "DEP"; - } - - # collect the depends for the config - } elsif ($state eq "NEW" && /^\s*depends\s+on\s+(.*)$/) { - $state = "DEP"; - $depends{$config} = $1; - } elsif ($state eq "DEP" && /^\s*depends\s+on\s+(.*)$/) { - $depends{$config} .= " " . $1; - - # Get the configs that select this config - } elsif ($state ne "NONE" && /^\s*select\s+(\S+)/) { - if (defined($selects{$1})) { - $selects{$1} .= " " . $config; - } else { - $selects{$1} = $config; - } - - # configs without prompts must be selected - } elsif ($state ne "NONE" && /^\s*tristate\s\S/) { - # note if the config has a prompt - $prompts{$config} = 1; - - # Check for if statements - } elsif (/^if\s+(.*\S)\s*$/) { - my $deps = $1; - # remove beginning and ending non text - $deps =~ s/^[^a-zA-Z0-9_]*//; - $deps =~ s/[^a-zA-Z0-9_]*$//; - - my @deps = split /[^a-zA-Z0-9_]+/, $deps; - - $ifdeps[$iflevel++] = join ':', @deps; - - } elsif (/^endif/) { - - $iflevel-- if ($iflevel); - - # stop on "help" - } elsif (/^\s*help\s*$/) { - $state = "NONE"; - } - } - close(KIN); - - # read in any configs that were found. - foreach $kconfig (@kconfigs) { - if (!defined($read_kconfigs{$kconfig})) { - $read_kconfigs{$kconfig} = 1; - read_kconfig($kconfig); - } - } -} - -if ($kconfig) { - read_kconfig($kconfig); -} - -# Read all Makefiles to map the configs to the objects -foreach my $makefile (@makefiles) { - - my $cont = 0; - - open(MIN,$makefile) || die "Can't open $makefile"; - while () { - my $objs; - - # is this a line after a line with a backslash? - if ($cont && /(\S.*)$/) { - $objs = $1; - } - $cont = 0; - - # collect objects after obj-$(CONFIG_FOO_BAR) - if (/obj-\$\((CONFIG_[^\)]*)\)\s*[+:]?=\s*(.*)/) { - $var = $1; - $objs = $2; - } - if (defined($objs)) { - # test if the line ends with a backslash - if ($objs =~ m,(.*)\\$,) { - $objs = $1; - $cont = 1; - } - - foreach my $obj (split /\s+/,$objs) { - $obj =~ s/-/_/g; - if ($obj =~ /(.*)\.o$/) { - # Objects may be enabled by more than one config. - # Store configs in an array. - my @arr; - - if (defined($objects{$1})) { - @arr = @{$objects{$1}}; - } - - $arr[$#arr+1] = $var; - - # The objects have a hash mapping to a reference - # of an array of configs. - $objects{$1} = \@arr; - } - } - } - } - close(MIN); -} - -my %modules; - -if (defined($lsmod_file)) { - if ( ! -f $lsmod_file) { - die "$lsmod_file not found"; - } - if ( -x $lsmod_file) { - # the file is executable, run it - open(LIN, "$lsmod_file|"); - } else { - # Just read the contents - open(LIN, "$lsmod_file"); - } -} else { - - # see what modules are loaded on this system - my $lsmod; - - foreach my $dir ( ("/sbin", "/bin", "/usr/sbin", "/usr/bin") ) { - if ( -x "$dir/lsmod" ) { - $lsmod = "$dir/lsmod"; - last; - } -} - if (!defined($lsmod)) { - # try just the path - $lsmod = "lsmod"; - } - - open(LIN,"$lsmod|") || die "Can not call lsmod with $lsmod"; -} - -while () { - next if (/^Module/); # Skip the first line. - if (/^(\S+)/) { - $modules{$1} = 1; - } -} -close (LIN); - -# add to the configs hash all configs that are needed to enable -# a loaded module. -my %configs; -foreach my $module (keys(%modules)) { - if (defined($objects{$module})) { - my @arr = @{$objects{$module}}; - foreach my $conf (@arr) { - $configs{$conf} = $module; - } - } else { - # Most likely, someone has a custom (binary?) module loaded. - print STDERR "$module config not found!!\n"; - } -} - -my $valid = "A-Za-z_0-9"; -my $repeat = 1; - -# -# Note, we do not care about operands (like: &&, ||, !) we want to add any -# config that is in the depend list of another config. This script does -# not enable configs that are not already enabled. If we come across a -# config A that depends on !B, we can still add B to the list of depends -# to keep on. If A was on in the original config, B would not have been -# and B would not be turned on by this script. -# -sub parse_config_dep_select -{ - my ($p) = @_; - - while ($p =~ /[$valid]/) { - - if ($p =~ /^[^$valid]*([$valid]+)/) { - my $conf = "CONFIG_" . $1; - - $p =~ s/^[^$valid]*[$valid]+//; - - if (!defined($configs{$conf})) { - # We must make sure that this config has its - # dependencies met. - $repeat = 1; # do again - $configs{$conf} = 1; - } - } else { - die "this should never happen"; - } - } -} - -while ($repeat) { - $repeat = 0; - - foreach my $config (keys %configs) { - $config =~ s/^CONFIG_//; - - if (defined($depends{$config})) { - # This config has dependencies. Make sure they are also included - parse_config_dep_select $depends{$config}; - } - - if (defined($prompts{$config}) || !defined($selects{$config})) { - next; - } - - # config has no prompt and must be selected. - parse_config_dep_select $selects{$config}; - } -} - -my %setconfigs; - -# Finally, read the .config file and turn off any module enabled that -# we could not find a reason to keep enabled. -while() { - - if (/CONFIG_IKCONFIG/) { - if (/# CONFIG_IKCONFIG is not set/) { - # enable IKCONFIG at least as a module - print "CONFIG_IKCONFIG=m\n"; - # don't ask about PROC - print "# CONFIG_IKCONFIG_PROC is not set\n"; - } else { - print; - } - next; - } - - if (/^(CONFIG.*)=(m|y)/) { - if (defined($configs{$1})) { - $setconfigs{$1} = $2; - } elsif ($2 eq "m") { - print "# $1 is not set\n"; - next; - } - } - print; -} -close(CIN); - -# Integrity check, make sure all modules that we want enabled do -# indeed have their configs set. -loop: -foreach my $module (keys(%modules)) { - if (defined($objects{$module})) { - my @arr = @{$objects{$module}}; - foreach my $conf (@arr) { - if (defined($setconfigs{$conf})) { - next loop; - } - } - print STDERR "module $module did not have configs"; - foreach my $conf (@arr) { - print STDERR " " , $conf; - } - print STDERR "\n"; - } -} diff --git a/package/config/util.c b/package/config/util.c deleted file mode 100644 index 5fc36c7d26..0000000000 --- a/package/config/util.c +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Copyright (C) 2002-2005 Roman Zippel - * Copyright (C) 2002-2005 Sam Ravnborg - * - * Released under the terms of the GNU GPL v2.0. - */ - -#include -#include "lkc.h" - -/* file already present in list? If not add it */ -struct file *file_lookup(const char *name) -{ - struct file *file; - const char *file_name = sym_expand_string_value(name); - - for (file = file_list; file; file = file->next) { - if (!strcmp(name, file->name)) { - free((void *)file_name); - return file; - } - } - - file = malloc(sizeof(*file)); - memset(file, 0, sizeof(*file)); - file->name = file_name; - file->next = file_list; - file_list = file; - return file; -} - -static char* br2_symbol_printer(const char * const in) -{ - ssize_t i, j, len = strlen(in); - char *ret; - if (len < 1) - return NULL; - ret = malloc(len); - if (!ret) { - printf("Out of memory!"); - exit(1); - } - memset(ret, 0, len); - i = j = 0; - if (strncmp("BR2_", in, 4) == 0) - i += 4; - if (strncmp("PACKAGE_", in + i, 8) == 0) - i += 8; - else if (strncmp("TARGET_", in + i, 7) == 0) - i += 7; - while (i <= len) - ret[j++] = tolower(in[i++]); - return ret; -} - -/* write dependencies of the infividual config-symbols */ -static int write_make_deps(const char *name) -{ - char *str; - char dir[PATH_MAX+1], buf[PATH_MAX+1], buf2[PATH_MAX+1]; - struct menu *menu; - struct symbol *sym; - struct property *prop, *p; - unsigned done; - const char * const name_tmp = "..make.deps.tmp"; - FILE *out; - if (!name) - name = ".auto.deps"; - - strcpy(dir, conf_get_configname()); - str = strrchr(dir, '/'); - if (str) - str[1] = 0; - else - dir[0] = 0; - - sprintf(buf, "%s%s", dir, name_tmp); - out = fopen(buf, "w"); - if (!out) - return 1; - fprintf(out, "# ATTENTION! This does not handle 'depends', just 'select'! \n" - "# See package/config/util.c write_make_deps()\n#\n"); - menu = &rootmenu;//rootmenu.list; - while (menu) { - sym = menu->sym; - if (!sym) { - if (!menu_is_visible(menu)) - goto next; - } else if (!(sym->flags & SYMBOL_CHOICE)) { - sym_calc_value(sym); - if (sym->type == S_BOOLEAN - && sym_get_tristate_value(sym) != no) { - done = 0; - for_all_prompts(sym, prop) { - struct expr *e; -//printf("\nname=%s\n", sym->name); - for_all_properties(sym, p, P_SELECT) { - e = p->expr; - if (e && e->left.sym->name) { - if (!done) { - fprintf(out, "%s: $(BASE_TARGETS)", br2_symbol_printer(sym->name)); - done = 1; - } -//printf("SELECTS %s\n",e->left.sym->name); - fprintf(out, " %s",br2_symbol_printer(e->left.sym->name)); - } - } - if (done) - fprintf(out, "\n"); -#if 0 - e = sym->rev_dep.expr; - if (e && e->type == E_SYMBOL - && e->left.sym->name) { - fprintf(out, "%s: %s", br2_symbol_printer(e->left.sym->name), - br2_symbol_printer(sym->name)); -printf("%s is Selected BY: %s", sym->name, e->left.sym->name); - } -#endif - } - } - } -next: - if (menu->list) { - menu = menu->list; - continue; - } - if (menu->next) - menu = menu->next; - else while ((menu = menu->parent)) { - if (menu->next) { - menu = menu->next; - break; - } - } - } - fclose(out); - sprintf(buf2, "%s%s", dir, name); - rename(buf, buf2); - printf(_("#\n" - "# make dependencies written to %s\n" - "# ATTENTION buildroot devels!\n" - "# See top of this file before playing with this auto-preprequisites!\n" - "#\n"), name); - return 0; -} - -/* write a dependency file as used by kbuild to track dependencies */ -int file_write_dep(const char *name) -{ - char *str; - char buf[PATH_MAX+1], buf2[PATH_MAX+1], dir[PATH_MAX+1]; - struct symbol *sym, *env_sym; - struct expr *e; - struct file *file; - FILE *out; - - if (!name) - name = ".kconfig.d"; - - strcpy(dir, conf_get_configname()); - str = strrchr(dir, '/'); - if (str) - str[1] = 0; - else - dir[0] = 0; - - sprintf(buf, "%s..config.tmp", dir); - out = fopen(buf, "w"); - if (!out) - return 1; - fprintf(out, "deps_config := \\\n"); - for (file = file_list; file; file = file->next) { - if (file->next) - fprintf(out, "\t%s \\\n", file->name); - else - fprintf(out, "\t%s\n", file->name); - } - fprintf(out, "\n%s: \\\n" - "\t$(deps_config)\n\n", conf_get_autoconfig_name()); - - expr_list_for_each_sym(sym_env_list, e, sym) { - struct property *prop; - const char *value; - - prop = sym_get_env_prop(sym); - env_sym = prop_get_symbol(prop); - if (!env_sym) - continue; - value = getenv(env_sym->name); - if (!value) - value = ""; - fprintf(out, "ifneq \"$(%s)\" \"%s\"\n", env_sym->name, value); - fprintf(out, "%s: FORCE\n", conf_get_autoconfig_name()); - fprintf(out, "endif\n"); - } - - fprintf(out, "\n$(deps_config): ;\n"); - fclose(out); - sprintf(buf2, "%s%s", dir, name); - rename(buf, buf2); - return write_make_deps(NULL); -} - - -/* Allocate initial growable string */ -struct gstr str_new(void) -{ - struct gstr gs; - gs.s = malloc(sizeof(char) * 64); - gs.len = 64; - gs.max_width = 0; - strcpy(gs.s, "\0"); - return gs; -} - -/* Allocate and assign growable string */ -struct gstr str_assign(const char *s) -{ - struct gstr gs; - gs.s = strdup(s); - gs.len = strlen(s) + 1; - gs.max_width = 0; - return gs; -} - -/* Free storage for growable string */ -void str_free(struct gstr *gs) -{ - if (gs->s) - free(gs->s); - gs->s = NULL; - gs->len = 0; -} - -/* Append to growable string */ -void str_append(struct gstr *gs, const char *s) -{ - size_t l; - if (s) { - l = strlen(gs->s) + strlen(s) + 1; - if (l > gs->len) { - gs->s = realloc(gs->s, l); - gs->len = l; - } - strcat(gs->s, s); - } -} - -/* Append printf formatted string to growable string */ -void str_printf(struct gstr *gs, const char *fmt, ...) -{ - va_list ap; - char s[10000]; /* big enough... */ - va_start(ap, fmt); - vsnprintf(s, sizeof(s), fmt, ap); - str_append(gs, s); - va_end(ap); -} - -/* Retrieve value of growable string */ -const char *str_get(struct gstr *gs) -{ - return gs->s; -} - diff --git a/package/config/zconf.hash.c_shipped b/package/config/zconf.hash.c_shipped deleted file mode 100644 index 4055d5de17..0000000000 --- a/package/config/zconf.hash.c_shipped +++ /dev/null @@ -1,245 +0,0 @@ -/* ANSI-C code produced by gperf version 3.0.3 */ -/* Command-line: gperf */ -/* Computed positions: -k'1,3' */ - -#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ - && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ - && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ - && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ - && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ - && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ - && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ - && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ - && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ - && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ - && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ - && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ - && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ - && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ - && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ - && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ - && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ - && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ - && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ - && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ - && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ - && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ - && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) -/* The character set is not based on ISO-646. */ -#error "gperf generated tables don't work with this execution character set. Please report a bug to ." -#endif - -struct kconf_id; - -static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); -/* maximum key range = 50, duplicates = 0 */ - -#ifdef __GNUC__ -__inline -#else -#ifdef __cplusplus -inline -#endif -#endif -static unsigned int -kconf_id_hash (register const char *str, register unsigned int len) -{ - static unsigned char asso_values[] = - { - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 40, 5, - 0, 0, 5, 52, 0, 20, 52, 52, 10, 20, - 5, 0, 35, 52, 0, 30, 0, 15, 0, 52, - 15, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52 - }; - register int hval = len; - - switch (hval) - { - default: - hval += asso_values[(unsigned char)str[2]]; - /*FALLTHROUGH*/ - case 2: - case 1: - hval += asso_values[(unsigned char)str[0]]; - break; - } - return hval; -} - -struct kconf_id_strings_t - { - char kconf_id_strings_str2[sizeof("on")]; - char kconf_id_strings_str3[sizeof("env")]; - char kconf_id_strings_str5[sizeof("endif")]; - char kconf_id_strings_str6[sizeof("option")]; - char kconf_id_strings_str7[sizeof("endmenu")]; - char kconf_id_strings_str8[sizeof("optional")]; - char kconf_id_strings_str9[sizeof("endchoice")]; - char kconf_id_strings_str10[sizeof("range")]; - char kconf_id_strings_str11[sizeof("choice")]; - char kconf_id_strings_str12[sizeof("default")]; - char kconf_id_strings_str13[sizeof("def_bool")]; - char kconf_id_strings_str14[sizeof("help")]; - char kconf_id_strings_str16[sizeof("config")]; - char kconf_id_strings_str17[sizeof("def_tristate")]; - char kconf_id_strings_str18[sizeof("hex")]; - char kconf_id_strings_str19[sizeof("defconfig_list")]; - char kconf_id_strings_str22[sizeof("if")]; - char kconf_id_strings_str23[sizeof("int")]; - char kconf_id_strings_str27[sizeof("modules")]; - char kconf_id_strings_str28[sizeof("tristate")]; - char kconf_id_strings_str29[sizeof("menu")]; - char kconf_id_strings_str32[sizeof("comment")]; - char kconf_id_strings_str35[sizeof("menuconfig")]; - char kconf_id_strings_str36[sizeof("string")]; - char kconf_id_strings_str37[sizeof("visible")]; - char kconf_id_strings_str41[sizeof("prompt")]; - char kconf_id_strings_str42[sizeof("depends")]; - char kconf_id_strings_str44[sizeof("bool")]; - char kconf_id_strings_str46[sizeof("select")]; - char kconf_id_strings_str47[sizeof("boolean")]; - char kconf_id_strings_str48[sizeof("mainmenu")]; - char kconf_id_strings_str51[sizeof("source")]; - }; -static struct kconf_id_strings_t kconf_id_strings_contents = - { - "on", - "env", - "endif", - "option", - "endmenu", - "optional", - "endchoice", - "range", - "choice", - "default", - "def_bool", - "help", - "config", - "def_tristate", - "hex", - "defconfig_list", - "if", - "int", - "modules", - "tristate", - "menu", - "comment", - "menuconfig", - "string", - "visible", - "prompt", - "depends", - "bool", - "select", - "boolean", - "mainmenu", - "source" - }; -#define kconf_id_strings ((const char *) &kconf_id_strings_contents) -#ifdef __GNUC__ -__inline -#ifdef __GNUC_STDC_INLINE__ -__attribute__ ((__gnu_inline__)) -#endif -#endif -struct kconf_id * -kconf_id_lookup (register const char *str, register unsigned int len) -{ - enum - { - TOTAL_KEYWORDS = 32, - MIN_WORD_LENGTH = 2, - MAX_WORD_LENGTH = 14, - MIN_HASH_VALUE = 2, - MAX_HASH_VALUE = 51 - }; - - static struct kconf_id wordlist[] = - { - {-1}, {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_ON, TF_PARAM}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3, T_OPT_ENV, TF_OPTION}, - {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str5, T_ENDIF, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str6, T_OPTION, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_ENDMENU, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_OPTIONAL, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str9, T_ENDCHOICE, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str10, T_RANGE, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str11, T_CHOICE, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_UNKNOWN}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_HELP, TF_COMMAND}, - {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16, T_CONFIG, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_DEFAULT, TF_COMMAND, S_TRISTATE}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_TYPE, TF_COMMAND, S_HEX}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str19, T_OPT_DEFCONFIG_LIST,TF_OPTION}, - {-1}, {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_IF, TF_COMMAND|TF_PARAM}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_TYPE, TF_COMMAND, S_INT}, - {-1}, {-1}, {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_OPT_MODULES, TF_OPTION}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_TYPE, TF_COMMAND, S_TRISTATE}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND}, - {-1}, {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND}, - {-1}, {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_MENUCONFIG, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_TYPE, TF_COMMAND, S_STRING}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_VISIBLE, TF_COMMAND}, - {-1}, {-1}, {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_PROMPT, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42, T_DEPENDS, TF_COMMAND}, - {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str44, T_TYPE, TF_COMMAND, S_BOOLEAN}, - {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_SELECT, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str47, T_TYPE, TF_COMMAND, S_BOOLEAN}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str48, T_MAINMENU, TF_COMMAND}, - {-1}, {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str51, T_SOURCE, TF_COMMAND} - }; - - if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) - { - register int key = kconf_id_hash (str, len); - - if (key <= MAX_HASH_VALUE && key >= 0) - { - register int o = wordlist[key].name; - if (o >= 0) - { - register const char *s = o + kconf_id_strings; - - if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0') - return &wordlist[key]; - } - } - } - return 0; -} - diff --git a/package/connman/Config.in b/package/connman/Config.in index 2801b87b05..021e2112ae 100644 --- a/package/connman/Config.in +++ b/package/connman/Config.in @@ -3,7 +3,13 @@ config BR2_PACKAGE_CONNMAN select BR2_PACKAGE_DBUS select BR2_PACKAGE_LIBGLIB2 select BR2_PACKAGE_IPTABLES - depends on BR2_UCLIBC_VERSION_SNAPSHOT || BR2_TOOLCHAIN_EXTERNAL_GLIBC || BR2_TOOLCHAIN_CTNG_eglibc || BR2_TOOLCHAIN_CTNG_eglibc + select BR2_PACKAGE_GNUTLS + depends on !BR2_avr32 # no inotify_init1 + depends on !BR2_UCLIBC_VERSION_0_9_32 + depends on BR2_USE_WCHAR # libglib2 and gnutls + depends on BR2_INET_IPV6 + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, libglib2 + depends on BR2_USE_MMU # dbus, libglib2 help The Connection Manager (ConnMan) project provides a daemon for managing internet connections within embedded devices running @@ -40,8 +46,11 @@ config BR2_PACKAGE_CONNMAN_DEBUG config BR2_PACKAGE_CONNMAN_CLIENT bool "enable command line client" + select BR2_PACKAGE_READLINE endif # BR2_PACKAGE_CONNMAN -comment "connman needs a toolchain with resolver support" - depends on !(BR2_UCLIBC_VERSION_SNAPSHOT || BR2_TOOLCHAIN_EXTERNAL_GLIBC || BR2_TOOLCHAIN_CTNG_eglibc || BR2_TOOLCHAIN_CTNG_eglibc) +comment "connman needs a toolchain w/ IPv6, wchar, threads, resolver" + depends on BR2_USE_MMU && !BR2_avr32 + depends on BR2_UCLIBC_VERSION_0_9_32 || \ + !BR2_USE_WCHAR || !BR2_INET_IPV6 || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/connman/connman-000-uclibc-backtrace.patch b/package/connman/connman-000-uclibc-backtrace.patch new file mode 100644 index 0000000000..4b806c6dd3 --- /dev/null +++ b/package/connman/connman-000-uclibc-backtrace.patch @@ -0,0 +1,44 @@ +[PATCH] fix build on uClibc without UCLIBC_HAS_BACKTRACE + +Backtrace support is only used for logging on signal errors, which +isn't really critical, so simply remove backtrace info if not +available in uClibc. + +Signed-off-by: Peter Korsgaard +--- + src/log.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +Index: connman-0.78/src/log.c +=================================================================== +--- connman-0.78.orig/src/log.c ++++ connman-0.78/src/log.c +@@ -30,7 +30,12 @@ + #include + #include + #include ++#include ++/* backtrace support is optional on uClibc */ ++#if !(defined(__UCLIBC__) && !defined (__UCLIBC_HAS_BACKTRACE__)) ++#define HAVE_BACKTRACE + #include ++#endif + #include + + #include "connman.h" +@@ -112,6 +117,7 @@ + + static void print_backtrace(unsigned int offset) + { ++#ifdef HAVE_BACKTRACE + void *frames[99]; + size_t n_ptrs; + unsigned int i; +@@ -210,6 +216,7 @@ + + close(outfd[1]); + close(infd[0]); ++#endif /* HAVE_BACKTRACE */ + } + + static void signal_handler(int signo) diff --git a/package/connman/connman-001-fix-for-latest-headers-3.8+.patch b/package/connman/connman-001-fix-for-latest-headers-3.8+.patch new file mode 100644 index 0000000000..ef1fabcc7c --- /dev/null +++ b/package/connman/connman-001-fix-for-latest-headers-3.8+.patch @@ -0,0 +1,19 @@ +tethering: fix build with kernel headers 3.8+ + +Highly inspired by: + package/bridge-utils/bridge-utils-001-fix-for-kernel-headers-3.8+.patch + http://www.redhat.com/archives/libvir-list/2013-January/msg01253.html + +Signed-off-by: "Yann E. MORIN" + +diff -durN connman-1.11.orig/src/tethering.c connman-1.11/src/tethering.c +--- connman-1.11.orig/src/tethering.c 2012-12-22 22:52:47.000000000 +0100 ++++ connman-1.11/src/tethering.c 2013-03-21 19:39:17.036029270 +0100 +@@ -35,6 +35,7 @@ + #include + #include + #include ++#include + #include + + #include "connman.h" diff --git a/package/connman/connman.mk b/package/connman/connman.mk index f5fdce5a6f..4a6bb78ad4 100644 --- a/package/connman/connman.mk +++ b/package/connman/connman.mk @@ -1,24 +1,24 @@ -####################################################### +################################################################################ # -# connman - open source connection manager +# connman # -####################################################### +################################################################################ -CONNMAN_VERSION = 0.77 -CONNMAN_SITE = git://git.kernel.org/pub/scm/network/connman/connman.git -CONNMAN_DEPENDENCIES = libglib2 dbus iptables +CONNMAN_VERSION = 1.12 +CONNMAN_SOURCE = connman-$(CONNMAN_VERSION).tar.xz +CONNMAN_SITE = $(BR2_KERNEL_MIRROR)/linux/network/connman/ +CONNMAN_DEPENDENCIES = libglib2 dbus iptables gnutls CONNMAN_INSTALL_STAGING = YES +CONNMAN_LICENSE = GPLv2 +CONNMAN_LICENSE_FILES = COPYING CONNMAN_CONF_OPT += --localstatedir=/var \ $(if $(BR2_PACKAGE_CONNMAN_THREADS),--enable-threads,--disable-threads) \ $(if $(BR2_PACKAGE_CONNMAN_DEBUG),--enable-debug,--disable-debug) \ - $(if $(BR2_PACKAGE_CONNMAN_ETHERNET),--enable-ethernet=builtin,--disable-ethernet) \ - $(if $(BR2_PACKAGE_CONNMAN_WIFI),--enable-wifi=builtin,--disable-wifi) \ + $(if $(BR2_PACKAGE_CONNMAN_ETHERNET),--enable-ethernet,--disable-ethernet) \ + $(if $(BR2_PACKAGE_CONNMAN_WIFI),--enable-wifi,--disable-wifi) \ $(if $(BR2_PACKAGE_CONNMAN_BLUETOOTH),--enable-bluetooth,--disable-bluetooth) \ - $(if $(BR2_PACKAGE_CONNMAN_LOOPBACK),--enable-loopback=builtin,--disable-loopback) \ - $(if $(BR2_PACKAGE_CONNMAN_NTPD),--enable-ntpd=builtin,--disable-ntpd) - -# as long as sources are obtained from git, we need to generate the autofoo stuff -CONNMAN_AUTORECONF = YES + $(if $(BR2_PACKAGE_CONNMAN_LOOPBACK),--enable-loopback,--disable-loopback) \ + $(if $(BR2_PACKAGE_CONNMAN_NTPD),--enable-ntpd,--disable-ntpd) define CONNMAN_INSTALL_INITSCRIPT $(INSTALL) -m 0755 -D package/connman/S45connman $(TARGET_DIR)/etc/init.d/S45connman @@ -28,13 +28,15 @@ CONNMAN_POST_INSTALL_TARGET_HOOKS = CONNMAN_INSTALL_INITSCRIPT ifeq ($(BR2_PACKAGE_CONNMAN_CLIENT),y) CONNMAN_CONF_OPT += --enable-client +CONNMAN_DEPENDENCIES += readline define CONNMAN_INSTALL_CM - $(INSTALL) -m 0755 -D $(@D)/client/cm $(TARGET_DIR)/usr/bin/cm + $(INSTALL) -m 0755 -D $(@D)/client/connmanctl $(TARGET_DIR)/usr/bin/connmanctl endef CONNMAN_POST_INSTALL_TARGET_HOOKS += CONNMAN_INSTALL_CM +else +CONNMAN_CONF_OPT += --disable-client endif -$(eval $(call AUTOTARGETS,package,connman)) - +$(eval $(autotools-package)) diff --git a/package/conntrack-tools/Config.in b/package/conntrack-tools/Config.in new file mode 100644 index 0000000000..ec19d8e2de --- /dev/null +++ b/package/conntrack-tools/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_CONNTRACK_TOOLS + bool "conntrack-tools" + depends on BR2_INET_IPV6 + depends on BR2_LARGEFILE + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC || BR2_TOOLCHAIN_HAS_THREADS # libtirpc + select BR2_PACKAGE_LIBNETFILTER_CONNTRACK + select BR2_PACKAGE_LIBNETFILTER_CTHELPER + select BR2_PACKAGE_LIBNETFILTER_CTTIMEOUT + select BR2_PACKAGE_LIBNETFILTER_QUEUE + select BR2_PACKAGE_LIBTIRPC if !BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + The conntrack-tools are a set of tools targeted at + system administrators. + They are conntrack, the userspace command line interface, + and conntrackd, the userspace daemon. + + http://www.netfilter.org/projects/conntrack-tools/ + +comment "conntrack-tools needs a toolchain w/ IPv6, largefile, threads" + depends on BR2_USE_MMU + depends on !BR2_INET_IPV6 || \ + !BR2_LARGEFILE || \ + !(BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_HAS_NATIVE_RPC) diff --git a/package/conntrack-tools/conntrack-tools.mk b/package/conntrack-tools/conntrack-tools.mk new file mode 100644 index 0000000000..c01501ae79 --- /dev/null +++ b/package/conntrack-tools/conntrack-tools.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# conntrack-tools +# +################################################################################ + +CONNTRACK_TOOLS_VERSION = 1.4.2 +CONNTRACK_TOOLS_SOURCE = conntrack-tools-$(CONNTRACK_TOOLS_VERSION).tar.bz2 +CONNTRACK_TOOLS_SITE = http://www.netfilter.org/projects/conntrack-tools/files +CONNTRACK_TOOLS_DEPENDENCIES = host-pkgconf \ + libnetfilter_conntrack libnetfilter_cthelper libnetfilter_cttimeout \ + libnetfilter_queue host-bison host-flex +CONNTRACK_TOOLS_LICENSE = GPLv2+ +CONNTRACK_TOOLS_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_LIBTIRPC),y) +CONNTRACK_TOOLS_CONF_ENV += \ + CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/tirpc/" +CONNTRACK_TOOLS_DEPENDENCIES += libtirpc +endif + +$(eval $(autotools-package)) diff --git a/package/copas/Config.in b/package/copas/Config.in index 9969c8f9a4..21dd0eb883 100644 --- a/package/copas/Config.in +++ b/package/copas/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_COPAS bool "copas" + # Runtime dependency only select BR2_PACKAGE_COXPCALL select BR2_PACKAGE_LUASOCKET help diff --git a/package/copas/copas.mk b/package/copas/copas.mk index 1baed83563..e100f49f25 100644 --- a/package/copas/copas.mk +++ b/package/copas/copas.mk @@ -1,12 +1,12 @@ -############################################################# +################################################################################ # # copas # -############################################################# +################################################################################ COPAS_VERSION = 1.1.6 COPAS_SITE = http://github.com/downloads/keplerproject/copas -COPAS_DEPENDENCIES = lua coxpcall luasocket +COPAS_LICENSE = MIT define COPAS_INSTALL_TARGET_CMDS $(INSTALL) -m 0644 -D $(@D)/src/copas/copas.lua \ @@ -17,4 +17,4 @@ define COPAS_UNINSTALL_TARGET_CMDS rm -f "$(TARGET_DIR)/usr/share/lua/copas.lua" endef -$(eval $(call GENTARGETS,package,copas)) +$(eval $(generic-package)) diff --git a/package/coreutils/Config.in b/package/coreutils/Config.in index a7159cf9ea..152ad14c22 100644 --- a/package/coreutils/Config.in +++ b/package/coreutils/Config.in @@ -1,6 +1,7 @@ config BR2_PACKAGE_COREUTILS bool "coreutils" - depends on BR2_USE_WCHAR && BR2_PROGRAM_INVOCATION + depends on BR2_USE_WCHAR + depends on BR2_USE_MMU # fork() help All of the basic file/text/shell utilities. These are the core utilities which are expected to exist on every system. @@ -13,5 +14,6 @@ config BR2_PACKAGE_COREUTILS http://www.gnu.org/software/coreutils/ -comment "coreutils requires a toolchain with WCHAR and PROGRAM_INVOCATION support" - depends on !(BR2_USE_WCHAR && BR2_PROGRAM_INVOCATION) +comment "coreutils needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR diff --git a/package/coreutils/coreutils-8.9-hostname-man.patch b/package/coreutils/coreutils-8.9-hostname-man.patch deleted file mode 100644 index 5f8fa1ee26..0000000000 --- a/package/coreutils/coreutils-8.9-hostname-man.patch +++ /dev/null @@ -1,51 +0,0 @@ ---- /dev/null 2010-09-18 00:21:07.280000001 -0700 -+++ b/man/hostname.1 2010-09-23 12:08:06.000000000 -0700 -@@ -0,0 +1,48 @@ -+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -+.TH HOSTNAME "1" "January 2011" "GNU coreutils 8.9" "User Commands" -+.SH NAME -+hostname \- set or print the name of the current host system -+.SH SYNOPSIS -+.B hostname -+[\fINAME\fR] -+.br -+.B hostname -+\fIOPTION\fR -+.SH DESCRIPTION -+.\" Add any additional description here -+.PP -+Print or set the hostname of the current system. -+.TP -+\fB\-\-help\fR -+display this help and exit -+.TP -+\fB\-\-version\fR -+output version information and exit -+.SH AUTHOR -+Written by Jim Meyering. -+.SH "REPORTING BUGS" -+Report hostname bugs to bug\-coreutils at gnu.org -+.br -+GNU coreutils home page: -+.br -+General help using GNU software: -+.br -+Report hostname translation bugs to -+.SH COPYRIGHT -+Copyright \(co 2010 Free Software Foundation, Inc. -+License GPLv3+: GNU GPL version 3 or later . -+.br -+This is free software: you are free to change and redistribute it. -+There is NO WARRANTY, to the extent permitted by law. -+.SH "SEE ALSO" -+The full documentation for -+.B hostname -+is maintained as a Texinfo manual. If the -+.B info -+and -+.B hostname -+programs are properly installed at your site, the command -+.IP -+.B info coreutils \(aqhostname invocation\(aq -+.PP -+should give you access to the complete manual. diff --git a/package/coreutils/coreutils.mk b/package/coreutils/coreutils.mk index fed5e90e3a..17c81f7541 100644 --- a/package/coreutils/coreutils.mk +++ b/package/coreutils/coreutils.mk @@ -1,11 +1,14 @@ -############################################################# +################################################################################ # # coreutils # -############################################################# -COREUTILS_VERSION = 8.9 -COREUTILS_SOURCE = coreutils-$(COREUTILS_VERSION).tar.gz +################################################################################ + +COREUTILS_VERSION = 8.18 COREUTILS_SITE = $(BR2_GNU_MIRROR)/coreutils +COREUTILS_SOURCE = coreutils-$(COREUTILS_VERSION).tar.xz +COREUTILS_LICENSE = GPLv3+ +COREUTILS_LICENSE_FILES = COPYING # If both coreutils and busybox are selected, make certain coreutils # wins the fight over who gets to have their utils actually installed. @@ -20,6 +23,7 @@ COREUTILS_BIN_PROGS = cat chgrp chmod chown cp date dd df dir echo false hostnam COREUTILS_CONF_ENV = ac_cv_c_restrict=no \ ac_cv_func_chown_works=yes \ ac_cv_func_euidaccess=no \ + ac_cv_func_fstatat=yes \ ac_cv_func_getdelim=yes \ ac_cv_func_getgroups=yes \ ac_cv_func_getgroups_works=yes \ @@ -41,6 +45,7 @@ COREUTILS_CONF_ENV = ac_cv_c_restrict=no \ gl_cv_func_getcwd_null=yes \ gl_cv_func_getcwd_path_max=yes \ gl_cv_func_gettimeofday_clobber=no \ + gl_cv_func_fstatat_zero_flag=no \ gl_cv_func_link_follows_symlink=no \ gl_cv_func_re_compile_pattern_working=yes \ gl_cv_func_svid_putenv=yes \ @@ -78,4 +83,4 @@ COREUTILS_POST_INSTALL_TARGET_HOOKS += COREUTILS_POST_INSTALL # If both coreutils and busybox are selected, the corresponding applets # may need to be reinstated by the clean targets. -$(eval $(call AUTOTARGETS,package,coreutils)) +$(eval $(autotools-package)) diff --git a/package/coxpcall/coxpcall.mk b/package/coxpcall/coxpcall.mk index b9475711d3..275dcde316 100644 --- a/package/coxpcall/coxpcall.mk +++ b/package/coxpcall/coxpcall.mk @@ -1,12 +1,12 @@ -############################################################# +################################################################################ # # coxpcall # -############################################################# +################################################################################ COXPCALL_VERSION = 1.13.0 COXPCALL_SITE = http://luaforge.net/frs/download.php/3406 -COXPCALL_DEPENDENCIES = lua +COXPCALL_LICENSE = MIT define COXPCALL_INSTALL_TARGET_CMDS $(INSTALL) -m 0644 -D $(@D)/src/coxpcall.lua \ @@ -17,4 +17,4 @@ define COXPCALL_UNINSTALL_TARGET_CMDS rm -f "$(TARGET_DIR)/usr/share/lua/coxpcall.lua" endef -$(eval $(call GENTARGETS,package,coxpcall)) +$(eval $(generic-package)) diff --git a/package/cpanminus/Config.in b/package/cpanminus/Config.in new file mode 100644 index 0000000000..b10d211cc0 --- /dev/null +++ b/package/cpanminus/Config.in @@ -0,0 +1,40 @@ +config BR2_PACKAGE_CPANMINUS + bool "cpanminus" + # Requires host-qemu, which cannot work properly due to kernel + # headers mismatch between the build environment and the + # target. + depends on BR2_BROKEN + help + cpanminus is a script to get, unpack, build and install Perl modules + from CPAN. + + Why? It's dependency free, requires zero configuration, and stands + alone. When running, it requires only 10MB of RAM. + + http://github.com/miyagawa/cpanminus + +if BR2_PACKAGE_CPANMINUS + +config BR2_PACKAGE_CPANMINUS_MIRROR + string "mirror" + help + Specifies the base URL for the CPAN mirror to use, + such as http://cpan.cpantesters.org/. + +config BR2_PACKAGE_CPANMINUS_MODULES + string "Perl modules from CPAN" + default "Curses::UI" + help + List of space-separated Perl modules to install from CPAN. + + Examples: Try::Tiny Dancer YAML Moo + + Install the listed modules and their dependencies. + +config BR2_PACKAGE_CPANMINUS_NATIVE_DEPENDENCIES + string "native dependencies" + default "ncurses" + help + Some XS modules require native libraries. + +endif diff --git a/package/cpanminus/cpanminus.mk b/package/cpanminus/cpanminus.mk new file mode 100644 index 0000000000..b3153882f7 --- /dev/null +++ b/package/cpanminus/cpanminus.mk @@ -0,0 +1,47 @@ +################################################################################ +# +# cpanminus +# +################################################################################ + +CPANMINUS_VERSION = 1.6109 +CPANMINUS_SOURCE = $(CPANMINUS_VERSION).tar.gz +CPANMINUS_SITE = https://github.com/miyagawa/cpanminus/archive +CPANMINUS_DEPENDENCIES = host-qemu perl $(call qstrip,$(BR2_PACKAGE_CPANMINUS_NATIVE_DEPENDENCIES)) + +CPANMINUS_RUN_PERL = $(QEMU_USER) $(STAGING_DIR)/usr/bin/perl +CPANMINUS_ARCHNAME = $(shell $(CPANMINUS_RUN_PERL) -MConfig -e "print Config->{archname}") +CPANMINUS_PERL_LIB = $(STAGING_DIR)/usr/lib/perl5/$(PERL_VERSION) +CPANMINUS_PERL_SITELIB = $(TARGET_DIR)/usr/lib/perl5/site_perl/$(PERL_VERSION) +CPANMINUS_PERL_ARCHLIB = $(CPANMINUS_PERL_LIB)/$(CPANMINUS_ARCHNAME) +CPANMINUS_PERL_SITEARCH = $(CPANMINUS_PERL_SITELIB)/$(CPANMINUS_ARCHNAME) +CPANMINUS_PERL5LIB = $(CPANMINUS_PERL_SITEARCH):$(CPANMINUS_PERL_SITELIB):$(CPANMINUS_PERL_ARCHLIB):$(CPANMINUS_PERL_LIB) +ifneq ($(BR2_PACKAGE_CPANMINUS_MIRROR),"") + CPANMINUS_MIRROR = --mirror $(call qstrip,$(BR2_PACKAGE_CPANMINUS_MIRROR)) --mirror-only +endif +CPANMINUS_MODULES = $(call qstrip,$(BR2_PACKAGE_CPANMINUS_MODULES)) + +ifneq ($(CPANMINUS_MODULES),) +define CPANMINUS_INSTALL_TARGET_CMDS + echo "#!/bin/sh" > $(@D)/run_perl + echo "PERL5LIB=$(CPANMINUS_PERL5LIB) $(CPANMINUS_RUN_PERL) \"\$$@\"" >>$(@D)/run_perl + chmod +x $(@D)/run_perl + PERL5LIB=$(CPANMINUS_PERL5LIB) \ + PERL_MM_OPT="DESTDIR=$(TARGET_DIR) PERL=$(@D)/run_perl PERL_LIB=$(CPANMINUS_PERL_LIB) PERL_ARCHLIB=$(CPANMINUS_PERL_ARCHLIB)" \ + PERL_MB_OPT="--destdir $(TARGET_DIR)" \ + RUN_PERL="$(@D)/run_perl" \ + $(CPANMINUS_RUN_PERL) $(@D)/cpanm \ + --perl=$(@D)/run_perl \ + --notest \ + --no-man-pages \ + $(CPANMINUS_MIRROR) \ + $(call qstrip,$(BR2_PACKAGE_CPANMINUS_MODULES)) + -find $(CPANMINUS_PERL_SITELIB) -type f -name *.bs -exec rm -f {} \; +endef +else +define CPANMINUS_INSTALL_TARGET_CMDS + @echo "No modules to install" +endef +endif + +$(eval $(generic-package)) diff --git a/package/cppcms/Config.in b/package/cppcms/Config.in new file mode 100644 index 0000000000..c5d64cedd0 --- /dev/null +++ b/package/cppcms/Config.in @@ -0,0 +1,33 @@ +config BR2_PACKAGE_CPPCMS + bool "cppcms" + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_PCRE + select BR2_PACKAGE_LIBGCRYPT + depends on BR2_INSTALL_LIBSTDCPP + # cppcms uses which doesn't exist in uClibc + depends on BR2_TOOLCHAIN_USES_GLIBC + help + CppCMS is a Free High Performance Web Development Framework + (not a CMS) aimed for Rapid Web Application Development. It + differs from most of other web development frameworks like: + Python Django or Java Servlets on the following aspects: + + - It is designed and tuned to handle extremely high loads. + - It uses modern C++ as primary development language in + order to achieve the above goal. + - It is aimed on development of both Web Sites and Web + Services. + + http://cppcms.com + +config BR2_PACKAGE_CPPCMS_ICU + bool "enable icu support" + depends on BR2_PACKAGE_CPPCMS + depends on !BR2_arc # icu -> atomic builtins + select BR2_PACKAGE_ICU + help + Using ICU allows advanced localization features into CppCMS, + in another hand ICU is heavier than iconv. + +comment "cppcms needs an (e)glibc toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/cppcms/cppcms.mk b/package/cppcms/cppcms.mk new file mode 100644 index 0000000000..4068df70a1 --- /dev/null +++ b/package/cppcms/cppcms.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# cppcms +# +################################################################################ + +CPPCMS_VERSION = 1.0.4 +CPPCMS_SOURCE = cppcms-$(CPPCMS_VERSION).tar.bz2 +CPPCMS_LICENSE = LGPLv3 +CPPCMS_LICENSE_FILES = COPYING.TXT +CPPCMS_SITE = http://downloads.sourceforge.net/project/cppcms/cppcms/$(CPPCMS_VERSION) +CPPCMS_INSTALL_STAGING = YES + +CPPCMS_DEPENDENCIES = zlib pcre libgcrypt + +ifeq ($(BR2_PACKAGE_CPPCMS_ICU),y) +CPPCMS_CONF_OPT += -DDISABLE_ICONV=ON +CPPCMS_DEPENDENCIES += icu +endif + +# We copy cppcms_tmpl_cc from staging to host because this file can be +# needed for compiling packages using cppcms. And it is not worth +# creating a host package just for a python script. +define CPPCMS_INSTALL_HOST_TOOLS + cp $(STAGING_DIR)/usr/bin/cppcms_tmpl_cc $(HOST_DIR)/usr/bin/cppcms_tmpl_cc +endef +CPPCMS_POST_INSTALL_STAGING_HOOKS += CPPCMS_INSTALL_HOST_TOOLS + +$(eval $(cmake-package)) diff --git a/package/cppdb/Config.in b/package/cppdb/Config.in new file mode 100644 index 0000000000..f79b70bc67 --- /dev/null +++ b/package/cppdb/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_CPPDB + bool "cppdb" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + # Can be built without them but it's useless + depends on BR2_PACKAGE_MYSQL_CLIENT || BR2_PACKAGE_SQLITE + help + CppDB is an SQL connectivity library that is designed to provide + platform and Database independent connectivity API similarly + to what JDBC, ODBC and other connectivity libraries do. + + http://cppcms.com/sql/cppdb/ + +comment "cppdb needs a toolchain w/ C++, threads" + depends on BR2_PACKAGE_MYSQL_CLIENT || BR2_PACKAGE_SQLITE + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/cppdb/cppdb.mk b/package/cppdb/cppdb.mk new file mode 100644 index 0000000000..7cb858f9a3 --- /dev/null +++ b/package/cppdb/cppdb.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# cppdb +# +################################################################################ + +CPPDB_VERSION = 0.3.1 +CPPDB_SOURCE = cppdb-$(CPPDB_VERSION).tar.bz2 +CPPDB_SITE = http://downloads.sourceforge.net/project/cppcms/cppdb/$(CPPDB_VERSION) +CPPDB_INSTALL_STAGING = YES +CPPDB_DEPENDENCIES = $(if $(BR2_PACKAGE_SQLITE),sqlite) +CPPDB_LICENSE = Boost-v1.0 or MIT +CPPDB_LICENSE_FILES = LICENSE_1_0.txt MIT.txt + +ifeq ($(BR2_PACKAGE_MYSQL_CLIENT),y) +CPPDB_DEPENDENCIES += mysql_client +CPPDB_CONF_OPT += -DMYSQL_LIB=$(STAGING_DIR)/usr/lib/mysql +endif + +$(eval $(cmake-package)) diff --git a/package/cppzmq/Config.in b/package/cppzmq/Config.in new file mode 100644 index 0000000000..e17963ecf2 --- /dev/null +++ b/package/cppzmq/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_CPPZMQ + bool "cppzmq" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_INET_IPV6 # zeromq + depends on BR2_LARGEFILE # util-linux + depends on BR2_USE_WCHAR # util-linux + depends on BR2_TOOLCHAIN_HAS_THREADS # zeromq + select BR2_PACKAGE_ZEROMQ + help + C++ binding for zeromq (ZeroMQ, 0MQ, zmq). + + http://github.com/zeromq/cppzmq + +comment "cppzmq needs a toolchain w/ C++, IPv6, largefile, wchar, threads" + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_INET_IPV6 && BR2_LARGEFILE \ + && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/cppzmq/cppzmq.mk b/package/cppzmq/cppzmq.mk new file mode 100644 index 0000000000..19c5944bb2 --- /dev/null +++ b/package/cppzmq/cppzmq.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# cppzmq +# +################################################################################ + +CPPZMQ_VERSION = b23297800389149ac37f19b7215fa4734d344998 +CPPZMQ_SITE = git://github.com/zeromq/cppzmq.git +CPPZMQ_INSTALL_STAGING = YES +CPPZMQ_DEPENDENCIES = zeromq +CPPZMQ_LICENSE = MIT +# No license file, the license is in the installed header +CPPZMQ_LICENSE_FILES = zmq.hpp + +define CPPZMQ_INSTALL_STAGING_CMDS + $(INSTALL) -m 0644 -D $(@D)/zmq.hpp $(STAGING_DIR)/usr/include/zmq.hpp +endef + +define CPPZMQ_UNINSTALL_STAGING_CMDS + $(RM) $(STAGING_DIR)/usr/include/zmq.hpp +endef + +$(eval $(generic-package)) diff --git a/package/cpuload/Config.in b/package/cpuload/Config.in new file mode 100644 index 0000000000..82bc450afa --- /dev/null +++ b/package/cpuload/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_CPULOAD + bool "cpuload" + help + cpuload is a simple tool to obtain intuitive vision of CPU load + (including total, user, system, irq and softirq) within a certain + time, which is especially useful for embedded system without GUI. + + https://github.com/kelvincheung/cpuload diff --git a/package/cpuload/cpuload.mk b/package/cpuload/cpuload.mk new file mode 100644 index 0000000000..e0b8ccfb16 --- /dev/null +++ b/package/cpuload/cpuload.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# cpuload +# +################################################################################ + +CPULOAD_VERSION = v0.3 +CPULOAD_SITE = http://github.com/kelvincheung/cpuload/tarball/$(CPULOAD_VERSION) +CPULOAD_LICENSE = GPLv2 +CPULOAD_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/cramfs/Config.in b/package/cramfs/Config.in index a5c73a8524..daf6e6d100 100644 --- a/package/cramfs/Config.in +++ b/package/cramfs/Config.in @@ -1,7 +1,7 @@ config BR2_PACKAGE_CRAMFS - bool "cramfs" - help - cramfs is a compressed read-only filesystem. This package - contains the tools to generate and check a cramfs filesystem. + bool "cramfs" + help + cramfs is a compressed read-only filesystem. This package + contains the tools to generate and check a cramfs filesystem. - http://sourceforge.net/projects/cramfs/ + http://sourceforge.net/projects/cramfs/ diff --git a/package/cramfs/cramfs-01-devtable.patch b/package/cramfs/cramfs-01-devtable.patch deleted file mode 100644 index 884eb8cb83..0000000000 --- a/package/cramfs/cramfs-01-devtable.patch +++ /dev/null @@ -1,1269 +0,0 @@ ---- cramfs-1.1.orig/cramfsck.c 2002-02-22 17:00:42.000000000 -0700 -+++ cramfs-1.1/cramfsck.c 2002-12-21 01:25:17.000000000 -0700 -@@ -51,10 +51,11 @@ - #include - #include - #define _LINUX_STRING_H_ --#include --#include -+#include "linux/cramfs_fs.h" - #include - -+#define BLKGETSIZE _IO(0x12,96) /* return device size /512 (long *arg) */ -+ - /* Exit codes used by fsck-type programs */ - #define FSCK_OK 0 /* No errors */ - #define FSCK_NONDESTRUCT 1 /* File system errors corrected */ -@@ -75,7 +76,7 @@ - static int opt_verbose = 0; /* 1 = verbose (-v), 2+ = very verbose (-vv) */ - #ifdef INCLUDE_FS_TESTS - static int opt_extract = 0; /* extract cramfs (-x) */ --static char *extract_dir = "root"; /* extraction directory (-x) */ -+static char *extract_dir = "/"; /* extraction directory (-x) */ - static uid_t euid; /* effective UID */ - - /* (cramfs_super + start) <= start_dir < end_dir <= start_data <= end_data */ -@@ -155,7 +156,7 @@ - } - - if (*length < sizeof(struct cramfs_super)) { -- die(FSCK_UNCORRECTED, 0, "file length too short"); -+ die(FSCK_UNCORRECTED, 0, "filesystem smaller than a cramfs superblock!"); - } - - /* find superblock */ -@@ -190,7 +191,8 @@ - die(FSCK_UNCORRECTED, 0, "zero file count"); - } - if (*length < super.size) { -- die(FSCK_UNCORRECTED, 0, "file length too short"); -+ die(FSCK_UNCORRECTED, 0, "file length too short, %lu is smaller than %lu", -+ *length, super.size); - } - else if (*length > super.size) { - fprintf(stderr, "warning: file extends past end of filesystem\n"); -@@ -267,11 +269,11 @@ - #ifdef INCLUDE_FS_TESTS - static void print_node(char type, struct cramfs_inode *i, char *name) - { -- char info[10]; -+ char info[11]; - - if (S_ISCHR(i->mode) || (S_ISBLK(i->mode))) { - /* major/minor numbers can be as high as 2^12 or 4096 */ -- snprintf(info, 10, "%4d,%4d", major(i->size), minor(i->size)); -+ snprintf(info, 11, "%4d,%4d", major(i->size), minor(i->size)); - } - else { - /* size be as high as 2^24 or 16777216 */ -@@ -445,8 +447,10 @@ - } - /* TODO: Do we need to check end_dir for empty case? */ - memcpy(newpath, path, pathlen); -- newpath[pathlen] = '/'; -- pathlen++; -+ if (pathlen > 1) { -+ newpath[pathlen] = '/'; -+ pathlen++; -+ } - if (opt_verbose) { - print_node('d', i, path); - } ---- cramfs-1.1.orig/device_table.txt 1969-12-31 17:00:00.000000000 -0700 -+++ cramfs-1.1/device_table.txt 2003-01-01 05:13:44.000000000 -0700 -@@ -0,0 +1,129 @@ -+# When building a target filesystem, it is desirable to not have to -+# become root and then run 'mknod' a thousand times. Using a device -+# table you can create device nodes and directories "on the fly". -+# -+# This is a sample device table file for use with mkcramfs. You can -+# do all sorts of interesting things with a device table file. For -+# example, if you want to adjust the permissions on a particular file -+# you can just add an entry like: -+# /sbin/foobar f 2755 0 0 - - - - - -+# and (assuming the file /sbin/foobar exists) it will be made setuid -+# root (regardless of what its permissions are on the host filesystem. -+# Furthermore, you can use a single table entry to create a many device -+# minors. For example, if I wanted to create /dev/hda and /dev/hda[0-15] -+# I could just use the following two table entries: -+# /dev/hda b 640 0 0 3 0 0 0 - -+# /dev/hda b 640 0 0 3 1 1 1 15 -+# -+# Device table entries take the form of: -+# -+# where name is the file name, type can be one of: -+# f A regular file -+# d Directory -+# c Character special device file -+# b Block special device file -+# p Fifo (named pipe) -+# uid is the user id for the target file, gid is the group id for the -+# target file. The rest of the entries (major, minor, etc) apply only -+# to device special files. -+ -+# Have fun -+# -Erik Andersen -+# -+ -+# -+/dev d 755 0 0 - - - - - -+/dev/mem c 640 0 0 1 1 0 0 - -+/dev/kmem c 640 0 0 1 2 0 0 - -+/dev/null c 640 0 0 1 3 0 0 - -+/dev/zero c 640 0 0 1 5 0 0 - -+/dev/random c 640 0 0 1 8 0 0 - -+/dev/urandom c 640 0 0 1 9 0 0 - -+/dev/tty c 666 0 0 5 0 0 0 - -+/dev/tty c 666 0 0 4 0 0 1 6 -+/dev/console c 640 0 0 5 1 0 0 - -+/dev/ram b 640 0 0 1 1 0 0 - -+/dev/ram b 640 0 0 1 0 0 1 4 -+/dev/loop b 640 0 0 7 0 0 1 2 -+/dev/ptmx c 666 0 0 5 2 0 0 - -+#/dev/ttyS c 640 0 0 4 64 0 1 4 -+#/dev/psaux c 640 0 0 10 1 0 0 - -+#/dev/rtc c 640 0 0 10 135 0 0 - -+ -+# Adjust permissions on some normal files -+#/etc/shadow f 600 0 0 - - - - - -+#/bin/tinylogin f 4755 0 0 - - - - - -+ -+# User-mode Linux stuff -+/dev/ubda b 640 0 0 98 0 0 0 - -+/dev/ubda b 640 0 0 98 1 1 1 15 -+ -+# IDE Devices -+/dev/hda b 640 0 0 3 0 0 0 - -+/dev/hda b 640 0 0 3 1 1 1 15 -+/dev/hdb b 640 0 0 3 64 0 0 - -+/dev/hdb b 640 0 0 3 65 1 1 15 -+#/dev/hdc b 640 0 0 22 0 0 0 - -+#/dev/hdc b 640 0 0 22 1 1 1 15 -+#/dev/hdd b 640 0 0 22 64 0 0 - -+#/dev/hdd b 640 0 0 22 65 1 1 15 -+#/dev/hde b 640 0 0 33 0 0 0 - -+#/dev/hde b 640 0 0 33 1 1 1 15 -+#/dev/hdf b 640 0 0 33 64 0 0 - -+#/dev/hdf b 640 0 0 33 65 1 1 15 -+#/dev/hdg b 640 0 0 34 0 0 0 - -+#/dev/hdg b 640 0 0 34 1 1 1 15 -+#/dev/hdh b 640 0 0 34 64 0 0 - -+#/dev/hdh b 640 0 0 34 65 1 1 15 -+ -+# SCSI Devices -+#/dev/sda b 640 0 0 8 0 0 0 - -+#/dev/sda b 640 0 0 8 1 1 1 15 -+#/dev/sdb b 640 0 0 8 16 0 0 - -+#/dev/sdb b 640 0 0 8 17 1 1 15 -+#/dev/sdc b 640 0 0 8 32 0 0 - -+#/dev/sdc b 640 0 0 8 33 1 1 15 -+#/dev/sdd b 640 0 0 8 48 0 0 - -+#/dev/sdd b 640 0 0 8 49 1 1 15 -+#/dev/sde b 640 0 0 8 64 0 0 - -+#/dev/sde b 640 0 0 8 65 1 1 15 -+#/dev/sdf b 640 0 0 8 80 0 0 - -+#/dev/sdf b 640 0 0 8 81 1 1 15 -+#/dev/sdg b 640 0 0 8 96 0 0 - -+#/dev/sdg b 640 0 0 8 97 1 1 15 -+#/dev/sdh b 640 0 0 8 112 0 0 - -+#/dev/sdh b 640 0 0 8 113 1 1 15 -+#/dev/sg c 640 0 0 21 0 0 1 15 -+#/dev/scd b 640 0 0 11 0 0 1 15 -+#/dev/st c 640 0 0 9 0 0 1 8 -+#/dev/nst c 640 0 0 9 128 0 1 8 -+#/dev/st c 640 0 0 9 32 1 1 4 -+#/dev/st c 640 0 0 9 64 1 1 4 -+#/dev/st c 640 0 0 9 96 1 1 4 -+ -+# Floppy disk devices -+#/dev/fd b 640 0 0 2 0 0 1 2 -+#/dev/fd0d360 b 640 0 0 2 4 0 0 - -+#/dev/fd1d360 b 640 0 0 2 5 0 0 - -+#/dev/fd0h1200 b 640 0 0 2 8 0 0 - -+#/dev/fd1h1200 b 640 0 0 2 9 0 0 - -+#/dev/fd0u1440 b 640 0 0 2 28 0 0 - -+#/dev/fd1u1440 b 640 0 0 2 29 0 0 - -+#/dev/fd0u2880 b 640 0 0 2 32 0 0 - -+#/dev/fd1u2880 b 640 0 0 2 33 0 0 - -+ -+# All the proprietary cdrom devices in the world -+#/dev/aztcd b 640 0 0 29 0 0 0 - -+#/dev/bpcd b 640 0 0 41 0 0 0 - -+#/dev/capi20 c 640 0 0 68 0 0 1 2 -+#/dev/cdu31a b 640 0 0 15 0 0 0 - -+#/dev/cdu535 b 640 0 0 24 0 0 0 - -+#/dev/cm206cd b 640 0 0 32 0 0 0 - -+#/dev/sjcd b 640 0 0 18 0 0 0 - -+#/dev/sonycd b 640 0 0 15 0 0 0 - -+#/dev/gscd b 640 0 0 16 0 0 0 - -+#/dev/sbpcd b 640 0 0 25 0 0 0 - -+#/dev/sbpcd b 640 0 0 25 0 0 1 4 -+#/dev/mcd b 640 0 0 23 0 0 0 - -+#/dev/optcd b 640 0 0 17 0 0 0 - -+ ---- cramfs-1.1.orig/mkcramfs.c 2002-02-20 01:03:32.000000000 -0700 -+++ cramfs-1.1/mkcramfs.c 2002-12-21 01:25:17.000000000 -0700 -@@ -1,3 +1,4 @@ -+/* vi: set sw=8 ts=8: */ - /* - * mkcramfs - make a cramfs file system - * -@@ -16,12 +17,21 @@ - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ * Added device table support (code taken from mkfs.jffs2.c, credit to -+ * Erik Andersen ) as well as an option to squash -+ * permissions. - Russ Dill September 2002 -+ * -+ * Reworked, cleaned up, and updated for cramfs-1.1, December 2002 -+ * - Erik Andersen -+ * - */ - - /* - * If you change the disk format of cramfs, please update fs/cramfs/README. - */ - -+#define _GNU_SOURCE - #include - #include - #include -@@ -33,8 +43,15 @@ - #include - #include - #include -+#include -+#include -+#include -+#include - #include - #include -+#ifdef DMALLOC -+#include -+#endif - - /* Exit codes used by mkfs-type programs */ - #define MKFS_OK 0 /* No errors */ -@@ -71,11 +88,17 @@ - + (1 << CRAMFS_SIZE_WIDTH) - 1 /* filesize */ \ - + (1 << CRAMFS_SIZE_WIDTH) * 4 / PAGE_CACHE_SIZE /* block pointers */ ) - -+ -+/* The kernel assumes PAGE_CACHE_SIZE as block size. */ -+#define PAGE_CACHE_SIZE (4096) -+ -+ - static const char *progname = "mkcramfs"; - static unsigned int blksize = PAGE_CACHE_SIZE; - static long total_blocks = 0, total_nodes = 1; /* pre-count the root node */ - static int image_length = 0; - -+ - /* - * If opt_holes is set, then mkcramfs can create explicit holes in the - * data, which saves 26 bytes per hole (which is a lot smaller a -@@ -91,10 +114,12 @@ - static int opt_holes = 0; - static int opt_pad = 0; - static int opt_verbose = 0; -+static int opt_squash = 0; - static char *opt_image = NULL; - static char *opt_name = NULL; - - static int warn_dev, warn_gid, warn_namelen, warn_skip, warn_size, warn_uid; -+static const char *const memory_exhausted = "memory exhausted"; - - /* In-core version of inode / directory entry. */ - struct entry { -@@ -123,7 +148,7 @@ - { - FILE *stream = status ? stderr : stdout; - -- fprintf(stream, "usage: %s [-h] [-e edition] [-i file] [-n name] dirname outfile\n" -+ fprintf(stream, "usage: %s [-h] [-e edition] [-i file] [-n name] [-D file] dirname outfile\n" - " -h print this help\n" - " -E make all warnings errors (non-zero exit status)\n" - " -e edition set edition number (part of fsid)\n" -@@ -133,39 +158,157 @@ - " -s sort directory entries (old option, ignored)\n" - " -v be more verbose\n" - " -z make explicit holes (requires >= 2.3.39)\n" -- " dirname root of the directory tree to be compressed\n" -+ " -D Use the named FILE as a device table file\n" -+ " -q squash permissions (make everything owned by root)\n" -+ " dirname root of the filesystem to be compressed\n" - " outfile output file\n", progname, PAD_SIZE); - - exit(status); - } - --static void die(int status, int syserr, const char *fmt, ...) -+static void verror_msg(const char *s, va_list p) -+{ -+ fflush(stdout); -+ fprintf(stderr, "mkcramfs: "); -+ vfprintf(stderr, s, p); -+} -+ -+static void vperror_msg(const char *s, va_list p) -+{ -+ int err = errno; -+ -+ if (s == 0) -+ s = ""; -+ verror_msg(s, p); -+ if (*s) -+ s = ": "; -+ fprintf(stderr, "%s%s\n", s, strerror(err)); -+} -+ -+static void perror_msg(const char *s, ...) -+{ -+ va_list p; -+ -+ va_start(p, s); -+ vperror_msg(s, p); -+ va_end(p); -+} -+ -+static void error_msg_and_die(const char *s, ...) -+{ -+ va_list p; -+ -+ va_start(p, s); -+ verror_msg(s, p); -+ va_end(p); -+ putc('\n', stderr); -+ exit(MKFS_ERROR); -+} -+ -+static void perror_msg_and_die(const char *s, ...) -+{ -+ va_list p; -+ -+ va_start(p, s); -+ vperror_msg(s, p); -+ va_end(p); -+ exit(MKFS_ERROR); -+} -+#ifndef DMALLOC -+extern char *xstrdup(const char *s) -+{ -+ char *t; -+ -+ if (s == NULL) -+ return NULL; -+ t = strdup(s); -+ if (t == NULL) -+ error_msg_and_die(memory_exhausted); -+ return t; -+} -+ -+extern void *xmalloc(size_t size) -+{ -+ void *ptr = malloc(size); -+ -+ if (ptr == NULL && size != 0) -+ error_msg_and_die(memory_exhausted); -+ return ptr; -+} -+ -+extern void *xcalloc(size_t nmemb, size_t size) -+{ -+ void *ptr = calloc(nmemb, size); -+ -+ if (ptr == NULL && nmemb != 0 && size != 0) -+ error_msg_and_die(memory_exhausted); -+ return ptr; -+} -+ -+extern void *xrealloc(void *ptr, size_t size) -+{ -+ ptr = realloc(ptr, size); -+ if (ptr == NULL && size != 0) -+ error_msg_and_die(memory_exhausted); -+ return ptr; -+} -+#endif -+ -+static FILE *xfopen(const char *path, const char *mode) - { -- va_list arg_ptr; -- int save = errno; -+ FILE *fp; -+ -+ if ((fp = fopen(path, mode)) == NULL) -+ perror_msg_and_die("%s", path); -+ return fp; -+} - -- fflush(0); -- va_start(arg_ptr, fmt); -- fprintf(stderr, "%s: ", progname); -- vfprintf(stderr, fmt, arg_ptr); -- if (syserr) { -- fprintf(stderr, ": %s", strerror(save)); -+extern int xopen(const char *pathname, int flags, mode_t mode) -+{ -+ int ret; -+ -+ if (flags & O_CREAT) -+ ret = open(pathname, flags, mode); -+ else -+ ret = open(pathname, flags); -+ if (ret == -1) { -+ perror_msg_and_die("%s", pathname); - } -- fprintf(stderr, "\n"); -- va_end(arg_ptr); -- exit(status); -+ return ret; - } - -+extern char *xreadlink(const char *path) -+{ -+ static const int GROWBY = 80; /* how large we will grow strings by */ -+ -+ char *buf = NULL; -+ int bufsize = 0, readsize = 0; -+ -+ do { -+ buf = xrealloc(buf, bufsize += GROWBY); -+ readsize = readlink(path, buf, bufsize); /* 1st try */ -+ if (readsize == -1) { -+ perror_msg("%s:%s", progname, path); -+ return NULL; -+ } -+ } -+ while (bufsize < readsize + 1); -+ -+ buf[readsize] = '\0'; -+ -+ return buf; -+} -+ - static void map_entry(struct entry *entry) - { - if (entry->path) { - entry->fd = open(entry->path, O_RDONLY); - if (entry->fd < 0) { -- die(MKFS_ERROR, 1, "open failed: %s", entry->path); -+ error_msg_and_die("open failed: %s", entry->path); - } - entry->uncompressed = mmap(NULL, entry->size, PROT_READ, MAP_PRIVATE, entry->fd, 0); - if (entry->uncompressed == MAP_FAILED) { -- die(MKFS_ERROR, 1, "mmap failed: %s", entry->path); -+ error_msg_and_die("mmap failed: %s", entry->path); - } - } - } -@@ -174,8 +317,9 @@ - { - if (entry->path) { - if (munmap(entry->uncompressed, entry->size) < 0) { -- die(MKFS_ERROR, 1, "munmap failed: %s", entry->path); -+ error_msg_and_die("munmap failed: %s", entry->path); - } -+ entry->uncompressed=NULL; - close(entry->fd); - } - } -@@ -204,7 +348,8 @@ - find_identical_file(orig->next, newfile)); - } - --static void eliminate_doubles(struct entry *root, struct entry *orig) { -+static void eliminate_doubles(struct entry *root, struct entry *orig) -+{ - if (orig) { - if (orig->size && (orig->path || orig->uncompressed)) - find_identical_file(root, orig); -@@ -232,10 +377,7 @@ - - /* Set up the path. */ - /* TODO: Reuse the parent's buffer to save memcpy'ing and duplication. */ -- path = malloc(len + 1 + MAX_INPUT_NAMELEN + 1); -- if (!path) { -- die(MKFS_ERROR, 1, "malloc failed"); -- } -+ path = xmalloc(len + 1 + MAX_INPUT_NAMELEN + 1); - memcpy(path, name, len); - endpath = path + len; - *endpath = '/'; -@@ -245,7 +387,7 @@ - dircount = scandir(name, &dirlist, 0, cramsort); - - if (dircount < 0) { -- die(MKFS_ERROR, 1, "scandir failed: %s", name); -+ error_msg_and_die("scandir failed: %s", name); - } - - /* process directory */ -@@ -269,25 +411,20 @@ - } - namelen = strlen(dirent->d_name); - if (namelen > MAX_INPUT_NAMELEN) { -- die(MKFS_ERROR, 0, -- "very long (%u bytes) filename found: %s\n" -- "please increase MAX_INPUT_NAMELEN in mkcramfs.c and recompile", -+ error_msg_and_die( -+ "Very long (%u bytes) filename `%s' found.\n" -+ " Please increase MAX_INPUT_NAMELEN in mkcramfs.c and recompile. Exiting.\n", - namelen, dirent->d_name); - } - memcpy(endpath, dirent->d_name, namelen + 1); - - if (lstat(path, &st) < 0) { -+ perror(endpath); - warn_skip = 1; - continue; - } -- entry = calloc(1, sizeof(struct entry)); -- if (!entry) { -- die(MKFS_ERROR, 1, "calloc failed"); -- } -- entry->name = strdup(dirent->d_name); -- if (!entry->name) { -- die(MKFS_ERROR, 1, "strdup failed"); -- } -+ entry = xcalloc(1, sizeof(struct entry)); -+ entry->name = xstrdup(dirent->d_name); - /* truncate multi-byte UTF-8 filenames on character boundary */ - if (namelen > CRAMFS_MAXPATHLEN) { - namelen = CRAMFS_MAXPATHLEN; -@@ -297,24 +434,25 @@ - namelen--; - /* are we reasonably certain it was UTF-8 ? */ - if (entry->name[namelen] < 0x80 || !namelen) { -- die(MKFS_ERROR, 0, "cannot truncate filenames not encoded in UTF-8"); -+ error_msg_and_die("cannot truncate filenames not encoded in UTF-8"); - } - } - entry->name[namelen] = '\0'; - } - entry->mode = st.st_mode; - entry->size = st.st_size; -- entry->uid = st.st_uid; -+ entry->uid = opt_squash ? 0 : st.st_uid; - if (entry->uid >= 1 << CRAMFS_UID_WIDTH) - warn_uid = 1; -- entry->gid = st.st_gid; -- if (entry->gid >= 1 << CRAMFS_GID_WIDTH) -+ entry->gid = opt_squash ? 0 : st.st_gid; -+ if (entry->gid >= 1 << CRAMFS_GID_WIDTH) { - /* TODO: We ought to replace with a default - gid instead of truncating; otherwise there - are security problems. Maybe mode should - be &= ~070. Same goes for uid once Linux - supports >16-bit uids. */ - warn_gid = 1; -+ } - size = sizeof(struct cramfs_inode) + ((namelen + 3) & ~3); - *fslen_ub += size; - if (S_ISDIR(st.st_mode)) { -@@ -325,21 +463,15 @@ - warn_skip = 1; - continue; - } -- entry->path = strdup(path); -- if (!entry->path) { -- die(MKFS_ERROR, 1, "strdup failed"); -- } -+ entry->path = xstrdup(path); - if ((entry->size >= 1 << CRAMFS_SIZE_WIDTH)) { - warn_size = 1; - entry->size = (1 << CRAMFS_SIZE_WIDTH) - 1; - } - } - } else if (S_ISLNK(st.st_mode)) { -- entry->uncompressed = malloc(entry->size); -+ entry->uncompressed = xreadlink(path); - if (!entry->uncompressed) { -- die(MKFS_ERROR, 1, "malloc failed"); -- } -- if (readlink(path, entry->uncompressed, entry->size) < 0) { - warn_skip = 1; - continue; - } -@@ -351,7 +483,7 @@ - if (entry->size & -(1<name); -+ error_msg_and_die("bogus file type: %s", entry->name); - } - - if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) { -@@ -378,7 +510,9 @@ - struct cramfs_super *super = (struct cramfs_super *) base; - unsigned int offset = sizeof(struct cramfs_super) + image_length; - -- offset += opt_pad; /* 0 if no padding */ -+ if (opt_pad) { -+ offset += opt_pad; /* 0 if no padding */ -+ } - - super->magic = CRAMFS_MAGIC; - super->flags = CRAMFS_FLAG_FSID_VERSION_2 | CRAMFS_FLAG_SORTED_DIRS; -@@ -414,10 +548,10 @@ - struct cramfs_inode *inode = (struct cramfs_inode *) (base + entry->dir_offset); - - if ((offset & 3) != 0) { -- die(MKFS_ERROR, 0, "illegal offset of %lu bytes", offset); -+ error_msg_and_die("illegal offset of %lu bytes", offset); - } - if (offset >= (1 << (2 + CRAMFS_OFFSET_WIDTH))) { -- die(MKFS_ERROR, 0, "filesystem too big"); -+ error_msg_and_die("filesystem too big"); - } - inode->offset = (offset >> 2); - } -@@ -429,7 +563,7 @@ - */ - static void print_node(struct entry *e) - { -- char info[10]; -+ char info[12]; - char type = '?'; - - if (S_ISREG(e->mode)) type = 'f'; -@@ -442,11 +576,11 @@ - - if (S_ISCHR(e->mode) || (S_ISBLK(e->mode))) { - /* major/minor numbers can be as high as 2^12 or 4096 */ -- snprintf(info, 10, "%4d,%4d", major(e->size), minor(e->size)); -+ snprintf(info, 11, "%4d,%4d", major(e->size), minor(e->size)); - } - else { - /* size be as high as 2^24 or 16777216 */ -- snprintf(info, 10, "%9d", e->size); -+ snprintf(info, 11, "%9d", e->size); - } - - printf("%c %04o %s %5d:%-3d %s\n", -@@ -462,17 +596,9 @@ - { - int stack_entries = 0; - int stack_size = 64; -- struct entry **entry_stack; -- -- entry_stack = malloc(stack_size * sizeof(struct entry *)); -- if (!entry_stack) { -- die(MKFS_ERROR, 1, "malloc failed"); -- } -- -- if (opt_verbose) { -- printf("root:\n"); -- } -+ struct entry **entry_stack = NULL; - -+ entry_stack = xmalloc(stack_size * sizeof(struct entry *)); - for (;;) { - int dir_start = stack_entries; - while (entry) { -@@ -506,10 +632,7 @@ - if (entry->child) { - if (stack_entries >= stack_size) { - stack_size *= 2; -- entry_stack = realloc(entry_stack, stack_size * sizeof(struct entry *)); -- if (!entry_stack) { -- die(MKFS_ERROR, 1, "realloc failed"); -- } -+ entry_stack = xrealloc(entry_stack, stack_size * sizeof(struct entry *)); - } - entry_stack[stack_entries] = entry; - stack_entries++; -@@ -543,7 +666,7 @@ - - set_data_offset(entry, base, offset); - if (opt_verbose) { -- printf("%s:\n", entry->name); -+ printf("'%s':\n", entry->name); - } - entry = entry->child; - } -@@ -553,16 +676,21 @@ - - static int is_zero(char const *begin, unsigned len) - { -- /* Returns non-zero iff the first LEN bytes from BEGIN are all NULs. */ -- return (len-- == 0 || -- (begin[0] == '\0' && -- (len-- == 0 || -- (begin[1] == '\0' && -- (len-- == 0 || -- (begin[2] == '\0' && -- (len-- == 0 || -- (begin[3] == '\0' && -- memcmp(begin, begin + 4, len) == 0)))))))); -+ if (opt_holes) -+ /* Returns non-zero iff the first LEN bytes from BEGIN are -+ all NULs. */ -+ return (len-- == 0 || -+ (begin[0] == '\0' && -+ (len-- == 0 || -+ (begin[1] == '\0' && -+ (len-- == 0 || -+ (begin[2] == '\0' && -+ (len-- == 0 || -+ (begin[3] == '\0' && -+ memcmp(begin, begin + 4, len) == 0)))))))); -+ else -+ /* Never create holes. */ -+ return 0; - } - - /* -@@ -575,37 +703,34 @@ - * Note that size > 0, as a zero-sized file wouldn't ever - * have gotten here in the first place. - */ --static unsigned int do_compress(char *base, unsigned int offset, char const *name, char *uncompressed, unsigned int size) -+static unsigned int do_compress(char *base, unsigned int offset, struct entry *entry) - { -+ unsigned int size = entry->size; - unsigned long original_size = size; - unsigned long original_offset = offset; - unsigned long new_size; - unsigned long blocks = (size - 1) / blksize + 1; - unsigned long curr = offset + 4 * blocks; - int change; -+ char *uncompressed = entry->uncompressed; - -- total_blocks += blocks; -+ total_blocks += blocks; - - do { - unsigned long len = 2 * blksize; - unsigned int input = size; -- int err; -- - if (input > blksize) - input = blksize; - size -= input; -- if (!(opt_holes && is_zero (uncompressed, input))) { -- err = compress2(base + curr, &len, uncompressed, input, Z_BEST_COMPRESSION); -- if (err != Z_OK) { -- die(MKFS_ERROR, 0, "compression error: %s", zError(err)); -- } -+ if (!is_zero (uncompressed, input)) { -+ compress(base + curr, &len, uncompressed, input); - curr += len; - } - uncompressed += input; - - if (len > blksize*2) { - /* (I don't think this can happen with zlib.) */ -- die(MKFS_ERROR, 0, "AIEEE: block \"compressed\" to > 2*blocklength (%ld)", len); -+ error_msg_and_die("AIEEE: block \"compressed\" to > 2*blocklength (%ld)\n", len); - } - - *(u32 *) (base + offset) = curr; -@@ -618,10 +743,12 @@ - st_blocks * 512. But if you say that then perhaps - administrative data should also be included in both. */ - change = new_size - original_size; -- if (opt_verbose > 1) { -- printf("%6.2f%% (%+d bytes)\t%s\n", -- (change * 100) / (double) original_size, change, name); -+#if 0 -+ if (opt_verbose) { -+ printf("%6.2f%% (%+d bytes)\t%s\n", -+ (change * 100) / (double) original_size, change, entry->name); - } -+#endif - - return curr; - } -@@ -644,7 +771,7 @@ - set_data_offset(entry, base, offset); - entry->offset = offset; - map_entry(entry); -- offset = do_compress(base, offset, entry->name, entry->uncompressed, entry->size); -+ offset = do_compress(base, offset, entry); - unmap_entry(entry); - } - } -@@ -660,13 +787,10 @@ - int fd; - char *buf; - -- fd = open(file, O_RDONLY); -- if (fd < 0) { -- die(MKFS_ERROR, 1, "open failed: %s", file); -- } -+ fd = xopen(file, O_RDONLY, 0); - buf = mmap(NULL, image_length, PROT_READ, MAP_PRIVATE, fd, 0); - if (buf == MAP_FAILED) { -- die(MKFS_ERROR, 1, "mmap failed"); -+ error_msg_and_die("mmap failed"); - } - memcpy(base + offset, buf, image_length); - munmap(buf, image_length); -@@ -679,6 +803,328 @@ - return (offset + image_length); - } - -+static struct entry *find_filesystem_entry(struct entry *dir, char *name, mode_t type) -+{ -+ struct entry *e = dir; -+ -+ if (S_ISDIR(dir->mode)) { -+ e = dir->child; -+ } -+ while (e) { -+ /* Only bother to do the expensive strcmp on matching file types */ -+ if (type == (e->mode & S_IFMT) && e->name) { -+ if (S_ISDIR(e->mode)) { -+ int len = strlen(e->name); -+ -+ /* Check if we are a parent of the correct path */ -+ if (strncmp(e->name, name, len) == 0) { -+ /* Is this an _exact_ match? */ -+ if (strcmp(name, e->name) == 0) { -+ return (e); -+ } -+ /* Looks like we found a parent of the correct path */ -+ if (name[len] == '/') { -+ if (e->child) { -+ return (find_filesystem_entry (e, name + len + 1, type)); -+ } else { -+ return NULL; -+ } -+ } -+ } -+ } else { -+ if (strcmp(name, e->name) == 0) { -+ return (e); -+ } -+ } -+ } -+ e = e->next; -+ } -+ return (NULL); -+} -+ -+void modify_entry(char *full_path, unsigned long uid, unsigned long gid, -+ unsigned long mode, unsigned long rdev, struct entry *root, loff_t *fslen_ub) -+{ -+ char *name, *path, *full; -+ struct entry *curr, *parent, *entry, *prev; -+ -+ full = xstrdup(full_path); -+ path = xstrdup(dirname(full)); -+ name = full_path + strlen(path) + 1; -+ free(full); -+ if (strcmp(path, "/") == 0) { -+ parent = root; -+ name = full_path + 1; -+ } else { -+ if (!(parent = find_filesystem_entry(root, path+1, S_IFDIR))) -+ error_msg_and_die("%s/%s: could not find parent\n", path, name); -+ } -+ if ((entry = find_filesystem_entry(parent, name, (mode & S_IFMT)))) { -+ /* its there, just modify permissions */ -+ entry->mode = mode; -+ entry->uid = uid; -+ entry->gid = gid; -+ } else { /* make a new entry */ -+ -+ /* code partially replicated from parse_directory() */ -+ size_t namelen; -+ if (S_ISREG(mode)) { -+ error_msg_and_die("%s: regular file from device_table file must exist on disk!", full_path); -+ } -+ -+ namelen = strlen(name); -+ if (namelen > MAX_INPUT_NAMELEN) { -+ error_msg_and_die( -+ "Very long (%u bytes) filename `%s' found.\n" -+ " Please increase MAX_INPUT_NAMELEN in mkcramfs.c and recompile. Exiting.\n", -+ namelen, name); -+ } -+ entry = xcalloc(1, sizeof(struct entry)); -+ entry->name = xstrdup(name); -+ /* truncate multi-byte UTF-8 filenames on character boundary */ -+ if (namelen > CRAMFS_MAXPATHLEN) { -+ namelen = CRAMFS_MAXPATHLEN; -+ warn_namelen = 1; -+ /* the first lost byte must not be a trail byte */ -+ while ((entry->name[namelen] & 0xc0) == 0x80) { -+ namelen--; -+ /* are we reasonably certain it was UTF-8 ? */ -+ if (entry->name[namelen] < 0x80 || !namelen) { -+ error_msg_and_die("cannot truncate filenames not encoded in UTF-8"); -+ } -+ } -+ entry->name[namelen] = '\0'; -+ } -+ entry->mode = mode; -+ entry->uid = uid; -+ entry->gid = gid; -+ entry->size = 0; -+ if (S_ISBLK(mode) || S_ISCHR(mode)) { -+ entry->size = rdev; -+ if (entry->size & -(1<size += sizeof(struct cramfs_inode) + ((namelen + 3) & ~3); -+ -+ /* alright, time to link us in */ -+ curr = parent->child; -+ prev = NULL; -+ while (curr && strcmp(name, curr->name) > 0) { -+ prev = curr; -+ curr = curr->next; -+ } -+ if (!prev) parent->child = entry; -+ else prev->next = entry; -+ entry->next = curr; -+ entry->child = NULL; -+ } -+ if (entry->uid >= 1 << CRAMFS_UID_WIDTH) -+ warn_uid = 1; -+ if (entry->gid >= 1 << CRAMFS_GID_WIDTH) { -+ /* TODO: We ought to replace with a default -+ gid instead of truncating; otherwise there -+ are security problems. Maybe mode should -+ be &= ~070. Same goes for uid once Linux -+ supports >16-bit uids. */ -+ warn_gid = 1; -+ } -+ free(path); -+} -+ -+/* the GNU C library has a wonderful scanf("%as", string) which will -+ allocate the string with the right size, good to avoid buffer overruns. -+ the following macros use it if available or use a hacky workaround... -+ */ -+ -+#ifdef __GNUC__ -+#define SCANF_PREFIX "a" -+#define SCANF_STRING(s) (&s) -+#define GETCWD_SIZE 0 -+#else -+#define SCANF_PREFIX "511" -+#define SCANF_STRING(s) (s = xmalloc(512)) -+#define GETCWD_SIZE -1 -+inline int snprintf(char *str, size_t n, const char *fmt, ...) -+{ -+ int ret; -+ va_list ap; -+ -+ va_start(ap, fmt); -+ ret = vsprintf(str, fmt, ap); -+ va_end(ap); -+ return ret; -+} -+#endif -+ -+/* device table entries take the form of: -+ -+ /dev/mem c 640 0 0 1 1 0 0 - -+ -+ type can be one of: -+ f A regular file -+ d Directory -+ c Character special device file -+ b Block special device file -+ p Fifo (named pipe) -+ -+ I don't bother with symlinks (permissions are irrelevant), hard -+ links (special cases of regular files), or sockets (why bother). -+ -+ Regular files must exist in the target root directory. If a char, -+ block, fifo, or directory does not exist, it will be created. -+*/ -+ -+static int interpret_table_entry(char *line, struct entry *root, loff_t *fslen_ub) -+{ -+ char type, *name = NULL; -+ unsigned long mode = 0755, uid = 0, gid = 0, major = 0, minor = 0; -+ unsigned long start = 0, increment = 1, count = 0; -+ -+ if (sscanf (line, "%" SCANF_PREFIX "s %c %lo %lu %lu %lu %lu %lu %lu %lu", -+ SCANF_STRING(name), &type, &mode, &uid, &gid, &major, &minor, -+ &start, &increment, &count) < 0) -+ { -+ return 1; -+ } -+ -+ if (!strcmp(name, "/")) { -+ error_msg_and_die("Device table entries require absolute paths"); -+ } -+ -+ switch (type) { -+ case 'd': -+ mode |= S_IFDIR; -+ modify_entry(name, uid, gid, mode, 0, root, fslen_ub); -+ break; -+ case 'f': -+ mode |= S_IFREG; -+ modify_entry(name, uid, gid, mode, 0, root, fslen_ub); -+ break; -+ case 'p': -+ mode |= S_IFIFO; -+ modify_entry(name, uid, gid, mode, 0, root, fslen_ub); -+ break; -+ case 'c': -+ case 'b': -+ mode |= (type == 'c') ? S_IFCHR : S_IFBLK; -+ if (count > 0) { -+ char *buf; -+ unsigned long i; -+ dev_t rdev; -+ -+ for (i = start; i < count; i++) { -+ asprintf(&buf, "%s%lu", name, i); -+ rdev = makedev(major, minor + (i * increment - start)); -+ modify_entry(buf, uid, gid, mode, rdev, root, fslen_ub); -+ free(buf); -+ } -+ } else { -+ dev_t rdev = makedev(major, minor); -+ modify_entry(name, uid, gid, mode, rdev, root, fslen_ub); -+ } -+ break; -+ default: -+ error_msg_and_die("Unsupported file type"); -+ } -+ free(name); -+ return 0; -+} -+ -+static int parse_device_table(FILE *file, struct entry *root, loff_t *fslen_ub) -+{ -+ char *line; -+ int status = 0; -+ size_t length = 0; -+ -+ /* Turn off squash, since we must ensure that values -+ * entered via the device table are not squashed */ -+ opt_squash = 0; -+ -+ /* Looks ok so far. The general plan now is to read in one -+ * line at a time, check for leading comment delimiters ('#'), -+ * then try and parse the line as a device table. If we fail -+ * to parse things, try and help the poor fool to fix their -+ * device table with a useful error msg... */ -+ line = NULL; -+ while (getline(&line, &length, file) != -1) { -+ /* First trim off any whitespace */ -+ int len = strlen(line); -+ -+ /* trim trailing whitespace */ -+ while (len > 0 && isspace(line[len - 1])) -+ line[--len] = '\0'; -+ /* trim leading whitespace */ -+ memmove(line, &line[strspn(line, " \n\r\t\v")], len); -+ -+ /* How long are we after trimming? */ -+ len = strlen(line); -+ -+ /* If this is NOT a comment line, try to interpret it */ -+ if (len && *line != '#') { -+ if (interpret_table_entry(line, root, fslen_ub)) -+ status = 1; -+ } -+ -+ free(line); -+ line = NULL; -+ } -+ free(line); -+ fclose(file); -+ -+ return status; -+} -+ -+void traverse(struct entry *entry, int depth) -+{ -+ struct entry *curr = entry; -+ int i; -+ -+ while (curr) { -+ for (i = 0; i < depth; i++) putchar(' '); -+ printf("%s: size=%d mode=%d same=%p\n", -+ (curr->name)? (char*)curr->name : "/", -+ curr->size, curr->mode, curr->same); -+ if (curr->child) traverse(curr->child, depth + 4); -+ curr = curr->next; -+ } -+} -+ -+static void free_filesystem_entry(struct entry *dir) -+{ -+ struct entry *e = dir, *last; -+ -+ if (S_ISDIR(dir->mode)) { -+ e = dir->child; -+ } -+ while (e) { -+ if (e->name) -+ free(e->name); -+ if (e->path) -+ free(e->path); -+ if (e->uncompressed) -+ free(e->uncompressed); -+ last = e; -+ if (e->child) { -+ free_filesystem_entry(e); -+ } -+ e = e->next; -+ free(last); -+ } -+} -+ -+ -+/* -+ * Usage: -+ * -+ * mkcramfs directory-name outfile -+ * -+ * where "directory-name" is simply the root of the directory -+ * tree that we want to generate a compressed filesystem out -+ * of. -+ */ - int main(int argc, char **argv) - { - struct stat st; /* used twice... */ -@@ -692,6 +1138,7 @@ - u32 crc; - int c; /* for getopt */ - char *ep; /* for strtoul */ -+ FILE *devtable = NULL; - - total_blocks = 0; - -@@ -699,7 +1146,7 @@ - progname = argv[0]; - - /* command line options */ -- while ((c = getopt(argc, argv, "hEe:i:n:psvz")) != EOF) { -+ while ((c = getopt(argc, argv, "hEe:i:n:psvzD:q")) != EOF) { - switch (c) { - case 'h': - usage(MKFS_OK); -@@ -715,7 +1162,7 @@ - case 'i': - opt_image = optarg; - if (lstat(opt_image, &st) < 0) { -- die(MKFS_ERROR, 1, "lstat failed: %s", opt_image); -+ error_msg_and_die("lstat failed: %s", opt_image); - } - image_length = st.st_size; /* may be padded later */ - fslen_ub += (image_length + 3); /* 3 is for padding */ -@@ -736,6 +1183,16 @@ - case 'z': - opt_holes = 1; - break; -+ case 'q': -+ opt_squash = 1; -+ break; -+ case 'D': -+ devtable = xfopen(optarg, "r"); -+ if (fstat(fileno(devtable), &st) < 0) -+ perror_msg_and_die(optarg); -+ if (st.st_size < 10) -+ error_msg_and_die("%s: not a proper device table file\n", optarg); -+ break; - } - } - -@@ -745,25 +1202,23 @@ - outfile = argv[optind + 1]; - - if (stat(dirname, &st) < 0) { -- die(MKFS_USAGE, 1, "stat failed: %s", dirname); -- } -- fd = open(outfile, O_WRONLY | O_CREAT | O_TRUNC, 0666); -- if (fd < 0) { -- die(MKFS_USAGE, 1, "open failed: %s", outfile); -+ error_msg_and_die("stat failed: %s", dirname); - } -+ fd = xopen(outfile, O_WRONLY | O_CREAT | O_TRUNC, 0666); - -- root_entry = calloc(1, sizeof(struct entry)); -- if (!root_entry) { -- die(MKFS_ERROR, 1, "calloc failed"); -- } -+ root_entry = xcalloc(1, sizeof(struct entry)); - root_entry->mode = st.st_mode; - root_entry->uid = st.st_uid; - root_entry->gid = st.st_gid; - - root_entry->size = parse_directory(root_entry, dirname, &root_entry->child, &fslen_ub); - -+ if (devtable) { -+ parse_device_table(devtable, root_entry, &fslen_ub); -+ } -+ - /* always allocate a multiple of blksize bytes because that's -- what we're going to write later on */ -+ what we're going to write later on */ - fslen_ub = ((fslen_ub - 1) | (blksize - 1)) + 1; - - if (fslen_ub > MAXFSLEN) { -@@ -790,7 +1245,7 @@ - rom_image = mmap(NULL, fslen_ub?fslen_ub:1, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - - if (rom_image == MAP_FAILED) { -- die(MKFS_ERROR, 1, "mmap failed"); -+ error_msg_and_die("mmap failed"); - } - - /* Skip the first opt_pad bytes for boot loader code */ -@@ -807,6 +1262,7 @@ - } - - offset = write_directory_structure(root_entry->child, rom_image, offset); -+ if (opt_verbose) - printf("Directory data: %d bytes\n", offset); - - offset = write_data(root_entry, rom_image, offset); -@@ -814,30 +1270,38 @@ - /* We always write a multiple of blksize bytes, so that - losetup works. */ - offset = ((offset - 1) | (blksize - 1)) + 1; -+ if (opt_verbose) - printf("Everything: %d kilobytes\n", offset >> 10); - - /* Write the superblock now that we can fill in all of the fields. */ - write_superblock(root_entry, rom_image+opt_pad, offset); -+ if (opt_verbose) - printf("Super block: %d bytes\n", sizeof(struct cramfs_super)); - - /* Put the checksum in. */ - crc = crc32(0L, Z_NULL, 0); - crc = crc32(crc, (rom_image+opt_pad), (offset-opt_pad)); - ((struct cramfs_super *) (rom_image+opt_pad))->fsid.crc = crc; -+ if (opt_verbose) - printf("CRC: %x\n", crc); - - /* Check to make sure we allocated enough space. */ - if (fslen_ub < offset) { -- die(MKFS_ERROR, 0, "not enough space allocated for ROM image (%Ld allocated, %d used)", fslen_ub, offset); -+ error_msg_and_die("not enough space allocated for ROM " -+ "image (%Ld allocated, %d used)", fslen_ub, offset); - } - - written = write(fd, rom_image, offset); - if (written < 0) { -- die(MKFS_ERROR, 1, "write failed"); -+ error_msg_and_die("write failed"); - } - if (offset != written) { -- die(MKFS_ERROR, 0, "ROM image write failed (wrote %d of %d bytes)", written, offset); -+ error_msg_and_die("ROM image write failed (wrote %d of %d bytes)", written, offset); - } -+ -+ /* Free up memory */ -+ free_filesystem_entry(root_entry); -+ free(root_entry); - - /* (These warnings used to come at the start, but they scroll off the - screen too quickly.) */ diff --git a/package/cramfs/cramfs-01-endian.patch b/package/cramfs/cramfs-01-endian.patch new file mode 100644 index 0000000000..b2eda5a1db --- /dev/null +++ b/package/cramfs/cramfs-01-endian.patch @@ -0,0 +1,288 @@ +Index: cramfs-1.1/mkcramfs.c +=================================================================== +--- cramfs-1.1.orig/mkcramfs.c 2002-02-20 09:03:32.000000000 +0100 ++++ cramfs-1.1/mkcramfs.c 2011-09-09 15:11:00.980895119 +0200 +@@ -93,6 +93,7 @@ + static int opt_verbose = 0; + static char *opt_image = NULL; + static char *opt_name = NULL; ++static int swap_endian = 0; + + static int warn_dev, warn_gid, warn_namelen, warn_skip, warn_size, warn_uid; + +@@ -130,6 +131,8 @@ + " -i file insert a file image into the filesystem (requires >= 2.4.0)\n" + " -n name set name of cramfs filesystem\n" + " -p pad by %d bytes for boot code\n" ++ " -l litte endian filesystem\n" ++ " -b big endian filesystem\n" + " -s sort directory entries (old option, ignored)\n" + " -v be more verbose\n" + " -z make explicit holes (requires >= 2.3.39)\n" +@@ -372,6 +375,50 @@ + return totalsize; + } + ++/* routines to swap endianness/bitfields in inode/superblock block data */ ++static void fix_inode(struct cramfs_inode *inode) ++{ ++#define wswap(x) (((x)>>24) | (((x)>>8)&0xff00) | (((x)&0xff00)<<8) | (((x)&0xff)<<24)) ++ /* attempt #2 */ ++ inode->mode = (inode->mode >> 8) | ((inode->mode&0xff)<<8); ++ inode->uid = (inode->uid >> 8) | ((inode->uid&0xff)<<8); ++ inode->size = (inode->size >> 16) | (inode->size&0xff00) | ++ ((inode->size&0xff)<<16); ++ ((u32*)inode)[2] = wswap(inode->offset | (inode->namelen<<26)); ++} ++ ++static void fix_offset(struct cramfs_inode *inode, u32 offset) ++{ ++ u32 tmp = wswap(((u32*)inode)[2]); ++ ((u32*)inode)[2] = wswap((offset >> 2) | (tmp&0xfc000000)); ++} ++ ++static void fix_block_pointer(u32 *p) ++{ ++ *p = wswap(*p); ++} ++ ++static void fix_super(struct cramfs_super *super) ++{ ++ u32 *p = (u32*)super; ++ ++ /* fix superblock fields */ ++ p[0] = wswap(p[0]); /* magic */ ++ p[1] = wswap(p[1]); /* size */ ++ p[2] = wswap(p[2]); /* flags */ ++ p[3] = wswap(p[3]); /* future */ ++ ++ /* fix filesystem info fields */ ++ p = (u32*)&super->fsid; ++ p[0] = wswap(p[0]); /* crc */ ++ p[1] = wswap(p[1]); /* edition */ ++ p[2] = wswap(p[2]); /* blocks */ ++ p[3] = wswap(p[3]); /* files */ ++ ++ fix_inode(&super->root); ++#undef wswap ++} ++ + /* Returns sizeof(struct cramfs_super), which includes the root inode. */ + static unsigned int write_superblock(struct entry *root, char *base, int size) + { +@@ -405,6 +452,7 @@ + super->root.gid = root->gid; + super->root.size = root->size; + super->root.offset = offset >> 2; ++ if (swap_endian) fix_super(super); + + return offset; + } +@@ -419,7 +467,10 @@ + if (offset >= (1 << (2 + CRAMFS_OFFSET_WIDTH))) { + die(MKFS_ERROR, 0, "filesystem too big"); + } +- inode->offset = (offset >> 2); ++ if (swap_endian) ++ fix_offset(inode, offset); ++ else ++ inode->offset = (offset >> 2); + } + + /* +@@ -515,6 +566,7 @@ + stack_entries++; + } + entry = entry->next; ++ if (swap_endian) fix_inode(inode); + } + + /* +@@ -609,6 +661,7 @@ + } + + *(u32 *) (base + offset) = curr; ++ if (swap_endian) fix_block_pointer((u32*)(base + offset)); + offset += 4; + } while (size); + +@@ -699,7 +752,7 @@ + progname = argv[0]; + + /* command line options */ +- while ((c = getopt(argc, argv, "hEe:i:n:psvz")) != EOF) { ++ while ((c = getopt(argc, argv, "hEe:i:n:psvzlb")) != EOF) { + switch (c) { + case 'h': + usage(MKFS_OK); +@@ -727,6 +780,18 @@ + opt_pad = PAD_SIZE; + fslen_ub += PAD_SIZE; + break; ++ case 'b': ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++ swap_endian = 1; ++ printf("Swapping filesystem endian-ness\n"); ++#endif ++ break; ++ case 'l': ++#if __BYTE_ORDER == __BIG_ENDIAN ++ swap_endian = 1; ++ printf("Swapping filesystem endian-ness\n"); ++#endif ++ break; + case 's': + /* old option, ignored */ + break; +Index: cramfs-1.1/cramfsck.c +=================================================================== +--- cramfs-1.1.orig/cramfsck.c 2002-02-23 01:00:42.000000000 +0100 ++++ cramfs-1.1/cramfsck.c 2011-09-09 15:10:06.810894275 +0200 +@@ -30,6 +30,7 @@ + * 2000/07/15: Daniel Quinlan (initial support for block devices) + * 2002/01/10: Daniel Quinlan (additional checks, test more return codes, + * use read if mmap fails, standardize messages) ++ * 2004/09/01: Alfonso Acosta (Add swapping support) + */ + + /* compile-time options */ +@@ -53,6 +54,7 @@ + #define _LINUX_STRING_H_ + #include + #include ++#include + #include + + /* Exit codes used by fsck-type programs */ +@@ -73,6 +75,7 @@ + static char *filename; /* ROM image filename */ + struct cramfs_super super; /* just find the cramfs superblock once */ + static int opt_verbose = 0; /* 1 = verbose (-v), 2+ = very verbose (-vv) */ ++static int need_swapping = 0; /* fs and host dont have the same endianness */ + #ifdef INCLUDE_FS_TESTS + static int opt_extract = 0; /* extract cramfs (-x) */ + static char *extract_dir = "root"; /* extraction directory (-x) */ +@@ -84,6 +87,9 @@ + static unsigned long start_data = ~0UL; /* start of the data (256 MB = max) */ + static unsigned long end_data = 0; /* end of the data */ + ++/* access 32 byte variables */ ++#define CRAMFS_32(x) (need_swapping ? bswap_32(x) : x) ++ + /* Guarantee access to at least 8kB at a time */ + #define ROMBUFFER_BITS 13 + #define ROMBUFFERSIZE (1 << ROMBUFFER_BITS) +@@ -165,20 +171,34 @@ + if (super.magic == CRAMFS_MAGIC) { + *start = 0; + } ++ else if (super.magic == bswap_32(CRAMFS_MAGIC)) { ++ *start = 0; ++ need_swapping = 1; ++ } ++ + else if (*length >= (PAD_SIZE + sizeof(super))) { + lseek(fd, PAD_SIZE, SEEK_SET); + if (read(fd, &super, sizeof(super)) != sizeof(super)) { + die(FSCK_ERROR, 1, "read failed: %s", filename); + } +- if (super.magic == CRAMFS_MAGIC) { ++ if (super.magic == CRAMFS_32(CRAMFS_MAGIC)) { + *start = PAD_SIZE; + } + } + + /* superblock tests */ +- if (super.magic != CRAMFS_MAGIC) { ++ if (super.magic != CRAMFS_32(CRAMFS_MAGIC)) { + die(FSCK_UNCORRECTED, 0, "superblock magic not found"); + } ++ if (need_swapping){ ++ super.size = bswap_32(super.size); ++ super.flags = bswap_32(super.flags); ++ super.future = bswap_32(super.future); ++ super.fsid.crc = bswap_32(super.fsid.crc); ++ super.fsid.edition = bswap_32(super.fsid.edition); ++ super.fsid.blocks = bswap_32(super.fsid.blocks); ++ super.fsid.files = bswap_32(super.fsid.files); ++ } + if (super.flags & ~CRAMFS_SUPPORTED_FLAGS) { + die(FSCK_ERROR, 0, "unsupported filesystem features"); + } +@@ -213,7 +233,10 @@ + die(FSCK_USAGE, 0, "unable to test CRC: old cramfs format"); + #endif /* not INCLUDE_FS_TESTS */ + } +- ++ else if (need_swapping) { ++ /* crc checking in this case would mean translating the whole file */ ++ return; ++ } + crc = crc32(0L, Z_NULL, 0); + + buf = mmap(NULL, super.size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); +@@ -298,12 +321,23 @@ + + static struct cramfs_inode *cramfs_iget(struct cramfs_inode * i) + { ++#define wswap(x) (((x)>>24) | (((x)>>8)&0xff00) | (((x)&0xff00)<<8) | (((x)&0xff)<<24)) + struct cramfs_inode *inode = malloc(sizeof(struct cramfs_inode)); + + if (!inode) { + die(FSCK_ERROR, 1, "malloc failed"); + } +- *inode = *i; ++ if(!need_swapping) { ++ *inode = *i; ++ } ++ else { ++ inode->mode=bswap_16(i->mode); ++ inode->uid=bswap_16(i->uid); ++ inode->size=bswap_32(i->size << 8); ++ inode->gid=i->gid; ++ inode->namelen = bswap_32(((u32*)i)[2]) >> 26; ++ inode->offset = bswap_32(((u32*)i)[2]) & 0x3FFFFFFF; ++ } + return inode; + } + +@@ -322,9 +356,9 @@ + */ + static struct cramfs_inode *read_super(void) + { +- unsigned long offset = super.root.offset << 2; +- +- if (!S_ISDIR(super.root.mode)) ++ struct cramfs_inode *root = cramfs_iget(&super.root); ++ unsigned long offset = root->offset << 2; ++ if (!S_ISDIR(root->mode)) + die(FSCK_UNCORRECTED, 0, "root inode is not directory"); + if (!(super.flags & CRAMFS_FLAG_SHIFTED_ROOT_OFFSET) && + ((offset != sizeof(struct cramfs_super)) && +@@ -332,7 +366,7 @@ + { + die(FSCK_UNCORRECTED, 0, "bad root offset (%lu)", offset); + } +- return cramfs_iget(&super.root); ++ return root; + } + + static int uncompress_block(void *src, int len) +@@ -364,7 +398,7 @@ + + do { + unsigned long out = PAGE_CACHE_SIZE; +- unsigned long next = *(u32 *) romfs_read(offset); ++ unsigned long next = CRAMFS_32(*(u32 *) romfs_read(offset)); + + if (next > end_data) { + end_data = next; +@@ -525,7 +559,7 @@ + { + unsigned long offset = i->offset << 2; + unsigned long curr = offset + 4; +- unsigned long next = *(u32 *) romfs_read(offset); ++ unsigned long next = CRAMFS_32(*(u32 *) romfs_read(offset)); + unsigned long size; + + if (offset == 0) { diff --git a/package/cramfs/cramfs-02-cygwin_IO.patch b/package/cramfs/cramfs-02-cygwin_IO.patch new file mode 100644 index 0000000000..8be333f01b --- /dev/null +++ b/package/cramfs/cramfs-02-cygwin_IO.patch @@ -0,0 +1,15 @@ +Index: cramfs-1.1/cramfsck.c +=================================================================== +--- cramfs-1.1.orig/cramfsck.c 2011-09-09 15:10:06.000000000 +0200 ++++ cramfs-1.1/cramfsck.c 2011-09-09 15:13:49.950897747 +0200 +@@ -57,6 +57,10 @@ + #include + #include + ++#ifdef __CYGWIN__ ++#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) ++#endif /* __CYGWIN__ */ ++ + /* Exit codes used by fsck-type programs */ + #define FSCK_OK 0 /* No errors */ + #define FSCK_NONDESTRUCT 1 /* File system errors corrected */ diff --git a/package/cramfs/cramfs-02-endian.patch b/package/cramfs/cramfs-02-endian.patch deleted file mode 100644 index 0da55bfae6..0000000000 --- a/package/cramfs/cramfs-02-endian.patch +++ /dev/null @@ -1,284 +0,0 @@ ---- cramfs-1.1/mkcramfs.c.orig 2005-04-13 05:55:57.000000000 -0600 -+++ cramfs-1.1/mkcramfs.c 2005-04-13 16:19:57.000000000 -0600 -@@ -117,6 +117,7 @@ - static int opt_squash = 0; - static char *opt_image = NULL; - static char *opt_name = NULL; -+static int swap_endian = 0; - - static int warn_dev, warn_gid, warn_namelen, warn_skip, warn_size, warn_uid; - static const char *const memory_exhausted = "memory exhausted"; -@@ -155,6 +156,8 @@ - " -i file insert a file image into the filesystem (requires >= 2.4.0)\n" - " -n name set name of cramfs filesystem\n" - " -p pad by %d bytes for boot code\n" -+ " -l litte endian filesystem\n" -+ " -b big endian filesystem\n" - " -s sort directory entries (old option, ignored)\n" - " -v be more verbose\n" - " -z make explicit holes (requires >= 2.3.39)\n" -@@ -504,6 +506,50 @@ - return totalsize; - } - -+/* routines to swap endianness/bitfields in inode/superblock block data */ -+static void fix_inode(struct cramfs_inode *inode) -+{ -+#define wswap(x) (((x)>>24) | (((x)>>8)&0xff00) | (((x)&0xff00)<<8) | (((x)&0xff)<<24)) -+ /* attempt #2 */ -+ inode->mode = (inode->mode >> 8) | ((inode->mode&0xff)<<8); -+ inode->uid = (inode->uid >> 8) | ((inode->uid&0xff)<<8); -+ inode->size = (inode->size >> 16) | (inode->size&0xff00) | -+ ((inode->size&0xff)<<16); -+ ((u32*)inode)[2] = wswap(inode->offset | (inode->namelen<<26)); -+} -+ -+static void fix_offset(struct cramfs_inode *inode, u32 offset) -+{ -+ u32 tmp = wswap(((u32*)inode)[2]); -+ ((u32*)inode)[2] = wswap((offset >> 2) | (tmp&0xfc000000)); -+} -+ -+static void fix_block_pointer(u32 *p) -+{ -+ *p = wswap(*p); -+} -+ -+static void fix_super(struct cramfs_super *super) -+{ -+ u32 *p = (u32*)super; -+ -+ /* fix superblock fields */ -+ p[0] = wswap(p[0]); /* magic */ -+ p[1] = wswap(p[1]); /* size */ -+ p[2] = wswap(p[2]); /* flags */ -+ p[3] = wswap(p[3]); /* future */ -+ -+ /* fix filesystem info fields */ -+ p = (u32*)&super->fsid; -+ p[0] = wswap(p[0]); /* crc */ -+ p[1] = wswap(p[1]); /* edition */ -+ p[2] = wswap(p[2]); /* blocks */ -+ p[3] = wswap(p[3]); /* files */ -+ -+ fix_inode(&super->root); -+#undef wswap -+} -+ - /* Returns sizeof(struct cramfs_super), which includes the root inode. */ - static unsigned int write_superblock(struct entry *root, char *base, int size) - { -@@ -539,6 +585,7 @@ - super->root.gid = root->gid; - super->root.size = root->size; - super->root.offset = offset >> 2; -+ if (swap_endian) fix_super(super); - - return offset; - } -@@ -553,7 +600,10 @@ - if (offset >= (1 << (2 + CRAMFS_OFFSET_WIDTH))) { - error_msg_and_die("filesystem too big"); - } -- inode->offset = (offset >> 2); -+ if (swap_endian) -+ fix_offset(inode, offset); -+ else -+ inode->offset = (offset >> 2); - } - - /* -@@ -638,6 +688,7 @@ - stack_entries++; - } - entry = entry->next; -+ if (swap_endian) fix_inode(inode); - } - - /* -@@ -734,6 +785,7 @@ - } - - *(u32 *) (base + offset) = curr; -+ if (swap_endian) fix_block_pointer((u32*)(base + offset)); - offset += 4; - } while (size); - -@@ -1146,7 +1198,7 @@ - progname = argv[0]; - - /* command line options */ -- while ((c = getopt(argc, argv, "hEe:i:n:psvzD:q")) != EOF) { -+ while ((c = getopt(argc, argv, "hEe:i:n:psvzD:qlb")) != EOF) { - switch (c) { - case 'h': - usage(MKFS_OK); -@@ -1174,6 +1227,18 @@ - opt_pad = PAD_SIZE; - fslen_ub += PAD_SIZE; - break; -+ case 'b': -+#if __BYTE_ORDER == __LITTLE_ENDIAN -+ swap_endian = 1; -+ printf("Swapping filesystem endian-ness\n"); -+#endif -+ break; -+ case 'l': -+#if __BYTE_ORDER == __BIG_ENDIAN -+ swap_endian = 1; -+ printf("Swapping filesystem endian-ness\n"); -+#endif -+ break; - case 's': - /* old option, ignored */ - break; ---- cramfs-1.1/cramfsck.c.orig 2005-04-25 11:50:31.000000000 -0700 -+++ cramfs-1.1/cramfsck.c 2005-04-25 16:53:25.000000000 -0700 -@@ -30,6 +30,7 @@ - * 2000/07/15: Daniel Quinlan (initial support for block devices) - * 2002/01/10: Daniel Quinlan (additional checks, test more return codes, - * use read if mmap fails, standardize messages) -+ * 2004/09/01: Alfonso Acosta (Add swapping support) - */ - - /* compile-time options */ -@@ -51,6 +52,7 @@ - #include - #include - #define _LINUX_STRING_H_ -+#include - #include "linux/cramfs_fs.h" - #include - -@@ -74,6 +76,7 @@ - static char *filename; /* ROM image filename */ - struct cramfs_super super; /* just find the cramfs superblock once */ - static int opt_verbose = 0; /* 1 = verbose (-v), 2+ = very verbose (-vv) */ -+static int need_swapping = 0; /* fs and host dont have the same endianness */ - #ifdef INCLUDE_FS_TESTS - static int opt_extract = 0; /* extract cramfs (-x) */ - static char *extract_dir = "/"; /* extraction directory (-x) */ -@@ -85,6 +88,9 @@ - static unsigned long start_data = ~0UL; /* start of the data (256 MB = max) */ - static unsigned long end_data = 0; /* end of the data */ - -+/* access 32 byte variables */ -+#define CRAMFS_32(x) (need_swapping ? bswap_32(x) : x) -+ - /* Guarantee access to at least 8kB at a time */ - #define ROMBUFFER_BITS 13 - #define ROMBUFFERSIZE (1 << ROMBUFFER_BITS) -@@ -166,20 +172,34 @@ - if (super.magic == CRAMFS_MAGIC) { - *start = 0; - } -+ else if (super.magic == bswap_32(CRAMFS_MAGIC)) { -+ *start = 0; -+ need_swapping = 1; -+ } -+ - else if (*length >= (PAD_SIZE + sizeof(super))) { - lseek(fd, PAD_SIZE, SEEK_SET); - if (read(fd, &super, sizeof(super)) != sizeof(super)) { - die(FSCK_ERROR, 1, "read failed: %s", filename); - } -- if (super.magic == CRAMFS_MAGIC) { -+ if (super.magic == CRAMFS_32(CRAMFS_MAGIC)) { - *start = PAD_SIZE; - } - } - - /* superblock tests */ -- if (super.magic != CRAMFS_MAGIC) { -+ if (super.magic != CRAMFS_32(CRAMFS_MAGIC)) { - die(FSCK_UNCORRECTED, 0, "superblock magic not found"); - } -+ if (need_swapping){ -+ super.size = bswap_32(super.size); -+ super.flags = bswap_32(super.flags); -+ super.future = bswap_32(super.future); -+ super.fsid.crc = bswap_32(super.fsid.crc); -+ super.fsid.edition = bswap_32(super.fsid.edition); -+ super.fsid.blocks = bswap_32(super.fsid.blocks); -+ super.fsid.files = bswap_32(super.fsid.files); -+ } - if (super.flags & ~CRAMFS_SUPPORTED_FLAGS) { - die(FSCK_ERROR, 0, "unsupported filesystem features"); - } -@@ -215,7 +235,10 @@ - die(FSCK_USAGE, 0, "unable to test CRC: old cramfs format"); - #endif /* not INCLUDE_FS_TESTS */ - } -- -+ else if (need_swapping) { -+ /* crc checking in this case would mean translating the whole file */ -+ return; -+ } - crc = crc32(0L, Z_NULL, 0); - - buf = mmap(NULL, super.size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); -@@ -300,12 +323,23 @@ - - static struct cramfs_inode *cramfs_iget(struct cramfs_inode * i) - { -+#define wswap(x) (((x)>>24) | (((x)>>8)&0xff00) | (((x)&0xff00)<<8) | (((x)&0xff)<<24)) - struct cramfs_inode *inode = malloc(sizeof(struct cramfs_inode)); - - if (!inode) { - die(FSCK_ERROR, 1, "malloc failed"); - } -- *inode = *i; -+ if(!need_swapping) { -+ *inode = *i; -+ } -+ else { -+ inode->mode=bswap_16(i->mode); -+ inode->uid=bswap_16(i->uid); -+ inode->size=bswap_32(i->size << 8); -+ inode->gid=i->gid; -+ inode->namelen = bswap_32(((u32*)i)[2]) >> 26; -+ inode->offset = bswap_32(((u32*)i)[2]) & 0x3FFFFFFF; -+ } - return inode; - } - -@@ -324,9 +358,9 @@ - */ - static struct cramfs_inode *read_super(void) - { -- unsigned long offset = super.root.offset << 2; -- -- if (!S_ISDIR(super.root.mode)) -+ struct cramfs_inode *root = cramfs_iget(&super.root); -+ unsigned long offset = root->offset << 2; -+ if (!S_ISDIR(root->mode)) - die(FSCK_UNCORRECTED, 0, "root inode is not directory"); - if (!(super.flags & CRAMFS_FLAG_SHIFTED_ROOT_OFFSET) && - ((offset != sizeof(struct cramfs_super)) && -@@ -334,7 +368,7 @@ - { - die(FSCK_UNCORRECTED, 0, "bad root offset (%lu)", offset); - } -- return cramfs_iget(&super.root); -+ return root; - } - - static int uncompress_block(void *src, int len) -@@ -366,7 +400,7 @@ - - do { - unsigned long out = PAGE_CACHE_SIZE; -- unsigned long next = *(u32 *) romfs_read(offset); -+ unsigned long next = CRAMFS_32(*(u32 *) romfs_read(offset)); - - if (next > end_data) { - end_data = next; -@@ -529,7 +563,7 @@ - { - unsigned long offset = i->offset << 2; - unsigned long curr = offset + 4; -- unsigned long next = *(u32 *) romfs_read(offset); -+ unsigned long next = CRAMFS_32(*(u32 *) romfs_read(offset)); - unsigned long size; - - if (offset == 0) { diff --git a/package/cramfs/cramfs-03-cygwin_IO.patch b/package/cramfs/cramfs-03-cygwin_IO.patch deleted file mode 100644 index 4ea358ede3..0000000000 --- a/package/cramfs/cramfs-03-cygwin_IO.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- cramfs-1.1/cramfsck.c.orig 2006-12-22 22:16:59.328125000 +1100 -+++ cramfs-1.1/cramfsck.c 2006-12-19 01:02:05.531250000 +1100 -@@ -56,6 +56,10 @@ - #include "linux/cramfs_fs.h" - #include - -+#ifdef __CYGWIN__ -+#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) -+#endif /* __CYGWIN__ */ -+ - #define BLKGETSIZE _IO(0x12,96) /* return device size /512 (long *arg) */ - - /* Exit codes used by fsck-type programs */ diff --git a/package/cramfs/cramfs.mk b/package/cramfs/cramfs.mk index 9073ae5424..0f29dd04ef 100644 --- a/package/cramfs/cramfs.mk +++ b/package/cramfs/cramfs.mk @@ -1,15 +1,13 @@ -############################################################# +################################################################################ # # cramfs # -############################################################# +################################################################################ -CRAMFS_VERSION=1.1 -CRAMFS_SOURCE=cramfs-$(CRAMFS_VERSION).tar.gz -CRAMFS_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/cramfs +CRAMFS_VERSION = 1.1 +CRAMFS_SITE = http://downloads.sourceforge.net/project/cramfs/cramfs/$(CRAMFS_VERSION) CRAMFS_DEPENDENCIES = zlib -HOST_CRAMFS_DEPENDENCIES = host-zlib define CRAMFS_BUILD_CMDS $(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D) @@ -29,5 +27,5 @@ define HOST_CRAMFS_INSTALL_CMDS install -D -m 755 $(@D)/cramfsck $(HOST_DIR)/usr/bin/cramfsck endef -$(eval $(call GENTARGETS,package,cramfs)) -$(eval $(call GENTARGETS,package,cramfs,host)) +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/crda/Config.in b/package/crda/Config.in new file mode 100644 index 0000000000..e56a45ef66 --- /dev/null +++ b/package/crda/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_CRDA + bool "crda" + depends on BR2_TOOLCHAIN_HAS_THREADS # libnl + select BR2_PACKAGE_LIBGCRYPT + select BR2_PACKAGE_LIBNL + # regdb is a runtime dependency + select BR2_PACKAGE_WIRELESS_REGDB + help + Central Regulatory Domain Agent. + + This package provides a Central Regulatory Domain Agent (CRDA) + to be used by the Linux kernel cf80211 wireless subsystem to + query and apply the regulatory domain settings wireless devices + may operate within for a given location. + + http://linuxwireless.org/en/developers/Regulatory/CRDA + +comment "crda needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/crda/crda.mk b/package/crda/crda.mk new file mode 100644 index 0000000000..44fd0f292d --- /dev/null +++ b/package/crda/crda.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# crda +# +################################################################################ + +CRDA_VERSION = 1.1.3 +CRDA_SOURCE = crda-$(CRDA_VERSION).tar.bz2 +CRDA_SITE = http://wireless.kernel.org/download/crda +CRDA_DEPENDENCIES = host-pkgconf host-python-m2crypto \ + libnl libgcrypt +CRDA_LICENSE = ISC +CRDA_LICENSE_FILES = LICENSE + +define CRDA_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) all_noverify -C $(@D) +endef + +define CRDA_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) install -C $(@D) DESTDIR=$(TARGET_DIR) +endef + +$(eval $(generic-package)) diff --git a/package/crosstool-ng/crosstool-ng-000-makefile-recursion.patch b/package/crosstool-ng/crosstool-ng-000-makefile-recursion.patch new file mode 100644 index 0000000000..b875e3f1a0 --- /dev/null +++ b/package/crosstool-ng/crosstool-ng-000-makefile-recursion.patch @@ -0,0 +1,38 @@ +Makefile: allow recursion + +When crosstool-NG is used standalone, we completely avoid recursion, +because the Makefile calls itself only once. + +But when used as the buildroot toolchain backend, there is already +one level of make recursion when we first call the crosstool-NG +Makefile. And when buildroot is used out-of-tree, we are already +at the second level of recursion when calling the crosstool-NG +Makefile. + +So, to cope with the situation, just get rid of the recursion test. + +This probably won't go upstream. + +Signed-off-by: "Yann E. MORIN" + +diff -du crosstool-ng-1.12.0/Makefile.in host-crosstool-ng-1.12.0/Makefile.in +--- crosstool-ng-1.12.0/Makefile.in 2011-08-01 01:21:34.000000000 +0200 ++++ host-crosstool-ng-1.12.0/Makefile.in 2011-08-07 21:39:16.055958219 +0200 +@@ -101,9 +101,14 @@ + # level. + # This has the side effect of only showing the real targets, and hiding our + # internal ones. :-) +-ifneq ($(MAKELEVEL),0) +-$(error Recursion detected, bailing out...) +-endif ++# ++# NB: For buildroot, this has no importance: ++# - crosstool-NG should never ever be called manually ++# - thus auto-completion would never ever be attempted ++# - so we shouldn't have to detect it ++#ifneq ($(MAKELEVEL),0) ++#$(error Recursion detected, bailing out...) ++#endif + + MAKEFLAGS += $(CT_MAKEFLAGS) + build install clean distclean uninstall: diff --git a/package/crosstool-ng/crosstool-ng.mk b/package/crosstool-ng/crosstool-ng.mk new file mode 100644 index 0000000000..8d98db4c18 --- /dev/null +++ b/package/crosstool-ng/crosstool-ng.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# crosstool-ng +# +################################################################################ + +CROSSTOOL_NG_VERSION = 1.18.0 +CROSSTOOL_NG_SOURCE = crosstool-ng-$(CROSSTOOL_NG_VERSION).tar.bz2 +CROSSTOOL_NG_SITE = http://crosstool-ng.org/download/crosstool-ng/ +CROSSTOOL_NG_INSTALL_TARGET = NO +CROSSTOOL_NG_MAKE = $(MAKE1) + +HOST_CROSSTOOL_NG_DEPENDENCIES = \ + host-gawk \ + host-automake host-gperf host-bison host-flex \ + host-texinfo + +$(eval $(host-autotools-package)) diff --git a/package/cryptodev-linux/cryptodev-linux.mk b/package/cryptodev-linux/cryptodev-linux.mk new file mode 100644 index 0000000000..7ec327e74e --- /dev/null +++ b/package/cryptodev-linux/cryptodev-linux.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# cryptodev-linux +# +################################################################################ + +CRYPTODEV_LINUX_VERSION = 1.6 +CRYPTODEV_LINUX_SITE = http://download.gna.org/cryptodev-linux +CRYPTODEV_LINUX_DEPENDENCIES = linux +CRYPTODEV_LINUX_INSTALL_STAGING = YES +CRYPTODEV_LICENSE = GPLv2+ +CRYPTODEV_LICENSE_FILES = COPYING + +define CRYPTODEV_LINUX_BUILD_CMDS + $(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) KERNEL_DIR=$(LINUX_DIR) +endef + +define CRYPTODEV_LINUX_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) KERNEL_DIR=$(LINUX_DIR) \ + PREFIX=$(TARGET_DIR) modules_install +endef + +define CRYPTODEV_LINUX_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 644 $(@D)/crypto/cryptodev.h \ + $(STAGING_DIR)/usr/include/crypto/cryptodev.h +endef + +$(eval $(generic-package)) diff --git a/package/cryptodev/Config.in b/package/cryptodev/Config.in new file mode 100644 index 0000000000..3f08e9e818 --- /dev/null +++ b/package/cryptodev/Config.in @@ -0,0 +1,37 @@ +config BR2_PACKAGE_CRYPTODEV + bool "cryptodev support" + depends on BR2_LINUX_KERNEL + help + Select the desired cryptodev implementation. + +if BR2_PACKAGE_CRYPTODEV + +choice + prompt "cryptodev variant" + default BR2_PACKAGE_CRYPTODEV_LINUX if !BR2_microblaze + help + Select the cryptodev implementation. + +config BR2_PACKAGE_CRYPTODEV_LINUX + bool "cryptodev-linux" + depends on !BR2_microblaze + help + Cryptodev-linux is a device that allows access to Linux kernel + cryptographic drivers; thus allowing userspace applications + to take advantage of hardware accelerators. + + http://cryptodev-linux.org/index.html + +config BR2_PACKAGE_OCF_LINUX + bool "ocf-linux" + help + OCF-Linux is a Linux port of the OpenBSD/FreeBSD Cryptographic + Framework (OCF). This port aims to bring full asynchronous HW/SW + crypto acceleration to the Linux kernel and applications + running under Linux. + + http://ocf-linux.sourceforge.net/ + +endchoice + +endif diff --git a/package/cryptodev/cryptodev.mk b/package/cryptodev/cryptodev.mk new file mode 100644 index 0000000000..ad5adf0cfb --- /dev/null +++ b/package/cryptodev/cryptodev.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# cryptodev +# +################################################################################ + +CRYPTODEV_SOURCE = + +ifeq ($(BR2_PACKAGE_CRYPTODEV_LINUX),y) +CRYPTODEV_DEPENDENCIES += cryptodev-linux +endif + +ifeq ($(BR2_PACKAGE_OCF_LINUX),y) +CRYPTODEV_DEPENDENCIES += ocf-linux +endif + +ifeq ($(CRYPTODEV_DEPENDENCIES),) +define CRYPTODEV_CONFIGURE_CMDS + echo "No CRYPTODEV implementation defined. Configuration error" + exit 1 +endef +endif + +$(eval $(generic-package)) diff --git a/package/cryptsetup/Config.in b/package/cryptsetup/Config.in new file mode 100644 index 0000000000..28073f41bc --- /dev/null +++ b/package/cryptsetup/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_CRYPTSETUP + bool "cryptsetup" + select BR2_PACKAGE_LIBGCRYPT + select BR2_PACKAGE_POPT + select BR2_PACKAGE_LVM2 + select BR2_PACKAGE_E2FSPROGS + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + depends on BR2_LARGEFILE # lvm2, util-linux + depends on BR2_USE_MMU # lvm2 + depends on BR2_USE_WCHAR # util-linux + help + This tool helps manipulate dm-crypt and luks partitions for + on-disk encryption. + + https://code.google.com/p/cryptsetup/ + +comment "cryptsetup needs a toolchain w/ largefile, wchar" + depends on BR2_USE_MMU + depends on !BR2_LARGEFILE || !BR2_USE_WCHAR diff --git a/package/cryptsetup/cryptsetup.mk b/package/cryptsetup/cryptsetup.mk new file mode 100644 index 0000000000..a65f841953 --- /dev/null +++ b/package/cryptsetup/cryptsetup.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# cryptsetup +# +################################################################################ + +CRYPTSETUP_VERSION = 1.6.2 +CRYPTSETUP_SOURCE = cryptsetup-$(CRYPTSETUP_VERSION).tar.bz2 +CRYPTSETUP_SITE = http://cryptsetup.googlecode.com/files +CRYPTSETUP_CONF_ENV += LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config +CRYPTSETUP_DEPENDENCIES = lvm2 popt e2fsprogs libgcrypt host-pkgconf \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) +CRYPTSETUP_LICENSE = GPLv2+ (programs), LGPLv2.1+ (library) +CRYPTSETUP_LICENSE_FILES = COPYING COPYING.LGPL + +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) +CRYPTSETUP_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -lintl" +endif + +$(eval $(autotools-package)) diff --git a/package/ctorrent/Config.in b/package/ctorrent/Config.in index 5e26c1276d..97552e7841 100644 --- a/package/ctorrent/Config.in +++ b/package/ctorrent/Config.in @@ -1,4 +1,4 @@ -comment "ctorrent requires a toolchain with C++ support enabled" +comment "ctorrent needs a toolchain w/ C++" depends on !BR2_INSTALL_LIBSTDCPP config BR2_PACKAGE_CTORRENT diff --git a/package/ctorrent/ctorrent.mk b/package/ctorrent/ctorrent.mk index aa22153155..de28dd7db4 100644 --- a/package/ctorrent/ctorrent.mk +++ b/package/ctorrent/ctorrent.mk @@ -1,17 +1,19 @@ -############################################################# +################################################################################ # -# enhanced ctorrent +# ctorrent # -############################################################# -CTORRENT_VERSION:=dnh3.3.2 -CTORRENT_SOURCE:=ctorrent-$(CTORRENT_VERSION).tar.gz -CTORRENT_SITE:=http://www.rahul.net/dholmes/ctorrent/ +################################################################################ + +CTORRENT_VERSION = dnh3.3.2 +CTORRENT_SITE = http://www.rahul.net/dholmes/ctorrent/ +CTORRENT_LICENSE = GPLv2 +CTORRENT_LICENSE_FILES = COPYING ifeq ($(BR2_PACKAGE_OPENSSL),y) -CTORRENT_CONF_OPT+=--with-ssl=yes -CTORRENT_DEPENDENCIES+=openssl +CTORRENT_CONF_OPT += --with-ssl=yes +CTORRENT_DEPENDENCIES += openssl else -CTORRENT_CONF_OPT+=--with-ssl=no +CTORRENT_CONF_OPT += --with-ssl=no endif -$(eval $(call AUTOTARGETS,package,ctorrent)) +$(eval $(autotools-package)) diff --git a/package/cups/Config.in b/package/cups/Config.in index 0176423a16..ea1f003e49 100644 --- a/package/cups/Config.in +++ b/package/cups/Config.in @@ -1,5 +1,7 @@ config BR2_PACKAGE_CUPS bool "cups" + # needs fork() + depends on BR2_USE_MMU help The Common Unix Printing System @@ -8,12 +10,12 @@ config BR2_PACKAGE_CUPS if BR2_PACKAGE_CUPS config BR2_PACKAGE_CUPS_PDFTOPS - bool "pdftops support" - depends on BR2_INSTALL_LIBSTDCPP - help - Enable pdftops support + bool "pdftops support" + depends on BR2_INSTALL_LIBSTDCPP + help + Enable pdftops support -comment "pdftops support requires a toolchain with C++ support enabled" +comment "pdftops support needs a toolchain w/ C++" depends on !BR2_INSTALL_LIBSTDCPP endif diff --git a/package/cups/cups-no-tests-man.patch b/package/cups/cups-no-tests-man.patch deleted file mode 100644 index 567c801c64..0000000000 --- a/package/cups/cups-no-tests-man.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- cups-1.3.5/Makefile 2007-12-06 15:09:39.000000000 -0500 -+++ cups-1.3.5/Makefile 2008-02-09 21:53:03.000000000 -0500 -@@ -19,8 +19,8 @@ include Makedefs - # Directories to make... - # - --DIRS = cups backend berkeley cgi-bin filter locale man monitor \ -- notifier $(PDFTOPS) scheduler systemv test \ -+DIRS = cups backend berkeley cgi-bin filter locale monitor \ -+ notifier $(PDFTOPS) scheduler systemv \ - $(PHPDIR) \ - conf data doc $(FONTS) ppd templates - diff --git a/package/cups/cups.mk b/package/cups/cups.mk index 169cdb3341..8a761a32a9 100644 --- a/package/cups/cups.mk +++ b/package/cups/cups.mk @@ -3,13 +3,26 @@ # cups # ################################################################################ -CUPS_VERSION = 1.3.9 -CUPS_NAME = cups-$(CUPS_VERSION) -CUPS_DIR = $(BUILD_DIR)/$(CUPS_NAME) -CUPS_SITE = http://ftp.easysw.com/pub/cups/$(CUPS_VERSION) -CUPS_SOURCE:=$(CUPS_NAME)-source.tar.bz2 -CUPS_DESTDIR = $(STAGING_DIR)/usr/lib -CUPS_CAT:=$(BZCAT) + +CUPS_VERSION = 1.3.11 +CUPS_SOURCE = cups-$(CUPS_VERSION)-source.tar.bz2 +CUPS_SITE = http://www.cups.org/software/$(CUPS_VERSION) +CUPS_LICENSE = GPLv2 LGPLv2 +CUPS_LICENSE_FILES = LICENSE.txt +CUPS_INSTALL_STAGING = YES +CUPS_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) DSTROOT=$(STAGING_DIR) install +CUPS_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) DSTROOT=$(TARGET_DIR) install +CUPS_CONF_OPT = --without-perl \ + --without-java \ + --disable-gnutls \ + --disable-gssapi \ + --libdir=/usr/lib +CUPS_CONFIG_SCRIPTS = cups-config + +CUPS_DEPENDENCIES = $(if $(BR2_PACKAGE_ZLIB),zlib) \ + $(if $(BR2_PACKAGE_LIBPNG),libpng) \ + $(if $(BR2_PACKAGE_JPEG),jpeg) \ + $(if $(BR2_PACKAGE_TIFF),tiff) ifeq ($(BR2_PACKAGE_DBUS),y) CUPS_CONF_OPT += --enable-dbus @@ -22,40 +35,19 @@ ifeq ($(BR2_PACKAGE_XORG7),y) CUPS_DEPENDENCIES += xlib_libX11 endif -CUPS_CONF_OPT += --disable-perl -CUPS_CONF_OPT += --disable-java -CUPS_CFLAGS = $(TARGET_CFLAGS) - - -ifeq ($(BR2_PACKAGE_PERL),disabled) # We do not provide perl (yet) - CUPS_CONF_ENV += ac_cv_path_perl=$(STAGING_DIR)/usr/bin/perl - CUPS_CONF_OPT += --with-perl - CUPS_DEPENDENCIES += microperl -else - CUPS_CONF_OPT += --disable-perl -endif - ifeq ($(BR2_PACKAGE_PHP),y) - CUPS_CFLAGS += -I$(STAGING_DIR)/usr/include/php - CUPS_CFLAGS += -I$(STAGING_DIR)/usr/include/php/main - CUPS_CFLAGS += -I$(STAGING_DIR)/usr/include/php/regex - CUPS_CFLAGS += -I$(STAGING_DIR)/usr/include/php/TSRM - CUPS_CFLAGS += -I$(STAGING_DIR)/usr/include/php/Zend - CUPS_CFLAGS += -I$(STAGING_DIR)/usr/include/php/ext - CUPS_CONF_ENV += ac_cv_path_php=$(STAGING_DIR)/usr/bin/php - CUPS_CONF_OPT += --with-php - CUPS_DEPENDENCIES += php + CUPS_CONF_ENV += ac_cv_path_PHPCONFIG=$(STAGING_DIR)/usr/bin/php-config + CUPS_CONF_OPT += --with-php + CUPS_DEPENDENCIES += php else - CUPS_CONF_OPT += --disable-php + CUPS_CONF_OPT += --without-php endif ifeq ($(BR2_PACKAGE_PYTHON),y) - CUPS_CFLAGS += -I$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) - CUPS_CONF_ENV += ac_cv_path_python=$(STAGING_DIR)/usr/bin/python - CUPS_CONF_OPT += --with-python - CUPS_DEPENDENCIES += python + CUPS_CONF_OPT += --with-python + CUPS_DEPENDENCIES += python else - CUPS_CONF_OPT += --disable-python + CUPS_CONF_OPT += --without-python endif ifeq ($(BR2_PACKAGE_CUPS_PDFTOPS),y) @@ -64,68 +56,12 @@ else CUPS_CONF_OPT += --disable-pdftops endif -$(DL_DIR)/$(CUPS_SOURCE): - $(call DOWNLOAD,$(CUPS_SITE),$(CUPS_SOURCE)) - -$(CUPS_DIR)/.unpacked: $(DL_DIR)/$(CUPS_SOURCE) - $(CUPS_CAT) $(DL_DIR)/$(CUPS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - toolchain/patch-kernel.sh $(CUPS_DIR) package/cups/ \*.patch - $(CONFIG_UPDATE) $(CUPS_DIR) - touch $@ - -$(CUPS_DIR)/.configured: $(CUPS_DIR)/.unpacked - cd $(CUPS_DIR) && $(AUTOCONF) - (cd $(CUPS_DIR) && \ - $(TARGET_CONFIGURE_OPTS) \ - $(TARGET_CONFIGURE_ARGS) \ - $(CUPS_CONF_ENV) \ - CFLAGS="$(CUPS_CFLAGS)" \ - ./configure $(QUIET) \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --with-config-file-path=/etc \ - --disable-gnutls \ - --disable-gssapi \ - $(CUPS_CONF_OPT) \ - ) - touch $@ - -$(CUPS_DIR)/.compiled: $(CUPS_DIR)/.configured - $(MAKE) CFLAGS="$(CUPS_CFLAGS)" -C $(CUPS_DIR) cups backend berkeley cgi-bin filter \ - locale monitor notifier pdftops scheduler systemv scripting/php \ - conf data doc fonts ppd templates - touch $@ - -$(CUPS_DIR)/.installed: $(CUPS_DIR)/.compiled - $(MAKE) -C $(CUPS_DIR) DESTDIR=$(STAGING_DIR) DSTROOT=$(STAGING_DIR) install - $(MAKE) -C $(CUPS_DIR) DESTDIR=$(TARGET_DIR) DSTROOT=$(TARGET_DIR) install - $(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g" $(STAGING_DIR)/usr/bin/cups-config - $(SED) "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" $(STAGING_DIR)/usr/bin/cups-config - $(SED) "s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include\',g" $(STAGING_DIR)/usr/bin/cups-config - $(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/bin/cups-config - touch $@ - -cups: host-autoconf $(CUPS_DEPENDENCIES) $(CUPS_DIR)/.installed - -cups-source: $(DL_DIR)/$(CUPS_SOURCE) +# standard autoreconf fails with autoheader failures +define CUPS_FIXUP_AUTOCONF + cd $(@D) && $(AUTOCONF) +endef +CUPS_DEPENDENCIES += host-autoconf -cups-clean: - -$(MAKE) -C $(CUPS_DIR) clean - -cups-dirclean: - rm -fr $(CUPS_DIR) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_CUPS),y) -TARGETS+=cups -endif +CUPS_PRE_CONFIGURE_HOOKS += CUPS_FIXUP_AUTOCONF +$(eval $(autotools-package)) diff --git a/package/curlftpfs/Config.in b/package/curlftpfs/Config.in new file mode 100644 index 0000000000..ec40f3da0c --- /dev/null +++ b/package/curlftpfs/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_CURLFTPFS + bool "curlftpfs (FUSE)" + select BR2_PACKAGE_LIBFUSE + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_LIBCURL + depends on BR2_LARGEFILE + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libfuse, glib2 + depends on BR2_USE_MMU # libfuse, glib2 + depends on !BR2_PREFER_STATIC_LIB # libfuse + help + CurlFtpFS is a filesystem for accessing FTP hosts based on FUSE + and libcurl. + + http://curlftpfs.sourceforge.net/ + +comment "curlftpfs needs a toolchain w/ largefile, wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_LARGEFILE || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_PREFER_STATIC_LIB diff --git a/package/curlftpfs/curlftpfs-000-fix-CURLOPT_INFILESIZE.patch b/package/curlftpfs/curlftpfs-000-fix-CURLOPT_INFILESIZE.patch new file mode 100644 index 0000000000..dc83af010b --- /dev/null +++ b/package/curlftpfs/curlftpfs-000-fix-CURLOPT_INFILESIZE.patch @@ -0,0 +1,13 @@ +Borrowed from the curlftpfs_0.9.2-5 Debian package. + +CURLOPT_INFILESIZE does not support -1 arg. This fix bug #556012. +--- curlftpfs-0.9.2/ftpfs.c.old 2009-12-13 14:12:25.000000000 +0100 ++++ curlftpfs-0.9.2/ftpfs.c 2009-12-13 14:12:32.000000000 +0100 +@@ -503,7 +503,6 @@ + + curl_easy_setopt_or_die(fh->write_conn, CURLOPT_URL, fh->full_path); + curl_easy_setopt_or_die(fh->write_conn, CURLOPT_UPLOAD, 1); +- curl_easy_setopt_or_die(fh->write_conn, CURLOPT_INFILESIZE, -1); + curl_easy_setopt_or_die(fh->write_conn, CURLOPT_READFUNCTION, write_data_bg); + curl_easy_setopt_or_die(fh->write_conn, CURLOPT_READDATA, fh); + curl_easy_setopt_or_die(fh->write_conn, CURLOPT_LOW_SPEED_LIMIT, 1); diff --git a/package/curlftpfs/curlftpfs-001-free_ftpfs_file-memleak-fix.patch b/package/curlftpfs/curlftpfs-001-free_ftpfs_file-memleak-fix.patch new file mode 100644 index 0000000000..4966c9dcfb --- /dev/null +++ b/package/curlftpfs/curlftpfs-001-free_ftpfs_file-memleak-fix.patch @@ -0,0 +1,14 @@ +Borrowed from the curlftpfs_0.9.2-5 Debian package. + +Fix a memory leak. See Bug #587250. +--- a/ftpfs.c 2008-04-30 01:05:47.000000000 +0200 ++++ a/ftpfs.c.slesimple 2010-01-01 22:12:10.000000000 +0100 +@@ -615,6 +615,8 @@ static void free_ftpfs_file(struct ftpfs + sem_destroy(&fh->data_need); + sem_destroy(&fh->data_written); + sem_destroy(&fh->ready); ++ if (fh->buf.size) { buf_free(&fh->buf); } ++ if (fh->stream_buf.size) { buf_free(&fh->stream_buf); } + free(fh); + } + diff --git a/package/curlftpfs/curlftpfs-002-nocache-memleak-fix.patch b/package/curlftpfs/curlftpfs-002-nocache-memleak-fix.patch new file mode 100644 index 0000000000..00a4dd64fd --- /dev/null +++ b/package/curlftpfs/curlftpfs-002-nocache-memleak-fix.patch @@ -0,0 +1,59 @@ +Borrowed from the curlftpfs_0.9.2-5 Debian package. + +Fix a memory leak when cache is disabled. Closes: #614347. +diff -ur curlftpfs-0.9.2/cache.c curlftpfs-0.9.2-olexat/cache.c +--- curlftpfs-0.9.2/cache.c 2008-04-30 01:03:09.000000000 +0200 ++++ curlftpfs-0.9.2-olexat/cache.c 2011-02-04 16:43:05.000000000 +0100 +@@ -25,7 +25,7 @@ + time_t last_cleaned; + }; + +-static struct cache cache; ++struct cache cache; + + struct node { + struct stat stat; +diff -ur curlftpfs-0.9.2/ftpfs-ls.c curlftpfs-0.9.2-olexat/ftpfs-ls.c +--- curlftpfs-0.9.2/ftpfs-ls.c 2008-04-23 12:55:41.000000000 +0200 ++++ curlftpfs-0.9.2-olexat/ftpfs-ls.c 2011-02-07 17:23:37.000000000 +0100 +@@ -25,6 +25,13 @@ + #include "charset_utils.h" + #include "ftpfs-ls.h" + ++struct cache { ++ int on; ++ char incomplete[]; ++}; ++ ++extern struct cache cache; ++ + static int parse_dir_unix(const char *line, + struct stat *sbuf, + char *file, +@@ -243,8 +256,10 @@ + reallink = g_strdup(link); + } + int linksize = strlen(reallink); +- cache_add_link(full_path, reallink, linksize+1); +- DEBUG(1, "cache_add_link: %s %s\n", full_path, reallink); ++ if (cache.on) { ++ cache_add_link(full_path, reallink, linksize+1); ++ DEBUG(1, "cache_add_link: %s %s\n", full_path, reallink); ++ } + if (linkbuf && linklen) { + if (linksize > linklen) linksize = linklen - 1; + strncpy(linkbuf, reallink, linksize); +@@ -257,8 +272,10 @@ + DEBUG(1, "filler: %s\n", file); + filler(h, file, &stat_buf); + } else { +- DEBUG(1, "cache_add_attr: %s\n", full_path); +- cache_add_attr(full_path, &stat_buf); ++ if (cache.on) { ++ DEBUG(1, "cache_add_attr: %s\n", full_path); ++ cache_add_attr(full_path, &stat_buf); ++ } + } + + DEBUG(2, "comparing %s %s\n", name, file); + diff --git a/package/curlftpfs/curlftpfs.mk b/package/curlftpfs/curlftpfs.mk new file mode 100644 index 0000000000..8ec3e4c536 --- /dev/null +++ b/package/curlftpfs/curlftpfs.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# curlftpfs +# +################################################################################ + +CURLFTPFS_VERSION = 0.9.2 +CURLFTPFS_SITE = http://downloads.sourceforge.net/project/curlftpfs/curlftpfs/$(CURLFTPFS_VERSION) +CURLFTPFS_CONF_ENV = ac_cv_path__libcurl_config=$(STAGING_DIR)/usr/bin/curl-config +CURLFTPFS_LICENSE = GPLv2 +CURLFTPFS_LICENSE_FILES = COPYING +CURLFTPFS_DEPENDENCIES = \ + libglib2 libfuse openssl libcurl \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \ + $(if $(BR2_ENABLE_LOCALE),,libiconv) + +$(eval $(autotools-package)) diff --git a/package/customize/Config.in b/package/customize/Config.in deleted file mode 100644 index 97f864668e..0000000000 --- a/package/customize/Config.in +++ /dev/null @@ -1,6 +0,0 @@ -config BR2_PACKAGE_CUSTOMIZE - bool "customize" - help - Add custom stuff to your buildroot. - - (edit package/customize/customize.mk) diff --git a/package/customize/customize.mk b/package/customize/customize.mk deleted file mode 100644 index d2b8518725..0000000000 --- a/package/customize/customize.mk +++ /dev/null @@ -1,32 +0,0 @@ -############################################################# -# -# Any custom stuff you feel like doing.... -# -############################################################# -CUST_DIR:=package/customize/source - -$(BUILD_DIR)/.customize: - rm -f $(BUILD_DIR)/series - (cd $(CUST_DIR); \ - /bin/ls -d * > $(BUILD_DIR)/series || \ - touch $(BUILD_DIR)/series ) - for f in `cat $(BUILD_DIR)/series`; do \ - cp -af $(CUST_DIR)/$$f $(TARGET_DIR); \ - done - rm -f $(BUILD_DIR)/series - touch $@ - -customize: $(BUILD_DIR)/.customize - -customize-clean: - rm -f $(BUILD_DIR)/.customize - -.PHONY: customize -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_CUSTOMIZE),y) -TARGETS+=customize -endif diff --git a/package/cvs/Config.in b/package/cvs/Config.in index 2e61834c81..6a8b037a29 100644 --- a/package/cvs/Config.in +++ b/package/cvs/Config.in @@ -1,6 +1,8 @@ config BR2_PACKAGE_CVS bool "cvs" depends on BR2_USE_WCHAR + # needs fork() + depends on BR2_USE_MMU select BR2_PACKAGE_NCURSES help Concurrent Versions System - source code revision control tools. @@ -12,3 +14,7 @@ config BR2_PACKAGE_CVS_SERVER depends on BR2_PACKAGE_CVS help Enable cvs server code + +comment "cvs needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR diff --git a/package/cvs/cvs.mk b/package/cvs/cvs.mk index 023e93bafa..d2a1033ab3 100644 --- a/package/cvs/cvs.mk +++ b/package/cvs/cvs.mk @@ -1,8 +1,9 @@ -############################################################# +################################################################################ # # cvs # -############################################################# +################################################################################ + CVS_VERSION = 1.12.13 CVS_SOURCE = cvs_$(CVS_VERSION).orig.tar.gz CVS_PATCH = cvs_$(CVS_VERSION)-12.diff.gz @@ -11,14 +12,14 @@ CVS_DEPENDENCIES = ncurses CVS_CONF_ENV = cvs_cv_func_printf_ptr=yes -CVS_CONFIGURE_ARGS=--disable-old-info-format-support +CVS_CONFIGURE_ARGS = --disable-old-info-format-support ifeq ($(BR2_PACKAGE_CVS_SERVER),y) -CVS_CONFIGURE_ARGS+=--enable-server +CVS_CONFIGURE_ARGS += --enable-server else -CVS_CONFIGURE_ARGS+=--disable-server +CVS_CONFIGURE_ARGS += --disable-server endif ifeq ($(BR2_PACKAGE_ZLIB),y) -CVS_CONFIGURE_ARGS+=--with-external-zlib +CVS_CONFIGURE_ARGS += --with-external-zlib endif CVS_CONF_OPT = $(CVS_CONFIGURE_ARGS) @@ -37,7 +38,7 @@ define CVS_DEBIAN_PATCHES do $(SED) 's,^\+\+\+ .*cvs-$(CVS_VERSION)/,+++ cvs-$(CVS_VERSION)/,' $$i; \ done; \ ); \ - toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches \*; \ + support/scripts/apply-patches.sh $(@D) $(@D)/debian/patches \*; \ fi endef endif @@ -48,6 +49,4 @@ define CVS_INSTALL_TARGET_CMDS install -D $(@D)/src/cvs $(TARGET_DIR)/usr/bin/cvs endef -$(eval $(call AUTOTARGETS,package,cvs)) - - +$(eval $(autotools-package)) diff --git a/package/czmq/Config.in b/package/czmq/Config.in new file mode 100644 index 0000000000..29333680fd --- /dev/null +++ b/package/czmq/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_CZMQ + bool "czmq" + select BR2_PACKAGE_ZEROMQ + depends on BR2_INSTALL_LIBSTDCPP # zeromq + depends on BR2_INET_IPV6 # zeromq + depends on BR2_LARGEFILE # util-linux + depends on BR2_USE_WCHAR # util-linux + depends on BR2_TOOLCHAIN_HAS_THREADS # zeromq + # uClibc toolchains provided by ADI don't have AI_ADDRCONFIG + # support + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 && \ + !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1 + help + High-level C Binding for 0MQ + + http://czmq.zeromq.org/ + +comment "czmq needs a toolchain w/ C++, IPv6, largefile, wchar, threads" + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 && \ + !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1 + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_INET_IPV6 && BR2_LARGEFILE \ + && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/czmq/czmq.mk b/package/czmq/czmq.mk new file mode 100644 index 0000000000..da68790e83 --- /dev/null +++ b/package/czmq/czmq.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# czmq +# +################################################################################ + +CZMQ_VERSION = cb9839cf90e4ac69acb7c6ff2b4e2d42d704cf6e +CZMQ_SITE = git://github.com/zeromq/czmq.git + +# Autoreconf required as we use the git tree +CZMQ_AUTORECONF = YES +CZMQ_INSTALL_STAGING = YES +CZMQ_DEPENDENCIES = zeromq +CZMQ_LICENSE = LGPLv3+ with exceptions +CZMQ_LICENSE_FILES = COPYING COPYING.LESSER + +# asciidoc is a python script that imports unicodedata, which is not in +# host-python, so disable asciidoc entirely. +CZMQ_CONF_ENV = ac_cv_prog_czmq_have_asciidoc=no + +define CZMQ_CREATE_CONFIG_DIR + mkdir -p $(@D)/config +endef + +CZMQ_POST_PATCH_HOOKS += CZMQ_CREATE_CONFIG_DIR + +$(eval $(autotools-package)) diff --git a/package/dash/Config.in b/package/dash/Config.in index 20970aa03b..e06087e117 100644 --- a/package/dash/Config.in +++ b/package/dash/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_DASH bool "dash" + depends on BR2_USE_MMU # fork() help The Debian/Linux port of the NetBSD version of ash (the Almquist SHell). diff --git a/package/dash/dash-0.5.5.1-no-config.h-for-helpers.patch b/package/dash/dash-0.5.7-no-config.h-for-helpers.patch similarity index 100% rename from package/dash/dash-0.5.5.1-no-config.h-for-helpers.patch rename to package/dash/dash-0.5.7-no-config.h-for-helpers.patch diff --git a/package/dash/dash.mk b/package/dash/dash.mk index e5da642dd6..970286dc7b 100644 --- a/package/dash/dash.mk +++ b/package/dash/dash.mk @@ -1,12 +1,15 @@ -############################################################# +################################################################################ # # dash # -############################################################# -DASH_VERSION:=0.5.5.1 -DASH_SOURCE:=dash_$(DASH_VERSION).orig.tar.gz -DASH_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/d/dash -DASH_PATCH:=dash_$(DASH_VERSION)-6.diff.gz +################################################################################ + +DASH_VERSION = 0.5.7 +DASH_SOURCE = dash_$(DASH_VERSION).orig.tar.gz +DASH_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/d/dash +DASH_PATCH = dash_$(DASH_VERSION)-3.diff.gz +DASH_LICENSE = BSD-3c, GPLv2+ (mksignames.c) +DASH_LICENSE_FILES = COPYING define DASH_INSTALL_TARGET_CMDS cp -a $(@D)/src/dash $(TARGET_DIR)/bin/dash @@ -17,4 +20,4 @@ define DASH_CLEAN_CMDS rm -f $(TARGET_DIR)/bin/dash endef -$(eval $(call AUTOTARGETS,package,dash)) +$(eval $(autotools-package)) diff --git a/package/dbus-glib/Config.in b/package/dbus-glib/Config.in index c019be73b2..7fe0ac6606 100644 --- a/package/dbus-glib/Config.in +++ b/package/dbus-glib/Config.in @@ -1,16 +1,16 @@ config BR2_PACKAGE_DBUS_GLIB bool "dbus-glib" depends on BR2_PACKAGE_DBUS - depends on BR2_DBUS_EXPAT depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 select BR2_PACKAGE_LIBGLIB2 help GLib bindings for D-Bus. http://www.freedesktop.org/software/dbus -comment "dbus-glib needs dbus to be compiled with expat support" - depends on BR2_PACKAGE_DBUS && !BR2_DBUS_EXPAT - -comment "dbus-glib requires a toolchain with WCHAR support" - depends on BR2_PACKAGE_DBUS && !BR2_USE_WCHAR +comment "dbus-glib needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_DBUS + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/dbus-glib/dbus-1-glib-fix-marshalling-regression.patch b/package/dbus-glib/dbus-1-glib-fix-marshalling-regression.patch deleted file mode 100644 index c07f5ac51b..0000000000 --- a/package/dbus-glib/dbus-1-glib-fix-marshalling-regression.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/dbus/dbus-gobject.c b/dbus/dbus-gobject.c -index 3b0bd17..7ee0b4f 100644 ---- a/dbus/dbus-gobject.c -+++ b/dbus/dbus-gobject.c -@@ -3049,16 +3049,16 @@ out: - const char * - _dbus_gobject_get_path (GObject *obj) - { -- GSList *registrations; -+ ObjectExport *oe; - ObjectRegistration *o; - -- registrations = g_object_get_data (obj, "dbus_glib_object_registrations"); -+ oe = g_object_get_data (obj, "dbus_glib_object_registrations"); - -- if (registrations == NULL) -+ if (oe == NULL || oe->registrations == NULL) - return NULL; - - /* First one to have been registered wins */ -- o = registrations->data; -+ o = oe->registrations->data; - - return o->object_path; - } --- -cgit v0.8.3-6-g21f6 diff --git a/package/dbus-glib/dbus-glib.mk b/package/dbus-glib/dbus-glib.mk index d3cfa96c99..ca1df22f41 100644 --- a/package/dbus-glib/dbus-glib.mk +++ b/package/dbus-glib/dbus-glib.mk @@ -1,20 +1,18 @@ -############################################################# +################################################################################ # # dbus-glib # -############################################################# -DBUS_GLIB_VERSION = 0.94 -DBUS_GLIB_SOURCE = dbus-glib-$(DBUS_GLIB_VERSION).tar.gz +################################################################################ + +DBUS_GLIB_VERSION = 0.98 DBUS_GLIB_SITE = http://dbus.freedesktop.org/releases/dbus-glib/ DBUS_GLIB_INSTALL_STAGING = YES -DBUS_GLIB_INSTALL_TARGET = YES DBUS_GLIB_CONF_ENV = ac_cv_have_abstract_sockets=yes \ ac_cv_func_posix_getpwnam_r=yes \ have_abstract_sockets=yes DBUS_GLIB_CONF_OPT = --localstatedir=/var \ - --program-prefix="" \ --disable-tests \ --disable-xml-docs \ --with-introspect-xml=$(DBUS_HOST_INTROSPECT) \ @@ -23,7 +21,7 @@ DBUS_GLIB_CONF_OPT = --localstatedir=/var \ --disable-doxygen-docs \ --enable-asserts=yes -DBUS_GLIB_DEPENDENCIES = host-pkg-config dbus host-dbus host-dbus-glib libglib2 expat +DBUS_GLIB_DEPENDENCIES = host-pkgconf dbus host-dbus host-dbus-glib libglib2 expat HOST_DBUS_GLIB_DEPENDENCIES = host-dbus host-expat host-libglib2 @@ -34,8 +32,8 @@ HOST_DBUS_GLIB_CONF_OPT = \ --disable-doxygen-docs \ --enable-asserts=yes -$(eval $(call AUTOTARGETS,package,dbus-glib)) -$(eval $(call AUTOTARGETS,package,dbus-glib,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) # dbus-glib for the host -DBUS_GLIB_HOST_BINARY:=$(HOST_DIR)/usr/bin/dbus-binding-tool +DBUS_GLIB_HOST_BINARY = $(HOST_DIR)/usr/bin/dbus-binding-tool diff --git a/package/dbus-python/Config.in b/package/dbus-python/Config.in index 91c127d05f..a38d27794a 100644 --- a/package/dbus-python/Config.in +++ b/package/dbus-python/Config.in @@ -1,13 +1,17 @@ config BR2_PACKAGE_DBUS_PYTHON bool "dbus-python" depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 depends on BR2_PACKAGE_DBUS depends on BR2_PACKAGE_PYTHON select BR2_PACKAGE_DBUS_GLIB + # pyexpat: runtime dependency only + select BR2_PACKAGE_PYTHON_PYEXPAT help Python bindings for D-Bus http://dbus.freedesktop.org/doc/dbus-python/ -comment "dbus-python requires a toolchain with WCHAR support" - depends on BR2_PACKAGE_DBUS && BR2_PACKAGE_PYTHON && !BR2_USE_WCHAR +comment "dbus-python needs a toolchain w/ wchar, threads" + depends on BR2_PACKAGE_DBUS && BR2_PACKAGE_PYTHON + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/dbus-python/dbus-python.mk b/package/dbus-python/dbus-python.mk index b2e9f56ecd..7c59cebbc9 100644 --- a/package/dbus-python/dbus-python.mk +++ b/package/dbus-python/dbus-python.mk @@ -1,13 +1,12 @@ -############################################################# +################################################################################ # # dbus-python # -############################################################# +################################################################################ + DBUS_PYTHON_VERSION = 0.83.0 -DBUS_PYTHON_SOURCE = dbus-python-$(DBUS_PYTHON_VERSION).tar.gz DBUS_PYTHON_SITE = http://dbus.freedesktop.org/releases/dbus-python/ DBUS_PYTHON_INSTALL_STAGING = YES -DBUS_PYTHON_INSTALL_TARGET = YES DBUS_PYTHON_CONF_ENV = am_cv_pathless_PYTHON=python \ ac_cv_path_PYTHON=$(HOST_DIR)/usr/bin/python \ @@ -21,4 +20,4 @@ DBUS_PYTHON_CONF_OPT = --disable-html-docs --disable-api-docs DBUS_PYTHON_DEPENDENCIES = dbus-glib python host-python -$(eval $(call AUTOTARGETS,package,dbus-python)) +$(eval $(autotools-package)) diff --git a/package/dbus/Config.in b/package/dbus/Config.in index c625382b8a..9c9e3f8b27 100644 --- a/package/dbus/Config.in +++ b/package/dbus/Config.in @@ -1,18 +1,16 @@ config BR2_PACKAGE_DBUS bool "dbus" - depends on BR2_PACKAGE_EXPAT || BR2_PACKAGE_LIBXML2 + depends on BR2_TOOLCHAIN_HAS_THREADS + # uses fork() + depends on BR2_USE_MMU help The D-Bus message bus system. http://www.freedesktop.org/wiki/Software/dbus -comment "dbus not available (need expat or libxml2)" - depends on !BR2_PACKAGE_EXPAT && !BR2_PACKAGE_LIBXML2 - choice prompt "XML library to use" depends on BR2_PACKAGE_DBUS - default BR2_DBUS_LIBXML2 if (BR2_PACKAGE_LIBXML2 && !BR2_PACKAGE_EXPAT) default BR2_DBUS_EXPAT help Select the XML library to use with D-Bus. Select Expat @@ -21,10 +19,14 @@ choice config BR2_DBUS_EXPAT bool "Expat" - depends on BR2_PACKAGE_EXPAT + select BR2_PACKAGE_EXPAT config BR2_DBUS_LIBXML2 bool "libxml2" - depends on BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_LIBXML2 endchoice + +comment "dbus needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/dbus/S30dbus b/package/dbus/S30dbus index d764e2969b..0d15c73043 100755 --- a/package/dbus/S30dbus +++ b/package/dbus/S30dbus @@ -72,7 +72,7 @@ case "$1" in RETVAL=$? ;; *) - echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}" + echo "Usage: $0 {start|stop|status|restart|condrestart|reload}" ;; esac exit $RETVAL diff --git a/package/dbus/dbus.mk b/package/dbus/dbus.mk index 7c2bdddb86..560f63e8dd 100644 --- a/package/dbus/dbus.mk +++ b/package/dbus/dbus.mk @@ -1,19 +1,23 @@ -############################################################# +################################################################################ # # dbus # -############################################################# -DBUS_VERSION = 1.4.10 -DBUS_SOURCE = dbus-$(DBUS_VERSION).tar.gz -DBUS_SITE = http://dbus.freedesktop.org/releases/dbus/ +################################################################################ + +DBUS_VERSION = 1.4.26 +DBUS_SITE = http://dbus.freedesktop.org/releases/dbus +DBUS_LICENSE = AFLv2.1 GPLv2+ +DBUS_LICENSE_FILES = COPYING DBUS_INSTALL_STAGING = YES -DBUS_INSTALL_TARGET = YES -DBUS_DEPENDENCIES = host-pkg-config +define DBUS_PERMISSIONS +/usr/libexec/dbus-daemon-launch-helper f 4755 0 0 - - - - - +endef + +DBUS_DEPENDENCIES = host-pkgconf DBUS_CONF_ENV = ac_cv_have_abstract_sockets=yes -DBUS_CONF_OPT = --program-prefix="" \ - --with-dbus-user=dbus \ +DBUS_CONF_OPT = --with-dbus-user=dbus \ --disable-tests \ --disable-asserts \ --enable-abstract-sockets \ @@ -21,11 +25,20 @@ DBUS_CONF_OPT = --program-prefix="" \ --disable-xml-docs \ --disable-doxygen-docs \ --disable-static \ - --enable-dnotify \ + --disable-dnotify \ --localstatedir=/var \ --with-system-socket=/var/run/dbus/system_bus_socket \ --with-system-pid-file=/var/run/messagebus.pid +ifeq ($(BR2_PREFER_STATIC_LIB),y) +DBUS_CONF_OPT += LIBS='-lpthread' +endif + +ifeq ($(BR2_microblaze),y) +# microblaze toolchain doesn't provide inotify_rm_* but does have sys/inotify.h +DBUS_CONF_OPT += --disable-inotify +endif + ifeq ($(BR2_DBUS_EXPAT),y) DBUS_CONF_OPT += --with-xml=expat DBUS_DEPENDENCIES += expat @@ -41,6 +54,10 @@ else DBUS_CONF_OPT += --without-x endif +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +DBUS_CONF_OPT += --with-systemdsystemunitdir=/lib/systemd/system +endif + # fix rebuild (dbus makefile errors out if /var/lib/dbus is a symlink) define DBUS_REMOVE_VAR_LIB_DBUS rm -rf $(TARGET_DIR)/var/lib/dbus @@ -52,19 +69,22 @@ define DBUS_REMOVE_DEVFILES rm -rf $(TARGET_DIR)/usr/lib/dbus-1.0 endef -ifneq ($(BR2_HAVE_DEVFILES),y) DBUS_POST_INSTALL_TARGET_HOOKS += DBUS_REMOVE_DEVFILES -endif define DBUS_INSTALL_TARGET_FIXUP + mkdir -p $(TARGET_DIR)/var/lib rm -rf $(TARGET_DIR)/var/lib/dbus ln -sf /tmp/dbus $(TARGET_DIR)/var/lib/dbus - $(INSTALL) -m 0755 -D package/dbus/S30dbus $(TARGET_DIR)/etc/init.d/S30dbus endef DBUS_POST_INSTALL_TARGET_HOOKS += DBUS_INSTALL_TARGET_FIXUP -HOST_DBUS_DEPENDENCIES = host-pkg-config host-expat +define DBUS_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/dbus/S30dbus \ + $(TARGET_DIR)/etc/init.d/S30dbus +endef + +HOST_DBUS_DEPENDENCIES = host-pkgconf host-expat HOST_DBUS_CONF_OPT = \ --with-dbus-user=dbus \ --disable-tests \ @@ -86,5 +106,5 @@ HOST_DBUS_GEN_INTROSPECT = \ HOST_DBUS_POST_INSTALL_HOOKS += HOST_DBUS_GEN_INTROSPECT -$(eval $(call AUTOTARGETS,package,dbus)) -$(eval $(call AUTOTARGETS,package,dbus,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/devmem2/Config.in b/package/devmem2/Config.in index 233b4b0e32..cb00a51632 100644 --- a/package/devmem2/Config.in +++ b/package/devmem2/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_DEVMEM2 bool "devmem2" - depends on BR2_DEPRECATED help Simple program to read/write from/to any location in memory. diff --git a/package/devmem2/devmem2.mk b/package/devmem2/devmem2.mk index 457a181020..3e55d6960d 100644 --- a/package/devmem2/devmem2.mk +++ b/package/devmem2/devmem2.mk @@ -1,42 +1,31 @@ -############################################################# +################################################################################ # # devmem2 # -############################################################# +################################################################################ -DEVMEM2_SOURCE:=devmem2.c -DEVMEM2_SITE:=http://free-electrons.com/pub/mirror -DEVMEM2_BINARY:=devmem2 -DEVMEM2_DIR:=$(BUILD_DIR)/devmem2 +DEVMEM2_SITE = http://free-electrons.com/pub/mirror +DEVMEM2_SOURCE = devmem2.c +DEVMEM2_VERSION = 1 -$(DL_DIR)/$(DEVMEM2_SOURCE): - $(call DOWNLOAD,$(DEVMEM2_SITE),$(DEVMEM2_SOURCE)) +define DEVMEM2_EXTRACT_CMDS + cp $(DL_DIR)/$($(PKG)_SOURCE) $(@D)/ +endef -$(DEVMEM2_DIR)/$(DEVMEM2_SOURCE): $(DL_DIR)/$(DEVMEM2_SOURCE) - mkdir -p $(@D) - cp $^ $@ +define DEVMEM2_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) devmem2 +endef -$(DEVMEM2_DIR)/$(DEVMEM2_BINARY): $(DEVMEM2_DIR)/$(DEVMEM2_SOURCE) - $(TARGET_CC) $(TARGET_CFLAGS) -o $@ $^ +define DEVMEM2_CLEAN_CMDS + rm -f $(@D)/devmem2 +endef -$(TARGET_DIR)/sbin/$(DEVMEM2_BINARY): $(DEVMEM2_DIR)/$(DEVMEM2_BINARY) - cp $^ $@ - $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $@ +define DEVMEM2_INSTALL_TARGET_CMDS + $(INSTALL) -D $(@D)/devmem2 $(TARGET_DIR)/sbin/devmem2 +endef -devmem2: $(TARGET_DIR)/sbin/$(DEVMEM2_BINARY) +define DEVMEM2_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/sbin/devmem2 +endef -devmem2-source: $(DL_DIR)/$(DEVMEM2_SOURCE) - -devmem2-clean: - rm -f $(TARGET_DIR/sbin/$(DEVMEM2_BINARY) - -devmem2-dirclean: - rm -rf $(DEVMEM2_DIR) -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_DEVMEM2),y) -TARGETS+=devmem2 -endif +$(eval $(generic-package)) diff --git a/package/dfu-util/Config.in.host b/package/dfu-util/Config.in.host new file mode 100644 index 0000000000..b2a8f8251f --- /dev/null +++ b/package/dfu-util/Config.in.host @@ -0,0 +1,8 @@ +config BR2_PACKAGE_HOST_DFU_UTIL + bool "host dfu-util" + help + Dfu-util is the host side implementation of the DFU 1.0 + specification of the USB forum. DFU is intended to download + and upload firmware to devices connected over USB. + + http://dfu-util.gnumonks.org/ diff --git a/package/dfu-util/dfu-util.mk b/package/dfu-util/dfu-util.mk new file mode 100644 index 0000000000..c58c3471cf --- /dev/null +++ b/package/dfu-util/dfu-util.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# dfu-util +# +################################################################################ + +DFU_UTIL_VERSION = 0.6 +DFU_UTIL_SITE = http://dfu-util.gnumonks.org/releases/ + +HOST_DFU_UTIL_DEPENDENCIES = host-libusb + +$(eval $(host-autotools-package)) diff --git a/package/dhcp/Config.in b/package/dhcp/Config.in index 2245839727..7944edefc9 100644 --- a/package/dhcp/Config.in +++ b/package/dhcp/Config.in @@ -1,5 +1,7 @@ config BR2_PACKAGE_DHCP - bool "isc dhcp" + bool "dhcp (ISC)" + # fork() + depends on BR2_USE_MMU help DHCP relay agent from the ISC DHCP distribution. @@ -11,6 +13,11 @@ config BR2_PACKAGE_DHCP_SERVER help DHCP server from the ISC DHCP distribution. +config BR2_PACKAGE_DHCP_SERVER_DELAYED_ACK + bool "Enable delayed ACK feature" + depends on BR2_PACKAGE_DHCP_SERVER + help + Enable delayed ACK feature in the ISC DHCP server. config BR2_PACKAGE_DHCP_RELAY bool "dhcp relay" diff --git a/package/dhcp/S80dhcp-relay b/package/dhcp/S80dhcp-relay index c870ea7f5d..2a632ef950 100755 --- a/package/dhcp/S80dhcp-relay +++ b/package/dhcp/S80dhcp-relay @@ -3,7 +3,6 @@ # $Id: dhcp3-relay,v 1.1 2004/04/16 15:41:08 ml Exp $ # - # What servers should the DHCP relay forward requests to? # e.g: SERVERS="192.168.0.1" SERVERS="" @@ -14,31 +13,29 @@ INTERFACES="" # Additional options that are passed to the DHCP relay daemon? OPTIONS="" - - - -# It is not safe to start if we don't have a default configuration... -echo "/etc/init.d/dhcp-relay not yet configured! - Aborting..." -exit 1; - - +# Sanity checks +test -f /usr/sbin/dhcrelay || exit 0 +test -n "$INTERFACES" || exit 0 +test -n "$SERVERS" || exit 0 # Build command line for interfaces (will be passed to dhrelay below.) IFCMD="" -if test "$INTERFACES" != ""; then - for I in $INTERFACES; do - IFCMD=${IFCMD}"-i "${I}" " - done -fi +for I in $INTERFACES; do + IFCMD=${IFCMD}"-i "${I}" " +done DHCRELAYPID=/var/run/dhcrelay.pid case "$1" in start) + echo -n "Starting DHCP relay: " start-stop-daemon -S -x /usr/sbin/dhcrelay -- -q $OPTIONS $IFCMD $SERVERS + [ $? == 0 ] && echo "OK" || echo "FAIL" ;; stop) + echo -n "Stopping DHCP relay: " start-stop-daemon -K -x /usr/sbin/dhcrelay + [ $? == 0 ] && echo "OK" || echo "FAIL" ;; restart | force-reload) $0 stop @@ -47,7 +44,7 @@ case "$1" in ;; *) echo "Usage: /etc/init.d/dhcp-relay {start|stop|restart|force-reload}" - exit 1 + exit 1 esac exit 0 diff --git a/package/dhcp/S80dhcp-server b/package/dhcp/S80dhcp-server index 7c7f893a14..98bd3cc67e 100755 --- a/package/dhcp/S80dhcp-server +++ b/package/dhcp/S80dhcp-server @@ -3,34 +3,27 @@ # $Id: dhcp3-server.init.d,v 1.4 2003/07/13 19:12:41 mdz Exp $ # - - # On what interfaces should the DHCP server (dhcpd) serve DHCP requests? # Separate multiple interfaces with spaces, e.g. "eth0 eth1". INTERFACES="" - -# It is not safe to start if we don't have a default configuration... -echo "/etc/init.d/dhcp-server not yet configured! - Aborting..." -exit 1; - - - +# Sanity checks test -f /usr/sbin/dhcpd || exit 0 - +test -f /etc/dhcpd.conf || exit 0 +test -n "$INTERFACES" || exit 0 case "$1" in start) echo -n "Starting DHCP server: " test -d /var/lib/dhcp/ || mkdir -p /var/lib/dhcp/ - test -f /var/lib/dhcp/dhcpd.leases || touch /var/lib/dhcp/dhcpd.leases + test -f /var/lib/dhcp/dhcpd.leases || touch /var/lib/dhcp/dhcpd.leases start-stop-daemon -S -x /usr/sbin/dhcpd -- -q $INTERFACES - echo "." + [ $? == 0 ] && echo "OK" || echo "FAIL" ;; stop) echo -n "Stopping DHCP server: dhcpd3" start-stop-daemon -K -x /usr/sbin/dhcpd - echo "." + [ $? == 0 ] && echo "OK" || echo "FAIL" ;; restart | force-reload) $0 stop @@ -42,7 +35,7 @@ case "$1" in ;; *) echo "Usage: /etc/init.d/dhcp-server {start|stop|restart|force-reload}" - exit 1 + exit 1 esac exit 0 diff --git a/package/dhcp/dhcp.mk b/package/dhcp/dhcp.mk index 64472c9e89..3885bba7bf 100644 --- a/package/dhcp/dhcp.mk +++ b/package/dhcp/dhcp.mk @@ -1,11 +1,14 @@ -############################################################# +################################################################################ # # dhcp # -############################################################# -DHCP_VERSION = 4.1.1-P1 -DHCP_SOURCE = dhcp-$(DHCP_VERSION).tar.gz -DHCP_SITE = http://ftp.isc.org/isc/dhcp/ +################################################################################ + +DHCP_VERSION = 4.1-ESV-R8 +DHCP_SITE = http://ftp.isc.org/isc/dhcp/$(DHCP_VERSION) +DHCP_INSTALL_STAGING = YES +DHCP_LICENSE = ISC +DHCP_LICENSE_FILES = LICENSE DHCP_CONF_ENV = ac_cv_file__dev_random=yes DHCP_CONF_OPT = \ --localstatedir=/var/lib/dhcp \ @@ -13,8 +16,15 @@ DHCP_CONF_OPT = \ --with-cli-lease-file=/var/lib/dhcp/dhclient.leases \ --with-srv-pid-file=/var/run/dhcpd.pid \ --with-cli-pid-file=/var/run/dhclient.pid \ - --with-relay-pid-file=/var/run/dhcrelay.pid \ - --disable-dhcpv6 + --with-relay-pid-file=/var/run/dhcrelay.pid + +ifeq ($(BR2_PACKAGE_DHCP_SERVER_DELAYED_ACK),y) + DHCP_CONF_OPT += --enable-delayed-ack +endif + +ifneq ($(BR2_INET_IPV6),y) + DHCP_CONF_OPT += --disable-dhcpv6 +endif ifeq ($(BR2_PACKAGE_DHCP_SERVER),y) define DHCP_INSTALL_SERVER @@ -58,4 +68,4 @@ define DHCP_INSTALL_TARGET_CMDS $(DHCP_INSTALL_CLIENT) endef -$(eval $(call AUTOTARGETS,package,dhcp)) +$(eval $(autotools-package)) diff --git a/package/dhcpcd/Config.in b/package/dhcpcd/Config.in new file mode 100644 index 0000000000..ac20615d5f --- /dev/null +++ b/package/dhcpcd/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_DHCPCD + bool "dhcpcd" + # No support for AI_ADDRCONFIG + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 && \ + !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1 + help + An RFC2131 compliant DHCP client + + http://roy.marples.name/downloads/dhcpcd diff --git a/package/dhcpcd/dhcpcd.mk b/package/dhcpcd/dhcpcd.mk new file mode 100644 index 0000000000..80377062a8 --- /dev/null +++ b/package/dhcpcd/dhcpcd.mk @@ -0,0 +1,45 @@ +################################################################################ +# +# dhcpcd +# +################################################################################ + +DHCPCD_VERSION = 6.1.0 +DHCPCD_SOURCE = dhcpcd-$(DHCPCD_VERSION).tar.bz2 +DHCPCD_SITE = http://roy.marples.name/downloads/dhcpcd +DHCPCD_LICENSE = BSD-2c + +ifeq ($(BR2_INET_IPV6),) + DHCPCD_CONFIG_OPT += --disable-ipv6 +endif + +ifeq ($(BR2_USE_MMU),) + DHCPCD_CONFIG_OPT += --disable-fork +endif + +define DHCPCD_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) ./configure \ + --target=$(BR2_GCC_TARGET_ARCH) \ + --os=linux \ + $(DHCPCD_CONFIG_OPT) ) +endef + +define DHCPCD_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) \ + -C $(@D) all +endef + +define DHCPCD_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/dhcpcd \ + $(TARGET_DIR)/usr/bin/dhcpcd + $(INSTALL) -D -m 0644 $(@D)/dhcpcd.conf \ + $(TARGET_DIR)/etc/dhcpcd.conf + $(INSTALL) -D -m 0755 $(@D)/dhcpcd-run-hooks \ + $(TARGET_DIR)/libexec/dhcpcd-run-hooks +endef + +# NOTE: Even though this package has a configure script, it is not generated +# using the autotools, so we have to use the generic package infrastructure. + +$(eval $(generic-package)) diff --git a/package/dhcpdump/Config.in b/package/dhcpdump/Config.in new file mode 100644 index 0000000000..1840e3428f --- /dev/null +++ b/package/dhcpdump/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_DHCPDUMP + bool "dhcpdump" + select BR2_PACKAGE_LIBPCAP + help + A tool for monitoring dhcp requests using tcpdump. diff --git a/package/dhcpdump/dhcpdump-1.8-use-non-bsd-structures.patch b/package/dhcpdump/dhcpdump-1.8-use-non-bsd-structures.patch new file mode 100644 index 0000000000..40115fb640 --- /dev/null +++ b/package/dhcpdump/dhcpdump-1.8-use-non-bsd-structures.patch @@ -0,0 +1,23 @@ +The udphdr structure has uh_* fields when _FAVOR_BSD is +defined. Otherwise, the fields are just named source, dest, len and +check. See . + +Signed-off-by: Thomas Petazzoni + +Index: dhcpdump-1.8/dhcpdump.c +=================================================================== +--- dhcpdump-1.8.orig/dhcpdump.c 2011-05-17 20:20:46.506980003 +0200 ++++ dhcpdump-1.8/dhcpdump.c 2011-05-17 20:20:59.338979999 +0200 +@@ -163,10 +163,10 @@ + strcpy(ip_origin, (u_char *)inet_ntoa(ip->ip_src)); + strcpy(ip_destination, (u_char *)inet_ntoa(ip->ip_dst)); + +- if (hmask && check_ch((u_char *)(sp + offset), ntohs(udp->uh_ulen))) ++ if (hmask && check_ch((u_char *)(sp + offset), ntohs(udp->len))) + return; + +- printdata((u_char *)(sp + offset), ntohs(udp->uh_ulen)); ++ printdata((u_char *)(sp + offset), ntohs(udp->len)); + } + + // check for matching CHADDR (Peter Apian-Bennewitz ) diff --git a/package/dhcpdump/dhcpdump.mk b/package/dhcpdump/dhcpdump.mk new file mode 100644 index 0000000000..1f1737ddc1 --- /dev/null +++ b/package/dhcpdump/dhcpdump.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# dhcpdump +# +################################################################################ + +DHCPDUMP_VERSION = 1.8 +DHCPDUMP_SITE = http://www.mavetju.org/download/ + +DHCPDUMP_DEPENDENCIES = libpcap + +define DHCPDUMP_BUILD_CMDS + $(MAKE) -C $(@D) CC="$(TARGET_CC) $(TARGET_CFLAGS)" +endef + +define DHCPDUMP_INSTALL_TARGET_CMDS + install -m 0755 -D $(@D)/dhcpdump $(TARGET_DIR)/usr/bin/dhcpdump +endef + +$(eval $(generic-package)) diff --git a/package/dhrystone/dhrystone.mk b/package/dhrystone/dhrystone.mk index a03beecf61..47c2ef2a29 100644 --- a/package/dhrystone/dhrystone.mk +++ b/package/dhrystone/dhrystone.mk @@ -1,13 +1,18 @@ -############################################################# +################################################################################ # # dhrystone # -############################################################# +################################################################################ DHRYSTONE_VERSION = 2 DHRYSTONE_SOURCE = dhry-c DHRYSTONE_SITE = http://www.netlib.org/benchmark/ +define DHRYSTONE_EXTRACT_CMDS + (cd $(@D) && $(SHELL) $(DL_DIR)/$($(PKG)_SOURCE)) + $(Q)cp $($(PKG)_DIR_PREFIX)/dhrystone/Makefile $(@D)/ +endef + define DHRYSTONE_BUILD_CMDS $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) endef @@ -24,11 +29,4 @@ define DHRYSTONE_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/bin/dhrystone endef -$(eval $(call GENTARGETS,package,dhrystone)) - -$(BUILD_DIR)/dhrystone-$(DHRYSTONE_VERSION)/.stamp_extracted: - @$(call MESSAGE,"Extracting") - $(Q)mkdir -p $(@D) - $(Q)cd $(@D) && $(SHELL) $(DL_DIR)/$($(PKG)_SOURCE) - $(Q)cp $($(PKG)_DIR_PREFIX)/dhrystone/Makefile $(@D)/ - $(Q)touch $@ +$(eval $(generic-package)) diff --git a/package/dialog/Config.in b/package/dialog/Config.in index 9d3462ec49..b3efd8d85b 100644 --- a/package/dialog/Config.in +++ b/package/dialog/Config.in @@ -1,5 +1,7 @@ config BR2_PACKAGE_DIALOG bool "dialog" + depends on BR2_TOOLCHAIN_HAS_THREADS # fork() + depends on BR2_USE_MMU # fork() select BR2_PACKAGE_NCURSES select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE help diff --git a/package/dialog/dialog.mk b/package/dialog/dialog.mk index e8f025f750..06379f2c50 100644 --- a/package/dialog/dialog.mk +++ b/package/dialog/dialog.mk @@ -1,17 +1,20 @@ -############################################################# +################################################################################ # # dialog # -############################################################# -DIALOG_VERSION:=1.1-20100428 -DIALOG_SOURCE:=dialog-$(DIALOG_VERSION).tgz -DIALOG_SITE:=ftp://invisible-island.net/dialog +################################################################################ + +DIALOG_VERSION = 1.1-20111020 +DIALOG_SOURCE = dialog-$(DIALOG_VERSION).tgz +DIALOG_SITE = ftp://invisible-island.net/dialog DIALOG_CONF_OPT = --with-ncurses DIALOG_CONF_ENV = ac_cv_path_NCURSES_CONFIG=true LIBS=-lncurses DIALOG_DEPENDENCIES = ncurses +DIALOG_LICENSE = LGPLv2.1 +DIALOG_LICENSE_FILES = COPYING ifneq ($(BR2_ENABLE_LOCALE),y) -DIALOG_DEPENDENCIES+=libiconv +DIALOG_DEPENDENCIES += libiconv endif define DIALOG_INSTALL_TARGET_CMDS @@ -23,4 +26,4 @@ define DIALOG_POST_CLEAN rm -f $(TARGET_DIR)/usr/bin/dialog endef -$(eval $(call AUTOTARGETS,package,dialog)) +$(eval $(autotools-package)) diff --git a/package/diffutils/Config.in b/package/diffutils/Config.in index df3e426dd1..f483c75417 100644 --- a/package/diffutils/Config.in +++ b/package/diffutils/Config.in @@ -1,6 +1,11 @@ config BR2_PACKAGE_DIFFUTILS - bool"diffutils" + bool "diffutils" + depends on BR2_USE_WCHAR + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE help GNU diff. Compare files per line. http://www.gnu.org/software/diffutils/diffutils.html + +comment "diffutils needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/diffutils/diffutils-2.8.1-__mempcpy.patch b/package/diffutils/diffutils-2.8.1-__mempcpy.patch deleted file mode 100644 index 94144c1713..0000000000 --- a/package/diffutils/diffutils-2.8.1-__mempcpy.patch +++ /dev/null @@ -1,47 +0,0 @@ -[PATCH] diffutils: Don't use glibc specific __mempcpy - -The configure script checks for mempcpy, but the code uses the (glibc -specific) __mempcpy instead. Fix it to use mempcpy which is more -portable. - -Signed-off-by: Peter Korsgaard x ---- - lib/getopt.c | 4 ++-- - lib/regex.c | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -Index: diffutils-2.8.1/lib/getopt.c -=================================================================== ---- diffutils-2.8.1.orig/lib/getopt.c -+++ diffutils-2.8.1/lib/getopt.c -@@ -334,7 +334,7 @@ exchange (argv) - nonoption_flags_len = nonoption_flags_max_len = 0; - else - { -- memset (__mempcpy (new_str, __getopt_nonoption_flags, -+ memset (mempcpy (new_str, __getopt_nonoption_flags, - nonoption_flags_max_len), - '\0', top + 1 - nonoption_flags_max_len); - nonoption_flags_max_len = top + 1; -@@ -445,7 +445,7 @@ _getopt_initialize (argc, argv, optstrin - if (__getopt_nonoption_flags == NULL) - nonoption_flags_max_len = -1; - else -- memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), -+ memset (mempcpy (__getopt_nonoption_flags, orig_str, len), - '\0', nonoption_flags_max_len - len); - } - } -Index: diffutils-2.8.1/lib/regex.c -=================================================================== ---- diffutils-2.8.1.orig/lib/regex.c -+++ diffutils-2.8.1/lib/regex.c -@@ -8314,7 +8314,7 @@ regerror (errcode, preg, errbuf, errbuf_ - if (msg_size > errbuf_size) - { - #if defined HAVE_MEMPCPY || defined _LIBC -- *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0'; -+ *((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0'; - #else - memcpy (errbuf, msg, errbuf_size - 1); - errbuf[errbuf_size - 1] = 0; diff --git a/package/diffutils/diffutils.mk b/package/diffutils/diffutils.mk index 6ce71c9270..191fd2e172 100644 --- a/package/diffutils/diffutils.mk +++ b/package/diffutils/diffutils.mk @@ -1,64 +1,18 @@ -############################################################# +################################################################################ # # diffutils # -############################################################# -DIFFUTILS_VERSION=2.8.1 -DIFFUTILS_SOURCE:=diffutils-$(DIFFUTILS_VERSION).tar.gz -DIFFUTILS_SITE:=$(BR2_GNU_MIRROR)/diffutils +################################################################################ -DIFFUTILS_INSTALL_STAGING = YES +DIFFUTILS_VERSION = 3.3 +DIFFUTILS_SOURCE = diffutils-$(DIFFUTILS_VERSION).tar.xz +DIFFUTILS_SITE = $(BR2_GNU_MIRROR)/diffutils +DIFFUTILS_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) +DIFFUTILS_LICENSE = GPLv3+ +DIFFUTILS_LICENSE_FILES = COPYING -DIFFUTILS_DEPENDENCIES = \ - $(if $(BR2_PACKAGE_GETTEXT),gettext) \ - $(if $(BR2_PACKAGE_LIBINTL),libintl) +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +DIFFUTILS_DEPENDENCIES += busybox +endif -DIFFUTILS_CONF_ENV = ac_cv_func_strtod=yes - ac_fsusage_space=yes \ - fu_cv_sys_stat_statfs2_bsize=yes \ - ac_cv_func_closedir_void=no \ - ac_cv_func_getloadavg=no \ - ac_cv_lib_util_getloadavg=no \ - ac_cv_lib_getloadavg_getloadavg=no \ - ac_cv_func_getgroups=yes \ - ac_cv_func_getgroups_works=yes \ - ac_cv_func_chown_works=yes \ - ac_cv_have_decl_euidaccess=no \ - ac_cv_func_euidaccess=no \ - ac_cv_have_decl_strnlen=yes \ - ac_cv_func_strnlen_working=yes \ - ac_cv_func_lstat_dereferences_slashed_symlink=yes \ - ac_cv_func_lstat_empty_string_bug=no \ - ac_cv_func_stat_empty_string_bug=no \ - vb_cv_func_rename_trailing_slash_bug=no \ - ac_cv_have_decl_nanosleep=yes \ - jm_cv_func_nanosleep_works=yes \ - gl_cv_func_working_utimes=yes \ - ac_cv_func_utime_null=yes \ - ac_cv_have_decl_strerror_r=yes \ - ac_cv_func_strerror_r_char_p=no \ - jm_cv_func_svid_putenv=yes \ - ac_cv_func_getcwd_null=yes \ - ac_cv_func_getdelim=yes \ - ac_cv_func_mkstemp=yes \ - utils_cv_func_mkstemp_limitations=no \ - utils_cv_func_mkdir_trailing_slash_bug=no \ - jm_cv_func_gettimeofday_clobber=no \ - am_cv_func_working_getline=yes \ - gl_cv_func_working_readdir=yes \ - jm_ac_cv_func_link_follows_symlink=no \ - utils_cv_localtime_cache=no \ - ac_cv_struct_st_mtim_nsec=no \ - gl_cv_func_tzset_clobber=no \ - gl_cv_func_getcwd_null=yes \ - gl_cv_func_getcwd_path_max=yes \ - ac_cv_func_fnmatch_gnu=yes \ - am_getline_needs_run_time_check=no \ - am_cv_func_working_getline=yes \ - gl_cv_func_mkdir_trailing_slash_bug=no \ - gl_cv_func_mkstemp_limitations=no \ - ac_cv_func_working_mktime=yes \ - jm_cv_func_working_re_compile_pattern=yes \ - ac_use_included_regex=no - -$(eval $(call AUTOTARGETS,package,diffutils)) +$(eval $(autotools-package)) diff --git a/package/directfb-examples/Config.in b/package/directfb-examples/Config.in index c4637847dd..afd6d6d5a3 100644 --- a/package/directfb-examples/Config.in +++ b/package/directfb-examples/Config.in @@ -1,97 +1,182 @@ config BR2_PACKAGE_DIRECTFB_EXAMPLES - bool "directfb examples" - depends on BR2_PACKAGE_DIRECTFB + bool "directfb examples" + depends on BR2_PACKAGE_DIRECTFB + help + The DirectFB-examples package contains a set of simple DirectFB + applications that can be used to test and demonstrate various + DirectFB features. + + http://directfb.org/downloads/Extras/README.DirectFB-examples config BR2_PACKAGE_DIRECTFB_EXAMPLES_ANDI - bool "usr/bin/df_andi" - depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + bool "usr/bin/df_andi" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + Penguin demo, press 'space' to form convergence logo, + 's'/'d' to spawn/destroy 'a' penguin, 'r' to revive penguin + after space was pressed, 'c' tests clipping. config BR2_PACKAGE_DIRECTFB_EXAMPLES_BLTLOAD - bool "usr/bin/df_bltload" - depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + bool "usr/bin/df_bltload" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + Reads information from /proc/bltstat. config BR2_PACKAGE_DIRECTFB_EXAMPLES_CPULOAD - bool "usr/bin/df_cpuload" - depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + bool "usr/bin/df_cpuload" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + CPU Load with data from /proc/stat. config BR2_PACKAGE_DIRECTFB_EXAMPLES_DATABUFFER - bool "usr/bin/df_databuffer" - depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + bool "usr/bin/df_databuffer" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + Simple test application for data buffers. config BR2_PACKAGE_DIRECTFB_EXAMPLES_DIOLOAD - bool "usr/bin/df_dioload" - depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + bool "usr/bin/df_dioload" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + Disk IO with data from /proc/stat. config BR2_PACKAGE_DIRECTFB_EXAMPLES_DOK - bool "usr/bin/df_dok" - depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + bool "usr/bin/df_dok" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + DirectFB benchmark application, runs some tests and + displays benchmark results afterwards. config BR2_PACKAGE_DIRECTFB_EXAMPLES_DRIVERTEST - bool "usr/bin/df_drivertest" - depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + bool "usr/bin/df_drivertest" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + Tool to check drivers for bugs and accuracy. config BR2_PACKAGE_DIRECTFB_EXAMPLES_FIRE - bool "usr/bin/df_fire" - depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + bool "usr/bin/df_fire" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The famous fire effect ported to DirectFB (16 bpp only). config BR2_PACKAGE_DIRECTFB_EXAMPLES_FLIP - bool "usr/bin/df_flip" - depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + bool "usr/bin/df_flip" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + Raw Flip() benchmark. + config BR2_PACKAGE_DIRECTFB_EXAMPLES_FONTS - bool "usr/bin/df_fonts" - depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + bool "usr/bin/df_fonts" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + Takes a list of font files and shows character tables. config BR2_PACKAGE_DIRECTFB_EXAMPLES_INPUT - bool "usr/bin/df_input" - depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + bool "usr/bin/df_input" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + Test application for input devices. config BR2_PACKAGE_DIRECTFB_EXAMPLES_JOYSTICK - bool "usr/bin/df_joystick" - depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + bool "usr/bin/df_joystick" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + A colored version of df_particle, fointain can be moved with + joystick. The particles of different colors can be spawned + with different joystick buttons (1-4). config BR2_PACKAGE_DIRECTFB_EXAMPLES_KNUCKLES - bool "usr/bin/df_knuckles" - depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + bool "usr/bin/df_knuckles" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + 3D skull drawn using triangles that can be rotated using + the mouse. 'Space' switches to wireframe, 'b' toggles + backface culling. config BR2_PACKAGE_DIRECTFB_EXAMPLES_LAYER - bool "usr/bin/df_layer" - depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + bool "usr/bin/df_layer" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + Simple videoplayer with layers. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_MATRIX + bool "usr/bin/df_matrix" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + Testing SetMatrix() for free transforms. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_MATRIX_WATER + bool "usr/bin/df_matrix_water" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + Same as df_matrix, but using new Water API. config BR2_PACKAGE_DIRECTFB_EXAMPLES_NEO - bool "usr/bin/df_neo" - depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + bool "usr/bin/df_neo" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + Port from a gdk-pixbuf demo to DirectFB, uses scaling, + alpha blending and color modulation, use cursor keys and + space to change parameters. config BR2_PACKAGE_DIRECTFB_EXAMPLES_NETLOAD - bool "usr/bin/df_netload" - depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + bool "usr/bin/df_netload" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + Network statistica from /proc/net/dev. config BR2_PACKAGE_DIRECTFB_EXAMPLES_PALETTE - bool "usr/bin/df_palette" - depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + bool "usr/bin/df_palette" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + A example blitting from a surface with a + rotating/morphing palette. config BR2_PACKAGE_DIRECTFB_EXAMPLES_PARTICLE - bool "usr/bin/df_particle" - depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + bool "usr/bin/df_particle" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + A moving fountain consisting of alphablended rectangles, + nice and fast if hardware accelerated. config BR2_PACKAGE_DIRECTFB_EXAMPLES_PORTER - bool "usr/bin/df_porter" - depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + bool "usr/bin/df_porter" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + Shows porter/duff blending rules. + config BR2_PACKAGE_DIRECTFB_EXAMPLES_STRESS - bool "usr/bin/df_stress" - depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + bool "usr/bin/df_stress" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + Stress tests surface manager, for debugging purposes only. config BR2_PACKAGE_DIRECTFB_EXAMPLES_TEXTURE - bool "usr/bin/df_texture" - depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + bool "usr/bin/df_texture" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + A simple texture example. The 3d windows can be rotated + with the mouse. config BR2_PACKAGE_DIRECTFB_EXAMPLES_VIDEO - bool "usr/bin/df_video" - depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + bool "usr/bin/df_video" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + Shows window stack with alpha blending and video playback + in a moving window. config BR2_PACKAGE_DIRECTFB_EXAMPLES_VIDEO_PARTICLE - bool "usr/bin/df_video_particle" - depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + bool "usr/bin/df_video_particle" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + Same as df_particle, but the rectangles have been + replaced by a video (via video4linux). Nice color effects. config BR2_PACKAGE_DIRECTFB_EXAMPLES_WINDOW - bool "usr/bin/df_window" - depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + bool "usr/bin/df_window" + depends on BR2_PACKAGE_DIRECTFB_EXAMPLES + help + Simple demonstration of the DirectFB window stack, follow + the instructions in the upper left corner. Pass a video + device file or a movie file on the command-line to enable + video playback in one of the windows. diff --git a/package/directfb-examples/directfb-examples-1.2.0-remove-bzero.patch b/package/directfb-examples/directfb-examples-remove-bzero.patch similarity index 100% rename from package/directfb-examples/directfb-examples-1.2.0-remove-bzero.patch rename to package/directfb-examples/directfb-examples-remove-bzero.patch diff --git a/package/directfb-examples/directfb-examples.mk b/package/directfb-examples/directfb-examples.mk index aed97901ec..16d2a8623a 100644 --- a/package/directfb-examples/directfb-examples.mk +++ b/package/directfb-examples/directfb-examples.mk @@ -1,17 +1,19 @@ -############################################################# +################################################################################ # -# directfb examples +# directfb-examples # -############################################################# -DIRECTFB_EXAMPLES_VERSION:=1.2.0 -DIRECTFB_EXAMPLES_SITE:=http://www.directfb.org/downloads/Extras +################################################################################ + +DIRECTFB_EXAMPLES_VERSION = 1.6.0 +DIRECTFB_EXAMPLES_SITE = http://www.directfb.org/downloads/Extras DIRECTFB_EXAMPLES_SOURCE = DirectFB-examples-$(DIRECTFB_EXAMPLES_VERSION).tar.gz +DIRECTFB_EXAMPLES_LICENSE = MIT +DIRECTFB_EXAMPLES_LICENSE_FILES = COPYING DIRECTFB_EXAMPLES_INSTALL_STAGING = YES -DIRECTFB_EXAMPLES_INSTALL_TARGET = YES DIRECTFB_EXAMPLES_DEPENDENCIES = directfb -DIRECTFB_EXAMPLES_TARGETS_ := -DIRECTFB_EXAMPLES_TARGETS_y := +DIRECTFB_EXAMPLES_TARGETS_ = +DIRECTFB_EXAMPLES_TARGETS_y = DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_ANDI) += usr/bin/df_andi DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_BLTLOAD) += usr/bin/df_bltload @@ -27,6 +29,8 @@ DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_INPUT) += usr/bin/df_i DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_JOYSTICK) += usr/bin/df_joystick DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_KNUCKLES) += usr/bin/df_knuckles DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_LAYER) += usr/bin/df_layer +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_MATRIX) += usr/bin/df_matrix +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_MATRIX_WATER) += usr/bin/df_matrix_water DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_NEO) += usr/bin/df_neo DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_NETLOAD) += usr/bin/df_netload DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_PALETTE) += usr/bin/df_palette @@ -38,8 +42,8 @@ DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_VIDEO) += usr/bin/df_v DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_VIDEO_PARTICLE) += usr/bin/df_video_particle DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_WINDOW) += usr/bin/df_window -DIRECTFB_EXAMPLES_DATA_ := -DIRECTFB_EXAMPLES_DATA_y := +DIRECTFB_EXAMPLES_DATA_ = +DIRECTFB_EXAMPLES_DATA_y = DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_ANDI) += usr/share/directfb-examples/destination_mask.png DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_ANDI) += usr/share/directfb-examples/tux.png @@ -54,6 +58,7 @@ DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_DOK) += usr/share/directf DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_DOK) += usr/share/directfb-examples/intro.png DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_DOK) += usr/share/directfb-examples/fish.png DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_DOK) += usr/share/directfb-examples/swirl.png +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_DOK) += usr/share/directfb-examples/rose.png DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_DRIVERTEST) += usr/share/directfb-examples/pngtest.png DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_DRIVERTEST) += usr/share/directfb-examples/testmask.png @@ -78,7 +83,7 @@ DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_VIDEO_PARTICLE) += usr/sh DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_WINDOW) += usr/share/directfb-examples/desktop.png DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_WINDOW) += usr/share/directfb-examples/dfblogo.png -DIRECTFB_EXAMPLES_FONT_y := +DIRECTFB_EXAMPLES_FONT_y = ifeq ($(BR2_PACKAGE_DIRECTFB_EXAMPLES_FONTS),y) DIRECTFB_EXAMPLES_FONT_y = usr/share/directfb-examples/fonts/* endif @@ -101,5 +106,4 @@ define DIRECTFB_EXAMPLES_INSTALL_TARGET_CMDS done endef -$(eval $(call AUTOTARGETS,package,directfb-examples)) - +$(eval $(autotools-package)) diff --git a/package/directfb/Config.in b/package/directfb/Config.in index 47f9feaaf4..fa108b7e12 100644 --- a/package/directfb/Config.in +++ b/package/directfb/Config.in @@ -1,5 +1,7 @@ config BR2_PACKAGE_DIRECTFB bool "directfb" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INSTALL_LIBSTDCPP select BR2_PACKAGE_FREETYPE select BR2_PACKAGE_ZLIB help @@ -48,10 +50,21 @@ config BR2_PACKAGE_DIRECTFB_MATROX config BR2_PACKAGE_DIRECTFB_PXA3XX bool "compile pxa3xx graphics driver" depends on BR2_arm + help + The Marvell PXA3xx Processor Family is a system-on-chip based + on XScale® microarchitecture. This option enables the graphic + driver support for the PXA3xx processor family. + + http://www.marvell.com/application-processors/pxa-family/ config BR2_PACKAGE_DIRECTFB_EP9X bool "compile ep9x graphics driver" depends on BR2_arm + help + Enable the graphic driver support for the EP93xx ARMv9 based + processors from Cirrus Logic. + + http://cirrus.com/en/products/arm9.html config BR2_PACKAGE_DIRECTFB_UNICHROME bool "compile unichrome graphics driver" @@ -80,13 +93,21 @@ config BR2_PACKAGE_DIRECTFB_SERIALMOUSE config BR2_PACKAGE_DIRECTFB_TSLIB bool "enable touchscreen support" + depends on !BR2_PREFER_STATIC_LIB # tslib default y select BR2_PACKAGE_TSLIB +comment "touchscreen support needs a toolchain w/ dynamic library" + depends on BR2_PREFER_STATIC_LIB + config BR2_PACKAGE_DIRECTFB_GIF bool "enable GIF support" default y +config BR2_PACKAGE_DIRECTFB_IMLIB2 + bool "enable IMLIB2 support" + select BR2_PACKAGE_IMLIB2 + config BR2_PACKAGE_DIRECTFB_JPEG bool "enable JPEG support" default y @@ -97,13 +118,16 @@ config BR2_PACKAGE_DIRECTFB_PNG default y select BR2_PACKAGE_LIBPNG -config BR2_PACKAGE_DIRECTB_DITHER_RGB16 +config BR2_PACKAGE_DIRECTFB_DITHER_RGB16 bool "enable advanced dithering of RGB16 surfaces" help Enable dithering when loading images to RGB16 surfaces. This increases the data section by 64 KBytes. -config BR2_PACKAGE_DIRECTB_TESTS +config BR2_PACKAGE_DIRECTFB_TESTS bool "build directfb tests" endif # BR2_PACKAGE_DIRECTFB + +comment "directfb needs a toolchain w/ C++, threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP diff --git a/package/directfb/directfb-1.4.11-ppc-compile-fix.patch b/package/directfb/directfb-1.4.11-ppc-compile-fix.patch deleted file mode 100644 index 2514eae6ed..0000000000 --- a/package/directfb/directfb-1.4.11-ppc-compile-fix.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - lib/direct/ppcasm_memcpy_cachable.S | 2 -- - 1 file changed, 2 deletions(-) - -Index: DirectFB-1.2.7/lib/direct/ppcasm_memcpy_cachable.S -=================================================================== ---- DirectFB-1.2.7.orig/lib/direct/ppcasm_memcpy_cachable.S -+++ DirectFB-1.2.7/lib/direct/ppcasm_memcpy_cachable.S -@@ -34,8 +34,6 @@ - - #define __ASSEMBLY__ - --#include -- - #if defined(CONFIG_8xx) || defined(CONFIG_403GCX) - #define L1_CACHE_LINE_SIZE 16 - #define LG_L1_CACHE_LINE_SIZE 4 diff --git a/package/directfb/directfb-fix-missing-davinci-voodoo-header.patch b/package/directfb/directfb-fix-missing-davinci-voodoo-header.patch new file mode 100644 index 0000000000..6ad4958f84 --- /dev/null +++ b/package/directfb/directfb-fix-missing-davinci-voodoo-header.patch @@ -0,0 +1,1726 @@ +The archive of directfb-1.6.3 is still missing some header files against +the tagged git tree of directfb. The following files are missing. + +gfxdrivers/davinci/davinci_c64x.h +gfxdrivers/davinci/davincifb.h +gfxdrivers/davinci/davinci_gfxdriver.h +tests/voodoo/voodoo_test.h + +The headers of course are needed to be able to build every module of +directfb. The headers are taken from the git tree of directfb +http://git.directfb.org/?p=core/DirectFB.git;a=commit;h=38b784549bc59bb07c58bb29667cb658695d39a7, +tag DIRECTFB_1_6_3, SHA1ID 38b784549bc59bb07c58bb29667cb658695d39a7. + +Signed-off-by: Carsten Schoenert + +diff -puNr -Naur directfb-1.6.3-orig/gfxdrivers/davinci/davinci_c64x.h directfb-1.6.3/gfxdrivers/davinci/davinci_c64x.h +--- directfb-1.6.3-orig/gfxdrivers/davinci/davinci_c64x.h 1970-01-01 01:00:00.000000000 +0100 ++++ directfb-1.6.3/gfxdrivers/davinci/davinci_c64x.h 2013-04-07 21:33:25.928530187 +0200 +@@ -0,0 +1,935 @@ ++/* ++ TI Davinci driver - C64X+ DSP Library ++ ++ (c) Copyright 2008 directfb.org ++ (c) Copyright 2007 Telio AG ++ ++ Written by Denis Oliver Kropp and ++ Olaf Dreesen . ++ ++ All rights reserved. ++ ++ This library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License ++ version 2 as published by the Free Software Foundation. ++ ++ This library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public ++ License along with this library; if not, write to the ++ Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ Boston, MA 02111-1307, USA. ++*/ ++ ++#ifndef __DAVINCI_C64X_H__ ++#define __DAVINCI_C64X_H__ ++ ++#include ++ ++#include ++ ++#include ++#include ++ ++#include ++ ++#define mb() __asm__ __volatile__ ("" : : : "memory") ++ ++/**********************************************************************************************************************/ ++ ++typedef struct { ++ int magic; ++ ++ int fd; ++ c64xTaskControl *ctl; ++ void *mem; ++ ++ c64xTask *QueueL; ++} DavinciC64x; ++ ++typedef struct { ++ int magic; ++ unsigned int max_tasks; ++ unsigned int num_tasks; ++ c64xTask *tasks; ++} DavinciC64xTasks; ++ ++typedef enum { ++ C64X_TEF_NONE = 0x0000, ++ C64X_TEF_RESET = 0x0001 ++} DavinciC64xEmitFlags; ++ ++/**********************************************************************************************************************/ ++ ++DFBResult davinci_c64x_open ( DavinciC64x *c64x ); ++ ++DFBResult davinci_c64x_close ( DavinciC64x *c64x ); ++ ++DFBResult davinci_c64x_wait_low( DavinciC64x *c64x ); ++ ++/**********************************************************************************************************************/ ++ ++DFBResult davinci_c64x_tasks_init ( DavinciC64xTasks *tasks, ++ unsigned int size ); ++ ++DFBResult davinci_c64x_tasks_destroy( DavinciC64xTasks *tasks ); ++ ++/**********************************************************************************************************************/ ++ ++DFBResult davinci_c64x_emit_tasks( DavinciC64x *c64x, ++ DavinciC64xTasks *tasks, ++ DavinciC64xEmitFlags flags ); ++ ++/**********************************************************************************************************************/ ++ ++static const char *state_names[] = { "DONE", "ERROR", "TODO", "RUNNING" }; ++ ++static inline c64xTask * ++c64x_get_task( DavinciC64x *c64x ) ++{ ++ c64xTaskControl *ctl = c64x->ctl; ++ uint32_t idx = ctl->QL_arm; ++ uint32_t next = (idx + 1) & C64X_QUEUE_MASK; ++ c64xTask *task = &c64x->QueueL[idx]; ++ int loops = 0; ++ uint32_t idle = 0; ++ ++ /* Wait for the entry (and next) to be processed by the DSP (rare case). */ ++ while (task->c64x_flags & C64X_FLAG_TODO || ctl->QL_dsp == next) { ++ if (loops > 666 || (idle && ctl->idlecounter - idle > 666)) { ++ c64xTask *dsp_task = &c64x->QueueL[ctl->QL_dsp]; ++ ++ D_PERROR( "Davinci/C64X+: Blocked! [DSP %d / %d (%s), ARM %d / %d (%s)]\n", ++ ctl->QL_dsp, ++ (dsp_task->c64x_function >> 2) & 0x3fff, ++ state_names[dsp_task->c64x_function & 3], ++ ctl->QL_arm, ++ (task->c64x_function >> 2) & 0x3fff, ++ state_names[task->c64x_function & 3] ); ++ ++ break; ++ } ++ ++ idle = ctl->idlecounter; ++ ++ /* Queue is full, waiting 10-20ms should not be too bad. */ ++ if (loops++ > 10) ++ usleep( 5000 ); ++ } ++ ++ return task; ++} ++ ++static inline void ++c64x_submit_task( DavinciC64x *c64x, c64xTask *task ) ++{ ++ c64xTaskControl *ctl = c64x->ctl; ++ uint32_t idx = ctl->QL_arm; ++ uint32_t next = (idx + 1) & C64X_QUEUE_MASK; ++ ++ mb(); ++ ++ ctl->QL_arm = next; ++ ++ mb(); ++} ++ ++/**********************************************************************************************************************/ ++ ++static inline void ++davinci_c64x_wb_inv_range( DavinciC64x *c64x, ++ unsigned long start, ++ u32 length, ++ u32 func ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = start; ++ task->c64x_arg[1] = length; ++ task->c64x_arg[2] = func; ++ ++ task->c64x_function = C64X_WB_INV_RANGE | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_write_back_all( DavinciC64x *c64x ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_function = C64X_WRITE_BACK_ALL | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++/**********************************************************************************************************************/ ++ ++static inline void ++davinci_c64x_load_block__L( DavinciC64xTasks *tasks, ++ unsigned long words, ++ u32 num, ++ u32 flags ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = words; ++ task->c64x_arg[1] = num; ++ task->c64x_arg[2] = flags; ++ ++ task->c64x_function = C64X_LOAD_BLOCK | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_load_block( DavinciC64x *c64x, ++ unsigned long words, ++ u32 num, ++ u32 flags ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = words; ++ task->c64x_arg[1] = num; ++ task->c64x_arg[2] = flags; ++ ++ task->c64x_function = C64X_LOAD_BLOCK | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_fetch_uyvy( DavinciC64x *c64x, ++ unsigned long dest, ++ unsigned long source, ++ u32 pitch, ++ u32 height, ++ u32 flags ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = source; ++ task->c64x_arg[2] = pitch; ++ task->c64x_arg[3] = height; ++ task->c64x_arg[4] = flags; ++ ++ task->c64x_function = C64X_FETCH_UYVY | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_mc( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long source0, ++ unsigned long source1, ++ u32 spitch, ++ u32 height, ++ int func ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = dpitch; ++ task->c64x_arg[2] = source0; ++ task->c64x_arg[3] = source1; ++ task->c64x_arg[4] = spitch; ++ task->c64x_arg[5] = height; ++ ++ task->c64x_function = func | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_put_idct_uyvy_16x16__L( DavinciC64xTasks *tasks, ++ unsigned long dest, ++ u32 pitch, ++ u32 flags ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = pitch; ++ task->c64x_arg[2] = flags; ++ ++ task->c64x_function = C64X_PUT_IDCT_UYVY_16x16 | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_put_idct_uyvy_16x16( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 pitch, ++ u32 flags ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = pitch; ++ task->c64x_arg[2] = flags; ++ ++ task->c64x_function = C64X_PUT_IDCT_UYVY_16x16 | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_put_mc_uyvy_16x16__L( DavinciC64xTasks *tasks, ++ unsigned long dest, ++ u32 pitch, ++ u32 flags ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = pitch; ++ task->c64x_arg[2] = flags; ++ ++ task->c64x_function = C64X_PUT_MC_UYVY_16x16 | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_put_mc_uyvy_16x16( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 pitch, ++ u32 flags ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = pitch; ++ task->c64x_arg[2] = flags; ++ ++ task->c64x_function = C64X_PUT_MC_UYVY_16x16 | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_put_sum_uyvy_16x16__L( DavinciC64xTasks *tasks, ++ unsigned long dest, ++ u32 pitch, ++ u32 flags ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = pitch; ++ task->c64x_arg[2] = flags; ++ ++ task->c64x_function = C64X_PUT_SUM_UYVY_16x16 | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_put_sum_uyvy_16x16( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 pitch, ++ u32 flags ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = pitch; ++ task->c64x_arg[2] = flags; ++ ++ task->c64x_function = C64X_PUT_SUM_UYVY_16x16 | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_dva_begin_frame__L( DavinciC64xTasks *tasks, ++ u32 pitch, ++ unsigned long current, ++ unsigned long past, ++ unsigned long future, ++ u32 flags ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = pitch; ++ task->c64x_arg[1] = current; ++ task->c64x_arg[2] = past; ++ task->c64x_arg[3] = future; ++ task->c64x_arg[4] = flags; ++ ++ task->c64x_function = C64X_DVA_BEGIN_FRAME | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_dva_begin_frame( DavinciC64x *c64x, ++ u32 pitch, ++ unsigned long current, ++ unsigned long past, ++ unsigned long future, ++ u32 flags ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = pitch; ++ task->c64x_arg[1] = current; ++ task->c64x_arg[2] = past; ++ task->c64x_arg[3] = future; ++ task->c64x_arg[4] = flags; ++ ++ task->c64x_function = C64X_DVA_BEGIN_FRAME | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_dva_motion_block__L( DavinciC64xTasks *tasks, ++ unsigned long macroblock ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = macroblock; ++ ++ task->c64x_function = C64X_DVA_MOTION_BLOCK | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_dva_motion_block( DavinciC64x *c64x, ++ unsigned long macroblock ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = macroblock; ++ ++ task->c64x_function = C64X_DVA_MOTION_BLOCK | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++/**********************************************************************************************************************/ ++ ++static inline void ++davinci_c64x_dva_idct( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 pitch, ++ unsigned long source ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = pitch; ++ task->c64x_arg[2] = source; ++ ++ task->c64x_function = C64X_DVA_IDCT | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++/**********************************************************************************************************************/ ++ ++static inline void ++davinci_c64x_put_uyvy_16x16( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 pitch, ++ unsigned long source, ++ u32 flags ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = pitch; ++ task->c64x_arg[2] = source; ++ task->c64x_arg[3] = flags; ++ ++ task->c64x_function = C64X_PUT_UYVY_16x16 | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_dither_argb__L( DavinciC64xTasks *tasks, ++ unsigned long dst_rgb, ++ unsigned long dst_alpha, ++ u32 dst_pitch, ++ unsigned long source, ++ u32 src_pitch, ++ u32 width, ++ u32 height ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = dst_rgb; ++ task->c64x_arg[1] = dst_alpha; ++ task->c64x_arg[2] = dst_pitch; ++ task->c64x_arg[3] = source; ++ task->c64x_arg[4] = src_pitch; ++ task->c64x_arg[5] = width; ++ task->c64x_arg[6] = height; ++ ++ task->c64x_function = C64X_DITHER_ARGB | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_dither_argb( DavinciC64x *c64x, ++ unsigned long dst_rgb, ++ unsigned long dst_alpha, ++ u32 dst_pitch, ++ unsigned long source, ++ u32 src_pitch, ++ u32 width, ++ u32 height ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dst_rgb; ++ task->c64x_arg[1] = dst_alpha; ++ task->c64x_arg[2] = dst_pitch; ++ task->c64x_arg[3] = source; ++ task->c64x_arg[4] = src_pitch; ++ task->c64x_arg[5] = width; ++ task->c64x_arg[6] = height; ++ ++ task->c64x_function = C64X_DITHER_ARGB | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_fill_16__L( DavinciC64xTasks *tasks, ++ unsigned long dest, ++ u32 pitch, ++ u32 width, ++ u32 height, ++ u32 value ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = pitch; ++ task->c64x_arg[2] = width; ++ task->c64x_arg[3] = height; ++ task->c64x_arg[4] = value; ++ ++ task->c64x_function = C64X_FILL_16 | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_fill_16( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 pitch, ++ u32 width, ++ u32 height, ++ u32 value ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = pitch; ++ task->c64x_arg[2] = width; ++ task->c64x_arg[3] = height; ++ task->c64x_arg[4] = value; ++ ++ task->c64x_function = C64X_FILL_16 | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_fill_32__L( DavinciC64xTasks *tasks, ++ unsigned long dest, ++ u32 pitch, ++ u32 width, ++ u32 height, ++ u32 value ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = pitch; ++ task->c64x_arg[2] = width; ++ task->c64x_arg[3] = height; ++ task->c64x_arg[4] = value; ++ ++ task->c64x_function = C64X_FILL_32 | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_fill_32( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 pitch, ++ u32 width, ++ u32 height, ++ u32 value ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = pitch; ++ task->c64x_arg[2] = width; ++ task->c64x_arg[3] = height; ++ task->c64x_arg[4] = value; ++ ++ task->c64x_function = C64X_FILL_32 | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_blit_16__L( DavinciC64xTasks *tasks, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long src, ++ u32 spitch, ++ u32 width, ++ u32 height ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = dpitch; ++ task->c64x_arg[2] = src; ++ task->c64x_arg[3] = spitch; ++ task->c64x_arg[4] = width; ++ task->c64x_arg[5] = height; ++ ++ task->c64x_function = C64X_COPY_16 | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_blit_16( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long src, ++ u32 spitch, ++ u32 width, ++ u32 height ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = dpitch; ++ task->c64x_arg[2] = src; ++ task->c64x_arg[3] = spitch; ++ task->c64x_arg[4] = width; ++ task->c64x_arg[5] = height; ++ ++ task->c64x_function = C64X_COPY_16 | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_blit_32__L( DavinciC64xTasks *tasks, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long src, ++ u32 spitch, ++ u32 width, ++ u32 height ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = dpitch; ++ task->c64x_arg[2] = src; ++ task->c64x_arg[3] = spitch; ++ task->c64x_arg[4] = width; ++ task->c64x_arg[5] = height; ++ ++ task->c64x_function = C64X_COPY_32 | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_blit_32( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long src, ++ u32 spitch, ++ u32 width, ++ u32 height ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = dpitch; ++ task->c64x_arg[2] = src; ++ task->c64x_arg[3] = spitch; ++ task->c64x_arg[4] = width; ++ task->c64x_arg[5] = height; ++ ++ task->c64x_function = C64X_COPY_32 | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_stretch_32__L( DavinciC64xTasks *tasks, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long src, ++ u32 spitch, ++ u32 dw, ++ u32 dh, ++ u32 sw, ++ u32 sh, ++ const DFBRegion *clip ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = src; ++ task->c64x_arg[2] = dpitch | (spitch << 16); ++ task->c64x_arg[3] = dh | (dw << 16); ++ task->c64x_arg[4] = sh | (sw << 16); ++ task->c64x_arg[5] = clip->x2 | (clip->y2 << 16); ++ task->c64x_arg[6] = clip->x1 | (clip->y1 << 16); ++ ++ if (sw > dw && sh > dh) ++ task->c64x_function = C64X_STRETCH_32_down | C64X_FLAG_TODO; ++ else ++ task->c64x_function = C64X_STRETCH_32_up | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_stretch_32( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long src, ++ u32 spitch, ++ u32 dw, ++ u32 dh, ++ u32 sw, ++ u32 sh, ++ const DFBRegion *clip ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = src; ++ task->c64x_arg[2] = dpitch | (spitch << 16); ++ task->c64x_arg[3] = dh | (dw << 16); ++ task->c64x_arg[4] = sh | (sw << 16); ++ task->c64x_arg[5] = clip->x2 | (clip->y2 << 16); ++ task->c64x_arg[6] = clip->x1 | (clip->y1 << 16); ++ ++ if (sw > dw && sh > dh) ++ task->c64x_function = C64X_STRETCH_32_down | C64X_FLAG_TODO; ++ else ++ task->c64x_function = C64X_STRETCH_32_up | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_blit_blend_32__L( DavinciC64xTasks *tasks, ++ u32 sub_func, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long src, ++ u32 spitch, ++ u32 width, ++ u32 height, ++ u32 argb, ++ u8 alpha ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = dpitch; ++ task->c64x_arg[2] = src; ++ task->c64x_arg[3] = spitch; ++ task->c64x_arg[4] = width | (height << 16); ++ task->c64x_arg[5] = argb; ++ task->c64x_arg[6] = alpha; ++ ++ task->c64x_function = (sub_func << 16) | C64X_BLEND_32 | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_blit_blend_32( DavinciC64x *c64x, ++ u32 sub_func, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long src, ++ u32 spitch, ++ u32 width, ++ u32 height, ++ u32 argb, ++ u8 alpha ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = dpitch; ++ task->c64x_arg[2] = src; ++ task->c64x_arg[3] = spitch; ++ task->c64x_arg[4] = width | (height << 16); ++ task->c64x_arg[5] = argb; ++ task->c64x_arg[6] = alpha; ++ ++ task->c64x_function = (sub_func << 16) | C64X_BLEND_32 | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_blit_keyed_16__L( DavinciC64xTasks *tasks, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long src, ++ u32 spitch, ++ u32 width, ++ u32 height, ++ u32 key, ++ u32 mask ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = (dpitch << 16) | (spitch & 0xffff); ++ task->c64x_arg[2] = src; ++ task->c64x_arg[3] = width; ++ task->c64x_arg[4] = height; ++ task->c64x_arg[5] = key; ++ task->c64x_arg[6] = mask; ++ ++ task->c64x_function = C64X_COPY_KEYED_16 | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_blit_keyed_16( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long src, ++ u32 spitch, ++ u32 width, ++ u32 height, ++ u32 key, ++ u32 mask ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = (dpitch << 16) | (spitch & 0xffff); ++ task->c64x_arg[2] = src; ++ task->c64x_arg[3] = width; ++ task->c64x_arg[4] = height; ++ task->c64x_arg[5] = key; ++ task->c64x_arg[6] = mask; ++ ++ task->c64x_function = C64X_COPY_KEYED_16 | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_blit_keyed_32__L( DavinciC64xTasks *tasks, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long src, ++ u32 spitch, ++ u32 width, ++ u32 height, ++ u32 key, ++ u32 mask ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = (dpitch << 16) | (spitch & 0xffff); ++ task->c64x_arg[2] = src; ++ task->c64x_arg[3] = width; ++ task->c64x_arg[4] = height; ++ task->c64x_arg[5] = key; ++ task->c64x_arg[6] = mask; ++ ++ task->c64x_function = C64X_COPY_KEYED_32 | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_blit_keyed_32( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long src, ++ u32 spitch, ++ u32 width, ++ u32 height, ++ u32 key, ++ u32 mask ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = (dpitch << 16) | (spitch & 0xffff); ++ task->c64x_arg[2] = src; ++ task->c64x_arg[3] = width; ++ task->c64x_arg[4] = height; ++ task->c64x_arg[5] = key; ++ task->c64x_arg[6] = mask; ++ ++ task->c64x_function = C64X_COPY_KEYED_32 | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++#endif ++ +diff -puNr -Naur directfb-1.6.3-orig/gfxdrivers/davinci/davincifb.h directfb-1.6.3/gfxdrivers/davinci/davincifb.h +--- directfb-1.6.3-orig/gfxdrivers/davinci/davincifb.h 1970-01-01 01:00:00.000000000 +0100 ++++ directfb-1.6.3/gfxdrivers/davinci/davincifb.h 2013-04-07 21:33:21.488622184 +0200 +@@ -0,0 +1,581 @@ ++/* ++ * Copyright (C) 2006 Texas Instruments Inc ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option)any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ * File: davincifb.h ++ */ ++ ++#ifndef DAVINVI_VPBE_H ++#define DAVINVI_VPBE_H ++ ++/* include Linux files */ ++#include ++ ++/* define the custom FBIO_WAITFORVSYNC ioctl */ ++#define FBIO_WAITFORVSYNC _IOW('F', 0x20, u_int32_t) ++#define FBIO_SETATTRIBUTE _IOW('F', 0x21, struct fb_fillrect) ++ ++/* Backported IOCTLS. */ ++#define FBIO_SETPOSX _IOW('F', 0x22, u_int32_t) ++#define FBIO_SETPOSY _IOW('F', 0x23, u_int32_t) ++#define FBIO_SETZOOM _IOW('F', 0x24, struct zoom_params) ++#define FBIO_GETSTD _IOR('F', 0x25, u_int32_t) ++#define FBIO_RESIZER _IOW('F', 0x26, struct vpfe_resizer_params) ++#define FBIO_SYNC _IOW('F', 0x27, u_int32_t) ++ ++typedef struct zoom_params { ++ u_int32_t window_id; ++ u_int32_t zoom_h; ++ u_int32_t zoom_v; ++} zoom_params_t; ++ ++typedef struct vpfe_resizer_params ++{ ++ u_int32_t rsz_cnt; //busy-lock ++ u_int32_t out_size; //busy-lock ++ u_int32_t in_start; //busy-lock ++ u_int32_t in_size; //busy-lock ++ u_int32_t sdr_inadd; //shadowed ++ u_int32_t sdr_inoff; //shadowed ++ u_int32_t sdr_outadd; //shadowed ++ u_int32_t sdr_outoff; //shadowed ++ u_int32_t hfilt[16]; //busy-lock ++ u_int32_t vfilt[16]; //busy-lock ++ u_int32_t yenh; //busy-lock ++} vpfe_resizer_params_t; ++ ++typedef struct fb_set_start { ++ int offset; /* offset from smem_start */ ++ unsigned long physical; /* absolute physical address when offset < 0 */ ++ ++ u_int64_t sync; /* input: target sync counter for change or 0 for no sync at all, ++ output: sync counter of actual change or 0 if still pending */ ++} fb_set_start_t; ++ ++ ++#ifdef _IOC_TYPECHECK ++#undef _IOC_TYPECHECK ++#define _IOC_TYPECHECK(x) (sizeof(x)) ++#endif ++ ++#define RAM_CLUT_SIZE 256*3 ++#define FBIO_ENABLE_DISABLE_WIN \ ++ _IOW('F', 0x30, unsigned char) ++#define FBIO_SET_BITMAP_BLEND_FACTOR \ ++ _IOW('F', 0x31, vpbe_bitmap_blend_params_t) ++#define FBIO_SET_BITMAP_WIN_RAM_CLUT \ ++ _IOW('F', 0x32, unsigned char)*RAM_CLUT_SIZE) ++#define FBIO_ENABLE_DISABLE_ATTRIBUTE_WIN \ ++ _IOW('F', 0x33, unsigned int) ++#define FBIO_GET_BLINK_INTERVAL \ ++ _IOR('F', 0x34, vpbe_blink_option_t) ++#define FBIO_SET_BLINK_INTERVAL \ ++ _IOW('F', 0x35, vpbe_blink_option_t) ++#define FBIO_GET_VIDEO_CONFIG_PARAMS \ ++ _IOR('F', 0x36, vpbe_video_config_params_t) ++#define FBIO_SET_VIDEO_CONFIG_PARAMS \ ++ _IOW('F', 0x37, vpbe_video_config_params_t) ++#define FBIO_GET_BITMAP_CONFIG_PARAMS \ ++ _IOR('F', 0x38, vpbe_bitmap_config_params_t) ++#define FBIO_SET_BITMAP_CONFIG_PARAMS \ ++ _IOW('F', 0x39, vpbe_bitmap_config_params_t) ++#define FBIO_SET_DCLK \ ++ _IOW('F', 0x40, vpbe_dclk_t) ++#define FBIO_SET_INTERFACE \ ++ _IOW('F', 0x41, unsigned char) ++#define FBIO_GET_INTERFACE \ ++ _IOR('F', 0x42, unsigned char) ++#define FBIO_QUERY_TIMING \ ++ _IOWR('F', 0x43, struct vpbe_mode_info) ++#define FBIO_SET_TIMING \ ++ _IOW('F', 0x44, struct vpbe_fb_videomode) ++#define FBIO_GET_TIMING \ ++ _IOR('F', 0x45, struct vpbe_fb_videomode) ++#define FBIO_SET_VENC_CLK_SOURCE \ ++ _IOW('F', 0x46, unsigned char) ++#define FBIO_SET_BACKG_COLOR \ ++ _IOW('F', 0x47, vpbe_backg_color_t) ++#define FBIO_ENABLE_DISPLAY \ ++ _IOW('F', 0x48, unsigned char) ++#define FBIO_SETPOS \ ++ _IOW('F', 0x49, u_int32_t) ++#define FBIO_SET_CURSOR \ ++ _IOW('F', 0x50, struct fb_cursor) ++#define FBIO_SET_START \ ++ _IOW('F', 0x66, struct fb_set_start) ++ ++/* ++ * Defines and Constants ++ */ ++#ifdef __KERNEL__ ++#define DAVINCIFB_DEVICE "davincifb" ++#define DAVINCIFB_DRIVER "davincifb" ++ ++#define MULTIPLE_BUFFERING 1 ++ ++#ifdef MULTIPLE_BUFFERING ++#define DOUBLE_BUF 2 ++#define TRIPLE_BUF 3 ++#else ++#define DOUBLE_BUF 1 ++#define TRIPLE_BUF 1 ++#endif ++ ++/* usage: if (is_win(info->fix.id, OSD0)) ... */ ++#define is_win(name, x) ((strcmp(name, x ## _FBNAME) == 0) ? 1 : 0) ++ ++/* ++ * display controller register I/O routines ++ */ ++u32 dispc_reg_in(u32 offset); ++u32 dispc_reg_out(u32 offset, u32 val); ++u32 dispc_reg_merge(u32 offset, u32 val, u32 mask); ++ ++#endif /*__KERNEL__*/ ++ ++/* Error return codes */ ++#define VPBE_INVALID_PARA_VALUE 700 ++#define VPBE_WRONG_WINDOW_ID 701 ++#define VPBE_CURRENTLY_IN_REQUIRED_MODE 702 ++#define VPBE_INSUFFICIENT_CLUT_VALUES 703 ++#define VPBE_CLUT_WRITE_TIMEOUT 704 ++#define VPBE_VID0_BUF_ADR_NULL 705 ++#define VPBE_WINDOW_NOT_DISABLED 706 ++#define VPBE_WINDOW_NOT_ENABLED 707 ++ ++#ifndef __KERNEL__ ++/* Window ID definations */ ++#define OSD0 0 ++#define VID0 1 ++#define OSD1 2 ++#define VID1 3 ++#endif ++ ++/* There are 4 framebuffers, each represented by an fb_info and ++ * a dm_win_info structure */ ++#define OSD0_FBNAME "dm_osd0_fb" ++#define OSD1_FBNAME "dm_osd1_fb" ++#define VID0_FBNAME "dm_vid0_fb" ++#define VID1_FBNAME "dm_vid1_fb" ++ ++/* FIXME: Digital LCD RGB matrix coefficients */ ++#define DLCD_DGY_VAL 0 ++#define DLCD_DRV_VAL 0 ++#define DLCD_DGU_VAL 0 ++#define DLCD_DBU_VAL 0 ++ ++/* Defines for bitmap format */ ++#define VPBE_BITMAP_BIT_1 1 ++#define VPBE_BITMAP_BIT_2 2 ++#define VPBE_BITMAP_BIT_4 4 ++#define VPBE_BITMAP_BIT_8 8 ++#define VPBE_BITMAP_RGB565 16 ++#define VPBE_VIDEO_YUV422 16 ++#define VPBE_VIDEO_RGB888 24 ++ ++/* Defines foe cursor parameter validation*/ ++#define MAX_CURSOR_WIDTH 0x3FF ++#define MAX_CURSOR_HEIGHT 0x1FF ++#define MAX_CURSOR_LINEWIDTH 7 ++ ++#define BASEX 0x80 ++#define BASEY 0x12 ++#define BASEX_DLCD 0x59 ++#define BASEY_DLCD 0x22 ++ ++/* ++ * Enumerations ++ */ ++/* Enum for blending factor */ ++typedef enum vpbe_blend_factor { ++ OSD_CONTRIBUTION_ZERO = 0, ++ OSD_CONTRIBUTION_1_BY_8 = 1, ++ OSD_CONTRIBUTION_2_BY_8 = 2, ++ OSD_CONTRIBUTION_3_BY_8 = 3, ++ OSD_CONTRIBUTION_4_BY_8 = 4, ++ OSD_CONTRIBUTION_5_BY_8 = 5, ++ OSD_CONTRIBUTION_6_BY_8 = 6, ++ OSD_CONTRIBUTION_ONE = 7 ++} vpbe_blend_factor_t; ++ ++/* Enum for Boolean variables */ ++typedef enum { ++ SET_0 = 0, ++ SET_1 = 1 ++} CB_CR_ORDER, ATTRIBUTE, ROM_RAM_CLUT; ++ ++/* Defines for Display Interface */ ++#define PRGB 0 ++#define COMPOSITE 1 ++#define SVIDEO 2 ++#define COMPONENT 3 ++#define RGB 4 ++#define YCC16 5 ++#define YCC8 6 ++#define SRGB 7 ++#define EPSON 8 ++#define CASIO1G 9 ++#define UDISP 10 ++#define STN 11 ++#define VPBE_MAX_INTERFACES 12 ++ ++/* Defines for Display Mode */ ++#define LCD 0 ++#define NTSC 1 ++#define PAL 2 ++#define P525 3 ++#define P625 4 ++ ++#define DEFAULT_MODE 0 ++#define P480 0 ++#define P400 1 ++#define P350 2 ++#define NON_EXISTING_MODE 255 ++/* Enable/Disable enum */ ++typedef enum { ++ VPBE_DISABLE = 0, ++ VPBE_ENABLE = 1 ++} ATTENUATION, TRANSPARENCY, EXPANSION, BLINKING; ++ ++typedef enum clk_source { ++ CLK_SOURCE_CLK27 = 0, ++ CLK_SOURCE_CLK54 = 1, ++ CLK_SOURCE_VPBECLK = 2 ++} CLK_SOURCE; ++ ++/* ++ * Structures and Union Definitions ++ */ ++ ++/* Structure for transparency and the blending factor for the bitmap window */ ++typedef struct vpbe_bitmap_blend_params { ++ unsigned int colorkey; /* color key to be blend */ ++ unsigned int enable_colorkeying; /* enable color keying */ ++ unsigned int bf; /* valid range from 0 to 7 only. */ ++} vpbe_bitmap_blend_params_t; ++ ++/* Structure for window expansion */ ++typedef struct vpbe_win_expansion { ++ EXPANSION horizontal; ++ EXPANSION vertical; /* 1: Enable 0:disable */ ++} vpbe_win_expansion_t; ++ ++/* Structure for OSD window blinking options */ ++typedef struct vpbe_blink_option { ++ BLINKING blinking; /* 1: Enable blinking 0: Disable */ ++ unsigned int interval; /* Valid only if blinking is 1 */ ++} vpbe_blink_option_t; ++ ++/* Structure for DCLK parameters */ ++typedef struct vpbe_dclk { ++ unsigned char dclk_pattern_width; ++ unsigned int dclk_pattern0; ++ unsigned int dclk_pattern1; ++ unsigned int dclk_pattern2; ++ unsigned int dclk_pattern3; ++} vpbe_dclk_t; ++ ++/* Structure for display format */ ++typedef struct vpbe_display_format { ++ unsigned char interface; /* Output interface type */ ++ unsigned char mode; /* output mode */ ++} vpbe_display_format_t; ++ ++/* Structure for background color */ ++typedef struct vpbe_backg_color { ++ unsigned char clut_select; /* 2: RAM CLUT 1:ROM1 CLUT 0:ROM0 CLUT */ ++ unsigned char color_offset; /* index of color */ ++} vpbe_backg_color_t; ++ ++/* Structure for Video window configurable parameters */ ++typedef struct vpbe_video_config_params { ++ CB_CR_ORDER cb_cr_order; /*Cb/Cr order in input data for a pixel. */ ++ /* 0: cb cr 1: cr cb */ ++ vpbe_win_expansion_t exp_info; /* HZ/VT Expansion enable disable */ ++} vpbe_video_config_params_t; ++ ++/*Union of structures giving the CLUT index for the 1, 2, 4 bit bitmap values.*/ ++typedef union vpbe_clut_idx { ++ struct _for_4bit_bimap { ++ unsigned char bitmap_val_0; ++ unsigned char bitmap_val_1; ++ unsigned char bitmap_val_2; ++ unsigned char bitmap_val_3; ++ unsigned char bitmap_val_4; ++ unsigned char bitmap_val_5; ++ unsigned char bitmap_val_6; ++ unsigned char bitmap_val_7; ++ unsigned char bitmap_val_8; ++ unsigned char bitmap_val_9; ++ unsigned char bitmap_val_10; ++ unsigned char bitmap_val_11; ++ unsigned char bitmap_val_12; ++ unsigned char bitmap_val_13; ++ unsigned char bitmap_val_14; ++ unsigned char bitmap_val_15; ++ } for_4bit_bimap; ++ struct _for_2bit_bimap { ++ unsigned char bitmap_val_0; ++ unsigned char dummy0[4]; ++ unsigned char bitmap_val_1; ++ unsigned char dummy1[4]; ++ unsigned char bitmap_val_2; ++ unsigned char dummy2[4]; ++ unsigned char bitmap_val_3; ++ } for_2bit_bimap; ++ struct _for_1bit_bimap { ++ unsigned char bitmap_val_0; ++ unsigned char dummy0[14]; ++ unsigned char bitmap_val_1; ++ } for_1bit_bimap; ++} vpbe_clut_idx_t; ++ ++/* Structure for bitmap window configurable parameters */ ++typedef struct vpbe_bitmap_config_params { ++ /* Only for bitmap width = 1,2,4 bits */ ++ vpbe_clut_idx_t clut_idx; ++ /* Attenuation value for YUV o/p for bitmap window */ ++ unsigned char attenuation_enable; ++ /* 0: ROM DM270, 1:ROM DM320, 2:RAM CLUT */ ++ unsigned char clut_select; ++} vpbe_bitmap_config_params_t; ++ ++/* Unioun for video/OSD configuration parameters */ ++typedef union vpbe_conf_params { ++ ++ struct vpbe_video_params { ++ CB_CR_ORDER cb_cr_order; ++ /* HZ/VT Expansion enable disable */ ++ vpbe_win_expansion_t exp_info; ++ } video_params; ++ ++ struct vpbe_bitmap_params { ++ /* Attenuation value for YUV o/p */ ++ ATTENUATION attenuation_enable; ++ /* 0: ROM DM270, 1: ROM DM320, 2:RAM CLUT */ ++ unsigned char clut_select; ++ /* Only for bitmap width = 1,2,4 bits */ ++ vpbe_clut_idx_t clut_idx; ++ /* 0: OSD window is bitmap window */ ++ /* 1: OSD window is attribute window */ ++ ATTRIBUTE enable_attribute; ++ /* To hold bps value. ++ Used to switch back from attribute to bitmap. */ ++ unsigned int stored_bits_per_pixel; ++ /* Blending information */ ++ vpbe_bitmap_blend_params_t blend_info; ++ /* OSD Blinking information */ ++ vpbe_blink_option_t blink_info; ++ } bitmap_params; ++ ++} vpbe_conf_params_t; ++ ++typedef struct vpbe_video_params vpbe_video_params_t; ++typedef struct vpbe_bitmap_params vpbe_bitmap_params_t; ++ ++/* Structure to hold window position */ ++typedef struct vpbe_window_position { ++ unsigned int xpos; /* X position of the window */ ++ unsigned int ypos; /* Y position of the window */ ++} vpbe_window_position_t; ++ ++#ifdef __KERNEL__ ++/* Structure for each window */ ++typedef struct vpbe_dm_win_info { ++ struct fb_info info; ++ vpbe_window_position_t win_pos; /* X,Y position of window */ ++ /* Size of window is already there in var_info structure. */ ++ ++ dma_addr_t fb_base_phys; /*framebuffer area */ ++ unsigned int fb_base; /*window memory pointer */ ++ unsigned int fb_size; /*memory size */ ++ unsigned int pseudo_palette[17]; ++ int alloc_fb_mem; ++ /*flag to identify if framebuffer area is fixed or not */ ++ unsigned long sdram_address; ++ struct vpbe_dm_info *dm; ++ unsigned char window_enable; /*Additions for all windows */ ++ zoom_params_t zoom; /*Zooming parameters */ ++ unsigned char field_frame_select; /*To select Field or frame */ ++ unsigned char numbufs; /*Number of buffers valid 2 or 3 */ ++ vpbe_conf_params_t conf_params; ++ /*window configuration parameter union pointer */ ++} vpbe_dm_win_info_t; ++#endif /*__KERNEL__*/ ++ ++/* ++ * Videmode structure for display interface and mode settings ++ */ ++typedef struct vpbe_fb_videomode { ++ unsigned char name[10]; /* Mode name ( NTSC , PAL) */ ++ unsigned int vmode; /* FB_MODE_INTERLACED or FB_MODE_NON_INTERLACED */ ++ unsigned int xres; /* X Resolution of the display */ ++ unsigned int yres; /* Y Resolution of the display */ ++ unsigned int fps; /* frames per second */ ++ /* Timing Parameters applicable for std = 0 only */ ++ unsigned int left_margin; ++ unsigned int right_margin; ++ unsigned int upper_margin; ++ unsigned int lower_margin; ++ unsigned int hsync_len; ++ unsigned int vsync_len; ++ unsigned int sync; /* 0: hsync -ve/vsync -ve */ ++ /*1: hsync -ve/vsync +ve */ ++ /*2: hsync +ve/vsync -ve */ ++ /*3: hsync +ve/vsync +ve */ ++ unsigned int basepx; /* Display x,y start position */ ++ unsigned int basepy; ++/* 1= Mode s available in modelist 0=Mode is not available in modelist */ ++ unsigned int std; ++} vpbe_fb_videomode_t; ++ ++/* Structure to interface videomode to application*/ ++typedef struct vpbe_mode_info { ++ vpbe_fb_videomode_t vid_mode; ++ unsigned char interface; ++ unsigned char mode_idx; ++} vpbe_mode_info_t; ++ ++#ifdef __KERNEL__ ++/* ++ * Structure for the driver holding information of windows, ++ * memory base addresses etc. ++ */ ++typedef struct vpbe_dm_info { ++ vpbe_dm_win_info_t *osd0; ++ vpbe_dm_win_info_t *osd1; ++ vpbe_dm_win_info_t *vid0; ++ vpbe_dm_win_info_t *vid1; ++ ++/* to map the registers */ ++ dma_addr_t mmio_base_phys; ++ unsigned int mmio_base; ++ unsigned int mmio_size; ++ ++ wait_queue_head_t vsync_wait; ++ unsigned int vsync_cnt; ++ int timeout; ++ ++ /* this is the function that configures the output device (NTSC/PAL/LCD) ++ * for the required output format (composite/s-video/component/rgb) ++ */ ++ void (*output_device_config) (void); ++ ++ struct device *dev; ++ ++ vpbe_backg_color_t backg; /* background color */ ++ vpbe_dclk_t dclk; /*DCLK parameters */ ++ vpbe_display_format_t display; /*Display interface and mode */ ++ vpbe_fb_videomode_t videomode; /*Cuurent videomode */ ++ char ram_clut[256][3]; /*RAM CLUT array */ ++ struct fb_cursor cursor; /* cursor config params from fb.h */ ++/*Flag that indicates whether any of the display is enabled or not*/ ++ int display_enable; ++} vpbe_dm_info_t; ++ ++/* ++ * Functions Definitions for 'davincifb' module ++ */ ++int vpbe_mem_alloc_window_buf(vpbe_dm_win_info_t *); ++int vpbe_mem_release_window_buf(vpbe_dm_win_info_t *); ++void init_display_function(vpbe_display_format_t *); ++int vpbe_mem_alloc_struct(vpbe_dm_win_info_t **); ++void set_vid0_default_conf(void); ++void set_vid1_default_conf(void); ++void set_osd0_default_conf(void); ++void set_osd1_default_conf(void); ++void set_cursor_default_conf(void); ++void set_dm_default_conf(void); ++void set_win_enable(char *, unsigned int); ++int within_vid0_limits(u32, u32, u32, u32); ++void vpbe_set_display_default(void); ++#ifdef __KERNEL__ ++void set_win_position(char *, u32, u32, u32, u32); ++void change_win_param(int); ++void set_interlaced(char *, unsigned int); ++#endif /* __KERNEL__ */ ++ ++/* ++ * Function definations for 'osd' module ++ */ ++ ++int vpbe_enable_window(vpbe_dm_win_info_t *); ++int vpbe_disable_window(vpbe_dm_win_info_t *); ++int vpbe_vid_osd_select_field_frame(u8 *, u8); ++int vpbe_bitmap_set_blend_factor(u8 *, vpbe_bitmap_blend_params_t *); ++int vpbe_bitmap_set_ram_clut(void); ++int vpbe_enable_disable_attribute_window(u32); ++int vpbe_get_blinking(u8 *, vpbe_blink_option_t *); ++int vpbe_set_blinking(u8 *, vpbe_blink_option_t *); ++int vpbe_set_vid_params(u8 *, vpbe_video_config_params_t *); ++int vpbe_get_vid_params(u8 *, vpbe_video_config_params_t *); ++int vpbe_bitmap_get_params(u8 *, vpbe_bitmap_config_params_t *); ++int vpbe_bitmap_set_params(u8 *, vpbe_bitmap_config_params_t *); ++int vpbe_set_cursor_params(struct fb_cursor *); ++int vpbe_set_vid_expansion(vpbe_win_expansion_t *); ++int vpbe_set_dclk(vpbe_dclk_t *); ++int vpbe_set_display_format(vpbe_display_format_t *); ++int vpbe_set_backg_color(vpbe_backg_color_t *); ++int vpbe_set_interface(u8); ++int vpbe_query_mode(vpbe_mode_info_t *); ++int vpbe_set_mode(struct vpbe_fb_videomode *); ++int vpbe_set_venc_clk_source(u8); ++void set_vid0_default_conf(void); ++void set_osd0_default_conf(void); ++void set_vid1_default_conf(void); ++void set_osd1_default_conf(void); ++void set_cursor_default_conf(void); ++void set_dm_default_conf(void); ++/* ++ * Function definations for 'venc' module ++ */ ++ ++void davincifb_ntsc_composite_config(void); ++void davincifb_ntsc_svideo_config(void); ++void davincifb_ntsc_component_config(void); ++void davincifb_pal_composite_config(void); ++void davincifb_pal_svideo_config(void); ++void davincifb_pal_component_config(void); ++ ++void vpbe_davincifb_ntsc_rgb_config(void); ++void vpbe_davincifb_pal_rgb_config(void); ++void vpbe_davincifb_525p_component_config(void); ++void vpbe_davincifb_625p_component_config(void); ++ ++void vpbe_enable_venc(int); ++void vpbe_enable_dacs(int); ++/* ++ * Function definations for 'dlcd' module ++ */ ++void vpbe_davincifb_480p_prgb_config(void); ++void vpbe_davincifb_400p_prgb_config(void); ++void vpbe_davincifb_350p_prgb_config(void); ++void vpbe_set_display_timing(struct vpbe_fb_videomode *); ++ ++void vpbe_enable_lcd(int); ++/* ++ * Following functions are not implemented ++ */ ++void vpbe_davincifb_default_ycc16_config(void); ++void vpbe_davincifb_default_ycc8_config(void); ++void vpbe_davincifb_default_srgb_config(void); ++void vpbe_davincifb_default_epson_config(void); ++void vpbe_davincifb_default_casio_config(void); ++void vpbe_davincifb_default_UDISP_config(void); ++void vpbe_davincifb_default_STN_config(void); ++#endif /*__KERNEL__*/ ++ ++#endif /* End of #ifndef DAVINCI_VPBE_H */ +diff -puNr -Naur directfb-1.6.3-orig/gfxdrivers/davinci/davinci_gfxdriver.h directfb-1.6.3/gfxdrivers/davinci/davinci_gfxdriver.h +--- directfb-1.6.3-orig/gfxdrivers/davinci/davinci_gfxdriver.h 1970-01-01 01:00:00.000000000 +0100 ++++ directfb-1.6.3/gfxdrivers/davinci/davinci_gfxdriver.h 2013-04-07 21:33:19.560662133 +0200 +@@ -0,0 +1,169 @@ ++/* ++ TI Davinci driver - Graphics Driver ++ ++ (c) Copyright 2007 Telio AG ++ ++ Written by Denis Oliver Kropp ++ ++ Code is derived from VMWare driver. ++ ++ (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) ++ (c) Copyright 2000-2004 Convergence (integrated media) GmbH ++ ++ All rights reserved. ++ ++ This library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2 of the License, or (at your option) any later version. ++ ++ This library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with this library; if not, write to the ++ Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ Boston, MA 02111-1307, USA. ++*/ ++ ++#ifndef __DAVINCI_GFXDRIVER_H__ ++#define __DAVINCI_GFXDRIVER_H__ ++ ++#include ++#include ++ ++#include ++ ++#include "davincifb.h" ++ ++#include "davinci_c64x.h" ++ ++ ++typedef struct { ++ /* validation flags */ ++ int v_flags; ++ ++ /* cached/computed values */ ++ void *dst_addr; ++ unsigned long dst_phys; ++ unsigned int dst_size; ++ unsigned long dst_pitch; ++ DFBSurfacePixelFormat dst_format; ++ unsigned long dst_bpp; ++ ++ void *src_addr; ++ unsigned long src_phys; ++ unsigned long src_pitch; ++ DFBSurfacePixelFormat src_format; ++ unsigned long src_bpp; ++ ++ unsigned long source_mult; ++ ++ unsigned long fillcolor; ++ ++ int blit_blend_sub_function; ++ int draw_blend_sub_function; ++ ++ DFBColor color; ++ unsigned long color_argb; ++ unsigned long colorkey; ++ ++ DFBSurfaceBlittingFlags blitting_flags; ++ ++ DFBRegion clip; ++ ++ /** Add shared data here... **/ ++ struct fb_fix_screeninfo fix[4]; ++ ++ CoreSurfacePool *osd_pool; ++ CoreSurfacePool *video_pool; ++ ++ bool synced; ++} DavinciDeviceData; ++ ++ ++typedef struct { ++ int num; ++ int fd; ++ void *mem; ++ int size; ++} DavinciFB; ++ ++typedef struct { ++ DavinciDeviceData *ddev; ++ ++ CoreDFB *core; ++ ++ CoreScreen *screen; ++ CoreLayer *osd; ++ CoreLayer *video; ++ ++ DavinciFB fb[4]; ++ ++ DavinciC64x c64x; ++ bool c64x_present; ++ ++ DavinciC64xTasks tasks; ++} DavinciDriverData; ++ ++ ++static inline DFBResult ++davincifb_pan_display( const DavinciFB *fb, ++ struct fb_var_screeninfo *var, ++ const CoreSurfaceBufferLock *lock, ++ DFBSurfaceFlipFlags flags, ++ int x, ++ int y ) ++{ ++ int ret; ++ ++ if (lock) { ++#ifdef FBIO_SET_START ++ CoreSurfaceBuffer *buffer = lock->buffer; ++ struct fb_set_start set_start; ++ ++ /* physical mode */ ++ set_start.offset = -1; ++ set_start.sync = (flags & DSFLIP_ONSYNC) ? 1 : 0; ++ ++ /* life's so easy */ ++ set_start.physical = lock->phys + DFB_BYTES_PER_LINE( buffer->format, x ) + y * lock->pitch; ++ ++ ret = ioctl( fb->fd, FBIO_SET_START, &set_start ); ++ if (ret < 0) ++ D_DEBUG( "FBIO_SET_START (0x%08lx, sync %llu) failed!\n", ++ set_start.physical, set_start.sync ); ++ ++ if (ret == 0) { ++ if (flags & DSFLIP_WAIT) ++ ioctl( fb->fd, FBIO_WAITFORVSYNC ); ++ ++ return DFB_OK; ++ } ++ ++ /* fallback */ ++#endif ++ var->xoffset = x; /* poor version */ ++ var->yoffset = y + lock->offset / lock->pitch; ++ } ++ else { ++ var->xoffset = x; ++ var->yoffset = y; ++ } ++ ++ var->activate = /*(flags & DSFLIP_ONSYNC) ? FB_ACTIVATE_VBL :*/ FB_ACTIVATE_NOW; ++ ++ ret = ioctl( fb->fd, FBIOPAN_DISPLAY, var ); ++ if (ret) ++ D_PERROR( "Davinci/FB: FBIOPAN_DISPLAY (fb%d - %d,%d) failed!\n", ++ fb->num, var->xoffset, var->yoffset ); ++ ++ if (flags & DSFLIP_WAIT) ++ ioctl( fb->fd, FBIO_WAITFORVSYNC ); ++ ++ return DFB_OK; ++} ++ ++#endif +diff -puNr -Naur directfb-1.6.3-orig/tests/voodoo/voodoo_test.h directfb-1.6.3/tests/voodoo/voodoo_test.h +--- directfb-1.6.3-orig/tests/voodoo/voodoo_test.h 1970-01-01 01:00:00.000000000 +0100 ++++ directfb-1.6.3/tests/voodoo/voodoo_test.h 2013-04-07 21:33:31.824408024 +0200 +@@ -0,0 +1,10 @@ ++#ifndef __VOODOO_TEST_H__ ++#define __VOODOO_TEST_H__ ++ ++typedef enum { ++ VOODOO_TEST_INCREASE, ++ VOODOO_TEST_QUERY ++} VoodooTestCall; ++ ++#endif ++ diff --git a/package/directfb/directfb-imlib2-config.patch b/package/directfb/directfb-imlib2-config.patch new file mode 100644 index 0000000000..1203475b30 --- /dev/null +++ b/package/directfb/directfb-imlib2-config.patch @@ -0,0 +1,21 @@ +Call the imlib2-conf variable that are set by ac_cv_path_IMLIB2_CONFIG +with the absolute path because the imlib2-config file is not covered +by the PATH variable. +This is important for cross compiler that need to get the staging settings +instead of the host settings. + +Signed-off-by: Carsten Schoenert + +--- directfb-1.6.3/configure.orig 2013-03-31 13:18:22.837560379 +0200 ++++ directfb-1.6.3/configure 2013-03-31 13:23:40.177541099 +0200 +@@ -19816,8 +19816,8 @@ fi + $as_echo "$as_me: WARNING: *** Imlib2 library not found, building without Imlib2 support ***" >&2;} + imlib2="no" + else +- IMLIB2_CFLAGS=`imlib2-config --cflags` +- IMLIB2_LIBS=`imlib2-config --libs` ++ IMLIB2_CFLAGS=`$IMLIB2_CONFIG --cflags` ++ IMLIB2_LIBS=`$IMLIB2_CONFIG --libs` + imlib2="yes" + fi + fi diff --git a/package/directfb/directfb-remove-redefinition-of-__typeof__.patch b/package/directfb/directfb-remove-redefinition-of-__typeof__.patch new file mode 100644 index 0000000000..e3861af97c --- /dev/null +++ b/package/directfb/directfb-remove-redefinition-of-__typeof__.patch @@ -0,0 +1,28 @@ +Remove definition to fix qt5 build. + +Fetch from: http://git.directfb.org/?p=core/DirectFB.git;a=patch;h=203f78a4193a8ff110dec3c860e0928af1a0a72f + +From 203f78a4193a8ff110dec3c860e0928af1a0a72f Mon Sep 17 00:00:00 2001 +From: Denis Oliver Kropp +Date: Wed, 31 Jul 2013 21:56:05 +0200 +Subject: [PATCH] libdirect: Remove redefinition of __typeof__!!! + +--- + lib/direct/os/linux/glibc/types.h | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/lib/direct/os/linux/glibc/types.h b/lib/direct/os/linux/glibc/types.h +index 08e94b2..80cb350 100644 +--- a/lib/direct/os/linux/glibc/types.h ++++ b/lib/direct/os/linux/glibc/types.h +@@ -81,7 +81,6 @@ typedef int64_t s64; + #define __dfb_no_instrument_function__ __attribute__((no_instrument_function)) + #define __constructor__ __attribute__((constructor)) + #define __destructor__ __attribute__((destructor)) +-#define __typeof__(x) __typeof__(x) + + #ifndef __func__ + #define __func__ __FUNCTION__ +-- +1.7.9.5 + diff --git a/package/directfb/directfb-setregion-lock.patch b/package/directfb/directfb-setregion-lock.patch new file mode 100644 index 0000000000..8a246ea057 --- /dev/null +++ b/package/directfb/directfb-setregion-lock.patch @@ -0,0 +1,92 @@ +This patch fixes builderrors while using '--with-gfxdrivers' and +'--with-inputdrivers' with the current DirectFB version 1.6.3. + +Patch is taken from +http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-libs/DirectFB/files/DirectFB-1.6.3-setregion.patch + +Signed-off-by: Carsten Schoenert + +--- directfb-1.6.3/gfxdrivers/cyber5k/cyber5k.c ++++ directfb-1.6.3/gfxdrivers/cyber5k/cyber5k.c +@@ -636,7 +636,8 @@ osdSetRegion( CoreLayer + CoreLayerRegionConfigFlags updated, + CoreSurface *surface, + CorePalette *palette, +- CoreSurfaceBufferLock *lock ) ++ CoreSurfaceBufferLock *left_lock, ++ CoreSurfaceBufferLock *right_lock ) + { + DFBResult ret; + +@@ -644,7 +645,7 @@ osdSetRegion( CoreLayer + ret = oldPrimaryFuncs.SetRegion( layer, oldPrimaryDriverData, + layer_data, region_data, + config, updated, surface, +- palette, lock ); ++ palette, left_lock, right_lock ); + if (ret) + return ret; + +--- directfb-1.6.3/gfxdrivers/radeon/radeon_crtc1.c ++++ directfb-1.6.3/gfxdrivers/radeon/radeon_crtc1.c +@@ -147,14 +147,15 @@ crtc1SetRegion( CoreLayer + CoreLayerRegionConfigFlags updated, + CoreSurface *surface, + CorePalette *palette, +- CoreSurfaceBufferLock *lock ) ++ CoreSurfaceBufferLock *left_lock, ++ CoreSurfaceBufferLock *right_lock ) + { + + if (updated & ~CLRCF_OPTIONS) { + return OldPrimaryLayerFuncs.SetRegion( layer, + OldPrimaryLayerDriverData, + layer_data, region_data, +- config, updated, surface, palette, lock ); ++ config, updated, surface, palette, left_lock, right_lock ); + } + + return DFB_OK; +--- directfb-1.6.3/gfxdrivers/cle266/uc_primary.c ++++ directfb-1.6.3/gfxdrivers/cle266/uc_primary.c +@@ -138,7 +138,8 @@ osdSetRegion( CoreLayer + CoreLayerRegionConfigFlags updated, + CoreSurface *surface, + CorePalette *palette, +- CoreSurfaceBufferLock *lock ) ++ CoreSurfaceBufferLock *left_lock, ++ CoreSurfaceBufferLock *right_lock ) + { + DFBResult ret; + UcDriverData *ucdrv = (UcDriverData*) driver_data; +@@ -147,7 +148,7 @@ osdSetRegion( CoreLayer + ret = ucOldPrimaryFuncs.SetRegion( layer, ucOldPrimaryDriverData, + layer_data, region_data, + config, updated, surface, +- palette, lock ); ++ palette, left_lock, right_lock ); + if (ret) + return ret; + +--- directfb-1.6.3/gfxdrivers/unichrome/uc_primary.c ++++ directfb-1.6.3/gfxdrivers/unichrome/uc_primary.c +@@ -135,7 +135,8 @@ osdSetRegion( CoreLayer + CoreLayerRegionConfigFlags updated, + CoreSurface *surface, + CorePalette *palette, +- CoreSurfaceBufferLock *lock ) ++ CoreSurfaceBufferLock *left_lock, ++ CoreSurfaceBufferLock *right_lock ) + { + DFBResult ret; + UcDriverData *ucdrv = (UcDriverData*) driver_data; +@@ -144,7 +145,7 @@ osdSetRegion( CoreLayer + ret = ucOldPrimaryFuncs.SetRegion( layer, ucOldPrimaryDriverData, + layer_data, region_data, + config, updated, surface, +- palette, lock ); ++ palette, left_lock, right_lock ); + if (ret) + return ret; + + diff --git a/package/directfb/directfb-use-gcc-link.patch b/package/directfb/directfb-use-gcc-link.patch new file mode 100644 index 0000000000..ec6c0ea501 --- /dev/null +++ b/package/directfb/directfb-use-gcc-link.patch @@ -0,0 +1,35 @@ +Add patch to use 'gcc' instead of 'ld' for linking + +The patch has been sent upstream but it has not been merged yet + +Signed-off-by: Markos Chandras + +From 176ce06b40897a357fe76a558af517197325f188 Mon Sep 17 00:00:00 2001 +From: Markos Chandras +Date: Wed, 28 Aug 2013 10:56:32 +0100 +Subject: [PATCH] rules/libobject.make: Use gcc for linking + +Invoking 'ld' directly may miss some necessary linker flags which +are usually passed by gcc. Therefore, use gcc for linking. + +Signed-off-by: Markos Chandras +--- + rules/libobject.make | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/rules/libobject.make b/rules/libobject.make +index bc670da..2cba658 100644 +--- a/rules/libobject.make ++++ b/rules/libobject.make +@@ -3,7 +3,7 @@ + if test -d $<.tmp; then rmdir $<.tmp; fi + mkdir $<.tmp + (cd $<.tmp && $(AR) x ../../$<) +- $(LD) -o $@ -r $<.tmp/*.o ++ $(CC) -nostdlib -o $@ -r $<.tmp/*.o + rm -f $<.tmp/*.o && rmdir $<.tmp + + .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) +-- +1.8.3.2 + diff --git a/package/directfb/directfb.mk b/package/directfb/directfb.mk index 98590cc716..1d83a0b623 100644 --- a/package/directfb/directfb.mk +++ b/package/directfb/directfb.mk @@ -1,20 +1,21 @@ -############################################################# +################################################################################ # # directfb # -############################################################# -DIRECTFB_VERSION_MAJOR = 1.4 -DIRECTFB_VERSION = $(DIRECTFB_VERSION_MAJOR).11 +################################################################################ + +DIRECTFB_VERSION_MAJOR = 1.6 +DIRECTFB_VERSION = $(DIRECTFB_VERSION_MAJOR).3 DIRECTFB_SITE = http://www.directfb.org/downloads/Core/DirectFB-$(DIRECTFB_VERSION_MAJOR) DIRECTFB_SOURCE = DirectFB-$(DIRECTFB_VERSION).tar.gz -DIRECTFB_AUTORECONF = YES +DIRECTFB_LICENSE = LGPLv2.1+ +DIRECTFB_LICENSE_FILES = COPYING DIRECTFB_INSTALL_STAGING = YES +DIRECTFB_AUTORECONF = YES + DIRECTFB_CONF_OPT = \ --localstatedir=/var \ - --enable-static \ - --enable-shared \ --disable-explicit-deps \ - --program-prefix='' \ --enable-zlib \ --enable-freetype \ --enable-fbdev \ @@ -25,6 +26,7 @@ DIRECTFB_CONF_OPT = \ --disable-video4linux \ --disable-video4linux2 \ --without-tools +DIRECTFB_CONFIG_SCRIPTS = directfb-config DIRECTFB_DEPENDENCIES = freetype zlib @@ -44,7 +46,7 @@ endif ifeq ($(BR2_PACKAGE_XSERVER),y) DIRECTFB_CONF_OPT += --enable-x11 else -DIRECTFB_CONF_OPT += -disable-x11 +DIRECTFB_CONF_OPT += --disable-x11 endif ifeq ($(BR2_PACKAGE_DIRECTFB_UNIQUE),y) @@ -53,7 +55,7 @@ else DIRECTFB_CONF_OPT += --disable-unique endif -DIRECTFB_GFX := \ +DIRECTFB_GFX = \ $(if $(BR2_PACKAGE_DIRECTFB_ATI128),ati128) \ $(if $(BR2_PACKAGE_DIRECTFB_CLE266),cle266) \ $(if $(BR2_PACKAGE_DIRECTFB_CYBER5K),cyber5k) \ @@ -64,14 +66,13 @@ DIRECTFB_GFX := \ $(if $(BR2_PACKAGE_DIRECTFB_EP9X),ep9x) ifeq ($(strip $(DIRECTFB_GFX)),) -DIRECTFB_GFX:=none +DIRECTFB_CONF_OPT += --with-gfxdrivers=none else -DIRECTFB_GFX:=$(subst $(space),$(comma),$(strip $(DIRECTFB_GFX))) +DIRECTFB_CONF_OPT += \ + --with-gfxdrivers=$(subst $(space),$(comma),$(strip $(DIRECTFB_GFX))) endif -DIRECTFB_CONF_OPT += --with-gfxdrivers=$(DIRECTFB_GFX) - -DIRECTFB_INPUT := \ +DIRECTFB_INPUT = \ $(if $(BR2_PACKAGE_DIRECTFB_LINUXINPUT),linuxinput) \ $(if $(BR2_PACKAGE_DIRECTFB_KEYBOARD),keyboard) \ $(if $(BR2_PACKAGE_DIRECTFB_PS2MOUSE),ps2mouse) \ @@ -83,13 +84,12 @@ DIRECTFB_DEPENDENCIES += tslib endif ifeq ($(strip $(DIRECTFB_INPUT)),) -DIRECTFB_INPUT:=none +DIRECTFB_CONF_OPT += --with-inputdrivers=none else -DIRECTFB_INPUT:=$(subst $(space),$(comma),$(strip $(DIRECTFB_INPUT))) +DIRECTFB_CONF_OPT += \ + --with-inputdrivers=$(subst $(space),$(comma),$(strip $(DIRECTFB_INPUT))) endif -DIRECTFB_CONF_OPT += --with-inputdrivers=$(DIRECTFB_INPUT) - ifeq ($(BR2_PACKAGE_DIRECTFB_GIF),y) DIRECTFB_CONF_OPT += --enable-gif else @@ -111,20 +111,26 @@ else DIRECTFB_CONF_OPT += --disable-jpeg endif -ifeq ($(BR2_PACKAGE_DIRECTB_DITHER_RGB16),y) +ifeq ($(BR2_PACKAGE_DIRECTFB_IMLIB2),y) +DIRECTFB_CONF_OPT += --enable-imlib2 +DIRECTFB_DEPENDENCIES += imlib2 +DIRECTFB_CONF_ENV += ac_cv_path_IMLIB2_CONFIG=$(STAGING_DIR)/usr/bin/imlib2-config +else +DIRECTFB_CONF_OPT += --disable-imlib2 +endif + +ifeq ($(BR2_PACKAGE_DIRECTFB_DITHER_RGB16),y) DIRECTFB_CONF_OPT += --with-dither-rgb16=advanced else DIRECTFB_CONF_OPT += --with-dither-rgb16=none endif -ifeq ($(BR2_PACKAGE_DIRECTB_TESTS),y) +ifeq ($(BR2_PACKAGE_DIRECTFB_TESTS),y) DIRECTFB_CONF_OPT += --with-tests endif -HOST_DIRECTFB_DEPENDENCIES = host-pkg-config host-libpng +HOST_DIRECTFB_DEPENDENCIES = host-pkgconf host-libpng HOST_DIRECTFB_CONF_OPT = \ - --enable-shared \ - --disable-static \ --disable-debug \ --disable-multi \ --enable-png \ @@ -137,16 +143,8 @@ HOST_DIRECTFB_BUILD_CMDS = \ HOST_DIRECTFB_INSTALL_CMDS = \ $(INSTALL) -m 0755 $(@D)/tools/directfb-csource $(HOST_DIR)/usr/bin -define DIRECTFB_STAGING_CONFIG_FIXUP - $(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g" \ - -e "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" \ - $(STAGING_DIR)/usr/bin/directfb-config -endef - -DIRECTFB_POST_INSTALL_STAGING_HOOKS += DIRECTFB_STAGING_CONFIG_FIXUP - -$(eval $(call AUTOTARGETS,package,directfb)) -$(eval $(call AUTOTARGETS,package,directfb,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) # directfb-csource for the host -DIRECTFB_HOST_BINARY:=$(HOST_DIR)/usr/bin/directfb-csource +DIRECTFB_HOST_BINARY = $(HOST_DIR)/usr/bin/directfb-csource diff --git a/package/distcc/Config.in b/package/distcc/Config.in index 0b518c6ac3..2c30a21420 100644 --- a/package/distcc/Config.in +++ b/package/distcc/Config.in @@ -1,5 +1,7 @@ config BR2_PACKAGE_DISTCC bool "distcc" + # needs fork() + depends on BR2_USE_MMU help Distributed compiler client and server. Allows you to distribute compilation of C code across several machines diff --git a/package/distcc/distcc.mk b/package/distcc/distcc.mk index f3d13bda6e..9e1c669d53 100644 --- a/package/distcc/distcc.mk +++ b/package/distcc/distcc.mk @@ -1,13 +1,15 @@ -############################################################# +################################################################################ # # distcc # -############################################################# -DISTCC_VERSION:=2.18.3 -DISTCC_SOURCE:=distcc-$(DISTCC_VERSION).tar.bz2 -DISTCC_SITE:=http://distcc.samba.org/ftp/distcc/ +################################################################################ +DISTCC_VERSION = 2.18.3 +DISTCC_SOURCE = distcc-$(DISTCC_VERSION).tar.bz2 +DISTCC_SITE = http://distcc.googlecode.com/files/ DISTCC_CONF_OPT = --with-included-popt --without-gtk --without-gnome +DISTCC_LICENSE = GPLv2+ +DISTCC_LICENSE_FILES = COPYING define DISTCC_INSTALL_TARGET_CMDS install -D $(@D)/distccd $(TARGET_DIR)/usr/bin/distccd @@ -20,4 +22,4 @@ define DISTCC_CLEAN_CMDS -$(MAKE) -C $(@D) clean endef -$(eval $(call AUTOTARGETS,package,distcc)) +$(eval $(autotools-package)) diff --git a/package/divine/Config.in b/package/divine/Config.in index 8202292142..7909004761 100644 --- a/package/divine/Config.in +++ b/package/divine/Config.in @@ -1,8 +1,8 @@ config BR2_PACKAGE_DIVINE - bool "directfb virtual input extension" - depends on BR2_PACKAGE_DIRECTFB - help - DiVine provides a DirectFB input driver that reads input - events from a pipe and dispatches them via a virtual input - device. It also installs the tool 'spooky' that allows to - send input events to DirectFB applications. + bool "directfb virtual input extension" + depends on BR2_PACKAGE_DIRECTFB + help + DiVine provides a DirectFB input driver that reads input + events from a pipe and dispatches them via a virtual input + device. It also installs the tool 'spooky' that allows to + send input events to DirectFB applications. diff --git a/package/divine/divine.mk b/package/divine/divine.mk index 554ee63a6f..322e5fcc86 100644 --- a/package/divine/divine.mk +++ b/package/divine/divine.mk @@ -1,14 +1,19 @@ -############################################################# +################################################################################ # # divine # -############################################################# +################################################################################ -DIVINE_VERSION := 0.4.0 -DIVINE_SITE := http://www.directfb.org/downloads/Extras -DIVINE_SOURCE = DiVine-$(DIVINE_VERSION).tar.gz +# tagged version 1.6.3, tarball is missing files +DIVINE_VERSION = 83cafc257a42b9465cd9d6185bf66b8c1b7ed704 +DIVINE_SITE = git://git.directfb.org/git/directfb/extras/DiVine.git +DIVINE_LICENSE = LGPLv2.1+ +DIVINE_LICENSE_FILES = COPYING DIVINE_INSTALL_STAGING = YES -DIVINE_INSTALL_TARGET = YES DIVINE_DEPENDENCIES = directfb +DIVINE_CONFIG_SCRIPTS = divine-config -$(eval $(call AUTOTARGETS,package,divine)) +# package has no configure script so we have to generate it +DIVINE_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/dmalloc/dmalloc.mk b/package/dmalloc/dmalloc.mk index dca0488d53..1d23f66cc1 100644 --- a/package/dmalloc/dmalloc.mk +++ b/package/dmalloc/dmalloc.mk @@ -1,25 +1,30 @@ -############################################################# +################################################################################ # # dmalloc # -############################################################# -DMALLOC_VERSION:=5.4.3 -DMALLOC_SOURCE:=dmalloc-$(DMALLOC_VERSION).tgz -DMALLOC_SITE:=http://dmalloc.com/releases +################################################################################ + +DMALLOC_VERSION = 5.4.3 +DMALLOC_SOURCE = dmalloc-$(DMALLOC_VERSION).tgz +DMALLOC_SITE = http://dmalloc.com/releases + +DMALLOC_LICENSE = MIT-like +# license is in each file, dmalloc.h.1 is the smallest one +DMALLOC_LICENSE_FILES = dmalloc.h.1 DMALLOC_INSTALL_STAGING = YES -DMALLOC_CONF_OPT:= --enable-shlib +DMALLOC_CONF_OPT = --enable-shlib ifeq ($(BR2_INSTALL_LIBSTDCPP),y) -DMALLOC_CONF_OPT+=--enable-cxx +DMALLOC_CONF_OPT += --enable-cxx else -DMALLOC_CONF_OPT+=--disable-cxx +DMALLOC_CONF_OPT += --disable-cxx endif ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) -DMALLOC_CONF_OPT+=--enable-threads +DMALLOC_CONF_OPT += --enable-threads else -DMALLOC_CONF_OPT+=--disable-threads +DMALLOC_CONF_OPT += --disable-threads endif define DMALLOC_POST_PATCH @@ -37,12 +42,12 @@ define DMALLOC_INSTALL_STAGING_CMDS bindir="$(STAGING_DIR)/usr/bin" \ libdir="$(STAGING_DIR)/usr/lib" \ shlibdir="$(STAGING_DIR)/usr/lib" \ - includedir="$(STAGING_DIR)/usr/share/info/" \ + infodir="$(STAGING_DIR)/usr/share/info/" \ -C $(@D) install endef define DMALLOC_INSTALL_TARGET_CMDS - mv $(STAGING_DIR)/usr/lib/libdmalloc*.so $(TARGET_DIR)/usr/lib + cp -dpf $(STAGING_DIR)/usr/lib/libdmalloc*.so $(TARGET_DIR)/usr/lib cp -dpf $(STAGING_DIR)/usr/bin/dmalloc $(TARGET_DIR)/usr/bin/dmalloc endef @@ -55,4 +60,4 @@ define DMALLOC_CLEAN_CMDS endef -$(eval $(call AUTOTARGETS,package,dmalloc)) +$(eval $(autotools-package)) diff --git a/package/dmidecode/Config.in b/package/dmidecode/Config.in new file mode 100644 index 0000000000..22272ed294 --- /dev/null +++ b/package/dmidecode/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_DMIDECODE + bool "dmidecode" + depends on BR2_i386 || BR2_x86_64 + help + Dmidecode reports information about your system's hardware + as described in your system BIOS according to the SMBIOS/DMI + standard. + + http://www.nongnu.org/dmidecode/ diff --git a/package/dmidecode/dmidecode-build-system-fixes.patch b/package/dmidecode/dmidecode-build-system-fixes.patch new file mode 100644 index 0000000000..275f9df7f1 --- /dev/null +++ b/package/dmidecode/dmidecode-build-system-fixes.patch @@ -0,0 +1,35 @@ +Minor build system fixes + +Usual build system fixes to allow CC/CFLAGS/LDFLAGS to be overriden +from the command line, and completed by additional flags from the +Makefile. + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -12,9 +12,10 @@ + # (at your option) any later version. + # + +-CC = gcc +-CFLAGS = -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \ +- -Wcast-align -Wwrite-strings -Wmissing-prototypes -Winline -Wundef ++CC ?= gcc ++override CFLAGS += \ ++ -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \ ++ -Wcast-align -Wwrite-strings -Wmissing-prototypes -Winline -Wundef + #CFLAGS += -DBIGENDIAN + #CFLAGS += -DALIGNMENT_WORKAROUND + +@@ -23,7 +24,7 @@ + #CFLAGS += -g + + # Pass linker flags here +-LDFLAGS = ++override LDFLAGS += + + DESTDIR = + prefix = /usr/local diff --git a/package/dmidecode/dmidecode.mk b/package/dmidecode/dmidecode.mk new file mode 100644 index 0000000000..e39d97db59 --- /dev/null +++ b/package/dmidecode/dmidecode.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# dmidecode +# +################################################################################ + +DMIDECODE_VERSION = 2.12 +DMIDECODE_SITE = http://download.savannah.gnu.org/releases/dmidecode/ +DMIDECODE_LICENSE = GPLv2+ +DMIDECODE_LICENSE_FILES = LICENSE + +define DMIDECODE_BUILD_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) +endef + +define DMIDECODE_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) prefix=/usr DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/dmraid/Config.in b/package/dmraid/Config.in index 7b3724487a..028b46c3a2 100644 --- a/package/dmraid/Config.in +++ b/package/dmraid/Config.in @@ -1,6 +1,7 @@ config BR2_PACKAGE_DMRAID bool "dmraid" depends on BR2_LARGEFILE + depends on BR2_USE_MMU # lvm2 select BR2_PACKAGE_LVM2 help dmraid discovers, activates, deactivates and displays properties @@ -9,5 +10,6 @@ config BR2_PACKAGE_DMRAID dmraid uses the Linux device-mapper to create devices with respective mappings for the ATARAID sets discovered. -comment "dmraid requires a toolchain with LARGEFILE support" +comment "dmraid needs a toolchain w/ largefile" + depends on BR2_USE_MMU depends on !BR2_LARGEFILE diff --git a/package/dmraid/dmraid.mk b/package/dmraid/dmraid.mk index e98161c3da..3c84aa43bf 100644 --- a/package/dmraid/dmraid.mk +++ b/package/dmraid/dmraid.mk @@ -1,12 +1,13 @@ -############################################################# +################################################################################ # # dmraid # -############################################################# -DMRAID_VERSION:=1.0.0.rc15 -DMRAID_SOURCE:=dmraid-$(DMRAID_VERSION).tar.bz2 -DMRAID_SITE:=http://people.redhat.com/~heinzm/sw/dmraid/src -DMRAID_SUBDIR:=$(DMRAID_VERSION) +################################################################################ + +DMRAID_VERSION = 1.0.0.rc15 +DMRAID_SOURCE = dmraid-$(DMRAID_VERSION).tar.bz2 +DMRAID_SITE = http://people.redhat.com/~heinzm/sw/dmraid/src +DMRAID_SUBDIR = $(DMRAID_VERSION) # lib and tools race with parallel make DMRAID_MAKE = $(MAKE1) DMRAID_INSTALL_STAGING = YES @@ -26,4 +27,4 @@ define DMRAID_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/etc/init.d/S20dmraid endef -$(eval $(call AUTOTARGETS,package,dmraid)) +$(eval $(autotools-package)) diff --git a/package/dnsmasq/Config.in b/package/dnsmasq/Config.in index e9c4870af8..6158b107a0 100644 --- a/package/dnsmasq/Config.in +++ b/package/dnsmasq/Config.in @@ -6,26 +6,43 @@ config BR2_PACKAGE_DNSMASQ http://www.thekelleys.org.uk/dnsmasq/ +if BR2_PACKAGE_DNSMASQ + config BR2_PACKAGE_DNSMASQ_TFTP bool "tftp support" default y - depends on BR2_PACKAGE_DNSMASQ help Enable TFTP support in dnsmasq. config BR2_PACKAGE_DNSMASQ_DHCP bool "dhcp support" default y - depends on BR2_PACKAGE_DNSMASQ help Enable DHCP server support in dnsmasq. config BR2_PACKAGE_DNSMASQ_IDN - bool "IDN support (BIG!)" - depends on BR2_PACKAGE_DNSMASQ + bool "IDN support" depends on BR2_USE_WCHAR - select BR2_PACKAGE_LIBINTL select BR2_PACKAGE_LIBIDN + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE help Enable IDN support in dnsmasq. - This option is a big space taker since is pulls in many libraries. + This option is a big space taker since it pulls in many libraries. + +config BR2_PACKAGE_DNSMASQ_LUA + bool "Lua scripting support" + select BR2_PACKAGE_LUA + help + Enable Lua scripting for dnsmasq + +config BR2_PACKAGE_DNSMASQ_CONNTRACK + bool "conntrack marking support" + select BR2_PACKAGE_LIBNETFILTER_CONNTRACK + depends on BR2_LARGEFILE + help + Enable DNS query connection marking in netfilter. + +comment "conntrack marking support needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE + +endif diff --git a/package/dnsmasq/dnsmasq.mk b/package/dnsmasq/dnsmasq.mk index 976e1d611b..3474a41ad5 100644 --- a/package/dnsmasq/dnsmasq.mk +++ b/package/dnsmasq/dnsmasq.mk @@ -1,14 +1,17 @@ -############################################################# +################################################################################ # # dnsmasq # -############################################################# +################################################################################ -DNSMASQ_VERSION = 2.55 +DNSMASQ_VERSION = 2.67 +DNSMASQ_SOURCE = dnsmasq-$(DNSMASQ_VERSION).tar.xz DNSMASQ_SITE = http://thekelleys.org.uk/dnsmasq -DNSMASQ_MAKE_ENV = CC="$(TARGET_CC)" LDFLAGS="$(TARGET_LDFLAGS)" +DNSMASQ_MAKE_ENV = $(TARGET_MAKE_ENV) CC="$(TARGET_CC)" DNSMASQ_MAKE_OPT = COPTS="$(DNSMASQ_COPTS)" PREFIX=/usr CFLAGS="$(TARGET_CFLAGS)" -DNSMASQ_MAKE_OPT += DESTDIR=$(TARGET_DIR) +DNSMASQ_MAKE_OPT += DESTDIR=$(TARGET_DIR) LDFLAGS="$(TARGET_LDFLAGS)" +DNSMASQ_LICENSE = Dual GPLv2/GPLv3 +DNSMASQ_LICENSE_FILES = COPYING COPYING-v3 ifneq ($(BR2_INET_IPV6),y) DNSMASQ_COPTS += -DNO_IPV6 @@ -22,10 +25,34 @@ ifneq ($(BR2_PACKAGE_DNSMASQ_TFTP),y) DNSMASQ_COPTS += -DNO_TFTP endif +# NLS requires IDN so only enable it (i18n) when IDN is true ifeq ($(BR2_PACKAGE_DNSMASQ_IDN),y) - DNSMASQ_MAKE_OPT += all-i18n - DNSMASQ_DEPENDENCIES += libidn libintl - DNSMASQ_MAKE_ENV += LDFLAGS+="-lintl" + DNSMASQ_DEPENDENCIES += libidn $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-gettext + DNSMASQ_MAKE_OPT += LDFLAGS+="-lidn $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),-lintl)" + DNSMASQ_COPTS += -DHAVE_IDN + DNSMASQ_I18N = $(if $(BR2_ENABLE_LOCALE),-i18n) +endif + +ifeq ($(BR2_PACKAGE_DNSMASQ_CONNTRACK),y) + DNSMASQ_DEPENDENCIES += host-pkgconf libnetfilter_conntrack +endif + +ifeq ($(BR2_PACKAGE_DNSMASQ_CONNTRACK),y) +define DNSMASQ_ENABLE_CONNTRACK + $(SED) 's^.*#define HAVE_CONNTRACK.*^#define HAVE_CONNTRACK^' \ + $(DNSMASQ_DIR)/src/config.h +endef +endif + +ifeq ($(BR2_PACKAGE_DNSMASQ_LUA),y) + DNSMASQ_DEPENDENCIES += lua host-pkgconf + DNSMASQ_MAKE_OPT += LDFLAGS+="-ldl" + +define DNSMASQ_ENABLE_LUA + $(SED) 's/lua5.1/lua/g' $(DNSMASQ_DIR)/Makefile + $(SED) 's^.*#define HAVE_LUASCRIPT.*^#define HAVE_LUASCRIPT^' \ + $(DNSMASQ_DIR)/src/config.h +endef endif ifneq ($(BR2_LARGEFILE),y) @@ -33,15 +60,18 @@ ifneq ($(BR2_LARGEFILE),y) endif ifeq ($(BR2_PACKAGE_DBUS),y) - DNSMASQ_DEPENDENCIES += host-pkg-config dbus + DNSMASQ_DEPENDENCIES += host-pkgconf dbus endif +define DNSMASQ_FIX_PKGCONFIG + $(SED) 's^PKG_CONFIG = pkg-config^PKG_CONFIG = $(PKG_CONFIG_HOST_BINARY)^' \ + $(DNSMASQ_DIR)/Makefile +endef + ifeq ($(BR2_PACKAGE_DBUS),y) define DNSMASQ_ENABLE_DBUS $(SED) 's^.*#define HAVE_DBUS.*^#define HAVE_DBUS^' \ $(DNSMASQ_DIR)/src/config.h - $(SED) 's^PKG_CONFIG = pkg-config^PKG_CONFIG = $(PKG_CONFIG_HOST_BINARY)^' \ - $(DNSMASQ_DIR)/Makefile endef else define DNSMASQ_ENABLE_DBUS @@ -51,12 +81,16 @@ endef endif define DNSMASQ_BUILD_CMDS + $(DNSMASQ_FIX_PKGCONFIG) $(DNSMASQ_ENABLE_DBUS) - $(DNSMASQ_MAKE_ENV) $(MAKE) -C $(@D) $(DNSMASQ_MAKE_OPT) + $(DNSMASQ_ENABLE_LUA) + $(DNSMASQ_ENABLE_CONNTRACK) + $(DNSMASQ_MAKE_ENV) $(MAKE1) -C $(@D) $(DNSMASQ_MAKE_OPT) all$(DNSMASQ_I18N) endef define DNSMASQ_INSTALL_TARGET_CMDS - $(DNSMASQ_MAKE_ENV) $(MAKE) -C $(@D) $(DNSMASQ_MAKE_OPT) install + $(DNSMASQ_MAKE_ENV) $(MAKE) -C $(@D) $(DNSMASQ_MAKE_OPT) install$(DNSMASQ_I18N) + mkdir -p $(TARGET_DIR)/var/lib/misc/ endef define DNSMASQ_UNINSTALL_TARGET_CMDS @@ -64,4 +98,4 @@ define DNSMASQ_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/share/man/man8/dnsmasq.8 endef -$(eval $(call GENTARGETS,package,dnsmasq)) +$(eval $(generic-package)) diff --git a/package/docker/Config.in b/package/docker/Config.in index 75bf5bedeb..12f8432bc1 100644 --- a/package/docker/Config.in +++ b/package/docker/Config.in @@ -2,11 +2,16 @@ config BR2_PACKAGE_DOCKER bool "docker" depends on BR2_PACKAGE_XORG7 depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_XLIB_LIBX11 help a system tray dock for X http://icculus.org/openbox/2/docker -comment "docker requires a toolchain with WCHAR support" - depends on BR2_PACKAGE_XORG7 && !BR2_USE_WCHAR +comment "docker needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_XORG7 + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/docker/docker-1.5-pkgconfig.patch b/package/docker/docker-1.5-pkgconfig.patch deleted file mode 100644 index 1b56b1bd46..0000000000 --- a/package/docker/docker-1.5-pkgconfig.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/Makefile 2002-11-20 05:20:49.000000000 -0500 -+++ b/Makefile 2008-04-28 12:36:23.000000000 -0400 -@@ -20,7 +20,6 @@ CFLAGS=-pedantic -Wall -W -O - - PACKAGE=docker - VERSION=1.5 -- - target=docker - sources=docker.c kde.c icons.c xproperty.c net.c - headers=docker.h kde.h icons.h xproperty.h net.h version.h -@@ -31,10 +30,10 @@ all: $(target) $(sources) $(headers) - - $(target): $(sources:.c=.o) - $(CC) $(CFLAGS) -L$(XLIBPATH) -lX11 \ -- `pkg-config --libs glib-2.0` $^ -o $@ -+ `$(PKG_CONFIG) --libs glib-2.0` $^ -o $@ - - %.o: %.c -- $(CC) -c $(CFLAGS) `pkg-config --cflags glib-2.0` $< -+ $(CC) -c $(CFLAGS) `$(PKG_CONFIG) --cflags glib-2.0` $< - - version.h: version.h.in Makefile - sed -e "s/@VERSION@/$(VERSION)/" version.h.in > $@ diff --git a/package/docker/docker-1.5-skip-configure.patch b/package/docker/docker-1.5-skip-configure.patch deleted file mode 100644 index 441f9b05ef..0000000000 --- a/package/docker/docker-1.5-skip-configure.patch +++ /dev/null @@ -1,4 +0,0 @@ ---- a/.stamp_configured 2008-03-19 03:34:24.425005162 -0400 -+++ b/.stamp_configured 2008-03-19 14:25:33.000000000 -0400 -@@ -0,0 +1 @@ -+ diff --git a/package/docker/docker.mk b/package/docker/docker.mk index 5b4cd3a341..9a9d26bb85 100644 --- a/package/docker/docker.mk +++ b/package/docker/docker.mk @@ -1,24 +1,25 @@ -############################################################# +################################################################################ # # docker # -############################################################# +################################################################################ + DOCKER_VERSION = 1.5 -DOCKER_SOURCE = docker-$(DOCKER_VERSION).tar.gz DOCKER_SITE = http://icculus.org/openbox/2/docker -DOCKER_AUTORECONF = NO -DOCKER_INSTALL_STAGING = NO -DOCKER_INSTALL_TARGET = YES +DOCKER_DEPENDENCIES = host-pkgconf libglib2 xlib_libX11 -DOCKER_MAKE_OPT = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" LD="$(TARGET_LD)" \ - CFLAGS="-I$(STAGING_DIR)/usr/include \ - -I$(STAGING_DIR)/usr/include/glib-2.0 \ - -I$(STAGING_DIR)/usr/lib/glib-2.0/include" \ - PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" +DOCKER_LICENSE = GPLv2+ +# The 'or later' is specified at the end of the README, so include that one too. +DOCKER_LICENSE_FILES = COPYING README -DOCKER_INSTALL_TARGET_OPT = PREFIX=$(TARGET_DIR)/usr install +define DOCKER_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + XLIBPATH=$(STAGING_DIR)/usr/lib +endef -DOCKER_DEPENDENCIES = host-pkg-config libglib2 xserver_xorg-server +define DOCKER_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + XLIBPATH=$(STAGING_DIR)/usr/lib PREFIX=$(TARGET_DIR)/usr install +endef -$(eval $(call AUTOTARGETS,package,docker)) +$(eval $(generic-package)) diff --git a/package/games/doom-wad/Config.in b/package/doom-wad/Config.in similarity index 100% rename from package/games/doom-wad/Config.in rename to package/doom-wad/Config.in diff --git a/package/doom-wad/doom-wad.mk b/package/doom-wad/doom-wad.mk new file mode 100644 index 0000000000..b21fed81c5 --- /dev/null +++ b/package/doom-wad/doom-wad.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# doom-wad +# +################################################################################ + +DOOM_WAD_VERSION = 1.8 +DOOM_WAD_SOURCE = doom-$(DOOM_WAD_VERSION).wad.gz +DOOM_WAD_SITE = ftp://ftp.idsoftware.com/idstuff/doom/ + +define DOOM_WAD_EXTRACT_CMDS + $(ZCAT) $(DL_DIR)/$($(PKG)_SOURCE) > $(@D)/doom1.wad +endef + +define DOOM_WAD_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D $(@D)/doom1.wad \ + $(TARGET_DIR)/usr/share/games/doom/doom1.wad +endef + +define DOOM_WAD_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/share/games/doom/doom1.wad +endef + +$(eval $(generic-package)) diff --git a/package/dosfstools/Config.in b/package/dosfstools/Config.in index 1b92026993..43051ec32d 100644 --- a/package/dosfstools/Config.in +++ b/package/dosfstools/Config.in @@ -1,28 +1,31 @@ config BR2_PACKAGE_DOSFSTOOLS bool "dosfstools" depends on BR2_LARGEFILE + depends on BR2_USE_WCHAR + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE help Tools for creating and checking DOS FAT filesystems. http://www.daniel-baumann.ch/software/dosfstools/ -config BR2_PACKAGE_DOSFSTOOLS_MKDOSFS - bool "mkdosfs" - depends on BR2_PACKAGE_DOSFSTOOLS +if BR2_PACKAGE_DOSFSTOOLS + +config BR2_PACKAGE_DOSFSTOOLS_FATLABEL + bool "fatlabel" help - Creates a DOS FAT filesystem on a device. + Get or set the DOS FAT filesystem label. -config BR2_PACKAGE_DOSFSTOOLS_DOSFSCK - bool "dosfsck" - depends on BR2_PACKAGE_DOSFSTOOLS +config BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT + bool "fsck.fat" help - Checks a DOS FAT filesystem. + Check a DOS FAT filesystem. -config BR2_PACKAGE_DOSFSTOOLS_DOSFSLABEL - bool "dosfslabel" - depends on BR2_PACKAGE_DOSFSTOOLS +config BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT + bool "mkfs.fat" help - Get or set the DOS FAT filesystem label. + Creates a DOS FAT filesystem on a device. + +endif -comment "dosfstools requires a toolchain with LARGEFILE support" - depends on !BR2_LARGEFILE +comment "dosfstools needs a toolchain w/ largefile, wchar" + depends on !BR2_LARGEFILE || !BR2_USE_WCHAR diff --git a/package/dosfstools/Config.in.host b/package/dosfstools/Config.in.host new file mode 100644 index 0000000000..6156c5a3cf --- /dev/null +++ b/package/dosfstools/Config.in.host @@ -0,0 +1,6 @@ +config BR2_PACKAGE_HOST_DOSFSTOOLS + bool "host dosfstools" + help + Tools for creating and checking DOS FAT filesystems. + + http://www.daniel-baumann.ch/software/dosfstools/ diff --git a/package/dosfstools/dosfstools.mk b/package/dosfstools/dosfstools.mk index c2d763ddba..6b27e80a08 100644 --- a/package/dosfstools/dosfstools.mk +++ b/package/dosfstools/dosfstools.mk @@ -1,37 +1,60 @@ -############################################################# +################################################################################ # # dosfstools # -############################################################# -DOSFSTOOLS_VERSION = 3.0.11 -DOSFSTOOLS_SOURCE = dosfstools-$(DOSFSTOOLS_VERSION).tar.gz -DOSFSTOOLS_SITE = http://www.daniel-baumann.ch/software/dosfstools -MKDOSFS_BINARY = mkdosfs -DOSFSCK_BINARY = dosfsck -DOSFSLABEL_BINARY = dosfslabel +################################################################################ + +DOSFSTOOLS_VERSION = 3.0.23 +DOSFSTOOLS_SOURCE = dosfstools-$(DOSFSTOOLS_VERSION).tar.xz +DOSFSTOOLS_SITE = http://daniel-baumann.ch/files/software/dosfstools +DOSFSTOOLS_LICENSE = GPLv3+ +DOSFSTOOLS_LICENSE_FILES = COPYING +DOSFSTOOLS_LDFLAGS = $(TARGET_LDFLAGS) + +# Avoid target dosfstools dependencies, no host-libiconv +HOST_DOSFSTOOLS_DEPENDENCIES = + +ifneq ($(BR2_ENABLE_LOCALE),y) +DOSFSTOOLS_DEPENDENCIES += libiconv +DOSFSTOOLS_LDFLAGS += -liconv +endif + +FATLABEL_BINARY = fatlabel +FSCK_FAT_BINARY = fsck.fat +MKFS_FAT_BINARY = mkfs.fat define DOSFSTOOLS_BUILD_CMDS - $(MAKE) CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" \ - CC="$(TARGET_CC)" -C $(@D) + $(MAKE) CFLAGS="$(TARGET_CFLAGS)" CC="$(TARGET_CC)" \ + LDFLAGS="$(DOSFSTOOLS_LDFLAGS)" -C $(@D) endef -DOSFSTOOLS_INSTALL_BIN_FILES_$(BR2_PACKAGE_DOSFSTOOLS_MKDOSFS)+=$(MKDOSFS_BINARY) -DOSFSTOOLS_INSTALL_BIN_FILES_$(BR2_PACKAGE_DOSFSTOOLS_DOSFSCK)+=$(DOSFSCK_BINARY) -DOSFSTOOLS_INSTALL_BIN_FILES_$(BR2_PACKAGE_DOSFSTOOLS_DOSFSLABEL)+=$(DOSFSLABEL_BINARY) +DOSFSTOOLS_INSTALL_BIN_FILES_$(BR2_PACKAGE_DOSFSTOOLS_FATLABEL)+=$(FATLABEL_BINARY) +DOSFSTOOLS_INSTALL_BIN_FILES_$(BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT)+=$(FSCK_FAT_BINARY) +DOSFSTOOLS_INSTALL_BIN_FILES_$(BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT)+=$(MKFS_FAT_BINARY) define DOSFSTOOLS_INSTALL_TARGET_CMDS test -z "$(DOSFSTOOLS_INSTALL_BIN_FILES_y)" || \ - install -m 755 $(addprefix $(@D)/,$(DOSFSTOOLS_INSTALL_BIN_FILES_y)) $(TARGET_DIR)/sbin/ + $(INSTALL) -m 755 $(addprefix $(@D)/,$(DOSFSTOOLS_INSTALL_BIN_FILES_y)) \ + $(TARGET_DIR)/sbin/ endef define DOSFSTOOLS_UNINSTALL_TARGET_CMDS - rm -f $(TARGET_DIR)/sbin/$(MKDOSFS_BINARY) - rm -f $(TARGET_DIR)/sbin/$(DOSFSCK_BINARY) - rm -f $(TARGET_DIR)/sbin/$(DOSFSLABEL_BINARY) + rm -f $(TARGET_DIR)/sbin/$(FATLABEL_BINARY) + rm -f $(TARGET_DIR)/sbin/$(FSCK_FAT_BINARY) + rm -f $(TARGET_DIR)/sbin/$(MKFS_FAT_BINARY) endef define DOSFSTOOLS_CLEAN_CMDS -$(MAKE) -C $(@D) clean endef -$(eval $(call GENTARGETS,package,dosfstools)) +define HOST_DOSFSTOOLS_BUILD_CMDS + $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) +endef + +define HOST_DOSFSTOOLS_INSTALL_CMDS + $(MAKE) -C $(@D) $(HOST_CONFIGURE_OPTS) PREFIX=$(HOST_DIR)/usr install +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/dropbear/Config.in b/package/dropbear/Config.in index e47ba45457..68c3b71aa9 100644 --- a/package/dropbear/Config.in +++ b/package/dropbear/Config.in @@ -1,15 +1,39 @@ config BR2_PACKAGE_DROPBEAR bool "dropbear" - select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_ZLIB if !BR2_PACKAGE_DROPBEAR_SMALL help A small SSH 2 server designed for small memory environments. http://matt.ucc.asn.au/dropbear/dropbear.html +if BR2_PACKAGE_DROPBEAR + config BR2_PACKAGE_DROPBEAR_DISABLE_REVERSEDNS bool "disable reverse DNS lookups" - depends on BR2_PACKAGE_DROPBEAR help Disable reverse DNS lookups on connection. This can be handy on systems without working DNS, as connections otherwise stall until DNS times out. + +config BR2_PACKAGE_DROPBEAR_SMALL + bool "optimize for size" + default y + help + Compile dropbear for the smallest possible binary size. + + Tradeoffs are slower hashes and ciphers, and disabling of the + blowfish cipher and zlib. + +config BR2_PACKAGE_DROPBEAR_WTMP + bool "log dropbear access to wtmp" + help + Enable logging of dropbear access to wtmp. Notice that + Buildroot does not generate wtmp by default. + +config BR2_PACKAGE_DROPBEAR_LASTLOG + bool "log dropbear access to lastlog" + help + Enable logging of dropbear access to lastlog. Notice that + Buildroot does not generate lastlog by default. + +endif diff --git a/package/dropbear/S50dropbear b/package/dropbear/S50dropbear index 1bf80c677e..b7d7a0221b 100644 --- a/package/dropbear/S50dropbear +++ b/package/dropbear/S50dropbear @@ -58,7 +58,7 @@ case "$1" in restart ;; *) - echo $"Usage: $0 {start|stop|restart}" + echo "Usage: $0 {start|stop|restart}" exit 1 esac diff --git a/package/dropbear/dropbear.mk b/package/dropbear/dropbear.mk index b07cb6333c..7fa92735b1 100644 --- a/package/dropbear/dropbear.mk +++ b/package/dropbear/dropbear.mk @@ -1,22 +1,23 @@ -############################################################# +################################################################################ # # dropbear # -############################################################# +################################################################################ -DROPBEAR_VERSION = 0.52 -DROPBEAR_SOURCE = dropbear-$(DROPBEAR_VERSION).tar.gz +DROPBEAR_VERSION = 2013.60 DROPBEAR_SITE = http://matt.ucc.asn.au/dropbear/releases -DROPBEAR_DEPENDENCIES = zlib +DROPBEAR_SOURCE = dropbear-$(DROPBEAR_VERSION).tar.bz2 DROPBEAR_TARGET_BINS = dbclient dropbearkey dropbearconvert scp ssh -# configure misdetects this as no, but the result is not used for -# anything. Unfortunately it breaks the build for other packages also -# checking for struct sockaddr_storage when using a shared config -# cache, so force it to yes -DROPBEAR_CONF_ENV = ac_cv_type_struct_sockaddr_storage=yes DROPBEAR_MAKE = $(MAKE) MULTI=1 SCPPROGRESS=1 \ PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" +DROPBEAR_LICENSE = MIT, BSD-2c-like, BSD-2c +DROPBEAR_LICENSE_FILES = LICENSE + +ifeq ($(BR2_PREFER_STATIC_LIB),y) +DROPBEAR_MAKE += STATIC=1 +endif + define DROPBEAR_FIX_XAUTH $(SED) 's,^#define XAUTH_COMMAND.*/xauth,#define XAUTH_COMMAND "/usr/bin/xauth,g' $(@D)/options.h endef @@ -24,27 +25,58 @@ endef DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_FIX_XAUTH define DROPBEAR_DISABLE_REVERSE_DNS - $(SED) 's,^#define DO_HOST_LOOKUP.*,/* #define DO_HOST_LOOKUP */,' $(@D)/options.h + $(SED) 's:\(#define DO_HOST_LOOKUP\):/*\1 */:' $(@D)/options.h +endef + +define DROPBEAR_BUILD_SMALL + $(SED) 's:.*\(#define DROPBEAR_SMALL_CODE\).*:\1:' $(@D)/options.h + $(SED) 's:.*\(#define NO_FAST_EXPTMOD\).*:\1:' $(@D)/options.h +endef + +define DROPBEAR_BUILD_FEATURED + $(SED) 's:.*\(#define DROPBEAR_BLOWFISH\).*:\1:' $(@D)/options.h + $(SED) 's:.*\(#define DROPBEAR_SHA2_256_HMAC\).*:\1:' $(@D)/options.h + $(SED) 's:.*\(#define DROPBEAR_SHA2_512_HMAC\).*:\1:' $(@D)/options.h +endef + +define DROPBEAR_DISABLE_STANDALONE + $(SED) 's:\(#define NON_INETD_MODE\):/*\1 */:' $(@D)/options.h +endef + +ifeq ($(BR2_USE_MMU),y) +define DROPBEAR_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/dropbear/S50dropbear \ + $(TARGET_DIR)/etc/init.d/S50dropbear endef +else +DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_DISABLE_STANDALONE +endif ifeq ($(BR2_PACKAGE_DROPBEAR_DISABLE_REVERSEDNS),y) DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_DISABLE_REVERSE_DNS endif +ifeq ($(BR2_PACKAGE_DROPBEAR_SMALL),y) +DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_BUILD_SMALL +DROPBEAR_CONF_OPT += --disable-zlib +else +DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_BUILD_FEATURED +DROPBEAR_DEPENDENCIES += zlib +endif + +ifneq ($(BR2_PACKAGE_DROPBEAR_WTMP),y) +DROPBEAR_CONF_OPT += --disable-wtmp +endif + +ifneq ($(BR2_PACKAGE_DROPBEAR_LASTLOG),y) +DROPBEAR_CONF_OPT += --disable-lastlog +endif + define DROPBEAR_INSTALL_TARGET_CMDS $(INSTALL) -m 755 $(@D)/dropbearmulti $(TARGET_DIR)/usr/sbin/dropbear for f in $(DROPBEAR_TARGET_BINS); do \ ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/$$f ; \ done - if [ ! -f $(TARGET_DIR)/etc/init.d/S50dropbear ]; then \ - $(INSTALL) -m 0755 -D package/dropbear/S50dropbear $(TARGET_DIR)/etc/init.d/S50dropbear; \ - fi -endef - -define DROPBEAR_UNINSTALL_TARGET_CMDS - rm -f $(TARGET_DIR)/usr/sbin/dropbear - rm -f $(addprefix $(TARGET_DIR)/usr/bin/, $(DROPBEAR_TARGET_BINS)) - rm -f $(TARGET_DIR)/etc/init.d/S50dropbear endef -$(eval $(call AUTOTARGETS,package,dropbear)) +$(eval $(autotools-package)) diff --git a/package/dropwatch/Config.in b/package/dropwatch/Config.in new file mode 100644 index 0000000000..ac0cc3e0bf --- /dev/null +++ b/package/dropwatch/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_DROPWATCH + bool "dropwatch" + select BR2_PACKAGE_BINUTILS + depends on !BR2_aarch64 # binutils + select BR2_PACKAGE_READLINE + select BR2_PACKAGE_LIBNL + depends on BR2_TOOLCHAIN_HAS_THREADS # libnl + help + Dropwatch is an interactive utility for monitoring and + recording packets that are dropped by the kernel + + https://fedorahosted.org/dropwatch/ + +comment "dropwatch needs a toolchain w/ threads" + depends on !BR2_aarch64 + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/dropwatch/dropwatch-01-build.patch b/package/dropwatch/dropwatch-01-build.patch new file mode 100644 index 0000000000..eed43e8dd7 --- /dev/null +++ b/package/dropwatch/dropwatch-01-build.patch @@ -0,0 +1,27 @@ +From 03bab84ca3f102274837e83ee6da4c997a9da018 Mon Sep 17 00:00:00 2001 +From: Tzu-Jung Lee +Date: Fri, 12 Jul 2013 20:00:57 +0800 +Subject: [PATCH] build: modify hardcoded gcc to support buildroot + +Signed-off-by: Tzu-Jung Lee + +diff --git a/src/Makefile b/src/Makefile +index 026b6ba..b87ae9f 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -5,10 +5,10 @@ OBJFILES := main.o lookup.o\ + lookup_bfd.o lookup_kas.o + + dropwatch: $(OBJFILES) +- gcc -g -o dropwatch $(OBJFILES) $(LDFLAGS) ++ $(CC) -g -o dropwatch $(OBJFILES) $(LDFLAGS) + + %.o: %.c +- gcc $(CFLAGS) $< ++ $(CC) $(CFLAGS) $< + clean: + rm -f dropwatch *.o + +-- +1.8.3.2 + diff --git a/package/dropwatch/dropwatch-02-binutils-2.23.1.patch b/package/dropwatch/dropwatch-02-binutils-2.23.1.patch new file mode 100644 index 0000000000..4d43356a6a --- /dev/null +++ b/package/dropwatch/dropwatch-02-binutils-2.23.1.patch @@ -0,0 +1,74 @@ +libbfd from binutils 2.23.1+ requires PACKAGE* definitions from autoconf. +Patch from https://fedorahosted.org/dropwatch/ticket/5 +Upstream status: new. + +Signed-off-by: Gustavo Zacarias + +diff -aurd src.orig/lookup.c src/lookup.c +--- a/src/lookup.c 2011-10-03 22:51:38.000000000 +0400 ++++ b/src/lookup.c 2013-02-18 09:13:56.683214438 +0400 +@@ -27,13 +27,13 @@ + #include + #include + #include +-#include + #include + #include + #include + #include + + #include "lookup.h" ++#include + + extern struct lookup_methods bfd_methods; + extern struct lookup_methods kallsym_methods; +diff -aurd src.orig/lookup.h src/lookup.h +--- a/src/lookup.h 2011-10-03 22:51:38.000000000 +0400 ++++ b/src/lookup.h 2013-02-18 09:11:00.506895026 +0400 +@@ -28,6 +28,9 @@ + #include + #include + ++// satisfy PR 14072 in bfd.h ++#define PACKAGE 1 ++#define PACKAGE_VERSION 1 + + /* + * Initalization routine +diff -aurd src.orig/lookup_bfd.c src/lookup_bfd.c +--- a/src/lookup_bfd.c 2012-01-16 22:34:11.000000000 +0400 ++++ b/src/lookup_bfd.c 2013-02-18 09:14:02.472984310 +0400 +@@ -25,13 +25,13 @@ + #include + #include + #include +-#include + #include + #include + #include + #include + + #include "lookup.h" ++#include + + + static int lookup_bfd_init(void) +diff -aurd src.orig/lookup_kas.c src/lookup_kas.c +--- a/src/lookup_kas.c 2012-05-31 02:43:23.000000000 +0400 ++++ b/src/lookup_kas.c 2013-02-18 09:14:07.906101713 +0400 +@@ -25,7 +25,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -33,6 +32,7 @@ + #include + + #include "lookup.h" ++#include + + struct symbol_entry { + char *sym_name; diff --git a/package/dropwatch/dropwatch-03-remove-werror.patch b/package/dropwatch/dropwatch-03-remove-werror.patch new file mode 100644 index 0000000000..97b26b74c4 --- /dev/null +++ b/package/dropwatch/dropwatch-03-remove-werror.patch @@ -0,0 +1,18 @@ +-Werror shouldn't be used in released code since it can +cause random build failures on moderate warnings. It also +depends on the used toolchain since different toolchains may +or may not print the same warnings. + +Signed-off-by: Markos Chandras + +Index: dropwatch-1.4/src/Makefile +=================================================================== +--- dropwatch-1.4.orig/src/Makefile ++++ dropwatch-1.4/src/Makefile +@@ -1,5 +1,5 @@ + all: dropwatch +-CFLAGS+=-c -g -D_GNU_SOURCE -Wall -Werror `pkg-config --cflags libnl-3.0` ++CFLAGS+=-c -g -D_GNU_SOURCE -Wall `pkg-config --cflags libnl-3.0` + LDFLAGS=-lbfd -lreadline -lnl-3 -lnl-genl-3 + OBJFILES := main.o lookup.o\ + lookup_bfd.o lookup_kas.o diff --git a/package/dropwatch/dropwatch.mk b/package/dropwatch/dropwatch.mk new file mode 100644 index 0000000000..082b33144f --- /dev/null +++ b/package/dropwatch/dropwatch.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# dropwatch +# +################################################################################ + +DROPWATCH_VERSION = 1.4 +DROPWATCH_SOURCE = dropwatch-$(DROPWATCH_VERSION).tar.xz +DROPWATCH_SITE = https://git.fedorahosted.org/cgit/dropwatch.git/snapshot/ +DROPWATCH_DEPENDENCIES = binutils libnl readline host-pkgconf +DROPWATCH_LICENSE = GPLv2 +DROPWATCH_LICENSE_FILES = COPYING + +# libbfd may be linked to libintl +# Ugly... but LDFLAGS are hardcoded anyway +# +# Also: always need to add -liberty to hardcoded LDFLAGS for avr32 +DROPWATCH_LDFLAGS = \ + $(TARGET_LDFLAGS) -lbfd -liberty -lreadline -lnl-3 -lnl-genl-3 \ + -lpthread -lncurses -lm + +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) +DROPWATCH_LDFLAGS += -lintl +endif + +define DROPWATCH_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + LDFLAGS="$(DROPWATCH_LDFLAGS)" build +endef + +define DROPWATCH_CLEAN_CMDS + $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) clean +endef + +define DROPWATCH_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/src/dropwatch \ + $(TARGET_DIR)/usr/bin/dropwatch +endef + +define DROPWATCH_UNINSTALL_CMDS + rm -f $(TARGET_DIR)/usr/bin/dropwatch +endef + +$(eval $(generic-package)) diff --git a/package/dsp-tools/dsp-tools.mk b/package/dsp-tools/dsp-tools.mk index ab31afb74c..344e264a7c 100644 --- a/package/dsp-tools/dsp-tools.mk +++ b/package/dsp-tools/dsp-tools.mk @@ -1,5 +1,10 @@ +################################################################################ +# +# dsp-tools +# +################################################################################ + DSP_TOOLS_VERSION = 2.0 -DSP_TOOLS_SOURCE = dsp-tools-$(DSP_TOOLS_VERSION).tar.gz DSP_TOOLS_SITE = http://gst-dsp.googlecode.com/files/ DSP_TOOLS_DEPENDENCIES = tidsp-binaries @@ -15,4 +20,4 @@ define DSP_TOOLS_UNINSTALL_TARGET_CMDS rm -f $(addprefix $(TARGET_DIR)/usr/bin/dsp-, load probe test exec) endef -$(eval $(call GENTARGETS,package,dsp-tools)) +$(eval $(generic-package)) diff --git a/package/dstat/Config.in b/package/dstat/Config.in new file mode 100644 index 0000000000..62a392a5c3 --- /dev/null +++ b/package/dstat/Config.in @@ -0,0 +1,25 @@ +config BR2_PACKAGE_DSTAT + bool "dstat" + depends on BR2_USE_WCHAR # python + depends on BR2_USE_MMU # python + select BR2_PACKAGE_PYTHON + help + Dstat, written in Python, is a versatile replacement for vmstat, + iostat, netstat and ifstat. Dstat overcomes some of their limitations + and adds some extra features, more counters and flexibility. Dstat is + handy for monitoring systems during performance tuning tests, + benchmarks or troubleshooting. + Dstat allows you to view all of your system resources in real-time, + you can e.g. compare disk utilization in combination with interrupts + from your IDE controller, or compare the network bandwidth numbers + directly with the disk throughput (in the same interval). + + Note that to get proper output, your terminal size should be known by + the termios subsystem. This can be done by running the 'resize' + utility of busybox. + + http://dag.wieers.com/home-made/dstat/ + +comment "dstat needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR diff --git a/package/dstat/dstat.mk b/package/dstat/dstat.mk new file mode 100644 index 0000000000..e71b0cccd2 --- /dev/null +++ b/package/dstat/dstat.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# dstat +# +################################################################################ + +DSTAT_VERSION = 0.7.2 +DSTAT_SOURCE = dstat-$(DSTAT_VERSION).tar.bz2 +DSTAT_SITE = http://dag.wieers.com/home-made/dstat +DSTAT_LICENSE = GPLv2 +DSTAT_LICENSE_FILES = COPYING + +define DSTAT_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/dtach/Config.in b/package/dtach/Config.in new file mode 100644 index 0000000000..bea112b36d --- /dev/null +++ b/package/dtach/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_DTACH + bool "dtach" + depends on BR2_USE_MMU # fork() + help + dtach is a tiny program that emulates the detach feature of screen, + allowing you to run a program in an environment that is protected + from the controlling terminal and attach to it later. + + http://dtach.sourceforge.net/ diff --git a/package/dtach/dtach.mk b/package/dtach/dtach.mk new file mode 100644 index 0000000000..56ab175ef6 --- /dev/null +++ b/package/dtach/dtach.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# dtach +# +################################################################################ + +DTACH_VERSION = 0.8 +DTACH_SITE = http://downloads.sourceforge.net/project/dtach/dtach/$(DTACH_VERSION) +DTACH_LICENSE = GPLv2+ +DTACH_LICENSE_FILES = COPYING + +# The Makefile does not have an install target. +define DTACH_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/dtach $(TARGET_DIR)/usr/bin/dtach +endef + +$(eval $(autotools-package)) diff --git a/package/dtc/Config.in b/package/dtc/Config.in new file mode 100644 index 0000000000..fac6ab2ea4 --- /dev/null +++ b/package/dtc/Config.in @@ -0,0 +1,33 @@ +config BR2_PACKAGE_DTC + bool "dtc (libfdt)" + help + The Device Tree Compiler, dtc, takes as input a device-tree in + a given format and outputs a device-tree in another format. + + Note that only the library is installed. + If you want the programs, say 'y' here, and to "dtc programs", below. + + http://git.jdl.com/gitweb/?p=dtc.git (no home page) + +if BR2_PACKAGE_DTC + +config BR2_PACKAGE_DTC_PROGRAMS + bool "dtc programs" + help + Say 'y' here if you also want the programs on the target: + - convert-dtsv0 convert from version 0 to version 1 + - dtc the device tree compiler + - dtdiff compare two device trees (needs bash) + - fdtdump print a readable version of a flat device tree + - fdtget read values from device tree + - fdtput write a property value to a device tree + + Note: dtdiff requires bash, so if bash is not selected, dtdiff will + be removed from the target file system. Enable bash if you + need dtdiff on the target. + +comment "dtdiff will not be installed: it requires bash" + depends on BR2_PACKAGE_DTC_PROGRAMS + depends on !BR2_PACKAGE_BASH + +endif diff --git a/package/dtc/dtc-extra_cflags.patch b/package/dtc/dtc-extra_cflags.patch new file mode 100644 index 0000000000..3ce699b5d8 --- /dev/null +++ b/package/dtc/dtc-extra_cflags.patch @@ -0,0 +1,28 @@ +Makefile: append the CFLAGS to existing ones + +Allow the user to pass custom CFLAGS (eg. optimisation flags). + +Do not use EXTRA_CFLAGS, append to existing CFLAGS with += (Arnout) + +Signed-off-by: "Yann E. MORIN" +Cc: Arnout Vandecappelle + +--- +Patch not sent upstream. + +Although not specific to buildroot, I am not sure this is the best +way to handle user-supplied CFLAGS. + +diff -durN dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef.orig/Makefile dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef/Makefile +--- dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef.orig/Makefile 2012-10-22 22:02:47.541240846 +0200 ++++ dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef/Makefile 2012-10-22 22:03:21.151047833 +0200 +@@ -18,7 +18,8 @@ + CPPFLAGS = -I libfdt -I . + WARNINGS = -Werror -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \ + -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls +-CFLAGS = -g -Os -fPIC -Werror $(WARNINGS) ++CFLAGS ?= -g -Os ++CFLAGS += -fPIC $(WARNINGS) + + BISON = bison + LEX = flex diff --git a/package/dtc/dtc-separate-lib-install.patch b/package/dtc/dtc-separate-lib-install.patch new file mode 100644 index 0000000000..c86d587a1b --- /dev/null +++ b/package/dtc/dtc-separate-lib-install.patch @@ -0,0 +1,28 @@ +Makefile: add a rule to only install libfdt + +Signed-off-by: "Yann E. MORIN" + +--- +Patch not sent upstream. + +It's really specific to buildroot, and is probably not +good (aka generic) enough to be pushed upstream. + +diff --git a/Makefile b/Makefile +index 1169e6c..39e7190 100644 +--- a/Makefile ++++ b/Makefile +@@ -160,10 +160,12 @@ endif + # intermediate target and building them again "for real" + .SECONDARY: $(DTC_GEN_SRCS) $(CONVERT_GEN_SRCS) + +-install: all $(SCRIPTS) ++install: all $(SCRIPTS) libfdt_install + @$(VECHO) INSTALL + $(INSTALL) -d $(DESTDIR)$(BINDIR) + $(INSTALL) $(BIN) $(SCRIPTS) $(DESTDIR)$(BINDIR) ++ ++libfdt_install: libfdt + $(INSTALL) -d $(DESTDIR)$(LIBDIR) + $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR) + ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname) diff --git a/package/dtc/dtc.mk b/package/dtc/dtc.mk new file mode 100644 index 0000000000..5e8965466f --- /dev/null +++ b/package/dtc/dtc.mk @@ -0,0 +1,57 @@ +################################################################################ +# +# dtc +# +################################################################################ + +DTC_VERSION = e4b497f367a3b2ae99cc52089a14a221b13a76ef +DTC_SITE = git://git.jdl.com/software/dtc.git +DTC_LICENSE = GPLv2+/BSD-2c +DTC_LICENSE_FILES = README.license GPL +DTC_INSTALL_STAGING = YES +DTC_DEPENDENCIES = host-bison host-flex + +define DTC_POST_INSTALL_TARGET_RM_DTDIFF + rm -f $(TARGET_DIR)/usr/bin/dtdiff +endef + +ifeq ($(BR2_PACKAGE_DTC_PROGRAMS),y) + +DTC_LICENSE += (for the library), GPLv2+ (for the executables) +# Use default goal to build everything +DTC_BUILD_GOAL = +DTC_INSTALL_GOAL = install +DTC_CLEAN_GOAL = clean +ifeq ($(BR2_PACKAGE_BASH),) +DTC_POST_INSTALL_TARGET_HOOKS += DTC_POST_INSTALL_TARGET_RM_DTDIFF +endif + +else # $(BR2_PACKAGE_DTC_PROGRAMS) != y + +DTC_BUILD_GOAL = libfdt +# libfdt_install is our own install rule added by our patch +DTC_INSTALL_GOAL = libfdt_install +DTC_CLEAN_GOAL = libfdt_clean + +endif # $(BR2_PACKAGE_DTC_PROGRAMS) != y + +define DTC_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + $(MAKE) -C $(@D) PREFIX=/usr $(DTC_BUILD_GOAL) +endef + +# For staging, only the library is needed +define DTC_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX=/usr libfdt_install +endef + +define DTC_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr $(DTC_INSTALL_GOAL) +endef + +define DTC_CLEAN_CMDS + $(MAKE) -C $(@D) $(DTC_CLEAN_GOAL) +endef + +$(eval $(generic-package)) diff --git a/package/duma/Config.in b/package/duma/Config.in new file mode 100644 index 0000000000..e9cc9b2fd7 --- /dev/null +++ b/package/duma/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_DUMA + bool "duma" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + help + D.U.M.A. - Detect Unintended Memory Access. A fork of the + Electric Fence library. Detects buffer overflow and + underflow, and also memory leaks. + + http://duma.sourceforge.net + +if BR2_PACKAGE_DUMA + +config BR2_PACKAGE_DUMA_NO_LEAKDETECTION + bool "disable memory leak detection" + +endif # BR2_PACKAGE_DUMA + +comment "duma needs a toolchain w/ C++, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/duma/duma-01-fix-cross-compilation.patch b/package/duma/duma-01-fix-cross-compilation.patch new file mode 100644 index 0000000000..eceaf06bec --- /dev/null +++ b/package/duma/duma-01-fix-cross-compilation.patch @@ -0,0 +1,37 @@ +Allow cross compilation. Adapted from crosstool-ng. + +Signed-off-by: Baruch Siach + +Index: b/GNUmakefile +=================================================================== +--- a/GNUmakefile ++++ b/GNUmakefile +@@ -93,10 +93,6 @@ + # also define 'WIN32' + + # some defaults: +-CC=gcc +-CXX=g++ +-AR=ar +-RANLIB=ranlib + INSTALL=install + RM=rm + RMFORCE=rm -f +@@ -471,7 +467,7 @@ + + createconf$(EXEPOSTFIX): createconf.o + - $(RMFORCE) createconf$(EXEPOSTFIX) +- $(CC) $(CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf$(EXEPOSTFIX) ++ $(CC_FOR_BUILD) $(HOST_CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf$(EXEPOSTFIX) + + tstheap$(EXEPOSTFIX): libduma.a tstheap.o + - $(RMFORCE) tstheap$(EXEPOSTFIX) +@@ -532,7 +528,7 @@ + # define rules how to build objects for createconf + # + createconf.o: +- $(CC) $(CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@ ++ $(CC_FOR_BUILD) $(HOST_CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@ + + + # diff --git a/package/duma/duma.mk b/package/duma/duma.mk new file mode 100644 index 0000000000..93ae16e48e --- /dev/null +++ b/package/duma/duma.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# duma +# +################################################################################ + +DUMA_VERSION = 2_5_15 +DUMA_SOURCE = duma_$(DUMA_VERSION).tar.gz +DUMA_SITE = http://downloads.sourceforge.net/project/duma/duma/2.5.15 +DUMA_LICENSE = GPLv2+ LGPLv2.1+ +DUMA_LICENSE_FILES = COPYING-GPL COPYING-LGPL + +DUMA_INSTALL_STAGING = YES + +DUMA_OPTIONS = \ + $(if $(BR2_PACKAGE_DUMA_NO_LEAKDETECTION),-DDUMA_LIB_NO_LEAKDETECTION) + +# The dependency of some source files in duma_config.h, which is generated at +# build time, is not specified in the Makefile. Force non-parallel build. +define DUMA_BUILD_CMDS + $(MAKE1) $(TARGET_CONFIGURE_OPTS) \ + DUMA_OPTIONS="$(DUMA_OPTIONS)" \ + $(DUMA_CPP) -C $(@D) +endef + +define DUMA_INSTALL_STAGING_CMDS + $(MAKE) prefix=$(STAGING_DIR)/usr install -C $(@D) +endef + +define DUMA_INSTALL_TARGET_CMDS + $(MAKE) prefix=$(TARGET_DIR)/usr install -C $(@D) +endef + +$(eval $(generic-package)) diff --git a/package/dvb-apps/Config.in b/package/dvb-apps/Config.in new file mode 100644 index 0000000000..ba3ce45ec0 --- /dev/null +++ b/package/dvb-apps/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_DVB_APPS + bool "dvb-apps (transponders data)" + help + Install the DVB-C, DVB-S, DVB-T and ATSC transponders data. + + http://linuxtv.org/projects.php + http://linuxtv.org/hg/dvb-apps + +if BR2_PACKAGE_DVB_APPS + +comment "dvb-apps utils needs a toolchain w/ largefile, threads" + depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_DVB_APPS_UTILS + bool "dvb-apps utilities" + depends on BR2_LARGEFILE + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + A small number of DVB test and utility programs, + including szap and dvbscan. + +endif diff --git a/package/dvb-apps/dvb-apps-0001-Fix-generate-keynames.patch b/package/dvb-apps/dvb-apps-0001-Fix-generate-keynames.patch new file mode 100644 index 0000000000..498607d97d --- /dev/null +++ b/package/dvb-apps/dvb-apps-0001-Fix-generate-keynames.patch @@ -0,0 +1,30 @@ +Fix generate-keynames.sh script for cross-compilation + +generate-keynames.sh reads /usr/include/linux to find the keyname +symbols. However, when cross-compiling, the include path points +somewhere else. Allow the user to pass CROSS_ROOT to point to the +root of the cross-compilation environment. + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- +diff -rup dvb-apps-83c746462ccb.orig/util/av7110_loadkeys/generate-keynames.sh dvb-apps-83c746462ccb/util/av7110_loadkeys/generate-keynames.sh +--- dvb-apps-83c746462ccb.orig/util/av7110_loadkeys/generate-keynames.sh 2012-12-06 10:38:07.000000000 +0100 ++++ dvb-apps-83c746462ccb/util/av7110_loadkeys/generate-keynames.sh 2013-08-29 21:47:09.717991439 +0200 +@@ -18,7 +18,7 @@ echo "};" >> $1 + echo >> $1 + echo >> $1 + echo "static struct input_key_name key_name [] = {" >> $1 +-for x in $(cat /usr/include/linux/input.h input_fake.h | \ ++for x in $(cat ${CROSS_ROOT}/usr/include/linux/input.h input_fake.h | \ + egrep "#define[ \t]+KEY_" | grep -v KEY_MAX | \ + cut -f 1 | cut -f 2 -d " " | sort -u) ; do + echo " { \"$(echo $x | cut -b 5-)\", $x }," >> $1 +@@ -26,7 +26,7 @@ done + echo "};" >> $1 + echo >> $1 + echo "static struct input_key_name btn_name [] = {" >> $1 +-for x in $(cat /usr/include/linux/input.h input_fake.h | \ ++for x in $(cat ${CROSS_ROOT}/usr/include/linux/input.h input_fake.h | \ + egrep "#define[ \t]+BTN_" | \ + cut -f 1 | cut -f 2 -d " " | sort -u) ; do + echo " { \"$(echo $x | cut -b 5-)\", $x }," >> $1 diff --git a/package/dvb-apps/dvb-apps.mk b/package/dvb-apps/dvb-apps.mk new file mode 100644 index 0000000000..8cf6a7958b --- /dev/null +++ b/package/dvb-apps/dvb-apps.mk @@ -0,0 +1,59 @@ +################################################################################ +# +# dvb-apps +# +################################################################################ + +DVB_APPS_VERSION = 83c746462ccb +DVB_APPS_SITE = http://linuxtv.org/hg/dvb-apps +DVB_APPS_SITE_METHOD = hg + +# We just install the transponders data. As this is not a 'work' as per +# traditional copyright, but just a collection of 'facts', there's probably +# no license to apply to these data files. +# To be noted however, is that the dvb-apps package bundles a copy of the +# GPLv2 and a copy of the LGPLv2.1, and that some of the source files refer +# to either the GPLv2+ or the LGPLv2.1+. +# But since we do not use any of those source files, their license do not +# apply to us. +DVB_APPS_LICENSE = unknown (probably public domain) + +ifeq ($(BR2_PACKAGE_DVB_APPS_UTILS),y) +# Utilitiess are selected, build and install everything + +DVB_APPS_LICENSE += GPLv2 GPLv2+ LGPLv2.1+ +DVB_APPS_LICENSE_FILES += COPYING COPYING.LGPL + +DVB_APPS_LDFLAGS = $(TARGET_LDFLAGS) + +ifeq ($(BR2_ENABLE_LOCALE),) +DVB_APPS_DEPENDENCIES = libiconv +DVB_APPS_LDFLAGS += -liconv +endif + +DVB_APPS_INSTALL_STAGING = YES + +define DVB_APPS_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) LDFLAGS="$(DVB_APPS_LDFLAGS)" \ + $(MAKE) -C $(@D) CROSS_ROOT=$(STAGING_DIR) V=1 +endef + +define DVB_APPS_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) V=1 DESTDIR=$(STAGING_DIR) install +endef + +define DVB_APPS_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) V=1 DESTDIR=$(TARGET_DIR) install +endef + +else +# Utilities are not selected, just install the scan files +define DVB_APPS_INSTALL_TARGET_CMDS + for i in atsc dvb-c dvb-s dvb-t; do \ + mkdir -p $(TARGET_DIR)/usr/share/dvb/$$i; \ + $(INSTALL) $(@D)/util/scan/$$i/* $(TARGET_DIR)/usr/share/dvb/$$i; \ + done +endef +endif + +$(eval $(generic-package)) diff --git a/package/dvbsnoop/Config.in b/package/dvbsnoop/Config.in new file mode 100644 index 0000000000..09a3c4d8f6 --- /dev/null +++ b/package/dvbsnoop/Config.in @@ -0,0 +1,25 @@ +config BR2_PACKAGE_DVBSNOOP + bool "dvbsnoop" + depends on BR2_LARGEFILE + help + Dvbsnoop is just a simple tool to analyze, view or debug a transport + stream (TS), program elementary stream (PES) or even a program stream + (PS). Dvbsnoop is trying to get input mostly direct from a frontend + (satellite or cable tuner inside a set-top box for example) via DVB + APIv3 to view into a TS, or a demux to view PES or PS (also mostly + inside the set-top box or even PCI Card or USB Plug) but also from a + file (recorded TS). + Dvbsnoop is working well on SD transport streams but may have some + limited functionality on HD transport streams (DVB-{C,S,T}2 because + of missing knowledge how to handle it. + + Dvbsnoop itself doesn't do the tuning on the frontend, this has to be + done by external helpers or manually driver call. + The dvbsnoop tool was written while developing the software Neutrino + on the set-top box DBox2. + + http://dvbsnoop.sourceforge.net + http://en.wikipedia.org/wiki/DBox2 + +comment "dvbsnoop needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE diff --git a/package/dvbsnoop/dvbsnoop.mk b/package/dvbsnoop/dvbsnoop.mk new file mode 100644 index 0000000000..0b061282b3 --- /dev/null +++ b/package/dvbsnoop/dvbsnoop.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# dvbsnoop +# +################################################################################ + +DVBSNOOP_VERSION = 1.4.50 +DVBSNOOP_SITE = http://downloads.sourceforge.net/project/dvbsnoop/dvbsnoop/dvbsnoop-$(DVBSNOOP_VERSION) +DVBSNOOP_LICENSE = GPLv2 +DVBSNOOP_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/e2fsprogs/Config.in b/package/e2fsprogs/Config.in index d4f4405331..1d1e174f45 100644 --- a/package/e2fsprogs/Config.in +++ b/package/e2fsprogs/Config.in @@ -49,6 +49,7 @@ config BR2_PACKAGE_E2FSPROGS_E2UNDO config BR2_PACKAGE_E2FSPROGS_E4DEFRAG bool "e4defrag" + depends on !BR2_avr32 # fallocate not implemented config BR2_PACKAGE_E2FSPROGS_FILEFRAG bool "filefrag" @@ -94,5 +95,5 @@ config BR2_PACKAGE_E2FSPROGS_UUIDGEN endif -comment "e2fsprogs requires a toolchain with LARGEFILE + WCHAR support" +comment "e2fsprogs needs a toolchain w/ largefile, wchar" depends on !(BR2_LARGEFILE && BR2_USE_WCHAR) diff --git a/package/e2fsprogs/Config.in.host b/package/e2fsprogs/Config.in.host new file mode 100644 index 0000000000..bc0c71c487 --- /dev/null +++ b/package/e2fsprogs/Config.in.host @@ -0,0 +1,6 @@ +config BR2_PACKAGE_HOST_E2FSPROGS + bool "host e2fsprogs" + help + The EXT2/3/4 file system utilities. + + http://e2fsprogs.sf.net diff --git a/package/e2fsprogs/e2fsprogs-add-missing-dep-of-tst_uuid-o.patch b/package/e2fsprogs/e2fsprogs-add-missing-dep-of-tst_uuid-o.patch deleted file mode 100644 index 1871a569f3..0000000000 --- a/package/e2fsprogs/e2fsprogs-add-missing-dep-of-tst_uuid-o.patch +++ /dev/null @@ -1,17 +0,0 @@ -Add missing dependency of tst_uuid.o on uuid.h - -The missing dependency used to break parallel builds. - -Signed-off-by: Arnout Vandecappelle (Essensium/Mind) ---- -diff -Nrup e2fsprogs.orig//lib/uuid/Makefile.in e2fsprogs-1.41.14//lib/uuid/Makefile.in ---- e2fsprogs.orig//lib/uuid/Makefile.in 2010-06-14 05:07:36.000000000 +0200 -+++ e2fsprogs-1.41.14//lib/uuid/Makefile.in 2011-07-18 13:44:58.000000000 +0200 -@@ -76,7 +76,7 @@ uuid.h: $(srcdir)/uuid.h.in - $(top_builddir)/lib/uuid/uuid_types.h: $(srcdir)/uuid_types.h.in $(top_builddir)/config.status - cd $(top_builddir); CONFIG_FILES=$(my_dir)/uuid_types.h ./config.status - --tst_uuid.o: $(srcdir)/tst_uuid.c -+tst_uuid.o: $(srcdir)/tst_uuid.c uuid.h - $(E) " CC $@" - $(Q) $(CC) $(ALL_CFLAGS) -c $(srcdir)/tst_uuid.c -o tst_uuid.o diff --git a/package/e2fsprogs/e2fsprogs.mk b/package/e2fsprogs/e2fsprogs.mk index afa534f491..cdca9062ab 100644 --- a/package/e2fsprogs/e2fsprogs.mk +++ b/package/e2fsprogs/e2fsprogs.mk @@ -1,15 +1,17 @@ -############################################################# +################################################################################ # # e2fsprogs # -############################################################# +################################################################################ -E2FSPROGS_VERSION = 1.42.2 -E2FSPROGS_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/e2fsprogs +E2FSPROGS_VERSION = 1.42.8 +E2FSPROGS_SITE = http://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v$(E2FSPROGS_VERSION) +E2FSPROGS_LICENSE = GPLv2, libuuid BSD-3c, libss and libet MIT-like with advertising clause +E2FSPROGS_LICENSE_FILES = COPYING lib/uuid/COPYING lib/ss/mit-sipb-copyright.h lib/et/internal.h E2FSPROGS_CONF_OPT = \ --disable-tls \ - --enable-elf-shlibs \ + $(if $(BR2_PREFER_STATIC_LIB),,--enable-elf-shlibs) \ $(if $(BR2_PACKAGE_E2FSPROGS_DEBUGFS),,--disable-debugfs) \ $(if $(BR2_PACKAGE_E2FSPROGS_E2IMAGE),,--disable-imager) \ $(if $(BR2_PACKAGE_E2FSPROGS_E4DEFRAG),,--disable-defrag) \ @@ -21,7 +23,7 @@ E2FSPROGS_CONF_OPT = \ --disable-e2initrd-helper \ --disable-testio-debug -E2FSPROGS_DEPENDENCIES = host-pkg-config util-linux +E2FSPROGS_DEPENDENCIES = host-pkgconf util-linux E2FSPROGS_MAKE_OPT = \ LDCONFIG=true @@ -30,7 +32,7 @@ define HOST_E2FSPROGS_INSTALL_CMDS $(HOST_MAKE_ENV) $(MAKE) -C $(@D) install install-libs endef # we don't have a host-util-linux -HOST_E2FSPROGS_DEPENDENCIES = host-pkg-config +HOST_E2FSPROGS_DEPENDENCIES = host-pkgconf # binaries to keep or remove E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_BADBLOCKS) += usr/sbin/badblocks @@ -103,5 +105,5 @@ ifeq ($(BR2_PACKAGE_E2FSPROGS_FINDFS),y) E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_FINDFS_SYMLINK endif -$(eval $(call AUTOTARGETS,package,e2fsprogs)) -$(eval $(call AUTOTARGETS,package,e2fsprogs,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/ebtables/Config.in b/package/ebtables/Config.in new file mode 100644 index 0000000000..3a678ad097 --- /dev/null +++ b/package/ebtables/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_EBTABLES + bool "ebtables" + depends on BR2_INET_IPV6 + depends on BR2_USE_MMU # fork() + help + Ethernet bridge frame table administration + + http://ebtables.sourceforge.net + +comment "ebtables needs a toolchain w/ IPv6" + depends on BR2_USE_MMU + depends on !BR2_INET_IPV6 diff --git a/package/ebtables/ebtables.mk b/package/ebtables/ebtables.mk new file mode 100644 index 0000000000..612cf83023 --- /dev/null +++ b/package/ebtables/ebtables.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# ebtables +# +################################################################################ + +EBTABLES_VERSION = 2.0.10-4 +EBTABLES_SOURCE = ebtables-v$(EBTABLES_VERSION).tar.gz +EBTABLES_SITE = http://downloads.sourceforge.net/project/ebtables/ebtables/ebtables-$(subst .,-,$(EBTABLES_VERSION)) +EBTABLES_LICENSE = GPLv2+ +EBTABLES_LICENSE_FILES = COPYING +EBTABLES_STATIC = $(if $(BR2_PREFER_STATIC_LIB),static) +EBTABLES_K64U32 = $(if $(BR2_KERNEL_64_USERLAND_32),CFLAGS+="-DKERNEL_64_USERSPACE_32") + +define EBTABLES_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) LIBDIR=/lib/ebtables $(EBTABLES_STATIC) \ + $(EBTABLES_K64U32) -C $(@D) +endef + +ifeq ($(BR2_PREFER_STATIC_LIB),y) +define EBTABLES_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/$(EBTABLES_SUBDIR)/static \ + $(TARGET_DIR)/sbin/ebtables +endef +else +define EBTABLES_INSTALL_TARGET_CMDS + for so in $(@D)/$(EBTABLES_SUBDIR)/*.so \ + $(@D)/$(EBTABLES_SUBDIR)/extensions/*.so; \ + do \ + $(INSTALL) -m 0755 -D $${so} \ + $(TARGET_DIR)/lib/ebtables/`basename $${so}`; \ + done + $(INSTALL) -m 0755 -D $(@D)/$(EBTABLES_SUBDIR)/ebtables \ + $(TARGET_DIR)/sbin/ebtables + $(INSTALL) -m 0644 -D $(@D)/ethertypes $(TARGET_DIR)/etc/ethertypes +endef +endif + +define EBTABLES_UNINSTALL_TARGET_CMDS + rm -rf $(TARGET_DIR)/lib/ebtables + rm -f $(TARGET_DIR)/sbin/ebtables +endef + +$(eval $(generic-package)) diff --git a/package/ecryptfs-utils/Config.in b/package/ecryptfs-utils/Config.in new file mode 100644 index 0000000000..62cf6c856a --- /dev/null +++ b/package/ecryptfs-utils/Config.in @@ -0,0 +1,29 @@ +config BR2_PACKAGE_ECRYPTFS_UTILS + bool "ecryptfs-utils" + select BR2_PACKAGE_KEYUTILS + select BR2_PACKAGE_LIBNSS + depends on BR2_USE_MMU # keyutils + depends on !BR2_avr32 && !BR2_microblaze # keyutils + depends on BR2_LARGEFILE # libnss + depends on BR2_TOOLCHAIN_HAS_THREADS # libnss -> libnspr + depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT # libnss -> libnspr + help + eCryptfs is a POSIX-compliant enterprise cryptographic + filesystem for Linux. It is stacked on top of any other + Linux filesystem, it stores cryptographic metadata in the header + of each file written. + + The eCryptfs kernel module is available in all Linux kernels + since version 2.6.19. This package provides userspace utilities + needed to mount eCryptfs. + + Files are encrypted using a passphrase. Consider building openssl + for another method. + + http://ecryptfs.org + +comment "ecryptfs-utils needs a toolchain w/ largefile, threads" + depends on !BR2_avr32 && !BR2_microblaze + depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT + depends on BR2_USE_MMU + depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/ecryptfs-utils/ecryptfs-utils.mk b/package/ecryptfs-utils/ecryptfs-utils.mk new file mode 100644 index 0000000000..f3f46e1687 --- /dev/null +++ b/package/ecryptfs-utils/ecryptfs-utils.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# ecryptfs-utils +# +################################################################################ + +ECRYPTFS_UTILS_VERSION = 103 +ECRYPTFS_UTILS_SOURCE = ecryptfs-utils_$(ECRYPTFS_UTILS_VERSION).orig.tar.gz +ECRYPTFS_UTILS_SITE = https://launchpad.net/ecryptfs/trunk/$(ECRYPTFS_UTILS_VERSION)/+download +ECRYPTFS_UTILS_LICENSE = GPLv2+ +ECRYPTFS_UTILS_LICENSE_FILES = COPYING + +ECRYPTFS_UTILS_DEPENDENCIES = keyutils libnss host-intltool +ECRYPTFS_UTILS_CONF_OPT = --disable-pywrap --disable-pam + +#Needed for build system to find pk11func.h and libnss3.so +ECRYPTFS_UTILS_CONF_ENV = \ + NSS_CFLAGS="-I$(STAGING_DIR)/usr/include/nss -I$(STAGING_DIR)/usr/include/nspr" \ + NSS_LIBS="-lnss3" + +ifeq ($(BR2_PACKAGE_OPENSSL),y) + ECRYPTFS_UTILS_CONF_OPT += --enable-openssl + ECRYPTFS_UTILS_DEPENDENCIES += openssl +else + ECRYPTFS_UTILS_CONF_OPT += --disable-openssl +endif + +$(eval $(autotools-package)) diff --git a/package/ed/ed.mk b/package/ed/ed.mk index e7016bf4df..17de543c07 100644 --- a/package/ed/ed.mk +++ b/package/ed/ed.mk @@ -1,12 +1,30 @@ -############################################################# +################################################################################ # # ed # -############################################################# +################################################################################ -ED_VERSION = 1.5 +ED_VERSION = 1.9 ED_SITE = $(BR2_GNU_MIRROR)/ed ED_CONF_OPT = CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \ LDFLAGS="$(TARGET_LDFLAGS)" +ED_LICENSE = GPLv3+ +ED_LICENSE_FILES = COPYING -$(eval $(call AUTOTARGETS,package,ed)) +define ED_CONFIGURE_CMDS + (cd $(@D); \ + ./configure \ + --prefix=/usr \ + $(TARGET_CONFIGURE_OPTS) \ + ) +endef + +define ED_BUILD_CMDS + $(MAKE) -C $(@D) +endef + +define ED_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install +endef + +$(eval $(generic-package)) diff --git a/package/eeprog/eeprog.mk b/package/eeprog/eeprog.mk index e61aecb45a..950cf80c42 100644 --- a/package/eeprog/eeprog.mk +++ b/package/eeprog/eeprog.mk @@ -1,14 +1,14 @@ -############################################################# +################################################################################ # # eeprog # -############################################################# +################################################################################ EEPROG_VERSION = 0.7.6 -EEPROG_SITE = http://codesink.org/download +EEPROG_SITE = http://www.codesink.org/download define EEPROG_BUILD_CMDS - $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" -C $(@D) + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) endef define EEPROG_INSTALL_TARGET_CMDS @@ -19,4 +19,4 @@ define EEPROG_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/bin/eeprog endef -$(eval $(call GENTARGETS,package,eeprog)) +$(eval $(generic-package)) diff --git a/package/efl/Config.in b/package/efl/Config.in new file mode 100644 index 0000000000..36afd1aa2e --- /dev/null +++ b/package/efl/Config.in @@ -0,0 +1,28 @@ +menuconfig BR2_PACKAGE_EFL + bool "Enlightenment Foundation Libraries" + depends on BR2_USE_WCHAR + help + Enlightenment Foundation Libraries + + http://enlightenment.org + +if BR2_PACKAGE_EFL + +source "package/efl/expedite/Config.in" +source "package/efl/libeina/Config.in" +source "package/efl/libecore/Config.in" +source "package/efl/libeet/Config.in" +source "package/efl/libefreet/Config.in" +source "package/efl/libeio/Config.in" +source "package/efl/libevas/Config.in" +source "package/efl/libevas-generic-loaders/Config.in" +source "package/efl/libembryo/Config.in" +source "package/efl/libedje/Config.in" +source "package/efl/libethumb/Config.in" +source "package/efl/libelementary/Config.in" +source "package/efl/libedbus/Config.in" + +endif # BR2_PACKAGE_EFL + +comment "EFL needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/efl/efl.mk b/package/efl/efl.mk new file mode 100644 index 0000000000..1de68cf8fe --- /dev/null +++ b/package/efl/efl.mk @@ -0,0 +1,3 @@ +EFL_VERSION = 1.7.7 + +include $(sort $(wildcard package/efl/*/*.mk)) diff --git a/package/efl/expedite/Config.in b/package/efl/expedite/Config.in new file mode 100644 index 0000000000..918c34ee49 --- /dev/null +++ b/package/efl/expedite/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_EXPEDITE + bool "expedite" + select BR2_PACKAGE_LIBEINA + select BR2_PACKAGE_LIBEVAS + select BR2_PACKAGE_LIBEET + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_avr32 # libevas + help + Expedite is the official Evas benchmark tool. It can test different + engines, such as X11, XRender, OpenGL (also ES variant), SDL, + DirectFB and so on. Its tests are quite extensive, trying to + reproduce real world usage cases. + +comment "expedite needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + depends on !BR2_avr32 diff --git a/package/efl/expedite/expedite.mk b/package/efl/expedite/expedite.mk new file mode 100644 index 0000000000..dfd3a4af26 --- /dev/null +++ b/package/efl/expedite/expedite.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# expedite +# +################################################################################ + +EXPEDITE_VERSION = $(EFL_VERSION) +EXPEDITE_SITE = http://download.enlightenment.org/releases/ +EXPEDITE_LICENSE = BSD-2c +EXPEDITE_LICENSE_FILES = COPYING + +EXPEDITE_DEPENDENCIES = libevas libeina libeet + +$(eval $(autotools-package)) diff --git a/package/efl/libecore/Config.in b/package/efl/libecore/Config.in new file mode 100644 index 0000000000..41a16f9c83 --- /dev/null +++ b/package/efl/libecore/Config.in @@ -0,0 +1,43 @@ +config BR2_PACKAGE_LIBECORE + bool "libecore" + select BR2_PACKAGE_LIBEINA + help + Ecore is the event/X abstraction layer that makes doing + selections, Xdnd, general X stuff, event loops, timeouts and + idle handlers fast, optimized, and convenient. + + http://trac.enlightenment.org/e/wiki/Ecore + +if BR2_PACKAGE_LIBECORE + +config BR2_PACKAGE_LIBECORE_DIRECTFB + bool "libecore DirectFB support" + depends on BR2_PACKAGE_DIRECTFB + default y + +config BR2_PACKAGE_LIBECORE_FB + bool "libecore framebuffer support" + +config BR2_PACKAGE_LIBECORE_SDL + bool "libecore SDL support" + select BR2_PACKAGE_SDL + +config BR2_PACKAGE_LIBECORE_X + bool "libecore X support" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + +config BR2_PACKAGE_LIBECORE_X_XCB + bool "libecore XCB support" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_LIBXCB + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XCB_UTIL + +config BR2_PACKAGE_LIBECORE_EVAS + bool "libecore Evas support" + select BR2_PACKAGE_LIBEVAS + depends on !BR2_avr32 # libevas + +endif # BR2_PACKAGE_LIBECORE diff --git a/package/efl/libecore/libecore.mk b/package/efl/libecore/libecore.mk new file mode 100644 index 0000000000..98496ac17b --- /dev/null +++ b/package/efl/libecore/libecore.mk @@ -0,0 +1,111 @@ +################################################################################ +# +# libecore +# +################################################################################ + +LIBECORE_VERSION = $(EFL_VERSION) +LIBECORE_SOURCE = ecore-$(LIBECORE_VERSION).tar.bz2 +LIBECORE_SITE = http://download.enlightenment.org/releases/ +LIBECORE_LICENSE = BSD-2c +LIBECORE_LICENSE_FILES = COPYING + +LIBECORE_INSTALL_STAGING = YES + +LIBECORE_DEPENDENCIES = host-pkgconf libeina + +HOST_LIBECORE_DEPENDENCIES = host-pkgconf host-libeina host-libevas +HOST_LIBECORE_CONF_OPT += \ + --enable-ecore-evas \ + --disable-simple-x11 \ + --disable-ecore-directfb \ + --disable-ecore-x \ + --disable-ecore-x-xcb \ + --disable-ecore-imf-xim + +# default options +LIBECORE_CONF_OPT = --disable-simple-x11 + +ifeq ($(BR2_PACKAGE_TSLIB),y) +LIBECORE_DEPENDENCIES += tslib +endif + +ifeq ($(BR2_PACKAGE_LIBGLIB2),y) +LIBECORE_DEPENDENCIES += libglib2 +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +LIBECORE_DEPENDENCIES += openssl +LIBECORE_CONF_OPT += --enable-openssl +else +LIBECORE_CONF_OPT += --disable-openssl +endif + +ifeq ($(BR2_PACKAGE_GNUTLS)$(BR2_PACKAGE_LIBGCRYPT),yy) +LIBECORE_DEPENDENCIES += gnutls libgcrypt +LIBECORE_CONF_OPT += --enable-gnutls --with-libgcrypt-prefix=$(STAGING_DIR)/usr +else +LIBECORE_CONF_OPT += --disable-gnutls +endif + +ifeq ($(BR2_PACKAGE_LIBCURL),y) +LIBECORE_DEPENDENCIES += libcurl +endif + +# libecore +ifeq ($(BR2_PACKAGE_LIBECORE_DIRECTFB),y) +LIBECORE_CONF_OPT += --enable-ecore-directfb +LIBECORE_DEPENDENCIES += directfb +else +LIBECORE_CONF_OPT += --disable-ecore-directfb +endif + +ifeq ($(BR2_PACKAGE_LIBECORE_FB),y) +LIBECORE_CONF_OPT += --enable-ecore-fb +else +LIBECORE_CONF_OPT += --disable-ecore-fb +endif + +ifeq ($(BR2_PACKAGE_LIBECORE_SDL),y) +LIBECORE_CONF_OPT += --enable-ecore-sdl +LIBECORE_DEPENDENCIES += sdl +else +LIBECORE_CONF_OPT += --disable-ecore-sdl +endif + +ifeq ($(BR2_PACKAGE_LIBECORE_X),y) +LIBECORE_CONF_OPT += --enable-ecore-x +LIBECORE_DEPENDENCIES += xlib_libXext xlib_libX11 +else +LIBECORE_CONF_OPT += --disable-ecore-x --disable-ecore-imf-xim +endif + +ifeq ($(BR2_PACKAGE_LIBECORE_X_XCB),y) +LIBECORE_CONF_OPT += --enable-ecore-x-xcb +LIBECORE_DEPENDENCIES += libxcb xlib_libX11 xcb-util pixman + +# src/util/makekeys is executed at build time to generate +# ecore_xcb_keysym_table.h, so it should get compiled for the host. +# The ecore makefile unfortunately doesn't know about cross +# compilation so this doesn't work. Long term, we should probably +# teach it about CC_FOR_BUILD, but for now simply build makekeys by +# hand in advance +define LIBECORE_BUILD_MAKEKEYS_FOR_HOST + $(HOST_CONFIGURE_OPTS) $(MAKE1) -C $(@D)/src/util makekeys.o makekeys +endef + +LIBECORE_POST_EXTRACT_HOOKS += LIBECORE_BUILD_MAKEKEYS_FOR_HOST +else +LIBECORE_CONF_OPT += --disable-ecore-x-xcb +endif + +# libecore-evas +ifeq ($(BR2_PACKAGE_LIBECORE_EVAS),y) +LIBECORE_CONF_OPT += --enable-ecore-evas +LIBECORE_DEPENDENCIES += libevas +else +LIBECORE_CONF_OPT += --disable-ecore-evas +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/efl/libedbus/Config.in b/package/efl/libedbus/Config.in new file mode 100644 index 0000000000..783a54e7f3 --- /dev/null +++ b/package/efl/libedbus/Config.in @@ -0,0 +1,45 @@ +config BR2_PACKAGE_LIBEDBUS + bool "libedbus" + select BR2_PACKAGE_LIBEINA + select BR2_PACKAGE_LIBECORE + select BR2_PACKAGE_DBUS + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus + depends on BR2_USE_MMU # dbus + help + E_Dbus is a set of wrappers around D-Bus APIs so they can be + easily used by EFL applications, automatically providing + Ecore/main loop integration, as well as Eina data types. + + http://trac.enlightenment.org/e/wiki/E_Dbus + +if BR2_PACKAGE_LIBEDBUS + +config BR2_PACKAGE_LIBEDBUS_BLUEZ + bool "bluez support" + depends on !BR2_avr32 # bluez_utils + depends on BR2_USE_WCHAR # bluez_utils -> glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # bluez_utils -> glib2 + select BR2_PACKAGE_BLUEZ_UTILS + help + Bluetooth support. + +comment "bluez support needs a toolchain w/ wchar, threads" + depends on !BR2_avr32 + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_LIBEDBUS_CONNMAN + bool "connman support" + depends on BR2_PACKAGE_CONNMAN + help + Connection manager support. + +config BR2_PACKAGE_LIBEDBUS_NOTIFY + bool "notify support" + help + Notify support. + +endif + +comment "libedbus needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/efl/libedbus/libedbus.mk b/package/efl/libedbus/libedbus.mk new file mode 100644 index 0000000000..e6f9b0885e --- /dev/null +++ b/package/efl/libedbus/libedbus.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# libedbus +# +################################################################################ + +LIBEDBUS_VERSION = $(EFL_VERSION) +LIBEDBUS_SOURCE = e_dbus-$(LIBEDBUS_VERSION).tar.bz2 +LIBEDBUS_SITE = http://download.enlightenment.org/releases/ +LIBEDBUS_LICENSE = BSD-2c +LIBEDBUS_LICENSE_FILES = COPYING + +LIBEDBUS_INSTALL_STAGING = YES + +LIBEDBUS_DEPENDENCIES = host-pkgconf dbus libeina libecore + +ifeq ($(BR2_PACKAGE_LIBEDBUS_BLUEZ),y) +LIBEDBUS_CONF_OPT += --enable-ebluez +LIBEDBUS_DEPENDENCIES += bluez_utils +else +LIBEDBUS_CONF_OPT += --disable-ebluez +endif + +ifeq ($(BR2_PACKAGE_LIBEDBUS_CONNMAN),y) +LIBEDBUS_CONF_OPT += --enable-econnman0_7x +LIBEDBUS_DEPENDENCIES += connman +else +LIBEDBUS_CONF_OPT += --disable-econnman0_7x +endif + +ifeq ($(BR2_PACKAGE_LIBEDBUS_NOTIFY),y) +LIBEDBUS_CONF_OPT += --enable-enotify --disable-edbus-notify-test +else +LIBEDBUS_CONF_OPT += --disable-enotify +endif + +$(eval $(autotools-package)) diff --git a/package/efl/libedje/Config.in b/package/efl/libedje/Config.in new file mode 100644 index 0000000000..4c3027417d --- /dev/null +++ b/package/efl/libedje/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_LIBEDJE + bool "libedje" + select BR2_PACKAGE_LIBEINA + select BR2_PACKAGE_LIBEET + select BR2_PACKAGE_LIBECORE + select BR2_PACKAGE_LIBECORE_EVAS + select BR2_PACKAGE_LIBEMBRYO + select BR2_PACKAGE_LIBEVAS + select BR2_PACKAGE_LUA + depends on !BR2_avr32 # libevas + help + A graphical layout and animation library for animated + resizable, compressed and scalable themes. + + http://trac.enlightenment.org/e/wiki/Edje + +config BR2_PACKAGE_LIBEDJE_CC + bool "build edje_cc" + depends on BR2_PACKAGE_LIBEDJE + help + Build and install the Edje compiler for the target. Normally this + is not required. diff --git a/package/efl/libedje/libedje.mk b/package/efl/libedje/libedje.mk new file mode 100644 index 0000000000..12d1999a42 --- /dev/null +++ b/package/efl/libedje/libedje.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# libedje +# +################################################################################ + +LIBEDJE_VERSION = $(EFL_VERSION) +LIBEDJE_SOURCE = edje-$(LIBEDJE_VERSION).tar.bz2 +LIBEDJE_SITE = http://download.enlightenment.org/releases/ +LIBEDJE_LICENSE = GPLv2+ (epp binary), BSD-2c (everything else) +LIBEDJE_LICENSE_FILES = COPYING + +LIBEDJE_INSTALL_STAGING = YES + +LIBEDJE_DEPENDENCIES = host-pkgconf lua libeina libeet libecore libevas \ + libembryo + +ifeq ($(BR2_PACKAGE_LIBEDJE_CC),y) +LIBEDJE_CONF_OPT += --enable-edje-cc +else +LIBEDJE_CONF_OPT += --disable-edje-cc +endif + +HOST_LIBEDJE_CONF_OPT = --enable-edje-cc + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/efl/libeet/Config.in b/package/efl/libeet/Config.in new file mode 100644 index 0000000000..48631a055e --- /dev/null +++ b/package/efl/libeet/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBEET + bool "libeet" + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBEINA + help + Eet is a tiny library designed to write an arbitary set of + chunks of data to a file and optionally compress each chunk + (very much like a zip file). + + http://trac.enlightenment.org/e/wiki/Eet diff --git a/package/efl/libeet/libeet.mk b/package/efl/libeet/libeet.mk new file mode 100644 index 0000000000..ee33a0ded9 --- /dev/null +++ b/package/efl/libeet/libeet.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# libeet +# +################################################################################ + +LIBEET_VERSION = $(EFL_VERSION) +LIBEET_SOURCE = eet-$(LIBEET_VERSION).tar.bz2 +LIBEET_SITE = http://download.enlightenment.org/releases/ +LIBEET_LICENSE = BSD-2c +LIBEET_LICENSE_FILES = COPYING + +LIBEET_INSTALL_STAGING = YES + +LIBEET_DEPENDENCIES = host-pkgconf zlib jpeg libeina +HOST_LIBEET_DEPENDENCIES = host-pkgconf host-zlib host-libjpeg host-libeina + +ifeq ($(BR2_PACKAGE_GNUTLS)$(BR2_PACKAGE_LIBGCRYPT),yy) +LIBEET_DEPENDENCIES += gnutls libgcrypt +LIBEET_CONF_ENV += LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config +LIBEET_CONF_OPT += --enable-gnutls +else +LIBEET_CONF_OPT += --disable-gnutls +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/efl/libefreet/Config.in b/package/efl/libefreet/Config.in new file mode 100644 index 0000000000..8687db4672 --- /dev/null +++ b/package/efl/libefreet/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBEFREET + bool "libefreet" + select BR2_PACKAGE_LIBEINA + select BR2_PACKAGE_LIBEET + select BR2_PACKAGE_LIBECORE + help + Efreet is a library designed to help apps work with several of the + Freedesktop.org standards regarding Icons, Desktop files and Menus. + + http://trac.enlightenment.org/e/wiki/Efreet diff --git a/package/efl/libefreet/libefreet.mk b/package/efl/libefreet/libefreet.mk new file mode 100644 index 0000000000..27b8fa280a --- /dev/null +++ b/package/efl/libefreet/libefreet.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# libefreet +# +################################################################################ + +LIBEFREET_VERSION = $(EFL_VERSION) +LIBEFREET_SOURCE = efreet-$(LIBEFREET_VERSION).tar.bz2 +LIBEFREET_SITE = http://download.enlightenment.org/releases/ +LIBEFREET_LICENSE = BSD-2c +LIBEFREET_LICENSE_FILES = COPYING + +LIBEFREET_INSTALL_STAGING = YES + +LIBEFREET_DEPENDENCIES = libeina libeet libecore + +$(eval $(autotools-package)) diff --git a/package/efl/libeina/Config.in b/package/efl/libeina/Config.in new file mode 100644 index 0000000000..80600ad340 --- /dev/null +++ b/package/efl/libeina/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBEINA + bool "libeina" + help + Eina is a tiny library to handle data types (list, hash, etc.) + + http://trac.enlightenment.org/e/wiki/Eina diff --git a/package/efl/libeina/libeina.mk b/package/efl/libeina/libeina.mk new file mode 100644 index 0000000000..1a11ae00c2 --- /dev/null +++ b/package/efl/libeina/libeina.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# libeina +# +################################################################################ + +LIBEINA_VERSION = $(EFL_VERSION) +LIBEINA_SOURCE = eina-$(LIBEINA_VERSION).tar.bz2 +LIBEINA_SITE = http://download.enlightenment.org/releases/ +LIBEINA_LICENSE = LGPLv2.1+ +LIBEINA_LICENSE_FILES = COPYING + +LIBEINA_INSTALL_STAGING = YES + +LIBEINA_DEPENDENCIES = host-pkgconf + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/efl/libeio/Config.in b/package/efl/libeio/Config.in new file mode 100644 index 0000000000..0b2751ce6d --- /dev/null +++ b/package/efl/libeio/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_LIBEIO + bool "libeio" + select BR2_PACKAGE_LIBEET + select BR2_PACKAGE_LIBEINA + select BR2_PACKAGE_LIBECORE + help + Eio integrates with EFL (Ecore, Eina) to provide efficient + filesystem Input/Output (I/O). It use the best techniques to + achieve such purpose, like using at-variants, splice, + properly handling errors and doing it in an asynchronous + fashion by means of worker threads. It is also ported to + Windows, so multi-platform. + + Whenever you need to list a directory, copy, move or delete + files, Eio will do that task better than you'd achieve with + naive implementations, and it is easy to use. + + http://trac.enlightenment.org/e/wiki/Eio diff --git a/package/efl/libeio/libeio.mk b/package/efl/libeio/libeio.mk new file mode 100644 index 0000000000..65d2a32307 --- /dev/null +++ b/package/efl/libeio/libeio.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libeio +# +################################################################################ + +LIBEIO_VERSION = $(EFL_VERSION) +LIBEIO_SOURCE = eio-$(LIBEIO_VERSION).tar.bz2 +LIBEIO_SITE = http://download.enlightenment.org/releases/ +LIBEIO_LICENSE = LGPLv2.1 +LIBEIO_LICENSE_FILES = COPYING + +LIBEIO_INSTALL_STAGING = YES +LIBEIO_DEPENDENCIES = libeina libeet libecore + +$(eval $(autotools-package)) diff --git a/package/efl/libelementary/Config.in b/package/efl/libelementary/Config.in new file mode 100644 index 0000000000..d4584e84f6 --- /dev/null +++ b/package/efl/libelementary/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LIBELEMENTARY + bool "libelementary" + select BR2_PACKAGE_LIBEINA + select BR2_PACKAGE_LIBEVAS + select BR2_PACKAGE_LIBECORE + select BR2_PACKAGE_LIBEDJE + depends on !BR2_avr32 # libevas + help + Elementary is a widget toolkit and EFL wrapper and convenience + library to make it easy to build applications and tools with UIs + with less code. + + http://trac.enlightenment.org/e/wiki/Elementary diff --git a/package/efl/libelementary/libelementary.mk b/package/efl/libelementary/libelementary.mk new file mode 100644 index 0000000000..82a8c1c90a --- /dev/null +++ b/package/efl/libelementary/libelementary.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# libelementary +# +################################################################################ + +LIBELEMENTARY_VERSION = $(EFL_VERSION) +LIBELEMENTARY_SOURCE = elementary-$(LIBELEMENTARY_VERSION).tar.bz2 +LIBELEMENTARY_SITE = http://download.enlightenment.org/releases/ +LIBELEMENTARY_LICENSE = LGPLv2.1 +LIBELEMENTARY_LICENSE_FILES = COPYING + +LIBELEMENTARY_INSTALL_STAGING = YES + +LIBELEMENTARY_DEPENDENCIES = libeina libevas libecore libedje host-libedje \ + host-libeet + +LIBELEMENTARY_CONF_OPT = --with-edje-cc=$(HOST_DIR)/usr/bin/edje_cc \ + --with-eet-eet=$(HOST_DIR)/usr/bin/eet + +# libethumb_client is only built when ethumbd is built. +# ethumbd is only built if edbus is built. +ifeq ($(BR2_PACKAGE_LIBETHUMB)$(BR2_PACKAGE_LIBEDBUS),yy) +LIBELEMENTARY_DEPENDENCIES += libethumb +LIBELEMENTARY_CONF_OPT += --enable-ethumb +else +LIBELEMENTARY_CONF_OPT += --disable-ethumb +endif + +$(eval $(autotools-package)) diff --git a/package/efl/libembryo/Config.in b/package/efl/libembryo/Config.in new file mode 100644 index 0000000000..63c706415b --- /dev/null +++ b/package/efl/libembryo/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBEMBRYO + bool "libembryo" + select BR2_PACKAGE_LIBEINA + help + Embryo is primarily a shared library that gives you an API + to load and control interpreted programs compiled into an + abstract machine bytecode that it understands. + + http://trac.enlightenment.org/e/wiki/Embryo diff --git a/package/efl/libembryo/libembryo.mk b/package/efl/libembryo/libembryo.mk new file mode 100644 index 0000000000..727c424233 --- /dev/null +++ b/package/efl/libembryo/libembryo.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# libembryo +# +################################################################################ + +LIBEMBRYO_VERSION = $(EFL_VERSION) +LIBEMBRYO_SOURCE = embryo-$(LIBEMBRYO_VERSION).tar.bz2 +LIBEMBRYO_SITE = http://download.enlightenment.org/releases/ +LIBEMBRYO_LICENSE = BSD-2c, Embryo license +LIBEMBRYO_LICENSE_FILES = COPYING + +LIBEMBRYO_INSTALL_STAGING = YES + +LIBEMBRYO_DEPENDENCIES = host-pkgconf libeina + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/efl/libethumb/Config.in b/package/efl/libethumb/Config.in new file mode 100644 index 0000000000..3a2f3dc2b6 --- /dev/null +++ b/package/efl/libethumb/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBETHUMB + bool "libethumb" + select BR2_PACKAGE_LIBEINA + select BR2_PACKAGE_LIBEVAS + select BR2_PACKAGE_LIBECORE + select BR2_PACKAGE_LIBECORE_EVAS + select BR2_PACKAGE_LIBEDJE + depends on !BR2_avr32 # libevas + help + Ethumb is a library for generating thumbnail images of documents. + + http://trac.enlightenment.org/e/wiki/Ethumb diff --git a/package/efl/libethumb/libethumb.mk b/package/efl/libethumb/libethumb.mk new file mode 100644 index 0000000000..62ce752d94 --- /dev/null +++ b/package/efl/libethumb/libethumb.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# libethumb +# +################################################################################ + +LIBETHUMB_VERSION = $(EFL_VERSION) +LIBETHUMB_SOURCE = ethumb-$(LIBETHUMB_VERSION).tar.bz2 +LIBETHUMB_SITE = http://download.enlightenment.org/releases/ +LIBETHUMB_LICENSE = LGPLv2.1+ +LIBETHUMB_LICENSE_FILES = COPYING + +LIBETHUMB_INSTALL_STAGING = YES + +LIBETHUMB_DEPENDENCIES = libeina libevas libecore libedje host-libedje + +LIBETHUMB_CONF_OPT = --with-edje-cc=$(HOST_DIR)/usr/bin/edje_cc + +ifeq ($(BR2_PACKAGE_LIBEXIF),y) +LIBETHUMB_DEPENDENCIES += libexif +endif + +ifeq ($(BR2_PACKAGE_LIBEDBUS),y) +LIBETHUMB_DEPENDENCIES += libedbus +endif + +$(eval $(autotools-package)) diff --git a/package/efl/libevas-generic-loaders/Config.in b/package/efl/libevas-generic-loaders/Config.in new file mode 100644 index 0000000000..23b9f77e8b --- /dev/null +++ b/package/efl/libevas-generic-loaders/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS + bool "libevas generic loaders" + select BR2_PACKAGE_LIBEINA + help + These are additional "generic" loaders for Evas that are + stand-alone executables that evas may run from its generic + loader module. + + http://trac.enlightenment.org/e/wiki/Evas_Generic_Loaders + +if BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS + +config BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS_SVG + bool "SVG loader" + select BR2_PACKAGE_LIBRSVG + select BR2_PACKAGE_CAIRO + depends on BR2_USE_WCHAR # librsvg -> glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # librsvg -> glib2 + depends on BR2_INSTALL_LIBSTDCPP # librsvg -> pango + help + This option enables the Evas generic SVG loader + +comment "SVG loader needs a toolchain w/ wchar, threads, C++" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP + +endif diff --git a/package/efl/libevas-generic-loaders/libevas-generic-loaders.mk b/package/efl/libevas-generic-loaders/libevas-generic-loaders.mk new file mode 100644 index 0000000000..6de7d64371 --- /dev/null +++ b/package/efl/libevas-generic-loaders/libevas-generic-loaders.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# libevas-generic-loaders +# +################################################################################ + +LIBEVAS_GENERIC_LOADERS_VERSION = $(EFL_VERSION) +LIBEVAS_GENERIC_LOADERS_SOURCE = evas_generic_loaders-$(LIBEVAS_GENERIC_LOADERS_VERSION).tar.bz2 +LIBEVAS_GENERIC_LOADERS_SITE = http://download.enlightenment.org/releases/ +LIBEVAS_GENERIC_LOADERS_LICENSE = GPLv2 +LIBEVAS_GENERIC_LOADERS_LICENSE_FILES = COPYING + +LIBEVAS_GENERIC_LOADERS_INSTALL_STAGING = YES + +LIBEVAS_GENERIC_LOADERS_DEPENDENCIES = libeina + +# For now, we only support the SVG loader +LIBEVAS_GENERIC_LOADERS_CONF_OPT += \ + --disable-poppler \ + --disable-spectre \ + --disable-libraw \ + --disable-gstreamer + +ifeq ($(BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS_SVG),y) +LIBEVAS_GENERIC_LOADERS_DEPENDENCIES += librsvg cairo +LIBEVAS_GENERIC_LOADERS_CONF_OPT += --enable-svg +else +LIBEVAS_GENERIC_LOADERS_CONF_OPT += --disable-svg +endif + +$(eval $(autotools-package)) diff --git a/package/efl/libevas/Config.in b/package/efl/libevas/Config.in new file mode 100644 index 0000000000..b14a3193b5 --- /dev/null +++ b/package/efl/libevas/Config.in @@ -0,0 +1,203 @@ +config BR2_PACKAGE_LIBEVAS + bool "libevas" + depends on !BR2_avr32 # no epoll_create1 or inotify_init1 + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_LIBEINA + # required to build so far + select BR2_PACKAGE_LIBEVAS_SCALE_SMOOTH + help + Evas is a clean display canvas API for several target + display systems that can draw anti-aliased text, smooth + super and sub-sampled scaled images, alpha-blend objects + much and more. + + http://trac.enlightenment.org/e/wiki/Evas + +if BR2_PACKAGE_LIBEVAS + +comment "libevas rendering options" + +config BR2_PACKAGE_LIBEVAS_SCALE_SAMPLE + bool "libevas sampling scaler" + help + This enables the sampling scaler code. This is the fastest + image scaling code, but also the lowest quality. + +config BR2_PACKAGE_LIBEVAS_SCALE_SMOOTH + bool "libevas smooth scaler" + help + This is the nicest looking scaler that is not that much + slower than tri-linear, but it looks really good. + +config BR2_PACKAGE_LIBEVAS_SMALL_DITHERING + bool "libevas small dithering" + help + This uses a 4x4 dither mask instead of 128x128. On desktop + boxes these days (Pentium, Pentium2, amd etc.) the speed + difference is not really measurable, but the quality of the + 128x128 dither mask is quite a lot better. + +config BR2_PACKAGE_LIBEVAS_LINE_DITHERING + bool "libevas line dithering" + +config BR2_PACKAGE_LIBEVAS_NO_DITHERING + bool "libevas no dithering" + + +comment "libevas backends" + +config BR2_PACKAGE_LIBEVAS_BUFFER + bool "libevas buffer backend" + help + This enables the software buffer rendering engine. There is + no hardware assist here. + +config BR2_PACKAGE_LIBEVAS_DIRECTFB + bool "libevas DirectFB backend" + depends on BR2_PACKAGE_DIRECTFB + default y + help + This is the DirectFB engine that uses the DirectFB library + (http://www.directfb.org) on Linux to access the framebuffer + with (or maybe without) acceleration. + +config BR2_PACKAGE_LIBEVAS_FB + bool "libevas frame buffer backend" + help + This is the software framebuffer driving engine. this uses + the linux framebuffer device (/dev/fb) and will currently + just inherit the current framebuffer settings on the fb + device and use them to run in. + +config BR2_PACKAGE_LIBEVAS_SDL + bool "libevas SDL backend" + select BR2_PACKAGE_SDL + help + This is the software SDL engine that uses SDL library + (http://www.libsdl.org). This library should work on many + operating systems. + +config BR2_PACKAGE_LIBEVAS_SDL_GL + bool "libevas SDL OpenGL backend" + depends on BR2_PACKAGE_SDL_X11 + depends on BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR # mesa needs big X + help + This is the SDL OpenGL engine that uses SDL library + and OpenGL to render. This may be hardware accelerated. + +comment "SDL OpenGL backend needs modular X.org and X11 support in SDL" + depends on !(BR2_PACKAGE_SDL_X11 && BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR) + +config BR2_PACKAGE_LIBEVAS_X11 + bool "libevas X11 backend" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + help + This enables the software X11 rendering engine that renders + to X drawable targets using highly optimised software + routines. There is no hardware assist here. + +config BR2_PACKAGE_LIBEVAS_X11_GLX + bool "libevas X11 GLX backend" + depends on BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR # mesa needs big X + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXRENDER + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XPROTO_GLPROTO + help + This enables the OpenGL X11 rendering engine that renders + using GLX which may be hardware accelerated. + +config BR2_PACKAGE_LIBEVAS_XCB + bool "libevas XCB backend" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_LIBXCB + select BR2_PACKAGE_XCB_UTIL + select BR2_PACKAGE_XCB_PROTO + select BR2_PACKAGE_PIXMAN + help + This enable the software XCB rendering engine. It allows the + same features than the software X11 engine. + +config BR2_PACKAGE_LIBEVAS_XCB_GLX + bool "libevas XCB GLX backend" + depends on BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR # mesa needs big X + select BR2_PACKAGE_LIBXCB + select BR2_PACKAGE_XCB_UTIL + select BR2_PACKAGE_XCB_PROTO + select BR2_PACKAGE_XPROTO_GLPROTO + help + This enables the OpenGL X11 XCB rendering engine that renders + using GLX which may be hardware accelerated. + +choice + prompt "libevas OpenGL flavor" + depends on BR2_PACKAGE_LIBEVAS_SDL_GL || BR2_PACKAGE_LIBEVAS_X11_GLX || BR2_PACKAGE_LIBEVAS_XCB_GLX + default BR2_PACKAGE_LIBEVAS_GL + +config BR2_PACKAGE_LIBEVAS_GL + bool "generic OpenGL" + select BR2_PACKAGE_MESA3D + select BR2_PACKAGE_LIBEET + +config BR2_PACKAGE_LIBEVAS_GLES_SGX + bool "OpenGL-ES SGX" + +config BR2_PACKAGE_LIBEVAS_GLES_S3C6410 + bool "OpenGL-ES S3C6410" +endchoice + + +comment "libevas loaders" + +config BR2_PACKAGE_LIBEVAS_PNG + bool "libevas png loader" + select BR2_PACKAGE_LIBPNG + help + This enables the loader code that loads png files using + libpng. + +config BR2_PACKAGE_LIBEVAS_JPEG + bool "libevas jpeg loader" + select BR2_PACKAGE_JPEG + help + This enables the loader code that loads jpeg files using + libjpeg. + +config BR2_PACKAGE_LIBEVAS_GIF + bool "libevas gif loader" + select BR2_PACKAGE_LIBUNGIF + help + This enables the loader code that loads gif files using + libungif. + +config BR2_PACKAGE_LIBEVAS_PMAPS + bool "libevas pmaps loader" + help + This enables the loader code that loads pmaps files. + +config BR2_PACKAGE_LIBEVAS_TIFF + bool "libevas tiff loader" + select BR2_PACKAGE_TIFF + help + This enables the loader code that loads tiff files. + +config BR2_PACKAGE_LIBEVAS_XPM + bool "libevas xpm loader" + help + This enables the loader code that loads xpm files. + +config BR2_PACKAGE_LIBEVAS_EET + bool "libevas eet image loader" + select BR2_PACKAGE_LIBEET + help + This enables the loader code that loads images using libeet. + +config BR2_PACKAGE_LIBEVAS_EET_FONT + bool "libevas eet font loader" + select BR2_PACKAGE_LIBEET + help + This enables the loader code that loads fonts using libeet. + +endif # BR2_PACKAGE_LIBEVAS diff --git a/package/efl/libevas/libevas.mk b/package/efl/libevas/libevas.mk new file mode 100644 index 0000000000..46de4cb4f7 --- /dev/null +++ b/package/efl/libevas/libevas.mk @@ -0,0 +1,220 @@ +################################################################################ +# +# libevas +# +################################################################################ + +LIBEVAS_VERSION = $(EFL_VERSION) +LIBEVAS_SOURCE = evas-$(LIBEVAS_VERSION).tar.bz2 +LIBEVAS_SITE = http://download.enlightenment.org/releases/ +LIBEVAS_LICENSE = BSD-2c +LIBEVAS_LICENSE_FILES = COPYING + +LIBEVAS_INSTALL_STAGING = YES + +LIBEVAS_DEPENDENCIES = host-pkgconf zlib libeina freetype + +HOST_LIBEVAS_DEPENDENCIES = host-pkgconf host-zlib host-libeina \ + host-freetype host-libpng host-libjpeg +HOST_LIBEVAS_CONF_OPT += \ + --enable-image-loader-png \ + --enable-image-loader-jpeg \ + --disable-image-loader-gif \ + --disable-image-loader-tiff \ + --disable-image-loader-eet \ + --disable-font-loader-eet \ + --disable-cpu-sse3 \ + --disable-software-sdl \ + --disable-gl-sdl \ + --disable-software-xlib \ + --disable-gl-xlib \ + --enable-software-xcb \ + --disable-gl-xcb + +# rendering options +ifeq ($(BR2_PACKAGE_LIBEVAS_SCALE_SAMPLE),y) +LIBEVAS_CONF_OPT += --enable-scale-sample +else +LIBEVAS_CONF_OPT += --disable-scale-sample +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_SCALE_SMOOTH),y) +LIBEVAS_CONF_OPT += --enable-scale-smooth +else +LIBEVAS_CONF_OPT += --disable-scale-smooth +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_SMALL_DITHERING),y) +LIBEVAS_CONF_OPT += --enable-small-dither-mask +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_LINE_DITHERING),y) +LIBEVAS_CONF_OPT += --enable-line-dither-mask +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_NO_DITHERING),y) +LIBEVAS_CONF_OPT += --enable-no-dither-mask +endif + +# backends +ifeq ($(BR2_PACKAGE_LIBEVAS_BUFFER),y) +LIBEVAS_CONF_OPT += --enable-buffer +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_X11),y) +LIBEVAS_CONF_OPT += --enable-software-xlib +LIBEVAS_DEPENDENCIES += xlib_libX11 xlib_libXext +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_X11_GLX),y) +LIBEVAS_CONF_OPT += --enable-gl-xlib +LIBEVAS_DEPENDENCIES += xproto_glproto xlib_libX11 xlib_libXrender \ + xlib_libXext libeet +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_XCB),y) +LIBEVAS_CONF_OPT += --enable-software-xcb +LIBEVAS_DEPENDENCIES += libxcb xcb-proto xcb-util pixman +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_XCB_GLX),y) +LIBEVAS_CONF_OPT += --enable-gl-xcb +LIBEVAS_DEPENDENCIES += libxcb xcb-proto xcb-util xproto_glproto +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_FB),y) +LIBEVAS_CONF_OPT += --enable-fb +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_DIRECTFB),y) +LIBEVAS_CONF_OPT += --enable-directfb +LIBEVAS_DEPENDENCIES += directfb +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_SDL),y) +LIBEVAS_CONF_OPT += --enable-software-sdl +LIBEVAS_DEPENDENCIES += sdl +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_SDL_GL),y) +LIBEVAS_CONF_OPT += --enable-gl-sdl +LIBEVAS_DEPENDENCIES += sdl +# configure script forgets to check for eet / fill this out +LIBEVAS_CONF_ENV += \ + GL_EET_CFLAGS='-I$(STAGING_DIR)/usr/include/eet-1' \ + GL_EET_LIBS='-leet' +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_GL),y) +LIBEVAS_DEPENDENCIES += mesa3d libeet +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_GLES_SGX),y) +LIBEVAS_CONF_OPT += --enable-gl-flavor-gles --enable-gles-variety-sgx +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_GLES_S3C6410),y) +LIBEVAS_CONF_OPT += --enable-gl-flavor-gles --enable-gles-variety-s3c6410 +endif + +# code options +ifeq ($(BR2_X86_CPU_HAS_MMX),y) +LIBEVAS_CONF_OPT += --enable-cpu-mmx +else +LIBEVAS_CONF_OPT += --disable-cpu-mmx +endif + +ifeq ($(BR2_X86_CPU_HAS_SSE),y) +LIBEVAS_CONF_OPT += --enable-cpu-sse +else +LIBEVAS_CONF_OPT += --disable-cpu-sse +endif + +ifeq ($(BR2_X86_CPU_HAS_SSE3),y) +LIBEVAS_CONF_OPT += --enable-cpu-sse3 +else +LIBEVAS_CONF_OPT += --disable-cpu-sse3 +endif + +ifeq ($(BR2_powerpc_7400)$(BR2_powerpc_7450)$(BR2_powerpc_970),y) +LIBEVAS_CONF_OPT += --enable-cpu-altivec +else +LIBEVAS_CONF_OPT += --disable-cpu-altivec +endif + +ifeq ($(BR2_ARM_CPU_HAS_NEON),y) +LIBEVAS_CONF_OPT += --enable-cpu-neon +else +LIBEVAS_CONF_OPT += --disable-cpu-neon +endif + +# loaders +ifeq ($(BR2_PACKAGE_LIBEVAS_PNG),y) +LIBEVAS_CONF_OPT += --enable-image-loader-png +LIBEVAS_DEPENDENCIES += libpng +else +LIBEVAS_CONF_OPT += --disable-image-loader-png +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_JPEG),y) +LIBEVAS_CONF_OPT += --enable-image-loader-jpeg +LIBEVAS_DEPENDENCIES += jpeg +else +LIBEVAS_CONF_OPT += --disable-image-loader-jpeg +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_GIF),y) +LIBEVAS_CONF_OPT += --enable-image-loader-gif +LIBEVAS_DEPENDENCIES += libungif +else +LIBEVAS_CONF_OPT += --disable-image-loader-gif +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_PMAPS),y) +LIBEVAS_CONF_OPT += --enable-image-loader-pmaps +else +LIBEVAS_CONF_OPT += --disable-image-loader-pmaps +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_TIFF),y) +LIBEVAS_CONF_OPT += --enable-image-loader-tiff +LIBEVAS_DEPENDENCIES += tiff +else +LIBEVAS_CONF_OPT += --disable-image-loader-tiff +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_XPM),y) +LIBEVAS_CONF_OPT += --enable-image-loader-xpm +else +LIBEVAS_CONF_OPT += --disable-image-loader-xpm +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_EET),y) +LIBEVAS_CONF_OPT += --enable-image-loader-eet +LIBEVAS_DEPENDENCIES += libeet +else +LIBEVAS_CONF_OPT += --disable-image-loader-eet +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_EET_FONT),y) +LIBEVAS_CONF_OPT += --enable-font-loader-eet +LIBEVAS_DEPENDENCIES += libeet +else +LIBEVAS_CONF_OPT += --disable-font-loader-eet +endif + +# async image preload support needs threads support in toolchain +ifneq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +LIBEVAS_CONF_OPT += --disable-async-preload +endif + +# libevas installs the source code of examples on the target, which +# are generally not useful. +define LIBEVAS_REMOVE_EXAMPLES + rm -rf $(TARGET_DIR)/usr/share/evas/examples/ +endef + +LIBEVAS_POST_INSTALL_TARGET_HOOKS += LIBEVAS_REMOVE_EXAMPLES + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/eigen/Config.in b/package/eigen/Config.in new file mode 100644 index 0000000000..c7fcde243c --- /dev/null +++ b/package/eigen/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_EIGEN + bool "eigen" + help + Eigen is a C++ template library for linear algebra: vectors, + matrices, and related algorithms. It is versatile, fast, elegant + and works on many platforms (OS/Compilers). + + This package only installs header files to the include path. + If you just want to use Eigen, you can use the header files + right away. There is no binary to link to. Eigen is a pure + template library defined in the headers. + + http://eigen.tuxfamily.org/ diff --git a/package/eigen/eigen.mk b/package/eigen/eigen.mk new file mode 100644 index 0000000000..5abd464526 --- /dev/null +++ b/package/eigen/eigen.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# eigen +# +################################################################################ + +# version 3.2 +EIGEN_VERSION = ffa86ffb5570 +EIGEN_SITE = https://bitbucket.org/eigen/eigen/ +EIGEN_SITE_METHOD = hg +EIGEN_LICENSE = MPL2, BSD-3c, LGPLv2.1 +EIGEN_LICENSE_FILES = COPYING.MPL2 COPYING.BSD COPYING.LGPL COPYING.README +EIGEN_INSTALL_STAGING = YES +EIGEN_INSTALL_TARGET = NO + +# This package only consists of headers that need to be +# copied over to the sysroot for compile time use +define EIGEN_INSTALL_STAGING_CMDS + $(RM) -r $(STAGING_DIR)/usr/include/Eigen + cp -a $(@D)/Eigen $(STAGING_DIR)/usr/include/ +endef + +$(eval $(generic-package)) diff --git a/package/elf2flt/Config.in.host b/package/elf2flt/Config.in.host new file mode 100644 index 0000000000..dad48d805e --- /dev/null +++ b/package/elf2flt/Config.in.host @@ -0,0 +1,10 @@ +config BR2_PACKAGE_HOST_ELF2FLT + bool "Enable elf2flt support?" + depends on BR2_arm || BR2_bfin || BR2_sh || BR2_sparc + help + uCLinux uses a Binary Flat format commonly known as BFLT. It + is a relatively simple and lightweight executable format + based on the original a.out format. + + This option compiles the required tools and makes the required + modifications on your toolchain (linker). diff --git a/package/elf2flt/elf2flt.mk b/package/elf2flt/elf2flt.mk new file mode 100644 index 0000000000..ce40f8d395 --- /dev/null +++ b/package/elf2flt/elf2flt.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# elf2flt +# +################################################################################ + +ELF2FLT_VERSION = 20130904 +ELF2FLT_SITE = cvs://cvs.uclinux.org:/var/cvs +ELF2FLT_SITE_METHOD = cvs +ELF2FLT_LICENSE = GPLv2+ +ELF2FLT_LICENSE_FILES = LICENSE.TXT + +HOST_ELF2FLT_DEPENDENCIES = host-binutils host-zlib + +# It is not exactly a host variant, but more a cross variant, which is +# why we pass a special --target option. +HOST_ELF2FLT_CONF_OPT = \ + --with-bfd-include-dir=$(HOST_BINUTILS_DIR)/bfd/ \ + --with-binutils-include-dir=$(HOST_BINUTILS_DIR)/include/ \ + --with-libbfd=$(HOST_BINUTILS_DIR)/bfd/libbfd.a \ + --with-libiberty=$(HOST_BINUTILS_DIR)/libiberty/libiberty.a \ + --target=$(GNU_TARGET_NAME) + +HOST_ELF2FLT_CONF_ENV = LIBS=-lz + +$(eval $(host-autotools-package)) diff --git a/package/elftosb/elftosb-fixes-includes.patch b/package/elftosb/elftosb-fixes-includes.patch new file mode 100644 index 0000000000..eaf8ebad98 --- /dev/null +++ b/package/elftosb/elftosb-fixes-includes.patch @@ -0,0 +1,19 @@ +This patch uses system include files instead of a hard coded system path to fixe +potential compilation failure on systems that do not populate system header +files in /usr/include/.. + +Signed-off-by: Eric Jarrige +--- +Index: host-elftosb-10.12.01/common/stdafx.h +=================================================================== +--- host-elftosb-10.12.01.orig/common/stdafx.h 2012-01-30 12:43:35.000000000 +0100 ++++ host-elftosb-10.12.01/common/stdafx.h 2012-01-30 12:43:54.000000000 +0100 +@@ -27,7 +27,7 @@ + // For Linux systems only, types.h only defines the signed + // integer types. This is not professional code. + // Update: They are defined in the header files in the more recent version of redhat enterprise gcc. +-#include "/usr/include/sys/types.h" ++#include + #include + //typedef unsigned long uint32_t; + //typedef unsigned short uint16_t; diff --git a/package/elftosb/elftosb-force-cxx-compiler.patch b/package/elftosb/elftosb-force-cxx-compiler.patch new file mode 100644 index 0000000000..14df0dbe46 --- /dev/null +++ b/package/elftosb/elftosb-force-cxx-compiler.patch @@ -0,0 +1,98 @@ +Subject: [PATCH 1/1] elftosb: force host C++ compiler + +Because Freescale provides *.cpp sources and elftosb links again libstdc++, +force to use the host c++ compiler. + +This patch avoids the following error occurs: + +gcc AESKey.o Blob.o crc.o DataSource.o DataTarget.o ELFSourceFile.o EncoreBootImage.o EvalContext.o GHSSecInfo.o GlobMatcher.o HexValues.o Logging.o Operation.o OptionDictionary.o options.o OutputSection.o Random.o RijndaelCBCMAC.o rijndael.o SHA1.o SourceFile.o SRecordSourceFile.o stdafx.o StELFFile.o StExecutableImage.o StSRecordFile.o Value.o Version.o format_string.o ExcludesListMatcher.o SearchPath.o DataSourceImager.o IVTDataSource.o BootImageGenerator.o ConversionController.o ElftosbAST.o elftosb.o elftosb_lexer.o ElftosbLexer.o elftosb_parser.tab.o EncoreBootImageGenerator.o -lstdc++ -o elftosb +/usr/bin/ld: ElftosbAST.o: undefined reference to symbol 'powf@@GLIBC_2.2.5' +/usr/bin/ld: note: 'powf@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line +/lib64/libm.so.6: could not read symbols: Invalid operation +collect2: error: ld returned 1 exit status + +When compiling with gcc and linking against libstdc++, ld uses libc instead of +libstdc++. +However, libc does not provide all functions libstdc++ does. +Indeed, maths functions are provided by libm, not libc. +Thus, elftosb should either: +- use gcc and link against libc and libm; +- or use g++ and link against libstdc++. + +Because elftosb is written in C++, this patch implement the sencond option, using +g++ and linking against libstdc++. + +Signed-off-by: Samuel Martin + +--- +Index: host-elftosb-10.12.01/makefile.rules +=================================================================== +--- host-elftosb-10.12.01.orig/makefile.rules 2012-06-09 21:12:23.557526100 +0200 ++++ host-elftosb-10.12.01/makefile.rules 2012-06-09 21:15:21.659894571 +0200 +@@ -15,6 +15,8 @@ + # UNAMES is going to be set to either "Linux" or "CYGWIN_NT-5.1" + UNAMES = $(shell uname -s) + ++CXX ?= g++ ++ + #******************************************************************************* + # Directories + +@@ -37,9 +39,9 @@ + #******************************************************************************* + # Build flags +-# gcc Compiler flags ++# Compiler flags + # -g : Produce debugging information. + +-CFLAGS = -g $(INC_PATH) -D${UNAMES} ++CXXFLAGS = -g $(INC_PATH) -D${UNAMES} + + #******************************************************************************* + # File lists +@@ -137,13 +139,13 @@ clean: + ${EXEC_FILE_ELFTOSB2} ${EXEC_FILE_SBTOOL} ${EXEC_FILE_KEYGEN} + + elftosb: ${OBJ_FILES_ELFTOSB2} +- gcc ${OBJ_FILES_ELFTOSB2} ${LIBS} -o ${EXEC_FILE_ELFTOSB2} ++ $(CXX) ${OBJ_FILES_ELFTOSB2} ${LIBS} -o ${EXEC_FILE_ELFTOSB2} + + sbtool: ${OBJ_FILES_SBTOOL} +- gcc ${OBJ_FILES_SBTOOL} ${LIBS} -o ${EXEC_FILE_SBTOOL} ++ $(CXX) ${OBJ_FILES_SBTOOL} ${LIBS} -o ${EXEC_FILE_SBTOOL} + + keygen: ${OBJ_FILES_KEYGEN} +- gcc ${OBJ_FILES_KEYGEN} ${LIBS} -o ${EXEC_FILE_KEYGEN} ++ $(CXX) ${OBJ_FILES_KEYGEN} ${LIBS} -o ${EXEC_FILE_KEYGEN} + + + #ifeq ("${UNAMES}", "Linux") +@@ -153,10 +155,10 @@ keygen: ${OBJ_FILES_KEYGEN} + .SUFFIXES : .c .cpp + + .c.o : +- gcc ${CFLAGS} -c $< ++ $(CC) ${CXXFLAGS} -c $< + + .cpp.o : +- gcc ${CFLAGS} -c $< ++ $(CXX) ${CXXFLAGS} -c $< + + #endif + +@@ -165,13 +167,13 @@ keygen: ${OBJ_FILES_KEYGEN} + + %.d: %.c + @set -e; \ +- $(CC) -MM $(CFLAGS) $< | \ ++ $(CC) -MM $(CXXFLAGS) $< | \ + sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \ + [ -s $@ ] || rm -f $@ + + %.d: %.cpp + @set -e; \ +- $(CC) -MM $(CFLAGS) $< | \ ++ $(CXX) -MM $(CXXFLAGS) $< | \ + sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \ + [ -s $@ ] || rm -f $@ + diff --git a/package/elftosb/elftosb.mk b/package/elftosb/elftosb.mk new file mode 100644 index 0000000000..c2943e4f44 --- /dev/null +++ b/package/elftosb/elftosb.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# elftosb +# +################################################################################ + +ELFTOSB_VERSION = 10.12.01 +ELFTOSB_SITE = http://repository.timesys.com/buildsources/e/elftosb/elftosb-$(ELFTOSB_VERSION) + +define HOST_ELFTOSB_BUILD_CMDS + $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) all +endef + +define HOST_ELFTOSB_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/bld/linux/elftosb $(HOST_DIR)/usr/bin/elftosb + $(INSTALL) -D -m 0755 $(@D)/bld/linux/keygen $(HOST_DIR)/usr/bin/keygen + $(INSTALL) -D -m 0755 $(@D)/bld/linux/sbtool $(HOST_DIR)/usr/bin/sbtool +endef + +define HOST_ELFTOSB_CLEAN_CMDS + rm -rf $(@D)/bld/linux +endef + +$(eval $(host-generic-package)) diff --git a/package/elfutils/Config.in b/package/elfutils/Config.in new file mode 100644 index 0000000000..47cd63d797 --- /dev/null +++ b/package/elfutils/Config.in @@ -0,0 +1,28 @@ +comment "elfutils needs a toolchain w/ largefile, wchar" + depends on !BR2_LARGEFILE || !BR2_USE_WCHAR + +config BR2_PACKAGE_ELFUTILS + bool "elfutils" + select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT + depends on BR2_LARGEFILE + depends on BR2_USE_WCHAR + help + Libraries/utilities to handle ELF objects (drop in + replacement for libelf). + + Note that this option only installs the libraries, and not + the programs. + + https://fedorahosted.org/elfutils + +if BR2_PACKAGE_ELFUTILS + +config BR2_PACKAGE_ELFUTILS_PROGS + bool "Install programs" + depends on BR2_TOOLCHAIN_USES_GLIBC + help + This option tells elfutils to not only install the libelf + libraries, but also the elfutils programs. + +endif diff --git a/package/elfutils/elfutils-01-disable-progs.patch b/package/elfutils/elfutils-01-disable-progs.patch new file mode 100644 index 0000000000..462de89e37 --- /dev/null +++ b/package/elfutils/elfutils-01-disable-progs.patch @@ -0,0 +1,47 @@ +Add a --{enable,disable}-progs configure option + +Add a --{enable,disable}-progs configuration option to elfutils. This +allows to selectively disable the compilation of the elfutils programs +(in which case only the libraries are built and installed). This is +useful because the programs are often not needed, and also because +building the programs against uClibc causes several issues (lack of +obstack_printf() in uClibc for example). + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile.am +=================================================================== +--- a/Makefile.am ++++ b/Makefile.am +@@ -22,9 +22,13 @@ + + pkginclude_HEADERS = version.h + ++if ENABLE_PROGS ++PROGS_SUBDIR = src ++endif ++ + # Add doc back when we have some real content. + SUBDIRS = config m4 lib libelf libebl libdwfl libdw libcpu libasm backends \ +- src po tests ++ $(PROGS_SUBDIR) po tests + + EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \ + COPYING COPYING-GPLV2 COPYING-LGPLV3 +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -263,6 +263,12 @@ + AC_DEFINE_UNQUOTED(LIBEBL_SUBDIR, "$LIBEBL_SUBDIR") + AH_TEMPLATE([LIBEBL_SUBDIR], [$libdir subdirectory containing libebl modules.]) + ++AC_ARG_ENABLE([progs], ++ AS_HELP_STRING([--enable-progs], [enable progs]), ++ enable_progs=$enableval, ++ enable_progs=yes) ++AM_CONDITIONAL(ENABLE_PROGS, test "$enable_progs" = yes) ++ + dnl Test for zlib and bzlib, gives ZLIB/BZLIB .am + dnl conditional and config.h USE_ZLIB/USE_BZLIB #define. + save_LIBS="$LIBS" diff --git a/package/elfutils/elfutils-02-argp-support.patch b/package/elfutils/elfutils-02-argp-support.patch new file mode 100644 index 0000000000..f81ac8f9fa --- /dev/null +++ b/package/elfutils/elfutils-02-argp-support.patch @@ -0,0 +1,92 @@ +Allow the usage of an external implementation of the argp functions + +uClibc lack the argp family of functions that glibc has. Therefore, we +add a check in the configure script to see if argp_parse is available +in the C library. If not, we look if it is available in the additional +'argp' library. If so, we link against that library. If not, we error +out. + +This allows to build elfutils against uClibc with an external argp +library. + +Signed-off-by: Thomas Petazzoni + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -269,6 +269,13 @@ + enable_progs=yes) + AM_CONDITIONAL(ENABLE_PROGS, test "$enable_progs" = yes) + ++AC_CHECK_FUNC([argp_parse]) ++if test "$ac_cv_func_argp_parse" != yes; then ++ AC_CHECK_LIB([argp],[argp_parse],ARGP_LIBS=-largp, ++ AC_MSG_ERROR([No argp_parse function available.])) ++fi ++AC_SUBST(ARGP_LIBS) ++ + dnl Test for zlib and bzlib, gives ZLIB/BZLIB .am + dnl conditional and config.h USE_ZLIB/USE_BZLIB #define. + save_LIBS="$LIBS" +Index: b/src/Makefile.am +=================================================================== +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -98,26 +98,29 @@ + # Buggy old compilers. + readelf_no_Werror = yes + +-readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl ++readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \ ++ $(ARGP_LIBS) + nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \ +- $(demanglelib) +-size_LDADD = $(libelf) $(libeu) $(libmudflap) +-strip_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl +-ld_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl ++ $(demanglelib) $(ARGP_LIBS) ++size_LDADD = $(libelf) $(libeu) $(libmudflap) $(ARGP_LIBS) ++strip_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl $(ARGP_LIBS) ++ld_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl $(ARGP_LIBS) + if NATIVE_LD + # -ldl is always needed for libebl. + ld_LDADD += libld_elf.a + endif + ld_LDFLAGS = -rdynamic +-elflint_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl +-findtextrel_LDADD = $(libdw) $(libelf) $(libmudflap) +-addr2line_LDADD = $(libdw) $(libelf) $(libmudflap) +-elfcmp_LDADD = $(libebl) $(libelf) $(libmudflap) -ldl +-objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl +-ranlib_LDADD = libar.a $(libelf) $(libeu) $(libmudflap) +-strings_LDADD = $(libelf) $(libeu) $(libmudflap) +-ar_LDADD = libar.a $(libelf) $(libeu) $(libmudflap) +-unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(libmudflap) -ldl ++elflint_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl $(ARGP_LIBS) ++findtextrel_LDADD = $(libdw) $(libelf) $(libmudflap) $(ARGP_LIBS) ++addr2line_LDADD = $(libdw) $(libelf) $(libmudflap) $(ARGP_LIBS) ++elfcmp_LDADD = $(libebl) $(libelf) $(libmudflap) -ldl $(ARGP_LIBS) ++objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \ ++ $(ARGP_LIBS) ++ranlib_LDADD = libar.a $(libelf) $(libeu) $(libmudflap) $(ARGP_LIBS) ++strings_LDADD = $(libelf) $(libeu) $(libmudflap) $(ARGP_LIBS) ++ar_LDADD = libar.a $(libelf) $(libeu) $(libmudflap) $(ARGP_LIBS) ++unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(libmudflap) -ldl \ ++ $(ARGP_LIBS) + + ldlex.o: ldscript.c + ldlex_no_Werror = yes +Index: b/libdw/Makefile.am +=================================================================== +--- a/libdw/Makefile.am ++++ b/libdw/Makefile.am +@@ -111,7 +111,7 @@ + -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \ + -Wl,--version-script,$<,--no-undefined \ + -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\ +- -ldl $(zip_LIBS) ++ -ldl $(zip_LIBS) $(ARGP_LIBS) + if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi + ln -fs $@ $@.$(VERSION) + diff --git a/package/elfutils/elfutils-03-memcpy-def.patch b/package/elfutils/elfutils-03-memcpy-def.patch new file mode 100644 index 0000000000..eb50cf654d --- /dev/null +++ b/package/elfutils/elfutils-03-memcpy-def.patch @@ -0,0 +1,24 @@ +Provide a compatibility alias __memcpy + +For some reason, libelf uses the internal glibc alias __memcpy, which +doesn't exist in uClibc. Add a manual alias so that the build can +proceed with uClibc. + +Signed-off-by: Thomas Petazzoni + +Index: b/libelf/libelf.h +=================================================================== +--- a/libelf/libelf.h ++++ b/libelf/libelf.h +@@ -34,6 +34,11 @@ + /* Get the ELF types. */ + #include + ++#ifndef _LIBC ++#ifndef __mempcpy ++#define __mempcpy mempcpy ++#endif ++#endif + + /* Known translation types. */ + typedef enum diff --git a/package/elfutils/elfutils-04-fts.patch b/package/elfutils/elfutils-04-fts.patch new file mode 100644 index 0000000000..7318236d29 --- /dev/null +++ b/package/elfutils/elfutils-04-fts.patch @@ -0,0 +1,1307 @@ +Add an implementation of the fts_*() functions + +The fts_*() functions are optional in uClibc, and not compiled in our +default configuration. The best option would be to migrate this +elfutils code to the nftw family of functions, but it requires quite +some work. + +So we have several options here: + + *) Enable fts_*() functions in our default uClibc configuration. Not + nice since only one package needs them (the help text of uClibc + for fts_*() functions explicitly mention that they have been added + to be able to build elfutils). + + *) Use gnulib, but it is quite heavy to setup, requires modifications + to configure.ac, and other things. + + *) Copy the fts function from uClibc into elfutils source code. This + is the solution used below. uClibc is LGPL, and elfutils is + LGPL/GPL, so there should not be any licensing issue. + +Of course, the fts_*() functions are only built if they are not +already provided by the C library. + +Signed-off-by: Thomas Petazzoni + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -276,6 +276,10 @@ + fi + AC_SUBST(ARGP_LIBS) + ++AC_CHECK_HEADER([fts.h], ++ AC_DEFINE([HAVE_FTS_H], [], [Define if is available in C library])) ++AM_CONDITIONAL(HAVE_FTS, test "$ac_cv_header_fts_h" = yes) ++ + dnl Test for zlib and bzlib, gives ZLIB/BZLIB .am + dnl conditional and config.h USE_ZLIB/USE_BZLIB #define. + save_LIBS="$LIBS" +Index: b/libdwfl/Makefile.am +=================================================================== +--- a/libdwfl/Makefile.am ++++ b/libdwfl/Makefile.am +@@ -79,6 +79,9 @@ + if LZMA + libdwfl_a_SOURCES += lzma.c + endif ++if !HAVE_FTS ++libdwfl_a_SOURCES += fts.c ++endif + + if MUDFLAP + libdwfl = libdwfl.a $(libdw) $(libebl) $(libelf) $(libeu) +Index: b/libdwfl/fts.c +=================================================================== +--- /dev/null ++++ b/libdwfl/fts.c +@@ -0,0 +1,1095 @@ ++/*- ++ * Copyright (c) 1990, 1993, 1994 ++ * The Regents of the University of California. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 4. Neither the name of the University nor the names of its contributors ++ * may be used to endorse or promote products derived from this software ++ * without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE ++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include "fts_.h" ++#include ++#include ++#include ++ ++/* Largest alignment size needed, minus one. ++ Usually long double is the worst case. */ ++#ifndef ALIGNBYTES ++#define ALIGNBYTES (__alignof__ (long double) - 1) ++#endif ++/* Align P to that size. */ ++#ifndef ALIGN ++#define ALIGN(p) (((unsigned long int) (p) + ALIGNBYTES) & ~ALIGNBYTES) ++#endif ++ ++ ++static FTSENT *fts_alloc (FTS *, const char *, size_t); ++static FTSENT *fts_build (FTS *, int); ++static void fts_lfree (FTSENT *); ++static void fts_load (FTS *, FTSENT *); ++static size_t fts_maxarglen (char * const *); ++static void fts_padjust (FTS *, FTSENT *); ++static int fts_palloc (FTS *, size_t); ++static FTSENT *fts_sort (FTS *, FTSENT *, int); ++static u_short fts_stat (FTS *, FTSENT *, int); ++static int fts_safe_changedir (FTS *, FTSENT *, int, const char *); ++ ++#ifndef MAX ++#define MAX(a, b) ({ __typeof__ (a) _a = (a); \ ++ __typeof__ (b) _b = (b); \ ++ _a > _b ? _a : _b; }) ++#endif ++ ++#define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2]))) ++ ++#define CLR(opt) (sp->fts_options &= ~(opt)) ++#define ISSET(opt) (sp->fts_options & (opt)) ++#define SET(opt) (sp->fts_options |= (opt)) ++ ++#define FCHDIR(sp, fd) (!ISSET(FTS_NOCHDIR) && fchdir(fd)) ++ ++/* fts_build flags */ ++#define BCHILD 1 /* fts_children */ ++#define BNAMES 2 /* fts_children, names only */ ++#define BREAD 3 /* fts_read */ ++ ++FTS * ++fts_open( char * const *argv, register int options, ++ int (*compar) (const FTSENT **, const FTSENT **)) ++{ ++ register FTS *sp; ++ register FTSENT *p, *root; ++ register int nitems; ++ FTSENT *parent = NULL; ++ FTSENT *tmp = NULL; ++ ++ /* Options check. */ ++ if (options & ~FTS_OPTIONMASK) { ++ errno = EINVAL; ++ return (NULL); ++ } ++ ++ /* Allocate/initialize the stream */ ++ if ((sp = malloc((u_int)sizeof(FTS))) == NULL) ++ return (NULL); ++ memset(sp, 0, sizeof(FTS)); ++ sp->fts_compar = (int (*) (const void *, const void *)) compar; ++ sp->fts_options = options; ++ ++ /* Logical walks turn on NOCHDIR; symbolic links are too hard. */ ++ if (ISSET(FTS_LOGICAL)) ++ SET(FTS_NOCHDIR); ++ ++ /* ++ * Start out with 1K of path space, and enough, in any case, ++ * to hold the user's paths. ++ */ ++#ifndef MAXPATHLEN ++#define MAXPATHLEN 1024 ++#endif ++ size_t maxarglen = fts_maxarglen(argv); ++ if (fts_palloc(sp, MAX(maxarglen, MAXPATHLEN))) ++ goto mem1; ++ ++ /* Allocate/initialize root's parent. */ ++ if (*argv != NULL) { ++ if ((parent = fts_alloc(sp, "", 0)) == NULL) ++ goto mem2; ++ parent->fts_level = FTS_ROOTPARENTLEVEL; ++ } ++ ++ /* Allocate/initialize root(s). */ ++ for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) { ++ /* Don't allow zero-length paths. */ ++ size_t len = strlen(*argv); ++ if (len == 0) { ++ errno = ENOENT; ++ goto mem3; ++ } ++ ++ p = fts_alloc(sp, *argv, len); ++ p->fts_level = FTS_ROOTLEVEL; ++ p->fts_parent = parent; ++ p->fts_accpath = p->fts_name; ++ p->fts_info = fts_stat(sp, p, ISSET(FTS_COMFOLLOW)); ++ ++ /* Command-line "." and ".." are real directories. */ ++ if (p->fts_info == FTS_DOT) ++ p->fts_info = FTS_D; ++ ++ /* ++ * If comparison routine supplied, traverse in sorted ++ * order; otherwise traverse in the order specified. ++ */ ++ if (compar) { ++ p->fts_link = root; ++ root = p; ++ } else { ++ p->fts_link = NULL; ++ if (root == NULL) ++ tmp = root = p; ++ else { ++ tmp->fts_link = p; ++ tmp = p; ++ } ++ } ++ } ++ if (compar && nitems > 1) ++ root = fts_sort(sp, root, nitems); ++ ++ /* ++ * Allocate a dummy pointer and make fts_read think that we've just ++ * finished the node before the root(s); set p->fts_info to FTS_INIT ++ * so that everything about the "current" node is ignored. ++ */ ++ if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL) ++ goto mem3; ++ sp->fts_cur->fts_link = root; ++ sp->fts_cur->fts_info = FTS_INIT; ++ ++ /* ++ * If using chdir(2), grab a file descriptor pointing to dot to ensure ++ * that we can get back here; this could be avoided for some paths, ++ * but almost certainly not worth the effort. Slashes, symbolic links, ++ * and ".." are all fairly nasty problems. Note, if we can't get the ++ * descriptor we run anyway, just more slowly. ++ */ ++ if (!ISSET(FTS_NOCHDIR) ++ && (sp->fts_rfd = open(".", O_RDONLY, 0)) < 0) ++ SET(FTS_NOCHDIR); ++ ++ return (sp); ++ ++mem3: fts_lfree(root); ++ free(parent); ++mem2: free(sp->fts_path); ++mem1: free(sp); ++ return (NULL); ++} ++ ++static void ++fts_load(FTS *sp, register FTSENT *p) ++{ ++ register int len; ++ register char *cp; ++ ++ /* ++ * Load the stream structure for the next traversal. Since we don't ++ * actually enter the directory until after the preorder visit, set ++ * the fts_accpath field specially so the chdir gets done to the right ++ * place and the user can access the first node. From fts_open it's ++ * known that the path will fit. ++ */ ++ len = p->fts_pathlen = p->fts_namelen; ++ memmove(sp->fts_path, p->fts_name, len + 1); ++ if ((cp = strrchr(p->fts_name, '/')) && (cp != p->fts_name || cp[1])) { ++ len = strlen(++cp); ++ memmove(p->fts_name, cp, len + 1); ++ p->fts_namelen = len; ++ } ++ p->fts_accpath = p->fts_path = sp->fts_path; ++ sp->fts_dev = p->fts_dev; ++} ++ ++int ++fts_close(FTS *sp) ++{ ++ register FTSENT *freep, *p; ++ int saved_errno; ++ ++ /* ++ * This still works if we haven't read anything -- the dummy structure ++ * points to the root list, so we step through to the end of the root ++ * list which has a valid parent pointer. ++ */ ++ if (sp->fts_cur) { ++ for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) { ++ freep = p; ++ p = p->fts_link != NULL ? p->fts_link : p->fts_parent; ++ free(freep); ++ } ++ free(p); ++ } ++ ++ /* Free up child linked list, sort array, path buffer. */ ++ if (sp->fts_child) ++ fts_lfree(sp->fts_child); ++ free(sp->fts_array); ++ free(sp->fts_path); ++ ++ /* Return to original directory, save errno if necessary. */ ++ if (!ISSET(FTS_NOCHDIR)) { ++ saved_errno = fchdir(sp->fts_rfd) ? errno : 0; ++ (void)close(sp->fts_rfd); ++ ++ /* Set errno and return. */ ++ if (saved_errno != 0) { ++ /* Free up the stream pointer. */ ++ free(sp); ++ errno = saved_errno; ++ return (-1); ++ } ++ } ++ ++ /* Free up the stream pointer. */ ++ free(sp); ++ return (0); ++} ++ ++/* ++ * Special case of "/" at the end of the path so that slashes aren't ++ * appended which would cause paths to be written as "....//foo". ++ */ ++#define NAPPEND(p) \ ++ (p->fts_path[p->fts_pathlen - 1] == '/' \ ++ ? p->fts_pathlen - 1 : p->fts_pathlen) ++ ++FTSENT * ++fts_read(register FTS *sp) ++{ ++ register FTSENT *p, *tmp; ++ register int instr; ++ register char *t; ++ int saved_errno; ++ ++ /* If finished or unrecoverable error, return NULL. */ ++ if (sp->fts_cur == NULL || ISSET(FTS_STOP)) ++ return (NULL); ++ ++ /* Set current node pointer. */ ++ p = sp->fts_cur; ++ ++ /* Save and zero out user instructions. */ ++ instr = p->fts_instr; ++ p->fts_instr = FTS_NOINSTR; ++ ++ /* Any type of file may be re-visited; re-stat and re-turn. */ ++ if (instr == FTS_AGAIN) { ++ p->fts_info = fts_stat(sp, p, 0); ++ return (p); ++ } ++ ++ /* ++ * Following a symlink -- SLNONE test allows application to see ++ * SLNONE and recover. If indirecting through a symlink, have ++ * keep a pointer to current location. If unable to get that ++ * pointer, follow fails. ++ */ ++ if (instr == FTS_FOLLOW && ++ (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) { ++ p->fts_info = fts_stat(sp, p, 1); ++ if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { ++ if ((p->fts_symfd = open(".", O_RDONLY, 0)) < 0) { ++ p->fts_errno = errno; ++ p->fts_info = FTS_ERR; ++ } else ++ p->fts_flags |= FTS_SYMFOLLOW; ++ } ++ return (p); ++ } ++ ++ /* Directory in pre-order. */ ++ if (p->fts_info == FTS_D) { ++ /* If skipped or crossed mount point, do post-order visit. */ ++ if (instr == FTS_SKIP || ++ (ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev)) { ++ if (p->fts_flags & FTS_SYMFOLLOW) ++ (void)close(p->fts_symfd); ++ if (sp->fts_child) { ++ fts_lfree(sp->fts_child); ++ sp->fts_child = NULL; ++ } ++ p->fts_info = FTS_DP; ++ return (p); ++ } ++ ++ /* Rebuild if only read the names and now traversing. */ ++ if (sp->fts_child != NULL && ISSET(FTS_NAMEONLY)) { ++ CLR(FTS_NAMEONLY); ++ fts_lfree(sp->fts_child); ++ sp->fts_child = NULL; ++ } ++ ++ /* ++ * Cd to the subdirectory. ++ * ++ * If have already read and now fail to chdir, whack the list ++ * to make the names come out right, and set the parent errno ++ * so the application will eventually get an error condition. ++ * Set the FTS_DONTCHDIR flag so that when we logically change ++ * directories back to the parent we don't do a chdir. ++ * ++ * If haven't read do so. If the read fails, fts_build sets ++ * FTS_STOP or the fts_info field of the node. ++ */ ++ if (sp->fts_child != NULL) { ++ if (fts_safe_changedir(sp, p, -1, p->fts_accpath)) { ++ p->fts_errno = errno; ++ p->fts_flags |= FTS_DONTCHDIR; ++ for (p = sp->fts_child; p != NULL; ++ p = p->fts_link) ++ p->fts_accpath = ++ p->fts_parent->fts_accpath; ++ } ++ } else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) { ++ if (ISSET(FTS_STOP)) ++ return (NULL); ++ return (p); ++ } ++ p = sp->fts_child; ++ sp->fts_child = NULL; ++ sp->fts_cur = p; ++ goto name; ++ } ++ ++ /* Move to the next node on this level. */ ++next: tmp = p; ++ if ((p = p->fts_link) != NULL) { ++ sp->fts_cur = p; ++ free(tmp); ++ ++ /* ++ * If reached the top, return to the original directory (or ++ * the root of the tree), and load the paths for the next root. ++ */ ++ if (p->fts_level == FTS_ROOTLEVEL) { ++ if (FCHDIR(sp, sp->fts_rfd)) { ++ SET(FTS_STOP); ++ return (NULL); ++ } ++ fts_load(sp, p); ++ return p; ++ } ++ ++ /* ++ * User may have called fts_set on the node. If skipped, ++ * ignore. If followed, get a file descriptor so we can ++ * get back if necessary. ++ */ ++ if (p->fts_instr == FTS_SKIP) ++ goto next; ++ if (p->fts_instr == FTS_FOLLOW) { ++ p->fts_info = fts_stat(sp, p, 1); ++ if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { ++ if ((p->fts_symfd = ++ open(".", O_RDONLY, 0)) < 0) { ++ p->fts_errno = errno; ++ p->fts_info = FTS_ERR; ++ } else ++ p->fts_flags |= FTS_SYMFOLLOW; ++ } ++ p->fts_instr = FTS_NOINSTR; ++ } ++ ++name: t = sp->fts_path + NAPPEND(p->fts_parent); ++ *t++ = '/'; ++ memmove(t, p->fts_name, p->fts_namelen + 1); ++ return p; ++ } ++ ++ /* Move up to the parent node. */ ++ p = tmp->fts_parent; ++ sp->fts_cur = p; ++ free(tmp); ++ ++ if (p->fts_level == FTS_ROOTPARENTLEVEL) { ++ /* ++ * Done; free everything up and set errno to 0 so the user ++ * can distinguish between error and EOF. ++ */ ++ free(p); ++ errno = 0; ++ return (sp->fts_cur = NULL); ++ } ++ ++ /* NUL terminate the pathname. */ ++ sp->fts_path[p->fts_pathlen] = '\0'; ++ ++ /* ++ * Return to the parent directory. If at a root node or came through ++ * a symlink, go back through the file descriptor. Otherwise, cd up ++ * one directory. ++ */ ++ if (p->fts_level == FTS_ROOTLEVEL) { ++ if (FCHDIR(sp, sp->fts_rfd)) { ++ SET(FTS_STOP); ++ return (NULL); ++ } ++ } else if (p->fts_flags & FTS_SYMFOLLOW) { ++ if (FCHDIR(sp, p->fts_symfd)) { ++ saved_errno = errno; ++ (void)close(p->fts_symfd); ++ errno = saved_errno; ++ SET(FTS_STOP); ++ return (NULL); ++ } ++ (void)close(p->fts_symfd); ++ } else if (!(p->fts_flags & FTS_DONTCHDIR) && ++ fts_safe_changedir(sp, p->fts_parent, -1, "..")) { ++ SET(FTS_STOP); ++ return (NULL); ++ } ++ p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP; ++ return p; ++} ++ ++/* ++ * Fts_set takes the stream as an argument although it's not used in this ++ * implementation; it would be necessary if anyone wanted to add global ++ * semantics to fts using fts_set. An error return is allowed for similar ++ * reasons. ++ */ ++/* ARGSUSED */ ++int ++fts_set(FTS *sp, FTSENT *p, int instr) ++{ ++ if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW && ++ instr != FTS_NOINSTR && instr != FTS_SKIP) { ++ errno = EINVAL; ++ return (1); ++ } ++ p->fts_instr = instr; ++ return (0); ++} ++ ++FTSENT * ++fts_children(register FTS *sp, int instr) ++{ ++ register FTSENT *p; ++ int fd; ++ ++ if (instr != 0 && instr != FTS_NAMEONLY) { ++ errno = EINVAL; ++ return (NULL); ++ } ++ ++ /* Set current node pointer. */ ++ p = sp->fts_cur; ++ ++ /* ++ * Errno set to 0 so user can distinguish empty directory from ++ * an error. ++ */ ++ errno = 0; ++ ++ /* Fatal errors stop here. */ ++ if (ISSET(FTS_STOP)) ++ return (NULL); ++ ++ /* Return logical hierarchy of user's arguments. */ ++ if (p->fts_info == FTS_INIT) ++ return (p->fts_link); ++ ++ /* ++ * If not a directory being visited in pre-order, stop here. Could ++ * allow FTS_DNR, assuming the user has fixed the problem, but the ++ * same effect is available with FTS_AGAIN. ++ */ ++ if (p->fts_info != FTS_D /* && p->fts_info != FTS_DNR */) ++ return (NULL); ++ ++ /* Free up any previous child list. */ ++ if (sp->fts_child != NULL) ++ fts_lfree(sp->fts_child); ++ ++ if (instr == FTS_NAMEONLY) { ++ SET(FTS_NAMEONLY); ++ instr = BNAMES; ++ } else ++ instr = BCHILD; ++ ++ /* ++ * If using chdir on a relative path and called BEFORE fts_read does ++ * its chdir to the root of a traversal, we can lose -- we need to ++ * chdir into the subdirectory, and we don't know where the current ++ * directory is, so we can't get back so that the upcoming chdir by ++ * fts_read will work. ++ */ ++ if (p->fts_level != FTS_ROOTLEVEL || p->fts_accpath[0] == '/' || ++ ISSET(FTS_NOCHDIR)) ++ return (sp->fts_child = fts_build(sp, instr)); ++ ++ if ((fd = open(".", O_RDONLY, 0)) < 0) ++ return (NULL); ++ sp->fts_child = fts_build(sp, instr); ++ if (fchdir(fd)) ++ return (NULL); ++ (void)close(fd); ++ return (sp->fts_child); ++} ++ ++/* ++ * This is the tricky part -- do not casually change *anything* in here. The ++ * idea is to build the linked list of entries that are used by fts_children ++ * and fts_read. There are lots of special cases. ++ * ++ * The real slowdown in walking the tree is the stat calls. If FTS_NOSTAT is ++ * set and it's a physical walk (so that symbolic links can't be directories), ++ * we can do things quickly. First, if it's a 4.4BSD file system, the type ++ * of the file is in the directory entry. Otherwise, we assume that the number ++ * of subdirectories in a node is equal to the number of links to the parent. ++ * The former skips all stat calls. The latter skips stat calls in any leaf ++ * directories and for any files after the subdirectories in the directory have ++ * been found, cutting the stat calls by about 2/3. ++ */ ++static FTSENT * ++fts_build(register FTS *sp, int type) ++{ ++ register struct dirent *dp; ++ register FTSENT *p, *head; ++ register int nitems; ++ FTSENT *cur, *tail; ++ DIR *dirp; ++ void *oldaddr; ++ int cderrno, descend, len, level, nlinks, saved_errno, ++ nostat, doadjust; ++ size_t maxlen; ++ char *cp; ++ ++ /* Set current node pointer. */ ++ cur = sp->fts_cur; ++ ++ /* ++ * Open the directory for reading. If this fails, we're done. ++ * If being called from fts_read, set the fts_info field. ++ */ ++#if defined FTS_WHITEOUT && 0 ++ if (ISSET(FTS_WHITEOUT)) ++ oflag = DTF_NODUP|DTF_REWIND; ++ else ++ oflag = DTF_HIDEW|DTF_NODUP|DTF_REWIND; ++#else ++# define opendir2(path, flag) opendir(path) ++#endif ++ if ((dirp = opendir2(cur->fts_accpath, oflag)) == NULL) { ++ if (type == BREAD) { ++ cur->fts_info = FTS_DNR; ++ cur->fts_errno = errno; ++ } ++ return (NULL); ++ } ++ ++ /* ++ * Nlinks is the number of possible entries of type directory in the ++ * directory if we're cheating on stat calls, 0 if we're not doing ++ * any stat calls at all, -1 if we're doing stats on everything. ++ */ ++ if (type == BNAMES) { ++ nlinks = 0; ++ /* Be quiet about nostat, GCC. */ ++ nostat = 0; ++ } else if (ISSET(FTS_NOSTAT) && ISSET(FTS_PHYSICAL)) { ++ nlinks = cur->fts_nlink - (ISSET(FTS_SEEDOT) ? 0 : 2); ++ nostat = 1; ++ } else { ++ nlinks = -1; ++ nostat = 0; ++ } ++ ++#ifdef notdef ++ (void)printf("nlinks == %d (cur: %d)\n", nlinks, cur->fts_nlink); ++ (void)printf("NOSTAT %d PHYSICAL %d SEEDOT %d\n", ++ ISSET(FTS_NOSTAT), ISSET(FTS_PHYSICAL), ISSET(FTS_SEEDOT)); ++#endif ++ /* ++ * If we're going to need to stat anything or we want to descend ++ * and stay in the directory, chdir. If this fails we keep going, ++ * but set a flag so we don't chdir after the post-order visit. ++ * We won't be able to stat anything, but we can still return the ++ * names themselves. Note, that since fts_read won't be able to ++ * chdir into the directory, it will have to return different path ++ * names than before, i.e. "a/b" instead of "b". Since the node ++ * has already been visited in pre-order, have to wait until the ++ * post-order visit to return the error. There is a special case ++ * here, if there was nothing to stat then it's not an error to ++ * not be able to stat. This is all fairly nasty. If a program ++ * needed sorted entries or stat information, they had better be ++ * checking FTS_NS on the returned nodes. ++ */ ++ cderrno = 0; ++ if (nlinks || type == BREAD) { ++ if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) { ++ if (nlinks && type == BREAD) ++ cur->fts_errno = errno; ++ cur->fts_flags |= FTS_DONTCHDIR; ++ descend = 0; ++ cderrno = errno; ++ (void)closedir(dirp); ++ dirp = NULL; ++ } else ++ descend = 1; ++ } else ++ descend = 0; ++ ++ /* ++ * Figure out the max file name length that can be stored in the ++ * current path -- the inner loop allocates more path as necessary. ++ * We really wouldn't have to do the maxlen calculations here, we ++ * could do them in fts_read before returning the path, but it's a ++ * lot easier here since the length is part of the dirent structure. ++ * ++ * If not changing directories set a pointer so that can just append ++ * each new name into the path. ++ */ ++ len = NAPPEND(cur); ++ if (ISSET(FTS_NOCHDIR)) { ++ cp = sp->fts_path + len; ++ *cp++ = '/'; ++ } else { ++ /* GCC, you're too verbose. */ ++ cp = NULL; ++ } ++ len++; ++ maxlen = sp->fts_pathlen - len; ++ ++ level = cur->fts_level + 1; ++ ++ /* Read the directory, attaching each entry to the `link' pointer. */ ++ doadjust = 0; ++ for (head = tail = NULL, nitems = 0; dirp && (dp = readdir(dirp));) { ++ if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name)) ++ continue; ++ ++ if ((p = fts_alloc(sp, dp->d_name, _D_EXACT_NAMLEN (dp))) == NULL) ++ goto mem1; ++ if (_D_EXACT_NAMLEN (dp) >= maxlen) {/* include space for NUL */ ++ oldaddr = sp->fts_path; ++ if (fts_palloc(sp, _D_EXACT_NAMLEN (dp) + len + 1)) { ++ /* ++ * No more memory for path or structures. Save ++ * errno, free up the current structure and the ++ * structures already allocated. ++ */ ++mem1: saved_errno = errno; ++ free(p); ++ fts_lfree(head); ++ (void)closedir(dirp); ++ cur->fts_info = FTS_ERR; ++ SET(FTS_STOP); ++ errno = saved_errno; ++ return (NULL); ++ } ++ /* Did realloc() change the pointer? */ ++ if (oldaddr != sp->fts_path) { ++ doadjust = 1; ++ if (ISSET(FTS_NOCHDIR)) ++ cp = sp->fts_path + len; ++ } ++ maxlen = sp->fts_pathlen - len; ++ } ++ ++ if (len + _D_EXACT_NAMLEN (dp) >= USHRT_MAX) { ++ /* ++ * In an FTSENT, fts_pathlen is a u_short so it is ++ * possible to wraparound here. If we do, free up ++ * the current structure and the structures already ++ * allocated, then error out with ENAMETOOLONG. ++ */ ++ free(p); ++ fts_lfree(head); ++ (void)closedir(dirp); ++ cur->fts_info = FTS_ERR; ++ SET(FTS_STOP); ++ errno = ENAMETOOLONG; ++ return (NULL); ++ } ++ p->fts_level = level; ++ p->fts_parent = sp->fts_cur; ++ p->fts_pathlen = len + _D_EXACT_NAMLEN (dp); ++ ++#if defined FTS_WHITEOUT && 0 ++ if (dp->d_type == DT_WHT) ++ p->fts_flags |= FTS_ISW; ++#endif ++ ++#if 0 ++ /* Unreachable code. cderrno is only ever set to a nonnull ++ value if dirp is closed at the same time. But then we ++ cannot enter this loop. */ ++ if (cderrno) { ++ if (nlinks) { ++ p->fts_info = FTS_NS; ++ p->fts_errno = cderrno; ++ } else ++ p->fts_info = FTS_NSOK; ++ p->fts_accpath = cur->fts_accpath; ++ } else ++#endif ++ if (nlinks == 0 ++#if defined DT_DIR && defined _DIRENT_HAVE_D_TYPE ++ || (nostat && ++ dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN) ++#endif ++ ) { ++ p->fts_accpath = ++ ISSET(FTS_NOCHDIR) ? p->fts_path : p->fts_name; ++ p->fts_info = FTS_NSOK; ++ } else { ++ /* Build a file name for fts_stat to stat. */ ++ if (ISSET(FTS_NOCHDIR)) { ++ p->fts_accpath = p->fts_path; ++ memmove(cp, p->fts_name, p->fts_namelen + 1); ++ } else ++ p->fts_accpath = p->fts_name; ++ /* Stat it. */ ++ p->fts_info = fts_stat(sp, p, 0); ++ ++ /* Decrement link count if applicable. */ ++ if (nlinks > 0 && (p->fts_info == FTS_D || ++ p->fts_info == FTS_DC || p->fts_info == FTS_DOT)) ++ --nlinks; ++ } ++ ++ /* We walk in directory order so "ls -f" doesn't get upset. */ ++ p->fts_link = NULL; ++ if (head == NULL) ++ head = tail = p; ++ else { ++ tail->fts_link = p; ++ tail = p; ++ } ++ ++nitems; ++ } ++ if (dirp) ++ (void)closedir(dirp); ++ ++ /* ++ * If realloc() changed the address of the path, adjust the ++ * addresses for the rest of the tree and the dir list. ++ */ ++ if (doadjust) ++ fts_padjust(sp, head); ++ ++ /* ++ * If not changing directories, reset the path back to original ++ * state. ++ */ ++ if (ISSET(FTS_NOCHDIR)) { ++ if (len == sp->fts_pathlen || nitems == 0) ++ --cp; ++ *cp = '\0'; ++ } ++ ++ /* ++ * If descended after called from fts_children or after called from ++ * fts_read and nothing found, get back. At the root level we use ++ * the saved fd; if one of fts_open()'s arguments is a relative path ++ * to an empty directory, we wind up here with no other way back. If ++ * can't get back, we're done. ++ */ ++ if (descend && (type == BCHILD || !nitems) && ++ (cur->fts_level == FTS_ROOTLEVEL ? ++ FCHDIR(sp, sp->fts_rfd) : ++ fts_safe_changedir(sp, cur->fts_parent, -1, ".."))) { ++ cur->fts_info = FTS_ERR; ++ SET(FTS_STOP); ++ fts_lfree(head); ++ return (NULL); ++ } ++ ++ /* If didn't find anything, return NULL. */ ++ if (!nitems) { ++ if (type == BREAD) ++ cur->fts_info = FTS_DP; ++ fts_lfree(head); ++ return (NULL); ++ } ++ ++ /* Sort the entries. */ ++ if (sp->fts_compar && nitems > 1) ++ head = fts_sort(sp, head, nitems); ++ return (head); ++} ++ ++static u_short ++fts_stat(FTS *sp, register FTSENT *p, int follow) ++{ ++ register FTSENT *t; ++ register dev_t dev; ++ register ino_t ino; ++ struct stat *sbp, sb; ++ int saved_errno; ++ ++ /* If user needs stat info, stat buffer already allocated. */ ++ sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp; ++ ++#if defined FTS_WHITEOUT && 0 ++ /* check for whiteout */ ++ if (p->fts_flags & FTS_ISW) { ++ if (sbp != &sb) { ++ memset(sbp, '\0', sizeof (*sbp)); ++ sbp->st_mode = S_IFWHT; ++ } ++ return (FTS_W); ++ } ++#endif ++ ++ /* ++ * If doing a logical walk, or application requested FTS_FOLLOW, do ++ * a stat(2). If that fails, check for a non-existent symlink. If ++ * fail, set the errno from the stat call. ++ */ ++ if (ISSET(FTS_LOGICAL) || follow) { ++ if (stat(p->fts_accpath, sbp)) { ++ saved_errno = errno; ++ if (!lstat(p->fts_accpath, sbp)) { ++ errno = 0; ++ return (FTS_SLNONE); ++ } ++ p->fts_errno = saved_errno; ++ goto err; ++ } ++ } else if (lstat(p->fts_accpath, sbp)) { ++ p->fts_errno = errno; ++err: memset(sbp, 0, sizeof(struct stat)); ++ return (FTS_NS); ++ } ++ ++ if (S_ISDIR(sbp->st_mode)) { ++ /* ++ * Set the device/inode. Used to find cycles and check for ++ * crossing mount points. Also remember the link count, used ++ * in fts_build to limit the number of stat calls. It is ++ * understood that these fields are only referenced if fts_info ++ * is set to FTS_D. ++ */ ++ dev = p->fts_dev = sbp->st_dev; ++ ino = p->fts_ino = sbp->st_ino; ++ p->fts_nlink = sbp->st_nlink; ++ ++ if (ISDOT(p->fts_name)) ++ return (FTS_DOT); ++ ++ /* ++ * Cycle detection is done by brute force when the directory ++ * is first encountered. If the tree gets deep enough or the ++ * number of symbolic links to directories is high enough, ++ * something faster might be worthwhile. ++ */ ++ for (t = p->fts_parent; ++ t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent) ++ if (ino == t->fts_ino && dev == t->fts_dev) { ++ p->fts_cycle = t; ++ return (FTS_DC); ++ } ++ return (FTS_D); ++ } ++ if (S_ISLNK(sbp->st_mode)) ++ return (FTS_SL); ++ if (S_ISREG(sbp->st_mode)) ++ return (FTS_F); ++ return (FTS_DEFAULT); ++} ++ ++static FTSENT * ++fts_sort(FTS *sp, FTSENT *head, register int nitems) ++{ ++ register FTSENT **ap, *p; ++ ++ /* ++ * Construct an array of pointers to the structures and call qsort(3). ++ * Reassemble the array in the order returned by qsort. If unable to ++ * sort for memory reasons, return the directory entries in their ++ * current order. Allocate enough space for the current needs plus ++ * 40 so don't realloc one entry at a time. ++ */ ++ if (nitems > sp->fts_nitems) { ++ struct _ftsent **a; ++ ++ sp->fts_nitems = nitems + 40; ++ if ((a = realloc(sp->fts_array, ++ (size_t)(sp->fts_nitems * sizeof(FTSENT *)))) == NULL) { ++ free(sp->fts_array); ++ sp->fts_array = NULL; ++ sp->fts_nitems = 0; ++ return (head); ++ } ++ sp->fts_array = a; ++ } ++ for (ap = sp->fts_array, p = head; p; p = p->fts_link) ++ *ap++ = p; ++ qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), sp->fts_compar); ++ for (head = *(ap = sp->fts_array); --nitems; ++ap) ++ ap[0]->fts_link = ap[1]; ++ ap[0]->fts_link = NULL; ++ return (head); ++} ++ ++static FTSENT * ++fts_alloc(FTS *sp, const char *name, size_t namelen) ++{ ++ register FTSENT *p; ++ size_t len; ++ ++ /* ++ * The file name is a variable length array and no stat structure is ++ * necessary if the user has set the nostat bit. Allocate the FTSENT ++ * structure, the file name and the stat structure in one chunk, but ++ * be careful that the stat structure is reasonably aligned. Since the ++ * fts_name field is declared to be of size 1, the fts_name pointer is ++ * namelen + 2 before the first possible address of the stat structure. ++ */ ++ len = sizeof(FTSENT) + namelen; ++ if (!ISSET(FTS_NOSTAT)) ++ len += sizeof(struct stat) + ALIGNBYTES; ++ if ((p = malloc(len)) == NULL) ++ return (NULL); ++ ++ /* Copy the name and guarantee NUL termination. */ ++ memmove(p->fts_name, name, namelen); ++ p->fts_name[namelen] = '\0'; ++ ++ if (!ISSET(FTS_NOSTAT)) ++ p->fts_statp = (struct stat *)ALIGN(p->fts_name + namelen + 2); ++ p->fts_namelen = namelen; ++ p->fts_path = sp->fts_path; ++ p->fts_errno = 0; ++ p->fts_flags = 0; ++ p->fts_instr = FTS_NOINSTR; ++ p->fts_number = 0; ++ p->fts_pointer = NULL; ++ return (p); ++} ++ ++static void ++fts_lfree(register FTSENT *head) ++{ ++ register FTSENT *p; ++ ++ /* Free a linked list of structures. */ ++ while ((p = head)) { ++ head = head->fts_link; ++ free(p); ++ } ++} ++ ++/* ++ * Allow essentially unlimited paths; find, rm, ls should all work on any tree. ++ * Most systems will allow creation of paths much longer than MAXPATHLEN, even ++ * though the kernel won't resolve them. Add the size (not just what's needed) ++ * plus 256 bytes so don't realloc the path 2 bytes at a time. ++ */ ++static int ++fts_palloc(FTS *sp, size_t more) ++{ ++ char *p; ++ ++ sp->fts_pathlen += more + 256; ++ /* ++ * Check for possible wraparound. In an FTS, fts_pathlen is ++ * a signed int but in an FTSENT it is an unsigned short. ++ * We limit fts_pathlen to USHRT_MAX to be safe in both cases. ++ */ ++ if (sp->fts_pathlen < 0 || sp->fts_pathlen >= USHRT_MAX) { ++ free(sp->fts_path); ++ sp->fts_path = NULL; ++ errno = ENAMETOOLONG; ++ return (1); ++ } ++ p = realloc(sp->fts_path, sp->fts_pathlen); ++ if (p == NULL) { ++ free(sp->fts_path); ++ sp->fts_path = NULL; ++ return 1; ++ } ++ sp->fts_path = p; ++ return 0; ++} ++ ++/* ++ * When the path is realloc'd, have to fix all of the pointers in structures ++ * already returned. ++ */ ++static void ++fts_padjust(FTS *sp, FTSENT *head) ++{ ++ FTSENT *p; ++ char *addr = sp->fts_path; ++ ++#define ADJUST(p) do { \ ++ if ((p)->fts_accpath != (p)->fts_name) { \ ++ (p)->fts_accpath = \ ++ (char *)addr + ((p)->fts_accpath - (p)->fts_path); \ ++ } \ ++ (p)->fts_path = addr; \ ++} while (0) ++ /* Adjust the current set of children. */ ++ for (p = sp->fts_child; p; p = p->fts_link) ++ ADJUST(p); ++ ++ /* Adjust the rest of the tree, including the current level. */ ++ for (p = head; p->fts_level >= FTS_ROOTLEVEL;) { ++ ADJUST(p); ++ p = p->fts_link ? p->fts_link : p->fts_parent; ++ } ++} ++ ++static size_t ++fts_maxarglen(char * const *argv) ++{ ++ size_t len, max; ++ ++ for (max = 0; *argv; ++argv) ++ if ((len = strlen(*argv)) > max) ++ max = len; ++ return (max + 1); ++} ++ ++/* ++ * Change to dir specified by fd or p->fts_accpath without getting ++ * tricked by someone changing the world out from underneath us. ++ * Assumes p->fts_dev and p->fts_ino are filled in. ++ */ ++static int ++fts_safe_changedir(FTS *sp, FTSENT *p, int fd, const char *path) ++{ ++ int ret, oerrno, newfd; ++ struct stat64 sb; ++ ++ newfd = fd; ++ if (ISSET(FTS_NOCHDIR)) ++ return (0); ++ if (fd < 0 && (newfd = open(path, O_RDONLY, 0)) < 0) ++ return (-1); ++ if (fstat64(newfd, &sb)) { ++ ret = -1; ++ goto bail; ++ } ++ if (p->fts_dev != sb.st_dev || p->fts_ino != sb.st_ino) { ++ errno = ENOENT; /* disinformation */ ++ ret = -1; ++ goto bail; ++ } ++ ret = fchdir(newfd); ++bail: ++ oerrno = errno; ++ if (fd < 0) ++ (void)close(newfd); ++ errno = oerrno; ++ return (ret); ++} +Index: b/libdwfl/fts_.h +=================================================================== +--- /dev/null ++++ b/libdwfl/fts_.h +@@ -0,0 +1,131 @@ ++/* ++ * Copyright (c) 1989, 1993 ++ * The Regents of the University of California. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 4. Neither the name of the University nor the names of its contributors ++ * may be used to endorse or promote products derived from this software ++ * without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE ++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ * ++ * @(#)fts.h 8.3 (Berkeley) 8/14/94 ++ */ ++ ++#ifndef _FTS_H ++#define _FTS_H 1 ++ ++#include ++#include ++ ++/* The fts interface is incompatible with the LFS interface which ++ transparently uses the 64-bit file access functions. */ ++#ifdef __USE_FILE_OFFSET64 ++# error " cannot be used with -D_FILE_OFFSET_BITS==64" ++#endif ++ ++ ++typedef struct { ++ struct _ftsent *fts_cur; /* current node */ ++ struct _ftsent *fts_child; /* linked list of children */ ++ struct _ftsent **fts_array; /* sort array */ ++ dev_t fts_dev; /* starting device # */ ++ char *fts_path; /* path for this descent */ ++ int fts_rfd; /* fd for root */ ++ int fts_pathlen; /* sizeof(path) */ ++ int fts_nitems; /* elements in the sort array */ ++ int (*fts_compar) (const void *, const void *); /* compare fn */ ++ ++#define FTS_COMFOLLOW 0x0001 /* follow command line symlinks */ ++#define FTS_LOGICAL 0x0002 /* logical walk */ ++#define FTS_NOCHDIR 0x0004 /* don't change directories */ ++#define FTS_NOSTAT 0x0008 /* don't get stat info */ ++#define FTS_PHYSICAL 0x0010 /* physical walk */ ++#define FTS_SEEDOT 0x0020 /* return dot and dot-dot */ ++#define FTS_XDEV 0x0040 /* don't cross devices */ ++#define FTS_WHITEOUT 0x0080 /* return whiteout information */ ++#define FTS_OPTIONMASK 0x00ff /* valid user option mask */ ++ ++#define FTS_NAMEONLY 0x0100 /* (private) child names only */ ++#define FTS_STOP 0x0200 /* (private) unrecoverable error */ ++ int fts_options; /* fts_open options, global flags */ ++} FTS; ++ ++typedef struct _ftsent { ++ struct _ftsent *fts_cycle; /* cycle node */ ++ struct _ftsent *fts_parent; /* parent directory */ ++ struct _ftsent *fts_link; /* next file in directory */ ++ long fts_number; /* local numeric value */ ++ void *fts_pointer; /* local address value */ ++ char *fts_accpath; /* access path */ ++ char *fts_path; /* root path */ ++ int fts_errno; /* errno for this node */ ++ int fts_symfd; /* fd for symlink */ ++ u_short fts_pathlen; /* strlen(fts_path) */ ++ u_short fts_namelen; /* strlen(fts_name) */ ++ ++ ino_t fts_ino; /* inode */ ++ dev_t fts_dev; /* device */ ++ nlink_t fts_nlink; /* link count */ ++ ++#define FTS_ROOTPARENTLEVEL -1 ++#define FTS_ROOTLEVEL 0 ++ short fts_level; /* depth (-1 to N) */ ++ ++#define FTS_D 1 /* preorder directory */ ++#define FTS_DC 2 /* directory that causes cycles */ ++#define FTS_DEFAULT 3 /* none of the above */ ++#define FTS_DNR 4 /* unreadable directory */ ++#define FTS_DOT 5 /* dot or dot-dot */ ++#define FTS_DP 6 /* postorder directory */ ++#define FTS_ERR 7 /* error; errno is set */ ++#define FTS_F 8 /* regular file */ ++#define FTS_INIT 9 /* initialized only */ ++#define FTS_NS 10 /* stat(2) failed */ ++#define FTS_NSOK 11 /* no stat(2) requested */ ++#define FTS_SL 12 /* symbolic link */ ++#define FTS_SLNONE 13 /* symbolic link without target */ ++#define FTS_W 14 /* whiteout object */ ++ u_short fts_info; /* user flags for FTSENT structure */ ++ ++#define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */ ++#define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */ ++ u_short fts_flags; /* private flags for FTSENT structure */ ++ ++#define FTS_AGAIN 1 /* read node again */ ++#define FTS_FOLLOW 2 /* follow symbolic link */ ++#define FTS_NOINSTR 3 /* no instructions */ ++#define FTS_SKIP 4 /* discard node */ ++ u_short fts_instr; /* fts_set() instructions */ ++ ++ struct stat *fts_statp; /* stat(2) information */ ++ char fts_name[1]; /* file name */ ++} FTSENT; ++ ++__BEGIN_DECLS ++FTSENT *fts_children (FTS *, int); ++int fts_close (FTS *); ++FTS *fts_open (char * const *, int, ++ int (*)(const FTSENT **, const FTSENT **)); ++FTSENT *fts_read (FTS *); ++int fts_set (FTS *, FTSENT *, int) __THROW; ++__END_DECLS ++ ++#endif /* fts.h */ +Index: b/libdwfl/linux-kernel-modules.c +=================================================================== +--- a/libdwfl/linux-kernel-modules.c ++++ b/libdwfl/linux-kernel-modules.c +@@ -29,7 +29,11 @@ + /* We include this before config.h because it can't handle _FILE_OFFSET_BITS. + Everything we need here is fine if its declarations just come first. */ + ++#ifdef HAVE_FTS_H + #include ++#else ++#include "fts_.h" ++#endif + + #include + diff --git a/package/elfutils/elfutils-05-disable-po.patch b/package/elfutils/elfutils-05-disable-po.patch new file mode 100644 index 0000000000..d98da0b0f6 --- /dev/null +++ b/package/elfutils/elfutils-05-disable-po.patch @@ -0,0 +1,22 @@ +Disable the build of the po/ directory + +Building the po/ directory complains that the scripts in there have +been generated with gettext 0.17, while we use gettext 0.18 in +Buildroot. Since we don't care that much about po files anyway, just +disable the build of this directory. + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile.am +=================================================================== +--- a/Makefile.am ++++ b/Makefile.am +@@ -28,7 +28,7 @@ + + # Add doc back when we have some real content. + SUBDIRS = config m4 lib libelf libebl libdwfl libdw libcpu libasm backends \ +- $(PROGS_SUBDIR) po tests ++ $(PROGS_SUBDIR) tests + + EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \ + COPYING COPYING-GPLV2 COPYING-LGPLV3 diff --git a/package/elfutils/elfutils.mk b/package/elfutils/elfutils.mk new file mode 100644 index 0000000000..696b5667a2 --- /dev/null +++ b/package/elfutils/elfutils.mk @@ -0,0 +1,71 @@ +################################################################################ +# +# elfutils +# +################################################################################ + +ELFUTILS_VERSION = 0.155 +ELFUTILS_SOURCE = elfutils-$(ELFUTILS_VERSION).tar.bz2 +ELFUTILS_SITE = https://fedorahosted.org/releases/e/l/elfutils/$(ELFUTILS_VERSION) +ELFUTILS_LICENSE = GPLv3 GPLv2 LGPLv3 +ELFUTILS_LICENSE_FILES = COPYING COPYING-GPLV2 COPYING-LGPLV3 + +# The tarball does not have a generated configure script +ELFUTILS_AUTORECONF = YES +ELFUTILS_CONF_OPT += --disable-werror +ELFUTILS_PATCH = \ + elfutils-portability.patch \ + elfutils-robustify.patch + +ELFUTILS_INSTALL_STAGING = YES + +ifeq ($(BR2_LARGEFILE),y) +# elfutils gets confused when lfs mode is forced, so don't +ELFUTILS_CONF_ENV += \ + CFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS))" \ + CPPFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))" +endif + +ELFUTILS_LDFLAGS = $(TARGET_LDFLAGS) + +# Unconditionnally requires gettext. +ifeq ($(BR2_NEEDS_GETTEXT),y) +ELFUTILS_DEPENDENCIES += gettext +ELFUTILS_LDFLAGS += -lintl +endif + +ELFUTILS_CONF_ENV += \ + LDFLAGS="$(ELFUTILS_LDFLAGS)" + +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) + ELFUTILS_DEPENDENCIES += argp-standalone +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) + ELFUTILS_DEPENDENCIES += zlib + ELFUTILS_CONF_OPT += --with-zlib +else + ELFUTILS_CONF_OPT += --without-zlib +endif + +ifeq ($(BR2_PACKAGE_BZIP2),y) + ELFUTILS_DEPENDENCIES += bzip2 + ELFUTILS_CONF_OPT += --with-bzlib +else + ELFUTILS_CONF_OPT += --without-bzlib +endif + +ifeq ($(BR2_PACKAGE_XZ),y) + ELFUTILS_DEPENDENCIES += xz + ELFUTILS_CONF_OPT += --with-lzma +else + ELFUTILS_CONF_OPT += --without-lzma +endif + +ifeq ($(BR2_PACKAGE_ELFUTILS_PROGS),y) + ELFUTILS_CONF_OPT += --enable-progs +else + ELFUTILS_CONF_OPT += --disable-progs +endif + +$(eval $(autotools-package)) diff --git a/package/empty/Config.in b/package/empty/Config.in new file mode 100644 index 0000000000..7fd0877cbb --- /dev/null +++ b/package/empty/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_EMPTY + bool "empty" + depends on BR2_USE_MMU # uses fork() + help + Run processes and applications under pseudo-terminal (PTY) sessions. + + http://empty.sourceforge.net/ diff --git a/package/empty/empty.mk b/package/empty/empty.mk new file mode 100644 index 0000000000..3339ff6b9a --- /dev/null +++ b/package/empty/empty.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# empty +# +################################################################################ + +EMPTY_VERSION = 0.6.19b +EMPTY_SOURCE = empty-$(EMPTY_VERSION).tgz +EMPTY_SITE = http://downloads.sourceforge.net/project/empty/empty/empty-$(EMPTY_VERSION) +EMPTY_LICENSE = BSD-3c +EMPTY_LICENSE_FILES = COPYRIGHT + +define EMPTY_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all +endef + +define EMPTY_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/empty $(TARGET_DIR)/usr/bin/empty +endef + +$(eval $(generic-package)) diff --git a/package/enchant/Config.in b/package/enchant/Config.in index 33f36db41b..86b2fade8f 100644 --- a/package/enchant/Config.in +++ b/package/enchant/Config.in @@ -2,6 +2,8 @@ config BR2_PACKAGE_ENCHANT bool "enchant" depends on BR2_INSTALL_LIBSTDCPP depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 select BR2_PACKAGE_LIBGLIB2 help Enchant is a spell-checking library that provides a consistent @@ -9,5 +11,7 @@ config BR2_PACKAGE_ENCHANT http://www.abisource.com/projects/enchant/ -comment "enchant requires a toolchain with C++ and WCHAR support enabled" - depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR +comment "enchant needs a toolchain w/ C++, threads, wchar" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/enchant/enchant.mk b/package/enchant/enchant.mk index 9be3f1a8e0..4a23293873 100644 --- a/package/enchant/enchant.mk +++ b/package/enchant/enchant.mk @@ -1,15 +1,14 @@ -############################################################# +################################################################################ # # enchant # -############################################################# -ENCHANT_VERSION = 1.5.0 -ENCHANT_SOURCE = enchant-$(ENCHANT_VERSION).tar.gz -ENCHANT_SITE = http://www.abisource.com/downloads/enchant/$(ENCHANT_VERSION) +################################################################################ +ENCHANT_VERSION = 1.6.0 +ENCHANT_SITE = http://www.abisource.com/downloads/enchant/$(ENCHANT_VERSION) ENCHANT_INSTALL_STAGING = YES -ENCHANT_INSTALL_TARGET = YES - -ENCHANT_DEPENDENCIES = libglib2 host-pkg-config +ENCHANT_DEPENDENCIES = libglib2 host-pkgconf +ENCHANT_LICENSE = LGPLv2.1+ +ENCHANT_LICENSE_FILES = COPYING.LIB -$(eval $(call AUTOTARGETS,package,enchant)) +$(eval $(autotools-package)) diff --git a/package/enlightenment/Config.in b/package/enlightenment/Config.in new file mode 100644 index 0000000000..66c7055ff9 --- /dev/null +++ b/package/enlightenment/Config.in @@ -0,0 +1,42 @@ +config BR2_PACKAGE_ENLIGHTENMENT + bool "enlightenment" + select BR2_PACKAGE_EFL + select BR2_PACKAGE_LIBECORE + select BR2_PACKAGE_LIBECORE_X + select BR2_PACKAGE_LIBEINA + select BR2_PACKAGE_LIBEET + select BR2_PACKAGE_LIBEVAS + select BR2_PACKAGE_LIBEVAS_JPEG + select BR2_PACKAGE_LIBEVAS_PNG + select BR2_PACKAGE_LIBEVAS_EET + select BR2_PACKAGE_LIBECORE_EVAS + select BR2_PACKAGE_LIBEDJE + select BR2_PACKAGE_LIBEFREET + select BR2_PACKAGE_LIBEDBUS + select BR2_PACKAGE_LIBEIO + select BR2_PACKAGE_XCB_UTIL_KEYSYMS + select BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS + select BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS_SVG + # libevas-generic-loaders-svg -> librsvg -> glib2 / pango + depends on BR2_USE_WCHAR + depends on BR2_INSTALL_LIBSTDCPP + # libedbus -> dbus + # libedbus -> glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS + # libedbus -> dbus + depends on BR2_USE_MMU + depends on BR2_PACKAGE_XORG7 + depends on !BR2_avr32 # libevas + help + Enlightenment, also known simply as E, is a stacking window + manager for the X Window System which can be used alone or + in conjunction with a desktop environment such as GNOME or + KDE. Enlightenment can be used as a substitute for a full + desktop environment. + + http://www.enlightenment.org/ + +comment "enlightenment needs a toolchain w/ wchar, C++, threads" + depends on BR2_PACKAGE_XORG7 && BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP + depends on !BR2_avr32 diff --git a/package/enlightenment/enlightenment.mk b/package/enlightenment/enlightenment.mk new file mode 100644 index 0000000000..b4154864c0 --- /dev/null +++ b/package/enlightenment/enlightenment.mk @@ -0,0 +1,47 @@ +################################################################################ +# +# enlightenment +# +################################################################################ + +ENLIGHTENMENT_VERSION = 0.17.3 +ENLIGHTENMENT_SITE = http://download.enlightenment.org/releases/ +ENLIGHTENMENT_LICENSE = BSD-2c +ENLIGHTENMENT_LICENSE_FILES = COPYING + +ENLIGHTENMENT_DEPENDENCIES = \ + host-pkgconf \ + libecore \ + libeet \ + libeina \ + libevas \ + libevas-generic-loaders \ + libedje \ + libefreet \ + libedbus \ + libeio \ + host-libedje \ + host-libeet \ + xcb-util-keysyms + +ENLIGHTENMENT_CONF_OPT = --with-edje-cc=$(HOST_DIR)/usr/bin/edje_cc \ + --with-eet-eet=$(HOST_DIR)/usr/bin/eet \ + --disable-rpath + +# alsa backend needs mixer support +ifeq ($(BR2_PACKAGE_ALSA_LIB)$(BR2_PACKAGE_ALSA_LIB_MIXER),yy) +ENLIGHTENMENT_DEPENDENCIES += alsa-lib +else +ENLIGHTENMENT_CONF_ENV += enable_alsa=no +endif + +ifeq ($(BR2_HAVE_DOCUMENTATION),) +define ENLIGHTENMENT_REMOVE_DOCUMENTATION + rm -rf $(TARGET_DIR)/usr/share/enlightenment/doc/ + rm -f $(TARGET_DIR)/usr/share/enlightenment/COPYING + rm -f $(TARGET_DIR)/usr/share/enlightenment/AUTHORS +endef +ENLIGHTENMENT_POST_INSTALL_TARGET_HOOKS += ENLIGHTENMENT_REMOVE_DOCUMENTATION +endif + +$(eval $(autotools-package)) diff --git a/package/enscript/Config.in b/package/enscript/Config.in new file mode 100644 index 0000000000..26c45e1e2f --- /dev/null +++ b/package/enscript/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_ENSCRIPT + bool "enscript" + help + GNU Enscript is a free replacement for Adobe's enscript program. + + GNU Enscript converts ASCII files to PostScript, HTML, or RTF and + stores generated output to a file or sends it directly to the + printer. It includes features for `pretty-printing' (language- + sensitive code highlighting) in several programming languages. + + http://www.gnu.org/software/enscript diff --git a/package/enscript/enscript.mk b/package/enscript/enscript.mk new file mode 100644 index 0000000000..3b15d558ee --- /dev/null +++ b/package/enscript/enscript.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# enscript +# +################################################################################ + +ENSCRIPT_VERSION = 1.6.6 +ENSCRIPT_SITE = $(BR2_GNU_MIRROR)/enscript/ +ENSCRIPT_LICENSE = GPLv3+ +ENSCRIPT_LICENSE_FILES = COPYING + +# Enable pthread threads if toolchain supports threads +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) + ENSCRIPT_CONF_OPT += --enable-threads=pth +else + ENSCRIPT_CONF_OPT += --disable-threads +endif + +$(eval $(autotools-package)) diff --git a/package/erlang/Config.in b/package/erlang/Config.in new file mode 100644 index 0000000000..27206f3067 --- /dev/null +++ b/package/erlang/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_ERLANG + bool "erlang" + depends on BR2_USE_MMU # fork() + help + Erlang is a programming language used to build massively scalable + soft real-time systems with requirements on high availability. + Some of its uses are in telecoms, banking, e-commerce, computer + telephony and instant messaging. Erlang's runtime system has + built-in support for concurrency, distribution and fault tolerance. + + http://www.erlang.org + +config BR2_PACKAGE_ERLANG_MEGACO + bool "install megaco application" + depends on BR2_PACKAGE_ERLANG + help + The Megaco application is a framework for building applications + on top of the Megaco/H.248 protocol. It is approximately 14MB in + size so if you do not need it then it is recommended not to + enable it. diff --git a/package/erlang/erlang-build-fix.patch b/package/erlang/erlang-build-fix.patch new file mode 100644 index 0000000000..ff821c9fc0 --- /dev/null +++ b/package/erlang/erlang-build-fix.patch @@ -0,0 +1,13 @@ +apply-patches.sh deletes this file from the source directory. + +--- erlang-R15B01.old/lib/tools/emacs/Makefile 2012-04-04 ++++ erlang-R15B01/lib/tools/emacs/Makefile 2012-04-04 15:55:16.978957307 +0100 +@@ -51,7 +51,7 @@ + + ELC_FILES = $(EMACS_FILES:%=%.elc) + +-TEST_FILES = test.erl.indented test.erl.orig ++TEST_FILES = test.erl.indented + + # ---------------------------------------------------- + # Targets diff --git a/package/erlang/erlang.mk b/package/erlang/erlang.mk new file mode 100644 index 0000000000..4a94af01ab --- /dev/null +++ b/package/erlang/erlang.mk @@ -0,0 +1,64 @@ +################################################################################ +# +# erlang +# +################################################################################ + +ERLANG_VERSION = R16B01 +ERLANG_SITE = http://www.erlang.org/download +ERLANG_SOURCE = otp_src_$(ERLANG_VERSION).tar.gz +ERLANG_DEPENDENCIES = host-erlang +HOST_ERLANG_DEPENDENCIES = + +ERLANG_LICENSE = EPL +ERLANG_LICENSE_FILES = EPLICENCE +ERLANG_INSTALL_STAGING = YES + +# The configure checks for these functions fail incorrectly +ERLANG_CONF_ENV = ac_cv_func_isnan=yes ac_cv_func_isinf=yes + +# Set erl_xcomp variables. See xcomp/erl-xcomp.conf.template +# for documentation. +ERLANG_CONF_ENV += erl_xcomp_sysroot=$(STAGING_DIR) + +ERLANG_CONF_OPT = --without-javac +HOST_ERLANG_CONF_OPT = --without-javac + +ifeq ($(BR2_PACKAGE_NCURSES),y) +ERLANG_CONF_OPT += --with-termcap +ERLANG_DEPENDENCIES += ncurses +else +ERLANG_CONF_OPT += --without-termcap +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +ERLANG_CONF_OPT += --with-ssl +ERLANG_DEPENDENCIES += openssl +else +ERLANG_CONF_OPT += --without-ssl +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +ERLANG_CONF_OPT += --enable-shared-zlib +ERLANG_DEPENDENCIES += zlib +endif + +# Remove source, example, gs and wx files from the target +ERLANG_REMOVE_PACKAGES = gs wx + +ifneq ($(BR2_PACKAGE_ERLANG_MEGACO),y) +ERLANG_REMOVE_PACKAGES += megaco +endif + +define ERLANG_REMOVE_UNUSED + find $(TARGET_DIR)/usr/lib/erlang -type d -name src -prune -exec rm -rf {} \; + find $(TARGET_DIR)/usr/lib/erlang -type d -name examples -prune -exec rm -rf {} \; + for package in $(ERLANG_REMOVE_PACKAGES); do \ + rm -rf $(TARGET_DIR)/usr/lib/erlang/lib/$${package}-*; \ + done +endef + +ERLANG_POST_INSTALL_TARGET_HOOKS += ERLANG_REMOVE_UNUSED + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/ethtool/ethtool.mk b/package/ethtool/ethtool.mk index 1fc2315260..32b39e8895 100644 --- a/package/ethtool/ethtool.mk +++ b/package/ethtool/ethtool.mk @@ -1,10 +1,13 @@ -############################################################# +################################################################################ # # ethtool # -############################################################# +################################################################################ -ETHTOOL_VERSION = 2.6.35 -ETHTOOL_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/gkernel/ +ETHTOOL_VERSION = 3.12.1 +ETHTOOL_SOURCE = ethtool-$(ETHTOOL_VERSION).tar.xz +ETHTOOL_SITE = $(BR2_KERNEL_MIRROR)/software/network/ethtool +ETHTOOL_LICENSE = GPLv2 +ETHTOOL_LICENSE_FILES = COPYING -$(eval $(call AUTOTARGETS,package,ethtool)) +$(eval $(autotools-package)) diff --git a/package/evtest/Config.in b/package/evtest/Config.in new file mode 100644 index 0000000000..e8f9e37367 --- /dev/null +++ b/package/evtest/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_EVTEST + bool "evtest" + help + evtest displays information on the input device specified on + the command line, including all the events supported by the + device. It then monitors the device and displays all the + events layer events generated. + + http://www.freedesktop.org/wiki/Evtest + +config BR2_PACKAGE_EVTEST_CAPTURE + bool "evtest-capture" + depends on BR2_PACKAGE_EVTEST + select BR2_PACKAGE_LIBXML2 + help + evtest-capture captures the information and events from the + input device specified on the command line and writes it to + the xml file given. diff --git a/package/evtest/evtest.mk b/package/evtest/evtest.mk new file mode 100644 index 0000000000..2a875539cb --- /dev/null +++ b/package/evtest/evtest.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# evtest +# +################################################################################ + +EVTEST_VERSION = 1.30 +EVTEST_SOURCE = evtest-$(EVTEST_VERSION).tar.bz2 +# no official upstream tarball +EVTEST_SITE = http://pkgs.fedoraproject.org/repo/pkgs/evtest/evtest-1.30.tar.bz2/27c0902839babfd07136f232c63c895c/ +EVTEST_LICENSE = GPLv2 +EVTEST_LICENSE_FILES = COPYING +EVTEST_DEPENDENCIES = host-pkgconf + +ifeq ($(BR2_PACKAGE_EVTEST_CAPTURE),y) +EVTEST_DEPENDENCIES += libxml2 +else +# evtest-capture will unconditionally be built/installed if libxml2 is present +define EVTEST_REMOVE_EVTEST_CAPTURE + rm -rf $(TARGET_DIR)/usr/bin/evtest-capture \ + $(TARGET_DIR)/usr/share/evtest \ + $(TARGET_DIR)/usr/share/man/man1/evtest-capture.1 +endef + +EVTEST_POST_INSTALL_TARGET_HOOKS += EVTEST_REMOVE_EVTEST_CAPTURE +endif + +$(eval $(autotools-package)) diff --git a/package/exfat-utils/Config.in b/package/exfat-utils/Config.in new file mode 100644 index 0000000000..e5c03389bd --- /dev/null +++ b/package/exfat-utils/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_EXFAT_UTILS + bool "exfat-utils" + depends on BR2_LARGEFILE + depends on BR2_USE_WCHAR + help + exFAT filesystem utilities. + + http://code.google.com/p/exfat/ + +comment "exfat-utils needs a toolchain w/ largefile, wchar" + depends on !BR2_LARGEFILE || !BR2_USE_WCHAR diff --git a/package/exfat-utils/exfat-utils.mk b/package/exfat-utils/exfat-utils.mk new file mode 100644 index 0000000000..a3a80f242e --- /dev/null +++ b/package/exfat-utils/exfat-utils.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# exfat-utils +# +################################################################################ + +EXFAT_UTILS_VERSION = 1.0.1 +EXFAT_UTILS_SITE = http://exfat.googlecode.com/files +EXFAT_UTILS_DEPENDENCIES = host-scons +EXFAT_UTILS_LICENSE = GPLv3+ +EXFAT_UTILS_LICENSE_FILES = COPYING + +define EXFAT_UTILS_BUILD_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) $(SCONS)) +endef + +define EXFAT_UTILS_INSTALL_TARGET_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) $(SCONS) \ + DESTDIR=$(TARGET_DIR)/usr/bin install) +endef + +$(eval $(generic-package)) diff --git a/package/exfat/Config.in b/package/exfat/Config.in new file mode 100644 index 0000000000..92e6c38170 --- /dev/null +++ b/package/exfat/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_EXFAT + bool "exFAT (FUSE)" + depends on BR2_LARGEFILE # libfuse + depends on BR2_TOOLCHAIN_HAS_THREADS # libfuse + depends on BR2_USE_MMU # libfuse + depends on BR2_USE_WCHAR + depends on !BR2_PREFER_STATIC_LIB # libfuse + select BR2_PACKAGE_LIBFUSE + help + A full-featured exFAT file system implementation for GNU/Linux + and other Unix-like systems as a FUSE module. + + http://code.google.com/p/exfat/ + +comment "exfat needs a toolchain w/ largefile, wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || BR2_PREFER_STATIC_LIB diff --git a/package/exfat/exfat.mk b/package/exfat/exfat.mk new file mode 100644 index 0000000000..3c0dece20a --- /dev/null +++ b/package/exfat/exfat.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# exfat +# +################################################################################ + +EXFAT_VERSION = 1.0.1 +EXFAT_SITE = http://exfat.googlecode.com/files +EXFAT_SOURCE = fuse-exfat-$(EXFAT_VERSION).tar.gz +EXFAT_DEPENDENCIES = host-scons libfuse +EXFAT_LICENSE = GPLv3+ +EXFAT_LICENSE_FILES = COPYING + +define EXFAT_BUILD_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) $(SCONS)) +endef + +define EXFAT_INSTALL_TARGET_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) $(SCONS) \ + DESTDIR=$(TARGET_DIR)/usr/sbin install) +endef + +$(eval $(generic-package)) diff --git a/package/expat/Config.in b/package/expat/Config.in index 3988c9041f..758fb7d516 100644 --- a/package/expat/Config.in +++ b/package/expat/Config.in @@ -1,5 +1,5 @@ config BR2_PACKAGE_EXPAT - bool"expat" + bool "expat" help The Expat XML Parser. diff --git a/package/expat/Makefile.in b/package/expat/Makefile.in deleted file mode 100644 index 1d5d6bc0bf..0000000000 --- a/package/expat/Makefile.in +++ /dev/null @@ -1,3 +0,0 @@ -ifeq ($(BR2_PACKAGE_EXPAT),y) -TARGETS+=expat -endif diff --git a/package/expat/expat.mk b/package/expat/expat.mk index 03b13037ef..4c37ba2f23 100644 --- a/package/expat/expat.mk +++ b/package/expat/expat.mk @@ -1,20 +1,17 @@ -############################################################# +################################################################################ # # expat # -############################################################# +################################################################################ -EXPAT_VERSION = 2.0.1 -EXPAT_SOURCE = expat-$(EXPAT_VERSION).tar.gz -EXPAT_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/expat +EXPAT_VERSION = 2.1.0 +EXPAT_SITE = http://downloads.sourceforge.net/project/expat/expat/$(EXPAT_VERSION) EXPAT_INSTALL_STAGING = YES -EXPAT_INSTALL_TARGET = YES EXPAT_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) installlib EXPAT_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) installlib +EXPAT_DEPENDENCIES = host-pkgconf +EXPAT_LICENSE = MIT +EXPAT_LICENSE_FILES = COPYING -EXPAT_CONF_OPT = --enable-shared - -EXPAT_DEPENDENCIES = host-pkg-config - -$(eval $(call AUTOTARGETS,package,expat)) -$(eval $(call AUTOTARGETS,package,expat,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/explorercanvas/Config.in b/package/explorercanvas/Config.in new file mode 100644 index 0000000000..9714a580ce --- /dev/null +++ b/package/explorercanvas/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_EXPLORERCANVAS + bool "explorercanvas" + help + Modern browsers like Firefox, Safari, Chrome and Opera + support the HTML5 canvas tag to allow 2D command-based + drawing. ExplorerCanvas brings the same functionality to + Internet Explorer ( 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) -+#if (defined(sun) && !defined(__SunOS_5_5_1) && !defined(_LP64)) \ -+ || (!defined __UCLIBC__ && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1))) \ -+ || (defined __UCLIBC__ && defined UCLIBC_HAS_LFS) - # define STAT64_SUPPORT - #else - # warning Not using stat64 support \ No newline at end of file diff --git a/package/fakeroot/fakeroot.mk b/package/fakeroot/fakeroot.mk index 905843bd55..e655b8f713 100644 --- a/package/fakeroot/fakeroot.mk +++ b/package/fakeroot/fakeroot.mk @@ -1,28 +1,13 @@ -############################################################# +################################################################################ # # fakeroot # -############################################################# -FAKEROOT_VERSION:=1.9.5 -FAKEROOT_SOURCE:=fakeroot_$(FAKEROOT_VERSION).tar.gz -FAKEROOT_SITE:=http://sources.buildroot.net +################################################################################ -define FAKEROOT_PATCH_FAKEROOT_IN - # If using busybox getopt, make it be quiet. - $(SED) "s,getopt --version,getopt --version 2>/dev/null," \ - $(@D)/scripts/fakeroot.in -endef +FAKEROOT_VERSION = 1.18.2 +FAKEROOT_SOURCE = fakeroot_$(FAKEROOT_VERSION).orig.tar.bz2 +FAKEROOT_SITE = http://snapshot.debian.org/archive/debian/20111201T093630Z/pool/main/f/fakeroot/ +FAKEROOT_LICENSE = GPLv3+ +FAKEROOT_LICENSE_FILES = COPYING -FAKEROOT_POST_PATCH_HOOKS += FAKEROOT_PATCH_FAKEROOT_IN - -define FAKEROOT_RENAME_TARGET_BINARIES - -mv $(TARGET_DIR)/usr/bin/$(ARCH)-*-faked \ - $(TARGET_DIR)/usr/bin/faked - -mv $(TARGET_DIR)/usr/bin/$(ARCH)-*-fakeroot \ - $(TARGET_DIR)/usr/bin/fakeroot -endef - -FAKEROOT_POST_INSTALL_TARGET_HOOKS += FAKEROOT_RENAME_TARGET_BINARIES - -$(eval $(call AUTOTARGETS,package,fakeroot)) -$(eval $(call AUTOTARGETS,package,fakeroot,host)) +$(eval $(host-autotools-package)) diff --git a/package/fan-ctrl/Config.in b/package/fan-ctrl/Config.in new file mode 100644 index 0000000000..869631683b --- /dev/null +++ b/package/fan-ctrl/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_FAN_CTRL + bool "fan-ctrl" + depends on BR2_USE_MMU # fork() + help + Fan-ctrl is a little daemon that controls the speed of one + or more system or CPU fans. It does so by monitoring + temperature inputs and selecting a fan speed from an array + of available speeds based on a set of temperature + thresholds. + + http://fan-ctrl.sourceforge.net/ diff --git a/package/fan-ctrl/fan-ctrl.mk b/package/fan-ctrl/fan-ctrl.mk new file mode 100644 index 0000000000..5f39813c04 --- /dev/null +++ b/package/fan-ctrl/fan-ctrl.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# fan-ctrl +# +################################################################################ + +# no release, so grab .c file directly from viewvc +FAN_CTRL_VERSION = 1.3 +FAN_CTRL_SOURCE = fan-ctrl.c?revision=$(FAN_CTRL_VERSION) +FAN_CTRL_SITE = http://fan-ctrl.cvs.sourceforge.net/viewvc/fan-ctrl/fan-ctrl/ +FAN_CTRL_LICENSE = GPLv2+ + +define FAN_CTRL_EXTRACT_CMDS + cp $(DL_DIR)/$(FAN_CTRL_SOURCE) $(@D)/fan-ctrl.c +endef + +define FAN_CTRL_BUILD_CMDS + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \ + $(@D)/fan-ctrl.c -o $(@D)/fan-ctrl +endef + +define FAN_CTRL_INSTALL_TARGET_CMDS + install -D -m 755 $(@D)/fan-ctrl $(TARGET_DIR)/usr/sbin/fan-ctrl +endef + +define FAN_CTRL_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/sbin/fan-ctrl +endef + +$(eval $(generic-package)) diff --git a/package/fb-test-app/Config.in b/package/fb-test-app/Config.in new file mode 100644 index 0000000000..23b5568d80 --- /dev/null +++ b/package/fb-test-app/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_FB_TEST_APP + bool "fb-test-app" + help + Test suite for Linux framebuffer. + + https://github.com/prpplague/fb-test-app diff --git a/package/fb-test-app/fb-test-app-override-cflags.patch b/package/fb-test-app/fb-test-app-override-cflags.patch new file mode 100644 index 0000000000..550ca6ed8a --- /dev/null +++ b/package/fb-test-app/fb-test-app-override-cflags.patch @@ -0,0 +1,35 @@ +From deb5143e8e4580d7767de59a2e983dda262b0669 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Wed, 10 Oct 2012 14:38:13 +0200 +Subject: [PATCH] allow custom CFLAGS to passed on the make command line + +Ensure the required CFLAGS are appended to what is provided on the +command line. + +Signed-off-by: Peter Korsgaard +--- + Makefile | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index 057d539..c3102ea 100644 +--- a/Makefile ++++ b/Makefile +@@ -11,10 +11,10 @@ else + CFLAGS=-O2 -Wall + endif + +-CFLAGS += -DVERSION=$(VERSION) +-CFLAGS += -DPATCHLEVEL=$(PATCHLEVEL) +-CFLAGS += -DSUBLEVEL=$(SUBLEVEL) +-CFLAGS += -DVERSION_NAME=\"$(NAME)\" ++override CFLAGS += -DVERSION=$(VERSION) ++override CFLAGS += -DPATCHLEVEL=$(PATCHLEVEL) ++override CFLAGS += -DSUBLEVEL=$(SUBLEVEL) ++override CFLAGS += -DVERSION_NAME=\"$(NAME)\" + + PROGS=perf rect fb-test offset + +-- +1.7.10.4 + diff --git a/package/fb-test-app/fb-test-app.mk b/package/fb-test-app/fb-test-app.mk new file mode 100644 index 0000000000..a2183e0080 --- /dev/null +++ b/package/fb-test-app/fb-test-app.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# fb-test-app +# +################################################################################ + +FB_TEST_APP_VERSION = v1.0.0 +FB_TEST_APP_SITE = http://github.com/prpplague/fb-test-app/tarball/$(FB_TEST_APP_VERSION) +FB_TEST_APP_LICENSE = GPLv2 +FB_TEST_APP_LICENSE_FILES = COPYING + +define FB_TEST_APP_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all +endef + +define FB_TEST_APP_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/perf $(TARGET_DIR)/usr/bin/fb-test-perf + $(INSTALL) -D -m 0755 $(@D)/rect $(TARGET_DIR)/usr/bin/fb-test-rect + $(INSTALL) -D -m 0755 $(@D)/fb-test $(TARGET_DIR)/usr/bin/fb-test + $(INSTALL) -D -m 0755 $(@D)/offset $(TARGET_DIR)/usr/bin/fb-test-offset +endef + +define FB_TEST_APP_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/bin/fb-test-perf + rm -f $(TARGET_DIR)/usr/bin/fb-test-rect + rm -f $(TARGET_DIR)/usr/bin/fb-test + rm -f $(TARGET_DIR)/usr/bin/fb-test-offset +endef + +define FB_TEST_APP_CLEAN_CMDS + $(MAKE) -C $(@D) clean +endef + +$(eval $(generic-package)) diff --git a/package/fbdump/fbdump.mk b/package/fbdump/fbdump.mk index eb74d8beec..568d3148fe 100644 --- a/package/fbdump/fbdump.mk +++ b/package/fbdump/fbdump.mk @@ -1,13 +1,21 @@ -############################################################# +################################################################################ # # fbdump # -############################################################# -FBDUMP_VERSION:=0.4.2 -FBDUMP_SOURCE:=fbdump-$(FBDUMP_VERSION).tar.gz -FBDUMP_SITE:=http://www.rcdrummond.net/fbdump -FBDUMP_AUTORECONF = NO -FBDUMP_CONF_OPT = --program-prefix='' +################################################################################ -$(eval $(call AUTOTARGETS,package,fbdump)) +FBDUMP_VERSION = 0.4.2 +FBDUMP_SITE = http://www.rcdrummond.net/fbdump +FBDUMP_LICENSE = GPLv2 +FBDUMP_LICENSE_FILES = COPYING +# The VGA16 specific feature of fbdump doesn't make much sense outside +# of the x86/x86-64 architectures, and causes build problems on some +# architectures as outw() is not always available. +ifeq ($(BR2_i386)$(BR2_x86_64),y) +FBDUMP_CONF_OPT += --enable-vga16fb +else +FBDUMP_CONF_OPT += --disable-vga16fb +endif + +$(eval $(autotools-package)) diff --git a/package/fbgrab/Config.in b/package/fbgrab/Config.in index ca6c6b7112..f3b29d9f99 100644 --- a/package/fbgrab/Config.in +++ b/package/fbgrab/Config.in @@ -5,4 +5,4 @@ config BR2_PACKAGE_FBGRAB FBGrab is a framebuffer screenshot program, capturing the linux frambuffer and converting it to a png-picture. - http://hem.bredband.net/gmogmo/fbgrab + http://fbgrab.monells.se/ diff --git a/package/fbgrab/fbgrab-proper_makefile.patch b/package/fbgrab/fbgrab-proper_makefile.patch deleted file mode 100644 index e907ed7d86..0000000000 --- a/package/fbgrab/fbgrab-proper_makefile.patch +++ /dev/null @@ -1,23 +0,0 @@ -[PATCH] fbgrab: A proper Makefile for cross compiling - -Respect to the CC, CFLAGS and LDFLAGS is required for cross compiling in -Buildroot. And there's no need to run the source through splint. - -Signed-off-by: Daniel Nyström - ---- fbgrab-1.0.orig/Makefile 2010-12-07 22:57:24.000000000 +0100 -+++ fbgrab-1.0/Makefile 2010-12-07 22:58:36.000000000 +0100 -@@ -3,9 +3,10 @@ - ### modular. So this is a simple gnu Makefile... - ### - --fbgrab: fbgrab.c -- splint +posixlib fbgrab.c -- gcc -g -Wall fbgrab.c -lpng -lz -o fbgrab -+LDFLAGS += -lpng -lz -+ -+fbgrab: fbgrab.o -+ $(CC) $(LDFLAGS) fbgrab.o -o $@ - - install: - strip fbgrab diff --git a/package/fbgrab/fbgrab.mk b/package/fbgrab/fbgrab.mk index 37f82ea418..5e838718ba 100644 --- a/package/fbgrab/fbgrab.mk +++ b/package/fbgrab/fbgrab.mk @@ -1,7 +1,14 @@ -FBGRAB_VERSION = 1.0 -FBGRAB_SOURCE = fbgrab-$(FBGRAB_VERSION).tar.gz -FBGRAB_SITE = http://hem.bredband.net/gmogmo/fbgrab +################################################################################ +# +# fbgrab +# +################################################################################ + +FBGRAB_VERSION = 1.2 +FBGRAB_SITE = http://fbgrab.monells.se FBGRAB_DEPENDENCIES = libpng +FBGRAB_LICENSE = GPLv2 +FBGRAB_LICENSE_FILES = COPYING define FBGRAB_BUILD_CMDS $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) @@ -15,4 +22,4 @@ define FBGRAB_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/bin/fbgrab endef -$(eval $(call GENTARGETS,package,fbgrab)) +$(eval $(generic-package)) diff --git a/package/fbset/fbset.mk b/package/fbset/fbset.mk index b5b5ab8090..f1ce178d31 100644 --- a/package/fbset/fbset.mk +++ b/package/fbset/fbset.mk @@ -1,12 +1,13 @@ -############################################################# +################################################################################ # # fbset # -############################################################# +################################################################################ FBSET_VERSION = 2.1 -FBSET_SOURCE = fbset-$(FBSET_VERSION).tar.gz FBSET_SITE = http://users.telenet.be/geertu/Linux/fbdev +FBSET_DEPENDENCIES = host-bison host-flex +FBSET_LICENSE = GPLv2 # Make sure full fbset wins over busybox fbset ifeq ($(BR2_PACKAGE_BUSYBOX),y) @@ -29,4 +30,4 @@ define FBSET_CLEAN_CMDS -$(MAKE) -C $(@D) clean endef -$(eval $(call GENTARGETS,package,fbset)) +$(eval $(generic-package)) diff --git a/package/fbterm/Config.in b/package/fbterm/Config.in new file mode 100644 index 0000000000..2c9d6d4573 --- /dev/null +++ b/package/fbterm/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_FBTERM + bool "fbterm" + depends on (BR2_INSTALL_LIBSTDCPP && BR2_ENABLE_LOCALE && BR2_USE_WCHAR) + select BR2_PACKAGE_FONTCONFIG + select BR2_PACKAGE_LIBERATION + help + fbterm is a fast terminal emulator for Linux with frame buffer + device or VESA video card. + + http://code.google.com/p/fbterm/ + +comment "fbterm needs a toolchain w/ C++, wchar, locale" + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_ENABLE_LOCALE && BR2_USE_WCHAR) diff --git a/package/fbterm/fbterm.mk b/package/fbterm/fbterm.mk new file mode 100644 index 0000000000..7e9d32441c --- /dev/null +++ b/package/fbterm/fbterm.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# fbterm +# +################################################################################ + +FBTERM_VERSION = 1.7.0 +FBTERM_SITE = http://fbterm.googlecode.com/files +FBTERM_LICENSE = GPLv2+ +FBTERM_LICENSE_FILES = COPYING +FBTERM_DEPENDENCIES = fontconfig liberation + +$(eval $(autotools-package)) diff --git a/package/fbv/Config.in b/package/fbv/Config.in index ea54401680..b8a9fe4e44 100644 --- a/package/fbv/Config.in +++ b/package/fbv/Config.in @@ -1,11 +1,33 @@ config BR2_PACKAGE_FBV bool "fbv" - select BR2_PACKAGE_LIBPNG - select BR2_PACKAGE_JPEG - select BR2_PACKAGE_LIBUNGIF help fbv is a very simple graphic file viewer for the framebuffer console, capable of displaying GIF, JPEG, PNG and BMP files using libungif, libjpeg and libpng. http://freshmeat.net/projects/fbv/ + +if BR2_PACKAGE_FBV + +config BR2_PACKAGE_FBV_PNG + bool "PNG support" + default y + select BR2_PACKAGE_LIBPNG + help + Enable support for PNG using libpng. + +config BR2_PACKAGE_FBV_JPEG + bool "JPEG support" + default y + select BR2_PACKAGE_JPEG + help + Enable support for JPEG using IJG's libjpeg. + +config BR2_PACKAGE_FBV_GIF + bool "GIF support" + default y + select BR2_PACKAGE_LIBUNGIF + help + Enable support for GIF using libungif. + +endif # BR2_PACKAGE_FBV diff --git a/package/fbv/fbv-1.0b-libpng15.patch b/package/fbv/fbv-1.0b-libpng15.patch new file mode 100644 index 0000000000..7872a73cf6 --- /dev/null +++ b/package/fbv/fbv-1.0b-libpng15.patch @@ -0,0 +1,24 @@ +Support for libpng 1.5+ shamelessly taken from Gentoo. + +Signed-off-by: Gustavo Zacarias + +--- a/png.c ++++ b/png.c +@@ -69,7 +69,7 @@ + fclose(fh); return(FH_ERROR_FORMAT); + } + rp=0; +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); + if(rp) free(rp); +@@ -161,7 +161,7 @@ + fclose(fh); return(FH_ERROR_FORMAT); + } + rp=0; +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); + if(rp) free(rp); diff --git a/package/fbv/fbv.mk b/package/fbv/fbv.mk index 7305c6e6e0..883a9109de 100644 --- a/package/fbv/fbv.mk +++ b/package/fbv/fbv.mk @@ -1,13 +1,33 @@ -############################################################# +################################################################################ # # fbv # -############################################################# -FBV_VERSION:=1.0b -FBV_SOURCE:=fbv-$(FBV_VERSION).tar.gz -FBV_SITE:=http://s-tech.elsat.net.pl/fbv +################################################################################ -FBV_DEPENDENCIES = libpng jpeg libungif +FBV_VERSION = 1.0b +FBV_SITE = http://s-tech.elsat.net.pl/fbv + +FBV_LICENSE = GPLv2 +FBV_LICENSE_FILES = COPYING + +### image format dependencies and configure options +FBV_DEPENDENCIES = # empty +FBV_CONFIGURE_OPTS = # empty +ifeq ($(BR2_PACKAGE_FBV_PNG),y) +FBV_DEPENDENCIES += libpng +else +FBV_CONFIGURE_OPTS += --without-libpng +endif +ifeq ($(BR2_PACKAGE_FBV_JPEG),y) +FBV_DEPENDENCIES += jpeg +else +FBV_CONFIGURE_OPTS += --without-libjpeg +endif +ifeq ($(BR2_PACKAGE_FBV_GIF),y) +FBV_DEPENDENCIES += libungif +else +FBV_CONFIGURE_OPTS += --without-libungif +endif #fbv donesn't support cross-compilation define FBV_CONFIGURE_CMDS @@ -16,7 +36,7 @@ define FBV_CONFIGURE_CMDS $(TARGET_CONFIGURE_ARGS) \ ./configure \ --prefix=/usr \ - --libs="-lz -lm" \ + $(FBV_CONFIGURE_OPTS) \ ) endef @@ -33,4 +53,4 @@ define FBV_CLEAN_CMDS -$(MAKE) -C $(@D) clean endef -$(eval $(call AUTOTARGETS,package,fbv)) +$(eval $(autotools-package)) diff --git a/package/fconfig/fconfig.mk b/package/fconfig/fconfig.mk index c595678304..80de4dc5cd 100644 --- a/package/fconfig/fconfig.mk +++ b/package/fconfig/fconfig.mk @@ -1,10 +1,10 @@ -############################################################# +################################################################################ # # fconfig # -############################################################# +################################################################################ + FCONFIG_VERSION = 20080329 -FCONFIG_SOURCE = fconfig-$(FCONFIG_VERSION).tar.gz FCONFIG_SITE = http://andrzejekiert.ovh.org/software/fconfig/ define FCONFIG_BUILD_CMDS @@ -25,4 +25,4 @@ define FCONFIG_CLEAN_CMDS -$(MAKE) -C $(@D) clean endef -$(eval $(call GENTARGETS,package,fconfig)) +$(eval $(generic-package)) diff --git a/package/fdk-aac/Config.in b/package/fdk-aac/Config.in new file mode 100644 index 0000000000..1ec59e1a88 --- /dev/null +++ b/package/fdk-aac/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_FDK_AAC + bool "fdk-aac" + depends on BR2_INSTALL_LIBSTDCPP + # These are the architectures supported by FDK AAC + depends on BR2_i386 || BR2_x86_64 || BR2_arm || BR2_armeb || \ + BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || \ + BR2_powerpc || BR2_sh || BR2_sh64 + + help + The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") + is software that implements the MPEG Advanced Audio Coding ("AAC") + encoding and decoding scheme for digital audio + + http://sourceforge.net/projects/opencore-amr/files/fdk-aac/ + +comment "fdk-aac needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + depends on BR2_i386 || BR2_x86_64 || BR2_arm || BR2_armeb || \ + BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || \ + BR2_powerpc || BR2_sh || BR2_sh64 diff --git a/package/fdk-aac/fdk-aac.mk b/package/fdk-aac/fdk-aac.mk new file mode 100644 index 0000000000..dde3e7ebf1 --- /dev/null +++ b/package/fdk-aac/fdk-aac.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# fdk-aac +# +################################################################################ + +FDK_AAC_VERSION = 0.1.2 +FDK_AAC_SITE = http://downloads.sourceforge.net/project/opencore-amr/fdk-aac +FDK_AAC_LICENSE = fdk-aac license +FDK_AAC_LICENSE_FILES = NOTICE + +FDK_AAC_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/feh/Config.in b/package/feh/Config.in new file mode 100644 index 0000000000..31e7239b55 --- /dev/null +++ b/package/feh/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_FEH + bool "feh" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXINERAMA + select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_IMLIB2_PNG + select BR2_PACKAGE_IMLIB2_JPEG + select BR2_PACKAGE_IMLIB2_X + select BR2_PACKAGE_GIBLIB + select BR2_PACKAGE_LIBCURL + help + feh is an X11 image viewer aimed mostly at console users. + + http://feh.finalrewind.org/ diff --git a/package/feh/feh.mk b/package/feh/feh.mk new file mode 100644 index 0000000000..b7fd54c60b --- /dev/null +++ b/package/feh/feh.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# feh +# +################################################################################ + +FEH_VERSION = 2.9.3 +FEH_SOURCE = feh-$(FEH_VERSION).tar.bz2 +FEH_SITE = http://feh.finalrewind.org/ +FEH_DEPENDENCIES = libcurl giblib imlib2 libpng xlib_libXinerama xlib_libXt + +define FEH_BUILD_CMDS + $(MAKE1) CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS)" \ + -C $(@D) all +endef + +define FEH_INSTALL_TARGET_CMDS + $(MAKE1) CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) " \ + DESTDIR=$(TARGET_DIR) -C $(@D) install +endef + +define FEH_UNINSTALL_TARGET_CMDS + $(MAKE1) CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) " \ + DESTDIR=$(TARGET_DIR) -C $(@D) uninstall +endef + +$(eval $(generic-package)) diff --git a/package/ffmpeg/Config.in b/package/ffmpeg/Config.in new file mode 100644 index 0000000000..20d5231fb4 --- /dev/null +++ b/package/ffmpeg/Config.in @@ -0,0 +1,158 @@ +comment "ffmpeg needs a toolchain w/ largefile, IPv6" + depends on !(BR2_LARGEFILE && BR2_INET_IPV6) + +menuconfig BR2_PACKAGE_FFMPEG + bool "ffmpeg" + depends on BR2_LARGEFILE + depends on BR2_INET_IPV6 + help + FFmpeg is a complete, cross-platform solution to record, convert + and stream audio and video. + + http://www.ffmpeg.org + +if BR2_PACKAGE_FFMPEG + +config BR2_PACKAGE_FFMPEG_GPL + bool "Enable GPL code" + help + allow use of GPL code, the resulting libs and binaries will + be under GPL + +config BR2_PACKAGE_FFMPEG_NONFREE + bool "Enable nonfree code" + help + allow use of nonfree code, the resulting libs and binaries + will be unredistributable + +config BR2_PACKAGE_FFMPEG_FFMPEG + bool "Build ffmpeg (the command line application)" + select BR2_PACKAGE_FFMPEG_SWSCALE + default y + help + FFmpeg is a very fast video and audio converter. + It can also grab from a live audio/video source. + + It is not needed if you want to link the FFmpeg libraries + to your application. + +config BR2_PACKAGE_FFMPEG_FFPLAY + bool "Build ffplay" + select BR2_PACKAGE_SDL + help + FFplay is a very simple and portable media player using the + FFmpeg libraries and the SDL library. + It is mostly used as a testbed for the various FFmpeg APIs. + +config BR2_PACKAGE_FFMPEG_FFSERVER + bool "Build ffserver" + help + FFserver is a streaming server for both audio and video. + +config BR2_PACKAGE_FFMPEG_POSTPROC + bool "Build libpostproc" + depends on BR2_PACKAGE_FFMPEG_GPL + help + Postproc is a library of video postprocessing routines. + +config BR2_PACKAGE_FFMPEG_SWSCALE + bool "Build libswscale" + help + Swscale is a library of video scaling routines. + +config BR2_PACKAGE_FFMPEG_ENCODERS + string "Enabled encoders" + default "all" + help + Space-separated list of encoders to build in FFmpeg, + or "all" to build all of them. + + Run ./configure --list-encoders in the ffmpeg sources + directory to know the available options. + +config BR2_PACKAGE_FFMPEG_DECODERS + string "Enabled decoders" + default "all" + help + Space-separated list of decoders to build in FFmpeg, + or "all" to build all of them. + + Run ./configure --list-decoders in the ffmpeg sources + directory to know the available options. + +config BR2_PACKAGE_FFMPEG_MUXERS + string "Enabled muxers" + default "all" + help + Space-separated list of muxers to build in FFmpeg, + or "all" to build all of them. + + Run ./configure --list-muxers in the ffmpeg sources + directory to know the available options. + +config BR2_PACKAGE_FFMPEG_DEMUXERS + string "Enabled demuxers" + default "all" + help + Space-separated list of demuxers to build in FFmpeg, + or "all" to build all of them. + + Run ./configure --list-demuxers in the ffmpeg sources + directory to know the available options. + +config BR2_PACKAGE_FFMPEG_PARSERS + string "Enabled parsers" + default "all" + help + Space-separated list of parsers to build in FFmpeg, + or "all" to build all of them. + + Run ./configure --list-parsers in the ffmpeg sources + directory to know the available options. + +config BR2_PACKAGE_FFMPEG_BSFS + string "Enabled bitstreams" + default "all" + help + Space-separated list of bitstream filters to build in FFmpeg, + or "all" to build all of them. + + Run ./configure --list-bsfs in the ffmpeg sources + directory to know the available options. + +config BR2_PACKAGE_FFMPEG_PROTOCOLS + string "Enabled protocols" + default "all" + help + Space-separated list of protocols to build in FFmpeg, + or "all" to build all of them. + + Run ./configure --list-protocols in the ffmpeg sources + directory to know the available options. + +config BR2_PACKAGE_FFMPEG_FILTERS + string "Enabled filters" + default "all" + help + Space-separated list of filters to build in FFmpeg, + or "all" to build all of them. + + Run ./configure --list-filters in the ffmpeg sources + directory to know the available options. + +config BR2_PACKAGE_FFMPEG_INDEVS + bool "Enable input devices" + default y + +config BR2_PACKAGE_FFMPEG_OUTDEVS + bool "Enable output devices" + default y + +config BR2_PACKAGE_FFMPEG_EXTRACONF + string "Additional parameters for ./configure" + default "" + help + Extra parameters that will be appended to FFmpeg's + ./configure commandline. + +endif diff --git a/package/ffmpeg/ffmpeg-sdlconfig.patch b/package/ffmpeg/ffmpeg-sdlconfig.patch new file mode 100644 index 0000000000..64371b29f3 --- /dev/null +++ b/package/ffmpeg/ffmpeg-sdlconfig.patch @@ -0,0 +1,17 @@ +We need to pass the location sdl-config so that ffmpeg picks it up. +So just pass the whole string to make things simpler. + +Signed-off-by: Gustavo Zacarias + +diff -Nura ffmpeg-0.8.7.orig/configure ffmpeg-0.8.7/configure +--- ffmpeg-0.8.7.orig/configure 2011-11-21 16:49:30.000000000 -0300 ++++ ffmpeg-0.8.7/configure 2011-12-02 08:13:36.746619395 -0300 +@@ -2957,7 +2957,7 @@ + enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore + enabled mlib && require mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib + +-SDL_CONFIG="${cross_prefix}sdl-config" ++SDL_CONFIG="${SDL_CONFIG}" + if check_pkg_config sdl SDL_version.h SDL_Linked_Version; then + check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags && + enable sdl && diff --git a/package/ffmpeg/ffmpeg.mk b/package/ffmpeg/ffmpeg.mk new file mode 100644 index 0000000000..6685110a5a --- /dev/null +++ b/package/ffmpeg/ffmpeg.mk @@ -0,0 +1,193 @@ +################################################################################ +# +# ffmpeg +# +################################################################################ + +FFMPEG_VERSION = 0.8.15 +FFMPEG_SOURCE = ffmpeg-$(FFMPEG_VERSION).tar.bz2 +FFMPEG_SITE = http://ffmpeg.org/releases +FFMPEG_INSTALL_STAGING = YES + +FFMPEG_LICENSE = LGPLv2.1+, libjpeg license +FFMPEG_LICENSE_FILES = LICENSE COPYING.LGPLv2.1 +ifeq ($(BR2_PACKAGE_FFMPEG_GPL),y) +FFMPEG_LICENSE += and GPLv2+ +FFMPEG_LICENSE_FILES += COPYING.GPLv2 +endif + +FFMPEG_CONF_OPT = \ + --prefix=/usr \ + --disable-avfilter \ + $(if $(BR2_HAVE_DOCUMENTATION),,--disable-doc) + +ifeq ($(BR2_PACKAGE_FFMPEG_GPL),y) +FFMPEG_CONF_OPT += --enable-gpl +else +FFMPEG_CONF_OPT += --disable-gpl +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_NONFREE),y) +FFMPEG_CONF_OPT += --enable-nonfree +else +FFMPEG_CONF_OPT += --disable-nonfree +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_FFMPEG),y) +FFMPEG_CONF_OPT += --enable-ffmpeg +else +FFMPEG_CONF_OPT += --disable-ffmpeg +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_FFPLAY),y) +FFMPEG_DEPENDENCIES += sdl +FFMPEG_CONF_OPT += --enable-ffplay +FFMPEG_CONF_ENV += SDL_CONFIG=$(STAGING_DIR)/usr/bin/sdl-config +else +FFMPEG_CONF_OPT += --disable-ffplay +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_FFSERVER),y) +FFMPEG_CONF_OPT += --enable-ffserver +else +FFMPEG_CONF_OPT += --disable-ffserver +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_POSTPROC),y) +FFMPEG_CONF_OPT += --enable-postproc +else +FFMPEG_CONF_OPT += --disable-postproc +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_SWSCALE),y) +FFMPEG_CONF_OPT += --enable-swscale +else +FFMPEG_CONF_OPT += --disable-swscale +endif + +ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_ENCODERS)),all) +FFMPEG_CONF_OPT += --disable-encoders \ + $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_ENCODERS)),--enable-encoder=$(x)) +endif + +ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_DECODERS)),all) +FFMPEG_CONF_OPT += --disable-decoders \ + $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_DECODERS)),--enable-decoder=$(x)) +endif + +ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_MUXERS)),all) +FFMPEG_CONF_OPT += --disable-muxers \ + $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_MUXERS)),--enable-muxer=$(x)) +endif + +ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_DEMUXERS)),all) +FFMPEG_CONF_OPT += --disable-demuxers \ + $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_DEMUXERS)),--enable-demuxer=$(x)) +endif + +ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_PARSERS)),all) +FFMPEG_CONF_OPT += --disable-parsers \ + $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_PARSERS)),--enable-parser=$(x)) +endif + +ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_BSFS)),all) +FFMPEG_CONF_OPT += --disable-bsfs \ + $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_BSFS)),--enable-bsf=$(x)) +endif + +ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_PROTOCOLS)),all) +FFMPEG_CONF_OPT += --disable-protocols \ + $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_PROTOCOLS)),--enable-protocol=$(x)) +endif + +ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_FILTERS)),all) +FFMPEG_CONF_OPT += --disable-filters \ + $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_FILTERS)),--enable-filter=$(x)) +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_INDEVS),y) +FFMPEG_CONF_OPT += --enable-indevs +else +FFMPEG_CONF_OPT += --disable-indevs +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_OUTDEVS),y) +FFMPEG_CONF_OPT += --enable-outdevs +else +FFMPEG_CONF_OPT += --disable-outdevs +endif + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +FFMPEG_CONF_OPT += --enable-pthreads +else +FFMPEG_CONF_OPT += --disable-pthreads +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +FFMPEG_CONF_OPT += --enable-zlib +FFMPEG_DEPENDENCIES += zlib +else +FFMPEG_CONF_OPT += --disable-zlib +endif + +ifeq ($(BR2_i386)$(BR2_x86_64),y) +# MMX on is default for x86, disable it for lowly x86-type processors +ifeq ($(BR2_x86_i386)$(BR2_x86_i486)$(BR2_x86_i586)$(BR2_x86_i686)$(BR2_x86_pentiumpro)$(BR2_x86_geode),y) +FFMPEG_CONF_OPT += --disable-mmx +else +# If it is enabled, nasm is required +FFMPEG_DEPENDENCIES += host-nasm +endif +endif + +# Explicitly disable everything that doesn't match for ARM +# FFMPEG "autodetects" by compiling an extended instruction via AS +# This works on compilers that aren't built for generic by default +ifeq ($(BR2_arm7tdmi)$(BR2_arm720t)$(BR2_arm920t)$(BR2_arm922t)$(BR2_strongarm)$(BR2_fa526),y) +FFMPEG_CONF_OPT += --disable-armv5te +endif +ifeq ($(BR2_arm1136jf_s)$(BR2_arm1176jz_s)$(BR2_arm1176jzf_s),y) +FFMPEG_CONF_OPT += --enable-armv6 +else +FFMPEG_CONF_OPT += --disable-armv6 --disable-armv6t2 +endif +ifeq ($(BR2_arm10)$(BR2_arm1136jf_s)$(BR2_arm1176jz_s)$(BR2_arm1176jzf_s)$(BR2_cortex_a5)$(BR2_cortex_a8)$(BR2_cortex_a9)$(BR2_cortex_a15),y) +FFMPEG_CONF_OPT += --enable-armvfp +else +FFMPEG_CONF_OPT += --disable-armvfp +endif +ifeq ($(BR2_ARM_CPU_HAS_NEON),y) +FFMPEG_CONF_OPT += --enable-neon +endif + +# Set powerpc altivec appropriately +ifeq ($(BR2_powerpc),y) +ifeq ($(BR2_powerpc_7400)$(BR2_powerpc_7450)$(BR2_powerpc_970),y) +FFMPEG_CONF_OPT += --enable-altivec +else +FFMPEG_CONF_OPT += --disable-altivec +endif +endif + +FFMPEG_CONF_OPT += $(call qstrip,$(BR2_PACKAGE_FFMPEG_EXTRACONF)) + +# Override FFMPEG_CONFIGURE_CMDS: FFmpeg does not support --target and others +define FFMPEG_CONFIGURE_CMDS + (cd $(FFMPEG_SRCDIR) && rm -rf config.cache && \ + $(TARGET_CONFIGURE_OPTS) \ + $(TARGET_CONFIGURE_ARGS) \ + $(FFMPEG_CONF_ENV) \ + ./configure \ + --enable-cross-compile \ + --cross-prefix=$(TARGET_CROSS) \ + --sysroot=$(STAGING_DIR) \ + --host-cc="$(HOSTCC)" \ + --arch=$(BR2_ARCH) \ + --target-os=linux \ + --extra-cflags=-fPIC \ + $(SHARED_STATIC_LIBS_OPTS) \ + $(FFMPEG_CONF_OPT) \ + ) +endef + +$(eval $(autotools-package)) diff --git a/package/fftw/Config.in b/package/fftw/Config.in new file mode 100644 index 0000000000..36f849f12b --- /dev/null +++ b/package/fftw/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_FFTW + bool "fftw" + help + Library for computing Fast Fourier Transforms. + + This library computes Fast Fourier Transforms (FFT) in one + or more dimensions. It is extremely fast. This package + contains the shared library version of the fftw libraries in + double precision. + + http://www.fftw.org diff --git a/package/fftw/fftw.mk b/package/fftw/fftw.mk new file mode 100644 index 0000000000..d0af752680 --- /dev/null +++ b/package/fftw/fftw.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# fftw +# +################################################################################ + +FFTW_VERSION = 3.3.3 +FFTW_SITE = http://www.fftw.org +FFTW_INSTALL_STAGING = YES +FFTW_LICENSE = GPLv2+ +FFTW_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/file/file-nocxx.patch b/package/file/file-nocxx.patch deleted file mode 100644 index 3b0eec6c9e..0000000000 --- a/package/file/file-nocxx.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 126fcb5d08d69693eb4c6e5f5c3d1082b6910121 Mon Sep 17 00:00:00 2001 -From: Gustavo Zacarias -Date: Mon, 7 Jun 2010 11:40:04 -0300 -Subject: [PATCH] Disable configure script from checking for CXX since it's not needed - - -Signed-off-by: Gustavo Zacarias ---- - configure | 6 ++---- - 1 files changed, 2 insertions(+), 4 deletions(-) - -diff --git a/configure b/configure -index a6e812b..ac2587f 100755 ---- a/configure -+++ b/configure -@@ -6136,10 +6136,8 @@ if $ac_preproc_ok; then - : - else - { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check --See \`config.log' for more details." >&5 --echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+See \`config.log' for more details." >&5;} -+ { echo "C++ sucks, ignoring ..." >&5; }; } - fi - - ac_ext=cpp --- -1.6.4.4 - diff --git a/package/file/file.mk b/package/file/file.mk index b8281d02bf..18a945904d 100644 --- a/package/file/file.mk +++ b/package/file/file.mk @@ -1,18 +1,20 @@ -############################################################# +################################################################################ # # file # -############################################################# +################################################################################ -FILE_VERSION = 5.04 -FILE_SITE = ftp://ftp.astron.com/pub/file/ +FILE_VERSION = 5.15 +FILE_SITE = ftp://ftp.astron.com/pub/file FILE_DEPENDENCIES = host-file zlib -HOST_FILE_DEPENDENCIES = host-zlib +FILE_INSTALL_STAGING = YES +FILE_LICENSE = BSD-2c, one file BSD-4c, one file BSD-3c +FILE_LICENSE_FILES = COPYING src/mygetopt.h src/vasprintf.c define FILE_UNINSTALL_TARGET_CMDS $(MAKE) DESTDIR=$(TARGET_DIR) uninstall -C $(FILE_DIR) rm -f $(TARGET_DIR)/usr/lib/libmagic.* endef -$(eval $(call AUTOTARGETS,package,file)) -$(eval $(call AUTOTARGETS,package,file,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/filemq/Config.in b/package/filemq/Config.in new file mode 100644 index 0000000000..b7b085d54e --- /dev/null +++ b/package/filemq/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_FILEMQ + bool "filemq" + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_CZMQ + select BR2_PACKAGE_ZEROMQ + depends on BR2_INSTALL_LIBSTDCPP # zeromq + depends on BR2_INET_IPV6 # zeromq + depends on BR2_LARGEFILE # util-linux + depends on BR2_USE_WCHAR # util-linux + depends on BR2_TOOLCHAIN_HAS_THREADS # zeromq + # uClibc toolchains provided by ADI don't have AI_ADDRCONFIG + # support, which is needed by czmq + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 && \ + !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1 + help + FileMQ is a publish-subscribe file service based on 0MQ. + + http://github.com/zeromq/filemq + +comment "filemq needs a toolchain w/ C++, IPv6, largefile, wchar, threads" + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 && \ + !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1 + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_INET_IPV6 && BR2_LARGEFILE \ + && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/filemq/filemq.mk b/package/filemq/filemq.mk new file mode 100644 index 0000000000..6f55573fc8 --- /dev/null +++ b/package/filemq/filemq.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# filemq +# +################################################################################ + +FILEMQ_VERSION = 8fac5140ddbca3c4742016795fbbf1d6579902f3 +FILEMQ_SITE = git://github.com/zeromq/filemq.git + +FILEMQ_AUTORECONF = YES +FILEMQ_CONF_ENV = fmq_have_asciidoc=no +FILEMQ_INSTALL_STAGING = YES +FILEMQ_DEPENDENCIES = czmq openssl zeromq +FILEMQ_LICENSE = LGPLv3+ with exceptions +FILEMQ_LICENSE_FILES = COPYING COPYING.LESSER + +define FILEMQ_CREATE_CONFIG_DIR + mkdir -p $(@D)/config +endef + +FILEMQ_POST_PATCH_HOOKS += FILEMQ_CREATE_CONFIG_DIR + +$(eval $(autotools-package)) diff --git a/package/findutils/Config.in b/package/findutils/Config.in index bbe2cc14b8..b719d4ff3e 100644 --- a/package/findutils/Config.in +++ b/package/findutils/Config.in @@ -1,11 +1,13 @@ config BR2_PACKAGE_FINDUTILS bool "findutils" depends on BR2_USE_WCHAR + depends on BR2_USE_MMU # fork() help Basic directory searching utilities. Provides the common 'find', 'xargs', 'locate', and 'updatedb' binaries. http://www.gnu.org/software/findutils/findutils.html -comment "findutils requires a toolchain with WCHAR support" +comment "findutils needs a toolchain w/ wchar" + depends on BR2_USE_MMU depends on !BR2_USE_WCHAR diff --git a/package/findutils/findutils.mk b/package/findutils/findutils.mk index 7ab6b0b88a..d9b6050963 100644 --- a/package/findutils/findutils.mk +++ b/package/findutils/findutils.mk @@ -1,12 +1,14 @@ -############################################################# +################################################################################ # # findutils # -############################################################# +################################################################################ FINDUTILS_VERSION = 4.4.2 FINDUTILS_SITE = $(BR2_GNU_MIRROR)/findutils +FINDUTILS_LICENSE = GPLv3+ +FINDUTILS_LICENSE_FILES = COPYING FINDUTILS_CONF_ENV = gl_cv_func_stdin=yes \ gl_cv_func_wcwidth_works=yes -$(eval $(call AUTOTARGETS,package,findutils)) +$(eval $(autotools-package)) diff --git a/package/fis/fis-002-makefile.patch b/package/fis/fis-002-makefile.patch deleted file mode 100644 index 0b922a27e0..0000000000 --- a/package/fis/fis-002-makefile.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- fis/Makefile0 1970-01-01 10:00:00.000000000 +1000 -+++ fis/Makefile 2007-10-18 12:08:56.000000000 +1000 -@@ -0,0 +1,7 @@ -+CFLAGS += -std=c99 -+ -+fis: fis.o crc.o -+ -+clean: -+ -rm -f fis *.o -+ diff --git a/package/fis/fis-003-list_output.patch b/package/fis/fis-003-list_output.patch new file mode 100644 index 0000000000..6c1e4eb9dd --- /dev/null +++ b/package/fis/fis-003-list_output.patch @@ -0,0 +1,21 @@ +--- fis.orig/fis.c 2010-05-12 10:22:10.000000000 -0700 ++++ fis/fis.c 2010-05-12 10:19:24.000000000 -0700 +@@ -142,8 +142,8 @@ + + static void dump_desc(FILE* f, const struct fis_image_desc* d) + { +- fprintf(f,"%16s: flash addr = 0x%08x, mem addr = 0x%08x, size = 0x%08x, checksum = 0x%08x\n", +- d->name, d->flash_base, d->mem_base, d->size, d->file_cksum); ++ fprintf(f,"%-16s 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x\n", ++ d->name, d->flash_base, d->mem_base, d->size, d->entry_point, d->file_cksum); + for (unsigned int i=0; i<(sizeof(d->skips)/4); ++i) { + if (d->skips[i]==0x736b6970 || d->skips[i]==0x70696b73) { // "skip" + uint32_t offset = d->skips[i+1]; +@@ -400,6 +400,7 @@ + CHECK(fd=open(device,O_RDONLY),-1); + dir_t dir; + load_dir(fd,offset,&size,swap_endianness,&dir); ++ fprintf(stdout,"Name FLASH addr Mem addr Length Entry point Checksum\n"); + FOR_EACH_DIR_ENTRY(dir,i) { + dump_desc(stdout,get(i)); + } diff --git a/package/fis/fis-004-sorted_list.patch b/package/fis/fis-004-sorted_list.patch new file mode 100644 index 0000000000..6854977ba4 --- /dev/null +++ b/package/fis/fis-004-sorted_list.patch @@ -0,0 +1,30 @@ +--- fis.orig/fis.c 2010-05-12 11:09:22.000000000 -0700 ++++ fis/fis.c 2010-05-12 11:05:45.000000000 -0700 +@@ -401,9 +401,24 @@ + dir_t dir; + load_dir(fd,offset,&size,swap_endianness,&dir); + fprintf(stdout,"Name FLASH addr Mem addr Length Entry point Checksum\n"); +- FOR_EACH_DIR_ENTRY(dir,i) { +- dump_desc(stdout,get(i)); +- } ++ uint32_t last_addr = 0; ++ bool image_found; ++ do { ++ uint32_t lowest_addr = 0xffffffff; ++ iter_t index; ++ image_found = false; ++ FOR_EACH_DIR_ENTRY(dir,i) { ++ const struct fis_image_desc *d = get(i); ++ if ((d->flash_base >= last_addr) && (d->flash_base < lowest_addr)) { ++ lowest_addr = d->flash_base; ++ image_found = true; ++ index = i; ++ } ++ } ++ if (image_found) ++ dump_desc(stdout,get(index)); ++ last_addr = lowest_addr + 1; ++ } while (image_found == true); + } + + diff --git a/package/fis/fis.mk b/package/fis/fis.mk index e532aff2b5..0e2d7d0752 100644 --- a/package/fis/fis.mk +++ b/package/fis/fis.mk @@ -1,51 +1,24 @@ -############################################################# +################################################################################ # # fis # -############################################################# -FIS_SOURCE:=fis.c -FIS_SITE:=http://svn.chezphil.org/utils/trunk -FIS_CAT:=$(ZCAT) -FIS_DIR:=$(BUILD_DIR)/fis -FIS_BINARY:=fis -FIS_TARGET_BINARY:=sbin/fis +################################################################################ -$(DL_DIR)/$(FIS_SOURCE): - $(call DOWNLOAD,$(FIS_SITE),$(FIS_SOURCE)) +FIS_SITE = http://svn.chezphil.org/utils/trunk +FIS_SITE_METHOD = svn +FIS_VERSION = 2892 -fis-source: $(DL_DIR)/$(FIS_SOURCE) +define FIS_BUILD_CMDS + $(TARGET_CC) $(TARGET_CFLAGS) -std=c99 -o $(@D)/fis \ + $(@D)/fis.c $(@D)/crc.c $(TARGE_LDFLAGS) +endef -$(FIS_DIR)/.unpacked: $(DL_DIR)/$(FIS_SOURCE) - mkdir -p $(FIS_DIR) - cp -f $(DL_DIR)/$(FIS_SOURCE) $(FIS_DIR) - toolchain/patch-kernel.sh $(FIS_DIR) package/fis \*.patch - touch $@ +define FIS_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/fis $(TARGET_DIR)/sbin/fis +endef -$(FIS_DIR)/$(FIS_BINARY): $(FIS_DIR)/.unpacked - $(MAKE) -C $(FIS_DIR) \ - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS) -std=c99" \ - LDFLAGS="$(TARGET_LDFLAGS)" +define FIS_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/sbin/fis +endef -$(TARGET_DIR)/$(FIS_TARGET_BINARY): $(FIS_DIR)/$(FIS_BINARY) - rm -f $(TARGET_DIR)/$(FIS_TARGET_BINARY) - $(INSTALL) -D -m 0755 $(FIS_DIR)/$(FIS_BINARY) $(TARGET_DIR)/$(FIS_TARGET_BINARY) - $(STRIPCMD) $(STRIP_STRIP_ALL) $@ - -fis: $(TARGET_DIR)/$(FIS_TARGET_BINARY) - -fis-clean: - -$(MAKE) -C $(FIS_DIR) clean - rm -f $(TARGET_DIR)/$(FIS_TARGET_BINARY) - -fis-dirclean: - rm -rf $(FIS_DIR) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_FIS),y) -TARGETS+=fis -endif +$(eval $(generic-package)) diff --git a/package/flac/Config.in b/package/flac/Config.in new file mode 100644 index 0000000000..06f170be09 --- /dev/null +++ b/package/flac/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_FLAC + bool "flac" + help + FLAC is an Open Source lossless audio codec. + + http://flac.sourceforge.net/ diff --git a/package/multimedia/flac/flac-no-altivec.patch b/package/flac/flac-no-altivec.patch similarity index 100% rename from package/multimedia/flac/flac-no-altivec.patch rename to package/flac/flac-no-altivec.patch diff --git a/package/flac/flac.mk b/package/flac/flac.mk new file mode 100644 index 0000000000..95cd5a14fa --- /dev/null +++ b/package/flac/flac.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# flac +# +################################################################################ + +FLAC_VERSION = 1.2.1 +FLAC_SITE = http://downloads.sourceforge.net/project/flac/flac-src/flac-$(FLAC_VERSION)-src +FLAC_INSTALL_STAGING = YES + +FLAC_CONF_OPT = \ + --disable-cpplibs \ + --disable-xmms-plugin + +ifeq ($(BR2_PACKAGE_LIBOGG),y) +FLAC_CONF_OPT += --with-ogg=$(STAGING_DIR)/usr +FLAC_DEPENDENCIES = libogg +else +FLAC_CONF_OPT += --disable-ogg +endif + +$(eval $(autotools-package)) diff --git a/package/flashbench/Config.in b/package/flashbench/Config.in new file mode 100644 index 0000000000..aa98200c1f --- /dev/null +++ b/package/flashbench/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_FLASHBENCH + bool "flashbench" + depends on BR2_LARGEFILE + help + Flashbench - Identify characteristics of flash media. + + This is the tool used to identify the properties of + SD cards and other media for the Linaro flash memory + survey. + + https://wiki.linaro.org/WorkingGroups/KernelConsolidation/Projects/FlashCardSurvey + +comment "flashbench needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE diff --git a/package/flashbench/flashbench.mk b/package/flashbench/flashbench.mk new file mode 100644 index 0000000000..6759338a2e --- /dev/null +++ b/package/flashbench/flashbench.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# flashbench +# +################################################################################ + +FLASHBENCH_VERSION = 2e30b1968a66147412f21002ea844122a0d5e2f0 +FLASHBENCH_SITE = git://git.linaro.org/people/arnd/flashbench.git +FLASHBENCH_LICENSE = GPLv2 +FLASHBENCH_LICENSE_FILES = COPYING + +FLASHBENCH_CFLAGS = $(TARGET_CFLAGS) + +ifeq ($(BR2_microblaze)$(BR2_sh2a),y) +# microblaze and sh2a toolchains only provide LLONG_MAX when used with gnu99 dialect +FLASHBENCH_CFLAGS += -std=gnu99 +endif + +define FLASHBENCH_BUILD_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(FLASHBENCH_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS) -lrt" +endef + +define FLASHBENCH_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 -D $(@D)/flashbench $(TARGET_DIR)/usr/bin/flashbench + $(INSTALL) -m 755 -D $(@D)/erase $(TARGET_DIR)/usr/bin/erase +endef + +$(eval $(generic-package)) diff --git a/package/flashrom/Config.in b/package/flashrom/Config.in new file mode 100644 index 0000000000..956500f0a4 --- /dev/null +++ b/package/flashrom/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_FLASHROM + bool "flashrom" + select BR2_PACKAGE_PCIUTILS + # dmidecode is only a runtime dependency + select BR2_PACKAGE_DMIDECODE + depends on BR2_i386 || BR2_x86_64 + help + BIOS-updating utility. + Requires PCIUtils libraries. + + http://flashrom.org/ diff --git a/package/flashrom/flashrom.mk b/package/flashrom/flashrom.mk new file mode 100644 index 0000000000..bca800b0a4 --- /dev/null +++ b/package/flashrom/flashrom.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# flashrom +# +################################################################################ + +FLASHROM_VERSION = 0.9.6.1 +FLASHROM_SOURCE = flashrom-$(FLASHROM_VERSION).tar.bz2 +FLASHROM_SITE = http://download.flashrom.org/releases + +FLASHROM_DEPENDENCIES = pciutils + +define FLASHROM_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define FLASHROM_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/flashrom $(TARGET_DIR)/usr/sbin/flashrom +endef + +$(eval $(generic-package)) diff --git a/package/flex/Config.in b/package/flex/Config.in index b10eb00377..52f7fe77f0 100644 --- a/package/flex/Config.in +++ b/package/flex/Config.in @@ -1,15 +1,26 @@ config BR2_PACKAGE_FLEX bool "flex" + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE help A fast lexical analyser generator. A tool for generating programs that perform pattern-matching on text. - http://www.gnu.org/software/flex/ + http://flex.sourceforge.net/ -config BR2_PACKAGE_FLEX_LIBFL - bool "Install libfl.a under staging_dir/usr/lib" - default y - depends on BR2_PACKAGE_FLEX +if BR2_PACKAGE_FLEX + +config BR2_PACKAGE_FLEX_BINARY + bool "Install tool in the target" + # needs fork() + depends on BR2_USE_MMU + # runtime dependency + select BR2_PACKAGE_M4 + depends on BR2_USE_WCHAR # m4 help - Install libfl.a under staging_dir/usr/lib for further development - on a host machine. + Install the flex binary tool in the target filesystem. + +comment "flex binary needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR + +endif diff --git a/package/flex/flex-2.5.33-prog-ar.patch b/package/flex/flex-prog-ar.patch similarity index 100% rename from package/flex/flex-2.5.33-prog-ar.patch rename to package/flex/flex-prog-ar.patch diff --git a/package/flex/flex.mk b/package/flex/flex.mk index 41c9505f3c..17f651b802 100644 --- a/package/flex/flex.mk +++ b/package/flex/flex.mk @@ -1,44 +1,35 @@ -############################################################# +################################################################################ # # flex # -############################################################# -FLEX_VERSION:=2.5.35 -FLEX_PATCH_VERSION:=9.1 -FLEX_SOURCE:=flex_$(FLEX_VERSION).orig.tar.gz -FLEX_PATCH:=flex_$(FLEX_VERSION)-$(FLEX_PATCH_VERSION).diff.gz -FLEX_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/f/flex -FLEX_DIR:=$(BUILD_DIR)/flex-$(FLEX_VERSION) -FLEX_INSTALL_STAGING=YES +################################################################################ + +FLEX_VERSION = 2.5.37 +FLEX_SITE = http://download.sourceforge.net/project/flex +FLEX_INSTALL_STAGING = YES +FLEX_LICENSE = FLEX +FLEX_LICENSE_FILES = COPYING FLEX_DEPENDENCIES = \ - $(if $(BR2_PACKAGE_GETTEXT),gettext) \ - $(if $(BR2_PACKAGE_LIBINTL),libintl) + $(if $(BR2_PACKAGE_GETTEXT_IF_LOCALE),gettext) host-m4 +FLEX_CONF_ENV = ac_cv_path_M4=/usr/bin/m4 +# we don't have a host-gettext/libintl +HOST_FLEX_DEPENDENCIES = host-m4 +ifeq ($(BR2_PACKAGE_FLEX_BINARY),y) # lex -> flex define FLEX_INSTALL_LEX -cd $(TARGET_DIR)/usr/bin && ln -snf flex lex -endef - -define FLEX_UNINSTALL_LEX --rm $(TARGET_DIR)/usr/bin/lex + cd $(TARGET_DIR)/usr/bin && ln -snf flex lex endef - FLEX_POST_INSTALL_HOOKS += FLEX_INSTALL_LEX -FLEX_POST_CLEAN_HOOKS += FLEX_UNINSTALL_LEX -# libfl installation -ifeq ($(BR2_PACKAGE_FLEX_LIBFL),y) -define FLEX_INSTALL_LIBFL -install -D $(FLEX_DIR)/libfl.a $(STAGING_DIR)/usr/lib/libfl.a -endef +else -define FLEX_UNINSTALL_LIBFL --rm $(STAGING_DIR)/lib/libfl.a +define FLEX_DISABLE_PROGRAM + $(SED) 's/^bin_PROGRAMS.*//' $(@D)/Makefile.in endef +FLEX_POST_PATCH_HOOKS += FLEX_DISABLE_PROGRAM -FLEX_POST_INSTALL_HOOKS += FLEX_INSTALL_LIBFL -FLEX_POST_CLEAN_HOOKS += FLEX_UNINSTALL_LIBFL endif -$(eval $(call AUTOTARGETS,package,flex)) -$(eval $(call AUTOTARGETS,package,flex,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/flot/Config.in b/package/flot/Config.in new file mode 100644 index 0000000000..4c0d3ec334 --- /dev/null +++ b/package/flot/Config.in @@ -0,0 +1,95 @@ +config BR2_PACKAGE_FLOT + bool "flot" + select BR2_PACKAGE_JQUERY + help + Flot is a pure Javascript plotting library for jQuery. It + produces graphical plots of arbitrary datasets on-the-fly + client-side. + + The focus is on simple usage (all settings are optional), + attractive looks and interactive features like zooming and + mouse tracking. + + The plugin works with Internet Explorer 6+, Firefox 2.x+, + Safari 3.0+, Opera 9.5+ and Konqueror 4.x+ with the HTML + canvas tag. + + http://www.flotcharts.org/ + +if BR2_PACKAGE_FLOT + +comment "flot plugins" + +config BR2_PACKAGE_FLOT_CANVAS + bool "canvas" + help + Flot plugin to render axis tick labels directly to the canvas + +config BR2_PACKAGE_FLOT_CATEGORIES + bool "categories" + help + Flot plugin for plotting textual data or categories + +config BR2_PACKAGE_FLOT_CROSSHAIR + bool "crosshair" + help + Flot plugin for showing crosshairs when the mouse hovers + over the plot + +config BR2_PACKAGE_FLOT_ERRORBARS + bool "errorbars" + help + Flot plugin for plotting error bars + +config BR2_PACKAGE_FLOT_FILLBETWEEN + bool "fillbetween" + help + Flot plugin for computing bottoms for filled line and bar charts + +config BR2_PACKAGE_FLOT_IMAGE + bool "image" + help + Flot plugin for plotting images + +config BR2_PACKAGE_FLOT_NAVIGATE + bool "navigate" + help + Flot plugin for adding panning and zooming capabilities to a plot + +config BR2_PACKAGE_FLOT_PIE + bool "pie" + help + Flot plugin for rendering pie charts + +config BR2_PACKAGE_FLOT_RESIZE + bool "resize" + help + Flot plugin for automatically redrawing plots when the + placeholder size changes. + +config BR2_PACKAGE_FLOT_SELECTION + bool "selection" + help + Flot plugin for selecting regions + +config BR2_PACKAGE_FLOT_STACK + bool "stack" + help + Flot plugin for stacking data sets + +config BR2_PACKAGE_FLOT_SYMBOL + bool "symbol" + help + Flot plugin that adds some extra symbols for plotting points + +config BR2_PACKAGE_FLOT_THRESHOLD + bool "threshold" + help + Flot plugin for thresholding data + +config BR2_PACKAGE_FLOT_TIME + bool "time" + help + Flot plugin for handling time axes + +endif diff --git a/package/flot/flot.mk b/package/flot/flot.mk new file mode 100644 index 0000000000..dfa6c55a32 --- /dev/null +++ b/package/flot/flot.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# flot +# +################################################################################ + +FLOT_VERSION = 0.8.1 +FLOT_SITE = http://www.flotcharts.org/downloads +FLOT_LICENSE = MIT +FLOT_LICENSE_FILES = LICENSE.txt +FLOT_FILES = jquery.flot $(addprefix jquery.flot.,\ + $(if $(BR2_PACKAGE_FLOT_CANVAS),canvas) \ + $(if $(BR2_PACKAGE_FLOT_CATEGORIES),categories) \ + $(if $(BR2_PACKAGE_FLOT_CROSSHAIR),crosshair) \ + $(if $(BR2_PACKAGE_FLOT_ERRORBARS),errorbars) \ + $(if $(BR2_PACKAGE_FLOT_FILLBETWEEN),fillbetween) \ + $(if $(BR2_PACKAGE_FLOT_IMAGE),image) \ + $(if $(BR2_PACKAGE_FLOT_NAVIGATE),navigate) \ + $(if $(BR2_PACKAGE_FLOT_PIE),pie) \ + $(if $(BR2_PACKAGE_FLOT_RESIZE),resize) \ + $(if $(BR2_PACKAGE_FLOT_SELECTION),selection) \ + $(if $(BR2_PACKAGE_FLOT_STACK),stack) \ + $(if $(BR2_PACKAGE_FLOT_SYMBOL),symbol) \ + $(if $(BR2_PACKAGE_FLOT_THRESHOLD),threshold) \ + $(if $(BR2_PACKAGE_FLOT_TIME),time) \ + ) + +define FLOT_INSTALL_TARGET_CMDS + for i in $(FLOT_FILES); do \ + $(INSTALL) -m 0644 -D $(@D)/$$i.min.js $(TARGET_DIR)/var/www/$$i.js; \ + done +endef + +define FLOT_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/var/www/jquery.flot* +endef + +$(eval $(generic-package)) diff --git a/package/fltk/Config.in b/package/fltk/Config.in index eff72b56e8..8e9977a154 100644 --- a/package/fltk/Config.in +++ b/package/fltk/Config.in @@ -2,12 +2,18 @@ config BR2_PACKAGE_FLTK bool "fltk" depends on BR2_INSTALL_LIBSTDCPP depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBPNG select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT help A cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. http://www.fltk.org/ -comment "fltk requires a toolchain with C++ support enabled" - depends on !BR2_INSTALL_LIBSTDCPP && BR2_PACKAGE_XORG7 +comment "fltk needs a toolchain w/ C++" + depends on BR2_USE_MMU && BR2_PACKAGE_XORG7 + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/fltk/fltk-01-disable-tests.patch b/package/fltk/fltk-01-disable-tests.patch new file mode 100644 index 0000000000..957145312c --- /dev/null +++ b/package/fltk/fltk-01-disable-tests.patch @@ -0,0 +1,16 @@ +Disable tests, slower to build and would need host-fltk. + +Signed-off-by: Gustavo Zacarias + +diff -Nura fltk-1.3.2.orig/Makefile fltk-1.3.2/Makefile +--- fltk-1.3.2.orig/Makefile 2013-10-27 18:19:39.693208127 -0300 ++++ fltk-1.3.2/Makefile 2013-10-27 18:20:08.032136885 -0300 +@@ -18,7 +18,7 @@ + + include makeinclude + +-DIRS = $(IMAGEDIRS) src $(CAIRODIR) fluid test documentation ++DIRS = $(IMAGEDIRS) src $(CAIRODIR) fluid documentation + + all: makeinclude fltk-config + for dir in $(DIRS); do\ diff --git a/package/fltk/fltk-1.1.7-bail-out-on-error.patch b/package/fltk/fltk-1.1.7-bail-out-on-error.patch deleted file mode 100644 index 644a0560b4..0000000000 --- a/package/fltk/fltk-1.1.7-bail-out-on-error.patch +++ /dev/null @@ -1,54 +0,0 @@ -When a submake fails, the build of FLTK was stopping, but the main -make was returning 0. Therefore, Buildroot was going on with the build -of the other components, even though the build of FLTK failed. - -Signed-off-by: Thomas Petazzoni - -Index: fltk-1.1.7/Makefile -=================================================================== ---- fltk-1.1.7.orig/Makefile 2010-05-21 15:52:20.000000000 +0200 -+++ fltk-1.1.7/Makefile 2010-05-21 15:52:43.000000000 +0200 -@@ -32,7 +32,7 @@ - all: makeinclude - for dir in $(DIRS); do\ - echo "=== making $$dir ===";\ -- (cd $$dir; $(MAKE) $(MFLAGS)) || break;\ -+ (cd $$dir; $(MAKE) $(MFLAGS)) || exit 1;\ - done - - install: makeinclude -@@ -42,7 +42,7 @@ - -chmod 755 $(DESTDIR)$(bindir)/fltk-config - for dir in FL $(DIRS); do\ - echo "=== installing $$dir ===";\ -- (cd $$dir; $(MAKE) $(MFLAGS) install) || break;\ -+ (cd $$dir; $(MAKE) $(MFLAGS) install) || exit 1;\ - done - - install-desktop: makeinclude -@@ -54,7 +54,7 @@ - $(RM) $(DESTDIR)$(bindir)/fltk-config - for dir in FL $(DIRS); do\ - echo "=== uninstalling $$dir ===";\ -- (cd $$dir; $(MAKE) $(MFLAGS) uninstall) || break;\ -+ (cd $$dir; $(MAKE) $(MFLAGS) uninstall) || exit 1;\ - done - - uninstall-desktop: makeinclude -@@ -65,14 +65,14 @@ - depend: makeinclude - for dir in $(DIRS); do\ - echo "=== making dependencies in $$dir ===";\ -- (cd $$dir; $(MAKE) $(MFLAGS) depend) || break;\ -+ (cd $$dir; $(MAKE) $(MFLAGS) depend) || exit 1;\ - done - - clean: - -$(RM) core *.o - for dir in $(DIRS); do\ - echo "=== cleaning $$dir ===";\ -- (cd $$dir; $(MAKE) $(MFLAGS) clean) || break;\ -+ (cd $$dir; $(MAKE) $(MFLAGS) clean) || exit 1;\ - done - - distclean: clean diff --git a/package/fltk/fltk-1.1.7-disable-test.patch b/package/fltk/fltk-1.1.7-disable-test.patch deleted file mode 100644 index c83e1dae07..0000000000 --- a/package/fltk/fltk-1.1.7-disable-test.patch +++ /dev/null @@ -1,17 +0,0 @@ -Disable tests in FLTK because they use the fluid tool on the host. - -Patch borrowed from OpenEmbedded. - -Index: fltk-1.1.9/Makefile -=================================================================== ---- fltk-1.1.9.orig/Makefile 2008-06-06 16:14:11.936736201 +0200 -+++ fltk-1.1.9/Makefile 2008-06-06 16:14:22.526357637 +0200 -@@ -27,7 +27,7 @@ - - include makeinclude - --DIRS = $(IMAGEDIRS) src fluid test documentation -+DIRS = $(IMAGEDIRS) src fluid documentation - - all: makeinclude fltk-config - for dir in $(DIRS); do\ diff --git a/package/fltk/fltk-1.1.7-makefiles.patch b/package/fltk/fltk-1.1.7-makefiles.patch deleted file mode 100644 index 0a6a8d433e..0000000000 --- a/package/fltk/fltk-1.1.7-makefiles.patch +++ /dev/null @@ -1,132 +0,0 @@ ---- a/jpeg/Makefile 2005-02-27 19:11:07.000000000 -0500 -+++ b/jpeg/Makefile 2008-03-19 13:17:46.000000000 -0400 -@@ -65,14 +65,14 @@ clean: - # - - install: -- echo "Installing libfltk_jpeg$(LIBEXT) in $(libdir)..." -- -$(MKDIR) $(libdir) -- $(RM) $(libdir)/libfltk_jpeg$(LIBEXT) -- $(CP) $(LIBJPEG) $(libdir) -- $(RANLIB) $(libdir)/libfltk_jpeg$(LIBEXT) -- echo "Installing jpeg headers in $(includedir)/FL/images..." -- -$(MKDIR) $(includedir)/FL/images -- $(CP) jconfig.h jerror.h jmorecfg.h jpeglib.h $(includedir)/FL/images -+ echo "Installing libfltk_jpeg$(LIBEXT) in $(DESTDIR)$(libdir)..." -+ -$(MKDIR) $(DESTDIR)$(libdir) -+ $(RM) $(DESTDIR)$(libdir)/libfltk_jpeg$(LIBEXT) -+ $(CP) $(LIBJPEG) $(DESTDIR)$(libdir) -+ $(RANLIB) $(DESTDIR)$(libdir)/libfltk_jpeg$(LIBEXT) -+ echo "Installing jpeg headers in $(DESTDIR)$(includedir)/FL/images..." -+ -$(MKDIR) $(DESTDIR)$(includedir)/FL/images -+ $(CP) jconfig.h jerror.h jmorecfg.h jpeglib.h $(DESTDIR)$(includedir)/FL/images - - - # -@@ -81,12 +81,12 @@ install: - - uninstall: - echo "Uninstalling libfltk_jpeg$(LIBEXT) in $(libdir)..." -- $(RM) $(libdir)/libfltk_jpeg$(LIBEXT) -+ $(RM) $(DESTDIR)$(libdir)/libfltk_jpeg$(LIBEXT) - echo "Uninstalling jpeg headers in $(includedir)/FL/images..." -- $(RM) $(includedir)/FL/images/jconfig.h -- $(RM) $(includedir)/FL/images/jerror.h -- $(RM) $(includedir)/FL/images/jmorecfg.h -- $(RM) $(includedir)/FL/images/jpeglib.h -+ $(RM) $(DESTDIR)$(includedir)/FL/images/jconfig.h -+ $(RM) $(DESTDIR)$(includedir)/FL/images/jerror.h -+ $(RM) $(DESTDIR)$(includedir)/FL/images/jmorecfg.h -+ $(RM) $(DESTDIR)$(includedir)/FL/images/jpeglib.h - - - # - ---- a/png/Makefile 2005-02-24 16:55:12.000000000 -0500 -+++ b/png/Makefile 2008-03-19 13:18:38.000000000 -0400 -@@ -57,14 +57,14 @@ clean: - # - - install: $(LIBPNG) -- echo "Installing libfltk_png$(LIBEXT) in $(libdir)..." -- -$(MKDIR) $(libdir) -- $(RM) $(libdir)/libfltk_png$(LIBEXT) -- $(CP) $(LIBPNG) $(libdir) -- $(RANLIB) $(libdir)/libfltk_png$(LIBEXT) -- echo "Installing png headers in $(includedir)/FL/images..." -- -$(MKDIR) $(includedir)/FL/images -- $(CP) png.h pngconf.h $(includedir)/FL/images -+ echo "Installing libfltk_png$(LIBEXT) in $(DESTDIR)$(libdir)..." -+ -$(MKDIR) $(DESTDIR)$(libdir) -+ $(RM) $(DESTDIR)$(libdir)/libfltk_png$(LIBEXT) -+ $(CP) $(LIBPNG) $(DESTDIR)$(libdir) -+ $(RANLIB) $(DESTDIR)$(libdir)/libfltk_png$(LIBEXT) -+ echo "Installing png headers in $(DESTDIR)$(includedir)/FL/images..." -+ -$(MKDIR) $(DESTDIR)$(includedir)/FL/images -+ $(CP) png.h pngconf.h $(DESTDIR)$(includedir)/FL/images - - - # -@@ -72,11 +72,11 @@ install: $(LIBPNG) - # - - uninstall: -- echo "Uninstalling libfltk_png$(LIBEXT) in $(libdir)..." -- $(RM) $(libdir)/libfltk_png$(LIBEXT) -- echo "Uninstalling png headers in $(includedir)/FL/images..." -- $(RM) $(includedir)/FL/images/png.h -- $(RM) $(includedir)/FL/images/pngconf.h -+ echo "Uninstalling libfltk_png$(LIBEXT) in $(DESTDIR)$(libdir)..." -+ $(RM) $(DESTDIR)$(libdir)/libfltk_png$(LIBEXT) -+ echo "Uninstalling png headers in $(DESTDIR)$(includedir)/FL/images..." -+ $(RM) $(DESTDIR)$(includedir)/FL/images/png.h -+ $(RM) $(DESTDIR)$(includedir)/FL/images/pngconf.h - - - # - ---- a/zlib/Makefile 2005-02-24 16:55:12.000000000 -0500 -+++ b/zlib/Makefile 2008-03-19 13:20:34.000000000 -0400 -@@ -57,14 +57,14 @@ clean: - # - - install: $(LIBZ) -- echo "Installing libfltk_z$(LIBEXT) in $(libdir)..." -- -$(MKDIR) $(libdir) -- $(RM) $(libdir)/libfltk_z$(LIBEXT) -- $(CP) $(LIBZ) $(libdir) -- $(RANLIB) $(libdir)/libfltk_z$(LIBEXT) -- echo "Installing zlib headers in $(includedir)/FL/images..." -- -$(MKDIR) $(includedir)/FL/images -- $(CP) zconf.h zlib.h zutil.h $(includedir)/FL/images -+ echo "Installing libfltk_z$(LIBEXT) in $(DESTDIR)$(libdir)..." -+ -$(MKDIR) $(DESTDIR)$(libdir) -+ $(RM) $(DESTDIR)$(libdir)/libfltk_z$(LIBEXT) -+ $(CP) $(LIBZ) $(DESTDIR)$(libdir) -+ $(RANLIB) $(DESTDIR)$(libdir)/libfltk_z$(LIBEXT) -+ echo "Installing zlib headers in $(DESTDIR)$(includedir)/FL/images..." -+ -$(MKDIR) $(DESTDIR)$(includedir)/FL/images -+ $(CP) zconf.h zlib.h zutil.h $(DESTDIR)$(includedir)/FL/images - - - # -@@ -72,12 +72,12 @@ install: $(LIBZ) - # - - uninstall: -- echo "Uninstalling libfltk_z$(LIBEXT) in $(libdir)..." -- $(RM) $(libdir)/libfltk_z$(LIBEXT) -- echo "Uninstalling zlib headers in $(includedir)/FL/images..." -- $(RM) $(includedir)/FL/images/zconf.h -- $(RM) $(includedir)/FL/images/zlib.h -- $(RM) $(includedir)/FL/images/zutil.h -+ echo "Uninstalling libfltk_z$(LIBEXT) in $(DESTDIR)$(libdir)..." -+ $(RM) $(DESTDIR)$(libdir)/libfltk_z$(LIBEXT) -+ echo "Uninstalling zlib headers in $(DESTDIR)$(includedir)/FL/images..." -+ $(RM) $(DESTDIR)$(includedir)/FL/images/zconf.h -+ $(RM) $(DESTDIR)$(includedir)/FL/images/zlib.h -+ $(RM) $(DESTDIR)$(includedir)/FL/images/zutil.h - - - # - diff --git a/package/fltk/fltk-1.1.7-scandir-fix.patch b/package/fltk/fltk-1.1.7-scandir-fix.patch deleted file mode 100644 index ba2b560933..0000000000 --- a/package/fltk/fltk-1.1.7-scandir-fix.patch +++ /dev/null @@ -1,20 +0,0 @@ -Use the correct scandir() call. - -See http://www.fltk.org/str.php?L2205. This patch is a simplified -version of http://www.fltk.org/strfiles/2205/scandir_posix.patch. - -Signed-off-by: Thomas Petazzoni - -Index: fltk-1.1.7/src/filename_list.cxx -=================================================================== ---- fltk-1.1.7.orig/src/filename_list.cxx 2010-05-21 15:58:09.000000000 +0200 -+++ fltk-1.1.7/src/filename_list.cxx 2010-05-21 16:00:21.000000000 +0200 -@@ -54,7 +54,7 @@ - Fl_File_Sort_F *sort) { - #ifndef HAVE_SCANDIR - int n = scandir(d, list, 0, sort); --#elif defined(__hpux) || defined(__CYGWIN__) -+#elif defined(__hpux) || defined(__CYGWIN__) || defined(__USE_POSIX) - // HP-UX, Cygwin define the comparison function like this: - int n = scandir(d, list, 0, (int(*)(const dirent **, const dirent **))sort); - #elif defined(__osf__) diff --git a/package/fltk/fltk.mk b/package/fltk/fltk.mk index b323c59e1a..cbcec7b585 100644 --- a/package/fltk/fltk.mk +++ b/package/fltk/fltk.mk @@ -1,21 +1,38 @@ -############################################################# +################################################################################ # # fltk # -############################################################# +################################################################################ -FLTK_VERSION = 1.1.7 -FLTK_SOURCE = fltk-$(FLTK_VERSION)-source.tar.bz2 -FLTK_SITE = http://ftp.easysw.com/pub/fltk/1.1.7/ -FLTK_AUTORECONF = NO +FLTK_VERSION = 1.3.2 +FLTK_SOURCE = fltk-$(FLTK_VERSION)-source.tar.gz +FLTK_SITE = http://fltk.org/pub/fltk/$(FLTK_VERSION) FLTK_INSTALL_STAGING = YES -FLTK_INSTALL_TARGET = YES - FLTK_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) STRIP=$(TARGET_STRIP) install FLTK_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) STRIP=$(TARGET_STRIP) install +FLTK_CONF_OPT = --enable-threads --with-x --disable-gl \ + --disable-localjpeg --disable-localpng --disable-localzlib +FLTK_DEPENDENCIES = jpeg libpng xlib_libX11 xlib_libXext xlib_libXt +FLTK_CONFIG_SCRIPTS = fltk-config +FLTK_LICENSE = LGPLv2 with exceptions +FLTK_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_CAIRO),y) +FLTK_CONF_OPT += --enable-cairo +FLTK_DEPENDENCIES += cairo +endif -FLTK_CONF_OPT = --enable-shared --enable-threads --with-x +ifeq ($(BR2_PACKAGE_XLIB_LIBXFT),y) +FLTK_CONF_ENV += ac_cv_path_FTCONFIG=$(STAGING_DIR)/usr/bin/freetype-config +FLTK_DEPENDENCIES += xlib_libXft +else +FLTK_CONF_OPT += --disable-xft +endif -FLTK_DEPENDENCIES = xserver_xorg-server xlib_libXt +ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y) +FLTK_DEPENDENCIES += xlib_libXinerama +else +FLTK_CONF_OPT += --disable-xinerama +endif -$(eval $(call AUTOTARGETS,package,fltk)) +$(eval $(autotools-package)) diff --git a/package/fluxbox/Config.in b/package/fluxbox/Config.in new file mode 100644 index 0000000000..cb4d76feb3 --- /dev/null +++ b/package/fluxbox/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_FLUXBOX + bool "fluxbox" + depends on BR2_PACKAGE_XORG7 + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_XLIB_LIBX11 + # Runtime dependency, needed by startup script + select BR2_PACKAGE_XAPP_XMODMAP + help + The Fluxbox lightweight window manager for X + + http://fluxbox.org + +comment "fluxbox needs a toolchain w/ C++" + depends on BR2_PACKAGE_XORG7 && !BR2_INSTALL_LIBSTDCPP diff --git a/package/fluxbox/fluxbox-1.3.2-fix-configure.patch b/package/fluxbox/fluxbox-1.3.2-fix-configure.patch new file mode 100644 index 0000000000..2cb8273609 --- /dev/null +++ b/package/fluxbox/fluxbox-1.3.2-fix-configure.patch @@ -0,0 +1,19 @@ +Avoid to call the imlib2-config that may be installed on the host system +(even when --with-imlib2-prefix or --with-imlib2-exec-prefix is passed to +the configure script), which totally screws up the resulting linker flags. + +Inspired by: http://git.fluxbox.org/fluxbox.git/commit/?id=b178bed60b5bd8b2c9ed0cbc67fd729ff3820589 + +Signed-off-by: Samuel Martin + +--- fluxbox-1.3.2.orig/configure.in 2012-10-21 16:11:59.445749396 +0200 ++++ fluxbox-1.3.2/configure.in 2012-10-21 16:35:27.658390856 +0200 +@@ -443,8 +443,6 @@ if test x$enable_imlib2 = "xyes"; then + [ + IMLIB2=true + AC_DEFINE(HAVE_IMLIB2, [], [Imlib2 support]) +- IMLIB2_LIBS=`imlib2-config --libs` +- IMLIB2_CFLAGS=`imlib2-config --cflags` + LIBS="$LIBS $IMLIB2_LIBS" + CXXFLAGS="$CXXFLAGS $IMLIB2_CFLAGS" + ], [ AC_MSG_RESULT(no)] diff --git a/package/fluxbox/fluxbox.mk b/package/fluxbox/fluxbox.mk new file mode 100644 index 0000000000..262cb0deae --- /dev/null +++ b/package/fluxbox/fluxbox.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# fluxbox +# +################################################################################ + +FLUXBOX_VERSION = 1.3.2 +FLUXBOX_SOURCE = fluxbox-$(FLUXBOX_VERSION).tar.bz2 +FLUXBOX_SITE = http://downloads.sourceforge.net/project/fluxbox/fluxbox/$(FLUXBOX_VERSION) +FLUXBOX_LICENSE = MIT +FLUXBOX_LICENSE_FILES = COPYING + +FLUXBOX_AUTORECONF = YES + +FLUXBOX_CONF_OPT = --x-includes=$(STAGING_DIR)/usr/include/X11 \ + --x-libraries=$(STAGING_DIR)/usr/lib +FLUXBOX_DEPENDENCIES = xlib_libX11 $(if $(BR2_PACKAGE_LIBICONV),libiconv) + +ifeq ($(BR2_PACKAGE_IMLIB2_X),y) +FLUXBOX_CONF_OPT += --enable-imlib2 --with-imlib2-prefix=$(STAGING_DIR)/usr +FLUXBOX_DEPENDENCIES += imlib2 +else +FLUXBOX_CONF_OPT += --disable-imlib2 +endif + +define FLUXBOX_INSTALL_XSESSION_FILE + [ -f $(TARGET_DIR)/root/.xsession ] || $(INSTALL) -m 0755 -D \ + package/fluxbox/xsession $(TARGET_DIR)/root/.xsession +endef + +FLUXBOX_POST_INSTALL_TARGET_HOOKS += FLUXBOX_INSTALL_XSESSION_FILE + +$(eval $(autotools-package)) diff --git a/package/fluxbox/xsession b/package/fluxbox/xsession new file mode 100644 index 0000000000..b51acff48d --- /dev/null +++ b/package/fluxbox/xsession @@ -0,0 +1,2 @@ +#!/bin/sh +exec startfluxbox diff --git a/package/fmtools/Config.in b/package/fmtools/Config.in new file mode 100644 index 0000000000..1591618899 --- /dev/null +++ b/package/fmtools/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_FMTOOLS + bool "fmtools" + help + fmtools is a pair of simple command-line utilities for + "video4linux" radio tuner cards under Linux. It includes + fm for power control, tuning, and volume and fmscan for + scanning for stations. + + http://www.stanford.edu/~blp/fmtools/ diff --git a/package/fmtools/fmtools.mk b/package/fmtools/fmtools.mk new file mode 100644 index 0000000000..5f305b9655 --- /dev/null +++ b/package/fmtools/fmtools.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# fmtools +# +################################################################################ + +FMTOOLS_VERSION = 1.0.2 +FMTOOLS_SITE = http://www.stanford.edu/~blp/fmtools/ +FMTOOLS_LICENSE = GPLv2+ +FMTOOLS_LICENSE_FILES = COPYING + +define FMTOOLS_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define FMTOOLS_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/fm $(TARGET_DIR)/usr/sbin/fm + $(INSTALL) -D -m 0755 $(@D)/fmscan $(TARGET_DIR)/usr/sbin/fmscan +endef + +$(eval $(generic-package)) diff --git a/package/fontconfig/fontconfig.mk b/package/fontconfig/fontconfig.mk index a875e7490a..5ce6be2515 100644 --- a/package/fontconfig/fontconfig.mk +++ b/package/fontconfig/fontconfig.mk @@ -1,14 +1,15 @@ -############################################################# +################################################################################ # # fontconfig # -############################################################# +################################################################################ + FONTCONFIG_VERSION = 2.6.0 -FONTCONFIG_SOURCE = fontconfig-$(FONTCONFIG_VERSION).tar.gz FONTCONFIG_SITE = http://fontconfig.org/release +FONTCONFIG_LICENSE = fontconfig license +FONTCONFIG_LICENSE_FILES = COPYING FONTCONFIG_AUTORECONF = YES FONTCONFIG_INSTALL_STAGING = YES -FONTCONFIG_INSTALL_TARGET = YES # This package does not like using the target cflags for some reason. FONTCONFIG_CONF_ENV = CFLAGS="-I$(STAGING_DIR)/usr/include/freetype2" @@ -22,10 +23,8 @@ FONTCONFIG_CONF_OPT = --with-arch=$(GNU_TARGET_NAME) \ FONTCONFIG_DEPENDENCIES = freetype expat -HOST_FONTCONFIG_DEPENDENCIES = host-freetype host-expat HOST_FONTCONFIG_CONF_OPT = \ - --disable-docs \ --disable-static -$(eval $(call AUTOTARGETS,package,fontconfig)) -$(eval $(call AUTOTARGETS,package,fontconfig,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/foomatic-filters/Config.in b/package/foomatic-filters/Config.in new file mode 100644 index 0000000000..377566e929 --- /dev/null +++ b/package/foomatic-filters/Config.in @@ -0,0 +1,19 @@ +comment "foomatic-filters needs a toolchain w/ threads" + depends on BR2_PACKAGE_CUPS + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_FOOMATIC_FILTERS + bool "foomatic_filters" + depends on BR2_PACKAGE_CUPS + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_ENSCRIPT + help + Foomatic Filters + Foomatic is a database-driven system for integrating free software + printer drivers with common spoolers under Unix. It supports CUPS, + LPRng, LPD, GNUlpr, Solaris LP, PPR, PDQ, CPS, and direct printing + with every free software printer driver known to us and every + printer known to work with these drivers. + + http://www.linuxfoundation.org/collaborate/workgroups/openprinting/database/foomatic diff --git a/package/foomatic-filters/foomatic-filters.mk b/package/foomatic-filters/foomatic-filters.mk new file mode 100644 index 0000000000..950f2f94ce --- /dev/null +++ b/package/foomatic-filters/foomatic-filters.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# foomatic-filters +# +################################################################################ + +FOOMATIC_FILTERS_VERSION = 4.0.17 +FOOMATIC_FILTERS_SITE = http://www.openprinting.org/download/foomatic +FOOMATIC_FILTERS_LICENSE = GPLv2+ +FOOMATIC_FILTERS_LICENSE_FILES = COPYING +FOOMATIC_FILTERS_DEPENDENCIES = cups libusb enscript +FOOMATIC_FILTERS_CONF_OPT = --with-file-converter=enscript +FOOMATIC_FILTERS_CONF_ENV = ac_cv_path_ENSCRIPT="/usr/bin/enscript" + +ifeq ($(BR2_PACKAGE_DBUS),y) +FOOMATIC_FILTERS_CONF_OPT += --enable-dbus +FOOMATIC_FILTERS_DEPENDENCIES += dbus +else +FOOMATIC_FILTERS_CONF_OPT += --disable-dbus +endif + +$(eval $(autotools-package)) diff --git a/package/freerdp/Config.in b/package/freerdp/Config.in new file mode 100644 index 0000000000..c5ff769025 --- /dev/null +++ b/package/freerdp/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_FREERDP + bool "freerdp" + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXCURSOR + select BR2_PACKAGE_ZLIB + depends on BR2_PACKAGE_XORG7 + help + FreeRDP is a free implementation of the Remote Desktop + Protocol (RDP), released under the Apache license + + http://www.freerdp.com/ diff --git a/package/freerdp/freerdp.mk b/package/freerdp/freerdp.mk new file mode 100644 index 0000000000..c06aac9f4e --- /dev/null +++ b/package/freerdp/freerdp.mk @@ -0,0 +1,62 @@ +################################################################################ +# +# freerdp +# +################################################################################ + +FREERDP_VERSION = 1.0.1 +FREERDP_SITE = https://github.com/downloads/FreeRDP/FreeRDP + +FREERDP_DEPENDENCIES = openssl zlib \ + xlib_libX11 xlib_libXt xlib_libXext xlib_libXcursor + +ifeq ($(BR2_PACKAGE_CUPS),y) +FREERDP_CONF_OPT += -DWITH_CUPS=ON +FREERDP_DEPENDENCIES += cups +else +FREERDP_CONF_OPT += -DWITH_CUPS=OFF +endif + +ifeq ($(BR2_PACKAGE_FFMPEG),y) +FREERDP_CONF_OPT += -DWITH_FFMPEG=ON +FREERDP_DEPENDENCIES += ffmpeg +else +FREERDP_CONF_OPT += -DWITH_FFMPEG=OFF +endif + +ifeq ($(BR2_PACKAGE_ALSA_LIB),y) +FREERDP_CONF_OPT += -DWITH_ALSA=ON +FREERDP_DEPENDENCIES += alsa-lib +else +FREERDP_CONF_OPT += -DWITH_ALSA=OFF +endif + +ifeq ($(BR2_PACKAGE_PULSEAUDIO),y) +FREERDP_CONF_OPT += -DWITH_PULSEAUDIO=ON +FREERDP_DEPENDENCIES += pulseaudio +else +FREERDP_CONF_OPT += -DWITH_PULSEAUDIO=OFF +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y) +FREERDP_CONF_OPT += -DWITH_XINERAMA=ON +FREERDP_DEPENDENCIES += xlib_libXinerama +else +FREERDP_CONF_OPT += -DWITH_XINERAMA=OFF +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXKBFILE),y) +FREERDP_CONF_OPT += -DWITH_XKBFILE=ON +FREERDP_DEPENDENCIES += xlib_libxkbfile +else +FREERDP_CONF_OPT += -DWITH_XKBFILE=OFF +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXV),y) +FREERDP_CONF_OPT += -DWITH_XV=ON +FREERDP_DEPENDENCIES += xlib_libXv +else +FREERDP_CONF_OPT += -DWITH_XV=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in new file mode 100644 index 0000000000..7c22f79cf6 --- /dev/null +++ b/package/freescale-imx/Config.in @@ -0,0 +1,8 @@ +menu "Freescale i.MX libraries" + depends on BR2_arm + +source "package/freescale-imx/imx-lib/Config.in" +source "package/freescale-imx/firmware-imx/Config.in" +source "package/freescale-imx/gpu-viv-bin-mx6q/Config.in" + +endmenu diff --git a/package/freescale-imx/firmware-imx/Config.in b/package/freescale-imx/firmware-imx/Config.in new file mode 100644 index 0000000000..dd96d8889e --- /dev/null +++ b/package/freescale-imx/firmware-imx/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_FIRMWARE_IMX + bool "firmware-imx" + depends on BR2_arm # Only relevant for i.MX + help + Firmware blobs for the Freescale i.MX SoCs. + + It contains blobs for Atheros AR6003, SDMA and VPU. + + Note: it also contains a blob for ar3k/30101 but upstream + linux-firmware has that as well. + + This library is provided by Freescale as-is and doesn't have + an upstream. diff --git a/package/freescale-imx/firmware-imx/firmware-imx.mk b/package/freescale-imx/firmware-imx/firmware-imx.mk new file mode 100644 index 0000000000..d9fcb89628 --- /dev/null +++ b/package/freescale-imx/firmware-imx/firmware-imx.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# firmware-imx +# +################################################################################ + +FIRMWARE_IMX_VERSION = $(FREESCALE_IMX_VERSION) +FIRMWARE_IMX_SITE = $(FREESCALE_IMX_MIRROR_SITE) +FIRMWARE_IMX_SOURCE = firmware-imx-$(FIRMWARE_IMX_VERSION).bin +FIRMWARE_IMX_LICENSE = Freescale Semiconductor Software License Agreement, \ + Atheros license (ath6k) +FIRMWARE_IMX_LICENSE_FILES = licenses/vpu/EULA licenses/ath6k/AR6102/License.txt +# This is a legal minefield: the EULA specifies that +# the Board Support Package includes software and hardware (sic!) +# for which a separate license is needed... +FIRMWARE_IMX_REDISTRIBUTE = NO + +FIRMWARE_IMX_BLOBS = ath6k sdma vpu + +# The archive is a shell-self-extractor of a bzipped tar. It happens +# to extract in the correct directory (firmware-imx-x.y.z) +# The --force makes sure it doesn't fail if the source dir already exists. +# The --auto-accept skips the license check - not needed for us +# because we have legal-info. +define FIRMWARE_IMX_EXTRACT_CMDS + cd $(BUILD_DIR); \ + sh $(DL_DIR)/$(FIRMWARE_IMX_SOURCE) --force --auto-accept +endef + + +define FIRMWARE_IMX_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/lib/firmware + for blobdir in $(FIRMWARE_IMX_BLOBS); do \ + cp -r $(@D)/firmware/$${blobdir} $(TARGET_DIR)/lib/firmware; \ + done +endef + +$(eval $(generic-package)) diff --git a/package/freescale-imx/freescale-imx.mk b/package/freescale-imx/freescale-imx.mk new file mode 100644 index 0000000000..d35a62e479 --- /dev/null +++ b/package/freescale-imx/freescale-imx.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# freescale-imx +# +################################################################################ + +FREESCALE_IMX_VERSION = 1.1.0 + +# No official download site from freescale, just this mirror +FREESCALE_IMX_MIRROR_SITE = http://download.ossystems.com.br/bsp/freescale/source + +include $(sort $(wildcard package/freescale-imx/*/*.mk)) diff --git a/package/freescale-imx/gpu-viv-bin-mx6q/Config.in b/package/freescale-imx/gpu-viv-bin-mx6q/Config.in new file mode 100644 index 0000000000..64e42bad0e --- /dev/null +++ b/package/freescale-imx/gpu-viv-bin-mx6q/Config.in @@ -0,0 +1,34 @@ +comment "gpu-viv-bin-mx6q needs an (e)glibc toolchain" + depends on BR2_arm + depends on !BR2_TOOLCHAIN_USES_GLIBC + +config BR2_PACKAGE_GPU_VIV_BIN_MX6Q + bool "gpu-viv-bin-mx6q" + select BR2_PACKAGE_HAS_OPENGL_EGL + select BR2_PACKAGE_HAS_OPENGL_ES + select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7 + depends on BR2_arm # Only relevant for i.MX6 + # Library binaries are linked against libc.so.6 + depends on BR2_TOOLCHAIN_USES_GLIBC + help + Userspace libraries for Vivante GPU on i.MX6 platforms + + It contains libraries and headers for GLES, OpenCL, and + OpenVG. It also contains a DRI plugin for X11. It also + contains a plugin for DirectFB-1.4.0, but that doesn't work + together with buildroot's DirectFB version. + + This library is provided by Freescale as-is and doesn't have + an upstream. + +if BR2_PACKAGE_GPU_VIV_BIN_MX6Q + +config BR2_PACKAGE_GPU_VIV_BIN_MX6Q_EXAMPLES + bool "install examples" + help + Copy the Vivante examples to the target. + + Warning: examples take approximately 150 MB of disk space. + +endif diff --git a/package/freescale-imx/gpu-viv-bin-mx6q/egl.pc b/package/freescale-imx/gpu-viv-bin-mx6q/egl.pc new file mode 100644 index 0000000000..c9842471d8 --- /dev/null +++ b/package/freescale-imx/gpu-viv-bin-mx6q/egl.pc @@ -0,0 +1,10 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: egl +Description: Freescale gpu-viv-bin-mx6q implementation of EGL +Version: 1.0 +Libs: -L${libdir} -lGAL -lEGL +Cflags: -I${includedir}/ -DEGL_API_FB=1 diff --git a/package/freescale-imx/gpu-viv-bin-mx6q/glesv2.pc b/package/freescale-imx/gpu-viv-bin-mx6q/glesv2.pc new file mode 100644 index 0000000000..7cfb5e7d68 --- /dev/null +++ b/package/freescale-imx/gpu-viv-bin-mx6q/glesv2.pc @@ -0,0 +1,10 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: glesv2 +Description: Freescale gpu-viv-bin-mx6q implementation of OpenGL ESv2 +Version: 2.0 +Libs: -L${libdir} -lGAL -lEGL -lGLESv2 +Cflags: -I${includedir}/ -DEGL_API_FB=1 diff --git a/package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q-0001-correct-HAL-include.patch b/package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q-0001-correct-HAL-include.patch new file mode 100644 index 0000000000..c83cd559b1 --- /dev/null +++ b/package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q-0001-correct-HAL-include.patch @@ -0,0 +1,16 @@ +Correct the directory path for gc_hal_eglplatform_type.h + +Signed-off-by: Henk Fijnvandraat + +diff -rup gpu-viv-bin-mx6q-1.1.0-orig/usr/include/gc_vdk_types.h gpu-viv-bin-mx6q-1.1.0/usr/include/gc_vdk_types.h +--- gpu-viv-bin-mx6q-1.1.0-orig/usr/include/gc_vdk_types.h 2012-12-18 10:35:55.000000000 +0100 ++++ gpu-viv-bin-mx6q-1.1.0/usr/include/gc_vdk_types.h 2013-05-09 21:09:28.080138681 +0200 +@@ -39,7 +39,7 @@ extern "C" { + #endif + + #include +-#include "gc_hal_eglplatform_type.h" ++#include + + + /******************************************************************************* diff --git a/package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk b/package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk new file mode 100644 index 0000000000..c48d1080dc --- /dev/null +++ b/package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk @@ -0,0 +1,89 @@ +################################################################################ +# +# gpu-viv-bin-mx6q +# +################################################################################ + +GPU_VIV_BIN_MX6Q_VERSION = $(FREESCALE_IMX_VERSION) +GPU_VIV_BIN_MX6Q_SITE = $(FREESCALE_IMX_MIRROR_SITE) +GPU_VIV_BIN_MX6Q_SOURCE = gpu-viv-bin-mx6q-$(GPU_VIV_BIN_MX6Q_VERSION).bin + +GPU_VIV_BIN_MX6Q_INSTALL_STAGING = YES + +GPU_VIV_BIN_MX6Q_LICENSE = Freescale Semiconductor Software License Agreement + +# No license file is included in the archive; we could extract it from +# the self-extractor, but that's just too much effort. +# This is a legal minefield: the EULA specifies that +# the Board Support Package includes software and hardware (sic!) +# for which a separate license is needed... +GPU_VIV_BIN_MX6Q_REDISTRIBUTE = NO + +# DirectFB is not supported (wrong version) +ifeq ($(BR2_PACKAGE_XORG7),y) +GPU_VIV_BIN_MX6Q_DEPENDENCIES = xlib_libXdamage xlib_libXext +GPU_VIV_BIN_MX6Q_LIB_TARGET = x11 +else +GPU_VIV_BIN_MX6Q_LIB_TARGET = fb +endif + +# The archive is a shell-self-extractor of a bzipped tar. It happens +# to extract in the correct directory (gpu-viv-bin-mx6q-x.y.z) +# The --force makes sure it doesn't fail if the source dir already exists. +# The --auto-accept skips the license check - not needed for us +# because we have legal-info. +define GPU_VIV_BIN_MX6Q_EXTRACT_CMDS + (cd $(BUILD_DIR); \ + sh $(DL_DIR)/$(GPU_VIV_BIN_MX6Q_SOURCE) --force --auto-accept) +endef + +# Instead of building, we fix up the inconsistencies that exist +# in the upstream archive here. +# Make sure these commands are idempotent. +define GPU_VIV_BIN_MX6Q_BUILD_CMDS + $(SED) 's/defined(LINUX)/defined(__linux__)/g' $(@D)/usr/include/*/*.h + for lib in EGL GAL VIVANTE; do \ + ln -sf lib$${lib}-$(GPU_VIV_BIN_MX6Q_LIB_TARGET).so \ + $(@D)/usr/lib/lib$${lib}.so; \ + done + ln -sf libGL.so.1.2 $(@D)/usr/lib/libGL.so.1 + ln -sf libGL.so.1.2 $(@D)/usr/lib/libGL.so +endef + +define GPU_VIV_BIN_MX6Q_INSTALL_STAGING_CMDS + cp -r $(@D)/usr/* $(STAGING_DIR)/usr + for lib in egl glesv2 vg; do \ + $(INSTALL) -m 0644 -D \ + package/freescale-imx/gpu-viv-bin-mx6q/$${lib}.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/$${lib}.pc; \ + if [ "$(GPU_VIV_BIN_MX6Q_LIB_TARGET)" != "fb" ]; then \ + $(SED) "s/-DEGL_API_FB=1//" \ + $(STAGING_DIR)/usr/lib/pkgconfig/$${lib}.pc; \ + fi; \ + done +endef + +ifeq ($(BR2_PACKAGE_GPU_VIV_BIN_MX6Q_EXAMPLES),y) +define GPU_VIV_BIN_MX6Q_INSTALL_EXAMPLES + mkdir -p $(TARGET_DIR)/usr/share/examples/ + cp -r $(@D)/opt/* $(TARGET_DIR)/usr/share/examples/ +endef +endif + +# On the target, remove the unused libraries. +# Note that this is _required_, else ldconfig may create symlinks +# to the wrong library +define GPU_VIV_BIN_MX6Q_INSTALL_TARGET_CMDS + $(GPU_VIV_BIN_MX6Q_INSTALL_EXAMPLES) + cp -a $(@D)/usr/lib $(TARGET_DIR)/usr + for lib in EGL GAL VIVANTE; do \ + for f in $(TARGET_DIR)/usr/lib/lib$${lib}-*.so; do \ + case $$f in \ + *-$(GPU_VIV_BIN_MX6Q_LIB_TARGET).so) : ;; \ + *) $(RM) $$f ;; \ + esac; \ + done; \ + done +endef + +$(eval $(generic-package)) diff --git a/package/freescale-imx/gpu-viv-bin-mx6q/vg.pc b/package/freescale-imx/gpu-viv-bin-mx6q/vg.pc new file mode 100644 index 0000000000..fb14005571 --- /dev/null +++ b/package/freescale-imx/gpu-viv-bin-mx6q/vg.pc @@ -0,0 +1,10 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: vg +Description: Freescale gpu-viv-bin-mx6q implementation of OpenVG +Version: 1.1 +Libs: -L${libdir} -lGAL -lEGL -lOpenVG +Cflags: -I${includedir}/ -DEGL_API_FB=1 diff --git a/package/freescale-imx/imx-lib/Config.in b/package/freescale-imx/imx-lib/Config.in new file mode 100644 index 0000000000..161700985f --- /dev/null +++ b/package/freescale-imx/imx-lib/Config.in @@ -0,0 +1,53 @@ +comment "imx-lib needs an imx-specific kernel to be built" + depends on BR2_arm && !BR2_LINUX_KERNEL + +config BR2_PACKAGE_IMX_LIB + bool "imx-lib" + depends on BR2_LINUX_KERNEL + depends on BR2_arm # Only relevant for i.MX + help + Library of userspace helpers specific for the Freescale i.MX + platform. It wraps the kernel interfaces for some i.MX platform + specific drivers. It requires a kernel that includes the i.MX + specific headers to be built. + + This library is provided by Freescale as-is and doesn't have + an upstream. + +if BR2_PACKAGE_IMX_LIB +choice + prompt "i.MX platform" + +config BR2_PACKAGE_IMX_LIB_PLATFORM_IMX25_3STACK + bool "imx25-3stack" + +config BR2_PACKAGE_IMX_LIB_PLATFORM_IMX27ADS + bool "imx27ads" + +config BR2_PACKAGE_IMX_LIB_PLATFORM_IMX37_3STACK + bool "imx37-3stack" + +config BR2_PACKAGE_IMX_LIB_PLATFORM_IMX50 + bool "imx50" + +config BR2_PACKAGE_IMX_LIB_PLATFORM_IMX51 + bool "imx51" + +config BR2_PACKAGE_IMX_LIB_PLATFORM_IMX53 + bool "imx53" + +config BR2_PACKAGE_IMX_LIB_PLATFORM_IMX6Q + bool "imx6q" + +endchoice + +config BR2_PACKAGE_IMX_LIB_PLATFORM + string + default "IMX25_3STACK" if BR2_PACKAGE_IMX_LIB_PLATFORM_IMX25_3STACK + default "IMX27ADS" if BR2_PACKAGE_IMX_LIB_PLATFORM_IMX27ADS + default "IMX37_3STACK" if BR2_PACKAGE_IMX_LIB_PLATFORM_IMX37_3STACK + default "IMX50" if BR2_PACKAGE_IMX_LIB_PLATFORM_IMX50 + default "IMX51" if BR2_PACKAGE_IMX_LIB_PLATFORM_IMX51 + default "IMX53" if BR2_PACKAGE_IMX_LIB_PLATFORM_IMX53 + default "IMX6Q" if BR2_PACKAGE_IMX_LIB_PLATFORM_IMX6Q +endif diff --git a/package/freescale-imx/imx-lib/imx-lib.mk b/package/freescale-imx/imx-lib/imx-lib.mk new file mode 100644 index 0000000000..bd7e174d19 --- /dev/null +++ b/package/freescale-imx/imx-lib/imx-lib.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# imx-lib +# +################################################################################ + +IMX_LIB_VERSION = $(FREESCALE_IMX_VERSION) +IMX_LIB_SITE = $(FREESCALE_IMX_MIRROR_SITE) +IMX_LIB_LICENSE = LGPLv2.1+ +# No license file included + +IMX_LIB_INSTALL_STAGING = YES + +# imx-lib needs access to imx-specific kernel headers +IMX_LIB_DEPENDENCIES += linux +IMX_LIB_INCLUDE = \ + -I$(LINUX_DIR)/drivers/mxc/security/rng/include \ + -I$(LINUX_DIR)/drivers/mxc/security/sahara2/include \ + -idirafter $(LINUX_DIR)/include + +IMX_LIB_MAKE_ENV = \ + $(TARGET_MAKE_ENV) \ + $(TARGET_CONFIGURE_OPTS) \ + CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" \ + PLATFORM=$(BR2_PACKAGE_IMX_LIB_PLATFORM) \ + INCLUDE="$(IMX_LIB_INCLUDE)" + +define IMX_LIB_BUILD_CMDS + $(IMX_LIB_MAKE_ENV) $(MAKE1) -C $(@D) +endef + +define IMX_LIB_INSTALL_STAGING_CMDS + $(IMX_LIB_MAKE_ENV) $(MAKE1) -C $(@D) DEST_DIR=$(STAGING_DIR) install +endef + +define IMX_LIB_INSTALL_TARGET_CMDS + $(IMX_LIB_MAKE_ENV) $(MAKE1) -C $(@D) DEST_DIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/freetype/freetype.mk b/package/freetype/freetype.mk index ad4292f935..1e378d3194 100644 --- a/package/freetype/freetype.mk +++ b/package/freetype/freetype.mk @@ -1,35 +1,63 @@ -############################################################# +################################################################################ # # freetype # -############################################################# -FREETYPE_VERSION = 2.4.4 -FREETYPE_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/freetype +################################################################################ + +FREETYPE_VERSION_MAJOR = 2.5.0 +FREETYPE_VERSION_MINOR = 1 +FREETYPE_VERSION = $(FREETYPE_VERSION_MAJOR).$(FREETYPE_VERSION_MINOR) FREETYPE_SOURCE = freetype-$(FREETYPE_VERSION).tar.bz2 +FREETYPE_SITE = http://downloads.sourceforge.net/project/freetype/freetype2/$(FREETYPE_VERSION_MAJOR) FREETYPE_INSTALL_STAGING = YES -FREETYPE_INSTALL_TARGET = YES FREETYPE_MAKE_OPT = CCexe="$(HOSTCC)" -FREETYPE_DEPENDENCIES = host-pkg-config $(if $(BR2_PACKAGE_ZLIB),zlib) +FREETYPE_LICENSE = Dual FTL/GPLv2+ +FREETYPE_LICENSE_FILES = docs/FTL.TXT docs/GPLv2.TXT +FREETYPE_DEPENDENCIES = host-pkgconf +FREETYPE_CONFIG_SCRIPTS = freetype-config -HOST_FREETYPE_DEPENDENCIES = host-pkg-config +HOST_FREETYPE_DEPENDENCIES = host-pkgconf +HOST_FREETYPE_CONF_OPT = --without-zlib --without-bzip2 --without-png -define FREETYPE_FREETYPE_CONFIG_STAGING_FIXUP - $(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g" \ - -e "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" \ - -e "s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include/freetype2\',g" \ - -e "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" \ - $(STAGING_DIR)/usr/bin/freetype-config -endef +ifeq ($(BR2_PACKAGE_ZLIB),y) +FREETYPE_DEPENDENCIES += zlib +FREETYPE_CONF_OPT += --with-zlib +else +FREETYPE_CONF_OPT += --without-zlib +endif -FREETYPE_POST_INSTALL_STAGING_HOOKS += FREETYPE_FREETYPE_CONFIG_STAGING_FIXUP +ifeq ($(BR2_PACKAGE_BZIP2),y) +FREETYPE_DEPENDENCIES += bzip2 +FREETYPE_CONF_OPT += --with-bzip2 +else +FREETYPE_CONF_OPT += --without-bzip2 +endif -define FREETYPE_FREETYPE_CONFIG_TARGET_REMOVE - rm -f $(TARGET_DIR)/usr/bin/freetype-config +ifeq ($(BR2_PACKAGE_LIBPNG),y) +FREETYPE_DEPENDENCIES += libpng +FREETYPE_CONF_OPT += LIBPNG_CFLAGS="`$(STAGING_DIR)/usr/bin/libpng-config --cflags`" \ + LIBPNG_LDFLAGS="`$(STAGING_DIR)/usr/bin/libpng-config --ldflags`" +FREETYPE_LIBPNG_LIBS = "`$(STAGING_DIR)/usr/bin/libpng-config --libs`" +else +FREETYPE_CONF_OPT += --without-png +endif + +# Extra fixing since includedir and libdir are expanded from configure values +define FREETYPE_FIX_CONFIG_FILE + $(SED) 's:^includedir=.*:includedir="$${prefix}/include":' \ + -e 's:^libdir=.*:libdir="$${exec_prefix}/lib":' \ + $(STAGING_DIR)/usr/bin/freetype-config endef +FREETYPE_POST_INSTALL_STAGING_HOOKS += FREETYPE_FIX_CONFIG_FILE -ifneq ($(BR2_HAVE_DEVFILES),y) -FREETYPE_POST_INSTALL_TARGET_HOOKS += FREETYPE_FREETYPE_CONFIG_TARGET_REMOVE -endif +# libpng isn't included in freetype-config & freetype2.pc :-/ +define FREETYPE_FIX_CONFIG_FILE_LIBS + $(SED) "s,^Libs.private:,& $(FREETYPE_LIBPNG_LIBS)," \ + $(STAGING_DIR)/usr/lib/pkgconfig/freetype2.pc + $(SED) "s,-lfreetype,& $(FREETYPE_LIBPNG_LIBS)," \ + $(STAGING_DIR)/usr/bin/freetype-config +endef +FREETYPE_POST_INSTALL_STAGING_HOOKS += FREETYPE_FIX_CONFIG_FILE_LIBS -$(eval $(call AUTOTARGETS,package,freetype)) -$(eval $(call AUTOTARGETS,package,freetype,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/fuse/Config.in b/package/fuse/Config.in deleted file mode 100644 index dffadf8a12..0000000000 --- a/package/fuse/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_LIBFUSE - bool "libfuse" - depends on BR2_LARGEFILE - help - FUSE (Filesystem in UserSpacE) - - http://fuse.sourceforge.net/ - -comment "libfuse requires a toolchain with LARGEFILE support" - depends on !BR2_LARGEFILE diff --git a/package/fuse/libfuse.mk b/package/fuse/libfuse.mk deleted file mode 100644 index 5a86e84b00..0000000000 --- a/package/fuse/libfuse.mk +++ /dev/null @@ -1,32 +0,0 @@ -############################################################# -# -# libfuse -# -############################################################# - -LIBFUSE_VERSION = 2.8.5 -LIBFUSE_SOURCE = fuse-$(LIBFUSE_VERSION).tar.gz -LIBFUSE_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/fuse/ - -LIBFUSE_INSTALL_STAGING = YES -LIBFUSE_CONF_OPT= --program-prefix="" \ - --enable-shared \ - --enable-static \ - --disable-nls \ - --disable-example \ - --disable-kernel-module \ - --enable-lib \ - --enable-util - -define LIBFUSE_INSTALL_TARGET_CMDS - cp -dpf $(STAGING_DIR)/usr/bin/fusermount $(TARGET_DIR)/usr/bin/ - cp -dpf $(STAGING_DIR)/usr/lib/libfuse.so* $(TARGET_DIR)/usr/lib/ -endef - -define LIBFUSE_CLEAN_CMDS - -$(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) uninstall - -$(MAKE) -C $(@D) clean - rm -f $(TARGET_DIR)/usr/bin/fusermount $(TARGET_DIR)/usr/lib/libfuse.so* -endef - -$(eval $(call AUTOTARGETS,package,libfuse)) diff --git a/package/fxload/Config.in b/package/fxload/Config.in new file mode 100644 index 0000000000..ac190f043e --- /dev/null +++ b/package/fxload/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_FXLOAD + bool "fxload" + help + This program is conveniently able to download firmware into FX, FX2, + and FX2LP EZ-USB devices, as well as the original AnchorChips EZ-USB. + It is intended to be invoked by hotplug scripts when the unprogrammed + device appears on the bus. + + http://sourceforge.net/projects/linux-hotplug/ diff --git a/package/fxload/fxload.mk b/package/fxload/fxload.mk new file mode 100644 index 0000000000..26feec36c7 --- /dev/null +++ b/package/fxload/fxload.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# fxload +# +################################################################################ + +FXLOAD_VERSION = 2008_10_13 +FXLOAD_SITE = http://downloads.sourceforge.net/project/linux-hotplug/fxload/$(FXLOAD_VERSION) +FXLOAD_LICENSE = GPLv2+ +FXLOAD_LICENSE_FILES = COPYING + +define FXLOAD_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all +endef + +define FXLOAD_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) prefix=$(TARGET_DIR) -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/gadgetfs-test/Config.in b/package/gadgetfs-test/Config.in index 276ec5402a..c4b77396e3 100644 --- a/package/gadgetfs-test/Config.in +++ b/package/gadgetfs-test/Config.in @@ -1,12 +1,21 @@ config BR2_PACKAGE_GADGETFS_TEST bool "gadgetfs-test" + depends on BR2_TOOLCHAIN_HAS_THREADS help Test program for gadgetfs from linux-usb.org config BR2_PACKAGE_GADGETFS_TEST_USE_AIO bool "use asynchronous i/o" - depends on BR2_PACKAGE_GADGETFS_TEST select BR2_PACKAGE_LIBAIO + depends on BR2_PACKAGE_GADGETFS_TEST + # libaio is available only on few architectures + depends on \ + BR2_arm || BR2_armeb || BR2_avr32 || BR2_i386 || \ + BR2_m68k || BR2_mips || BR2_mipsel || BR2_powerpc || \ + BR2_sparc || BR2_x86_64 help Select this to have gadgetfs-test do asynchronous I/O using the libaio library. + +comment "gadgetfs-test needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/gadgetfs-test/gadgetfs-test.mk b/package/gadgetfs-test/gadgetfs-test.mk index 1464ec1ae1..341ce67035 100644 --- a/package/gadgetfs-test/gadgetfs-test.mk +++ b/package/gadgetfs-test/gadgetfs-test.mk @@ -1,10 +1,11 @@ -############################################################# +################################################################################ # # gadgetfs-test # -############################################################# -GADGETFS_TEST_SOURCE=gadgetfs-test.tar.bz2 -GADGETFS_TEST_SITE=http://avr32linux.org/twiki/pub/Main/GadgetFsTest/ +################################################################################ + +GADGETFS_TEST_SOURCE = gadgetfs-test.tar.bz2 +GADGETFS_TEST_SITE = http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/GadgetFsTest/ GADGETFS_TEST_MAKEOPTS = CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" @@ -29,4 +30,4 @@ define GADGETFS_TEST_CLEAN_CMDS -$(MAKE) -C $(@D) $(GADGETFS_TEST_MAKEOPTS) clean endef -$(eval $(call GENTARGETS,package,gadgetfs-test)) +$(eval $(generic-package)) diff --git a/package/games/doom-wad/doom-wads.mk b/package/games/doom-wad/doom-wads.mk deleted file mode 100644 index bae2420919..0000000000 --- a/package/games/doom-wad/doom-wads.mk +++ /dev/null @@ -1,35 +0,0 @@ -############################################################# -# -# doom-wad -# -############################################################# - -DOOM_WAD_VERSION = 1.8 -DOOM_WAD_SOURCE = doom-$(DOOM_WAD_VERSION).wad.gz -DOOM_WAD_SITE = ftp://ftp.idsoftware.com/idstuff/doom/ -DOOM_WAD_DIR=$(BUILD_DIR)/doom-wad-$(DOOM_WAD_VERSION) - -$(DL_DIR)/$(DOOM_WAD_SOURCE): - $(call DOWNLOAD,$(DOOM_WAD_SITE),$(DOOM_WAD_SOURCE)) - -doom-wad-source: $(DL_DIR)/$(DOOM_WAD_SOURCE) - -$(DOOM_WAD_DIR)/.unpacked: $(DL_DIR)/$(DOOM_WAD_SOURCE) - $(INSTALL) -D $(DL_DIR)/$(DOOM_WAD_SOURCE) $(DOOM_WAD_DIR)/$(DOOM_WAD_SOURCE) - $(ZCAT) $(DOOM_WAD_DIR)/$(DOOM_WAD_SOURCE) > \ - $(DOOM_WAD_DIR)/doom-$(DOOM_WAD_VERSION).wad - touch $@ - -$(TARGET_DIR)/usr/share/games/doom/doom1.wad: $(DOOM_WAD_DIR)/.unpacked - $(INSTALL) -D $(DOOM_WAD_DIR)/doom-$(DOOM_WAD_VERSION).wad $@ - -doom-wad: $(TARGET_DIR)/usr/share/games/doom/doom1.wad - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_DOOM_WAD),y) -TARGETS+=doom-wad -endif diff --git a/package/games/games.mk b/package/games/games.mk deleted file mode 100644 index 5813b441a3..0000000000 --- a/package/games/games.mk +++ /dev/null @@ -1 +0,0 @@ -include package/games/*/*.mk diff --git a/package/games/gnuchess/Config.in b/package/games/gnuchess/Config.in deleted file mode 100644 index cae05cbbbe..0000000000 --- a/package/games/gnuchess/Config.in +++ /dev/null @@ -1,6 +0,0 @@ -config BR2_PACKAGE_GNUCHESS - bool "gnuchess" - help - GNU Chess lets most modern computers play a full game of chess. - - http://ftp.gnu.org/pub/gnu/chess diff --git a/package/games/gnuchess/gnuchess.mk b/package/games/gnuchess/gnuchess.mk deleted file mode 100644 index 8e331a469f..0000000000 --- a/package/games/gnuchess/gnuchess.mk +++ /dev/null @@ -1,13 +0,0 @@ -############################################################# -# -# gnuchess -# -############################################################# -GNUCHESS_VERSION = 5.07 -GNUCHESS_SOURCE = gnuchess-$(GNUCHESS_VERSION).tar.gz -GNUCHESS_SITE = $(BR2_GNU_MIRROR)/chess - -GNUCHESS_DEPENDENCIES = $(if $(BR2_PACKAGE_READLINE),readline) - -$(eval $(call AUTOTARGETS,package/games,gnuchess)) - diff --git a/package/games/rubix/Config.in b/package/games/rubix/Config.in deleted file mode 100644 index 6da8c71dfc..0000000000 --- a/package/games/rubix/Config.in +++ /dev/null @@ -1,7 +0,0 @@ -config BR2_PACKAGE_RUBIX - bool "rubix" - depends on BR2_PACKAGE_XORG7 - help - A 3D rubiks cube game for X - - http://avr32linux.org/twiki/pub/Main/Rubix diff --git a/package/games/rubix/rubix.mk b/package/games/rubix/rubix.mk deleted file mode 100644 index 3440c2313d..0000000000 --- a/package/games/rubix/rubix.mk +++ /dev/null @@ -1,18 +0,0 @@ -############################################################# -# -# rubix -# -############################################################# -RUBIX_VERSION = 1.0.5 -RUBIX_SOURCE = rubix-$(RUBIX_VERSION).tar.bz2 -RUBIX_SITE = http://avr32linux.org/twiki/pub/Main/Rubix -RUBIX_INSTALL_STAGING = NO -RUBIX_INSTALL_TARGET = YES -RUBIX_INSTALL_TARGET_OPT = GAMESDIR=$(TARGET_DIR)/usr/games install - -RUBIX_MAKE_OPT = CC="$(TARGET_CC)" XINC="-I$(STAGING_DIR)/usr/include/X11" XLIB="-L$(STAGING_DIR)/usr/lib -lX11" - -RUBIX_DEPENDENCIES = xserver_xorg-server - -$(eval $(call AUTOTARGETS,package/games,rubix)) - diff --git a/package/gamin/Config.in b/package/gamin/Config.in index 3ede2e4d76..c191be06f6 100644 --- a/package/gamin/Config.in +++ b/package/gamin/Config.in @@ -1,11 +1,14 @@ config BR2_PACKAGE_GAMIN bool "gamin" depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 select BR2_PACKAGE_LIBGLIB2 help the File Alteration Monitor http://www.gnome.org/~veillard/gamin/sources -comment "gamin requires a toolchain with WCHAR support" - depends on !BR2_USE_WCHAR +comment "gamin needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/gamin/gamin-0.1.10-configure.patch b/package/gamin/gamin-0.1.10-configure.patch deleted file mode 100644 index b4e45039e3..0000000000 --- a/package/gamin/gamin-0.1.10-configure.patch +++ /dev/null @@ -1,103 +0,0 @@ ---- a/configure.fixed 2009-08-02 18:00:54.000000000 +0200 -+++ b/configure 2008-11-24 16:23:27.000000000 +0100 -@@ -23581,100 +23581,6 @@ - ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' - ac_compiler_gnu=$ac_cv_c_compiler_gnu - --if test "$cross_compiling" = yes; then -- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot run test program while cross compiling --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --#include --#include --#include --#include --#include --#include --#include -- --int --main () --{ -- -- int listen_fd; -- struct sockaddr_un addr; -- -- listen_fd = socket (PF_UNIX, SOCK_STREAM, 0); -- -- if (listen_fd < 0) -- { -- fprintf (stderr, "socket() failed: %s\n", strerror (errno)); -- exit (1); -- } -- -- memset (&addr, '\0', sizeof (addr)); -- addr.sun_family = AF_UNIX; -- strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test"); -- addr.sun_path[0] = '\0'; /* this is what makes it abstract */ -- -- if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0) -- { -- fprintf (stderr, "Abstract socket namespace bind() failed: %s\n", -- strerror (errno)); -- exit (1); -- } -- else -- exit (0); -- -- ; -- return 0; --} --_ACEOF --rm -f conftest$ac_exeext --if { (ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_link") 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -- (eval "$ac_try") 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- have_abstract_sockets=yes --else -- echo "$as_me: program exited with status $ac_status" >&5 --echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --( exit $ac_status ) --have_abstract_sockets=no --fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext --fi -- -- --ac_ext=c --ac_cpp='$CPP $CPPFLAGS' --ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' --ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' --ac_compiler_gnu=$ac_cv_c_compiler_gnu -- - { echo "$as_me:$LINENO: result: $have_abstract_sockets" >&5 - echo "${ECHO_T}$have_abstract_sockets" >&6; } - diff --git a/package/gamin/gamin-0.1.10-no-abstract-sockets.patch b/package/gamin/gamin-0.1.10-no-abstract-sockets.patch new file mode 100644 index 0000000000..3d659015ec --- /dev/null +++ b/package/gamin/gamin-0.1.10-no-abstract-sockets.patch @@ -0,0 +1,61 @@ +[PATCH]: Remove abstract socket namespace check breaking cross compilation + +Taken from openembedded: + +http://git.openembedded.org/cgit.cgi/openembedded/tree/recipes/gamin/files/no-abstract-sockets.patch + +Signed-off-by: Peter Korsgaard +--- /tmp/configure.in 2007-04-30 13:08:49.000000000 +0200 ++++ gamin-0.1.8/configure.in 2007-04-30 13:10:53.285251000 +0200 +@@ -354,51 +354,6 @@ + AC_DEFINE(HAVE_CMSGCRED,1,[Have cmsgcred structure]) + fi + +-#### Abstract sockets +- +-AC_MSG_CHECKING(abstract socket namespace) +-AC_LANG_PUSH(C) +-AC_RUN_IFELSE([AC_LANG_PROGRAM( +-[[ +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-]], +-[[ +- int listen_fd; +- struct sockaddr_un addr; +- +- listen_fd = socket (PF_UNIX, SOCK_STREAM, 0); +- +- if (listen_fd < 0) +- { +- fprintf (stderr, "socket() failed: %s\n", strerror (errno)); +- exit (1); +- } +- +- memset (&addr, '\0', sizeof (addr)); +- addr.sun_family = AF_UNIX; +- strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test"); +- addr.sun_path[0] = '\0'; /* this is what makes it abstract */ +- +- if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0) +- { +- fprintf (stderr, "Abstract socket namespace bind() failed: %s\n", +- strerror (errno)); +- exit (1); +- } +- else +- exit (0); +-]])], +- [have_abstract_sockets=yes], +- [have_abstract_sockets=no]) +-AC_LANG_POP(C) +-AC_MSG_RESULT($have_abstract_sockets) +- + if test x$enable_abstract_sockets = xyes; then + if test x$have_abstract_sockets = xno; then + AC_MSG_ERROR([Abstract sockets explicitly required, and support not detected.]) diff --git a/package/gamin/gamin-0.1.10-no-const-return.patch b/package/gamin/gamin-0.1.10-no-const-return.patch new file mode 100644 index 0000000000..3e6e905214 --- /dev/null +++ b/package/gamin/gamin-0.1.10-no-const-return.patch @@ -0,0 +1,57 @@ +G_CONST_RETURN is deprecated in glib 2.30 so remove to to avoid +build failures. + +Upstream-Status: Pending + +Index: gamin-0.1.10/server/gam_node.c +=================================================================== +--- gamin-0.1.10.orig/server/gam_node.c 2011-10-12 15:25:45.217178314 +0100 ++++ gamin-0.1.10/server/gam_node.c 2011-10-12 15:26:17.807178293 +0100 +@@ -122,7 +122,7 @@ + * it has finished with the string. If it must keep it longer, it + * should makes its own copy. The returned string must not be freed. + */ +-G_CONST_RETURN char * ++const char * + gam_node_get_path(GamNode * node) + { + g_assert(node); +Index: gamin-0.1.10/server/gam_node.h +=================================================================== +--- gamin-0.1.10.orig/server/gam_node.h 2011-10-12 15:25:46.857178269 +0100 ++++ gamin-0.1.10/server/gam_node.h 2011-10-12 15:26:28.637178297 +0100 +@@ -58,7 +58,7 @@ + void gam_node_set_is_dir (GamNode *node, + gboolean is_dir); + +-G_CONST_RETURN char *gam_node_get_path (GamNode *node); ++const char *gam_node_get_path (GamNode *node); + + GList *gam_node_get_subscriptions (GamNode *node); + +Index: gamin-0.1.10/server/gam_subscription.c +=================================================================== +--- gamin-0.1.10.orig/server/gam_subscription.c 2011-10-12 15:25:40.497177525 +0100 ++++ gamin-0.1.10/server/gam_subscription.c 2011-10-12 15:26:39.867178304 +0100 +@@ -141,7 +141,7 @@ + * @param sub the GamSubscription + * @returns The path being monitored. It should not be freed. + */ +-G_CONST_RETURN char * ++const char * + gam_subscription_get_path(GamSubscription * sub) + { + if (sub == NULL) +Index: gamin-0.1.10/server/gam_subscription.h +=================================================================== +--- gamin-0.1.10.orig/server/gam_subscription.h 2011-10-12 15:25:28.507178266 +0100 ++++ gamin-0.1.10/server/gam_subscription.h 2011-10-12 15:25:58.817178285 +0100 +@@ -21,7 +21,7 @@ + + int gam_subscription_get_reqno (GamSubscription *sub); + +-G_CONST_RETURN char *gam_subscription_get_path (GamSubscription *sub); ++const char *gam_subscription_get_path (GamSubscription *sub); + + GamListener *gam_subscription_get_listener (GamSubscription *sub); + diff --git a/package/gamin/gamin-0.1.9-debug.patch b/package/gamin/gamin-0.1.9-debug.patch deleted file mode 100644 index 14cc0507d7..0000000000 --- a/package/gamin/gamin-0.1.9-debug.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/server/gam_poll_basic.c 2007-07-04 09:46:29.000000000 -0400 -+++ b/server/gam_poll_basic.c 2008-02-13 15:04:57.000000000 -0500 -@@ -343,9 +343,9 @@ gam_poll_basic_poll_file(GamNode * node) - #ifdef VERBOSE_POLL - GAM_DEBUG(DEBUG_INFO, "Poll: poll_file %s unchanged\n", path); - #ifdef ST_MTIM_NSEC -- GAM_DEBUG(DEBUG_INFO, "%d %d : %d %d\n", node->sbuf.st_mtim.tv_sec, node->sbuf.st_mtim.tv_nsec, sbuf.st_mtim.tv_sec, sbuf.st_mtim.tv_nsec); -+// GAM_DEBUG(DEBUG_INFO, "%d %d : %d %d\n", node->sbuf.st_mtim.tv_sec, node->sbuf.st_mtim.tv_nsec, sbuf.st_mtim.tv_sec, sbuf.st_mtim.tv_nsec); - #else -- GAM_DEBUG(DEBUG_INFO, "%d : %d\n", node->sbuf.st_mtime, sbuf.st_mtim.tv_nsec); -+// GAM_DEBUG(DEBUG_INFO, "%d : %d\n", node->sbuf.st_mtime, sbuf.st_mtim.tv_nsec); - #endif /* ST_MTIM_NSEC */ - #endif /* VERBOSE_POLL */ - } diff --git a/package/gamin/gamin.mk b/package/gamin/gamin.mk index f0600b27c4..e3d26fa454 100644 --- a/package/gamin/gamin.mk +++ b/package/gamin/gamin.mk @@ -1,16 +1,16 @@ -############################################################# +################################################################################ # # gamin # -############################################################# +################################################################################ + GAMIN_VERSION = 0.1.10 -GAMIN_SOURCE = gamin-$(GAMIN_VERSION).tar.gz GAMIN_SITE = http://www.gnome.org/~veillard/gamin/sources -GAMIN_AUTORECONF = NO +GAMIN_AUTORECONF = YES GAMIN_INSTALL_STAGING = YES -GAMIN_INSTALL_TARGET = YES - -GAMIN_CONF_OPT = --program-prefix="" --disable-debug +GAMIN_LICENSE = LGPLv2+ +GAMIN_LICENSE_FILES = COPYING +GAMIN_CONF_OPT = --disable-debug # python support broken GAMIN_CONF_OPT += --without-python @@ -23,5 +23,4 @@ endif GAMIN_DEPENDENCIES = libglib2 -$(eval $(call AUTOTARGETS,package,gamin)) - +$(eval $(autotools-package)) diff --git a/package/gawk/Config.in b/package/gawk/Config.in index 62ca860e6e..31b97fadab 100644 --- a/package/gawk/Config.in +++ b/package/gawk/Config.in @@ -1,9 +1,15 @@ config BR2_PACKAGE_GAWK bool "gawk" depends on BR2_USE_WCHAR + depends on BR2_USE_MMU # fork() + depends on !BR2_PREFER_STATIC_LIB help A special-purpose programming language which is data driven rather than procedural. Allows for simple data-reformatting jobs with just a few lines of code. http://www.gnu.org/software/gawk/ + +comment "gawk needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR diff --git a/package/gawk/gawk-01-no-versioned.patch b/package/gawk/gawk-01-no-versioned.patch new file mode 100644 index 0000000000..ff28581eaf --- /dev/null +++ b/package/gawk/gawk-01-no-versioned.patch @@ -0,0 +1,26 @@ +Disabled versioned installation of binaries to save space. +Also use symlinks where it's appropiate. + +Signed-off-by: Gustavo Zacarias +--- + +diff -Nura gawk-4.0.0.orig/Makefile.in gawk-4.0.0/Makefile.in +--- gawk-4.0.0.orig/Makefile.in 2011-06-24 05:16:13.000000000 -0300 ++++ gawk-4.0.0/Makefile.in 2011-11-11 15:31:16.429577288 -0300 +@@ -403,7 +403,7 @@ + MAINTAINERCLEANFILES = version.c + + # We want hard links for install-exec-hook, below +-LN = ln ++LN = $(LN_S) + all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +@@ -1011,6 +1011,7 @@ + # (This is done universally, which may not always be right, but + # there's no easy way to distinguish GNU from non-GNU systems.) + install-exec-hook: ++foo: + (cd $(DESTDIR)$(bindir); \ + $(LN) gawk$(EXEEXT) gawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \ + $(LN) pgawk$(EXEEXT) pgawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \ diff --git a/package/gawk/gawk-no-versioned.patch b/package/gawk/gawk-no-versioned.patch deleted file mode 100644 index 6f74f52847..0000000000 --- a/package/gawk/gawk-no-versioned.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 9cb7ff17dd7f81589f0891413efa5d4aec1a1598 Mon Sep 17 00:00:00 2001 -From: Gustavo Zacarias -Date: Mon, 7 Jun 2010 11:33:50 -0300 -Subject: [PATCH] Disabled versioned installation to save space and use symlinks where it's appropiate - - -Signed-off-by: Gustavo Zacarias ---- - Makefile.in | 3 ++- - doc/Makefile.in | 2 +- - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/Makefile.in b/Makefile.in -index f946ee1..a3d467a 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -392,7 +392,7 @@ CLEANFILES = core core.* - MAINTAINERCLEANFILES = version.c - - # We want hard links for install-exec-hook, below --LN = ln -+LN = $(LN_S) - all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -@@ -993,6 +993,7 @@ uninstall-am: uninstall-binPROGRAMS - # (This is done universally, which may not always be right, but - # there's no easy way to distinguish GNU from non-GNU systems.) - install-exec-hook: -+foo: - (cd $(DESTDIR)$(bindir); \ - $(LN) gawk$(EXEEXT) gawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \ - $(LN) pgawk$(EXEEXT) pgawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \ -diff --git a/doc/Makefile.in b/doc/Makefile.in -index b1533e7..8b91694 100644 ---- a/doc/Makefile.in -+++ b/doc/Makefile.in -@@ -272,7 +272,7 @@ AWKCARD = awkcard.ps - # make pgawk.1 a link to gawk.1 in the installed man directory. - - # We want hard links for install-data-hook, below --LN = ln -+LN = $(LN_S) - all: all-am - - .SUFFIXES: --- -1.6.4.4 - diff --git a/package/gawk/gawk.mk b/package/gawk/gawk.mk index 8a544d8804..af486c4699 100644 --- a/package/gawk/gawk.mk +++ b/package/gawk/gawk.mk @@ -1,12 +1,23 @@ -############################################################# +################################################################################ # # gawk # -############################################################# +################################################################################ -GAWK_VERSION = 3.1.8 +GAWK_VERSION = 4.1.0 +GAWK_SOURCE = gawk-$(GAWK_VERSION).tar.xz GAWK_SITE = $(BR2_GNU_MIRROR)/gawk -GAWK_TARGET_BINS = awk gawk igawk pgawk +GAWK_DEPENDENCIES = host-gawk $(if $(BR2_PACKAGE_MPFR),mpfr) +GAWK_LICENSE = GPLv3+ +GAWK_LICENSE_FILES = COPYING + +# Prefer full-blown gawk over busybox awk +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +GAWK_DEPENDENCIES += busybox +endif + +# We don't have a host-busybox +HOST_GAWK_DEPENDENCIES = define GAWK_CREATE_SYMLINK ln -sf /usr/bin/gawk $(TARGET_DIR)/usr/bin/awk @@ -14,13 +25,13 @@ endef GAWK_POST_INSTALL_TARGET_HOOKS += GAWK_CREATE_SYMLINK -define GAWK_UNINSTALL_TARGET_CMDS - rm -f $(addprefix $(TARGET_DIR)/usr/bin/, $(GAWK_TARGET_BINS)) - rm -f $(TARGET_DIR)/usr/share/info/gawk*.info - rm -f $(TARGET_DIR)/usr/share/man/man*/*gawk.1 - rm -rf $(TARGET_DIR)/usr/libexec/awk - rm -rf $(TARGET_DIR)/usr/share/awk +# Assume we support shared libs +# The check isn't cross-compile friendly and it's mandatory anyway +define GAWK_DISABLE_SHARED_CHECK + $(SED) 's/ check-for-shared-lib-support//' $(@D)/extension/Makefile.in endef -$(eval $(call AUTOTARGETS,package,gawk)) -$(eval $(call AUTOTARGETS,package,gawk,host)) +GAWK_POST_PATCH_HOOKS += GAWK_DISABLE_SHARED_CHECK + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/toolchain/gcc/4.2.2-avr32-2.1.5/1001-gcc-4.2.x-inhibit-libc.patch b/package/gcc/4.2.2-avr32-2.1.5/1001-gcc-4.2.x-inhibit-libc.patch similarity index 100% rename from toolchain/gcc/4.2.2-avr32-2.1.5/1001-gcc-4.2.x-inhibit-libc.patch rename to package/gcc/4.2.2-avr32-2.1.5/1001-gcc-4.2.x-inhibit-libc.patch diff --git a/toolchain/gcc/4.2.2-avr32-2.1.5/903-avr32-fix-removal-of-redundant-cast-operations.patch b/package/gcc/4.2.2-avr32-2.1.5/903-avr32-fix-removal-of-redundant-cast-operations.patch similarity index 100% rename from toolchain/gcc/4.2.2-avr32-2.1.5/903-avr32-fix-removal-of-redundant-cast-operations.patch rename to package/gcc/4.2.2-avr32-2.1.5/903-avr32-fix-removal-of-redundant-cast-operations.patch diff --git a/toolchain/gcc/4.2.2-avr32-2.1.5/904-avr32-fix-conditional-insn-which-clobbers-cc_status.patch b/package/gcc/4.2.2-avr32-2.1.5/904-avr32-fix-conditional-insn-which-clobbers-cc_status.patch similarity index 100% rename from toolchain/gcc/4.2.2-avr32-2.1.5/904-avr32-fix-conditional-insn-which-clobbers-cc_status.patch rename to package/gcc/4.2.2-avr32-2.1.5/904-avr32-fix-conditional-insn-which-clobbers-cc_status.patch diff --git a/toolchain/gcc/4.2.2-avr32-2.1.5/905-avr32-optimize-movsf2-use-movh-to-move-immediates-into-register.patch b/package/gcc/4.2.2-avr32-2.1.5/905-avr32-optimize-movsf2-use-movh-to-move-immediates-into-register.patch similarity index 100% rename from toolchain/gcc/4.2.2-avr32-2.1.5/905-avr32-optimize-movsf2-use-movh-to-move-immediates-into-register.patch rename to package/gcc/4.2.2-avr32-2.1.5/905-avr32-optimize-movsf2-use-movh-to-move-immediates-into-register.patch diff --git a/package/gcc/4.2.2-avr32-2.1.5/990-fix-300-libstdc++-pic.patch b/package/gcc/4.2.2-avr32-2.1.5/990-fix-300-libstdc++-pic.patch new file mode 100644 index 0000000000..a63b3ad233 --- /dev/null +++ b/package/gcc/4.2.2-avr32-2.1.5/990-fix-300-libstdc++-pic.patch @@ -0,0 +1,20 @@ +libstdc++-v3: fix the effects of pre-applied 300-libstdc++-pic.patch + +This version of GCC comes with a number of pre-applied patches, among which is +300-libstdc++-pic.patch that makes a PIC version of libstdc++. The resulting +Makefile.in incorrectly refers to object files that should be insde the library. + +Signed-off-by: Alexander Lukichev + +diff -uNrp host-gcc-final-4.2.2-avr32-2.1.5.orig/libstdc++-v3/src/Makefile.in host-gcc-final-4.2.2-avr32-2.1.5/libstdc++-v3/src/Makefile.in +--- host-gcc-final-4.2.2-avr32-2.1.5.orig/libstdc++-v3/src/Makefile.in 2008-07-04 00:18:42.000000000 +0300 ++++ host-gcc-final-4.2.2-avr32-2.1.5/libstdc++-v3/src/Makefile.in 2013-08-08 16:15:56.201258882 +0300 +@@ -804,7 +804,7 @@ install_debug: + + install-exec-local: + ifeq ($(enable_shared),yes) +- $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o ++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o + $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) + endif + diff --git a/package/gcc/4.3.6/100-uclibc-conf.patch b/package/gcc/4.3.6/100-uclibc-conf.patch new file mode 100644 index 0000000000..6bad179e62 --- /dev/null +++ b/package/gcc/4.3.6/100-uclibc-conf.patch @@ -0,0 +1,13 @@ +--- gcc/gcc/config/--- gcc/contrib/regression/objs-gcc.sh ++++ gcc/contrib/regression/objs-gcc.sh +@@ -105,6 +105,10 @@ + then + make all-gdb all-dejagnu all-ld || exit 1 + make install-gdb install-dejagnu install-ld || exit 1 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] ++ then ++ make all-gdb all-dejagnu all-ld || exit 1 ++ make install-gdb install-dejagnu install-ld || exit 1 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then + make bootstrap || exit 1 + make install || exit 1 diff --git a/toolchain/gcc/4.2.4/104-gnuhurd-uclibc-conf.patch b/package/gcc/4.3.6/104-gnuhurd-uclibc-conf.patch similarity index 100% rename from toolchain/gcc/4.2.4/104-gnuhurd-uclibc-conf.patch rename to package/gcc/4.3.6/104-gnuhurd-uclibc-conf.patch diff --git a/toolchain/gcc/4.2.4/301-missing-execinfo_h.patch b/package/gcc/4.3.6/301-missing-execinfo_h.patch similarity index 100% rename from toolchain/gcc/4.2.4/301-missing-execinfo_h.patch rename to package/gcc/4.3.6/301-missing-execinfo_h.patch diff --git a/toolchain/gcc/4.3.5/302-c99-snprintf.patch b/package/gcc/4.3.6/302-c99-snprintf.patch similarity index 100% rename from toolchain/gcc/4.3.5/302-c99-snprintf.patch rename to package/gcc/4.3.6/302-c99-snprintf.patch diff --git a/toolchain/gcc/4.2.4/305-libmudflap-susv3-legacy.patch b/package/gcc/4.3.6/305-libmudflap-susv3-legacy.patch similarity index 100% rename from toolchain/gcc/4.2.4/305-libmudflap-susv3-legacy.patch rename to package/gcc/4.3.6/305-libmudflap-susv3-legacy.patch diff --git a/toolchain/gcc/4.3.5/810-arm-softfloat-libgcc.patch b/package/gcc/4.3.6/810-arm-softfloat-libgcc.patch similarity index 100% rename from toolchain/gcc/4.3.5/810-arm-softfloat-libgcc.patch rename to package/gcc/4.3.6/810-arm-softfloat-libgcc.patch diff --git a/toolchain/gcc/4.3.5/993-arm_insn-opinit-RTX_CODE-fixup.patch b/package/gcc/4.3.6/993-arm_insn-opinit-RTX_CODE-fixup.patch similarity index 100% rename from toolchain/gcc/4.3.5/993-arm_insn-opinit-RTX_CODE-fixup.patch rename to package/gcc/4.3.6/993-arm_insn-opinit-RTX_CODE-fixup.patch diff --git a/toolchain/gcc/4.3.5/998-gcc-4.3.0-fix-header.00.patch b/package/gcc/4.3.6/998-gcc-4.3.0-fix-header.00.patch similarity index 100% rename from toolchain/gcc/4.3.5/998-gcc-4.3.0-fix-header.00.patch rename to package/gcc/4.3.6/998-gcc-4.3.0-fix-header.00.patch diff --git a/toolchain/gcc/4.3.5/999-4.3.2-armeabi-aapcs-linux.patch b/package/gcc/4.3.6/999-4.3.2-armeabi-aapcs-linux.patch similarity index 100% rename from toolchain/gcc/4.3.5/999-4.3.2-armeabi-aapcs-linux.patch rename to package/gcc/4.3.6/999-4.3.2-armeabi-aapcs-linux.patch diff --git a/toolchain/gcc/4.3.5/999-4.3.3-arm-fix-for-bug-37436.patch b/package/gcc/4.3.6/999-4.3.3-arm-fix-for-bug-37436.patch similarity index 100% rename from toolchain/gcc/4.3.5/999-4.3.3-arm-fix-for-bug-37436.patch rename to package/gcc/4.3.6/999-4.3.3-arm-fix-for-bug-37436.patch diff --git a/toolchain/gcc/4.3.5/999-gcc-4.3.0-cris-pragma-pack-warning-remove.patch b/package/gcc/4.3.6/999-gcc-4.3.0-cris-pragma-pack-warning-remove.patch similarity index 100% rename from toolchain/gcc/4.3.5/999-gcc-4.3.0-cris-pragma-pack-warning-remove.patch rename to package/gcc/4.3.6/999-gcc-4.3.0-cris-pragma-pack-warning-remove.patch diff --git a/package/gcc/4.3.6/gcc-43-pr39429.patch b/package/gcc/4.3.6/gcc-43-pr39429.patch new file mode 100644 index 0000000000..4e1dc9ef73 --- /dev/null +++ b/package/gcc/4.3.6/gcc-43-pr39429.patch @@ -0,0 +1,24 @@ +From: Michael Olbrich +Subject: Fix: compiler create bad asm codes. + +See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39429 for details. + +Signed-off-by: Michael Olbrich + +--- + gcc/config/arm/arm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: b/gcc/config/arm/arm.c +=================================================================== +--- a/gcc/config/arm/arm.c ++++ b/gcc/config/arm/arm.c +@@ -6838,7 +6838,7 @@ adjacent_mem_locations (rtx a, rtx b) + /* Don't accept any offset that will require multiple + instructions to handle, since this would cause the + arith_adjacentmem pattern to output an overlong sequence. */ +- if (!const_ok_for_op (PLUS, val0) || !const_ok_for_op (PLUS, val1)) ++ if (!const_ok_for_op (val0, PLUS) || !const_ok_for_op (val1, PLUS)) + return 0; + + /* Don't allow an eliminable register: register elimination can make diff --git a/toolchain/gcc/4.3.5/powerpc-link-with-math-lib.patch.conditional b/package/gcc/4.3.6/powerpc-link-with-math-lib.patch.conditional similarity index 100% rename from toolchain/gcc/4.3.5/powerpc-link-with-math-lib.patch.conditional rename to package/gcc/4.3.6/powerpc-link-with-math-lib.patch.conditional diff --git a/package/gcc/4.4.7/100-uclibc-conf.patch b/package/gcc/4.4.7/100-uclibc-conf.patch new file mode 100644 index 0000000000..6bad179e62 --- /dev/null +++ b/package/gcc/4.4.7/100-uclibc-conf.patch @@ -0,0 +1,13 @@ +--- gcc/gcc/config/--- gcc/contrib/regression/objs-gcc.sh ++++ gcc/contrib/regression/objs-gcc.sh +@@ -105,6 +105,10 @@ + then + make all-gdb all-dejagnu all-ld || exit 1 + make install-gdb install-dejagnu install-ld || exit 1 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] ++ then ++ make all-gdb all-dejagnu all-ld || exit 1 ++ make install-gdb install-dejagnu install-ld || exit 1 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then + make bootstrap || exit 1 + make install || exit 1 diff --git a/toolchain/gcc/4.3.5/301-missing-execinfo_h.patch b/package/gcc/4.4.7/301-missing-execinfo_h.patch similarity index 100% rename from toolchain/gcc/4.3.5/301-missing-execinfo_h.patch rename to package/gcc/4.4.7/301-missing-execinfo_h.patch diff --git a/toolchain/gcc/4.4.5/302-c99-snprintf.patch b/package/gcc/4.4.7/302-c99-snprintf.patch similarity index 100% rename from toolchain/gcc/4.4.5/302-c99-snprintf.patch rename to package/gcc/4.4.7/302-c99-snprintf.patch diff --git a/toolchain/gcc/4.3.5/305-libmudflap-susv3-legacy.patch b/package/gcc/4.4.7/305-libmudflap-susv3-legacy.patch similarity index 100% rename from toolchain/gcc/4.3.5/305-libmudflap-susv3-legacy.patch rename to package/gcc/4.4.7/305-libmudflap-susv3-legacy.patch diff --git a/toolchain/gcc/4.4.5/810-arm-softfloat-libgcc.patch b/package/gcc/4.4.7/810-arm-softfloat-libgcc.patch similarity index 100% rename from toolchain/gcc/4.4.5/810-arm-softfloat-libgcc.patch rename to package/gcc/4.4.7/810-arm-softfloat-libgcc.patch diff --git a/toolchain/gcc/4.4.5/950-sparc-leon.patch b/package/gcc/4.4.7/950-sparc-leon.patch similarity index 100% rename from toolchain/gcc/4.4.5/950-sparc-leon.patch rename to package/gcc/4.4.7/950-sparc-leon.patch diff --git a/package/gcc/4.4.7/gcc-44-pr39429.patch b/package/gcc/4.4.7/gcc-44-pr39429.patch new file mode 100644 index 0000000000..4e1dc9ef73 --- /dev/null +++ b/package/gcc/4.4.7/gcc-44-pr39429.patch @@ -0,0 +1,24 @@ +From: Michael Olbrich +Subject: Fix: compiler create bad asm codes. + +See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39429 for details. + +Signed-off-by: Michael Olbrich + +--- + gcc/config/arm/arm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: b/gcc/config/arm/arm.c +=================================================================== +--- a/gcc/config/arm/arm.c ++++ b/gcc/config/arm/arm.c +@@ -6838,7 +6838,7 @@ adjacent_mem_locations (rtx a, rtx b) + /* Don't accept any offset that will require multiple + instructions to handle, since this would cause the + arith_adjacentmem pattern to output an overlong sequence. */ +- if (!const_ok_for_op (PLUS, val0) || !const_ok_for_op (PLUS, val1)) ++ if (!const_ok_for_op (val0, PLUS) || !const_ok_for_op (val1, PLUS)) + return 0; + + /* Don't allow an eliminable register: register elimination can make diff --git a/toolchain/gcc/4.4.5/powerpc-link-with-math-lib.patch.conditional b/package/gcc/4.4.7/powerpc-link-with-math-lib.patch.conditional similarity index 100% rename from toolchain/gcc/4.4.5/powerpc-link-with-math-lib.patch.conditional rename to package/gcc/4.4.7/powerpc-link-with-math-lib.patch.conditional diff --git a/package/gcc/4.5.4/100-uclibc-conf.patch b/package/gcc/4.5.4/100-uclibc-conf.patch new file mode 100644 index 0000000000..6bad179e62 --- /dev/null +++ b/package/gcc/4.5.4/100-uclibc-conf.patch @@ -0,0 +1,13 @@ +--- gcc/gcc/config/--- gcc/contrib/regression/objs-gcc.sh ++++ gcc/contrib/regression/objs-gcc.sh +@@ -105,6 +105,10 @@ + then + make all-gdb all-dejagnu all-ld || exit 1 + make install-gdb install-dejagnu install-ld || exit 1 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] ++ then ++ make all-gdb all-dejagnu all-ld || exit 1 ++ make install-gdb install-dejagnu install-ld || exit 1 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then + make bootstrap || exit 1 + make install || exit 1 diff --git a/toolchain/gcc/4.4.5/301-missing-execinfo_h.patch b/package/gcc/4.5.4/301-missing-execinfo_h.patch similarity index 100% rename from toolchain/gcc/4.4.5/301-missing-execinfo_h.patch rename to package/gcc/4.5.4/301-missing-execinfo_h.patch diff --git a/toolchain/gcc/4.5.2/302-c99-snprintf.patch b/package/gcc/4.5.4/302-c99-snprintf.patch similarity index 100% rename from toolchain/gcc/4.5.2/302-c99-snprintf.patch rename to package/gcc/4.5.4/302-c99-snprintf.patch diff --git a/toolchain/gcc/4.4.5/305-libmudflap-susv3-legacy.patch b/package/gcc/4.5.4/305-libmudflap-susv3-legacy.patch similarity index 100% rename from toolchain/gcc/4.4.5/305-libmudflap-susv3-legacy.patch rename to package/gcc/4.5.4/305-libmudflap-susv3-legacy.patch diff --git a/toolchain/gcc/4.5.2/810-arm-softfloat-libgcc.patch b/package/gcc/4.5.4/810-arm-softfloat-libgcc.patch similarity index 100% rename from toolchain/gcc/4.5.2/810-arm-softfloat-libgcc.patch rename to package/gcc/4.5.4/810-arm-softfloat-libgcc.patch diff --git a/toolchain/gcc/4.5.2/820-arm-unbreak-armv4t.patch b/package/gcc/4.5.4/820-arm-unbreak-armv4t.patch similarity index 100% rename from toolchain/gcc/4.5.2/820-arm-unbreak-armv4t.patch rename to package/gcc/4.5.4/820-arm-unbreak-armv4t.patch diff --git a/toolchain/gcc/4.5.2/830-arm-pr43440.patch b/package/gcc/4.5.4/830-arm-pr43440.patch similarity index 100% rename from toolchain/gcc/4.5.2/830-arm-pr43440.patch rename to package/gcc/4.5.4/830-arm-pr43440.patch diff --git a/toolchain/gcc/4.5.2/powerpc-link-with-math-lib.patch.conditional b/package/gcc/4.5.4/powerpc-link-with-math-lib.patch.conditional similarity index 100% rename from toolchain/gcc/4.5.2/powerpc-link-with-math-lib.patch.conditional rename to package/gcc/4.5.4/powerpc-link-with-math-lib.patch.conditional diff --git a/package/gcc/4.6.4/100-uclibc-conf.patch b/package/gcc/4.6.4/100-uclibc-conf.patch new file mode 100644 index 0000000000..6bad179e62 --- /dev/null +++ b/package/gcc/4.6.4/100-uclibc-conf.patch @@ -0,0 +1,13 @@ +--- gcc/gcc/config/--- gcc/contrib/regression/objs-gcc.sh ++++ gcc/contrib/regression/objs-gcc.sh +@@ -105,6 +105,10 @@ + then + make all-gdb all-dejagnu all-ld || exit 1 + make install-gdb install-dejagnu install-ld || exit 1 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] ++ then ++ make all-gdb all-dejagnu all-ld || exit 1 ++ make install-gdb install-dejagnu install-ld || exit 1 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then + make bootstrap || exit 1 + make install || exit 1 diff --git a/toolchain/gcc/4.5.2/301-missing-execinfo_h.patch b/package/gcc/4.6.4/301-missing-execinfo_h.patch similarity index 100% rename from toolchain/gcc/4.5.2/301-missing-execinfo_h.patch rename to package/gcc/4.6.4/301-missing-execinfo_h.patch diff --git a/package/gcc/4.6.4/302-c99-snprintf.patch b/package/gcc/4.6.4/302-c99-snprintf.patch new file mode 100644 index 0000000000..ba51a0e1d4 --- /dev/null +++ b/package/gcc/4.6.4/302-c99-snprintf.patch @@ -0,0 +1,13 @@ +Index: gcc-4.3.0/libstdc++-v3/include/c_global/cstdio +=================================================================== +--- gcc-4.3.0/libstdc++-v3/include/c_global/cstdio (revision 129202) ++++ gcc-4.3.0/libstdc++-v3/include/c_global/cstdio (working copy) +@@ -144,7 +144,7 @@ + + _GLIBCXX_END_NAMESPACE + +-#if _GLIBCXX_USE_C99 ++#if _GLIBCXX_USE_C99 || defined __UCLIBC__ + + #undef snprintf + #undef vfscanf diff --git a/toolchain/gcc/4.5.2/305-libmudflap-susv3-legacy.patch b/package/gcc/4.6.4/305-libmudflap-susv3-legacy.patch similarity index 100% rename from toolchain/gcc/4.5.2/305-libmudflap-susv3-legacy.patch rename to package/gcc/4.6.4/305-libmudflap-susv3-legacy.patch diff --git a/package/gcc/4.6.4/810-arm-softfloat-libgcc.patch b/package/gcc/4.6.4/810-arm-softfloat-libgcc.patch new file mode 100644 index 0000000000..e6a30a3f00 --- /dev/null +++ b/package/gcc/4.6.4/810-arm-softfloat-libgcc.patch @@ -0,0 +1,38 @@ +[PATCH] add the correct symbols to libgcc for uclibc arm softfloat + +Signed-off-by: Peter Korsgaard +--- + gcc/config/arm/linux-elf.h | 2 +- + gcc/config/arm/t-linux | 6 +++++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +Index: gcc-4.4.0/gcc/config/arm/t-linux +=================================================================== +--- gcc-4.4.0.orig/gcc/config/arm/t-linux ++++ gcc-4.4.0/gcc/config/arm/t-linux +@@ -4,7 +4,11 @@ + + LIB1ASMSRC = arm/lib1funcs.asm + LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ +- _arm_addsubdf3 _arm_addsubsf3 ++ _arm_addsubdf3 _arm_addsubsf3 \ ++ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ ++ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ ++ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ ++ _arm_fixsfsi _arm_fixunssfsi + + # MULTILIB_OPTIONS = mhard-float/msoft-float + # MULTILIB_DIRNAMES = hard-float soft-float +Index: gcc-4.4.0/gcc/config/arm/linux-elf.h +=================================================================== +--- gcc-4.4.0.orig/gcc/config/arm/linux-elf.h ++++ gcc-4.4.0/gcc/config/arm/linux-elf.h +@@ -60,7 +60,7 @@ + %{shared:-lc} \ + %{!shared:%{profile:-lc_p}%{!profile:-lc}}" + +-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc" ++#define LIBGCC_SPEC "-lgcc" + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + diff --git a/package/gcc/4.6.4/820-arm-unbreak-armv4t.patch b/package/gcc/4.6.4/820-arm-unbreak-armv4t.patch new file mode 100644 index 0000000000..8651afcd86 --- /dev/null +++ b/package/gcc/4.6.4/820-arm-unbreak-armv4t.patch @@ -0,0 +1,14 @@ +http://sourceware.org/ml/crossgcc/2008-05/msg00009.html + +diff -Nura gcc-4.5.1.orig/gcc/config/arm/linux-eabi.h gcc-4.5.1/gcc/config/arm/linux-eabi.h +--- gcc-4.5.1.orig/gcc/config/arm/linux-eabi.h 2009-10-30 17:03:09.000000000 -0300 ++++ gcc-4.5.1/gcc/config/arm/linux-eabi.h 2010-11-02 15:38:25.792208500 -0300 +@@ -44,7 +44,7 @@ + The ARM10TDMI core is the default for armv5t, so set + SUBTARGET_CPU_DEFAULT to achieve this. */ + #undef SUBTARGET_CPU_DEFAULT +-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi + + /* TARGET_BIG_ENDIAN_DEFAULT is set in + config.gcc for big endian configurations. */ diff --git a/package/gcc/4.6.4/powerpc-link-with-math-lib.patch.conditional b/package/gcc/4.6.4/powerpc-link-with-math-lib.patch.conditional new file mode 100644 index 0000000000..7e75e87f23 --- /dev/null +++ b/package/gcc/4.6.4/powerpc-link-with-math-lib.patch.conditional @@ -0,0 +1,125 @@ +http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00269.html + +On glibc the libc.so carries a copy of the math function copysignl() but +on uClibc math functions like copysignl() live in libm. Since libgcc_s +contains unresolved symbols, any attempt to link against libgcc_s +without explicitely specifying -lm fails, resulting in a broken +bootstrap of the compiler. + +Forward port to gcc 4.5.1 by Gustavo Zacarias + +diff -Nura gcc-4.5.1.orig/gcc/config/t-slibgcc-elf-ver gcc-4.5.1/gcc/config/t-slibgcc-elf-ver +--- gcc-4.5.1.orig/gcc/config/t-slibgcc-elf-ver 2010-11-03 14:35:08.644904042 -0300 ++++ gcc-4.5.1/gcc/config/t-slibgcc-elf-ver 2010-11-03 14:35:56.332904024 -0300 +@@ -27,7 +27,7 @@ + SHLIB_OBJS = @shlib_objs@ + SHLIB_DIR = @multilib_dir@ + SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@ +-SHLIB_LC = -lc ++SHLIB_LC = @libgcc_libm@ -lc + SHLIB_MAKE_SOLINK = $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK) + SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \ + $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK) +diff -Nura gcc-4.5.1.orig/libgcc/Makefile.in gcc-4.5.1/libgcc/Makefile.in +--- gcc-4.5.1.orig/libgcc/Makefile.in 2010-11-03 14:32:44.272904042 -0300 ++++ gcc-4.5.1/libgcc/Makefile.in 2010-11-03 14:37:03.893904042 -0300 +@@ -39,6 +39,7 @@ + decimal_float = @decimal_float@ + enable_decimal_float = @enable_decimal_float@ + fixed_point = @fixed_point@ ++LIBGCC_LIBM = @LIBGCC_LIBM@ + + host_noncanonical = @host_noncanonical@ + +@@ -798,9 +799,10 @@ + @multilib_dir@,$(MULTIDIR),$(subst \ + @shlib_objs@,$(objects),$(subst \ + @shlib_base_name@,libgcc_s,$(subst \ ++ @libgcc_libm@,$(LIBGCC_LIBM),$(subst \ + @shlib_map_file@,$(mapfile),$(subst \ + @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \ +- @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK)))))))) ++ @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK))))))))) + + libunwind$(SHLIB_EXT): $(libunwind-s-objects) $(extra-parts) + # @multilib_flags@ is still needed because this may use +diff -Nura gcc-4.5.1.orig/libgcc/configure gcc-4.5.1/libgcc/configure +--- gcc-4.5.1.orig/libgcc/configure 2010-11-03 14:32:44.283904042 -0300 ++++ gcc-4.5.1/libgcc/configure 2010-11-03 14:39:48.685904042 -0300 +@@ -557,6 +557,7 @@ + extra_parts + tmake_file + set_use_emutls ++LIBGCC_LIBM + set_have_cc_tls + vis_hide + fixed_point +@@ -3847,6 +3848,37 @@ + set_use_emutls="-DUSE_EMUTLS" + fi + ++# On powerpc libgcc_s references copysignl which is a libm function but ++# glibc apparently also provides it via libc as opposed to uClibc where ++# it lives in libm. ++echo "$as_me:$LINENO: checking for library containing copysignl" >&5 ++echo $ECHO_N "checking for library containing copysignl... $ECHO_C" >&6 ++if test "${libgcc_cv_copysignl_lib+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ++ echo '#include ' > conftest.c ++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c ++ libgcc_cv_copysignl_lib="-lc" ++ if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } ++ then ++ libgcc_cv_copysignl_lib="-lm" ++ fi ++ rm -f conftest.* ++ ++fi ++echo "$as_me:$LINENO: result: $libgcc_cv_copysignl_lib" >&5 ++echo "${ECHO_T}$libgcc_cv_copysignl_lib" >&6 ++ ++case /${libgcc_cv_copysignl_lib}/ in ++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;; ++ *) LIBGCC_LIBM= ;; ++esac + + # Conditionalize the makefile for this target machine. + tmake_file_= +diff -Nura gcc-4.5.1.orig/libgcc/configure.ac gcc-4.5.1/libgcc/configure.ac +--- gcc-4.5.1.orig/libgcc/configure.ac 2010-11-03 14:32:44.735904042 -0300 ++++ gcc-4.5.1/libgcc/configure.ac 2010-11-03 14:42:11.278904045 -0300 +@@ -238,6 +238,27 @@ + fi + AC_SUBST(set_have_cc_tls) + ++# On powerpc libgcc_s references copysignl which is a libm function but ++# glibc apparently also provides it via libc as opposed to uClibc where ++# it lives in libm. ++AC_CACHE_CHECK ++ libgcc_cv_copysignl_lib, ++ echo '#include ' > conftest.c ++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c ++ libgcc_cv_copysignl_lib="-lc" ++ if AC_TRY_COMMAND(${CC-cc} -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD) ++ then ++ libgcc_cv_copysignl_lib="-lm" ++ fi ++ rm -f conftest.* ++ ]) ++ ++case /${libgcc_cv_copysignl_lib}/ in ++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;; ++ *) LIBGCC_LIBM= ;; ++esac ++AC_SUBST(LIBGCC_LIBM) ++ + # See if we have emulated thread-local storage. + GCC_CHECK_EMUTLS + set_use_emutls= diff --git a/package/gcc/4.7.3/100-uclibc-conf.patch b/package/gcc/4.7.3/100-uclibc-conf.patch new file mode 100644 index 0000000000..6bad179e62 --- /dev/null +++ b/package/gcc/4.7.3/100-uclibc-conf.patch @@ -0,0 +1,13 @@ +--- gcc/gcc/config/--- gcc/contrib/regression/objs-gcc.sh ++++ gcc/contrib/regression/objs-gcc.sh +@@ -105,6 +105,10 @@ + then + make all-gdb all-dejagnu all-ld || exit 1 + make install-gdb install-dejagnu install-ld || exit 1 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] ++ then ++ make all-gdb all-dejagnu all-ld || exit 1 ++ make install-gdb install-dejagnu install-ld || exit 1 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then + make bootstrap || exit 1 + make install || exit 1 diff --git a/package/gcc/4.7.3/301-missing-execinfo_h.patch b/package/gcc/4.7.3/301-missing-execinfo_h.patch new file mode 100644 index 0000000000..0e2092f3fb --- /dev/null +++ b/package/gcc/4.7.3/301-missing-execinfo_h.patch @@ -0,0 +1,11 @@ +--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500 ++++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500 +@@ -500,7 +500,7 @@ + #ifdef __linux__ + # include + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ +- && !defined(__ia64__) ++ && !defined(__ia64__) && !defined(__UCLIBC__) + # ifndef GC_HAVE_BUILTIN_BACKTRACE + # define GC_HAVE_BUILTIN_BACKTRACE + # endif diff --git a/package/gcc/4.7.3/302-c99-snprintf.patch b/package/gcc/4.7.3/302-c99-snprintf.patch new file mode 100644 index 0000000000..ba51a0e1d4 --- /dev/null +++ b/package/gcc/4.7.3/302-c99-snprintf.patch @@ -0,0 +1,13 @@ +Index: gcc-4.3.0/libstdc++-v3/include/c_global/cstdio +=================================================================== +--- gcc-4.3.0/libstdc++-v3/include/c_global/cstdio (revision 129202) ++++ gcc-4.3.0/libstdc++-v3/include/c_global/cstdio (working copy) +@@ -144,7 +144,7 @@ + + _GLIBCXX_END_NAMESPACE + +-#if _GLIBCXX_USE_C99 ++#if _GLIBCXX_USE_C99 || defined __UCLIBC__ + + #undef snprintf + #undef vfscanf diff --git a/package/gcc/4.7.3/305-libmudflap-susv3-legacy.patch b/package/gcc/4.7.3/305-libmudflap-susv3-legacy.patch new file mode 100644 index 0000000000..374b1f8659 --- /dev/null +++ b/package/gcc/4.7.3/305-libmudflap-susv3-legacy.patch @@ -0,0 +1,49 @@ +Index: gcc-4.2/libmudflap/mf-hooks2.c +=================================================================== +--- gcc-4.2/libmudflap/mf-hooks2.c (revision 119834) ++++ gcc-4.2/libmudflap/mf-hooks2.c (working copy) +@@ -427,7 +427,7 @@ + { + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region"); +- bzero (s, n); ++ memset (s, 0, n); + } + + +@@ -437,7 +437,7 @@ + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src"); + MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest"); +- bcopy (src, dest, n); ++ memmove (dest, src, n); + } + + +@@ -447,7 +447,7 @@ + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg"); + MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg"); +- return bcmp (s1, s2, n); ++ return n == 0 ? 0 : memcmp (s1, s2, n); + } + + +@@ -456,7 +456,7 @@ + size_t n = strlen (s); + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region"); +- return index (s, c); ++ return strchr (s, c); + } + + +@@ -465,7 +465,7 @@ + size_t n = strlen (s); + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region"); +- return rindex (s, c); ++ return strrchr (s, c); + } + + /* XXX: stpcpy, memccpy */ diff --git a/package/gcc/4.7.3/810-arm-softfloat-libgcc.patch b/package/gcc/4.7.3/810-arm-softfloat-libgcc.patch new file mode 100644 index 0000000000..a3d7db014d --- /dev/null +++ b/package/gcc/4.7.3/810-arm-softfloat-libgcc.patch @@ -0,0 +1,25 @@ +--- a/gcc/config/arm/linux-elf.h ++++ b/gcc/config/arm/linux-elf.h +@@ -57,7 +57,7 @@ + %{shared:-lc} \ + %{!shared:%{profile:-lc_p}%{!profile:-lc}}" + +-#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" ++#define LIBGCC_SPEC "-lgcc" + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + +--- a/libgcc/config/arm/t-linux ++++ b/libgcc/config/arm/t-linux +@@ -1,6 +1,10 @@ + LIB1ASMSRC = arm/lib1funcs.S + LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ +- _arm_addsubdf3 _arm_addsubsf3 ++ _arm_addsubdf3 _arm_addsubsf3 \ ++ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ ++ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ ++ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ ++ _arm_fixsfsi _arm_fixunssfsi + + # Just for these, we omit the frame pointer since it makes such a big + # difference. diff --git a/package/gcc/4.7.3/830-arm_unbreak_armv4t.patch b/package/gcc/4.7.3/830-arm_unbreak_armv4t.patch new file mode 100644 index 0000000000..37f8f2a54d --- /dev/null +++ b/package/gcc/4.7.3/830-arm_unbreak_armv4t.patch @@ -0,0 +1,13 @@ +http://sourceware.org/ml/crossgcc/2008-05/msg00009.html + +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -45,7 +45,7 @@ + The ARM10TDMI core is the default for armv5t, so set + SUBTARGET_CPU_DEFAULT to achieve this. */ + #undef SUBTARGET_CPU_DEFAULT +-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi + + /* TARGET_BIG_ENDIAN_DEFAULT is set in + config.gcc for big endian configurations. */ diff --git a/package/gcc/4.7.3/powerpc-link-with-math-lib.patch.conditional b/package/gcc/4.7.3/powerpc-link-with-math-lib.patch.conditional new file mode 100644 index 0000000000..2554263a00 --- /dev/null +++ b/package/gcc/4.7.3/powerpc-link-with-math-lib.patch.conditional @@ -0,0 +1,127 @@ +http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00269.html + +On glibc the libc.so carries a copy of the math function copysignl() but +on uClibc math functions like copysignl() live in libm. Since libgcc_s +contains unresolved symbols, any attempt to link against libgcc_s +without explicitely specifying -lm fails, resulting in a broken +bootstrap of the compiler. + +Forward ported to gcc 4.7.3 + +Signed-off-by: Gustavo Zacarias + +diff -Nura gcc-4.7.3.orig/libgcc/config/t-slibgcc gcc-4.7.3/libgcc/config/t-slibgcc +--- gcc-4.7.3.orig/libgcc/config/t-slibgcc 2013-04-11 15:23:46.491571116 -0300 ++++ gcc-4.7.3/libgcc/config/t-slibgcc 2013-04-11 15:25:06.241141824 -0300 +@@ -27,7 +27,7 @@ + SHLIB_OBJS = @shlib_objs@ + SHLIB_DIR = @multilib_dir@ + SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@ +-SHLIB_LC = -lc ++SHLIB_LC = @libgcc_libm@ -lc + SHLIB_MAKE_SOLINK = $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK) + SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \ + $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK) +diff -Nura gcc-4.7.3.orig/libgcc/configure gcc-4.7.3/libgcc/configure +--- gcc-4.7.3.orig/libgcc/configure 2013-04-11 15:23:46.551573051 -0300 ++++ gcc-4.7.3/libgcc/configure 2013-04-11 15:25:06.243141875 -0300 +@@ -563,6 +563,7 @@ + tmake_file + sfp_machine_header + set_use_emutls ++LIBGCC_LIBM + set_have_cc_tls + vis_hide + fixed_point +@@ -4445,6 +4446,37 @@ + fi + fi + ++# On powerpc libgcc_s references copysignl which is a libm function but ++# glibc apparently also provides it via libc as opposed to uClibc where ++# it lives in libm. ++echo "$as_me:$LINENO: checking for library containing copysignl" >&5 ++echo $ECHO_N "checking for library containing copysignl... $ECHO_C" >&6 ++if test "${libgcc_cv_copysignl_lib+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ++ echo '#include ' > conftest.c ++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c ++ libgcc_cv_copysignl_lib="-lc" ++ if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } ++ then ++ libgcc_cv_copysignl_lib="-lm" ++ fi ++ rm -f conftest.* ++ ++fi ++echo "$as_me:$LINENO: result: $libgcc_cv_copysignl_lib" >&5 ++echo "${ECHO_T}$libgcc_cv_copysignl_lib" >&6 ++ ++case /${libgcc_cv_copysignl_lib}/ in ++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;; ++ *) LIBGCC_LIBM= ;; ++esac + + # Conditionalize the makefile for this target machine. + tmake_file_= +diff -Nura gcc-4.7.3.orig/libgcc/configure.ac gcc-4.7.3/libgcc/configure.ac +--- gcc-4.7.3.orig/libgcc/configure.ac 2013-04-11 15:23:46.551573051 -0300 ++++ gcc-4.7.3/libgcc/configure.ac 2013-04-11 15:25:06.244141901 -0300 +@@ -324,6 +324,27 @@ + fi + AC_SUBST(set_have_cc_tls) + ++# On powerpc libgcc_s references copysignl which is a libm function but ++# glibc apparently also provides it via libc as opposed to uClibc where ++# it lives in libm. ++AC_CACHE_CHECK ++ libgcc_cv_copysignl_lib, ++ echo '#include ' > conftest.c ++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c ++ libgcc_cv_copysignl_lib="-lc" ++ if AC_TRY_COMMAND(${CC-cc} -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD) ++ then ++ libgcc_cv_copysignl_lib="-lm" ++ fi ++ rm -f conftest.* ++ ]) ++ ++case /${libgcc_cv_copysignl_lib}/ in ++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;; ++ *) LIBGCC_LIBM= ;; ++esac ++AC_SUBST(LIBGCC_LIBM) ++ + # See if we have emulated thread-local storage. + GCC_CHECK_EMUTLS + set_use_emutls= +diff -Nura gcc-4.7.3.orig/libgcc/Makefile.in gcc-4.7.3/libgcc/Makefile.in +--- gcc-4.7.3.orig/libgcc/Makefile.in 2013-04-11 15:23:46.537572599 -0300 ++++ gcc-4.7.3/libgcc/Makefile.in 2013-04-11 15:25:06.241141824 -0300 +@@ -41,6 +41,7 @@ + decimal_float = @decimal_float@ + enable_decimal_float = @enable_decimal_float@ + fixed_point = @fixed_point@ ++LIBGCC_LIBM = @LIBGCC_LIBM@ + + host_noncanonical = @host_noncanonical@ + target_noncanonical = @target_noncanonical@ +@@ -928,9 +929,10 @@ + @multilib_dir@,$(MULTIDIR),$(subst \ + @shlib_objs@,$(objects) libgcc.a,$(subst \ + @shlib_base_name@,libgcc_s,$(subst \ ++ @libgcc_libm@,$(LIBGCC_LIBM),$(subst \ + @shlib_map_file@,$(mapfile),$(subst \ + @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \ +- @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK)))))))) ++ @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK))))))))) + + libunwind$(SHLIB_EXT): $(libunwind-s-objects) $(extra-parts) + # @multilib_flags@ is still needed because this may use diff --git a/package/gcc/4.8-arc/100-uclibc-conf.patch b/package/gcc/4.8-arc/100-uclibc-conf.patch new file mode 100644 index 0000000000..d56bf0a194 --- /dev/null +++ b/package/gcc/4.8-arc/100-uclibc-conf.patch @@ -0,0 +1,15 @@ +Index: gcc-4.8.0/contrib/regression/objs-gcc.sh +=================================================================== +--- gcc-4.8.0.orig/contrib/regression/objs-gcc.sh 2009-04-09 17:00:19.000000000 +0200 ++++ gcc-4.8.0/contrib/regression/objs-gcc.sh 2013-03-23 17:39:04.000000000 +0100 +@@ -106,6 +106,10 @@ + then + make all-gdb all-dejagnu all-ld || exit 1 + make install-gdb install-dejagnu install-ld || exit 1 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] ++ then ++ make all-gdb all-dejagnu all-ld || exit 1 ++ make install-gdb install-dejagnu install-ld || exit 1 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then + make bootstrap || exit 1 + make install || exit 1 diff --git a/package/gcc/4.8-arc/301-missing-execinfo_h.patch b/package/gcc/4.8-arc/301-missing-execinfo_h.patch new file mode 100644 index 0000000000..00efda24aa --- /dev/null +++ b/package/gcc/4.8-arc/301-missing-execinfo_h.patch @@ -0,0 +1,13 @@ +Index: gcc-4.8.0/boehm-gc/include/gc.h +=================================================================== +--- gcc-4.8.0.orig/boehm-gc/include/gc.h 2007-04-23 23:10:09.000000000 +0200 ++++ gcc-4.8.0/boehm-gc/include/gc.h 2013-03-23 17:39:20.000000000 +0100 +@@ -503,7 +503,7 @@ + #if defined(__linux__) || defined(__GLIBC__) + # include + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ +- && !defined(__ia64__) ++ && !defined(__ia64__) && !defined(__UCLIBC__) + # ifndef GC_HAVE_BUILTIN_BACKTRACE + # define GC_HAVE_BUILTIN_BACKTRACE + # endif diff --git a/package/gcc/4.8-arc/302-c99-snprintf.patch b/package/gcc/4.8-arc/302-c99-snprintf.patch new file mode 100644 index 0000000000..cd4d2ccfb6 --- /dev/null +++ b/package/gcc/4.8-arc/302-c99-snprintf.patch @@ -0,0 +1,13 @@ +Index: gcc-4.8.0/libstdc++-v3/include/c_global/cstdio +=================================================================== +--- gcc-4.8.0.orig/libstdc++-v3/include/c_global/cstdio 2013-02-03 18:54:05.000000000 +0100 ++++ gcc-4.8.0/libstdc++-v3/include/c_global/cstdio 2013-03-23 17:39:32.000000000 +0100 +@@ -138,7 +138,7 @@ + using ::vsprintf; + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if _GLIBCXX_USE_C99 || defined __UCLIBC__ + + #undef snprintf + #undef vfscanf diff --git a/package/gcc/4.8-arc/305-libmudflap-susv3-legacy.patch b/package/gcc/4.8-arc/305-libmudflap-susv3-legacy.patch new file mode 100644 index 0000000000..35d5f50207 --- /dev/null +++ b/package/gcc/4.8-arc/305-libmudflap-susv3-legacy.patch @@ -0,0 +1,49 @@ +Index: gcc-4.8.0/libmudflap/mf-hooks2.c +=================================================================== +--- gcc-4.8.0.orig/libmudflap/mf-hooks2.c 2013-02-03 18:48:05.000000000 +0100 ++++ gcc-4.8.0/libmudflap/mf-hooks2.c 2013-03-23 17:39:43.000000000 +0100 +@@ -424,7 +424,7 @@ + { + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region"); +- bzero (s, n); ++ memset (s, 0, n); + } + + +@@ -434,7 +434,7 @@ + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src"); + MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest"); +- bcopy (src, dest, n); ++ memmove (dest, src, n); + } + + +@@ -444,7 +444,7 @@ + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg"); + MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg"); +- return bcmp (s1, s2, n); ++ return n == 0 ? 0 : memcmp (s1, s2, n); + } + + +@@ -453,7 +453,7 @@ + size_t n = strlen (s); + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region"); +- return index (s, c); ++ return strchr (s, c); + } + + +@@ -462,7 +462,7 @@ + size_t n = strlen (s); + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region"); +- return rindex (s, c); ++ return strrchr (s, c); + } + + /* XXX: stpcpy, memccpy */ diff --git a/package/gcc/4.8-arc/disable_gc_sections.patch b/package/gcc/4.8-arc/disable_gc_sections.patch new file mode 100644 index 0000000000..46a3a2697b --- /dev/null +++ b/package/gcc/4.8-arc/disable_gc_sections.patch @@ -0,0 +1,145 @@ +From be904b178fc0858ad41a3c2fbc13b388bd1ff465 Mon Sep 17 00:00:00 2001 +From: Mischa Jonker +Date: Mon, 15 Jul 2013 11:50:20 +0200 +Subject: [PATCH] libstdc++: Disable gc-sections to work around binutils bug + +This is to work around the following error message: +BFD (GNU Binutils) 2.23.2 assertion fail elf32-arc.c:2140 + +Signed-off-by: Mischa Jonker +--- + libstdc++-v3/acinclude.m4 | 3 --- + libstdc++-v3/configure | 33 --------------------------------- + 2 files changed, 36 deletions(-) + +diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 +index e131214..aa2e375 100644 +--- a/libstdc++-v3/acinclude.m4 ++++ b/libstdc++-v3/acinclude.m4 +@@ -296,9 +296,6 @@ AC_DEFUN([GLIBCXX_CHECK_LINKER_FEATURES], [ + fi + rm -f conftest.c conftest.o conftest + fi +- if test "$ac_gcsections" = "yes"; then +- SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS" +- fi + AC_MSG_RESULT($ac_gcsections) + + if test "$ac_test_CFLAGS" = set; then +diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure +index ed049cf..d325e3e 100755 +--- a/libstdc++-v3/configure ++++ b/libstdc++-v3/configure +@@ -20653,9 +20653,6 @@ rm -f core conftest.err conftest.$ac_objext \ + fi + rm -f conftest.c conftest.o conftest + fi +- if test "$ac_gcsections" = "yes"; then +- SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS" +- fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_gcsections" >&5 + $as_echo "$ac_gcsections" >&6; } + +@@ -27688,9 +27685,6 @@ rm -f core conftest.err conftest.$ac_objext \ + fi + rm -f conftest.c conftest.o conftest + fi +- if test "$ac_gcsections" = "yes"; then +- SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS" +- fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_gcsections" >&5 + $as_echo "$ac_gcsections" >&6; } + +@@ -33619,9 +33613,6 @@ rm -f core conftest.err conftest.$ac_objext \ + fi + rm -f conftest.c conftest.o conftest + fi +- if test "$ac_gcsections" = "yes"; then +- SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS" +- fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_gcsections" >&5 + $as_echo "$ac_gcsections" >&6; } + +@@ -45496,9 +45487,6 @@ rm -f core conftest.err conftest.$ac_objext \ + fi + rm -f conftest.c conftest.o conftest + fi +- if test "$ac_gcsections" = "yes"; then +- SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS" +- fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_gcsections" >&5 + $as_echo "$ac_gcsections" >&6; } + +@@ -45710,9 +45698,6 @@ rm -f core conftest.err conftest.$ac_objext \ + fi + rm -f conftest.c conftest.o conftest + fi +- if test "$ac_gcsections" = "yes"; then +- SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS" +- fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_gcsections" >&5 + $as_echo "$ac_gcsections" >&6; } + +@@ -46185,9 +46170,6 @@ rm -f core conftest.err conftest.$ac_objext \ + fi + rm -f conftest.c conftest.o conftest + fi +- if test "$ac_gcsections" = "yes"; then +- SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS" +- fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_gcsections" >&5 + $as_echo "$ac_gcsections" >&6; } + +@@ -52470,9 +52452,6 @@ rm -f core conftest.err conftest.$ac_objext \ + fi + rm -f conftest.c conftest.o conftest + fi +- if test "$ac_gcsections" = "yes"; then +- SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS" +- fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_gcsections" >&5 + $as_echo "$ac_gcsections" >&6; } + +@@ -58386,9 +58365,6 @@ rm -f core conftest.err conftest.$ac_objext \ + fi + rm -f conftest.c conftest.o conftest + fi +- if test "$ac_gcsections" = "yes"; then +- SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS" +- fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_gcsections" >&5 + $as_echo "$ac_gcsections" >&6; } + +@@ -58553,9 +58529,6 @@ rm -f core conftest.err conftest.$ac_objext \ + fi + rm -f conftest.c conftest.o conftest + fi +- if test "$ac_gcsections" = "yes"; then +- SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS" +- fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_gcsections" >&5 + $as_echo "$ac_gcsections" >&6; } + +@@ -58781,9 +58754,6 @@ rm -f core conftest.err conftest.$ac_objext \ + fi + rm -f conftest.c conftest.o conftest + fi +- if test "$ac_gcsections" = "yes"; then +- SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS" +- fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_gcsections" >&5 + $as_echo "$ac_gcsections" >&6; } + +@@ -64697,9 +64667,6 @@ rm -f core conftest.err conftest.$ac_objext \ + fi + rm -f conftest.c conftest.o conftest + fi +- if test "$ac_gcsections" = "yes"; then +- SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS" +- fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_gcsections" >&5 + $as_echo "$ac_gcsections" >&6; } + +-- +1.7.9.5 + diff --git a/package/gcc/4.8-arc/fix_branch_out_of_range.patch b/package/gcc/4.8-arc/fix_branch_out_of_range.patch new file mode 100644 index 0000000000..5340a3b691 --- /dev/null +++ b/package/gcc/4.8-arc/fix_branch_out_of_range.patch @@ -0,0 +1,30 @@ +arc: Fix operand-out-of-range errors + +brcc_s instructions can generate operand-out-of-range errors. While a +better solution is being discussed by the compiler team, this workaround +ensures that the chances of running into this issue are low. + +Signed-off-by: Mischa Jonker + +diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c +index ff602c0..b3ca4c4 100644 +--- a/gcc/config/arc/arc.c ++++ b/gcc/config/arc/arc.c +@@ -6565,7 +6565,7 @@ estimate required size increase). + rtx *ccp = &XEXP (XVECEXP (pat, 0, 1), 0); + + offset = branch_dest (insn) - INSN_ADDRESSES (INSN_UID (insn)); +- if ((offset >= -140 && offset < 140) ++ if ((offset >= -120 && offset < 120) + && rtx_equal_p (XEXP (op, 1), const0_rtx) + && compact_register_operand (XEXP (op, 0), VOIDmode) + && equality_comparison_operator (op, VOIDmode)) +@@ -6687,7 +6687,7 @@ estimate required size increase). + + if (op0 != cmp0) + cc_clob_rtx = gen_rtx_REG (CC_ZNmode, CC_REG); +- else if ((offset >= -140 && offset < 140) ++ else if ((offset >= -120 && offset < 120) + && rtx_equal_p (op1, const0_rtx) + && compact_register_operand (op0, VOIDmode) + && (GET_CODE (op) == EQ diff --git a/package/gcc/4.8.2/100-uclibc-conf.patch b/package/gcc/4.8.2/100-uclibc-conf.patch new file mode 100644 index 0000000000..d56bf0a194 --- /dev/null +++ b/package/gcc/4.8.2/100-uclibc-conf.patch @@ -0,0 +1,15 @@ +Index: gcc-4.8.0/contrib/regression/objs-gcc.sh +=================================================================== +--- gcc-4.8.0.orig/contrib/regression/objs-gcc.sh 2009-04-09 17:00:19.000000000 +0200 ++++ gcc-4.8.0/contrib/regression/objs-gcc.sh 2013-03-23 17:39:04.000000000 +0100 +@@ -106,6 +106,10 @@ + then + make all-gdb all-dejagnu all-ld || exit 1 + make install-gdb install-dejagnu install-ld || exit 1 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] ++ then ++ make all-gdb all-dejagnu all-ld || exit 1 ++ make install-gdb install-dejagnu install-ld || exit 1 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then + make bootstrap || exit 1 + make install || exit 1 diff --git a/package/gcc/4.8.2/301-missing-execinfo_h.patch b/package/gcc/4.8.2/301-missing-execinfo_h.patch new file mode 100644 index 0000000000..00efda24aa --- /dev/null +++ b/package/gcc/4.8.2/301-missing-execinfo_h.patch @@ -0,0 +1,13 @@ +Index: gcc-4.8.0/boehm-gc/include/gc.h +=================================================================== +--- gcc-4.8.0.orig/boehm-gc/include/gc.h 2007-04-23 23:10:09.000000000 +0200 ++++ gcc-4.8.0/boehm-gc/include/gc.h 2013-03-23 17:39:20.000000000 +0100 +@@ -503,7 +503,7 @@ + #if defined(__linux__) || defined(__GLIBC__) + # include + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ +- && !defined(__ia64__) ++ && !defined(__ia64__) && !defined(__UCLIBC__) + # ifndef GC_HAVE_BUILTIN_BACKTRACE + # define GC_HAVE_BUILTIN_BACKTRACE + # endif diff --git a/package/gcc/4.8.2/302-c99-snprintf.patch b/package/gcc/4.8.2/302-c99-snprintf.patch new file mode 100644 index 0000000000..cd4d2ccfb6 --- /dev/null +++ b/package/gcc/4.8.2/302-c99-snprintf.patch @@ -0,0 +1,13 @@ +Index: gcc-4.8.0/libstdc++-v3/include/c_global/cstdio +=================================================================== +--- gcc-4.8.0.orig/libstdc++-v3/include/c_global/cstdio 2013-02-03 18:54:05.000000000 +0100 ++++ gcc-4.8.0/libstdc++-v3/include/c_global/cstdio 2013-03-23 17:39:32.000000000 +0100 +@@ -138,7 +138,7 @@ + using ::vsprintf; + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if _GLIBCXX_USE_C99 || defined __UCLIBC__ + + #undef snprintf + #undef vfscanf diff --git a/package/gcc/4.8.2/305-libmudflap-susv3-legacy.patch b/package/gcc/4.8.2/305-libmudflap-susv3-legacy.patch new file mode 100644 index 0000000000..35d5f50207 --- /dev/null +++ b/package/gcc/4.8.2/305-libmudflap-susv3-legacy.patch @@ -0,0 +1,49 @@ +Index: gcc-4.8.0/libmudflap/mf-hooks2.c +=================================================================== +--- gcc-4.8.0.orig/libmudflap/mf-hooks2.c 2013-02-03 18:48:05.000000000 +0100 ++++ gcc-4.8.0/libmudflap/mf-hooks2.c 2013-03-23 17:39:43.000000000 +0100 +@@ -424,7 +424,7 @@ + { + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region"); +- bzero (s, n); ++ memset (s, 0, n); + } + + +@@ -434,7 +434,7 @@ + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src"); + MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest"); +- bcopy (src, dest, n); ++ memmove (dest, src, n); + } + + +@@ -444,7 +444,7 @@ + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg"); + MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg"); +- return bcmp (s1, s2, n); ++ return n == 0 ? 0 : memcmp (s1, s2, n); + } + + +@@ -453,7 +453,7 @@ + size_t n = strlen (s); + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region"); +- return index (s, c); ++ return strchr (s, c); + } + + +@@ -462,7 +462,7 @@ + size_t n = strlen (s); + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region"); +- return rindex (s, c); ++ return strrchr (s, c); + } + + /* XXX: stpcpy, memccpy */ diff --git a/package/gcc/4.8.2/810-arm-softfloat-libgcc.patch b/package/gcc/4.8.2/810-arm-softfloat-libgcc.patch new file mode 100644 index 0000000000..c8cb377d55 --- /dev/null +++ b/package/gcc/4.8.2/810-arm-softfloat-libgcc.patch @@ -0,0 +1,30 @@ +Index: gcc-4.8.0/gcc/config/arm/linux-elf.h +=================================================================== +--- gcc-4.8.0.orig/gcc/config/arm/linux-elf.h 2013-01-10 21:38:27.000000000 +0100 ++++ gcc-4.8.0/gcc/config/arm/linux-elf.h 2013-03-23 17:40:00.000000000 +0100 +@@ -55,7 +55,7 @@ + %{shared:-lc} \ + %{!shared:%{profile:-lc_p}%{!profile:-lc}}" + +-#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" ++#define LIBGCC_SPEC "-lgcc" + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + +Index: gcc-4.8.0/libgcc/config/arm/t-linux +=================================================================== +--- gcc-4.8.0.orig/libgcc/config/arm/t-linux 2012-03-22 16:14:46.000000000 +0100 ++++ gcc-4.8.0/libgcc/config/arm/t-linux 2013-03-23 17:40:54.000000000 +0100 +@@ -1,6 +1,11 @@ + LIB1ASMSRC = arm/lib1funcs.S + LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ +- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 ++ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ ++ _arm_addsubdf3 _arm_addsubsf3 \ ++ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ ++ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ ++ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ ++ _arm_fixsfsi _arm_fixunssfsi + + # Just for these, we omit the frame pointer since it makes such a big + # difference. diff --git a/package/gcc/4.8.2/830-arm_unbreak_armv4t.patch b/package/gcc/4.8.2/830-arm_unbreak_armv4t.patch new file mode 100644 index 0000000000..37f8f2a54d --- /dev/null +++ b/package/gcc/4.8.2/830-arm_unbreak_armv4t.patch @@ -0,0 +1,13 @@ +http://sourceware.org/ml/crossgcc/2008-05/msg00009.html + +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -45,7 +45,7 @@ + The ARM10TDMI core is the default for armv5t, so set + SUBTARGET_CPU_DEFAULT to achieve this. */ + #undef SUBTARGET_CPU_DEFAULT +-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi + + /* TARGET_BIG_ENDIAN_DEFAULT is set in + config.gcc for big endian configurations. */ diff --git a/package/gcc/4.8.2/840-PR57717.patch b/package/gcc/4.8.2/840-PR57717.patch new file mode 100644 index 0000000000..f983f70d02 --- /dev/null +++ b/package/gcc/4.8.2/840-PR57717.patch @@ -0,0 +1,23 @@ +This backports fix from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717 + +Upstream-Status: Backport +Signed-off-by: Khem Raj + +Index: gcc-4.8.1/gcc/config/rs6000/rs6000.c +=================================================================== +--- gcc-4.8.1.orig/gcc/config/rs6000/rs6000.c 2013-05-09 18:54:06.000000000 -0700 ++++ gcc-4.8.1/gcc/config/rs6000/rs6000.c 2013-06-27 08:22:40.459021366 -0700 +@@ -5431,11 +5431,12 @@ + + case TFmode: + case TDmode: +- case TImode: + if (TARGET_E500_DOUBLE) + return (SPE_CONST_OFFSET_OK (offset) + && SPE_CONST_OFFSET_OK (offset + 8)); ++ /* Fall through. */ + ++ case TImode: + extra = 8; + if (!worst_case) + break; diff --git a/package/gcc/4.8.2/841-PR57717-E500v2.patch b/package/gcc/4.8.2/841-PR57717-E500v2.patch new file mode 100644 index 0000000000..96fa1da073 --- /dev/null +++ b/package/gcc/4.8.2/841-PR57717-E500v2.patch @@ -0,0 +1,21 @@ +This backports fix from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717 + +Upstream-Status: Backport +Signed-off-by: Julian Brown + +fix for PR57717 (PowerPC E500v2) +http://gcc.gnu.org/ml/gcc-patches/2013-08/msg00668.html + +--- a/gcc/config/rs6000/rs6000.c 2013-05-09 20:54:06.000000000 -0500 ++++ b/gcc/config/rs6000/rs6000.c 2013-08-28 01:25:24.865218744 -0500 +@@ -6337,9 +6337,7 @@ + && GET_CODE (XEXP (x, 1)) == CONST_INT + && reg_offset_p + && !SPE_VECTOR_MODE (mode) +- && !(TARGET_E500_DOUBLE && (mode == DFmode || mode == TFmode +- || mode == DDmode || mode == TDmode +- || mode == DImode)) ++ && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (mode) > UNITS_PER_WORD) + && VECTOR_MEM_NONE_P (mode)) + { + HOST_WIDE_INT val = INTVAL (XEXP (x, 1)); diff --git a/package/gcc/4.8.2/powerpc-link-with-math-lib.patch.conditional b/package/gcc/4.8.2/powerpc-link-with-math-lib.patch.conditional new file mode 100644 index 0000000000..b7094fe652 --- /dev/null +++ b/package/gcc/4.8.2/powerpc-link-with-math-lib.patch.conditional @@ -0,0 +1,122 @@ +http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00269.html + +On glibc the libc.so carries a copy of the math function copysignl() but +on uClibc math functions like copysignl() live in libm. Since libgcc_s +contains unresolved symbols, any attempt to link against libgcc_s +without explicitely specifying -lm fails, resulting in a broken +bootstrap of the compiler. + +Forward port to gcc 4.5.1 by Gustavo Zacarias + +--- + libgcc/Makefile.in | 4 +++- + libgcc/configure | 32 ++++++++++++++++++++++++++++++++ + libgcc/configure.ac | 21 +++++++++++++++++++++ + 3 files changed, 56 insertions(+), 1 deletion(-) + +Index: gcc-4.8.0/libgcc/Makefile.in +=================================================================== +--- gcc-4.8.0.orig/libgcc/Makefile.in 2013-02-04 20:06:20.000000000 +0100 ++++ gcc-4.8.0/libgcc/Makefile.in 2013-03-24 09:12:43.000000000 +0100 +@@ -41,6 +41,7 @@ + decimal_float = @decimal_float@ + enable_decimal_float = @enable_decimal_float@ + fixed_point = @fixed_point@ ++LIBGCC_LIBM = @LIBGCC_LIBM@ + + host_noncanonical = @host_noncanonical@ + target_noncanonical = @target_noncanonical@ +@@ -927,9 +928,10 @@ + @multilib_dir@,$(MULTIDIR),$(subst \ + @shlib_objs@,$(objects) libgcc.a,$(subst \ + @shlib_base_name@,libgcc_s,$(subst \ ++ @libgcc_libm@,$(LIBGCC_LIBM),$(subst \ + @shlib_map_file@,$(mapfile),$(subst \ + @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \ +- @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK)))))))) ++ @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK))))))))) + + libunwind$(SHLIB_EXT): $(libunwind-s-objects) $(extra-parts) + # @multilib_flags@ is still needed because this may use +Index: gcc-4.8.0/libgcc/configure +=================================================================== +--- gcc-4.8.0.orig/libgcc/configure 2012-11-05 00:08:42.000000000 +0100 ++++ gcc-4.8.0/libgcc/configure 2013-03-24 09:12:43.000000000 +0100 +@@ -564,6 +564,7 @@ + tmake_file + sfp_machine_header + set_use_emutls ++LIBGCC_LIBM + set_have_cc_tls + vis_hide + fixed_point +@@ -4481,6 +4482,37 @@ + fi + fi + ++# On powerpc libgcc_s references copysignl which is a libm function but ++# glibc apparently also provides it via libc as opposed to uClibc where ++# it lives in libm. ++echo "$as_me:$LINENO: checking for library containing copysignl" >&5 ++echo $ECHO_N "checking for library containing copysignl... $ECHO_C" >&6 ++if test "${libgcc_cv_copysignl_lib+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ++ echo '#include ' > conftest.c ++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c ++ libgcc_cv_copysignl_lib="-lc" ++ if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } ++ then ++ libgcc_cv_copysignl_lib="-lm" ++ fi ++ rm -f conftest.* ++ ++fi ++echo "$as_me:$LINENO: result: $libgcc_cv_copysignl_lib" >&5 ++echo "${ECHO_T}$libgcc_cv_copysignl_lib" >&6 ++ ++case /${libgcc_cv_copysignl_lib}/ in ++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;; ++ *) LIBGCC_LIBM= ;; ++esac + + # Conditionalize the makefile for this target machine. + tmake_file_= +Index: gcc-4.8.0/libgcc/configure.ac +=================================================================== +--- gcc-4.8.0.orig/libgcc/configure.ac 2012-10-15 15:10:30.000000000 +0200 ++++ gcc-4.8.0/libgcc/configure.ac 2013-03-24 09:12:43.000000000 +0100 +@@ -326,6 +326,27 @@ + fi + AC_SUBST(set_have_cc_tls) + ++# On powerpc libgcc_s references copysignl which is a libm function but ++# glibc apparently also provides it via libc as opposed to uClibc where ++# it lives in libm. ++AC_CACHE_CHECK ++ libgcc_cv_copysignl_lib, ++ echo '#include ' > conftest.c ++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c ++ libgcc_cv_copysignl_lib="-lc" ++ if AC_TRY_COMMAND(${CC-cc} -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD) ++ then ++ libgcc_cv_copysignl_lib="-lm" ++ fi ++ rm -f conftest.* ++ ]) ++ ++case /${libgcc_cv_copysignl_lib}/ in ++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;; ++ *) LIBGCC_LIBM= ;; ++esac ++AC_SUBST(LIBGCC_LIBM) ++ + # See if we have emulated thread-local storage. + GCC_CHECK_EMUTLS + set_use_emutls= diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host new file mode 100644 index 0000000000..41c1213680 --- /dev/null +++ b/package/gcc/Config.in.host @@ -0,0 +1,163 @@ +comment "GCC Options" + +config BR2_GCC_NEEDS_MPC + bool + +choice + prompt "GCC compiler Version" + default BR2_GCC_VERSION_4_4_X if BR2_sparc_sparchfleon || BR2_sparc_sparchfleonv8 || BR2_sparc_sparcsfleon || BR2_sparc_sparcsfleonv8 + default BR2_GCC_VERSION_4_2_2_AVR32_2_1_5 if BR2_avr32 + default BR2_GCC_VERSION_4_8_ARC if BR2_arc + default BR2_GCC_VERSION_4_5_X if BR2_bfin + default BR2_GCC_VERSION_4_7_X + help + Select the version of gcc you wish to use. + + config BR2_GCC_VERSION_4_2_2_AVR32_2_1_5 + depends on BR2_avr32 + bool "gcc 4.2.2-avr32-2.1.5" + + config BR2_GCC_VERSION_4_3_X + depends on !BR2_arc && !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_cortex_a5 && !BR2_cortex_a7 && !BR2_cortex_a8 && !BR2_cortex_a9 && !BR2_cortex_a15 && !BR2_x86_atom && !BR2_powerpc_e300c2 && !BR2_powerpc_e300c3 && !BR2_powerpc_e500mc && !BR2_powerpc_464 && !BR2_powerpc_464fp && !BR2_powerpc_476 && !BR2_powerpc_476fp && !BR2_fa526 && !BR2_pj4 + depends on !BR2_ARM_EABIHF + bool "gcc 4.3.x" + + config BR2_GCC_VERSION_4_4_X + depends on !BR2_arc && !BR2_avr32 && !BR2_cortex_a5 && !BR2_cortex_a7 && !BR2_cortex_a15 && !BR2_x86_atom && !BR2_powerpc_476 && !BR2_powerpc_476fp && !BR2_fa526 && !BR2_pj4 + bool "gcc 4.4.x" + # ARM EABIhf support appeared in gcc 4.6 + depends on !BR2_ARM_EABIHF + # VFPv4 support appeared in gcc 4.5 + depends on !BR2_ARM_FPU_VFPV4 && !BR2_ARM_FPU_VFPV4D16 + + config BR2_GCC_VERSION_4_5_X + depends on !BR2_arc && !BR2_avr32 && !BR2_cortex_a7 && !BR2_cortex_a15 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_fa526 && !BR2_pj4 + select BR2_GCC_NEEDS_MPC + # ARM EABIhf support appeared in gcc 4.6 + depends on !BR2_ARM_EABIHF + bool "gcc 4.5.x" + + config BR2_GCC_VERSION_4_6_X + depends on !BR2_arc && !BR2_avr32 && !BR2_bfin && !BR2_cortex_a7 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_pj4 + select BR2_GCC_NEEDS_MPC + bool "gcc 4.6.x" + + config BR2_GCC_VERSION_4_7_X + depends on !BR2_arc && !BR2_avr32 && !BR2_bfin && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_pj4 + select BR2_GCC_NEEDS_MPC + bool "gcc 4.7.x" + + config BR2_GCC_VERSION_4_8_X + depends on !BR2_arc && !BR2_avr32 && !BR2_bfin && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 + select BR2_GCC_NEEDS_MPC + bool "gcc 4.8.x" + + config BR2_GCC_VERSION_4_8_ARC + depends on BR2_arc + select BR2_GCC_NEEDS_MPC + bool "gcc 4.8-arc" + + config BR2_GCC_VERSION_SNAP + depends on !BR2_arc && !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 + select BR2_GCC_NEEDS_MPC + bool "gcc snapshot" +endchoice + +config BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE + bool + default y if !BR2_GCC_VERSION_4_2_2_AVR32_2_1_5 + +config BR2_GCC_SNAP_DATE + string "GCC snapshot date" + default "4.8-20120429" + depends on BR2_GCC_VERSION_SNAP + help + Enter snapshot date to use for gcc. + Format is: A.B-YYYYMMDD + + A is GCC major version, for example 4. + B is GCC minor version, for example 7. + YYYYMMDD is snapshot date, for example 20110430. + + This way we'd get version 4.7-20110430 + +config BR2_GCC_VERSION + string + default "4.2.2-avr32-2.1.5" if BR2_GCC_VERSION_4_2_2_AVR32_2_1_5 + default "4.3.6" if BR2_GCC_VERSION_4_3_X + default "4.4.7" if BR2_GCC_VERSION_4_4_X + default "4.5.4" if BR2_GCC_VERSION_4_5_X + default "4.6.4" if BR2_GCC_VERSION_4_6_X + default "4.7.3" if BR2_GCC_VERSION_4_7_X + default "4.8.2" if BR2_GCC_VERSION_4_8_X + default "4.8-arc" if BR2_GCC_VERSION_4_8_ARC + default BR2_GCC_SNAP_DATE if BR2_GCC_VERSION_SNAP + +config BR2_EXTRA_GCC_CONFIG_OPTIONS + string "Additional gcc options" + default "" + help + Any additional gcc configure options you may want to + include. Those options are applied for all of the gcc + initial, gcc intermediate and gcc final passes. + +config BR2_TOOLCHAIN_BUILDROOT_CXX + bool "Enable C++ support" + select BR2_INSTALL_LIBSTDCPP + depends on !(BR2_GCC_VERSION_4_2_2_AVR32_2_1_5 && \ + BR2_TOOLCHAIN_BUILDROOT_LOCALE) + help + Enable this option if you want your toolchain to support the + C++ language and you want C++ libraries to be installed on + your target system. + +comment "C++ support broken in uClibc with locale enabled with gcc 4.2" + depends on BR2_GCC_VERSION_4_2_2_AVR32_2_1_5 && BR2_TOOLCHAIN_BUILDROOT_LOCALE + +config BR2_INSTALL_OBJC + bool "Enable Objective-C support" + depends on !BR2_avr32 + depends on BR2_DEPRECATED + help + Enable the support for the Objective-C language in the + cross-compiler, and install the Objective-C runtime to the + target. + +config BR2_INSTALL_FORTRAN + bool "Enable Fortran support" + depends on !BR2_avr32 + depends on BR2_DEPRECATED + select BR2_PACKAGE_LIBMPFR + help + Enable the support for the Fortran language in the + cross-compiler, and install the Fortran runtime to the + target. + +config BR2_GCC_ENABLE_TLS + bool "Enable compiler tls support" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC + default y + depends on BR2_PTHREADS_NATIVE || BR2_TOOLCHAIN_BUILDROOT_EGLIBC || BR2_TOOLCHAIN_BUILDROOT_GLIBC + help + Enable the compiler to generate code for accessing + thread local storage variables + +config BR2_GCC_ENABLE_OPENMP + bool "Enable compiler OpenMP support" + depends on !BR2_PTHREADS_NONE && !BR2_avr32 && !BR2_arc + help + Enable OpenMP support for the compiler + +config BR2_GCC_ENABLE_LIBMUDFLAP + bool "Enable libmudflap support" + # There are architectures, or specific configurations for + # which mudflap is not supported. + depends on !BR2_avr32 && !BR2_bfin && !BR2_ARM_INSTRUCTIONS_THUMB && !BR2_powerpc_SPE + help + libmudflap is a gcc library used for the mudflap pointer + debugging functionality. It is only needed if you intend to + use the -fmudflap gcc flag. + + See http://gcc.gnu.org/wiki/Mudflap_Pointer_Debugging and + the help of the gcc -fmudflap option for more details. + + If you're unsure, leave this option disabled. diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk new file mode 100644 index 0000000000..b396382788 --- /dev/null +++ b/package/gcc/gcc-final/gcc-final.mk @@ -0,0 +1,143 @@ +################################################################################ +# +# gcc-final +# +################################################################################ + +GCC_FINAL_VERSION = $(GCC_VERSION) +GCC_FINAL_SITE = $(GCC_SITE) +GCC_FINAL_SOURCE = $(GCC_SOURCE) + +HOST_GCC_FINAL_DEPENDENCIES = \ + $(HOST_GCC_COMMON_DEPENDENCIES) \ + $(BUILDROOT_LIBC) + +HOST_GCC_FINAL_EXTRACT_CMDS = $(HOST_GCC_EXTRACT_CMDS) + +ifneq ($(call qstrip, $(BR2_XTENSA_CORE_NAME)),) +HOST_GCC_FINAL_POST_EXTRACT_CMDS += HOST_GCC_FINAL_XTENSA_OVERLAY_EXTRACT +endif + +HOST_GCC_FINAL_POST_PATCH_HOOKS += HOST_GCC_APPLY_PATCHES + +# gcc doesn't support in-tree build, so we create a 'build' +# subdirectory in the gcc sources, and build from there. +HOST_GCC_FINAL_SUBDIR = build + +HOST_GCC_FINAL_PRE_CONFIGURE_HOOKS += HOST_GCC_CONFIGURE_SYMLINK + +# Languages supported by the cross-compiler +GCC_FINAL_CROSS_LANGUAGES-y = c +GCC_FINAL_CROSS_LANGUAGES-$(BR2_INSTALL_LIBSTDCPP) += c++ +GCC_FINAL_CROSS_LANGUAGES-$(BR2_INSTALL_FORTRAN) += fortran +GCC_FINAL_CROSS_LANGUAGES-$(BR2_INSTALL_OBJC) += objc +GCC_FINAL_CROSS_LANGUAGES = $(subst $(space),$(comma),$(GCC_FINAL_CROSS_LANGUAGES-y)) + +HOST_GCC_FINAL_CONF_OPT = \ + $(HOST_GCC_COMMON_CONF_OPT) \ + --enable-languages=$(GCC_FINAL_CROSS_LANGUAGES) \ + $(DISABLE_LARGEFILE) \ + --with-build-time-tools=$(HOST_DIR)/usr/$(GNU_TARGET_NAME)/bin + +ifeq ($(BR2_GCC_ENABLE_OPENMP),y) +HOST_GCC_FINAL_CONF_OPT += --enable-libgomp +else +HOST_GCC_FINAL_CONF_OPT += --disable-libgomp +endif + +# End with user-provided options, so that they can override previously +# defined options. +HOST_GCC_FINAL_CONF_OPT += \ + $(call qstrip,$(BR2_EXTRA_GCC_CONFIG_OPTIONS)) + +HOST_GCC_FINAL_CONF_ENV = \ + $(HOST_GCC_COMMON_CONF_ENV) + +# Make sure we have 'cc' +define HOST_GCC_FINAL_CREATE_CC_SYMLINKS + if [ ! -e $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-cc ]; then \ + ln -snf $(GNU_TARGET_NAME)-gcc \ + $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-cc; \ + fi + if [ ! -e $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/bin/cc ]; then \ + ln -snf gcc $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/bin/cc; \ + fi +endef + +HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_CREATE_CC_SYMLINKS + +# Create -linux- symlinks +define HOST_GCC_FINAL_CREATE_SIMPLE_SYMLINKS + (cd $(HOST_DIR)/usr/bin; for i in $(GNU_TARGET_NAME)-*; do \ + ln -snf $$i $(ARCH)-linux$${i##$(GNU_TARGET_NAME)}; \ + done) +endef + +HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_CREATE_SIMPLE_SYMLINKS + +# In gcc 4.7.x, the ARM EABIhf library loader path for (e)glibc was not +# correct, so we create a symbolic link to make things work +# properly. eglibc installs the library loader as ld-linux-armhf.so.3, +# but gcc creates binaries that reference ld-linux.so.3. +ifeq ($(BR2_arm)$(BR2_ARM_EABIHF)$(BR2_GCC_VERSION_4_7_X)$(BR2_TOOLCHAIN_USES_GLIBC),yyyy) +define HOST_GCC_FINAL_LD_LINUX_LINK + ln -sf ld-linux-armhf.so.3 $(TARGET_DIR)/lib/ld-linux.so.3 + ln -sf ld-linux-armhf.so.3 $(STAGING_DIR)/lib/ld-linux.so.3 +endef +HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_LD_LINUX_LINK +endif + +# Cannot use the HOST_GCC_FINAL_USR_LIBS mechanism below, because we want +# libgcc_s to be installed in /lib and not /usr/lib. We add +x on +# libgcc_s to ensure it will be stripped. +define HOST_GCC_FINAL_INSTALL_LIBGCC + -cp -dpf $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/lib*/libgcc_s* \ + $(STAGING_DIR)/lib/ + -cp -dpf $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/lib*/libgcc_s* \ + $(TARGET_DIR)/lib/ + -chmod +x $(TARGET_DIR)/lib/libgcc_s.so.1 +endef + +HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_INSTALL_LIBGCC + +# Handle the installation of libraries in /usr/lib +HOST_GCC_FINAL_USR_LIBS = + +ifeq ($(BR2_INSTALL_LIBSTDCPP),y) +HOST_GCC_FINAL_USR_LIBS += libstdc++ +endif + +ifeq ($(BR2_GCC_ENABLE_OPENMP),y) +HOST_GCC_FINAL_USR_LIBS += libgomp +endif + +ifeq ($(BR2_INSTALL_FORTRAN),y) +HOST_GCC_FINAL_USR_LIBS += libgfortran +endif + +ifeq ($(BR2_INSTALL_OBJC),y) +HOST_GCC_FINAL_USR_LIBS += libobjc +endif + +ifeq ($(BR2_GCC_ENABLE_LIBMUDFLAP),y) +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +HOST_GCC_FINAL_USR_LIBS += libmudflapth +else +HOST_GCC_FINAL_USR_LIBS += libmudflap +endif +endif + +ifneq ($(HOST_GCC_FINAL_USR_LIBS),) +define HOST_GCC_FINAL_INSTALL_USR_LIBS + mkdir -p $(TARGET_DIR)/usr/lib + for i in $(HOST_GCC_FINAL_USR_LIBS) ; do \ + cp -dpf $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/lib*/$${i}.so* \ + $(STAGING_DIR)/usr/lib/ ; \ + cp -dpf $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/lib*/$${i}.so* \ + $(TARGET_DIR)/usr/lib/ ; \ + done +endef +HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_INSTALL_USR_LIBS +endif + +$(eval $(host-autotools-package)) diff --git a/package/gcc/gcc-initial/gcc-initial.mk b/package/gcc/gcc-initial/gcc-initial.mk new file mode 100644 index 0000000000..0eb492fa4d --- /dev/null +++ b/package/gcc/gcc-initial/gcc-initial.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# gcc-initial +# +################################################################################ + +GCC_INITIAL_VERSION = $(GCC_VERSION) +GCC_INITIAL_SITE = $(GCC_SITE) +GCC_INITIAL_SOURCE = $(GCC_SOURCE) + +HOST_GCC_INITIAL_DEPENDENCIES = $(HOST_GCC_COMMON_DEPENDENCIES) + +HOST_GCC_INITIAL_EXTRACT_CMDS = $(HOST_GCC_EXTRACT_CMDS) + +ifneq ($(call qstrip, $(BR2_XTENSA_CORE_NAME)),) +HOST_GCC_INITIAL_POST_EXTRACT_CMDS += HOST_GCC_XTENSA_OVERLAY_EXTRACT +endif + +HOST_GCC_INITIAL_POST_PATCH_HOOKS += HOST_GCC_APPLY_PATCHES + +# gcc doesn't support in-tree build, so we create a 'build' +# subdirectory in the gcc sources, and build from there. +HOST_GCC_INITIAL_SUBDIR = build + +HOST_GCC_INITIAL_PRE_CONFIGURE_HOOKS += HOST_GCC_CONFIGURE_SYMLINK + +HOST_GCC_INITIAL_CONF_OPT = \ + $(HOST_GCC_COMMON_CONF_OPT) \ + --enable-languages=c \ + --disable-shared \ + --without-headers \ + --with-newlib \ + --disable-largefile \ + --disable-nls \ + $(call qstrip,$(BR2_EXTRA_GCC_CONFIG_OPTIONS)) + +HOST_GCC_INITIAL_CONF_ENV = \ + $(HOST_GCC_COMMON_CONF_ENV) + +HOST_GCC_INITIAL_MAKE_OPT = all-gcc +HOST_GCC_INITIAL_INSTALL_OPT = install-gcc + +$(eval $(host-autotools-package)) diff --git a/package/gcc/gcc-intermediate/gcc-intermediate.mk b/package/gcc/gcc-intermediate/gcc-intermediate.mk new file mode 100644 index 0000000000..f47e4be1ba --- /dev/null +++ b/package/gcc/gcc-intermediate/gcc-intermediate.mk @@ -0,0 +1,49 @@ +################################################################################ +# +# gcc-intermediate +# +################################################################################ + +GCC_INTERMEDIATE_VERSION = $(GCC_VERSION) +GCC_INTERMEDIATE_SITE = $(GCC_SITE) +GCC_INTERMEDIATE_SOURCE = $(GCC_SOURCE) + +HOST_GCC_INTERMEDIATE_DEPENDENCIES = \ + $(HOST_GCC_COMMON_DEPENDENCIES) \ + $(BUILDROOT_LIBC)-configure + +HOST_GCC_INTERMEDIATE_EXTRACT_CMDS = $(HOST_GCC_EXTRACT_CMDS) + +ifneq ($(call qstrip, $(BR2_XTENSA_CORE_NAME)),) +HOST_GCC_INTERMEDIATE_POST_EXTRACT_CMDS += HOST_GCC_XTENSA_OVERLAY_EXTRACT +endif + +HOST_GCC_INTERMEDIATE_POST_PATCH_HOOKS += HOST_GCC_APPLY_PATCHES + +# gcc doesn't support in-tree build, so we create a 'build' +# subdirectory in the gcc sources, and build from there. +HOST_GCC_INTERMEDIATE_SUBDIR = build + +HOST_GCC_INTERMEDIATE_PRE_CONFIGURE_HOOKS += HOST_GCC_CONFIGURE_SYMLINK + +HOST_GCC_INTERMEDIATE_CONF_OPT = \ + $(HOST_GCC_COMMON_CONF_OPT) \ + --enable-languages=c \ + --disable-largefile \ + --disable-nls \ + $(call qstrip,$(BR2_EXTRA_GCC_CONFIG_OPTIONS)) + +HOST_GCC_INTERMEDIATE_CONF_ENV = \ + $(HOST_GCC_COMMON_CONF_ENV) + +HOST_GCC_INTERMEDIATE_MAKE_OPT = all-gcc +ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y) +HOST_GCC_INTERMEDIATE_MAKE_OPT += all-target-libgcc +endif + +HOST_GCC_INTERMEDIATE_INSTALL_OPT = install-gcc +ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y) +HOST_GCC_INTERMEDIATE_INSTALL_OPT += install-target-libgcc +endif + +$(eval $(host-autotools-package)) diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk new file mode 100644 index 0000000000..41600ef6ec --- /dev/null +++ b/package/gcc/gcc.mk @@ -0,0 +1,216 @@ +################################################################################ +# +# Common variables for the gcc-initial, gcc-intermediate and gcc-final +# packages. +# +################################################################################ + +# +# Version, site and source +# + +GCC_VERSION = $(call qstrip,$(BR2_GCC_VERSION)) + +ifeq ($(BR2_GCC_VERSION_SNAP),y) +GCC_SNAP_DATE = $(call qstrip,$(BR2_GCC_SNAP_DATE)) +endif + +ifneq ($(GCC_SNAP_DATE),) +GCC_SITE = ftp://gcc.gnu.org/pub/gcc/snapshots/$(GCC_SNAP_DATE)/ +else ifeq ($(findstring avr32,$(GCC_VERSION)),avr32) +GCC_SITE = ftp://www.at91.com/pub/buildroot/ +else ifeq ($(findstring arc,$(GCC_VERSION)),arc) +GCC_SITE = $(BR2_ARC_SITE) +else +GCC_SITE = $(BR2_GNU_MIRROR:/=)/gcc/gcc-$(GCC_VERSION) +endif + +GCC_SOURCE = gcc-$(GCC_VERSION).tar.bz2 + +# +# Xtensa special hook +# + +define HOST_GCC_XTENSA_OVERLAY_EXTRACT + tar xf $(BR2_XTENSA_OVERLAY_DIR)/xtensa_$(call qstrip,\ + $(BR2_XTENSA_CORE_NAME)).tar -C $(@D) --strip-components=1 gcc +endef + +# +# Apply patches +# + +ifeq ($(ARCH),powerpc) +ifneq ($(BR2_SOFT_FLOAT),) +define HOST_GCC_APPLY_POWERPC_PATCH + support/scripts/apply-patches.sh $(@D) package/gcc/$(GCC_VERSION) powerpc-link-with-math-lib.patch.conditional +endef +endif +endif + +define HOST_GCC_APPLY_PATCHES + if test -d package/gcc/$(GCC_VERSION); then \ + support/scripts/apply-patches.sh $(@D) package/gcc/$(GCC_VERSION) \*.patch ; \ + fi; + $(HOST_GCC_APPLY_POWERPC_PATCH) +endef + +# +# Custom extract command to save disk space +# + +define HOST_GCC_EXTRACT_CMDS + $(BZCAT) $(DL_DIR)/$(GCC_SOURCE) | \ + $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) \ + --exclude='libjava/*' \ + --exclude='libgo/*' \ + --exclude='gcc/testsuite/*' \ + --exclude='libstdc++-v3/testsuite/*' \ + $(TAR_OPTIONS) - + mkdir -p $(@D)/libstdc++-v3/testsuite/ + echo "all:" > $(@D)/libstdc++-v3/testsuite/Makefile.in + echo "install:" >> $(@D)/libstdc++-v3/testsuite/Makefile.in +endef + +# +# Create 'build' directory and configure symlink +# + +define HOST_GCC_CONFIGURE_SYMLINK + mkdir -p $(@D)/build + ln -sf ../configure $(@D)/build/configure +endef + +# +# Common configuration options +# + +HOST_GCC_COMMON_DEPENDENCIES = \ + host-binutils \ + host-gmp \ + host-mpfr \ + $(if $(BR2_BINFMT_FLAT),host-elf2flt) + +HOST_GCC_COMMON_CONF_OPT = \ + --target=$(GNU_TARGET_NAME) \ + --with-sysroot=$(STAGING_DIR) \ + --disable-__cxa_atexit \ + --with-gnu-ld \ + --disable-libssp \ + --disable-multilib \ + --with-gmp=$(HOST_DIR)/usr \ + --with-mpfr=$(HOST_DIR)/usr + +# Don't build documentation. It takes up extra space / build time, +# and sometimes needs specific makeinfo versions to work +HOST_GCC_COMMON_CONF_ENV = \ + MAKEINFO=missing + +# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43810 +# Workaround until it's fixed in 4.5.4 or later +ifeq ($(ARCH),powerpc) +ifeq ($(findstring x4.5.,x$(GCC_VERSION)),x4.5.) +HOST_GCC_COMMON_CONF_OPT += --disable-target-optspace +endif +else +HOST_GCC_COMMON_CONF_OPT += --enable-target-optspace +endif + +# gcc 4.6.x quadmath requires wchar +ifneq ($(BR2_TOOLCHAIN_BUILDROOT_WCHAR),y) +HOST_GCC_COMMON_CONF_OPT += --disable-libquadmath +endif + +ifeq ($(BR2_GCC_ENABLE_TLS),y) +HOST_GCC_COMMON_CONF_OPT += --enable-tls +else +HOST_GCC_COMMON_CONF_OPT += --disable-tls +endif + +ifeq ($(BR2_GCC_ENABLE_LIBMUDFLAP),y) +HOST_GCC_COMMON_CONF_OPT += --enable-libmudflap +else +HOST_GCC_COMMON_CONF_OPT += --disable-libmudflap +endif + +ifeq ($(BR2_PTHREADS_NONE),y) +HOST_GCC_COMMON_CONF_OPT += \ + --disable-threads \ + --disable-libitm \ + --disable-libatomic +else +HOST_GCC_COMMON_CONF_OPT += --enable-threads +endif + +ifeq ($(BR2_GCC_NEEDS_MPC),y) +HOST_GCC_COMMON_DEPENDENCIES += host-mpc +HOST_GCC_COMMON_CONF_OPT += --with-mpc=$(HOST_DIR)/usr +endif + +ifeq ($(BR2_arc),y) +HOST_GCC_COMMON_DEPENDENCIES += host-flex host-bison +endif + +ifeq ($(BR2_SOFT_FLOAT),y) +# only mips*-*-*, arm*-*-* and sparc*-*-* accept --with-float +# powerpc seems to be needing it as well +ifeq ($(BR2_arm)$(BR2_armeb)$(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el)$(BR2_powerpc)$(BR2_sparc),y) +HOST_GCC_COMMON_CONF_OPT += --with-float=soft +endif +endif + +ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y) +HOST_GCC_COMMON_CONF_OPT += --disable-decimal-float +endif + +# Determine arch/tune/abi/cpu options +ifneq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),) +HOST_GCC_COMMON_CONF_OPT += --with-arch=$(BR2_GCC_TARGET_ARCH) +endif +ifneq ($(call qstrip,$(BR2_GCC_TARGET_TUNE)),) +HOST_GCC_COMMON_CONF_OPT += --with-tune=$(BR2_GCC_TARGET_TUNE) +endif +ifneq ($(call qstrip,$(BR2_GCC_TARGET_ABI)),) +HOST_GCC_COMMON_CONF_OPT += --with-abi=$(BR2_GCC_TARGET_ABI) +endif +# GCC doesn't support --with-cpu for bfin +ifeq ($(BR2_bfin),) +ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU)),) +ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU_REVISION)),) +HOST_GCC_COMMON_CONF_OPT += --with-cpu=$(call qstrip,$(BR2_GCC_TARGET_CPU)-$(BR2_GCC_TARGET_CPU_REVISION)) +else +HOST_GCC_COMMON_CONF_OPT += --with-cpu=$(call qstrip,$(BR2_GCC_TARGET_CPU)) +endif +endif +endif + +GCC_TARGET_FPU = $(call qstrip,$(BR2_GCC_TARGET_FPU)) +ifneq ($(GCC_TARGET_FPU),) +HOST_GCC_COMMON_CONF_OPT += --with-fpu=$(GCC_TARGET_FPU) +endif + +GCC_TARGET_FLOAT_ABI = $(call qstrip,$(BR2_GCC_TARGET_FLOAT_ABI)) +ifneq ($(GCC_TARGET_FLOAT_ABI),) +HOST_GCC_COMMON_CONF_OPT += --with-float=$(GCC_TARGET_FLOAT_ABI) +endif + +GCC_TARGET_MODE = $(call qstrip,$(BR2_GCC_TARGET_MODE)) +ifneq ($(GCC_TARGET_MODE),) +HOST_GCC_COMMON_CONF_OPT += --with-mode=$(GCC_TARGET_MODE) +endif + +# Branding works on >= 4.3 +ifneq ($(findstring x4.2.,x$(GCC_VERSION)),x4.2.) +HOST_GCC_COMMON_CONF_OPT += \ + --with-pkgversion="Buildroot $(BR2_VERSION_FULL)" \ + --with-bugurl="http://bugs.buildroot.net/" +endif + +# Enable proper double/long double for SPE ABI +ifeq ($(BR2_powerpc_SPE),y) +HOST_GCC_COMMON_CONF_OPT += \ + --enable-e500_double \ + --with-long-double-128 +endif + +include $(sort $(wildcard package/gcc/*/*.mk)) diff --git a/package/gd/Config.in b/package/gd/Config.in new file mode 100644 index 0000000000..ba6f3267ba --- /dev/null +++ b/package/gd/Config.in @@ -0,0 +1,62 @@ +config BR2_PACKAGE_GD + bool "gd" + help + GD is a graphics library. It allows your code to quickly + draw images complete with lines, arcs, text, multiple + colours, cut and paste from other images, flood fills, and + write out the result as a PNG file. This is particularly + useful in World Wide Web applications, where PNG is one of + the formats accepted for inline images by most browsers. + + http://www.boutell.com/gd/ + +if BR2_PACKAGE_GD + +menu "gd tools" + +config BR2_PACKAGE_GD_ANNOTATE + bool "annotate" + +config BR2_PACKAGE_GD_BDFTOGD + bool "bdftogd" + depends on BR2_PACKAGE_PERL + +config BR2_PACKAGE_GD_GD2COPYPAL + bool "gd2copypal" + +config BR2_PACKAGE_GD_GD2TOGIF + bool "gd2togif" + +config BR2_PACKAGE_GD_GD2TOPNG + bool "gd2topng" + select BR2_PACKAGE_LIBPNG + +config BR2_PACKAGE_GD_GDCMPGIF + bool "gdcmpgif" + +config BR2_PACKAGE_GD_GDPARTTOPNG + bool "gdparttopng" + select BR2_PACKAGE_LIBPNG + +config BR2_PACKAGE_GD_GDTOPNG + bool "gdtopng" + select BR2_PACKAGE_LIBPNG + +config BR2_PACKAGE_GD_GIFTOGD2 + bool "giftogd2" + +config BR2_PACKAGE_GD_PNGTOGD + bool "pngtogd" + select BR2_PACKAGE_LIBPNG + +config BR2_PACKAGE_GD_PNGTOGD2 + bool "pngtogd2" + select BR2_PACKAGE_LIBPNG + +config BR2_PACKAGE_GD_WEBPNG + bool "webpng" + select BR2_PACKAGE_LIBPNG + +endmenu + +endif diff --git a/package/gd/gd-fontconfig.patch b/package/gd/gd-fontconfig.patch new file mode 100644 index 0000000000..651fbec8a0 --- /dev/null +++ b/package/gd/gd-fontconfig.patch @@ -0,0 +1,28 @@ +Patch from Gentoo: +http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/gd/files/gd-2.0.35-fontconfig.patch?view=log + +fix from upstream + +http://bugs.gentoo.org/363367 + +# HG changeset patch +# User tabe +# Date 1239812355 0 +# Node ID 3ea283efcdafcb2acc1dd0ace1d3d48da6d8cec8 +# Parent 4f29a877875f63cee5a64e7bea406a61882a565e +fixed FS#199 + +199, Fixed useFontConfig() to work as documented (Ethan Merritt) + +diff -r 4f29a877875f -r 3ea283efcdaf gdft.c +--- a/gdft.c Sat Apr 04 12:00:37 2009 +0000 ++++ b/gdft.c Wed Apr 15 16:19:15 2009 +0000 +@@ -1659,7 +1659,7 @@ + BGD_DECLARE(int) gdFTUseFontConfig(int flag) + { + #ifdef HAVE_LIBFONTCONFIG +- fontConfigFlag = 1; ++ fontConfigFlag = flag; + return 1; + #else + return 0; diff --git a/package/gd/gd-gdlib-config.patch b/package/gd/gd-gdlib-config.patch new file mode 100644 index 0000000000..bfff88bbc5 --- /dev/null +++ b/package/gd/gd-gdlib-config.patch @@ -0,0 +1,32 @@ +Fix gdlib-config + +Since the @LIBICONV@ macro doesn't get replaced at compile time, we +end up installing an invalid gdlib-config: the gdlib-config --libs +says that one should link against @LIBICONV@ which obviously doesn't +work. + +Use the OpenWRT patch from +https://dev.openwrt.org/browser/packages/libs/gd/patches/101-gdlib-config.patch + +Signed-off-by: Thomas Petazzoni + +--- a/config/gdlib-config.in ++++ b/config/gdlib-config.in +@@ -71,7 +71,7 @@ while test $# -gt 0; do + echo @LDFLAGS@ + ;; + --libs) +- echo @LIBS@ @LIBICONV@ ++ echo @LIBS@ + ;; + --cflags|--includes) + echo -I@includedir@ +@@ -84,7 +84,7 @@ while test $# -gt 0; do + echo "includedir: $includedir" + echo "cflags: -I@includedir@" + echo "ldflags: @LDFLAGS@" +- echo "libs: @LIBS@ @LIBICONV@" ++ echo "libs: @LIBS@" + echo "libdir: $libdir" + echo "features: @FEATURES@" + ;; diff --git a/package/gd/gd-iconv.patch b/package/gd/gd-iconv.patch new file mode 100644 index 0000000000..821f5cbdb2 --- /dev/null +++ b/package/gd/gd-iconv.patch @@ -0,0 +1,17 @@ +Seems gd is using an ancient gettext for m4 sources which has issues. +Idea from OpenWRT patch and general knowledge on the internetweb. + +Signed-off-by: Gustavo Zacarias + +diff -Nura gd-2.0.35.orig/configure.ac gd-2.0.35/configure.ac +--- gd-2.0.35.orig/configure.ac 2012-12-15 08:36:07.165683957 -0300 ++++ gd-2.0.35/configure.ac 2012-12-15 08:42:59.354213570 -0300 +@@ -61,7 +61,7 @@ + AC_HEADER_STDC + AC_CHECK_HEADERS([errno.h limits.h stddef.h stdlib.h string.h unistd.h]) + +-AM_ICONV ++m4_pattern_allow([AM_ICONV]) + # if test -n "$LIBICONV" ; then + # LIBS="$LIBS $LIBICONV" + # fi diff --git a/package/gd/gd-libpng-config.patch b/package/gd/gd-libpng-config.patch new file mode 100644 index 0000000000..cf8b92e445 --- /dev/null +++ b/package/gd/gd-libpng-config.patch @@ -0,0 +1,30 @@ +Call the libpng12-confg and libpng-config specified by +$LIBPNG12_CONFIG and $LIBPNG_CONFIG variables that are set by +ac_cv_path_LIBPNG12_CONFIG and ac_cv_path_LIBPNG_CONFIG. This is +important for cross compiler that need to get the staging settings +instead of the host settings. + +Signed-off-by: Jean-Christian de Rivaz + +diff -Nura gd-2.0.35.orig/configure.ac gd-2.0.35/configure.ac +--- gd-2.0.35.orig/configure.ac 2013-01-18 02:00:59.000000000 +0100 ++++ gd-2.0.35/configure.ac 2013-01-18 02:01:44.000000000 +0100 +@@ -353,14 +353,14 @@ + AC_PATH_PROG([LIBPNG12_CONFIG], [libpng12-config]) + AC_PATH_PROG([LIBPNG_CONFIG], [libpng-config]) + if test -n "$LIBPNG12_CONFIG"; then +- libpng_CPPFLAGS=`libpng12-config --cflags` ++ libpng_CPPFLAGS=`$LIBPNG12_CONFIG --cflags` + # should be --ldopts, but it's currently broken +- libpng_LDFLAGS=`libpng12-config --ldflags` ++ libpng_LDFLAGS=`$LIBPNG12_CONFIG --ldflags` + libpng_LDFLAGS=`echo " $libpng_LDFLAGS" | sed 's/ -l[[^ ]][[^ ]]*//g'` + elif test -n "$LIBPNG_CONFIG"; then +- libpng_CPPFLAGS=`libpng-config --cflags` ++ libpng_CPPFLAGS=`$LIBPNG_CONFIG --cflags` + # should be --ldopts, but it's currently broken +- libpng_LDFLAGS=`libpng-config --ldflags` ++ libpng_LDFLAGS=`$LIBPNG_CONFIG --ldflags` + libpng_LDFLAGS=`echo " $libpng_LDFLAGS" | sed 's/ -l[[^ ]][[^ ]]*//g'` + elif test -d "$withval"; then + libpng_CPPFLAGS="-I$withval/include" diff --git a/package/gd/gd-maxcolors.patch b/package/gd/gd-maxcolors.patch new file mode 100644 index 0000000000..161cf19935 --- /dev/null +++ b/package/gd/gd-maxcolors.patch @@ -0,0 +1,20 @@ +Patch from Gentoo: +http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/gd/files/gd-2.0.35-maxcolors.patch?view=log + +http://bugs.gentoo.org/292130 + +fix in usptream repo already + +--- gd-2.0.35/gd_gd.c ++++ gd-2.0.35/gd_gd.c +@@ -44,6 +44,10 @@ + { + goto fail1; + } ++ if (im->colorsTotal > gdMaxColors) ++ { ++ goto fail1; ++ } + } + /* Int to accommodate truecolor single-color transparency */ + if (!gdGetInt (&im->transparent, in)) diff --git a/package/gd/gd-no-zlib.patch b/package/gd/gd-no-zlib.patch new file mode 100644 index 0000000000..cb265b2a3b --- /dev/null +++ b/package/gd/gd-no-zlib.patch @@ -0,0 +1,51 @@ +[PATCH] gd_gd2: provide dummy implementations for all public symbols when !zlib + +gd_gd2.c only provides dummy implementations for some of it's public symbols +when zlib isn't found, causing build failures in several of the tools. + +Fix it by providing dummy implementations for all of them. + +Signed-off-by: Peter Korsgaard +--- + gd_gd2.c | 30 ++++++++++++++++++++++++++++++ + 1 file changed, 30 insertions(+) + +Index: gd-2.0.35/gd_gd2.c +=================================================================== +--- gd-2.0.35.orig/gd_gd2.c ++++ gd-2.0.35/gd_gd2.c +@@ -1068,4 +1068,34 @@ + fprintf (stderr, "GD2 support is not available - no libz\n"); + return NULL; + } ++ ++BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2Part (FILE * inFile, int srcx, int srcy, int w, int h) ++{ ++ fprintf (stderr, "GD2 support is not available - no libz\n"); ++ return NULL; ++} ++ ++BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2PartPtr (int size, void *data, int srcx, int srcy, int w, ++ int h) ++{ ++ fprintf (stderr, "GD2 support is not available - no libz\n"); ++ return NULL; ++} ++ ++BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2PartCtx (gdIOCtx * in, int srcx, int srcy, int w, int h) ++{ ++ fprintf (stderr, "GD2 support is not available - no libz\n"); ++ return NULL; ++} ++ ++BGD_DECLARE(void) gdImageGd2 (gdImagePtr im, FILE * outFile, int cs, int fmt) ++{ ++ fprintf (stderr, "GD2 support is not available - no libz\n"); ++} ++ ++BGD_DECLARE(void *) gdImageGd2Ptr (gdImagePtr im, int cs, int fmt, int *size) ++{ ++ fprintf (stderr, "GD2 support is not available - no libz\n"); ++ return NULL; ++} + #endif /* HAVE_LIBZ */ diff --git a/package/gd/gd.mk b/package/gd/gd.mk new file mode 100644 index 0000000000..60c1c51437 --- /dev/null +++ b/package/gd/gd.mk @@ -0,0 +1,89 @@ +################################################################################ +# +# gd +# +################################################################################ + +GD_VERSION = 2.0.35 +GD_SOURCE = gd-$(GD_VERSION).tar.bz2 +GD_SITE = http://distfiles.gentoo.org/distfiles +# needed because of configure.ac timestamp +GD_AUTORECONF = YES +GD_INSTALL_STAGING = YES +GD_LICENSE = GD license +GD_LICENSE_FILES = COPYING + +GD_CONFIG_SCRIPTS = gdlib-config +GD_CONF_OPT = --without-x --disable-rpath + +ifeq ($(BR2_PACKAGE_FONTCONFIG),y) +GD_DEPENDENCIES += fontconfig +GD_CONF_OPT += --with-fontconfig +endif + +ifeq ($(BR2_PACKAGE_FREETYPE),y) +GD_DEPENDENCIES += freetype +GD_CONF_ENV += ac_cv_path_FREETYPE_CONFIG=$(STAGING_DIR)/usr/bin/freetype-config +else +GD_CONF_OPT += --without-freetype +endif + +ifeq ($(BR2_PACKAGE_JPEG),y) +GD_DEPENDENCIES += jpeg +GD_CONF_OPT += --with-jpeg +endif + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +GD_DEPENDENCIES += libpng +GD_CONF_OPT += --with-png +GD_CONF_ENV += ac_cv_path_LIBPNG12_CONFIG="" +GD_CONF_ENV += ac_cv_path_LIBPNG_CONFIG=$(STAGING_DIR)/usr/bin/libpng-config +else +GD_CONF_OPT += --without-png +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXPM),y) +GD_DEPENDENCIES += xlib_libXpm +GD_CONF_OPT += --with-xpm +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +GD_DEPENDENCIES += zlib +endif + +ifeq ($(BR2_PACKAGE_GETTEXT),y) +GD_DEPENDENCIES += gettext +else +# configure.ac has newer timestamp than aclocal.m4 / configure, so we need +# to autoreconf to regenerate them (or set configure.ac timestamp to older +# than them) to make the Makefile happy. +# configure.ac refers to AM_ICONV which we only have if gettext is enabled, +# so add a dummy definition elsewise +define GD_FIXUP_ICONV + echo 'm4_ifndef([AM_ICONV],[m4_define([AM_ICONV],[:])])' \ + >> $(@D)/acinclude.m4 +endef + +GD_PRE_CONFIGURE_HOOKS += GD_FIXUP_ICONV +endif + +GD_TOOLS_$(BR2_PACKAGE_GD_ANNOTATE) += annotate +GD_TOOLS_$(BR2_PACKAGE_GD_BDFTOGD) += bdftogd +GD_TOOLS_$(BR2_PACKAGE_GD_GD2COPYPAL) += gd2copypal +GD_TOOLS_$(BR2_PACKAGE_GD_GD2TOGIF) += gd2togif +GD_TOOLS_$(BR2_PACKAGE_GD_GD2TOPNG) += gd2topng +GD_TOOLS_$(BR2_PACKAGE_GD_GDCMPGIF) += gdcmpgif +GD_TOOLS_$(BR2_PACKAGE_GD_GDPARTTOPNG) += gdparttopng +GD_TOOLS_$(BR2_PACKAGE_GD_GDTOPNG) += gdtopng +GD_TOOLS_$(BR2_PACKAGE_GD_GIFTOGD2) += giftogd2 +GD_TOOLS_$(BR2_PACKAGE_GD_PNGTOGD) += pngtogd +GD_TOOLS_$(BR2_PACKAGE_GD_PNGTOGD2) += pngtogd2 +GD_TOOLS_$(BR2_PACKAGE_GD_WEBPNG) += webpng + +define GD_REMOVE_TOOLS + rm -f $(addprefix $(TARGET_DIR)/usr/bin/,$(GD_TOOLS_)) +endef + +GD_POST_INSTALL_TARGET_HOOKS += GD_REMOVE_TOOLS + +$(eval $(autotools-package)) diff --git a/toolchain/gdb/6.6/100-uclibc-conf.patch b/package/gdb/6.6a/100-uclibc-conf.patch similarity index 100% rename from toolchain/gdb/6.6/100-uclibc-conf.patch rename to package/gdb/6.6a/100-uclibc-conf.patch diff --git a/toolchain/gdb/6.6/600-fix-compile-flag-mismatch.patch b/package/gdb/6.6a/600-fix-compile-flag-mismatch.patch similarity index 100% rename from toolchain/gdb/6.6/600-fix-compile-flag-mismatch.patch rename to package/gdb/6.6a/600-fix-compile-flag-mismatch.patch diff --git a/toolchain/gdb/6.6/gdb-6.6-bfin-gdbserver.patch b/package/gdb/6.6a/gdb-6.6-bfin-gdbserver.patch similarity index 100% rename from toolchain/gdb/6.6/gdb-6.6-bfin-gdbserver.patch rename to package/gdb/6.6a/gdb-6.6-bfin-gdbserver.patch diff --git a/package/gdb/7.4.1/00_all_ptrace_setsiginfo.patch b/package/gdb/7.4.1/00_all_ptrace_setsiginfo.patch new file mode 100644 index 0000000000..81a92db9a2 --- /dev/null +++ b/package/gdb/7.4.1/00_all_ptrace_setsiginfo.patch @@ -0,0 +1,314 @@ +fix from upstream for building with newer kernel headers + +From a7f9ca9cb797d653dc7919538e1dfa0c26010331 Mon Sep 17 00:00:00 2001 +From: tschwinge +Date: Wed, 21 Mar 2012 13:43:50 +0000 +Subject: [PATCH] struct siginfo vs. siginfo_t + +gdb/ + * amd64-linux-nat.c (amd64_linux_siginfo_fixup): Use siginfo_t instead + of struct siginfo. + * arm-linux-nat.c (arm_linux_stopped_data_address): Likewise. + * ia64-linux-nat.c (ia64_linux_stopped_data_address): Likewise. + * linux-nat.c (linux_nat_siginfo_fixup, siginfo_fixup) + (linux_xfer_siginfo, linux_nat_set_siginfo_fixup) + (linux_nat_get_siginfo): Likewise. + * linux-nat.h (struct lwp_info, linux_nat_set_siginfo_fixup) + (linux_nat_get_siginfo): Likewise. + * linux-tdep.c (linux_get_siginfo_type): Likewise. + * ppc-linux-nat.c (ppc_linux_stopped_data_address): Likewise. + * procfs.c (gdb_siginfo_t): Likewise. + +gdbserver/ + * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of + struct siginfo. + * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise. + * linux-x86-low.c (x86_siginfo_fixup): Likewise. + * linux-low.h: Include . + (struct siginfo): Remove forward declaration. + (struct linux_target_ops) : Use siginfo_t instead of + struct siginfo. +--- + gdb/ChangeLog | 15 +++++++++++++++ + gdb/amd64-linux-nat.c | 4 ++-- + gdb/arm-linux-nat.c | 2 +- + gdb/gdbserver/ChangeLog | 11 +++++++++++ + gdb/gdbserver/linux-arm-low.c | 2 +- + gdb/gdbserver/linux-low.c | 10 +++++----- + gdb/gdbserver/linux-low.h | 5 ++--- + gdb/gdbserver/linux-x86-low.c | 4 ++-- + gdb/ia64-linux-nat.c | 2 +- + gdb/linux-nat.c | 16 ++++++++-------- + gdb/linux-nat.h | 6 +++--- + gdb/ppc-linux-nat.c | 2 +- + gdb/procfs.c | 2 +- + 13 files changed, 53 insertions(+), 28 deletions(-) + +diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c +index f954483..5ebba3a 100644 +--- a/gdb/amd64-linux-nat.c ++++ b/gdb/amd64-linux-nat.c +@@ -731,13 +731,13 @@ siginfo_from_compat_siginfo (siginfo_t *to, compat_siginfo_t *from) + INF. */ + + static int +-amd64_linux_siginfo_fixup (struct siginfo *native, gdb_byte *inf, int direction) ++amd64_linux_siginfo_fixup (siginfo_t *native, gdb_byte *inf, int direction) + { + /* Is the inferior 32-bit? If so, then do fixup the siginfo + object. */ + if (gdbarch_addr_bit (get_frame_arch (get_current_frame ())) == 32) + { +- gdb_assert (sizeof (struct siginfo) == sizeof (compat_siginfo_t)); ++ gdb_assert (sizeof (siginfo_t) == sizeof (compat_siginfo_t)); + + if (direction == 0) + compat_siginfo_from_siginfo ((struct compat_siginfo *) inf, native); +diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c +index c5ce21c..f9f6ba5 100644 +--- a/gdb/arm-linux-nat.c ++++ b/gdb/arm-linux-nat.c +@@ -1137,7 +1137,7 @@ arm_linux_remove_watchpoint (CORE_ADDR addr, int len, int rw, + static int + arm_linux_stopped_data_address (struct target_ops *target, CORE_ADDR *addr_p) + { +- struct siginfo *siginfo_p = linux_nat_get_siginfo (inferior_ptid); ++ siginfo_t *siginfo_p = linux_nat_get_siginfo (inferior_ptid); + int slot = siginfo_p->si_errno; + + /* This must be a hardware breakpoint. */ +diff --git a/gdb/gdbserver/linux-arm-low.c b/gdb/gdbserver/linux-arm-low.c +index ff2437d..01208ef 100644 +--- a/gdb/gdbserver/linux-arm-low.c ++++ b/gdb/gdbserver/linux-arm-low.c +@@ -631,7 +631,7 @@ static int + arm_stopped_by_watchpoint (void) + { + struct lwp_info *lwp = get_thread_lwp (current_inferior); +- struct siginfo siginfo; ++ siginfo_t siginfo; + + /* We must be able to set hardware watchpoints. */ + if (arm_linux_get_hw_watchpoint_count () == 0) +diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c +index d2d4c1d..4734f15 100644 +--- a/gdb/gdbserver/linux-low.c ++++ b/gdb/gdbserver/linux-low.c +@@ -4779,7 +4779,7 @@ linux_qxfer_osdata (const char *annex, + layout of the inferiors' architecture. */ + + static void +-siginfo_fixup (struct siginfo *siginfo, void *inf_siginfo, int direction) ++siginfo_fixup (siginfo_t *siginfo, void *inf_siginfo, int direction) + { + int done = 0; + +@@ -4791,9 +4791,9 @@ siginfo_fixup (struct siginfo *siginfo, void *inf_siginfo, int direction) + if (!done) + { + if (direction == 1) +- memcpy (siginfo, inf_siginfo, sizeof (struct siginfo)); ++ memcpy (siginfo, inf_siginfo, sizeof (siginfo_t)); + else +- memcpy (inf_siginfo, siginfo, sizeof (struct siginfo)); ++ memcpy (inf_siginfo, siginfo, sizeof (siginfo_t)); + } + } + +@@ -4802,8 +4802,8 @@ linux_xfer_siginfo (const char *annex, unsigned char *readbuf, + unsigned const char *writebuf, CORE_ADDR offset, int len) + { + int pid; +- struct siginfo siginfo; +- char inf_siginfo[sizeof (struct siginfo)]; ++ siginfo_t siginfo; ++ char inf_siginfo[sizeof (siginfo_t)]; + + if (current_inferior == NULL) + return -1; +diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h +index 677d261..3aeae70 100644 +--- a/gdb/gdbserver/linux-low.h ++++ b/gdb/gdbserver/linux-low.h +@@ -20,6 +20,7 @@ + #ifdef HAVE_THREAD_DB_H + #include + #endif ++#include + + #include "gdb_proc_service.h" + +@@ -46,8 +47,6 @@ struct regset_info + extern struct regset_info target_regsets[]; + #endif + +-struct siginfo; +- + struct process_info_private + { + /* Arch-specific additions. */ +@@ -109,7 +108,7 @@ struct linux_target_ops + Returns true if any conversion was done; false otherwise. + If DIRECTION is 1, then copy from INF to NATIVE. + If DIRECTION is 0, copy from NATIVE to INF. */ +- int (*siginfo_fixup) (struct siginfo *native, void *inf, int direction); ++ int (*siginfo_fixup) (siginfo_t *native, void *inf, int direction); + + /* Hook to call when a new process is created or attached to. + If extra per-process architecture-specific data is needed, +diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c +index ed1f8a8..b466b5d 100644 +--- a/gdb/gdbserver/linux-x86-low.c ++++ b/gdb/gdbserver/linux-x86-low.c +@@ -918,13 +918,13 @@ siginfo_from_compat_siginfo (siginfo_t *to, compat_siginfo_t *from) + INF. */ + + static int +-x86_siginfo_fixup (struct siginfo *native, void *inf, int direction) ++x86_siginfo_fixup (siginfo_t *native, void *inf, int direction) + { + #ifdef __x86_64__ + /* Is the inferior 32-bit? If so, then fixup the siginfo object. */ + if (register_size (0) == 4) + { +- if (sizeof (struct siginfo) != sizeof (compat_siginfo_t)) ++ if (sizeof (siginfo_t) != sizeof (compat_siginfo_t)) + fatal ("unexpected difference in siginfo"); + + if (direction == 0) +diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c +index 8773195..19b827f 100644 +--- a/gdb/ia64-linux-nat.c ++++ b/gdb/ia64-linux-nat.c +@@ -637,7 +637,7 @@ static int + ia64_linux_stopped_data_address (struct target_ops *ops, CORE_ADDR *addr_p) + { + CORE_ADDR psr; +- struct siginfo *siginfo_p; ++ siginfo_t *siginfo_p; + struct regcache *regcache = get_current_regcache (); + + siginfo_p = linux_nat_get_siginfo (inferior_ptid); +diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c +index f80c0c1..d81d55e 100644 +--- a/gdb/linux-nat.c ++++ b/gdb/linux-nat.c +@@ -188,7 +188,7 @@ static void (*linux_nat_prepare_to_resume) (struct lwp_info *); + /* The method to call, if any, when the siginfo object needs to be + converted between the layout returned by ptrace, and the layout in + the architecture of the inferior. */ +-static int (*linux_nat_siginfo_fixup) (struct siginfo *, ++static int (*linux_nat_siginfo_fixup) (siginfo_t *, + gdb_byte *, + int); + +@@ -4232,7 +4232,7 @@ linux_nat_mourn_inferior (struct target_ops *ops) + layout of the inferiors' architecture. */ + + static void +-siginfo_fixup (struct siginfo *siginfo, gdb_byte *inf_siginfo, int direction) ++siginfo_fixup (siginfo_t *siginfo, gdb_byte *inf_siginfo, int direction) + { + int done = 0; + +@@ -4244,9 +4244,9 @@ siginfo_fixup (struct siginfo *siginfo, gdb_byte *inf_siginfo, int direction) + if (!done) + { + if (direction == 1) +- memcpy (siginfo, inf_siginfo, sizeof (struct siginfo)); ++ memcpy (siginfo, inf_siginfo, sizeof (siginfo_t)); + else +- memcpy (inf_siginfo, siginfo, sizeof (struct siginfo)); ++ memcpy (inf_siginfo, siginfo, sizeof (siginfo_t)); + } + } + +@@ -4256,8 +4256,8 @@ linux_xfer_siginfo (struct target_ops *ops, enum target_object object, + const gdb_byte *writebuf, ULONGEST offset, LONGEST len) + { + int pid; +- struct siginfo siginfo; +- gdb_byte inf_siginfo[sizeof (struct siginfo)]; ++ siginfo_t siginfo; ++ gdb_byte inf_siginfo[sizeof (siginfo_t)]; + + gdb_assert (object == TARGET_OBJECT_SIGNAL_INFO); + gdb_assert (readbuf || writebuf); +@@ -5266,7 +5266,7 @@ linux_nat_set_new_thread (struct target_ops *t, + inferior. */ + void + linux_nat_set_siginfo_fixup (struct target_ops *t, +- int (*siginfo_fixup) (struct siginfo *, ++ int (*siginfo_fixup) (siginfo_t *, + gdb_byte *, + int)) + { +@@ -5285,7 +5285,7 @@ linux_nat_set_prepare_to_resume (struct target_ops *t, + } + + /* Return the saved siginfo associated with PTID. */ +-struct siginfo * ++siginfo_t * + linux_nat_get_siginfo (ptid_t ptid) + { + struct lwp_info *lp = find_lwp_pid (ptid); +diff --git a/gdb/linux-nat.h b/gdb/linux-nat.h +index c9878d9..d87f0cf 100644 +--- a/gdb/linux-nat.h ++++ b/gdb/linux-nat.h +@@ -78,7 +78,7 @@ struct lwp_info + + /* Non-zero si_signo if this LWP stopped with a trap. si_addr may + be the address of a hardware watchpoint. */ +- struct siginfo siginfo; ++ siginfo_t siginfo; + + /* STOPPED_BY_WATCHPOINT is non-zero if this LWP stopped with a data + watchpoint trap. */ +@@ -184,7 +184,7 @@ void linux_nat_set_new_thread (struct target_ops *, void (*) (struct lwp_info *) + that ptrace returns, and the layout in the architecture of the + inferior. */ + void linux_nat_set_siginfo_fixup (struct target_ops *, +- int (*) (struct siginfo *, ++ int (*) (siginfo_t *, + gdb_byte *, + int)); + +@@ -198,7 +198,7 @@ void linux_nat_set_prepare_to_resume (struct target_ops *, + void linux_nat_switch_fork (ptid_t new_ptid); + + /* Return the saved siginfo associated with PTID. */ +-struct siginfo *linux_nat_get_siginfo (ptid_t ptid); ++siginfo_t *linux_nat_get_siginfo (ptid_t ptid); + + /* Compute and return the processor core of a given thread. */ + int linux_nat_core_of_thread_1 (ptid_t ptid); +diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c +index 1bd157b..9bd11fd 100644 +--- a/gdb/ppc-linux-nat.c ++++ b/gdb/ppc-linux-nat.c +@@ -2218,7 +2218,7 @@ ppc_linux_thread_exit (struct thread_info *tp, int silent) + static int + ppc_linux_stopped_data_address (struct target_ops *target, CORE_ADDR *addr_p) + { +- struct siginfo *siginfo_p; ++ siginfo_t *siginfo_p; + + siginfo_p = linux_nat_get_siginfo (inferior_ptid); + +diff --git a/gdb/procfs.c b/gdb/procfs.c +index 903621d..cb4bc7c 100644 +--- a/gdb/procfs.c ++++ b/gdb/procfs.c +@@ -266,7 +266,7 @@ typedef struct sigaction gdb_sigaction_t; + #ifdef HAVE_PR_SIGINFO64_T + typedef pr_siginfo64_t gdb_siginfo_t; + #else +-typedef struct siginfo gdb_siginfo_t; ++typedef siginfo_t gdb_siginfo_t; + #endif + + /* On mips-irix, praddset and prdelset are defined in such a way that +-- +1.7.9.7 + diff --git a/package/gdb/7.4.1/05_all_readline-headers.patch b/package/gdb/7.4.1/05_all_readline-headers.patch new file mode 100644 index 0000000000..e65adf6e6d --- /dev/null +++ b/package/gdb/7.4.1/05_all_readline-headers.patch @@ -0,0 +1,42 @@ +--- a/readline/complete.c ++++ b/readline/complete.c +@@ -25,6 +25,11 @@ + # include + #endif + ++#ifdef HAVE_WCHAR_H /* wcwidth() */ ++# define _GNU_SOURCE ++# include ++#endif ++ + #include + #include + #if defined (HAVE_SYS_FILE_H) +--- a/readline/display.c ++++ b/readline/display.c +@@ -25,6 +25,11 @@ + # include + #endif + ++#ifdef HAVE_WCHAR_H /* wcwidth() */ ++# define _GNU_SOURCE ++# include ++#endif ++ + #include + + #if defined (HAVE_UNISTD_H) +--- a/readline/mbutil.c ++++ b/readline/mbutil.c +@@ -25,6 +25,11 @@ + # include + #endif + ++#ifdef HAVE_WCHAR_H /* wcwidth() */ ++# define _GNU_SOURCE ++# include ++#endif ++ + #include + #include + #include "posixjmp.h" diff --git a/package/gdb/7.4.1/xtensa-asm-ptrace-h.patch b/package/gdb/7.4.1/xtensa-asm-ptrace-h.patch new file mode 100644 index 0000000000..3d1b07c99c --- /dev/null +++ b/package/gdb/7.4.1/xtensa-asm-ptrace-h.patch @@ -0,0 +1,22 @@ +--- gdb-7.4.1/gdb/xtensa-linux-nat.c.orig 2012-10-19 16:23:06.908165323 -0700 ++++ gdb-7.4.1/gdb/xtensa-linux-nat.c 2012-10-19 16:35:30.792134876 -0700 +@@ -36,7 +36,7 @@ + #include "gdb_wait.h" + #include + #include +-#include ++#include + + #include "gregset.h" + #include "xtensa-tdep.h" +--- gdb-7.4.1/gdb/gdbserver/linux-xtensa-low.c.orig 2012-10-19 16:24:06.260162894 -0700 ++++ gdb-7.4.1/gdb/gdbserver/linux-xtensa-low.c 2012-10-19 16:36:07.920133357 -0700 +@@ -23,7 +23,7 @@ + /* Defined in auto-generated file reg-xtensa.c. */ + void init_registers_xtensa (void); + +-#include ++#include + #include + + #include "xtensa-xtregs.c" diff --git a/package/gdb/7.4.1/xtensa-gdb-regsize.patch b/package/gdb/7.4.1/xtensa-gdb-regsize.patch new file mode 100644 index 0000000000..e10bb8f3ee --- /dev/null +++ b/package/gdb/7.4.1/xtensa-gdb-regsize.patch @@ -0,0 +1,19 @@ +--- gdb-7.4.1/gdb/xtensa-tdep.h.orig 2012-10-30 11:40:23.546448594 -0700 ++++ gdb-7.4.1/gdb/xtensa-tdep.h 2012-10-30 11:41:43.078445337 -0700 +@@ -17,6 +17,7 @@ + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + ++#include + + /* XTENSA_TDEP_VERSION can/should be changed along with XTENSA_CONFIG_VERSION + whenever the "tdep" structure changes in an incompatible way. */ +@@ -84,7 +85,7 @@ + /* Xtensa ELF core file register set representation ('.reg' section). + Copied from target-side ELF header . */ + +-typedef unsigned long xtensa_elf_greg_t; ++typedef uint32_t xtensa_elf_greg_t; + + typedef struct + { diff --git a/package/gdb/Config.in b/package/gdb/Config.in new file mode 100644 index 0000000000..5776a97fc3 --- /dev/null +++ b/package/gdb/Config.in @@ -0,0 +1,49 @@ +comment "gdb/gdbserver needs a toolchain w/ threads, threads debug" + depends on !BR2_aarch64 + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_HAS_THREADS_DEBUG + +config BR2_PACKAGE_GDB + bool "gdb" + # When the external toolchain gdbserver is copied to the + # target, we don't allow building a separate gdbserver. The + # one from the external toolchain should be used. + select BR2_PACKAGE_GDB_SERVER if \ + (!BR2_PACKAGE_GDB_DEBUGGER && !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY) + depends on BR2_TOOLCHAIN_HAS_THREADS && BR2_TOOLCHAIN_HAS_THREADS_DEBUG + depends on !BR2_aarch64 + help + GDB, the GNU Project debugger, allows you to see what is + going on `inside' another program while it executes -- or + what another program was doing at the moment it crashed. + + This option allows to build gdbserver and/or the gdb + debugger for the target. + + For embedded development, the most common solution is to + build only 'gdbserver' for the target, and use a cross-gdb + on the host. See BR2_PACKAGE_HOST_GDB in the Toolchain menu + to enable one. Notice that external toolchains often provide + their own pre-built cross-gdb and gdbserver binaries. + + http://www.gnu.org/software/gdb/ + +if BR2_PACKAGE_GDB + +config BR2_PACKAGE_GDB_SERVER + bool "gdbserver" + depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY + help + Build the gdbserver stub to run on the target. + A full gdb is needed to debug the progam. + +config BR2_PACKAGE_GDB_DEBUGGER + bool "full debugger" + select BR2_PACKAGE_NCURSES + depends on BR2_USE_WCHAR + depends on !BR2_sh && !BR2_sh64 && !BR2_avr32 && !BR2_microblaze && !BR2_bfin + +comment "full gdb on target needs a toolchain w/ wchar" + depends on !BR2_sh && !BR2_sh64 && !BR2_avr32 && !BR2_microblaze && !BR2_bfin + depends on !BR2_USE_WCHAR + +endif diff --git a/package/gdb/Config.in.host b/package/gdb/Config.in.host new file mode 100644 index 0000000000..128aed9e6c --- /dev/null +++ b/package/gdb/Config.in.host @@ -0,0 +1,63 @@ +config BR2_PACKAGE_HOST_GDB + bool "Build cross gdb for the host" + # When the external toolchain gdbserver is used, we shouldn't + # allow to build a cross-gdb, as the one of the external + # toolchain should be used. + depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY + depends on !BR2_aarch64 + help + Build a cross gdb that runs on the host machine and debugs + programs running on the target. It requires 'gdbserver' + installed on the target, see BR2_PACKAGE_GDB_SERVER to + enable it. + +if BR2_PACKAGE_HOST_GDB + +choice + prompt "GDB debugger Version" + depends on !BR2_arc + default BR2_GDB_VERSION_6_6 if BR2_bfin + default BR2_GDB_VERSION_6_7_1_AVR32_2_1_5 if BR2_avr32 + default BR2_GDB_VERSION_7_5 + help + Select the version of gdb you wish to use. + + config BR2_GDB_VERSION_6_6 + bool "gdb 6.6" + depends on BR2_bfin + + config BR2_GDB_VERSION_6_7_1_AVR32_2_1_5 + depends on BR2_avr32 + bool "gdb 6.7.1-avr32-2.1.5" + + config BR2_GDB_VERSION_7_2 + bool "gdb 7.2.x" + depends on !BR2_bfin + depends on BR2_DEPRECATED + + config BR2_GDB_VERSION_7_3 + bool "gdb 7.3.x" + depends on !BR2_bfin + depends on BR2_DEPRECATED + + config BR2_GDB_VERSION_7_4 + bool "gdb 7.4.x" + depends on !BR2_bfin + + config BR2_GDB_VERSION_7_5 + bool "gdb 7.5.x" + depends on !BR2_bfin + +endchoice + +config BR2_GDB_VERSION + string + default "6.6a" if BR2_GDB_VERSION_6_6 + default "6.7.1-avr32-2.1.5" if BR2_GDB_VERSION_6_7_1_AVR32_2_1_5 + default "7.2a" if BR2_GDB_VERSION_7_2 + default "7.3.1" if BR2_GDB_VERSION_7_3 + default "7.4.1" if BR2_GDB_VERSION_7_4 + default "7.5.1" if BR2_GDB_VERSION_7_5 + default "7.5.1-arc" if BR2_arc + +endif diff --git a/package/gdb/gdb.mk b/package/gdb/gdb.mk new file mode 100644 index 0000000000..700cf724d8 --- /dev/null +++ b/package/gdb/gdb.mk @@ -0,0 +1,132 @@ +################################################################################ +# +# gdb +# +################################################################################ + +GDB_VERSION = $(call qstrip,$(BR2_GDB_VERSION)) +GDB_SITE = $(BR2_GNU_MIRROR)/gdb + +# When no version is defined, it means that cross-gdb for the host has +# not been enabled, and we will only build gdbserver or gdb for the +# target. In this case, use the latest available version +# automatically. +ifeq ($(GDB_VERSION),) +ifeq ($(BR2_bfin),y) +GDB_VERSION = 6.6a +else ifeq ($(BR2_avr32),y) +GDB_VERSION = 6.7.1-avr32-2.1.5 +else +GDB_VERSION = 7.5.1 +endif +endif + +ifeq ($(BR2_arc),y) +GDB_SITE = $(BR2_ARC_SITE) +endif + +ifeq ($(GDB_VERSION),6.7.1-avr32-2.1.5) +GDB_SITE = ftp://www.at91.com/pub/buildroot/ +endif + +GDB_SOURCE = gdb-$(GDB_VERSION).tar.bz2 +GDB_LICENSE = GPLv2+ LGPLv2+ GPLv3+ LGPLv3+ +GDB_LICENSE_FILES = COPYING COPYING.LIB COPYING3 COPYING3.LIB + +# We only want gdbserver and not the entire debugger. +ifeq ($(BR2_PACKAGE_GDB_DEBUGGER),) +GDB_SUBDIR = gdb/gdbserver +HOST_GDB_SUBDIR = . +else +GDB_DEPENDENCIES = ncurses +endif + +# For the host variant, we really want to build with XML support, +# which is needed to read XML descriptions of target architectures. +HOST_GDB_DEPENDENCIES = host-expat + +# Apply the Xtensa specific patches +XTENSA_CORE_NAME = $(call qstrip, $(BR2_XTENSA_CORE_NAME)) +ifneq ($(XTENSA_CORE_NAME),) +define GDB_XTENSA_PRE_PATCH + tar xf $(BR2_XTENSA_OVERLAY_DIR)/xtensa_$(XTENSA_CORE_NAME).tar \ + -C $(@D) --strip-components=1 gdb +endef +GDB_PRE_PATCH_HOOKS += GDB_XTENSA_PRE_PATCH +HOST_GDB_PRE_PATCH_HOOKS += GDB_XTENSA_PRE_PATCH +endif + +GDB_CONF_ENV = \ + ac_cv_prog_MAKEINFO=missing \ + ac_cv_type_uintptr_t=yes \ + gt_cv_func_gettext_libintl=yes \ + ac_cv_func_dcgettext=yes \ + gdb_cv_func_sigsetjmp=yes \ + bash_cv_func_strcoll_broken=no \ + bash_cv_must_reinstall_sighandlers=no \ + bash_cv_func_sigsetjmp=present \ + bash_cv_have_mbstate_t=yes \ + gdb_cv_func_sigsetjmp=yes + +GDB_CONF_OPT = \ + --without-uiout \ + --disable-tui \ + --disable-gdbtk \ + --without-x \ + --disable-sim \ + $(if $(BR2_PACKAGE_GDB_SERVER),--enable-gdbserver) \ + --with-curses \ + --without-included-gettext \ + --disable-werror + +# This removes some unneeded Python scripts and XML target description +# files that are not useful for a normal usage of the debugger. +define GDB_REMOVE_UNNEEDED_FILES + $(RM) -rf $(TARGET_DIR)/usr/share/gdb +endef + +GDB_POST_INSTALL_TARGET_HOOKS += GDB_REMOVE_UNNEEDED_FILES + +# This installs the gdbserver somewhere into the $(HOST_DIR) so that +# it becomes an integral part of the SDK, if the toolchain generated +# by Buildroot is later used as an external toolchain. We install it +# in debug-root/usr/bin/gdbserver so that it matches what Crosstool-NG +# does. +define GDB_SDK_INSTALL_GDBSERVER + $(INSTALL) -D -m 0755 $(TARGET_DIR)/usr/bin/gdbserver \ + $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/debug-root/usr/bin/gdbserver +endef + +ifeq ($(BR2_PACKAGE_GDB_SERVER),y) +GDB_POST_INSTALL_TARGET_HOOKS += GDB_SDK_INSTALL_GDBSERVER +endif + +# A few notes: +# * --target, because we're doing a cross build rather than a real +# host build. +# * --enable-static because gdb really wants to use libbfd.a +# * --disable-shared, otherwise the old 6.7 version specific to AVR32 +# doesn't build because it wants to link a shared libbfd.so against +# non-PIC liberty.a. +HOST_GDB_CONF_OPT = \ + --target=$(GNU_TARGET_NAME) \ + --enable-static --disable-shared \ + --without-uiout \ + --disable-tui \ + --disable-gdbtk \ + --without-x \ + --enable-threads \ + --disable-werror \ + --without-included-gettext \ + --disable-sim + +# legacy $arch-linux-gdb symlink +define HOST_GDB_ADD_SYMLINK + cd $(HOST_DIR)/usr/bin && \ + ln -snf $(GNU_TARGET_NAME)-gdb $(ARCH)-linux-gdb +endef + +HOST_GDB_POST_INSTALL_HOOKS += HOST_GDB_ADD_SYMLINK + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/gdbm/Config.in b/package/gdbm/Config.in new file mode 100644 index 0000000000..d5aae83c50 --- /dev/null +++ b/package/gdbm/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_GDBM + bool "gdbm" + help + GNU dbm is a set of database routines that use extensible hashing. + It works similar to the standard UNIX dbm routines. + + http://www.gnu.org/software/gdbm/gdbm.html + diff --git a/package/gdbm/gdbm.mk b/package/gdbm/gdbm.mk new file mode 100644 index 0000000000..60b46c7d3a --- /dev/null +++ b/package/gdbm/gdbm.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# gdbm +# +################################################################################ + +GDBM_VERSION = 1.10 +GDBM_SITE = $(BR2_GNU_MIRROR)/gdbm +GDBM_LICENSE = GPLv3 +GDBM_LICENSE_FILES = COPYING +GDBM_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/gdk-pixbuf/Config.in b/package/gdk-pixbuf/Config.in index 8b9cc3fb7a..44942ac4f6 100644 --- a/package/gdk-pixbuf/Config.in +++ b/package/gdk-pixbuf/Config.in @@ -1,13 +1,16 @@ config BR2_PACKAGE_GDK_PIXBUF bool "gdk-pixbuf" depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 select BR2_PACKAGE_LIBGLIB2 - select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT - select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE help - Gdk-Pixbuf is an image loader and scaler. It uses GObject and the GLib, to integrate well with GNOME applications. http://www.gtk.org/ + +comment "gdk-pixbuf needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/gdk-pixbuf/gdk-pixbuf.mk b/package/gdk-pixbuf/gdk-pixbuf.mk index cf915bbd08..d1d590a82e 100644 --- a/package/gdk-pixbuf/gdk-pixbuf.mk +++ b/package/gdk-pixbuf/gdk-pixbuf.mk @@ -1,13 +1,15 @@ -############################################################# +################################################################################ # # gdk-pixbuf # -############################################################# +################################################################################ -GDK_PIXBUF_MAJOR_VERSION = 2.22 -GDK_PIXBUF_VERSION = $(GDK_PIXBUF_MAJOR_VERSION).0 -GDK_PIXBUF_SOURCE = gdk-pixbuf-$(GDK_PIXBUF_VERSION).tar.bz2 +GDK_PIXBUF_MAJOR_VERSION = 2.28 +GDK_PIXBUF_VERSION = $(GDK_PIXBUF_MAJOR_VERSION).2 +GDK_PIXBUF_SOURCE = gdk-pixbuf-$(GDK_PIXBUF_VERSION).tar.xz GDK_PIXBUF_SITE = http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/$(GDK_PIXBUF_MAJOR_VERSION) +GDK_PIXBUF_LICENSE = LGPLv2+ +GDK_PIXBUF_LICENSE_FILES = COPYING GDK_PIXBUF_INSTALL_STAGING = YES GDK_PIXBUF_CONF_ENV = \ @@ -16,10 +18,6 @@ GDK_PIXBUF_CONF_ENV = \ GDK_PIXBUF_CONF_OPT = --disable-glibtest -ifneq ($(BR2_LARGEFILE),y) -GDK_PIXBUF_CONF_OPT += --disable-largefile -endif - ifneq ($(BR2_PACKAGE_LIBPNG),y) GDK_PIXBUF_CONF_OPT += --without-libpng else @@ -38,10 +36,14 @@ else GDK_PIXBUF_DEPENDENCIES += tiff endif +ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y) +GDK_PIXBUF_CONF_OPT += --with-x11 +GDK_PIXBUF_DEPENDENCIES += xlib_libX11 +endif + GDK_PIXBUF_DEPENDENCIES += \ - $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl) \ $(if $(BR2_ENABLE_LOCALE),,libiconv) \ - host-pkg-config libglib2 + host-pkgconf libglib2 define GDK_PIXBUF_POST_INSTALL_TWEAKS $(INSTALL) -m 755 -D package/gdk-pixbuf/S26gdk-pixbuf \ @@ -50,7 +52,7 @@ endef GDK_PIXBUF_POST_INSTALL_TARGET_HOOKS += GDK_PIXBUF_POST_INSTALL_TWEAKS -$(eval $(call AUTOTARGETS,package,gdk-pixbuf)) +$(eval $(autotools-package)) HOST_GDK_PIXBUF_CONF_OPT = \ --without-libjpeg \ @@ -58,4 +60,4 @@ HOST_GDK_PIXBUF_CONF_OPT = \ HOST_GDK_PIXBUF_DEPENDENCIES = host-libpng -$(eval $(call AUTOTARGETS,package,gdk-pixbuf,host)) +$(eval $(host-autotools-package)) diff --git a/package/genext2fs/Config.in b/package/genext2fs/Config.in index 82992f8777..c8b56350c0 100644 --- a/package/genext2fs/Config.in +++ b/package/genext2fs/Config.in @@ -1,9 +1,13 @@ config BR2_PACKAGE_GENEXT2FS - bool "genext2fs" - help - genext2fs generates an ext2 filesystem as a normal (non-root) - user. It does not require you to mount the image file to - copy files on it, nor does it require that you become the - superuser to make device nodes. + bool "genext2fs" + depends on BR2_LARGEFILE + help + genext2fs generates an ext2 filesystem as a normal (non-root) + user. It does not require you to mount the image file to + copy files on it, nor does it require that you become the + superuser to make device nodes. - http://genext2fs.sourceforge.net/ + http://genext2fs.sourceforge.net/ + +comment "genext2fs needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE diff --git a/package/genext2fs/Config.in.host b/package/genext2fs/Config.in.host new file mode 100644 index 0000000000..a03e16b2e2 --- /dev/null +++ b/package/genext2fs/Config.in.host @@ -0,0 +1,9 @@ +config BR2_PACKAGE_HOST_GENEXT2FS + bool "host genext2fs" + help + genext2fs generates an ext2 filesystem as a normal (non-root) + user. It does not require you to mount the image file to + copy files on it, nor does it require that you become the + superuser to make device nodes. + + http://genext2fs.sourceforge.net/ diff --git a/package/genext2fs/genext2fs-1.4.1-nosquash.patch b/package/genext2fs/genext2fs-1.4.1-nosquash.patch deleted file mode 100644 index 236dfccdfd..0000000000 --- a/package/genext2fs/genext2fs-1.4.1-nosquash.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -ru genext2fs-1.4/genext2fs.c genext2fs-1.4-nosquash/genext2fs.c ---- genext2fs-1.4/genext2fs.c 2006-12-19 17:45:31.000000000 +0100 -+++ genext2fs-1.4-nosquash/genext2fs.c 2007-02-09 10:47:05.000000000 +0100 -@@ -1629,10 +1629,6 @@ - mtime = st.st_mtime; - name = dent->d_name; - mode = get_mode(&st); -- if(squash_uids) -- uid = gid = 0; -- if(squash_perms) -- mode &= ~(FM_IRWXG | FM_IRWXO); - if(stats) - switch(st.st_mode & S_IFMT) - { diff --git a/package/genext2fs/genext2fs-1.4.1-remove_ugly_warnings.patch b/package/genext2fs/genext2fs-1.4.1-remove_ugly_warnings.patch deleted file mode 100644 index ef23dfbe80..0000000000 --- a/package/genext2fs/genext2fs-1.4.1-remove_ugly_warnings.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -ru genext2fs-1.4/genext2fs.c genext2fs-1.4-remove_ugly_warnings/genext2fs.c ---- genext2fs-1.4/genext2fs.c 2007-02-09 10:54:56.000000000 +0100 -+++ genext2fs-1.4-remove_ugly_warnings/genext2fs.c 2007-02-09 10:54:30.000000000 +0100 -@@ -1606,7 +1606,7 @@ - static void - add2fs_from_dir(filesystem *fs, uint32 this_nod, int squash_uids, int squash_perms, uint32 fs_timestamp, struct stats *stats) - { -- uint32 nod; -+ uint32 nod = 0; - uint32 uid, gid, mode, ctime, mtime; - const char *name; - FILE *fh; -@@ -2056,7 +2056,7 @@ - static filesystem * - load_fs(FILE * fh, int swapit) - { -- size_t fssize; -+ size_t fssize = 0; - filesystem *fs; - if((fseek(fh, 0, SEEK_END) < 0) || ((ssize_t)(fssize = ftell(fh)) == -1)) - perror_msg_and_die("input filesystem image"); diff --git a/package/genext2fs/genext2fs-update-genext2fs.c-to-rev-1.118.patch b/package/genext2fs/genext2fs-update-genext2fs.c-to-rev-1.118.patch new file mode 100644 index 0000000000..755ee9dee2 --- /dev/null +++ b/package/genext2fs/genext2fs-update-genext2fs.c-to-rev-1.118.patch @@ -0,0 +1,2971 @@ +[PATCH] update genext2fs.c to CVS rev 1.118 + +See http://genext2fs.cvs.sourceforge.net/viewvc/genext2fs/genext2fs/genext2fs.c?view=log +for details. + +Numerous bugfixes, large file and filesystem support, rev 1 filesystems, +volume id support, block size, .. + +Signed-off-by: Peter Korsgaard +--- + cache.h | 128 ++++ + genext2fs.c | 1870 ++++++++++++++++++++++++++++++++++++++++++------------------ + list.h | 78 ++ + 3 files changed, 1527 insertions(+), 549 deletions(-) + +Index: genext2fs-1.4.1/genext2fs.c +=================================================================== +--- genext2fs-1.4.1.orig/genext2fs.c ++++ genext2fs-1.4.1/genext2fs.c +@@ -53,6 +53,12 @@ + // along with -q, -P, -U + + ++/* ++ * Allow fseeko/off_t to be 64-bit offsets to allow filesystems and ++ * individual files >2GB. ++ */ ++#define _FILE_OFFSET_BITS 64 ++ + #include + #include + +@@ -107,10 +113,8 @@ + + #if HAVE_DIRENT_H + # include +-# define NAMLEN(dirent) strlen((dirent)->d_name) + #else + # define dirent direct +-# define NAMLEN(dirent) (dirent)->d_namlen + # if HAVE_SYS_NDIR_H + # include + # endif +@@ -144,6 +148,8 @@ + # include + #endif + ++#include "cache.h" ++ + struct stats { + unsigned long nblocks; + unsigned long ninodes; +@@ -151,13 +157,42 @@ + + // block size + +-#define BLOCKSIZE 1024 ++static int blocksize = 1024; ++ ++#define SUPERBLOCK_OFFSET 1024 ++#define SUPERBLOCK_SIZE 1024 ++ ++#define BLOCKSIZE blocksize + #define BLOCKS_PER_GROUP 8192 + #define INODES_PER_GROUP 8192 + /* Percentage of blocks that are reserved.*/ + #define RESERVED_BLOCKS 5/100 + #define MAX_RESERVED_BLOCKS 25/100 + ++/* The default value for s_creator_os. */ ++#if defined(__linux__) && defined(EXT2_OS_LINUX) ++#define CREATOR_OS EXT2_OS_LINUX ++#define CREATOR_OS_NAME "linux" ++#else ++#if defined(__GNU__) && defined(EXT2_OS_HURD) ++#define CREATOR_OS EXT2_OS_HURD ++#define CREATOR_OS_NAME "hurd" ++#else ++#if defined(__FreeBSD__) && defined(EXT2_OS_FREEBSD) ++#define CREATOR_OS EXT2_OS_FREEBSD ++#define CREATOR_OS_NAME "freebsd" ++#else ++#if defined(LITES) && defined(EXT2_OS_LITES) ++#define CREATOR_OS EXT2_OS_LITES ++#define CREATOR_OS_NAME "lites" ++#else ++#define CREATOR_OS EXT2_OS_LINUX /* by default */ ++#define CREATOR_OS_NAME "linux" ++#endif /* defined(LITES) && defined(EXT2_OS_LITES) */ ++#endif /* defined(__FreeBSD__) && defined(EXT2_OS_FREEBSD) */ ++#endif /* defined(__GNU__) && defined(EXT2_OS_HURD) */ ++#endif /* defined(__linux__) && defined(EXT2_OS_LINUX) */ ++ + + // inode block size (why is it != BLOCKSIZE ?!?) + /* The field i_blocks in the ext2 inode stores the number of data blocks +@@ -190,6 +225,14 @@ + #define EXT2_TIND_BLOCK 14 // triple indirect block + #define EXT2_INIT_BLOCK 0xFFFFFFFF // just initialized (not really a block address) + ++// codes for operating systems ++ ++#define EXT2_OS_LINUX 0 ++#define EXT2_OS_HURD 1 ++#define EXT2_OS_MASIX 2 ++#define EXT2_OS_FREEBSD 3 ++#define EXT2_OS_LITES 4 ++ + // end of a block walk + + #define WALK_END 0xFFFFFFFE +@@ -227,44 +270,46 @@ + #define FM_IWOTH 0000002 // write + #define FM_IXOTH 0000001 // execute + +-// options +- +-#define OP_HOLES 0x01 // make files with holes +- + /* Defines for accessing group details */ + + // Number of groups in the filesystem + #define GRP_NBGROUPS(fs) \ +- (((fs)->sb.s_blocks_count - fs->sb.s_first_data_block + \ +- (fs)->sb.s_blocks_per_group - 1) / (fs)->sb.s_blocks_per_group) ++ (((fs)->sb->s_blocks_count - fs->sb->s_first_data_block + \ ++ (fs)->sb->s_blocks_per_group - 1) / (fs)->sb->s_blocks_per_group) + + // Get group block bitmap (bbm) given the group number +-#define GRP_GET_GROUP_BBM(fs,grp) ( get_blk((fs),(fs)->gd[(grp)].bg_block_bitmap) ) ++#define GRP_GET_GROUP_BBM(fs,grp,bi) (get_blk((fs),(grp)->bg_block_bitmap,(bi))) ++#define GRP_PUT_GROUP_BBM(bi) ( put_blk((bi)) ) + + // Get group inode bitmap (ibm) given the group number +-#define GRP_GET_GROUP_IBM(fs,grp) ( get_blk((fs),(fs)->gd[(grp)].bg_inode_bitmap) ) +- ++#define GRP_GET_GROUP_IBM(fs,grp,bi) (get_blk((fs), (grp)->bg_inode_bitmap,(bi))) ++#define GRP_PUT_GROUP_IBM(bi) ( put_blk((bi)) ) ++ + // Given an inode number find the group it belongs to +-#define GRP_GROUP_OF_INODE(fs,nod) ( ((nod)-1) / (fs)->sb.s_inodes_per_group) ++#define GRP_GROUP_OF_INODE(fs,nod) ( ((nod)-1) / (fs)->sb->s_inodes_per_group) + + //Given an inode number get the inode bitmap that covers it +-#define GRP_GET_INODE_BITMAP(fs,nod) \ +- ( GRP_GET_GROUP_IBM((fs),GRP_GROUP_OF_INODE((fs),(nod))) ) ++#define GRP_GET_INODE_BITMAP(fs,nod,bi,gi) \ ++ ( GRP_GET_GROUP_IBM((fs),get_gd(fs,GRP_GROUP_OF_INODE((fs),(nod)),gi),bi) ) ++#define GRP_PUT_INODE_BITMAP(bi,gi) \ ++ ( GRP_PUT_GROUP_IBM((bi)),put_gd((gi)) ) + + //Given an inode number find its offset within the inode bitmap that covers it + #define GRP_IBM_OFFSET(fs,nod) \ +- ( (nod) - GRP_GROUP_OF_INODE((fs),(nod))*(fs)->sb.s_inodes_per_group ) ++ ( (nod) - GRP_GROUP_OF_INODE((fs),(nod))*(fs)->sb->s_inodes_per_group ) + + // Given a block number find the group it belongs to +-#define GRP_GROUP_OF_BLOCK(fs,blk) ( ((blk)-1) / (fs)->sb.s_blocks_per_group) ++#define GRP_GROUP_OF_BLOCK(fs,blk) ( ((blk)-1) / (fs)->sb->s_blocks_per_group) + +-//Given a block number get the block bitmap that covers it +-#define GRP_GET_BLOCK_BITMAP(fs,blk) \ +- ( GRP_GET_GROUP_BBM((fs),GRP_GROUP_OF_BLOCK((fs),(blk))) ) ++//Given a block number get/put the block bitmap that covers it ++#define GRP_GET_BLOCK_BITMAP(fs,blk,bi,gi) \ ++ ( GRP_GET_GROUP_BBM((fs),get_gd(fs,GRP_GROUP_OF_BLOCK((fs),(blk)),(gi)),(bi)) ) ++#define GRP_PUT_BLOCK_BITMAP(bi,gi) \ ++ ( GRP_PUT_GROUP_BBM((bi)),put_gd((gi)) ) + + //Given a block number find its offset within the block bitmap that covers it + #define GRP_BBM_OFFSET(fs,blk) \ +- ( (blk) - GRP_GROUP_OF_BLOCK((fs),(blk))*(fs)->sb.s_blocks_per_group ) ++ ( (blk) - GRP_GROUP_OF_BLOCK((fs),(blk))*(fs)->sb->s_blocks_per_group ) + + + // used types +@@ -286,7 +331,9 @@ + // older solaris. Note that this is still not very portable, in that + // the return value cannot be trusted. + +-#if SCANF_CAN_MALLOC ++#if 0 // SCANF_CAN_MALLOC ++// C99 define "a" for floating point, so you can have runtime surprise ++// according the library versions + # define SCANF_PREFIX "a" + # define SCANF_STRING(s) (&s) + #else +@@ -430,6 +477,17 @@ + ((val<<8)&0xFF0000) | (val<<24)); + } + ++static inline int ++is_blk_empty(uint8 *b) ++{ ++ uint32 i; ++ uint32 *v = (uint32 *) b; ++ ++ for(i = 0; i < BLOCKSIZE / 4; i++) ++ if (*v++) ++ return 0; ++ return 1; ++} + + // on-disk structures + // this trick makes me declare things only once +@@ -460,7 +518,22 @@ + udecl32(s_creator_os) /* Indicator of which OS created the filesystem */ \ + udecl32(s_rev_level) /* The revision level of the filesystem */ \ + udecl16(s_def_resuid) /* The default uid for reserved blocks */ \ +- udecl16(s_def_resgid) /* The default gid for reserved blocks */ ++ udecl16(s_def_resgid) /* The default gid for reserved blocks */ \ ++ /* rev 1 version fields start here */ \ ++ udecl32(s_first_ino) /* First non-reserved inode */ \ ++ udecl16(s_inode_size) /* size of inode structure */ \ ++ udecl16(s_block_group_nr) /* block group # of this superblock */ \ ++ udecl32(s_feature_compat) /* compatible feature set */ \ ++ udecl32(s_feature_incompat) /* incompatible feature set */ \ ++ udecl32(s_feature_ro_compat) /* readonly-compatible feature set */ \ ++ utdecl8(s_uuid,16) /* 128-bit uuid for volume */ \ ++ utdecl8(s_volume_name,16) /* volume name */ \ ++ utdecl8(s_last_mounted,64) /* directory where last mounted */ \ ++ udecl32(s_algorithm_usage_bitmap) /* For compression */ ++ ++#define EXT2_GOOD_OLD_FIRST_INO 11 ++#define EXT2_GOOD_OLD_INODE_SIZE 128 ++#define EXT2_FEATURE_RO_COMPAT_LARGE_FILE 0x0002 + + #define groupdescriptor_decl \ + udecl32(bg_block_bitmap) /* Block number of the block bitmap */ \ +@@ -500,6 +573,7 @@ + + #define decl8(x) int8 x; + #define udecl8(x) uint8 x; ++#define utdecl8(x,n) uint8 x[n]; + #define decl16(x) int16 x; + #define udecl16(x) uint16 x; + #define decl32(x) int32 x; +@@ -509,7 +583,7 @@ + typedef struct + { + superblock_decl +- uint32 s_reserved[235]; // Reserved ++ uint32 s_reserved[205]; // Reserved + } superblock; + + typedef struct +@@ -527,10 +601,9 @@ + typedef struct + { + directory_decl +- char d_name[0]; + } directory; + +-typedef uint8 block[BLOCKSIZE]; ++typedef uint8 *block; + + /* blockwalker fields: + The blockwalker is used to access all the blocks of a file (including +@@ -567,23 +640,41 @@ + uint32 bptind; + } blockwalker; + ++#define HDLINK_CNT 16 ++struct hdlink_s ++{ ++ uint32 src_inode; ++ uint32 dst_nod; ++}; ++ ++struct hdlinks_s ++{ ++ int32 count; ++ struct hdlink_s *hdl; ++}; + + /* Filesystem structure that support groups */ +-#if BLOCKSIZE == 1024 + typedef struct + { +- block zero; // The famous block 0 +- superblock sb; // The superblock +- groupdescriptor gd[0]; // The group descriptors ++ FILE *f; ++ superblock *sb; ++ int swapit; ++ int32 hdlink_cnt; ++ struct hdlinks_s hdlinks; ++ ++ int holes; ++ ++ listcache blks; ++ listcache gds; ++ listcache inodes; ++ listcache blkmaps; + } filesystem; +-#else +-#error UNHANDLED BLOCKSIZE +-#endif + + // now the endianness swap + + #undef decl8 + #undef udecl8 ++#undef utdecl8 + #undef decl16 + #undef udecl16 + #undef decl32 +@@ -592,28 +683,13 @@ + + #define decl8(x) + #define udecl8(x) ++#define utdecl8(x,n) + #define decl16(x) this->x = swab16(this->x); + #define udecl16(x) this->x = swab16(this->x); + #define decl32(x) this->x = swab32(this->x); + #define udecl32(x) this->x = swab32(this->x); + #define utdecl32(x,n) { int i; for(i=0; ix[i] = swab32(this->x[i]); } + +-#define HDLINK_CNT 16 +-static int32 hdlink_cnt = HDLINK_CNT; +-struct hdlink_s +-{ +- uint32 src_inode; +- uint32 dst_nod; +-}; +- +-struct hdlinks_s +-{ +- int32 count; +- struct hdlink_s *hdl; +-}; +- +-static struct hdlinks_s hdlinks; +- + static void + swap_sb(superblock *sb) + { +@@ -633,9 +709,24 @@ + static void + swap_nod(inode *nod) + { ++ uint32 nblk; ++ + #define this nod + inode_decl + #undef this ++ ++ // block and character inodes store the major and minor in the ++ // i_block, so we need to unswap to get those. Also, if it's ++ // zero iblocks, put the data back like it belongs. ++ nblk = nod->i_blocks / INOBLK; ++ if ((nod->i_size && !nblk) ++ || ((nod->i_mode & FM_IFBLK) == FM_IFBLK) ++ || ((nod->i_mode & FM_IFCHR) == FM_IFCHR)) ++ { ++ int i; ++ for(i = 0; i <= EXT2_TIND_BLOCK; i++) ++ nod->i_block[i] = swab32(nod->i_block[i]); ++ } + } + + static void +@@ -657,6 +748,7 @@ + + #undef decl8 + #undef udecl8 ++#undef utdecl8 + #undef decl16 + #undef udecl16 + #undef decl32 +@@ -770,15 +862,15 @@ + } + + int +-is_hardlink(ino_t inode) ++is_hardlink(filesystem *fs, ino_t inode) + { + int i; + +- for(i = 0; i < hdlinks.count; i++) { +- if(hdlinks.hdl[i].src_inode == inode) ++ for(i = 0; i < fs->hdlinks.count; i++) { ++ if(fs->hdlinks.hdl[i].src_inode == inode) + return i; + } +- return -1; ++ return -1; + } + + // printf helper macro +@@ -789,6 +881,8 @@ + get_workblk(void) + { + unsigned char* b=calloc(1,BLOCKSIZE); ++ if (!b) ++ error_msg_and_die("get_workblk() failed, out of memory"); + return b; + } + static inline void +@@ -811,24 +905,464 @@ + return b[(item-1) / 8] & (1 << ((item-1) % 8)); + } + +-// return a given block from a filesystem ++// Used by get_blk/put_blk to hold information about a block owned ++// by the user. ++typedef struct ++{ ++ cache_link link; ++ ++ filesystem *fs; ++ uint32 blk; ++ uint8 *b; ++ uint32 usecount; ++} blk_info; ++ ++#define MAX_FREE_CACHE_BLOCKS 100 ++ ++static uint32 ++blk_elem_val(cache_link *elem) ++{ ++ blk_info *bi = container_of(elem, blk_info, link); ++ return bi->blk; ++} ++ ++static void ++blk_freed(cache_link *elem) ++{ ++ blk_info *bi = container_of(elem, blk_info, link); ++ ++ if (fseeko(bi->fs->f, ((off_t) bi->blk) * BLOCKSIZE, SEEK_SET)) ++ perror_msg_and_die("fseek"); ++ if (fwrite(bi->b, BLOCKSIZE, 1, bi->fs->f) != 1) ++ perror_msg_and_die("get_blk: write"); ++ free(bi->b); ++ free(bi); ++} ++ ++// Return a given block from a filesystem. Make sure to call ++// put_blk when you are done with it. + static inline uint8 * +-get_blk(filesystem *fs, uint32 blk) ++get_blk(filesystem *fs, uint32 blk, blk_info **rbi) + { +- return (uint8*)fs + blk*BLOCKSIZE; ++ cache_link *curr; ++ blk_info *bi; ++ ++ if (blk >= fs->sb->s_blocks_count) ++ error_msg_and_die("Internal error, block out of range"); ++ ++ curr = cache_find(&fs->blks, blk); ++ if (curr) { ++ bi = container_of(curr, blk_info, link); ++ bi->usecount++; ++ goto out; ++ } ++ ++ bi = malloc(sizeof(*bi)); ++ if (!bi) ++ error_msg_and_die("get_blk: out of memory"); ++ bi->fs = fs; ++ bi->blk = blk; ++ bi->usecount = 1; ++ bi->b = malloc(BLOCKSIZE); ++ if (!bi->b) ++ error_msg_and_die("get_blk: out of memory"); ++ cache_add(&fs->blks, &bi->link); ++ if (fseeko(fs->f, ((off_t) blk) * BLOCKSIZE, SEEK_SET)) ++ perror_msg_and_die("fseek"); ++ if (fread(bi->b, BLOCKSIZE, 1, fs->f) != 1) { ++ if (ferror(fs->f)) ++ perror_msg_and_die("fread"); ++ memset(bi->b, 0, BLOCKSIZE); ++ } ++ ++out: ++ *rbi = bi; ++ return bi->b; + } + + // return a given inode from a filesystem +-static inline inode * +-get_nod(filesystem *fs, uint32 nod) ++static inline void ++put_blk(blk_info *bi) ++{ ++ if (bi->usecount == 0) ++ error_msg_and_die("Internal error: put_blk usecount zero"); ++ bi->usecount--; ++ if (bi->usecount == 0) ++ /* Free happens in the cache code */ ++ cache_item_set_unused(&bi->fs->blks, &bi->link); ++} ++ ++typedef struct + { +- int grp,offset; ++ cache_link link; ++ ++ filesystem *fs; ++ int gds; ++ blk_info *bi; ++ groupdescriptor *gd; ++ uint32 usecount; ++} gd_info; ++ ++#define MAX_FREE_CACHE_GDS 100 ++ ++static uint32 ++gd_elem_val(cache_link *elem) ++{ ++ gd_info *gi = container_of(elem, gd_info, link); ++ return gi->gds; ++} ++ ++static void ++gd_freed(cache_link *elem) ++{ ++ gd_info *gi = container_of(elem, gd_info, link); ++ ++ if (gi->fs->swapit) ++ swap_gd(gi->gd); ++ put_blk(gi->bi); ++ free(gi); ++} ++ ++#define GDS_START ((SUPERBLOCK_OFFSET + SUPERBLOCK_SIZE + BLOCKSIZE - 1) / BLOCKSIZE) ++#define GDS_PER_BLOCK (BLOCKSIZE / sizeof(groupdescriptor)) ++// the group descriptors are aligned on the block size ++static inline groupdescriptor * ++get_gd(filesystem *fs, uint32 no, gd_info **rgi) ++{ ++ uint32 gdblk; ++ uint32 offset; ++ gd_info *gi; ++ cache_link *curr; ++ ++ curr = cache_find(&fs->gds, no); ++ if (curr) { ++ gi = container_of(curr, gd_info, link); ++ gi->usecount++; ++ goto out; ++ } ++ ++ gi = malloc(sizeof(*gi)); ++ if (!gi) ++ error_msg_and_die("get_gd: out of memory"); ++ gi->fs = fs; ++ gi->gds = no; ++ gi->usecount = 1; ++ gdblk = GDS_START + (no / GDS_PER_BLOCK); ++ offset = no % GDS_PER_BLOCK; ++ gi->gd = ((groupdescriptor *) get_blk(fs, gdblk, &gi->bi)) + offset; ++ cache_add(&fs->gds, &gi->link); ++ if (fs->swapit) ++ swap_gd(gi->gd); ++ out: ++ *rgi = gi; ++ ++ return gi->gd; ++} ++ ++static inline void ++put_gd(gd_info *gi) ++{ ++ if (gi->usecount == 0) ++ error_msg_and_die("Internal error: put_gd usecount zero"); ++ ++ gi->usecount--; ++ if (gi->usecount == 0) ++ /* Free happens in the cache code */ ++ cache_item_set_unused(&gi->fs->gds, &gi->link); ++} ++ ++// Used by get_blkmap/put_blkmap to hold information about an block map ++// owned by the user. ++typedef struct ++{ ++ cache_link link; ++ ++ filesystem *fs; ++ uint32 blk; ++ uint8 *b; ++ blk_info *bi; ++ uint32 usecount; ++} blkmap_info; ++ ++#define MAX_FREE_CACHE_BLOCKMAPS 100 ++ ++static uint32 ++blkmap_elem_val(cache_link *elem) ++{ ++ blkmap_info *bmi = container_of(elem, blkmap_info, link); ++ return bmi->blk; ++} ++ ++static void ++blkmap_freed(cache_link *elem) ++{ ++ blkmap_info *bmi = container_of(elem, blkmap_info, link); ++ ++ if (bmi->fs->swapit) ++ swap_block(bmi->b); ++ put_blk(bmi->bi); ++ free(bmi); ++} ++ ++// Return a given block map from a filesystem. Make sure to call ++// put_blkmap when you are done with it. ++static inline uint32 * ++get_blkmap(filesystem *fs, uint32 blk, blkmap_info **rbmi) ++{ ++ blkmap_info *bmi; ++ cache_link *curr; ++ ++ curr = cache_find(&fs->blkmaps, blk); ++ if (curr) { ++ bmi = container_of(curr, blkmap_info, link); ++ bmi->usecount++; ++ goto out; ++ } ++ ++ bmi = malloc(sizeof(*bmi)); ++ if (!bmi) ++ error_msg_and_die("get_blkmap: out of memory"); ++ bmi->fs = fs; ++ bmi->blk = blk; ++ bmi->b = get_blk(fs, blk, &bmi->bi); ++ bmi->usecount = 1; ++ cache_add(&fs->blkmaps, &bmi->link); ++ ++ if (fs->swapit) ++ swap_block(bmi->b); ++ out: ++ *rbmi = bmi; ++ return (uint32 *) bmi->b; ++} ++ ++static inline void ++put_blkmap(blkmap_info *bmi) ++{ ++ if (bmi->usecount == 0) ++ error_msg_and_die("Internal error: put_blkmap usecount zero"); ++ ++ bmi->usecount--; ++ if (bmi->usecount == 0) ++ /* Free happens in the cache code */ ++ cache_item_set_unused(&bmi->fs->blkmaps, &bmi->link); ++} ++ ++// Used by get_nod/put_nod to hold information about an inode owned ++// by the user. ++typedef struct ++{ ++ cache_link link; ++ ++ filesystem *fs; ++ uint32 nod; ++ uint8 *b; ++ blk_info *bi; + inode *itab; ++ uint32 usecount; ++} nod_info; ++ ++#define MAX_FREE_CACHE_INODES 100 ++ ++static uint32 ++inode_elem_val(cache_link *elem) ++{ ++ nod_info *ni = container_of(elem, nod_info, link); ++ return ni->nod; ++} ++ ++static void ++inode_freed(cache_link *elem) ++{ ++ nod_info *ni = container_of(elem, nod_info, link); ++ ++ if (ni->fs->swapit) ++ swap_nod(ni->itab); ++ put_blk(ni->bi); ++ free(ni); ++} ++ ++#define INODES_PER_BLOCK (BLOCKSIZE / sizeof(inode)) + +- offset = GRP_IBM_OFFSET(fs,nod); ++// return a given inode from a filesystem ++static inline inode * ++get_nod(filesystem *fs, uint32 nod, nod_info **rni) ++{ ++ uint32 grp, boffset, offset; ++ cache_link *curr; ++ groupdescriptor *gd; ++ gd_info *gi; ++ nod_info *ni; ++ ++ curr = cache_find(&fs->inodes, nod); ++ if (curr) { ++ ni = container_of(curr, nod_info, link); ++ ni->usecount++; ++ goto out; ++ } ++ ++ ni = malloc(sizeof(*ni)); ++ if (!ni) ++ error_msg_and_die("get_nod: out of memory"); ++ ni->fs = fs; ++ ni->nod = nod; ++ ni->usecount = 1; ++ cache_add(&fs->inodes, &ni->link); ++ ++ offset = GRP_IBM_OFFSET(fs,nod) - 1; ++ boffset = offset / INODES_PER_BLOCK; ++ offset %= INODES_PER_BLOCK; + grp = GRP_GROUP_OF_INODE(fs,nod); +- itab = (inode *)get_blk(fs, fs->gd[grp].bg_inode_table); +- return itab+offset-1; ++ gd = get_gd(fs, grp, &gi); ++ ni->b = get_blk(fs, gd->bg_inode_table + boffset, &ni->bi); ++ ni->itab = ((inode *) ni->b) + offset; ++ if (fs->swapit) ++ swap_nod(ni->itab); ++ put_gd(gi); ++ out: ++ *rni = ni; ++ return ni->itab; ++} ++ ++static inline void ++put_nod(nod_info *ni) ++{ ++ if (ni->usecount == 0) ++ error_msg_and_die("Internal error: put_nod usecount zero"); ++ ++ ni->usecount--; ++ if (ni->usecount == 0) ++ /* Free happens in the cache code */ ++ cache_item_set_unused(&ni->fs->inodes, &ni->link); ++} ++ ++// Used to hold state information while walking a directory inode. ++typedef struct ++{ ++ directory d; ++ filesystem *fs; ++ uint32 nod; ++ directory *last_d; ++ uint8 *b; ++ blk_info *bi; ++} dirwalker; ++ ++// Start a directory walk on the given inode. You must pass in a ++// dirwalker structure, then use that dirwalker for future operations. ++// Call put_dir when you are done walking the directory. ++static inline directory * ++get_dir(filesystem *fs, uint32 nod, dirwalker *dw) ++{ ++ dw->fs = fs; ++ dw->b = get_blk(fs, nod, &dw->bi); ++ dw->nod = nod; ++ dw->last_d = (directory *) dw->b; ++ ++ memcpy(&dw->d, dw->last_d, sizeof(directory)); ++ if (fs->swapit) ++ swap_dir(&dw->d); ++ return &dw->d; ++} ++ ++// Move to the next directory. ++static inline directory * ++next_dir(dirwalker *dw) ++{ ++ directory *next_d = (directory *)((int8*)dw->last_d + dw->d.d_rec_len); ++ ++ if (dw->fs->swapit) ++ swap_dir(&dw->d); ++ memcpy(dw->last_d, &dw->d, sizeof(directory)); ++ ++ if (((int8 *) next_d) >= ((int8 *) dw->b + BLOCKSIZE)) ++ return NULL; ++ ++ dw->last_d = next_d; ++ memcpy(&dw->d, next_d, sizeof(directory)); ++ if (dw->fs->swapit) ++ swap_dir(&dw->d); ++ return &dw->d; ++} ++ ++// Call then when you are done with the directory walk. ++static inline void ++put_dir(dirwalker *dw) ++{ ++ if (dw->fs->swapit) ++ swap_dir(&dw->d); ++ memcpy(dw->last_d, &dw->d, sizeof(directory)); ++ ++ if (dw->nod == 0) ++ free_workblk(dw->b); ++ else ++ put_blk(dw->bi); ++} ++ ++// Create a new directory block with the given inode as it's destination ++// and append it to the current dirwalker. ++static directory * ++new_dir(filesystem *fs, uint32 dnod, const char *name, int nlen, dirwalker *dw) ++{ ++ directory *d; ++ ++ dw->fs = fs; ++ dw->b = get_workblk(); ++ dw->nod = 0; ++ dw->last_d = (directory *) dw->b; ++ d = &dw->d; ++ d->d_inode = dnod; ++ d->d_rec_len = BLOCKSIZE; ++ d->d_name_len = nlen; ++ strncpy(((char *) dw->last_d) + sizeof(directory), name, nlen); ++ return d; ++} ++ ++// Shrink the current directory entry, make a new one with the free ++// space, and return the new directory entry (making it current). ++static inline directory * ++shrink_dir(dirwalker *dw, uint32 nod, const char *name, int nlen) ++{ ++ int reclen, preclen; ++ directory *d = &dw->d; ++ ++ reclen = d->d_rec_len; ++ d->d_rec_len = sizeof(directory) + rndup(d->d_name_len, 4); ++ preclen = d->d_rec_len; ++ reclen -= preclen; ++ if (dw->fs->swapit) ++ swap_dir(&dw->d); ++ memcpy(dw->last_d, &dw->d, sizeof(directory)); ++ ++ dw->last_d = (directory *) (((int8 *) dw->last_d) + preclen); ++ d->d_rec_len = reclen; ++ d->d_inode = nod; ++ d->d_name_len = nlen; ++ strncpy(((char *) dw->last_d) + sizeof(directory), name, nlen); ++ ++ return d; ++} ++ ++// Return the current block the directory is walking ++static inline uint8 * ++dir_data(dirwalker *dw) ++{ ++ return dw->b; ++} ++ ++// Return the pointer to the name for the current directory ++static inline char * ++dir_name(dirwalker *dw) ++{ ++ return ((char *) dw->last_d) + sizeof(directory); ++} ++ ++// Set the name for the current directory. Note that this doesn't ++// verify that there is space for the directory name, you must do ++// that yourself. ++static void ++dir_set_name(dirwalker *dw, const char *name, int nlen) ++{ ++ dw->d.d_name_len = nlen; ++ strncpy(((char *) dw->last_d) + sizeof(directory), name, nlen); + } + + // allocate a given block/inode in the bitmap +@@ -870,21 +1404,34 @@ + { + uint32 bk=0; + uint32 grp,nbgroups; ++ blk_info *bi; ++ groupdescriptor *gd; ++ gd_info *gi; + + grp = GRP_GROUP_OF_INODE(fs,nod); + nbgroups = GRP_NBGROUPS(fs); +- if(!(bk = allocate(get_blk(fs,fs->gd[grp].bg_block_bitmap), 0))) { +- for(grp=0;grpgd[grp].bg_block_bitmap),0); ++ gd = get_gd(fs, grp, &gi); ++ bk = allocate(GRP_GET_GROUP_BBM(fs, gd, &bi), 0); ++ GRP_PUT_GROUP_BBM(bi); ++ put_gd(gi); ++ if (!bk) { ++ for (grp=0; grpgd[grp].bg_free_blocks_count--)) ++ gd = get_gd(fs, grp, &gi); ++ if(!(gd->bg_free_blocks_count--)) + error_msg_and_die("group descr %d. free blocks count == 0 (corrupted fs?)",grp); +- if(!(fs->sb.s_free_blocks_count--)) ++ put_gd(gi); ++ if(!(fs->sb->s_free_blocks_count--)) + error_msg_and_die("superblock free blocks count == 0 (corrupted fs?)"); +- return fs->sb.s_blocks_per_group*grp + bk; ++ return fs->sb->s_first_data_block + fs->sb->s_blocks_per_group*grp + (bk-1); + } + + // free a block +@@ -892,12 +1439,18 @@ + free_blk(filesystem *fs, uint32 bk) + { + uint32 grp; +- +- grp = bk / fs->sb.s_blocks_per_group; +- bk %= fs->sb.s_blocks_per_group; +- deallocate(get_blk(fs,fs->gd[grp].bg_block_bitmap), bk); +- fs->gd[grp].bg_free_blocks_count++; +- fs->sb.s_free_blocks_count++; ++ blk_info *bi; ++ gd_info *gi; ++ groupdescriptor *gd; ++ ++ grp = bk / fs->sb->s_blocks_per_group; ++ bk %= fs->sb->s_blocks_per_group; ++ gd = get_gd(fs, grp, &gi); ++ deallocate(GRP_GET_GROUP_BBM(fs, gd, &bi), bk); ++ GRP_PUT_GROUP_BBM(bi); ++ gd->bg_free_blocks_count++; ++ put_gd(gi); ++ fs->sb->s_free_blocks_count++; + } + + // allocate an inode +@@ -906,6 +1459,9 @@ + { + uint32 nod,best_group=0; + uint32 grp,nbgroups,avefreei; ++ blk_info *bi; ++ gd_info *gi, *bestgi; ++ groupdescriptor *gd, *bestgd; + + nbgroups = GRP_NBGROUPS(fs); + +@@ -914,22 +1470,32 @@ + /* find the one with the most free blocks and allocate node there */ + /* Idea from find_group_dir in fs/ext2/ialloc.c in 2.4.19 kernel */ + /* We do it for all inodes. */ +- avefreei = fs->sb.s_free_inodes_count / nbgroups; ++ avefreei = fs->sb->s_free_inodes_count / nbgroups; ++ bestgd = get_gd(fs, best_group, &bestgi); + for(grp=0; grpgd[grp].bg_free_inodes_count < avefreei || +- fs->gd[grp].bg_free_inodes_count == 0) ++ gd = get_gd(fs, grp, &gi); ++ if (gd->bg_free_inodes_count < avefreei || ++ gd->bg_free_inodes_count == 0) { ++ put_gd(gi); + continue; +- if (!best_group || +- fs->gd[grp].bg_free_blocks_count > fs->gd[best_group].bg_free_blocks_count) ++ } ++ if (!best_group || gd->bg_free_blocks_count > bestgd->bg_free_blocks_count) { ++ put_gd(bestgi); + best_group = grp; ++ bestgd = gd; ++ bestgi = gi; ++ } else ++ put_gd(gi); + } +- if (!(nod = allocate(get_blk(fs,fs->gd[best_group].bg_inode_bitmap),0))) ++ if (!(nod = allocate(GRP_GET_GROUP_IBM(fs, bestgd, &bi), 0))) + error_msg_and_die("couldn't allocate an inode (no free inode)"); +- if(!(fs->gd[best_group].bg_free_inodes_count--)) ++ GRP_PUT_GROUP_IBM(bi); ++ if(!(bestgd->bg_free_inodes_count--)) + error_msg_and_die("group descr. free blocks count == 0 (corrupted fs?)"); +- if(!(fs->sb.s_free_inodes_count--)) ++ put_gd(bestgi); ++ if(!(fs->sb->s_free_inodes_count--)) + error_msg_and_die("superblock free blocks count == 0 (corrupted fs?)"); +- return fs->sb.s_inodes_per_group*best_group+nod; ++ return fs->sb->s_inodes_per_group*best_group+nod; + } + + // print a bitmap allocation +@@ -962,30 +1528,40 @@ + // used after being freed, so once you start + // freeing blocks don't stop until the end of + // the file. moreover, i_blocks isn't updated. +-// in fact, don't do that, just use extend_blk + // if hole!=0, create a hole in the file + static uint32 + walk_bw(filesystem *fs, uint32 nod, blockwalker *bw, int32 *create, uint32 hole) + { + uint32 *bkref = 0; ++ uint32 bk = 0; ++ blkmap_info *bmi1 = NULL, *bmi2 = NULL, *bmi3 = NULL; + uint32 *b; + int extend = 0, reduce = 0; ++ inode *inod; ++ nod_info *ni; ++ uint32 *iblk; ++ + if(create && (*create) < 0) + reduce = 1; +- if(bw->bnum >= get_nod(fs, nod)->i_blocks / INOBLK) ++ inod = get_nod(fs, nod, &ni); ++ if(bw->bnum >= inod->i_blocks / INOBLK) + { + if(create && (*create) > 0) + { + (*create)--; + extend = 1; + } +- else ++ else ++ { ++ put_nod(ni); + return WALK_END; ++ } + } ++ iblk = inod->i_block; + // first direct block + if(bw->bpdir == EXT2_INIT_BLOCK) + { +- bkref = &get_nod(fs, nod)->i_block[bw->bpdir = 0]; ++ bkref = &iblk[bw->bpdir = 0]; + if(extend) // allocate first block + *bkref = hole ? 0 : alloc_blk(fs,nod); + if(reduce) // free first block +@@ -994,7 +1570,7 @@ + // direct block + else if(bw->bpdir < EXT2_NDIR_BLOCKS) + { +- bkref = &get_nod(fs, nod)->i_block[++bw->bpdir]; ++ bkref = &iblk[++bw->bpdir]; + if(extend) // allocate block + *bkref = hole ? 0 : alloc_blk(fs,nod); + if(reduce) // free block +@@ -1007,10 +1583,10 @@ + bw->bpdir = EXT2_IND_BLOCK; + bw->bpind = 0; + if(extend) // allocate indirect block +- get_nod(fs, nod)->i_block[bw->bpdir] = alloc_blk(fs,nod); ++ iblk[bw->bpdir] = alloc_blk(fs,nod); + if(reduce) // free indirect block +- free_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]); +- b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]); ++ free_blk(fs, iblk[bw->bpdir]); ++ b = get_blkmap(fs, iblk[bw->bpdir], &bmi1); + bkref = &b[bw->bpind]; + if(extend) // allocate first block + *bkref = hole ? 0 : alloc_blk(fs,nod); +@@ -1021,7 +1597,7 @@ + else if((bw->bpdir == EXT2_IND_BLOCK) && (bw->bpind < BLOCKSIZE/4 - 1)) + { + bw->bpind++; +- b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]); ++ b = get_blkmap(fs, iblk[bw->bpdir], &bmi1); + bkref = &b[bw->bpind]; + if(extend) // allocate block + *bkref = hole ? 0 : alloc_blk(fs,nod); +@@ -1036,15 +1612,15 @@ + bw->bpind = 0; + bw->bpdind = 0; + if(extend) // allocate double indirect block +- get_nod(fs, nod)->i_block[bw->bpdir] = alloc_blk(fs,nod); ++ iblk[bw->bpdir] = alloc_blk(fs,nod); + if(reduce) // free double indirect block +- free_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]); +- b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]); ++ free_blk(fs, iblk[bw->bpdir]); ++ b = get_blkmap(fs, iblk[bw->bpdir], &bmi1); + if(extend) // allocate first indirect block + b[bw->bpind] = alloc_blk(fs,nod); + if(reduce) // free firstindirect block + free_blk(fs, b[bw->bpind]); +- b = (uint32*)get_blk(fs, b[bw->bpind]); ++ b = get_blkmap(fs, b[bw->bpind], &bmi2); + bkref = &b[bw->bpdind]; + if(extend) // allocate first block + *bkref = hole ? 0 : alloc_blk(fs,nod); +@@ -1055,8 +1631,8 @@ + else if((bw->bpdir == EXT2_DIND_BLOCK) && (bw->bpdind < BLOCKSIZE/4 - 1)) + { + bw->bpdind++; +- b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]); +- b = (uint32*)get_blk(fs, b[bw->bpind]); ++ b = get_blkmap(fs, iblk[bw->bpdir], &bmi1); ++ b = get_blkmap(fs, b[bw->bpind], &bmi2); + bkref = &b[bw->bpdind]; + if(extend) // allocate block + *bkref = hole ? 0 : alloc_blk(fs,nod); +@@ -1069,12 +1645,12 @@ + bw->bnum++; + bw->bpdind = 0; + bw->bpind++; +- b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]); ++ b = get_blkmap(fs, iblk[bw->bpdir], &bmi1); + if(extend) // allocate indirect block + b[bw->bpind] = alloc_blk(fs,nod); + if(reduce) // free indirect block + free_blk(fs, b[bw->bpind]); +- b = (uint32*)get_blk(fs, b[bw->bpind]); ++ b = get_blkmap(fs, b[bw->bpind], &bmi2); + bkref = &b[bw->bpdind]; + if(extend) // allocate first block + *bkref = hole ? 0 : alloc_blk(fs,nod); +@@ -1094,20 +1670,20 @@ + bw->bpdind = 0; + bw->bptind = 0; + if(extend) // allocate triple indirect block +- get_nod(fs, nod)->i_block[bw->bpdir] = alloc_blk(fs,nod); ++ iblk[bw->bpdir] = alloc_blk(fs,nod); + if(reduce) // free triple indirect block +- free_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]); +- b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]); ++ free_blk(fs, iblk[bw->bpdir]); ++ b = get_blkmap(fs, iblk[bw->bpdir], &bmi1); + if(extend) // allocate first double indirect block + b[bw->bpind] = alloc_blk(fs,nod); + if(reduce) // free first double indirect block + free_blk(fs, b[bw->bpind]); +- b = (uint32*)get_blk(fs, b[bw->bpind]); ++ b = get_blkmap(fs, b[bw->bpind], &bmi2); + if(extend) // allocate first indirect block + b[bw->bpdind] = alloc_blk(fs,nod); + if(reduce) // free first indirect block + free_blk(fs, b[bw->bpind]); +- b = (uint32*)get_blk(fs, b[bw->bpdind]); ++ b = get_blkmap(fs, b[bw->bpdind], &bmi3); + bkref = &b[bw->bptind]; + if(extend) // allocate first data block + *bkref = hole ? 0 : alloc_blk(fs,nod); +@@ -1121,9 +1697,9 @@ + (bw->bptind < BLOCKSIZE/4 -1) ) + { + bw->bptind++; +- b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]); +- b = (uint32*)get_blk(fs, b[bw->bpind]); +- b = (uint32*)get_blk(fs, b[bw->bpdind]); ++ b = get_blkmap(fs, iblk[bw->bpdir], &bmi1); ++ b = get_blkmap(fs, b[bw->bpind], &bmi2); ++ b = get_blkmap(fs, b[bw->bpdind], &bmi3); + bkref = &b[bw->bptind]; + if(extend) // allocate data block + *bkref = hole ? 0 : alloc_blk(fs,nod); +@@ -1140,13 +1716,13 @@ + bw->bnum++; + bw->bptind = 0; + bw->bpdind++; +- b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]); +- b = (uint32*)get_blk(fs, b[bw->bpind]); ++ b = get_blkmap(fs, iblk[bw->bpdir], &bmi1); ++ b = get_blkmap(fs, b[bw->bpind], &bmi2); + if(extend) // allocate single indirect block + b[bw->bpdind] = alloc_blk(fs,nod); + if(reduce) // free indirect block + free_blk(fs, b[bw->bpind]); +- b = (uint32*)get_blk(fs, b[bw->bpdind]); ++ b = get_blkmap(fs, b[bw->bpdind], &bmi3); + bkref = &b[bw->bptind]; + if(extend) // allocate first data block + *bkref = hole ? 0 : alloc_blk(fs,nod); +@@ -1163,17 +1739,17 @@ + bw->bpdind = 0; + bw->bptind = 0; + bw->bpind++; +- b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]); ++ b = get_blkmap(fs, iblk[bw->bpdir], &bmi1); + if(extend) // allocate double indirect block + b[bw->bpind] = alloc_blk(fs,nod); + if(reduce) // free double indirect block + free_blk(fs, b[bw->bpind]); +- b = (uint32*)get_blk(fs, b[bw->bpind]); ++ b = get_blkmap(fs, b[bw->bpind], &bmi2); + if(extend) // allocate single indirect block + b[bw->bpdind] = alloc_blk(fs,nod); + if(reduce) // free indirect block + free_blk(fs, b[bw->bpind]); +- b = (uint32*)get_blk(fs, b[bw->bpdind]); ++ b = get_blkmap(fs, b[bw->bpdind], &bmi3); + bkref = &b[bw->bptind]; + if(extend) // allocate first block + *bkref = hole ? 0 : alloc_blk(fs,nod); +@@ -1184,56 +1760,105 @@ + error_msg_and_die("file too big !"); + /* End change for walking triple indirection */ + +- if(*bkref) +- { ++ bk = *bkref; ++ if (bmi3) ++ put_blkmap(bmi3); ++ if (bmi2) ++ put_blkmap(bmi2); ++ if (bmi1) ++ put_blkmap(bmi1); ++ ++ if(bk) ++ { ++ blk_info *bi; ++ gd_info *gi; ++ uint8 *block; + bw->bnum++; +- if(!reduce && !allocated(GRP_GET_BLOCK_BITMAP(fs,*bkref), GRP_BBM_OFFSET(fs,*bkref))) +- error_msg_and_die("[block %d of inode %d is unallocated !]", *bkref, nod); ++ block = GRP_GET_BLOCK_BITMAP(fs,bk,&bi,&gi); ++ if(!reduce && !allocated(block, GRP_BBM_OFFSET(fs,bk))) ++ error_msg_and_die("[block %d of inode %d is unallocated !]", bk, nod); ++ GRP_PUT_BLOCK_BITMAP(bi, gi); + } + if(extend) +- get_nod(fs, nod)->i_blocks = bw->bnum * INOBLK; +- return *bkref; ++ inod->i_blocks = bw->bnum * INOBLK; ++ put_nod(ni); ++ return bk; + } + +-// add blocks to an inode (file/dir/etc...) +-static void +-extend_blk(filesystem *fs, uint32 nod, block b, int amount) ++typedef struct + { +- int create = amount; +- blockwalker bw, lbw; +- uint32 bk; +- init_bw(&bw); +- if(amount < 0) +- { +- uint32 i; +- for(i = 0; i < get_nod(fs, nod)->i_blocks / INOBLK + amount; i++) +- walk_bw(fs, nod, &bw, 0, 0); +- while(walk_bw(fs, nod, &bw, &create, 0) != WALK_END) ++ blockwalker bw; ++ uint32 nod; ++ nod_info *ni; ++ inode *inod; ++} inode_pos; ++#define INODE_POS_TRUNCATE 0 ++#define INODE_POS_EXTEND 1 ++ ++// Call this to set up an ipos structure for future use with ++// extend_inode_blk to append blocks to the given inode. If ++// op is INODE_POS_TRUNCATE, the inode is truncated to zero size. ++// If op is INODE_POS_EXTEND, the position is moved to the end ++// of the inode's data blocks. ++// Call inode_pos_finish when done with the inode_pos structure. ++static void ++inode_pos_init(filesystem *fs, inode_pos *ipos, uint32 nod, int op, ++ blockwalker *endbw) ++{ ++ blockwalker lbw; ++ ++ init_bw(&ipos->bw); ++ ipos->nod = nod; ++ ipos->inod = get_nod(fs, nod, &ipos->ni); ++ if (op == INODE_POS_TRUNCATE) { ++ int32 create = -1; ++ while(walk_bw(fs, nod, &ipos->bw, &create, 0) != WALK_END) + /*nop*/; +- get_nod(fs, nod)->i_blocks += amount * INOBLK; ++ ipos->inod->i_blocks = 0; + } +- else ++ ++ if (endbw) ++ ipos->bw = *endbw; ++ else { ++ /* Seek to the end */ ++ init_bw(&ipos->bw); ++ lbw = ipos->bw; ++ while(walk_bw(fs, nod, &ipos->bw, 0, 0) != WALK_END) ++ lbw = ipos->bw; ++ ipos->bw = lbw; ++ } ++} ++ ++// Clean up the inode_pos structure. ++static void ++inode_pos_finish(filesystem *fs, inode_pos *ipos) ++{ ++ put_nod(ipos->ni); ++} ++ ++// add blocks to an inode (file/dir/etc...) at the given position. ++// This will only work when appending to the end of an inode. ++static void ++extend_inode_blk(filesystem *fs, inode_pos *ipos, block b, int amount) ++{ ++ uint32 bk; ++ uint32 pos; ++ ++ if (amount < 0) ++ error_msg_and_die("extend_inode_blk: Got negative amount"); ++ ++ for (pos = 0; amount; pos += BLOCKSIZE) + { +- lbw = bw; +- while((bk = walk_bw(fs, nod, &bw, 0, 0)) != WALK_END) +- lbw = bw; +- bw = lbw; +- while(create) +- { +- int i, copyb = 0; +- if(!(fs->sb.s_reserved[200] & OP_HOLES)) +- copyb = 1; +- else +- for(i = 0; i < BLOCKSIZE / 4; i++) +- if(((int32*)(b + BLOCKSIZE * (amount - create)))[i]) +- { +- copyb = 1; +- break; +- } +- if((bk = walk_bw(fs, nod, &bw, &create, !copyb)) == WALK_END) +- break; +- if(copyb) +- memcpy(get_blk(fs, bk), b + BLOCKSIZE * (amount - create - 1), BLOCKSIZE); ++ int hole = (fs->holes && is_blk_empty(b + pos)); ++ ++ bk = walk_bw(fs, ipos->nod, &ipos->bw, &amount, hole); ++ if (bk == WALK_END) ++ error_msg_and_die("extend_inode_blk: extend failed"); ++ if (!hole) { ++ blk_info *bi; ++ uint8 *block = get_blk(fs, bk, &bi); ++ memcpy(block, b + pos, BLOCKSIZE); ++ put_blk(bi); + } + } + } +@@ -1242,15 +1867,17 @@ + static void + add2dir(filesystem *fs, uint32 dnod, uint32 nod, const char* name) + { +- blockwalker bw; ++ blockwalker bw, lbw; + uint32 bk; +- uint8 *b; + directory *d; ++ dirwalker dw; + int reclen, nlen; + inode *node; + inode *pnode; ++ nod_info *dni, *ni; ++ inode_pos ipos; + +- pnode = get_nod(fs, dnod); ++ pnode = get_nod(fs, dnod, &dni); + if((pnode->i_mode & FM_IFMT) != FM_IFDIR) + error_msg_and_die("can't add '%s' to a non-directory", name); + if(!*name) +@@ -1262,52 +1889,52 @@ + if(reclen > BLOCKSIZE) + error_msg_and_die("bad name '%s' (too long)", name); + init_bw(&bw); ++ lbw = bw; + while((bk = walk_bw(fs, dnod, &bw, 0, 0)) != WALK_END) // for all blocks in dir + { +- b = get_blk(fs, bk); + // for all dir entries in block +- for(d = (directory*)b; (int8*)d + sizeof(*d) < (int8*)b + BLOCKSIZE; d = (directory*)((int8*)d + d->d_rec_len)) ++ for(d = get_dir(fs, bk, &dw); d; d = next_dir(&dw)) + { + // if empty dir entry, large enough, use it + if((!d->d_inode) && (d->d_rec_len >= reclen)) + { + d->d_inode = nod; +- node = get_nod(fs, nod); ++ node = get_nod(fs, nod, &ni); ++ dir_set_name(&dw, name, nlen); ++ put_dir(&dw); + node->i_links_count++; +- d->d_name_len = nlen; +- strncpy(d->d_name, name, nlen); +- return; ++ put_nod(ni); ++ goto out; + } + // if entry with enough room (last one?), shrink it & use it + if(d->d_rec_len >= (sizeof(directory) + rndup(d->d_name_len, 4) + reclen)) + { +- reclen = d->d_rec_len; +- d->d_rec_len = sizeof(directory) + rndup(d->d_name_len, 4); +- reclen -= d->d_rec_len; +- d = (directory*) (((int8*)d) + d->d_rec_len); +- d->d_rec_len = reclen; +- d->d_inode = nod; +- node = get_nod(fs, nod); ++ d = shrink_dir(&dw, nod, name, nlen); ++ put_dir(&dw); ++ node = get_nod(fs, nod, &ni); + node->i_links_count++; +- d->d_name_len = nlen; +- strncpy(d->d_name, name, nlen); +- return; ++ put_nod(ni); ++ goto out; + } + } ++ put_dir(&dw); ++ lbw = bw; + } + // we found no free entry in the directory, so we add a block +- if(!(b = get_workblk())) +- error_msg_and_die("get_workblk() failed."); +- d = (directory*)b; +- d->d_inode = nod; +- node = get_nod(fs, nod); ++ node = get_nod(fs, nod, &ni); ++ d = new_dir(fs, nod, name, nlen, &dw); + node->i_links_count++; +- d->d_rec_len = BLOCKSIZE; +- d->d_name_len = nlen; +- strncpy(d->d_name, name, nlen); +- extend_blk(fs, dnod, b, 1); +- get_nod(fs, dnod)->i_size += BLOCKSIZE; +- free_workblk(b); ++ put_nod(ni); ++ next_dir(&dw); // Force the data into the buffer ++ ++ inode_pos_init(fs, &ipos, dnod, INODE_POS_EXTEND, &lbw); ++ extend_inode_blk(fs, &ipos, dir_data(&dw), 1); ++ inode_pos_finish(fs, &ipos); ++ ++ put_dir(&dw); ++ pnode->i_size += BLOCKSIZE; ++out: ++ put_nod(dni); + } + + // find an entry in a directory +@@ -1321,11 +1948,13 @@ + while((bk = walk_bw(fs, nod, &bw, 0, 0)) != WALK_END) + { + directory *d; +- uint8 *b; +- b = get_blk(fs, bk); +- for(d = (directory*)b; (int8*)d + sizeof(*d) < (int8*)b + BLOCKSIZE; d = (directory*)((int8*)d + d->d_rec_len)) +- if(d->d_inode && (nlen == d->d_name_len) && !strncmp(d->d_name, name, nlen)) ++ dirwalker dw; ++ for (d = get_dir(fs, bk, &dw); d; d=next_dir(&dw)) ++ if(d->d_inode && (nlen == d->d_name_len) && !strncmp(dir_name(&dw), name, nlen)) { ++ put_dir(&dw); + return d->d_inode; ++ } ++ put_dir(&dw); + } + return 0; + } +@@ -1356,47 +1985,55 @@ + return nod; + } + ++// chmod an inode ++void ++chmod_fs(filesystem *fs, uint32 nod, uint16 mode, uint16 uid, uint16 gid) ++{ ++ inode *node; ++ nod_info *ni; ++ node = get_nod(fs, nod, &ni); ++ node->i_mode = (node->i_mode & ~FM_IMASK) | (mode & FM_IMASK); ++ node->i_uid = uid; ++ node->i_gid = gid; ++ put_nod(ni); ++} ++ + // create a simple inode + static uint32 + mknod_fs(filesystem *fs, uint32 parent_nod, const char *name, uint16 mode, uint16 uid, uint16 gid, uint8 major, uint8 minor, uint32 ctime, uint32 mtime) + { + uint32 nod; + inode *node; +- if((nod = find_dir(fs, parent_nod, name))) +- { +- node = get_nod(fs, nod); +- if((node->i_mode & FM_IFMT) != (mode & FM_IFMT)) +- error_msg_and_die("node '%s' already exists and isn't of the same type", name); +- node->i_mode = mode; +- } +- else ++ nod_info *ni; ++ gd_info *gi; ++ ++ nod = alloc_nod(fs); ++ node = get_nod(fs, nod, &ni); ++ node->i_mode = mode; ++ add2dir(fs, parent_nod, nod, name); ++ switch(mode & FM_IFMT) + { +- nod = alloc_nod(fs); +- node = get_nod(fs, nod); +- node->i_mode = mode; +- add2dir(fs, parent_nod, nod, name); +- switch(mode & FM_IFMT) +- { +- case FM_IFLNK: +- mode = FM_IFLNK | FM_IRWXU | FM_IRWXG | FM_IRWXO; +- break; +- case FM_IFBLK: +- case FM_IFCHR: +- ((uint8*)get_nod(fs, nod)->i_block)[0] = minor; +- ((uint8*)get_nod(fs, nod)->i_block)[1] = major; +- break; +- case FM_IFDIR: +- add2dir(fs, nod, nod, "."); +- add2dir(fs, nod, parent_nod, ".."); +- fs->gd[GRP_GROUP_OF_INODE(fs,nod)].bg_used_dirs_count++; +- break; +- } ++ case FM_IFLNK: ++ mode = FM_IFLNK | FM_IRWXU | FM_IRWXG | FM_IRWXO; ++ break; ++ case FM_IFBLK: ++ case FM_IFCHR: ++ ((uint8*)node->i_block)[0] = minor; ++ ((uint8*)node->i_block)[1] = major; ++ break; ++ case FM_IFDIR: ++ add2dir(fs, nod, nod, "."); ++ add2dir(fs, nod, parent_nod, ".."); ++ get_gd(fs,GRP_GROUP_OF_INODE(fs,nod),&gi)->bg_used_dirs_count++; ++ put_gd(gi); ++ break; + } + node->i_uid = uid; + node->i_gid = gid; + node->i_atime = mtime; + node->i_ctime = ctime; + node->i_mtime = mtime; ++ put_nod(ni); + return nod; + } + +@@ -1413,33 +2050,73 @@ + mklink_fs(filesystem *fs, uint32 parent_nod, const char *name, size_t size, uint8 *b, uid_t uid, gid_t gid, uint32 ctime, uint32 mtime) + { + uint32 nod = mknod_fs(fs, parent_nod, name, FM_IFLNK | FM_IRWXU | FM_IRWXG | FM_IRWXO, uid, gid, 0, 0, ctime, mtime); +- extend_blk(fs, nod, 0, - (int)get_nod(fs, nod)->i_blocks / INOBLK); +- get_nod(fs, nod)->i_size = size; +- if(size <= 4 * (EXT2_TIND_BLOCK+1)) +- { +- strncpy((char*)get_nod(fs, nod)->i_block, (char*)b, size); ++ nod_info *ni; ++ inode *node = get_nod(fs, nod, &ni); ++ inode_pos ipos; ++ ++ inode_pos_init(fs, &ipos, nod, INODE_POS_TRUNCATE, NULL); ++ node->i_size = size; ++ if(size < 4 * (EXT2_TIND_BLOCK+1)) ++ { ++ strncpy((char*)node->i_block, (char*)b, size); ++ ((char*)node->i_block)[size+1] = '\0'; ++ inode_pos_finish(fs, &ipos); ++ put_nod(ni); + return nod; + } +- extend_blk(fs, nod, b, rndup(size, BLOCKSIZE) / BLOCKSIZE); ++ extend_inode_blk(fs, &ipos, b, rndup(size, BLOCKSIZE) / BLOCKSIZE); ++ inode_pos_finish(fs, &ipos); ++ put_nod(ni); + return nod; + } + ++static void ++fs_upgrade_rev1_largefile(filesystem *fs) ++{ ++ fs->sb->s_rev_level = 1; ++ fs->sb->s_first_ino = EXT2_GOOD_OLD_FIRST_INO; ++ fs->sb->s_inode_size = EXT2_GOOD_OLD_INODE_SIZE; ++} ++ ++#define COPY_BLOCKS 16 ++#define CB_SIZE (COPY_BLOCKS * BLOCKSIZE) ++ + // make a file from a FILE* + static uint32 +-mkfile_fs(filesystem *fs, uint32 parent_nod, const char *name, uint32 mode, size_t size, FILE *f, uid_t uid, gid_t gid, uint32 ctime, uint32 mtime) ++mkfile_fs(filesystem *fs, uint32 parent_nod, const char *name, uint32 mode, FILE *f, uid_t uid, gid_t gid, uint32 ctime, uint32 mtime) + { + uint8 * b; + uint32 nod = mknod_fs(fs, parent_nod, name, mode|FM_IFREG, uid, gid, 0, 0, ctime, mtime); +- extend_blk(fs, nod, 0, - (int)get_nod(fs, nod)->i_blocks / INOBLK); +- get_nod(fs, nod)->i_size = size; +- if (size) { +- if(!(b = (uint8*)calloc(rndup(size, BLOCKSIZE), 1))) +- error_msg_and_die("not enough mem to read file '%s'", name); +- if(f) +- fread(b, size, 1, f); // FIXME: ugly. use mmap() ... +- extend_blk(fs, nod, b, rndup(size, BLOCKSIZE) / BLOCKSIZE); +- free(b); +- } ++ nod_info *ni; ++ inode *node = get_nod(fs, nod, &ni); ++ off_t size = 0; ++ size_t readbytes; ++ inode_pos ipos; ++ int fullsize; ++ ++ b = malloc(CB_SIZE); ++ if (!b) ++ error_msg_and_die("mkfile_fs: out of memory"); ++ inode_pos_init(fs, &ipos, nod, INODE_POS_TRUNCATE, NULL); ++ readbytes = fread(b, 1, CB_SIZE, f); ++ while (readbytes) { ++ fullsize = rndup(readbytes, BLOCKSIZE); ++ // Fill to end of block with zeros. ++ memset(b + readbytes, 0, fullsize - readbytes); ++ extend_inode_blk(fs, &ipos, b, fullsize / BLOCKSIZE); ++ size += readbytes; ++ readbytes = fread(b, 1, CB_SIZE, f); ++ } ++ if (size > 0x7fffffff) { ++ if (fs->sb->s_rev_level < 1) ++ fs_upgrade_rev1_largefile(fs); ++ fs->sb->s_feature_ro_compat |= EXT2_FEATURE_RO_COMPAT_LARGE_FILE; ++ } ++ node->i_dir_acl = size >> 32; ++ node->i_size = size; ++ inode_pos_finish(fs, &ipos); ++ put_nod(ni); ++ free(b); + return nod; + } + +@@ -1591,13 +2268,24 @@ + dname = malloc(len + 1); + for(i = start; i < count; i++) + { ++ uint32 oldnod; + SNPRINTF(dname, len, "%s%lu", name, i); +- mknod_fs(fs, nod, dname, mode, uid, gid, major, minor + (i * increment - start), ctime, mtime); ++ oldnod = find_dir(fs, nod, dname); ++ if(oldnod) ++ chmod_fs(fs, oldnod, mode, uid, gid); ++ else ++ mknod_fs(fs, nod, dname, mode, uid, gid, major, minor + (i * increment - start), ctime, mtime); + } + free(dname); + } + else +- mknod_fs(fs, nod, name, mode, uid, gid, major, minor, ctime, mtime); ++ { ++ uint32 oldnod = find_dir(fs, nod, name); ++ if(oldnod) ++ chmod_fs(fs, oldnod, mode, uid, gid); ++ else ++ mknod_fs(fs, nod, name, mode, uid, gid, major, minor, ctime, mtime); ++ } + } + } + if (line) +@@ -1643,6 +2331,10 @@ + switch(st.st_mode & S_IFMT) + { + case S_IFLNK: ++ if((st.st_mode & S_IFMT) == S_IFREG || st.st_size >= 4 * (EXT2_TIND_BLOCK+1)) ++ stats->nblocks += (st.st_size + BLOCKSIZE - 1) / BLOCKSIZE; ++ stats->ninodes++; ++ break; + case S_IFREG: + if((st.st_mode & S_IFMT) == S_IFREG || st.st_size > 4 * (EXT2_TIND_BLOCK+1)) + stats->nblocks += (st.st_size + BLOCKSIZE - 1) / BLOCKSIZE; +@@ -1657,19 +2349,33 @@ + if(chdir(dent->d_name) < 0) + perror_msg_and_die(dent->d_name); + add2fs_from_dir(fs, this_nod, squash_uids, squash_perms, fs_timestamp, stats); +- chdir(".."); ++ if (chdir("..") == -1) ++ perror_msg_and_die(".."); ++ + break; + default: + break; + } + else + { ++ if((nod = find_dir(fs, this_nod, name))) ++ { ++ error_msg("ignoring duplicate entry %s", name); ++ if(S_ISDIR(st.st_mode)) { ++ if(chdir(dent->d_name) < 0) ++ perror_msg_and_die(name); ++ add2fs_from_dir(fs, nod, squash_uids, squash_perms, fs_timestamp, stats); ++ if (chdir("..") == -1) ++ perror_msg_and_die(".."); ++ } ++ continue; ++ } + save_nod = 0; + /* Check for hardlinks */ + if (!S_ISDIR(st.st_mode) && !S_ISLNK(st.st_mode) && st.st_nlink > 1) { +- int32 hdlink = is_hardlink(st.st_ino); ++ int32 hdlink = is_hardlink(fs, st.st_ino); + if (hdlink >= 0) { +- add2dir(fs, this_nod, hdlinks.hdl[hdlink].dst_nod, name); ++ add2dir(fs, this_nod, fs->hdlinks.hdl[hdlink].dst_nod, name); + continue; + } else { + save_nod = 1; +@@ -1697,8 +2403,12 @@ + free(lnk); + break; + case S_IFREG: +- fh = xfopen(dent->d_name, "rb"); +- nod = mkfile_fs(fs, this_nod, name, mode, st.st_size, fh, uid, gid, ctime, mtime); ++ fh = fopen(dent->d_name, "rb"); ++ if (!fh) { ++ error_msg("Unable to open file %s", dent->d_name); ++ break; ++ } ++ nod = mkfile_fs(fs, this_nod, name, mode, fh, uid, gid, ctime, mtime); + fclose(fh); + break; + case S_IFDIR: +@@ -1706,199 +2416,128 @@ + if(chdir(dent->d_name) < 0) + perror_msg_and_die(name); + add2fs_from_dir(fs, nod, squash_uids, squash_perms, fs_timestamp, stats); +- chdir(".."); ++ if (chdir("..") == -1) ++ perror_msg_and_die(".."); + break; + default: + error_msg("ignoring entry %s", name); + } + if (save_nod) { +- if (hdlinks.count == hdlink_cnt) { +- if ((hdlinks.hdl = +- realloc (hdlinks.hdl, (hdlink_cnt + HDLINK_CNT) * ++ if (fs->hdlinks.count == fs->hdlink_cnt) { ++ if ((fs->hdlinks.hdl = ++ realloc (fs->hdlinks.hdl, (fs->hdlink_cnt + HDLINK_CNT) * + sizeof (struct hdlink_s))) == NULL) { + error_msg_and_die("Not enough memory"); + } +- hdlink_cnt += HDLINK_CNT; ++ fs->hdlink_cnt += HDLINK_CNT; + } +- hdlinks.hdl[hdlinks.count].src_inode = st.st_ino; +- hdlinks.hdl[hdlinks.count].dst_nod = nod; +- hdlinks.count++; ++ fs->hdlinks.hdl[fs->hdlinks.count].src_inode = st.st_ino; ++ fs->hdlinks.hdl[fs->hdlinks.count].dst_nod = nod; ++ fs->hdlinks.count++; + } + } + } + closedir(dh); + } + +-// endianness swap of x-indirect blocks ++// Copy size blocks from src to dst, putting holes in the output ++// file (if possible) if the input block is all zeros. ++// Copy size blocks from src to dst, putting holes in the output ++// file (if possible) if the input block is all zeros. + static void +-swap_goodblocks(filesystem *fs, inode *nod) ++copy_file(filesystem *fs, FILE *dst, FILE *src, size_t size) + { +- uint32 i,j; +- int done=0; +- uint32 *b,*b2; ++ uint8 *b; + +- uint32 nblk = nod->i_blocks / INOBLK; +- if((nod->i_size && !nblk) || ((nod->i_mode & FM_IFBLK) == FM_IFBLK) || ((nod->i_mode & FM_IFCHR) == FM_IFCHR)) +- for(i = 0; i <= EXT2_TIND_BLOCK; i++) +- nod->i_block[i] = swab32(nod->i_block[i]); +- if(nblk <= EXT2_IND_BLOCK) +- return; +- swap_block(get_blk(fs, nod->i_block[EXT2_IND_BLOCK])); +- if(nblk <= EXT2_DIND_BLOCK + BLOCKSIZE/4) +- return; +- /* Currently this will fail b'cos the number of blocks as stored +- in i_blocks also includes the indirection blocks (see +- walk_bw). But this function assumes that i_blocks only +- stores the count of data blocks ( Actually according to +- "Understanding the Linux Kernel" (Table 17-3 p502 1st Ed) +- i_blocks IS supposed to store the count of data blocks). so +- with a file of size 268K nblk would be 269.The above check +- will be false even though double indirection hasn't been +- started.This is benign as 0 means block 0 which has been +- zeroed out and therefore points back to itself from any offset +- */ +- // FIXME: I have fixed that, but I have the feeling the rest of +- // ths function needs to be fixed for the same reasons - Xav +- assert(nod->i_block[EXT2_DIND_BLOCK] != 0); +- for(i = 0; i < BLOCKSIZE/4; i++) +- if(nblk > EXT2_IND_BLOCK + BLOCKSIZE/4 + (BLOCKSIZE/4)*i ) +- swap_block(get_blk(fs, ((uint32*)get_blk(fs, nod->i_block[EXT2_DIND_BLOCK]))[i])); +- swap_block(get_blk(fs, nod->i_block[EXT2_DIND_BLOCK])); +- if(nblk <= EXT2_IND_BLOCK + BLOCKSIZE/4 + BLOCKSIZE/4 * BLOCKSIZE/4) +- return; +- /* Adding support for triple indirection */ +- b = (uint32*)get_blk(fs,nod->i_block[EXT2_TIND_BLOCK]); +- for(i=0;i < BLOCKSIZE/4 && !done ; i++) { +- b2 = (uint32*)get_blk(fs,b[i]); +- for(j=0; j ( EXT2_IND_BLOCK + BLOCKSIZE/4 + +- (BLOCKSIZE/4)*(BLOCKSIZE/4) + +- i*(BLOCKSIZE/4)*(BLOCKSIZE/4) + +- j*(BLOCKSIZE/4)) ) +- swap_block(get_blk(fs,b2[j])); +- else { +- done = 1; +- break; +- } ++ b = malloc(BLOCKSIZE); ++ if (!b) ++ error_msg_and_die("copy_file: out of memory"); ++ if (fseek(src, 0, SEEK_SET)) ++ perror_msg_and_die("fseek"); ++ if (ftruncate(fileno(dst), 0)) ++ perror_msg_and_die("copy_file: ftruncate"); ++ while (size > 0) { ++ if (fread(b, BLOCKSIZE, 1, src) != 1) ++ perror_msg_and_die("copy failed on read"); ++ if ((dst != stdout) && fs->holes && is_blk_empty(b)) { ++ /* Empty block, just skip it */ ++ if (fseek(dst, BLOCKSIZE, SEEK_CUR)) ++ perror_msg_and_die("fseek"); ++ } else { ++ if (fwrite(b, BLOCKSIZE, 1, dst) != 1) ++ perror_msg_and_die("copy failed on write"); + } +- swap_block((uint8 *)b2); ++ size--; + } +- swap_block((uint8 *)b); +- return; ++ free(b); + } + +-static void +-swap_badblocks(filesystem *fs, inode *nod) ++// Allocate a new filesystem structure, allocate internal memory, ++// and initialize the contents. ++static filesystem * ++alloc_fs(int swapit, char *fname, uint32 nbblocks, FILE *srcfile) + { +- uint32 i,j; +- int done=0; +- uint32 *b,*b2; ++ filesystem *fs; ++ struct stat srcstat, dststat; + +- uint32 nblk = nod->i_blocks / INOBLK; +- if((nod->i_size && !nblk) || ((nod->i_mode & FM_IFBLK) == FM_IFBLK) || ((nod->i_mode & FM_IFCHR) == FM_IFCHR)) +- for(i = 0; i <= EXT2_TIND_BLOCK; i++) +- nod->i_block[i] = swab32(nod->i_block[i]); +- if(nblk <= EXT2_IND_BLOCK) +- return; +- swap_block(get_blk(fs, nod->i_block[EXT2_IND_BLOCK])); +- if(nblk <= EXT2_DIND_BLOCK + BLOCKSIZE/4) +- return; +- /* See comment in swap_goodblocks */ +- assert(nod->i_block[EXT2_DIND_BLOCK] != 0); +- swap_block(get_blk(fs, nod->i_block[EXT2_DIND_BLOCK])); +- for(i = 0; i < BLOCKSIZE/4; i++) +- if(nblk > EXT2_IND_BLOCK + BLOCKSIZE/4 + (BLOCKSIZE/4)*i ) +- swap_block(get_blk(fs, ((uint32*)get_blk(fs, nod->i_block[EXT2_DIND_BLOCK]))[i])); +- if(nblk <= EXT2_IND_BLOCK + BLOCKSIZE/4 + BLOCKSIZE/4 * BLOCKSIZE/4) +- return; +- /* Adding support for triple indirection */ +- b = (uint32*)get_blk(fs,nod->i_block[EXT2_TIND_BLOCK]); +- swap_block((uint8 *)b); +- for(i=0;i < BLOCKSIZE/4 && !done ; i++) { +- b2 = (uint32*)get_blk(fs,b[i]); +- swap_block((uint8 *)b2); +- for(j=0; j ( EXT2_IND_BLOCK + BLOCKSIZE/4 + +- (BLOCKSIZE/4)*(BLOCKSIZE/4) + +- i*(BLOCKSIZE/4)*(BLOCKSIZE/4) + +- j*(BLOCKSIZE/4)) ) +- swap_block(get_blk(fs,b2[j])); +- else { +- done = 1; +- break; +- } +- } +- } +- return; +-} ++ fs = malloc(sizeof(*fs)); ++ if (!fs) ++ error_msg_and_die("not enough memory for filesystem"); ++ memset(fs, 0, sizeof(*fs)); ++ fs->swapit = swapit; ++ cache_init(&fs->blks, MAX_FREE_CACHE_BLOCKS, blk_elem_val, blk_freed); ++ cache_init(&fs->gds, MAX_FREE_CACHE_GDS, gd_elem_val, gd_freed); ++ cache_init(&fs->blkmaps, MAX_FREE_CACHE_BLOCKMAPS, ++ blkmap_elem_val, blkmap_freed); ++ cache_init(&fs->inodes, MAX_FREE_CACHE_INODES, ++ inode_elem_val, inode_freed); ++ fs->hdlink_cnt = HDLINK_CNT; ++ fs->hdlinks.hdl = calloc(sizeof(struct hdlink_s), fs->hdlink_cnt); ++ if (!fs->hdlinks.hdl) ++ error_msg_and_die("Not enough memory"); ++ fs->hdlinks.count = 0 ; + +-// endianness swap of the whole filesystem +-static void +-swap_goodfs(filesystem *fs) +-{ +- uint32 i; +- for(i = 1; i < fs->sb.s_inodes_count; i++) +- { +- inode *nod = get_nod(fs, i); +- if(nod->i_mode & FM_IFDIR) +- { +- blockwalker bw; +- uint32 bk; +- init_bw(&bw); +- while((bk = walk_bw(fs, i, &bw, 0, 0)) != WALK_END) +- { +- directory *d; +- uint8 *b; +- b = get_blk(fs, bk); +- for(d = (directory*)b; (int8*)d + sizeof(*d) < (int8*)b + BLOCKSIZE; d = (directory*)((int8*)d + swab16(d->d_rec_len))) +- swap_dir(d); +- } +- } +- swap_goodblocks(fs, nod); +- swap_nod(nod); +- } +- for(i=0;igd[i])); +- swap_sb(&fs->sb); ++ if (strcmp(fname, "-") == 0) ++ fs->f = tmpfile(); ++ else if (srcfile) { ++ if (fstat(fileno(srcfile), &srcstat)) ++ perror_msg_and_die("fstat srcfile"); ++ if (stat(fname, &dststat) == 0 ++ && srcstat.st_ino == dststat.st_ino ++ && srcstat.st_dev == dststat.st_dev) ++ { ++ // source and destination are the same file, don't ++ // truncate or copy, just use the file. ++ fs->f = fopen(fname, "r+b"); ++ } else { ++ fs->f = fopen(fname, "w+b"); ++ if (fs->f) ++ copy_file(fs, fs->f, srcfile, nbblocks); ++ } ++ } else ++ fs->f = fopen(fname, "w+b"); ++ if (!fs->f) ++ perror_msg_and_die("opening %s", fname); ++ return fs; + } + ++/* Make sure the output file is the right size */ + static void +-swap_badfs(filesystem *fs) ++set_file_size(filesystem *fs) + { +- uint32 i; +- swap_sb(&fs->sb); +- for(i=0;igd[i])); +- for(i = 1; i < fs->sb.s_inodes_count; i++) +- { +- inode *nod = get_nod(fs, i); +- swap_nod(nod); +- swap_badblocks(fs, nod); +- if(nod->i_mode & FM_IFDIR) +- { +- blockwalker bw; +- uint32 bk; +- init_bw(&bw); +- while((bk = walk_bw(fs, i, &bw, 0, 0)) != WALK_END) +- { +- directory *d; +- uint8 *b; +- b = get_blk(fs, bk); +- for(d = (directory*)b; (int8*)d + sizeof(*d) < (int8*)b + BLOCKSIZE; d = (directory*)((int8*)d + d->d_rec_len)) +- swap_dir(d); +- } +- } +- } ++ if (ftruncate(fileno(fs->f), ++ ((off_t) fs->sb->s_blocks_count) * BLOCKSIZE)) ++ perror_msg_and_die("set_file_size: ftruncate"); + } + + // initialize an empty filesystem + static filesystem * +-init_fs(int nbblocks, int nbinodes, int nbresrvd, int holes, uint32 fs_timestamp) ++init_fs(int nbblocks, int nbinodes, int nbresrvd, int holes, ++ uint32 fs_timestamp, uint32 creator_os, int swapit, char *fname) + { + uint32 i; + filesystem *fs; +- directory *d; +- uint8 * b; ++ dirwalker dw; + uint32 nod, first_block; + uint32 nbgroups,nbinodes_per_group,overhead_per_group,free_blocks, + free_blocks_per_group,nbblocks_per_group,min_nbgroups; +@@ -1906,6 +2545,11 @@ + uint32 j; + uint8 *bbm,*ibm; + inode *itab0; ++ blk_info *bi; ++ nod_info *ni; ++ groupdescriptor *gd; ++ gd_info *gi; ++ inode_pos ipos; + + if(nbresrvd < 0) + error_msg_and_die("reserved blocks value is invalid. Note: options have changed, see --help or the man page."); +@@ -1919,10 +2563,14 @@ + */ + min_nbgroups = (nbinodes + INODES_PER_GROUP - 1) / INODES_PER_GROUP; + ++ /* On filesystems with 1k block size, the bootloader area uses a full ++ * block. For 2048 and up, the superblock can be fitted into block 0. ++ */ ++ first_block = (BLOCKSIZE == 1024); ++ + /* nbblocks is the total number of blocks in the filesystem. + * a block group can have no more than 8192 blocks. + */ +- first_block = (BLOCKSIZE == 1024); + nbgroups = (nbblocks - first_block + BLOCKS_PER_GROUP - 1) / BLOCKS_PER_GROUP; + if(nbgroups < min_nbgroups) nbgroups = min_nbgroups; + nbblocks_per_group = rndup((nbblocks - first_block + nbgroups - 1)/nbgroups, 8); +@@ -1934,51 +2582,59 @@ + gdsz = rndup(nbgroups*sizeof(groupdescriptor),BLOCKSIZE)/BLOCKSIZE; + itblsz = nbinodes_per_group * sizeof(inode)/BLOCKSIZE; + overhead_per_group = 3 /*sb,bbm,ibm*/ + gdsz + itblsz; +- if((uint32)nbblocks - 1 < overhead_per_group * nbgroups) +- error_msg_and_die("too much overhead, try fewer inodes or more blocks. Note: options have changed, see --help or the man page."); +- free_blocks = nbblocks - overhead_per_group*nbgroups - 1 /*boot block*/; ++ free_blocks = nbblocks - overhead_per_group*nbgroups - first_block; + free_blocks_per_group = nbblocks_per_group - overhead_per_group; ++ if(free_blocks < 0) ++ error_msg_and_die("too much overhead, try fewer inodes or more blocks. Note: options have changed, see --help or the man page."); + +- if(!(fs = (filesystem*)calloc(nbblocks, BLOCKSIZE))) +- error_msg_and_die("not enough memory for filesystem"); ++ fs = alloc_fs(swapit, fname, nbblocks, NULL); ++ fs->sb = calloc(1, SUPERBLOCK_SIZE); ++ if (!fs->sb) ++ error_msg_and_die("error allocating header memory"); + + // create the superblock for an empty filesystem +- fs->sb.s_inodes_count = nbinodes_per_group * nbgroups; +- fs->sb.s_blocks_count = nbblocks; +- fs->sb.s_r_blocks_count = nbresrvd; +- fs->sb.s_free_blocks_count = free_blocks; +- fs->sb.s_free_inodes_count = fs->sb.s_inodes_count - EXT2_FIRST_INO + 1; +- fs->sb.s_first_data_block = first_block; +- fs->sb.s_log_block_size = BLOCKSIZE >> 11; +- fs->sb.s_log_frag_size = BLOCKSIZE >> 11; +- fs->sb.s_blocks_per_group = nbblocks_per_group; +- fs->sb.s_frags_per_group = nbblocks_per_group; +- fs->sb.s_inodes_per_group = nbinodes_per_group; +- fs->sb.s_wtime = fs_timestamp; +- fs->sb.s_magic = EXT2_MAGIC_NUMBER; +- fs->sb.s_lastcheck = fs_timestamp; ++ fs->sb->s_inodes_count = nbinodes_per_group * nbgroups; ++ fs->sb->s_blocks_count = nbblocks; ++ fs->sb->s_r_blocks_count = nbresrvd; ++ fs->sb->s_free_blocks_count = free_blocks; ++ fs->sb->s_free_inodes_count = fs->sb->s_inodes_count - EXT2_FIRST_INO + 1; ++ fs->sb->s_first_data_block = first_block; ++ fs->sb->s_log_block_size = BLOCKSIZE >> 11; ++ fs->sb->s_log_frag_size = BLOCKSIZE >> 11; ++ fs->sb->s_blocks_per_group = nbblocks_per_group; ++ fs->sb->s_frags_per_group = nbblocks_per_group; ++ fs->sb->s_inodes_per_group = nbinodes_per_group; ++ fs->sb->s_wtime = fs_timestamp; ++ fs->sb->s_magic = EXT2_MAGIC_NUMBER; ++ fs->sb->s_lastcheck = fs_timestamp; ++ fs->sb->s_creator_os = creator_os; ++ ++ set_file_size(fs); + + // set up groupdescriptors +- for(i=0, bbmpos=gdsz+2, ibmpos=bbmpos+1, itblpos=ibmpos+1; ++ for(i=0, bbmpos=first_block+1+gdsz, ibmpos=bbmpos+1, itblpos=ibmpos+1; + i free_blocks_per_group) { +- fs->gd[i].bg_free_blocks_count = free_blocks_per_group; ++ gd->bg_free_blocks_count = free_blocks_per_group; + free_blocks -= free_blocks_per_group; + } else { +- fs->gd[i].bg_free_blocks_count = free_blocks; ++ gd->bg_free_blocks_count = free_blocks; + free_blocks = 0; // this is the last block group + } + if(i) +- fs->gd[i].bg_free_inodes_count = nbinodes_per_group; ++ gd->bg_free_inodes_count = nbinodes_per_group; + else +- fs->gd[i].bg_free_inodes_count = nbinodes_per_group - ++ gd->bg_free_inodes_count = nbinodes_per_group - + EXT2_FIRST_INO + 2; +- fs->gd[i].bg_used_dirs_count = 0; +- fs->gd[i].bg_block_bitmap = bbmpos; +- fs->gd[i].bg_inode_bitmap = ibmpos; +- fs->gd[i].bg_inode_table = itblpos; ++ gd->bg_used_dirs_count = 0; ++ gd->bg_block_bitmap = bbmpos; ++ gd->bg_inode_bitmap = ibmpos; ++ gd->bg_inode_table = itblpos; ++ put_gd(gi); + } + + /* Mark non-filesystem blocks and inodes as allocated */ +@@ -1984,110 +2640,143 @@ + /* Mark non-filesystem blocks and inodes as allocated */ + /* Mark system blocks and inodes as allocated */ + for(i = 0; igd[i].bg_block_bitmap); ++ gd = get_gd(fs, i, &gi); ++ bbm = GRP_GET_GROUP_BBM(fs, gd, &bi); + //non-filesystem blocks +- for(j = fs->gd[i].bg_free_blocks_count ++ for(j = gd->bg_free_blocks_count + + overhead_per_group + 1; j <= BLOCKSIZE * 8; j++) + allocate(bbm, j); + //system blocks + for(j = 1; j <= overhead_per_group; j++) + allocate(bbm, j); +- ++ GRP_PUT_GROUP_BBM(bi); ++ + /* Inode bitmap */ +- ibm = get_blk(fs,fs->gd[i].bg_inode_bitmap); ++ ibm = GRP_GET_GROUP_IBM(fs, gd, &bi); + //non-filesystem inodes +- for(j = fs->sb.s_inodes_per_group+1; j <= BLOCKSIZE * 8; j++) ++ for(j = fs->sb->s_inodes_per_group+1; j <= BLOCKSIZE * 8; j++) + allocate(ibm, j); + + //system inodes + if(i == 0) + for(j = 1; j < EXT2_FIRST_INO; j++) + allocate(ibm, j); ++ GRP_PUT_GROUP_IBM(bi); ++ put_gd(gi); + } + + // make root inode and directory + /* We have groups now. Add the root filesystem in group 0 */ + /* Also increment the directory count for group 0 */ +- fs->gd[0].bg_free_inodes_count--; +- fs->gd[0].bg_used_dirs_count = 1; +- itab0 = (inode *)get_blk(fs,fs->gd[0].bg_inode_table); +- itab0[EXT2_ROOT_INO-1].i_mode = FM_IFDIR | FM_IRWXU | FM_IRGRP | FM_IROTH | FM_IXGRP | FM_IXOTH; +- itab0[EXT2_ROOT_INO-1].i_ctime = fs_timestamp; +- itab0[EXT2_ROOT_INO-1].i_mtime = fs_timestamp; +- itab0[EXT2_ROOT_INO-1].i_atime = fs_timestamp; +- itab0[EXT2_ROOT_INO-1].i_size = BLOCKSIZE; +- itab0[EXT2_ROOT_INO-1].i_links_count = 2; +- +- if(!(b = get_workblk())) +- error_msg_and_die("get_workblk() failed."); +- d = (directory*)b; +- d->d_inode = EXT2_ROOT_INO; +- d->d_rec_len = sizeof(directory)+4; +- d->d_name_len = 1; +- strcpy(d->d_name, "."); +- d = (directory*)(b + d->d_rec_len); +- d->d_inode = EXT2_ROOT_INO; +- d->d_rec_len = BLOCKSIZE - (sizeof(directory)+4); +- d->d_name_len = 2; +- strcpy(d->d_name, ".."); +- extend_blk(fs, EXT2_ROOT_INO, b, 1); ++ gd = get_gd(fs, 0, &gi); ++ gd->bg_free_inodes_count--; ++ gd->bg_used_dirs_count = 1; ++ put_gd(gi); ++ itab0 = get_nod(fs, EXT2_ROOT_INO, &ni); ++ itab0->i_mode = FM_IFDIR | FM_IRWXU | FM_IRGRP | FM_IROTH | FM_IXGRP | FM_IXOTH; ++ itab0->i_ctime = fs_timestamp; ++ itab0->i_mtime = fs_timestamp; ++ itab0->i_atime = fs_timestamp; ++ itab0->i_size = BLOCKSIZE; ++ itab0->i_links_count = 2; ++ put_nod(ni); ++ ++ new_dir(fs, EXT2_ROOT_INO, ".", 1, &dw); ++ shrink_dir(&dw, EXT2_ROOT_INO, "..", 2); ++ next_dir(&dw); // Force the data into the buffer ++ inode_pos_init(fs, &ipos, EXT2_ROOT_INO, INODE_POS_EXTEND, NULL); ++ extend_inode_blk(fs, &ipos, dir_data(&dw), 1); ++ inode_pos_finish(fs, &ipos); ++ put_dir(&dw); + +- // make lost+found directory and reserve blocks +- if(fs->sb.s_r_blocks_count) ++ // make lost+found directory ++ if(fs->sb->s_r_blocks_count) + { +- nod = mkdir_fs(fs, EXT2_ROOT_INO, "lost+found", FM_IRWXU, 0, 0, fs_timestamp, fs_timestamp); ++ inode *node; ++ uint8 *b; ++ ++ nod = mkdir_fs(fs, EXT2_ROOT_INO, "lost+found", FM_IRWXU, ++ 0, 0, fs_timestamp, fs_timestamp); ++ b = get_workblk(); + memset(b, 0, BLOCKSIZE); + ((directory*)b)->d_rec_len = BLOCKSIZE; +- /* We run into problems with e2fsck if directory lost+found grows +- * bigger than this. Need to find out why this happens - sundar +- */ +- if (fs->sb.s_r_blocks_count > fs->sb.s_blocks_count * MAX_RESERVED_BLOCKS ) +- fs->sb.s_r_blocks_count = fs->sb.s_blocks_count * MAX_RESERVED_BLOCKS; +- for(i = 1; i < fs->sb.s_r_blocks_count; i++) +- extend_blk(fs, nod, b, 1); +- get_nod(fs, nod)->i_size = fs->sb.s_r_blocks_count * BLOCKSIZE; ++ inode_pos_init(fs, &ipos, nod, INODE_POS_EXTEND, NULL); ++ // It is always 16 blocks to start out with ++ for(i = 1; i < 16; i++) ++ extend_inode_blk(fs, &ipos, b, 1); ++ inode_pos_finish(fs, &ipos); ++ free_workblk(b); ++ node = get_nod(fs, nod, &ni); ++ node->i_size = 16 * BLOCKSIZE; ++ put_nod(ni); + } +- free_workblk(b); + + // administrative info +- fs->sb.s_state = 1; +- fs->sb.s_max_mnt_count = 20; ++ fs->sb->s_state = 1; ++ fs->sb->s_max_mnt_count = 20; + + // options for me +- if(holes) +- fs->sb.s_reserved[200] |= OP_HOLES; ++ fs->holes = holes; + + return fs; + } + + // loads a filesystem from disk + static filesystem * +-load_fs(FILE * fh, int swapit) ++load_fs(FILE *fh, int swapit, char *fname) + { +- size_t fssize; ++ off_t fssize; + filesystem *fs; +- if((fseek(fh, 0, SEEK_END) < 0) || ((ssize_t)(fssize = ftell(fh)) == -1)) ++ ++ if((fseek(fh, 0, SEEK_END) < 0) || ((fssize = ftello(fh)) == -1)) + perror_msg_and_die("input filesystem image"); + rewind(fh); +- fssize = (fssize + BLOCKSIZE - 1) / BLOCKSIZE; ++ if ((fssize % BLOCKSIZE) != 0) ++ error_msg_and_die("Input file not a multiple of block size"); ++ fssize /= BLOCKSIZE; + if(fssize < 16) // totally arbitrary + error_msg_and_die("too small filesystem"); +- if(!(fs = (filesystem*)calloc(fssize, BLOCKSIZE))) +- error_msg_and_die("not enough memory for filesystem"); +- if(fread(fs, BLOCKSIZE, fssize, fh) != fssize) +- perror_msg_and_die("input filesystem image"); ++ fs = alloc_fs(swapit, fname, fssize, fh); ++ ++ /* Read and check the superblock, then read the superblock ++ * and all the group descriptors */ ++ fs->sb = malloc(SUPERBLOCK_SIZE); ++ if (!fs->sb) ++ error_msg_and_die("error allocating header memory"); ++ if (fseek(fs->f, SUPERBLOCK_OFFSET, SEEK_SET)) ++ perror_msg_and_die("fseek"); ++ if (fread(fs->sb, SUPERBLOCK_SIZE, 1, fs->f) != 1) ++ perror_msg_and_die("fread filesystem image superblock"); + if(swapit) +- swap_badfs(fs); +- if(fs->sb.s_rev_level || (fs->sb.s_magic != EXT2_MAGIC_NUMBER)) ++ swap_sb(fs->sb); ++ ++ if((fs->sb->s_rev_level > 1) || (fs->sb->s_magic != EXT2_MAGIC_NUMBER)) + error_msg_and_die("not a suitable ext2 filesystem"); ++ if (fs->sb->s_rev_level > 0) { ++ if (fs->sb->s_first_ino != EXT2_GOOD_OLD_FIRST_INO) ++ error_msg_and_die("First inode incompatible"); ++ if (fs->sb->s_inode_size != EXT2_GOOD_OLD_INODE_SIZE) ++ error_msg_and_die("inode size incompatible"); ++ if (fs->sb->s_feature_compat) ++ error_msg_and_die("Unsupported compat features"); ++ if (fs->sb->s_feature_incompat) ++ error_msg_and_die("Unsupported incompat features"); ++ if (fs->sb->s_feature_ro_compat ++ & ~EXT2_FEATURE_RO_COMPAT_LARGE_FILE) ++ error_msg_and_die("Unsupported ro compat features"); ++ } ++ ++ set_file_size(fs); + return fs; + } + + static void + free_fs(filesystem *fs) + { ++ free(fs->hdlinks.hdl); ++ fclose(fs->f); ++ free(fs->sb); + free(fs); + } + +@@ -2123,16 +2812,23 @@ + { + blockwalker bw; + uint32 bk; +- int32 fsize = get_nod(fs, nod)->i_size; ++ nod_info *ni; ++ inode *node = get_nod(fs, nod, &ni); ++ int32 fsize = node->i_size; ++ blk_info *bi; ++ + init_bw(&bw); + while((bk = walk_bw(fs, nod, &bw, 0, 0)) != WALK_END) + { + if(fsize <= 0) + error_msg_and_die("wrong size while saving inode %d", nod); +- if(fwrite(get_blk(fs, bk), (fsize > BLOCKSIZE) ? BLOCKSIZE : fsize, 1, f) != 1) ++ if(fwrite(get_blk(fs, bk, &bi), ++ (fsize > BLOCKSIZE) ? BLOCKSIZE : fsize, 1, f) != 1) + error_msg_and_die("error while saving inode %d", nod); ++ put_blk(bi); + fsize -= BLOCKSIZE; + } ++ put_nod(ni); + } + + +@@ -2141,8 +2837,11 @@ + print_dev(filesystem *fs, uint32 nod) + { + int minor, major; +- minor = ((uint8*)get_nod(fs, nod)->i_block)[0]; +- major = ((uint8*)get_nod(fs, nod)->i_block)[1]; ++ nod_info *ni; ++ inode *node = get_nod(fs, nod, &ni); ++ minor = ((uint8*)node->i_block)[0]; ++ major = ((uint8*)node->i_block)[1]; ++ put_nod(ni); + printf("major: %d, minor: %d\n", major, minor); + } + +@@ -2157,17 +2856,15 @@ + while((bk = walk_bw(fs, nod, &bw, 0, 0)) != WALK_END) + { + directory *d; +- uint8 *b; +- b = get_blk(fs, bk); +- for(d = (directory*)b; (int8*)d + sizeof(*d) < (int8*)b + BLOCKSIZE; d = (directory*)((int8*)d + d->d_rec_len)) ++ dirwalker dw; ++ for (d = get_dir(fs, bk, &dw); d; d = next_dir(&dw)) + if(d->d_inode) + { +- int i; + printf("entry '"); +- for(i = 0; i < d->d_name_len; i++) +- putchar(d->d_name[i]); ++ fwrite(dir_name(&dw), 1, d->d_name_len, stdout); + printf("' (inode %d): rec_len: %d (name_len: %d)\n", d->d_inode, d->d_rec_len, d->d_name_len); + } ++ put_dir(&dw); + } + } + +@@ -2175,14 +2872,18 @@ + static void + print_link(filesystem *fs, uint32 nod) + { +- if(!get_nod(fs, nod)->i_blocks) +- printf("links to '%s'\n", (char*)get_nod(fs, nod)->i_block); ++ nod_info *ni; ++ inode *node = get_nod(fs, nod, &ni); ++ ++ if(!node->i_blocks) ++ printf("links to '%s'\n", (char*)node->i_block); + else + { + printf("links to '"); + write_blocks(fs, nod, stdout); + printf("'\n"); + } ++ put_nod(ni); + } + + // make a ls-like printout of permissions +@@ -2251,8 +2952,13 @@ + { + char *s; + char perms[11]; +- if(!get_nod(fs, nod)->i_mode) +- return; ++ nod_info *ni; ++ inode *node = get_nod(fs, nod, &ni); ++ blk_info *bi; ++ gd_info *gi; ++ ++ if(!node->i_mode) ++ goto out; + switch(nod) + { + case EXT2_BAD_INO: +@@ -2274,15 +2980,18 @@ + default: + s = (nod >= EXT2_FIRST_INO) ? "normal" : "unknown reserved"; + } +- printf("inode %d (%s, %d links): ", nod, s, get_nod(fs, nod)->i_links_count); +- if(!allocated(GRP_GET_INODE_BITMAP(fs,nod), GRP_IBM_OFFSET(fs,nod))) ++ printf("inode %d (%s, %d links): ", nod, s, node->i_links_count); ++ if(!allocated(GRP_GET_INODE_BITMAP(fs,nod,&bi,&gi), GRP_IBM_OFFSET(fs,nod))) + { ++ GRP_PUT_INODE_BITMAP(bi,gi); + printf("unallocated\n"); +- return; ++ goto out; + } +- make_perms(get_nod(fs, nod)->i_mode, perms); +- printf("%s, size: %d byte%s (%d block%s)\n", perms, plural(get_nod(fs, nod)->i_size), plural(get_nod(fs, nod)->i_blocks / INOBLK)); +- switch(get_nod(fs, nod)->i_mode & FM_IFMT) ++ GRP_PUT_INODE_BITMAP(bi,gi); ++ make_perms(node->i_mode, perms); ++ printf("%s, size: %d byte%s (%d block%s)\n", perms, ++ plural(node->i_size), plural(node->i_blocks / INOBLK)); ++ switch(node->i_mode & FM_IFMT) + { + case FM_IFSOCK: + list_blocks(fs, nod); +@@ -2310,6 +3019,8 @@ + list_blocks(fs, nod); + } + printf("Done with inode %d\n",nod); ++out: ++ put_nod(ni); + } + + // describes various fields in a filesystem +@@ -2317,49 +3028,65 @@ + print_fs(filesystem *fs) + { + uint32 i; ++ blk_info *bi; ++ groupdescriptor *gd; ++ gd_info *gi; + uint8 *ibm; + + printf("%d blocks (%d free, %d reserved), first data block: %d\n", +- fs->sb.s_blocks_count, fs->sb.s_free_blocks_count, +- fs->sb.s_r_blocks_count, fs->sb.s_first_data_block); +- printf("%d inodes (%d free)\n", fs->sb.s_inodes_count, +- fs->sb.s_free_inodes_count); ++ fs->sb->s_blocks_count, fs->sb->s_free_blocks_count, ++ fs->sb->s_r_blocks_count, fs->sb->s_first_data_block); ++ printf("%d inodes (%d free)\n", fs->sb->s_inodes_count, ++ fs->sb->s_free_inodes_count); + printf("block size = %d, frag size = %d\n", +- fs->sb.s_log_block_size ? (fs->sb.s_log_block_size << 11) : 1024, +- fs->sb.s_log_frag_size ? (fs->sb.s_log_frag_size << 11) : 1024); ++ fs->sb->s_log_block_size ? (fs->sb->s_log_block_size << 11) : 1024, ++ fs->sb->s_log_frag_size ? (fs->sb->s_log_frag_size << 11) : 1024); + printf("number of groups: %d\n",GRP_NBGROUPS(fs)); + printf("%d blocks per group,%d frags per group,%d inodes per group\n", +- fs->sb.s_blocks_per_group, fs->sb.s_frags_per_group, +- fs->sb.s_inodes_per_group); ++ fs->sb->s_blocks_per_group, fs->sb->s_frags_per_group, ++ fs->sb->s_inodes_per_group); + printf("Size of inode table: %d blocks\n", +- (int)(fs->sb.s_inodes_per_group * sizeof(inode) / BLOCKSIZE)); ++ (int)(fs->sb->s_inodes_per_group * sizeof(inode) / BLOCKSIZE)); + for (i = 0; i < GRP_NBGROUPS(fs); i++) { + printf("Group No: %d\n", i+1); ++ gd = get_gd(fs, i, &gi); + printf("block bitmap: block %d,inode bitmap: block %d, inode table: block %d\n", +- fs->gd[i].bg_block_bitmap, fs->gd[i].bg_inode_bitmap, +- fs->gd[i].bg_inode_table); ++ gd->bg_block_bitmap, ++ gd->bg_inode_bitmap, ++ gd->bg_inode_table); + printf("block bitmap allocation:\n"); +- print_bm(GRP_GET_GROUP_BBM(fs, i),fs->sb.s_blocks_per_group); ++ print_bm(GRP_GET_GROUP_BBM(fs, gd, &bi),fs->sb->s_blocks_per_group); ++ GRP_PUT_GROUP_BBM(bi); + printf("inode bitmap allocation:\n"); +- ibm = GRP_GET_GROUP_IBM(fs, i); +- print_bm(ibm, fs->sb.s_inodes_per_group); +- for (i = 1; i <= fs->sb.s_inodes_per_group; i++) ++ ibm = GRP_GET_GROUP_IBM(fs, gd, &bi); ++ print_bm(ibm, fs->sb->s_inodes_per_group); ++ for (i = 1; i <= fs->sb->s_inodes_per_group; i++) + if (allocated(ibm, i)) + print_inode(fs, i); ++ GRP_PUT_GROUP_IBM(bi); ++ put_gd(gi); + } + } + + static void +-dump_fs(filesystem *fs, FILE * fh, int swapit) ++finish_fs(filesystem *fs) + { +- uint32 nbblocks = fs->sb.s_blocks_count; +- fs->sb.s_reserved[200] = 0; +- if(swapit) +- swap_goodfs(fs); +- if(fwrite(fs, BLOCKSIZE, nbblocks, fh) < nbblocks) +- perror_msg_and_die("output filesystem image"); +- if(swapit) +- swap_badfs(fs); ++ if (cache_flush(&fs->inodes)) ++ error_msg_and_die("entry mismatch on inode cache flush"); ++ if (cache_flush(&fs->blkmaps)) ++ error_msg_and_die("entry mismatch on blockmap cache flush"); ++ if (cache_flush(&fs->gds)) ++ error_msg_and_die("entry mismatch on gd cache flush"); ++ if (cache_flush(&fs->blks)) ++ error_msg_and_die("entry mismatch on block cache flush"); ++ if(fs->swapit) ++ swap_sb(fs->sb); ++ if (fseek(fs->f, SUPERBLOCK_OFFSET, SEEK_SET)) ++ perror_msg_and_die("fseek"); ++ if(fwrite(fs->sb, SUPERBLOCK_SIZE, 1, fs->f) != 1) ++ perror_msg_and_die("output filesystem superblock"); ++ if(fs->swapit) ++ swap_sb(fs->sb); + } + + static void +@@ -2419,10 +3146,12 @@ + " -x, --starting-image \n" + " -d, --root \n" + " -D, --devtable \n" ++ " -B, --block-size \n" + " -b, --size-in-blocks \n" + " -i, --bytes-per-inode \n" + " -N, --number-of-inodes \n" + " -m, --reserved-percentage \n" ++ " -o, --creator-os 'linux' (default), 'hurd', 'freebsd' or number.\n" + " -g, --block-map Generate a block map file for this path.\n" + " -e, --fill-value Fill unallocated blocks with value.\n" + " -z, --allow-holes Allow files with holes.\n" +@@ -2444,15 +3173,34 @@ + extern char* optarg; + extern int optind, opterr, optopt; + ++// parse the value for -o ++int ++lookup_creator_os(const char *name) ++{ ++ if (isdigit (*name)) ++ return atoi(name); ++ else if (strcasecmp(name, "linux") == 0) ++ return EXT2_OS_LINUX; ++ else if (strcasecmp(name, "GNU") == 0 || strcasecmp(name, "hurd") == 0) ++ return EXT2_OS_HURD; ++ else if (strcasecmp(name, "freebsd") == 0) ++ return EXT2_OS_FREEBSD; ++ else if (strcasecmp(name, "lites") == 0) ++ return EXT2_OS_LITES; ++ else ++ return EXT2_OS_LINUX; ++} ++ + int + main(int argc, char **argv) + { +- int nbblocks = -1; ++ long long nbblocks = -1; + int nbinodes = -1; + int nbresrvd = -1; + float bytes_per_inode = -1; + float reserved_frac = -1; + int fs_timestamp = -1; ++ int creator_os = CREATOR_OS; + char * fsout = "-"; + char * fsin = 0; + char * dopt[MAX_DOPT]; +@@ -2466,6 +3214,7 @@ + int squash_perms = 0; + uint16 endian = 1; + int bigendian = !*(char*)&endian; ++ char *volumelabel = NULL; + filesystem *fs; + int i; + int c; +@@ -2476,13 +3225,16 @@ + { "starting-image", required_argument, NULL, 'x' }, + { "root", required_argument, NULL, 'd' }, + { "devtable", required_argument, NULL, 'D' }, ++ { "block-size", required_argument, NULL, 'B' }, + { "size-in-blocks", required_argument, NULL, 'b' }, + { "bytes-per-inode", required_argument, NULL, 'i' }, + { "number-of-inodes", required_argument, NULL, 'N' }, ++ { "volume-label", required_argument, NULL, 'L' }, + { "reserved-percentage", required_argument, NULL, 'm' }, ++ { "creator-os", required_argument, NULL, 'o' }, + { "block-map", required_argument, NULL, 'g' }, + { "fill-value", required_argument, NULL, 'e' }, +- { "allow-holes", no_argument, NULL, 'z' }, ++ { "allow-holes", no_argument, NULL, 'z' }, + { "faketime", no_argument, NULL, 'f' }, + { "squash", no_argument, NULL, 'q' }, + { "squash-uids", no_argument, NULL, 'U' }, +@@ -2495,11 +3247,11 @@ + + app_name = argv[0]; + +- while((c = getopt_long(argc, argv, "x:d:D:b:i:N:m:g:e:zfqUPhVv", longopts, NULL)) != EOF) { ++ while((c = getopt_long(argc, argv, "x:d:D:B:b:i:N:L:m:o:g:e:zfqUPhVv", longopts, NULL)) != EOF) { + #else + app_name = argv[0]; + +- while((c = getopt(argc, argv, "x:d:D:b:i:N:m:g:e:zfqUPhVv")) != EOF) { ++ while((c = getopt(argc, argv, "x:d:D:B:b:i:N:L:m:o:g:e:zfqUPhVv")) != EOF) { + #endif /* HAVE_GETOPT_LONG */ + switch(c) + { +@@ -2510,6 +3262,9 @@ + case 'D': + dopt[didx++] = optarg; + break; ++ case 'B': ++ blocksize = SI_atof(optarg); ++ break; + case 'b': + nbblocks = SI_atof(optarg); + break; +@@ -2519,9 +3274,15 @@ + case 'N': + nbinodes = SI_atof(optarg); + break; ++ case 'L': ++ volumelabel = optarg; ++ break; + case 'm': + reserved_frac = SI_atof(optarg) / 100; + break; ++ case 'o': ++ creator_os = lookup_creator_os(optarg); ++ break; + case 'g': + gopt[gidx++] = optarg; + break; +@@ -2565,21 +3326,21 @@ + error_msg_and_die("Not enough arguments. Try --help or else see the man page."); + fsout = argv[optind]; + +- hdlinks.hdl = (struct hdlink_s *)malloc(hdlink_cnt * sizeof(struct hdlink_s)); +- if (!hdlinks.hdl) +- error_msg_and_die("Not enough memory"); +- hdlinks.count = 0 ; ++ if(blocksize != 1024 && blocksize != 2048 && blocksize != 4096) ++ error_msg_and_die("Valid block sizes: 1024, 2048 or 4096."); ++ if(creator_os < 0) ++ error_msg_and_die("Creator OS unknown."); + + if(fsin) + { + if(strcmp(fsin, "-")) + { + FILE * fh = xfopen(fsin, "rb"); +- fs = load_fs(fh, bigendian); ++ fs = load_fs(fh, bigendian, fsout); + fclose(fh); + } + else +- fs = load_fs(stdin, bigendian); ++ fs = load_fs(stdin, bigendian, fsout); + } + else + { +@@ -2609,16 +3370,29 @@ + } + if(fs_timestamp == -1) + fs_timestamp = time(NULL); +- fs = init_fs(nbblocks, nbinodes, nbresrvd, holes, fs_timestamp); ++ fs = init_fs(nbblocks, nbinodes, nbresrvd, holes, ++ fs_timestamp, creator_os, bigendian, fsout); + } ++ if (volumelabel != NULL) ++ strncpy((char *)fs->sb->s_volume_name, volumelabel, ++ sizeof(fs->sb->s_volume_name)); + + populate_fs(fs, dopt, didx, squash_uids, squash_perms, fs_timestamp, NULL); + + if(emptyval) { + uint32 b; +- for(b = 1; b < fs->sb.s_blocks_count; b++) +- if(!allocated(GRP_GET_BLOCK_BITMAP(fs,b),GRP_BBM_OFFSET(fs,b))) +- memset(get_blk(fs, b), emptyval, BLOCKSIZE); ++ for(b = 1; b < fs->sb->s_blocks_count; b++) { ++ blk_info *bi; ++ gd_info *gi; ++ if(!allocated(GRP_GET_BLOCK_BITMAP(fs,b,&bi,&gi), ++ GRP_BBM_OFFSET(fs,b))) { ++ blk_info *bi2; ++ memset(get_blk(fs, b, &bi2), emptyval, ++ BLOCKSIZE); ++ put_blk(bi2); ++ } ++ GRP_PUT_BLOCK_BITMAP(bi,gi); ++ } + } + if(verbose) + print_fs(fs); +@@ -2628,24 +3402,22 @@ + char fname[MAX_FILENAME]; + char *p; + FILE *fh; ++ nod_info *ni; + if(!(nod = find_path(fs, EXT2_ROOT_INO, gopt[i]))) + error_msg_and_die("path %s not found in filesystem", gopt[i]); + while((p = strchr(gopt[i], '/'))) + *p = '_'; + SNPRINTF(fname, MAX_FILENAME-1, "%s.blk", gopt[i]); + fh = xfopen(fname, "wb"); +- fprintf(fh, "%d:", get_nod(fs, nod)->i_size); ++ fprintf(fh, "%d:", get_nod(fs, nod, &ni)->i_size); ++ put_nod(ni); + flist_blocks(fs, nod, fh); + fclose(fh); + } +- if(strcmp(fsout, "-")) +- { +- FILE * fh = xfopen(fsout, "wb"); +- dump_fs(fs, fh, bigendian); +- fclose(fh); +- } +- else +- dump_fs(fs, stdout, bigendian); ++ finish_fs(fs); ++ if(strcmp(fsout, "-") == 0) ++ copy_file(fs, stdout, fs->f, fs->sb->s_blocks_count); ++ + free_fs(fs); + return 0; + } +Index: genext2fs-1.4.1/cache.h +=================================================================== +--- /dev/null ++++ genext2fs-1.4.1/cache.h +@@ -0,0 +1,128 @@ ++#ifndef __CACHE_H__ ++#define __CACHE_H__ ++ ++#include "list.h" ++ ++#define CACHE_LISTS 256 ++ ++typedef struct ++{ ++ list_elem link; ++ list_elem lru_link; ++} cache_link; ++ ++typedef struct ++{ ++ /* LRU list holds unused items */ ++ unsigned int lru_entries; ++ list_elem lru_list; ++ unsigned int max_free_entries; ++ ++ unsigned int entries; ++ list_elem lists[CACHE_LISTS]; ++ unsigned int (*elem_val)(cache_link *elem); ++ void (*freed)(cache_link *elem); ++} listcache; ++ ++static inline void ++cache_add(listcache *c, cache_link *elem) ++{ ++ unsigned int hash = c->elem_val(elem) % CACHE_LISTS; ++ int delcount = c->lru_entries - c->max_free_entries; ++ ++ if (delcount > 0) { ++ /* Delete some unused items. */ ++ list_elem *lru, *next; ++ cache_link *l; ++ list_for_each_elem_safe(&c->lru_list, lru, next) { ++ l = container_of(lru, cache_link, lru_link); ++ list_del(lru); ++ list_del(&l->link); ++ c->entries--; ++ c->lru_entries--; ++ c->freed(l); ++ delcount--; ++ if (delcount <= 0) ++ break; ++ } ++ } ++ ++ c->entries++; ++ list_item_init(&elem->lru_link); /* Mark it not in the LRU list */ ++ list_add_after(&c->lists[hash], &elem->link); ++} ++ ++static inline void ++cache_item_set_unused(listcache *c, cache_link *elem) ++{ ++ list_add_before(&c->lru_list, &elem->lru_link); ++ c->lru_entries++; ++} ++ ++static inline cache_link * ++cache_find(listcache *c, unsigned int val) ++{ ++ unsigned int hash = val % CACHE_LISTS; ++ list_elem *elem; ++ ++ list_for_each_elem(&c->lists[hash], elem) { ++ cache_link *l = container_of(elem, cache_link, link); ++ if (c->elem_val(l) == val) { ++ if (!list_empty(&l->lru_link)) { ++ /* It's in the unused list, remove it. */ ++ list_del(&l->lru_link); ++ list_item_init(&l->lru_link); ++ c->lru_entries--; ++ } ++ return l; ++ } ++ } ++ return NULL; ++} ++ ++static inline int ++cache_flush(listcache *c) ++{ ++ list_elem *elem, *next; ++ cache_link *l; ++ int i; ++ ++ list_for_each_elem_safe(&c->lru_list, elem, next) { ++ l = container_of(elem, cache_link, lru_link); ++ list_del(elem); ++ list_del(&l->link); ++ c->entries--; ++ c->lru_entries--; ++ c->freed(l); ++ } ++ ++ for (i = 0; i < CACHE_LISTS; i++) { ++ list_for_each_elem_safe(&c->lists[i], elem, next) { ++ l = container_of(elem, cache_link, link); ++ list_del(&l->link); ++ c->entries--; ++ c->freed(l); ++ } ++ } ++ ++ return c->entries || c->lru_entries; ++} ++ ++static inline void ++cache_init(listcache *c, unsigned int max_free_entries, ++ unsigned int (*elem_val)(cache_link *elem), ++ void (*freed)(cache_link *elem)) ++{ ++ int i; ++ ++ c->entries = 0; ++ c->lru_entries = 0; ++ c->max_free_entries = max_free_entries; ++ list_init(&c->lru_list); ++ for (i = 0; i < CACHE_LISTS; i++) ++ list_init(&c->lists[i]); ++ c->elem_val = elem_val; ++ c->freed = freed; ++} ++ ++#endif /* __CACHE_H__ */ +Index: genext2fs-1.4.1/list.h +=================================================================== +--- /dev/null ++++ genext2fs-1.4.1/list.h +@@ -0,0 +1,78 @@ ++#ifndef __LIST_H__ ++#define __LIST_H__ ++ ++#if STDC_HEADERS ++# include ++# include ++#else ++# if HAVE_STDLIB_H ++# include ++# endif ++# if HAVE_STDDEF_H ++# include ++# endif ++#endif ++ ++#ifndef offsetof ++#define offsetof(st, m) \ ++ ((size_t) ( (char *)&((st *)(0))->m - (char *)0 )) ++#endif ++ ++#define container_of(ptr, type, member) ({ \ ++ const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ++ (type *)( (char *)__mptr - offsetof(type,member) );}) ++ ++typedef struct list_elem ++{ ++ struct list_elem *next; ++ struct list_elem *prev; ++} list_elem; ++ ++static inline void list_init(list_elem *list) ++{ ++ list->next = list; ++ list->prev = list; ++} ++ ++static inline void list_add_after(list_elem *pos, list_elem *elem) ++{ ++ elem->next = pos->next; ++ elem->prev = pos; ++ pos->next->prev = elem; ++ pos->next = elem; ++} ++ ++static inline void list_add_before(list_elem *pos, list_elem *elem) ++{ ++ elem->prev = pos->prev; ++ elem->next = pos; ++ pos->prev->next = elem; ++ pos->prev = elem; ++} ++ ++static inline void list_del(list_elem *elem) ++{ ++ elem->next->prev = elem->prev; ++ elem->prev->next = elem->next; ++} ++ ++static inline void list_item_init(list_elem *elem) ++{ ++ elem->next = elem; ++ elem->prev = elem; ++} ++ ++static inline int list_empty(list_elem *elem) ++{ ++ return elem->next == elem; ++} ++ ++#define list_for_each_elem(list, curr) \ ++ for ((curr) = (list)->next; (curr) != (list); (curr) = (curr)->next) ++ ++#define list_for_each_elem_safe(list, curr, next) \ ++ for ((curr) = (list)->next, (next) = (curr)->next; \ ++ (curr) != (list); \ ++ (curr) = (next), (next) = (curr)->next) ++ ++#endif /* __LIST_H__ */ diff --git a/package/genext2fs/genext2fs.mk b/package/genext2fs/genext2fs.mk index b4a8e70c8f..528912e9d7 100644 --- a/package/genext2fs/genext2fs.mk +++ b/package/genext2fs/genext2fs.mk @@ -1,12 +1,13 @@ -############################################################# +################################################################################ # # genext2fs # -############################################################# +################################################################################ -GENEXT2FS_VERSION=1.4.1 -GENEXT2FS_SOURCE=genext2fs-$(GENEXT2FS_VERSION).tar.gz -GENEXT2FS_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/genext2fs +GENEXT2FS_VERSION = 1.4.1 +GENEXT2FS_SITE = http://downloads.sourceforge.net/project/genext2fs/genext2fs/$(GENEXT2FS_VERSION) +GENEXT2FS_LICENSE = GPLv2 +GENEXT2FS_LICENSE_FILES = COPYING -$(eval $(call AUTOTARGETS,package,genext2fs)) -$(eval $(call AUTOTARGETS,package,genext2fs,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/genimage/Config.in.host b/package/genimage/Config.in.host new file mode 100644 index 0000000000..acf777c8bf --- /dev/null +++ b/package/genimage/Config.in.host @@ -0,0 +1,13 @@ +config BR2_PACKAGE_HOST_GENIMAGE + bool "host genimage" + help + genimage is a tool to generate multiple filesystem and flash + images from a given root filesystem tree. genimage is + intended to be run in a fakeroot environment. + + Configuration is done is a config file parsed by + libconfuse. Options like the path to tools can be given in + environment variables, the config file or commandline + switches. + + http://www.pengutronix.de/software/genimage/ diff --git a/package/genimage/genimage.mk b/package/genimage/genimage.mk new file mode 100644 index 0000000000..e9ad52e1da --- /dev/null +++ b/package/genimage/genimage.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# genimage +# +################################################################################ + +GENIMAGE_VERSION = 4 +GENIMAGE_SOURCE = genimage-$(GENIMAGE_VERSION).tar.xz +GENIMAGE_SITE = http://www.pengutronix.de/software/genimage/download/ +GENIMAGE_DEPENDENCIES = host-pkgconf libconfuse +GENIMAGE_LICENSE = GPLv2 + +$(eval $(host-autotools-package)) diff --git a/package/genpart/Config.in.host b/package/genpart/Config.in.host new file mode 100644 index 0000000000..6cc2a59a70 --- /dev/null +++ b/package/genpart/Config.in.host @@ -0,0 +1,8 @@ +config BR2_PACKAGE_HOST_GENPART + bool "host genpart" + help + Generate a 16 byte partition table entry defined by command line + arguments and dump it to stdout. No CHS magic is done, only lba + entries are filled out. + + http://www.pengutronix.de/software/genpart/index_en.html diff --git a/package/genpart/genpart-fix-return-code.patch b/package/genpart/genpart-fix-return-code.patch new file mode 100644 index 0000000000..ec18c82f8c --- /dev/null +++ b/package/genpart/genpart-fix-return-code.patch @@ -0,0 +1,25 @@ +genpart: return 0 if partition writen OK, with no do_magic + +If do_magic is false, we don't won't write the 0xaa55 magic. +However, if we succesfully wrote the partition entry, we still +want to return 0 to indicate success. + +Signed-off-by: "Yann E. MORIN" +Cc: Robert Schwebel + +-- +Patch sent upstream, but no mailing list. +Status: accepted upstream, not yet released. + +diff -durN host-genpart-1.0.2.orig/src/genpart.c host-genpart-1.0.2/src/genpart.c +--- host-genpart-1.0.2.orig/src/genpart.c 2009-12-20 21:54:56.000000000 +0100 ++++ host-genpart-1.0.2/src/genpart.c 2013-01-22 23:13:24.109752579 +0100 +@@ -92,6 +92,8 @@ + if (do_magic) { + if (fwrite(&magic, 2, 1, stdout) > 0) + rc=0; ++ } else { ++ rc=0; + } + } + return rc; diff --git a/package/genpart/genpart.mk b/package/genpart/genpart.mk new file mode 100644 index 0000000000..3c26af2b29 --- /dev/null +++ b/package/genpart/genpart.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# genpart +# +################################################################################ + +GENPART_VERSION = 1.0.2 +GENPART_SOURCE = genpart-$(GENPART_VERSION).tar.bz2 +GENPART_SITE = http://www.pengutronix.de/software/genpart/download/ +# genpart has no license embedded in its source release. +# However, their project page mentions: +# > This community portal offers an overview about our own OSS +# > projects and projects Pengutronix is or was involved with. +# We can thus assume genpart is under a FLOSS license. +# So, until the authors have clarified the licensing terms: +GENPART_LICENSE = Unknown (clarification has been asked to the authors) + +$(eval $(host-autotools-package)) diff --git a/package/genromfs/Config.in b/package/genromfs/Config.in index 2caf2a405d..e4eba9f16a 100644 --- a/package/genromfs/Config.in +++ b/package/genromfs/Config.in @@ -1,6 +1,6 @@ config BR2_PACKAGE_GENROMFS - bool "genromfs" - help - Tool to generate a ROMFS filesystem. + bool "genromfs" + help + Tool to generate a ROMFS filesystem. - http://romfs.sourceforge.net/ \ No newline at end of file + http://romfs.sourceforge.net/ diff --git a/package/genromfs/genromfs.mk b/package/genromfs/genromfs.mk index 10b8d7d4bc..c45d1e1376 100644 --- a/package/genromfs/genromfs.mk +++ b/package/genromfs/genromfs.mk @@ -1,12 +1,11 @@ -############################################################# +################################################################################ # # genromfs # -############################################################# +################################################################################ -GENROMFS_VERSION=0.5.2 -GENROMFS_SOURCE=genromfs-$(GENROMFS_VERSION).tar.gz -GENROMFS_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/romfs +GENROMFS_VERSION = 0.5.2 +GENROMFS_SITE = http://downloads.sourceforge.net/project/romfs/genromfs/$(GENROMFS_VERSION) define GENROMFS_BUILD_CMDS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ @@ -27,5 +26,5 @@ define HOST_GENROMFS_INSTALL_CMDS $(HOST_MAKE_ENV) $(MAKE) -C $(@D) PREFIX=$(HOST_DIR) install endef -$(eval $(call GENTARGETS,package,genromfs)) -$(eval $(call GENTARGETS,package,genromfs,host)) \ No newline at end of file +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/gesftpserver/Config.in b/package/gesftpserver/Config.in new file mode 100644 index 0000000000..81cbce9f33 --- /dev/null +++ b/package/gesftpserver/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_GESFTPSERVER + bool "gesftpserver" + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + help + Green End SFTP Server + + This is an SFTP server supporting up to protocol version 6. + It is possible to use it as a drop-in replacement for the + OpenSSH server, or to provide sftp support for Dropbear. + + http://www.greenend.org.uk/rjk/sftpserver/ + +comment "gesftpserver needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/gesftpserver/gesftpserver.mk b/package/gesftpserver/gesftpserver.mk new file mode 100644 index 0000000000..2a09927e2a --- /dev/null +++ b/package/gesftpserver/gesftpserver.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# gesftpserver +# +################################################################################ + +GESFTPSERVER_VERSION = 0.1 +GESFTPSERVER_SOURCE = sftpserver-$(GESFTPSERVER_VERSION).tar.gz +GESFTPSERVER_SITE = http://www.greenend.org.uk/rjk/sftpserver/ +GESFTPSERVER_LICENSE = GPLv2+ +GESFTPSERVER_LICENSE_FILES = COPYING +# forgets to link against pthread when cross compiling +GESFTPSERVER_CONF_ENV = LIBS=-lpthread + +# overwrite openssh version if enabled +GESFTPSERVER_DEPENDENCIES += \ + $(if $(BR2_ENABLE_LOCALE),,libiconv) \ + $(if $(BR2_PACKAGE_OPENSSH),openssh) + +# openssh/dropbear looks here +define GESFTPSERVER_ADD_SYMLINK + ln -sf gesftpserver $(TARGET_DIR)/usr/libexec/sftp-server +endef + +GESFTPSERVER_POST_INSTALL_TARGET_HOOKS += GESFTPSERVER_ADD_SYMLINK + +$(eval $(autotools-package)) diff --git a/package/gettext/Config.in b/package/gettext/Config.in index fabfe1ef71..305c5a527a 100644 --- a/package/gettext/Config.in +++ b/package/gettext/Config.in @@ -7,29 +7,23 @@ config BR2_PACKAGE_GETTEXT framework to help other GNU packages produce multi-lingual messages. - http://www.gnu.org/software/gettext/ + Only the libintl library will be installed in the + target. The full gettext suite, including tools, will be + installed in the staging directory. -comment "gettext requires a toolchain with WCHAR support" - depends on BR2_NEEDS_GETTEXT && !BR2_USE_WCHAR + http://www.gnu.org/software/gettext/ -config BR2_PACKAGE_GETTEXT_STATIC - bool "Use libgettext.a instead of libgettext.so.*" +config BR2_PACKAGE_GETTEXT_TOOLS + bool "Install gettext tools" depends on BR2_PACKAGE_GETTEXT - depends on BR2_arm + depends on BR2_USE_MMU # fork() + depends on BR2_LARGEFILE + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE help - The GNU `gettext' utilities are a set of tools that provide a - framework to help other GNU packages produce multi-lingual - messages. - - http://www.gnu.org/software/gettext/ - + This option allows to install the complete gettext suite in + the target filesystem. This is typically not useful for + correct operation of programs. -config BR2_PACKAGE_LIBINTL - bool "libintl" +comment "gettext needs a toolchain w/ wchar" depends on BR2_NEEDS_GETTEXT - depends on BR2_USE_WCHAR - help - Selecting this package installs all of gettext in the staging - directory and the shared library for it's use in the target. - - http://www.gnu.org/software/gettext/ + depends on !BR2_USE_WCHAR diff --git a/package/gettext/gettext-error_print_progname.patch b/package/gettext/gettext-01-error_print_progname.patch similarity index 100% rename from package/gettext/gettext-error_print_progname.patch rename to package/gettext/gettext-01-error_print_progname.patch diff --git a/package/gettext/gettext-03-option-to-disable-tools.patch b/package/gettext/gettext-03-option-to-disable-tools.patch new file mode 100644 index 0000000000..24a99965bc --- /dev/null +++ b/package/gettext/gettext-03-option-to-disable-tools.patch @@ -0,0 +1,42 @@ +Add a --disable-tools option + +This patch adds a --disable-tools option that allows to disable the +compilation of the gettext tools, which may not be necessary on a +small embedded Linux system. + +Signed-off-by: Thomas Petazzoni + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -37,6 +37,10 @@ + + dnl Checks for library functions. + ++AC_ARG_ENABLE([tools], [--disable-tools do not build tools], ++ [enable_tools=$enableval], [enable_tools=yes]) ++AM_CONDITIONAL([ENABLE_TOOLS], [test "$enable_tools" = "yes"]) ++ + AC_CONFIG_SUBDIRS([gettext-runtime gettext-tools]) + + dnl Ensure that "configure --help" lists all the command line options that +Index: b/Makefile.am +=================================================================== +--- a/Makefile.am ++++ b/Makefile.am +@@ -20,7 +20,13 @@ + ACLOCAL = build-aux/fixaclocal @ACLOCAL@ + ACLOCAL_AMFLAGS = -I m4 + +-SUBDIRS = gnulib-local gettext-runtime gettext-tools ++if ENABLE_TOOLS ++TOOLS_SUBDIR = gettext-tools ++else ++TOOLS_SUBDIR = ++endif ++ ++SUBDIRS = gnulib-local gettext-runtime $(TOOLS_SUBDIR) + + EXTRA_DIST = \ + version.sh DEPENDENCIES PACKAGING HACKING ChangeLog.0 autogen.sh \ diff --git a/package/gettext/gettext-04-remove-examples-tests.patch b/package/gettext/gettext-04-remove-examples-tests.patch new file mode 100644 index 0000000000..f7d88d9804 --- /dev/null +++ b/package/gettext/gettext-04-remove-examples-tests.patch @@ -0,0 +1,20 @@ +Disable tests and examples + +This patch disables the gettext-tools tests and examples, which are +generally not necessary. + +Signed-off-by: Thomas Petazzoni + +Index: b/gettext-tools/Makefile.am +=================================================================== +--- a/gettext-tools/Makefile.am ++++ b/gettext-tools/Makefile.am +@@ -20,7 +20,7 @@ + ACLOCAL = ../build-aux/fixaclocal @ACLOCAL@ + ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4 + +-SUBDIRS = doc intl gnulib-lib libgrep src libgettextpo po projects styles misc man m4 tests gnulib-tests examples ++SUBDIRS = doc intl gnulib-lib libgrep src libgettextpo po projects styles misc man m4 + + EXTRA_DIST = misc/DISCLAIM + MOSTLYCLEANFILES = core *.stackdump diff --git a/package/gettext/gettext.mk b/package/gettext/gettext.mk index 2b308c84ab..4874a82473 100644 --- a/package/gettext/gettext.mk +++ b/package/gettext/gettext.mk @@ -1,165 +1,68 @@ -############################################################# +################################################################################ # # gettext # -############################################################# -GETTEXT_VERSION:=0.16.1 -GETTEXT_SOURCE:=gettext-$(GETTEXT_VERSION).tar.gz -GETTEXT_SITE:=$(BR2_GNU_MIRROR)/gettext -GETTEXT_DIR:=$(BUILD_DIR)/gettext-$(GETTEXT_VERSION) -GETTEXT_CAT:=$(ZCAT) -GETTEXT_BINARY:=gettext-runtime/src/gettext -GETTEXT_TARGET_BINARY:=usr/bin/gettext - -ifeq ($(BR2_PACKAGE_GETTEXT_STATIC),y) -LIBINTL_TARGET_BINARY:=usr/lib/libintl.a -else -LIBINTL_TARGET_BINARY:=usr/lib/libintl.so +################################################################################ + +GETTEXT_VERSION = 0.18.3.1 +GETTEXT_SITE = $(BR2_GNU_MIRROR)/gettext +GETTEXT_INSTALL_STAGING = YES +GETTEXT_LICENSE = GPLv2+ +GETTEXT_LICENSE_FILES = COPYING +GETTEXT_AUTORECONF = YES + +GETTEXT_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv) +HOST_GETTEXT_DEPENDENCIES = # we don't want the libiconv dependency + +GETTEXT_CONF_OPT += \ + --disable-libasprintf \ + --disable-acl \ + --disable-openmp \ + --disable-rpath \ + --disable-java \ + --disable-native-java \ + --disable-csharp \ + --disable-relocatable \ + --without-emacs \ + --disable-tools + +HOST_GETTEXT_CONF_OPT = \ + --disable-libasprintf \ + --disable-acl \ + --disable-openmp \ + --disable-rpath \ + --disable-java \ + --disable-native-java \ + --disable-csharp \ + --disable-relocatable \ + --without-emacs + +# Force build with NLS support, otherwise libintl is not built +# This is needed because some packages (eg. libglib2) requires +# locales, but do not properly depend on BR2_ENABLE_LOCALE, and +# instead select BR2_PACKAGE_GETTEXT. Those packages need to be +# fixed before we can remove the following 3 lines... :-( +ifeq ($(BR2_ENABLE_LOCALE),) +GETTEXT_CONF_OPT += --enable-nls endif -$(DL_DIR)/$(GETTEXT_SOURCE): - $(call DOWNLOAD,$(GETTEXT_SITE),$(GETTEXT_SOURCE)) - -gettext-source: $(DL_DIR)/$(GETTEXT_SOURCE) - -$(GETTEXT_DIR)/.unpacked: $(DL_DIR)/$(GETTEXT_SOURCE) - $(GETTEXT_CAT) $(DL_DIR)/$(GETTEXT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - toolchain/patch-kernel.sh $(GETTEXT_DIR) package/gettext/ gettext\*.patch - $(CONFIG_UPDATE) $(@D) - $(CONFIG_UPDATE) $(GETTEXT_DIR)/build-aux - touch $@ - -ifneq ($(BR2_TOOLCHAIN_BUILDROOT),y) -IGNORE_EXTERNAL_GETTEXT:=--with-included-gettext +# When the gettext tools are not enabled in the configuration, we only +# install libintl to the target. +ifeq ($(BR2_PACKAGE_GETTEXT_TOOLS),) +# When static libs are preferred the .so files aren't created +ifeq ($(BR2_PREFER_STATIC_LIB),) +define GETTEXT_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/lib/libintl*.so* $(TARGET_DIR)/usr/lib/ +endef endif +endif # GETTEXT_TOOLS = n -$(GETTEXT_DIR)/.configured: $(GETTEXT_DIR)/.unpacked - (cd $(GETTEXT_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - $(TARGET_CONFIGURE_ARGS) \ - ac_cv_func_strtod=yes \ - ac_fsusage_space=yes \ - fu_cv_sys_stat_statfs2_bsize=yes \ - ac_cv_func_closedir_void=no \ - ac_cv_func_getloadavg=no \ - ac_cv_lib_util_getloadavg=no \ - ac_cv_lib_getloadavg_getloadavg=no \ - ac_cv_func_getgroups=yes \ - ac_cv_func_getgroups_works=yes \ - ac_cv_func_chown_works=yes \ - ac_cv_have_decl_euidaccess=no \ - ac_cv_func_euidaccess=no \ - ac_cv_have_decl_strnlen=yes \ - ac_cv_func_strnlen_working=yes \ - ac_cv_func_lstat_dereferences_slashed_symlink=yes \ - ac_cv_func_lstat_empty_string_bug=no \ - ac_cv_func_stat_empty_string_bug=no \ - vb_cv_func_rename_trailing_slash_bug=no \ - ac_cv_have_decl_nanosleep=yes \ - jm_cv_func_nanosleep_works=yes \ - gl_cv_func_working_utimes=yes \ - ac_cv_func_utime_null=yes \ - ac_cv_have_decl_strerror_r=yes \ - ac_cv_func_strerror_r_char_p=no \ - jm_cv_func_svid_putenv=yes \ - ac_cv_func_getcwd_null=yes \ - ac_cv_func_getdelim=yes \ - ac_cv_func_mkstemp=yes \ - utils_cv_func_mkstemp_limitations=no \ - utils_cv_func_mkdir_trailing_slash_bug=no \ - jm_cv_func_gettimeofday_clobber=no \ - gl_cv_func_working_readdir=yes \ - jm_ac_cv_func_link_follows_symlink=no \ - utils_cv_localtime_cache=no \ - ac_cv_struct_st_mtim_nsec=no \ - gl_cv_func_tzset_clobber=no \ - gl_cv_func_getcwd_null=yes \ - gl_cv_func_getcwd_path_max=yes \ - ac_cv_func_fnmatch_gnu=yes \ - am_getline_needs_run_time_check=no \ - am_cv_func_working_getline=yes \ - gl_cv_func_mkdir_trailing_slash_bug=no \ - gl_cv_func_mkstemp_limitations=no \ - ac_cv_func_working_mktime=yes \ - jm_cv_func_working_re_compile_pattern=yes \ - ac_use_included_regex=no \ - gl_cv_c_restrict=no \ - ./configure $(QUIET) \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --disable-libasprintf \ - --enable-shared \ - $(IGNORE_EXTERNAL_GETTEXT) \ - --disable-openmp \ - ) - touch $@ - -$(GETTEXT_DIR)/$(GETTEXT_BINARY): $(GETTEXT_DIR)/.configured - $(MAKE) -C $(GETTEXT_DIR) - touch -c $(GETTEXT_DIR)/$(GETTEXT_BINARY) - -$(STAGING_DIR)/$(GETTEXT_TARGET_BINARY): $(GETTEXT_DIR)/$(GETTEXT_BINARY) - $(MAKE) DESTDIR=$(STAGING_DIR) -C $(GETTEXT_DIR) install - $(SED) 's,/lib/,$(STAGING_DIR)/usr/lib/,g' $(STAGING_DIR)/usr/lib/libgettextlib.la - $(SED) 's,/lib/,$(STAGING_DIR)/usr/lib/,g' $(STAGING_DIR)/usr/lib/libgettextpo.la - $(SED) 's,/lib/,$(STAGING_DIR)/usr/lib/,g' $(STAGING_DIR)/usr/lib/libgettextsrc.la - $(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libgettextlib.la - $(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libgettextpo.la - $(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libgettextsrc.la - $(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libintl.la - rm -f $(addprefix $(STAGING_DIR)/usr/bin/, \ - autopoint envsubst gettext.sh gettextize msg* ?gettext) - touch -c $@ - -gettext: host-pkg-config $(if $(BR2_PACKAGE_LIBICONV),libiconv) $(STAGING_DIR)/$(GETTEXT_TARGET_BINARY) - -gettext-unpacked: $(GETTEXT_DIR)/.unpacked - -gettext-clean: - -$(MAKE) DESTDIR=$(STAGING_DIR) CC="$(TARGET_CC)" -C $(GETTEXT_DIR) uninstall - -$(MAKE) DESTDIR=$(TARGET_DIR) CC="$(TARGET_CC)" -C $(GETTEXT_DIR) uninstall - -$(MAKE) -C $(GETTEXT_DIR) clean - -gettext-dirclean: - rm -rf $(GETTEXT_DIR) +# Library lacks +x so strip skips it +define GETTEXT_FIX_LIBRARY_MODE + -chmod +x $(TARGET_DIR)/usr/lib/libintl.so* +endef -############################################################# -# -# gettext on the target -# -############################################################# - -gettext-target: $(GETTEXT_DIR)/$(GETTEXT_BINARY) - $(MAKE) DESTDIR=$(TARGET_DIR) -C $(GETTEXT_DIR) install - chmod +x $(TARGET_DIR)/usr/lib/libintl.so* # identify as needing to be stripped - -$(TARGET_DIR)/usr/lib/libintl.so: $(STAGING_DIR)/$(GETTEXT_TARGET_BINARY) - cp -dpf $(STAGING_DIR)/usr/lib/libgettext*.so* \ - $(STAGING_DIR)/usr/lib/libintl*.so* $(TARGET_DIR)/usr/lib/ - $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libgettext*.so* - $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libintl*.so* - rm -f $(addprefix $(TARGET_DIR)/usr/lib/, \ - libgettext*.so*.la libintl*.so*.la) - touch -c $@ - -$(TARGET_DIR)/usr/lib/libintl.a: $(STAGING_DIR)/$(GETTEXT_TARGET_BINARY) - cp -dpf $(STAGING_DIR)/usr/lib/libgettext*.a $(TARGET_DIR)/usr/lib/ - cp -dpf $(STAGING_DIR)/usr/lib/libintl*.a $(TARGET_DIR)/usr/lib/ - touch -c $@ +GETTEXT_POST_INSTALL_TARGET_HOOKS += GETTEXT_FIX_LIBRARY_MODE -libintl: $(TARGET_DIR)/$(LIBINTL_TARGET_BINARY) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_LIBINTL),y) -TARGETS+=libintl -endif -ifeq ($(BR2_PACKAGE_GETTEXT),y) -TARGETS+=gettext -endif +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/gettext/libdir-la.patch b/package/gettext/libdir-la.patch deleted file mode 100644 index d5076c11ac..0000000000 --- a/package/gettext/libdir-la.patch +++ /dev/null @@ -1,154 +0,0 @@ ---- gettext-0.14.6/autoconf-lib-link/build-aux/ltmain.sh.orig 2007-01-13 14:33:23.000000000 -0700 -+++ gettext-0.14.6/autoconf-lib-link/build-aux/ltmain.sh 2007-01-13 14:35:10.000000000 -0700 -@@ -234,8 +234,9 @@ - # line option must be used. - if test -z "$tagname"; then - $echo "$modename: unable to infer tagged configuration" -- $echo "$modename: specify a tag with \`--tag'" 1>&2 -- exit $EXIT_FAILURE -+ $echo "$modename: defaulting to \`CC'" -+ $echo "$modename: if this is not correct, specify a tag with \`--tag'" -+# exit $EXIT_FAILURE - # else - # $echo "$modename: using $tagname tagged configuration" - fi -@@ -2324,8 +2325,14 @@ - absdir="$abs_ladir" - libdir="$abs_ladir" - else -- dir="$libdir" -- absdir="$libdir" -+ # Adding 'libdir' from the .la file to our library search paths -+ # breaks crosscompilation horribly. We cheat here and don't add -+ # it, instead adding the path where we found the .la. -CL -+ dir="$abs_ladir" -+ absdir="$abs_ladir" -+ libdir="$abs_ladir" -+ #dir="$libdir" -+ #absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else -@@ -2800,6 +2807,16 @@ - esac - if grep "^installed=no" $deplib > /dev/null; then - path="$absdir/$objdir" -+# This interferes with crosscompilation. -CL -+# else -+# eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` -+# if test -z "$libdir"; then -+# $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 -+# exit 1 -+# fi -+# if test "$absdir" != "$libdir"; then -+# $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 -+# fi - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then -@@ -5210,6 +5227,10 @@ - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do -+ # Replacing uninstalled with installed can easily break crosscompilation, -+ # since the installed path is generally the wrong architecture. -CL -+ newdependency_libs="$newdependency_libs $deplib" -+ continue - case $deplib in - *.la) - name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` -@@ -5528,10 +5549,13 @@ - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. -- if test "$inst_prefix_dir" = "$destdir"; then -- $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 -- exit $EXIT_FAILURE -- fi -+ # -+ # This breaks install into our staging area. -PB -+ # -+ # if test "$inst_prefix_dir" = "$destdir"; then -+ # $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 -+ # exit $EXIT_FAILURE -+ # fi - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. ---- gettext-0.14.6/build-aux/ltmain.sh.orig 2005-05-20 15:03:38.000000000 -0600 -+++ gettext-0.14.6/build-aux/ltmain.sh 2007-01-13 14:34:27.000000000 -0700 -@@ -234,8 +234,9 @@ - # line option must be used. - if test -z "$tagname"; then - $echo "$modename: unable to infer tagged configuration" -- $echo "$modename: specify a tag with \`--tag'" 1>&2 -- exit $EXIT_FAILURE -+ $echo "$modename: defaulting to \`CC'" -+ $echo "$modename: if this is not correct, specify a tag with \`--tag'" -+# exit $EXIT_FAILURE - # else - # $echo "$modename: using $tagname tagged configuration" - fi -@@ -2324,8 +2325,14 @@ - absdir="$abs_ladir" - libdir="$abs_ladir" - else -- dir="$libdir" -- absdir="$libdir" -+ # Adding 'libdir' from the .la file to our library search paths -+ # breaks crosscompilation horribly. We cheat here and don't add -+ # it, instead adding the path where we found the .la. -CL -+ dir="$abs_ladir" -+ absdir="$abs_ladir" -+ libdir="$abs_ladir" -+ #dir="$libdir" -+ #absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else -@@ -2800,6 +2807,16 @@ - esac - if grep "^installed=no" $deplib > /dev/null; then - path="$absdir/$objdir" -+# This interferes with crosscompilation. -CL -+# else -+# eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` -+# if test -z "$libdir"; then -+# $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 -+# exit 1 -+# fi -+# if test "$absdir" != "$libdir"; then -+# $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 -+# fi - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then -@@ -5210,6 +5227,10 @@ - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do -+ # Replacing uninstalled with installed can easily break crosscompilation, -+ # since the installed path is generally the wrong architecture. -CL -+ newdependency_libs="$newdependency_libs $deplib" -+ continue - case $deplib in - *.la) - name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` -@@ -5528,10 +5549,13 @@ - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. -- if test "$inst_prefix_dir" = "$destdir"; then -- $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 -- exit $EXIT_FAILURE -- fi -+ # -+ # This breaks install into our staging area. -PB -+ # -+ # if test "$inst_prefix_dir" = "$destdir"; then -+ # $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 -+ # exit $EXIT_FAILURE -+ # fi - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. diff --git a/package/giblib/Config.in b/package/giblib/Config.in new file mode 100644 index 0000000000..7153bd5273 --- /dev/null +++ b/package/giblib/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_GIBLIB + bool "giblib" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_IMLIB2 + select BR2_PACKAGE_IMLIB2_X + help + Giblib is a simple library which wraps imlib2. + + http://linuxbrit.co.uk/giblib/ + diff --git a/package/giblib/giblib-fix-imlib2-detection.patch b/package/giblib/giblib-fix-imlib2-detection.patch new file mode 100644 index 0000000000..2323107941 --- /dev/null +++ b/package/giblib/giblib-fix-imlib2-detection.patch @@ -0,0 +1,127 @@ +configure.ac + Makefile.am: fix the imlib2 detection + +Although imlib2 is correctly checked for, the variables used to get +the CFLAGS and LIBS are wrong (perhaps a remnant of the pre-imlib2 +era, when giblib was using imlib). + +Signed-off-by: "Yann E. MORIN" + +diff --git a/configure.ac b/configure.ac +index 6807d86..c8874f0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -18,16 +18,10 @@ AM_MAINTAINER_MODE + AM_WITH_DMALLOC + + AC_PATH_GENERIC(imlib2, 1.0.0, [ +- AC_SUBST(IMLIB_LIBS) +- AC_SUBST(IMLIB_CFLAGS) ], ++ AC_SUBST(IMLIB2_LIBS) ++ AC_SUBST(IMLIB2_CFLAGS) ], + AC_MSG_ERROR(Cannot find imlib2: Is imlib2-config in the path?) ) + +-dnl the above doesn't work for some reason :/ +-IMLIB_LIBS=`imlib2-config --libs` +-IMLIB_CFLAGS=`imlib2-config --cflags` +-AC_SUBST(IMLIB_LIBS) +-AC_SUBST(IMLIB_CFLAGS) +- + LIBS="$LIBS -lm" + CFLAGS="$CFLAGS -Wall" + +@@ -48,7 +42,7 @@ $PACKAGE $VERSION + Configuration: + -------------- + +-Imlib2 libs: $IMLIB_LIBS +-Imlib2 cflags: $IMLIB_CFLAGS ++Imlib2 libs: $IMLIB2_LIBS ++Imlib2 cflags: $IMLIB2_CFLAGS + CFLAGS: $CFLAGS + " +diff --git a/configure.in b/configure.in +index 432cb16..6999095 100644 +--- a/configure.in ++++ b/configure.in +@@ -17,16 +17,10 @@ AM_MAINTAINER_MODE + AM_WITH_DMALLOC + + AC_PATH_GENERIC(imlib2, 1.0.0, [ +- AC_SUBST(IMLIB_LIBS) +- AC_SUBST(IMLIB_CFLAGS) ], ++ AC_SUBST(IMLIB2_LIBS) ++ AC_SUBST(IMLIB2_CFLAGS) ], + AC_MSG_ERROR(Cannot find imlib2: Is imlib2-config in the path?) ) + +-dnl the above doesn't work for some reason :/ +-IMLIB_LIBS=`imlib2-config --libs` +-IMLIB_CFLAGS=`imlib2-config --cflags` +-AC_SUBST(IMLIB_LIBS) +-AC_SUBST(IMLIB_CFLAGS) +- + LIBS="$LIBS -lm" + CFLAGS="$CFLAGS -Wall" + +@@ -45,7 +39,7 @@ $PACKAGE $VERSION + Configuration: + -------------- + +-Imlib2 libs: $IMLIB_LIBS +-Imlib2 cflags: $IMLIB_CFLAGS ++Imlib2 libs: $IMLIB2_LIBS ++Imlib2 cflags: $IMLIB2_CFLAGS + CFLAGS: $CFLAGS + " +diff --git a/giblib-config.in b/giblib-config.in +index f3a7db6..cef1620 100644 +--- a/giblib-config.in ++++ b/giblib-config.in +@@ -42,11 +42,11 @@ while test $# -gt 0; do + if test @includedir@ != /usr/include ; then + includes=-I@includedir@ + fi +- echo $includes -I$prefix/include/giblib @IMLIB_CFLAGS@ ++ echo $includes -I$prefix/include/giblib @IMLIB2_CFLAGS@ + ;; + --libs) + libdirs=-L@libdir@ +- echo $libdirs -lgiblib @LDFLAGS@ @IMLIB_LIBS@ ++ echo $libdirs -lgiblib @LDFLAGS@ @IMLIB2_LIBS@ + ;; + *) + echo "${usage}" 1>&2 +diff --git a/giblib.pc.in b/giblib.pc.in +index df520ae..783e6e1 100644 +--- a/giblib.pc.in ++++ b/giblib.pc.in +@@ -6,6 +6,6 @@ includedir=@includedir@ + Name: giblib + Description: wrapper library for imlib2, and other stuff + Version: @VERSION@ +-Libs: -L${libdir} -lgiblib @LDFLAGS@ @IMLIB_LIBS@ +-Cflags: -I${includedir} -I${includedir}/giblib @IMLIB_CFLAGS@ ++Libs: -L${libdir} -lgiblib @LDFLAGS@ @IMLIB2_LIBS@ ++Cflags: -I${includedir} -I${includedir}/giblib @IMLIB2_CFLAGS@ + +diff --git a/giblib/Makefile.am b/giblib/Makefile.am +index d1edc09..49d8ac4 100644 +--- a/giblib/Makefile.am ++++ b/giblib/Makefile.am +@@ -3,7 +3,7 @@ MAINTAINERCLEANFILES = Makefile.in + + INCLUDES = \ + -I. -I$(top_srcdir) \ +--DPREFIX=\""$(prefix)"\" @IMLIB_CFLAGS@ ++-DPREFIX=\""$(prefix)"\" @IMLIB2_CFLAGS@ + + lib_LTLIBRARIES = libgiblib.la + +@@ -24,7 +24,7 @@ libgiblib_la_SOURCES = \ + gib_utils.c gib_utils.h \ + gib_queue.c gib_queue.h + +-libgiblib_la_LIBADD = @IMLIB_LIBS@ ++libgiblib_la_LIBADD = @IMLIB2_LIBS@ + libgiblib_la_DEPENDENCIES = giblib_config.h + libgiblib_la_LDFLAGS = -version-info 1:6:0 + diff --git a/package/giblib/giblib.mk b/package/giblib/giblib.mk new file mode 100644 index 0000000000..b955943e47 --- /dev/null +++ b/package/giblib/giblib.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# giblib +# +################################################################################ + +GIBLIB_VERSION = 1.2.4 +GIBLIB_SITE = http://linuxbrit.co.uk/downloads/ +GIBLIB_INSTALL_STAGING = YES +GIBLIB_DEPENDENCIES = imlib2 +GIBLIB_AUTORECONF = YES +GIBLIB_AUTORECONF_OPT = --install +GIBLIB_CONF_OPT = --with-imlib2-prefix=$(STAGING_DIR)/usr \ + --with-imlib2-exec-prefix=$(STAGING_DIR)/usr +GIBLIB_CONFIG_SCRIPTS = giblib-config + +$(eval $(autotools-package)) diff --git a/package/git/Config.in b/package/git/Config.in new file mode 100644 index 0000000000..66c66c788b --- /dev/null +++ b/package/git/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_GIT + bool "git" + depends on BR2_LARGEFILE + depends on BR2_USE_MMU # uses fork() + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + Git is a free and open source distributed version control system + designed to handle everything from small to very large projects. + + http://git-scm.com + +comment "git needs a toolchain w/ largefile" + depends on BR2_USE_MMU + depends on !BR2_LARGEFILE diff --git a/package/git/git.mk b/package/git/git.mk new file mode 100644 index 0000000000..58455b15b4 --- /dev/null +++ b/package/git/git.mk @@ -0,0 +1,61 @@ +################################################################################ +# +# git +# +################################################################################ + +GIT_VERSION = 1.8.4.1 +GIT_SITE = http://git-core.googlecode.com/files/ +GIT_LICENSE = GPLv2 LGPLv2.1+ +GIT_LICENSE_FILES = COPYING LGPL-2.1 +GIT_DEPENDENCIES = zlib host-gettext + +ifeq ($(BR2_PACKAGE_OPENSSL),y) + GIT_DEPENDENCIES += openssl + GIT_CONF_OPT += --with-openssl +else + GIT_CONF_OPT += --without-openssl +endif + +ifeq ($(BR2_PACKAGE_PERL),y) + GIT_DEPENDENCIES += perl + GIT_CONF_OPT += --with-libpcre +else + GIT_CONF_OPT += --without-libpcre +endif + +ifeq ($(BR2_PACKAGE_CURL),y) + GIT_DEPENDENCIES += curl + GIT_CONF_OPT += --with-curl +else + GIT_CONF_OPT += --without-curl +endif + +ifeq ($(BR2_PACKAGE_EXPAT),y) + GIT_DEPENDENCIES += expat + GIT_CONF_OPT += --with-expat +else + GIT_CONF_OPT += --without-expat +endif + +ifeq ($(BR2_PACKAGE_LIBICONV),y) + GIT_DEPENDENCIES += libiconv + GIT_CONF_ENV += LIBS=-liconv + GIT_CONF_OPT += --with-iconv=/usr/lib +else + GIT_CONF_OPT += --without-iconv +endif + +ifeq ($(BR2_PACKAGE_TCL),y) + GIT_DEPENDENCIES += tcl + GIT_CONF_OPT += --with-tcltk +else + GIT_CONF_OPT += --without-tcltk +endif + +# assume yes for these tests, configure will bail out otherwise +# saying error: cannot run test program while cross compiling +GIT_CONF_ENV += ac_cv_fread_reads_directories=yes \ + ac_cv_snprintf_returns_bogus=yes + +$(eval $(autotools-package)) diff --git a/package/glib-networking/Config.in b/package/glib-networking/Config.in new file mode 100644 index 0000000000..01d8552f80 --- /dev/null +++ b/package/glib-networking/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_GLIB_NETWORKING + bool "glib-networking" + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT + help + Network-related GIO modules for glib. + +comment "glib-networking needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/glib-networking/glib-networking.mk b/package/glib-networking/glib-networking.mk new file mode 100644 index 0000000000..99fc591af6 --- /dev/null +++ b/package/glib-networking/glib-networking.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# glib-networking +# +################################################################################ + +GLIB_NETWORKING_MAJOR_VERSION = 2.36 +GLIB_NETWORKING_MINOR_VERSION = 2 +GLIB_NETWORKING_VERSION = $(GLIB_NETWORKING_MAJOR_VERSION).$(GLIB_NETWORKING_MINOR_VERSION) +GLIB_NETWORKING_SITE = http://ftp.gnome.org/pub/gnome/sources/glib-networking/$(GLIB_NETWORKING_MAJOR_VERSION) +GLIB_NETWORKING_SOURCE = glib-networking-$(GLIB_NETWORKING_VERSION).tar.xz + +GLIB_NETWORKING_INSTALL_STAGING = YES + +GLIB_NETWORKING_DEPENDENCIES = \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \ + host-pkgconf \ + host-intltool \ + libglib2 + +ifeq ($(BR2_PACKAGE_GNUTLS),y) +GLIB_NETWORKING_DEPENDENCIES += gnutls +GLIB_NETWORKING_CONF_OPT += --with-libgcrypt-prefix=$(STAGING_DIR)/usr +else +GLIB_NETWORKING_CONF_OPT += --without-gnutls +endif + +# gnutls 3.x+ doesn't use libgcrypt, it uses nettle/hogweed +define GLIB_NETWORKING_NO_LIBGCRYPT + $(SED) 's:#include ::' $(@D)/tls/gnutls/gtlsbackend-gnutls.c +endef + +GLIB_NETWORKING_POST_EXTRACT_HOOKS += GLIB_NETWORKING_NO_LIBGCRYPT + +$(eval $(autotools-package)) diff --git a/package/glibc/2.17-svnr22064/eglibc-0001-ptr_mangle.patch b/package/glibc/2.17-svnr22064/eglibc-0001-ptr_mangle.patch new file mode 100644 index 0000000000..c9bf107482 --- /dev/null +++ b/package/glibc/2.17-svnr22064/eglibc-0001-ptr_mangle.patch @@ -0,0 +1,35 @@ +Fix for CVE-2013-4788 from http://hmarco.org/bugs/CVE-2013-4788.html + +Signed-off-by: Gustavo Zacarias + +diff -rupN glibc-2.17/csu/libc-start.c glibc-2.17-mangle-fix/csu/libc-start.c +--- glibc-2.17/libc/csu/libc-start.c 2012-12-25 04:02:13.000000000 +0100 ++++ glibc-2.17-mangle-fix/libc/csu/libc-start.c 2013-07-10 00:13:48.000000000 +0200 +@@ -38,6 +38,12 @@ extern void __pthread_initialize_minimal + in thread local area. */ + uintptr_t __stack_chk_guard attribute_relro; + # endif ++ ++# ifndef THREAD_SET_POINTER_GUARD ++uintptr_t __pointer_chk_guard_local ++ attribute_relro attribute_hidden __attribute__ ((nocommon)); ++# endif ++ + #endif + + #ifdef HAVE_PTR_NTHREADS +@@ -184,6 +190,14 @@ LIBC_START_MAIN (int (*main) (int, char + # else + __stack_chk_guard = stack_chk_guard; + # endif ++ uintptr_t pointer_chk_guard = _dl_setup_pointer_guard (_dl_random, ++ stack_chk_guard); ++# ifdef THREAD_SET_POINTER_GUARD ++ THREAD_SET_POINTER_GUARD (pointer_chk_guard); ++# else ++ __pointer_chk_guard_local = pointer_chk_guard; ++# endif ++ + #endif + + /* Register the destructor of the dynamic linker if there is any. */ diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk new file mode 100644 index 0000000000..2e7fe82a82 --- /dev/null +++ b/package/glibc/glibc.mk @@ -0,0 +1,129 @@ +################################################################################ +# +# glibc/eglibc +# +################################################################################ + +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_EGLIBC),y) +GLIBC_VERSION = 2.17-svnr22064 +GLIBC_SITE = http://downloads.yoctoproject.org/releases/eglibc/ +GLIBC_SOURCE = eglibc-$(GLIBC_VERSION).tar.bz2 +GLIBC_SRC_SUBDIR = libc +else +GLIBC_VERSION = 2.18 +GLIBC_SITE = $(BR2_GNU_MIRROR)/libc +GLIBC_SOURCE = glibc-$(GLIBC_VERSION).tar.xz +GLIBC_SRC_SUBDIR = . +endif + +GLIBC_LICENSE = GPLv2+ (programs), LGPLv2.1+, BSD-3c, MIT (library) +GLIBC_LICENSE_FILES = $(addprefix $(GLIBC_SRC_SUBDIR)/,COPYING COPYING.LIB LICENSES) + +# Before (e)glibc is configured, we must have the first stage +# cross-compiler and the kernel headers +GLIBC_DEPENDENCIES = host-gcc-initial linux-headers host-gawk + +# Before (e)glibc is built, we must have the second stage cross-compiler +glibc-build: host-gcc-intermediate + +GLIBC_SUBDIR = build + +GLIBC_INSTALL_STAGING = YES + +GLIBC_INSTALL_STAGING_OPT = install_root=$(STAGING_DIR) install + +# Thumb build is broken, build in ARM mode +ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y) +GLIBC_EXTRA_CFLAGS += -marm +endif + +# MIPS64 defaults to n32 so pass the correct -mabi if +# we are using a different ABI. OABI32 is also used +# in MIPS so we pass -mabi=32 in this case as well +# even though it's not strictly necessary. +ifeq ($(BR2_MIPS_NABI64),y) +GLIBC_EXTRA_CFLAGS += -mabi=64 +else ifeq ($(BR2_MIPS_OABI32),y) +GLIBC_EXTRA_CFLAGS += -mabi=32 +endif + +# The stubs.h header is not installed by install-headers, but is +# needed for the gcc build. An empty stubs.h will work, as explained +# in http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html. The same trick +# is used by Crosstool-NG. +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_GLIBC),y) +define GLIBC_ADD_MISSING_STUB_H + mkdir -p $(STAGING_DIR)/usr/include/gnu + touch $(STAGING_DIR)/usr/include/gnu/stubs.h +endef +endif + +# Even though we use the autotools-package infrastructure, we have to +# override the default configure commands for several reasons: +# +# 1. We have to build out-of-tree, but we can't use the same +# 'symbolic link to configure' used with the gcc packages. +# +# 2. We have to execute the configure script with bash and not sh. +# +# Note that as mentionned in +# http://patches.openembedded.org/patch/38849/, eglibc/glibc must be +# built with -O2, so we pass our own CFLAGS and CXXFLAGS below. +define GLIBC_CONFIGURE_CMDS + mkdir -p $(@D)/build + # Do the configuration + (cd $(@D)/build; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="-O2 $(GLIBC_EXTRA_CFLAGS)" CPPFLAGS="" \ + CXXFLAGS="-O2 $(GLIBC_EXTRA_CFLAGS)" \ + $(SHELL) $(@D)/$(GLIBC_SRC_SUBDIR)/configure \ + ac_cv_path_BASH_SHELL=/bin/bash \ + libc_cv_forced_unwind=yes \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --enable-shared \ + $(if $(BR2_SOFT_FLOAT),--without-fp,--with-fp) \ + --with-pkgversion="Buildroot" \ + --without-cvs \ + --disable-profile \ + --without-gd \ + --enable-obsolete-rpc \ + --with-headers=$(STAGING_DIR)/usr/include) + # Install headers and start files + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/build \ + install_root=$(STAGING_DIR) \ + install-bootstrap-headers=yes \ + install-headers + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/build csu/subdir_lib + cp $(@D)/build/csu/crt1.o $(STAGING_DIR)/usr/lib/ + cp $(@D)/build/csu/crti.o $(STAGING_DIR)/usr/lib/ + cp $(@D)/build/csu/crtn.o $(STAGING_DIR)/usr/lib/ + $(GLIBC_ADD_MISSING_STUB_H) + $(TARGET_CROSS)gcc -nostdlib \ + -nostartfiles -shared -x c /dev/null -o $(STAGING_DIR)/usr/lib/libc.so +endef + + +# +# We also override the install to target commands since we only want +# to install the libraries, and nothing more. +# + +GLIBC_LIBS_LIB = \ + ld*.so.* libc.so.* libcrypt.so.* libdl.so.* libgcc_s.so.* libm.so.* \ + libnsl.so.* libpthread.so.* libresolv.so.* librt.so.* libutil.so.* \ + libnss_files.so.* libnss_dns.so.* + +ifeq ($(BR2_PACKAGE_GDB),y) +GLIBC_LIBS_LIB += libthread_db.so.* +endif + +define GLIBC_INSTALL_TARGET_CMDS + for libs in $(GLIBC_LIBS_LIB); do \ + $(call copy_toolchain_lib_root,$(STAGING_DIR)/,,lib,$$libs,/lib) ; \ + done +endef + +$(eval $(autotools-package)) diff --git a/package/glibmm/Config.in b/package/glibmm/Config.in new file mode 100644 index 0000000000..6ac4be5432 --- /dev/null +++ b/package/glibmm/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_GLIBMM + bool "glibmm" + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBSIGC + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + help + The GLibmm package is a set of C++ bindings for GLib. + + http://www.gtkmm.org/ + +comment "glibmm needs a toolchain w/ C++, wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/glibmm/glibmm.mk b/package/glibmm/glibmm.mk new file mode 100644 index 0000000000..9eaa19785f --- /dev/null +++ b/package/glibmm/glibmm.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# glibmm +# +################################################################################ + +GLIBMM_VERSION_MAJOR = 2.36 +GLIBMM_VERSION_MINOR = 1 +GLIBMM_VERSION = $(GLIBMM_VERSION_MAJOR).$(GLIBMM_VERSION_MINOR) +GLIBMM_LICENSE = LGPLv2.1+ (library), GPLv2+ (tools) +GLIBMM_LICENSE_FILES = COPYING COPYING.tools +GLIBMM_SOURCE = glibmm-$(GLIBMM_VERSION).tar.xz +GLIBMM_SITE = http://ftp.gnome.org/pub/gnome/sources/glibmm/$(GLIBMM_VERSION_MAJOR) +GLIBMM_INSTALL_STAGING = YES +GLIBMM_DEPENDENCIES = libglib2 libsigc host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/gmp/gmp.mk b/package/gmp/gmp.mk index cdddca1ba1..d970545162 100644 --- a/package/gmp/gmp.mk +++ b/package/gmp/gmp.mk @@ -1,13 +1,16 @@ -############################################################# +################################################################################ # # gmp # -############################################################# +################################################################################ -GMP_VERSION = 5.0.1 +GMP_VERSION = 5.1.3 GMP_SITE = $(BR2_GNU_MIRROR)/gmp -GMP_SOURCE = gmp-$(GMP_VERSION).tar.bz2 +GMP_SOURCE = gmp-$(GMP_VERSION).tar.xz GMP_INSTALL_STAGING = YES +GMP_LICENSE = LGPLv3+ +GMP_LICENSE_FILES = COPYING.LIB +GMP_DEPENDENCIES = host-m4 -$(eval $(call AUTOTARGETS,package,gmp)) -$(eval $(call AUTOTARGETS,package,gmp,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/gmpc/Config.in b/package/gmpc/Config.in index 7bfe611ea9..43bc642d74 100644 --- a/package/gmpc/Config.in +++ b/package/gmpc/Config.in @@ -2,19 +2,26 @@ config BR2_PACKAGE_GMPC bool "gmpc" depends on BR2_PACKAGE_LIBGTK2 depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + depends on BR2_PACKAGE_XORG7 select BR2_PACKAGE_LIBGLIB2 select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE - select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE select BR2_PACKAGE_LIBMPD - select BR2_PACKAGE_LIBCURL - select BR2_PACKAGE_LIBGLADE + select BR2_PACKAGE_LIBSOUP select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_SQLITE + select BR2_PACKAGE_XLIB_LIBICE + select BR2_PACKAGE_XLIB_LIBSM + select BR2_PACKAGE_XLIB_LIBX11 help Gnome Music Player Client is a GNOME/GTK2.2 client for Music Player Daemon. http://gmpcwiki.sarine.nl/index.php?title=GMPC -comment "gmpc requires a toolchain with WCHAR support" - depends on BR2_PACKAGE_LIBGTK2 && !BR2_USE_WCHAR +comment "gmpc needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_XORG7 && BR2_PACKAGE_LIBGTK2 + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/gmpc/gmpc.mk b/package/gmpc/gmpc.mk index 62c64275fc..cf7deb6223 100644 --- a/package/gmpc/gmpc.mk +++ b/package/gmpc/gmpc.mk @@ -1,23 +1,18 @@ -############################################################# +################################################################################ # # gmpc # -############################################################# -GMPC_VERSION = 0.17.0 -GMPC_SOURCE = gmpc-$(GMPC_VERSION).tar.gz -GMPC_SITE = http://download.sarine.nl/download/Programs/gmpc/$(GMPC_VERSION)/ -GMPC_CONF_ENV = ac_cv_lib_curl_curl_global_init=yes \ - ac_cv_path_GOB2=$(GOB2_HOST_BINARY) -GMPC_CONF_OPT = --disable-mmkeys +################################################################################ -GMPC_DEPENDENCIES = libglib2 libgtk2 libglade libcurl libmpd host-gob2 host-intltool \ - $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl) +GMPC_VERSION = 11.8.16 +GMPC_SITE = http://download.sarine.nl/Programs/gmpc/$(GMPC_VERSION) +GMPC_CONF_ENV = ac_cv_path_GOB2=$(GOB2_HOST_BINARY) +GMPC_CONF_OPT = --disable-mmkeys --disable-unique +GMPC_LICENSE = GPLv2+ +GMPC_LICENSE_FILES = COPYING +GMPC_DEPENDENCIES = host-gob2 host-intltool host-pkgconf host-vala \ + libglib2 libgtk2 libmpd libsoup sqlite \ + xlib_libICE xlib_libSM xlib_libX11 \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) -ifeq ($(BR2_PACKAGE_XLIB_LIBSM),y) -GMPC_DEPENDENCIES += xlib_libSM -GMPC_CONF_OPT += --enable-sm -else -GMPC_CONF_OPT += --disable-sm -endif - -$(eval $(call AUTOTARGETS,package,gmpc)) +$(eval $(autotools-package)) diff --git a/package/gnuchess/Config.in b/package/gnuchess/Config.in new file mode 100644 index 0000000000..13ae801fb8 --- /dev/null +++ b/package/gnuchess/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_GNUCHESS + bool "gnuchess" + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_FLEX + help + GNU Chess lets most modern computers play a full game of chess. + + http://ftp.gnu.org/pub/gnu/chess + +comment "gnuchess needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/games/gnuchess/gnuchess-5.07-getline-conflicts.patch b/package/gnuchess/gnuchess-5.07-getline-conflicts.patch similarity index 100% rename from package/games/gnuchess/gnuchess-5.07-getline-conflicts.patch rename to package/gnuchess/gnuchess-5.07-getline-conflicts.patch diff --git a/package/games/gnuchess/gnuchess-5.07.patch b/package/gnuchess/gnuchess-5.07.patch similarity index 100% rename from package/games/gnuchess/gnuchess-5.07.patch rename to package/gnuchess/gnuchess-5.07.patch diff --git a/package/gnuchess/gnuchess.mk b/package/gnuchess/gnuchess.mk new file mode 100644 index 0000000000..1ab22dbff2 --- /dev/null +++ b/package/gnuchess/gnuchess.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# gnuchess +# +################################################################################ + +GNUCHESS_VERSION = 5.07 +GNUCHESS_SITE = $(BR2_GNU_MIRROR)/chess +GNUCHESS_LICENSE = GPLv2+ +GNUCHESS_LICENSE_FILES = COPYING + +GNUCHESS_DEPENDENCIES = host-flex flex +GNUCHESS_DEPENDENCIES += $(if $(BR2_PACKAGE_READLINE),readline) + +$(eval $(autotools-package)) diff --git a/package/gnuconfig/.cvsignore b/package/gnuconfig/.cvsignore deleted file mode 100644 index 669c89f536..0000000000 --- a/package/gnuconfig/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -.cvsignore -README.buildroot -gnuconfig.mk -patches -.svn diff --git a/package/gnuconfig/CVS/Entries b/package/gnuconfig/CVS/Entries deleted file mode 100644 index 07ca106ed8..0000000000 --- a/package/gnuconfig/CVS/Entries +++ /dev/null @@ -1,14 +0,0 @@ -D/doc//// -D/lib//// -D/m4//// -D/patches//// -D/po//// -D/scripts//// -D/src//// -D/tests//// -D/testsuite//// -/Makefile/1.6/Mon Sep 26 07:33:33 2005// -/ChangeLog/1.387/Thu Sep 20 16:47:12 2007// -/config.guess/1.368/Thu Sep 20 16:47:12 2007// -/config.sub/1.356/Thu Sep 20 16:47:05 2007// -/uname/1.5/Tue Aug 21 18:37:34 2007// diff --git a/package/gnuconfig/CVS/Repository b/package/gnuconfig/CVS/Repository deleted file mode 100644 index 04204c7c9d..0000000000 --- a/package/gnuconfig/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -config diff --git a/package/gnuconfig/CVS/Root b/package/gnuconfig/CVS/Root deleted file mode 100644 index 192e02e93c..0000000000 --- a/package/gnuconfig/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:pserver:anonymous@cvs.savannah.gnu.org:/cvsroot/config diff --git a/package/gnuconfig/ChangeLog b/package/gnuconfig/ChangeLog deleted file mode 100644 index 2bba73eb51..0000000000 --- a/package/gnuconfig/ChangeLog +++ /dev/null @@ -1,1996 +0,0 @@ -2007-07-25 Mike Frysinger - - * testsuite/config-guess.sh (run_config_guess): Do not prefix with - "function" as this is not permitted by POSIX. - * testsuite/config-sub.sh (run_config_sub): Likewise. - -2007-07-24 Ben Elliston - - * config.guess: Remove trailing whitespace. - -2007-07-22 Ben Elliston - - Reported by Luke Mewburn : - * config.guess: Fix typo ix86xen -> i86xen. - -2007-06-28 Ben Elliston - - From M R Swami Reddy : - * config.sub: Rename cr16c to cr16. - -2007-05-17 Ben Elliston - - From Luke Mewburn : - * config.guess (i86xen:SunOS:5.*:*): New. - * testsuite/config-guess.data: Add test case. - -2007-04-29 Ben Elliston - - From Pedro Alves : - * config.sub (mingw32ce): New. - * testsuite/config-sub.data: Add test cases. - -2007-03-06 Ben Elliston - - * config.guess (*:Interix*:[3456]*): Consolidate all machine - possibilities into a single entry with a case statement that - examines ${UNAME_MACHINE}. Suggested by . - -2007-01-18 Ben Elliston - - * testsuite/config-sub.data: Add MeP test cases. - - From Dave Brolley - 2001-03-19 Ben Elliston - - * config.sub (mep, mep-*): Add. - -2007-01-15 Ben Elliston - - * config.guess (SX-8R:SUPER-UX:*:*): New. - * testsuite/config-guess.data: Add a test case. - -2007-01-04 Ben Elliston - - From Alexander Boettcher via Dalibor Topic: - * config.sub: Recognise -drops*. - * testsuite/config-sub.data: Add a test. - -2006-12-22 Ben Elliston - - * config.guess (i*:MINGW:*:*): Rename from this .. - (*:MINGW:*:*): .. to this. - * testsuite/config-guess.data: Add test cases. - -2006-12-08 Bob Wilson - - * config.guess (xtensa:Linux:*:*): New. - * testsuite/config-guess.data: Add test case. - * testsuite/config-sub.data: Add xtensa-elf and xtensa-linux. - -2006-12-08 Kazu Hirata - Ben Elliston - - * config.sub: Recognize fido and fido-*. - * testsuite/config-sub.data: Add test cases. - -2006-11-30 Ben Elliston - - * config.guess (SX-7:SUPER-UX:*:*): New. - * testsuite/config-guess.data: Add test case. - -2006-11-15 Ben Elliston - - From Josselin Mouette : - * config.guess (SX-8:SUPER-UX:*:*): New. - * testsuite/config-guess.data: Add test case. - -2006-11-08 Ben Elliston - - * config.guess (authenticamd:Interix*:[3456]*): Another AMD64. - * testsuite/config-guess.data: Add test case. - -2006-11-07 Steve Woodford - Ben Elliston - - * config.guess (*:NetBSD:*:*): Handle sh5el arch. - * config.sub (sh5el): New basic_machine. - * testsuite/config-sub.data: Add test cases. - -2006-09-20 Ben Elliston - - * config.sub (score, score-*): New. - * testsuite/config-sub.data: Add test cases. - -2006-08-14 Thiemo Seufer - Nigel Stephens - David Ung - - * config.sub (sde): New. - * testsuite/config-sub.data: Add test cases. - -2006-08-14 Vijay K. Munjal - - * config.sub (xc16x, xc16x-*): New. - * testsuite/config-sub.data: Add test cases. - -2006-07-02 Masaki MURANAKA - - * config.sub (toppers-*): New. - * testsuite/config-sub.data: Add test case. - -2006-07-02 Ben Elliston - - * config.guess (macppc:MirBSD:*:*): Fix typo. - * testsuite/config-guess.data: Add test case. - -2006-07-02 Ben Elliston - - * config.guess: Handle Interix 6. - * testsuite/config-guess.data: Add test case. - -2006-06-06 Ben Elliston - - From H??vard Skinnemoen : - * config.guess (avr32*:Linux:*:*): New. - * config.sub (avr32, avr32-*): Likewise. - * testsuite/config-guess.data: Add test case. - * testsuite/config-sub.data: Likewise. - -2006-05-13 Ben Elliston - - * config.sub: Specify -elf as the default OS for spu. - (c4x-* | tic4x-*): Tidy formatting. - * testsuite/config-sub.data: Update tests. - -2006-05-13 Bruno Haible - - * config.guess: Change support for Sun C/C++ 5.9 on Linux/x86 to - use compiler-specific predefines other than __sun. - -2006-05-12 Ben Elliston - - * config.sub (spu): New. - * testsuite/config-sub.data: Add test case. - -2006-05-12 Ben Elliston - - * config.sub (m32c, m32c-*): Fold into the standard case. - -2006-04-26 Bruno Haible - Ben Elliston - - * config.guess (amd64:FreeBSD:*:*) Detect as x86_64. - * testsuite/config-guess.data: Add test case. - -2006-03-13 Ben Elliston - - Revert these patches at Earnie Boyd's request: - - * testsuite/config-guess.data: Tweak MSYS_NT-5.1 test. - - * config.guess: Handle i*:MSYS_NT-*:*:* for MSYS/Mingw. - * testsuite/config-guess.data: Add test case. - -2006-03-07 Mike Frysinger - - * config.sub (sheb, sheb-*): Handle these in addition to shbe. - * testsuite/config-sub.data: Add test case. - -2006-03-06 Ben Elliston - - * uname: Exit with exit code 0. - -2006-02-27 David S. Miller - Ben Elliston - - * config.sub (sparcv9v, sparc64v): Recognise SUN4V-based SPARCs. - * testsuite/config-sub.data: Add test cases. - -2006-02-27 Ben Elliston - - * config.guess, config.sub: Add 2006 to copyright years. - -2006-02-23 Ben Elliston - - * config.guess (EM64T:Interix:*:*): New case. - * testsuite/config-guess.data: Add test case. - -2006-02-23 Mike Frysinger - - * config.sub (nios, nios2): New. - * testsuite/config-sub.data: Add test cases. - -2006-02-23 Ben Elliston - - * config.guess (x86:Interix*:[345]*): Retain full Interix version. - * testsuite/config-guess.data: Update Interix test(s). - -2006-02-23 Ben Elliston - - * testsuite/config-guess.data: Tweak MSYS_NT-5.1 test. - -2006-02-23 Dan Nicolaescu - - * config.guess (i*86:Linux:*:*): Recognise the Sun Studio compiler - by handling #if defined(__sun). - -2006-02-23 Ben Elliston - - * config.guess: Handle i*:MSYS_NT-*:*:* for MSYS/Mingw. - * testsuite/config-guess.data: Add test case. - -2006-01-30 Ralf Wildenhues - - * config.guess: Don't use semicolons to separate sed commands, as - POSIX says it's not portable. - Noted by Paul Eggert . - -2006-01-30 Ralf Wildenhues - - * config.guess (set_cc_for_build): Do not pass `-q' to mktemp. - Reported by Bruce Korb . - -2006-01-19 Robert Millan - - * testsuite/config-guess.data: Add test case for GNU/kFreeBSD. - * testsuite/config-sub.data: Add test case for amd64-kfreebsd5.4-gnu. - -2006-01-02 Ben Elliston - - * config.guess (*:SolidBSD:*:*): New. - * config.sub (-solidbsd*): New. - * testsuite/config-guess.data: Add test case. - * testsuite/config-sub.data: Ditto. - -2005-12-23 Ben Elliston - - From Takahashi Yoshihiro : - * config.guess (pc98:FreeBSD:*:*) Add special case. - * config.sub (pc98, pc98-*): New. - * testsuite/config-guess.data: Add test case. - * testsuite/config-sub.data: Ditto. - -2005-12-22 Ben Elliston - - From John Williams : - * config.sub (mb, microblaze): New basic_machine. - * testsuite/config-sub.data: New tests. - -2005-12-13 Ralf Wildenhues - - * config.guess (mips:Linux:*:*, mips64:Linux:*:*, i*86:Linux:*:*): - Fix quoting of eval command line, allow for preprocessor to insert - white space between C tokens. - (i*86:Linux:*:*): Handle Portland Group pgcc like Intel icc; it - doesn't define __ELF__ either. - -2005-12-11 Ben Elliston - - From Shaun Jackman : - * config.sub: Add the KERNEL-OS combination linux-newlib*. - * testsuite/config-sub.data: Add a test for i386-linux-newlib. - -2005-12-11 Ben Elliston - - Reported by Leif Ekblad : - * config.guess (i*86:rdos:*:*): New. - * config.sub: Handle rdos. - * testsuite/config-guess.data: Add test case for RDOS. - * testsuite/config-sub.data: Likewise. - -2005-12-09 Ben Elliston - - Reported by Jan-Benedict Glaw : - * config.guess (vax:Linux:*:): Detect as vax-dec-linux-gnu. - * testsuite/config-guess.data: Add test. - -2005-12-09 Nathan Sidwell - - * config.sub (mt): Rename from ms1. - (ms1): Alias it to mt for backward compatibility. - * testsuite/config-sub.data: Update testsuite. - -2005-11-13 Kean Johnston - - * config.sub: Allow -sco6 and -sco5v6 to be aliases for SCO - OpenServer 6. - * testsuite/config-sub.data: New tests. - -2005-11-11 Ben Elliston - - * testsuite/config-guess.data: Add test case for Linux PPC64. - -2005-11-11 Ben Elliston - - * config.guess (x86:Interix*:[345]*): Handle Interix version 5. - * testsuite/config-guess.data: Add test case. - -2005-09-19 Gerben Wierda - - * config.guess (*:Darwin:*:*): Don't treat *86 specifically. - -2005-08-03 Ben Elliston - - Reported by Kulkin Alexey : - * config.guess (x86_64:CYGWIN*:*:*): New case. - * testsuite/config-guess.data: Add test case. - -2005-07-14 Robert Millan - - * config.guess (or32:Linux:*:*): Detect. - * testsuite/config-guess.data: Add test case. - -2005-07-08 Michael Haubenwallner - - * config.guess: Let set_cc_for_build evaluate only once to avoid - creation of more than one tmpdir without removing the old one. - -2005-07-08 Ben Elliston - - * config.sub: Add support for Haiku. - * testsuite/config-sub.data: Add test cases for i386, SPARC and - PowerPC Haiku. - -2005-07-08 Ben Elliston - - * Makefile (SHELL): Remove override. - -2005-07-04 Ben Elliston - Paul Mundt - - * config.sub: Handle sh2a/sh4a. - * testsuite/config-sub.data: Add test cases. - -2005-07-01 Robert Millan - - * config.sub: Deprecate "openrisc" in favour of "or32". - Do not default the OS field to "coff". - * testsuite/config-sub.data: Add a test case. - -2005-06-30 Ben Elliston - - * config.sub (sh64): Remove duplicate entry. - * testsuite/config-sub.data: Add test case for sh64. - -2005-06-30 Mike Frysinger - - * config.sub (mips64vr5900, mips64vr5900el): New machines. - * testsuite/config-sub.data: Add test cases. - -2005-06-30 Brad Smith - - * config.guess: Simplify OpenBSD support. - -2005-06-02 Aldy Hernandez - - * config.sub (ms1, ms1-*): New. - * testsuite/config-sub.data: Add test cases. - -2005-06-02 Jim Blandy - - * config.sub (m32c, m32c-*): New. - * testsuite/config-sub.data: Add test cases. - -2005-05-27 Ben Elliston - - * config.guess (i*:windows32*:*): uname -m includes "-pc", so no - need to emit it additionally. - * testsuite/config-guess.data: Update test case. - -2005-05-15 Ben Elliston - - Reported by Sam Steingold : - * config.guess (i*:windows32*:*): New. - * testsuite/config-guess.data: Add a corresponding test case. - -2005-05-15 Paul Eggert - - * config.guess: Fix remaining problematic uses of "exit 0" (and - one problematic use of "&& exit"). - -2005-05-12 Ben Elliston - - * config.guess: Update Free Software Foundation address. - * config.sub: Likewise. - -2005-05-12 Ben Elliston - - * uname: Similar to the last change, remove all exit commands and - let the script exit with the exit code of the last command. - -2005-05-12 Paul Eggert - - Explanation for this subtle change: - - From: Paul Eggert - To: config-patches@gnu.org - Subject: config.guess, config.sub misdiagnose write errors - - config.guess and config.sub sometimes mishandle write errors to - stdout: they either ignore the errors, or output invalid - diagnostics when they occur. For a simple (albeit unrealistic) - example, on my Solaris 8 (sparc) host, the command "config.guess - >&-" exits with status 0; it should exit with status 1, due to the - write failure. - - * config.guess: Don't exit with an explicit exit code of 0. - * config.sub: Likewise. - -2005-05-12 Ben Elliston - - * config.guess (i*86:skyos:*:*): New. - * config.sub (case $os): Handle "-skyos*" as a valid OS. - * testsuite/config-guess.data: Add a test case. - * testsuite/config-sub.data: Likewise. - -2005-05-12 Tim Rice - - * config.guess: Add support for SCO OpenServer 6. - -2005-05-12 Noah Misch - - * config.guess (9000/[34678]??:HP-UX:*:*): Discard stderr of `cc - -E -'; HP `cc' emits an error for it but still preprocesses - standard input as expected. Add comment. - -2005-05-12 Nick Burrett - Ben Elliston - - * config.guess (arm:riscos:*:*): New configuration. - * testsuite/config-sub.data: New tests. - * testsuite/config-guess.data: Likewise. - -2005-05-12 Nick Burrett - - * config.guess: Add a missing newline to arm-acorn-riscix string. - -2005-04-22 Paul Green - Ben Elliston - - * config.guess: Add Stratus VOS IA32 systems. - * testsuite/config-guess.data: Add a testcase. - -2005-04-22 Ben Elliston - Bernd Schmidt - - * config.sub (bfin): New target. - * testsuite/config-sub.data: Test bfin-elf. - -2005-04-22 Ben Elliston - Dave Miller - - * config.sub (sparc64b): Handle. - * testsuite/config-sub.data: Test sparc64-linux, sparc64b-linux. - -2005-03-24 Paul Eggert - - * config.guess: Update URL for script location. - Problem reported by Bruno Haible. - -2005-02-10 Ben Elliston - J Shepherd - - * config.guess (NSE-?:NONSTOP_KERNEL:*:*): New. - * testsuite/config-guess.data: Test for nse-tandem-nsk. - -2005-02-10 Ben Elliston - - * testsuite/config-guess.data: Add craynv-cray-unicosmp2.5.X case. - -2005-02-10 Ben Elliston - - * testsuite/config-sub.sh (run_config_sub): New function. Compute - $rc within the function and return it. - * testsuite/config-guess.sh (run_config_guess): Likewise. - -2005-02-10 Ben Elliston - - * config.guess (amd64:CYGWIN*:*:*): New. - * testsuite/config-sub.data: Add amd64-cygwin, x86_64-cygwin. - * testsuite/config-guess.data: Add x86_64-unknown-cygwin test. - -2005-02-10 Ben Elliston - - * config.guess: Update copyright years. - * config.sub: Likewise. - -2005-01-11 Inderpreet Singh - Ben Elliston - - * config.sub: Handle maxq target. - * testsuite/config-sub.data: Add maxq and maxq-elf tests. - -2004-11-30 Melissa Mears - - * config.sub: Handle xbox alias. - * testsuite/config-sub.data: Add xbox case. - -2004-11-17 Ian Lance Taylor - Ben Elliston - - * config.sub: Recognize xscalee[bl]. - * testsuite/config-sub.data: Add xscale, xscalee[bl] cases. - -2004-11-12 Ben Elliston - - * config.guess (*:z/VM:*:*): Add new case. - * config.sub (os): Add case for -zvmoe. - * testsuite/config-guess.data: Add a test case. - * testsuite/config-sub.data: Likewise. - -2004-11-12 Ben Elliston - - * testsuite/config-guess.sh: Use , and not / as the sed delimiter. - -2004-11-12 Andris Pavenis - - * config.sub (djgpp): Alias to i586-pc-msdosdjgpp. - * testsuite/config-sub.data: Add a test case. - -2004-10-25 Ben Elliston - - * testsuite/config-guess.sh: Reduce recurring tabs into a single - tab, to allow the test data to be better aligned in columns. - -2004-10-25 Ben Elliston - - Reported by Monty Solomon : - * config.guess (*:XENIX:*:SysV): New. - * testsuite/config-guess.data: Add a test case. - -2004-10-25 Ben Elliston - - Reported by Martin Hammer : - * config.guess (DRS?6000:isis:4.2*:7*): New pattern. - -2004-09-07 Ben Elliston - - * config.guess (frv:Linux:*:*): New. - * testsuite/config-sub.data: Add cris-linux, frv-linux. - * testsuite/config-guess.data: Add frv-linux-unknown-gnu case. - -2004-08-27 Hans-Peter Nilsson - - * config.sub: Handle crisv32, alias etraxfs. - * config.guess (crisv32:Linux:*:*): Handle. - * testsuite/config-sub.data: Add test case. - * testsuite/config-guess.data: Likewise. - -2004-08-22 Ben Elliston - - * Makefile (check): Run config-guess.sh tests as well. - * testsuite/config-guess.sh: New test. - * testsuite/config-guess.data: New file. - * testsuite/uname.in: Likewise. - * testsuite/config-sub.data (amd64-unknown-freebsd5.2): New case. - -2004-08-13 Brad Smith - - * config.guess (*:OpenBSD:*:*): Remove defunct MIPS machines. - (sgi:OpenBSD:*:*): Emit mips64, not mipseb. - -2004-08-11 Paul Eggert - - * config.guess (*:Darwin:*:*): If uname -p reports "unknown", - assume the processor is a powerpc. This is because coreutils - uname (at least versions 4.5.7 through 5.2.1) outputs "unknown" - in this case, due to a MacOS X bug that causes - sysctl ((int[]) {CTL_HW, HW_MACHINE_ARCH}, 2, buffer, &bufsize, 0, 0) - to return a negative number. - Problem reported by Petter Reinholdtsen in: - http://lists.gnu.org/archive/html/bug-gnu-utils/2003-02/msg00201.html - -2004-07-19 Ben Elliston - - * config.guess (S7501:*:4.0:3.0): Handle NCR System V UNIX machine. - -2004-07-02 Ben Elliston - - * testsuite/config-sub.data: Add i386-elf to i786-elf. - -2004-06-30 Ben Elliston - - * testsuite/config-sub.data: Add more new tests. - -2004-06-25 Ben Elliston - - * Makefile (check): New target. - * testsuite/config-sub.sh: New test. - * testsuite/config-sub.data: New file. - -2004-06-24 Ben Elliston - - * config.guess: Update copyright years. - * config.sub: Likewise. - -2004-06-22 Robert Millan - - * config.guess (*:FreeBSD:*:*): Remove check for glibc (unneeded - since GNU/kFreeBSD systems match *:GNU/*:*:* instead). - -2004-06-22 Stanley F. Quayle - - * config.guess (*:*VMS:*:*): New entry. Replaces - Alpha:OpenVMS:*. Recognize and advertise all VMS flavors as dec - manufacturer. - -2004-06-22 Ben Elliston - - * config.guess: Cray fixes from Wendy Palm . - * config.sub: Likewise. - -2004-06-22 Ben Elliston - - Reported by Hans-Peter Nilsson : - * config.sub: Correctly handle mmix-knuth and mmix-knuth-mmixware. - -2004-06-21 Ben Elliston - - * Makefile: New file. - -2004-06-11 Ben Elliston - - * config.guess (pegasos:OpenBSD:*:*): Remove. - -2004-06-11 Ben Elliston - - From Wouter Verhelst : - * config.guess (M68*:*:R3V[5678]:*): Detect R3V8. - -2004-06-11 Ben Elliston - - * config.guess (luna88k:OpenBSD:*:*): New. - -2004-03-12 Kazuhiro Inaoka - - * config.guess (m32r*:Linux:*:*): New case. - * config.sub: Handle m32rle. - -2004-03-12 Ben Elliston - - From Jens Petersen : - * config.sub: Handle sparcv8. - -2004-03-03 Ben Elliston - - From Tom Smith : - * config.guess: Version suffixes are equally significant on Tru64 - V4.* and V5.*, so do not ignore them on V5.*. Handle a version - prefix of "P" (patched kernel). - -2004-02-23 Tal Agmon - - * config.sub: Add support for National Semiconductor CRX target. - -2004-02-16 Thorsten Glaser - - * config.guess (*:MirBSD:*:*, macppc:MirBSD:*:*): Handle. - * config.sub: Handle -mirbsd*. - -2004-02-16 Brad Smith - - * config.guess: Recognize OpenBSD on AMD64 and CATS hardware. - -2004-02-11 Ben Elliston - - * config.sub (abacus): Add. - -2004-02-11 Galit Heller - - * config.sub: Add support for National Semiconductor CR16C target. - -2004-02-02 Ben Elliston - - * config.guess (*:ekkoBSD:*:*): Handle. - * config.guess: Handle -ekkobsd*. - -2004-01-30 Ben Elliston - - * NEWS: Remove. - -2004-01-24 Ben Elliston - - From Brett E. Wynkoop : - * config.guess (m68k:machten:*:*): Handle. - -2004-01-20 Jeroen Ruigrok van der Werven - - * config.guess: Fix DragonFly entry to really work. - -2004-01-05 Ben Elliston - Joachim Schmitz - - * config.guess: Handle NSR-? to accept any CPU type. - -2004-01-05 Ben Elliston - - * config.sub: Handle amd64-*. - -2003-11-20 Kristian Van Der Vliet - - * config.guess (i*86:syllable:*:*): New. - * config.sub (-syllable*): Likewise. - -2003-11-18 Jeroen Ruigrok van der Werven - - * config.guess (*:DRAGONFLY:*:*): New. - * config.sub (-dragonfly*): Likewise. - -2003-11-03 Ben Elliston - - * config.guess: Detect OpenBSD on Pegasos I hardware. - -2003-11-03 Jim Tison - Ulrich Weigand - - * config.sub (tpf, -tpf*): Recognize. - -2003-10-16 Ben Elliston - - * config.guess (5000:UNIX_System_V:4.*:*): Detect the Fujitsu - VPP5000. Reported by Naoki Yoshida . - -2003-10-16 Bernardo Innocenti - - * config.sub (linux-uclibc, uclinux-uclibc): Handle. - -2003-10-16 Ben Elliston - - Reported by Todd Humphrey : - * config.guess (*:OS400:*:*): Detect OS/400 on AS/400 machines. - * config.sub (os400, -os400*): Recognise. - -2003-10-07 Robert Millan - Ben Elliston - - * config.guess (*:GNU/*:*:*): New. Generic check for systems with - GNU libc and userland (matches GNU/KFreeBSD and GNU/KNetBSD). - (*:GNU/FreeBSD:*:*): Remove, superceeded by GNU/*. - * config.sub: Handle -knetbsd*. - -2003-10-07 Ben Elliston - - * config.guess (3[345]??:*:4.0:3.0): Expand pattern to match 3526. - -2003-10-03 Chris Demetriou - - * config.sub (mipsisa64r2*): Add. - -2003-10-03 Ben Elliston - Joachim Schmitz - - * config.guess (NSR-*:NONSTOP_KERNEL:*:*): Recognise NSR-Y. - -2003-08-18 Andreas Krennmair - - * config.guess: Add detection for diet libc. - * config.sub: Handle linux-dietlibc. - -2003-07-29 Ben Elliston - - * NEWS: New draft file. - -2003-07-17 Ben Elliston - - Reported as missing by Doug Evans: - * config.sub: Handle iq2000 and iq2000-*. - -2003-07-15 Alexandre Oliva - - * config.sub: Add am33_2.0 machine. - -2003-07-04 Ben Elliston - - * config.sub: Handle -kfreebsd*. From Robert Millan. - -2003-07-02 Robert Millan - - * config.guess (*:GNU/FreeBSD:*:*): Prefix GNU/FreeBSD triplet - with a "k" to indicate the system is based on FreeBSD's kernel and - not the whole OS. - -2003-06-17 Ben Elliston - - From by Stephen Thomas : - * config.guess (sh64*:*:*:Linux): New case. - * config.sub (sh64): Map to sh64-unknown. - -2003-06-17 Ben Elliston - - Reported by Dennis Grevenstein : - * config.guess (sei:*:*:seiux): Detect SEIUX running on MIPS-based - workstations manufactured by Sumitomo Electric Industries. - * config.sub (sei, -sei*): Handle. - -2003-06-13 Svein E. Seldal - - * config.sub (c4x, tic4x): Re-arrange and fix. - -2003-06-12 Bernard Giroud - - * config.guess (Alpha*:OpenVMS:*:*): New entry. - -2003-06-06 Ben Elliston - - * config.sub: Recognise pentium3 and pentium4. From Kelley Cook - . - -2003-06-06 Douglas B Rupp - - * config.guess: Recognize Interix 4. - -2003-06-04 Ben Elliston - - * config.guess (set_cc_for_build): Allow insecure temporary - filenames to be generated on systems without mktemp(1) or $RANDOM, - but issue a warning to standard error. Suggested by Hans-Peter - Nilsson. - -2003-05-24 Ben Elliston - - * config.sub: Handle $os values of -nx6 and -nx7. - -2003-05-22 Ben Elliston - - * config.guess: Detect ICL NX version 6 running on ICL/Fujitsu DRS - 6000 machines. Reported by . - -2003-05-19 Hans-Peter Nilsson - - * config.guess (cris:Linux:*:*): New case. - -2003-05-09 Ben Elliston - - * config.guess (SHG2:*:4.0:3.0): Handle NCR System V UNIX machine. - Reported by Raj Mannar . - -2003-05-09 Andreas Jaeger - - * config.sub (maybe_os): Add alias amd64 for x86_64. - -2003-05-09 Ben Elliston - - From Robert Millan - * config.guess (*:GNU/FreeBSD:*:*): Handle. - -2003-02-22 Ben Elliston - - Revert the following due to the demise of MicroBSD: - - 2003-01-03 Scott Kamp - * config.guess: Detect MicroBSD operating system on i386 CPUs. - * config.sub: Handle aliases for such. - -2003-02-03 Ben Elliston - - * config.sub: Handle -kaos*. - -2003-02-03 Charles Lepple - - * config.sub: Handle TI tic55x-* and tic6x-* targets. - -2003-01-30 Ben Elliston - - * config.guess (alpha:OSF1:*:*): Use /usr/sbin/psrinfo -v to - detect the Alpha CPU type, not an assembled program requiring - $CC_FOR_BUILD. - -2003-01-28 Nick Clifton - - * config.sub: Add sh2e support. - -2003-01-22 Fabio Alemagna - - * config.sub: Handle -aros*. - -2003-01-10 Stuart Hastings - - * config.guess: Make i686 the default for Darwin/x86. - -2003-01-03 Scott Kamp - - * config.guess: Detect MicroBSD operating system on i386 CPUs. - * config.sub: Handle aliases for such. - -2003-01-02 Ben Elliston - - From Wendy Palm : - * config.guess (CRAY*T3D:*:*:*): Remove. - (*:UNICOS/mp:*:*): New system. - * config.sub (t3d): Remove. - (nv1): Add. - -2003-01-02 Ben Elliston - - * config.sub: Fix mipstx39-* and mipstx39el-* handling (typo). - -2003-01-02 Ben Elliston - - From Dmitry Diky : - * config.sub (basic_machine): Add msp430 and msp430-*. - -2003-01-02 Chris Demetriou - - * config.sub (mipsisa32r2*): Add. - -2002-12-23 Ben Elliston - - * config.guess (set_cc_for_build): Rework to do more secure tmp - directory creation. Remove temporary files and tmp directory on - exit; remove redundant rm(1) and rmdir(1) commands throughout. - -2002-12-17 John David Anglin - - * config.guess (hppa*): Remove tmpdir when CC_FOR_BUILD is set. - -2002-12-11 Ben Elliston - Dave Anglin - Ross Alexander - - * config.guess (*:HP-UX:*:*): Detect 64-bit compiler. - -2002-11-30 J.T. Conklin - - * config.sub (-nto-qnx*): New $os pattern. - (-nto*): Preserve OS version when converting to -nto-qnx*. - -2002-11-30 Ben Elliston - - From Stefan Neis : - * config.guess: Reorder entries so that hosts with a different - operating system won't be misdetected as System V simply because - their version number happens to be 3.2, 4.* or 5. This is needed - for OS/2, at least, which is currently at version 4.52. - -2002-11-30 Ben Elliston - - From Joel Baker : - * config.guess: Append "-gnu" to triplet on Debian/NetBSD systems. - * config.sub: Recognise netbsd*-gnu*. - -2002-11-30 Maciej W. Rozycki - - * config.guess (mips64:Linux:*:*): Recognize. - (mips:Linux:*:*): Recognize as mips-unknown-linux-gnu instead of - mips-pc-linux-gnu. - -2002-11-30 Douglas B Rupp - - * config.guess: Make default Interix arch "i586". - -2002-11-30 Ben Elliston - - * config.guess: Add "SDS2" to machines that run NCR System V UNIX. - Reported by . - -2002-11-13 Ben Elliston - - * config.sub (windows32): Remove bad idea. - -2002-11-13 Werner Lemberg - - * config.sub: Add -mks*. - -2002-11-13 Jeff Conrad - - * config.guess: Detect MKS running on Windows {95,98,NT}. - -2002-11-13 Ben Elliston - - * config.guess: Detect PowerMAX OS on Concurrent Synergy machines. - Reported by Sam Williams . - -2002-11-08 Ben Elliston - - * config.guess: Detect m68k-diab-dnix. - * config.sub: Handle -dnix*. - -2002-10-21 Paul Eggert - - * config.guess (CC_FOR_BUILD): Put "-o outputfile" before any - operands. POSIX 1003.1-2001 says that "c99 file.c -o file" is not - supported; you must put all options before all operands, e.g. "c99 - -o file file.c". - -2002-09-05 Svein E. Seldal - - * config.sub: Add tic4x target. - -2002-09-03 Ben Elliston - - * config.guess: Detect NSR-D machines for nsr-tandem-nsk. - Reported by . - -2002-08-23 Ben Elliston - - * config.guess: Detect Concurrent PowerMaxion. - Reported by Lloyd Goldston . - - * config.guess: Detect Convergent 3B1 machines (running AT&T UNIX). - Reported by Bruce Lilly . - -2002-08-22 Urs Janßen - - * config.sub: Cosmetic whitespace fixes. - -2002-08-20 Phil Edwards - - * config.sub: Accept athlon_* patterns as synonyms for i686-pc. - -2002-08-20 Ben Elliston - - From Chris Demetriou : - * config.sub (sb1, sb1el): Treat these machines as - mipsisa64sb1-unknown and mipsisa64sb1el-unknown, respectively. - -2002-08-19 Ben Elliston - - * config.guess: Detect Super-UX on NEC SX-6. - Reported by Joachim Worringen . - -2002-08-16 Eric Christopher - - * config.sub (mipsisa64sr71k*, mips64vr*): Add. - -2002-07-23 Ben Elliston - - * config.guess: Detect alphaev7. Reported by urs@akk.org. - -2002-07-03 Ben Elliston - - * config.guess: Use umask to create temporary directly safely. - Using mkdir and chmod introduces a race. - -2002-07-03 Ben Elliston - - * config.guess: Detect ICL NX version 7 running on ICL/Fujitsu DRS - 6000 machines. Reported by Henrik N. Spuur Hansen . - -2002-07-03 Ben Elliston - - * config.guess: Execute $dummy, not ./$dummy, throughout. - - * config.guess (set_cc_for_build): Create a chmod 700 directory in - /tmp (or $TMPDIR, if set) to store temporary files generated for - use by the C compiler. This should resist the /tmp symbolic link - race vulnerability reported by Lawrence Teo. - -2002-07-03 Ben Elliston - - * config.sub: Handle freebsd*. From Bruno Haible. - -2002-07-01 Bruno Haible - - * config.guess: For FreeBSD systems using glibc, add suffix "-gnu". - * config.sub: Accept freebsd-gnu system name. - -2002-06-21 J"orn Rennecke - - * config.sub: Add support for sh[12], sh3e, sh[1234]le, sh3ele, - shle, sh[1234]le, sh3ele. - -2002-06-21 Dave Brolley - - * config.sub: Add support for frv. - -2002-06-20 Chris Demetriou - - * config.sub: Add Broadcom SiByte SB-1 processor support - (mipsisa64sb1, mipsisa64sb1el). Add little-endian variants of - mipsisa32 and mipsisa64 (mipsisa32el and mipsisa64el, - respectively). Sort MIPS entries and split their lines a bit more - logically. Make sure that all of the MIPS entries in the "without - company name" target list are echoed in the "with company name" - list. - -2002-06-19 Denis Chertykov - - * (config.sub): Add ip2k support. - -2002-06-19 J"orn Rennecke - - * config.sub: Accept sh64le and sh64le-*. - -2002-05-29 Paul Eggert - - * config.guess: Don't use egrep, as POSIX 1003.1-2001 no longer - requires egrep. Use grep instead. - -2002-05-28 Kuang Hwa Lin - - * config.sub: Add DLX support. - -2002-05-22 Jason Thorpe - - * config.guess: Add case for "armeb" in NetBSD section. - * config.sub: Allow "armeb" as a valid CPU type. - -2002-05-16 Ben Elliston - - * config.guess: Detect PowerMAX OS on Concurrent Night Hawk. - * config.sub: Handle -powermax*. - -2002-05-02 Ben Elliston - - * config.guess: Add "4400" to machines that run NCR System V UNIX. - -2002-04-25 Mark Mitchell - - * config.sub (*-wrs-windiss): New targets. - -2002-03-20 Keith Thompson - - * config.guess (ia64:Linux:*:*): Output "ia64-unknown-linux-gnu". - -2002-03-20 Ben Elliston - - * config.guess (set_cc_for_build): Add c99 to list of candidates. - -2002-03-12 J.T. Conklin - - * config.guess: Add OS release to QNX config strings. - -2002-03-06 Chris Demetriou - - * config.sub: Add support for mipsisa64. - -2002-03-04 Ben Elliston - - From Kevin Ryde : - * config.sub (sparclet-*-*): Accept any vendor. - (sparc86x): Expand to sparc86x-unknown-none. - -2002-03-04 Adrian Bunk - - * config.guess (*:NetBSD:*:*): Use "sysctl -n hw.machine_arch" - instead of "uname -p" to get UNAME_MACHINE_ARCH. - -2002-02-22 Ben Elliston - Thiemo Seufer - - * config.sub (case $basic_machine): Add mips and clean up other - Linux specific cases. Now `config.sub mips` yields mips-unknown-elf. - -2002-02-22 Ben Elliston - - From Kevin Ryde : - * config.sub (sv1-*, ymp-*, c90-*): Preserve CPU type in output. - (t3d-*, t3e-*): Canonicalize to alpha and alphaev5. - -2002-02-18 Jim Meyering - - * config.guess: Don't use `head -1'; it's no longer portable. - Use `sed 1q' instead. - -2002-02-15 Ben Elliston - - * config.sub (rtmk*, rtmk-nova*): Recognise. - From Johan Rydberg . - -2002-02-15 Wendy Palm - - * config.guess (CRAY*X-MP:*:*:*, CRAY-2:*:*:*): Remove, as we know - they no longer exist in the field. - * config.sub (cray2, xmp): Likewise. - (cray, ymp, [cj]90-cray): basic_machine is now j90-cray. - (sv1-cray, cray-t3e, cray-t3d, cray-t90): New basic machine patterns. - -2002-02-15 Ben Elliston - - * config.sub: Accept m68060. - -2002-02-12 Ben Elliston - - * config.sub (sx?-*, superux*): New basic_machine and os. - From Len Makin . - -2002-02-12 Ben Elliston - - * config.guess: Set LC_ALL, not LANG, when running ld --help. - From Nicola Pero . - -2002-02-01 Ben Elliston - - * config.sub (sh64, sh64-*): Add new machine. - -2002-01-31 Ivan Guzvinec - - * config.sub: Add support for or32. - -2002-01-26 Andy Olson - - * config.guess (*:QNX:*:*): Report i386-* rather than x86pc-*. - Discussed with and approved by . - -2002-01-23 Ben Elliston - - * config.guess (i*86:Linux:*:*): Specifically handle the Intel icc - compiler, which doesn't define __ELF__. Submitted by Erik Lindahl - . - -2002-01-22 Nicola Pero - - * config.guess (i*86:Linux:*:*): Fixed: export LANG=C before - running ld so that linker output can be assumed to be in English, - and it works with non-default locales. - -2002-01-10 Ben Elliston - - * config.guess: Update Per Bothner's mail address. - -2002-01-02 Douglas B. Rupp - - * config.sub (alpha64*): New basic_machine. - -2002-01-02 Ben Elliston - - From Sigbjorn Skjaeret . - * config.guess: Add detection for MorphOS. - * config.sub: Handle morphos*. - -2002-01-02 H.J. Lu - - * config.guess (mips:Linux:*:*): Undef CPU, mips and mipsel first. - -2001-12-13 Douglas B. Rupp - - * config.guess: Recognize x86 Interix version 3. - -2001-12-12 Ben Elliston - - * config.guess (i*86:Linux:*:*): Minor simplification: have the - preprocessor emit shell assignments and just eval the output. - -2001-12-12 H.J. Lu - - * config.guess (mips:Linux:*:*): Re-work. - -2001-12-12 Ben Elliston - - * config.guess (i*86:Linux:*:*): Speed up detection of x86 Linux - systems by using just the C preprocessor rather than assembling - and linking a final executable. - -2001-12-12 Jason Thorpe - - * config.guess: Simplify assignment of machine for NetBSD targets, - and make it match the convention that NetBSD uses. List all - NetBSD architectures that require "elf" at the end of the OS name. - -2001-12-10 Lars Brinkhoff - - * config.sub: Recognize a few PDP-10 aliases. - -2001-12-03 Ben Elliston - - * config.sub: Recognise the Nucleus family of operating systems. - From . - -2001-12-03 Bob Wilson - - * config.sub: Add support for Xtensa targets. - -2001-11-30 Ben Elliston - - * config.sub: Recognise NEC v850e. From Miles Bader - . - -2001-11-26 Ben Elliston - - * config.guess (nsr-tandem-nsk): Detect all known NSR processor - types. Contributed by Kjetil Barvik . - -2001-11-16 Ben Elliston - - * config.sub: Accept "-atheos*" as a valid OS. - From Taco Witte . - -2001-11-08 Ben Elliston - - * config.guess: Handle 3487/3488 machines for NCR SysV UNIX. - Contributed by Melvin M. Bagaforo . - -2001-11-07 Adrian von Bidder - - * config.sub: Accept "-uclinux*" as a valid OS. - -2001-11-07 D.J. Barrow - - * config.sub: Added S/390 31 and 64 bit target. - -2001-11-06 John Marshall - - * config.sub: Accept "-palmos*" as a valid OS. - -2001-11-07 Geoffrey Keating - - * config.sub: Change 'stormy16' to 'xstormy16' in the two places - it appears. - -2001-10-05 Ben Elliston - - * config.guess: Add "SKA40" as a machine type for NCR SysV UNIX. - From Rudi Heitbaum . - -2001-10-05 Rodney Brown - - * config.guess (9000/[34678]??:HP-UX:*:*): Unconditionally try - /usr/bin/getconf which is available on HP-UX 10.20. Reindent. - -2001-10-04 Ben Elliston - - * config.sub: Handle viac3 as an i586-class CPU. - - * config.sub: Handle simso-wrs (Wind River's VxWorks Solaris - simulator target). From dpovey@dstc.qut.edu.au. - -2001-09-14 H.J. Lu - - * config.sub: Support avr-vendor-*. - -2001-09-13 Ben Elliston - - * config.guess (*-*-openbsd): Reorganise and clean up. - Contributed by brad@openbsd.org. - -2001-09-12 Ben Elliston - - * config.guess (sparc*-*-netbsd): Properly match 32-bit NetBSD/sparc64 - as sparc-unknown-netbsd. From Matthew Green . - -2001-09-07 Ben Elliston - - * config.sub: Add mipseb-* alias (whoops). - -2001-09-04 Ben Elliston - - * config.sub: Add mipseb alias. - -2001-09-04 Eric Christopher - Jason Eckhardt - - * config.sub: Add support for mipsisa32. - -2001-09-04 Ben Elliston - - * config.guess: Move eval $set_cc_for_build in most cases, to - prevent this script fragment from cloberring a previously - constructed C program in $dummy.c. - -2001-08-23 Ben Elliston - - * config.guess: Detect AtheOS on x86 systems. - Based on info provided by Taco Witte . - -2001-08-23 Geoffrey Keating - - * config.sub: Add stormy16-elf. - -2001-08-21 matthew green - - * config.guess (sparc*:NetBSD:*): Use $MACHINE_ARCH, not $MACHINE. - -2001-08-13 Ben Elliston - - * config.sub: Handle complete system name for elxsi. - From Zack Weinberg . - -2001-08-09 Ben Elliston - - * config.guess: Detect Alpha ev68 on OSF/1 and Linux. - From Ken Whaley . - -2001-08-04 Darrell Hamilton - - * config.guess: Unisys places the host id in ${UNAME_SYSTEM} - which is too unique to flag this system. Detect it with * - instead. - -2001-08-02 Alan Modra - - * config.sub: Sort basic cpu patterns. Combine hppa patterns. - -2001-08-01 Alan Modra - - * config.sub: Recognise powerpc64, powerpc64le, ppc64 variations. - -2001-07-31 Ben Elliston - - * config.guess: Detect Stratus VOS operating system. - * config.sub: Handle aliases for such. - -2001-07-30 Ben Elliston - - * config.guess: Detect STOP operating system on x86 CPUs. - From Hans Edwards . - -2001-07-27 Niibe Yutaka - - * config.sub: Recognize sh3eb and sh4eb (big endian) aliases. - -2001-07-19 Ben Elliston - - * config.guess: Detect Linux on the PPC64 architecture. - -2001-07-12 Keith Thompson - - * config.guess: Strip trailing sub-version number from - $UNAME_RELEASE on Cray YMP or Cray [A-Z]90 models. - -2001-07-09 Mark Klein - - * config.guess: Update MPE/iX to handle A and N class HPe3000. - -2001-07-02 Graham Stott - - * config.sub (basic_machine): Fix typo for mips64vr5000el. - -2001-06-29 Ben Elliston - - * config.guess: Remove stale libc1 tests on PowerPC Linux. - -2001-06-29 John Wolfe - - * config.guess: Correct UnixWare 7 and Open UNIX 8.0 change; - test for i586 must be a string that ends with "Pentium". - -2001-06-28 Ben Elliston - - * config.guess: On Alpha Linux, use /proc/cpuinfo to determine - the CPU model, rather than assembling a small test program. - -2001-06-27 Ben Elliston - - * config.guess: Do not unconditionally run the script fragment - to set $CC_FOR_BUILD. Put the script in the shell variable - $set_cc_for_build and only evaluate it before $CC_FOR_BUILD is - referenced. (Poor man's function inlining!) - - In future, the goal will be to reduce the dependence on a C - compiler to detect system types by utilising other means. - -2001-06-26 Ben Elliston - - * config.guess: On MIPS Linux, use /proc/cpuinfo to determine - the endian mode of the CPU, rather than compiling and running - a small C program. - -2001-06-12 John Wolfe - - * config.guess: Standardize triplet for UnixWare 7 and Open - UNIX 8.0, improve processor detection and maintain "sysv5" - prefix on third segment. - -2001-06-08 Christopher Faylor - - * config.sub: Add support for Sun Chorus. - -2001-06-05 Tomislav Greguric - - * config.guess: Add 2001 to copyright notice issued for -v. - -2001-06-01 Ben Elliston - - * config.guess (i*86:Linux:*:*): Examine the list of supported - targets, not the list of supported emulations when capturing - the output of "ld --help". This causes problems on systems - where GNU ld is built with support for all targets. Adjust - cases in the switch accordingly. - - * config.guess: Other small Linux cleanups. Remove unnecessary - logic for setting $VENDOR, since UNAME_MACHINE will always be - i*86 in this case. - -2001-05-30 Mo DeJong - - * config.sub: Handle windows32 and runtimes. - -2001-05-24 Ben Elliston - - * config.sub: Remove duplicate z8k entry. - -2001-05-11 Yaegashi Takeshi - - * config.sub: Handle sh[34]-* and sh[34]eb-*. - -2001-05-09 Ben Elliston - - * config.sub: Handle z8k-coff. - From Christian Groessler . - -2001-04-20 Ben Elliston - - * config.sub: Handle sparcv9b. - From Dave Miller . - - * config.guess: Detect PowerMAX OS on PowerPC. - -2001-04-20 Tyson Dowd - Fergus Henderson - - * config.guess: Replace i?86 with i*86 to match newer Pentiums. - * config.sub: Likewise. - -2001-03-30 Peter Buckingham - - * config.guess: Update LynxOS version numbers. - -2001-03-30 Alexandre Oliva - - * config.sub: Make sure to match an already-canonicalized - machine name (eg. mn10300-unknown-elf). - -2001-03-19 Philip Blundell - - * config.sub: Allow tic80 as machine type. Allow company name for - h8500 and pj targets; add `unknown' component when canonicalising - h8500-*, pj-* and pjl-*. - -2001-03-16 Ben Elliston - - * config.guess: Detect Linux on SPARC64. - -2001-03-14 Ben Elliston - - * config.guess: Detect ELF-based m68k Linux systems. Reported by - Michael Fedrowitz . - -2001-03-09 H.J. Lu - - * config.sub: Recognize s390/s390x as valid $basic_machine. - -2001-03-05 Pavel Roskin - - * config.guess: Never use `rm' without `-f' since it may be - interactive. - -2001-02-24 Ben Elliston - - * config.guess: Match Linux x86 systems explicitly. Allow unknown - architectures to fall through to the default case. - -2001-02-23 Ben Elliston - - * config.guess: More Linux cleanup. Match more in the top-level - case statement and less by groking the output of ld. - -2001-02-16 Ben Elliston - - * config.sub: Recognise [cjt]90-*. From Kevin Ryde. - -2001-02-13 David Edelsohn - - * config.guess (ia64:AIX): New case. - (*:AIX): Expand AIX V4 case to include V5. Remove unnecessary `H' - option from lsattr. Check for string "POWER" with prepended space - to distinguish from PowerPC_POWER3. Use ${UNAME_VERSION} instead - of assuming "4" to match the expanded case. - -2001-02-13 Kevin Ryde - - * config.sub: Recognise t90, c90, j90 without -cray. Preserve t90 - and j90--don't transform to c90. - -2001-02-13 Ben Elliston - - * config.guess: More Linux cleanup. - -2001-02-13 Martin Schwidefsky - - * config.guess: Add Linux target for S/390x. - * config.sub: Likewise. - -2001-02-13 Ben Elliston - - * config.guess: Rework detection of many Linux platforms, where - detection is straightforward. - -2001-01-31 Ben Elliston - - * config.guess: Handle hppa64-linux systems. From Alan Modra - . - -2001-01-29 Michael Sokolov - - * config.guess: Specifically identify 4.3BSD and 4.3BSD-Reno in - the original VAX UNIX detection logic based on the BSD define in - . - -2001-01-17 Pavel Roskin - - * config.sub: Removed cases that cannot match. Vendor changed - from "unknown" to "pc" for "mingw", "msdos" and "go32". - -2001-01-17 Ben Elliston - - * config.guess: Detect HI-UX on Hitachi SR8000 machines. It has - been difficult to discover what type of CPU is in this machine, - so we'll punt on hppa1.1 for now. - -2001-01-14 Pavel Roskin - - * config.guess: Don't use $version in the error message. Use - $timestamp instead. Minor changes in the error text. - -2001-01-12 Ben Elliston - - * config.guess: Delete $dummy.rel after compiling test programs on - PDP-10 systems whose compilers produce this output file. From Lars - Brinkhoff . - - * config.sub: Handle EMX on OS/2. From Pavel Roskin. - -2001-01-12 Ben Elliston - - * config.guess: Detect common kernels running on various PDP-10 - architectures. Contributed by Lars Brinkhoff . - * config.sub: Handle PDP-10. - -2001-01-10 Ben Elliston - - * config.guess: Detect LynxOS 3.x on PowerPC architectures. - -2001-01-07 Ben Elliston - - * config.sub: Recognise openrisc-*-*. - -2000-12-21 Ben Elliston - - * config.guess: Detect HP-UX on IA-64 hosts. From Jonathan - Thackray . - -2000-12-20 Pavel Roskin - - * config.sub: Handle mint with version number as recognized OS. - Contributed by Tomas Berndtsson . - -2000-12-20 Pavel Roskin - - * config.guess: Detect Fujitsu f700 machines. - * config.sub: Handle f700 and f700-fujitsu. - -2000-12-15 Ben Elliston - - * config.guess: Detect AIX version 5. Contributed by - Dan McNichol . - - * config.sub: Accept f301 for Fujitsu machines. - Reported by Pavel Roskin . - -2000-12-07 Ben Elliston - - * config.sub: Add more detail to version information. - * config.guess: Likewise. - -2000-12-06 Ben Elliston - - * config.sub: Add --version option. - * config.guess: Likewise. - -2000-12-02 Ben Elliston - - * config.guess: Only append "elf" to "netbsd" for platforms that - have switched to the ELF object file format in recent history. - From Matthew Green . - -2000-11-24 Nick Clifton - - * config.sub: Add xscale as a recognised CPU name. - -2000-11-23 Ben Elliston - - Patches from Akim Demaille . - * config.sub (version): Rename from this .. - (timestamp): .. to this. - (usage): Replace --version with --time-stamp. Add additional help - and copyleft notice. - (time-stamp-start): Replace with "timestamp=". - * config.guess (version): Rename from this .. - (timestamp): .. to this. - (usage): Replace --version with --time-stamp. Add additional help - and copyleft notice. - (CC_FOR_BUILD): Rework this logic. - (time-stamp-start): Replace with "timestamp=". - -2000-11-21 Ben Elliston - - * config.guess: Detect EMX on OS/2. Reported by Ilya Zakharevich - . - -2000-11-16 Ben Elliston - - * config.guess: Use getconf(1) on HP-UX 11.x systems (when - available) to eliminate the need for compiling a small test - program. From Neil Schellenberger . - -2000-11-15 Ben Elliston - - * config.sub: Expand `power' to `power-ibm-aix' for consistency. - From Kevin Ryde. - - * config.guess: Differentiate Cray T3D and T3E. From Kevin Ryde - . - -2000-11-10 Ben Elliston - - * config.sub: Map pentiumpro and pentiumii aliases onto i686-pc. - From Kevin Ryde . - - * config.guess: Search for a working C compiler if CC_FOR_BUILD is - not specified. From Kevin Ryde. - - * config.guess: Set CPU architecture to "hppa" by default, in case - tests fail to produce a result. From Kevin Ryde. - -2000-11-08 Ben Elliston - - * config.guess: Detect sparc-unknown-linux-gnu. Reported by Peter - Storkey . - -2000-11-02 Per Lundberg - - * config.sub: Add support for the *-storm-chaos OS. - -2000-10-25 Ed Satterthwaite - - * config.sub: NexGen, not nexen, is the x86 CPU clone - manufacturer. - -2000-10-23 Ben Elliston - - * config.guess: Detect NonStop-UX on Compaq MIPS machines. - * config.sub: Handle aliases for mips-compaq-nonstopux. - From Tom Bates . - -2000-10-12 Ben Elliston - - * config.guess: Detect GNU/Linux on HP PA-RISC systems. - From David Huggins-Daines . - -2000-10-09 Ben Elliston - - * config.sub: Typo fix for sh{3,4} case. - -2000-10-08 Ben Elliston - - * config.guess: Handle 8-way NCR 4300s -- uname(1) returns 3446A. - From Ken Cormack . - -2000-10-03 Ben Elliston - - * config.guess: Do not hold ld's output in a shell variable; feed - the output directly into the command pipline to avoid a limitation - in variable lengths in ash(1). From Pavel Roskin . - -2000-09-11 Ben Elliston - - * config.sub: Handle nsk*. - -2000-09-11 Philip Blundell - - * config.sub: Fix mistake in change of 2000-08-06. - -2000-09-05 Andreas Jaeger - - * config.sub (maybe_os): Recognise AMD x86-64 as x86_64. - * config.guess: Detect x86_64-unknown-linux-gnu. - -2000-09-05 Ben Elliston - - * config.guess: Handle Tandem NSR-K machines. - Reported by Andres Junge . - -2000-09-05 Paul Sokolovsky - - * config.guess: Detect the PW32 POSIX-on-Win32 environment. - * config.sub: Handle pw32 aliases. - -2000-08-31 Ben Elliston - - * config.guess: Correctly detect Sony NEWS-OS 6.x. - From Kimio Ishii . - -2000-08-06 Philip Blundell - - * config.sub: Accept `-conix*' as a valid OS. Accept `armv*' as a - valid CPU without a company name. - -2000-07-31 Mark Kettenis - - * config.guess: Restore detection of libc version for x86 - Linux/GNU ELF systems, but fall back on tentative name based on ld - emulation. Use i?86-pc-linux-gnu as tentative name since that's - the canonical name. - -2000-07-27 Ben Elliston - - * config.sub: Use "unknown" for the manufacturer field of Amiga - systems, not "cbm". Contributed by Ruediger Kuhlmann - . - * config.sub: Likewise. - -2000-07-24 Ben Elliston - - * config.guess: Detect Plan 9. - -2000-07-06 Andrew Cagney - - * config.sub: Recognise d30v as a valid basic_machine. - -2000-06-28 Ben Elliston - - * config.sub: Recognise Motorola 68HC11/12 targets. From Stephane - Carrez . - -2000-06-20 Ben Elliston - - * config.sub: Recognise tic54x (Texas Instruments TMS320C54x) and - c54x (IBM C54XDSP). From Tim Wall . - -2000-06-13 Ben Elliston - - * config.guess: Detect Minix on x86 machines. - * config.sub: Recognise i286. From . - - * config.sub: Recognise sh3 and sh4 aliases. From Kazumoto Kojima - . - - * config.sub: Per Bothner is not the author. - -2000-06-10 Hans-Peter Nilsson - - * config.sub (os): Recognize axis as manufacturer. - (basic_machine): Recognize cris and etrax* as cris-axis. - -2000-05-31 Ben Elliston - - * config.sub: Accept athlon as an i686 variant. From Philipp - Thomas . - -2000-05-30 Ben Elliston - - * config.guess: Re-word some output. - * config.sub: Fix a syntax error introduced by yesterday's - changes. Correct a spelling mistake. From Steven G. Johnson - . - -2000-05-02 Akim Demaille - - * config.guess: Add --help and --version options. Add Emacs hooks. - * config.sub: Likewise. - -2000-05-27 Ben Elliston - - * config.guess: Handle GNU/Linux on Hitachi SuperH. From Niibe - Yutaka . - -2000-05-19 Ben Elliston - - * config.sub: Recognise hppa64 as a valid cpu type. From Jeff Law. - -2000-05-10 Ben Elliston - - * config.sub: Recognise bs2000-siemens as a basic_machine type. - From Jean-Frederic Clere . - -2000-05-07 Ben Elliston - - * config.guess: Mac OS X will never return "Mac OS" as a uname - value, so remove these cases and punt to the "Darwin" case. - From Wilfredo Sanchez . - -2000-04-30 Ben Elliston - - * config.guess: Handle Fujitsu UXP/DS. From Fu-Chuan Tsai - . - -2000-04-26 Ben Elliston - - * config.guess: Handle an ld emulation of elf_i?86. From Bruce - Korb . - -2000-04-22 Ben Elliston - - * config.guess: Do not differentiate FreeBSD systems that use the - ELF object file format. From David O'Brien . - -2000-04-22 Ben Elliston - - * config.guess: Detect Siemens BS2000 machines. From Jean-Frederic - Clere . - -2000-04-22 Ben Elliston - - * config.guess: Fix a syntax error in the DG/UX test. - -2000-04-06 Ben Elliston - - * config.guess: Define _HPUX_SOURCE for the HP-UX test program. - From Bruno Haible . - -2000-04-06 Ben Elliston - - * config.guess: Detect Apple's Darwin operating system. - * config.sub: Handle an appropriate alias. From Assar Westerlund. - -2000-03-27 Ben Elliston - - * config.guess: Detect Ascend Embedded/OS, which is really BSDI. - From Assar Westerlund . - -2000-03-20 Ben Elliston - - * config.guess: Detect the NonStop Kernel on Tandem - machines. Suggested by Kelly F. Hickel . - * config.sub: Handle nsr-tandem and -nsk aliases. - -2000-02-29 Peter van der Veen - - * config.guess: Add support for QNX Neutrino. - * config.sub: Improve support for QNX Neutrino. - -2000-02-29 Ossama Othman - - * config.sub: Add support for QNX Neutrino. - -2000-02-24 Nick Clifton - - * config.sub: Support an OS of "wince". - -2000-02-15 Andrew Cagney - - * config.guess: Rewrite NetBSD code. Return *-*-netbsdelf* for - ELF systems and *-*-netbsd* for all others. Provide a guideline - for how to match a NetBSD tuple. - -2000-02-15 Richard Henderson - - * config.guess (alpha-osf, alpha-linux): Detect ev67. - * config.sub: Accept alphaev6[78], alphaev8. - -2000-02-15 Philip Blundell - - * config.guess: Distinguish arm-*-linux-gnuoldld from - arm*-linux-gnu. - -2000-02-15 Ben Elliston - - * config.sub: Handle avr. From Denis Chertykov . - - * config.guess: Detect GNU/Linux on IBM S/390 machines. - * config.sub: Handle s390-*. From Adam J. Thornton - . - - * config.guess: Detect MacOS X on PowerPC and other machines. - From Stephen G. Johnson . - -2000-02-08 John W. Eaton - - * config.sub: Recognize sv1-cray as a basic_machine type. - -2000-02-07 Ben Elliston - - * config.guess: Replace sub-minor system version number with an - `X' on certain Cray platforms. From Keith Thompson . - - * config.sub: Add support for mmix and mmixware. From Hans-Peter - Nilsson . - -2000-02-06 Ben Elliston - - * config.guess: Include when compiling test programs - with a C++ compiler. Function prototypes are mandatory in C++. - From Ossama Othman . - - * config.guess: Fix a regression in PowerPC Linux detection. - From Franz Sirl. - -2000-02-03 Ben Elliston - - * config.guess: Handle versions of DJGPP's uname(1) command which - return the exact machine type and not just `pc'. From Laurynas - Biveinis . - - * config.guess: Import from autoconf source tree. - * config.sub: Likewise. diff --git a/package/gnuconfig/Makefile b/package/gnuconfig/Makefile deleted file mode 100644 index ca366a98bd..0000000000 --- a/package/gnuconfig/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -UPLOAD=ftp://ftp-upload.gnu.org/incoming/ftp/ - -all: - @echo "Type 'make upload' to upload to the GNU FTP server." - -upload: - gpg --detach-sign config.guess - gpg --detach-sign config.sub - echo "directory: config" | gpg --clearsign > config.guess.directive.asc - cp config.guess.directive.asc config.sub.directive.asc - ftp -a -u $(UPLOAD) config.{guess,sub}{,.sig,.directive.asc} - rm config.{guess,sub}{.sig,.directive.asc} - -check: - cd testsuite && (sh config-sub.sh; sh config-guess.sh) && rm uname diff --git a/package/gnuconfig/README.buildroot b/package/gnuconfig/README.buildroot deleted file mode 100644 index 521f120b9b..0000000000 --- a/package/gnuconfig/README.buildroot +++ /dev/null @@ -1,16 +0,0 @@ ---- ABOUT --- -This isnt a real package, it just exists to easily update the -config.sub / config.guess files in packages to the latest version -(since many bundled ones don't support the latest possible targets) - ---- HOWTO --- -To use, just add this to your unpack rule in the package.mk: -$(CONFIG_UPDATE) $(PACKAGE_DIR)/ - ---- UPDATE --- -This is a CVS checkout of the config project, so just run `cvs up` -to get the latest config.sub / config.guess files. - -A few local customizations are used to support uClibc so you may -have to make sure they're still needed. The patches are broken -out in the patches/ dir to keep things simple. diff --git a/package/gnuconfig/config.guess b/package/gnuconfig/config.guess deleted file mode 100755 index ced32b63a1..0000000000 --- a/package/gnuconfig/config.guess +++ /dev/null @@ -1,1535 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2009-07-24' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -if [ "${UNAME_SYSTEM}" = "Linux" ] ; then - eval $set_cc_for_build - cat << EOF > $dummy.c - #include - #ifdef __UCLIBC__ - # ifdef __UCLIBC_CONFIG_VERSION__ - LIBC=uclibc __UCLIBC_CONFIG_VERSION__ - # else - LIBC=uclibc - # endif - #else - LIBC=gnu - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'` -fi - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T | authenticamd) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-${LIBC} - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-${LIBC} - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-${LIBC} - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-${LIBC} - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-${LIBC} - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-${LIBC} - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="gnulibc1" ; fi - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; - PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; - *) echo hppa-unknown-linux-${LIBC} ;; - esac - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-${LIBC} - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-${LIBC} - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-${LIBC} - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout" - exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld" - exit ;; - esac - # This should get integrated into the C code below, but now we hack - if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/package/gnuconfig/config.sub b/package/gnuconfig/config.sub deleted file mode 100755 index efbb230f47..0000000000 --- a/package/gnuconfig/config.sub +++ /dev/null @@ -1,1650 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2007-06-28' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - gnu*-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx | dvp \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]a*eb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mipsEE* | ee | ps2) - basic_machine=mips64r5900el-scei - case $os in - -linux*) - ;; - *) - os=-elf - ;; - esac - ;; - iop) - basic_machine=mipsel-scei - os=-irx - ;; - dvp) - basic_machine=dvp-scei - os=-elf - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -gnu*-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -irx*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/package/gnuconfig/gnuconfig.mk b/package/gnuconfig/gnuconfig.mk deleted file mode 100644 index b6aa5fc7de..0000000000 --- a/package/gnuconfig/gnuconfig.mk +++ /dev/null @@ -1,3 +0,0 @@ -# See README.buildroot -gnuconfig-source: -CONFIG_UPDATE = cp -f package/gnuconfig/config.sub package/gnuconfig/config.guess diff --git a/package/gnuconfig/patches/config.guess.uclibc.patch b/package/gnuconfig/patches/config.guess.uclibc.patch deleted file mode 100644 index 69d88a35af..0000000000 --- a/package/gnuconfig/patches/config.guess.uclibc.patch +++ /dev/null @@ -1,178 +0,0 @@ -Index: config.guess -=================================================================== -RCS file: /cvsroot/config/config/config.guess,v -retrieving revision 1.366 -diff -u -r1.366 config.guess ---- config.guess 17 May 2007 06:28:53 -0000 1.366 -+++ config.guess 9 Jul 2007 17:32:18 -0000 -@@ -139,6 +139,23 @@ - UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown - UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -+if [ "${UNAME_SYSTEM}" = "Linux" ] ; then -+ eval $set_cc_for_build -+ cat << EOF > $dummy.c -+ #include -+ #ifdef __UCLIBC__ -+ # ifdef __UCLIBC_CONFIG_VERSION__ -+ LIBC=uclibc __UCLIBC_CONFIG_VERSION__ -+ # else -+ LIBC=uclibc -+ # endif -+ #else -+ LIBC=gnu -+ #endif -+EOF -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'` -+fi -+ - # Note: order is significant - the case branches are not exclusive. - - case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in -@@ -833,28 +850,28 @@ - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - avr32*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - cris:Linux:*:*) -- echo cris-axis-linux-gnu -+ echo cris-axis-linux-${LIBC} - exit ;; - crisv32:Linux:*:*) -- echo crisv32-axis-linux-gnu -+ echo crisv32-axis-linux-${LIBC} - exit ;; - frv:Linux:*:*) -- echo frv-unknown-linux-gnu -+ echo frv-unknown-linux-${LIBC} - exit ;; - ia64:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - m32r*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - m68*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - mips:Linux:*:*) - eval $set_cc_for_build -@@ -877,7 +894,7 @@ - s: ::g - p - }'`" -- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build -@@ -900,16 +917,16 @@ - s: ::g - p - }'`" -- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } - ;; - or32:Linux:*:*) -- echo or32-unknown-linux-gnu -+ echo or32-unknown-linux-${LIBC} - exit ;; - ppc:Linux:*:*) -- echo powerpc-unknown-linux-gnu -+ echo powerpc-unknown-linux-${LIBC} - exit ;; - ppc64:Linux:*:*) -- echo powerpc64-unknown-linux-gnu -+ echo powerpc64-unknown-linux-${LIBC} - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -@@ -922,40 +939,40 @@ - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null -- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi -- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in -- PA7*) echo hppa1.1-unknown-linux-gnu ;; -- PA8*) echo hppa2.0-unknown-linux-gnu ;; -- *) echo hppa-unknown-linux-gnu ;; -+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; -+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; -+ *) echo hppa-unknown-linux-${LIBC} ;; - esac - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) -- echo hppa64-unknown-linux-gnu -+ echo hppa64-unknown-linux-${LIBC} - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sh*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - vax:Linux:*:*) -- echo ${UNAME_MACHINE}-dec-linux-gnu -+ echo ${UNAME_MACHINE}-dec-linux-${LIBC} - exit ;; - x86_64:Linux:*:*) -- echo x86_64-unknown-linux-gnu -+ echo x86_64-unknown-linux-${LIBC} - exit ;; - xtensa:Linux:*:*) -- echo xtensa-unknown-linux-gnu -+ echo xtensa-unknown-linux-${LIBC} - exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so -@@ -970,20 +987,22 @@ - p'` - case "$ld_supported_targets" in - elf32-i386) -- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" -+ TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}" - ;; - a.out-i386-linux) -- echo "${UNAME_MACHINE}-pc-linux-gnuaout" -+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout" - exit ;; - coff-i386) -- echo "${UNAME_MACHINE}-pc-linux-gnucoff" -+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. -- echo "${UNAME_MACHINE}-pc-linux-gnuoldld" -+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld" - exit ;; - esac -+ # This should get integrated into the C code below, but now we hack -+ if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c diff --git a/package/gnuconfig/patches/config.sub.gnuhurd-uclibc.patch b/package/gnuconfig/patches/config.sub.gnuhurd-uclibc.patch deleted file mode 100644 index 6fcdf811f5..0000000000 --- a/package/gnuconfig/patches/config.sub.gnuhurd-uclibc.patch +++ /dev/null @@ -1,20 +0,0 @@ -Index: config.sub -=================================================================== ---- config.sub (revision 20153) -+++ config.sub (working copy) -@@ -121,6 +121,7 @@ - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ -+ gnu*-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os -@@ -1237,6 +1238,7 @@ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ -+ | -gnu*-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ diff --git a/package/gnuconfig/patches/config.sub.ps2.patch b/package/gnuconfig/patches/config.sub.ps2.patch deleted file mode 100644 index ac8dbc68ad..0000000000 --- a/package/gnuconfig/patches/config.sub.ps2.patch +++ /dev/null @@ -1,50 +0,0 @@ -Index: config.sub -=================================================================== -RCS file: /cvsroot/config/config/config.sub,v -retrieving revision 1.356 -diff -u -r1.356 config.sub ---- config.sub 28 Jun 2007 06:56:43 -0000 1.356 -+++ config.sub 9 Jul 2007 17:43:32 -0000 -@@ -244,7 +244,7 @@ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ -- | d10v | d30v | dlx | dsp16xx \ -+ | d10v | d30v | dlx | dsp16xx | dvp \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ -@@ -694,6 +694,24 @@ - basic_machine=m68k-atari - os=-mint - ;; -+ mipsEE* | ee | ps2) -+ basic_machine=mips64r5900el-scei -+ case $os in -+ -linux*) -+ ;; -+ *) -+ os=-elf -+ ;; -+ esac -+ ;; -+ iop) -+ basic_machine=mipsel-scei -+ os=-irx -+ ;; -+ dvp) -+ basic_machine=dvp-scei -+ os=-elf -+ ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; -@@ -1226,7 +1244,7 @@ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ -- | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) -+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -irx*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) diff --git a/package/gnuconfig/patches/config.sub.sh.patch b/package/gnuconfig/patches/config.sub.sh.patch deleted file mode 100644 index c8727dff19..0000000000 --- a/package/gnuconfig/patches/config.sub.sh.patch +++ /dev/null @@ -1,39 +0,0 @@ -gnuconfig seems intent on only supporting superfluous targets that don't -represent any real hardware (such as sh2a LE). GCC in its infinite wisdom is -also incapable of supporting tuning for other variants in a sensible fashion. - -As such, we still need to be able to support such useful targets as -sh2a_nofpueb in order to not only get the byte order right, but also to -support -m2a-nofpu tuning from the kernel (though we tend to do this through --Wa,-isa= instead, as the binutils people do a much better job of not screwing -up their config code every other day. Way to go config.gcc..). - -The fact that the sh variant matching is the ugliest out of any of the other -architectures doesn't seem to deter GCC folk from their well thought out and -brilliantly managed config target list. - -Index: config.sub -=================================================================== -RCS file: /cvsroot/config/config/config.sub,v -retrieving revision 1.356 -diff -u -r1.356 config.sub ---- config.sub 28 Jun 2007 06:56:43 -0000 1.356 -+++ config.sub 9 Jul 2007 17:38:48 -0000 -@@ -277,7 +277,7 @@ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | score \ -- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ -+ | sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ -@@ -358,7 +358,7 @@ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ -- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ -+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]a*eb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ diff --git a/package/gnuconfig/patches/config.xtensa.glob.patch b/package/gnuconfig/patches/config.xtensa.glob.patch deleted file mode 100644 index 4b37aa77f8..0000000000 --- a/package/gnuconfig/patches/config.xtensa.glob.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff -rNdup config-orig/config.guess config/config.guess ---- config-orig/config.guess 2007-11-13 16:31:20.000000000 -0800 -+++ config/config.guess 2007-11-14 00:26:39.000000000 -0800 -@@ -954,8 +954,8 @@ EOF - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; -- xtensa:Linux:*:*) -- echo xtensa-unknown-linux-gnu -+ xtensa*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so -diff -rNdup config-orig/config.sub config/config.sub ---- config-orig/config.sub 2007-11-13 16:31:20.000000000 -0800 -+++ config/config.sub 2007-11-14 00:48:37.000000000 -0800 -@@ -369,10 +369,14 @@ case $basic_machine in - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ -- | xstormy16-* | xtensa-* \ -+ | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-*) - ;; -+ # Recognize the basic CPU types without company name, with glob match. -+ xtensa*) -+ basic_machine=$basic_machine-unknown -+ ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) -diff -rNdup config-orig/testsuite/config-sub.data config/testsuite/config-sub.data ---- config-orig/testsuite/config-sub.data 2007-11-13 15:56:17.000000000 -0800 -+++ config/testsuite/config-sub.data 2007-11-14 00:31:22.000000000 -0800 -@@ -109,6 +109,7 @@ fido-elf fido-unknown-elf - fido fido-unknown-none - xtensa-elf xtensa-unknown-elf - xtensa-linux xtensa-unknown-linux-gnu -+xtensa_dc232b-linux xtensa_dc232b-unknown-linux-gnu - i386-drops1.0 i386-pc-drops1.0 - mep mep-unknown-elf - mep-elf mep-unknown-elf diff --git a/package/gnuconfig/testsuite/.cvsignore b/package/gnuconfig/testsuite/.cvsignore deleted file mode 100644 index e4dcdcfaf6..0000000000 --- a/package/gnuconfig/testsuite/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -uname diff --git a/package/gnuconfig/testsuite/CVS/Entries b/package/gnuconfig/testsuite/CVS/Entries deleted file mode 100644 index 31b14765cd..0000000000 --- a/package/gnuconfig/testsuite/CVS/Entries +++ /dev/null @@ -1,7 +0,0 @@ -/.cvsignore/1.1/Mon Sep 26 07:33:33 2005// -/uname.in/1.1/Mon Sep 26 07:33:33 2005// -/config-guess.data/1.38/Thu Sep 20 16:47:13 2007// -/config-guess.sh/1.5/Thu Sep 20 16:47:13 2007// -/config-sub.data/1.47/Tue Aug 21 18:37:33 2007// -/config-sub.sh/1.3/Thu Sep 20 16:47:13 2007// -D diff --git a/package/gnuconfig/testsuite/CVS/Repository b/package/gnuconfig/testsuite/CVS/Repository deleted file mode 100644 index 5337292add..0000000000 --- a/package/gnuconfig/testsuite/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -config/testsuite diff --git a/package/gnuconfig/testsuite/CVS/Root b/package/gnuconfig/testsuite/CVS/Root deleted file mode 100644 index 192e02e93c..0000000000 --- a/package/gnuconfig/testsuite/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:pserver:anonymous@cvs.savannah.gnu.org:/cvsroot/config diff --git a/package/gnuconfig/testsuite/config-guess.data b/package/gnuconfig/testsuite/config-guess.data deleted file mode 100644 index 0d8210da6c..0000000000 --- a/package/gnuconfig/testsuite/config-guess.data +++ /dev/null @@ -1,34 +0,0 @@ -crisv32 2.6.6 Linux ignored crisv32-axis-linux-gnu -frv 2.4.24 Linux ignored frv-unknown-linux-gnu -3 2.3.3 XENIX SysV i386-pc-xenix -2064 ignored z/VM ignored s390-ibm-zvmoe -amd64 1.5.12(0.116/4/2) CYGWIN_NT-5.2 ignored x86_64-unknown-cygwin -crayx1 2.5.20 UNICOS/mp ignored craynv-cray-unicosmp2.5.X -NSE-N 1.0 NONSTOP_KERNEL ignored nse-tandem-nsk1.0 -i386 ignored VOS ignored i386-stratus-vos -arm ignored RISCOS ignored arm-unknown-riscos -arm ignored riscos ignored arm-unknown-riscos -i586 5.0.0 skyos ignored i586-pc-skyos5.0.0 -i786-pc ignored windows32 ignored i786-pc-mingw32 -or32 ignored Linux ignored or32-unknown-linux-gnu -x86_64 1.5.18(0.132/4/2) CYGWIN_NT-5.2 ignored x86_64-unknown-cygwin -x86 5.2 Interix ignored i586-pc-interix5.2 -ppc64 2.6.9-22 Linux ignored powerpc64-unknown-linux-gnu -vax 2.6.15 Linux ignored vax-dec-linux-gnu -i586 ignored rdos ignored i586-pc-rdos -pc98 7.0 FreeBSD ignored i386-unknown-freebsd7.0 -i586 1.0 SolidBSD ignored i586-unknown-solidbsd1.0 -i686 5.4-1-686 GNU/kFreeBSD ignored i686-unknown-kfreebsd5.4-gnu -EM64T 5.2 Interix ignored x86_64-unknown-interix5.2 -amd64 5.2 FreeBSD ignored x86_64-unknown-freebsd5.2 -avr32 2.6.15 Linux ignored avr32-unknown-linux-gnu -x86 6.0 Interix ignored i586-pc-interix6.0 -macppc 1.0 MirBSD ignored powerpc-unknown-mirbsd1.0 -authenticamd 6.0 Interix ignored x86_64-unknown-interix6.0 -SX-8 1.0 SUPER-UX ignored sx8-nec-superux1.0 -SX-7 1.0 SUPER-UX ignored sx7-nec-superux1.0 -xtensa 2.6.15 Linux ignored xtensa-unknown-linux-gnu -x86_64 1.0 MINGW ignored x86_64-pc-mingw32 -i386 1.0 MINGW ignored i386-pc-mingw32 -SX-8R 1.0 SUPER-UX ignored sx8r-nec-superux1.0 -i86xen 5.6 SunOS ignored i386-pc-solaris2.6 diff --git a/package/gnuconfig/testsuite/config-guess.sh b/package/gnuconfig/testsuite/config-guess.sh deleted file mode 100644 index 324f275e38..0000000000 --- a/package/gnuconfig/testsuite/config-guess.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -# -# Copyright 2004, 2005 Free Software Foundation, Inc. -# Contributed by Ben Elliston . -# -# This test reads 5-tuples from config-guess.data: the components of -# the simulated uname(1) output and the expected GNU system triplet. - -verbose=false -export PATH=`pwd`:$PATH -IFS=" " # tab - -run_config_guess () -{ - rc=0 - while read machine release system version triplet ; do - sed \ - -e "s,@MACHINE@,$machine," \ - -e "s,@RELEASE@,$release," \ - -e "s,@SYSTEM@,$system," \ - -e "s,@VERSION@,$version," < uname.in > uname - chmod +x uname - output=`sh ../config.guess 2>/dev/null` - if test $? != 0 ; then - echo "FAIL: unable to guess $machine:$release:$system:$version" - rc=1 - continue - fi - if test $output != $triplet ; then - echo "FAIL: $output (expected $triplet)" - rc=1 - continue - fi - $verbose && echo "PASS: $triplet" - done - return $rc -} - -sed 's/ */ /g' < config-guess.data | run_config_guess -rc=$? -if test $rc -eq 0 ; then - $verbose || echo "PASS: config.guess checks" -else - test $rc -eq 1 && echo "Unexpected failures." -fi - -exit $rc diff --git a/package/gnuconfig/testsuite/config-sub.data b/package/gnuconfig/testsuite/config-sub.data deleted file mode 100644 index 2a5e1f1ebc..0000000000 --- a/package/gnuconfig/testsuite/config-sub.data +++ /dev/null @@ -1,117 +0,0 @@ -arm-coff arm-unknown-coff -arm-elf arm-unknown-elf -sun3 m68k-sun-sunos4.1.1 -sun4 sparc-sun-sunos4.1.1 -ibm i370-ibm-aix -i386-os2 i386-pc-os2 -os400 powerpc-ibm-os400 -mmix mmix-knuth-mmixware -mmix-elf mmix-knuth-elf -i386-linux i386-pc-linux-gnu -i386-netbsd i386-pc-netbsd -i386-openbsd i386-pc-openbsd -i386-freebsd i386-pc-freebsd -pc98-freebsd i386-pc-freebsd -i386-elf i386-pc-elf -i486-elf i486-pc-elf -i586-elf i586-pc-elf -i686-elf i686-pc-elf -i786-elf i786-pc-elf -amd64-unknown-freebsd5.2 x86_64-unknown-freebsd5.2 -cris-linux cris-axis-linux-gnu -crisv32-linux crisv32-axis-linux-gnu -frv-linux frv-unknown-linux-gnu -djgpp i586-pc-msdosdjgpp -s390-ibm-zvmoe s390-ibm-zvmoe -xscale xscale-unknown-none -xscaleeb xscaleeb-unknown-none -xscaleel xscaleel-unknown-none -xbox i686-pc-mingw32 -maxq maxq-unknown-none -maxq-elf maxq-unknown-elf -amd64-cygwin x86_64-pc-cygwin -x86_64-cygwin x86_64-pc-cygwin -sparc64-linux sparc64-unknown-linux-gnu -sparc64b-linux sparc64b-unknown-linux-gnu -bfin-elf bfin-unknown-elf -bfin bfin-unknown-none -arm-riscos arm-unknown-riscos -arm-unknown-riscos arm-unknown-riscos -i586-skyos i586-pc-skyos -m32c m32c-unknown-none -m32c-elf m32c-unknown-elf -ms1 mt-unknown-none -ms1-elf mt-unknown-elf -mips64vr5900-elf mips64vr5900-unknown-elf -mips64vr5900el-elf mips64vr5900el-unknown-elf -mips64vr5900 mips64vr5900-unknown-elf -mips64vr5900el mips64vr5900el-unknown-elf -sh64 sh64-unknown-none -sh64-elf sh64-unknown-elf -openrisc-linux or32-unknown-linux-gnu -or32-linux or32-unknown-linux-gnu -sh-elf sh-unknown-elf -sh1-elf sh1-unknown-elf -sh2-elf sh2-unknown-elf -sh3-elf sh3-unknown-elf -sh4-elf sh4-unknown-elf -sh2a-elf sh2a-unknown-elf -sh4a-elf sh4a-unknown-elf -sh2e-elf sh2e-unknown-elf -sh3e-elf sh3e-unknown-elf -sh3eb-elf sh3eb-unknown-elf -sh4eb-elf sh4eb-unknown-elf -sheb-elf sheb-unknown-elf -shbe-elf shbe-unknown-elf -shle-elf shle-unknown-elf -sh1le-elf sh1le-unknown-elf -sh2le-elf sh2le-unknown-elf -sh3le-elf sh3le-unknown-elf -sh4le-elf sh4le-unknown-elf -sh3ele-elf sh3ele-unknown-elf -i386-haiku i386-pc-haiku -sparc-haiku sparc-unknown-haiku -powerpc-haiku powerpc-unknown-haiku -i386-pc-sco6 i386-pc-sco5v6 -i386-pc-sco5v6 i386-pc-sco5v6 -mt mt-unknown-none -mt-elf mt-unknown-elf -rdos i386-pc-rdos -i586-rdos i586-pc-rdos -i386-linux-newlib i386-pc-linux-newlib -mb-elf mb-unknown-elf -microblaze-elf microblaze-unknown-elf -i386-solidbsd i386-pc-solidbsd -amd64-kfreebsd5.4-gnu x86_64-pc-kfreebsd5.4-gnu -nios nios-unknown-none -nios2 nios2-unknown-none -nios-elf nios-unknown-elf -nios2-elf nios2-unknown-elf -sparcv9v-elf sparcv9v-unknown-elf -sparc64v-elf sparc64v-unknown-elf -sparcv9v-solaris2.9 sparcv9v-unknown-solaris2.9 -sparc64v-solaris2.9 sparc64v-unknown-solaris2.9 -sh-toppers sh-unknown-toppers -spu spu-unknown-elf -spu-elf spu-unknown-elf -spu-linux spu-unknown-linux-gnu -avr32 avr32-unknown-none -avr32-linux avr32-unknown-linux-gnu -xc16x xc16x-unknown-none -xc16x-elf xc16x-unknown-elf -sde-elf mipsisa32-sde-elf -mips-sde-elf mips-sde-elf -score score-unknown-elf -score-elf score-unknown-elf -sh5el-elf sh5le-unknown-elf -sh5el-netbsd sh5le-unknown-netbsd -fido-elf fido-unknown-elf -fido fido-unknown-none -xtensa-elf xtensa-unknown-elf -xtensa-linux xtensa-unknown-linux-gnu -xtensa_dc232b-linux xtensa_dc232b-unknown-linux-gnu -i386-drops1.0 i386-pc-drops1.0 -mep mep-unknown-elf -mep-elf mep-unknown-elf -mingw32ce arm-unknown-mingw32ce -arm-mingw32ce arm-unknown-mingw32ce diff --git a/package/gnuconfig/testsuite/config-sub.sh b/package/gnuconfig/testsuite/config-sub.sh deleted file mode 100644 index ab5d7ff667..0000000000 --- a/package/gnuconfig/testsuite/config-sub.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# -# Copyright 2004, 2005 Free Software Foundation, Inc. -# Contributed by Ben Elliston . -# -# This test reads pairs from config-sub.data: an alias and its -# canonical triplet. The config.sub scripts is invoked and the test -# checks that the alias expands to the expected canonical triplet. - -verbose=false - -run_config_sub () -{ - rc=0 - while read alias canonical ; do - output=`sh ../config.sub $alias` - if test $output != $canonical ; then - echo "FAIL: $alias -> $output, but expected $canonical" - rc=1 - else - $verbose && echo "PASS: $alias" - fi - done < config-sub.data - return $rc -} - -run_config_sub -rc=$? -if test $rc -eq 0 ; then - $verbose || echo "PASS: config.sub checks" -else - test $rc -eq 1 && echo "Unexpected failures." -fi - -exit $rc diff --git a/package/gnuconfig/testsuite/uname.in b/package/gnuconfig/testsuite/uname.in deleted file mode 100755 index d44d15f041..0000000000 --- a/package/gnuconfig/testsuite/uname.in +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# uname(1) simulator, inspired by Pavel Roskin. - -[ $# -ne 1 ] && exec sh $0 -s -[ $1 = -m ] && echo "@MACHINE@" && exit 0 -[ $1 = -r ] && echo "@RELEASE@" && exit 0 -[ $1 = -s ] && echo "@SYSTEM@" && exit 0 -[ $1 = -v ] && echo "@VERSION@" && exit 0 -[ $1 = -p ] && echo "Pentium III(TM)-ISA/PCI" diff --git a/package/gnuconfig/uname b/package/gnuconfig/uname deleted file mode 100755 index 0627f8204c..0000000000 --- a/package/gnuconfig/uname +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# uname(1) simulator, inspired by Pavel Roskin. - -[ $# -ne 1 ] && exec sh $0 -s -[ $1 = -m ] && echo 4400 -[ $1 = -r ] && echo 4.0 -[ $1 = -s ] && echo iainfo2 -[ $1 = -v ] && echo 3.0 -[ $1 = -p ] && echo "Pentium III(TM)-ISA/PCI" - -exit 0 diff --git a/package/gnupg/Config.in b/package/gnupg/Config.in new file mode 100644 index 0000000000..90f07c24c6 --- /dev/null +++ b/package/gnupg/Config.in @@ -0,0 +1,40 @@ +config BR2_PACKAGE_GNUPG + bool "gnupg" + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_NCURSES + help + GnuPG is the GNU project's complete and free implementation + of the OpenPGP standard as defined by RFC4880. GnuPG allows + to encrypt and sign your data and communication, features a + versatile key management system as well as access modules + for all kinds of public key directories. GnuPG, also known + as GPG, is a command line tool with features for easy + integration with other applications. + + http://gnupg.org/ + +if BR2_PACKAGE_GNUPG + +config BR2_PACKAGE_GNUPG_RSA + bool "RSA support" + help + Support for RSA public key algorithm + +config BR2_PACKAGE_GNUPG_GPGV + bool "gpgv" + help + gpgv is an OpenPGP signature verification tool. + + This program is actually a stripped-down version of gpg + which is only able to check signatures. It is somewhat + smaller than the fully-blown gpg and uses a different (and + simpler) way to check that the public keys used to make the + signature are valid. There are no configuration files and + only a few options are implemented. + +config BR2_PACKAGE_GNUPG_GPGSPLIT + bool "gpgsplit" + help + gpgsplit splits an OpenPGP message into packets. + +endif diff --git a/package/gnupg/gnupg-mips64-build-fix.patch b/package/gnupg/gnupg-mips64-build-fix.patch new file mode 100644 index 0000000000..014435c142 --- /dev/null +++ b/package/gnupg/gnupg-mips64-build-fix.patch @@ -0,0 +1,20 @@ +Fix build issue on MIPS64 + +On MIPS64, there is a syntax problem in the preprocessor +conditions. Fix that to avoid a build failure. + +Signed-off-by: Thomas Petazzoni + +Index: b/mpi/longlong.h +=================================================================== +--- a/mpi/longlong.h ++++ b/mpi/longlong.h +@@ -752,7 +752,7 @@ + (w1) = _r >> 64; \ + (w0) = (UDItype) _r; \ + } while (0) +-# elif if __GNUC__ > 2 || __GNUC_MINOR__ >= 7 ++# elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7 + # define umul_ppmm(w1, w0, u, v) \ + __asm__ ("dmultu %2,%3" \ + : "=l" ((UDItype)(w0)), \ diff --git a/package/gnupg/gnupg.mk b/package/gnupg/gnupg.mk new file mode 100644 index 0000000000..28f1f4374e --- /dev/null +++ b/package/gnupg/gnupg.mk @@ -0,0 +1,55 @@ +################################################################################ +# +# gnupg +# +################################################################################ + +GNUPG_VERSION = 1.4.15 +GNUPG_SOURCE = gnupg-$(GNUPG_VERSION).tar.bz2 +GNUPG_SITE = ftp://ftp.gnupg.org/gcrypt/gnupg +GNUPG_LICENSE = GPLv3+ +GNUPG_LICENSE_FILES = COPYING +GNUPG_DEPENDENCIES = zlib ncurses +GNUPG_CONF_ENV = ac_cv_sys_symbol_underscore=no +GNUPG_CONF_OPT = --disable-rpath --enable-minimal --disable-regex + +ifeq ($(BR2_PACKAGE_BZIP2),y) +GNUPG_CONF_OPT += --enable-bzip2 +GNUPG_DEPENDENCIES += bzip2 +endif + +ifeq ($(BR2_PACKAGE_LIBCURL),y) +GNUPG_CONF_ENV += ac_cv_path__libcurl_config=$(STAGING_DIR)/usr/bin/curl-config +GNUPG_DEPENDENCIES += libcurl +else +GNUPG_CONF_OPT += --without-libcurl +endif + +ifeq ($(BR2_PACKAGE_READLINE),y) +GNUPG_DEPENDENCIES += readline +else +GNUPG_CONF_OPT += --without-readline +endif + +ifeq ($(BR2_PACKAGE_GNUPG_RSA),y) +GNUPG_CONF_OPT += --enable-rsa +else +GNUPG_CONF_OPT += --disable-rsa +endif + +ifneq ($(BR2_PACKAGE_GNUPG_GPGV),y) +define GNUPG_REMOVE_GPGV + rm -f $(TARGET_DIR)/usr/bin/gpgv \ + $(TARGET_DIR)/usr/share/man/man1/gpgv.1 +endef +GNUPG_POST_INSTALL_TARGET_HOOKS += GNUPG_REMOVE_GPGV +endif + +ifneq ($(BR2_PACKAGE_GNUPG_GPGSPLIT),y) +define GNUPG_REMOVE_GPGSPLIT + rm -f $(TARGET_DIR)/usr/bin/gpgsplit +endef +GNUPG_POST_INSTALL_TARGET_HOOKS += GNUPG_REMOVE_GPGSPLIT +endif + +$(eval $(autotools-package)) diff --git a/package/gnuplot/Config.in b/package/gnuplot/Config.in new file mode 100644 index 0000000000..603c194fe5 --- /dev/null +++ b/package/gnuplot/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_GNUPLOT + bool "gnuplot" + help + A portable command-line driven graphing utility. + + http://www.gnuplot.info/ diff --git a/package/gnuplot/gnuplot-0001-configure-add-without-demo-option.patch b/package/gnuplot/gnuplot-0001-configure-add-without-demo-option.patch new file mode 100644 index 0000000000..ccca4e3aa7 --- /dev/null +++ b/package/gnuplot/gnuplot-0001-configure-add-without-demo-option.patch @@ -0,0 +1,66 @@ +Add options to enable/disable docs and demos + +Originally written by Anthony Viallard +. + +Signed-off-by: Thomas Petazzoni + +Index: gnuplot-4.6.0/configure.in +=================================================================== +--- gnuplot-4.6.0.orig/configure.in 2012-03-08 05:34:42.000000000 +0100 ++++ gnuplot-4.6.0/configure.in 2013-01-07 11:50:03.003804463 +0100 +@@ -748,6 +748,16 @@ + AC_ARG_WITH(lisp-files,dnl + [ --without-lisp-files do not build emacs lisp files]) + ++dnl Whether we want to build the demo files ++dnl Does nothing here, is passed on to the demo subdir ++AC_ARG_ENABLE(demo,dnl ++[ --disable-demo do not build demo files]) ++ ++dnl Whether we want to build the doc files ++dnl Does nothing here, is passed on to the doc subdir ++AC_ARG_ENABLE(doc,dnl ++[ --disable-doc do not build doc files]) ++ + dnl Sort help/subtopic tables by row or column + AC_ARG_WITH(row-help,dnl + [ --with-row-help format help and subtopic tables by row (default) +@@ -1200,6 +1210,24 @@ + fi + AC_SUBST(LISPDIR) + ++dnl build demo files ++if test "$enable_demo" != no; then ++ AC_CONFIG_SUBDIRS(demo) ++ DEMOSUBDIR=demo ++else ++ DEMOSUBDIR= ++fi ++AC_SUBST(DEMOSUBDIR) ++ ++dnl build doc files ++if test "$enable_doc" != no; then ++ AC_CONFIG_SUBDIRS(docs) ++ DOCSUBDIR=docs ++else ++ DOCSUBDIR= ++fi ++AC_SUBST(DOCSUBDIR) ++ + dnl Substitute variables + AC_SUBST(PACKAGE) + AC_SUBST(VERSION_MAJOR) +Index: gnuplot-4.6.0/Makefile.am +=================================================================== +--- gnuplot-4.6.0.orig/Makefile.am 2013-01-04 14:07:02.239120935 +0100 ++++ gnuplot-4.6.0/Makefile.am 2013-01-07 11:51:12.034846363 +0100 +@@ -1,7 +1,7 @@ + ## Process this file with automake to produce Makefile.in -*-Makefile-*- + AUTOMAKE_OPTIONS = foreign 1.2h + +-SUBDIRS = config m4 term src docs $(LISPDIR) man demo tutorial share ++SUBDIRS = config m4 term src $(DOCSUBDIR) $(LISPDIR) man $(DEMOSUBDIR) tutorial share + + EXTRA_DIST = BUGS CodeStyle Copyright FAQ.pdf GNUmakefile INSTALL INSTALL.gnu \ + Makefile.maint PATCHLEVEL PGPKEYS PORTING README README.1ST \ diff --git a/package/gnuplot/gnuplot-0002-use-gdlib-config-properly.patch b/package/gnuplot/gnuplot-0002-use-gdlib-config-properly.patch new file mode 100644 index 0000000000..690a82652a --- /dev/null +++ b/package/gnuplot/gnuplot-0002-use-gdlib-config-properly.patch @@ -0,0 +1,27 @@ +Fix usage of gdlib-config + +gnuplot configure.in script properly takes care of finding +gdlib-config using AC_PATH_PROG... but then directly uses gdlib-config +instead of going through the GDLIB_CONFIG variable that AC_PATH_PROG +has defined. Which means that whenever a gdlib-config binary not in +the PATH is being used, it does not use it. + +Signed-off-by: Thomas Petazzoni + +Index: b/configure.in +=================================================================== +--- a/configure.in ++++ b/configure.in +@@ -537,9 +537,9 @@ + if test "$with_gd" != no; then + AC_PATH_PROG([GDLIB_CONFIG], [gdlib-config]) + if test -n "$GDLIB_CONFIG"; then +- libgd_CPPFLAGS=`gdlib-config --cflags` +- libgd_LDFLAGS=`gdlib-config --ldflags` +- libgd_LIBS=`gdlib-config --libs` ++ libgd_CPPFLAGS=`$GDLIB_CONFIG --cflags` ++ libgd_LDFLAGS=`$GDLIB_CONFIG --ldflags` ++ libgd_LIBS=`$GDLIB_CONFIG --libs` + elif test -d "$with_gd"; then + libgd_CPPFLAGS="-I$with_gd/include" + libgd_LDFLAGS="-L$with_gd/lib" diff --git a/package/gnuplot/gnuplot.mk b/package/gnuplot/gnuplot.mk new file mode 100644 index 0000000000..d5fe01c8e2 --- /dev/null +++ b/package/gnuplot/gnuplot.mk @@ -0,0 +1,50 @@ +################################################################################ +# +# gnuplot +# +################################################################################ + +GNUPLOT_VERSION = 4.6.2 +GNUPLOT_SITE = http://downloads.sourceforge.net/project/gnuplot/gnuplot/$(GNUPLOT_VERSION) +GNUPLOT_LICENSE = gnuplot license (open source) +GNUPLOT_LICENSE_FILES = Copyright + +GNUPLOT_AUTORECONF = YES + +GNUPLOT_CONF_OPT = --without-x \ + --disable-raise-console \ + --disable-mouse \ + --without-tutorial \ + --disable-demo \ + --without-row-help \ + --disable-history-file \ + --without-lisp-files \ + --disable-wxwidgets \ + --without-lua \ + --without-latex \ + --without-cairo + +ifeq ($(BR2_PACKAGE_GD)$(BR2_PACKAGE_LIBPNG),yy) +GNUPLOT_CONF_OPT += --with-gd +GNUPLOT_DEPENDENCIES += gd +GNUPLOT_CONF_ENV += \ + ac_cv_path_GDLIB_CONFIG=$(STAGING_DIR)/usr/bin/gdlib-config +else +GNUPLOT_CONF_OPT += --without-gd +endif + +ifeq ($(BR2_PACKAGE_READLINE),y) +GNUPLOT_CONF_OPT += --with-readline=gnu +GNUPLOT_DEPENDENCIES += readline +else +GNUPLOT_CONF_OPT += --without-readline +endif + +# Remove Javascript scripts, lua scripts, PostScript files +define GNUPLOT_REMOVE_UNNEEDED_FILES + $(RM) -rf $(TARGET_DIR)/usr/share/gnuplot +endef + +GNUPLOT_POST_INSTALL_TARGET_HOOKS += GNUPLOT_REMOVE_UNNEEDED_FILES + +$(eval $(autotools-package)) diff --git a/package/gnutls/Config.in b/package/gnutls/Config.in new file mode 100644 index 0000000000..d2648d06b4 --- /dev/null +++ b/package/gnutls/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_GNUTLS + bool "gnutls" + select BR2_PACKAGE_NETTLE + select BR2_PACKAGE_PCRE + depends on BR2_USE_WCHAR + help + GnuTLS is a secure communications library implementing the SSL + and TLS protocols and technologies around them. + + http://www.gnutls.org + +config BR2_PACKAGE_GNUTLS_TOOLS + bool "install tools" + depends on BR2_PACKAGE_GNUTLS + help + Install GnuTLS command line tools for various cryptographic tasks. + +comment "gnutls needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/gnutls/gnutls.mk b/package/gnutls/gnutls.mk new file mode 100644 index 0000000000..1e3e267223 --- /dev/null +++ b/package/gnutls/gnutls.mk @@ -0,0 +1,66 @@ +################################################################################ +# +# gnutls +# +################################################################################ + +GNUTLS_VERSION = 3.2.5 +GNUTLS_SOURCE = gnutls-$(GNUTLS_VERSION).tar.xz +GNUTLS_SITE = ftp://ftp.gnutls.org/gcrypt/gnutls/v3.2 +GNUTLS_LICENSE = GPLv3+ LGPLv2.1+ +GNUTLS_LICENSE_FILES = COPYING COPYING.LESSER +GNUTLS_DEPENDENCIES = host-pkgconf nettle pcre \ + $(if $(BR2_PACKAGE_P11_KIT),p11-kit) \ + $(if $(BR2_PACKAGE_LIBIDN),libidn) \ + $(if $(BR2_PACKAGE_LIBTASN1),libtasn1) \ + $(if $(BR2_PACKAGE_ZLIB),zlib) +GNUTLS_CONF_OPT = --with-libnettle-prefix=$(STAGING_DIR)/usr --disable-rpath \ + --disable-doc --disable-guile +GNUTLS_CONF_ENV = gl_cv_socket_ipv6=$(if $(BR2_INET_IPV6),yes,no) \ + ac_cv_header_wchar_h=$(if $(BR2_USE_WCHAR),yes,no) \ + gt_cv_c_wchar_t=$(if $(BR2_USE_WCHAR),yes,no) \ + gt_cv_c_wint_t=$(if $(BR2_USE_WCHAR),yes,no) \ + gl_cv_func_gettimeofday_clobber=no +GNUTLS_INSTALL_STAGING = YES + +# libpthread autodetection poisons the linkpath +GNUTLS_CONF_OPT += $(if $(BR2_TOOLCHAIN_HAS_THREADS),--with-libpthread-prefix=$(STAGING_DIR)/usr) + +# gnutls needs libregex, but pcre can be used too +# The check isn't cross-compile friendly +define GNUTLS_LIBREGEX_CHECK_FIX + $(SED) 's/libopts_cv_with_libregex=no/libopts_cv_with_libregex=yes/g;'\ + $(@D)/configure +endef +GNUTLS_PRE_CONFIGURE_HOOKS += GNUTLS_LIBREGEX_CHECK_FIX +GNUTLS_CONF_OPT += --with-regex-header=pcreposix.h \ + --with-libregex-cflags="`$(PKG_CONFIG_HOST_BINARY) libpcreposix --cflags`" \ + --with-libregex-libs="`$(PKG_CONFIG_HOST_BINARY) libpcreposix --libs`" + +# Consider crywrap as part of tools because it needs WCHAR, and it's so too +ifeq ($(BR2_PACKAGE_GNUTLS_TOOLS),) + GNUTLS_CONF_OPT += --disable-crywrap +endif + +# libidn support for nommu must exclude the crywrap wrapper (uses fork) +GNUTLS_CONF_OPT += $(if $(BR2_USE_MMU),,--disable-crywrap) + +ifeq ($(BR2_PACKAGE_CRYPTODEV_LINUX),y) + GNUTLS_CONF_OPT += --enable-cryptodev + GNUTLS_DEPENDENCIES += cryptodev-linux +endif + +# Some examples in doc/examples use wchar +define GNUTLS_DISABLE_DOCS + $(SED) 's/ doc / /' $(@D)/Makefile.in +endef + +define GNUTLS_DISABLE_TOOLS + $(SED) 's/\$$(PROGRAMS)//' $(@D)/src/Makefile.in + $(SED) 's/) install-exec-am/)/' $(@D)/src/Makefile.in +endef + +GNUTLS_POST_PATCH_HOOKS += GNUTLS_DISABLE_DOCS +GNUTLS_POST_PATCH_HOOKS += $(if $(BR2_PACKAGE_GNUTLS_TOOLS),,GNUTLS_DISABLE_TOOLS) + +$(eval $(autotools-package)) diff --git a/package/gob2/Config.in b/package/gob2/Config.in index 562ac3123c..092d51bcbf 100644 --- a/package/gob2/Config.in +++ b/package/gob2/Config.in @@ -1,9 +1,10 @@ config BR2_PACKAGE_GOB2 bool "gob2" depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # bison, glib2 select BR2_PACKAGE_LIBGLIB2 select BR2_PACKAGE_FLEX - select BR2_PACKAGE_FLEX_LIBFL select BR2_PACKAGE_BISON help GOB (GTK+ Object Builder) is a preprocessor which simplifies @@ -11,5 +12,6 @@ config BR2_PACKAGE_GOB2 http://www.jirka.org/gob.html -comment "gob2 requires a toolchain with WCHAR support" - depends on !BR2_USE_WCHAR +comment "gob2 needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/gob2/gob2.mk b/package/gob2/gob2.mk index 04b3798f79..9f6cc3ed58 100644 --- a/package/gob2/gob2.mk +++ b/package/gob2/gob2.mk @@ -1,19 +1,16 @@ -############################################################# +################################################################################ # # gob2 # -############################################################# -GOB2_VERSION = 2.0.15 -GOB2_SOURCE = gob2-$(GOB2_VERSION).tar.gz -GOB2_SITE = http://ftp.5z.com/pub/gob/ -IPERF_CONF_ENV = ac_cv_lib_lex=-lfl +################################################################################ -GOB2_DEPENDENCIES = libglib2 flex bison host-pkg-config host-flex +GOB2_VERSION = 2.0.18 +GOB2_SITE = http://ftp.5z.com/pub/gob +GOB2_DEPENDENCIES = libglib2 flex bison host-pkgconf host-flex +HOST_GOB2_DEPENDENCIES = host-bison host-flex host-libglib2 -HOST_GOB2_DEPENDENCIES = host-libglib2 - -$(eval $(call AUTOTARGETS,package,gob2)) -$(eval $(call AUTOTARGETS,package,gob2,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) # gob2 for the host -GOB2_HOST_BINARY:=$(HOST_DIR)/usr/bin/gob2 +GOB2_HOST_BINARY = $(HOST_DIR)/usr/bin/gob2 diff --git a/package/googlefontdirectory/Config.in b/package/googlefontdirectory/Config.in new file mode 100644 index 0000000000..872fe2739d --- /dev/null +++ b/package/googlefontdirectory/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_GOOGLEFONTDIRECTORY + bool "Google font directory" + help + Google font directory + + http://code.google.com/p/googlefontdirectory/ + +config BR2_PACKAGE_GOOGLEFONTDIRECTORY_FONTS + string "List of fonts to install" + default "droid" + depends on BR2_PACKAGE_GOOGLEFONTDIRECTORY + help + Specify a space-separated list of fonts to install diff --git a/package/googlefontdirectory/googlefontdirectory.mk b/package/googlefontdirectory/googlefontdirectory.mk new file mode 100644 index 0000000000..65ad29fda7 --- /dev/null +++ b/package/googlefontdirectory/googlefontdirectory.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# googlefontdirectory +# +################################################################################ + +GOOGLEFONTDIRECTORY_SITE = \ + https://s3.amazonaws.com/joemaller_google_webfonts +GOOGLEFONTDIRECTORY_SOURCE = googlewebfonts.tgz +GOOGLEFONTDIRECTORY_LICENSE = OFLv1.1 + +GOOGLEFONTDIRECTORY_FONTS = \ + $(call qstrip,$(BR2_PACKAGE_GOOGLEFONTDIRECTORY_FONTS)) + +define GOOGLEFONTDIRECTORY_INSTALL_TARGET_CMDS + for i in $(GOOGLEFONTDIRECTORY_FONTS); \ + do \ + $(INSTALL) -d $(TARGET_DIR)/usr/share/fonts/$$i && \ + $(INSTALL) -m 0644 -t $(TARGET_DIR)/usr/share/fonts/$$i $(@D)/$$i/*.ttf; \ + done +endef + +define GOOGLEFONTDIRECTORY_UNINSTALL_TARGET_CMDS + rm -rf $(addprefix $(TARGET_DIR)/usr/share/fonts/,$(GOOGLEFONTDIRECTORY_FONTS)) +endef + +$(eval $(generic-package)) diff --git a/package/gperf/Config.in b/package/gperf/Config.in index 67b286b9aa..e6d51fca72 100644 --- a/package/gperf/Config.in +++ b/package/gperf/Config.in @@ -6,5 +6,5 @@ config BR2_PACKAGE_GPERF http://www.gnu.org/software/gperf/ -comment "gperf requires a toolchain with C++ support enabled" +comment "gperf needs a toolchain w/ C++" depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/gperf/gperf.mk b/package/gperf/gperf.mk index 3593637ac7..8ce3c95ffb 100644 --- a/package/gperf/gperf.mk +++ b/package/gperf/gperf.mk @@ -1,11 +1,13 @@ -############################################################# +################################################################################ # # gperf # -############################################################# +################################################################################ GPERF_VERSION = 3.0.4 GPERF_SITE = $(BR2_GNU_MIRROR)/gperf +GPERF_LICENSE = GPLv3+ +GPERF_LICENSE_FILES = COPYING -$(eval $(call AUTOTARGETS,package,gperf)) -$(eval $(call AUTOTARGETS,package,gperf,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/gpsd/Config.in b/package/gpsd/Config.in index 5e60bb0d67..2fd97d00d4 100644 --- a/package/gpsd/Config.in +++ b/package/gpsd/Config.in @@ -1,11 +1,20 @@ +comment "gpsd needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS + config BR2_PACKAGE_GPSD bool "gpsd" + # Uses fork() + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_THREADS help gpsd is a service daemon that monitors one or more GPSes or AIS receivers attached to a host computer through serial or USB ports, making all data on the location/course/velocity of the sensors available to be queried on TCP port 2947 of the host computer. + The D-Bus interface is included if dbus-glib is enabled. + http://gpsd.berlios.de/ config BR2_PACKAGE_GPSD_DEVICES @@ -16,9 +25,6 @@ config BR2_PACKAGE_GPSD_DEVICES menu "Features" depends on BR2_PACKAGE_GPSD -config BR2_PACKAGE_GPSD_TIMING - bool "latency timing support" - config BR2_PACKAGE_GPSD_CLIENT_DEBUG bool "client debugging support" @@ -27,16 +33,18 @@ config BR2_PACKAGE_GPSD_OLDSTYLE config BR2_PACKAGE_GPSD_PROFILING bool "profiling support" + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on !BR2_aarch64 + +comment "profiling support not available with uClibc-based toolchain" + depends on !BR2_TOOLCHAIN_USES_GLIBC config BR2_PACKAGE_GPSD_NTP_SHM bool "NTP time hinting support" config BR2_PACKAGE_GPSD_PPS bool "PPS time syncing support" - -config BR2_PACKAGE_GPSD_PPS_ON_CTS - bool "PPS pulse on CTS rather than DCD" - depends on BR2_PACKAGE_GPSD_PPS + select BR2_PACKAGE_GPSD_NTP_SHM config BR2_PACKAGE_GPSD_USER bool "GPSD privilege revocation user" @@ -81,9 +89,6 @@ config BR2_PACKAGE_GPSD_CONTROLSEND bool "allow gpsctl/gpsmon to change device settings" default y -config BR2_PACKAGE_GPSD_RAW - bool "enable raw measurement processing" - config BR2_PACKAGE_GPSD_SQUELCH bool "squelch gpsd_report and gpsd_hexdump to save cpu" @@ -92,16 +97,16 @@ endmenu menu "Protocols" depends on BR2_PACKAGE_GPSD -config BR2_PACKAGE_GPSD_ASHTECH - bool "Ashtech" - help - Ashtech support - config BR2_PACKAGE_GPSD_AIVDM bool "Aivdm" help Aivdm support +config BR2_PACKAGE_GPSD_ASHTECH + bool "Ashtech" + help + Ashtech support + config BR2_PACKAGE_GPSD_EARTHMATE bool "Earthmate" help @@ -112,6 +117,11 @@ config BR2_PACKAGE_GPSD_EVERMORE help EverMore binary support +config BR2_PACKAGE_GPSD_FURY + bool "Fury" + help + Jackson Labs Fury and Firefly support + config BR2_PACKAGE_GPSD_FV18 bool "FV-18" help @@ -127,6 +137,11 @@ config BR2_PACKAGE_GPSD_GARMIN_SIMPLE_TXT help Garmin Simple Text support +config BR2_PACKAGE_GPSD_GEOSTAR + bool "Geostar" + help + Geostar Protocol support + config BR2_PACKAGE_GPSD_GPSCLOCK bool "GPSClock" help @@ -142,22 +157,29 @@ config BR2_PACKAGE_GPSD_MTK3301 help Mediatek MTK-3301 support +config BR2_PACKAGE_GPSD_NAVCOM + bool "Navcom" + help + Navcom binary support + config BR2_PACKAGE_GPSD_NMEA bool "NMEA" default y help Generic NMEA support +config BR2_PACKAGE_GPSD_NMEA2000 + bool "NMEA2000" + select BR2_PACKAGE_GPSD_NAVCOM + select BR2_PACKAGE_GPSD_AIVDM + help + NMEA2000/CAN support + config BR2_PACKAGE_GPSD_NTRIP bool "NTRIP" help NTRIP support -config BR2_PACKAGE_GPSD_NAVCOM - bool "Navcom" - help - Navcom binary support - config BR2_PACKAGE_GPSD_OCEANSERVER bool "OceanServer" help diff --git a/package/gpsd/S50gpsd b/package/gpsd/S50gpsd index 31727eb095..6e5ce88dd4 100644 --- a/package/gpsd/S50gpsd +++ b/package/gpsd/S50gpsd @@ -33,7 +33,7 @@ case "$1" in restart ;; *) - echo $"Usage: $0 {start|stop|restart}" + echo "Usage: $0 {start|stop|restart}" exit 1 esac diff --git a/package/gpsd/gpsd-02-sconstruct-disable-rpath.patch b/package/gpsd/gpsd-02-sconstruct-disable-rpath.patch new file mode 100644 index 0000000000..5476450e49 --- /dev/null +++ b/package/gpsd/gpsd-02-sconstruct-disable-rpath.patch @@ -0,0 +1,17 @@ +Disable addition of RPATH to the generated libraries + +Signed-off-by: Thomas Petazzoni + +Index: b/SConstruct +=================================================================== +--- a/SConstruct ++++ b/SConstruct +@@ -273,8 +273,6 @@ + env.Prepend(LIBPATH=[installdir('libdir')]) + else: + env.Prepend(LIBPATH=[env["sysroot"] + installdir('libdir')]) +-if env["shared"]: +- env.Prepend(RPATH=[installdir('libdir')]) + + # Give deheader a way to set compiler flags + if 'MORECFLAGS' in os.environ: diff --git a/package/gpsd/gpsd-fix-libgpsmm.patch b/package/gpsd/gpsd-fix-libgpsmm.patch deleted file mode 100644 index 893965e383..0000000000 --- a/package/gpsd/gpsd-fix-libgpsmm.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -Nura gpsd-2.95.orig/Makefile.in gpsd-2.95.x/Makefile.in ---- gpsd-2.95.orig/Makefile.in 2010-07-13 19:48:24.000000000 -0300 -+++ gpsd-2.95.x/Makefile.in 2010-07-27 17:40:28.902568874 -0300 -@@ -546,7 +546,7 @@ - libgps_VERSION__REVISION = 0 - libgps_VERSION_AGE = 0 - libgps_VERSION_NUMBER = $(libgps_VERSION_AGE):$(libgps_VERSION__REVISION):$(libgps_VERSION_AGE) --libgps_la_LDFLAGS = -version-number $(libgps_VERSION_CURRENT):$(libgps_VERSION__REVISION):$(libgps_VERSION_AGE) -+libgps_la_LDFLAGS = -version-number $(libgps_VERSION_CURRENT):$(libgps_VERSION__REVISION):$(libgps_VERSION_AGE) $(LDFLAGS) - lib_LTLIBRARIES = libgps.la libgpsd.la - libgps_SONAME = $(shell expr $(libgps_VERSION_CURRENT) - $(libgps_VERSION_AGE)) - libgps_VERSION = $(libgps_SONAME).$(libgps_VERSION_AGE).$(libgps_VERSION__REVISION) -@@ -612,8 +612,8 @@ - libgpsd_la_SOURCES = $(libgpsd_c_sources) $(libgpsd_h_sources) \ - driver_rtcm2.h packet_states.h - --@LIBGPSMM_ENABLE_FALSE@libgps_la_LINK = /bin/sh ./libtool --tag=CC --mode=link gcc $(libgps_la_LDFLAGS) -o $@ --@LIBGPSMM_ENABLE_TRUE@libgps_la_LINK = /bin/sh ./libtool --tag=CXX --mode=link g++ $(libgps_la_LDFLAGS) -o $@ -+@LIBGPSMM_ENABLE_FALSE@libgps_la_LINK = /bin/sh ./libtool --tag=CC --mode=link $(CC) $(libgps_la_LDFLAGS) -o $@ -+@LIBGPSMM_ENABLE_TRUE@libgps_la_LINK = /bin/sh ./libtool --tag=CXX --mode=link $(CXX) $(libgps_la_LDFLAGS) -o $@ - nodist_libgpsd_la_SOURCES = packet_names.h ais_json.i - libgps_la_LIBADD = $(LIBM) $(LIBC) $(LIBNSL) $(LIBSOCKET) $(LIBPTHREAD) - libgpsd_la_LIBADD = $(LIBM) $(LIBC) $(LIBNSL) $(LIBSOCKET) $(LIBPTHREAD) $(BLUEZ_LIBS) libgps.la diff --git a/package/gpsd/gpsd.mk b/package/gpsd/gpsd.mk index 60f884b3d6..be2e681c42 100644 --- a/package/gpsd/gpsd.mk +++ b/package/gpsd/gpsd.mk @@ -1,186 +1,238 @@ -############################################################# +################################################################################ # # gpsd # -############################################################# +################################################################################ -GPSD_VERSION = 2.95 -GPSD_SITE = http://download.berlios.de/gpsd +GPSD_VERSION = 3.9 +GPSD_SITE = http://download-mirror.savannah.gnu.org/releases/gpsd/ +GPSD_LICENSE = BSD-3c +GPSD_LICENSE_FILES = COPYING GPSD_INSTALL_STAGING = YES -GPSD_CONF_OPT = --disable-static -GPSD_TARGET_BINS = cgps gpsctl gpsdecode gpsmon gpspipe gpxlogger lcdgps + +GPSD_DEPENDENCIES = host-scons host-pkgconf + +GPSD_LDFLAGS = $(TARGET_LDFLAGS) + +GPSD_SCONS_ENV = $(TARGET_CONFIGURE_OPTS) + +GPSD_SCONS_OPTS = \ + arch=$(ARCH)\ + prefix=/usr\ + chrpath=no\ + sysroot=$(STAGING_DIR)\ + strip=no\ + python=no + +ifeq ($(BR2_PACKAGE_NCURSES),y) + GPSD_DEPENDENCIES += ncurses +else + GPSD_SCONS_OPTS += ncurses=no +endif + +# Disable IPv6, if we don't support it +ifneq ($(BR2_INET_IPV6),y) + GPSD_SCONS_OPTS += ipv6=no +endif # Build libgpsmm if we've got C++ ifeq ($(BR2_INSTALL_LIBSTDCPP),y) - GPSD_CONF_OPT += --enable-libgpsmm LDFLAGS="$(TARGET_LDFLAGS) -lstdc++" + GPSD_LDFLAGS += -lstdc++ + GPSD_SCONS_OPTS += libgpsmm=yes else - GPSD_CONF_OPT += --disable-libgpsmm + GPSD_SCONS_OPTS += libgpsmm=no endif # Enable or disable Qt binding ifeq ($(BR2_PACKAGE_QT_NETWORK),y) - GPSD_CONF_ENV += QMAKE="$(QT_QMAKE)" - GPSD_CONF_OPT += --enable-libQgpsmm - GPSD_DEPENDENCIES += qt host-pkg-config + GPSD_SCONS_ENV += QMAKE="$(QT_QMAKE)" + GPSD_DEPENDENCIES += qt host-pkgconf else - GPSD_CONF_OPT += --disable-libQgpsmm + GPSD_SCONS_OPTS += libQgpsmm=no endif # If libusb is available build it before so the package can use it ifeq ($(BR2_PACKAGE_LIBUSB),y) GPSD_DEPENDENCIES += libusb +else + GPSD_SCONS_OPTS += usb=no endif -ifeq ($(strip $(BR2_PACKAGE_DBUS)),y) - GPSD_CONF_OPT += --enable-dbus - GPSD_DEPENDENCIES += dbus dbus-glib +# If bluetooth is available build it before so the package can use it +ifeq ($(BR2_PACKAGE_BLUEZ_UTILS),y) + GPSD_DEPENDENCIES += bluez_utils +else + GPSD_SCONS_OPTS += bluez=no endif -ifeq ($(BR2_PACKAGE_NCURSES),y) - GPSD_DEPENDENCIES += ncurses +ifeq ($(BR2_PACKAGE_DBUS_GLIB),y) + GPSD_SCONS_OPTS += dbus_export=yes + GPSD_DEPENDENCIES += dbus-glib endif # Protocol support ifneq ($(BR2_PACKAGE_GPSD_ASHTECH),y) - GPSD_CONF_OPT += --disable-ashtech + GPSD_SCONS_OPTS += ashtech=no endif ifneq ($(BR2_PACKAGE_GPSD_AIVDM),y) - GPSD_CONF_OPT += --disable-aivdm + GPSD_SCONS_OPTS += aivdm=no endif ifneq ($(BR2_PACKAGE_GPSD_EARTHMATE),y) - GPSD_CONF_OPT += --disable-earthmate + GPSD_SCONS_OPTS += earthmate=no endif ifneq ($(BR2_PACKAGE_GPSD_EVERMORE),y) - GPSD_CONF_OPT += --disable-evermore + GPSD_SCONS_OPTS += evermore=no +endif +ifneq ($(BR2_PACKAGE_GPSD_FURY),y) + GPSD_SCONS_OPTS += fury=no endif ifneq ($(BR2_PACKAGE_GPSD_FV18),y) - GPSD_CONF_OPT += --disable-fv18 + GPSD_SCONS_OPTS += fv18=no endif ifneq ($(BR2_PACKAGE_GPSD_GARMIN),y) - GPSD_CONF_OPT += --disable-garmin + GPSD_SCONS_OPTS += garmin=no +endif +ifneq ($(BR2_PACKAGE_GPSD_GARMIN_SIMPLE_TXT),y) + GPSD_SCONS_OPTS += garmintxt=no endif -ifeq ($(BR2_PACKAGE_GPSD_GARMIN_SIMPLE_TXT),y) - GPSD_CONF_OPT += --enable-garmintxt +ifneq ($(BR2_PACKAGE_GPSD_GEOSTAR),y) + GPSD_SCONS_OPTS += geostar=no endif ifneq ($(BR2_PACKAGE_GPSD_GPSCLOCK),y) - GPSD_CONF_OPT += --disable-gpsclock + GPSD_SCONS_OPTS += gpsclock=no endif ifneq ($(BR2_PACKAGE_GPSD_ITRAX),y) - GPSD_CONF_OPT += --disable-itrax + GPSD_SCONS_OPTS += itrax=no endif ifneq ($(BR2_PACKAGE_GPSD_MTK3301),y) - GPSD_CONF_OPT += --disable-mtk3301 + GPSD_SCONS_OPTS += mtk3301=no endif ifneq ($(BR2_PACKAGE_GPSD_NMEA),y) - GPSD_CONF_OPT += --disable-nmea + GPSD_SCONS_OPTS += nmea=no endif ifneq ($(BR2_PACKAGE_GPSD_NTRIP),y) - GPSD_CONF_OPT += --disable-ntrip + GPSD_SCONS_OPTS += ntrip=no endif ifneq ($(BR2_PACKAGE_GPSD_NAVCOM),y) - GPSD_CONF_OPT += --disable-navcom + GPSD_SCONS_OPTS += navcom=no +endif +ifneq ($(BR2_PACKAGE_GPSD_NMEA2000),y) + GPSD_SCONS_OPTS += nmea2000=no endif ifneq ($(BR2_PACKAGE_GPSD_OCEANSERVER),y) - GPSD_CONF_OPT += --disable-oceanserver + GPSD_SCONS_OPTS += oceanserver=no endif ifneq ($(BR2_PACKAGE_GPSD_ONCORE),y) - GPSD_CONF_OPT += --disable-oncore + GPSD_SCONS_OPTS += oncore=no endif ifneq ($(BR2_PACKAGE_GPSD_RTCM104V2),y) - GPSD_CONF_OPT += --disable-rtcm104v2 + GPSD_SCONS_OPTS += rtcm104v2=no endif ifneq ($(BR2_PACKAGE_GPSD_RTCM104V3),y) - GPSD_CONF_OPT += --disable-rtcm104v3 + GPSD_SCONS_OPTS += rtcm104v3=no endif ifneq ($(BR2_PACKAGE_GPSD_SIRF),y) - GPSD_CONF_OPT += --disable-sirf + GPSD_SCONS_OPTS += sirf=no endif ifneq ($(BR2_PACKAGE_GPSD_SUPERSTAR2),y) - GPSD_CONF_OPT += --disable-superstar2 + GPSD_SCONS_OPTS += superstar2=no endif ifneq ($(BR2_PACKAGE_GPSD_TRIMBLE_TSIP),y) - GPSD_CONF_OPT += --disable-tsip + GPSD_SCONS_OPTS += tsip=no endif ifneq ($(BR2_PACKAGE_GPSD_TRIPMATE),y) - GPSD_CONF_OPT += --disable-tripmate + GPSD_SCONS_OPTS += tripmate=no endif -ifeq ($(BR2_PACKAGE_GPSD_TRUE_NORTH),y) - GPSD_CONF_OPT += --enable-tnt +ifneq ($(BR2_PACKAGE_GPSD_TRUE_NORTH),y) + GPSD_SCONS_OPTS += tnt=no endif ifneq ($(BR2_PACKAGE_GPSD_UBX),y) - GPSD_CONF_OPT += --disable-ubx + GPSD_SCONS_OPTS += ubx=no endif # Features ifneq ($(BR2_PACKAGE_GPSD_NTP_SHM),y) - GPSD_CONF_OPT += --disable-ntpshm + GPSD_SCONS_OPTS += ntpshm=no endif ifneq ($(BR2_PACKAGE_GPSD_PPS),y) - GPSD_CONF_OPT += --disable-pps -endif -ifeq ($(BR2_PACKAGE_GPSD_PPS_ON_CTS),y) - GPSD_CONF_OPT += --enable-pps-on-cts + GPSD_SCONS_OPTS += pps=no endif ifeq ($(BR2_PACKAGE_GPSD_SQUELCH),y) - GPSD_CONF_OPT += --enable-squelch + GPSD_SCONS_OPTS += squelch=yes endif ifneq ($(BR2_PACKAGE_GPSD_RECONFIGURE),y) - GPSD_CONF_OPT += --disable-reconfigure + GPSD_SCONS_OPTS += reconfigure=no endif ifneq ($(BR2_PACKAGE_GPSD_CONTROLSEND),y) - GPSD_CONF_OPT += --disable-controlsend -endif -ifeq ($(BR2_PACKAGE_GPSD_RAW),y) - GPSD_CONF_OPT += --enable-raw + GPSD_SCONS_OPTS += controlsend=no endif ifneq ($(BR2_PACKAGE_GPSD_OLDSTYLE),y) - GPSD_CONF_OPT += --disable-oldstyle + GPSD_SCONS_OPTS += oldstyle=no endif ifeq ($(BR2_PACKAGE_GPSD_PROFILING),y) - GPSD_CONF_OPT += --enable-profiling -endif -ifneq ($(BR2_PACKAGE_GPSD_TIMING),y) - GPSD_CONF_OPT += --disable-timing + GPSD_SCONS_OPTS += profiling=yes endif ifneq ($(BR2_PACKAGE_GPSD_CLIENT_DEBUG),y) - GPSD_CONF_OPT += --disable-clientdebug + GPSD_SCONS_OPTS += clientdebug=no endif ifeq ($(BR2_PACKAGE_GPSD_USER),y) - GPSD_CONF_OPT += --enable-gpsd-user=$(BR2_PACKAGE_GPSD_USER_VALUE) + GPSD_SCONS_OPTS += gpsd_user=$(BR2_PACKAGE_GPSD_USER_VALUE) endif ifeq ($(BR2_PACKAGE_GPSD_GROUP),y) - GPSD_CONF_OPT += --enable-gpsd-group=$(BR2_PACKAGE_GPSD_GROUP_VALUE) + GPSD_SCONS_OPTS += gpsd_group=$(BR2_PACKAGE_GPSD_GROUP_VALUE) endif ifeq ($(BR2_PACKAGE_GPSD_FIXED_PORT_SPEED),y) - GPSD_CONF_OPT += --enable-fixed-port-speed=$(BR2_PACKAGE_GPSD_FIXED_PORT_SPEED_VALUE) + GPSD_SCONS_OPTS += fixed_port_speed=$(BR2_PACKAGE_GPSD_FIXED_PORT_SPEED_VALUE) endif ifeq ($(BR2_PACKAGE_GPSD_MAX_CLIENT),y) - GPSD_CONF_OPT += --enable-max-clients=$(BR2_PACKAGE_GPSD_MAX_CLIENT_VALUE) + GPSD_SCONS_OPTS += limited_max_clients=$(BR2_PACKAGE_GPSD_MAX_CLIENT_VALUE) endif ifeq ($(BR2_PACKAGE_GPSD_MAX_DEV),y) - GPSD_CONF_OPT += --enable-max-devices=$(BR2_PACKAGE_GPSD_MAX_DEV_VALUE) + GPSD_SCONS_OPTS += limited_max_devices=$(BR2_PACKAGE_GPSD_MAX_DEV_VALUE) endif -define GPSD_BUILDS_CMDS - $(SED) 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' $(GPSD_DIR)/libtool - $(SED) 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' $(GPSD_DIR)/libtool - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) all libgpsmm +GPSD_SCONS_ENV += LDFLAGS="$(GPSD_LDFLAGS)" + +define GPSD_BUILD_CMDS + (cd $(@D); \ + $(GPSD_SCONS_ENV) \ + $(SCONS) \ + $(GPSD_SCONS_OPTS)) endef define GPSD_INSTALL_TARGET_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install + (cd $(@D); \ + $(GPSD_SCONS_ENV) \ + DESTDIR=$(TARGET_DIR) \ + $(SCONS) \ + $(GPSD_SCONS_OPTS) \ + install) if [ ! -f $(TARGET_DIR)/etc/init.d/S50gpsd ]; then \ $(INSTALL) -m 0755 -D package/gpsd/S50gpsd $(TARGET_DIR)/etc/init.d/S50gpsd; \ $(SED) 's,^DEVICES=.*,DEVICES=$(BR2_PACKAGE_GPSD_DEVICES),' $(TARGET_DIR)/etc/init.d/S50gpsd; \ fi endef -define GPSD_UNINSTALL_TARGET_CMDS - rm -f $(addprefix $(TARGET_DIR)/usr/bin/, $(GPSD_TARGET_BINS)) - rm -f $(TARGET_DIR)/usr/lib/libgps.* - rm -f $(TARGET_DIR)/usr/lib/libgpsd.* - rm -f $(TARGET_DIR)/usr/sbin/gpsd - rm -f $(TARGET_DIR)/etc/init.d/S50gpsd +define GPSD_INSTALL_STAGING_CMDS + (cd $(@D); \ + $(GPSD_SCONS_ENV) \ + DESTDIR=$(STAGING_DIR) \ + $(SCONS) \ + $(GPSD_SCONS_OPTS) \ + install) +endef + +ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV),y) +define GPSD_INSTALL_UDEV_RULES + (cd $(@D); \ + $(GPSD_SCONS_ENV) \ + DESTDIR=$(TARGET_DIR) \ + $(SCONS) \ + $(GPSD_SCONS_OPTS) \ + udev-install) endef -$(eval $(call AUTOTARGETS,package,gpsd)) +GPSD_POST_INSTALL_TARGET_HOOKS += GPSD_INSTALL_UDEV_RULES +endif + +$(eval $(generic-package)) diff --git a/package/gptfdisk/Config.in b/package/gptfdisk/Config.in new file mode 100644 index 0000000000..ae90fa91db --- /dev/null +++ b/package/gptfdisk/Config.in @@ -0,0 +1,45 @@ +comment "gptfdisk needs a toolchain w/ largefile, wchar, C++" + depends on !(BR2_LARGEFILE && BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR) + +config BR2_PACKAGE_GPTFDISK + bool "gptfdisk" + depends on BR2_LARGEFILE + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR # util-linux + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_GPTFDISK_GDISK if \ + !(BR2_PACKAGE_GPTFDISK_SGDISK || BR2_PACKAGE_GPTFDISK_CGDISK) + help + GPT fdisk (consisting of the gdisk and sgdisk programs) is a + text-mode partitioning tool that works on Globally Unique Identifier + (GUID) Partition Table (GPT) disks, rather than on the more common + (through 2010) Master Boot Record (MBR) partition tables. + + http://www.rodsbooks.com/gdisk/ + +if BR2_PACKAGE_GPTFDISK + +config BR2_PACKAGE_GPTFDISK_GDISK + bool "interactive gdisk" + help + Install the interactive GUID partition table (GPT) manipulator + /usr/sbin/gdisk which is modelled after and quite similar in use + to the traditional MBR based fdisk tool. + +config BR2_PACKAGE_GPTFDISK_SGDISK + bool "command line sgdisk" + select BR2_PACKAGE_POPT + help + Install the command-line GUID partition table (GPT) manipulator + /usr/sbin/sgdisk which is named after the traditional MBR based + sfdisk tool albeit with an entirely different option syntax. + +config BR2_PACKAGE_GPTFDISK_CGDISK + bool "ncurses cgdisk" + select BR2_PACKAGE_NCURSES + help + Install the ncurses-based GUID partition table (GPT) + manipulator /usr/sbin/cgdisk. + +endif diff --git a/package/gptfdisk/gptfdisk-001-configurable-utf16-support.patch b/package/gptfdisk/gptfdisk-001-configurable-utf16-support.patch new file mode 100644 index 0000000000..2d51e6f7bf --- /dev/null +++ b/package/gptfdisk/gptfdisk-001-configurable-utf16-support.patch @@ -0,0 +1,48 @@ +[PATCH] Make the UTF16 support configurable + +libicu is quite large, and unicode partition names are uncommon, so we +may not necessarily want to have UTF16 support unconditionnally. This +patch adds a USE_UTF16 environment variable to tell whether we want +the UTF16 support or not. + +Signed-off-by: Justin Maggard +Signed-off-by: Thomas Petazzoni +--- +Index: b/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -1,8 +1,11 @@ + CC=gcc + CXX=g++ + CFLAGS+=-D_FILE_OFFSET_BITS=64 +-CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 +-#CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64 ++CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64 ++ifeq ($(USE_UTF16),y) ++CXXFLAGS+=-D USE_UTF16 ++UTF16_LIBS=-licuio -licuuc ++endif + LDFLAGS+= + LIB_NAMES=crc32 support guid gptpart mbrpart basicmbr mbr gpt bsd parttypes attributes diskio diskio-unix + MBR_LIBS=support diskio diskio-unix basicmbr mbrpart +@@ -14,16 +17,13 @@ + all: cgdisk gdisk sgdisk fixparts + + gdisk: $(LIB_OBJS) gdisk.o gpttext.o +-# $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -luuid -o gdisk +- $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -licuio -licuuc -luuid -o gdisk ++ $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) $(UTF16_LIBS) -luuid -o gdisk + + cgdisk: $(LIB_OBJS) cgdisk.o gptcurses.o +-# $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -luuid -lncurses -o cgdisk +- $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -licuio -licuuc -luuid -lncurses -o cgdisk ++ $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) $(UTF16_LIBS) -luuid -lncurses -o cgdisk + + sgdisk: $(LIB_OBJS) sgdisk.o gptcl.o +-# $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) -luuid -lpopt -o sgdisk +- $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) -licuio -licuuc -luuid -lpopt -o sgdisk ++ $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) $(UTF16_LIBS) -luuid -lpopt -o sgdisk + + fixparts: $(MBR_LIB_OBJS) fixparts.o + $(CXX) $(MBR_LIB_OBJS) fixparts.o $(LDFLAGS) -o fixparts diff --git a/package/gptfdisk/gptfdisk.mk b/package/gptfdisk/gptfdisk.mk new file mode 100644 index 0000000000..7fad9838a2 --- /dev/null +++ b/package/gptfdisk/gptfdisk.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# gptfdisk +# +################################################################################ + +GPTFDISK_VERSION = 0.8.6 +GPTFDISK_SITE = http://downloads.sourceforge.net/sourceforge/gptfdisk + +GPTFDISK_TARGETS_$(BR2_PACKAGE_GPTFDISK_GDISK) += gdisk +GPTFDISK_TARGETS_$(BR2_PACKAGE_GPTFDISK_SGDISK) += sgdisk +GPTFDISK_TARGETS_$(BR2_PACKAGE_GPTFDISK_CGDISK) += cgdisk + +GPTFDISK_DEPENDENCIES += util-linux +ifeq ($(BR2_PACKAGE_GPTFDISK_SGDISK),y) + GPTFDISK_DEPENDENCIES += popt +endif +ifeq ($(BR2_PACKAGE_GPTFDISK_CGDISK),y) + GPTFDISK_DEPENDENCIES += ncurses +endif + +ifeq ($(BR2_PACKAGE_ICU),y) + GPTFDISK_DEPENDENCIES += icu + GPTFDISK_MAKE_OPTS += USE_UTF16=y +endif + +define GPTFDISK_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + $(GPTFDISK_MAKE_OPTS) $(GPTFDISK_TARGETS_y) +endef + +define GPTFDISK_INSTALL_TARGET_CMDS + for i in $(GPTFDISK_TARGETS_y); do \ + $(INSTALL) -D -m 0755 $(@D)/$$i $(TARGET_DIR)/usr/sbin/$$i; \ + done +endef + +define GPTFDISK_UNINSTALL_TARGET_CMDS + rm -f $(addprefix $(TARGET_DIR)/usr/sbin/,$(GPTFDISK_TARGETS_y)) +endef + +$(eval $(generic-package)) diff --git a/package/gqview/gqview.mk b/package/gqview/gqview.mk index 1bd76e2269..07cb5ad609 100644 --- a/package/gqview/gqview.mk +++ b/package/gqview/gqview.mk @@ -1,16 +1,12 @@ -############################################################# +################################################################################ # # gqview # -############################################################# +################################################################################ + GQVIEW_VERSION = 2.1.5 -GQVIEW_SOURCE = gqview-$(GQVIEW_VERSION).tar.gz GQVIEW_SITE = http://prdownloads.sourceforge.net/gqview -GQVIEW_AUTORECONF = NO -GQVIEW_INSTALL_STAGING = NO -GQVIEW_INSTALL_TARGET = YES - -GQVIEW_DEPENDENCIES = host-pkg-config libgtk2 - -$(eval $(call AUTOTARGETS,package,gqview)) +GQVIEW_DEPENDENCIES = host-pkgconf libgtk2 +GQVIEW_CONF_ENV = LIBS="-lm" +$(eval $(autotools-package)) diff --git a/package/grantlee/Config.in b/package/grantlee/Config.in new file mode 100644 index 0000000000..09ec70c018 --- /dev/null +++ b/package/grantlee/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_GRANTLEE + bool "grantlee" + depends on BR2_PACKAGE_QT_ARCH_SUPPORTS_WEBKIT + select BR2_PACKAGE_QT_STL + select BR2_PACKAGE_QT_SCRIPT + select BR2_PACKAGE_QT_GUI_MODULE + help + Qt implemantation of the Django template framework + + http://www.grantlee.org diff --git a/package/grantlee/grantlee-0.2.0-fix-lphread-link-error.patch b/package/grantlee/grantlee-0.2.0-fix-lphread-link-error.patch new file mode 100644 index 0000000000..7964fd0d1a --- /dev/null +++ b/package/grantlee/grantlee-0.2.0-fix-lphread-link-error.patch @@ -0,0 +1,42 @@ +From d46475b6bb9d99a4c5c95489be6c14d0d219d5f8 Mon Sep 17 00:00:00 2001 +From: Zoltan Gyarmati +Date: Thu, 15 Nov 2012 17:00:39 +0100 +Subject: [PATCH] fix -lpthread build error + +Fixing linking time error with certain toolchains. The issue caused by a missing explicit linking to +libpthread. The failed buildlog: +Linking CXX executable testgenerictypes_exec +/home/buildroot12git/output/host/usr/lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.6.3/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/buildroot12git/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libQtCore.so: undefined reference to symbol 'pthread_cancel' +/home/buildroot12git/output/host/usr/lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.6.3/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: note: 'pthread_cancel' is defined in DSO /home/buildroot12git/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/lib/libpthread.so.0 so try adding it to the linker command line +/home/buildroot12git/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/lib/libpthread.so.0: could not read symbols: Invalid operation +collect2: ld returned 1 exit status +make[3]: *** [templates/tests/testgenerictypes_exec] Error 1 +make[3]: Leaving directory `/home/buildroot12git/output/build/grantlee-0.2.0' +make[2]: *** [templates/tests/CMakeFiles/testgenerictypes_exec.dir/all] Error 2 +make[2]: Leaving directory `/home/buildroot12git/output/build/grantlee-0.2.0' +make[1]: *** [all] Error 2 +make[1]: Leaving directory `/home/buildroot12git/output/build/grantlee-0.2.0' +make: *** [/home/buildroot12git/output/build/grantlee-0.2.0/.stamp_built] Error + +Signed-off-by: Zoltan Gyarmati +--- + templates/tests/CMakeLists.txt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/templates/tests/CMakeLists.txt b/templates/tests/CMakeLists.txt +index caab003..f400622 100644 +--- a/templates/tests/CMakeLists.txt ++++ b/templates/tests/CMakeLists.txt +@@ -68,7 +68,8 @@ macro(GRANTLEE_TEMPLATES_UNIT_TESTS) + ${_testresource_rcc_src} + ) + add_test(${_testname} ${_testname}_exec ) +- target_link_libraries(${_testname}_exec ${QT_QTTEST_LIBRARY} grantlee_core ) ++ find_package (Threads) ++ target_link_libraries(${_testname}_exec ${QT_QTTEST_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} grantlee_core ) + + set_property(GLOBAL APPEND PROPERTY TEST_COVERAGE "${CMAKE_CURRENT_BINARY_DIR}/${_testname}_exec" ) + endforeach(_testname) +-- +1.7.9.5 + diff --git a/package/grantlee/grantlee.mk b/package/grantlee/grantlee.mk new file mode 100644 index 0000000000..2ad5888e03 --- /dev/null +++ b/package/grantlee/grantlee.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# grantlee +# +################################################################################ + +GRANTLEE_VERSION = 0.2.0 +GRANTLEE_SITE = http://downloads.grantlee.org +GRANTLEE_INSTALL_STAGING = YES +GRANTLEE_DEPENDENCIES = qt + +$(eval $(cmake-package)) diff --git a/package/grep/Config.in b/package/grep/Config.in index 1b39922fca..2cd3406165 100644 --- a/package/grep/Config.in +++ b/package/grep/Config.in @@ -2,11 +2,10 @@ config BR2_PACKAGE_GREP bool "grep" depends on BR2_USE_WCHAR select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE - select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE help The GNU regular expression matcher. http://www.gnu.org/software/grep/grep.html -comment "grep needs a toolchain with WCHAR support" +comment "grep needs a toolchain w/ wchar" depends on !BR2_USE_WCHAR diff --git a/package/grep/grep.mk b/package/grep/grep.mk index bfc9116633..2d815fea63 100644 --- a/package/grep/grep.mk +++ b/package/grep/grep.mk @@ -1,13 +1,16 @@ -############################################################# +################################################################################ # # grep # -############################################################# +################################################################################ -GREP_VERSION = 2.7 +GREP_VERSION = 2.14 GREP_SITE = $(BR2_GNU_MIRROR)/grep +GREP_SOURCE = grep-$(GREP_VERSION).tar.xz +GREP_LICENSE = GPLv3+ +GREP_LICENSE_FILES = COPYING GREP_CONF_OPT = --disable-perl-regexp --without-included-regex -GREP_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl) +GREP_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) # link with iconv if enabled ifeq ($(BR2_PACKAGE_LIBICONV),y) @@ -15,4 +18,9 @@ GREP_CONF_ENV += LIBS=-liconv GREP_DEPENDENCIES += libiconv endif -$(eval $(call AUTOTARGETS,package,grep)) +# Full grep preferred over busybox grep +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +GREP_DEPENDENCIES += busybox +endif + +$(eval $(autotools-package)) diff --git a/package/gsl/Config.in b/package/gsl/Config.in new file mode 100644 index 0000000000..aa431d1f2d --- /dev/null +++ b/package/gsl/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_GSL + bool "gsl" + help + The GNU Scientific Library (GSL) is a numerical library for + C and C++ programmers. The library provides a wide range of + mathematical routines such as random number generators, + special functions and least-squares fitting. There are over + 1000 functions in total with an extensive test suite. + + http://www.gnu.org/software/gsl diff --git a/package/gsl/gsl.mk b/package/gsl/gsl.mk new file mode 100644 index 0000000000..1dfc0f9771 --- /dev/null +++ b/package/gsl/gsl.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# gsl +# +################################################################################ + +GSL_VERSION = 1.16 +GSL_SITE = $(BR2_GNU_MIRROR)/gsl +GSL_INSTALL_STAGING = YES +GSL_LICENSE = GPLv3 +GSL_LICENSE_FILES = COPYING +GSL_CONFIG_SCRIPTS = gsl-config + +# uClibc pretends to have fenv support as it installs , but in +# practice, it only implements it for i386. Problem reported upstream +# at: http://lists.busybox.net/pipermail/uclibc/2012-October/047067.html. +# So we tell gsl that fenv related functions are not available in this +# case. +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +ifneq ($(BR2_i386),y) +GSL_CONF_ENV = \ + ac_cv_have_decl_feenableexcept=no \ + ac_cv_have_decl_fesettrapenable=no +endif +endif + +$(eval $(autotools-package)) diff --git a/package/gstreamer/Config.in b/package/gstreamer/Config.in new file mode 100644 index 0000000000..039d657676 --- /dev/null +++ b/package/gstreamer/Config.in @@ -0,0 +1,11 @@ +# Gstreamer 0.10.x & Plugins +source "package/gstreamer/gstreamer/Config.in" +source "package/gstreamer/gst-plugins-base/Config.in" +source "package/gstreamer/gst-plugins-good/Config.in" +source "package/gstreamer/gst-plugins-bad/Config.in" +source "package/gstreamer/gst-plugins-ugly/Config.in" +source "package/gstreamer/gst-ffmpeg/Config.in" +source "package/gstreamer/gst-dsp/Config.in" +source "package/gstreamer/gst-fsl-plugins/Config.in" +source "package/gstreamer/gst-omapfb/Config.in" +source "package/gstreamer/gst-plugin-x170/Config.in" diff --git a/package/multimedia/gst-dsp/Config.in b/package/gstreamer/gst-dsp/Config.in similarity index 100% rename from package/multimedia/gst-dsp/Config.in rename to package/gstreamer/gst-dsp/Config.in diff --git a/package/gstreamer/gst-dsp/gst-dsp.mk b/package/gstreamer/gst-dsp/gst-dsp.mk new file mode 100644 index 0000000000..1fd6976074 --- /dev/null +++ b/package/gstreamer/gst-dsp/gst-dsp.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# gst-dsp +# +################################################################################ + +GST_DSP_VERSION = 0.10.2 +GST_DSP_SITE = http://gst-dsp.googlecode.com/files/ + +define GST_DSP_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) -e +endef + +define GST_DSP_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) -e DESTDIR=$(TARGET_DIR) install +endef + +define GST_DSP_UNINSTALL_TARGET_CMDS + $(RM) $(TARGET_DIR)/usr/lib/gstreamer-0.10/libgstdsp.so +endef + +GST_DSP_DEPENDENCIES = gstreamer tidsp-binaries host-pkgconf + +$(eval $(generic-package)) diff --git a/package/gstreamer/gst-ffmpeg/Config.in b/package/gstreamer/gst-ffmpeg/Config.in new file mode 100644 index 0000000000..1d6a707707 --- /dev/null +++ b/package/gstreamer/gst-ffmpeg/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_GST_FFMPEG + bool "gst-ffmpeg" + depends on BR2_PACKAGE_GSTREAMER + select BR2_PACKAGE_GST_PLUGINS_BASE + select BR2_PACKAGE_FFMPEG + select BR2_PACKAGE_FFMPEG_GPL + select BR2_PACKAGE_FFMPEG_POSTPROC + select BR2_PACKAGE_FFMPEG_SWSCALE + depends on BR2_LARGEFILE + depends on BR2_INET_IPV6 + help + GStreamer plugin using FFmpeg. + + http://gstreamer.freedesktop.org/ + +comment "gst-ffmpeg needs a toolchain w/ largefile, IPv6" + depends on BR2_PACKAGE_GSTREAMER + depends on !(BR2_LARGEFILE && BR2_INET_IPV6) diff --git a/package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk b/package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk new file mode 100644 index 0000000000..fc59c3025b --- /dev/null +++ b/package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# gst-ffmpeg +# +################################################################################ + +GST_FFMPEG_VERSION = 0.10.13 +GST_FFMPEG_SOURCE = gst-ffmpeg-$(GST_FFMPEG_VERSION).tar.bz2 +GST_FFMPEG_SITE = http://gstreamer.freedesktop.org/src/gst-ffmpeg +GST_FFMPEG_INSTALL_STAGING = YES +GST_FFMPEG_DEPENDENCIES = host-pkgconf gstreamer gst-plugins-base ffmpeg +GST_FFMPEG_CONF_OPT = --with-system-ffmpeg + +ifeq ($(BR2_PACKAGE_BZIP2),y) +GST_FFMPEG_DEPENDENCIES += bzip2 +endif + +$(eval $(autotools-package)) diff --git a/package/gstreamer/gst-fsl-plugins/Config.in b/package/gstreamer/gst-fsl-plugins/Config.in new file mode 100644 index 0000000000..42467341a6 --- /dev/null +++ b/package/gstreamer/gst-fsl-plugins/Config.in @@ -0,0 +1,92 @@ +comment "gst-fsl-plugins requires an imx-specific kernel to be built" + depends on BR2_arm && BR2_PACKAGE_GSTREAMER && !BR2_LINUX_KERNEL + +config BR2_PACKAGE_GST_FSL_PLUGINS + bool "gst-fsl-plugins" + depends on BR2_LINUX_KERNEL + depends on BR2_arm # Only relevant for i.MX + depends on BR2_PACKAGE_GSTREAMER + select BR2_PACKAGE_GST_PLUGINS_BASE + select BR2_PACKAGE_LIBFSLVPUWRAP + select BR2_PACKAGE_IMX_LIB + select BR2_PACKAGE_LIBFSLPARSER + select BR2_PACKAGE_LIBFSLCODEC + help + GStreamer plugins for hardware-accelerated audio and video + parsers and codecs on i.MX platforms. It requires a kernel that + includes the i.MX specific headers to be built. + + To use the VPU, its firmware blob must be installed as well. This + can be found in the firmware-imx package in the "Hardware handling" + menu. + + This library is provided by Freescale as-is and doesn't have + an upstream. Pengutronix maintains gst-fsl-plugins at + git://git.pengutronix.de/git/imx/gst-plugins-fsl-vpu.git + but it diverges heavily from Freescale's original implementation. + +if BR2_PACKAGE_GST_FSL_PLUGINS +choice + prompt "i.MX platform" + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX233 + bool "imx233" + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX25 + select BR2_PACKAGE_IMX_LIB_PLATFORM_IMX25_3STACK + bool "imx25" + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX27 + select BR2_PACKAGE_IMX_LIB_PLATFORM_IMX27ADS + bool "imx27" + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX28 + bool "imx28" + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX31 + bool "imx31" + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX35 + bool "imx35" + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX37 + select BR2_PACKAGE_IMX_LIB_PLATFORM_IMX37_3STACK + bool "imx37" + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX50 + select BR2_PACKAGE_IMX_LIB_PLATFORM_IMX50 + bool "imx50" + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX51 + select BR2_PACKAGE_IMX_LIB_PLATFORM_IMX51 + bool "imx51" + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX53 + select BR2_PACKAGE_IMX_LIB_PLATFORM_IMX53 + bool "imx53" + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX5X + select BR2_PACKAGE_IMX_LIB_PLATFORM_IMX5X + bool "imx5X" + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX6 + select BR2_PACKAGE_IMX_LIB_PLATFORM_IMX6Q + bool "imx6" + +endchoice + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM + string + default "MX233" if BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX233 + default "MX25" if BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX25 + default "MX27" if BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX27 + default "MX28" if BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX28 + default "MX31" if BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX31 + default "MX35" if BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX35 + default "MX37" if BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX37 + default "MX50" if BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX50 + default "MX51" if BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX51 + default "MX53" if BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX53 + default "MX5X" if BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX5X + default "MX6" if BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX6 +endif diff --git a/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins-0001-gplay-add-missing-include.patch b/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins-0001-gplay-add-missing-include.patch new file mode 100644 index 0000000000..19753bc787 --- /dev/null +++ b/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins-0001-gplay-add-missing-include.patch @@ -0,0 +1,23 @@ +From ed649ccb8ddc724546172d329fca39b23c49b804 Mon Sep 17 00:00:00 2001 +From: "Arnout Vandecappelle (Essensium/Mind)" +Date: Mon, 17 Dec 2012 17:58:28 +0100 +Subject: [PATCH] gplay: add missing include + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + tools/gplay/gst_snapshot.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tools/gplay/gst_snapshot.c b/tools/gplay/gst_snapshot.c +index 40dbb6f..596f399 100755 +--- a/tools/gplay/gst_snapshot.c ++++ b/tools/gplay/gst_snapshot.c +@@ -22,6 +22,7 @@ + + #include + #include ++#include + #include "gst_snapshot.h" + + static void +-- diff --git a/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins-0002-Fix-bashism-in-configure-script.patch b/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins-0002-Fix-bashism-in-configure-script.patch new file mode 100644 index 0000000000..8af3644f49 --- /dev/null +++ b/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins-0002-Fix-bashism-in-configure-script.patch @@ -0,0 +1,65 @@ +From 83b4f84b1c490b9bb816e1ecbc743d80d48cc06d Mon Sep 17 00:00:00 2001 +From: "Arnout Vandecappelle (Essensium/Mind)" +Date: Tue, 18 Dec 2012 12:05:22 +0100 +Subject: [PATCH] Fix bashism in configure script. + +The configure script uses +=, which is not POSIX. Debians that +have the default dash as /bin/sh define a variable ending with ++ instead of appending to it. + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + configure.ac | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 5968eb6..1a31a06 100755 +--- a/configure.ac ++++ b/configure.ac +@@ -60,10 +60,10 @@ AC_DEFUN([CHECK_DISABLE_FEATURE], + [use_[$1]=yes]) + if test "$use_[$1]" = "yes"; then + SAVE_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS=`$PKG_CONFIG --cflags libfslaudiocodec` +- CPPFLAGS+=`$PKG_CONFIG --cflags libfslvideocodec` +- CPPFLAGS+=`$PKG_CONFIG --cflags libfslparser` +- CPPFLAGS+=`$PKG_CONFIG --cflags libfslvpuwrap` ++ CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags libfslaudiocodec`" ++ CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags libfslvideocodec`" ++ CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags libfslparser`" ++ CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags libfslvpuwrap`" + AC_CHECK_HEADERS([$4], HAVE_[$3]=yes, HAVE_[$3]=no && break) + CPPFLAGS="$SAVE_CPPFLAGS" + if test "x$HAVE_[$3]" = "xyes"; then +@@ -157,7 +157,7 @@ AC_SUBST(GST_PLUGINS_BASE_LIBS) + AC_CHECK_HEADERS([vpu_lib.h], [HAVE_VPU_LIB=yes], [HAVE_VPU_LIB=no]) + if test "x$HAVE_VPU_LIB" = "xyes"; then + VPU_LIBS=`$PKG_CONFIG --libs libfslvpuwrap 2>/dev/null` +- VPU_LIBS+=" -lvpu" ++ VPU_LIBS="$VPU_LIBS -lvpu" + fi + AC_SUBST(VPU_LIBS) + +@@ -173,15 +173,15 @@ AC_SUBST(IPU_CFLAGS) + AC_SUBST(IPU_LIBS) + + FSL_MM_CORE_CFLAGS=`$PKG_CONFIG --cflags libfslaudiocodec 2>/dev/null` +-FSL_MM_CORE_CFLAGS+=`$PKG_CONFIG --cflags libfslvideocodec 2>/dev/null` +-FSL_MM_CORE_CFLAGS+=`$PKG_CONFIG --cflags libfslparser 2>/dev/null` +-FSL_MM_CORE_CFLAGS+=`$PKG_CONFIG --cflags libfslvpuwrap 2>/dev/null` ++FSL_MM_CORE_CFLAGS="$FSL_MM_CORE_CFLAGS `$PKG_CONFIG --cflags libfslvideocodec 2>/dev/null`" ++FSL_MM_CORE_CFLAGS="$FSL_MM_CORE_CFLAGS `$PKG_CONFIG --cflags libfslparser 2>/dev/null`" ++FSL_MM_CORE_CFLAGS="$FSL_MM_CORE_CFLAGS `$PKG_CONFIG --cflags libfslvpuwrap 2>/dev/null`" + AC_SUBST(FSL_MM_CORE_CFLAGS) + + FSL_MM_CORE_LIBS=`$PKG_CONFIG --libs libfslaudiocodec 2>/dev/null` +-FSL_MM_CORE_LIBS+=`$PKG_CONFIG --libs libfslvideocodec 2>/dev/null` +-FSL_MM_CORE_LIBS+=`$PKG_CONFIG --libs libfslparser 2>/dev/null` +-FSL_MM_CORE_LIBS+=`$PKG_CONFIG --libs libfslvpuwrap 2>/dev/null` ++FSL_MM_CORE_LIBS="$FSL_MM_CORE_LIBS `$PKG_CONFIG --libs libfslvideocodec 2>/dev/null`" ++FSL_MM_CORE_LIBS="$FSL_MM_CORE_LIBS `$PKG_CONFIG --libs libfslparser 2>/dev/null`" ++FSL_MM_CORE_LIBS="$FSL_MM_CORE_LIBS `$PKG_CONFIG --libs libfslvpuwrap 2>/dev/null`" + AC_SUBST(FSL_MM_CORE_LIBS) + + EXTRAPLATFORMCFLAGS="-DARM -D_GNUC_" +-- diff --git a/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins-0003-Use-proper-objdump.patch b/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins-0003-Use-proper-objdump.patch new file mode 100644 index 0000000000..8fce239e50 --- /dev/null +++ b/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins-0003-Use-proper-objdump.patch @@ -0,0 +1,36 @@ +From c58b658a93b1b6d6e94ba0306d58de845012cef6 Mon Sep 17 00:00:00 2001 +From: "Arnout Vandecappelle (Essensium/Mind)" +Date: Tue, 18 Dec 2012 12:22:52 +0100 +Subject: [PATCH] Use proper objdump + +If the OBJDUMP environment variable is set, that should be used rather +than the objdump in PATH. + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 1a31a06..cc7557d 100755 +--- a/configure.ac ++++ b/configure.ac +@@ -17,7 +17,7 @@ AC_DEFUN([FIND_PARSER_SONAME], + AC_MSG_CHECKING([for lib_$1_parser_$2_elinux.3.0.so soname]) + path=`$PKG_CONFIG --variable=libdir libfslparser` + SONAME=$( $CC -print-file-name=$path/lib_$1_parser_$2_elinux.so | \ +- while read output; do objdump -p $output | \ ++ while read output; do $OBJDUMP -p $output | \ + grep "SONAME" | \ + sed -e 's/ \+SONAME \+//'; done 2> /dev/null ) + if [[ -z "$SONAME" ]]; then +@@ -37,7 +37,7 @@ AC_DEFUN([FIND_ACODEC_SONAME], + AC_MSG_CHECKING([for lib_$1_wrap_$2_elinux.so soname]) + path=`$PKG_CONFIG --variable=libdir libfslaudiocodec` + SONAME=$( $CC -print-file-name=$path/wrap/lib_$1_wrap_$2_elinux.so | \ +- while read output; do objdump -p $output | \ ++ while read output; do $OBJDUMP -p $output | \ + grep "SONAME" | \ + sed -e 's/ \+SONAME \+//'; done 2> /dev/null ) + if [[ -z "$SONAME" ]]; then +-- diff --git a/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk b/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk new file mode 100644 index 0000000000..ccdb521284 --- /dev/null +++ b/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# gst-fsl-plugins +# +################################################################################ + +GST_FSL_PLUGINS_VERSION = 3.0.1 +# No official download site from freescale, just this mirror +GST_FSL_PLUGINS_SITE = http://download.ossystems.com.br/bsp/freescale/source + +# Most is LGPLv2+, but some sources are copied from upstream and are +# LGPLv2.1+, which essentially makes it LGPLv2.1+ +GST_FSL_PLUGINS_LICENSE = LGPLv2+, LGPLv2.1+, PROPRIETARY (asf.h) +GST_FSL_PLUGINS_LICENSE_FILES = COPYING-LGPL-2.1 COPYING-LGPL-2 + +GST_FSL_PLUGINS_INSTALL_STAGING = YES +GST_FSL_PLUGINS_AUTORECONF = YES + +GST_FSL_PLUGINS_DEPENDENCIES += host-pkgconf gstreamer gst-plugins-base \ + libfslvpuwrap imx-lib libfslparser libfslcodec + +GST_FSL_PLUGINS_CONF_ENV = PLATFORM=$(BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM) + +# needs access to imx-specific kernel headers +GST_FSL_PLUGINS_DEPENDENCIES += linux +GST_FSL_PLUGINS_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) -idirafter $(LINUX_DIR)/include" + +ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y) +GST_FSL_PLUGINS_DEPENDENCIES += xlib_libX11 +GST_FSL_PLUGINS_CONF_OPT += --enable-x11 +else +GST_FSL_PLUGINS_CONF_OPT += --disable-x11 +endif + +# Autoreconf requires an m4 directory to exist +define GST_FSL_PLUGINS_PATCH_M4 + mkdir -p $(@D)/m4 +endef + +GST_FSL_PLUGINS_POST_PATCH_HOOKS += GST_FSL_PLUGINS_PATCH_M4 + +$(eval $(autotools-package)) diff --git a/package/multimedia/gst-omapfb/Config.in b/package/gstreamer/gst-omapfb/Config.in similarity index 100% rename from package/multimedia/gst-omapfb/Config.in rename to package/gstreamer/gst-omapfb/Config.in diff --git a/package/gstreamer/gst-omapfb/gst-omapfb.mk b/package/gstreamer/gst-omapfb/gst-omapfb.mk new file mode 100644 index 0000000000..78a59f6652 --- /dev/null +++ b/package/gstreamer/gst-omapfb/gst-omapfb.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# gst-omapfb +# +################################################################################ + +GST_OMAPFB_VERSION = 1.0 +GST_OMAPFB_SITE = http://gst-dsp.googlecode.com/files/ + +define GST_OMAPFB_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) -e +endef + +define GST_OMAPFB_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) -e DESTDIR=$(TARGET_DIR) install +endef + +define GST_OMAPFB_UNINSTALL_TARGET_CMDS + $(RM) $(TARGET_DIR)/usr/lib/gstreamer-0.10/libgstomapfb.so +endef + +GST_OMAPFB_DEPENDENCIES = gstreamer + +$(eval $(generic-package)) diff --git a/package/gstreamer/gst-plugin-x170/Config.in b/package/gstreamer/gst-plugin-x170/Config.in new file mode 100644 index 0000000000..d7fe96a49a --- /dev/null +++ b/package/gstreamer/gst-plugin-x170/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_GST_PLUGIN_X170 + bool "gst-plugin-x170" + depends on BR2_PACKAGE_GSTREAMER + depends on BR2_arm926t + # glibc toolchain includes WCHAR and threading for libglib2 + depends on BR2_TOOLCHAIN_USES_GLIBC # on2-8170-libs + select BR2_PACKAGE_ON2_8170_LIBS + help + GStreamer plug-in to use the Hantro X170 video decoder present on + ATMEL AT91SAM9M10 SoC. + + http://www.at91.com/linux4sam/bin/view/Linux4SAM/SAM9M10Gstreamer + +comment "gst-plugin-x170 needs an (e)glibc toolchain" + depends on BR2_PACKAGE_GSTREAMER && BR2_arm926t + depends on !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/gstreamer/gst-plugin-x170/gst-plugin-x170-01-correct-CFLAGS.patch b/package/gstreamer/gst-plugin-x170/gst-plugin-x170-01-correct-CFLAGS.patch new file mode 100644 index 0000000000..9c32e46cce --- /dev/null +++ b/package/gstreamer/gst-plugin-x170/gst-plugin-x170-01-correct-CFLAGS.patch @@ -0,0 +1,28 @@ +The configure script is correctly getting the CFLAGS needed to compile a plugin +for gstreamer and storing them in GST_BASE_CFLAGS but the Makefiles are never +making use of those. + +We actually have to use AM_CPPFLAGS as AM_CFLAGS is used everywhere but on the +real compiling rule... + +Signed-off-by: Alexandre Belloni +--- + src/Makefile.am | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 8cb51d1..6af5d91 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -5,6 +5,8 @@ + ############################################################################## + plugin_LTLIBRARIES = libgstx170.la + ++AM_CPPFLAGS = @GST_BASE_CFLAGS@ ++ + ############################################################################## + # for the next set of variables, rename the prefix if you renamed the .la, # + # e.g. libgstplugin_la_SOURCES => libmysomething_la_SOURCES # +-- +1.8.1.2 + diff --git a/package/gstreamer/gst-plugin-x170/gst-plugin-x170.mk b/package/gstreamer/gst-plugin-x170/gst-plugin-x170.mk new file mode 100644 index 0000000000..e14d460a41 --- /dev/null +++ b/package/gstreamer/gst-plugin-x170/gst-plugin-x170.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# gst-plugin-x170 +# +################################################################################ + +GST_PLUGIN_X170_VERSION = 1.0 +GST_PLUGIN_X170_SITE = ftp://ftp.linux4sam.org/pub/demo/linux4sam_1.9/codec/ + +GST_PLUGIN_X170_LICENSE = BSD-1c +#A license file is included but it is just a placeholder + +# There is no generated configure script in the tarball. +GST_PLUGIN_X170_AUTORECONF = YES +GST_PLUGIN_X170_AUTORECONF_OPT = -Im4/ +GST_PLUGIN_X170_DEPENDENCIES = gstreamer libglib2 on2-8170-libs + +$(eval $(autotools-package)) diff --git a/package/gstreamer/gst-plugins-bad/Config.in b/package/gstreamer/gst-plugins-bad/Config.in new file mode 100644 index 0000000000..c42172a6fd --- /dev/null +++ b/package/gstreamer/gst-plugins-bad/Config.in @@ -0,0 +1,326 @@ +menuconfig BR2_PACKAGE_GST_PLUGINS_BAD + bool "gst-plugins-bad" + depends on BR2_PACKAGE_GSTREAMER + select BR2_PACKAGE_GST_PLUGINS_BASE + help + A set of plug-ins for GStreamer that may be of poor quality or + lacking some features. + + http://gstreamer.freedesktop.org/ + +if BR2_PACKAGE_GST_PLUGINS_BAD + +comment "dependency-less plugins" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_ADPCMDEC + bool "adpcmdec" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_ADPCMENC + bool "adpcmenc" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_AIFF + bool "aiff" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_ASFMUX + bool "asfmux" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_AUTOCONVERT + bool "autoconvert" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_AUDIOVISUALIZERS + bool "audiovisualizers" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_BAYER + bool "bayer" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CAMERABIN + bool "camerabin" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CAMERABIN2 + bool "camerabin2" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CDXAPARSE + bool "cdxaparse" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_COLOREFFECTS + bool "coloreffects" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_COLORSPACE + bool "colorspace" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DATAURISRC + bool "dataurisrc" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DCCP + bool "dccp" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DEBUGUTILS + bool "debugutils" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DECKLINK + depends on BR2_INSTALL_LIBSTDCPP + bool "decklink" + +comment "decklink needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DTMF + bool "dtmf" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DVBSUBOVERLAY + bool "dvdsuboverlay" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DVDSPU + bool "dvdspu" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FACEOVERLAY + bool "faceoverlay" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FESTIVAL + bool "festival" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FIELDANALYSIS + bool "fieldanalysis" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FREEVERB + bool "freeverb" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FREEZE + bool "freeze" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FREI0R + bool "frei0r" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_GAUDIEFFECTS + bool "gaudieffects" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_GEOMETRICTRANSFORM + bool "geometrictransform" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_GSETTINGS + bool "gsettings" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_H264PARSE + bool "h264parse" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_HDVPARSE + bool "hdvparse" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_HLS + bool "hls" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_ID3TAG + bool "id3tag" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_INTER + bool "inter" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_INTERLACE + bool "interlace" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_IVFPARSE + bool "ivfparse" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_JP2KDECIMATOR + bool "jp2kdecimator" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_JPEGFORMAT + bool "jpegformat" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LEGACYRESAMPLE + bool "legacyresample" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LIBRFB + bool "librfb" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LINSYS + bool "linsys" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LIVEADDER + bool "liveadder" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGDEMUX + bool "mpegdemux" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGPSMUX + bool "mpegpsmux" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGTSDEMUX + bool "mpegtsdemux" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGTSMUX + bool "mpegtsmux" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGVIDEOPARSE + bool "mpegvideoparse" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MVE + bool "mve" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MXF + bool "mxf" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_NSF + bool "nsf" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_NUVDEMUX + bool "nuvdemux" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_PATCHDETECT + bool "patchdetect" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_PCAPPARSE + bool "pcapparse" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_PNM + bool "pnm" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_RAWPARSE + bool "rawparse" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_REAL + bool "real" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_REMOVESILENCE + bool "removesilence" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_RTPMUX + bool "rtpmux" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_RTPVP8 + bool "rtpvp8" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SCALETEMPO + bool "scaletempo" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SDI + bool "sdi" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SDP + bool "sdp" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SEGMENTCLIP + bool "segmentclip" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SIREN + bool "siren" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SMOOTH + bool "smooth" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SPEED + bool "speed" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_STEREO + bool "stereo" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SUBENC + bool "subenc" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_TTA + bool "tta" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VIDEOFILTERS + bool "videofilters" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VIDEOMAXRATE + bool "videomaxrate" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VIDEOMEASURE + bool "videomeasure" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VIDEOPARSERS + bool "videoparsers" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VIDEOSIGNAL + bool "videosignal" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VMNC + bool "vmnc" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_Y4M + bool "y4m" + +comment "plugins with external dependencies (there may be more available)" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_APEXSINK + bool "apexsink" + select BR2_PACKAGE_OPENSSL + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_BZ2 + bool "bz2" + select BR2_PACKAGE_BZIP2 + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CDAUDIO + bool "cdaudio" + select BR2_PACKAGE_LIBCDAUDIO + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CURL + bool "curl" + select BR2_PACKAGE_LIBCURL + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DIRECTFB + bool "directfb" + select BR2_PACKAGE_DIRECTFB + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DVB + bool "dvb" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FBDEV + bool "fbdev" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FAAD + bool "faad" + select BR2_PACKAGE_FAAD2 + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LIBMMS + bool "libmms" + depends on BR2_USE_WCHAR # libmms -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libmms -> libglib2 + select BR2_PACKAGE_LIBMMS + +comment "libmms needs a toolchain w/ wchar, threads" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MUSEPACK + bool "musepack" + select BR2_PACKAGE_MUSEPACK + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_NEON + bool "neon" + select BR2_PACKAGE_NEON + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_OPUS + bool "opus" + select BR2_PACKAGE_OPUS + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_RSVG + bool "rsvg" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR # librsvg -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # librsvg -> libglib2 + select BR2_PACKAGE_LIBRSVG + +comment "rsvg plugin needs a toolchain w/ C++, wchar, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SDL + bool "sdl" + select BR2_PACKAGE_SDL + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SNDFILE + bool "sndfile" + select BR2_PACKAGE_LIBSNDFILE + depends on BR2_LARGEFILE + +comment "gst-plugins-bad-plugin-sndfile needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VCD + bool "vcd" + +endif + diff --git a/package/gstreamer/gst-plugins-bad/gst-plugins-bad-0002-fix-dfb-example.patch b/package/gstreamer/gst-plugins-bad/gst-plugins-bad-0002-fix-dfb-example.patch new file mode 100644 index 0000000000..b2057484cd --- /dev/null +++ b/package/gstreamer/gst-plugins-bad/gst-plugins-bad-0002-fix-dfb-example.patch @@ -0,0 +1,22 @@ +Fix dfb-example + +Order of inclusion gives a strange effect on the definition of +gst_debug_log. Swapping the include statements solve it. + +Not upstreamed since there will be no more updates to this version +of gst-plugins-bad. + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- +diff -rup gst-plugins-bad-0.10.23/ext/directfb/dfb-example.c gst-plugins-bad-0.10.23.fixed/ext/directfb/dfb-example.c +--- gst-plugins-bad-0.10.23/ext/directfb/dfb-example.c 2011-12-11 19:49:11.000000000 +0100 ++++ gst-plugins-bad-0.10.23.fixed/ext/directfb/dfb-example.c 2013-05-13 00:32:00.507469138 +0200 +@@ -1,7 +1,7 @@ + +-#include + #include + #include ++#include + + static IDirectFB *dfb = NULL; + static IDirectFBSurface *primary = NULL; diff --git a/package/gstreamer/gst-plugins-bad/gst-plugins-bad-opus-jpegformat-unbreak-non-debug-build.patch b/package/gstreamer/gst-plugins-bad/gst-plugins-bad-opus-jpegformat-unbreak-non-debug-build.patch new file mode 100644 index 0000000000..2c98c3e102 --- /dev/null +++ b/package/gstreamer/gst-plugins-bad/gst-plugins-bad-opus-jpegformat-unbreak-non-debug-build.patch @@ -0,0 +1,78 @@ +From 1725e702a3622cb45c8142622dd419fa0c410ac9 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Wed, 12 Sep 2012 09:10:35 +0200 +Subject: [PATCH] gst-plugins-bad: opus + jpegformat: unbreak non-debug build + +opus + jpegformat plugin builds fail when gstreamer is configured with +--disable-gst-debug as they are checking the GST_DISABLE_DEBUG symbol +instead of GST_DISABLE_GST_DEBUG. + +Submitted upstream as https://bugzilla.gnome.org/show_bug.cgi?id=683850 + +Signed-off-by: Peter Korsgaard +--- + ext/opus/gstopusdec.c | 2 +- + ext/opus/gstopusenc.c | 4 ++-- + gst/jpegformat/gstjpegparse.c | 4 ++-- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/ext/opus/gstopusdec.c b/ext/opus/gstopusdec.c +index 0e2805c..ab7221d 100644 +--- a/ext/opus/gstopusdec.c ++++ b/ext/opus/gstopusdec.c +@@ -357,7 +357,7 @@ opus_dec_chain_parse_data (GstOpusDec * dec, GstBuffer * buffer) + + GST_DEBUG_OBJECT (dec, "Creating decoder with %d channels, %d Hz", + dec->n_channels, dec->sample_rate); +-#ifndef GST_DISABLE_DEBUG ++#ifndef GST_DISABLE_GST_DEBUG + gst_opus_common_log_channel_mapping_table (GST_ELEMENT (dec), opusdec_debug, + "Mapping table", dec->n_channels, dec->channel_mapping); + #endif +diff --git a/ext/opus/gstopusenc.c b/ext/opus/gstopusenc.c +index 240a2cb..d991795 100644 +--- a/ext/opus/gstopusenc.c ++++ b/ext/opus/gstopusenc.c +@@ -589,7 +589,7 @@ gst_opus_enc_setup_channel_mappings (GstOpusEnc * enc, + } + } + +-#ifndef GST_DISABLE_DEBUG ++#ifndef GST_DISABLE_GST_DEBUG + GST_INFO_OBJECT (enc, + "Mapping tables built: %d channels, %d stereo streams", enc->n_channels, + enc->n_stereo_streams); +@@ -654,7 +654,7 @@ gst_opus_enc_setup (GstOpusEnc * enc) + { + int error = OPUS_OK; + +-#ifndef GST_DISABLE_DEBUG ++#ifndef GST_DISABLE_GST_DEBUG + GST_DEBUG_OBJECT (enc, + "setup: %d Hz, %d channels, %d stereo streams, family %d", + enc->sample_rate, enc->n_channels, enc->n_stereo_streams, +diff --git a/gst/jpegformat/gstjpegparse.c b/gst/jpegformat/gstjpegparse.c +index f984a52..b4af9ed 100644 +--- a/gst/jpegformat/gstjpegparse.c ++++ b/gst/jpegformat/gstjpegparse.c +@@ -545,7 +545,7 @@ gst_jpeg_parse_skip_marker (GstJpegParse * parse, + if (!gst_byte_reader_get_uint16_be (reader, &size)) + return FALSE; + +-#ifndef GST_DISABLE_DEBUG ++#ifndef GST_DISABLE_GST_DEBUG + /* We'd pry the id of the skipped application segment */ + if (marker >= APP0 && marker <= APP15) { + const gchar *id_str = NULL; +@@ -561,7 +561,7 @@ gst_jpeg_parse_skip_marker (GstJpegParse * parse, + #else + GST_DEBUG_OBJECT (parse, "unhandled marker %x skiping %u bytes", marker, + size); +-#endif // GST_DISABLE_DEBUG ++#endif // GST_DISABLE_GST_DEBUG + + if (!gst_byte_reader_skip (reader, size - 2)) + return FALSE; +-- +1.7.10 + diff --git a/package/gstreamer/gst-plugins-bad/gst-plugins-bad.mk b/package/gstreamer/gst-plugins-bad/gst-plugins-bad.mk new file mode 100644 index 0000000000..337f7566ff --- /dev/null +++ b/package/gstreamer/gst-plugins-bad/gst-plugins-bad.mk @@ -0,0 +1,581 @@ +################################################################################ +# +# gst-plugins-bad +# +################################################################################ + +GST_PLUGINS_BAD_VERSION = 0.10.23 +GST_PLUGINS_BAD_SOURCE = gst-plugins-bad-$(GST_PLUGINS_BAD_VERSION).tar.xz +GST_PLUGINS_BAD_SITE = http://gstreamer.freedesktop.org/src/gst-plugins-bad + +GST_PLUGINS_BAD_CONF_OPT = \ + --disable-examples + +GST_PLUGINS_BAD_DEPENDENCIES = gst-plugins-base gstreamer + +ifeq ($(BR2_PACKAGE_ORC),y) +GST_PLUGINS_BAD_DEPENDENCIES += orc +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_ADPCMDEC),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-adpcmdec +else +GST_PLUGINS_BAD_CONF_OPT += --disable-adpcmdec +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_ADPCMENC),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-adpcmenc +else +GST_PLUGINS_BAD_CONF_OPT += --disable-adpcmenc +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_AIFF),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-aiff +else +GST_PLUGINS_BAD_CONF_OPT += --disable-aiff +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_ASFMUX),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-asfmux +else +GST_PLUGINS_BAD_CONF_OPT += --disable-asfmux +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_AUDIOVISUALIZERS),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-audiovisualizers +else +GST_PLUGINS_BAD_CONF_OPT += --disable-audiovisualizers +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_AUTOCONVERT),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-autoconvert +else +GST_PLUGINS_BAD_CONF_OPT += --disable-autoconvert +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_BAYER),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-bayer +else +GST_PLUGINS_BAD_CONF_OPT += --disable-bayer +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CAMERABIN),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-camerabin +else +GST_PLUGINS_BAD_CONF_OPT += --disable-camerabin +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CAMERABIN2),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-camerabin2 +else +GST_PLUGINS_BAD_CONF_OPT += --disable-camerabin2 +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CDXAPARSE),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-cdxaparse +else +GST_PLUGINS_BAD_CONF_OPT += --disable-cdxaparse +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_COLOREFFECTS),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-coloreffects +else +GST_PLUGINS_BAD_CONF_OPT += --disable-coloreffects +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_COLORSPACE),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-colorspace +else +GST_PLUGINS_BAD_CONF_OPT += --disable-colorspace +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DATAURISRC),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-dataurisrc +else +GST_PLUGINS_BAD_CONF_OPT += --disable-dataurisrc +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DCCP),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-dccp +else +GST_PLUGINS_BAD_CONF_OPT += --disable-dccp +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DEBUGUTILS),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-debugutils +else +GST_PLUGINS_BAD_CONF_OPT += --disable-debugutils +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DECKLINK),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-decklink +else +GST_PLUGINS_BAD_CONF_OPT += --disable-decklink +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DTMF),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-dtmf +else +GST_PLUGINS_BAD_CONF_OPT += --disable-dtmf +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DVBSUBOVERLAY),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-dvbsuboverlay +else +GST_PLUGINS_BAD_CONF_OPT += --disable-dvbsuboverlay +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DVDSPU),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-dvdspu +else +GST_PLUGINS_BAD_CONF_OPT += --disable-dvdspu +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FACEOVERLAY),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-faceoverlay +else +GST_PLUGINS_BAD_CONF_OPT += --disable-faceoverlay +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FESTIVAL),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-festival +else +GST_PLUGINS_BAD_CONF_OPT += --disable-festival +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FIELDANALYSIS),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-fieldanalysis +else +GST_PLUGINS_BAD_CONF_OPT += --disable-fieldanalysis +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FREEZE),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-freeze +else +GST_PLUGINS_BAD_CONF_OPT += --disable-freeze +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FREEVERB),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-freeverb +else +GST_PLUGINS_BAD_CONF_OPT += --disable-freeverb +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FREI0R),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-frei0r +else +GST_PLUGINS_BAD_CONF_OPT += --disable-frei0r +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_GAUDIEFFECTS),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-gaudieffects +else +GST_PLUGINS_BAD_CONF_OPT += --disable-gaudieffects +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_GEOMETRICTRANSFORM),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-geometrictransform +else +GST_PLUGINS_BAD_CONF_OPT += --disable-geometrictransform +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_GSETTINGS),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-gsettings +else +GST_PLUGINS_BAD_CONF_OPT += --disable-gsettings +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_H264PARSE),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-h264parse +else +GST_PLUGINS_BAD_CONF_OPT += --disable-h264parse +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_HDVPARSE),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-hdvparse +else +GST_PLUGINS_BAD_CONF_OPT += --disable-hdvparse +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_HLS),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-hls +else +GST_PLUGINS_BAD_CONF_OPT += --disable-hls +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_ID3TAG),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-id3tag +else +GST_PLUGINS_BAD_CONF_OPT += --disable-id3tag +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_INTER),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-inter +else +GST_PLUGINS_BAD_CONF_OPT += --disable-inter +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_INTERLACE),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-interlace +else +GST_PLUGINS_BAD_CONF_OPT += --disable-interlace +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_IVFPARSE),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-ivfparse +else +GST_PLUGINS_BAD_CONF_OPT += --disable-ivfparse +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_JP2KDECIMATOR),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-jp2kdecimator +else +GST_PLUGINS_BAD_CONF_OPT += --disable-jp2kdecimator +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_JPEGFORMAT),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-jpegformat +else +GST_PLUGINS_BAD_CONF_OPT += --disable-jpegformat +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LEGACYRESAMPLE),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-legacyresample +else +GST_PLUGINS_BAD_CONF_OPT += --disable-legacyresample +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LIBRFB),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-librfb +else +GST_PLUGINS_BAD_CONF_OPT += --disable-librfb +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LINSYS),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-linsys +else +GST_PLUGINS_BAD_CONF_OPT += --disable-linsys +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LIVEADDER),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-liveadder +else +GST_PLUGINS_BAD_CONF_OPT += --disable-liveadder +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGDEMUX),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-mpegdemux +else +GST_PLUGINS_BAD_CONF_OPT += --disable-mpegdemux +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGPSMUX),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-mpegpsmux +else +GST_PLUGINS_BAD_CONF_OPT += --disable-mpegpsmux +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGTSDEMUX),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-mpegtsdemux +else +GST_PLUGINS_BAD_CONF_OPT += --disable-mpegtsdemux +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGTSMUX),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-mpegtsmux +else +GST_PLUGINS_BAD_CONF_OPT += --disable-mpegtsmux +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGVIDEOPARSE),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-mpegvideoparse +else +GST_PLUGINS_BAD_CONF_OPT += --disable-mpegvideoparse +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MVE),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-mve +else +GST_PLUGINS_BAD_CONF_OPT += --disable-mve +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MXF),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-mxf +else +GST_PLUGINS_BAD_CONF_OPT += --disable-mxf +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_NSF),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-nsf +else +GST_PLUGINS_BAD_CONF_OPT += --disable-nsf +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_NUVDEMUX),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-nuvdemux +else +GST_PLUGINS_BAD_CONF_OPT += --disable-nuvdemux +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_PATCHDETECT),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-patchdetect +else +GST_PLUGINS_BAD_CONF_OPT += --disable-patchdetect +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_PCAPPARSE),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-pcapparse +else +GST_PLUGINS_BAD_CONF_OPT += --disable-pcapparse +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_PNM),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-pnm +else +GST_PLUGINS_BAD_CONF_OPT += --disable-pnm +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_RAWPARSE),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-rawparse +else +GST_PLUGINS_BAD_CONF_OPT += --disable-rawparse +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_REAL),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-real +else +GST_PLUGINS_BAD_CONF_OPT += --disable-real +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_REMOVESILENCE),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-removesilence +else +GST_PLUGINS_BAD_CONF_OPT += --disable-removesilence +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_RTPMUX),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-rtpmux +else +GST_PLUGINS_BAD_CONF_OPT += --disable-rtpmux +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_RTPVP8),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-rtpvp8 +else +GST_PLUGINS_BAD_CONF_OPT += --disable-rtpvp8 +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SCALETEMPO),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-scaletempo +else +GST_PLUGINS_BAD_CONF_OPT += --disable-scaletempo +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SDI),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-sdi +else +GST_PLUGINS_BAD_CONF_OPT += --disable-sdi +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SDP),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-sdp +else +GST_PLUGINS_BAD_CONF_OPT += --disable-sdp +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SEGMENTCLIP),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-segmentclip +else +GST_PLUGINS_BAD_CONF_OPT += --disable-segmentclip +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SIREN),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-siren +else +GST_PLUGINS_BAD_CONF_OPT += --disable-siren +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SMOOTH),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-smooth +else +GST_PLUGINS_BAD_CONF_OPT += --disable-smooth +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SPEED),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-speed +else +GST_PLUGINS_BAD_CONF_OPT += --disable-speed +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SUBENC),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-subenc +else +GST_PLUGINS_BAD_CONF_OPT += --disable-subenc +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_STEREO),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-stereo +else +GST_PLUGINS_BAD_CONF_OPT += --disable-stereo +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_TTA),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-tta +else +GST_PLUGINS_BAD_CONF_OPT += --disable-tta +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VIDEOFILTERS),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-videofilters +else +GST_PLUGINS_BAD_CONF_OPT += --disable-videofilters +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VIDEOMAXRATE),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-videomaxrate +else +GST_PLUGINS_BAD_CONF_OPT += --disable-videomaxrate +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VIDEOMEASURE),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-videomeasure +else +GST_PLUGINS_BAD_CONF_OPT += --disable-videomeasure +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VIDEOPARSERS),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-videoparsers +else +GST_PLUGINS_BAD_CONF_OPT += --disable-videoparsers +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VIDEOSIGNAL),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-videosignal +else +GST_PLUGINS_BAD_CONF_OPT += --disable-videosignal +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VMNC),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-vmnc +else +GST_PLUGINS_BAD_CONF_OPT += --disable-vmnc +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_Y4M),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-y4m +else +GST_PLUGINS_BAD_CONF_OPT += --disable-y4m +endif + +# plugins with deps +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_APEXSINK),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-apexsink +GST_PLUGINS_BAD_DEPENDENCIES += openssl +else +GST_PLUGINS_BAD_CONF_OPT += --disable-apexsink +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_BZ2),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-bz2 +GST_PLUGINS_BAD_DEPENDENCIES += bzip2 +else +GST_PLUGINS_BAD_CONF_OPT += --disable-bz2 +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CDAUDIO),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-cdaudio +GST_PLUGINS_BAD_DEPENDENCIES += libcdaudio +else +GST_PLUGINS_BAD_CONF_OPT += --disable-cdaudio +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CURL),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-curl +GST_PLUGINS_BAD_DEPENDENCIES += libcurl +else +GST_PLUGINS_BAD_CONF_OPT += --disable-curl +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DIRECTFB),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-directfb +GST_PLUGINS_BAD_DEPENDENCIES += directfb +else +GST_PLUGINS_BAD_CONF_OPT += --disable-directfb +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DVB),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-dvb +else +GST_PLUGINS_BAD_CONF_OPT += --disable-dvb +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FAAD),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-faad +GST_PLUGINS_BAD_DEPENDENCIES += faad2 +else +GST_PLUGINS_BAD_CONF_OPT += --disable-faad +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FBDEV),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-fbdev +else +GST_PLUGINS_BAD_CONF_OPT += --disable-fbdev +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LIBMMS),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-libmms +GST_PLUGINS_BAD_DEPENDENCIES += libmms +else +GST_PLUGINS_BAD_CONF_OPT += --disable-libmms +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MUSEPACK),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-musepack +GST_PLUGINS_BAD_DEPENDENCIES += musepack +else +GST_PLUGINS_BAD_CONF_OPT += --disable-musepack +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_NEON),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-neon +GST_PLUGINS_BAD_DEPENDENCIES += neon +else +GST_PLUGINS_BAD_CONF_OPT += --disable-neon +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_OPUS),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-opus +GST_PLUGINS_BAD_DEPENDENCIES += opus +else +GST_PLUGINS_BAD_CONF_OPT += --disable-opus +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_RSVG),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-rsvg +GST_PLUGINS_BAD_DEPENDENCIES += librsvg +else +GST_PLUGINS_BAD_CONF_OPT += --disable-rsvg +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SDL),y) +GST_PLUGINS_BAD_CONF_ENV += ac_cv_path_SDL_CONFIG=$(STAGING_DIR)/usr/bin/sdl-config +GST_PLUGINS_BAD_CONF_OPT += --enable-sdl +GST_PLUGINS_BAD_DEPENDENCIES += sdl +else +GST_PLUGINS_BAD_CONF_OPT += --disable-sdl +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SNDFILE),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-sndfile +GST_PLUGINS_BAD_DEPENDENCIES += libsndfile +else +GST_PLUGINS_BAD_CONF_OPT += --disable-sndfile +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VCD),y) +GST_PLUGINS_BAD_CONF_OPT += --enable-vcd +else +GST_PLUGINS_BAD_CONF_OPT += --disable-vcd +endif + +$(eval $(autotools-package)) diff --git a/package/gstreamer/gst-plugins-base/Config.in b/package/gstreamer/gst-plugins-base/Config.in new file mode 100644 index 0000000000..20c2d3609c --- /dev/null +++ b/package/gstreamer/gst-plugins-base/Config.in @@ -0,0 +1,110 @@ +menuconfig BR2_PACKAGE_GST_PLUGINS_BASE + bool "gst-plugins-base" + depends on BR2_PACKAGE_GSTREAMER + select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXV if BR2_PACKAGE_XORG7 + help + A basic set of well-supported plug-ins for GStreamer. + + http://gstreamer.freedesktop.org/ + +if BR2_PACKAGE_GST_PLUGINS_BASE + +comment "dependency-less plugins" + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_ADDER + bool "adder" + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_APP + bool "app" + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_AUDIOCONVERT + bool "audioconvert (mandatory for audio playback)" + default y + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_AUDIORATE + bool "audiorate" + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_AUDIORESAMPLE + bool "audioresample (mandatory for audio playback)" + default y + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_AUDIOTESTSRC + bool "audiotestsrc" + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_ENCODING + bool "encoding" + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_FFMPEGCOLORSPACE + bool "ffmpegcolorspace (mandatory for video playback)" + default y + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_GDP + bool "gdp" + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_PLAYBACK + bool "playback (mandatory)" + default y + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_SUBPARSE + bool "subparse" + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_TCP + bool "tcp" + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_TYPEFIND + bool "typefind (mandatory)" + default y + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_VIDEOTESTSRC + bool "videotestsrc" + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_VIDEORATE + bool "videorate" + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_VIDEOSCALE + bool "videoscale (mandatory for video playback)" + default y + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_VOLUME + bool "volume (mandatory for audio playback)" + default y + +comment "plugins with external dependencies (there may be more available)" + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_ALSA + bool "alsa (mandatory for audio playback)" + select BR2_PACKAGE_ALSA_LIB + select BR2_PACKAGE_ALSA_LIB_MIXER + select BR2_PACKAGE_ALSA_LIB_PCM + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_OGG + bool "ogg (*.ogg audio/video)" + select BR2_PACKAGE_LIBOGG + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_PANGO + bool "pango font renderer" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR # pango -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # pango -> libglib2 + select BR2_PACKAGE_PANGO + +comment "pango plugin needs a toolchain w/ C++, wchar, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_THEORA + bool "theora (*.ogg video)" + select BR2_PACKAGE_LIBTHEORA + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_TREMOR + bool "tremor" + select BR2_PACKAGE_TREMOR + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_VORBIS + bool "vorbis (*.ogg audio)" + select BR2_PACKAGE_LIBVORBIS + +endif + diff --git a/package/gstreamer/gst-plugins-base/gst-plugins-base-tremor.patch b/package/gstreamer/gst-plugins-base/gst-plugins-base-tremor.patch new file mode 100644 index 0000000000..fa8785bed4 --- /dev/null +++ b/package/gstreamer/gst-plugins-base/gst-plugins-base-tremor.patch @@ -0,0 +1,139 @@ +From 0088753651350de3060ece22c1be4153b6009515 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Wed, 25 Jan 2012 23:53:04 +0100 +Subject: [PATCH] base: vorbisdeclib: support modern Tremor versions + +Reported upstream as https://bugzilla.gnome.org/show_bug.cgi?id=668726 + +Tremor changed to use standard libogg rather than its own incompatible +copy back in Aug 2010 (r17375), causing gst-plugin-base build to fail. + +Tremolo so far unfortunately hasn't been updated. Restructure +vorbisdeclib.h so the legacy _ogg_packet_wrapper code is only used for +Tremolo. + +Signed-off-by: Peter Korsgaard +--- + ext/vorbis/gstvorbisdeclib.h | 77 ++++++++++++++++++++++------------------- + 1 files changed, 41 insertions(+), 36 deletions(-) + +diff --git a/ext/vorbis/gstvorbisdeclib.h b/ext/vorbis/gstvorbisdeclib.h +index ca00af9..e147591 100644 +--- a/ext/vorbis/gstvorbisdeclib.h ++++ b/ext/vorbis/gstvorbisdeclib.h +@@ -29,11 +29,6 @@ + + #ifndef TREMOR + +-#include +- +-typedef float vorbis_sample_t; +-typedef ogg_packet ogg_packet_wrapper; +- + #define GST_VORBIS_DEC_DESCRIPTION "decode raw vorbis streams to float audio" + + #define GST_VORBIS_DEC_SRC_CAPS \ +@@ -47,6 +42,42 @@ typedef ogg_packet ogg_packet_wrapper; + + #define GST_VORBIS_DEC_GLIB_TYPE_NAME GstVorbisDec + ++#else /* TREMOR */ ++ ++#define GST_VORBIS_DEC_DESCRIPTION "decode raw vorbis streams to integer audio" ++ ++#define GST_VORBIS_DEC_SRC_CAPS \ ++ GST_STATIC_CAPS ("audio/x-raw-int, " \ ++ "rate = (int) [ 1, MAX ], " \ ++ "channels = (int) [ 1, 6 ], " \ ++ "endianness = (int) BYTE_ORDER, " \ ++ "width = (int) { 16, 32 }, " \ ++ "depth = (int) 16, " \ ++ "signed = (boolean) true") ++ ++#define GST_VORBIS_DEC_DEFAULT_SAMPLE_WIDTH (16) ++ ++/* we need a different type name here */ ++#define GST_VORBIS_DEC_GLIB_TYPE_NAME GstIVorbisDec ++ ++/* and still have it compile */ ++typedef struct _GstVorbisDec GstIVorbisDec; ++typedef struct _GstVorbisDecClass GstIVorbisDecClass; ++ ++#endif /* TREMOR */ ++ ++#ifndef USE_TREMOLO ++ ++#ifdef TREMOR ++ #include ++ typedef ogg_int32_t vorbis_sample_t; ++#else ++ #include ++ typedef float vorbis_sample_t; ++#endif ++ ++typedef ogg_packet ogg_packet_wrapper; ++ + static inline guint8 * + gst_ogg_packet_data (ogg_packet * p) + { +@@ -72,17 +103,11 @@ gst_ogg_packet_from_wrapper (ogg_packet_wrapper * packet) + return packet; + } + +-#else +- +-#ifdef USE_TREMOLO +- #include +- #include +- typedef ogg_int16_t vorbis_sample_t; +-#else +- #include +- typedef ogg_int32_t vorbis_sample_t; +-#endif ++#else /* USE_TREMOLO */ + ++#include ++#include ++typedef ogg_int16_t vorbis_sample_t; + typedef struct _ogg_packet_wrapper ogg_packet_wrapper; + + struct _ogg_packet_wrapper { +@@ -91,26 +116,6 @@ struct _ogg_packet_wrapper { + ogg_buffer buf; + }; + +-#define GST_VORBIS_DEC_DESCRIPTION "decode raw vorbis streams to integer audio" +- +-#define GST_VORBIS_DEC_SRC_CAPS \ +- GST_STATIC_CAPS ("audio/x-raw-int, " \ +- "rate = (int) [ 1, MAX ], " \ +- "channels = (int) [ 1, 6 ], " \ +- "endianness = (int) BYTE_ORDER, " \ +- "width = (int) { 16, 32 }, " \ +- "depth = (int) 16, " \ +- "signed = (boolean) true") +- +-#define GST_VORBIS_DEC_DEFAULT_SAMPLE_WIDTH (16) +- +-/* we need a different type name here */ +-#define GST_VORBIS_DEC_GLIB_TYPE_NAME GstIVorbisDec +- +-/* and still have it compile */ +-typedef struct _GstVorbisDec GstIVorbisDec; +-typedef struct _GstVorbisDecClass GstIVorbisDecClass; +- + /* compensate minor variation */ + #define vorbis_synthesis(a, b) vorbis_synthesis (a, b, 1) + +@@ -154,7 +159,7 @@ gst_ogg_packet_from_wrapper (ogg_packet_wrapper * packet) + return &(packet->packet); + } + +-#endif ++#endif /* USE_TREMOLO */ + + typedef void (*CopySampleFunc)(vorbis_sample_t *out, vorbis_sample_t **in, + guint samples, gint channels, gint width); +-- +1.7.8.3 + diff --git a/package/multimedia/gst-plugins-base/gst-plugins-base.mk b/package/gstreamer/gst-plugins-base/gst-plugins-base.mk similarity index 78% rename from package/multimedia/gst-plugins-base/gst-plugins-base.mk rename to package/gstreamer/gst-plugins-base/gst-plugins-base.mk index 1d0b19dd61..6c7233ba4a 100644 --- a/package/multimedia/gst-plugins-base/gst-plugins-base.mk +++ b/package/gstreamer/gst-plugins-base/gst-plugins-base.mk @@ -1,10 +1,11 @@ -############################################################# +################################################################################ # # gst-plugins-base # -############################################################# -GST_PLUGINS_BASE_VERSION = 0.10.32 -GST_PLUGINS_BASE_SOURCE = gst-plugins-base-$(GST_PLUGINS_BASE_VERSION).tar.bz2 +################################################################################ + +GST_PLUGINS_BASE_VERSION = 0.10.36 +GST_PLUGINS_BASE_SOURCE = gst-plugins-base-$(GST_PLUGINS_BASE_VERSION).tar.xz GST_PLUGINS_BASE_SITE = http://gstreamer.freedesktop.org/src/gst-plugins-base GST_PLUGINS_BASE_INSTALL_STAGING = YES @@ -17,17 +18,30 @@ GST_PLUGINS_BASE_CONF_ENV = GST_PLUGINS_BASE_CONF_OPT = \ --disable-examples \ - --disable-x \ - --disable-xvideo \ - --disable-xshm \ --disable-oggtest \ --disable-vorbistest \ --disable-freetypetest GST_PLUGINS_BASE_DEPENDENCIES = gstreamer -# alsa support needs pcm+mixer support, but configure fails to check for it -ifeq ($(BR2_PACKAGE_ALSA_LIB)$(BR2_PACKAGE_ALSA_LIB_MIXER)$(BR2_PACKAGE_ALSA_LIB_PCM),yyy) +ifeq ($(BR2_PACKAGE_XORG7),y) +GST_PLUGINS_BASE_DEPENDENCIES += xlib_libX11 xlib_libXext xlib_libXv +GST_PLUGINS_BASE_CONF_OPT += \ + --enable-x \ + --enable-xshm \ + --enable-xvideo +else +GST_PLUGINS_BASE_CONF_OPT += \ + --disable-x \ + --disable-xshm \ + --disable-xvideo +endif + +ifeq ($(BR2_PACKAGE_ORC),y) +GST_PLUGINS_BASE_DEPENDENCIES += orc +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_ALSA),y) GST_PLUGINS_BASE_DEPENDENCIES += alsa-lib else GST_PLUGINS_BASE_CONF_OPT += --disable-alsa @@ -69,6 +83,12 @@ else GST_PLUGINS_BASE_CONF_OPT += --disable-audiotestsrc endif +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_ENCODING),y) +GST_PLUGINS_BASE_CONF_OPT += --enable-encoding +else +GST_PLUGINS_BASE_CONF_OPT += --disable-encoding +endif + ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_FFMPEGCOLORSPACE),y) GST_PLUGINS_BASE_CONF_OPT += --enable-ffmpegcolorspace else @@ -150,6 +170,13 @@ else GST_PLUGINS_BASE_CONF_OPT += --disable-theora endif +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_TREMOR),y) +GST_PLUGINS_BASE_CONF_OPT += --enable-ivorbis +GST_PLUGINS_BASE_DEPENDENCIES += tremor +else +GST_PLUGINS_BASE_CONF_OPT += --disable-ivorbis +endif + ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_VORBIS),y) GST_PLUGINS_BASE_CONF_OPT += --enable-vorbis GST_PLUGINS_BASE_DEPENDENCIES += libvorbis @@ -157,4 +184,10 @@ else GST_PLUGINS_BASE_CONF_OPT += --disable-vorbis endif -$(eval $(call AUTOTARGETS,package/multimedia,gst-plugins-base)) +ifeq ($(BR2_PACKAGE_ZLIB),y) +GST_PLUGINS_BASE_DEPENDENCIES += zlib +else +GST_PLUGINS_BASE_CONF_OPT += --disable-zlib +endif + +$(eval $(autotools-package)) diff --git a/package/gstreamer/gst-plugins-good/Config.in b/package/gstreamer/gst-plugins-good/Config.in new file mode 100644 index 0000000000..bc2c293f06 --- /dev/null +++ b/package/gstreamer/gst-plugins-good/Config.in @@ -0,0 +1,227 @@ +menuconfig BR2_PACKAGE_GST_PLUGINS_GOOD + bool "gst-plugins-good" + depends on BR2_PACKAGE_GSTREAMER + select BR2_PACKAGE_GST_PLUGINS_BASE + help + A set of well-supported plug-ins for GStreamer under the preferred + license. + + http://gstreamer.freedesktop.org/ + +if BR2_PACKAGE_GST_PLUGINS_GOOD + +config BR2_PACKAGE_GST_PLUGINS_GOOD_JPEG + bool "jpeg (JPEG support)" + select BR2_PACKAGE_JPEG + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PNG + bool "png (PNG support)" + select BR2_PACKAGE_LIBPNG + +config BR2_PACKAGE_GST_PLUGINS_GOOD_BZ2 + bool "bz2 support" + depends on BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_MATROSKA + select BR2_PACKAGE_BZIP2 + help + Enable bz2 support for the following plugins: + matroska + +config BR2_PACKAGE_GST_PLUGINS_GOOD_ZLIB + bool "zlib support" + depends on BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_QTDEMUX || BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ID3DEMUX || BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_MATROSKA + select BR2_PACKAGE_ZLIB + help + Enable zlib support for the following plugins: + id3demux, qtdemux, matroska + +comment "dependency-less plugins" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ALPHA + bool "alpha" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_APETAG + bool "apetag" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_AUDIOFX + bool "audiofx" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_AUDIOPARSERS + bool "audioparsers" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_AUPARSE + bool "auparse" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_AUTODETECT + bool "autodetect" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_AVI + bool "avi (*.avi video)" + default y + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_CUTTER + bool "cutter" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_DEBUGUTILS + bool "debugutils" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_DEINTERLACE + bool "deinterlace" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_EFFECTV + bool "effectv" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_EQUALIZER + bool "equalizer" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_FLV + bool "flv" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_FLX + bool "flx" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_GOOM + bool "goom" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_GOOM2K1 + bool "goom2k1" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ID3DEMUX + bool "id3demux (*.mp3 audio)" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ICYDEMUX + bool "icydemux" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_IMAGEFREEZE + bool "imagefreeze" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_INTERLEAVE + bool "interleave" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ISOMP4 + bool "isomp4" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_LAW + bool "law" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_LEVEL + bool "level" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_MATROSKA + bool "matroska" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_MONOSCOPE + bool "monoscope" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_MULTIFILE + bool "multifile" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_MULTIPART + bool "multipart" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_REPLAYGAIN + bool "replaygain" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_RTP + bool "rtp" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_RTPMANAGER + bool "rtpmanager" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_RTSP + bool "rtsp" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_SHAPEWIPE + bool "shapewipe" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_SMPTE + bool "smpte" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_SPECTRUM + bool "spectrum" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_UDP + depends on BR2_INET_IPV6 + bool "udp" + +comment "udp needs a toolchain w/ IPv6" + depends on !BR2_INET_IPV6 + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_VIDEOBOX + bool "videobox" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_VIDEOCROP + bool "videocrop" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_VIDEOFILTER + bool "videofilter" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_VIDEOMIXER + bool "videomixer" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_WAVENC + bool "wavenc" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_WAVPARSE + bool "wavparse (*.wav audio)" + default y + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_Y4M + bool "y4m" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_V4L2 + bool "v4l2" + +comment "plugins with external dependencies" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ANNODEX + bool "annodex (XML Library)" + select BR2_PACKAGE_LIBXML2 + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_CAIRO + bool "cairo" + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_CAIRO_PNG + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_FLAC + bool "flac (libFLAC)" + select BR2_PACKAGE_FLAC + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_GDKPIXBUF + bool "gdkpixbuf" + depends on BR2_USE_WCHAR # gdk-pixbuf -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # gdk-pixbuf -> libglib2 + select BR2_PACKAGE_GDK_PIXBUF + +comment "gdkpixbuf needs a toolchain w/ wchar, threads" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_OSS + bool "ossaudio (OSS audio)" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_OSS4 + bool "oss4 (Open Sound System 4)" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_PULSE + depends on BR2_TOOLCHAIN_HAS_THREADS # pulseaudio + depends on BR2_LARGEFILE # pulseaudio -> libsndfile + select BR2_PACKAGE_PULSEAUDIO + bool "pulseaudio" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_SOUPHTTPSRC + bool "souphttpsrc (http client)" + depends on BR2_USE_WCHAR # libsoup -> glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libsoup -> glib2 + select BR2_PACKAGE_LIBSOUP + +comment "souphttpsrc needs a toolchain w/ wchar, threads" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREAD + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_SPEEX + bool "speex" + select BR2_PACKAGE_SPEEX + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_WAVPACK + bool "wavpack (*.wv audio)" + select BR2_PACKAGE_WAVPACK + +endif diff --git a/package/gstreamer/gst-plugins-good/gst-plugins-good-linux36.patch b/package/gstreamer/gst-plugins-good/gst-plugins-good-linux36.patch new file mode 100644 index 0000000000..5d7cd932ed --- /dev/null +++ b/package/gstreamer/gst-plugins-good/gst-plugins-good-linux36.patch @@ -0,0 +1,37 @@ +Fix building with Linux headers 3.6 + +Signed-off-by: Markos Chandras + +From bfb1ac952b4c3caaba0297bbe7dc73ea92f9b292 Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Thu, 09 Aug 2012 07:35:23 +0000 +Subject: v4l2: fix build with recent kernels, the v4l2_buffer input field was removed + +This was unused apparently and removed in the kernel in commit: + + From 2b719d7baf490e24ce7d817c6337b7c87fda84c1 Mon Sep 17 00:00:00 2001 + From: Sakari Ailus + Date: Wed, 2 May 2012 09:40:03 -0300 + Subject: [PATCH] [media] v4l: drop v4l2_buffer.input and V4L2_BUF_FLAG_INPUT + + Remove input field in struct v4l2_buffer and flag V4L2_BUF_FLAG_INPUT which + tells the former is valid. The flag is used by no driver currently. + +https://bugzilla.gnome.org/show_bug.cgi?id=681491 +--- +(limited to 'sys/v4l2/gstv4l2bufferpool.c') + +diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c +index 2e3a563..5aaed5a 100644 +--- a/sys/v4l2/gstv4l2bufferpool.c ++++ b/sys/v4l2/gstv4l2bufferpool.c +@@ -182,7 +182,6 @@ gst_v4l2_buffer_new (GstV4l2BufferPool * pool, guint index, GstCaps * caps) + GST_LOG_OBJECT (pool->v4l2elem, " MMAP offset: %u", + ret->vbuffer.m.offset); + GST_LOG_OBJECT (pool->v4l2elem, " length: %u", ret->vbuffer.length); +- GST_LOG_OBJECT (pool->v4l2elem, " input: %u", ret->vbuffer.input); + + ret->mmap_length = ret->vbuffer.length; + data = (guint8 *) v4l2_mmap (0, ret->vbuffer.length, +-- +cgit v0.9.0.2-2-gbebe diff --git a/package/gstreamer/gst-plugins-good/gst-plugins-good-v4l2-fix-compilation-against-newer-kernel-headers.patch b/package/gstreamer/gst-plugins-good/gst-plugins-good-v4l2-fix-compilation-against-newer-kernel-headers.patch new file mode 100644 index 0000000000..62c3bb24e6 --- /dev/null +++ b/package/gstreamer/gst-plugins-good/gst-plugins-good-v4l2-fix-compilation-against-newer-kernel-headers.patch @@ -0,0 +1,30 @@ +From 8e633d2059cb835448021cf79becb487aff10975 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Mon, 18 Mar 2013 14:59:35 +0000 +Subject: [PATCH] v4l2: fix compilation against newer kernel headers as on + FC19 + +--- + sys/v4l2/v4l2_calls.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/sys/v4l2/v4l2_calls.c b/sys/v4l2/v4l2_calls.c +index 07d390a..4c10f4f 100644 +--- a/sys/v4l2/v4l2_calls.c ++++ b/sys/v4l2/v4l2_calls.c +@@ -291,8 +291,12 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object) + break; + case V4L2_CID_HFLIP: + case V4L2_CID_VFLIP: ++#ifndef V4L2_CID_PAN_RESET + case V4L2_CID_HCENTER: ++#endif ++#ifndef V4L2_CID_TILT_RESET + case V4L2_CID_VCENTER: ++#endif + #ifdef V4L2_CID_PAN_RESET + case V4L2_CID_PAN_RESET: + #endif +-- +1.7.10.4 + diff --git a/package/multimedia/gst-plugins-good/gst-plugins-good.mk b/package/gstreamer/gst-plugins-good/gst-plugins-good.mk similarity index 81% rename from package/multimedia/gst-plugins-good/gst-plugins-good.mk rename to package/gstreamer/gst-plugins-good/gst-plugins-good.mk index 10044e7d8a..c33fd3ad42 100644 --- a/package/multimedia/gst-plugins-good/gst-plugins-good.mk +++ b/package/gstreamer/gst-plugins-good/gst-plugins-good.mk @@ -1,10 +1,11 @@ -############################################################# +################################################################################ # # gst-plugins-good # -############################################################# -GST_PLUGINS_GOOD_VERSION = 0.10.27 -GST_PLUGINS_GOOD_SOURCE = gst-plugins-good-$(GST_PLUGINS_GOOD_VERSION).tar.bz2 +################################################################################ + +GST_PLUGINS_GOOD_VERSION = 0.10.31 +GST_PLUGINS_GOOD_SOURCE = gst-plugins-good-$(GST_PLUGINS_GOOD_VERSION).tar.xz GST_PLUGINS_GOOD_SITE = http://gstreamer.freedesktop.org/src/gst-plugins-good GST_PLUGINS_GOOD_CONF_OPT = \ @@ -14,18 +15,27 @@ GST_PLUGINS_GOOD_CONF_OPT = \ --disable-sunaudio \ --disable-osx_audio \ --disable-osx_video \ - --disable-x \ - --disable-xshm \ - --disable-xvideo \ --disable-aalib \ --disable-aalibtest \ --disable-esd \ --disable-esdtest \ - --disable-shout2 \ - --disable-shout2test + --disable-shout2 GST_PLUGINS_GOOD_DEPENDENCIES = gstreamer gst-plugins-base +ifeq ($(BR2_PACKAGE_XORG7),y) +GST_PLUGINS_GOOD_DEPENDENCIES += xlib_libX11 xlib_libXext xlib_libXv +GST_PLUGINS_GOOD_CONF_OPT += \ + --enable-x \ + --enable-xshm \ + --enable-xvideo +else +GST_PLUGINS_GOOD_CONF_OPT += \ + --disable-x \ + --disable-xshm \ + --disable-xvideo +endif + ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_JPEG),y) GST_PLUGINS_GOOD_CONF_OPT += --enable-jpeg GST_PLUGINS_GOOD_DEPENDENCIES += jpeg @@ -54,12 +64,6 @@ else GST_PLUGINS_GOOD_CONF_OPT += --disable-zlib endif -ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_VIDEOFILTER),y) -GST_PLUGINS_GOOD_CONF_OPT += --enable-videofilter -else -GST_PLUGINS_GOOD_CONF_OPT += --disable-videofilter -endif - ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ALPHA),y) GST_PLUGINS_GOOD_CONF_OPT += --enable-alpha else @@ -78,6 +82,12 @@ else GST_PLUGINS_GOOD_CONF_OPT += --disable-audiofx endif +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_AUDIOPARSERS),y) +GST_PLUGINS_GOOD_CONF_OPT += --enable-audioparsers +else +GST_PLUGINS_GOOD_CONF_OPT += --disable-audioparsers +endif + ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_AUPARSE),y) GST_PLUGINS_GOOD_CONF_OPT += --enable-auparse else @@ -132,6 +142,24 @@ else GST_PLUGINS_GOOD_CONF_OPT += --disable-flv endif +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_FLX),y) +GST_PLUGINS_GOOD_CONF_OPT += --enable-flx +else +GST_PLUGINS_GOOD_CONF_OPT += --disable-flx +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_GOOM),y) +GST_PLUGINS_GOOD_CONF_OPT += --enable-goom +else +GST_PLUGINS_GOOD_CONF_OPT += --disable-goom +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_GOOM2K1),y) +GST_PLUGINS_GOOD_CONF_OPT += --enable-goom2k1 +else +GST_PLUGINS_GOOD_CONF_OPT += --disable-goom2k1 +endif + ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ID3DEMUX),y) GST_PLUGINS_GOOD_CONF_OPT += --enable-id3demux else @@ -144,28 +172,22 @@ else GST_PLUGINS_GOOD_CONF_OPT += --disable-icydemux endif -ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_INTERLEAVE),y) -GST_PLUGINS_GOOD_CONF_OPT += --enable-interleave +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_IMAGEFREEZE),y) +GST_PLUGINS_GOOD_CONF_OPT += --enable-imagefreeze else -GST_PLUGINS_GOOD_CONF_OPT += --disable-interleave +GST_PLUGINS_GOOD_CONF_OPT += --disable-imagefreeze endif -ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_FLX),y) -GST_PLUGINS_GOOD_CONF_OPT += --enable-flx -else -GST_PLUGINS_GOOD_CONF_OPT += --disable-flx -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_GOOM),y) -GST_PLUGINS_GOOD_CONF_OPT += --enable-goom +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_INTERLEAVE),y) +GST_PLUGINS_GOOD_CONF_OPT += --enable-interleave else -GST_PLUGINS_GOOD_CONF_OPT += --disable-goom +GST_PLUGINS_GOOD_CONF_OPT += --disable-interleave endif -ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_GOOM2K1),y) -GST_PLUGINS_GOOD_CONF_OPT += --enable-goom2k1 +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ISOMP4),y) +GST_PLUGINS_GOOD_CONF_OPT += --enable-isomp4 else -GST_PLUGINS_GOOD_CONF_OPT += --disable-goom2k1 +GST_PLUGINS_GOOD_CONF_OPT += --disable-isomp4 endif ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_LAW),y) @@ -204,12 +226,6 @@ else GST_PLUGINS_GOOD_CONF_OPT += --disable-multipart endif -ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_QTDEMUX),y) -GST_PLUGINS_GOOD_CONF_OPT += --enable-qtdemux -else -GST_PLUGINS_GOOD_CONF_OPT += --disable-qtdemux -endif - ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_REPLAYGAIN),y) GST_PLUGINS_GOOD_CONF_OPT += --enable-replaygain else @@ -234,6 +250,12 @@ else GST_PLUGINS_GOOD_CONF_OPT += --disable-rtsp endif +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_SHAPEWIPE),y) +GST_PLUGINS_GOOD_CONF_OPT += --enable-shapewipe +else +GST_PLUGINS_GOOD_CONF_OPT += --disable-shapewipe +endif + ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_SMPTE),y) GST_PLUGINS_GOOD_CONF_OPT += --enable-smpte else @@ -264,6 +286,12 @@ else GST_PLUGINS_GOOD_CONF_OPT += --disable-videocrop endif +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_VIDEOFILTER),y) +GST_PLUGINS_GOOD_CONF_OPT += --enable-videofilter +else +GST_PLUGINS_GOOD_CONF_OPT += --disable-videofilter +endif + ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_VIDEOMIXER),y) GST_PLUGINS_GOOD_CONF_OPT += --enable-videomixer else @@ -315,12 +343,32 @@ else GST_PLUGINS_GOOD_CONF_OPT += --disable-flac endif +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_GDKPIXBUF),y) +GST_PLUGINS_GOOD_CONF_OPT += --enable-gdk_pixbuf +GST_PLUGINS_GOOD_DEPENDENCIES += gdk-pixbuf +else +GST_PLUGINS_GOOD_CONF_OPT += --disable-gdk_pixbuf +endif + ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_OSS),y) GST_PLUGINS_GOOD_CONF_OPT += --enable-oss else GST_PLUGINS_GOOD_CONF_OPT += --disable-oss endif +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_OSS4),y) +GST_PLUGINS_GOOD_CONF_OPT += --enable-oss4 +else +GST_PLUGINS_GOOD_CONF_OPT += --disable-oss4 +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_PULSE),y) +GST_PLUGINS_GOOD_CONF_OPT += --enable-pulse +GST_PLUGINS_GOOD_DEPENDENCIES += pulseaudio +else +GST_PLUGINS_GOOD_CONF_OPT += --disable-pulse +endif + ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_SOUPHTTPSRC),y) GST_PLUGINS_GOOD_CONF_OPT += --enable-soup GST_PLUGINS_GOOD_DEPENDENCIES += libsoup @@ -335,4 +383,11 @@ else GST_PLUGINS_GOOD_CONF_OPT += --disable-speex endif -$(eval $(call AUTOTARGETS,package/multimedia,gst-plugins-good)) +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_WAVPACK),y) +GST_PLUGINS_GOOD_CONF_OPT += --enable-wavpack +GST_PLUGINS_GOOD_DEPENDENCIES += wavpack +else +GST_PLUGINS_GOOD_CONF_OPT += --disable-wavpack +endif + +$(eval $(autotools-package)) diff --git a/package/gstreamer/gst-plugins-ugly/Config.in b/package/gstreamer/gst-plugins-ugly/Config.in new file mode 100644 index 0000000000..c0046e422f --- /dev/null +++ b/package/gstreamer/gst-plugins-ugly/Config.in @@ -0,0 +1,54 @@ +menuconfig BR2_PACKAGE_GST_PLUGINS_UGLY + bool "gst-plugins-ugly" + depends on BR2_PACKAGE_GSTREAMER + select BR2_PACKAGE_GST_PLUGINS_BASE + help + A set of well-supported plug-ins for GStreamer, but might pose + problems for distributors. + + http://gstreamer.freedesktop.org/ + +if BR2_PACKAGE_GST_PLUGINS_UGLY + +comment "dependency-less plugins" + +config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_ASFDEMUX + bool "asfdemux" + +config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_DVDLPCMDEC + bool "dvdlpcmdec" + +config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_DVDSUB + bool "dvdsub" + +config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_IEC958 + bool "iec958" + +config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_MPEGAUDIOPARSE + bool "mpegaudioparse" + +config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_MPEGSTREAM + bool "mpegstream" + +config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_REALMEDIA + bool "realmedia" + +config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_SYNAESTHESIA + bool "synaesthesia" + +comment "plugins with external dependencies (there may be more available)" + +config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_LAME + bool "lame (*.mp3 audio encoder)" + select BR2_PACKAGE_LAME + +config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_MAD + bool "mad (*.mp3 audio)" + select BR2_PACKAGE_LIBID3TAG + select BR2_PACKAGE_LIBMAD + +config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_MPEG2DEC + bool "mpeg2dec" + select BR2_PACKAGE_LIBMPEG2 + +endif diff --git a/package/multimedia/gst-plugins-ugly/gst-plugins-ugly.mk b/package/gstreamer/gst-plugins-ugly/gst-plugins-ugly.mk similarity index 80% rename from package/multimedia/gst-plugins-ugly/gst-plugins-ugly.mk rename to package/gstreamer/gst-plugins-ugly/gst-plugins-ugly.mk index a173df1943..f3a9acb603 100644 --- a/package/multimedia/gst-plugins-ugly/gst-plugins-ugly.mk +++ b/package/gstreamer/gst-plugins-ugly/gst-plugins-ugly.mk @@ -1,10 +1,11 @@ -############################################################# +################################################################################ # # gst-plugins-ugly # -############################################################# -GST_PLUGINS_UGLY_VERSION = 0.10.17 -GST_PLUGINS_UGLY_SOURCE = gst-plugins-ugly-$(GST_PLUGINS_UGLY_VERSION).tar.bz2 +################################################################################ + +GST_PLUGINS_UGLY_VERSION = 0.10.19 +GST_PLUGINS_UGLY_SOURCE = gst-plugins-ugly-$(GST_PLUGINS_UGLY_VERSION).tar.xz GST_PLUGINS_UGLY_SITE = http://gstreamer.freedesktop.org/src/gst-plugins-ugly GST_PLUGINS_UGLY_CONF_OPT = \ @@ -60,16 +61,16 @@ else GST_PLUGINS_UGLY_CONF_OPT += --disable-synaesthesia endif -ifeq ($(BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_ID3TAG),y) -GST_PLUGINS_UGLY_CONF_OPT += --enable-id3tag -GST_PLUGINS_UGLY_DEPENDENCIES += libid3tag +ifeq ($(BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_LAME),y) +GST_PLUGINS_UGLY_CONF_OPT += --enable-lame +GST_PLUGINS_UGLY_DEPENDENCIES += lame else -GST_PLUGINS_UGLY_CONF_OPT += --disable-id3tag +GST_PLUGINS_UGLY_CONF_OPT += --disable-lame endif ifeq ($(BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_MAD),y) GST_PLUGINS_UGLY_CONF_OPT += --enable-mad -GST_PLUGINS_UGLY_DEPENDENCIES += libmad +GST_PLUGINS_UGLY_DEPENDENCIES += libid3tag libmad else GST_PLUGINS_UGLY_CONF_OPT += --disable-mad endif @@ -81,4 +82,4 @@ else GST_PLUGINS_UGLY_CONF_OPT += --disable-mpeg2dec endif -$(eval $(call AUTOTARGETS,package/multimedia,gst-plugins-ugly)) +$(eval $(autotools-package)) diff --git a/package/gstreamer/gstreamer.mk b/package/gstreamer/gstreamer.mk new file mode 100644 index 0000000000..bc886c78a2 --- /dev/null +++ b/package/gstreamer/gstreamer.mk @@ -0,0 +1 @@ +include package/gstreamer/*/*.mk diff --git a/package/gstreamer/gstreamer/Config.in b/package/gstreamer/gstreamer/Config.in new file mode 100644 index 0000000000..9a83a9688e --- /dev/null +++ b/package/gstreamer/gstreamer/Config.in @@ -0,0 +1,34 @@ +config BR2_PACKAGE_GSTREAMER + bool "gstreamer" + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + select BR2_PACKAGE_LIBGLIB2 + help + GStreamer is an open source multimedia framework. + + This 0.10.x version of GStreamer is incompatible with + GStreamer 1.X. + + http://gstreamer.freedesktop.org/ + +config BR2_PACKAGE_GSTREAMER_GST_DEBUG + bool "enable gst-debug trace support" + default y + depends on BR2_PACKAGE_GSTREAMER + help + Enable support for the gst-debug tracing functionality in gstreamer. + This has limited CPU overhead, but does increase the rootfs size + somewhat. + +config BR2_PACKAGE_GSTREAMER_PLUGIN_REGISTRY + bool "enable plugin registry" + default y + depends on BR2_PACKAGE_GSTREAMER + help + Enable support for the GStreamer plugin registry. This may increase + the launch-time for a GStreamer application. + +comment "gstreamer needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/gstreamer/gstreamer/gstreamer-01-bison3.patch b/package/gstreamer/gstreamer/gstreamer-01-bison3.patch new file mode 100644 index 0000000000..f9ec52d95a --- /dev/null +++ b/package/gstreamer/gstreamer/gstreamer-01-bison3.patch @@ -0,0 +1,24 @@ +Fix deprecation from bison 3.0+ +From http://comments.gmane.org/gmane.linux.lfs.beyond.devel/24620 + +Signed-off-by: Gustavo Zacarias + +diff -Nura gstreamer-0.10.36.orig/gst/parse/grammar.y gstreamer-0.10.36/gst/parse/grammar.y +--- gstreamer-0.10.36.orig/gst/parse/grammar.y 2013-10-04 09:52:21.685282055 -0300 ++++ gstreamer-0.10.36/gst/parse/grammar.y 2013-10-04 10:21:54.800211238 -0300 +@@ -26,7 +26,6 @@ + */ + + #define YYERROR_VERBOSE 1 +-#define YYLEX_PARAM scanner + + #define YYENABLE_NLS 0 + +@@ -648,6 +647,7 @@ + %right '.' + %left '!' '=' + ++%lex-param { void *scanner } + %parse-param { void *scanner } + %parse-param { graph_t *graph } + %pure-parser diff --git a/package/gstreamer/gstreamer/gstreamer.mk b/package/gstreamer/gstreamer/gstreamer.mk new file mode 100644 index 0000000000..f7919eaa8f --- /dev/null +++ b/package/gstreamer/gstreamer/gstreamer.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# gstreamer +# +################################################################################ + +GSTREAMER_VERSION = 0.10.36 +GSTREAMER_SOURCE = gstreamer-$(GSTREAMER_VERSION).tar.xz +GSTREAMER_SITE = http://gstreamer.freedesktop.org/src/gstreamer +GSTREAMER_INSTALL_STAGING = YES + +# Checking if unaligned memory access works correctly cannot be done when cross +# compiling. For the following architectures there is no information available +# in the configure script. +ifeq ($(BR2_avr32),y) +GSTREAMER_CONF_ENV = as_cv_unaligned_access=no +endif +ifeq ($(BR2_aarch64),y) +GSTREAMER_CONF_ENV = as_cv_unaligned_access=yes +endif + +GSTREAMER_CONF_OPT = \ + --disable-examples \ + --disable-tests \ + --disable-failing-tests \ + --disable-loadsave \ + $(if $(BR2_PACKAGE_GSTREAMER_GST_DEBUG),,--disable-gst-debug) \ + $(if $(BR2_PACKAGE_GSTREAMER_PLUGIN_REGISTRY),,--disable-registry) + +GSTREAMER_DEPENDENCIES = libglib2 host-pkgconf host-bison host-flex + +$(eval $(autotools-package)) diff --git a/package/gstreamer1/Config.in b/package/gstreamer1/Config.in new file mode 100644 index 0000000000..f9d2363963 --- /dev/null +++ b/package/gstreamer1/Config.in @@ -0,0 +1,7 @@ +# Gstreamer 1.x & Plugins +source "package/gstreamer1/gstreamer1/Config.in" +source "package/gstreamer1/gst1-plugins-base/Config.in" +source "package/gstreamer1/gst1-plugins-good/Config.in" +source "package/gstreamer1/gst1-plugins-bad/Config.in" +source "package/gstreamer1/gst1-plugins-ugly/Config.in" +source "package/gstreamer1/gst-omx/Config.in" diff --git a/package/gstreamer1/gst-omx/Config.in b/package/gstreamer1/gst-omx/Config.in new file mode 100644 index 0000000000..b6ea116c66 --- /dev/null +++ b/package/gstreamer1/gst-omx/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_GST_OMX + bool "gst-omx" + depends on BR2_PACKAGE_GSTREAMER1 && BR2_PACKAGE_HAS_OPENMAX + select BR2_PACKAGE_GST1_PLUGINS_BASE + help + GStreamer plug-in to use OpenMAX API. + + http://cgit.freedesktop.org/gstreamer/gst-omx + +comment "gst-omx requires a OpenMAX implementation" + depends on BR2_PACKAGE_GSTREAMER1 && !BR2_PACKAGE_HAS_OPENMAX diff --git a/package/gstreamer1/gst-omx/gst-omx-config-files.patch b/package/gstreamer1/gst-omx/gst-omx-config-files.patch new file mode 100644 index 0000000000..f4845217ec --- /dev/null +++ b/package/gstreamer1/gst-omx/gst-omx-config-files.patch @@ -0,0 +1,127 @@ +Change config files to match default buildroot install + +Signed-off-by: Spenser Gilliland +--- +Index: gst-omx-1.0.0/config/bellagio/gstomx.conf +=================================================================== +--- gst-omx-1.0.0.orig/config/bellagio/gstomx.conf 2013-03-12 04:12:09.000000000 -0500 ++++ gst-omx-1.0.0/config/bellagio/gstomx.conf 2013-05-21 17:50:14.545692908 -0500 +@@ -1,6 +1,6 @@ + [omxmpeg4videodec] + type-name=GstOMXMPEG4VideoDec +-core-name=/usr/local/lib/libomxil-bellagio.so.0 ++core-name=/usr/lib/libomxil-bellagio.so.0 + component-name=OMX.st.video_decoder.mpeg4 + rank=256 + in-port-index=0 +@@ -9,7 +9,7 @@ + + [omxh264dec] + type-name=GstOMXH264Dec +-core-name=/usr/local/lib/libomxil-bellagio.so.0 ++core-name=/usr/lib/libomxil-bellagio.so.0 + component-name=OMX.st.video_decoder.avc + rank=256 + in-port-index=0 +@@ -18,7 +18,7 @@ + + [omxmpeg4videoenc] + type-name=GstOMXMPEG4VideoEnc +-core-name=/usr/local/lib/libomxil-bellagio.so.0 ++core-name=/usr/lib/libomxil-bellagio.so.0 + component-name=OMX.st.video_encoder.mpeg4 + rank=0 + in-port-index=0 +@@ -27,7 +27,7 @@ + + [omxaacenc] + type-name=GstOMXAACEnc +-core-name=/usr/local/lib/libomxil-bellagio.so.0 ++core-name=/usr/lib/libomxil-bellagio.so.0 + component-name=OMX.st.audio_encoder.aac + rank=0 + in-port-index=0 +Index: gst-omx-1.0.0/config/rpi/gstomx.conf +=================================================================== +--- gst-omx-1.0.0.orig/config/rpi/gstomx.conf 2013-05-21 17:51:39.965693635 -0500 ++++ gst-omx-1.0.0/config/rpi/gstomx.conf 2013-05-21 17:52:07.781693871 -0500 +@@ -1,6 +1,6 @@ + [omxmpeg2videodec] + type-name=GstOMXMPEG2VideoDec +-core-name=/opt/vc/lib/libopenmaxil.so ++core-name=/usr/lib/libopenmaxil.so + component-name=OMX.broadcom.video_decode + rank=256 + in-port-index=130 +@@ -9,7 +9,7 @@ + + [omxmpeg4videodec] + type-name=GstOMXMPEG4VideoDec +-core-name=/opt/vc/lib/libopenmaxil.so ++core-name=/usr/lib/libopenmaxil.so + component-name=OMX.broadcom.video_decode + rank=256 + in-port-index=130 +@@ -18,7 +18,7 @@ + + [omxh263dec] + type-name=GstOMXH263Dec +-core-name=/opt/vc/lib/libopenmaxil.so ++core-name=/usr/lib/libopenmaxil.so + component-name=OMX.broadcom.video_decode + rank=256 + in-port-index=130 +@@ -27,7 +27,7 @@ + + [omxh264dec] + type-name=GstOMXH264Dec +-core-name=/opt/vc/lib/libopenmaxil.so ++core-name=/usr/lib/libopenmaxil.so + component-name=OMX.broadcom.video_decode + rank=256 + in-port-index=130 +@@ -36,7 +36,7 @@ + + [omxtheoradec] + type-name=GstOMXTheoraDec +-core-name=/opt/vc/lib/libopenmaxil.so ++core-name=/usr/lib/libopenmaxil.so + component-name=OMX.broadcom.video_decode + rank=256 + in-port-index=130 +@@ -45,7 +45,7 @@ + + [omxvp8dec] + type-name=GstOMXVP8Dec +-core-name=/opt/vc/lib/libopenmaxil.so ++core-name=/usr/lib/libopenmaxil.so + component-name=OMX.broadcom.video_decode + rank=256 + in-port-index=130 +@@ -54,7 +54,7 @@ + + [omxmjpegdec] + type-name=GstOMXMJPEGDec +-core-name=/opt/vc/lib/libopenmaxil.so ++core-name=/usr/lib/libopenmaxil.so + component-name=OMX.broadcom.video_decode + rank=256 + in-port-index=130 +@@ -63,7 +63,7 @@ + + [omxvc1dec] + type-name=GstOMXWMVDec +-core-name=/opt/vc/lib/libopenmaxil.so ++core-name=/usr/lib/libopenmaxil.so + component-name=OMX.broadcom.video_encode + rank=256 + in-port-index=130 +@@ -73,7 +73,7 @@ + + [omxh264enc] + type-name=GstOMXH264Enc +-core-name=/opt/vc/lib/libopenmaxil.so ++core-name=/usr/lib/libopenmaxil.so + component-name=OMX.broadcom.video_encode + rank=256 + in-port-index=200 diff --git a/package/gstreamer1/gst-omx/gst-omx.mk b/package/gstreamer1/gst-omx/gst-omx.mk new file mode 100644 index 0000000000..4b92584534 --- /dev/null +++ b/package/gstreamer1/gst-omx/gst-omx.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# gst-omx +# +################################################################################ + +GST_OMX_VERSION = 1.0.0 +GST_OMX_SOURCE = gst-omx-$(GST_OMX_VERSION).tar.xz +GST_OMX_SITE = http://gstreamer.freedesktop.org/src/gst-omx/ + +GST_OMX_LICENSE = LGPLv2.1 +GST_OMX_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_RPI_USERLAND),y) +GST_OMX_CONF_OPT = \ + --with-omx-target=rpi +GST_OMX_CONF_ENV = \ + CFLAGS="$(TARGET_CFLAGS) \ + -I$(STAGING_DIR)/usr/include/IL \ + -I$(STAGING_DIR)/usr/include/interface/vcos/pthreads \ + -I$(STAGING_DIR)/usr/include/interface/vmcs_host/linux" +endif + +ifeq ($(BR2_PACKAGE_BELLAGIO),y) +GST_OMX_CONF_OPT = \ + --with-omx-target=bellagio +GST_OMX_CONF_ENV = \ + CFLAGS="$(TARGET_CFLAGS) \ + -DOMX_VERSION_MAJOR=1 \ + -DOMX_VERSION_MINOR=1 \ + -DOMX_VERSION_REVISION=2 \ + -DOMX_VERSION_STEP=0" +endif + +GST_OMX_DEPENDENCIES = gstreamer1 gst1-plugins-base libopenmax + +$(eval $(autotools-package)) diff --git a/package/gstreamer1/gst1-plugins-bad/Config.in b/package/gstreamer1/gst1-plugins-bad/Config.in new file mode 100644 index 0000000000..d028245124 --- /dev/null +++ b/package/gstreamer1/gst1-plugins-bad/Config.in @@ -0,0 +1,475 @@ +menuconfig BR2_PACKAGE_GST1_PLUGINS_BAD + bool "gst1-plugins-bad" + depends on BR2_PACKAGE_GSTREAMER1 + select BR2_PACKAGE_GST1_PLUGINS_BASE + help + A set of plug-ins for GStreamer that may be of poor quality or + lacking some features. + + http://gstreamer.freedesktop.org/ + +if BR2_PACKAGE_GST1_PLUGINS_BAD + +comment "dependency-less plugins" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ACCURIP + bool "accurip" + help + Accurip plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ADPCMDEC + bool "adpcmdec" + help + ADPCM decoder + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ADPCMENC + bool "adpcmenc" + help + ADPCM encoder + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_AIFF + bool "aiff" + help + Create and parse Audio interchange File Format (AIFF) files + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ASFMUX + bool "asfmux" + help + ASF Muxer Plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_AUDIOFXBAD + bool "audiofxbad" + help + Audio filters plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_AUDIOVISUALIZERS + bool "audiovisualizers" + help + Creates video visualizations of audio input + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_AUTOCONVERT + bool "autoconvert" + help + Selects convertor element based on caps + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_BAYER + bool "bayer" + help + Elements to convert Bayer images + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_CAMERABIN2 + bool "camerabin2" + help + Take image snapshots and record movies from camera + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_CDXAPARSE + bool "cdxaparse" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_COLOREFFECTS + bool "coloreffects" + help + Color Look-up Table filters + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DATAURISRC + bool "dataurisrc" + help + data: URI source + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DCCP + bool "dccp" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DEBUGUTILS + bool "debugutils" + help + Collection of elements that may or may not be useful for debugging + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DVBSUBOVERLAY + bool "dvdsuboverlay" + help + DVB subtitle renderer plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DVDSPU + bool "dvdspu" + help + DVD Sub-picture Overlay element + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FACEOVERLAY + bool "faceoverlay" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FESTIVAL + bool "festival" + help + Synthesizes plain text into audio + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FIELDANALYSIS + bool "fieldanalysis" + help + Video field analysis + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FREEVERB + bool "freeverb" + help + Reverberation/room effect + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FREI0R + bool "frei0r" + help + frei0r plugin library + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_GAUDIEFFECTS + bool "gaudieffects" + help + Gaudi video effects + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_GEOMETRICTRANSFORM + bool "geometrictransform" + help + Various geometric image transform elements + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_GDP + bool "gdp" + help + Payload/depayload GDP packets + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_HDVPARSE + bool "hdvparse" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ID3TAG + bool "id3tag" + help + ID3 v1 and v2 muxing plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_INTER + bool "inter" + help + plugin for inter-pipeline communication + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_INTERLACE + bool "interlace" + help + Create an interlaced video stream + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_IVFPARSE + bool "ivfparse" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_IVTC + bool "ivtc" + help + Inverse Telecine plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_JP2KDECIMATOR + bool "jp2kdecimator" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_JPEGFORMAT + bool "jpegformat" + help + JPEG interchange format plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_LIBRFB + bool "librfb" + help + Connects to a VNC server and decodes RFB stream + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_LIVEADDER + bool "liveadder" + help + Adds multiple live discontinuous streams + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MIDI + bool "midi" + help + MIDI plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEGDEMUX + bool "mpegdemux" + help + MPEG-PS demuxer + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEGTSDEMUX + bool "mpegtsdemux" + help + MPEG TS demuxer + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEGTSMUX + bool "mpegtsmux" + help + MPEG-TS muxer + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEGPSMUX + bool "mpegpsmux" + help + MPEG-PS muxer + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MVE + bool "mve" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MXF + bool "mxf" + help + MXF plugin library + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_NUVDEMUX + bool "nuvdemux" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_PATCHDETECT + bool "patchdetect" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_PCAPPARSE + bool "pcapparse" + help + Element parsing raw pcap streams + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_PNM + bool "pnm" + help + PNM plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_RAWPARSE + bool "rawparse" + help + Parses byte streams into raw frames + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_REAL + bool "real" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_REMOVESILENCE + bool "removesilence" + help + Removes silence from an audio stream + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SDI + bool "sdi" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SDP + bool "sdp" + help + configure streaming sessions using SDP + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SEGMENTCLIP + bool "segmentclip" + help + Segment clip elements + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SIREN + bool "siren" + help + Siren encoder/decoder/payloader/depayloader plugins + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SMOOTH + bool "smooth" + help + Apply a smooth filter to an image + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SPEED + bool "speed" + help + Set speed/pitch on audio/raw streams (resampler) + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SUBENC + bool "subenc" + help + subtitle encoders + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_STEREO + bool "stereo" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_TTA + bool "tta" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VIDEOFILTERS + bool "videofilters" + help + Video filters in gst-plugins-bad + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VIDEOMEASURE + bool "videomeasure" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VIDEOPARSERS + bool "videoparsers" + help + videoparsers + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VIDEOSIGNAL + bool "videosignal" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VMNC + bool "vmnc" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_Y4M + bool "y4m" + help + Demuxes/decodes YUV4MPEG streams + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_YADIF + bool "yadif" + help + YADIF deinterlacing filter + +comment "plugins with external dependencies" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SHM + bool "shm" + help + shared memory sink source + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VCD + bool "vcd" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_APEXSINK + bool "apexsink" + select BR2_PACKAGE_OPENSSL + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_BZ2 + bool "bz2" + select BR2_PACKAGE_BZIP2 + help + Compress or decompress streams + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_CDAUDIO + bool "cdaudio" + select BR2_PACKAGE_LIBCDAUDIO + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_CURL + bool "curl" + select BR2_PACKAGE_LIBCURL + help + libcurl-based elements + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DASH + bool "dash" + select BR2_PACKAGE_LIBXML2 + help + DASH demuxer plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DECKLINK + depends on BR2_INSTALL_LIBSTDCPP + bool "decklink" + help + Blackmagic Decklink plugin + +comment "decklink needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DIRECTFB + bool "directfb" + select BR2_PACKAGE_DIRECTFB + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_WAYLAND + bool "wayland" + depends on !BR2_avr32 # wayland + depends on BR2_TOOLCHAIN_HAS_THREADS # wayland + select BR2_PACKAGE_WAYLAND + help + Wayland Video Sink + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_WEBP + bool "webp" + select BR2_PACKAGE_WEBP + help + Webp image format plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FAAD + bool "faad" + select BR2_PACKAGE_FAAD2 + help + Free AAC Decoder (FAAD) + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FBDEV + bool "fbdev" + help + Linux framebuffer video sink + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_LIBMMS + bool "libmms" + depends on BR2_USE_WCHAR # libmms -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libmms -> libglib2 + select BR2_PACKAGE_LIBMMS + help + Microsoft Multi Media Server streaming protocol support + +comment "libmms needs a toolchain w/ wchar, threads" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEG2ENC + bool "mpeg2enc" + select BR2_PACKAGE_LIBMPEG2 + help + High-quality MPEG-1/2 video encoder + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPG123 + bool "mpg123" + select BR2_PACKAGE_MPG123 + help + mp3 decoding based on the mpg123 library + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MUSEPACK + bool "musepack" + select BR2_PACKAGE_MUSEPACK + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_NEON + bool "neon" + select BR2_PACKAGE_NEON + help + lib neon http client src + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_OPENCV + bool "opencv" + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_OPENCV + help + GStreamer OpenCV Plugins + +comment "opencv plugin needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_OPUS + bool "opus" + select BR2_PACKAGE_OPUS + help + OPUS plugin library + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_RSVG + bool "rsvg" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR # librsvg -> glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # librsvg -> glib2 + select BR2_PACKAGE_LIBRSVG + help + RSVG plugin library + +comment "rsvg plugin needs a toolchain w/ C++, wchar, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_EGLGLES + bool "eglgles" + depends on BR2_PACKAGE_HAS_OPENGL_EGL && BR2_PACKAGE_HAS_OPENGL_ES + help + EGL/GLES sink + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SDL + bool "sdl" + select BR2_PACKAGE_SDL + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SNDFILE + bool "sndfile" + select BR2_PACKAGE_LIBSNDFILE + depends on BR2_LARGEFILE + +comment "gst-plugins-bad-plugin-sndfile needs a toolchain w/ largefile" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DVB + bool "dvb" + select BR2_PACKAGE_DVB_APPS + help + DVB elements + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_HLS + bool "hls" + select BR2_PACKAGE_GNUTLS + help + Fragmented streaming plugins + +endif diff --git a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad-fix-dfb-example.patch b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad-fix-dfb-example.patch new file mode 100644 index 0000000000..b1f06ff38a --- /dev/null +++ b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad-fix-dfb-example.patch @@ -0,0 +1,33 @@ +[PATCH] work around dfb-example build issue + +directfb.h defines a number of macros which conflicts with gst/gst.h: + +In file included from ../sysroot/usr/include/gstreamer-1.0/gst/gst.h:50:0, + from dfb-example.c:4: +../sysroot/usr/include/gstreamer-1.0/gst/gstinfo.h:295:69: error: expected ‘)’ before ‘__attribute__’ +../sysroot/usr/include/gstreamer-1.0/gst/gstinfo.h:295:69: error: expected ‘,’ or ‘;’ before ‘)’ token + +As mentioned in the upstream bug report: + +https://bugzilla.gnome.org/show_bug.cgi?id=685609 + +A workaround is to simply swap the include order around. + +Signed-off-by: Peter Korsgaard +--- + ext/directfb/dfb-example.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: gst1-plugins-bad-1.2.1/ext/directfb/dfb-example.c +=================================================================== +--- gst1-plugins-bad-1.2.1.orig/ext/directfb/dfb-example.c ++++ gst1-plugins-bad-1.2.1/ext/directfb/dfb-example.c +@@ -1,7 +1,7 @@ + +-#include + #include + #include ++#include + + static IDirectFB *dfb = NULL; + static IDirectFBSurface *primary = NULL; diff --git a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad-use-gettext-0.18.patch b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad-use-gettext-0.18.patch new file mode 100644 index 0000000000..ebf4567b00 --- /dev/null +++ b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad-use-gettext-0.18.patch @@ -0,0 +1,17 @@ +Use newer version of gettext to match current buildroot gettext. + +Signed-off-by: Spenser Gilliland +---- +Index: gst1-plugins-bad-1.1.1/po/Makefile.in.in +=================================================================== +--- gst1-plugins-bad-1.1.1.orig/po/Makefile.in.in ++++ gst1-plugins-bad-1.1.1/po/Makefile.in.in +@@ -9,7 +9,7 @@ + # General Public License and is *not* in the public domain. + # + # Origin: gettext-0.17 +-GETTEXT_MACRO_VERSION = 0.17 ++GETTEXT_MACRO_VERSION = 0.18 + + PACKAGE = @PACKAGE@ + VERSION = @VERSION@ diff --git a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk new file mode 100644 index 0000000000..f6fdc81bff --- /dev/null +++ b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk @@ -0,0 +1,699 @@ +################################################################################ +# +# gst1-plugins-bad +# +################################################################################ + +GST1_PLUGINS_BAD_VERSION = 1.2.1 +GST1_PLUGINS_BAD_SOURCE = gst-plugins-bad-$(GST1_PLUGINS_BAD_VERSION).tar.xz +GST1_PLUGINS_BAD_SITE = http://gstreamer.freedesktop.org/src/gst-plugins-bad +GST1_PLUGINS_BAD_LICENSE_FILES = COPYING COPYING.LIB +# Unknown and GPL licensed plugins will append to GST1_PLUGINS_BAD_LICENSE if +# enabled. +GST1_PLUGINS_BAD_LICENSE = LGPLv2+ LGPLv2.1+ + +GST1_PLUGINS_BAD_AUTORECONF = YES +GST1_PLUGINS_BAD_AUTORECONF_OPT = -I $(@D)/common/m4 + +GST1_PLUGINS_BAD_CONF_OPT = \ + --disable-examples \ + --disable-debug \ + --disable-valgrind \ + --disable-directsound \ + --disable-wsapi \ + --disable-direct3d \ + --disable-directdraw \ + --disable-direct3d9 \ + --disable-directshow \ + --disable-android_media \ + --disable-apple_media \ + --disable-osx_video \ + --disable-sdltest \ + --disable-wininet \ + --disable-acm + +# Options which require currently unpackaged libraries +GST1_PLUGINS_BAD_CONF_OPT += \ + --disable-avc \ + --disable-quicktime \ + --disable-mfc \ + --disable-opensles \ + --disable-uvch264 \ + --disable-assrender \ + --disable-voamrwbenc \ + --disable-voaacenc \ + --disable-chromaprint \ + --disable-dash \ + --disable-dc1394 \ + --disable-dts \ + --disable-resindvd \ + --disable-faac \ + --disable-flite \ + --disable-gsm \ + --disable-fluidsynth \ + --disable-kate \ + --disable-ladspa \ + --disable-lv2 \ + --disable-strp \ + --disable-linsys \ + --disable-modplug \ + --disable-mimic \ + --disable-mplex \ + --disable-mythtv \ + --disable-nas \ + --disable-ofa \ + --disable-openal \ + --disable-openjpeg \ + --disable-pvr \ + --disable-timidity \ + --disable-teletextdec \ + --disable-wildmidi \ + --disable-smoothstreaming \ + --disable-soundtouch \ + --disable-spc \ + --disable-gme \ + --disable-xvid \ + --disable-vdpau \ + --disable-sbc \ + --disable-schro \ + --disable-zbar \ + --disable-rtmp \ + --disable-spandsp \ + --disable-gsettings \ + --disable-sndio \ + --disable-hls + +GST1_PLUGINS_BAD_DEPENDENCIES = gst1-plugins-base gstreamer1 + +ifeq ($(BR2_PACKAGE_ORC),y) +GST1_PLUGINS_BAD_DEPENDENCIES += orc +GST1_PLUGINS_BAD_CONF_OPT += --enable-orc +endif + +ifeq ($(BR2_PACKAGE_BLUEZ_UTILS),y) +GST1_PLUGINS_BAD_DEPENDENCIES += bluez_utils +GST1_PLUGINS_BAD_CONF_OPT += --enable-bluez +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-bluez +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ACCURIP),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-accurip +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-accurip +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ADPCMDEC),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-adpcmdec +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-adpcmdec +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ADPCMENC),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-adpcmenc +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-adpcmenc +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_AIFF),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-aiff +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-aiff +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ASFMUX),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-asfmux +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-asfmux +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_AUDIOFXBAD),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-audiofxbad +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-audiofxbad +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_AUDIOVISUALIZERS),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-audiovisualizers +GST1_PLUGINS_BAD_HAS_GPL_LICENSE = y +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-audiovisualizers +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_AUTOCONVERT),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-autoconvert +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-autoconvert +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_BAYER),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-bayer +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-bayer +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_CAMERABIN2),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-camerabin2 +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-camerabin2 +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_CDXAPARSE),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-cdxaparse +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-cdxaparse +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_COLOREFFECTS),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-coloreffects +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-coloreffects +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DATAURISRC),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-dataurisrc +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-dataurisrc +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DCCP),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-dccp +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-dccp +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DEBUGUTILS),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-debugutils +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-debugutils +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DVBSUBOVERLAY),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-dvbsuboverlay +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-dvbsuboverlay +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DVDSPU),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-dvdspu +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-dvdspu +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FACEOVERLAY),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-faceoverlay +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-faceoverlay +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FESTIVAL),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-festival +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-festival +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FIELDANALYSIS),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-fieldanalysis +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-fieldanalysis +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FREEVERB),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-freeverb +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-freeverb +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FREI0R),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-frei0r +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-frei0r +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_GAUDIEFFECTS),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-gaudieffects +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-gaudieffects +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_GEOMETRICTRANSFORM),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-geometrictransform +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-geometrictransform +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_GDP),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-gdp +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-gdp +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_HDVPARSE),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-hdvparse +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-hdvparse +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ID3TAG),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-id3tag +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-id3tag +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_INTER),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-inter +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-inter +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_INTERLACE),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-interlace +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-interlace +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_IVFPARSE),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-ivfparse +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-ivfparse +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_IVTC),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-ivtc +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-ivtc +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_JP2KDECIMATOR),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-jp2kdecimator +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-jp2kdecimator +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_JPEGFORMAT),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-jpegformat +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-jpegformat +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_LIBRFB),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-librfb +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-librfb +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_LIVEADDER),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-liveadder +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-liveadder +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MIDI),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-midi +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-midi +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEGDEMUX),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-mpegdemux +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-mpegdemux +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEGTSDEMUX),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-mpegtsdemux +GST1_PLUGINS_BAD_HAS_UNKNOWN_LICENSE = y +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-mpegtsdemux +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEGTSMUX),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-mpegtsmux +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-mpegtsmux +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEGPSMUX),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-mpegpsmux +GST1_PLUGINS_BAD_HAS_UNKNOWN_LICENSE = y +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-mpegpsmux +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MVE),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-mve +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-mve +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MXF),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-mxf +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-mxf +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_NUVDEMUX),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-nuvdemux +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-nuvdemux +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_PATCHDETECT),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-patchdetect +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-patchdetect +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_PCAPPARSE),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-pcapparse +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-pcapparse +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_PNM),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-pnm +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-pnm +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_RAWPARSE),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-rawparse +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-rawparse +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_REAL),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-real +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-real +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_REMOVESILENCE),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-removesilence +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-removesilence +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SDI),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-sdi +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-sdi +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SDP),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-sdp +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-sdp +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SEGMENTCLIP),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-segmentclip +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-segmentclip +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SIREN),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-siren +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-siren +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SMOOTH),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-smooth +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-smooth +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SPEED),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-speed +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-speed +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SUBENC),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-subenc +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-subenc +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_STEREO),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-stereo +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-stereo +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_TTA),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-tta +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-tta +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VIDEOFILTERS),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-videofilters +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-videofilters +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VIDEOMEASURE),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-videomeasure +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-videomeasure +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VIDEOPARSERS),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-videoparsers +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-videoparsers +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VIDEOSIGNAL),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-videosignal +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-videosignal +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VMNC),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-vmnc +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-vmnc +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_Y4M),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-y4m +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-y4m +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_YADIF),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-yadif +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-yadif +endif + +# Plugins with dependencies + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SHM),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-shm +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-shm +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VCD),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-vcd +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-vcd +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_APEXSINK),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-apexsink +GST1_PLUGINS_BAD_DEPENDENCIES += openssl +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-apexsink +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_BZ2),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-bz2 +GST1_PLUGINS_BAD_DEPENDENCIES += bzip2 +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-bz2 +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_CDAUDIO),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-cdaudio +GST1_PLUGINS_BAD_DEPENDENCIES += libcdaudio +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-cdaudio +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_CURL),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-curl +GST1_PLUGINS_BAD_DEPENDENCIES += libcurl +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-curl +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DASH),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-dash +GST1_PLUGINS_BAD_DEPENDENCIES += libxml2 +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-dash +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DECKLINK),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-decklink +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-decklink +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_WEBP),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-webp +GST1_PLUGINS_BAD_DEPENDENCIES += webp +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-webp +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DIRECTFB),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-directfb +GST1_PLUGINS_BAD_DEPENDENCIES += directfb +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-directfb +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_WAYLAND),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-wayland +GST1_PLUGINS_BAD_DEPENDENCIES += wayland +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-wayland +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FAAD),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-faad +GST1_PLUGINS_BAD_DEPENDENCIES += faad2 +GST1_PLUGINS_BAD_HAS_GPL_LICENSE = y +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-faad +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FBDEV),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-fbdev +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-fbdev +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_LIBMMS),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-libmms +GST1_PLUGINS_BAD_DEPENDENCIES += libmms +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-libmms +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEG2ENC),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-mpeg2enc +GST1_PLUGINS_BAD_DEPENDENCIES += libmpeg2 +GST1_PLUGINS_BAD_HAS_GPL_LICENSE = y +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-mpeg2enc +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPG123),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-mpg123 +GST1_PLUGINS_BAD_DEPENDENCIES += mpg123 +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-mpg123 +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MUSEPACK),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-musepack +GST1_PLUGINS_BAD_DEPENDENCIES += musepack +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-musepack +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_NEON),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-neon +GST1_PLUGINS_BAD_DEPENDENCIES += neon +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-neon +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_OPENCV),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-opencv +GST1_PLUGINS_BAD_DEPENDENCIES += opencv +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-opencv +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_OPUS),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-opus +GST1_PLUGINS_BAD_DEPENDENCIES += opus +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-opus +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_RSVG),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-rsvg +GST1_PLUGINS_BAD_DEPENDENCIES += librsvg +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-rsvg +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_EGLGLES),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-eglgles +GST1_PLUGINS_BAD_DEPENDENCIES += libegl libgles + +ifeq ($(BR2_PACKAGE_RPI_USERLAND),y) +# RPI has odd locations for several required headers. +GST1_PLUGINS_BAD_CONF_OPT += --with-egl-window-system=rpi +GST1_PLUGINS_BAD_CONF_ENV += \ + CFLAGS="$(TARGET_CFLAGS) \ + -I$(STAGING_DIR)/usr/include/IL \ + -I$(STAGING_DIR)/usr/include/interface/vcos/pthreads \ + -I$(STAGING_DIR)/usr/include/interface/vmcs_host/linux" +endif +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-eglgles +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SDL),y) +GST1_PLUGINS_BAD_CONF_ENV += ac_cv_path_SDL_CONFIG=$(STAGING_DIR)/usr/bin/sdl-config +GST1_PLUGINS_BAD_CONF_OPT += --enable-sdl +GST1_PLUGINS_BAD_DEPENDENCIES += sdl +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-sdl +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SNDFILE),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-sndfile +GST1_PLUGINS_BAD_DEPENDENCIES += libsndfile +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-sndfile +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DVB),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-dvb +GST1_PLUGINS_BAD_DEPENDENCIES += dvb-apps +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-dvb +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_HLS),y) +GST1_PLUGINS_BAD_CONF_OPT += --enable-hls +GST1_PLUGINS_BAD_DEPENDENCIES += gnutls +else +GST1_PLUGINS_BAD_CONF_OPT += --disable-hls +endif + +# Add GPL license if GPL licensed plugins enabled. +ifeq ($(GST1_PLUGINS_BAD_HAS_GPL_LICENSE),y) +GST1_PLUGINS_BAD_LICENSE += GPL +endif + +# Add Unknown license if Unknown licensed plugins enabled. +ifeq ($(GST1_PLUGINS_BAD_HAS_UNKNOWN_LICENSE),y) +GST1_PLUGINS_BAD_LICENSE += UNKNOWN +endif + +# Use the following command to extract license info for plugins. +# # find . -name 'plugin-*.xml' | xargs grep license + +$(eval $(autotools-package)) diff --git a/package/gstreamer1/gst1-plugins-base/Config.in b/package/gstreamer1/gst1-plugins-base/Config.in new file mode 100644 index 0000000000..5b54baba21 --- /dev/null +++ b/package/gstreamer1/gst1-plugins-base/Config.in @@ -0,0 +1,155 @@ +menuconfig BR2_PACKAGE_GST1_PLUGINS_BASE + bool "gst1-plugins-base" + depends on BR2_PACKAGE_GSTREAMER1 + select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXV if BR2_PACKAGE_XORG7 + help + A basic set of well-supported plug-ins for GStreamer. + + http://gstreamer.freedesktop.org/ + +if BR2_PACKAGE_GST1_PLUGINS_BASE + +comment "dependency-less plugins" + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_ADDER + bool "adder" + help + Adds multiple streams + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_APP + bool "app" + help + Elements used to communicate with applications + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIOCONVERT + bool "audioconvert (mandatory for audio playback)" + default y + help + Convert audio to different formats + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIORATE + bool "audiorate" + help + Adjusts audio frames + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIOTESTSRC + bool "audiotestsrc" + help + Creates audio test signals of given frequency and volume + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_ENCODING + bool "encoding" + help + various encoding-related elements + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOCONVERT + bool "videoconvert" + help + Colorspace conversion + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_GIO + bool "gio" + help + GIO elements + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_PLAYBACK + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_TYPEFIND + bool "playback" + default y + help + various playback elements + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIORESAMPLE + bool "audioresample (mandatory for audio playback)" + default y + help + Resamples audio + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_SUBPARSE + bool "subparse" + help + Subtitle parsing + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_TCP + bool "tcp" + help + transfer data over the network via TCP + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_TYPEFIND + bool "typefind" + default y + help + default typefind functions + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOTESTSRC + bool "videotestsrc" + help + Creates a test video stream + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEORATE + bool "videorate" + help + Adjusts video frames + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOSCALE + bool "videoscale (mandatory for video playback)" + default y + help + Resizes video + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VOLUME + bool "volume (mandatory for audio playback)" + default y + help + plugin for controlling audio volume + +comment "plugins with external dependencies" + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_ALSA + bool "alsa (mandatory for audio playback)" + select BR2_PACKAGE_ALSA_LIB + select BR2_PACKAGE_ALSA_LIB_MIXER + select BR2_PACKAGE_ALSA_LIB_PCM + help + ALSA plugin library + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_TREMOR + bool "tremor" + select BR2_PACKAGE_TREMOR + help + Vorbis Tremor decoder + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_OGG + bool "ogg (*.ogg audio/video)" + select BR2_PACKAGE_LIBOGG + help + ogg stream manipulation (info about ogg: http://xiph.org) + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_PANGO + bool "pango font renderer" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR # pango -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # pango -> libglib2 + select BR2_PACKAGE_PANGO + help + Pango-based text rendering and overlay + +comment "pango plugin needs a toolchain w/ C++, wchar, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_THEORA + bool "theora (*.ogg video)" + select BR2_PACKAGE_LIBTHEORA + help + Theora plugin library + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VORBIS + bool "vorbis (*.ogg audio)" + select BR2_PACKAGE_LIBVORBIS + help + Vorbis plugin library + +endif diff --git a/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk b/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk new file mode 100644 index 0000000000..3c1d826d2d --- /dev/null +++ b/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk @@ -0,0 +1,206 @@ +################################################################################ +# +# gst1-plugins-base +# +################################################################################ + +GST1_PLUGINS_BASE_VERSION = 1.2.1 +GST1_PLUGINS_BASE_SOURCE = gst-plugins-base-$(GST1_PLUGINS_BASE_VERSION).tar.xz +GST1_PLUGINS_BASE_SITE = http://gstreamer.freedesktop.org/src/gst-plugins-base +GST1_PLUGINS_BASE_INSTALL_STAGING = YES +GST1_PLUGINS_BASE_LICENSE_FILES = COPYING.LIB +GST1_PLUGINS_BASE_LICENSE = LGPLv2+ LGPLv2.1+ + +# freetype is only used by examples, but if it is not found +# and the host has a freetype-config script, then the host +# include dirs are added to the search path causing trouble +GST1_PLUGINS_BASE_CONF_ENV = + FT2_CONFIG=/bin/false \ + ac_cv_header_stdint_t="stdint.h" + +GST1_PLUGINS_BASE_CONF_OPT = \ + --disable-examples \ + --disable-oggtest \ + --disable-vorbistest \ + --disable-freetypetest \ + --disable-valgrind \ + --disable-debug + +# Options which require currently unpackaged libraries +GST1_PLUGINS_BASE_CONF_OPT += \ + --disable-cdparanoia \ + --disable-libvisual \ + --disable-iso-codes + +GST1_PLUGINS_BASE_DEPENDENCIES = gstreamer1 + +# These plugins are liste in the order from ./configure --help + +ifeq ($(BR2_PACKAGE_ORC),y) +GST1_PLUGINS_BASE_DEPENDENCIES += orc +GST1_PLUGINS_BASE_CONF_OPT += --enable-orc +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_ADDER),y) +GST1_PLUGINS_BASE_CONF_OPT += --enable-adder +else +GST1_PLUGINS_BASE_CONF_OPT += --disable-adder +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_APP),y) +GST1_PLUGINS_BASE_CONF_OPT += --enable-app +else +GST1_PLUGINS_BASE_CONF_OPT += --disable-app +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIOCONVERT),y) +GST1_PLUGINS_BASE_CONF_OPT += --enable-audioconvert +else +GST1_PLUGINS_BASE_CONF_OPT += --disable-audioconvert +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIORATE),y) +GST1_PLUGINS_BASE_CONF_OPT += --enable-audiorate +else +GST1_PLUGINS_BASE_CONF_OPT += --disable-audiorate +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIOTESTSRC),y) +GST1_PLUGINS_BASE_CONF_OPT += --enable-audiotestsrc +else +GST1_PLUGINS_BASE_CONF_OPT += --disable-audiotestsrc +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_ENCODING),y) +GST1_PLUGINS_BASE_CONF_OPT += --enable-encoding +else +GST1_PLUGINS_BASE_CONF_OPT += --disable-encoding +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOCONVERT),y) +GST1_PLUGINS_BASE_CONF_OPT += --enable-videoconvert +else +GST1_PLUGINS_BASE_CONF_OPT += --disable-videoconvert +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_GIO),y) +GST1_PLUGINS_BASE_CONF_OPT += --enable-gio +else +GST1_PLUGINS_BASE_CONF_OPT += --disable-gio +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_PLAYBACK),y) +GST1_PLUGINS_BASE_CONF_OPT += --enable-playback +else +GST1_PLUGINS_BASE_CONF_OPT += --disable-playback +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIORESAMPLE),y) +GST1_PLUGINS_BASE_CONF_OPT += --enable-audioresample +else +GST1_PLUGINS_BASE_CONF_OPT += --disable-audioresample +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_SUBPARSE),y) +GST1_PLUGINS_BASE_CONF_OPT += --enable-subparse +else +GST1_PLUGINS_BASE_CONF_OPT += --disable-subparse +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_TCP),y) +GST1_PLUGINS_BASE_CONF_OPT += --enable-tcp +else +GST1_PLUGINS_BASE_CONF_OPT += --disable-tcp +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_TYPEFIND),y) +GST1_PLUGINS_BASE_CONF_OPT += --enable-typefind +else +GST1_PLUGINS_BASE_CONF_OPT += --disable-typefind +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOTESTSRC),y) +GST1_PLUGINS_BASE_CONF_OPT += --enable-videotestsrc +else +GST1_PLUGINS_BASE_CONF_OPT += --disable-videotestsrc +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEORATE),y) +GST1_PLUGINS_BASE_CONF_OPT += --enable-videorate +else +GST1_PLUGINS_BASE_CONF_OPT += --disable-videorate +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOSCALE),y) +GST1_PLUGINS_BASE_CONF_OPT += --enable-videoscale +else +GST1_PLUGINS_BASE_CONF_OPT += --disable-videoscale +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VOLUME),y) +GST1_PLUGINS_BASE_CONF_OPT += --enable-volume +else +GST1_PLUGINS_BASE_CONF_OPT += --disable-volume +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +GST1_PLUGINS_BASE_DEPENDENCIES += zlib +else +GST1_PLUGINS_BASE_CONF_OPT += --disable-zlib +endif + +ifeq ($(BR2_PACKAGE_XORG7),y) +GST1_PLUGINS_BASE_DEPENDENCIES += xlib_libX11 xlib_libXext xlib_libXv +GST1_PLUGINS_BASE_CONF_OPT += \ + --enable-x \ + --enable-xshm \ + --enable-xvideo +else +GST1_PLUGINS_BASE_CONF_OPT += \ + --disable-x \ + --disable-xshm \ + --disable-xvideo +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_ALSA),y) +GST1_PLUGINS_BASE_DEPENDENCIES += alsa-lib +else +GST1_PLUGINS_BASE_CONF_OPT += --disable-alsa +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_TREMOR),y) +GST1_PLUGINS_BASE_CONF_OPT += --enable-ivorbis +GST1_PLUGINS_BASE_DEPENDENCIES += tremor +else +GST1_PLUGINS_BASE_CONF_OPT += --disable-ivorbis +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_OGG),y) +GST1_PLUGINS_BASE_CONF_OPT += --enable-ogg +GST1_PLUGINS_BASE_DEPENDENCIES += libogg +else +GST1_PLUGINS_BASE_CONF_OPT += --disable-ogg +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_PANGO),y) +GST1_PLUGINS_BASE_CONF_OPT += --enable-pango +GST1_PLUGINS_BASE_DEPENDENCIES += pango +else +GST1_PLUGINS_BASE_CONF_OPT += --disable-pango +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_THEORA),y) +GST1_PLUGINS_BASE_CONF_OPT += --enable-theora +GST1_PLUGINS_BASE_DEPENDENCIES += libtheora +else +GST1_PLUGINS_BASE_CONF_OPT += --disable-theora +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VORBIS),y) +GST1_PLUGINS_BASE_CONF_OPT += --enable-vorbis +GST1_PLUGINS_BASE_DEPENDENCIES += libvorbis +else +GST1_PLUGINS_BASE_CONF_OPT += --disable-vorbis +endif + +$(eval $(autotools-package)) diff --git a/package/gstreamer1/gst1-plugins-good/Config.in b/package/gstreamer1/gst1-plugins-good/Config.in new file mode 100644 index 0000000000..a9308c7d9d --- /dev/null +++ b/package/gstreamer1/gst1-plugins-good/Config.in @@ -0,0 +1,351 @@ +menuconfig BR2_PACKAGE_GST1_PLUGINS_GOOD + bool "gst1-plugins-good" + depends on BR2_PACKAGE_GSTREAMER1 + select BR2_PACKAGE_GST1_PLUGINS_BASE + help + A set of well-supported plug-ins for GStreamer under the preferred + license. + + http://gstreamer.freedesktop.org/ + +if BR2_PACKAGE_GST1_PLUGINS_GOOD + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_JPEG + bool "jpeg (JPEG support)" + select BR2_PACKAGE_JPEG + help + JPeg plugin library + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PNG + bool "png (PNG support)" + select BR2_PACKAGE_LIBPNG + help + PNG plugin library + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_BZ2 + bool "bz2 support" + depends on BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MATROSKA + select BR2_PACKAGE_BZIP2 + help + Enable bz2 support for the following plugins: + matroska + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_ZLIB + bool "zlib support" + depends on BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_QTDEMUX || BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ID3DEMUX || BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MATROSKA + select BR2_PACKAGE_ZLIB + help + Enable zlib support for the following plugins: + id3demux, qtdemux, matroska + +comment "dependency-less plugins" + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ALPHA + bool "alpha" + help + adds an alpha channel to video - constant or via chroma-keying + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_APETAG + bool "apetag" + help + APEv1/2 tag reader + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AUDIOFX + bool "audiofx" + help + Audio effects plugin + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AUDIOPARSERS + bool "audioparsers" + help + Parsers for various audio formats + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AUPARSE + bool "auparse" + help + parses au streams + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AUTODETECT + bool "autodetect" + help + Plugin contains auto-detection plugins for video/audio in- and outputs + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AVI + bool "avi (*.avi video)" + default y + help + AVI stream handling + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_CUTTER + bool "cutter" + help + Audio Cutter to split audio into non-silent bits + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_DEBUGUTILS + bool "debugutils" + help + elements for testing and debugging + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_DEINTERLACE + bool "deinterlace" + help + Deinterlacer + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_DTMF + bool "dtmf" + help + DTMF plugin + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_EFFECTV + bool "effectv" + help + effect plugins from the effectv project + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_EQUALIZER + bool "equalizer" + help + GStreamer audio equalizers + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_FLV + bool "flv" + help + FLV muxing and demuxing plugin + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_FLX + bool "flx" + help + FLC/FLI/FLX video decoder + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_GOOM + bool "goom" + help + GOOM visualization filter + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_GOOM2K1 + bool "goom2k1" + help + GOOM 2k1 visualization filter + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ICYDEMUX + bool "icydemux" + help + Demux ICY tags from a stream + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ID3DEMUX + bool "id3demux (*.mp3 audio)" + help + Demux ID3v1 and ID3v2 tags from a file + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_IMAGEFREEZE + bool "imagefreeze" + help + Still frame stream generator + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_INTERLEAVE + bool "interleave" + help + Audio interleaver/deinterleaver + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ISOMP4 + bool "isomp4" + default y + help + ISO base media file format support (mp4, 3gpp, qt, mj2) + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_LAW + bool "law" + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_LEVEL + bool "level" + help + Audio level plugin + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MATROSKA + bool "matroska" + help + Matroska and WebM stream handling + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MONOSCOPE + bool "monoscope" + help + Monoscope visualization + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MULTIFILE + bool "multifile" + help + Reads/Writes buffers from/to sequentially named files + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MULTIPART + bool "multipart" + help + multipart stream manipulation + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_REPLAYGAIN + bool "replaygain" + help + ReplayGain volume normalization + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_RTP + bool "rtp" + help + Real-time protocol plugins + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_RTPMANAGER + bool "rtpmanager" + help + RTP session management plugin library + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_RTSP + bool "rtsp" + help + transfer data via RTSP + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SHAPEWIPE + bool "shapewipe" + help + Shape Wipe transition filter + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SMPTE + bool "smpte" + help + Apply the standard SMPTE transitions on video images + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SPECTRUM + bool "spectrum" + help + Run an FFT on the audio signal, output spectrum data + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_UDP + bool "udp" + help + transfer data via UDP + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_VIDEOBOX + bool "videobox" + help + resizes a video by adding borders or cropping + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_VIDEOCROP + bool "videocrop" + help + Crops video into a user-defined region + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_VIDEOFILTER + bool "videofilter" + help + Video filters plugin + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_VIDEOMIXER + bool "videomixer" + help + Video mixer + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_WAVENC + bool "wavenc" + help + Encode raw audio into WAV + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_WAVPARSE + bool "wavparse (*.wav audio)" + default y + help + Parse a .wav file into raw audio + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_Y4M + bool "y4m" + help + Encodes a YUV frame into the yuv4mpeg format (mjpegtools) + +comment "plugins with external dependencies" + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_OSS + bool "ossaudio (OSS audio)" + help + OSS (Open Sound System) support for GStreamer + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_OSS4 + bool "oss4 (Open Sound System 4)" + help + Open Sound System (OSS) version 4 support for GStreamer + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_V4L2 + bool "v4l2" + help + elements for Video 4 Linux + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_CAIRO + bool "cairo" + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_CAIRO_PNG + help + Cairo-based elements + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_FLAC + bool "flac (libFLAC)" + select BR2_PACKAGE_FLAC + help + The FLAC Lossless compressor Codec + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_GDKPIXBUF + bool "gdkpixbuf" + select BR2_PACKAGE_GDK_PIXBUF + depends on BR2_USE_WCHAR # gdk-pixbuf -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # gdk-pixbuf -> libglib2 + help + GdkPixbuf-based image decoder, overlay and sink + +comment "gdkpixbuf needs a toolchain w/ wchar, threads" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_PULSE + depends on BR2_TOOLCHAIN_HAS_THREADS # pulseaudio + depends on BR2_LARGEFILE # pulseaudio -> libsndfile + select BR2_PACKAGE_PULSEAUDIO + bool "pulseaudio" + help + PulseAudio plugin library + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SOUPHTTPSRC + bool "souphttpsrc (http client)" + depends on BR2_USE_WCHAR # libsoup -> glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libsoup -> glib2 + select BR2_PACKAGE_LIBSOUP + help + libsoup HTTP client src/sink + +comment "souphttpsrc needs a toolchain w/ wchar, threads" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SPEEX + bool "speex" + select BR2_PACKAGE_SPEEX + help + Speex plugin library + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_TAGLIB + bool "taglib" + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_TAGLIB + help + Taglib tagging plugin library + +comment "taglib needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_VPX + bool "vpx (webm)" + select BR2_PACKAGE_LIBVPX + depends on BR2_TOOLCHAIN_HAS_THREADS # libvpx + help + VP8 plugin + +comment "libvpx needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_WAVPACK + bool "wavpack (*.wv audio)" + select BR2_PACKAGE_WAVPACK + help + Wavpack lossless/lossy audio format handling + +endif diff --git a/package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk b/package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk new file mode 100644 index 0000000000..982b2b3258 --- /dev/null +++ b/package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk @@ -0,0 +1,424 @@ +################################################################################ +# +# gst1-plugins-good +# +################################################################################ + +GST1_PLUGINS_GOOD_VERSION = 1.2.1 +GST1_PLUGINS_GOOD_SOURCE = gst-plugins-good-$(GST1_PLUGINS_GOOD_VERSION).tar.xz +GST1_PLUGINS_GOOD_SITE = http://gstreamer.freedesktop.org/src/gst-plugins-good +GST1_PLUGINS_GOOD_LICENSE_FILES = COPYING +GST1_PLUGINS_GOOD_LICENSE = LGPLv2.1+ + +GST1_PLUGINS_GOOD_CONF_OPT = \ + --disable-debug \ + --disable-valgrind \ + --disable-examples \ + --disable-directsound \ + --disable-waveform \ + --disable-sunaudio \ + --disable-osx_audio \ + --disable-osx_video \ + --disable-aalib \ + --disable-aalibtest \ + --disable-libcaca \ + --disable-esd \ + --disable-esdtest + + +# Options which require currently unpackaged libraries +GST1_PLUGINS_GOOD_CONF_OPT += \ + --disable-jack \ + --disable-libdv \ + --disable-dv1394 \ + --disable-shout2 \ + --disable-taglib + +GST1_PLUGINS_GOOD_DEPENDENCIES = gstreamer1 gst1-plugins-base + +ifeq ($(BR2_PACKAGE_ORC),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-orc +GST1_PLUGINS_GOOD_DEPENDENCIES += orc +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ALPHA),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-alpha +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-alpha +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_APETAG),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-apetag +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-apetag +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AUDIOFX),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-audiofx +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-audiofx +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AUDIOPARSERS),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-audioparsers +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-audioparsers +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AUPARSE),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-auparse +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-auparse +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AUTODETECT),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-autodetect +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-autodetect +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AVI),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-avi +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-avi +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_CUTTER),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-cutter +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-cutter +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_DEBUGUTILS),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-debugutils +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-debugutils +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_DEINTERLACE),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-deinterlace +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-deinterlace +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_DTMF),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-dtmf +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-dtmf +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_EFFECTV),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-effectv +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-effectv +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_EQUALIZER),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-equalizer +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-equalizer +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_FLV),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-flv +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-flv +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_FLX),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-flx +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-flx +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_GOOM),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-goom +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-goom +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_GOOM2K1),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-goom2k1 +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-goom2k1 +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ICYDEMUX),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-icydemux +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-icydemux +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ID3DEMUX),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-id3demux +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-id3demux +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_IMAGEFREEZE),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-imagefreeze +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-imagefreeze +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_INTERLEAVE),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-interleave +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-interleave +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ISOMP4),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-isomp4 +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-isomp4 +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_LAW),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-law +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-law +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_LEVEL),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-level +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-level +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MATROSKA),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-matroska +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-matroska +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MONOSCOPE),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-monoscope +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-monoscope +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MULTIFILE),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-multifile +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-multifile +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MULTIPART),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-multipart +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-multipart +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_REPLAYGAIN),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-replaygain +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-replaygain +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_RTP),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-rtp +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-rtp +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_RTPMANAGER),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-rtpmanager +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-rtpmanager +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_RTSP),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-rtsp +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-rtsp +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SHAPEWIPE),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-shapewipe +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-shapewipe +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SMPTE),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-smpte +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-smpte +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SPECTRUM),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-spectrum +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-spectrum +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_UDP),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-udp +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-udp +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_VIDEOBOX),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-videobox +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-videobox +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_VIDEOCROP),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-videocrop +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-videocrop +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_VIDEOFILTER),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-videofilter +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-videofilter +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_VIDEOMIXER),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-videomixer +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-videomixer +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_WAVENC),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-wavenc +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-wavenc +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_WAVPARSE),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-wavparse +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-wavparse +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_Y4M),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-y4m +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-y4m +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_OSS),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-oss +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-oss +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_OSS4),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-oss4 +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-oss4 +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_V4L2),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-gst_v4l2 +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-gst_v4l2 +endif + +ifeq ($(BR2_PACKAGE_XORG7),y) +GST1_PLUGINS_GOOD_DEPENDENCIES += xlib_libX11 xlib_libXext xlib_libXv +GST1_PLUGINS_GOOD_CONF_OPT += \ + --enable-x \ + --enable-xshm \ + --enable-xvideo +else +GST1_PLUGINS_GOOD_CONF_OPT += \ + --disable-x \ + --disable-xshm \ + --disable-xvideo +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_CAIRO),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-cairo +GST1_PLUGINS_GOOD_DEPENDENCIES += cairo +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-cairo +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_FLAC),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-flac +GST1_PLUGINS_GOOD_DEPENDENCIES += flac +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-flac +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_GDKPIXBUF),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-gdk_pixbuf +GST1_PLUGINS_GOOD_DEPENDENCIES += gdk-pixbuf +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-gdk_pixbuf +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_JPEG),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-jpeg +GST1_PLUGINS_GOOD_DEPENDENCIES += jpeg +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-jpeg +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PNG),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-libpng +GST1_PLUGINS_GOOD_DEPENDENCIES += libpng +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-libpng +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_PULSE),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-pulse +GST1_PLUGINS_GOOD_DEPENDENCIES += pulseaudio +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-pulse +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SOUPHTTPSRC),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-soup +GST1_PLUGINS_GOOD_DEPENDENCIES += libsoup +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-soup +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SPEEX),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-speex +GST1_PLUGINS_GOOD_DEPENDENCIES += speex +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-speex +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_TAGLIB),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-taglib +GST1_PLUGINS_GOOD_DEPENDENCIES += taglib +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-taglib +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_VPX),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-vpx +GST1_PLUGINS_GOOD_DEPENDENCIES += libvpx +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-vpx +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_WAVPACK),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-wavpack +GST1_PLUGINS_GOOD_DEPENDENCIES += wavpack +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-wavpack +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_ZLIB),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-zlib +GST1_PLUGINS_GOOD_DEPENDENCIES += zlib +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-zlib +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_BZ2),y) +GST1_PLUGINS_GOOD_CONF_OPT += --enable-bz2 +GST1_PLUGINS_GOOD_DEPENDENCIES += bzip2 +else +GST1_PLUGINS_GOOD_CONF_OPT += --disable-bz2 +endif + +$(eval $(autotools-package)) diff --git a/package/gstreamer1/gst1-plugins-ugly/Config.in b/package/gstreamer1/gst1-plugins-ugly/Config.in new file mode 100644 index 0000000000..9b5c8e06a3 --- /dev/null +++ b/package/gstreamer1/gst1-plugins-ugly/Config.in @@ -0,0 +1,73 @@ +menuconfig BR2_PACKAGE_GST1_PLUGINS_UGLY + bool "gst1-plugins-ugly" + depends on BR2_PACKAGE_GSTREAMER1 + select BR2_PACKAGE_GST1_PLUGINS_BASE + help + A set of well-supported plug-ins for GStreamer, but might pose + problems for distributors. + + http://gstreamer.freedesktop.org/ + +if BR2_PACKAGE_GST1_PLUGINS_UGLY + +comment "dependency-less plugins" + +config BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_ASFDEMUX + bool "asfdemux" + help + Demuxes and muxes audio and video in Microsofts ASF format + +config BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_DVDLPCMDEC + bool "dvdlpcmdec" + help + Decode DVD LPCM frames into standard PCM + +config BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_DVDSUB + bool "dvdsub" + help + DVD subtitle parser and decoder + +config BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_XINGMUX + bool "xingmux" + help + Add XING tags to mpeg audio files + +config BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_REALMEDIA + bool "realmedia" + help + RealMedia support plugins + +comment "plugins with external dependencies (there may be more available)" + +config BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_DVDREAD + bool "dvdread" + depends on BR2_LARGEFILE # libdvdread + select BR2_PACKAGE_LIBDVDREAD + help + Access a DVD with dvdread + +comment "dvdread needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE + +config BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_LAME + bool "lame (*.mp3 audio encoder)" + select BR2_PACKAGE_LAME + help + Encode MP3s with LAME + +config BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_MAD + bool "mad (*.mp3 audio)" + select BR2_PACKAGE_LIBID3TAG + select BR2_PACKAGE_LIBMAD + help + mp3 decoding based on the mad library + +config BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_MPEG2DEC + bool "mpeg2dec" + select BR2_PACKAGE_LIBMPEG2 + help + LibMpeg2 decoder + +# Note: to get descriptions use the following. +# # find . -name 'plugin-*.xml' | xargs grep -m 1 description +endif diff --git a/package/gstreamer1/gst1-plugins-ugly/gst1-plugins-ugly.mk b/package/gstreamer1/gst1-plugins-ugly/gst1-plugins-ugly.mk new file mode 100644 index 0000000000..63f2b8d64d --- /dev/null +++ b/package/gstreamer1/gst1-plugins-ugly/gst1-plugins-ugly.mk @@ -0,0 +1,104 @@ +################################################################################ +# +# gst1-plugins-ugly +# +################################################################################ + +GST1_PLUGINS_UGLY_VERSION = 1.2.1 +GST1_PLUGINS_UGLY_SOURCE = gst-plugins-ugly-$(GST1_PLUGINS_UGLY_VERSION).tar.xz +GST1_PLUGINS_UGLY_SITE = http://gstreamer.freedesktop.org/src/gst-plugins-ugly +GST1_PLUGINS_UGLY_LICENSE_FILES = COPYING +# GPL licensed plugins will append to GST1_PLUGINS_UGLY_LICENSE if enabled. +GST1_PLUGINS_UGLY_LICENSE = LGPLv2.1+ + +GST1_PLUGINS_UGLY_CONF_OPT = \ + --disable-examples \ + --disable-debug \ + --disable-valgrind + +GST_PLUGINS_BAD1_CONF_OPT += \ + --disable-a52dec \ + --disable-amrnb \ + --disable-amrwb \ + --disable-cdio \ + --disable-sidplay \ + --disable-twolame \ + --disable-x264 + +GST1_PLUGINS_UGLY_DEPENDENCIES = gstreamer1 gst1-plugins-base + +ifeq ($(BR2_PACKAGE_ORC),y) +GST1_PLUGINS_UGLY_CONF_OPT += --enable-orc +GST1_PLUGINS_UGLY_DEPENDENCIES += orc +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_ASFDEMUX),y) +GST1_PLUGINS_UGLY_CONF_OPT += --enable-asfdemux +else +GST1_PLUGINS_UGLY_CONF_OPT += --disable-asfdemux +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_DVDLPCMDEC),y) +GST1_PLUGINS_UGLY_CONF_OPT += --enable-dvdlpcmdec +else +GST1_PLUGINS_UGLY_CONF_OPT += --disable-dvdlpcmdec +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_DVDSUB),y) +GST1_PLUGINS_UGLY_CONF_OPT += --enable-dvdsub +else +GST1_PLUGINS_UGLY_CONF_OPT += --disable-dvdsub +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_UGL1_PLUGIN_XINGMUX),y) +GST1_PLUGINS_UGLY_CONF_OPT += --enable-xingmux +else +GST1_PLUGINS_UGLY_CONF_OPT += --disable-xingmux +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_REALMEDIA),y) +GST1_PLUGINS_UGLY_CONF_OPT += --enable-realmedia +else +GST1_PLUGINS_UGLY_CONF_OPT += --disable-realmedia +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_DVDREAD),y) +GST1_PLUGINS_UGLY_CONF_OPT += --enable-dvdread +GST1_PLUGINS_UGLY_DEPENDENCIES += libdvdread +GST1_PLUGINS_UGLY_HAS_GPL_LICENSE = y +else +GST1_PLUGINS_UGLY_CONF_OPT += --disable-dvdread +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_LAME),y) +GST1_PLUGINS_UGLY_CONF_OPT += --enable-lame +GST1_PLUGINS_UGLY_DEPENDENCIES += lame +else +GST1_PLUGINS_UGLY_CONF_OPT += --disable-lame +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_MAD),y) +GST1_PLUGINS_UGLY_CONF_OPT += --enable-mad +GST1_PLUGINS_UGLY_DEPENDENCIES += libid3tag libmad +GST1_PLUGINS_UGLY_HAS_GPL_LICENSE = y +else +GST1_PLUGINS_UGLY_CONF_OPT += --disable-mad +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_MPEG2DEC),y) +GST1_PLUGINS_UGLY_CONF_OPT += --enable-mpeg2dec +GST1_PLUGINS_UGLY_DEPENDENCIES += libmpeg2 +GST1_PLUGINS_ULGY_HAS_GPL_LICENSE = y +else +GST1_PLUGINS_UGLY_CONF_OPT += --disable-mpeg2dec +endif + +# Add GPL license if GPL plugins enabled. +ifeq ($(GST1_PLUGINS_UGLY_HAS_GPL_LICENSE),y) +GST1_PLUGINS_UGLY_LICENSE += GPLv2 +endif + +# Use the following command to extract license info for plugins. +# # find . -name 'plugin-*.xml' | xargs grep license + +$(eval $(autotools-package)) diff --git a/package/gstreamer1/gstreamer1.mk b/package/gstreamer1/gstreamer1.mk new file mode 100644 index 0000000000..5b748e33fb --- /dev/null +++ b/package/gstreamer1/gstreamer1.mk @@ -0,0 +1 @@ +include package/gstreamer1/*/*.mk diff --git a/package/gstreamer1/gstreamer1/Config.in b/package/gstreamer1/gstreamer1/Config.in new file mode 100644 index 0000000000..8c8f165357 --- /dev/null +++ b/package/gstreamer1/gstreamer1/Config.in @@ -0,0 +1,55 @@ +config BR2_PACKAGE_GSTREAMER1 + bool "gstreamer1" + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + select BR2_PACKAGE_LIBGLIB2 + help + GStreamer is an open source multimedia framework. This 1.x version of + Gstreamer is incompatible with Gstreamer 0.10.x. + + http://gstreamer.freedesktop.org/ + +if BR2_PACKAGE_GSTREAMER1 + +config BR2_PACKAGE_GSTREAMER1_PARSE + bool "enable command-line parser" + default y + help + Enable command line parser for gstreamer. This may incrase the CPu + overhead by a small amount. + +config BR2_PACKAGE_GSTREAMER1_TRACE + bool "enable tracing subsystem" + default y + help + Enable the tracing subsystem within gstreamer. This may increase CPU + overhead by a small amount. + +config BR2_PACKAGE_GSTREAMER1_GST_DEBUG + bool "enable gst-debug trace support" + default y + help + Enable support for the gst-debug tracing functionality in gstreamer. + This has limited CPU overhead, but does increase the rootfs size + somewhat. + +config BR2_PACKAGE_GSTREAMER1_PLUGIN_REGISTRY + bool "enable plugin registry" + default y + help + Enable support for the GStreamer plugin registry. This may increase + the launch-time for a GStreamer application. + +config BR2_PACKAGE_GSTREAMER1_INSTALL_TOOLS + bool "install gst-launch & gst-inspect" + default y + help + Install the gst-launch and gst-inspect tools. This will take up + additional space on the target. + +endif + +comment "gstreamer1 needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/gstreamer1/gstreamer1/gstreamer1.mk b/package/gstreamer1/gstreamer1/gstreamer1.mk new file mode 100644 index 0000000000..82b15bc13b --- /dev/null +++ b/package/gstreamer1/gstreamer1/gstreamer1.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# gstreamer1 +# +################################################################################ + +GSTREAMER1_VERSION = 1.2.1 +GSTREAMER1_SOURCE = gstreamer-$(GSTREAMER1_VERSION).tar.xz +GSTREAMER1_SITE = http://gstreamer.freedesktop.org/src/gstreamer +GSTREAMER1_INSTALL_STAGING = YES +GSTREAMER1_LICENSE_FILES = COPYING +GSTREAMER1_LICENSE = LGPLv2+ LGPLv2.1+ + +# Checking if unaligned memory access works correctly cannot be done when cross +# compiling. For the following architectures there is no information available +# in the configure script. +ifeq ($(BR2_avr32),y) +GSTREAMER1_CONF_ENV = as_cv_unaligned_access=no +endif +ifeq ($(BR2_aarch64),y) +GSTREAMER1_CONF_ENV = as_cv_unaligned_access=yes +endif + +GSTREAMER1_CONF_OPT = \ + --disable-examples \ + --disable-tests \ + --disable-failing-tests \ + --disable-debug \ + --disable-valgrind \ + --disable-benchmarks \ + --disable-check \ + $(if $(BR2_PACKAGE_GSTREAMER1_TRACE),,--disable-trace) \ + $(if $(BR2_PACKAGE_GSTREAMER1_PARSE),,--disable-parse) \ + $(if $(BR2_PACKAGE_GSTREAMER1_GST_DEBUG),,--disable-gst-debug) \ + $(if $(BR2_PACKAGE_GSTREAMER1_PLUGIN_REGISTRY),,--disable-registry) \ + $(if $(BR2_PACKAGE_GSTREAMER1_INSTALL_TOOLS),,--disable-tools) + +GSTREAMER1_DEPENDENCIES = libglib2 host-pkgconf host-bison host-flex + +$(eval $(autotools-package)) diff --git a/package/gtest/Config.in b/package/gtest/Config.in new file mode 100644 index 0000000000..c07f13bf6f --- /dev/null +++ b/package/gtest/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_GTEST + bool "gtest" + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # fork() + help + Google's framework for writing C++ tests on a variety of + platforms (Linux, Mac OS X, Windows, Cygwin, Windows CE, and + Symbian). Based on the xUnit architecture. Supports + automatic test discovery, a rich set of assertions, + user-defined assertions, death tests, fatal and non-fatal + failures, value- and type-parameterized tests, various + options for running the tests, and XML test report + generation. + + Gtest also allows to easily build testsuites for C programs. + + This package allows running testsuites on the target which + might be advantageous in certain cases. + + http://code.google.com/p/googletest/ + +comment "gtest needs a toolchain w/ C++, wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP diff --git a/package/gtest/gtest.mk b/package/gtest/gtest.mk new file mode 100644 index 0000000000..e661d734c1 --- /dev/null +++ b/package/gtest/gtest.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# gtest +# +################################################################################ + +GTEST_VERSION = 1.7.0 +GTEST_SOURCE = gtest-$(GTEST_VERSION).zip +GTEST_SITE = http://googletest.googlecode.com/files/ +GTEST_INSTALL_STAGING = YES +GTEST_INSTALL_TARGET = NO +GTEST_LICENSE = BSD-3c +GTEST_LICENSE_FILES = LICENSE + +define GTEST_EXTRACT_CMDS + unzip $(DL_DIR)/$(GTEST_SOURCE) -d $(BUILD_DIR) +endef + +define GTEST_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 0755 $(@D)/libgtest.a $(STAGING_DIR)/usr/lib/libgtest.a + $(INSTALL) -d -m 0755 $(STAGING_DIR)/usr/include/gtest/ + cp -rp $(@D)/include/gtest/* $(STAGING_DIR)/usr/include/gtest/ +endef + +$(eval $(cmake-package)) diff --git a/package/gtk2-engines/Config.in b/package/gtk2-engines/Config.in index 265f80564b..756a7d00f1 100644 --- a/package/gtk2-engines/Config.in +++ b/package/gtk2-engines/Config.in @@ -1,4 +1,4 @@ -config BR2_PACKAGE_LIBGTK2_ENGINES +config BR2_PACKAGE_GTK2_ENGINES bool "gtk engines" depends on BR2_PACKAGE_LIBGTK2 help diff --git a/package/gtk2-engines/gtk2-engines.mk b/package/gtk2-engines/gtk2-engines.mk index f188188dcc..402b3c967b 100644 --- a/package/gtk2-engines/gtk2-engines.mk +++ b/package/gtk2-engines/gtk2-engines.mk @@ -1,18 +1,16 @@ -############################################################# +################################################################################ # -# gtk2-engines.0 +# gtk2-engines # -############################################################# -GTK2_ENGINES_VERSION:=2.9.1 -GTK2_ENGINES_SOURCE:=gtk-engines-$(GTK2_ENGINES_VERSION).tar.bz2 -GTK2_ENGINES_SITE:=http://ftp.gnome.org/pub/GNOME/sources/gtk-engines/2.9 -GTK2_ENGINES_CAT:=$(BZCAT) -GTK2_ENGINES_DIR:=$(BUILD_DIR)/gtk-engines-$(GTK2_ENGINES_VERSION) -GTK2_ENGINES_BINARY:=libclearlooks.so +################################################################################ -GTK2_ENGINES_BUILD_ENV= \ - $(TARGET_CONFIGURE_OPTS) \ - $(TARGET_CONFIGURE_ARGS) \ +GTK2_ENGINES_VERSION = 2.20.2 +GTK2_ENGINES_SOURCE = gtk-engines-$(GTK2_ENGINES_VERSION).tar.bz2 +GTK2_ENGINES_SITE = http://ftp.gnome.org/pub/GNOME/sources/gtk-engines/2.20 + +GTK2_ENGINES_DEPENDENCIES = libgtk2 host-intltool + +GTK2_ENGINES_CONF_ENV = \ ac_cv_func_posix_getpwuid_r=yes \ glib_cv_stack_grows=no \ glib_cv_uscore=no \ @@ -65,37 +63,7 @@ GTK2_ENGINES_BUILD_ENV= \ gl_cv_c_restrict=no \ ac_cv_path_CUPS_CONFIG=no - -$(DL_DIR)/$(GTK2_ENGINES_SOURCE): - $(call DOWNLOAD,$(GTK2_ENGINES_SITE),$(GTK2_ENGINES_SOURCE)) - -gtk2-engines-source: $(DL_DIR)/$(GTK2_ENGINES_SOURCE) - -$(GTK2_ENGINES_DIR)/.unpacked: $(DL_DIR)/$(GTK2_ENGINES_SOURCE) - $(GTK2_ENGINES_CAT) $(DL_DIR)/$(GTK2_ENGINES_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - toolchain/patch-kernel.sh $(GTK2_ENGINES_DIR) package/gtk2-engines/ \*.patch* - $(CONFIG_UPDATE) $(GTK2_ENGINES_DIR) - touch $(GTK2_ENGINES_DIR)/.unpacked - -$(GTK2_ENGINES_DIR)/.configured: $(GTK2_ENGINES_DIR)/.unpacked - (cd $(GTK2_ENGINES_DIR); rm -rf config.cache; \ - $(GTK2_ENGINES_BUILD_ENV) \ - ./configure $(QUIET) \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libdir=/lib \ - --libexecdir=/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --includedir=/usr/include \ - --mandir=/usr/man \ - --infodir=/usr/info \ +GTK2_ENGINES_CONF_OPT = \ --with-x \ --x-includes=$(STAGING_DIR)/usr/include/X11 \ --x-libraries=$(STAGING_DIR)/usr/lib \ @@ -114,41 +82,6 @@ $(GTK2_ENGINES_DIR)/.configured: $(GTK2_ENGINES_DIR)/.unpacked --enable-animation \ --disable-development \ --disable-paranoia \ - --disable-deprecated \ - ) - touch $(GTK2_ENGINES_DIR)/.configured - -$(GTK2_ENGINES_DIR)/gtk/.libs/$(GTK2_ENGINES_BINARY): $(GTK2_ENGINES_DIR)/.configured - $(GTK2_ENGINES_BUILD_ENV) $(MAKE) CC="$(TARGET_CC)" -C $(GTK2_ENGINES_DIR) - touch -c $(GTK2_ENGINES_DIR)/gtk/.libs/$(GTK2_ENGINES_BINARY) + --disable-deprecated -$(STAGING_DIR)/lib/$(GTK2_ENGINES_BINARY): $(GTK2_ENGINES_DIR)/gtk/.libs/$(GTK2_ENGINES_BINARY) - $(MAKE) DESTDIR=$(STAGING_DIR) -C $(GTK2_ENGINES_DIR) install - touch -c $(STAGING_DIR)/lib/$(GTK2_ENGINES_BINARY) - -$(TARGET_DIR)/lib/gtk-2.0/2.10.0/engines/$(GTK2_ENGINES_BINARY): $(STAGING_DIR)/lib/$(GTK2_ENGINES_BINARY) - mkdir -p $(TARGET_DIR)/lib/gtk-2.0/2.10.0/engines - cp -a $(STAGING_DIR)/lib/gtk-2.0/2.10.0/engines/*.so \ - $(TARGET_DIR)/lib/gtk-2.0/2.10.0/engines/ - mkdir -p $(TARGET_DIR)/usr/usr/share/themes - cp -a $(STAGING_DIR)/usr/share/themes/Clearlooks \ - $(TARGET_DIR)/usr/share/themes/ - touch -c $(TARGET_DIR)/lib/gtk-2.0/2.10.0/engines/$(GTK2_ENGINES_BINARY) - -gtk2-engines: libgtk2 $(TARGET_DIR)/lib/gtk-2.0/2.10.0/engines/$(GTK2_ENGINES_BINARY) - -gtk2-engines-clean: - $(MAKE) DESTDIR=$(STAGING_DIR) -C $(GTK2_ENGINES_DIR) uninstall - -$(MAKE) -C $(GTK2_ENGINES_DIR) clean - -gtk2-engines-dirclean: - rm -rf $(GTK2_ENGINES_DIR) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_GTK2_ENGINES),y) -TARGETS+=gtk2-engines -endif +$(eval $(autotools-package)) diff --git a/package/gtk2-themes/Config.in b/package/gtk2-themes/Config.in index 351b602c05..ac212b898b 100644 --- a/package/gtk2-themes/Config.in +++ b/package/gtk2-themes/Config.in @@ -1,7 +1,6 @@ menu "GTK Themes" depends on BR2_PACKAGE_LIBGTK2 -config BR2_PACKAGE_GTK2_THEME_HICOLOR - bool "hicolor (default theme)" +source "package/gtk2-themes/gtk2-theme-hicolor/Config.in" endmenu diff --git a/package/gtk2-themes/gtk2-theme-hicolor/Config.in b/package/gtk2-themes/gtk2-theme-hicolor/Config.in new file mode 100644 index 0000000000..144f1d8656 --- /dev/null +++ b/package/gtk2-themes/gtk2-theme-hicolor/Config.in @@ -0,0 +1,2 @@ +config BR2_PACKAGE_GTK2_THEME_HICOLOR + bool "hicolor (default theme)" diff --git a/package/gtk2-themes/gtk2-theme-hicolor/gtk2-theme-hicolor.mk b/package/gtk2-themes/gtk2-theme-hicolor/gtk2-theme-hicolor.mk new file mode 100644 index 0000000000..ae677f74ed --- /dev/null +++ b/package/gtk2-themes/gtk2-theme-hicolor/gtk2-theme-hicolor.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# gtk2-theme-hicolor +# +################################################################################ + +GTK2_THEME_HICOLOR_VERSION = 0.10 +GTK2_THEME_HICOLOR_SOURCE = hicolor-icon-theme-$(GTK2_THEME_HICOLOR_VERSION).tar.gz +GTK2_THEME_HICOLOR_SITE = http://icon-theme.freedesktop.org/releases/ + +GTK2_THEME_HICOLOR_DEPENDENCIES = libgtk2 + +$(eval $(autotools-package)) diff --git a/package/gtk2-themes/gtk2-themes.mk b/package/gtk2-themes/gtk2-themes.mk new file mode 100644 index 0000000000..fc66698a1d --- /dev/null +++ b/package/gtk2-themes/gtk2-themes.mk @@ -0,0 +1 @@ +include $(sort $(wildcard package/gtk2-themes/*/*.mk)) diff --git a/package/gtk2-themes/gtk2_themes.mk b/package/gtk2-themes/gtk2_themes.mk deleted file mode 100644 index 8dc8af4873..0000000000 --- a/package/gtk2-themes/gtk2_themes.mk +++ /dev/null @@ -1,18 +0,0 @@ -############################################################# -# -# GTK Theme - Hicolour -# -############################################################# -GTK2_THEME_HICOLOR_VERSION = 0.10 -GTK2_THEME_HICOLOR_SOURCE = hicolor-icon-theme-$(GTK2_THEME_HICOLOR_VERSION).tar.gz -GTK2_THEME_HICOLOR_SITE = http://icon-theme.freedesktop.org/releases/ -GTK2_THEME_HICOLOR_INSTALL_STAGING = NO -GTK2_THEME_HICOLOR_INSTALL_TARGET = YES - -GTK2_THEME_HICOLOR_CONF_OPT = --target=$(GNU_TARGET_NAME) --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) --prefix=/usr \ - --includedir=/usr/include - -GTK2_THEME_HICOLOR_DEPENDENCIES = libgtk2 - -$(eval $(call AUTOTARGETS,package,gtk2_theme_hicolor)) diff --git a/package/gtkperf/gtkperf.mk b/package/gtkperf/gtkperf.mk index 8d314ee68f..fa9531dcd9 100644 --- a/package/gtkperf/gtkperf.mk +++ b/package/gtkperf/gtkperf.mk @@ -1,13 +1,12 @@ -############################################################# +################################################################################ # -# GtkPerf +# gtkperf # -############################################################# -GTKPERF_VERSION:=0.40 -GTKPERF_SOURCE:=gtkperf_$(GTKPERF_VERSION).tar.gz -GTKPERF_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/gtkperf -GTKPERF_INSTALL_TARGET = YES -GTKPERF_DEPENDENCIES = libgtk2 +################################################################################ -$(eval $(call AUTOTARGETS,package,gtkperf)) +GTKPERF_VERSION = 0.40 +GTKPERF_SOURCE = gtkperf_$(GTKPERF_VERSION).tar.gz +GTKPERF_SITE = http://downloads.sourceforge.net/project/gtkperf/gtkperf/$(GTKPERF_VERSION) +GTKPERF_DEPENDENCIES = libgtk2 +$(eval $(autotools-package)) diff --git a/package/gutenprint/Config.in b/package/gutenprint/Config.in new file mode 100644 index 0000000000..f93717c7f2 --- /dev/null +++ b/package/gutenprint/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_GUTENPRINT + bool "gutenprint" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_PACKAGE_CUPS + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + Gutenprint, formerly named Gimp-Print, is a suite of printer + drivers that may be used with most common UNIX print spooling + systems, including CUPS, lpr, LPRng, or others + + http://gimp-print.sourceforge.net/ + +comment "gutenprint needs a toolchain w/ C++" + depends on BR2_PACKAGE_CUPS + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/gutenprint/gutenprint-000-use-pregen-xmli18n-header.patch b/package/gutenprint/gutenprint-000-use-pregen-xmli18n-header.patch new file mode 100644 index 0000000000..533fe33d82 --- /dev/null +++ b/package/gutenprint/gutenprint-000-use-pregen-xmli18n-header.patch @@ -0,0 +1,48 @@ +src/xml: use preg-gen xmli18n_tmp.h if specified + +Ideally, the programs needed at build-time should be built with +CC_FOR_BUILD, and not with CC_FOR_HOST. + +Unfortunately, this program wants to link against the gutenprint libs, +so we would also need to build them with CC_FOR_HOST, that is build them +twice, once for build, once for host. + +Instead, in the Buildroot context, we first build gutenprint for the build +system, use that to generate the incriminated header, and then re-use that +header to build the gutenprint for the host. + +It is not possible to have such constructs in Makefile.am: + ifeq ($(FOO),) + bar: bla + cat $< >$@ + else + bar: + echo $(FOO) >$@ + endif + +as autoreconf will yell loudly that there is an 'endif' without an 'if'. +Sigh... :-( + +Signed-off-by: "Yann E. MORIN" + +diff -durN gutenprint-5.2.9.orig/src/xml/Makefile.am gutenprint-5.2.9/src/xml/Makefile.am +--- gutenprint-5.2.9.orig/src/xml/Makefile.am 2011-03-30 02:43:24.000000000 +0200 ++++ gutenprint-5.2.9/src/xml/Makefile.am 2013-03-24 17:08:08.435918773 +0100 +@@ -52,10 +52,13 @@ + + + xmli18n-tmp.h: xml-stamp extract-strings +- -rm -f $@ $@.tmp +- ./extract-strings `cat xml-stamp | sed -e 's;^;$(srcdir)/;'` > $@.tmp +- mv $@.tmp $@ +- ++ if [ -z "$(BR2_USE_PREGEN_XMLI18N_TMP_H)" ]; then \ ++ rm -f $@ $@.tmp; \ ++ ./extract-strings `cat xml-stamp | sed -e 's;^;$(srcdir)/;'` > $@.tmp; \ ++ mv $@.tmp $@; \ ++ else \ ++ cp $(BR2_USE_PREGEN_XMLI18N_TMP_H) $@; \ ++ fi + + dist-hook: xmli18n-tmp.h xml-stamp + # xmli18n-tmp.h is needed by po/POTFILES.in at dist time diff --git a/package/gutenprint/gutenprint.mk b/package/gutenprint/gutenprint.mk new file mode 100644 index 0000000000..0924cb631a --- /dev/null +++ b/package/gutenprint/gutenprint.mk @@ -0,0 +1,87 @@ +################################################################################ +# +# gutenprint +# +################################################################################ + +GUTENPRINT_VERSION = 5.2.9 +GUTENPRINT_SITE = http://downloads.sourceforge.net/project/gimp-print/gutenprint-5.2/$(GUTENPRINT_VERSION) +GUTENPRINT_SOURCE = gutenprint-$(GUTENPRINT_VERSION).tar.bz2 +GUTENPRINT_LICENSE = GPLv2+ +GUTENPRINT_LICENSE_FILES = COPYING + +# Needed, as we touch Makefile.am +GUTENPRINT_AUTORECONF = YES + +GUTENPRINT_DEPENDENCIES = cups host-pkgconf \ + $(if $(BR2_PACKAGE_LIBICONV),libiconv) + +# host-gutenprint is needed to generate XML as part of compilation +# the program that generates the xml also links against libgutenprint +# so we need to build both a host package and a target package +GUTENPRINT_DEPENDENCIES += host-gutenprint + +GUTENPRINT_CONF_ENV = ac_cv_path_CUPS_CONFIG=$(STAGING_DIR)/usr/bin/cups-config \ + ac_cv_path_IJS_CONFIG="" + +GUTENPRINT_CONF_OPT = --disable-libgutenprintui2 \ + --disable-samples \ + --without-doc \ + --without-gimp2 \ + --without-foomatic \ + --without-foomatic3 \ + --disable-escputil \ + --disable-test \ + --disable-testpattern \ + --with-cups="/usr" \ + --with-sysroot="$(STAGING_DIR)" \ + --disable-cups-ppds + +# USE_PREGEN_XMLI18N_TMP_H is added by our patch +GUTENPRINT_MAKE_ENV = BR2_USE_PREGEN_XMLI18N_TMP_H=$(HOST_DIR)/usr/include/xmli18n-tmp.h + +# We have no host dependencies +HOST_GUTENPRINT_DEPENDENCIES = +# The host-gutenprint shall create the required header +HOST_GUTENPRINT_MAKE_ENV = + +# Even with --without-cups, gutenprint will still add the output of +# cups-config --cflags / --ldflags to it's compiler/linker flags if +# available on host. +# Notice: Because of the configure logic, it needs to be set to the +# empty string to to disable this, not just to /bin/false like elsewhere. +HOST_GUTENPRINT_CONF_ENV = ac_cv_path_CUPS_CONFIG='' + +HOST_GUTENPRINT_CONF_OPT = --disable-libgutenprintui2 \ + --disable-samples \ + --without-gimp2 \ + --without-doc \ + --disable-nls \ + --disable-nls-macos \ + --without-foomatic \ + --without-foomatic3 \ + --disable-escputil \ + --disable-test \ + --disable-testpattern \ + --without-cups + +# Needed by autoreconf +define GUTENPRINT_CREATE_M4_DIR + mkdir -p $(@D)/m4local +endef +GUTENPRINT_POST_PATCH_HOOKS += GUTENPRINT_CREATE_M4_DIR +HOST_GUTENPRINT_POST_PATCH_HOOKS += GUTENPRINT_CREATE_M4_DIR + +define HOST_GUTENPRINT_POST_BUILD_INSTAL_TMP_HEADER + cp $(@D)/src/xml/xmli18n-tmp.h $(HOST_DIR)/usr/include +endef +HOST_GUTENPRINT_POST_BUILD_HOOKS += HOST_GUTENPRINT_POST_BUILD_INSTAL_TMP_HEADER + +define GUTENPRINT_POST_INSTALL_TARGET_FIXUP + mkdir -p $(TARGET_DIR)/usr/share/gutenprint/5.2 + cp -rf $(HOST_DIR)/usr/share/gutenprint/5.2/xml $(TARGET_DIR)/usr/share/gutenprint/5.2 +endef +GUTENPRINT_POST_INSTALL_TARGET_HOOKS += GUTENPRINT_POST_INSTALL_TARGET_FIXUP + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/gvfs/Config.in b/package/gvfs/Config.in index 04fce93fac..f3a04f5f3d 100644 --- a/package/gvfs/Config.in +++ b/package/gvfs/Config.in @@ -2,10 +2,10 @@ config BR2_PACKAGE_GVFS bool "gvfs" depends on BR2_LARGEFILE depends on BR2_USE_WCHAR # glib2 + depends on BR2_USE_MMU # dbus, glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, glib2 select BR2_PACKAGE_LIBGLIB2 - select BR2_PACKAGE_EXPAT # needed by dbus(-glib) select BR2_PACKAGE_DBUS - select BR2_PACKAGE_DBUS_GLIB select BR2_PACKAGE_SHARED_MIME_INFO help gvfs is a userspace virtual filesystem where mount runs as a @@ -16,5 +16,6 @@ config BR2_PACKAGE_GVFS http://en.wikipedia.org/wiki/GVFS -comment "gvfs requires a toolchain with LARGEFILE and WCHAR support" - depends on !BR2_LARGEFILE || !BR2_USE_WCHAR +comment "gvfs needs a toolchain w/ largefile, wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_LARGEFILE || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/gvfs/gvfs.mk b/package/gvfs/gvfs.mk index adfa966a59..6e88f6eea1 100644 --- a/package/gvfs/gvfs.mk +++ b/package/gvfs/gvfs.mk @@ -1,17 +1,20 @@ -############################################################# +################################################################################ # # gvfs # -############################################################# -GVFS_VERSION_MAJOR = 1.6 -GVFS_VERSION_MINOR = 6 +################################################################################ + +GVFS_VERSION_MAJOR = 1.16 +GVFS_VERSION_MINOR = 2 GVFS_VERSION = $(GVFS_VERSION_MAJOR).$(GVFS_VERSION_MINOR) -GVFS_SOURCE = gvfs-$(GVFS_VERSION).tar.gz +GVFS_SOURCE = gvfs-$(GVFS_VERSION).tar.xz GVFS_SITE = http://ftp.gnome.org/pub/GNOME/sources/gvfs/$(GVFS_VERSION_MAJOR) -GVFS_INSTALL_STAGING = NO -GVFS_INSTALL_TARGET = YES -GVFS_AUTORECONF = NO -GVFS_DEPENDENCIES = host-pkg-config host-libglib2 libglib2 dbus-glib shared-mime-info +GVFS_INSTALL_STAGING = YES +GVFS_DEPENDENCIES = host-pkgconf host-libglib2 libglib2 dbus shared-mime-info + +# Export ac_cv_path_LIBGCRYPT_CONFIG unconditionally to prevent +# build system from searching the host paths. +GVFS_CONF_ENV = ac_cv_path_LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config GVFS_CONF_OPT = \ --disable-gconf \ @@ -20,6 +23,7 @@ GVFS_CONF_OPT = \ --disable-gphoto2 \ --disable-keyring \ --disable-bash-completion \ + --disable-hal ifeq ($(BR2_PACKAGE_AVAHI),y) GVFS_DEPENDENCIES += avahi @@ -28,13 +32,6 @@ else GVFS_CONF_OPT += --disable-avahi endif -ifeq ($(BR2_PACKAGE_HAL),y) -GVFS_DEPENDENCIES += hal -GVFS_CONF_OPT += --enable-hal -else -GVFS_CONF_OPT += --disable-hal -endif - ifeq ($(BR2_PACKAGE_LIBARCHIVE),y) GVFS_DEPENDENCIES += libarchive GVFS_CONF_OPT += --enable-archive @@ -49,6 +46,10 @@ else GVFS_CONF_OPT += --disable-fuse endif +ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +GVFS_DEPENDENCIES += libgcrypt +endif + ifeq ($(BR2_PACKAGE_LIBSOUP),y) GVFS_DEPENDENCIES += libsoup GVFS_CONF_OPT += --enable-http @@ -71,6 +72,17 @@ define GVFS_REMOVE_USELESS_BINARY rm $(TARGET_DIR)/usr/bin/gvfs-less endef -GVFS_POST_INSTALL_TARGET_HOOKS += GVFS_REMOVE_USELESS_BINARY +define GVFS_REMOVE_TARGET_SCHEMAS + rm $(TARGET_DIR)/usr/share/glib-2.0/schemas/*.xml +endef + +define GVFS_COMPILE_SCHEMAS + $(HOST_DIR)/usr/bin/glib-compile-schemas --targetdir=$(TARGET_DIR)/usr/share/glib-2.0/schemas $(STAGING_DIR)/usr/share/glib-2.0/schemas +endef + +GVFS_POST_INSTALL_TARGET_HOOKS += \ + GVFS_REMOVE_USELESS_BINARY \ + GVFS_REMOVE_TARGET_SCHEMAS \ + GVFS_COMPILE_SCHEMAS -$(eval $(call AUTOTARGETS,package,gvfs)) +$(eval $(autotools-package)) diff --git a/package/gzip/Config.in b/package/gzip/Config.in index dc9d50b9a0..b30c1ca4d8 100644 --- a/package/gzip/Config.in +++ b/package/gzip/Config.in @@ -1,7 +1,11 @@ config BR2_PACKAGE_GZIP bool "gzip" + depends on BR2_USE_WCHAR help Standard GNU compressor. Provides things like gzip, gunzip, gzcat, etc... http://www.gnu.org/software/gzip/gzip.html + +comment "gzip needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/gzip/gzip.mk b/package/gzip/gzip.mk index 672172dd37..e1a7befdb1 100644 --- a/package/gzip/gzip.mk +++ b/package/gzip/gzip.mk @@ -1,10 +1,13 @@ -############################################################# +################################################################################ # # gzip # -############################################################# -GZIP_VERSION:=1.4 -GZIP_SOURCE:=gzip-$(GZIP_VERSION).tar.gz -GZIP_SITE:=$(BR2_GNU_MIRROR)/gzip +################################################################################ -$(eval $(call AUTOTARGETS,package,gzip)) +GZIP_VERSION = 1.6 +GZIP_SOURCE = gzip-$(GZIP_VERSION).tar.xz +GZIP_SITE = $(BR2_GNU_MIRROR)/gzip +GZIP_LICENSE = GPLv3+ +GZIP_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/hal/Config.in b/package/hal/Config.in deleted file mode 100644 index 1951c9d800..0000000000 --- a/package/hal/Config.in +++ /dev/null @@ -1,19 +0,0 @@ -config BR2_PACKAGE_HAL - bool "hal" - depends on BR2_USE_WCHAR # glib2 - select BR2_PACKAGE_EXPAT - select BR2_PACKAGE_LIBGLIB2 - select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE - select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE - select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE - select BR2_PACKAGE_DBUS - select BR2_DBUS_EXPAT - select BR2_PACKAGE_DBUS_GLIB - select BR2_PACKAGE_HWDATA - select BR2_PACKAGE_UDEV - select BR2_PACKAGE_UDEV_VOLUME_ID - help - The Hardware Abstraction Layer (HAL) suite. - -comment "hal requires a toolchain with WCHAR support" - depends on !BR2_USE_WCHAR diff --git a/package/hal/S98haldaemon b/package/hal/S98haldaemon deleted file mode 100755 index 40ea0f4d34..0000000000 --- a/package/hal/S98haldaemon +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh -# -# haldaemon: HAL daemon -# -# chkconfig: 345 98 02 -# description: This is a daemon for collecting and maintaing information \ -# about hardware from several sources. \ -# See http://www.freedesktop.org/Software/hal -# -# processname: hald -# pidfile: /var/run/haldaemon.pid -# - -# Sanity checks. -[ -x /usr/sbin/hald ] || exit 0 - -RETVAL=0 - -start() { - echo -n "Starting HAL daemon: " - hald - RETVAL=$? - echo "done" - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/haldaemon -} - -stop() { - echo -n "Stopping HAL daemon: " - - killall hald - RETVAL=$? - echo "done" - if [ $RETVAL -eq 0 ]; then - rm -f /var/lock/subsys/haldaemon - rm -f /var/run/haldaemon.pid - fi -} - -# See how we were called. -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - stop - sleep 3 - start - ;; - *) - echo $"Usage: $0 {start|stop|restart}" - ;; -esac -exit $RETVAL diff --git a/package/hal/hal-include-fix.patch b/package/hal/hal-include-fix.patch deleted file mode 100644 index af2a7fe59a..0000000000 --- a/package/hal/hal-include-fix.patch +++ /dev/null @@ -1,35 +0,0 @@ -[PATCH] hal: add missing includes - -- hald/linux/classdev.c needs sys/socket.h for struct sockaddr -- hald/linux/addons/addon-storage.c needs limits.h for INT_MAX - -Signed-off-by: Peter Korsgaard ---- - hald/linux/addons/addon-storage.c | 1 + - hald/linux/classdev.c | 1 + - 2 files changed, 2 insertions(+) - -Index: hal-0.5.8/hald/linux/addons/addon-storage.c -=================================================================== ---- hal-0.5.8.orig/hald/linux/addons/addon-storage.c -+++ hal-0.5.8/hald/linux/addons/addon-storage.c -@@ -29,6 +29,7 @@ - - #include - #include -+#include - #include - #include - #include -Index: hal-0.5.8/hald/linux/classdev.c -=================================================================== ---- hal-0.5.8.orig/hald/linux/classdev.c -+++ hal-0.5.8/hald/linux/classdev.c -@@ -31,6 +31,7 @@ - - #include - #include -+#include - #include - #include /* for ARPHRD_... */ - #include diff --git a/package/hal/hal.mk b/package/hal/hal.mk deleted file mode 100644 index 801fe92755..0000000000 --- a/package/hal/hal.mk +++ /dev/null @@ -1,107 +0,0 @@ -############################################################# -# -# hal -# -############################################################# -HAL_VERSION:=0.5.8 -HAL_SOURCE:=hal-$(HAL_VERSION).tar.gz -HAL_SITE:=http://people.freedesktop.org/~david/dist/ -HAL_DIR:=$(BUILD_DIR)/hal-$(HAL_VERSION) -HAL_CAT:=$(ZCAT) -HAL_BINARY:=hald/hald -HAL_TARGET_BINARY:=usr/sbin/hald - -GLIB_CFLAGS:=-I$(STAGING_DIR)/usr/include/glib-2.0 \ - -I$(STAGING_DIR)/usr/lib/glib-2.0/include -GLIB_LIBS:=$(STAGING_DIR)/usr/lib/libglib-2.0.so \ - $(STAGING_DIR)/usr/lib/libgmodule-2.0.so \ - $(STAGING_DIR)/usr/lib/libgobject-2.0.so \ - $(STAGING_DIR)/usr/lib/libgthread-2.0.so -DBUS_GLIB_LIBS:=$(STAGING_DIR)/usr/lib/libdbus-glib-1.so - -$(DL_DIR)/$(HAL_SOURCE): - $(call DOWNLOAD,$(HAL_SITE),$(HAL_SOURCE)) - -hal-source: $(DL_DIR)/$(HAL_SOURCE) - -$(HAL_DIR)/.unpacked: $(DL_DIR)/$(HAL_SOURCE) - $(HAL_CAT) $(DL_DIR)/$(HAL_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - toolchain/patch-kernel.sh $(HAL_DIR) package/hal/ \*.patch - touch $(HAL_DIR)/.unpacked - -$(HAL_DIR)/.configured: $(HAL_DIR)/.unpacked - (cd $(HAL_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - $(TARGET_CONFIGURE_ARGS) \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/lib/glib-2.0/include" \ - GLIB_CFLAGS="$(GLIB_CFLAGS)" \ - GLIB_LIBS="$(GLIB_LIBS)" \ - DBUS_CFLAGS="-I$(STAGING_DIR)/usr/include/dbus-1.0 -I$(STAGING_DIR)/usr/lib/dbus-1.0/include" \ - DBUS_LIBS="$(STAGING_DIR)/usr/lib/libdbus-1.so" \ - VOLUME_ID_CFLAGS="$(TARGET_CFLAGS)" \ - VOLUME_ID_LIBS="$(STAGING_DIR)/lib/libvolume_id.so" \ - ac_cv_path_LIBUSB_CONFIG= \ - ./configure $(QUIET) \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --with-hwdata=$(TARGET_DIR)/usr/share/hwdata \ - --with-expat=$(STAGING_DIR)/usr/ \ - --disable-policy-kit \ - --disable-gtk-doc \ - --disable-static \ - --disable-acpi-acpid \ - --disable-acpi-proc \ - ) - touch $(HAL_DIR)/.configured - -$(HAL_DIR)/hald/hald: $(HAL_DIR)/.configured - $(MAKE) STAGING_DIR="$(STAGING_DIR)" DESTDIR="$(TARGET_DIR)" DBUS_GLIB_LIBS="$(DBUS_GLIB_LIBS)" -C $(HAL_DIR) - -$(TARGET_DIR)/$(HAL_TARGET_BINARY): $(HAL_DIR)/hald/hald - $(MAKE) STAGING_DIR="$(STAGING_DIR)" DESTDIR="$(TARGET_DIR)" -C $(HAL_DIR) install - rm -rf $(TARGET_DIR)/usr/share/hal/device-manager - rm -rf $(TARGET_DIR)/usr/lib/libhal*.so - rm -rf $(TARGET_DIR)/usr/lib/hal - rm -rf $(TARGET_DIR)/etc/PolicyKit - $(INSTALL) -m 0755 -D package/hal/S98haldaemon $(TARGET_DIR)/etc/init.d - for file in hald-addon-acpi* hald-addon-cpufreq \ - hald-addon-keyboard hald-addon-pmu \ - hald-probe-pc-floppy hald-probe-printer \ - hald-probe-serial hald-probe-smbios \ - hal-storage-eject hal-storage-closetray \ - hal-system-power-pmu hald-probe-input \ - hald-probe-hiddev hald-addon-hid-ups; \ - do \ - rm -f $(TARGET_DIR)/usr/libexec/$$file; \ - done - -hal: host-pkg-config host-libxml-parser-perl dbus-glib hwdata udev $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl) $(TARGET_DIR)/$(HAL_TARGET_BINARY) - -hal-clean: - rm -f $(TARGET_DIR)/etc/dbus-1/system.d/hal.conf - rm -rf $(TARGET_DIR)/etc/hal $(TARGET_DIR)/usr/share/hal - rm -f $(TARGET_DIR)/etc/init.d/S98haldaemon - rm -f $(TARGET_DIR)/etc/udev/rules.d/90-hal.rules - rm -f $(TARGET_DIR)/usr/bin/hal-* $(TARGET_DIR)/usr/bin/lshal - rm -f $(TARGET_DIR)/usr/sbin/hald - rm -f $(TARGET_DIR)/usr/libexec/hald-* $(TARGET_DIR)/usr/libexec/hal-* - rmdir -p --ignore-fail-on-non-empty $(TARGET_DIR)/usr/libexec - rm -f $(TARGET_DIR)/usr/lib/libhal.so.1* - rm -f $(TARGET_DIR)/usr/lib/libhal-storage.so.1* - -$(MAKE) -C $(HAL_DIR) clean - -hal-dirclean: - rm -rf $(HAL_DIR) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_HAL),y) -TARGETS+=hal -endif diff --git a/package/hal/hal02-include-ieee80211-fix.patch b/package/hal/hal02-include-ieee80211-fix.patch deleted file mode 100644 index 9e7b5e2495..0000000000 --- a/package/hal/hal02-include-ieee80211-fix.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -ur hal-0.5.8/hald/linux/classdev.c hal-0.5.8-patched/hald/linux/classdev.c ---- hal-0.5.8/hald/linux/classdev.c 2006-09-11 18:32:56.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/classdev.c 2007-01-13 22:00:46.896769548 -0600 -@@ -32,7 +32,10 @@ - #include - #include - #include --#include /* for ARPHRD_... */ -+#include /* for ARPHRD_... */ -+#ifndef ARPHRD_IEEE80211_RADIOTAP -+# define ARPHRD_IEEE80211_RADIOTAP 803 -+#endif - #include - #include - #include diff --git a/package/hal/hal03-link-dbus.patch b/package/hal/hal03-link-dbus.patch deleted file mode 100644 index d522b85975..0000000000 --- a/package/hal/hal03-link-dbus.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff -urN hal-0.5.8/hald/linux/addons/Makefile.in hal-0.5.8-patched/hald/linux/addons/Makefile.in ---- hal-0.5.8/hald/linux/addons/Makefile.in 2006-09-11 18:25:31.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/addons/Makefile.in 2006-11-16 10:08:30.000000000 -0600 -@@ -119,7 +119,7 @@ - $(AM_CFLAGS) $(CFLAGS) - CCLD = $(CC) - LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ -- $(AM_LDFLAGS) $(LDFLAGS) -o $@ -+ $(AM_LDFLAGS) $(LDFLAGS) $(DBUS_LIBS) $(GLIB_LIBS) $(DBUS_GLIB_LIBS) -o $@ - SOURCES = $(hald_addon_acpi_SOURCES) \ - $(hald_addon_acpi_buttons_toshiba_SOURCES) \ - $(hald_addon_cpufreq_SOURCES) $(hald_addon_hid_ups_SOURCES) \ -diff -urN hal-0.5.8/hald/linux/probing/Makefile.in hal-0.5.8-patched/hald/linux/probing/Makefile.in ---- hal-0.5.8/hald/linux/probing/Makefile.in 2006-09-11 18:25:31.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/probing/Makefile.in 2006-11-16 10:08:30.000000000 -0600 -@@ -97,7 +97,7 @@ - $(AM_CFLAGS) $(CFLAGS) - CCLD = $(CC) - LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ -- $(AM_LDFLAGS) $(LDFLAGS) -o $@ -+ $(AM_LDFLAGS) $(LDFLAGS) $(DBUS_LIBS) -o $@ - SOURCES = $(hald_probe_hiddev_SOURCES) $(hald_probe_input_SOURCES) \ - $(hald_probe_pc_floppy_SOURCES) $(hald_probe_printer_SOURCES) \ - $(hald_probe_serial_SOURCES) $(hald_probe_smbios_SOURCES) \ -diff -urN hal-0.5.8/hald/Makefile.in hal-0.5.8-patched/hald/Makefile.in ---- hal-0.5.8/hald/Makefile.in 2006-09-11 18:25:30.000000000 -0500 -+++ hal-0.5.8-patched/hald/Makefile.in 2006-11-16 10:08:30.000000000 -0600 -@@ -71,7 +71,7 @@ - $(AM_CFLAGS) $(CFLAGS) - CCLD = $(CC) - LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ -- $(AM_LDFLAGS) $(LDFLAGS) -o $@ -+ $(AM_LDFLAGS) $(LDFLAGS) $(DBUS_GLIB_LIBS) $(GLIB_LIBS) -o $@ - SOURCES = $(hald_SOURCES) - DIST_SOURCES = $(hald_SOURCES) - RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ -diff -urN hal-0.5.8/hald-runner/Makefile.in hal-0.5.8-patched/hald-runner/Makefile.in ---- hal-0.5.8/hald-runner/Makefile.in 2006-09-11 18:25:30.000000000 -0500 -+++ hal-0.5.8-patched/hald-runner/Makefile.in 2006-11-16 10:09:06.000000000 -0600 -@@ -64,7 +64,7 @@ - $(AM_CFLAGS) $(CFLAGS) - CCLD = $(CC) - LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ -- $(AM_LDFLAGS) $(LDFLAGS) -o $@ -+ $(AM_LDFLAGS) $(LDFLAGS) $(GLIB_LIBS) $(DBUS_GLIB_LIBS) -o $@ - SOURCES = $(hald_runner_SOURCES) - DIST_SOURCES = $(hald_runner_SOURCES) - ETAGS = etags -diff -urN hal-0.5.8/tools/Makefile.in hal-0.5.8-patched/tools/Makefile.in ---- hal-0.5.8/tools/Makefile.in 2006-09-11 18:25:33.000000000 -0500 -+++ hal-0.5.8-patched/tools/Makefile.in 2006-11-16 10:10:14.000000000 -0600 -@@ -133,7 +133,7 @@ - $(AM_CFLAGS) $(CFLAGS) - CCLD = $(CC) - LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ -- $(AM_LDFLAGS) $(LDFLAGS) -o $@ -+ $(AM_LDFLAGS) $(LDFLAGS) $(DBUS_LIBS) $(GLIB_LIBS) $(DBUS_GLIB_LIBS) -o $@ - SOURCES = $(hal_device_SOURCES) $(hal_find_by_capability_SOURCES) \ - $(hal_find_by_property_SOURCES) $(hal_get_property_SOURCES) \ - $(hal_set_property_SOURCES) \ diff --git a/package/hal/hal04-remove-glib-dbus-headers.patch b/package/hal/hal04-remove-glib-dbus-headers.patch deleted file mode 100644 index fd83bd23c9..0000000000 --- a/package/hal/hal04-remove-glib-dbus-headers.patch +++ /dev/null @@ -1,275 +0,0 @@ -diff -ur hal-0.5.8/hald/device_info.c hal-0.5.8-patched/hald/device_info.c ---- hal-0.5.8/hald/device_info.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/device_info.c 2006-11-15 11:52:24.000000000 -0600 -@@ -33,8 +33,6 @@ - #include - #include - #include --#include --#include - #include - - #include "hald.h" -diff -ur hal-0.5.8/hald/dummy/osspec.c hal-0.5.8-patched/hald/dummy/osspec.c ---- hal-0.5.8/hald/dummy/osspec.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/dummy/osspec.c 2006-11-15 11:52:24.000000000 -0600 -@@ -28,8 +28,6 @@ - #endif - - #include --#include --#include - - #include "../osspec.h" - #include "../logger.h" -diff -ur hal-0.5.8/hald/hald.c hal-0.5.8-patched/hald/hald.c ---- hal-0.5.8/hald/hald.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/hald.c 2006-11-15 11:52:24.000000000 -0600 -@@ -42,10 +42,6 @@ - #include - #include - --#include --#include --#include -- - /*#include "master_slave.h"*/ - - #include "logger.h" -diff -ur hal-0.5.8/hald/hald_dbus.c hal-0.5.8-patched/hald/hald_dbus.c ---- hal-0.5.8/hald/hald_dbus.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/hald_dbus.c 2006-11-15 11:52:24.000000000 -0600 -@@ -35,9 +35,6 @@ - #include - #include - --#include --#include -- - #include "hald.h" - #include "hald_dbus.h" - #include "device.h" -diff -ur hal-0.5.8/hald/hald_runner.c hal-0.5.8-patched/hald/hald_runner.c ---- hal-0.5.8/hald/hald_runner.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/hald_runner.c 2006-11-15 11:52:24.000000000 -0600 -@@ -31,8 +31,6 @@ - #include - - #include --#include --#include - - #include "hald.h" - #include "util.h" -diff -ur hal-0.5.8/hald/linux/addons/addon-cpufreq.h hal-0.5.8-patched/hald/linux/addons/addon-cpufreq.h ---- hal-0.5.8/hald/linux/addons/addon-cpufreq.h 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/addons/addon-cpufreq.h 2006-11-15 11:52:24.000000000 -0600 -@@ -29,8 +29,6 @@ - #include - #endif - --#include --#include - #include - #include - #include -diff -ur hal-0.5.8/hald/linux/addons/addon-macbookpro-backlight.c hal-0.5.8-patched/hald/linux/addons/addon-macbookpro-backlight.c ---- hal-0.5.8/hald/linux/addons/addon-macbookpro-backlight.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/addons/addon-macbookpro-backlight.c 2006-11-15 11:52:24.000000000 -0600 -@@ -37,8 +37,6 @@ - #include - - #include --#include --#include - - #include "libhal/libhal.h" - #include "../../logger.h" -diff -ur hal-0.5.8/hald/linux/addons/addon-usb-csr.c hal-0.5.8-patched/hald/linux/addons/addon-usb-csr.c ---- hal-0.5.8/hald/linux/addons/addon-usb-csr.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/addons/addon-usb-csr.c 2006-11-15 11:52:24.000000000 -0600 -@@ -30,8 +30,6 @@ - #include - - #include --#include --#include - - #include "libhal/libhal.h" - #include "../../logger.h" -diff -ur hal-0.5.8/hald/linux/blockdev.c hal-0.5.8-patched/hald/linux/blockdev.c ---- hal-0.5.8/hald/linux/blockdev.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/blockdev.c 2006-11-15 11:52:24.000000000 -0600 -@@ -37,9 +37,6 @@ - #include - #include - --#include --#include -- - #include "../device_info.h" - #include "../hald.h" - #include "../hald_dbus.h" -diff -ur hal-0.5.8/hald/linux/classdev.c hal-0.5.8-patched/hald/linux/classdev.c ---- hal-0.5.8/hald/linux/classdev.c 2006-09-11 18:32:56.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/classdev.c 2006-11-15 11:52:24.000000000 -0600 -@@ -39,9 +39,6 @@ - #include - #include - --#include --#include -- - #include "../device_info.h" - #include "../device_store.h" - #include "../hald.h" -diff -ur hal-0.5.8/hald/linux/coldplug.c hal-0.5.8-patched/hald/linux/coldplug.c ---- hal-0.5.8/hald/linux/coldplug.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/coldplug.c 2006-11-15 11:52:24.000000000 -0600 -@@ -33,9 +33,6 @@ - #include - #include - --#include --#include -- - #include "../device_info.h" - #include "../hald.h" - #include "../logger.h" -diff -ur hal-0.5.8/hald/linux/hotplug.c hal-0.5.8-patched/hald/linux/hotplug.c ---- hal-0.5.8/hald/linux/hotplug.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/hotplug.c 2006-11-15 11:52:24.000000000 -0600 -@@ -32,9 +32,6 @@ - #include - #include - --#include --#include -- - #include "../device_info.h" - #include "../hald.h" - #include "../logger.h" -diff -ur hal-0.5.8/hald/linux/ids.c hal-0.5.8-patched/hald/linux/ids.c ---- hal-0.5.8/hald/linux/ids.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/ids.c 2006-11-15 11:56:11.000000000 -0600 -@@ -33,7 +33,6 @@ - #include - - #include --#include - - #include "../logger.h" - -diff -ur hal-0.5.8/hald/linux/osspec.c hal-0.5.8-patched/hald/linux/osspec.c ---- hal-0.5.8/hald/linux/osspec.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/osspec.c 2006-11-15 11:52:24.000000000 -0600 -@@ -44,9 +44,6 @@ - #include - #include - --#include --#include -- - #include "../device_info.h" - #include "../hald.h" - #include "../hald_dbus.h" -diff -ur hal-0.5.8/hald/linux/physdev.c hal-0.5.8-patched/hald/linux/physdev.c ---- hal-0.5.8/hald/linux/physdev.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/physdev.c 2006-11-15 11:52:24.000000000 -0600 -@@ -31,9 +31,6 @@ - #include - #include - --#include --#include -- - #include "../device_info.h" - #include "../hald.h" - #include "../logger.h" -diff -ur hal-0.5.8/hald/util.c hal-0.5.8-patched/hald/util.c ---- hal-0.5.8/hald/util.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/util.c 2006-11-15 11:52:24.000000000 -0600 -@@ -42,8 +42,6 @@ - #include - - #include --#include --#include - - #include "osspec.h" - #include "logger.h" -diff -ur hal-0.5.8/hald-runner/main.c hal-0.5.8-patched/hald-runner/main.c ---- hal-0.5.8/hald-runner/main.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald-runner/main.c 2006-11-15 11:52:24.000000000 -0600 -@@ -24,8 +24,6 @@ - **************************************************************************/ - #include - #include --#define DBUS_API_SUBJECT_TO_CHANGE --#include - - #include - #include "utils.h" -diff -ur hal-0.5.8/hald-runner/runner.c hal-0.5.8-patched/hald-runner/runner.c ---- hal-0.5.8/hald-runner/runner.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald-runner/runner.c 2006-11-15 11:56:42.000000000 -0600 -@@ -31,8 +31,7 @@ - #include - #include - --#define DBUS_API_SUBJECT_TO_CHANGE --#include -+#include - - #include - #include "utils.h" -diff -ur hal-0.5.8/hald-runner/runner.h hal-0.5.8-patched/hald-runner/runner.h ---- hal-0.5.8/hald-runner/runner.h 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald-runner/runner.h 2006-11-15 11:52:24.000000000 -0600 -@@ -25,9 +25,6 @@ - #ifndef RUNNER_H - #define RUNNER_H - --#define DBUS_API_SUBJECT_TO_CHANGE --#include -- - #include - - typedef struct { -diff -ur hal-0.5.8/hald-runner/utils.c hal-0.5.8-patched/hald-runner/utils.c ---- hal-0.5.8/hald-runner/utils.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald-runner/utils.c 2006-11-15 11:52:24.000000000 -0600 -@@ -24,8 +24,6 @@ - **************************************************************************/ - #include - #include --#define DBUS_API_SUBJECT_TO_CHANGE --#include - #include - - #include "utils.h" -diff -ur hal-0.5.8/hald-runner/utils.h hal-0.5.8-patched/hald-runner/utils.h ---- hal-0.5.8/hald-runner/utils.h 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald-runner/utils.h 2006-11-15 11:52:35.000000000 -0600 -@@ -25,8 +25,7 @@ - #ifndef UTILS_H - #define UTILS_H - --#define DBUS_API_SUBJECT_TO_CHANGE --#include -+#include - - char **get_string_array(DBusMessageIter *iter, gchar *extra); - char **get_string_array_from_fd(int fd); -diff -ur hal-0.5.8/tools/lshal.c hal-0.5.8-patched/tools/lshal.c ---- hal-0.5.8/tools/lshal.c 2006-09-11 16:56:40.000000000 -0500 -+++ hal-0.5.8-patched/tools/lshal.c 2006-11-15 11:52:24.000000000 -0600 -@@ -36,8 +36,6 @@ - #include - - #include --#include --#include - #include - - #ifdef __SUNPRO_C diff --git a/package/hal/hal05-libtool-hack.patch b/package/hal/hal05-libtool-hack.patch deleted file mode 100644 index 1b7e112049..0000000000 --- a/package/hal/hal05-libtool-hack.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -ur hal-0.5.8/libhal-storage/Makefile.in hal-0.5.8-patched/libhal-storage/Makefile.in ---- hal-0.5.8/libhal-storage/Makefile.in 2006-09-11 18:25:32.000000000 -0500 -+++ hal-0.5.8-patched/libhal-storage/Makefile.in 2007-01-14 17:17:28.628840792 -0600 -@@ -354,8 +354,7 @@ - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ -- echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ -- $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ -+ cp -a "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - diff --git a/package/hal/hal06-libintl.patch b/package/hal/hal06-libintl.patch deleted file mode 100644 index d38124e5c0..0000000000 --- a/package/hal/hal06-libintl.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -ur hal-0.5.8/hald/Makefile.in hal-0.5.8-patched/hald/Makefile.in ---- hal-0.5.8/hald/Makefile.in 2006-09-11 18:25:30.000000000 -0500 -+++ hal-0.5.8-patched/hald/Makefile.in 2007-01-17 08:54:04.000000000 -0600 -@@ -336,7 +336,7 @@ - osspec.h \ - property.h property.c - --hald_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ -lm @EXPAT_LIB@ $(top_builddir)/hald/$(HALD_BACKEND)/libhald_$(HALD_BACKEND).la -+hald_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ -lm @EXPAT_LIB@ @INTLLIBS@ $(top_builddir)/hald/$(HALD_BACKEND)/libhald_$(HALD_BACKEND).la - - #### Init scripts fun - SCRIPT_IN_FILES = haldaemon.in -diff -ur hal-0.5.8/hald-runner/Makefile.in hal-0.5.8-patched/hald-runner/Makefile.in ---- hal-0.5.8/hald-runner/Makefile.in 2006-09-11 18:25:30.000000000 -0500 -+++ hal-0.5.8-patched/hald-runner/Makefile.in 2007-01-17 08:54:18.000000000 -0600 -@@ -303,7 +303,7 @@ - @DBUS_CFLAGS@ @GLIB_CFLAGS@ - - hald_runner_SOURCES = main.c runner.c runner.h utils.h utils.c --hald_runner_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ -+hald_runner_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ @INTLLIBS@ - all: all-am - - .SUFFIXES: diff --git a/package/harfbuzz/Config.in b/package/harfbuzz/Config.in new file mode 100644 index 0000000000..7a864e9b7a --- /dev/null +++ b/package/harfbuzz/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_HARFBUZZ + bool "harfbuzz" + depends on BR2_INSTALL_LIBSTDCPP + help + HarfBuzz is an OpenType text shaping engine + + http://www.freedesktop.org/wiki/Software/HarfBuzz/ + + Harfbuzz can make optional use of cairo, freetype, + glib2 and icu packages if they are selected. + +comment "harfbuzz needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/harfbuzz/harfbuzz.mk b/package/harfbuzz/harfbuzz.mk new file mode 100644 index 0000000000..23bc848146 --- /dev/null +++ b/package/harfbuzz/harfbuzz.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# harfbuzz +# +################################################################################ + +HARFBUZZ_VERSION = 0.9.22 +HARFBUZZ_SITE = http://www.freedesktop.org/software/harfbuzz/release/ +HARFBUZZ_SOURCE = harfbuzz-$(HARFBUZZ_VERSION).tar.bz2 +HARFBUZZ_LICENSE = MIT, ISC (ucdn library) +HARFBUZZ_LICENSE_FILES = COPYING src/hb-ucdn/COPYING +HARFBUZZ_INSTALL_STAGING = YES + +HARFBUZZ_CONF_OPT = --without-coretext --without-uniscribe --without-graphite2 + +ifeq ($(BR2_PACKAGE_CAIRO),y) + HARFBUZZ_DEPENDENCIES += cairo + HARFBUZZ_CONF_OPT += --with-cairo=yes +else + HARFBUZZ_CONF_OPT += --with-cairo=no +endif + +ifeq ($(BR2_PACKAGE_FREETYPE),y) + HARFBUZZ_DEPENDENCIES += freetype + HARFBUZZ_CONF_OPT += --with-freetype=yes +else + HARFBUZZ_CONF_OPT += --with-freetype=no +endif + +ifeq ($(BR2_PACKAGE_LIBGLIB2),y) + HARFBUZZ_DEPENDENCIES += libglib2 + HARFBUZZ_CONF_OPT += --with-glib=yes +else + HARFBUZZ_CONF_OPT += --with-glib=no +endif + +ifeq ($(BR2_PACKAGE_ICU),y) + HARFBUZZ_DEPENDENCIES += icu + HARFBUZZ_CONF_OPT += --with-icu=yes +else + HARFBUZZ_CONF_OPT += --with-icu=no +endif + +$(eval $(autotools-package)) diff --git a/package/haserl/haserl-0.8.0/haserl-0.8.0-legacy.patch b/package/haserl/0.8.0/haserl-0.8.0-legacy.patch similarity index 100% rename from package/haserl/haserl-0.8.0/haserl-0.8.0-legacy.patch rename to package/haserl/0.8.0/haserl-0.8.0-legacy.patch diff --git a/package/haserl/0.9.30/haserl-add-haserl_lualib.inc.patch b/package/haserl/0.9.30/haserl-add-haserl_lualib.inc.patch new file mode 100644 index 0000000000..2870b8b103 --- /dev/null +++ b/package/haserl/0.9.30/haserl-add-haserl_lualib.inc.patch @@ -0,0 +1,136 @@ +[HACK] add preprocessed lualib file so host-lua isn't needed + +Haserl no longer ships with haserl_lualib.inc, causing lua2c (which needs +host-lua support) to be built to generate it. + +Re-add .inc file from 0.9.28 so we don't need host-lua. + +Signed-off-by: Peter Korsgaard +--- + src/Makefile.in | 3 - + src/haserl_lualib.inc | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 98 insertions(+), 2 deletions(-) + +Index: haserl-0.9.29/src/haserl_lualib.inc +=================================================================== +--- /dev/null ++++ haserl-0.9.29/src/haserl_lualib.inc +@@ -0,0 +1,97 @@ ++/* This file was automatically generated from haserl_lualib.lua. DO NOT EDIT */ ++ ++static const unsigned char haserl_lualib[] = { ++ 27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 19, 0, 0, 0, ++ 64,104, 97,115,101,114,108, 95,108,117, 97,108,105, 98, 46,108, ++ 117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 7, 24, ++ 0, 0, 0, 10, 0, 0, 0, 74, 0, 0, 0,138, 0, 0, 0,202, ++ 0, 0, 0, 10, 1, 0, 0, 74, 1, 0, 0,138, 1, 0, 0,135, ++ 129, 1, 0, 71, 65, 1, 0, 7, 1, 1, 0,199,192, 0, 0,135, ++ 128, 0, 0, 71, 64, 0, 0, 7, 0, 0, 0, 5, 0, 0, 0,100, ++ 0, 0, 0, 9, 64,128,131, 5, 0, 0, 0,100, 64, 0, 0, 9, ++ 64, 0,132, 5, 0, 0, 0,100,128, 0, 0, 9, 64,128,132, 30, ++ 0,128, 0, 10, 0, 0, 0, 4, 7, 0, 0, 0,104, 97,115,101, ++ 114,108, 0, 4, 5, 0, 0, 0, 70, 79, 82, 77, 0, 4, 4, 0, ++ 0, 0, 69, 78, 86, 0, 4, 7, 0, 0, 0, 67, 79, 79, 75, 73, ++ 69, 0, 4, 7, 0, 0, 0, 72, 65, 83, 69, 82, 76, 0, 4, 4, ++ 0, 0, 0, 71, 69, 84, 0, 4, 5, 0, 0, 0, 80, 79, 83, 84, ++ 0, 4, 9, 0, 0, 0,115,101,116,102,105,101,108,100, 0, 4, ++ 9, 0, 0, 0,103,101,116,102,105,101,108,100, 0, 4, 9, 0, ++ 0, 0,109,121,112,117,116,101,110,118, 0, 3, 0, 0, 0, 0, ++ 0, 0, 0, 22, 0, 0, 0, 36, 0, 0, 0, 0, 2, 0, 10, 29, ++ 0, 0, 0,133, 0, 0, 0,197, 64, 0, 0,198,128,192, 1, 0, ++ 1, 0, 0, 65,193, 0, 0,220, 0,129, 1, 22,128, 4,128, 5, ++ 2, 1, 0, 64, 2, 0, 3, 28,130, 0, 1, 26, 2, 0, 0, 22, ++ 192, 0,128, 5, 2, 1, 0, 64, 2, 0, 3, 28,130, 0, 1,128, ++ 1, 0, 4, 23, 64,193, 3, 22,128, 1,128, 6,130, 1, 1, 26, ++ 66, 0, 0, 22, 0, 0,128, 10, 2, 0, 0,137, 0, 2, 3,134, ++ 128, 1, 1, 22, 0, 0,128,137, 64, 0, 3,225,128, 0, 0, 22, ++ 128,250,127, 30, 0,128, 0, 6, 0, 0, 0, 4, 3, 0, 0, 0, ++ 95, 71, 0, 4, 7, 0, 0, 0,115,116,114,105,110,103, 0, 4, ++ 6, 0, 0, 0,103,102,105,110,100, 0, 4, 15, 0, 0, 0, 40, ++ 91, 37,119, 95, 37, 45, 93, 43, 41, 40, 46, 63, 41, 0, 4, 9, ++ 0, 0, 0,116,111,110,117,109, 98,101,114, 0, 4, 2, 0, 0, ++ 0, 46, 0, 0, 0, 0, 0, 29, 0, 0, 0, 24, 0, 0, 0, 25, ++ 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, ++ 0, 0, 0, 25, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, ++ 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 27, 0, 0, 0, 27, ++ 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 29, 0, 0, 0, 29, ++ 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, ++ 0, 0, 0, 30, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 33, ++ 0, 0, 0, 25, 0, 0, 0, 34, 0, 0, 0, 36, 0, 0, 0, 8, ++ 0, 0, 0, 2, 0, 0, 0,102, 0, 0, 0, 0, 0, 28, 0, 0, ++ 0, 2, 0, 0, 0,118, 0, 0, 0, 0, 0, 28, 0, 0, 0, 2, ++ 0, 0, 0,116, 0, 1, 0, 0, 0, 28, 0, 0, 0, 16, 0, 0, ++ 0, 40,102,111,114, 32,103,101,110,101,114, 97,116,111,114, 41, ++ 0, 6, 0, 0, 0, 28, 0, 0, 0, 12, 0, 0, 0, 40,102,111, ++ 114, 32,115,116, 97,116,101, 41, 0, 6, 0, 0, 0, 28, 0, 0, ++ 0, 14, 0, 0, 0, 40,102,111,114, 32, 99,111,110,116,114,111, ++ 108, 41, 0, 6, 0, 0, 0, 28, 0, 0, 0, 2, 0, 0, 0,119, ++ 0, 7, 0, 0, 0, 26, 0, 0, 0, 2, 0, 0, 0,100, 0, 7, ++ 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, ++ 0, 0, 0, 44, 0, 0, 0, 0, 1, 0, 8, 12, 0, 0, 0, 69, ++ 0, 0, 0,133, 64, 0, 0,134,128, 64, 1,192, 0, 0, 0, 1, ++ 193, 0, 0,156, 0,129, 1, 22, 0, 0,128, 70, 64,129, 0,161, ++ 64, 0, 0, 22, 0,255,127, 94, 0, 0, 1, 30, 0,128, 0, 4, ++ 0, 0, 0, 4, 3, 0, 0, 0, 95, 71, 0, 4, 7, 0, 0, 0, ++ 115,116,114,105,110,103, 0, 4, 6, 0, 0, 0,103,102,105,110, ++ 100, 0, 4, 7, 0, 0, 0, 91, 37,119, 95, 93, 43, 0, 0, 0, ++ 0, 0, 12, 0, 0, 0, 39, 0, 0, 0, 40, 0, 0, 0, 40, 0, ++ 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, ++ 0, 0, 41, 0, 0, 0, 40, 0, 0, 0, 41, 0, 0, 0, 43, 0, ++ 0, 0, 44, 0, 0, 0, 6, 0, 0, 0, 2, 0, 0, 0,102, 0, ++ 0, 0, 0, 0, 11, 0, 0, 0, 2, 0, 0, 0,118, 0, 1, 0, ++ 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 40,102,111,114, 32,103, ++ 101,110,101,114, 97,116,111,114, 41, 0, 6, 0, 0, 0, 10, 0, ++ 0, 0, 12, 0, 0, 0, 40,102,111,114, 32,115,116, 97,116,101, ++ 41, 0, 6, 0, 0, 0, 10, 0, 0, 0, 14, 0, 0, 0, 40,102, ++ 111,114, 32, 99,111,110,116,114,111,108, 41, 0, 6, 0, 0, 0, ++ 10, 0, 0, 0, 2, 0, 0, 0,119, 0, 7, 0, 0, 0, 8, 0, ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 0, 0, 0, 52, 0, ++ 0, 0, 0, 2, 0, 6, 20, 0, 0, 0,133, 0, 0, 0,134, 64, ++ 64, 1,192, 0, 0, 0, 1,129, 0, 0, 65,193, 0, 0,156,128, ++ 0, 2, 0, 0, 0, 1,133, 0, 0, 0,134, 64, 64, 1,192, 0, ++ 0, 0, 1, 1, 1, 0, 65,193, 0, 0,156,128, 0, 2, 0, 0, ++ 0, 1,133, 64, 1, 0,134,128, 65, 1,192, 0, 0, 0, 0, 1, ++ 128, 0,156, 64,128, 1, 30, 0,128, 0, 7, 0, 0, 0, 4, 7, ++ 0, 0, 0,115,116,114,105,110,103, 0, 4, 5, 0, 0, 0,103, ++ 115,117, 98, 0, 4, 7, 0, 0, 0, 91, 92, 93, 92, 91, 93, 0, ++ 4, 2, 0, 0, 0, 46, 0, 4, 6, 0, 0, 0, 91, 92, 46, 93, ++ 43, 0, 4, 7, 0, 0, 0,104, 97,115,101,114,108, 0, 4, 9, ++ 0, 0, 0,115,101,116,102,105,101,108,100, 0, 0, 0, 0, 0, ++ 20, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, ++ 48, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, ++ 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, ++ 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 51, 0, 0, 0, ++ 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, ++ 52, 0, 0, 0, 2, 0, 0, 0, 4, 0, 0, 0,107,101,121, 0, ++ 0, 0, 0, 0, 19, 0, 0, 0, 6, 0, 0, 0,118, 97,108,117, ++ 101, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 24, 0, ++ 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, ++ 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, ++ 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, ++ 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 22, 0, 0, 0, 36, 0, ++ 0, 0, 22, 0, 0, 0, 38, 0, 0, 0, 44, 0, 0, 0, 38, 0, ++ 0, 0, 46, 0, 0, 0, 52, 0, 0, 0, 46, 0, 0, 0, 52, 0, ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ++}; +Index: haserl-0.9.29/src/Makefile.in +=================================================================== +--- haserl-0.9.29.orig/src/Makefile.in ++++ haserl-0.9.29/src/Makefile.in +@@ -32,7 +32,6 @@ + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : +-@USE_LUA_TRUE@noinst_PROGRAMS = lua2c$(EXEEXT) + @INCLUDE_LUASHELL_TRUE@@USE_LUA_TRUE@am__append_1 = h_lua.c h_lua.h + @INCLUDE_LUACSHELL_TRUE@@USE_LUA_TRUE@am__append_2 = h_luac.c h_luac.h + bin_PROGRAMS = haserl$(EXEEXT) +@@ -515,7 +514,7 @@ + @USE_LUA_TRUE@ $(CC_FOR_BUILD) $(CFLAGS) $(LDFLAGS) $(lua2c_LDFLAGS) \ + @USE_LUA_TRUE@ -o $@ $^ $(LIBS) + +-@USE_LUA_TRUE@haserl_lualib.inc : haserl_lualib.lua lua2c ++@USE_LUA_TRUE@haserl_lualib.inc : + @USE_LUA_TRUE@ if ! ./lua2c haserl_lualib haserl_lualib.lua >$@; then \ + @USE_LUA_TRUE@ rm $@; \ + @USE_LUA_TRUE@ exit 1 ;\ diff --git a/package/haserl/Config.in b/package/haserl/Config.in index 23101c43fd..3db859a0e2 100644 --- a/package/haserl/Config.in +++ b/package/haserl/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_HASERL bool "haserl" + depends on BR2_USE_MMU # fork() help Haserl is a small cgi wrapper that enables shell scripts to be embedded into html documents. It is intended for environments @@ -8,12 +9,12 @@ config BR2_PACKAGE_HASERL http://haserl.sourceforge.net/ config BR2_PACKAGE_HASERL_WITH_LUA - bool "lua support" + bool "Lua support" depends on BR2_PACKAGE_HASERL depends on BR2_PACKAGE_HASERL_VERSION_0_9_X select BR2_PACKAGE_LUA help - Enable LUA support for haserl + Enable Lua support for haserl choice prompt "Haserl version" @@ -38,4 +39,4 @@ endchoice config BR2_PACKAGE_HASERL_VERSION string default "0.8.0" if BR2_PACKAGE_HASERL_VERSION_0_8_X - default "0.9.27" if BR2_PACKAGE_HASERL_VERSION_0_9_X + default "0.9.30" if BR2_PACKAGE_HASERL_VERSION_0_9_X diff --git a/package/haserl/haserl.mk b/package/haserl/haserl.mk index a8585e827b..56240c7f81 100644 --- a/package/haserl/haserl.mk +++ b/package/haserl/haserl.mk @@ -1,20 +1,24 @@ -############################################################# +################################################################################ # # haserl # -############################################################# +################################################################################ -HASERL_VERSION:=$(call qstrip,$(BR2_PACKAGE_HASERL_VERSION)) -HASERL_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/haserl/ -HASERL_AUTORECONF:=NO -HASERL_INSTALL_TARGET:=YES +HASERL_VERSION = $(call qstrip,$(BR2_PACKAGE_HASERL_VERSION)) +ifeq ($(BR2_PACKAGE_HASERL_VERSION_0_8_X),y) +HASERL_SITE = http://downloads.sourceforge.net/project/haserl/haserl/$(HASERL_VERSION) +else +HASERL_SITE = http://downloads.sourceforge.net/project/haserl/haserl-devel +endif +HASERL_LICENSE = GPLv2 +HASERL_LICENSE_FILES = COPYING -# force haserl 0.8.0 to use install-sh so stripping works -HASERL_CONF_ENV = ac_cv_path_install=./install-sh ifeq ($(BR2_PACKAGE_HASERL_WITH_LUA),y) HASERL_CONF_OPT += --with-lua=$(STAGING_DIR) \ --with-lua-headers=$(STAGING_DIR) - HASERL_DEPENDENCIES += lua + HASERL_DEPENDENCIES += lua host-lua + # lua2c is built for host, so needs to find host libs/headers + HASERL_MAKE_OPT += lua2c_LDFLAGS='$(HOST_CFLAGS) $(HOST_LDFLAGS)' endif define HASERL_REMOVE_EXAMPLES @@ -23,4 +27,4 @@ endef HASERL_POST_INSTALL_TARGET_HOOKS += HASERL_REMOVE_EXAMPLES -$(eval $(call AUTOTARGETS,package,haserl)) +$(eval $(autotools-package)) diff --git a/package/hdparm/Config.in b/package/hdparm/Config.in index 32bd247056..3254830a3c 100644 --- a/package/hdparm/Config.in +++ b/package/hdparm/Config.in @@ -6,5 +6,5 @@ config BR2_PACKAGE_HDPARM http://www.ibiblio.org/pub/Linux/system/hardware/ -comment "hdparm requires a toolchain with LARGEFILE support" +comment "hdparm needs a toolchain w/ largefile" depends on !BR2_LARGEFILE diff --git a/package/hdparm/hdparm.mk b/package/hdparm/hdparm.mk index 4e3cfe5983..fc053ae57b 100644 --- a/package/hdparm/hdparm.mk +++ b/package/hdparm/hdparm.mk @@ -1,11 +1,13 @@ -############################################################# +################################################################################ # # hdparm # -############################################################# -HDPARM_VERSION = 9.36 -HDPARM_SOURCE = hdparm-$(HDPARM_VERSION).tar.gz -HDPARM_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/hdparm +################################################################################ + +HDPARM_VERSION = 9.43 +HDPARM_SITE = http://downloads.sourceforge.net/project/hdparm/hdparm +HDPARM_LICENSE = BSD-Style +HDPARM_LICENSE_FILES = LICENSE.TXT define HDPARM_BUILD_CMDS $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ @@ -33,4 +35,4 @@ define HDPARM_CLEAN_CMDS -$(MAKE) -C $(@D) clean endef -$(eval $(call GENTARGETS,package,hdparm)) +$(eval $(generic-package)) diff --git a/package/heirloom-mailx/Config.in b/package/heirloom-mailx/Config.in new file mode 100644 index 0000000000..ca83dc365d --- /dev/null +++ b/package/heirloom-mailx/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_HEIRLOOM_MAILX + bool "heirloom-mailx" + # uses fork() + depends on BR2_USE_MMU + help + Heirloom mailx (previously known as nail) is a mail user + agent for Unix systems. + + It can be used as a command-line mail reader, but also more + importantly on embedded systems, as a mail composition + program and SMTP client, in order to send e-mail from shell + scripts. It supports SMTP authentication (login, plain, + cram-md5), SMTPS, MIME encoding of attachements, and more. + + http://heirloom.sourceforge.net/mailx.html diff --git a/package/heirloom-mailx/heirloom-mailx.mk b/package/heirloom-mailx/heirloom-mailx.mk new file mode 100644 index 0000000000..a4d94b6f71 --- /dev/null +++ b/package/heirloom-mailx/heirloom-mailx.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# heirloom-mailx +# +################################################################################ + +HEIRLOOM_MAILX_VERSION = 12.5 +HEIRLOOM_MAILX_SOURCE = heirloom-mailx_$(HEIRLOOM_MAILX_VERSION).orig.tar.gz +HEIRLOOM_MAILX_SITE = http://snapshot.debian.org/archive/debian/20110427T035506Z/pool/main/h/heirloom-mailx/ + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +HEIRLOOM_MAILX_DEPENDENCIES += openssl +endif + +define HEIRLOOM_MAILX_CONFIGURE_CMDS + (cd $(@D); $(TARGET_CONFIGURE_OPTS) $(SHELL) ./makeconfig) +endef + +define HEIRLOOM_MAILX_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define HEIRLOOM_MAILX_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + PREFIX=/usr \ + UCBINSTALL=$(INSTALL) \ + STRIP=/bin/true \ + DESTDIR=$(TARGET_DIR) \ + install +endef + +$(eval $(generic-package)) diff --git a/package/hiawatha/Config.in b/package/hiawatha/Config.in new file mode 100644 index 0000000000..53336972ad --- /dev/null +++ b/package/hiawatha/Config.in @@ -0,0 +1,33 @@ +comment "hiawatha needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_HIAWATHA + bool "hiawatha" + # needs fork() + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Hiawatha is a webserver for Unix and has been built with + security in mind. This resulted in a highly secure + webserver, in both code and features. + + This webserver runs on Linux, BSD, MacOS X and + Windows. Although it can run any kind of CGI / FastCGI + application, it has been optimized for usage with PHP. Most + well known PHP frameworks and CMS applications have been + tested with Hiawatha and ran without a problem. Hiawatha + supports many web and HTTP features such as CGI/FastCGI, + HTTP authentication, virtual host support, request + pipelining, keep alive connections, URL rewriting and many + more. + + http://www.hiawatha-webserver.org/ + +if BR2_PACKAGE_HIAWATHA + +config BR2_PACKAGE_HIAWATHA_SSL + bool "hiawatha SSL support" + select BR2_PACKAGE_POLARSSL + +endif diff --git a/package/hiawatha/hiawatha.mk b/package/hiawatha/hiawatha.mk new file mode 100644 index 0000000000..4be81490f9 --- /dev/null +++ b/package/hiawatha/hiawatha.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# hiawatha +# +################################################################################ + +HIAWATHA_VERSION = 9.2 +HIAWATHA_SITE = http://www.hiawatha-webserver.org/files +HIAWATHA_LICENSE = GPLv2 +HIAWATHA_LICENSE_FILES = LICENSE + +ifeq ($(BR2_PACKAGE_HIAWATHA_SSL),y) +HIAWATHA_CONF_OPT += -DUSE_SYSTEM_POLARSSL=ON +HIAWATHA_DEPENDENCIES += polarssl +else +HIAWATHA_CONF_OPT += -DENABLE_SSL=OFF +endif + +HIAWATHA_CONF_OPT += \ + $(if $(BR2_INET_IPV6),,-DENABLE_IPV6=OFF) \ + -DENABLE_TOOLKIT=OFF \ + -DENABLE_XSLT=OFF \ + -DCONFIG_DIR=/etc/hiawatha \ + -DLOG_DIR=/var/log \ + -DPID_DIR=/var/run \ + -DWEBROOT_DIR=/var/www/hiawatha \ + -DWORK_DIR=/var/lib/hiawatha + +$(eval $(cmake-package)) diff --git a/package/hostapd/Config.in b/package/hostapd/Config.in index 376a087b4f..eb530b336f 100644 --- a/package/hostapd/Config.in +++ b/package/hostapd/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_HOSTAPD bool "hostapd" + depends on BR2_TOOLCHAIN_HAS_THREADS # libnl select BR2_PACKAGE_LIBNL help User space daemon for wireless access points. @@ -10,14 +11,19 @@ config BR2_PACKAGE_HOSTAPD http://hostap.epitest.fi/ +if BR2_PACKAGE_HOSTAPD + config BR2_PACKAGE_HOSTAPD_EAP bool "Enable EAP" - depends on BR2_PACKAGE_HOSTAPD help Enable support for EAP and RADIUS. config BR2_PACKAGE_HOSTAPD_WPS bool "Enable WPS" - depends on BR2_PACKAGE_HOSTAPD help Enable support for Wi-Fi Protected Setup. + +endif + +comment "hostapd needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/hostapd/hostapd.mk b/package/hostapd/hostapd.mk index f097e75e68..0fbd8bc998 100644 --- a/package/hostapd/hostapd.mk +++ b/package/hostapd/hostapd.mk @@ -1,87 +1,90 @@ -############################################################## +################################################################################ # # hostapd # -############################################################# +################################################################################ -HOSTAPD_VERSION = 0.7.3 +HOSTAPD_VERSION = 2.0 HOSTAPD_SITE = http://hostap.epitest.fi/releases HOSTAPD_SUBDIR = hostapd HOSTAPD_CONFIG = $(HOSTAPD_DIR)/$(HOSTAPD_SUBDIR)/.config HOSTAPD_DEPENDENCIES = libnl +HOSTAPD_CFLAGS = $(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/libnl3/ +HOSTAPD_LICENSE = GPLv2/BSD-3c +HOSTAPD_LICENSE_FILES = README + +# libnl-3 needs -lm (for rint) and -lpthread if linking statically +# And library order matters hence stick -lnl-3 first since it's appended +# in the hostapd Makefiles as in LIBS+=-lnl-3 ... thus failing +ifeq ($(BR2_PREFER_STATIC_LIB),y) +HOSTAPD_LIBS += -lnl-3 -lm -lpthread +endif define HOSTAPD_LIBNL_CONFIG - echo "CONFIG_LIBNL20=y" >>$(HOSTAPD_CONFIG) + echo 'CONFIG_LIBNL32=y' >>$(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_VLAN_NETLINK.*\)/\2/' $(HOSTAPD_CONFIG) endef -define HOSTAPD_CRYPTO_CONFIG - echo "CONFIG_CRYPTO=internal" >>$(HOSTAPD_CONFIG) - echo "CONFIG_INTERNAL_LIBTOMMATH=y" >>$(HOSTAPD_CONFIG) - echo "CONFIG_INTERNAL_LIBTOMMATH_FAST=y" >>$(HOSTAPD_CONFIG) +define HOSTAPD_LIBTOMMATH_CONFIG + $(SED) 's/\(#\)\(CONFIG_INTERNAL_LIBTOMMATH.*\)/\2/' $(HOSTAPD_CONFIG) endef -# Try to use openssl for TLS if it's already available -# gnutls is also supported for TLS +# Try to use openssl if it's already available ifeq ($(BR2_PACKAGE_OPENSSL),y) HOSTAPD_DEPENDENCIES += openssl define HOSTAPD_TLS_CONFIG - echo "CONFIG_TLS=openssl" >>$(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_TLS=openssl\)/\2/' $(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_EAP_PWD.*\)/\2/' $(HOSTAPD_CONFIG) endef else define HOSTAPD_TLS_CONFIG - echo "CONFIG_TLS=internal" >>$(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_TLS=\).*/\2internal/' $(HOSTAPD_CONFIG) endef endif ifeq ($(BR2_PACKAGE_HOSTAPD_EAP),y) define HOSTAPD_EAP_CONFIG - $(SED) "s/CONFIG_EAP_MSCHAPV2=y//" $(HOSTAPD_CONFIG) - $(SED) "s/CONFIG_EAP_PEAP=y//" $(HOSTAPD_CONFIG) - $(SED) "s/CONFIG_EAP_TLS=y//" $(HOSTAPD_CONFIG) - $(SED) "s/CONFIG_EAP_TTLS=y//" $(HOSTAPD_CONFIG) - echo "CONFIG_EAP_AKA=y" >>$(HOSTAPD_CONFIG) - echo "CONFIG_EAP_AKA_PRIME=y" >>$(HOSTAPD_CONFIG) - echo "CONFIG_EAP_GPSK=y" >>$(HOSTAPD_CONFIG) - echo "CONFIG_EAP_GPSK_SHA256=y" >>$(HOSTAPD_CONFIG) - echo "CONFIG_EAP_PAX=y" >>$(HOSTAPD_CONFIG) - echo "CONFIG_EAP_PSK=y" >>$(HOSTAPD_CONFIG) - echo "CONFIG_EAP_SAKE=y" >>$(HOSTAPD_CONFIG) - echo "CONFIG_EAP_SIM=y" >>$(HOSTAPD_CONFIG) - echo "CONFIG_RADIUS_SERVER=y" >>$(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_EAP_AKA.*\)/\2/' $(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_EAP_FAST.*\)/\2/' $(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_EAP_GPSK.*\)/\2/' $(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_EAP_IKEV2.*\)/\2/' $(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_EAP_PAX.*\)/\2/' $(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_EAP_PSK.*\)/\2/' $(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_EAP_SAKE.*\)/\2/' $(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_EAP_SIM.*\)/\2/' $(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_EAP_TNC.*\)/\2/' $(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_RADIUS_SERVER.*\)/\2/' $(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_TLSV1.*\)/\2/' $(HOSTAPD_CONFIG) endef -ifeq ($(BR2_INET_IPV6),y) +ifneq ($(BR2_INET_IPV6),y) define HOSTAPD_RADIUS_IPV6_CONFIG - $(SED) "s/^#CONFIG_IPV6/CONFIG_IPV6/" $(HOSTAPD_CONFIG) + $(SED) 's/\(CONFIG_IPV6.*\)/#\1/' $(HOSTAPD_CONFIG) endef endif else define HOSTAPD_EAP_CONFIG - $(SED) "s/^CONFIG_EAP/#CONFIG_EAP/g" $(HOSTAPD_CONFIG) - $(SED) "s/^#CONFIG_NO_ACCOUNTING/CONFIG_NO_ACCOUNTING/" $(HOSTAPD_CONFIG) - $(SED) "s/^#CONFIG_NO_RADIUS/CONFIG_NO_RADIUS/" $(HOSTAPD_CONFIG) + $(SED) 's/^\(CONFIG_EAP.*\)/#\1/' $(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_NO_ACCOUNTING.*\)/\2/' $(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_NO_RADIUS.*\)/\2/' $(HOSTAPD_CONFIG) endef endif ifeq ($(BR2_PACKAGE_HOSTAPD_WPS),y) define HOSTAPD_WPS_CONFIG - $(SED) "s/^#CONFIG_WPS/CONFIG_WPS/g" $(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_WPS.*\)/\2/' $(HOSTAPD_CONFIG) endef endif define HOSTAPD_CONFIGURE_CMDS - cp $(@D)/$(HOSTAPD_SUBDIR)/defconfig $(HOSTAPD_CONFIG) - $(SED) "s/\/local//" $(@D)/$(HOSTAPD_SUBDIR)/Makefile - echo "CFLAGS += $(TARGET_CFLAGS)" >>$(HOSTAPD_CONFIG) - echo "LDFLAGS += $(TARGET_LDFLAGS)" >>$(HOSTAPD_CONFIG) - echo "CC = $(TARGET_CC)" >>$(HOSTAPD_CONFIG) -# Drivers - $(SED) "s/^#CONFIG_DRIVER_WIRED/CONFIG_DRIVER_WIRED/" $(HOSTAPD_CONFIG) - $(SED) "s/^#CONFIG_DRIVER_NL80211/CONFIG_DRIVER_NL80211/" $(HOSTAPD_CONFIG) + cp $(@D)/hostapd/defconfig $(HOSTAPD_CONFIG) # Misc - $(SED) "s/^CONFIG_IPV6/#CONFIG_IPV6/" $(HOSTAPD_CONFIG) - $(SED) "s/^#CONFIG_IEEE80211N/CONFIG_IEEE80211N/" $(HOSTAPD_CONFIG) - $(SED) "s/^#CONFIG_IEEE80211R/CONFIG_IEEE80211R/" $(HOSTAPD_CONFIG) - $(HOSTAPD_CRYPTO_CONFIG) + $(SED) 's/\(#\)\(CONFIG_HS20.*\)/\2/' $(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_IEEE80211N.*\)/\2/' $(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_IEEE80211R.*\)/\2/' $(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_IEEE80211W.*\)/\2/' $(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_INTERWORKING.*\)/\2/' $(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_FULL_DYNAMIC_VLAN.*\)/\2/' $(HOSTAPD_CONFIG) + $(HOSTAPD_LIBTOMMATH_CONFIG) $(HOSTAPD_TLS_CONFIG) $(HOSTAPD_RADIUS_IPV6_CONFIG) $(HOSTAPD_EAP_CONFIG) @@ -89,6 +92,12 @@ define HOSTAPD_CONFIGURE_CMDS $(HOSTAPD_LIBNL_CONFIG) endef +define HOSTAPD_BUILD_CMDS + $(TARGET_MAKE_ENV) CFLAGS="$(HOSTAPD_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" LIBS="$(HOSTAPD_LIBS)" \ + $(MAKE) CC="$(TARGET_CC)" -C $(@D)/$(HOSTAPD_SUBDIR) +endef + define HOSTAPD_INSTALL_TARGET_CMDS $(INSTALL) -m 0755 -D $(@D)/$(HOSTAPD_SUBDIR)/hostapd \ $(TARGET_DIR)/usr/sbin/hostapd @@ -96,9 +105,4 @@ define HOSTAPD_INSTALL_TARGET_CMDS $(TARGET_DIR)/usr/bin/hostapd_cli endef -define HOSTAPD_UNINSTALL_TARGET_CMDS - rm -f $(TARGET_DIR)/usr/sbin/hostapd - rm -f $(TARGET_DIR)/usr/bin/hostapd -endef - -$(eval $(call AUTOTARGETS,package,hostapd)) +$(eval $(generic-package)) diff --git a/package/hplip/Config.in b/package/hplip/Config.in new file mode 100644 index 0000000000..756567150d --- /dev/null +++ b/package/hplip/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_HPLIP + bool "hplip" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_PACKAGE_CUPS + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_JPEG + help + HP Linux Imaging and Printing (HPLIP) + HPLIP is an HP-developed solution for printing, scanning, and faxing + with HP inkjet and laser based printers in Linux. The HPLIP project + provides printing support for 2,211 printer models, including + Deskjet, Officejet, Photosmart, PSC (Print Scan Copy), Business + Inkjet, LaserJet, Edgeline MFP, and LaserJet MFP. + + http://hplipopensource.com/ + +comment "hplip needs a toolchain w/ C++, threads" + depends on BR2_PACKAGE_CUPS + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/hplip/hplip-fix-make.patch b/package/hplip/hplip-fix-make.patch new file mode 100644 index 0000000000..da05d03fd3 --- /dev/null +++ b/package/hplip/hplip-fix-make.patch @@ -0,0 +1,35 @@ +From 6019d012246578ae1a191d3510284e7b894fb528 Mon Sep 17 00:00:00 2001 +From: Olivier Schonken +Date: Sat, 2 Mar 2013 18:01:03 +0200 +Subject: [PATCH] Changed Makefile.am to allow cross-compilation of HPLIP + +Signed-off-by: Olivier Schonken +--- + Makefile.am | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 16ea902..b22f46a 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -72,7 +72,7 @@ libhpmud_la_SOURCES = io/hpmud/hpmud.c io/hpmud/mlc.c io/hpmud/model.c io/hpmud/ + io/hpmud/hpmud.h io/hpmud/hpmudi.h io/hpmud/list.h io/hpmud/mlc.h io/hpmud/pml.h io/hpmud/dot4.c \ + io/hpmud/dot4.h io/hpmud/jd.c io/hpmud/jd.h io/hpmud/pp.c io/hpmud/pp.h io/hpmud/musb.h io/hpmud/musb_libusb01.c + else +-libhpmud_la_CFLAGS = -I/usr/include/libusb-1.0 -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\" ++libhpmud_la_CFLAGS = -I$(includedir)/libusb-1.0 -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\" + libhpmud_la_SOURCES = io/hpmud/hpmud.c io/hpmud/mlc.c io/hpmud/model.c io/hpmud/pml.c \ + io/hpmud/hpmud.h io/hpmud/hpmudi.h io/hpmud/list.h io/hpmud/mlc.h io/hpmud/pml.h io/hpmud/dot4.c \ + io/hpmud/dot4.h io/hpmud/jd.c io/hpmud/jd.h io/hpmud/pp.c io/hpmud/pp.h io/hpmud/musb.h io/hpmud/musb.c +@@ -292,7 +292,7 @@ hpmudext_la_LIBADD = libhpmud.la + if LIBUSB01_BUILD + hpmudext_la_CFLAGS = -I$(PYTHONINCLUDEDIR) + else +-hpmudext_la_CFLAGS =-I/usr/include/libusb-1.0 -I$(PYTHONINCLUDEDIR) ++hpmudext_la_CFLAGS =-I$(includedir)/libusb-1.0 -I$(PYTHONINCLUDEDIR) + endif + + # ui (qt3) +-- +1.7.10.4 + diff --git a/package/hplip/hplip.mk b/package/hplip/hplip.mk new file mode 100644 index 0000000000..704bc4b187 --- /dev/null +++ b/package/hplip/hplip.mk @@ -0,0 +1,53 @@ +################################################################################ +# +# hplip +# +################################################################################ + +HPLIP_VERSION = 3.13.10 +HPLIP_SITE = http://downloads.sourceforge.net/hplip/hplip +HPLIP_AUTORECONF = YES +HPLIP_DEPENDENCIES = cups libusb jpeg +HPLIP_LICENSE = GPLv2 BSD-3c MIT +HPLIP_LICENSE_FILES = COPYING + +HPLIP_CONF_OPT = \ + --disable-qt4 \ + --disable-scan-build \ + --disable-gui-build \ + --disable-doc-build \ + --disable-network-build \ + --enable-hpcups-install \ + --disable-hpijs-install \ + --enable-cups-ppd-install \ + --enable-cups-drv-install \ + --disable-foomatic-ppd-install \ + --disable-foomatic-drv-install \ + --disable-foomatic-rip-hplip-install \ + --enable-new-hpcups \ + --enable-lite-build \ + --with-sysroot=$(STAGING_DIR) \ + --includedir=$(STAGING_DIR)/usr/include + +ifeq ($(BR2_PACKAGE_DBUS),y) + HPLIP_CONF_OPT += --enable-dbus-build + HPLIP_DEPENDENCIES += dbus +else + HPLIP_CONF_OPT += --disable-dbus-build +endif + +define HPLIP_POST_INSTALL_TARGET_FIXUP + mkdir -p $(TARGET_DIR)/usr/share/hplip/data/models + cp $(@D)/data/models/* $(TARGET_DIR)/usr/share/hplip/data/models +endef +HPLIP_POST_INSTALL_TARGET_HOOKS += HPLIP_POST_INSTALL_TARGET_FIXUP + +define HPLIP_PRE_CONFIGURE_FIXUP + touch $(@D)/AUTHORS + touch $(@D)/ChangeLog + touch $(@D)/NEWS + touch $(@D)/README +endef +HPLIP_PRE_CONFIGURE_HOOKS += HPLIP_PRE_CONFIGURE_FIXUP + +$(eval $(autotools-package)) diff --git a/package/htop/Config.in b/package/htop/Config.in new file mode 100644 index 0000000000..51304afb53 --- /dev/null +++ b/package/htop/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_HTOP + bool "htop" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_NCURSES + help + htop is an interactive text-mode process viewer for Linux. + It aims to be a better top. + + http://htop.sf.net diff --git a/package/htop/htop.mk b/package/htop/htop.mk new file mode 100644 index 0000000000..fe9b302c92 --- /dev/null +++ b/package/htop/htop.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# htop +# +################################################################################ + +HTOP_VERSION = 1.0.2 +HTOP_SITE = http://downloads.sourceforge.net/project/htop/htop/$(HTOP_VERSION) +HTOP_DEPENDENCIES = ncurses +HTOP_AUTORECONF = YES +HTOP_CONF_OPT = --disable-unicode +HTOP_CONF_ENV = ac_cv_file__proc_stat=yes ac_cv_file__proc_meminfo=yes +HTOP_LICENSE = GPLv2 +HTOP_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/htop/htop.patch b/package/htop/htop.patch new file mode 100644 index 0000000000..bf68e53ed1 --- /dev/null +++ b/package/htop/htop.patch @@ -0,0 +1,25 @@ +# This patch removes the check for native_affinity for cross compiling. +# This patch has been pushed to htop on 23 November 2011, however, is +# not in the 1.0 release and may not be exactly what Hisham puts into +# the official build. +# +# Signed-off-by: Andy Kennedy +diff -Naur a/configure.ac b/configure.ac +--- a/configure.ac 2011-11-20 20:46:48.000000000 -0600 ++++ b/configure.ac 2011-11-23 10:41:44.000000000 -0600 +@@ -111,7 +111,6 @@ + if test "$cross_compiling" = "no"; then + AC_CHECK_FILE($PROCDIR/stat,,AC_MSG_ERROR(Cannot find /proc/stat. Make sure you have a Linux-compatible /proc filesystem mounted. See the file README for help.)) + AC_CHECK_FILE($PROCDIR/meminfo,,AC_MSG_ERROR(Cannot find /proc/meminfo. Make sure you have a Linux-compatible /proc filesystem mounted. See the file README for help.)) +-fi + + AC_ARG_ENABLE(native_affinity, [AC_HELP_STRING([--enable-native-affinity], [enable native sched_setaffinity and sched_getaffinity for affinity support, disables hwloc])], ,enable_native_affinity="yes") + if test "x$enable_native_affinity" = xyes; then +@@ -130,6 +129,7 @@ + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) + fi ++fi + + AC_ARG_ENABLE(hwloc, [AC_HELP_STRING([--enable-hwloc], [enable hwloc support for CPU affinity])],, enable_hwloc="no") + if test "x$enable_hwloc" = xyes diff --git a/package/httping/Config.in b/package/httping/Config.in new file mode 100644 index 0000000000..92c7a2039a --- /dev/null +++ b/package/httping/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_HTTPING + bool "httping" + help + Httping is like 'ping' but for http-requests. + Give it an url, and it'll show you how long it takes to connect, + send a request and retrieve the reply (only the headers). + Be aware that the transmission across the network also takes time! + So it measures the latency of the webserver + network. + + http://www.vanheusden.com/httping/ + +if BR2_PACKAGE_HTTPING + +config BR2_PACKAGE_HTTPING_TFO + bool "TCP Fast Open (TFO) support" + +endif diff --git a/package/httping/httping.mk b/package/httping/httping.mk new file mode 100644 index 0000000000..12e2582073 --- /dev/null +++ b/package/httping/httping.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# httping +# +################################################################################ + +HTTPING_VERSION = 2.2.1 +HTTPING_SOURCE = httping-$(HTTPING_VERSION).tgz +HTTPING_SITE = http://www.vanheusden.com/httping +HTTPING_LICENSE = GPLv2 +HTTPING_LICENSE_FILES = license.txt +HTTPING_DEPENDENCIES = \ + $(if $(BR2_PACKAGE_OPENSSL),openssl) \ + $(if $(BR2_PACKAGE_NCURSES),ncurses) \ + $(if $(BR2_PACKAGE_FFTW),fftw) +HTTPING_MAKE_OPT = $(TARGET_CONFIGURE_OPTS) \ + FW=$(if $(BR2_PACKAGE_FFTW),yes,no) \ + NC=$(if $(BR2_PACKAGE_NCURSES),yes,no) \ + SSL=$(if $(BR2_PACKAGE_OPENSSL),yes,no) \ + TFO=$(if $(BR2_PACKAGE_HTTPING_TFO),yes,no) + +define HTTPING_BUILD_CMDS + $(HTTPING_MAKE_OPT) $(MAKE) OFLAGS= DEBUG=no -C $(@D) +endef + +define HTTPING_INSTALL_TARGET_CMDS + $(HTTPING_MAKE_OPT) $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install +endef + +define HTTPING_CLEAN_CMDS + $(MAKE) -C $(@D) clean +endef + +$(eval $(generic-package)) diff --git a/package/hwdata/hwdata.mk b/package/hwdata/hwdata.mk index 7a0cef8080..bcac8c9042 100644 --- a/package/hwdata/hwdata.mk +++ b/package/hwdata/hwdata.mk @@ -1,8 +1,9 @@ -############################################################# +################################################################################ # # hwdata # -############################################################# +################################################################################ + HWDATA_VERSION = 0.230 HWDATA_SOURCE = hwdata_$(HWDATA_VERSION).orig.tar.gz HWDATA_PATCH = hwdata_$(HWDATA_VERSION)-1.diff.gz @@ -18,4 +19,4 @@ define HWDATA_UNINSTALL_TARGET_CMDS rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share endef -$(eval $(call GENTARGETS,package,hwdata)) +$(eval $(generic-package)) diff --git a/package/i2c-tools/Config.in b/package/i2c-tools/Config.in index 47d06420f3..43f5e05ae8 100644 --- a/package/i2c-tools/Config.in +++ b/package/i2c-tools/Config.in @@ -1,10 +1,10 @@ config BR2_PACKAGE_I2C_TOOLS - bool "i2c-tools" - help - Heterogeneous set of I2C tools for Linux + bool "i2c-tools" + help + Heterogeneous set of I2C tools for Linux - This package contains a heterogeneous set of I2C tools for Linux: - a bus probing tool, a chip dumper, register-level access helpers, - EEPROM decoding scripts, and more. + This package contains a heterogeneous set of I2C tools for Linux: + a bus probing tool, a chip dumper, register-level access helpers, + EEPROM decoding scripts, and more. - http://www.lm-sensors.org + http://www.lm-sensors.org diff --git a/package/i2c-tools/i2c-tools.mk b/package/i2c-tools/i2c-tools.mk index d96bad3f81..c6a967d987 100644 --- a/package/i2c-tools/i2c-tools.mk +++ b/package/i2c-tools/i2c-tools.mk @@ -1,12 +1,14 @@ -############################################################# +################################################################################ # # i2c-tools # -############################################################# +################################################################################ -I2C_TOOLS_VERSION = 3.0.3 +I2C_TOOLS_VERSION = 3.1.0 I2C_TOOLS_SOURCE = i2c-tools-$(I2C_TOOLS_VERSION).tar.bz2 -I2C_TOOLS_SITE = http://dl.lm-sensors.org/i2c-tools/releases/ +I2C_TOOLS_SITE = http://dl.lm-sensors.org/i2c-tools/releases +I2C_TOOLS_LICENSE = GPLv2+, GPLv2 (py-smbus) +I2C_TOOLS_LICENSE_FILES = COPYING define I2C_TOOLS_BUILD_CMDS $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) @@ -19,4 +21,4 @@ define I2C_TOOLS_INSTALL_TARGET_CMDS done endef -$(eval $(call GENTARGETS,package,i2c-tools)) +$(eval $(generic-package)) diff --git a/package/icu/Config.in b/package/icu/Config.in index 21f5c2fa86..b736b438d8 100644 --- a/package/icu/Config.in +++ b/package/icu/Config.in @@ -2,10 +2,14 @@ config BR2_PACKAGE_ICU bool "icu" depends on BR2_INSTALL_LIBSTDCPP depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_arc # atomic builtins help International Components for Unicode. http://site.icu-project.org/ -comment "icu requires a toolchain with C++ support and WCHAR enabled" - depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR +comment "icu needs a toolchain w/ C++, wchar, threads" + depends on !BR2_arc + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/icu/icu-arm.patch b/package/icu/icu-arm.patch deleted file mode 100644 index 53070d9d0c..0000000000 --- a/package/icu/icu-arm.patch +++ /dev/null @@ -1,25 +0,0 @@ -https://bugs.icu-project.org/trac/ticket/7664 -https://bugs.icu-project.org/trac/changeset/28107 - ---- icu.orig/source/tools/toolutil/pkg_genc.c -+++ icu/source/tools/toolutil/pkg_genc.c -@@ -1,5 +1,5 @@ - /****************************************************************************** -- * Copyright (C) 2009, International Business Machines -+ * Copyright (C) 2009-2010, International Business Machines - * Corporation and others. All Rights Reserved. - ******************************************************************************* - */ -@@ -118,10 +118,10 @@ - } assemblyHeader[] = { - {"gcc", - ".globl %s\n" -- "\t.section .note.GNU-stack,\"\",@progbits\n" -+ "\t.section .note.GNU-stack,\"\",%%progbits\n" - "\t.section .rodata\n" - "\t.align 8\n" /* Either align 8 bytes or 2^8 (256) bytes. 8 bytes is needed. */ -- "\t.type %s,@object\n" -+ "\t.type %s,%%object\n" - "%s:\n\n", - - ".long ","",HEX_0X diff --git a/package/icu/icu-dont-build-static-dynamic-twice.patch b/package/icu/icu-dont-build-static-dynamic-twice.patch new file mode 100644 index 0000000000..ccbe534aa2 --- /dev/null +++ b/package/icu/icu-dont-build-static-dynamic-twice.patch @@ -0,0 +1,37 @@ +Don't build object files twice + +When passed --enable-static and --enable-shared, icu will generate +both a shared and a static version of its libraries. + +However, in order to do so, it builds each and every object file +twice: once with -fPIC (for the shared library), and once without +-fPIC (for the static library). While admittedly building -fPIC for a +static library generates a slightly suboptimal code, this is what all +the autotools-based project are doing. They build each object file +once, and they use it for both the static and shared libraries. + +icu builds the object files for the shared library as .o files, and +the object files for static library as .ao files. By simply changing +the suffix of object files used for static libraries to ".o", we tell +icu to use the ones built for the shared library (i.e, with -fPIC), +and avoid the double build of icu. + +On a fast build server, this brings the target icu build from +3m41.302s down to 1m43.926s (approximate numbers: some other builds +are running on the system at the same time). + +Signed-off-by: Thomas Petazzoni + +Index: b/source/config/mh-linux +=================================================================== +--- a/source/config/mh-linux ++++ b/source/config/mh-linux +@@ -35,7 +35,7 @@ + ## Shared object suffix + SO = so + ## Non-shared intermediate object suffix +-STATIC_O = ao ++STATIC_O = o + + ## Compilation rules + %.$(STATIC_O): $(srcdir)/%.c diff --git a/package/icu/icu-double-escape.patch b/package/icu/icu-double-escape.patch deleted file mode 100644 index 06c70cca98..0000000000 --- a/package/icu/icu-double-escape.patch +++ /dev/null @@ -1,17 +0,0 @@ -We need to double-escape CC & CXX since we've got --sysroot and thus a space -when cross-compiling. - -Signed-off-by: Gustavo Zacarias - -diff -Nura icu.orig/source/tools/icuinfo/Makefile.in icu/source/tools/icuinfo/Makefile.in ---- icu.orig/source/tools/icuinfo/Makefile.in 2010-09-29 15:37:26.000000000 -0300 -+++ icu/source/tools/icuinfo/Makefile.in 2010-12-21 13:36:45.393439756 -0300 -@@ -36,7 +36,7 @@ - - ICUINFO_OPTS=-i ../../data/out/build/$(ICUDATA_PLATFORM_NAME) - --CPPFLAGS+= -DU_PLATFORM=\"@platform@\" -DU_BUILD=\"@build@\" -DU_HOST=\"@host@\" -DU_CC=\"@CC@\" -DU_CXX=\"@CXX@\" -+CPPFLAGS+= -DU_PLATFORM=\"@platform@\" -DU_BUILD=\"@build@\" -DU_HOST=\"@host@\" -DU_CC=\""@CC@\"" -DU_CXX=\""@CXX@\"" - # -DENABLE_RELEASE=@ENABLE_RELEASE@ -DENABLE_DEBUG=@ENABLE_DEBUG@ " - - diff --git a/package/icu/icu-overflow.patch b/package/icu/icu-overflow.patch deleted file mode 100644 index 45beaa7ea5..0000000000 --- a/package/icu/icu-overflow.patch +++ /dev/null @@ -1,93 +0,0 @@ - -A combination of issue & patches from... - -https://bugs.icu-project.org/trac/ticket/7680 -https://bugs.icu-project.org/trac/changeset/28002 -https://bugs.icu-project.org/trac/changeset/28124 - -Enlarged buffers more since include files for pkgdata can grow -significantly when cross-compiling. -This ONLY affects building. - -Signed-off-by: Gustavo Zacarias - -diff -Nura icu.orig/source/tools/pkgdata/pkgdata.cpp icu/source/tools/pkgdata/pkgdata.cpp ---- icu.orig/source/tools/pkgdata/pkgdata.cpp 2010-09-29 15:37:28.000000000 -0300 -+++ icu/source/tools/pkgdata/pkgdata.cpp 2010-12-21 15:53:30.252554924 -0300 -@@ -97,8 +97,9 @@ - #define PKGDATA_FILE_SEP_STRING U_FILE_SEP_STRING - #endif - --#define LARGE_BUFFER_MAX_SIZE 2048 --#define SMALL_BUFFER_MAX_SIZE 512 -+#define LARGE_BUFFER_MAX_SIZE 8192 -+#define MEDIUM_BUFFER_MAX_SIZE 4096 -+#define SMALL_BUFFER_MAX_SIZE 2048 - - static void loadLists(UPKGOptions *o, UErrorCode *status); - -@@ -472,29 +473,48 @@ - } - - static int runCommand(const char* command, UBool specialHandling) { -- char cmd[SMALL_BUFFER_MAX_SIZE]; -+ char *cmd = NULL; -+ char cmdBuffer[SMALL_BUFFER_MAX_SIZE]; -+ int32_t len = strlen(command); -+ -+ if (len == 0) { -+ return 0; -+ } - - if (!specialHandling) { -+#if defined(USING_CYGWIN) || defined(OS400) -+#define CMD_PADDING_SIZE 20 -+ if ((len + CMD_PADDING_SIZE) >= SMALL_BUFFER_MAX_SIZE) { -+ cmd = (char *)uprv_malloc(len + CMD_PADDING_SIZE); -+ } else { -+ cmd = cmdBuffer; -+ } - #ifdef USING_CYGWIN - sprintf(cmd, "bash -c \"%s\"", command); - - #elif defined(OS400) - sprintf(cmd, "QSH CMD('%s')", command); -+#endif - #else - goto normal_command_mode; - #endif - } else { - normal_command_mode: -- sprintf(cmd, "%s", command); -+ cmd = (char *)command; - } -- -+ - printf("pkgdata: %s\n", cmd); - int result = system(cmd); -- if (result != 0) { -- printf("-- return status = %d\n", result); -+ if (result != 0) { -+ printf("-- return status = %d\n", result); -+ } -+ -+ if (cmd != cmdBuffer && cmd != command) { -+ uprv_free(cmd); - } -- return result; --} -+ -+ return result; -+} - - #define LN_CMD "ln -s" - #define RM_CMD "rm -f" -@@ -586,7 +606,7 @@ - pkgDataFlags = (char**)uprv_malloc(sizeof(char*) * PKGDATA_FLAGS_SIZE); - if (pkgDataFlags != NULL) { - for (int32_t i = 0; i < PKGDATA_FLAGS_SIZE; i++) { -- pkgDataFlags[i] = (char*)uprv_malloc(sizeof(char) * SMALL_BUFFER_MAX_SIZE); -+ pkgDataFlags[i] = (char*)uprv_malloc(sizeof(char) * MEDIUM_BUFFER_MAX_SIZE); - if (pkgDataFlags[i] != NULL) { - pkgDataFlags[i][0] = 0; - } else { diff --git a/package/icu/icu-workaround-toolchain-bugs.patch b/package/icu/icu-workaround-toolchain-bugs.patch new file mode 100644 index 0000000000..64d67a0c3b --- /dev/null +++ b/package/icu/icu-workaround-toolchain-bugs.patch @@ -0,0 +1,36 @@ +Workaround toolchain bugs + +Many of ARM Sourcery CodeBench toolchain have a bug when compiling +icu's translit.cpp source file. The bug is trigerred when there is a +combination of "-W -Wall" and "-Os", and causes an internal compiler +error. The bug has been reported to Mentor Graphics. + +Even though it is clearly a toolchain bug, having a workaround for it +is trivial in this case. So it will avoid our users falling into this +internal compiler error, and allow our autobuilders to test more +packages using this Sourcery CodeBench toolchain.qq + +[Gustavo: update for ICU4C 51.2] +Signed-off-by: Thomas Petazzoni + +diff -Nura icu.orig/source/configure icu/source/configure +--- icu.orig/source/configure 2013-05-23 17:06:32.000000000 -0300 ++++ icu/source/configure 2013-06-29 15:43:04.202320953 -0300 +@@ -4066,7 +4066,7 @@ + then + # Do not use -ansi. It limits us to C90, and it breaks some platforms. + # We use -std=c99 to disable the gnu99 defaults and its associated warnings +- CFLAGS="$CFLAGS -Wall -std=c99 -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings" ++ CFLAGS="$CFLAGS -std=c99 -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings" + else + case "${host}" in + *-*-cygwin) +@@ -4078,7 +4078,7 @@ + fi + if test "$GXX" = yes + then +- CXXFLAGS="$CXXFLAGS -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long" ++ CXXFLAGS="$CXXFLAGS -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long" + else + case "${host}" in + *-*-cygwin) diff --git a/package/icu/icu.mk b/package/icu/icu.mk index 4eddb11a3c..f93eab1476 100644 --- a/package/icu/icu.mk +++ b/package/icu/icu.mk @@ -1,27 +1,30 @@ -############################################################# +################################################################################ # -# International Components for Unicode +# icu # -############################################################# +################################################################################ -ICU_VERSION = 4.4.2 +ICU_VERSION = 51.2 ICU_SOURCE = icu4c-$(subst .,_,$(ICU_VERSION))-src.tgz ICU_SITE = http://download.icu-project.org/files/icu4c/$(ICU_VERSION) +ICU_LICENSE = ICU License +ICU_LICENSE_FILES = license.html + ICU_DEPENDENCIES = host-icu ICU_INSTALL_STAGING = YES +ICU_CONFIG_SCRIPTS = icu-config ICU_CONF_OPT = --with-cross-build=$(HOST_ICU_DIR)/source --disable-samples \ --disable-tests -HOST_ICU_CONF_OPT = --disable-samples --disable-tests +HOST_ICU_CONF_OPT = \ + --disable-samples \ + --disable-tests \ + --disable-extras \ + --disable-icuio \ + --disable-layout \ + --disable-renaming +ICU_MAKE = $(MAKE1) ICU_SUBDIR = source HOST_ICU_SUBDIR = source -define ICU_PREFIX_FIXUP - $(SED) "s,^default_prefix=.*,default_prefix=\'$(STAGING_DIR)/usr\',g" \ - -e "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" \ - $(STAGING_DIR)/usr/bin/icu-config -endef - -ICU_POST_INSTALL_TARGET_HOOKS += ICU_PREFIX_FIXUP - -$(eval $(call AUTOTARGETS,package,icu)) -$(eval $(call AUTOTARGETS,package,icu,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/ifplugd/Config.in b/package/ifplugd/Config.in index 0311ad73e3..cbb5128c4a 100644 --- a/package/ifplugd/Config.in +++ b/package/ifplugd/Config.in @@ -1,5 +1,7 @@ config BR2_PACKAGE_IFPLUGD bool "ifplugd" + # libdaemon uses fork() + depends on BR2_USE_MMU select BR2_PACKAGE_LIBDAEMON help Ifplugd is a daemon which will automatically configure your diff --git a/package/ifplugd/ifplugd.mk b/package/ifplugd/ifplugd.mk index 5e66cea573..837e0160ed 100644 --- a/package/ifplugd/ifplugd.mk +++ b/package/ifplugd/ifplugd.mk @@ -1,30 +1,33 @@ -############################################################# +################################################################################ # # ifplugd # -############################################################# +################################################################################ + IFPLUGD_VERSION = 0.28 -IFPLUGD_SOURCE = ifplugd-$(IFPLUGD_VERSION).tar.gz -IFPLUGD_SITE = http://0pointer.de/lennart/projects/ifplugd/ +IFPLUGD_SITE = http://0pointer.de/lennart/projects/ifplugd +IFPLUGD_LICENSE = GPLv2 +IFPLUGD_LICENSE_FILES = LICENSE IFPLUGD_AUTORECONF = YES -IFPLUGD_INSTALL_STAGING = NO -IFPLUGD_INSTALL_TARGET = YES + # install-strip unconditionally overwrites $(TARGET_DIR)/etc/ifplugd/ifplugd.* IFPLUGD_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install-exec - -IFPLUGD_CONF_OPT = --disable-lynx - +IFPLUGD_CONF_OPT = --disable-lynx --with-initdir=/etc/init.d/ IFPLUGD_DEPENDENCIES = libdaemon +# Prefer big ifplugd +ifeq ($(BR2_PACKAGE_BUSYBOX),y) + IFPLUGD_DEPENDENCIES += busybox +endif + define IFPLUGD_INSTALL_FIXUP - $(INSTALL) -d $(TARGET_DIR)/etc/ifplugd @if [ ! -f $(TARGET_DIR)/etc/ifplugd/ifplugd.conf ]; then \ - $(INSTALL) $(@D)/conf/ifplugd.conf $(TARGET_DIR)/etc/ifplugd/; \ + $(INSTALL) -D $(@D)/conf/ifplugd.conf $(TARGET_DIR)/etc/ifplugd/ifplugd.conf; \ $(SED) 's^\(ARGS=.*\)w^\1^' $(TARGET_DIR)/etc/ifplugd/ifplugd.conf; \ fi - $(INSTALL) -m 0755 $(@D)/conf/ifplugd.action \ - $(TARGET_DIR)/etc/ifplugd/ - $(INSTALL) -m 0755 $(@D)/conf/ifplugd.init \ + $(INSTALL) -D -m 0755 $(@D)/conf/ifplugd.action \ + $(TARGET_DIR)/etc/ifplugd/ifplugd.action + $(INSTALL) -D -m 0755 $(@D)/conf/ifplugd.init \ $(TARGET_DIR)/etc/init.d/S45ifplugd # don't use bash for init script $(SED) 's^/bin/bash^/bin/sh^g' $(TARGET_DIR)/etc/init.d/S45ifplugd @@ -32,4 +35,4 @@ endef IFPLUGD_POST_INSTALL_TARGET_HOOKS += IFPLUGD_INSTALL_FIXUP -$(eval $(call AUTOTARGETS,package,ifplugd)) +$(eval $(autotools-package)) diff --git a/package/iftop/Config.in b/package/iftop/Config.in new file mode 100644 index 0000000000..eb40a30016 --- /dev/null +++ b/package/iftop/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_IFTOP + bool "iftop" + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_LIBPCAP + depends on BR2_INET_IPV6 + depends on BR2_TOOLCHAIN_HAS_THREADS + help + iftop does for network usage what top(1) does for CPU usage. + It listens to network traffic on a named interface and displays + a table of current bandwidth usage by pairs of hosts. Handy for + answering the question "why is our ADSL link so slow?". + + http://www.ex-parrot.com/pdw/iftop/ + +comment "iftop needs a toolchain w/ IPv6, threads" + depends on !BR2_INET_IPV6 || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/iftop/iftop.mk b/package/iftop/iftop.mk new file mode 100644 index 0000000000..de2f1b1856 --- /dev/null +++ b/package/iftop/iftop.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# iftop +# +################################################################################ + +IFTOP_VERSION = 1.0pre2 +IFTOP_SITE = http://www.ex-parrot.com/pdw/iftop/download/ + +IFTOP_DEPENDENCIES = ncurses libpcap + +IFTOP_LICENSE = GPLv2+ +IFTOP_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/igh-ethercat/Config.in b/package/igh-ethercat/Config.in new file mode 100644 index 0000000000..890bb1242e --- /dev/null +++ b/package/igh-ethercat/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_IGH_ETHERCAT + bool "igh-ethercat" + depends on BR2_LINUX_KERNEL + help + IgH EtherCAT Master for Linux. + + http://www.etherlab.org/en/ethercat/index.php + +if BR2_PACKAGE_IGH_ETHERCAT + +config BR2_PACKAGE_IGH_ETHERCAT_8139TOO + bool "8139too driver" + +config BR2_PACKAGE_IGH_ETHERCAT_E100 + bool "e100 driver" + +config BR2_PACKAGE_IGH_ETHERCAT_E1000 + bool "e1000 driver" + +config BR2_PACKAGE_IGH_ETHERCAT_E1000E + bool "e1000e driver" + +config BR2_PACKAGE_IGH_ETHERCAT_R8169 + bool "r8169 driver" + +endif diff --git a/package/igh-ethercat/igh-ethercat-Fixed-COPYING.LESSER-to-be-LGPL-2.1-like-in-file-hea.patch b/package/igh-ethercat/igh-ethercat-Fixed-COPYING.LESSER-to-be-LGPL-2.1-like-in-file-hea.patch new file mode 100644 index 0000000000..00aff82adf --- /dev/null +++ b/package/igh-ethercat/igh-ethercat-Fixed-COPYING.LESSER-to-be-LGPL-2.1-like-in-file-hea.patch @@ -0,0 +1,645 @@ +Fetch from: http://etherlabmaster.hg.sourceforge.net/hgweb/etherlabmaster/etherlabmaster/rev/907948bb2285 + +Signed-off-by: Samuel Martin + +--- +# HG changeset patch +# User Florian Pose +# Date 1342171132 -7200 +# Node ID 907948bb2285cbc30af501729593e4fefa7c20db +# Parent 5d7d2722dfaa0de2c80efb3187d41e434814f783 +Fixed COPYING.LESSER to be LGPL 2.1 (like in file headers). + +diff -r 5d7d2722dfaa -r 907948bb2285 COPYING.LESSER +--- a/COPYING.LESSER Fri Jul 13 10:42:31 2012 +0200 ++++ b/COPYING.LESSER Fri Jul 13 11:18:52 2012 +0200 +@@ -1,165 +1,502 @@ +- GNU LESSER GENERAL PUBLIC LICENSE +- Version 3, 29 June 2007 ++ GNU LESSER GENERAL PUBLIC LICENSE ++ Version 2.1, February 1999 + +- Copyright (C) 2007 Free Software Foundation, Inc. ++ Copyright (C) 1991, 1999 Free Software Foundation, Inc. ++ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + ++[This is the first released version of the Lesser GPL. It also counts ++ as the successor of the GNU Library Public License, version 2, hence ++ the version number 2.1.] + +- This version of the GNU Lesser General Public License incorporates +-the terms and conditions of version 3 of the GNU General Public +-License, supplemented by the additional permissions listed below. ++ Preamble + +- 0. Additional Definitions. ++ The licenses for most software are designed to take away your ++freedom to share and change it. By contrast, the GNU General Public ++Licenses are intended to guarantee your freedom to share and change ++free software--to make sure the software is free for all its users. + +- As used herein, "this License" refers to version 3 of the GNU Lesser +-General Public License, and the "GNU GPL" refers to version 3 of the GNU +-General Public License. ++ This license, the Lesser General Public License, applies to some ++specially designated software packages--typically libraries--of the ++Free Software Foundation and other authors who decide to use it. You ++can use it too, but we suggest you first think carefully about whether ++this license or the ordinary General Public License is the better ++strategy to use in any particular case, based on the explanations below. + +- "The Library" refers to a covered work governed by this License, +-other than an Application or a Combined Work as defined below. ++ When we speak of free software, we are referring to freedom of use, ++not price. Our General Public Licenses are designed to make sure that ++you have the freedom to distribute copies of free software (and charge ++for this service if you wish); that you receive source code or can get ++it if you want it; that you can change the software and use pieces of ++it in new free programs; and that you are informed that you can do ++these things. + +- An "Application" is any work that makes use of an interface provided +-by the Library, but which is not otherwise based on the Library. +-Defining a subclass of a class defined by the Library is deemed a mode +-of using an interface provided by the Library. ++ To protect your rights, we need to make restrictions that forbid ++distributors to deny you these rights or to ask you to surrender these ++rights. These restrictions translate to certain responsibilities for ++you if you distribute copies of the library or if you modify it. + +- A "Combined Work" is a work produced by combining or linking an +-Application with the Library. The particular version of the Library +-with which the Combined Work was made is also called the "Linked +-Version". ++ For example, if you distribute copies of the library, whether gratis ++or for a fee, you must give the recipients all the rights that we gave ++you. You must make sure that they, too, receive or can get the source ++code. If you link other code with the library, you must provide ++complete object files to the recipients, so that they can relink them ++with the library after making changes to the library and recompiling ++it. And you must show them these terms so they know their rights. + +- The "Minimal Corresponding Source" for a Combined Work means the +-Corresponding Source for the Combined Work, excluding any source code +-for portions of the Combined Work that, considered in isolation, are +-based on the Application, and not on the Linked Version. ++ We protect your rights with a two-step method: (1) we copyright the ++library, and (2) we offer you this license, which gives you legal ++permission to copy, distribute and/or modify the library. + +- The "Corresponding Application Code" for a Combined Work means the +-object code and/or source code for the Application, including any data +-and utility programs needed for reproducing the Combined Work from the +-Application, but excluding the System Libraries of the Combined Work. ++ To protect each distributor, we want to make it very clear that ++there is no warranty for the free library. Also, if the library is ++modified by someone else and passed on, the recipients should know ++that what they have is not the original version, so that the original ++author's reputation will not be affected by problems that might be ++introduced by others. ++ ++ Finally, software patents pose a constant threat to the existence of ++any free program. We wish to make sure that a company cannot ++effectively restrict the users of a free program by obtaining a ++restrictive license from a patent holder. Therefore, we insist that ++any patent license obtained for a version of the library must be ++consistent with the full freedom of use specified in this license. + +- 1. Exception to Section 3 of the GNU GPL. ++ Most GNU software, including some libraries, is covered by the ++ordinary GNU General Public License. This license, the GNU Lesser ++General Public License, applies to certain designated libraries, and ++is quite different from the ordinary General Public License. We use ++this license for certain libraries in order to permit linking those ++libraries into non-free programs. + +- You may convey a covered work under sections 3 and 4 of this License +-without being bound by section 3 of the GNU GPL. ++ When a program is linked with a library, whether statically or using ++a shared library, the combination of the two is legally speaking a ++combined work, a derivative of the original library. The ordinary ++General Public License therefore permits such linking only if the ++entire combination fits its criteria of freedom. The Lesser General ++Public License permits more lax criteria for linking other code with ++the library. + +- 2. Conveying Modified Versions. ++ We call this license the "Lesser" General Public License because it ++does Less to protect the user's freedom than the ordinary General ++Public License. It also provides other free software developers Less ++of an advantage over competing non-free programs. These disadvantages ++are the reason we use the ordinary General Public License for many ++libraries. However, the Lesser license provides advantages in certain ++special circumstances. + +- If you modify a copy of the Library, and, in your modifications, a +-facility refers to a function or data to be supplied by an Application +-that uses the facility (other than as an argument passed when the +-facility is invoked), then you may convey a copy of the modified +-version: ++ For example, on rare occasions, there may be a special need to ++encourage the widest possible use of a certain library, so that it becomes ++a de-facto standard. To achieve this, non-free programs must be ++allowed to use the library. A more frequent case is that a free ++library does the same job as widely used non-free libraries. In this ++case, there is little to gain by limiting the free library to free ++software only, so we use the Lesser General Public License. + +- a) under this License, provided that you make a good faith effort to +- ensure that, in the event an Application does not supply the +- function or data, the facility still operates, and performs +- whatever part of its purpose remains meaningful, or ++ In other cases, permission to use a particular library in non-free ++programs enables a greater number of people to use a large body of ++free software. For example, permission to use the GNU C Library in ++non-free programs enables many more people to use the whole GNU ++operating system, as well as its variant, the GNU/Linux operating ++system. + +- b) under the GNU GPL, with none of the additional permissions of +- this License applicable to that copy. ++ Although the Lesser General Public License is Less protective of the ++users' freedom, it does ensure that the user of a program that is ++linked with the Library has the freedom and the wherewithal to run ++that program using a modified version of the Library. + +- 3. Object Code Incorporating Material from Library Header Files. ++ The precise terms and conditions for copying, distribution and ++modification follow. Pay close attention to the difference between a ++"work based on the library" and a "work that uses the library". The ++former contains code derived from the library, whereas the latter must ++be combined with the library in order to run. ++ ++ GNU LESSER GENERAL PUBLIC LICENSE ++ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +- The object code form of an Application may incorporate material from +-a header file that is part of the Library. You may convey such object +-code under terms of your choice, provided that, if the incorporated +-material is not limited to numerical parameters, data structure +-layouts and accessors, or small macros, inline functions and templates +-(ten or fewer lines in length), you do both of the following: ++ 0. This License Agreement applies to any software library or other ++program which contains a notice placed by the copyright holder or ++other authorized party saying it may be distributed under the terms of ++this Lesser General Public License (also called "this License"). ++Each licensee is addressed as "you". + +- a) Give prominent notice with each copy of the object code that the +- Library is used in it and that the Library and its use are +- covered by this License. ++ A "library" means a collection of software functions and/or data ++prepared so as to be conveniently linked with application programs ++(which use some of those functions and data) to form executables. + +- b) Accompany the object code with a copy of the GNU GPL and this license +- document. ++ The "Library", below, refers to any such software library or work ++which has been distributed under these terms. A "work based on the ++Library" means either the Library or any derivative work under ++copyright law: that is to say, a work containing the Library or a ++portion of it, either verbatim or with modifications and/or translated ++straightforwardly into another language. (Hereinafter, translation is ++included without limitation in the term "modification".) + +- 4. Combined Works. ++ "Source code" for a work means the preferred form of the work for ++making modifications to it. For a library, complete source code means ++all the source code for all modules it contains, plus any associated ++interface definition files, plus the scripts used to control compilation ++and installation of the library. + +- You may convey a Combined Work under terms of your choice that, +-taken together, effectively do not restrict modification of the +-portions of the Library contained in the Combined Work and reverse +-engineering for debugging such modifications, if you also do each of +-the following: ++ Activities other than copying, distribution and modification are not ++covered by this License; they are outside its scope. The act of ++running a program using the Library is not restricted, and output from ++such a program is covered only if its contents constitute a work based ++on the Library (independent of the use of the Library in a tool for ++writing it). Whether that is true depends on what the Library does ++and what the program that uses the Library does. + +- a) Give prominent notice with each copy of the Combined Work that +- the Library is used in it and that the Library and its use are +- covered by this License. ++ 1. You may copy and distribute verbatim copies of the Library's ++complete source code as you receive it, in any medium, provided that ++you conspicuously and appropriately publish on each copy an ++appropriate copyright notice and disclaimer of warranty; keep intact ++all the notices that refer to this License and to the absence of any ++warranty; and distribute a copy of this License along with the ++Library. + +- b) Accompany the Combined Work with a copy of the GNU GPL and this license +- document. ++ You may charge a fee for the physical act of transferring a copy, ++and you may at your option offer warranty protection in exchange for a ++fee. ++ ++ 2. You may modify your copy or copies of the Library or any portion ++of it, thus forming a work based on the Library, and copy and ++distribute such modifications or work under the terms of Section 1 ++above, provided that you also meet all of these conditions: + +- c) For a Combined Work that displays copyright notices during +- execution, include the copyright notice for the Library among +- these notices, as well as a reference directing the user to the +- copies of the GNU GPL and this license document. ++ a) The modified work must itself be a software library. + +- d) Do one of the following: ++ b) You must cause the files modified to carry prominent notices ++ stating that you changed the files and the date of any change. + +- 0) Convey the Minimal Corresponding Source under the terms of this +- License, and the Corresponding Application Code in a form +- suitable for, and under terms that permit, the user to +- recombine or relink the Application with a modified version of +- the Linked Version to produce a modified Combined Work, in the +- manner specified by section 6 of the GNU GPL for conveying +- Corresponding Source. ++ c) You must cause the whole of the work to be licensed at no ++ charge to all third parties under the terms of this License. + +- 1) Use a suitable shared library mechanism for linking with the +- Library. A suitable mechanism is one that (a) uses at run time +- a copy of the Library already present on the user's computer +- system, and (b) will operate properly with a modified version +- of the Library that is interface-compatible with the Linked +- Version. ++ d) If a facility in the modified Library refers to a function or a ++ table of data to be supplied by an application program that uses ++ the facility, other than as an argument passed when the facility ++ is invoked, then you must make a good faith effort to ensure that, ++ in the event an application does not supply such function or ++ table, the facility still operates, and performs whatever part of ++ its purpose remains meaningful. + +- e) Provide Installation Information, but only if you would otherwise +- be required to provide such information under section 6 of the +- GNU GPL, and only to the extent that such information is +- necessary to install and execute a modified version of the +- Combined Work produced by recombining or relinking the +- Application with a modified version of the Linked Version. (If +- you use option 4d0, the Installation Information must accompany +- the Minimal Corresponding Source and Corresponding Application +- Code. If you use option 4d1, you must provide the Installation +- Information in the manner specified by section 6 of the GNU GPL +- for conveying Corresponding Source.) ++ (For example, a function in a library to compute square roots has ++ a purpose that is entirely well-defined independent of the ++ application. Therefore, Subsection 2d requires that any ++ application-supplied function or table used by this function must ++ be optional: if the application does not supply it, the square ++ root function must still compute square roots.) + +- 5. Combined Libraries. ++These requirements apply to the modified work as a whole. If ++identifiable sections of that work are not derived from the Library, ++and can be reasonably considered independent and separate works in ++themselves, then this License, and its terms, do not apply to those ++sections when you distribute them as separate works. But when you ++distribute the same sections as part of a whole which is a work based ++on the Library, the distribution of the whole must be on the terms of ++this License, whose permissions for other licensees extend to the ++entire whole, and thus to each and every part regardless of who wrote ++it. + +- You may place library facilities that are a work based on the +-Library side by side in a single library together with other library +-facilities that are not Applications and are not covered by this +-License, and convey such a combined library under terms of your +-choice, if you do both of the following: ++Thus, it is not the intent of this section to claim rights or contest ++your rights to work written entirely by you; rather, the intent is to ++exercise the right to control the distribution of derivative or ++collective works based on the Library. + +- a) Accompany the combined library with a copy of the same work based +- on the Library, uncombined with any other library facilities, +- conveyed under the terms of this License. ++In addition, mere aggregation of another work not based on the Library ++with the Library (or with a work based on the Library) on a volume of ++a storage or distribution medium does not bring the other work under ++the scope of this License. + +- b) Give prominent notice with the combined library that part of it +- is a work based on the Library, and explaining where to find the +- accompanying uncombined form of the same work. ++ 3. You may opt to apply the terms of the ordinary GNU General Public ++License instead of this License to a given copy of the Library. To do ++this, you must alter all the notices that refer to this License, so ++that they refer to the ordinary GNU General Public License, version 2, ++instead of to this License. (If a newer version than version 2 of the ++ordinary GNU General Public License has appeared, then you can specify ++that version instead if you wish.) Do not make any other change in ++these notices. ++ ++ Once this change is made in a given copy, it is irreversible for ++that copy, so the ordinary GNU General Public License applies to all ++subsequent copies and derivative works made from that copy. + +- 6. Revised Versions of the GNU Lesser General Public License. ++ This option is useful when you wish to copy part of the code of ++the Library into a program that is not a library. + +- The Free Software Foundation may publish revised and/or new versions +-of the GNU Lesser General Public License from time to time. Such new +-versions will be similar in spirit to the present version, but may +-differ in detail to address new problems or concerns. ++ 4. You may copy and distribute the Library (or a portion or ++derivative of it, under Section 2) in object code or executable form ++under the terms of Sections 1 and 2 above provided that you accompany ++it with the complete corresponding machine-readable source code, which ++must be distributed under the terms of Sections 1 and 2 above on a ++medium customarily used for software interchange. + +- Each version is given a distinguishing version number. If the +-Library as you received it specifies that a certain numbered version +-of the GNU Lesser General Public License "or any later version" +-applies to it, you have the option of following the terms and +-conditions either of that published version or of any later version +-published by the Free Software Foundation. If the Library as you +-received it does not specify a version number of the GNU Lesser +-General Public License, you may choose any version of the GNU Lesser +-General Public License ever published by the Free Software Foundation. ++ If distribution of object code is made by offering access to copy ++from a designated place, then offering equivalent access to copy the ++source code from the same place satisfies the requirement to ++distribute the source code, even though third parties are not ++compelled to copy the source along with the object code. + +- If the Library as you received it specifies that a proxy can decide +-whether future versions of the GNU Lesser General Public License shall +-apply, that proxy's public statement of acceptance of any version is +-permanent authorization for you to choose that version for the +-Library. ++ 5. A program that contains no derivative of any portion of the ++Library, but is designed to work with the Library by being compiled or ++linked with it, is called a "work that uses the Library". Such a ++work, in isolation, is not a derivative work of the Library, and ++therefore falls outside the scope of this License. ++ ++ However, linking a "work that uses the Library" with the Library ++creates an executable that is a derivative of the Library (because it ++contains portions of the Library), rather than a "work that uses the ++library". The executable is therefore covered by this License. ++Section 6 states terms for distribution of such executables. ++ ++ When a "work that uses the Library" uses material from a header file ++that is part of the Library, the object code for the work may be a ++derivative work of the Library even though the source code is not. ++Whether this is true is especially significant if the work can be ++linked without the Library, or if the work is itself a library. The ++threshold for this to be true is not precisely defined by law. ++ ++ If such an object file uses only numerical parameters, data ++structure layouts and accessors, and small macros and small inline ++functions (ten lines or less in length), then the use of the object ++file is unrestricted, regardless of whether it is legally a derivative ++work. (Executables containing this object code plus portions of the ++Library will still fall under Section 6.) ++ ++ Otherwise, if the work is a derivative of the Library, you may ++distribute the object code for the work under the terms of Section 6. ++Any executables containing that work also fall under Section 6, ++whether or not they are linked directly with the Library itself. ++ ++ 6. As an exception to the Sections above, you may also combine or ++link a "work that uses the Library" with the Library to produce a ++work containing portions of the Library, and distribute that work ++under terms of your choice, provided that the terms permit ++modification of the work for the customer's own use and reverse ++engineering for debugging such modifications. ++ ++ You must give prominent notice with each copy of the work that the ++Library is used in it and that the Library and its use are covered by ++this License. You must supply a copy of this License. If the work ++during execution displays copyright notices, you must include the ++copyright notice for the Library among them, as well as a reference ++directing the user to the copy of this License. Also, you must do one ++of these things: ++ ++ a) Accompany the work with the complete corresponding ++ machine-readable source code for the Library including whatever ++ changes were used in the work (which must be distributed under ++ Sections 1 and 2 above); and, if the work is an executable linked ++ with the Library, with the complete machine-readable "work that ++ uses the Library", as object code and/or source code, so that the ++ user can modify the Library and then relink to produce a modified ++ executable containing the modified Library. (It is understood ++ that the user who changes the contents of definitions files in the ++ Library will not necessarily be able to recompile the application ++ to use the modified definitions.) ++ ++ b) Use a suitable shared library mechanism for linking with the ++ Library. A suitable mechanism is one that (1) uses at run time a ++ copy of the library already present on the user's computer system, ++ rather than copying library functions into the executable, and (2) ++ will operate properly with a modified version of the library, if ++ the user installs one, as long as the modified version is ++ interface-compatible with the version that the work was made with. ++ ++ c) Accompany the work with a written offer, valid for at ++ least three years, to give the same user the materials ++ specified in Subsection 6a, above, for a charge no more ++ than the cost of performing this distribution. ++ ++ d) If distribution of the work is made by offering access to copy ++ from a designated place, offer equivalent access to copy the above ++ specified materials from the same place. ++ ++ e) Verify that the user has already received a copy of these ++ materials or that you have already sent this user a copy. ++ ++ For an executable, the required form of the "work that uses the ++Library" must include any data and utility programs needed for ++reproducing the executable from it. However, as a special exception, ++the materials to be distributed need not include anything that is ++normally distributed (in either source or binary form) with the major ++components (compiler, kernel, and so on) of the operating system on ++which the executable runs, unless that component itself accompanies ++the executable. ++ ++ It may happen that this requirement contradicts the license ++restrictions of other proprietary libraries that do not normally ++accompany the operating system. Such a contradiction means you cannot ++use both them and the Library together in an executable that you ++distribute. ++ ++ 7. You may place library facilities that are a work based on the ++Library side-by-side in a single library together with other library ++facilities not covered by this License, and distribute such a combined ++library, provided that the separate distribution of the work based on ++the Library and of the other library facilities is otherwise ++permitted, and provided that you do these two things: ++ ++ a) Accompany the combined library with a copy of the same work ++ based on the Library, uncombined with any other library ++ facilities. This must be distributed under the terms of the ++ Sections above. ++ ++ b) Give prominent notice with the combined library of the fact ++ that part of it is a work based on the Library, and explaining ++ where to find the accompanying uncombined form of the same work. ++ ++ 8. You may not copy, modify, sublicense, link with, or distribute ++the Library except as expressly provided under this License. Any ++attempt otherwise to copy, modify, sublicense, link with, or ++distribute the Library is void, and will automatically terminate your ++rights under this License. However, parties who have received copies, ++or rights, from you under this License will not have their licenses ++terminated so long as such parties remain in full compliance. ++ ++ 9. You are not required to accept this License, since you have not ++signed it. However, nothing else grants you permission to modify or ++distribute the Library or its derivative works. These actions are ++prohibited by law if you do not accept this License. Therefore, by ++modifying or distributing the Library (or any work based on the ++Library), you indicate your acceptance of this License to do so, and ++all its terms and conditions for copying, distributing or modifying ++the Library or works based on it. ++ ++ 10. Each time you redistribute the Library (or any work based on the ++Library), the recipient automatically receives a license from the ++original licensor to copy, distribute, link with or modify the Library ++subject to these terms and conditions. You may not impose any further ++restrictions on the recipients' exercise of the rights granted herein. ++You are not responsible for enforcing compliance by third parties with ++this License. ++ ++ 11. If, as a consequence of a court judgment or allegation of patent ++infringement or for any other reason (not limited to patent issues), ++conditions are imposed on you (whether by court order, agreement or ++otherwise) that contradict the conditions of this License, they do not ++excuse you from the conditions of this License. If you cannot ++distribute so as to satisfy simultaneously your obligations under this ++License and any other pertinent obligations, then as a consequence you ++may not distribute the Library at all. For example, if a patent ++license would not permit royalty-free redistribution of the Library by ++all those who receive copies directly or indirectly through you, then ++the only way you could satisfy both it and this License would be to ++refrain entirely from distribution of the Library. ++ ++If any portion of this section is held invalid or unenforceable under any ++particular circumstance, the balance of the section is intended to apply, ++and the section as a whole is intended to apply in other circumstances. ++ ++It is not the purpose of this section to induce you to infringe any ++patents or other property right claims or to contest validity of any ++such claims; this section has the sole purpose of protecting the ++integrity of the free software distribution system which is ++implemented by public license practices. Many people have made ++generous contributions to the wide range of software distributed ++through that system in reliance on consistent application of that ++system; it is up to the author/donor to decide if he or she is willing ++to distribute software through any other system and a licensee cannot ++impose that choice. ++ ++This section is intended to make thoroughly clear what is believed to ++be a consequence of the rest of this License. ++ ++ 12. If the distribution and/or use of the Library is restricted in ++certain countries either by patents or by copyrighted interfaces, the ++original copyright holder who places the Library under this License may add ++an explicit geographical distribution limitation excluding those countries, ++so that distribution is permitted only in or among countries not thus ++excluded. In such case, this License incorporates the limitation as if ++written in the body of this License. ++ ++ 13. The Free Software Foundation may publish revised and/or new ++versions of the Lesser General Public License from time to time. ++Such new versions will be similar in spirit to the present version, ++but may differ in detail to address new problems or concerns. ++ ++Each version is given a distinguishing version number. If the Library ++specifies a version number of this License which applies to it and ++"any later version", you have the option of following the terms and ++conditions either of that version or of any later version published by ++the Free Software Foundation. If the Library does not specify a ++license version number, you may choose any version ever published by ++the Free Software Foundation. ++ ++ 14. If you wish to incorporate parts of the Library into other free ++programs whose distribution conditions are incompatible with these, ++write to the author to ask for permission. For software which is ++copyrighted by the Free Software Foundation, write to the Free ++Software Foundation; we sometimes make exceptions for this. Our ++decision will be guided by the two goals of preserving the free status ++of all derivatives of our free software and of promoting the sharing ++and reuse of software generally. ++ ++ NO WARRANTY ++ ++ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO ++WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. ++EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR ++OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY ++KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE ++IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ++PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE ++LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME ++THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ++ ++ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN ++WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY ++AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU ++FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR ++CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE ++LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING ++RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A ++FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF ++SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH ++DAMAGES. ++ ++ END OF TERMS AND CONDITIONS ++ ++ How to Apply These Terms to Your New Libraries ++ ++ If you develop a new library, and you want it to be of the greatest ++possible use to the public, we recommend making it free software that ++everyone can redistribute and change. You can do so by permitting ++redistribution under these terms (or, alternatively, under the terms of the ++ordinary General Public License). ++ ++ To apply these terms, attach the following notices to the library. It is ++safest to attach them to the start of each source file to most effectively ++convey the exclusion of warranty; and each file should have at least the ++"copyright" line and a pointer to where the full notice is found. ++ ++ ++ Copyright (C) ++ ++ This library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ This library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with this library; if not, write to the Free Software ++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ ++Also add information on how to contact you by electronic and paper mail. ++ ++You should also get your employer (if you work as a programmer) or your ++school, if any, to sign a "copyright disclaimer" for the library, if ++necessary. Here is a sample; alter the names: ++ ++ Yoyodyne, Inc., hereby disclaims all copyright interest in the ++ library `Frob' (a library for tweaking knobs) written by James Random Hacker. ++ ++ , 1 April 1990 ++ Ty Coon, President of Vice ++ ++That's all there is to it! + diff --git a/package/igh-ethercat/igh-ethercat.mk b/package/igh-ethercat/igh-ethercat.mk new file mode 100644 index 0000000000..63bda2ff83 --- /dev/null +++ b/package/igh-ethercat/igh-ethercat.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# igh-ethercat +# +################################################################################ + +IGH_ETHERCAT_VERSION = 1.5.1 +IGH_ETHERCAT_SITE = http://etherlab.org/download/ethercat/ +IGH_ETHERCAT_SOURCE = ethercat-$(IGH_ETHERCAT_VERSION).tar.bz2 +IGH_ETHERCAT_LICENSE = GPLv2 (IgH EtherCAT master), LGPLv2.1 (libraries) +IGH_ETHERCAT_LICENSE_FILES = COPYING COPYING.LESSER + +IGH_ETHERCAT_DEPENDENCIES = linux +IGH_ETHERCAT_INSTALL_STAGING = YES + +IGH_ETHERCAT_CONF_OPT = \ + --with-linux-dir=$(LINUX_DIR) + +IGH_ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_IGH_ETHERCAT_8139TOO),--enable-8139too,--disable-8139too) +IGH_ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_IGH_ETHERCAT_E100),--enable-e100,--disable-e100) +IGH_ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_IGH_ETHERCAT_E1000),--enable-e1000,--disable-e1000) +IGH_ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_IGH_ETHERCAT_E1000E),--enable-e1000e,--disable-e1000e) +IGH_ETHERCAT_CONF_OPT += $(if $(BR2_PACKAGE_IGH_ETHERCAT_R8169),--enable-r8169,--disable-r8169) + +define IGH_ETHERCAT_BUILD_MODULES + $(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) modules +endef + +IGH_ETHERCAT_POST_BUILD_HOOKS += IGH_ETHERCAT_BUILD_MODULES + +define IGH_ETHERCAT_INSTALL_MODULES + $(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) modules_install +endef + +IGH_ETHERCAT_POST_INSTALL_TARGET_HOOKS += IGH_ETHERCAT_INSTALL_MODULES + +$(eval $(autotools-package)) diff --git a/package/igmpproxy/Config.in b/package/igmpproxy/Config.in new file mode 100644 index 0000000000..a9e4c1cc6a --- /dev/null +++ b/package/igmpproxy/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_IGMPPROXY + bool "igmpproxy" + depends on BR2_USE_WCHAR + help + A simple dynamic Multicast Routing Daemon + using only IGMP signalling. It's intended + for simple forwarding of Multicast traffic + between networks. + + http://sourceforge.net/projects/igmpproxy/ + +comment "igmpproxy needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/igmpproxy/igmpproxy.mk b/package/igmpproxy/igmpproxy.mk new file mode 100644 index 0000000000..577717cbfd --- /dev/null +++ b/package/igmpproxy/igmpproxy.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# igmpproxy +# +################################################################################ + +IGMPPROXY_VERSION = 0.1 +IGMPPROXY_SITE = http://downloads.sourceforge.net/project/igmpproxy/igmpproxy/$(IGMPPROXY_VERSION) +IGMPPROXY_LICENSE = GPLv2+ +IGMPPROXY_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/imagemagick/imagemagick-6.6.4-8-use-xml2-config.patch b/package/imagemagick/imagemagick-01-use-xml2-config.patch similarity index 100% rename from package/imagemagick/imagemagick-6.6.4-8-use-xml2-config.patch rename to package/imagemagick/imagemagick-01-use-xml2-config.patch diff --git a/package/imagemagick/imagemagick.mk b/package/imagemagick/imagemagick.mk index 97c00410f2..c8f3a566a9 100644 --- a/package/imagemagick/imagemagick.mk +++ b/package/imagemagick/imagemagick.mk @@ -1,15 +1,27 @@ -############################################################# +################################################################################ # # imagemagick # -############################################################# +################################################################################ + +IMAGEMAGICK_MAJOR = 6.8.7 +IMAGEMAGICK_VERSION = $(IMAGEMAGICK_MAJOR)-5 +IMAGEMAGICK_SOURCE = ImageMagick-$(IMAGEMAGICK_VERSION).tar.xz +# The official ImageMagick site only keeps the latest versions +# available, which is annoying. Use an alternate site that keeps all +# older versions. +IMAGEMAGICK_SITE = ftp://ftp.nluug.nl/pub/ImageMagick/ +IMAGEMAGICK_LICENSE = Apache-v2 +IMAGEMAGICK_LICENSE_FILES = LICENSE -IMAGEMAGICK_MAJOR = 6.6.7 -IMAGEMAGICK_VERSION = $(IMAGEMAGICK_MAJOR)-6 -IMAGEMAGICK_SOURCE = ImageMagick-$(IMAGEMAGICK_VERSION).tar.bz2 -IMAGEMAGICK_SITE = ftp://ftp.imagemagick.org/pub/ImageMagick IMAGEMAGICK_INSTALL_STAGING = YES IMAGEMAGICK_AUTORECONF = YES +IMAGEMAGICK_CONFIG_SCRIPTS = \ + $(addsuffix -config,Magick MagickCore MagickWand Wand) + +ifeq ($(BR2_INSTALL_LIBSTDCPP)$(BR2_USE_WCHAR),yy) +IMAGEMAGICK_CONFIG_SCRIPTS += Magick++-config +endif ifeq ($(BR2_LARGEFILE),y) IMAGEMAGICK_CONF_ENV = ac_cv_sys_file_offset_bits=64 @@ -30,6 +42,8 @@ IMAGEMAGICK_CONF_OPT = --program-transform-name='s,,,' \ --without-fpx \ --without-x +IMAGEMAGICK_DEPENDENCIES = host-pkgconf + ifeq ($(BR2_PACKAGE_FONTCONFIG),y) IMAGEMAGICK_CONF_OPT += --with-fontconfig IMAGEMAGICK_DEPENDENCIES += fontconfig @@ -39,6 +53,8 @@ endif ifeq ($(BR2_PACKAGE_FREETYPE),y) IMAGEMAGICK_CONF_OPT += --with-freetype +IMAGEMAGICK_CONF_ENV += \ + ac_cv_path_freetype_config=$(STAGING_DIR)/usr/bin/freetype-config IMAGEMAGICK_DEPENDENCIES += freetype else IMAGEMAGICK_CONF_OPT += --without-freetype @@ -67,7 +83,7 @@ endif ifeq ($(BR2_PACKAGE_LIBXML2),y) IMAGEMAGICK_CONF_OPT += --with-xml -IMAGEMAGICK_CONF_ENV += ac_cv_prog_xml2_config=$(STAGING_DIR)/usr/bin/xml2-config +IMAGEMAGICK_CONF_ENV += ac_cv_path_xml2_config=$(STAGING_DIR)/usr/bin/xml2-config IMAGEMAGICK_DEPENDENCIES += libxml2 else IMAGEMAGICK_CONF_OPT += --without-xml @@ -80,4 +96,27 @@ else IMAGEMAGICK_CONF_OPT += --without-tiff endif -$(eval $(call AUTOTARGETS,package,imagemagick)) +ifeq ($(BR2_PACKAGE_FFTW),y) +# configure script misdetects these leading to build errors +IMAGEMAGICK_CONF_ENV += ac_cv_func_creal=yes ac_cv_func_cimag=yes +IMAGEMAGICK_CONF_OPT += --with-fftw +IMAGEMAGICK_DEPENDENCIES += fftw +else +IMAGEMAGICK_CONF_OPT += --without-fftw +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +IMAGEMAGICK_CONF_OPT += --with-zlib +IMAGEMAGICK_DEPENDENCIES += zlib +else +IMAGEMAGICK_CONF_OPT += --without-zlib +endif + +ifeq ($(BR2_PACKAGE_BZIP2),y) +IMAGEMAGICK_CONF_OPT += --with-bzlib +IMAGEMAGICK_DEPENDENCIES += bzip2 +else +IMAGEMAGICK_CONF_OPT += --without-bzip2 +endif + +$(eval $(autotools-package)) diff --git a/package/imlib2/Config.in b/package/imlib2/Config.in new file mode 100644 index 0000000000..16a94d6ebb --- /dev/null +++ b/package/imlib2/Config.in @@ -0,0 +1,38 @@ +config BR2_PACKAGE_IMLIB2 + bool "imlib2" + select BR2_PACKAGE_FREETYPE + help + Imlib 2 is the successor to Imlib. This library provides + routines to load, save and render images in various formats. + + http://freshmeat.net/projects/imlib2/ + +if BR2_PACKAGE_IMLIB2 + +config BR2_PACKAGE_IMLIB2_JPEG + bool "JPEG support" + select BR2_PACKAGE_JPEG + +config BR2_PACKAGE_IMLIB2_PNG + bool "PNG support" + select BR2_PACKAGE_LIBPNG + +config BR2_PACKAGE_IMLIB2_GIF + bool "GIF support" + select BR2_PACKAGE_LIBUNGIF + +config BR2_PACKAGE_IMLIB2_TIFF + bool "TIFF support" + select BR2_PACKAGE_TIFF + +config BR2_PACKAGE_IMLIB2_ID3 + bool "ID3 support" + select BR2_PACKAGE_LIBID3TAG + +config BR2_PACKAGE_IMLIB2_X + bool "X support" + default y + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBX11 +endif diff --git a/package/imlib2/imlib2.mk b/package/imlib2/imlib2.mk new file mode 100644 index 0000000000..5b9d6b034e --- /dev/null +++ b/package/imlib2/imlib2.mk @@ -0,0 +1,67 @@ +################################################################################ +# +# imlib2 +# +################################################################################ + +IMLIB2_VERSION = 1.4.5 +IMLIB2_SOURCE = imlib2-$(IMLIB2_VERSION).tar.bz2 +IMLIB2_SITE = http://downloads.sourceforge.net/project/enlightenment/imlib2-src/$(IMLIB2_VERSION)/ +IMLIB2_LICENSE = imlib2 license +IMLIB2_LICENSE_FILES = COPYING + +IMLIB2_INSTALL_STAGING = YES +IMLIB2_DEPENDENCIES = host-pkgconf freetype +IMLIB2_CONF_OPT = --with-freetype-config=$(STAGING_DIR)/usr/bin/freetype-config +IMLIB2_CONFIG_SCRIPTS = imlib2-config + +ifeq ($(BR2_PACKAGE_IMLIB2_X),y) + IMLIB2_CONF_OPT += --with-x + IMLIB2_DEPENDENCIES += xlib_libX11 xlib_libXext +else + IMLIB2_CONF_OPT += --without-x +endif + +ifeq ($(BR2_PACKAGE_IMLIB2_JPEG),y) + IMLIB2_CONF_OPT += --with-jpeg + IMLIB2_DEPENDENCIES += jpeg +else + IMLIB2_CONF_OPT += --without-jpeg +endif + +ifeq ($(BR2_PACKAGE_IMLIB2_PNG),y) + IMLIB2_CONF_OPT += --with-png + IMLIB2_DEPENDENCIES += libpng +else + IMLIB2_CONF_OPT += --without-png +endif + +ifeq ($(BR2_PACKAGE_IMLIB2_GIF),y) + IMLIB2_CONF_OPT += --with-gif + IMLIB2_DEPENDENCIES += libungif +else + IMLIB2_CONF_OPT += --without-gif +endif + +ifeq ($(BR2_PACKAGE_IMLIB2_TIFF),y) + IMLIB2_CONF_OPT += --with-tiff + IMLIB2_DEPENDENCIES += tiff +else + IMLIB2_CONF_OPT += --without-tiff +endif + +ifeq ($(BR2_PACKAGE_IMLIB2_ID3),y) + IMLIB2_CONF_OPT += --with-id3 + IMLIB2_DEPENDENCIES += libid3tag +else + IMLIB2_CONF_OPT += --without-id3 +endif + +# drop -L from linker flags +define IMLIB2_FIXUP_IMLIB2_CONFIG + $(SED) 's/-L[^ ]*//g' $(STAGING_DIR)/usr/bin/imlib2-config +endef + +IMLIB2_POST_INSTALL_STAGING_HOOKS += IMLIB2_FIXUP_IMLIB2_CONFIG + +$(eval $(autotools-package)) diff --git a/package/inadyn/Config.in b/package/inadyn/Config.in new file mode 100644 index 0000000000..a2dfa7419b --- /dev/null +++ b/package/inadyn/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_INADYN + bool "inadyn" + depends on BR2_USE_MMU # Uses fork() + help + INADYN is a free DynDNS client. It gives the possibility + to have your own fixed hostname registered on the internet, + although your IP might be changing. + + https://github.com/troglobit/inadyn diff --git a/package/inadyn/S70inadyn b/package/inadyn/S70inadyn new file mode 100644 index 0000000000..24d0813791 --- /dev/null +++ b/package/inadyn/S70inadyn @@ -0,0 +1,35 @@ +#!/bin/sh +# +# Start & stop the inadyn client +# + +CONFIG=/etc/inadyn.conf +VR_INADYN=/var/run/inadyn + +# check if CONFIG exists, print message & exit if it doesn't +[ ! -f $CONFIG ] && ( echo "The config file "$CONFIG" is missing...exiting now." && exit 2 ) + +# check if VR_INADYN exists, create it if not +[ ! -d $VR_INADYN ] && mkdir -p $VR_INADYN + +case "$1" in + start) + echo "Starting inadyn." + start-stop-daemon -S -x /usr/sbin/inadyn + ;; + stop) + echo "Stopping inadyn." + start-stop-daemon -q -K -x /usr/sbin/inadyn + rm -f /var/run/inadyn/inadyn.pid + ;; + restart) + "$0" stop + "$0" start + ;; + *) + echo $"Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/package/inadyn/inadyn.conf b/package/inadyn/inadyn.conf new file mode 100644 index 0000000000..b5877f7a77 --- /dev/null +++ b/package/inadyn/inadyn.conf @@ -0,0 +1,12 @@ +# Basic configuration file for inadyn +# +# /etc/inadyn.conf +background +update_period_sec 600 # Check for a new IP every 600 seconds +username test # replace 'test' with your username +password test # replace 'test' with your password +dyndns_system dyndns@dyndns.org # replace w/ your provider + +# uncomment the alias statement below to test it on your system +alias test.homeip.net +# replace 'test.homeip.net' with yourdomainname for actual (non-test) use diff --git a/package/inadyn/inadyn.mk b/package/inadyn/inadyn.mk new file mode 100644 index 0000000000..12f8acca28 --- /dev/null +++ b/package/inadyn/inadyn.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# inadyn +# +################################################################################ + +INADYN_VERSION = 1.98.1 +INADYN_SOURCE = inadyn-$(INADYN_VERSION).tar.bz2 +INADYN_SITE = https://github.com/downloads/troglobit/inadyn +INADYN_LICENSE = GPLv2+ +INADYN_LICENSE_FILES = COPYING LICENSE + +define INADYN_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define INADYN_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/src/inadyn $(TARGET_DIR)/usr/sbin/inadyn + $(INSTALL) -D -m 0644 package/inadyn/inadyn.conf \ + $(TARGET_DIR)/etc/inadyn.conf + $(INSTALL) -D -m 0755 package/inadyn/S70inadyn \ + $(TARGET_DIR)/etc/init.d/S70inadyn +endef + +$(eval $(generic-package)) diff --git a/package/infozip/Config.in b/package/infozip/Config.in new file mode 100644 index 0000000000..cfd7533e60 --- /dev/null +++ b/package/infozip/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_INFOZIP + bool "infozip" + help + Zip is a compression and file packaging/archive utility. + Although highly compatible both with PKWARE's PKZIP and + PKUNZIP utilities for MS-DOS and with Info-ZIP's own UnZip, + our primary objectives have been portability and + other-than-MSDOS functionality. + + http://infozip.sourceforge.net/Zip.html diff --git a/package/infozip/infozip.mk b/package/infozip/infozip.mk new file mode 100644 index 0000000000..d73edd40c5 --- /dev/null +++ b/package/infozip/infozip.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# infozip +# +################################################################################ + +INFOZIP_VERSION = 30 +INFOZIP_SOURCE = zip$(INFOZIP_VERSION).tgz +INFOZIP_SITE = ftp://ftp.info-zip.org/pub/infozip/src +INFOZIP_LICENSE = Info-ZIP +INFOZIP_LICENSE_FILES = LICENSE + +define INFOZIP_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) -f unix/Makefile generic +endef + +define INFOZIP_INSTALL_TARGET_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) -f unix/Makefile install \ + prefix=$(TARGET_DIR)/usr +endef + +$(eval $(generic-package)) diff --git a/package/inotify-tools/Config.in b/package/inotify-tools/Config.in new file mode 100644 index 0000000000..4d64b73b62 --- /dev/null +++ b/package/inotify-tools/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_INOTIFY_TOOLS + bool "inotify-tools" + depends on BR2_LARGEFILE + depends on BR2_USE_MMU # fork() + help + inotify-tools is a C library and a set of command-line + programs for Linux providing a simple interface to inotify. + These programs can be used to monitor and act upon + filesystem events. Provides the 'inotifywait' and 'inotifywatch' + binaries. + + https://github.com/rvoicilas/inotify-tools + +comment "inotify-tools needs a toolchain w/ largefile" + depends on BR2_USE_MMU + depends on !BR2_LARGEFILE diff --git a/package/inotify-tools/inotify-tools.mk b/package/inotify-tools/inotify-tools.mk new file mode 100644 index 0000000000..1a988a3008 --- /dev/null +++ b/package/inotify-tools/inotify-tools.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# inotify-tools +# +################################################################################ + +INOTIFY_TOOLS_VERSION = 3.14 +INOTIFY_TOOLS_SITE = http://github.com/downloads/rvoicilas/inotify-tools/ +INOTIFY_TOOLS_LICENSE = GPL +INOTIFY_TOOLS_LICENSE_FILES = COPYING +INOTIFY_TOOLS_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/input-event-daemon/Config.in b/package/input-event-daemon/Config.in new file mode 100644 index 0000000000..84177fd8f2 --- /dev/null +++ b/package/input-event-daemon/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_INPUT_EVENT_DAEMON + bool "input-event-daemon" + # Uses fork() + depends on BR2_USE_MMU + help + input-event-daemon is a daemon which executes + a user-defined command on input events, such as + keys, mouse buttons and switches. + + http://github.com/gandro/input-event-daemon diff --git a/package/input-event-daemon/S99input-event-daemon b/package/input-event-daemon/S99input-event-daemon new file mode 100755 index 0000000000..3a82b06ca1 --- /dev/null +++ b/package/input-event-daemon/S99input-event-daemon @@ -0,0 +1,39 @@ +#! /bin/sh + +[ -f /usr/bin/input-event-daemon ] || exit 0 + +start() { + echo -n "Starting input-event-daemon: " + input-event-daemon + echo "done" +} + + +stop() { + echo -n "Stopping input-event-daemon: " + killall input-event-daemon + echo "done" +} + +restart() { + stop + start +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|reload|restart}" + exit 1 +esac + +exit $? diff --git a/package/input-event-daemon/input-event-daemon.mk b/package/input-event-daemon/input-event-daemon.mk new file mode 100644 index 0000000000..762d3c2b5c --- /dev/null +++ b/package/input-event-daemon/input-event-daemon.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# input-event-daemon +# +################################################################################ + +INPUT_EVENT_DAEMON_VERSION = v0.1.3 +INPUT_EVENT_DAEMON_SITE = http://github.com/gandro/input-event-daemon/tarball/$(INPUT_EVENT_DAEMON_VERSION) +INPUT_EVENT_DAEMON_LICENSE = input-event-daemon license +INPUT_EVENT_DAEMON_LICENSE_FILES = README + +define INPUT_EVENT_DAEMON_BUILD_CMDS + touch $(@D)/input-event-table.h + $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D) +endef + +define INPUT_EVENT_DAEMON_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 -D $(@D)/input-event-daemon \ + $(TARGET_DIR)/usr/bin/input-event-daemon + [ -f $(TARGET_DIR)/etc/input-event-daemon.conf ] || \ + $(INSTALL) -m 644 -D $(@D)/docs/sample.conf \ + $(TARGET_DIR)/etc/input-event-daemon.conf + [ -f $(TARGET_DIR)/etc/init.d/S99input-event-daemon ] || \ + $(INSTALL) -m 0755 -D package/input-event-daemon/S99input-event-daemon \ + $(TARGET_DIR)/etc/init.d/S99input-event-daemon +endef + +define INPUT_EVENT_DAEMON_CLEAN_CMDS + $(MAKE) -C $(@D) clean +endef + +define INPUT_EVENT_DAEMON_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/bin/input-event-daemon + rm -f $(TARGET_DIR)/etc/input-event-daemon.conf +endef + +$(eval $(generic-package)) diff --git a/package/input-tools/Config.in b/package/input-tools/Config.in index 489b130584..a2dfe286b1 100644 --- a/package/input-tools/Config.in +++ b/package/input-tools/Config.in @@ -4,30 +4,23 @@ config BR2_PACKAGE_INPUT_TOOLS Tools for the Linux kernel input layer. http://linuxconsole.sourceforge.net/ -config BR2_PACKAGE_INPUT_TOOLS_EVTEST - bool "evtest" - depends on BR2_PACKAGE_INPUT_TOOLS - default y - help - Input event interface test program. - config BR2_PACKAGE_INPUT_TOOLS_INPUTATTACH - bool "inputattach" - depends on BR2_PACKAGE_INPUT_TOOLS - default y - help + bool "inputattach" + depends on BR2_PACKAGE_INPUT_TOOLS + default y + help Inputattach is used for attaching a serial line to the input layer. config BR2_PACKAGE_INPUT_TOOLS_JSCAL - bool "jscal" - depends on BR2_PACKAGE_INPUT_TOOLS - default y - help + bool "jscal" + depends on BR2_PACKAGE_INPUT_TOOLS + default y + help Joystick calibration program. config BR2_PACKAGE_INPUT_TOOLS_JSTEST - bool "jstest" - depends on BR2_PACKAGE_INPUT_TOOLS - default y - help + bool "jstest" + depends on BR2_PACKAGE_INPUT_TOOLS + default y + help Joystick test program. diff --git a/package/input-tools/input-tools.mk b/package/input-tools/input-tools.mk index daf07556d6..503f16abcb 100644 --- a/package/input-tools/input-tools.mk +++ b/package/input-tools/input-tools.mk @@ -1,21 +1,21 @@ -############################################################# +################################################################################ # # input-tools # -############################################################# +################################################################################ + INPUT_TOOLS_VERSION = 20051019 INPUT_TOOLS_SOURCE = joystick_$(INPUT_TOOLS_VERSION).orig.tar.gz INPUT_TOOLS_PATCH = joystick_$(INPUT_TOOLS_VERSION)-5.diff.gz INPUT_TOOLS_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/j/joystick/ -INPUT_TOOLS_TARGETS_$(BR2_PACKAGE_INPUT_TOOLS_EVTEST) += evtest INPUT_TOOLS_TARGETS_$(BR2_PACKAGE_INPUT_TOOLS_INPUTATTACH) += inputattach INPUT_TOOLS_TARGETS_$(BR2_PACKAGE_INPUT_TOOLS_JSCAL) += jscal INPUT_TOOLS_TARGETS_$(BR2_PACKAGE_INPUT_TOOLS_JSTEST) += jstest define INPUT_TOOLS_DEBIAN_PATCHES if [ -d $(@D)/debian/patches ]; then \ - toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches \*.patch; \ + support/scripts/apply-patches.sh $(@D) $(@D)/debian/patches \*.patch; \ fi endef @@ -24,10 +24,12 @@ INPUT_TOOLS_POST_PATCH_HOOKS = INPUT_TOOLS_DEBIAN_PATCHES # jscal needs -lm define INPUT_TOOLS_BUILD_CMDS for i in $(filter-out jscal,$(INPUT_TOOLS_TARGETS_y)); do \ - $(TARGET_CC) $(TARGET_CFLAGS) -o $(@D)/$$i $(@D)/utils/$$i.c; \ + $(TARGET_CC) $(TARGET_CFLAGS) -o $(@D)/$$i $(@D)/utils/$$i.c \ + $(TARGET_LDFLAGS); \ done for i in $(filter jscal,$(INPUT_TOOLS_TARGETS_y)); do \ - $(TARGET_CC) $(TARGET_CFLAGS) -o $(@D)/$$i $(@D)/utils/$$i.c -lm; \ + $(TARGET_CC) $(TARGET_CFLAGS) -o $(@D)/$$i $(@D)/utils/$$i.c \ + $(TARGET_LDFLAGS) -lm; \ done endef @@ -45,4 +47,4 @@ define INPUT_TOOLS_CLEAN_CMDS rm -f $(addprefix $(@D)/,$(INPUT_TOOLS_TARGETS_y)) endef -$(eval $(call GENTARGETS,package,input-tools)) +$(eval $(generic-package)) diff --git a/package/intltool/Config.in b/package/intltool/Config.in index 990a22712a..4643a899d7 100644 --- a/package/intltool/Config.in +++ b/package/intltool/Config.in @@ -1,9 +1,9 @@ config BR2_PACKAGE_INTLTOOL - bool "intltool" - # Hide from configuration as we only support the host package - # for the moment - depends on BR2_HOST_ONLY - help - Utility scripts for internationalizing XML + bool "intltool" + # Hide from configuration as we only support the host package + # for the moment + depends on BR2_HOST_ONLY + help + Utility scripts for internationalizing XML - http://www.freedesktop.org/wiki/Software/intltool \ No newline at end of file + http://www.freedesktop.org/wiki/Software/intltool diff --git a/package/intltool/intltool.mk b/package/intltool/intltool.mk index 746ebb1d5f..b2418fe476 100644 --- a/package/intltool/intltool.mk +++ b/package/intltool/intltool.mk @@ -1,16 +1,17 @@ -############################################################# +################################################################################ # # intltool # -############################################################# -INTLTOOL_VERSION:=0.40.6 -INTLTOOL_SOURCE:=intltool-$(INTLTOOL_VERSION).tar.bz2 -INTLTOOL_SITE:=http://ftp.acc.umu.se/pub/GNOME/sources/intltool/0.40/ +################################################################################ -HOST_INTLTOOL_DEPENDENCIES = host-libxml-parser-perl +INTLTOOL_VERSION = 0.50.2 +INTLTOOL_SITE = https://launchpad.net/intltool/trunk/$(INTLTOOL_VERSION)/+download/ +INTLTOOL_LICENSE = GPLv2+ +INTLTOOL_LICENSE_FILES = COPYING + +HOST_INTLTOOL_DEPENDENCIES = host-gettext host-libxml-parser-perl HOST_INTLTOOL_CONF_OPT = \ PERLLIB=$(HOST_DIR)/usr/lib/perl -$(eval $(call AUTOTARGETS,package,intltool)) -$(eval $(call AUTOTARGETS,package,intltool,host)) - +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/iostat/iostat.mk b/package/iostat/iostat.mk index de7e1ff74c..3297b3e172 100644 --- a/package/iostat/iostat.mk +++ b/package/iostat/iostat.mk @@ -1,16 +1,18 @@ -############################################################# +################################################################################ # # iostat # -############################################################# +################################################################################ IOSTAT_VERSION = 2.2 IOSTAT_SITE = http://www.linuxinsight.com/files +IOSTAT_LICENSE = GPL +IOSTAT_LICENSE_FILES = LICENSE iostat-source: $(DL_DIR)/$(IOSTAT_SOURCE) define IOSTAT_BUILD_CMDS - $(MAKE) -C $(@D) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) endef define IOSTAT_CLEAN_CMDS @@ -28,4 +30,4 @@ define IOSTAT_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/share/man/man8/iostat.8 endef -$(eval $(call GENTARGETS,package,iostat)) +$(eval $(generic-package)) diff --git a/package/iozone/Config.in b/package/iozone/Config.in new file mode 100644 index 0000000000..33e12ca77c --- /dev/null +++ b/package/iozone/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_IOZONE + bool "iozone" + depends on BR2_USE_MMU # fork() + depends on !BR2_UCLIBC_VERSION_0_9_31 # no pthread_setaffinity_np + help + IOzone is a filesystem benchmark tool. + The benchmark generates and measures a variety of file operations + + http://www.iozone.org/ diff --git a/package/iozone/iozone-targets.patch b/package/iozone/iozone-targets.patch new file mode 100644 index 0000000000..258b960928 --- /dev/null +++ b/package/iozone/iozone-targets.patch @@ -0,0 +1,92 @@ +Add new targets for iozone: + +linux-noaio is for linux targets without AIO (use case: uClibc) +linux-noth is for linux target without threads or AIO + +And make largefile support optional via CFLAGS. + +Signed-off-by: Gustavo Zacarias + +diff -Nura iozone3_414.orig/src/current/makefile iozone3_414/src/current/makefile +--- iozone3_414.orig/src/current/makefile 2013-06-11 09:48:18.257837091 -0300 ++++ iozone3_414/src/current/makefile 2013-06-11 13:05:56.338162144 -0300 +@@ -166,10 +166,28 @@ + # GNU 'C' compiler Linux build with threads, largefiles, async I/O + # + linux: iozone_linux.o libasync.o libbif.o fileop_linux.o pit_server.o +- $(CC) -O3 $(LDFLAGS) iozone_linux.o libasync.o libbif.o -lpthread \ ++ $(CC) $(CFLAGS) $(LDFLAGS) iozone_linux.o libasync.o libbif.o \ ++ -lpthread -lrt -o iozone ++ $(CC) $(CFLAGS) -Dlinux fileop_linux.o -o fileop ++ $(CC) $(CFLAGS) -Dlinux pit_server.o -o pit_server ++ ++# ++# GNU 'C' compiler Linux build with threads, largefiles ++# ++linux-noaio: iozone_linux-noaio.o libbif.o fileop_linux.o pit_server.o ++ $(CC) $(CFLAGS) $(LDFLAGS) iozone_linux-noaio.o libbif.o \ ++ -lpthread -lrt -o iozone ++ $(CC) $(CFLAGS) -Dlinux fileop_linux.o -o fileop ++ $(CC) $(CFLAGS) -Dlinux pit_server.o -o pit_server ++ ++# ++# GNU 'C' compiler Linux build with largefiles ++# ++linux-noth: iozone_linux-noth.o libbif.o fileop_linux.o pit_server.o ++ $(CC) $(CFLAGS) $(LDFLAGS) iozone_linux-noth.o libbif.o \ + -lrt -o iozone +- $(CC) -O3 -Dlinux fileop_linux.o -o fileop +- $(CC) -O3 -Dlinux pit_server.o -o pit_server ++ $(CC) $(CFLAGS) -Dlinux fileop_linux.o -o fileop ++ $(CC) $(CFLAGS) -Dlinux pit_server.o -o pit_server + + # + # GNU 'C' compiler Linux build for powerpc chip with threads, largefiles, async I/O +@@ -795,13 +813,33 @@ + @echo "" + @echo "Building iozone for Linux" + @echo "" +- $(CC) -Wall -c -O3 -Dunix -DHAVE_ANSIC_C -DASYNC_IO -DHAVE_PREAD \ +- -DSHARED_MEM -Dlinux -D_LARGEFILE64_SOURCE $(CFLAGS) iozone.c \ ++ $(CC) -Wall -c -Dunix -DHAVE_ANSIC_C -DASYNC_IO -DHAVE_PREAD \ ++ -DSHARED_MEM -Dlinux $(CFLAGS) iozone.c \ + -DNAME='"linux"' -o iozone_linux.o +- $(CC) -Wall -c -O3 -Dunix -DHAVE_ANSIC_C -DASYNC_IO -D_LARGEFILE64_SOURCE \ ++ $(CC) -Wall -c -Dunix -DHAVE_ANSIC_C -DASYNC_IO \ ++ -DSHARED_MEM -Dlinux $(CFLAGS) libbif.c -o libbif.o ++ $(CC) -Wall -c -Dunix -Dlinux -DHAVE_ANSIC_C -DASYNC_IO \ ++ $(CFLAGS) libasync.c -o libasync.o ++ ++iozone_linux-noaio.o: iozone.c libbif.c ++ @echo "" ++ @echo "Building iozone for Linux no AIO" ++ @echo "" ++ $(CC) -Wall -c -Dunix -DHAVE_ANSIC_C -DHAVE_PREAD \ ++ -DSHARED_MEM -Dlinux $(CFLAGS) iozone.c \ ++ -DNAME='"linux"' -o iozone_linux-noaio.o ++ $(CC) -Wall -c -Dunix -DHAVE_ANSIC_C \ ++ -DSHARED_MEM -Dlinux $(CFLAGS) libbif.c -o libbif.o ++ ++iozone_linux-noth.o: iozone.c libbif.c ++ @echo "" ++ @echo "Building iozone for Linux with no threads" ++ @echo "" ++ $(CC) -Wall -c -Dunix -DHAVE_ANSIC_C -DNO_THREADS -DHAVE_PREAD \ ++ -DSHARED_MEM -Dlinux $(CFLAGS) iozone.c \ ++ -DNAME='"linux"' -o iozone_linux-noth.o ++ $(CC) -Wall -c -Dunix -DHAVE_ANSIC_C -DNO_THREADS \ + -DSHARED_MEM -Dlinux $(CFLAGS) libbif.c -o libbif.o +- $(CC) -Wall -c -O3 -Dunix -Dlinux -DHAVE_ANSIC_C -DASYNC_IO \ +- -D_LARGEFILE64_SOURCE $(CFLAGS) libasync.c -o libasync.o + + fileop_AIX.o: fileop.c + @echo "" +@@ -893,7 +931,7 @@ + @echo "" + @echo "Building fileop for Linux" + @echo "" +- $(CC) -Wall -c -O3 $(CFLAGS) fileop.c -o fileop_linux.o ++ $(CC) -Wall -c $(CFLAGS) fileop.c -o fileop_linux.o + + fileop_openbsd.o: fileop.c + @echo "" diff --git a/package/iozone/iozone.mk b/package/iozone/iozone.mk new file mode 100644 index 0000000000..328a5269d4 --- /dev/null +++ b/package/iozone/iozone.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# iozone +# +################################################################################ + +IOZONE_VERSION = 3_414 +IOZONE_SOURCE = iozone$(IOZONE_VERSION).tar +IOZONE_SITE = http://www.iozone.org/src/current +IOZONE_LICENSE = IOzone license (NO DERIVED WORKS ALLOWED) +# IOzone license details can be found at: +# http://www.iozone.org/docs/Iozone_License.txt + +# No threading target is non-AIO as well +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),) +IOZONE_TARGET = linux-noth +# AIO support not available on uClibc, use the linux (non-aio) target. +else ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +IOZONE_TARGET = linux-noaio +else +IOZONE_TARGET = linux +endif + +define IOZONE_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) $(IOZONE_TARGET) -C $(@D)/src/current +endef + +define IOZONE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/src/current/iozone \ + $(TARGET_DIR)/usr/bin/iozone +endef + +define IOZONE_CLEAN_CMDS + $(MAKE) -C $(@D)/src/current clean +endef + +$(eval $(generic-package)) diff --git a/package/iperf/Config.in b/package/iperf/Config.in index c4c25b359d..86dd3e97c9 100644 --- a/package/iperf/Config.in +++ b/package/iperf/Config.in @@ -1,11 +1,14 @@ config BR2_PACKAGE_IPERF bool "iperf" depends on BR2_INSTALL_LIBSTDCPP + # uses fork() + depends on BR2_USE_MMU help Internet Protocol bandwidth measuring tool for measuring TCP/UDP performance. http://dast.nlanr.net/projects/iperf/ -comment "iperf requires a toolchain with C++ support enabled" +comment "iperf needs a toolchain w/ C++" + depends on BR2_USE_MMU depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/iperf/iperf.mk b/package/iperf/iperf.mk index 769923ff6a..c570d67dca 100644 --- a/package/iperf/iperf.mk +++ b/package/iperf/iperf.mk @@ -1,16 +1,11 @@ -############################################################# +################################################################################ # # iperf # -############################################################# -IPERF_VERSION = 2.0.5 -IPERF_SOURCE = iperf-$(IPERF_VERSION).tar.gz -IPERF_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/iperf - -IPERF_AUTORECONF = NO +################################################################################ -IPERF_INSTALL_STAGING = NO -IPERF_INSTALL_TARGET = YES +IPERF_VERSION = 2.0.5 +IPERF_SITE = http://downloads.sourceforge.net/project/iperf IPERF_CONF_ENV = \ ac_cv_func_malloc_0_nonnull=yes \ @@ -21,4 +16,4 @@ IPERF_CONF_OPT = \ --disable-dependency-tracking \ --disable-web100 -$(eval $(call AUTOTARGETS,package,iperf)) +$(eval $(autotools-package)) diff --git a/package/ipkg/ipkg.mk b/package/ipkg/ipkg.mk index 30a27c0680..b9cba582ec 100644 --- a/package/ipkg/ipkg.mk +++ b/package/ipkg/ipkg.mk @@ -1,14 +1,11 @@ -############################################################# +################################################################################ # # ipkg # -############################################################# +################################################################################ IPKG_VERSION = 0.99.163 -IPKG_SOURCE = ipkg-$(IPKG_VERSION).tar.gz IPKG_SITE = http://www.handhelds.org/download/packages/ipkg -IPKG_AUTORECONF = NO IPKG_INSTALL_STAGING = YES -IPKG_INSTALL_TARGET = YES -$(eval $(call AUTOTARGETS,package,ipkg)) +$(eval $(autotools-package)) diff --git a/package/iproute2/Config.in b/package/iproute2/Config.in index b6ee86e9b8..4da0d2b1ca 100644 --- a/package/iproute2/Config.in +++ b/package/iproute2/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_IPROUTE2 bool "iproute2" + depends on BR2_USE_MMU # fork() help Kernel routing and traffic control utilities. Provides things like ip and tc. diff --git a/package/iproute2/iproute2-2.6.37-optional-ipv6.patch b/package/iproute2/iproute2-2.6.37-optional-ipv6.patch deleted file mode 100644 index ef22c22129..0000000000 --- a/package/iproute2/iproute2-2.6.37-optional-ipv6.patch +++ /dev/null @@ -1,94 +0,0 @@ -[PATCH] fix build on uClibc without IPv6 support - -Disable IPv6 support code when building with uClibc configured without IPv6 -support. - -Signed-off-by: Peter Korsgaard ---- - ip/ip6tunnel.c | 6 ++++++ - ip/ipprefix.c | 8 ++++++++ - ip/iptunnel.c | 6 ++++++ - 3 files changed, 20 insertions(+) - -Index: iproute2-2.6.37-orig/ip/ip6tunnel.c -=================================================================== ---- iproute2-2.6.37-orig.orig/ip/ip6tunnel.c -+++ iproute2-2.6.37-orig/ip/ip6tunnel.c -@@ -20,6 +20,10 @@ - * Masahide NAKAMURA @USAGI - */ - -+#include -+#if defined(__UCLIBC__) && !defined (__UCLIBC_HAS_IPV6__) -+#else -+ - #include - #include - #include -@@ -410,3 +414,5 @@ int do_ip6tunnel(int argc, char **argv) - fprintf(stderr, "Command \"%s\" is unknown, try \"ip -f inet6 tunnel help\".\n", *argv); - exit(-1); - } -+ -+#endif /* no ipv6 */ -Index: iproute2-2.6.37-orig/ip/ipprefix.c -=================================================================== ---- iproute2-2.6.37-orig.orig/ip/ipprefix.c -+++ iproute2-2.6.37-orig/ip/ipprefix.c -@@ -22,11 +22,17 @@ - * Authors: - * Masahide NAKAMURA @USAGI - */ -+#include -+#if defined(__UCLIBC__) && !defined (__UCLIBC_HAS_IPV6__) -+#define NO_IPV6 -+#endif - - #include - #include - #include -+#ifndef NO_IPV6 - #include -+#endif - #include "utils.h" - - /* prefix flags; see kernel's net/ipv6/addrconf.c and include/net/if_inet6.h */ -@@ -62,10 +68,12 @@ int print_prefix(const struct sockaddr_n - fprintf(stderr, "wrong family %d\n", prefix->prefix_family); - return 0; - } -+#ifdef ND_OPT_PREFIX_INFORMATION - if (prefix->prefix_type != ND_OPT_PREFIX_INFORMATION) { - fprintf(stderr, "wrong ND type %d\n", prefix->prefix_type); - return 0; - } -+#endif - - parse_rtattr(tb, RTA_MAX, RTM_RTA(prefix), len); - -Index: iproute2-2.6.37-orig/ip/iptunnel.c -=================================================================== ---- iproute2-2.6.37-orig.orig/ip/iptunnel.c -+++ iproute2-2.6.37-orig/ip/iptunnel.c -@@ -9,6 +9,10 @@ - * Authors: Alexey Kuznetsov, - * - */ -+#include -+#if defined(__UCLIBC__) && !defined (__UCLIBC_HAS_IPV6__) -+#define NO_IPV6 -+#endif - - #include - #include -@@ -601,8 +605,10 @@ int do_iptunnel(int argc, char **argv) - * protocol-independent because of unarranged structure between - * IPv4 and IPv6. - */ -+#ifndef NO_IPV6 - case AF_INET6: - return do_ip6tunnel(argc, argv); -+#endif - default: - fprintf(stderr, "Unsupported family:%d\n", preferred_family); - exit(-1); diff --git a/package/iproute2/iproute2-optional-ipv6.patch b/package/iproute2/iproute2-optional-ipv6.patch new file mode 100644 index 0000000000..c51f6955b2 --- /dev/null +++ b/package/iproute2/iproute2-optional-ipv6.patch @@ -0,0 +1,89 @@ +[PATCH] fix build on uClibc without IPv6 support + +Disable IPv6 support code when building with uClibc configured without IPv6 +support. + +[Gustavo: update for iproute2 3.10.0] +Signed-off-by: Peter Korsgaard +Signed-off-by: Gustavo Zacarias + +diff -Nura iproute2-3.10.0.orig/ip/ip6tunnel.c iproute2-3.10.0/ip/ip6tunnel.c +--- iproute2-3.10.0.orig/ip/ip6tunnel.c 2013-08-14 09:17:56.538089916 -0300 ++++ iproute2-3.10.0/ip/ip6tunnel.c 2013-08-14 09:18:02.952298534 -0300 +@@ -20,6 +20,10 @@ + * Masahide NAKAMURA @USAGI + */ + ++#include ++#if defined(__UCLIBC__) && !defined (__UCLIBC_HAS_IPV6__) ++#else ++ + #include + #include + #include +@@ -425,3 +429,5 @@ + fprintf(stderr, "Command \"%s\" is unknown, try \"ip -f inet6 tunnel help\".\n", *argv); + exit(-1); + } ++ ++#endif /* no ipv6 */ +diff -Nura iproute2-3.10.0.orig/ip/ipprefix.c iproute2-3.10.0/ip/ipprefix.c +--- iproute2-3.10.0.orig/ip/ipprefix.c 2013-08-14 09:17:56.539089949 -0300 ++++ iproute2-3.10.0/ip/ipprefix.c 2013-08-14 09:19:29.065099291 -0300 +@@ -23,11 +23,18 @@ + * Masahide NAKAMURA @USAGI + */ + ++#include ++#if defined(__UCLIBC__) && !defined (__UCLIBC_HAS_IPV6__) ++#define NO_IPV6 ++#endif ++ + #include + #include + #include + #include ++#ifndef NO_IPV6 + #include ++#endif + + #include "utils.h" + #include "ip_common.h" +@@ -65,10 +72,12 @@ + fprintf(stderr, "incorrect protocol family: %d\n", prefix->prefix_family); + return 0; + } ++#ifdef ND_OPT_PREFIX_INFORMATION + if (prefix->prefix_type != ND_OPT_PREFIX_INFORMATION) { + fprintf(stderr, "wrong ND type %d\n", prefix->prefix_type); + return 0; + } ++#endif + + parse_rtattr(tb, RTA_MAX, RTM_RTA(prefix), len); + +diff -Nura iproute2-3.10.0.orig/ip/iptunnel.c iproute2-3.10.0/ip/iptunnel.c +--- iproute2-3.10.0.orig/ip/iptunnel.c 2013-08-14 09:17:56.538089916 -0300 ++++ iproute2-3.10.0/ip/iptunnel.c 2013-08-14 09:18:02.953298566 -0300 +@@ -9,6 +9,10 @@ + * Authors: Alexey Kuznetsov, + * + */ ++#include ++#if defined(__UCLIBC__) && !defined (__UCLIBC_HAS_IPV6__) ++#define NO_IPV6 ++#endif + + #include + #include +@@ -634,8 +638,10 @@ + * protocol-independent because of unarranged structure between + * IPv4 and IPv6. + */ ++#ifndef NO_IPV6 + case AF_INET6: + return do_ip6tunnel(argc, argv); ++#endif + default: + fprintf(stderr, "Unsupported protocol family: %d\n", preferred_family); + exit(-1); diff --git a/package/iproute2/iproute2.mk b/package/iproute2/iproute2.mk index 3eadab4d5b..a63a096105 100644 --- a/package/iproute2/iproute2.mk +++ b/package/iproute2/iproute2.mk @@ -1,13 +1,16 @@ -############################################################# +################################################################################ # # iproute2 # -############################################################# +################################################################################ -IPROUTE2_VERSION = 2.6.37 -IPROUTE2_SOURCE = iproute2-$(IPROUTE2_VERSION).tar.bz2 -IPROUTE2_SITE = http://sources.buildroot.net +IPROUTE2_VERSION = 3.11.0 +IPROUTE2_SOURCE = iproute2-$(IPROUTE2_VERSION).tar.xz +IPROUTE2_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/net/iproute2 IPROUTE2_TARGET_SBINS = ctstat genl ifstat ip lnstat nstat routef routel rtacct rtmon rtpr rtstat ss tc +IPROUTE2_LICENSE = GPLv2 +IPROUTE2_LICENSE_FILES = COPYING +IPROUTE2_DEPENDENCIES += host-bison host-flex # If both iproute2 and busybox are selected, make certain we win # the fight over who gets to have their utils actually installed. @@ -23,24 +26,31 @@ define IPROUTE2_WITH_IPTABLES $(SED) "s/-DIPT/-DXT/" $(IPROUTE2_DIR)/tc/Makefile echo "TC_CONFIG_XT:=y" >>$(IPROUTE2_DIR)/Config endef +else +define IPROUTE2_WITH_IPTABLES + # em_ipset needs xtables, but configure misdetects it + echo "TC_CONFIG_IPSET:=n" >>$(IPROUTE2_DIR)/Config +endef endif define IPROUTE2_CONFIGURE_CMDS - # Use kernel headers - rm -r $(IPROUTE2_DIR)/include/netinet + $(SED) 's/gcc/$$CC $$CFLAGS/g' $(@D)/configure + cd $(@D) && $(TARGET_CONFIGURE_OPTS) ./configure # arpd needs berkeleydb $(SED) "/^TARGETS=/s: arpd : :" $(IPROUTE2_DIR)/misc/Makefile - $(SED) "s:-O2:$(TARGET_CFLAGS):" $(IPROUTE2_DIR)/Makefile + $(SED) 's/-Werror//' $(IPROUTE2_DIR)/Makefile echo "IPT_LIB_DIR:=/usr/lib/xtables" >>$(IPROUTE2_DIR)/Config $(IPROUTE2_WITH_IPTABLES) endef define IPROUTE2_BUILD_CMDS - $(MAKE) CC="$(TARGET_CC)" -C $(@D) + $(SED) 's/$$(CCOPTS)//' $(@D)/netem/Makefile + $(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" CCOPTS="$(TARGET_CFLAGS) -D_GNU_SOURCE" -C $(@D) endef define IPROUTE2_INSTALL_TARGET_CMDS - $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" SBINDIR=/sbin \ + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" \ + SBINDIR=/sbin \ DOCDIR=/usr/share/doc/iproute2-$(IPROUTE2_VERSION) \ MANDIR=/usr/share/man install # Wants bash @@ -55,4 +65,4 @@ define IPROUTE2_UNINSTALL_TARGET_CMDS rm -f $(addprefix $(TARGET_DIR)/sbin/, $(IPROUTE2_TARGET_SBINS)) endef -$(eval $(call GENTARGETS,package,iproute2)) +$(eval $(generic-package)) diff --git a/package/ipsec-tools/Config.in b/package/ipsec-tools/Config.in index 8a5f3d1e41..06a5a56ad6 100644 --- a/package/ipsec-tools/Config.in +++ b/package/ipsec-tools/Config.in @@ -2,7 +2,6 @@ config BR2_PACKAGE_IPSEC_TOOLS bool "ipsec-tools" select BR2_PACKAGE_OPENSSL select BR2_PACKAGE_FLEX - select BR2_PACKAGE_FLEX_LIBFL help This package is required to support IPSec for Linux 2.6+ @@ -10,7 +9,7 @@ if BR2_PACKAGE_IPSEC_TOOLS config BR2_PACKAGE_IPSEC_TOOLS_ADMINPORT default y - bool "Enable racoonctl(8)." + bool "Enable racoonctl(8)" help Lets racoon to listen to racoon admin port, which is to be contacted by racoonctl(8). @@ -28,18 +27,23 @@ config BR2_PACKAGE_IPSEC_TOOLS_NATT NAT-Traversal might infringe a patent. config BR2_PACKAGE_IPSEC_TOOLS_FRAG - bool "Enable IKE fragmentation." + bool "Enable IKE fragmentation" help Enable IKE fragmentation, which is a workaround for broken routers that drop fragmented packets +config BR2_PACKAGE_IPSEC_TOOLS_DPD + bool "Enable DPD (Dead Peer Detection)" + help + Enable dead peer detection support + config BR2_PACKAGE_IPSEC_TOOLS_STATS default y - bool "Enable statistics logging function." + bool "Enable statistics logging function" config BR2_PACKAGE_IPSEC_TOOLS_READLINE select BR2_PACKAGE_READLINE - bool "Enable readline input support if available." + bool "Enable readline input support" choice prompt "Security context" diff --git a/package/ipsec-tools/ipsec-tools.mk b/package/ipsec-tools/ipsec-tools.mk index 0861a05bf1..8eeef1b6c6 100644 --- a/package/ipsec-tools/ipsec-tools.mk +++ b/package/ipsec-tools/ipsec-tools.mk @@ -1,12 +1,12 @@ -############################################################# +################################################################################ # # ipsec-tools # -############################################################# +################################################################################ -IPSEC_TOOLS_VERSION = 0.7.3 +IPSEC_TOOLS_VERSION = 0.8.0 IPSEC_TOOLS_SOURCE = ipsec-tools-$(IPSEC_TOOLS_VERSION).tar.bz2 -IPSEC_TOOLS_SITE = http://ftp.sunet.se/pub/NetBSD/misc/ipsec-tools/0.7/ +IPSEC_TOOLS_SITE = http://ftp.sunet.se/pub/NetBSD/misc/ipsec-tools/0.8/ IPSEC_TOOLS_INSTALL_STAGING = YES IPSEC_TOOLS_MAKE = $(MAKE1) IPSEC_TOOLS_DEPENDENCIES = openssl flex host-flex @@ -21,49 +21,49 @@ IPSEC_TOOLS_CONF_OPT = \ --with-kernel-headers=$(STAGING_DIR)/usr/include ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_ADMINPORT), y) -IPSEC_TOOLS_CONF_OPT+= --enable-adminport +IPSEC_TOOLS_CONF_OPT += --enable-adminport else -IPSEC_TOOLS_CONF_OPT+= --disable-adminport +IPSEC_TOOLS_CONF_OPT += --disable-adminport endif ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_NATT), y) -IPSEC_TOOLS_CONF_OPT+= --enable-natt +IPSEC_TOOLS_CONF_OPT += --enable-natt else -IPSEC_TOOLS_CONF_OPT+= --disable-natt +IPSEC_TOOLS_CONF_OPT += --disable-natt endif ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_FRAG), y) -IPSEC_TOOLS_CONF_OPT+= --enable-frag +IPSEC_TOOLS_CONF_OPT += --enable-frag else -IPSEC_TOOLS_CONF_OPT+= --disable-frag +IPSEC_TOOLS_CONF_OPT += --disable-frag endif -ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_STATS), y) -IPSEC_TOOLS_CONF_OPT+= --enable-stats +ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_DPD), y) +IPSEC_TOOLS_CONF_OPT += --enable-dpd else -IPSEC_TOOLS_CONF_OPT+= --disable-stats +IPSEC_TOOLS_CONF_OPT += --disable-dpd endif -ifeq ($(BR2_INET_IPV6),y) -IPSEC_TOOLS_CONF_OPT+= --enable-ipv6 +ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_STATS), y) +IPSEC_TOOLS_CONF_OPT += --enable-stats else -IPSEC_TOOLS_CONF_OPT+= --disable-ipv6 +IPSEC_TOOLS_CONF_OPT += --disable-stats endif ifneq ($(BR2_PACKAGE_IPSEC_TOOLS_READLINE), y) -IPSEC_TOOLS_CONF_OPT+= --without-readline +IPSEC_TOOLS_CONF_OPT += --without-readline else IPSEC_DEPENDENCIES += readline endif ifeq ($(BR2_PACKAGE_IPSEC_SECCTX_DISABLE),y) -IPSEC_TOOLS_CONF_OPT+= --enable-security-context=no +IPSEC_TOOLS_CONF_OPT += --enable-security-context=no endif ifeq ($(BR2_PACKAGE_IPSEC_SECCTX_ENABLE),y) -IPSEC_TOOLS_CONF_OPT+= --enable-security-context=yes +IPSEC_TOOLS_CONF_OPT += --enable-security-context=yes endif ifeq ($(BR2_PACKAGE_IPSEC_SECCTX_KERNEL),y) -IPSEC_TOOLS_CONF_OPT+= --enable-security-context=kernel +IPSEC_TOOLS_CONF_OPT += --enable-security-context=kernel endif -$(eval $(call AUTOTARGETS,package,ipsec-tools)) +$(eval $(autotools-package)) diff --git a/package/ipset/Config.in b/package/ipset/Config.in new file mode 100644 index 0000000000..94832d3d3e --- /dev/null +++ b/package/ipset/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_IPSET + bool "ipset" + depends on BR2_LARGEFILE + select BR2_PACKAGE_LIBMNL + help + Utility to manage IP sets in the linux kernel. + Requires a patched kernel or version >=2.6.39. + + http://ipset.netfilter.org/ + +comment "ipset needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE diff --git a/package/ipset/ipset.mk b/package/ipset/ipset.mk new file mode 100644 index 0000000000..b075a53e4f --- /dev/null +++ b/package/ipset/ipset.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# ipset +# +################################################################################ + +IPSET_VERSION = 6.20.1 +IPSET_SOURCE = ipset-$(IPSET_VERSION).tar.bz2 +IPSET_SITE = http://ipset.netfilter.org +IPSET_DEPENDENCIES = libmnl host-pkgconf +IPSET_CONF_OPT = --with-kmod=no +IPSET_AUTORECONF = YES +IPSET_LICENSE = GPLv2 +IPSET_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/iptables/Config.in b/package/iptables/Config.in index da5a832a2f..8c4e989fcc 100644 --- a/package/iptables/Config.in +++ b/package/iptables/Config.in @@ -1,10 +1,6 @@ config BR2_PACKAGE_IPTABLES bool "iptables" - depends on BR2_LARGEFILE help Linux kernel (2.4+) firewall, NAT, and packet mangling tools. http://www.iptables.org/ - -comment "iptables requires a toolchain with LARGEFILE support" - depends on !BR2_LARGEFILE diff --git a/package/iptables/iptables-01-fix-static-link.patch b/package/iptables/iptables-01-fix-static-link.patch new file mode 100644 index 0000000000..d4bcfa6078 --- /dev/null +++ b/package/iptables/iptables-01-fix-static-link.patch @@ -0,0 +1,67 @@ +From 76e230e41947576efb96e86e605bb84015cdb287 Mon Sep 17 00:00:00 2001 +From: Jan Engelhardt +Date: Tue, 13 Aug 2013 19:02:06 +0000 +Subject: iptables: link against libnetfilter_conntrack + +Linking currently fails in --enable-static case: + +../extensions/libext.a(libxt_connlabel.o): In function `connlabel_get_name': +iptables/extensions/libxt_connlabel.c:57: undefined reference to `nfct_labelmap_get_name' +[..] +It's libxtables.la(libxt_connlabel.o) using libnetfilter_conntrack. + +If libnetfilter_conntrack is not found, @libnetfilter_conntrack_CFLAGS@ +and @libnetfilter_conntrack_LIBS@ (and their ${} ones) should be empty, +therefore producing no harm to include unconditionally. + +Reported-and-tested-by: Gustavo Zacarias +Signed-off-by: Florian Westphal +--- +diff --git a/extensions/GNUmakefile.in b/extensions/GNUmakefile.in +index 14e7c57..780e715 100644 +--- a/extensions/GNUmakefile.in ++++ b/extensions/GNUmakefile.in +@@ -21,7 +21,7 @@ regular_CPPFLAGS = @regular_CPPFLAGS@ + kinclude_CPPFLAGS = @kinclude_CPPFLAGS@ + + AM_CFLAGS = ${regular_CFLAGS} +-AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_builddir} -I${top_srcdir}/include ${kinclude_CPPFLAGS} ++AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_builddir} -I${top_srcdir}/include ${kinclude_CPPFLAGS} @libnetfilter_conntrack_CFLAGS@ + AM_DEPFLAGS = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@ + AM_LDFLAGS = @noundef_LDFLAGS@ + +@@ -93,7 +93,7 @@ lib%.so: lib%.oo + ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $< -L../libxtables/.libs -lxtables ${$*_LIBADD}; + + lib%.oo: ${srcdir}/lib%.c +- ${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=lib$*_init -DPIC -fPIC ${CFLAGS} ${$*_CFLAGADD} -o $@ -c $<; ++ ${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=lib$*_init -DPIC -fPIC ${CFLAGS} -o $@ -c $<; + + libxt_NOTRACK.so: libxt_CT.so + ln -fs $< $@ +@@ -103,9 +103,7 @@ libxt_state.so: libxt_conntrack.so + # Need the LIBADDs in iptables/Makefile.am too for libxtables_la_LIBADD + xt_RATEEST_LIBADD = -lm + xt_statistic_LIBADD = -lm +-@HAVE_LIBNETFILTER_CONNTRACK_TRUE@xt_connlabel_LIBADD = @libnetfilter_conntrack_LIBS@ +- +-@HAVE_LIBNETFILTER_CONNTRACK_TRUE@xt_connlabel_CFLAGADD = @libnetfilter_conntrack_CFLAGS@ ++xt_connlabel_LIBADD = @libnetfilter_conntrack_LIBS@ + + # + # Static bits +diff --git a/libxtables/Makefile.am b/libxtables/Makefile.am +index c5795fe..4267cb5 100644 +--- a/libxtables/Makefile.am ++++ b/libxtables/Makefile.am +@@ -10,7 +10,7 @@ libxtables_la_LIBADD = + if ENABLE_STATIC + # With --enable-static, shipped extensions are linked into the main executable, + # so we need all the LIBADDs here too +-libxtables_la_LIBADD += -lm ++libxtables_la_LIBADD += -lm ${libnetfilter_conntrack_LIBS} + endif + if ENABLE_SHARED + libxtables_la_CFLAGS = ${AM_CFLAGS} +-- +cgit v0.9.2 diff --git a/package/iptables/iptables-02-iptables-ip-6-tables-save.c-remove-dlfcn.h-include.patch b/package/iptables/iptables-02-iptables-ip-6-tables-save.c-remove-dlfcn.h-include.patch new file mode 100644 index 0000000000..1cdc6c0af2 --- /dev/null +++ b/package/iptables/iptables-02-iptables-ip-6-tables-save.c-remove-dlfcn.h-include.patch @@ -0,0 +1,47 @@ +From 2efdcf332a40431c6584970bb0c68712d14d409b Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Wed, 27 Nov 2013 10:18:11 -0300 +Subject: [PATCH] iptables/ip(6)tables-save.c: remove dlfcn.h include + +It's not required and breaks on static-only uClibc builds which don't +have the header file. + +Signed-off-by: Gustavo Zacarias +--- + iptables/ip6tables-save.c | 4 ---- + iptables/iptables-save.c | 4 ---- + 2 files changed, 8 deletions(-) + +diff --git a/iptables/ip6tables-save.c b/iptables/ip6tables-save.c +index d819b30..a86a64a 100644 +--- a/iptables/ip6tables-save.c ++++ b/iptables/ip6tables-save.c +@@ -18,10 +18,6 @@ + #include "ip6tables.h" + #include "ip6tables-multi.h" + +-#ifndef NO_SHARED_LIBS +-#include +-#endif +- + static int show_counters = 0; + + static const struct option options[] = { +diff --git a/iptables/iptables-save.c b/iptables/iptables-save.c +index e599fce..2999c7f 100644 +--- a/iptables/iptables-save.c ++++ b/iptables/iptables-save.c +@@ -17,10 +17,6 @@ + #include "iptables.h" + #include "iptables-multi.h" + +-#ifndef NO_SHARED_LIBS +-#include +-#endif +- + static int show_counters = 0; + + static const struct option options[] = { +-- +1.8.3.2 + diff --git a/package/iptables/iptables.mk b/package/iptables/iptables.mk index 8652de434e..65470691a0 100644 --- a/package/iptables/iptables.mk +++ b/package/iptables/iptables.mk @@ -1,28 +1,41 @@ -############################################################# +################################################################################ # # iptables # -############################################################# +################################################################################ -IPTABLES_VERSION = 1.4.10 +IPTABLES_VERSION = 1.4.20 IPTABLES_SOURCE = iptables-$(IPTABLES_VERSION).tar.bz2 IPTABLES_SITE = http://ftp.netfilter.org/pub/iptables IPTABLES_INSTALL_STAGING = YES +IPTABLES_DEPENDENCIES = host-pkgconf \ + $(if $(BR2_PACKAGE_LIBNETFILTER_CONNTRACK),libnetfilter_conntrack) +IPTABLES_LICENSE = GPLv2 +IPTABLES_LICENSE_FILES = COPYING +IPTABLES_CONF_OPT = --libexecdir=/usr/lib --with-kernel=$(STAGING_DIR)/usr +# Because of iptables-01-fix-static-link.patch IPTABLES_AUTORECONF = YES -IPTABLES_DEPENDENCIES = host-pkg-config -IPTABLES_CONF_OPT = --libexecdir=/usr/lib --with-kernel=$(LINUX_HEADERS_DIR) +# For connlabel match +ifeq ($(BR2_PACKAGE_LIBNETFILTER_CONNTRACK),y) +IPTABLES_DEPENDENCIES += libnetfilter_conntrack +endif + +# For nfnl_osf +ifeq ($(BR2_PACKAGE_LIBNFNETLINK),y) +IPTABLES_DEPENDENCIES += libnfnetlink +endif define IPTABLES_TARGET_SYMLINK_CREATE - ln -sf iptables-multi $(TARGET_DIR)/usr/sbin/iptables - ln -sf iptables-multi $(TARGET_DIR)/usr/sbin/iptables-save - ln -sf iptables-multi $(TARGET_DIR)/usr/sbin/iptables-restore + ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/iptables + ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/iptables-save + ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/iptables-restore endef define IPTABLES_TARGET_IPV6_SYMLINK_CREATE - ln -sf ip6tables-multi $(TARGET_DIR)/usr/sbin/ip6tables - ln -sf ip6tables-multi $(TARGET_DIR)/usr/sbin/ip6tables-save - ln -sf ip6tables-multi $(TARGET_DIR)/usr/sbin/ip6tables-restore + ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/ip6tables + ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/ip6tables-save + ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/ip6tables-restore endef define IPTABLES_TARGET_IPV6_REMOVE @@ -40,7 +53,8 @@ endif define IPTABLES_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/bin/iptables-xml rm -f $(TARGET_DIR)/usr/sbin/iptables* $(TARGET_DIR)/usr/sbin/ip6tables* + rm -f $(TARGET_DIR)/usr/sbin/xtables-multi rm -rf $(TARGET_DIR)/usr/lib/xtables endef -$(eval $(call AUTOTARGETS,package,iptables)) +$(eval $(autotools-package)) diff --git a/package/iputils/Config.in b/package/iputils/Config.in new file mode 100644 index 0000000000..d4d282949f --- /dev/null +++ b/package/iputils/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_IPUTILS + bool "iputils" + select BR2_OPENSSL if BR2_INET_IPV6 + depends on BR2_USE_MMU # fork() + help + This package is set of small useful utilities for Linux networking. + It includes complete versions of ping, traceroute, etc. + + http://sourceforge.net/projects/iputils/ diff --git a/package/iputils/iputils.mk b/package/iputils/iputils.mk new file mode 100644 index 0000000000..33665f60a3 --- /dev/null +++ b/package/iputils/iputils.mk @@ -0,0 +1,53 @@ +################################################################################ +# +# iputils +# +################################################################################ + +IPUTILS_VERSION = s20121011 +IPUTILS_SITE = http://www.skbuff.net/iputils/ +IPUTILS_SOURCE = iputils-$(IPUTILS_VERSION).tar.bz2 +IPUTILS_LICENSE = GPLv2+ BSD-3c +# Only includes a license file for BSD +IPUTILS_LICENSE_FILES = ninfod/COPYING + +# Build after busybox so target ends up with this package's full +# versions of the applications instead of busybox applets. +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +IPUTILS_DEPENDENCIES += busybox +endif + +# Disabling CAP_SETPCAP (file capabilities) +IPUTILS_MAKE_OPT = $(TARGET_CONFIGURE_OPTS) USE_CAP=no USE_SYSFS=no\ + CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" \ + arping clockdiff ping rarpd rdisc tftpd tracepath + +ifeq ($(BR2_INET_IPV6),y) +# To support md5 for ping6 +IPUTILS_DEPENDENCIES += openssl + +IPUTILS_MAKE_OPT += ping6 tracepath6 traceroute6 + +define IPUTILS_IPV6_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/ping6 $(TARGET_DIR)/bin/ping6 + $(INSTALL) -D -m 755 $(@D)/tracepath6 $(TARGET_DIR)/bin/tracepath6 + $(INSTALL) -D -m 755 $(@D)/traceroute6 $(TARGET_DIR)/bin/traceroute6 +endef +endif + +define IPUTILS_BUILD_CMDS + $(MAKE) -C $(@D) $(IPUTILS_MAKE_OPT) +endef + +define IPUTILS_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/arping $(TARGET_DIR)/sbin/arping + $(INSTALL) -D -m 755 $(@D)/clockdiff $(TARGET_DIR)/bin/clockdiff + $(INSTALL) -D -m 755 $(@D)/ping $(TARGET_DIR)/bin/ping + $(INSTALL) -D -m 755 $(@D)/rarpd $(TARGET_DIR)/sbin/rarpd + $(INSTALL) -D -m 755 $(@D)/rdisc $(TARGET_DIR)/sbin/rdisc + $(INSTALL) -D -m 755 $(@D)/tftpd $(TARGET_DIR)/usr/sbin/in.tftpd + $(INSTALL) -D -m 755 $(@D)/tracepath $(TARGET_DIR)/bin/tracepath + $(IPUTILS_IPV6_INSTALL_TARGET_CMDS) +endef + +$(eval $(generic-package)) diff --git a/package/irda-utils/irda-utils.mk b/package/irda-utils/irda-utils.mk index e1935c68bd..ebbe64e8fc 100644 --- a/package/irda-utils/irda-utils.mk +++ b/package/irda-utils/irda-utils.mk @@ -1,12 +1,11 @@ -############################################################# +################################################################################ # # irda-utils # -############################################################# +################################################################################ IRDA_UTILS_VERSION = 0.9.18 -IRDA_UTILS_SOURCE = irda-utils-$(IRDA_UTILS_VERSION).tar.gz -IRDA_UTILS_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/irda +IRDA_UTILS_SITE = http://downloads.sourceforge.net/project/irda/irda-utils/$(IRDA_UTILS_VERSION) IRDA_UTILS_CFLAGS = $(TARGET_CFLAGS) -I. ifeq ($(BR2_USE_MMU),) @@ -43,4 +42,4 @@ define IRDA_UTILS_UNINSTALL_TARGET_CMDS rm -f $(addprefix $(TARGET_DIR)/usr/sbin/,$(IRDA_UTILS_SBINS-)) endef -$(eval $(call GENTARGETS,package,irda-utils)) +$(eval $(generic-package)) diff --git a/package/iw/Config.in b/package/iw/Config.in index 81584e7814..fd73b20992 100644 --- a/package/iw/Config.in +++ b/package/iw/Config.in @@ -1,7 +1,11 @@ config BR2_PACKAGE_IW bool "iw" + depends on BR2_TOOLCHAIN_HAS_THREADS # libnl select BR2_PACKAGE_LIBNL help Utility for wireless devices using the mac80211 kernel stack http://wireless.kernel.org/en/users/Documentation/iw + +comment "iw needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/iw/iw-libnl-30-support.patch b/package/iw/iw-libnl-30-support.patch deleted file mode 100644 index 48a179fb28..0000000000 --- a/package/iw/iw-libnl-30-support.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- - Makefile | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -Index: b/Makefile -=================================================================== ---- a/Makefile -+++ b/Makefile -@@ -24,6 +24,7 @@ - - NL1FOUND := $(shell $(PKG_CONFIG) --atleast-version=1 libnl-1 && echo Y) - NL2FOUND := $(shell $(PKG_CONFIG) --atleast-version=2 libnl-2.0 && echo Y) -+NL3FOUND := $(shell $(PKG_CONFIG) --atleast-version=3 libnl-3.0 && echo Y) - - ifeq ($(NL1FOUND),Y) - NLLIBNAME = libnl-1 -@@ -35,6 +36,12 @@ - NLLIBNAME = libnl-2.0 - endif - -+ifeq ($(NL3FOUND),Y) -+CFLAGS += -DCONFIG_LIBNL20 -+LIBS += -lnl-genl -+NLLIBNAME = libnl-3.0 -+endif -+ - ifeq ($(NLLIBNAME),) - $(error Cannot find development files for any supported version of libnl) - endif -@@ -53,6 +60,8 @@ - all: version_check $(ALL) - - version_check: -+ifeq ($(NL3FOUND),Y) -+else - ifeq ($(NL2FOUND),Y) - else - ifeq ($(NL1FOUND),Y) -@@ -60,6 +69,7 @@ - $(error No libnl found) - endif - endif -+endif - - - VERSION_OBJS := $(filter-out version.o, $(OBJS)) - diff --git a/package/iw/iw.mk b/package/iw/iw.mk index 0f5dd0e5cd..c82e398d0c 100644 --- a/package/iw/iw.mk +++ b/package/iw/iw.mk @@ -1,26 +1,27 @@ -############################################################# +################################################################################ # # iw # -############################################################# +################################################################################ -IW_VERSION = 0.9.22 -IW_SOURCE = iw-$(IW_VERSION).tar.bz2 -IW_SITE = http://wireless.kernel.org/download/iw -IW_DEPENDENCIES = host-pkg-config libnl -IW_CONFIG = $(IW_DIR)/.config -IW_MAKE_ENV = PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \ - PKG_CONFIG="$(HOST_DIR)/usr/bin/pkg-config" \ +IW_VERSION = 3.11 +IW_SOURCE = iw-$(IW_VERSION).tar.xz +IW_SITE = $(BR2_KERNEL_MIRROR)/software/network/iw +IW_LICENSE = iw license +IW_LICENSE_FILES = COPYING +IW_DEPENDENCIES = host-pkgconf libnl +IW_MAKE_OPT = CC="$(TARGET_CC)" LD="$(TARGET_LD)" LDFLAGS="$(TARGET_LDFLAGS)" +IW_MAKE_ENV = PKG_CONFIG="$(HOST_DIR)/usr/bin/pkg-config" \ GIT_DIR=$(IW_DIR) -define IW_CONFIGURE_CMDS - echo "CC = $(TARGET_CC)" >$(IW_CONFIG) - echo "CFLAGS = $(TARGET_CFLAGS)" >>$(IW_CONFIG) - echo "LDFLAGS = $(TARGET_LDFLAGS)" >>$(IW_CONFIG) -endef +ifeq ($(BR2_PREFER_STATIC_LIB),y) +# libnl needs pthread/m, so we need to explicitly with them when static +# these need to added AFTER libnl, so we have to override LIBS completely +IW_MAKE_OPT += LIBS='-lnl-genl-3 -lnl-3 -lpthread -lm' +endif define IW_BUILD_CMDS - $(IW_MAKE_ENV) $(MAKE) -C $(@D) + $(IW_MAKE_ENV) $(MAKE) $(IW_MAKE_OPT) -C $(@D) endef define IW_INSTALL_TARGET_CMDS @@ -32,4 +33,4 @@ define IW_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/share/man/man8/iw.8* endef -$(eval $(call GENTARGETS,package,iw)) +$(eval $(generic-package)) diff --git a/package/jamvm/Config.in b/package/jamvm/Config.in new file mode 100644 index 0000000000..dbd0fbbd3e --- /dev/null +++ b/package/jamvm/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_JAMVM + bool "jamvm" + depends on BR2_INET_IPV6 + depends on BR2_arm || BR2_armeb || BR2_i386 \ + || BR2_mipsel || BR2_powerpc || BR2_x86_64 + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_CLASSPATH + help + JamVM is a new Java Virtual Machine which conforms to the + JVM specification version 2 (blue book). + + http://jamvm.sf.net + +comment "jamvm needs a toolchain w/ IPv6" + depends on BR2_arm || BR2_armeb || BR2_i386 \ + || BR2_mipsel || BR2_powerpc || BR2_x86_64 + depends on !BR2_INET_IPV6 diff --git a/package/jamvm/jamvm.mk b/package/jamvm/jamvm.mk new file mode 100644 index 0000000000..53455c48a0 --- /dev/null +++ b/package/jamvm/jamvm.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# jamvm +# +################################################################################ + +JAMVM_VERSION = 1.5.4 +JAMVM_SITE = http://downloads.sourceforge.net/project/jamvm/jamvm/JamVM%20$(JAMVM_VERSION) +JAMVM_LICENSE = GPLv2+ +JAMVM_LICENSE_FILES = COPYING +JAMVM_DEPENDENCIES = zlib classpath +# int inlining seems to crash jamvm, don't build shared version of internal lib +JAMVM_CONF_OPT = \ + --with-classpath-install-dir=/usr \ + --disable-int-inlining \ + --disable-shared \ + --without-pic + +# jamvm has ARM assembly code that cannot be compiled in Thumb2 mode, +# so we must force traditional ARM mode. +ifeq ($(BR2_arm),y) +JAMVM_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -marm" +endif + +$(eval $(autotools-package)) diff --git a/package/jansson/Config.in b/package/jansson/Config.in new file mode 100644 index 0000000000..960a7c4c38 --- /dev/null +++ b/package/jansson/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_JANSSON + bool "jansson" + help + Jansson is a C library for encoding, decoding and manipulating JSON + data. + + http://www.digip.org/jansson/ diff --git a/package/jansson/jansson.mk b/package/jansson/jansson.mk new file mode 100644 index 0000000000..bb3240f17a --- /dev/null +++ b/package/jansson/jansson.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# jansson +# +################################################################################ + +JANSSON_VERSION = 2.5 +JANSSON_SITE = http://www.digip.org/jansson/releases +JANSSON_LICENSE = MIT +JANSSON_LICENSE_FILES = LICENSE +JANSSON_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/java/Config.in b/package/java/Config.in deleted file mode 100644 index 3f17f91adf..0000000000 --- a/package/java/Config.in +++ /dev/null @@ -1,5 +0,0 @@ -menu "Java" -source "package/java/classpath/Config.in" -source "package/java/jamvm/Config.in" -source "package/java/concierge/Config.in" -endmenu diff --git a/package/java/classpath/Config.in b/package/java/classpath/Config.in deleted file mode 100644 index 5677f8c327..0000000000 --- a/package/java/classpath/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_CLASSPATH - bool "classpath" - help - GNU Classpath, Essential Libraries for Java, is a GNU - project to create free core class libraries for use with - virtual machines and compilers for the java programming - language. - - http://www.classpath.org/ diff --git a/package/java/classpath/classpath.mk b/package/java/classpath/classpath.mk deleted file mode 100644 index 338cf016b9..0000000000 --- a/package/java/classpath/classpath.mk +++ /dev/null @@ -1,87 +0,0 @@ -############################################################# -# -# classpath 0.96.1 -# -############################################################# -CLASSPATH_VERSION = 0.98 -CLASSPATH_SOURCE = classpath-$(CLASSPATH_VERSION).tar.gz -CLASSPATH_SITE = $(BR2_GNU_MIRROR)/classpath -CLASSPATH_AUTORECONF = NO -CLASSPATH_INSTALL_STAGING = YES -CLASSPATH_INSTALL_TARGET = YES -CLASSPATH_DIR_PREFIX = package/java - -CLASSPATH_CONF_ENV = ac_cv_func_posix_getpwuid_r=yes glib_cv_stack_grows=no \ - glib_cv_uscore=no ac_cv_func_strtod=yes \ - ac_fsusage_space=yes fu_cv_sys_stat_statfs2_bsize=yes \ - ac_cv_func_closedir_void=no ac_cv_func_getloadavg=no \ - ac_cv_lib_util_getloadavg=no ac_cv_lib_getloadavg_getloadavg=no \ - ac_cv_func_getgroups=yes ac_cv_func_getgroups_works=yes \ - ac_cv_func_chown_works=yes ac_cv_have_decl_euidaccess=no \ - ac_cv_func_euidaccess=no ac_cv_have_decl_strnlen=yes \ - ac_cv_func_strnlen_working=yes ac_cv_func_lstat_dereferences_slashed_symlink=yes \ - ac_cv_func_lstat_empty_string_bug=no ac_cv_func_stat_empty_string_bug=no \ - vb_cv_func_rename_trailing_slash_bug=no ac_cv_have_decl_nanosleep=yes \ - jm_cv_func_nanosleep_works=yes gl_cv_func_working_utimes=yes \ - ac_cv_func_utime_null=yes ac_cv_have_decl_strerror_r=yes \ - ac_cv_func_strerror_r_char_p=no jm_cv_func_svid_putenv=yes \ - ac_cv_func_getcwd_null=yes ac_cv_func_getdelim=yes \ - ac_cv_func_mkstemp=yes utils_cv_func_mkstemp_limitations=no \ - utils_cv_func_mkdir_trailing_slash_bug=no \ - jm_cv_func_gettimeofday_clobber=no \ - gl_cv_func_working_readdir=yes jm_ac_cv_func_link_follows_symlink=no \ - utils_cv_localtime_cache=no ac_cv_struct_st_mtim_nsec=no \ - gl_cv_func_tzset_clobber=no gl_cv_func_getcwd_null=yes \ - gl_cv_func_getcwd_path_max=yes ac_cv_func_fnmatch_gnu=yes \ - am_getline_needs_run_time_check=no am_cv_func_working_getline=yes \ - gl_cv_func_mkdir_trailing_slash_bug=no gl_cv_func_mkstemp_limitations=no \ - ac_cv_func_working_mktime=yes jm_cv_func_working_re_compile_pattern=yes \ - ac_use_included_regex=no gl_cv_c_restrict=no \ - ac_cv_path_GLIB_GENMARSHAL=$(LIBGLIB2_HOST_BINARY) \ - ac_cv_prog_F77=no ac_cv_prog_CXX=no ac_cv_path_CUPS_CONFIG=no - - -CLASSPATH_CONF_OPT = \ - --libexecdir=/usr/lib --localstatedir=/var --mandir=/usr/man \ - --infodir=/usr/info --enable-shared \ - --enable-static \ - --disable-glibtest --enable-explicit-deps=no \ - --disable-debug \ - --disable-gconf-peer --disable-examples --disable-plugin \ - --disable-Werror - -CLASSPATH_DEPENDENCIES = host-pkg-config libpng jpeg - -ifeq ($(BR2_PACKAGE_ALSA_LIB),y) - CLASSPATH_DEPENDENCIES+= alsa-lib - CLASSPATH_CONF_OPT+= --enable-alsa -else - CLASSPATH_CONF_OPT+= --disable-alsa -endif - -ifeq ($(BR2_PACKAGE_QT),y) - CLASSPATH_DEPENDENCIES+= qt - CLASSPATH_CONF_OPT+= --enable-qt-peer -else - CLASSPATH_CONF_OPT+= --disable-qt-peer -endif - -ifeq ($(BR2_PACKAGE_LIBGTK2),y) - CLASSPATH_DEPENDENCIES+= libgtk2 - CLASSPATH_CONF_OPT+= --enable-gtk-peer -else - CLASSPATH_CONF_OPT+= --disable-gtk-peer -endif - -ifeq ($(BR2_PACKAGE_XORG7),y) - CLASSPATH_DEPENDENCIES+= xserver_xorg-server - CLASSPATH_CONF_OPT+= --with-x \ - --x-includes=$(STAGING_DIR)/usr/include/X11 \ - --x-libraries=$(STAGING_DIR)/usr/lib -else - CLASSPATH_CONF_OPT+= --without-x -endif - - - -$(eval $(call AUTOTARGETS,package/java,classpath)) diff --git a/package/java/concierge/Config.in b/package/java/concierge/Config.in deleted file mode 100644 index b099b3a59e..0000000000 --- a/package/java/concierge/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_CONCIERGE - bool "concierge" - depends on BR2_PACKAGE_JAMVM - - help - Concierge is an optimized OSGi R3 framework implementations - with a file footprint of about 80 kBytes. This makes it - ideal for mobile or embedded devices. - - http://concierge.sourceforge.net/ diff --git a/package/java/concierge/concierge.mk b/package/java/concierge/concierge.mk deleted file mode 100644 index 8a40eb8451..0000000000 --- a/package/java/concierge/concierge.mk +++ /dev/null @@ -1,40 +0,0 @@ -############################################################# -# -# concierge 1.0-RC2 -# -############################################################# -CONCIERGE_VERSION = 1.0_RC2 -CONCIERGE_SOURCE = concierge-$(CONCIERGE_VERSION).jar -CONCIERGE_SITE = http://ovh.dl.sourceforge.net/sourceforge/concierge/ -CONCIERGE_DIR=$(BUILD_DIR)/concierge-$(CONCIERGE_VERSION) -CONCIERGE_SITE_BUNDLES = http://concierge.sourceforge.net/bundles/ - -$(DL_DIR)/concierge: - mkdir -p $(DL_DIR)/concierge/ - $(call DOWNLOAD,$(CONCIERGE_SITE),concierge-$(CONCIERGE_VERSION).jar) - $(call DOWNLOAD,$(CONCIERGE_SITE_BUNDLES)shell-1.0.0.RC2.jar) - $(call DOWNLOAD,$(CONCIERGE_SITE_BUNDLES)service-tracker-1.0.0.RC2.jar) - $(call DOWNLOAD,$(CONCIERGE_SITE_BUNDLES)event-admin-1.0.0.RC2.jar) - -$(TARGET_DIR)/usr/lib/concierge/: $(DL_DIR)/concierge - mkdir -p $(TARGET_DIR)/usr/lib - mkdir -p $(TARGET_DIR)/usr/lib/concierge - cp -dpf $(DL_DIR)/concierge/* $(TARGET_DIR)/usr/lib/concierge/ - cp -dpf package/java/concierge/files/init.xargs $(TARGET_DIR)/usr/lib/concierge/ - touch -c $@ - -$(TARGET_DIR)/usr/bin/concierge: - cp -dpf package/java/concierge/files/concierge $(TARGET_DIR)/usr/bin/ - chmod +x $(TARGET_DIR)/usr/bin/concierge - touch -c $@ - -concierge: $(TARGET_DIR)/usr/lib/concierge $(TARGET_DIR)/usr/bin/concierge - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_CONCIERGE),y) -TARGETS+=concierge -endif diff --git a/package/java/concierge/files/concierge b/package/java/concierge/files/concierge deleted file mode 100644 index c463753f25..0000000000 --- a/package/java/concierge/files/concierge +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -/usr/bin/jamvm -jar /usr/lib/concierge/concierge-1.0_RC2.jar diff --git a/package/java/concierge/files/init.xargs b/package/java/concierge/files/init.xargs deleted file mode 100644 index 7848721ce6..0000000000 --- a/package/java/concierge/files/init.xargs +++ /dev/null @@ -1,10 +0,0 @@ --init --all --Dch.ethz.iks.concierge.debug=true --Dch.ethz.iks.concierge.log.enabled=true --Dch.ethz.iks.concierge.log.level=4 - - -#-istart shell-1.0.0.RC2.jar -#-istart service-tracker-1.0.0.RC2.jar -#-istart event-admin-1.0.0.RC2.jar diff --git a/package/java/jamvm/Config.in b/package/java/jamvm/Config.in deleted file mode 100644 index 59ac593aae..0000000000 --- a/package/java/jamvm/Config.in +++ /dev/null @@ -1,8 +0,0 @@ -config BR2_PACKAGE_JAMVM - bool "jamvm" - depends on BR2_PACKAGE_CLASSPATH - help - JamVM is a new Java Virtual Machine which conforms to - the JVM specification version 2 (blue book). - - http://jamvm.sourceforge.net/ diff --git a/package/java/jamvm/jamvm-1.5.0.patch.avr32 b/package/java/jamvm/jamvm-1.5.0.patch.avr32 deleted file mode 100644 index 27c905ecdb..0000000000 --- a/package/java/jamvm/jamvm-1.5.0.patch.avr32 +++ /dev/null @@ -1,1473 +0,0 @@ -diff -urpN jamvm-1.5.0/configure jamvm-1.5.0-avr32/configure ---- jamvm-1.5.0/configure 2007-10-29 06:37:06.000000000 +0100 -+++ jamvm-1.5.0-avr32/configure 2008-02-08 09:20:37.000000000 +0100 -@@ -2550,6 +2550,7 @@ i386-*-openbsd*) host_os=bsd libdl_neede - i386-*-freebsd*) host_os=bsd libdl_needed=no ;; - x86_64-*-linux*) host_os=linux ;; - hppa*-*-linux*) host_cpu=parisc host_os=linux ;; -+avr32*-*-linux*) host_cpu=avr32 host_os=linux ;; - mipsel-*-linux*) host_cpu=mips host_os=linux ;; - amd64-*-openbsd*) host_os=bsd libdl_needed=no ;; - amd64-*-freebsd*) host_os=bsd libdl_needed=no ;; -@@ -22839,7 +22840,7 @@ fi - ac_config_links="$ac_config_links src/arch.h:src/arch/$arch.h" - - --ac_config_files="$ac_config_files Makefile src/Makefile src/interp/Makefile src/interp/engine/Makefile src/arch/Makefile src/os/Makefile src/os/linux/Makefile src/os/darwin/Makefile src/os/bsd/Makefile src/os/linux/powerpc/Makefile src/os/linux/arm/Makefile src/os/linux/i386/Makefile src/os/linux/x86_64/Makefile src/os/linux/parisc/Makefile src/os/linux/mips/Makefile src/os/darwin/i386/Makefile src/os/darwin/powerpc/Makefile src/os/bsd/powerpc/Makefile src/os/bsd/arm/Makefile src/os/bsd/i386/Makefile src/os/bsd/x86_64/Makefile lib/Makefile lib/java/Makefile lib/java/lang/Makefile lib/jamvm/Makefile lib/jamvm/java/Makefile lib/jamvm/java/lang/Makefile lib/java/lang/reflect/Makefile lib/java/security/Makefile lib/gnu/Makefile lib/sun/reflect/annotation/Makefile lib/sun/reflect//Makefile lib/sun/Makefile lib/gnu/classpath/Makefile" -+ac_config_files="$ac_config_files Makefile src/Makefile src/interp/Makefile src/interp/engine/Makefile src/arch/Makefile src/os/Makefile src/os/linux/Makefile src/os/darwin/Makefile src/os/bsd/Makefile src/os/linux/powerpc/Makefile src/os/linux/arm/Makefile src/os/linux/i386/Makefile src/os/linux/x86_64/Makefile src/os/linux/avr32/Makefile src/os/linux/parisc/Makefile src/os/linux/mips/Makefile src/os/darwin/i386/Makefile src/os/darwin/powerpc/Makefile src/os/bsd/powerpc/Makefile src/os/bsd/arm/Makefile src/os/bsd/i386/Makefile src/os/bsd/x86_64/Makefile lib/Makefile lib/java/Makefile lib/java/lang/Makefile lib/jamvm/Makefile lib/jamvm/java/Makefile lib/jamvm/java/lang/Makefile lib/java/lang/reflect/Makefile lib/java/security/Makefile lib/gnu/Makefile lib/sun/reflect/annotation/Makefile lib/sun/reflect//Makefile lib/sun/Makefile lib/gnu/classpath/Makefile" - - - cat >confcache <<\_ACEOF -@@ -23475,6 +23476,7 @@ do - "src/os/linux/i386/Makefile") CONFIG_FILES="$CONFIG_FILES src/os/linux/i386/Makefile" ;; - "src/os/linux/x86_64/Makefile") CONFIG_FILES="$CONFIG_FILES src/os/linux/x86_64/Makefile" ;; - "src/os/linux/parisc/Makefile") CONFIG_FILES="$CONFIG_FILES src/os/linux/parisc/Makefile" ;; -+ "src/os/linux/avr32/Makefile") CONFIG_FILES="$CONFIG_FILES src/os/linux/avr32/Makefile" ;; - "src/os/linux/mips/Makefile") CONFIG_FILES="$CONFIG_FILES src/os/linux/mips/Makefile" ;; - "src/os/darwin/i386/Makefile") CONFIG_FILES="$CONFIG_FILES src/os/darwin/i386/Makefile" ;; - "src/os/darwin/powerpc/Makefile") CONFIG_FILES="$CONFIG_FILES src/os/darwin/powerpc/Makefile" ;; -diff -urpN jamvm-1.5.0/src/alloc.c jamvm-1.5.0-avr32/src/alloc.c ---- jamvm-1.5.0/src/alloc.c 2007-10-22 01:24:22.000000000 +0200 -+++ jamvm-1.5.0-avr32/src/alloc.c 2008-02-08 09:20:38.000000000 +0100 -@@ -274,6 +274,11 @@ void initialiseAlloc(InitArgs *args) { - #else - char *mem = (char*)mmap(0, args->max_heap, PROT_READ|PROT_WRITE, - MAP_PRIVATE|MAP_ANON, -1, 0); -+// char *mem = (char*)mmap(0, 8196, PROT_READ|PROT_WRITE, -+// MAP_PRIVATE|MAP_ANON, -1, 0); -+//TODO: lto -+//jam_printf("trying to mmap max:%lo min:%lo heap\n",args->max_heap , args->max_heap); -+//jam_printf("mem: %d %d\n",mem,MAP_FAILED); - if(mem == MAP_FAILED) { - #endif - perror("Aborting the VM -- couldn't allocate the heap"); -@@ -2214,7 +2219,7 @@ void *sysMalloc(int size) { - int n = size < sizeof(void*) ? sizeof(void*) : size; - void *mem = malloc(n); - -- if(mem == NULL) { -+ if(mem == NULL && n != 0) { - jam_fprintf(stderr, "Malloc failed - aborting VM...\n"); - exitVM(1); - } -diff -urpN jamvm-1.5.0/src/arch/avr32.h jamvm-1.5.0-avr32/src/arch/avr32.h ---- jamvm-1.5.0/src/arch/avr32.h 1970-01-01 01:00:00.000000000 +0100 -+++ jamvm-1.5.0-avr32/src/arch/avr32.h 2008-02-08 09:20:41.000000000 +0100 -@@ -0,0 +1,109 @@ -+/* -+ * Copyright (C) 2003, 2004, 2005, 2006, 2007 -+ * Robert Lougher . -+ * -+ * This file is part of JamVM. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * as published by the Free Software Foundation; either version 2, -+ * or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+ */ -+ -+#define OS_ARCH "avr32" -+//#ifndef DEBUG -+//#define DEBUG -+//#endif -+ -+/* Override default min and max heap sizes. AVR32 machines are -+ usually embedded, and the standard defaults are too large. */ -+#define DEFAULT_MAX_HEAP 8*MB -+#define DEFAULT_MIN_HEAP 1*MB -+ -+#define HANDLER_TABLE_T static const void -+#define DOUBLE_1_BITS 0x3ff0000000000000LL -+ -+#define READ_DBL(v,p,l) v = ((u8)p[0]<<56)|((u8)p[1]<<48)|((u8)p[2]<<40) \ -+ |((u8)p[3]<<32)|((u8)p[4]<<24)|((u8)p[5]<<16) \ -+ |((u8)p[6]<<8)|(u8)p[7]; p+=8 -+ -+//extern void setDoublePrecision(); -+#define FPU_HACK -+ -+//#define COMPARE_AND_SWAP(addr, old_val, new_val) ({char result;result;}) -+//static inline unsigned long __cmpxchg_u32(volatile int *m, unsigned int old, -+// unsigned int new) -+//{ -+// int ret; -+// //printf("compare and swap %d %d %s:line%d\n",old,new,__FILE__,__LINE__); -+// asm volatile( -+// "1: ssrf 5\n" -+// " ld.w %[ret], %[m]\n" -+// " cp.w %[ret], %[old]\n" -+// " brne 2f\n" -+// " stcond %[m], %[new]\n" -+// " brne 1b\n" -+// "2:\n" -+// : [ret] "=&r"(ret), [m] "=m"(*m) -+// : "m"(*m), [new] "r"(new), [old] "r"(old) -+// : "memory", "cc"); -+// return ret; -+//} -+ -+//see C:\Cygwin\usr\local\avr32-linux\include\bits\atomicity.h -+//see http://www.avr32linux.org/twiki/bin/view/Main/AtomicOperations -+//see http://www.mail-archive.com/uclibc@uclibc.org/msg00914.html -+//http://www.avr32linux.org/twiki/pub/Main/MicroClibcPatches/uClibc-0.9.28-avr32-20060621.patch -+//http://www.google.com/codesearch?hl=en&q=+cmpxchg+avr32+show:WwwDfOAAdbA:L2BlPHy6h_g:nY7RakaTOnE&sa=N&cd=1&ct=rc&cs_p=http://gobo.calica.com/packages/official/Linux--2.6.20.4-r1--i686.tar.bz2&cs_f=Linux/2.6.20.4/Resources/Unmanaged/Files/Compile/Sources/linux-2.6.20.4/include/asm-avr32/system.h#first -+//#define COMPARE_AND_SWAP(p, oldval, newval)({ \ -+// printf("compare and swap %d %d %s:line%d\n",oldval,newval,__FILE__,__LINE__); \ -+// __cmpxchg_u32(p,oldval,newval);\ -+//}) -+ -+// printf("compare and swap %d %d %s:line %d\n",old_val,new_val,__FILE__,__LINE__); -+#define COMPARE_AND_SWAP(addr, old_val, new_val) \ -+({ \ -+ int result; \ -+ __asm__ __volatile__ (" \ -+ 1: ssrf 5; \ -+ ld.w %[ret], %[m]; \ -+ cp.w %[ret], %[old]; \ -+ brne 2f; \ -+ stcond %[m], %[new]; \ -+ brne 1b; \ -+ 2:" \ -+ : [ret] "=&r" (result), [m] "=m" (*addr) \ -+ : "m" (*addr), [old] "r" (old_val), [new] "r" (new_val) \ -+ : "memory", "cc"); \ -+ result; \ -+}) -+ -+//ssrf 5 :set lock bit -+//stcond :store param2 when lock is set -+//sreq :If equal set register to true or false -+//brne :Branch when not equal -+//brne 1b :When the lock wasn't set anymore, try again -+//label 1b 2f :first label named 1/2 before/after -+#define FLUSH_CACHE(addr, length) -+ -+#define LOCKWORD_READ(addr) *addr -+#define LOCKWORD_WRITE(addr, value) *addr = value -+#define LOCKWORD_COMPARE_AND_SWAP(addr, old_val, new_val) \ -+ COMPARE_AND_SWAP(addr, old_val, new_val) -+ -+#define UNLOCK_MBARRIER() __asm__ __volatile__ ("" ::: "memory") -+#define JMM_LOCK_MBARRIER() __asm__ __volatile__ ("" ::: "memory") -+#define JMM_UNLOCK_MBARRIER() __asm__ __volatile__ ("" ::: "memory") -+ -+//TODO: lto -+#define MBARRIER() __asm__ __volatile__ ("" ::: "memory") -+//#define MBARRIER() __asm__ __volatile__ ("lock; addl $0,0(%%esp)" ::: "memory") -diff -urpN jamvm-1.5.0/src/arch/Makefile.am jamvm-1.5.0-avr32/src/arch/Makefile.am ---- jamvm-1.5.0/src/arch/Makefile.am 2007-10-28 00:19:26.000000000 +0200 -+++ jamvm-1.5.0-avr32/src/arch/Makefile.am 2008-02-08 09:20:41.000000000 +0100 -@@ -19,4 +19,4 @@ - ## Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - ## - --EXTRA_DIST = powerpc.h arm.h i386.h x86_64.h parisc.h mips.h -+EXTRA_DIST = powerpc.h arm.h i386.h x86_64.h parisc.h mips.h avr32.h -diff -urpN jamvm-1.5.0/src/arch/Makefile.in jamvm-1.5.0-avr32/src/arch/Makefile.in ---- jamvm-1.5.0/src/arch/Makefile.in 2007-10-29 07:02:36.000000000 +0100 -+++ jamvm-1.5.0-avr32/src/arch/Makefile.in 2008-02-08 09:20:41.000000000 +0100 -@@ -162,7 +162,7 @@ top_srcdir = @top_srcdir@ - use_zip_no = @use_zip_no@ - use_zip_yes = @use_zip_yes@ - with_classpath_install_dir = @with_classpath_install_dir@ --EXTRA_DIST = powerpc.h arm.h i386.h x86_64.h parisc.h mips.h -+EXTRA_DIST = powerpc.h arm.h i386.h x86_64.h parisc.h mips.h avr32.h - all: all-am - - .SUFFIXES: -diff -urpN jamvm-1.5.0/src/class.c jamvm-1.5.0-avr32/src/class.c ---- jamvm-1.5.0/src/class.c 2007-10-29 05:45:32.000000000 +0100 -+++ jamvm-1.5.0-avr32/src/class.c 2008-02-08 09:20:37.000000000 +0100 -@@ -40,6 +40,8 @@ - #define SCAVENGE(ptr) FALSE - #define FOUND(ptr) ptr - -+#define TRACE(fmt, ...) jam_printf(fmt, ## __VA_ARGS__) -+ - static int verbose; - static char *bootpath; - static char *classpath; -@@ -1273,6 +1275,9 @@ Class *findSystemClass0(char *classname) - } - - Class *findSystemClass(char *classname) { -+#ifdef DEBUG -+ TRACE(">>>>>>finding class: %s\n", classname); -+#endif - Class *class = findSystemClass0(classname); - - if(!exceptionOccurred()) -@@ -1383,18 +1388,32 @@ Class *findClassFromClassLoader(char *cl - } - - Object *getSystemClassLoader() { -+#ifdef DEBUG -+ printf("%s: %d: trying to find ClassLoader\n",__FILE__,__LINE__); -+#endif - Class *class_loader = findSystemClass("java/lang/ClassLoader"); - - if(!exceptionOccurred()) { -+#ifdef DEBUG -+ printf("%s: %d: found ClassLoader\n",__FILE__,__LINE__); -+#endif - MethodBlock *mb; - - if((mb = findMethod(class_loader, "getSystemClassLoader", - "()Ljava/lang/ClassLoader;")) != NULL) { -+#ifdef DEBUG -+ printf("%s: %d: executing static SystemClassLoader",__FILE__,__LINE__); -+#endif -+ - Object *system_loader = *(Object**)executeStaticMethod(class_loader, mb); - - if(!exceptionOccurred()) - return system_loader; - } -+#ifdef DEBUG -+ }else{ -+ printf("%s: %d: found ClassLoader WITH EXCEPTION\n",__FILE__,__LINE__); -+#endif - } - return NULL; - } -diff -urpN jamvm-1.5.0/src/interp/direct.c jamvm-1.5.0-avr32/src/interp/direct.c ---- jamvm-1.5.0/src/interp/direct.c 2007-10-26 05:10:47.000000000 +0200 -+++ jamvm-1.5.0-avr32/src/interp/direct.c 2008-02-08 09:20:40.000000000 +0100 -@@ -31,7 +31,7 @@ - #include "interp.h" - - #ifdef TRACEDIRECT --#define TRACE(fmt, ...) jam_printf(fmt, ## __VA_ARGS__) -+#define TRACE(fmt, ...) printf(fmt, ## __VA_ARGS__) - #else - #define TRACE(fmt, ...) - #endif -Binary files jamvm-1.5.0/src/interp/engine/compute_relocatability and jamvm-1.5.0-avr32/src/interp/engine/compute_relocatability differ -diff -urpN jamvm-1.5.0/src/os/linux/avr32/dll_md.c jamvm-1.5.0-avr32/src/os/linux/avr32/dll_md.c ---- jamvm-1.5.0/src/os/linux/avr32/dll_md.c 1970-01-01 01:00:00.000000000 +0100 -+++ jamvm-1.5.0-avr32/src/os/linux/avr32/dll_md.c 2008-02-08 09:20:38.000000000 +0100 -@@ -0,0 +1,669 @@ -+/* -+ * Copyright (C) 2003, 2004, 2005, 2006, 2007 -+ * Robert Lougher . -+ * -+ * This file is part of JamVM. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * as published by the Free Software Foundation; either version 2, -+ * or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+ */ -+ -+#include "../../../jam.h" -+ -+#ifndef USE_FFI -+#include -+#include "../../../sig.h" -+ -+#define RET_VOID 0 -+#define RET_DOUBLE 1 -+#define RET_LONG 2 -+#define RET_FLOAT 3 -+#define RET_DFLT 4 -+ -+int nativeExtraArg(MethodBlock *mb) { -+ //printf("!!!!!!!!!!nativeExtraArg (name=%s) (type=%s)!!!!!!!\n",mb->name,mb->type); -+ int len = strlen(mb->type); -+ if(mb->type[len-2] == ')') -+ switch(mb->type[len-1]) { -+ case 'V': -+ return RET_VOID; -+ case 'D': -+ return RET_DOUBLE; -+ case 'J': -+ return RET_LONG; -+ case 'F': -+ return RET_FLOAT; -+ } -+ -+ return RET_DFLT; -+} -+ -+//calls the f function pointer and takes care of the return type -+#define perform_f(label,...) \ -+ switch(ret_type) { \ -+ case RET_VOID: \ -+ (*(void (*)())f)(__VA_ARGS__); \ -+ goto label; \ -+ case RET_DOUBLE: \ -+ *(double*)ostack = (*(double (*)())f)(__VA_ARGS__); \ -+ ostack += 2; \ -+ goto label; \ -+ case RET_LONG: \ -+ *(long long*)ostack = (*(long long (*)())f)(__VA_ARGS__); \ -+ ostack += 2; \ -+ goto label; \ -+ case RET_FLOAT: \ -+ *(float*)ostack = (*(float (*)())f)(__VA_ARGS__); \ -+ ostack++; \ -+ goto label; \ -+ default: \ -+ *ostack++ = (*(u4 (*)())f)(__VA_ARGS__); \ -+ goto label; \ -+ } -+ -+#define write_ops_to_stack(x) \ -+ /*write x operands to the stack */ \ -+ int i; \ -+ for(i=0; i < x; i++){ \ -+ __asm__ __volatile__( \ -+ "ld.w r11,%0 \n\t" \ -+ "st.w --sp,r11 " \ -+ :: "m"(*--opntr) \ -+ :"sp","r11"); \ -+ } -+ -+u4 *callJNIMethod(void *env, Class *class, char *sig, int ret_type, u4 *ostack, unsigned char *f, int args) { -+ u4 *opntr = ostack + args; -+ int nrofopsonstack = 0; -+ if(class && args > 3){ -+ nrofopsonstack = args - 3; -+ }else if(class){ -+ nrofopsonstack = 0; -+ }else if(args > 4){ -+ nrofopsonstack = args -4; -+ }else{ -+ nrofopsonstack = 0; -+ } -+ -+ if(args == 0){ -+ if(class){ -+ perform_f(done,env,class); -+ }else{ -+ perform_f(done,env); -+ } -+ }else if(args == 1){ -+ if(class){ -+ perform_f(done,env,class,*--opntr); -+ }else{ -+ perform_f(done,env,*--opntr); -+ } -+ }else if(args == 2){ -+ if(class){ -+ perform_f(done,env,class,*--opntr,*--opntr); -+ }else{ -+ perform_f(done,env,*--opntr,*--opntr); -+ } -+ }else if(args == 3){ -+ if(class){ -+ perform_f(done,env,class,*--opntr,*--opntr,*--opntr); -+ }else{ -+ perform_f(done,env,*--opntr,*--opntr,*--opntr); -+ } -+ }else{ -+ write_ops_to_stack(nrofopsonstack) -+ if(class){ -+ perform_f(empty_stack,env,class,*--opntr,*--opntr,*--opntr); -+ }else{ -+ perform_f(empty_stack,env,*--opntr,*--opntr,*--opntr,*--opntr); -+ } -+ } -+ -+ empty_stack: -+ //Increment stack pointer to loose all operands we put there -+ if(nrofopsonstack > 0) { -+ __asm__ __volatile__("add sp,%0" ::"r"((nrofopsonstack) * sizeof(u4)): "sp"); -+ } -+ -+ done: -+ return ostack; -+} -+ -+/* -+ int i; -+ int nrofopsonstack,nrofopsinregister; -+ u4 *opntr = ostack + args; -+ register int *r5 asm ("r5"); -+ *r5 = *f; -+ -+// register unsigned char *r6 asm ("r6"); -+// register int *r7 asm ("r7"); -+// register int *r8 asm ("r8"); -+// register int *r9 asm ("r9"); -+// register int *r10 asm ("r10"); -+// register int *r11 asm ("r11"); -+// register int *r12 asm ("r12"); -+ -+ if(class && args > 3){ -+ nrofopsonstack = args - 3; -+ nrofopsinregister = 3; -+ }else if(class){ -+ nrofopsonstack = 0; -+ nrofopsinregister = args; -+ }else if(args > 4){ -+ nrofopsonstack = args -4; -+ nrofopsinregister = 4; -+ }else{ -+ nrofopsonstack = 0; -+ nrofopsinregister = args; -+ } -+ -+ //write all operands except 3 or 4 to the stack -+ for(i=0; i < nrofopsonstack; i++){ -+ //printf("!!!!!writing arg %d to stack\n",i); -+ __asm__ __volatile__( -+ "ld.w r11,%0 \n\t" -+ "st.w --sp,r11 " -+ :: "m"(*--opntr) -+ :"sp","r11"); -+ } -+ -+ -+ //TODO: make sure none of the registers above have been changed -+ switch(ret_type) { -+ case RET_VOID: -+ goto do_void_function; -+ case RET_DOUBLE: -+ goto do_double_function; -+ case RET_LONG: -+ goto do_longlong_function; -+ case RET_FLOAT: -+ goto do_float_function; -+ default: -+ goto do_default_function; -+ } -+ -+ do_void_function: -+ WRITE_PARAMS(label_void) -+ __asm__ __volatile__( -+ "icall r5" -+ ::"m"(f)); -+ label_void: -+ (*(void (*)())f)(); -+ //printf("!!!!!!!!!!!!! called void JNIMethod %s!!!!!!!!!!\n",sig); -+ goto empty_stack; -+ -+ do_double_function: -+ WRITE_PARAMS(label_double) -+ label_double: -+ *(double*)ostack = (*(double (*)())f)(); -+ ostack += 2; -+ //printf("!!!!!!!!!!!!! called double JNIMethod %s %l!!!!!!!!!!\n",sig,*ostack); -+ goto empty_stack; -+ -+ do_longlong_function: -+ WRITE_PARAMS(label_longlong) -+ label_longlong: -+ *(long long*)ostack = (*(long long (*)())f)(); -+ ostack += 2; -+ //printf("!!!!!!!!!!!!! called long JNIMethod %s %l!!!!!!!!!!\n",sig,*ostack); -+ goto empty_stack; -+ -+ do_float_function: -+ WRITE_PARAMS(label_float) -+ label_float: -+ *(float*)ostack = (*(float (*)())f)(); -+ ostack++; -+ //printf("!!!!!!!!!!!!! called float JNIMethod %s %f!!!!!!!!!!\n",sig,*ostack); -+ goto empty_stack; -+ -+ do_default_function: -+ WRITE_PARAMS(label_default) -+ label_default: -+ *ostack++ = (*(u4 (*)())f)(); -+ //printf("!!!!!!!!!!!!! called default JNIMethod %s!!!!!!!!!!\n",sig); -+ goto empty_stack; -+ -+ empty_stack: -+ -+ //Get rid of the items on the stack -+ if(nrofopsonstack > 0) { -+ __asm__ __volatile__("add sp,%0" ::"r"(nrofopsonstack): "sp"); -+ } -+ return ostack;*/ -+ -+ -+// r8 = (u4*)(*--opntr); -+// r9 = (u4*)(*--opntr); -+// r10 = (u4*)(*--opntr); -+// r11 = (u4*)(*--opntr); -+// r12 = env; -+ -+ -+ -+/* -+ //write all operands to register -+ if(!class){ -+ switch(nrofopsinregister){ -+ case 4: -+ __asm__ __volatile__( -+ "ld.w r8,%[r8] \n\t" -+ "ld.w r9,%[r9] \n\t" -+ "ld.w r10,%[r10] \n\t" -+ "ld.w r11,%[r11] \n\t" -+ "ld.w r12,%[env]" -+ :: [r8]"m"(*--opntr),[r9]"m"(*--opntr),[r10]"m"(*--opntr),[r11]"m"(*--opntr),[env]"m"(env) -+ :"r8","r9","r10","r11","r12" -+ ); -+ goto select_function; -+ case 3: -+ __asm__ __volatile__( -+ "ld.w r9,%[r9] \n\t" -+ "ld.w r10,%[r10] \n\t" -+ "ld.w r11,%[r11] \n\t" -+ "ld.w r12,%[env]" -+ :: [r9]"m"(*--opntr),[r10]"m"(*--opntr),[r11]"m"(*--opntr),[env]"m"(env) -+ :"r9","r10","r11","r12" -+ ); -+ goto select_function; -+ case 2: -+ __asm__ __volatile__( -+ "ld.w r10,%[r10] \n\t" -+ "ld.w r11,%[r11] \n\t" -+ "ld.w r12,%[env]" -+ :: [r10]"m"(*--opntr),[r11]"m"(*--opntr),[env]"m"(env) -+ :"r10","r11","r12" -+ ); -+ goto select_function; -+ case 1: -+ __asm__ __volatile__( -+ "ld.w r11,%[r11] \n\t" -+ "ld.w r12,%[env]" -+ ::[r11]"m"(*--opntr),[env]"m"(env) -+ :"r11","r12" -+ ); -+ goto select_function; -+ case 0: -+ __asm__ __volatile__( -+ "ld.w r12,%[env]" -+ ::[env]"m"(env) -+ :"r12" -+ ); -+ goto select_function; -+ } -+ }else{//class needs to be written to r11 -+ switch(nrofopsinregister){ -+ case 3: -+ __asm__ __volatile__( -+ "ld.w r8,%[r8] \n\t" -+ "ld.w r9,%[r9] \n\t" -+ "ld.w r10,%[r10] \n\t" -+ "ld.w r11,%[class] \n\t" -+ "ld.w r12,%[env]" -+ :: [r8]"m"(*--opntr),[r9]"m"(*--opntr),[r10]"m"(*--opntr),[class]"m"(class),[env]"m"(env) -+ :"r8","r9","r10","r11","r12" -+ ); -+ goto select_function; -+ case 2: -+ __asm__ __volatile__( -+ "ld.w r9,%[r9] \n\t" -+ "ld.w r10,%[r10] \n\t" -+ "ld.w r11,%[class] \n\t" -+ "ld.w r12,%[env]" -+ :: [r9]"m"(*--opntr),[r10]"m"(*--opntr),[class]"m"(class),[env]"m"(env) -+ :"r9","r10","r11","r12" -+ ); -+ goto select_function; -+ case 1: -+ __asm__ __volatile__( -+ "ld.w r10,%[r10] \n\t" -+ "ld.w r11,%[class] \n\t" -+ "ld.w r12,%[env]" -+ :: [r10]"m"(*--opntr),[class]"m"(class),[env]"m"(env) -+ :"r10","r11","r12" -+ ); -+ goto select_function; -+ case 0: -+ __asm__ __volatile__( -+ "ld.w r11,%[class] \n\t" -+ "ld.w r12,%[env]" -+ :: [class]"m"(class),[env]"m"(env) -+ :"r10","r11","r12" -+ ); -+ goto select_function; -+ } -+ } -+ select_function: //This label is put here to make some cleaner assembler jumps above -+ */ -+ -+// int isstatic; -+// if(class){ -+// isstatic = 1; -+// }else{ -+// isstatic = 0; -+// } -+// printf("!!!!!!!!!!!!! calling JNIMethod (sig:%s) (type:%d) (argcount:%d) (static:%d)!!!!!!!!!!\n",sig,ret_type,args,isstatic); -+ -+//Dit werkt!!! -+// if(args == 3 && isstatic == 0 && ret_type == RET_DFLT){ -+// printf("I am here..\n"); -+// *ostack++ = (*(u4 (*)())f)(env,*--opntr,*--opntr,*--opntr); -+// return ostack; -+// } -+/* -+ u4 *opntr = ostack + args; -+ long long *result; -+ if(class){ -+ //printf("I am static!!!!!!!\n"); -+ if(args == 0){ -+ //*ostack = (*(u4 (*)())f)(env,class); -+ *result = (*(long long (*)())f)(env,class); -+ }else if(args == 1){ -+ *result = (*(long long (*)())f)(env,class,*--opntr); -+ }else if(args == 2){ -+ *result = (*(long long (*)())f)(env,class,*--opntr,*--opntr); -+ }else if(args == 3){ -+ *result = (*(long long (*)())f)(env,class,*--opntr,*--opntr,*--opntr); -+ }else if(args == 4){ -+ *result = (*(long long (*)())f)(env,class,*--opntr,*--opntr,*--opntr,*--opntr); -+ }else if(args == 5){ -+ *result = (*(long long (*)())f)(env,class,*--opntr,*--opntr,*--opntr,*--opntr,*--opntr); -+ } -+ }else{ -+ //printf("I am not static!!!!!!!\n"); -+ if(args == 0){ -+ *result = (*(long long (*)())f)(env); -+ }else if(args == 1){ -+ *result = (*(long long (*)())f)(env,*--opntr); -+ }else if(args == 2){ -+ *result = (*(long long (*)())f)(env,*--opntr,*--opntr); -+ }else if(args == 3){ -+ *result = (*(long long (*)())f)(env,*--opntr,*--opntr,*--opntr); -+ }else if(args == 4){ -+ *result = (*(long long (*)())f)(env,*--opntr,*--opntr,*--opntr,*--opntr); -+ }else if(args == 5){ -+ *result = (*(long long (*)())f)(env,*--opntr,*--opntr,*--opntr,*--opntr,*--opntr); -+ } -+ } -+ -+ switch(ret_type) { -+ case RET_VOID: -+ printf("-------->Performed void function %s\n",sig); -+ break; -+ -+ case RET_DOUBLE: -+ *(double*)ostack = *(double(*))result; -+ ostack += 2; -+ printf("-------->Performed double function %s,casting to %d\n",sig, ret_type); -+ //printf("returned a double %f\n",*ostack); -+ break; -+ -+ case RET_LONG: -+ *(long long*)ostack = *(long long(*))result; -+ ostack += 2; -+ printf("-------->Performed long function %s,casting to %d\n",sig, ret_type); -+ //printf("returned a long %l\n",*ostack); -+ break; -+ -+ case RET_FLOAT: -+ *(float*)ostack = *(float(*))result; -+ ostack++; -+ printf("-------->Performed float function %s,casting to %d\n",sig, ret_type); -+ //printf("returned a float %f\n",*ostack); -+ break; -+ -+ default: -+ *ostack++ = *(u4(*))result; -+ //ostack++; -+ printf("-------->Performed default function %s,casting to %d\n",sig, ret_type); -+ //printf("returned a default %d\n",*ostack); -+ break; -+ } -+ return ostack; -+ */ -+ -+ -+ -+ -+// if(args == 3 && isstatic == 0 && ret_type == RET_DFLT){ -+// printf("I am here!!!!!!!\n"); -+// u4 *result = (*(u4 (*)())f)(env,*--opntr,*--opntr,*--opntr); -+// *ostack++ = result; -+// //*ostack++ = (*(u4 (*)())f)(env,*--opntr,*--opntr,*--opntr); -+// return ostack; -+// } -+// if(args == 2 && isstatic == 0 && ret_type == RET_DFLT){ -+// printf("I am here..\n"); -+// *ostack++ = (*(u4 (*)())f)(env,*--opntr,*--opntr); -+// return ostack; -+// } -+// if(args == 1 && isstatic == 0 && ret_type == RET_DFLT){ -+// printf("I am here..\n"); -+// *ostack++ = (*(u4 (*)())f)(env,*--opntr); -+// return ostack; -+// } -+// -+// if(args == 6 && isstatic == 1 && ret_type == RET_DFLT){ -+// printf("I am here for 7 args..\n"); -+// *ostack++ = (*(u4 (*)())f)(env,class,*--opntr,*--opntr,*--opntr,*--opntr,*--opntr,*--opntr); -+// return ostack; -+// } -+// if(args == 4 && isstatic == 1 && ret_type == RET_DFLT){ -+// printf("I am here for 5 args..\n"); -+// *ostack++ = (*(u4 (*)())f)(env,class,*--opntr,*--opntr,*--opntr,*--opntr); -+// return ostack; -+// } -+// if(args == 3 && isstatic == 1 && ret_type == RET_DFLT){ -+// printf("I am here..\n"); -+// *ostack++ = (*(u4 (*)())f)(env,class,*--opntr,*--opntr,*--opntr); -+// return ostack; -+// } -+// if(args == 2 && isstatic == 1 && ret_type == RET_DFLT){ -+// printf("I am here..\n"); -+// *ostack++ = (*(u4 (*)())f)(env,class,*--opntr,*--opntr); -+// return ostack; -+// } -+// if(args == 1 && isstatic == 1 && ret_type == RET_DFLT){ -+// printf("I am here..\n"); -+// *ostack++ = (*(u4 (*)())f)(env,class,*--opntr); -+// return ostack; -+// } -+ -+ //int i; -+ -+ //for(i = 0; i < args; i++){ -+ // printf("!!!!!should write arg %d\n",i); -+ //__asm__ __volatile__("ld.w r11,%0" :: "m"(*--opntr):"r11"); -+ //__asm__ __volatile__("st.w --sp,r11" ::: "sp","r11"); -+ //} -+ -+// int i=args; -+// if(class) { -+// for(i=args;i>3;i--){ -+// __asm__ __volatile__("ld.w r8,%0" :: "m"(*--opntr):"r8"); -+// __asm__ __volatile__("st.w --sp,r8" ::: "sp","r8"); -+// } -+// if(args >= 3){ -+// __asm__ __volatile__("ld.w r8,%0" :: "m"(*--opntr):"r8"); -+// } -+// if(args >= 2){ -+// __asm__ __volatile__("ld.w r9,%0" :: "m"(*--opntr):"r9"); -+// } -+// if(args >= 1){ -+// __asm__ __volatile__("ld.w r10,%0" :: "m"(*--opntr):"r10"); -+// } -+// __asm__ __volatile__("ld.w r11,%0" :: "m"(class):"r11"); -+// __asm__ __volatile__("ld.w r12,%0" :: "m"(env):"r12"); -+// }else{//static, don't add class variable -+// for(i=args;i>4;i--){ -+// //r8 will be reused by the last register argument -+// __asm__ __volatile__("ld.w r8,%0" :: "m"(*--opntr):"r8"); -+// __asm__ __volatile__("st.w --sp,r8" ::: "sp","r8"); -+// } -+// if(args >= 4){ -+// __asm__ __volatile__("ld.w r8,%0" :: "m"(*--opntr):"r8"); -+// } -+// if(args >= 3){ -+// __asm__ __volatile__("ld.w r9,%0" :: "m"(*--opntr):"r9"); -+// } -+// if(args >= 2){ -+// __asm__ __volatile__("ld.w r10,%0" :: "m"(*--opntr):"r10"); -+// } -+// if(args >= 1){ -+// __asm__ __volatile__("ld.w r11,%0" :: "m"(*--opntr):"r11"); -+// } -+// __asm__ __volatile__("ld.w r12,%0" :: "m"(env):"r12"); -+// } -+ -+// printf("!!!!!pushing environment to r12\n"); -+ -+ //printf("!!!!!!!!!!!!! switching ret_type %s %d ,nr of args: %d!!!!!!!!!!\n",sig, ret_type,args); -+// switch(ret_type) { -+// case RET_VOID: -+// (*(void (*)())f)(); -+// //printf("!!!!!!!!!!!!! called void JNIMethod %s!!!!!!!!!!\n",sig); -+// break; -+// -+// case RET_DOUBLE: -+// *(double*)ostack = (*(double (*)())f)(); -+// ostack += 2; -+// //printf("!!!!!!!!!!!!! called double JNIMethod %s %l!!!!!!!!!!\n",sig,*ostack); -+// break; -+// -+// case RET_LONG: -+// *(long long*)ostack = (*(long long (*)())f)(); -+// ostack += 2; -+// //printf("!!!!!!!!!!!!! called long JNIMethod %s %l!!!!!!!!!!\n",sig,*ostack); -+// break; -+// -+// case RET_FLOAT: -+// *(float*)ostack = (*(float (*)())f)(); -+// ostack++; -+// //printf("!!!!!!!!!!!!! called float JNIMethod %s %f!!!!!!!!!!\n",sig,*ostack); -+// break; -+// -+// default: -+// *ostack++ = (*(u4 (*)())f)(); -+// //printf("!!!!!!!!!!!!! called default JNIMethod %s!!!!!!!!!!\n",sig); -+// break; -+// } -+// -+// if(class && args > 3) { -+// int to_add = args-3; -+// __asm__ __volatile__("add sp,%0" ::"r"(to_add): "sp"); -+// }else if(!class && args > 4){ -+// int to_add = args-4; -+// __asm__ __volatile__("add sp,%0" ::"r"(to_add): "sp"); -+// } -+// //printf("!!!!!!!!!!!!! returning JNIMethod (sig:%s) (type:%d) (argcount:%d)!!!!!!!!!!\n",sig,ret_type,args); -+// //printf("!!!!!!!!!!!!! returning %s %d ,nr of args: %d!!!!!!!!!!\n",sig, ret_type,args); -+// //printf("!!!!!!!!!!!!! returning JNIMethod !!!!!!!!!!\n"); -+// //__asm__ __volatile__ ("addl %0,%%esp" :: "r" ((args + 1) * sizeof(u4)) : "cc", "sp"); -+// -+// return ostack; -+ -+ -+//write all operands, class and env to register -+#define WRITE_PARAMS(label) \ -+ if(!class){ \ -+ switch(nrofopsinregister){ \ -+ case 4: \ -+ __asm__ __volatile__( \ -+ "ld.w r8,%[r8] \n\t" \ -+ "ld.w r9,%[r9] \n\t" \ -+ "ld.w r10,%[r10] \n\t" \ -+ "ld.w r11,%[r11] \n\t" \ -+ "ld.w r12,%[env]" \ -+ :: [r8]"m"(*--opntr),[r9]"m"(*--opntr),[r10]"m"(*--opntr),[r11]"m"(*--opntr),[env]"m"(env) \ -+ :"r8","r9","r10","r11","r12" \ -+ ); \ -+ goto label; \ -+ case 3: \ -+ __asm__ __volatile__( \ -+ "ld.w r9,%[r9] \n\t" \ -+ "ld.w r10,%[r10] \n\t" \ -+ "ld.w r11,%[r11] \n\t" \ -+ "ld.w r12,%[env]" \ -+ :: [r9]"m"(*--opntr),[r10]"m"(*--opntr),[r11]"m"(*--opntr),[env]"m"(env) \ -+ :"r9","r10","r11","r12" \ -+ ); \ -+ goto label; \ -+ case 2: \ -+ __asm__ __volatile__( \ -+ "ld.w r10,%[r10] \n\t" \ -+ "ld.w r11,%[r11] \n\t" \ -+ "ld.w r12,%[env]" \ -+ :: [r10]"m"(*--opntr),[r11]"m"(*--opntr),[env]"m"(env) \ -+ :"r10","r11","r12" \ -+ ); \ -+ goto label; \ -+ case 1: \ -+ __asm__ __volatile__( \ -+ "ld.w r11,%[r11] \n\t" \ -+ "ld.w r12,%[env]" \ -+ ::[r11]"m"(*--opntr),[env]"m"(env) \ -+ :"r11","r12" \ -+ ); \ -+ goto label; \ -+ case 0: \ -+ __asm__ __volatile__( \ -+ "ld.w r12,%[env]" \ -+ ::[env]"m"(env) \ -+ :"r12" \ -+ ); \ -+ goto label; \ -+ } \ -+ }else{ \ -+ switch(nrofopsinregister){ \ -+ case 3: \ -+ __asm__ __volatile__( \ -+ "ld.w r8,%[r8] \n\t" \ -+ "ld.w r9,%[r9] \n\t" \ -+ "ld.w r10,%[r10] \n\t" \ -+ "ld.w r11,%[class] \n\t" \ -+ "ld.w r12,%[env]" \ -+ :: [r8]"m"(*--opntr),[r9]"m"(*--opntr),[r10]"m"(*--opntr),[class]"m"(class),[env]"m"(env) \ -+ :"r8","r9","r10","r11","r12" \ -+ ); \ -+ goto label; \ -+ case 2: \ -+ __asm__ __volatile__( \ -+ "ld.w r9,%[r9] \n\t" \ -+ "ld.w r10,%[r10] \n\t" \ -+ "ld.w r11,%[class] \n\t" \ -+ "ld.w r12,%[env]" \ -+ :: [r9]"m"(*--opntr),[r10]"m"(*--opntr),[class]"m"(class),[env]"m"(env) \ -+ :"r9","r10","r11","r12" \ -+ ); \ -+ goto label; \ -+ case 1: \ -+ __asm__ __volatile__( \ -+ "ld.w r10,%[r10] \n\t" \ -+ "ld.w r11,%[class] \n\t" \ -+ "ld.w r12,%[env]" \ -+ :: [r10]"m"(*--opntr),[class]"m"(class),[env]"m"(env) \ -+ :"r10","r11","r12" \ -+ ); \ -+ goto label; \ -+ case 0: \ -+ __asm__ __volatile__( \ -+ "ld.w r11,%[class] \n\t" \ -+ "ld.w r12,%[env]" \ -+ :: [class]"m"(class),[env]"m"(env) \ -+ :"r10","r11","r12" \ -+ ); \ -+ goto label; \ -+ } \ -+ } \ -+ //This label is put here to make some cleaner assembler jumps above -+#endif -diff -urpN jamvm-1.5.0/src/os/linux/avr32/init.c jamvm-1.5.0-avr32/src/os/linux/avr32/init.c ---- jamvm-1.5.0/src/os/linux/avr32/init.c 1970-01-01 01:00:00.000000000 +0100 -+++ jamvm-1.5.0-avr32/src/os/linux/avr32/init.c 2008-02-08 09:20:38.000000000 +0100 -@@ -0,0 +1,39 @@ -+/* -+ * Copyright (C) 2003, 2004, 2006, 2007 -+ * Robert Lougher . -+ * -+ * This file is part of JamVM. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * as published by the Free Software Foundation; either version 2, -+ * or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+ */ -+ -+//#include -+//#include -+ -+/* Change floating point precision to double (64-bit) from -+ * the extended (80-bit) Linux default. */ -+ -+//void setDoublePrecision() { -+// fpu_control_t cw; -+// -+// _FPU_GETCW(cw); -+// cw &= ~_FPU_EXTENDED; -+// cw |= _FPU_DOUBLE; -+// _FPU_SETCW(cw); -+//} -+ -+void initialisePlatform() { -+ //TODO: is this needed for avr32? setDoublePrecision(); -+} -diff -urpN jamvm-1.5.0/src/os/linux/avr32/Makefile.am jamvm-1.5.0-avr32/src/os/linux/avr32/Makefile.am ---- jamvm-1.5.0/src/os/linux/avr32/Makefile.am 1970-01-01 01:00:00.000000000 +0100 -+++ jamvm-1.5.0-avr32/src/os/linux/avr32/Makefile.am 2008-02-08 09:20:38.000000000 +0100 -@@ -0,0 +1,25 @@ -+## -+## Copyright (C) 2003, 2004, 2005, 2006, 2007 -+## Robert Lougher . -+## -+## This file is part of JamVM. -+## -+## This program is free software; you can redistribute it and/or -+## modify it under the terms of the GNU General Public License -+## as published by the Free Software Foundation; either version 2, -+## or (at your option) any later version. -+## -+## This program is distributed in the hope that it will be useful, -+## but WITHOUT ANY WARRANTY; without even the implied warranty of -+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+## GNU General Public License for more details. -+## -+## You should have received a copy of the GNU General Public License -+## along with this program; if not, write to the Free Software -+## Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+## -+ -+noinst_LTLIBRARIES = libnative.la -+libnative_la_SOURCES = init.c dll_md.c -+ -+AM_CPPFLAGS = -I$(top_builddir)/src -diff -urpN jamvm-1.5.0/src/os/linux/avr32/Makefile.in jamvm-1.5.0-avr32/src/os/linux/avr32/Makefile.in ---- jamvm-1.5.0/src/os/linux/avr32/Makefile.in 1970-01-01 01:00:00.000000000 +0100 -+++ jamvm-1.5.0-avr32/src/os/linux/avr32/Makefile.in 2008-02-08 09:20:38.000000000 +0100 -@@ -0,0 +1,446 @@ -+# Makefile.in generated by automake 1.10 from Makefile.am. -+# @configure_input@ -+ -+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -+# This Makefile.in is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. -+ -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -+# PARTICULAR PURPOSE. -+ -+@SET_MAKE@ -+ -+VPATH = @srcdir@ -+pkgdatadir = $(datadir)/@PACKAGE@ -+pkglibdir = $(libdir)/@PACKAGE@ -+pkgincludedir = $(includedir)/@PACKAGE@ -+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -+install_sh_DATA = $(install_sh) -c -m 644 -+install_sh_PROGRAM = $(install_sh) -c -+install_sh_SCRIPT = $(install_sh) -c -+INSTALL_HEADER = $(INSTALL_DATA) -+transform = $(program_transform_name) -+NORMAL_INSTALL = : -+PRE_INSTALL = : -+POST_INSTALL = : -+NORMAL_UNINSTALL = : -+PRE_UNINSTALL = : -+POST_UNINSTALL = : -+build_triplet = @build@ -+host_triplet = @host@ -+subdir = src/os/linux/avr32 -+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ -+ $(top_srcdir)/configure.ac -+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ -+ $(ACLOCAL_M4) -+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -+CONFIG_HEADER = $(top_builddir)/src/config.h -+CONFIG_CLEAN_FILES = -+LTLIBRARIES = $(noinst_LTLIBRARIES) -+libnative_la_LIBADD = -+am_libnative_la_OBJECTS = init.lo dll_md.lo -+libnative_la_OBJECTS = $(am_libnative_la_OBJECTS) -+DEFAULT_INCLUDES = -I. -I$(top_builddir)/src@am__isrc@ -+depcomp = $(SHELL) $(top_srcdir)/depcomp -+am__depfiles_maybe = depfiles -+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ -+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ -+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ -+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -+CCLD = $(CC) -+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ -+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ -+ $(LDFLAGS) -o $@ -+SOURCES = $(libnative_la_SOURCES) -+DIST_SOURCES = $(libnative_la_SOURCES) -+ETAGS = etags -+CTAGS = ctags -+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -+ACLOCAL = @ACLOCAL@ -+ALLOCA = @ALLOCA@ -+AMTAR = @AMTAR@ -+AR = @AR@ -+AUTOCONF = @AUTOCONF@ -+AUTOHEADER = @AUTOHEADER@ -+AUTOMAKE = @AUTOMAKE@ -+AWK = @AWK@ -+CC = @CC@ -+CCAS = @CCAS@ -+CCASDEPMODE = @CCASDEPMODE@ -+CCASFLAGS = @CCASFLAGS@ -+CCDEPMODE = @CCDEPMODE@ -+CFLAGS = @CFLAGS@ -+CPP = @CPP@ -+CPPFLAGS = @CPPFLAGS@ -+CXX = @CXX@ -+CXXCPP = @CXXCPP@ -+CXXDEPMODE = @CXXDEPMODE@ -+CXXFLAGS = @CXXFLAGS@ -+CYGPATH_W = @CYGPATH_W@ -+DEFS = @DEFS@ -+DEPDIR = @DEPDIR@ -+ECHO = @ECHO@ -+ECHO_C = @ECHO_C@ -+ECHO_N = @ECHO_N@ -+ECHO_T = @ECHO_T@ -+EGREP = @EGREP@ -+EXEEXT = @EXEEXT@ -+F77 = @F77@ -+FFLAGS = @FFLAGS@ -+GREP = @GREP@ -+INSTALL = @INSTALL@ -+INSTALL_DATA = @INSTALL_DATA@ -+INSTALL_PROGRAM = @INSTALL_PROGRAM@ -+INSTALL_SCRIPT = @INSTALL_SCRIPT@ -+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -+JAVAC = @JAVAC@ -+LDFLAGS = @LDFLAGS@ -+LIBOBJS = @LIBOBJS@ -+LIBS = @LIBS@ -+LIBTOOL = @LIBTOOL@ -+LN_S = @LN_S@ -+LTLIBOBJS = @LTLIBOBJS@ -+MAINT = @MAINT@ -+MAKEINFO = @MAKEINFO@ -+MKDIR_P = @MKDIR_P@ -+OBJEXT = @OBJEXT@ -+PACKAGE = @PACKAGE@ -+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -+PACKAGE_NAME = @PACKAGE_NAME@ -+PACKAGE_STRING = @PACKAGE_STRING@ -+PACKAGE_TARNAME = @PACKAGE_TARNAME@ -+PACKAGE_VERSION = @PACKAGE_VERSION@ -+PATH_SEPARATOR = @PATH_SEPARATOR@ -+RANLIB = @RANLIB@ -+SED = @SED@ -+SET_MAKE = @SET_MAKE@ -+SHELL = @SHELL@ -+STRIP = @STRIP@ -+VERSION = @VERSION@ -+abs_builddir = @abs_builddir@ -+abs_srcdir = @abs_srcdir@ -+abs_top_builddir = @abs_top_builddir@ -+abs_top_srcdir = @abs_top_srcdir@ -+ac_ct_CC = @ac_ct_CC@ -+ac_ct_CXX = @ac_ct_CXX@ -+ac_ct_F77 = @ac_ct_F77@ -+am__include = @am__include@ -+am__leading_dot = @am__leading_dot@ -+am__quote = @am__quote@ -+am__tar = @am__tar@ -+am__untar = @am__untar@ -+arch = @arch@ -+bindir = @bindir@ -+build = @build@ -+build_alias = @build_alias@ -+build_cpu = @build_cpu@ -+build_os = @build_os@ -+build_vendor = @build_vendor@ -+builddir = @builddir@ -+datadir = @datadir@ -+datarootdir = @datarootdir@ -+docdir = @docdir@ -+dvidir = @dvidir@ -+exec_prefix = @exec_prefix@ -+host = @host@ -+host_alias = @host_alias@ -+host_cpu = @host_cpu@ -+host_os = @host_os@ -+host_vendor = @host_vendor@ -+htmldir = @htmldir@ -+includedir = @includedir@ -+infodir = @infodir@ -+install_sh = @install_sh@ -+interp_cflags = @interp_cflags@ -+libdir = @libdir@ -+libexecdir = @libexecdir@ -+localedir = @localedir@ -+localstatedir = @localstatedir@ -+mandir = @mandir@ -+mkdir_p = @mkdir_p@ -+oldincludedir = @oldincludedir@ -+os = @os@ -+pdfdir = @pdfdir@ -+prefix = @prefix@ -+program_transform_name = @program_transform_name@ -+psdir = @psdir@ -+sbindir = @sbindir@ -+sharedstatedir = @sharedstatedir@ -+srcdir = @srcdir@ -+sysconfdir = @sysconfdir@ -+target_alias = @target_alias@ -+top_builddir = @top_builddir@ -+top_srcdir = @top_srcdir@ -+use_zip_no = @use_zip_no@ -+use_zip_yes = @use_zip_yes@ -+with_classpath_install_dir = @with_classpath_install_dir@ -+noinst_LTLIBRARIES = libnative.la -+libnative_la_SOURCES = init.c dll_md.c -+AM_CPPFLAGS = -I$(top_builddir)/src -+all: all-am -+ -+.SUFFIXES: -+.SUFFIXES: .c .lo .o .obj -+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) -+ @for dep in $?; do \ -+ case '$(am__configure_deps)' in \ -+ *$$dep*) \ -+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ -+ && exit 0; \ -+ exit 1;; \ -+ esac; \ -+ done; \ -+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/os/linux/avr32/Makefile'; \ -+ cd $(top_srcdir) && \ -+ $(AUTOMAKE) --gnu src/os/linux/avr32/Makefile -+.PRECIOUS: Makefile -+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -+ @case '$?' in \ -+ *config.status*) \ -+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ -+ *) \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ esac; -+ -+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -+ -+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) -+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) -+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -+ -+clean-noinstLTLIBRARIES: -+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) -+ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ -+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ -+ test "$$dir" != "$$p" || dir=.; \ -+ echo "rm -f \"$${dir}/so_locations\""; \ -+ rm -f "$${dir}/so_locations"; \ -+ done -+libnative.la: $(libnative_la_OBJECTS) $(libnative_la_DEPENDENCIES) -+ $(LINK) $(libnative_la_OBJECTS) $(libnative_la_LIBADD) $(LIBS) -+ -+mostlyclean-compile: -+ -rm -f *.$(OBJEXT) -+ -+distclean-compile: -+ -rm -f *.tab.c -+ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dll_md.Plo@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Plo@am__quote@ -+ -+.c.o: -+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(COMPILE) -c $< -+ -+.c.obj: -+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` -+ -+.c.lo: -+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< -+ -+mostlyclean-libtool: -+ -rm -f *.lo -+ -+clean-libtool: -+ -rm -rf .libs _libs -+ -+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) -+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ -+ unique=`for i in $$list; do \ -+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ -+ done | \ -+ $(AWK) ' { files[$$0] = 1; } \ -+ END { for (i in files) print i; }'`; \ -+ mkid -fID $$unique -+tags: TAGS -+ -+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ -+ $(TAGS_FILES) $(LISP) -+ tags=; \ -+ here=`pwd`; \ -+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ -+ unique=`for i in $$list; do \ -+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ -+ done | \ -+ $(AWK) ' { files[$$0] = 1; } \ -+ END { for (i in files) print i; }'`; \ -+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ -+ test -n "$$unique" || unique=$$empty_fix; \ -+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ -+ $$tags $$unique; \ -+ fi -+ctags: CTAGS -+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ -+ $(TAGS_FILES) $(LISP) -+ tags=; \ -+ here=`pwd`; \ -+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ -+ unique=`for i in $$list; do \ -+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ -+ done | \ -+ $(AWK) ' { files[$$0] = 1; } \ -+ END { for (i in files) print i; }'`; \ -+ test -z "$(CTAGS_ARGS)$$tags$$unique" \ -+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ -+ $$tags $$unique -+ -+GTAGS: -+ here=`$(am__cd) $(top_builddir) && pwd` \ -+ && cd $(top_srcdir) \ -+ && gtags -i $(GTAGS_ARGS) $$here -+ -+distclean-tags: -+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -+ -+distdir: $(DISTFILES) -+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ -+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ -+ list='$(DISTFILES)'; \ -+ dist_files=`for file in $$list; do echo $$file; done | \ -+ sed -e "s|^$$srcdirstrip/||;t" \ -+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ -+ case $$dist_files in \ -+ */*) $(MKDIR_P) `echo "$$dist_files" | \ -+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ -+ sort -u` ;; \ -+ esac; \ -+ for file in $$dist_files; do \ -+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ -+ if test -d $$d/$$file; then \ -+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ -+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ -+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ -+ fi; \ -+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ -+ else \ -+ test -f $(distdir)/$$file \ -+ || cp -p $$d/$$file $(distdir)/$$file \ -+ || exit 1; \ -+ fi; \ -+ done -+check-am: all-am -+check: check-am -+all-am: Makefile $(LTLIBRARIES) -+installdirs: -+install: install-am -+install-exec: install-exec-am -+install-data: install-data-am -+uninstall: uninstall-am -+ -+install-am: all-am -+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -+ -+installcheck: installcheck-am -+install-strip: -+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ -+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ -+ `test -z '$(STRIP)' || \ -+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -+mostlyclean-generic: -+ -+clean-generic: -+ -+distclean-generic: -+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -+ -+maintainer-clean-generic: -+ @echo "This command is intended for maintainers to use" -+ @echo "it deletes files that may require special tools to rebuild." -+clean: clean-am -+ -+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ -+ mostlyclean-am -+ -+distclean: distclean-am -+ -rm -rf ./$(DEPDIR) -+ -rm -f Makefile -+distclean-am: clean-am distclean-compile distclean-generic \ -+ distclean-tags -+ -+dvi: dvi-am -+ -+dvi-am: -+ -+html: html-am -+ -+info: info-am -+ -+info-am: -+ -+install-data-am: -+ -+install-dvi: install-dvi-am -+ -+install-exec-am: -+ -+install-html: install-html-am -+ -+install-info: install-info-am -+ -+install-man: -+ -+install-pdf: install-pdf-am -+ -+install-ps: install-ps-am -+ -+installcheck-am: -+ -+maintainer-clean: maintainer-clean-am -+ -rm -rf ./$(DEPDIR) -+ -rm -f Makefile -+maintainer-clean-am: distclean-am maintainer-clean-generic -+ -+mostlyclean: mostlyclean-am -+ -+mostlyclean-am: mostlyclean-compile mostlyclean-generic \ -+ mostlyclean-libtool -+ -+pdf: pdf-am -+ -+pdf-am: -+ -+ps: ps-am -+ -+ps-am: -+ -+uninstall-am: -+ -+.MAKE: install-am install-strip -+ -+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ -+ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ -+ distclean-compile distclean-generic distclean-libtool \ -+ distclean-tags distdir dvi dvi-am html html-am info info-am \ -+ install install-am install-data install-data-am install-dvi \ -+ install-dvi-am install-exec install-exec-am install-html \ -+ install-html-am install-info install-info-am install-man \ -+ install-pdf install-pdf-am install-ps install-ps-am \ -+ install-strip installcheck installcheck-am installdirs \ -+ maintainer-clean maintainer-clean-generic mostlyclean \ -+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ -+ pdf pdf-am ps ps-am tags uninstall uninstall-am -+ -+# Tell versions [3.59,3.63) of GNU make to not export all variables. -+# Otherwise a system limit (for SysV at least) may be exceeded. -+.NOEXPORT: -diff -urpN jamvm-1.5.0/src/os/linux/Makefile.am jamvm-1.5.0-avr32/src/os/linux/Makefile.am ---- jamvm-1.5.0/src/os/linux/Makefile.am 2007-10-28 00:19:26.000000000 +0200 -+++ jamvm-1.5.0-avr32/src/os/linux/Makefile.am 2008-02-08 09:20:38.000000000 +0100 -@@ -20,7 +20,7 @@ - ## - - SUBDIRS = @arch@ --DIST_SUBDIRS = powerpc arm i386 x86_64 parisc mips -+DIST_SUBDIRS = powerpc arm i386 x86_64 parisc mips avr32 - - noinst_LTLIBRARIES = libos.la - libos_la_SOURCES = os.c -diff -urpN jamvm-1.5.0/src/os/linux/Makefile.in jamvm-1.5.0-avr32/src/os/linux/Makefile.in ---- jamvm-1.5.0/src/os/linux/Makefile.in 2007-10-29 07:02:37.000000000 +0100 -+++ jamvm-1.5.0-avr32/src/os/linux/Makefile.in 2008-02-08 09:20:38.000000000 +0100 -@@ -191,7 +191,7 @@ use_zip_no = @use_zip_no@ - use_zip_yes = @use_zip_yes@ - with_classpath_install_dir = @with_classpath_install_dir@ - SUBDIRS = @arch@ --DIST_SUBDIRS = powerpc arm i386 x86_64 parisc mips -+DIST_SUBDIRS = powerpc arm i386 x86_64 parisc mips avr32 - noinst_LTLIBRARIES = libos.la - libos_la_SOURCES = os.c - AM_CPPFLAGS = -I$(top_builddir)/src diff --git a/package/java/jamvm/jamvm.mk b/package/java/jamvm/jamvm.mk deleted file mode 100644 index e7796bbc73..0000000000 --- a/package/java/jamvm/jamvm.mk +++ /dev/null @@ -1,94 +0,0 @@ -############################################################# -# -# jamvm 1.5.0 -# -############################################################# -JAMVM_VERSION = 1.5.0 -JAMVM_SOURCE = jamvm-$(JAMVM_VERSION).tar.gz -JAMVM_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/jamvm/ -JAMVM_AUTORECONF = NO -JAMVM_INSTALL_STAGING = YES -JAMVM_INSTALL_TARGET = YES - -JAMVM_CONF_ENV = ac_cv_func_posix_getpwuid_r=yes glib_cv_stack_grows=no \ - glib_cv_uscore=no ac_cv_func_strtod=yes \ - ac_fsusage_space=yes fu_cv_sys_stat_statfs2_bsize=yes \ - ac_cv_func_closedir_void=no ac_cv_func_getloadavg=no \ - ac_cv_lib_util_getloadavg=no ac_cv_lib_getloadavg_getloadavg=no \ - ac_cv_func_getgroups=yes ac_cv_func_getgroups_works=yes \ - ac_cv_func_chown_works=yes ac_cv_have_decl_euidaccess=no \ - ac_cv_func_euidaccess=no ac_cv_have_decl_strnlen=yes \ - ac_cv_func_strnlen_working=yes ac_cv_func_lstat_dereferences_slashed_symlink=yes \ - ac_cv_func_lstat_empty_string_bug=no ac_cv_func_stat_empty_string_bug=no \ - vb_cv_func_rename_trailing_slash_bug=no ac_cv_have_decl_nanosleep=yes \ - jm_cv_func_nanosleep_works=yes gl_cv_func_working_utimes=yes \ - ac_cv_func_utime_null=yes ac_cv_have_decl_strerror_r=yes \ - ac_cv_func_strerror_r_char_p=no jm_cv_func_svid_putenv=yes \ - ac_cv_func_getcwd_null=yes ac_cv_func_getdelim=yes \ - ac_cv_func_mkstemp=yes utils_cv_func_mkstemp_limitations=no \ - utils_cv_func_mkdir_trailing_slash_bug=no \ - jm_cv_func_gettimeofday_clobber=no \ - gl_cv_func_working_readdir=yes jm_ac_cv_func_link_follows_symlink=no \ - utils_cv_localtime_cache=no ac_cv_struct_st_mtim_nsec=no \ - gl_cv_func_tzset_clobber=no gl_cv_func_getcwd_null=yes \ - gl_cv_func_getcwd_path_max=yes ac_cv_func_fnmatch_gnu=yes \ - am_getline_needs_run_time_check=no am_cv_func_working_getline=yes \ - gl_cv_func_mkdir_trailing_slash_bug=no gl_cv_func_mkstemp_limitations=no \ - ac_cv_func_working_mktime=yes jm_cv_func_working_re_compile_pattern=yes \ - ac_use_included_regex=no gl_cv_c_restrict=no \ - ac_cv_prog_F77=no ac_cv_prog_CXX=no ac_cv_path_CUPS_CONFIG=no - -JAMVM_CONF_OPT = \ - --libexecdir=/usr/lib --localstatedir=/var --mandir=/usr/man \ - --infodir=/usr/info --enable-shared \ - --enable-static \ - --disable-glibtest --enable-explicit-deps=no \ - --disable-debug --with-classpath-install-dir=/usr - - -JAMVM_DEPENDENCIES = host-pkg-config classpath - -#Include X libraries when we have an X server -ifeq ($(BR2_PACKAGE_XORG7),y) - JAMVM_DEPENDENCIES+= xserver_xorg-server - JAMVM_CONF_OPT+= --with-x \ - --x-includes=$(STAGING_DIR)/usr/include/X11 \ - --x-libraries=$(STAGING_DIR)/usr/lib -else - JAMVM_CONF_OPT+= --without-x -endif - - -#Enable or disable alsa -ifeq ($(BR2_PACKAGE_ALSA_LIB),y) - JAMVM_DEPENDENCIES+= alsa-lib - JAMVM_CONF_OPT+= --with-alsa -else - JAMVM_CONF_OPT+= --without-alsa -endif - -#Enable or disable gtk -ifeq ($(BR2_PACKAGE_LIBGTK2),y) - JAMVM_DEPENDENCIES+= libgtk2 - JAMVM_CONF_OPT+= --enable-gtk-peer -else - JAMVM_CONF_OPT+= --disable-gtk-peer -endif - -#Enable or disable qt backend -ifeq ($(BR2_PACKAGE_QT),y) - JAMVM_DEPENDENCIES+= qt - JAMVM_CONF_OPT+= --enable-qt-peer -else - JAMVM_CONF_OPT+= --disable-qt-peer -endif - - -# I have no clue but if this is not passed to configure, the assembler crashes -ifeq ($(BR2_avr32),y) - JAMVM_CONF_OPT+= \ - CFLAGS="-g0" \ - CC="$(STAGING_DIR)/usr/bin/avr32-linux-gcc" -endif - -$(eval $(call AUTOTARGETS,package/java,jamvm)) diff --git a/package/java/java.mk b/package/java/java.mk deleted file mode 100644 index 123a0d09b5..0000000000 --- a/package/java/java.mk +++ /dev/null @@ -1 +0,0 @@ -include package/java/*/*.mk diff --git a/package/jhead/Config.in b/package/jhead/Config.in new file mode 100644 index 0000000000..58498cd6e9 --- /dev/null +++ b/package/jhead/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_JHEAD + bool "jhead" + depends on BR2_USE_WCHAR + help + Jhead is a program for manipulating settings and thumbnails + in Exif jpeg headers used by most Digital Cameras. + + http://www.sentex.net/~mwandel/jhead/ + +comment "jhead needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/jhead/jhead-use-ldflags.patch b/package/jhead/jhead-use-ldflags.patch new file mode 100644 index 0000000000..a1d8185a26 --- /dev/null +++ b/package/jhead/jhead-use-ldflags.patch @@ -0,0 +1,16 @@ +Make jhead use LDFLAGS for the final link. + +Signed-off-by: Gustavo Zacarias + +diff -Nura jhead-2.97.orig/makefile jhead-2.97/makefile +--- jhead-2.97.orig/makefile 2013-03-27 09:22:38.759966389 -0300 ++++ jhead-2.97/makefile 2013-03-27 09:25:06.290691745 -0300 +@@ -14,7 +14,7 @@ + ${CC} $(CFLAGS) -c $< -o $@ + + jhead: $(objs) jhead.h +- ${CC} -o jhead $(objs) -lm ++ ${CC} $(LDFLAGS) -o jhead $(objs) -lm + + clean: + rm -f $(objs) jhead diff --git a/package/jhead/jhead.mk b/package/jhead/jhead.mk new file mode 100644 index 0000000000..27ac5f383f --- /dev/null +++ b/package/jhead/jhead.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# jhead +# +################################################################################ + +JHEAD_VERSION = 2.97 +JHEAD_SITE = http://www.sentex.net/~mwandel/jhead +JHEAD_LICENSE = Public Domain +JHEAD_LICENSE_FILES = readme.txt + +define JHEAD_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define JHEAD_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/jhead $(TARGET_DIR)/usr/bin/jhead +endef + +$(eval $(generic-package)) diff --git a/package/jimtcl/Config.in b/package/jimtcl/Config.in new file mode 100644 index 0000000000..1324590447 --- /dev/null +++ b/package/jimtcl/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_JIMTCL + bool "jimtcl" + help + Jim Tcl is a small footprint reimplementation of the Tcl + scripting language. The core language engine is compatible + with Tcl 8.5+, while implementing a significant subset of + the Tcl 8.6 command set, plus additional features available + only in Jim Tcl. + + http://jim.tcl.tk diff --git a/package/jimtcl/jimtcl.mk b/package/jimtcl/jimtcl.mk new file mode 100644 index 0000000000..53cddf9455 --- /dev/null +++ b/package/jimtcl/jimtcl.mk @@ -0,0 +1,64 @@ +################################################################################ +# +# jimtcl +# +################################################################################ + +JIMTCL_VERSION = 0.73 +JIMTCL_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/j/jimtcl +JIMTCL_SOURCE = jimtcl_$(JIMTCL_VERSION).orig.tar.bz2 +JIMTCL_INSTALL_STAGING = YES +JIMTCL_LICENSE = BSD-2c +JIMTCL_LICENSE_FILES = LICENSE + +JIMTCL_HEADERS_TO_INSTALL = \ + jim.h \ + jim-eventloop.h \ + jim-signal.h \ + jim-subcmd.h \ + jim-win32compat.h \ + jim-config.h \ + +ifeq ($(BR2_PACKAGE_TCL),) +define JIMTCL_LINK_TCLSH + ln -sf jimsh $(TARGET_DIR)/usr/bin/tclsh +endef +endif + +ifeq ($(BR2_PREFER_STATIC_LIB),y) +JIMTCL_SHARED = +JIMTCL_LIB = a +JIMTCL_INSTALL_LIB = +else +JIMTCL_SHARED = --shared +JIMTCL_LIB = so +JIMTCL_INSTALL_LIB = $(INSTALL) -D $(@D)/libjim.$(JIMTCL_LIB) \ + $(TARGET_DIR)/usr/lib/libjim.$(JIMTCL_LIB) +endif + +define JIMTCL_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + ./configure --prefix=/usr \ + $(JIMTCL_SHARED) \ + ) +endef + +define JIMTCL_BUILD_CMDS + $(MAKE) -C $(@D) +endef + +define JIMTCL_INSTALL_STAGING_CMDS + for i in $(JIMTCL_HEADERS_TO_INSTALL); do \ + cp -a $(@D)/$$i $(STAGING_DIR)/usr/include/ ; \ + done; \ + $(INSTALL) -D $(@D)/libjim.$(JIMTCL_LIB) $(STAGING_DIR)/usr/lib/libjim.$(JIMTCL_LIB) +endef + +define JIMTCL_INSTALL_TARGET_CMDS + $(INSTALL) -D $(@D)/jimsh $(TARGET_DIR)/usr/bin/jimsh + $(JIMTCL_INSTALL_LIB) + $(JIMTCL_LINK_TCLSH) +endef + +$(eval $(generic-package)) diff --git a/package/jpeg-turbo/jpeg-turbo.mk b/package/jpeg-turbo/jpeg-turbo.mk new file mode 100644 index 0000000000..ba8c3c377f --- /dev/null +++ b/package/jpeg-turbo/jpeg-turbo.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# jpeg-turbo +# +################################################################################ + +JPEG_TURBO_VERSION = 1.3.0 +JPEG_TURBO_SOURCE = libjpeg-turbo-$(JPEG_TURBO_VERSION).tar.gz +JPEG_TURBO_SITE = http://downloads.sourceforge.net/project/libjpeg-turbo/$(JPEG_TURBO_VERSION) +JPEG_TURBO_INSTALL_STAGING = YES +JPEG_TURBO_CONF_OPT = --with-jpeg8 +JPEG_TURBO_CFLAGS += -O3 + +ifeq ($(BR2_X86_CPU_HAS_MMX)$(BR2_ARM_CPU_HAS_NEON),y) +JPEG_TURBO_CONF_OPT += --with-simd +# x86 simd support needs nasm +JPEG_TURBO_DEPENDENCIES += $(if $(BR2_X86_CPU_HAS_MMX),host-nasm) +else +JPEG_TURBO_CONF_OPT += --without-simd +endif + +define JPEG_TURBO_REMOVE_USELESS_TOOLS + rm -f $(addprefix $(TARGET_DIR)/usr/bin/,cjpeg djpeg jpegtrans rdjpgcom tjbench wrjpgcom) +endef + +JPEG_TURBO_POST_INSTALL_TARGET_HOOKS += JPEG_TURBO_REMOVE_USELESS_TOOLS + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/jpeg/Config.in b/package/jpeg/Config.in index 36d73c51c9..9508faf24d 100644 --- a/package/jpeg/Config.in +++ b/package/jpeg/Config.in @@ -1,6 +1,33 @@ config BR2_PACKAGE_JPEG + bool "jpeg support" + help + Select the desired JPEG library provider. + +if BR2_PACKAGE_JPEG + +choice + prompt "jpeg variant" + default BR2_PACKAGE_JPEG_TURBO if (BR2_X86_CPU_HAS_MMX || BR2_ARM_CPU_HAS_NEON) + help + Select the older stable version, or the newer developer version + +config BR2_PACKAGE_LIBJPEG bool "jpeg" help The ubiquitous C library for manipulating JPEG images. http://www.ijg.org/ + +config BR2_PACKAGE_JPEG_TURBO + bool "jpeg-turbo" + help + Libjpeg-turbo is a derivative of libjpeg that uses SIMD + instructions (MMX, SSE2, NEON) to accelerate baseline JPEG + compression and decompression on x86, x86-64, and ARM + systems. + + http://www.libjpeg-turbo.org + +endchoice + +endif diff --git a/package/jpeg/jpeg.mk b/package/jpeg/jpeg.mk index 860247ce6e..eaa23944c1 100644 --- a/package/jpeg/jpeg.mk +++ b/package/jpeg/jpeg.mk @@ -1,20 +1,24 @@ -############################################################# +################################################################################ # -# jpeg (libraries needed by some apps) +# jpeg # -############################################################# -JPEG_VERSION = 1.2.1 -JPEG_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/libjpeg-turbo -JPEG_SOURCE = libjpeg-turbo-$(JPEG_VERSION).tar.gz -JPEG_INSTALL_STAGING = YES -JPEG_INSTALL_TARGET = YES -JPEG_CONF_OPT = --program-prefix= --with-jpeg8 -JPEG_CFLAGS += -O3 -define JPEG_REMOVE_USELESS_TOOLS - rm -f $(addprefix $(TARGET_DIR)/usr/bin/,cjpeg djpeg jpegtrans rdjpgcom wrjpgcom) -endef +################################################################################ + +JPEG_SOURCE = + +ifeq ($(BR2_PACKAGE_JPEG_TURBO),y) +JPEG_DEPENDENCIES += jpeg-turbo +endif -JPEG_POST_INSTALL_TARGET_HOOKS += JPEG_REMOVE_USELESS_TOOLS +ifeq ($(BR2_PACKAGE_LIBJPEG),y) +JPEG_DEPENDENCIES += libjpeg +endif + +ifeq ($(JPEG_DEPENDENCIES),) +define JPEG_CONFIGURE_CMDS + echo "No JPEG implementation defined. Configuration error" + exit 1 +endef +endif -$(eval $(call AUTOTARGETS,package,jpeg)) -$(eval $(call AUTOTARGETS,package,jpeg,host)) +$(eval $(generic-package)) diff --git a/package/jq/Config.in b/package/jq/Config.in new file mode 100644 index 0000000000..9329b2fb35 --- /dev/null +++ b/package/jq/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_JQ + bool "jq" + help + jq is like sed for JSON data - you can use it to slice and filter + and map and transform structured data with the same ease that sed, + awk, grep and friends let you play with text. + + http://stedolan.github.io/jq/ diff --git a/package/jq/jq.mk b/package/jq/jq.mk new file mode 100644 index 0000000000..8d4f24f0d6 --- /dev/null +++ b/package/jq/jq.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# jq +# +################################################################################ + +JQ_VERSION = jq-1.3 +JQ_SITE = http://github.com/stedolan/jq/tarball/$(JQ_VERSION) +JQ_AUTORECONF = YES +JQ_DEPENDENCIES = host-flex host-bison +JQ_LICENSE = MIT (code), CC-BY-3.0 (documentation) +JQ_LICENSE_FILES = COPYING + +# uses c99 specific features +JQ_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -std=c99" + +$(eval $(autotools-package)) diff --git a/package/jquery-keyboard/Config.in b/package/jquery-keyboard/Config.in new file mode 100644 index 0000000000..e44193ed64 --- /dev/null +++ b/package/jquery-keyboard/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_JQUERY_KEYBOARD + bool "jQuery keyboard" + select BR2_PACKAGE_JQUERY + select BR2_PACKAGE_JQUERY_UI + help + Virtual Keyboard using jQuery UI + + https://github.com/Mottie/Keyboard diff --git a/package/jquery-keyboard/jquery-keyboard.mk b/package/jquery-keyboard/jquery-keyboard.mk new file mode 100644 index 0000000000..41edebf097 --- /dev/null +++ b/package/jquery-keyboard/jquery-keyboard.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# jquery-keyboard +# +################################################################################ + +JQUERY_KEYBOARD_VERSION = v1.17.7 +JQUERY_KEYBOARD_SITE = \ + http://github.com/Mottie/Keyboard/tarball/$(JQUERY_KEYBOARD_VERSION) +JQUERY_KEYBOARD_LICENSE = MIT WTFPL +JQUERY_KEYBOARD_LICENSE_FILES = README.markdown + +define JQUERY_KEYBOARD_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D $(@D)/css/keyboard.css \ + $(TARGET_DIR)/var/www/css/keyboard.css + $(INSTALL) -m 0644 $(@D)/js/jquery.keyboard*.js \ + $(TARGET_DIR)/var/www + $(INSTALL) -m 0644 -D $(@D)/js/jquery.mousewheel.js \ + $(TARGET_DIR)/var/www/jquery.mousewheel.js + $(INSTALL) -m 0755 -d $(TARGET_DIR)/var/www/layouts + $(INSTALL) -m 0644 $(@D)/layouts/*.js \ + $(TARGET_DIR)/var/www/layouts +endef + +$(eval $(generic-package)) diff --git a/package/jquery-sparkline/Config.in b/package/jquery-sparkline/Config.in new file mode 100644 index 0000000000..ae66364aa6 --- /dev/null +++ b/package/jquery-sparkline/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_JQUERY_SPARKLINE + bool "jQuery-Sparkline" + select BR2_PACKAGE_JQUERY + help + This jQuery plugin generates sparklines (small inline + charts) directly in the browser using data supplied either + inline in the HTML, or via javascript. + + The plugin is compatible with most modern browsers and has + been tested with Firefox 2+, Safari 3+, Opera 9, Google + Chrome and Internet Explorer 6, 7 & 8. + + http://www.omnipotent.net/jquery.sparkline/ diff --git a/package/jquery-sparkline/jquery-sparkline.mk b/package/jquery-sparkline/jquery-sparkline.mk new file mode 100644 index 0000000000..a81ce014ad --- /dev/null +++ b/package/jquery-sparkline/jquery-sparkline.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# jquery-sparkline +# +################################################################################ + +JQUERY_SPARKLINE_VERSION = 2.1.2 +JQUERY_SPARKLINE_SITE = http://www.omnipotent.net/jquery.sparkline/$(JQUERY_SPARKLINE_VERSION) +JQUERY_SPARKLINE_SOURCE = jquery.sparkline.min.js +JQUERY_SPARKLINE_LICENSE = BSD-3c + +define JQUERY_SPARKLINE_EXTRACT_CMDS + cp $(DL_DIR)/$(JQUERY_SPARKLINE_SOURCE) $(@D) +endef + +define JQUERY_SPARKLINE_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D $(@D)/$(JQUERY_SPARKLINE_SOURCE) \ + $(TARGET_DIR)/var/www/jquery.sparkline.js +endef + +define JQUERY_SPARKLINE_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/var/www/jquery.sparkline.js +endef + +$(eval $(generic-package)) diff --git a/package/jquery-ui-themes/Config.in b/package/jquery-ui-themes/Config.in new file mode 100644 index 0000000000..5168f375be --- /dev/null +++ b/package/jquery-ui-themes/Config.in @@ -0,0 +1,117 @@ +config BR2_PACKAGE_JQUERY_UI_THEMES + bool "jQuery UI themes" + depends on BR2_PACKAGE_JQUERY_UI + help + Themes for jQuery UI. + + http://jqueryui.com/ + +if BR2_PACKAGE_JQUERY_UI_THEMES + +choice + prompt "theme to install" + help + Specify the jQuery UI theme to install. + + config BR2_PACKAGE_JQUERY_UI_THEME_BLACK_TIE + bool "black-tie" + + config BR2_PACKAGE_JQUERY_UI_THEME_BLITZER + bool "blitzer" + + config BR2_PACKAGE_JQUERY_UI_THEME_CUPERTINO + bool "cupertino" + + config BR2_PACKAGE_JQUERY_UI_THEME_DARK_HIVE + bool "dark-hive" + + config BR2_PACKAGE_JQUERY_UI_THEME_DOT_LUV + bool "dot-luv" + + config BR2_PACKAGE_JQUERY_UI_THEME_EGGPLANT + bool "eggplant" + + config BR2_PACKAGE_JQUERY_UI_THEME_EXCITE_BIKE + bool "excite-bike" + + config BR2_PACKAGE_JQUERY_UI_THEME_FLICK + bool "flick" + + config BR2_PACKAGE_JQUERY_UI_THEME_HOT_SNEAKS + bool "hot-sneaks" + + config BR2_PACKAGE_JQUERY_UI_THEME_HUMANITY + bool "humanity" + + config BR2_PACKAGE_JQUERY_UI_THEME_LE_FROG + bool "le-frog" + + config BR2_PACKAGE_JQUERY_UI_THEME_MINT_CHOC + bool "mint-choc" + + config BR2_PACKAGE_JQUERY_UI_THEME_OVERCAST + bool "overcast" + + config BR2_PACKAGE_JQUERY_UI_THEME_PEPPER_GRINDER + bool "pepper-grinder" + + config BR2_PACKAGE_JQUERY_UI_THEME_REDMOND + bool "redmond" + + config BR2_PACKAGE_JQUERY_UI_THEME_SMOOTHNESS + bool "smoothness" + + config BR2_PACKAGE_JQUERY_UI_THEME_SOUTH_STREET + bool "south-street" + + config BR2_PACKAGE_JQUERY_UI_THEME_START + bool "start" + + config BR2_PACKAGE_JQUERY_UI_THEME_SUNNY + bool "sunny" + + config BR2_PACKAGE_JQUERY_UI_THEME_SWANKY_PURSE + bool "swanky-purse" + + config BR2_PACKAGE_JQUERY_UI_THEME_TRONTASTIC + bool "trontastic" + + config BR2_PACKAGE_JQUERY_UI_THEME_UI_DARKNESS + bool "ui-darkness" + + config BR2_PACKAGE_JQUERY_UI_THEME_UI_LIGHTNESS + bool "ui-lightness" + + config BR2_PACKAGE_JQUERY_UI_THEME_VADER + bool "vader" + +endchoice + +config BR2_PACKAGE_JQUERY_UI_THEMES_THEME + string + default "black-tie" if BR2_PACKAGE_JQUERY_UI_THEME_BLACK_TIE + default "blitzer" if BR2_PACKAGE_JQUERY_UI_THEME_BLITZER + default "cupertino" if BR2_PACKAGE_JQUERY_UI_THEME_CUPERTINO + default "dark-hive" if BR2_PACKAGE_JQUERY_UI_THEME_DARK_HIVE + default "dot-luv" if BR2_PACKAGE_JQUERY_UI_THEME_DOT_LUV + default "eggplant" if BR2_PACKAGE_JQUERY_UI_THEME_EGGPLANT + default "excite-bike" if BR2_PACKAGE_JQUERY_UI_THEME_EXCITE_BIKE + default "flick" if BR2_PACKAGE_JQUERY_UI_THEME_FLICK + default "hot-sneaks" if BR2_PACKAGE_JQUERY_UI_THEME_HOT_SNEAKS + default "humanity" if BR2_PACKAGE_JQUERY_UI_THEME_HUMANITY + default "le-frog" if BR2_PACKAGE_JQUERY_UI_THEME_LE_FROG + default "mint-choc" if BR2_PACKAGE_JQUERY_UI_THEME_MINT_CHOC + default "overcast" if BR2_PACKAGE_JQUERY_UI_THEME_OVERCAST + default "pepper-grinder" if BR2_PACKAGE_JQUERY_UI_THEME_PEPPER_GRINDER + default "redmond" if BR2_PACKAGE_JQUERY_UI_THEME_REDMOND + default "smoothness" if BR2_PACKAGE_JQUERY_UI_THEME_SMOOTHNESS + default "south-street" if BR2_PACKAGE_JQUERY_UI_THEME_SOUTH_STREET + default "start" if BR2_PACKAGE_JQUERY_UI_THEME_START + default "sunny" if BR2_PACKAGE_JQUERY_UI_THEME_SUNNY + default "swanky-purse" if BR2_PACKAGE_JQUERY_UI_THEME_SWANKY_PURSE + default "trontastic" if BR2_PACKAGE_JQUERY_UI_THEME_TRONTASTIC + default "ui-darkness" if BR2_PACKAGE_JQUERY_UI_THEME_UI_DARKNESS + default "ui-lightness" if BR2_PACKAGE_JQUERY_UI_THEME_UI_LIGHTNESS + default "vader" if BR2_PACKAGE_JQUERY_UI_THEME_UI_VADER + +endif diff --git a/package/jquery-ui-themes/jquery-ui-themes.mk b/package/jquery-ui-themes/jquery-ui-themes.mk new file mode 100644 index 0000000000..44fb7f7653 --- /dev/null +++ b/package/jquery-ui-themes/jquery-ui-themes.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# jquery-ui-themes +# +################################################################################ + +JQUERY_UI_THEMES_VERSION = 1.10.3 +JQUERY_UI_THEMES_SITE = http://jqueryui.com/resources/download +JQUERY_UI_THEMES_SOURCE = jquery-ui-themes-$(JQUERY_UI_THEMES_VERSION).zip +JQUERY_UI_THEMES_LICENSE = MIT +JQUERY_UI_THEMES_LICENSE_FILES = MIT-LICENSE.txt +JQUERY_UI_THEMES_DEPENDENCIES = jquery-ui + +define JQUERY_UI_THEMES_EXTRACT_CMDS + unzip -d $(@D) $(DL_DIR)/$(JQUERY_UI_THEMES_SOURCE) + mv $(@D)/jquery-ui-themes-$(JQUERY_UI_THEMES_VERSION)/* $(@D) + $(RM) -r $(@D)/jquery-ui-themes-$(JQUERY_UI_THEMES_VERSION) +endef + +define JQUERY_UI_THEMES_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D \ + $(@D)/themes/$(call qstrip,$(BR2_PACKAGE_JQUERY_UI_THEMES_THEME))/jquery-ui.css \ + $(TARGET_DIR)/var/www/jquery-ui.css + $(INSTALL) -d $(TARGET_DIR)/var/www/images + cp -a $(@D)/themes/$(call qstrip,$(BR2_PACKAGE_JQUERY_UI_THEMES_THEME))/images/*.png \ + $(TARGET_DIR)/var/www/images + chmod 0644 $(TARGET_DIR)/var/www/images/*.png +endef + +define JQUERY_UI_THEMES_UNINSTALL_TARGET_CMDS + $(RM) $(TARGET_DIR)/var/www/jquery-ui.css +endef + +$(eval $(generic-package)) diff --git a/package/jquery-ui/Config.in b/package/jquery-ui/Config.in new file mode 100644 index 0000000000..f1653d5ab8 --- /dev/null +++ b/package/jquery-ui/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_JQUERY_UI + bool "jQuery UI" + select BR2_PACKAGE_JQUERY + help + jQuery UI provides abstractions for low-level interaction and + animation, advanced effects and high-level, themeable widgets, + built on top of the jQuery JavaScript Library, that you can use + to build highly interactive web applications. + + http://jqueryui.com/ diff --git a/package/jquery-ui/jquery-ui.mk b/package/jquery-ui/jquery-ui.mk new file mode 100644 index 0000000000..ece86086f9 --- /dev/null +++ b/package/jquery-ui/jquery-ui.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# jquery-ui +# +################################################################################ + +JQUERY_UI_VERSION = 1.10.3 +JQUERY_UI_SITE = http://jqueryui.com/resources/download +JQUERY_UI_SOURCE = jquery-ui-$(JQUERY_UI_VERSION).zip +JQUERY_UI_LICENSE = MIT +JQUERY_UI_LICENSE_FILES = MIT-LICENSE.txt + +define JQUERY_UI_EXTRACT_CMDS + unzip -d $(@D) $(DL_DIR)/$(JQUERY_UI_SOURCE) + mv $(@D)/jquery-ui-$(JQUERY_UI_VERSION)/* $(@D) + $(RM) -r $(@D)/jquery-ui-$(JQUERY_UI_VERSION) +endef + +define JQUERY_UI_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D $(@D)/ui/minified/jquery-ui.min.js \ + $(TARGET_DIR)/var/www/jquery-ui.js + $(INSTALL) -m 0644 -D $(@D)/ui/minified/i18n/jquery-ui-i18n.min.js \ + $(TARGET_DIR)/var/www/jquery-ui-i18n.js + $(INSTALL) -m 0644 -D $(@D)/themes/base/minified/jquery-ui.min.css \ + $(TARGET_DIR)/var/www/jquery-ui.css + $(INSTALL) -d $(TARGET_DIR)/var/www/images + cp -a $(@D)/themes/base/minified/images/*.png \ + $(TARGET_DIR)/var/www/images + chmod 0644 $(TARGET_DIR)/var/www/images/*.png +endef + +define JQUERY_UI_UNINSTALL_TARGET_CMDS + $(RM) $(addprefix $(TARGET_DIR)/var/www/,\ + jquery-ui.js jquery-ui-i18n.js jquery-ui.css) +endef + +$(eval $(generic-package)) diff --git a/package/jquery-validation/Config.in b/package/jquery-validation/Config.in new file mode 100644 index 0000000000..2a764c1017 --- /dev/null +++ b/package/jquery-validation/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_JQUERY_VALIDATION + bool "jQuery-Validation" + select BR2_PACKAGE_JQUERY + help + The jQuery Validation Plugin provides drop-in validation for + your existing forms, while making all kinds of + customizations to fit your application really easy. + + http://bassistance.de/jquery-plugins/jquery-plugin-validation/ diff --git a/package/jquery-validation/jquery-validation.mk b/package/jquery-validation/jquery-validation.mk new file mode 100644 index 0000000000..71acaff47e --- /dev/null +++ b/package/jquery-validation/jquery-validation.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# jquery-validation +# +################################################################################ + +JQUERY_VALIDATION_VERSION = 1.11.1 +JQUERY_VALIDATION_SITE = http://jquery.bassistance.de/validate +JQUERY_VALIDATION_SOURCE = jquery-validation-$(JQUERY_VALIDATION_VERSION).zip +JQUERY_VALIDATION_LICENSE = MIT + +define JQUERY_VALIDATION_EXTRACT_CMDS + unzip -d $(@D) $(DL_DIR)/$(JQUERY_VALIDATION_SOURCE) +endef + +define JQUERY_VALIDATION_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D $(@D)/dist/jquery.validate.min.js \ + $(TARGET_DIR)/var/www/jquery.validate.js +endef + +define JQUERY_VALIDATION_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/var/www/jquery.validate.js +endef + +$(eval $(generic-package)) diff --git a/package/jquery/Config.in b/package/jquery/Config.in new file mode 100644 index 0000000000..92f5604270 --- /dev/null +++ b/package/jquery/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_JQUERY + bool "jQuery" + help + jQuery is a fast and concise JavaScript Library that + simplifies HTML document traversing, event handling, + animating, and Ajax interactions for rapid web development. + + http://jquery.com diff --git a/package/jquery/jquery.mk b/package/jquery/jquery.mk new file mode 100644 index 0000000000..e76754fbb0 --- /dev/null +++ b/package/jquery/jquery.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# jquery +# +################################################################################ + +JQUERY_VERSION = 1.10.2 +JQUERY_SITE = http://code.jquery.com +JQUERY_SOURCE = jquery-$(JQUERY_VERSION).min.js +JQUERY_LICENSE = MIT + +define JQUERY_EXTRACT_CMDS + cp $(DL_DIR)/$(JQUERY_SOURCE) $(@D) +endef + +define JQUERY_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D $(@D)/$(JQUERY_SOURCE) \ + $(TARGET_DIR)/var/www/jquery.js +endef + +define JQUERY_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/var/www/jquery.js +endef + +$(eval $(generic-package)) diff --git a/package/jsmin/Config.in b/package/jsmin/Config.in new file mode 100644 index 0000000000..d0948b8914 --- /dev/null +++ b/package/jsmin/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_JSMIN + bool "jsmin" + help + JSMin is a filter which removes comments and unnecessary + whitespace from JavaScript files. It typically reduces + filesize by half, resulting in faster downloads. It also + encourages a more expressive programming style because it + eliminates the download cost of clean, literate + self-documentation. + + http://www.crockford.com/javascript/jsmin.html diff --git a/package/jsmin/jsmin.mk b/package/jsmin/jsmin.mk new file mode 100644 index 0000000000..2d18187e96 --- /dev/null +++ b/package/jsmin/jsmin.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# jsmin +# +################################################################################ + +JSMIN_VERSION = a9b47554d5684a55301a2eb7ca8480b7ee7630d4 +JSMIN_SITE = http://github.com/douglascrockford/JSMin/tarball/$(JSMIN_VERSION) + +define JSMIN_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) jsmin +endef + +define JSMIN_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/jsmin $(TARGET_DIR)/usr/bin/jsmin +endef + +define JSMIN_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/bin/jsmin +endef + +define HOST_JSMIN_BUILD_CMDS + $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) jsmin +endef + +define HOST_JSMIN_INSTALL_CMDS + $(INSTALL) -m 0755 -D $(@D)/jsmin $(HOST_DIR)/usr/bin/jsmin +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/json-c/Config.in b/package/json-c/Config.in new file mode 100644 index 0000000000..dbdd75bf58 --- /dev/null +++ b/package/json-c/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_JSON_C + bool "json-c" + help + JSON-C - A JSON implementation in C + + JSON-C implements a reference counting object model that + allows you to easily construct JSON objects in C, output + them as JSON formatted strings and parse JSON formatted + strings back into the C representation of JSON objects. + + http://oss.metaparadigm.com/json-c/ diff --git a/package/json-c/json-c-no-reentrant.patch b/package/json-c/json-c-no-reentrant.patch new file mode 100644 index 0000000000..b8ae6bb249 --- /dev/null +++ b/package/json-c/json-c-no-reentrant.patch @@ -0,0 +1,44 @@ +Do not pass -D_REENTRANT + +This flag is not needed to build this library, and prevents to build +it with toolchains that don't have thread support. + +Since the Makefile.in change is a one-liner, we also do it in the +patch to avoid having to autoreconfigure the package. + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile.am.inc +=================================================================== +--- a/Makefile.am.inc ++++ b/Makefile.am.inc +@@ -1,2 +1,2 @@ +-AM_CFLAGS = -Wall -Werror -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT ++AM_CFLAGS = -Wall -Werror -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE + +Index: b/Makefile.in +=================================================================== +--- a/Makefile.in ++++ b/Makefile.in +@@ -274,7 +274,7 @@ + top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ +-AM_CFLAGS = -Wall -Werror -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT ++AM_CFLAGS = -Wall -Werror -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE + EXTRA_DIST = README.html README-WIN32.html config.h.win32 doc json-c.vcproj + SUBDIRS = . tests + lib_LTLIBRARIES = libjson-c.la $(am__append_1) +Index: b/tests/Makefile.in +=================================================================== +--- a/tests/Makefile.in ++++ b/tests/Makefile.in +@@ -228,7 +228,7 @@ + top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ +-AM_CFLAGS = -Wall -Werror -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT ++AM_CFLAGS = -Wall -Werror -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE + LIBJSON_LA = $(top_builddir)/libjson-c.la + test1_LDADD = $(LIBJSON_LA) + test1Formatted_LDADD = $(LIBJSON_LA) diff --git a/package/json-c/json-c.mk b/package/json-c/json-c.mk new file mode 100644 index 0000000000..0a2f70e16d --- /dev/null +++ b/package/json-c/json-c.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# json-c +# +################################################################################ + +JSON_C_VERSION = 0.11 +JSON_C_SITE = https://s3.amazonaws.com/json-c_releases/releases/ +JSON_C_INSTALL_STAGING = YES +JSON_C_MAKE = $(MAKE1) +JSON_C_CONF_OPT = --disable-oldname-compat +JSON_C_LICENSE = MIT +JSON_C_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/json-glib/Config.in b/package/json-glib/Config.in new file mode 100644 index 0000000000..ea15295b38 --- /dev/null +++ b/package/json-glib/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_JSON_GLIB + bool "json-glib" + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT + help + JSON-GLib is a library providing serialization and + deserialization support for the JavaScript Object Notation + (JSON) format described by RFC 4627. + + https://live.gnome.org/JsonGlib/ + +comment "json-glib needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/json-glib/json-glib.mk b/package/json-glib/json-glib.mk new file mode 100644 index 0000000000..24cc9ab39b --- /dev/null +++ b/package/json-glib/json-glib.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# json-glib +# +################################################################################ + +JSON_GLIB_MAJOR_VERSION = 0.14 +JSON_GLIB_MINOR_VERSION = 2 +JSON_GLIB_VERSION = $(JSON_GLIB_MAJOR_VERSION).$(JSON_GLIB_MINOR_VERSION) +JSON_GLIB_SITE = http://ftp.gnome.org/pub/GNOME/sources/json-glib/$(JSON_GLIB_MAJOR_VERSION) +JSON_GLIB_SOURCE = json-glib-$(JSON_GLIB_VERSION).tar.xz +JSON_GLIB_LICENSE = LGPLv2.1+ +JSON_GLIB_LICENSE_FILES = COPYING +JSON_GLIB_INSTALL_STAGING = YES + +JSON_GLIB_DEPENDENCIES = \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \ + host-pkgconf \ + libglib2 + +$(eval $(autotools-package)) diff --git a/package/json-javascript/Config.in b/package/json-javascript/Config.in new file mode 100644 index 0000000000..501c54f3d1 --- /dev/null +++ b/package/json-javascript/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_JSON_JAVASCRIPT + bool "json-javascript" + help + JSON in JavaScript + + https://github.com/douglascrockford/JSON-js/ diff --git a/package/json-javascript/json-javascript.mk b/package/json-javascript/json-javascript.mk new file mode 100644 index 0000000000..b40d61b39d --- /dev/null +++ b/package/json-javascript/json-javascript.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# json-javascript +# +################################################################################ + +JSON_JAVASCRIPT_VERSION = 42c18c621a411c3f39a81bb0a387fc50dcd738d9 +JSON_JAVASCRIPT_SITE = git://github.com/douglascrockford/JSON-js.git +JSON_JAVASCRIPT_LICENSE = Public Domain +JSON_JAVASCRIPT_LICENSE_FILES = json2.js + +define JSON_JAVASCRIPT_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D $(@D)/json2.js $(TARGET_DIR)/var/www/json2.js +endef + +define JSON_JAVASCRIPT_UNINSTALL_TARGET_CMDS + $(RM) $(TARGET_DIR)/var/www/json2.js +endef + +$(eval $(generic-package)) diff --git a/package/kbd/Config.in b/package/kbd/Config.in index b6d13b587d..44c3163388 100644 --- a/package/kbd/Config.in +++ b/package/kbd/Config.in @@ -1,5 +1,8 @@ config BR2_PACKAGE_KBD bool "kbd" + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + # Uses fork() + depends on BR2_USE_MMU help Keytable files and keyboard utilities. diff --git a/package/kbd/kbd-link-against-libintl.patch b/package/kbd/kbd-link-against-libintl.patch new file mode 100644 index 0000000000..39fd461cc4 --- /dev/null +++ b/package/kbd/kbd-link-against-libintl.patch @@ -0,0 +1,34 @@ +Make sure we link against libintl if needed + +We modify directly the Makefile.in so that we don't have to +autoreconfigure the package, which doesn't work because packages using +gettext need the autopoint tool for their autoregeneration step and +this thing doesn't work (yet) in Buildroot. + +Signed-off-by: Thomas Petazzoni + +Index: kbd-1.15.2/src/Makefile.am +=================================================================== +--- kbd-1.15.2.orig/src/Makefile.am 2011-05-22 16:08:51.144530776 +0200 ++++ kbd-1.15.2/src/Makefile.am 2011-05-22 16:09:09.892530778 +0200 +@@ -5,6 +5,8 @@ + AM_CPPFLAGS = -DDATADIR=\"$(datadir)\" -DLOCALEDIR=\"$(localedir)\" $(WARNINGS) \ + -funit-at-a-time + ++LDADD = @INTLLIBS@ ++ + OLDPROGS = mapscrn loadunimap + PROGS = \ + dumpkeys loadkeys showkey setfont showconsolefont \ +Index: kbd-1.15.2/src/Makefile.in +=================================================================== +--- kbd-1.15.2.orig/src/Makefile.in 2011-05-22 16:10:27.540530777 +0200 ++++ kbd-1.15.2/src/Makefile.in 2011-05-22 16:10:51.172530778 +0200 +@@ -26,6 +26,7 @@ + install_sh_PROGRAM = $(install_sh) -c + install_sh_SCRIPT = $(install_sh) -c + INSTALL_HEADER = $(INSTALL_DATA) ++LDADD = @INTLLIBS@ + transform = $(program_transform_name) + NORMAL_INSTALL = : + PRE_INSTALL = : diff --git a/package/kbd/kbd.mk b/package/kbd/kbd.mk new file mode 100644 index 0000000000..ea14b8c54b --- /dev/null +++ b/package/kbd/kbd.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# kbd +# +################################################################################ + +KBD_VERSION = 1.15.2 +KBD_SOURCE = kbd-$(KBD_VERSION).tar.xz +KBD_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/kbd +KBD_LICENSE = GPLv2+ +KBD_LICENSE_FILES = COPYING + +KBD_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) + +$(eval $(autotools-package)) diff --git a/package/kbd/kdb.mk b/package/kbd/kdb.mk deleted file mode 100644 index 526e1ffb05..0000000000 --- a/package/kbd/kdb.mk +++ /dev/null @@ -1,5 +0,0 @@ -KBD_VERSION = 1.15.2 -KBD_SOURCE = kbd-$(KBD_VERSION).tar.gz -KBD_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/kbd - -$(eval $(call AUTOTARGETS,package,kbd)) diff --git a/package/kexec/Config.in b/package/kexec/Config.in index f028480433..66bc343c9c 100644 --- a/package/kexec/Config.in +++ b/package/kexec/Config.in @@ -1,13 +1,16 @@ config BR2_PACKAGE_KEXEC bool "kexec" + depends on BR2_i386 || BR2_x86_64 || BR2_arm || BR2_armeb || \ + BR2_mips || BR2_mips64 || BR2_mipsel || BR2_mips64el || \ + BR2_powerpc || BR2_sh4 || BR2_sh4a || BR2_sh3 help Kexec is a user space utiltity for loading another kernel and asking the currently running kernel to do something with it. - http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/ + https://www.kernel.org/pub/linux/utils/kernel/kexec/ config BR2_PACKAGE_KEXEC_ZLIB - bool "Kexec with zlib support" + bool "zlib support" depends on BR2_PACKAGE_KEXEC select BR2_PACKAGE_ZLIB help diff --git a/package/kexec/kexec-largefile.patch b/package/kexec/kexec-largefile.patch new file mode 100644 index 0000000000..74dd8e2cdc --- /dev/null +++ b/package/kexec/kexec-largefile.patch @@ -0,0 +1,22 @@ +[PATCH] vmcore-dmesg: don't enforce largefile handling + +Breaks build on !largefile toolchains. + +Instead simply use whatever mode is selected by toolchain / CFLAGS. + +Signed-off-by: Peter Korsgaard +--- + vmcore-dmesg/vmcore-dmesg.c | 2 -- + 1 file changed, 2 deletions(-) + +Index: kexec-tools-2.0.3/vmcore-dmesg/vmcore-dmesg.c +=================================================================== +--- kexec-tools-2.0.3.orig/vmcore-dmesg/vmcore-dmesg.c ++++ kexec-tools-2.0.3/vmcore-dmesg/vmcore-dmesg.c +@@ -1,6 +1,4 @@ + #define _XOPEN_SOURCE 600 +-#define _LARGEFILE_SOURCE 1 +-#define _FILE_OFFSET_BITS 64 + #include + #include + #include diff --git a/package/kexec/kexec.mk b/package/kexec/kexec.mk index 43a0614b55..6ddf435102 100644 --- a/package/kexec/kexec.mk +++ b/package/kexec/kexec.mk @@ -1,10 +1,11 @@ -############################################################# +################################################################################ # # kexec # -############################################################# -KEXEC_VERSION = 2.0.2 -KEXEC_SOURCE = kexec-tools-$(KEXEC_VERSION).tar.bz2 +################################################################################ + +KEXEC_VERSION = 2.0.4 +KEXEC_SOURCE = kexec-tools-$(KEXEC_VERSION).tar.xz KEXEC_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/kernel/kexec ifeq ($(BR2_PACKAGE_KEXEC_ZLIB),y) @@ -20,4 +21,4 @@ endef KEXEC_POST_INSTALL_TARGET_HOOKS += KEXEC_REMOVE_LIB_TOOLS -$(eval $(call AUTOTARGETS,package,kexec)) +$(eval $(autotools-package)) diff --git a/package/keyutils/Config.in b/package/keyutils/Config.in new file mode 100644 index 0000000000..bae8568bf6 --- /dev/null +++ b/package/keyutils/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_KEYUTILS + bool "keyutils" + depends on !BR2_avr32 && !BR2_microblaze + depends on BR2_USE_MMU # fork() + help + These tools are used to control the key management system + built into the Linux kernel. + + http://people.redhat.com/~dhowells/keyutils/ diff --git a/package/keyutils/keyutils-01-memleak-from-realloc.patch b/package/keyutils/keyutils-01-memleak-from-realloc.patch new file mode 100644 index 0000000000..0faa9d8604 --- /dev/null +++ b/package/keyutils/keyutils-01-memleak-from-realloc.patch @@ -0,0 +1,51 @@ +Patch vampirised from Debian's packaging of keyutils-1.4 + +Author: Michael Gebetsroither +Description: Fixed memleak from realloc (Closes: #496466). + +diff -Naurp keyutils.orig/keyutils.c keyutils/keyutils.c +--- keyutils.orig/keyutils.c 2008-08-09 21:46:52.000000000 +0200 ++++ keyutils/keyutils.c 2008-08-25 13:38:07.000000000 +0200 +@@ -165,6 +165,24 @@ long keyctl_assume_authority(key_serial_ + return keyctl(KEYCTL_ASSUME_AUTHORITY, id); + } + ++ ++/*****************************************************************************/ ++/* ++ * plain realloc is just crazy ++ */ ++static void* __xrealloc(void* ptr, size_t size) ++{ ++ void* ret; ++ ++ ret = realloc(ptr, size); ++ if(!ret) { ++ free(ptr); ++ return 0; ++ } ++ return ret; ++} ++ ++ + /*****************************************************************************/ + /* + * fetch key description into an allocated buffer +@@ -194,7 +212,7 @@ int keyctl_describe_alloc(key_serial_t i + break; + + buflen = ret; +- buf = realloc(buf, buflen); ++ buf = __xrealloc(buf, buflen); + if (!buf) + return -1; + } +@@ -233,7 +251,7 @@ int keyctl_read_alloc(key_serial_t id, v + break; + + buflen = ret; +- buf = realloc(buf, buflen + 1); ++ buf = __xrealloc(buf, buflen + 1); + if (!buf) + return -1; + } diff --git a/package/keyutils/keyutils-02-another-memleak.patch b/package/keyutils/keyutils-02-another-memleak.patch new file mode 100644 index 0000000000..f74fd79ba5 --- /dev/null +++ b/package/keyutils/keyutils-02-another-memleak.patch @@ -0,0 +1,32 @@ +Patch vampirised from Debian's packaging of keyutils-1.4 + +Author: Michael Gebetsroither +Description: Fixed another memleak (Closes: #496466). + +diff -Naurp keyutils.orig/keyutils.c keyutils/keyutils.c +--- keyutils.orig/keyutils.c 2008-08-09 21:46:52.000000000 +0200 ++++ keyutils/keyutils.c 2008-08-25 13:38:25.000000000 +0200 +@@ -187,8 +187,10 @@ int keyctl_describe_alloc(key_serial_t i + + for (;;) { + ret = keyctl_describe(id, buf, buflen); +- if (ret < 0) ++ if (ret < 0) { ++ free(buf); + return -1; ++ } + + if (buflen >= ret) + break; +@@ -226,8 +228,10 @@ int keyctl_read_alloc(key_serial_t id, v + + for (;;) { + ret = keyctl_read(id, buf, buflen); +- if (ret < 0) ++ if (ret < 0) { ++ free(buf); + return -1; ++ } + + if (buflen >= ret) + break; diff --git a/package/keyutils/keyutils-03-cifs.patch b/package/keyutils/keyutils-03-cifs.patch new file mode 100644 index 0000000000..b2903f971f --- /dev/null +++ b/package/keyutils/keyutils-03-cifs.patch @@ -0,0 +1,15 @@ +Patch vampirised from Debian's packaging of keyutils-1.4 + +Author: Marcus Meissner +Description: Added 2 cifs helpers to request-key.conf (for CIFS DFS support) + +diff -Naurp keyutils.orig/request-key.conf keyutils/request-key.conf +--- keyutils.orig/request-key.conf 2008-09-07 23:53:10.000000000 +0000 ++++ keyutils/request-key.conf 2009-02-05 00:53:00.000000000 +0000 +@@ -34,4 +34,6 @@ + create user debug:* negate /bin/keyctl negate %k 30 %S + create user debug:loop:* * |/bin/cat + create user debug:* * /usr/share/keyutils/request-key-debug.sh %k %d %c %S ++create cifs.spnego * * /usr/sbin/cifs.upcall -c %k ++create dns_resolver * * /usr/sbin/cifs.upcall %k + negate * * * /bin/keyctl negate %k 30 %S diff --git a/package/keyutils/keyutils-04-Makefile-for-buildroot.patch b/package/keyutils/keyutils-04-Makefile-for-buildroot.patch new file mode 100644 index 0000000000..e10abd55cc --- /dev/null +++ b/package/keyutils/keyutils-04-Makefile-for-buildroot.patch @@ -0,0 +1,65 @@ +diff -durN keyutils-1.5.5.orig/Makefile keyutils-1.5.5/Makefile +--- keyutils-1.5.5.orig/Makefile 2011-11-30 16:27:43.000000000 +0100 ++++ keyutils-1.5.5/Makefile 2012-08-14 17:06:07.064412101 +0200 +@@ -1,7 +1,5 @@ +-CPPFLAGS := -I. +-CFLAGS := -g -Wall -Werror +-INSTALL := install +-DESTDIR := ++CPPFLAGS += -I. ++CFLAGS += -g -Wall -Werror + SPECFILE := keyutils.spec + NO_GLIBC_KEYERR := 0 + NO_ARLIB := 0 +@@ -14,7 +12,7 @@ + MAN5 := /usr/share/man/man5 + MAN8 := /usr/share/man/man8 + INCLUDEDIR := /usr/include +-LNS := ln -sf ++LNS := $(LN) -sf + + ############################################################################### + # +@@ -48,29 +46,6 @@ + + ############################################################################### + # +-# Guess at the appropriate lib directory and word size +-# +-############################################################################### +-LIBDIR := $(shell ldd /usr/bin/make | grep '\(/libc\)' | sed -e 's!.*\(/.*\)/libc[.].*!\1!') +-USRLIBDIR := $(patsubst /lib/%,/usr/lib/%,$(LIBDIR)) +-BUILDFOR := $(shell file /usr/bin/make | sed -e 's!.*ELF \(32\|64\)-bit.*!\1!')-bit +- +-LNS := ln -sf +- +-ifeq ($(BUILDFOR),32-bit) +-CFLAGS += -m32 +-LIBDIR := /lib +-USRLIBDIR := /usr/lib +-else +-ifeq ($(BUILDFOR),64-bit) +-CFLAGS += -m64 +-LIBDIR := /lib64 +-USRLIBDIR := /usr/lib64 +-endif +-endif +- +-############################################################################### +-# + # This is necessary if glibc doesn't know about the key management error codes + # + ############################################################################### +@@ -110,10 +85,10 @@ + + + $(DEVELLIB): $(SONAME) +- ln -sf $< $@ ++ $(LNS) $< $@ + + $(SONAME): $(LIBNAME) +- ln -sf $< $@ ++ $(LNS) $< $@ + + LIBVERS := -shared -Wl,-soname,$(SONAME) -Wl,--version-script,version.lds + diff --git a/package/keyutils/keyutils-05-fix-install-rule.patch b/package/keyutils/keyutils-05-fix-install-rule.patch new file mode 100644 index 0000000000..74e5670cf6 --- /dev/null +++ b/package/keyutils/keyutils-05-fix-install-rule.patch @@ -0,0 +1,19 @@ +Makefile: fix install rule + +Do not link the .so with an absolute path, otherwise it may point to +the host library. + +Signed-off-by: "Yann E. MORIN" + +diff -durN keyutils-1.5.5.orig/Makefile keyutils-1.5.5/Makefile +--- keyutils-1.5.5.orig/Makefile 2012-10-22 20:11:57.188548033 +0200 ++++ keyutils-1.5.5/Makefile 2012-10-22 20:14:40.868236838 +0200 +@@ -127,7 +127,7 @@ + $(INSTALL) -D $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME) + $(LNS) $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME) + mkdir -p $(DESTDIR)$(USRLIBDIR) +- $(LNS) $(LIBDIR)/$(SONAME) $(DESTDIR)$(USRLIBDIR)/$(DEVELLIB) ++ $(LNS) $(SONAME) $(DESTDIR)$(USRLIBDIR)/$(DEVELLIB) + $(INSTALL) -D keyctl $(DESTDIR)$(BINDIR)/keyctl + $(INSTALL) -D request-key $(DESTDIR)$(SBINDIR)/request-key + $(INSTALL) -D request-key-debug.sh $(DESTDIR)$(SHAREDIR)/request-key-debug.sh diff --git a/package/keyutils/keyutils.mk b/package/keyutils/keyutils.mk new file mode 100644 index 0000000000..7097529c3b --- /dev/null +++ b/package/keyutils/keyutils.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# keyutils +# +################################################################################ + +KEYUTILS_VERSION = 1.5.5 +KEYUTILS_SOURCE = keyutils-$(KEYUTILS_VERSION).tar.bz2 +KEYUTILS_SITE = http://people.redhat.com/~dhowells/keyutils +KEYUTILS_LICENSE = GPLv2+ LGPLv2.1+ +KEYUTILS_LICENSE_FILES = LICENCE.GPL LICENCE.LGPL +KEYUTILS_INSTALL_STAGING = YES + +KEYUTILS_MAKE_ENV = \ + INSTALL=$(INSTALL) \ + LIBDIR=/usr/lib \ + USRLIBDIR=/usr/lib \ + LN=$(HOSTLN) \ + +define KEYUTILS_BUILD_CMDS + $(KEYUTILS_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define KEYUTILS_INSTALL_STAGING_CMDS + $(KEYUTILS_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install +endef + +define KEYUTILS_INSTALL_TARGET_CMDS + $(KEYUTILS_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/kismet/Config.in b/package/kismet/Config.in index 6954665421..fc9103dea7 100644 --- a/package/kismet/Config.in +++ b/package/kismet/Config.in @@ -1,12 +1,16 @@ -comment "Kismet requires a toolchain with C++ support enabled" - depends on !BR2_INSTALL_LIBSTDCPP +comment "kismet needs a toolchain w/ threads, C++" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS config BR2_PACKAGE_KISMET bool "kismet" depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS # libnl + depends on BR2_USE_MMU # fork() select BR2_PACKAGE_NCURSES select BR2_PACKAGE_NCURSES_TARGET_PANEL select BR2_PACKAGE_LIBPCAP + select BR2_PACKAGE_LIBNL help Kismet - 802.11 layer2 wireless network detector, sniffer, and intrusion detection system. diff --git a/package/kismet/kismet-libnl-30-support.patch b/package/kismet/kismet-libnl-30-support.patch deleted file mode 100644 index cf3c845f66..0000000000 --- a/package/kismet/kismet-libnl-30-support.patch +++ /dev/null @@ -1,123 +0,0 @@ ---- - configure | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 78 insertions(+), 1 deletion(-) - -Index: b/configure -=================================================================== ---- a/configure -+++ b/configure -@@ -601,6 +601,8 @@ - libnl1_CFLAGS - libnl20_LIBS - libnl20_CFLAGS -+libnl30_LIBS -+libnl30_CFLAGS - PKG_CONFIG_LIBDIR - PKG_CONFIG_PATH - PKG_CONFIG -@@ -712,6 +714,8 @@ - PKG_CONFIG - PKG_CONFIG_PATH - PKG_CONFIG_LIBDIR -+libnl30_CFLAGS -+libnl30_LIBS - libnl20_CFLAGS - libnl20_LIBS - libnl1_CFLAGS -@@ -1361,6 +1365,10 @@ - directories to add to pkg-config's search path - PKG_CONFIG_LIBDIR - path overriding pkg-config's built-in search path -+ libnl30_CFLAGS -+ C compiler flags for libnl30, overriding pkg-config -+ libnl30_LIBS -+ linker flags for libnl30, overriding pkg-config - libnl20_CFLAGS - C compiler flags for libnl20, overriding pkg-config - libnl20_LIBS -@@ -6760,6 +6768,75 @@ - fi - fi - -+#libnl-3.0 -+pkg_failed=no -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnl30" >&5 -+$as_echo_n "checking for libnl30... " >&6; } -+ -+if test -n "$libnl30_CFLAGS"; then -+ pkg_cv_libnl20_CFLAGS="$libnl30_CFLAGS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-3.0\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "libnl-3.0") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then -+ pkg_cv_libnl30_CFLAGS=`$PKG_CONFIG --cflags "libnl-3.0" 2>/dev/null` -+else -+ pkg_failed=yes -+fi -+ else -+ pkg_failed=untried -+fi -+if test -n "$libnl30_LIBS"; then -+ pkg_cv_libnl20_LIBS="$libnl30_LIBS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-3.0\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "libnl-3.0") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then -+ pkg_cv_libnl30_LIBS=`$PKG_CONFIG --libs "libnl-3.0" 2>/dev/null` -+else -+ pkg_failed=yes -+fi -+ else -+ pkg_failed=untried -+fi -+ -+if test $pkg_failed = yes; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ -+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -+ _pkg_short_errors_supported=yes -+else -+ _pkg_short_errors_supported=no -+fi -+ if test $_pkg_short_errors_supported = yes; then -+ libnl30_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libnl-3.0" 2>&1` -+ else -+ libnl30_PKG_ERRORS=`$PKG_CONFIG --print-errors "libnl-3.0" 2>&1` -+ fi -+ # Put the nasty error message in config.log where it belongs -+ echo "$libnl30_PKG_ERRORS" >&5 -+ -+ libnl30=no -+elif test $pkg_failed = untried; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ libnl30=no -+else -+ libnl30_CFLAGS=$pkg_cv_libnl30_CFLAGS -+ libnl30_LIBS=$pkg_cv_libnl30_LIBS -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+ libnl30=yes -+fi -+ -+# libnl-2.0 - pkg_failed=no - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnl20" >&5 - $as_echo_n "checking for libnl20... " >&6; } -@@ -6897,7 +6974,7 @@ - $as_echo "yes" >&6; } - libnl1=yes - fi -- if test "$libnl20" = "yes"; then -+ if test "$libnl20" = "yes" -o "$libnl30" = "yes"; then - - $as_echo "#define HAVE_LIBNL 1" >>confdefs.h - - diff --git a/package/kismet/kismet.mk b/package/kismet/kismet.mk index b143ef3816..8c0599679e 100644 --- a/package/kismet/kismet.mk +++ b/package/kismet/kismet.mk @@ -1,16 +1,17 @@ -############################################################# +################################################################################ # # kismet # -############################################################# +################################################################################ -KISMET_VERSION = 2011-03-R2 +KISMET_VERSION = 2013-03-R1b +KISMET_SOURCE = kismet-$(KISMET_VERSION).tar.xz KISMET_SITE = http://www.kismetwireless.net/code -KISMET_DEPENDENCIES = libpcap ncurses +KISMET_DEPENDENCIES = host-pkgconf libpcap ncurses libnl +KISMET_CONF_OPT += --with-netlink-version=3 +KISMET_LICENSE = GPLv2+ +KISMET_LICENSE_FILES = debian/copyright -ifeq ($(BR2_PACKAGE_LIBNL),y) - KISMET_DEPENDENCIES += libnl -endif ifeq ($(BR2_PACKAGE_PCRE),y) KISMET_DEPENDENCIES += pcre endif @@ -63,4 +64,4 @@ define KISMET_UNINSTALL_TARGET_CMDS $(KISMET_UNINSTALL_TARGET_CONFIGS) endef -$(eval $(call AUTOTARGETS,package,kismet)) +$(eval $(autotools-package)) diff --git a/package/kmod/Config.in b/package/kmod/Config.in new file mode 100644 index 0000000000..bd44316caf --- /dev/null +++ b/package/kmod/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_KMOD + bool "kmod" + depends on !BR2_PREFER_STATIC_LIB + help + handle kernel modules + + http://git.kernel.org/?p=utils/kernel/kmod/kmod.git + +config BR2_PACKAGE_KMOD_TOOLS + bool "kmod utilities" + depends on BR2_PACKAGE_KMOD + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + help + Install kmod module utilities (depmod, insmod, lsmod, + modinfo, modprobe, rmmod). diff --git a/package/kmod/kmod-0001-Add-configure-check-for-_Static_assert.patch b/package/kmod/kmod-0001-Add-configure-check-for-_Static_assert.patch new file mode 100644 index 0000000000..2def358a6f --- /dev/null +++ b/package/kmod/kmod-0001-Add-configure-check-for-_Static_assert.patch @@ -0,0 +1,57 @@ +From d4a1e5daf0d50aa79ae0ed2f947f5657343cf2f7 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 28 Aug 2013 17:31:40 +0200 +Subject: [PATCH] Add configure check for _Static_assert() + +Commit 8efede20ef ("Use _Static_assert") introduced the usage of +_Static_assert(). However, _Static_assert() is a fairly new thing, +since it was introduced only in gcc 4.6. In order to support older +compilers, this patch adds a configure.in test that checks whether +_Static_assert() is usable or not, and adjust the behavior of the +assert_cc() macro accordingly. + +Signed-off-by: Thomas Petazzoni +Upstream-status: submitted + http://article.gmane.org/gmane.linux.kernel.modules/1136 +--- + configure.ac | 6 ++++++ + libkmod/macro.h | 4 ++++ + 2 files changed, 10 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 40e54cf..cbe12f3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -52,6 +52,12 @@ AC_CHECK_MEMBERS([struct stat.st_mtim], [], [], [#include ]) + # Check kernel headers + AC_CHECK_HEADERS_ONCE([linux/module.h]) + ++AC_MSG_CHECKING([whether _Static_assert() is supported]) ++AC_COMPILE_IFELSE( ++ [AC_LANG_SOURCE([[_Static_assert(1, "Test");]])], ++ [AC_DEFINE([HAVE_STATIC_ASSERT], [1], [Define is _Static_assert() is available]) ++ AC_MSG_RESULT([yes])], ++ [AC_MSG_RESULT([no])]) + + ##################################################################### + # --with- +diff --git a/libkmod/macro.h b/libkmod/macro.h +index c6ba855..5992026 100644 +--- a/libkmod/macro.h ++++ b/libkmod/macro.h +@@ -21,8 +21,12 @@ + + #include + ++#if defined(HAVE_STATIC_ASSERT) + #define assert_cc(expr) \ + _Static_assert((expr), #expr) ++#else ++#define assert_cc(expr) ++#endif + + #if HAVE_TYPEOF + #define check_types_match(expr1, expr2) \ +-- +1.8.1.2 + diff --git a/package/kmod/kmod.mk b/package/kmod/kmod.mk new file mode 100644 index 0000000000..77fbe0be04 --- /dev/null +++ b/package/kmod/kmod.mk @@ -0,0 +1,72 @@ +################################################################################ +# +# kmod +# +################################################################################ + +KMOD_VERSION = 15 +KMOD_SOURCE = kmod-$(KMOD_VERSION).tar.xz +KMOD_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/kernel/kmod/ +KMOD_INSTALL_STAGING = YES +KMOD_DEPENDENCIES = host-pkgconf +HOST_KMOD_DEPENDENCIES = host-pkgconf + +# Some patches are touching configure.ac +KMOD_AUTORECONF = YES + +# license info for libkmod only, conditionally add more below +KMOD_LICENSE = LGPLv2.1+ +KMOD_LICENSE_FILES = libkmod/COPYING + +# static linking not supported, see +# https://git.kernel.org/cgit/utils/kernel/kmod/kmod.git/commit/?id=b7016153ec8 +KMOD_CONF_OPT = --disable-static --enable-shared + +# manpages not installed to host and needs xsltproc +HOST_KMOD_CONF_OPT = --disable-manpages + +ifneq ($(BR2_HAVE_DOCUMENTATION),y) +KMOD_CONF_OPT += --disable-manpages +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +KMOD_DEPENDENCIES += zlib +KMOD_CONF_OPT += --with-zlib +endif + +ifeq ($(BR2_PACKAGE_XZ),y) +KMOD_DEPENDENCIES += xz +KMOD_CONF_OPT += --with-xz +endif + +ifeq ($(BR2_PACKAGE_KMOD_TOOLS),y) + +# add license info for kmod tools +KMOD_LICENSE += GPLv2+ +KMOD_LICENSE_FILES += COPYING + +# take precedence over busybox implementation +KMOD_DEPENDENCIES += $(if $(BR2_PACKAGE_BUSYBOX),busybox) + +define KMOD_INSTALL_TOOLS + for i in depmod insmod lsmod modinfo modprobe rmmod; do \ + ln -sf ../usr/bin/kmod $(TARGET_DIR)/sbin/$$i; \ + done +endef + +KMOD_POST_INSTALL_TARGET_HOOKS += KMOD_INSTALL_TOOLS +else +KMOD_CONF_OPT += --disable-tools +endif + +# We only install depmod, since that's the only tool used for the +# host. +define HOST_KMOD_INSTALL_TOOLS + mkdir -p $(HOST_DIR)/sbin/ + ln -sf ../usr/bin/kmod $(HOST_DIR)/sbin/depmod +endef + +HOST_KMOD_POST_INSTALL_HOOKS += HOST_KMOD_INSTALL_TOOLS + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/knock/Config.in b/package/knock/Config.in new file mode 100644 index 0000000000..8778a7e3fd --- /dev/null +++ b/package/knock/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_KNOCK + bool "knock" + select BR2_PACKAGE_LIBPCAP + depends on BR2_USE_MMU # fork() + help + A port knocking implementation. + Provides a daemon and a user application. Port knocking can be + used to run an arbitrary application, once the daemon detects + a predefined sequence of incoming TCP/UDP packets on a network + interface. This can be used, e.g. to open up ports in a + firewall. + + http://www.zeroflux.org/projects/knock diff --git a/package/knock/knock.mk b/package/knock/knock.mk new file mode 100644 index 0000000000..5fcf414538 --- /dev/null +++ b/package/knock/knock.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# knock +# +################################################################################ + +KNOCK_VERSION = 7666f2e86e18d482eaad5fe1fea46d87d80b0555 +KNOCK_SITE = https://github.com/jvinet/knock/tarball/master +KNOCK_LICENSE = GPLv2+ +KNOCK_LICENSE_FILES = COPYING +KNOCK_AUTORECONF = YES +KNOCK_DEPENDENCIES = libpcap + +$(eval $(autotools-package)) diff --git a/package/kobs-ng/Config.in b/package/kobs-ng/Config.in new file mode 100644 index 0000000000..1f6b2d16cc --- /dev/null +++ b/package/kobs-ng/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_KOBS_NG + bool "kobs-ng" + depends on BR2_arm + help + The kobs-ng tool is used for writing images to NAND on i.MX + platforms. + + This utility is provided by Freescale as-is and doesn't have an + upstream. diff --git a/package/kobs-ng/kobs-ng-0001-fix-mtd-defines.patch b/package/kobs-ng/kobs-ng-0001-fix-mtd-defines.patch new file mode 100644 index 0000000000..3ffba7166d --- /dev/null +++ b/package/kobs-ng/kobs-ng-0001-fix-mtd-defines.patch @@ -0,0 +1,73 @@ +Newer kernel headers renamed mtd mode defines and no longer support +MEMSETOOBSEL. Allow code to work with both older and newer kernel +versions. + +Signed-off-by: Paul B. Henson +Signed-off-by: Sergey Alyoshin + +diff -u -r kobs-ng-3.0.35-4.0.0-orig/src/mtd.c kobs-ng-3.0.35-4.0.0/src/mtd.c +--- kobs-ng-3.0.35-4.0.0-orig/src/mtd.c 2012-12-17 22:37:40.000000000 -0800 ++++ kobs-ng-3.0.35-4.0.0/src/mtd.c 2013-07-28 19:39:59.000000000 -0700 +@@ -852,8 +852,11 @@ + mp = &md->part[i]; + + if (mp->fd != -1) { ++/* Newer kernels dropped MEMSETOOBSEL */ ++#ifdef MEMSETOOBSEL + (void)ioctl(mp->fd, MEMSETOOBSEL, + &mp->old_oobinfo); ++#endif + close(mp->fd); + } + +@@ -896,6 +899,8 @@ + continue; + } + ++/* Newer kernels dropped MEMSETOOBSEL */ ++#ifdef MEMSETOOBSEL + if (r == -ENOTTY) { + r = ioctl(mp->fd, MEMSETOOBSEL, &mp->old_oobinfo); + if (r != 0) { +@@ -904,6 +909,7 @@ + } + mp->oobinfochanged = 0; + } ++#endif + } else { + r = ioctl(mp->fd, MTDFILEMODE, (void *)MTD_MODE_RAW); + if (r != 0 && r != -ENOTTY) { +@@ -911,6 +917,8 @@ + continue; + } + ++/* Newer kernels dropped MEMSETOOBSEL */ ++#ifdef MEMSETOOBSEL + if (r == -ENOTTY) { + r = ioctl(mp->fd, MEMSETOOBSEL, &none_oobinfo); + if (r != 0) { +@@ -920,6 +928,7 @@ + mp->oobinfochanged = 1; + } else + mp->oobinfochanged = 2; ++#endif + } + + mp->ecc = ecc; +diff -u -r kobs-ng-3.0.35-4.0.0-orig/src/mtd.h kobs-ng-3.0.35-4.0.0/src/mtd.h +--- kobs-ng-3.0.35-4.0.0-orig/src/mtd.h 2012-12-17 22:37:40.000000000 -0800 ++++ kobs-ng-3.0.35-4.0.0/src/mtd.h 2013-07-28 19:33:57.000000000 -0700 +@@ -31,6 +31,13 @@ + #include "BootControlBlocks.h" + #include "rom_nand_hamming_code_ecc.h" + ++// Newer kernel headers renamed define ++#include ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) ++# define MTD_MODE_NORMAL MTD_FILE_MODE_NORMAL ++# define MTD_MODE_RAW MTD_FILE_MODE_RAW ++#endif ++ + //------------------------------------------------------------------------------ + // Re-definitions of true and false, because the standard ones aren't good + // enough? diff --git a/package/kobs-ng/kobs-ng.mk b/package/kobs-ng/kobs-ng.mk new file mode 100644 index 0000000000..f7e65e7dd2 --- /dev/null +++ b/package/kobs-ng/kobs-ng.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kobs-ng +# +################################################################################ + +# kobs-ng versions have never made much sense :( +KOBS_NG_VERSION = 3.0.35-4.0.0 +KOBS_NG_SITE = http://repository.timesys.com/buildsources/k/kobs-ng/kobs-ng-$(KOBS_NG_VERSION)/ +KOBS_NG_LICENSE = GPLv2+ +KOBS_NG_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/multimedia/lame/Config.in b/package/lame/Config.in similarity index 100% rename from package/multimedia/lame/Config.in rename to package/lame/Config.in diff --git a/package/lame/lame.mk b/package/lame/lame.mk new file mode 100644 index 0000000000..38a39a3d0c --- /dev/null +++ b/package/lame/lame.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# lame +# +################################################################################ + +LAME_VERSION_MAJOR = 3.99 +LAME_VERSION_MINOR = 5 +LAME_VERSION = $(LAME_VERSION_MAJOR).$(LAME_VERSION_MINOR) +LAME_SITE = http://downloads.sourceforge.net/project/lame/lame/$(LAME_VERSION_MAJOR) +LAME_DEPENDENCIES = host-pkgconf +LAME_INSTALL_STAGING = YES +LAME_CONF_ENV = GTK_CONFIG=/bin/false +LAME_CONF_OPT = --enable-dynamic-frontends +LAME_LICENSE = LGPLv2+ +LAME_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_LIBSNDFILE),y) +LAME_DEPENDENCIES += libsndfile +LAME_CONF_OPT += --with-fileio=sndfile +endif + +ifeq ($(BR2_PACKAGE_NCURSES),y) +LAME_DEPENDENCIES += ncurses +endif + +ifeq ($(BR2_ENDIAN),"BIG") +define LAME_BIGENDIAN_ARCH + echo "#define WORDS_BIGENDIAN 1" >>$(@D)/config.h +endef +endif + +LAME_POST_CONFIGURE_HOOKS += LAME_BIGENDIAN_ARCH + +$(eval $(autotools-package)) diff --git a/package/latencytop/Config.in b/package/latencytop/Config.in new file mode 100644 index 0000000000..b54ef052b4 --- /dev/null +++ b/package/latencytop/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_LATENCYTOP + bool "latencytop" + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_LIBGLIB2 + help + There are many types and causes of latency. LatencyTOP + focuses on the type of latency that causes skips in audio, + stutters in your desktop experience or that overloads your + server (while you have plenty of CPU power left). + + LatencyTOP focuses on the cases where the applications want + to run and execute useful code, but there's some resource + that's not currently available (and the kernel then blocks + the process). This is done both on a system level and on a + per process level, so that you can see what's happening to + the system, and which process is suffering and/or causing + the delays. + + http://www.latencytop.org + +comment "latencytop needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/latencytop/latencytop-makefile.patch b/package/latencytop/latencytop-makefile.patch new file mode 100644 index 0000000000..fa8c51cfd0 --- /dev/null +++ b/package/latencytop/latencytop-makefile.patch @@ -0,0 +1,28 @@ +Usee $(CC) to enable cross compiling and link to the right ncurses library. + +Signed-off-by: Qais Yousef + +--- latencytop-0.5/Makefile.old 2012-04-18 11:59:39.748084334 +0100 ++++ latencytop-0.5/Makefile 2012-04-18 12:00:08.659112340 +0100 +@@ -4,7 +4,7 @@ + DESTDIR = + SBINDIR = /usr/sbin + XCFLAGS = -W -g `pkg-config --cflags glib-2.0` -D_FORTIFY_SOURCE=2 -Wno-sign-compare +-LDF = -Wl,--as-needed `pkg-config --libs glib-2.0` -lncursesw ++LDF = -Wl,--as-needed `pkg-config --libs glib-2.0` -lncurses + + OBJS= latencytop.o text_display.o translate.o fsync.o + +@@ -26,10 +26,10 @@ + + # We write explicity this "implicit rule" + %.o : %.c +- gcc -c $(CFLAGS) $(XCFLAGS) $< -o $@ ++ $(CC) -c $(CFLAGS) $(XCFLAGS) $< -o $@ + + latencytop: $(OBJS) latencytop.h Makefile +- gcc $(CFLAGS) $(OBJS) $(LDF) -o latencytop ++ $(CC) $(CFLAGS) $(OBJS) $(LDF) -o latencytop + + clean: + rm -f *~ latencytop DEADJOE *.o diff --git a/package/latencytop/latencytop.mk b/package/latencytop/latencytop.mk new file mode 100644 index 0000000000..a19f48a1d6 --- /dev/null +++ b/package/latencytop/latencytop.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# latencytop +# +################################################################################ + +LATENCYTOP_VERSION = 0.5 +LATENCYTOP_SITE = http://www.latencytop.org/download/ +LATENCYTOP_DEPENDENCIES = libglib2 ncurses + +# NOTE: GTK is heavy weight, we intentionally build the text (ncurses) +# version only +define LATENCYTOP_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) HAS_GTK_GUI= +endef + +define LATENCYTOP_INSTALL_TARGET_CMDS + $(MAKE) install -C $(@D) DESTDIR=$(TARGET_DIR) HAS_GTK_GUI= +endef + +$(eval $(generic-package)) diff --git a/package/lbase64/Config.in b/package/lbase64/Config.in new file mode 100644 index 0000000000..bd8503a168 --- /dev/null +++ b/package/lbase64/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LBASE64 + bool "lbase64" + help + A base64 library for Lua + + http://luaforge.net/projects/lbase64/ diff --git a/package/lbase64/lbase64.mk b/package/lbase64/lbase64.mk new file mode 100644 index 0000000000..87dda403f2 --- /dev/null +++ b/package/lbase64/lbase64.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# lbase64 +# +################################################################################ + +LBASE64_VERSION = 20100323 +LBASE64_SITE = http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/5.1 +LBASE64_SOURCE = lbase64.tar.gz +LBASE64_LICENSE = Public domain +LBASE64_LICENSE_FILES = README +LBASE64_DEPENDENCIES = lua + +define LBASE64_BUILD_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -fPIC" so +endef + +define LBASE64_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/base64.so \ + $(TARGET_DIR)/usr/lib/lua/base64.so +endef + +define LBASE64_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/lib/lua/base64.so +endef + +define LBASE64_CLEAN_CMDS + $(MAKE) -C $(@D) clean +endef + +$(eval $(generic-package)) diff --git a/package/lcdapi/Config.in b/package/lcdapi/Config.in new file mode 100644 index 0000000000..34ce0fa1a1 --- /dev/null +++ b/package/lcdapi/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LCDAPI + bool "lcdapi" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + help + C++ client API for lcdproc, containing a set of widget classes. + + https://github.com/spdawson/lcdapi + +comment "lcdapi needs a toolchain w/ C++, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/lcdapi/lcdapi.mk b/package/lcdapi/lcdapi.mk new file mode 100644 index 0000000000..1b7ea43381 --- /dev/null +++ b/package/lcdapi/lcdapi.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# lcdapi +# +################################################################################ + +LCDAPI_VERSION = v0.4 +LCDAPI_SITE = http://github.com/spdawson/lcdapi/tarball/$(LCDAPI_VERSION) +LCDAPI_LICENSE = LGPLv2.1+ +LCDAPI_LICENSE_FILES = COPYING + +LCDAPI_INSTALL_STAGING = YES + +define LCDAPI_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define LCDAPI_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + DESTDIR="$(STAGING_DIR)" install +endef + +define LCDAPI_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + DESTDIR="$(TARGET_DIR)" install +endef + +define LCDAPI_UNINSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + DESTDIR="$(STAGING_DIR)" uninstall +endef + +define LCDAPI_UNINSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + DESTDIR="$(TARGET_DIR)" uninstall +endef + +define LCDAPI_CLEAN_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) clean +endef + +$(eval $(generic-package)) diff --git a/package/lcdproc/Config.in b/package/lcdproc/Config.in new file mode 100644 index 0000000000..5635a02091 --- /dev/null +++ b/package/lcdproc/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_LCDPROC + bool "lcdproc" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_ZLIB + help + LCD display driver daemon and clients + + http://lcdproc.org/ + +config BR2_PACKAGE_LCDPROC_DRIVERS + string "List of drivers to build" + default "all" + depends on BR2_PACKAGE_LCDPROC + help + Specify a comma-separated list of lcdproc drivers to be built + +config BR2_PACKAGE_LCDPROC_MENUS + bool "Menu support" + depends on BR2_PACKAGE_LCDPROC + help + Enable support for lcdproc menus diff --git a/package/lcdproc/lcdproc-LCDd.conf.patch b/package/lcdproc/lcdproc-LCDd.conf.patch new file mode 100644 index 0000000000..283ac8867b --- /dev/null +++ b/package/lcdproc/lcdproc-LCDd.conf.patch @@ -0,0 +1,18 @@ +Fix the default LCDd configuration file, so that the DriverPath +is set to the correct lcdproc library install path, rather than +the dummy/default path. + +Signed-off-by: Simon Dawson +--- + +--- lcdproc-0.5.3/LCDd.conf.orig 2009-06-20 14:48:34.000000000 +0100 ++++ lcdproc-0.5.3/LCDd.conf 2010-05-11 10:02:21.000000000 +0100 +@@ -34,7 +34,7 @@ + # the driver modules and will thus not be able to + # function properly. + # NOTE: Always place a slash as last character ! +-DriverPath=server/drivers/ ++DriverPath=/usr/lib/lcdproc/ + + # Tells the server to load the given drivers. Multiple lines can be given. + # The name of the driver is case sensitive and determines the section diff --git a/package/lcdproc/lcdproc.mk b/package/lcdproc/lcdproc.mk new file mode 100644 index 0000000000..dfd7f7fc72 --- /dev/null +++ b/package/lcdproc/lcdproc.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# lcdproc +# +################################################################################ + +LCDPROC_VERSION = 0.5.6 +LCDPROC_SITE = http://downloads.sourceforge.net/project/lcdproc/lcdproc/$(LCDPROC_VERSION) +LCDPROC_LICENSE = GPLv2+ +LCDPROC_LICENSE_FILES = COPYING +LCDPROC_MAKE = $(MAKE1) + +LCDPROC_CONF_OPT = --enable-drivers=$(BR2_PACKAGE_LCDPROC_DRIVERS) \ + --with-ft-prefix="$(STAGING_DIR)/usr" \ + --with-ft-exec-prefix="$(STAGING_DIR)/usr" + +ifeq ($(BR2_PACKAGE_LCDPROC_MENUS),y) +LCDPROC_CONF_OPT += --enable-lcdproc-menus +endif + +LCDPROC_DEPENDENCIES = freetype ncurses zlib + +$(eval $(autotools-package)) diff --git a/package/lcms2/Config.in b/package/lcms2/Config.in new file mode 100644 index 0000000000..d94c075e1e --- /dev/null +++ b/package/lcms2/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LCMS2 + bool "lcms2" + help + Little Color Management Software (CMS) intends to be an OPEN + SOURCE small-footprint color management engine, with special + focus on accuracy and performance. + It uses the International Color Consortium standard (ICC), which is + the modern standard when regarding to color management. + + http://www.littlecms.com/ diff --git a/package/lcms2/lcms2.mk b/package/lcms2/lcms2.mk new file mode 100644 index 0000000000..993677b068 --- /dev/null +++ b/package/lcms2/lcms2.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# lcms2 +# +################################################################################ + +LCMS2_VERSION = 2.5 +LCMS2_SITE = http://downloads.sourceforge.net/lcms/lcms +LCMS2_LICENSE = MIT +LCMS2_LICENSE_FILES = COPYING + +LCMS2_CONF_OPT = \ + +ifeq ($(BR2_PACKAGE_JPEG),y) + LCMS2_CONF_OPT += --with-jpeg + LCMS2_DEPENDENCIES += jpeg +else + LCMS2_CONF_OPT += --without-jpeg +endif + +ifeq ($(BR2_PACKAGE_TIFF),y) + LCMS2_CONF_OPT += --with-tiff + LCMS2_DEPENDENCIES += tiff +else + LCMS2_CONF_OPT += --without-tiff +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) + LCMS2_CONF_OPT += --with-zlib + LCMS2_DEPENDENCIES += zlib +else + LCMS2_CONF_OPT += --without-zlib +endif + +$(eval $(autotools-package)) diff --git a/package/leafpad/leafpad.mk b/package/leafpad/leafpad.mk index 99644095c7..b533ea0288 100644 --- a/package/leafpad/leafpad.mk +++ b/package/leafpad/leafpad.mk @@ -1,16 +1,11 @@ -############################################################# +################################################################################ # # leafpad # -############################################################# -LEAFPAD_VERSION = 0.8.14 -LEAFPAD_SOURCE = leafpad-$(LEAFPAD_VERSION).tar.gz -LEAFPAD_SITE = http://savannah.nongnu.org/download/leafpad -LEAFPAD_AUTORECONF = NO -LEAFPAD_INSTALL_STAGING = NO -LEAFPAD_INSTALL_TARGET = YES - -LEAFPAD_DEPENDENCIES = libgtk2 +################################################################################ -$(eval $(call AUTOTARGETS,package,leafpad)) +LEAFPAD_VERSION = 0.8.18 +LEAFPAD_SITE = http://savannah.nongnu.org/download/leafpad +LEAFPAD_DEPENDENCIES = libgtk2 host-intltool +$(eval $(autotools-package)) diff --git a/package/less/less.mk b/package/less/less.mk index 6f985ed94a..4f92213ece 100644 --- a/package/less/less.mk +++ b/package/less/less.mk @@ -1,12 +1,15 @@ -############################################################# +################################################################################ # # less # -############################################################# +################################################################################ -LESS_VERSION = 436 +LESS_VERSION = 458 LESS_SITE = http://www.greenwoodsoftware.com/less -LESS_DEPENDENCIES = ncurses +LESS_LICENSE = GPLv3+ +LESS_LICENSE_FILES = COPYING +# Build after busybox, full-blown is better +LESS_DEPENDENCIES = ncurses $(if $(BR2_PACKAGE_BUSYBOX),busybox) define LESS_INSTALL_TARGET_CMDS $(INSTALL) -m 0755 $(@D)/less $(TARGET_DIR)/usr/bin/less @@ -16,4 +19,4 @@ define LESS_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/bin/less endef -$(eval $(call AUTOTARGETS,package,less)) +$(eval $(autotools-package)) diff --git a/package/lesstif/Config.in b/package/lesstif/Config.in new file mode 100644 index 0000000000..3a999ead37 --- /dev/null +++ b/package/lesstif/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LESSTIF + bool "lesstif" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_FREETYPE + help + lesstif is the Hungry Programmers' version of OSF/Motif + + http://lesstif.sourceforge.net/ diff --git a/package/lesstif/lesstif.mk b/package/lesstif/lesstif.mk new file mode 100644 index 0000000000..51151078c5 --- /dev/null +++ b/package/lesstif/lesstif.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# lesstif +# +################################################################################ +LESSTIF_VERSION = 0.95.2 +LESSTIF_SOURCE = lesstif-$(LESSTIF_VERSION).tar.bz2 +LESSTIF_SITE = http://downloads.sourceforge.net/project/lesstif/lesstif/$(LESSTIF_VERSION) +LESSTIF_INSTALL_STAGING = YES +LESSTIF_DEPENDENCIES = \ + xlib_libXt \ + xlib_libXext \ + freetype + +LESSTIF_CONF_OPT = \ + --with-gnu-ld \ + --with-freetype-config=$(STAGING_DIR)/usr/bin/freetype-config \ + --enable-debug=no \ + --enable-production=yes \ + --enable-build-tests=no \ + --no-recursion + +# Reduces the buggy makefile to the smallest possible (and working) thing +define LESSTIF_NOMAN2HTML + echo "all:" > $(@D)/doc/Makefile + echo "" >> $(@D)/doc/Makefile + echo "install:" >> $(@D)/doc/Makefile + echo "" >> $(@D)/doc/Makefile + echo "clean:" >> $(@D)/doc/Makefile +endef + +# Prevents to copy ac_find_motif.m4 on target, it would else +# be created at $(TARGET_DIR)/$(TOPDIR)/output/host/usr/share/aclocal/ac_find_motif.m4 +define LESSTIF_FIXACLOCAL + sed -i -e "/install-data-am: install-aclocalDATA/d" $(@D)/scripts/autoconf/Makefile +endef + +LESSTIF_POST_CONFIGURE_HOOKS += LESSTIF_NOMAN2HTML +LESSTIF_POST_CONFIGURE_HOOKS += LESSTIF_FIXACLOCAL + +$(eval $(autotools-package)) diff --git a/package/libaio/Config.in b/package/libaio/Config.in index ff6cc13c80..833009a42a 100644 --- a/package/libaio/Config.in +++ b/package/libaio/Config.in @@ -1,4 +1,8 @@ config BR2_PACKAGE_LIBAIO bool "libaio" + depends on \ + BR2_arm || BR2_armeb || BR2_avr32 || BR2_i386 || \ + BR2_m68k || BR2_mips || BR2_mipsel || BR2_powerpc || \ + BR2_sparc || BR2_x86_64 help Library for doing asynchronous I/O diff --git a/package/libaio/libaio.mk b/package/libaio/libaio.mk index 6124e1a283..b66c9f57ef 100644 --- a/package/libaio/libaio.mk +++ b/package/libaio/libaio.mk @@ -1,12 +1,13 @@ -############################################################# +################################################################################ # # libaio # -############################################################# -LIBAIO_VERSION=0.3.109 -LIBAIO_SOURCE=libaio-$(LIBAIO_VERSION).tar.bz2 -LIBAIO_SITE=$(BR2_KERNEL_MIRROR)/linux/libs/aio/ -LIBAIO_INSTALL_STAGING=YES +################################################################################ + +LIBAIO_VERSION = 0.3.109 +LIBAIO_SOURCE = libaio_$(LIBAIO_VERSION).orig.tar.gz +LIBAIO_SITE = http://snapshot.debian.org/archive/debian/20110227T085214Z/pool/main/liba/libaio/ +LIBAIO_INSTALL_STAGING = YES define LIBAIO_BUILD_CMDS $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) @@ -20,5 +21,4 @@ define LIBAIO_INSTALL_TARGET_CMDS $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install endef -$(eval $(call GENTARGETS,package,libaio)) - +$(eval $(generic-package)) diff --git a/package/multimedia/libao/Config.in b/package/libao/Config.in similarity index 100% rename from package/multimedia/libao/Config.in rename to package/libao/Config.in diff --git a/package/libao/libao.mk b/package/libao/libao.mk new file mode 100644 index 0000000000..8e9ee35915 --- /dev/null +++ b/package/libao/libao.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# libao +# +################################################################################ + +LIBAO_VERSION = 1.1.0 +LIBAO_SITE = http://downloads.xiph.org/releases/ao +LIBAO_DEPENDENCIES = host-pkgconf +LIBAO_INSTALL_STAGING = YES +LIBAO_LICENSE = GPLv2+ +LIBAO_LICENSE_FILES = COPYING +LIBAO_CONF_OPT = --disable-esd --disable-wmm --disable-arts \ + --disable-nas --disable-pulse + +ifeq ($(BR2_PACKAGE_ALSA_LIB),y) +LIBAO_DEPENDENCIES += alsa-lib +LIBAO_CONF_OPT += --enable-alsa --enable-alsa-mmap +else +LIBAO_CONF_OPT += --disable-alsa +endif + +$(eval $(autotools-package)) diff --git a/package/libarchive/Config.in b/package/libarchive/Config.in index 38928b00f2..d4fb73fd54 100644 --- a/package/libarchive/Config.in +++ b/package/libarchive/Config.in @@ -5,9 +5,9 @@ config BR2_PACKAGE_LIBARCHIVE Libarchive is a reusable C library for reading and writing a variety of streaming archive formats. - http://code.google.com/p/libarchive/ + http://www.libarchive.org/ -comment "libarchive requires a toolchain with WCHAR support" +comment "libarchive needs a toolchain w/ wchar" depends on !BR2_USE_WCHAR config BR2_PACKAGE_LIBARCHIVE_BSDTAR diff --git a/package/libarchive/libarchive.mk b/package/libarchive/libarchive.mk index 0038cd3510..44d9cd2c10 100644 --- a/package/libarchive/libarchive.mk +++ b/package/libarchive/libarchive.mk @@ -1,13 +1,12 @@ -############################################################# +################################################################################ # -# libarchive (reusable C library for archive formats) +# libarchive # -############################################################# -LIBARCHIVE_VERSION = 2.7.1 -LIBARCHIVE_SITE = http://libarchive.googlecode.com/files/ -LIBARCHIVE_SOURCE = libarchive-$(LIBARCHIVE_VERSION).tar.gz +################################################################################ + +LIBARCHIVE_VERSION = 3.0.4 +LIBARCHIVE_SITE = http://github.com/downloads/libarchive/libarchive LIBARCHIVE_INSTALL_STAGING = YES -LIBARCHIVE_INSTALL_TARGET = YES ifeq ($(BR2_PACKAGE_ZLIB),y) LIBARCHIVE_DEPENDENCIES = zlib @@ -17,4 +16,11 @@ LIBARCHIVE_CONF_OPT = \ $(if $(BR2_PACKAGE_LIBARCHIVE_BSDTAR),--enable-bsdtar,--disable-bsdtar) \ $(if $(BR2_PACKAGE_LIBARCHIVE_BSDCPIO),--enable-bsdcpio,--disable-bsdcpio) -$(eval $(call AUTOTARGETS,package,libarchive)) +ifeq ($(BR2_PACKAGE_LIBXML2),y) +LIBARCHIVE_DEPENDENCIES += libxml2 +LIBARCHIVE_CONF_ENV += XML2_CONFIG=$(STAGING_DIR)/usr/bin/xml2-config +else +LIBARCHIVE_CONF_OPT += --without-xml2 +endif + +$(eval $(autotools-package)) diff --git a/package/libargtable2/Config.in b/package/libargtable2/Config.in new file mode 100644 index 0000000000..42d067becd --- /dev/null +++ b/package/libargtable2/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBARGTABLE2 + bool "libargtable2" + help + A greatly simplified and yet quite robust argument parsing + set of library calls. + + http://argtable.sourceforge.net/ diff --git a/package/libargtable2/libargtable2.mk b/package/libargtable2/libargtable2.mk new file mode 100644 index 0000000000..cdd62369a0 --- /dev/null +++ b/package/libargtable2/libargtable2.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# libargtable2 +# +################################################################################ + +LIBARGTABLE2_VERSION = 13 +LIBARGTABLE2_SOURCE = argtable2-$(LIBARGTABLE2_VERSION).tar.gz +LIBARGTABLE2_SITE = http://downloads.sourceforge.net/project/argtable/argtable/argtable-2.13 + +LIBARGTABLE2_INSTALL_STAGING = YES +LIBARGTABLE2_CONF_OPT = --disable-example \ + --disable-kernel-module \ + --enable-lib \ + --enable-util + +$(eval $(autotools-package)) diff --git a/package/libart/libart.mk b/package/libart/libart.mk index ec66c2f5ba..53dfe5a95a 100644 --- a/package/libart/libart.mk +++ b/package/libart/libart.mk @@ -1,13 +1,14 @@ -############################################################# +################################################################################ # # libart # -############################################################# +################################################################################ LIBART_VERSION = 2.3.21 LIBART_SOURCE = libart_lgpl-$(LIBART_VERSION).tar.gz LIBART_SITE = http://ftp.gnome.org/pub/gnome/sources/libart_lgpl/2.3/ LIBART_AUTORECONF = YES LIBART_INSTALL_STAGING = YES +LIBART_CONFIG_SCRIPTS = libart2-config -$(eval $(call AUTOTARGETS,package,libart)) +$(eval $(autotools-package)) diff --git a/package/libassuan/Config.in b/package/libassuan/Config.in new file mode 100644 index 0000000000..46101451cf --- /dev/null +++ b/package/libassuan/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LIBASSUAN + bool "libassuan" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBGPG_ERROR + help + Libassuan is a small library implementing the so-called + Assuan protocol. + + This protocol is used for IPC between most newer GnuPG + components. Both, server and client side functions are + provided. + + http://www.gnupg.org/related_software/libassuan/ diff --git a/package/libassuan/libassuan.mk b/package/libassuan/libassuan.mk new file mode 100644 index 0000000000..5f5378b54b --- /dev/null +++ b/package/libassuan/libassuan.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# libassuan +# +################################################################################ + +LIBASSUAN_VERSION = 2.1.1 +LIBASSUAN_SITE = ftp://ftp.gnupg.org/gcrypt/libassuan/ +LIBASSUAN_SOURCE = libassuan-$(LIBASSUAN_VERSION).tar.bz2 +LIBASSUAN_LICENSE = LGPLv2.1+ (library), GPLv3 (tests, doc) +LIBASSUAN_LICENSE_FILES = COPYING.LIB COPYING +LIBASSUAN_INSTALL_STAGING = YES +LIBASSUAN_DEPENDENCIES = libgpg-error +LIBASSUAN_CONF_OPT = \ + --with-gpg-error-prefix=$(STAGING_DIR)/usr + +$(eval $(autotools-package)) diff --git a/package/libatasmart/Config.in b/package/libatasmart/Config.in new file mode 100644 index 0000000000..a3e44f8b2f --- /dev/null +++ b/package/libatasmart/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBATASMART + bool "libatasmart" + depends on BR2_PACKAGE_UDEV # libudev is configure dependency + help + The libatasmart package is a disk reporting library. + It only supports a subset of the ATA S.M.A.R.T. functionality. + + http://www.linuxfromscratch.org/blfs/view/svn/general/libatasmart.html + +comment "libatasmart requires udev to be enabled" + depends on !BR2_PACKAGE_UDEV diff --git a/package/libatasmart/libatasmart-strpool-cross-flags.patch b/package/libatasmart/libatasmart-strpool-cross-flags.patch new file mode 100644 index 0000000000..89b91cca41 --- /dev/null +++ b/package/libatasmart/libatasmart-strpool-cross-flags.patch @@ -0,0 +1,42 @@ +From 730158700ea7a554c37f24bfbf5f4985f7280f3e Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Wed, 6 Feb 2013 14:07:02 +0100 +Subject: [PATCH] strpool: don't mix up host/build flags when cross compiling + +Submitted upstream as https://bugs.freedesktop.org/show_bug.cgi?id=60364 + +Commit b71035ce89 (build-sys: modernize build system) changed the strpool +(which needs to be built for the build machine) compilation to use +AM_CFLAGS / AM_LDFLAGS rather than CFLAGS / LDFLAGS. This is wrong, as +The AM_ version is used TOGETHER with (the user supplied) CFLAGS/LDFLAGS, +causing strpool to use both CFLAGS (for host) and CCFLAGS_FOR_BUILD (for +build) flags, breaking cross compilation with errors like: + +cc1: error: unrecognized command line option "-mabi=spe" + +Instead overwrite the (user supplied) CFLAGS with the (user supplied) +CFLAGS_FOR_BUILD (and similar for LDFLAGS) like we used to do. + +Signed-off-by: Peter Korsgaard +--- + strpool/Makefile.am | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/strpool/Makefile.am b/strpool/Makefile.am +index b041cea..5b335a5 100644 +--- a/strpool/Makefile.am ++++ b/strpool/Makefile.am +@@ -17,8 +17,8 @@ + # . + + CC = @CC_FOR_BUILD@ +-AM_CFLAGS = @BUILD_CFLAGS@ +-AM_LDFLAGS = @BUILD_LDFLAGS@ ++CFLAGS = @BUILD_CFLAGS@ ++LDFLAGS = @BUILD_LDFLAGS@ + + noinst_PROGRAMS = \ + strpool +-- +1.7.10.4 + diff --git a/package/libatasmart/libatasmart.mk b/package/libatasmart/libatasmart.mk new file mode 100644 index 0000000000..fbfad1cdb1 --- /dev/null +++ b/package/libatasmart/libatasmart.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# libatasmart +# +################################################################################ + +LIBATASMART_VERSION = 0.19 +LIBATASMART_SOURCE = libatasmart-$(LIBATASMART_VERSION).tar.xz +LIBATASMART_SITE = http://0pointer.de/public +LIBATASMART_LICENSE = LGPLv2.1 +LIBATASMART_LICENSE_FILES = LGPL +LIBATASMART_INSTALL_STAGING = YES + +# package doesn't include configure script +LIBATASMART_AUTORECONF = YES + +LIBATASMART_DEPENDENCIES = udev + +$(eval $(autotools-package)) diff --git a/package/libatomic_ops/Config.in b/package/libatomic_ops/Config.in index b9f14d1989..3d5d0a8242 100644 --- a/package/libatomic_ops/Config.in +++ b/package/libatomic_ops/Config.in @@ -1,4 +1,5 @@ config BR2_PACKAGE_LIBATOMIC_OPS bool "libatomic_ops" + depends on BR2_arm || BR2_armeb || BR2_i386 || BR2_sparc || BR2_powerpc || BR2_x86_64 help Atomic operations library diff --git a/package/libatomic_ops/libatomic_ops-nothread-build-failure-fix.patch b/package/libatomic_ops/libatomic_ops-nothread-build-failure-fix.patch new file mode 100644 index 0000000000..cc14b1e2e9 --- /dev/null +++ b/package/libatomic_ops/libatomic_ops-nothread-build-failure-fix.patch @@ -0,0 +1,41 @@ +From 7e940ce34ff4de254d460344f1a1a486a14fb045 Mon Sep 17 00:00:00 2001 +From: Gilles Talis +Date: Wed, 22 May 2013 16:21:26 -0700 +Subject: [PATCH] Fix build failure seen when using toolchain without threads support + +Signed-off-by: Gilles Talis +--- + src/atomic_ops.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/src/atomic_ops.c b/src/atomic_ops.c +index b6731a2..5769643 100644 +--- a/src/atomic_ops.c ++++ b/src/atomic_ops.c +@@ -48,7 +48,9 @@ + + #undef AO_REQUIRE_CAS + ++#if defined(AO_USE_PTHREAD_DEFS) + #include ++#endif + + #ifndef AO_USE_NO_SIGNALS + # include +@@ -72,11 +74,13 @@ + # include "atomic_ops/sysdeps/standard_ao_double_t.h" + #endif + ++#if defined(AO_USE_PTHREAD_DEFS) + /* + * Lock for pthreads-based implementation. + */ + + pthread_mutex_t AO_pt_lock = PTHREAD_MUTEX_INITIALIZER; ++#endif + + /* + * Out of line compare-and-swap emulation based on test and set. +-- +1.7.4.1 + diff --git a/package/libatomic_ops/libatomic_ops.mk b/package/libatomic_ops/libatomic_ops.mk index f26a5fa915..fbe250cfb1 100644 --- a/package/libatomic_ops/libatomic_ops.mk +++ b/package/libatomic_ops/libatomic_ops.mk @@ -1,12 +1,21 @@ -############################################################# +################################################################################ # -# Atomic_ops library +# libatomic_ops # -############################################################# +################################################################################ -LIBATOMIC_OPS_VERSION = 1.2 -LIBATOMIC_OPS_SOURCE = libatomic_ops-$(LIBATOMIC_OPS_VERSION).tar.gz +LIBATOMIC_OPS_VERSION = 7.2 LIBATOMIC_OPS_SITE = http://www.hpl.hp.com/research/linux/atomic_ops/download + +# From doc/LICENSING.txt: "Our intent is to make it easy to use +# libatomic_ops, in both free and proprietary software. Hence most +# code that we expect to be linked into a client application is +# covered by an MIT-style license. A few library routines are covered +# by the GNU General Public License. These are put into a separate +# library, libatomic_ops_gpl.a." +LIBATOMIC_OPS_LICENSE = MIT (main library) / GPLv2+ (gpl extension) +LIBATOMIC_OPS_LICENSE_FILES = doc/LICENSING.txt doc/COPYING + LIBATOMIC_OPS_INSTALL_STAGING = YES -$(eval $(call AUTOTARGETS,package,libatomic_ops)) +$(eval $(autotools-package)) diff --git a/package/libbsd/Config.in b/package/libbsd/Config.in new file mode 100644 index 0000000000..8c90aa1342 --- /dev/null +++ b/package/libbsd/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_LIBBSD + bool "libbsd" + # libbsd requires a.out.h, which is only available for those + # architectures: arm, m68k, x86 (and alpha, but we don't care.) + depends on ( BR2_i386 || BR2_x86_64 ) + depends on BR2_TOOLCHAIN_HAS_THREADS + help + This library provides useful functions commonly found on BSD + systems, and lacking on others like GNU systems, thus making + it easier to port projects with strong BSD origins, without + needing to embed the same code over and over again on each + project. + + http://libbsd.freedesktop.org/ + +comment "libbsd needs a toolchain w/ threads" + depends on ( BR2_i386 || BR2_x86_64 ) + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libbsd/libbsd.mk b/package/libbsd/libbsd.mk new file mode 100644 index 0000000000..be4175aad5 --- /dev/null +++ b/package/libbsd/libbsd.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# libbsd +# +################################################################################ + +LIBBSD_VERSION = 0.4.2 +LIBBSD_SITE = http://libbsd.freedesktop.org/releases +LIBBSD_LICENSE = BSD-3c MIT +LIBBSD_LICENSE_FILES = COPYING + +# man-pages are BSD-4c, so that license only matters +# if doc is kept in the target rootfs +ifeq ($(BR2_HAVE_DOCUMENTATION),y) +LIBBSD_LICENSE += (libraries), BSD-4c (documentation) +endif + +LIBBSD_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libcap-ng/Config.in b/package/libcap-ng/Config.in new file mode 100644 index 0000000000..da5b447726 --- /dev/null +++ b/package/libcap-ng/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBCAP_NG + bool "libcap-ng" + depends on !BR2_avr32 # lacks TLS + help + The libcap-ng library is intended to make programming with + posix capabilities much easier than the traditional libcap + library. It includes utilities that can analyse all currently + running applications and print out any capabilities and whether + or not it has an open ended bounding set. + + http://people.redhat.com/sgrubb/libcap-ng/ diff --git a/package/libcap-ng/libcap-ng.mk b/package/libcap-ng/libcap-ng.mk new file mode 100644 index 0000000000..53c7ee7dd8 --- /dev/null +++ b/package/libcap-ng/libcap-ng.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libcap-ng +# +################################################################################ + +LIBCAP_NG_VERSION = 0.7.3 +LIBCAP_NG_SITE = http://people.redhat.com/sgrubb/libcap-ng/ +LIBCAP_NG_LICENSE = GPLv2+ LGPLv2.1+ +LIBCAP_NG_LICENSE_FILES = COPYING COPYING.LIB +LIBCAP_NG_INSTALL_STAGING = YES + +LIBCAP_NG_CONF_ENV = ac_cv_prog_swig_found=no +LIBCAP_NG_CONF_OPT = --without-python + +$(eval $(autotools-package)) diff --git a/package/libcap/Config.in b/package/libcap/Config.in index f1fc8fa163..59300afd27 100644 --- a/package/libcap/Config.in +++ b/package/libcap/Config.in @@ -1,10 +1,10 @@ config BR2_PACKAGE_LIBCAP bool "libcap" help - This library implements the user-space interfaces to the - POSIX 1003.1e capabilities available in Linux kernels. These - capabilities are a partitioning of the all powerful root - privilege into a set of distinct privileges. + This library implements the user-space interfaces to the + POSIX 1003.1e capabilities available in Linux kernels. These + capabilities are a partitioning of the all powerful root + privilege into a set of distinct privileges. - http://sites.google.com/site/fullycapable/ + http://sites.google.com/site/fullycapable/ diff --git a/package/libcap/libcap-01-build-system.patch b/package/libcap/libcap-01-build-system.patch new file mode 100644 index 0000000000..8915a69ecc --- /dev/null +++ b/package/libcap/libcap-01-build-system.patch @@ -0,0 +1,54 @@ +Avoid the libcap buildsys forcing CC/CFLAGS/LDFLAGS/AR/RANLIB +Also install the shared lib +x + +Signed-off-by: Gustavo Zacarias + +diff -Nura libcap-2.22.orig/libcap/Makefile libcap-2.22/libcap/Makefile +--- libcap-2.22.orig/libcap/Makefile 2010-08-08 19:26:04.000000000 -0300 ++++ libcap-2.22/libcap/Makefile 2011-12-14 11:33:51.761800334 -0300 +@@ -65,7 +65,7 @@ + install -m 0644 include/sys/capability.h $(INCDIR)/sys + mkdir -p -m 0755 $(LIBDIR) + install -m 0644 $(STALIBNAME) $(LIBDIR)/$(STALIBNAME) +- install -m 0644 $(MINLIBNAME) $(LIBDIR)/$(MINLIBNAME) ++ install -m 0755 $(MINLIBNAME) $(LIBDIR)/$(MINLIBNAME) + ln -sf $(MINLIBNAME) $(LIBDIR)/$(MAJLIBNAME) + ln -sf $(MAJLIBNAME) $(LIBDIR)/$(LIBNAME) + ifeq ($(FAKEROOT),) +diff -Nura libcap-2.22.orig/Make.Rules libcap-2.22/Make.Rules +--- libcap-2.22.orig/Make.Rules 2011-07-24 23:18:23.000000000 -0300 ++++ libcap-2.22/Make.Rules 2011-12-14 11:33:28.707278685 -0300 +@@ -47,25 +47,25 @@ + KERNEL_HEADERS := $(topdir)/libcap/include + IPATH += -fPIC -I$(topdir)/libcap/include -I$(KERNEL_HEADERS) + +-CC := gcc +-CFLAGS := -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +-BUILD_CC := $(CC) +-BUILD_CFLAGS := $(CFLAGS) $(IPATH) +-AR := ar +-RANLIB := ranlib ++CC ?= gcc ++CFLAGS ?= -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 ++BUILD_CC ?= $(CC) ++BUILD_CFLAGS ?= $(CFLAGS) $(IPATH) ++AR ?= ar ++RANLIB ?= ranlib + DEBUG = -g #-DDEBUG + WARNINGS=-Wall -Wwrite-strings \ + -Wpointer-arith -Wcast-qual -Wcast-align \ + -Wstrict-prototypes -Wmissing-prototypes \ + -Wnested-externs -Winline -Wshadow + LD=$(CC) -Wl,-x -shared +-LDFLAGS := #-g ++LDFLAGS ?= #-g + + SYSTEM_HEADERS = /usr/include + INCS=$(topdir)/libcap/include/sys/capability.h + LDFLAGS += -L$(topdir)/libcap + CFLAGS += -Dlinux $(WARNINGS) $(DEBUG) +-PAM_CAP := $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi) ++PAM_CAP = no + INDENT := $(shell if [ -n "$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi) + DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo yes; fi) + LIBATTR := yes diff --git a/package/libcap/libcap-02-split-static-shared-install.patch b/package/libcap/libcap-02-split-static-shared-install.patch new file mode 100644 index 0000000000..21e7f2afc8 --- /dev/null +++ b/package/libcap/libcap-02-split-static-shared-install.patch @@ -0,0 +1,30 @@ +libcap: split install into install-shared/install-static + +In order to support static only builds, split the install target into +install-shared and install-static targets. + +Signed-off-by: Thomas Petazzoni + +Index: b/libcap/Makefile +=================================================================== +--- a/libcap/Makefile ++++ b/libcap/Makefile +@@ -60,11 +60,17 @@ + cap_text.o: cap_text.c $(USE_GPERF_OUTPUT) $(INCLS) + $(CC) $(CFLAGS) $(IPATH) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@ + +-install: all ++install: install-shared install-static ++ ++install-common: + mkdir -p -m 0755 $(INCDIR)/sys + install -m 0644 include/sys/capability.h $(INCDIR)/sys + mkdir -p -m 0755 $(LIBDIR) ++ ++install-static: install-common + install -m 0644 $(STALIBNAME) $(LIBDIR)/$(STALIBNAME) ++ ++install-shared: install-common + install -m 0755 $(MINLIBNAME) $(LIBDIR)/$(MINLIBNAME) + ln -sf $(MINLIBNAME) $(LIBDIR)/$(MAJLIBNAME) + ln -sf $(MAJLIBNAME) $(LIBDIR)/$(LIBNAME) diff --git a/package/libcap/libcap-2.19-build-system.patch b/package/libcap/libcap-2.19-build-system.patch deleted file mode 100644 index f548726e76..0000000000 --- a/package/libcap/libcap-2.19-build-system.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff -Nura libcap-2.19.orig/Make.Rules libcap-2.19/Make.Rules ---- libcap-2.19.orig/Make.Rules 2010-01-13 23:04:58.000000000 -0300 -+++ libcap-2.19/Make.Rules 2010-12-28 16:44:18.164052748 -0300 -@@ -45,25 +45,26 @@ - KERNEL_HEADERS := $(topdir)/libcap/include - IPATH += -I$(topdir)/libcap/include -I$(KERNEL_HEADERS) - --CC := gcc --CFLAGS := -O2 --BUILD_CC := $(CC) --BUILD_CFLAGS := $(CFLAGS) $(IPATH) --AR := ar --RANLIB := ranlib -+CC ?= gcc -+CFLAGS ?= -O2 -+CC_FOR_BUILD ?= $(CC) -+CFLAGS_FOR_BUILD ?= $(CFLAGS) -+AR ?= ar -+RANLIB ?= ranlib - DEBUG = -g #-DDEBUG - WARNINGS=-fPIC -Wall -Wwrite-strings \ - -Wpointer-arith -Wcast-qual -Wcast-align \ - -Wstrict-prototypes -Wmissing-prototypes \ - -Wnested-externs -Winline -Wshadow - LD=$(CC) -Wl,-x -shared --LDFLAGS := #-g -+LDFLAGS ?= #-g - - SYSTEM_HEADERS = /usr/include - INCS=$(topdir)/libcap/include/sys/capability.h - LDFLAGS += -L$(topdir)/libcap - CFLAGS += -Dlinux $(WARNINGS) $(DEBUG) $(IPATH) --PAM_CAP := $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi) -+CFLAGS_FOR_BUILD += $(IPATH) -+PAM_CAP := no - INDENT := $(shell if [ -n "$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi) - DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo yes; fi) - LIBATTR := yes -diff -Nura libcap-2.19.orig/libcap/Makefile libcap-2.19/libcap/Makefile ---- libcap-2.19.orig/libcap/Makefile 2008-12-04 05:03:12.000000000 -0200 -+++ libcap-2.19/libcap/Makefile 2010-12-28 16:44:33.457052750 -0300 -@@ -33,7 +33,7 @@ - endif - - _makenames: _makenames.c cap_names.list.h -- $(BUILD_CC) $(BUILD_CFLAGS) $< -o $@ -+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $< -o $@ - - cap_names.h: _makenames - ./_makenames > cap_names.h -@@ -65,7 +65,7 @@ - install -m 0644 include/sys/capability.h $(INCDIR)/sys - mkdir -p -m 0755 $(LIBDIR) - install -m 0644 $(STALIBNAME) $(LIBDIR)/$(STALIBNAME) -- install -m 0644 $(MINLIBNAME) $(LIBDIR)/$(MINLIBNAME) -+ install -m 0755 $(MINLIBNAME) $(LIBDIR)/$(MINLIBNAME) - ln -sf $(MINLIBNAME) $(LIBDIR)/$(MAJLIBNAME) - ln -sf $(MAJLIBNAME) $(LIBDIR)/$(LIBNAME) - ifeq ($(FAKEROOT),) diff --git a/package/libcap/libcap.mk b/package/libcap/libcap.mk index d4f8f17397..17e2eb5191 100644 --- a/package/libcap/libcap.mk +++ b/package/libcap/libcap.mk @@ -1,28 +1,62 @@ -LIBCAP_VERSION=2.19 -LIBCAP_SOURCE=libcap-$(LIBCAP_VERSION).tar.bz2 -LIBCAP_SITE=http://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/ -LIBCAP_INSTALL_STAGING=YES +################################################################################ +# +# libcap +# +################################################################################ + +LIBCAP_VERSION = 2.22 +# Until kernel.org is completely back up use debian mirror +#LIBCAP_SITE = http://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2 +LIBCAP_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/libc/libcap2 +LIBCAP_SOURCE = libcap2_$(LIBCAP_VERSION).orig.tar.gz +LIBCAP_LICENSE = GPLv2 or BSD-3c +LIBCAP_LICENSE_FILES = License + +LIBCAP_DEPENDENCIES = host-libcap +LIBCAP_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_ATTR),y) + LIBCAP_DEPENDENCIES += attr + LIBCAP_HAVE_LIBATTR = yes +else + LIBCAP_HAVE_LIBATTR = no +endif + +# we don't have host-attr +HOST_LIBCAP_DEPENDENCIES = + +ifeq ($(BR2_PREFER_STATIC_LIB),y) +LIBCAP_MAKE_TARGET = libcap.a +LIBCAP_MAKE_INSTALL_TARGET = install-static +else +LIBCAP_MAKE_TARGET = all +LIBCAP_MAKE_INSTALL_TARGET = install +endif define LIBCAP_BUILD_CMDS - $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) LIBATTR=no + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/libcap \ + LIBATTR=$(LIBCAP_HAVE_LIBATTR) BUILD_CC="$(HOSTCC)" \ + BUILD_CFLAGS="$(HOST_CFLAGS)" $(LIBCAP_MAKE_TARGET) endef define LIBCAP_INSTALL_STAGING_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=no DESTDIR=$(STAGING_DIR) prefix=/usr lib=lib install + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libcap LIBATTR=$(LIBCAP_HAVE_LIBATTR) \ + DESTDIR=$(STAGING_DIR) prefix=/usr lib=lib $(LIBCAP_MAKE_INSTALL_TARGET) endef define LIBCAP_INSTALL_TARGET_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=no DESTDIR=$(TARGET_DIR) prefix=/usr lib=lib install - rm -f $(addprefix $(TARGET_DIR)/usr/sbin/,capsh getpcaps) + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libcap LIBATTR=$(LIBCAP_HAVE_LIBATTR) \ + DESTDIR=$(TARGET_DIR) prefix=/usr lib=lib $(LIBCAP_MAKE_INSTALL_TARGET) endef define HOST_LIBCAP_BUILD_CMDS - $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) LIBATTR=no + $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) LIBATTR=no endef define HOST_LIBCAP_INSTALL_CMDS - $(HOST_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=no DESTDIR=$(HOST_DIR) prefix=/usr lib=lib install + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=no DESTDIR=$(HOST_DIR) \ + prefix=/usr lib=lib install endef -$(eval $(call GENTARGETS,package,libcap)) -$(eval $(call GENTARGETS,package,libcap,host)) +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/multimedia/libcdaudio/Config.in b/package/libcdaudio/Config.in similarity index 100% rename from package/multimedia/libcdaudio/Config.in rename to package/libcdaudio/Config.in diff --git a/package/libcdaudio/libcdaudio.mk b/package/libcdaudio/libcdaudio.mk new file mode 100644 index 0000000000..06f8926501 --- /dev/null +++ b/package/libcdaudio/libcdaudio.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# libcdaudio +# +################################################################################ + +LIBCDAUDIO_VERSION = 0.99.12p2 +LIBCDAUDIO_SITE = http://downloads.sourceforge.net/project/libcdaudio/libcdaudio/$(LIBCDAUDIO_VERSION)/ +LIBCDAUDIO_INSTALL_STAGING = YES +LIBCDAUDIO_CONFIG_SCRIPTS = libcdaudio-config + +$(eval $(autotools-package)) diff --git a/package/libcec/Config.in b/package/libcec/Config.in new file mode 100644 index 0000000000..4cfe1ce474 --- /dev/null +++ b/package/libcec/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_LIBCEC + bool "libcec" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_WCHAR + help + libcec allows you in combination with the right hardware to + control your home theater devices with your TV remote + control utilizing existing HDMI cabling. + + http://libcec.pulse-eight.com + +comment "libcec needs a toolchain w/ C++, wchar, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_USE_WCHAR diff --git a/package/libcec/libcec.mk b/package/libcec/libcec.mk new file mode 100644 index 0000000000..8a58e1ec5f --- /dev/null +++ b/package/libcec/libcec.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# libcec +# +################################################################################ + +LIBCEC_VERSION = libcec-2.1.1 +LIBCEC_SITE = http://github.com/Pulse-Eight/libcec/tarball/$(LIBCEC_VERSION) +LIBCEC_LICENSE = GPLv2+ +LIBCEC_LICENSE_FILES = COPYING + +# Autoreconf required due to being a dev tarball and not a release tarball. +LIBCEC_AUTORECONF = YES +LIBCEC_INSTALL_STAGING = YES +LIBCEC_DEPENDENCIES = host-pkgconf + +ifeq ($(BR2_PACKAGE_LOCKDEV),y) +LIBCEC_DEPENDENCIES += lockdev +endif + +ifeq ($(BR2_PACKAGE_UDEV),y) +LIBCEC_DEPENDENCIES += udev +endif + +ifeq ($(BR2_PACKAGE_RPI_USERLAND),y) +LIBCEC_CONF_OPT = --enable-rpi \ + --with-rpi-include-path=$(STAGING_DIR)/usr/include +LIBCEC_DEPENDENCIES += rpi-userland +else +LIBCEC_CONF_OPT = --disable-rpi +endif + +$(eval $(autotools-package)) diff --git a/package/libcgi/Config.in b/package/libcgi/Config.in index 491ae2e307..430039e559 100644 --- a/package/libcgi/Config.in +++ b/package/libcgi/Config.in @@ -1,11 +1,11 @@ config BR2_PACKAGE_LIBCGI bool "libcgi" help - LibCGI is a library written from scratch to easily make - CGI applications in C. + LibCGI is a library written from scratch to easily make + CGI applications in C. - There are a lot of functions like string manipulation, - session and cookie support, GET and POST methods manipulation - etc..., to help you to quickly write powerful CGI programs. + There are a lot of functions like string manipulation, + session and cookie support, GET and POST methods manipulation + etc..., to help you to quickly write powerful CGI programs. - http://libcgi.sourceforge.net/ + http://libcgi.sourceforge.net/ diff --git a/package/libcgi/libcgi.mk b/package/libcgi/libcgi.mk index 8e8bbeb6d5..f027d31db3 100644 --- a/package/libcgi/libcgi.mk +++ b/package/libcgi/libcgi.mk @@ -1,11 +1,13 @@ -############################################################# +################################################################################ # # libcgi # -############################################################# -LIBCGI_VERSION:=1.0 -LIBCGI_SOURCE:=libcgi-$(LIBCGI_VERSION).tar.gz -LIBCGI_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/libcgi -LIBCGI_INSTALL_STAGING=YES +################################################################################ -$(eval $(call AUTOTARGETS,package,libcgi)) +LIBCGI_VERSION = 1.0 +LIBCGI_SITE = http://downloads.sourceforge.net/project/libcgi/libcgi/$(LIBCGI_VERSION) +LIBCGI_INSTALL_STAGING = YES +# use cross CC/AR rather than host +LIBCGI_MAKE_ENV = CC="$(TARGET_CC) $(TARGET_CFLAGS)" AR="$(TARGET_AR)" + +$(eval $(autotools-package)) diff --git a/package/libcgi/libcgi.patch b/package/libcgi/libcgi.patch index 716d83cfca..12a7b106c7 100644 --- a/package/libcgi/libcgi.patch +++ b/package/libcgi/libcgi.patch @@ -27,7 +27,7 @@ exec_prefix = @exec_prefix@ -SHAREDOPT = -shared -+SHAREDOPT = -shared -fPIC,-Wl,-soname,libcgi.so.0 ++SHAREDOPT = -shared -fPIC -Wl,-soname,libcgi.so.0 LIBDIR = $(prefix)/lib -INCDIR = $(prefix)/include +INCDIR = $(prefix)/include/libcgi/ diff --git a/package/libcgicc/Config.in b/package/libcgicc/Config.in index 098f9a631f..e1f6904b29 100644 --- a/package/libcgicc/Config.in +++ b/package/libcgicc/Config.in @@ -7,5 +7,5 @@ config BR2_PACKAGE_LIBCGICC http://www.cgicc.com -comment "libcgicc requires a toolchain with C++ support enabled" +comment "libcgicc needs a toolchain w/ C++" depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/libcgicc/libcgicc.mk b/package/libcgicc/libcgicc.mk index dbc9073fb6..a3c64d26f8 100644 --- a/package/libcgicc/libcgicc.mk +++ b/package/libcgicc/libcgicc.mk @@ -1,16 +1,18 @@ -############################################################# +################################################################################ # # libcgicc # -############################################################# -LIBCGICC_VERSION=3.2.9 -LIBCGICC_SITE=$(BR2_GNU_MIRROR)/cgicc -LIBCGICC_SOURCE=cgicc-$(LIBCGICC_VERSION).tar.gz -LIBCGICC_INSTALL_STAGING=YES -LIBCGICC_AUTORECONF=YES +################################################################################ +LIBCGICC_VERSION = 3.2.9 +LIBCGICC_SITE = $(BR2_GNU_MIRROR)/cgicc +LIBCGICC_SOURCE = cgicc-$(LIBCGICC_VERSION).tar.gz +LIBCGICC_LICENSE = LGPLv3+ +LIBCGICC_INSTALL_STAGING = YES +LIBCGICC_AUTORECONF = YES +LIBCGICC_CONFIG_SCRIPTS = cgicc-config LIBCGICC_CONF_OPT = \ --disable-demos \ --disable-doc -$(eval $(call AUTOTARGETS,package,libcgicc)) +$(eval $(autotools-package)) diff --git a/package/libcgroup/Config.in b/package/libcgroup/Config.in new file mode 100644 index 0000000000..b7a84e06e0 --- /dev/null +++ b/package/libcgroup/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LIBCGROUP + bool "libcgroup" + depends on BR2_INSTALL_LIBSTDCPP + # libcgroup uses which is not included by default in uClibc + depends on BR2_TOOLCHAIN_USES_GLIBC + help + libcgroup is a library that abstracts the control + group file system in Linux. + + http://libcg.sourceforge.net/ + +comment "libcgroup needs an (e)glibc toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/libcgroup/libcgroup.mk b/package/libcgroup/libcgroup.mk new file mode 100644 index 0000000000..6d7ae54665 --- /dev/null +++ b/package/libcgroup/libcgroup.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# libcgroup +# +################################################################################ + +LIBCGROUP_VERSION = 0.38 +LIBCGROUP_SOURCE = libcgroup-$(LIBCGROUP_VERSION).tar.bz2 +LIBCGROUP_SITE = http://downloads.sourceforge.net/project/libcg/libcgroup/v.038 +LIBCGROUP_LICENSE = LGPLv2.1 +LIBCGROUP_LICENSE_FILES = COPYING +LIBCGROUP_DEPENDENCIES = host-bison host-flex +LIBCGROUP_INSTALL_STAGING = YES + +# Undefining _FILE_OFFSET_BITS here because of a "bug" with glibc fts.h +# large file support. See https://bugzilla.redhat.com/show_bug.cgi?id=574992 +# for more information. +LIBCGROUP_CONF_ENV = \ + CXXFLAGS+="-U_FILE_OFFSET_BITS" \ + CFLAGS+="-U_FILE_OFFSET_BITS" + +LIBCGROUP_CONF_OPT = \ + --disable-tools \ + --disable-daemon \ + --disable-initscript-install + +ifeq ($(BR2_PACKAGE_LINUX_PAM),y) + LIBCGROUP_DEPENDENCIES += linux-pam + LIBCGROUP_CONF_OPT += --enable-pam +else + LIBCGROUP_CONF_OPT += --disable-pam +endif + +$(eval $(autotools-package)) diff --git a/package/libcofi/Config.in b/package/libcofi/Config.in new file mode 100644 index 0000000000..e9914d6e0f --- /dev/null +++ b/package/libcofi/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBCOFI + bool "libcofi" + depends on BR2_arm + help + A replacement for memcpy and memset functionality for the + Raspberry Pi with the intention of gaining greater performance. + + https://github.com/simonjhall/copies-and-fills diff --git a/package/libcofi/libcofi.mk b/package/libcofi/libcofi.mk new file mode 100644 index 0000000000..88d51d3fde --- /dev/null +++ b/package/libcofi/libcofi.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# libcofi +# +################################################################################ + +LIBCOFI_VERSION = 7313fbe12b0593034d0a1b606bf33c7cf4ababce +LIBCOFI_SITE = http://github.com/simonjhall/copies-and-fills/tarball/$(LIBCOFI_VERSION) +LIBCOFI_LICENSE = LGPLv2.1 +LIBCOFI_LICENSE_FILES = README.md + +define LIBCOFI_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define LIBCOFI_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/libcofi_rpi.so $(TARGET_DIR)/usr/lib/libcofi_rpi.so +endef + +$(eval $(generic-package)) diff --git a/package/libconfig/libconfig.mk b/package/libconfig/libconfig.mk index 6e232a4613..7a80df3f1f 100644 --- a/package/libconfig/libconfig.mk +++ b/package/libconfig/libconfig.mk @@ -1,17 +1,18 @@ -############################################################# +################################################################################ # # libconfig # -############################################################# -LIBCONFIG_VERSION:=1.4.6 -LIBCONFIG_SOURCE:=libconfig-$(LIBCONFIG_VERSION).tar.gz -LIBCONFIG_SITE:=http://www.hyperrealm.com/libconfig/ -LIBCONFIG_AUTORECONF:=NO -LIBCONFIG_INSTALL_STAGING:=YES -LIBCONFIG_INSTALL_TARGET:=YES +################################################################################ + +LIBCONFIG_VERSION = 1.4.9 +LIBCONFIG_SITE = http://www.hyperrealm.com/libconfig/ +LIBCONFIG_LICENSE = LGPLv2.1+ +LIBCONFIG_LICENSE_FILES = COPYING.LIB +LIBCONFIG_INSTALL_STAGING = YES +LIBCONFIG_CONF_OPT = --disable-examples ifneq ($(BR2_INSTALL_LIBSTDCPP),y) -LIBCONFIG_CONF_OPT:=--disable-cxx +LIBCONFIG_CONF_OPT += --disable-cxx endif -$(eval $(call AUTOTARGETS,package,libconfig)) +$(eval $(autotools-package)) diff --git a/package/libconfuse/Config.in b/package/libconfuse/Config.in index e123dab48c..be18cbb073 100644 --- a/package/libconfuse/Config.in +++ b/package/libconfuse/Config.in @@ -8,4 +8,4 @@ config BR2_PACKAGE_LIBCONFUSE environment variable expansion, functions and nested include statements. - http://www.nongnu.org/confuse/ + http://savannah.nongnu.org/download/confuse/ diff --git a/package/libconfuse/libconfuse-2.6-dont-use-werror.patch b/package/libconfuse/libconfuse-2.6-dont-use-werror.patch deleted file mode 100644 index 50d0733264..0000000000 --- a/package/libconfuse/libconfuse-2.6-dont-use-werror.patch +++ /dev/null @@ -1,34 +0,0 @@ -confuse: don't compile with -Werror - -Werror isn't really a robust setting for !development. ---- - src/Makefile.am | 2 +- - src/Makefile.in | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -Index: confuse-2.6/src/Makefile.am -=================================================================== ---- confuse-2.6.orig/src/Makefile.am -+++ confuse-2.6/src/Makefile.am -@@ -10,7 +10,7 @@ - DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ - - if cc_is_gcc --AM_CFLAGS=-Wall -Werror -+AM_CFLAGS=-Wall - endif - - LIBS = @LIBS@ -Index: confuse-2.6/src/Makefile.in -=================================================================== ---- confuse-2.6.orig/src/Makefile.in -+++ confuse-2.6/src/Makefile.in -@@ -196,7 +196,7 @@ - libconfuse_la_SOURCES = confuse.c lexer.l - libconfuse_la_LIBADD = $(LTLIBINTL) - include_HEADERS = confuse.h --@cc_is_gcc_TRUE@AM_CFLAGS = -Wall -Werror -+@cc_is_gcc_TRUE@AM_CFLAGS = -Wall - CLEANFILES = *~ \#*\# - AM_LFLAGS = -Pcfg_yy -olex.yy.c - all: all-am diff --git a/package/libconfuse/libconfuse.mk b/package/libconfuse/libconfuse.mk index 2665c7a0ab..66cabd30a7 100644 --- a/package/libconfuse/libconfuse.mk +++ b/package/libconfuse/libconfuse.mk @@ -1,15 +1,14 @@ -############################################################# +################################################################################ # # libconfuse # -############################################################# -LIBCONFUSE_VERSION:=2.6 -LIBCONFUSE_SOURCE:=confuse-$(LIBCONFUSE_VERSION).tar.gz -LIBCONFUSE_SITE:=http://bzero.se/confuse/ -LIBCONFUSE_AUTORECONF:=NO -LIBCONFUSE_INSTALL_STAGING:=YES -LIBCONFUSE_INSTALL_TARGET:=YES +################################################################################ -LIBCONFUSE_CONF_OPT:=--enable-shared --disable-rpath +LIBCONFUSE_VERSION = 2.7 +LIBCONFUSE_SOURCE = confuse-$(LIBCONFUSE_VERSION).tar.gz +LIBCONFUSE_SITE = http://savannah.nongnu.org/download/confuse/ +LIBCONFUSE_INSTALL_STAGING = YES +LIBCONFUSE_CONF_OPT = --disable-rpath -$(eval $(call AUTOTARGETS,package,libconfuse)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/libcue/Config.in b/package/libcue/Config.in new file mode 100644 index 0000000000..61217467d7 --- /dev/null +++ b/package/libcue/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBCUE + bool "libcue" + select BR2_PACKAGE_FLEX + help + CUE Sheet Parser Library + + http://libcue.sourceforge.net/ diff --git a/package/multimedia/libcue/libcue-1.4.0-__unused-fix.patch b/package/libcue/libcue-1.4.0-__unused-fix.patch similarity index 100% rename from package/multimedia/libcue/libcue-1.4.0-__unused-fix.patch rename to package/libcue/libcue-1.4.0-__unused-fix.patch diff --git a/package/libcue/libcue.mk b/package/libcue/libcue.mk new file mode 100644 index 0000000000..e2cf6305ba --- /dev/null +++ b/package/libcue/libcue.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libcue +# +################################################################################ + +LIBCUE_VERSION = 1.4.0 +LIBCUE_SITE = http://downloads.sourceforge.net/project/libcue/libcue/$(LIBCUE_VERSION) +LIBCUE_SOURCE = libcue-$(LIBCUE_VERSION).tar.bz2 +LIBCUE_LICENSE = GPLv2, BSD-2c (rem.c) +LIBCUE_LICENSE_FILES = COPYING +LIBCUE_DEPENDENCIES = flex +LIBCUE_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/multimedia/libcuefile/Config.in b/package/libcuefile/Config.in similarity index 100% rename from package/multimedia/libcuefile/Config.in rename to package/libcuefile/Config.in diff --git a/package/multimedia/libcuefile/libcuefile.mk b/package/libcuefile/libcuefile.mk similarity index 88% rename from package/multimedia/libcuefile/libcuefile.mk rename to package/libcuefile/libcuefile.mk index 86ec07098c..ceb15095a2 100644 --- a/package/multimedia/libcuefile/libcuefile.mk +++ b/package/libcuefile/libcuefile.mk @@ -4,7 +4,7 @@ # ################################################################################ -LIBCUEFILE_VERSION = r453 +LIBCUEFILE_VERSION = r475 LIBCUEFILE_SITE = http://files.musepack.net/source LIBCUEFILE_SOURCE = libcuefile_$(LIBCUEFILE_VERSION).tar.gz LIBCUEFILE_INSTALL_STAGING = YES @@ -20,4 +20,4 @@ endef LIBCUEFILE_POST_INSTALL_STAGING_HOOKS += LIBCUEFILE_INSTALL_STAGING_INCLUDES LIBCUEFILE_POST_INSTALL_TARGET_HOOKS += LIBCUEFILE_INSTALL_TARGET_INCLUDES -$(eval $(call CMAKETARGETS,package/multimedia,libcuefile)) +$(eval $(cmake-package)) diff --git a/package/libcurl/Config.in b/package/libcurl/Config.in index 1d6d08e680..8e2953e45b 100644 --- a/package/libcurl/Config.in +++ b/package/libcurl/Config.in @@ -4,7 +4,7 @@ config BR2_PACKAGE_LIBCURL cURL is a tool for getting files from FTP, HTTP, Gopher, Telnet, and Dict servers, using any of the supported protocols. - http://curl.haxx.nu/ + http://curl.haxx.se/ config BR2_PACKAGE_CURL bool "curl binary" diff --git a/package/libcurl/libcurl-0001-CVE-2013-4545.patch b/package/libcurl/libcurl-0001-CVE-2013-4545.patch new file mode 100644 index 0000000000..39545fec59 --- /dev/null +++ b/package/libcurl/libcurl-0001-CVE-2013-4545.patch @@ -0,0 +1,32 @@ +From 3c3622b66221d89509cffaa693fc7dcd5c5b96cf Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Wed, 2 Oct 2013 15:31:10 +0200 +Subject: [PATCH] OpenSSL: acknowledge CURLOPT_SSL_VERIFYHOST without + VERIFYPEER + +Setting only CURLOPT_SSL_VERIFYHOST without CURLOPT_SSL_VERIFYPEER set +should still verify that the host name fields in the server certificate +is fine or return failure. + +Bug: http://curl.haxx.se/mail/lib-2013-10/0002.html +Reported-by: Ishan SinghLevett +--- + lib/ssluse.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/ssluse.c b/lib/ssluse.c +index 4f3c1e1..9974ac8 100644 +--- a/lib/ssluse.c ++++ b/lib/ssluse.c +@@ -2351,7 +2351,7 @@ ossl_connect_step3(struct connectdata *conn, + * operations. + */ + +- if(!data->set.ssl.verifypeer) ++ if(!data->set.ssl.verifypeer && !data->set.ssl.verifyhost) + (void)servercert(conn, connssl, FALSE); + else + retcode = servercert(conn, connssl, TRUE); +-- +1.8.3.2 + diff --git a/package/libcurl/libcurl.mk b/package/libcurl/libcurl.mk index ca293fbd69..059f08a119 100644 --- a/package/libcurl/libcurl.mk +++ b/package/libcurl/libcurl.mk @@ -1,13 +1,26 @@ -############################################################# +################################################################################ # # libcurl # -############################################################# -LIBCURL_VERSION = 7.21.2 +################################################################################ + +LIBCURL_VERSION = 7.32.0 LIBCURL_SOURCE = curl-$(LIBCURL_VERSION).tar.bz2 -LIBCURL_SITE = http://curl.haxx.se/download/ +LIBCURL_SITE = http://curl.haxx.se/download +LIBCURL_DEPENDENCIES = host-pkgconf \ + $(if $(BR2_PACKAGE_ZLIB),zlib) \ + $(if $(BR2_PACKAGE_LIBIDN),libidn) +LIBCURL_LICENSE = ICS +LIBCURL_LICENSE_FILES = COPYING LIBCURL_INSTALL_STAGING = YES -LIBCURL_CONF_OPT = --disable-verbose --disable-manual --enable-hidden-symbols + +# We disable NTLM support because it uses fork(), which doesn't work +# on non-MMU platforms. Moreover, this authentication method is +# probably almost never used. See +# http://curl.haxx.se/docs/manpage.html#--ntlm. +LIBCURL_CONF_OPT = --disable-verbose --disable-manual --disable-ntlm-wb \ + --enable-hidden-symbols --with-random=/dev/urandom +LIBCURL_CONFIG_SCRIPTS = curl-config ifeq ($(BR2_PACKAGE_OPENSSL),y) LIBCURL_DEPENDENCIES += openssl @@ -17,19 +30,44 @@ LIBCURL_CONF_ENV += ac_cv_lib_crypto_CRYPTO_lock=yes # Fix it by setting LD_LIBRARY_PATH to something sensible so those libs # are found first. LIBCURL_CONF_ENV += LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:/lib:/usr/lib -LIBCURL_CONF_OPT += --with-ssl=$(STAGING_DIR)/usr --with-random=/dev/urandom +LIBCURL_CONF_OPT += --with-ssl=$(STAGING_DIR)/usr \ + --with-ca-path=/etc/ssl/certs +else ifeq ($(BR2_PACKAGE_GNUTLS),y) +LIBCURL_CONF_OPT += --with-gnutls=$(STAGING_DIR)/usr +LIBCURL_DEPENDENCIES += gnutls +else ifeq ($(BR2_PACKAGE_POLARSSL),y) +LIBCURL_CONF_OPT += --with-polarssl=$(STAGING_DIR)/usr +LIBCURL_DEPENDENCIES += polarssl +else ifeq ($(BR2_PACKAGE_LIBNSS),y) +LIBCURL_CONF_OPT += --with-nss=$(STAGING_DIR)/usr +LIBCURL_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) `$(PKG_CONFIG_HOST_BINARY) nspr nss --cflags`" +LIBCURL_DEPENDENCIES += libnss else -LIBCURL_CONF_OPT += --without-ssl +LIBCURL_CONF_OPT += --without-ssl --without-gnutls \ + --without-polarssl --without-nss endif -define LIBCURL_TARGET_CLEANUP - rm -rf $(TARGET_DIR)/usr/bin/curl-config \ - $(if $(BR2_PACKAGE_CURL),,$(TARGET_DIR)/usr/bin/curl) +# Configure curl to support libssh2 +ifeq ($(BR2_PACKAGE_LIBSSH2),y) +LIBCURL_DEPENDENCIES += libssh2 +LIBCURL_CONF_OPT += --with-libssh2 +else +LIBCURL_CONF_OPT += --without-libssh2 +endif + +define LIBCURL_FIX_DOT_PC + printf 'Requires: openssl\n' >>$(@D)/libcurl.pc.in endef +LIBCURL_POST_PATCH_HOOKS += $(if $(BR2_PACKAGE_OPENSSL),LIBCURL_FIX_DOT_PC) +ifeq ($(BR2_PACKAGE_CURL),) +define LIBCURL_TARGET_CLEANUP + rm -rf $(TARGET_DIR)/usr/bin/curl +endef LIBCURL_POST_INSTALL_TARGET_HOOKS += LIBCURL_TARGET_CLEANUP +endif -$(eval $(call AUTOTARGETS,package,libcurl)) +$(eval $(autotools-package)) curl: libcurl curl-clean: libcurl-clean diff --git a/package/libdaemon/Config.in b/package/libdaemon/Config.in index 69432630d6..bfcedc1968 100644 --- a/package/libdaemon/Config.in +++ b/package/libdaemon/Config.in @@ -1,5 +1,7 @@ config BR2_PACKAGE_LIBDAEMON bool "libdaemon" + # needs fork() + depends on BR2_USE_MMU help libdaemon is a lightweight C library that eases the writing of UNIX daemons. diff --git a/package/libdaemon/libdaemon.mk b/package/libdaemon/libdaemon.mk index 6972a717b4..a45be4bcd1 100644 --- a/package/libdaemon/libdaemon.mk +++ b/package/libdaemon/libdaemon.mk @@ -1,17 +1,16 @@ -############################################################# +################################################################################ # -# libdaemon (UNIX daemon library) +# libdaemon # -############################################################# +################################################################################ LIBDAEMON_VERSION = 0.14 -LIBDAEMON_SOURCE = libdaemon-$(LIBDAEMON_VERSION).tar.gz -LIBDAEMON_SITE = http://0pointer.de/lennart/projects/libdaemon/ -LIBDAEMON_AUTORECONF = NO +LIBDAEMON_SITE = http://0pointer.de/lennart/projects/libdaemon +LIBDAEMON_LICENSE = LGPLv2.1+ +LIBDAEMON_LICENSE_FILES = LICENSE LIBDAEMON_INSTALL_STAGING = YES LIBDAEMON_CONF_ENV = ac_cv_func_setpgrp_void=no LIBDAEMON_CONF_OPT = --disable-lynx +LIBDAEMON_DEPENDENCIES = host-pkgconf -LIBDAEMON_DEPENDENCIES = host-pkg-config - -$(eval $(call AUTOTARGETS,package,libdaemon)) +$(eval $(autotools-package)) diff --git a/package/libdmtx/Config.in b/package/libdmtx/Config.in new file mode 100644 index 0000000000..db4187fdae --- /dev/null +++ b/package/libdmtx/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBDMTX + bool "libdmtx" + help + libdmtx is a software library that enables programs to read and write + Data Matrix barcodes of the modern ECC200 variety. + + http://www.libdmtx.org/ diff --git a/package/libdmtx/libdmtx.mk b/package/libdmtx/libdmtx.mk new file mode 100644 index 0000000000..69c7b8812f --- /dev/null +++ b/package/libdmtx/libdmtx.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# libdmtx +# +################################################################################ + +LIBDMTX_VERSION = 0.7.4 +LIBDMTX_SITE = http://downloads.sourceforge.net/project/libdmtx/libdmtx/$(LIBDMTX_VERSION) +LIBDMTX_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libdnet/libdnet-002-python-makefile.patch b/package/libdnet/libdnet-002-python-makefile.patch index 4c8729ddcd..fb41e43e35 100644 --- a/package/libdnet/libdnet-002-python-makefile.patch +++ b/package/libdnet/libdnet-002-python-makefile.patch @@ -1,10 +1,16 @@ ---- a/python/Makefile.am 2006-01-15 18:08:23.000000000 +1100 -+++ b/python/Makefile.am 2008-09-04 15:25:52.000000000 +1000 +--- + python/Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +Index: libdnet-1.11/python/Makefile.am +=================================================================== +--- libdnet-1.11.orig/python/Makefile.am ++++ libdnet-1.11/python/Makefile.am @@ -11,6 +11,7 @@ pyrexc $(srcdir)/dnet.pyx python-build: $(srcdir)/dnet.c -+ CC="$(CC)" LDSHARED="$(CC) -shared" $(PYTHON) setup.py build_ext -I$(PYINCDIR) ++ CC="$(CC)" LDSHARED="$(CC) -shared" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" $(PYTHON) setup.py build_ext -I$(PYINCDIR) -L$(PYLIBDIR) $(PYTHON) setup.py build touch python-build diff --git a/package/libdnet/libdnet.mk b/package/libdnet/libdnet.mk index eb67b055a5..177ef78d54 100644 --- a/package/libdnet/libdnet.mk +++ b/package/libdnet/libdnet.mk @@ -1,25 +1,23 @@ -############################################################# +################################################################################ # # libdnet # -############################################################# +################################################################################ LIBDNET_VERSION = 1.11 -LIBDNET_SOURCE = libdnet-$(LIBDNET_VERSION).tar.gz -LIBDNET_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/libdnet/ +LIBDNET_SITE = http://downloads.sourceforge.net/project/libdnet/libdnet/libdnet-$(LIBDNET_VERSION) +LIBDNET_LICENSE = BSD-3c +LIBDNET_LICENSE_FILES = LICENSE LIBDNET_INSTALL_STAGING = YES -LIBDNET_INSTALL_TARGET = YES LIBDNET_AUTORECONF = YES LIBDNET_CONF_OPT = \ --with-gnu-ld \ - --enable-shared \ - --enable-static \ --with-check=no ifneq ($(BR2_PACKAGE_LIBDNET_PYTHON),) LIBDNET_DEPENDENCIES = python LIBDNET_CONF_OPT += --with-python -LIBDNET_MAKE_OPT = PYTHON=python$(PYTHON_VERSION_MAJOR) PYINCDIR=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) +LIBDNET_MAKE_OPT = PYINCDIR=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) PYLIBDIR=$(STAGING_DIR)/usr/lib LIBDNET_INSTALL_TARGET_OPT = $(LIBDNET_MAKE_OPT) DESTDIR=$(TARGET_DIR) INSTALL_STRIP_FLAG=-s install-exec LIBDNET_INSTALL_STAGING_OPT = $(LIBDNET_MAKE_OPT) DESTDIR=$(STAGING_DIR) install endif @@ -31,4 +29,10 @@ endef LIBDNET_POST_EXTRACT_HOOKS += LIBDNET_FIXUP_ACINCLUDE_M4 -$(eval $(call AUTOTARGETS,package,libdnet)) +define LIBDNET_REMOVE_CONFIG_SCRIPT + $(RM) -f $(TARGET_DIR)/usr/bin/dnet-config +endef + +LIBDNET_POST_INSTALL_TARGET_HOOKS += LIBDNET_REMOVE_CONFIG_SCRIPT + +$(eval $(autotools-package)) diff --git a/package/libdrm/Config.in b/package/libdrm/Config.in index d68f9d5cb8..205f47ceea 100644 --- a/package/libdrm/Config.in +++ b/package/libdrm/Config.in @@ -1,18 +1,69 @@ config BR2_PACKAGE_LIBDRM bool "libdrm" + select BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS depends on BR2_PACKAGE_XORG7 depends on BR2_LARGEFILE - select BR2_PACKAGE_XPROTO_GLPROTO - select BR2_PACKAGE_XPROTO_XF86VIDMODEPROTO - select BR2_PACKAGE_XLIB_LIBXXF86VM - select BR2_PACKAGE_XLIB_LIBXMU - select BR2_PACKAGE_XPROTO_DRI2PROTO - select BR2_PACKAGE_PTHREAD_STUBS - select BR2_PACKAGE_LIBATOMIC_OPS if BR2_PACKAGE_XDRIVER_XF86_VIDEO_INTEL help Direct Rendering Manager http://dri.freedesktop.org/libdrm/ -comment "libdrm requires a toolchain with LARGEFILE support" - depends on BR2_PACKAGE_XORG7 && !BR2_LARGEFILE +if BR2_PACKAGE_LIBDRM + +menu "DRM Drivers" + +config BR2_PACKAGE_LIBDRM_INTEL + bool "intel" + select BR2_PACKAGE_LIBATOMIC_OPS + select BR2_PACKAGE_XLIB_LIBPCIACCESS + depends on BR2_i386 || BR2_x86_64 + help + installs intel graphics driver + +config BR2_PACKAGE_LIBDRM_RADEON + bool "radeon" + select BR2_PACKAGE_LIBATOMIC_OPS + select BR2_PACKAGE_XLIB_LIBPCIACCESS + depends on BR2_i386 || BR2_x86_64 + help + install AMD/ATI graphics driver + +config BR2_PACKAGE_LIBDRM_NOUVEAU + bool "nouveau" + select BR2_PACKAGE_XLIB_LIBPCIACCESS + depends on BR2_i386 || BR2_x86_64 + help + install Nvidia graphics driver + +config BR2_PACKAGE_LIBDRM_VMWGFX + bool "vmwgfx" + select BR2_PACKAGE_XLIB_LIBPCIACCESS + depends on BR2_i386 || BR2_x86_64 + help + installs Vmware graphics driver + +config BR2_PACKAGE_LIBDRM_OMAP + bool "omap (experimental)" + depends on BR2_arm + help + install the TI OMAP driver using an experimental API. + +config BR2_PACKAGE_LIBDRM_EXYNOS + bool "exynos (experimental)" + depends on BR2_arm + help + installs Samsung Exynos driver using an experimental API. + +config BR2_PACKAGE_LIBDRM_FREEDRENO + bool "freedreno (experimental)" + depends on BR2_arm + help + install Qualcomm Snapdragon driver using an experimental API. + +endmenu + +endif + +comment "libdrm needs a toolchain w/ largefile" + depends on BR2_PACKAGE_XORG7 + depends on !BR2_LARGEFILE diff --git a/package/libdrm/libdrm.mk b/package/libdrm/libdrm.mk index fe7a46fcea..697cd2fde7 100644 --- a/package/libdrm/libdrm.mk +++ b/package/libdrm/libdrm.mk @@ -1,24 +1,75 @@ -############################################################# +################################################################################ # # libdrm # -############################################################# -LIBDRM_VERSION = 2.4.19 +################################################################################ + +LIBDRM_VERSION = 2.4.46 LIBDRM_SOURCE = libdrm-$(LIBDRM_VERSION).tar.bz2 LIBDRM_SITE = http://dri.freedesktop.org/libdrm/ +LIBDRM_LICENSE = MIT + LIBDRM_INSTALL_STAGING = YES -LIBDRM_DEPENDENCIES = xproto_glproto xproto_xf86vidmodeproto xlib_libXxf86vm xlib_libXmu xproto_dri2proto pthread-stubs +LIBDRM_DEPENDENCIES = \ + xlib_libpthread-stubs \ + host-pkgconf + +LIBDRM_CONF_OPT = \ + --disable-cairo-tests \ + --disable-manpages -ifeq ($(BR2_PACKAGE_XDRIVER_XF86_VIDEO_INTEL),y) +ifeq ($(BR2_PACKAGE_LIBDRM_INTEL),y) LIBDRM_CONF_OPT += --enable-intel -LIBDRM_DEPENDENCIES += libatomic_ops +LIBDRM_DEPENDENCIES += libatomic_ops xlib_libpciaccess else LIBDRM_CONF_OPT += --disable-intel endif -ifneq ($(BR2_PACKAGE_XDRIVER_XF86_VIDEO_ATI),y) +ifeq ($(BR2_PACKAGE_LIBDRM_RADEON),y) +LIBDRM_CONF_OPT += --enable-radeon +LIBDRM_DEPENDENCIES += xlib_libpciaccess +else LIBDRM_CONF_OPT += --disable-radeon endif -$(eval $(call AUTOTARGETS,package,libdrm)) +ifeq ($(BR2_PACKAGE_LIBDRM_NOUVEAU),y) +LIBDRM_CONF_OPT += --enable-nouveau +LIBDRM_DEPENDENCIES += xlib_libpciaccess +else +LIBDRM_CONF_OPT += --disable-nouveau +endif + +ifeq ($(BR2_PACKAGE_LIBDRM_VMWGFX),y) +LIBDRM_CONF_OPT += --enable-vmwgfx +LIBDRM_DEPENDENCIES += xlib_libpciaccess +else +LIBDRM_CONF_OPT += --enable-vmwgfx +endif + +ifeq ($(BR2_PACKAGE_LIBDRM_OMAP),y) +LIBDRM_CONF_OPT += --enable-omap-experimental-api +else +LIBDRM_CONF_OPT += --disable-omap-experimental-api +endif + +ifeq ($(BR2_PACKAGE_LIBDRM_EXYNOS),y) +LIBDRM_CONF_OPT += --enable-exynos-experimental-api +else +LIBDRM_CONF_OPT += --disable-exynos-experimental-api +endif + +ifeq ($(BR2_PACKAGE_LIBDRM_FREEDRENO),y) +LIBDRM_CONF_OPT += --enable-freedreno-experimental-api +else +LIBDRM_CONF_OPT += --disable-freedreno-experimental-api +endif + +ifeq ($(BR2_PACKAGE_UDEV),y) +LIBDRM_CONF_OPT += --enable-udev +LIBDRM_DEPENDENCIES += udev +else +LIBDRM_CONF_OPT += --disable-udev +endif + +$(eval $(autotools-package)) diff --git a/package/libdvbsi/Config.in b/package/libdvbsi/Config.in new file mode 100644 index 0000000000..f67342d650 --- /dev/null +++ b/package/libdvbsi/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LIBDVBSI + bool "libdvbsi" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + help + C++ parsing library for Service Information (SI) in DVB systems. + With libdvbsi++ you can convert raw DVB service information to + a set of C++ objects, removing the need to parse data manually. + + http://www.saftware.de/ + +comment "libdvbsi++ needs a toolchain w/ C++, wchar, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libdvbsi/libdvbsi.mk b/package/libdvbsi/libdvbsi.mk new file mode 100644 index 0000000000..c67bdbdce8 --- /dev/null +++ b/package/libdvbsi/libdvbsi.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# libdvbsi +# +################################################################################ + +LIBDVBSI_VERSION = 0.3.6 +LIBDVBSI_SOURCE = libdvbsi++-$(LIBDVBSI_VERSION).tar.bz2 +LIBDVBSI_SITE = http://www.saftware.de/libdvbsi++ +LIBDVBSI_INSTALL_STAGING = YES +LIBDVBSI_LICENSE = LGPLv2.1 +LIBDVBSI_LICENSE_FILES = COPYING + +# sometimes no Makefile is in the archive, just (re)generate +LIBDVBSI_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/libdvdnav/Config.in b/package/libdvdnav/Config.in new file mode 100644 index 0000000000..63783827e6 --- /dev/null +++ b/package/libdvdnav/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LIBDVDNAV + bool "libdvdnav" + depends on BR2_LARGEFILE # libdvdread + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBDVDREAD + help + libdvdnav is a library that allows easy use of sophisticated + DVD navigation features such as DVD menus, multiangle + playback and even interactive DVD games. + + http://www.mplayerhq.hu + +comment "libdvdnav needs a toolchain w/ largefile, threads" + depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libdvdnav/libdvdnav.mk b/package/libdvdnav/libdvdnav.mk new file mode 100644 index 0000000000..9a29d6d6c4 --- /dev/null +++ b/package/libdvdnav/libdvdnav.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# libdvdnav +# +################################################################################ + +LIBDVDNAV_VERSION = 4.1.3 +LIBDVDNAV_SOURCE = libdvdnav-$(LIBDVDNAV_VERSION).tar.bz2 +LIBDVDNAV_SITE = http://dvdnav.mplayerhq.hu/releases +LIBDVDNAV_AUTORECONF = YES +LIBDVDNAV_INSTALL_STAGING = YES +LIBDVDNAV_CONFIG_SCRIPTS = dvdnav-config +LIBDVDNAV_DEPENDENCIES = libdvdread host-pkgconf + +# By default libdvdnav tries to find dvdread-config in $PATH. Because +# of cross compilation, we prefer using pkg-config. +LIBDVDNAV_CONF_OPT = --with-dvdread-config="$(PKG_CONFIG_HOST_BINARY) dvdread" + +$(eval $(autotools-package)) diff --git a/package/libdvdread/Config.in b/package/libdvdread/Config.in new file mode 100644 index 0000000000..94f4e62a70 --- /dev/null +++ b/package/libdvdread/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBDVDREAD + bool "libdvdread" + depends on BR2_LARGEFILE + help + libdvdread provides a simple foundation for reading + DVD-Video images. + + http://www.mplayerhq.hu/MPlayer/releases/dvdnav/ + +comment "libdvdread needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE diff --git a/package/libdvdread/libdvdread.mk b/package/libdvdread/libdvdread.mk new file mode 100644 index 0000000000..f7c59af73c --- /dev/null +++ b/package/libdvdread/libdvdread.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libdvdread +# +################################################################################ + +LIBDVDREAD_VERSION = 4.1.3 +LIBDVDREAD_SOURCE = libdvdread-$(LIBDVDREAD_VERSION).tar.bz2 +LIBDVDREAD_SITE = http://dvdnav.mplayerhq.hu/releases +LIBDVDREAD_AUTORECONF = YES +LIBDVDREAD_LIBTOOL_PATCH = YES +LIBDVDREAD_INSTALL_STAGING = YES +LIBDVDREAD_CONFIG_SCRIPTS = dvdread-config + +$(eval $(autotools-package)) diff --git a/package/libeXosip2/Config.in b/package/libeXosip2/Config.in index 8adca5a7d8..4cb8218f20 100644 --- a/package/libeXosip2/Config.in +++ b/package/libeXosip2/Config.in @@ -1,11 +1,14 @@ config BR2_PACKAGE_LIBEXOSIP2 bool "libeXosip2" + depends on BR2_USE_MMU # fork() select BR2_PACKAGE_LIBOSIP2 help - GNU Higher level SIP (Session Initiation Protocol) - This library aims to provide multimedia and telecom software - developers an easy and powerful interface to initiate and - control SIP based sessions in their applications. - SIP is a open standard replacement from IETF for H323. + eXosip is a library that hides the complexity of using the + SIP protocol for mutlimedia session establishement. + This protocol is mainly to be used by VoIP telephony + applications (endpoints or conference server) but might be + also usefull for any application that wish to establish + sessions like multiplayer games. + eXosip is based in libosip. - http://www.gnu.org/software/osip/ + http://savannah.nongnu.org/projects/exosip/ diff --git a/package/libeXosip2/libeXosip2-fix-non-ipv6-build.patch b/package/libeXosip2/libeXosip2-fix-non-ipv6-build.patch new file mode 100644 index 0000000000..bec833fb73 --- /dev/null +++ b/package/libeXosip2/libeXosip2-fix-non-ipv6-build.patch @@ -0,0 +1,22 @@ +[PATCH] Fix build on systems without IPV6_TCLASS support + +The wrong variable name was used. + +Signed-off-by: Peter Korsgaard +--- + src/eXtl_udp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: libeXosip2-3.6.0/src/eXtl_udp.c +=================================================================== +--- libeXosip2-3.6.0.orig/src/eXtl_udp.c ++++ libeXosip2-3.6.0/src/eXtl_udp.c +@@ -178,7 +178,7 @@ + res = setsockopt(udp_socket, IPPROTO_IPV6, IPV6_TCLASS, + (SOCKET_OPTION_VALUE)&tos, sizeof(tos)); + #else +- retval = setsockopt(udp_socket, IPPROTO_IPV6, IP_TOS, ++ res = setsockopt(udp_socket, IPPROTO_IPV6, IP_TOS, + (SOCKET_OPTION_VALUE)&tos, sizeof(tos)); + #endif + } diff --git a/package/libeXosip2/libeXosip2.mk b/package/libeXosip2/libeXosip2.mk index 415745b26a..6abdaab8a0 100644 --- a/package/libeXosip2/libeXosip2.mk +++ b/package/libeXosip2/libeXosip2.mk @@ -1,28 +1,30 @@ -############################################################# +################################################################################ # -# libeXosip2 +# libexosip2 # -############################################################# -LIBEXOSIP2_VERSION = 3.3.0 -LIBEXOSIP2_SOURCE = libexosip2_$(LIBEXOSIP2_VERSION).orig.tar.gz -LIBEXOSIP2_PATCH = libexosip2_$(LIBEXOSIP2_VERSION)-1.diff.gz -LIBEXOSIP2_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/libe/libexosip2 +################################################################################ + +LIBEXOSIP2_VERSION = 3.6.0 +LIBEXOSIP2_SITE = http://download.savannah.gnu.org/releases/exosip/ LIBEXOSIP2_INSTALL_STAGING = YES +LIBEXOSIP2_LICENSE = GPLv2+ +LIBEXOSIP2_LICENSE_FILES = COPYING + +LIBEXOSIP2_DEPENDENCIES = host-pkgconf libosip2 -LIBEXOSIP2_DEPENDENCIES = host-pkg-config libosip2 +ifeq ($(BR2_arc),y) +# toolchain __arc__ define conflicts with libeXosip2 source +LIBEXOSIP2_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -U__arc__" +endif -ifneq ($(LIBEXOSIP2_PATCH),) -define LIBEXOSIP2_DEBIAN_PATCHES - if [ -d $(@D)/debian/patches ]; then \ - (cd $(@D)/debian/patches && for i in *; \ - do $(SED) 's,^\+\+\+ .*cvs-$(LIBEXOSIP2_VERSION)/,+++ cvs-$(LIBEXOSIP2_VERSION)/,' $$i; \ - done; \ - ); \ - toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches \*; \ - fi -endef +ifeq ($(BR2_PACKAGE_OPENSSL),y) +LIBEXOSIP2_DEPENDENCIES += openssl +LIBEXOSIP2_CONF_OPT += --enable-openssl +else +LIBEXOSIP2_CONF_OPT += --disable-openssl endif -LIBEXOSIP2_POST_PATCH_HOOKS += LIBEXOSIP2_DEBIAN_PATCHES +LIBEXOSIP2_CONF_OPT += \ + --enable-mt=$(if $(BR2_TOOLCHAIN_HAS_THREADS),yes,no) -$(eval $(call AUTOTARGETS,package,libeXosip2)) +$(eval $(autotools-package)) diff --git a/package/libebml/Config.in b/package/libebml/Config.in new file mode 100644 index 0000000000..b50a4921a4 --- /dev/null +++ b/package/libebml/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBEBML + bool "libebml" + depends on BR2_INSTALL_LIBSTDCPP + help + Access library for the EBML (Extensible Binary Meta + Language, a binary derivative of XML) format. + + http://matroska.org + +comment "libebml needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/libebml/libebml.mk b/package/libebml/libebml.mk new file mode 100644 index 0000000000..9aeab77e8c --- /dev/null +++ b/package/libebml/libebml.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# libebml +# +################################################################################ + +LIBEBML_VERSION = 1.2.2 +LIBEBML_SOURCE = libebml-$(LIBEBML_VERSION).tar.bz2 +LIBEBML_SITE = http://dl.matroska.org/downloads/libebml/ +LIBEBML_INSTALL_STAGING = YES +LIBEBML_LICENSE = LGPLv2.1+ +LIBEBML_LICENSE_FILES = LICENSE.LGPL + +define LIBEBML_BUILD_CMDS + $(MAKE) -C $(@D)/make/linux CROSS="$(CCACHE) $(TARGET_CROSS)" +endef + +define LIBEBML_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D)/make/linux prefix=$(STAGING_DIR)/usr install +endef + +define LIBEBML_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D)/make/linux prefix=$(TARGET_DIR)/usr install +endef + +$(eval $(generic-package)) diff --git a/package/libedit/Config.in b/package/libedit/Config.in new file mode 100644 index 0000000000..a70f9ebb9a --- /dev/null +++ b/package/libedit/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_LIBEDIT + bool "libedit" + depends on BR2_USE_WCHAR + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_NCURSES + help + The editline library (from BSD) provides generic line editing + and history functions. It slightly resembles GNU readline. + + The official homepage is at: + http://ftp.netbsd.org/pub/NetBSD/NetBSD-release-5-0/src/lib/libedit/ + + Jess Thrysoee maintains an autotoolified packaged, which we use + in Buildroot as it makes it much simpler than using the upstream + sources which require pmake: + http://www.thrysoee.dk/editline/ + +comment "libedit needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR diff --git a/package/libedit/libedit-000-check-bsd-functions-in-libbsd.patch b/package/libedit/libedit-000-check-bsd-functions-in-libbsd.patch new file mode 100644 index 0000000000..21c57f8f11 --- /dev/null +++ b/package/libedit/libedit-000-check-bsd-functions-in-libbsd.patch @@ -0,0 +1,18 @@ +configure: on Linux, the BSD functions require linking against libbsd + +Signed-off-by: "Yann E. MORIN" + +diff -durN libedit-20130712-3.1.orig/configure.ac libedit-20130712-3.1/configure.ac +--- libedit-20130712-3.1.orig/configure.ac 2013-07-12 20:39:22.000000000 +0200 ++++ libedit-20130712-3.1/configure.ac 2013-07-28 23:35:35.012676469 +0200 +@@ -108,6 +108,10 @@ + #AC_FUNC_REALLOC + AC_TYPE_SIGNAL + AC_FUNC_STAT ++ ++# Search for libbsd for *vis functions ++AC_CHECK_LIB([bsd], [vis]) ++ + AC_CHECK_FUNCS([endpwent isascii memchr memset re_comp regcomp strcasecmp strchr strcspn strdup strerror strrchr strstr strtol issetugid wcsdup strlcpy strlcat fgetln vis strvis strunvis __secure_getenv secure_getenv]) + + # strlcpy diff --git a/package/libedit/libedit.mk b/package/libedit/libedit.mk new file mode 100644 index 0000000000..0ff418ac7c --- /dev/null +++ b/package/libedit/libedit.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# libedit +# +################################################################################ + +LIBEDIT_VERSION = 20130712-3.1 +LIBEDIT_SITE = http://www.thrysoee.dk/editline/ +LIBEDIT_INSTALL_STAGING = YES +LIBEDIT_DEPENDENCIES = ncurses + +# We're patching configure.ac +LIBEDIT_AUTORECONF = YES + +# Doesn't really support !wchar, but support is disabled otherwise +LIBEDIT_CONF_OPT += --enable-widec + +# Note: libbsd required for *vis functions, but works only with a toolchain +# with __progname; otherwise, some features are disabled, as if libbsd was +# missing entirely. +ifeq ($(BR2_PACKAGE_LIBBSD),y) +LIBEDIT_DEPENDENCIES += libbsd +endif + +$(eval $(autotools-package)) diff --git a/package/libelf/libelf.mk b/package/libelf/libelf.mk index 2a7d066ac5..047d00b7c0 100644 --- a/package/libelf/libelf.mk +++ b/package/libelf/libelf.mk @@ -1,21 +1,23 @@ -############################################################# +################################################################################ # # libelf # -############################################################# -LIBELF_VERSION=0.8.12 -LIBELF_SOURCE=libelf-$(LIBELF_VERSION).tar.gz -LIBELF_SITE=http://www.mr511.de/software/ +################################################################################ + +LIBELF_VERSION = 0.8.12 +LIBELF_SITE = http://www.mr511.de/software/ LIBELF_INSTALL_STAGING = YES LIBELF_INSTALL_STAGING_OPT = instroot=$(STAGING_DIR) install LIBELF_INSTALL_TARGET_OPT = instroot=$(TARGET_DIR) install +LIBELF_LICENSE = LGPLv2+ +LIBELF_LICENSE_FILES = COPYING.LIB -LIBELD_CONF_ENV = libelf_cv_working_memmove=yes \ +LIBELF_CONF_ENV = libelf_cv_working_memmove=yes \ mr_cv_target_elf=yes \ libelf_64bit=yes -LIBELF_CONF_OPT = --enable-shared --disable-sanity-checks \ +LIBELF_CONF_OPT = --disable-sanity-checks \ $(if $(BR2_ENABLE_DEBUG),--enable-debug,--disable-debug) \ $(if $(BR2_LARGEFILE),--enable-elf64) -$(eval $(call AUTOTARGETS,package,libelf)) +$(eval $(autotools-package)) diff --git a/package/liberation/Config.in b/package/liberation/Config.in index 48d4195bac..b68166f638 100644 --- a/package/liberation/Config.in +++ b/package/liberation/Config.in @@ -5,3 +5,18 @@ config BR2_PACKAGE_LIBERATION three most commonly used fonts on Microsoft systems: Times New Roman, Arial, and Courier New. +if BR2_PACKAGE_LIBERATION + +config BR2_PACKAGE_LIBERATION_MONO + bool "mono fonts" + default y + +config BR2_PACKAGE_LIBERATION_SANS + bool "sans fonts" + default y + +config BR2_PACKAGE_LIBERATION_SERIF + bool "serif fonts" + default y + +endif diff --git a/package/liberation/liberation.mk b/package/liberation/liberation.mk index 89987d6db6..408fd70d02 100644 --- a/package/liberation/liberation.mk +++ b/package/liberation/liberation.mk @@ -1,21 +1,42 @@ -############################################################# +################################################################################ # # liberation # -############################################################# +################################################################################ + LIBERATION_VERSION = 1.06.0.20100721 LIBERATION_SITE = http://www.fedorahosted.org/releases/l/i/liberation-fonts LIBERATION_SOURCE = liberation-fonts-ttf-$(LIBERATION_VERSION).tar.gz LIBERATION_TARGET_DIR = $(TARGET_DIR)/usr/share/fonts/liberation +ifeq ($(BR2_PACKAGE_LIBERATION_MONO),y) +define LIBERATION_INSTALL_MONO + $(INSTALL) -m 644 $(@D)/LiberationMono*.ttf $(LIBERATION_TARGET_DIR) +endef +endif + +ifeq ($(BR2_PACKAGE_LIBERATION_SANS),y) +define LIBERATION_INSTALL_SANS + $(INSTALL) -m 644 $(@D)/LiberationSans*.ttf $(LIBERATION_TARGET_DIR) +endef +endif + +ifeq ($(BR2_PACKAGE_LIBERATION_SERIF),y) +define LIBERATION_INSTALL_SERIF + $(INSTALL) -m 644 $(@D)/LiberationSerif*.ttf $(LIBERATION_TARGET_DIR) +endef +endif + define LIBERATION_INSTALL_TARGET_CMDS mkdir -p $(LIBERATION_TARGET_DIR) - $(INSTALL) -m 644 $(@D)/*.ttf $(LIBERATION_TARGET_DIR) + $(LIBERATION_INSTALL_MONO) + $(LIBERATION_INSTALL_SANS) + $(LIBERATION_INSTALL_SERIF) endef define LIBERATION_CLEAN_CMDS rm -rf $(LIBERATION_TARGET_DIR) endef -$(eval $(call GENTARGETS,package,liberation)) +$(eval $(generic-package)) diff --git a/package/libesmtp/Config.in b/package/libesmtp/Config.in new file mode 100644 index 0000000000..4e9e455d81 --- /dev/null +++ b/package/libesmtp/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBESMTP + bool "libesmtp" + help + Library for sending emails through SMTP. + + http://www.stafford.uklinux.net/libesmtp diff --git a/package/libesmtp/libesmtp.mk b/package/libesmtp/libesmtp.mk new file mode 100644 index 0000000000..f3f56118c5 --- /dev/null +++ b/package/libesmtp/libesmtp.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libesmtp +# +################################################################################ + +LIBESMTP_VERSION = 1.0.6 +LIBESMTP_SOURCE = libesmtp-$(LIBESMTP_VERSION).tar.bz2 +LIBESMTP_SITE = http://www.stafford.uklinux.net/libesmtp +LIBESMTP_INSTALL_STAGING = YES +LIBESMTP_CONFIG_SCRIPTS = libesmtp-config +LIBESMTP_DEPENDENCIES = $(if $(BR2_PACKAGE_OPENSSL),openssl) + +$(eval $(autotools-package)) diff --git a/package/libev/Config.in b/package/libev/Config.in new file mode 100644 index 0000000000..3d10cd70d8 --- /dev/null +++ b/package/libev/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBEV + bool "libev" + # needs memory fences + depends on !(BR2_avr32 || BR2_bfin) + help + Userspace library for handling asynchronous notifications + + http://software.schmorp.de/pkg/libev.html diff --git a/package/libev/libev.mk b/package/libev/libev.mk new file mode 100644 index 0000000000..174223187a --- /dev/null +++ b/package/libev/libev.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# libev +# +################################################################################ + +LIBEV_VERSION = 4.11 +LIBEV_SITE = http://dist.schmorp.de/libev/ +LIBEV_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libevent/libevent-disable-building-test-programs.patch b/package/libevent/libevent-disable-building-test-programs.patch new file mode 100644 index 0000000000..4b0f0d9b08 --- /dev/null +++ b/package/libevent/libevent-disable-building-test-programs.patch @@ -0,0 +1,30 @@ +From e932c8864e1bb8b6a7901d4b049a1100c4becba5 Mon Sep 17 00:00:00 2001 +From: Gilles Talis +Date: Fri, 21 Jun 2013 15:25:11 -0700 +Subject: [PATCH] Disable building test programs + +We are not really interested in building test programs. +Moreover, these programs use fork() function that is +not available on MMU-less architectures. + +Signed-off-by: Gilles Talis +--- + Makefile.in | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 2ebefa2..4fba1ff 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -487,7 +487,7 @@ LIBEVENT_LIBS_LA = libevent.la libevent_core.la libevent_extra.la \ + @INSTALL_LIBEVENT_TRUE@lib_LTLIBRARIES = $(LIBEVENT_LIBS_LA) + @INSTALL_LIBEVENT_TRUE@pkgconfig_DATA = $(LIBEVENT_PKGCONFIG) + @INSTALL_LIBEVENT_FALSE@noinst_LTLIBRARIES = $(LIBEVENT_LIBS_LA) +-SUBDIRS = . include sample test ++SUBDIRS = . include sample + @BUILD_WIN32_FALSE@SYS_LIBS = + @BUILD_WIN32_TRUE@SYS_LIBS = -lws2_32 -lshell32 -ladvapi32 + @BUILD_WIN32_FALSE@SYS_SRC = $(am__append_5) $(am__append_6) \ +-- +1.7.4.1 + diff --git a/package/libevent/libevent.mk b/package/libevent/libevent.mk index ba9769f45a..a6def1a442 100644 --- a/package/libevent/libevent.mk +++ b/package/libevent/libevent.mk @@ -1,15 +1,13 @@ -############################################################# +################################################################################ # # libevent # -############################################################# -LIBEVENT_VERSION = 1.4.12 -LIBEVENT_SOURCE = libevent-$(LIBEVENT_VERSION)-stable.tar.gz -LIBEVENT_SITE = http://monkey.org/~provos/ +################################################################################ -LIBEVENT_AUTORECONF = NO +LIBEVENT_VERSION = 2.0.21 +LIBEVENT_SOURCE = libevent-$(LIBEVENT_VERSION)-stable.tar.gz +LIBEVENT_SITE = https://github.com/downloads/libevent/libevent LIBEVENT_INSTALL_STAGING = YES -LIBEVENT_INSTALL_TARGET = YES define LIBEVENT_REMOVE_PYSCRIPT rm $(TARGET_DIR)/usr/bin/event_rpcgen.py @@ -21,4 +19,4 @@ ifneq ($(BR2_PACKAGE_PYTHON),y) LIBEVENT_POST_INSTALL_TARGET_HOOKS += LIBEVENT_REMOVE_PYSCRIPT endif -$(eval $(call AUTOTARGETS,package,libevent)) +$(eval $(autotools-package)) diff --git a/package/libexif/Config.in b/package/libexif/Config.in new file mode 100644 index 0000000000..9c89df4102 --- /dev/null +++ b/package/libexif/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBEXIF + bool "libexif" + help + Most digital cameras produce EXIF files, which are JPEG + files with extra tags that contain information about the + image. The EXIF library allows you to parse an EXIF file + and read the data from those tags. + + http://libexif.sf.net diff --git a/package/libexif/libexif.mk b/package/libexif/libexif.mk new file mode 100644 index 0000000000..a1d4475021 --- /dev/null +++ b/package/libexif/libexif.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libexif +# +################################################################################ + +LIBEXIF_VERSION = 0.6.21 +LIBEXIF_SOURCE = libexif-$(LIBEXIF_VERSION).tar.bz2 +LIBEXIF_SITE = http://downloads.sourceforge.net/project/libexif/libexif/$(LIBEXIF_VERSION) +LIBEXIF_INSTALL_STAGING = YES +LIBEXIF_CONF_OPT = --disable-docs +LIBEXIF_DEPENDENCIES = host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/libfcgi/Config.in b/package/libfcgi/Config.in new file mode 100644 index 0000000000..a622ec365f --- /dev/null +++ b/package/libfcgi/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBFCGI + bool "libfcgi" + help + FCGI, a fastcgi developer library for C/C++ + + http://www.fastcgi.com/ diff --git a/package/libfcgi/libfcgi-eof.patch b/package/libfcgi/libfcgi-eof.patch new file mode 100644 index 0000000000..e7314265a2 --- /dev/null +++ b/package/libfcgi/libfcgi-eof.patch @@ -0,0 +1,24 @@ +[PATCH] fix build with C++ support and gcc >= 4.4 + +EOF is defined in stdio, so ensure it is included. + +Based on similar patch by Markus Rothe: +http://comments.gmane.org/gmane.comp.web.fastcgi.devel/3205 + +Signed-off-by: Peter Korsgaard +--- + libfcgi/fcgio.cpp | 1 + + 1 file changed, 1 insertion(+) + +Index: fcgi-2.4.0/libfcgi/fcgio.cpp +=================================================================== +--- fcgi-2.4.0.orig/libfcgi/fcgio.cpp ++++ fcgi-2.4.0/libfcgi/fcgio.cpp +@@ -22,6 +22,7 @@ + #define DLLAPI __declspec(dllexport) + #endif + ++#include + #include + #include "fcgio.h" + diff --git a/package/libfcgi/libfcgi-link-against-libfcgi-la.patch b/package/libfcgi/libfcgi-link-against-libfcgi-la.patch new file mode 100644 index 0000000000..8a5973ac5b --- /dev/null +++ b/package/libfcgi/libfcgi-link-against-libfcgi-la.patch @@ -0,0 +1,20 @@ +Properly link libfcgi++ against libfcgi + +We cannot directly use -lfcgi to link libfcgi++ against libfcgi, +because libfcgi is not installed at this time. Instead, we should rely +on libtool doing the right thing, by specifying libfcgi.la in +libfcgi++ LIBADD variable. + +Signed-off-by: Thomas Petazzoni + +Index: b/libfcgi/Makefile.am +=================================================================== +--- a/libfcgi/Makefile.am ++++ b/libfcgi/Makefile.am +@@ -23,5 +23,6 @@ + $(INCLUDEDIR)/fcgio.h \ + fcgio.cpp + libfcgi___la_CFLAGS = @PTHREAD_CFLAGS@ +-libfcgi___la_LDFLAGS = -lfcgi -rpath @libdir@ ++libfcgi___la_LIBADD = libfcgi.la ++libfcgi___la_LDFLAGS = -rpath @libdir@ diff --git a/package/libfcgi/libfcgi-link-against-math.patch b/package/libfcgi/libfcgi-link-against-math.patch new file mode 100644 index 0000000000..4c87ea6786 --- /dev/null +++ b/package/libfcgi/libfcgi-link-against-math.patch @@ -0,0 +1,28 @@ +Link against math libraries when needed + +Signed-off-by: Thomas Petazzoni + +Index: b/cgi-fcgi/Makefile.am +=================================================================== +--- a/cgi-fcgi/Makefile.am ++++ b/cgi-fcgi/Makefile.am +@@ -11,5 +11,5 @@ + LIBDIR = ../libfcgi + LIBFCGI = $(LIBDIR)/libfcgi.la + +-LDADD = $(LIBFCGI) ++LDADD = $(LIBFCGI) -lm + cgi_fcgi_SOURCES = $(INCLUDE_FILES) cgi-fcgi.c +Index: b/examples/Makefile.am +=================================================================== +--- a/examples/Makefile.am ++++ b/examples/Makefile.am +@@ -21,7 +21,7 @@ + LIBDIR = ../libfcgi + LIBFCGI = $(LIBDIR)/libfcgi.la + +-LDADD = $(LIBFCGI) ++LDADD = $(LIBFCGI) -lm + + echo_SOURCES = $(INCLUDE_FILES) echo.c + echo_x_SOURCES = $(INCLUDE_FILES) echo-x.c diff --git a/package/libfcgi/libfcgi-make-autoreconfable.patch b/package/libfcgi/libfcgi-make-autoreconfable.patch new file mode 100644 index 0000000000..e255fc6d3b --- /dev/null +++ b/package/libfcgi/libfcgi-make-autoreconfable.patch @@ -0,0 +1,67 @@ +Make the package autoreconfigurable + +Adjust minor details in Makefile.am and configure.in in order to make +the package compatible with the autoconf/automake versions we are +using in Buildroot. + +Signed-off-by: Thomas Petazzoni + +Index: b/cgi-fcgi/Makefile.am +=================================================================== +--- a/cgi-fcgi/Makefile.am ++++ b/cgi-fcgi/Makefile.am +@@ -2,7 +2,7 @@ + bin_PROGRAMS = cgi-fcgi + + INCLUDEDIR = ../include +-CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include ++AM_CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include + + INCLUDE_FILES = $(INCLUDEDIR)/fastcgi.h \ + $(INCLUDEDIR)/fcgiapp.h \ +Index: b/configure.in +=================================================================== +--- a/configure.in ++++ b/configure.in +@@ -4,12 +4,13 @@ + dnl generate the file "configure", which is run during the build + dnl to configure the system for the local environment. + +-AC_INIT +-AM_INIT_AUTOMAKE(fcgi, 2.4.0) ++AC_INIT([fcgi], [2.4.0]) ++AM_INIT_AUTOMAKE([foreign]) + + AM_CONFIG_HEADER(fcgi_config.h) + + AC_PROG_CC ++AC_PROG_CC_C_O + AC_PROG_CPP + AC_PROG_INSTALL + AC_PROG_LIBTOOL +Index: b/examples/Makefile.am +=================================================================== +--- a/examples/Makefile.am ++++ b/examples/Makefile.am +@@ -11,7 +11,7 @@ + EXTRA_PROGRAMS = threaded echo-cpp + + INCLUDEDIR = ../include +-CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include ++AM_CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include + + INCLUDE_FILES = $(INCLUDEDIR)/fastcgi.h \ + $(INCLUDEDIR)/fcgiapp.h \ +Index: b/libfcgi/Makefile.am +=================================================================== +--- a/libfcgi/Makefile.am ++++ b/libfcgi/Makefile.am +@@ -1,7 +1,7 @@ + # $Id: Makefile.am,v 1.9 2001/12/22 03:16:20 robs Exp $ + + INCLUDEDIR = ../include +-CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include ++AM_CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include + + INCLUDE_FILES = $(INCLUDEDIR)/fastcgi.h \ + $(INCLUDEDIR)/fcgiapp.h \ diff --git a/package/libfcgi/libfcgi.mk b/package/libfcgi/libfcgi.mk new file mode 100644 index 0000000000..ced850c153 --- /dev/null +++ b/package/libfcgi/libfcgi.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libfcgi +# +################################################################################ + +LIBFCGI_VERSION = 2.4.0 +LIBFCGI_SOURCE = fcgi-$(LIBFCGI_VERSION).tar.gz +LIBFCGI_SITE = http://www.fastcgi.com/dist +LIBFCGI_LICENSE = fcgi license +LIBFCGI_LICENSE_FILES = LICENSE.TERMS +LIBFCGI_INSTALL_STAGING = YES +LIBFCGI_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/libffi/libffi-001-Fix-installation-location-of-libffi.patch b/package/libffi/libffi-001-Fix-installation-location-of-libffi.patch new file mode 100644 index 0000000000..56e08f7363 --- /dev/null +++ b/package/libffi/libffi-001-Fix-installation-location-of-libffi.patch @@ -0,0 +1,50 @@ +From 102c02de867bfe831b5366c89d66bcf170db962e Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 7 Feb 2013 22:26:56 +0100 +Subject: [PATCH] Fix installation location of libffi + +The libffi is currently declared as toolexeclib_LTLIBRARIES. In many +cases, toolexeclib libraries will be installed in /usr/lib, so it +doesn't make any difference. + +However, with multilib toolchains, they get installed in a +subdirectory of /usr/lib/. For example, with a Sourcery CodeBench +PowerPC toolchain, if the e500mc multilib variant is used, the libffi +library gets installed in /usr/lib/te500mc/. This is due to the +following code in the configure script: + + multi_os_directory=`$CC -print-multi-os-directory` + case $multi_os_directory in + .) ;; # Avoid trailing /. + *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; + esac + +Once the library is installed in /usr/lib/te500mc/, nothing works +because this installation location is inconsistent with the +installation location declared in libffi.pc. + +So, instead of using this bizarre toolexeclib_LTLIBRARIES, simply use +the more standard lib_LTLIBRARIES, which ensures that the libffi +library is always installed in /usr/lib. + +Signed-off-by: Thomas Petazzoni +--- + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 6f669ca..b60bcc1 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -93,7 +93,7 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS) + + MAKEOVERRIDES= + +-toolexeclib_LTLIBRARIES = libffi.la ++lib_LTLIBRARIES = libffi.la + noinst_LTLIBRARIES = libffi_convenience.la + + libffi_la_SOURCES = src/prep_cif.c src/types.c \ +-- +1.7.9.5 + diff --git a/package/libffi/libffi-002-Fix-use-of-compact-eh-frames-on-MIPS.patch b/package/libffi/libffi-002-Fix-use-of-compact-eh-frames-on-MIPS.patch new file mode 100644 index 0000000000..15d1c96ea7 --- /dev/null +++ b/package/libffi/libffi-002-Fix-use-of-compact-eh-frames-on-MIPS.patch @@ -0,0 +1,27 @@ +Newer MIPS toolchains use a different (compact) eh_frame format. +libffi don't like them, so we have to switch to the older format. + +This patch add -mno-compact-eh to CFLAGS when compiling for +Mips and compiler support it. + +Signed-off-by: Jérôme Pouiller + +--- a/configure.ac 2013-08-08 14:53:11.884267155 +0200 ++++ b/configure.ac 2013-08-08 14:54:14.437493244 +0200 +@@ -430,6 +430,16 @@ + AM_CONDITIONAL(FFI_EXEC_TRAMPOLINE_TABLE, test x$FFI_EXEC_TRAMPOLINE_TABLE = x1) + AC_SUBST(FFI_EXEC_TRAMPOLINE_TABLE) + ++if test x$TARGET = xMIPS; then ++ save_CFLAGS="$CFLAGS" ++ CFLAGS=-mno-compact-eh ++ AC_MSG_CHECKING([whether the C compiler needs -mno-compact-eh]) ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], ++ [AC_MSG_RESULT([yes])]; [save_CFLAGS="$save_CFLAGS -mno-compact-eh"], ++ [AC_MSG_RESULT([no])]) ++ CFLAGS="$save_CFLAGS" ++fi ++ + if test x$TARGET = xX86_64; then + AC_CACHE_CHECK([assembler supports unwind section type], + libffi_cv_as_x86_64_unwind_section_type, [ diff --git a/package/libffi/libffi.mk b/package/libffi/libffi.mk index 0c5184df96..74635473bc 100644 --- a/package/libffi/libffi.mk +++ b/package/libffi/libffi.mk @@ -1,33 +1,27 @@ -############################################################# +################################################################################ # # libffi # -############################################################# - -LIBFFI_VERSION = 3.0.9 -LIBFFI_SITE = ftp://sources.redhat.com/pub/libffi/ +################################################################################ +LIBFFI_VERSION = 3.0.13 +LIBFFI_SITE = ftp://sourceware.org/pub/libffi/ +LIBFFI_LICENSE = MIT +LIBFFI_LICENSE_FILES = LICENSE LIBFFI_INSTALL_STAGING = YES +LIBFFI_AUTORECONF = YES # Move the headers to the usual location, and adjust the .pc file -# accordingly +# accordingly. define LIBFFI_MOVE_STAGING_HEADERS - mv $(STAGING_DIR)/usr/lib/libffi-*/include/*.h $(STAGING_DIR)/usr/include/ - sed -i '/^includedir.*/d' $(STAGING_DIR)/usr/lib/pkgconfig/libffi.pc + mv $(STAGING_DIR)/usr/lib/libffi-$(LIBFFI_VERSION)/include/*.h $(STAGING_DIR)/usr/include/ + $(SED) '/^includedir.*/d' -e '/^Cflags:.*/d' \ + $(STAGING_DIR)/usr/lib/pkgconfig/libffi.pc rm -rf $(TARGET_DIR)/usr/lib/libffi-* endef LIBFFI_POST_INSTALL_STAGING_HOOKS += LIBFFI_MOVE_STAGING_HEADERS -# Similar for target headers -define LIBFFI_MOVE_TARGET_HEADERS - install -d $(TARGET_DIR)/usr/include/ - mv $(TARGET_DIR)/usr/lib/libffi-*/include/*.h $(TARGET_DIR)/usr/include/ - sed -i '/^includedir.*/d' $(TARGET_DIR)/usr/lib/pkgconfig/libffi.pc - rm -rf $(TARGET_DIR)/usr/lib/libffi-* -endef - -LIBFFI_POST_INSTALL_TARGET_HOOKS += LIBFFI_MOVE_TARGET_HEADERS - -$(eval $(call AUTOTARGETS,package,libffi)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/libfreefare/Config.in b/package/libfreefare/Config.in new file mode 100644 index 0000000000..2bb0c93ddf --- /dev/null +++ b/package/libfreefare/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBFREEFARE + bool "libfreefare" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_LIBNFC + help + Library for high level manipulation of MIFARE cards. + + http://nfc-tools.org/index.php?title=Libfreefare + +comment "libfreefare needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libfreefare/libfreefare.mk b/package/libfreefare/libfreefare.mk new file mode 100644 index 0000000000..8dcd6b81c9 --- /dev/null +++ b/package/libfreefare/libfreefare.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# libfreefare +# +################################################################################ + +LIBFREEFARE_VERSION = 0.3.4 +LIBFREEFARE_SITE = http://libfreefare.googlecode.com/files +LIBFREEFARE_DEPENDENCIES = libnfc openssl + +$(eval $(autotools-package)) diff --git a/package/libfribidi/Config.in b/package/libfribidi/Config.in new file mode 100644 index 0000000000..74d9c5b431 --- /dev/null +++ b/package/libfribidi/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBFRIBIDI + bool "libfribidi" + help + GNU FriBidi is an implementation of the Unicode + Bidirectional Algorithm (bidi). + + http://www.fribidi.org/ diff --git a/package/libfribidi/libfribidi.mk b/package/libfribidi/libfribidi.mk new file mode 100644 index 0000000000..99005c2d8e --- /dev/null +++ b/package/libfribidi/libfribidi.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libfribidi +# +################################################################################ + +LIBFRIBIDI_VERSION = 0.19.5 +LIBFRIBIDI_SOURCE = fribidi-$(LIBFRIBIDI_VERSION).tar.bz2 +LIBFRIBIDI_SITE = http://www.fribidi.org/download/ +LIBFRIBIDI_LICENSE = LGPLv2.1+ +LIBFRIBIDI_LICENSE_FILES = COPYING +LIBFRIBIDI_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libfslcodec/Config.in b/package/libfslcodec/Config.in new file mode 100644 index 0000000000..7b31b7a71f --- /dev/null +++ b/package/libfslcodec/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBFSLCODEC + bool "libfslcodec" + depends on BR2_arm # Only relevant for i.MX + help + Binary codec libraries for the Freescale i.MX SoCs. + + This library is provided by Freescale as-is and doesn't have + an upstream. diff --git a/package/libfslcodec/libfslcodec.mk b/package/libfslcodec/libfslcodec.mk new file mode 100644 index 0000000000..c18332aad7 --- /dev/null +++ b/package/libfslcodec/libfslcodec.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# libfslcodec +# +################################################################################ + +LIBFSLCODEC_VERSION = 3.0.1 +# No official download site from freescale, just this mirror +LIBFSLCODEC_SITE = http://download.ossystems.com.br/bsp/freescale/source +LIBFSLCODEC_SOURCE = libfslcodec-$(LIBFSLCODEC_VERSION).bin +LIBFSLCODEC_LICENSE = Freescale Semiconductor Software License Agreement, BSD-3c (flac, ogg headers) +LIBFSLCODEC_LICENSE_FILES = EULA EULA.txt +# This is a legal minefield: the EULA in the bin file specifies that +# the Board Support Package includes software and hardware (sic!) +# for which a separate license is needed... +LIBFSLCODEC_REDISTRIBUTE = NO + +LIBFSLCODEC_INSTALL_STAGING = YES + +# The archive is a shell-self-extractor of a bzipped tar. It happens +# to extract in the correct directory (libfslcodec-x.y.z) +# The --force makes sure it doesn't fail if the source dir already exists. +# The --auto-accept skips the license check - not needed for us +# because we have legal-info. +# Since the EULA in the bin file differs from the one in the tar file, +# extract the one from the bin file as well. +define LIBFSLCODEC_EXTRACT_CMDS + awk 'BEGIN { start=0; } \ + /^EOEULA/ { start = 0; } \ + { if (start) print; } \ + /< $(@D)/EULA + cd $(BUILD_DIR); \ + sh $(DL_DIR)/$(LIBFSLCODEC_SOURCE) --force --auto-accept +endef + +# FIXME The Makefile installs both the arm9 and arm11 versions of the +# libraries, but we only need one of them. + +$(eval $(autotools-package)) diff --git a/package/libfslparser/Config.in b/package/libfslparser/Config.in new file mode 100644 index 0000000000..e3ab980ec9 --- /dev/null +++ b/package/libfslparser/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBFSLPARSER + bool "libfslparser" + depends on BR2_arm # Only relevant for i.MX + help + Binary parser libraries for the Freescale i.MX SoCs. + + This library is provided by Freescale as-is and doesn't have + an upstream. diff --git a/package/libfslparser/libfslparser.mk b/package/libfslparser/libfslparser.mk new file mode 100644 index 0000000000..3e27a6a6e4 --- /dev/null +++ b/package/libfslparser/libfslparser.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# libfslparser +# +################################################################################ + +LIBFSLPARSER_VERSION = 3.0.1 +# No official download site from freescale, just this mirror +LIBFSLPARSER_SITE = http://download.ossystems.com.br/bsp/freescale/source +LIBFSLPARSER_SOURCE = libfslparser-$(LIBFSLPARSER_VERSION).bin +LIBFSLPARSER_LICENSE = Freescale Semiconductor Software License Agreement +LIBFSLPARSER_LICENSE_FILES = EULA EULA.txt +# This is a legal minefield: the EULA in the bin file specifies that +# the Board Support Package includes software and hardware (sic!) +# for which a separate license is needed... +LIBFSLPARSER_REDISTRIBUTE = NO + +LIBFSLPARSER_INSTALL_STAGING = YES + +# The archive is a shell-self-extractor of a bzipped tar. It happens +# to extract in the correct directory (libfslparser-x.y.z) +# The --force makes sure it doesn't fail if the source dir already exists. +# The --auto-accept skips the license check - not needed for us +# because we have legal-info +# Since the EULA in the bin file differs from the one in the tar file, +# extract the one from the bin file as well. +define LIBFSLPARSER_EXTRACT_CMDS + awk 'BEGIN { start=0; } \ + /^EOEULA/ { start = 0; } \ + { if (start) print; } \ + /< $(@D)/EULA + cd $(BUILD_DIR); \ + sh $(DL_DIR)/$(LIBFSLPARSER_SOURCE) --force --auto-accept +endef + +# The Makefile installs several versions of the libraries, but we only +# need one of them, depending on the platform. + +$(eval $(autotools-package)) diff --git a/package/libfslvpuwrap/Config.in b/package/libfslvpuwrap/Config.in new file mode 100644 index 0000000000..a60f8ef684 --- /dev/null +++ b/package/libfslvpuwrap/Config.in @@ -0,0 +1,14 @@ +comment "libfslvpuwrap needs an imx-specific kernel to be built" + depends on BR2_arm + depends on !BR2_LINUX_KERNEL + +config BR2_PACKAGE_LIBFSLVPUWRAP + bool "libfslvpuwrap" + depends on BR2_LINUX_KERNEL + depends on BR2_arm # Only relevant for i.MX + select BR2_PACKAGE_IMX_LIB + help + Wrapper library for the vpu library, giving it a different API. + + This library is provided by Freescale as-is and doesn't have + an upstream. diff --git a/package/libfslvpuwrap/libfslvpuwrap.mk b/package/libfslvpuwrap/libfslvpuwrap.mk new file mode 100644 index 0000000000..1bc7129197 --- /dev/null +++ b/package/libfslvpuwrap/libfslvpuwrap.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# libfslvpuwrap +# +################################################################################ + +LIBFSLVPUWRAP_VERSION = 1.0.17 +# No official download site from freescale, just this mirror +LIBFSLVPUWRAP_SITE = http://download.ossystems.com.br/bsp/freescale/source +LIBFSLVPUWRAP_LICENSE = Freescale Semiconductor Software License Agreement +LIBFSLVPUWRAP_LICENSE_FILES = EULA.txt +LIBFSLVPUWRAP_REDISTRIBUTE = NO + +LIBFSLVPUWRAP_INSTALL_STAGING = YES + +LIBFSLVPUWRAP_DEPENDENCIES += imx-lib + +$(eval $(autotools-package)) diff --git a/package/libftdi/Config.in b/package/libftdi/Config.in new file mode 100644 index 0000000000..dc815148f0 --- /dev/null +++ b/package/libftdi/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_LIBFTDI + bool "libftdi" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_LIBUSB_COMPAT + help + Userspace access to FTDI USB interface chips + + http://www.intra2net.com/en/developer/libftdi/index.php + +if BR2_PACKAGE_LIBFTDI + +config BR2_PACKAGE_LIBTFDI_CPP + depends on BR2_INSTALL_LIBSTDCPP + bool "C++ bindings" + help + C++ bindings for libftdi + +endif # BR2_PACKAGE_LIBFTDI + +comment "libftdi needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libftdi/libftdi-0.19-01_pkgconfig_libusb.patch b/package/libftdi/libftdi-0.19-01_pkgconfig_libusb.patch new file mode 100644 index 0000000000..389291de00 --- /dev/null +++ b/package/libftdi/libftdi-0.19-01_pkgconfig_libusb.patch @@ -0,0 +1,47 @@ +--- + configure.in | 35 +++++++++++------------------------ + 1 file changed, 11 insertions(+), 24 deletions(-) + +--- a/configure.in ++++ b/configure.in +@@ -8,30 +8,17 @@ + AM_PROG_LIBTOOL + AC_PROG_CXX + +-dnl check for libusb-config +-AC_CHECK_TOOL(HAVELIBUSB, libusb-config) +- +-if test ! -z "$HAVELIBUSB"; then +- LIBUSB_CFLAGS=`$HAVELIBUSB --cflags` +- LIBUSB_LIBS=`$HAVELIBUSB --libs` +- +- CFLAGS="$CFLAGS $LIBUSB_CFLAGS" +- LIBS="$LIBS $LIBUSB_LIBS" +-else +- AC_MSG_ERROR([*** libusb-config not found. You need a working libusb installation.]) +-fi +- +-dnl check for version of libusb +-AC_MSG_CHECKING([if libusb version is >= 0.1.7]) +-libusb_version_needed="1007" +-libusb_version=`$HAVELIBUSB --version | sed -e "s/libusb //" | awk 'BEGIN { FS = "."; } { printf "%d", ($''1 * 1000 + $''2) * 1000 + $''3;}'` ++dnl check for libusb ++PKG_CHECK_MODULES(LIBUSB, libusb >= 0.1.11) ++CFLAGS="$CFLAGS $LIBUSB_CFLAGS" ++LIBS="$LIBS $LIBUSB_LIBS" + +-if test $libusb_version -lt $libusb_version_needed; then +- AC_MSG_RESULT(no) +- AC_MSG_ERROR([*** libusb is too old ($libusb_version). You need a libusb installation newer or equal to 0.1.7.]) +-else +- AC_MSG_RESULT(yes) +-fi ++dnl Check for recent pkg-config which supports Requires.private ++case `$PKG_CONFIG --version` in ++0.?|0.1[0-7]) PKGCONFIG_REQUIRES="Requires"; ;; ++*) PKGCONFIG_REQUIRES="Requires.private"; ;; ++esac ++AC_SUBST(PKGCONFIG_REQUIRES) + + ENABLE_ASYNC_MODE=0 + AC_ARG_WITH(async-mode, diff --git a/package/libftdi/libftdi.mk b/package/libftdi/libftdi.mk new file mode 100644 index 0000000000..6c405bb5ad --- /dev/null +++ b/package/libftdi/libftdi.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# libftdi +# +################################################################################ + +LIBFTDI_VERSION = 0.19 +LIBFTDI_SITE = http://www.intra2net.com/en/developer/libftdi/download/ +LIBFTDI_DEPENDENCIES = libusb-compat libusb +LIBFTDI_INSTALL_STAGING = YES +LIBFTDI_CONFIG_SCRIPTS = libftdi-config +LIBFTDI_AUTORECONF = YES + +LIBFDTI_CONF_OPT = --without-examples + +# configure detect it automaticaly so we need to force it +ifeq ($(BR2_PACKAGE_LIBTFDI_CPP),y) +LIBFDTI_CONF_OPT += --enable-libftdipp +else +LIBFDTI_CONF_OPT += --disable-libftdipp +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/libfuse/Config.in b/package/libfuse/Config.in new file mode 100644 index 0000000000..5561d9d4f6 --- /dev/null +++ b/package/libfuse/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_LIBFUSE + bool "libfuse" + # Really doesn't like static, see fuse/lib/fuse.c + depends on !BR2_PREFER_STATIC_LIB + depends on BR2_LARGEFILE + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + help + FUSE (Filesystem in UserSpacE) + + http://fuse.sourceforge.net/ + +comment "libfuse needs a toolchain w/ largefile, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS || BR2_PREFER_STATIC_LIB diff --git a/package/libfuse/libfuse-fix-aarch64-build.patch b/package/libfuse/libfuse-fix-aarch64-build.patch new file mode 100644 index 0000000000..3b88687f6c --- /dev/null +++ b/package/libfuse/libfuse-fix-aarch64-build.patch @@ -0,0 +1,22 @@ +Fix build on the AArch64 platform + +Upstream-Status: Submitted + +Signed-off-by: Riku Voipio + +--- a/include/fuse_kernel.h ++++ b/include/fuse_kernel.h +@@ -88,12 +88,7 @@ + #ifndef _LINUX_FUSE_H + #define _LINUX_FUSE_H + +-#include +-#define __u64 uint64_t +-#define __s64 int64_t +-#define __u32 uint32_t +-#define __s32 int32_t +-#define __u16 uint16_t ++#include + + /* + * Version negotiation: diff --git a/package/libfuse/libfuse.mk b/package/libfuse/libfuse.mk new file mode 100644 index 0000000000..92203ef075 --- /dev/null +++ b/package/libfuse/libfuse.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# libfuse +# +################################################################################ + +LIBFUSE_VERSION = 2.9.3 +LIBFUSE_SOURCE = fuse-$(LIBFUSE_VERSION).tar.gz +LIBFUSE_SITE = http://downloads.sourceforge.net/project/fuse/fuse-2.X/$(LIBFUSE_VERSION) +LIBFUSE_LICENSE = GPLv2 LGPLv2.1 +LIBFUSE_LICENSE_FILES = COPYING COPYING.LIB +LIBFUSE_INSTALL_STAGING = YES +LIBFUSE_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv) +LIBFUSE_CONF_OPT = \ + --disable-example \ + --enable-lib \ + --enable-util + +define LIBFUSE_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/bin/fusermount $(TARGET_DIR)/usr/bin/ + cp -dpf $(STAGING_DIR)/usr/lib/libfuse.so* $(TARGET_DIR)/usr/lib/ +endef + +define LIBFUSE_CLEAN_CMDS + -$(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) uninstall + -$(MAKE) -C $(@D) clean + rm -f $(TARGET_DIR)/usr/bin/fusermount $(TARGET_DIR)/usr/lib/libfuse.so* +endef + +$(eval $(autotools-package)) diff --git a/package/libgail/Config.in b/package/libgail/Config.in index ba747953b4..4335bef347 100644 --- a/package/libgail/Config.in +++ b/package/libgail/Config.in @@ -1,5 +1,7 @@ config BR2_PACKAGE_LIBGAIL bool "libgail" + depends on BR2_USE_WCHAR # pango -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # pango -> libglib2 depends on BR2_PACKAGE_LIBGTK2 select BR2_PACKAGE_PANGO help @@ -16,3 +18,7 @@ config BR2_PACKAGE_LIBGAIL program. http://developer.gnome.org/projects/gap + +comment "libgail needs a toolchain w/ wchar, threads" + depends on BR2_PACKAGE_LIBGTK2 + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libgail/libgail.mk b/package/libgail/libgail.mk index 7e498f1d2b..4142c7fd5b 100644 --- a/package/libgail/libgail.mk +++ b/package/libgail/libgail.mk @@ -1,25 +1,21 @@ -############################################################# +################################################################################ # # libgail # -############################################################# +################################################################################ + LIBGAIL_VERSION_MAJOR = 1.22 LIBGAIL_VERSION_MINOR = 3 LIBGAIL_VERSION = $(LIBGAIL_VERSION_MAJOR).$(LIBGAIL_VERSION_MINOR) LIBGAIL_SOURCE = gail-$(LIBGAIL_VERSION).tar.bz2 LIBGAIL_SITE = http://ftp.gnome.org/pub/gnome/sources/gail/$(LIBGAIL_VERSION_MAJOR) - LIBGAIL_AUTORECONF = YES LIBGAIL_INSTALL_STAGING = YES -LIBGAIL_INSTALL_TARGET = YES - -LIBGAIL_CONF_OPT = --enable-shared \ - --enable-static ifneq ($(BR2_PACKAGE_XLIB_LIBX11),y) LIBGAIL_CONF_OPT += --disable-x endif -LIBGAIL_DEPENDENCIES = host-pkg-config libgtk2 pango +LIBGAIL_DEPENDENCIES = host-pkgconf libgtk2 pango -$(eval $(call AUTOTARGETS,package,libgail)) +$(eval $(autotools-package)) diff --git a/package/libgcrypt/libgcrypt.mk b/package/libgcrypt/libgcrypt.mk index a7163ea5aa..82a824fc8d 100644 --- a/package/libgcrypt/libgcrypt.mk +++ b/package/libgcrypt/libgcrypt.mk @@ -1,13 +1,17 @@ -############################################################# +################################################################################ # # libgcrypt # -############################################################# +################################################################################ -LIBGCRYPT_VERSION = 1.4.6 +LIBGCRYPT_VERSION = 1.5.3 LIBGCRYPT_SOURCE = libgcrypt-$(LIBGCRYPT_VERSION).tar.bz2 +LIBGCRYPT_LICENSE = LGPLv2.1+ +LIBGCRYPT_LICENSE_FILES = COPYING.LIB LIBGCRYPT_SITE = ftp://ftp.gnupg.org/gcrypt/libgcrypt LIBGCRYPT_INSTALL_STAGING = YES +LIBGCRYPT_DEPENDENCIES = libgpg-error +LIBGCRYPT_CONFIG_SCRIPTS = libgcrypt-config LIBGCRYPT_CONF_ENV = \ ac_cv_sys_symbol_underscore=no @@ -15,6 +19,16 @@ LIBGCRYPT_CONF_OPT = \ --disable-optimization \ --with-gpg-error-prefix=$(STAGING_DIR)/usr -LIBGCRYPT_DEPENDENCIES = libgpg-error +# Code doesn't build in thumb mode +ifeq ($(BR2_arm),y) + LIBGCRYPT_CONF_ENV += CFLAGS="$(patsubst -mthumb,,$(TARGET_CFLAGS))" +endif + +# Tests use fork() +define LIBGCRYPT_DISABLE_TESTS + $(SED) 's/ tests//' $(@D)/Makefile.in +endef + +LIBGCRYPT_POST_PATCH_HOOKS += LIBGCRYPT_DISABLE_TESTS -$(eval $(call AUTOTARGETS,package,libgcrypt)) +$(eval $(autotools-package)) diff --git a/package/libgeotiff/Config.in b/package/libgeotiff/Config.in new file mode 100644 index 0000000000..530cd450b4 --- /dev/null +++ b/package/libgeotiff/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBGEOTIFF + bool "libgeotiff" + select BR2_PACKAGE_TIFF + help + Libgeotiff is an open source library normally hosted on top of + libtiff for reading, and writing GeoTIFF information tags. + + http://geotiff.osgeo.org diff --git a/package/libgeotiff/libgeotiff.mk b/package/libgeotiff/libgeotiff.mk new file mode 100644 index 0000000000..5cfcbeac5b --- /dev/null +++ b/package/libgeotiff/libgeotiff.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# libgeotiff +# +################################################################################ + +LIBGEOTIFF_VERSION = 1.3.0 +LIBGEOTIFF_SITE = http://download.osgeo.org/geotiff/libgeotiff +LIBGEOTIFF_DEPENDENCIES = tiff +LIBGEOTIFF_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libglade/Config.in b/package/libglade/Config.in index f7a9a1ce09..e269a07548 100644 --- a/package/libglade/Config.in +++ b/package/libglade/Config.in @@ -2,6 +2,8 @@ config BR2_PACKAGE_LIBGLADE bool "libglade" depends on BR2_PACKAGE_LIBGTK2 depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 select BR2_PACKAGE_LIBGLIB2 select BR2_PACKAGE_ATK select BR2_PACKAGE_LIBXML2 @@ -12,5 +14,7 @@ config BR2_PACKAGE_LIBGLADE http://ftp.gnome.org/pub/GNOME/sources/libglade/ -comment "libglade requires a toolchain with WCHAR support" - depends on BR2_PACKAGE_LIBGTK2 && !BR2_USE_WCHAR +comment "libglade needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_LIBGTK2 + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libglade/libglade.mk b/package/libglade/libglade.mk index 67e621b346..343ecc4d46 100644 --- a/package/libglade/libglade.mk +++ b/package/libglade/libglade.mk @@ -1,13 +1,14 @@ -############################################################# +################################################################################ # # libglade # -############################################################# -LIBGLADE_VERSION = 2.6.3 +################################################################################ + +LIBGLADE_VERSION = 2.6.4 LIBGLADE_SOURCE = libglade-$(LIBGLADE_VERSION).tar.bz2 LIBGLADE_SITE = http://ftp.gnome.org/pub/GNOME/sources/libglade/2.6/ LIBGLADE_INSTALL_STAGING = YES -LIBGLADE_DEPENDENCIES = host-pkg-config libglib2 libgtk2 atk libxml2 +LIBGLADE_DEPENDENCIES = host-pkgconf libglib2 libgtk2 atk libxml2 define LIBGLADE_INSTALL_FIX rm -rf $(TARGET_DIR)/usr/share/xml/libglade \ @@ -16,4 +17,4 @@ endef LIBGLADE_POST_INSTALL_TARGET_HOOKS += LIBGLADE_INSTALL_FIX -$(eval $(call AUTOTARGETS,package,libglade)) +$(eval $(autotools-package)) diff --git a/package/libglib2/Config.in b/package/libglib2/Config.in index 3d42430735..7cbfea5dce 100644 --- a/package/libglib2/Config.in +++ b/package/libglib2/Config.in @@ -1,14 +1,18 @@ config BR2_PACKAGE_LIBGLIB2 bool "libglib2" select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT - select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + select BR2_PACKAGE_LIBFFI + select BR2_PACKAGE_PCRE_UCP if BR2_PACKAGE_PCRE select BR2_PACKAGE_ZLIB depends on BR2_USE_WCHAR # gettext + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() help Low-level core library that forms the basis of GTK+ and GNOME. http://www.gtk.org/ -comment "libglib2 requires a toolchain with WCHAR support" - depends on !BR2_USE_WCHAR +comment "libglib2 needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libglib2/libglib2-0001-optional-ipv6.patch b/package/libglib2/libglib2-0001-optional-ipv6.patch new file mode 100644 index 0000000000..cbab1f1df8 --- /dev/null +++ b/package/libglib2/libglib2-0001-optional-ipv6.patch @@ -0,0 +1,195 @@ +[PATCH]: fix build on uClibc without IPv6 support + +Updated to glib 2.36 by Thomas Petazzoni. + +Signed-off-by: Peter Korsgaard +Signed-off-by: Thomas Petazzoni +--- + gio/ginetaddress.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +Index: b/gio/ginetaddress.c +=================================================================== +--- a/gio/ginetaddress.c ++++ b/gio/ginetaddress.c +@@ -21,6 +21,7 @@ + * Samuel Cormier-Iijima + */ + ++#include + #include + + #include +@@ -423,7 +424,11 @@ + return NULL; + } + ++#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_IPV6__) ++#define G_INET_ADDRESS_FAMILY_IS_VALID(family) ((family) == AF_INET) ++#else + #define G_INET_ADDRESS_FAMILY_IS_VALID(family) ((family) == AF_INET || (family) == AF_INET6) ++#endif + + /** + * g_inet_address_new_from_bytes: +@@ -472,8 +477,10 @@ + + return g_inet_address_new_from_bytes (addr, family); + } ++#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_IPV6__)) + else + return g_inet_address_new_from_bytes (in6addr_loopback.s6_addr, family); ++#endif + } + + /** +@@ -499,8 +506,10 @@ + + return g_inet_address_new_from_bytes (addr, family); + } ++#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_IPV6__)) + else + return g_inet_address_new_from_bytes (in6addr_any.s6_addr, family); ++#endif + } + + +Index: b/gio/gsocket.c +=================================================================== +--- a/gio/gsocket.c ++++ b/gio/gsocket.c +@@ -425,7 +425,9 @@ + switch (family) + { + case G_SOCKET_FAMILY_IPV4: ++#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_IPV6__)) + case G_SOCKET_FAMILY_IPV6: ++#endif + socket->priv->family = address.ss_family; + switch (socket->priv->type) + { +@@ -1321,11 +1323,13 @@ + g_socket_get_option (socket, IPPROTO_IP, IP_TTL, + &value, &error); + } ++#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_IPV6__)) + else if (socket->priv->family == G_SOCKET_FAMILY_IPV6) + { + g_socket_get_option (socket, IPPROTO_IPV6, IPV6_UNICAST_HOPS, + &value, &error); + } ++#endif + else + g_return_val_if_reached (0); + +@@ -1362,6 +1366,7 @@ + g_socket_set_option (socket, IPPROTO_IP, IP_TTL, + ttl, &error); + } ++#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_IPV6__)) + else if (socket->priv->family == G_SOCKET_FAMILY_IPV6) + { + g_socket_set_option (socket, IPPROTO_IP, IP_TTL, +@@ -1369,6 +1374,7 @@ + g_socket_set_option (socket, IPPROTO_IPV6, IPV6_UNICAST_HOPS, + ttl, &error); + } ++#endif + else + g_return_if_reached (); + +@@ -1470,11 +1476,13 @@ + g_socket_get_option (socket, IPPROTO_IP, IP_MULTICAST_LOOP, + &value, &error); + } ++#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_IPV6__)) + else if (socket->priv->family == G_SOCKET_FAMILY_IPV6) + { + g_socket_get_option (socket, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, + &value, &error); + } ++#endif + else + g_return_val_if_reached (FALSE); + +@@ -1515,6 +1523,7 @@ + g_socket_set_option (socket, IPPROTO_IP, IP_MULTICAST_LOOP, + loopback, &error); + } ++#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_IPV6__)) + else if (socket->priv->family == G_SOCKET_FAMILY_IPV6) + { + g_socket_set_option (socket, IPPROTO_IP, IP_MULTICAST_LOOP, +@@ -1522,6 +1531,7 @@ + g_socket_set_option (socket, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, + loopback, &error); + } ++#endif + else + g_return_if_reached (); + +@@ -1559,11 +1569,13 @@ + g_socket_get_option (socket, IPPROTO_IP, IP_MULTICAST_TTL, + &value, &error); + } ++#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_IPV6__)) + else if (socket->priv->family == G_SOCKET_FAMILY_IPV6) + { + g_socket_get_option (socket, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, + &value, &error); + } ++#endif + else + g_return_val_if_reached (FALSE); + +@@ -1601,6 +1613,7 @@ + g_socket_set_option (socket, IPPROTO_IP, IP_MULTICAST_TTL, + ttl, &error); + } ++#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_IPV6__)) + else if (socket->priv->family == G_SOCKET_FAMILY_IPV6) + { + g_socket_set_option (socket, IPPROTO_IP, IP_MULTICAST_TTL, +@@ -1608,6 +1621,7 @@ + g_socket_set_option (socket, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, + ttl, &error); + } ++#endif + else + g_return_if_reached (); + +@@ -1965,6 +1979,7 @@ + result = setsockopt (socket->priv->fd, IPPROTO_IP, optname, + &mc_req, sizeof (mc_req)); + } ++#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_IPV6__)) + else if (g_inet_address_get_family (group) == G_SOCKET_FAMILY_IPV6) + { + struct ipv6_mreq mc_req_ipv6; +@@ -1982,6 +1997,7 @@ + result = setsockopt (socket->priv->fd, IPPROTO_IPV6, optname, + &mc_req_ipv6, sizeof (mc_req_ipv6)); + } ++#endif + else + g_return_val_if_reached (FALSE); + +@@ -2089,8 +2105,8 @@ + case G_SOCKET_FAMILY_IPV4: + return TRUE; + +- case G_SOCKET_FAMILY_IPV6: + #if defined (IPPROTO_IPV6) && defined (IPV6_V6ONLY) ++ case G_SOCKET_FAMILY_IPV6: + { + gint v6_only; + +@@ -2101,8 +2117,6 @@ + + return !v6_only; + } +-#else +- return FALSE; + #endif + + default: diff --git a/package/libglib2/libglib2-fix-compilation-with-no-builtin-atomic.patch b/package/libglib2/libglib2-fix-compilation-with-no-builtin-atomic.patch deleted file mode 100644 index 39c0510781..0000000000 --- a/package/libglib2/libglib2-fix-compilation-with-no-builtin-atomic.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 58096320ea0888c4fbbff318839017a4d2e82703 Mon Sep 17 00:00:00 2001 -From: Lionel Landwerlin -Date: Sat, 6 Nov 2010 14:56:15 +0100 -Subject: [PATCH] glib: fix compilation with no builtin atomic operations compilers - -Signed-off-by: Lionel Landwerlin ---- - glib/gatomic.c | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/glib/gatomic.c b/glib/gatomic.c -index 845c866..01468ce 100644 ---- a/glib/gatomic.c -+++ b/glib/gatomic.c -@@ -881,6 +881,7 @@ g_atomic_pointer_compare_and_exchange (volatile gpointer G_GNUC_MAY_ALIAS *atomi - #endif /* DEFINE_WITH_WIN32_INTERLOCKED */ - - #ifdef DEFINE_WITH_MUTEXES -+# include "gthread.h" - /* We have to use the slow, but safe locking method */ - static GMutex *g_atomic_mutex; - --- -1.7.2.3 - diff --git a/package/libglib2/libglib2-mkenums-nowarn.patch b/package/libglib2/libglib2-mkenums-nowarn.patch deleted file mode 100644 index d92183e7a2..0000000000 --- a/package/libglib2/libglib2-mkenums-nowarn.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- - gobject/glib-mkenums.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: glib-2.26.0/gobject/glib-mkenums.in -=================================================================== ---- glib-2.26.0.orig/gobject/glib-mkenums.in -+++ glib-2.26.0/gobject/glib-mkenums.in -@@ -1,4 +1,4 @@ --#!@PERL_PATH@ -w -+#!@PERL_PATH@ - - use File::Basename; - use Safe; diff --git a/package/libglib2/libglib2-optional-ipv6.patch b/package/libglib2/libglib2-optional-ipv6.patch deleted file mode 100644 index 8e7b418a04..0000000000 --- a/package/libglib2/libglib2-optional-ipv6.patch +++ /dev/null @@ -1,53 +0,0 @@ -[PATCH]: fix build on uClibc without IPv6 support - -Signed-off-by: Peter Korsgaard ---- - gio/ginetaddress.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -Index: glib-2.26.0/gio/ginetaddress.c -=================================================================== ---- glib-2.26.0.orig/gio/ginetaddress.c -+++ glib-2.26.0/gio/ginetaddress.c -@@ -21,6 +21,7 @@ - * Samuel Cormier-Iijima - */ - -+#include - #include - - #include -@@ -434,7 +435,11 @@ - return NULL; - } - -+#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_IPV6__) -+#define G_INET_ADDRESS_FAMILY_IS_VALID(family) ((family) == AF_INET) -+#else - #define G_INET_ADDRESS_FAMILY_IS_VALID(family) ((family) == AF_INET || (family) == AF_INET6) -+#endif - - /** - * g_inet_address_new_from_bytes: -@@ -483,8 +488,10 @@ - - return g_inet_address_new_from_bytes (addr, family); - } -+#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_IPV6__)) - else - return g_inet_address_new_from_bytes (in6addr_loopback.s6_addr, family); -+#endif - } - - /** -@@ -510,8 +517,10 @@ - - return g_inet_address_new_from_bytes (addr, family); - } -+#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_IPV6__)) - else - return g_inet_address_new_from_bytes (in6addr_any.s6_addr, family); -+#endif - } - - diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk index 57facfc4df..f770d3a9c5 100644 --- a/package/libglib2/libglib2.mk +++ b/package/libglib2/libglib2.mk @@ -1,19 +1,22 @@ -############################################################# +################################################################################ # # libglib2 # -############################################################# -LIBGLIB2_VERSION_MAJOR = 2.26 -LIBGLIB2_VERSION_MINOR = 1 +################################################################################ + +LIBGLIB2_VERSION_MAJOR = 2.36 +LIBGLIB2_VERSION_MINOR = 3 LIBGLIB2_VERSION = $(LIBGLIB2_VERSION_MAJOR).$(LIBGLIB2_VERSION_MINOR) -LIBGLIB2_SOURCE = glib-$(LIBGLIB2_VERSION).tar.bz2 +LIBGLIB2_SOURCE = glib-$(LIBGLIB2_VERSION).tar.xz LIBGLIB2_SITE = http://ftp.gnome.org/pub/gnome/sources/glib/$(LIBGLIB2_VERSION_MAJOR) +LIBGLIB2_LICENSE = LGPLv2+ +LIBGLIB2_LICENSE_FILES = COPYING +LIBGLIB2_AUTORECONF = YES LIBGLIB2_INSTALL_STAGING = YES -LIBGLIB2_INSTALL_TARGET = YES LIBGLIB2_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) LDFLAGS=-L$(STAGING_DIR)/usr/lib install -LIBGLIB2_CONF_ENV = \ +LIBGLIB2_CONF_ENV = \ ac_cv_func_posix_getpwuid_r=yes glib_cv_stack_grows=no \ glib_cv_uscore=no ac_cv_func_strtod=yes \ ac_fsusage_space=yes fu_cv_sys_stat_statfs2_bsize=yes \ @@ -41,29 +44,55 @@ LIBGLIB2_CONF_ENV = \ ac_cv_func_working_mktime=yes jm_cv_func_working_re_compile_pattern=yes \ ac_use_included_regex=no gl_cv_c_restrict=no \ ac_cv_path_GLIB_GENMARSHAL=$(HOST_DIR)/usr/bin/glib-genmarshal ac_cv_prog_F77=no \ - ac_cv_func_posix_getgrgid_r=no \ + ac_cv_func_posix_getgrgid_r=no glib_cv_long_long_format=ll \ + ac_cv_func_printf_unix98=yes ac_cv_func_vsnprintf_c99=yes \ + ac_cv_func_newlocale=no ac_cv_func_uselocale=no \ + ac_cv_func_strtod_l=no ac_cv_func_strtoll_l=no ac_cv_func_strtoull_l=no \ gt_cv_c_wchar_t=$(if $(BR2_USE_WCHAR),yes,no) -LIBGLIB2_CONF_OPT = --enable-shared \ - --enable-static +# old uClibc versions don't provide qsort_r +ifeq ($(BR2_UCLIBC_VERSION_0_9_31)$(BR2_UCLIBC_VERSION_0_9_32)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)$(BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEEL_V2)$(BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEBE_V2),y) +LIBGLIB2_CONF_ENV += glib_cv_have_qsort_r=no +else +LIBGLIB2_CONF_ENV += glib_cv_have_qsort_r=yes +endif + +# old toolchains don't have working inotify support +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEEL_V2)$(BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEBE_V2),y) +LIBGLIB2_CONF_ENV += ac_cv_header_sys_inotify_h=no +endif HOST_LIBGLIB2_CONF_OPT = \ - --enable-shared \ - --disable-static \ --disable-gtk-doc \ --enable-debug=no \ + --disable-dtrace \ + --disable-systemtap \ + --disable-gcov \ + --disable-modular-tests -LIBGLIB2_DEPENDENCIES = host-pkg-config host-libglib2 zlib $(if $(BR2_NEEDS_GETTEXT),gettext libintl) +LIBGLIB2_CONF_OPT += --disable-modular-tests +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),) + LIBGLIB2_CONF_OPT += --with-threads=none --disable-threads +endif -HOST_LIBGLIB2_DEPENDENCIES = host-pkg-config host-zlib +LIBGLIB2_DEPENDENCIES = host-pkgconf host-libglib2 libffi zlib $(if $(BR2_NEEDS_GETTEXT),gettext) host-gettext + +HOST_LIBGLIB2_DEPENDENCIES = host-pkgconf host-libffi host-zlib host-gettext ifneq ($(BR2_ENABLE_LOCALE),y) -LIBGLIB2_DEPENDENCIES+=libiconv +LIBGLIB2_DEPENDENCIES += libiconv endif ifeq ($(BR2_PACKAGE_LIBICONV),y) LIBGLIB2_CONF_OPT += --with-libiconv=gnu -LIBGLIB2_DEPENDENCIES+=libiconv +LIBGLIB2_DEPENDENCIES += libiconv +endif + +ifeq ($(BR2_PACKAGE_PCRE),y) +LIBGLIB2_CONF_OPT += --with-pcre=system +LIBGLIB2_DEPENDENCIES += pcre +else +LIBGLIB2_CONF_OPT += --with-pcre=internal endif define LIBGLIB2_REMOVE_DEV_FILES @@ -73,9 +102,7 @@ define LIBGLIB2_REMOVE_DEV_FILES rm -f $(addprefix $(TARGET_DIR)/usr/bin/,glib-genmarshal glib-gettextize glib-mkenums gobject-query gtester gtester-report) endef -ifneq ($(BR2_HAVE_DEVFILES),y) LIBGLIB2_POST_INSTALL_TARGET_HOOKS += LIBGLIB2_REMOVE_DEV_FILES -endif define LIBGLIB2_REMOVE_GDB_FILES rm -rf $(TARGET_DIR)/usr/share/glib-2.0/gdb @@ -86,7 +113,7 @@ ifneq ($(BR2_PACKAGE_GDB),y) LIBGLIB2_POST_INSTALL_TARGET_HOOKS += LIBGLIB2_REMOVE_GDB_FILES endif -$(eval $(call AUTOTARGETS,package,libglib2)) -$(eval $(call AUTOTARGETS,package,libglib2,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) -LIBGLIB2_HOST_BINARY:=$(HOST_DIR)/usr/bin/glib-genmarshal +LIBGLIB2_HOST_BINARY = $(HOST_DIR)/usr/bin/glib-genmarshal diff --git a/package/libgpg-error/libgpg-error.mk b/package/libgpg-error/libgpg-error.mk index ab62d7325d..9f5f6c21a1 100644 --- a/package/libgpg-error/libgpg-error.mk +++ b/package/libgpg-error/libgpg-error.mk @@ -1,12 +1,14 @@ -############################################################# +################################################################################ # # libgpg-error # -############################################################# -LIBGPG_ERROR_VERSION:=1.8 -LIBGPG_ERROR_SOURCE:=libgpg-error-$(LIBGPG_ERROR_VERSION).tar.bz2 -LIBGPG_ERROR_SITE:=ftp://gd.tuwien.ac.at/privacy/gnupg/libgpg-error +################################################################################ +LIBGPG_ERROR_VERSION = 1.12 +LIBGPG_ERROR_SITE = ftp://ftp.gnupg.org/gcrypt/libgpg-error +LIBGPG_ERROR_LICENSE = LGPLv2.1+ +LIBGPG_ERROR_LICENSE_FILES = COPYING.LIB LIBGPG_ERROR_INSTALL_STAGING = YES +LIBGPG_ERROR_CONFIG_SCRIPTS = gpg-error-config -$(eval $(call AUTOTARGETS,package,libgpg-error)) +$(eval $(autotools-package)) diff --git a/package/libgpgme/Config.in b/package/libgpgme/Config.in new file mode 100644 index 0000000000..a303bfae8f --- /dev/null +++ b/package/libgpgme/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBGPGME + bool "libgpgme" + depends on BR2_USE_MMU # libassuan + #gnupg is not needed to build, but at runtime. + select BR2_PACKAGE_GNUPG + select BR2_PACKAGE_LIBGPG_ERROR + select BR2_PACKAGE_LIBASSUAN + help + GnuPG Made Easy (GPGME) is a library designed to make access + to GnuPG easier for applications. + + http://www.gnupg.org/related_software/gpgme/ diff --git a/package/libgpgme/libgpgme.mk b/package/libgpgme/libgpgme.mk new file mode 100644 index 0000000000..9995d913d5 --- /dev/null +++ b/package/libgpgme/libgpgme.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# libgpgme +# +################################################################################ + +LIBGPGME_VERSION = 1.4.2 +LIBGPGME_SITE = ftp://ftp.gnupg.org/gcrypt/gpgme/ +LIBGPGME_SOURCE = gpgme-$(LIBGPGME_VERSION).tar.bz2 +LIBGPGME_LICENSE = LGPLv2.1+ +LIBGPGME_LICENSE_FILES = COPYING.LESSER +LIBGPGME_INSTALL_STAGING = YES +LIBGPGME_DEPENDENCIES = libassuan libgpg-error + +# libgpgme, needs to know the gpg binary path on the target. +LIBGPGME_CONF_OPT = --with-gpg=/usr/bin/gpg \ + --with-gpg-error-prefix=$(STAGING_DIR)/usr \ + --with-libassuan-prefix=$(STAGING_DIR)/usr \ + --without-gpgsm \ + --without-gpgconf \ + --without-g13 + +# Handle argp-standalone or it errors out during build +ifeq ($(BR2_PACKAGE_ARGP_STANDALONE)$(BR2_TOOLCHAIN_USES_UCLIBC),yy) +LIBGPGME_CONF_ENV += LIBS="-largp" +LIBGPGME_DEPENDENCIES += argp-standalone +endif + +$(eval $(autotools-package)) diff --git a/package/libgsasl/Config.in b/package/libgsasl/Config.in new file mode 100644 index 0000000000..5181386272 --- /dev/null +++ b/package/libgsasl/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBGSASL + bool "libgsasl" + help + Simple Authentication and Security Layer framework Library. + GNU SASL is an implementation of the Simple Authentication and + Security Layer framework and a few common SASL mechanisms. + SASL is used by network servers (e.g., IMAP, SMTP) to request + authentication from clients, and in clients to authenticate + against servers. + + http://www.gnu.org/software/gsasl diff --git a/package/libgsasl/libgsasl.mk b/package/libgsasl/libgsasl.mk new file mode 100644 index 0000000000..ea634bc325 --- /dev/null +++ b/package/libgsasl/libgsasl.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libgsasl +# +################################################################################ + +LIBGSASL_VERSION = 1.8.0 +LIBGSASL_SITE = $(BR2_GNU_MIRROR)/gsasl +LIBGSASL_LICENSE = LGPLv2.1+ (library), GPLv3+ (programs) +LIBGSASL_LICENSE_FILES = README COPYING.LIB COPYING +LIBGSASL_INSTALL_STAGING = YES +LIBGSAS_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBIDN),libidn) + +$(eval $(autotools-package)) diff --git a/package/libgtk2/Config.in b/package/libgtk2/Config.in index 38b0b47e0d..5239c25ddf 100644 --- a/package/libgtk2/Config.in +++ b/package/libgtk2/Config.in @@ -8,13 +8,32 @@ config BR2_PACKAGE_LIBGTK2 select BR2_PACKAGE_LIBGLIB2 select BR2_PACKAGE_PANGO select BR2_PACKAGE_GDK_PIXBUF - depends on BR2_PACKAGE_XORG7||BR2_PACKAGE_DIRECTFB + select BR2_PACKAGE_FONTCONFIG + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXRENDER + depends on BR2_PACKAGE_XORG7 depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 depends on BR2_INSTALL_LIBSTDCPP # pango help The GTK+ version 2 graphical user interface library http://www.gtk.org/ -comment "libgtk2 requires a toolchain with WCHAR and C++ support" - depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP +if BR2_PACKAGE_LIBGTK2 + +config BR2_PACKAGE_LIBGTK2_DEMO + bool "Install libgtk2 demo program" + help + The GTK+ source base contains a gtk-demo program. This + option allows to install this program to the target. + +endif + +comment "libgtk2 needs a toolchain w/ wchar, threads, C++" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_XORG7 + depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libgtk2/host-libgtk2-2.20.1-reduce-dependencies.patch b/package/libgtk2/host-libgtk2-2.20.1-reduce-dependencies.patch deleted file mode 100644 index 49acf753ea..0000000000 --- a/package/libgtk2/host-libgtk2-2.20.1-reduce-dependencies.patch +++ /dev/null @@ -1,168 +0,0 @@ -Hack the configure.in file to add a "none" gdktarget which removes -dependencies on graphic backends such as X.org or DirectFB. Gtk does -not fully build in this mode, but it builds sufficiently to build the -host tools that are needed to build the target Gtk. - -Signed-off-by: Thomas Petazzoni ---- - configure.in | 101 ++--------------------------------------------------------- - 1 file changed, 4 insertions(+), 97 deletions(-) - -Index: gtk+-2.22.0/configure.in -=================================================================== ---- gtk+-2.22.0.orig/configure.in -+++ gtk+-2.22.0/configure.in -@@ -258,12 +258,12 @@ - gdktarget=x11 - fi - --AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/win32/quartz/directfb]] select non-default GDK target], -+AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/win32/quartz/directfb/none]] select non-default GDK target], - gdktarget=$with_gdktarget) - - AC_SUBST(gdktarget) - case $gdktarget in -- x11|win32|quartz|directfb) ;; -+ x11|win32|quartz|directfb|none) ;; - *) AC_MSG_ERROR([Invalid target for GDK: use x11, quartz, directfb or win32.]);; - esac - -@@ -373,9 +373,6 @@ - ## annoying to construct - PKG_CHECK_MODULES(BASE_DEPENDENCIES, - [glib-2.0 >= glib_required_version dnl -- atk >= atk_required_version dnl -- pango >= pango_required_version dnl -- cairo >= cairo_required_version dnl - gdk-pixbuf-2.0 >= gdk_pixbuf_required_version]) - - ## In addition to checking that cairo is present, we also need to -@@ -388,8 +385,6 @@ - if test "x$cairo_backend" = "xx11"; then - cairo_backend=xlib - fi --PKG_CHECK_MODULES(CAIRO_BACKEND, -- [cairo-$cairo_backend >= cairo_required_version]) - - if test "$os_win32" != yes; then - # libtool option to control which symbols are exported -@@ -1270,50 +1265,6 @@ - fi - - --# Check for Pango flags -- --if test "x$gdktarget" = "xwin32"; then -- PANGO_PACKAGES="pangowin32 pangocairo" --else -- PANGO_PACKAGES="pango pangocairo" --fi -- --AC_MSG_CHECKING(Pango flags) --if $PKG_CONFIG --exists $PANGO_PACKAGES ; then -- PANGO_CFLAGS=`$PKG_CONFIG --cflags $PANGO_PACKAGES` -- PANGO_LIBS=`$PKG_CONFIG --libs $PANGO_PACKAGES` -- -- AC_MSG_RESULT($PANGO_CFLAGS $PANGO_LIBS) --else -- AC_MSG_ERROR([ --*** Pango not found. Pango built with Cairo support is required --*** to build GTK+. See http://www.pango.org for Pango information. --]) --fi -- --CFLAGS="$CFLAGS $PANGO_CFLAGS" -- --if $PKG_CONFIG --uninstalled $PANGO_PACKAGES; then -- : --else -- gtk_save_LIBS="$LIBS" -- LIBS="$PANGO_LIBS $LIBS" -- AC_TRY_LINK_FUNC(pango_context_new, :, AC_MSG_ERROR([ --*** Can't link to Pango. Pango is required to build --*** GTK+. For more information see http://www.pango.org])) -- LIBS="$gtk_save_LIBS" --fi -- --CFLAGS="$saved_cflags" --LDFLAGS="$saved_ldflags" -- --# Pull in gio-unix for GDesktopAppInfo usage, see at least gdkapplaunchcontext-x11.c --if test "x$gdktarget" = "xx11"; then -- GDK_PACKAGES="$PANGO_PACKAGES gio-unix-2.0 $X_PACKAGES gdk-pixbuf-2.0 cairo-$cairo_backend" --else -- GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 gdk-pixbuf-2.0 cairo-$cairo_backend" --fi -- - GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PACKAGES`" - GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PACKAGES` $GDK_EXTRA_CFLAGS" - # -@@ -1321,7 +1272,7 @@ - # into the pkg-config files - # - if test $enable_explicit_deps != yes ; then -- GDK_PACKAGES="$PANGO_PACKAGES gdk-pixbuf-2.0" -+ GDK_PACKAGES="gdk-pixbuf-2.0" - GDK_EXTRA_LIBS= - fi - -@@ -1331,37 +1282,7 @@ - AC_SUBST(GDK_DEP_LIBS) - AC_SUBST(GDK_DEP_CFLAGS) - -- --######################################## --# Check for Accessibility Toolkit flags --######################################## -- --ATK_PACKAGES=atk --AC_MSG_CHECKING(ATK flags) --if $PKG_CONFIG --exists $ATK_PACKAGES ; then -- ATK_CFLAGS=`$PKG_CONFIG --cflags $ATK_PACKAGES` -- ATK_LIBS=`$PKG_CONFIG --libs $ATK_PACKAGES` -- -- AC_MSG_RESULT($ATK_CFLAGS $ATK_LIBS) --else -- AC_MSG_ERROR([ --*** Accessibility Toolkit not found. Accessibility Toolkit is required --*** to build GTK+. --]) --fi -- --if $PKG_CONFIG --uninstalled $ATK_PACKAGES; then -- : --else -- gtk_save_LIBS="$LIBS" -- LIBS="$ATK_LIBS $LIBS" -- AC_TRY_LINK_FUNC(atk_object_get_type, : , AC_MSG_ERROR([ -- *** Cannot link to Accessibility Toolkit. Accessibility Toolkit is required -- *** to build GTK+])) -- LIBS="$gtk_save_LIBS" --fi -- --GTK_PACKAGES="atk cairo gdk-pixbuf-2.0 gio-2.0" -+GTK_PACKAGES="gdk-pixbuf-2.0" - if test "x$gdktarget" = "xx11"; then - GTK_PACKAGES="$GTK_PACKAGES pangoft2" - fi -@@ -1517,20 +1438,6 @@ - gtk_save_cppflags="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS $GDK_DEP_CFLAGS" - --AC_CHECK_HEADER(cairo-pdf.h,,AC_MSG_ERROR([ --*** Can't find cairo-pdf.h. You must build Cairo with the pdf --*** backend enabled.])) -- --if test "$os_win32" != "yes"; then -- AC_CHECK_HEADER(cairo-ps.h,,AC_MSG_ERROR([ --*** Can't find cairo-ps.h. You must build Cairo with the --*** postscript backend enabled.])) -- -- AC_CHECK_HEADER(cairo-svg.h,,AC_MSG_ERROR([ --*** Can't find cairo-svg.h. You must build Cairo with the --*** svg backend enabled.])) --fi -- - CPPFLAGS="$gtk_save_cppflags" - - diff --git a/package/libgtk2/libgtk2-reduce-dependencies.patch b/package/libgtk2/libgtk2-reduce-dependencies.patch new file mode 100644 index 0000000000..3250cae4b0 --- /dev/null +++ b/package/libgtk2/libgtk2-reduce-dependencies.patch @@ -0,0 +1,117 @@ +Hack the configure.in file to add a "none" gdktarget which removes +dependencies on graphic backends such as X.org or DirectFB. Gtk does +not fully build in this mode, but it builds sufficiently to build the +host tools that are needed to build the target Gtk. + +Changes: + Ported to 2.24.18 + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Spenser Gilliland +--- +Index: libgtk2-2.24.18/configure.ac +=================================================================== +--- libgtk2-2.24.18.orig/configure.ac 2013-05-13 07:02:44.000000000 -0500 ++++ libgtk2-2.24.18/configure.ac 2013-05-27 02:12:09.947030335 -0500 +@@ -258,12 +258,12 @@ + gdktarget=x11 + fi + +-AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/win32/quartz/directfb]] select non-default GDK target], ++AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/win32/quartz/directfb/none]] select non-default GDK target], + gdktarget=$with_gdktarget) + + AC_SUBST(gdktarget) + case $gdktarget in +- x11|win32|quartz|directfb) ;; ++ x11|win32|quartz|directfb|none) ;; + *) AC_MSG_ERROR([Invalid target for GDK: use x11, quartz, directfb or win32.]);; + esac + +@@ -372,11 +373,15 @@ + ## annoying to construct + PKG_CHECK_MODULES(BASE_DEPENDENCIES, + [glib-2.0 >= glib_required_version dnl +- atk >= atk_required_version dnl +- pango >= pango_required_version dnl +- cairo >= cairo_required_version dnl + gdk-pixbuf-2.0 >= gdk_pixbuf_required_version]) + ++if test "x$gdktarget" != "xnone"; then ++ PKG_CHECK_MODULES(BASE_DEPENDENCIES, ++ [atk >= atk_required_version dnl ++ pango >= pango_required_version dnl ++ cairo >= cairo_required_version]) ++fi ++ + ## In addition to checking that cairo is present, we also need to + ## check that the correct cairo backend is there. E.g. if the GDK + ## target is win32 we need the cairo-win32 backend and so on. +@@ -387,8 +392,11 @@ + if test "x$cairo_backend" = "xx11"; then + cairo_backend=xlib + fi +-PKG_CHECK_MODULES(CAIRO_BACKEND, +- [cairo-$cairo_backend >= cairo_required_version]) ++ ++if test "x$gdktarget" != "xnone"; then ++ PKG_CHECK_MODULES(CAIRO_BACKEND, ++ [cairo-$cairo_backend >= cairo_required_version]) ++fi + + PKG_CHECK_MODULES(GMODULE, [gmodule-2.0]) + +@@ -1279,6 +1287,7 @@ + AM_CONDITIONAL(USE_DIRECTFB, false) + fi + ++if test "x$gdktarget" != "xnone"; then + + # Check for Pango flags + +@@ -1324,6 +1333,8 @@ + GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 gdk-pixbuf-2.0 cairo-$cairo_backend" + fi + ++fi # gdktarget != none ++ + GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PACKAGES` $MATH_LIB" + GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PACKAGES` $GDK_EXTRA_CFLAGS" + # +@@ -1341,6 +1352,7 @@ + AC_SUBST(GDK_DEP_LIBS) + AC_SUBST(GDK_DEP_CFLAGS) + ++if test "x$gdktarget" != "xnone"; then + + ######################################## + # Check for Accessibility Toolkit flags +@@ -1372,6 +1384,10 @@ + fi + + GTK_PACKAGES="atk cairo gdk-pixbuf-2.0 gio-2.0" ++else # gdktarget != none ++GTK_PACKAGES="gdk-pixbuf-2.0" ++fi # gdktarget != none ++ + if test "x$gdktarget" = "xx11"; then + GTK_PACKAGES="$GTK_PACKAGES pangoft2" + fi +@@ -1533,6 +1549,8 @@ + gtk_save_cppflags="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS $GDK_DEP_CFLAGS" + ++if test "x$gdktarget" != "xnone"; then ++ + AC_CHECK_HEADER(cairo-pdf.h,,AC_MSG_ERROR([ + *** Can't find cairo-pdf.h. You must build Cairo with the pdf + *** backend enabled.])) +@@ -1547,6 +1565,8 @@ + *** svg backend enabled.])) + fi + ++fi # gdktarget != none ++ + CPPFLAGS="$gtk_save_cppflags" + + diff --git a/package/libgtk2/libgtk2.mk b/package/libgtk2/libgtk2.mk index 6e14d275ac..50d0510429 100644 --- a/package/libgtk2/libgtk2.mk +++ b/package/libgtk2/libgtk2.mk @@ -1,18 +1,20 @@ -############################################################# +################################################################################ # -# libgtk2.0 +# libgtk2 # -############################################################# -LIBGTK2_VERSION_MAJOR:=2.22 -LIBGTK2_VERSION_MINOR:=0 +################################################################################ + +LIBGTK2_VERSION_MAJOR = 2.24 +LIBGTK2_VERSION_MINOR = 18 LIBGTK2_VERSION = $(LIBGTK2_VERSION_MAJOR).$(LIBGTK2_VERSION_MINOR) -LIBGTK2_SOURCE = gtk+-$(LIBGTK2_VERSION).tar.bz2 -LIBGTK2_SITE = ftp://ftp.gtk.org/pub/gtk/$(LIBGTK2_VERSION_MAJOR) -LIBGTK2_AUTORECONF = NO +LIBGTK2_SOURCE = gtk+-$(LIBGTK2_VERSION).tar.xz +LIBGTK2_SITE = http://ftp.gnome.org/pub/gnome/sources/gtk+/$(LIBGTK2_VERSION_MAJOR) LIBGTK2_INSTALL_STAGING = YES LIBGTK2_INSTALL_TARGET = YES +LIBGTK2_AUTORECONF = YES + LIBGTK2_CONF_ENV = ac_cv_func_posix_getpwuid_r=yes glib_cv_stack_grows=no \ glib_cv_uscore=no \ ac_cv_func_strtod=yes \ @@ -66,28 +68,53 @@ LIBGTK2_CONF_ENV = ac_cv_func_posix_getpwuid_r=yes glib_cv_stack_grows=no \ ac_cv_prog_F77=no \ ac_cv_path_CUPS_CONFIG=no -LIBGTK2_CONF_OPT = --enable-shared \ - --enable-static \ - --disable-glibtest \ +LIBGTK2_CONF_OPT = --disable-glibtest \ --enable-explicit-deps=no \ --disable-debug -LIBGTK2_DEPENDENCIES = host-pkg-config host-libgtk2 libglib2 cairo pango atk gdk-pixbuf +LIBGTK2_DEPENDENCIES = host-pkgconf host-libgtk2 libglib2 cairo pango atk gdk-pixbuf -ifeq ($(BR2_PACKAGE_DIRECTFB),y) - LIBGTK2_CONF_OPT += --with-gdktarget=directfb - LIBGTK2_DEPENDENCIES += directfb +# Xorg dependencies +LIBGTK2_CONF_OPT += \ + --with-x \ + --x-includes=$(STAGING_DIR)/usr/include/X11 \ + --x-libraries=$(STAGING_DIR)/usr/lib \ + --with-gdktarget=x11 +LIBGTK2_DEPENDENCIES += xlib_libXcomposite fontconfig xlib_libX11 \ + xlib_libXext xlib_libXrender + +ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y) + LIBGTK2_CONF_OPT += --enable-xinerama + LIBGTK2_DEPENDENCIES += xlib_libXinerama +else + LIBGTK2_CONF_OPT += --disable-xinerama endif -ifeq ($(BR2_PACKAGE_XORG7),y) - LIBGTK2_CONF_OPT += \ - --with-x \ - --x-includes=$(STAGING_DIR)/usr/include/X11 \ - --x-libraries=$(STAGING_DIR)/usr/lib \ - --with-gdktarget=x11 - LIBGTK2_DEPENDENCIES += xlib_libXcomposite xserver_xorg-server +ifeq ($(BR2_PACKAGE_XLIB_LIBXI),y) + LIBGTK2_CONF_OPT += --with-xinput=yes + LIBGTK2_DEPENDENCIES += xlib_libXi else - LIBGTK2_CONF_OPT += --without-x + LIBGTK2_CONF_OPT += --with-xinput=no +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y) + LIBGTK2_DEPENDENCIES += xlib_libXrandr +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y) + LIBGTK2_DEPENDENCIES += xlib_libXcursor +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXFIXES),y) + LIBGTK2_DEPENDENCIES += xlib_libXfixes +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),y) + LIBGTK2_DEPENDENCIES += xlib_libXcomposite +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXDAMAGE),y) + LIBGTK2_DEPENDENCIES += xlib_libXdamage endif ifeq ($(BR2_PACKAGE_LIBPNG),y) @@ -114,11 +141,13 @@ else LIBGTK2_CONF_OPT += --disable-cups endif +ifeq ($(BR2_PACKAGE_LIBGTK2_DEMO),) define LIBGTK2_POST_INSTALL_TWEAKS rm -rf $(TARGET_DIR)/usr/share/gtk-2.0/demo $(TARGET_DIR)/usr/bin/gtk-demo endef LIBGTK2_POST_INSTALL_TARGET_HOOKS += LIBGTK2_POST_INSTALL_TWEAKS +endif # We do not build a full version of libgtk2 for the host, because that # requires compiling Cairo, Pango, ATK and X.org for the @@ -128,7 +157,6 @@ LIBGTK2_POST_INSTALL_TARGET_HOOKS += LIBGTK2_POST_INSTALL_TWEAKS # for the target. HOST_LIBGTK2_DEPENDENCIES = host-libglib2 host-libpng host-gdk-pixbuf -HOST_LIBGTK2_AUTORECONF = YES HOST_LIBGTK2_CONF_OPT = \ --disable-static \ --disable-glibtest \ @@ -138,12 +166,6 @@ HOST_LIBGTK2_CONF_OPT = \ --disable-cups \ --disable-debug -define HOST_LIBGTK2_PATCH_REDUCE_DEPENDENCIES_HOOK - toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME) host-*.patch -endef - -HOST_LIBGTK2_POST_PATCH_HOOKS += HOST_LIBGTK2_PATCH_REDUCE_DEPENDENCIES_HOOK - define HOST_LIBGTK2_BUILD_CMDS $(HOST_MAKE_ENV) make -C $(@D)/gtk gtk-update-icon-cache endef @@ -152,5 +174,5 @@ define HOST_LIBGTK2_INSTALL_CMDS cp $(@D)/gtk/gtk-update-icon-cache $(HOST_DIR)/usr/bin endef -$(eval $(call AUTOTARGETS,package,libgtk2)) -$(eval $(call AUTOTARGETS,package,libgtk2,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/libhid/Config.in b/package/libhid/Config.in index 73ff4b7498..e6f2012860 100644 --- a/package/libhid/Config.in +++ b/package/libhid/Config.in @@ -1,8 +1,12 @@ config BR2_PACKAGE_LIBHID bool "libhid" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb select BR2_PACKAGE_LIBUSB select BR2_PACKAGE_LIBUSB_COMPAT help Userspace library for accessing USB HID devices http://libhid.alioth.debian.org + +comment "libhid needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libhid/libhid-0.2.16-fix-configure-typo.patch b/package/libhid/libhid-0.2.16-fix-configure-typo.patch deleted file mode 100644 index 870ecf24a9..0000000000 --- a/package/libhid/libhid-0.2.16-fix-configure-typo.patch +++ /dev/null @@ -1,24 +0,0 @@ -[PATCH] fix typo in configure - -Somehow a newline character has gotten inserted in the middle of the -LDFLAGS assignment, breaking the build. - -Signed-off-by: Peter Korsgaard ---- - configure | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -Index: libhid-0.2.16/configure -=================================================================== ---- libhid-0.2.16.orig/configure -+++ libhid-0.2.16/configure -@@ -23050,8 +23050,7 @@ echo "$as_me: doxygen disabled by config - CPPFLAGS=$(echo $CPPFLAGS) - CFLAGS=$(echo $OS_CFLAGS $LIBUSB_CFLAGS $CFLAGS) - CXXFLAGS=$(echo $CXXFLAGS) -- LDFLAGS=$(echo $OS_LDFLAGS $LIBUSB_LIBS -- $LDFLAGS) -+ LDFLAGS=$(echo $OS_LDFLAGS $LIBUSB_LIBS $LDFLAGS) - - - diff --git a/package/libhid/libhid-dont-fiddle-with-debug-flags.patch b/package/libhid/libhid-dont-fiddle-with-debug-flags.patch new file mode 100644 index 0000000000..139357bd46 --- /dev/null +++ b/package/libhid/libhid-dont-fiddle-with-debug-flags.patch @@ -0,0 +1,29 @@ +Don't do horrible magic with CFLAGS and CXXFLAGS + +The purpose of the lines being removed is to suppress the +-g option from the CFLAGS or CXXFLAGS, when --enable-debug +is not used. This is stupid because it is up to the user to pass these +flags or not. + +But it is not only stupid, but utterly broken: if your CFLAGS contains +a flags like -mfloat-gprs=double, then this option gets truncated to +-mfloat simply because the option contained the -g string! + +Completely ridiculous piece of code, so get rid of it. + +Signed-off-by: Thomas Petazzoni + +Index: libhid-0.2.16/m4/md_conf_debugging.m4 +=================================================================== +--- libhid-0.2.16.orig/m4/md_conf_debugging.m4 2004-11-08 18:16:25.000000000 +0100 ++++ libhid-0.2.16/m4/md_conf_debugging.m4 2012-12-12 20:24:50.000000000 +0100 +@@ -1,7 +1,7 @@ + AC_DEFUN([MD_CONF_DEBUGGING], + [ +- CFLAGS=$(echo $CFLAGS | sed -e 's,-g[[^[:space:]]]*,,g') +- CXXFLAGS=$(echo $CXXFLAGS | sed -e 's,-g[[^[:space:]]]*,,g') ++# CFLAGS=$(echo $CFLAGS | sed -e 's,-g[[^[:space:]]]*,,g') ++# CXXFLAGS=$(echo $CXXFLAGS | sed -e 's,-g[[^[:space:]]]*,,g') + MD_CHECK_ARG_ENABLE(debug, + [ + DEBUG_FLAG=-g diff --git a/package/libhid/libhid-no-newline-in-ldflags.patch b/package/libhid/libhid-no-newline-in-ldflags.patch new file mode 100644 index 0000000000..df845ee1f5 --- /dev/null +++ b/package/libhid/libhid-no-newline-in-ldflags.patch @@ -0,0 +1,22 @@ +Fix improper usage of macro that introduces a wrong newline + +The MD_CONF_FLAGS() macro was used with a final newline that +introduces an invalid newline in the middle of the macro expansion +when defining LDFLAGS. + +Signed-off-by: Thomas Petazzoni + +Index: libhid-0.2.16/configure.ac +=================================================================== +--- libhid-0.2.16.orig/configure.ac 2007-04-01 22:32:10.000000000 +0200 ++++ libhid-0.2.16/configure.ac 2012-12-12 20:24:03.000000000 +0100 +@@ -102,8 +102,7 @@ + [], + [$OS_CFLAGS $LIBUSB_CFLAGS], + [], +- [$OS_LDFLAGS $LIBUSB_LIBS] +-) ++ [$OS_LDFLAGS $LIBUSB_LIBS]) + + MD_CONF_DB2MAN + diff --git a/package/libhid/libhid.mk b/package/libhid/libhid.mk index ec6e5bb625..97aab5d424 100644 --- a/package/libhid/libhid.mk +++ b/package/libhid/libhid.mk @@ -1,17 +1,21 @@ -############################################################# +################################################################################ # # libhid # -############################################################# +################################################################################ LIBHID_VERSION = 0.2.16 -LIBHID_SOURCE = libhid-$(LIBHID_VERSION).tar.gz -LIBHID_SITE = http://alioth.debian.org/frs/download.php/1958 +LIBHID_SITE = http://alioth.debian.org/frs/download.php/file/1958 LIBHID_DEPENDENCIES = libusb-compat libusb LIBHID_INSTALL_STAGING = YES +LIBHID_AUTORECONF = YES # configure runs libusb-config for cflags/ldflags. Ensure it picks up # the target version LIBHID_CONF_ENV = PATH=$(STAGING_DIR)/usr/bin:$(TARGET_PATH) -LIBHID_CONF_OPT = --disable-swig --without-doxygen --disable-package-config +LIBHID_CONF_OPT = \ + --disable-swig \ + --disable-werror \ + --without-doxygen \ + --disable-package-config -$(eval $(call AUTOTARGETS,package,libhid)) +$(eval $(autotools-package)) diff --git a/package/libical/Config.in b/package/libical/Config.in new file mode 100644 index 0000000000..9bb63c3d0b --- /dev/null +++ b/package/libical/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBICAL + bool "libical" + depends on BR2_USE_WCHAR + help + libical is an Open Source (MPL/LGPL) implementation of the IETF's + iCalendar Calendaring and Scheduling protocols. + + http://www.citadel.org/doku.php/documentation:featured_projects:libical + +comment "libical needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/libical/libical.mk b/package/libical/libical.mk new file mode 100644 index 0000000000..cdee006ebc --- /dev/null +++ b/package/libical/libical.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# libical +# +################################################################################ + +LIBICAL_VERSION = 0.48 +LIBICAL_SITE = http://downloads.sourceforge.net/project/freeassociation/libical/libical-$(LIBICAL_VERSION) +LIBICAL_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libiconv/libiconv.mk b/package/libiconv/libiconv.mk index 27977a847b..3a513b3dc1 100644 --- a/package/libiconv/libiconv.mk +++ b/package/libiconv/libiconv.mk @@ -1,14 +1,12 @@ -############################################################# +################################################################################ # # libiconv # -############################################################# -LIBICONV_VERSION = 1.12 -LIBICONV_SOURCE = libiconv-$(LIBICONV_VERSION).tar.gz +################################################################################ + +LIBICONV_VERSION = 1.14 LIBICONV_SITE = $(BR2_GNU_MIRROR)/libiconv -LIBICONV_AUTORECONF = NO LIBICONV_INSTALL_STAGING = YES -LIBICONV_INSTALL_TARGET = YES # Remove not used preloadable libiconv.so define LIBICONV_TARGET_REMOVE_PRELOADABLE_LIBS @@ -22,7 +20,15 @@ endef LIBICONV_POST_INSTALL_TARGET_HOOKS += LIBICONV_TARGET_REMOVE_PRELOADABLE_LIBS LIBICONV_POST_INSTALL_STAGING_HOOKS += LIBICONV_STAGING_REMOVE_PRELOADABLE_LIBS -$(eval $(call AUTOTARGETS,package,libiconv)) +# Library lacks +x so strip skips it +define LIBICONV_FIX_LIBRARY_MODE + -chmod +x $(TARGET_DIR)/usr/lib/libcharset.so* + -chmod +x $(TARGET_DIR)/usr/lib/libiconv.so* +endef + +LIBICONV_POST_INSTALL_TARGET_HOOKS += LIBICONV_FIX_LIBRARY_MODE + +$(eval $(autotools-package)) # Configurations where the toolchain supports locales and the libiconv # package is enabled are incorrect, because the toolchain already diff --git a/package/multimedia/libid3tag/Config.in b/package/libid3tag/Config.in similarity index 100% rename from package/multimedia/libid3tag/Config.in rename to package/libid3tag/Config.in diff --git a/package/libid3tag/libid3tag.mk b/package/libid3tag/libid3tag.mk new file mode 100644 index 0000000000..2cd7820d1f --- /dev/null +++ b/package/libid3tag/libid3tag.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libid3tag +# +################################################################################ + +LIBID3TAG_VERSION = 0.15.1b +LIBID3TAG_SITE = http://downloads.sourceforge.net/project/mad/libid3tag/$(LIBID3TAG_VERSION) +LIBID3TAG_LICENSE = GPLv2+ +LIBID3TAG_LICENSE_FILES = COPYING COPYRIGHT +LIBID3TAG_INSTALL_STAGING = YES +LIBID3TAG_DEPENDENCIES = zlib +LIBID3TAG_LIBTOOL_PATCH = NO + +$(eval $(autotools-package)) diff --git a/package/libidn/libidn.mk b/package/libidn/libidn.mk index cc8c08f369..b2c33538c8 100644 --- a/package/libidn/libidn.mk +++ b/package/libidn/libidn.mk @@ -1,15 +1,17 @@ -############################################################# +################################################################################ # # libidn # -############################################################# +################################################################################ -LIBIDN_VERSION = 1.19 -LIBIDN_SITE = http://ftp.gnu.org/gnu/libidn/ +LIBIDN_VERSION = 1.28 +LIBIDN_SITE = $(BR2_GNU_MIRROR)/libidn LIBIDN_INSTALL_STAGING = YES LIBIDN_CONF_ENV = EMACS="no" -LIBIDN_CONF_OPT = --enable-shared --disable-java --enable-csharp=no -LIBIDN_DEPENDENCIES = host-pkg-config $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) $(if $(BR2_PACKAGE_LIBICONV),libiconv) +LIBIDN_CONF_OPT = --disable-java --enable-csharp=no +LIBIDN_DEPENDENCIES = host-pkgconf $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) $(if $(BR2_PACKAGE_LIBICONV),libiconv) +LIBIDN_LICENSE = GPLv2+ GPLv3+ LGPLv3+ +LIBIDN_LICENSE_FILES = COPYINGv2 COPYINGv3 COPYING.LESSERv3 define LIBIDN_REMOVE_BINARY rm -f $(TARGET_DIR)/usr/bin/idn @@ -30,4 +32,4 @@ define LIBIDN_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/bin/idn endef -$(eval $(call AUTOTARGETS,package,libidn)) +$(eval $(autotools-package)) diff --git a/package/libiqrf/Config.in b/package/libiqrf/Config.in new file mode 100644 index 0000000000..03555e063a --- /dev/null +++ b/package/libiqrf/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LIBIQRF + bool "libiqrf" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_LIBUSB + help + This library implement specific protocol + which is used for communicating with iqrf devices + (http://iqrf.org) over usb. For usb access is used + libusb library. + + https://github.com/nandra/libiqrf + +comment "libiqrf needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libiqrf/libiqrf-use-only-c-language.patch b/package/libiqrf/libiqrf-use-only-c-language.patch new file mode 100644 index 0000000000..2f1c23c28b --- /dev/null +++ b/package/libiqrf/libiqrf-use-only-c-language.patch @@ -0,0 +1,29 @@ +Use only the C language + +libirqf is written completely in C, but by default, CMake assumes that +both C and C++ are used, and therefore verifies that a C++ compiler is +installed. This may not necessarily be the case for a C-only package +in Buildroot. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/CMakeLists.txt +=================================================================== +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1,5 +1,3 @@ +-project(iqrf) +- + set (iqrf_version_major 0) + set (iqrf_version_minor 1) + set (iqrf_version_patch 2) +Index: b/CMakeLists.txt +=================================================================== +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,3 +1,5 @@ ++project(iqrf C) ++ + cmake_minimum_required(VERSION 2.8.1) + enable_testing() + diff --git a/package/libiqrf/libiqrf.mk b/package/libiqrf/libiqrf.mk new file mode 100644 index 0000000000..6c33654e95 --- /dev/null +++ b/package/libiqrf/libiqrf.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# libiqrf +# +################################################################################ + +LIBIQRF_VERSION = v0.1.2 +LIBIQRF_SITE = http://github.com/nandra/libiqrf/tarball/$(LIBIQRF_VERSION) +LIBIQRF_INSTALL_STAGING = YES + +LIBIQRF_DEPENDENCIES = libusb + +$(eval $(cmake-package)) diff --git a/package/libiscsi/Config.in b/package/libiscsi/Config.in new file mode 100644 index 0000000000..3ec184a511 --- /dev/null +++ b/package/libiscsi/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBISCSI + bool "libiscsi" + select BR2_PACKAGE_POPT + help + Libiscsi is a client-side library to implement the iSCSI protocol + that can be used to access resource of an iSCSI Target. + + The library is fully async with regards to iscsi commands and scsi + tasks, but a sync layer is also provided for ease of use for simpler + applications. + + https://github.com/sahlberg/libiscsi (no proper homepage) diff --git a/package/libiscsi/libiscsi.mk b/package/libiscsi/libiscsi.mk new file mode 100644 index 0000000000..eddde33ec9 --- /dev/null +++ b/package/libiscsi/libiscsi.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libiscsi +# +################################################################################ + +LIBISCSI_VERSION = 1.6.0 +LIBISCSI_SITE = https://github.com/downloads/sahlberg/libiscsi +LIBISCSI_LICENSE = GPLv2+ LGPLv2.1+ +LIBISCSI_LICENSE_FILES = COPYING LICENCE-GPL-2.txt LICENCE-LGPL-2.1.txt +LIBISCSI_INSTALL_STAGING = YES +LIBISCSI_DEPENDENCIES = popt +# fixes MIPS64 link failure +LIBISCSI_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/libjpeg/libjpeg.mk b/package/libjpeg/libjpeg.mk new file mode 100644 index 0000000000..b0b02add3c --- /dev/null +++ b/package/libjpeg/libjpeg.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# libjpeg +# +################################################################################ + +LIBJPEG_VERSION = 8d +LIBJPEG_SITE = http://www.ijg.org/files/ +LIBJPEG_SOURCE = jpegsrc.v$(LIBJPEG_VERSION).tar.gz +LIBJPEG_INSTALL_STAGING = YES + +define LIBJPEG_REMOVE_USELESS_TOOLS + rm -f $(addprefix $(TARGET_DIR)/usr/bin/,cjpeg djpeg jpegtrans rdjpgcom wrjpgcom) +endef + +LIBJPEG_POST_INSTALL_TARGET_HOOKS += LIBJPEG_REMOVE_USELESS_TOOLS + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/libjson/Config.in b/package/libjson/Config.in new file mode 100644 index 0000000000..50a99311d2 --- /dev/null +++ b/package/libjson/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBJSON + bool "libjson" + depends on BR2_INSTALL_LIBSTDCPP + help + A JSON reader and writer which is super-efficient and usually + runs circles around other JSON libraries. + + http://sourceforge.net/projects/libjson/ + +comment "libjson needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/libjson/libjson-0001-fix-broken-makefile.patch b/package/libjson/libjson-0001-fix-broken-makefile.patch new file mode 100644 index 0000000000..8ceb0cac3a --- /dev/null +++ b/package/libjson/libjson-0001-fix-broken-makefile.patch @@ -0,0 +1,16 @@ +Fix the broken libjson makefile. + +Signed-off-by: Simon Dawson + +diff -Nurp a/makefile b/makefile +--- a/makefile 2012-05-30 10:15:42.000000000 +0100 ++++ b/makefile 2013-03-27 18:45:34.814670534 +0000 +@@ -170,7 +170,7 @@ include_path = $(prefix)/$(includedi + # Usage check + ifdef CXXFLAGS + ifdef BUILD_TYPE +- $(error CXXFLAGS and BUILD_TYPE are mutually exclusive) ++$(error CXXFLAGS and BUILD_TYPE are mutually exclusive) + endif + endif + diff --git a/package/libjson/libjson.mk b/package/libjson/libjson.mk new file mode 100644 index 0000000000..73324ae375 --- /dev/null +++ b/package/libjson/libjson.mk @@ -0,0 +1,64 @@ +################################################################################ +# +# libjson +# +################################################################################ + +LIBJSON_VERSION = 7.6.1 +LIBJSON_SITE = http://downloads.sourceforge.net/project/libjson +LIBJSON_SOURCE = libjson_$(LIBJSON_VERSION).zip +LIBJSON_INSTALL_STAGING = YES +LIBJSON_LICENSE = BSD-2c +LIBJSON_LICENSE_FILES = License.txt + +LIBJSON_CXXFLAGS = $(TARGET_CFLAGS) -DNDEBUG + +ifeq ($(BR2_PREFER_STATIC_LIB),y) +LIBJSON_MAKE_OPT += SHARED=0 +else +LIBJSON_MAKE_OPT += SHARED=1 +LIBJSON_CXXFLAGS += -fPIC +endif + +LIBJSON_MAKE_OPT += BUILD_TYPE= CXXFLAGS="$(LIBJSON_CXXFLAGS)" + +define LIBJSON_EXTRACT_CMDS + unzip -d $(@D) $(DL_DIR)/$(LIBJSON_SOURCE) + mv $(@D)/libjson/* $(@D) + $(RM) -r $(@D)/libjson + $(SED) '/ldconfig/d' $(@D)/makefile +endef + +define LIBJSON_BUILD_CMDS + mkdir -p $(@D)/Objects_$(if $(BR2_PREFER_STATIC_LIB),static,shared) \ + $(@D)/_internal/Source/Dependencies + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + $(LIBJSON_MAKE_OPT) -C $(@D) +endef + +define LIBJSON_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + $(LIBJSON_MAKE_OPT) prefix=$(TARGET_DIR)/usr install -C $(@D) +endef + +define LIBJSON_UNINSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + $(LIBJSON_MAKE_OPT) prefix=$(TARGET_DIR)/usr uninstall -C $(@D) +endef + +define LIBJSON_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + $(LIBJSON_MAKE_OPT) prefix=$(STAGING_DIR)/usr install -C $(@D) +endef + +define LIBJSON_UNINSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + $(LIBJSON_MAKE_OPT) prefix=$(STAGING_DIR)/usr uninstall -C $(@D) +endef + +define LIBJSON_CLEAN_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) $(LIBJSON_MAKE_OPT) \ + clean -C $(@D) +endef + +$(eval $(generic-package)) diff --git a/package/liblo/Config.in b/package/liblo/Config.in new file mode 100644 index 0000000000..705ac84514 --- /dev/null +++ b/package/liblo/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBLO + bool "liblo" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + liblo is an implementation of the Open Sound Control + protocol for POSIX systems + + http://liblo.sourceforge.net/ + +comment "liblo needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/liblo/liblo.mk b/package/liblo/liblo.mk new file mode 100644 index 0000000000..a6b907509c --- /dev/null +++ b/package/liblo/liblo.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# liblo +# +################################################################################ + +LIBLO_VERSION = 0.26 +LIBLO_SITE = http://downloads.sourceforge.net/project/liblo/liblo/$(LIBLO_VERSION) + +LIBLO_LICENSE = LGPLv2.1+ +LIBLO_LICENSE_FILES = COPYING +LIBLO_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/liblockfile/liblockfile.mk b/package/liblockfile/liblockfile.mk index bd14fafe0a..6e07704df3 100644 --- a/package/liblockfile/liblockfile.mk +++ b/package/liblockfile/liblockfile.mk @@ -1,15 +1,19 @@ -############################################################# +################################################################################ # # liblockfile # -############################################################# -LIBLOCKFILE_VERSION=1.08 -LIBLOCKFILE_SOURCE:=liblockfile_$(LIBLOCKFILE_VERSION).orig.tar.gz -LIBLOCKFILE_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/libl/liblockfile/ -LIBLOCKFILE_PATCH:=liblockfile_$(LIBLOCKFILE_VERSION)-4.debian.tar.bz2 +################################################################################ + +LIBLOCKFILE_VERSION = 1.08 +LIBLOCKFILE_SOURCE = liblockfile_$(LIBLOCKFILE_VERSION).orig.tar.gz +LIBLOCKFILE_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/libl/liblockfile/ +LIBLOCKFILE_PATCH = liblockfile_$(LIBLOCKFILE_VERSION)-4.debian.tar.bz2 + +LIBLOCKFILE_LICENSE = LGPLv2+, dotlockfile GPLv2+ +# No license file included, it refers to the gnu.org website LIBLOCKFILE_INSTALL_STAGING = YES -LIBLOCKFILE_CONF_OPT = --enable-shared --mandir=/usr/share/man +LIBLOCKFILE_CONF_OPT = --mandir=/usr/share/man define LIBLOCKFILE_INSTALL_STAGING_CMDS mkdir -p $(addprefix $(STAGING_DIR)/usr/share/man/man,1 3) @@ -29,4 +33,4 @@ define LIBLOCKFILE_CLEAN_CMDS -$(MAKE) -C $(@D) clean endef -$(eval $(call AUTOTARGETS,package,liblockfile)) +$(eval $(autotools-package)) diff --git a/package/liblog4c-localtime/Config.in b/package/liblog4c-localtime/Config.in new file mode 100644 index 0000000000..a2b7a843f1 --- /dev/null +++ b/package/liblog4c-localtime/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBLOG4C_LOCALTIME + bool "liblog4c-localtime" + select BR2_PACKAGE_EXPAT + help + Log4c is a library of C for flexible logging to files, syslog + and other destinations. + This version is with localtime patch, to make lib show times in + local timezone. + + https://github.com/rcmadruga/log4c-localtime + http://log4c.sourceforge.net/ diff --git a/package/liblog4c-localtime/liblog4c-localtime-fix-underquoted-path.patch b/package/liblog4c-localtime/liblog4c-localtime-fix-underquoted-path.patch new file mode 100644 index 0000000000..8a74a5efd9 --- /dev/null +++ b/package/liblog4c-localtime/liblog4c-localtime-fix-underquoted-path.patch @@ -0,0 +1,16 @@ +Fix "underquoted definition of AM_PATH_LOG4C" warning. + +Signed-off-by: Danomi Manchego + +diff -urN liblog4c-localtime-1.0/log4c.m4 liblog4c-localtime-1.0.orig/log4c.m4 +--- liblog4c-localtime-1.0/log4c.m4 2012-10-27 16:11:46.219894716 -0400 ++++ liblog4c-localtime-1.0.orig/log4c.m4 2012-10-27 16:10:31.393336864 -0400 +@@ -4,7 +4,7 @@ + dnl AM_PATH_LOG4C([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) + dnl Test for LOG4C, and define LOG4C_CFLAGS and LOG4C_LIBS + dnl +-AC_DEFUN(AM_PATH_LOG4C, ++AC_DEFUN([AM_PATH_LOG4C], + [dnl + dnl Get the cflags and libraries from the log4c-config script + dnl diff --git a/package/liblog4c-localtime/liblog4c-localtime-nothread.patch b/package/liblog4c-localtime/liblog4c-localtime-nothread.patch new file mode 100644 index 0000000000..df16e62461 --- /dev/null +++ b/package/liblog4c-localtime/liblog4c-localtime-nothread.patch @@ -0,0 +1,29 @@ +[PATCH] fix linking error without pthread + +The rollingfile functionality only gets built if pthread support is +available, but a call to these functions from log4c_fini() was outside +the #if WITH_ROLLINGFILE conditional, causing linker errors when the +library is used. + +Signed-off-by: Peter Korsgaard +--- + src/log4c/init.c | 2 ++ + 1 file changed, 2 insertions(+) + +Index: liblog4c-localtime-v1.0/src/log4c/init.c +=================================================================== +--- liblog4c-localtime-v1.0.orig/src/log4c/init.c ++++ liblog4c-localtime-v1.0/src/log4c/init.c +@@ -267,10 +267,12 @@ + log4c_layout_factory = NULL; + } + ++#ifdef WITH_ROLLINGFILE + if (log4c_rollingpolicy_factory) { + sd_factory_delete(log4c_rollingpolicy_factory); + log4c_rollingpolicy_factory = NULL; + } ++#endif + + #ifdef __SD_DEBUG__ + if( getenv("SD_DEBUG")){ diff --git a/package/liblog4c-localtime/liblog4c-localtime.mk b/package/liblog4c-localtime/liblog4c-localtime.mk new file mode 100644 index 0000000000..474bd95581 --- /dev/null +++ b/package/liblog4c-localtime/liblog4c-localtime.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# liblog4c-localtime +# +################################################################################ + +LIBLOG4C_LOCALTIME_VERSION = v1.0 +LIBLOG4C_LOCALTIME_SITE = https://github.com/rcmadruga/log4c-localtime/tarball/$(LIBLOG4C_LOCALTIME_VERSION) +LIBLOG4C_LOCALTIME_INSTALL_STAGING = YES +LIBLOG4C_LOCALTIME_CONF_OPT = --disable-expattest +LIBLOG4C_LOCALTIME_DEPENDENCIES = expat +LIBLOG4C_LOCALTIME_CONFIG_SCRIPTS = log4c-config + +define LIBLOG4C_LOCALTIME_FIX_CONFIGURE_PERMS + chmod +x $(@D)/configure +endef + +LIBLOG4C_LOCALTIME_PRE_CONFIGURE_HOOKS += LIBLOG4C_LOCALTIME_FIX_CONFIGURE_PERMS + + $(eval $(autotools-package)) diff --git a/package/libmad/Config.in b/package/libmad/Config.in new file mode 100644 index 0000000000..80ed85357d --- /dev/null +++ b/package/libmad/Config.in @@ -0,0 +1,50 @@ +config BR2_PACKAGE_LIBMAD + bool "libmad" + select BR2_PACKAGE_LIBMAD_ASO if BR2_avr32 + help + High-quality MPEG audio decoder. All computations are performed + with fixed-point integer arithmetic, making it ideal for systems + without a floating-point unit. + + http://www.underbit.com/products/mad/ + +if BR2_PACKAGE_LIBMAD + +choice + prompt "Speed vs. accuracy" + default BR2_PACKAGE_LIBMAD_OPTIMIZATION_DEFAULT + +config BR2_PACKAGE_LIBMAD_OPTIMIZATION_DEFAULT + bool "Default" + help + Keep optimizations balanced between speed and accuracy. + +config BR2_PACKAGE_LIBMAD_OPTIMIZATION_SPEED + bool "Optimize for speed over accuracy" + help + Compromise accuracy for speed. + +config BR2_PACKAGE_LIBMAD_OPTIMIZATION_ACCURACY + bool "Optimize for accuracy over speed" + help + Compromise speed for accuracy. + +endchoice + +config BR2_PACKAGE_LIBMAD_SSO + bool "Subband synthesis optimization" + help + Use the subband synthesis optimization, with reduced accuracy. + +config BR2_PACKAGE_LIBMAD_ASO + bool "Architecture-specific optimizations" + default y + help + Use certain architecture-specific optimizations. + +config BR2_PACKAGE_LIBMAD_STRICT_ISO + bool "Strict ISO/IEC interpretations" + help + Use strict ISO/IEC interpretations. + +endif diff --git a/package/multimedia/libmad/libmad-0.15.1b-mips-h-constraint-removal.patch b/package/libmad/libmad-0.15.1b-mips-h-constraint-removal.patch similarity index 100% rename from package/multimedia/libmad/libmad-0.15.1b-mips-h-constraint-removal.patch rename to package/libmad/libmad-0.15.1b-mips-h-constraint-removal.patch diff --git a/package/multimedia/libmad/libmad-0.15.1b-optimization.patch.avr32 b/package/libmad/libmad-0.15.1b-optimization.patch.avr32 similarity index 100% rename from package/multimedia/libmad/libmad-0.15.1b-optimization.patch.avr32 rename to package/libmad/libmad-0.15.1b-optimization.patch.avr32 diff --git a/package/multimedia/libmad/libmad-0.15.1b-remove-deprecated-cflags.patch b/package/libmad/libmad-0.15.1b-remove-deprecated-cflags.patch similarity index 100% rename from package/multimedia/libmad/libmad-0.15.1b-remove-deprecated-cflags.patch rename to package/libmad/libmad-0.15.1b-remove-deprecated-cflags.patch diff --git a/package/libmad/libmad-0.15.1b-thumb2-fixed-arm.patch b/package/libmad/libmad-0.15.1b-thumb2-fixed-arm.patch new file mode 100644 index 0000000000..befda48d7e --- /dev/null +++ b/package/libmad/libmad-0.15.1b-thumb2-fixed-arm.patch @@ -0,0 +1,40 @@ +Fixes Thumb2-related build failure + +Patch below comes from the Debian libmad package. + +Signed-off-by: Thomas Petazzoni + +From: Dave Martin +Subject: "rsc" doesnt exist anymore in thumb2 + +diff --git a/fixed.h b/fixed.h +index 4b58abf..ba4bc26 100644 +--- a/fixed.h ++++ b/fixed.h +@@ -275,12 +275,25 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) + : "+r" (lo), "+r" (hi) \ + : "%r" (x), "r" (y)) + ++#ifdef __thumb__ ++/* In Thumb-2, the RSB-immediate instruction is only allowed with a zero ++ operand. If needed this code can also support Thumb-1 ++ (simply append "s" to the end of the second two instructions). */ ++# define MAD_F_MLN(hi, lo) \ ++ asm ("rsbs %0, %0, #0\n\t" \ ++ "sbc %1, %1, %1\n\t" \ ++ "sub %1, %1, %2" \ ++ : "+&r" (lo), "=&r" (hi) \ ++ : "r" (hi) \ ++ : "cc") ++#else /* ! __thumb__ */ + # define MAD_F_MLN(hi, lo) \ + asm ("rsbs %0, %2, #0\n\t" \ + "rsc %1, %3, #0" \ +- : "=r" (lo), "=r" (hi) \ ++ : "=&r" (lo), "=r" (hi) \ + : "0" (lo), "1" (hi) \ + : "cc") ++#endif /* __thumb__ */ + + # define mad_f_scale64(hi, lo) \ + ({ mad_fixed_t __result; \ diff --git a/package/libmad/libmad-0.15.1b-thumb2-imdct-arm.patch b/package/libmad/libmad-0.15.1b-thumb2-imdct-arm.patch new file mode 100644 index 0000000000..414b9c8fcf --- /dev/null +++ b/package/libmad/libmad-0.15.1b-thumb2-imdct-arm.patch @@ -0,0 +1,20 @@ +Fixes Thumb2 related build failure + +Patch below comes from the Debian libmad package. + +Signed-off-by: Thomas Petazzoni + +From: Konstantinos Margaritis +Subject: use "adr" instead of "add" to make code ready for thumb2 + +--- ./imdct_l_arm.S.orig 2010-02-25 13:25:23.000000000 +0100 ++++ ./imdct_l_arm.S 2010-02-25 13:27:26.000000000 +0100 +@@ -468,7 +468,7 @@ + + @---- + +- add r2, pc, #(imdct36_long_karray-.-8) @ r2 = base address of Knn array (PIC safe ?) ++ adr r2, imdct36_long_karray + + + loop: diff --git a/package/libmad/libmad.mk b/package/libmad/libmad.mk new file mode 100644 index 0000000000..56747490f7 --- /dev/null +++ b/package/libmad/libmad.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# libmad +# +################################################################################ + +LIBMAD_VERSION = 0.15.1b +LIBMAD_SITE = http://downloads.sourceforge.net/project/mad/libmad/$(LIBMAD_VERSION) +LIBMAD_INSTALL_STAGING = YES +LIBMAD_LIBTOOL_PATCH = NO +LIBMAD_LICENSE = GPLv2+ +LIBMAD_LICENSE_FILES = COPYING + +define LIBMAD_PREVENT_AUTOMAKE + # Prevent automake from running. + (cd $(@D); touch -c config* aclocal.m4 Makefile*); +endef + +define LIBMAD_INSTALL_STAGING_PC + $(INSTALL) -D package/libmad/mad.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/mad.pc +endef + +define LIBMAD_INSTALL_TARGET_PC + $(INSTALL) -D package/libmad/mad.pc \ + $(TARGET_DIR)/usr/lib/pkgconfig/mad.pc +endef + +LIBMAD_POST_PATCH_HOOKS += LIBMAD_PREVENT_AUTOMAKE +LIBMAD_POST_INSTALL_STAGING_HOOKS += LIBMAD_INSTALL_STAGING_PC +LIBMAD_POST_INSTALL_TARGET_HOOKS += LIBMAD_INSTALL_TARGET_PC + +LIBMAD_CONF_OPT = \ + --disable-debugging \ + $(if $(BR2_PACKAGE_LIBMAD_OPTIMIZATION_SPEED),--enable-speed) \ + $(if $(BR2_PACKAGE_LIBMAD_OPTIMIZATION_ACCURACY),--enable-accuracy) \ + --$(if $(BR2_PACKAGE_LIBMAD_SSO),enable,disable)-sso \ + --$(if $(BR2_PACKAGE_LIBMAD_ASO),enable,disable)-aso \ + --$(if $(BR2_PACKAGE_LIBMAD_STRICT_ISO),enable,disable)-strict-iso + +$(eval $(autotools-package)) diff --git a/package/multimedia/libmad/mad.pc b/package/libmad/mad.pc similarity index 100% rename from package/multimedia/libmad/mad.pc rename to package/libmad/mad.pc diff --git a/package/libmatroska/Config.in b/package/libmatroska/Config.in new file mode 100644 index 0000000000..81270dede4 --- /dev/null +++ b/package/libmatroska/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBMATROSKA + bool "libmatroska" + select BR2_PACKAGE_LIBEBML + depends on BR2_INSTALL_LIBSTDCPP + help + Extensible open standard audio/video container format access + library. + + http://matroska.org + +comment "libmatroska needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/libmatroska/libmatroska.mk b/package/libmatroska/libmatroska.mk new file mode 100644 index 0000000000..2833ea7aa7 --- /dev/null +++ b/package/libmatroska/libmatroska.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# libmatroska +# +################################################################################ + +LIBMATROSKA_VERSION = 1.3.0 +LIBMATROSKA_SOURCE = libmatroska-$(LIBMATROSKA_VERSION).tar.bz2 +LIBMATROSKA_SITE = http://dl.matroska.org/downloads/libmatroska/ +LIBMATROSKA_INSTALL_STAGING = YES +LIBMATROSKA_LICENSE = LGPLv2.1+ +LIBMATROSKA_LICENSE_FILES = LICENSE.LGPL +LIBMATROSKA_DEPENDENCIES = libebml + +define LIBMATROSKA_BUILD_CMDS + $(MAKE) -C $(@D)/make/linux CROSS="$(CCACHE) $(TARGET_CROSS)" +endef + +define LIBMATROSKA_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D)/make/linux prefix=$(STAGING_DIR)/usr install +endef + +define LIBMATROSKA_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D)/make/linux prefix=$(TARGET_DIR)/usr install +endef + +$(eval $(generic-package)) diff --git a/package/libmbus/Config.in b/package/libmbus/Config.in new file mode 100644 index 0000000000..1e2a8de7ad --- /dev/null +++ b/package/libmbus/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBMBUS + bool "libmbus" + help + libmbus is a library for communicating with energy metering devices. + It supports TCP and RS232 M-bus gateways. + (M-bus standard: http://www.m-bus.com/) + + http://www.freescada.com/libmbus diff --git a/package/libmbus/libmbus.mk b/package/libmbus/libmbus.mk new file mode 100644 index 0000000000..e1b02e001c --- /dev/null +++ b/package/libmbus/libmbus.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# libmbus +# +################################################################################ + +LIBMBUS_VERSION = 0.8.0 +LIBMBUS_SITE = http://www.freescada.com/public-dist +LIBMBUS_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libmcrypt/Config.in b/package/libmcrypt/Config.in new file mode 100644 index 0000000000..e5dc5e23a9 --- /dev/null +++ b/package/libmcrypt/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBMCRYPT + bool "libmcrypt" + help + libmcrypt is a library that provides uniform interface to access + several encryption algorithms. + + http://mcrypt.sourceforge.net/ diff --git a/package/libmcrypt/libmcrypt-nocxx.patch b/package/libmcrypt/libmcrypt-nocxx.patch new file mode 100644 index 0000000000..b1c28713a1 --- /dev/null +++ b/package/libmcrypt/libmcrypt-nocxx.patch @@ -0,0 +1,15 @@ +libmcrypt doesn't use C++ so remove the check. + +Signed-off-by: Gustavo Zacarias + +diff -Nura libmcrypt-2.5.8.orig/configure.in libmcrypt-2.5.8/configure.in +--- libmcrypt-2.5.8.orig/configure.in 2013-01-07 12:20:44.332200669 -0300 ++++ libmcrypt-2.5.8/configure.in 2013-01-07 12:20:50.405390565 -0300 +@@ -19,7 +19,6 @@ + + AC_PROG_MAKE_SET + +-AC_PROG_CXX + AC_PROG_CC + AC_PROG_CPP + AC_PROG_INSTALL diff --git a/package/libmcrypt/libmcrypt.mk b/package/libmcrypt/libmcrypt.mk new file mode 100644 index 0000000000..1a2645bc14 --- /dev/null +++ b/package/libmcrypt/libmcrypt.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libmcrypt +# +################################################################################ + +LIBMCRYPT_VERSION = 2.5.8 +LIBMCRYPT_SITE = http://downloads.sourceforge.net/project/mcrypt/Libmcrypt/$(LIBMCRYPT_VERSION) +LIBMCRYPT_AUTORECONF = YES +LIBMCRYPT_INSTALL_STAGING = YES +LIBMCRYPT_LICENSE = LGPLv2.1 +LIBMCRYPT_LICENSE_FILES = COPYING.LIB +LIBMCRYPT_CONFIG_SCRIPTS = libmcrypt-config + +$(eval $(autotools-package)) diff --git a/package/libmhash/Config.in b/package/libmhash/Config.in new file mode 100644 index 0000000000..a9bd51a2c9 --- /dev/null +++ b/package/libmhash/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBMHASH + bool "libmhash" + help + Mhash is a free (under GNU Lesser GPL) library which provides + a uniform interface to a large number of hash algorithms. + These algorithms can be used to compute checksums, message digests, + and other signatures. + + http://mhash.sourceforge.net/ diff --git a/package/libmhash/libmhash.mk b/package/libmhash/libmhash.mk new file mode 100644 index 0000000000..f7b8e72997 --- /dev/null +++ b/package/libmhash/libmhash.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libmhash +# +################################################################################ + +LIBMHASH_VERSION = 0.9.9.9 +LIBMHASH_SITE = http://downloads.sourceforge.net/project/mhash/mhash/$(LIBMHASH_VERSION) +LIBMHASH_SOURCE = mhash-$(LIBMHASH_VERSION).tar.bz2 +LIBMHASH_INSTALL_STAGING = YES +LIBMHASH_LICENSE = LGPLv2 +LIBMHASH_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libmicrohttpd/Config.in b/package/libmicrohttpd/Config.in index cfedc8fa95..15e3762095 100644 --- a/package/libmicrohttpd/Config.in +++ b/package/libmicrohttpd/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_LIBMICROHTTPD bool "libmicrohttpd" + depends on BR2_TOOLCHAIN_HAS_THREADS help GNU libmicrohttpd is a small C library that makes it easy to run an HTTP server as part of another application. @@ -7,8 +8,16 @@ config BR2_PACKAGE_LIBMICROHTTPD http://www.gnu.org/software/libmicrohttpd/ config BR2_PACKAGE_LIBMICROHTTPD_SSL - bool "https support" - depends on BR2_PACKAGE_LIBMICROHTTPD - select BR2_PACKAGE_LIBGCRYPT - help - Enable HTTPS (SSL) support. + bool "https support" + depends on BR2_PACKAGE_LIBMICROHTTPD + depends on BR2_USE_WCHAR + select BR2_PACKAGE_GNUTLS + select BR2_PACKAGE_LIBGCRYPT + help + Enable HTTPS (SSL) support. + +comment "libmicrohttpd needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +comment "libmicrohttpd https support needs a toolchain w/ wchar" + depends on BR2_PACKAGE_LIBMICROHTTPD && !BR2_USE_WCHAR diff --git a/package/libmicrohttpd/libmicrohttpd.mk b/package/libmicrohttpd/libmicrohttpd.mk index 7a1925ec1f..8d5395ddab 100644 --- a/package/libmicrohttpd/libmicrohttpd.mk +++ b/package/libmicrohttpd/libmicrohttpd.mk @@ -1,19 +1,28 @@ -############################################################# +################################################################################ # # libmicrohttpd # -############################################################# -LIBMICROHTTPD_VERSION = 0.4.6 -LIBMICROHTTPD_SOURCE = libmicrohttpd-$(LIBMICROHTTPD_VERSION).tar.gz +################################################################################ + +LIBMICROHTTPD_VERSION = 0.9.31 LIBMICROHTTPD_SITE = $(BR2_GNU_MIRROR)/libmicrohttpd +LIBMICROHTTPD_LICENSE_FILES = COPYING LIBMICROHTTPD_INSTALL_STAGING = YES +LIBMICROHTTPD_CONF_OPT = --disable-spdy ifeq ($(BR2_PACKAGE_LIBMICROHTTPD_SSL),y) -LIBMICROHTTPD_DEPENDENCIES += libgcrypt -LIBMICROHTTPD_CONF_OPT += --enable-https \ - --with-libgcrypt-prefix=$(STAGING_DIR)/usr +LIBMICROHTTPD_LICENSE = LGPLv2.1+ +LIBMICROHTTPD_DEPENDENCIES += gnutls libgcrypt +LIBMICROHTTPD_CONF_OPT += --enable-https --with-gnutls=$(STAGING_DIR)/usr \ + --with-libgcrypt-prefix=$(STAGING_DIR)/usr else +LIBMICROHTTPD_LICENSE = LGPLv2.1+ or eCos LIBMICROHTTPD_CONF_OPT += --disable-https endif -$(eval $(call AUTOTARGETS,package,libmicrohttpd)) +ifeq ($(BR2_avr32),y) +# no epoll_create1 +LIBMICROHTTPD_CONF_OPT += --disable-epoll +endif + +$(eval $(autotools-package)) diff --git a/package/libmms/Config.in b/package/libmms/Config.in new file mode 100644 index 0000000000..11df6e5142 --- /dev/null +++ b/package/libmms/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_LIBMMS + bool "libmms" + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + select BR2_PACKAGE_LIBGLIB2 + help + LibMMS is a common library for parsing mms:// and mmsh:// + type network streams. These are commonly used to stream + Windows Media Video content over the web. LibMMS itself is + only for receiving MMS stream, it doesn't handle sending at + all. + + http://launchpad.net/libmms + +comment "libmms needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libmms/libmms.mk b/package/libmms/libmms.mk new file mode 100644 index 0000000000..405729f5fc --- /dev/null +++ b/package/libmms/libmms.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libmms +# +################################################################################ + +LIBMMS_VERSION = 0.6.2 +LIBMMS_SITE = http://downloads.sourceforge.net/project/libmms/libmms/$(LIBMMS_VERSION) + +LIBMMS_INSTALL_STAGING = YES + +LIBMMS_DEPENDENCIES = host-pkgconf libglib2 + +$(eval $(autotools-package)) diff --git a/package/libmnl/Config.in b/package/libmnl/Config.in new file mode 100644 index 0000000000..4ffe537df0 --- /dev/null +++ b/package/libmnl/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBMNL + bool "libmnl" + depends on BR2_LARGEFILE + help + libmnl is a minimalistic user-space library oriented + to Netlink developers. + + http://netfilter.org/projects/libmnl/ + +comment "libmnl needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE diff --git a/package/libmnl/libmnl-01-uclinux.patch b/package/libmnl/libmnl-01-uclinux.patch new file mode 100644 index 0000000000..e8f97c6c17 --- /dev/null +++ b/package/libmnl/libmnl-01-uclinux.patch @@ -0,0 +1,26 @@ +From ae2acfa7d287e3ffc0bb66091059b86f62775bd5 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Tue, 10 Sep 2013 15:24:47 -0300 +Subject: [PATCH] configure: uclinux is also linux + +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index dcd3cf8..313a015 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -17,7 +17,7 @@ AC_DISABLE_STATIC + LT_INIT + CHECK_GCC_FVISIBILITY + case "$host" in +-*-*-linux*) ;; ++*-*-linux* | *-*-uclinux*) ;; + *) AC_MSG_ERROR([Linux only, dude!]);; + esac + +-- +1.8.1.5 + diff --git a/package/libmnl/libmnl.mk b/package/libmnl/libmnl.mk new file mode 100644 index 0000000000..b16c5345c0 --- /dev/null +++ b/package/libmnl/libmnl.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libmnl +# +################################################################################ + +LIBMNL_VERSION = 1.0.3 +LIBMNL_SOURCE = libmnl-$(LIBMNL_VERSION).tar.bz2 +LIBMNL_SITE = http://netfilter.org/projects/libmnl/files +LIBMNL_INSTALL_STAGING = YES +LIBMNL_AUTORECONF = YES +LIBMNL_LICENSE = LGPLv2.1+ +LIBMNL_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libmodbus/Config.in b/package/libmodbus/Config.in new file mode 100644 index 0000000000..ccf11906fc --- /dev/null +++ b/package/libmodbus/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBMODBUS + bool "libmodbus" + help + libmodbus is a free software library to send/receive data according + to the Modbus protocol. This library is written in C and supports + RTU (serial) and TCP (Ethernet) communications. + + http://libmodbus.org diff --git a/package/libmodbus/libmodbus.mk b/package/libmodbus/libmodbus.mk new file mode 100644 index 0000000000..8aa3cd74fe --- /dev/null +++ b/package/libmodbus/libmodbus.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# libmodbus +# +################################################################################ + +LIBMODBUS_VERSION = 3.0.5 +LIBMODBUS_SITE = http://libmodbus.org/site_media/build/ +LIBMODBUS_LICENSE = LGPLv2.1+ +LIBMODBUS_LICENSE_FILES = COPYING.LESSER +LIBMODBUS_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libmpd/Config.in b/package/libmpd/Config.in new file mode 100644 index 0000000000..1e3b860063 --- /dev/null +++ b/package/libmpd/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_LIBMPD + bool "libmpd" + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + High-level client library for accessing Music Player Daemon. + LibMpd is a library that provides high-level, callback-based + access to Music Player Daemon (mpd). + + http://gmpcwiki.sarine.nl/index.php?title=Libmpd + +comment "libmpd needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libmpd/libmpd.mk b/package/libmpd/libmpd.mk new file mode 100644 index 0000000000..b78a36f0fa --- /dev/null +++ b/package/libmpd/libmpd.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libmpd +# +################################################################################ + +LIBMPD_VERSION = 11.8.17 +LIBMPD_SITE = http://download.sarine.nl/Programs/gmpc/11.8.16 +LIBMPD_INSTALL_STAGING = YES +LIBMPD_DEPENDENCIES = libglib2 +LIBMPD_LICENSE = GPLv2+ +LIBMPD_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/multimedia/libmpeg2/Config.in b/package/libmpeg2/Config.in similarity index 100% rename from package/multimedia/libmpeg2/Config.in rename to package/libmpeg2/Config.in diff --git a/package/libmpeg2/libmpeg2-0.5.1-altivec.patch b/package/libmpeg2/libmpeg2-0.5.1-altivec.patch new file mode 100644 index 0000000000..4928a62e6d --- /dev/null +++ b/package/libmpeg2/libmpeg2-0.5.1-altivec.patch @@ -0,0 +1,23 @@ +[PATCH] fix altivec.h detection + +Patch from Gentoo: + +http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/libmpeg2/files/libmpeg2-0.5.1-altivec.patch?revision=1.1&view=markup + +Signed-off-by: Peter Korsgaard +--- a/configure.ac.bak 2010-05-25 17:12:14.756245990 +0000 ++++ b/configure.ac 2010-05-25 17:11:51.629581723 +0000 +@@ -79,11 +79,10 @@ + CFLAGS="$OPT_CFLAGS $TRY_CFLAGS $CFLAGS" + AC_MSG_CHECKING([if is needed]) + AC_TRY_COMPILE([], +- [typedef vector int t; +- vec_ld(0, (unsigned char *)0);], ++ [vector int t; t = vec_add(t,t);], + [have_altivec=yes; AC_MSG_RESULT(no)], + [AC_TRY_COMPILE([#include ], +- [typedef vector int t; vec_ld(0, (unsigned char *)0);], ++ [vector int t; t = vec_add(t,t);], + [AC_DEFINE([HAVE_ALTIVEC_H],, + [Define to 1 if you have the header.]) + have_altivec=yes; AC_MSG_RESULT(yes)], diff --git a/package/libmpeg2/libmpeg2-0.5.1-armv4l.patch b/package/libmpeg2/libmpeg2-0.5.1-armv4l.patch new file mode 100644 index 0000000000..70d45ef916 --- /dev/null +++ b/package/libmpeg2/libmpeg2-0.5.1-armv4l.patch @@ -0,0 +1,24 @@ +Patch taken from gentoo. + +Signed-off-by: Gustavo Zacarias + +diff -urNp libmpeg2.orig/libmpeg2/motion_comp_arm_s.S libmpeg2/libmpeg2/motion_comp_arm_s.S +--- libmpeg2.orig/libmpeg2/motion_comp_arm_s.S 2008-07-09 21:16:05.000000000 +0200 ++++ libmpeg2/libmpeg2/motion_comp_arm_s.S 2009-11-20 19:55:22.000000000 +0100 +@@ -19,6 +19,16 @@ + @ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + ++@ Data preload is supported only by ARM V5TE and above ++ ++#if (defined (__ARM_ARCH_2__) || defined (__ARM_ARCH_3__) \ ++ || defined (__ARM_ARCH_3M__) || defined (__ARM_ARCH_4__) \ ++ || defined (__ARM_ARCH_4T__) || defined (__ARM_ARCH_5__) \ ++ || defined (__ARM_ARCH_5T__)) ++.macro pld reg ++.endm ++#endif ++ + .text + + @ ---------------------------------------------------------------- diff --git a/package/libmpeg2/libmpeg2.mk b/package/libmpeg2/libmpeg2.mk new file mode 100644 index 0000000000..5364c88505 --- /dev/null +++ b/package/libmpeg2/libmpeg2.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# libmpeg2 +# +################################################################################ + +LIBMPEG2_VERSION = 0.5.1 +LIBMPEG2_SITE = http://libmpeg2.sourceforge.net/files +LIBMPEG2_LICENSE = GPLv2+ +LIBMPEG2_LICENSE_FILES = COPYING +LIBMPEG2_INSTALL_STAGING = YES +LIBMPEG2_AUTORECONF = YES +LIBMPEG2_CONF_OPT = --without-x --disable-directx + +ifeq ($(BR2_PACKAGE_SDL),y) +LIBMPEG2_CONF_ENV += ac_cv_prog_SDLCONFIG=$(STAGING_DIR)/usr/bin/sdl-config +LIBMPEG2_CONF_OPT += --enable-sdl +LIBMPEG2_DEPENDENCIES += sdl +else +LIBMPEG2_CONF_OPT += --disable-sdl +endif + +ifneq ($(BR2_PACKAGE_LIBMPEG2_BINS),y) +define LIBMPEG2_REMOVE_BINS + rm -f $(addprefix $(TARGET_DIR)/usr/bin/,\ + mpeg2dec corrupt_mpeg2 extract_mpeg2) +endef + +LIBMPEG2_POST_INSTALL_TARGET_HOOKS += LIBMPEG2_REMOVE_BINS +endif + +$(eval $(autotools-package)) diff --git a/package/libnetfilter_acct/Config.in b/package/libnetfilter_acct/Config.in new file mode 100644 index 0000000000..a918dac743 --- /dev/null +++ b/package/libnetfilter_acct/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBNETFILTER_ACCT + bool "libnetfilter_acct" + depends on BR2_LARGEFILE + select BR2_PACKAGE_LIBMNL + help + libnetfilter_acct is the userspace library providing interface + to extended accounting infrastructure. + + http://www.netfilter.org/projects/libnetfilter_acct/ + +comment "libnetfilter_acct needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE diff --git a/package/libnetfilter_acct/libnetfilter_acct-01-uclinux.patch b/package/libnetfilter_acct/libnetfilter_acct-01-uclinux.patch new file mode 100644 index 0000000000..070f02cdce --- /dev/null +++ b/package/libnetfilter_acct/libnetfilter_acct-01-uclinux.patch @@ -0,0 +1,26 @@ +From bfcaf00a8c972e2c10412d917f08626eb05079c7 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Tue, 10 Sep 2013 15:32:03 -0300 +Subject: [PATCH] configure: uclinux is also linux + +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index ad1bef8..24a7bb9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -22,7 +22,7 @@ AC_DISABLE_STATIC + LT_INIT + CHECK_GCC_FVISIBILITY + case "$host" in +-*-*-linux*) ;; ++*-*-linux* | *-*-uclinux*) ;; + *) AC_MSG_ERROR([Linux only, dude!]);; + esac + +-- +1.8.1.5 + diff --git a/package/libnetfilter_acct/libnetfilter_acct.mk b/package/libnetfilter_acct/libnetfilter_acct.mk new file mode 100644 index 0000000000..615d46e7ca --- /dev/null +++ b/package/libnetfilter_acct/libnetfilter_acct.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libnetfilter-acct +# +################################################################################ + +LIBNETFILTER_ACCT_VERSION = 1.0.2 +LIBNETFILTER_ACCT_SOURCE = libnetfilter_acct-$(LIBNETFILTER_ACCT_VERSION).tar.bz2 +LIBNETFILTER_ACCT_SITE = http://www.netfilter.org/projects/libnetfilter_acct/files +LIBNETFILTER_ACCT_INSTALL_STAGING = YES +LIBNETFILTER_ACCT_DEPENDENCIES = host-pkgconf libmnl +LIBNETFILTER_ACCT_AUTORECONF = YES +LIBNETFILTER_ACCT_LICENSE = LGPLv2.1+ +LIBNETFILTER_ACCT_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libnetfilter_conntrack/Config.in b/package/libnetfilter_conntrack/Config.in new file mode 100644 index 0000000000..c4a76a2a21 --- /dev/null +++ b/package/libnetfilter_conntrack/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LIBNETFILTER_CONNTRACK + bool "libnetfilter_conntrack" + depends on BR2_LARGEFILE + select BR2_PACKAGE_LIBMNL + select BR2_PACKAGE_LIBNFNETLINK + help + libnetfilter_conntrack is a userspace library providing + a programming interface (API) to the in-kernel + connection tracking state table. + + http://www.netfilter.org/projects/libnetfilter_conntrack/ + +comment "libnetfilter_conntrack needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE diff --git a/package/libnetfilter_conntrack/libnetfilter_conntrack-01-uclinux.patch b/package/libnetfilter_conntrack/libnetfilter_conntrack-01-uclinux.patch new file mode 100644 index 0000000000..ef79a806e8 --- /dev/null +++ b/package/libnetfilter_conntrack/libnetfilter_conntrack-01-uclinux.patch @@ -0,0 +1,26 @@ +From bdf4afdcb68f62fcd05536b8cb68478d3ea31c68 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Tue, 10 Sep 2013 15:46:19 -0300 +Subject: [PATCH] configure: uclinux is also linux + +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 12e1d16..1edfd66 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -19,7 +19,7 @@ AC_PROG_INSTALL + AC_PROG_LN_S + + case "$host" in +-*-*-linux*) ;; ++*-*-linux* | *-*-uclinux*) ;; + *) AC_MSG_ERROR([Linux only, dude!]);; + esac + +-- +1.8.1.5 + diff --git a/package/libnetfilter_conntrack/libnetfilter_conntrack.mk b/package/libnetfilter_conntrack/libnetfilter_conntrack.mk new file mode 100644 index 0000000000..fc3462dee4 --- /dev/null +++ b/package/libnetfilter_conntrack/libnetfilter_conntrack.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libnetfilter-conntrack +# +################################################################################ + +LIBNETFILTER_CONNTRACK_VERSION = 1.0.4 +LIBNETFILTER_CONNTRACK_SOURCE = libnetfilter_conntrack-$(LIBNETFILTER_CONNTRACK_VERSION).tar.bz2 +LIBNETFILTER_CONNTRACK_SITE = http://www.netfilter.org/projects/libnetfilter_conntrack/files +LIBNETFILTER_CONNTRACK_INSTALL_STAGING = YES +LIBNETFILTER_CONNTRACK_DEPENDENCIES = host-pkgconf libnfnetlink libmnl +LIBNETFILTER_CONNTRACK_AUTORECONF = YES +LIBNETFILTER_CONNTRACK_LICENSE = GPLv2+ +LIBNETFILTER_CONNTRACK_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libnetfilter_cthelper/Config.in b/package/libnetfilter_cthelper/Config.in new file mode 100644 index 0000000000..0b808cc4c0 --- /dev/null +++ b/package/libnetfilter_cthelper/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LIBNETFILTER_CTHELPER + bool "libnetfilter_cthelper" + depends on BR2_LARGEFILE + select BR2_PACKAGE_LIBMNL + help + libnetfilter_cthelper is the userspace library that provides + the programming interface to the user-space helper infrastructure + available since Linux kernel 3.6. + + http://www.netfilter.org/projects/libnetfilter_cthelper/ + +comment "libnetfilter_cthelper needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE diff --git a/package/libnetfilter_cthelper/libnetfilter_cthelper-01-uclinux.patch b/package/libnetfilter_cthelper/libnetfilter_cthelper-01-uclinux.patch new file mode 100644 index 0000000000..7a6ca70b53 --- /dev/null +++ b/package/libnetfilter_cthelper/libnetfilter_cthelper-01-uclinux.patch @@ -0,0 +1,26 @@ +From d028334281b218209412ec6e1dba56ca96320bd9 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Tue, 10 Sep 2013 16:08:29 -0300 +Subject: [PATCH] configure: uclinux is also linux + +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index d52b1ce..9389b70 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -22,7 +22,7 @@ AC_DISABLE_STATIC + LT_INIT + CHECK_GCC_FVISIBILITY + case "$host" in +-*-*-linux*) ;; ++*-*-linux* | *-*-uclinux*) ;; + *) AC_MSG_ERROR([Linux only, dude!]);; + esac + +-- +1.8.1.5 + diff --git a/package/libnetfilter_cthelper/libnetfilter_cthelper.mk b/package/libnetfilter_cthelper/libnetfilter_cthelper.mk new file mode 100644 index 0000000000..2cac8a2bc8 --- /dev/null +++ b/package/libnetfilter_cthelper/libnetfilter_cthelper.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libnetfilter-cthelper +# +################################################################################ + +LIBNETFILTER_CTHELPER_VERSION = 1.0.0 +LIBNETFILTER_CTHELPER_SOURCE = libnetfilter_cthelper-$(LIBNETFILTER_CTHELPER_VERSION).tar.bz2 +LIBNETFILTER_CTHELPER_SITE = http://www.netfilter.org/projects/libnetfilter_cthelper/files +LIBNETFILTER_CTHELPER_INSTALL_STAGING = YES +LIBNETFILTER_CTHELPER_DEPENDENCIES = host-pkgconf libmnl +LIBNETFILTER_CTHELPER_AUTORECONF = YES +LIBNETFILTER_CTHELPER_LICENSE = GPLv2+ +LIBNETFILTER_CTHELPER_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libnetfilter_cttimeout/Config.in b/package/libnetfilter_cttimeout/Config.in new file mode 100644 index 0000000000..18e85d3406 --- /dev/null +++ b/package/libnetfilter_cttimeout/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LIBNETFILTER_CTTIMEOUT + bool "libnetfilter_cttimeout" + depends on BR2_LARGEFILE + select BR2_PACKAGE_LIBMNL + help + libnetfilter_cttimeout is the userspace library that provides + the programming interface to the fine-grain + connection tracking timeout infrastructure. + + http://www.netfilter.org/projects/libnetfilter_cttimeout/ + +comment "libnetfilter_cttimout needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE diff --git a/package/libnetfilter_cttimeout/libnetfilter_cttimeout-01-uclinux.patch b/package/libnetfilter_cttimeout/libnetfilter_cttimeout-01-uclinux.patch new file mode 100644 index 0000000000..5d462d8fec --- /dev/null +++ b/package/libnetfilter_cttimeout/libnetfilter_cttimeout-01-uclinux.patch @@ -0,0 +1,26 @@ +From d8d2ec14bc192f998afae2b71c69248e73518ddf Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Tue, 10 Sep 2013 16:09:14 -0300 +Subject: [PATCH] configure: uclinux is also linux + +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index d79e941..aeb6ad0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -22,7 +22,7 @@ AC_DISABLE_STATIC + LT_INIT + CHECK_GCC_FVISIBILITY + case "$host" in +-*-*-linux*) ;; ++*-*-linux* | *-*-uclinux*) ;; + *) AC_MSG_ERROR([Linux only, dude!]);; + esac + +-- +1.8.1.5 + diff --git a/package/libnetfilter_cttimeout/libnetfilter_cttimeout.mk b/package/libnetfilter_cttimeout/libnetfilter_cttimeout.mk new file mode 100644 index 0000000000..cf55255eb8 --- /dev/null +++ b/package/libnetfilter_cttimeout/libnetfilter_cttimeout.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libnetfilter-cttimeout +# +################################################################################ + +LIBNETFILTER_CTTIMEOUT_VERSION = 1.0.0 +LIBNETFILTER_CTTIMEOUT_SOURCE = libnetfilter_cttimeout-$(LIBNETFILTER_CTTIMEOUT_VERSION).tar.bz2 +LIBNETFILTER_CTTIMEOUT_SITE = http://www.netfilter.org/projects/libnetfilter_cttimeout/files +LIBNETFILTER_CTTIMEOUT_INSTALL_STAGING = YES +LIBNETFILTER_CTTIMEOUT_DEPENDENCIES = host-pkgconf libmnl +LIBNETFILTER_CTTIMEOUT_AUTORECONF = YES +LIBNETFILTER_CTTIMEOUT_LICENSE = GPLv2+ +LIBNETFILTER_CTTIMEOUT_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libnetfilter_log/Config.in b/package/libnetfilter_log/Config.in new file mode 100644 index 0000000000..927cd0aae1 --- /dev/null +++ b/package/libnetfilter_log/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBNETFILTER_LOG + bool "libnetfilter_log" + select BR2_PACKAGE_LIBNFNETLINK + help + libnetfilter_log is a userspace library providing interface + to packets that have been logged by the kernel packet filter. + + http://www.netfilter.org/projects/libnetfilter_log/ diff --git a/package/libnetfilter_log/libnetfilter_log-01-uclinux.patch b/package/libnetfilter_log/libnetfilter_log-01-uclinux.patch new file mode 100644 index 0000000000..75d4a1e9d1 --- /dev/null +++ b/package/libnetfilter_log/libnetfilter_log-01-uclinux.patch @@ -0,0 +1,26 @@ +From e36a2377e7ec50f6f675eb41f79edcda6ddebe5c Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Tue, 10 Sep 2013 15:48:50 -0300 +Subject: [PATCH] configure: uclinux is also linux + +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index e6e1317..189a753 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -20,7 +20,7 @@ AC_PROG_INSTALL + AC_PROG_LN_S + + case "$host" in +-*-*-linux*) ;; ++*-*-linux* | *-*-uclinux*) ;; + *) AC_MSG_ERROR([Linux only, dude!]);; + esac + +-- +1.8.1.5 + diff --git a/package/libnetfilter_log/libnetfilter_log.mk b/package/libnetfilter_log/libnetfilter_log.mk new file mode 100644 index 0000000000..1c642d2b7e --- /dev/null +++ b/package/libnetfilter_log/libnetfilter_log.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libnetfilter-log +# +################################################################################ + +LIBNETFILTER_LOG_VERSION = 1.0.1 +LIBNETFILTER_LOG_SOURCE = libnetfilter_log-$(LIBNETFILTER_LOG_VERSION).tar.bz2 +LIBNETFILTER_LOG_SITE = http://www.netfilter.org/projects/libnetfilter_log/files +LIBNETFILTER_LOG_INSTALL_STAGING = YES +LIBNETFILTER_LOG_DEPENDENCIES = host-pkgconf libnfnetlink +LIBNETFILTER_LOG_AUTORECONF = YES +LIBNETFILTER_LOG_LICENSE = GPLv2+ +LIBNETFILTER_LOG_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libnetfilter_queue/Config.in b/package/libnetfilter_queue/Config.in new file mode 100644 index 0000000000..de8c5d3fe8 --- /dev/null +++ b/package/libnetfilter_queue/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_LIBNETFILTER_QUEUE + bool "libnetfilter_queue" + depends on BR2_LARGEFILE + depends on BR2_INET_IPV6 + select BR2_PACKAGE_LIBNFNETLINK + select BR2_PACKAGE_LIBMNL + help + libnetfilter_queue is the userspace library that provides + the programming interface to the fine-grain + connection tracking timeout infrastructure. + + http://www.netfilter.org/projects/libnetfilter_queue/ + +comment "libnetfilter_queue needs a toolchain w/ largefile, IPv6" + depends on !BR2_LARGEFILE && !BR2_INET_IPV6 diff --git a/package/libnetfilter_queue/libnetfilter_queue-01-uclinux.patch b/package/libnetfilter_queue/libnetfilter_queue-01-uclinux.patch new file mode 100644 index 0000000000..21895d9b0e --- /dev/null +++ b/package/libnetfilter_queue/libnetfilter_queue-01-uclinux.patch @@ -0,0 +1,26 @@ +From 311b60655761f6f3c4fe44cf6eff63427283f25e Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Tue, 10 Sep 2013 16:13:58 -0300 +Subject: [PATCH] configure: uclinux is also linux + +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 07747a6..289868f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -21,7 +21,7 @@ AC_PROG_INSTALL + CHECK_GCC_FVISIBILITY + + case "$host" in +-*-*-linux*) ;; ++*-*-linux* | *-*-uclinux*) ;; + *) AC_MSG_ERROR([Linux only, dude!]);; + esac + +-- +1.8.1.5 + diff --git a/package/libnetfilter_queue/libnetfilter_queue.mk b/package/libnetfilter_queue/libnetfilter_queue.mk new file mode 100644 index 0000000000..59a4458dcd --- /dev/null +++ b/package/libnetfilter_queue/libnetfilter_queue.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libnetfilter-queue +# +################################################################################ + +LIBNETFILTER_QUEUE_VERSION = 1.0.2 +LIBNETFILTER_QUEUE_SOURCE = libnetfilter_queue-$(LIBNETFILTER_QUEUE_VERSION).tar.bz2 +LIBNETFILTER_QUEUE_SITE = http://www.netfilter.org/projects/libnetfilter_queue/files +LIBNETFILTER_QUEUE_INSTALL_STAGING = YES +LIBNETFILTER_QUEUE_DEPENDENCIES = host-pkgconf libnfnetlink libmnl +LIBNETFILTER_QUEUE_AUTORECONF = YES +LIBNETFILTER_QUEUE_LICENSE = GPLv2+ +LIBNETFILTER_QUEUE_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libnfc-llcp/Config.in b/package/libnfc-llcp/Config.in new file mode 100644 index 0000000000..f557926715 --- /dev/null +++ b/package/libnfc-llcp/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBNFC_LLCP + bool "libnfc-llcp" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_LIBNFC + help + Library extending libnfc with support for Logical Link Control + Protocol. + + http://code.google.com/p/nfc-tools/source/browse/trunk/libnfc-llcp/ diff --git a/package/libnfc-llcp/libnfc-llcp.mk b/package/libnfc-llcp/libnfc-llcp.mk new file mode 100644 index 0000000000..d410b55a30 --- /dev/null +++ b/package/libnfc-llcp/libnfc-llcp.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libnfc-llcp +# +################################################################################ + +LIBNFC_LLCP_VERSION = 1103 +LIBNFC_LLCP_SITE = http://nfc-tools.googlecode.com/svn/trunk/libnfc-llcp/ +LIBNFC_LLCP_SITE_METHOD = svn +LIBNFC_LLCP_DEPENDENCIES = libnfc +LIBNFC_LLCP_AUTORECONF = YES +LIBNFC_LLCP_AUTORECONF_OPT = --install --force --verbose +LIBNFC_LLCP_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libnfc/Config.in b/package/libnfc/Config.in new file mode 100644 index 0000000000..db2b521cbb --- /dev/null +++ b/package/libnfc/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_LIBNFC + bool "libnfc" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_LIBUSB_COMPAT + help + Public platform independent Near Field Communication (NFC) library. + + http://www.libnfc.org/ + +config BR2_PACKAGE_LIBNFC_EXAMPLES + bool "build libnfc examples" + depends on BR2_PACKAGE_LIBNFC + select BR2_PACKAGE_READLINE + +comment "libnfc needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libnfc/libnfc-build-systems-make-example-build-optional.patch b/package/libnfc/libnfc-build-systems-make-example-build-optional.patch new file mode 100644 index 0000000000..b0ca2201af --- /dev/null +++ b/package/libnfc/libnfc-build-systems-make-example-build-optional.patch @@ -0,0 +1,98 @@ +From 40a4871b171293d98acb40cf54be9ee9b78a3244 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Wed, 6 Jun 2012 00:49:25 +0200 +Subject: [PATCH 1/1] build systems: make example build optional + +This patch makes example build optional for both cmake and autotools build +systems. + +In order to keep the former behavior, example build is enabled by default. + +Signed-off-by: Samuel Martin + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dd7904d..0e35229 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -27,6 +27,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/incl + SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/") + + # Options ++SET(BUILD_EXAMPLES ON CACHE BOOL "Build examples") + SET(LIBNFC_DEBUG_OUTPUT OFF CACHE BOOL "Debug output of communication with the NFC chip") + IF(LIBNFC_DEBUG_OUTPUT) + ADD_DEFINITIONS(-DDEBUG -g3) +@@ -84,7 +85,7 @@ IF(NOT WIN32) + ENDIF(LIBNFC_DRIVER_ACR122) + # CMake lists are separated by a semi colon, replace with colon + STRING(REPLACE ";" "," PKG_CONFIG_REQUIRES "${PKG_REQ}") +- CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libnfc.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libnfc.pc @ONLY) ++ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libnfc.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libnfc.pc @ONLY) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libnfc.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + ENDIF(NOT WIN32) + +@@ -101,7 +102,10 @@ ENDIF(LIBUSB_INCLUDE_DIRS) + ADD_SUBDIRECTORY(libnfc) + ADD_SUBDIRECTORY(include) + ADD_SUBDIRECTORY(utils) +-ADD_SUBDIRECTORY(examples) ++ ++IF(BUILD_EXAMPLES) ++ ADD_SUBDIRECTORY(examples) ++ENDIF(BUILD_EXAMPLES) + + # Binary Package + IF(WIN32) +diff --git a/Makefile.am b/Makefile.am +index 3671cb6..59fd75a 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -2,7 +2,13 @@ ACLOCAL_AMFLAGS = -I m4 + + AM_CFLAGS = $(LIBNFC_CFLAGS) + +-SUBDIRS = libnfc utils examples include contrib cmake test ++SUBDIRS = libnfc utils ++ ++if EXAMPLE_ENABLED ++SUBDIRS += examples ++endif ++ ++SUBDIRS += include contrib cmake test + + pkgconfigdir = $(libdir)/pkgconfig + pkgconfig_DATA = libnfc.pc +diff --git a/configure.ac b/configure.ac +index 0a222a8..6988164 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -111,6 +111,14 @@ then + fi + AM_CONDITIONAL(DOC_ENABLED, [test x"$enable_doc" = xyes]) + ++# Example build (default: yes) ++AC_ARG_ENABLE([example],AS_HELP_STRING([--enable-example],[Enable example build.]),[enable_example=$enableval],[enable_example="yes"]) ++ ++AC_MSG_CHECKING(for example build) ++AC_MSG_RESULT($enable_example) ++ ++AM_CONDITIONAL(EXAMPLE_ENABLED, [test x"$enable_example" = xyes]) ++ + # Dependencies + PKG_CONFIG_REQUIRES="" + +@@ -129,7 +137,11 @@ if test x$ac_cv_with_cutter = xyes -a x$ac_cv_use_cutter = xno; then + fi + AM_CONDITIONAL([WITH_CUTTER], [test "$ac_cv_use_cutter" != "no"]) + ++ ++if test x"$enable_example" = "xyes" ++then + AC_CHECK_READLINE ++fi + + # Help us to write great code ;-) + CFLAGS="$CFLAGS -Wall -pedantic -Wextra" +-- +1.7.10.3 + diff --git a/package/libnfc/libnfc.mk b/package/libnfc/libnfc.mk new file mode 100644 index 0000000000..50bfcd5fe4 --- /dev/null +++ b/package/libnfc/libnfc.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# libnfc +# +################################################################################ + +LIBNFC_VERSION = fda8d60ce062409bb32c76a229f02f7502948ce8 +LIBNFC_SITE = http://libnfc.googlecode.com/git/ +LIBNFC_SITE_METHOD = git +LIBNFC_LICENSE = LGPLv3+ +LIBNFC_LICENSE_FILES = COPYING +LIBNFC_AUTORECONF = YES +LIBNFC_INSTALL_STAGING = YES + +LIBNFC_DEPENDENCIES = host-pkgconf libusb libusb-compat + +# N.B. The acr122 driver requires pcsc-lite. +LIBNFC_CONF_OPT = --with-drivers=arygon,pn53x_usb + +ifeq ($(BR2_PACKAGE_LIBNFC_EXAMPLES),y) +LIBNFC_CONF_OPT += --enable-example +LIBNFC_DEPENDENCIES += readline +else +LIBNFC_CONF_OPT += --disable-example +endif + +$(eval $(autotools-package)) diff --git a/package/libnfnetlink/Config.in b/package/libnfnetlink/Config.in new file mode 100644 index 0000000000..fa247c5957 --- /dev/null +++ b/package/libnfnetlink/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBNFNETLINK + bool "libnfnetlink" + help + libnfnetlink is the low-level library for netfilter related + kernel/userspace communication. + It provides a generic messaging infrastructure for in-kernel + netfilter subsystems (such as nfnetlink_log, nfnetlink_queue, + nfnetlink_conntrack) and their respective users + and/or management tools in userspace. + + http://www.netfilter.org/projects/libnfnetlink/ diff --git a/package/libnfnetlink/libnfnetlink-01-uclinux.patch b/package/libnfnetlink/libnfnetlink-01-uclinux.patch new file mode 100644 index 0000000000..b15201283a --- /dev/null +++ b/package/libnfnetlink/libnfnetlink-01-uclinux.patch @@ -0,0 +1,26 @@ +From 8e5a9d8f32c9646d01d8c84e979892dfd28a7f7c Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Tue, 10 Sep 2013 15:35:22 -0300 +Subject: [PATCH] configure: uclinux is also linux + +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 0926a1c..b979772 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -18,7 +18,7 @@ AC_DISABLE_STATIC + AM_PROG_LIBTOOL + + case "$host" in +-*-*-linux*) ;; ++*-*-linux* | *-*-uclinux*) ;; + *) AC_MSG_ERROR([Linux only, dude!]);; + esac + +-- +1.8.1.5 + diff --git a/package/libnfnetlink/libnfnetlink.mk b/package/libnfnetlink/libnfnetlink.mk new file mode 100644 index 0000000000..6f69a81a98 --- /dev/null +++ b/package/libnfnetlink/libnfnetlink.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libnfnetlink +# +################################################################################ + +LIBNFNETLINK_VERSION = 1.0.1 +LIBNFNETLINK_SOURCE = libnfnetlink-$(LIBNFNETLINK_VERSION).tar.bz2 +LIBNFNETLINK_SITE = http://www.netfilter.org/projects/libnfnetlink/files +LIBNFNETLINK_AUTORECONF = YES +LIBNFNETLINK_INSTALL_STAGING = YES +LIBNFNETLINK_LICENSE = GPLv2 +LIBNFNETLINK_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libnl/Config.in b/package/libnl/Config.in index 24e481361c..11732789fd 100644 --- a/package/libnl/Config.in +++ b/package/libnl/Config.in @@ -1,6 +1,24 @@ config BR2_PACKAGE_LIBNL bool "libnl" + depends on BR2_TOOLCHAIN_HAS_THREADS help A library for applications dealing with netlink socket. http://people.suug.ch/~tgr/libnl/ + +comment "libnl needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +if BR2_PACKAGE_LIBNL + +config BR2_PACKAGE_LIBNL_TOOLS + bool "install tools" + # uses + depends on !BR2_PREFER_STATIC_LIB + help + Install binary tools. + +comment "libnl tools need a toolchain w/ dynamic library" + depends on BR2_PREFER_STATIC_LIB + +endif diff --git a/package/libnl/libnl.mk b/package/libnl/libnl.mk index 767e957e5f..3b56bc87ba 100644 --- a/package/libnl/libnl.mk +++ b/package/libnl/libnl.mk @@ -1,16 +1,20 @@ -############################################################# +################################################################################ # # libnl # -############################################################# +################################################################################ -LIBNL_VERSION = 3.0 -LIBNL_SOURCE = libnl-$(LIBNL_VERSION).tar.gz -LIBNL_SITE = http://www.infradead.org/~tgr/libnl/files/ +LIBNL_VERSION = 3.2.21 +LIBNL_SITE = http://www.infradead.org/~tgr/libnl/files +LIBNL_LICENSE = LGPLv2.1+ +LIBNL_LICENSE_FILES = COPYING LIBNL_INSTALL_STAGING = YES +LIBNL_DEPENDENCIES = host-bison host-flex -define LIBNL_UNINSTALL_TARGET_CMDS - rm -f $(TARGET_DIR)/usr/lib/libnl.so* -endef +ifeq ($(BR2_PACKAGE_LIBNL_TOOLS),y) +LIBNL_CONF_OPT += --enable-cli +else +LIBNL_CONF_OPT += --disable-cli +endif -$(eval $(call AUTOTARGETS,package,libnl)) +$(eval $(autotools-package)) diff --git a/package/libnspr/Config.in b/package/libnspr/Config.in new file mode 100644 index 0000000000..1d732873d7 --- /dev/null +++ b/package/libnspr/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT + def_bool y + depends on !BR2_arc && !BR2_xtensa && !BR2_bfin + +config BR2_PACKAGE_LIBNSPR + bool "libnspr" + depends on BR2_LARGEFILE + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT + help + NSPR is the Netscape Portable Runtime library which provides + a platform-neutral API for system level and libc like + functions. The library is used by the Mozilla project as well + as others. + + http://www.mozilla.org/projects/nspr/ + +comment "libnspr needs a toolchain w/ largefile, threads" + depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT + depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libnspr/libnspr-nios2.patch b/package/libnspr/libnspr-nios2.patch new file mode 100644 index 0000000000..cffb2ef499 --- /dev/null +++ b/package/libnspr/libnspr-nios2.patch @@ -0,0 +1,71 @@ +Add Nios-II support + +Signed-off-by: Ezequiel Garcia + +diff -Naur libnspr-4.9.6-ori/mozilla/nsprpub/pr/include/md/_linux.cfg libnspr-4.9.6/mozilla/nsprpub/pr/include/md/_linux.cfg +--- libnspr-4.9.6-ori/mozilla/nsprpub/pr/include/md/_linux.cfg 2013-11-10 21:15:04.556139100 -0300 ++++ libnspr-4.9.6/mozilla/nsprpub/pr/include/md/_linux.cfg 2013-11-10 21:15:29.332138283 -0300 +@@ -914,6 +914,51 @@ + #define PR_BYTES_PER_WORD_LOG2 2 + #define PR_BYTES_PER_DWORD_LOG2 3 + ++#elif defined(nios2) ++ ++#define IS_LITTLE_ENDIAN 1 ++#undef IS_BIG_ENDIAN ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 4 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 4 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 32 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 32 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 5 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 5 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 4 ++#define PR_ALIGN_OF_INT64 4 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 4 ++#define PR_ALIGN_OF_POINTER 4 ++#define PR_ALIGN_OF_WORD 4 ++ ++#define PR_BYTES_PER_WORD_LOG2 2 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ + #else + + #error "Unknown CPU architecture" +diff -Naur libnspr-4.9.6-ori/mozilla/nsprpub/pr/include/md/_linux.h libnspr-4.9.6/mozilla/nsprpub/pr/include/md/_linux.h +--- libnspr-4.9.6-ori/mozilla/nsprpub/pr/include/md/_linux.h 2013-11-10 21:15:04.556139100 -0300 ++++ libnspr-4.9.6/mozilla/nsprpub/pr/include/md/_linux.h 2013-11-10 21:15:33.245138154 -0300 +@@ -55,6 +55,8 @@ + #define _PR_SI_ARCHITECTURE "avr32" + #elif defined(__m32r__) + #define _PR_SI_ARCHITECTURE "m32r" ++#elif defined(nios2) ++#define _PR_SI_ARCHITECTURE "nios2" + #else + #error "Unknown CPU architecture" + #endif diff --git a/package/libnspr/libnspr.mk b/package/libnspr/libnspr.mk new file mode 100644 index 0000000000..5aa9bdceb4 --- /dev/null +++ b/package/libnspr/libnspr.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# libnspr +# +################################################################################ + +LIBNSPR_VERSION = 4.9.6 +LIBNSPR_SOURCE = nspr-$(LIBNSPR_VERSION).tar.gz +LIBNSPR_SITE = https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v$(LIBNSPR_VERSION)/src/ +LIBNSPR_SUBDIR = mozilla/nsprpub +LIBNSPR_INSTALL_STAGING = YES +LIBNSPR_CONFIG_SCRIPTS = nspr-config +LIBNSPR_LICENSE = MPLv2.0 +LIBNSPR_LICENSE_FILES = mozilla/nsprpub/LICENSE + +# Set the host CFLAGS and LDFLAGS so NSPR does not guess wrongly +LIBNSPR_CONF_ENV = HOST_CFLAGS="-g -O2" \ + HOST_LDFLAGS="-lc" +# NSPR mixes up --build and --host +LIBNSPR_CONF_OPT = --host=$(GNU_HOST_NAME) +LIBNSPR_CONF_OPT += --$(if $(BR2_ARCH_IS_64),en,dis)able-64bit +LIBNSPR_CONF_OPT += --$(if $(BR2_INET_IPV6),en,dis)able-ipv6 + +ifeq ($(BR2_arm),y) +ifeq ($(BR2_cortex_a8)$(BR2_cortex_a9),y) +LIBNSPR_CONF_OPT += --enable-thumb2 +else +LIBNSPR_CONF_OPT += --disable-thumb2 +endif +endif + +$(eval $(autotools-package)) diff --git a/package/libnss/Config.in b/package/libnss/Config.in new file mode 100644 index 0000000000..77128f6f6b --- /dev/null +++ b/package/libnss/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_LIBNSS + bool "libnss" + select BR2_PACKAGE_LIBNSPR + select BR2_PACKAGE_SQLITE + select BR2_PACKAGE_ZLIB + depends on BR2_LARGEFILE + depends on BR2_TOOLCHAIN_HAS_THREADS # libnspr + depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT # libnspr + help + Network Security Services (NSS) is a set of libraries designed + to support development of security-enabled client and server + applications. Applications built with NSS can support SSL v2 + and v3, TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, + and X.509 v3 certificates. + + http://www.mozilla.org/projects/security/pki/nss/ + +comment "libnss needs a toolchain w/ largefile, threads" + depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT + depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS + diff --git a/package/libnss/libnss-cross.patch b/package/libnss/libnss-cross.patch new file mode 100644 index 0000000000..8a5cd102ab --- /dev/null +++ b/package/libnss/libnss-cross.patch @@ -0,0 +1,27 @@ + +This patch allows us to set a value for the cross compiler via TARGETCC without +setting CC on the command line. CC is used for host tools as well as cross +compiled code so we cannot define it on the command line without breaking +the host tools build. + +Signed-off-by: Will Newton + +--- libnss-3.12.9.old/mozilla/security/coreconf/Linux.mk 2011-03-01 10:31:21.517847183 +0000 ++++ libnss-3.12.9/mozilla/security/coreconf/Linux.mk 2011-03-01 10:33:42.688648237 +0000 +@@ -46,9 +46,13 @@ + IMPL_STRATEGY = _PTH + endif + +-CC = gcc +-CCC = g++ +-RANLIB = ranlib ++TARGETCC = gcc ++TARGETCCC = g++ ++TARGETRANLIB = ranlib ++ ++CC = $(TARGETCC) ++CCC = $(TARGETCCC) ++RANLIB = $(TARGETRANLIB) + + DEFAULT_COMPILER = gcc + diff --git a/package/libnss/libnss-uclibc.patch b/package/libnss/libnss-uclibc.patch new file mode 100644 index 0000000000..17e8080840 --- /dev/null +++ b/package/libnss/libnss-uclibc.patch @@ -0,0 +1,19 @@ + +uCLibc does not define RTLD_NOLOAD. + +Signed-off-by: Will Newton + +--- nss-3.12.9.old/mozilla/security/nss/lib/freebl/stubs.c 2011-07-08 13:32:54.964338355 +0100 ++++ nss-3.12.9/mozilla/security/nss/lib/freebl/stubs.c 2011-07-08 13:33:57.255337490 +0100 +@@ -535,6 +535,11 @@ + return SECSuccess; + } + ++/* uClibc does not define RTLD_NOLOAD. */ ++#ifndef RTLD_NOLOAD ++#define RTLD_NOLOAD 0 ++#endif ++ + /* + * fetch the library if it's loaded. For NSS it should already be loaded + */ diff --git a/package/libnss/libnss.mk b/package/libnss/libnss.mk new file mode 100644 index 0000000000..002e083e54 --- /dev/null +++ b/package/libnss/libnss.mk @@ -0,0 +1,86 @@ +################################################################################ +# +# libnss +# +################################################################################ + +LIBNSS_VERSION = 3.14.5 +LIBNSS_SOURCE = nss-$(LIBNSS_VERSION).tar.gz +LIBNSS_SITE_VERSION = $(subst .,_,$(LIBNSS_VERSION)) +LIBNSS_SITE = https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_$(LIBNSS_SITE_VERSION)_RTM/src +LIBNSS_SUBDIR = mozilla/security +LIBNSS_DISTDIR = mozilla/dist +LIBNSS_INSTALL_STAGING = YES +LIBNSS_DEPENDENCIES = libnspr sqlite zlib +LIBNSS_LICENSE = MPLv2.0 +LIBNSS_LICENSE_FILES = mozilla/security/nss/COPYING + +LIBNSS_BUILD_VARS = MOZILLA_CLIENT=1 \ + NSPR_INCLUDE_DIR=$(STAGING_DIR)/usr/include/nspr \ + NSPR_LIB_DIR=$(STAGING_DIR)/usr/lib \ + BUILD_OPT=1 \ + NS_USE_GCC=1 \ + NSS_USE_SYSTEM_SQLITE=1 \ + NSS_ENABLE_ECC=1 \ + NATIVE_CC="$(HOSTCC)" \ + TARGETCC="$(TARGET_CC)" \ + TARGETCCC="$(TARGET_CXX)" \ + TARGETRANLIB="$(TARGET_RANLIB)" \ + OS_ARCH="Linux" \ + OS_RELEASE="2.6" \ + OS_TEST="$(ARCH)" + +ifeq ($(BR2_ARCH_IS_64),y) +LIBNSS_BUILD_VARS += USE_64=1 +endif + + +define LIBNSS_BUILD_CMDS + $(MAKE1) -C $(@D)/$(LIBNSS_SUBDIR)/nss build_coreconf \ + SOURCE_MD_DIR=$(@D)/$(LIBNSS_DISTDIR) \ + DIST=$(@D)/$(LIBNSS_DISTDIR) \ + CHECKLOC= \ + $(LIBNSS_BUILD_VARS) + $(MAKE1) -C $(@D)/$(LIBNSS_SUBDIR)/nss build_dbm all \ + SOURCE_MD_DIR=$(@D)/$(LIBNSS_DISTDIR) \ + DIST=$(@D)/$(LIBNSS_DISTDIR) \ + CHECKLOC= \ + $(LIBNSS_BUILD_VARS) OPTIMIZER="$(TARGET_CFLAGS)" +endef + +define LIBNSS_INSTALL_STAGING_CMDS + $(INSTALL) -m 755 -t $(STAGING_DIR)/usr/lib/ \ + $(@D)/$(LIBNSS_DISTDIR)/lib/*.so + $(INSTALL) -m 755 -d $(STAGING_DIR)/usr/include/nss + $(INSTALL) -m 644 -t $(STAGING_DIR)/usr/include/nss \ + $(@D)/$(LIBNSS_DISTDIR)/public/nss/* + $(INSTALL) -m 755 -t $(STAGING_DIR)/usr/lib/ \ + $(@D)/$(LIBNSS_DISTDIR)/lib/*.a + $(INSTALL) -D -m 0644 $(TOPDIR)/package/libnss/nss.pc.in \ + $(STAGING_DIR)/usr/lib/pkgconfig/nss.pc + $(SED) 's/@VERSION@/$(LIBNSS_VERSION)/g;' \ + $(STAGING_DIR)/usr/lib/pkgconfig/nss.pc +endef + +define LIBNSS_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 -t $(TARGET_DIR)/usr/lib/ \ + $(@D)/$(LIBNSS_DISTDIR)/lib/*.so + $(INSTALL) -m 755 -d $(TARGET_DIR)/usr/include/nss + $(INSTALL) -m 644 -t $(TARGET_DIR)/usr/include/nss \ + $(@D)/$(LIBNSS_DISTDIR)/public/nss/* + $(INSTALL) -m 755 -t $(TARGET_DIR)/usr/lib/ \ + $(@D)/$(LIBNSS_DISTDIR)/lib/*.a + $(INSTALL) -D -m 0644 $(TOPDIR)/package/libnss/nss.pc.in \ + $(TARGET_DIR)/usr/lib/pkgconfig/nss.pc + $(SED) 's/@VERSION@/$(LIBNSS_VERSION)/g;' \ + $(TARGET_DIR)/usr/lib/pkgconfig/nss.pc +endef + +define LIBNSS_CLEAN_CMDS + -$(MAKE1) -C $(@D)/$(LIBNSS_SUBDIR) clobber \ + clobber_dbm \ + clobber_coreconf \ + BUILD_OPT=1 +endef + +$(eval $(generic-package)) diff --git a/package/libnss/nss.pc.in b/package/libnss/nss.pc.in new file mode 100644 index 0000000000..e27783f64d --- /dev/null +++ b/package/libnss/nss.pc.in @@ -0,0 +1,11 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include/nss + +Name: NSS +Description: Mozilla Network Security Services +Version: @VERSION@ +Requires: nspr +Libs: -L${libdir} -lnss3 -lnssutil3 -lsmime3 -lssl3 +Cflags: -I${includedir} diff --git a/package/liboauth/Config.in b/package/liboauth/Config.in new file mode 100644 index 0000000000..77a78f115a --- /dev/null +++ b/package/liboauth/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBOAUTH + bool "liboauth" + select BR2_PACKAGE_OPENSSL + help + liboauth is a collection of c functions implementing the oAuth + Core 1.0 Rev A standard API. liboauth provides basic functions to + escape and encode parameters according to oAuth specs and offers + high-level functions to sign requests or verify signatures. + + http://liboauth.sourceforge.net/ diff --git a/package/liboauth/liboauth.mk b/package/liboauth/liboauth.mk new file mode 100644 index 0000000000..6ade85640b --- /dev/null +++ b/package/liboauth/liboauth.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# liboauth +# +################################################################################ + +LIBOAUTH_VERSION = 0.9.6 +LIBOAUTH_SITE = http://liboauth.sourceforge.net/pool +LIBOAUTH_INSTALL_STAGING = YES + +LIBOAUTH_DEPENDENCIES += host-pkgconf openssl + +ifeq ($(BR2_PACKAGE_LIBCURL),y) +LIBOAUTH_DEPENDENCIES += libcurl +else +LIBOAUTH_CONF_OPT += --disable-libcurl +endif + +$(eval $(autotools-package)) diff --git a/package/libogg/Config.in b/package/libogg/Config.in new file mode 100644 index 0000000000..bf719ff4d7 --- /dev/null +++ b/package/libogg/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBOGG + bool "libogg" + help + Ogg is a multimedia container format, and the native file + and stream format for the Xiph.org multimedia codecs. As + with all Xiph.org technology is it an open format free for + anyone to use. + + http://xiph.org/ogg/ diff --git a/package/libogg/libogg.mk b/package/libogg/libogg.mk new file mode 100644 index 0000000000..23554d9d68 --- /dev/null +++ b/package/libogg/libogg.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libogg +# +################################################################################ + +LIBOGG_VERSION = 1.3.0 +LIBOGG_SOURCE = libogg-$(LIBOGG_VERSION).tar.xz +LIBOGG_SITE = http://downloads.xiph.org/releases/ogg +LIBOGG_LICENSE = BSD-3c +LIBOGG_LICENSE_FILES = COPYING + +LIBOGG_INSTALL_STAGING = YES +LIBOGG_DEPENDENCIES = host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/liboil/Config.in b/package/liboil/Config.in deleted file mode 100644 index 0acbbfc13e..0000000000 --- a/package/liboil/Config.in +++ /dev/null @@ -1,6 +0,0 @@ -config BR2_PACKAGE_LIBOIL - bool "liboil" - help - Library of simple functions that are optimized for various CPUs. - - http://liboil.freedesktop.org/ diff --git a/package/liboil/liboil-0.3.15-arm-vfp.patch b/package/liboil/liboil-0.3.15-arm-vfp.patch deleted file mode 100644 index 815c9bb9a6..0000000000 --- a/package/liboil/liboil-0.3.15-arm-vfp.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index 06a0ac9..b8d1640 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -158,7 +158,10 @@ if test x$HAVE_GCC_ASM = xyes -a x$HAVE_POWERPC = xyes ; then - true) - fi - --if test x$HAVE_GCC_ASM = xyes -a x$HAVE_ARM = xyes ; then -+AC_ARG_ENABLE(vfp, -+ AC_HELP_STRING([--enable-vfp],[compile with Vector Floating-point unit support]), -+ enable_vfp=$enableval,enable_vfp=yes) -+if test "x$enable-vfp" = xyes -a x$HAVE_GCC_ASM = xyes -a x$HAVE_ARM = xyes; then - AS_COMPILER_FLAG(["-Wa,-mfpu=vfp"], - [LIBOIL_CFLAGS="$LIBOIL_CFLAGS -mfpu=vfp"], - true) diff --git a/package/liboil/liboil-0.3.15-fixes-arm-softfloat-build.patch.arm b/package/liboil/liboil-0.3.15-fixes-arm-softfloat-build.patch.arm deleted file mode 100644 index c9a2be30d3..0000000000 --- a/package/liboil/liboil-0.3.15-fixes-arm-softfloat-build.patch.arm +++ /dev/null @@ -1,39 +0,0 @@ -Patch generated from: -http://cgit.freedesktop.org/liboil/commit/?id=227782d45d14ca0d68ee73b54eab71c1582dcbfa - -From 227782d45d14ca0d68ee73b54eab71c1582dcbfa Mon Sep 17 00:00:00 2001 -From: Adrian Bunk -Date: Wed, 09 Sep 2009 13:31:40 +0000 -Subject: fix ARM -mfloat-abi=soft builds - -If __SOFTFP__ is defined, VFP support is not available -even when __VFP_FP__ is defined. ---- -diff --git a/liboil/arm/math_vfp.c b/liboil/arm/math_vfp.c -index ffd3981..0bed96e 100644 ---- a/liboil/arm/math_vfp.c -+++ b/liboil/arm/math_vfp.c -@@ -30,7 +30,7 @@ - #include - #include - --#if __VFP_FP__ -+#if defined(__VFP_FP__) && !defined(__SOFTFP__) - - extern void vfp_add_f32 (float *d, const float *s1, const float *s2, int n); - extern void vfp_add_f64 (double *d, const double *s1, const double *s2, int n); -diff --git a/liboil/arm/math_vfp_asm.S b/liboil/arm/math_vfp_asm.S -index ea68dba..ae5c803 100644 ---- a/liboil/arm/math_vfp_asm.S -+++ b/liboil/arm/math_vfp_asm.S -@@ -24,7 +24,7 @@ - * SUCH DAMAGE. - */ - --#if __VFP_FP__ -+#if defined(__VFP_FP__) && !defined(__SOFTFP__) - /* - ** compile with -mcpu=arm1136j-s -mfpu=vfp -mfloat-abi=softfp - ** --- -cgit v0.8.3-6-g21f6 diff --git a/package/liboil/liboil-0.3.15-no-examples.patch b/package/liboil/liboil-0.3.15-no-examples.patch deleted file mode 100644 index a79b5e7503..0000000000 --- a/package/liboil/liboil-0.3.15-no-examples.patch +++ /dev/null @@ -1,34 +0,0 @@ -[patch] liboil: don't build examples - -Signed-off-by: Peter Korsgaard ---- - Makefile.am | 2 +- - Makefile.in | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -Index: liboil-0.3.15/Makefile.am -=================================================================== ---- liboil-0.3.15.orig/Makefile.am -+++ liboil-0.3.15/Makefile.am -@@ -1,7 +1,7 @@ - - AUTOMAKE_OPTIONS = foreign - --SUBDIRS = liboil testsuite examples doc -+SUBDIRS = liboil testsuite doc - - EXTRA_DIST = COPYING autogen.sh gtk-doc.make HACKING BUG-REPORTING - -Index: liboil-0.3.15/Makefile.in -=================================================================== ---- liboil-0.3.15.orig/Makefile.in -+++ liboil-0.3.15/Makefile.in -@@ -259,7 +259,7 @@ - sysconfdir = @sysconfdir@ - target_alias = @target_alias@ - AUTOMAKE_OPTIONS = foreign --SUBDIRS = liboil testsuite examples doc -+SUBDIRS = liboil testsuite doc - EXTRA_DIST = COPYING autogen.sh gtk-doc.make HACKING BUG-REPORTING - DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc - pkgconfig_DATA = liboil-$(LIBOIL_MAJORMINOR).pc diff --git a/package/liboil/liboil.mk b/package/liboil/liboil.mk deleted file mode 100644 index 4350c0fd77..0000000000 --- a/package/liboil/liboil.mk +++ /dev/null @@ -1,41 +0,0 @@ -############################################################# -# -# liboil -# -############################################################# -LIBOIL_VERSION = 0.3.15 -LIBOIL_SOURCE = liboil-$(LIBOIL_VERSION).tar.gz -LIBOIL_SITE = http://liboil.freedesktop.org/download -LIBOIL_AUTORECONF = YES -LIBOIL_INSTALL_STAGING = YES -LIBOIL_INSTALL_TARGET = YES - -# Checking if unaligned memory access works correctly cannot be done when cross -# compiling. For the following architectures there is no information available -# in the configure script. -ifeq ($(BR2_avr32),y) -LIBOIL_CONF_ENV = as_cv_unaligned_access=no -endif -ifeq ($(BR2_x86_64),y) -LIBOIL_CONF_ENV = as_cv_unaligned_access=yes -endif - -LIBOIL_CONF_OPT+=--with-gnu-ld - -ifeq ($(BR2_PACKAGE_LIBGLIB2),y) -LIBOIL_GLIB_DEP = libglib2 -endif - -ifeq ($(BR2_VFP_FLOAT),y) -LIBOIL_CONF_OPT+=--enable-vfp -endif - -LIBOIL_DEPENDENCIES = $(LIBOIL_GLIB_DEP) - -define LIBOIL_TARGET_CLEANUP - rm -f $(TARGET_DIR)/usr/bin/oil-bugreport -endef - -LIBOIL_POST_INSTALL_TARGET_HOOKS += LIBOIL_TARGET_CLEANUP - -$(eval $(call AUTOTARGETS,package,liboil)) diff --git a/package/liboping/Config.in b/package/liboping/Config.in new file mode 100644 index 0000000000..ffdebbd988 --- /dev/null +++ b/package/liboping/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBOPING + bool "liboping" + depends on BR2_INET_IPV6 + help + liboping is a C library to generate ICMP echo requests, + better known as "ping packets". + + http://verplant.org/liboping/ + +comment "liboping needs a toolchain w/ IPv6" + depends on !BR2_INET_IPV6 diff --git a/package/liboping/liboping.mk b/package/liboping/liboping.mk new file mode 100644 index 0000000000..dea41873a8 --- /dev/null +++ b/package/liboping/liboping.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# liboping +# +################################################################################ + +LIBOPING_VERSION = 1.6.2 +LIBOPING_SITE = http://verplant.org/liboping/files +LIBOPING_INSTALL_STAGING = YES +LIBOPING_DEPENDENCIES = $(if $(BR2_PACKAGE_NCURSES),ncurses) +LIBOPING_CONF_OPT = --without-perl-bindings +LIBOPING_LICENSE = LGPLv2.1+ GPLv2 +LIBOPING_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libosip2/Config.in b/package/libosip2/Config.in index 1b248a0c92..be5de2d36a 100644 --- a/package/libosip2/Config.in +++ b/package/libosip2/Config.in @@ -7,3 +7,5 @@ config BR2_PACKAGE_LIBOSIP2 control SIP based sessions in their applications. SIP is a open standard replacement from IETF for H323. + http://www.gnu.org/software/osip/ + diff --git a/package/libosip2/libosip2.mk b/package/libosip2/libosip2.mk index aa15332c9f..0b672d86d2 100644 --- a/package/libosip2/libosip2.mk +++ b/package/libosip2/libosip2.mk @@ -1,26 +1,21 @@ -############################################################# +################################################################################ # # libosip2 # -############################################################# -LIBOSIP2_VERSION = 3.3.0 -LIBOSIP2_SOURCE = libosip2_$(LIBOSIP2_VERSION).orig.tar.gz -LIBOSIP2_PATCH = libosip2_$(LIBOSIP2_VERSION)-1.diff.gz -LIBOSIP2_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/libo/libosip2 +################################################################################ + +LIBOSIP2_VERSION = 3.6.0 +LIBOSIP2_SITE = $(BR2_GNU_MIRROR)/osip LIBOSIP2_INSTALL_STAGING = YES +LIBOSIP2_LICENSE = LGPLv2.1+ +LIBOSIP2_LICENSE_FILES = COPYING -ifneq ($(LIBOSIP2_PATCH),) -define LIBOSIP2_DEBIAN_PATCHES - if [ -d $(@D)/debian/patches ]; then \ - (cd $(@D)/debian/patches && for i in *; \ - do $(SED) 's,^\+\+\+ .*cvs-$(LIBOSIP2_VERSION)/,+++ cvs-$(LIBOSIP2_VERSION)/,' $$i; \ - done; \ - ); \ - toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches \*; \ - fi -endef +ifeq ($(BR2_arc),y) +# toolchain __arc__ define conflicts with libosip2 source +LIBOSIP2_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -U__arc__" endif -LIBOSIP2_POST_PATCH_HOOKS += LIBOSIP2_DEBIAN_PATCHES +LIBOSIP2_CONF_OPT = \ + --enable-mt=$(if $(BR2_TOOLCHAIN_HAS_THREADS),yes,no) -$(eval $(call AUTOTARGETS,package,libosip2)) +$(eval $(autotools-package)) diff --git a/package/libpcap/libpcap-remove-libnl-include-path.patch b/package/libpcap/libpcap-remove-libnl-include-path.patch new file mode 100644 index 0000000000..7b7106b53d --- /dev/null +++ b/package/libpcap/libpcap-remove-libnl-include-path.patch @@ -0,0 +1,16 @@ +Remove hardcoded path to libnl3 include directory + +Signed-off-by: Thomas Petazzoni + +Index: b/configure.in +=================================================================== +--- a/configure.in ++++ b/configure.in +@@ -445,7 +445,6 @@ + AC_DEFINE(HAVE_LIBNL_3_x,1,[if libnl exists and is version 3.x]) + AC_DEFINE(HAVE_LIBNL_NLE,1,[libnl has NLE_FAILURE]) + AC_DEFINE(HAVE_LIBNL_SOCKETS,1,[libnl has new-style socket api]) +- V_INCLS="$V_INCLS -I/usr/include/libnl3" + have_any_nl="yes" + ]) + diff --git a/package/libpcap/libpcap.mk b/package/libpcap/libpcap.mk index a2d0376b7d..ec4d346efb 100644 --- a/package/libpcap/libpcap.mk +++ b/package/libpcap/libpcap.mk @@ -1,21 +1,42 @@ -############################################################# +################################################################################ # # libpcap # -############################################################# +################################################################################ -LIBPCAP_VERSION:=1.1.1 -LIBPCAP_SITE:=http://www.tcpdump.org/release -LIBPCAP_SOURCE:=libpcap-$(LIBPCAP_VERSION).tar.gz -LIBPCAP_INSTALL_STAGING:=YES -# doesn't have an install-strip -LIBPCAP_INSTALL_TARGET_OPT= DESTDIR="$(TARGET_DIR)" \ - $(if $(BR2_PREFER_STATIC_LIB),install,install-shared) -LIBPCAP_INSTALL_STAGING_OPT= DESTDIR="$(STAGING_DIR)" install \ - $(if $(BR2_PREFER_STATIC_LIB),,install-shared) -LIBPCAP_DEPENDENCIES:=zlib -LIBPCAP_CONF_ENV:=ac_cv_linux_vers=2 \ - ac_cv_header_linux_wireless_h=yes # configure misdetects this -LIBPCAP_CONF_OPT:=--disable-yydebug --with-pcap=linux +LIBPCAP_VERSION = 1.4.0 +LIBPCAP_SITE = http://www.tcpdump.org/release +LIBPCAP_LICENSE = BSD-3c +LIBPCAP_LICENSE_FILES = LICENSE +LIBPCAP_INSTALL_STAGING = YES +LIBPCAP_DEPENDENCIES = zlib host-flex host-bison -$(eval $(call AUTOTARGETS,package,libpcap)) +# We're patching configure.in +LIBPCAP_AUTORECONF = YES +LIBPCAP_CONF_ENV = ac_cv_linux_vers=2 \ + ac_cv_header_linux_wireless_h=yes \ + CFLAGS="$(LIBPCAP_CFLAGS)" +LIBPCAP_CFLAGS = $(TARGET_CFLAGS) +LIBPCAP_CONF_OPT = --disable-yydebug --with-pcap=linux +LIBPCAP_CONFIG_SCRIPTS = pcap-config + +ifeq ($(BR2_PACKAGE_LIBUSB),y) +LIBPCAP_CONF_OPT += --enable-canusb +LIBPCAP_DEPENDENCIES += libusb +else +LIBPCAP_CONF_OPT += --disable-canusb +endif + +ifeq ($(BR2_PACKAGE_LIBNL),y) +LIBPCAP_DEPENDENCIES += libnl +LIBPCAP_CFLAGS += "-I$(STAGING_DIR)/usr/include/libnl3" +else +LIBPCAP_CONF_OPT += --without-libnl +endif + +# microblaze needs -fPIC instead of -fpic +ifeq ($(BR2_microblaze),y) +LIBPCAP_CFLAGS += -fPIC +endif + +$(eval $(autotools-package)) diff --git a/package/libpfm4/Config.in b/package/libpfm4/Config.in new file mode 100644 index 0000000000..3908e7890b --- /dev/null +++ b/package/libpfm4/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBPFM4 + bool "libpfm4" + depends on !BR2_avr32 # no perf_event_open + help + A helper library to help encode Performance Events to use with + Operating system kernels performance monitoring interfaces. + + http://perfmon2.sourceforge.net/ diff --git a/package/libpfm4/libpfm4.mk b/package/libpfm4/libpfm4.mk new file mode 100644 index 0000000000..11106720aa --- /dev/null +++ b/package/libpfm4/libpfm4.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# libpfm4 +# +################################################################################ + +LIBPFM4_VERSION = 4.3.0 +LIBPFM4_SOURCE = libpfm-$(LIBPFM4_VERSION).tar.gz +LIBPFM4_SITE = http://downloads.sourceforge.net/project/perfmon2/libpfm4 +LIBPFM4_LICENSE = libpfm4 license +LIBPFM4_LICENSE_FILES = COPYING +LIBPFM4_INSTALL_STAGING = YES + +LIBPFM4_FLAGS = SYS=Linux ARCH=$(BR2_ARCH) CC="$(TARGET_CC)" LDCONFIG=true + +define LIBPFM4_BUILD_CMDS + $(MAKE) -C $(@D) $(LIBPFM4_FLAGS) +endef + +define LIBPFM4_INSTALL_STAGING_CMDS + make -C $(@D) $(LIBPFM4_FLAGS) PREFIX=$(STAGING_DIR)/usr install +endef + +define LIBPFM4_INSTALL_TARGET_CMDS + make -C $(@D) $(LIBPFM4_FLAGS) PREFIX=$(TARGET_DIR)/usr install +endef + +$(eval $(generic-package)) diff --git a/package/libplayer/Config.in b/package/libplayer/Config.in new file mode 100644 index 0000000000..113f650b1e --- /dev/null +++ b/package/libplayer/Config.in @@ -0,0 +1,41 @@ +config BR2_PACKAGE_LIBPLAYER + depends on BR2_LARGEFILE + depends on BR2_TOOLCHAIN_HAS_THREADS + bool "libplayer" + help + libplayer provides a generic A/V API that relies on various multimedia + player for Linux systems. It currently supports MPlayer, xine VLC and + GStreamer only + + http://libplayer.geexbox.org/ + +if BR2_PACKAGE_LIBPLAYER +config BR2_PACKAGE_LIBPLAYER_MPLAYER + bool "mplayer backend" + # mplayer + depends on !BR2_sh4a && !BR2_sh4aeb && !BR2_microblaze && !BR2_aarch64 + # mplayer + depends on BR2_LARGEFILE + # mplayer + # Broken support for + +Index: b/src/Makefile +=================================================================== +--- a/src/Makefile ++++ b/src/Makefile +@@ -9,6 +9,7 @@ + SHARED_LIBNAME_VERSION = $(SHARED_LIBNAME).$(VERSION) + SHARED_LIBNAME_MAJOR = $(SHARED_LIBNAME).$(shell echo $(VERSION) | cut -f1 -d.) + SHARED_LIBNAME_FLAGS = -shared -Wl,-soname,$(SHARED_LIBNAME_MAJOR) ++CFLAGS = -fPIC + + ifeq ($(BUILD_STATIC),yes) + BUILD_RULES += lib_static diff --git a/package/libplayer/libplayer-fix-configure-cflags.patch b/package/libplayer/libplayer-fix-configure-cflags.patch new file mode 100644 index 0000000000..186afd562e --- /dev/null +++ b/package/libplayer/libplayer-fix-configure-cflags.patch @@ -0,0 +1,41 @@ +From: Arnout Vandecappelle (Essensium/Mind) +Subject: [PATCH] libplayer: Fix handling of cflags in configure. + +The cflags returned by pkg-config or another config script may consist +of several arguments for the compiler. These should not be quoted together +into a single argument. + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- +Sent upstream to devel@geexbox.org on July 11, 2012. +--- +diff -rup libplayer-2.0.1.orig/configure libplayer-2.0.1/configure +--- libplayer-2.0.1.orig/configure 2010-10-03 19:26:11.000000000 +0200 ++++ libplayer-2.0.1/configure 2012-07-10 23:33:02.783701852 +0200 +@@ -342,7 +342,7 @@ check_libconfig(){ + err=1 + if `which "$config" 1>/dev/null 2>&1`; then + cflags=`$config $ccflags` +- [ -n "$cflags" ] && check_cflags "$cflags" ++ [ -n "$cflags" ] && check_cflags $cflags + libs=`$config $clibs` + if [ -n "$libs" ]; then + temp_extralibs "$libs" +@@ -364,7 +364,7 @@ check_libconfig_exists(){ + err=1 + if `which "$config" 1>/dev/null 2>&1`; then + cflags=`$config $ccflags` +- [ -n "$cflags" ] && temp_cflags "$cflags" ++ [ -n "$cflags" ] && temp_cflags $cflags + libs=`$config $clibs` + if [ -n "$libs" ]; then + temp_extralibs "$libs" +@@ -386,7 +386,7 @@ check_pkgconfig(){ + err=1 + if `which pkg-config 1>/dev/null 2>&1`; then + cflags=`pkg-config $pkg $ccflags` +- [ -n "$cflags" ] && check_cflags "$cflags" ++ [ -n "$cflags" ] && check_cflags $cflags + libs=`pkg-config $pkg $clibs` + if [ -n "$libs" ]; then + temp_extralibs "$libs" diff --git a/package/libplayer/libplayer.mk b/package/libplayer/libplayer.mk new file mode 100644 index 0000000000..061c87ab09 --- /dev/null +++ b/package/libplayer/libplayer.mk @@ -0,0 +1,45 @@ +################################################################################ +# +# libplayer +# +################################################################################ + +LIBPLAYER_VERSION = 2.0.1 +LIBPLAYER_SITE = http://libplayer.geexbox.org/releases/ +LIBPLAYER_SOURCE = libplayer-$(LIBPLAYER_VERSION).tar.bz2 + +# When passing the standard buildroot configure arguments, the configure script +# breaks on --target and --host options. Thus we need to define a configure cmd +# ourselves. +define LIBPLAYER_CONFIGURE_CMDS + (cd $(@D) && rm -rf config.cache && \ + $(TARGET_CONFIGURE_OPTS) \ + $(TARGET_CONFIGURE_ARGS) \ + ./configure \ + --prefix=/usr \ + --cross-compile \ + $(SHARED_STATIC_LIBS_OPTS) \ + $(LIBPLAYER_CONF_OPT) \ + ) +endef + +ifeq ($(BR2_PACKAGE_LIBPLAYER_MPLAYER),y) + LIBPLAYER_DEPENDENCIES += mplayer + LIBPLAYER_CONF_OPT += --enable-mplayer +else + LIBPLAYER_CONF_OPT += --disable-mplayer +endif + +ifeq ($(BR2_PACKAGE_LIBPLAYER_GSTREAMER),y) + LIBPLAYER_DEPENDENCIES += gstreamer + LIBPLAYER_CONF_OPT += --enable-gstreamer +else + LIBPLAYER_CONF_OPT += --disable-gstreamer +endif + +ifeq ($(BR2_PACKAGE_LIBPLAYER_PYTHON),y) + LIBPLAYER_DEPENDENCIES += python + LIBPLAYER_CONF_OPT += --enable-binding-python +endif + +$(eval $(autotools-package)) diff --git a/package/libpng/libpng-01-disable-tools.patch b/package/libpng/libpng-01-disable-tools.patch new file mode 100644 index 0000000000..cd7040ccd3 --- /dev/null +++ b/package/libpng/libpng-01-disable-tools.patch @@ -0,0 +1,30 @@ +Disable the new pngfix and png-fix-itxt tools: they take up space, fail to +build on some oddball toolchain configurations and aren't expected/needed +in a non-interactive embedded system. + +Signed-off-by: Gustavo Zacarias + +diff -Nura libpng-1.6.6.orig/Makefile.am libpng-1.6.6/Makefile.am +--- libpng-1.6.6.orig/Makefile.am 2013-10-27 19:13:39.183376955 -0300 ++++ libpng-1.6.6/Makefile.am 2013-10-27 19:13:50.388744191 -0300 +@@ -10,7 +10,7 @@ + check_PROGRAMS= pngtest pngunknown pngstest pngvalid + + # Utilities - installed +-bin_PROGRAMS= pngfix png-fix-itxt ++bin_PROGRAMS= + + pngtest_SOURCES = pngtest.c + pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +diff -Nura libpng-1.6.6.orig/Makefile.in libpng-1.6.6/Makefile.in +--- libpng-1.6.6.orig/Makefile.in 2013-10-27 19:13:39.180376856 -0300 ++++ libpng-1.6.6/Makefile.in 2013-10-27 19:14:55.332872643 -0300 +@@ -59,7 +59,7 @@ + host_triplet = @host@ + check_PROGRAMS = pngtest$(EXEEXT) pngunknown$(EXEEXT) \ + pngstest$(EXEEXT) pngvalid$(EXEEXT) +-bin_PROGRAMS = pngfix$(EXEEXT) png-fix-itxt$(EXEEXT) ++bin_PROGRAMS = + @PNG_ARM_NEON_TRUE@am__append_1 = arm/arm_init.c\ + @PNG_ARM_NEON_TRUE@ arm/filter_neon.S + diff --git a/package/libpng/libpng.mk b/package/libpng/libpng.mk index 699561b9ab..5ce828e7d2 100644 --- a/package/libpng/libpng.mk +++ b/package/libpng/libpng.mk @@ -1,26 +1,19 @@ -############################################################# +################################################################################ # -# libpng (Portable Network Graphic library) +# libpng # -############################################################# -LIBPNG_VERSION = 1.4.5 -LIBPNG_SERIES = 14 -LIBPNG_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/libpng -LIBPNG_SOURCE = libpng-$(LIBPNG_VERSION).tar.bz2 -LIBPNG_INSTALL_STAGING = YES -LIBPNG_DEPENDENCIES = host-pkg-config zlib - -HOST_LIBPNG_DEPENDENCIES = host-pkg-config host-zlib +################################################################################ -define LIBPNG_STAGING_LIBPNG12_CONFIG_FIXUP - $(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g" \ - -e "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" \ - -e "s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include/libpng$(LIBPNG_SERIES)\',g" \ - -e "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" \ - $(STAGING_DIR)/usr/bin/libpng$(LIBPNG_SERIES)-config -endef - -LIBPNG_POST_INSTALL_STAGING_HOOKS += LIBPNG_STAGING_LIBPNG12_CONFIG_FIXUP +LIBPNG_VERSION = 1.6.6 +LIBPNG_SERIES = 16 +LIBPNG_SOURCE = libpng-$(LIBPNG_VERSION).tar.xz +LIBPNG_SITE = http://downloads.sourceforge.net/project/libpng/libpng${LIBPNG_SERIES}/$(LIBPNG_VERSION) +LIBPNG_LICENSE = libpng license +LIBPNG_LICENSE_FILES = LICENSE +LIBPNG_INSTALL_STAGING = YES +LIBPNG_DEPENDENCIES = host-pkgconf zlib +LIBPNG_CONFIG_SCRIPTS = libpng$(LIBPNG_SERIES)-config libpng-config +LIBPNG_CONF_OPT = $(if $(BR2_ARM_CPU_HAS_NEON),--enable-arm-neon=yes,--enable-arm-neon=no) -$(eval $(call AUTOTARGETS,package,libpng)) -$(eval $(call AUTOTARGETS,package,libpng,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/libpthsem/Config.in b/package/libpthsem/Config.in new file mode 100644 index 0000000000..ae1c78f5ea --- /dev/null +++ b/package/libpthsem/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBPTHSEM + bool "libpthsem" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_ARGP_STANDALONE + help + GNU pth is a user mode multi threading library. pthsem is an extend + version, with support for semaphores added. + + http://www.auto.tuwien.ac.at/~mkoegler/pth/ diff --git a/package/libpthsem/libpthsem-2.0.8-fix-build-on-linux-3.x-host.patch b/package/libpthsem/libpthsem-2.0.8-fix-build-on-linux-3.x-host.patch new file mode 100644 index 0000000000..21fff4e7cc --- /dev/null +++ b/package/libpthsem/libpthsem-2.0.8-fix-build-on-linux-3.x-host.patch @@ -0,0 +1,28 @@ +From 2d0450bfa3fb7003098da1a7fe24c3ae140912dc Mon Sep 17 00:00:00 2001 +From: Gregory Hermant +Date: Mon, 22 Oct 2012 15:11:53 +0200 +Subject: [PATCH] pthsem build on Linux 3.x host + + +Signed-off-by: Michael Markstaller +Signed-off-by: Gregory Hermant +--- + acinclude.m4 | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/acinclude.m4 b/acinclude.m4 +index 03b42de..fea9bc8 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -892,6 +892,8 @@ case $PLATFORM in + case "x`uname -r`" in + changequote(, )dnl + x2.[23456789]* ) ;; ++changequote(, )dnl ++ x3.* ) ;; + changequote([, ]) + * ) braindead=yes ;; + esac +-- +1.7.9.5 + diff --git a/package/libpthsem/libpthsem.mk b/package/libpthsem/libpthsem.mk new file mode 100644 index 0000000000..dbfab34263 --- /dev/null +++ b/package/libpthsem/libpthsem.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# libpthsem +# +################################################################################ + +LIBPTHSEM_VERSION = 2.0.8 +LIBPTHSEM_SOURCE = pthsem_$(LIBPTHSEM_VERSION).tar.gz +LIBPTHSEM_SITE = http://www.auto.tuwien.ac.at/~mkoegler/pth/ +LIBPTHSEM_LICENSE = LGPLv2.1+ +LIBPTHSEM_LICENSE_FILES = COPYING +LIBPTHSEM_AUTORECONF = YES +LIBPTHSEM_INSTALL_STAGING = YES +LIBPTHSEM_DEPENDENCIES = argp-standalone +LIBPTHSEM_CONFIG_SCRIPTS = pthsem-config + +$(eval $(autotools-package)) diff --git a/package/libqmi/Config.in b/package/libqmi/Config.in new file mode 100644 index 0000000000..a0e896cce8 --- /dev/null +++ b/package/libqmi/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_LIBQMI + bool "libqmi" + select BR2_PACKAGE_LIBGLIB2 + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + help + libqmi is a glib-based library for talking to WWAN modems and devices + which speak the Qualcomm MSM Interface (QMI) protocol. + + http://www.freedesktop.org/wiki/Software/libqmi/ + +comment "libqmi needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libqmi/libqmi.mk b/package/libqmi/libqmi.mk new file mode 100644 index 0000000000..4f3f9a9deb --- /dev/null +++ b/package/libqmi/libqmi.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# libqmi +# +################################################################################ + +LIBQMI_VERSION = 1.4.0 +LIBQMI_SITE = http://www.freedesktop.org/software/libqmi/ +LIBQMI_SOURCE = libqmi-$(LIBQMI_VERSION).tar.xz +LIBQMI_LICENSE = LGPLv2+ (library), GPLv2+ (programs) +LIBQMI_LICENSE_FILES = COPYING +LIBQMI_INSTALL_STAGING = YES + +LIBQMI_DEPENDENCIES = libglib2 + +# we don't want -Werror +LIBQMI_CONF_OPT = --enable-more-warnings=no + +$(eval $(autotools-package)) diff --git a/package/libqrencode/Config.in b/package/libqrencode/Config.in new file mode 100644 index 0000000000..b86662621e --- /dev/null +++ b/package/libqrencode/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_LIBQRENCODE + bool "libqrencode" + help + libqrencode is a C library for encoding data in a QR Code + symbol, a kind of 2D symbology that can be scanned by handy + terminals such as a mobile phone with CCD. The capacity of + QR Code is up to 7000 digits or 4000 characters, and is + highly robust. + + http://fukuchi.org/works/qrencode/index.html + +if BR2_PACKAGE_LIBQRENCODE + +config BR2_PACKAGE_LIBQRENCODE_TOOLS + bool "libqrencode tools" + select BR2_PACKAGE_LIBPNG + help + Build command-line tools + +endif #BR2_PACKAGE_LIBQRENCODE diff --git a/package/libqrencode/libqrencode.mk b/package/libqrencode/libqrencode.mk new file mode 100644 index 0000000000..d445763604 --- /dev/null +++ b/package/libqrencode/libqrencode.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# libqrencode +# +################################################################################ + +LIBQRENCODE_VERSION = 3.4.2 +LIBQRENCODE_SOURCE = qrencode-$(LIBQRENCODE_VERSION).tar.gz +LIBQRENCODE_SITE = http://fukuchi.org/works/qrencode +LIBQRENCODE_INSTALL_STAGING = YES +LIBQRENCODE_LICENSE = LGPLv2.1+ +LIBQRENCODE_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_LIBQRENCODE_TOOLS),y) +LIBQRENCODE_CONF_OPT += --with-tools=yes +LIBQRENCODE_DEPENDENCIES += libpng +else +LIBQRENCODE_CONF_OPT += --with-tools=no +endif + +$(eval $(autotools-package)) diff --git a/package/libraw/Config.in b/package/libraw/Config.in new file mode 100644 index 0000000000..de763cd36a --- /dev/null +++ b/package/libraw/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBRAW + bool "libraw" + depends on BR2_INSTALL_LIBSTDCPP + help + libraw is a raw image manipulation library + + http://www.libraw.org/ + +comment "libraw needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/libraw/libraw.mk b/package/libraw/libraw.mk new file mode 100644 index 0000000000..bd52cc06d9 --- /dev/null +++ b/package/libraw/libraw.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libraw +# +################################################################################ + +LIBRAW_VERSION = 0.13.4 +LIBRAW_SOURCE = LibRaw-$(LIBRAW_VERSION).tar.gz +LIBRAW_SITE = http://www.libraw.org/data/ + +LIBRAW_INSTALL_STAGING = YES +LIBRAW_CONF_OPT += --disable-examples --disable-lcms \ + --disable-openmp --disable-demosaic-pack-gpl2 \ + --disable-demosaic-pack-gpl3 + +$(eval $(autotools-package)) diff --git a/package/libraw1394/Config.in b/package/libraw1394/Config.in index 49399e3291..7a64959a52 100644 --- a/package/libraw1394/Config.in +++ b/package/libraw1394/Config.in @@ -1,10 +1,7 @@ config BR2_PACKAGE_LIBRAW1394 bool "libraw1394" help - Library for direct access to IEEE 1394 bus. + libraw1394 provides direct access to the IEEE 1394 bus through + the Linux 1394 subsystem's raw1394 user space interface. - Through libraw1394/raw1394, applications can directly - send to and receive from other nodes without requiring - a kernel driver for the protocol in question. - - http://www.linux1394.org/ + http://sourceforge.net/projects/libraw1394/ diff --git a/package/libraw1394/libraw1394.mk b/package/libraw1394/libraw1394.mk index 196c7217ab..166c78234c 100644 --- a/package/libraw1394/libraw1394.mk +++ b/package/libraw1394/libraw1394.mk @@ -1,11 +1,12 @@ -############################################################# +################################################################################ # # libraw1394 # -############################################################# -LIBRAW1394_VERSION:=1.2.1 -LIBRAW1394_SOURCE:=libraw1394-$(LIBRAW1394_VERSION).tar.gz -LIBRAW1394_SITE:=http://www.kernel.org/pub/linux/libs/ieee1394/ -LIBRAW1394_INSTALL_STAGING=YES +################################################################################ -$(eval $(call AUTOTARGETS,package,libraw1394)) +LIBRAW1394_VERSION = 2.0.7 +LIBRAW1394_SOURCE = libraw1394-$(LIBRAW1394_VERSION).tar.xz +LIBRAW1394_SITE = $(BR2_KERNEL_MIRROR)/linux/libs/ieee1394 +LIBRAW1394_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/multimedia/libreplaygain/Config.in b/package/libreplaygain/Config.in similarity index 100% rename from package/multimedia/libreplaygain/Config.in rename to package/libreplaygain/Config.in diff --git a/package/multimedia/libreplaygain/libreplaygain.mk b/package/libreplaygain/libreplaygain.mk similarity index 81% rename from package/multimedia/libreplaygain/libreplaygain.mk rename to package/libreplaygain/libreplaygain.mk index c9410923ec..8818e16969 100644 --- a/package/multimedia/libreplaygain/libreplaygain.mk +++ b/package/libreplaygain/libreplaygain.mk @@ -4,11 +4,11 @@ # ################################################################################ -LIBREPLAYGAIN_VERSION = r453 +LIBREPLAYGAIN_VERSION = r475 LIBREPLAYGAIN_SITE = http://files.musepack.net/source LIBREPLAYGAIN_SOURCE = libreplaygain_$(LIBREPLAYGAIN_VERSION).tar.gz # upstream doesn't ship configure LIBREPLAYGAIN_AUTORECONF = YES LIBREPLAYGAIN_INSTALL_STAGING = YES -$(eval $(call AUTOTARGETS,package/multimedia,libreplaygain)) +$(eval $(autotools-package)) diff --git a/package/libroxml/Config.in b/package/libroxml/Config.in new file mode 100644 index 0000000000..2fcf2f2a70 --- /dev/null +++ b/package/libroxml/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBROXML + bool "roxml" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + libroxml is a light and powerful xml parsing library with + xpath handling. Roxml is a binary using libroxml to explore + xml file from shell scripts. + + http://www.libroxml.net + +comment "libroxml needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libroxml/libroxml-0001-werror.patch b/package/libroxml/libroxml-0001-werror.patch new file mode 100644 index 0000000000..91f322ce0d --- /dev/null +++ b/package/libroxml/libroxml-0001-werror.patch @@ -0,0 +1,22 @@ +[PATCH] remove -Werror from CFLAGS + +-Werror should only be used during development, not in released SW. + +Signed-off-by: Peter Korsgaard +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: a/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -46,7 +46,7 @@ + + # options + override CPPFLAGS += -Iinc/ +-override CFLAGS += $(OPTIM) -fPIC -Wall -Wextra -Wno-unused-parameter -Wno-unused-result -Werror -Iinc/ $(DEFINES) ++override CFLAGS += $(OPTIM) -fPIC -Wall -Wextra -Wno-unused-parameter -Wno-unused-result -Iinc/ $(DEFINES) + override LDFLAGS += + + ifeq ("$(OS)", "Darwin") diff --git a/package/libroxml/libroxml-0002-wno-unused-result.patch b/package/libroxml/libroxml-0002-wno-unused-result.patch new file mode 100644 index 0000000000..406bf3c247 --- /dev/null +++ b/package/libroxml/libroxml-0002-wno-unused-result.patch @@ -0,0 +1,21 @@ +The -Wno-unused-result option is not understood by the version of gcc used by the +avr32 toolchain. Remove the option from the compilation flags. + +Fixes build failures such as the following. + + http://autobuild.buildroot.net/results/e22/e22d94fca3eabb4e54d82af04319f17ad8e10c20/ + +Signed-off-by: Simon Dawson + +diff -Nurp a/Makefile b/Makefile +--- a/Makefile 2013-11-21 17:13:17.679388374 +0000 ++++ b/Makefile 2013-11-21 17:13:35.219299157 +0000 +@@ -46,7 +46,7 @@ DEFINES = -DIGNORE_EMPTY_TEXT_NODES + + # options + override CPPFLAGS += -Iinc/ +-override CFLAGS += $(OPTIM) -fPIC -Wall -Wextra -Wno-unused-parameter -Wno-unused-result -Iinc/ $(DEFINES) ++override CFLAGS += $(OPTIM) -fPIC -Wall -Wextra -Wno-unused-parameter -Iinc/ $(DEFINES) + override LDFLAGS += + + ifeq ("$(OS)", "Darwin") diff --git a/package/libroxml/libroxml.mk b/package/libroxml/libroxml.mk new file mode 100644 index 0000000000..d602513717 --- /dev/null +++ b/package/libroxml/libroxml.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# libroxml +# +################################################################################ + +LIBROXML_VERSION = 2.2.3 +LIBROXML_SITE = http://download.libroxml.net/pool/v2.x/ +LIBROXML_INSTALL_STAGING = YES + +define LIBROXML_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) OPTIM= -C $(@D) V=1 all +endef + +define LIBROXML_INSTALL_STAGING_CMDS + $(MAKE) DESTDIR=$(STAGING_DIR) -C $(@D) install +endef + +define LIBROXML_INSTALL_TARGET_CMDS + $(MAKE) DESTDIR=$(TARGET_DIR)/usr/ -C $(@D) install +endef + +define LIBROXML_UNINSTALL_STAGING_CMDS + $(MAKE) DESTDIR=$(STAGING_DIR) -C $(@D) uninstall +endef + +define LIBROXML_UNINSTALL_TARGET_CMDS + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) uninstall +endef + +define LIBROXML_CLEAN_CMDS + -$(MAKE) -C $(@D) clean +endef + +define LIBROXML_DISABLE_DOXYGEN + $(SED) 's:) doxy:):' $(@D)/Makefile +endef + +LIBROXML_POST_PATCH_HOOKS += LIBROXML_DISABLE_DOXYGEN + +$(eval $(generic-package)) diff --git a/package/librsvg/Config.in b/package/librsvg/Config.in index fdb7d3109e..5dd4c58124 100644 --- a/package/librsvg/Config.in +++ b/package/librsvg/Config.in @@ -5,10 +5,17 @@ config BR2_PACKAGE_LIBRSVG select BR2_PACKAGE_CAIRO_PNG select BR2_PACKAGE_PANGO select BR2_PACKAGE_LIBGLIB2 - depends on BR2_PACKAGE_LIBGTK2 + select BR2_PACKAGE_GDK_PIXBUF depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + depends on BR2_INSTALL_LIBSTDCPP # pango help The rsvg library is an efficient renderer for Scalable Vector Graphics (SVG) pictures. http://librsvg.sourceforge.net/ + +comment "librsvg needs a toolchain w/ wchar, threads, C++" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP diff --git a/package/librsvg/librsvg.mk b/package/librsvg/librsvg.mk index daa34ab193..2decd94ed3 100644 --- a/package/librsvg/librsvg.mk +++ b/package/librsvg/librsvg.mk @@ -1,17 +1,21 @@ -############################################################# +################################################################################ # # librsvg # -############################################################# +################################################################################ -LIBRSVG_VERSION_MAJOR:=2.26 -LIBRSVG_VERSION_MINOR:=3 -LIBRSVG_VERSION:=$(LIBRSVG_VERSION_MAJOR).$(LIBRSVG_VERSION_MINOR) -LIBRSVG_SOURCE:=librsvg-$(LIBRSVG_VERSION).tar.gz -LIBRSVG_SITE:=http://ftp.gnome.org/pub/GNOME/sources/librsvg/$(LIBRSVG_VERSION_MAJOR)/ +LIBRSVG_VERSION_MAJOR = 2.26 +LIBRSVG_VERSION_MINOR = 3 +LIBRSVG_VERSION = $(LIBRSVG_VERSION_MAJOR).$(LIBRSVG_VERSION_MINOR) +LIBRSVG_SITE = http://ftp.gnome.org/pub/GNOME/sources/librsvg/$(LIBRSVG_VERSION_MAJOR)/ LIBRSVG_INSTALL_STAGING = YES -LIBRSVG_INSTALL_TARGET = YES LIBRSVG_CONF_OPT = --disable-tools -LIBRSVG_DEPENDENCIES = libxml2 cairo pango libglib2 libgtk2 +LIBRSVG_DEPENDENCIES = libxml2 cairo pango libglib2 gdk-pixbuf -$(eval $(call AUTOTARGETS,package,librsvg)) +# If we have Gtk2, let's build it first to benefit from librsvg Gtk +# support. +ifeq ($(BR2_PACKAGE_LIBGTK2),y) +LIBRSVG_DEPENDENCIES += libgtk2 +endif + +$(eval $(autotools-package)) diff --git a/package/librsync/librsync.mk b/package/librsync/librsync.mk index 3db4625c8d..d475c7333d 100644 --- a/package/librsync/librsync.mk +++ b/package/librsync/librsync.mk @@ -1,15 +1,14 @@ -############################################################# +################################################################################ # # librsync # -############################################################# -LIBRSYNC_VERSION:=0.9.7 -LIBRSYNC_SOURCE:=librsync-$(LIBRSYNC_VERSION).tar.gz -LIBRSYNC_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/librsync/ -LIBRSYNC_INSTALL_STAGING = YES -LIBRSYNC_INSTALL_TARGET = YES -LIBRSYNC_CONF_OPT = --enable-shared +################################################################################ +LIBRSYNC_VERSION = 0.9.7 +LIBRSYNC_SITE = http://downloads.sourceforge.net/project/librsync/librsync/$(LIBRSYNC_VERSION) +LIBRSYNC_LICENSE = LGPLv2.1+ +LIBRSYNC_LICENSE_FILES = COPYING +LIBRSYNC_INSTALL_STAGING = YES LIBRSYNC_DEPENDENCIES = zlib bzip2 popt -$(eval $(call AUTOTARGETS,package,librsync)) +$(eval $(autotools-package)) diff --git a/package/multimedia/libsamplerate/Config.in b/package/libsamplerate/Config.in similarity index 100% rename from package/multimedia/libsamplerate/Config.in rename to package/libsamplerate/Config.in diff --git a/package/multimedia/libsamplerate/libsamplerate.mk b/package/libsamplerate/libsamplerate.mk similarity index 75% rename from package/multimedia/libsamplerate/libsamplerate.mk rename to package/libsamplerate/libsamplerate.mk index 94b07a40f3..950e5b5ecd 100644 --- a/package/multimedia/libsamplerate/libsamplerate.mk +++ b/package/libsamplerate/libsamplerate.mk @@ -4,14 +4,14 @@ # ################################################################################ -LIBSAMPLERATE_VERSION = 0.1.7 +LIBSAMPLERATE_VERSION = 0.1.8 LIBSAMPLERATE_SITE = http://www.mega-nerd.com/SRC LIBSAMPLERATE_INSTALL_STAGING = YES -LIBSAMPLERATE_DEPENDENCIES = host-pkg-config +LIBSAMPLERATE_DEPENDENCIES = host-pkgconf LIBSAMPLERATE_CONF_OPT = --disable-fftw --program-transform-name='' ifeq ($(BR2_PACKAGE_LIBSNDFILE),y) LIBSAMPLERATE_DEPENDENCIES += libsndfile endif -$(eval $(call AUTOTARGETS,package/multimedia,libsamplerate)) +$(eval $(autotools-package)) diff --git a/package/libseccomp/Config.in b/package/libseccomp/Config.in new file mode 100644 index 0000000000..e851011a53 --- /dev/null +++ b/package/libseccomp/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LIBSECCOMP + bool "libseccomp" + depends on BR2_i386 || BR2_x86_64 + help + High level interface to the Linux Kernel's seccomp filter + + The libseccomp library provides an easy to use, platform independent, + interface to the Linux Kernel's syscall filtering mechanism: seccomp. + The libseccomp API is designed to abstract away the underlying BPF + based syscall filter language and present a more conventional + function-call based filtering interface that should be familiar to, + and easily adopted by application developers. + + http://sourceforge.net/projects/libseccomp/ diff --git a/package/libseccomp/libseccomp-0001-use-system-headers-from-sysroot.patch b/package/libseccomp/libseccomp-0001-use-system-headers-from-sysroot.patch new file mode 100644 index 0000000000..0997eddb8e --- /dev/null +++ b/package/libseccomp/libseccomp-0001-use-system-headers-from-sysroot.patch @@ -0,0 +1,17 @@ +configure: check headers in sysroot, not in host's system headers + +Signed-off-by: "Yann E. MORIN" + +diff -durN libseccomp-1.0.0.orig/configure libseccomp-1.0.0/configure +--- libseccomp-1.0.0.orig/configure 2012-07-27 22:35:05.000000000 +0200 ++++ libseccomp-1.0.0/configure 2012-10-27 00:12:50.739196219 +0200 +@@ -205,7 +205,8 @@ + # + + # system seccomp includes +-if [[ -r "/usr/include/linux/seccomp.h" ]]; then ++# ${SYSROOT} added by buildroot for cross-compilation ++if [[ -r "${SYSROOT}/usr/include/linux/seccomp.h" ]]; then + opt_sysinc_seccomp="yes" + else + opt_sysinc_seccomp="no" diff --git a/package/libseccomp/libseccomp-0002-Remove-the-dependency-on-proc.patch b/package/libseccomp/libseccomp-0002-Remove-the-dependency-on-proc.patch new file mode 100644 index 0000000000..081bca745b --- /dev/null +++ b/package/libseccomp/libseccomp-0002-Remove-the-dependency-on-proc.patch @@ -0,0 +1,42 @@ +From 58c34ae1343e2a452e08cd160936a231bcdb67a1 Mon Sep 17 00:00:00 2001 +From: Maxime Ripard +Date: Tue, 18 Dec 2012 09:57:47 +0100 +Subject: [PATCH] Remove the dependency on /proc + +The Makefile relied on a broken logic for the INSTALL_PC_MACRO. +It was used like this: $(INSTALL_PC_MACRO) file. + +The INSTALL_PC_MACRO was then expanded with a trailing sharp, to pass +the name of the file to install as a comment at the end of the command. + +And then, to retrieve the file to copy, it used the $NF variable of awk +on the /proc/self/cmdline file to happily reinvent the argument +mechanism. + +This patch removes of this crazy stuff by using the -t option of +install, that keeps the same calling convention. + +Signed-off-by: Maxime Ripard +--- + macros.mk | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/macros.mk b/macros.mk +index 6162900..eb61ead 100644 +--- a/macros.mk ++++ b/macros.mk +@@ -150,9 +150,8 @@ endif + INSTALL_PC_MACRO += \ + $(INSTALL) -o $(INSTALL_OWNER) -g $(INSTALL_GROUP) \ + -d "$(INSTALL_LIB_DIR)/pkgconfig"; \ +- $(INSTALL) -o $(INSTALL_OWNER) -g $(INSTALL_GROUP) -m 0644 \ +- "$$(cat /proc/$$$$/cmdline | awk '{print $$(NF)}')" \ +- "$(INSTALL_LIB_DIR)/pkgconfig"; \# ++ $(INSTALL) -o $(INSTALL_OWNER) -g $(INSTALL_GROUP) -m 0644 -t \ ++ "$(INSTALL_LIB_DIR)/pkgconfig" + + ifeq ($(V),0) + INSTALL_INC_MACRO = @echo " INSTALL $^ ($(INSTALL_INC_DIR))"; +-- +1.7.9.5 + diff --git a/package/libseccomp/libseccomp.mk b/package/libseccomp/libseccomp.mk new file mode 100644 index 0000000000..da1daddf6c --- /dev/null +++ b/package/libseccomp/libseccomp.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# libseccomp +# +################################################################################ + +LIBSECCOMP_VERSION = 1.0.0 +LIBSECCOMP_SITE = http://downloads.sourceforge.net/project/libseccomp +LIBSECCOMP_LICENSE = LGPLv2.1 +LIBSECCOMP_LICENSE_FILES = LICENSE +LIBSECCOMP_INSTALL_STAGING = YES + +# Needed for configure to find our system headers: +LIBSECCOMP_CONF_ENV = SYSROOT=$(STAGING_DIR) +LIBSECCOMP_MAKE_ENV = $(TARGET_CONFIGURE_OPTS) +LIBSECCOMP_MAKE_OPT = SUBDIRS_BUILD=src +LIBSECCOMP_INSTALL_STAGING_OPT = SUBDIRS_BUILD=src SUBDIRS_INSTALL="src include" DESTDIR=$(STAGING_DIR) install +LIBSECCOMP_INSTALL_TARGET_OPT = SUBDIRS_BUILD=src SUBDIRS_INSTALL="src include" DESTDIR=$(TARGET_DIR) install + +# Not a real autotools package, but works quite OK nonetheless +$(eval $(autotools-package)) diff --git a/package/libsecret/Config.in b/package/libsecret/Config.in new file mode 100644 index 0000000000..70f1fe7eb9 --- /dev/null +++ b/package/libsecret/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_LIBSECRET + bool "libsecret" + select BR2_PACKAGE_LIBGLIB2 + depends on BR2_USE_WCHAR # gettext dep in libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + help + libsecret is a library for storing and retrieving passwords and other + secrets. It communicates with the "Secret Service" using DBus. + gnome-keyring and ksecretservice are both implementations of a Secret + Service. + + https://wiki.gnome.org/Libsecret + +comment "libsecret needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libsecret/libsecret.mk b/package/libsecret/libsecret.mk new file mode 100644 index 0000000000..a0f39f8b0a --- /dev/null +++ b/package/libsecret/libsecret.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# libsecret +# +################################################################################ + +LIBSECRET_VERSION = 0.15 +LIBSECRET_SITE = http://ftp.gnome.org/pub/GNOME/sources/libsecret/$(LIBSECRET_VERSION) +LIBSECRET_SOURCE = libsecret-$(LIBSECRET_VERSION).tar.xz +LIBSECRET_LICENSE = LGPLv2.1+ +LIBSECRET_LICENSE_FILES = COPYING +LIBSECRET_INSTALL_STAGING = YES + +LIBSECRET_DEPENDENCIES = libglib2 host-intltool +LIBSECRET_CONF_OPT = --disable-manpages --disable-strict --disable-coverage --enable-vala=no + +ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) + LIBSECRET_DEPENDENCIES += libgcrypt + LIBSECRET_CONF_OPT += --enable-gcrypt \ + --with-libgcrypt-prefix=$(STAGING_DIR)/usr +else + LIBSECRET_CONF_OPT += --disable-gcrypt +endif + +$(eval $(autotools-package)) diff --git a/package/libsepol/Config.in b/package/libsepol/Config.in new file mode 100644 index 0000000000..f92af52072 --- /dev/null +++ b/package/libsepol/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBSEPOL + bool "libsepol" + help + Libsepol is the binary policy manipulation library. It doesn't + depend upon or use any of the other SELinux components. + + http://selinuxproject.org/page/Main_Page diff --git a/package/libsepol/libsepol.mk b/package/libsepol/libsepol.mk new file mode 100644 index 0000000000..4140ed3a49 --- /dev/null +++ b/package/libsepol/libsepol.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# libsepol +# +################################################################################ + +LIBSEPOL_VERSION = 2.1.9 +LIBSEPOL_SITE = http://userspace.selinuxproject.org/releases/20130423/ +LIBSEPOL_LICENSE = LGPLv2.1+ +LIBSEPOL_LICENSE_FILES = COPYING + +LIBSEPOL_INSTALL_STAGING = YES + +define LIBSEPOL_BUILD_CMDS + # DESTDIR is needed during the compile to compute library and + # header paths. + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) DESTDIR=$(STAGING_DIR) +endef + +define LIBSEPOL_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) install $(TARGET_CONFIGURE_OPTS) DESTDIR=$(STAGING_DIR) +endef + +define LIBSEPOL_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) install $(TARGET_CONFIGURE_OPTS) DESTDIR=$(TARGET_DIR) +endef + +define LIBSEPOL_CLEAN_CMDS + $(MAKE) -C $(@D) clean +endef + +define HOST_LIBSEPOL_BUILD_CMDS + $(MAKE) -C $(@D) $(HOST_CONFIGURE_OPTS) DESTDIR=$(HOST_DIR) +endef + +define HOST_LIBSEPOL_INSTALL_CMDS + $(MAKE) -C $(@D) install $(HOST_CONFIGURE_OPTS) DESTDIR=$(HOST_DIR) + mv $(HOST_DIR)/lib/libsepol.so.1 $(HOST_DIR)/usr/lib + (cd $(HOST_DIR)/usr/lib; rm -f libsepol.so; ln -s libsepol.so.1 libsepol.so) + -rmdir $(HOST_DIR)/lib +endef + +define HOST_LIBSEPOL_CLEAN_CMDS + $(MAKE) -C $(@D) clean +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/libserial/Config.in b/package/libserial/Config.in new file mode 100644 index 0000000000..22adb7265a --- /dev/null +++ b/package/libserial/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBSERIAL + bool "libserial" + depends on BR2_INSTALL_LIBSTDCPP + help + Simplified serial port programming in C++ under POSIX operating + systems. + + http://libserial.sourceforge.net/ + +comment "libserial needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/libserial/libserial-0001-disable-python-bindings.patch b/package/libserial/libserial-0001-disable-python-bindings.patch new file mode 100644 index 0000000000..54b5cb6cf1 --- /dev/null +++ b/package/libserial/libserial-0001-disable-python-bindings.patch @@ -0,0 +1,25 @@ +Disable build of Python bindings, which requires the sipconfig module. + +Signed-off-by: Simon Dawson + +diff -Nurp a/Makefile.am b/Makefile.am +--- a/Makefile.am 2008-11-12 01:27:31.000000000 +0000 ++++ b/Makefile.am 2013-04-16 09:41:13.476002178 +0100 +@@ -1,4 +1,4 @@ +-SUBDIRS=src doc examples sip ++SUBDIRS=src doc examples + + EXTRA_DIST = doxygen.conf.in Makefile.dist libserial.spec libserial.pc + +diff -Nurp a/Makefile.in b/Makefile.in +--- a/Makefile.in 2008-11-12 01:28:14.000000000 +0000 ++++ b/Makefile.in 2013-04-16 09:41:05.628013626 +0100 +@@ -197,7 +197,7 @@ sysconfdir = @sysconfdir@ + target_alias = @target_alias@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ +-SUBDIRS = src doc examples sip ++SUBDIRS = src doc examples + EXTRA_DIST = doxygen.conf.in Makefile.dist libserial.spec libserial.pc + pkgconfigdir = $(libdir)/pkgconfig + pkgconfig_DATA = libserial.pc diff --git a/package/libserial/libserial-0002-add-missing-header-include.patch b/package/libserial/libserial-0002-add-missing-header-include.patch new file mode 100644 index 0000000000..a0226372b9 --- /dev/null +++ b/package/libserial/libserial-0002-add-missing-header-include.patch @@ -0,0 +1,15 @@ +Add a missing header include, to fix a build error. + +Signed-off-by: Simon Dawson + +diff -Nurp a/src/SerialPort.cpp b/src/SerialPort.cpp +--- a/src/SerialPort.cpp 2008-11-12 01:27:30.000000000 +0000 ++++ b/src/SerialPort.cpp 2013-04-23 15:43:41.537495852 +0100 +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/package/libserial/libserial.mk b/package/libserial/libserial.mk new file mode 100644 index 0000000000..d2c928bb3e --- /dev/null +++ b/package/libserial/libserial.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libserial +# +################################################################################ + +LIBSERIAL_VERSION = 0.6.0rc1 +LIBSERIAL_SITE = http://downloads.sourceforge.net/libserial +LIBSERIAL_INSTALL_STAGING = YES +LIBSERIAL_LICENSE = GPLv2+ +LIBSERIAL_LICENSE_FILES = COPYING + +LIBSERIAL_CONF_ENV = ac_cv_prog_DOCBOOK2PDF=no + +$(eval $(autotools-package)) diff --git a/package/libsexy/libsexy.mk b/package/libsexy/libsexy.mk index 2533218f10..4f0f87c739 100644 --- a/package/libsexy/libsexy.mk +++ b/package/libsexy/libsexy.mk @@ -5,11 +5,8 @@ ################################################################################ LIBSEXY_VERSION = 0.1.11 -LIBSEXY_SOURCE = libsexy-$(LIBSEXY_VERSION).tar.gz LIBSEXY_SITE = http://releases.chipx86.com/libsexy/libsexy/ -LIBSEXY_AUTORECONF = NO LIBSEXY_DEPENDENCIES = libgtk2 libxml2 -LIBSEXY_INSTALL_TARGET = YES LIBSEXY_INSTALL_STAGING = YES -$(eval $(call AUTOTARGETS,package/libsexy,libsexy)) +$(eval $(autotools-package)) diff --git a/package/libsha1/Config.in b/package/libsha1/Config.in new file mode 100644 index 0000000000..5467a6c4cd --- /dev/null +++ b/package/libsha1/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBSHA1 + bool "libsha1" + help + libsha1 is a tiny library providing SHA1 implementation, + created for facilitating X server compilation on devices + when larger libraries containing SHA1 implementations + (OpenSSL, Mozilla NSS) are not needed. + + https://github.com/dottedmag/libsha1 diff --git a/package/libsha1/libsha1.mk b/package/libsha1/libsha1.mk new file mode 100644 index 0000000000..6976a8f269 --- /dev/null +++ b/package/libsha1/libsha1.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# libsha1 +# +################################################################################ + +LIBSHA1_VERSION = 0.3 +LIBSHA1_SITE = http://github.com/dottedmag/libsha1/tarball/$(LIBSHA1_VERSION) +LIBSHA1_LICENSE = BSD-3c or GPL +LIBSHA1_LICENSE_FILES = COPYING + +LIBSHA1_INSTALL_STAGING = YES + +# We're getting the source code from Github, so there is no generated +# configure script in the tarball. +LIBSHA1_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/libsigc/Config.in b/package/libsigc/Config.in index 93fa3f414b..ae984c8246 100644 --- a/package/libsigc/Config.in +++ b/package/libsigc/Config.in @@ -9,5 +9,5 @@ config BR2_PACKAGE_LIBSIGC http://libsigc.sourceforge.net/ -comment "libsigc++ requires a toolchain with C++ support enabled" +comment "libsigc++ needs a toolchain w/ C++" depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/libsigc/libsigc.mk b/package/libsigc/libsigc.mk index 0b1de1466a..d3e0135d03 100644 --- a/package/libsigc/libsigc.mk +++ b/package/libsigc/libsigc.mk @@ -1,11 +1,21 @@ -############################################################# +################################################################################ # -# libsigc++ +# libsigc # -############################################################# -LIBSIGC_VERSION = 2.2.8 -LIBSIGC_SOURCE = libsigc++-$(LIBSIGC_VERSION).tar.bz2 +################################################################################ + +LIBSIGC_VERSION = 2.2.11 +LIBSIGC_SOURCE = libsigc++-$(LIBSIGC_VERSION).tar.xz LIBSIGC_SITE = http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.2 +LIBSIGC_DEPENDENCIES = host-m4 LIBSIGC_INSTALL_STAGING = YES +LIBSIGC_LICENSE = LGPLv2.1+ +LIBSIGC_LICENSE_FILES = COPYING + +define LIBSIGC_INSTALL_TARGET_FIXUP + rm -rf $(TARGET_DIR)/usr/share/devhelp/books/libsigc++* +endef + +LIBSIGC_POST_INSTALL_TARGET_HOOKS += LIBSIGC_INSTALL_TARGET_FIXUP -$(eval $(call AUTOTARGETS,package,libsigc)) +$(eval $(autotools-package)) diff --git a/package/libsigsegv/Config.in b/package/libsigsegv/Config.in new file mode 100644 index 0000000000..c46bb92ece --- /dev/null +++ b/package/libsigsegv/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBSIGSEGV + bool "libsigsegv" + help + Library for handling page faults in user mode. + + http://libsigsegv.sourceforge.net/ diff --git a/package/libsigsegv/libsigsegv-0001-fix-avr32-build.patch b/package/libsigsegv/libsigsegv-0001-fix-avr32-build.patch new file mode 100644 index 0000000000..f5857649a9 --- /dev/null +++ b/package/libsigsegv/libsigsegv-0001-fix-avr32-build.patch @@ -0,0 +1,20 @@ +The libsigsegv configure step fails to correctly figure out the direction of +stack growth for avr32. This leads to a zero STACK_DIRECTION definition, and +build failures such as the following. + + http://autobuild.buildroot.net/results/a3fe938f9376533b4777d79deb7a2ee83ed5ce33 + +Signed-off-by: Simon Dawson + +diff -Nurp a/m4/stack-direction.m4 b/m4/stack-direction.m4 +--- a/m4/stack-direction.m4 2009-11-21 12:22:45.000000000 +0000 ++++ b/m4/stack-direction.m4 2013-11-04 09:29:27.558036038 +0000 +@@ -16,7 +16,7 @@ AC_DEFUN([SV_STACK_DIRECTION], + alpha* | \ + arc | \ + arm* | strongarm* | xscale* | \ +- avr | \ ++ avr | avr32 | \ + c1 | c2 | c32 | c34 | c38 | \ + clipper | \ + cris | \ diff --git a/package/libsigsegv/libsigsegv-0002-fix-aarch64-build.patch b/package/libsigsegv/libsigsegv-0002-fix-aarch64-build.patch new file mode 100644 index 0000000000..a916e9d343 --- /dev/null +++ b/package/libsigsegv/libsigsegv-0002-fix-aarch64-build.patch @@ -0,0 +1,31 @@ +From 2a2dac797cc41fb3f106c4186fc68d3e15b4ea47 Mon Sep 17 00:00:00 2001 +From: Will Newton +Date: Tue, 28 May 2013 18:31:46 +0100 +Subject: [PATCH] m4/stack-direction.m4: AArch64 stack grows down. + +Submitted-Upstream: https://lists.gnu.org/archive/html/bug-libsigsegv/2013-05/msg00001.html + +ChangeLog: + +2013-05-28 Will Newton + + * m4/stack-direction.m4: AArch64 stack grows down. +--- + m4/stack-direction.m4 | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/m4/stack-direction.m4 b/m4/stack-direction.m4 +index 00e0445..890b77e 100644 +--- a/m4/stack-direction.m4 ++++ b/m4/stack-direction.m4 +@@ -13,6 +13,7 @@ AC_DEFUN([SV_STACK_DIRECTION], + case "$host_cpu" in + dnl See the #define STACK_GROWS_DOWNWARD in gcc-3.1/gcc/config/*/*.h. + a29k | \ ++ aarch64* | \ + alpha* | \ + arc | \ + arm* | strongarm* | xscale* | \ +-- +1.8.1.4 + diff --git a/package/libsigsegv/libsigsegv.mk b/package/libsigsegv/libsigsegv.mk new file mode 100644 index 0000000000..a5bb31c9cf --- /dev/null +++ b/package/libsigsegv/libsigsegv.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libsigsegv +# +################################################################################ + +LIBSIGSEGV_VERSION = 2.10 +LIBSIGSEGV_SITE = $(BR2_GNU_MIRROR)/libsigsegv +LIBSIGSEGV_INSTALL_STAGING = YES +LIBSIGSEGV_CONF_ENV = sv_cv_fault_posix=yes +LIBSIGSEGV_LICENSE = GPLv2+ +LIBSIGSEGV_LICENSE_FILES = COPYING + +LIBSIGSEGV_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/libsndfile/Config.in b/package/libsndfile/Config.in new file mode 100644 index 0000000000..28e366aa9c --- /dev/null +++ b/package/libsndfile/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_LIBSNDFILE + bool "libsndfile" + # The absence of largefile doesn't prevent libsndfile to + # build, but at runtime the code assumes that off_t is 64 + # bits, and asserts if not. + depends on BR2_LARGEFILE + help + Libsndfile is a C library for reading and writing files containing + sampled sound (such as MS Windows WAV and the Apple/SGI AIFF format) + through one standard library interface. + + http://www.mega-nerd.com/libsndfile/ + +comment "libsndfile needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE diff --git a/package/multimedia/libsndfile/libsndfile-srconly.patch b/package/libsndfile/libsndfile-srconly.patch similarity index 100% rename from package/multimedia/libsndfile/libsndfile-srconly.patch rename to package/libsndfile/libsndfile-srconly.patch diff --git a/package/libsndfile/libsndfile.mk b/package/libsndfile/libsndfile.mk new file mode 100644 index 0000000000..97a8c17d8f --- /dev/null +++ b/package/libsndfile/libsndfile.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# libsndfile +# +################################################################################ + +LIBSNDFILE_VERSION = 1.0.25 +LIBSNDFILE_SITE = http://www.mega-nerd.com/libsndfile/files +LIBSNDFILE_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libsoc/Config.in b/package/libsoc/Config.in new file mode 100644 index 0000000000..2aaeb1fe9a --- /dev/null +++ b/package/libsoc/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBSOC + bool "libsoc" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + libsoc is a C library for interfacing with common SoC + peripherals through generic kernel interfaces + + https://github.com/jackmitch/libsoc + +comment "libsoc needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libsoc/libsoc.mk b/package/libsoc/libsoc.mk new file mode 100644 index 0000000000..79c7e90006 --- /dev/null +++ b/package/libsoc/libsoc.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libsoc +# +################################################################################ + +LIBSOC_VERSION = 0.4 +LIBSOC_SITE = http://github.com/jackmitch/libsoc/tarball/$(LIBSOC_VERSION) +LIBSOC_LICENSE = LGPLv2.1 +LIBSOC_LICENSE_FILES = COPYING +LIBSOC_AUTORECONF = YES +LIBSOC_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libsoup/Config.in b/package/libsoup/Config.in index 2264b63cce..874f50cc1a 100644 --- a/package/libsoup/Config.in +++ b/package/libsoup/Config.in @@ -1,10 +1,11 @@ config BR2_PACKAGE_LIBSOUP bool "libsoup" - depends on BR2_USE_WCHAR # glib2 + depends on BR2_USE_WCHAR # glib2 and gnutls + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 select BR2_PACKAGE_LIBXML2 select BR2_PACKAGE_LIBGLIB2 - select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT - select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT + select BR2_PACKAGE_SQLITE help libsoup is an HTTP client/server library. It uses GObject and the GLib main loop, to integrate well with GNOME @@ -12,5 +13,17 @@ config BR2_PACKAGE_LIBSOUP http://live.gnome.org/LibSoup -comment "libsoup requires a toolchain with WCHAR support" - depends on !BR2_USE_WCHAR +if BR2_PACKAGE_LIBSOUP + +config BR2_PACKAGE_LIBSOUP_SSL + bool "https support" + select BR2_PACKAGE_GLIB_NETWORKING + select BR2_PACKAGE_GNUTLS + help + Enable HTTPS (SSL) support. + +endif + +comment "libsoup needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libsoup/libsoup.mk b/package/libsoup/libsoup.mk index 132ea34a9e..d847f24bc6 100644 --- a/package/libsoup/libsoup.mk +++ b/package/libsoup/libsoup.mk @@ -1,13 +1,16 @@ -############################################################# +################################################################################ # # libsoup # -############################################################# +################################################################################ -LIBSOUP_MAJOR_VERSION:=2.31 -LIBSOUP_VERSION:=$(LIBSOUP_MAJOR_VERSION).2 -LIBSOUP_SOURCE:=libsoup-$(LIBSOUP_VERSION).tar.bz2 -LIBSOUP_SITE:=http://ftp.gnome.org/pub/gnome/sources/libsoup/$(LIBSOUP_MAJOR_VERSION) +LIBSOUP_MAJOR_VERSION = 2.43 +LIBSOUP_MINOR_VERSION = 1 +LIBSOUP_VERSION = $(LIBSOUP_MAJOR_VERSION).$(LIBSOUP_MINOR_VERSION) +LIBSOUP_SOURCE = libsoup-$(LIBSOUP_VERSION).tar.xz +LIBSOUP_SITE = http://ftp.gnome.org/pub/gnome/sources/libsoup/$(LIBSOUP_MAJOR_VERSION) +LIBSOUP_LICENSE = LGPLv2+ +LIBSOUP_LICENSE_FILES = COPYING LIBSOUP_INSTALL_STAGING = YES LIBSOUP_CONF_ENV = ac_cv_path_GLIB_GENMARSHAL=$(LIBGLIB2_HOST_BINARY) @@ -16,14 +19,15 @@ ifneq ($(BR2_INET_IPV6),y) LIBSOUP_CONF_ENV += soup_cv_ipv6=no endif -LIBSOUP_CONF_OPT = \ - --enable-shared \ - --enable-static \ - --disable-explicit-deps \ - --disable-glibtest \ - --disable-ssl \ - --without-gnome +LIBSOUP_CONF_OPT = --disable-glibtest --without-gnome -LIBSOUP_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl) host-pkg-config host-libglib2 libglib2 libxml2 +LIBSOUP_DEPENDENCIES = host-pkgconf host-libglib2 \ + libglib2 libxml2 sqlite host-intltool -$(eval $(call AUTOTARGETS,package,libsoup)) +ifeq ($(BR2_PACKAGE_LIBSOUP_SSL),y) +LIBSOUP_DEPENDENCIES += glib-networking +else +LIBSOUP_CONF_OPT += --disable-tls-check +endif + +$(eval $(autotools-package)) diff --git a/package/libssh2/Config.in b/package/libssh2/Config.in new file mode 100644 index 0000000000..017fd4061a --- /dev/null +++ b/package/libssh2/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBSSH2 + bool "libssh2" + select BR2_PACKAGE_LIBGCRYPT if !BR2_PACKAGE_OPENSSL + help + libssh2 is a client-side C library implementing the SSH2 + protocol as defined by Internet Drafts: SECSH-TRANS(22), + SECSH-USERAUTH(25), SECSH-CONNECTION(23), SECSH-ARCH(20), + SECSH-FILEXFER(06)*, SECSH-DHGEX(04), and SECSH-NUMBERS(10) + + http://www.libssh2.org/ diff --git a/package/libssh2/libssh2.mk b/package/libssh2/libssh2.mk new file mode 100644 index 0000000000..19df9af9d6 --- /dev/null +++ b/package/libssh2/libssh2.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# libssh2 +# +################################################################################ + +LIBSSH2_VERSION = 1.4.3 +LIBSSH2_SITE = http://www.libssh2.org/download/ +LIBSSH2_LICENSE = BSD +LIBSSH2_LICENSE_FILES = COPYING +LIBSSH2_INSTALL_STAGING = YES +LIBSSH2_CONF_OPT = --disable-examples-build + +# libssh2 must use either libgcrypt or OpenSSL +# Only select openssl if libgcrypt is not selected +ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +LIBSSH2_DEPENDENCIES += libgcrypt +LIBSSH2_CONF_OPT += --with-libgcrypt \ + --with-libgcrypt-prefix=$(STAGING_DIR)/usr \ + --without-openssl +else +LIBSSH2_DEPENDENCIES += openssl +LIBSSH2_CONF_OPT += --with-openssl \ + --with-libssl-prefix=$(STAGING_DIR)/usr \ + --without-libgcrypt +endif + +# Add zlib support if enabled +ifeq ($(BR2_PACKAGE_ZLIB),y) +LIBSSH2_DEPENDENCIES += zlib +LIBSSH2_CONF_OPT += --with-libz +else +LIBSSH2_CONF_OPT += --without-libz +endif + +$(eval $(autotools-package)) diff --git a/package/libsvg-cairo/Config.in b/package/libsvg-cairo/Config.in new file mode 100644 index 0000000000..9577c69bf0 --- /dev/null +++ b/package/libsvg-cairo/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBSVG_CAIRO + bool "libsvg-cairo" + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_CAIRO_SVG + select BR2_PACKAGE_LIBSVG + help + Libsvg-cairo provides the ability to render SVG content from + files or buffers. All rendering is performed using the cairo + rendering library. + + http://cairographics.org diff --git a/package/libsvg-cairo/libsvg-cairo.mk b/package/libsvg-cairo/libsvg-cairo.mk new file mode 100644 index 0000000000..a1681800ec --- /dev/null +++ b/package/libsvg-cairo/libsvg-cairo.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libsvg-cairo +# +################################################################################ + +LIBSVG_CAIRO_VERSION = 0.1.6 +LIBSVG_CAIRO_SITE = http://cairographics.org/snapshots/ +LIBSVG_CAIRO_DEPENDENCIES = cairo libsvg +LIBSVG_CAIRO_INSTALL_STAGING = YES +LIBSVG_CAIRO_LICENSE = LGPLv2.1+ +LIBSVG_CAIRO_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libsvg/Config.in b/package/libsvg/Config.in new file mode 100644 index 0000000000..e3a5e729d0 --- /dev/null +++ b/package/libsvg/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBSVG + bool "libsvg" + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_LIBJPEG + select BR2_PACKAGE_LIBXML2 if !BR2_PACKAGE_EXPAT + help + Libsvg provides a parser for SVG content in files or buffers. + Libsvg does not do any rendering, but instead provides a + function-based interface that can be used by various rendering + engines. + + http://cairographics.org/snapshots/ diff --git a/package/libsvg/libsvg-fix-expat-static-declaration.patch b/package/libsvg/libsvg-fix-expat-static-declaration.patch new file mode 100644 index 0000000000..58ef286729 --- /dev/null +++ b/package/libsvg/libsvg-fix-expat-static-declaration.patch @@ -0,0 +1,33 @@ +Newer expat versions use different declarations of the following functions: + +static void _svg_parser_sax_start_element (); +static void _svg_parser_sax_end_element (); +static void _svg_parser_sax_characters (); + +We need to patch the libsvg source to not follow into a build error like + "static declaration of 'foo' follows non-static declaration" +and use the functions from the expat library instead from the libsvg source. + +Patch based on +http://oe-lite.org/redmine/projects/xorg/repository/revisions/c4df7951e846e1be718f37f2455696a1d0861f3d/entry/recipes/cairo/libsvg-0.1.4/gcc4_and_expat.patch + +Signed-off-by: Carsten Schoenert + +diff -bur libsvg-0.1.4~orig/src/svg_parser_expat.c libsvg-0.1.4/src/svg_parser_expat.c +--- libsvg-0.1.4~orig/src/svg_parser_expat.c 2005-02-14 11:26:26.000000000 -0600 ++++ libsvg-0.1.4/src/svg_parser_expat.c 2006-02-10 21:58:20.000000000 -0600 +@@ -30,6 +30,7 @@ + #include "svgint.h" + #include "svg_hash.h" + ++#ifndef LIBSVG_EXPAT + static void + _svg_parser_sax_start_element (void *closure, + const XML_Char *name, +@@ -43,6 +44,7 @@ + _svg_parser_sax_characters (void *closure, + const XML_Char *ch, + int len); ++#endif + + static void diff --git a/package/libsvg/libsvg.mk b/package/libsvg/libsvg.mk new file mode 100644 index 0000000000..70696478c9 --- /dev/null +++ b/package/libsvg/libsvg.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# libsvg +# +################################################################################ + +LIBSVG_VERSION = 0.1.4 +LIBSVG_SITE = http://cairographics.org/snapshots/ +LIBSVG_DEPENDENCIES = host-pkgconf libpng libjpeg +LIBSVG_INSTALL_STAGING = YES +LIBSVG_LICENSE = LGPLv2+ +LIBSVG_LICENSE_FILES = COPYING + +# libsvg needs at last a XML parser +ifeq ($(BR2_PACKAGE_EXPAT),y) +LIBSVG_CONF_OPT += --with-expat +LIBSVG_DEPENDENCIES += expat +else +LIBSVG_CONF_OPT += --with-libxml2 +LIBSVG_DEPENDENCIES += libxml2 +endif + +$(eval $(autotools-package)) diff --git a/package/libsvgtiny/libsvgtiny.mk b/package/libsvgtiny/libsvgtiny.mk index d9ac41b44e..df85726b44 100644 --- a/package/libsvgtiny/libsvgtiny.mk +++ b/package/libsvgtiny/libsvgtiny.mk @@ -1,15 +1,13 @@ -############################################################ +################################################################################ # # libsvgtiny # -############################################################ +################################################################################ LIBSVGTINY_SITE = svn://svn.netsurf-browser.org/trunk/libsvgtiny -LIBSVGTINY_VERSION = 9800 - +LIBSVGTINY_VERSION = 12121 LIBSVGTINY_INSTALL_STAGING = YES -LIBSVGTINY_INSTALL_TARGET = YES -LIBSVGTINY_DEPENDENCIES = libxml2 host-gperf host-pkg-config +LIBSVGTINY_DEPENDENCIES = libxml2 host-gperf host-pkgconf define LIBSVGTINY_BUILD_CMDS $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) PREFIX=/usr @@ -39,4 +37,4 @@ define LIBSVGTINY_CLEAN_CMDS $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) clean endef -$(eval $(call GENTARGETS,package,libsvgtiny)) +$(eval $(generic-package)) diff --git a/package/libsysfs/libsysfs.mk b/package/libsysfs/libsysfs.mk index f8233fe313..6bd3c5c6a6 100644 --- a/package/libsysfs/libsysfs.mk +++ b/package/libsysfs/libsysfs.mk @@ -1,29 +1,12 @@ -############################################################# +################################################################################ # # libsysfs # -############################################################# -# Copyright (C) 2001-2003 by Erik Andersen -# Copyright (C) 2002 by Tim Riker -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Library General Public License as -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public -# License along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA +################################################################################ -LIBSYSFS_VERSION:=2.1.0 -LIBSYSFS_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/linux-diag -LIBSYSFS_SOURCE:=sysfsutils-$(LIBSYSFS_VERSION).tar.gz -LIBSYSFS_INSTALL_STAGING=YES +LIBSYSFS_VERSION = 2.1.0 +LIBSYSFS_SITE = http://downloads.sourceforge.net/project/linux-diag/sysfsutils/$(LIBSYSFS_VERSION) +LIBSYSFS_SOURCE = sysfsutils-$(LIBSYSFS_VERSION).tar.gz +LIBSYSFS_INSTALL_STAGING = YES -$(eval $(call AUTOTARGETS,package,libsysfs)) +$(eval $(autotools-package)) diff --git a/package/libtasn1/Config.in b/package/libtasn1/Config.in new file mode 100644 index 0000000000..181fc69895 --- /dev/null +++ b/package/libtasn1/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBTASN1 + bool "libtasn1" + help + ASN.1 library + + http://www.gnu.org/software/libtasn1 diff --git a/package/libtasn1/libtasn1.mk b/package/libtasn1/libtasn1.mk new file mode 100644 index 0000000000..12c4e3b277 --- /dev/null +++ b/package/libtasn1/libtasn1.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libtasn1 +# +################################################################################ + +LIBTASN1_VERSION = 3.2 +LIBTASN1_SITE = http://ftp.gnu.org/gnu/libtasn1 +LIBTASN1_DEPENDENCIES = host-bison +LIBTASN1_LICENSE = GPLv3+ LGPLv2.1+ +LIBTASN1_LICENSE_FILES = COPYING COPYING.LIB +LIBTASN1_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/multimedia/libtheora/Config.in b/package/libtheora/Config.in similarity index 100% rename from package/multimedia/libtheora/Config.in rename to package/libtheora/Config.in diff --git a/package/libtheora/libtheora.mk b/package/libtheora/libtheora.mk new file mode 100644 index 0000000000..39602c1d38 --- /dev/null +++ b/package/libtheora/libtheora.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# libtheora +# +################################################################################ + +LIBTHEORA_VERSION = 1.1.1 +LIBTHEORA_SOURCE = libtheora-$(LIBTHEORA_VERSION).tar.xz +LIBTHEORA_SITE = http://downloads.xiph.org/releases/theora +LIBTHEORA_INSTALL_STAGING = YES +LIBTHEORA_LICENSE = BSD-3c +LIBTHEORA_LICENSE_FILES = COPYING LICENSE + +LIBTHEORA_CONF_OPT = \ + --disable-oggtest \ + --disable-vorbistest \ + --disable-sdltest \ + --disable-examples \ + --disable-spec + +LIBTHEORA_DEPENDENCIES = libogg libvorbis host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/libtirpc/Config.in b/package/libtirpc/Config.in new file mode 100644 index 0000000000..a6759e70d3 --- /dev/null +++ b/package/libtirpc/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_LIBTIRPC + bool "libtirpc" + # uClibc toolchains provided by ADI don't have AI_ADDRCONFIG + # support. Note that since they provide native RPC support, we + # don't need to propagate this dependency to reverse + # dependencies of libtirpc for which native RPC support can be + # used instead of libtirpc. + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 && \ + !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1 + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Libtirpc is a port of Sun's Transport-Independent RPC + library to Linux. + + http://sourceforge.net/projects/libtirpc/ + +comment "libtirpc needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 && \ + !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1 + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libtirpc/libtirpc-0001-Disable-parts-of-TIRPC-requiring-NIS-support.patch b/package/libtirpc/libtirpc-0001-Disable-parts-of-TIRPC-requiring-NIS-support.patch new file mode 100644 index 0000000000..7caccc25bd --- /dev/null +++ b/package/libtirpc/libtirpc-0001-Disable-parts-of-TIRPC-requiring-NIS-support.patch @@ -0,0 +1,70 @@ +From cc4ec3294cb06724c83d4c4e1ea9fc2e38923c98 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 23 Jun 2012 21:57:39 +0200 +Subject: [PATCH] Disable parts of TIRPC requiring NIS support + +Signed-off-by: Thomas Petazzoni +--- + src/Makefile.am | 3 +-- + src/rpc_soc.c | 2 ++ + tirpc/rpc/auth.h | 3 +++ + 3 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 7ee8cbc..6d36b93 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -49,8 +49,7 @@ libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c bindresvport.c cln + pmap_prot.c pmap_prot2.c pmap_rmt.c rpc_prot.c rpc_commondata.c \ + rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \ + rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_generic.c \ +- svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \ +- auth_time.c auth_des.c authdes_prot.c des_crypt.c ++ svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c + + ## XDR + libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c +diff --git a/src/rpc_soc.c b/src/rpc_soc.c +index c678429..27f2136 100644 +--- a/src/rpc_soc.c ++++ b/src/rpc_soc.c +@@ -515,6 +515,7 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) + (resultproc_t) rpc_wrap_bcast, "udp"); + } + ++#if 0 + /* + * Create the client des authentication object. Obsoleted by + * authdes_seccreate(). +@@ -546,6 +547,7 @@ fallback: + dummy = authdes_seccreate(servername, window, NULL, ckey); + return (dummy); + } ++#endif + + /* + * Create a client handle for a unix connection. Obsoleted by clnt_vc_create() +diff --git a/tirpc/rpc/auth.h b/tirpc/rpc/auth.h +index 734e6b9..6e7e54e 100644 +--- a/tirpc/rpc/auth.h ++++ b/tirpc/rpc/auth.h +@@ -282,6 +282,8 @@ extern AUTH *authunix_create(char *, uid_t, uid_t, int, uid_t *); + extern AUTH *authunix_create_default(void); /* takes no parameters */ + extern AUTH *authnone_create(void); /* takes no parameters */ + __END_DECLS ++ ++#if 0 + /* + * DES style authentication + * AUTH *authsecdes_create(servername, window, timehost, ckey) +@@ -295,6 +297,7 @@ extern AUTH *authdes_create (char *, u_int, struct sockaddr *, des_block *); + extern AUTH *authdes_seccreate (const char *, const u_int, const char *, + const des_block *); + __END_DECLS ++#endif + + __BEGIN_DECLS + extern bool_t xdr_opaque_auth (XDR *, struct opaque_auth *); +-- +1.7.9.5 + diff --git a/package/libtirpc/libtirpc-0002-uClibc-without-RPC-support-does-not-install-rpcent.h.patch b/package/libtirpc/libtirpc-0002-uClibc-without-RPC-support-does-not-install-rpcent.h.patch new file mode 100644 index 0000000000..3ad25afe3b --- /dev/null +++ b/package/libtirpc/libtirpc-0002-uClibc-without-RPC-support-does-not-install-rpcent.h.patch @@ -0,0 +1,29 @@ +From c2e96bdc453334f10faf8db0eb06e41ab3ca4fe9 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 23 Jun 2012 21:58:07 +0200 +Subject: [PATCH] uClibc without RPC support does not install rpcent.h + +Signed-off-by: Thomas Petazzoni +--- + tirpc/rpc/rpcent.h | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/tirpc/rpc/rpcent.h b/tirpc/rpc/rpcent.h +index 7fd93d9..8ce05ed 100644 +--- a/tirpc/rpc/rpcent.h ++++ b/tirpc/rpc/rpcent.h +@@ -46,8 +46,9 @@ + + __BEGIN_DECLS + +-/* These are defined in /usr/include/rpc/netdb.h */ +-#if 0 ++/* These are defined in /usr/include/rpc/netdb.h, unless we are using ++ the C library without RPC support. */ ++#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_RPC__) + struct rpcent { + char *r_name; /* name of server for this rpc program */ + char **r_aliases; /* alias list */ +-- +1.7.9.5 + diff --git a/package/libtirpc/libtirpc-0003-Add-missing-INET6-conditional.patch b/package/libtirpc/libtirpc-0003-Add-missing-INET6-conditional.patch new file mode 100644 index 0000000000..a05d7ad9af --- /dev/null +++ b/package/libtirpc/libtirpc-0003-Add-missing-INET6-conditional.patch @@ -0,0 +1,60 @@ +From a40e00a16cf43245953ad6d43a4f260a47e6d198 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 23 Jun 2012 21:58:36 +0200 +Subject: [PATCH] Add missing INET6 conditional + +Signed-off-by: Thomas Petazzoni +--- + src/rpc_generic.c | 2 ++ + src/svc_dg.c | 4 ++++ + 2 files changed, 6 insertions(+) + +diff --git a/src/rpc_generic.c b/src/rpc_generic.c +index 509fb36..2eb91ad 100644 +--- a/src/rpc_generic.c ++++ b/src/rpc_generic.c +@@ -535,7 +535,9 @@ __rpc_nconf2fd_flags(const struct netconfig *nconf, int flags) + si.si_af == AF_INET6) { + int val = 1; + ++#ifdef INET6 + setsockopt(fd, SOL_IPV6, IPV6_V6ONLY, &val, sizeof(val)); ++#endif + } + return fd; + } +diff --git a/src/svc_dg.c b/src/svc_dg.c +index 66a56ee..e8faf33 100644 +--- a/src/svc_dg.c ++++ b/src/svc_dg.c +@@ -627,9 +627,11 @@ svc_dg_enable_pktinfo(int fd, const struct __rpc_sockinfo *si) + (void) setsockopt(fd, SOL_IP, IP_PKTINFO, &val, sizeof(val)); + break; + ++#ifdef INET6 + case AF_INET6: + (void) setsockopt(fd, SOL_IPV6, IPV6_PKTINFO, &val, sizeof(val)); + break; ++#endif + } + } + +@@ -667,6 +669,7 @@ svc_dg_valid_pktinfo(struct msghdr *msg) + } + break; + ++#ifdef INET6 + case AF_INET6: + if (cmsg->cmsg_level != SOL_IPV6 + || cmsg->cmsg_type != IPV6_PKTINFO +@@ -679,6 +682,7 @@ svc_dg_valid_pktinfo(struct msghdr *msg) + pkti->ipi6_ifindex = 0; + } + break; ++#endif + + default: + return 0; +-- +1.7.9.5 + diff --git a/package/libtirpc/libtirpc-0004-Make-IPv6-support-optional.patch b/package/libtirpc/libtirpc-0004-Make-IPv6-support-optional.patch new file mode 100644 index 0000000000..c93fea2c5c --- /dev/null +++ b/package/libtirpc/libtirpc-0004-Make-IPv6-support-optional.patch @@ -0,0 +1,43 @@ +From 5ce585bed328fafc99800effb5e9d1b07dbac2b7 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sun, 24 Jun 2012 21:40:21 +0200 +Subject: [PATCH] Make IPv6 support optional + +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 5 +++++ + src/Makefile.am | 2 +- + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 97c6f2c..487ec83 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -22,6 +22,11 @@ AC_PROG_LIBTOOL + AC_HEADER_DIRENT + AC_PREFIX_DEFAULT(/usr) + AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h locale.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h]) ++ ++AC_CHECK_HEADER(netinet/ip6.h, ++ AC_DEFINE(INET6, 1, [Define to 1 if IPv6 is available]), ++ [AC_MSG_WARN([no IPv6])]) ++ + AC_CHECK_LIB([pthread], [pthread_create]) + + +diff --git a/src/Makefile.am b/src/Makefile.am +index 6d36b93..6dc259e 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -6,7 +6,7 @@ + ## anything like that. + + +-INCLUDES = -I$(top_srcdir)/tirpc -DPORTMAP -DINET6 -DVERSION="\"$(VERSION)\"" \ ++INCLUDES = -I$(top_srcdir)/tirpc -DPORTMAP -DVERSION="\"$(VERSION)\"" \ + -D_GNU_SOURCE -Wall -pipe + + lib_LTLIBRARIES = libtirpc.la +-- +1.7.9.5 + diff --git a/package/libtirpc/libtirpc-0005-rpcent-mark-getrpcbyname-name-argument-as-const-char.patch b/package/libtirpc/libtirpc-0005-rpcent-mark-getrpcbyname-name-argument-as-const-char.patch new file mode 100644 index 0000000000..b1865aee70 --- /dev/null +++ b/package/libtirpc/libtirpc-0005-rpcent-mark-getrpcbyname-name-argument-as-const-char.patch @@ -0,0 +1,43 @@ +From 88147b753b86df7e7505ef8150f1329f7c6951cc Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Fri, 9 Nov 2012 19:37:24 +0100 +Subject: [PATCH] rpcent: mark getrpcbyname name argument as const char * + +This allows to match the glibc prototype and avoid compiling error +when building libtirpc against a C library that has RPC support. + +Signed-off-by: Thomas Petazzoni +--- + src/getrpcent.c | 2 +- + tirpc/rpc/rpcent.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/getrpcent.c b/src/getrpcent.c +index 645f18f..1b54b6d 100644 +--- a/src/getrpcent.c ++++ b/src/getrpcent.c +@@ -138,7 +138,7 @@ no_yp: + + struct rpcent * + getrpcbyname(name) +- char *name; ++ const char *name; + { + struct rpcent *rpc = NULL; + char **rp; +diff --git a/tirpc/rpc/rpcent.h b/tirpc/rpc/rpcent.h +index 8ce05ed..120801d 100644 +--- a/tirpc/rpc/rpcent.h ++++ b/tirpc/rpc/rpcent.h +@@ -61,7 +61,7 @@ extern struct rpcent *getrpcbynumber_r(int, struct rpcent *, char *, int); + extern struct rpcent *getrpcent_r(struct rpcent *, char *, int); + + /* Old interfaces that return a pointer to a static area; MT-unsafe */ +-extern struct rpcent *getrpcbyname(char *); ++extern struct rpcent *getrpcbyname(const char *); + extern struct rpcent *getrpcbynumber(int); + extern struct rpcent *getrpcent(void); + #endif +-- +1.7.9.5 + diff --git a/package/libtirpc/libtirpc-0006-rpcent-remove-prototypes-of-reentrant-variants.patch b/package/libtirpc/libtirpc-0006-rpcent-remove-prototypes-of-reentrant-variants.patch new file mode 100644 index 0000000000..1fdc310efb --- /dev/null +++ b/package/libtirpc/libtirpc-0006-rpcent-remove-prototypes-of-reentrant-variants.patch @@ -0,0 +1,33 @@ +From 8e02780905a3e13405a5a1b9f5b2e77655d5c7fb Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 10 Nov 2012 00:05:23 +0100 +Subject: [PATCH] rpcent: remove prototypes of reentrant variants + +The reentrant variants of getrpcbynumber() and al. are not implemented +by libtirpc, so there is no point in advertising them in this header +file. + +Signed-off-by: Thomas Petazzoni +--- + tirpc/rpc/rpcent.h | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/tirpc/rpc/rpcent.h b/tirpc/rpc/rpcent.h +index 120801d..45775ed 100644 +--- a/tirpc/rpc/rpcent.h ++++ b/tirpc/rpc/rpcent.h +@@ -55,11 +55,6 @@ struct rpcent { + int r_number; /* rpc program number */ + }; + +-extern struct rpcent *getrpcbyname_r(const char *, struct rpcent *, +- char *, int); +-extern struct rpcent *getrpcbynumber_r(int, struct rpcent *, char *, int); +-extern struct rpcent *getrpcent_r(struct rpcent *, char *, int); +- + /* Old interfaces that return a pointer to a static area; MT-unsafe */ + extern struct rpcent *getrpcbyname(const char *); + extern struct rpcent *getrpcbynumber(int); +-- +1.7.9.5 + diff --git a/package/libtirpc/libtirpc-0007-doc-Makefile.am-fix-out-of-tree-installation.patch b/package/libtirpc/libtirpc-0007-doc-Makefile.am-fix-out-of-tree-installation.patch new file mode 100644 index 0000000000..c31992c121 --- /dev/null +++ b/package/libtirpc/libtirpc-0007-doc-Makefile.am-fix-out-of-tree-installation.patch @@ -0,0 +1,24 @@ +From 4cf0371c96abf83483835daf50d3fc3bf793bdc4 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 10 Nov 2012 17:29:12 +0100 +Subject: [PATCH] doc/Makefile.am: fix out-of-tree installation + +Signed-off-by: Thomas Petazzoni +--- + doc/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/doc/Makefile.am b/doc/Makefile.am +index cc4fa76..bac7c0f 100644 +--- a/doc/Makefile.am ++++ b/doc/Makefile.am +@@ -1,5 +1,5 @@ + + install: install-am + $(mkinstalldirs) $(DESTDIR)/etc +- cp -p ./etc_netconfig $(DESTDIR)/etc/netconfig ++ cp -p $(srcdir)/etc_netconfig $(DESTDIR)/etc/netconfig + chmod 0644 $(DESTDIR)/etc/netconfig +-- +1.7.9.5 + diff --git a/package/libtirpc/libtirpc-0008-Add-rpcgen-program-from-nfs-utils-sources.patch b/package/libtirpc/libtirpc-0008-Add-rpcgen-program-from-nfs-utils-sources.patch new file mode 100644 index 0000000000..27c60649da --- /dev/null +++ b/package/libtirpc/libtirpc-0008-Add-rpcgen-program-from-nfs-utils-sources.patch @@ -0,0 +1,6504 @@ +From 8a1ee148ea860c20fa4e076839e5681412a11f7e Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 10 Nov 2012 16:21:01 +0100 +Subject: [PATCH] Add rpcgen program from nfs-utils sources + +Signed-off-by: Thomas Petazzoni +--- + Makefile.am | 2 +- + configure.ac | 12 +- + rpcgen/Makefile.am | 22 ++ + rpcgen/rpc_clntout.c | 217 ++++++++++ + rpcgen/rpc_cout.c | 706 +++++++++++++++++++++++++++++++++ + rpcgen/rpc_hout.c | 490 +++++++++++++++++++++++ + rpcgen/rpc_main.c | 1067 ++++++++++++++++++++++++++++++++++++++++++++++++++ + rpcgen/rpc_output.h | 16 + + rpcgen/rpc_parse.c | 609 ++++++++++++++++++++++++++++ + rpcgen/rpc_parse.h | 166 ++++++++ + rpcgen/rpc_sample.c | 247 ++++++++++++ + rpcgen/rpc_scan.c | 474 ++++++++++++++++++++++ + rpcgen/rpc_scan.h | 103 +++++ + rpcgen/rpc_svcout.c | 882 +++++++++++++++++++++++++++++++++++++++++ + rpcgen/rpc_tblout.c | 165 ++++++++ + rpcgen/rpc_util.c | 479 ++++++++++++++++++++++ + rpcgen/rpc_util.h | 166 ++++++++ + rpcgen/rpcgen.1 | 521 ++++++++++++++++++++++++ + 18 files changed, 6342 insertions(+), 2 deletions(-) + create mode 100644 rpcgen/Makefile.am + create mode 100644 rpcgen/rpc_clntout.c + create mode 100644 rpcgen/rpc_cout.c + create mode 100644 rpcgen/rpc_hout.c + create mode 100644 rpcgen/rpc_main.c + create mode 100644 rpcgen/rpc_output.h + create mode 100644 rpcgen/rpc_parse.c + create mode 100644 rpcgen/rpc_parse.h + create mode 100644 rpcgen/rpc_sample.c + create mode 100644 rpcgen/rpc_scan.c + create mode 100644 rpcgen/rpc_scan.h + create mode 100644 rpcgen/rpc_svcout.c + create mode 100644 rpcgen/rpc_tblout.c + create mode 100644 rpcgen/rpc_util.c + create mode 100644 rpcgen/rpc_util.h + create mode 100644 rpcgen/rpcgen.1 + +diff --git a/Makefile.am b/Makefile.am +index 1a7596b..afb4e38 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = src man doc ++SUBDIRS = src man doc rpcgen + ACLOCAL_AMFLAGS = -I m4 + + nobase_include_HEADERS = tirpc/netconfig.h \ +diff --git a/configure.ac b/configure.ac +index 487ec83..7f35b48 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -29,6 +29,16 @@ AC_CHECK_HEADER(netinet/ip6.h, + + AC_CHECK_LIB([pthread], [pthread_create]) + ++AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes) + +-AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile]) ++AC_MSG_CHECKING([for a C compiler for build tools]) ++if test $cross_compiling = yes; then ++ AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc) ++else ++ CC_FOR_BUILD=$CC ++fi ++AC_MSG_RESULT([$CC_FOR_BUILD]) ++AC_SUBST(CC_FOR_BUILD) ++ ++AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile rpcgen/Makefile]) + AC_OUTPUT(libtirpc.pc) +diff --git a/rpcgen/Makefile.am b/rpcgen/Makefile.am +new file mode 100644 +index 0000000..2277b6f +--- /dev/null ++++ b/rpcgen/Makefile.am +@@ -0,0 +1,22 @@ ++COMPILE = $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ ++ $(CPPFLAGS_FOR_BUILD) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) ++LINK = $(CC_FOR_BUILD) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ ++ ++bin_PROGRAMS = rpcgen ++ ++rpcgen_SOURCES = \ ++ rpc_clntout.c \ ++ rpc_cout.c \ ++ rpc_hout.c \ ++ rpc_main.c \ ++ rpc_parse.c \ ++ rpc_sample.c \ ++ rpc_scan.c \ ++ rpc_svcout.c \ ++ rpc_tblout.c \ ++ rpc_util.c \ ++ rpc_parse.h \ ++ rpc_scan.h \ ++ rpc_util.h ++ ++dist_man1_MANS = rpcgen.1 +diff --git a/rpcgen/rpc_clntout.c b/rpcgen/rpc_clntout.c +new file mode 100644 +index 0000000..e2f4382 +--- /dev/null ++++ b/rpcgen/rpc_clntout.c +@@ -0,0 +1,217 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#if 0 ++static char sccsid[] = "@(#)rpc_clntout.c 1.11 89/02/22 (C) 1987 SMI"; ++#endif ++ ++/* ++ * rpc_clntout.c, Client-stub outputter for the RPC protocol compiler ++ * Copyright (C) 1987, Sun Microsytsems, Inc. ++ */ ++#include ++#include ++#include ++#include "rpc_parse.h" ++#include "rpc_util.h" ++#include "rpc_output.h" ++ ++/* extern pdeclaration(); */ ++/* void printarglist(); */ ++ ++#define DEFAULT_TIMEOUT 25 /* in seconds */ ++static char RESULT[] = "clnt_res"; ++ ++static void write_program(definition *def); ++static void printbody(proc_list *proc); ++ ++ ++void ++write_stubs(void) ++{ ++ list *l; ++ definition *def; ++ ++ f_print(fout, ++ "\n/* Default timeout can be changed using clnt_control() */\n"); ++ f_print(fout, "static struct timeval TIMEOUT = { %d, 0 };\n", ++ DEFAULT_TIMEOUT); ++ for (l = defined; l != NULL; l = l->next) { ++ def = (definition *) l->val; ++ if (def->def_kind == DEF_PROGRAM) { ++ write_program(def); ++ } ++ } ++} ++ ++static void ++write_program(definition *def) ++{ ++ version_list *vp; ++ proc_list *proc; ++ ++ for (vp = def->def.pr.versions; vp != NULL; vp = vp->next) { ++ for (proc = vp->procs; proc != NULL; proc = proc->next) { ++ f_print(fout, "\n"); ++ ptype(proc->res_prefix, proc->res_type, 1); ++ f_print(fout, "*\n"); ++ pvname(proc->proc_name, vp->vers_num); ++ printarglist(proc, "clnt", "CLIENT *"); ++ f_print(fout, "{\n"); ++ printbody(proc); ++ f_print(fout, "}\n"); ++ } ++ } ++} ++ ++/* ++ * Writes out declarations of procedure's argument list. ++ * In either ANSI C style, in one of old rpcgen style (pass by reference), ++ * or new rpcgen style (multiple arguments, pass by value); ++ */ ++ ++/* sample addargname = "clnt"; sample addargtype = "CLIENT * " */ ++ ++void ++printarglist(proc_list *proc, char *addargname, char *addargtype) ++{ ++ ++ decl_list *l; ++ ++ if (!newstyle) { /* old style: always pass arg by reference */ ++ if (Cflag) { /* C++ style heading */ ++ f_print(fout, "("); ++ ptype(proc->args.decls->decl.prefix, proc->args.decls->decl.type, 1); ++ f_print(fout, "*argp, %s%s)\n", addargtype, addargname); ++ } else { ++ f_print(fout, "(argp, %s)\n", addargname); ++ f_print(fout, "\t"); ++ ptype(proc->args.decls->decl.prefix, proc->args.decls->decl.type, 1); ++ f_print(fout, "*argp;\n"); ++ } ++ } else if (streq(proc->args.decls->decl.type, "void")) { ++ /* newstyle, 0 argument */ ++ if (Cflag) ++ f_print(fout, "(%s%s)\n", addargtype, addargname); ++ else ++ f_print(fout, "(%s)\n", addargname); ++ } else { ++ /* new style, 1 or multiple arguments */ ++ if (!Cflag) { ++ f_print(fout, "("); ++ for (l = proc->args.decls; l != NULL; l = l->next) ++ f_print(fout, "%s, ", l->decl.name); ++ f_print(fout, "%s)\n", addargname); ++ for (l = proc->args.decls; l != NULL; l = l->next) { ++ pdeclaration(proc->args.argname, &l->decl, 1, ";\n"); ++ } ++ } else { /* C++ style header */ ++ f_print(fout, "("); ++ for (l = proc->args.decls; l != NULL; l = l->next) { ++ pdeclaration(proc->args.argname, &l->decl, 0, ", "); ++ } ++ f_print(fout, " %s%s)\n", addargtype, addargname); ++ } ++ } ++ ++ if (!Cflag) ++ f_print(fout, "\t%s%s;\n", addargtype, addargname); ++} ++ ++ ++ ++static char * ++ampr(char *type) ++{ ++ if (isvectordef(type, REL_ALIAS)) { ++ return (""); ++ } else { ++ return ("&"); ++ } ++} ++ ++static void ++printbody(proc_list *proc) ++{ ++ decl_list *l; ++ bool_t args2 = (proc->arg_num > 1); ++ ++ /* For new style with multiple arguments, need a structure in which ++ * to stuff the arguments. */ ++ if (newstyle && args2) { ++ f_print(fout, "\t%s", proc->args.argname); ++ f_print(fout, " arg;\n"); ++ } ++ f_print(fout, "\tstatic "); ++ if (streq(proc->res_type, "void")) { ++ f_print(fout, "char "); ++ } else { ++ ptype(proc->res_prefix, proc->res_type, 0); ++ } ++ f_print(fout, "%s;\n", RESULT); ++ f_print(fout, "\n"); ++ f_print(fout, "\tmemset((char *)%s%s, 0, sizeof(%s));\n", ++ ampr(proc->res_type), RESULT, RESULT); ++ if (newstyle && !args2 && (streq(proc->args.decls->decl.type, "void"))) { ++ /* newstyle, 0 arguments */ ++ f_print(fout, ++ "\tif (clnt_call(clnt, %s, (xdrproc_t) xdr_void, (caddr_t) NULL, " ++ "(xdrproc_t) xdr_%s, (caddr_t) %s%s, TIMEOUT) != RPC_SUCCESS) {\n", ++ proc->proc_name, ++ stringfix(proc->res_type), ampr(proc->res_type), RESULT); ++ ++ } else if (newstyle && args2) { ++ /* newstyle, multiple arguments: stuff arguments into structure */ ++ for (l = proc->args.decls; l != NULL; l = l->next) { ++ f_print(fout, "\targ.%s = %s;\n", ++ l->decl.name, l->decl.name); ++ } ++ f_print(fout, ++ "\tif (clnt_call(clnt, %s, (xdrproc_t) xdr_%s, (caddr_t) &arg, " ++ "(xdrproc_t) xdr_%s, (caddr_t) %s%s, TIMEOUT) != RPC_SUCCESS) {\n", ++ proc->proc_name, proc->args.argname, ++ stringfix(proc->res_type), ampr(proc->res_type), RESULT); ++ } else { /* single argument, new or old style */ ++ f_print(fout, ++ "\tif (clnt_call(clnt, %s, (xdrproc_t) xdr_%s, " ++ "(caddr_t) %s%s, (xdrproc_t) xdr_%s, (caddr_t) %s%s, TIMEOUT) != RPC_SUCCESS) {\n", ++ proc->proc_name, ++ stringfix(proc->args.decls->decl.type), ++ (newstyle ? "&" : ""), ++ (newstyle ? proc->args.decls->decl.name : "argp"), ++ stringfix(proc->res_type), ampr(proc->res_type), RESULT); ++ } ++ f_print(fout, "\t\treturn (NULL);\n"); ++ f_print(fout, "\t}\n"); ++ if (streq(proc->res_type, "void")) { ++ f_print(fout, "\treturn ((void *)%s%s);\n", ++ ampr(proc->res_type), RESULT); ++ } else { ++ f_print(fout, "\treturn (%s%s);\n", ampr(proc->res_type), RESULT); ++ } ++} +diff --git a/rpcgen/rpc_cout.c b/rpcgen/rpc_cout.c +new file mode 100644 +index 0000000..a61214f +--- /dev/null ++++ b/rpcgen/rpc_cout.c +@@ -0,0 +1,706 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#if 0 ++static char sccsid[] = "@(#)rpc_cout.c 1.13 89/02/22 (C) 1987 SMI"; ++#endif ++ ++/* ++ * rpc_cout.c, XDR routine outputter for the RPC protocol compiler ++ */ ++#include ++#include ++#include ++#include ++#include ++#include "rpc_parse.h" ++#include "rpc_util.h" ++ ++static int findtype(definition *def, char *type); ++static int undefined(char *type); ++static void print_generic_header(char *procname, int pointerp); ++static void print_header(definition *def); ++static void print_prog_header(proc_list *plist); ++static void print_trailer(void); ++static void print_ifopen(int indent, char *name); ++static void print_ifarg(char *arg); ++static void print_ifsizeof(char *prefix, char *type); ++static void print_ifclose(int indent); ++static void print_ifstat(int indent, char *prefix, char *type, relation rel, ++ char *amax, char *objname, char *name); ++static void emit_enum(definition *def); ++static void emit_program(definition *def); ++static void emit_union(definition *def); ++static void emit_struct(definition *def); ++static void emit_typedef(definition *def); ++static void print_stat(int indent, declaration *dec); ++static void emit_inline(declaration *decl, int flag); ++static void emit_single_in_line(declaration *decl, int flag, relation rel); ++static char * upcase(char *str); ++ ++/* ++ * Emit the C-routine for the given definition ++ */ ++void ++emit(definition *def) ++{ ++ if (def->def_kind == DEF_CONST) { ++ return; ++ } ++ if (def->def_kind == DEF_PROGRAM) { ++ emit_program(def); ++ return; ++ } ++ if (def->def_kind == DEF_TYPEDEF) { ++ /* now we need to handle declarations like ++ * struct typedef foo foo; ++ * since we dont want this to be expanded into 2 calls ++ * to xdr_foo */ ++ ++ if (strcmp(def->def.ty.old_type, def->def_name) == 0) ++ return; ++ }; ++ ++ print_header(def); ++ switch (def->def_kind) { ++ case DEF_UNION: ++ emit_union(def); ++ break; ++ case DEF_ENUM: ++ emit_enum(def); ++ break; ++ case DEF_STRUCT: ++ emit_struct(def); ++ break; ++ case DEF_TYPEDEF: ++ emit_typedef(def); ++ break; ++ default: ++ break; ++ } ++ print_trailer(); ++} ++ ++static int ++findtype(definition *def, char *type) ++{ ++ ++ if (def->def_kind == DEF_PROGRAM || def->def_kind == DEF_CONST) { ++ return (0); ++ } else { ++ return (streq(def->def_name, type)); ++ } ++} ++ ++static int ++undefined(char *type) ++{ ++ definition *def; ++ ++ def = (definition *) FINDVAL(defined, type, findtype); ++ ++ return (def == NULL); ++} ++ ++ ++static void ++print_generic_header(char *procname, int pointerp) ++{ ++ f_print(fout, "\n"); ++ f_print(fout, "bool_t\n"); ++ if (Cflag) { ++ f_print(fout, "xdr_%s(", procname); ++ f_print(fout, "XDR *xdrs, "); ++ f_print(fout, "%s ", procname); ++ if (pointerp) ++ f_print(fout, "*"); ++ f_print(fout, "objp)\n{\n\n"); ++ } else { ++ f_print(fout, "xdr_%s(xdrs, objp)\n", procname); ++ f_print(fout, "\tXDR *xdrs;\n"); ++ f_print(fout, "\t%s ", procname); ++ if (pointerp) ++ f_print(fout, "*"); ++ f_print(fout, "objp;\n{\n\n"); ++ } ++} ++ ++static void ++print_header(definition *def) ++{ ++ print_generic_header(def->def_name, ++ def->def_kind != DEF_TYPEDEF || ++ !isvectordef(def->def.ty.old_type, def->def.ty.rel)); ++ ++ /* Now add Inline support */ ++ ++ ++ if (Inline == 0) ++ return; ++} ++ ++static void ++print_prog_header(proc_list *plist) ++{ ++ print_generic_header(plist->args.argname, 1); ++} ++ ++static void ++print_trailer(void) ++{ ++ f_print(fout, "\treturn (TRUE);\n"); ++ f_print(fout, "}\n"); ++} ++ ++ ++static void ++print_ifopen(int indent, char *name) ++{ ++ tabify(fout, indent); ++ f_print(fout, " if (!xdr_%s(xdrs", name); ++} ++ ++static void ++print_ifarg(char *arg) ++{ ++ f_print(fout, ", %s", arg); ++} ++ ++static void ++print_ifsizeof(char *prefix, char *type) ++{ ++ if (streq(type, "bool")) { ++ f_print(fout, ", sizeof(bool_t), (xdrproc_t)xdr_bool"); ++ } else { ++ f_print(fout, ", sizeof("); ++ if (undefined(type) && prefix) { ++ f_print(fout, "%s ", prefix); ++ } ++ f_print(fout, "%s), (xdrproc_t)xdr_%s", type, type); ++ } ++} ++ ++static void ++print_ifclose(int indent) ++{ ++ f_print(fout, ")) {\n"); ++ tabify(fout, indent); ++ f_print(fout, "\t return (FALSE);\n"); ++ tabify(fout, indent); ++ f_print(fout, " }\n"); ++} ++ ++static void ++print_ifstat(int indent, char *prefix, char *type, relation rel, ++ char *amax, char *objname, char *name) ++{ ++ char *alt = NULL; ++ ++ switch (rel) { ++ case REL_POINTER: ++ print_ifopen(indent, "pointer"); ++ print_ifarg("(char **)"); ++ f_print(fout, "%s", objname); ++ print_ifsizeof(prefix, type); ++ break; ++ case REL_VECTOR: ++ if (streq(type, "string")) { ++ alt = "string"; ++ } else if (streq(type, "opaque")) { ++ alt = "opaque"; ++ } ++ if (alt) { ++ print_ifopen(indent, alt); ++ print_ifarg(objname); ++ } else { ++ print_ifopen(indent, "vector"); ++ print_ifarg("(char *)"); ++ f_print(fout, "%s", objname); ++ } ++ print_ifarg(amax); ++ if (!alt) { ++ print_ifsizeof(prefix, type); ++ } ++ break; ++ case REL_ARRAY: ++ if (streq(type, "string")) { ++ alt = "string"; ++ } else if (streq(type, "opaque")) { ++ alt = "bytes"; ++ } ++ if (streq(type, "string")) { ++ print_ifopen(indent, alt); ++ print_ifarg(objname); ++ } else { ++ if (alt) { ++ print_ifopen(indent, alt); ++ } else { ++ print_ifopen(indent, "array"); ++ } ++ /* The (void*) avoids a gcc-4.1 warning */ ++ print_ifarg("(char **)(void*)"); ++ if (*objname == '&') { ++ f_print(fout, "%s.%s_val, (u_int *)%s.%s_len", ++ objname, name, objname, name); ++ } else { ++ f_print(fout, "&%s->%s_val, (u_int *)&%s->%s_len", ++ objname, name, objname, name); ++ } ++ } ++ print_ifarg(amax); ++ if (!alt) { ++ print_ifsizeof(prefix, type); ++ } ++ break; ++ case REL_ALIAS: ++ print_ifopen(indent, type); ++ print_ifarg(objname); ++ break; ++ } ++ print_ifclose(indent); ++} ++ ++static void ++emit_enum(definition *def) ++{ ++ print_ifopen(1, "enum"); ++ print_ifarg("(enum_t *)objp"); ++ print_ifclose(1); ++} ++ ++static void ++emit_program(definition *def) ++{ ++ decl_list *dl; ++ version_list *vlist; ++ proc_list *plist; ++ ++ for (vlist = def->def.pr.versions; vlist != NULL; vlist = vlist->next) ++ for (plist = vlist->procs; plist != NULL; plist = plist->next) { ++ if (!newstyle || plist->arg_num < 2) ++ continue;/* old style, or single argument */ ++ print_prog_header(plist); ++ for (dl = plist->args.decls; dl != NULL; dl = dl->next) ++ print_stat(1, &dl->decl); ++ print_trailer(); ++ } ++} ++ ++ ++static void ++emit_union(definition *def) ++{ ++ declaration *dflt; ++ case_list *cl; ++ declaration *cs; ++ char *object; ++ char *vecformat = "objp->%s_u.%s"; ++ char *format = "&objp->%s_u.%s"; ++ ++ print_stat(1,&def->def.un.enum_decl); ++ f_print(fout, "\tswitch (objp->%s) {\n", def->def.un.enum_decl.name); ++ for (cl = def->def.un.cases; cl != NULL; cl = cl->next) { ++ ++ f_print(fout, "\tcase %s:\n", cl->case_name); ++ if(cl->contflag == 1) /* a continued case statement */ ++ continue; ++ cs = &cl->case_decl; ++ if (!streq(cs->type, "void")) { ++ object = alloc(strlen(def->def_name) + strlen(format) + ++ strlen(cs->name) + 1); ++ if (isvectordef (cs->type, cs->rel)) { ++ s_print(object, vecformat, def->def_name, ++ cs->name); ++ } else { ++ s_print(object, format, def->def_name, ++ cs->name); ++ } ++ print_ifstat(2, cs->prefix, cs->type, cs->rel, cs->array_max, ++ object, cs->name); ++ free(object); ++ } ++ f_print(fout, "\t\tbreak;\n"); ++ } ++ dflt = def->def.un.default_decl; ++ if (dflt != NULL) { ++ if (!streq(dflt->type, "void")) { ++ f_print(fout, "\tdefault:\n"); ++ object = alloc(strlen(def->def_name) + strlen(format) + ++ strlen(dflt->name) + 1); ++ if (isvectordef (dflt->type, dflt->rel)) { ++ s_print(object, vecformat, def->def_name, ++ dflt->name); ++ } else { ++ s_print(object, format, def->def_name, ++ dflt->name); ++ } ++ ++ print_ifstat(2, dflt->prefix, dflt->type, dflt->rel, ++ dflt->array_max, object, dflt->name); ++ free(object); ++ f_print(fout, "\t\tbreak;\n"); ++ } else { ++ /* Avoid gcc warnings about `value not handled in switch' */ ++ f_print(fout, "\tdefault:\n"); ++ f_print(fout, "\t\tbreak;\n"); ++ } ++ } else { ++ f_print(fout, "\tdefault:\n"); ++ f_print(fout, "\t\treturn (FALSE);\n"); ++ } ++ ++ f_print(fout, "\t}\n"); ++} ++ ++static void ++emit_struct(definition *def) ++{ ++ decl_list *dl; ++ int i, j, size, flag; ++ decl_list *cur = NULL, *psav; ++ bas_type *ptr; ++ char *sizestr, *plus; ++ char ptemp[256]; ++ int can_inline; ++ const char *buf_declaration; ++ ++ ++ if (Inline == 0) { ++ for (dl = def->def.st.decls; dl != NULL; dl = dl->next) ++ print_stat(1, &dl->decl); ++ } else { ++ size = 0; ++ can_inline = 0; ++ for (dl = def->def.st.decls; dl != NULL; dl = dl->next) ++ if ((dl->decl.prefix == NULL) && ((ptr = find_type(dl->decl.type)) != NULL) && ((dl->decl.rel == REL_ALIAS) || (dl->decl.rel == REL_VECTOR))) { ++ ++ if (dl->decl.rel == REL_ALIAS) ++ size += ptr->length; ++ else { ++ can_inline = 1; ++ break; /* can be inlined */ ++ }; ++ } else { ++ if (size >= Inline) { ++ can_inline = 1; ++ break; /* can be inlined */ ++ } ++ size = 0; ++ } ++ if (size > Inline) ++ can_inline = 1; ++ ++ if (can_inline == 0) { /* can not inline, drop back to old mode */ ++ for (dl = def->def.st.decls; dl != NULL; dl = dl->next) ++ print_stat(1, &dl->decl); ++ return; ++ }; ++ ++ ++ ++ ++ flag = PUT; ++ for (j = 0; j < 2; j++) { ++ ++ if (flag == PUT) ++ f_print(fout, "\n\t if (xdrs->x_op == XDR_ENCODE) {\n"); ++ else ++ f_print(fout, "\n \t return (TRUE);\n\t} else if (xdrs->x_op == XDR_DECODE) {\n"); ++ ++ ++ i = 0; ++ size = 0; ++ sizestr = NULL; ++ buf_declaration = "int32_t *"; ++ for (dl = def->def.st.decls; dl != NULL; dl = dl->next) { /* xxx */ ++ ++ /* now walk down the list and check for basic types */ ++ if ((dl->decl.prefix == NULL) && ((ptr = find_type(dl->decl.type)) != NULL) && ((dl->decl.rel == REL_ALIAS) || (dl->decl.rel == REL_VECTOR))) { ++ if (i == 0) ++ cur = dl; ++ i++; ++ ++ if (dl->decl.rel == REL_ALIAS) ++ size += ptr->length; ++ else { ++ /* this is required to handle arrays */ ++ ++ if (sizestr == NULL) ++ plus = " "; ++ else ++ plus = "+"; ++ ++ if (ptr->length != 1) ++ s_print(ptemp, " %s %s * %d", plus, dl->decl.array_max, ptr->length); ++ else ++ s_print(ptemp, " %s %s ", plus, dl->decl.array_max); ++ ++ /*now concatenate to sizestr !!!! */ ++ if (sizestr == NULL) ++ sizestr = strdup(ptemp); ++ else { ++ sizestr = realloc(sizestr, strlen(sizestr) + strlen(ptemp) + 1); ++ if (sizestr == NULL) { ++ ++ f_print(stderr, "Fatal error : no memory \n"); ++ crash(); ++ }; ++ sizestr = strcat(sizestr, ptemp); /*build up length of array */ ++ ++ } ++ } ++ ++ } else { ++ if (i > 0) ++ { ++ if (sizestr == NULL && size < Inline) { ++ /* don't expand into inline code if size < inline */ ++ while (cur != dl) { ++ print_stat(1, &cur->decl); ++ cur = cur->next; ++ } ++ } else { ++ ++ ++ ++ /* were already looking at a xdr_inlineable structure */ ++ if (sizestr == NULL) ++ f_print(fout, "\t %sbuf = XDR_INLINE(xdrs,%d * BYTES_PER_XDR_UNIT);", ++ buf_declaration, size); ++ else if (size == 0) ++ f_print(fout, ++ "\t %sbuf = XDR_INLINE(xdrs,%s * BYTES_PER_XDR_UNIT);", ++ buf_declaration, sizestr); ++ else ++ f_print(fout, ++ "\t %sbuf = XDR_INLINE(xdrs,(%d + %s)* BYTES_PER_XDR_UNIT);", ++ buf_declaration, size, sizestr); ++ buf_declaration = ""; ++ ++ f_print(fout, "\n\t if (buf == NULL) {\n"); ++ ++ psav = cur; ++ while (cur != dl) { ++ print_stat(2, &cur->decl); ++ cur = cur->next; ++ } ++ ++ f_print(fout, "\n\t }\n\t else {\n"); ++ ++ cur = psav; ++ while (cur != dl) { ++ emit_inline(&cur->decl, flag); ++ cur = cur->next; ++ } ++ ++ f_print(fout, "\t }\n"); ++ } ++ } ++ size = 0; ++ i = 0; ++ sizestr = NULL; ++ print_stat(1, &dl->decl); ++ } ++ ++ } ++ if (i > 0) ++ { ++ if (sizestr == NULL && size < Inline) { ++ /* don't expand into inline code if size < inline */ ++ while (cur != dl) { ++ print_stat(1, &cur->decl); ++ cur = cur->next; ++ } ++ } else { ++ ++ /* were already looking at a xdr_inlineable structure */ ++ if (sizestr == NULL) ++ f_print(fout, "\t\t%sbuf = XDR_INLINE(xdrs,%d * BYTES_PER_XDR_UNIT);", ++ buf_declaration, size); ++ else if (size == 0) ++ f_print(fout, ++ "\t\t%sbuf = XDR_INLINE(xdrs,%s * BYTES_PER_XDR_UNIT);", ++ buf_declaration, sizestr); ++ else ++ f_print(fout, ++ "\t\t%sbuf = XDR_INLINE(xdrs,(%d + %s)* BYTES_PER_XDR_UNIT);", ++ buf_declaration, size, sizestr); ++ buf_declaration = ""; ++ ++ f_print(fout, "\n\t\tif (buf == NULL) {\n"); ++ ++ psav = cur; ++ while (cur != NULL) { ++ print_stat(2, &cur->decl); ++ cur = cur->next; ++ } ++ f_print(fout, "\n\t }\n\t else {\n"); ++ ++ cur = psav; ++ while (cur != dl) { ++ emit_inline(&cur->decl, flag); ++ cur = cur->next; ++ } ++ ++ f_print(fout, "\t }\n"); ++ ++ } ++ } ++ flag = GET; ++ } ++ f_print(fout, "\t return(TRUE);\n\t}\n\n"); ++ ++ /* now take care of XDR_FREE case */ ++ ++ for (dl = def->def.st.decls; dl != NULL; dl = dl->next) ++ print_stat(1, &dl->decl); ++ } ++} ++ ++ ++ ++ ++static void ++emit_typedef(definition *def) ++{ ++ char *prefix = def->def.ty.old_prefix; ++ char *type = def->def.ty.old_type; ++ char *amax = def->def.ty.array_max; ++ relation rel = def->def.ty.rel; ++ ++ ++ print_ifstat(1, prefix, type, rel, amax, "objp", def->def_name); ++} ++ ++static void ++print_stat(int indent, declaration *dec) ++{ ++ char *prefix = dec->prefix; ++ char *type = dec->type; ++ char *amax = dec->array_max; ++ relation rel = dec->rel; ++ char name[256]; ++ ++ if (isvectordef(type, rel)) { ++ s_print(name, "objp->%s", dec->name); ++ } else { ++ s_print(name, "&objp->%s", dec->name); ++ } ++ print_ifstat(indent, prefix, type, rel, amax, name, dec->name); ++} ++ ++ ++static void ++emit_inline(declaration *decl, int flag) ++{ ++ ++ /*check whether an array or not */ ++ ++ switch (decl->rel) { ++ case REL_ALIAS: ++ emit_single_in_line(decl, flag, REL_ALIAS); ++ break; ++ case REL_VECTOR: ++ f_print(fout, "\t\t{ register %s *genp; \n", decl->type); ++ f_print(fout, "\t\t int i;\n"); ++ f_print(fout, "\t\t for ( i = 0,genp=objp->%s;\n \t\t\ti < %s; i++){\n\t\t", ++ decl->name, decl->array_max); ++ emit_single_in_line(decl, flag, REL_VECTOR); ++ f_print(fout, "\t\t }\n\t\t };\n"); ++ break; ++ default: ++ break; ++ } ++} ++ ++static void ++emit_single_in_line(declaration *decl, int flag, relation rel) ++{ ++ char *upp_case; ++ int freed=0; ++ ++ if(flag == PUT) ++ f_print(fout,"\t\t (void) IXDR_PUT_"); ++ else ++ if(rel== REL_ALIAS) ++ f_print(fout,"\t\t objp->%s = IXDR_GET_",decl->name); ++ else ++ f_print(fout,"\t\t *genp++ = IXDR_GET_"); ++ ++ upp_case=upcase(decl->type); ++ ++ /* hack - XX */ ++ if(strcmp(upp_case,"INT") == 0) ++ { ++ free(upp_case); ++ freed=1; ++ upp_case="INT32"; ++ } ++ ++ if(strcmp(upp_case,"U_INT") == 0) ++ { ++ free(upp_case); ++ freed=1; ++ upp_case="U_INT32"; ++ } ++ ++ ++ if(flag == PUT) ++ if(rel== REL_ALIAS) ++ f_print(fout,"%s(buf,objp->%s);\n",upp_case,decl->name); ++ else ++ f_print(fout,"%s(buf,*genp++);\n",upp_case); ++ ++ else ++ f_print(fout,"%s(buf);\n",upp_case); ++ if(!freed) ++ free(upp_case); ++ ++} ++ ++ ++static char * ++upcase(char *str) ++{ ++ char *ptr, *hptr; ++ ++ ++ ptr = (char *) malloc(strlen(str)+1); ++ if (ptr == (char *) NULL) { ++ f_print(stderr, "malloc failed \n"); ++ exit(1); ++ }; ++ ++ hptr = ptr; ++ while (*str != '\0') ++ *ptr++ = toupper(*str++); ++ ++ *ptr = '\0'; ++ return (hptr); ++ ++} +diff --git a/rpcgen/rpc_hout.c b/rpcgen/rpc_hout.c +new file mode 100644 +index 0000000..ea1cb24 +--- /dev/null ++++ b/rpcgen/rpc_hout.c +@@ -0,0 +1,490 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#if 0 ++static char sccsid[] = "@(#)rpc_hout.c 1.12 89/02/22 (C) 1987 SMI"; ++#endif ++ ++/* ++ * rpc_hout.c, Header file outputter for the RPC protocol compiler ++ */ ++#include ++#include ++#include "rpc_parse.h" ++#include "rpc_util.h" ++#include "rpc_output.h" ++ ++ ++static int undefined2(char *type, char *stop); ++static void pxdrfuncdecl(char *name, int pointerp); ++static void pconstdef(definition *def); ++static void pargdef(definition *def); ++static void pstructdef(definition *def); ++static void puniondef(definition *def); ++static void pdefine(char *name, char *num); ++static void puldefine(char *name, char *num); ++static int define_printed(proc_list *stop, version_list *start); ++static void pprogramdef(definition *def); ++static void pprocdef(proc_list *proc, version_list *vp, ++ char *addargtype, int server_p, int mode); ++static void parglist(proc_list *proc, char *addargtype); ++static void penumdef(definition *def); ++static void ptypedef(definition *def); ++ ++/* ++ * Print the C-version of an xdr definition ++ */ ++void ++print_datadef(definition *def) ++{ ++ ++ if (def->def_kind == DEF_PROGRAM ) /* handle data only */ ++ return; ++ ++ if (def->def_kind != DEF_CONST) { ++ f_print(fout, "\n"); ++ } ++ switch (def->def_kind) { ++ case DEF_STRUCT: ++ pstructdef(def); ++ break; ++ case DEF_UNION: ++ puniondef(def); ++ break; ++ case DEF_ENUM: ++ penumdef(def); ++ break; ++ case DEF_TYPEDEF: ++ ptypedef(def); ++ break; ++ case DEF_PROGRAM: ++ pprogramdef(def); ++ break; ++ case DEF_CONST: ++ pconstdef(def); ++ break; ++ } ++ if (def->def_kind != DEF_PROGRAM && def->def_kind != DEF_CONST) { ++ pxdrfuncdecl( def->def_name, ++ def->def_kind != DEF_TYPEDEF || ++ !isvectordef(def->def.ty.old_type, def->def.ty.rel)); ++ ++ } ++} ++ ++ ++void ++print_funcdef(definition *def) ++{ ++ switch (def->def_kind) { ++ case DEF_PROGRAM: ++ f_print(fout, "\n"); ++ pprogramdef(def); ++ break; ++ default: ++ break; ++ } ++} ++ ++static void ++pxdrfuncdecl(char *name, int pointerp) ++{ ++ f_print(fout, ++ "#ifdef __cplusplus \n" ++ "extern \"C\" bool_t xdr_%s(XDR *, %s%s);\n" ++ "#elif __STDC__ \n" ++ "extern bool_t xdr_%s(XDR *, %s%s);\n" ++ "#else /* Old Style C */ \n" ++ "bool_t xdr_%s();\n" ++ "#endif /* Old Style C */ \n\n", ++ name, name, pointerp ? "*" : "", ++ name, name, pointerp ? "*" : "", ++ name); ++} ++ ++ ++static void ++pconstdef(definition *def) ++{ ++ pdefine(def->def_name, def->def.co); ++} ++ ++/* print out the definitions for the arguments of functions in the ++ header file ++*/ ++static void ++pargdef(definition *def) ++{ ++ decl_list *l; ++ version_list *vers; ++ char *name; ++ proc_list *plist; ++ ++ ++ for (vers = def->def.pr.versions; vers != NULL; vers = vers->next) { ++ for(plist = vers->procs; plist != NULL; ++ plist = plist->next) { ++ ++ if (!newstyle || plist->arg_num < 2) { ++ continue; /* old style or single args */ ++ } ++ name = plist->args.argname; ++ f_print(fout, "struct %s {\n", name); ++ for (l = plist->args.decls; ++ l != NULL; l = l->next) { ++ pdeclaration(name, &l->decl, 1, ";\n" ); ++ } ++ f_print(fout, "};\n"); ++ f_print(fout, "typedef struct %s %s;\n", name, name); ++ pxdrfuncdecl(name, 0); ++ f_print( fout, "\n" ); ++ } ++ } ++ ++} ++ ++ ++static void ++pstructdef(definition *def) ++{ ++ decl_list *l; ++ char *name = def->def_name; ++ ++ f_print(fout, "struct %s {\n", name); ++ for (l = def->def.st.decls; l != NULL; l = l->next) { ++ pdeclaration(name, &l->decl, 1, ";\n"); ++ } ++ f_print(fout, "};\n"); ++ f_print(fout, "typedef struct %s %s;\n", name, name); ++} ++ ++static void ++puniondef(definition *def) ++{ ++ case_list *l; ++ char *name = def->def_name; ++ declaration *decl; ++ ++ f_print(fout, "struct %s {\n", name); ++ decl = &def->def.un.enum_decl; ++ if (streq(decl->type, "bool")) { ++ f_print(fout, "\tbool_t %s;\n", decl->name); ++ } else { ++ f_print(fout, "\t%s %s;\n", decl->type, decl->name); ++ } ++ f_print(fout, "\tunion {\n"); ++ for (l = def->def.un.cases; l != NULL; l = l->next) { ++ if (l->contflag == 0) ++ pdeclaration(name, &l->case_decl, 2, ";\n"); ++ } ++ decl = def->def.un.default_decl; ++ if (decl && !streq(decl->type, "void")) { ++ pdeclaration(name, decl, 2, ";\n"); ++ } ++ f_print(fout, "\t} %s_u;\n", name); ++ f_print(fout, "};\n"); ++ f_print(fout, "typedef struct %s %s;\n", name, name); ++} ++ ++static void ++pdefine(char *name, char *num) ++{ ++ f_print(fout, "#define %s %s\n", name, num); ++} ++ ++static void ++puldefine(char *name, char *num) ++{ ++ f_print(fout, "#define %s ((u_int32_t)%s)\n", name, num); ++} ++ ++static int ++define_printed(proc_list *stop, version_list *start) ++{ ++ version_list *vers; ++ proc_list *proc; ++ ++ for (vers = start; vers != NULL; vers = vers->next) { ++ for (proc = vers->procs; proc != NULL; proc = proc->next) { ++ if (proc == stop) { ++ return (0); ++ } else if (streq(proc->proc_name, stop->proc_name)) { ++ return (1); ++ } ++ } ++ } ++ abort(); ++ /* NOTREACHED */ ++} ++ ++static void ++pprogramdef(definition *def) ++{ ++ version_list *vers; ++ proc_list *proc; ++ int i; ++ char *ext; ++ ++ pargdef(def); ++ ++ puldefine(def->def_name, def->def.pr.prog_num); ++ for (vers = def->def.pr.versions; vers != NULL; vers = vers->next) { ++ if (tblflag) { ++ f_print(fout, "extern struct rpcgen_table %s_%s_table[];\n", ++ locase(def->def_name), vers->vers_num); ++ f_print(fout, "extern %s_%s_nproc;\n", ++ locase(def->def_name), vers->vers_num); ++ } ++ puldefine(vers->vers_name, vers->vers_num); ++ ++ /* ++ * Print out 3 definitions, one for ANSI-C, another for C++, ++ * a third for old style C ++ */ ++ ++ for (i = 0; i < 3; i++) { ++ if (i == 0) { ++ f_print(fout, "\n#ifdef __cplusplus\n"); ++ ext = "extern \"C\" "; ++ } else if (i == 1) { ++ f_print(fout, "\n#elif __STDC__\n"); ++ ext = "extern "; ++ } else { ++ f_print(fout, "\n#else /* Old Style C */ \n"); ++ ext = "extern "; ++ } ++ ++ ++ for (proc = vers->procs; proc != NULL; proc = proc->next) { ++ if (!define_printed(proc, def->def.pr.versions)) { ++ puldefine(proc->proc_name, proc->proc_num); ++ } ++ f_print(fout, "%s", ext); ++ pprocdef(proc, vers, "CLIENT *", 0, i); ++ f_print(fout, "%s", ext); ++ pprocdef(proc, vers, "struct svc_req *", 1, i); ++ ++ } ++ ++ } ++ f_print(fout, "#endif /* Old Style C */ \n"); ++ } ++} ++ ++static void ++pprocdef(proc_list *proc, version_list *vp, char *addargtype, ++ int server_p, int mode) ++{ ++ ptype(proc->res_prefix, proc->res_type, 1); ++ f_print(fout, "* "); ++ if (server_p) ++ pvname_svc(proc->proc_name, vp->vers_num); ++ else ++ pvname(proc->proc_name, vp->vers_num); ++ ++ /* ++ * mode 0 == cplusplus, mode 1 = ANSI-C, mode 2 = old style C ++ */ ++ if (mode == 0 || mode == 1) ++ parglist(proc, addargtype); ++ else ++ f_print(fout, "();\n"); ++} ++ ++ ++ ++/* print out argument list of procedure */ ++static void ++parglist(proc_list *proc, char *addargtype) ++{ ++ decl_list *dl; ++ ++ f_print(fout, "("); ++ ++ if (proc->arg_num < 2 && newstyle && ++ streq(proc->args.decls->decl.type, "void")) { ++ /* 0 argument in new style: do nothing */ ++ } else { ++ for (dl = proc->args.decls; dl != NULL; dl = dl->next) { ++ ptype(dl->decl.prefix, dl->decl.type, 1); ++ if (!newstyle) ++ f_print(fout, "*"); /* old style passes by reference */ ++ ++ f_print(fout, ", "); ++ } ++ } ++ ++ f_print(fout, "%s);\n", addargtype); ++} ++ ++static void ++penumdef(definition *def) ++{ ++ char *name = def->def_name; ++ enumval_list *l; ++ char *last = NULL; ++ int count = 0; ++ ++ f_print(fout, "enum %s {\n", name); ++ for (l = def->def.en.vals; l != NULL; l = l->next) { ++ f_print(fout, "\t%s", l->name); ++ if (l->assignment) { ++ f_print(fout, " = %s", l->assignment); ++ last = l->assignment; ++ count = 1; ++ } else { ++ if (last == NULL) { ++ f_print(fout, " = %d", count++); ++ } else { ++ f_print(fout, " = %s + %d", last, count++); ++ } ++ } ++ f_print(fout, ",\n"); ++ } ++ f_print(fout, "};\n"); ++ f_print(fout, "typedef enum %s %s;\n", name, name); ++} ++ ++static void ++ptypedef(definition *def) ++{ ++ char *name = def->def_name; ++ char *old = def->def.ty.old_type; ++ char prefix[8]; /* enough to contain "struct ", including NUL */ ++ relation rel = def->def.ty.rel; ++ ++ ++ if (!streq(name, old)) { ++ if (streq(old, "string")) { ++ old = "char"; ++ rel = REL_POINTER; ++ } else if (streq(old, "opaque")) { ++ old = "char"; ++ } else if (streq(old, "bool")) { ++ old = "bool_t"; ++ } ++ if (undefined2(old, name) && def->def.ty.old_prefix) { ++ s_print(prefix, "%s ", def->def.ty.old_prefix); ++ } else { ++ prefix[0] = 0; ++ } ++ f_print(fout, "typedef "); ++ switch (rel) { ++ case REL_ARRAY: ++ f_print(fout, "struct {\n"); ++ f_print(fout, "\tu_int %s_len;\n", name); ++ f_print(fout, "\t%s%s *%s_val;\n", prefix, old, name); ++ f_print(fout, "} %s", name); ++ break; ++ case REL_POINTER: ++ f_print(fout, "%s%s *%s", prefix, old, name); ++ break; ++ case REL_VECTOR: ++ f_print(fout, "%s%s %s[%s]", prefix, old, name, ++ def->def.ty.array_max); ++ break; ++ case REL_ALIAS: ++ f_print(fout, "%s%s %s", prefix, old, name); ++ break; ++ } ++ f_print(fout, ";\n"); ++ } ++} ++ ++void ++pdeclaration(char *name, declaration *dec, int tab, char *separator) ++{ ++ char buf[8]; /* enough to hold "struct ", include NUL */ ++ char *prefix; ++ char *type; ++ ++ if (streq(dec->type, "void")) { ++ return; ++ } ++ tabify(fout, tab); ++ if (streq(dec->type, name) && !dec->prefix) { ++ f_print(fout, "struct "); ++ } ++ if (streq(dec->type, "string")) { ++ f_print(fout, "char *%s", dec->name); ++ } else { ++ prefix = ""; ++ if (streq(dec->type, "bool")) { ++ type = "bool_t"; ++ } else if (streq(dec->type, "opaque")) { ++ type = "char"; ++ } else { ++ if (dec->prefix) { ++ s_print(buf, "%s ", dec->prefix); ++ prefix = buf; ++ } ++ type = dec->type; ++ } ++ switch (dec->rel) { ++ case REL_ALIAS: ++ f_print(fout, "%s%s %s", prefix, type, dec->name); ++ break; ++ case REL_VECTOR: ++ f_print(fout, "%s%s %s[%s]", prefix, type, dec->name, ++ dec->array_max); ++ break; ++ case REL_POINTER: ++ f_print(fout, "%s%s *%s", prefix, type, dec->name); ++ break; ++ case REL_ARRAY: ++ f_print(fout, "struct {\n"); ++ tabify(fout, tab); ++ f_print(fout, "\tu_int %s_len;\n", dec->name); ++ tabify(fout, tab); ++ f_print(fout, "\t%s%s *%s_val;\n", prefix, type, dec->name); ++ tabify(fout, tab); ++ f_print(fout, "} %s", dec->name); ++ break; ++ } ++ } ++ f_print(fout, separator ); ++} ++ ++static int ++undefined2(char *type, char *stop) ++{ ++ list *l; ++ definition *def; ++ ++ for (l = defined; l != NULL; l = l->next) { ++ def = (definition *) l->val; ++ if (def->def_kind != DEF_PROGRAM) { ++ if (streq(def->def_name, stop)) { ++ return (1); ++ } else if (streq(def->def_name, type)) { ++ return (0); ++ } ++ } ++ } ++ return (1); ++} +diff --git a/rpcgen/rpc_main.c b/rpcgen/rpc_main.c +new file mode 100644 +index 0000000..28aa60c +--- /dev/null ++++ b/rpcgen/rpc_main.c +@@ -0,0 +1,1067 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#if 0 ++static char sccsid[] = "@(#)rpc_main.c 1.30 89/03/30 (C) 1987 SMI"; ++#endif ++ ++/* ++ * rpc_main.c, Top level of the RPC protocol compiler. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "rpc_parse.h" ++#include "rpc_util.h" ++#include "rpc_scan.h" ++ ++struct commandline { ++ int cflag; /* xdr C routines */ ++ int hflag; /* header file */ ++ int lflag; /* client side stubs */ ++ int mflag; /* server side stubs */ ++ int nflag; /* netid flag */ ++ int sflag; /* server stubs for the given transport */ ++ int tflag; /* dispatch Table file */ ++ int Ssflag; /* produce server sample code */ ++ int Scflag; /* produce client sample code */ ++ char *infile; /* input module name */ ++ char *outfile; /* output module name */ ++}; ++ ++static char * extendfile(char *file, char *ext); ++static void open_output(char *infile, char *outfile); ++static void add_warning(void); ++static void clear_args(void); ++static void open_input(char *infile, char *define); ++static int check_nettype(char *name, char **list_to_check); ++static void c_output(char *infile, char *define, int extend, char *outfile); ++static void c_initialize(void); ++static char * generate_guard(char *pathname); ++static void h_output(char *infile, char *define, int extend, char *outfile); ++static void s_output(int argc, char **argv, char *infile, ++ char *define, int extend, char *outfile, ++ int nomain, int netflag); ++static void l_output(char *infile, char *define, int extend, char *outfile); ++static void t_output(char *infile, char *define, int extend, char *outfile); ++static void svc_output(char *, char *, int, char *); ++static void clnt_output(char *, char *, int, char *); ++static int do_registers(int argc, char **argv); ++static void addarg(char *cp); ++static void putarg(int where, char *cp); ++static void checkfiles(char *infile, char *outfile); ++static int parseargs(int argc, char **argv, struct commandline *cmd); ++static void usage(void); ++static void options_usage(void); ++ ++/* ++extern void write_sample_svc(); ++int write_sample_clnt(); ++void write_sample_clnt_main(); ++ ++static svc_output(); ++ */ ++ ++#define EXTEND 1 /* alias for TRUE */ ++#define DONT_EXTEND 0 /* alias for FALSE */ ++ ++#define SVR4_CPP "/usr/ccs/lib/cpp" ++#define SUNOS_CPP "/lib/cpp" ++static int cppDefined = 0; /* explicit path for C preprocessor */ ++ ++ ++static char *cmdname; ++ ++static char *svcclosetime = "120"; ++static char *CPP = SVR4_CPP; ++static char CPPFLAGS[] = "-C"; ++static char pathbuf[MAXPATHLEN + 1]; ++static char *allv[] = { ++ "rpcgen", "-s", "udp", "-s", "tcp", ++}; ++static int allc = sizeof(allv)/sizeof(allv[0]); ++static char *allnv[] = { ++ "rpcgen", "-s", "netpath", ++}; ++static int allnc = sizeof(allnv)/sizeof(allnv[0]); ++ ++/* ++ * machinations for handling expanding argument list ++ */ ++#if 0 ++static void addarg(); /* add another argument to the list */ ++static void putarg(); /* put argument at specified location */ ++static void clear_args(); /* clear argument list */ ++static void checkfiles(); /* check if out file already exists */ ++#endif ++ ++ ++ ++#define ARGLISTLEN 20 ++#define FIXEDARGS 2 ++ ++static char *arglist[ARGLISTLEN]; ++static int argcount = FIXEDARGS; ++ ++ ++int nonfatalerrors; /* errors */ ++int inetdflag/* = 1*/; /* Support for inetd */ /* is now the default */ ++int pmflag; /* Support for port monitors */ ++int logflag; /* Use syslog instead of fprintf for errors */ ++int tblflag; /* Support for dispatch table file */ ++ ++/* length at which to start doing an inline */ ++#define INLINE 3 ++ ++int Inline = INLINE; /* length at which to start doing an inline. 3 = default ++ * if 0, no xdr_inline code */ ++ ++int indefinitewait; /* If started by port monitors, hang till it wants */ ++int exitnow; /* If started by port monitors, exit after the call */ ++int timerflag; /* TRUE if !indefinite && !exitnow */ ++int newstyle; /* newstyle of passing arguments (by value) */ ++int Cflag = 0 ; /* ANSI C syntax */ ++static int allfiles; /* generate all files */ ++#ifdef linux ++int tirpcflag = 0; /* no tirpc by default */ ++#else ++int tirpcflag = 1; /* generating code for tirpc, by default */ ++#endif ++ ++int ++main(int argc, char **argv) ++{ ++ struct commandline cmd; ++ ++ (void) memset((char *) &cmd, 0, sizeof(struct commandline)); ++ clear_args(); ++ if (!parseargs(argc, argv, &cmd)) ++ usage(); ++ ++ if (cmd.cflag || cmd.hflag || cmd.lflag || cmd.tflag || cmd.sflag || ++ cmd.mflag || cmd.nflag || cmd.Ssflag || cmd.Scflag) { ++ checkfiles(cmd.infile, cmd.outfile); ++ } else ++ checkfiles(cmd.infile, NULL); ++ ++ if (cmd.cflag) { ++ c_output(cmd.infile, "-DRPC_XDR", DONT_EXTEND, cmd.outfile); ++ } else if (cmd.hflag) { ++ h_output(cmd.infile, "-DRPC_HDR", DONT_EXTEND, cmd.outfile); ++ } else if (cmd.lflag) { ++ l_output(cmd.infile, "-DRPC_CLNT", DONT_EXTEND, cmd.outfile); ++ } else if (cmd.sflag || cmd.mflag || (cmd.nflag)) { ++ s_output(argc, argv, cmd.infile, "-DRPC_SVC", DONT_EXTEND, ++ cmd.outfile, cmd.mflag, cmd.nflag); ++ } else if (cmd.tflag) { ++ t_output(cmd.infile, "-DRPC_TBL", DONT_EXTEND, cmd.outfile); ++ } else if (cmd.Ssflag) { ++ svc_output(cmd.infile, "-DRPC_SERVER", DONT_EXTEND, cmd.outfile); ++ } else if (cmd.Scflag) { ++ clnt_output(cmd.infile, "-DRPC_CLIENT", DONT_EXTEND, cmd.outfile); ++ } else { ++ /* the rescans are required, since cpp may effect input */ ++ c_output(cmd.infile, "-DRPC_XDR", EXTEND, "_xdr.c"); ++ reinitialize(); ++ h_output(cmd.infile, "-DRPC_HDR", EXTEND, ".h"); ++ reinitialize(); ++ l_output(cmd.infile, "-DRPC_CLNT", EXTEND, "_clnt.c"); ++ reinitialize(); ++ if (inetdflag || !tirpcflag) ++ s_output(allc, allv, cmd.infile, "-DRPC_SVC", EXTEND, ++ "_svc.c", cmd.mflag, cmd.nflag); ++ else ++ s_output(allnc, allnv, cmd.infile, "-DRPC_SVC", ++ EXTEND, "_svc.c", cmd.mflag, cmd.nflag); ++ if (tblflag) { ++ reinitialize(); ++ t_output(cmd.infile, "-DRPC_TBL", EXTEND, "_tbl.i"); ++ } ++ if (allfiles) { ++ reinitialize(); ++ svc_output(cmd.infile, "-DRPC_SERVER", EXTEND, "_server.c"); ++ } ++ if (allfiles) { ++ reinitialize(); ++ clnt_output(cmd.infile, "-DRPC_CLIENT", EXTEND, "_client.c"); ++ } ++ } ++ exit(nonfatalerrors); ++ /* NOTREACHED */ ++} ++ ++/* ++ * add extension to filename ++ */ ++static char * ++extendfile(char *file, char *ext) ++{ ++ char *res; ++ char *p; ++ ++ res = alloc(strlen(file) + strlen(ext) + 1); ++ if (res == NULL) { ++ abort(); ++ } ++ p = strrchr(file, '.'); ++ if (p == NULL) { ++ p = file + strlen(file); ++ } ++ (void) strcpy(res, file); ++ (void) strcpy(res + (p - file), ext); ++ return (res); ++} ++ ++/* ++ * Open output file with given extension ++ */ ++static void ++open_output(char *infile, char *outfile) ++{ ++ ++ if (outfile == NULL) { ++ fout = stdout; ++ return; ++ } ++ ++ if (infile != NULL && streq(outfile, infile)) { ++ f_print(stderr, "%s: output would overwrite %s\n", cmdname, ++ infile); ++ crash(); ++ } ++ fout = fopen(outfile, "w"); ++ if (fout == NULL) { ++ f_print(stderr, "%s: unable to open ", cmdname); ++ perror(outfile); ++ crash(); ++ } ++ record_open(outfile); ++ ++} ++ ++static void ++add_warning(void) ++{ ++ f_print(fout, "/*\n"); ++ f_print(fout, " * Please do not edit this file.\n"); ++ f_print(fout, " * It was generated using rpcgen.\n"); ++ f_print(fout, " */\n\n"); ++} ++ ++/* clear list of arguments */ ++static void ++clear_args(void) ++{ ++ int i; ++ for( i=FIXEDARGS; i" : infile; ++ (void) pipe(pd); ++ switch (fork()) { ++ case 0: ++ putarg(0, "cpp"); ++ putarg(1, CPPFLAGS); ++ addarg(define); ++ addarg(infile); ++ addarg((char *)NULL); ++ (void) close(1); ++ (void) dup2(pd[1], 1); ++ (void) close(pd[0]); ++ if (cppDefined) ++ execv(CPP, arglist); ++ else { ++ execvp("cpp", arglist); ++ if (errno == ENOENT) ++ execvp(SVR4_CPP, arglist); ++ if (errno == ENOENT) ++ execvp(SUNOS_CPP, arglist); ++ } ++ perror("execv"); ++ exit(1); ++ case -1: ++ perror("fork"); ++ exit(1); ++ } ++ (void) close(pd[1]); ++ fin = fdopen(pd[0], "r"); ++ if (fin == NULL) { ++ f_print(stderr, "%s: ", cmdname); ++ perror(infilename); ++ crash(); ++ } ++} ++ ++/* valid tirpc nettypes */ ++static char* valid_ti_nettypes[] = ++{ ++ "netpath", ++ "visible", ++ "circuit_v", ++ "datagram_v", ++ "circuit_n", ++ "datagram_n", ++ "udp", ++ "tcp", ++ "raw", ++ NULL ++}; ++ ++/* valid inetd nettypes */ ++static char* valid_i_nettypes[] = ++{ ++ "udp", ++ "tcp", ++ NULL ++}; ++ ++static int ++check_nettype(char *name, char **list_to_check) ++{ ++ int i; ++ for( i = 0; list_to_check[i] != NULL; i++ ) { ++ if( strcmp( name, list_to_check[i] ) == 0 ) { ++ return 1; ++ } ++ } ++ f_print( stderr, "illegal nettype :\'%s\'\n", name ); ++ return 0; ++} ++ ++/* ++ * Compile into an XDR routine output file ++ */ ++ ++static void ++c_output(char *infile, char *define, int extend, char *outfile) ++{ ++ definition *def; ++ char *include; ++ char *outfilename; ++ long tell; ++ ++ c_initialize(); ++ open_input(infile, define); ++ outfilename = extend ? extendfile(infile, outfile) : outfile; ++ open_output(infile, outfilename); ++ add_warning(); ++ if (infile && (include = extendfile(infile, ".h"))) { ++ f_print(fout, "#include \"%s\"\n", include); ++ free(include); ++ /* .h file already contains rpc/rpc.h */ ++ } else ++ f_print(fout, "#include \n"); ++ tell = ftell(fout); ++ while ((def = get_definition()) != NULL) { ++ emit(def); ++ } ++ if (extend && tell == ftell(fout)) { ++ (void) unlink(outfilename); ++ } ++} ++ ++ ++static void ++c_initialize(void) ++{ ++ ++ /* add all the starting basic types */ ++ ++ add_type(1,"int"); ++ add_type(1,"int32_t"); ++ add_type(1,"short"); ++ add_type(1,"bool"); ++ ++ add_type(1,"u_int"); ++ add_type(1,"u_int32_t"); ++ add_type(1,"u_short"); ++ ++} ++ ++char rpcgen_table_dcl[] = "struct rpcgen_table {\n\ ++ char *(*proc)();\n\ ++ xdrproc_t xdr_arg;\n\ ++ unsigned len_arg;\n\ ++ xdrproc_t xdr_res;\n\ ++ unsigned len_res;\n\ ++};\n"; ++ ++ ++static char * ++generate_guard(char *pathname) ++{ ++ char* filename, *guard, *tmp; ++ ++ filename = strrchr(pathname, '/' ); /* find last component */ ++ filename = ((filename == 0) ? pathname : filename+1); ++ guard = strdup(filename); ++ /* convert to upper case */ ++ tmp = guard; ++ while (*tmp) { ++ if (islower(*tmp)) ++ *tmp = toupper(*tmp); ++ tmp++; ++ } ++ ++ guard = extendfile(guard, "_H_RPCGEN"); ++ return( guard ); ++} ++ ++/* ++ * Compile into an XDR header file ++ */ ++static void ++h_output(char *infile, char *define, int extend, char *outfile) ++{ ++ definition *def; ++ char *outfilename; ++ long tell; ++ char *guard; ++ list *l; ++ ++ open_input(infile, define); ++ outfilename = extend ? extendfile(infile, outfile) : outfile; ++ open_output(infile, outfilename); ++ add_warning(); ++ guard = generate_guard( outfilename ? outfilename: infile ); ++ ++ f_print(fout,"#ifndef _%s\n#define _%s\n\n", guard, ++ guard); ++ ++ f_print(fout, "#include \n\n"); ++ ++ f_print(fout, "#ifndef IXDR_GET_INT32\n"); ++ f_print(fout, "#define IXDR_GET_INT32(buf) IXDR_GET_LONG((buf))\n"); ++ f_print(fout, "#endif\n"); ++ f_print(fout, "#ifndef IXDR_PUT_INT32\n"); ++ f_print(fout, "#define IXDR_PUT_INT32(buf, v) IXDR_PUT_LONG((buf), (v))\n"); ++ f_print(fout, "#endif\n"); ++ f_print(fout, "#ifndef IXDR_GET_U_INT32\n"); ++ f_print(fout, "#define IXDR_GET_U_INT32(buf) IXDR_GET_U_LONG((buf))\n"); ++ f_print(fout, "#endif\n"); ++ f_print(fout, "#ifndef IXDR_PUT_U_INT32\n"); ++ f_print(fout, "#define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_U_LONG((buf), (v))\n"); ++ f_print(fout, "#endif\n"); ++ ++ tell = ftell(fout); ++ /* print data definitions */ ++ while ((def = get_definition()) != NULL) { ++ print_datadef(def); ++ } ++ ++ /* print function declarations. ++ Do this after data definitions because they might be used as ++ arguments for functions */ ++ for (l = defined; l != NULL; l = l->next) { ++ print_funcdef(l->val); ++ } ++ if (extend && tell == ftell(fout)) { ++ (void) unlink(outfilename); ++ } else if (tblflag) { ++ f_print(fout, rpcgen_table_dcl); ++ } ++ f_print(fout, "\n#endif /* !_%s */\n", guard); ++} ++ ++/* ++ * Compile into an RPC service ++ */ ++static void ++s_output(int argc, char **argv, char *infile, char *define, int extend, ++ char *outfile, int nomain, int netflag) ++{ ++ char *include; ++ definition *def; ++ int foundprogram = 0; ++ char *outfilename; ++ ++ open_input(infile, define); ++ outfilename = extend ? extendfile(infile, outfile) : outfile; ++ open_output(infile, outfilename); ++ add_warning(); ++ if (infile && (include = extendfile(infile, ".h"))) { ++ f_print(fout, "#include \"%s\"\n", include); ++ free(include); ++ } else ++ f_print(fout, "#include \n"); ++ ++ f_print(fout, "#include \n"); ++ f_print(fout, "#include /* getenv, exit */\n"); ++ if (Cflag) { ++ f_print (fout, "#include /* for pmap_unset */\n"); ++ f_print (fout, "#include /* strcmp */ \n"); ++ } ++ if (strcmp(svcclosetime, "-1") == 0) ++ indefinitewait = 1; ++ else if (strcmp(svcclosetime, "0") == 0) ++ exitnow = 1; ++ else if (inetdflag || pmflag) { ++ f_print(fout, "#include \n"); ++ timerflag = 1; ++ } ++ ++#ifndef linux ++ if( !tirpcflag && inetdflag ) ++ f_print(fout, "#include /* TIOCNOTTY */\n"); ++#else ++ if( !tirpcflag ) ++ f_print(fout, "#include /* TIOCNOTTY */\n"); ++#endif ++ if( Cflag && (inetdflag || pmflag ) ) { ++ f_print(fout, "#ifdef __cplusplus\n"); ++ f_print(fout, "#include /* getdtablesize, open */\n"); ++ f_print(fout, "#endif /* __cplusplus */\n"); ++ ++ if( tirpcflag ) ++ f_print(fout, "#include /* setsid */\n"); ++ } ++ if( tirpcflag ) ++ f_print(fout, "#include \n"); ++ ++ f_print(fout, "#include \n"); ++#ifndef linux ++ f_print(fout, "#include \n"); ++#endif ++ if (inetdflag || !tirpcflag ) { ++ f_print(fout, "#include \n"); ++ f_print(fout, "#include \n"); ++ } ++ ++ if ( (netflag || pmflag) && tirpcflag ) { ++ f_print(fout, "#include \n"); ++ } ++ if (/*timerflag &&*/ tirpcflag) ++ f_print(fout, "#include /* rlimit */\n"); ++ if (logflag || inetdflag || pmflag) { ++#ifdef linux ++ f_print(fout, "#include \n"); ++#else ++ f_print(fout, "#ifdef SYSLOG\n"); ++ f_print(fout, "#include \n"); ++ f_print(fout, "#else\n"); ++ f_print(fout, "#define LOG_ERR 1\n"); ++ f_print(fout, "#define openlog(a, b, c)\n"); ++ f_print(fout, "#endif\n"); ++#endif ++ } ++ ++ /* for ANSI-C */ ++ f_print(fout, "\n#ifdef __STDC__\n#define SIG_PF void(*)(int)\n#endif\n"); ++ ++ f_print(fout, "\n#ifdef DEBUG\n#define RPC_SVC_FG\n#endif\n"); ++ if (timerflag) ++ f_print(fout, "\n#define _RPCSVC_CLOSEDOWN %s\n", svcclosetime); ++ while ((def = get_definition()) != NULL) { ++ foundprogram |= (def->def_kind == DEF_PROGRAM); ++ } ++ if (extend && !foundprogram) { ++ (void) unlink(outfilename); ++ return; ++ } ++ write_most(infile, netflag, nomain); ++ if (!nomain) { ++ if( !do_registers(argc, argv) ) { ++ if (outfilename) ++ (void) unlink(outfilename); ++ usage(); ++ } ++ write_rest(); ++ } ++} ++ ++/* ++ * generate client side stubs ++ */ ++static void ++l_output(char *infile, char *define, int extend, char *outfile) ++{ ++ char *include; ++ definition *def; ++ int foundprogram = 0; ++ char *outfilename; ++ ++ open_input(infile, define); ++ outfilename = extend ? extendfile(infile, outfile) : outfile; ++ open_output(infile, outfilename); ++ add_warning(); ++ if (Cflag) ++ f_print (fout, "#include /* for memset */\n"); ++ if (infile && (include = extendfile(infile, ".h"))) { ++ f_print(fout, "#include \"%s\"\n", include); ++ free(include); ++ } else ++ f_print(fout, "#include \n"); ++ while ((def = get_definition()) != NULL) { ++ foundprogram |= (def->def_kind == DEF_PROGRAM); ++ } ++ if (extend && !foundprogram) { ++ (void) unlink(outfilename); ++ return; ++ } ++ write_stubs(); ++} ++ ++/* ++ * generate the dispatch table ++ */ ++static void ++t_output(char *infile, char *define, int extend, char *outfile) ++{ ++ definition *def; ++ int foundprogram = 0; ++ char *outfilename; ++ ++ open_input(infile, define); ++ outfilename = extend ? extendfile(infile, outfile) : outfile; ++ open_output(infile, outfilename); ++ add_warning(); ++ while ((def = get_definition()) != NULL) { ++ foundprogram |= (def->def_kind == DEF_PROGRAM); ++ } ++ if (extend && !foundprogram) { ++ (void) unlink(outfilename); ++ return; ++ } ++ write_tables(); ++} ++ ++/* sample routine for the server template */ ++static void ++svc_output(char *infile, char *define, int extend, char *outfile) ++{ ++ definition *def; ++ char *include; ++ char *outfilename; ++ long tell; ++ ++ open_input(infile, define); ++ outfilename = extend ? extendfile(infile, outfile) : outfile; ++ checkfiles(infile,outfilename); /*check if outfile already exists. ++ if so, print an error message and exit*/ ++ open_output(infile, outfilename); ++ add_sample_msg(); ++ ++ if (infile && (include = extendfile(infile, ".h"))) { ++ f_print(fout, "#include \"%s\"\n", include); ++ free(include); ++ } else ++ f_print(fout, "#include \n"); ++ ++ tell = ftell(fout); ++ while ((def = get_definition()) != NULL) { ++ write_sample_svc(def); ++ } ++ if (extend && tell == ftell(fout)) { ++ (void) unlink(outfilename); ++ } ++} ++ ++ ++/* sample main routine for client */ ++static void ++clnt_output(char *infile, char *define, int extend, char *outfile) ++{ ++ definition *def; ++ char *include; ++ char *outfilename; ++ long tell; ++ int has_program = 0; ++ ++ open_input(infile, define); ++ outfilename = extend ? extendfile(infile, outfile) : outfile; ++ checkfiles(infile, outfilename); /*check if outfile already exists. ++ if so, print an error message and exit*/ ++ ++ open_output(infile, outfilename); ++ add_sample_msg(); ++ if (infile && (include = extendfile(infile, ".h"))) { ++ f_print(fout, "#include \"%s\"\n", include); ++ free(include); ++ } else ++ f_print(fout, "#include \n"); ++ tell = ftell(fout); ++ while ((def = get_definition()) != NULL) { ++ has_program += write_sample_clnt(def); ++ } ++ ++ if (has_program) ++ write_sample_clnt_main(); ++ ++ if (extend && tell == ftell(fout)) { ++ (void) unlink(outfilename); ++ } ++} ++ ++/* ++ * Perform registrations for service output ++ * Return 0 if failed; 1 otherwise. ++ */ ++static int ++do_registers(int argc, char **argv) ++{ ++ int i; ++ ++ if (inetdflag || !tirpcflag) { ++ for (i = 1; i < argc; i++) { ++ if (streq(argv[i], "-s")) { ++ if (!check_nettype(argv[i + 1], valid_i_nettypes)) ++ return 0; ++ write_inetd_register(argv[i + 1]); ++ i++; ++ } ++ } ++ } else { ++ for (i = 1; i < argc; i++) ++ if (streq(argv[i], "-s")) { ++ if (!check_nettype(argv[i + 1], valid_ti_nettypes)) ++ return 0; ++ write_nettype_register(argv[i + 1]); ++ i++; ++ } else if (streq(argv[i], "-n")) { ++ write_netid_register(argv[i + 1]); ++ i++; ++ } ++ } ++ return 1; ++} ++ ++/* ++ * Add another argument to the arg list ++ */ ++static void ++addarg(char *cp) ++{ ++ if (argcount >= ARGLISTLEN) { ++ f_print(stderr, "rpcgen: too many defines\n"); ++ crash(); ++ /*NOTREACHED*/ ++ } ++ arglist[argcount++] = cp; ++ ++} ++ ++static void ++putarg(int where, char *cp) ++{ ++ if (where >= ARGLISTLEN) { ++ f_print(stderr, "rpcgen: arglist coding error\n"); ++ crash(); ++ /*NOTREACHED*/ ++ } ++ arglist[where] = cp; ++ ++} ++ ++/* ++ * if input file is stdin and an output file is specified then complain ++ * if the file already exists. Otherwise the file may get overwritten ++ * If input file does not exist, exit with an error ++ */ ++ ++static void ++checkfiles(char *infile, char *outfile) ++{ ++ ++ struct stat buf; ++ ++ if(infile) /* infile ! = NULL */ ++ if(stat(infile,&buf) < 0) ++ { ++ perror(infile); ++ crash(); ++ }; ++ if (outfile) { ++ if (stat(outfile, &buf) < 0) ++ return; /* file does not exist */ ++ else { ++ f_print(stderr, ++ "file '%s' already exists and may be overwritten\n", outfile); ++ crash(); ++ } ++ } ++} ++ ++/* ++ * Parse command line arguments ++ */ ++static int ++parseargs(int argc, char **argv, struct commandline *cmd) ++{ ++ int i; ++ int j; ++ char c; ++ char flag[(1 << 8 * sizeof(char))]; ++ int nflags; ++ ++ cmdname = argv[0]; ++ cmd->infile = cmd->outfile = NULL; ++ if (argc < 2) { ++ return (0); ++ } ++ allfiles = 0; ++ flag['c'] = 0; ++ flag['h'] = 0; ++ flag['l'] = 0; ++ flag['m'] = 0; ++ flag['o'] = 0; ++ flag['s'] = 0; ++ flag['n'] = 0; ++ flag['t'] = 0; ++ flag['S'] = 0; ++ flag['C'] = 0; ++ for (i = 1; i < argc; i++) { ++ if (argv[i][0] != '-') { ++ if (cmd->infile) { ++ f_print( stderr, "Cannot specify more than one input file!\n"); ++ ++ return (0); ++ } ++ cmd->infile = argv[i]; ++ } else { ++ for (j = 1; argv[i][j] != 0; j++) { ++ c = argv[i][j]; ++ switch (c) { ++ case 'a': ++ allfiles = 1; ++ break; ++ case 'c': ++ case 'h': ++ case 'l': ++ case 'm': ++ case 't': ++ if (flag[(int) c]) { ++ return (0); ++ } ++ flag[(int) c] = 1; ++ break; ++ case 'S': ++ /* sample flag: Ss or Sc. ++ Ss means set flag['S']; ++ Sc means set flag['C']; */ ++ c = argv[i][++j]; /* get next char */ ++ if( c == 's' ) ++ c = 'S'; ++ else if( c == 'c' ) ++ c = 'C'; ++ else ++ return( 0 ); ++ ++ if (flag[(int) c]) { ++ return (0); ++ } ++ flag[(int) c] = 1; ++ break; ++ case 'C': /* ANSI C syntax */ ++ Cflag = 1; ++ break; ++ ++ case 'b': /* turn TIRPC flag off for ++ generating backward compatible ++ */ ++ tirpcflag = 0; ++ break; ++ ++ case 'I': ++ inetdflag = 1; ++ break; ++ case 'N': ++ newstyle = 1; ++ break; ++ case 'L': ++ logflag = 1; ++ break; ++ case 'K': ++ if (++i == argc) { ++ return (0); ++ } ++ svcclosetime = argv[i]; ++ goto nextarg; ++ case 'T': ++ tblflag = 1; ++ break; ++ case 'i' : ++ if (++i == argc) { ++ return (0); ++ } ++ Inline = atoi(argv[i]); ++ goto nextarg; ++ case 'n': ++ case 'o': ++ case 's': ++ if (argv[i][j - 1] != '-' || ++ argv[i][j + 1] != 0) { ++ return (0); ++ } ++ flag[(int) c] = 1; ++ if (++i == argc) { ++ return (0); ++ } ++ if (c == 's') { ++ if (!streq(argv[i], "udp") && ++ !streq(argv[i], "tcp")) { ++ return (0); ++ } ++ } else if (c == 'o') { ++ if (cmd->outfile) { ++ return (0); ++ } ++ cmd->outfile = argv[i]; ++ } ++ goto nextarg; ++ case 'D': ++ if (argv[i][j - 1] != '-') { ++ return (0); ++ } ++ (void) addarg(argv[i]); ++ goto nextarg; ++ case 'Y': ++ if (++i == argc) { ++ return (0); ++ } ++ (void) strcpy(pathbuf, argv[i]); ++ (void) strcat(pathbuf, "/cpp"); ++ CPP = pathbuf; ++ cppDefined = 1; ++ goto nextarg; ++ ++ ++ ++ default: ++ return (0); ++ } ++ } ++ nextarg: ++ ; ++ } ++ } ++ ++ cmd->cflag = flag['c']; ++ cmd->hflag = flag['h']; ++ cmd->lflag = flag['l']; ++ cmd->mflag = flag['m']; ++ cmd->nflag = flag['n']; ++ cmd->sflag = flag['s']; ++ cmd->tflag = flag['t']; ++ cmd->Ssflag = flag['S']; ++ cmd->Scflag = flag['C']; ++ ++ if( tirpcflag ) { ++ pmflag = inetdflag ? 0 : 1; /* pmflag or inetdflag is always TRUE */ ++ if( (inetdflag && cmd->nflag)) { /* netid not allowed with inetdflag */ ++ f_print(stderr, "Cannot use netid flag with inetd flag!\n"); ++ return (0); ++ } ++ } else { /* 4.1 mode */ ++ pmflag = 0; /* set pmflag only in tirpcmode */ ++ inetdflag = 1; /* inetdflag is TRUE by default */ ++ if( cmd->nflag ) { /* netid needs TIRPC */ ++ f_print( stderr, "Cannot use netid flag without TIRPC!\n"); ++ return( 0 ); ++ } ++ } ++ ++ if( newstyle && ( tblflag || cmd->tflag) ) { ++ f_print( stderr, "Cannot use table flags with newstyle!\n"); ++ return( 0 ); ++ } ++ ++ /* check no conflicts with file generation flags */ ++ nflags = cmd->cflag + cmd->hflag + cmd->lflag + cmd->mflag + ++ cmd->sflag + cmd->nflag + cmd->tflag + cmd->Ssflag + cmd->Scflag; ++ ++ if (nflags == 0) { ++ if (cmd->outfile != NULL || cmd->infile == NULL) { ++ return (0); ++ } ++ } else if (nflags > 1) { ++ f_print( stderr, "Cannot have more than one file generation flag!\n"); ++ return (0); ++ } ++ return (1); ++} ++ ++static void ++usage(void) ++{ ++ f_print(stderr, "usage: %s infile\n", cmdname); ++ f_print(stderr, "\t%s [-a][-b][-C][-Dname[=value]] -i size [-I [-K seconds]] [-L][-N][-T] infile\n", ++ cmdname); ++ f_print(stderr, "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss] [-o outfile] [infile]\n", ++ cmdname); ++ f_print(stderr, "\t%s [-s nettype]* [-o outfile] [infile]\n", cmdname); ++ f_print(stderr, "\t%s [-n netid]* [-o outfile] [infile]\n", cmdname); ++ options_usage(); ++ exit(1); ++} ++ ++static void ++options_usage(void) ++{ ++ f_print(stderr, "options:\n"); ++ f_print(stderr, "-a\t\tgenerate all files, including samples\n"); ++ f_print(stderr, "-b\t\tbackward compatibility mode (generates code for SunOS 4.1)\n"); ++ f_print(stderr, "-c\t\tgenerate XDR routines\n"); ++ f_print(stderr, "-C\t\tANSI C mode\n"); ++ f_print(stderr, "-Dname[=value]\tdefine a symbol (same as #define)\n"); ++ f_print(stderr, "-h\t\tgenerate header file\n"); ++ f_print(stderr, "-i size\t\tsize at which to start generating inline code\n"); ++ f_print(stderr, "-I\t\tgenerate code for inetd support in server (for SunOS 4.1)\n"); ++ f_print(stderr, "-K seconds\tserver exits after K seconds of inactivity\n"); ++ f_print(stderr, "-l\t\tgenerate client side stubs\n"); ++ f_print(stderr, "-L\t\tserver errors will be printed to syslog\n"); ++ f_print(stderr, "-m\t\tgenerate server side stubs\n"); ++ f_print(stderr, "-n netid\tgenerate server code that supports named netid\n"); ++ f_print(stderr, "-N\t\tsupports multiple arguments and call-by-value\n"); ++ f_print(stderr, "-o outfile\tname of the output file\n"); ++ f_print(stderr, "-s nettype\tgenerate server code that supports named nettype\n"); ++ f_print(stderr, "-Sc\t\tgenerate sample client code that uses remote procedures\n"); ++ f_print(stderr, "-Ss\t\tgenerate sample server code that defines remote procedures\n"); ++ f_print(stderr, "-t\t\tgenerate RPC dispatch table\n"); ++ f_print(stderr, "-T\t\tgenerate code to support RPC dispatch tables\n"); ++ f_print(stderr, "-Y path\t\tdirectory name to find C preprocessor (cpp)\n"); ++ ++ exit(1); ++} +diff --git a/rpcgen/rpc_output.h b/rpcgen/rpc_output.h +new file mode 100644 +index 0000000..eb25a60 +--- /dev/null ++++ b/rpcgen/rpc_output.h +@@ -0,0 +1,16 @@ ++/* ++ * rpc_output.h ++ * ++ * Declarations for output functions ++ * ++ */ ++ ++#ifndef RPCGEN_NEW_OUTPUT_H ++#define RPCGEN_NEW_OUTPUT_H ++ ++void write_msg_out(void); ++int nullproc(proc_list *); ++void printarglist(proc_list *, char *, char *); ++void pdeclaration(char *, declaration *, int, char *); ++ ++#endif /* RPCGEN_NEW_OUTPUT_H */ +diff --git a/rpcgen/rpc_parse.c b/rpcgen/rpc_parse.c +new file mode 100644 +index 0000000..b53a553 +--- /dev/null ++++ b/rpcgen/rpc_parse.c +@@ -0,0 +1,609 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#if 0 ++static char sccsid[] = "@(#)rpc_parse.c 1.8 89/02/22 (C) 1987 SMI"; ++#endif ++ ++/* ++ * rpc_parse.c, Parser for the RPC protocol compiler ++ * Copyright (C) 1987 Sun Microsystems, Inc. ++ */ ++#include ++#include ++#include "rpc/types.h" ++#include "rpc_scan.h" ++#include "rpc_parse.h" ++#include "rpc_util.h" ++ ++#define ARGNAME "arg" ++ ++/* ++extern char *make_argname(); ++extern char *strdup(); ++ */ ++ ++static void isdefined(definition *defp); ++static void def_struct(definition *defp); ++static void def_program(definition *defp); ++static void def_enum(definition *defp); ++static void def_const(definition *defp); ++static void def_union(definition *defp); ++static void check_type_name(char *name, int new_type); ++static void def_typedef(definition *defp); ++static void get_declaration(declaration *dec, defkind dkind); ++static void get_prog_declaration(declaration *dec, defkind dkind, int num); ++static void get_type(char **prefixp, char **typep, defkind dkind); ++static void unsigned_dec(char **typep); ++ ++/* ++ * return the next definition you see ++ */ ++definition * ++get_definition(void) ++{ ++ definition *defp; ++ token tok; ++ ++ defp = ALLOC(definition); ++ get_token(&tok); ++ switch (tok.kind) { ++ case TOK_STRUCT: ++ def_struct(defp); ++ break; ++ case TOK_UNION: ++ def_union(defp); ++ break; ++ case TOK_TYPEDEF: ++ def_typedef(defp); ++ break; ++ case TOK_ENUM: ++ def_enum(defp); ++ break; ++ case TOK_PROGRAM: ++ def_program(defp); ++ break; ++ case TOK_CONST: ++ def_const(defp); ++ break; ++ case TOK_EOF: ++ free(defp); ++ return (NULL); ++ default: ++ error("definition keyword expected"); ++ } ++ scan(TOK_SEMICOLON, &tok); ++ isdefined(defp); ++ return (defp); ++} ++ ++static void ++isdefined(definition *defp) ++{ ++ STOREVAL(&defined, defp); ++} ++ ++static void ++def_struct(definition *defp) ++{ ++ token tok; ++ declaration dec; ++ decl_list *decls; ++ decl_list **tailp; ++ ++ defp->def_kind = DEF_STRUCT; ++ ++ scan(TOK_IDENT, &tok); ++ defp->def_name = tok.str; ++ scan(TOK_LBRACE, &tok); ++ tailp = &defp->def.st.decls; ++ do { ++ get_declaration(&dec, DEF_STRUCT); ++ decls = ALLOC(decl_list); ++ decls->decl = dec; ++ *tailp = decls; ++ tailp = &decls->next; ++ scan(TOK_SEMICOLON, &tok); ++ peek(&tok); ++ } while (tok.kind != TOK_RBRACE); ++ get_token(&tok); ++ *tailp = NULL; ++} ++ ++static void ++def_program(definition *defp) ++{ ++ token tok; ++ declaration dec; ++ decl_list *decls; ++ decl_list **tailp; ++ version_list *vlist; ++ version_list **vtailp; ++ proc_list *plist; ++ proc_list **ptailp; ++ int num_args; ++ bool_t isvoid = FALSE; /* whether first argument is void */ ++ defp->def_kind = DEF_PROGRAM; ++ scan(TOK_IDENT, &tok); ++ defp->def_name = tok.str; ++ scan(TOK_LBRACE, &tok); ++ vtailp = &defp->def.pr.versions; ++ tailp = &defp->def.st.decls; ++ scan(TOK_VERSION, &tok); ++ do { ++ scan(TOK_IDENT, &tok); ++ vlist = ALLOC(version_list); ++ vlist->vers_name = tok.str; ++ scan(TOK_LBRACE, &tok); ++ ptailp = &vlist->procs; ++ do { ++ /* get result type */ ++ plist = ALLOC(proc_list); ++ get_type(&plist->res_prefix, &plist->res_type, ++ DEF_PROGRAM); ++ if (streq(plist->res_type, "opaque")) { ++ error("illegal result type"); ++ } ++ scan(TOK_IDENT, &tok); ++ plist->proc_name = tok.str; ++ scan(TOK_LPAREN, &tok); ++ /* get args - first one*/ ++ num_args = 1; ++ isvoid = FALSE; ++ /* type of DEF_PROGRAM in the first ++ * get_prog_declaration and DEF_STURCT in the next ++ * allows void as argument if it is the only argument ++ */ ++ get_prog_declaration(&dec, DEF_PROGRAM, num_args); ++ if (streq(dec.type, "void")) ++ isvoid = TRUE; ++ decls = ALLOC(decl_list); ++ plist->args.decls = decls; ++ decls->decl = dec; ++ tailp = &decls->next; ++ /* get args */ ++ while(peekscan(TOK_COMMA, &tok)) { ++ num_args++; ++ get_prog_declaration(&dec, DEF_STRUCT, ++ num_args); ++ decls = ALLOC(decl_list); ++ decls->decl = dec; ++ *tailp = decls; ++ if (streq(dec.type, "void")) ++ isvoid = TRUE; ++ tailp = &decls->next; ++ } ++ /* multiple arguments are only allowed in newstyle */ ++ if( !newstyle && num_args > 1 ) { ++ error("only one argument is allowed" ); ++ } ++ if (isvoid && num_args > 1) { ++ error("illegal use of void in program definition"); ++ } ++ *tailp = NULL; ++ scan(TOK_RPAREN, &tok); ++ scan(TOK_EQUAL, &tok); ++ scan_num(&tok); ++ scan(TOK_SEMICOLON, &tok); ++ plist->proc_num = tok.str; ++ plist->arg_num = num_args; ++ *ptailp = plist; ++ ptailp = &plist->next; ++ peek(&tok); ++ } while (tok.kind != TOK_RBRACE); ++ *ptailp = NULL; ++ *vtailp = vlist; ++ vtailp = &vlist->next; ++ scan(TOK_RBRACE, &tok); ++ scan(TOK_EQUAL, &tok); ++ scan_num(&tok); ++ vlist->vers_num = tok.str; ++ /* make the argument structure name for each arg*/ ++ for(plist = vlist->procs; plist != NULL; ++ plist = plist->next) { ++ plist->args.argname = make_argname(plist->proc_name, ++ vlist->vers_num); ++ /* free the memory ??*/ ++ } ++ scan(TOK_SEMICOLON, &tok); ++ scan2(TOK_VERSION, TOK_RBRACE, &tok); ++ } while (tok.kind == TOK_VERSION); ++ scan(TOK_EQUAL, &tok); ++ scan_num(&tok); ++ defp->def.pr.prog_num = tok.str; ++ *vtailp = NULL; ++} ++ ++ ++static void ++def_enum(definition *defp) ++{ ++ token tok; ++ enumval_list *elist; ++ enumval_list **tailp; ++ ++ defp->def_kind = DEF_ENUM; ++ scan(TOK_IDENT, &tok); ++ defp->def_name = tok.str; ++ scan(TOK_LBRACE, &tok); ++ tailp = &defp->def.en.vals; ++ do { ++ scan(TOK_IDENT, &tok); ++ elist = ALLOC(enumval_list); ++ elist->name = tok.str; ++ elist->assignment = NULL; ++ scan3(TOK_COMMA, TOK_RBRACE, TOK_EQUAL, &tok); ++ if (tok.kind == TOK_EQUAL) { ++ scan_num(&tok); ++ elist->assignment = tok.str; ++ scan2(TOK_COMMA, TOK_RBRACE, &tok); ++ } ++ *tailp = elist; ++ tailp = &elist->next; ++ } while (tok.kind != TOK_RBRACE); ++ *tailp = NULL; ++} ++ ++static void ++def_const(definition *defp) ++{ ++ token tok; ++ ++ defp->def_kind = DEF_CONST; ++ scan(TOK_IDENT, &tok); ++ defp->def_name = tok.str; ++ scan(TOK_EQUAL, &tok); ++ scan2(TOK_IDENT, TOK_STRCONST, &tok); ++ defp->def.co = tok.str; ++} ++ ++static void ++def_union(definition *defp) ++{ ++ token tok; ++ declaration dec; ++ case_list *cases; ++ case_list **tailp; ++ ++ defp->def_kind = DEF_UNION; ++ scan(TOK_IDENT, &tok); ++ defp->def_name = tok.str; ++ scan(TOK_SWITCH, &tok); ++ scan(TOK_LPAREN, &tok); ++ get_declaration(&dec, DEF_UNION); ++ defp->def.un.enum_decl = dec; ++ tailp = &defp->def.un.cases; ++ scan(TOK_RPAREN, &tok); ++ scan(TOK_LBRACE, &tok); ++ scan(TOK_CASE, &tok); ++ while (tok.kind == TOK_CASE) { ++ scan2(TOK_IDENT, TOK_CHARCONST, &tok); ++ cases = ALLOC(case_list); ++ cases->case_name = tok.str; ++ scan(TOK_COLON, &tok); ++ /* now peek at next token */ ++ if(peekscan(TOK_CASE,&tok)) ++ { ++ ++ do ++ { ++ scan2(TOK_IDENT, TOK_CHARCONST, &tok); ++ cases->contflag=1; /* continued case statement */ ++ *tailp = cases; ++ tailp = &cases->next; ++ cases = ALLOC(case_list); ++ cases->case_name = tok.str; ++ scan(TOK_COLON, &tok); ++ ++ }while(peekscan(TOK_CASE,&tok)); ++ } ++ ++ get_declaration(&dec, DEF_UNION); ++ cases->case_decl = dec; ++ cases->contflag=0; /* no continued case statement */ ++ *tailp = cases; ++ tailp = &cases->next; ++ scan(TOK_SEMICOLON, &tok); ++ ++ scan3(TOK_CASE, TOK_DEFAULT, TOK_RBRACE, &tok); ++ } ++ *tailp = NULL; ++ if (tok.kind == TOK_DEFAULT) { ++ scan(TOK_COLON, &tok); ++ get_declaration(&dec, DEF_UNION); ++ defp->def.un.default_decl = ALLOC(declaration); ++ *defp->def.un.default_decl = dec; ++ scan(TOK_SEMICOLON, &tok); ++ scan(TOK_RBRACE, &tok); ++ } else { ++ defp->def.un.default_decl = NULL; ++ } ++} ++ ++static char* reserved_words[] = ++{ ++ "array", ++ "bytes", ++ "destroy", ++ "free", ++ "getpos", ++ "inline", ++ "pointer", ++ "reference", ++ "setpos", ++ "sizeof", ++ "union", ++ "vector", ++ NULL ++ }; ++ ++static char* reserved_types[] = ++{ ++ "opaque", ++ "string", ++ NULL ++ }; ++ ++/* check that the given name is not one that would eventually result in ++ xdr routines that would conflict with internal XDR routines. */ ++static void ++check_type_name(char *name, int new_type) ++{ ++ int i; ++ char tmp[100]; ++ ++ for( i = 0; reserved_words[i] != NULL; i++ ) { ++ if( strcmp( name, reserved_words[i] ) == 0 ) { ++ sprintf(tmp, ++ "illegal (reserved) name :\'%s\' in type definition", name ); ++ error(tmp); ++ } ++ } ++ if( new_type ) { ++ for( i = 0; reserved_types[i] != NULL; i++ ) { ++ if( strcmp( name, reserved_types[i] ) == 0 ) { ++ sprintf(tmp, ++ "illegal (reserved) name :\'%s\' in type definition", name ); ++ error(tmp); ++ } ++ } ++ } ++} ++ ++static void ++def_typedef(definition *defp) ++{ ++ declaration dec; ++ ++ defp->def_kind = DEF_TYPEDEF; ++ get_declaration(&dec, DEF_TYPEDEF); ++ defp->def_name = dec.name; ++ check_type_name( dec.name, 1 ); ++ defp->def.ty.old_prefix = dec.prefix; ++ defp->def.ty.old_type = dec.type; ++ defp->def.ty.rel = dec.rel; ++ defp->def.ty.array_max = dec.array_max; ++} ++ ++static void ++get_declaration(declaration *dec, defkind dkind) ++{ ++ token tok; ++ ++ get_type(&dec->prefix, &dec->type, dkind); ++ dec->rel = REL_ALIAS; ++ if (streq(dec->type, "void")) { ++ return; ++ } ++ ++ check_type_name( dec->type, 0 ); ++ ++ scan2(TOK_STAR, TOK_IDENT, &tok); ++ if (tok.kind == TOK_STAR) { ++ dec->rel = REL_POINTER; ++ scan(TOK_IDENT, &tok); ++ } ++ dec->name = tok.str; ++ if (peekscan(TOK_LBRACKET, &tok)) { ++ if (dec->rel == REL_POINTER) { ++ error("no array-of-pointer declarations -- use typedef"); ++ } ++ dec->rel = REL_VECTOR; ++ scan_num(&tok); ++ dec->array_max = tok.str; ++ scan(TOK_RBRACKET, &tok); ++ } else if (peekscan(TOK_LANGLE, &tok)) { ++ if (dec->rel == REL_POINTER) { ++ error("no array-of-pointer declarations -- use typedef"); ++ } ++ dec->rel = REL_ARRAY; ++ if (peekscan(TOK_RANGLE, &tok)) { ++ dec->array_max = "~0"; /* unspecified size, use max */ ++ } else { ++ scan_num(&tok); ++ dec->array_max = tok.str; ++ scan(TOK_RANGLE, &tok); ++ } ++ } ++ if (streq(dec->type, "opaque")) { ++ if (dec->rel != REL_ARRAY && dec->rel != REL_VECTOR) { ++ error("array declaration expected"); ++ } ++ } else if (streq(dec->type, "string")) { ++ if (dec->rel != REL_ARRAY) { ++ error("variable-length array declaration expected"); ++ } ++ } ++} ++ ++ ++static void ++get_prog_declaration(declaration *dec, defkind dkind, int num) ++{ ++ token tok; ++ char name[10]; /* argument name */ ++ ++ if (dkind == DEF_PROGRAM) { ++ peek(&tok); ++ if (tok.kind == TOK_RPAREN) { /* no arguments */ ++ dec->rel = REL_ALIAS; ++ dec->type = "void"; ++ dec->prefix = NULL; ++ dec->name = NULL; ++ return; ++ } ++ } ++ get_type(&dec->prefix, &dec->type, dkind); ++ dec->rel = REL_ALIAS; ++ if (peekscan(TOK_IDENT, &tok)) /* optional name of argument */ ++ strcpy(name, tok.str); ++ else ++ sprintf(name, "%s%d", ARGNAME, num); /* default name of argument */ ++ ++ dec->name = (char *) strdup(name); ++ ++ if (streq(dec->type, "void")) { ++ return; ++ } ++ ++ if (streq(dec->type, "opaque")) { ++ error("opaque -- illegal argument type"); ++ } ++ if (peekscan(TOK_STAR, &tok)) { ++ if (streq(dec->type, "string")) { ++ error("pointer to string not allowed in program arguments\n"); ++ } ++ dec->rel = REL_POINTER; ++ if (peekscan(TOK_IDENT, &tok)) /* optional name of argument */ ++ dec->name = strdup(tok.str); ++ } ++ if (peekscan(TOK_LANGLE, &tok)) { ++ if (!streq(dec->type, "string")) { ++ error("arrays cannot be declared as arguments to procedures -- use typedef"); ++ } ++ dec->rel = REL_ARRAY; ++ if (peekscan(TOK_RANGLE, &tok)) { ++ dec->array_max = "~0";/* unspecified size, use max */ ++ } else { ++ scan_num(&tok); ++ dec->array_max = tok.str; ++ scan(TOK_RANGLE, &tok); ++ } ++ } ++ if (streq(dec->type, "string")) { ++ if (dec->rel != REL_ARRAY) { /* .x specifies just string as ++ * type of argument ++ * - make it string<> ++ */ ++ dec->rel = REL_ARRAY; ++ dec->array_max = "~0";/* unspecified size, use max */ ++ } ++ } ++} ++ ++ ++ ++static void ++get_type(char **prefixp, char **typep, defkind dkind) ++{ ++ token tok; ++ ++ *prefixp = NULL; ++ get_token(&tok); ++ switch (tok.kind) { ++ case TOK_IDENT: ++ *typep = tok.str; ++ break; ++ case TOK_STRUCT: ++ case TOK_ENUM: ++ case TOK_UNION: ++ *prefixp = tok.str; ++ scan(TOK_IDENT, &tok); ++ *typep = tok.str; ++ break; ++ case TOK_UNSIGNED: ++ unsigned_dec(typep); ++ break; ++ case TOK_SHORT: ++ *typep = "short"; ++ (void) peekscan(TOK_INT, &tok); ++ break; ++ case TOK_INT32: ++ *typep = "int32_t"; ++ (void) peekscan(TOK_INT, &tok); ++ break; ++ case TOK_VOID: ++ if (dkind != DEF_UNION && dkind != DEF_PROGRAM) { ++ error("voids allowed only inside union and program definitions with one argument"); ++ } ++ *typep = tok.str; ++ break; ++ case TOK_STRING: ++ case TOK_OPAQUE: ++ case TOK_CHAR: ++ case TOK_INT: ++ case TOK_FLOAT: ++ case TOK_DOUBLE: ++ case TOK_BOOL: ++ *typep = tok.str; ++ break; ++ default: ++ error("expected type specifier"); ++ } ++} ++ ++static void ++unsigned_dec(char **typep) ++{ ++ token tok; ++ ++ peek(&tok); ++ switch (tok.kind) { ++ case TOK_CHAR: ++ get_token(&tok); ++ *typep = "u_char"; ++ break; ++ case TOK_SHORT: ++ get_token(&tok); ++ *typep = "u_short"; ++ (void) peekscan(TOK_INT, &tok); ++ break; ++ case TOK_INT32: ++ get_token(&tok); ++ *typep = "u_int32_"; ++ (void) peekscan(TOK_INT, &tok); ++ break; ++ case TOK_INT: ++ get_token(&tok); ++ *typep = "u_int"; ++ break; ++ default: ++ *typep = "u_int"; ++ break; ++ } ++} +diff --git a/rpcgen/rpc_parse.h b/rpcgen/rpc_parse.h +new file mode 100644 +index 0000000..2afae10 +--- /dev/null ++++ b/rpcgen/rpc_parse.h +@@ -0,0 +1,166 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/* @(#)rpc_parse.h 1.3 90/08/29 (C) 1987 SMI */ ++ ++/* ++ * rpc_parse.h, Definitions for the RPCL parser ++ */ ++ ++enum defkind { ++ DEF_CONST, ++ DEF_STRUCT, ++ DEF_UNION, ++ DEF_ENUM, ++ DEF_TYPEDEF, ++ DEF_PROGRAM ++}; ++typedef enum defkind defkind; ++ ++typedef char *const_def; ++ ++enum relation { ++ REL_VECTOR, /* fixed length array */ ++ REL_ARRAY, /* variable length array */ ++ REL_POINTER, /* pointer */ ++ REL_ALIAS, /* simple */ ++}; ++typedef enum relation relation; ++ ++struct typedef_def { ++ char *old_prefix; ++ char *old_type; ++ relation rel; ++ char *array_max; ++}; ++typedef struct typedef_def typedef_def; ++ ++struct enumval_list { ++ char *name; ++ char *assignment; ++ struct enumval_list *next; ++}; ++typedef struct enumval_list enumval_list; ++ ++struct enum_def { ++ enumval_list *vals; ++}; ++typedef struct enum_def enum_def; ++ ++struct declaration { ++ char *prefix; ++ char *type; ++ char *name; ++ relation rel; ++ char *array_max; ++}; ++typedef struct declaration declaration; ++ ++struct decl_list { ++ declaration decl; ++ struct decl_list *next; ++}; ++typedef struct decl_list decl_list; ++ ++struct struct_def { ++ decl_list *decls; ++}; ++typedef struct struct_def struct_def; ++ ++struct case_list { ++ char *case_name; ++ int contflag; ++ declaration case_decl; ++ struct case_list *next; ++}; ++typedef struct case_list case_list; ++ ++struct union_def { ++ declaration enum_decl; ++ case_list *cases; ++ declaration *default_decl; ++}; ++typedef struct union_def union_def; ++ ++struct arg_list { ++ char *argname; /* name of struct for arg*/ ++ decl_list *decls; ++}; ++ ++typedef struct arg_list arg_list; ++ ++struct proc_list { ++ char *proc_name; ++ char *proc_num; ++ arg_list args; ++ int arg_num; ++ char *res_type; ++ char *res_prefix; ++ struct proc_list *next; ++}; ++typedef struct proc_list proc_list; ++ ++struct version_list { ++ char *vers_name; ++ char *vers_num; ++ proc_list *procs; ++ struct version_list *next; ++}; ++typedef struct version_list version_list; ++ ++struct program_def { ++ char *prog_num; ++ version_list *versions; ++}; ++typedef struct program_def program_def; ++ ++struct definition { ++ char *def_name; ++ defkind def_kind; ++ union { ++ const_def co; ++ struct_def st; ++ union_def un; ++ enum_def en; ++ typedef_def ty; ++ program_def pr; ++ } def; ++}; ++typedef struct definition definition; ++ ++definition *get_definition(); ++ ++ ++struct bas_type ++{ ++ char *name; ++ int length; ++ struct bas_type *next; ++}; ++ ++typedef struct bas_type bas_type; +diff --git a/rpcgen/rpc_sample.c b/rpcgen/rpc_sample.c +new file mode 100644 +index 0000000..2b5c81b +--- /dev/null ++++ b/rpcgen/rpc_sample.c +@@ -0,0 +1,247 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#if 0 ++static char sccsid[] = "@(#)rpc_sample.c 1.1 90/08/30 (C) 1987 SMI"; ++ ++#endif ++ ++/* ++ * rpc_sample.c, Sample client-server code outputter for the RPC protocol compiler ++ */ ++ ++#include ++#include ++#include "rpc_parse.h" ++#include "rpc_util.h" ++ ++ ++static char RQSTP[] = "rqstp"; ++ ++static void write_sample_client(char *program_name, version_list *vp); ++static void write_sample_server(definition * def); ++static void return_type(proc_list *plist); ++ ++void ++write_sample_svc(definition *def) ++{ ++ if (def->def_kind != DEF_PROGRAM) ++ return; ++ write_sample_server(def); ++} ++ ++ ++int ++write_sample_clnt(definition *def) ++{ ++ version_list *vp; ++ int count = 0; ++ ++ if (def->def_kind != DEF_PROGRAM) ++ return (0); ++ /* generate sample code for each version */ ++ for (vp = def->def.pr.versions; vp != NULL; vp = vp->next) { ++ write_sample_client(def->def_name, vp); ++ ++count; ++ } ++ return (count); ++} ++ ++ ++static void ++write_sample_client(char *program_name, version_list *vp) ++{ ++ proc_list *proc; ++ int i; ++ decl_list *l; ++ ++ f_print(fout, "\n\nvoid\n"); ++ pvname(program_name, vp->vers_num); ++ if (Cflag) ++ f_print(fout, "( char* host )\n{\n"); ++ else ++ f_print(fout, "(host)\nchar *host;\n{\n"); ++ f_print(fout, "\tCLIENT *clnt;\n"); ++ ++ i = 0; ++ for (proc = vp->procs; proc != NULL; proc = proc->next) { ++ f_print(fout, "\t"); ++ ptype(proc->res_prefix, proc->res_type, 1); ++ f_print(fout, " *result_%d;\n", ++i); ++ /* print out declarations for arguments */ ++ if (proc->arg_num < 2 && !newstyle) { ++ f_print(fout, "\t"); ++ if (!streq(proc->args.decls->decl.type, "void")) ++ ptype(proc->args.decls->decl.prefix, proc->args.decls->decl.type, 1); ++ else ++ f_print(fout, "char* "); /* cannot have "void" type */ ++ f_print(fout, " "); ++ pvname(proc->proc_name, vp->vers_num); ++ f_print(fout, "_arg;\n"); ++ } else if (!streq(proc->args.decls->decl.type, "void")) { ++ for (l = proc->args.decls; l != NULL; l = l->next) { ++ f_print(fout, "\t"); ++ ptype(l->decl.prefix, l->decl.type, 1); ++ f_print(fout, " "); ++ pvname(proc->proc_name, vp->vers_num); ++ f_print(fout, "_%s;\n", l->decl.name); ++ /* pdeclaration(proc->args.argname, &l->decl, 1, ";\n" );*/ ++ } ++ } ++ } ++ ++ /* generate creation of client handle */ ++ f_print(fout, "\tclnt = clnt_create(host, %s, %s, \"%s\");\n", ++ program_name, vp->vers_name, tirpcflag ? "netpath" : "udp"); ++ f_print(fout, "\tif (clnt == NULL) {\n"); ++ f_print(fout, "\t\tclnt_pcreateerror(host);\n"); ++ f_print(fout, "\t\texit(1);\n\t}\n"); ++ ++ /* generate calls to procedures */ ++ i = 0; ++ for (proc = vp->procs; proc != NULL; proc = proc->next) { ++ f_print(fout, "\tresult_%d = ", ++i); ++ pvname(proc->proc_name, vp->vers_num); ++ if (proc->arg_num < 2 && !newstyle) { ++ f_print(fout, "("); ++ if (streq(proc->args.decls->decl.type, "void")) /* cast to void* */ ++ f_print(fout, "(void*)"); ++ f_print(fout, "&"); ++ pvname(proc->proc_name, vp->vers_num); ++ f_print(fout, "_arg, clnt);\n"); ++ } else if (streq(proc->args.decls->decl.type, "void")) { ++ f_print(fout, "(clnt);\n"); ++ } else { ++ f_print(fout, "("); ++ for (l = proc->args.decls; l != NULL; l = l->next) { ++ pvname(proc->proc_name, vp->vers_num); ++ f_print(fout, "_%s, ", l->decl.name); ++ } ++ f_print(fout, "clnt);\n"); ++ } ++ f_print(fout, "\tif (result_%d == NULL) {\n", i); ++ f_print(fout, "\t\tclnt_perror(clnt, \"call failed:\");\n"); ++ f_print(fout, "\t}\n"); ++ } ++ ++ f_print(fout, "\tclnt_destroy( clnt );\n"); ++ f_print(fout, "}\n"); ++} ++ ++static void ++write_sample_server(definition * def) ++{ ++ version_list *vp; ++ proc_list *proc; ++ ++ for (vp = def->def.pr.versions; vp != NULL; vp = vp->next) { ++ for (proc = vp->procs; proc != NULL; proc = proc->next) { ++ f_print(fout, "\n"); ++ /* if( Cflag ) ++ f_print( fout, "extern \"C\"{\n"); ++*/ ++ return_type(proc); ++ f_print(fout, "* \n"); ++ if (Cflag) ++ pvname_svc(proc->proc_name, vp->vers_num); ++ else ++ pvname(proc->proc_name, vp->vers_num); ++ printarglist(proc, RQSTP, "struct svc_req *"); ++ ++ f_print(fout, "{\n"); ++ f_print(fout, "\n\tstatic "); ++ if (!streq(proc->res_type, "void")) ++ return_type(proc); ++ else ++ f_print(fout, "char*"); /* cannot have void type */ ++ /* f_print(fout, " result;\n", proc->res_type); */ ++ f_print(fout, " result;\n"); ++ f_print(fout, ++ "\n\t/*\n\t * insert server code here\n\t */\n\n"); ++ if (!streq(proc->res_type, "void")) ++ f_print(fout, "\treturn(&result);\n}\n"); ++ else /* cast back to void * */ ++ f_print(fout, "\treturn((void*) &result);\n}\n"); ++ /* if( Cflag) ++ f_print( fout, "};\n"); ++*/ ++ ++ } ++ } ++} ++ ++ ++ ++static void ++return_type(proc_list *plist) ++{ ++ ptype( plist->res_prefix, plist->res_type, 1 ); ++} ++ ++void ++add_sample_msg(void) ++{ ++ f_print(fout, "/*\n"); ++ f_print(fout, " * This is sample code generated by rpcgen.\n"); ++ f_print(fout, " * These are only templates and you can use them\n"); ++ f_print(fout, " * as a guideline for developing your own functions.\n"); ++ f_print(fout, " */\n\n"); ++} ++ ++void ++write_sample_clnt_main(void) ++{ ++ list *l; ++ definition *def; ++ version_list *vp; ++ ++ f_print(fout, "\n\n" ); ++ if( Cflag ) ++ f_print(fout,"main( int argc, char* argv[] )\n{\n" ); ++ else ++ f_print(fout, "main(argc, argv)\nint argc;\nchar *argv[];\n{\n" ); ++ ++ f_print(fout, "\tchar *host;"); ++ f_print(fout, "\n\n\tif(argc < 2) {"); ++ f_print(fout, "\n\t\tprintf(\"usage: %%s server_host\\n\", argv[0]);\n" ); ++ f_print(fout, "\t\texit(1);\n\t}"); ++ f_print(fout, "\n\thost = argv[1];\n"); ++ ++ for (l = defined; l != NULL; l = l->next) { ++ def = l->val; ++ if (def->def_kind != DEF_PROGRAM) { ++ continue; ++ } ++ for (vp = def->def.pr.versions; vp != NULL; vp = vp->next) { ++ f_print( fout, "\t" ); ++ pvname(def->def_name, vp->vers_num); ++ f_print( fout, "( host );\n" ); ++ } ++ } ++ f_print(fout, "}\n"); ++} +diff --git a/rpcgen/rpc_scan.c b/rpcgen/rpc_scan.c +new file mode 100644 +index 0000000..f58fa9f +--- /dev/null ++++ b/rpcgen/rpc_scan.c +@@ -0,0 +1,474 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#if 0 ++static char sccsid[] = "@(#)rpc_scan.c 1.11 89/02/22 (C) 1987 SMI"; ++#endif ++ ++/* ++ * rpc_scan.c, Scanner for the RPC protocol compiler ++ * Copyright (C) 1987, Sun Microsystems, Inc. ++ */ ++#include ++#include ++#include ++#include "rpc_scan.h" ++#include "rpc_parse.h" ++#include "rpc_util.h" ++ ++static void unget_token(token *tokp); ++static void findstrconst(char **str, char **val); ++static void findchrconst(char **str, char **val); ++static void findconst(char **str, char **val); ++static void findkind(char **mark, token *tokp); ++static int cppline(char *line); ++static int directive(char *line); ++static void printdirective(char *line); ++static void docppline(char *line, int *lineno, char **fname); ++ ++#define startcomment(where) (where[0] == '/' && where[1] == '*') ++#define endcomment(where) (where[-1] == '*' && where[0] == '/') ++ ++static int pushed = 0; /* is a token pushed */ ++static token lasttok; /* last token, if pushed */ ++ ++/* ++ * scan expecting 1 given token ++ */ ++void ++scan(tok_kind expect, token *tokp) ++{ ++ get_token(tokp); ++ if (tokp->kind != expect) { ++ expected1(expect); ++ } ++} ++ ++/* ++ * scan expecting any of the 2 given tokens ++ */ ++void ++scan2(tok_kind expect1, tok_kind expect2, token *tokp) ++{ ++ get_token(tokp); ++ if (tokp->kind != expect1 && tokp->kind != expect2) { ++ expected2(expect1, expect2); ++ } ++} ++ ++/* ++ * scan expecting any of the 3 given token ++ */ ++void ++scan3(tok_kind expect1, tok_kind expect2, tok_kind expect3, token *tokp) ++{ ++ get_token(tokp); ++ if (tokp->kind != expect1 && tokp->kind != expect2 ++ && tokp->kind != expect3) { ++ expected3(expect1, expect2, expect3); ++ } ++} ++ ++/* ++ * scan expecting a constant, possibly symbolic ++ */ ++void ++scan_num(token *tokp) ++{ ++ get_token(tokp); ++ switch (tokp->kind) { ++ case TOK_IDENT: ++ break; ++ default: ++ error("constant or identifier expected"); ++ } ++} ++ ++/* ++ * Peek at the next token ++ */ ++void ++peek(token *tokp) ++{ ++ get_token(tokp); ++ unget_token(tokp); ++} ++ ++/* ++ * Peek at the next token and scan it if it matches what you expect ++ */ ++int ++peekscan(tok_kind expect, token *tokp) ++{ ++ peek(tokp); ++ if (tokp->kind == expect) { ++ get_token(tokp); ++ return (1); ++ } ++ return (0); ++} ++ ++/* ++ * Get the next token, printing out any directive that are encountered. ++ */ ++void ++get_token(token *tokp) ++{ ++ int commenting; ++ ++ if (pushed) { ++ pushed = 0; ++ *tokp = lasttok; ++ return; ++ } ++ commenting = 0; ++ for (;;) { ++ if (*where == 0) { ++ for (;;) { ++ if (!fgets(curline, MAXLINESIZE, fin)) { ++ tokp->kind = TOK_EOF; ++ *where = 0; ++ return; ++ } ++ linenum++; ++ if (commenting) { ++ break; ++ } else if (cppline(curline)) { ++ docppline(curline, &linenum, ++ &infilename); ++ } else if (directive(curline)) { ++ printdirective(curline); ++ } else { ++ break; ++ } ++ } ++ where = curline; ++ } else if (isspace(*where)) { ++ while (isspace(*where)) { ++ where++; /* eat */ ++ } ++ } else if (commenting) { ++ for (where++; *where; where++) { ++ if (endcomment(where)) { ++ where++; ++ commenting--; ++ break; ++ } ++ } ++ } else if (startcomment(where)) { ++ where += 2; ++ commenting++; ++ } else { ++ break; ++ } ++ } ++ ++ /* ++ * 'where' is not whitespace, comment or directive Must be a token! ++ */ ++ switch (*where) { ++ case ':': ++ tokp->kind = TOK_COLON; ++ where++; ++ break; ++ case ';': ++ tokp->kind = TOK_SEMICOLON; ++ where++; ++ break; ++ case ',': ++ tokp->kind = TOK_COMMA; ++ where++; ++ break; ++ case '=': ++ tokp->kind = TOK_EQUAL; ++ where++; ++ break; ++ case '*': ++ tokp->kind = TOK_STAR; ++ where++; ++ break; ++ case '[': ++ tokp->kind = TOK_LBRACKET; ++ where++; ++ break; ++ case ']': ++ tokp->kind = TOK_RBRACKET; ++ where++; ++ break; ++ case '{': ++ tokp->kind = TOK_LBRACE; ++ where++; ++ break; ++ case '}': ++ tokp->kind = TOK_RBRACE; ++ where++; ++ break; ++ case '(': ++ tokp->kind = TOK_LPAREN; ++ where++; ++ break; ++ case ')': ++ tokp->kind = TOK_RPAREN; ++ where++; ++ break; ++ case '<': ++ tokp->kind = TOK_LANGLE; ++ where++; ++ break; ++ case '>': ++ tokp->kind = TOK_RANGLE; ++ where++; ++ break; ++ ++ case '"': ++ tokp->kind = TOK_STRCONST; ++ findstrconst(&where, &tokp->str); ++ break; ++ case '\'': ++ tokp->kind = TOK_CHARCONST; ++ findchrconst(&where, &tokp->str); ++ break; ++ ++ case '-': ++ case '0': ++ case '1': ++ case '2': ++ case '3': ++ case '4': ++ case '5': ++ case '6': ++ case '7': ++ case '8': ++ case '9': ++ tokp->kind = TOK_IDENT; ++ findconst(&where, &tokp->str); ++ break; ++ ++ default: ++ if (!(isalpha(*where) || *where == '_')) { ++ char buf[100]; ++ char *p; ++ ++ s_print(buf, "illegal character in file: "); ++ p = buf + strlen(buf); ++ if (isprint(*where)) { ++ s_print(p, "%c", *where); ++ } else { ++ s_print(p, "%d", *where); ++ } ++ error(buf); ++ } ++ findkind(&where, tokp); ++ break; ++ } ++} ++ ++static void ++unget_token(token *tokp) ++{ ++ lasttok = *tokp; ++ pushed = 1; ++} ++ ++static void ++findstrconst(char **str, char **val) ++{ ++ char *p; ++ int size; ++ ++ p = *str; ++ do { ++ *p++; ++ } while (*p && *p != '"'); ++ if (*p == 0) { ++ error("unterminated string constant"); ++ } ++ p++; ++ size = p - *str; ++ *val = alloc(size + 1); ++ (void) strncpy(*val, *str, size); ++ (*val)[size] = 0; ++ *str = p; ++} ++ ++static void ++findchrconst(char **str, char **val) ++{ ++ char *p; ++ int size; ++ ++ p = *str; ++ do { ++ *p++; ++ } while (*p && *p != '\''); ++ if (*p == 0) { ++ error("unterminated string constant"); ++ } ++ p++; ++ size = p - *str; ++ if (size != 3) { ++ error("empty char string"); ++ } ++ *val = alloc(size + 1); ++ (void) strncpy(*val, *str, size); ++ (*val)[size] = 0; ++ *str = p; ++} ++ ++static void ++findconst(char **str, char **val) ++{ ++ char *p; ++ int size; ++ ++ p = *str; ++ if (*p == '0' && *(p + 1) == 'x') { ++ p++; ++ do { ++ p++; ++ } while (isxdigit(*p)); ++ } else { ++ do { ++ p++; ++ } while (isdigit(*p)); ++ } ++ size = p - *str; ++ *val = alloc(size + 1); ++ (void) strncpy(*val, *str, size); ++ (*val)[size] = 0; ++ *str = p; ++} ++ ++static token symbols[] = { ++ {TOK_CONST, "const"}, ++ {TOK_UNION, "union"}, ++ {TOK_SWITCH, "switch"}, ++ {TOK_CASE, "case"}, ++ {TOK_DEFAULT, "default"}, ++ {TOK_STRUCT, "struct"}, ++ {TOK_TYPEDEF, "typedef"}, ++ {TOK_ENUM, "enum"}, ++ {TOK_OPAQUE, "opaque"}, ++ {TOK_BOOL, "bool"}, ++ {TOK_VOID, "void"}, ++ {TOK_CHAR, "char"}, ++ {TOK_INT, "int"}, ++ {TOK_UNSIGNED, "unsigned"}, ++ {TOK_SHORT, "short"}, ++ {TOK_INT32, "int32"}, ++ {TOK_FLOAT, "float"}, ++ {TOK_DOUBLE, "double"}, ++ {TOK_STRING, "string"}, ++ {TOK_PROGRAM, "program"}, ++ {TOK_VERSION, "version"}, ++ {TOK_EOF, "??????"}, ++}; ++ ++static void ++findkind(char **mark, token *tokp) ++{ ++ int len; ++ token *s; ++ char *str; ++ ++ str = *mark; ++ for (s = symbols; s->kind != TOK_EOF; s++) { ++ len = strlen(s->str); ++ if (strncmp(str, s->str, len) == 0) { ++ if (!isalnum(str[len]) && str[len] != '_') { ++ tokp->kind = s->kind; ++ tokp->str = s->str; ++ *mark = str + len; ++ return; ++ } ++ } ++ } ++ tokp->kind = TOK_IDENT; ++ for (len = 0; isalnum(str[len]) || str[len] == '_'; len++); ++ tokp->str = alloc(len + 1); ++ (void) strncpy(tokp->str, str, len); ++ tokp->str[len] = 0; ++ *mark = str + len; ++} ++ ++static int ++cppline(char *line) ++{ ++ return (line == curline && *line == '#'); ++} ++ ++static int ++directive(char *line) ++{ ++ return (line == curline && *line == '%'); ++} ++ ++static void ++printdirective(char *line) ++{ ++ f_print(fout, "%s", line + 1); ++} ++ ++static void ++docppline(char *line, int *lineno, char **fname) ++{ ++ char *file; ++ int num; ++ char *p; ++ ++ line++; ++ while (isspace(*line)) { ++ line++; ++ } ++ num = atoi(line); ++ while (isdigit(*line)) { ++ line++; ++ } ++ while (isspace(*line)) { ++ line++; ++ } ++ if (*line != '"') { ++ error("preprocessor error"); ++ } ++ line++; ++ p = file = alloc(strlen(line) + 1); ++ while (*line && *line != '"') { ++ *p++ = *line++; ++ } ++ if (*line == 0) { ++ error("preprocessor error"); ++ } ++ *p = 0; ++ if (*file == 0) { ++ *fname = NULL; ++ free(file); ++ } else { ++ *fname = file; ++ } ++ *lineno = num - 1; ++} +diff --git a/rpcgen/rpc_scan.h b/rpcgen/rpc_scan.h +new file mode 100644 +index 0000000..16f688c +--- /dev/null ++++ b/rpcgen/rpc_scan.h +@@ -0,0 +1,103 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/* @(#)rpc_scan.h 1.3 90/08/29 (C) 1987 SMI */ ++ ++/* ++ * rpc_scan.h, Definitions for the RPCL scanner ++ */ ++ ++/* ++ * kinds of tokens ++ */ ++enum tok_kind { ++ TOK_IDENT, ++ TOK_CHARCONST, ++ TOK_STRCONST, ++ TOK_LPAREN, ++ TOK_RPAREN, ++ TOK_LBRACE, ++ TOK_RBRACE, ++ TOK_LBRACKET, ++ TOK_RBRACKET, ++ TOK_LANGLE, ++ TOK_RANGLE, ++ TOK_STAR, ++ TOK_COMMA, ++ TOK_EQUAL, ++ TOK_COLON, ++ TOK_SEMICOLON, ++ TOK_CONST, ++ TOK_STRUCT, ++ TOK_UNION, ++ TOK_SWITCH, ++ TOK_CASE, ++ TOK_DEFAULT, ++ TOK_ENUM, ++ TOK_TYPEDEF, ++ TOK_INT, ++ TOK_SHORT, ++ TOK_INT32, ++ TOK_UNSIGNED, ++ TOK_FLOAT, ++ TOK_DOUBLE, ++ TOK_OPAQUE, ++ TOK_CHAR, ++ TOK_STRING, ++ TOK_BOOL, ++ TOK_VOID, ++ TOK_PROGRAM, ++ TOK_VERSION, ++ TOK_EOF ++}; ++typedef enum tok_kind tok_kind; ++ ++/* ++ * a token ++ */ ++struct token { ++ tok_kind kind; ++ char *str; ++}; ++typedef struct token token; ++ ++ ++/* ++ * routine interface ++ */ ++void scan(); ++void scan2(); ++void scan3(); ++void scan_num(); ++void peek(); ++int peekscan(); ++void get_token(); ++void expected1(tok_kind); ++void expected2(tok_kind, tok_kind); ++void expected3(tok_kind, tok_kind, tok_kind); ++ +diff --git a/rpcgen/rpc_svcout.c b/rpcgen/rpc_svcout.c +new file mode 100644 +index 0000000..284a529 +--- /dev/null ++++ b/rpcgen/rpc_svcout.c +@@ -0,0 +1,882 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#if 0 ++ static char sccsid[] = "@(#)rpc_svcout.c 1.29 89/03/30 (C) 1987 SMI"; ++#endif ++ ++/* ++ * rpc_svcout.c, Server-skeleton outputter for the RPC protocol compiler ++ */ ++#include ++#include ++#include "rpc_parse.h" ++#include "rpc_util.h" ++#include "rpc_output.h" ++ ++static void write_real_program(definition *def); ++static void write_program(definition *def, char *storage); ++static void printerr(char *err, char *transp); ++static void printif(char *proc, char *transp, char *prefix, char *arg); ++static void write_inetmost(char *infile); ++static void print_return(char *space); ++static void print_pmapunset(char *space); ++static void print_err_message(char *space); ++static void write_timeout_func(void); ++static void write_pm_most(char *infile, int netflag); ++static void write_rpc_svc_fg(char *infile, char *sp); ++static void open_log_file(char *infile, char *sp); ++ ++static char RQSTP[] = "rqstp"; ++static char TRANSP[] = "transp"; ++static char ARG[] = "argument"; ++static char RESULT[] = "result"; ++static char ROUTINE[] = "local"; ++ ++char _errbuf[256]; /* For all messages */ ++ ++static void ++p_xdrfunc(char *rname, char *typename) ++{ ++ if (Cflag) ++ f_print(fout, "\t\txdr_%s = (xdrproc_t) xdr_%s;\n", rname, ++ stringfix(typename)); ++ else ++ f_print(fout, "\t\txdr_%s = xdr_%s;\n", rname, stringfix(typename)); ++} ++ ++void ++internal_proctype(proc_list *plist) ++{ ++ f_print(fout, "static "); ++ ptype( plist->res_prefix, plist->res_type, 1 ); ++ f_print( fout, "*" ); ++} ++ ++ ++/* ++ * write most of the service, that is, everything but the registrations. ++ */ ++void ++write_most(char *infile, int netflag, int nomain) ++{ ++ if (inetdflag || pmflag) { ++ char* var_type; ++ var_type = (nomain? "extern" : "static"); ++ f_print(fout, "%s int _rpcpmstart;", var_type ); ++ f_print(fout, "\t\t/* Started by a port monitor ? */\n"); ++ f_print(fout, "%s int _rpcfdtype;", var_type ); ++ f_print(fout, "\t\t/* Whether Stream or Datagram ? */\n"); ++ if (timerflag) { ++ f_print(fout, "%s int _rpcsvcdirty;", var_type ); ++ f_print(fout, "\t/* Still serving ? */\n"); ++ } ++ write_svc_aux( nomain ); ++ } ++ /* write out dispatcher and stubs */ ++ write_programs( nomain? (char *)NULL : "static" ); ++ ++ if( nomain ) ++ return; ++ ++ f_print(fout, "\nmain()\n"); ++ f_print(fout, "{\n"); ++ if (inetdflag) { ++ write_inetmost(infile); /* Includes call to write_rpc_svc_fg() */ ++ } else { ++ if( tirpcflag ) { ++ if (netflag) { ++ f_print(fout, "\tregister SVCXPRT *%s;\n", TRANSP); ++ f_print(fout, "\tstruct netconfig *nconf = NULL;\n"); ++ } ++ f_print(fout, "\tpid_t pid;\n"); ++ f_print(fout, "\tint i;\n"); ++ f_print(fout, "\tchar mname[FMNAMESZ + 1];\n\n"); ++ write_pm_most(infile, netflag); ++ f_print(fout, "\telse {\n"); ++ write_rpc_svc_fg(infile, "\t\t"); ++ f_print(fout, "\t}\n"); ++ } else { ++ f_print(fout, "\tregister SVCXPRT *%s;\n", TRANSP); ++ f_print(fout, "\n"); ++ print_pmapunset("\t"); ++ } ++ } ++ ++ if (logflag && !inetdflag) { ++ open_log_file(infile, "\t"); ++ } ++} ++ ++/* ++ * write a registration for the given transport ++ */ ++void ++write_netid_register(char *transp) ++{ ++ list *l; ++ definition *def; ++ version_list *vp; ++ char *sp; ++ char tmpbuf[32]; ++ ++ sp = ""; ++ f_print(fout, "\n"); ++ f_print(fout, "%s\tnconf = getnetconfigent(\"%s\");\n", sp, transp); ++ f_print(fout, "%s\tif (nconf == NULL) {\n", sp); ++ (void) sprintf(_errbuf, "cannot find %s netid.", transp); ++ sprintf(tmpbuf, "%s\t\t", sp); ++ print_err_message(tmpbuf); ++ f_print(fout, "%s\t\texit(1);\n", sp); ++ f_print(fout, "%s\t}\n", sp); ++ f_print(fout, "%s\t%s = svc_tli_create(RPC_ANYFD, nconf, 0, 0, 0);\n", ++ sp, TRANSP); ++ f_print(fout, "%s\tif (%s == NULL) {\n", sp, TRANSP); ++ (void) sprintf(_errbuf, "cannot create %s service.", transp); ++ print_err_message(tmpbuf); ++ f_print(fout, "%s\t\texit(1);\n", sp); ++ f_print(fout, "%s\t}\n", sp); ++ ++ for (l = defined; l != NULL; l = l->next) { ++ def = (definition *) l->val; ++ if (def->def_kind != DEF_PROGRAM) { ++ continue; ++ } ++ for (vp = def->def.pr.versions; vp != NULL; vp = vp->next) { ++ f_print(fout, ++ "%s\t(void) rpcb_unset(%s, %s, nconf);\n", ++ sp, def->def_name, vp->vers_name); ++ f_print(fout, ++ "%s\tif (!svc_reg(%s, %s, %s, ", ++ sp, TRANSP, def->def_name, vp->vers_name); ++ pvname(def->def_name, vp->vers_num); ++ f_print(fout, ", nconf)) {\n"); ++ (void) sprintf(_errbuf, "unable to register (%s, %s, %s).", ++ def->def_name, vp->vers_name, transp); ++ print_err_message(tmpbuf); ++ f_print(fout, "%s\t\texit(1);\n", sp); ++ f_print(fout, "%s\t}\n", sp); ++ } ++ } ++ f_print(fout, "%s\tfreenetconfigent(nconf);\n", sp); ++} ++ ++/* ++ * write a registration for the given transport for TLI ++ */ ++void ++write_nettype_register(char *transp) ++{ ++ list *l; ++ definition *def; ++ version_list *vp; ++ ++ for (l = defined; l != NULL; l = l->next) { ++ def = (definition *) l->val; ++ if (def->def_kind != DEF_PROGRAM) { ++ continue; ++ } ++ for (vp = def->def.pr.versions; vp != NULL; vp = vp->next) { ++ f_print(fout, "\tif (!svc_create("); ++ pvname(def->def_name, vp->vers_num); ++ f_print(fout, ", %s, %s, \"%s\")) {\n ", ++ def->def_name, vp->vers_name, transp); ++ (void) sprintf(_errbuf, ++ "unable to create (%s, %s) for %s.", ++ def->def_name, vp->vers_name, transp); ++ print_err_message("\t\t"); ++ f_print(fout, "\t\texit(1);\n"); ++ f_print(fout, "\t}\n"); ++ } ++ } ++} ++ ++/* ++ * write the rest of the service ++ */ ++void ++write_rest(void) ++{ ++ f_print(fout, "\n"); ++ if (inetdflag) { ++ f_print(fout, "\tif (%s == (SVCXPRT *)NULL) {\n", TRANSP); ++ (void) sprintf(_errbuf, "could not create a handle"); ++ print_err_message("\t\t"); ++ f_print(fout, "\t\texit(1);\n"); ++ f_print(fout, "\t}\n"); ++ if (timerflag) { ++ f_print(fout, "\tif (_rpcpmstart) {\n"); ++ f_print(fout, ++ "\t\t(void) signal(SIGALRM, %s closedown);\n", ++ Cflag? "(SIG_PF)" : "(void(*)())" ); ++ f_print(fout, "\t\t(void) alarm(_RPCSVC_CLOSEDOWN);\n"); ++ f_print(fout, "\t}\n"); ++ } ++ } ++ f_print(fout, "\tsvc_run();\n"); ++ (void) sprintf(_errbuf, "svc_run returned"); ++ print_err_message("\t"); ++ f_print(fout, "\texit(1);\n"); ++ f_print(fout, "\t/* NOTREACHED */\n"); ++ f_print(fout, "}\n"); ++} ++ ++void ++write_programs(char *storage) ++{ ++ list *l; ++ definition *def; ++ ++ /* write out stubs for procedure definitions */ ++ for (l = defined; l != NULL; l = l->next) { ++ def = (definition *) l->val; ++ if (def->def_kind == DEF_PROGRAM) { ++ write_real_program(def); ++ } ++ } ++ ++ /* write out dispatcher for each program */ ++ for (l = defined; l != NULL; l = l->next) { ++ def = (definition *) l->val; ++ if (def->def_kind == DEF_PROGRAM) { ++ write_program(def, storage); ++ } ++ } ++ ++ ++} ++ ++/* write out definition of internal function (e.g. _printmsg_1(...)) ++ which calls server's defintion of actual function (e.g. printmsg_1(...)). ++ Unpacks single user argument of printmsg_1 to call-by-value format ++ expected by printmsg_1. */ ++static void ++write_real_program(definition *def) ++{ ++ version_list *vp; ++ proc_list *proc; ++ decl_list *l; ++ ++ if( !newstyle ) return; /* not needed for old style */ ++ for (vp = def->def.pr.versions; vp != NULL; vp = vp->next) { ++ for (proc = vp->procs; proc != NULL; proc = proc->next) { ++ f_print(fout, "\n"); ++ internal_proctype(proc); ++ f_print(fout, "\n_"); ++ pvname(proc->proc_name, vp->vers_num); ++ if( Cflag ) { ++ f_print(fout, "(" ); ++ /* arg name */ ++ if (proc->arg_num > 1) ++ f_print(fout, proc->args.argname); ++ else ++ ptype(proc->args.decls->decl.prefix, ++ proc->args.decls->decl.type, 0); ++ f_print(fout, " *argp, struct svc_req *%s)\n", ++ RQSTP); ++ } else { ++ f_print(fout, "(argp, %s)\n", RQSTP ); ++ /* arg name */ ++ if (proc->arg_num > 1) ++ f_print(fout, "\t%s *argp;\n", proc->args.argname); ++ else { ++ f_print(fout, "\t"); ++ ptype(proc->args.decls->decl.prefix, ++ proc->args.decls->decl.type, 0); ++ f_print(fout, " *argp;\n"); ++ } ++ f_print(fout, " struct svc_req *%s;\n", RQSTP); ++ } ++ ++ f_print(fout, "{\n"); ++ f_print(fout, "\treturn("); ++ if( Cflag ) ++ pvname_svc(proc->proc_name, vp->vers_num); ++ else ++ pvname(proc->proc_name, vp->vers_num); ++ f_print(fout, "("); ++ if (proc->arg_num < 2) { /* single argument */ ++ if (!streq( proc->args.decls->decl.type, "void")) ++ f_print(fout, "*argp, "); /* non-void */ ++ } else { ++ for (l = proc->args.decls; l != NULL; l = l->next) ++ f_print(fout, "argp->%s, ", l->decl.name); ++ } ++ f_print(fout, "%s));\n}\n", RQSTP); ++ } ++ } ++} ++ ++static void ++write_program(definition *def, char *storage) ++{ ++ version_list *vp; ++ proc_list *proc; ++ int filled; ++ ++ for (vp = def->def.pr.versions; vp != NULL; vp = vp->next) { ++ f_print(fout, "\n"); ++ if (storage != NULL) { ++ f_print(fout, "%s ", storage); ++ } ++ f_print(fout, "void\n"); ++ pvname(def->def_name, vp->vers_num); ++ ++ if (Cflag) { ++ f_print(fout, "(struct svc_req *%s, ", RQSTP); ++ f_print(fout, "register SVCXPRT *%s)\n", TRANSP); ++ } else { ++ f_print(fout, "(%s, %s)\n", RQSTP, TRANSP); ++ f_print(fout, " struct svc_req *%s;\n", RQSTP); ++ f_print(fout, " register SVCXPRT *%s;\n", TRANSP); ++ } ++ ++ f_print(fout, "{\n"); ++ ++ filled = 0; ++ f_print(fout, "\tunion {\n"); ++ for (proc = vp->procs; proc != NULL; proc = proc->next) { ++ if (proc->arg_num < 2) { /* single argument */ ++ if (streq(proc->args.decls->decl.type, ++ "void")) { ++ continue; ++ } ++ filled = 1; ++ f_print(fout, "\t\t"); ++ ptype(proc->args.decls->decl.prefix, ++ proc->args.decls->decl.type, 0); ++ pvname(proc->proc_name, vp->vers_num); ++ f_print(fout, "_arg;\n"); ++ ++ } ++ else { ++ filled = 1; ++ f_print(fout, "\t\t%s", proc->args.argname); ++ f_print(fout, " "); ++ pvname(proc->proc_name, vp->vers_num); ++ f_print(fout, "_arg;\n"); ++ } ++ } ++ if (!filled) { ++ f_print(fout, "\t\tint fill;\n"); ++ } ++ f_print(fout, "\t} %s;\n", ARG); ++ f_print(fout, "\tchar *%s;\n", RESULT); ++ ++ if (Cflag) { ++ f_print(fout, "\txdrproc_t xdr_%s, xdr_%s;\n", ARG, RESULT); ++ f_print(fout, ++ "\tchar *(*%s)(char *, struct svc_req *);\n", ++ ROUTINE); ++ } else { ++ f_print(fout, "\tbool_t (*xdr_%s)(), (*xdr_%s)();\n", ARG, RESULT); ++ f_print(fout, "\tchar *(*%s)();\n", ROUTINE); ++ } ++ ++ f_print(fout, "\n"); ++ ++ if (timerflag) ++ f_print(fout, "\t_rpcsvcdirty = 1;\n"); ++ f_print(fout, "\tswitch (%s->rq_proc) {\n", RQSTP); ++ if (!nullproc(vp->procs)) { ++ f_print(fout, "\tcase NULLPROC:\n"); ++ f_print(fout, ++ "\t\t(void) svc_sendreply(%s, (xdrproc_t) xdr_void, (char *)NULL);\n", ++ TRANSP); ++ print_return("\t\t"); ++ f_print(fout, "\n"); ++ } ++ for (proc = vp->procs; proc != NULL; proc = proc->next) { ++ f_print(fout, "\tcase %s:\n", proc->proc_name); ++ if (proc->arg_num < 2) { /* single argument */ ++ p_xdrfunc( ARG, proc->args.decls->decl.type); ++ } else { ++ p_xdrfunc( ARG, proc->args.argname); ++ } ++ p_xdrfunc( RESULT, proc->res_type); ++ if( Cflag ) ++ f_print(fout, ++ "\t\t%s = (char *(*)(char *, struct svc_req *)) ", ++ ROUTINE); ++ else ++ f_print(fout, "\t\t%s = (char *(*)()) ", ROUTINE); ++ ++ if (newstyle) { /* new style: calls internal routine */ ++ f_print(fout,"_"); ++ } ++ /* Not sure about the following... ++ * rpc_hout always generates foobar_1_svc for ++ * the service procedure, so why should we use ++ * foobar_1 here?! --okir */ ++#if 0 ++ if( Cflag && !newstyle ) ++ pvname_svc(proc->proc_name, vp->vers_num); ++ else ++ pvname(proc->proc_name, vp->vers_num); ++#else ++ pvname_svc(proc->proc_name, vp->vers_num); ++#endif ++ f_print(fout, ";\n"); ++ f_print(fout, "\t\tbreak;\n\n"); ++ } ++ f_print(fout, "\tdefault:\n"); ++ printerr("noproc", TRANSP); ++ print_return("\t\t"); ++ f_print(fout, "\t}\n"); ++ ++ f_print(fout, "\t(void) memset((char *)&%s, 0, sizeof (%s));\n", ARG, ARG); ++ if (Cflag) ++ printif("getargs", TRANSP, "(caddr_t) &", ARG); ++ else ++ printif("getargs", TRANSP, "&", ARG); ++ printerr("decode", TRANSP); ++ print_return("\t\t"); ++ f_print(fout, "\t}\n"); ++ ++ if (Cflag) ++ f_print(fout, "\t%s = (*%s)((char *)&%s, %s);\n", ++ RESULT, ROUTINE, ARG, RQSTP); ++ else ++ f_print(fout, "\t%s = (*%s)(&%s, %s);\n", ++ RESULT, ROUTINE, ARG, RQSTP); ++ f_print(fout, ++ "\tif (%s != NULL && !svc_sendreply(%s, " ++ "(xdrproc_t) xdr_%s, %s)) {\n", ++ RESULT, TRANSP, RESULT, RESULT); ++ printerr("systemerr", TRANSP); ++ f_print(fout, "\t}\n"); ++ ++ if (Cflag) ++ printif("freeargs", TRANSP, "(caddr_t) &", ARG); ++ else ++ printif("freeargs", TRANSP, "&", ARG); ++ (void) sprintf(_errbuf, "unable to free arguments"); ++ print_err_message("\t\t"); ++ f_print(fout, "\t\texit(1);\n"); ++ f_print(fout, "\t}\n"); ++ print_return("\t"); ++ f_print(fout, "}\n"); ++ } ++} ++ ++static void ++printerr(char *err, char *transp) ++{ ++ f_print(fout, "\t\tsvcerr_%s(%s);\n", err, transp); ++} ++ ++static void ++printif(char *proc, char *transp, char *prefix, char *arg) ++{ ++ f_print(fout, "\tif (!svc_%s(%s, (xdrproc_t) xdr_%s, (caddr_t) %s%s)) {\n", ++ proc, transp, arg, prefix, arg); ++} ++ ++int ++nullproc(proc_list *proc) ++{ ++ for (; proc != NULL; proc = proc->next) { ++ if (streq(proc->proc_num, "0")) { ++ return (1); ++ } ++ } ++ return (0); ++} ++ ++static void ++write_inetmost(char *infile) ++{ ++ f_print(fout, "\tregister SVCXPRT *%s;\n", TRANSP); ++ f_print(fout, "\tint sock;\n"); ++ f_print(fout, "\tint proto;\n"); ++ f_print(fout, "\tstruct sockaddr_in saddr;\n"); ++ f_print(fout, "\tint asize = sizeof (saddr);\n"); ++ f_print(fout, "\n"); ++ f_print(fout, ++ "\tif (getsockname(0, (struct sockaddr *)&saddr, &asize) == 0) {\n"); ++ f_print(fout, "\t\tint ssize = sizeof (int);\n\n"); ++ f_print(fout, "\t\tif (saddr.sin_family != AF_INET)\n"); ++ f_print(fout, "\t\t\texit(1);\n"); ++ f_print(fout, "\t\tif (getsockopt(0, SOL_SOCKET, SO_TYPE,\n"); ++ f_print(fout, "\t\t\t\t(char *)&_rpcfdtype, &ssize) == -1)\n"); ++ f_print(fout, "\t\t\texit(1);\n"); ++ f_print(fout, "\t\tsock = 0;\n"); ++ f_print(fout, "\t\t_rpcpmstart = 1;\n"); ++ f_print(fout, "\t\tproto = 0;\n"); ++ open_log_file(infile, "\t\t"); ++ f_print(fout, "\t} else {\n"); ++ write_rpc_svc_fg(infile, "\t\t"); ++ f_print(fout, "\t\tsock = RPC_ANYSOCK;\n"); ++ print_pmapunset("\t\t"); ++ f_print(fout, "\t}\n"); ++} ++ ++static void ++print_return(char *space) ++{ ++ if (exitnow) ++ f_print(fout, "%sexit(0);\n", space); ++ else { ++ if (timerflag) ++ f_print(fout, "%s_rpcsvcdirty = 0;\n", space); ++ f_print(fout, "%sreturn;\n", space); ++ } ++} ++ ++static void ++print_pmapunset(char *space) ++{ ++ list *l; ++ definition *def; ++ version_list *vp; ++ ++ for (l = defined; l != NULL; l = l->next) { ++ def = (definition *) l->val; ++ if (def->def_kind == DEF_PROGRAM) { ++ for (vp = def->def.pr.versions; vp != NULL; ++ vp = vp->next) { ++ f_print(fout, "%s(void) pmap_unset(%s, %s);\n", ++ space, def->def_name, vp->vers_name); ++ } ++ } ++ } ++} ++ ++static void ++print_err_message(char *space) ++{ ++ if (logflag) ++ f_print(fout, "%ssyslog(LOG_ERR, \"%s\");\n", space, _errbuf); ++ else if (inetdflag || pmflag) ++ f_print(fout, "%s_msgout(\"%s\");\n", space, _errbuf); ++ else ++ f_print(fout, "%sfprintf(stderr, \"%s\");\n", space, _errbuf); ++} ++ ++/* ++ * Write the server auxiliary function ( _msgout, timeout) ++ */ ++void ++write_svc_aux(int nomain) ++{ ++ if (!logflag) ++ write_msg_out(); ++ if( !nomain ) ++ write_timeout_func(); ++} ++ ++/* ++ * Write the _msgout function ++ */ ++void ++write_msg_out(void) ++{ ++ f_print(fout, "\n"); ++ f_print(fout, "static\n"); ++ if( !Cflag ) { ++ f_print(fout, "void _msgout(msg)\n"); ++ f_print(fout, "\tchar *msg;\n"); ++ } else { ++ f_print(fout, "void _msgout(char* msg)\n"); ++ } ++ f_print(fout, "{\n"); ++ f_print(fout, "#ifdef RPC_SVC_FG\n"); ++ if (inetdflag || pmflag) ++ f_print(fout, "\tif (_rpcpmstart)\n"); ++ f_print(fout, "\t\tsyslog(LOG_ERR, \"%%s\", msg);\n"); ++ f_print(fout, "\telse\n"); ++ f_print(fout, "\t\t(void) fprintf(stderr, \"%%s\\n\", msg);\n"); ++ f_print(fout, "#else\n"); ++ f_print(fout, "\tsyslog(LOG_ERR, \"%%s\", msg);\n"); ++ f_print(fout, "#endif\n"); ++ f_print(fout, "}\n"); ++} ++ ++/* ++ * Write the timeout function ++ */ ++static void ++write_timeout_func(void) ++{ ++ if (!timerflag) ++ return; ++ f_print(fout, "\n"); ++ f_print(fout, "static void\n"); ++ f_print(fout, "closedown()\n"); ++ f_print(fout, "{\n"); ++ f_print(fout, "\tif (_rpcsvcdirty == 0) {\n"); ++ f_print(fout, "\t\tstatic int size;\n"); ++ f_print(fout, "\t\tint i, openfd;\n"); ++ if (tirpcflag && pmflag) { ++ f_print(fout, "\t\tstruct t_info tinfo;\n\n"); ++ f_print(fout, "\t\tif (!t_getinfo(0, &tinfo) && (tinfo.servtype == T_CLTS))\n"); ++ } else { ++ f_print(fout, "\n\t\tif (_rpcfdtype == SOCK_DGRAM)\n"); ++ } ++ f_print(fout, "\t\t\texit(0);\n"); ++ f_print(fout, "\t\tif (size == 0) {\n"); ++ if( tirpcflag ) { ++ f_print(fout, "\t\t\tstruct rlimit rl;\n\n"); ++ f_print(fout, "\t\t\trl.rlim_max = 0;\n"); ++ f_print(fout, "\t\t\tgetrlimit(RLIMIT_NOFILE, &rl);\n"); ++ f_print(fout, "\t\t\tif ((size = rl.rlim_max) == 0)\n"); ++ f_print(fout, "\t\t\t\treturn;\n"); ++ } else { ++ f_print(fout, "\t\t\tsize = getdtablesize();\n"); ++ } ++ f_print(fout, "\t\t}\n"); ++ f_print(fout, "\t\tfor (i = 0, openfd = 0; i < size && openfd < 2; i++)\n"); ++ f_print(fout, "\t\t\tif (FD_ISSET(i, &svc_fdset))\n"); ++ f_print(fout, "\t\t\t\topenfd++;\n"); ++ f_print(fout, "\t\tif (openfd <= 1)\n"); ++ f_print(fout, "\t\t\texit(0);\n"); ++ f_print(fout, "\t}\n"); ++ f_print(fout, "\t(void) alarm(_RPCSVC_CLOSEDOWN);\n"); ++ f_print(fout, "}\n"); ++} ++ ++/* ++ * Write the most of port monitor support ++ */ ++static void ++write_pm_most(char *infile, int netflag) ++{ ++ list *l; ++ definition *def; ++ version_list *vp; ++ ++ f_print(fout, "\tif (!ioctl(0, I_LOOK, mname) &&\n"); ++ f_print(fout, "\t\t(!strcmp(mname, \"sockmod\") ||"); ++ f_print(fout, " !strcmp(mname, \"timod\"))) {\n"); ++ f_print(fout, "\t\tchar *netid;\n"); ++ if (!netflag) { /* Not included by -n option */ ++ f_print(fout, "\t\tstruct netconfig *nconf = NULL;\n"); ++ f_print(fout, "\t\tSVCXPRT *%s;\n", TRANSP); ++ } ++ if( timerflag ) ++ f_print(fout, "\t\tint pmclose;\n"); ++/* not necessary, defined in /usr/include/stdlib */ ++/* f_print(fout, "\t\textern char *getenv();\n");*/ ++ f_print(fout, "\n"); ++ f_print(fout, "\t\t_rpcpmstart = 1;\n"); ++ if (logflag) ++ open_log_file(infile, "\t\t"); ++ f_print(fout, "\t\tif ((netid = getenv(\"NLSPROVIDER\")) == NULL) {\n"); ++ sprintf(_errbuf, "cannot get transport name"); ++ print_err_message("\t\t\t"); ++ f_print(fout, "\t\t} else if ((nconf = getnetconfigent(netid)) == NULL) {\n"); ++ sprintf(_errbuf, "cannot get transport info"); ++ print_err_message("\t\t\t"); ++ f_print(fout, "\t\t}\n"); ++ /* ++ * A kludgy support for inetd services. Inetd only works with ++ * sockmod, and RPC works only with timod, hence all this jugglery ++ */ ++ f_print(fout, "\t\tif (strcmp(mname, \"sockmod\") == 0) {\n"); ++ f_print(fout, "\t\t\tif (ioctl(0, I_POP, 0) || ioctl(0, I_PUSH, \"timod\")) {\n"); ++ sprintf(_errbuf, "could not get the right module"); ++ print_err_message("\t\t\t\t"); ++ f_print(fout, "\t\t\t\texit(1);\n"); ++ f_print(fout, "\t\t\t}\n"); ++ f_print(fout, "\t\t}\n"); ++ if( timerflag ) ++ f_print(fout, "\t\tpmclose = (t_getstate(0) != T_DATAXFER);\n"); ++ f_print(fout, "\t\tif ((%s = svc_tli_create(0, nconf, NULL, 0, 0)) == NULL) {\n", ++ TRANSP); ++ sprintf(_errbuf, "cannot create server handle"); ++ print_err_message("\t\t\t"); ++ f_print(fout, "\t\t\texit(1);\n"); ++ f_print(fout, "\t\t}\n"); ++ f_print(fout, "\t\tif (nconf)\n"); ++ f_print(fout, "\t\t\tfreenetconfigent(nconf);\n"); ++ for (l = defined; l != NULL; l = l->next) { ++ def = (definition *) l->val; ++ if (def->def_kind != DEF_PROGRAM) { ++ continue; ++ } ++ for (vp = def->def.pr.versions; vp != NULL; vp = vp->next) { ++ f_print(fout, ++ "\t\tif (!svc_reg(%s, %s, %s, ", ++ TRANSP, def->def_name, vp->vers_name); ++ pvname(def->def_name, vp->vers_num); ++ f_print(fout, ", 0)) {\n"); ++ (void) sprintf(_errbuf, "unable to register (%s, %s).", ++ def->def_name, vp->vers_name); ++ print_err_message("\t\t\t"); ++ f_print(fout, "\t\t\texit(1);\n"); ++ f_print(fout, "\t\t}\n"); ++ } ++ } ++ if (timerflag) { ++ f_print(fout, "\t\tif (pmclose) {\n"); ++ f_print(fout, "\t\t\t(void) signal(SIGALRM, %s closedown);\n", ++ Cflag? "(SIG_PF)" : "(void(*)())" ); ++ f_print(fout, "\t\t\t(void) alarm(_RPCSVC_CLOSEDOWN);\n"); ++ f_print(fout, "\t\t}\n"); ++ } ++ f_print(fout, "\t\tsvc_run();\n"); ++ f_print(fout, "\t\texit(1);\n"); ++ f_print(fout, "\t\t/* NOTREACHED */\n"); ++ f_print(fout, "\t}\n"); ++} ++ ++/* ++ * Support for backgrounding the server if self started. ++ */ ++static void ++write_rpc_svc_fg(char *infile, char *sp) ++{ ++ f_print(fout, "#ifndef RPC_SVC_FG\n"); ++ f_print(fout, "%sint size;\n", sp); ++ if( tirpcflag ) ++ f_print(fout, "%sstruct rlimit rl;\n", sp); ++ if (inetdflag) ++ f_print(fout, "%sint pid, i;\n\n", sp); ++ f_print(fout, "%spid = fork();\n", sp); ++ f_print(fout, "%sif (pid < 0) {\n", sp); ++ f_print(fout, "%s\tperror(\"cannot fork\");\n", sp); ++ f_print(fout, "%s\texit(1);\n", sp); ++ f_print(fout, "%s}\n", sp); ++ f_print(fout, "%sif (pid)\n", sp); ++ f_print(fout, "%s\texit(0);\n", sp); ++ /* get number of file descriptors */ ++ if( tirpcflag ) { ++ f_print(fout, "%srl.rlim_max = 0;\n", sp); ++ f_print(fout, "%sgetrlimit(RLIMIT_NOFILE, &rl);\n", sp); ++ f_print(fout, "%sif ((size = rl.rlim_max) == 0)\n", sp); ++ f_print(fout, "%s\texit(1);\n", sp); ++ } else { ++ f_print(fout, "%ssize = getdtablesize();\n", sp); ++ } ++ ++ f_print(fout, "%sfor (i = 0; i < size; i++)\n", sp); ++ f_print(fout, "%s\t(void) close(i);\n", sp); ++ /* Redirect stderr and stdout to console */ ++ f_print(fout, "%si = open(\"/dev/console\", 2);\n", sp); ++ f_print(fout, "%s(void) dup2(i, 1);\n", sp); ++ f_print(fout, "%s(void) dup2(i, 2);\n", sp); ++ /* This removes control of the controlling terminal */ ++ if( tirpcflag ) ++ f_print(fout, "%ssetsid();\n", sp); ++ else { ++ f_print(fout, "%si = open(\"/dev/tty\", 2);\n", sp); ++ f_print(fout, "%sif (i >= 0) {\n", sp); ++ f_print(fout, "%s\t(void) ioctl(i, TIOCNOTTY, (char *)NULL);\n", sp);; ++ f_print(fout, "%s\t(void) close(i);\n", sp); ++ f_print(fout, "%s}\n", sp); ++ } ++ if (!logflag) ++ open_log_file(infile, sp); ++ f_print(fout, "#endif\n"); ++ if (logflag) ++ open_log_file(infile, sp); ++} ++ ++static void ++open_log_file(char *infile, char *sp) ++{ ++ char *s; ++ ++ s = strrchr(infile, '.'); ++ if (s) ++ *s = '\0'; ++ f_print(fout,"%sopenlog(\"%s\", LOG_PID, LOG_DAEMON);\n", sp, infile); ++ if (s) ++ *s = '.'; ++} ++ ++ ++ ++ ++/* ++ * write a registration for the given transport for Inetd ++ */ ++void ++write_inetd_register(char *transp) ++{ ++ list *l; ++ definition *def; ++ version_list *vp; ++ char *sp; ++ int isudp; ++ char tmpbuf[32]; ++ ++ if (inetdflag) ++ sp = "\t"; ++ else ++ sp = ""; ++ if (streq(transp, "udp")) ++ isudp = 1; ++ else ++ isudp = 0; ++ f_print(fout, "\n"); ++ if (inetdflag) { ++ f_print(fout, "\tif ((_rpcfdtype == 0) || (_rpcfdtype == %s)) {\n", ++ isudp ? "SOCK_DGRAM" : "SOCK_STREAM"); ++ } ++ f_print(fout, "%s\t%s = svc%s_create(%s", ++ sp, TRANSP, transp, inetdflag? "sock": "RPC_ANYSOCK"); ++ if (!isudp) ++ f_print(fout, ", 0, 0"); ++ f_print(fout, ");\n"); ++ f_print(fout, "%s\tif (%s == NULL) {\n", sp, TRANSP); ++ (void) sprintf(_errbuf, "cannot create %s service.", transp); ++ (void) sprintf(tmpbuf, "%s\t\t", sp); ++ print_err_message(tmpbuf); ++ f_print(fout, "%s\t\texit(1);\n", sp); ++ f_print(fout, "%s\t}\n", sp); ++ ++ if (inetdflag) { ++ f_print(fout, "%s\tif (!_rpcpmstart)\n\t", sp); ++ f_print(fout, "%s\tproto = IPPROTO_%s;\n", ++ sp, isudp ? "UDP": "TCP"); ++ } ++ for (l = defined; l != NULL; l = l->next) { ++ def = (definition *) l->val; ++ if (def->def_kind != DEF_PROGRAM) { ++ continue; ++ } ++ for (vp = def->def.pr.versions; vp != NULL; vp = vp->next) { ++ f_print(fout, "%s\tif (!svc_register(%s, %s, %s, ", ++ sp, TRANSP, def->def_name, vp->vers_name); ++ pvname(def->def_name, vp->vers_num); ++ if (inetdflag) ++ f_print(fout, ", proto)) {\n"); ++ else ++ f_print(fout, ", IPPROTO_%s)) {\n", ++ isudp ? "UDP": "TCP"); ++ (void) sprintf(_errbuf, "unable to register (%s, %s, %s).", ++ def->def_name, vp->vers_name, transp); ++ print_err_message(tmpbuf); ++ f_print(fout, "%s\t\texit(1);\n", sp); ++ f_print(fout, "%s\t}\n", sp); ++ } ++ } ++ if (inetdflag) ++ f_print(fout, "\t}\n"); ++} +diff --git a/rpcgen/rpc_tblout.c b/rpcgen/rpc_tblout.c +new file mode 100644 +index 0000000..ae002f7 +--- /dev/null ++++ b/rpcgen/rpc_tblout.c +@@ -0,0 +1,165 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#if 0 ++static char sccsid[] = "@(#)rpc_tblout.c 1.4 89/02/22 (C) 1988 SMI"; ++#endif ++ ++/* ++ * rpc_tblout.c, Dispatch table outputter for the RPC protocol compiler ++ */ ++#include ++#include ++#include "rpc_parse.h" ++#include "rpc_util.h" ++#include "rpc_output.h" ++ ++static void write_table(definition *def); ++static void printit(char *prefix, char *type); ++ ++#define TABSIZE 8 ++#define TABCOUNT 5 ++#define TABSTOP (TABSIZE*TABCOUNT) ++ ++static char tabstr[TABCOUNT+1] = "\t\t\t\t\t"; ++ ++static char tbl_hdr[] = "struct rpcgen_table %s_table[] = {\n"; ++static char tbl_end[] = "};\n"; ++ ++static char null_entry[] = "\n\t(char *(*)())0,\n\ ++ \t(xdrproc_t) xdr_void,\t\t\t0,\n\ ++ \t(xdrproc_t) xdr_void,\t\t\t0,\n"; ++ ++ ++static char tbl_nproc[] = "int %s_nproc =\n\tsizeof(%s_table)/sizeof(%s_table[0]);\n\n"; ++ ++void ++write_tables(void) ++{ ++ list *l; ++ definition *def; ++ ++ f_print(fout, "\n"); ++ for (l = defined; l != NULL; l = l->next) { ++ def = (definition *) l->val; ++ if (def->def_kind == DEF_PROGRAM) { ++ write_table(def); ++ } ++ } ++} ++ ++static void ++write_table(definition *def) ++{ ++ version_list *vp; ++ proc_list *proc; ++ int current; ++ int expected; ++ char progvers[100]; ++ int warning; ++ ++ for (vp = def->def.pr.versions; vp != NULL; vp = vp->next) { ++ warning = 0; ++ s_print(progvers, "%s_%s", ++ locase(def->def_name), vp->vers_num); ++ /* print the table header */ ++ f_print(fout, tbl_hdr, progvers); ++ ++ if (nullproc(vp->procs)) { ++ expected = 0; ++ } else { ++ expected = 1; ++ f_print(fout, null_entry); ++ } ++ for (proc = vp->procs; proc != NULL; proc = proc->next) { ++ current = atoi(proc->proc_num); ++ if (current != expected++) { ++ f_print(fout, ++ "\n/*\n * WARNING: table out of order\n */\n"); ++ if (warning == 0) { ++ f_print(stderr, ++ "WARNING %s table is out of order\n", ++ progvers); ++ warning = 1; ++ nonfatalerrors = 1; ++ } ++ expected = current + 1; ++ } ++ f_print(fout, "\n\t(char *(*)())RPCGEN_ACTION("); ++ ++ /* routine to invoke */ ++ if( Cflag && !newstyle ) ++ pvname_svc(proc->proc_name, vp->vers_num); ++ else { ++ if( newstyle ) ++ f_print( fout, "_"); /* calls internal func */ ++ pvname(proc->proc_name, vp->vers_num); ++ } ++ f_print(fout, "),\n"); ++ ++ /* argument info */ ++ if( proc->arg_num > 1 ) ++ printit((char*) NULL, proc->args.argname ); ++ else ++ /* do we have to do something special for newstyle */ ++ printit( proc->args.decls->decl.prefix, ++ proc->args.decls->decl.type ); ++ /* result info */ ++ printit(proc->res_prefix, proc->res_type); ++ } ++ ++ /* print the table trailer */ ++ f_print(fout, tbl_end); ++ f_print(fout, tbl_nproc, progvers, progvers, progvers); ++ } ++} ++ ++static void ++printit(char *prefix, char *type) ++{ ++ int len; ++ int tabs; ++ ++ ++ len = fprintf(fout, "\txdr_%s,", stringfix(type)); ++ /* account for leading tab expansion */ ++ len += TABSIZE - 1; ++ /* round up to tabs required */ ++ tabs = (TABSTOP - len + TABSIZE - 1)/TABSIZE; ++ f_print(fout, "%s", &tabstr[TABCOUNT-tabs]); ++ ++ if (streq(type, "void")) { ++ f_print(fout, "0"); ++ } else { ++ f_print(fout, "sizeof ( "); ++ /* XXX: should "follow" be 1 ??? */ ++ ptype(prefix, type, 0); ++ f_print(fout, ")"); ++ } ++ f_print(fout, ",\n"); ++} +diff --git a/rpcgen/rpc_util.c b/rpcgen/rpc_util.c +new file mode 100644 +index 0000000..b67be57 +--- /dev/null ++++ b/rpcgen/rpc_util.c +@@ -0,0 +1,479 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#if 0 ++static char sccsid[] = "@(#)rpc_util.c 1.11 89/02/22 (C) 1987 SMI"; ++#endif ++ ++/* ++ * rpc_util.c, Utility routines for the RPC protocol compiler ++ */ ++#include ++#include ++#include ++#include ++#include "rpc_scan.h" ++#include "rpc_parse.h" ++#include "rpc_util.h" ++ ++static void printwhere(void); ++ ++ ++#define ARGEXT "argument" ++ ++char curline[MAXLINESIZE]; /* current read line */ ++char *where = curline; /* current point in line */ ++int linenum = 0; /* current line number */ ++ ++char *infilename; /* input filename */ ++ ++#define NFILES 7 ++char *outfiles[NFILES]; /* output file names */ ++int nfiles; ++ ++FILE *fout; /* file pointer of current output */ ++FILE *fin; /* file pointer of current input */ ++ ++list *defined; /* list of defined things */ ++ ++/* ++ * Reinitialize the world ++ */ ++void ++reinitialize(void) ++{ ++ memset(curline, 0, MAXLINESIZE); ++ where = curline; ++ linenum = 0; ++ defined = NULL; ++} ++ ++/* ++ * string equality ++ */ ++int ++streq(char *a, char *b) ++{ ++ return (strcmp(a, b) == 0); ++} ++ ++/* ++ * find a value in a list ++ */ ++definition * ++findval(list *lst, char *val, int (*cmp)(definition *, char *)) ++{ ++ ++ for (; lst != NULL; lst = lst->next) { ++ if ((*cmp) (lst->val, val)) { ++ return (lst->val); ++ } ++ } ++ return (NULL); ++} ++ ++/* ++ * store a value in a list ++ */ ++void ++storeval(lstp, val) ++ list **lstp; ++ definition *val; ++{ ++ list **l; ++ list *lst; ++ ++ ++ for (l = lstp; *l != NULL; l = (list **) & (*l)->next); ++ lst = ALLOC(list); ++ lst->val = val; ++ lst->next = NULL; ++ *l = lst; ++} ++ ++static int ++findit(definition *def, char *type) ++{ ++ return (streq(def->def_name, type)); ++} ++ ++static char * ++fixit(char *type, char *orig) ++{ ++ definition *def; ++ ++ def = (definition *) FINDVAL(defined, type, findit); ++ if (def == NULL || def->def_kind != DEF_TYPEDEF) { ++ return (orig); ++ } ++ switch (def->def.ty.rel) { ++ case REL_VECTOR: ++ return (def->def.ty.old_type); ++ case REL_ALIAS: ++ return (fixit(def->def.ty.old_type, orig)); ++ default: ++ return (orig); ++ } ++} ++ ++char * ++fixtype(char *type) ++{ ++ return (fixit(type, type)); ++} ++ ++char * ++stringfix(char *type) ++{ ++ if (streq(type, "string")) { ++ return ("wrapstring"); ++ } else { ++ return (type); ++ } ++} ++ ++void ++ptype(char *prefix, char *type, int follow) ++{ ++ if (prefix != NULL) { ++ if (streq(prefix, "enum")) { ++ f_print(fout, "enum "); ++ } else { ++ f_print(fout, "struct "); ++ } ++ } ++ if (streq(type, "bool")) { ++ f_print(fout, "bool_t "); ++ } else if (streq(type, "string")) { ++ f_print(fout, "char *"); ++ } else { ++ f_print(fout, "%s ", follow ? fixtype(type) : type); ++ } ++} ++ ++static int ++typedefed(definition *def, char *type) ++{ ++ if (def->def_kind != DEF_TYPEDEF || def->def.ty.old_prefix != NULL) { ++ return (0); ++ } else { ++ return (streq(def->def_name, type)); ++ } ++} ++ ++int ++isvectordef(char *type, relation rel) ++{ ++ definition *def; ++ ++ for (;;) { ++ switch (rel) { ++ case REL_VECTOR: ++ return (!streq(type, "string")); ++ case REL_ARRAY: ++ return (0); ++ case REL_POINTER: ++ return (0); ++ case REL_ALIAS: ++ def = (definition *) FINDVAL(defined, type, typedefed); ++ if (def == NULL) { ++ return (0); ++ } ++ type = def->def.ty.old_type; ++ rel = def->def.ty.rel; ++ } ++ } ++} ++ ++char * ++locase(char *str) ++{ ++ char c; ++ static char buf[100]; ++ char *p = buf; ++ ++ while ((c = *str++) != '\0') { ++ *p++ = (c >= 'A' && c <= 'Z') ? (c - 'A' + 'a') : c; ++ } ++ *p = 0; ++ return (buf); ++} ++ ++void ++pvname_svc(char *pname, char *vnum) ++{ ++ f_print(fout, "%s_%s_svc", locase(pname), vnum); ++} ++ ++void ++pvname(char *pname, char *vnum) ++{ ++ f_print(fout, "%s_%s", locase(pname), vnum); ++} ++ ++/* ++ * print a useful (?) error message, and then die ++ */ ++void ++error(char *msg) ++{ ++ printwhere(); ++ f_print(stderr, "%s, line %d: ", infilename, linenum); ++ f_print(stderr, "%s\n", msg); ++ crash(); ++} ++ ++/* ++ * Something went wrong, unlink any files that we may have created and then ++ * die. ++ */ ++void ++crash(void) ++{ ++ int i; ++ ++ for (i = 0; i < nfiles; i++) { ++ (void) unlink(outfiles[i]); ++ } ++ exit(1); ++} ++ ++void ++record_open(char *file) ++{ ++ if (nfiles < NFILES) { ++ outfiles[nfiles++] = file; ++ } else { ++ f_print(stderr, "too many files!\n"); ++ crash(); ++ } ++} ++ ++static char expectbuf[100]; ++static char *toktostr(); ++ ++/* ++ * error, token encountered was not the expected one ++ */ ++void ++expected1(exp1) ++ tok_kind exp1; ++{ ++ s_print(expectbuf, "expected '%s'", ++ toktostr(exp1)); ++ error(expectbuf); ++} ++ ++/* ++ * error, token encountered was not one of two expected ones ++ */ ++void ++expected2(exp1, exp2) ++ tok_kind exp1, exp2; ++{ ++ s_print(expectbuf, "expected '%s' or '%s'", ++ toktostr(exp1), ++ toktostr(exp2)); ++ error(expectbuf); ++} ++ ++/* ++ * error, token encountered was not one of 3 expected ones ++ */ ++void ++expected3(exp1, exp2, exp3) ++ tok_kind exp1, exp2, exp3; ++{ ++ s_print(expectbuf, "expected '%s', '%s' or '%s'", ++ toktostr(exp1), ++ toktostr(exp2), ++ toktostr(exp3)); ++ error(expectbuf); ++} ++ ++void ++tabify(f, tab) ++ FILE *f; ++ int tab; ++{ ++ while (tab--) { ++ (void) fputc('\t', f); ++ } ++} ++ ++ ++static token tokstrings[] = { ++ {TOK_IDENT, "identifier"}, ++ {TOK_CONST, "const"}, ++ {TOK_RPAREN, ")"}, ++ {TOK_LPAREN, "("}, ++ {TOK_RBRACE, "}"}, ++ {TOK_LBRACE, "{"}, ++ {TOK_LBRACKET, "["}, ++ {TOK_RBRACKET, "]"}, ++ {TOK_STAR, "*"}, ++ {TOK_COMMA, ","}, ++ {TOK_EQUAL, "="}, ++ {TOK_COLON, ":"}, ++ {TOK_SEMICOLON, ";"}, ++ {TOK_UNION, "union"}, ++ {TOK_STRUCT, "struct"}, ++ {TOK_SWITCH, "switch"}, ++ {TOK_CASE, "case"}, ++ {TOK_DEFAULT, "default"}, ++ {TOK_ENUM, "enum"}, ++ {TOK_TYPEDEF, "typedef"}, ++ {TOK_INT, "int"}, ++ {TOK_SHORT, "short"}, ++ {TOK_INT32, "int32"}, ++ {TOK_UNSIGNED, "unsigned"}, ++ {TOK_DOUBLE, "double"}, ++ {TOK_FLOAT, "float"}, ++ {TOK_CHAR, "char"}, ++ {TOK_STRING, "string"}, ++ {TOK_OPAQUE, "opaque"}, ++ {TOK_BOOL, "bool"}, ++ {TOK_VOID, "void"}, ++ {TOK_PROGRAM, "program"}, ++ {TOK_VERSION, "version"}, ++ {TOK_EOF, "??????"} ++}; ++ ++static char * ++toktostr(kind) ++ tok_kind kind; ++{ ++ token *sp; ++ ++ for (sp = tokstrings; sp->kind != TOK_EOF && sp->kind != kind; sp++); ++ return (sp->str); ++} ++ ++static void ++printbuf(void) ++{ ++ char c; ++ int i; ++ int cnt; ++ ++# define TABSIZE 4 ++ ++ for (i = 0; (c = curline[i]) != '\0'; i++) { ++ if (c == '\t') { ++ cnt = 8 - (i % TABSIZE); ++ c = ' '; ++ } else { ++ cnt = 1; ++ } ++ while (cnt--) { ++ (void) fputc(c, stderr); ++ } ++ } ++} ++ ++static void ++printwhere(void) ++{ ++ int i; ++ char c; ++ int cnt; ++ ++ printbuf(); ++ for (i = 0; i < where - curline; i++) { ++ c = curline[i]; ++ if (c == '\t') { ++ cnt = 8 - (i % TABSIZE); ++ } else { ++ cnt = 1; ++ } ++ while (cnt--) { ++ (void) fputc('^', stderr); ++ } ++ } ++ (void) fputc('\n', stderr); ++} ++ ++char * ++make_argname(char *pname, char *vname) ++{ ++ char *name; ++ ++ name = malloc(strlen(pname) + strlen(vname) + strlen(ARGEXT) + 3); ++ if (!name) { ++ fprintf(stderr, "failed in malloc"); ++ exit(1); ++ } ++ sprintf(name, "%s_%s_%s", locase(pname), vname, ARGEXT); ++ return(name); ++} ++ ++bas_type *typ_list_h; ++bas_type *typ_list_t; ++ ++void ++add_type(int len, char *type) ++{ ++ bas_type *ptr; ++ ++ ++ if ((ptr = (bas_type *) malloc(sizeof(bas_type))) == (bas_type *) NULL) { ++ fprintf(stderr, "failed in malloc"); ++ exit(1); ++ } ++ ptr->name = type; ++ ptr->length = len; ++ ptr->next = NULL; ++ if (typ_list_t == NULL) { ++ ++ typ_list_t = ptr; ++ typ_list_h = ptr; ++ } else { ++ ++ typ_list_t->next = ptr; ++ typ_list_t = ptr; ++ } ++} ++ ++ ++bas_type * ++find_type(char *type) ++{ ++ bas_type *ptr; ++ ++ ptr = typ_list_h; ++ ++ ++ while (ptr != NULL) { ++ if (strcmp(ptr->name, type) == 0) ++ return (ptr); ++ else ++ ptr = ptr->next; ++ }; ++ return (NULL); ++} ++ +diff --git a/rpcgen/rpc_util.h b/rpcgen/rpc_util.h +new file mode 100644 +index 0000000..fa115be +--- /dev/null ++++ b/rpcgen/rpc_util.h +@@ -0,0 +1,166 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/* @(#)rpc_util.h 1.5 90/08/29 (C) 1987 SMI */ ++ ++/* ++ * rpc_util.h, Useful definitions for the RPC protocol compiler ++ */ ++ ++#include ++ ++#define alloc(size) malloc((unsigned)(size)) ++#define ALLOC(object) (object *) malloc(sizeof(object)) ++ ++#define s_print (void) sprintf ++#define f_print (void) fprintf ++ ++struct list { ++ definition *val; ++ struct list *next; ++}; ++typedef struct list list; ++ ++#define PUT 1 ++#define GET 2 ++ ++/* ++ * Global variables ++ */ ++#define MAXLINESIZE 1024 ++extern char curline[MAXLINESIZE]; ++extern char *where; ++extern int linenum; ++ ++extern char *infilename; ++extern FILE *fout; ++extern FILE *fin; ++ ++extern list *defined; ++ ++ ++extern bas_type *typ_list_h; ++extern bas_type *typ_list_t; ++ ++/* ++ * All the option flags ++ */ ++extern int inetdflag; ++extern int pmflag; ++extern int tblflag; ++extern int logflag; ++extern int newstyle; ++extern int Cflag; /* C++ flag */ ++extern int tirpcflag; /* flag for generating tirpc code */ ++extern int Inline; /* if this is 0, then do not generate inline code */ ++ ++/* ++ * Other flags related with inetd jumpstart. ++ */ ++extern int indefinitewait; ++extern int exitnow; ++extern int timerflag; ++ ++extern int nonfatalerrors; ++ ++/* ++ * rpc_util routines ++ */ ++void storeval(); ++ ++#define STOREVAL(list,item) \ ++ storeval(list,item) ++ ++definition *findval(); ++ ++#define FINDVAL(list,item,finder) \ ++ findval(list, item, finder) ++ ++ ++/* ++ * rpc_cout routines ++ */ ++void cprint(void); ++void emit(definition *); ++ ++/* ++ * rpc_hout routines ++ */ ++void print_datadef(definition *); ++void print_funcdef(definition *); ++ ++/* ++ * rpc_svcout routines ++ */ ++void write_most(char *, int, int); ++void write_register(void); ++void write_netid_register(char *); ++void write_nettype_register(char *); ++void write_inetd_register(char *); ++void write_rest(void); ++void write_programs(char *); ++void write_svc_aux(int); ++ ++/* ++ * rpc_clntout routines ++ */ ++void write_stubs(void); ++void printarglist(proc_list *, char *, char *); ++ ++/* ++ * rpc_tblout routines ++ */ ++void write_tables(void); ++ ++/* ++ * rpc_util ++ */ ++void pvname_svc(char *, char *); ++void pvname(char *, char *); ++void ptype(char *, char *, int); ++char * make_argname(char *, char *); ++void add_type(int, char *); ++void reinitialize(void); ++void crash(void); ++void error(char *); ++char *fixtype(char *); ++char *stringfix(char *); ++char *locase(char *); ++int isvectordef(char *, relation); ++int streq(char *, char *); ++void tabify(FILE *, int); ++void record_open(char *); ++bas_type *find_type(char *type); ++ ++/* ++ * rpc_sample ++ */ ++void write_sample_svc(definition *); ++int write_sample_clnt(definition *); ++void write_sample_clnt_main(void); ++void add_sample_msg(void); +diff --git a/rpcgen/rpcgen.1 b/rpcgen/rpcgen.1 +new file mode 100644 +index 0000000..89df7ed +--- /dev/null ++++ b/rpcgen/rpcgen.1 +@@ -0,0 +1,521 @@ ++.\" @(#)rpcgen.1 1.35 93/06/02 SMI ++.\" $FreeBSD: src/usr.bin/rpcgen/rpcgen.1,v 1.12.2.4 2002/06/21 15:28:50 charnier Exp $ ++.\" Copyright 1985-1993 Sun Microsystems, Inc. ++.Dd March 28, 1993 ++.Dt RPCGEN 1 ++.Os ++.Sh NAME ++.Nm rpcgen ++.Nd an RPC protocol compiler ++.Sh SYNOPSIS ++.Nm ++.Ar infile ++.Nm ++.Op Fl a ++.Op Fl b ++.Op Fl C ++.Oo ++.Fl D Ns Ar name Ns Op Ar =value ++.Oc ++.Op Fl i Ar size ++.Op Fl I Op Fl K Ar seconds ++.Op Fl L ++.Op Fl M ++.Op Fl N ++.Op Fl T ++.Op Fl Y Ar pathname ++.Ar infile ++.Nm ++.Oo ++.Fl c | ++.Fl h | ++.Fl l | ++.Fl m | ++.Fl t | ++.Fl \&Sc | ++.Fl \&Ss | ++.Fl \&Sm ++.Oc ++.Op Fl o Ar outfile ++.Op Ar infile ++.Nm ++.Op Fl s Ar nettype ++.Op Fl o Ar outfile ++.Op Ar infile ++.Nm ++.Op Fl n Ar netid ++.Op Fl o Ar outfile ++.Op Ar infile ++.\" .SH AVAILABILITY ++.\" .LP ++.\" SUNWcsu ++.Sh DESCRIPTION ++The ++.Nm ++utility is a tool that generates C code to implement an ++.Tn RPC ++protocol. ++The input to ++.Nm ++is a language similar to C known as ++.Tn RPC ++Language (Remote Procedure Call Language). ++.Pp ++The ++.Nm ++utility is normally used as in the first synopsis where ++it takes an input file and generates three output files. ++If the ++.Ar infile ++is named ++.Pa proto.x , ++then ++.Nm ++generates a header in ++.Pa proto.h , ++XDR routines in ++.Pa proto_xdr.c , ++server-side stubs in ++.Pa proto_svc.c , ++and client-side stubs in ++.Pa proto_clnt.c . ++With the ++.Fl T ++option, ++it also generates the ++.Tn RPC ++dispatch table in ++.Pa proto_tbl.i . ++.Pp ++The ++.Nm ++utility can also generate sample client and server files ++that can be customized to suit a particular application. ++The ++.Fl \&Sc , ++.Fl \&Ss ++and ++.Fl \&Sm ++options generate sample client, server and makefile, respectively. ++The ++.Fl a ++option generates all files, including sample files. ++If the ++.Ar infile ++is ++.Pa proto.x , ++then the client side sample file is written to ++.Pa proto_client.c , ++the server side sample file to ++.Pa proto_server.c ++and the sample makefile to ++.Pa makefile.proto . ++.Pp ++The server created can be started both by the port monitors ++(for example, ++.Xr inetd 8 ) ++or by itself. ++When it is started by a port monitor, ++it creates servers only for the transport for which ++the file descriptor ++.Em 0 ++was passed. ++The name of the transport must be specified ++by setting up the environment variable ++.Ev PM_TRANSPORT . ++When the server generated by ++.Nm ++is executed, ++it creates server handles for all the transports ++specified in ++.Ev NETPATH ++environment variable, ++or if it is unset, ++it creates server handles for all the visible transports from ++.Pa /etc/netconfig ++file. ++Note: ++the transports are chosen at run time and not at compile time. ++When the server is self-started, ++it backgrounds itself by default. ++A special define symbol ++.Em RPC_SVC_FG ++can be used to run the server process in foreground. ++.Pp ++The second synopsis provides special features which allow ++for the creation of more sophisticated ++.Tn RPC ++servers. ++These features include support for user provided ++.Em #defines ++and ++.Tn RPC ++dispatch tables. ++The entries in the ++.Tn RPC ++dispatch table contain: ++.Bl -bullet -offset indent -compact ++.It ++pointers to the service routine corresponding to that procedure, ++.It ++a pointer to the input and output arguments, ++.It ++the size of these routines. ++.El ++A server can use the dispatch table to check authorization ++and then to execute the service routine; ++a client library may use it to deal with the details of storage ++management and XDR data conversion. ++.Pp ++The other three synopses shown above are used when ++one does not want to generate all the output files, ++but only a particular one. ++See the ++.Sx EXAMPLES ++section below for examples of ++.Nm ++usage. ++When ++.Nm ++is executed with the ++.Fl s ++option, ++it creates servers for that particular class of transports. ++When ++executed with the ++.Fl n ++option, ++it creates a server for the transport specified by ++.Ar netid . ++If ++.Ar infile ++is not specified, ++.Nm ++accepts the standard input. ++.Pp ++The C preprocessor, ++.Em cc -E ++is run on the input file before it is actually interpreted by ++.Nm . ++For each type of output file, ++.Nm ++defines a special preprocessor symbol for use by the ++.Nm ++programmer: ++.Bl -tag -width indent ++.It RPC_HDR ++defined when compiling into headers ++.It RPC_XDR ++defined when compiling into XDR routines ++.It RPC_SVC ++defined when compiling into server-side stubs ++.It RPC_CLNT ++defined when compiling into client-side stubs ++.It RPC_TBL ++defined when compiling into RPC dispatch tables ++.El ++.Pp ++Any line beginning with ++.Dq % ++is passed directly into the output file, ++uninterpreted by ++.Nm . ++To specify the path name of the C preprocessor use ++.Fl Y ++flag. ++.Pp ++For every data type referred to in ++.Ar infile , ++.Nm ++assumes that there exists a ++routine with the string ++.Em xdr_ ++prepended to the name of the data type. ++If this routine does not exist in the ++.Tn RPC/XDR ++library, it must be provided. ++Providing an undefined data type ++allows customization of ++.Xr xdr 3 ++routines. ++.Sh OPTIONS ++The following options are available: ++.Bl -tag -width indent ++.It Fl a ++Generate all files, including sample files. ++.It Fl b ++Backward compatibility mode. ++Generate transport specific ++.Tn RPC ++code for older versions ++of the operating system. ++.Pp ++Note: in ++.Fx , ++this compatibility flag is turned on by ++default since ++.Fx ++supports only the older ++.Tn ONC RPC ++library. ++.It Fl c ++Compile into ++.Tn XDR ++routines. ++.It Fl C ++Generate header and stub files which can be used with ++.Tn ANSI ++C compilers. Headers generated with this flag can also be ++used with C++ programs. ++.It Fl D Ns Ar name ++.It Fl D Ns Ar name=value ++.\".It Fl D Ns Ar name Ns Op Ar =value ++Define a symbol ++.Ar name . ++Equivalent to the ++.Em #define ++directive in the source. ++If no ++.Ar value ++is given, ++.Ar value ++is defined as ++.Em 1 . ++This option may be specified more than once. ++.It Fl h ++Compile into C data-definitions (a header). ++.Fl T ++option can be used in conjunction to produce a ++header which supports ++.Tn RPC ++dispatch tables. ++.It Fl i Ar size ++Size at which to start generating inline code. ++This option is useful for optimization. ++The default size is 5. ++.Pp ++Note: in order to provide backwards compatibility with the older ++.Nm ++on the ++.Fx ++platform, the default is actually 0 (which means ++that inline code generation is disabled by default). You must specify ++a non-zero value explicitly to override this default. ++.It Fl I ++Compile support for ++.Xr inetd 8 ++in the server side stubs. ++Such servers can be self-started or can be started by ++.Nm inetd . ++When the server is self-started, it backgrounds itself by default. ++A special define symbol ++.Em RPC_SVC_FG ++can be used to run the ++server process in foreground, or the user may simply compile without ++the ++.Fl I ++option. ++.Pp ++If there are no pending client requests, the ++.Nm inetd ++servers exit after 120 seconds (default). ++The default can be changed with the ++.Fl K ++option. ++All the error messages for ++.Nm inetd ++servers ++are always logged with ++.Xr syslog 3 . ++.\" .IP ++.\" Note: ++.\" this option is supported for backward compatibility only. ++.\" By default, ++.\" .B rpcgen ++.\" generates servers that can be invoked through portmonitors. ++.Pp ++.It Fl K Ar seconds ++By default, services created using ++.Nm ++and invoked through ++port monitors wait 120 seconds ++after servicing a request before exiting. ++That interval can be changed using the ++.Fl K ++flag. ++To create a server that exits immediately upon servicing a request, ++use ++.Fl K Ar 0 . ++To create a server that never exits, the appropriate argument is ++.Fl k Ar -1 . ++.Pp ++When monitoring for a server, ++some portmonitors ++.Em always ++spawn a new process in response to a service request. ++If it is known that a server will be used with such a monitor, the ++server should exit immediately on completion. ++For such servers, ++.Nm ++should be used with ++.Fl K Ar 0 . ++.It Fl l ++Compile into client-side stubs. ++.It Fl L ++When the servers are started in foreground, use ++.Xr syslog 3 ++to log the server errors instead of printing them on the standard ++error. ++.It Fl m ++Compile into server-side stubs, ++but do not generate a ++.Qq main ++routine. ++This option is useful for doing callback-routines ++and for users who need to write their own ++.Qq main ++routine to do initialization. ++.It Fl M ++Generate multithread-safe stubs for passing arguments and results between ++rpcgen generated code and user written code. ++This option is useful ++for users who want to use threads in their code. ++However, the ++.Xr rpc_svc_calls 3 ++functions are not yet MT-safe, which means that rpcgen generated server-side ++code will not be MT-safe. ++.It Fl N ++This option allows procedures to have multiple arguments. ++It also uses the style of parameter passing that closely resembles C. ++So, when passing an argument to a remote procedure, you do not have to ++pass a pointer to the argument, but can pass the argument itself. ++This behavior is different from the old style of ++.Nm ++generated code. ++To maintain backward compatibility, ++this option is not the default. ++.It Fl n Ar netid ++Compile into server-side stubs for the transport ++specified by ++.Ar netid . ++There should be an entry for ++.Ar netid ++in the ++netconfig database. ++This option may be specified more than once, ++so as to compile a server that serves multiple transports. ++.It Fl o Ar outfile ++Specify the name of the output file. ++If none is specified, ++standard output is used ++( ++.Fl c , ++.Fl h , ++.Fl l , ++.Fl m , ++.Fl n , ++.Fl s , ++.Fl \&Sc , ++.Fl \&Sm , ++.Fl \&Ss , ++and ++.Fl t ++modes only). ++.It Fl s Ar nettype ++Compile into server-side stubs for all the ++transports belonging to the class ++.Ar nettype . ++The supported classes are ++.Em netpath , ++.Em visible , ++.Em circuit_n , ++.Em circuit_v , ++.Em datagram_n , ++.Em datagram_v , ++.Em tcp , ++and ++.Em udp ++(see ++.Xr rpc 3 ++for the meanings associated with these classes). ++This option may be specified more than once. ++Note: ++the transports are chosen at run time and not at compile time. ++.It Fl \&Sc ++Generate sample client code that uses remote procedure calls. ++.It Fl \&Sm ++Generate a sample ++.Pa Makefile ++which can be used for compiling the application. ++.It Fl \&Ss ++Generate sample server code that uses remote procedure calls. ++.It Fl t ++Compile into ++.Tn RPC ++dispatch table. ++.It Fl T ++Generate the code to support ++.Tn RPC ++dispatch tables. ++.Pp ++The options ++.Fl c , ++.Fl h , ++.Fl l , ++.Fl m , ++.Fl s , ++.Fl \&Sc , ++.Fl \&Sm , ++.Fl \&Ss , ++and ++.Fl t ++are used exclusively to generate a particular type of file, ++while the options ++.Fl D ++and ++.Fl T ++are global and can be used with the other options. ++.It Fl Y Ar pathname ++Give the name of the directory where ++.Nm ++will start looking for the C-preprocessor. ++.El ++.Sh EXAMPLES ++The following example: ++.Dl example% rpcgen -T prot.x ++.Pp ++generates all the five files: ++.Pa prot.h , ++.Pa prot_clnt.c , ++.Pa prot_svc.c , ++.Pa prot_xdr.c ++and ++.Pa prot_tbl.i . ++.Pp ++The following example sends the C data-definitions (header) ++to the standard output. ++.Dl example% rpcgen -h prot.x ++.Pp ++To send the test version of the ++.Fl D Ns Ar TEST , ++server side stubs for ++all the transport belonging to the class ++.Ar datagram_n ++to standard output, use: ++.Dl example% rpcgen -s datagram_n -DTEST prot.x ++.Pp ++To create the server side stubs for the transport indicated ++by ++.Ar netid ++tcp, ++use: ++.Dl example% rpcgen -n tcp -o prot_svc.c prot.x ++.Sh SEE ALSO ++.Xr cc 1 , ++.Xr rpc 3 , ++.Xr syslog 3 , ++.Xr inetd 8 ++.\" .BR rpc_svc_calls (3) ++.Rs ++.%T The rpcgen chapter in the NETP manual ++.Re +-- +1.7.9.5 + diff --git a/package/libtirpc/libtirpc-0009-Automatically-generate-XDR-header-files-from-.x-sour.patch b/package/libtirpc/libtirpc-0009-Automatically-generate-XDR-header-files-from-.x-sour.patch new file mode 100644 index 0000000000..787452a6de --- /dev/null +++ b/package/libtirpc/libtirpc-0009-Automatically-generate-XDR-header-files-from-.x-sour.patch @@ -0,0 +1,999 @@ +From 30fac06891c59a7fb784f6faa4e92921a84c73db Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 10 Nov 2012 17:29:53 +0100 +Subject: [PATCH] Automatically generate XDR header files from .x sources + using rpcgen + +Signed-off-by: Thomas Petazzoni +--- + Makefile.am | 23 +- + src/Makefile.am | 2 +- + tirpc/rpc/rpcb_prot.h | 797 ------------------------------------------------- + tirpc/rpcsvc/crypt.h | 109 ------- + 4 files changed, 21 insertions(+), 910 deletions(-) + delete mode 100644 tirpc/rpc/rpcb_prot.h + delete mode 100644 tirpc/rpcsvc/crypt.h + +diff --git a/Makefile.am b/Makefile.am +index afb4e38..7e63f78 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,9 +1,12 @@ + SUBDIRS = src man doc rpcgen + ACLOCAL_AMFLAGS = -I m4 + ++GENFILES = \ ++ tirpc/rpcsvc/crypt.h \ ++ tirpc/rpc/rpcb_prot.h ++ + nobase_include_HEADERS = tirpc/netconfig.h \ + tirpc/rpcsvc/crypt.x \ +- tirpc/rpcsvc/crypt.h \ + tirpc/rpc/xdr.h \ + tirpc/rpc/types.h \ + tirpc/rpc/svc_soc.h \ +@@ -15,7 +18,6 @@ nobase_include_HEADERS = tirpc/netconfig.h \ + tirpc/rpc/rpcent.h \ + tirpc/rpc/rpc_com.h \ + tirpc/rpc/rpcb_prot.x \ +- tirpc/rpc/rpcb_prot.h \ + tirpc/rpc/rpcb_clnt.h \ + tirpc/rpc/raw.h \ + tirpc/rpc/pmap_rmt.h \ +@@ -32,6 +34,21 @@ nobase_include_HEADERS = tirpc/netconfig.h \ + tirpc/rpc/auth.h \ + tirpc/rpc/auth_gss.h \ + tirpc/rpc/auth_des.h +- ++ ++nobase_nodist_include_HEADERS = $(GENFILES) ++ ++BUILT_SOURCES = $(GENFILES) ++ + pkgconfigdir=$(libdir)/pkgconfig + pkgconfig_DATA = libtirpc.pc ++ ++$(GENFILES): %.h: %.x $(top_builddir)/rpcgen/rpcgen ++ mkdir -p $(dir $@) ++ $(top_builddir)/rpcgen/rpcgen -h -o $@ $< ++ ++$(top_builddir)/rpcgen/rpcgen: force ++ cd rpcgen && $(MAKE) ++ ++force: ++ ++CLEANFILES = $(GENFILES) +diff --git a/src/Makefile.am b/src/Makefile.am +index 6dc259e..bd276cf 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -7,7 +7,7 @@ + + + INCLUDES = -I$(top_srcdir)/tirpc -DPORTMAP -DVERSION="\"$(VERSION)\"" \ +- -D_GNU_SOURCE -Wall -pipe ++ -D_GNU_SOURCE -Wall -pipe -I$(top_builddir)/tirpc + + lib_LTLIBRARIES = libtirpc.la + +diff --git a/tirpc/rpc/rpcb_prot.h b/tirpc/rpc/rpcb_prot.h +deleted file mode 100644 +index 7ae48b8..0000000 +--- a/tirpc/rpc/rpcb_prot.h ++++ /dev/null +@@ -1,797 +0,0 @@ +-/* +- * Please do not edit this file. +- * It was generated using rpcgen. +- */ +- +-#ifndef _RPCB_PROT_H_RPCGEN +-#define _RPCB_PROT_H_RPCGEN +- +-#include +- +-#ifndef IXDR_GET_INT32 +-#define IXDR_GET_INT32(buf) IXDR_GET_LONG((buf)) +-#endif +-#ifndef IXDR_PUT_INT32 +-#define IXDR_PUT_INT32(buf, v) IXDR_PUT_LONG((buf), (v)) +-#endif +-#ifndef IXDR_GET_U_INT32 +-#define IXDR_GET_U_INT32(buf) IXDR_GET_U_LONG((buf)) +-#endif +-#ifndef IXDR_PUT_U_INT32 +-#define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_U_LONG((buf), (v)) +-#endif +-/* +- * $FreeBSD: src/include/rpc/rpcb_prot.x,v 1.3 2002/03/13 10:29:06 obrien Exp $ +- * +- * Copyright (c) 2009, Sun Microsystems, Inc. +- * All rights reserved. +- * +- * Redistribution and use in source and binary forms, with or without +- * modification, are permitted provided that the following conditions are met: +- * - Redistributions of source code must retain the above copyright notice, +- * this list of conditions and the following disclaimer. +- * - Redistributions in binary form must reproduce the above copyright notice, +- * this list of conditions and the following disclaimer in the documentation +- * and/or other materials provided with the distribution. +- * - Neither the name of Sun Microsystems, Inc. nor the names of its +- * contributors may be used to endorse or promote products derived +- * from this software without specific prior written permission. +- * +- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +- * POSSIBILITY OF SUCH DAMAGE. +- */ +-/* +- * Copyright (c) 1988 by Sun Microsystems, Inc. +- */ +-/* from rpcb_prot.x */ +- +-/* #pragma ident "@(#)rpcb_prot.x 1.5 94/04/29 SMI" */ +- +-#ifndef _KERNEL +- +- +-/* +- * The following procedures are supported by the protocol in version 3: +- * +- * RPCBPROC_NULL() returns () +- * takes nothing, returns nothing +- * +- * RPCBPROC_SET(rpcb) returns (bool_t) +- * TRUE is success, FALSE is failure. Registers the tuple +- * [prog, vers, address, owner, netid]. +- * Finds out owner and netid information on its own. +- * +- * RPCBPROC_UNSET(rpcb) returns (bool_t) +- * TRUE is success, FALSE is failure. Un-registers tuple +- * [prog, vers, netid]. addresses is ignored. +- * If netid is NULL, unregister all. +- * +- * RPCBPROC_GETADDR(rpcb) returns (string). +- * 0 is failure. Otherwise returns the universal address where the +- * triple [prog, vers, netid] is registered. Ignore address and owner. +- * +- * RPCBPROC_DUMP() RETURNS (rpcblist_ptr) +- * used to dump the entire rpcbind maps +- * +- * RPCBPROC_CALLIT(rpcb_rmtcallargs) +- * RETURNS (rpcb_rmtcallres); +- * Calls the procedure on the remote machine. If it is not registered, +- * this procedure is quiet; i.e. it does not return error information!!! +- * This routine only passes null authentication parameters. +- * It has no interface to xdr routines for RPCBPROC_CALLIT. +- * +- * RPCBPROC_GETTIME() returns (int). +- * Gets the remote machines time +- * +- * RPCBPROC_UADDR2TADDR(strint) RETURNS (struct netbuf) +- * Returns the netbuf address from universal address. +- * +- * RPCBPROC_TADDR2UADDR(struct netbuf) RETURNS (string) +- * Returns the universal address from netbuf address. +- * +- * END OF RPCBIND VERSION 3 PROCEDURES +- */ +-/* +- * Except for RPCBPROC_CALLIT, the procedures above are carried over to +- * rpcbind version 4. Those below are added or modified for version 4. +- * NOTE: RPCBPROC_BCAST HAS THE SAME FUNCTIONALITY AND PROCEDURE NUMBER +- * AS RPCBPROC_CALLIT. +- * +- * RPCBPROC_BCAST(rpcb_rmtcallargs) +- * RETURNS (rpcb_rmtcallres); +- * Calls the procedure on the remote machine. If it is not registered, +- * this procedure IS quiet; i.e. it DOES NOT return error information!!! +- * This routine should be used for broadcasting and nothing else. +- * +- * RPCBPROC_GETVERSADDR(rpcb) returns (string). +- * 0 is failure. Otherwise returns the universal address where the +- * triple [prog, vers, netid] is registered. Ignore address and owner. +- * Same as RPCBPROC_GETADDR except that if the given version number +- * is not available, the address is not returned. +- * +- * RPCBPROC_INDIRECT(rpcb_rmtcallargs) +- * RETURNS (rpcb_rmtcallres); +- * Calls the procedure on the remote machine. If it is not registered, +- * this procedure is NOT quiet; i.e. it DOES return error information!!! +- * as any normal application would expect. +- * +- * RPCBPROC_GETADDRLIST(rpcb) returns (rpcb_entry_list_ptr). +- * Same as RPCBPROC_GETADDR except that it returns a list of all the +- * addresses registered for the combination (prog, vers) (for all +- * transports). +- * +- * RPCBPROC_GETSTAT(void) returns (rpcb_stat_byvers) +- * Returns the statistics about the kind of requests received by rpcbind. +- */ +- +-/* +- * A mapping of (program, version, network ID) to address +- */ +- +-struct rpcb { +- rpcprog_t r_prog; +- rpcvers_t r_vers; +- char *r_netid; +- char *r_addr; +- char *r_owner; +-}; +-typedef struct rpcb rpcb; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcb(XDR *, rpcb*); +-#elif __STDC__ +-extern bool_t xdr_rpcb(XDR *, rpcb*); +-#else /* Old Style C */ +-bool_t xdr_rpcb(); +-#endif /* Old Style C */ +- +- +-typedef rpcb RPCB; +- +- +-/* +- * A list of mappings +- * +- * Below are two definitions for the rpcblist structure. This is done because +- * xdr_rpcblist() is specified to take a struct rpcblist **, rather than a +- * struct rpcblist * that rpcgen would produce. One version of the rpcblist +- * structure (actually called rp__list) is used with rpcgen, and the other is +- * defined only in the header file for compatibility with the specified +- * interface. +- */ +- +-struct rp__list { +- rpcb rpcb_map; +- struct rp__list *rpcb_next; +-}; +-typedef struct rp__list rp__list; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rp__list(XDR *, rp__list*); +-#elif __STDC__ +-extern bool_t xdr_rp__list(XDR *, rp__list*); +-#else /* Old Style C */ +-bool_t xdr_rp__list(); +-#endif /* Old Style C */ +- +- +-typedef rp__list *rpcblist_ptr; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcblist_ptr(XDR *, rpcblist_ptr*); +-#elif __STDC__ +-extern bool_t xdr_rpcblist_ptr(XDR *, rpcblist_ptr*); +-#else /* Old Style C */ +-bool_t xdr_rpcblist_ptr(); +-#endif /* Old Style C */ +- +- +-typedef struct rp__list rpcblist; +-typedef struct rp__list RPCBLIST; +- +-#ifndef __cplusplus +-struct rpcblist { +- RPCB rpcb_map; +- struct rpcblist *rpcb_next; +-}; +-#endif +- +-#ifdef __cplusplus +-extern "C" { +-#endif +-extern bool_t xdr_rpcblist(XDR *, rpcblist**); +-#ifdef __cplusplus +-} +-#endif +- +- +-/* +- * Arguments of remote calls +- */ +- +-struct rpcb_rmtcallargs { +- rpcprog_t prog; +- rpcvers_t vers; +- rpcproc_t proc; +- struct { +- u_int args_len; +- char *args_val; +- } args; +-}; +-typedef struct rpcb_rmtcallargs rpcb_rmtcallargs; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcb_rmtcallargs(XDR *, rpcb_rmtcallargs*); +-#elif __STDC__ +-extern bool_t xdr_rpcb_rmtcallargs(XDR *, rpcb_rmtcallargs*); +-#else /* Old Style C */ +-bool_t xdr_rpcb_rmtcallargs(); +-#endif /* Old Style C */ +- +- +-/* +- * Client-side only representation of rpcb_rmtcallargs structure. +- * +- * The routine that XDRs the rpcb_rmtcallargs structure must deal with the +- * opaque arguments in the "args" structure. xdr_rpcb_rmtcallargs() needs to +- * be passed the XDR routine that knows the args' structure. This routine +- * doesn't need to go over-the-wire (and it wouldn't make sense anyway) since +- * the application being called already knows the args structure. So we use a +- * different "XDR" structure on the client side, r_rpcb_rmtcallargs, which +- * includes the args' XDR routine. +- */ +-struct r_rpcb_rmtcallargs { +- rpcprog_t prog; +- rpcvers_t vers; +- rpcproc_t proc; +- struct { +- u_int args_len; +- char *args_val; +- } args; +- xdrproc_t xdr_args; /* encodes args */ +-}; +- +- +-/* +- * Results of the remote call +- */ +- +-struct rpcb_rmtcallres { +- char *addr; +- struct { +- u_int results_len; +- char *results_val; +- } results; +-}; +-typedef struct rpcb_rmtcallres rpcb_rmtcallres; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcb_rmtcallres(XDR *, rpcb_rmtcallres*); +-#elif __STDC__ +-extern bool_t xdr_rpcb_rmtcallres(XDR *, rpcb_rmtcallres*); +-#else /* Old Style C */ +-bool_t xdr_rpcb_rmtcallres(); +-#endif /* Old Style C */ +- +- +-/* +- * Client-side only representation of rpcb_rmtcallres structure. +- */ +-struct r_rpcb_rmtcallres { +- char *addr; +- struct { +- u_int32_t results_len; +- char *results_val; +- } results; +- xdrproc_t xdr_res; /* decodes results */ +-}; +- +-/* +- * rpcb_entry contains a merged address of a service on a particular +- * transport, plus associated netconfig information. A list of rpcb_entrys +- * is returned by RPCBPROC_GETADDRLIST. See netconfig.h for values used +- * in r_nc_* fields. +- */ +- +-struct rpcb_entry { +- char *r_maddr; +- char *r_nc_netid; +- u_int r_nc_semantics; +- char *r_nc_protofmly; +- char *r_nc_proto; +-}; +-typedef struct rpcb_entry rpcb_entry; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcb_entry(XDR *, rpcb_entry*); +-#elif __STDC__ +-extern bool_t xdr_rpcb_entry(XDR *, rpcb_entry*); +-#else /* Old Style C */ +-bool_t xdr_rpcb_entry(); +-#endif /* Old Style C */ +- +- +-/* +- * A list of addresses supported by a service. +- */ +- +-struct rpcb_entry_list { +- rpcb_entry rpcb_entry_map; +- struct rpcb_entry_list *rpcb_entry_next; +-}; +-typedef struct rpcb_entry_list rpcb_entry_list; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcb_entry_list(XDR *, rpcb_entry_list*); +-#elif __STDC__ +-extern bool_t xdr_rpcb_entry_list(XDR *, rpcb_entry_list*); +-#else /* Old Style C */ +-bool_t xdr_rpcb_entry_list(); +-#endif /* Old Style C */ +- +- +-typedef rpcb_entry_list *rpcb_entry_list_ptr; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcb_entry_list_ptr(XDR *, rpcb_entry_list_ptr*); +-#elif __STDC__ +-extern bool_t xdr_rpcb_entry_list_ptr(XDR *, rpcb_entry_list_ptr*); +-#else /* Old Style C */ +-bool_t xdr_rpcb_entry_list_ptr(); +-#endif /* Old Style C */ +- +- +-/* +- * rpcbind statistics +- */ +- +-#define rpcb_highproc_2 RPCBPROC_CALLIT +-#define rpcb_highproc_3 RPCBPROC_TADDR2UADDR +-#define rpcb_highproc_4 RPCBPROC_GETSTAT +-#define RPCBSTAT_HIGHPROC 13 +-#define RPCBVERS_STAT 3 +-#define RPCBVERS_4_STAT 2 +-#define RPCBVERS_3_STAT 1 +-#define RPCBVERS_2_STAT 0 +- +-/* Link list of all the stats about getport and getaddr */ +- +-struct rpcbs_addrlist { +- rpcprog_t prog; +- rpcvers_t vers; +- int success; +- int failure; +- char *netid; +- struct rpcbs_addrlist *next; +-}; +-typedef struct rpcbs_addrlist rpcbs_addrlist; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcbs_addrlist(XDR *, rpcbs_addrlist*); +-#elif __STDC__ +-extern bool_t xdr_rpcbs_addrlist(XDR *, rpcbs_addrlist*); +-#else /* Old Style C */ +-bool_t xdr_rpcbs_addrlist(); +-#endif /* Old Style C */ +- +- +-/* Link list of all the stats about rmtcall */ +- +-struct rpcbs_rmtcalllist { +- rpcprog_t prog; +- rpcvers_t vers; +- rpcproc_t proc; +- int success; +- int failure; +- int indirect; +- char *netid; +- struct rpcbs_rmtcalllist *next; +-}; +-typedef struct rpcbs_rmtcalllist rpcbs_rmtcalllist; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcbs_rmtcalllist(XDR *, rpcbs_rmtcalllist*); +-#elif __STDC__ +-extern bool_t xdr_rpcbs_rmtcalllist(XDR *, rpcbs_rmtcalllist*); +-#else /* Old Style C */ +-bool_t xdr_rpcbs_rmtcalllist(); +-#endif /* Old Style C */ +- +- +-typedef int rpcbs_proc[RPCBSTAT_HIGHPROC]; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcbs_proc(XDR *, rpcbs_proc); +-#elif __STDC__ +-extern bool_t xdr_rpcbs_proc(XDR *, rpcbs_proc); +-#else /* Old Style C */ +-bool_t xdr_rpcbs_proc(); +-#endif /* Old Style C */ +- +- +-typedef rpcbs_addrlist *rpcbs_addrlist_ptr; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcbs_addrlist_ptr(XDR *, rpcbs_addrlist_ptr*); +-#elif __STDC__ +-extern bool_t xdr_rpcbs_addrlist_ptr(XDR *, rpcbs_addrlist_ptr*); +-#else /* Old Style C */ +-bool_t xdr_rpcbs_addrlist_ptr(); +-#endif /* Old Style C */ +- +- +-typedef rpcbs_rmtcalllist *rpcbs_rmtcalllist_ptr; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcbs_rmtcalllist_ptr(XDR *, rpcbs_rmtcalllist_ptr*); +-#elif __STDC__ +-extern bool_t xdr_rpcbs_rmtcalllist_ptr(XDR *, rpcbs_rmtcalllist_ptr*); +-#else /* Old Style C */ +-bool_t xdr_rpcbs_rmtcalllist_ptr(); +-#endif /* Old Style C */ +- +- +-struct rpcb_stat { +- rpcbs_proc info; +- int setinfo; +- int unsetinfo; +- rpcbs_addrlist_ptr addrinfo; +- rpcbs_rmtcalllist_ptr rmtinfo; +-}; +-typedef struct rpcb_stat rpcb_stat; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcb_stat(XDR *, rpcb_stat*); +-#elif __STDC__ +-extern bool_t xdr_rpcb_stat(XDR *, rpcb_stat*); +-#else /* Old Style C */ +-bool_t xdr_rpcb_stat(); +-#endif /* Old Style C */ +- +- +-/* +- * One rpcb_stat structure is returned for each version of rpcbind +- * being monitored. +- */ +- +-typedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT]; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcb_stat_byvers(XDR *, rpcb_stat_byvers); +-#elif __STDC__ +-extern bool_t xdr_rpcb_stat_byvers(XDR *, rpcb_stat_byvers); +-#else /* Old Style C */ +-bool_t xdr_rpcb_stat_byvers(); +-#endif /* Old Style C */ +- +- +-/* +- * We don't define netbuf in RPCL, since it would contain structure member +- * names that would conflict with the definition of struct netbuf in +- * . Instead we merely declare the XDR routine xdr_netbuf() here, +- * and implement it ourselves in rpc/rpcb_prot.c. +- */ +-#ifdef __cplusplus +-extern "C" bool_t xdr_netbuf(XDR *, struct netbuf *); +- +-#else /* __STDC__ */ +-extern bool_t xdr_netbuf(XDR *, struct netbuf *); +- +-#endif +- +-#define RPCBVERS_3 RPCBVERS +-#define RPCBVERS_4 RPCBVERS4 +- +-#define _PATH_RPCBINDSOCK "/var/run/rpcbind.sock" +- +-#else /* ndef _KERNEL */ +-#ifdef __cplusplus +-extern "C" { +-#endif +- +-/* +- * A mapping of (program, version, network ID) to address +- */ +-struct rpcb { +- rpcprog_t r_prog; /* program number */ +- rpcvers_t r_vers; /* version number */ +- char *r_netid; /* network id */ +- char *r_addr; /* universal address */ +- char *r_owner; /* owner of the mapping */ +-}; +-typedef struct rpcb RPCB; +- +-/* +- * A list of mappings +- */ +-struct rpcblist { +- RPCB rpcb_map; +- struct rpcblist *rpcb_next; +-}; +-typedef struct rpcblist RPCBLIST; +-typedef struct rpcblist *rpcblist_ptr; +- +-/* +- * Remote calls arguments +- */ +-struct rpcb_rmtcallargs { +- rpcprog_t prog; /* program number */ +- rpcvers_t vers; /* version number */ +- rpcproc_t proc; /* procedure number */ +- u_int32_t arglen; /* arg len */ +- caddr_t args_ptr; /* argument */ +- xdrproc_t xdr_args; /* XDR routine for argument */ +-}; +-typedef struct rpcb_rmtcallargs rpcb_rmtcallargs; +- +-/* +- * Remote calls results +- */ +-struct rpcb_rmtcallres { +- char *addr_ptr; /* remote universal address */ +- u_int32_t resultslen; /* results length */ +- caddr_t results_ptr; /* results */ +- xdrproc_t xdr_results; /* XDR routine for result */ +-}; +-typedef struct rpcb_rmtcallres rpcb_rmtcallres; +- +-struct rpcb_entry { +- char *r_maddr; +- char *r_nc_netid; +- unsigned int r_nc_semantics; +- char *r_nc_protofmly; +- char *r_nc_proto; +-}; +-typedef struct rpcb_entry rpcb_entry; +- +-/* +- * A list of addresses supported by a service. +- */ +- +-struct rpcb_entry_list { +- rpcb_entry rpcb_entry_map; +- struct rpcb_entry_list *rpcb_entry_next; +-}; +-typedef struct rpcb_entry_list rpcb_entry_list; +- +-typedef rpcb_entry_list *rpcb_entry_list_ptr; +- +-/* +- * rpcbind statistics +- */ +- +-#define rpcb_highproc_2 RPCBPROC_CALLIT +-#define rpcb_highproc_3 RPCBPROC_TADDR2UADDR +-#define rpcb_highproc_4 RPCBPROC_GETSTAT +-#define RPCBSTAT_HIGHPROC 13 +-#define RPCBVERS_STAT 3 +-#define RPCBVERS_4_STAT 2 +-#define RPCBVERS_3_STAT 1 +-#define RPCBVERS_2_STAT 0 +- +-/* Link list of all the stats about getport and getaddr */ +- +-struct rpcbs_addrlist { +- rpcprog_t prog; +- rpcvers_t vers; +- int success; +- int failure; +- char *netid; +- struct rpcbs_addrlist *next; +-}; +-typedef struct rpcbs_addrlist rpcbs_addrlist; +- +-/* Link list of all the stats about rmtcall */ +- +-struct rpcbs_rmtcalllist { +- rpcprog_t prog; +- rpcvers_t vers; +- rpcproc_t proc; +- int success; +- int failure; +- int indirect; +- char *netid; +- struct rpcbs_rmtcalllist *next; +-}; +-typedef struct rpcbs_rmtcalllist rpcbs_rmtcalllist; +- +-typedef int rpcbs_proc[RPCBSTAT_HIGHPROC]; +- +-typedef rpcbs_addrlist *rpcbs_addrlist_ptr; +- +-typedef rpcbs_rmtcalllist *rpcbs_rmtcalllist_ptr; +- +-struct rpcb_stat { +- rpcbs_proc info; +- int setinfo; +- int unsetinfo; +- rpcbs_addrlist_ptr addrinfo; +- rpcbs_rmtcalllist_ptr rmtinfo; +-}; +-typedef struct rpcb_stat rpcb_stat; +- +-/* +- * One rpcb_stat structure is returned for each version of rpcbind +- * being monitored. +- */ +- +-typedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT]; +- +-#ifdef __cplusplus +-} +-#endif +- +-#endif /* ndef _KERNEL */ +- +-#define RPCBPROG ((u_int32_t)100000) +-#define RPCBVERS ((u_int32_t)3) +- +-#ifdef __cplusplus +-#define RPCBPROC_SET ((u_int32_t)1) +-extern "C" bool_t * rpcbproc_set_3(rpcb *, CLIENT *); +-extern "C" bool_t * rpcbproc_set_3_svc(rpcb *, struct svc_req *); +-#define RPCBPROC_UNSET ((u_int32_t)2) +-extern "C" bool_t * rpcbproc_unset_3(rpcb *, CLIENT *); +-extern "C" bool_t * rpcbproc_unset_3_svc(rpcb *, struct svc_req *); +-#define RPCBPROC_GETADDR ((u_int32_t)3) +-extern "C" char ** rpcbproc_getaddr_3(rpcb *, CLIENT *); +-extern "C" char ** rpcbproc_getaddr_3_svc(rpcb *, struct svc_req *); +-#define RPCBPROC_DUMP ((u_int32_t)4) +-extern "C" rpcblist_ptr * rpcbproc_dump_3(void *, CLIENT *); +-extern "C" rpcblist_ptr * rpcbproc_dump_3_svc(void *, struct svc_req *); +-#define RPCBPROC_CALLIT ((u_int32_t)5) +-extern "C" rpcb_rmtcallres * rpcbproc_callit_3(rpcb_rmtcallargs *, CLIENT *); +-extern "C" rpcb_rmtcallres * rpcbproc_callit_3_svc(rpcb_rmtcallargs *, struct svc_req *); +-#define RPCBPROC_GETTIME ((u_int32_t)6) +-extern "C" u_int * rpcbproc_gettime_3(void *, CLIENT *); +-extern "C" u_int * rpcbproc_gettime_3_svc(void *, struct svc_req *); +-#define RPCBPROC_UADDR2TADDR ((u_int32_t)7) +-extern "C" struct netbuf * rpcbproc_uaddr2taddr_3(char **, CLIENT *); +-extern "C" struct netbuf * rpcbproc_uaddr2taddr_3_svc(char **, struct svc_req *); +-#define RPCBPROC_TADDR2UADDR ((u_int32_t)8) +-extern "C" char ** rpcbproc_taddr2uaddr_3(struct netbuf *, CLIENT *); +-extern "C" char ** rpcbproc_taddr2uaddr_3_svc(struct netbuf *, struct svc_req *); +- +-#elif __STDC__ +-#define RPCBPROC_SET ((u_int32_t)1) +-extern bool_t * rpcbproc_set_3(rpcb *, CLIENT *); +-extern bool_t * rpcbproc_set_3_svc(rpcb *, struct svc_req *); +-#define RPCBPROC_UNSET ((u_int32_t)2) +-extern bool_t * rpcbproc_unset_3(rpcb *, CLIENT *); +-extern bool_t * rpcbproc_unset_3_svc(rpcb *, struct svc_req *); +-#define RPCBPROC_GETADDR ((u_int32_t)3) +-extern char ** rpcbproc_getaddr_3(rpcb *, CLIENT *); +-extern char ** rpcbproc_getaddr_3_svc(rpcb *, struct svc_req *); +-#define RPCBPROC_DUMP ((u_int32_t)4) +-extern rpcblist_ptr * rpcbproc_dump_3(void *, CLIENT *); +-extern rpcblist_ptr * rpcbproc_dump_3_svc(void *, struct svc_req *); +-#define RPCBPROC_CALLIT ((u_int32_t)5) +-extern rpcb_rmtcallres * rpcbproc_callit_3(rpcb_rmtcallargs *, CLIENT *); +-extern rpcb_rmtcallres * rpcbproc_callit_3_svc(rpcb_rmtcallargs *, struct svc_req *); +-#define RPCBPROC_GETTIME ((u_int32_t)6) +-extern u_int * rpcbproc_gettime_3(void *, CLIENT *); +-extern u_int * rpcbproc_gettime_3_svc(void *, struct svc_req *); +-#define RPCBPROC_UADDR2TADDR ((u_int32_t)7) +-extern struct netbuf * rpcbproc_uaddr2taddr_3(char **, CLIENT *); +-extern struct netbuf * rpcbproc_uaddr2taddr_3_svc(char **, struct svc_req *); +-#define RPCBPROC_TADDR2UADDR ((u_int32_t)8) +-extern char ** rpcbproc_taddr2uaddr_3(struct netbuf *, CLIENT *); +-extern char ** rpcbproc_taddr2uaddr_3_svc(struct netbuf *, struct svc_req *); +- +-#else /* Old Style C */ +-#define RPCBPROC_SET ((u_int32_t)1) +-extern bool_t * rpcbproc_set_3(); +-extern bool_t * rpcbproc_set_3_svc(); +-#define RPCBPROC_UNSET ((u_int32_t)2) +-extern bool_t * rpcbproc_unset_3(); +-extern bool_t * rpcbproc_unset_3_svc(); +-#define RPCBPROC_GETADDR ((u_int32_t)3) +-extern char ** rpcbproc_getaddr_3(); +-extern char ** rpcbproc_getaddr_3_svc(); +-#define RPCBPROC_DUMP ((u_int32_t)4) +-extern rpcblist_ptr * rpcbproc_dump_3(); +-extern rpcblist_ptr * rpcbproc_dump_3_svc(); +-#define RPCBPROC_CALLIT ((u_int32_t)5) +-extern rpcb_rmtcallres * rpcbproc_callit_3(); +-extern rpcb_rmtcallres * rpcbproc_callit_3_svc(); +-#define RPCBPROC_GETTIME ((u_int32_t)6) +-extern u_int * rpcbproc_gettime_3(); +-extern u_int * rpcbproc_gettime_3_svc(); +-#define RPCBPROC_UADDR2TADDR ((u_int32_t)7) +-extern struct netbuf * rpcbproc_uaddr2taddr_3(); +-extern struct netbuf * rpcbproc_uaddr2taddr_3_svc(); +-#define RPCBPROC_TADDR2UADDR ((u_int32_t)8) +-extern char ** rpcbproc_taddr2uaddr_3(); +-extern char ** rpcbproc_taddr2uaddr_3_svc(); +-#endif /* Old Style C */ +-#define RPCBVERS4 ((u_int32_t)4) +- +-#ifdef __cplusplus +-extern "C" bool_t * rpcbproc_set_4(rpcb *, CLIENT *); +-extern "C" bool_t * rpcbproc_set_4_svc(rpcb *, struct svc_req *); +-extern "C" bool_t * rpcbproc_unset_4(rpcb *, CLIENT *); +-extern "C" bool_t * rpcbproc_unset_4_svc(rpcb *, struct svc_req *); +-extern "C" char ** rpcbproc_getaddr_4(rpcb *, CLIENT *); +-extern "C" char ** rpcbproc_getaddr_4_svc(rpcb *, struct svc_req *); +-extern "C" rpcblist_ptr * rpcbproc_dump_4(void *, CLIENT *); +-extern "C" rpcblist_ptr * rpcbproc_dump_4_svc(void *, struct svc_req *); +-#define RPCBPROC_BCAST ((u_int32_t)RPCBPROC_CALLIT) +-extern "C" rpcb_rmtcallres * rpcbproc_bcast_4(rpcb_rmtcallargs *, CLIENT *); +-extern "C" rpcb_rmtcallres * rpcbproc_bcast_4_svc(rpcb_rmtcallargs *, struct svc_req *); +-extern "C" u_int * rpcbproc_gettime_4(void *, CLIENT *); +-extern "C" u_int * rpcbproc_gettime_4_svc(void *, struct svc_req *); +-extern "C" struct netbuf * rpcbproc_uaddr2taddr_4(char **, CLIENT *); +-extern "C" struct netbuf * rpcbproc_uaddr2taddr_4_svc(char **, struct svc_req *); +-extern "C" char ** rpcbproc_taddr2uaddr_4(struct netbuf *, CLIENT *); +-extern "C" char ** rpcbproc_taddr2uaddr_4_svc(struct netbuf *, struct svc_req *); +-#define RPCBPROC_GETVERSADDR ((u_int32_t)9) +-extern "C" char ** rpcbproc_getversaddr_4(rpcb *, CLIENT *); +-extern "C" char ** rpcbproc_getversaddr_4_svc(rpcb *, struct svc_req *); +-#define RPCBPROC_INDIRECT ((u_int32_t)10) +-extern "C" rpcb_rmtcallres * rpcbproc_indirect_4(rpcb_rmtcallargs *, CLIENT *); +-extern "C" rpcb_rmtcallres * rpcbproc_indirect_4_svc(rpcb_rmtcallargs *, struct svc_req *); +-#define RPCBPROC_GETADDRLIST ((u_int32_t)11) +-extern "C" rpcb_entry_list_ptr * rpcbproc_getaddrlist_4(rpcb *, CLIENT *); +-extern "C" rpcb_entry_list_ptr * rpcbproc_getaddrlist_4_svc(rpcb *, struct svc_req *); +-#define RPCBPROC_GETSTAT ((u_int32_t)12) +-extern "C" rpcb_stat * rpcbproc_getstat_4(void *, CLIENT *); +-extern "C" rpcb_stat * rpcbproc_getstat_4_svc(void *, struct svc_req *); +- +-#elif __STDC__ +-extern bool_t * rpcbproc_set_4(rpcb *, CLIENT *); +-extern bool_t * rpcbproc_set_4_svc(rpcb *, struct svc_req *); +-extern bool_t * rpcbproc_unset_4(rpcb *, CLIENT *); +-extern bool_t * rpcbproc_unset_4_svc(rpcb *, struct svc_req *); +-extern char ** rpcbproc_getaddr_4(rpcb *, CLIENT *); +-extern char ** rpcbproc_getaddr_4_svc(rpcb *, struct svc_req *); +-extern rpcblist_ptr * rpcbproc_dump_4(void *, CLIENT *); +-extern rpcblist_ptr * rpcbproc_dump_4_svc(void *, struct svc_req *); +-#define RPCBPROC_BCAST ((u_int32_t)RPCBPROC_CALLIT) +-extern rpcb_rmtcallres * rpcbproc_bcast_4(rpcb_rmtcallargs *, CLIENT *); +-extern rpcb_rmtcallres * rpcbproc_bcast_4_svc(rpcb_rmtcallargs *, struct svc_req *); +-extern u_int * rpcbproc_gettime_4(void *, CLIENT *); +-extern u_int * rpcbproc_gettime_4_svc(void *, struct svc_req *); +-extern struct netbuf * rpcbproc_uaddr2taddr_4(char **, CLIENT *); +-extern struct netbuf * rpcbproc_uaddr2taddr_4_svc(char **, struct svc_req *); +-extern char ** rpcbproc_taddr2uaddr_4(struct netbuf *, CLIENT *); +-extern char ** rpcbproc_taddr2uaddr_4_svc(struct netbuf *, struct svc_req *); +-#define RPCBPROC_GETVERSADDR ((u_int32_t)9) +-extern char ** rpcbproc_getversaddr_4(rpcb *, CLIENT *); +-extern char ** rpcbproc_getversaddr_4_svc(rpcb *, struct svc_req *); +-#define RPCBPROC_INDIRECT ((u_int32_t)10) +-extern rpcb_rmtcallres * rpcbproc_indirect_4(rpcb_rmtcallargs *, CLIENT *); +-extern rpcb_rmtcallres * rpcbproc_indirect_4_svc(rpcb_rmtcallargs *, struct svc_req *); +-#define RPCBPROC_GETADDRLIST ((u_int32_t)11) +-extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4(rpcb *, CLIENT *); +-extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4_svc(rpcb *, struct svc_req *); +-#define RPCBPROC_GETSTAT ((u_int32_t)12) +-extern rpcb_stat * rpcbproc_getstat_4(void *, CLIENT *); +-extern rpcb_stat * rpcbproc_getstat_4_svc(void *, struct svc_req *); +- +-#else /* Old Style C */ +-extern bool_t * rpcbproc_set_4(); +-extern bool_t * rpcbproc_set_4_svc(); +-extern bool_t * rpcbproc_unset_4(); +-extern bool_t * rpcbproc_unset_4_svc(); +-extern char ** rpcbproc_getaddr_4(); +-extern char ** rpcbproc_getaddr_4_svc(); +-extern rpcblist_ptr * rpcbproc_dump_4(); +-extern rpcblist_ptr * rpcbproc_dump_4_svc(); +-#define RPCBPROC_BCAST ((u_int32_t)RPCBPROC_CALLIT) +-extern rpcb_rmtcallres * rpcbproc_bcast_4(); +-extern rpcb_rmtcallres * rpcbproc_bcast_4_svc(); +-extern u_int * rpcbproc_gettime_4(); +-extern u_int * rpcbproc_gettime_4_svc(); +-extern struct netbuf * rpcbproc_uaddr2taddr_4(); +-extern struct netbuf * rpcbproc_uaddr2taddr_4_svc(); +-extern char ** rpcbproc_taddr2uaddr_4(); +-extern char ** rpcbproc_taddr2uaddr_4_svc(); +-#define RPCBPROC_GETVERSADDR ((u_int32_t)9) +-extern char ** rpcbproc_getversaddr_4(); +-extern char ** rpcbproc_getversaddr_4_svc(); +-#define RPCBPROC_INDIRECT ((u_int32_t)10) +-extern rpcb_rmtcallres * rpcbproc_indirect_4(); +-extern rpcb_rmtcallres * rpcbproc_indirect_4_svc(); +-#define RPCBPROC_GETADDRLIST ((u_int32_t)11) +-extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4(); +-extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4_svc(); +-#define RPCBPROC_GETSTAT ((u_int32_t)12) +-extern rpcb_stat * rpcbproc_getstat_4(); +-extern rpcb_stat * rpcbproc_getstat_4_svc(); +-#endif /* Old Style C */ +- +-#endif /* !_RPCB_PROT_H_RPCGEN */ +diff --git a/tirpc/rpcsvc/crypt.h b/tirpc/rpcsvc/crypt.h +deleted file mode 100644 +index da1f9cc..0000000 +--- a/tirpc/rpcsvc/crypt.h ++++ /dev/null +@@ -1,109 +0,0 @@ +-/* +- * Please do not edit this file. +- * It was generated using rpcgen. +- */ +- +-#ifndef _CRYPT_H_RPCGEN +-#define _CRYPT_H_RPCGEN +- +-#include +- +-#ifndef IXDR_GET_INT32 +-#define IXDR_GET_INT32(buf) IXDR_GET_LONG((buf)) +-#endif +-#ifndef IXDR_PUT_INT32 +-#define IXDR_PUT_INT32(buf, v) IXDR_PUT_LONG((buf), (v)) +-#endif +-#ifndef IXDR_GET_U_INT32 +-#define IXDR_GET_U_INT32(buf) IXDR_GET_U_LONG((buf)) +-#endif +-#ifndef IXDR_PUT_U_INT32 +-#define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_U_LONG((buf), (v)) +-#endif +- +-enum des_dir { +- ENCRYPT_DES = 0, +- DECRYPT_DES = 1, +-}; +-typedef enum des_dir des_dir; +-#ifdef __cplusplus +-extern "C" bool_t xdr_des_dir(XDR *, des_dir*); +-#elif __STDC__ +-extern bool_t xdr_des_dir(XDR *, des_dir*); +-#else /* Old Style C */ +-bool_t xdr_des_dir(); +-#endif /* Old Style C */ +- +- +-enum des_mode { +- CBC_DES = 0, +- ECB_DES = 1, +-}; +-typedef enum des_mode des_mode; +-#ifdef __cplusplus +-extern "C" bool_t xdr_des_mode(XDR *, des_mode*); +-#elif __STDC__ +-extern bool_t xdr_des_mode(XDR *, des_mode*); +-#else /* Old Style C */ +-bool_t xdr_des_mode(); +-#endif /* Old Style C */ +- +- +-struct desargs { +- u_char des_key[8]; +- des_dir des_dir; +- des_mode des_mode; +- u_char des_ivec[8]; +- struct { +- u_int desbuf_len; +- char *desbuf_val; +- } desbuf; +-}; +-typedef struct desargs desargs; +-#ifdef __cplusplus +-extern "C" bool_t xdr_desargs(XDR *, desargs*); +-#elif __STDC__ +-extern bool_t xdr_desargs(XDR *, desargs*); +-#else /* Old Style C */ +-bool_t xdr_desargs(); +-#endif /* Old Style C */ +- +- +-struct desresp { +- struct { +- u_int desbuf_len; +- char *desbuf_val; +- } desbuf; +- u_char des_ivec[8]; +- int stat; +-}; +-typedef struct desresp desresp; +-#ifdef __cplusplus +-extern "C" bool_t xdr_desresp(XDR *, desresp*); +-#elif __STDC__ +-extern bool_t xdr_desresp(XDR *, desresp*); +-#else /* Old Style C */ +-bool_t xdr_desresp(); +-#endif /* Old Style C */ +- +- +-#define CRYPT_PROG ((u_int32_t)600100029) +-#define CRYPT_VERS ((u_int32_t)1) +- +-#ifdef __cplusplus +-#define DES_CRYPT ((u_int32_t)1) +-extern "C" desresp * des_crypt_1(desargs *, CLIENT *); +-extern "C" desresp * des_crypt_1_svc(desargs *, struct svc_req *); +- +-#elif __STDC__ +-#define DES_CRYPT ((u_int32_t)1) +-extern desresp * des_crypt_1(desargs *, CLIENT *); +-extern desresp * des_crypt_1_svc(desargs *, struct svc_req *); +- +-#else /* Old Style C */ +-#define DES_CRYPT ((u_int32_t)1) +-extern desresp * des_crypt_1(); +-extern desresp * des_crypt_1_svc(); +-#endif /* Old Style C */ +- +-#endif /* !_CRYPT_H_RPCGEN */ +-- +1.7.9.5 + diff --git a/package/libtirpc/libtirpc-0010-Add-more-XDR-files-needed-to-build-rpcbind-on-top-of.patch b/package/libtirpc/libtirpc-0010-Add-more-XDR-files-needed-to-build-rpcbind-on-top-of.patch new file mode 100644 index 0000000000..360a27f833 --- /dev/null +++ b/package/libtirpc/libtirpc-0010-Add-more-XDR-files-needed-to-build-rpcbind-on-top-of.patch @@ -0,0 +1,1649 @@ +From 52aecb645b2e45d120a941f42fdbe193e22c27e1 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 10 Nov 2012 17:45:03 +0100 +Subject: [PATCH] Add more XDR files needed to build rpcbind on top of + libtirpc + +Signed-off-by: Thomas Petazzoni +--- + Makefile.am | 6 + + tirpc/rpcsvc/mount.x | 257 ++++++++++ + tirpc/rpcsvc/nfs_prot.x | 1266 +++++++++++++++++++++++++++++++++++++++++++++++ + tirpc/rpcsvc/rquota.x | 67 +++ + 4 files changed, 1596 insertions(+) + create mode 100644 tirpc/rpcsvc/mount.x + create mode 100644 tirpc/rpcsvc/nfs_prot.x + create mode 100644 tirpc/rpcsvc/rquota.x + +diff --git a/Makefile.am b/Makefile.am +index 7e63f78..351c5df 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -3,10 +3,16 @@ ACLOCAL_AMFLAGS = -I m4 + + GENFILES = \ + tirpc/rpcsvc/crypt.h \ ++ tirpc/rpcsvc/mount.h \ ++ tirpc/rpcsvc/nfs_prot.h \ ++ tirpc/rpcsvc/rquota.h \ + tirpc/rpc/rpcb_prot.h + + nobase_include_HEADERS = tirpc/netconfig.h \ + tirpc/rpcsvc/crypt.x \ ++ tirpc/rpcsvc/mount.x \ ++ tirpc/rpcsvc/nfs_prot.x \ ++ tirpc/rpcsvc/rquota.x \ + tirpc/rpc/xdr.h \ + tirpc/rpc/types.h \ + tirpc/rpc/svc_soc.h \ +diff --git a/tirpc/rpcsvc/mount.x b/tirpc/rpcsvc/mount.x +new file mode 100644 +index 0000000..f68a06f +--- /dev/null ++++ b/tirpc/rpcsvc/mount.x +@@ -0,0 +1,257 @@ ++/* ++ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for ++ * unrestricted use provided that this legend is included on all tape ++ * media and as a part of the software program in whole or part. Users ++ * may copy or modify Sun RPC without charge, but are not authorized ++ * to license or distribute it to anyone else except as part of a product or ++ * program developed by the user. ++ * ++ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE ++ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR ++ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. ++ * ++ * Sun RPC is provided with no support and without any obligation on the ++ * part of Sun Microsystems, Inc. to assist in its use, correction, ++ * modification or enhancement. ++ * ++ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE ++ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC ++ * OR ANY PART THEREOF. ++ * ++ * In no event will Sun Microsystems, Inc. be liable for any lost revenue ++ * or profits or other special, indirect and consequential damages, even if ++ * Sun has been advised of the possibility of such damages. ++ * ++ * Sun Microsystems, Inc. ++ * 2550 Garcia Avenue ++ * Mountain View, California 94043 ++ */ ++ ++/* ++ * Protocol description for the mount program ++ */ ++ ++#ifndef RPC_HDR ++%#ifndef lint ++%/*static char sccsid[] = "from: @(#)mount.x 1.2 87/09/18 Copyr 1987 Sun Micro";*/ ++%/*static char sccsid[] = "from: @(#)mount.x 2.1 88/08/01 4.0 RPCSRC";*/ ++%static const char rcsid[] = ++% "$FreeBSD: src/include/rpcsvc/mount.x,v 1.6 1999/08/27 23:45:08 peter Exp $"; ++%#endif /* not lint */ ++#endif ++ ++const MNTPATHLEN = 1024; /* maximum bytes in a pathname argument */ ++const MNTNAMLEN = 255; /* maximum bytes in a name argument */ ++const FHSIZE = 32; /* size in bytes of a file handle */ ++#ifdef WANT_NFS3 ++const FHSIZE3 = 64; /* size in bytes of a file handle (v3) */ ++#endif ++ ++/* ++ * The fhandle is the file handle that the server passes to the client. ++ * All file operations are done using the file handles to refer to a file ++ * or a directory. The file handle can contain whatever information the ++ * server needs to distinguish an individual file. ++ */ ++typedef opaque fhandle[FHSIZE]; ++#ifdef WANT_NFS3 ++typedef opaque fhandle3; ++#endif ++ ++/* ++ * If a status of zero is returned, the call completed successfully, and ++ * a file handle for the directory follows. A non-zero status indicates ++ * some sort of error. The status corresponds with UNIX error numbers. ++ */ ++union fhstatus switch (unsigned fhs_status) { ++case 0: ++ fhandle fhs_fhandle; ++default: ++ void; ++}; ++ ++#ifdef WANT_NFS3 ++/* ++ * Status codes returned by the version 3 mount call. ++ */ ++enum mountstat3 { ++ MNT3_OK = 0, /* no error */ ++ MNT3ERR_PERM = 1, /* Not owner */ ++ MNT3ERR_NOENT = 2, /* No such file or directory */ ++ MNT3ERR_IO = 5, /* I/O error */ ++ MNT3ERR_ACCES = 13, /* Permission denied */ ++ MNT3ERR_NOTDIR = 20, /* Not a directory */ ++ MNT3ERR_INVAL = 22, /* Invalid argument */ ++ MNT3ERR_NAMETOOLONG = 63, /* Filename too long */ ++ MNT3ERR_NOTSUPP = 10004, /* Operation not supported */ ++ MNT3ERR_SERVERFAULT = 10006 /* A failure on the server */ ++}; ++ ++struct mountres3_ok { ++ fhandle3 fhandle; ++ int auth_flavors<>; ++}; ++ ++union mountres3 switch (mountstat3 fhs_status) { ++case 0: ++ mountres3_ok mountinfo; ++default: ++ void; ++}; ++#endif ++ ++/* ++ * The type dirpath is the pathname of a directory ++ */ ++typedef string dirpath; ++ ++/* ++ * The type name is used for arbitrary names (hostnames, groupnames) ++ */ ++typedef string name; ++ ++/* ++ * A list of who has what mounted ++ */ ++typedef struct mountbody *mountlist; ++struct mountbody { ++ name ml_hostname; ++ dirpath ml_directory; ++ mountlist ml_next; ++}; ++ ++/* ++ * A list of netgroups ++ */ ++typedef struct groupnode *groups; ++struct groupnode { ++ name gr_name; ++ groups gr_next; ++}; ++ ++/* ++ * A list of what is exported and to whom ++ */ ++typedef struct exportnode *exports; ++struct exportnode { ++ dirpath ex_dir; ++ groups ex_groups; ++ exports ex_next; ++}; ++ ++program MOUNTPROG { ++ /* ++ * Version one of the mount protocol communicates with version two ++ * of the NFS protocol. Version three communicates with ++ * version three of the NFS protocol. The only connecting ++ * point is the fhandle structure, which is the same for both ++ * protocols. ++ */ ++ version MOUNTVERS { ++ /* ++ * Does no work. It is made available in all RPC services ++ * to allow server reponse testing and timing ++ */ ++ void ++ MOUNTPROC_NULL(void) = 0; ++ ++ /* ++ * If fhs_status is 0, then fhs_fhandle contains the ++ * file handle for the directory. This file handle may ++ * be used in the NFS protocol. This procedure also adds ++ * a new entry to the mount list for this client mounting ++ * the directory. ++ * Unix authentication required. ++ */ ++ fhstatus ++ MOUNTPROC_MNT(dirpath) = 1; ++ ++ /* ++ * Returns the list of remotely mounted filesystems. The ++ * mountlist contains one entry for each hostname and ++ * directory pair. ++ */ ++ mountlist ++ MOUNTPROC_DUMP(void) = 2; ++ ++ /* ++ * Removes the mount list entry for the directory ++ * Unix authentication required. ++ */ ++ void ++ MOUNTPROC_UMNT(dirpath) = 3; ++ ++ /* ++ * Removes all of the mount list entries for this client ++ * Unix authentication required. ++ */ ++ void ++ MOUNTPROC_UMNTALL(void) = 4; ++ ++ /* ++ * Returns a list of all the exported filesystems, and which ++ * machines are allowed to import it. ++ */ ++ exports ++ MOUNTPROC_EXPORT(void) = 5; ++ ++ /* ++ * Identical to MOUNTPROC_EXPORT above ++ */ ++ exports ++ MOUNTPROC_EXPORTALL(void) = 6; ++ } = 1; ++#ifdef WANT_NFS3 ++ version MOUNTVERS3 { ++ /* ++ * Does no work. It is made available in all RPC services ++ * to allow server reponse testing and timing ++ */ ++ void ++ MOUNTPROC_NULL(void) = 0; ++ ++ /* ++ * If mountres3.fhs_status is MNT3_OK, then ++ * mountres3.mountinfo contains the file handle for ++ * the directory and a list of acceptable ++ * authentication flavors. This file handle may only ++ * be used in the NFS version 3 protocol. This ++ * procedure also results in the server adding a new ++ * entry to its mount list recording that this client ++ * has mounted the directory. AUTH_UNIX authentication ++ * or better is required. ++ */ ++ mountres3 ++ MOUNTPROC_MNT(dirpath) = 1; ++ ++ /* ++ * Returns the list of remotely mounted filesystems. The ++ * mountlist contains one entry for each hostname and ++ * directory pair. ++ */ ++ mountlist ++ MOUNTPROC_DUMP(void) = 2; ++ ++ /* ++ * Removes the mount list entry for the directory ++ * Unix authentication required. ++ */ ++ void ++ MOUNTPROC_UMNT(dirpath) = 3; ++ ++ /* ++ * Removes all of the mount list entries for this client ++ * Unix authentication required. ++ */ ++ void ++ MOUNTPROC_UMNTALL(void) = 4; ++ ++ /* ++ * Returns a list of all the exported filesystems, and which ++ * machines are allowed to import it. ++ */ ++ exports ++ MOUNTPROC_EXPORT(void) = 5; ++ } = 3; ++#endif ++} = 100005; +diff --git a/tirpc/rpcsvc/nfs_prot.x b/tirpc/rpcsvc/nfs_prot.x +new file mode 100644 +index 0000000..01564f8 +--- /dev/null ++++ b/tirpc/rpcsvc/nfs_prot.x +@@ -0,0 +1,1266 @@ ++/* ++ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for ++ * unrestricted use provided that this legend is included on all tape ++ * media and as a part of the software program in whole or part. Users ++ * may copy or modify Sun RPC without charge, but are not authorized ++ * to license or distribute it to anyone else except as part of a product or ++ * program developed by the user. ++ * ++ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE ++ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR ++ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. ++ * ++ * Sun RPC is provided with no support and without any obligation on the ++ * part of Sun Microsystems, Inc. to assist in its use, correction, ++ * modification or enhancement. ++ * ++ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE ++ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC ++ * OR ANY PART THEREOF. ++ * ++ * In no event will Sun Microsystems, Inc. be liable for any lost revenue ++ * or profits or other special, indirect and consequential damages, even if ++ * Sun has been advised of the possibility of such damages. ++ * ++ * Sun Microsystems, Inc. ++ * 2550 Garcia Avenue ++ * Mountain View, California 94043 ++ */ ++ ++#ifndef RPC_HDR ++%#ifndef lint ++%/*static char sccsid[] = "from: @(#)nfs_prot.x 1.2 87/10/12 Copyr 1987 Sun Micro";*/ ++%/*static char sccsid[] = "from: @(#)nfs_prot.x 2.1 88/08/01 4.0 RPCSRC";*/ ++%static const char rcsid[] = ++% "$FreeBSD: src/include/rpcsvc/nfs_prot.x,v 1.7 1999/08/27 23:45:08 peter Exp $"; ++%#endif /* not lint */ ++#endif ++ ++const NFS_PORT = 2049; ++const NFS_MAXDATA = 8192; ++const NFS_MAXPATHLEN = 1024; ++const NFS_MAXNAMLEN = 255; ++const NFS_FHSIZE = 32; ++const NFS_COOKIESIZE = 4; ++const NFS_FIFO_DEV = -1; /* size kludge for named pipes */ ++ ++/* ++ * File types ++ */ ++const NFSMODE_FMT = 0170000; /* type of file */ ++const NFSMODE_DIR = 0040000; /* directory */ ++const NFSMODE_CHR = 0020000; /* character special */ ++const NFSMODE_BLK = 0060000; /* block special */ ++const NFSMODE_REG = 0100000; /* regular */ ++const NFSMODE_LNK = 0120000; /* symbolic link */ ++const NFSMODE_SOCK = 0140000; /* socket */ ++const NFSMODE_FIFO = 0010000; /* fifo */ ++ ++/* ++ * Error status ++ */ ++enum nfsstat { ++ NFS_OK= 0, /* no error */ ++ NFSERR_PERM=1, /* Not owner */ ++ NFSERR_NOENT=2, /* No such file or directory */ ++ NFSERR_IO=5, /* I/O error */ ++ NFSERR_NXIO=6, /* No such device or address */ ++ NFSERR_ACCES=13, /* Permission denied */ ++ NFSERR_EXIST=17, /* File exists */ ++ NFSERR_NODEV=19, /* No such device */ ++ NFSERR_NOTDIR=20, /* Not a directory*/ ++ NFSERR_ISDIR=21, /* Is a directory */ ++ NFSERR_FBIG=27, /* File too large */ ++ NFSERR_NOSPC=28, /* No space left on device */ ++ NFSERR_ROFS=30, /* Read-only file system */ ++ NFSERR_NAMETOOLONG=63, /* File name too long */ ++ NFSERR_NOTEMPTY=66, /* Directory not empty */ ++ NFSERR_DQUOT=69, /* Disc quota exceeded */ ++ NFSERR_STALE=70, /* Stale NFS file handle */ ++ NFSERR_WFLUSH=99 /* write cache flushed */ ++}; ++ ++/* ++ * File types ++ */ ++enum ftype { ++ NFNON = 0, /* non-file */ ++ NFREG = 1, /* regular file */ ++ NFDIR = 2, /* directory */ ++ NFBLK = 3, /* block special */ ++ NFCHR = 4, /* character special */ ++ NFLNK = 5, /* symbolic link */ ++ NFSOCK = 6, /* unix domain sockets */ ++ NFBAD = 7, /* unused */ ++ NFFIFO = 8 /* named pipe */ ++}; ++ ++/* ++ * File access handle ++ */ ++struct nfs_fh { ++ opaque data[NFS_FHSIZE]; ++}; ++ ++/* ++ * Timeval ++ */ ++struct nfstime { ++ unsigned seconds; ++ unsigned useconds; ++}; ++ ++ ++/* ++ * File attributes ++ */ ++struct fattr { ++ ftype type; /* file type */ ++ unsigned mode; /* protection mode bits */ ++ unsigned nlink; /* # hard links */ ++ unsigned uid; /* owner user id */ ++ unsigned gid; /* owner group id */ ++ unsigned size; /* file size in bytes */ ++ unsigned blocksize; /* prefered block size */ ++ unsigned rdev; /* special device # */ ++ unsigned blocks; /* Kb of disk used by file */ ++ unsigned fsid; /* device # */ ++ unsigned fileid; /* inode # */ ++ nfstime atime; /* time of last access */ ++ nfstime mtime; /* time of last modification */ ++ nfstime ctime; /* time of last change */ ++}; ++ ++/* ++ * File attributes which can be set ++ */ ++struct sattr { ++ unsigned mode; /* protection mode bits */ ++ unsigned uid; /* owner user id */ ++ unsigned gid; /* owner group id */ ++ unsigned size; /* file size in bytes */ ++ nfstime atime; /* time of last access */ ++ nfstime mtime; /* time of last modification */ ++}; ++ ++ ++typedef string filename; ++typedef string nfspath; ++ ++/* ++ * Reply status with file attributes ++ */ ++union attrstat switch (nfsstat status) { ++case NFS_OK: ++ fattr attributes; ++default: ++ void; ++}; ++ ++struct sattrargs { ++ nfs_fh file; ++ sattr attributes; ++}; ++ ++/* ++ * Arguments for directory operations ++ */ ++struct diropargs { ++ nfs_fh dir; /* directory file handle */ ++ filename name; /* name (up to NFS_MAXNAMLEN bytes) */ ++}; ++ ++struct diropokres { ++ nfs_fh file; ++ fattr attributes; ++}; ++ ++/* ++ * Results from directory operation ++ */ ++union diropres switch (nfsstat status) { ++case NFS_OK: ++ diropokres diropres; ++default: ++ void; ++}; ++ ++union readlinkres switch (nfsstat status) { ++case NFS_OK: ++ nfspath data; ++default: ++ void; ++}; ++ ++/* ++ * Arguments to remote read ++ */ ++struct readargs { ++ nfs_fh file; /* handle for file */ ++ unsigned offset; /* byte offset in file */ ++ unsigned count; /* immediate read count */ ++ unsigned totalcount; /* total read count (from this offset)*/ ++}; ++ ++/* ++ * Status OK portion of remote read reply ++ */ ++struct readokres { ++ fattr attributes; /* attributes, need for pagin*/ ++ opaque data; ++}; ++ ++union readres switch (nfsstat status) { ++case NFS_OK: ++ readokres reply; ++default: ++ void; ++}; ++ ++/* ++ * Arguments to remote write ++ */ ++struct writeargs { ++ nfs_fh file; /* handle for file */ ++ unsigned beginoffset; /* beginning byte offset in file */ ++ unsigned offset; /* current byte offset in file */ ++ unsigned totalcount; /* total write count (to this offset)*/ ++ opaque data; ++}; ++ ++struct createargs { ++ diropargs where; ++ sattr attributes; ++}; ++ ++struct renameargs { ++ diropargs from; ++ diropargs to; ++}; ++ ++struct linkargs { ++ nfs_fh from; ++ diropargs to; ++}; ++ ++struct symlinkargs { ++ diropargs from; ++ nfspath to; ++ sattr attributes; ++}; ++ ++ ++typedef opaque nfscookie[NFS_COOKIESIZE]; ++ ++/* ++ * Arguments to readdir ++ */ ++struct readdirargs { ++ nfs_fh dir; /* directory handle */ ++ nfscookie cookie; ++ unsigned count; /* number of directory bytes to read */ ++}; ++ ++struct entry { ++ unsigned fileid; ++ filename name; ++ nfscookie cookie; ++ entry *nextentry; ++}; ++ ++struct dirlist { ++ entry *entries; ++ bool eof; ++}; ++ ++union readdirres switch (nfsstat status) { ++case NFS_OK: ++ dirlist reply; ++default: ++ void; ++}; ++ ++struct statfsokres { ++ unsigned tsize; /* preferred transfer size in bytes */ ++ unsigned bsize; /* fundamental file system block size */ ++ unsigned blocks; /* total blocks in file system */ ++ unsigned bfree; /* free blocks in fs */ ++ unsigned bavail; /* free blocks avail to non-superuser */ ++}; ++ ++union statfsres switch (nfsstat status) { ++case NFS_OK: ++ statfsokres reply; ++default: ++ void; ++}; ++ ++#ifdef WANT_NFS3 ++ ++/* ++ * NFSv3 constants and types ++ */ ++const NFS3_FHSIZE = 64; /* maximum size in bytes of a file handle */ ++const NFS3_COOKIEVERFSIZE = 8; /* size of a cookie verifier for READDIR */ ++const NFS3_CREATEVERFSIZE = 8; /* size of the verifier used for CREATE */ ++const NFS3_WRITEVERFSIZE = 8; /* size of the verifier used for WRITE */ ++ ++typedef unsigned hyper uint64; ++typedef hyper int64; ++typedef unsigned long uint32; ++typedef long int32; ++typedef string filename3<>; ++typedef string nfspath3<>; ++typedef uint64 fileid3; ++typedef uint64 cookie3; ++typedef opaque cookieverf3[NFS3_COOKIEVERFSIZE]; ++typedef opaque createverf3[NFS3_CREATEVERFSIZE]; ++typedef opaque writeverf3[NFS3_WRITEVERFSIZE]; ++typedef uint32 uid3; ++typedef uint32 gid3; ++typedef uint64 size3; ++typedef uint64 offset3; ++typedef uint32 mode3; ++typedef uint32 count3; ++ ++/* ++ * Error status (v3) ++ */ ++enum nfsstat3 { ++ NFS3_OK = 0, ++ NFS3ERR_PERM = 1, ++ NFS3ERR_NOENT = 2, ++ NFS3ERR_IO = 5, ++ NFS3ERR_NXIO = 6, ++ NFS3ERR_ACCES = 13, ++ NFS3ERR_EXIST = 17, ++ NFS3ERR_XDEV = 18, ++ NFS3ERR_NODEV = 19, ++ NFS3ERR_NOTDIR = 20, ++ NFS3ERR_ISDIR = 21, ++ NFS3ERR_INVAL = 22, ++ NFS3ERR_FBIG = 27, ++ NFS3ERR_NOSPC = 28, ++ NFS3ERR_ROFS = 30, ++ NFS3ERR_MLINK = 31, ++ NFS3ERR_NAMETOOLONG = 63, ++ NFS3ERR_NOTEMPTY = 66, ++ NFS3ERR_DQUOT = 69, ++ NFS3ERR_STALE = 70, ++ NFS3ERR_REMOTE = 71, ++ NFS3ERR_BADHANDLE = 10001, ++ NFS3ERR_NOT_SYNC = 10002, ++ NFS3ERR_BAD_COOKIE = 10003, ++ NFS3ERR_NOTSUPP = 10004, ++ NFS3ERR_TOOSMALL = 10005, ++ NFS3ERR_SERVERFAULT = 10006, ++ NFS3ERR_BADTYPE = 10007, ++ NFS3ERR_JUKEBOX = 10008 ++}; ++ ++/* ++ * File types (v3) ++ */ ++enum ftype3 { ++ NF3REG = 1, /* regular file */ ++ NF3DIR = 2, /* directory */ ++ NF3BLK = 3, /* block special */ ++ NF3CHR = 4, /* character special */ ++ NF3LNK = 5, /* symbolic link */ ++ NF3SOCK = 6, /* unix domain sockets */ ++ NF3FIFO = 7 /* named pipe */ ++}; ++ ++struct specdata3 { ++ uint32 specdata1; ++ uint32 specdata2; ++}; ++ ++/* ++ * File access handle (v3) ++ */ ++struct nfs_fh3 { ++ opaque data; ++}; ++ ++/* ++ * Timeval (v3) ++ */ ++struct nfstime3 { ++ uint32 seconds; ++ uint32 nseconds; ++}; ++ ++ ++/* ++ * File attributes (v3) ++ */ ++struct fattr3 { ++ ftype3 type; /* file type */ ++ mode3 mode; /* protection mode bits */ ++ uint32 nlink; /* # hard links */ ++ uid3 uid; /* owner user id */ ++ gid3 gid; /* owner group id */ ++ size3 size; /* file size in bytes */ ++ size3 used; /* prefered block size */ ++ specdata3 rdev; /* special device # */ ++ uint64 fsid; /* device # */ ++ fileid3 fileid; /* inode # */ ++ nfstime3 atime; /* time of last access */ ++ nfstime3 mtime; /* time of last modification */ ++ nfstime3 ctime; /* time of last change */ ++}; ++ ++union post_op_attr switch (bool attributes_follow) { ++case TRUE: ++ fattr3 attributes; ++case FALSE: ++ void; ++}; ++ ++struct wcc_attr { ++ size3 size; ++ nfstime3 mtime; ++ nfstime3 ctime; ++}; ++ ++union pre_op_attr switch (bool attributes_follow) { ++case TRUE: ++ wcc_attr attributes; ++case FALSE: ++ void; ++}; ++ ++struct wcc_data { ++ pre_op_attr before; ++ post_op_attr after; ++}; ++ ++union post_op_fh3 switch (bool handle_follows) { ++case TRUE: ++ nfs_fh3 handle; ++case FALSE: ++ void; ++}; ++ ++/* ++ * File attributes which can be set (v3) ++ */ ++enum time_how { ++ DONT_CHANGE = 0, ++ SET_TO_SERVER_TIME = 1, ++ SET_TO_CLIENT_TIME = 2 ++}; ++ ++union set_mode3 switch (bool set_it) { ++case TRUE: ++ mode3 mode; ++default: ++ void; ++}; ++ ++union set_uid3 switch (bool set_it) { ++case TRUE: ++ uid3 uid; ++default: ++ void; ++}; ++ ++union set_gid3 switch (bool set_it) { ++case TRUE: ++ gid3 gid; ++default: ++ void; ++}; ++ ++union set_size3 switch (bool set_it) { ++case TRUE: ++ size3 size; ++default: ++ void; ++}; ++ ++union set_atime switch (time_how set_it) { ++case SET_TO_CLIENT_TIME: ++ nfstime3 atime; ++default: ++ void; ++}; ++ ++union set_mtime switch (time_how set_it) { ++case SET_TO_CLIENT_TIME: ++ nfstime3 mtime; ++default: ++ void; ++}; ++ ++struct sattr3 { ++ set_mode3 mode; ++ set_uid3 uid; ++ set_gid3 gid; ++ set_size3 size; ++ set_atime atime; ++ set_mtime mtime; ++}; ++ ++/* ++ * Arguments for directory operations (v3) ++ */ ++struct diropargs3 { ++ nfs_fh3 dir; /* directory file handle */ ++ filename3 name; /* name (up to NFS_MAXNAMLEN bytes) */ ++}; ++ ++/* ++ * Arguments to getattr (v3). ++ */ ++struct GETATTR3args { ++ nfs_fh3 object; ++}; ++ ++struct GETATTR3resok { ++ fattr3 obj_attributes; ++}; ++ ++union GETATTR3res switch (nfsstat3 status) { ++case NFS3_OK: ++ GETATTR3resok resok; ++default: ++ void; ++}; ++ ++/* ++ * Arguments to setattr (v3). ++ */ ++union sattrguard3 switch (bool check) { ++case TRUE: ++ nfstime3 obj_ctime; ++case FALSE: ++ void; ++}; ++ ++struct SETATTR3args { ++ nfs_fh3 object; ++ sattr3 new_attributes; ++ sattrguard3 guard; ++}; ++ ++struct SETATTR3resok { ++ wcc_data obj_wcc; ++}; ++ ++struct SETATTR3resfail { ++ wcc_data obj_wcc; ++}; ++ ++union SETATTR3res switch (nfsstat3 status) { ++case NFS3_OK: ++ SETATTR3resok resok; ++default: ++ SETATTR3resfail resfail; ++}; ++ ++/* ++ * Arguments to lookup (v3). ++ */ ++struct LOOKUP3args { ++ diropargs3 what; ++}; ++ ++struct LOOKUP3resok { ++ nfs_fh3 object; ++ post_op_attr obj_attributes; ++ post_op_attr dir_attributes; ++}; ++ ++struct LOOKUP3resfail { ++ post_op_attr dir_attributes; ++}; ++ ++union LOOKUP3res switch (nfsstat3 status) { ++case NFS3_OK: ++ LOOKUP3resok resok; ++default: ++ LOOKUP3resfail resfail; ++}; ++ ++/* ++ * Arguments to access (v3). ++ */ ++const ACCESS3_READ = 0x0001; ++const ACCESS3_LOOKUP = 0x0002; ++const ACCESS3_MODIFY = 0x0004; ++const ACCESS3_EXTEND = 0x0008; ++const ACCESS3_DELETE = 0x0010; ++const ACCESS3_EXECUTE = 0x0020; ++ ++struct ACCESS3args { ++ nfs_fh3 object; ++ uint32 access; ++}; ++ ++struct ACCESS3resok { ++ post_op_attr obj_attributes; ++ uint32 access; ++}; ++ ++struct ACCESS3resfail { ++ post_op_attr obj_attributes; ++}; ++ ++union ACCESS3res switch (nfsstat3 status) { ++case NFS3_OK: ++ ACCESS3resok resok; ++default: ++ ACCESS3resfail resfail; ++}; ++ ++/* ++ * Arguments to readlink (v3). ++ */ ++struct READLINK3args { ++ nfs_fh3 symlink; ++}; ++ ++struct READLINK3resok { ++ post_op_attr symlink_attributes; ++ nfspath3 data; ++}; ++ ++struct READLINK3resfail { ++ post_op_attr symlink_attributes; ++}; ++ ++union READLINK3res switch (nfsstat3 status) { ++case NFS3_OK: ++ READLINK3resok resok; ++default: ++ READLINK3resfail resfail; ++}; ++ ++/* ++ * Arguments to read (v3). ++ */ ++struct READ3args { ++ nfs_fh3 file; ++ offset3 offset; ++ count3 count; ++}; ++ ++struct READ3resok { ++ post_op_attr file_attributes; ++ count3 count; ++ bool eof; ++ opaque data<>; ++}; ++ ++struct READ3resfail { ++ post_op_attr file_attributes; ++}; ++ ++/* XXX: solaris 2.6 uses ``nfsstat'' here */ ++union READ3res switch (nfsstat3 status) { ++case NFS3_OK: ++ READ3resok resok; ++default: ++ READ3resfail resfail; ++}; ++ ++/* ++ * Arguments to write (v3). ++ */ ++enum stable_how { ++ UNSTABLE = 0, ++ DATA_SYNC = 1, ++ FILE_SYNC = 2 ++}; ++ ++struct WRITE3args { ++ nfs_fh3 file; ++ offset3 offset; ++ count3 count; ++ stable_how stable; ++ opaque data<>; ++}; ++ ++struct WRITE3resok { ++ wcc_data file_wcc; ++ count3 count; ++ stable_how committed; ++ writeverf3 verf; ++}; ++ ++struct WRITE3resfail { ++ wcc_data file_wcc; ++}; ++ ++union WRITE3res switch (nfsstat3 status) { ++case NFS3_OK: ++ WRITE3resok resok; ++default: ++ WRITE3resfail resfail; ++}; ++ ++/* ++ * Arguments to create (v3). ++ */ ++enum createmode3 { ++ UNCHECKED = 0, ++ GUARDED = 1, ++ EXCLUSIVE = 2 ++}; ++ ++union createhow3 switch (createmode3 mode) { ++case UNCHECKED: ++case GUARDED: ++ sattr3 obj_attributes; ++case EXCLUSIVE: ++ createverf3 verf; ++}; ++ ++struct CREATE3args { ++ diropargs3 where; ++ createhow3 how; ++}; ++ ++struct CREATE3resok { ++ post_op_fh3 obj; ++ post_op_attr obj_attributes; ++ wcc_data dir_wcc; ++}; ++ ++struct CREATE3resfail { ++ wcc_data dir_wcc; ++}; ++ ++union CREATE3res switch (nfsstat3 status) { ++case NFS3_OK: ++ CREATE3resok resok; ++default: ++ CREATE3resfail resfail; ++}; ++ ++/* ++ * Arguments to mkdir (v3). ++ */ ++struct MKDIR3args { ++ diropargs3 where; ++ sattr3 attributes; ++}; ++ ++struct MKDIR3resok { ++ post_op_fh3 obj; ++ post_op_attr obj_attributes; ++ wcc_data dir_wcc; ++}; ++ ++struct MKDIR3resfail { ++ wcc_data dir_wcc; ++}; ++ ++union MKDIR3res switch (nfsstat3 status) { ++case NFS3_OK: ++ MKDIR3resok resok; ++default: ++ MKDIR3resfail resfail; ++}; ++ ++/* ++ * Arguments to symlink (v3). ++ */ ++struct symlinkdata3 { ++ sattr3 symlink_attributes; ++ nfspath3 symlink_data; ++}; ++ ++struct SYMLINK3args { ++ diropargs3 where; ++ symlinkdata3 symlink; ++}; ++ ++struct SYMLINK3resok { ++ post_op_fh3 obj; ++ post_op_attr obj_attributes; ++ wcc_data dir_wcc; ++}; ++ ++struct SYMLINK3resfail { ++ wcc_data dir_wcc; ++}; ++ ++union SYMLINK3res switch (nfsstat3 status) { ++case NFS3_OK: ++ SYMLINK3resok resok; ++default: ++ SYMLINK3resfail resfail; ++}; ++ ++/* ++ * Arguments to mknod (v3). ++ */ ++struct devicedata3 { ++ sattr3 dev_attributes; ++ specdata3 spec; ++}; ++ ++union mknoddata3 switch (ftype3 type) { ++case NF3CHR: ++case NF3BLK: ++ devicedata3 device; ++case NF3SOCK: ++case NF3FIFO: ++ sattr3 pipe_attributes; ++default: ++ void; ++}; ++ ++struct MKNOD3args { ++ diropargs3 where; ++ mknoddata3 what; ++}; ++ ++struct MKNOD3resok { ++ post_op_fh3 obj; ++ post_op_attr obj_attributes; ++ wcc_data dir_wcc; ++}; ++ ++struct MKNOD3resfail { ++ wcc_data dir_wcc; ++}; ++ ++union MKNOD3res switch (nfsstat3 status) { ++case NFS3_OK: ++ MKNOD3resok resok; ++default: ++ MKNOD3resfail resfail; ++}; ++ ++/* ++ * Arguments to remove (v3). ++ */ ++struct REMOVE3args { ++ diropargs3 object; ++}; ++ ++struct REMOVE3resok { ++ wcc_data dir_wcc; ++}; ++ ++struct REMOVE3resfail { ++ wcc_data dir_wcc; ++}; ++ ++union REMOVE3res switch (nfsstat3 status) { ++case NFS3_OK: ++ REMOVE3resok resok; ++default: ++ REMOVE3resfail resfail; ++}; ++ ++/* ++ * Arguments to rmdir (v3). ++ */ ++struct RMDIR3args { ++ diropargs3 object; ++}; ++ ++struct RMDIR3resok { ++ wcc_data dir_wcc; ++}; ++ ++struct RMDIR3resfail { ++ wcc_data dir_wcc; ++}; ++ ++union RMDIR3res switch (nfsstat3 status) { ++case NFS3_OK: ++ RMDIR3resok resok; ++default: ++ RMDIR3resfail resfail; ++}; ++ ++/* ++ * Arguments to rename (v3). ++ */ ++struct RENAME3args { ++ diropargs3 from; ++ diropargs3 to; ++}; ++ ++struct RENAME3resok { ++ wcc_data fromdir_wcc; ++ wcc_data todir_wcc; ++}; ++ ++struct RENAME3resfail { ++ wcc_data fromdir_wcc; ++ wcc_data todir_wcc; ++}; ++ ++union RENAME3res switch (nfsstat3 status) { ++case NFS3_OK: ++ RENAME3resok resok; ++default: ++ RENAME3resfail resfail; ++}; ++ ++/* ++ * Arguments to link (v3). ++ */ ++struct LINK3args { ++ nfs_fh3 file; ++ diropargs3 link; ++}; ++ ++struct LINK3resok { ++ post_op_attr file_attributes; ++ wcc_data linkdir_wcc; ++}; ++ ++struct LINK3resfail { ++ post_op_attr file_attributes; ++ wcc_data linkdir_wcc; ++}; ++ ++union LINK3res switch (nfsstat3 status) { ++case NFS3_OK: ++ LINK3resok resok; ++default: ++ LINK3resfail resfail; ++}; ++ ++/* ++ * Arguments to readdir (v3). ++ */ ++struct READDIR3args { ++ nfs_fh3 dir; ++ cookie3 cookie; ++ cookieverf3 cookieverf; ++ count3 count; ++}; ++ ++struct entry3 { ++ fileid3 fileid; ++ filename3 name; ++ cookie3 cookie; ++ entry3 *nextentry; ++}; ++ ++struct dirlist3 { ++ entry3 *entries; ++ bool eof; ++}; ++ ++struct READDIR3resok { ++ post_op_attr dir_attributes; ++ cookieverf3 cookieverf; ++ dirlist3 reply; ++}; ++ ++struct READDIR3resfail { ++ post_op_attr dir_attributes; ++}; ++ ++union READDIR3res switch (nfsstat3 status) { ++case NFS3_OK: ++ READDIR3resok resok; ++default: ++ READDIR3resfail resfail; ++}; ++ ++/* ++ * Arguments to readdirplus (v3). ++ */ ++struct READDIRPLUS3args { ++ nfs_fh3 dir; ++ cookie3 cookie; ++ cookieverf3 cookieverf; ++ count3 dircount; ++ count3 maxcount; ++}; ++ ++struct entryplus3 { ++ fileid3 fileid; ++ filename3 name; ++ cookie3 cookie; ++ post_op_attr name_attributes; ++ post_op_fh3 name_handle; ++ entryplus3 *nextentry; ++}; ++ ++struct dirlistplus3 { ++ entryplus3 *entries; ++ bool eof; ++}; ++ ++struct READDIRPLUS3resok { ++ post_op_attr dir_attributes; ++ cookieverf3 cookieverf; ++ dirlistplus3 reply; ++}; ++ ++struct READDIRPLUS3resfail { ++ post_op_attr dir_attributes; ++}; ++ ++union READDIRPLUS3res switch (nfsstat3 status) { ++case NFS3_OK: ++ READDIRPLUS3resok resok; ++default: ++ READDIRPLUS3resfail resfail; ++}; ++ ++/* ++ * Arguments to fsstat (v3). ++ */ ++struct FSSTAT3args { ++ nfs_fh3 fsroot; ++}; ++ ++struct FSSTAT3resok { ++ post_op_attr obj_attributes; ++ size3 tbytes; ++ size3 fbytes; ++ size3 abytes; ++ size3 tfiles; ++ size3 ffiles; ++ size3 afiles; ++ uint32 invarsec; ++}; ++ ++struct FSSTAT3resfail { ++ post_op_attr obj_attributes; ++}; ++ ++union FSSTAT3res switch (nfsstat3 status) { ++case NFS3_OK: ++ FSSTAT3resok resok; ++default: ++ FSSTAT3resfail resfail; ++}; ++ ++/* ++ * Arguments to fsinfo (v3). ++ */ ++const FSF3_LINK = 0x0001; ++const FSF3_SYMLINK = 0x0002; ++const FSF3_HOMOGENEOUS = 0x0008; ++const FSF3_CANSETTIME = 0x0010; ++ ++struct FSINFO3args { ++ nfs_fh3 fsroot; ++}; ++ ++struct FSINFO3resok { ++ post_op_attr obj_attributes; ++ uint32 rtmax; ++ uint32 rtpref; ++ uint32 rtmult; ++ uint32 wtmax; ++ uint32 wtpref; ++ uint32 wtmult; ++ uint32 dtpref; ++ size3 maxfilesize; ++ nfstime3 time_delta; ++ uint32 properties; ++}; ++ ++struct FSINFO3resfail { ++ post_op_attr obj_attributes; ++}; ++ ++union FSINFO3res switch (nfsstat3 status) { ++case NFS3_OK: ++ FSINFO3resok resok; ++default: ++ FSINFO3resfail resfail; ++}; ++ ++/* ++ * Arguments to pathconf (v3). ++ */ ++struct PATHCONF3args { ++ nfs_fh3 object; ++}; ++ ++struct PATHCONF3resok { ++ post_op_attr obj_attributes; ++ uint32 linkmax; ++ uint32 name_max; ++ bool no_trunc; ++ bool chown_restricted; ++ bool case_insensitive; ++ bool case_preserving; ++}; ++ ++struct PATHCONF3resfail { ++ post_op_attr obj_attributes; ++}; ++ ++union PATHCONF3res switch (nfsstat3 status) { ++case NFS3_OK: ++ PATHCONF3resok resok; ++default: ++ PATHCONF3resfail resfail; ++}; ++ ++/* ++ * Arguments to commit (v3). ++ */ ++struct COMMIT3args { ++ nfs_fh3 file; ++ offset3 offset; ++ count3 count; ++}; ++ ++struct COMMIT3resok { ++ wcc_data file_wcc; ++ writeverf3 verf; ++}; ++ ++struct COMMIT3resfail { ++ wcc_data file_wcc; ++}; ++ ++union COMMIT3res switch (nfsstat3 status) { ++case NFS3_OK: ++ COMMIT3resok resok; ++default: ++ COMMIT3resfail resfail; ++}; ++ ++#endif /* WANT_NFS3 */ ++ ++/* ++ * Remote file service routines ++ */ ++program NFS_PROGRAM { ++ version NFS_VERSION { ++ void ++ NFSPROC_NULL(void) = 0; ++ ++ attrstat ++ NFSPROC_GETATTR(nfs_fh) = 1; ++ ++ attrstat ++ NFSPROC_SETATTR(sattrargs) = 2; ++ ++ void ++ NFSPROC_ROOT(void) = 3; ++ ++ diropres ++ NFSPROC_LOOKUP(diropargs) = 4; ++ ++ readlinkres ++ NFSPROC_READLINK(nfs_fh) = 5; ++ ++ readres ++ NFSPROC_READ(readargs) = 6; ++ ++ void ++ NFSPROC_WRITECACHE(void) = 7; ++ ++ attrstat ++ NFSPROC_WRITE(writeargs) = 8; ++ ++ diropres ++ NFSPROC_CREATE(createargs) = 9; ++ ++ nfsstat ++ NFSPROC_REMOVE(diropargs) = 10; ++ ++ nfsstat ++ NFSPROC_RENAME(renameargs) = 11; ++ ++ nfsstat ++ NFSPROC_LINK(linkargs) = 12; ++ ++ nfsstat ++ NFSPROC_SYMLINK(symlinkargs) = 13; ++ ++ diropres ++ NFSPROC_MKDIR(createargs) = 14; ++ ++ nfsstat ++ NFSPROC_RMDIR(diropargs) = 15; ++ ++ readdirres ++ NFSPROC_READDIR(readdirargs) = 16; ++ ++ statfsres ++ NFSPROC_STATFS(nfs_fh) = 17; ++ } = 2; ++} = 100003; ++#ifdef WANT_NFS3 ++program NFS3_PROGRAM { ++ version NFS_V3 { ++ void ++ NFSPROC3_NULL(void) = 0; ++ ++ GETATTR3res ++ NFSPROC3_GETATTR(GETATTR3args) = 1; ++ ++ SETATTR3res ++ NFSPROC3_SETATTR(SETATTR3args) = 2; ++ ++ LOOKUP3res ++ NFSPROC3_LOOKUP(LOOKUP3args) = 3; ++ ++ ACCESS3res ++ NFSPROC3_ACCESS(ACCESS3args) = 4; ++ ++ READLINK3res ++ NFSPROC3_READLINK(READLINK3args) = 5; ++ ++ READ3res ++ NFSPROC3_READ(READ3args) = 6; ++ ++ WRITE3res ++ NFSPROC3_WRITE(WRITE3args) = 7; ++ ++ CREATE3res ++ NFSPROC3_CREATE(CREATE3args) = 8; ++ ++ MKDIR3res ++ NFSPROC3_MKDIR(MKDIR3args) = 9; ++ ++ SYMLINK3res ++ NFSPROC3_SYMLINK(SYMLINK3args) = 10; ++ ++ MKNOD3res ++ NFSPROC3_MKNOD(MKNOD3args) = 11; ++ ++ REMOVE3res ++ NFSPROC3_REMOVE(REMOVE3args) = 12; ++ ++ RMDIR3res ++ NFSPROC3_RMDIR(RMDIR3args) = 13; ++ ++ RENAME3res ++ NFSPROC3_RENAME(RENAME3args) = 14; ++ ++ LINK3res ++ NFSPROC3_LINK(LINK3args) = 15; ++ ++ READDIR3res ++ NFSPROC3_READDIR(READDIR3args) = 16; ++ ++ READDIRPLUS3res ++ NFSPROC3_READDIRPLUS(READDIRPLUS3args) = 17; ++ ++ FSSTAT3res ++ NFSPROC3_FSSTAT(FSSTAT3args) = 18; ++ ++ FSINFO3res ++ NFSPROC3_FSINFO(FSINFO3args) = 19; ++ ++ PATHCONF3res ++ NFSPROC3_PATHCONF(PATHCONF3args) = 20; ++ ++ COMMIT3res ++ NFSPROC3_COMMIT(COMMIT3args) = 21; ++ } = 3; ++} = 100003; ++#endif ++ +diff --git a/tirpc/rpcsvc/rquota.x b/tirpc/rpcsvc/rquota.x +new file mode 100644 +index 0000000..72864d1 +--- /dev/null ++++ b/tirpc/rpcsvc/rquota.x +@@ -0,0 +1,67 @@ ++/* ++ * Remote quota protocol ++ * Requires unix authentication ++ */ ++ ++#ifndef RPC_HDR ++%#ifndef lint ++%/*static char sccsid[] = "from: @(#)rquota.x 1.2 87/09/20 Copyr 1987 Sun Micro";*/ ++%/*static char sccsid[] = "from: @(#)rquota.x 2.1 88/08/01 4.0 RPCSRC";*/ ++%static const char rcsid[] = ++% "$FreeBSD: src/include/rpcsvc/rquota.x,v 1.6 1999/08/27 23:45:10 peter Exp $"; ++%#endif /* not lint */ ++#endif ++ ++const RQ_PATHLEN = 1024; ++ ++struct getquota_args { ++ string gqa_pathp; /* path to filesystem of interest */ ++ int gqa_uid; /* inquire about quota for uid */ ++}; ++ ++/* ++ * remote quota structure ++ */ ++struct rquota { ++ int rq_bsize; /* block size for block counts */ ++ bool rq_active; /* indicates whether quota is active */ ++ unsigned int rq_bhardlimit; /* absolute limit on disk blks alloc */ ++ unsigned int rq_bsoftlimit; /* preferred limit on disk blks */ ++ unsigned int rq_curblocks; /* current block count */ ++ unsigned int rq_fhardlimit; /* absolute limit on allocated files */ ++ unsigned int rq_fsoftlimit; /* preferred file limit */ ++ unsigned int rq_curfiles; /* current # allocated files */ ++ unsigned int rq_btimeleft; /* time left for excessive disk use */ ++ unsigned int rq_ftimeleft; /* time left for excessive files */ ++}; ++ ++enum gqr_status { ++ Q_OK = 1, /* quota returned */ ++ Q_NOQUOTA = 2, /* noquota for uid */ ++ Q_EPERM = 3 /* no permission to access quota */ ++}; ++ ++union getquota_rslt switch (gqr_status status) { ++case Q_OK: ++ rquota gqr_rquota; /* valid if status == Q_OK */ ++case Q_NOQUOTA: ++ void; ++case Q_EPERM: ++ void; ++}; ++ ++program RQUOTAPROG { ++ version RQUOTAVERS { ++ /* ++ * Get all quotas ++ */ ++ getquota_rslt ++ RQUOTAPROC_GETQUOTA(getquota_args) = 1; ++ ++ /* ++ * Get active quotas only ++ */ ++ getquota_rslt ++ RQUOTAPROC_GETACTIVEQUOTA(getquota_args) = 2; ++ } = 1; ++} = 100011; +-- +1.7.9.5 + diff --git a/package/libtirpc/libtirpc.mk b/package/libtirpc/libtirpc.mk new file mode 100644 index 0000000000..6b9a3d2325 --- /dev/null +++ b/package/libtirpc/libtirpc.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# libtirpc +# +################################################################################ + +LIBTIRPC_VERSION = 0.2.2 +LIBTIRPC_SOURCE = libtirpc-$(LIBTIRPC_VERSION).tar.bz2 +LIBTIRPC_SITE = http://downloads.sourceforge.net/project/libtirpc/libtirpc/$(LIBTIRPC_VERSION) +LIBTIRPC_LICENSE = BSD-3c +LIBTIRPC_LICENSE_FILES = COPYING + +LIBTIRPC_INSTALL_STAGING = YES +LIBTIRPC_AUTORECONF = YES + +# getrpcby{number,name} are only provided if 'GQ' is defined +LIBTIRPC_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -DGQ" + +# We need host-pkgconf because the configure.ac contains a +# PKG_CHECK_MODULES macro call, and since we're autoreconfiguring this +# package, we need the source for this PKG_CHECK_MODULES macro, which +# comes from host-pkgconf. Other than that, pkgconf is only used to +# find if there is a gss implementation somewhere, which we don't +# support in Buildroot yet. +LIBTIRPC_DEPENDENCIES = host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/libtool/libtool-0001-mips64-n64-linking.patch b/package/libtool/libtool-0001-mips64-n64-linking.patch new file mode 100644 index 0000000000..ef9084ddb6 --- /dev/null +++ b/package/libtool/libtool-0001-mips64-n64-linking.patch @@ -0,0 +1,47 @@ +sets correct linker ABI flags on MIPS64 +http://git.savannah.gnu.org/cgit/libtool.git/commit/?id=5f7f7d9615bf650cf99d581a33b3e18357f79951 + +Signed-off-by: Vicente Olivert Riera + +diff -ru libtool-2.4.2.orig/libltdl/m4/libtool.m4 libtool-2.4.2/libltdl/m4/libtool.m4 +--- libtool-2.4.2.orig/libltdl/m4/libtool.m4 2013-11-11 11:44:30.419396295 +0000 ++++ libtool-2.4.2/libltdl/m4/libtool.m4 2013-11-11 11:44:07.055032308 +0000 +@@ -1312,6 +1312,38 @@ + rm -rf conftest* + ;; + ++mips64*-*linux*) ++ # Find out what ABI is being produced by ac_compile, and set linker ++ # options accordingly. ++ echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext ++ if AC_TRY_EVAL(ac_compile); then ++ emul=elf ++ case `/usr/bin/file conftest.$ac_objext` in ++ *32-bit*) ++ emul="${emul}32" ++ ;; ++ *64-bit*) ++ emul="${emul}64" ++ ;; ++ esac ++ case `/usr/bin/file conftest.$ac_objext` in ++ *MSB*) ++ emul="${emul}btsmip" ++ ;; ++ *LSB*) ++ emul="${emul}ltsmip" ++ ;; ++ esac ++ case `/usr/bin/file conftest.$ac_objext` in ++ *N32*) ++ emul="${emul}n32" ++ ;; ++ esac ++ LD="${LD-ld} -m $emul" ++ fi ++ rm -rf conftest* ++ ;; ++ + x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ + s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. diff --git a/package/libtool/libtool.mk b/package/libtool/libtool.mk index d796f9b46b..2f6ea7c5cf 100644 --- a/package/libtool/libtool.mk +++ b/package/libtool/libtool.mk @@ -1,18 +1,21 @@ -############################################################# +################################################################################ # # libtool # -############################################################# -LIBTOOL_VERSION = 2.2.10 -LIBTOOL_SOURCE = libtool-$(LIBTOOL_VERSION).tar.gz +################################################################################ + +LIBTOOL_VERSION = 2.4.2 +LIBTOOL_SOURCE = libtool-$(LIBTOOL_VERSION).tar.xz LIBTOOL_SITE = $(BR2_GNU_MIRROR)/libtool LIBTOOL_INSTALL_STAGING = YES +LIBTOOL_LICENSE = GPLv2+ +LIBTOOL_LICENSE_FILES = COPYING HOST_LIBTOOL_LIBTOOL_PATCH = NO -$(eval $(call AUTOTARGETS,package,libtool)) -$(eval $(call AUTOTARGETS,package,libtool,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) # variables used by other packages -LIBTOOL:=$(HOST_DIR)/usr/bin/libtool -LIBTOOLIZE:=$(HOST_DIR)/usr/bin/libtoolize +LIBTOOL = $(HOST_DIR)/usr/bin/libtool +LIBTOOLIZE = $(HOST_DIR)/usr/bin/libtoolize diff --git a/package/libtorrent/Config.in b/package/libtorrent/Config.in new file mode 100644 index 0000000000..a7e358d1dd --- /dev/null +++ b/package/libtorrent/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBTORRENT + bool "libtorrent" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBSIGC + help + BitTorrent library written in C++ for *nix + + http://libtorrent.rakshasa.no/ + +comment "libtorrent needs a toolchain w/ C++, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libtorrent/libtorrent-cross_compile.patch b/package/libtorrent/libtorrent-cross_compile.patch new file mode 100644 index 0000000000..f86f289351 --- /dev/null +++ b/package/libtorrent/libtorrent-cross_compile.patch @@ -0,0 +1,39 @@ +Fix cross compilation, based on OpenWRT patch. + +Signed-off-by: Gustavo Zacarias + +diff -Nura libtorrent-0.13.3.orig/configure.ac libtorrent-0.13.3/configure.ac +--- libtorrent-0.13.3.orig/configure.ac 2012-10-31 07:38:59.345752076 -0300 ++++ libtorrent-0.13.3/configure.ac 2012-10-31 07:39:06.454799361 -0300 +@@ -19,7 +19,6 @@ + + AM_INIT_AUTOMAKE + AM_CONFIG_HEADER(config.h) +-AM_PATH_CPPUNIT(1.9.6) + + AC_PROG_CXX + +diff -Nura libtorrent-0.13.3.orig/scripts/checks.m4 libtorrent-0.13.3/scripts/checks.m4 +--- libtorrent-0.13.3.orig/scripts/checks.m4 2012-10-31 07:38:59.342752057 -0300 ++++ libtorrent-0.13.3/scripts/checks.m4 2012-10-31 07:39:06.454799361 -0300 +@@ -96,7 +96,7 @@ + AC_DEFUN([TORRENT_CHECK_KQUEUE_SOCKET_ONLY], [ + AC_MSG_CHECKING(whether kqueue supports pipes and ptys) + +- AC_RUN_IFELSE([AC_LANG_SOURCE([ ++ AC_LINK_IFELSE([AC_LANG_SOURCE([ + #include + #include + #include +diff -Nura libtorrent-0.13.3.orig/scripts/common.m4 libtorrent-0.13.3/scripts/common.m4 +--- libtorrent-0.13.3.orig/scripts/common.m4 2012-10-31 07:38:59.342752057 -0300 ++++ libtorrent-0.13.3/scripts/common.m4 2012-10-31 07:39:32.550972826 -0300 +@@ -223,7 +223,7 @@ + AC_DEFUN([TORRENT_CHECK_EXECINFO], [ + AC_MSG_CHECKING(for execinfo.h) + +- AC_RUN_IFELSE([AC_LANG_SOURCE([ ++ AC_LINK_IFELSE([AC_LANG_SOURCE([ + #include + int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;} + ])], diff --git a/package/libtorrent/libtorrent.mk b/package/libtorrent/libtorrent.mk new file mode 100644 index 0000000000..9d0f8f893f --- /dev/null +++ b/package/libtorrent/libtorrent.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# libtorrent +# +################################################################################ + +LIBTORRENT_VERSION = 0.13.3 +LIBTORRENT_SITE = http://libtorrent.rakshasa.no/downloads +LIBTORRENT_DEPENDENCIES = host-pkgconf libsigc \ + $(if $(BR2_PACKAGE_OPENSSL),openssl) +LIBTORRENT_CONF_OPT = --enable-aligned \ + $(if $(BR2_PACKAGE_OPENSSL),--enable-openssl,--disable-openssl) +LIBTORRENT_INSTALL_STAGING = YES +LIBTORRENT_AUTORECONF = YES +LIBTORRENT_LICENSE = GPLv2 +LIBTORRENT_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libtpl/Config.in b/package/libtpl/Config.in new file mode 100644 index 0000000000..0286e033d6 --- /dev/null +++ b/package/libtpl/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBTPL + bool "libtpl" + help + Easily store and retrieve binary data in C + + http://troydhanson.github.io/tpl/ diff --git a/package/libtpl/libtpl.mk b/package/libtpl/libtpl.mk new file mode 100644 index 0000000000..478b2989c0 --- /dev/null +++ b/package/libtpl/libtpl.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# libtpl +# +################################################################################ + +LIBTPL_VERSION = 445b4e9f236a48e274eaace31acf56d700da142a +LIBTPL_SITE = http://github.com/troydhanson/tpl/tarball/$(LIBTPL_VERSION) +LIBTPL_INSTALL_STAGING = YES +LIBTPL_LICENSE = BSD-like +LIBTPL_LICENSE_FILES = LICENSE + +LIBTPL_AUTORECONF = YES +LIBTPL_AUTORECONF_OPT = --install --force + +define LIBTPL_CREATE_MISSING_FILES + touch $(@D)/NEWS $(@D)/AUTHORS $(@D)/ChangeLog $(@D)/COPYING +endef +LIBTPL_POST_EXTRACT_HOOKS += LIBTPL_CREATE_MISSING_FILES + +$(eval $(autotools-package)) diff --git a/package/libungif/libungif.mk b/package/libungif/libungif.mk index d8dc814e4e..019a489737 100644 --- a/package/libungif/libungif.mk +++ b/package/libungif/libungif.mk @@ -1,15 +1,16 @@ -############################################################# +################################################################################ # # libungif # -############################################################# -LIBUNGIF_VERSION:=4.1.4 -LIBUNGIF_SOURCE:=libungif-$(LIBUNGIF_VERSION).tar.bz2 -LIBUNGIF_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/giflib -LIBUNGIF_INSTALL_STAGING = YES -LIBUNGIF_INSTALL_TARGET = YES +################################################################################ +LIBUNGIF_VERSION = 4.1.4 +LIBUNGIF_SOURCE = libungif-$(LIBUNGIF_VERSION).tar.bz2 +LIBUNGIF_SITE = http://downloads.sourceforge.net/project/giflib/libungif-4.x/libungif-$(LIBUNGIF_VERSION) +LIBUNGIF_INSTALL_STAGING = YES LIBUNGIF_CONF_OPT = --without-x +LIBUNGIF_LICENSE = MIT +LIBUNGIF_LICENSE_FILES = COPYING LIBUNGIF_BINS = gif2epsn gif2ps gif2rgb gif2x11 gifasm gifbg gifburst gifclip \ gifclrmp gifcolor gifcomb gifcompose giffiltr giffix gifflip \ @@ -23,4 +24,4 @@ endef LIBUNGIF_POST_INSTALL_TARGET_HOOKS += LIBUNGIF_BINS_CLEANUP -$(eval $(call AUTOTARGETS,package,libungif)) +$(eval $(autotools-package)) diff --git a/package/libunwind/Config.in b/package/libunwind/Config.in new file mode 100644 index 0000000000..9b5582692f --- /dev/null +++ b/package/libunwind/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LIBUNWIND + bool "libunwind" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_arm || BR2_armeb || BR2_mips || BR2_mipsel || BR2_mips64 || \ + BR2_mips64el || BR2_powerpc || BR2_sh || BR2_sh64 || BR2_i386 || BR2_x86_64 + help + C API to determine the call-chain of a program. + + http://www.nongnu.org/libunwind/index.html + +comment "libunwind needs a toolchain w/ threads" + depends on BR2_arm || BR2_armeb || BR2_mips || BR2_mipsel || BR2_mips64 || \ + BR2_mips64el || BR2_powerpc || BR2_sh || BR2_sh64 || BR2_i386 || BR2_x86_64 + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libunwind/libunwind-disable-tests.patch b/package/libunwind/libunwind-disable-tests.patch new file mode 100644 index 0000000000..05475a5d6c --- /dev/null +++ b/package/libunwind/libunwind-disable-tests.patch @@ -0,0 +1,32 @@ +Disable building of tests + +libunwind tests do not build with uClibc, so we disable them. + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile.am +=================================================================== +--- a/Makefile.am ++++ b/Makefile.am +@@ -36,7 +36,7 @@ + + nodist_include_HEADERS = include/libunwind-common.h + +-SUBDIRS = src tests doc ++SUBDIRS = src doc + + noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \ + include/compiler.h include/libunwind_i.h include/mempool.h \ +Index: b/Makefile.in +=================================================================== +--- a/Makefile.in ++++ b/Makefile.in +@@ -313,7 +313,7 @@ + $(am__append_7) $(am__append_8) $(am__append_9) \ + $(am__append_10) + nodist_include_HEADERS = include/libunwind-common.h +-SUBDIRS = src tests doc ++SUBDIRS = src doc + noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \ + include/compiler.h include/libunwind_i.h include/mempool.h \ + include/remote.h \ diff --git a/package/libunwind/libunwind.mk b/package/libunwind/libunwind.mk new file mode 100644 index 0000000000..f573722f90 --- /dev/null +++ b/package/libunwind/libunwind.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# libunwind +# +################################################################################ + +LIBUNWIND_VERSION = 1.1 +LIBUNWIND_SITE = http://download.savannah.gnu.org/releases/libunwind +LIBUNWIND_INSTALL_STAGING = YES +LIBUNWIND_LICENSE_FILES = COPYING +LIBUNWIND_LICENSE = MIT + +$(eval $(autotools-package)) diff --git a/package/libupnp/Config.in b/package/libupnp/Config.in index 2e6edcdb5a..5c94879c5e 100644 --- a/package/libupnp/Config.in +++ b/package/libupnp/Config.in @@ -1,6 +1,7 @@ config BR2_PACKAGE_LIBUPNP bool "libupnp" depends on BR2_LARGEFILE + depends on BR2_TOOLCHAIN_HAS_THREADS help The portable SDK for UPnP(tm) Devices (libupnp) provides developers with an API and open source code for building control points, @@ -9,5 +10,5 @@ config BR2_PACKAGE_LIBUPNP http://pupnp.sourceforge.net/ -comment "libupnp requires a toolchain with LARGEFILE support" - depends on !BR2_LARGEFILE +comment "libupnp needs a toolchain w/ largefile, threads" + depends on !(BR2_LARGEFILE && BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/libupnp/libupnp-1.6.6-remove-sys_timeb.h.patch b/package/libupnp/libupnp-1.6.6-remove-sys_timeb.h.patch deleted file mode 100644 index e425392449..0000000000 --- a/package/libupnp/libupnp-1.6.6-remove-sys_timeb.h.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -urN libupnp-1.6.6-0rig/configure libupnp-1.6.6/configure ---- libupnp-1.6.6-0rig/configure 2008-04-25 13:47:24.000000000 +0200 -+++ libupnp-1.6.6/configure 2009-01-14 21:55:16.000000000 +0100 -@@ -21096,7 +21096,6 @@ - sys/ioctl.h \ - sys/socket.h \ - sys/time.h \ -- sys/timeb.h \ - syslog.h \ - unistd.h \ - diff --git a/package/libupnp/libupnp.mk b/package/libupnp/libupnp.mk index 1bd0356347..b98b9f439b 100644 --- a/package/libupnp/libupnp.mk +++ b/package/libupnp/libupnp.mk @@ -1,14 +1,15 @@ -############################################################# +################################################################################ # # libupnp # -############################################################# -LIBUPNP_VERSION:=1.6.6 -LIBUPNP_SOURCE:=libupnp-$(LIBUPNP_VERSION).tar.bz2 -LIBUPNP_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/pupnp +################################################################################ +LIBUPNP_VERSION = 1.6.18 +LIBUPNP_SOURCE = libupnp-$(LIBUPNP_VERSION).tar.bz2 +LIBUPNP_SITE = http://downloads.sourceforge.net/project/pupnp/pupnp/libUPnP%20$(LIBUPNP_VERSION) LIBUPNP_CONF_ENV = ac_cv_lib_compat_ftime=no +LIBUPNP_INSTALL_STAGING = YES +LIBUPNP_LICENSE = BSD-3c +LIBUPNP_LICENSE_FILES = LICENSE -LIBUPNP_INSTALL_STAGING:=YES - -$(eval $(call AUTOTARGETS,package,libupnp)) +$(eval $(autotools-package)) diff --git a/package/liburcu/Config.in b/package/liburcu/Config.in new file mode 100644 index 0000000000..de53495be6 --- /dev/null +++ b/package/liburcu/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_LIBURCU + bool "liburcu" + depends on BR2_arm || BR2_armeb || BR2_i386 || BR2_powerpc || BR2_x86_64 + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Userspace implementation of the Read-Copy-Update (RCU) + synchronization mechanism. This library is mainly used by + the LTTng tracing infrastructure, but can be used for other + purposes as well. + + http://lttng.org/urcu + +comment "liburcu needs a toolchain w/ threads" + depends on BR2_arm || BR2_armeb || BR2_i386 || BR2_powerpc || BR2_x86_64 + depends on !BR2_TOOLCHAIN_HAS_THREADS + diff --git a/package/liburcu/liburcu.mk b/package/liburcu/liburcu.mk new file mode 100644 index 0000000000..a586382cf6 --- /dev/null +++ b/package/liburcu/liburcu.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# liburcu +# +################################################################################ + +LIBURCU_VERSION = 0.7.7 +LIBURCU_SITE = http://lttng.org/files/urcu/ +LIBURCU_SOURCE = userspace-rcu-$(LIBURCU_VERSION).tar.bz2 +LIBURCU_LICENSE = LGPLv2.1+ for the library; MIT-like license for few source files listed in LICENSE +LIBURCU_LICENSE_FILES = lgpl-2.1.txt lgpl-relicensing.txt LICENSE + +LIBURCU_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libusb-compat/libusb-compat.mk b/package/libusb-compat/libusb-compat.mk index 1668614c3b..8f2726ef13 100644 --- a/package/libusb-compat/libusb-compat.mk +++ b/package/libusb-compat/libusb-compat.mk @@ -1,21 +1,17 @@ -############################################################# +################################################################################ # # libusb-compat # -############################################################# -LIBUSB_COMPAT_VERSION = 0.1.3 +################################################################################ + +LIBUSB_COMPAT_VERSION = 0.1.4 LIBUSB_COMPAT_SOURCE = libusb-compat-$(LIBUSB_COMPAT_VERSION).tar.bz2 -LIBUSB_COMPAT_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/project/libusb/libusb-compat-0.1/libusb-compat-$(LIBUSB_COMPAT_VERSION) -LIBUSB_COMPAT_DEPENDENCIES = host-pkg-config libusb +LIBUSB_COMPAT_SITE = http://downloads.sourceforge.net/project/libusb/libusb-compat-0.1/libusb-compat-$(LIBUSB_COMPAT_VERSION) +LIBUSB_COMPAT_DEPENDENCIES = host-pkgconf libusb LIBUSB_COMPAT_INSTALL_STAGING = YES -LIBUSB_COMPAT_INSTALL_TARGET = YES - -define LIBUSB_COMPAT_FIXUP_CONFIG - $(SED) 's%prefix=/usr%prefix=$(STAGING_DIR)/usr%' \ - -e 's%exec_prefix=/usr%exec_prefix=$(STAGING_DIR)/usr%' \ - $(STAGING_DIR)/usr/bin/libusb-config -endef - -LIBUSB_COMPAT_POST_INSTALL_STAGING_HOOKS+=LIBUSB_COMPAT_FIXUP_CONFIG +LIBUSB_COMPAT_CONFIG_SCRIPTS = libusb-config +LIBUSB_COMPAT_LICENSE = LGPLv2.1+ +LIBUSB_COMPAT_LICENSE_FILES = COPYING -$(eval $(call AUTOTARGETS,package,libusb-compat)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/libusb/Config.in b/package/libusb/Config.in index 7f7276fed8..2c2b8ce173 100644 --- a/package/libusb/Config.in +++ b/package/libusb/Config.in @@ -1,6 +1,10 @@ config BR2_PACKAGE_LIBUSB bool "libusb" + depends on BR2_TOOLCHAIN_HAS_THREADS help Userspace library for accessing USB devices http://libusb.sourceforge.net/ + +comment "libusb needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libusb/libusb-01-uclinux.patch b/package/libusb/libusb-01-uclinux.patch new file mode 100644 index 0000000000..cbf48a75b3 --- /dev/null +++ b/package/libusb/libusb-01-uclinux.patch @@ -0,0 +1,30 @@ +*-uclinux* is valid in the tuple for linux, it's used for flat binaries +for example. +Patch both configure* for consistency and to avoid an unnecessary autoreconf. + +Signed-off-by: Gustavo Zacarias + +diff -Nura libusb-1.0.9.orig/configure libusb-1.0.9/configure +--- libusb-1.0.9.orig/configure 2013-09-03 10:13:52.212301259 -0300 ++++ libusb-1.0.9/configure 2013-09-03 10:19:08.443669386 -0300 +@@ -11093,7 +11093,7 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking operating system" >&5 + $as_echo_n "checking operating system... " >&6; } + case $host in +-*-linux*) ++*-linux* | *-uclinux*) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Linux" >&5 + $as_echo "Linux" >&6; } + backend="linux" +diff -Nura libusb-1.0.9.orig/configure.ac libusb-1.0.9/configure.ac +--- libusb-1.0.9.orig/configure.ac 2013-09-03 10:13:52.212301259 -0300 ++++ libusb-1.0.9/configure.ac 2013-09-03 10:19:00.573411346 -0300 +@@ -46,7 +46,7 @@ + + AC_MSG_CHECKING([operating system]) + case $host in +-*-linux*) ++*-linux* | *-uclinux*) + AC_MSG_RESULT([Linux]) + backend="linux" + ;; diff --git a/package/libusb/libusb.mk b/package/libusb/libusb.mk index 050e2ba812..68e44ec211 100644 --- a/package/libusb/libusb.mk +++ b/package/libusb/libusb.mk @@ -1,13 +1,20 @@ -############################################################# +################################################################################ # # libusb # -############################################################# -LIBUSB_VERSION = 1.0.8 +################################################################################ + +LIBUSB_VERSION = 1.0.9 LIBUSB_SOURCE = libusb-$(LIBUSB_VERSION).tar.bz2 -LIBUSB_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/project/libusb/libusb-1.0/libusb-$(LIBUSB_VERSION) -LIBUSB_DEPENDENCIES = host-pkg-config +LIBUSB_SITE = http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-$(LIBUSB_VERSION) +LIBUSB_LICENSE = LGPLv2.1+ +LIBUSB_LICENSE_FILES = COPYING +LIBUSB_DEPENDENCIES = host-pkgconf LIBUSB_INSTALL_STAGING = YES -LIBUSB_INSTALL_TARGET = YES -$(eval $(call AUTOTARGETS,package,libusb)) +ifeq ($(BR2_avr32),y) +LIBUSB_CONF_OPT += --disable-timerfd +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/libv4l/Config.in b/package/libv4l/Config.in new file mode 100644 index 0000000000..9d0492187b --- /dev/null +++ b/package/libv4l/Config.in @@ -0,0 +1,63 @@ +config BR2_PACKAGE_LIBV4L + bool "libv4l" + depends on BR2_LARGEFILE + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_JPEG + help + libv4l is an accompanying collection of libraries that adds a thin + abstraction layer on top of video4linux2 (V4L2) devices. + + http://freshmeat.net/projects/libv4l + +if BR2_PACKAGE_LIBV4L + +config BR2_PACKAGE_LIBV4L_DECODE_TM6000 + bool "decode_tm6000" + depends on BR2_TOOLCHAIN_USES_GLIBC + help + Tool to decode tm6000 proprietary format streams + +comment "decode_tm6000 needs an (e)glibc toolchain" + depends on !BR2_TOOLCHAIN_USES_GLIBC + +config BR2_PACKAGE_LIBV4L_IR_KEYTABLE + bool "ir-keytable" + depends on BR2_TOOLCHAIN_USES_GLIBC + help + Tool to alter keymaps of Remote Controller devices + +comment "ir-keytable needs an (e)glibc toolchain" + depends on !BR2_TOOLCHAIN_USES_GLIBC + +config BR2_PACKAGE_LIBV4L_V4L2_COMPLIANCE + bool "v4l2-compliance" + depends on BR2_INSTALL_LIBSTDCPP + help + Tool to test v4l2 API compliance of drivers + +comment "v4l2-compliance needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_LIBV4L_V4L2_CTL + bool "v4l2-ctl" + depends on BR2_INSTALL_LIBSTDCPP + default y + help + Tool to configure v4l2 controls from the cmdline + +comment "v4l2-ctl needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_LIBV4L_V4L2_DBG + bool "v4l2-dbg" + depends on BR2_INSTALL_LIBSTDCPP + help + Tool to directly get and set registers of v4l2 devices + +comment "v4l2-dbg needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +endif + +comment "libv4l needs a toolchain w/ largefile, threads" + depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libv4l/libv4l-largefile.patch b/package/libv4l/libv4l-largefile.patch new file mode 100644 index 0000000000..9df8652adc --- /dev/null +++ b/package/libv4l/libv4l-largefile.patch @@ -0,0 +1,39 @@ +[PATCH] fixup lfs mismatch in preload libraries + +Ensure that the lfs variants are not transparently used instead of the !lfs +ones so both can be wrapped, independently of any custom CFLAGS/CPPFLAGS. + +Signed-off-by: Peter Korsgaard +--- + lib/libv4l1/v4l1compat.c | 3 +++ + lib/libv4l2/v4l2convert.c | 3 +++ + 2 files changed, 6 insertions(+) + +Index: v4l-utils-0.8.5/lib/libv4l1/v4l1compat.c +=================================================================== +--- v4l-utils-0.8.5.orig/lib/libv4l1/v4l1compat.c ++++ v4l-utils-0.8.5/lib/libv4l1/v4l1compat.c +@@ -19,6 +19,9 @@ + # Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA + */ + ++/* ensure we see *64 variants and they aren't transparently used */ ++#undef _LARGEFILE_SOURCE ++#undef _FILE_OFFSET_BITS + #define _LARGEFILE64_SOURCE 1 + + #include +Index: v4l-utils-0.8.5/lib/libv4l2/v4l2convert.c +=================================================================== +--- v4l-utils-0.8.5.orig/lib/libv4l2/v4l2convert.c ++++ v4l-utils-0.8.5/lib/libv4l2/v4l2convert.c +@@ -20,6 +20,9 @@ + # Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA + */ + ++/* ensure we see *64 variants and they aren't transparently used */ ++#undef _LARGEFILE_SOURCE ++#undef _FILE_OFFSET_BITS + #define _LARGEFILE64_SOURCE 1 + + #include diff --git a/package/libv4l/libv4l.mk b/package/libv4l/libv4l.mk new file mode 100644 index 0000000000..f62a4b6e09 --- /dev/null +++ b/package/libv4l/libv4l.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# libv4l +# +################################################################################ + +LIBV4L_VERSION = 0.8.9 +LIBV4L_SOURCE = v4l-utils-$(LIBV4L_VERSION).tar.bz2 +LIBV4L_SITE = http://linuxtv.org/downloads/v4l-utils/ +LIBV4L_INSTALL_STAGING = YES +LIBV4L_MAKE_OPTS = PREFIX=/usr +LIBV4L_DEPENDENCIES = jpeg + +LIBV4L_DIRS_y += lib +LIBV4L_DIRS_$(BR2_PACKAGE_LIBV4L_DECODE_TM6000) += utils/libv4l2util utils/decode_tm6000 +LIBV4L_DIRS_$(BR2_PACKAGE_LIBV4L_IR_KEYTABLE) += utils/keytable +LIBV4L_DIRS_$(BR2_PACKAGE_LIBV4L_V4L2_COMPLIANCE) += utils/v4l2-compliance +LIBV4L_DIRS_$(BR2_PACKAGE_LIBV4L_V4L2_CTL) += utils/v4l2-ctl +LIBV4L_DIRS_$(BR2_PACKAGE_LIBV4L_V4L2_DBG) += utils/v4l2-dbg + +ifeq ($(BR2_PREFER_STATIC_LIB),y) + LIBV4L_MAKE_OPTS += LINKTYPE=static +endif + +define LIBV4L_BUILD_CMDS + for i in $(LIBV4L_DIRS_y); do \ + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)/$$i \ + $(LIBV4L_MAKE_OPTS) || exit 1 ; done +endef + +define LIBV4L_INSTALL_STAGING_CMDS + for i in $(LIBV4L_DIRS_y); do \ + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)/$$i \ + DESTDIR=$(STAGING_DIR) $(LIBV4L_MAKE_OPTS) install || exit 1; done +endef + +define LIBV4L_INSTALL_TARGET_CMDS + for i in $(LIBV4L_DIRS_y); do \ + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)/$$i \ + DESTDIR=$(TARGET_DIR) $(LIBV4L_MAKE_OPTS) install || exit 1; done +endef + +$(eval $(generic-package)) diff --git a/package/libvncserver/Config.in b/package/libvncserver/Config.in new file mode 100644 index 0000000000..ff83e343dd --- /dev/null +++ b/package/libvncserver/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBVNCSERVER + bool "libvncserver" + help + libvncserver is a VNC server/client library. + + http://libvncserver.sourceforge.net/ diff --git a/package/libvncserver/libvncserver.mk b/package/libvncserver/libvncserver.mk new file mode 100644 index 0000000000..f5a0aefca3 --- /dev/null +++ b/package/libvncserver/libvncserver.mk @@ -0,0 +1,58 @@ +################################################################################ +# +# libvncserver +# +################################################################################ + +LIBVNCSERVER_VERSION = 0.9.9 +LIBVNCSERVER_SOURCE = LibVNCServer-$(LIBVNCSERVER_VERSION).tar.gz +LIBVNCSERVER_SITE = http://downloads.sourceforge.net/project/libvncserver/libvncserver/$(LIBVNCSERVER_VERSION) +LIBVNCSERVER_LICENSE = GPLv2+ +LIBVNCSERVER_LICENSE_FILES = COPYING +LIBVNCSERVER_INSTALL_STAGING = YES +LIBVNCSERVER_CONFIG_SCRIPTS = libvncserver-config + +# only used for examples +LIBVNCSERVER_CONF_OPT += --with-sdl-config=/bin/false + +ifneq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +LIBVNCSERVER_CONF_OPT += --without-pthread +endif + +ifneq ($(BR2_INET_IPV6),y) +LIBVNCSERVER_CONF_OPT += --without-ipv6 +endif + +# openssl supports needs pthread +ifeq ($(BR2_PACKAGE_OPENSSL)$(BR2_TOOLCHAIN_HAS_THREADS),yy) +LIBVNCSERVER_DEPENDENCIES += openssl +else +LIBVNCSERVER_CONF_OPT += --without-crypto --without-ssl +endif + +ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +LIBVNCSERVER_CONF_ENV += LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config +LIBVNCSERVER_DEPENDENCIES += libgcrypt +else +LIBVNCSERVER_CONF_OPT += --without-gcrypt +endif + +ifeq ($(BR2_PACKAGE_GNUTLS)$(BR2_PACKAGE_LIBGCRYPT),yy) +LIBVNCSERVER_DEPENDENCIES += gnutls host-pkgconf +else +LIBVNCSERVER_CONF_OPT += --without-gnutls +endif + +ifeq ($(BR2_PACKAGE_JPEG),y) +LIBVNCSERVER_DEPENDENCIES += jpeg +else +LIBVNCSERVER_CONF_OPT += --without-jpeg +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +LIBVNCSERVER_DEPENDENCIES += zlib +else +LIBVNCSERVER_CONF_OPT += --without-zlib +endif + +$(eval $(autotools-package)) diff --git a/package/multimedia/libvorbis/Config.in b/package/libvorbis/Config.in similarity index 100% rename from package/multimedia/libvorbis/Config.in rename to package/libvorbis/Config.in diff --git a/package/libvorbis/libvorbis.mk b/package/libvorbis/libvorbis.mk new file mode 100644 index 0000000000..948a43d97c --- /dev/null +++ b/package/libvorbis/libvorbis.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libvorbis +# +################################################################################ + +LIBVORBIS_VERSION = 1.3.3 +LIBVORBIS_SOURCE = libvorbis-$(LIBVORBIS_VERSION).tar.xz +LIBVORBIS_SITE = http://downloads.xiph.org/releases/vorbis/ +LIBVORBIS_INSTALL_STAGING = YES +LIBVORBIS_CONF_OPT = --disable-oggtest +LIBVORBIS_DEPENDENCIES = host-pkgconf libogg +LIBVORBIS_LICENSE = BSD-3c +LIBVORBIS_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libvpx/Config.in b/package/libvpx/Config.in new file mode 100644 index 0000000000..0ed3e1ad9c --- /dev/null +++ b/package/libvpx/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBVPX + bool "libvpx" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + A high-quality, open video format that's freely available to + everyone. + + http://webmproject.org + +comment "libvpx needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libvpx/libvpx.mk b/package/libvpx/libvpx.mk new file mode 100644 index 0000000000..480f1c4602 --- /dev/null +++ b/package/libvpx/libvpx.mk @@ -0,0 +1,53 @@ +################################################################################ +# +# libvpx +# +################################################################################ + +LIBVPX_VERSION = v1.2.0 +LIBVPX_SITE = http://git.chromium.org/webm/libvpx.git +LIBVPX_SITE_METHOD = git + +LIBVPX_LICENSE = BSD-3c +LIBVPX_LICENSE_FILES = LICENSE PATENTS + +LIBVPX_INSTALL_STAGING = YES + +# ld is being used with cc options. therefore, pretend ld is cc. +LIBVPX_CONF_ENV = \ + LD="$(TARGET_CC)" \ + CROSS=$(GNU_TARGET_NAME) + +LIBVPX_CONF_OPT = \ + --disable-examples \ + --disable-docs \ + --disable-unit-tests + +# This is not a true autotools package. It is based on the ffmpeg build system +define LIBVPX_CONFIGURE_CMDS + (cd $(LIBVPX_SRCDIR) && rm -rf config.cache && \ + $(TARGET_CONFIGURE_OPTS) \ + $(TARGET_CONFIGURE_ARGS) \ + $(LIBVPX_CONF_ENV) \ + ./configure \ + --target=generic-gnu \ + --enable-pic \ + --prefix=/usr \ + $(SHARED_STATIC_LIBS_OPTS) \ + $(LIBVPX_CONF_OPT) \ + ) +endef + +define LIBVPX_BUILD_CMDS + $(TARGET_MAKE_ENV) $(LIBVPX_MAKE_ENV) $(MAKE) -C $(@D) all +endef + +define LIBVPX_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(LIBVPX_MAKE_ENV) $(MAKE) DESTDIR="$(STAGING_DIR)" -C $(@D) install +endef + +define LIBVPX_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(LIBVPX_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/libwebsockets/Config.in b/package/libwebsockets/Config.in new file mode 100644 index 0000000000..1d927bb4ea --- /dev/null +++ b/package/libwebsockets/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBWEBSOCKETS + bool "libwebsockets" + select BR2_PACKAGE_ZLIB + help + Libwebsockets is a lightweight pure C library built to use + minimal CPU and memory resources, and provide fast throughput + in both directions. + + http://libwebsockets.org/ diff --git a/package/libwebsockets/libwebsockets.mk b/package/libwebsockets/libwebsockets.mk new file mode 100644 index 0000000000..ec5244cf39 --- /dev/null +++ b/package/libwebsockets/libwebsockets.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# libwebsockets +# +################################################################################ + +LIBWEBSOCKETS_VERSION = v1.22-chrome26-firefox18 +LIBWEBSOCKETS_SOURCE = libwebsockets-$(LIBWEBSOCKETS_VERSION).tar.xz +LIBWEBSOCKETS_SITE = http://git.libwebsockets.org/cgi-bin/cgit/libwebsockets/snapshot +LIBWEBSOCKETS_LICENSE = LGPLv2.1 +LIBWEBSOCKETS_LICENSE_FILES = COPYING +LIBWEBSOCKETS_DEPENDENCIES = zlib +LIBWEBSOCKETS_AUTORECONF = YES +LIBWEBSOCKETS_CONF_OPT = --without-testapps +LIBWEBSOCKETS_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libxkbcommon/Config.in b/package/libxkbcommon/Config.in new file mode 100644 index 0000000000..0a52c6f43f --- /dev/null +++ b/package/libxkbcommon/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBXKBCOMMON + bool "libxkbcommon" + help + xkbcommon is a keymap compiler and support library which + processes a reduced subset of keymaps as defined by the XKB + specification. + + http://xkbcommon.org/ diff --git a/package/libxkbcommon/libxkbcommon.mk b/package/libxkbcommon/libxkbcommon.mk new file mode 100644 index 0000000000..27c73aee81 --- /dev/null +++ b/package/libxkbcommon/libxkbcommon.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# libxkbcommon +# +################################################################################ + +LIBXKBCOMMON_VERSION = 0.3.0 +LIBXKBCOMMON_SITE = http://xkbcommon.org/download/ +LIBXKBCOMMON_SOURCE = libxkbcommon-$(LIBXKBCOMMON_VERSION).tar.xz +LIBXKBCOMMON_LICENSE = MIT/X11 +LIBXKBCOMMON_LICENSE_FILES = COPYING + +LIBXKBCOMMON_INSTALL_STAGING = YES +LIBXKBCOMMON_DEPENDENCIES = host-bison host-flex +# uses C99 features +LIBXKBCOMMON_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -std=gnu99" + +$(eval $(autotools-package)) diff --git a/package/libxml-parser-perl/Config.in b/package/libxml-parser-perl/Config.in index e90e50ed8b..2a81086180 100644 --- a/package/libxml-parser-perl/Config.in +++ b/package/libxml-parser-perl/Config.in @@ -1,11 +1,11 @@ config BR2_PACKAGE_LIBXML_PARSER_PERL - bool "libxml-parser-perl" - select BR2_PACKAGE_EXPAT - # Hide from configuration as we only support the host package - # for the moment - depends on BR2_HOST_ONLY - help - The Perl XML::Parser module. + bool "libxml-parser-perl" + select BR2_PACKAGE_EXPAT + # Hide from configuration as we only support the host package + # for the moment + depends on BR2_HOST_ONLY + help + The Perl XML::Parser module. - http://www.cpan.org/modules/by-module/XML/ + http://www.cpan.org/modules/by-module/XML/ diff --git a/package/libxml-parser-perl/libxml-parser-perl.mk b/package/libxml-parser-perl/libxml-parser-perl.mk index 9f80cf9f06..53f3bcf6ea 100644 --- a/package/libxml-parser-perl/libxml-parser-perl.mk +++ b/package/libxml-parser-perl/libxml-parser-perl.mk @@ -1,24 +1,25 @@ -############################################################# +################################################################################ # # libxml-parser-perl # -############################################################# -LIBXML_PARSER_PERL_VERSION:=2.36 -LIBXML_PARSER_PERL_SOURCE:=XML-Parser-$(LIBXML_PARSER_PERL_VERSION).tar.gz -LIBXML_PARSER_PERL_SITE:=http://www.cpan.org/modules/by-module/XML/ +################################################################################ + +LIBXML_PARSER_PERL_VERSION = 2.36 +LIBXML_PARSER_PERL_SOURCE = XML-Parser-$(LIBXML_PARSER_PERL_VERSION).tar.gz +LIBXML_PARSER_PERL_SITE = http://www.cpan.org/modules/by-module/XML/ LIBXML_PARSER_PERL_DEPENDENCIES = expat -HOST_LIBXML_PARSER_PERL_DEPENDENCIES = host-expat define HOST_LIBXML_PARSER_PERL_CONFIGURE_CMDS (cd $(@D) ; \ - perl Makefile.PL \ + $(HOST_CONFIGURE_OPTS) perl Makefile.PL \ PREFIX=$(HOST_DIR)/usr \ EXPATLIBPATH=$(HOST_DIR)/usr/lib \ EXPATINCPATH=$(HOST_DIR)/usr/include \ INSTALLDIRS=site \ INSTALLSITELIB=$(HOST_DIR)/usr/lib/perl \ INSTALLSITEARCH=$(HOST_DIR)/usr/lib/perl \ + USE_MM_LD_RUN_PATH=1 \ ) endef @@ -30,6 +31,5 @@ define HOST_LIBXML_PARSER_PERL_INSTALL_CMDS $(HOST_MAKE_ENV) $(MAKE) -C $(@D) install endef -$(eval $(call GENTARGETS,package,libxml-parser-perl)) -$(eval $(call GENTARGETS,package,libxml-parser-perl,host)) - +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/libxml2/Config.in b/package/libxml2/Config.in index ebd63fe54c..ea62663dd2 100644 --- a/package/libxml2/Config.in +++ b/package/libxml2/Config.in @@ -4,3 +4,6 @@ config BR2_PACKAGE_LIBXML2 XML C Parser http://xmlsoft.org/ + +config BR2_PACKAGE_HOST_LIBXML2_PYTHON + bool \ No newline at end of file diff --git a/package/libxml2/libxml2.mk b/package/libxml2/libxml2.mk index d07f631a88..7116b82cb9 100644 --- a/package/libxml2/libxml2.mk +++ b/package/libxml2/libxml2.mk @@ -1,37 +1,56 @@ -############################################################# +################################################################################ # # libxml2 # -############################################################# +################################################################################ -LIBXML2_VERSION = 2.7.8 +LIBXML2_VERSION = 2.9.1 LIBXML2_SITE = ftp://xmlsoft.org/libxml2 LIBXML2_INSTALL_STAGING = YES +LIBXML2_AUTORECONF = YES +LIBXML2_LICENSE = MIT +LIBXML2_LICENSE_FILES = COPYING +LIBXML2_CONFIG_SCRIPTS = xml2-config ifneq ($(BR2_LARGEFILE),y) LIBXML2_CONF_ENV = CC="$(TARGET_CC) $(TARGET_CFLAGS) -DNO_LARGEFILE_SOURCE" endif -LIBXML2_CONF_OPT = --with-gnu-ld --enable-shared \ - --enable-static \ - --without-debugging --without-python \ - --without-threads +LIBXML2_CONF_OPT = --with-gnu-ld --without-python --without-debug -define LIBXML2_STAGING_LIBXML2_CONFIG_FIXUP - $(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g" $(STAGING_DIR)/usr/bin/xml2-config - $(SED) "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" $(STAGING_DIR)/usr/bin/xml2-config -endef +HOST_LIBXML2_DEPENDENCIES = host-pkgconf -LIBXML2_POST_INSTALL_STAGING_HOOKS += LIBXML2_STAGING_LIBXML2_CONFIG_FIXUP +# mesa3d uses functions that are only available with debug +ifeq ($(BR2_PACKAGE_MESA3D),y) +HOST_LIBXML2_CONF_OPT = --with-debug +else +HOST_LIBXML2_CONF_OPT = --without-debug +endif + +ifeq ($(BR2_PACKAGE_HOST_LIBXML2_PYTHON),y) +HOST_LIBXML2_DEPENDENCIES += host-python +HOST_LIBXML2_CONF_OPT += --with-python=$(HOST_DIR)/usr +else +HOST_LIBXML2_CONF_OPT += --without-python +endif -HOST_LIBXML2_DEPENDENCIES = host-pkg-config +ifeq ($(BR2_PACKAGE_ZLIB),y) +LIBXML2_DEPENDENCIES += zlib +LIBXML2_CONF_OPT += --with-zlib +else +LIBXML2_CONF_OPT += --without-zlib +endif + +LIBXML2_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBICONV),libiconv) -HOST_LIBXML2_CONF_OPT = \ - --enable-shared --without-debugging --without-python \ - --without-threads +ifeq ($(BR2_ENABLE_LOCALE)$(BR2_PACKAGE_LIBICONV),y) +LIBXML2_CONF_OPT += --with-iconv +else +LIBXML2_CONF_OPT += --without-iconv +endif -$(eval $(call AUTOTARGETS,package,libxml2)) -$(eval $(call AUTOTARGETS,package,libxml2,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) # libxml2 for the host -LIBXML2_HOST_BINARY:=$(HOST_DIR)/usr/bin/xmllint +LIBXML2_HOST_BINARY = $(HOST_DIR)/usr/bin/xmllint diff --git a/package/libxmlpp/Config.in b/package/libxmlpp/Config.in new file mode 100644 index 0000000000..77723a8b86 --- /dev/null +++ b/package/libxmlpp/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_LIBXMLPP + bool "libxml++" + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_GLIBMM + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR # glibmm -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glibmm -> libglib2 + help + libxml++ is a C++ wrapper for the libxml XML parser library. + + http://libxmlplusplus.sourceforge.net/ + +comment "libxml++ needs a toolchain w/ C++, wchar, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libxmlpp/libxmlpp.mk b/package/libxmlpp/libxmlpp.mk new file mode 100644 index 0000000000..cc26d9489c --- /dev/null +++ b/package/libxmlpp/libxmlpp.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# libxmlpp +# +################################################################################ + +LIBXMLPP_VERSION_MAJOR = 2.34 +LIBXMLPP_VERSION_MINOR = 2 +LIBXMLPP_VERSION = $(LIBXMLPP_VERSION_MAJOR).$(LIBXMLPP_VERSION_MINOR) +LIBXMLPP_LICENSE = LGPLv2.1 (library), LGPLv2+ (examples) +LIBXMLPP_LICENSE_FILES = COPYING +LIBXMLPP_SOURCE = libxml++-$(LIBXMLPP_VERSION).tar.xz +LIBXMLPP_SITE = http://ftp.gnome.org/pub/GNOME/sources/libxml++/$(LIBXMLPP_VERSION_MAJOR) +LIBXMLPP_INSTALL_STAGING = YES +LIBXMLPP_DEPENDENCIES = libxml2 glibmm host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/libxslt/libxslt.mk b/package/libxslt/libxslt.mk index 5fa2f4ce4f..9139c8e8ae 100644 --- a/package/libxslt/libxslt.mk +++ b/package/libxslt/libxslt.mk @@ -1,43 +1,31 @@ -############################################################# +################################################################################ # # libxslt # -############################################################# +################################################################################ -LIBXSLT_VERSION = 1.1.26 +LIBXSLT_VERSION = 1.1.28 LIBXSLT_SITE = ftp://xmlsoft.org/libxslt LIBXSLT_INSTALL_STAGING = YES +LIBXSLT_LICENSE = MIT +LIBXSLT_LICENSE_FILES = COPYING + +LIBXSLT_CONF_OPT = --with-gnu-ld --without-debug \ + --without-python --with-libxml-prefix=$(STAGING_DIR)/usr/ +LIBXSLT_CONFIG_SCRIPTS = xslt-config +LIBXSLT_DEPENDENCIES = libxml2 # If we have enabled libgcrypt then use it, else disable crypto support. ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) -LIBXSLT_DEPENDENCIES_EXTRA=libgcrypt +LIBXSLT_DEPENDENCIES += libgcrypt +LIBXSLT_CONF_ENV += LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config else -LIBXSLT_XTRA_CONF_OPT = --without-crypto +LIBXSLT_CONF_OPT += --without-crypto endif -LIBXSLT_CONF_OPT = --with-gnu-ld --enable-shared \ - --enable-static $(LIBXSLT_XTRA_CONF_OPT) \ - --without-debugging --without-python \ - --without-threads \ - --with-libxml-prefix=$(STAGING_DIR)/usr/ - -LIBXSLT_DEPENDENCIES = libxml2 $(LIBXSLT_DEPENDENCIES_EXTRA) - -HOST_LIBXSLT_CONF_OPT = --enable-shared \ - --without-debugging \ - --without-python \ - --without-threads \ - --without-crypto +HOST_LIBXSLT_CONF_OPT = --without-debug --without-python --without-crypto HOST_LIBXSLT_DEPENDENCIES = host-libxml2 -define LIBXSLT_XSLT_CONFIG_FIXUP - $(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g" $(STAGING_DIR)/usr/bin/xslt-config - $(SED) "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" $(STAGING_DIR)/usr/bin/xslt-config - $(SED) "s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include\',g" $(STAGING_DIR)/usr/bin/xslt-config -endef - -LIBXSLT_POST_INSTALL_STAGING_HOOKS += LIBXSLT_XSLT_CONFIG_FIXUP - -$(eval $(call AUTOTARGETS,package,libxslt)) -$(eval $(call AUTOTARGETS,package,libxslt,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/libyaml/Config.in b/package/libyaml/Config.in new file mode 100644 index 0000000000..00a48b2016 --- /dev/null +++ b/package/libyaml/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBYAML + bool "libyaml" + help + LibYAML is a YAML 1.1 parser and emitter written in C. + + http://pyyaml.org/wiki/LibYAML diff --git a/package/libyaml/libyaml.mk b/package/libyaml/libyaml.mk new file mode 100644 index 0000000000..17945b2fb2 --- /dev/null +++ b/package/libyaml/libyaml.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# libyaml +# +################################################################################ + +LIBYAML_VERSION = 0.1.4 +LIBYAML_SOURCE = yaml-$(LIBYAML_VERSION).tar.gz +LIBYAML_SITE = http://pyyaml.org/download/libyaml/ +LIBYAML_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/lighttpd/Config.in b/package/lighttpd/Config.in index b56d66b4cf..b84e6ea6a8 100644 --- a/package/lighttpd/Config.in +++ b/package/lighttpd/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_LIGHTTPD bool "lighttpd" + depends on BR2_USE_MMU # fork() help lighttpd a secure, fast, compliant and very flexible web-server which has been optimized for high-performance environments. It @@ -12,35 +13,43 @@ config BR2_PACKAGE_LIGHTTPD http://www.lighttpd.net/ if BR2_PACKAGE_LIGHTTPD -menu "lighttpd packages" config BR2_PACKAGE_LIGHTTPD_OPENSSL - bool "lighttpd openssl support" - depends on BR2_PACKAGE_LIGHTTPD + bool "openssl support" select BR2_PACKAGE_OPENSSL help Enable OpenSSL support for lighttpd. config BR2_PACKAGE_LIGHTTPD_ZLIB - bool "lighttpd zlib support" - depends on BR2_PACKAGE_LIGHTTPD + bool "zlib support" select BR2_PACKAGE_ZLIB help Enable zlib support for lighttpd mod_compress. config BR2_PACKAGE_LIGHTTPD_BZIP2 - bool "lighttpd bzip2 support" - depends on BR2_PACKAGE_LIGHTTPD + bool "bzip2 support" select BR2_PACKAGE_BZIP2 help Enable bzip2 support for lighttpd mod_compress. config BR2_PACKAGE_LIGHTTPD_PCRE - bool "pcre" - depends on BR2_PACKAGE_LIGHTTPD + bool "pcre support" select BR2_PACKAGE_PCRE help Enable PCRE support. Needed to support mod_rewrite -endmenu +config BR2_PACKAGE_LIGHTTPD_WEBDAV + bool "webdav support" + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_SQLITE + help + Enable webdav support. Needed to support mod_webdav + +config BR2_PACKAGE_LIGHTTPD_LUA + bool "lua support" + depends on BR2_PACKAGE_LIGHTTPD + select BR2_PACKAGE_LUA + help + Enable Lua support. Needed to support mod_magnet + endif diff --git a/package/lighttpd/S50lighttpd b/package/lighttpd/S50lighttpd new file mode 100644 index 0000000000..752402ce42 --- /dev/null +++ b/package/lighttpd/S50lighttpd @@ -0,0 +1,37 @@ +#!/bin/sh +# +# Starts lighttpd. +# + +start() { + echo -n "Starting lighttpd: " + start-stop-daemon -S -q -p /var/run/lighttpd.pid --exec /usr/sbin/lighttpd -- -f /etc/lighttpd/lighttpd.conf + echo "OK" +} +stop() { + echo -n "Stopping lighttpd: " + start-stop-daemon -K -q -p /var/run/lighttpd.pid + echo "OK" +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/package/lighttpd/lighttpd-01-Fix-default-config-file.patch b/package/lighttpd/lighttpd-01-Fix-default-config-file.patch new file mode 100644 index 0000000000..88d2c6f333 --- /dev/null +++ b/package/lighttpd/lighttpd-01-Fix-default-config-file.patch @@ -0,0 +1,98 @@ +Modify the default lighttpd configuration file to have one a starting conf + + * Changed the log path to /var/log and logs filenames + * Disable IPv6 + * Do not setuid to a user that doesn't exist on the system + * Disable pdf ranges fix for Adobe Reader since it uses regex and we + don't always have pcre support + * Change the network backend to writev since linux-sendfile fails on buildroot + +Signed-off-by: Maxime Ripard +Signed-off-by: Simon Dawson + +diff -Nurp a/doc/config/conf.d/access_log.conf b/doc/config/conf.d/access_log.conf +--- a/doc/config/conf.d/access_log.conf 2010-07-11 18:01:32.000000000 +0100 ++++ b/doc/config/conf.d/access_log.conf 2012-07-21 19:37:58.453207990 +0100 +@@ -9,7 +9,7 @@ server.modules += ( "mod_accesslog" ) + ## + ## Default access log. + ## +-accesslog.filename = log_root + "/access.log" ++accesslog.filename = log_root + "/lighttpd-access.log" + + ## + ## The default format produces CLF compatible output. +diff -Nurp a/doc/config/lighttpd.conf b/doc/config/lighttpd.conf +--- a/doc/config/lighttpd.conf 2011-12-18 12:57:25.000000000 +0000 ++++ b/doc/config/lighttpd.conf 2012-07-21 19:40:45.281200552 +0100 +@@ -13,8 +13,8 @@ + ## if you add a variable here. Add the corresponding variable in the + ## chroot example aswell. + ## +-var.log_root = "/var/log/lighttpd" +-var.server_root = "/srv/www" ++var.log_root = "/var/log" ++var.server_root = "/var/www" + var.state_dir = "/var/run" + var.home_dir = "/var/lib/lighttpd" + var.conf_dir = "/etc/lighttpd" +@@ -90,7 +90,7 @@ server.port = 80 + ## + ## Use IPv6? + ## +-server.use-ipv6 = "enable" ++# server.use-ipv6 = "enable" + + ## + ## bind to a specific IP +@@ -101,8 +101,8 @@ server.use-ipv6 = "enable" + ## Run as a different username/groupname. + ## This requires root permissions during startup. + ## +-server.username = "lighttpd" +-server.groupname = "lighttpd" ++# server.username = "lighttpd" ++# server.groupname = "lighttpd" + + ## + ## enable core files. +@@ -112,7 +112,7 @@ server.groupname = "lighttpd" + ## + ## Document root + ## +-server.document-root = server_root + "/htdocs" ++server.document-root = server_root + + ## + ## The value for the "Server:" response field. +@@ -138,7 +138,7 @@ server.pid-file = state_dir + "/lighttpd + ## + ## Path to the error log file + ## +-server.errorlog = log_root + "/error.log" ++server.errorlog = log_root + "/lighttpd-error.log" + + ## + ## If you want to log to syslog you have to unset the +@@ -188,7 +188,7 @@ server.event-handler = "linux-sysepoll" + ## linux-sendfile - is recommended for small files. + ## writev - is recommended for sending many large files + ## +-server.network-backend = "linux-sendfile" ++server.network-backend = "writev" + + ## + ## As lighttpd is a single-threaded server, its main resource limit is +@@ -311,9 +311,9 @@ url.access-deny = ( "~", ".i + ## disable range requests for pdf files + ## workaround for a bug in the Acrobat Reader plugin. + ## +-$HTTP["url"] =~ "\.pdf$" { +- server.range-requests = "disable" +-} ++# $HTTP["url"] =~ "\.pdf$" { ++# server.range-requests = "disable" ++# } + + ## + ## url handling modules (rewrite, redirect) diff --git a/package/lighttpd/lighttpd-02-mod_extforward.patch b/package/lighttpd/lighttpd-02-mod_extforward.patch new file mode 100644 index 0000000000..3efd2b1e02 --- /dev/null +++ b/package/lighttpd/lighttpd-02-mod_extforward.patch @@ -0,0 +1,14 @@ +From http://redmine.lighttpd.net/issues/2515 + +Signed-off-by: Gustavo Zacarias + +--- a/src/mod_extforward.c (revision 2909) ++++ b/src/mod_extforward.c (working copy) +@@ -439,7 +439,6 @@ + #ifdef HAVE_IPV6 + ipstr_to_sockaddr(srv, real_remote_addr, &sock); + #else +- UNUSED(addrs_left); + sock.ipv4.sin_addr.s_addr = inet_addr(real_remote_addr); + sock.plain.sa_family = (sock.ipv4.sin_addr.s_addr == 0xFFFFFFFF) ? AF_UNSPEC : AF_INET; + #endif diff --git a/package/lighttpd/lighttpd.mk b/package/lighttpd/lighttpd.mk index 67cd272419..c820a735e3 100644 --- a/package/lighttpd/lighttpd.mk +++ b/package/lighttpd/lighttpd.mk @@ -1,17 +1,19 @@ -############################################################# +################################################################################ # # lighttpd # -############################################################# +################################################################################ -LIGHTTPD_VERSION = 1.4.28 +LIGHTTPD_VERSION = 1.4.33 +LIGHTTPD_SOURCE = lighttpd-$(LIGHTTPD_VERSION).tar.xz LIGHTTPD_SITE = http://download.lighttpd.net/lighttpd/releases-1.4.x - +LIGHTTPD_LICENSE = BSD-3c +LIGHTTPD_LICENSE_FILES = COPYING +LIGHTTPD_DEPENDENCIES = host-pkgconf LIGHTTPD_CONF_OPT = \ --libdir=/usr/lib/lighttpd \ --libexecdir=/usr/lib \ --localstatedir=/var \ - --program-prefix="" \ $(if $(BR2_LARGEFILE),,--disable-lfs) ifeq ($(BR2_PACKAGE_LIGHTTPD_OPENSSL),y) @@ -43,10 +45,72 @@ else LIGHTTPD_CONF_OPT += --without-pcre endif +ifeq ($(BR2_PACKAGE_LIGHTTPD_WEBDAV),y) +LIGHTTPD_DEPENDENCIES += libxml2 sqlite +LIGHTTPD_CONF_OPT += --with-webdav-props --with-webdav-locks +else +LIGHTTPD_CONF_OPT += --without-webdav-props --without-webdav-locks +endif + +ifeq ($(BR2_PACKAGE_LIGHTTPD_LUA),y) +LIGHTTPD_DEPENDENCIES += lua +LIGHTTPD_CONF_OPT += --with-lua +else +LIGHTTPD_CONF_OPT += --without-lua +endif + +define LIGHTTPD_INSTALL_CONFIG + $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/lighttpd/conf.d + $(INSTALL) -d -m 0755 $(TARGET_DIR)/var/www + + [ -f $(TARGET_DIR)/etc/lighttpd/lighttpd.conf ] || \ + $(INSTALL) -D -m 755 $(@D)/doc/config/lighttpd.conf \ + $(TARGET_DIR)/etc/lighttpd/lighttpd.conf + + [ -f $(TARGET_DIR)/etc/lighttpd/modules.conf ] || \ + $(INSTALL) -D -m 755 $(@D)/doc/config/modules.conf \ + $(TARGET_DIR)/etc/lighttpd/modules.conf + + [ -f $(TARGET_DIR)/etc/lighttpd/conf.d/access_log.conf ] || \ + $(INSTALL) -D -m 755 $(@D)/doc/config/conf.d/access_log.conf \ + $(TARGET_DIR)/etc/lighttpd/conf.d/access_log.conf + + [ -f $(TARGET_DIR)/etc/lighttpd/conf.d/debug.conf ] || \ + $(INSTALL) -D -m 755 $(@D)/doc/config/conf.d/debug.conf \ + $(TARGET_DIR)/etc/lighttpd/conf.d/debug.conf + + [ -f $(TARGET_DIR)/etc/lighttpd/conf.d/dirlisting.conf ] || \ + $(INSTALL) -D -m 755 $(@D)/doc/config/conf.d/dirlisting.conf \ + $(TARGET_DIR)/etc/lighttpd/conf.d/dirlisting.conf + + [ -f $(TARGET_DIR)/etc/lighttpd/conf.d/mime.conf ] || \ + $(INSTALL) -D -m 755 $(@D)/doc/config/conf.d/mime.conf \ + $(TARGET_DIR)/etc/lighttpd/conf.d/mime.conf +endef + +LIGHTTPD_POST_INSTALL_TARGET_HOOKS += LIGHTTPD_INSTALL_CONFIG + +define LIGHTTPD_INSTALL_INIT_SYSV + [ -f $(TARGET_DIR)/etc/init.d/S50lighttpd ] || \ + $(INSTALL) -D -m 755 package/lighttpd/S50lighttpd \ + $(TARGET_DIR)/etc/init.d/S50lighttpd +endef + +define LIGHTTPD_INSTALL_INIT_SYSTEMD + [ -f $(TARGET_DIR)/etc/systemd/system/lighttpd.service ] || \ + $(INSTALL) -D -m 755 package/lighttpd/lighttpd.service \ + $(TARGET_DIR)/etc/systemd/system/lighttpd.service + + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + + ln -fs ../lighttpd.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/lighttpd.service +endef + define LIGHTTPD_UNINSTALL_TARGET_CMDS - rm -f $(TARGET_DIR)/usr/sbin/lighttpd - rm -f $(TARGET_DIR)/usr/sbin/lighttpd-angel - rm -rf $(TARGET_DIR)/usr/lib/lighttpd + $(RM) $(TARGET_DIR)/usr/sbin/lighttpd + $(RM) $(TARGET_DIR)/usr/sbin/lighttpd-angel + $(RM) -r $(TARGET_DIR)/usr/lib/lighttpd endef -$(eval $(call AUTOTARGETS,package,lighttpd)) +$(eval $(autotools-package)) diff --git a/package/lighttpd/lighttpd.service b/package/lighttpd/lighttpd.service new file mode 100644 index 0000000000..0ca5357f56 --- /dev/null +++ b/package/lighttpd/lighttpd.service @@ -0,0 +1,10 @@ +[Unit] +Description=Lighttpd Web Server +After=network.target + +[Service] +ExecStart=/usr/sbin/lighttpd-angel -f /etc/lighttpd/lighttpd.conf -D +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/package/linenoise/Config.in b/package/linenoise/Config.in new file mode 100644 index 0000000000..8e4ab91da5 --- /dev/null +++ b/package/linenoise/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LINENOISE + bool "linenoise" + help + A small self-contained alternative to readline and libedit + + https://github.com/antirez/linenoise diff --git a/package/linenoise/linenoise.mk b/package/linenoise/linenoise.mk new file mode 100644 index 0000000000..a8ea1f63fe --- /dev/null +++ b/package/linenoise/linenoise.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# linenoise +# +################################################################################ + +LINENOISE_VERSION = 27a3b4d5205a5fb3e2101128edd6653bd0c92189 +LINENOISE_SITE = http://github.com/antirez/linenoise/tarball/$(LINENOISE_VERSION) +LINENOISE_LICENSE = BSD-2c +LINENOISE_INSTALL_STAGING = YES + +define LINENOISE_BUILD_CMDS + cd $(@D); $(TARGET_CC) $(TARGET_CFLAGS) -c linenoise.c + cd $(@D); $(TARGET_AR) rcu liblinenoise.a linenoise.o + cd $(@D); $(TARGET_CC) $(TARGET_LDFLAGS) -o linenoise_example example.c -L. -llinenoise +endef + +define LINENOISE_INSTALL_STAGING_CMDS + $(INSTALL) -m 644 -D $(@D)/linenoise.h $(STAGING_DIR)/usr/include/linenoise.h + $(INSTALL) -m 644 -D $(@D)/liblinenoise.a $(STAGING_DIR)/usr/lib/liblinenoise.a + $(INSTALL) -m 755 -D $(@D)/linenoise_example $(STAGING_DIR)/usr/bin/linenoise_example +endef + +define LINENOISE_UNINSTALL_STAGING_CMDS + rm -f $(STAGING_DIR)/usr/include/linenoise.h + rm -f $(STAGING_DIR)/usr/lib/liblinenoise.a + rm -f $(STAGING_DIR)/usr/bin/linenoise_example +endef + +define LINENOISE_INSTALL_TARGET_CMDS + $(INSTALL) -m 644 -D $(@D)/linenoise.h $(TARGET_DIR)/usr/include/linenoise.h + $(INSTALL) -m 644 -D $(@D)/liblinenoise.a $(TARGET_DIR)/usr/lib/liblinenoise.a + $(INSTALL) -m 755 -D $(@D)/linenoise_example $(TARGET_DIR)/usr/bin/linenoise_example +endef + +define LINENOISE_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/include/linenoise.h + rm -f $(TARGET_DIR)/usr/lib/liblinenoise.a + rm -f $(TARGET_DIR)/usr/bin/linenoise_example +endef + +define LINENOISE_CLEAN_CMDS + rm -f $(@D)/*.o $(@D)/*.a $(@D)/linenoise_example +endef + +$(eval $(generic-package)) diff --git a/package/linknx/Config.in b/package/linknx/Config.in new file mode 100644 index 0000000000..6a26c207d5 --- /dev/null +++ b/package/linknx/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LINKNX + bool "linknx" + select BR2_PACKAGE_LIBPTHSEM + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # libpthsem + help + Linknx is an automation platform providing high level functionalities + to EIB/KNX installation. + + http://linknx.sourceforge.net/ + +comment "linknx needs a toolchain w/ C++" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/linknx/linknx-missing-unistd.patch b/package/linknx/linknx-missing-unistd.patch new file mode 100644 index 0000000000..04b088fc3f --- /dev/null +++ b/package/linknx/linknx-missing-unistd.patch @@ -0,0 +1,22 @@ +[PATCH]: ioport.cpp: close(2) needs unistd.h + +Fixed in upstream CVS: +http://linknx.cvs.sourceforge.net/viewvc/linknx/linknx/linknx/src/ioport.cpp?revision=1.20&view=markup + +Signed-off-by: Peter Korsgaard +--- + src/ioport.cpp | 1 + + 1 file changed, 1 insertion(+) + +Index: linknx-0.0.1.30/src/ioport.cpp +=================================================================== +--- linknx-0.0.1.30.orig/src/ioport.cpp ++++ linknx-0.0.1.30/src/ioport.cpp +@@ -21,6 +21,7 @@ + #include + #include "ioport.h" + #include ++#include + + Logger& IOPort::logger_m(Logger::getInstance("IOPort")); + Logger& RxThread::logger_m(Logger::getInstance("RxThread")); diff --git a/package/linknx/linknx.mk b/package/linknx/linknx.mk new file mode 100644 index 0000000000..68920047d0 --- /dev/null +++ b/package/linknx/linknx.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# linknx +# +################################################################################ + +LINKNX_VERSION = 0.0.1.30 +LINKNX_SITE = http://downloads.sourceforge.net/project/linknx/linknx/linknx-$(LINKNX_VERSION) +LINKNX_LICENSE = GPLv2+ +LINKNX_INSTALL_STAGING = YES +LINKNX_CONF_OPT = --without-lua --without-log4cpp --without-pth-test \ + --with-pth=$(STAGING_DIR)/usr --disable-smtp + +LINKNX_DEPENDENCIES = libpthsem + +ifeq ($(BR2_PACKAGE_MYSQL_CLIENT),y) +LINKNX_CONF_OPT += --with-mysql=$(STAGING_DIR)/usr/bin/mysql_config +LINKNX_DEPENDENCIES += mysql_client +else +LINKNX_CONF_OPT += --without-mysql +endif + +ifeq ($(BR2_PACKAGE_LIBCURL),y) +LINKNX_CONF_OPT += --with-libcurl=$(STAGING_DIR)/usr/bin/curl-config +LINKNX_DEPENDENCIES += libcurl +else +LINKNX_CONF_OPT += --without-libcurl +endif + +$(eval $(autotools-package)) diff --git a/package/links/Config.in b/package/links/Config.in index fddf3d2602..141eaf2404 100644 --- a/package/links/Config.in +++ b/package/links/Config.in @@ -1,15 +1,16 @@ config BR2_PACKAGE_LINKS bool "links" + depends on BR2_USE_MMU # fork() help Graphics and text mode WWW browser (kind of like lynx). http://links.twibright.com/ config BR2_PACKAGE_LINKS_GRAPHICS - bool "use graphics (directfb)" - depends on BR2_PACKAGE_LINKS - select BR2_PACKAGE_DIRECTFB + bool "use graphics" + depends on BR2_PACKAGE_LINKS && (BR2_PACKAGE_DIRECTFB || BR2_PACKAGE_XORG7) + select BR2_PACKAGE_XLIB_LIBXT if BR2_PACKAGE_XORG7 select BR2_PACKAGE_LIBPNG help - Enable graphics output. + Enable graphics output for DirectFB or X11. Otherwise links will be text-mode only. diff --git a/package/links/links.mk b/package/links/links.mk index b8520d4a04..6e683dd094 100644 --- a/package/links/links.mk +++ b/package/links/links.mk @@ -1,17 +1,31 @@ -############################################################# +################################################################################ # # links # -############################################################# +################################################################################ -LINKS_VERSION = 2.3pre1 +LINKS_VERSION = 2.7 LINKS_SITE = http://links.twibright.com/download -LINKS_CONF_OPT = --without-x +LINKS_DEPENDENCIES = host-pkgconf +LINKS_LICNSE = GPLv2+ +LINKS_LICENSE_FILES = COPYING ifeq ($(BR2_PACKAGE_LINKS_GRAPHICS),y) LINKS_CONF_OPT += --enable-graphics +LINKS_DEPENDENCIES += libpng +ifeq ($(BR2_PACKAGE_XLIB_LIBXT),y) +LINKS_CONF_OPT += --with-x +LINKS_DEPENDENCIES += xlib_libXt +else +LINKS_CONF_OPT += --without-x +endif +ifeq ($(BR2_PACKAGE_DIRECTFB),y) LINKS_CONF_ENV = ac_cv_path_DIRECTFB_CONFIG=$(STAGING_DIR)/usr/bin/directfb-config -LINKS_DEPENDENCIES += directfb libpng +LINKS_CONF_OPT += --with-directfb +LINKS_DEPENDENCIES += directfb +else +LINKS_CONF_OPT += --without-directfb +endif ifeq ($(BR2_PACKAGE_JPEG),y) LINKS_DEPENDENCIES += jpeg endif @@ -32,4 +46,4 @@ ifeq ($(BR2_PACKAGE_ZLIB),y) LINKS_DEPENDENCIES += zlib endif -$(eval $(call AUTOTARGETS,package,links)) +$(eval $(autotools-package)) diff --git a/package/linphone/Config.in b/package/linphone/Config.in new file mode 100644 index 0000000000..72eca7dce5 --- /dev/null +++ b/package/linphone/Config.in @@ -0,0 +1,32 @@ +config BR2_PACKAGE_LINPHONE + bool "linphone" + select BR2_PACKAGE_LIBEXOSIP2 + select BR2_PACKAGE_SPEEX + select BR2_PACKAGE_ORTP + select BR2_PACKAGE_MEDIASTREAMER + depends on BR2_INSTALL_LIBSTDCPP # mediastreamer + depends on BR2_TOOLCHAIN_HAS_THREADS # ortp + depends on BR2_USE_MMU # libeXosip2 + depends on BR2_INET_IPV6 # mediastreamer + help + Linphone is an internet phone or Voice Over IP phone (VoIP). + + With linphone you can communicate freely with people over + the internet, with voice, video, and text instant messaging. + Linphone makes use of the SIP protocol, an open standard + for internet telephony. You can use Linphone with any SIP + VoIP operator, including our free SIP audio/video service. + linphone is free-software (or open-source), you can download + and redistribute it freely. + Linphone is available for desktop computers: Linux, Windows, + MacOSX, and for mobile phones: Android, iPhone, Blackberry. + + Linphone support in Buildroot is limited to the commandline + client, linphonec, and video support is not enabled. + + http://www.linphone.org/ + +comment "linphone needs a toolchain w/ threads, C++, IPv6" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_INET_IPV6 diff --git a/package/linphone/linphone.mk b/package/linphone/linphone.mk new file mode 100644 index 0000000000..e7e3de6620 --- /dev/null +++ b/package/linphone/linphone.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# linphone +# +################################################################################ + +LINPHONE_VERSION = 3.6.1 +LINPHONE_SITE = http://download-mirror.savannah.gnu.org/releases/linphone/3.6.x/sources +LINPHONE_CONF_OPT = \ + --enable-external-ortp \ + --enable-external-mediastreamer \ + --disable-strict +# configure is out of sync causing deplibs linking issues +LINPHONE_AUTORECONF = YES +LINPHONE_DEPENDENCIES = host-pkgconf ortp mediastreamer libeXosip2 speex +LINPHONE_LICENSE = GPLv2+ +LINPHONE_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_LIBGTK2)$(BR2_PACKAGE_XORG7),yy) +LINPHONE_CONF_OPT += --enable-gtk_ui +LINPHONE_DEPENDENCIES += libgtk2 +else +LINPHONE_CONF_OPT += --disable-gtk_ui +endif + +$(eval $(autotools-package)) diff --git a/package/linux-firmware/Config.in b/package/linux-firmware/Config.in new file mode 100644 index 0000000000..da37b1263c --- /dev/null +++ b/package/linux-firmware/Config.in @@ -0,0 +1,110 @@ +config BR2_PACKAGE_LINUX_FIRMWARE + bool "linux-firmware" + help + This package provides various binary firmware files (closed + binary blobs) for such devices like LAN, WLAN cards etc. + + https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git + +if BR2_PACKAGE_LINUX_FIRMWARE + +menu "WiFi firmwares" + +config BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_7010 + bool "Atheros 7010" + help + Firmware files for the Atheros 7010 module + +config BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9271 + bool "Atheros 9271" + help + Firmware files for the Atheros 9271 module + +config BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XX + bool "Broadcom BRCM bcm43xx" + help + Firmware files for the Broadcom BRCM bcm43xx + +config BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_5000 + bool "Intel iwlwifi 5000" + help + Firmware files for the Intel Wifi 5000 devices supported by + the iwlwifi kernel driver. + +config BR2_PACKAGE_LINUX_FIRMWARE_LIBERTAS_SD8686_V8 + bool "Libertas SD 8686 v8" + help + Firmware files (version 8) for the Marvell SD8686 module + +config BR2_PACKAGE_LINUX_FIRMWARE_LIBERTAS_SD8686_V9 + bool "Libertas SD 8686 v9" + help + Firmware files (version 9) for the Marvell SD8686 module + +config BR2_PACKAGE_LINUX_FIRMWARE_LIBERTAS_SD8688 + bool "Libertas SD 8688" + help + Firmware files for the Marvell SD8688 module + +config BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_SD8787 + bool "Marvell Wifi-Ex SD 8787" + help + Firmware files for the Marvell Wifi-Ex 8787 module on SDIO. + +config BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT61 + bool "Ralink rt2501/rt61" + help + Ralink rt2501/rt61 + +config BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73 + bool "Ralink rt73" + help + Ralink rt73 + +config BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT2XX + bool "Ralink rt27xx/rt28xx/rt30xx" + help + Ralink rt27xx/rt28xx/rt30xx + +config BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX + bool "Realtek 81xx" + help + Realtek 8188/8192 + +config BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX + bool "Realtek 87xx" + help + Realtek 8712/8723 + +config BR2_PACKAGE_LINUX_FIRMWARE_TI_WL127X + bool "TI wl127X" + help + Firmware files for WLAN and Bluetooth modules wl1271 and wl1273 + +config BR2_PACKAGE_LINUX_FIRMWARE_TI_WL128X + bool "TI wl128X" + help + Firmware files for WLAN and Bluetooth modules wl128x + +endmenu + +menu "DVB firmwares" + +config BR2_PACKAGE_LINUX_FIRMWARE_DIB0700 + bool "DiBcom dib0700" + help + Firmware file for dib0700-based USB DVB tuner driver + +config BR2_PACKAGE_LINUX_FIRMWARE_H5_DRXK + bool "Terratec H5 DRX-K" + help + Firmware file for Terratec H5 DRX-K based DVB tuner driver + +config BR2_PACKAGE_LINUX_FIRMWARE_XC5000 + bool "Xceive xc5000" + help + Firmware file for xc5000-based DVB tuner driver + +endmenu + +endif diff --git a/package/linux-firmware/linux-firmware.mk b/package/linux-firmware/linux-firmware.mk new file mode 100644 index 0000000000..a88bc4cb99 --- /dev/null +++ b/package/linux-firmware/linux-firmware.mk @@ -0,0 +1,129 @@ +################################################################################ +# +# linux-firmware +# +################################################################################ + +LINUX_FIRMWARE_VERSION = 07ea598af5b9dde3acdf279846b062fa1b2987b8 +LINUX_FIRMWARE_SITE = http://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git +LINUX_FIRMWARE_SITE_METHOD = git + +# rt2501/rt61 +LINUX_FIRMWARE_FILES_$(BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT61) += \ + rt2561.bin rt2561s.bin rt2661.bin LICENCE.ralink-firmware.txt + + +# rt73 +LINUX_FIRMWARE_FILES_$(BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73) += \ + rt73.bin LICENCE.ralink-firmware.txt + +# rt2xx +LINUX_FIRMWARE_FILES_$(BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT2XX) += \ + rt2860.bin rt2870.bin rt3070.bin rt3071.bin rt3090.bin \ + LICENCE.ralink-firmware.txt + +# rtl81xx +LINUX_FIRMWARE_FILES_$(BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX) += \ + rtlwifi/rtl8192cfw.bin rtlwifi/rtl8192cfwU.bin \ + rtlwifi/rtl8192cfwU_B.bin rtlwifi/rtl8192cufw.bin \ + rtlwifi/rtl8192defw.bin rtlwifi/rtl8192sefw.bin \ + rtlwifi/rtl8188efw.bin \ + LICENCE.rtlwifi_firmware.txt + +# rtl87xx +LINUX_FIRMWARE_FILES_$(BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX) += \ + rtlwifi/rtl8712u.bin rtlwifi/rtl8723fw.bin \ + rtlwifi/rtl8723fw_B.bin \ + LICENCE.rtlwifi_firmware.txt + +# ar7010 +LINUX_FIRMWARE_FILES_$(BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_7010) += \ + LICENCE.atheros_firmware ar7010.fw ar7010_1_1.fw htc_7010.fw + +# ar9271 +LINUX_FIRMWARE_FILES_$(BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9271) += \ + LICENCE.atheros_firmware ar9271.fw htc_9271.fw + +# sd8686 v8 +LINUX_FIRMWARE_FILES_$(BR2_PACKAGE_LINUX_FIRMWARE_LIBERTAS_SD8686_V8) += \ + libertas/sd8686_v8.bin libertas/sd8686_v8_helper.bin LICENCE.Marvell + +# sd8686 v9 +LINUX_FIRMWARE_FILES_$(BR2_PACKAGE_LINUX_FIRMWARE_LIBERTAS_SD8686_V9) += \ + libertas/sd8686_v9.bin libertas/sd8686_v9_helper.bin LICENCE.Marvell + +# sd8688 +LINUX_FIRMWARE_FILES_$(BR2_PACKAGE_LINUX_FIRMWARE_LIBERTAS_SD8688) += \ + libertas/sd8688.bin libertas/sd8688_helper.bin LICENCE.Marvell + +# sd8787 +LINUX_FIRMWARE_FILES_$(BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_SD8787) += \ + mrvl/sd8787_uapsta.bin LICENCE.Marvell + +# wl127x +LINUX_FIRMWARE_FILES_$(BR2_PACKAGE_LINUX_FIRMWARE_TI_WL127X) += \ + ti-connectivity/wl1271-fw-2.bin \ + ti-connectivity/wl1271-fw-ap.bin \ + ti-connectivity/wl1271-fw.bin \ + ti-connectivity/wl1271-nvs.bin \ + ti-connectivity/wl127x-fw-3.bin \ + ti-connectivity/wl127x-fw-plt-3.bin \ + ti-connectivity/wl127x-nvs.bin \ + ti-connectivity/wl127x-fw-4-mr.bin \ + ti-connectivity/wl127x-fw-4-plt.bin \ + ti-connectivity/wl127x-fw-4-sr.bin \ + ti-connectivity/wl127x-fw-5-mr.bin \ + ti-connectivity/wl127x-fw-5-plt.bin \ + ti-connectivity/wl127x-fw-5-sr.bin \ + ti-connectivity/TIInit_7.2.31.bts \ + LICENCE.ti-connectivity + +# wl128x +LINUX_FIRMWARE_FILES_$(BR2_PACKAGE_LINUX_FIRMWARE_TI_WL128X) += \ + ti-connectivity/wl128x-fw-3.bin \ + ti-connectivity/wl128x-fw-ap.bin \ + ti-connectivity/wl128x-fw-plt-3.bin \ + ti-connectivity/wl128x-fw.bin \ + ti-connectivity/wl1271-nvs.bin \ + ti-connectivity/wl128x-nvs.bin \ + ti-connectivity/wl12xx-nvs.bin \ + ti-connectivity/wl128x-fw-4-mr.bin \ + ti-connectivity/wl128x-fw-4-plt.bin \ + ti-connectivity/wl128x-fw-4-sr.bin \ + ti-connectivity/wl128x-fw-5-mr.bin \ + ti-connectivity/wl128x-fw-5-plt.bin \ + ti-connectivity/wl128x-fw-5-sr.bin \ + ti-connectivity/TIInit_7.2.31.bts \ + LICENCE.ti-connectivity + +# iwlwifi 5000. Multiple files are available (iwlwifi-5000-1.ucode, +# iwlwifi-5000-2.ucode, iwlwifi-5000-5.ucode), corresponding to +# different versions of the firmware API. For now, we only install the +# most recent one. +LINUX_FIRMWARE_FILES_$(BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_5000) += \ + iwlwifi-5000-5.ucode LICENCE.iwlwifi_firmware + +LINUX_FIRMWARE_FILES_$(BR2_PACKAGE_LINUX_FIRMWARE_XC5000) += \ + dvb-fe-xc5000-1.6.114.fw + +LINUX_FIRMWARE_FILES_$(BR2_PACKAGE_LINUX_FIRMWARE_DIB0700) += \ + dvb-usb-dib0700-1.20.fw + +LINUX_FIRMWARE_FILES_$(BR2_PACKAGE_LINUX_FIRMWARE_H5_DRXK) += \ + dvb-usb-terratec-h5-drxk.fw + +# brcm +LINUX_FIRMWARE_FILES_$(BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XX) += \ + brcm/bcm43xx-0.fw brcm/bcm43xx_hdr-0.fw + +ifneq ($(LINUX_FIRMWARE_FILES_y),) + +define LINUX_FIRMWARE_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/lib/firmware + $(TAR) c -C $(@D) $(LINUX_FIRMWARE_FILES_y) | \ + $(TAR) x -C $(TARGET_DIR)/lib/firmware +endef + +endif + +$(eval $(generic-package)) diff --git a/package/linux-fusion/linux-fusion-8.1.2-fix-warnings-at-link-time.patch b/package/linux-fusion/linux-fusion-8.1.2-fix-warnings-at-link-time.patch deleted file mode 100644 index 7c46eaff00..0000000000 --- a/package/linux-fusion/linux-fusion-8.1.2-fix-warnings-at-link-time.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 7884688ba7a2e4cb7772cbedb34245a7fc9bf9d9 Mon Sep 17 00:00:00 2001 -From: Lionel Landwerlin -Date: Wed, 3 Nov 2010 10:25:17 +0100 -Subject: [PATCH] Fix warnings at link time - -Signed-off-by: Lionel Landwerlin ---- - linux/drivers/char/fusion/entries.c | 2 +- - linux/drivers/char/fusion/fusiondev.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/linux/drivers/char/fusion/entries.c b/linux/drivers/char/fusion/entries.c -index 11edd43..8d102cf 100644 ---- a/linux/drivers/char/fusion/entries.c -+++ b/linux/drivers/char/fusion/entries.c -@@ -28,7 +28,7 @@ - #include "fusiondev.h" - #include "entries.h" - --struct timeval now; -+static struct timeval now; - - void - fusion_entries_init(FusionEntries * entries, -diff --git a/linux/drivers/char/fusion/fusiondev.c b/linux/drivers/char/fusion/fusiondev.c -index 2457bc1..7c7680d 100644 ---- a/linux/drivers/char/fusion/fusiondev.c -+++ b/linux/drivers/char/fusion/fusiondev.c -@@ -64,7 +64,7 @@ - MODULE_LICENSE("GPL"); - MODULE_AUTHOR("Denis Oliver Kropp "); - --struct proc_dir_entry *proc_fusion_dir; -+static struct proc_dir_entry *proc_fusion_dir; - - static int fusion_major = FUSION_MAJOR; - --- -1.6.0.6 - diff --git a/package/linux-fusion/linux-fusion.mk b/package/linux-fusion/linux-fusion.mk index 440b8b9aa2..433c2d64f6 100644 --- a/package/linux-fusion/linux-fusion.mk +++ b/package/linux-fusion/linux-fusion.mk @@ -1,20 +1,20 @@ -############################################################# +################################################################################ # # linux-fusion # -############################################################# -LINUX_FUSION_VERSION = 8.1.2 -LINUX_FUSION_SOURCE = linux-fusion-$(LINUX_FUSION_VERSION).tar.gz +################################################################################ + +LINUX_FUSION_VERSION = 9.0.2 LINUX_FUSION_SITE = http://directfb.org/downloads/Core/linux-fusion LINUX_FUSION_INSTALL_STAGING = YES -LINUX_FUSION_DEPENDENCIES = linux26 +LINUX_FUSION_DEPENDENCIES = linux -LINUX_FOR_FUSION=$(LINUX26_VERSION_PROBED) +LINUX_FOR_FUSION=$(LINUX_VERSION_PROBED) LINUX_FUSION_ETC_DIR=$(TARGET_DIR)/etc/udev/rules.d LINUX_FUSION_MAKE_OPTS = KERNEL_VERSION=$(LINUX_FOR_FUSION) -LINUX_FUSION_MAKE_OPTS += KERNEL_BUILD=$(LINUX26_DIR) -LINUX_FUSION_MAKE_OPTS += KERNEL_SOURCE=$(LINUX26_DIR) +LINUX_FUSION_MAKE_OPTS += KERNEL_BUILD=$(LINUX_DIR) +LINUX_FUSION_MAKE_OPTS += KERNEL_SOURCE=$(LINUX_DIR) LINUX_FUSION_MAKE_OPTS += SYSROOT=$(TARGET_DIR) LINUX_FUSION_MAKE_OPTS += ARCH=$(KERNEL_ARCH) @@ -22,15 +22,15 @@ LINUX_FUSION_MAKE_OPTS += CROSS_COMPILE=$(TARGET_CROSS) LINUX_FUSION_MAKE_OPTS += KERNEL_MODLIB=/lib/modules/$(LINUX_FOR_FUSION)/kernel define LINUX_FUSION_BUILD_CMDS - $(MAKE) $(TARGET_CONFIGURE_OPTS) $(LINUX_FUSION_MAKE_OPTS) -C $(@D) + $(TARGET_CONFIGURE_OPTS) $(MAKE) $(LINUX_FUSION_MAKE_OPTS) -C $(@D) endef define LINUX_FUSION_INSTALL_STAGING_CMDS - $(MAKE) $(TARGET_CONFIGURE_OPTS) $(LINUX_FUSION_MAKE_OPTS) INSTALL_MOD_PATH=$(STAGING_DIR) -C $(@D) headers_install + $(TARGET_CONFIGURE_OPTS) $(MAKE) $(LINUX_FUSION_MAKE_OPTS) INSTALL_MOD_PATH=$(STAGING_DIR) -C $(@D) headers_install endef define LINUX_FUSION_INSTALL_TARGET_CMDS - $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + $(TARGET_CONFIGURE_OPTS) $(MAKE) \ $(LINUX_FUSION_MAKE_OPTS) \ INSTALL_MOD_PATH=$(TARGET_DIR) \ -C $(@D) install @@ -48,4 +48,4 @@ define LINUX_FUSION_UNINSTALL_TARGET_CMDS rm -f $(LINUX_FUSION_ETC_DIR)/40-fusion.rules endef -$(eval $(call GENTARGETS,package,linux-fusion)) +$(eval $(generic-package)) diff --git a/package/linux-headers/3.0.101/linux-headers-headers_install-fix-__packed-in-exported-kernel-head.patch b/package/linux-headers/3.0.101/linux-headers-headers_install-fix-__packed-in-exported-kernel-head.patch new file mode 100644 index 0000000000..8777b71639 --- /dev/null +++ b/package/linux-headers/3.0.101/linux-headers-headers_install-fix-__packed-in-exported-kernel-head.patch @@ -0,0 +1,46 @@ +From f210735fe2f17a6225432ee3d1239bcf23a8659c Mon Sep 17 00:00:00 2001 +From: Markus Trippelsdorf +Date: Fri, 24 Jun 2011 15:51:00 +0200 +Subject: [PATCH] headers_install: fix __packed in exported kernel headers +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +checkpatch.pl warns about using __attribute__((packed)) in kernel +headers: "__packed is preferred over __attribute__((packed))". If one +follows that advice it could cause problems in the exported header +files, because the outside world doesn't know about this shortcut. + +For example busybox will fail to compile: + CC miscutils/ubi_attach_detach.o + In file included from miscutils/ubi_attach_detach.c:27:0: + /usr/include/mtd/ubi-user.h:330:3: error: conflicting types for ‘__packed’ + /usr/include/mtd/ubi-user.h:314:3: note: previous declaration of ‘__packed’ was here +... + +Fix the problem by substituting __packed with __attribute__((packed)) in +the header_install.pl script. + +Cc: Artem Bityutskiy +CC: Joe Perches +Signed-off-by: Markus Trippelsdorf +Signed-off-by: Michal Marek +--- + scripts/headers_install.pl | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl +index efb3be1..48462be 100644 +--- a/scripts/headers_install.pl ++++ b/scripts/headers_install.pl +@@ -35,6 +35,7 @@ foreach my $file (@files) { + $line =~ s/([\s(])__iomem\s/$1/g; + $line =~ s/\s__attribute_const__\s/ /g; + $line =~ s/\s__attribute_const__$//g; ++ $line =~ s/\b__packed\b/__attribute__((packed))/g; + $line =~ s/^#include //; + $line =~ s/(^|\s)(inline)\b/$1__$2__/g; + $line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g; +-- +1.7.5.4 + diff --git a/package/linux-headers/3.3.8/linux-fix-umode_t.patch b/package/linux-headers/3.3.8/linux-fix-umode_t.patch new file mode 100644 index 0000000000..9663662254 --- /dev/null +++ b/package/linux-headers/3.3.8/linux-fix-umode_t.patch @@ -0,0 +1,22 @@ +Fix a problem with the 3.3 kernel headers. Specifically, the umode_t type +is defined within a __KERNEL__ preprocessor ifdef region, and so the type +is not usable by non-kernel code. Visit the following URL for more details. + +* http://www.spinics.net/lists/linux-fsdevel/msg52638.html + +The commit that created the problem can be seen at the following URL. + +* http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=commitdiff;h=0583fcc96bb117763c0fa74c123573c0112dec65 + +diff -Nur a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h +--- a/include/linux/ext2_fs.h 2012-03-18 23:15:34.000000000 +0000 ++++ b/include/linux/ext2_fs.h 2012-03-21 11:47:53.015548437 +0000 +@@ -209,7 +209,7 @@ + #define EXT2_OTHER_FLMASK (EXT2_NODUMP_FL | EXT2_NOATIME_FL) + + /* Mask out flags that are inappropriate for the given type of inode. */ +-static inline __u32 ext2_mask_flags(umode_t mode, __u32 flags) ++static inline __u32 ext2_mask_flags(unsigned short mode, __u32 flags) + { + if (S_ISDIR(mode)) + return flags; diff --git a/package/linux-headers/Config.in.host b/package/linux-headers/Config.in.host new file mode 100644 index 0000000000..7ed476bf13 --- /dev/null +++ b/package/linux-headers/Config.in.host @@ -0,0 +1,96 @@ +config BR2_PACKAGE_HOST_LINUX_HEADERS + bool + +comment "Kernel Header Options" + +choice + prompt "Kernel Headers" + default BR2_KERNEL_HEADERS_3_12 + help + Select the version of kernel header files you wish to use. + You must select the correct set of header files to match + the kernel you intend to use on your target system. + + For the snapshot, you have to provide the + linux-2.6.tar.bz2 tarball in your download dir. + + config BR2_KERNEL_HEADERS_3_0 + bool "Linux 3.0.x kernel headers" + depends on !BR2_arc + + config BR2_KERNEL_HEADERS_3_1 + bool "Linux 3.1.x kernel headers" + depends on BR2_DEPRECATED && !BR2_arc + + config BR2_KERNEL_HEADERS_3_2 + bool "Linux 3.2.x kernel headers" + depends on !BR2_arc + + config BR2_KERNEL_HEADERS_3_3 + bool "Linux 3.3.x kernel headers" + depends on BR2_DEPRECATED && !BR2_arc + + config BR2_KERNEL_HEADERS_3_4 + bool "Linux 3.4.x kernel headers" + depends on !BR2_arc + + config BR2_KERNEL_HEADERS_3_5 + bool "Linux 3.5.x kernel headers" + depends on BR2_DEPRECATED && !BR2_arc + + config BR2_KERNEL_HEADERS_3_6 + bool "Linux 3.6.x kernel headers" + depends on BR2_DEPRECATED && !BR2_arc + + config BR2_KERNEL_HEADERS_3_7 + bool "Linux 3.7.x kernel headers" + depends on BR2_DEPRECATED && !BR2_arc + + config BR2_KERNEL_HEADERS_3_8 + bool "Linux 3.8.x kernel headers" + depends on BR2_DEPRECATED && !BR2_arc + + config BR2_KERNEL_HEADERS_3_9 + bool "Linux 3.9.x kernel headers" + depends on BR2_DEPRECATED + + config BR2_KERNEL_HEADERS_3_10 + bool "Linux 3.10.x kernel headers" + + config BR2_KERNEL_HEADERS_3_11 + bool "Linux 3.11.x kernel headers" + + config BR2_KERNEL_HEADERS_3_12 + bool "Linux 3.12.x kernel headers" + + config BR2_KERNEL_HEADERS_VERSION + bool "Manually specified Linux version" + + config BR2_KERNEL_HEADERS_SNAP + bool "Local Linux snapshot (linux-2.6.tar.bz2)" +endchoice + +config BR2_DEFAULT_KERNEL_VERSION + string "linux version" + depends on BR2_KERNEL_HEADERS_VERSION + help + Specify the version you want to use. + E.G.: 3.6.10 + +config BR2_DEFAULT_KERNEL_HEADERS + string + default "3.0.101" if BR2_KERNEL_HEADERS_3_0 + default "3.1.10" if BR2_KERNEL_HEADERS_3_1 + default "3.2.52" if BR2_KERNEL_HEADERS_3_2 + default "3.3.8" if BR2_KERNEL_HEADERS_3_3 + default "3.4.70" if BR2_KERNEL_HEADERS_3_4 + default "3.5.7" if BR2_KERNEL_HEADERS_3_5 + default "3.6.11" if BR2_KERNEL_HEADERS_3_6 + default "3.7.10" if BR2_KERNEL_HEADERS_3_7 + default "3.8.13" if BR2_KERNEL_HEADERS_3_8 + default "3.9.11" if BR2_KERNEL_HEADERS_3_9 + default "3.10.20" if BR2_KERNEL_HEADERS_3_10 + default "3.11.9" if BR2_KERNEL_HEADERS_3_11 + default "3.12.1" if BR2_KERNEL_HEADERS_3_12 + default "2.6" if BR2_KERNEL_HEADERS_SNAP + default BR2_DEFAULT_KERNEL_VERSION if BR2_KERNEL_HEADERS_VERSION diff --git a/package/linux-headers/linux-headers.mk b/package/linux-headers/linux-headers.mk new file mode 100644 index 0000000000..30d3076592 --- /dev/null +++ b/package/linux-headers/linux-headers.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# linux-headers +# +################################################################################ + +# This package is used to provide Linux kernel headers for the +# internal toolchain backend. + +LINUX_HEADERS_VERSION = $(call qstrip,$(BR2_DEFAULT_KERNEL_HEADERS)) +ifeq ($(findstring x2.6.,x$(LINUX_HEADERS_VERSION)),x2.6.) +LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v2.6/ +else +LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v3.x/ +endif +LINUX_HEADERS_SOURCE = linux-$(LINUX_HEADERS_VERSION).tar.xz + +LINUX_HEADERS_INSTALL_STAGING = YES + +define LINUX_HEADERS_INSTALL_STAGING_CMDS + (cd $(@D); \ + $(TARGET_MAKE_ENV) $(MAKE) \ + ARCH=$(KERNEL_ARCH) \ + HOSTCC="$(HOSTCC)" \ + HOSTCFLAGS="$(HOSTCFLAGS)" \ + HOSTCXX="$(HOSTCXX)" \ + INSTALL_HDR_PATH=$(STAGING_DIR)/usr \ + headers_install) +endef + +$(eval $(generic-package)) diff --git a/package/linux-pam/Config.in b/package/linux-pam/Config.in new file mode 100644 index 0000000000..aff1b86243 --- /dev/null +++ b/package/linux-pam/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LINUX_PAM + bool "linux-pam" + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + select BR2_PACKAGE_FLEX + depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) + help + A Security Framework that Provides Authentication for Applications + + http://linux-pam.org + +comment "linux-pam needs a toolchain w/ wchar, locale" + depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) + diff --git a/package/linux-pam/linux-pam-01-configure.patch b/package/linux-pam/linux-pam-01-configure.patch new file mode 100644 index 0000000000..d39261f74e --- /dev/null +++ b/package/linux-pam/linux-pam-01-configure.patch @@ -0,0 +1,19 @@ +Add check for ruserok + +ruserok is not available/functional in uclibc, provide conditions for compilation +where needed. + +Signed-off-by: Dmitry Golubovsky + +diff -urN a/configure.in b/configure.in +--- a/configure.in 2012-08-17 03:48:24.000000000 -0500 ++++ b/configure.in 2013-07-17 09:49:23.760254684 -0500 +@@ -526,7 +526,7 @@ + AC_CHECK_FUNCS(strcspn strdup strspn strstr strtol uname) + AC_CHECK_FUNCS(getutent_r getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r) + AC_CHECK_FUNCS(getgrouplist getline getdelim) +-AC_CHECK_FUNCS(inet_ntop inet_pton innetgr ruserok_af) ++AC_CHECK_FUNCS(inet_ntop inet_pton innetgr ruserok_af ruserok) + + AC_CHECK_FUNCS(unshare, [UNSHARE=yes], [UNSHARE=no]) + AM_CONDITIONAL([HAVE_UNSHARE], [test "$UNSHARE" = yes]) diff --git a/package/linux-pam/linux-pam-02-doc-makefile-am.patch b/package/linux-pam/linux-pam-02-doc-makefile-am.patch new file mode 100644 index 0000000000..8fa2dda2fc --- /dev/null +++ b/package/linux-pam/linux-pam-02-doc-makefile-am.patch @@ -0,0 +1,31 @@ +Disable generation of documentation + +Generation of documentation is not necessary in Buildroot, disable it completely. + +Signed-off-by: Dmitry Golubovsky + +diff -urN a/doc/Makefile.am b/doc/Makefile.am +--- a/doc/Makefile.am 2012-08-15 06:08:43.000000000 -0500 ++++ b/doc/Makefile.am 2013-07-17 09:54:53.000000000 -0500 +@@ -2,8 +2,6 @@ + # Copyright (c) 2005, 2006 Thorsten Kukuk + # + +-SUBDIRS = man specs sag adg mwg +- + CLEANFILES = *~ + + dist_html_DATA = index.html +@@ -11,11 +9,4 @@ + ####################################################### + + releasedocs: all +- $(mkinstalldirs) $(top_builddir)/Linux-PAM-$(VERSION)/doc/specs +- cp -av specs/draft-morgan-pam-current.txt \ +- $(top_builddir)/Linux-PAM-$(VERSION)/doc/specs/ +- cp -av $(srcdir)/specs/rfc86.0.txt \ +- $(top_builddir)/Linux-PAM-$(VERSION)/doc/specs/ +- make -C sag releasedocs +- make -C adg releasedocs +- make -C mwg releasedocs ++ /bin/true diff --git a/package/linux-pam/linux-pam-03-group.patch b/package/linux-pam/linux-pam-03-group.patch new file mode 100644 index 0000000000..a94cf9e3db --- /dev/null +++ b/package/linux-pam/linux-pam-03-group.patch @@ -0,0 +1,26 @@ +Conditionally compile per innetgr availability + +innetgr is not available/functional in uclibc, provide conditions for compilation. + +Signed-off-by: Dmitry Golubovsky + +Index: linux-pam-1.1.4/modules/pam_group/pam_group.c +============================================================================ +--- linux-pam-1.1.4/modules/pam_group/pam_group.c 2011-06-21 05:04:56.000000000 -0400 ++++ linux-pam-1.1.4/modules/pam_group/pam_group.c 2012-08-09 21:35:06.000000000 -0400 +@@ -655,8 +655,14 @@ + continue; + } + /* If buffer starts with @, we are using netgroups */ +- if (buffer[0] == '@') ++ if (buffer[0] == '@') { ++#ifdef HAVE_INNETGR + good &= innetgr (&buffer[1], NULL, user, NULL); ++#else ++ good = 0; ++ pam_syslog (pamh, LOG_ERR, "pam_group does not have netgroup support"); ++#endif /* HAVE_INNETGR */ ++ } + /* otherwise, if the buffer starts with %, it's a UNIX group */ + else if (buffer[0] == '%') + good &= pam_modutil_user_in_group_nam_nam(pamh, user, &buffer[1]); diff --git a/package/linux-pam/linux-pam-04-mkdir.patch b/package/linux-pam/linux-pam-04-mkdir.patch new file mode 100644 index 0000000000..00056daf3d --- /dev/null +++ b/package/linux-pam/linux-pam-04-mkdir.patch @@ -0,0 +1,17 @@ +$(mkdir_p) is obsolete for newer automake, use $(MKDIR_P) instead. +Upstream should really gettextize with a newer version before packing up. + +Signed-off-by: Gustavo Zacarias + +diff -Nura Linux-PAM-1.1.7.orig/po/Makefile.in.in Linux-PAM-1.1.7/po/Makefile.in.in +--- Linux-PAM-1.1.7.orig/po/Makefile.in.in 2013-09-11 20:45:16.610770002 -0300 ++++ Linux-PAM-1.1.7/po/Makefile.in.in 2013-09-11 20:45:28.030145316 -0300 +@@ -31,7 +31,7 @@ + INSTALL = @INSTALL@ + INSTALL_DATA = @INSTALL_DATA@ + mkinstalldirs = $(SHELL) @install_sh@ -d +-mkdir_p = @mkdir_p@ ++mkdir_p = @MKDIR_P@ + + GMSGFMT_ = @GMSGFMT@ + GMSGFMT_no = @GMSGFMT@ diff --git a/package/linux-pam/linux-pam-05-succeed.patch b/package/linux-pam/linux-pam-05-succeed.patch new file mode 100644 index 0000000000..8a675efa20 --- /dev/null +++ b/package/linux-pam/linux-pam-05-succeed.patch @@ -0,0 +1,31 @@ +Conditionally compile per innetgr availability + +innetgr is not available/functional in uclibc, provide conditions for compilation. + +Signed-off-by: Dmitry Golubovsky + +Index: linux-pam-1.1.4/modules/pam_succeed_if/pam_succeed_if.c +============================================================================ +--- linux-pam-1.1.4/modules/pam_succeed_if/pam_succeed_if.c 2011-06-21 05:04:56.000000000 -0400 ++++ linux-pam-1.1.4/modules/pam_succeed_if/pam_succeed_if.c 2012-08-09 21:05:02.000000000 -0400 +@@ -233,16 +233,20 @@ + static int + evaluate_innetgr(const char *host, const char *user, const char *group) + { ++#ifdef HAVE_INNETGR + if (innetgr(group, host, user, NULL) == 1) + return PAM_SUCCESS; ++#endif /* HAVE_INNETGR */ + return PAM_AUTH_ERR; + } + /* Return PAM_SUCCESS if the (host,user) is NOT in the netgroup. */ + static int + evaluate_notinnetgr(const char *host, const char *user, const char *group) + { ++#ifdef HAVE_INNETGR + if (innetgr(group, host, user, NULL) == 0) + return PAM_SUCCESS; ++#endif /* HAVE_INNETGR */ + return PAM_AUTH_ERR; + } + diff --git a/package/linux-pam/linux-pam-06-time.patch b/package/linux-pam/linux-pam-06-time.patch new file mode 100644 index 0000000000..58d7c9f024 --- /dev/null +++ b/package/linux-pam/linux-pam-06-time.patch @@ -0,0 +1,26 @@ +Conditionally compile per innetgr availability + +innetgr is not available/functional in uclibc, provide conditions for compilation. + +Signed-off-by: Dmitry Golubovsky + +Index: linux-pam-1.1.4/modules/pam_time/pam_time.c +============================================================================ +--- linux-pam-1.1.4/modules/pam_time/pam_time.c 2011-06-21 05:04:56.000000000 -0400 ++++ linux-pam-1.1.4/modules/pam_time/pam_time.c 2012-08-09 21:02:29.000000000 -0400 +@@ -554,8 +554,14 @@ + continue; + } + /* If buffer starts with @, we are using netgroups */ +- if (buffer[0] == '@') ++ if (buffer[0] == '@') { ++#ifdef HAVE_INNETGR + good &= innetgr (&buffer[1], NULL, user, NULL); ++#else ++ good = 0; ++ pam_syslog (pamh, LOG_ERR, "pam_time does not have netgroup support"); ++#endif /* HAVE_INNETGR */ ++ } + else + good &= logic_field(pamh, user, buffer, count, is_same); + D(("with user: %s", good ? "passes":"fails" )); diff --git a/package/linux-pam/linux-pam-07-rhosts.patch b/package/linux-pam/linux-pam-07-rhosts.patch new file mode 100644 index 0000000000..58f9adbb1a --- /dev/null +++ b/package/linux-pam/linux-pam-07-rhosts.patch @@ -0,0 +1,24 @@ +Conditionally compile per ruserok availability + +ruserok is not available/functional in uclibc, provide conditions for compilation. + +Signed-off-by: Dmitry Golubovsky + +Index: linux-pam-1.1.4/modules/pam_rhosts/pam_rhosts.c +============================================================================ +--- linux-pam-1.1.4/modules/pam_rhosts/pam_rhosts.c 2011-06-21 05:04:56.000000000 -0400 ++++ linux-pam-1.1.4/modules/pam_rhosts/pam_rhosts.c 2012-08-09 21:19:34.000000000 -0400 +@@ -114,8 +114,12 @@ + #ifdef HAVE_RUSEROK_AF + retval = ruserok_af (rhost, as_root, ruser, luser, PF_UNSPEC); + #else ++ #ifdef HAVE_RUSEROK + retval = ruserok (rhost, as_root, ruser, luser); +-#endif ++ #else ++ retval = -1; ++ #endif /* HAVE_RUSEROK */ ++#endif /*HAVE_RUSEROK_AF */ + if (retval != 0) { + if (!opt_silent || opt_debug) + pam_syslog(pamh, LOG_WARNING, "denied access to %s@%s as %s", diff --git a/package/linux-pam/linux-pam.mk b/package/linux-pam/linux-pam.mk new file mode 100644 index 0000000000..7d2cbd3b54 --- /dev/null +++ b/package/linux-pam/linux-pam.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# linux-pam +# +################################################################################ + +LINUX_PAM_VERSION = 1.1.8 +LINUX_PAM_SOURCE = Linux-PAM-$(LINUX_PAM_VERSION).tar.bz2 +LINUX_PAM_SITE = http://linux-pam.org/library/ +LINUX_PAM_INSTALL_STAGING = YES +LINUX_PAM_CONF_OPT = \ + --disable-prelude \ + --disable-isadir \ + --disable-nis \ + --disable-db \ + --disable-regenerate-docu \ + --enable-securedir=/lib/security \ + --libdir=/lib +LINUX_PAM_DEPENDENCIES = flex host-flex host-pkgconf +LINUX_PAM_AUTORECONF = YES +LINUX_PAM_LICENSE = BSD-3c +LINUX_PAM_LICENSE_FILES = Copyright + +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) + LINUX_PAM_DEPENDENCIES += gettext + LINUX_PAM_MAKE_OPT += LIBS=-lintl +endif + +$(eval $(autotools-package)) diff --git a/package/lite/Config.in b/package/lite/Config.in index 8840fe47bf..398b9e1152 100644 --- a/package/lite/Config.in +++ b/package/lite/Config.in @@ -2,7 +2,7 @@ config BR2_PACKAGE_LITE bool "LiTE (toolbox engine)" depends on BR2_PACKAGE_DIRECTFB help - LiTE stands for LiTE is a Toolbox Engine. + LiTE stands for LiTE is a Toolbox Engine. Its role is to facilitate the functions of DirectFB so that a toolbox could be written on top of DirectFB with less effort. As such LiTE has abstractions for the underlying graphics and diff --git a/package/lite/lite-dfbspy-stat.patch b/package/lite/lite-dfbspy-stat.patch new file mode 100644 index 0000000000..5ca73691ed --- /dev/null +++ b/package/lite/lite-dfbspy-stat.patch @@ -0,0 +1,53 @@ +From upstream git (git://git.directfb.org/git/directfb/libs/LiTE.git) + +From ffe0ce78327a63ddb1265328ea9b5b03acdca019 Mon Sep 17 00:00:00 2001 +From: Denis Oliver Kropp +Date: Fri, 1 Apr 2011 20:20:26 +0200 +Subject: [PATCH] dfbspy: Build fix for dfbspy example. + +--- + examples/dfbspy.c | 20 ++++++++++---------- + 1 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/examples/dfbspy.c b/examples/dfbspy.c +index 5f36f0b..c7f9725 100644 +--- a/examples/dfbspy.c ++++ b/examples/dfbspy.c +@@ -89,9 +89,9 @@ read_stat( FusionStat *stat, int world ) + + /**************************************************************************************************/ + +-#define CALC(x) stat.x = (int)(((s.x - last_stat.x) * 1000 / (float) diff) + 0.5f) ++#define CALC(x) stats.x = (int)(((s.x - last_stat.x) * 1000 / (float) diff) + 0.5f) + +-static FusionStat last_stat, stat; ++static FusionStat last_stat, stats; + static long long last_millis; + + static int +@@ -145,14 +145,14 @@ static const struct { + void (*update)( LiteLabel *label, void *ctx ); + void *ctx; + } list[] = { +- { "lease/purchase", update_number, &stat.lease_purchase }, +- { "cede", update_number, &stat.cede }, +- { "attach", update_number, &stat.attach }, +- { "detach", update_number, &stat.detach }, +- { "ref up", update_number, &stat.ref_up }, +- { "ref down", update_number, &stat.ref_down }, +- { "prevail/swoop", update_number, &stat.prevail_swoop }, +- { "dismiss", update_number, &stat.dismiss } ++ { "lease/purchase", update_number, &stats.lease_purchase }, ++ { "cede", update_number, &stats.cede }, ++ { "attach", update_number, &stats.attach }, ++ { "detach", update_number, &stats.detach }, ++ { "ref up", update_number, &stats.ref_up }, ++ { "ref down", update_number, &stats.ref_down }, ++ { "prevail/swoop", update_number, &stats.prevail_swoop }, ++ { "dismiss", update_number, &stats.dismiss } + }; + + #define NUM_LIST (sizeof(list)/sizeof(list[0])) +-- +1.7.6.3 + diff --git a/package/lite/lite-no-tests.patch b/package/lite/lite-no-tests.patch new file mode 100644 index 0000000000..3a47186512 --- /dev/null +++ b/package/lite/lite-no-tests.patch @@ -0,0 +1,11 @@ +--- a/Makefile.in.orig 2008-07-07 13:07:12.000000000 +0200 ++++ b/Makefile.in 2008-07-07 13:07:05.000000000 +0200 +@@ -202,7 +202,7 @@ + target_vendor = @target_vendor@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ +-SUBDIRS = data fonts lite leck examples tests ++SUBDIRS = data fonts lite leck examples + EXTRA_DIST = TODO lite.pc.in leck.pc.in + pkgconfigdir = $(libdir)/pkgconfig + pkgconfig_DATA = lite.pc leck.pc diff --git a/package/lite/lite-pkg-config.patch b/package/lite/lite-pkg-config.patch new file mode 100644 index 0000000000..cdd24162c7 --- /dev/null +++ b/package/lite/lite-pkg-config.patch @@ -0,0 +1,22 @@ +From 7982cccbb6ad58f3802bb266467290200d130a48 Mon Sep 17 00:00:00 2001 +From: Ville Syrjala +Date: Sat, 27 Nov 2010 01:14:25 +0200 +Subject: [PATCH] Too many '\' characters in the .pc file + +--- + lite.pc.in | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/lite.pc.in b/lite.pc.in +index 48eb969..3a21eaa 100644 +--- a/lite.pc.in ++++ b/lite.pc.in +@@ -9,4 +9,4 @@ Description: "LiTE" is a Toolkit Engine + Requires: directfb >= @DFB_REQUIRED_VERSION@ + Version: @VERSION@ + Libs: -L${libdir} -llite +-Cflags: -I${includedir} -DLITEFONTDIR=\\\"@LITEFONTDIR@\\\" ++Cflags: -I${includedir} -DLITEFONTDIR=\"@LITEFONTDIR@\" +-- +1.7.1 + diff --git a/package/lite/lite.mk b/package/lite/lite.mk index 678be865cd..1784d1fed9 100644 --- a/package/lite/lite.mk +++ b/package/lite/lite.mk @@ -1,13 +1,13 @@ -############################################################# +################################################################################ # -# LiTE +# lite # -############################################################# -LITE_VERSION:=0.8.10 -LITE_SOURCE:=LiTE-$(LITE_VERSION).tar.gz -LITE_SITE:=http://www.directfb.org/downloads/Libs +################################################################################ + +LITE_VERSION = 0.8.10 +LITE_SOURCE = LiTE-$(LITE_VERSION).tar.gz +LITE_SITE = http://www.directfb.org/downloads/Libs LITE_INSTALL_STAGING = YES -LITE_INSTALL_TARGET = YES LITE_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) LDFLAGS=-L$(STAGING_DIR)/usr/lib install LITE_CONF_ENV = DFB_CFLAGS=-I$(STAGING_DIR)/usr/include/directfb LITE_DEPENDENCIES = directfb @@ -22,4 +22,4 @@ endef LITE_POST_INSTALL_TARGET_HOOKS += LITE_FINALIZE_INSTALL -$(eval $(call AUTOTARGETS,package,lite)) +$(eval $(autotools-package)) diff --git a/package/lite/no_tests.patch b/package/lite/no_tests.patch deleted file mode 100644 index c6e8092ff8..0000000000 --- a/package/lite/no_tests.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile.in.orig 2008-07-07 13:07:12.000000000 +0200 -+++ Makefile.in 2008-07-07 13:07:05.000000000 +0200 -@@ -202,7 +202,7 @@ - target_vendor = @target_vendor@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ --SUBDIRS = data fonts lite leck examples tests -+SUBDIRS = data fonts lite leck examples - EXTRA_DIST = TODO lite.pc.in leck.pc.in - pkgconfigdir = $(libdir)/pkgconfig - pkgconfig_DATA = lite.pc leck.pc diff --git a/package/live555/Config.in b/package/live555/Config.in new file mode 100644 index 0000000000..8193091840 --- /dev/null +++ b/package/live555/Config.in @@ -0,0 +1,33 @@ +config BR2_PACKAGE_LIVE555 + bool "live555" + depends on BR2_INSTALL_LIBSTDCPP + help + LIVE555 Streaming Media forms a set of C++ libraries for multimedia + streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). + + http://www.live555.com/liveMedia/ + +config BR2_PACKAGE_LIVE555_OPENRTSP + bool "OpenRTSP" + depends on BR2_PACKAGE_LIVE555 + default y + help + Live555 RTSP Client. + +config BR2_PACKAGE_LIVE555_MEDIASERVER + bool "live555MediaServer" + depends on BR2_PACKAGE_LIVE555 + default y + help + RTSP Server. Supports numerous media formats such as H.264 and MPEG2. + +config BR2_PACKAGE_LIVE555_MPEG2_INDEXER + bool "MPEG2TransportStreamIndexer" + depends on BR2_PACKAGE_LIVE555 + default y + help + MPEG2 Transport Stream Indexer. Provides indexes allowing 'trick play' + operation in the Live555MediaServer. + +comment "live555 needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/live555/live555.mk b/package/live555/live555.mk new file mode 100644 index 0000000000..83fe0e06fb --- /dev/null +++ b/package/live555/live555.mk @@ -0,0 +1,77 @@ +################################################################################ +# +# live555 +# +################################################################################ + +LIVE555_VERSION = 2011.06.16 +LIVE555_SOURCE = live.$(LIVE555_VERSION).tar.gz +LIVE555_SITE = http://www.live555.com/liveMedia/public/ +LIVE555_INSTALL_STAGING = YES + +define LIVE555_CONFIGURE_CMDS + echo 'COMPILE_OPTS = $$(INCLUDES) -I. -DSOCKLEN_T=socklen_t $(TARGET_CFLAGS)' >> $(@D)/config.linux + echo 'C_COMPILER = $(TARGET_CC)' >> $(@D)/config.linux + echo 'CPLUSPLUS_COMPILER = $(TARGET_CXX)' >> $(@D)/config.linux + echo 'LINK = $(TARGET_CXX) -o' >> $(@D)/config.linux + echo 'LINK_OPTS = -L. $(TARGET_LDFLAGS)' >> $(@D)/config.linux + (cd $(@D); ./genMakefiles linux) +endef + +define LIVE555_BUILD_CMDS + $(MAKE) -C $(@D) all +endef + +define LIVE555_CLEAN_CMDS + $(MAKE) -C $(@D) clean +endef + +LIVE555_HEADERS_TO_INSTALL = \ + liveMedia/include \ + groupsock/include \ + UsageEnvironment/include \ + BasicUsageEnvironment/include + +LIVE555_LIBS_TO_INSTALL = \ + liveMedia/libliveMedia.a \ + groupsock/libgroupsock.a \ + UsageEnvironment/libUsageEnvironment.a \ + BasicUsageEnvironment/libBasicUsageEnvironment.a + +LIVE555_FILES_TO_INSTALL- = +LIVE555_FILES_TO_INSTALL-y = +LIVE555_FILES_TO_INSTALL-$(BR2_PACKAGE_LIVE555_OPENRTSP) += testProgs/openRTSP +LIVE555_FILES_TO_INSTALL-$(BR2_PACKAGE_LIVE555_MEDIASERVER) += mediaServer/live555MediaServer +LIVE555_FILES_TO_INSTALL-$(BR2_PACKAGE_LIVE555_MPEG2_INDEXER) += testProgs/MPEG2TransportStreamIndexer +LIVE555_FILES_TO_INSTALL- += $(LIVE555_FILES_TO_INSTALL-y) + +define LIVE555_INSTALL_STAGING_CMDS + for i in $(LIVE555_HEADERS_TO_INSTALL); do \ + mkdir -p $(STAGING_DIR)/usr/include/live/`dirname $$i`; \ + cp -a $(@D)/$$i/* $(STAGING_DIR)/usr/include/live/`dirname $$i`; \ + done; \ + for i in $(LIVE555_LIBS_TO_INSTALL); do \ + $(INSTALL) -D -m 0755 $(@D)/$$i $(STAGING_DIR)/usr/lib/`basename $$i`; \ + done +endef + +define LIVE555_INSTALL_TARGET_CMDS + for i in $(LIVE555_FILES_TO_INSTALL-y); do \ + $(INSTALL) -D -m 0755 $(@D)/$$i $(TARGET_DIR)/usr/bin/`basename $$i`; \ + done +endef + +define LIVE555_UNINSTALL_STAGING_CMDS + rm -rf $(STAGING_DIR)/usr/include/live + for i in $(LIVE555_LIBS_TO_INSTALL); do \ + rm -f $(addprefix $(STAGING_DIR)/usr/lib/, `basename $$i`); \ + done +endef + +define LIVE555_UNINSTALL_TARGET_CMDS + for i in $(LIVE555_FILES_TO_INSTALL-); do \ + rm -f $(addprefix $(TARGET_DIR)/usr/bin/, `basename $$i`); \ + done +endef + +$(eval $(generic-package)) diff --git a/package/lm-sensors/lm-sensors.mk b/package/lm-sensors/lm-sensors.mk index eec969deaa..1f752be8a7 100644 --- a/package/lm-sensors/lm-sensors.mk +++ b/package/lm-sensors/lm-sensors.mk @@ -1,18 +1,23 @@ -############################################################# +################################################################################ # # lm-sensors # -############################################################# -LM_SENSORS_VERSION = 3.2.0 +################################################################################ + +LM_SENSORS_VERSION = 3.3.4 LM_SENSORS_SOURCE = lm_sensors-$(LM_SENSORS_VERSION).tar.bz2 LM_SENSORS_SITE = http://dl.lm-sensors.org/lm-sensors/releases LM_SENSORS_INSTALL_STAGING = YES +LM_SENSORS_DEPENDENCIES = host-bison host-flex +LM_SENSORS_LICENSE = libsensors LGPLv2.1+, programs GPLv2+ +LM_SENSORS_LICENSE_FILES = COPYING.LGPL COPYING LM_SENSORS_BINS_ = bin/sensors-conf-convert LM_SENSORS_BINS_$(BR2_PACKAGE_LM_SENSORS_SENSORS) += bin/sensors LM_SENSORS_BINS_$(BR2_PACKAGE_LM_SENSORS_FANCONTROL) += sbin/fancontrol LM_SENSORS_BINS_$(BR2_PACKAGE_LM_SENSORS_ISADUMP) += sbin/isadump LM_SENSORS_BINS_$(BR2_PACKAGE_LM_SENSORS_ISASET) += sbin/isaset +LM_SENSORS_BINS_$(BR2_PACKAGE_LM_SENSORS_PWMCONFIG) += sbin/pwmconfig LM_SENSORS_BINS_$(BR2_PACKAGE_LM_SENSORS_SENSORS_DETECT) += sbin/sensors-detect define LM_SENSORS_BUILD_CMDS @@ -42,4 +47,4 @@ define LM_SENSORS_CLEAN_CMDS -$(MAKE) -C $(@D) clean endef -$(eval $(call GENTARGETS,package,lm-sensors)) +$(eval $(generic-package)) diff --git a/package/lmbench/Config.in b/package/lmbench/Config.in index c8423d1eff..c4ea5223af 100644 --- a/package/lmbench/Config.in +++ b/package/lmbench/Config.in @@ -1,12 +1,14 @@ config BR2_PACKAGE_LMBENCH bool "lmbench" - # Uses pmap_set, pmap__unset, pmap_getport, etc. - depends on BR2_INET_RPC + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC || BR2_TOOLCHAIN_HAS_THREADS # libtirpc + select BR2_PACKAGE_LIBTIRPC if !BR2_TOOLCHAIN_HAS_NATIVE_RPC + depends on BR2_USE_MMU # fork() help LMbench is a suite of simple, portable, ANSI/C microbenchmarks for UNIX/POSIX. http://sourceforge.net/projects/lmbench/ -comment "lmbench requires a toolchain with RPC support" - depends on !BR2_INET_RPC +comment "lmbench needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !(BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_HAS_NATIVE_RPC) diff --git a/package/lmbench/lmbench.mk b/package/lmbench/lmbench.mk index fefb34f06a..3d3d68fb88 100644 --- a/package/lmbench/lmbench.mk +++ b/package/lmbench/lmbench.mk @@ -1,14 +1,26 @@ -############################################################# +################################################################################ # # lmbench # -############################################################# -LMBENCH_VERSION:=3.0-a9 -LMBENCH_SOURCE:=lmbench-$(LMBENCH_VERSION).tgz -LMBENCH_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/project/lmbench/development/lmbench-3.0-a9/ +################################################################################ + +LMBENCH_VERSION = 3.0-a9 +LMBENCH_SOURCE = lmbench-$(LMBENCH_VERSION).tgz +LMBENCH_SITE = http://downloads.sourceforge.net/project/lmbench/development/lmbench-$(LMBENCH_VERSION)/ +LMBENCH_LICENSE = lmbench license (based on GPLv2) +LMBENCH_LICENSE_FILES = COPYING COPYING-2 + +LMBENCH_CFLAGS = $(TARGET_CFLAGS) +LMBENCH_LDLIBS = $(TARGET_LDFLAGS) + +ifeq ($(BR2_PACKAGE_LIBTIRPC),y) +LMBENCH_DEPENDENCIES += libtirpc +LMBENCH_CFLAGS += -I$(STAGING_DIR)/usr/include/tirpc/ +LMBENCH_LDFLAGS += -ltirpc +endif define LMBENCH_CONFIGURE_CMDS - $(CONFIG_UPDATE) $(@D) + $(call CONFIG_UPDATE,$(@D)) sed -i 's/CFLAGS=/CFLAGS+=/g' $(@D)/src/Makefile sed -i '/cd .*doc/d' $(@D)/src/Makefile sed -i '/include/d' $(@D)/src/Makefile @@ -16,7 +28,7 @@ define LMBENCH_CONFIGURE_CMDS endef define LMBENCH_BUILD_CMDS - $(MAKE) CFLAGS="$(TARGET_CFLAGS)" OS=$(ARCH) CC="$(TARGET_CC)" -C $(@D)/src + $(MAKE) CFLAGS="$(LMBENCH_CFLAGS)" LDFLAGS="$(LMBENCH_LDFLAGS)" OS=$(ARCH) CC="$(TARGET_CC)" -C $(@D)/src endef define LMBENCH_INSTALL_TARGET_CMDS @@ -27,4 +39,4 @@ define LMBENCH_CLEAN_CMDS $(MAKE) -C $(@D)/src clean endef -$(eval $(call GENTARGETS,package,lmbench)) +$(eval $(generic-package)) diff --git a/package/localedef/localedef.mk b/package/localedef/localedef.mk new file mode 100644 index 0000000000..cc38559bed --- /dev/null +++ b/package/localedef/localedef.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# localedef +# +################################################################################ + +LOCALEDEF_VERSION = 2.14.1-r17443-ptx1 +LOCALEDEF_SOURCE = localedef-eglibc-$(LOCALEDEF_VERSION).tar.bz2 +LOCALEDEF_SITE = http://www.pengutronix.de/software/ptxdist/temporary-src/ + +HOST_LOCALEDEF_CONF_OPT += \ + --prefix=/usr \ + --with-glibc=./eglibc + +# The makefile does not implement an install target +define HOST_LOCALEDEF_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/localedef $(HOST_DIR)/usr/bin/localedef +endef + +$(eval $(host-autotools-package)) diff --git a/package/lockdev/Config.in b/package/lockdev/Config.in new file mode 100644 index 0000000000..4b386f4ab0 --- /dev/null +++ b/package/lockdev/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LOCKDEV + bool "lockdev" + help + Library for locking devices. + + No upstream site, primary site is Debian. diff --git a/package/lockdev/lockdev.mk b/package/lockdev/lockdev.mk new file mode 100644 index 0000000000..004b637b69 --- /dev/null +++ b/package/lockdev/lockdev.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# lockdev +# +################################################################################ + +LOCKDEV_VERSION = 1.0.3 +LOCKDEV_SOURCE = lockdev_$(LOCKDEV_VERSION).orig.tar.gz +LOCKDEV_SITE = http://snapshot.debian.org/archive/debian/20130508T154517Z/pool/main/l/lockdev/ +LOCKDEV_LICENSE = LGPLv2.1 +LOCKDEV_LICENSE_FILES = LICENSE +LOCKDEV_INSTALL_STAGING = YES + +ifeq ($(BR2_PREFER_STATIC_LIB),y) +define LOCKDEV_BUILD_CMDS + $(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(@D) static +endef + +define LOCKDEV_INSTALL_STAGING_CMDS + $(MAKE1) basedir=$(STAGING_DIR)/usr -C $(@D) install_dev +endef + +else # BR2_PREFER_STATIC_LIB + +define LOCKDEV_BUILD_CMDS + $(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(@D) static shared +endef + +define LOCKDEV_INSTALL_STAGING_CMDS + $(MAKE1) basedir=$(STAGING_DIR)/usr -C $(@D) install_dev install_run + ln -sf liblockdev.$(LOCKDEV_VERSION).so $(STAGING_DIR)/usr/lib/liblockdev.so + ln -sf liblockdev.$(LOCKDEV_VERSION).so $(STAGING_DIR)/usr/lib/liblockdev.so.1 +endef + +define LOCKDEV_INSTALL_TARGET_CMDS + $(MAKE1) basedir=$(TARGET_DIR)/usr -C $(@D) install_run + ln -sf liblockdev.$(LOCKDEV_VERSION).so $(STAGING_DIR)/usr/lib/liblockdev.so.1 +endef +endif # BR2_PREFER_STATIC_LIB + +$(eval $(generic-package)) diff --git a/package/lockfile-progs/lockfile-progs-0.1.15-sus3v-legacy.patch b/package/lockfile-progs/lockfile-progs-01-sus3v-legacy.patch similarity index 100% rename from package/lockfile-progs/lockfile-progs-0.1.15-sus3v-legacy.patch rename to package/lockfile-progs/lockfile-progs-01-sus3v-legacy.patch diff --git a/package/lockfile-progs/lockfile-progs.mk b/package/lockfile-progs/lockfile-progs.mk index 031712e4f4..25f81342d2 100644 --- a/package/lockfile-progs/lockfile-progs.mk +++ b/package/lockfile-progs/lockfile-progs.mk @@ -1,12 +1,15 @@ -############################################################# +################################################################################ # # lockfile-progs # -############################################################# -LOCKFILE_PROGS_VERSION = 0.1.15 +################################################################################ + +LOCKFILE_PROGS_VERSION = 0.1.17 LOCKFILE_PROGS_SOURCE = lockfile-progs_$(LOCKFILE_PROGS_VERSION).tar.gz LOCKFILE_PROGS_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/l/lockfile-progs/ LOCKFILE_PROGS_DEPENDENCIES = liblockfile +LOCKFILE_PROGS_LICENSE = GPLv2 +LOCKFILE_PROGS_LICENSE_FILES = COPYING LOCKFILE_BINS = \ $(addprefix lockfile-,check create remove touch) \ @@ -30,4 +33,4 @@ define LOCKFILE_PROGS_CLEAN_CMDS -$(MAKE) -C $(@D) clean endef -$(eval $(call GENTARGETS,package,lockfile-progs)) +$(eval $(generic-package)) diff --git a/package/log4cxx/Config.in b/package/log4cxx/Config.in new file mode 100644 index 0000000000..bc142265a0 --- /dev/null +++ b/package/log4cxx/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_LOG4CXX + bool "log4cxx" + select BR2_PACKAGE_APR + select BR2_PACKAGE_APR_UTIL + # apr really needs shared library support + depends on !BR2_PREFER_STATIC_LIB + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # apr + help + Apache log4cxx is a logging framework for C++ patterned + after Apache log4j. + + http://apache.linux-mirror.org/logging/log4cxx/0.10.0 + +comment "log4cxx needs a toolchain w/ C++, threads, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_PREFER_STATIC_LIB + depends on BR2_USE_MMU diff --git a/package/log4cxx/log4cxx-0001-charset-fixes.patch b/package/log4cxx/log4cxx-0001-charset-fixes.patch new file mode 100644 index 0000000000..75567fdad1 --- /dev/null +++ b/package/log4cxx/log4cxx-0001-charset-fixes.patch @@ -0,0 +1,43 @@ +Fix build when iconv support is not available + +When iconv support is not available, the apr-util library does not +provide character set conversion features, and therefore APR_HAS_XLATE +is false. + +However, on Linux !defined(_WIN32) is always true, but the part of the +code that defines the APRCharsetDecoder and APRCharsetEncoder are only +enclosed in a #if APR_HAS_XLATE, without the "|| defined(_WIN32)" +which leads to build failures: the APRCharsetEncoder and +APRCharsetDecoder classes are used without being defined. + +This patch removes the || !defined(_WIN32) so that when iconv support +is not here, we fall back to raising an exception at runtime. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/main/cpp/charsetdecoder.cpp +=================================================================== +--- a/src/main/cpp/charsetdecoder.cpp ++++ b/src/main/cpp/charsetdecoder.cpp +@@ -476,7 +476,7 @@ + StringHelper::equalsIgnoreCase(charset, LOG4CXX_STR("ISO-LATIN-1"), LOG4CXX_STR("iso-latin-1"))) { + return new ISOLatinCharsetDecoder(); + } +-#if APR_HAS_XLATE || !defined(_WIN32) ++#if APR_HAS_XLATE + return new APRCharsetDecoder(charset); + #else + throw IllegalArgumentException(charset); +Index: b/src/main/cpp/charsetencoder.cpp +=================================================================== +--- a/src/main/cpp/charsetencoder.cpp ++++ b/src/main/cpp/charsetencoder.cpp +@@ -484,7 +484,7 @@ + } else if (StringHelper::equalsIgnoreCase(charset, LOG4CXX_STR("UTF-16LE"), LOG4CXX_STR("utf-16le"))) { + return new UTF16LECharsetEncoder(); + } +-#if APR_HAS_XLATE || !defined(_WIN32) ++#if APR_HAS_XLATE + return new APRCharsetEncoder(charset); + #else + throw IllegalArgumentException(charset); diff --git a/package/log4cxx/log4cxx-0002-missing-includes.patch b/package/log4cxx/log4cxx-0002-missing-includes.patch new file mode 100644 index 0000000000..dd4da11619 --- /dev/null +++ b/package/log4cxx/log4cxx-0002-missing-includes.patch @@ -0,0 +1,44 @@ +commit bcaf1f8a682d641cee325142099c371464fd5946 +Author: Curtis William Arnold +Date: Tue May 20 16:05:37 2008 +0000 + + LOGCXX-286: gcc 4.3 requires #include + + git-svn-id: https://svn.apache.org/repos/asf/logging/log4cxx/trunk@658304 13f79535-47bb-0310-9956-ffa450edef68 + +diff --git a/src/examples/cpp/console.cpp b/src/examples/cpp/console.cpp +index 6a01d8a..a673a10 100755 +--- a/src/examples/cpp/console.cpp ++++ b/src/examples/cpp/console.cpp +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + using namespace log4cxx; + using namespace log4cxx::helpers; +diff --git a/src/main/cpp/inputstreamreader.cpp b/src/main/cpp/inputstreamreader.cpp +index 52b1c0a..cb45181 100644 +--- a/src/main/cpp/inputstreamreader.cpp ++++ b/src/main/cpp/inputstreamreader.cpp +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + using namespace log4cxx; + using namespace log4cxx::helpers; +diff --git a/src/main/cpp/socketoutputstream.cpp b/src/main/cpp/socketoutputstream.cpp +index 185f835..c61eb11 100644 +--- a/src/main/cpp/socketoutputstream.cpp ++++ b/src/main/cpp/socketoutputstream.cpp +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + + using namespace log4cxx; + using namespace log4cxx::helpers; diff --git a/package/log4cxx/log4cxx-0003-missing-includes.patch b/package/log4cxx/log4cxx-0003-missing-includes.patch new file mode 100644 index 0000000000..cd21bbab3e --- /dev/null +++ b/package/log4cxx/log4cxx-0003-missing-includes.patch @@ -0,0 +1,21 @@ +commit ce62c00ea5f9bf2f0740ecde5b245c9b7edc80ff +Author: Curtis William Arnold +Date: Mon Apr 27 03:53:50 2009 +0000 + + LOGCXX-332: fails to build with gcc 4.4 + + git-svn-id: https://svn.apache.org/repos/asf/logging/log4cxx/trunk@768863 13f79535-47bb-0310-9956-ffa450edef68 + +diff --git a/src/examples/cpp/console.cpp b/src/examples/cpp/console.cpp +index a673a10..f44c944 100755 +--- a/src/examples/cpp/console.cpp ++++ b/src/examples/cpp/console.cpp +@@ -23,6 +23,8 @@ + #include + #include + #include ++#include ++#include + + using namespace log4cxx; + using namespace log4cxx::helpers; diff --git a/package/log4cxx/log4cxx.mk b/package/log4cxx/log4cxx.mk new file mode 100644 index 0000000000..43859625cd --- /dev/null +++ b/package/log4cxx/log4cxx.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# log4cxx +# +################################################################################ + +LOG4CXX_VERSION = 0.10.0 +LOG4CXX_SITE = http://archive.apache.org/dist/logging/log4cxx/$(LOG4CXX_VERSION) +LOG4CXX_SOURCE = apache-log4cxx-$(LOG4CXX_VERSION).tar.gz +LOG4CXX_INSTALL_STAGING = YES +LOG4CXX_LICENSE = Apache-2.0 +LOG4CXX_LICENSE_FILES = LICENSE + +LOG4CXX_CONF_OPT = \ + --with-apr=$(STAGING_DIR)/usr/bin/apr-1-config \ + --with-apr-util=$(STAGING_DIR)/usr/bin/apu-1-config + +LOG4CXX_DEPENDENCIES = apr apr-util + +$(eval $(autotools-package)) diff --git a/package/logrotate/Config.in b/package/logrotate/Config.in index 0d0ec610a9..07a2da519f 100644 --- a/package/logrotate/Config.in +++ b/package/logrotate/Config.in @@ -2,11 +2,13 @@ config BR2_PACKAGE_LOGROTATE bool "logrotate" select BR2_PACKAGE_POPT depends on BR2_USE_WCHAR + depends on BR2_USE_MMU # fork() help A simple program to rotate logs. https://fedorahosted.org/logrotate/ -comment "logrotate requires a toolchain with WCHAR support" +comment "logrotate needs a toolchain w/ wchar" + depends on BR2_USE_MMU depends on !BR2_USE_WCHAR diff --git a/package/logrotate/logrotate.mk b/package/logrotate/logrotate.mk index 0e41d6a72f..1cefff1559 100644 --- a/package/logrotate/logrotate.mk +++ b/package/logrotate/logrotate.mk @@ -1,11 +1,13 @@ -############################################################# +################################################################################ # # logrotate # -############################################################# -LOGROTATE_VERSION = 3.7.9 -LOGROTATE_SOURCE = logrotate-$(LOGROTATE_VERSION).tar.gz -LOGROTATE_SITE = https://fedorahosted.org/releases/l/o/logrotate/ +################################################################################ + +LOGROTATE_VERSION = 3.8.6 +LOGROTATE_SITE = https://www.fedorahosted.org/releases/l/o/logrotate/ +LOGROTATE_LICENSE = GPLv2+ +LOGROTATE_LICENSE_FILES = COPYING LOGROTATE_DEPENDENCIES = popt @@ -33,4 +35,4 @@ define LOGROTATE_CLEAN_CMDS -$(MAKE) -C $(@D) clean endef -$(eval $(call GENTARGETS,package,logrotate)) +$(eval $(generic-package)) diff --git a/package/logsurfer/Config.in b/package/logsurfer/Config.in new file mode 100644 index 0000000000..d4218bce7e --- /dev/null +++ b/package/logsurfer/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LOGSURFER + bool "logsurfer" + depends on BR2_USE_MMU # fork() + help + Logsurfer is a program for monitoring system logs in real-time, + and reporting on the occurrence of events. + + http://www.crypt.gen.nz/logsurfer/ diff --git a/package/logsurfer/logsurfer.mk b/package/logsurfer/logsurfer.mk new file mode 100644 index 0000000000..0a597f4aa1 --- /dev/null +++ b/package/logsurfer/logsurfer.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# logsurfer +# +################################################################################ + +LOGSURFER_VERSION = 1.8 +LOGSURFER_SITE = http://downloads.sourceforge.net/project/logsurfer/logsurfer/logsurfer-$(LOGSURFER_VERSION) + +define LOGSURFER_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/src/logsurfer \ + $(TARGET_DIR)/usr/bin/logsurfer +endef + +ifeq ($(BR2_HAVE_DOCUMENTATION),y) + +define LOGSURFER_INSTALL_TARGET_MAN + $(INSTALL) -D -m 0644 $(@D)/man/logsurfer.1 \ + $(TARGET_DIR)/usr/man/man1/logsurfer.1 + $(INSTALL) -D -m 0644 $(@D)/man/logsurfer.conf.4 \ + $(TARGET_DIR)/usr/man/man4/logsurfer.conf.4 +endef + +LOGSURFER_POST_INSTALL_TARGET_HOOKS += LOGSURFER_INSTALL_TARGET_MAN + +endif + +$(eval $(autotools-package)) diff --git a/package/lpc3250loader/Config.in.host b/package/lpc3250loader/Config.in.host new file mode 100644 index 0000000000..750080be7c --- /dev/null +++ b/package/lpc3250loader/Config.in.host @@ -0,0 +1,7 @@ +config BR2_PACKAGE_HOST_LPC3250LOADER + bool "host lpc3250loader" + help + lpc3250loader is a tool to load/burn programs (in particular kickstart + and S1L) on an LPC3250 platform. + + https://gitorious.org/lpc3250loader diff --git a/package/lpc3250loader/lpc3250loader.mk b/package/lpc3250loader/lpc3250loader.mk new file mode 100644 index 0000000000..42beb7bc84 --- /dev/null +++ b/package/lpc3250loader/lpc3250loader.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# lpc3250loader +# +################################################################################ + +HOST_LPC3250LOADER_SITE = git://gitorious.org/lpc3250loader/lpc3250loader.git +HOST_LPC3250LOADER_VERSION = 1.0 + +define HOST_LPC3250LOADER_INSTALL_CMDS + $(INSTALL) -m 0755 -D $(@D)/LPC3250loader.py \ + $(HOST_DIR)/usr/bin/LPC3250loader.py +endef + +$(eval $(host-generic-package)) diff --git a/package/lrzsz/lrzsz.mk b/package/lrzsz/lrzsz.mk index e9b975fd74..49d515effb 100644 --- a/package/lrzsz/lrzsz.mk +++ b/package/lrzsz/lrzsz.mk @@ -1,28 +1,11 @@ -############################################################# +################################################################################ # -# lrzsz (provides zmodem) +# lrzsz # -############################################################# -# Copyright (C) 2001-2005 by Erik Andersen -# Copyright (C) 2002 by Tim Riker -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Library General Public License as -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public -# License along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -LRZSZ_VERSION:=0.12.20 -LRZSZ_SITE:=http://www.ohse.de/uwe/releases -LRZSZ_SOURCE:=lrzsz-$(LRZSZ_VERSION).tar.gz +################################################################################ + +LRZSZ_VERSION = 0.12.20 +LRZSZ_SITE = http://www.ohse.de/uwe/releases LRZSR_CONF_OPT = --disable-timesync @@ -36,10 +19,10 @@ define LRZSZ_BUILD_HOOKS endef define LRZSZ_INSTALL_TARGET_CMDS - cp $(@D)/src/lrz $(TARGET_DIR)/usr/bin/rz - cp $(@D)/src/lsz $(TARGET_DIR)/usr/bin/sz - ln -s rz $(TARGET_DIR)/usr/bin/lrz - ln -s sz $(TARGET_DIR)/usr/bin/lsz + $(INSTALL) -m 0755 -D $(@D)/src/lrz $(TARGET_DIR)/usr/bin/rz + $(INSTALL) -m 0755 -D $(@D)/src/lsz $(TARGET_DIR)/usr/bin/sz + ln -sf rz $(TARGET_DIR)/usr/bin/lrz + ln -sf sz $(TARGET_DIR)/usr/bin/lsz endef define LRZSZ_CLEAN_CMDS @@ -47,4 +30,4 @@ define LRZSZ_CLEAN_CMDS -$(MAKE) -C $(@D) clean endef -$(eval $(call AUTOTARGETS,package,lrzsz)) +$(eval $(autotools-package)) diff --git a/package/lshw/Config.in b/package/lshw/Config.in new file mode 100644 index 0000000000..bd4a1bab27 --- /dev/null +++ b/package/lshw/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LSHW + bool "lshw" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_LARGEFILE + depends on BR2_USE_WCHAR + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + lshw (Hardware Lister) is a small tool to provide + detailed information on the hardware configuration of the machine. + + http://ezix.org/project/wiki/HardwareLiSter + +comment "lshw needs a toolchain w/ C++, largefile, wchar" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_LARGEFILE || !BR2_USE_WCHAR diff --git a/package/lshw/lshw-add-LIBS.patch b/package/lshw/lshw-add-LIBS.patch new file mode 100644 index 0000000000..70b2a5b68f --- /dev/null +++ b/package/lshw/lshw-add-LIBS.patch @@ -0,0 +1,30 @@ +We need to be able to pass extra LIBS when our toolchain lacks NLS support, +this way we can build libintl and link to it. +A good example is uClibc with locale support disabled. + +Signed-off-by: Gustavo Zacarias + +diff -Nura lshw-B.02.16.orig/src/gui/Makefile lshw-B.02.16/src/gui/Makefile +--- lshw-B.02.16.orig/src/gui/Makefile 2012-05-28 12:32:49.303885759 -0300 ++++ lshw-B.02.16/src/gui/Makefile 2012-05-28 12:33:33.850206001 -0300 +@@ -11,7 +11,7 @@ + CXXFLAGS=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) + CFLAGS=$(CXXFLAGS) $(DEFINES) + GTKLIBS=$(shell pkg-config gtk+-2.0 gmodule-2.0 --libs) +-LIBS=-L../core -llshw -lresolv -lsqlite3 $(GTKLIBS) ++LIBS+=-L../core -llshw -lresolv -lsqlite3 $(GTKLIBS) + LDFLAGS= + ifneq ($(shell $(LD) --help 2| grep -- --as-needed), ) + LDFLAGS+= -Wl,--as-needed +diff -Nura lshw-B.02.16.orig/src/Makefile lshw-B.02.16/src/Makefile +--- lshw-B.02.16.orig/src/Makefile 2012-05-28 12:32:49.292885680 -0300 ++++ lshw-B.02.16/src/Makefile 2012-05-28 12:33:24.530139060 -0300 +@@ -30,7 +30,7 @@ + LDFLAGS+= -Wl,--as-needed + endif + LDSTATIC=-static +-LIBS=-llshw -lresolv ++LIBS+=-llshw -lresolv + ifeq ($(SQLITE), 1) + LIBS+= $(shell pkg-config --libs sqlite3) + endif diff --git a/package/lshw/lshw.mk b/package/lshw/lshw.mk new file mode 100644 index 0000000000..cc003473ea --- /dev/null +++ b/package/lshw/lshw.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# lshw +# +################################################################################ + +LSHW_VERSION = B.02.16 +LSHW_SITE = http://ezix.org/software/files + +LSHW_CFLAGS = $(TARGET_CFLAGS) +ifeq ($(BR2_ENABLE_LOCALE),) +LSHW_CFLAGS += -DNONLS +endif + +LSHW_MAKE_OPT = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" AR="$(TARGET_AR)" \ + RPM_OPT_FLAGS="$(LSHW_CFLAGS)" all +LSHW_MAKE_ENV = LIBS="$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),-lintl)" +LSHW_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) + +define LSHW_BUILD_CMDS + $(LSHW_MAKE_ENV) $(MAKE) -C $(@D)/src $(LSHW_MAKE_OPT) +endef + +define LSHW_INSTALL_TARGET_CMDS + $(LSHW_MAKE_ENV) $(MAKE) -C $(@D)/src DESTDIR=$(TARGET_DIR) \ + $(LSHW_MAKE_OPT) install +endef + +$(eval $(generic-package)) diff --git a/package/lsof/Config.in b/package/lsof/Config.in index 22b7f5eac1..cc7512c258 100644 --- a/package/lsof/Config.in +++ b/package/lsof/Config.in @@ -1,12 +1,8 @@ config BR2_PACKAGE_LSOF bool "lsof" - depends on BR2_INET_RPC help lsof (LiSt Open Files) The lsof tool lists information about files opened by processes. ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ - -comment "lsof requires a toolchain with RPC support" - depends on !BR2_INET_RPC diff --git a/package/lsof/lsof-4.84-makefile.patch b/package/lsof/lsof-4.85-makefile.patch similarity index 100% rename from package/lsof/lsof-4.84-makefile.patch rename to package/lsof/lsof-4.85-makefile.patch diff --git a/package/lsof/lsof-4.84-noportmap.patch b/package/lsof/lsof-4.85-noportmap.patch similarity index 100% rename from package/lsof/lsof-4.84-noportmap.patch rename to package/lsof/lsof-4.85-noportmap.patch diff --git a/package/lsof/lsof-4.84-override-cflags.patch b/package/lsof/lsof-4.85-override-cflags.patch similarity index 100% rename from package/lsof/lsof-4.84-override-cflags.patch rename to package/lsof/lsof-4.85-override-cflags.patch diff --git a/package/lsof/lsof-4.84-remove-susvlegacy-funcs.patch b/package/lsof/lsof-4.85-remove-susvlegacy-funcs.patch similarity index 100% rename from package/lsof/lsof-4.84-remove-susvlegacy-funcs.patch rename to package/lsof/lsof-4.85-remove-susvlegacy-funcs.patch diff --git a/package/lsof/lsof.mk b/package/lsof/lsof.mk index 167cb20411..693bb9183b 100644 --- a/package/lsof/lsof.mk +++ b/package/lsof/lsof.mk @@ -1,11 +1,19 @@ -############################################################# +################################################################################ # # lsof # -############################################################# -LSOF_VERSION = 4.84 +################################################################################ + +LSOF_VERSION = 4.85 LSOF_SOURCE = lsof_$(LSOF_VERSION).tar.bz2 LSOF_SITE = ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ +LSOF_LICENSE = lsof license +# License is repeated in each file, this is a relatively small one. +# It is also defined in 00README, but that contains a lot of other cruft. +LSOF_LICENSE_FILES = dialects/linux/dproto.h + +# Make certain full-blown lsof gets built after the busybox version (1.20+) +LSOF_DEPENDENCIES += $(if $(BR2_PACKAGE_BUSYBOX),busybox) BR2_LSOF_CFLAGS = ifeq ($(BR2_LARGEFILE),) @@ -32,13 +40,12 @@ endef endif # The .tar.bz2 contains another .tar, which contains the source code. -define LSOF_EXTRACT_TAR - $(TAR) $(TAR_STRIP_COMPONENTS)=1 -xf $(@D)/lsof_$(LSOF_VERSION)_src.tar -C $(@D) - rm -f $(@D)/lsof_$(LSOF_VERSION)_src.tar +define LSOF_EXTRACT_CMDS + $(call suitable-extractor,$(LSOF_SOURCE)) $(DL_DIR)/$(LSOF_SOURCE) | \ + $(TAR) -O $(TAR_OPTIONS) - lsof_$(LSOF_VERSION)/lsof_$(LSOF_VERSION)_src.tar | \ + $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(LSOF_DIR) $(TAR_OPTIONS) - endef -LSOF_POST_EXTRACT_HOOKS += LSOF_EXTRACT_TAR - define LSOF_CONFIGURE_CMDS (cd $(@D) ; \ echo n | $(TARGET_CONFIGURE_OPTS) DEBUG="$(TARGET_CFLAGS) $(BR2_LSOF_CFLAGS)" \ @@ -63,4 +70,4 @@ define LSOF_CLEAN_CMDS -$(MAKE) -C $(@D) clean endef -$(eval $(call GENTARGETS,package,lsof)) +$(eval $(generic-package)) diff --git a/package/lsuio/lsuio.mk b/package/lsuio/lsuio.mk index 2a867b7995..4e4f592d09 100644 --- a/package/lsuio/lsuio.mk +++ b/package/lsuio/lsuio.mk @@ -1,11 +1,10 @@ -############################################################# +################################################################################ # # lsuio # -############################################################# +################################################################################ LSUIO_VERSION = 0.2.0 -LSUIO_SOURCE = lsuio-$(LSUIO_VERSION).tar.gz LSUIO_SITE = http://www.osadl.org/projects/downloads/UIO/user -$(eval $(call AUTOTARGETS,package,lsuio)) +$(eval $(autotools-package)) diff --git a/package/ltp-testsuite/Config.in b/package/ltp-testsuite/Config.in index 86aa4fb8cd..0883c8fdc3 100644 --- a/package/ltp-testsuite/Config.in +++ b/package/ltp-testsuite/Config.in @@ -1,16 +1,29 @@ +comment "ltp-testsuite needs specific uClibc options, see help" + depends on BR2_PACKAGE_LTP_TESTSUITE + depends on BR2_TOOLCHAIN_USES_UCLIBC + config BR2_PACKAGE_LTP_TESTSUITE bool "ltp-testsuite" depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INET_IPV6 + depends on BR2_LARGEFILE + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC + # aarch64 build currently broken, reported at + # https://bugs.launchpad.net/linaro-aarch64/+bug/1236027 + depends on !BR2_aarch64 help The Linux Test Project provides a huge testsuite for Linux. The LTP testsuite uses several functions that are considered obsolete, such as sigset() and others. Therefore, the LTP testsuite does not build with Buildroot's default uClibc - configuration, and options such as - UCLIBC_HAS_OBSOLETE_BSD_SIGNAL are needed. + configuration, and options such as DO_XSI_MATH, + UCLIBC_HAS_OBSOLETE_BSD_SIGNAL and UCLIBC_SV4_DEPRECATED + are needed. http://ltp.sourceforge.net/ -comment "ltp-testsuite requires a toolchain with thread support" - depends on !BR2_TOOLCHAIN_HAS_THREADS +comment "ltp-testsuite needs a toolchain w/ IPv6, RPC, largefile, threads" + depends on !BR2_aarch64 + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INET_IPV6 || \ + !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_NATIVE_RPC diff --git a/package/ltp-testsuite/ltp-testsuite-20101031-disable-controllers.patch b/package/ltp-testsuite/ltp-testsuite-20101031-disable-controllers.patch deleted file mode 100644 index 57d6038647..0000000000 --- a/package/ltp-testsuite/ltp-testsuite-20101031-disable-controllers.patch +++ /dev/null @@ -1,25 +0,0 @@ -Disable controllers testcases - -The cpuset controllers testcases do not build due to bug -https://sourceforge.net/tracker/?func=detail&aid=3126942&group_id=3382&atid=103382. Disabling -just the cpuset controllers do not seem to be easily possible, and -those controller features are rarely used on embedded systems anyway. - -Signed-off-by: Thomas Petazzoni ---- - testcases/kernel/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: ltp-testsuite-20101031/testcases/kernel/Makefile -=================================================================== ---- ltp-testsuite-20101031.orig/testcases/kernel/Makefile -+++ ltp-testsuite-20101031/testcases/kernel/Makefile -@@ -28,7 +28,7 @@ - # - # KEEP THIS LIST ALPHABETIZED PLEASE! - ifneq ($(UCLINUX),1) --SUBDIRS := containers connectors controllers fs hotplug io ipc mem \ -+SUBDIRS := containers connectors fs hotplug io ipc mem \ - numa performance_counters power_management pty sched \ - security syscalls timers tracing - else diff --git a/package/ltp-testsuite/ltp-testsuite-fix-build-on-uClibc-exp10.patch b/package/ltp-testsuite/ltp-testsuite-fix-build-on-uClibc-exp10.patch new file mode 100644 index 0000000000..7a02d95208 --- /dev/null +++ b/package/ltp-testsuite/ltp-testsuite-fix-build-on-uClibc-exp10.patch @@ -0,0 +1,22 @@ +Inspired by: http://peter.korsgaard.com/patches/alsa-utils/alsamixer-fix-build-on-uClibc-exp10.patch + +exp10 extension is not part of uClibc, so compute it. + + +Signed-off-by: Samuel Martin + +diff -purN ltp-testsuite-20101031.orig/testcases/realtime/lib/libstats.c ltp-testsuite-20101031/testcases/realtime/lib/libstats.c +--- ltp-testsuite-20101031.orig/testcases/realtime/lib/libstats.c 2012-10-22 23:19:02.306646174 +0200 ++++ ltp-testsuite-20101031/testcases/realtime/lib/libstats.c 2012-10-22 23:25:41.554847766 +0200 +@@ -46,6 +46,11 @@ + #include + #include + ++#ifdef __UCLIBC__ ++/* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */ ++#define exp10(x) (exp((x) * log(10))) ++#endif /* __UCLIBC__ */ ++ + int save_stats = 0; + + /* static helper functions */ diff --git a/package/ltp-testsuite/ltp-testsuite.mk b/package/ltp-testsuite/ltp-testsuite.mk index 1a55c41174..594fa18cd0 100644 --- a/package/ltp-testsuite/ltp-testsuite.mk +++ b/package/ltp-testsuite/ltp-testsuite.mk @@ -1,10 +1,26 @@ -############################################################# +################################################################################ # # ltp-testsuite # -############################################################# -LTP_TESTSUITE_VERSION = 20101031 -LTP_TESTSUITE_SOURCE = ltp-full-$(LTP_TESTSUITE_VERSION).bz2 -LTP_TESTSUITE_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/ltp +################################################################################ -$(eval $(call AUTOTARGETS,package,ltp-testsuite)) +LTP_TESTSUITE_VERSION = 20130904 +LTP_TESTSUITE_SOURCE = ltp-full-$(LTP_TESTSUITE_VERSION).tar.xz +LTP_TESTSUITE_SITE = http://downloads.sourceforge.net/project/ltp/LTP%20Source/ltp-$(LTP_TESTSUITE_VERSION) +LTP_TESTSUITE_LICENSE = GPLv2 GPLv2+ +LTP_TESTSUITE_LICENSE_FILES = COPYING + +# Needs libcap with file attrs which needs attr, so both required +ifeq ($(BR2_PACKAGE_LIBCAP)$(BR2_PACKAGE_ATTR),yy) +LTP_TESTSUITE_DEPENDENCIES += libcap +else +LTP_TESTSUITE_CONF_ENV += ac_cv_lib_cap_cap_compare=no +endif + +# ltp-testsuite uses , which isn't compatible with largefile +# support. +LTP_TESTSUITE_CONF_ENV += \ + CFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS))" \ + CPPFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))" + +$(eval $(autotools-package)) diff --git a/package/ltrace/Config.in b/package/ltrace/Config.in index 9e71d827a5..943af8dad8 100644 --- a/package/ltrace/Config.in +++ b/package/ltrace/Config.in @@ -1,6 +1,6 @@ config BR2_PACKAGE_LTRACE bool "ltrace" - depends on !(BR2_avr32 || BR2_mips || BR2_mipsel || BR2_sh || BR2_sh64 || BR2_xtensa) + depends on !(BR2_avr32 || BR2_sh || BR2_sh64 || BR2_xtensa || BR2_aarch64 || BR2_arc) select BR2_PACKAGE_LIBELF help Debugging program which runs a specified command until it exits. @@ -8,4 +8,4 @@ config BR2_PACKAGE_LTRACE the dynamic library calls which are called by the executed process and the signals received by that process. - http://packages.debian.org/unstable/utils/ltrace.html + http://ltrace.org diff --git a/package/ltrace/ltrace-0.5.3-configure-fixes.patch b/package/ltrace/ltrace-0.5.3-configure-fixes.patch deleted file mode 100644 index 8d95883bce..0000000000 --- a/package/ltrace/ltrace-0.5.3-configure-fixes.patch +++ /dev/null @@ -1,128 +0,0 @@ -Fix several issues with the configure script: - - * Allow option values to contains equal signs, like - CC="/foo/arm-linux-gcc --sysroot=/foobar/usr" - - * Parse the option before doing the tests so that CC/CFLAGS can be - used during the tests. - -Signed-off-by: Thomas Petazzoni ---- - configure | 72 +++++++++++++++++++++++++++++++------------------------------- - 1 file changed, 37 insertions(+), 35 deletions(-) - -Index: ltrace-0.5.3/configure -=================================================================== ---- ltrace-0.5.3.orig/configure -+++ ltrace-0.5.3/configure -@@ -6,6 +6,38 @@ - exit 1 - fi - -+CC=gcc -+CPPFLAGS=' -I /usr/include/libelf' -+CFLAGS='-g -O2' -+LIBS='-lelf ' -+INSTALL='/usr/bin/install -c' -+iquote='-iquote ' -+iquoteend='' -+ -+prefix=/usr/local -+sysconfdir='${prefix}/etc' -+bindir='${prefix}/bin' -+mandir='${prefix}/share/man' -+docdir='${prefix}/share/doc/ltrace' -+for x_option -+do -+ if test -n "$x_prev"; then -+ eval $x_prev=\$x_option -+ x_prev= -+ continue -+ fi -+ case $x_option in -+ --*=* | *=*) -+ x_var=`echo $x_option | sed 's/^--//' | sed 's/=.*//'` -+ x_val=`echo $x_option | sed 's/^[^=]*=//'` -+ eval $x_var=\"$x_val\" -+ ;; -+ --*) -+ x_prev=`echo $x_option | sed 's/^--//'` -+ ;; -+ esac -+done -+ - echo -n "checking package name... " - PACKAGE_NAME='ltrace' - echo $PACKAGE_NAME -@@ -30,9 +62,10 @@ - return cplus_demangle(); - } - EOF --if gcc conftest.c -liberty 2>/dev/null -+if $CC $CFLAGS conftest.c -liberty 2>/dev/null - then - HAVE_LIBIBERTY=1 -+ LIBS="$LIBS -liberty" - echo "yes" - else - unset HAVE_LIBIBERTY -@@ -48,9 +81,10 @@ - return __cxa_demangle(); - } - EOF --if gcc conftest.c -lsupc++ 2>/dev/null -+if $CC $CFLAGS conftest.c -lsupc++ 2>/dev/null - then - HAVE_LIBSUPC__=1 -+ LIBS="$LIBS -lsupc++" - echo "yes" - else - unset HAVE_LIBSUPC__ -@@ -67,7 +101,7 @@ - return 0; - } - EOF --if gcc conftest.c 2>/dev/null -+if $CC $CFLAGS conftest.c 2>/dev/null - then - HAVE_ELF_C_READ_MMAP=1 - echo "yes" -@@ -77,38 +111,6 @@ - fi - rm -f conftest.c a.out - --CC=gcc --CPPFLAGS=' -I /usr/include/libelf' --CFLAGS='-g -O2' --LIBS='-lelf -lsupc++ -liberty ' --INSTALL='/usr/bin/install -c' --iquote='-iquote ' --iquoteend='' -- --prefix=/usr/local --sysconfdir='${prefix}/etc' --bindir='${prefix}/bin' --mandir='${prefix}/share/man' --docdir='${prefix}/share/doc/ltrace' --for x_option --do -- if test -n "$x_prev"; then -- eval $x_prev=\$x_option -- x_prev= -- continue -- fi -- case $x_option in -- --*=* | *=*) -- x_var=`echo $x_option | sed 's/^--//' | sed 's/=.*//'` -- x_val=`echo $x_option | sed 's/^.*=//'` -- eval $x_var=$x_val -- ;; -- --*) -- x_prev=`echo $x_option | sed 's/^--//'` -- ;; -- esac --done -- - echo "configure: creating Makefile" - # - # Makefile.in -> Makefile diff --git a/package/ltrace/ltrace-0.5.3-susv3-legacy.patch b/package/ltrace/ltrace-0.5.3-susv3-legacy.patch deleted file mode 100644 index 4c9bb8ae16..0000000000 --- a/package/ltrace/ltrace-0.5.3-susv3-legacy.patch +++ /dev/null @@ -1,20 +0,0 @@ -Use the strchr() function instead of the legacy index() function. - -Signed-off-by: Thomas Petazzoni ---- - read_config_file.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: ltrace-0.5.3/read_config_file.c -=================================================================== ---- ltrace-0.5.3.orig/read_config_file.c -+++ ltrace-0.5.3/read_config_file.c -@@ -83,7 +83,7 @@ - - while (tmp->name) { - if (!strncmp(*str, tmp->name, strlen(tmp->name)) -- && index(" ,()#*;012345[", *(*str + strlen(tmp->name)))) { -+ && strchr(" ,()#*;012345[", *(*str + strlen(tmp->name)))) { - *str += strlen(tmp->name); - return lookup_prototype(tmp->pt); - } diff --git a/package/ltrace/ltrace-01-events.patch b/package/ltrace/ltrace-01-events.patch new file mode 100644 index 0000000000..f3699a1b28 --- /dev/null +++ b/package/ltrace/ltrace-01-events.patch @@ -0,0 +1,47 @@ +[PATCH] events.c: add similar system headers workaround as trace.c + +Needed for E.G. powerpc on uClibc. + +Signed-off-by: Peter Korsgaard +--- + sysdeps/linux-gnu/events.c | 27 +++++++++++++++++++++++++++ + 1 file changed, 27 insertions(+) + +Index: ltrace-0.6.0/sysdeps/linux-gnu/events.c +=================================================================== +--- ltrace-0.6.0.orig/sysdeps/linux-gnu/events.c ++++ ltrace-0.6.0/sysdeps/linux-gnu/events.c +@@ -11,6 +11,33 @@ + + #include "common.h" + ++/* If the system headers did not provide the constants, hard-code the normal ++ values. */ ++#ifndef PTRACE_EVENT_FORK ++ ++#define PTRACE_OLDSETOPTIONS 21 ++#define PTRACE_SETOPTIONS 0x4200 ++#define PTRACE_GETEVENTMSG 0x4201 ++ ++/* options set using PTRACE_SETOPTIONS */ ++#define PTRACE_O_TRACESYSGOOD 0x00000001 ++#define PTRACE_O_TRACEFORK 0x00000002 ++#define PTRACE_O_TRACEVFORK 0x00000004 ++#define PTRACE_O_TRACECLONE 0x00000008 ++#define PTRACE_O_TRACEEXEC 0x00000010 ++#define PTRACE_O_TRACEVFORKDONE 0x00000020 ++#define PTRACE_O_TRACEEXIT 0x00000040 ++ ++/* Wait extended result codes for the above trace options. */ ++#define PTRACE_EVENT_FORK 1 ++#define PTRACE_EVENT_VFORK 2 ++#define PTRACE_EVENT_CLONE 3 ++#define PTRACE_EVENT_EXEC 4 ++#define PTRACE_EVENT_VFORK_DONE 5 ++#define PTRACE_EVENT_EXIT 6 ++ ++#endif /* PTRACE_EVENT_FORK */ ++ + static Event event; + + Event * diff --git a/package/ltrace/ltrace.mk b/package/ltrace/ltrace.mk index e7947f1cb9..b42c252332 100644 --- a/package/ltrace/ltrace.mk +++ b/package/ltrace/ltrace.mk @@ -1,42 +1,26 @@ -############################################################# +################################################################################ # # ltrace # -############################################################# -LTRACE_VERSION = 0.5.3 -LTRACE_SOURCE = ltrace_$(LTRACE_VERSION).orig.tar.gz -LTRACE_PATCH = ltrace_$(LTRACE_VERSION)-2.1.diff.gz -LTRACE_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/l/ltrace -LTRACE_MAKE = $(MAKE1) +################################################################################ + +LTRACE_VERSION = 0.7.3 +LTRACE_SITE = http://alioth.debian.org/frs/download.php/file/3947 +LTRACE_SOURCE = ltrace-$(LTRACE_VERSION).tar.bz2 LTRACE_DEPENDENCIES = libelf +LTRACE_CONF_OPT = --disable-werror +LTRACE_LICENSE = GPLv2 +LTRACE_LICENSE_FILES = COPYING -# ltrace uses arch=ppc for powerpc -LTRACE_ARCH:=$(KERNEL_ARCH:powerpc=ppc) -ifeq ("$(strip $(ARCH))","armeb") -LTRACE_ARCH:=arm +# ltrace can use libunwind only if libc has backtrace() support +# We don't normally do so for uClibc and we can't know if it's external +ifeq ($(BR2_PACKAGE_LIBUNWIND),y) +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),) +LTRACE_CONF_OPT += --with-libunwind=yes +LTRACE_DEPENDENCIES += libunwind +else +LTRACE_CONF_OPT += --with-libunwind=no endif - -define LTRACE_CONFIGURE_CMDS - (cd $(@D) ; ./configure \ - --prefix=/usr \ - CC='$(TARGET_CC)' \ - CFLAGS='$(TARGET_CFLAGS)') -endef - -define LTRACE_BUILD_CMDS - $(MAKE) -C $(@D) ARCH=$(LTRACE_ARCH) -endef - -ifeq ($(BR2_HAVE_DOCUMENTATION),y) -define LTRACE_INSTALL_DOCUMENTATION - $(INSTALL) -D $(@D)/ltrace.1 \ - $(TARGET_DIR)/usr/share/man/man1/ltrace.1 -endef endif -define LTRACE_INSTALL_TARGET_CMDS - $(INSTALL) -D $(@D)/ltrace $(TARGET_DIR)/usr/bin - $(LTRACE_INSTALL_DOCUMENTATION) -endef - -$(eval $(call GENTARGETS,package,ltrace)) +$(eval $(autotools-package)) diff --git a/package/lttng-babeltrace/Config.in b/package/lttng-babeltrace/Config.in new file mode 100644 index 0000000000..cb857c80be --- /dev/null +++ b/package/lttng-babeltrace/Config.in @@ -0,0 +1,31 @@ +config BR2_PACKAGE_LTTNG_BABELTRACE + bool "lttng-babeltrace" + depends on BR2_PACKAGE_LTTNG_TOOLS + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_LIBGLIB2 + depends on BR2_USE_WCHAR # libglib2, util-linux + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + depends on BR2_LARGEFILE # util-linux + help + Babeltrace is part of the LTTng 2.x project. + + This project provides trace read and write libraries, as + well as a trace converter. A plugin can be created for any + trace format to allow its conversion to/from another trace + format. + + Having this tool on the target is not mandatory. You can + transfer the binary trace output from the target to your + development workstation, and use babeltrace here. Buildroot + automatically builds a host babeltrace in + $(O)/host/usr/bin/babeltrace as a dependency of the + lttng-tools package. + + http://lttng.org + +comment "lttng-babeltrace needs a toolchain w/ wchar, threads, largefile" + depends on BR2_PACKAGE_LTTNG_TOOLS + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/lttng-babeltrace/lttng-babeltrace-01-no-posix-fallocate-in-uclibc.patch b/package/lttng-babeltrace/lttng-babeltrace-01-no-posix-fallocate-in-uclibc.patch new file mode 100644 index 0000000000..d77825fab6 --- /dev/null +++ b/package/lttng-babeltrace/lttng-babeltrace-01-no-posix-fallocate-in-uclibc.patch @@ -0,0 +1,37 @@ +Do not call posix_fallocate() on uClibc + +uClibc does not implement posix_fallocate(), and posix_fallocate() is +mostly only an hint to the kernel that we will need such or such +amount of space inside a file. So we just don't call posix_fallocate() +when building against uClibc. + +Signed-off-by: Thomas Petazzoni +[Peter: add #include +--- + formats/ctf/ctf.c | 3 +++ + 1 file changed, 3 insertions(+) + +Index: lttng-babeltrace-0.8/formats/ctf/ctf.c +=================================================================== +--- lttng-babeltrace-0.8.orig/formats/ctf/ctf.c ++++ lttng-babeltrace-0.8/formats/ctf/ctf.c +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -384,9 +385,11 @@ + } + pos->content_size = -1U; /* Unknown at this point */ + pos->packet_size = WRITE_PACKET_LEN; ++#ifndef __UCLIBC__ + off = posix_fallocate(pos->fd, pos->mmap_offset, + pos->packet_size / CHAR_BIT); + assert(off >= 0); ++#endif + pos->offset = 0; + } else { + read_next_packet: diff --git a/package/lttng-babeltrace/lttng-babeltrace.mk b/package/lttng-babeltrace/lttng-babeltrace.mk new file mode 100644 index 0000000000..044dac0df7 --- /dev/null +++ b/package/lttng-babeltrace/lttng-babeltrace.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# lttng-babeltrace +# +################################################################################ + +LTTNG_BABELTRACE_SITE = http://lttng.org/files/babeltrace/ +LTTNG_BABELTRACE_VERSION = 1.1.1 +LTTNG_BABELTRACE_SOURCE = babeltrace-$(LTTNG_BABELTRACE_VERSION).tar.bz2 +LTTNG_BABELTRACE_LICENSE = MIT; LGPLv2 for include/babeltrace/list.h; GPLv3+ for formats/ctf/metadata/ctf-parser.h +LTTNG_BABELTRACE_LICENSE_FILES = mit-license.txt LICENSE + +LTTNG_BABELTRACE_DEPENDENCIES = popt util-linux libglib2 + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/lttng-libust/Config.in b/package/lttng-libust/Config.in new file mode 100644 index 0000000000..5e1a6d4c8e --- /dev/null +++ b/package/lttng-libust/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_LTTNG_LIBUST + bool "lttng-libust" + select BR2_PACKAGE_LIBURCU + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + # util-linux needs wchar and largefile + depends on BR2_USE_WCHAR + depends on BR2_LARGEFILE + # liburcu only works on some architectures and requires threads support" + depends on BR2_arm || BR2_armeb || BR2_i386 || BR2_powerpc || BR2_x86_64 + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Userspace tracing library for the Lttng tracing + infrastructure. It allows userspace programs to create + custom trace events that are integrated with all other + events gathered by LTTng. + + http://lttng.org + +comment "lttng-libust needs a toolchain w/ wchar, largefile, threads" + depends on BR2_arm || BR2_armeb || BR2_i386 || BR2_powerpc || BR2_x86_64 + depends on !BR2_USE_WCHAR || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/lttng-libust/lttng-libust.mk b/package/lttng-libust/lttng-libust.mk new file mode 100644 index 0000000000..b0ebd3f906 --- /dev/null +++ b/package/lttng-libust/lttng-libust.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# lttng-libust +# +################################################################################ + +LTTNG_LIBUST_SITE = http://lttng.org/files/lttng-ust/ +LTTNG_LIBUST_VERSION = 2.2.0 +LTTNG_LIBUST_SOURCE = lttng-ust-$(LTTNG_LIBUST_VERSION).tar.bz2 +LTTNG_LIBUST_LICENSE = LGPLv2.1; GPLv2 for lttng-gen-tp and ust-ctl +LTTNG_LIBUST_LICENSE_FILES = COPYING + +LTTNG_LIBUST_INSTALL_STAGING = YES +LTTNG_LIBUST_DEPENDENCIES = liburcu util-linux + +LTTNG_LIBUST_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/lttng-modules/Config.in b/package/lttng-modules/Config.in new file mode 100644 index 0000000000..fb5947ff38 --- /dev/null +++ b/package/lttng-modules/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_LTTNG_MODULES + bool "lttng-modules" + depends on BR2_LINUX_KERNEL + help + Kernel modules for the LTTng 2.0 kernel tracing + infrastructure. + + Your kernel must have CONFIG_TRACEPOINTS enabled for this + package to build something useful. You may also want to have + CONFIG_PERF_EVENTS to access perf event counters from + ltt-ng. Note that system call tracing is only available on + architectures that support CONFIG_HAVE_SYSCALL_TRACEPOINTS. + + The packaged version is compatible with kernel 2.6.38, + 2.6.39, 3.0 and 3.1.0. See + http://lttng.org/files/bundles/20111214/README.compatible.kernels.txt + + http://lttng.org + +comment "lttng-modules requires a linux kernel to be built" + depends on !BR2_LINUX_KERNEL diff --git a/package/lttng-modules/lttng-modules.mk b/package/lttng-modules/lttng-modules.mk new file mode 100644 index 0000000000..baa421e202 --- /dev/null +++ b/package/lttng-modules/lttng-modules.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# lttng-modules +# +################################################################################ + +LTTNG_MODULES_VERSION = 2.2.0 +LTTNG_MODULES_SITE = http://lttng.org/files/lttng-modules/ +LTTNG_MODULES_SOURCE = lttng-modules-$(LTTNG_MODULES_VERSION).tar.bz2 +LTTNG_MODULES_LICENSE = LGPLv2.1/GPLv2 for kernel modules; MIT for lib/bitfield.h and lib/prio_heap/* +LTTNG_MODULES_LICENSE_FILES = lgpl-2.1.txt gpl-2.0.txt mit-license.txt LICENSE + +LTTNG_MODULES_DEPENDENCIES = linux + +define LTTNG_MODULES_BUILD_CMDS + $(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) KERNELDIR=$(LINUX_DIR) +endef + +define LTTNG_MODULES_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) KERNELDIR=$(LINUX_DIR) modules_install +endef + +$(eval $(generic-package)) diff --git a/package/lttng-tools/Config.in b/package/lttng-tools/Config.in new file mode 100644 index 0000000000..1e9e0c3439 --- /dev/null +++ b/package/lttng-tools/Config.in @@ -0,0 +1,33 @@ +config BR2_PACKAGE_LTTNG_TOOLS + bool "lttng-tools" + select BR2_PACKAGE_LIBURCU + select BR2_PACKAGE_POPT + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + # liburcu only works on some architectures and requires thread support + depends on BR2_arm || BR2_armeb || BR2_i386 || BR2_powerpc || BR2_x86_64 + depends on BR2_LARGEFILE + depends on BR2_USE_WCHAR # util-linux + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Userspace utilities for the LTTng 2.0 tracing + infrastructure. + + Those utilities are required on the target system to start + and stop tracing sessions. Analysis of the trace can be done + on the host machine using the babeltrace utility. This + utility is automatically built by Buildroot in + $(O)/host/usr/bin/babeltrace, as a dependency of + lttng-tools. However, there is also a lttng-babeltrace + package for the target, if babeltrace on the target is + interesting. + + If userspace tracing is desired, you need to enable + lttng-libust. + + http://lttng.org + +comment "lttng-tools needs a toolchain w/ largefile, threads, wchar" + depends on BR2_arm || BR2_armeb || BR2_i386 || BR2_powerpc || BR2_x86_64 + depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_USE_WCHAR diff --git a/package/lttng-tools/lttng-tools.mk b/package/lttng-tools/lttng-tools.mk new file mode 100644 index 0000000000..f6eff96d90 --- /dev/null +++ b/package/lttng-tools/lttng-tools.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# lttng-tools +# +################################################################################ + +LTTNG_TOOLS_VERSION = 2.2.0 +LTTNG_TOOLS_SITE = http://lttng.org/files/lttng-tools/ +LTTNG_TOOLS_SOURCE = lttng-tools-$(LTTNG_TOOLS_VERSION).tar.bz2 +LTTNG_TOOLS_LICENSE = GPLv2; LGPLv2.1 for include/lttng/* and src/lib/lttng-ctl/* +# gpl-2.0.txt and lgpl-2.1.txt files are missing from the sources +LTTNG_TOOLS_LICENSE_FILES = LICENSE + +# The host-lttng-babeltrace technically isn't a required build +# dependency. However, having the babeltrace utilities built for the +# host is very useful, since those tools allow to convert the binary +# trace format into an human readable format. +LTTNG_TOOLS_DEPENDENCIES = liburcu popt host-lttng-babeltrace util-linux + +LTTNG_AUTORECONF = YES + +ifeq ($(BR2_PACKAGE_LTTNG_LIBUST),y) +LTTNG_TOOLS_CONF_OPT += --enable-lttng-ust +LTTNG_TOOLS_DEPENDENCIES += lttng-libust +else +LTTNG_TOOLS_CONF_OPT += --disable-lttng-ust +endif + +$(eval $(autotools-package)) diff --git a/package/lua-ev/Config.in b/package/lua-ev/Config.in new file mode 100644 index 0000000000..4f704ad54e --- /dev/null +++ b/package/lua-ev/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LUA_EV + bool "lua-ev" + select BR2_PACKAGE_LIBEV + depends on !(BR2_avr32 || BR2_bfin) # libev + help + Get access to the libev library from Lua. + + https://github.com/brimworks/lua-ev diff --git a/package/lua-ev/lua-ev.mk b/package/lua-ev/lua-ev.mk new file mode 100644 index 0000000000..0beece46b0 --- /dev/null +++ b/package/lua-ev/lua-ev.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# lua-ev +# +################################################################################ + +LUA_EV_VERSION = 458165bdfe0c6eadc788813925f11a0e6a823845 +LUA_EV_SITE = http://github.com/brimworks/lua-ev/tarball/$(LUA_EV_VERSION) +LUA_EV_DEPENDENCIES = lua libev +LUA_EV_LICENSE = MIT +LUA_EV_LICENSE_FILES = README +LUA_EV_CONF_OPT = -DINSTALL_CMOD="/usr/lib/lua" + +$(eval $(cmake-package)) diff --git a/package/lua-msgpack-native/Config.in b/package/lua-msgpack-native/Config.in new file mode 100644 index 0000000000..8894ee5352 --- /dev/null +++ b/package/lua-msgpack-native/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LUA_MSGPACK_NATIVE + bool "lua-msgpack-native" + help + This is a native, C language implementation of msgpack + (http://msgpack.org) library/protocol for Lua language + + https://github.com/kengonakajima/lua-msgpack-native diff --git a/package/lua-msgpack-native/lua-msgpack-native.mk b/package/lua-msgpack-native/lua-msgpack-native.mk new file mode 100644 index 0000000000..9065916375 --- /dev/null +++ b/package/lua-msgpack-native/lua-msgpack-native.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# lua-msgpack-native +# +################################################################################ + +LUA_MSGPACK_NATIVE_VERSION = 41cce91ab6b54e4426c6d626a0ac41a02ec2096d +LUA_MSGPACK_NATIVE_SITE = http://github.com/kengonakajima/lua-msgpack-native/tarball/$(LUA_MSGPACK_NATIVE_VERSION) +LUA_MSGPACK_NATIVE_DEPENDENCIES = lua +LUA_MSGPACK_NATIVE_LICENSE = Apache-2.0 +LUA_MSGPACK_NATIVE_LICENSE_FILES = LICENSE.txt + +define LUA_MSGPACK_NATIVE_BUILD_CMDS + $(TARGET_CC) $(TARGET_CFLAGS) -fPIC -shared -o $(@D)/msgpack.so $(@D)/mp.c +endef + +define LUA_MSGPACK_NATIVE_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 -D $(@D)/msgpack.so $(TARGET_DIR)/usr/lib/lua/msgpack.so +endef + +define LUA_MSGPACK_NATIVE_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/lib/lua/msgpack.so +endef + +define LUA_MSGPACK_NATIVE_CLEAN_CMDS + rm -f $(@D)/msgpack.so +endef + +$(eval $(generic-package)) diff --git a/package/lua/Config.in b/package/lua/Config.in index 56eba35290..8c05d081e4 100644 --- a/package/lua/Config.in +++ b/package/lua/Config.in @@ -5,30 +5,30 @@ config BR2_PACKAGE_LUA http://www.lua.org/ -config BR2_PACKAGE_LUA_COMPILER - bool "lua compiler" - depends on BR2_PACKAGE_LUA - select BR2_PACKAGE_LUA_SHARED_LIBRARY - help - Install luac binary +if BR2_PACKAGE_LUA + +choice + prompt "Lua Interpreter command-line editing" + default BR2_PACKAGE_LUA_INTERPRETER_EDITING_NONE -config BR2_PACKAGE_LUA_INTERPRETER - bool "lua interpreter" - depends on BR2_PACKAGE_LUA - select BR2_PACKAGE_LUA_SHARED_LIBRARY +config BR2_PACKAGE_LUA_INTERPRETER_EDITING_NONE + bool "none" help - Install lua binary + None. config BR2_PACKAGE_LUA_INTERPRETER_READLINE bool "readline support" - depends on BR2_PACKAGE_LUA_INTERPRETER select BR2_PACKAGE_READLINE select BR2_PACKAGE_NCURSES help - Enables command-line editing in the lua interpreter. + Enables command-line editing in the Lua interpreter. -config BR2_PACKAGE_LUA_SHARED_LIBRARY - bool "shared library" - depends on BR2_PACKAGE_LUA +config BR2_PACKAGE_LUA_INTERPRETER_LINENOISE + bool "linenoise support" + select BR2_PACKAGE_LINENOISE help - Install shared liblua.so + Enables command-line editing in the Lua interpreter. + +endchoice + +endif diff --git a/package/lua/lua-01-root-path.patch b/package/lua/lua-01-root-path.patch new file mode 100644 index 0000000000..f82c9c5f0e --- /dev/null +++ b/package/lua/lua-01-root-path.patch @@ -0,0 +1,43 @@ +Adjust installation location to /usr. +Remove version in module paths. + +Signed-off-by: Francois Perrad + +Index: b/etc/lua.pc +=================================================================== +--- a/etc/lua.pc ++++ b/etc/lua.pc +@@ -8,13 +8,13 @@ + R= 5.1.5 + + # grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/' +-prefix= /usr/local ++prefix= /usr + INSTALL_BIN= ${prefix}/bin + INSTALL_INC= ${prefix}/include + INSTALL_LIB= ${prefix}/lib + INSTALL_MAN= ${prefix}/man/man1 +-INSTALL_LMOD= ${prefix}/share/lua/${V} +-INSTALL_CMOD= ${prefix}/lib/lua/${V} ++INSTALL_LMOD= ${prefix}/share/lua ++INSTALL_CMOD= ${prefix}/lib/lua + + # canonical vars + exec_prefix=${prefix} +Index: b/src/luaconf.h +=================================================================== +--- a/src/luaconf.h ++++ b/src/luaconf.h +@@ -94,9 +94,9 @@ + ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll" + + #else +-#define LUA_ROOT "/usr/local/" +-#define LUA_LDIR LUA_ROOT "share/lua/5.1/" +-#define LUA_CDIR LUA_ROOT "lib/lua/5.1/" ++#define LUA_ROOT "/usr/" ++#define LUA_LDIR LUA_ROOT "share/lua/" ++#define LUA_CDIR LUA_ROOT "lib/lua/" + #define LUA_PATH_DEFAULT \ + "./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \ + LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua" diff --git a/package/lua/lua-02-shared-libs-for-lua.patch b/package/lua/lua-02-shared-libs-for-lua.patch new file mode 100644 index 0000000000..97a70684f8 --- /dev/null +++ b/package/lua/lua-02-shared-libs-for-lua.patch @@ -0,0 +1,49 @@ +Add the compilation of a shared library. +Compile the lua binary with the shared library. + +Signed-off-by: Francois Perrad + +Index: b/src/Makefile +=================================================================== +--- a/src/Makefile ++++ b/src/Makefile +@@ -23,6 +23,7 @@ + PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris + + LUA_A= liblua.a ++LUA_SO= liblua.so + CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \ + lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \ + lundump.o lvm.o lzio.o +@@ -36,8 +37,9 @@ + LUAC_O= luac.o print.o + + ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O) +-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) ++ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T) + ALL_A= $(LUA_A) ++ALL_SO= $(LUA_SO) + + default: $(PLAT) + +@@ -47,12 +49,18 @@ + + a: $(ALL_A) + ++so: $(ALL_SO) ++ + $(LUA_A): $(CORE_O) $(LIB_O) + $(AR) $@ $(CORE_O) $(LIB_O) # DLL needs all object files + $(RANLIB) $@ + +-$(LUA_T): $(LUA_O) $(LUA_A) +- $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) ++$(LUA_SO): $(CORE_O) $(LIB_O) ++ $(CC) -o $@.$(PKG_VERSION) -shared -Wl,-soname="$@.$(PKG_VERSION)" $? ++ ln -fs $@.$(PKG_VERSION) $@ ++ ++$(LUA_T): $(LUA_O) $(LUA_SO) ++ $(CC) -o $@ -L. $(MYLDFLAGS) $(LUA_O) -llua $(LIBS) + + $(LUAC_T): $(LUAC_O) $(LUA_A) + $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) diff --git a/package/lua/lua-03-shared-libs-for-luac.patch b/package/lua/lua-03-shared-libs-for-luac.patch new file mode 100644 index 0000000000..33f9183bb5 --- /dev/null +++ b/package/lua/lua-03-shared-libs-for-luac.patch @@ -0,0 +1,97 @@ +Compile the luac binary with the shared library. +Many internal functions (LUAI_FUNC) must be exported (LUA_API). + +Signed-off-by: Francois Perrad + +Index: b/src/ldo.h +=================================================================== +--- a/src/ldo.h ++++ b/src/ldo.h +@@ -46,7 +46,7 @@ + LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult); + LUAI_FUNC void luaD_reallocCI (lua_State *L, int newsize); + LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize); +-LUAI_FUNC void luaD_growstack (lua_State *L, int n); ++LUA_API void luaD_growstack (lua_State *L, int n); + + LUAI_FUNC void luaD_throw (lua_State *L, int errcode); + LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud); +Index: b/src/lfunc.h +=================================================================== +--- a/src/lfunc.h ++++ b/src/lfunc.h +@@ -18,7 +18,7 @@ + cast(int, sizeof(TValue *)*((n)-1))) + + +-LUAI_FUNC Proto *luaF_newproto (lua_State *L); ++LUA_API Proto *luaF_newproto (lua_State *L); + LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems, Table *e); + LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems, Table *e); + LUAI_FUNC UpVal *luaF_newupval (lua_State *L); +Index: b/src/lmem.h +=================================================================== +--- a/src/lmem.h ++++ b/src/lmem.h +@@ -38,9 +38,9 @@ + ((v)=cast(t *, luaM_reallocv(L, v, oldn, n, sizeof(t)))) + + +-LUAI_FUNC void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize, ++LUA_API void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize, + size_t size); +-LUAI_FUNC void *luaM_toobig (lua_State *L); ++LUA_API void *luaM_toobig (lua_State *L); + LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size, + size_t size_elem, int limit, + const char *errormsg); +Index: b/src/lstring.h +=================================================================== +--- a/src/lstring.h ++++ b/src/lstring.h +@@ -25,7 +25,7 @@ + + LUAI_FUNC void luaS_resize (lua_State *L, int newsize); + LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e); +-LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); ++LUA_API TString *luaS_newlstr (lua_State *L, const char *str, size_t l); + + + #endif +Index: b/src/lundump.h +=================================================================== +--- a/src/lundump.h ++++ b/src/lundump.h +@@ -17,7 +17,7 @@ + LUAI_FUNC void luaU_header (char* h); + + /* dump one chunk; from ldump.c */ +-LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip); ++LUA_API int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip); + + #ifdef luac_c + /* print one chunk; from print.c */ +Index: b/src/Makefile +=================================================================== +--- a/src/Makefile ++++ b/src/Makefile +@@ -34,7 +34,7 @@ + LUA_O= lua.o + + LUAC_T= luac +-LUAC_O= luac.o print.o ++LUAC_O= luac.o print.o lopcodes.o + + ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O) + ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T) +@@ -62,8 +62,8 @@ + $(LUA_T): $(LUA_O) $(LUA_SO) + $(CC) -o $@ -L. -llua $(MYLDFLAGS) $(LUA_O) $(LIBS) + +-$(LUAC_T): $(LUAC_O) $(LUA_A) +- $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) ++$(LUAC_T): $(LUAC_O) $(LUA_SO) ++ $(CC) -o $@ -L. $(MYLDFLAGS) $(LUAC_O) -llua $(LIBS) + + clean: + $(RM) $(ALL_T) $(ALL_O) diff --git a/package/lua/lua-11-linenoise.patch b/package/lua/lua-11-linenoise.patch new file mode 100644 index 0000000000..488c080a1e --- /dev/null +++ b/package/lua/lua-11-linenoise.patch @@ -0,0 +1,24 @@ +Add support of linenoise (replace readline) + +see discussion, http://lua-users.org/lists/lua-l/2010-03/msg00879.html + +Signed-off-by: Francois Perrad + +Index: b/src/luaconf.h +=================================================================== +--- a/src/luaconf.h ++++ b/src/luaconf.h +@@ -279,6 +279,13 @@ + if (lua_strlen(L,idx) > 0) /* non-empty line? */ \ + add_history(lua_tostring(L, idx)); /* add it to history */ + #define lua_freeline(L,b) ((void)L, free(b)) ++#elif defined(LUA_USE_LINENOISE) ++#include ++#define lua_readline(L,b,p) ((void)L, ((b)=linenoise(p)) != NULL) ++#define lua_saveline(L,idx) \ ++ if (lua_strlen(L,idx) > 0) /* non-empty line? */ \ ++ linenoiseHistoryAdd(lua_tostring(L, idx)); /* add it to history */ ++#define lua_freeline(L,b) ((void)L, free(b)) + #else + #define lua_readline(L,b,p) \ + ((void)L, fputs(p, stdout), fflush(stdout), /* show prompt */ \ diff --git a/package/lua/lua-bug3-boolean_expression.patch b/package/lua/lua-bug3-boolean_expression.patch deleted file mode 100644 index f04eb85075..0000000000 --- a/package/lua/lua-bug3-boolean_expression.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- lua-5.1.4.orig/src/lcode.c 2007/12/28 15:32:23 2.25.1.3 -+++ lua-5.1.4/src/lcode.c 2009/06/15 14:07:34 -@@ -544,15 +544,18 @@ - pc = NO_JUMP; /* always true; do nothing */ - break; - } -- case VFALSE: { -- pc = luaK_jump(fs); /* always jump */ -- break; -- } - case VJMP: { - invertjump(fs, e); - pc = e->u.s.info; - break; - } -+ case VFALSE: { -+ if (!hasjumps(e)) { -+ pc = luaK_jump(fs); /* always jump */ -+ break; -+ } -+ /* else go through */ -+ } - default: { - pc = jumponcond(fs, e, 0); - break; -@@ -572,14 +575,17 @@ - pc = NO_JUMP; /* always false; do nothing */ - break; - } -- case VTRUE: { -- pc = luaK_jump(fs); /* always jump */ -- break; -- } - case VJMP: { - pc = e->u.s.info; - break; - } -+ case VTRUE: { -+ if (!hasjumps(e)) { -+ pc = luaK_jump(fs); /* always jump */ -+ break; -+ } -+ /* else go through */ -+ } - default: { - pc = jumponcond(fs, e, 1); - break; - diff --git a/package/lua/lua-bug4-table.patch b/package/lua/lua-bug4-table.patch deleted file mode 100644 index 9ffc1bb288..0000000000 --- a/package/lua/lua-bug4-table.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- lua-5.1.4.orig/src/lvm.c 2007/12/28 15:32:23 2.63.1.3 -+++ lua-5.1.4/src/lvm.c 2009/07/01 20:36:59 -@@ -133,6 +133,7 @@ - - void luaV_settable (lua_State *L, const TValue *t, TValue *key, StkId val) { - int loop; -+ TValue temp; - for (loop = 0; loop < MAXTAGLOOP; loop++) { - const TValue *tm; - if (ttistable(t)) { /* `t' is a table? */ -@@ -152,7 +153,9 @@ - callTM(L, tm, t, key, val); - return; - } -- t = tm; /* else repeat with `tm' */ -+ /* else repeat with `tm' */ -+ setobj(L, &temp, tm); /* avoid pointing inside table (may rehash) */ -+ t = &temp; - } - luaG_runerror(L, "loop in settable"); - } - diff --git a/package/lua/lua-bug5-debug_getfenv.patch b/package/lua/lua-bug5-debug_getfenv.patch deleted file mode 100644 index fce4d47db8..0000000000 --- a/package/lua/lua-bug5-debug_getfenv.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- lua-5.1.4.orig/src/ldblib.c 2007/12/28 15:32:23 2.63.1.3 -+++ lua-5.1.4/src/ldblib.c 2010/02/23 12:36:59 -@@ -45,6 +45,7 @@ - - - static int db_getfenv (lua_State *L) { -+ luaL_checkany(L, 1); - lua_getfenv(L, 1); - return 1; - } diff --git a/package/lua/lua-bug6-gc_performance.patch b/package/lua/lua-bug6-gc_performance.patch deleted file mode 100644 index 3c78525b0b..0000000000 --- a/package/lua/lua-bug6-gc_performance.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- lua-5.1.4.orig/src/llex.c 2007/12/28 15:32:23 2.63.1.3 -+++ lua-5.1.4/src/llex.c 2010/02/23 12:36:59 -@@ -118,8 +118,10 @@ - lua_State *L = ls->L; - TString *ts = luaS_newlstr(L, str, l); - TValue *o = luaH_setstr(L, ls->fs->h, ts); /* entry for `str' */ -- if (ttisnil(o)) -+ if (ttisnil(o)) { - setbvalue(o, 1); /* make sure `str' will not be collected */ -+ luaC_checkGC(L); -+ } - return ts; - } - diff --git a/package/lua/lua-bug7-string_format.patch b/package/lua/lua-bug7-string_format.patch deleted file mode 100644 index 68f31977fb..0000000000 --- a/package/lua/lua-bug7-string_format.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- lua-5.1.4.orig/src/lstrlib.c 2008/07/11 17:27:21 1.132.1.4 -+++ lua-5.1.4/src/lstrlib.c 2010/05/14 15:12:53 -@@ -754,6 +754,7 @@ - - - static int str_format (lua_State *L) { -+ int top = lua_gettop(L); - int arg = 1; - size_t sfl; - const char *strfrmt = luaL_checklstring(L, arg, &sfl); -@@ -768,7 +769,8 @@ - else { /* format item */ - char form[MAX_FORMAT]; /* to store the format (`%...') */ - char buff[MAX_ITEM]; /* to store the formatted item */ -- arg++; -+ if (++arg > top) -+ luaL_argerror(L, arg, "no value"); - strfrmt = scanformat(L, strfrmt, form); - switch (*strfrmt++) { - case 'c': { diff --git a/package/lua/lua-bug8-io_read.patch b/package/lua/lua-bug8-io_read.patch deleted file mode 100644 index fb56bcf317..0000000000 --- a/package/lua/lua-bug8-io_read.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- lua-5.1.4.orig/src/liolib.c 2008/01/18 17:47:43 2.73.1.3 -+++ lua-5.1.4.orig/src/liolib.c 2010/05/14 15:29:29 -@@ -276,7 +276,10 @@ - lua_pushnumber(L, d); - return 1; - } -- else return 0; /* read fails */ -+ else { -+ lua_pushnil(L); /* "result" to be removed */ -+ return 0; /* read fails */ -+ } - } - - diff --git a/package/lua/lua-root-path.patch b/package/lua/lua-root-path.patch deleted file mode 100644 index a00b99e26e..0000000000 --- a/package/lua/lua-root-path.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -Naur lua-5.1.4.org/src/luaconf.h lua-5.1.4/src/luaconf.h ---- lua-5.1.4.org/src/luaconf.h 2008-02-11 17:25:08.000000000 +0100 -+++ lua-5.1.4/src/luaconf.h 2009-11-24 23:19:15.052817379 +0100 -@@ -94,9 +94,9 @@ - ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll" - - #else --#define LUA_ROOT "/usr/local/" --#define LUA_LDIR LUA_ROOT "share/lua/5.1/" --#define LUA_CDIR LUA_ROOT "lib/lua/5.1/" -+#define LUA_ROOT "/usr/" -+#define LUA_LDIR LUA_ROOT "share/lua/" -+#define LUA_CDIR LUA_ROOT "lib/lua/" - #define LUA_PATH_DEFAULT \ - "./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \ - LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua" - diff --git a/package/lua/lua-shared-libs.patch b/package/lua/lua-shared-libs.patch deleted file mode 100644 index d24015c5de..0000000000 --- a/package/lua/lua-shared-libs.patch +++ /dev/null @@ -1,145 +0,0 @@ -diff -Naur lua-5.1.4.org/Makefile lua-5.1.4/Makefile ---- lua-5.1.4.org/Makefile 2009-11-24 23:49:28.232820455 +0100 -+++ lua-5.1.4/Makefile 2009-11-24 23:50:35.452817115 +0100 -@@ -43,7 +43,7 @@ - # What to install. - TO_BIN= lua luac - TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp --TO_LIB= liblua.a -+TO_LIB= liblua.a liblua.so.$R - TO_MAN= lua.1 luac.1 - - # Lua version and release. -@@ -63,6 +63,7 @@ - cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN) - cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) - cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) -+ ln -sf liblua.so.$R $(INSTALL_LIB)/liblua.so - cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) - - ranlib: -diff -Naur lua-5.1.4.org/src/ldo.h lua-5.1.4/src/ldo.h ---- lua-5.1.4.org/src/ldo.h 2009-11-24 23:49:28.232820455 +0100 -+++ lua-5.1.4/src/ldo.h 2009-11-24 23:49:54.244818140 +0100 -@@ -46,7 +46,7 @@ - LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult); - LUAI_FUNC void luaD_reallocCI (lua_State *L, int newsize); - LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize); --LUAI_FUNC void luaD_growstack (lua_State *L, int n); -+LUA_API void luaD_growstack (lua_State *L, int n); - - LUAI_FUNC void luaD_throw (lua_State *L, int errcode); - LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud); -diff -Naur lua-5.1.4.org/src/lfunc.h lua-5.1.4/src/lfunc.h ---- lua-5.1.4.org/src/lfunc.h 2009-11-24 23:49:28.236815431 +0100 -+++ lua-5.1.4/src/lfunc.h 2009-11-24 23:49:54.244818140 +0100 -@@ -18,7 +18,7 @@ - cast(int, sizeof(TValue *)*((n)-1))) - - --LUAI_FUNC Proto *luaF_newproto (lua_State *L); -+LUA_API Proto *luaF_newproto (lua_State *L); - LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems, Table *e); - LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems, Table *e); - LUAI_FUNC UpVal *luaF_newupval (lua_State *L); -diff -Naur lua-5.1.4.org/src/lmem.h lua-5.1.4/src/lmem.h ---- lua-5.1.4.org/src/lmem.h 2009-11-24 23:49:28.236815431 +0100 -+++ lua-5.1.4/src/lmem.h 2009-11-24 23:49:54.244818140 +0100 -@@ -38,9 +38,9 @@ - ((v)=cast(t *, luaM_reallocv(L, v, oldn, n, sizeof(t)))) - - --LUAI_FUNC void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize, -+LUA_API void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize, - size_t size); --LUAI_FUNC void *luaM_toobig (lua_State *L); -+LUA_API void *luaM_toobig (lua_State *L); - LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size, - size_t size_elem, int limit, - const char *errormsg); -diff -Naur lua-5.1.4.org/src/lstring.h lua-5.1.4/src/lstring.h ---- lua-5.1.4.org/src/lstring.h 2009-11-24 23:49:28.236815431 +0100 -+++ lua-5.1.4/src/lstring.h 2009-11-24 23:49:54.244818140 +0100 -@@ -25,7 +25,7 @@ - - LUAI_FUNC void luaS_resize (lua_State *L, int newsize); - LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e); --LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); -+LUA_API TString *luaS_newlstr (lua_State *L, const char *str, size_t l); - - - #endif -diff -Naur lua-5.1.4.org/src/lundump.h lua-5.1.4/src/lundump.h ---- lua-5.1.4.org/src/lundump.h 2009-11-24 23:49:28.232820455 +0100 -+++ lua-5.1.4/src/lundump.h 2009-11-24 23:49:54.244818140 +0100 -@@ -17,7 +17,7 @@ - LUAI_FUNC void luaU_header (char* h); - - /* dump one chunk; from ldump.c */ --LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip); -+LUA_API int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip); - - #ifdef luac_c - /* print one chunk; from print.c */ -diff -Naur lua-5.1.4.org/src/Makefile lua-5.1.4/src/Makefile ---- lua-5.1.4.org/src/Makefile 2009-11-24 23:49:28.236815431 +0100 -+++ lua-5.1.4/src/Makefile 2009-11-24 23:49:54.244818140 +0100 -@@ -23,6 +23,7 @@ - PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris - - LUA_A= liblua.a -+LUA_SO= liblua.so - CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \ - lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \ - lundump.o lvm.o lzio.o -@@ -33,11 +34,12 @@ - LUA_O= lua.o - - LUAC_T= luac --LUAC_O= luac.o print.o -+LUAC_O= luac.o print.o lopcodes.o - - ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O) --ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) -+ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T) - ALL_A= $(LUA_A) -+ALL_SO= $(LUA_SO) - - default: $(PLAT) - -@@ -47,14 +49,23 @@ - - a: $(ALL_A) - -+so: $(ALL_SO) -+ - $(LUA_A): $(CORE_O) $(LIB_O) - $(AR) $@ $? - $(RANLIB) $@ - --$(LUA_T): $(LUA_O) $(LUA_A) -- $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) -+$(LUA_SO): $(CORE_O) $(LIB_O) -+ $(CC) -o $@.$(PKG_VERSION) -shared -Wl,-soname="$@.$(PKG_VERSION)" $? -nostdlib -lgcc -+ ln -fs $@.$(PKG_VERSION) $@ -+ -+$(LUA_T): $(LUA_O) $(LUA_SO) -+ $(CC) -o $@ -L. -llua $(MYLDFLAGS) $(LUA_O) $(LIBS) -+ -+$(LUAC_T): $(LUAC_O) $(LUA_SO) -+ $(CC) -o $@ -L. -llua $(MYLDFLAGS) $(LUAC_O) $(LIBS) - --$(LUAC_T): $(LUAC_O) $(LUA_A) -+$(LUAC_T)-host: $(LUAC_O) $(LUA_A) - $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) - - clean: -@@ -96,7 +107,7 @@ - $(MAKE) all MYCFLAGS= - - linux: -- $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses" -+ $(MAKE) all MYCFLAGS+=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses" - - macosx: - $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline" diff --git a/package/lua/lua.mk b/package/lua/lua.mk index 598eea140c..904ca523bc 100644 --- a/package/lua/lua.mk +++ b/package/lua/lua.mk @@ -1,97 +1,91 @@ -############################################################# +################################################################################ # # lua # -############################################################# +################################################################################ -LUA_VERSION = 5.1.4 +LUA_VERSION = 5.1.5 LUA_SITE = http://www.lua.org/ftp LUA_INSTALL_STAGING = YES +LUA_LICENSE = MIT +LUA_LICENSE_FILES = COPYRIGHT -ifeq ($(BR2_PACKAGE_LUA_SHARED_LIBRARY),y) - LUA_MYCFLAGS += -fPIC -DLUA_USE_DLOPEN - LUA_MYLIBS += -ldl -endif +LUA_CFLAGS = -Wall -fPIC +LUA_MYLIBS += -ldl ifeq ($(BR2_PACKAGE_LUA_INTERPRETER_READLINE),y) LUA_DEPENDENCIES = readline ncurses LUA_MYLIBS += -lreadline -lhistory -lncurses - LUA_MYCFLAGS += -DLUA_USE_LINUX + LUA_CFLAGS += -DLUA_USE_POSIX -DLUA_USE_DLOPEN -DLUA_USE_READLINE +else +ifeq ($(BR2_PACKAGE_LUA_INTERPRETER_LINENOISE),y) + LUA_DEPENDENCIES = linenoise + LUA_MYLIBS += -llinenoise + LUA_CFLAGS += -DLUA_USE_POSIX -DLUA_USE_DLOPEN -DLUA_USE_LINENOISE else - LUA_MYCFLAGS += -DLUA_USE_POSIX + LUA_CFLAGS += -DLUA_USE_POSIX -DLUA_USE_DLOPEN endif +endif + +# We never want to have host-readline and host-ncurses as dependencies +# of host-lua. +HOST_LUA_DEPENDENCIES = +HOST_LUA_CFLAGS = -Wall -fPIC -DLUA_USE_DLOPEN -DLUA_USE_POSIX +HOST_LUA_MYLIBS = -ldl define LUA_BUILD_CMDS - sed -i -e 's/-O2//' $(@D)/src/Makefile - sed -i -e 's/\/usr\/local/\/usr/' $(@D)/etc/lua.pc $(MAKE) \ CC="$(TARGET_CC)" RANLIB="$(TARGET_RANLIB)" \ - MYCFLAGS="$(TARGET_CFLAGS) $(LUA_MYCFLAGS)" \ + CFLAGS="$(TARGET_CFLAGS) $(LUA_CFLAGS)" \ MYLIBS="$(LUA_MYLIBS)" AR="$(TARGET_CROSS)ar rcu" \ PKG_VERSION=$(LUA_VERSION) -C $(@D)/src all endef -ifeq ($(BR2_PACKAGE_LUA_SHARED_LIBRARY),y) -define LUA_INSTALL_STAGING_SHARED_LIB - $(INSTALL) -D $(@D)/src/liblua.so.$(LUA_VERSION) \ - $(STAGING_DIR)/usr/lib/liblua.so.$(LUA_VERSION) - ln -sf liblua.so.$(LUA_VERSION) $(STAGING_DIR)/usr/lib/liblua.so +define HOST_LUA_BUILD_CMDS + $(MAKE) \ + CFLAGS="$(HOST_LUA_CFLAGS)" \ + MYLDFLAGS="$(HOST_LDFLAGS)" \ + MYLIBS="$(HOST_LUA_MYLIBS)" \ + PKG_VERSION=$(LUA_VERSION) -C $(@D)/src all endef -endif define LUA_INSTALL_STAGING_CMDS $(INSTALL) -m 0644 -D $(@D)/etc/lua.pc \ $(STAGING_DIR)/usr/lib/pkgconfig/lua.pc - $(INSTALL) $(@D)/src/liblua.a $(STAGING_DIR)/usr/lib - $(INSTALL) $(@D)/src/lua $(STAGING_DIR)/usr/bin - $(INSTALL) $(@D)/src/luac $(STAGING_DIR)/usr/bin - $(INSTALL) $(@D)/src/lua.h $(STAGING_DIR)/usr/include - $(INSTALL) $(@D)/src/luaconf.h $(STAGING_DIR)/usr/include - $(INSTALL) $(@D)/src/lualib.h $(STAGING_DIR)/usr/include - $(INSTALL) $(@D)/src/lauxlib.h $(STAGING_DIR)/usr/include -endef - -ifeq ($(BR2_PACKAGE_LUA_INTERPRETER),y) -define LUA_INSTALL_INTERPRETER - $(INSTALL) $(@D)/src/lua $(TARGET_DIR)/usr/bin -endef -endif - -ifeq ($(BR2_PACKAGE_LUA_COMPILER),y) -define LUA_INSTALL_COMPILER - $(INSTALL) $(@D)/src/luac $(TARGET_DIR)/usr/bin + $(INSTALL) -m 0755 -D $(@D)/src/lua $(STAGING_DIR)/usr/bin/lua + $(INSTALL) -m 0755 -D $(@D)/src/luac $(STAGING_DIR)/usr/bin/luac + $(INSTALL) -m 0755 -D $(@D)/src/liblua.so.$(LUA_VERSION) \ + $(STAGING_DIR)/usr/lib/liblua.so.$(LUA_VERSION) + ln -sf liblua.so.$(LUA_VERSION) $(STAGING_DIR)/usr/lib/liblua.so + $(INSTALL) -m 0644 -D $(@D)/src/liblua.a $(STAGING_DIR)/usr/lib/liblua.a + $(INSTALL) -m 0644 -D $(@D)/src/lua.h $(STAGING_DIR)/usr/include/lua.h + $(INSTALL) -m 0644 -D $(@D)/src/luaconf.h $(STAGING_DIR)/usr/include/luaconf.h + $(INSTALL) -m 0644 -D $(@D)/src/lualib.h $(STAGING_DIR)/usr/include/lualib.h + $(INSTALL) -m 0644 -D $(@D)/src/lauxlib.h $(STAGING_DIR)/usr/include/lauxlib.h endef -endif -ifeq ($(BR2_PACKAGE_LUA_SHARED_LIBRARY),y) -define LUA_INSTALL_LIBRARY - $(INSTALL) $(@D)/src/liblua.so.$(LUA_VERSION) \ +define LUA_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/src/lua $(TARGET_DIR)/usr/bin/lua + $(INSTALL) -m 0755 -D $(@D)/src/luac $(TARGET_DIR)/usr/bin/luac + $(INSTALL) -m 0755 -D $(@D)/src/liblua.so.$(LUA_VERSION) \ $(TARGET_DIR)/usr/lib/liblua.so.$(LUA_VERSION) ln -sf liblua.so.$(LUA_VERSION) $(TARGET_DIR)/usr/lib/liblua.so - $(INSTALL) $(@D)/src/liblua.a $(TARGET_DIR)/usr/lib/liblua.a -endef -else -define LUA_INSTALL_LIBRARY - $(INSTALL) $(@D)/src/liblua.a $(TARGET_DIR)/usr/lib/liblua.a + $(INSTALL) -m 0644 -D $(@D)/src/liblua.a $(TARGET_DIR)/usr/lib/liblua.a endef -endif -ifeq ($(BR2_HAVE_DEVFILES),y) -define LUA_INSTALL_DEVFILES +define HOST_LUA_INSTALL_CMDS + $(INSTALL) -m 0755 -D $(@D)/src/lua $(HOST_DIR)/usr/bin/lua + $(INSTALL) -m 0755 -D $(@D)/src/luac $(HOST_DIR)/usr/bin/luac + $(INSTALL) -m 0755 -D $(@D)/src/liblua.so.$(LUA_VERSION) \ + $(HOST_DIR)/usr/lib/liblua.so.$(LUA_VERSION) + ln -sf liblua.so.$(LUA_VERSION) $(HOST_DIR)/usr/lib/liblua.so + $(INSTALL) -m 0644 -D $(@D)/src/liblua.a $(HOST_DIR)/usr/lib/liblua.a $(INSTALL) -m 0644 -D $(@D)/etc/lua.pc \ - $(TARGET_DIR)/usr/lib/pkgconfig/lua.pc - $(INSTALL) $(@D)/src/lua.h $(TARGET_DIR)/usr/include - $(INSTALL) $(@D)/src/luaconf.h $(TARGET_DIR)/usr/include - $(INSTALL) $(@D)/src/lualib.h $(TARGET_DIR)/usr/include - $(INSTALL) $(@D)/src/lauxlib.h $(TARGET_DIR)/usr/include -endef -endif - -define LUA_INSTALL_TARGET_CMDS - $(LUA_INSTALL_INTERPRETER) - $(LUA_INSTALL_COMPILER) - $(LUA_INSTALL_LIBRARY) - $(LUA_INSTALL_DEVFILES) + $(HOST_DIR)/usr/lib/pkgconfig/lua.pc + $(INSTALL) -m 0644 -D $(@D)/src/lua.h $(HOST_DIR)/usr/include/lua.h + $(INSTALL) -m 0644 -D $(@D)/src/luaconf.h $(HOST_DIR)/usr/include/luaconf.h + $(INSTALL) -m 0644 -D $(@D)/src/lualib.h $(HOST_DIR)/usr/include/lualib.h + $(INSTALL) -m 0644 -D $(@D)/src/lauxlib.h $(HOST_DIR)/usr/include/lauxlib.h endef LUA_INSTALLED_FILES = \ @@ -117,8 +111,19 @@ define LUA_UNINSTALL_TARGET_CMDS done endef +define HOST_LUA_UNINSTALL_TARGET_CMDS + for i in $(LUA_INSTALLED_FILES); do \ + rm -f $(HOST_DIR)$$i; \ + done +endef + define LUA_CLEAN_CMDS -$(MAKE) -C $(@D) clean endef -$(eval $(call GENTARGETS,package,lua)) +define HOST_LUA_CLEAN_CMDS + -$(MAKE) -C $(@D) clean +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/luabitop/Config.in b/package/luabitop/Config.in new file mode 100644 index 0000000000..83a85b16cd --- /dev/null +++ b/package/luabitop/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LUABITOP + bool "luabitop" + help + Lua BitOp is a C extension module for Lua 5.1/5.2 which adds bitwise + operations on numbers. + + http://bitop.luajit.org diff --git a/package/luabitop/luabitop.mk b/package/luabitop/luabitop.mk new file mode 100644 index 0000000000..c61e826c02 --- /dev/null +++ b/package/luabitop/luabitop.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# luabitop +# +################################################################################ + +LUABITOP_VERSION = 1.0.2 +LUABITOP_SOURCE = LuaBitOp-$(LUABITOP_VERSION).tar.gz +LUABITOP_SITE = http://bitop.luajit.org/download +LUABITOP_LICENSE = MIT +LUABITOP_LICENSE_FILES = README +LUABITOP_DEPENDENCIES = lua + +define LUABITOP_BUILD_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) +endef + +define LUABITOP_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/usr/lib/lua + $(INSTALL) -p $(@D)/bit.so $(TARGET_DIR)/usr/lib/lua +endef + +define LUABITOP_CLEAN_CMDS + $(MAKE) -C $(@D) clean +endef + +$(eval $(generic-package)) diff --git a/package/luacjson/Config.in b/package/luacjson/Config.in new file mode 100644 index 0000000000..8a5624f759 --- /dev/null +++ b/package/luacjson/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LUACJSON + bool "luacjson" + help + The Lua CJSON module provides JSON support for Lua. It features: + - Fast, standards compliant encoding/parsing routines + - Full support for JSON with UTF-8, including decoding surrogate pairs + - Optional run-time support for common exceptions to the JSON + specification (infinity, NaN, ...) + - No dependencies on other libraries + + (C-module) + + http://www.kyne.com.au/~mark/software/lua-cjson.php diff --git a/package/luacjson/luacjson.mk b/package/luacjson/luacjson.mk new file mode 100644 index 0000000000..f976ec6139 --- /dev/null +++ b/package/luacjson/luacjson.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# luacjson +# +################################################################################ + +LUACJSON_VERSION = 2.1.0 +LUACJSON_SOURCE = lua-cjson-$(LUACJSON_VERSION).tar.gz +LUACJSON_SITE = http://www.kyne.com.au/~mark/software/download +LUACJSON_DEPENDENCIES = lua +LUACJSON_LICENSE = MIT +LUACJSON_LICENSE_FILES = LICENSE + +define LUACJSON_BUILD_CMDS + $(MAKE) -C $(@D) \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + CC="$(TARGET_CC)" \ + LD="$(TARGET_LD)" \ + PREFIX=$(STAGING_DIR)/usr +endef + +define LUACJSON_INSTALL_TARGET_CMDS + install -D -m 0644 $(@D)/cjson.so $(TARGET_DIR)/usr/lib/lua/cjson.so +endef + +define LUACJSON_CLEAN_CMDS + $(MAKE) -C $(@D) clean +endef + +define LUACJSON_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/lib/lua/cjson.so +endef + +$(eval $(generic-package)) diff --git a/package/luacrypto/Config.in b/package/luacrypto/Config.in new file mode 100644 index 0000000000..8d13eec6b5 --- /dev/null +++ b/package/luacrypto/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LUACRYPTO + bool "luacrypto" + select BR2_PACKAGE_OPENSSL + help + LuaCrypto provides a Lua frontend to the OpenSSL cryptographic + library. + The OpenSSL features that are currently exposed are digests (MD5, + SHA-1, HMAC, and more) and crypto-grade random number generators + communication. + + http://luacrypto.luaforge.net diff --git a/package/luacrypto/luacrypto-01-autotools.patch b/package/luacrypto/luacrypto-01-autotools.patch new file mode 100644 index 0000000000..e8befb05f8 --- /dev/null +++ b/package/luacrypto/luacrypto-01-autotools.patch @@ -0,0 +1,30 @@ +autotools: fix install directories + +Signed-off-by: Francois Perrad + +Index: b/Makefile.am +=================================================================== +--- a/Makefile.am ++++ b/Makefile.am +@@ -3,7 +3,7 @@ + SUBDIRS = src \ + doc + +-pkgconfigdir = $(libdir)/pkgconfig ++pkgconfigdir = $(prefix)/lib/pkgconfig + pkgconfig_DATA = luacrypto.pc + + test: all +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -31,7 +31,7 @@ + PKG_CHECK_MODULES([LUA], [lua]) + + # lua libdir +-LUALIBDIR="`$PKGCONFIG --variable=libdir lua`" ++LUALIBDIR="`$PKGCONFIG --variable=INSTALL_CMOD lua`" + + # dest of headers + CRYPTOINC="${includedir}/${PACKAGE_NAME}" diff --git a/package/luacrypto/luacrypto.mk b/package/luacrypto/luacrypto.mk new file mode 100644 index 0000000000..f6fcc787e1 --- /dev/null +++ b/package/luacrypto/luacrypto.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# luacrypto +# +################################################################################ + +LUACRYPTO_VERSION = 0.3.2 +LUACRYPTO_SITE = http://github.com/mkottman/luacrypto/tarball/$(LUACRYPTO_VERSION) +LUACRYPTO_LICENSE = MIT +LUACRYPTO_LICENSE_FILES = COPYING +LUACRYPTO_DEPENDENCIES = lua openssl host-pkgconf +LUACRYPTO_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/luaexpat/Config.in b/package/luaexpat/Config.in new file mode 100644 index 0000000000..186c5c917b --- /dev/null +++ b/package/luaexpat/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LUAEXPAT + bool "luaexpat" + select BR2_PACKAGE_EXPAT + help + LuaExpat is a SAX XML parser based on the Expat library. + + http://matthewwild.co.uk/projects/luaexpat/ diff --git a/package/luaexpat/luaexpat.mk b/package/luaexpat/luaexpat.mk new file mode 100644 index 0000000000..5c45f3424c --- /dev/null +++ b/package/luaexpat/luaexpat.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# luaexpat +# +################################################################################ + +LUAEXPAT_VERSION = 1.2.0 +LUAEXPAT_SITE = http://matthewwild.co.uk/projects/luaexpat +LUAEXPAT_DEPENDENCIES = lua expat +LUAEXPAT_LICENSE = MIT + + +LUAEXPAT_MFLAGS += LUA_VERSION_NUM=501 +LUAEXPAT_MFLAGS += LUA_INC=$(STAGING_DIR)/usr/include/lua +LUAEXPAT_MFLAGS += EXPAT_INC=$(STAGING_DIR)/usr/include +LUAEXPAT_MFLAGS += LIBNAME=lxp.so +LUAEXPAT_MFLAGS += LIB_OPTION="-shared -fPIC $(TARGET_CFLAGS)" +LUAEXPAT_MFLAGS += CC="$(TARGET_CC) -fPIC $(TARGET_CFLAGS)" + + +define LUAEXPAT_BUILD_CMDS + $(MAKE) -C $(@D) $(LUAEXPAT_MFLAGS) +endef + +define LUAEXPAT_INSTALL_TARGET_CMDS + $(INSTALL) -D $(@D)/src/lxp.so $(TARGET_DIR)/usr/lib/lua/lxp.so + $(INSTALL) -D -m 0644 $(@D)/src/lxp/lom.lua $(TARGET_DIR)/usr/share/lua/lxp/lom.lua +endef + +define LUAEXPAT_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/lib/lua/lxp.so + rm -f $(TARGET_DIR)/usr/share/lua/lxp/lom.lua +endef + +define LUAEXPAT_CLEAN_CMDS + $(MAKE) -C $(@D) $(LUAEXPAT_MFLAGS) clean +endef + +$(eval $(generic-package)) diff --git a/package/luaexpatutils/Config.in b/package/luaexpatutils/Config.in new file mode 100644 index 0000000000..cb2887acaa --- /dev/null +++ b/package/luaexpatutils/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LUAEXPATUTILS + bool "luaexpatutils" + select BR2_PACKAGE_LUAEXPAT + help + lxp.doc is a module that provides useful features for working with + XML formats in LOM format as used by the LuaExpat project from Kepler. + + https://github.com/stevedonovan/LuaExpatUtils diff --git a/package/luaexpatutils/luaexpatutils.mk b/package/luaexpatutils/luaexpatutils.mk new file mode 100644 index 0000000000..391031b9c1 --- /dev/null +++ b/package/luaexpatutils/luaexpatutils.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# luaexpatutils +# +################################################################################ + +LUAEXPATUTILS_VERSION = 88c228365b084224c911d34aff06002634b38b50 +LUAEXPATUTILS_SITE = http://github.com/stevedonovan/LuaExpatUtils/tarball/$(LUAEXPATUTILS_VERSION) +LUAEXPATUTILS_LICENSE = Public Domain +LUAEXPATUTILS_DEPENDENCIES = luaexpat + +define LUAEXPATUTILS_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D $(@D)/lua/doc.lua \ + $(TARGET_DIR)/usr/share/lua/lxp/doc.lua +endef + +define LUAEXPATUTILS_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/share/lua/lxp/doc.lua +endef + +$(eval $(generic-package)) diff --git a/package/luafilesystem/Config.in b/package/luafilesystem/Config.in index edcb414a9a..7c130f8d3b 100644 --- a/package/luafilesystem/Config.in +++ b/package/luafilesystem/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_LUAFILESYSTEM bool "luafilesystem" - select BR2_PACKAGE_LUA_SHARED_LIBRARY help LuaFileSystem offers a portable way to access the underlying directory structure and file attributes. diff --git a/package/luafilesystem/luafilesystem.mk b/package/luafilesystem/luafilesystem.mk index 5f1119a630..2f7b4d8a95 100644 --- a/package/luafilesystem/luafilesystem.mk +++ b/package/luafilesystem/luafilesystem.mk @@ -1,12 +1,13 @@ -############################################################# +################################################################################ # # luafilesystem # -############################################################# +################################################################################ -LUAFILESYSTEM_VERSION = 1.5.0 +LUAFILESYSTEM_VERSION = 1.6.2 LUAFILESYSTEM_SITE = http://github.com/downloads/keplerproject/luafilesystem LUAFILESYSTEM_DEPENDENCIES = lua +LUAFILESYSTEM_LICENSE = MIT ifeq ($(BR2_LARGEFILE),y) LFS_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE @@ -28,4 +29,4 @@ define LUAFILESYSTEM_CLEAN_CMDS $(MAKE) -C $(@D) clean endef -$(eval $(call GENTARGETS,package,luafilesystem)) +$(eval $(generic-package)) diff --git a/package/luajit/Config.in b/package/luajit/Config.in new file mode 100644 index 0000000000..23b2650493 --- /dev/null +++ b/package/luajit/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LUAJIT + bool "luajit" + # Luajit is only available for some target architectures, and + # has some complexity wrt 32/64. See luajit.mk for details. + depends on BR2_i386 || (BR2_x86_64 && BR2_HOSTARCH='x86_64') || BR2_powerpc || BR2_arm || BR2_armeb + help + LuaJIT implements the full set of language features defined + by Lua 5.1. The virtual machine (VM) is API- and + ABI-compatible to the standard Lua interpreter and can be + deployed as a drop-in replacement. + + http://luajit.org/ diff --git a/package/luajit/luajit-01-root-path.patch b/package/luajit/luajit-01-root-path.patch new file mode 100644 index 0000000000..cc2f04f6a6 --- /dev/null +++ b/package/luajit/luajit-01-root-path.patch @@ -0,0 +1,22 @@ +Adjust installation location to /usr + +Signed-off-by: Francois Perrad +Signed-off-by: Thomas Petazzoni + +Index: b/src/luaconf.h +=================================================================== +--- a/src/luaconf.h ++++ b/src/luaconf.h +@@ -26,9 +26,9 @@ + ** Note to distribution maintainers: do NOT patch the following line! + ** Please read ../doc/install.html#distro and pass PREFIX=/usr instead. + */ +-#define LUA_ROOT "/usr/local/" +-#define LUA_LDIR LUA_ROOT "share/lua/5.1/" +-#define LUA_CDIR LUA_ROOT "lib/lua/5.1/" ++#define LUA_ROOT "/usr/" ++#define LUA_LDIR LUA_ROOT "share/lua/" ++#define LUA_CDIR LUA_ROOT "lib/lua/" + #ifdef LUA_XROOT + #define LUA_JDIR LUA_XROOT "share/luajit-2.0.0/" + #define LUA_XPATH \ diff --git a/package/luajit/luajit-02-shared-lib.patch b/package/luajit/luajit-02-shared-lib.patch new file mode 100644 index 0000000000..361e5c2721 --- /dev/null +++ b/package/luajit/luajit-02-shared-lib.patch @@ -0,0 +1,17 @@ +Compile the luajit binary dynamically against the luajit library + +Signed-off-by: Thomas Petazzoni + +Index: b/src/Makefile +=================================================================== +--- a/src/Makefile ++++ b/src/Makefile +@@ -669,7 +669,7 @@ + + $(LUAJIT_T): $(TARGET_O) $(LUAJIT_O) $(TARGET_DEP) + $(E) "LINK $@" +- $(Q)$(TARGET_LD) $(TARGET_ALDFLAGS) -o $@ $(LUAJIT_O) $(TARGET_O) $(TARGET_ALIBS) ++ $(Q)$(TARGET_LD) $(TARGET_ALDFLAGS) -o $@ $(LUAJIT_O) -lluajit -L. $(TARGET_ALIBS) + $(Q)$(TARGET_STRIP) $@ + $(E) "OK Successfully built LuaJIT" + diff --git a/package/luajit/luajit-03-dont-strip.patch b/package/luajit/luajit-03-dont-strip.patch new file mode 100644 index 0000000000..66bdadf139 --- /dev/null +++ b/package/luajit/luajit-03-dont-strip.patch @@ -0,0 +1,23 @@ +Don't strip the library and binary + +This allows Buildroot to do it if needed, but only if needed. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/Makefile +=================================================================== +--- a/src/Makefile ++++ b/src/Makefile +@@ -665,12 +665,10 @@ + $(LUAJIT_SO): $(LJVMCORE_O) + $(E) "DYNLINK $@" + $(Q)$(TARGET_LD) $(TARGET_ASHLDFLAGS) -o $@ $(LJVMCORE_DYNO) $(TARGET_ALIBS) +- $(Q)$(TARGET_STRIP) $@ + + $(LUAJIT_T): $(TARGET_O) $(LUAJIT_O) $(TARGET_DEP) + $(E) "LINK $@" + $(Q)$(TARGET_LD) $(TARGET_ALDFLAGS) -o $@ $(LUAJIT_O) -lluajit -L. $(TARGET_ALIBS) +- $(Q)$(TARGET_STRIP) $@ + $(E) "OK Successfully built LuaJIT" + + ############################################################################## diff --git a/package/luajit/luajit-04-no-bin-symlink.patch b/package/luajit/luajit-04-no-bin-symlink.patch new file mode 100644 index 0000000000..0de3162027 --- /dev/null +++ b/package/luajit/luajit-04-no-bin-symlink.patch @@ -0,0 +1,26 @@ +Do not use a symlink for the binary, simply name if luajit + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -42,8 +42,7 @@ + INSTALL_MAN= $(INSTALL_SHARE)/man/man1 + INSTALL_PKGCONFIG= $(INSTALL_LIB)/pkgconfig + +-INSTALL_TNAME= luajit-$(VERSION) +-INSTALL_TSYMNAME= luajit ++INSTALL_TNAME= luajit + INSTALL_ANAME= libluajit-$(ABIVER).a + INSTALL_SONAME= libluajit-$(ABIVER).so.$(MAJVER).$(MINVER).$(RELVER) + INSTALL_SOSHORT= libluajit-$(ABIVER).so +@@ -57,7 +56,6 @@ + INSTALL_SHORT1= $(INSTALL_LIB)/$(INSTALL_SOSHORT) + INSTALL_SHORT2= $(INSTALL_LIB)/$(INSTALL_SOSHORT) + INSTALL_T= $(INSTALL_BIN)/$(INSTALL_TNAME) +-INSTALL_TSYM= $(INSTALL_BIN)/$(INSTALL_TSYMNAME) + INSTALL_PC= $(INSTALL_PKGCONFIG)/$(INSTALL_PCNAME) + + INSTALL_DIRS= $(INSTALL_BIN) $(INSTALL_LIB) $(INSTALL_INC) $(INSTALL_MAN) \ diff --git a/package/luajit/luajit.mk b/package/luajit/luajit.mk new file mode 100644 index 0000000000..e4022a1dda --- /dev/null +++ b/package/luajit/luajit.mk @@ -0,0 +1,70 @@ +################################################################################ +# +# luajit +# +################################################################################ + +LUAJIT_VERSION = 2.0.2 +LUAJIT_SOURCE = LuaJIT-$(LUAJIT_VERSION).tar.gz +LUAJIT_SITE = http://luajit.org/download +LUAJIT_LICENSE = MIT +LUAJIT_LICENSE_FILES = COPYRIGHT + +LUAJIT_INSTALL_STAGING = YES + +ifneq ($(BR2_LARGEFILE),y) +LUAJIT_NO_LARGEFILE = TARGET_LFSFLAGS= +endif + +# The luajit build procedure requires the host compiler to have the +# same bitness as the target compiler. Therefore, on a x86 build +# machine, we can't build luajit for x86_64, which is checked in +# Config.in. When the target is a 32 bits target, we pass -m32 to +# ensure that even on 64 bits build machines, a compiler of the same +# bitness is used. Of course, this assumes that the 32 bits multilib +# libraries are installed. +ifeq ($(BR2_ARCH_IS_64),y) +LUAJIT_HOST_CC=$(HOSTCC) +else +LUAJIT_HOST_CC=$(HOSTCC) -m32 +endif + +# We unfortunately can't use TARGET_CONFIGURE_OPTS, because the luajit +# build system uses non conventional variable names. +define LUAJIT_BUILD_CMDS + $(MAKE) PREFIX="/usr" \ + STATIC_CC="$(TARGET_CC)" \ + DYNAMIC_CC="$(TARGET_CC) -fPIC" \ + TARGET_LD="$(TARGET_CC)" \ + TARGET_AR="$(TARGET_AR) rcus" \ + TARGET_STRIP="$(TARGET_STRIP)" \ + TARGET_CFLAGS="$(TARGET_CFLAGS)" \ + TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \ + HOST_CC="$(LUAJIT_HOST_CC)" \ + HOST_CFLAGS="$(HOST_CFLAGS)" \ + HOST_LDFLAGS="$(HOST_LDFLAGS)" \ + $(LUAJIT_NO_LARGEFILE) \ + -C $(@D) amalg +endef + +define LUAJIT_INSTALL_STAGING_CMDS + $(MAKE) PREFIX="/usr" DESTDIR="$(STAGING_DIR)" -C $(@D) install +endef + +define LUAJIT_INSTALL_TARGET_CMDS + $(MAKE) PREFIX="/usr" DESTDIR="$(TARGET_DIR)" -C $(@D) install +endef + +define LUAJIT_UNINSTALL_STAGING_CMDS + $(MAKE) PREFIX="/usr" DESTDIR="$(STAGING_DIR)" -C $(@D) uninstall +endef + +define LUAJIT_UNINSTALL_TARGET_CMDS + $(MAKE) PREFIX="/usr" DESTDIR="$(TARGET_DIR)" -C $(@D) uninstall +endef + +define LUAJIT_CLEAN_CMDS + -$(MAKE) -C $(@D) clean +endef + +$(eval $(generic-package)) diff --git a/package/luaposix/Config.in b/package/luaposix/Config.in new file mode 100644 index 0000000000..922fd9e833 --- /dev/null +++ b/package/luaposix/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LUAPOSIX + bool "luaposix" + select BR2_PACKAGE_LUABITOP if BR2_PACKAGE_LUA + # LuaBitOp is already included in LuaJIT + help + luaposix is a POSIX binding, including curses, for Lua 5.1 + and 5.2; Like most libraries it simply binds to C APIs on + the underlying system, so it won't work on a non-POSIX + system. However, it does try to detect the level of POSIX + conformance of the underlying system and bind only available + APIs + + https://github.com/luaposix/luaposix + diff --git a/package/luaposix/luaposix-without-IPv6.patch b/package/luaposix/luaposix-without-IPv6.patch new file mode 100644 index 0000000000..f187882f6b --- /dev/null +++ b/package/luaposix/luaposix-without-IPv6.patch @@ -0,0 +1,55 @@ +fix without IPv6 + +see https://github.com/luaposix/luaposix/pull/117 + +Signed-off-by: Francois Perrad + +Index: b/ext/posix/posix.c +=================================================================== +--- a/ext/posix/posix.c ++++ b/ext/posix/posix.c +@@ -3637,6 +3637,7 @@ + break; + } + break; ++#if defined(IPV6_JOIN_GROUP) && defined(IPV6_LEAVE_GROUP) + case IPPROTO_IPV6: + switch(optname) { + case IPV6_JOIN_GROUP: +@@ -3650,6 +3651,7 @@ + break; + } + break; ++#endif + case IPPROTO_TCP: + switch(optname) { + default: +@@ -4697,13 +4699,27 @@ + MENTRY( AI_V4MAPPED ); + MENTRY( AI_ALL ); + MENTRY( AI_ADDRCONFIG ); ++#endif + ++#ifdef IPV6_JOIN_GROUP + MENTRY( IPV6_JOIN_GROUP ); ++#endif ++#ifdef IPV6_LEAVE_GROUP + MENTRY( IPV6_LEAVE_GROUP ); ++#endif ++#ifdef IPV6_MULTICAST_HOPS + MENTRY( IPV6_MULTICAST_HOPS ); ++#endif ++#ifdef IPV6_MULTICAST_IF + MENTRY( IPV6_MULTICAST_IF ); ++#endif ++#ifdef IPV6_MULTICAST_LOOP + MENTRY( IPV6_MULTICAST_LOOP ); ++#endif ++#ifdef IPV6_UNICAST_HOPS + MENTRY( IPV6_UNICAST_HOPS ); ++#endif ++#ifdef IPV6_V6ONLY + MENTRY( IPV6_V6ONLY ); + #endif + #undef MENTRY + diff --git a/package/luaposix/luaposix.mk b/package/luaposix/luaposix.mk new file mode 100644 index 0000000000..cbcdf32590 --- /dev/null +++ b/package/luaposix/luaposix.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# luaposix +# +################################################################################ + +LUAPOSIX_VERSION = 31 +LUAPOSIX_SITE = https://github.com/luaposix/luaposix/archive +LUAPOSIX_SOURCE = release-v$(LUAPOSIX_VERSION).tar.gz +LUAPOSIX_LICENSE = MIT +LUAPOSIX_LICENSE_FILES = COPYING +LUAPOSIX_DEPENDENCIES = lua host-lua +LUAPOSIX_CONF_OPT = --libdir="/usr/lib/lua" --datarootdir="/usr/share/lua" + +ifeq ($(BR2_PACKAGE_NCURSES),y) + LUAPOSIX_DEPENDENCIES += ncurses +endif + +$(eval $(autotools-package)) diff --git a/package/luasec/Config.in b/package/luasec/Config.in new file mode 100644 index 0000000000..2d303c184b --- /dev/null +++ b/package/luasec/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LUASEC + bool "luasec" + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_LUASOCKET + help + LuaSec is a binding for OpenSSL library to provide TLS/SSL + communication. + + http://www.inf.puc-rio.br/~brunoos/luasec/ diff --git a/package/luasec/luasec.mk b/package/luasec/luasec.mk new file mode 100644 index 0000000000..053309f8b3 --- /dev/null +++ b/package/luasec/luasec.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# luasec +# +################################################################################ + +LUASEC_VERSION = 0.4.1 +LUASEC_SITE = http://www.inf.puc-rio.br/~brunoos/luasec/download/ +LUASEC_LICENSE = MIT +LUASEC_LICENSE_FILES = LICENSE +LUASEC_DEPENDENCIES = lua openssl + +define LUASEC_BUILD_CMDS + $(MAKE) -C $(@D) CC="$(TARGET_CC)" LD="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) -fPIC" \ + LDFLAGS="$(TARGET_LDFLAGS) -shared" linux +endef + +define LUASEC_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/usr/share/lua + mkdir -p $(TARGET_DIR)/usr/lib/lua + $(MAKE) -C $(@D) \ + LUAPATH="$(TARGET_DIR)/usr/share/lua" \ + LUACPATH="$(TARGET_DIR)/usr/lib/lua" install +endef + +define LUASEC_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/lib/lua/ssl.so + rm -rf $(TARGET_DIR)/usr/share/lua/ssl + rm -f $(TARGET_DIR)/usr/share/lua/ssl.lua +endef + +$(eval $(generic-package)) diff --git a/package/luasocket/Config.in b/package/luasocket/Config.in index 298db56b0b..45263030f3 100644 --- a/package/luasocket/Config.in +++ b/package/luasocket/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_LUASOCKET bool "luasocket" - depends on BR2_PACKAGE_LUA_SHARED_LIBRARY help LuaSocket is the most comprehensive networking support library for the Lua language. diff --git a/package/luasocket/luasocket.mk b/package/luasocket/luasocket.mk index e0faf034f1..b0c0be5e09 100644 --- a/package/luasocket/luasocket.mk +++ b/package/luasocket/luasocket.mk @@ -1,12 +1,14 @@ -############################################################# +################################################################################ # # luasocket # -############################################################# +################################################################################ LUASOCKET_VERSION = 2.0.2 LUASOCKET_SITE = http://luaforge.net/frs/download.php/2664 LUASOCKET_DEPENDENCIES = lua +LUASOCKET_LICENSE = MIT +LUASOCKET_LICENSE_FILES = LICENSE define LUASOCKET_BUILD_CMDS $(MAKE) -C $(@D) -f makefile \ @@ -33,4 +35,4 @@ define LUASOCKET_CLEAN_CMDS $(MAKE) -C $(@D) -f makefile clean endef -$(eval $(call GENTARGETS,package,luasocket)) +$(eval $(generic-package)) diff --git a/package/luasql/Config.in b/package/luasql/Config.in new file mode 100644 index 0000000000..4dd011a2aa --- /dev/null +++ b/package/luasql/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_LUASQL + bool "luasql" + help + LuaSQL is a simple interface from Lua to a DBMS. + + http://www.keplerproject.org/luasql + +if BR2_PACKAGE_LUASQL +choice + prompt "LuaSQL Driver" + help + Select backend driver for LuaSQL. + +config BR2_PACKAGE_LUASQL_DRIVER_SQLITE3 + bool "SQLite3" + select BR2_PACKAGE_SQLITE + help + Select if you wish to use the SQLite3 LuaSQL driver. + +endchoice +endif diff --git a/package/luasql/luasql.mk b/package/luasql/luasql.mk new file mode 100644 index 0000000000..6fbdccc9be --- /dev/null +++ b/package/luasql/luasql.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# luasql +# +################################################################################ + +LUASQL_VERSION = v2.3.0 +LUASQL_SITE = https://github.com/keplerproject/luasql/tarball/$(LUASQL_VERSION) +LUASQL_LICENSE = MIT +LUASQL_LICENSE_FILES = README +LUASQL_DEPENDENCIES = lua + +LUASQL_MAKE_FLAGS = \ + CC="$(TARGET_CC)" \ + LD="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) -fPIC" + +ifeq ($(BR2_PACKAGE_LUASQL_DRIVER_SQLITE3),y) +LUASQL_DEPENDENCIES += sqlite +LUASQL_MAKE_FLAGS += \ + T="sqlite3" \ + DRIVER_LIBS="-L$(STAGING_DIR)/usr/lib -lsqlite3" +endif + +define LUASQL_BUILD_CMDS + $(MAKE) -C $(@D) $(LUASQL_MAKE_FLAGS) +endef + +define LUASQL_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) $(LUASQL_MAKE_FLAGS) PREFIX=/usr \ + LUA_DIR="$(TARGET_DIR)/usr/share/lua" \ + LUA_LIBDIR="$(TARGET_DIR)/usr/lib/lua" install +endef + +define LUASQL_UNINSTALL_TARGET_CMDS + rm -rf $(TARGET_DIR)/usr/lib/lua/luasql +endef + +$(eval $(generic-package)) diff --git a/package/lvm2/Config.in b/package/lvm2/Config.in index 30af14e699..5d6209fc12 100644 --- a/package/lvm2/Config.in +++ b/package/lvm2/Config.in @@ -1,6 +1,7 @@ config BR2_PACKAGE_LVM2 bool "lvm2 & device mapper" depends on BR2_LARGEFILE + depends on BR2_USE_MMU # needs fork() help This is LVM2, the rewrite of The Linux Logical Volume Manager. LVM supports enterprise level volume management of disk and disk @@ -15,11 +16,23 @@ config BR2_PACKAGE_LVM2 user-space. This makes it useful for not only LVM, but EVMS, software raid, and other drivers that create "virtual" block devices. -config BR2_PACKAGE_LVM2_DMSETUP_ONLY - bool "install dmsetup only" - depends on BR2_PACKAGE_LVM2 +if BR2_PACKAGE_LVM2 + +config BR2_PACKAGE_LVM2_STANDARD_INSTALL + bool "standard install instead of only dmsetup" + default y if !BR2_PACKAGE_LVM2_DMSETUP_ONLY # legacy 2013.11 + help + Install the standard suite of lvm2 programs. When this option is not + set, only dmsetup is installed. + +config BR2_PACKAGE_LVM2_APP_LIBRARY + bool "install application library" + select BR2_PACKAGE_LVM2_STANDARD_INSTALL help - Install dmsetup only and skip the LVM2 suite. + Install application library (liblvm2app). + +endif -comment "lvm2 requires a toolchain with LARGEFILE support" - depends on !BR2_LARGEFILE +comment "lvm2 needs a toolchain w/ largefile" + depends on BR2_USE_MMU + depends on !BR2_LARGEFILE diff --git a/package/lvm2/lvm2.mk b/package/lvm2/lvm2.mk index 2e9f2d8514..4099c2101f 100644 --- a/package/lvm2/lvm2.mk +++ b/package/lvm2/lvm2.mk @@ -1,12 +1,15 @@ -############################################################# +################################################################################ # # lvm2 # -############################################################# -LVM2_VERSION = 2.02.79 +################################################################################ + +LVM2_VERSION = 2.02.103 LVM2_SOURCE = LVM2.$(LVM2_VERSION).tgz LVM2_SITE = ftp://sources.redhat.com/pub/lvm2/releases LVM2_INSTALL_STAGING = YES +LVM2_LICENSE = GPLv2 LGPLv2.1 +LVM2_LICENSE_FILES = COPYING COPYING.LIB LVM2_BINS = \ dmsetup fsadm lvm lvmconf lvmdump vgimportclone \ @@ -21,7 +24,7 @@ LVM2_BINS = \ # Make sure that binaries and libraries are installed with write # permissions for the owner. -LVM2_CONF_OPT += --enable-write_install +LVM2_CONF_OPT += --enable-write_install --enable-pkgconfig # LVM2 uses autoconf, but not automake, and the build system does not # take into account the CC passed at configure time. @@ -35,12 +38,18 @@ else LVM2_CONF_OPT += --disable-readline endif -ifeq ($(BR2_PACKAGE_LVM2_DMSETUP_ONLY),y) +ifeq ($(BR2_PACKAGE_LVM2_STANDARD_INSTALL),) LVM2_MAKE_OPT = device-mapper LVM2_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) install_device-mapper LVM2_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install_device-mapper endif +ifeq ($(BR2_PACKAGE_LVM2_APP_LIBRARY),y) +LVM2_CONF_OPT += --enable-applib +else +LVM2_CONF_OPT += --disable-applib +endif + define LVM2_UNINSTALL_STAGING_CMDS rm -f $(addprefix $(STAGING_DIR)/usr/sbin/,$(LVM2_BINS)) rm -f $(addprefix $(STAGING_DIR)/usr/lib/,libdevmapper.so*) @@ -51,4 +60,4 @@ define LVM2_UNINSTALL_TARGET_CMDS rm -f $(addprefix $(TARGET_DIR)/usr/lib/,libdevmapper.so*) endef -$(eval $(call AUTOTARGETS,package,lvm2)) +$(eval $(autotools-package)) diff --git a/package/lxc/Config.in b/package/lxc/Config.in new file mode 100644 index 0000000000..39cd577e67 --- /dev/null +++ b/package/lxc/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_LXC + bool "lxc" + select BR2_PACKAGE_LIBCAP + depends on BR2_INET_IPV6 + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_LARGEFILE + depends on BR2_USE_MMU # fork() + depends on !BR2_avr32 # no timerfd + help + Linux Containers (LXC), provides the ability to group and isolate + of a set of processes in a jail by virtualizing and accounting the + kernel resources. It is similar to Linux-Vserver or Openvz. + + http://lxc.sourceforge.net/ + +comment "lxc needs a toolchain w/ IPv6, threads, largefile" + depends on BR2_USE_MMU + depends on !BR2_avr32 # no timerfd + depends on !BR2_INET_IPV6 || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_LARGEFILE diff --git a/package/lxc/lxc.mk b/package/lxc/lxc.mk new file mode 100644 index 0000000000..4e069029d5 --- /dev/null +++ b/package/lxc/lxc.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# lxc +# +################################################################################ + +LXC_VERSION = 0.9.0 +LXC_SITE = http://downloads.sourceforge.net/project/lxc/lxc/lxc-$(LXC_VERSION) +LXC_LICENSE = LGPLv2.1+ +LXC_LICENSE_FILES = COPYING +LXC_DEPENDENCIES = libcap +LXC_CONF_OPT = --disable-apparmor + +$(eval $(autotools-package)) diff --git a/package/lzma/Config.in b/package/lzma/Config.in index 2b94dde6b3..5a55103c58 100644 --- a/package/lzma/Config.in +++ b/package/lzma/Config.in @@ -8,5 +8,6 @@ config BR2_PACKAGE_LZMA http://tukaani.org/lzma/ -comment "lzma requires a toolchain with C++ support" - depends on !BR2_INSTALL_LIBSTDCPP && BR2_DEPRECATED +comment "lzma needs a toolchain w/ C++" + depends on BR2_DEPRECATED + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/lzma/lzma.mk b/package/lzma/lzma.mk index 9bdcc35295..90498334df 100644 --- a/package/lzma/lzma.mk +++ b/package/lzma/lzma.mk @@ -1,16 +1,16 @@ -############################################################# +################################################################################ # # lzma # -############################################################# -LZMA_VERSION:=4.32.7 -LZMA_SOURCE:=lzma-$(LZMA_VERSION).tar.gz -LZMA_SITE:=http://tukaani.org/lzma/ +################################################################################ + +LZMA_VERSION = 4.32.7 +LZMA_SOURCE = lzma-$(LZMA_VERSION).tar.xz +LZMA_SITE = http://tukaani.org/lzma/ LZMA_INSTALL_STAGING = YES -LZMA_INSTALL_TARGET = YES LZMA_CONF_OPT = $(if $(BR2_ENABLE_DEBUG),--enable-debug,--disable-debug) -$(eval $(call AUTOTARGETS,package,lzma)) -$(eval $(call AUTOTARGETS,package,lzma,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) -LZMA=$(HOST_DIR)/usr/bin/lzma +LZMA = $(HOST_DIR)/usr/bin/lzma diff --git a/package/lzma/lzmacheck.sh b/package/lzma/lzmacheck.sh deleted file mode 100755 index bcb0423d1b..0000000000 --- a/package/lzma/lzmacheck.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -bin=$(toolchain/dependencies/check-host-lzma.sh) -if [ "x$bin" = "x" ] ; then - echo build-lzma-host-binary -else - echo use-lzma-host-binary -fi - diff --git a/package/lzo/lzo-2.03-acinclude-m4.patch b/package/lzo/lzo-2.03-acinclude-m4.patch deleted file mode 100644 index 8f860f4cc0..0000000000 --- a/package/lzo/lzo-2.03-acinclude-m4.patch +++ /dev/null @@ -1,377 +0,0 @@ -The lzo tarball only contains an aclocal.m4, which is the result from -running aclocal. Unfortunately, it lacks the acinclude.m4 file which -would allow us to do an autoreconf of the package. Therefore, this -patch extracts from aclocal.m4 the parts that are specific to this lzo -package, and put them into an acinclude.m4 so that autoreconf on this -package will work. - -Signed-off-by: Thomas Petazzoni ---- - acinclude.m4 | 360 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 360 insertions(+) - -Index: lzo-2.03/acinclude.m4 -=================================================================== ---- /dev/null -+++ lzo-2.03/acinclude.m4 -@@ -0,0 +1,360 @@ -+# /*********************************************************************** -+# // standard ACC macros -+# ************************************************************************/ -+ -+AC_DEFUN([mfx_ACC_CHECK_ENDIAN], [ -+AC_C_BIGENDIAN([AC_DEFINE(ACC_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(ACC_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])]) -+])# -+ -+AC_DEFUN([mfx_ACC_CHECK_HEADERS], [ -+AC_HEADER_TIME -+AC_CHECK_HEADERS([assert.h ctype.h dirent.h errno.h fcntl.h float.h limits.h malloc.h memory.h setjmp.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h strings.h time.h unistd.h utime.h sys/mman.h sys/resource.h sys/stat.h sys/time.h sys/types.h sys/wait.h]) -+])# -+ -+AC_DEFUN([mfx_ACC_CHECK_FUNCS], [ -+AC_CHECK_FUNCS(access alloca atexit atoi atol chmod chown clock_getcpuclockid clock_getres clock_gettime ctime difftime fstat getenv getpagesize getrusage gettimeofday gmtime isatty localtime longjmp lstat memcmp memcpy memmove memset mkdir mktime mmap mprotect munmap qsort raise rmdir setjmp signal snprintf strcasecmp strchr strdup strerror strftime stricmp strncasecmp strnicmp strrchr strstr time umask utime vsnprintf) -+])# -+ -+ -+AC_DEFUN([mfx_ACC_CHECK_SIZEOF], [ -+AC_CHECK_SIZEOF(short) -+AC_CHECK_SIZEOF(int) -+AC_CHECK_SIZEOF(long) -+ -+AC_CHECK_SIZEOF(long long) -+AC_CHECK_SIZEOF(__int16) -+AC_CHECK_SIZEOF(__int32) -+AC_CHECK_SIZEOF(__int64) -+ -+AC_CHECK_SIZEOF(void *) -+AC_CHECK_SIZEOF(size_t) -+AC_CHECK_SIZEOF(ptrdiff_t) -+])# -+ -+ -+# /*********************************************************************** -+# // Check for ACC_conformance -+# ************************************************************************/ -+ -+AC_DEFUN([mfx_ACC_ACCCHK], [ -+mfx_tmp=$1 -+mfx_save_CPPFLAGS=$CPPFLAGS -+dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here -+test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS" -+ -+AC_MSG_CHECKING([whether your compiler passes the ACC conformance test]) -+ -+AC_LANG_CONFTEST([AC_LANG_PROGRAM( -+[[#define ACC_CONFIG_NO_HEADER 1 -+#include "acc/acc.h" -+#include "acc/acc_incd.h" -+#undef ACCCHK_ASSERT -+#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr) -+#include "acc/acc_chk.ch" -+#undef ACCCHK_ASSERT -+static void test_acc_compile_time_assert(void) { -+#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr) -+#include "acc/acc_chk.ch" -+#undef ACCCHK_ASSERT -+} -+#undef NDEBUG -+#include -+static int test_acc_run_time_assert(int r) { -+#define ACCCHK_ASSERT(expr) assert(expr); -+#include "acc/acc_chk.ch" -+#undef ACCCHK_ASSERT -+return r; -+} -+]], [[ -+test_acc_compile_time_assert(); -+if (test_acc_run_time_assert(1) != 1) return 1; -+]] -+)]) -+ -+mfx_tmp=FAILED -+_AC_COMPILE_IFELSE([], [mfx_tmp=yes]) -+rm -f conftest.$ac_ext conftest.$ac_objext -+ -+CPPFLAGS=$mfx_save_CPPFLAGS -+ -+AC_MSG_RESULT([$mfx_tmp]) -+case x$mfx_tmp in -+ xpassed | xyes) ;; -+ *) -+ AC_MSG_NOTICE([]) -+ AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ]) -+ AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending]) -+ AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.]) -+ AC_MSG_NOTICE([Thanks for your support.]) -+ AC_MSG_NOTICE([]) -+ AC_MSG_ERROR([ACC conformance test failed. Stop.]) -+dnl AS_EXIT -+ ;; -+esac -+])# mfx_ACC_ACCCHK -+ -+ -+# /*********************************************************************** -+# // Check for ACC_conformance -+# ************************************************************************/ -+ -+AC_DEFUN([mfx_MINIACC_ACCCHK], [ -+mfx_tmp=$1 -+mfx_save_CPPFLAGS=$CPPFLAGS -+dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here -+test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS" -+ -+AC_MSG_CHECKING([whether your compiler passes the ACC conformance test]) -+ -+AC_LANG_CONFTEST([AC_LANG_PROGRAM( -+[[#define ACC_CONFIG_NO_HEADER 1 -+#define ACC_WANT_ACC_INCD_H 1 -+#include $2 -+ -+#define ACC_WANT_ACC_CHK_CH 1 -+#undef ACCCHK_ASSERT -+#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr) -+#include $2 -+ -+#define ACC_WANT_ACC_CHK_CH 1 -+#undef ACCCHK_ASSERT -+#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr) -+static void test_acc_compile_time_assert(void) { -+#include $2 -+} -+ -+#undef NDEBUG -+#include -+#define ACC_WANT_ACC_CHK_CH 1 -+#undef ACCCHK_ASSERT -+#define ACCCHK_ASSERT(expr) assert(expr); -+static int test_acc_run_time_assert(int r) { -+#include $2 -+return r; -+} -+]], [[ -+test_acc_compile_time_assert(); -+if (test_acc_run_time_assert(1) != 1) return 1; -+]] -+)]) -+ -+mfx_tmp=FAILED -+_AC_COMPILE_IFELSE([], [mfx_tmp=yes]) -+rm -f conftest.$ac_ext conftest.$ac_objext -+ -+CPPFLAGS=$mfx_save_CPPFLAGS -+ -+AC_MSG_RESULT([$mfx_tmp]) -+case x$mfx_tmp in -+ xpassed | xyes) ;; -+ *) -+ AC_MSG_NOTICE([]) -+ AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ]) -+ AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending]) -+ AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.]) -+ AC_MSG_NOTICE([Thanks for your support.]) -+ AC_MSG_NOTICE([]) -+ AC_MSG_ERROR([ACC conformance test failed. Stop.]) -+dnl AS_EXIT -+ ;; -+esac -+])# mfx_MINIACC_ACCCHK -+ -+ -+ -+# serial 1 -+ -+AC_DEFUN([mfx_PROG_CPPFLAGS], [ -+AC_MSG_CHECKING([whether the C preprocessor needs special flags]) -+ -+AC_LANG_CONFTEST([AC_LANG_PROGRAM( -+[[#include -+#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul) -+# include "your C preprocessor is broken 1" -+#elif (0xffffu == 0xfffffffful) -+# include "your C preprocessor is broken 2" -+#elif (32767 >= ULONG_MAX) || (65535u >= ULONG_MAX) -+# include "your C preprocessor is broken 3" -+#endif -+]], [[ ]] -+)]) -+ -+mfx_save_CPPFLAGS=$CPPFLAGS -+mfx_tmp=ERROR -+for mfx_arg in "" -no-cpp-precomp -+do -+ CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS" -+ _AC_COMPILE_IFELSE([], -+[mfx_tmp=$mfx_arg -+break]) -+done -+CPPFLAGS=$mfx_save_CPPFLAGS -+rm -f conftest.$ac_ext conftest.$ac_objext -+case x$mfx_tmp in -+ x) -+ AC_MSG_RESULT([none needed]) ;; -+ xERROR) -+ AC_MSG_RESULT([ERROR]) -+ AC_MSG_ERROR([your C preprocessor is broken - for details see config.log]) -+ ;; -+ *) -+ AC_MSG_RESULT([$mfx_tmp]) -+ CPPFLAGS="$mfx_tmp $CPPFLAGS" -+ ;; -+esac -+])# mfx_PROG_CPPFLAGS -+ -+# serial 3 -+ -+AC_DEFUN([mfx_CHECK_HEADER_SANE_LIMITS_H], [ -+AC_CACHE_CHECK([whether limits.h is sane], -+mfx_cv_header_sane_limits_h, -+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include -+#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul) -+# if defined(__APPLE__) && defined(__GNUC__) -+# error "your preprocessor is broken - use compiler option -no-cpp-precomp" -+# else -+# include "your preprocessor is broken" -+# endif -+#endif -+#define MFX_0xffff 0xffff -+#define MFX_0xffffffffL 4294967295ul -+#if !defined(CHAR_BIT) || (CHAR_BIT != 8) -+# include "error CHAR_BIT" -+#endif -+#if !defined(UCHAR_MAX) -+# include "error UCHAR_MAX 1" -+#endif -+#if !defined(USHRT_MAX) -+# include "error USHRT_MAX 1" -+#endif -+#if !defined(UINT_MAX) -+# include "error UINT_MAX 1" -+#endif -+#if !defined(ULONG_MAX) -+# include "error ULONG_MAX 1" -+#endif -+#if !defined(SHRT_MAX) -+# include "error SHRT_MAX 1" -+#endif -+#if !defined(INT_MAX) -+# include "error INT_MAX 1" -+#endif -+#if !defined(LONG_MAX) -+# include "error LONG_MAX 1" -+#endif -+#if (UCHAR_MAX < 1) -+# include "error UCHAR_MAX 2" -+#endif -+#if (USHRT_MAX < 1) -+# include "error USHRT_MAX 2" -+#endif -+#if (UINT_MAX < 1) -+# include "error UINT_MAX 2" -+#endif -+#if (ULONG_MAX < 1) -+# include "error ULONG_MAX 2" -+#endif -+#if (UCHAR_MAX < 0xff) -+# include "error UCHAR_MAX 3" -+#endif -+#if (USHRT_MAX < MFX_0xffff) -+# include "error USHRT_MAX 3" -+#endif -+#if (UINT_MAX < MFX_0xffff) -+# include "error UINT_MAX 3" -+#endif -+#if (ULONG_MAX < MFX_0xffffffffL) -+# include "error ULONG_MAX 3" -+#endif -+#if (USHRT_MAX > UINT_MAX) -+# include "error USHRT_MAX vs UINT_MAX" -+#endif -+#if (UINT_MAX > ULONG_MAX) -+# include "error UINT_MAX vs ULONG_MAX" -+#endif -+]], [[ -+#if (USHRT_MAX == MFX_0xffff) -+{ typedef char a_short2a[1 - 2 * !(sizeof(short) == 2)]; } -+#elif (USHRT_MAX >= MFX_0xffff) -+{ typedef char a_short2b[1 - 2 * !(sizeof(short) > 2)]; } -+#endif -+#if (UINT_MAX == MFX_0xffff) -+{ typedef char a_int2a[1 - 2 * !(sizeof(int) == 2)]; } -+#elif (UINT_MAX >= MFX_0xffff) -+{ typedef char a_int2b[1 - 2 * !(sizeof(int) > 2)]; } -+#endif -+#if (ULONG_MAX == MFX_0xffff) -+{ typedef char a_long2a[1 - 2 * !(sizeof(long) == 2)]; } -+#elif (ULONG_MAX >= MFX_0xffff) -+{ typedef char a_long2b[1 - 2 * !(sizeof(long) > 2)]; } -+#endif -+#if !defined(_CRAY1) /* CRAY PVP systems */ -+#if (USHRT_MAX == MFX_0xffffffffL) -+{ typedef char a_short4a[1 - 2 * !(sizeof(short) == 4)]; } -+#elif (USHRT_MAX >= MFX_0xffffffffL) -+{ typedef char a_short4b[1 - 2 * !(sizeof(short) > 4)]; } -+#endif -+#endif /* _CRAY1 */ -+#if (UINT_MAX == MFX_0xffffffffL) -+{ typedef char a_int4a[1 - 2 * !(sizeof(int) == 4)]; } -+#elif (UINT_MAX >= MFX_0xffffffffL) -+{ typedef char a_int4b[1 - 2 * !(sizeof(int) > 4)]; } -+#endif -+#if (ULONG_MAX == MFX_0xffffffffL) -+{ typedef char a_long4a[1 - 2 * !(sizeof(long) == 4)]; } -+#elif (ULONG_MAX >= MFX_0xffffffffL) -+{ typedef char a_long4b[1 - 2 * !(sizeof(long) > 4)]; } -+#endif -+]])], -+[mfx_cv_header_sane_limits_h=yes], -+[mfx_cv_header_sane_limits_h=no])]) -+]) -+ -+# /*********************************************************************** -+# // standard -+# ************************************************************************/ -+ -+AC_DEFUN([mfx_LZO_CHECK_ENDIAN], [ -+AC_C_BIGENDIAN([AC_DEFINE(LZO_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(LZO_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])]) -+])# -+ -+ -+# /*********************************************************************** -+# // -+# ************************************************************************/ -+ -+dnl more types which are not yet covered by ACC -+ -+AC_DEFUN([mfx_CHECK_SIZEOF], [ -+AC_CHECK_SIZEOF(__int32) -+AC_CHECK_SIZEOF(intmax_t) -+AC_CHECK_SIZEOF(uintmax_t) -+AC_CHECK_SIZEOF(intptr_t) -+AC_CHECK_SIZEOF(uintptr_t) -+ -+AC_CHECK_SIZEOF(float) -+AC_CHECK_SIZEOF(double) -+AC_CHECK_SIZEOF(long double) -+ -+AC_CHECK_SIZEOF(dev_t) -+AC_CHECK_SIZEOF(fpos_t) -+AC_CHECK_SIZEOF(mode_t) -+AC_CHECK_SIZEOF(off_t) -+AC_CHECK_SIZEOF(ssize_t) -+AC_CHECK_SIZEOF(time_t) -+])# -+ -+ -+ -+AC_DEFUN([mfx_CHECK_LIB_WINMM], [ -+if test "X$GCC" = Xyes; then -+case $host_os in -+cygwin* | mingw* | pw32*) -+ test "X$LIBS" != "X" && LIBS="$LIBS " -+ LIBS="${LIBS}-lwinmm" ;; -+*) -+ ;; -+esac -+fi -+])# diff --git a/package/lzo/lzo-2.03-fix-configure-ac.patch b/package/lzo/lzo-2.03-fix-configure-ac.patch deleted file mode 100644 index 26aece7b43..0000000000 --- a/package/lzo/lzo-2.03-fix-configure-ac.patch +++ /dev/null @@ -1,21 +0,0 @@ -_AC_SRCPATHS doesn't exist in autoconf, _AC_SRCDIRS should be used -instead according to many reports found by Google. - -Signed-off-by: Thomas Petazzoni ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: lzo-2.03/configure.ac -=================================================================== ---- lzo-2.03.orig/configure.ac -+++ lzo-2.03/configure.ac -@@ -48,7 +48,7 @@ - AM_MAINTAINER_MODE - - if test -z "$ac_abs_top_srcdir"; then -- _AC_SRCPATHS(.) -+ _AC_SRCDIRS(.) - fi - if test -r .Conf.settings1; then - . ./.Conf.settings1 diff --git a/package/lzo/lzo-2.03-fix-makefile-am.patch b/package/lzo/lzo-2.03-fix-makefile-am.patch deleted file mode 100644 index 9f23e40db1..0000000000 --- a/package/lzo/lzo-2.03-fix-makefile-am.patch +++ /dev/null @@ -1,24 +0,0 @@ -Makefile.am is not allowed to override CFLAGS/CPPFLAGS, it must use -AM_CFLAGS and AM_CPPFLAGS. This is needed in order for autoreconf to -work on this package. - -Signed-off-by: Thomas Petazzoni ---- - src/Makefile.am | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: lzo-2.03/src/Makefile.am -=================================================================== ---- lzo-2.03.orig/src/Makefile.am -+++ lzo-2.03/src/Makefile.am -@@ -7,8 +7,8 @@ - SUFFIXES = .S - - INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir) --CPPFLAGS = $(LZO_CPPFLAGS) $(configure_CPPFLAGS) $(LZO_EXTRA_CPPFLAGS) --CFLAGS = $(LZO_CFLAGS) $(configure_CFLAGS) $(LZO_EXTRA_CFLAGS) -+AM_CPPFLAGS = $(LZO_CPPFLAGS) $(configure_CPPFLAGS) $(LZO_EXTRA_CPPFLAGS) -+AM_CFLAGS = $(LZO_CFLAGS) $(configure_CFLAGS) $(LZO_EXTRA_CFLAGS) - - lib_LTLIBRARIES = liblzo2.la - diff --git a/package/lzo/lzo.mk b/package/lzo/lzo.mk index 5cbd458fb3..10107fea3b 100644 --- a/package/lzo/lzo.mk +++ b/package/lzo/lzo.mk @@ -1,23 +1,14 @@ -############################################################# +################################################################################ # # lzo # -############################################################# -LZO_VERSION:=2.03 -LZO_SOURCE:=lzo-$(LZO_VERSION).tar.gz -LZO_SITE:=http://www.oberhumer.com/opensource/lzo/download -LZO_CONF_OPT = --enable-shared -HOST_LZO_CONF_OPT = --enable-shared -LZO_AUTORECONF = NO - -# lzo's configure was generated by an old autoconf, and the -# AC_CANONICAL_TARGET check fails in host-lzo when the cache has been -# filled with ac_cv_build and ac_cv_host. -HOST_LZO_AUTORECONF = YES +################################################################################ +LZO_VERSION = 2.06 +LZO_SITE = http://www.oberhumer.com/opensource/lzo/download +LZO_LICENSE = GPLv2+ +LZO_LICENSE_FILES = COPYING LZO_INSTALL_STAGING = YES -LZO_INSTALL_TARGET = YES -LZO_INSTALL_STAGING_OPT = CC="$(TARGET_CC)" DESTDIR=$(STAGING_DIR) install -$(eval $(call AUTOTARGETS,package,lzo)) -$(eval $(call AUTOTARGETS,package,lzo,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/lzop/lzop.mk b/package/lzop/lzop.mk index 796686a502..9709f7bb83 100644 --- a/package/lzop/lzop.mk +++ b/package/lzop/lzop.mk @@ -1,12 +1,16 @@ -############################################################# +################################################################################ # # lzop # -############################################################# -LZOP_VERSION:=1.02rc1 -LZOP_SOURCE:=lzop-$(LZOP_VERSION).tar.gz -LZOP_SITE:=http://www.lzop.org/download/ -LZOP_CONF_OPT:=--program-prefix="" -LZOP_DEPENDENCIES:=lzo +################################################################################ -$(eval $(call AUTOTARGETS,package,lzop)) +LZOP_VERSION = 1.03 +LZOP_SITE = http://www.lzop.org/download/ +LZOP_LICENSE = GPLv2+ +LZOP_LICENSE_FILES = COPYING +LZOP_DEPENDENCIES = lzo + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) + +LZOP = $(HOST_DIR)/usr/bin/lzop diff --git a/package/m4/Config.in b/package/m4/Config.in index 56b2859fc6..4d651a2802 100644 --- a/package/m4/Config.in +++ b/package/m4/Config.in @@ -1,10 +1,13 @@ config BR2_PACKAGE_M4 bool "m4" depends on BR2_USE_WCHAR + # uses fork() + depends on BR2_USE_MMU help An implementation of the traditional Unix macro processor. http://www.gnu.org/software/m4/m4.html -comment "m4 requires a toolchain with WCHAR support" +comment "m4 needs a toolchain w/ wchar" + depends on BR2_USE_MMU depends on !BR2_USE_WCHAR diff --git a/package/m4/m4-1.4.15-fgets.patch b/package/m4/m4-1.4.15-fgets.patch deleted file mode 100644 index 918d3047ad..0000000000 --- a/package/m4/m4-1.4.15-fgets.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/lib/stdio.in.h -+++ b/lib/stdio.in.h -@@ -141,7 +141,9 @@ - so any use of gets warrants an unconditional warning. Assume it is - always declared, since it is required by C89. */ - #undef gets -+#if HAVE_RAW_DECL_GETS - _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -+#endif - - #if @GNULIB_FOPEN@ - # if @REPLACE_FOPEN@ \ No newline at end of file diff --git a/package/m4/m4-1.4.15-uclibc-sched_param-def.patch b/package/m4/m4-1.4.15-uclibc-sched_param-def.patch deleted file mode 100644 index 47bdd3d84a..0000000000 --- a/package/m4/m4-1.4.15-uclibc-sched_param-def.patch +++ /dev/null @@ -1,19 +0,0 @@ -uclibc defines __GLIBC__ but it does not expose struct shed_param as much as glibc -and is not needed too per standard. gnulib attempts to use it but we have to account -for it because in this case uclibc does not behave like glibc. - --Khem - -Index: m4-1.4.14/lib/spawn.in.h -=================================================================== ---- m4-1.4.14.orig/lib/spawn.in.h 2010-06-01 14:27:59.394242980 -0700 -+++ m4-1.4.14/lib/spawn.in.h 2010-06-01 14:28:28.202332200 -0700 -@@ -31,7 +31,7 @@ - - /* Get definitions of 'struct sched_param' and 'sigset_t'. - But avoid namespace pollution on glibc systems. */ --#ifndef __GLIBC__ -+#if !defined __GLIBC__ || defined __UCLIBC__ - # include - # include - #endif diff --git a/package/m4/m4-1.4.8-001-MB_CUR_MAX.patch b/package/m4/m4-1.4.8-001-MB_CUR_MAX.patch deleted file mode 100644 index fce36731b3..0000000000 --- a/package/m4/m4-1.4.8-001-MB_CUR_MAX.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- m4-1.4.8.orig/lib/regcomp.c 2006-09-24 06:28:37.000000000 +0200 -+++ m4-1.4.8/lib/regcomp.c 2007-01-06 20:53:10.000000000 +0100 -@@ -871,6 +871,10 @@ init_dfa (re_dfa_t *dfa, size_t pat_len) - dfa->state_table = calloc (sizeof (struct re_state_table_entry), table_size); - dfa->state_hash_mask = table_size - 1; - -+#ifndef MB_CUR_MAX -+#define MB_CUR_MAX (0) -+#endif -+ - dfa->mb_cur_max = MB_CUR_MAX; - #ifdef _LIBC - if (dfa->mb_cur_max == 6 diff --git a/package/m4/m4.mk b/package/m4/m4.mk index d713b6dbf5..26007287b4 100644 --- a/package/m4/m4.mk +++ b/package/m4/m4.mk @@ -1,12 +1,14 @@ -############################################################# +################################################################################ # # m4 # -############################################################# -M4_VERSION = 1.4.15 -M4_SOURCE = m4-$(M4_VERSION).tar.bz2 -M4_SITE = $(BR2_GNU_MIRROR)/m4 +################################################################################ +M4_VERSION = 1.4.17 +M4_SOURCE = m4-$(M4_VERSION).tar.xz +M4_SITE = $(BR2_GNU_MIRROR)/m4 +M4_LICENSE = GPLv3+ +M4_LICENSE_FILES = COPYING M4_CONF_ENV = gl_cv_func_gettimeofday_clobber=no ifneq ($(BR2_USE_WCHAR),y) @@ -15,5 +17,5 @@ endif HOST_M4_CONF_OPT = --disable-static -$(eval $(call AUTOTARGETS,package,m4)) -$(eval $(call AUTOTARGETS,package,m4,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/macchanger/Config.in b/package/macchanger/Config.in new file mode 100644 index 0000000000..e26faa7ffd --- /dev/null +++ b/package/macchanger/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_MACCHANGER + bool "macchanger" + help + A GNU/Linux utility for viewing/manipulating the MAC address of + network interfaces + + http://www.alobbs.com/macchanger diff --git a/package/macchanger/macchanger.mk b/package/macchanger/macchanger.mk new file mode 100644 index 0000000000..865618369a --- /dev/null +++ b/package/macchanger/macchanger.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# macchanger +# +################################################################################ + +MACCHANGER_VERSION = 1.5.0 +MACCHANGER_SITE = $(BR2_GNU_MIRROR)/macchanger +MACCHANGER_LICENSE = GPLv2 +MACCHANGER_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/multimedia/madplay/Config.in b/package/madplay/Config.in similarity index 100% rename from package/multimedia/madplay/Config.in rename to package/madplay/Config.in diff --git a/package/multimedia/madplay/madplay-0.15.2b-switch-to-new-alsa-api.patch b/package/madplay/madplay-0.15.2b-switch-to-new-alsa-api.patch similarity index 100% rename from package/multimedia/madplay/madplay-0.15.2b-switch-to-new-alsa-api.patch rename to package/madplay/madplay-0.15.2b-switch-to-new-alsa-api.patch diff --git a/package/madplay/madplay.mk b/package/madplay/madplay.mk new file mode 100644 index 0000000000..35aa65166a --- /dev/null +++ b/package/madplay/madplay.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# madplay +# +################################################################################ + +MADPLAY_VERSION = 0.15.2b +MADPLAY_SITE = http://downloads.sourceforge.net/project/mad/madplay/$(MADPLAY_VERSION) +MADPLAY_LICENSE = GPLv2+ +MADPLAY_LICENSE_FILES = COPYING COPYRIGHT +MADPLAY_LIBTOOL_PATCH = NO +MADPLAY_DEPENDENCIES = libmad libid3tag + +# Check if ALSA is built, then we should configure after alsa-lib so +# ./configure can find alsa-lib. +ifeq ($(BR2_PACKAGE_MADPLAY_ALSA),y) +MADPLAY_CONF_OPT += --with-alsa +MADPLAY_DEPENDENCIES += alsa-lib +endif + +$(eval $(autotools-package)) diff --git a/package/make/Config.in b/package/make/Config.in index 364bb1e18a..aea72e31f4 100644 --- a/package/make/Config.in +++ b/package/make/Config.in @@ -1,9 +1,12 @@ config BR2_PACKAGE_MAKE bool "make" select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE - select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE help A tool which controls the generation of executables and other non-source files of a program from the program's source files. + While Buildroot no longer supports building a toolchain for + the target, we keep a make package that is for example + useful to run the uClibc test suite on the target. + http://www.gnu.org/software/make/ diff --git a/package/make/make.mk b/package/make/make.mk index 12d236ada0..74726e21e9 100644 --- a/package/make/make.mk +++ b/package/make/make.mk @@ -1,16 +1,19 @@ -############################################################# +################################################################################ # # make # -############################################################# -MAKE_VERSION:=3.81 -MAKE_SOURCE:=make-$(MAKE_VERSION).tar.bz2 -MAKE_SITE:=$(BR2_GNU_MIRROR)/make +################################################################################ -MAKE_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl) +MAKE_VERSION = 3.82 +MAKE_SOURCE = make-$(MAKE_VERSION).tar.bz2 +MAKE_SITE = $(BR2_GNU_MIRROR)/make +MAKE_LICENSE = GPLv3+ +MAKE_LICENSE_FILES = COPYING + +MAKE_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) MAKE_CONF_ENV = make_cv_sys_gnu_glob=no \ GLOBINC='-I$(@D)/glob' \ GLOBLIB=glob/libglob.a -$(eval $(call AUTOTARGETS,package,make)) +$(eval $(autotools-package)) diff --git a/package/makedevs/Config.in b/package/makedevs/Config.in index 4f8c38d0ae..923150dd6d 100644 --- a/package/makedevs/Config.in +++ b/package/makedevs/Config.in @@ -1,5 +1,5 @@ config BR2_PACKAGE_MAKEDEVS - bool "makedevs" - help - The makedevs utility allows to create a set of device files - according to a configuration file. \ No newline at end of file + bool "makedevs" + help + The makedevs utility allows to create a set of device files + according to a configuration file. diff --git a/package/makedevs/README b/package/makedevs/README new file mode 100644 index 0000000000..6c54052ee2 --- /dev/null +++ b/package/makedevs/README @@ -0,0 +1,35 @@ +When building a target filesystem, it is desirable to not have to +become root and then run 'mknod' a thousand times. Using a device +table you can create device nodes and directories "on the fly". + +You can do all sorts of interesting things with a device table file. +For example, if you want to adjust the permissions on a particular +file you can just add an entry like: + + /sbin/foobar f 2755 0 0 - - - - - + +and (assuming the file /sbin/foobar exists) it will be made setuid +root (regardless of what its permissions are on the host filesystem. + +Furthermore, you can use a single table entry to create a many device +minors. For example, if I wanted to create /dev/hda and +/dev/hda[0-15] I could just use the following two table entries: + + /dev/hda b 640 0 0 3 0 0 0 - + /dev/hda b 640 0 0 3 1 1 1 15 + +Device table entries take the form of: + + + +where name is the file name, type can be one of: + + f A regular file + d Directory + c Character special device file + b Block special device file + p Fifo (named pipe) + +uid is the user id for the target file, gid is the group id for the +target file. The rest of the entries (major, minor, etc) apply only +to device special files. diff --git a/package/makedevs/makedevs.c b/package/makedevs/makedevs.c index 79cfc609be..ab90b93b19 100644 --- a/package/makedevs/makedevs.c +++ b/package/makedevs/makedevs.c @@ -328,7 +328,7 @@ void bb_show_usage(void) fprintf(stderr, "%s: [-d device_table] rootdir\n\n", bb_applet_name); fprintf(stderr, "Creates a batch of special files as specified in a device table.\n"); fprintf(stderr, "Device table entries take the form of:\n"); - fprintf(stderr, "type mode user group major minor start increment count\n\n"); + fprintf(stderr, "name type mode user group major minor start increment count\n\n"); fprintf(stderr, "Where name is the file name, type can be one of:\n"); fprintf(stderr, " f A regular file\n"); fprintf(stderr, " d Directory\n"); @@ -410,7 +410,7 @@ int main(int argc, char **argv) unsigned int count = 0; unsigned int increment = 0; unsigned int start = 0; - char name[41]; + char name[4096]; char user[41]; char group[41]; char *full_name; @@ -419,7 +419,7 @@ int main(int argc, char **argv) linenum++; - if ((2 > sscanf(line, "%40s %c %o %40s %40s %u %u %u %u %u", name, + if ((2 > sscanf(line, "%4095s %c %o %40s %40s %u %u %u %u %u", name, &type, &mode, user, group, &major, &minor, &start, &increment, &count)) || ((major | minor | start | count | increment) > 0xfffff)) @@ -536,8 +536,5 @@ int main(int argc, char **argv) } fclose(table); - if (system("/bin/sync")) - bb_error_msg("sync failed, continuing anyway"); - - return 0; + return ret; } diff --git a/package/makedevs/makedevs.mk b/package/makedevs/makedevs.mk index ba628946d0..a426e7d51e 100644 --- a/package/makedevs/makedevs.mk +++ b/package/makedevs/makedevs.mk @@ -1,37 +1,35 @@ -############################################################# +################################################################################ # # makedevs # -############################################################# +################################################################################ -MAKEDEVS_DIR=$(BUILD_DIR)/makedevs +# source included in buildroot +MAKEDEVS_SOURCE = +HOST_MAKEDEVS_SOURCE = -$(MAKEDEVS_DIR)/makedevs.c: - rm -rf $(MAKEDEVS_DIR) - mkdir $(MAKEDEVS_DIR) - cp package/makedevs/makedevs.c $(MAKEDEVS_DIR) +define MAKEDEVS_BUILD_CMDS + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \ + package/makedevs/makedevs.c -o $(@D)/makedevs +endef -$(MAKEDEVS_DIR)/makedevs: $(MAKEDEVS_DIR)/makedevs.c - $(CC) -Wall -Werror -O2 $(MAKEDEVS_DIR)/makedevs.c -o $@ +define MAKEDEVS_INSTALL_TARGET_CMDS + install -D -m 755 $(@D)/makedevs $(TARGET_DIR)/usr/sbin/makedevs +endef -$(TARGET_DIR)/usr/bin/makedevs: $(MAKEDEVS_DIR)/makedevs - $(INSTALL) -m 755 $^ $@ +define MAKEDEVS_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/sbin/makedevs +endef -makedevs: $(TARGET_DIR)/usr/bin/makedevs -makedevs-source: -HOST_MAKEDEVS_DIR=$(BUILD_DIR)/host-makedevs +define HOST_MAKEDEVS_BUILD_CMDS + $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) \ + package/makedevs/makedevs.c -o $(@D)/makedevs +endef -$(HOST_MAKEDEVS_DIR)/makedevs.c: - rm -rf $(HOST_MAKEDEVS_DIR) - mkdir $(HOST_MAKEDEVS_DIR) - cp package/makedevs/makedevs.c $(HOST_MAKEDEVS_DIR) +define HOST_MAKEDEVS_INSTALL_CMDS + install -D -m 755 $(@D)/makedevs $(HOST_DIR)/usr/bin/makedevs +endef -$(HOST_MAKEDEVS_DIR)/makedevs: $(HOST_MAKEDEVS_DIR)/makedevs.c - $(CC) -Wall -Werror -Wno-unused-but-set-variable -O2 $(HOST_MAKEDEVS_DIR)/makedevs.c -o $@ - -$(HOST_DIR)/usr/bin/makedevs: $(HOST_MAKEDEVS_DIR)/makedevs - $(INSTALL) -m 755 $^ $@ - -host-makedevs: $(HOST_DIR)/usr/bin/makedevs -host-makedevs-source: +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/matchbox/Config.in b/package/matchbox/Config.in index e4b6149d70..d89a1762ea 100644 --- a/package/matchbox/Config.in +++ b/package/matchbox/Config.in @@ -19,6 +19,7 @@ config BR2_PACKAGE_MATCHBOX_PANEL config BR2_PACKAGE_MATCHBOX_DESKTOP bool "Matchbox Desktop" depends on BR2_PACKAGE_MATCHBOX + select BR2_PACKAGE_ZLIB help A PDA style application launcher or 'item browser'. diff --git a/package/matchbox/matchbox-common/matchbox-common.mk b/package/matchbox/matchbox-common/matchbox-common.mk index d35d11bca5..730635fc79 100644 --- a/package/matchbox/matchbox-common/matchbox-common.mk +++ b/package/matchbox/matchbox-common/matchbox-common.mk @@ -1,18 +1,21 @@ -############################################################# +################################################################################ # -# MatchBox Common +# matchbox-common # -############################################################# +################################################################################ -MATCHBOX_COMMON_VERSION = 0.9.1 +MATCHBOX_COMMON_VERSION_MAJOR = 0.9 +MATCHBOX_COMMON_VERSION = $(MATCHBOX_COMMON_VERSION_MAJOR).1 MATCHBOX_COMMON_SOURCE = matchbox-common-$(MATCHBOX_COMMON_VERSION).tar.bz2 -MATCHBOX_COMMON_SITE = http://matchbox-project.org/sources/matchbox-common/$(MATCHBOX_COMMON_VERSION) +MATCHBOX_COMMON_SITE = http://downloads.yoctoproject.org/releases/matchbox/matchbox-common/$(MATCHBOX_COMMON_VERSION_MAJOR) +MATCHBOX_COMMON_LICENSE = GPLv2+ +MATCHBOX_COMMON_LICENSE_FILES = COPYING MATCHBOX_COMMON_DEPENDENCIES = matchbox-lib ifeq ($(strip $(BR2_PACKAGE_MATCHBOX_COMMON_PDA)),y) MATCHBOX_COMMON_CONF_OPT += --enable-pda-folders endif -############################################################# +################################################################################ -$(eval $(call AUTOTARGETS,package/matchbox,matchbox-common)) +$(eval $(autotools-package)) diff --git a/package/matchbox/matchbox-desktop/matchbox-desktop.mk b/package/matchbox/matchbox-desktop/matchbox-desktop.mk index d5f61c1f13..9989e148af 100644 --- a/package/matchbox/matchbox-desktop/matchbox-desktop.mk +++ b/package/matchbox/matchbox-desktop/matchbox-desktop.mk @@ -1,24 +1,32 @@ -############################################################# +################################################################################ # -# MatchBox Desktop +# matchbox-desktop # -############################################################# +################################################################################ -MATCHBOX_DESKTOP_VERSION = 0.9.1 +MATCHBOX_DESKTOP_VERSION_MAJOR = 0.9 +MATCHBOX_DESKTOP_VERSION = $(MATCHBOX_DESKTOP_VERSION_MAJOR).1 MATCHBOX_DESKTOP_SOURCE = matchbox-desktop-$(MATCHBOX_DESKTOP_VERSION).tar.bz2 -MATCHBOX_DESKTOP_SITE = http://matchbox-project.org/sources/matchbox-desktop/$(MATCHBOX_DESKTOP_VERSION) -MATCHBOX_DESKTOP_DEPENDENCIES = matchbox-lib +MATCHBOX_DESKTOP_SITE = http://downloads.yoctoproject.org/releases/matchbox/matchbox-desktop/$(MATCHBOX_DESKTOP_VERSION_MAJOR) +MATCHBOX_DESKTOP_LICENSE = GPLv2+ +MATCHBOX_DESKTOP_LICENSE_FILES = COPYING +MATCHBOX_DESKTOP_DEPENDENCIES = matchbox-lib zlib MATCHBOX_DESKTOP_CONF_OPT = --enable-expat -############################################################# +# The bundled configure script does not properly replace LIBADD_DL, so +# we force an autoreconf even if we don't have any patches touching +# configure.ac/Makefile.am. +MATCHBOX_DESKTOP_AUTORECONF = YES + +################################################################################ ifeq ($(BR2_PACKAGE_STARTUP_NOTIFICATION),y) - MATCHBOX_DESKTOP_CONF_OPT+=--enable-startup-notification - MATCHBOX_DESKTOP_DEPENDENCIES+=startup-notification + MATCHBOX_DESKTOP_CONF_OPT += --enable-startup-notification + MATCHBOX_DESKTOP_DEPENDENCIES += startup-notification else - MATCHBOX_DESKTOP_CONF_OPT+=--disable-startup-notification + MATCHBOX_DESKTOP_CONF_OPT += --disable-startup-notification endif -############################################################# +################################################################################ -$(eval $(call AUTOTARGETS,package/matchbox,matchbox-desktop)) +$(eval $(autotools-package)) diff --git a/package/matchbox/matchbox-fakekey/matchbox-fakekey.mk b/package/matchbox/matchbox-fakekey/matchbox-fakekey.mk index dc448b8ce0..47de4a0703 100644 --- a/package/matchbox/matchbox-fakekey/matchbox-fakekey.mk +++ b/package/matchbox/matchbox-fakekey/matchbox-fakekey.mk @@ -1,12 +1,14 @@ -############################################################# +################################################################################ # -# MatchBox Fakekey +# matchbox-fakekey # -############################################################# +################################################################################ MATCHBOX_FAKEKEY_VERSION = 0.1 MATCHBOX_FAKEKEY_SOURCE = libfakekey-$(MATCHBOX_FAKEKEY_VERSION).tar.bz2 -MATCHBOX_FAKEKEY_SITE = http://matchbox-project.org/sources/libfakekey/$(MATCHBOX_FAKEKEY_VERSION) +MATCHBOX_FAKEKEY_SITE = http://downloads.yoctoproject.org/releases/matchbox/libfakekey/$(MATCHBOX_FAKEKEY_VERSION) +MATCHBOX_FAKEKEY_LICENSE = GPLv2+ +MATCHBOX_FAKEKEY_LICENSE_FILES = COPYING MATCHBOX_FAKEKEY_INSTALL_STAGING = YES MATCHBOX_FAKEKEY_DEPENDENCIES = matchbox-lib xlib_libXtst MATCHBOX_FAKEKEY_CONF_OPT = --enable-expat @@ -18,6 +20,6 @@ endef MATCHBOX_FAKEKEY_POST_CONFIGURE_HOOKS += MATCHBOX_FAKEKEY_POST_CONFIGURE_FIXES -############################################################# +################################################################################ -$(eval $(call AUTOTARGETS,package/matchbox,matchbox-fakekey)) +$(eval $(autotools-package)) diff --git a/package/matchbox/matchbox-keyboard/matchbox-keyboard.mk b/package/matchbox/matchbox-keyboard/matchbox-keyboard.mk index 3d7178d142..ff853701b7 100644 --- a/package/matchbox/matchbox-keyboard/matchbox-keyboard.mk +++ b/package/matchbox/matchbox-keyboard/matchbox-keyboard.mk @@ -1,12 +1,14 @@ -############################################################# +################################################################################ # -# MatchBox Keyboard +# matchbox-keyboard # -############################################################# +################################################################################ MATCHBOX_KEYBOARD_VERSION = 0.1 MATCHBOX_KEYBOARD_SOURCE = matchbox-keyboard-$(MATCHBOX_KEYBOARD_VERSION).tar.bz2 -MATCHBOX_KEYBOARD_SITE = http://matchbox-project.org/sources/matchbox-keyboard/$(MATCHBOX_KEYBOARD_VERSION) +MATCHBOX_KEYBOARD_SITE = http://downloads.yoctoproject.org/releases/matchbox/matchbox-keyboard/$(MATCHBOX_KEYBOARD_VERSION) +MATCHBOX_KEYBOARD_LICENSE = GPLv2+ +MATCHBOX_KEYBOARD_LICENSE_FILES = COPYING MATCHBOX_KEYBOARD_DEPENDENCIES = matchbox-lib matchbox-fakekey # Workaround bug in configure script @@ -18,14 +20,14 @@ endef MATCHBOX_KEYBOARD_POST_INSTALL_TARGET_HOOKS += MATCHBOX_KEYBOARD_POST_INSTALL_FIXES -############################################################# +################################################################################ ifeq ($(BR2_PACKAGE_PANGO),y) - MATCHBOX_PKEYBOARD_CONF_OPT+=--enable-pango + MATCHBOX_PKEYBOARD_CONF_OPT += --enable-pango else - MATCHBOX_KEYBOARD_DEPENDENCIES+=xlib_libXft + MATCHBOX_KEYBOARD_DEPENDENCIES += xlib_libXft endif -############################################################# +################################################################################ -$(eval $(call AUTOTARGETS,package/matchbox,matchbox-keyboard)) +$(eval $(autotools-package)) diff --git a/package/matchbox/matchbox-lib/matchbox-lib-1.9-libpng15.patch b/package/matchbox/matchbox-lib/matchbox-lib-1.9-libpng15.patch new file mode 100644 index 0000000000..3d68573b5f --- /dev/null +++ b/package/matchbox/matchbox-lib/matchbox-lib-1.9-libpng15.patch @@ -0,0 +1,26 @@ +Support for libpng 1.5+ shamelessly taken from Gentoo. + +Signed-off-by: Gustavo Zacarias + +--- a/libmb/mbpixbuf.c ++++ b/libmb/mbpixbuf.c +@@ -247,7 +247,7 @@ + return NULL; + } + +- if ( setjmp( png_ptr->jmpbuf ) ) { ++ if ( setjmp( png_jmpbuf(png_ptr) ) ) { + png_destroy_read_struct( &png_ptr, &info_ptr, NULL); + fclose(fd); + return NULL; +@@ -269,8 +269,8 @@ + ( color_type == PNG_COLOR_TYPE_GRAY_ALPHA )) + png_set_gray_to_rgb(png_ptr); + +- if ( info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA +- || info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA ++ if ( color_type == PNG_COLOR_TYPE_RGB_ALPHA ++ || color_type == PNG_COLOR_TYPE_GRAY_ALPHA + ) + *has_alpha = 1; + else diff --git a/package/matchbox/matchbox-lib/matchbox-lib.mk b/package/matchbox/matchbox-lib/matchbox-lib.mk index 817a8da8f0..a04b971079 100644 --- a/package/matchbox/matchbox-lib/matchbox-lib.mk +++ b/package/matchbox/matchbox-lib/matchbox-lib.mk @@ -1,15 +1,18 @@ -############################################################# +################################################################################ # -# MatchBox LIB +# matchbox-lib # -############################################################# +################################################################################ MATCHBOX_LIB_VERSION = 1.9 MATCHBOX_LIB_SOURCE = libmatchbox-$(MATCHBOX_LIB_VERSION).tar.bz2 -MATCHBOX_LIB_SITE = http://matchbox-project.org/sources/libmatchbox/$(MATCHBOX_LIB_VERSION) +MATCHBOX_LIB_SITE = http://downloads.yoctoproject.org/releases/matchbox/libmatchbox/$(MATCHBOX_LIB_VERSION) +MATCHBOX_LIB_LICENSE = LGPLv2.1+ +MATCHBOX_LIB_LICENSE_FILES = COPYING MATCHBOX_LIB_INSTALL_STAGING = YES -MATCHBOX_LIB_DEPENDENCIES = host-pkg-config expat xlib_libXext +MATCHBOX_LIB_DEPENDENCIES = host-pkgconf expat xlib_libXext MATCHBOX_LIB_CONF_OPT = --enable-expat --disable-doxygen-docs +MATCHBOX_LIB_CONF_ENV = LIBS="-lX11" define MATCHBOX_LIB_POST_INSTALL_FIXES $(SED) 's:-I[^$$].*/usr/include/freetype2:-I/usr/include/freetype2:' $(STAGING_DIR)/usr/lib/pkgconfig/libmb.pc @@ -17,42 +20,42 @@ endef MATCHBOX_LIB_POST_INSTALL_STAGING_HOOKS += MATCHBOX_LIB_POST_INSTALL_FIXES -############################################################# +################################################################################ ifeq ($(BR2_PACKAGE_X11R7_LIBXCOMPOSITE),y) ifeq ($(BR2_PACKAGE_X11R7_LIBXPM),y) - MATCHBOX_LIB_DEPENDENCIES+=xlib_libXpm + MATCHBOX_LIB_DEPENDENCIES += xlib_libXpm endif endif ifeq ($(BR2_PACKAGE_JPEG),y) - MATCHBOX_LIB_CONF_OPT+=--enable-jpeg - MATCHBOX_LIB_DEPENDENCIES+=jpeg + MATCHBOX_LIB_CONF_OPT += --enable-jpeg + MATCHBOX_LIB_DEPENDENCIES += jpeg else - MATCHBOX_LIB_CONF_OPT+=--disable-jpeg + MATCHBOX_LIB_CONF_OPT += --disable-jpeg endif ifeq ($(BR2_PACKAGE_LIBPNG),y) - MATCHBOX_LIB_CONF_OPT+=--enable-png - MATCHBOX_LIB_DEPENDENCIES+=libpng + MATCHBOX_LIB_CONF_OPT += --enable-png + MATCHBOX_LIB_DEPENDENCIES += libpng else - MATCHBOX_LIB_CONF_OPT+=--disable-png + MATCHBOX_LIB_CONF_OPT += --disable-png endif -ifeq ($(BR2_PACKAGE_PANGO),y) - MATCHBOX_LIB_CONF_OPT+=--enable-pango - MATCHBOX_LIB_DEPENDENCIES+=pango +ifeq ($(BR2_PACKAGE_PANGO)$(BR2_PACKAGE_XLIB_LIBXFT)$(BR2_PACKAGE_XLIB_LIBXRENDER),yyy) + MATCHBOX_LIB_CONF_OPT += --enable-pango + MATCHBOX_LIB_DEPENDENCIES += pango else - MATCHBOX_LIB_CONF_OPT+=--disable-pango + MATCHBOX_LIB_CONF_OPT += --disable-pango endif ifeq ($(BR2_PACKAGE_XLIB_LIBXFT),y) - MATCHBOX_LIB_CONF_OPT+=--enable-xft - MATCHBOX_LIB_DEPENDENCIES+=xlib_libXft + MATCHBOX_LIB_CONF_OPT += --enable-xft + MATCHBOX_LIB_DEPENDENCIES += xlib_libXft else - MATCHBOX_LIB_CONF_OPT+=--disable-xft + MATCHBOX_LIB_CONF_OPT += --disable-xft endif -############################################################# +################################################################################ -$(eval $(call AUTOTARGETS,package/matchbox,matchbox-lib)) +$(eval $(autotools-package)) diff --git a/package/matchbox/matchbox-panel/matchbox-panel.mk b/package/matchbox/matchbox-panel/matchbox-panel.mk index 573e3231d9..7579d49150 100644 --- a/package/matchbox/matchbox-panel/matchbox-panel.mk +++ b/package/matchbox/matchbox-panel/matchbox-panel.mk @@ -1,24 +1,27 @@ -############################################################# +################################################################################ # -# MatchBox Panel +# matchbox-panel # -############################################################# +################################################################################ -MATCHBOX_PANEL_VERSION = 0.9.3 +MATCHBOX_PANEL_VERSION_MAJOR = 0.9 +MATCHBOX_PANEL_VERSION = $(MATCHBOX_PANEL_VERSION_MAJOR).3 MATCHBOX_PANEL_SOURCE = matchbox-panel-$(MATCHBOX_PANEL_VERSION).tar.bz2 -MATCHBOX_PANEL_SITE = http://matchbox-project.org/sources/matchbox-panel/$(MATCHBOX_PANEL_VERSION) +MATCHBOX_PANEL_SITE = http://downloads.yoctoproject.org/releases/matchbox/matchbox-panel/$(MATCHBOX_PANEL_VERSION_MAJOR) +MATCHBOX_PANEL_LICENSE = GPLv2+ +MATCHBOX_PANEL_LICENSE_FILES = COPYING MATCHBOX_PANEL_DEPENDENCIES = matchbox-lib MATCHBOX_PANEL_CONF_OPT = --enable-expat -############################################################# +################################################################################ ifeq ($(BR2_PACKAGE_STARTUP_NOTIFICATION),y) - MATCHBOX_PANEL_CONF_OPT+=--enable-startup-notification - MATCHBOX_PANEL_DEPENDENCIES+=startup-notification matchbox-startup-monitor + MATCHBOX_PANEL_CONF_OPT += --enable-startup-notification + MATCHBOX_PANEL_DEPENDENCIES += startup-notification matchbox-startup-monitor else - MATCHBOX_PANEL_CONF_OPT+=--disable-startup-notification + MATCHBOX_PANEL_CONF_OPT += --disable-startup-notification endif -############################################################# +################################################################################ -$(eval $(call AUTOTARGETS,package/matchbox,matchbox-panel)) +$(eval $(autotools-package)) diff --git a/package/matchbox/matchbox-startup-monitor/matchbox-startup-monitor.mk b/package/matchbox/matchbox-startup-monitor/matchbox-startup-monitor.mk index 954709a823..316893e35d 100644 --- a/package/matchbox/matchbox-startup-monitor/matchbox-startup-monitor.mk +++ b/package/matchbox/matchbox-startup-monitor/matchbox-startup-monitor.mk @@ -1,15 +1,17 @@ -############################################################# +################################################################################ # -# MatchBox Applet Startup monitor +# matchbox-startup-monitor # -############################################################# +################################################################################ MATCHBOX_STARTUP_MONITOR_VERSION = 0.1 MATCHBOX_STARTUP_MONITOR_SOURCE = mb-applet-startup-monitor-$(MATCHBOX_STARTUP_MONITOR_VERSION).tar.bz2 -MATCHBOX_STARTUP_MONITOR_SITE = http://matchbox-project.org/sources/mb-applet-startup-monitor/$(MATCHBOX_STARTUP_MONITOR_VERSION) +MATCHBOX_STARTUP_MONITOR_SITE = http://downloads.yoctoproject.org/releases/matchbox/mb-applet-startup-monitor/$(MATCHBOX_STARTUP_MONITOR_VERSION) +MATCHBOX_STARTUP_MONITOR_LICENSE = GPLv2+ +MATCHBOX_STARTUP_MONITOR_LICENSE_FILES = COPYING MATCHBOX_STARTUP_MONITOR_DEPENDENCIES = matchbox-lib startup-notification MATCHBOX_STARTUP_MONITOR_CONF_OPT = -############################################################# +################################################################################ -$(eval $(call AUTOTARGETS,package/matchbox,matchbox-startup-monitor)) +$(eval $(autotools-package)) diff --git a/package/matchbox/matchbox-wm/matchbox-wm-defaulttheme.patch b/package/matchbox/matchbox-wm/matchbox-wm-defaulttheme.patch new file mode 100644 index 0000000000..b4da66409c --- /dev/null +++ b/package/matchbox/matchbox-wm/matchbox-wm-defaulttheme.patch @@ -0,0 +1,47 @@ +[PATCH] fix mbtheme build issue when png support is disabled + +DEFAULTTHEME{,NAME} is not defined when png support is disabled, leading +to compile errors in mbtheme.c: + +mbtheme.c: In function 'show_parse_error': +mbtheme.c:2422:28: error: 'DEFAULTTHEME' undeclared (first use in this function) +mbtheme.c:2422:28: note: each undeclared identifier is reported only once for each function it appears in +mbtheme.c: In function 'mbtheme_init': +mbtheme.c:2448:30: error: 'DEFAULTTHEME' undeclared (first use in this function) +mbtheme.c:2470:25: error: 'DEFAULTTHEMENAME' undeclared (first use in this function) + +Fix it by unconditionally defining them as the values used are the same +in png / !png cases anyway. + +Signed-off-by: Peter Korsgaard +--- + src/structs.h | 9 --------- + 1 file changed, 9 deletions(-) + +Index: matchbox-window-manager-1.2/src/structs.h +=================================================================== +--- matchbox-window-manager-1.2.orig/src/structs.h ++++ matchbox-window-manager-1.2/src/structs.h +@@ -81,8 +81,6 @@ + + #define GENERIC_ICON PKGDATADIR "/mbnoapp.xpm" + +-#ifdef MB_HAVE_PNG +- + #define DEFAULT_THEME DATADIR "/themes/Default/matchbox/theme.xml" + + #define DEFAULTTHEME DATADIR "/themes/Default/matchbox/theme.xml" +@@ -91,13 +89,6 @@ + + #define DEFAULTTHEMENAME "Default" + +-#else +- +-#define DEFAULT_THEME DATADIR "/themes/Default/matchbox/theme.xml" +-#define DEFAULT_THEME_NAME "Default" +- +-#endif +- + #define CONFDEFAULTS PKGDATADIR "/defaults" + + /* Simple Macros */ diff --git a/package/matchbox/matchbox-wm/matchbox-wm.mk b/package/matchbox/matchbox-wm/matchbox-wm.mk index 0334d0f0c1..696e9ccead 100644 --- a/package/matchbox/matchbox-wm/matchbox-wm.mk +++ b/package/matchbox/matchbox-wm/matchbox-wm.mk @@ -1,42 +1,45 @@ -############################################################# +################################################################################ # -# MatchBox WM +# matchbox-wm # -############################################################# +################################################################################ MATCHBOX_WM_VERSION = 1.2 MATCHBOX_WM_SOURCE = matchbox-window-manager-$(MATCHBOX_WM_VERSION).tar.bz2 -MATCHBOX_WM_SITE = http://matchbox-project.org/sources/matchbox-window-manager/$(MATCHBOX_WM_VERSION) +MATCHBOX_WM_SITE = http://downloads.yoctoproject.org/releases/matchbox/matchbox-window-manager/$(MATCHBOX_WM_VERSION) +MATCHBOX_WM_LICENSE = GPLv2+ +MATCHBOX_WM_LICENSE_FILES = COPYING + MATCHBOX_WM_DEPENDENCIES = matchbox-lib MATCHBOX_WM_CONF_OPT = --enable-expat # Workaround bug in configure script MATCHBOX_WM_CONF_ENV = expat=yes -############################################################# +################################################################################ ifeq ($(BR2_PACKAGE_X11R7_LIBXCOMPOSITE),y) ifeq ($(BR2_PACKAGE_X11R7_LIBXPM),y) - MATCHBOX_WM_CONF_OPT+=--enable-composite - MATCHBOX_WM_DEPENDENCIES+=xlib_libXcomposite - MATCHBOX_WM_DEPENDENCIES+=xlib_libXpm + MATCHBOX_WM_CONF_OPT += --enable-composite + MATCHBOX_WM_DEPENDENCIES += xlib_libXcomposite + MATCHBOX_WM_DEPENDENCIES += xlib_libXpm endif endif ifeq ($(BR2_PACKAGE_XLIB_LIBXFT),y) - #MATCHBOX_WM_OPTS+=--enable-standalone-xft - MATCHBOX_WM_DEPENDENCIES+=xlib_libXft + #MATCHBOX_WM_OPTS += --enable-standalone-xft + MATCHBOX_WM_DEPENDENCIES += xlib_libXft else - #MATCHBOX_WM_OPTS+=--disable-standalone-xft + #MATCHBOX_WM_OPTS += --disable-standalone-xft endif ifeq ($(BR2_PACKAGE_STARTUP_NOTIFICATION),y) - MATCHBOX_WM_CONF_OPT+=--enable-startup-notification - MATCHBOX_WM_DEPENDENCIES+=startup-notification + MATCHBOX_WM_CONF_OPT += --enable-startup-notification + MATCHBOX_WM_DEPENDENCIES += startup-notification else - MATCHBOX_WM_CONF_OPT+=--disable-startup-notification + MATCHBOX_WM_CONF_OPT += --disable-startup-notification endif -############################################################# +################################################################################ -$(eval $(call AUTOTARGETS,package/matchbox,matchbox-wm)) +$(eval $(autotools-package)) diff --git a/package/matchbox/matchbox.mk b/package/matchbox/matchbox.mk index abda91559c..fff4add34b 100644 --- a/package/matchbox/matchbox.mk +++ b/package/matchbox/matchbox.mk @@ -1,4 +1,4 @@ ifeq ($(BR2_PACKAGE_MATCHBOX),y) -include package/matchbox/*/*.mk +include $(sort $(wildcard package/matchbox/*/*.mk)) TARGETS+=matchbox-lib matchbox-wm endif diff --git a/package/mcrypt/Config.in b/package/mcrypt/Config.in new file mode 100644 index 0000000000..58567cd751 --- /dev/null +++ b/package/mcrypt/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_MCRYPT + bool "mcrypt" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBMCRYPT + select BR2_PACKAGE_LIBMHASH + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + MCrypt is a replacement for the old crypt() package and crypt(1) + command, with extensions. + It allows developers to use a wide range of encryption functions, + without making drastic changes to their code. + + http://mcrypt.sourceforge.net/ diff --git a/package/mcrypt/mcrypt-CVE-2012-4409.patch b/package/mcrypt/mcrypt-CVE-2012-4409.patch new file mode 100644 index 0000000000..97c658bb2d --- /dev/null +++ b/package/mcrypt/mcrypt-CVE-2012-4409.patch @@ -0,0 +1,25 @@ +From 3efb40e17ce4f76717ae17a1ce1e1f747ddf59fd Mon Sep 17 00:00:00 2001 +From: Alon Bar-Lev +Date: Sat, 22 Dec 2012 22:37:06 +0200 +Subject: [PATCH] cleanup: buffer overflow + +--- + src/extra.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/src/extra.c b/src/extra.c +index 3082f82..c7a1ac0 100644 +--- a/src/extra.c ++++ b/src/extra.c +@@ -241,6 +241,8 @@ int check_file_head(FILE * fstream, char *algorithm, char *mode, + if (m_getbit(6, flags) == 1) { /* if the salt bit is set */ + if (m_getbit(0, sflag) != 0) { /* if the first bit is set */ + *salt_size = m_setbit(0, sflag, 0); ++ if (*salt_size > sizeof(tmp_buf)) ++ err_quit(_("Salt is too long\n")); + if (*salt_size > 0) { + fread(tmp_buf, 1, *salt_size, + fstream); +-- +1.7.8.6 + diff --git a/package/mcrypt/mcrypt-CVE-2012-4426.patch b/package/mcrypt/mcrypt-CVE-2012-4426.patch new file mode 100644 index 0000000000..708d4a579e --- /dev/null +++ b/package/mcrypt/mcrypt-CVE-2012-4426.patch @@ -0,0 +1,35 @@ +Patch taken from gentoo. + +Signed-off-by: Gustavo Zacarias + +--- a/src/errors.c ++++ b/src/errors.c +@@ -25,24 +25,24 @@ + + void err_quit(char *errmsg) + { +- fprintf(stderr, errmsg); ++ fprintf(stderr, "%s", errmsg); + exit(-1); + } + + void err_warn(char *errmsg) + { + if (quiet <= 1) +- fprintf(stderr, errmsg); ++ fprintf(stderr, "%s", errmsg); + } + + void err_info(char *errmsg) + { + if (quiet == 0) +- fprintf(stderr, errmsg); ++ fprintf(stderr, "%s", errmsg); + } + + void err_crit(char *errmsg) + { + if (quiet <= 2) +- fprintf(stderr, errmsg); ++ fprintf(stderr, "%s", errmsg); + } diff --git a/package/mcrypt/mcrypt-CVE-2012-4527.patch b/package/mcrypt/mcrypt-CVE-2012-4527.patch new file mode 100644 index 0000000000..a8cf6f449a --- /dev/null +++ b/package/mcrypt/mcrypt-CVE-2012-4527.patch @@ -0,0 +1,99 @@ +Fix for CVE-2012-4527. +Authored by Attila Bogar and Jean-Michel Vourgère + +Signed-off-by: Gustavo Zacarias + +diff -Nura mcrypt-2.6.8.orig/src/mcrypt.c mcrypt-2.6.8/src/mcrypt.c +--- mcrypt-2.6.8.orig/src/mcrypt.c 2013-01-14 19:15:49.465925072 -0300 ++++ mcrypt-2.6.8/src/mcrypt.c 2013-01-14 19:28:13.711478000 -0300 +@@ -44,7 +44,9 @@ + static char rcsid[] = + "$Id: mcrypt.c,v 1.2 2007/11/07 17:10:21 nmav Exp $"; + +-char tmperr[128]; ++/* Temporary error message can contain one file name and 1k of text */ ++#define ERRWIDTH ((PATH_MAX)+1024) ++char tmperr[ERRWIDTH]; + unsigned int stream_flag = FALSE; + char *keymode = NULL; + char *mode = NULL; +@@ -482,7 +484,7 @@ + #ifdef HAVE_STAT + if (stream_flag == FALSE) { + if (is_normal_file(file[i]) == FALSE) { +- sprintf(tmperr, ++ snprintf(tmperr, ERRWIDTH, + _ + ("%s: %s is not a regular file. Skipping...\n"), + program_name, file[i]); +@@ -501,7 +503,7 @@ + dinfile = file[i]; + if ((isatty(fileno((FILE *) (stdin))) == 1) + && (stream_flag == TRUE) && (force == 0)) { /* not a tty */ +- sprintf(tmperr, ++ snprintf(tmperr, ERRWIDTH, + _ + ("%s: Encrypted data will not be read from a terminal.\n"), + program_name); +@@ -520,7 +522,7 @@ + einfile = file[i]; + if ((isatty(fileno((FILE *) (stdout))) == 1) + && (stream_flag == TRUE) && (force == 0)) { /* not a tty */ +- sprintf(tmperr, ++ snprintf(tmperr, ERRWIDTH, + _ + ("%s: Encrypted data will not be written to a terminal.\n"), + program_name); +@@ -544,7 +546,7 @@ + strcpy(outfile, einfile); + /* if file has already the .nc ignore it */ + if (strstr(outfile, ".nc") != NULL) { +- sprintf(tmperr, ++ snprintf(tmperr, ERRWIDTH, + _ + ("%s: file %s has the .nc suffix... skipping...\n"), + program_name, outfile); +@@ -590,10 +592,10 @@ + + if (x == 0) { + if (stream_flag == FALSE) { +- sprintf(tmperr, _("File %s was decrypted.\n"), dinfile); ++ snprintf(tmperr, ERRWIDTH, _("File %s was decrypted.\n"), dinfile); + err_warn(tmperr); + } else { +- sprintf(tmperr, _("Stdin was decrypted.\n")); ++ snprintf(tmperr, ERRWIDTH, _("Stdin was decrypted.\n")); + err_warn(tmperr); + } + #ifdef HAVE_STAT +@@ -610,7 +612,7 @@ + + } else { + if (stream_flag == FALSE) { +- sprintf(tmperr, ++ snprintf(tmperr, ERRWIDTH, + _ + ("File %s was NOT decrypted successfully.\n"), + dinfile); +@@ -636,10 +638,10 @@ + + if (x == 0) { + if (stream_flag == FALSE) { +- sprintf(tmperr, _("File %s was encrypted.\n"), einfile); ++ snprintf(tmperr, ERRWIDTH, _("File %s was encrypted.\n"), einfile); + err_warn(tmperr); + } else { +- sprintf(tmperr, _("Stdin was encrypted.\n")); ++ snprintf(tmperr, ERRWIDTH, _("Stdin was encrypted.\n")); + err_warn(tmperr); + } + #ifdef HAVE_STAT +@@ -655,7 +657,7 @@ + + } else { + if (stream_flag == FALSE) { +- sprintf(tmperr, ++ snprintf(tmperr, ERRWIDTH, + _ + ("File %s was NOT encrypted successfully.\n"), + einfile); diff --git a/package/mcrypt/mcrypt-no-rpath.patch b/package/mcrypt/mcrypt-no-rpath.patch new file mode 100644 index 0000000000..a0813bcf00 --- /dev/null +++ b/package/mcrypt/mcrypt-no-rpath.patch @@ -0,0 +1,17 @@ +Patch out rpath hardcoding since it completely ignores --disable-rpath +and other configure ways. + +Signed-off-by: Gustavo Zacarias + +diff -Nura mcrypt-2.6.8.orig/config.rpath mcrypt-2.6.8/config.rpath +--- mcrypt-2.6.8.orig/config.rpath 2013-01-07 13:05:22.626883480 -0300 ++++ mcrypt-2.6.8/config.rpath 2013-01-07 13:12:47.196090608 -0300 +@@ -153,7 +153,7 @@ + # here allows them to be overridden if necessary. + # Unlike libtool, we use -rpath here, not --rpath, since the documented + # option of GNU ld is called -rpath, not --rpath. +- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' ++ hardcode_libdir_flag_spec= + case "$host_os" in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken diff --git a/package/mcrypt/mcrypt.mk b/package/mcrypt/mcrypt.mk new file mode 100644 index 0000000000..f9bbdaa0ee --- /dev/null +++ b/package/mcrypt/mcrypt.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# mcrypt +# +################################################################################ + +MCRYPT_VERSION = 2.6.8 +MCRYPT_SITE = http://downloads.sourceforge.net/project/mcrypt/MCrypt/$(MCRYPT_VERSION) +MCRYPT_DEPENDENCIES = libmcrypt libmhash \ + $(if $(BR2_PACKAGE_ZLIB),zlib) \ + $(if $(BR2_PACKAGE_LIBICONV),libiconv) \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) +MCRYPT_CONF_OPT = --with-libmcrypt-prefix=$(STAGING_DIR)/usr +MCRYPT_LICENSE = GPLv3 +MCRYPT_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/mdadm/Config.in b/package/mdadm/Config.in index 64264531de..e0d606b5ec 100644 --- a/package/mdadm/Config.in +++ b/package/mdadm/Config.in @@ -1,6 +1,7 @@ config BR2_PACKAGE_MDADM bool "mdadm" + depends on BR2_USE_MMU # fork() help - Utility for managing RAID hardware. + Utility for managing Linux Software RAID arrays. - http://cgi.cse.unsw.edu.au/~neilb/mdadm + http://neil.brown.name/blog/mdadm diff --git a/package/mdadm/mdadm-010-add-install-targets-for-mdadm-and-mdmon.patch b/package/mdadm/mdadm-010-add-install-targets-for-mdadm-and-mdmon.patch new file mode 100644 index 0000000000..15df7557e7 --- /dev/null +++ b/package/mdadm/mdadm-010-add-install-targets-for-mdadm-and-mdmon.patch @@ -0,0 +1,32 @@ +From a1a9243671b1e23123f57e879890325154b8e00d Mon Sep 17 00:00:00 2001 +From: Christophe Vu-Brugier +Date: Wed, 6 Mar 2013 16:03:14 +0100 +Subject: [PATCH] Add install targets for mdadm and mdmon + + +Signed-off-by: Christophe Vu-Brugier +--- + Makefile | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 315455b..27d8eeb 100644 +--- a/Makefile ++++ b/Makefile +@@ -231,8 +231,12 @@ $(MON_OBJS) : $(INCL) mdmon.h + sha1.o : sha1.c sha1.h md5.h + $(CC) $(CFLAGS) -DHAVE_STDINT_H -o sha1.o -c sha1.c + +-install : mdadm mdmon install-man install-udev ++install : install-mdadm install-mdmon install-man install-udev ++ ++install-mdadm : + $(INSTALL) -D $(STRIP) -m 755 mdadm $(DESTDIR)$(BINDIR)/mdadm ++ ++install-mdmon : + $(INSTALL) -D $(STRIP) -m 755 mdmon $(DESTDIR)$(BINDIR)/mdmon + + install-static : mdadm.static install-man +-- +1.7.10.4 + diff --git a/package/mdadm/mdadm-020-uclibc-dont-force-largefile.patch b/package/mdadm/mdadm-020-uclibc-dont-force-largefile.patch new file mode 100644 index 0000000000..fe3ab47d3c --- /dev/null +++ b/package/mdadm/mdadm-020-uclibc-dont-force-largefile.patch @@ -0,0 +1,27 @@ +[PATCH] mdadm: don't enable largefile support unconditionally on uClibc + +uClibc can be compiled without largefile support (and errors out if +_FILE_OFFSET_BITS is set to 64), so don't define it if that combination +is detected. + +Signed-off-by: Peter Korsgaard +--- + mdadm.h | 4 ++++ + 1 file changed, 4 insertions(+) + +Index: mdadm-3.2.6/mdadm.h +=================================================================== +--- mdadm-3.2.6.orig/mdadm.h ++++ mdadm-3.2.6/mdadm.h +@@ -23,7 +23,11 @@ + */ + + #define _GNU_SOURCE ++#include ++/* uclibc without largefile support #errors on _FILE_OFFSET_BITS=64 */ ++#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_LFS__)) + #define _FILE_OFFSET_BITS 64 ++#endif + #include + #if !defined(__dietlibc__) && !defined(__KLIBC__) + extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence)); diff --git a/package/mdadm/mdadm-030-uclibc-redefine-off64_t-as-off_t-if-no-largefile.patch b/package/mdadm/mdadm-030-uclibc-redefine-off64_t-as-off_t-if-no-largefile.patch new file mode 100644 index 0000000000..d958ab800a --- /dev/null +++ b/package/mdadm/mdadm-030-uclibc-redefine-off64_t-as-off_t-if-no-largefile.patch @@ -0,0 +1,27 @@ +From 9c63360a2db71882cc548305774ce87af5f52b6e Mon Sep 17 00:00:00 2001 +From: Christophe Vu-Brugier +Date: Thu, 7 Mar 2013 10:37:09 +0100 +Subject: [PATCH] uClibc: redefine off64_t as off_t if largefile support is + disabled + + +Signed-off-by: Christophe Vu-Brugier +--- + mdadm.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/mdadm.h b/mdadm.h +index 216c31d..1c72cc4 100644 +--- a/mdadm.h ++++ b/mdadm.h +@@ -1008,6 +1008,7 @@ struct stat64; + # include + # ifndef __UCLIBC_HAS_LFS__ + # define lseek64 lseek ++# define off64_t off_t + # endif + # ifndef __UCLIBC_HAS_FTW__ + # undef HAVE_FTW +-- +1.7.10.4 + diff --git a/package/mdadm/mdadm-2.6.9-001.uclibc-dont-force-largefile.patch b/package/mdadm/mdadm-2.6.9-001.uclibc-dont-force-largefile.patch deleted file mode 100644 index c671437d28..0000000000 --- a/package/mdadm/mdadm-2.6.9-001.uclibc-dont-force-largefile.patch +++ /dev/null @@ -1,27 +0,0 @@ -[PATCH] mdadm: don't enable largefile support unconditionally on uClibc - -uClibc can be compiled without largefile support (and errors out if -_FILE_OFFSET_BITS is set to 64), so don't define it if that combination -is detected. - -Signed-off-by: Peter Korsgaard ---- - mdadm.h | 4 ++++ - 1 file changed, 4 insertions(+) - -Index: mdadm-2.6.7.1/mdadm.h -=================================================================== ---- mdadm-2.6.7.1.orig/mdadm.h -+++ mdadm-2.6.7.1/mdadm.h -@@ -28,7 +28,11 @@ - */ - - #define _GNU_SOURCE -+#include -+/* uclibc without largefile support #errors on _FILE_OFFSET_BITS=64 */ -+#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_LFS__)) - #define _FILE_OFFSET_BITS 64 -+#endif - #include - #if !defined(__dietlibc__) && !defined(__KLIBC__) - extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence)); diff --git a/package/mdadm/mdadm-2.6.9-002.install-without-manpages.patch b/package/mdadm/mdadm-2.6.9-002.install-without-manpages.patch deleted file mode 100644 index 7ab1a7bf6e..0000000000 --- a/package/mdadm/mdadm-2.6.9-002.install-without-manpages.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -Naur mdadm-2.6.9/Makefile mdadm-2.6.9-patched/Makefile ---- mdadm-2.6.9/Makefile 2009-03-10 07:01:17.000000000 +0100 -+++ mdadm-2.6.9-patched/Makefile 2009-10-10 15:53:13.329068128 +0200 -@@ -161,7 +161,9 @@ - sha1.o : sha1.c sha1.h md5.h - $(CC) $(CFLAGS) -DHAVE_STDINT_H -o sha1.o -c sha1.c - --install : mdadm install-man -+install : install-mdadm install-man -+ -+install-mdadm : mdadm - $(INSTALL) -D $(STRIP) -m 755 mdadm $(DESTDIR)$(BINDIR)/mdadm - - install-static : mdadm.static install-man - diff --git a/package/mdadm/mdadm.mk b/package/mdadm/mdadm.mk index fbd5f16cb3..04d7dcbadb 100644 --- a/package/mdadm/mdadm.mk +++ b/package/mdadm/mdadm.mk @@ -1,16 +1,14 @@ -############################################################# +################################################################################ # # mdadm # -############################################################# -MDADM_VERSION:=2.6.9 -MDADM_SOURCE:=mdadm-$(MDADM_VERSION).tar.bz2 -MDADM_SITE:=http://www.kernel.org/pub/linux/utils/raid/mdadm +################################################################################ -MDADM_AUTORECONF = NO - -MDADM_INSTALL_STAGING = NO -MDADM_INSTALL_TARGET = YES +MDADM_VERSION = 3.2.6 +MDADM_SOURCE = mdadm-$(MDADM_VERSION).tar.xz +MDADM_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/raid/mdadm +MDADM_LICENSE = GPLv2+ +MDADM_LICENSE_FILES = COPYING MDADM_MAKE_OPT = \ CFLAGS="$(TARGET_CFLAGS)" CC="$(TARGET_CC)" -C $(MDADM_DIR) mdadm @@ -25,4 +23,4 @@ define MDADM_CONFIGURE_CMDS # Do nothing endef -$(eval $(call AUTOTARGETS,package,mdadm)) +$(eval $(autotools-package)) diff --git a/package/media-ctl/Config.in b/package/media-ctl/Config.in new file mode 100644 index 0000000000..8d1beda69a --- /dev/null +++ b/package/media-ctl/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_MEDIA_CTL + bool "media-ctl" + help + Media controller control application + + Useful mostly with ARM OMAP processors to configure and + control the image subsystem + + http://git.ideasonboard.org/media-ctl.git diff --git a/package/media-ctl/media-ctl-0001-add-kernel-headers-for-compatibility-with-old-toolchains.patch b/package/media-ctl/media-ctl-0001-add-kernel-headers-for-compatibility-with-old-toolchains.patch new file mode 100644 index 0000000000..17b52ced73 --- /dev/null +++ b/package/media-ctl/media-ctl-0001-add-kernel-headers-for-compatibility-with-old-toolchains.patch @@ -0,0 +1,303 @@ +From 480b9effa08541b5df369dd6516013282cf28bd8 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sun, 6 Oct 2013 17:24:04 +0200 +Subject: [PATCH] Add kernel headers for compatibility with old toolchains + +The media controller mechanism is relatively new in the Linux kernel, +and therefore all toolchains don't yet have the necessary +headers. This patch makes sure that media-ctl provides such headers, +as was already the case with v4l2-common.h, v4l2-subdev.h and +videodev2.h. + +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 6 +-- + src/linux/media.h | 132 ++++++++++++++++++++++++++++++++++++++++++++++ + src/linux/v4l2-mediabus.h | 119 +++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 252 insertions(+), 5 deletions(-) + create mode 100644 src/linux/media.h + create mode 100644 src/linux/v4l2-mediabus.h + +diff --git a/configure.ac b/configure.ac +index a749794..56eb71f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -51,11 +51,7 @@ AC_ARG_WITH(kernel-headers, + CPPFLAGS="$CPPFLAGS -I$KERNEL_HEADERS_DIR/include" + + # Checks for header files. +-AC_CHECK_HEADERS([linux/media.h \ +- linux/types.h \ +- linux/v4l2-mediabus.h \ +- linux/v4l2-subdev.h \ +- linux/videodev2.h], ++AC_CHECK_HEADERS([linux/types.h], + [], + [echo "ERROR: Kernel header file not found or not usable!"; exit 1]) + +diff --git a/src/linux/media.h b/src/linux/media.h +new file mode 100644 +index 0000000..410e7cc +--- /dev/null ++++ b/src/linux/media.h +@@ -0,0 +1,132 @@ ++/* ++ * Multimedia device API ++ * ++ * Copyright (C) 2010 Nokia Corporation ++ * ++ * Contacts: Laurent Pinchart ++ * Sakari Ailus ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ */ ++ ++#ifndef __LINUX_MEDIA_H ++#define __LINUX_MEDIA_H ++ ++#include ++#include ++#include ++ ++#define MEDIA_API_VERSION KERNEL_VERSION(0, 1, 0) ++ ++struct media_device_info { ++ char driver[16]; ++ char model[32]; ++ char serial[40]; ++ char bus_info[32]; ++ __u32 media_version; ++ __u32 hw_revision; ++ __u32 driver_version; ++ __u32 reserved[31]; ++}; ++ ++#define MEDIA_ENT_ID_FLAG_NEXT (1 << 31) ++ ++#define MEDIA_ENT_TYPE_SHIFT 16 ++#define MEDIA_ENT_TYPE_MASK 0x00ff0000 ++#define MEDIA_ENT_SUBTYPE_MASK 0x0000ffff ++ ++#define MEDIA_ENT_T_DEVNODE (1 << MEDIA_ENT_TYPE_SHIFT) ++#define MEDIA_ENT_T_DEVNODE_V4L (MEDIA_ENT_T_DEVNODE + 1) ++#define MEDIA_ENT_T_DEVNODE_FB (MEDIA_ENT_T_DEVNODE + 2) ++#define MEDIA_ENT_T_DEVNODE_ALSA (MEDIA_ENT_T_DEVNODE + 3) ++#define MEDIA_ENT_T_DEVNODE_DVB (MEDIA_ENT_T_DEVNODE + 4) ++ ++#define MEDIA_ENT_T_V4L2_SUBDEV (2 << MEDIA_ENT_TYPE_SHIFT) ++#define MEDIA_ENT_T_V4L2_SUBDEV_SENSOR (MEDIA_ENT_T_V4L2_SUBDEV + 1) ++#define MEDIA_ENT_T_V4L2_SUBDEV_FLASH (MEDIA_ENT_T_V4L2_SUBDEV + 2) ++#define MEDIA_ENT_T_V4L2_SUBDEV_LENS (MEDIA_ENT_T_V4L2_SUBDEV + 3) ++ ++#define MEDIA_ENT_FL_DEFAULT (1 << 0) ++ ++struct media_entity_desc { ++ __u32 id; ++ char name[32]; ++ __u32 type; ++ __u32 revision; ++ __u32 flags; ++ __u32 group_id; ++ __u16 pads; ++ __u16 links; ++ ++ __u32 reserved[4]; ++ ++ union { ++ /* Node specifications */ ++ struct { ++ __u32 major; ++ __u32 minor; ++ } v4l; ++ struct { ++ __u32 major; ++ __u32 minor; ++ } fb; ++ struct { ++ __u32 card; ++ __u32 device; ++ __u32 subdevice; ++ } alsa; ++ int dvb; ++ ++ /* Sub-device specifications */ ++ /* Nothing needed yet */ ++ __u8 raw[184]; ++ }; ++}; ++ ++#define MEDIA_PAD_FL_SINK (1 << 0) ++#define MEDIA_PAD_FL_SOURCE (1 << 1) ++ ++struct media_pad_desc { ++ __u32 entity; /* entity ID */ ++ __u16 index; /* pad index */ ++ __u32 flags; /* pad flags */ ++ __u32 reserved[2]; ++}; ++ ++#define MEDIA_LNK_FL_ENABLED (1 << 0) ++#define MEDIA_LNK_FL_IMMUTABLE (1 << 1) ++#define MEDIA_LNK_FL_DYNAMIC (1 << 2) ++ ++struct media_link_desc { ++ struct media_pad_desc source; ++ struct media_pad_desc sink; ++ __u32 flags; ++ __u32 reserved[2]; ++}; ++ ++struct media_links_enum { ++ __u32 entity; ++ /* Should have enough room for pads elements */ ++ struct media_pad_desc *pads; ++ /* Should have enough room for links elements */ ++ struct media_link_desc *links; ++ __u32 reserved[4]; ++}; ++ ++#define MEDIA_IOC_DEVICE_INFO _IOWR('|', 0x00, struct media_device_info) ++#define MEDIA_IOC_ENUM_ENTITIES _IOWR('|', 0x01, struct media_entity_desc) ++#define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum) ++#define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc) ++ ++#endif /* __LINUX_MEDIA_H */ +diff --git a/src/linux/v4l2-mediabus.h b/src/linux/v4l2-mediabus.h +new file mode 100644 +index 0000000..7d64e0e +--- /dev/null ++++ b/src/linux/v4l2-mediabus.h +@@ -0,0 +1,119 @@ ++/* ++ * Media Bus API header ++ * ++ * Copyright (C) 2009, Guennadi Liakhovetski ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#ifndef __LINUX_V4L2_MEDIABUS_H ++#define __LINUX_V4L2_MEDIABUS_H ++ ++#include ++#include ++ ++/* ++ * These pixel codes uniquely identify data formats on the media bus. Mostly ++ * they correspond to similarly named V4L2_PIX_FMT_* formats, format 0 is ++ * reserved, V4L2_MBUS_FMT_FIXED shall be used by host-client pairs, where the ++ * data format is fixed. Additionally, "2X8" means that one pixel is transferred ++ * in two 8-bit samples, "BE" or "LE" specify in which order those samples are ++ * transferred over the bus: "LE" means that the least significant bits are ++ * transferred first, "BE" means that the most significant bits are transferred ++ * first, and "PADHI" and "PADLO" define which bits - low or high, in the ++ * incomplete high byte, are filled with padding bits. ++ * ++ * The pixel codes are grouped by type, bus_width, bits per component, samples ++ * per pixel and order of subsamples. Numerical values are sorted using generic ++ * numerical sort order (8 thus comes before 10). ++ * ++ * As their value can't change when a new pixel code is inserted in the ++ * enumeration, the pixel codes are explicitly given a numerical value. The next ++ * free values for each category are listed below, update them when inserting ++ * new pixel codes. ++ */ ++enum v4l2_mbus_pixelcode { ++ V4L2_MBUS_FMT_FIXED = 0x0001, ++ ++ /* RGB - next is 0x1009 */ ++ V4L2_MBUS_FMT_RGB444_2X8_PADHI_BE = 0x1001, ++ V4L2_MBUS_FMT_RGB444_2X8_PADHI_LE = 0x1002, ++ V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE = 0x1003, ++ V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE = 0x1004, ++ V4L2_MBUS_FMT_BGR565_2X8_BE = 0x1005, ++ V4L2_MBUS_FMT_BGR565_2X8_LE = 0x1006, ++ V4L2_MBUS_FMT_RGB565_2X8_BE = 0x1007, ++ V4L2_MBUS_FMT_RGB565_2X8_LE = 0x1008, ++ ++ /* YUV (including grey) - next is 0x2014 */ ++ V4L2_MBUS_FMT_Y8_1X8 = 0x2001, ++ V4L2_MBUS_FMT_UYVY8_1_5X8 = 0x2002, ++ V4L2_MBUS_FMT_VYUY8_1_5X8 = 0x2003, ++ V4L2_MBUS_FMT_YUYV8_1_5X8 = 0x2004, ++ V4L2_MBUS_FMT_YVYU8_1_5X8 = 0x2005, ++ V4L2_MBUS_FMT_UYVY8_2X8 = 0x2006, ++ V4L2_MBUS_FMT_VYUY8_2X8 = 0x2007, ++ V4L2_MBUS_FMT_YUYV8_2X8 = 0x2008, ++ V4L2_MBUS_FMT_YVYU8_2X8 = 0x2009, ++ V4L2_MBUS_FMT_Y10_1X10 = 0x200a, ++ V4L2_MBUS_FMT_YUYV10_2X10 = 0x200b, ++ V4L2_MBUS_FMT_YVYU10_2X10 = 0x200c, ++ V4L2_MBUS_FMT_Y12_1X12 = 0x2013, ++ V4L2_MBUS_FMT_UYVY8_1X16 = 0x200f, ++ V4L2_MBUS_FMT_VYUY8_1X16 = 0x2010, ++ V4L2_MBUS_FMT_YUYV8_1X16 = 0x2011, ++ V4L2_MBUS_FMT_YVYU8_1X16 = 0x2012, ++ V4L2_MBUS_FMT_YUYV10_1X20 = 0x200d, ++ V4L2_MBUS_FMT_YVYU10_1X20 = 0x200e, ++ ++ /* Bayer - next is 0x3015 */ ++ V4L2_MBUS_FMT_SBGGR8_1X8 = 0x3001, ++ V4L2_MBUS_FMT_SGBRG8_1X8 = 0x3013, ++ V4L2_MBUS_FMT_SGRBG8_1X8 = 0x3002, ++ V4L2_MBUS_FMT_SRGGB8_1X8 = 0x3014, ++ V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8 = 0x300b, ++ V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8 = 0x300c, ++ V4L2_MBUS_FMT_SGRBG10_DPCM8_1X8 = 0x3009, ++ V4L2_MBUS_FMT_SRGGB10_DPCM8_1X8 = 0x300d, ++ V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_BE = 0x3003, ++ V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_LE = 0x3004, ++ V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_BE = 0x3005, ++ V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_LE = 0x3006, ++ V4L2_MBUS_FMT_SBGGR10_1X10 = 0x3007, ++ V4L2_MBUS_FMT_SGBRG10_1X10 = 0x300e, ++ V4L2_MBUS_FMT_SGRBG10_1X10 = 0x300a, ++ V4L2_MBUS_FMT_SRGGB10_1X10 = 0x300f, ++ V4L2_MBUS_FMT_SBGGR12_1X12 = 0x3008, ++ V4L2_MBUS_FMT_SGBRG12_1X12 = 0x3010, ++ V4L2_MBUS_FMT_SGRBG12_1X12 = 0x3011, ++ V4L2_MBUS_FMT_SRGGB12_1X12 = 0x3012, ++ ++ /* JPEG compressed formats - next is 0x4002 */ ++ V4L2_MBUS_FMT_JPEG_1X8 = 0x4001, ++ ++ /* Vendor specific formats - next is 0x5002 */ ++ ++ /* S5C73M3 sensor specific interleaved UYVY and JPEG */ ++ V4L2_MBUS_FMT_S5C_UYVY_JPEG_1X8 = 0x5001, ++}; ++ ++/** ++ * struct v4l2_mbus_framefmt - frame format on the media bus ++ * @width: frame width ++ * @height: frame height ++ * @code: data format code (from enum v4l2_mbus_pixelcode) ++ * @field: used interlacing type (from enum v4l2_field) ++ * @colorspace: colorspace of the data (from enum v4l2_colorspace) ++ */ ++struct v4l2_mbus_framefmt { ++ __u32 width; ++ __u32 height; ++ __u32 code; ++ __u32 field; ++ __u32 colorspace; ++ __u32 reserved[7]; ++}; ++ ++#endif +-- +1.8.1.2 + diff --git a/package/media-ctl/media-ctl.mk b/package/media-ctl/media-ctl.mk new file mode 100644 index 0000000000..ae2482ca54 --- /dev/null +++ b/package/media-ctl/media-ctl.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# media-ctl +# +################################################################################ + +MEDIA_CTL_VERSION = 87f58c2ed885d636229f7209fde883058433a1ce +MEDIA_CTL_SITE = git://git.ideasonboard.org/media-ctl.git +MEDIA_CTL_INSTALL_STAGING = YES +MEDIA_CTL_LICENSE = LGPLv2.1+ +MEDIA_CTL_LICENSE_FILES = COPYING.LIB + +MEDIA_CTL_AUTORECONF = YES +MEDIA_CTL_CONF_OPT = --with-kernel-headers=$(STAGING_DIR)/usr/include +MEDIA_CTL_DEPENDENCIES = host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/mediastreamer/Config.in b/package/mediastreamer/Config.in new file mode 100644 index 0000000000..ebcb647e7c --- /dev/null +++ b/package/mediastreamer/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_MEDIASTREAMER + bool "mediastreamer" + select BR2_PACKAGE_ORTP + depends on BR2_INSTALL_LIBSTDCPP # until fixed + depends on BR2_TOOLCHAIN_HAS_THREADS # ortp + depends on BR2_INET_IPV6 + help + Mediastreamer is a powerful and lightweighted streaming + engine specialized for voice/video telephony applications. + + It is the library that is responsible for all the receiving + and sending of multimedia streams in linphone, including + voice/video capture, encoding and decoding, and rendering. + + http://www.linphone.org/eng/documentation/dev/mediastreamer2.html + +comment "mediastreamer needs a toolchain w/ threads, C++, IPv6" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_INET_IPV6 diff --git a/package/mediastreamer/mediastreamer.mk b/package/mediastreamer/mediastreamer.mk new file mode 100644 index 0000000000..52a5b5abd1 --- /dev/null +++ b/package/mediastreamer/mediastreamer.mk @@ -0,0 +1,88 @@ +################################################################################ +# +# mediastreamer +# +################################################################################ + +MEDIASTREAMER_VERSION = 2.9.0 +MEDIASTREAMER_SITE = http://download.savannah.nongnu.org/releases/linphone/mediastreamer +MEDIASTREAMER_INSTALL_STAGING = YES +MEDIASTREAMER_DEPENDENCIES = host-intltool host-pkgconf ortp host-gettext +# tests fail linking on some architectures, so disable them +MEDIASTREAMER_CONF_OPT = --disable-tests --disable-glx --disable-strict +MEDIASTREAMER_LICENSE = GPLv2+ +MEDIASTREAMER_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_ALSA_LIB_MIXER)$(BR2_PACKAGE_ALSA_LIB_PCM),yy) +MEDIASTREAMER_CONF_OPT += --enable-alsa +MEDIASTREAMER_DEPENDENCIES += alsa-lib +else +MEDIASTREAMER_CONF_OPT += --disable-alsa +endif + +# portaudio backend needs speex as well +ifeq ($(BR2_PACKAGE_PORTAUDIO)$(BR2_PACKAGE_SPEEX),yy) +MEDIASTREAMER_CONF_OPT += --enable-portaudio +MEDIASTREAMER_DEPENDENCIES += portaudio speex +else +MEDIASTREAMER_CONF_OPT += --disable-portaudio +endif + +ifeq ($(BR2_PACKAGE_PULSEAUDIO),y) +MEDIASTREAMER_CONF_OPT += --enable-pulseaudio +MEDIASTREAMER_DEPENDENCIES += pulseaudio +else +MEDIASTREAMER_CONF_OPT += --disable-pulseaudio +endif + +ifeq ($(BR2_PACKAGE_SPEEX),y) +MEDIASTREAMER_CONF_OPT += --enable-speex +MEDIASTREAMER_DEPENDENCIES += speex +else +MEDIASTREAMER_CONF_OPT += --disable-speex +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_SWSCALE),y) +MEDIASTREAMER_CONF_OPT += --enable-ffmpeg +MEDIASTREAMER_DEPENDENCIES += ffmpeg +else +MEDIASTREAMER_CONF_OPT += --disable-ffmpeg +endif + +ifeq ($(BR2_PACKAGE_SDL),y) +MEDIASTREAMER_CONF_OPT += --enable-sdl +MEDIASTREAMER_DEPENDENCIES += sdl +else +MEDIASTREAMER_CONF_OPT += --disable-sdl +endif + +# mediastreamer assumes SDL has X11 support if --enable-x11 (and X11 support +# is only used for SDL output) +ifeq ($(BR2_PACKAGE_SDL_X11),y) +MEDIASTREAMER_CONF_OPT += --enable-x11 +else +MEDIASTREAMER_CONF_OPT += --disable-x11 +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXV),y) +MEDIASTREAMER_CONF_OPT += --enable-xv +MEDIASTREAMER_DEPENDENCIES += xlib_libXv +else +MEDIASTREAMER_CONF_OPT += --disable-xv +endif + +ifeq ($(BR2_PACKAGE_LIBTHEORA),y) +MEDIASTREAMER_CONF_OPT += --enable-theora +MEDIASTREAMER_DEPENDENCIES += libtheora +else +MEDIASTREAMER_CONF_OPT += --disable-theora +endif + +ifeq ($(BR2_PACKAGE_LIBV4L),y) +MEDIASTREAMER_CONF_OPT += --enable-libv4l1 --enable-libv4l2 +MEDIASTREAMER_DEPENDENCIES += libv4l +else +MEDIASTREAMER_CONF_OPT += --disable-libv4l1 --disable-libv4l2 +endif + +$(eval $(autotools-package)) diff --git a/package/memstat/memstat.mk b/package/memstat/memstat.mk index 0ad8eba3bb..e13d01306c 100644 --- a/package/memstat/memstat.mk +++ b/package/memstat/memstat.mk @@ -1,8 +1,8 @@ -############################################################# +################################################################################ # # memstat # -############################################################# +################################################################################ MEMSTAT_VERSION = 0.8 MEMSTAT_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/m/memstat @@ -24,4 +24,4 @@ define MEMSTAT_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/bin/memstat endef -$(eval $(call GENTARGETS,package,memstat)) +$(eval $(generic-package)) diff --git a/package/memtester/Config.in b/package/memtester/Config.in index 82769f509a..b04dcd174b 100644 --- a/package/memtester/Config.in +++ b/package/memtester/Config.in @@ -6,5 +6,5 @@ config BR2_PACKAGE_MEMTESTER http://pyropus.ca/software/memtester/ -comment "memtester requires a toolchain with LARGEFILE support" - depends on !BR2_LARGEFILE +comment "memtester needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE diff --git a/package/memtester/memtester-4.2.1-makefile-fix.patch b/package/memtester/memtester-makefile-fix.patch similarity index 100% rename from package/memtester/memtester-4.2.1-makefile-fix.patch rename to package/memtester/memtester-makefile-fix.patch diff --git a/package/memtester/memtester.mk b/package/memtester/memtester.mk index a92c5d2b1a..db5e6a5cdc 100644 --- a/package/memtester/memtester.mk +++ b/package/memtester/memtester.mk @@ -1,11 +1,13 @@ -############################################################# +################################################################################ # # memtester # -############################################################# -MEMTESTER_VERSION = 4.2.1 -MEMTESTER_SOURCE = memtester-$(MEMTESTER_VERSION).tar.gz +################################################################################ + +MEMTESTER_VERSION = 4.3.0 MEMTESTER_SITE = http://pyropus.ca/software/memtester/old-versions/ +MEMTESTER_LICENSE = GPLv2 +MEMTESTER_LICENSE_FILES = COPYING MEMTESTER_TARGET_INSTALL_OPTS = INSTALLPATH=$(TARGET_DIR)/usr @@ -26,4 +28,4 @@ define MEMTESTER_CLEAN_CMDS -$(MAKE) -C $(@D) clean endef -$(eval $(call GENTARGETS,package,memtester)) +$(eval $(generic-package)) diff --git a/package/metacity/Config.in b/package/metacity/Config.in index c483c44e24..833a091e7f 100644 --- a/package/metacity/Config.in +++ b/package/metacity/Config.in @@ -2,5 +2,15 @@ config BR2_PACKAGE_METACITY bool "metacity" depends on BR2_PACKAGE_LIBGTK2 depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + # Metacity configure.ac pretends it can be built without + # Composite, but in reality, it doesn't build. + select BR2_PACKAGE_XLIB_LIBXCOMPOSITE + select BR2_PACKAGE_XLIB_LIBXFIXES + select BR2_PACKAGE_XLIB_LIBXRENDER + select BR2_PACKAGE_XLIB_LIBXDAMAGE + # We do not directly depend on Xft, but they are needed to get + # Xft support in Pango, which we require. + select BR2_PACKAGE_XLIB_LIBXFT help Metacity is a window manager for the X Window System. diff --git a/package/metacity/metacity-add-libm-reference.patch b/package/metacity/metacity-add-libm-reference.patch new file mode 100644 index 0000000000..628501726a --- /dev/null +++ b/package/metacity/metacity-add-libm-reference.patch @@ -0,0 +1,51 @@ +Upstream fix to link metacity itself against libm + +The upstream fix is modified to also include the changes on the +configure script directly, so that autoreconfiguring is not +needed. Autoreconfiguring cannot be done easily on metacity, due to +missing AM_GCONF_SOURCE_2 and AM_NLS macros. + +http://git.gnome.org/browse/metacity/commit/configure.in?id=9cb0b6ff520ea69bdff6c328a21787202aee1bcc + +Signed-off-by: Thomas Petazzoni + +From 9cb0b6ff520ea69bdff6c328a21787202aee1bcc Mon Sep 17 00:00:00 2001 +From: Götz Waschk +Date: Wed, 22 Oct 2008 12:08:48 +0000 +Subject: add libm reference. Closes #557357. + +2008-10-22 Götz Waschk + + * configure.in: add libm reference. Closes #557357. + + +svn path=/trunk/; revision=3984 +--- +(limited to 'configure.in') + +Index: b/configure.in +=================================================================== +--- a/configure.in ++++ b/configure.in +@@ -413,7 +413,7 @@ + AC_DEFINE(HAVE_XSYNC, , [Have the Xsync extension library]) + fi + +-METACITY_LIBS="$METACITY_LIBS $XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" ++METACITY_LIBS="$METACITY_LIBS $XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lm" + METACITY_MESSAGE_LIBS="$METACITY_MESSAGE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" + METACITY_WINDOW_DEMO_LIBS="$METACITY_WINDOW_DEMO_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" + METACITY_PROPS_LIBS="$METACITY_PROPS_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" +Index: b/configure +=================================================================== +--- a/configure ++++ b/configure +@@ -29509,7 +29509,7 @@ + + fi + +-METACITY_LIBS="$METACITY_LIBS $XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" ++METACITY_LIBS="$METACITY_LIBS $XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lm" + METACITY_MESSAGE_LIBS="$METACITY_MESSAGE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" + METACITY_WINDOW_DEMO_LIBS="$METACITY_WINDOW_DEMO_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" + METACITY_PROPS_LIBS="$METACITY_PROPS_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" diff --git a/package/metacity/metacity-mag-add-libm-reference.patch b/package/metacity/metacity-mag-add-libm-reference.patch new file mode 100644 index 0000000000..d47d807558 --- /dev/null +++ b/package/metacity/metacity-mag-add-libm-reference.patch @@ -0,0 +1,45 @@ +Upstream patch to fix link against libm + +The upstream patch is modified to also include the necessary +Makefile.in, which avoids the need for autoreconfiguring the +package. Autoreconfiguring the package unfortunately doesn't work, due +to AM_GCONF_SOURCE_2 and AM_NLS macros being missing. + +http://git.gnome.org/browse/metacity/commit/src/tools/Makefile.am?id=13d0d52eb885598885b6ff4b73c795c8f29c2a6b + +Signed-off-by: Thomas Petazzoni + +From 13d0d52eb885598885b6ff4b73c795c8f29c2a6b Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Sun, 02 May 2010 14:50:42 +0000 +Subject: fails to link with pedantic linkers + +--- +(limited to 'src/tools/Makefile.am') + +Index: b/src/tools/Makefile.am +=================================================================== +--- a/src/tools/Makefile.am ++++ b/src/tools/Makefile.am +@@ -26,7 +26,7 @@ + + metacity_message_LDADD= @METACITY_MESSAGE_LIBS@ + metacity_window_demo_LDADD= @METACITY_WINDOW_DEMO_LIBS@ +-metacity_mag_LDADD= @METACITY_WINDOW_DEMO_LIBS@ ++metacity_mag_LDADD= @METACITY_WINDOW_DEMO_LIBS@ -lm + metacity_grayscale_LDADD = @METACITY_WINDOW_DEMO_LIBS@ + + EXTRA_DIST=$(icon_DATA) +Index: b/src/tools/Makefile.in +=================================================================== +--- a/src/tools/Makefile.in ++++ b/src/tools/Makefile.in +@@ -281,7 +281,7 @@ + + metacity_message_LDADD = @METACITY_MESSAGE_LIBS@ + metacity_window_demo_LDADD = @METACITY_WINDOW_DEMO_LIBS@ +-metacity_mag_LDADD = @METACITY_WINDOW_DEMO_LIBS@ ++metacity_mag_LDADD = @METACITY_WINDOW_DEMO_LIBS@ -lm + metacity_grayscale_LDADD = @METACITY_WINDOW_DEMO_LIBS@ + EXTRA_DIST = $(icon_DATA) + all: all-am diff --git a/package/metacity/metacity.mk b/package/metacity/metacity.mk index 04cfa107de..9306b00207 100644 --- a/package/metacity/metacity.mk +++ b/package/metacity/metacity.mk @@ -1,8 +1,8 @@ -############################################################# +################################################################################ # # metacity # -############################################################# +################################################################################ # newer versions need libcanberra-gtk and gnome-doc-utils METACITY_VERSION_MAJOR = 2.25 @@ -17,7 +17,17 @@ METACITY_CONF_OPT = --x-includes=$(STAGING_DIR)/usr/include/X11 \ --disable-dependency-tracking \ --disable-sm --disable-startup-notification -METACITY_DEPENDENCIES = libgtk2 xserver_xorg-server +METACITY_DEPENDENCIES = libgtk2 \ + xlib_libX11 \ + host-libxml-parser-perl \ + xlib_libXcomposite \ + xlib_libXfixes \ + xlib_libXrender \ + xlib_libXdamage + +ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y) +METACITY_DEPENDENCIES += xlib_libXcursor +endif define METACITY_INSTALL_XSESSION install -D package/metacity/Xsession $(TARGET_DIR)/etc/X11/Xsession @@ -25,4 +35,4 @@ endef METACITY_POST_INSTALL_TARGET_HOOKS += METACITY_INSTALL_XSESSION -$(eval $(call AUTOTARGETS,package,metacity)) +$(eval $(autotools-package)) diff --git a/package/microperl/Config.in b/package/microperl/Config.in deleted file mode 100644 index 82f964c74c..0000000000 --- a/package/microperl/Config.in +++ /dev/null @@ -1,14 +0,0 @@ -config BR2_PACKAGE_MICROPERL - bool "microperl" - help - Perl without operating-specific functions such as readdir. - -config BR2_PACKAGE_MICROPERL_MODULES - string "microperl modules" - default "" - depends on BR2_PACKAGE_MICROPERL - help - List of microperl modules to copy to the rootfs. - E.g. - warnings.pm warnings/register.pm strict.pm constant.pm vars.pm - Exporter.pm Exporter/Heavy.pm Carp.pm Getopt/Long.pm diff --git a/package/microperl/microperl.mk b/package/microperl/microperl.mk deleted file mode 100644 index b68e82548a..0000000000 --- a/package/microperl/microperl.mk +++ /dev/null @@ -1,124 +0,0 @@ -############################################################# -# -# microperl -# -############################################################# -MICROPERL_MAJ=5 -MICROPERL_VERSION=$(MICROPERL_MAJ).8.8 -MICROPERL_SOURCE=perl-$(MICROPERL_VERSION).tar.bz2 -MICROPERL_CAT:=$(BZCAT) -MICROPERL_SITE=ftp://ftp.cpan.org/pub/CPAN/src/5.0 -MICROPERL_DIR=$(BUILD_DIR)/perl-$(MICROPERL_VERSION) - -MICROPERL_MODS_DIR=/usr/lib/perl$(MICROPERL_MAJ)/$(MICROPERL_VERSION) -MICROPERL_MODS=$(call qstrip,$(BR2_PACKAGE_MICROPERL_MODULES)) -ifeq ($(BR2_PACKAGE_AUTOMAKE),y) -MICROPERL_MODS+=File/Basename.pm Errno.pm Config.pm IO/File.pm Symbol.pm \ - SelectSaver.pm IO/Seekable.pm IO/Handle.pm IO.pm XSLoader.pm \ - DynaLoader.pm AutoLoader.pm Carp/Heavy.pm -endif -$(DL_DIR)/$(MICROPERL_SOURCE): - $(call DOWNLOAD,$(MICROPERL_SITE),$(MICROPERL_SOURCE)) - -$(MICROPERL_DIR)/.source: $(DL_DIR)/$(MICROPERL_SOURCE) - $(MICROPERL_CAT) $(DL_DIR)/$(MICROPERL_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - # makedepend contains bashisms - $(SED) 's~sh ./makedepend~bash ./makedepend~' \ - $(MICROPERL_DIR)/Makefile.SH \ - $(MICROPERL_DIR)/x2p/Makefile.SH \ - $(MICROPERL_DIR)/pod/Makefile.SH - chmod -R u+w $(MICROPERL_DIR) - touch $@ - -$(MICROPERL_DIR)/.host_configured: $(MICROPERL_DIR)/.source - # we need to build a perl for the host just for Errno.pm - (cd $(MICROPERL_DIR); ./Configure -Dcc="$(HOSTCC)" -de ) - touch $@ - - -$(MICROPERL_DIR)/.host_configured_and_fixed: $(MICROPERL_DIR)/.host_configured - $(SED) 's/^.*.*//g' $(MICROPERL_DIR)/Makefile - $(SED) 's/^.*.*//g' $(MICROPERL_DIR)/x2p/Makefile - $(SED) 's/^.*.*//g' $(MICROPERL_DIR)/makefile - $(SED) 's/^.*.*//g' $(MICROPERL_DIR)/x2p/makefile - touch $@ - -$(MICROPERL_DIR)/.host_make: $(MICROPERL_DIR)/.host_configured_and_fixed - $(MAKE) -C $(MICROPERL_DIR) || echo "An error is expected on make" - touch $@ - -$(MICROPERL_DIR)/.host_make_fixed: $(MICROPERL_DIR)/.host_make - $(MAKE) -C $(MICROPERL_DIR) test || echo "An error is expected on make test" - touch $@ - -$(MICROPERL_DIR)/.configured: $(MICROPERL_DIR)/.host_make_fixed - # we need to build a perl for the host just for Errno.pm - (cd $(MICROPERL_DIR); \ - chmod a+x ext/util/make_ext; \ - ext/util/make_ext nonxs Errno MAKE="$(firstword $(MAKE))" \ - ) - (cd $(MICROPERL_DIR); \ - chmod u+w uconfig.h; ./uconfig.sh; \ - $(MAKE) -f $(MICROPERL_DIR)/Makefile.micro regen_uconfig; \ - $(SED) 's,PRIVLIB ".*,PRIVLIB "/$(MICROPERL_MODS_DIR)",' \ - -e 's,PRIVLIB_EXP ".*,PRIVLIB_EXP "$(MICROPERL_MODS_DIR)",' \ - -e 's,BIN ".*,BIN "/usr/bin",' \ - ./uconfig.h; \ - ) - touch $@ - -$(MICROPERL_DIR)/microperl: $(MICROPERL_DIR)/.configured - $(MAKE) -f $(MICROPERL_DIR)/Makefile.micro CC="$(TARGET_CC)" \ - OPTIMIZE="$(TARGET_CFLAGS)" -C $(MICROPERL_DIR) -ifeq ($(BR2_PACKAGE_AUTOMAKE),y) - #(cd $(@D); \ - # CONFIG=uconfig.h $(SHELL) ext/util/make_ext nonxs Errno MAKE="$(firstword $(MAKE))"; \ - #) -endif - -$(TARGET_DIR)/usr/bin/microperl: $(MICROPERL_DIR)/microperl -ifneq ($(MICROPERL_MODS),) - (cd $(MICROPERL_DIR); \ - for i in $(patsubst %,$(TARGET_DIR)/$(MICROPERL_MODS_DIR)/%,$(dir $(MICROPERL_MODS))); do \ - [ -d $$i ] || mkdir -p $$i; \ - done; \ - for i in $(MICROPERL_MODS); do \ - cp -dpf $(MICROPERL_DIR)/lib/$$i $(TARGET_DIR)/$(MICROPERL_MODS_DIR)/$$i; \ - done; \ - ) -endif - cp -dpf $(MICROPERL_DIR)/microperl $@ -ifneq ($(BR2_STRIP_none),y) - $(STRIPCMD) $(STRIP_STRIP_ALL) $@ -endif - (cd $(TARGET_DIR)/usr/bin; rm -f perl; ln -s microperl perl;) - -microperl: $(TARGET_DIR)/usr/bin/microperl - -microperl-source: $(DL_DIR)/$(MICROPERL_SOURCE) - -microperl-unpacked: $(MICROPERL_DIR)/.source - -microperl-config: $(MICROPERL_DIR)/.host_configured - -microperl-host: $(MICROPERL_DIR)/.host_make - -microperl-host-fixed: $(MICROPERL_DIR)/.host_make_fixed - -microperl-clean: - rm -rf $(TARGET_DIR)/usr/bin/microperl \ - $(TARGET_DIR)/$(MICROPERL_MODS_DIR) $(TARGET_DIR)/usr/bin/perl - -rmdir $(TARGET_DIR)/usr/lib/perl$(MICROPERL_MAJ) - -$(MAKE) -C $(MICROPERL_DIR) -f Makefile.micro clean - -microperl-dirclean: - rm -rf $(MICROPERL_DIR) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_MICROPERL),y) -TARGETS+=microperl -endif diff --git a/package/midori/Config.in b/package/midori/Config.in index 95a0afbd64..a684376c69 100644 --- a/package/midori/Config.in +++ b/package/midori/Config.in @@ -2,13 +2,21 @@ config BR2_PACKAGE_MIDORI bool "midori" select BR2_PACKAGE_WEBKIT select BR2_PACKAGE_LIBSEXY + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE depends on BR2_PACKAGE_LIBGTK2 depends on BR2_INSTALL_LIBSTDCPP # webkit + depends on BR2_TOOLCHAIN_HAS_THREADS # webkit -> enchant -> libglib2 depends on BR2_USE_WCHAR # webkit + depends on (BR2_arm || BR2_armeb || BR2_i386 || BR2_mips || BR2_mipsel || \ + BR2_powerpc || BR2_sh || BR2_sparc || BR2_x86_64) # webkit help Midori is a lightweight web browser based on WebKit http://software.twotoasts.de/?page=midori -comment "midori requires C++, WCHAR in toolchain and libgtk2" - depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || !BR2_PACKAGE_LIBGTK2 +comment "midori needs libgtk2 and a toolchain w/ C++, wchar, threads" + depends on (BR2_arm || BR2_armeb || BR2_i386 || BR2_mips || BR2_mipsel || \ + BR2_powerpc || BR2_sh || BR2_sparc || BR2_x86_64) + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS || !BR2_PACKAGE_LIBGTK2 diff --git a/package/midori/midori.mk b/package/midori/midori.mk index af227d4eb1..8887e49491 100644 --- a/package/midori/midori.mk +++ b/package/midori/midori.mk @@ -1,15 +1,23 @@ -############################################################# +################################################################################ # # midori # -############################################################# +################################################################################ -MIDORI_VERSION = 0.2.9 +MIDORI_VERSION = 0.4.6 MIDORI_SOURCE = midori-$(MIDORI_VERSION).tar.bz2 -MIDORI_SITE = http://archive.xfce.org/src/apps/midori/0.2/ -MIDORI_INSTALL_TARGET = YES - -MIDORI_DEPENDENCIES = host-pkg-config host-intltool webkit libsexy libgtk2 +MIDORI_SITE = http://archive.xfce.org/src/apps/midori/0.4/ +MIDORI_LICENSE = LGPLv2.1+ +MIDORI_LICENSE_FILES = COPYING +MIDORI_DEPENDENCIES = \ + host-intltool \ + host-pkgconf \ + host-vala \ + libgtk2 \ + libsexy \ + webkit \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \ + $(if $(BR2_PACKAGE_LIBICONV),libiconv) ifneq ($(BR2_PACKAGE_XORG7),y) define MIDORI_WITHOUT_X11 @@ -23,16 +31,16 @@ define MIDORI_CONFIGURE_CMDS $(TARGET_CONFIGURE_OPTS) \ ./waf configure \ --prefix=/usr \ - --disable-vala \ + --disable-libnotify \ ) endef define MIDORI_BUILD_CMDS - (cd $(@D); ./waf build -j $(BR2_JLEVEL)) + (cd $(@D); ./waf build -j $(PARALLEL_JOBS)) endef define MIDORI_INSTALL_TARGET_CMDS (cd $(@D); ./waf --destdir=$(TARGET_DIR) install) endef -$(eval $(call GENTARGETS,package,midori)) +$(eval $(generic-package)) diff --git a/package/mii-diag/mii-diag.mk b/package/mii-diag/mii-diag.mk index 01a8b5f7d0..9443661ae8 100644 --- a/package/mii-diag/mii-diag.mk +++ b/package/mii-diag/mii-diag.mk @@ -1,27 +1,32 @@ -############################################################# +################################################################################ # # mii-diag # -############################################################# +################################################################################ + MII_DIAG_VERSION = 2.11 MII_DIAG_SOURCE = mii-diag_$(MII_DIAG_VERSION).orig.tar.gz MII_DIAG_PATCH = mii-diag_$(MII_DIAG_VERSION)-3.diff.gz MII_DIAG_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/m/mii-diag +MII_DIAG_LICENSE = GPL # No version specified +MII_DIAG_LICENSE_FILES = mii-diag.c + +MII_DIAG_MAKE_OPT = $(TARGET_CONFIGURE_OPTS) define MII_DIAG_DEBIAN_PATCHES if [ -d $(@D)/debian/patches ]; then \ - toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches \*.patch; \ + support/scripts/apply-patches.sh $(@D) $(@D)/debian/patches \*.patch; \ fi endef MII_DIAG_POST_PATCH_HOOKS = MII_DIAG_DEBIAN_PATCHES define MII_DIAG_BUILD_CMDS - $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) + $(MAKE) $(MII_DIAG_MAKE_OPT) -C $(@D) mii-diag endef define MII_DIAG_INSTALL_TARGET_CMDS - $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install-mii-diag endef define MII_DIAG_UNINSTALL_TARGET_CMDS @@ -32,4 +37,4 @@ define MII_DIAG_CLEAN_CMDS $(MAKE) -C $(@D) clean endef -$(eval $(call GENTARGETS,package,mii-diag)) +$(eval $(generic-package)) diff --git a/package/minicom/Config.in b/package/minicom/Config.in new file mode 100644 index 0000000000..07dbeba5ff --- /dev/null +++ b/package/minicom/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_MINICOM + bool "minicom" + depends on BR2_USE_WCHAR + depends on BR2_USE_MMU # fork + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + select BR2_PACKAGE_NCURSES + help + Minicom is a menu driven communications program. + It emulates ANSI and VT102 terminals. It has a + dialing directory and auto zmodem download. + + http://alioth.debian.org/projects/minicom + +comment "minicom needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR diff --git a/package/minicom/minicom.mk b/package/minicom/minicom.mk new file mode 100644 index 0000000000..05004b8bb0 --- /dev/null +++ b/package/minicom/minicom.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# minicom +# +################################################################################ + +MINICOM_VERSION = 2.6.2 +MINICOM_SITE = http://alioth.debian.org/frs/download.php/file/3869/ +MINICOM_LICENSE = GPLv2+ +MINICOM_LICENSE_FILES = COPYING + +# pkg-config is only used to check for liblockdev, which we don't have +# in BR, so instead of adding host-pkgconf as a dependency, simply +# make sure the host version isn't used so we don't end up with problems +# if people have liblockdev1-dev installed +MINICOM_CONF_ENV = PKG_CONFIG=/bin/false + +MINICOM_DEPENDENCIES = ncurses $(if $(BR2_ENABLE_LOCALE),,libiconv) + +$(eval $(autotools-package)) diff --git a/package/minidlna/Config.in b/package/minidlna/Config.in new file mode 100644 index 0000000000..1fcecde0f7 --- /dev/null +++ b/package/minidlna/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_MINIDLNA + bool "minidlna" + depends on BR2_LARGEFILE # ffmpeg + depends on BR2_INET_IPV6 # ffmpeg + depends on BR2_USE_MMU # fork + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_FFMPEG + select BR2_PACKAGE_FLAC + select BR2_PACKAGE_LIBVORBIS # selects libogg + select BR2_PACKAGE_LIBOGG + select BR2_PACKAGE_LIBID3TAG # selects zlib + select BR2_PACKAGE_LIBEXIF + select BR2_PACKAGE_LIBJPEG + select BR2_PACKAGE_SQLITE + help + MiniDLNA (aka ReadyDLNA) is server software with the aim of being + fully compliant with DLNA/UPnP-AV clients. + + http://minidlna.sourceforge.net/ + +comment "minidlna needs a toolchain w/ largefile, IPv6, threads" + depends on BR2_USE_MMU + depends on !(BR2_LARGEFILE && BR2_INET_IPV6 && BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/minidlna/minidlna-0001-fix-genconfig-script.patch b/package/minidlna/minidlna-0001-fix-genconfig-script.patch new file mode 100644 index 0000000000..9a7b4e0384 --- /dev/null +++ b/package/minidlna/minidlna-0001-fix-genconfig-script.patch @@ -0,0 +1,95 @@ +Fix the genconfig.sh script, which has a hard-coded host prefix. + +N.B. The upstream CVS HEAD has been converted to GNU autotools, but a +tarball has not yet been released. When the next release tarball is made +available, this patch can be removed. + +Signed-off-by: Simon Dawson + +diff -Nurp a/genconfig.sh b/genconfig.sh +--- a/genconfig.sh 2012-01-21 00:34:13.000000000 +0000 ++++ b/genconfig.sh 2013-05-04 21:05:12.025002800 +0100 +@@ -27,6 +27,8 @@ CONFIGMACRO="__CONFIG_H__" + DB_PATH="/tmp/minidlna" + # Log path + LOG_PATH="${DB_PATH}" ++# Host prefix ++PREFIX=${PREFIX:-/usr} + + # detecting the OS name and version + OS_NAME=`uname -s` +@@ -40,22 +42,22 @@ ${RM} ${CONFIGFILE} + + # Detect if there are missing headers + # NOTE: This check only works with a normal distro +-[ ! -e "/usr/include/sqlite3.h" ] && MISSING="libsqlite3 $MISSING" +-[ ! -e "/usr/include/jpeglib.h" ] && MISSING="libjpeg $MISSING" +-[ ! -e "/usr/include/libexif/exif-loader.h" ] && MISSING="libexif $MISSING" +-[ ! -e "/usr/include/id3tag.h" ] && MISSING="libid3tag $MISSING" +-[ ! -e "/usr/include/ogg/ogg.h" ] && MISSING="libogg $MISSING" +-[ ! -e "/usr/include/vorbis/codec.h" ] && MISSING="libvorbis $MISSING" +-[ ! -e "/usr/include/FLAC/metadata.h" ] && MISSING="libflac $MISSING" +-[ ! -e "/usr/include/ffmpeg/avutil.h" -a \ +- ! -e "/usr/include/libavutil/avutil.h" -a \ +- ! -e "/usr/include/ffmpeg/libavutil/avutil.h" ] && MISSING="libavutil $MISSING" +-[ ! -e "/usr/include/ffmpeg/avformat.h" -a \ +- ! -e "/usr/include/libavformat/avformat.h" -a \ +- ! -e "/usr/include/ffmpeg/libavformat/avformat.h" ] && MISSING="libavformat $MISSING" +-[ ! -e "/usr/include/ffmpeg/avcodec.h" -a \ +- ! -e "/usr/include/libavcodec/avcodec.h" -a \ +- ! -e "/usr/include/ffmpeg/libavcodec/avcodec.h" ] && MISSING="libavcodec $MISSING" ++[ ! -e "$PREFIX/include/sqlite3.h" ] && MISSING="libsqlite3 $MISSING" ++[ ! -e "$PREFIX/include/jpeglib.h" ] && MISSING="libjpeg $MISSING" ++[ ! -e "$PREFIX/include/libexif/exif-loader.h" ] && MISSING="libexif $MISSING" ++[ ! -e "$PREFIX/include/id3tag.h" ] && MISSING="libid3tag $MISSING" ++[ ! -e "$PREFIX/include/ogg/ogg.h" ] && MISSING="libogg $MISSING" ++[ ! -e "$PREFIX/include/vorbis/codec.h" ] && MISSING="libvorbis $MISSING" ++[ ! -e "$PREFIX/include/FLAC/metadata.h" ] && MISSING="libflac $MISSING" ++[ ! -e "$PREFIX/include/ffmpeg/avutil.h" -a \ ++ ! -e "$PREFIX/include/libavutil/avutil.h" -a \ ++ ! -e "$PREFIX/include/ffmpeg/libavutil/avutil.h" ] && MISSING="libavutil $MISSING" ++[ ! -e "$PREFIX/include/ffmpeg/avformat.h" -a \ ++ ! -e "$PREFIX/include/libavformat/avformat.h" -a \ ++ ! -e "$PREFIX/include/ffmpeg/libavformat/avformat.h" ] && MISSING="libavformat $MISSING" ++[ ! -e "$PREFIX/include/ffmpeg/avcodec.h" -a \ ++ ! -e "$PREFIX/include/libavcodec/avcodec.h" -a \ ++ ! -e "$PREFIX/include/ffmpeg/libavcodec/avcodec.h" ] && MISSING="libavcodec $MISSING" + if [ -n "$MISSING" ]; then + echo -e "\nERROR! Cannot continue." + echo -e "The following required libraries are either missing, or are missing development headers:\n" +@@ -88,7 +90,7 @@ case $OS_NAME in + OS_URL=http://www.openbsd.org/ + ;; + FreeBSD) +- VER=`grep '#define __FreeBSD_version' /usr/include/sys/param.h | awk '{print $3}'` ++ VER=`grep '#define __FreeBSD_version' $PREFIX/include/sys/param.h | awk '{print $3}'` + if [ $VER -ge 700049 ]; then + echo "#define PFRULE_INOUT_COUNTS" >> ${CONFIGFILE} + fi +@@ -175,7 +177,7 @@ echo "#define USE_DAEMON" >> ${CONFIGFIL + echo "" >> ${CONFIGFILE} + + echo "/* Enable if the system inotify.h exists. Otherwise our own inotify.h will be used. */" >> ${CONFIGFILE} +-if [ -f /usr/include/sys/inotify.h ]; then ++if [ -f $PREFIX/include/sys/inotify.h ]; then + echo "#define HAVE_INOTIFY_H" >> ${CONFIGFILE} + else + echo "/*#define HAVE_INOTIFY_H*/" >> ${CONFIGFILE} +@@ -183,7 +185,7 @@ fi + echo "" >> ${CONFIGFILE} + + echo "/* Enable if the system iconv.h exists. ID3 tag reading in various character sets will not work properly otherwise. */" >> ${CONFIGFILE} +-if [ -f /usr/include/iconv.h ]; then ++if [ -f $PREFIX/include/iconv.h ]; then + echo "#define HAVE_ICONV_H" >> ${CONFIGFILE} + else + echo -e "\nWARNING!! Iconv support not found. ID3 tag reading may not work." +@@ -192,7 +194,7 @@ fi + echo "" >> ${CONFIGFILE} + + echo "/* Enable if the system libintl.h exists for NLS support. */" >> ${CONFIGFILE} +-if [ -f /usr/include/libintl.h ]; then ++if [ -f $PREFIX/include/libintl.h ]; then + echo "#define ENABLE_NLS" >> ${CONFIGFILE} + else + echo "/*#define ENABLE_NLS*/" >> ${CONFIGFILE} diff --git a/package/minidlna/minidlna-0002-fix-Makefile.patch b/package/minidlna/minidlna-0002-fix-Makefile.patch new file mode 100644 index 0000000000..7d9867ddbe --- /dev/null +++ b/package/minidlna/minidlna-0002-fix-Makefile.patch @@ -0,0 +1,20 @@ +Fix the Makefile. + +N.B. The upstream CVS HEAD has been converted to GNU autotools, but a +tarball has not yet been released. When the next release tarball is made +available, this patch can be removed. + +Signed-off-by: Simon Dawson + +diff -Nurp a/Makefile b/Makefile +--- a/Makefile 2012-01-17 22:49:01.000000000 +0000 ++++ b/Makefile 2013-05-04 22:29:19.947073948 +0100 +@@ -64,7 +64,7 @@ install-conf: + $(INSTALL) -d $(ETCINSTALLDIR) + $(INSTALL) --mode=0644 minidlna.conf $(ETCINSTALLDIR) + +-minidlna: $(BASEOBJS) $(LNXOBJS) $(LIBS) ++minidlna: $(BASEOBJS) $(LNXOBJS) + @echo Linking $@ + @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(BASEOBJS) $(LNXOBJS) $(LIBS) + diff --git a/package/minidlna/minidlna-0003-fix-missing-include.patch b/package/minidlna/minidlna-0003-fix-missing-include.patch new file mode 100644 index 0000000000..124b0da1bf --- /dev/null +++ b/package/minidlna/minidlna-0003-fix-missing-include.patch @@ -0,0 +1,19 @@ +Fix a missing header include, required for S_ISVTX et al. + +N.B. This change is in the upstream CVS HEAD, but is not in the latest +released tarball. When the next release tarball is made available, this +patch can be removed. + +Signed-off-by: Simon Dawson + +diff -Nurp a/minidlna.c b/minidlna.c +--- a/minidlna.c 2012-05-08 01:10:42.000000000 +0100 ++++ b/minidlna.c 2013-05-04 21:28:35.372717737 +0100 +@@ -57,6 +57,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/package/minidlna/minidlna-0004-fix-libavformat-use.patch b/package/minidlna/minidlna-0004-fix-libavformat-use.patch new file mode 100644 index 0000000000..a51262d319 --- /dev/null +++ b/package/minidlna/minidlna-0004-fix-libavformat-use.patch @@ -0,0 +1,20 @@ +Work around a broken test for libavformat version. + +N.B. This change is in the upstream CVS HEAD, but is not in the latest +released tarball. When the next release tarball is made available, this +patch can be removed. + +Signed-off-by: Simon Dawson + +diff -Nurp a/metadata.c b/metadata.c +--- a/metadata.c 2012-06-29 22:11:29.000000000 +0100 ++++ b/metadata.c 2013-05-04 22:22:47.128202396 +0100 +@@ -110,7 +110,7 @@ lav_open(AVFormatContext **ctx, const ch + static inline void + lav_close(AVFormatContext *ctx) + { +-#if LIBAVFORMAT_VERSION_INT >= ((53<<16)+(2<<8)+0) ++#if LIBAVFORMAT_VERSION_INT >= ((53<<16)+(17<<8)+0) + avformat_close_input(&ctx); + #else + av_close_input_file(ctx); diff --git a/package/minidlna/minidlna.mk b/package/minidlna/minidlna.mk new file mode 100644 index 0000000000..c99ade28e2 --- /dev/null +++ b/package/minidlna/minidlna.mk @@ -0,0 +1,64 @@ +################################################################################ +# +# minidlna +# +################################################################################ + +MINIDLNA_VERSION = 1.0.26 +MINIDLNA_SITE = http://downloads.sourceforge.net/project/minidlna/minidlna/$(MINIDLNA_VERSION) +MINIDLNA_LICENSE = GPLv2 BSD-3c +MINIDLNA_LICENSE_FILES = LICENCE LICENCE.miniupnpd + +MINIDLNA_DEPENDENCIES = \ + ffmpeg flac libvorbis libogg libid3tag libexif libjpeg sqlite \ + host-xutil_makedepend + +MINIDLNA_CFLAGS=$(TARGET_CFLAGS) \ + -I"$(STAGING_DIR)/usr/include/libavutil" \ + -I"$(STAGING_DIR)/usr/include/libavcodec" \ + -I"$(STAGING_DIR)/usr/include/libavformat" + +MINIDLNA_COMMON_LIBS = \ + -lpthread -lexif -ljpeg -lsqlite3 -lavformat -lavutil -lavcodec \ + -lid3tag -lFLAC -logg -lvorbis + +ifeq ($(BR2_PACKAGE_GETTEXT),y) +MINIDLNA_DEPENDENCIES += gettext +# we need to link with libintl +MINIDLNA_COMMON_LIBS += -lintl +endif + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +MINIDLNA_DEPENDENCIES += libiconv +MINIDLNA_COMMON_LIBS += -liconv +endif + +MINIDLNA_MAKE_OPTS += LIBS='$(MINIDLNA_COMMON_LIBS)' + +# genconfig.sh uses absolute paths to find libav, so help it out +define MINIDLNA_BUILD_CMDS + PREFIX=$(STAGING_DIR)/usr \ + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(MINIDLNA_CFLAGS)" -C $(@D) depend + $(SED) '/HAVE_LIBAV/d' $(@D)/config.h + echo "#define HAVE_LIBAVUTIL_AVUTIL_H 1" >>$(@D)/config.h + echo "#define HAVE_LIBAVFORMAT_AVFORMAT_H 1" >>$(@D)/config.h + echo "#define HAVE_LIBAVCODEC_AVCODEC_H 1" >>$(@D)/config.h + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(MINIDLNA_CFLAGS)" $(MINIDLNA_MAKE_OPTS) -C $(@D) all +endef + +define MINIDLNA_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +define MINIDLNA_UNINSTALL_TARGET_CMDS + $(RM) $(TARGET_DIR)/usr/sbin/minidlna +endef + +define MINIDLNA_CLEAN_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) clean +endef + +$(eval $(generic-package)) diff --git a/package/mkpasswd/config.h b/package/mkpasswd/config.h new file mode 100644 index 0000000000..f345074121 --- /dev/null +++ b/package/mkpasswd/config.h @@ -0,0 +1,95 @@ +/* Program version */ +#define VERSION "5.0.26" + +/* Configurable features */ + +/* Always hide legal disclaimers */ +#undef ALWAYS_HIDE_DISCL + +/* Default server */ +#define DEFAULTSERVER "whois.arin.net" + +/* Configuration file */ +/* +#define CONFIG_FILE "/etc/whois.conf" +*/ + + +/* autoconf in cpp macros */ +#ifdef linux +# define ENABLE_NLS +#endif + +#ifdef __FreeBSD__ +/* which versions? */ +# define HAVE_GETOPT_LONG +# define HAVE_GETADDRINFO +# define ENABLE_NLS +# ifndef LOCALEDIR +# define LOCALEDIR "/usr/local/share/locale" +# endif +#endif + +/* needs unistd.h */ +#if defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 200112L +# define HAVE_GETADDRINFO +# define HAVE_REGEXEC +#endif + +#if defined __APPLE__ && defined __MACH__ +# define HAVE_GETOPT_LONG +# define HAVE_GETADDRINFO +#endif + +#if defined __GLIBC__ +# define HAVE_GETOPT_LONG +# if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1 +# define HAVE_GETADDRINFO +# endif +# if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 7 +# define HAVE_SHA_CRYPT +# endif +#endif + +/* Unknown versions of Solaris */ +#if defined __SVR4 && defined __sun +# define HAVE_SHA_CRYPT +# define HAVE_SOLARIS_CRYPT_GENSALT +#endif + +/* FIXME: which systems lack this? */ +#define HAVE_GETTIMEOFDAY +/* FIXME: disabled because it does not parse addresses with a netmask length. + * The code using it needs to be either fixed or removed. +#define HAVE_INET_PTON +*/ + +/* + * Please send patches to correctly ignore old releases which lack a RNG + * and add more systems which have one. + */ +#ifdef RANDOM_DEVICE +#elif defined __GLIBC__ \ + || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ \ + /* AIX >= 5.2? */ \ + || defined _AIX52 \ + /* HP-UX >= B.11.11.09? */ \ + || defined __hpux \ + /* OS X: */ \ + || (defined __APPLE__ && defined __MACH__) \ + /* Solaris >= 9 (this is >= 7): */ \ + || (defined __SVR4 && defined __sun && defined SUSv2) \ + /* Tru64 UNIX >= 5.1B? */ \ + || defined __osf +# define RANDOM_DEVICE "/dev/urandom" +#endif + +#ifdef ENABLE_NLS +# ifndef NLS_CAT_NAME +# define NLS_CAT_NAME "whois" +# endif +# ifndef LOCALEDIR +# define LOCALEDIR "/usr/share/locale" +# endif +#endif + diff --git a/package/mkpasswd/mkpasswd.c b/package/mkpasswd/mkpasswd.c new file mode 100644 index 0000000000..5820f32501 --- /dev/null +++ b/package/mkpasswd/mkpasswd.c @@ -0,0 +1,456 @@ +/* + * Copyright (C) 2001-2008 Marco d'Itri + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* for crypt, snprintf and strcasecmp */ +#define _XOPEN_SOURCE +#define _BSD_SOURCE + +/* System library */ +#include +#include +#include +#include "config.h" +#ifdef HAVE_GETOPT_LONG +#include +#endif +#include +#include +#include +#include +#ifdef HAVE_XCRYPT +#include +#include +#endif +#ifdef HAVE_LINUX_CRYPT_GENSALT +#define _OW_SOURCE +#include +#endif +#ifdef HAVE_GETTIMEOFDAY +#include +#endif + +/* Application-specific */ +#include "utils.h" + +/* Global variables */ +#ifdef HAVE_GETOPT_LONG +static const struct option longopts[] = { + {"method", optional_argument, NULL, 'm'}, + /* for backward compatibility with versions < 4.7.25 (< 20080321): */ + {"hash", optional_argument, NULL, 'H'}, + {"help", no_argument, NULL, 'h'}, + {"password-fd", required_argument, NULL, 'P'}, + {"stdin", no_argument, NULL, 's'}, + {"salt", required_argument, NULL, 'S'}, + {"rounds", required_argument, NULL, 'R'}, + {"version", no_argument, NULL, 'V'}, + {NULL, 0, NULL, 0 } +}; +#else +extern char *optarg; +extern int optind; +#endif + +static const char valid_salts[] = "abcdefghijklmnopqrstuvwxyz" +"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./"; + +struct crypt_method { + const char *method; /* short name used by the command line option */ + const char *prefix; /* salt prefix */ + const unsigned int minlen; /* minimum salt length */ + const unsigned int maxlen; /* maximum salt length */ + const unsigned int rounds; /* supports a variable number of rounds */ + const char *desc; /* long description for the methods list */ +}; + +static const struct crypt_method methods[] = { + /* method prefix minlen, maxlen rounds description */ + { "des", "", 2, 2, 0, + N_("standard 56 bit DES-based crypt(3)") }, + { "md5", "$1$", 8, 8, 0, "MD5" }, +#if defined OpenBSD || defined FreeBSD || (defined __SVR4 && defined __sun) + { "bf", "$2a$", 22, 22, 1, "Blowfish" }, +#endif +#if defined HAVE_LINUX_CRYPT_GENSALT + { "bf", "$2a$", 22, 22, 1, "Blowfish, system-specific on 8-bit chars" }, + /* algorithm 2y fixes CVE-2011-2483 */ + { "bfy", "$2y$", 22, 22, 1, "Blowfish, correct handling of 8-bit chars" }, +#endif +#if defined FreeBSD + { "nt", "$3$", 0, 0, 0, "NT-Hash" }, +#endif +#if defined HAVE_SHA_CRYPT + /* http://people.redhat.com/drepper/SHA-crypt.txt */ + { "sha-256", "$5$", 8, 16, 1, "SHA-256" }, + { "sha-512", "$6$", 8, 16, 1, "SHA-512" }, +#endif + /* http://www.crypticide.com/dropsafe/article/1389 */ + /* + * Actually the maximum salt length is arbitrary, but Solaris by default + * always uses 8 characters: + * http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/ \ + * usr/src/lib/crypt_modules/sunmd5/sunmd5.c#crypt_gensalt_impl + */ +#if defined __SVR4 && defined __sun + { "sunmd5", "$md5$", 8, 8, 1, "SunMD5" }, +#endif + { NULL, NULL, 0, 0, 0, NULL } +}; + +void generate_salt(char *const buf, const unsigned int len); +void *get_random_bytes(const int len); +void display_help(int error); +void display_version(void); +void display_methods(void); + +int main(int argc, char *argv[]) +{ + int ch, i; + int password_fd = -1; + unsigned int salt_minlen = 0; + unsigned int salt_maxlen = 0; + unsigned int rounds_support = 0; + const char *salt_prefix = NULL; + const char *salt_arg = NULL; + unsigned int rounds = 0; + char *salt = NULL; + char rounds_str[30]; + char *password = NULL; + +#ifdef ENABLE_NLS + setlocale(LC_ALL, ""); + bindtextdomain(NLS_CAT_NAME, LOCALEDIR); + textdomain(NLS_CAT_NAME); +#endif + + /* prepend options from environment */ + argv = merge_args(getenv("MKPASSWD_OPTIONS"), argv, &argc); + + while ((ch = GETOPT_LONGISH(argc, argv, "hH:m:5P:R:sS:V", longopts, 0)) + > 0) { + switch (ch) { + case '5': + optarg = (char *) "md5"; + /* fall through */ + case 'm': + case 'H': + if (!optarg || strcaseeq("help", optarg)) { + display_methods(); + exit(0); + } + for (i = 0; methods[i].method != NULL; i++) + if (strcaseeq(methods[i].method, optarg)) { + salt_prefix = methods[i].prefix; + salt_minlen = methods[i].minlen; + salt_maxlen = methods[i].maxlen; + rounds_support = methods[i].rounds; + break; + } + if (!salt_prefix) { + fprintf(stderr, _("Invalid method '%s'.\n"), optarg); + exit(1); + } + break; + case 'P': + { + char *p; + password_fd = strtol(optarg, &p, 10); + if (p == NULL || *p != '\0' || password_fd < 0) { + fprintf(stderr, _("Invalid number '%s'.\n"), optarg); + exit(1); + } + } + break; + case 'R': + { + char *p; + rounds = strtol(optarg, &p, 10); + if (p == NULL || *p != '\0' || rounds < 0) { + fprintf(stderr, _("Invalid number '%s'.\n"), optarg); + exit(1); + } + } + break; + case 's': + password_fd = 0; + break; + case 'S': + salt_arg = optarg; + break; + case 'V': + display_version(); + exit(0); + case 'h': + display_help(EXIT_SUCCESS); + default: + fprintf(stderr, _("Try '%s --help' for more information.\n"), + argv[0]); + exit(1); + } + } + argc -= optind; + argv += optind; + + if (argc == 2 && !salt_arg) { + password = argv[0]; + salt_arg = argv[1]; + } else if (argc == 1) { + password = argv[0]; + } else if (argc == 0) { + } else { + display_help(EXIT_FAILURE); + } + + /* default: DES password */ + if (!salt_prefix) { + salt_minlen = methods[0].minlen; + salt_maxlen = methods[0].maxlen; + salt_prefix = methods[0].prefix; + } + + if (streq(salt_prefix, "$2a$") || streq(salt_prefix, "$2y$")) { + /* OpenBSD Blowfish and derivatives */ + if (rounds <= 5) + rounds = 5; + /* actually for 2a/2y it is the logarithm of the number of rounds */ + snprintf(rounds_str, sizeof(rounds_str), "%02u$", rounds); + } else if (rounds_support && rounds) + snprintf(rounds_str, sizeof(rounds_str), "rounds=%u$", rounds); + else + rounds_str[0] = '\0'; + + if (salt_arg) { + unsigned int c = strlen(salt_arg); + if (c < salt_minlen || c > salt_maxlen) { + if (salt_minlen == salt_maxlen) + fprintf(stderr, ngettext( + "Wrong salt length: %d byte when %d expected.\n", + "Wrong salt length: %d bytes when %d expected.\n", c), + c, salt_maxlen); + else + fprintf(stderr, ngettext( + "Wrong salt length: %d byte when %d <= n <= %d" + " expected.\n", + "Wrong salt length: %d bytes when %d <= n <= %d" + " expected.\n", c), + c, salt_minlen, salt_maxlen); + exit(1); + } + while (c-- > 0) { + if (strchr(valid_salts, salt_arg[c]) == NULL) { + fprintf(stderr, _("Illegal salt character '%c'.\n"), + salt_arg[c]); + exit(1); + } + } + + salt = NOFAIL(malloc(strlen(salt_prefix) + strlen(rounds_str) + + strlen(salt_arg) + 1)); + *salt = '\0'; + strcat(salt, salt_prefix); + strcat(salt, rounds_str); + strcat(salt, salt_arg); + } else { +#ifdef HAVE_SOLARIS_CRYPT_GENSALT +#error "This code path is untested on Solaris. Please send a patch." + salt = crypt_gensalt(salt_prefix, NULL); + if (!salt) + perror(stderr, "crypt_gensalt"); +#elif defined HAVE_LINUX_CRYPT_GENSALT + void *entropy = get_random_bytes(64); + + salt = crypt_gensalt(salt_prefix, rounds, entropy, 64); + if (!salt) { + fprintf(stderr, "crypt_gensalt failed.\n"); + exit(2); + } + free(entropy); +#else + unsigned int salt_len = salt_maxlen; + + if (salt_minlen != salt_maxlen) { /* salt length can vary */ + srand(time(NULL) + getpid()); + salt_len = rand() % (salt_maxlen - salt_minlen + 1) + salt_minlen; + } + + salt = NOFAIL(malloc(strlen(salt_prefix) + strlen(rounds_str) + + salt_len + 1)); + *salt = '\0'; + strcat(salt, salt_prefix); + strcat(salt, rounds_str); + generate_salt(salt + strlen(salt), salt_len); +#endif + } + + if (password) { + } else if (password_fd != -1) { + FILE *fp; + char *p; + + if (isatty(password_fd)) + fprintf(stderr, _("Password: ")); + password = NOFAIL(malloc(128)); + fp = fdopen(password_fd, "r"); + if (!fp) { + perror("fdopen"); + exit(2); + } + if (!fgets(password, 128, fp)) { + perror("fgets"); + exit(2); + } + + p = strpbrk(password, "\n\r"); + if (p) + *p = '\0'; + } else { + password = getpass(_("Password: ")); + if (!password) { + perror("getpass"); + exit(2); + } + } + + { + const char *result; + result = crypt(password, salt); + /* xcrypt returns "*0" on errors */ + if (!result || result[0] == '*') { + fprintf(stderr, "crypt failed.\n"); + exit(2); + } + /* yes, using strlen(salt_prefix) on salt. It's not + * documented whether crypt_gensalt may change the prefix */ + if (!strneq(result, salt, strlen(salt_prefix))) { + fprintf(stderr, _("Method not supported by crypt(3).\n")); + exit(2); + } + printf("%s\n", result); + } + + exit(0); +} + +#ifdef RANDOM_DEVICE +void* get_random_bytes(const int count) +{ + char *buf; + int fd; + + buf = NOFAIL(malloc(count)); + fd = open(RANDOM_DEVICE, O_RDONLY); + if (fd < 0) { + perror("open(" RANDOM_DEVICE ")"); + exit(2); + } + if (read(fd, buf, count) != count) { + if (count < 0) + perror("read(" RANDOM_DEVICE ")"); + else + fprintf(stderr, "Short read of %s.\n", RANDOM_DEVICE); + exit(2); + } + close(fd); + + return buf; +} +#endif + +#ifdef RANDOM_DEVICE + +void generate_salt(char *const buf, const unsigned int len) +{ + unsigned int i; + + unsigned char *entropy = get_random_bytes(len * sizeof(unsigned char)); + for (i = 0; i < len; i++) + buf[i] = valid_salts[entropy[i] % (sizeof valid_salts - 1)]; + buf[i] = '\0'; +} + +#else /* RANDOM_DEVICE */ + +void generate_salt(char *const buf, const unsigned int len) +{ + unsigned int i; + +# ifdef HAVE_GETTIMEOFDAY + struct timeval tv; + + gettimeofday(&tv, NULL); + srand(tv.tv_sec ^ tv.tv_usec); + +# else /* HAVE_GETTIMEOFDAY */ +# warning "This system lacks a strong enough random numbers generator!" + + /* + * The possible values of time over one year are 31536000, which is + * two orders of magnitude less than the allowed entropy range (2^32). + */ + srand(time(NULL) + getpid()); + +# endif /* HAVE_GETTIMEOFDAY */ + + for (i = 0; i < len; i++) + buf[i] = valid_salts[rand() % (sizeof valid_salts - 1)]; + buf[i] = '\0'; +} + +#endif /* RANDOM_DEVICE */ + +void display_help(int error) +{ + fprintf((EXIT_SUCCESS == error) ? stdout : stderr, + _("Usage: mkpasswd [OPTIONS]... [PASSWORD [SALT]]\n" + "Crypts the PASSWORD using crypt(3).\n\n")); + fprintf(stderr, _( +" -m, --method=TYPE select method TYPE\n" +" -5 like --method=md5\n" +" -S, --salt=SALT use the specified SALT\n" +" -R, --rounds=NUMBER use the specified NUMBER of rounds\n" +" -P, --password-fd=NUM read the password from file descriptor NUM\n" +" instead of /dev/tty\n" +" -s, --stdin like --password-fd=0\n" +" -h, --help display this help and exit\n" +" -V, --version output version information and exit\n" +"\n" +"If PASSWORD is missing then it is asked interactively.\n" +"If no SALT is specified, a random one is generated.\n" +"If TYPE is 'help', available methods are printed.\n" +"\n" +"Report bugs to %s.\n"), ""); + exit(error); +} + +void display_version(void) +{ + printf("mkpasswd %s\n\n", VERSION); + puts("Copyright (C) 2001-2008 Marco d'Itri\n" +"This is free software; see the source for copying conditions. There is NO\n" +"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."); +} + +void display_methods(void) +{ + unsigned int i; + + printf(_("Available methods:\n")); + for (i = 0; methods[i].method != NULL; i++) + printf("%s\t%s\n", methods[i].method, methods[i].desc); +} + diff --git a/package/mkpasswd/mkpasswd.mk b/package/mkpasswd/mkpasswd.mk new file mode 100644 index 0000000000..dc6de19bc2 --- /dev/null +++ b/package/mkpasswd/mkpasswd.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# mkpasswd +# +################################################################################ + +# source included in buildroot, taken from +# https://github.com/rfc1036/whois/blob/master/ +# at revision 5a0f08500fa51608b6d3b73ee338be38c692eadb +HOST_MKPASSWD_SOURCE = +HOST_MKPASSWD_LICENSE = GPLv2+ + +define HOST_MKPASSWD_BUILD_CMDS + $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) \ + package/mkpasswd/mkpasswd.c package/mkpasswd/utils.c \ + -o $(@D)/mkpasswd -lcrypt +endef + +define HOST_MKPASSWD_INSTALL_CMDS + $(INSTALL) -D -m 755 $(@D)/mkpasswd $(HOST_DIR)/usr/bin/mkpasswd +endef + +$(eval $(host-generic-package)) + +MKPASSWD = $(HOST_DIR)/usr/bin/mkpasswd diff --git a/package/mkpasswd/utils.c b/package/mkpasswd/utils.c new file mode 100644 index 0000000000..254bf2ac68 --- /dev/null +++ b/package/mkpasswd/utils.c @@ -0,0 +1,96 @@ +/* + * Copyright 1999-2008 by Marco d'Itri . + * + * do_nofail and merge_args come from the module-init-tools package. + * Copyright 2001 by Rusty Russell. + * Copyright 2002, 2003 by Rusty Russell, IBM Corporation. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +/* for strdup */ +#define _XOPEN_SOURCE 500 + +/* System library */ +#include +#include +#include +#include +#include + +/* Application-specific */ +#include "utils.h" + +void *do_nofail(void *ptr, const char *file, const int line) +{ + if (ptr) + return ptr; + + err_quit("Memory allocation failure at %s:%d.", file, line); +} + +/* Prepend options from a string. */ +char **merge_args(char *args, char *argv[], int *argc) +{ + char *arg, *argstring; + char **newargs = NULL; + unsigned int i, num_env = 0; + + if (!args) + return argv; + + argstring = NOFAIL(strdup(args)); + for (arg = strtok(argstring, " "); arg; arg = strtok(NULL, " ")) { + num_env++; + newargs = NOFAIL(realloc(newargs, + sizeof(newargs[0]) * (num_env + *argc + 1))); + newargs[num_env] = arg; + } + + if (!newargs) + return argv; + + /* Append commandline args */ + newargs[0] = argv[0]; + for (i = 1; i <= *argc; i++) + newargs[num_env + i] = argv[i]; + + *argc += num_env; + return newargs; +} + +/* Error routines */ +void err_sys(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + vfprintf(stderr, fmt, ap); + fprintf(stderr, ": %s\n", strerror(errno)); + va_end(ap); + exit(2); +} + +void err_quit(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + vfprintf(stderr, fmt, ap); + fputs("\n", stderr); + va_end(ap); + exit(2); +} + diff --git a/package/mkpasswd/utils.h b/package/mkpasswd/utils.h new file mode 100644 index 0000000000..0f226aee2f --- /dev/null +++ b/package/mkpasswd/utils.h @@ -0,0 +1,56 @@ +#ifndef WHOIS_UTILS_H +#define WHOIS_UTILS_H + +/* Convenience macros */ +#define streq(a, b) (strcmp(a, b) == 0) +#define strcaseeq(a, b) (strcasecmp(a, b) == 0) +#define strneq(a, b, n) (strncmp(a, b, n) == 0) +#define strncaseeq(a, b, n) (strncasecmp(a, b, n) == 0) + +#define NOFAIL(ptr) do_nofail((ptr), __FILE__, __LINE__) + +/* Portability macros */ +#ifdef __GNUC__ +# define NORETURN __attribute__((noreturn)) +#else +# define NORETURN +#endif + +#ifndef AI_IDN +# define AI_IDN 0 +#endif + +#ifndef AI_ADDRCONFIG +# define AI_ADDRCONFIG 0 +#endif + +#ifdef HAVE_GETOPT_LONG +# define GETOPT_LONGISH(c, v, o, l, i) getopt_long(c, v, o, l, i) +#else +# define GETOPT_LONGISH(c, v, o, l, i) getopt(c, v, o) +#endif + +#ifdef ENABLE_NLS +# include +# include +# define _(a) (gettext(a)) +# ifdef gettext_noop +# define N_(a) gettext_noop(a) +# else +# define N_(a) (a) +# endif +#else +# define _(a) (a) +# define N_(a) (a) +# define ngettext(a, b, c) ((c==1) ? (a) : (b)) +#endif + + +/* Prototypes */ +void *do_nofail(void *ptr, const char *file, const int line); +char **merge_args(char *args, char *argv[], int *argc); + +void err_quit(const char *fmt, ...) NORETURN; +void err_sys(const char *fmt, ...) NORETURN; + +#endif diff --git a/package/mobile-broadband-provider-info/Config.in b/package/mobile-broadband-provider-info/Config.in new file mode 100644 index 0000000000..dda71056e1 --- /dev/null +++ b/package/mobile-broadband-provider-info/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_MOBILE_BROADBAND_PROVIDER_INFO + bool "mobile-broadband-provider-info" + help + Mobile broadband provider database. + + http://live.gnome.org/NetworkManager/MobileBroadband/ServiceProviders diff --git a/package/mobile-broadband-provider-info/mobile_broadband_provider_info.mk b/package/mobile-broadband-provider-info/mobile_broadband_provider_info.mk new file mode 100644 index 0000000000..431e172470 --- /dev/null +++ b/package/mobile-broadband-provider-info/mobile_broadband_provider_info.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# mobile_broadband_provider_info +# +################################################################################ + +MOBILE_BROADBAND_PROVIDER_INFO_VERSION = 20120614 +MOBILE_BROADBAND_PROVIDER_INFO_SITE = http://ftp.gnome.org/pub/GNOME/sources/mobile-broadband-provider-info/$(MOBILE_BROADBAND_PROVIDER_INFO_VERSION) +MOBILE_BROADBAND_PROVIDER_INFO_SOURCE = mobile-broadband-provider-info-$(MOBILE_BROADBAND_PROVIDER_INFO_VERSION).tar.xz +MOBILE_BROADBAND_PROVIDER_INFO_LICENSE = Public domain +MOBILE_BROADBAND_PROVIDER_INFO_LICENSE_FILES = COPYING +MOBILE_BROADBAND_PROVIDER_INFO_INSTALL_STAGING = YES +MOBILE_BROADBAND_PROVIDER_INFO_DEPENDENCIES = host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/module-init-tools/Config.in b/package/module-init-tools/Config.in deleted file mode 100644 index 77e3bce519..0000000000 --- a/package/module-init-tools/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_MODULE_INIT_TOOLS - bool "module-init-tools" - help - The module-init-tools package contains a set of programs for - loading, inserting, and removing kernel modules for Linux - (versions 2.5.48 and above). It serves the same function that - the "modutils" package serves for Linux 2.4. - - http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/ diff --git a/package/module-init-tools/module-init-tools-3.11-add-manpages-config-option.patch b/package/module-init-tools/module-init-tools-3.11-add-manpages-config-option.patch deleted file mode 100644 index 28f51de112..0000000000 --- a/package/module-init-tools/module-init-tools-3.11-add-manpages-config-option.patch +++ /dev/null @@ -1,47 +0,0 @@ -Disable manual pages generation when docbook2man is not available. - -Signed-off-by: Thomas Petazzoni ---- - Makefile.am | 7 ++++++- - configure.ac | 7 +++---- - 2 files changed, 9 insertions(+), 5 deletions(-) - -Index: module-init-tools-3.11/Makefile.am -=================================================================== ---- module-init-tools-3.11.orig/Makefile.am -+++ module-init-tools-3.11/Makefile.am -@@ -39,7 +39,12 @@ - MAN5 = modprobe.conf.5 modules.dep.5 depmod.conf.5 modprobe.d.5 - MAN8 = depmod.8 insmod.8 lsmod.8 rmmod.8 modprobe.8 modinfo.8 - SGML = $(addprefix doc/, $(MAN5:%.5=%.sgml) $(MAN8:%.8=%.sgml)) --dist_man_MANS = $(MAN5) $(MAN8) -+ -+if HAVE_DOCBOOKTOMAN -+MANPAGES = $(MAN5) $(MAN8) -+endif -+dist_man_MANS = $(MANPAGES) -+ - # If they haven't overridden mandir, fix it (never /man!) - mandir =$(shell if [ @mandir@ = $(prefix)/man ]; then if [ $(prefix) = / ]; then echo /usr/share/man; else echo $(prefix)/share/man; fi; else echo @mandir@; fi) - -Index: module-init-tools-3.11/configure.ac -=================================================================== ---- module-init-tools-3.11.orig/configure.ac -+++ module-init-tools-3.11/configure.ac -@@ -29,13 +29,12 @@ - AC_PROG_CC - AC_PROG_RANLIB - --AC_CHECK_PROGS(DOCBOOKTOMAN, docbook-to-man docbook2man, [no],) --if test x"$DOCBOOKTOMAN" = xno -+AC_CHECK_PROGS(DOCBOOKTOMAN, docbook-to-man docbook2man) -+if test x"$DOCBOOKTOMAN" = x - then - AC_MSG_WARN([docbook2man not found]) -- # fail with a meaningfull error if $DOCBOOKTOMAN called by the makefile -- DOCBOOKTOMAN=docbook2man - fi -+AM_CONDITIONAL([HAVE_DOCBOOKTOMAN], [test "x$DOCBOOKTOMAN" != "x"]) - - # Delay adding the zlib_flags until after AC_PROG_CC, so we can distinguish - # between a broken cc and a working cc but missing libz.a. diff --git a/package/module-init-tools/module-init-tools.mk b/package/module-init-tools/module-init-tools.mk deleted file mode 100644 index 27d01593ea..0000000000 --- a/package/module-init-tools/module-init-tools.mk +++ /dev/null @@ -1,23 +0,0 @@ -############################################################# -# -# module-init-tools -# -############################################################# -MODULE_INIT_TOOLS_VERSION=3.12 -MODULE_INIT_TOOLS_SOURCE=module-init-tools-$(MODULE_INIT_TOOLS_VERSION).tar.bz2 -MODULE_INIT_TOOLS_SITE=$(BR2_KERNEL_MIRROR)/linux/utils/kernel/module-init-tools/ -MODULE_INIT_TOOLS_CONF_ENV = ac_cv_prog_DOCBOOKTOMAN='' -MODULE_INIT_TOOLS_CONF_OPT = \ - --disable-static-utils \ - --disable-builddir \ - --program-transform-name='' - -# module-init-tools-3.11-add-manpages-config-option.patch is modifying -# configure.ac and Makefile.am -MODULE_INIT_TOOLS_AUTORECONF=YES -HOST_MODULE_INIT_TOOLS_AUTORECONF=YES -HOST_MODULE_INIT_TOOLS_CONF_ENV = ac_cv_prog_DOCBOOKTOMAN='' - -$(eval $(call AUTOTARGETS,package,module-init-tools)) -$(eval $(call AUTOTARGETS,package,module-init-tools,host)) - diff --git a/package/mongoose/Config.in b/package/mongoose/Config.in new file mode 100644 index 0000000000..35723dea23 --- /dev/null +++ b/package/mongoose/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_MONGOOSE + bool "mongoose" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + help + Mongoose is a small and easy to use web server + + https://github.com/valenok/mongoose + +comment "mongoose needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/mongoose/S85mongoose b/package/mongoose/S85mongoose new file mode 100755 index 0000000000..dc042d0e2e --- /dev/null +++ b/package/mongoose/S85mongoose @@ -0,0 +1,41 @@ +#!/bin/sh +# +# Start/stop the mongoose HTTP server +# + +set -e + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +NAME=mongoose +DESC="Mongoose HTTP server" + +DAEMON=`which mongoose` +OPTIONS="-num_threads 3 -document_root /var/www -listening_ports 80" + +[ -e /etc/default/mongoose ] && . /etc/default/mongoose + +case "$1" in + start) + echo "Starting $DESC:" + start-stop-daemon -S -x "$DAEMON" -b -- $OPTIONS + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon -K -x "$DAEMON" + echo "$NAME." + ;; + restart|force-reload) + echo -n "Restarting $DESC: " + start-stop-daemon -K -x "$DAEMON" + sleep 1 + start-stop-daemon -S -x "$DAEMON" -b -- $OPTIONS + echo "$NAME." + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/package/mongoose/mongoose.mk b/package/mongoose/mongoose.mk new file mode 100644 index 0000000000..d928dd8077 --- /dev/null +++ b/package/mongoose/mongoose.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# mongoose +# +################################################################################ + +MONGOOSE_VERSION = 3.7 +MONGOOSE_SOURCE = mongoose-$(MONGOOSE_VERSION).tgz +MONGOOSE_SITE = https://mongoose.googlecode.com/files +MONGOOSE_LICENSE = MIT +MONGOOSE_LICENSE_FILES = LICENSE + +MONGOOSE_CFLAGS = $(TARGET_CFLAGS) $(TARGET_LDFLAGS) + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +MONGOOSE_DEPENDENCIES += openssl +# directly linked +MONGOOSE_CFLAGS += -DNO_SSL_DL -lssl -lcrypto -lz +else +MONGOOSE_CFLAGS += -DNO_SSL +endif + +define MONGOOSE_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) \ + linux COPT="$(MONGOOSE_CFLAGS)" +endef + +define MONGOOSE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/mongoose $(TARGET_DIR)/usr/sbin/mongoose + $(INSTALL) -D -m 755 package/mongoose/S85mongoose \ + $(TARGET_DIR)/etc/init.d/S85mongoose +endef + +$(eval $(generic-package)) diff --git a/package/mongrel2/Config.in b/package/mongrel2/Config.in new file mode 100644 index 0000000000..435d97eaff --- /dev/null +++ b/package/mongrel2/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_MONGREL2 + bool "mongrel2" + select BR2_PACKAGE_SQLITE + select BR2_PACKAGE_ZEROMQ + depends on BR2_INSTALL_LIBSTDCPP # zeromq + depends on BR2_INET_IPV6 # zeromq + depends on BR2_TOOLCHAIN_HAS_THREADS # zeromq + depends on BR2_LARGEFILE # zeromq -> util-linux + depends on BR2_USE_WCHAR # zeromq -> util-linux + # {get,make,swap}context functions present in + # {e,}glibc and in uClibc's master branch. Source has arm workaround + depends on BR2_UCLIBC_VERSION_SNAPSHOT || \ + BR2_TOOLCHAIN_USES_GLIBC || \ + BR2_arm + help + Mongrel2 is an application, language, and network architecture + agnostic web server that focuses on web applications using + modern browser technologies. + + Mongrel2 supports 17 languages and platforms, HTTP, Flash + sockets, WebSockets, Long Polling, and many ways to deploy + and hack on it. + + http://www.mongrel2.org diff --git a/package/mongrel2/mongrel2-0001-use-CC-variable-to-compile-procer.patch b/package/mongrel2/mongrel2-0001-use-CC-variable-to-compile-procer.patch new file mode 100644 index 0000000000..310177aef8 --- /dev/null +++ b/package/mongrel2/mongrel2-0001-use-CC-variable-to-compile-procer.patch @@ -0,0 +1,28 @@ +From d30cf797af4828e49fd3c0f25841e669dec05ed5 Mon Sep 17 00:00:00 2001 +From: Lionel Orry +Date: Wed, 27 Mar 2013 14:02:00 +0100 +Subject: [PATCH 3/4] use CC variable to compile procer. + +This fixes procer tool cross-compilation issues. + +Signed-off-by: Lionel Orry +--- + tools/procer/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/procer/Makefile b/tools/procer/Makefile +index d0d7de0..bb9aa31 100644 +--- a/tools/procer/Makefile ++++ b/tools/procer/Makefile +@@ -8,7 +8,7 @@ all: procer + + + procer: ../../build/libm2.a ${OBJECTS} +- gcc $(OPTFLAGS) $(OPTLIBS) -o $@ ${OBJECTS} ../../build/libm2.a ${LIBS} ++ $(CC) $(OPTFLAGS) $(OPTLIBS) -o $@ ${OBJECTS} ../../build/libm2.a ${LIBS} + + clean: + rm -f *.o procer +-- +1.8.1.4 + diff --git a/package/mongrel2/mongrel2-0002-Do-not-run-tests.patch b/package/mongrel2/mongrel2-0002-Do-not-run-tests.patch new file mode 100644 index 0000000000..557c27edd8 --- /dev/null +++ b/package/mongrel2/mongrel2-0002-Do-not-run-tests.patch @@ -0,0 +1,43 @@ +From 3cbef2195533f357c8a80c2840108662461273b7 Mon Sep 17 00:00:00 2001 +From: Lionel Orry +Date: Wed, 27 Mar 2013 14:48:19 +0100 +Subject: [PATCH 4/4] Do not run tests. + +This patch is specific to cross-compiled environments and avoids running +the tests on the host. It is not meant to be applied upstream. + +Signed-off-by: Lionel Orry +--- + Makefile | 2 +- + tools/m2sh/Makefile | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 7dc4089..ca72630 100644 +--- a/Makefile ++++ b/Makefile +@@ -16,7 +16,7 @@ TEST_SRC=$(wildcard tests/*_tests.c) + TESTS=$(patsubst %.c,%,${TEST_SRC}) + MAKEOPTS=OPTFLAGS="${NOEXTCFLAGS} ${OPTFLAGS}" OPTLIBS="${OPTLIBS}" LIBS="${LIBS}" DESTDIR="${DESTDIR}" PREFIX="${PREFIX}" + +-all: bin/mongrel2 tests m2sh procer ++all: bin/mongrel2 m2sh procer filters config_modules + + dev: CFLAGS=-g -Wall -Isrc -Wall -Wextra $(OPTFLAGS) -D_FILE_OFFSET_BITS=64 + dev: all +diff --git a/tools/m2sh/Makefile b/tools/m2sh/Makefile +index b50d8a0..334e4da 100644 +--- a/tools/m2sh/Makefile ++++ b/tools/m2sh/Makefile +@@ -9,7 +9,7 @@ TESTS=$(patsubst %.c,%,${TEST_SRC}) + LIB_SRC=$(filter-out src/m2sh.c,${SOURCES}) + LIB_OBJ=$(filter-out src/m2sh.o,${OBJECTS}) + +-all: ../lemon/lemon tests build/m2sh ++all: ../lemon/lemon build/m2sh + + dev: CFLAGS=-g -Wall -Wextra -Isrc -I../../src $(OPTFLAGS) + dev: all +-- +1.8.1.4 + diff --git a/package/mongrel2/mongrel2-0003-Fix-Makefiles-for-cross-compilation.patch b/package/mongrel2/mongrel2-0003-Fix-Makefiles-for-cross-compilation.patch new file mode 100644 index 0000000000..164d7f9e17 --- /dev/null +++ b/package/mongrel2/mongrel2-0003-Fix-Makefiles-for-cross-compilation.patch @@ -0,0 +1,75 @@ +From 298356c44a7df2b34c4e307c531d2010e2cb4b79 Mon Sep 17 00:00:00 2001 +From: Lionel Orry +Date: Wed, 27 Mar 2013 15:56:56 +0100 +Subject: [PATCH 1/1] Fix Makefiles for cross-compilation + +The CFLAGS handling in mongrel2 is really messy and it is hard to make +it behave correctly with cross-compiling environments. This patch +restricts the Makefiles syntax to GNU Make, but help cross-compiling. + +This is not meant to be applied upstream. + +Signed-off-by: Lionel Orry +--- + Makefile | 2 +- + tools/config_modules/Makefile | 2 +- + tools/filters/Makefile | 2 +- + tools/m2sh/Makefile | 2 +- + tools/procer/Makefile | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/Makefile b/Makefile +index 6dce4a6..d48e05e 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,4 +1,4 @@ +-CFLAGS=-g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG $(OPTFLAGS) -D_FILE_OFFSET_BITS=64 ++override CFLAGS += -g -O2 -Wall -Wextra -Isrc -pthread -rdynamic -DNDEBUG $(OPTFLAGS) -D_FILE_OFFSET_BITS=64 + LIBS=-lzmq -ldl -lsqlite3 $(OPTLIBS) + PREFIX?=/usr/local + +diff --git a/tools/config_modules/Makefile b/tools/config_modules/Makefile +index 398490c..53f2255 100644 +--- a/tools/config_modules/Makefile ++++ b/tools/config_modules/Makefile +@@ -1,5 +1,5 @@ + PREFIX?=/usr/local +-CFLAGS=-I../../src $(OPTFLAGS) -fPIC -shared -nostartfiles -L../../build ++override CFLAGS += -I../../src $(OPTFLAGS) -fPIC -shared -nostartfiles -L../../build + LDFLAGS=$(OPTLIBS) + + MONGO_SRC = mongo-c-driver/src/bson.c \ +diff --git a/tools/filters/Makefile b/tools/filters/Makefile +index f9f4556..6077b79 100644 +--- a/tools/filters/Makefile ++++ b/tools/filters/Makefile +@@ -1,5 +1,5 @@ + PREFIX?=/usr/local +-CFLAGS=-I../../src $(OPTFLAGS) -fPIC -shared -nostartfiles -L../../build ++override CFLAGS += -I../../src $(OPTFLAGS) -fPIC -shared -nostartfiles -L../../build + LDFLAGS=$(OPTLIBS) + + all: null.so +diff --git a/tools/m2sh/Makefile b/tools/m2sh/Makefile +index b50d8a0..ba378c5 100644 +--- a/tools/m2sh/Makefile ++++ b/tools/m2sh/Makefile +@@ -1,4 +1,4 @@ +-CFLAGS=-DNDEBUG -DNO_LINENOS -pthread -g -I../../src -Isrc -Wall $(OPTFLAGS) ++override CFLAGS += -DNDEBUG -DNO_LINENOS -pthread -g -I../../src -Isrc -Wall $(OPTFLAGS) + LIBS=-lzmq -lsqlite3 ../../build/libm2.a $(OPTLIBS) + + PREFIX?=/usr/local +diff --git a/tools/procer/Makefile b/tools/procer/Makefile +index d0d7de0..629b2e9 100644 +--- a/tools/procer/Makefile ++++ b/tools/procer/Makefile +@@ -1,4 +1,4 @@ +-CFLAGS=-DNDEBUG -pthread -g -I../../src -Wall $(OPTFLAGS) ++override CFLAGS += -DNDEBUG -pthread -g -I../../src -Wall $(OPTFLAGS) + PREFIX?=/usr/local + LIBS?=-lzmq + SOURCES=$(wildcard *.c) +-- +1.8.1.4 + diff --git a/package/mongrel2/mongrel2.mk b/package/mongrel2/mongrel2.mk new file mode 100644 index 0000000000..89621deef6 --- /dev/null +++ b/package/mongrel2/mongrel2.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# mongrel2 +# +################################################################################ + +MONGREL2_VERSION = v1.8.0 +MONGREL2_SITE = https://github.com/zedshaw/mongrel2/tarball/$(MONGREL2_VERSION) +MONGREL2_LICENSE = BSD-3c +MONGREL2_LICENSE_FILES = LICENSE +MONGREL2_DEPENDENCIES = sqlite zeromq + +define MONGREL2_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + PREFIX=/usr all +endef + +define MONGREL2_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + PREFIX=/usr DESTDIR=$(TARGET_DIR) install +endef + +define MONGREL2_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/bin/mongrel2 + rm -f $(TARGET_DIR)/usr/bin/m2sh + rm -f $(TARGET_DIR)/usr/bin/procer +endef + +$(eval $(generic-package)) diff --git a/package/monit/Config.in b/package/monit/Config.in new file mode 100644 index 0000000000..b5d4b52fb4 --- /dev/null +++ b/package/monit/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_MONIT + bool "monit" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Monit is a free open source utility for managing and + monitoring, processes, programs, files, directories and + filesystems on a UNIX system. Monit conducts automatic + maintenance and repair and can execute meaningful causal + actions in error situations. + + http://mmonit.com/monit/ + +comment "monit needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/monit/monit.mk b/package/monit/monit.mk new file mode 100644 index 0000000000..ec7c95d897 --- /dev/null +++ b/package/monit/monit.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# monit +# +################################################################################ + +MONIT_VERSION = 5.6 +MONIT_SITE = http://mmonit.com/monit/dist/ +MONIT_LICENSE = AGPLv3 with OpenSSL exception +MONIT_LICENSE_FILES = COPYING + +MONIT_CONF_ENV = \ + libmonit_cv_setjmp_available=yes \ + libmonit_cv_vsnprintf_c99_conformant=yes + +MONIT_CONF_OPT += \ + --without-pam + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +MONIT_CONF_OPT += --with-ssl=$(STAGING_DIR)/usr +MONIT_DEPENDENCIES += openssl +else +MONIT_CONF_OPT += --without-ssl +endif + +ifeq ($(BR2_LARGEFILE),y) +MONIT_CONF_OPT += --with-largefiles +else +MONIT_CONF_OPT += --without-largefiles +endif + +$(eval $(autotools-package)) diff --git a/package/mpc/mpc.mk b/package/mpc/mpc.mk index 8c6d4861ce..1023665fd1 100644 --- a/package/mpc/mpc.mk +++ b/package/mpc/mpc.mk @@ -1,14 +1,15 @@ -############################################################# +################################################################################ # # mpc # -############################################################# +################################################################################ -MPC_VERSION = 0.8.2 -MPC_SITE = http://www.multiprecision.org/mpc/download +MPC_VERSION = 1.0.1 +MPC_SITE = $(BR2_GNU_MIRROR)/mpc +MPC_LICENSE = LGPLv3+ +MPC_LICENSE_FILES = COPYING.LESSER MPC_INSTALL_STAGING = YES MPC_DEPENDENCIES = gmp mpfr -HOST_MPC_DEPENDENCIES = host-gmp host-mpfr -$(eval $(call AUTOTARGETS,package,mpc)) -$(eval $(call AUTOTARGETS,package,mpc,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/mpd/Config.in b/package/mpd/Config.in new file mode 100644 index 0000000000..62bdfa7c52 --- /dev/null +++ b/package/mpd/Config.in @@ -0,0 +1,189 @@ +menuconfig BR2_PACKAGE_MPD + bool "mpd" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + select BR2_PACKAGE_MPD_TREMOR if !(BR2_PACKAGE_MPD_MAD || BR2_PACKAGE_MPD_MPG123 || BR2_PACKAGE_MPD_VORBIS || BR2_PACKAGE_MPD_WAVPACK || BR2_PACKAGE_MPD_FLAC || BR2_PACKAGE_MPD_MUSEPACK || BR2_PACKAGE_MPD_FFMPEG) + help + MPD is a flexible, powerful, server-side application + for playing music. Through plugins and libraries + it can play a variety of sound files while being + controlled by its network protocol. + + http://www.musicpd.org + +if BR2_PACKAGE_MPD + +config BR2_PACKAGE_MPD_ALSA + bool "alsa" + default y + select BR2_PACKAGE_ALSA_LIB + select BR2_PACKAGE_ALSA_LIB_PCM + select BR2_PACKAGE_ALSA_LIB_MIXER + depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib + help + Enable alsa output support. + +config BR2_PACKAGE_MPD_AO + bool "ao" + select BR2_PACKAGE_LIBAO + help + Enable libao output support. + +config BR2_PACKAGE_MPD_AUDIOFILE + bool "audiofile" + select BR2_PACKAGE_AUDIOFILE + help + Enable audiofile input/streaming support. + Select this if you want to play back WAV files. + +config BR2_PACKAGE_MPD_PULSEAUDIO + bool "pulseaudio" + depends on BR2_TOOLCHAIN_HAS_THREADS # pulseaudio + depends on BR2_LARGEFILE # pulseaudio -> libsndfile + select BR2_PACKAGE_PULSEAUDIO + help + Enable pulseaudio output support. + +config BR2_PACKAGE_MPD_BZIP2 + bool "bzip2" + select BR2_PACKAGE_BZIP2 + help + Enable bzip2 archive support. + +config BR2_PACKAGE_MPD_CURL + bool "curl" + select BR2_PACKAGE_LIBCURL + help + Enable curl streaming (http) support. + +config BR2_PACKAGE_MPD_FAAD2 + bool "faad2" + select BR2_PACKAGE_FAAD2 + help + Enable faad2 input support. + Select this if you want to play back MP4/AAC files. + +config BR2_PACKAGE_MPD_FLAC + bool "flac" + select BR2_PACKAGE_FLAC + help + Enable flac input/streaming support. + Select this if you want to play back FLAC files. + +config BR2_PACKAGE_MPD_FFMPEG + bool "ffmpeg" + select BR2_PACKAGE_FFMPEG + depends on BR2_LARGEFILE + depends on BR2_INET_IPV6 + help + Enable ffmpeg input support. + Select this if you want to play back files supported by ffmpeg. + +comment "ffmpeg support needs a toolchain w/ largefile, IPv6" + depends on !(BR2_LARGEFILE && BR2_INET_IPV6) + +config BR2_PACKAGE_MPD_LAME + bool "lame" + select BR2_PACKAGE_LAME + help + Enable lame (mp3) encoding support. + +config BR2_PACKAGE_MPD_LIBCUE + bool "libcue" + select BR2_PACKAGE_LIBCUE + help + Enable cue file support. + +config BR2_PACKAGE_MPD_LIBSAMPLERATE + bool "libsamplerate" + select BR2_PACKAGE_LIBSAMPLERATE + help + Enable libsamplerate input support. + Select this for software sample rate conversion. + +config BR2_PACKAGE_MPD_LIBSNDFILE + bool "libsndfile" + select BR2_PACKAGE_LIBSNDFILE + depends on BR2_LARGEFILE + help + Enable libsndfile input/streaming support. + Select this if you want to play back WAV files. + +comment "mpd-libsndfile needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE + +config BR2_PACKAGE_MPD_MAD + bool "mad" + default y + select BR2_PACKAGE_LIBID3TAG + select BR2_PACKAGE_LIBMAD + help + Enable mad input support. + Select this if you want to play back MP3 files. + +config BR2_PACKAGE_MPD_MPG123 + bool "mpg123" + select BR2_PACKAGE_LIBID3TAG + select BR2_PACKAGE_MPG123 + help + Enable mpg123 input support. + Select this if you want to play back MP3 files. + +config BR2_PACKAGE_MPD_MUSEPACK + bool "musepack" + select BR2_PACKAGE_LIBCUEFILE + select BR2_PACKAGE_LIBREPLAYGAIN + select BR2_PACKAGE_MUSEPACK + help + Enable musepack input support. + Select this if you want to play back MPC files. + +config BR2_PACKAGE_MPD_SQLITE + bool "sqlite" + select BR2_PACKAGE_SQLITE + help + Enable sqlite database support. + If you don't use sqlite it will use an ASCII database. + +config BR2_PACKAGE_MPD_TCP + bool "tcp sockets" + default y + help + Enable mpd to listen on tcp sockets. + + You want this on if mpd and the client(s) work + on different machines (the usual scenario). + +config BR2_PACKAGE_MPD_TREMOR + bool "tremor" + select BR2_PACKAGE_LIBOGG + select BR2_PACKAGE_TREMOR + help + Enable vorbis input support. + Select this if you want to play back OGG files on softfloat targets. + +config BR2_PACKAGE_MPD_VORBIS + bool "vorbis" + select BR2_PACKAGE_LIBOGG + select BR2_PACKAGE_LIBVORBIS + help + Enable vorbis input/streaming support. + Select this if you want to play back OGG files on hardfloat targets. + +config BR2_PACKAGE_MPD_WAVPACK + bool "wavpack" + select BR2_PACKAGE_WAVPACK + help + Enable wavpack input support. + Select this if you want to play back WV files. + +endif + +comment "mpd needs a toolchain w/ C++, threads, wchar" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/multimedia/mpd/S95mpd b/package/mpd/S95mpd similarity index 89% rename from package/multimedia/mpd/S95mpd rename to package/mpd/S95mpd index 7c242f432a..a4f1271cea 100644 --- a/package/multimedia/mpd/S95mpd +++ b/package/mpd/S95mpd @@ -25,6 +25,6 @@ case "$1" in start ;; *) - echo $"Usage: $0 {start|stop|restart}" + echo "Usage: $0 {start|stop|restart}" exit 1 esac diff --git a/package/multimedia/mpd/mpd.conf b/package/mpd/mpd.conf similarity index 93% rename from package/multimedia/mpd/mpd.conf rename to package/mpd/mpd.conf index 1a08ed0ffb..5956b75e24 100644 --- a/package/multimedia/mpd/mpd.conf +++ b/package/mpd/mpd.conf @@ -7,7 +7,7 @@ music_directory "/var/lib/mpd/music" # Directory where user-made playlists are stored (RW) -playlist_directory "/mnt/mpd/playlists" +playlist_directory "/var/lib/mpd/playlists" # Database file (RW) db_file "/var/lib/mpd/database" diff --git a/package/multimedia/mpd/mpd.mk b/package/mpd/mpd.mk similarity index 76% rename from package/multimedia/mpd/mpd.mk rename to package/mpd/mpd.mk index d6658aee5d..d8f344faba 100644 --- a/package/multimedia/mpd/mpd.mk +++ b/package/mpd/mpd.mk @@ -1,12 +1,15 @@ -############################################################# +################################################################################ # # mpd # -############################################################# +################################################################################ -MPD_VERSION = 0.16.1 -MPD_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/musicpd -MPD_DEPENDENCIES = host-pkg-config libglib2 +MPD_VERSION = 0.17.6 +MPD_SOURCE = mpd-$(MPD_VERSION).tar.xz +MPD_SITE = http://www.musicpd.org/download/mpd/stable +MPD_DEPENDENCIES = host-pkgconf libglib2 +MPD_LICENSE = GPLv2 +MPD_LICENSE_FILES = COPYING # Some options need an explicit --disable or --enable @@ -21,6 +24,16 @@ MPD_DEPENDENCIES += libao MPD_CONF_OPT += --enable-ao endif +ifeq ($(BR2_PACKAGE_MPD_AUDIOFILE),y) +MPD_DEPENDENCIES += audiofile +MPD_CONF_OPT += --enable-audiofile +endif + +ifeq ($(BR2_PACKAGE_MPD_PULSEAUDIO),y) +MPD_DEPENDENCIES += pulseaudio +MPD_CONF_OPT += --enable-pulse +endif + ifeq ($(BR2_PACKAGE_MPD_BZIP2),y) MPD_DEPENDENCIES += bzip2 MPD_CONF_OPT += --enable-bzip2 @@ -116,13 +129,13 @@ endif define MPD_INSTALL_EXTRA_FILES @if [ ! -f $(TARGET_DIR)/etc/mpd.conf ]; then \ - $(INSTALL) -D package/multimedia/mpd/mpd.conf \ + $(INSTALL) -D package/mpd/mpd.conf \ $(TARGET_DIR)/etc/mpd.conf; \ fi - $(INSTALL) -m 0755 -D package/multimedia/mpd/S95mpd \ + $(INSTALL) -m 0755 -D package/mpd/S95mpd \ $(TARGET_DIR)/etc/init.d/S95mpd endef MPD_POST_INSTALL_TARGET_HOOKS += MPD_INSTALL_EXTRA_FILES -$(eval $(call AUTOTARGETS,package/multimedia,mpd)) +$(eval $(autotools-package)) diff --git a/package/mpfr/mpfr-3.0.0-p8.patch b/package/mpfr/mpfr-3.0.0-p8.patch deleted file mode 100644 index e521b2e90d..0000000000 --- a/package/mpfr/mpfr-3.0.0-p8.patch +++ /dev/null @@ -1,1950 +0,0 @@ -This is the cumulative patch available at http://www.mpfr.org/mpfr-3.0.0/ -It's recommended by upstream - -Signed-off-by: Gustavo Zacarias ---- -diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES ---- mpfr-3.0.0-a/PATCHES 2010-06-23 11:02:49.000000000 +0000 -+++ mpfr-3.0.0-b/PATCHES 2010-06-23 11:03:36.000000000 +0000 -@@ -0,0 +1 @@ -+mpfr_out_str -diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION ---- mpfr-3.0.0-a/VERSION 2010-06-10 11:00:14.000000000 +0000 -+++ mpfr-3.0.0-b/VERSION 2010-06-23 11:03:20.000000000 +0000 -@@ -1 +1 @@ --3.0.0 -+3.0.0-p1 -diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h ---- mpfr-3.0.0-a/mpfr.h 2010-06-10 11:00:14.000000000 +0000 -+++ mpfr-3.0.0-b/mpfr.h 2010-06-23 11:03:20.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.0.0" -+#define MPFR_VERSION_STRING "3.0.0-p1" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.0.0-a/mpfr.texi mpfr-3.0.0-b/mpfr.texi ---- mpfr-3.0.0-a/mpfr.texi 2010-06-10 11:00:14.000000000 +0000 -+++ mpfr-3.0.0-b/mpfr.texi 2010-06-23 11:03:12.000000000 +0000 -@@ -2050,7 +2050,7 @@ - are printed. If @var{base} is greater than 10, @samp{@@} will be used - instead of @samp{e} as exponent delimiter. - --Return the number of bytes written, or if an error occurred, return 0. -+Return the number of characters written, or if an error occurred, return 0. - @end deftypefun - - @deftypefun size_t mpfr_inp_str (mpfr_t @var{rop}, FILE *@var{stream}, int @var{base}, mpfr_rnd_t @var{rnd}) -diff -Naurd mpfr-3.0.0-a/out_str.c mpfr-3.0.0-b/out_str.c ---- mpfr-3.0.0-a/out_str.c 2010-06-10 11:00:14.000000000 +0000 -+++ mpfr-3.0.0-b/out_str.c 2010-06-23 11:03:12.000000000 +0000 -@@ -22,6 +22,16 @@ - - #include "mpfr-impl.h" - -+/* Warning! S should not contain "%". */ -+#define OUT_STR_RET(S) \ -+ do \ -+ { \ -+ int r; \ -+ r = fprintf (stream, (S)); \ -+ return r < 0 ? 0 : r; \ -+ } \ -+ while (0) -+ - size_t - mpfr_out_str (FILE *stream, int base, size_t n_digits, mpfr_srcptr op, - mpfr_rnd_t rnd_mode) -@@ -29,6 +39,7 @@ - char *s, *s0; - size_t l; - mpfr_exp_t e; -+ int err; - - MPFR_ASSERTN (base >= 2 && base <= 62); - -@@ -36,37 +47,16 @@ - if (stream == NULL) - stream = stdout; - -- if (MPFR_IS_NAN(op)) -- { -- fprintf (stream, "@NaN@"); -- return 3; -- } -- -- if (MPFR_IS_INF(op)) -- { -- if (MPFR_SIGN(op) > 0) -- { -- fprintf (stream, "@Inf@"); -- return 3; -- } -- else -- { -- fprintf (stream, "-@Inf@"); -- return 4; -- } -- } -- -- if (MPFR_IS_ZERO(op)) -+ if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (op))) - { -- if (MPFR_SIGN(op) > 0) -- { -- fprintf(stream, "0"); -- return 1; -- } -+ if (MPFR_IS_NAN (op)) -+ OUT_STR_RET ("@NaN@"); -+ else if (MPFR_IS_INF (op)) -+ OUT_STR_RET (MPFR_IS_POS (op) ? "@Inf@" : "-@Inf@"); - else - { -- fprintf(stream, "-0"); -- return 2; -+ MPFR_ASSERTD (MPFR_IS_ZERO (op)); -+ OUT_STR_RET (MPFR_IS_POS (op) ? "0" : "-0"); - } - } - -@@ -77,21 +67,31 @@ - - l = strlen (s) + 1; /* size of allocated block returned by mpfr_get_str - - may be incorrect, as only an upper bound? */ -- if (*s == '-') -- fputc (*s++, stream); - -- /* outputs mantissa */ -- fputc (*s++, stream); e--; /* leading digit */ -- fputc ((unsigned char) MPFR_DECIMAL_POINT, stream); -- fputs (s, stream); /* rest of mantissa */ -+ /* outputs possible sign and significand */ -+ err = (*s == '-' && fputc (*s++, stream) == EOF) -+ || fputc (*s++, stream) == EOF /* leading digit */ -+ || fputc ((unsigned char) MPFR_DECIMAL_POINT, stream) == EOF -+ || fputs (s, stream) == EOF; /* trailing significand */ - (*__gmp_free_func) (s0, l); -+ if (MPFR_UNLIKELY (err)) -+ return 0; -+ -+ e--; /* due to the leading digit */ - - /* outputs exponent */ - if (e) - { -+ int r; -+ - MPFR_ASSERTN(e >= LONG_MIN); - MPFR_ASSERTN(e <= LONG_MAX); -- l += fprintf (stream, (base <= 10 ? "e%ld" : "@%ld"), (long) e); -+ -+ r = fprintf (stream, (base <= 10 ? "e%ld" : "@%ld"), (long) e); -+ if (MPFR_UNLIKELY (r < 0)) -+ return 0; -+ -+ l += r; - } - - return l; -diff -Naurd mpfr-3.0.0-a/tests/tout_str.c mpfr-3.0.0-b/tests/tout_str.c ---- mpfr-3.0.0-a/tests/tout_str.c 2010-06-10 11:00:13.000000000 +0000 -+++ mpfr-3.0.0-b/tests/tout_str.c 2010-06-23 11:03:12.000000000 +0000 -@@ -46,22 +46,54 @@ - special (void) - { - mpfr_t x; -+ unsigned int n; - - mpfr_init (x); - - mpfr_set_nan (x); -- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ if (n != 5) -+ { -+ printf ("Error: mpfr_out_str (file, 10, 0, NaN, MPFR_RNDN) wrote %u " -+ "characters instead of 5.\n", n); -+ exit (1); -+ } - - mpfr_set_inf (x, 1); -- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ if (n != 5) -+ { -+ printf ("Error: mpfr_out_str (file, 10, 0, +Inf, MPFR_RNDN) wrote %u " -+ "characters instead of 5.\n", n); -+ exit (1); -+ } - - mpfr_set_inf (x, -1); -- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ if (n != 6) -+ { -+ printf ("Error: mpfr_out_str (file, 10, 0, -Inf, MPFR_RNDN) wrote %u " -+ "characters instead of 6.\n", n); -+ exit (1); -+ } - - mpfr_set_ui (x, 0, MPFR_RNDN); -- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ if (n != 1) -+ { -+ printf ("Error: mpfr_out_str (file, 10, 0, +0, MPFR_RNDN) wrote %u " -+ "characters instead of 1.\n", n); -+ exit (1); -+ } -+ - mpfr_neg (x, x, MPFR_RNDN); -- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ if (n != 2) -+ { -+ printf ("Error: mpfr_out_str (file, 10, 0, -0, MPFR_RNDN) wrote %u " -+ "characters instead of 2.\n", n); -+ exit (1); -+ } - - mpfr_clear (x); - } -diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c ---- mpfr-3.0.0-a/version.c 2010-06-10 11:00:14.000000000 +0000 -+++ mpfr-3.0.0-b/version.c 2010-06-23 11:03:20.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.0.0"; -+ return "3.0.0-p1"; - } -diff -Naurd mpfr-3.0.0-a/Makefile.in mpfr-3.0.0-b/Makefile.in ---- mpfr-3.0.0-a/Makefile.in 2010-06-10 11:00:52.000000000 +0000 -+++ mpfr-3.0.0-b/Makefile.in 2010-06-10 11:00:52.000000000 +0000 -@@ -239,6 +239,7 @@ - distuninstallcheck_listfiles = find . -type f -print - distcleancheck_listfiles = find . -type f -print - ACLOCAL = @ACLOCAL@ -+ALLOCA = @ALLOCA@ - AMTAR = @AMTAR@ - AR = @AR@ - AS = @AS@ -diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES ---- mpfr-3.0.0-a/PATCHES 2010-06-23 11:03:36.000000000 +0000 -+++ mpfr-3.0.0-b/PATCHES 2010-06-25 13:23:13.000000000 +0000 -@@ -0,0 +1 @@ -+alloca -diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION ---- mpfr-3.0.0-a/VERSION 2010-06-23 11:03:20.000000000 +0000 -+++ mpfr-3.0.0-b/VERSION 2010-06-25 13:23:13.000000000 +0000 -@@ -1 +1 @@ --3.0.0-p1 -+3.0.0-p2 -diff -Naurd mpfr-3.0.0-a/acinclude.m4 mpfr-3.0.0-b/acinclude.m4 ---- mpfr-3.0.0-a/acinclude.m4 2010-06-10 11:00:14.000000000 +0000 -+++ mpfr-3.0.0-b/acinclude.m4 2010-06-10 11:00:14.000000000 +0000 -@@ -59,6 +59,9 @@ - dnl sys/fpu.h - MIPS specific - AC_CHECK_HEADERS([sys/time.h sys/fpu.h]) - -+dnl Check how to get `alloca' -+AC_FUNC_ALLOCA -+ - dnl SIZE_MAX macro - gl_SIZE_MAX - -diff -Naurd mpfr-3.0.0-a/configure mpfr-3.0.0-b/configure ---- mpfr-3.0.0-a/configure 2010-06-10 11:00:51.000000000 +0000 -+++ mpfr-3.0.0-b/configure 2010-06-25 13:23:05.000000000 +0000 -@@ -783,6 +783,7 @@ - OBJDUMP - DLLTOOL - AS -+ALLOCA - MPFR_LIBM - ANSI2KNR - U -@@ -5622,6 +5623,197 @@ - done - - -+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -+# for constant arguments. Useless! -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 -+$as_echo_n "checking for working alloca.h... " >&6; } -+if test "${ac_cv_working_alloca_h+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+char *p = (char *) alloca (2 * sizeof (int)); -+ if (p) return 0; -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_working_alloca_h=yes -+else -+ ac_cv_working_alloca_h=no -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 -+$as_echo "$ac_cv_working_alloca_h" >&6; } -+if test $ac_cv_working_alloca_h = yes; then -+ -+$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h -+ -+fi -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 -+$as_echo_n "checking for alloca... " >&6; } -+if test "${ac_cv_func_alloca_works+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#ifdef __GNUC__ -+# define alloca __builtin_alloca -+#else -+# ifdef _MSC_VER -+# include -+# define alloca _alloca -+# else -+# ifdef HAVE_ALLOCA_H -+# include -+# else -+# ifdef _AIX -+ #pragma alloca -+# else -+# ifndef alloca /* predefined by HP cc +Olibcalls */ -+char *alloca (); -+# endif -+# endif -+# endif -+# endif -+#endif -+ -+int -+main () -+{ -+char *p = (char *) alloca (1); -+ if (p) return 0; -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_func_alloca_works=yes -+else -+ ac_cv_func_alloca_works=no -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 -+$as_echo "$ac_cv_func_alloca_works" >&6; } -+ -+if test $ac_cv_func_alloca_works = yes; then -+ -+$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h -+ -+else -+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions -+# that cause trouble. Some versions do not even contain alloca or -+# contain a buggy version. If you still want to use their alloca, -+# use ar to extract alloca.o from them instead of compiling alloca.c. -+ -+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext -+ -+$as_echo "#define C_ALLOCA 1" >>confdefs.h -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 -+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -+if test "${ac_cv_os_cray+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#if defined CRAY && ! defined CRAY2 -+webecray -+#else -+wenotbecray -+#endif -+ -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "webecray" >/dev/null 2>&1; then : -+ ac_cv_os_cray=yes -+else -+ ac_cv_os_cray=no -+fi -+rm -f conftest* -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 -+$as_echo "$ac_cv_os_cray" >&6; } -+if test $ac_cv_os_cray = yes; then -+ for ac_func in _getb67 GETB67 getb67; do -+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -+eval as_val=\$$as_ac_var -+ if test "x$as_val" = x""yes; then : -+ -+cat >>confdefs.h <<_ACEOF -+#define CRAY_STACKSEG_END $ac_func -+_ACEOF -+ -+ break -+fi -+ -+ done -+fi -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 -+$as_echo_n "checking stack direction for C alloca... " >&6; } -+if test "${ac_cv_c_stack_direction+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test "$cross_compiling" = yes; then : -+ ac_cv_c_stack_direction=0 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+$ac_includes_default -+int -+find_stack_direction () -+{ -+ static char *addr = 0; -+ auto char dummy; -+ if (addr == 0) -+ { -+ addr = &dummy; -+ return find_stack_direction (); -+ } -+ else -+ return (&dummy > addr) ? 1 : -1; -+} -+ -+int -+main () -+{ -+ return find_stack_direction () < 0; -+} -+_ACEOF -+if ac_fn_c_try_run "$LINENO"; then : -+ ac_cv_c_stack_direction=1 -+else -+ ac_cv_c_stack_direction=-1 -+fi -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -+ conftest.$ac_objext conftest.beam conftest.$ac_ext -+fi -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 -+$as_echo "$ac_cv_c_stack_direction" >&6; } -+cat >>confdefs.h <<_ACEOF -+#define STACK_DIRECTION $ac_cv_c_stack_direction -+_ACEOF -+ -+ -+fi -+ -+ - - for ac_header in stdint.h - do : -@@ -7564,13 +7756,13 @@ - else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext -- (eval echo "\"\$as_me:7567: $ac_compile\"" >&5) -+ (eval echo "\"\$as_me:7759: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 -- (eval echo "\"\$as_me:7570: $NM \\\"conftest.$ac_objext\\\"\"" >&5) -+ (eval echo "\"\$as_me:7762: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 -- (eval echo "\"\$as_me:7573: output\"" >&5) -+ (eval echo "\"\$as_me:7765: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" -@@ -8772,7 +8964,7 @@ - ;; - *-*-irix6*) - # Find out which ABI we are using. -- echo '#line 8775 "configure"' > conftest.$ac_ext -+ echo '#line 8967 "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -@@ -10032,11 +10224,11 @@ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:10035: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:10227: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:10039: \$? = $ac_status" >&5 -+ echo "$as_me:10231: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. -@@ -10371,11 +10563,11 @@ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:10374: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:10566: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:10378: \$? = $ac_status" >&5 -+ echo "$as_me:10570: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. -@@ -10476,11 +10668,11 @@ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:10479: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:10671: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:10483: \$? = $ac_status" >&5 -+ echo "$as_me:10675: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -10531,11 +10723,11 @@ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:10534: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:10726: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:10538: \$? = $ac_status" >&5 -+ echo "$as_me:10730: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -12915,7 +13107,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 12918 "configure" -+#line 13110 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -13011,7 +13203,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 13014 "configure" -+#line 13206 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h ---- mpfr-3.0.0-a/mpfr.h 2010-06-23 11:03:20.000000000 +0000 -+++ mpfr-3.0.0-b/mpfr.h 2010-06-25 13:23:13.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.0.0-p1" -+#define MPFR_VERSION_STRING "3.0.0-p2" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.0.0-a/tests/Makefile.in mpfr-3.0.0-b/tests/Makefile.in ---- mpfr-3.0.0-a/tests/Makefile.in 2010-06-10 11:00:52.000000000 +0000 -+++ mpfr-3.0.0-b/tests/Makefile.in 2010-06-10 11:00:52.000000000 +0000 -@@ -960,6 +960,7 @@ - red=; grn=; lgn=; blu=; std= - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ -+ALLOCA = @ALLOCA@ - AMTAR = @AMTAR@ - AR = @AR@ - AS = @AS@ -diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c ---- mpfr-3.0.0-a/version.c 2010-06-23 11:03:20.000000000 +0000 -+++ mpfr-3.0.0-b/version.c 2010-06-25 13:23:13.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.0.0-p1"; -+ return "3.0.0-p2"; - } -diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES ---- mpfr-3.0.0-a/PATCHES 2010-07-10 00:11:19.000000000 +0000 -+++ mpfr-3.0.0-b/PATCHES 2010-07-10 00:12:50.000000000 +0000 -@@ -0,0 +1 @@ -+gamma_underflow -diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION ---- mpfr-3.0.0-a/VERSION 2010-06-25 13:23:13.000000000 +0000 -+++ mpfr-3.0.0-b/VERSION 2010-07-10 00:11:53.000000000 +0000 -@@ -1 +1 @@ --3.0.0-p2 -+3.0.0-p3 -diff -Naurd mpfr-3.0.0-a/gamma.c mpfr-3.0.0-b/gamma.c ---- mpfr-3.0.0-a/gamma.c 2010-06-10 11:00:14.000000000 +0000 -+++ mpfr-3.0.0-b/gamma.c 2010-07-10 00:11:46.000000000 +0000 -@@ -274,7 +274,7 @@ - /* we want an upper bound for x * [log(2-x)-1]. - since x < 0, we need a lower bound on log(2-x) */ - mpfr_ui_sub (xp, 2, x, MPFR_RNDD); -- mpfr_log (xp, xp, MPFR_RNDD); -+ mpfr_log2 (xp, xp, MPFR_RNDD); - mpfr_sub_ui (xp, xp, 1, MPFR_RNDD); - mpfr_mul (xp, xp, x, MPFR_RNDU); - -@@ -303,8 +303,8 @@ - { - mpfr_sub (tmp, tmp, tmp2, MPFR_RNDZ); /* low bnd on |sin(Pi*(2-x))| */ - mpfr_ui_div (tmp, 12, tmp, MPFR_RNDU); /* upper bound */ -- mpfr_log (tmp, tmp, MPFR_RNDU); -- mpfr_add (tmp, tmp, xp, MPFR_RNDU); -+ mpfr_log2 (tmp, tmp, MPFR_RNDU); -+ mpfr_add (xp, tmp, xp, MPFR_RNDU); - underflow = mpfr_cmp_si (xp, expo.saved_emin - 2) <= 0; - } - -diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h ---- mpfr-3.0.0-a/mpfr.h 2010-06-25 13:23:13.000000000 +0000 -+++ mpfr-3.0.0-b/mpfr.h 2010-07-10 00:11:53.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.0.0-p2" -+#define MPFR_VERSION_STRING "3.0.0-p3" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.0.0-a/tests/tgamma.c mpfr-3.0.0-b/tests/tgamma.c ---- mpfr-3.0.0-a/tests/tgamma.c 2010-06-10 11:00:13.000000000 +0000 -+++ mpfr-3.0.0-b/tests/tgamma.c 2010-07-10 00:11:46.000000000 +0000 -@@ -461,6 +461,20 @@ - mpfr_clear (x); - } - -+/* bug found by Stathis, only occurs on 32-bit machines */ -+static void -+test20100709 (void) -+{ -+ mpfr_t x; -+ int inex; -+ -+ mpfr_init2 (x, 100); -+ mpfr_set_str (x, "-4.6308260837372266e+07", 10, MPFR_RNDN); -+ inex = mpfr_gamma (x, x, MPFR_RNDN); -+ MPFR_ASSERTN(MPFR_IS_ZERO(x) && MPFR_IS_NEG(x) && inex > 0); -+ mpfr_clear (x); -+} -+ - int - main (int argc, char *argv[]) - { -@@ -471,6 +485,7 @@ - test_generic (2, 100, 2); - gamma_integer (); - test20071231 (); -+ test20100709 (); - - data_check ("data/gamma", mpfr_gamma, "mpfr_gamma"); - -diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c ---- mpfr-3.0.0-a/version.c 2010-06-25 13:23:13.000000000 +0000 -+++ mpfr-3.0.0-b/version.c 2010-07-10 00:11:53.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.0.0-p2"; -+ return "3.0.0-p3"; - } -diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES ---- mpfr-3.0.0-a/PATCHES 2010-09-07 08:44:01.000000000 +0000 -+++ mpfr-3.0.0-b/PATCHES 2010-09-07 08:48:46.000000000 +0000 -@@ -0,0 +1 @@ -+mpfr_cmp/set_ui/si -diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION ---- mpfr-3.0.0-a/VERSION 2010-07-10 00:11:53.000000000 +0000 -+++ mpfr-3.0.0-b/VERSION 2010-09-07 08:46:06.000000000 +0000 -@@ -1 +1 @@ --3.0.0-p3 -+3.0.0-p4 -diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h ---- mpfr-3.0.0-a/mpfr.h 2010-07-10 00:11:53.000000000 +0000 -+++ mpfr-3.0.0-b/mpfr.h 2010-09-07 08:46:06.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.0.0-p3" -+#define MPFR_VERSION_STRING "3.0.0-p4" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -@@ -798,35 +798,45 @@ - anyway. Checking with other ICC versions is needed. Possibly detect - whether warnings are produced or not with a configure test. - + Remove C++ too, since it complains too much. */ -+/* Added casts to improve robustness in case of undefined behavior and -+ compiler extensions based on UB (in particular -fwrapv). MPFR doesn't -+ use such extensions, but these macros will be used by 3rd-party code, -+ where such extensions may be required. -+ Moreover casts to unsigned long have been added to avoid warnings in -+ programs that use MPFR and are compiled with -Wconversion; such casts -+ are OK since if X is a constant expression, then (unsigned long) X is -+ also a constant expression, so that the optimizations still work. */ - #if defined (__GNUC__) && !defined(__ICC) && !defined(__cplusplus) - #if (__GNUC__ >= 2) - #undef mpfr_cmp_ui --/* We use the fact that mpfr_sgn on NaN sets the erange flag and returns 0. */ --#define mpfr_cmp_ui(_f,_u) \ -- (__builtin_constant_p (_u) && (_u) == 0 ? \ -- mpfr_sgn (_f) : \ -- mpfr_cmp_ui_2exp ((_f),(_u),0)) -+/* We use the fact that mpfr_sgn on NaN sets the erange flag and returns 0. -+ But warning! mpfr_sgn is specified as a macro in the API, thus the macro -+ mustn't be used if side effects are possible, like here. */ -+#define mpfr_cmp_ui(_f,_u) \ -+ (__builtin_constant_p (_u) && (unsigned long) (_u) == 0 ? \ -+ (mpfr_sgn) (_f) : \ -+ mpfr_cmp_ui_2exp ((_f), (unsigned long) (_u), 0)) - #undef mpfr_cmp_si --#define mpfr_cmp_si(_f,_s) \ -- (__builtin_constant_p (_s) && (_s) >= 0 ? \ -- mpfr_cmp_ui ((_f), (_s)) : \ -- mpfr_cmp_si_2exp ((_f), (_s), 0)) -+#define mpfr_cmp_si(_f,_s) \ -+ (__builtin_constant_p (_s) && (long) (_s) >= 0 ? \ -+ mpfr_cmp_ui ((_f), (unsigned long) (long) (_s)) : \ -+ mpfr_cmp_si_2exp ((_f), (long) (_s), 0)) - #if __GNUC__ > 2 || __GNUC_MINOR__ >= 95 - #undef mpfr_set_ui --#define mpfr_set_ui(_f,_u,_r) \ -- (__builtin_constant_p (_u) && (_u) == 0 ? \ -- __extension__ ({ \ -- mpfr_ptr _p = (_f); \ -- _p->_mpfr_sign = 1; \ -- _p->_mpfr_exp = __MPFR_EXP_ZERO; \ -- (void) (_r); 0; }) : \ -- mpfr_set_ui_2exp ((_f), (_u), 0, (_r))) -+#define mpfr_set_ui(_f,_u,_r) \ -+ (__builtin_constant_p (_u) && (unsigned long) (_u) == 0 ? \ -+ __extension__ ({ \ -+ mpfr_ptr _p = (_f); \ -+ _p->_mpfr_sign = 1; \ -+ _p->_mpfr_exp = __MPFR_EXP_ZERO; \ -+ (void) (_r); 0; }) : \ -+ mpfr_set_ui_2exp ((_f), (unsigned long) (_u), 0, (_r))) - #endif - #undef mpfr_set_si --#define mpfr_set_si(_f,_s,_r) \ -- (__builtin_constant_p (_s) && (_s) >= 0 ? \ -- mpfr_set_ui ((_f), (_s), (_r)) : \ -- mpfr_set_si_2exp ((_f), (_s), 0, (_r))) -+#define mpfr_set_si(_f,_s,_r) \ -+ (__builtin_constant_p (_s) && (long) (_s) >= 0 ? \ -+ mpfr_set_ui ((_f), (unsigned long) (long) (_s), (_r)) : \ -+ mpfr_set_si_2exp ((_f), (long) (_s), 0, (_r))) - #endif - #endif - -diff -Naurd mpfr-3.0.0-a/tests/tcmp_ui.c mpfr-3.0.0-b/tests/tcmp_ui.c ---- mpfr-3.0.0-a/tests/tcmp_ui.c 2010-06-10 11:00:13.000000000 +0000 -+++ mpfr-3.0.0-b/tests/tcmp_ui.c 2010-09-07 08:45:12.000000000 +0000 -@@ -88,6 +88,126 @@ - mpfr_clear (x); - } - -+/* Since mpfr_cmp_ui and mpfr_cmp_si are also implemented by a macro -+ with __builtin_constant_p for GCC, check that side effects are -+ handled correctly. */ -+static void -+check_macros (void) -+{ -+ mpfr_t x; -+ int c; -+ -+ mpfr_init2 (x, 32); -+ -+ c = 0; -+ mpfr_set_ui (x, 17, MPFR_RNDN); -+ if (mpfr_cmp_ui (x, 17) != 0) -+ { -+ printf ("Error 1 on mpfr_cmp_ui(x,17) in check_macros\n"); -+ exit (1); -+ } -+ if (mpfr_cmp_ui (x, (c++, 17)) != 0) -+ { -+ printf ("Error 2 on mpfr_cmp_ui(x,17) in check_macros\n"); -+ exit (1); -+ } -+ if (c != 1) -+ { -+ printf ("Error 3 on mpfr_cmp_ui(x,17) in check_macros\n" -+ "(c = %d instead of 1)\n", c); -+ exit (1); -+ } -+ if (mpfr_cmp_si (x, 17) != 0) -+ { -+ printf ("Error 1 on mpfr_cmp_si(x,17) in check_macros\n"); -+ exit (1); -+ } -+ if (mpfr_cmp_si (x, (c++, 17)) != 0) -+ { -+ printf ("Error 2 on mpfr_cmp_si(x,17) in check_macros\n"); -+ exit (1); -+ } -+ if (c != 2) -+ { -+ printf ("Error 3 on mpfr_cmp_si(x,17) in check_macros\n" -+ "(c = %d instead of 2)\n", c); -+ exit (1); -+ } -+ -+ c = 0; -+ mpfr_set_ui (x, 0, MPFR_RNDN); -+ if (mpfr_cmp_ui (x, 0) != 0) -+ { -+ printf ("Error 1 on mpfr_cmp_ui(x,0) in check_macros\n"); -+ exit (1); -+ } -+ if (mpfr_cmp_ui (x, (c++, 0)) != 0) -+ { -+ printf ("Error 2 on mpfr_cmp_ui(x,0) in check_macros\n"); -+ exit (1); -+ } -+ if (c != 1) -+ { -+ printf ("Error 3 on mpfr_cmp_ui(x,0) in check_macros\n" -+ "(c = %d instead of 1)\n", c); -+ exit (1); -+ } -+ if (mpfr_cmp_si (x, 0) != 0) -+ { -+ printf ("Error 1 on mpfr_cmp_si(x,0) in check_macros\n"); -+ exit (1); -+ } -+ if (mpfr_cmp_si (x, (c++, 0)) != 0) -+ { -+ printf ("Error 2 on mpfr_cmp_si(x,0) in check_macros\n"); -+ exit (1); -+ } -+ if (c != 2) -+ { -+ printf ("Error 3 on mpfr_cmp_si(x,0) in check_macros\n" -+ "(c = %d instead of 2)\n", c); -+ exit (1); -+ } -+ -+ mpfr_clear (x); -+} -+ -+/* Bug in r7114 */ -+static void -+test_macros (void) -+{ -+ mpfr_t x[3]; -+ mpfr_ptr p; -+ -+ mpfr_inits (x[0], x[1], x[2], (mpfr_ptr) 0); -+ mpfr_set_ui (x[0], 0, MPFR_RNDN); -+ p = x[0]; -+ if (mpfr_cmp_ui (p++, 0) != 0) -+ { -+ printf ("Error in mpfr_cmp_ui macro: result should be 0.\n"); -+ exit (1); -+ } -+ if (p != x[1]) -+ { -+ printf ("Error in mpfr_cmp_ui macro: p - x[0] = %d (expecting 1)\n", -+ (int) (p - x[0])); -+ exit (1); -+ } -+ p = x[0]; -+ if (mpfr_cmp_si (p++, 0) != 0) -+ { -+ printf ("Error in mpfr_cmp_si macro: result should be 0.\n"); -+ exit (1); -+ } -+ if (p != x[1]) -+ { -+ printf ("Error in mpfr_cmp_si macro: p - x[0] = %d (expecting 1)\n", -+ (int) (p - x[0])); -+ exit (1); -+ } -+ mpfr_clears (x[0], x[1], x[2], (mpfr_ptr) 0); -+} -+ - int - main (void) - { -@@ -216,6 +336,8 @@ - mpfr_clear (x); - - check_nan (); -+ check_macros (); -+ test_macros (); - - tests_end_mpfr (); - return 0; -diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c ---- mpfr-3.0.0-a/version.c 2010-07-10 00:11:53.000000000 +0000 -+++ mpfr-3.0.0-b/version.c 2010-09-07 08:46:06.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.0.0-p3"; -+ return "3.0.0-p4"; - } -diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES ---- mpfr-3.0.0-a/PATCHES 2010-10-21 20:28:38.000000000 +0000 -+++ mpfr-3.0.0-b/PATCHES 2010-10-21 20:28:38.000000000 +0000 -@@ -0,0 +1 @@ -+tcan_round -diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION ---- mpfr-3.0.0-a/VERSION 2010-09-07 08:46:06.000000000 +0000 -+++ mpfr-3.0.0-b/VERSION 2010-10-21 20:28:38.000000000 +0000 -@@ -1 +1 @@ --3.0.0-p4 -+3.0.0-p5 -diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h ---- mpfr-3.0.0-a/mpfr.h 2010-09-07 08:46:06.000000000 +0000 -+++ mpfr-3.0.0-b/mpfr.h 2010-10-21 20:28:38.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.0.0-p4" -+#define MPFR_VERSION_STRING "3.0.0-p5" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.0.0-a/tests/tcan_round.c mpfr-3.0.0-b/tests/tcan_round.c ---- mpfr-3.0.0-a/tests/tcan_round.c 2010-06-10 11:00:13.000000000 +0000 -+++ mpfr-3.0.0-b/tests/tcan_round.c 2010-10-21 20:28:38.000000000 +0000 -@@ -41,7 +41,7 @@ - /* avoid mpn_random which leaks memory */ - for (i = 0; i < n; i++) - buf[i] = randlimb (); -- p = (mpfr_prec_t) randlimb() % ((n-1) * GMP_NUMB_BITS) + MPFR_PREC_MIN; -+ p = randlimb() % ((n-1) * GMP_NUMB_BITS) + MPFR_PREC_MIN; - err = p + randlimb () % GMP_NUMB_BITS; - r1 = mpfr_round_p (buf, n, err, p); - r2 = mpfr_can_round_raw (buf, n, MPFR_SIGN_POS, err, -diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c ---- mpfr-3.0.0-a/version.c 2010-09-07 08:46:06.000000000 +0000 -+++ mpfr-3.0.0-b/version.c 2010-10-21 20:28:38.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.0.0-p4"; -+ return "3.0.0-p5"; - } -diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES ---- mpfr-3.0.0-a/PATCHES 2010-10-21 20:59:32.000000000 +0000 -+++ mpfr-3.0.0-b/PATCHES 2010-10-21 20:59:32.000000000 +0000 -@@ -0,0 +1 @@ -+mpfr_sub1 -diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION ---- mpfr-3.0.0-a/VERSION 2010-10-21 20:28:38.000000000 +0000 -+++ mpfr-3.0.0-b/VERSION 2010-10-21 20:59:32.000000000 +0000 -@@ -1 +1 @@ --3.0.0-p5 -+3.0.0-p6 -diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h ---- mpfr-3.0.0-a/mpfr.h 2010-10-21 20:28:38.000000000 +0000 -+++ mpfr-3.0.0-b/mpfr.h 2010-10-21 20:59:32.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.0.0-p5" -+#define MPFR_VERSION_STRING "3.0.0-p6" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.0.0-a/sub1.c mpfr-3.0.0-b/sub1.c ---- mpfr-3.0.0-a/sub1.c 2010-06-10 11:00:14.000000000 +0000 -+++ mpfr-3.0.0-b/sub1.c 2010-10-21 20:59:32.000000000 +0000 -@@ -37,7 +37,9 @@ - mp_size_t cancel2, an, bn, cn, cn0; - mp_limb_t *ap, *bp, *cp; - mp_limb_t carry, bb, cc, borrow = 0; -- int inexact, shift_b, shift_c, is_exact = 1, down = 0, add_exp = 0; -+ int inexact, shift_b, shift_c, add_exp = 0; -+ int cmp_low = 0; /* used for rounding to nearest: 0 if low(b) = low(c), -+ negative if low(b) < low(c), positive if low(b)>low(c) */ - int sh, k; - MPFR_TMP_DECL(marker); - -@@ -196,7 +198,8 @@ - } - - #ifdef DEBUG -- printf ("shift_b=%d shift_c=%d diffexp=%lu\n", shift_b, shift_c, -+ printf ("rnd=%s shift_b=%d shift_c=%d diffexp=%lu\n", -+ mpfr_print_rnd_mode (rnd_mode), shift_b, shift_c, - (unsigned long) diff_exp); - #endif - -@@ -307,17 +310,18 @@ - { - if (MPFR_LIKELY(sh)) - { -- is_exact = (carry == 0); - /* can decide except when carry = 2^(sh-1) [middle] - or carry = 0 [truncate, but cannot decide inexact flag] */ -- down = (carry < (MPFR_LIMB_ONE << (sh - 1))); - if (carry > (MPFR_LIMB_ONE << (sh - 1))) - goto add_one_ulp; -- else if ((0 < carry) && down) -+ else if ((0 < carry) && (carry < (MPFR_LIMB_ONE << (sh - 1)))) - { - inexact = -1; /* result if smaller than exact value */ - goto truncate; - } -+ /* now carry = 2^(sh-1), in which case cmp_low=2, -+ or carry = 0, in which case cmp_low=0 */ -+ cmp_low = (carry == 0) ? 0 : 2; - } - } - else /* directed rounding: set rnd_mode to RNDZ iff toward zero */ -@@ -344,12 +348,32 @@ - cn -= (long int) an + cancel2; - - #ifdef DEBUG -- printf ("last %d bits from a are %lu, bn=%ld, cn=%ld\n", -+ printf ("last sh=%d bits from a are %lu, bn=%ld, cn=%ld\n", - sh, (unsigned long) carry, (long) bn, (long) cn); - #endif - -+ /* for rounding to nearest, we couldn't conclude up to here in the following -+ cases: -+ 1. sh = 0, then cmp_low=0: we can either truncate, subtract one ulp -+ or add one ulp: -1 ulp < low(b)-low(c) < 1 ulp -+ 2. sh > 0 but the low sh bits from high(b)-high(c) equal 2^(sh-1): -+ -0.5 ulp <= -1/2^sh < low(b)-low(c)-0.5 < 1/2^sh <= 0.5 ulp -+ we can't decide the rounding, in that case cmp_low=2: -+ either we truncate and flag=-1, or we add one ulp and flag=1 -+ 3. the low sh>0 bits from high(b)-high(c) equal 0: we know we have to -+ truncate but we can't decide the ternary value, here cmp_low=0: -+ -0.5 ulp <= -1/2^sh < low(b)-low(c) < 1/2^sh <= 0.5 ulp -+ we always truncate and inexact can be any of -1,0,1 -+ */ -+ -+ /* note: here cn might exceed cn0, in which case we consider a zero limb */ - for (k = 0; (bn > 0) || (cn > 0); k = 1) - { -+ /* if cmp_low < 0, we know low(b) - low(c) < 0 -+ if cmp_low > 0, we know low(b) - low(c) > 0 -+ (more precisely if cmp_low = 2, low(b) - low(c) = 0.5 ulp so far) -+ if cmp_low = 0, so far low(b) - low(c) = 0 */ -+ - /* get next limbs */ - bb = (bn > 0) ? bp[--bn] : 0; - if ((cn > 0) && (cn-- <= cn0)) -@@ -357,76 +381,115 @@ - else - cc = 0; - -- /* down is set when low(b) < low(c) */ -- if (down == 0) -- down = (bb < cc); -+ /* cmp_low compares low(b) and low(c) */ -+ if (cmp_low == 0) /* case 1 or 3 */ -+ cmp_low = (bb < cc) ? -2+k : (bb > cc) ? 1 : 0; -+ -+ /* Case 1 for k=0 splits into 7 subcases: -+ 1a: bb > cc + half -+ 1b: bb = cc + half -+ 1c: 0 < bb - cc < half -+ 1d: bb = cc -+ 1e: -half < bb - cc < 0 -+ 1f: bb - cc = -half -+ 1g: bb - cc < -half -+ -+ Case 2 splits into 3 subcases: -+ 2a: bb > cc -+ 2b: bb = cc -+ 2c: bb < cc -+ -+ Case 3 splits into 3 subcases: -+ 3a: bb > cc -+ 3b: bb = cc -+ 3c: bb < cc -+ */ - - /* the case rounding to nearest with sh=0 is special since one couldn't - subtract above 1/2 ulp in the trailing limb of the result */ -- if ((rnd_mode == MPFR_RNDN) && sh == 0 && k == 0) -+ if (rnd_mode == MPFR_RNDN && sh == 0 && k == 0) /* case 1 for k=0 */ - { - mp_limb_t half = MPFR_LIMB_HIGHBIT; - -- is_exact = (bb == cc); -- - /* add one ulp if bb > cc + half - truncate if cc - half < bb < cc + half - sub one ulp if bb < cc - half - */ - -- if (down) -+ if (cmp_low < 0) /* bb < cc: -1 ulp < low(b) - low(c) < 0, -+ cases 1e, 1f and 1g */ - { - if (cc >= half) - cc -= half; -- else -+ else /* since bb < cc < half, bb+half < 2*half */ - bb += half; -+ /* now we have bb < cc + half: -+ we have to subtract one ulp if bb < cc, -+ and truncate if bb > cc */ - } -- else /* bb >= cc */ -+ else if (cmp_low >= 0) /* bb >= cc, cases 1a to 1d */ - { - if (cc < half) - cc += half; -- else -+ else /* since bb >= cc >= half, bb - half >= 0 */ - bb -= half; -+ /* now we have bb > cc - half: we have to add one ulp if bb > cc, -+ and truncate if bb < cc */ -+ if (cmp_low > 0) -+ cmp_low = 2; - } - } - - #ifdef DEBUG -- printf (" bb=%lu cc=%lu down=%d is_exact=%d\n", -- (unsigned long) bb, (unsigned long) cc, down, is_exact); -+ printf ("k=%u bb=%lu cc=%lu cmp_low=%d\n", k, -+ (unsigned long) bb, (unsigned long) cc, cmp_low); - #endif -- if (bb < cc) -+ if (cmp_low < 0) /* low(b) - low(c) < 0: either truncate or subtract -+ one ulp */ - { - if (rnd_mode == MPFR_RNDZ) -- goto sub_one_ulp; -+ goto sub_one_ulp; /* set inexact=-1 */ - else if (rnd_mode != MPFR_RNDN) /* round away */ - { - inexact = 1; - goto truncate; - } -- else /* round to nearest: special case here since for sh=k=0 -- bb = bb0 - MPFR_LIMB_HIGHBIT */ -+ else /* round to nearest */ - { -- if (is_exact && sh == 0) -- { -- /* For k=0 we can't decide exactness since it may depend -- from low order bits. -- For k=1, the first low limbs matched: low(b)-low(c)<0. */ -- if (k) -- { -- inexact = 1; -- goto truncate; -- } -- } -- else if (down && sh == 0) -- goto sub_one_ulp; -- else -- { -- inexact = (is_exact) ? 1 : -1; -+ /* If cmp_low < 0 and bb > cc, then -0.5 ulp < low(b)-low(c) < 0, -+ whatever the value of sh. -+ If sh>0, then cmp_low < 0 implies that the initial neglected -+ sh bits were 0 (otherwise cmp_low=2 initially), thus the -+ weight of the new bits is less than 0.5 ulp too. -+ If k > 0 (and sh=0) this means that either the first neglected -+ limbs bb and cc were equal (thus cmp_low was 0 for k=0), -+ or we had bb - cc = -0.5 ulp or 0.5 ulp. -+ The last case is not possible here since we would have -+ cmp_low > 0 which is sticky. -+ In the first case (where we have cmp_low = -1), we truncate, -+ whereas in the 2nd case we have cmp_low = -2 and we subtract -+ one ulp. -+ */ -+ if (bb > cc || sh > 0 || cmp_low == -1) -+ { /* -0.5 ulp < low(b)-low(c) < 0, -+ bb > cc corresponds to cases 1e and 1f1 -+ sh > 0 corresponds to cases 3c and 3b3 -+ cmp_low = -1 corresponds to case 1d3 (also 3b3) */ -+ inexact = 1; - goto truncate; - } -+ else if (bb < cc) /* here sh = 0 and low(b)-low(c) < -0.5 ulp, -+ this corresponds to cases 1g and 1f3 */ -+ goto sub_one_ulp; -+ /* the only case where we can't conclude is sh=0 and bb=cc, -+ i.e., we have low(b) - low(c) = -0.5 ulp (up to now), thus -+ we don't know if we must truncate or subtract one ulp. -+ Note: for sh=0 we can't have low(b) - low(c) = -0.5 ulp up to -+ now, since low(b) - low(c) > 1/2^sh */ - } - } -- else if (bb > cc) -+ else if (cmp_low > 0) /* 0 < low(b) - low(c): either truncate or -+ add one ulp */ - { - if (rnd_mode == MPFR_RNDZ) - { -@@ -437,34 +500,70 @@ - goto add_one_ulp; - else /* round to nearest */ - { -- if (is_exact) -+ if (bb > cc) - { -- inexact = -1; -- goto truncate; -+ /* if sh=0, then bb>cc means that low(b)-low(c) > 0.5 ulp, -+ and similarly when cmp_low=2 */ -+ if (cmp_low == 2) /* cases 1a, 1b1, 2a and 2b1 */ -+ goto add_one_ulp; -+ /* sh > 0 and cmp_low > 0: this implies that the sh initial -+ neglected bits were 0, and the remaining low(b)-low(c)>0, -+ but its weight is less than 0.5 ulp */ -+ else /* 0 < low(b) - low(c) < 0.5 ulp, this corresponds to -+ cases 3a, 1d1 and 3b1 */ -+ { -+ inexact = -1; -+ goto truncate; -+ } - } -- else if (down) -+ else if (bb < cc) /* 0 < low(b) - low(c) < 0.5 ulp, cases 1c, -+ 1b3, 2b3 and 2c */ - { -- inexact = 1; -+ inexact = -1; - goto truncate; - } -- else -- goto add_one_ulp; -+ /* the only case where we can't conclude is bb=cc, i.e., -+ low(b) - low(c) = 0.5 ulp (up to now), thus we don't know -+ if we must truncate or add one ulp. */ - } - } -+ /* after k=0, we cannot conclude in the following cases, we split them -+ according to the values of bb and cc for k=1: -+ 1b. sh=0 and cmp_low = 1 and bb-cc = half [around 0.5 ulp] -+ 1b1. bb > cc: add one ulp, inex = 1 -+ 1b2: bb = cc: cannot conclude -+ 1b3: bb < cc: truncate, inex = -1 -+ 1d. sh=0 and cmp_low = 0 and bb-cc = 0 [around 0] -+ 1d1: bb > cc: truncate, inex = -1 -+ 1d2: bb = cc: cannot conclude -+ 1d3: bb < cc: truncate, inex = +1 -+ 1f. sh=0 and cmp_low = -1 and bb-cc = -half [around -0.5 ulp] -+ 1f1: bb > cc: truncate, inex = +1 -+ 1f2: bb = cc: cannot conclude -+ 1f3: bb < cc: sub one ulp, inex = -1 -+ 2b. sh > 0 and cmp_low = 2 and bb=cc [around 0.5 ulp] -+ 2b1. bb > cc: add one ulp, inex = 1 -+ 2b2: bb = cc: cannot conclude -+ 2b3: bb < cc: truncate, inex = -1 -+ 3b. sh > 0 and cmp_low = 0 [around 0] -+ 3b1. bb > cc: truncate, inex = -1 -+ 3b2: bb = cc: cannot conclude -+ 3b3: bb < cc: truncate, inex = +1 -+ */ - } - -- if ((rnd_mode == MPFR_RNDN) && !is_exact) -+ if ((rnd_mode == MPFR_RNDN) && cmp_low != 0) - { - /* even rounding rule */ - if ((ap[0] >> sh) & 1) - { -- if (down) -+ if (cmp_low < 0) - goto sub_one_ulp; - else - goto add_one_ulp; - } - else -- inexact = (down) ? 1 : -1; -+ inexact = (cmp_low > 0) ? -1 : 1; - } - else - inexact = 0; -diff -Naurd mpfr-3.0.0-a/tests/tfma.c mpfr-3.0.0-b/tests/tfma.c ---- mpfr-3.0.0-a/tests/tfma.c 2010-06-10 11:00:13.000000000 +0000 -+++ mpfr-3.0.0-b/tests/tfma.c 2010-10-21 20:59:32.000000000 +0000 -@@ -337,6 +337,94 @@ - mpfr_clears (x, y, z, r, (mpfr_ptr) 0); - } - -+static void -+bug20101018 (void) -+{ -+ mpfr_t x, y, z, t, u; -+ int i; -+ -+ mpfr_init2 (x, 64); -+ mpfr_init2 (y, 64); -+ mpfr_init2 (z, 64); -+ mpfr_init2 (t, 64); -+ mpfr_init2 (u, 64); -+ -+ mpfr_set_str (x, "0xf.fffffffffffffffp-14766", 16, MPFR_RNDN); -+ mpfr_set_str (y, "-0xf.fffffffffffffffp+317", 16, MPFR_RNDN); -+ mpfr_set_str (z, "0x8.3ffffffffffe3ffp-14443", 16, MPFR_RNDN); -+ mpfr_set_str (t, "0x8.7ffffffffffc7ffp-14444", 16, MPFR_RNDN); -+ i = mpfr_fma (u, x, y, z, MPFR_RNDN); -+ if (mpfr_cmp (u, t) != 0) -+ { -+ printf ("Wrong result in bug20101018 (a)\n"); -+ printf ("Expected "); -+ mpfr_out_str (stdout, 16, 0, t, MPFR_RNDN); -+ printf ("\nGot "); -+ mpfr_out_str (stdout, 16, 0, u, MPFR_RNDN); -+ printf ("\n"); -+ exit (1); -+ } -+ if (i <= 0) -+ { -+ printf ("Wrong ternary value in bug20101018 (a)\n"); -+ printf ("Expected > 0\n"); -+ printf ("Got %d\n", i); -+ exit (1); -+ } -+ -+ mpfr_set_str (x, "-0xf.fffffffffffffffp-11420", 16, MPFR_RNDN); -+ mpfr_set_str (y, "0xf.fffffffffffffffp+9863", 16, MPFR_RNDN); -+ mpfr_set_str (z, "0x8.fffff80ffffffffp-1551", 16, MPFR_RNDN); -+ mpfr_set_str (t, "0x9.fffff01ffffffffp-1552", 16, MPFR_RNDN); -+ i = mpfr_fma (u, x, y, z, MPFR_RNDN); -+ if (mpfr_cmp (u, t) != 0) -+ { -+ printf ("Wrong result in bug20101018 (b)\n"); -+ printf ("Expected "); -+ mpfr_out_str (stdout, 16, 0, t, MPFR_RNDN); -+ printf ("\nGot "); -+ mpfr_out_str (stdout, 16, 0, u, MPFR_RNDN); -+ printf ("\n"); -+ exit (1); -+ } -+ if (i <= 0) -+ { -+ printf ("Wrong ternary value in bug20101018 (b)\n"); -+ printf ("Expected > 0\n"); -+ printf ("Got %d\n", i); -+ exit (1); -+ } -+ -+ mpfr_set_str (x, "0xf.fffffffffffffffp-2125", 16, MPFR_RNDN); -+ mpfr_set_str (y, "-0xf.fffffffffffffffp-6000", 16, MPFR_RNDN); -+ mpfr_set_str (z, "0x8p-8119", 16, MPFR_RNDN); -+ mpfr_set_str (t, "0x8.000000000000001p-8120", 16, MPFR_RNDN); -+ i = mpfr_fma (u, x, y, z, MPFR_RNDN); -+ if (mpfr_cmp (u, t) != 0) -+ { -+ printf ("Wrong result in bug20101018 (c)\n"); -+ printf ("Expected "); -+ mpfr_out_str (stdout, 16, 0, t, MPFR_RNDN); -+ printf ("\nGot "); -+ mpfr_out_str (stdout, 16, 0, u, MPFR_RNDN); -+ printf ("\n"); -+ exit (1); -+ } -+ if (i <= 0) -+ { -+ printf ("Wrong ternary value in bug20101018 (c)\n"); -+ printf ("Expected > 0\n"); -+ printf ("Got %d\n", i); -+ exit (1); -+ } -+ -+ mpfr_clear (x); -+ mpfr_clear (y); -+ mpfr_clear (z); -+ mpfr_clear (t); -+ mpfr_clear (u); -+} -+ - int - main (int argc, char *argv[]) - { -@@ -345,6 +433,8 @@ - - tests_start_mpfr (); - -+ bug20101018 (); -+ - mpfr_init (x); - mpfr_init (s); - mpfr_init (y); -diff -Naurd mpfr-3.0.0-a/tests/tsub.c mpfr-3.0.0-b/tests/tsub.c ---- mpfr-3.0.0-a/tests/tsub.c 2010-06-10 11:00:13.000000000 +0000 -+++ mpfr-3.0.0-b/tests/tsub.c 2010-10-21 20:59:32.000000000 +0000 -@@ -201,6 +201,8 @@ - if (mpfr_cmp (z, x)) - { - printf ("Error in mpfr_sub (2)\n"); -+ printf ("Expected "); mpfr_print_binary (x); puts (""); -+ printf ("Got "); mpfr_print_binary (z); puts (""); - exit (1); - } - mpfr_set_str_binary (x, "1.1110111011110001110111011111111111101000011001011100101100101101"); -@@ -478,6 +480,156 @@ - mpfr_clear (u); - } - -+/* Bug found by Jakub Jelinek -+ * http://bugzilla.redhat.com/643657 -+ * https://gforge.inria.fr/tracker/index.php?func=detail&aid=11301 -+ * The consequence can be either an assertion failure (i = 2 in the -+ * testcase below, in debug mode) or an incorrectly rounded value. -+ */ -+static void -+bug20101017 (void) -+{ -+ mpfr_t a, b, c; -+ int inex; -+ int i; -+ -+ mpfr_init2 (a, GMP_NUMB_BITS * 2); -+ mpfr_init2 (b, GMP_NUMB_BITS); -+ mpfr_init2 (c, GMP_NUMB_BITS); -+ -+ /* a = 2^(2N) + k.2^(2N-1) + 2^N and b = 1 -+ with N = GMP_NUMB_BITS and k = 0 or 1. -+ c = a - b should round to the same value as a. */ -+ -+ for (i = 2; i <= 3; i++) -+ { -+ mpfr_set_ui_2exp (a, i, GMP_NUMB_BITS - 1, MPFR_RNDN); -+ mpfr_add_ui (a, a, 1, MPFR_RNDN); -+ mpfr_mul_2ui (a, a, GMP_NUMB_BITS, MPFR_RNDN); -+ mpfr_set_ui (b, 1, MPFR_RNDN); -+ inex = mpfr_sub (c, a, b, MPFR_RNDN); -+ mpfr_set (b, a, MPFR_RNDN); -+ if (! mpfr_equal_p (c, b)) -+ { -+ printf ("Error in bug20101017 for i = %d.\n", i); -+ printf ("Expected "); -+ mpfr_out_str (stdout, 16, 0, b, MPFR_RNDN); -+ putchar ('\n'); -+ printf ("Got "); -+ mpfr_out_str (stdout, 16, 0, c, MPFR_RNDN); -+ putchar ('\n'); -+ exit (1); -+ } -+ if (inex >= 0) -+ { -+ printf ("Error in bug20101017 for i = %d: bad inex value.\n", i); -+ printf ("Expected negative, got %d.\n", inex); -+ exit (1); -+ } -+ } -+ -+ mpfr_set_prec (a, 64); -+ mpfr_set_prec (b, 129); -+ mpfr_set_prec (c, 2); -+ mpfr_set_str_binary (b, "0.100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001E65"); -+ mpfr_set_str_binary (c, "0.10E1"); -+ inex = mpfr_sub (a, b, c, MPFR_RNDN); -+ if (mpfr_cmp_ui_2exp (a, 1, 64) != 0 || inex >= 0) -+ { -+ printf ("Error in mpfr_sub for b-c for b=2^64+1+2^(-64), c=1\n"); -+ printf ("Expected result 2^64 with inex < 0\n"); -+ printf ("Got "); mpfr_print_binary (a); -+ printf (" with inex=%d\n", inex); -+ exit (1); -+ } -+ -+ mpfr_clears (a, b, c, (mpfr_ptr) 0); -+} -+ -+/* hard test of rounding */ -+static void -+check_rounding (void) -+{ -+ mpfr_t a, b, c, res; -+ mpfr_prec_t p; -+ long k, l; -+ int i; -+ -+#define MAXKL (2 * GMP_NUMB_BITS) -+ for (p = MPFR_PREC_MIN; p <= GMP_NUMB_BITS; p++) -+ { -+ mpfr_init2 (a, p); -+ mpfr_init2 (res, p); -+ mpfr_init2 (b, p + 1 + MAXKL); -+ mpfr_init2 (c, MPFR_PREC_MIN); -+ -+ /* b = 2^p + 1 + 2^(-k), c = 2^(-l) */ -+ for (k = 0; k <= MAXKL; k++) -+ for (l = 0; l <= MAXKL; l++) -+ { -+ mpfr_set_ui_2exp (b, 1, p, MPFR_RNDN); -+ mpfr_add_ui (b, b, 1, MPFR_RNDN); -+ mpfr_mul_2ui (b, b, k, MPFR_RNDN); -+ mpfr_add_ui (b, b, 1, MPFR_RNDN); -+ mpfr_div_2ui (b, b, k, MPFR_RNDN); -+ mpfr_set_ui_2exp (c, 1, -l, MPFR_RNDN); -+ i = mpfr_sub (a, b, c, MPFR_RNDN); -+ /* b - c = 2^p + 1 + 2^(-k) - 2^(-l), should be rounded to -+ 2^p for l <= k, and 2^p+2 for l < k */ -+ if (l <= k) -+ { -+ if (mpfr_cmp_ui_2exp (a, 1, p) != 0) -+ { -+ printf ("Wrong result in check_rounding\n"); -+ printf ("p=%lu k=%ld l=%ld\n", p, k, l); -+ printf ("b="); mpfr_print_binary (b); puts (""); -+ printf ("c="); mpfr_print_binary (c); puts (""); -+ printf ("Expected 2^%lu\n", p); -+ printf ("Got "); mpfr_print_binary (a); puts (""); -+ exit (1); -+ } -+ if (i >= 0) -+ { -+ printf ("Wrong ternary value in check_rounding\n"); -+ printf ("p=%lu k=%ld l=%ld\n", p, k, l); -+ printf ("b="); mpfr_print_binary (b); puts (""); -+ printf ("c="); mpfr_print_binary (c); puts (""); -+ printf ("a="); mpfr_print_binary (a); puts (""); -+ printf ("Expected < 0, got %d\n", i); -+ exit (1); -+ } -+ } -+ else /* l < k */ -+ { -+ mpfr_set_ui_2exp (res, 1, p, MPFR_RNDN); -+ mpfr_add_ui (res, res, 2, MPFR_RNDN); -+ if (mpfr_cmp (a, res) != 0) -+ { -+ printf ("Wrong result in check_rounding\n"); -+ printf ("b="); mpfr_print_binary (b); puts (""); -+ printf ("c="); mpfr_print_binary (c); puts (""); -+ printf ("Expected "); mpfr_print_binary (res); puts (""); -+ printf ("Got "); mpfr_print_binary (a); puts (""); -+ exit (1); -+ } -+ if (i <= 0) -+ { -+ printf ("Wrong ternary value in check_rounding\n"); -+ printf ("b="); mpfr_print_binary (b); puts (""); -+ printf ("c="); mpfr_print_binary (c); puts (""); -+ printf ("Expected > 0, got %d\n", i); -+ exit (1); -+ } -+ } -+ } -+ -+ mpfr_clear (a); -+ mpfr_clear (res); -+ mpfr_clear (b); -+ mpfr_clear (c); -+ } -+} -+ - #define TEST_FUNCTION test_sub - #define TWO_ARGS - #define RAND_FUNCTION(x) mpfr_random2(x, MPFR_LIMB_SIZE (x), randlimb () % 100, RANDS) -@@ -491,6 +643,8 @@ - - tests_start_mpfr (); - -+ bug20101017 (); -+ check_rounding (); - check_diverse (); - check_inexact (); - bug_ddefour (); -diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c ---- mpfr-3.0.0-a/version.c 2010-10-21 20:28:38.000000000 +0000 -+++ mpfr-3.0.0-b/version.c 2010-10-21 20:59:32.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.0.0-p5"; -+ return "3.0.0-p6"; - } -diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES ---- mpfr-3.0.0-a/PATCHES 2010-10-21 21:18:26.000000000 +0000 -+++ mpfr-3.0.0-b/PATCHES 2010-10-21 21:18:26.000000000 +0000 -@@ -0,0 +1 @@ -+mpfr_set_ld -diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION ---- mpfr-3.0.0-a/VERSION 2010-10-21 20:59:32.000000000 +0000 -+++ mpfr-3.0.0-b/VERSION 2010-10-21 21:18:26.000000000 +0000 -@@ -1 +1 @@ --3.0.0-p6 -+3.0.0-p7 -diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h ---- mpfr-3.0.0-a/mpfr.h 2010-10-21 20:59:32.000000000 +0000 -+++ mpfr-3.0.0-b/mpfr.h 2010-10-21 21:18:26.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.0.0-p6" -+#define MPFR_VERSION_STRING "3.0.0-p7" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.0.0-a/set_ld.c mpfr-3.0.0-b/set_ld.c ---- mpfr-3.0.0-a/set_ld.c 2010-06-10 11:00:14.000000000 +0000 -+++ mpfr-3.0.0-b/set_ld.c 2010-10-21 21:18:26.000000000 +0000 -@@ -102,21 +102,25 @@ - { - x /= div13; /* exact */ - shift_exp += 8192; -+ mpfr_div_2si (t, t, 8192, MPFR_RNDZ); - } - if (ABS (x) >= div12) - { - x /= div12; /* exact */ - shift_exp += 4096; -+ mpfr_div_2si (t, t, 4096, MPFR_RNDZ); - } - if (ABS (x) >= div11) - { - x /= div11; /* exact */ - shift_exp += 2048; -+ mpfr_div_2si (t, t, 2048, MPFR_RNDZ); - } - if (ABS (x) >= div10) - { - x /= div10; /* exact */ - shift_exp += 1024; -+ mpfr_div_2si (t, t, 1024, MPFR_RNDZ); - } - /* warning: we may have DBL_MAX=2^1024*(1-2^(-53)) < x < 2^1024, - therefore we have one extra exponent reduction step */ -@@ -124,9 +128,10 @@ - { - x /= div9; /* exact */ - shift_exp += 512; -+ mpfr_div_2si (t, t, 512, MPFR_RNDZ); - } - } /* Check overflow of double */ -- else -+ else /* no overflow on double */ - { - long double div9, div10, div11; - -@@ -149,29 +154,34 @@ - { - x /= div13; /* exact */ - shift_exp -= 8192; -+ mpfr_mul_2si (t, t, 8192, MPFR_RNDZ); - } - if (ABS (x) <= div12) - { - x /= div12; /* exact */ - shift_exp -= 4096; -+ mpfr_mul_2si (t, t, 4096, MPFR_RNDZ); - } - if (ABS (x) <= div11) - { - x /= div11; /* exact */ - shift_exp -= 2048; -+ mpfr_mul_2si (t, t, 2048, MPFR_RNDZ); - } - if (ABS (x) <= div10) - { - x /= div10; /* exact */ - shift_exp -= 1024; -+ mpfr_mul_2si (t, t, 1024, MPFR_RNDZ); - } - if (ABS(x) <= div9) - { - x /= div9; /* exact */ - shift_exp -= 512; -+ mpfr_mul_2si (t, t, 512, MPFR_RNDZ); - } - } -- else -+ else /* no underflow */ - { - inexact = mpfr_set_d (u, (double) x, MPFR_RNDZ); - MPFR_ASSERTD (inexact == 0); -diff -Naurd mpfr-3.0.0-a/tests/tset_ld.c mpfr-3.0.0-b/tests/tset_ld.c ---- mpfr-3.0.0-a/tests/tset_ld.c 2010-06-10 11:00:13.000000000 +0000 -+++ mpfr-3.0.0-b/tests/tset_ld.c 2010-10-21 21:18:26.000000000 +0000 -@@ -147,12 +147,39 @@ - test_fixed_bugs (void) - { - mpfr_t x; -- long double d; -+ long double l, m; - - /* bug found by Steve Kargl (2009-03-14) */ - mpfr_init2 (x, 64); - mpfr_set_ui_2exp (x, 1, -16447, MPFR_RNDN); -- d = mpfr_get_ld (x, MPFR_RNDN); /* an assertion failed in init2.c:50 */ -+ mpfr_get_ld (x, MPFR_RNDN); /* an assertion failed in init2.c:50 */ -+ -+ /* bug reported by Jakub Jelinek (2010-10-17) -+ https://gforge.inria.fr/tracker/?func=detail&aid=11300 */ -+ mpfr_set_prec (x, MPFR_LDBL_MANT_DIG); -+ /* l = 0x1.23456789abcdef0123456789abcdp-914L; */ -+ l = 8.215640181713713164092636634579e-276; -+ mpfr_set_ld (x, l, MPFR_RNDN); -+ m = mpfr_get_ld (x, MPFR_RNDN); -+ if (m != l) -+ { -+ printf ("Error in get_ld o set_ld for l=%Le\n", l); -+ printf ("Got m=%Le instead of l\n", m); -+ exit (1); -+ } -+ -+ /* another similar test which failed with extended double precision and the -+ generic code for mpfr_set_ld */ -+ /* l = 0x1.23456789abcdef0123456789abcdp-968L; */ -+ l = 4.560596445887084662336528403703e-292; -+ mpfr_set_ld (x, l, MPFR_RNDN); -+ m = mpfr_get_ld (x, MPFR_RNDN); -+ if (m != l) -+ { -+ printf ("Error in get_ld o set_ld for l=%Le\n", l); -+ printf ("Got m=%Le instead of l\n", m); -+ exit (1); -+ } - - mpfr_clear (x); - } -diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c ---- mpfr-3.0.0-a/version.c 2010-10-21 20:59:32.000000000 +0000 -+++ mpfr-3.0.0-b/version.c 2010-10-21 21:18:26.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.0.0-p6"; -+ return "3.0.0-p7"; - } -diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES ---- mpfr-3.0.0-a/PATCHES 2010-11-09 15:15:07.000000000 +0000 -+++ mpfr-3.0.0-b/PATCHES 2010-11-09 15:15:07.000000000 +0000 -@@ -0,0 +1 @@ -+macros -diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION ---- mpfr-3.0.0-a/VERSION 2010-10-21 21:18:26.000000000 +0000 -+++ mpfr-3.0.0-b/VERSION 2010-11-09 15:15:07.000000000 +0000 -@@ -1 +1 @@ --3.0.0-p7 -+3.0.0-p8 -diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h ---- mpfr-3.0.0-a/mpfr.h 2010-10-21 21:18:26.000000000 +0000 -+++ mpfr-3.0.0-b/mpfr.h 2010-11-09 15:15:07.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.0.0-p7" -+#define MPFR_VERSION_STRING "3.0.0-p8" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -@@ -67,6 +67,16 @@ - # define _MPFR_H_HAVE_INTMAX_T 1 - #endif - -+/* Avoid some problems with macro expansion if the user defines macros -+ with the same name as keywords. By convention, identifiers and macro -+ names starting with mpfr_ are reserved by MPFR. */ -+typedef void mpfr_void; -+typedef int mpfr_int; -+typedef unsigned int mpfr_uint; -+typedef long mpfr_long; -+typedef unsigned long mpfr_ulong; -+typedef size_t mpfr_size_t; -+ - /* Definition of rounding modes (DON'T USE MPFR_RNDNA!). - Warning! Changing the contents of this enum should be seen as an - interface change since the old and the new types are not compatible -@@ -136,7 +146,7 @@ - typedef mp_exp_t mpfr_exp_t; - - /* Definition of the standard exponent limits */ --#define MPFR_EMAX_DEFAULT ((mpfr_exp_t) (((unsigned long) 1 << 30) - 1)) -+#define MPFR_EMAX_DEFAULT ((mpfr_exp_t) (((mpfr_ulong) 1 << 30) - 1)) - #define MPFR_EMIN_DEFAULT (-(MPFR_EMAX_DEFAULT)) - - /* Definition of the main structure */ -@@ -725,13 +735,13 @@ - unexpected results with future compilers and aggressive optimisations. - Why not working only with signed types, using INT_MIN and LONG_MIN? */ - #if __GMP_MP_SIZE_T_INT --#define __MPFR_EXP_NAN ((mpfr_exp_t)((~((~(unsigned int)0)>>1))+2)) --#define __MPFR_EXP_ZERO ((mpfr_exp_t)((~((~(unsigned int)0)>>1))+1)) --#define __MPFR_EXP_INF ((mpfr_exp_t)((~((~(unsigned int)0)>>1))+3)) -+#define __MPFR_EXP_NAN ((mpfr_exp_t)((~((~(mpfr_uint)0)>>1))+2)) -+#define __MPFR_EXP_ZERO ((mpfr_exp_t)((~((~(mpfr_uint)0)>>1))+1)) -+#define __MPFR_EXP_INF ((mpfr_exp_t)((~((~(mpfr_uint)0)>>1))+3)) - #else --#define __MPFR_EXP_NAN ((mpfr_exp_t)((~((~(unsigned long)0)>>1))+2)) --#define __MPFR_EXP_ZERO ((mpfr_exp_t)((~((~(unsigned long)0)>>1))+1)) --#define __MPFR_EXP_INF ((mpfr_exp_t)((~((~(unsigned long)0)>>1))+3)) -+#define __MPFR_EXP_NAN ((mpfr_exp_t)((~((~(mpfr_ulong)0)>>1))+2)) -+#define __MPFR_EXP_ZERO ((mpfr_exp_t)((~((~(mpfr_ulong)0)>>1))+1)) -+#define __MPFR_EXP_INF ((mpfr_exp_t)((~((~(mpfr_ulong)0)>>1))+3)) - #endif - - /* Define MPFR_USE_EXTENSION to avoid "gcc -pedantic" warnings. */ -@@ -760,9 +770,9 @@ - #define mpfr_inf_p(_x) ((_x)->_mpfr_exp == __MPFR_EXP_INF) - #define mpfr_zero_p(_x) ((_x)->_mpfr_exp == __MPFR_EXP_ZERO) - #define mpfr_regular_p(_x) ((_x)->_mpfr_exp > __MPFR_EXP_INF) --#define mpfr_sgn(_x) \ -- ((_x)->_mpfr_exp < __MPFR_EXP_INF ? \ -- (mpfr_nan_p (_x) ? mpfr_set_erangeflag () : (void) 0), 0 : \ -+#define mpfr_sgn(_x) \ -+ ((_x)->_mpfr_exp < __MPFR_EXP_INF ? \ -+ (mpfr_nan_p (_x) ? mpfr_set_erangeflag () : (mpfr_void) 0), 0 : \ - MPFR_SIGN (_x)) - - /* Prevent them from using as lvalues */ -@@ -805,7 +815,19 @@ - Moreover casts to unsigned long have been added to avoid warnings in - programs that use MPFR and are compiled with -Wconversion; such casts - are OK since if X is a constant expression, then (unsigned long) X is -- also a constant expression, so that the optimizations still work. */ -+ also a constant expression, so that the optimizations still work. The -+ warnings are probably related to the following two bugs: -+ http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210 -+ http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38470 (possibly a variant) -+ and the casts could be removed once these bugs are fixed. -+ Casts shouldn't be used on the generic calls (to the ..._2exp functions), -+ where implicit conversions are performed. Indeed, having at least one -+ implicit conversion in the macro allows the compiler to emit diagnostics -+ when normally expected, for instance in the following call: -+ mpfr_set_ui (x, "foo", MPFR_RNDN); -+ If this is not possible (for future macros), one of the tricks described -+ on http://groups.google.com/group/comp.std.c/msg/e92abd24bf9eaf7b could -+ be used. */ - #if defined (__GNUC__) && !defined(__ICC) && !defined(__cplusplus) - #if (__GNUC__ >= 2) - #undef mpfr_cmp_ui -@@ -813,45 +835,45 @@ - But warning! mpfr_sgn is specified as a macro in the API, thus the macro - mustn't be used if side effects are possible, like here. */ - #define mpfr_cmp_ui(_f,_u) \ -- (__builtin_constant_p (_u) && (unsigned long) (_u) == 0 ? \ -+ (__builtin_constant_p (_u) && (mpfr_ulong) (_u) == 0 ? \ - (mpfr_sgn) (_f) : \ -- mpfr_cmp_ui_2exp ((_f), (unsigned long) (_u), 0)) -+ mpfr_cmp_ui_2exp ((_f), (_u), 0)) - #undef mpfr_cmp_si --#define mpfr_cmp_si(_f,_s) \ -- (__builtin_constant_p (_s) && (long) (_s) >= 0 ? \ -- mpfr_cmp_ui ((_f), (unsigned long) (long) (_s)) : \ -- mpfr_cmp_si_2exp ((_f), (long) (_s), 0)) -+#define mpfr_cmp_si(_f,_s) \ -+ (__builtin_constant_p (_s) && (mpfr_long) (_s) >= 0 ? \ -+ mpfr_cmp_ui ((_f), (mpfr_ulong) (mpfr_long) (_s)) : \ -+ mpfr_cmp_si_2exp ((_f), (_s), 0)) - #if __GNUC__ > 2 || __GNUC_MINOR__ >= 95 - #undef mpfr_set_ui - #define mpfr_set_ui(_f,_u,_r) \ -- (__builtin_constant_p (_u) && (unsigned long) (_u) == 0 ? \ -+ (__builtin_constant_p (_u) && (mpfr_ulong) (_u) == 0 ? \ - __extension__ ({ \ - mpfr_ptr _p = (_f); \ - _p->_mpfr_sign = 1; \ - _p->_mpfr_exp = __MPFR_EXP_ZERO; \ -- (void) (_r); 0; }) : \ -- mpfr_set_ui_2exp ((_f), (unsigned long) (_u), 0, (_r))) -+ (mpfr_void) (_r); 0; }) : \ -+ mpfr_set_ui_2exp ((_f), (_u), 0, (_r))) - #endif - #undef mpfr_set_si - #define mpfr_set_si(_f,_s,_r) \ -- (__builtin_constant_p (_s) && (long) (_s) >= 0 ? \ -- mpfr_set_ui ((_f), (unsigned long) (long) (_s), (_r)) : \ -- mpfr_set_si_2exp ((_f), (long) (_s), 0, (_r))) -+ (__builtin_constant_p (_s) && (mpfr_long) (_s) >= 0 ? \ -+ mpfr_set_ui ((_f), (mpfr_ulong) (mpfr_long) (_s), (_r)) : \ -+ mpfr_set_si_2exp ((_f), (_s), 0, (_r))) - #endif - #endif - - /* Macro version of mpfr_stack interface for fast access */ --#define mpfr_custom_get_size(p) ((size_t) \ -+#define mpfr_custom_get_size(p) ((mpfr_size_t) \ - (((p)+GMP_NUMB_BITS-1)/GMP_NUMB_BITS*sizeof (mp_limb_t))) - #define mpfr_custom_init(m,p) do {} while (0) --#define mpfr_custom_get_significand(x) ((void*)((x)->_mpfr_d)) -+#define mpfr_custom_get_significand(x) ((mpfr_void*)((x)->_mpfr_d)) - #define mpfr_custom_get_exp(x) ((x)->_mpfr_exp) - #define mpfr_custom_move(x,m) do { ((x)->_mpfr_d = (mp_limb_t*)(m)); } while (0) - #define mpfr_custom_init_set(x,k,e,p,m) do { \ - mpfr_ptr _x = (x); \ - mpfr_exp_t _e; \ - mpfr_kind_t _t; \ -- int _s, _k; \ -+ mpfr_int _s, _k; \ - _k = (k); \ - if (_k >= 0) { \ - _t = (mpfr_kind_t) _k; \ -@@ -868,11 +890,13 @@ - _x->_mpfr_exp = _e; \ - _x->_mpfr_d = (mp_limb_t*) (m); \ - } while (0) --#define mpfr_custom_get_kind(x) \ -- ( (x)->_mpfr_exp > __MPFR_EXP_INF ? (int)MPFR_REGULAR_KIND*MPFR_SIGN (x) \ -- : (x)->_mpfr_exp == __MPFR_EXP_INF ? (int)MPFR_INF_KIND*MPFR_SIGN (x) \ -- : (x)->_mpfr_exp == __MPFR_EXP_NAN ? (int)MPFR_NAN_KIND \ -- : (int) MPFR_ZERO_KIND * MPFR_SIGN (x) ) -+#define mpfr_custom_get_kind(x) \ -+ ( (x)->_mpfr_exp > __MPFR_EXP_INF ? \ -+ (mpfr_int) MPFR_REGULAR_KIND * MPFR_SIGN (x) \ -+ : (x)->_mpfr_exp == __MPFR_EXP_INF ? \ -+ (mpfr_int) MPFR_INF_KIND * MPFR_SIGN (x) \ -+ : (x)->_mpfr_exp == __MPFR_EXP_NAN ? (mpfr_int) MPFR_NAN_KIND \ -+ : (mpfr_int) MPFR_ZERO_KIND * MPFR_SIGN (x) ) - - - #endif /* MPFR_USE_NO_MACRO */ -diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c ---- mpfr-3.0.0-a/version.c 2010-10-21 21:18:26.000000000 +0000 -+++ mpfr-3.0.0-b/version.c 2010-11-09 15:15:07.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.0.0-p7"; -+ return "3.0.0-p8"; - } diff --git a/package/mpfr/mpfr.mk b/package/mpfr/mpfr.mk index 15ee48ad57..52d88fecb5 100644 --- a/package/mpfr/mpfr.mk +++ b/package/mpfr/mpfr.mk @@ -1,16 +1,17 @@ -############################################################# +################################################################################ # # mpfr # -############################################################# +################################################################################ -MPFR_VERSION = 3.0.0 +MPFR_VERSION = 3.1.2 MPFR_SITE = http://www.mpfr.org/mpfr-$(MPFR_VERSION) -MPFR_SOURCE = mpfr-$(MPFR_VERSION).tar.bz2 +MPFR_SOURCE = mpfr-$(MPFR_VERSION).tar.xz +MPFR_LICENSE = LGPLv3+ +MPFR_LICENSE_FILES = COPYING.LESSER MPFR_INSTALL_STAGING = YES MPFR_DEPENDENCIES = gmp MPFR_MAKE_OPT = RANLIB=$(TARGET_RANLIB) -HOST_MPFR_DEPENDENCIES = host-gmp -$(eval $(call AUTOTARGETS,package,mpfr)) -$(eval $(call AUTOTARGETS,package,mpfr,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/multimedia/mpg123/Config.in b/package/mpg123/Config.in similarity index 100% rename from package/multimedia/mpg123/Config.in rename to package/mpg123/Config.in diff --git a/package/mpg123/mpg123.mk b/package/mpg123/mpg123.mk new file mode 100644 index 0000000000..333224978e --- /dev/null +++ b/package/mpg123/mpg123.mk @@ -0,0 +1,68 @@ +################################################################################ +# +# mpg123 +# +################################################################################ + +MPG123_VERSION = 1.16.0 +MPG123_SOURCE = mpg123-$(MPG123_VERSION).tar.bz2 +MPG123_SITE = http://downloads.sourceforge.net/project/mpg123/mpg123/$(MPG123_VERSION) +MPG123_CONF_OPT = --with-optimization=0 --disable-lfs-alias +MPG123_INSTALL_STAGING = YES +MPG123_LICENSE = LGPLv2.1 +MPG123_LICENSE_FILES = COPYING + +MPG123_CPU = $(if $(BR2_SOFT_FLOAT),generic_nofpu,generic_fpu) + +ifeq ($(BR2_arm),y) +MPG123_CPU = arm_nofpu +endif + +ifeq ($(BR2_i386),y) +MPG123_CPU = x86 +endif + +ifeq ($(BR2_powerpc),y) +ifneq ($(BR2_powerpc_7400)$(BR2_powerpc_7450)$(BR2_powerpc_970),) +MPG123_CPU = altivec +endif +ifeq ($(BR2_SOFT_FLOAT),y) +MPG123_CPU = ppc_nofpu +endif +endif + +ifeq ($(BR2_x86_64),y) +MPG123_CPU = x86-64 +endif + +MPG123_CONF_OPT += --with-cpu=$(MPG123_CPU) + +MPG123_AUDIO = dummy oss + +ifeq ($(BR2_PACKAGE_PORTAUDIO),y) +MPG123_AUDIO += portaudio +MPG123_CONF_OPT += --with-default-audio=portaudio +MPG123_DEPENDENCIES += portaudio +endif + +ifeq ($(BR2_PACKAGE_SDL),y) +MPG123_AUDIO += sdl +MPG123_CONF_OPT += --with-default-audio=sdl +MPG123_DEPENDENCIES += sdl +endif + +ifeq ($(BR2_PACKAGE_ALSA_LIB),y) +MPG123_AUDIO += alsa +MPG123_CONF_OPT += --with-default-audio=alsa +MPG123_DEPENDENCIES += alsa-lib +endif + +MPG123_CONF_OPT += --with-audio=$(shell echo $(MPG123_AUDIO) | tr ' ' ,) + +ifeq ($(BR2_PACKAGE_LIBTOOL),y) +MPG123_DEPENDENCIES += libtool +# .la files gets stripped , so directly load .so files rather than .la +MPG123_CONF_OPT += --with-modules --with-module-suffix=.so +endif + +$(eval $(autotools-package)) diff --git a/package/mplayer/Config.in b/package/mplayer/Config.in new file mode 100644 index 0000000000..c8f1480883 --- /dev/null +++ b/package/mplayer/Config.in @@ -0,0 +1,34 @@ +config BR2_PACKAGE_MPLAYER + bool "mplayer" + # Those architectures are not supported by MPlayer + depends on !(BR2_sh2 || BR2_sh2a || BR2_sh4a || BR2_sh4aeb \ + || BR2_microblaze || BR2_aarch64 || BR2_nios2) + # Broken support for rtime = ((tr.tv_sec + JAN_1970) << 16) + - (tr.tv_usec << 10) / 15625; - save->len = len; -- bcopy((char *)igmp, (char *)&save->igmp, ipdatalen); -+ memmove((char *)igmp, (char *)&save->igmp, ipdatalen); - } - return recvlen; - } -@@ -646,7 +646,7 @@ - base.rtime = ((tr.tv_sec + JAN_1970) << 16) + - (tr.tv_usec << 10) / 15625; - base.len = len; -- bcopy((char *)igmp, (char *)&base.igmp, ipdatalen); -+ memmove((char *)igmp, (char *)&base.igmp, ipdatalen); - /* - * If the user specified which traces to monitor, - * only accept traces that correspond to the diff --git a/package/mrouted/mrouted-3.9.4-makefile-flags.patch b/package/mrouted/mrouted-3.9.4-makefile-flags.patch deleted file mode 100644 index 932bec006c..0000000000 --- a/package/mrouted/mrouted-3.9.4-makefile-flags.patch +++ /dev/null @@ -1,64 +0,0 @@ ---- - Makefile | 20 +++++++++----------- - 1 file changed, 9 insertions(+), 11 deletions(-) - -Index: mrouted-3.9.4/Makefile -=================================================================== ---- mrouted-3.9.4.orig/Makefile -+++ mrouted-3.9.4/Makefile -@@ -42,11 +42,9 @@ - #MSTAT_OBJS = mstat.o $(EXTRA_OBJS) - - ## Common --CFLAGS = $(MCAST_INCLUDE) $(SNMPDEF) $(RSRRDEF) $(INCLUDES) $(DEFS) $(USERCOMPILE) --CFLAGS += -O2 -W -Wall -Werror --#CFLAGS += -O -g --LDLIBS = $(SNMPLIBDIR) $(SNMPLIBS) $(EXTRA_LIBS) --LDFLAGS += -Wl,-Map,$@.map -+MROUTED_CFLAGS = $(MCAST_INCLUDE) $(SNMPDEF) $(RSRRDEF) $(INCLUDES) $(DEFS) $(USERCOMPILE) -+LDLIBS = $(SNMPLIBDIR) $(SNMPLIBS) $(EXTRA_LIBS) -+MROUTED_LDFLAGS += -Wl,-Map,$@.map - OBJS = $(IGMP_OBJS) $(ROUTER_OBJS) $(MAPPER_OBJS) $(MRINFO_OBJS) \ - $(MTRACE_OBJS) $(MSTAT_OBJS) - SRCS = $(OBJS:.o=.c) -@@ -65,7 +63,7 @@ - - .c.o: - @printf " CC $@\n" -- @$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< -+ @$(CC) $(CFLAGS) $(MROUTED_CFLAGS) $(CPPFLAGS) -c -o $@ $< - - install: $(EXECS) - @install -d $(DESTDIR)$(prefix)/sbin -@@ -95,26 +93,26 @@ - - mrouted: $(IGMP_OBJS) $(ROUTER_OBJS) $(CMULIBS) - @printf " LINK $@\n" -- @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(IGMP_OBJS) $(ROUTER_OBJS) $(LDLIBS) -+ @$(CC) $(CFLAGS) $(MROUTED_CFLAGS) $(LDFLAGS) $(MROUTED_LDFLAGS) -o $@ $(IGMP_OBJS) $(ROUTER_OBJS) $(LDLIBS) - - vers.c: Makefile - @echo $(VERSION) | sed -e 's/.*/char todaysversion[]="&";/' > vers.c - - map-mbone: $(IGMP_OBJS) $(MAPPER_OBJS) - @printf " LINK $@\n" -- @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(IGMP_OBJS) $(MAPPER_OBJS) $(LDLIBS) -+ @$(CC) $(CFLAGS) $(MROUTED_CFLAGS) $(LDFLAGS) $(MROUTED_LDFLAGS) -o $@ $(IGMP_OBJS) $(MAPPER_OBJS) $(LDLIBS) - - mrinfo: $(IGMP_OBJS) $(MRINFO_OBJS) - @printf " LINK $@\n" -- @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(IGMP_OBJS) $(MRINFO_OBJS) $(LDLIBS) -+ @$(CC) $(CFLAGS) $(MROUTED_CFLAGS) $(LDFLAGS) $(MROUTED_LDFLAGS) -o $@ $(IGMP_OBJS) $(MRINFO_OBJS) $(LDLIBS) - - mtrace: $(IGMP_OBJS) $(MTRACE_OBJS) - @printf " LINK $@\n" -- @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(IGMP_OBJS) $(MTRACE_OBJS) $(LDLIBS) -+ @$(CC) $(CFLAGS) $(MROUTED_CFLAGS) $(LDFLAGS) $(MROUTED_LDFLAGS) -o $@ $(IGMP_OBJS) $(MTRACE_OBJS) $(LDLIBS) - - mstat: $(MSTAT_OBJS) $(CMULIBS) - @printf " LINK $@\n" -- @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(MSTAT_OBJS) $(LDLIBS) -+ @$(CC) $(CFLAGS) $(MROUTED_CFLAGS) $(LDFLAGS) $(MROUTED_LDFLAGS) -o $@ $(MSTAT_OBJS) $(LDLIBS) - - clean: $(SNMPCLEAN) - -@$(RM) $(OBJS) $(EXECS) diff --git a/package/mrouted/mrouted-bcopy.patch b/package/mrouted/mrouted-bcopy.patch new file mode 100644 index 0000000000..74af02df6c --- /dev/null +++ b/package/mrouted/mrouted-bcopy.patch @@ -0,0 +1,39 @@ +From 2d33110ee18fb59a1d6917d598fc1f4eb3c4cf83 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Mon, 7 May 2012 16:32:10 -0300 +Subject: [PATCH] Switch from bcopy to memmove + +The bcopy() function is marked as legacy per POSIX.1-2001 and removed by +POSIX-1.2008 thus shouldn't be used. +So switch over to memmove() + +Signed-off-by: Gustavo Zacarias +--- + mtrace.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/mtrace.c b/mtrace.c +index c982a67..64630bf 100644 +--- a/mtrace.c ++++ b/mtrace.c +@@ -556,7 +556,7 @@ int send_recv(u_int32_t dst, int type, int code, int tries, struct resp_buf *sav + save->rtime = ((tr.tv_sec + JAN_1970) << 16) + + (tr.tv_usec << 10) / 15625; + save->len = len; +- bcopy((char *)igmp, (char *)&save->igmp, ipdatalen); ++ memmove((char *)&save->igmp, (char *)igmp, ipdatalen); + } + return recvlen; + } +@@ -646,7 +646,7 @@ void passive_mode(void) + base.rtime = ((tr.tv_sec + JAN_1970) << 16) + + (tr.tv_usec << 10) / 15625; + base.len = len; +- bcopy((char *)igmp, (char *)&base.igmp, ipdatalen); ++ memmove((char *)&base.igmp, (char *)igmp, ipdatalen); + /* + * If the user specified which traces to monitor, + * only accept traces that correspond to the +-- +1.7.3.4 + diff --git a/package/mrouted/mrouted.mk b/package/mrouted/mrouted.mk index 9ebb857790..c0cc2aa8b8 100644 --- a/package/mrouted/mrouted.mk +++ b/package/mrouted/mrouted.mk @@ -1,12 +1,13 @@ -############################################################# +################################################################################ # # mrouted # -# -############################################################# -MROUTED_VERSION = 3.9.4 +################################################################################ + +MROUTED_VERSION = 3.9.6 MROUTED_SOURCE = mrouted-$(MROUTED_VERSION).tar.bz2 -MROUTED_SITE = http://ftp.vmlinux.org/pub/People/jocke/mrouted +MROUTED_SITE = http://cloud.github.com/downloads/troglobit/mrouted +MROUTED_DEPENDENCIES = host-bison define MROUTED_BUILD_CMDS $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) @@ -24,4 +25,4 @@ define MROUTED_CLEAN_CMDS $(MAKE) -C $(@D) clean endef -$(eval $(call GENTARGETS,package,mrouted)) +$(eval $(generic-package)) diff --git a/package/msgpack/Config.in b/package/msgpack/Config.in new file mode 100644 index 0000000000..daa4fddc6f --- /dev/null +++ b/package/msgpack/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_MSGPACK + bool "msgpack" + depends on BR2_INSTALL_LIBSTDCPP + help + MessagePack is an efficient binary serialization format. + + It lets you exchange data among multiple languages like JSON but + it's faster and smaller. + + http://msgpack.org/ + +comment "msgpack needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/msgpack/msgpack.mk b/package/msgpack/msgpack.mk new file mode 100644 index 0000000000..c77729f2f4 --- /dev/null +++ b/package/msgpack/msgpack.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# msgpack +# +################################################################################ + +MSGPACK_VERSION = 0.5.4 +MSGPACK_SITE = http://downloads.sourceforge.net/project/msgpack/msgpack/cpp/ +MSGPACK_LICENSE = Apache-2.0 +MSGPACK_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/msmtp/Config.in b/package/msmtp/Config.in new file mode 100644 index 0000000000..385ad90d20 --- /dev/null +++ b/package/msmtp/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_MSMTP + bool "msmtp" + help + msmtp is an SMTP client. In the default mode, it transmits a + mail to an SMTP server (for example at a free mail provider) + which takes care of further delivery. + + Note that msmtp is licensed under GPLv3. + + http://msmtp.sourceforge.net/ diff --git a/package/msmtp/msmtp.mk b/package/msmtp/msmtp.mk new file mode 100644 index 0000000000..95687bcfe7 --- /dev/null +++ b/package/msmtp/msmtp.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# msmtp +# +################################################################################ + +MSMTP_VERSION = 1.4.31 +MSMTP_SITE = http://downloads.sourceforge.net/project/msmtp/msmtp/$(MSMTP_VERSION) +MSMTP_SOURCE = msmtp-$(MSMTP_VERSION).tar.bz2 +MSMTP_LICENSE = GPLv3+ +MSMTP_LICENSE_FILES = COPYING + +MSMTP_DEPENDENCIES += host-pkgconf + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +MSMTP_CONF_OPT += --with-ssl=openssl +MSMTP_DEPENDENCIES += openssl +ifeq ($(BR2_PREFER_STATIC_LIB),y) +# openssl uses zlib, so we need to explicitly link with it when static +MSMTP_CONF_ENV += LIBS=-lz +endif +else ifeq ($(BR2_PACKAGE_GNUTLS),y) +MSMTP_CONF_OPT += --with-ssl=gnutls +MSMTP_DEPENDENCIES += gnutls +else +MSMTP_CONF_OPT += --with-ssl=no +endif + +MSMTP_CONF_OPT += \ + --without-libidn \ + --without-libgsasl \ + --without-gnome-keyring + +$(eval $(autotools-package)) diff --git a/package/mtd/Config.in b/package/mtd/Config.in index 692654ca84..839ee9777b 100644 --- a/package/mtd/Config.in +++ b/package/mtd/Config.in @@ -20,14 +20,6 @@ config BR2_PACKAGE_MTD_FLASH_ERASE bool "flash_erase" default y -config BR2_PACKAGE_MTD_FLASH_ERASEALL - bool "flash_eraseall" - default y - -config BR2_PACKAGE_MTD_FLASH_INFO - bool "flash_info" - default y - config BR2_PACKAGE_MTD_FLASH_LOCK bool "flash_lock" default y @@ -38,6 +30,12 @@ config BR2_PACKAGE_MTD_FLASH_OTP_DUMP config BR2_PACKAGE_MTD_FLASH_OTP_INFO bool "flash_otp_info" +config BR2_PACKAGE_MTD_FLASH_OTP_LOCK + bool "flash_otp_lock" + +config BR2_PACKAGE_MTD_FLASH_OTP_WRITE + bool "flash_otp_write" + config BR2_PACKAGE_MTD_FLASH_UNLOCK bool "flash_unlock" default y @@ -56,6 +54,18 @@ config BR2_PACKAGE_MTD_MKFSJFFS2 select BR2_PACKAGE_ZLIB select BR2_PACKAGE_LZO +config BR2_PACKAGE_MTD_MKFSUBIFS + bool "mkfs.ubifs" + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_LZO + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + depends on BR2_LARGEFILE # util-linux + depends on BR2_USE_WCHAR # util-linux + +comment "mkfs.ubifs needs a toolchain w/ largefile, wchar" + depends on !BR2_LARGEFILE || !BR2_USE_WCHAR + config BR2_PACKAGE_MTD_MTD_DEBUG bool "mtd_debug" default y @@ -82,7 +92,7 @@ config BR2_PACKAGE_MTD_RECV_IMAGE depends on BR2_INET_IPV6 bool "recv_image" -comment "recv_image requires a toolchain with IPv6 support" +comment "recv_image needs a toolchain w/ IPv6" depends on !BR2_INET_IPV6 config BR2_PACKAGE_MTD_RFDDUMP diff --git a/package/mtd/mtd.mk b/package/mtd/mtd.mk index 8a819fa053..6b2af0dc9f 100644 --- a/package/mtd/mtd.mk +++ b/package/mtd/mtd.mk @@ -1,39 +1,50 @@ -############################################################# +################################################################################ # -# mtd provides jffs2 utilities +# mtd # -############################################################# -MTD_VERSION:=1.4.2 -MTD_SOURCE:=mtd-utils-$(MTD_VERSION).tar.bz2 -MTD_SITE:=ftp://ftp.infradead.org/pub/mtd-utils +################################################################################ + +MTD_VERSION = 1.5.0 +MTD_SOURCE = mtd-utils-$(MTD_VERSION).tar.bz2 +MTD_SITE = ftp://ftp.infradead.org/pub/mtd-utils +MTD_LICENSE = GPLv2 +MTD_LICENSE_FILES = COPYING + ifeq ($(BR2_PACKAGE_MTD_MKFSJFFS2),y) MTD_DEPENDENCIES = zlib lzo endif +ifeq ($(BR2_PACKAGE_MTD_MKFSUBIFS),y) +MTD_DEPENDENCIES += util-linux zlib lzo +endif + +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +MTD_DEPENDENCIES += busybox +endif + HOST_MTD_DEPENDENCIES = host-zlib host-lzo host-e2fsprogs define HOST_MTD_BUILD_CMDS - CC="$(HOSTCC)" CFLAGS="$(HOST_CFLAGS)" LDFLAGS="$(HOST_LDFLAGS)" \ - CROSS= $(MAKE1) BUILDDIR=$(@D) \ - WITHOUT_XATTR=1 -C $(@D) + $(HOST_CONFIGURE_OPTS) $(MAKE1) \ + CROSS= BUILDDIR=$(@D) WITHOUT_XATTR=1 -C $(@D) endef define HOST_MTD_INSTALL_CMDS $(MAKE1) BUILDDIR=$(@D) DESTDIR=$(HOST_DIR) -C $(@D) install endef -MKFS_JFFS2=$(HOST_DIR)/usr/sbin/mkfs.jffs2 -SUMTOOL=$(HOST_DIR)/usr/sbin/sumtool +MKFS_JFFS2 = $(HOST_DIR)/usr/sbin/mkfs.jffs2 +SUMTOOL = $(HOST_DIR)/usr/sbin/sumtool MTD_TARGETS_$(BR2_PACKAGE_MTD_DOCFDISK) += docfdisk MTD_TARGETS_$(BR2_PACKAGE_MTD_DOC_LOADBIOS) += doc_loadbios MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASHCP) += flashcp MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_ERASE) += flash_erase -MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_ERASEALL) += flash_eraseall -MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_INFO) += flash_info MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_LOCK) += flash_lock MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_OTP_DUMP) += flash_otp_dump MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_OTP_INFO) += flash_otp_info +MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_OTP_LOCK) += flash_otp_lock +MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_OTP_WRITE) += flash_otp_write MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_UNLOCK) += flash_unlock MTD_TARGETS_$(BR2_PACKAGE_MTD_FTL_CHECK) += ftl_check MTD_TARGETS_$(BR2_PACKAGE_MTD_FTL_FORMAT) += ftl_format @@ -64,39 +75,25 @@ MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIRMVOL) += ubirmvol MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIRSVOL) += ubirsvol MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIUPDATEVOL) += ubiupdatevol -MTD_MAKE_COMMON_FLAGS = \ - $(TARGET_CONFIGURE_OPTS) CROSS=$(TARGET_CROSS) \ - WITHOUT_XATTR=1 WITHOUT_LARGEFILE=1 +MTD_TARGETS_y += $(addprefix ubi-utils/,$(MTD_TARGETS_UBI_y)) +MTD_TARGETS_$(BR2_PACKAGE_MTD_MKFSUBIFS) += mkfs.ubifs/mkfs.ubifs -define MTD_TARGETS_BUILD - $(MAKE1) $(MTD_MAKE_COMMON_FLAGS) \ - BUILDDIR=$(@D) \ - -C $(@D) \ - $(addprefix $(@D)/, lib/libmtd.a $(MTD_TARGETS_y)) -endef - -ifneq ($(MTD_TARGETS_UBI_y),) -define MTD_TARGETS_UBI_BUILD - $(MAKE1) $(MTD_MAKE_COMMON_FLAGS) \ - BUILDDIR=$(@D)/ubi-utils/ \ - -C $(@D)/ubi-utils \ - $(addprefix $(@D)/ubi-utils/, $(MTD_TARGETS_UBI_y)) -endef -endif +# only call make if atleast a single tool is enabled +ifneq ($(MTD_TARGETS_y),) define MTD_BUILD_CMDS - $(MTD_TARGETS_BUILD) - $(MTD_TARGETS_UBI_BUILD) + $(TARGET_CONFIGURE_OPTS) $(MAKE1) CROSS=$(TARGET_CROSS) \ + BUILDDIR=$(@D) WITHOUT_XATTR=1 WITHOUT_LARGEFILE=1 -C $(@D) \ + $(addprefix $(@D)/,$(MTD_TARGETS_y)) endef +endif + define MTD_INSTALL_TARGET_CMDS for f in $(MTD_TARGETS_y) ; do \ - install -m 0755 $(@D)/$$f $(TARGET_DIR)/usr/sbin/$$f ; \ - done ; \ - for f in $(MTD_TARGETS_UBI_y) ; do \ - install -m 0755 $(@D)/ubi-utils/$$f $(TARGET_DIR)/usr/sbin/$$f ; \ + install -D -m 0755 $(@D)/$$f $(TARGET_DIR)/usr/sbin/$${f##*/} ; \ done endef -$(eval $(call GENTARGETS,package,mtd)) -$(eval $(call GENTARGETS,package,mtd,host)) +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/mtdev/Config.in b/package/mtdev/Config.in new file mode 100644 index 0000000000..34199038b2 --- /dev/null +++ b/package/mtdev/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_MTDEV + bool "mtdev" + help + The mtdev is a stand-alone library which transforms all + variants of kernel MT events to the slotted type B protocol. + + http://bitmath.org/code/mtdev/ + diff --git a/package/mtdev/mtdev.mk b/package/mtdev/mtdev.mk new file mode 100644 index 0000000000..3ae2a104cb --- /dev/null +++ b/package/mtdev/mtdev.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# mtdev +# +################################################################################ + +MTDEV_VERSION = 1.1.4 +MTDEV_SOURCE = mtdev-$(MTDEV_VERSION).tar.bz2 +MTDEV_SITE = http://bitmath.org/code/mtdev/ + +MTDEV_LICENSE = MIT +MTDEV_LICENSE_FILES = COPYING +MTDEV_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/mtdev2tuio/Config.in b/package/mtdev2tuio/Config.in new file mode 100644 index 0000000000..4195ecfeeb --- /dev/null +++ b/package/mtdev2tuio/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_MTDEV2TUIO + bool "mtdev2tuio" + select BR2_PACKAGE_LIBLO + select BR2_PACKAGE_MTDEV + depends on BR2_TOOLCHAIN_HAS_THREADS # liblo + help + mtdev2tuio is a simple application for converting touch + events captured from libmtdev to TUIO 1.1 + + https://github.com/olivopaolo/mtdev2tuio + +comment "mtdev2tuio needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/mtdev2tuio/mtdev2tuio.mk b/package/mtdev2tuio/mtdev2tuio.mk new file mode 100644 index 0000000000..ff56ee7ac5 --- /dev/null +++ b/package/mtdev2tuio/mtdev2tuio.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# mtdev2tuio +# +################################################################################ + +MTDEV2TUIO_VERSION = e1e7378d86abe751158e743586133022f32fa4d1 +MTDEV2TUIO_SITE = http://github.com/olivopaolo/mtdev2tuio/tarball/$(MTDEV2TUIO_VERSION) +MTDEV2TUIO_DEPENDENCIES = mtdev liblo +MTDEV2TUIO_LICENSE = GPLv3+ +MTDEV2TUIO_LICENSE_FILES = COPYING + +# mtdev2tuio Makefile misuses $(LD) as gcc, so we need to override LD +# here. +define MTDEV2TUIO_BUILD_CMDS + $(MAKE) \ + $(TARGET_CONFIGURE_OPTS) \ + LD="$(TARGET_CC)" \ + -C $(@D) +endef + +define MTDEV2TUIO_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/mtdev2tuio $(TARGET_DIR)/usr/bin/mtdev2tuio +endef + +define MTDEV2TUIO_CLEAN_CMDS + $(MAKE) -C $(@D) clean +endef + +$(eval $(generic-package)) diff --git a/package/mtools/Config.in.host b/package/mtools/Config.in.host new file mode 100644 index 0000000000..96f11d18ae --- /dev/null +++ b/package/mtools/Config.in.host @@ -0,0 +1,9 @@ +config BR2_PACKAGE_HOST_MTOOLS + bool "host mtools" + help + Mtools is a collection of utilities to access MS-DOS disks from + Unix without mounting them. It supports Win'95 style long file + names, OS/2 Xdf disks and 2m disks (store up to 1992k on a high + density 3 1/2 disk). + + http://www.tux.org/pub/tux/mtools/ diff --git a/package/mtools/mtools.mk b/package/mtools/mtools.mk new file mode 100644 index 0000000000..6751059d6e --- /dev/null +++ b/package/mtools/mtools.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# mtools +# +################################################################################ + +MTOOLS_VERSION = 4.0.18 +MTOOLS_SOURCE = mtools-$(MTOOLS_VERSION).tar.bz2 +MTOOLS_SITE = $(BR2_GNU_MIRROR)/mtools/ +MTOOLS_LICENSE = GPLv3+ +MTOOLS_LICENSE_FILES = COPYING + +MTOOLS_CONF_OPT = --enable-xdf \ + --enable-vold \ + --enable-new-vold + +$(eval $(host-autotools-package)) diff --git a/package/multimedia/Config.in b/package/multimedia/Config.in deleted file mode 100644 index b8a0f21172..0000000000 --- a/package/multimedia/Config.in +++ /dev/null @@ -1,48 +0,0 @@ -menu "Audio and video libraries and applications" -source "package/multimedia/alsa-lib/Config.in" -source "package/multimedia/alsa-utils/Config.in" -source "package/multimedia/aumix/Config.in" -source "package/multimedia/faad2/Config.in" -source "package/multimedia/flac/Config.in" -source "package/multimedia/ffmpeg/Config.in" -source "package/multimedia/gstreamer/Config.in" -source "package/multimedia/gst-ffmpeg/Config.in" -source "package/multimedia/gst-dsp/Config.in" -source "package/multimedia/gst-omapfb/Config.in" -source "package/multimedia/gst-plugins-base/Config.in" -source "package/multimedia/gst-plugins-good/Config.in" -source "package/multimedia/gst-plugins-bad/Config.in" -source "package/multimedia/gst-plugins-ugly/Config.in" -source "package/multimedia/lame/Config.in" -source "package/multimedia/libao/Config.in" -source "package/multimedia/libcdaudio/Config.in" -source "package/multimedia/libcue/Config.in" -source "package/multimedia/libcuefile/Config.in" -source "package/multimedia/libdvdread/Config.in" -source "package/multimedia/libdvdnav/Config.in" -source "package/multimedia/libid3tag/Config.in" -source "package/multimedia/libmad/Config.in" -source "package/multimedia/libmms/Config.in" -source "package/multimedia/libmpd/Config.in" -source "package/multimedia/libmpeg2/Config.in" -source "package/multimedia/libogg/Config.in" -source "package/multimedia/libreplaygain/Config.in" -source "package/multimedia/libsamplerate/Config.in" -source "package/multimedia/libsndfile/Config.in" -source "package/multimedia/libtheora/Config.in" -source "package/multimedia/libvorbis/Config.in" -source "package/multimedia/madplay/Config.in" -source "package/multimedia/mpd/Config.in" -source "package/multimedia/mpg123/Config.in" -source "package/multimedia/mplayer/Config.in" -source "package/multimedia/musepack/Config.in" -source "package/multimedia/python-mad/Config.in" -source "package/multimedia/speex/Config.in" -source "package/multimedia/swfdec/Config.in" -source "package/multimedia/tidsp-binaries/Config.in" -source "package/multimedia/festival/Config.in" -source "package/multimedia/taglib/Config.in" -source "package/multimedia/tremor/Config.in" -source "package/multimedia/vorbis-tools/Config.in" -source "package/multimedia/wavpack/Config.in" -endmenu diff --git a/package/multimedia/alsa-lib/Config.in b/package/multimedia/alsa-lib/Config.in deleted file mode 100644 index 98b83139d7..0000000000 --- a/package/multimedia/alsa-lib/Config.in +++ /dev/null @@ -1,73 +0,0 @@ -config BR2_PACKAGE_ALSA_LIB - bool "alsa-lib" - # Temporary until - # https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4913 - # is fixed - select BR2_PACKAGE_ALSA_LIB_PCM - help - The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI - functionality to the Linux operating system. - - http://www.alsa-project.org/ - -config BR2_PACKAGE_ALSA_LIB_PYTHON - bool "Python support for alsa-lib" - depends on BR2_PACKAGE_ALSA_LIB - depends on BR2_PACKAGE_PYTHON - help - Add python support for alsa-lib. - Python will be built and libpython will be installed - in the target directory - http://www.alsa-project.org/ - -if BR2_PACKAGE_ALSA_LIB -menu "ALSA lib selection" - -config BR2_PACKAGE_ALSA_LIB_DEVDIR - string "directory with ALSA device files" - default "/dev/snd" - -config BR2_PACKAGE_ALSA_LIB_PCM_PLUGINS - string "built PCM plugins" - default "all" - -config BR2_PACKAGE_ALSA_LIB_CTL_PLUGINS - string "built control plugins" - default "all" - -config BR2_PACKAGE_ALSA_LIB_ALOAD - bool "aload" - default y - -config BR2_PACKAGE_ALSA_LIB_MIXER - bool "mixer" - default y - -config BR2_PACKAGE_ALSA_LIB_PCM - bool "pcm" - default y - -config BR2_PACKAGE_ALSA_LIB_RAWMIDI - bool "rawmidi" - default y - -config BR2_PACKAGE_ALSA_LIB_HWDEP - bool "hwdep" - default y - -config BR2_PACKAGE_ALSA_LIB_SEQ - bool "seq" - default y - -config BR2_PACKAGE_ALSA_LIB_ALISP - bool "alisp" - default y - -config BR2_PACKAGE_ALSA_LIB_OLD_SYMBOLS - bool "old-symbols" - default y - -endmenu - -endif - diff --git a/package/multimedia/alsa-lib/alsa-lib.mk b/package/multimedia/alsa-lib/alsa-lib.mk deleted file mode 100644 index 2085a972de..0000000000 --- a/package/multimedia/alsa-lib/alsa-lib.mk +++ /dev/null @@ -1,83 +0,0 @@ -############################################################# -# -# alsa-lib -# -############################################################# -ALSA_LIB_VERSION = 1.0.23 -ALSA_LIB_SOURCE = alsa-lib-$(ALSA_LIB_VERSION).tar.bz2 -ALSA_LIB_SITE = ftp://ftp.alsa-project.org/pub/lib -ALSA_LIB_INSTALL_STAGING = YES -ALSA_LIB_INSTALL_TARGET = YES - -ALSA_LIB_CFLAGS=$(TARGET_CFLAGS) - -ALSA_LIB_CONF_OPT = --enable-shared \ - --enable-static \ - --with-alsa-devdir=$(call qstrip,$(BR2_PACKAGE_ALSA_LIB_DEVDIR)) \ - --with-pcm-plugins="$(call qstrip,$(BR2_PACKAGE_ALSA_LIB_PCM_PLUGINS))" \ - --with-ctl-plugins="$(call qstrip,$(BR2_PACKAGE_ALSA_LIB_CTL_PLUGINS))" \ - --without-versioned - -ifneq ($(BR2_PACKAGE_ALSA_LIB_ALOAD),y) -ALSA_LIB_CONF_OPT += --disable-aload -endif -ifneq ($(BR2_PACKAGE_ALSA_LIB_MIXER),y) -ALSA_LIB_CONF_OPT += --disable-mixer -endif -ifneq ($(BR2_PACKAGE_ALSA_LIB_PCM),y) -ALSA_LIB_CONF_OPT += --disable-pcm -endif -ifneq ($(BR2_PACKAGE_ALSA_LIB_RAWMIDI),y) -ALSA_LIB_CONF_OPT += --disable-rawmidi -endif -ifneq ($(BR2_PACKAGE_ALSA_LIB_HWDEP),y) -ALSA_LIB_CONF_OPT += --disable-hwdep -endif -ifneq ($(BR2_PACKAGE_ALSA_LIB_SEQ),y) -ALSA_LIB_CONF_OPT += --disable-seq -endif -ifneq ($(BR2_PACKAGE_ALSA_LIB_ALISP),y) -ALSA_LIB_CONF_OPT += --disable-alisp -endif -ifneq ($(BR2_PACKAGE_ALSA_LIB_OLD_SYMBOLS),y) -ALSA_LIB_CONF_OPT += --disable-old-symbols -endif - -ifeq ($(BR2_ENABLE_DEBUG),y) -ALSA_LIB_CONF_OPT += --enable-debug -endif - -ifeq ($(BR2_avr32),y) -ALSA_LIB_CFLAGS+=-DAVR32_INLINE_BUG -endif - -ifeq ($(BR2_PACKAGE_ALSA_LIB_PYTHON),y) -ALSA_LIB_CONF_OPT += \ - --with-pythonlibs=-lpython$(PYTHON_VERSION_MAJOR) \ - --with-pythonincludes=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) -ALSA_LIB_CFLAGS+=-I$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) -ALSA_LIB_DEPENDENCIES = python -else -ALSA_LIB_CONF_OPT += --disable-python -endif - -ifeq ($(BR2_SOFT_FLOAT),y) -ALSA_LIB_CONF_OPT += --with-softfloat -endif - -ALSA_LIB_CONF_ENV = CFLAGS="$(ALSA_LIB_CFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS) -lm" - -define ALSA_LIB_UNINSTALL_TARGET_CMDS - -rm -f $(TARGET_DIR)/usr/lib/libasound.so* - -rm -rf $(TARGET_DIR)/usr/lib/alsa-lib - -rm -rf $(TARGET_DIR)/usr/share/alsa -endef - -define ALSA_LIB_UNINSTALL_STAGING_CMDS - -rm -f $(STAGING_DIR)/usr/lib/libasound.* - -rm -rf $(STAGING_DIR)/usr/lib/alsa-lib - -rm -rf $(STAGING_DIR)/usr/share/alsa -endef - -$(eval $(call AUTOTARGETS,package/multimedia,alsa-lib)) diff --git a/package/multimedia/alsa-utils/Config.in b/package/multimedia/alsa-utils/Config.in deleted file mode 100644 index b85ff7e558..0000000000 --- a/package/multimedia/alsa-utils/Config.in +++ /dev/null @@ -1,72 +0,0 @@ -config BR2_PACKAGE_ALSA_UTILS - bool "alsa-utils" - depends on BR2_LARGEFILE - select BR2_PACKAGE_ALSA_LIB - help - This package contains the command line utilities for the ALSA - project. - - http://www.alsa-project.org/ - -comment "alsa-utils requires a toolchain with LARGEFILE support" - depends on !BR2_LARGEFILE - -if BR2_PACKAGE_ALSA_UTILS -menu "ALSA utils selection" - -config BR2_PACKAGE_ALSA_UTILS_ALSACONF - bool "alsaconf" - -config BR2_PACKAGE_ALSA_UTILS_ALSACTL - bool "alsactl" - default y - -config BR2_PACKAGE_ALSA_UTILS_ALSAMIXER - bool "alsamixer" - select BR2_PACKAGE_NCURSES - select BR2_PACKAGE_NCURSES_TARGET_PANEL - select BR2_PACKAGE_NCURSES_TARGET_FORM - select BR2_PACKAGE_NCURSES_TARGET_MENU - depends on BR2_USE_WCHAR - default y - -comment "alsamixer requires a toolchain with WCHAR support" - depends on !BR2_USE_WCHAR - -config BR2_PACKAGE_ALSA_UTILS_AMIDI - bool "amidi" - -config BR2_PACKAGE_ALSA_UTILS_AMIXER - bool "amixer" - -config BR2_PACKAGE_ALSA_UTILS_APLAY - bool "aplay" - -config BR2_PACKAGE_ALSA_UTILS_ARECORD - bool "arecord" - -config BR2_PACKAGE_ALSA_UTILS_IECSET - bool "iecset" - -config BR2_PACKAGE_ALSA_UTILS_ACONNECT - bool "aconnect" - -config BR2_PACKAGE_ALSA_UTILS_APLAYMIDI - bool "aplaymidi" - -config BR2_PACKAGE_ALSA_UTILS_ARECORDMIDI - bool "arecordmidi" - -config BR2_PACKAGE_ALSA_UTILS_ASEQDUMP - bool "aseqdump" - -config BR2_PACKAGE_ALSA_UTILS_ASEQNET - bool "aseqnet" - -config BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST - bool "speaker-test" - -endmenu - -endif - diff --git a/package/multimedia/aumix/aumix.mk b/package/multimedia/aumix/aumix.mk deleted file mode 100644 index 65d9d396c9..0000000000 --- a/package/multimedia/aumix/aumix.mk +++ /dev/null @@ -1,21 +0,0 @@ -############################################################# -# -# aumix -# -############################################################# - -AUMIX_VERSION=2.8 -AUMIX_SOURCE=aumix-$(AUMIX_VERSION).tar.bz2 -AUMIX_SITE=http://jpj.net/~trevor/aumix/releases -AUMIX_AUTORECONF=YES - -AUMIX_CONF_OPT = \ - --without-gtk \ - --without-gtk1 \ - --without-alsa \ - --without-gpm \ - --without-sysmouse - -AUMIX_DEPENDENCIES = ncurses - -$(eval $(call AUTOTARGETS,package/multimedia,aumix)) diff --git a/package/multimedia/faad2/faad2.mk b/package/multimedia/faad2/faad2.mk deleted file mode 100644 index 04aee1833e..0000000000 --- a/package/multimedia/faad2/faad2.mk +++ /dev/null @@ -1,11 +0,0 @@ -################################################################################ -# -# faad2 -# -################################################################################ - -FAAD2_VERSION = 2.7 -FAAD2_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/faac -FAAD2_INSTALL_STAGING = YES - -$(eval $(call AUTOTARGETS,package/multimedia,faad2)) diff --git a/package/multimedia/festival/Config.in b/package/multimedia/festival/Config.in deleted file mode 100644 index e05fde9c16..0000000000 --- a/package/multimedia/festival/Config.in +++ /dev/null @@ -1,27 +0,0 @@ -menuconfig BR2_PACKAGE_FESTIVAL - bool "festival text-to-speech system" - depends on BR2_INSTALL_LIBSTDCPP - depends on BROKEN # doesn't build - select BR2_PACKAGE_ALSA_LIB - select BR2_PACKAGE_SPEECH_TOOLS - help - Text to speech system for Linux - -if BR2_PACKAGE_FESTIVAL - - menu "speech tools" - source "package/multimedia/festival/speech-tools/Config.in" - endmenu - - menu "festival lexicons" - source "package/multimedia/festival/lexicons/Config.in" - endmenu - - menu "festival voices" - source "package/multimedia/festival/voices/Config.in" - endmenu - -endif - -comment "festival requires a toolchain with C++ support enabled" - depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/multimedia/festival/festival.mk b/package/multimedia/festival/festival.mk deleted file mode 100644 index 445dbc7895..0000000000 --- a/package/multimedia/festival/festival.mk +++ /dev/null @@ -1,4 +0,0 @@ -include package/multimedia/festival/speech-tools/speech-tools.mk -include package/multimedia/festival/festival/festival.mk -include package/multimedia/festival/voices/festvox.mk -include package/multimedia/festival/lexicons/festlex.mk diff --git a/package/multimedia/festival/festival/festival-1.96-beta-doc.patch b/package/multimedia/festival/festival/festival-1.96-beta-doc.patch deleted file mode 100644 index 583cf6e561..0000000000 --- a/package/multimedia/festival/festival/festival-1.96-beta-doc.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/doc/Makefile 2008-04-02 15:13:28.000000000 -0400 -+++ b/doc/Makefile 2008-04-02 15:13:09.000000000 -0400 -@@ -64,7 +64,7 @@ MANPAGES = festival.head festival.tail \ - FILES=Makefile $(MANPAGES) festival.texi $(SGMLFILES) refcard.tex $(DOCXXFILES) - LOCAL_CLEAN = *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr - --ALL = festival.1 festival_client.1 -+#ALL = festival.1 festival_client.1 - - include $(TOP)/config/common_make_rules - include $(EST)/config/rules/doc.mak -@@ -72,9 +72,9 @@ include $(EST)/config/rules/doc.mak - %.1 : %.head %.options %.tail - cat $^ >$@ - %.options : $(TOP)/src/main/% -- $(TOP)/bin/$* -man_options >$@ -+# $(TOP)/bin/$* -man_options >$@ - %.options : $(TOP)/src/main/%.exe -- $(TOP)/bin/$* -man_options >$@ -+# $(TOP)/bin/$* -man_options >$@ - - festival.info: festival.texi festfunc.texi festvars.texi festfeat.texi - @ if [ ! -d info ] ; \ diff --git a/package/multimedia/festival/festival/festival-1.96-beta-etcsiteinit.patch b/package/multimedia/festival/festival/festival-1.96-beta-etcsiteinit.patch deleted file mode 100644 index 8e21acede6..0000000000 --- a/package/multimedia/festival/festival/festival-1.96-beta-etcsiteinit.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff -ur festival.orig/lib/init.scm festival/lib/init.scm ---- festival.orig/lib/init.scm 2004-07-15 19:03:04.000000000 -0400 -+++ festival/lib/init.scm 2007-03-15 11:58:09.000000000 -0400 -@@ -55,6 +55,10 @@ - (if (probe_file (path-append libdir "sitevars.scm")) - (load (path-append libdir "sitevars.scm"))) - -+(if (probe_file "/etc/festival/sitevars.scm") -+ (load "/etc/festival/sitevars.scm")) -+ -+ - ;;; CSTR siod extensions - (require 'cstr) - -@@ -98,7 +102,7 @@ - (t ;; can't find direct support so guess that /dev/audio for 8k ulaw exists - (Parameter.def 'Audio_Method 'sunaudio))) - ;;; If you have an external program to play audio add its definition --;;; in siteinit.scm -+;;; in ~/.festivalrc or /etc/festival/siteinit.scm - - ;;; The audio spooler doesn't work under Windows so redefine audio_mode - (if (member 'mplayeraudio *modules*) -@@ -135,9 +139,13 @@ - ;;; - ;;; Local site initialization, if the file exists load it - ;;; -+ - (if (probe_file (path-append libdir "siteinit.scm")) - (load (path-append libdir "siteinit.scm"))) - -+(if (probe_file "/etc/festival/siteinit.scm") -+ (load "/etc/festival/siteinit.scm")) -+ - ;;; User initialization, if a user has a personal customization - ;;; file loaded it - (if (probe_file (path-append home-directory ".siodrc")) -diff -ur festival.orig/lib/voices.scm festival/lib/voices.scm ---- festival.orig/lib/voices.scm 2005-05-02 10:20:37.000000000 -0400 -+++ festival/lib/voices.scm 2007-03-15 12:00:19.000000000 -0400 -@@ -45,12 +45,12 @@ - (defvar system-voice-path '( ) - "system-voice-path - Additional directory not near the load path where voices can be -- found, this can be redefined in lib/sitevars.scm if desired.") -+ found, this can be redefined in /etc/festival/sitevars.scm if desired.") - - (defvar system-voice-path-multisyn '( ) - "system-voice-path-multisyn - Additional directory not near the load path where multisyn voices can be -- found, this can be redefined in lib/sitevars.scm if desired.") -+ found, this can be redefined in /etc/festival/sitevars.scm if desired.") - - (defvar voice-path - (remove-duplicates diff --git a/package/multimedia/festival/festival/festival-1.96-beta-libdir.patch b/package/multimedia/festival/festival/festival-1.96-beta-libdir.patch deleted file mode 100644 index b076ad9477..0000000000 --- a/package/multimedia/festival/festival/festival-1.96-beta-libdir.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/config/project.mak 2005-05-02 10:21:29.000000000 -0400 -+++ b/config/project.mak 2008-04-01 14:22:01.000000000 -0400 -@@ -113,6 +113,6 @@ PROJECT_JAVA_ROOT=$(TOP)/src/modules/jav - DOCXX_DIRS = $(TOP)/src - MODULE_TO_DOCXX = perl $(TOP)/src/modules/utilities/extract_module_doc++.prl - --FTLIBDIR = $(FESTIVAL_HOME)/lib -+FTLIBDIR = /usr/share/festival/lib - - diff --git a/package/multimedia/festival/festival/festival-1.96-beta-speechtools-dir.patch b/package/multimedia/festival/festival/festival-1.96-beta-speechtools-dir.patch deleted file mode 100644 index 874d1f662d..0000000000 --- a/package/multimedia/festival/festival/festival-1.96-beta-speechtools-dir.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/config/config.in 2008-03-31 15:20:02.000000000 -0400 -+++ b/config/config.in 2008-03-31 15:26:09.000000000 -0400 -@@ -10,7 +10,7 @@ - ########################################################################### - ## Which speech tools to use - --EST=$(TOP)/../speech_tools -+EST=$(TOP)/../speech-tools-1.2.96-beta - - ########################################################################### - ## Where the festival tree will be installed. diff --git a/package/multimedia/festival/festival/festival.mk b/package/multimedia/festival/festival/festival.mk deleted file mode 100644 index 4c270d4478..0000000000 --- a/package/multimedia/festival/festival/festival.mk +++ /dev/null @@ -1,21 +0,0 @@ -############################################################# -# -# festival -# -############################################################# -FESTIVAL_VERSION = 1.96-beta -FESTIVAL_SOURCE = festival-$(FESTIVAL_VERSION).tar.gz -FESTIVAL_SITE = http://festvox.org/packed/festival/1.96 -FESTIVAL_AUTORECONF = NO -FESTIVAL_INSTALL_STAGING = NO -FESTIVAL_INSTALL_TARGET = YES -FESTIVAL_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) STRIP=$(TARGET_STRIP) install - -FESTIVAL_CONF_OPT = --prefix=/usr --libdir=/usr/share/festival/lib - -FESTIVAL_MAKE_OPT = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" - -FESTIVAL_DEPENDENCIES = alsa-lib speech-tools - -$(eval $(call AUTOTARGETS,package/multimedia/festival,festival)) - diff --git a/package/multimedia/festival/lexicons/Config.in b/package/multimedia/festival/lexicons/Config.in deleted file mode 100644 index 6d92883b32..0000000000 --- a/package/multimedia/festival/lexicons/Config.in +++ /dev/null @@ -1,20 +0,0 @@ -config BR2_PACKAGE_FESTLEX_CMU - bool "Carnegie Mellon University" - help - Lexicon for the festival text to speech system - - http://festvox.org/packed/festival/latest - -config BR2_PACKAGE_FESTLEX_OALD - bool "Oxford Advanced Learners dictionary" - help - Lexicon for the festival text to speech system - - http://festvox.org/packed/festival/latest - -config BR2_PACKAGE_FESTLEX_POS - bool "POSLEX" - help - Lexicon for the festival text to speech system - - http://festvox.org/packed/festival/latest diff --git a/package/multimedia/festival/lexicons/festlex.mk b/package/multimedia/festival/lexicons/festlex.mk deleted file mode 100644 index 80d37d5959..0000000000 --- a/package/multimedia/festival/lexicons/festlex.mk +++ /dev/null @@ -1,46 +0,0 @@ -############################################################# -# -# festival lexicons -# -############################################################# -LEX1 = festlex_CMU.tar.gz -LEX2 = festlex_OALD.tar.gz -LEX3 = festlex_POSLEX.tar.gz -FESTLEX_STATUS_DIR = $(BUILD_DIR)/festival_lexicons -FESTLEX_INSTALL_DIR = $(TARGET_DIR)/usr/share - -$(FESTLEX_STATUS_DIR)/.downloaded: - mkdir -p $(FESTLEX_STATUS_DIR) -ifeq ($(BR2_PACKAGE_FESTLEX_CMU),y) - $(call DOWNLOAD,$(FESTIVAL_SITE),$(LEX1)) -endif -ifeq ($(BR2_PACKAGE_FESTLEX_OALD),y) - $(call DOWNLOAD,$(FESTIVAL_SITE),$(LEX2)) -endif -ifeq ($(BR2_PACKAGE_FESTLEX_POS),y) - $(call DOWNLOAD,$(FESTIVAL_SITE),$(LEX3)) -endif - touch $@ - -$(FESTLEX_STATUS_DIR)/.installed: $(FESTLEX_STATUS_DIR)/.downloaded -ifeq ($(BR2_PACKAGE_FESTLEX_CMU),y) - tar -xvf $(DL_DIR)/$(LEX1) --directory $(FESTLEX_INSTALL_DIR) -endif -ifeq ($(BR2_PACKAGE_FESTLEX_OALD),y) - tar -xvf $(DL_DIR)/$(LEX2) --directory $(FESTLEX_INSTALL_DIR) -endif -ifeq ($(BR2_PACKAGE_FESTLEX_POS),y) - tar -xvf $(DL_DIR)/$(LEX3) --directory $(FESTLEX_INSTALL_DIR) -endif - touch $@ - -festlex: $(FESTLEX_STATUS_DIR)/.installed - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_FESTIVAL),y) -TARGETS+=festlex -endif diff --git a/package/multimedia/festival/speech-tools/Config.in b/package/multimedia/festival/speech-tools/Config.in deleted file mode 100644 index e82ea1e555..0000000000 --- a/package/multimedia/festival/speech-tools/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_SPEECH_TOOLS - bool "speech tools for festival" - depends on BR2_INSTALL_LIBSTDCPP - help - Speech tools for the festival text to speech system - - http://festvox.org/packed/festival/latest - -comment "speech tools requires a toolchain with C++ support enabled" - depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/multimedia/festival/speech-tools/speech-tools-1.2.96-beta-install.patch b/package/multimedia/festival/speech-tools/speech-tools-1.2.96-beta-install.patch deleted file mode 100644 index 3cc47d3445..0000000000 --- a/package/multimedia/festival/speech-tools/speech-tools-1.2.96-beta-install.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- a/config/rules/install.mak 2001-04-04 07:55:32.000000000 -0400 -+++ b/config/rules/install.mak 2008-04-03 12:37:45.000000000 -0400 -@@ -50,9 +50,9 @@ ifneq ($(SHARED),0) - endif - endif - --ifeq ($(PROJECT_HOME_PATH), $(PROJECT_TOP_PATH)) -- TO_INSTALL=make_bin --else -+#ifeq ($(PROJECT_HOME_PATH), $(PROJECT_TOP_PATH)) -+# TO_INSTALL=make_bin -+#else - - TO_INSTALL= \ - make_installed_exec$(S) \ -@@ -62,7 +62,7 @@ else - INSTALLED_LIB=$(shell (cd $($(PROJECT_PREFIX)_HOME); pwd))/lib - INSTALLED_PRIVATE_LIB=$(INSTALLED_LIB)/$(shell echo $(PROJECT_PREFIX)| tr A-Z a-z) - INSTALLED_BIN=$(shell (cd $($(PROJECT_PREFIX)_HOME); pwd))/bin --endif -+#endif - - install: $(TO_INSTALL) - ---- a/config/rules/bin_process.mak 2004-01-27 18:56:39.000000000 -0500 -+++ b/config/rules/bin_process.mak 2008-04-03 12:37:31.000000000 -0400 -@@ -69,10 +69,17 @@ endif - do \ - b=`basename "$$i"`;\ - $(ECHO_N) " $$b";\ -- $(INSTALL_PROG) -s "$$main/$$i" "$(subst TOP,$(TOP),$(BIN))/$$b";\ -+ $(INSTALL_PROG) "$$main/$$i" "$(DESTDIR)/usr/bin/$$b";\ -+ $(STRIP) "$(DESTDIR)/usr/bin/$$b";\ - done -- @echo -- -+ @$(ECHO_N) "Install Scheme Libraries:" -+ @main=`pwd` ;\ -+ mkdir -p "$(DESTDIR)/usr/share/festival"; cp -a "$$main/../../lib" "$(DESTDIR)/usr/share/festival";\ -+ for i in `find "$(DESTDIR)/usr/share/festival/lib" -name Makefile`;\ -+ do \ -+ rm "$$i"; \ -+ done -+ - .link_main: - @$(MAKE) MADE_FROM_ABOVE=1 --no-print-directory -C '$(PROJECT_MAIN_DIR)' BIN=TOP/$(DIRNAME) LIBDIR=MAIN/TOP/$(PROJECT_LIBRARY_DIR) MAIN='$($(PROJECT_PREFIX)_HOME)' .link_main$(S) - diff --git a/package/multimedia/festival/speech-tools/speech-tools.mk b/package/multimedia/festival/speech-tools/speech-tools.mk deleted file mode 100644 index 66bd3080bf..0000000000 --- a/package/multimedia/festival/speech-tools/speech-tools.mk +++ /dev/null @@ -1,31 +0,0 @@ -############################################################# -# -# speech-tools -# -############################################################# - -SPEECH_TOOLS_VERSION = 1.2.96~beta -SPEECH_TOOLS_SOURCE = speech-tools_$(SPEECH_TOOLS_VERSION).orig.tar.gz -SPEECH_TOOLS_PATCH = speech-tools_$(SPEECH_TOOLS_VERSION)-6.diff.gz -SPEECH_TOOLS_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/s/speech-tools/ -SPEECH_TOOLS_AUTORECONF = NO -SPEECH_TOOLS_INSTALL_STAGING = NO -SPEECH_TOOLS_INSTALL_TARGET = YES -SPEECH_TOOLS_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) STRIP=$(TARGET_STRIP) install - -SPEECH_TOOLS_CONF_OPT = -SPEECH_TOOLS_MAKE_OPT = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" - -define SPEECH_TOOLS_DEBIAN_PATCH_APPLY - # Use the order of the quilt patch series to apply the patches - for p in $$(cat $(@D)/debian/patches/series) ; do \ - toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches $$p; \ - done -endef - -SPEECH_TOOLS_POST_PATCH_HOOKS += SPEECH_TOOLS_DEBIAN_PATCH_APPLY - -SPEECH_TOOLS_DEPENDENCIES = ncurses - -$(eval $(call AUTOTARGETS,package/multimedia/festival,speech-tools)) - diff --git a/package/multimedia/festival/voices/Config.in b/package/multimedia/festival/voices/Config.in deleted file mode 100644 index b0a1cc0b1c..0000000000 --- a/package/multimedia/festival/voices/Config.in +++ /dev/null @@ -1,63 +0,0 @@ -config BR2_PACKAGE_FESTVOX_AWB - bool "Alan Scottish English" - help - Scottish English voice for the festival text to speech system - - http://festvox.org/packed/festival/latest - -config BR2_PACKAGE_FESTVOX_BDL - bool "Brian US English" - help - US English male voice for the festival text to speech system - - http://festvox.org/packed/festival/latest - -config BR2_PACKAGE_FESTVOX_JMK - bool "John Canadian English" - help - Canadian English voice for the festival text to speech system - - http://festvox.org/packed/festival/latest - -config BR2_PACKAGE_FESTVOX_SLT - bool "Stephanie US English" - help - US English female voice for the festival text to speech system - - http://festvox.org/packed/festival/latest - -config BR2_PACKAGE_FESTVOX_AWB_MULTISYN - bool "Alan multisyn (big file)" - help - voice for the festival text to speech system - - http://festvox.org/packed/festival/latest - -config BR2_PACKAGE_FESTVOX_JMK_MULTISYN - bool "John multisyn (big file)" - help - voice for the festival text to speech system - - http://festvox.org/packed/festival/latest - -config BR2_PACKAGE_FESTVOX_KAL_SIXTEENK - bool "Kevin diphone US English 16k" - help - diphone voice for the festival text to speech system - - http://festvox.org/packed/festival/latest - -config BR2_PACKAGE_FESTVOX_KED_EIGHTK - bool "Kurt diphone American English 8k" - help - diphone voice for the festival text to speech system - - http://festvox.org/packed/festival/latest - -config BR2_PACKAGE_FESTVOX_KED_SIXTEENK - bool "Kurt diphone American English 16k" - help - diphone voice for the festival text to speech system - - http://festvox.org/packed/festival/latest - diff --git a/package/multimedia/festival/voices/festvox.mk b/package/multimedia/festival/voices/festvox.mk deleted file mode 100644 index a2ee169f3d..0000000000 --- a/package/multimedia/festival/voices/festvox.mk +++ /dev/null @@ -1,99 +0,0 @@ -############################################################# -# -# festival voices -# -############################################################# -VOICE1 = festvox_cmu_us_awb_arctic_hts.tar.gz -VOICE2 = festvox_cmu_us_bdl_arctic_hts.tar.gz -VOICE3 = festvox_cmu_us_jmk_arctic_hts.tar.gz -VOICE4 = festvox_cmu_us_slt_arctic_hts.tar.gz -VOICE5 = festvox_cstr_us_awb_arctic_multisyn-1.0.tar.gz -VOICE6 = festvox_cstr_us_jmk_arctic_multisyn-1.0.tar.gz -VOICE7 = festvox_kallpc16k.tar.gz -VOICE8 = festvox_kedlpc8k.tar.gz -VOICE9 = festvox_kedlpc16k.tar.gz -FRONTEND1 = festvox_us1.tar.gz -FRONTEND2 = festvox_us2.tar.gz -FRONTEND3 = festvox_us3.tar.gz -FESTVOX_STATUS_DIR = $(BUILD_DIR)/festival_voices -FESTVOX_INSTALL_DIR = $(TARGET_DIR)/usr/share - -$(FESTVOX_STATUS_DIR)/.downloaded: - mkdir -p $(FESTVOX_STATUS_DIR) -ifeq ($(BR2_PACKAGE_FESTVOX_AWB),y) - $(call DOWNLOAD,$(FESTIVAL_SITE),$(VOICE1)) -endif -ifeq ($(BR2_PACKAGE_FESTVOX_BDL),y) - $(call DOWNLOAD,$(FESTIVAL_SITE),$(VOICE2)) -endif -ifeq ($(BR2_PACKAGE_FESTVOX_JMK),y) - $(call DOWNLOAD,$(FESTIVAL_SITE),$(VOICE3)) -endif -ifeq ($(BR2_PACKAGE_FESTVOX_SLT),y) - $(call DOWNLOAD,$(FESTIVAL_SITE),$(VOICE4)) -endif -ifeq ($(BR2_PACKAGE_FESTVOX_AWB_MULTISYN),y) - $(call DOWNLOAD,$(FESTIVAL_SITE),$(VOICE5)) -endif -ifeq ($(BR2_PACKAGE_FESTVOX_JMK_MULTISYN),y) - $(call DOWNLOAD,$(FESTIVAL_SITE),$(VOICE6)) -endif -ifeq ($(BR2_PACKAGE_FESTVOX_KAL_SIXTEENK),y) - $(call DOWNLOAD,$(FESTIVAL_SITE),$(VOICE7)) -endif -ifeq ($(BR2_PACKAGE_FESTVOX_KED_EIGHTK),y) - $(call DOWNLOAD,$(FESTIVAL_SITE),$(VOICE8)) -endif -ifeq ($(BR2_PACKAGE_FESTVOX_KED_SIXTEENK),y) - $(call DOWNLOAD,$(FESTIVAL_SITE),$(VOICE9)) -endif - $(call DOWNLOAD,$(FESTIVAL_SITE),$(FRONTEND1)) - $(call DOWNLOAD,$(FESTIVAL_SITE),$(FRONTEND2)) - $(call DOWNLOAD,$(FESTIVAL_SITE),$(FRONTEND3)) - - touch $@ - -$(FESTVOX_STATUS_DIR)/.installed: $(FESTVOX_STATUS_DIR)/.downloaded -ifeq ($(BR2_PACKAGE_FESTVOX_AWB),y) - tar -xvf $(DL_DIR)/$(VOICE1) --directory $(FESTVOX_INSTALL_DIR) -endif -ifeq ($(BR2_PACKAGE_FESTVOX_BDL),y) - tar -xvf $(DL_DIR)/$(VOICE2) --directory $(FESTVOX_INSTALL_DIR) -endif -ifeq ($(BR2_PACKAGE_FESTVOX_JMK),y) - tar -xvf $(DL_DIR)/$(VOICE3) --directory $(FESTVOX_INSTALL_DIR) -endif -ifeq ($(BR2_PACKAGE_FESTVOX_SLT),y) - tar -xvf $(DL_DIR)/$(VOICE4) --directory $(FESTVOX_INSTALL_DIR) -endif -ifeq ($(BR2_PACKAGE_FESTVOX_AWB_MULTISYN),y) - tar -xvf $(DL_DIR)/$(VOICE5) --directory $(FESTVOX_INSTALL_DIR) -endif -ifeq ($(BR2_PACKAGE_FESTVOX_JMK_MULTISYN),y) - tar -xvf $(DL_DIR)/$(VOICE6) --directory $(FESTVOX_INSTALL_DIR) -endif -ifeq ($(BR2_PACKAGE_FESTVOX_KAL_SIXTEENK),y) - tar -xvf $(DL_DIR)/$(VOICE7) --directory $(FESTVOX_INSTALL_DIR) -endif -ifeq ($(BR2_PACKAGE_FESTVOX_KED_EIGHTK),y) - tar -xvf $(DL_DIR)/$(VOICE8) --directory $(FESTVOX_INSTALL_DIR) -endif -ifeq ($(BR2_PACKAGE_FESTVOX_KED_SIXTEENK),y) - tar -xvf $(DL_DIR)/$(VOICE9) --directory $(FESTVOX_INSTALL_DIR) -endif - tar -xvf $(DL_DIR)/$(FRONTEND1) --directory $(FESTVOX_INSTALL_DIR) - tar -xvf $(DL_DIR)/$(FRONTEND2) --directory $(FESTVOX_INSTALL_DIR) - tar -xvf $(DL_DIR)/$(FRONTEND3) --directory $(FESTVOX_INSTALL_DIR) - - touch $@ - -festvox: $(FESTVOX_STATUS_DIR)/.installed - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_FESTIVAL),y) -TARGETS+=festvox -endif diff --git a/package/multimedia/ffmpeg/Config.in b/package/multimedia/ffmpeg/Config.in deleted file mode 100644 index 2f9499101a..0000000000 --- a/package/multimedia/ffmpeg/Config.in +++ /dev/null @@ -1,156 +0,0 @@ -comment "ffmpeg requires a toolchain with LARGEFILE support" - depends on !BR2_LARGEFILE - -menuconfig BR2_PACKAGE_FFMPEG - bool "ffmpeg" - depends on BR2_LARGEFILE - help - FFmpeg is a complete, cross-platform solution to record, convert - and stream audio and video. - - http://www.ffmpeg.org - -if BR2_PACKAGE_FFMPEG - -config BR2_PACKAGE_FFMPEG_GPL - bool "Enable GPL code" - help - allow use of GPL code, the resulting libs and binaries will - be under GPL - -config BR2_PACKAGE_FFMPEG_NONFREE - bool "Enable nonfree code" - help - allow use of nonfree code, the resulting libs and binaries - will be unredistributable - -config BR2_PACKAGE_FFMPEG_FFMPEG - bool "Build ffmpeg (the command line application)" - default y - help - FFmpeg is a very fast video and audio converter. - It can also grab from a live audio/video source. - - It is not needed if you want to link the FFmpeg libraries - to your application. - -config BR2_PACKAGE_FFMPEG_FFPLAY - bool "Build ffplay" - select BR2_PACKAGE_SDL - help - FFplay is a very simple and portable media player using the - FFmpeg libraries and the SDL library. - It is mostly used as a testbed for the various FFmpeg APIs. - -config BR2_PACKAGE_FFMPEG_FFSERVER - bool "Build ffserver" - help - FFserver is a streaming server for both audio and video. - -config BR2_PACKAGE_FFMPEG_POSTPROC - bool "Build libpostproc" - depends on BR2_PACKAGE_FFMPEG_GPL - help - Postproc is a library of video postprocessing routines. - -config BR2_PACKAGE_FFMPEG_SWSCALE - bool "Build libswscale" - help - Swscale is a library of video scaling routines. - -config BR2_PACKAGE_FFMPEG_ENCODERS - string "Enabled encoders" - default "all" - help - Space-separated list of encoders to build in FFmpeg, - or "all" to build all of them. - - Run ./configure --list-encoders in the ffmpeg sources - directory to know the available options. - -config BR2_PACKAGE_FFMPEG_DECODERS - string "Enabled decoders" - default "all" - help - Space-separated list of decoders to build in FFmpeg, - or "all" to build all of them. - - Run ./configure --list-decoders in the ffmpeg sources - directory to know the available options. - -config BR2_PACKAGE_FFMPEG_MUXERS - string "Enabled muxers" - default "all" - help - Space-separated list of muxers to build in FFmpeg, - or "all" to build all of them. - - Run ./configure --list-muxers in the ffmpeg sources - directory to know the available options. - -config BR2_PACKAGE_FFMPEG_DEMUXERS - string "Enabled demuxers" - default "all" - help - Space-separated list of demuxers to build in FFmpeg, - or "all" to build all of them. - - Run ./configure --list-demuxers in the ffmpeg sources - directory to know the available options. - -config BR2_PACKAGE_FFMPEG_PARSERS - string "Enabled parsers" - default "all" - help - Space-separated list of parsers to build in FFmpeg, - or "all" to build all of them. - - Run ./configure --list-parsers in the ffmpeg sources - directory to know the available options. - -config BR2_PACKAGE_FFMPEG_BSFS - string "Enabled bitstreams" - default "all" - help - Space-separated list of bitstream filters to build in FFmpeg, - or "all" to build all of them. - - Run ./configure --list-bsfs in the ffmpeg sources - directory to know the available options. - -config BR2_PACKAGE_FFMPEG_PROTOCOLS - string "Enabled protocols" - default "all" - help - Space-separated list of protocols to build in FFmpeg, - or "all" to build all of them. - - Run ./configure --list-protocols in the ffmpeg sources - directory to know the available options. - -config BR2_PACKAGE_FFMPEG_FILTERS - string "Enabled filters" - default "all" - help - Space-separated list of filters to build in FFmpeg, - or "all" to build all of them. - - Run ./configure --list-filters in the ffmpeg sources - directory to know the available options. - -config BR2_PACKAGE_FFMPEG_INDEVS - bool "Enable input devices" - default y - -config BR2_PACKAGE_FFMPEG_OUTDEVS - bool "Enable output devices" - default y - -config BR2_PACKAGE_FFMPEG_EXTRACONF - string "Additional parameters for ./configure" - default "" - help - Extra parameters that will be appended to FFmpeg's - ./configure commandline. - -endif diff --git a/package/multimedia/ffmpeg/ffmpeg-0.5.2-fix-sdl-config-search.patch b/package/multimedia/ffmpeg/ffmpeg-0.5.2-fix-sdl-config-search.patch deleted file mode 100644 index 58d08aa28a..0000000000 --- a/package/multimedia/ffmpeg/ffmpeg-0.5.2-fix-sdl-config-search.patch +++ /dev/null @@ -1,17 +0,0 @@ -Allow FFmpeg's ./configure script to use a custom sdl-config command. - -Inspired from: -http://www.mail-archive.com/uclinux-dist-commits@blackfin.uclinux.org/msg01099.html - -diff -u ffmpeg-0.5.2-orig/configure ffmpeg-0.5.2/configure ---- a/configure -+++ b/configure -@@ -2066,7 +2066,7 @@ - - disable sdl_too_old - disable sdl --SDL_CONFIG="${cross_prefix}sdl-config" -+SDL_CONFIG="${SDL_CONFIG-${cross_prefix}sdl-config}" - if "${SDL_CONFIG}" --version > /dev/null 2>&1; then - sdl_cflags=`"${SDL_CONFIG}" --cflags` - temp_cflags $sdl_cflags diff --git a/package/multimedia/ffmpeg/ffmpeg.mk b/package/multimedia/ffmpeg/ffmpeg.mk deleted file mode 100644 index b37ac901e7..0000000000 --- a/package/multimedia/ffmpeg/ffmpeg.mk +++ /dev/null @@ -1,152 +0,0 @@ -############################################################# -# -# ffmpeg -# -############################################################# -FFMPEG_VERSION := 0.5.2 -FFMPEG_SOURCE := ffmpeg-$(FFMPEG_VERSION).tar.bz2 -FFMPEG_SITE := http://ffmpeg.org/releases -FFMPEG_INSTALL_STAGING = YES -FFMPEG_INSTALL_TARGET = YES - -FFMPEG_CONF_OPT = \ - --prefix=/usr \ - --enable-shared \ - --disable-avfilter \ - --disable-vhook \ - -ifeq ($(BR2_PACKAGE_FFMPEG_GPL),y) -FFMPEG_CONF_OPT += --enable-gpl -else -FFMPEG_CONF_OPT += --disable-gpl -endif - -ifeq ($(BR2_PACKAGE_FFMPEG_NONFREE),y) -FFMPEG_CONF_OPT += --enable-nonfree -else -FFMPEG_CONF_OPT += --disable-nonfree -endif - -ifeq ($(BR2_PACKAGE_FFMPEG_FFMPEG),y) -FFMPEG_CONF_OPT += --enable-ffmpeg -else -FFMPEG_CONF_OPT += --disable-ffmpeg -endif - -ifeq ($(BR2_PACKAGE_FFMPEG_FFPLAY),y) -FFMPEG_DEPENDENCIES += sdl -FFMPEG_CONF_OPT += --enable-ffplay -FFMPEG_CONF_ENV += SDL_CONFIG=$(STAGING_DIR)/usr/bin/sdl-config -else -FFMPEG_CONF_OPT += --disable-ffplay -endif - -ifeq ($(BR2_PACKAGE_FFMPEG_FFSERVER),y) -FFMPEG_CONF_OPT += --enable-ffserver -else -FFMPEG_CONF_OPT += --disable-ffserver -endif - -ifeq ($(BR2_PACKAGE_FFMPEG_POSTPROC),y) -FFMPEG_CONF_OPT += --enable-postproc -else -FFMPEG_CONF_OPT += --disable-postproc -endif - -ifeq ($(BR2_PACKAGE_FFMPEG_SWSCALE),y) -FFMPEG_CONF_OPT += --enable-swscale -else -FFMPEG_CONF_OPT += --disable-swscale -endif - -ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_ENCODERS)),all) -FFMPEG_CONF_OPT += --disable-encoders \ - $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_ENCODERS)),--enable-encoder=$(x)) -endif - -ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_DECODERS)),all) -FFMPEG_CONF_OPT += --disable-decoders \ - $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_DECODERS)),--enable-decoder=$(x)) -endif - -ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_MUXERS)),all) -FFMPEG_CONF_OPT += --disable-muxers \ - $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_MUXERS)),--enable-muxer=$(x)) -endif - -ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_DEMUXERS)),all) -FFMPEG_CONF_OPT += --disable-demuxers \ - $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_DEMUXERS)),--enable-demuxer=$(x)) -endif - -ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_PARSERS)),all) -FFMPEG_CONF_OPT += --disable-parsers \ - $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_PARSERS)),--enable-parser=$(x)) -endif - -ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_BSFS)),all) -FFMPEG_CONF_OPT += --disable-bsfs \ - $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_BSFS)),--enable-bsf=$(x)) -endif - -ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_PROTOCOLS)),all) -FFMPEG_CONF_OPT += --disable-protocols \ - $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_PROTOCOLS)),--enable-protocol=$(x)) -endif - -ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_FILTERS)),all) -FFMPEG_CONF_OPT += --disable-filters \ - $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_FILTERS)),--enable-filter=$(x)) -endif - -ifeq ($(BR2_PACKAGE_FFMPEG_INDEVS),y) -FFMPEG_CONF_OPT += --enable-indevs -else -FFMPEG_CONF_OPT += --disable-indevs -endif - -ifeq ($(BR2_PACKAGE_FFMPEG_OUTDEVS),y) -FFMPEG_CONF_OPT += --enable-outdevs -else -FFMPEG_CONF_OPT += --disable-outdevs -endif - -ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) -FFMPEG_CONF_OPT += --enable-pthreads -else -FFMPEG_CONF_OPT += --disable-pthreads -endif - -ifeq ($(BR2_PACKAGE_ZLIB),y) -FFMPEG_CONF_OPT += --enable-zlib -FFMPEG_DEPENDENCIES += zlib -else -FFMPEG_CONF_OPT += --disable-zlib -endif - -# MMX on is default for x86, disable it for lowly x86-type processors -ifeq ($(BR2_x86_i386)$(BR2_x86_i486)$(BR2_x86_i586)$(BR2_x86_i686)$(BR2_x86_pentiumpro)$(BR2_x86_geode),y) -FFMPEG_CONF_OPT += --disable-mmx -endif - -FFMPEG_CONF_OPT += $(call qstrip,$(BR2_PACKAGE_FFMPEG_EXTRACONF)) - -# Override FFMPEG_CONFIGURE_CMDS: FFmpeg does not support --target and others -define FFMPEG_CONFIGURE_CMDS - (cd $(FFMPEG_SRCDIR) && rm -rf config.cache && \ - $(TARGET_CONFIGURE_OPTS) \ - $(TARGET_CONFIGURE_ARGS) \ - $(FFMPEG_CONF_ENV) \ - ./configure \ - --enable-cross-compile \ - --cross-prefix=$(TARGET_CROSS) \ - --sysroot=$(STAGING_DIR) \ - --host-cc="$(HOSTCC)" \ - --arch=$(BR2_ARCH) \ - --extra-cflags=-fPIC \ - $(DISABLE_IPV6) \ - $(FFMPEG_CONF_OPT) \ - ) -endef - -$(eval $(call AUTOTARGETS,package/multimedia,ffmpeg)) diff --git a/package/multimedia/flac/Config.in b/package/multimedia/flac/Config.in deleted file mode 100644 index 357e24f728..0000000000 --- a/package/multimedia/flac/Config.in +++ /dev/null @@ -1,6 +0,0 @@ -config BR2_PACKAGE_FLAC - bool "flac" - help - FLAC is an Open Source lossless audio codec. - - http://flac.sourceforge.net/ diff --git a/package/multimedia/flac/flac.mk b/package/multimedia/flac/flac.mk deleted file mode 100644 index dbaf2e9ef5..0000000000 --- a/package/multimedia/flac/flac.mk +++ /dev/null @@ -1,24 +0,0 @@ -################################################################################ -# -# flac -# -################################################################################ - -FLAC_VERSION = 1.2.1 -FLAC_SOURCE = flac-$(FLAC_VERSION).tar.gz -FLAC_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/flac/ -FLAC_INSTALL_STAGING = YES - -FLAC_CONF_OPT = \ - --enable-shared \ - --disable-cpplibs \ - --disable-xmms-plugin - -ifeq ($(BR2_PACKAGE_LIBOGG),y) -FLAC_CONF_OPT += --with-ogg=$(STAGING_DIR)/usr -FLAC_DEPENDENCIES = libogg -else -FLAC_CONF_OPT += --disable-ogg -endif - -$(eval $(call AUTOTARGETS,package/multimedia,flac)) diff --git a/package/multimedia/gst-dsp/gst-dsp.mk b/package/multimedia/gst-dsp/gst-dsp.mk deleted file mode 100644 index f55f5109a0..0000000000 --- a/package/multimedia/gst-dsp/gst-dsp.mk +++ /dev/null @@ -1,19 +0,0 @@ -GST_DSP_VERSION=0.8.0 -GST_DSP_SOURCE=gst-dsp-$(GST_DSP_VERSION).tar.gz -GST_DSP_SITE=http://gst-dsp.googlecode.com/files/ - -define GST_DSP_BUILD_CMDS - $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) -e -endef - -define GST_DSP_INSTALL_TARGET_CMDS - $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) -e DESTDIR=$(TARGET_DIR) install -endef - -define GST_DSP_UNINSTALL_TARGET_CMDS - $(RM) $(TARGET_DIR)/usr/lib/gstreamer-0.10/libgstdsp.so -endef - -GST_DSP_DEPENDENCIES = gstreamer tidsp-binaries - -$(eval $(call GENTARGETS,package/multimedia,gst-dsp)) diff --git a/package/multimedia/gst-ffmpeg/Config.in b/package/multimedia/gst-ffmpeg/Config.in deleted file mode 100644 index 17873f0518..0000000000 --- a/package/multimedia/gst-ffmpeg/Config.in +++ /dev/null @@ -1,17 +0,0 @@ -config BR2_PACKAGE_GST_FFMPEG - bool "gst-ffmpeg" - depends on BR2_PACKAGE_GSTREAMER - select BR2_PACKAGE_GST_PLUGINS_BASE - select BR2_PACKAGE_LIBOIL - select BR2_PACKAGE_FFMPEG - select BR2_PACKAGE_FFMPEG_GPL - select BR2_PACKAGE_FFMPEG_POSTPROC - select BR2_PACKAGE_FFMPEG_SWSCALE - depends on BR2_LARGEFILE - help - GStreamer plugin using FFmpeg. - - http://gstreamer.freedesktop.org/ - -comment "gst-ffmpeg requires a toolchain with LARGEFILE support" - depends on !BR2_LARGEFILE diff --git a/package/multimedia/gst-ffmpeg/gst-ffmpeg.mk b/package/multimedia/gst-ffmpeg/gst-ffmpeg.mk deleted file mode 100644 index 6e91ad5970..0000000000 --- a/package/multimedia/gst-ffmpeg/gst-ffmpeg.mk +++ /dev/null @@ -1,17 +0,0 @@ -############################################################# -# -# gst-ffmpeg -# -############################################################# -GST_FFMPEG_VERSION = 0.10.9 -GST_FFMPEG_SOURCE = gst-ffmpeg-$(GST_FFMPEG_VERSION).tar.bz2 -GST_FFMPEG_SITE = http://gstreamer.freedesktop.org/src/gst-ffmpeg -GST_FFMPEG_INSTALL_STAGING = YES -GST_FFMPEG_DEPENDENCIES = gstreamer gst-plugins-base ffmpeg liboil -GST_FFMPEG_CONF_OPT = --with-system-ffmpeg - -ifeq ($(BR2_PACKAGE_BZIP2),y) -GST_FFMPEG_DEPENDENCIES += bzip2 -endif - -$(eval $(call AUTOTARGETS,package/multimedia,gst-ffmpeg)) diff --git a/package/multimedia/gst-omapfb/gst-omapfb.mk b/package/multimedia/gst-omapfb/gst-omapfb.mk deleted file mode 100644 index 726ef83fe9..0000000000 --- a/package/multimedia/gst-omapfb/gst-omapfb.mk +++ /dev/null @@ -1,19 +0,0 @@ -GST_OMAPFB_VERSION=1.0 -GST_OMAPFB_SOURCE=gst-omapfb-$(GST_OMAPFB_VERSION).tar.gz -GST_OMAPFB_SITE=http://gst-dsp.googlecode.com/files/ - -define GST_OMAPFB_BUILD_CMDS - $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) -e -endef - -define GST_OMAPFB_INSTALL_TARGET_CMDS - $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) -e DESTDIR=$(TARGET_DIR) install -endef - -define GST_OMAPFB_UNINSTALL_TARGET_CMDS - $(RM) $(TARGET_DIR)/usr/lib/gstreamer-0.10/libgstomapfb.so -endef - -GST_OMAPFB_DEPENDENCIES = gstreamer - -$(eval $(call GENTARGETS,package/multimedia,gst-omapfb)) diff --git a/package/multimedia/gst-plugins-bad/Config.in b/package/multimedia/gst-plugins-bad/Config.in deleted file mode 100644 index e25b756dfe..0000000000 --- a/package/multimedia/gst-plugins-bad/Config.in +++ /dev/null @@ -1,203 +0,0 @@ -menuconfig BR2_PACKAGE_GST_PLUGINS_BAD - bool "gst-plugins-bad" - depends on BR2_PACKAGE_GSTREAMER - select BR2_PACKAGE_GST_PLUGINS_BASE - help - A set of plug-ins for GStreamer that may be of poor quality or - lacking some features. - - http://gstreamer.freedesktop.org/ - -if BR2_PACKAGE_GST_PLUGINS_BAD - -comment "dependency-less plugins" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_AACPARSE - bool "aacparse" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_AIFFPARSE - bool "aiffparse" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_AMRPARSE - bool "amrparse" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_ASFMUX - bool "asfmux" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_APEXSINK - bool "apexsink" - select BR2_PACKAGE_OPENSSL - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_AUTOCONVERT - bool "autoconvert" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CAMERABIN - bool "camerabin" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LEGACYRESAMPLE - bool "legacyresample" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_BAYER - bool "bayer" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CDAUDIO - bool "cdaudio" - select BR2_PACKAGE_LIBCDAUDIO - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CDXAPARSE - bool "cdxaparse" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DCCP - bool "dccp" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DEBUGUTILS - bool "debugutils" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DTMF - bool "dtmf" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DVDNAV - bool "dvdnav" - depends on BR2_LARGEFILE # libdvdread - select BR2_PACKAGE_LIBDVDNAV - -comment "dvdnav requires a toolchain with LARGEFILE support" - depends on !BR2_LARGEFILE - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DVDSPU - bool "dvdspu" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FESTIVAL - bool "festival" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FREEZE - bool "freeze" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FREI0R - bool "frei0r" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_H264PARSE - bool "h264parse" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_HDVPARSE - bool "hdvparse" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LIBRFB - bool "librfb" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LIVEADDER - bool "liveadder" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGDEMUX - bool "mpegdemux" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGTSMUX - bool "mpegtsmux" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEG4VIDEOPARSE - bool "mpeg4videoparse" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGVIDEOPARSE - bool "mpegvideoparse" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MVE - bool "mve" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MXF - bool "mxf" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_NSF - bool "nsf" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_NUVDEMUX - bool "nuvdemux" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_PCAPPARSE - bool "pcapparse" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_QTMUX - bool "qtmux" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_RAWPARSE - bool "rawparse" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_REAL - bool "real" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_RTPMANAGER - bool "rtpmanager" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_RTPMUX - bool "rtpmux" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SCALETEMPO - bool "scaletempo" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SDP - bool "sdp" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SELECTOR - bool "selector" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SHAPEWIPE - bool "shapewipe" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SIREN - bool "siren" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SPEED - bool "speed" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SUBENC - bool "subenc" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_STEREO - bool "stereo" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_TTA - bool "tta" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VALVE - bool "valve" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VIDEOSIGNAL - bool "videosignal" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VMNC - bool "vmnc" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_XDGMIME - bool "xdgmime" - -comment "plugins with external dependencies (there may be more available)" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DIRECTFB - bool "directfb" - select BR2_PACKAGE_DIRECTFB - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DVB - bool "dvb" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FBDEV - bool "fbdev" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_NEON - bool "neon" - select BR2_PACKAGE_NEON - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_OSS4 - bool "oss4" - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SDL - bool "sdl" - select BR2_PACKAGE_SDL - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_TREMOR - bool "tremor" - select BR2_PACKAGE_TREMOR - -config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VCD - bool "vcd" - -endif - diff --git a/package/multimedia/gst-plugins-bad/gst-plugins-bad.mk b/package/multimedia/gst-plugins-bad/gst-plugins-bad.mk deleted file mode 100644 index 357acf3b35..0000000000 --- a/package/multimedia/gst-plugins-bad/gst-plugins-bad.mk +++ /dev/null @@ -1,370 +0,0 @@ -############################################################# -# -# gst-plugins-bad -# -############################################################# -GST_PLUGINS_BAD_VERSION = 0.10.21 -GST_PLUGINS_BAD_SOURCE = gst-plugins-bad-$(GST_PLUGINS_BAD_VERSION).tar.bz2 -GST_PLUGINS_BAD_SITE = http://gstreamer.freedesktop.org/src/gst-plugins-bad - -GST_PLUGINS_BAD_CONF_OPT = \ - --disable-examples - -GST_PLUGINS_BAD_DEPENDENCIES = gst-plugins-base gstreamer - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_AACPARSE),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-aacparse -else -GST_PLUGINS_BAD_CONF_OPT += --disable-aacparse -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_AIFFPARSE),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-aiffparse -else -GST_PLUGINS_BAD_CONF_OPT += --disable-aiffparse -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_AMRPARSE),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-amrparse -else -GST_PLUGINS_BAD_CONF_OPT += --disable-amrparse -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_ASFMUX),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-asfmux -else -GST_PLUGINS_BAD_CONF_OPT += --disable-asfmux -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_APEXSINK),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-apexsink -GST_PLUGINS_BAD_DEPENDENCIES += openssl -else -GST_PLUGINS_BAD_CONF_OPT += --disable-apexsink -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_AUTOCONVERT),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-autoconvert -else -GST_PLUGINS_BAD_CONF_OPT += --disable-autoconvert -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CAMERABIN),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-camerabin -else -GST_PLUGINS_BAD_CONF_OPT += --disable-camerabin -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LEGACYRESAMPLE),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-legacyresample -else -GST_PLUGINS_BAD_CONF_OPT += --disable-legacyresample -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_BAYER),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-bayer -else -GST_PLUGINS_BAD_CONF_OPT += --disable-bayer -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CDXAPARSE),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-cdxaparse -else -GST_PLUGINS_BAD_CONF_OPT += --disable-cdxaparse -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CDAUDIO),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-cdaudio -GST_PLUGINS_BAD_DEPENDENCIES += libcdaudio -else -GST_PLUGINS_BAD_CONF_OPT += --disable-cdaudio -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DCCP),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-dccp -else -GST_PLUGINS_BAD_CONF_OPT += --disable-dccp -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DEBUGUTILS),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-debugutils -else -GST_PLUGINS_BAD_CONF_OPT += --disable-debugutils -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DTMF),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-dtmf -else -GST_PLUGINS_BAD_CONF_OPT += --disable-dtmf -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DVDNAV),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-dvdnav -GST_PLUGINS_BAD_DEPENDENCIES += libdvdnav -else -GST_PLUGINS_BAD_CONF_OPT += --disable-dvdnav -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DVDSPU),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-dvdspu -else -GST_PLUGINS_BAD_CONF_OPT += --disable-dvdspu -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FESTIVAL),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-festival -else -GST_PLUGINS_BAD_CONF_OPT += --disable-festival -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FREEZE),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-freeze -else -GST_PLUGINS_BAD_CONF_OPT += --disable-freeze -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FREI0R),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-frei0r -else -GST_PLUGINS_BAD_CONF_OPT += --disable-frei0r -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_H264PARSE),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-h264parse -else -GST_PLUGINS_BAD_CONF_OPT += --disable-h264parse -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_HDVPARSE),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-hdvparse -else -GST_PLUGINS_BAD_CONF_OPT += --disable-hdvparse -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LIBRFB),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-librfb -else -GST_PLUGINS_BAD_CONF_OPT += --disable-librfb -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LIVEADDER),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-liveadder -else -GST_PLUGINS_BAD_CONF_OPT += --disable-liveadder -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGDEMUX),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-mpegdemux -else -GST_PLUGINS_BAD_CONF_OPT += --disable-mpegdemux -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGTSMUX),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-mpegtsmux -else -GST_PLUGINS_BAD_CONF_OPT += --disable-mpegtsmux -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEG4VIDEOPARSE),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-mpeg4videoparse -else -GST_PLUGINS_BAD_CONF_OPT += --disable-mpeg4videoparse -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGVIDEOPARSE),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-mpegvideoparse -else -GST_PLUGINS_BAD_CONF_OPT += --disable-mpegvideoparse -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MVE),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-mve -else -GST_PLUGINS_BAD_CONF_OPT += --disable-mve -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MXF),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-mxf -else -GST_PLUGINS_BAD_CONF_OPT += --disable-mxf -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_NSF),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-nsf -else -GST_PLUGINS_BAD_CONF_OPT += --disable-nsf -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_NUVDEMUX),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-nuvdemux -else -GST_PLUGINS_BAD_CONF_OPT += --disable-nuvdemux -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_PCAPPARSE),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-pcapparse -else -GST_PLUGINS_BAD_CONF_OPT += --disable-pcapparse -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_QTMUX),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-qtmux -else -GST_PLUGINS_BAD_CONF_OPT += --disable-qtmux -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_RAWPARSE),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-rawparse -else -GST_PLUGINS_BAD_CONF_OPT += --disable-rawparse -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_REAL),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-real -else -GST_PLUGINS_BAD_CONF_OPT += --disable-real -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_RTPMANAGER),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-rtpmanager -else -GST_PLUGINS_BAD_CONF_OPT += --disable-rtpmanager -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_RTPMUX),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-rtpmux -else -GST_PLUGINS_BAD_CONF_OPT += --disable-rtpmux -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SCALETEMPO),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-scaletempo -else -GST_PLUGINS_BAD_CONF_OPT += --disable-scaletempo -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SDP),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-sdp -else -GST_PLUGINS_BAD_CONF_OPT += --disable-sdp -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SELECTOR),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-selector -else -GST_PLUGINS_BAD_CONF_OPT += --disable-selector -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SHAPEWIPE),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-shapewipe -else -GST_PLUGINS_BAD_CONF_OPT += --disable-shapewipe -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SIREN),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-siren -else -GST_PLUGINS_BAD_CONF_OPT += --disable-siren -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SPEED),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-speed -else -GST_PLUGINS_BAD_CONF_OPT += --disable-speed -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SUBENC),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-subenc -else -GST_PLUGINS_BAD_CONF_OPT += --disable-subenc -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_STEREO),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-stereo -else -GST_PLUGINS_BAD_CONF_OPT += --disable-stereo -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_TTA),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-tta -else -GST_PLUGINS_BAD_CONF_OPT += --disable-tta -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VALVE),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-valve -else -GST_PLUGINS_BAD_CONF_OPT += --disable-valve -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VIDEOSIGNAL),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-videosignal -else -GST_PLUGINS_BAD_CONF_OPT += --disable-videosignal -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VMNC),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-vmnc -else -GST_PLUGINS_BAD_CONF_OPT += --disable-vmnc -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_XDGMIME),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-xdgmime -else -GST_PLUGINS_BAD_CONF_OPT += --disable-xdgmime -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DIRECTFB),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-directfb -GST_PLUGINS_BAD_DEPENDENCIES += directfb -else -GST_PLUGINS_BAD_CONF_OPT += --disable-directfb -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DVB),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-dvb -else -GST_PLUGINS_BAD_CONF_OPT += --disable-dvb -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FBDEV),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-fbdev -else -GST_PLUGINS_BAD_CONF_OPT += --disable-fbdev -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_NEON),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-neon -GST_PLUGINS_BAD_DEPENDENCIES += neon -else -GST_PLUGINS_BAD_CONF_OPT += --disable-neon -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_OSS4),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-oss4 -else -GST_PLUGINS_BAD_CONF_OPT += --disable-oss4 -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SDL),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-sdl -GST_PLUGINS_BAD_DEPENDENCIES += sdl -else -GST_PLUGINS_BAD_CONF_OPT += --disable-sdl -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_TREMOR),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-ivorbis -GST_PLUGINS_BAD_DEPENDENCIES += tremor -else -GST_PLUGINS_BAD_CONF_OPT += --disable-ivorbis -endif - -ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VCD),y) -GST_PLUGINS_BAD_CONF_OPT += --enable-vcd -else -GST_PLUGINS_BAD_CONF_OPT += --disable-vcd -endif - -$(eval $(call AUTOTARGETS,package/multimedia,gst-plugins-bad)) diff --git a/package/multimedia/gst-plugins-base/Config.in b/package/multimedia/gst-plugins-base/Config.in deleted file mode 100644 index 09c243cb6f..0000000000 --- a/package/multimedia/gst-plugins-base/Config.in +++ /dev/null @@ -1,91 +0,0 @@ -menuconfig BR2_PACKAGE_GST_PLUGINS_BASE - bool "gst-plugins-base" - depends on BR2_PACKAGE_GSTREAMER - help - A basic set of well-supported plug-ins for GStreamer. - - http://gstreamer.freedesktop.org/ - -if BR2_PACKAGE_GST_PLUGINS_BASE - -comment "dependency-less plugins" - -config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_ADDER - bool "adder" - -config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_APP - bool "app" - -config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_AUDIOCONVERT - bool "audioconvert (mandatory for audio playback)" - default y - -config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_AUDIORATE - bool "audiorate" - -config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_AUDIORESAMPLE - bool "audioresample (mandatory for audio playback)" - default y - -config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_AUDIOTESTSRC - bool "audiotestsrc" - -config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_FFMPEGCOLORSPACE - bool "ffmpegcolorspace (mandatory for video playback)" - default y - -config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_GDP - bool "gdp" - -config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_PLAYBACK - bool "playback (mandatory)" - default y - -config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_SUBPARSE - bool "subparse" - -config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_TCP - bool "tcp" - -config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_TYPEFIND - bool "typefind (mandatory)" - default y - -config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_VIDEOTESTSRC - bool "videotestsrc" - -config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_VIDEORATE - bool "videorate" - -config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_VIDEOSCALE - bool "videoscale (mandatory for video playback)" - default y - -config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_VOLUME - bool "volume (mandatory for audio playback)" - default y - -comment "plugins with external dependencies (there may be more available)" - -config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_OGG - bool "ogg (*.ogg audio/video)" - select BR2_PACKAGE_LIBOGG - -config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_PANGO - bool "pango font renderer" - depends on BR2_INSTALL_LIBSTDCPP - select BR2_PACKAGE_PANGO - -comment "pango plugin requires a toolchain with C++ support" - depends on !BR2_INSTALL_LIBSTDCPP - -config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_THEORA - bool "theora (*.ogg video)" - select BR2_PACKAGE_LIBTHEORA - -config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_VORBIS - bool "vorbis (*.ogg audio)" - select BR2_PACKAGE_LIBVORBIS - -endif - diff --git a/package/multimedia/gst-plugins-good/Config.in b/package/multimedia/gst-plugins-good/Config.in deleted file mode 100644 index 368642f6c1..0000000000 --- a/package/multimedia/gst-plugins-good/Config.in +++ /dev/null @@ -1,191 +0,0 @@ -menuconfig BR2_PACKAGE_GST_PLUGINS_GOOD - bool "gst-plugins-good" - depends on BR2_PACKAGE_GSTREAMER - select BR2_PACKAGE_GST_PLUGINS_BASE - help - A set of well-supported plug-ins for GStreamer under the preferred - license. - - http://gstreamer.freedesktop.org/ - -if BR2_PACKAGE_GST_PLUGINS_GOOD - -config BR2_PACKAGE_GST_PLUGINS_GOOD_JPEG - bool "jpeg (JPEG support)" - select BR2_PACKAGE_JPEG - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PNG - bool "png (PNG support)" - select BR2_PACKAGE_LIBPNG - -config BR2_PACKAGE_GST_PLUGINS_GOOD_BZ2 - bool "bz2 support" - depends on BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_MATROSKA - select BR2_PACKAGE_BZIP2 - help - Enable bz2 support for the following plugins: - matroska - -config BR2_PACKAGE_GST_PLUGINS_GOOD_ZLIB - bool "zlib support" - depends on BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_QTDEMUX || BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ID3DEMUX || BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_MATROSKA - select BR2_PACKAGE_ZLIB - help - Enable zlib support for the following plugins: - id3demux, qtdemux, matroska - -comment "dependency-less plugins" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_VIDEOFILTER - bool "videofilter" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ALPHA - bool "alpha" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_APETAG - bool "apetag" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_AUDIOFX - bool "audiofx" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_AUPARSE - bool "auparse" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_AUTODETECT - bool "autodetect" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_AVI - bool "avi (*.avi video)" - default y - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_CUTTER - bool "cutter" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_DEBUGUTILS - bool "debugutils" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_DEINTERLACE - bool "deinterlace" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_EFFECTV - bool "effectv" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_EQUALIZER - bool "equalizer" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_FLV - bool "flv" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ID3DEMUX - bool "id3demux (*.mp3 audio)" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ICYDEMUX - bool "icydemux" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_INTERLEAVE - bool "interleave" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_FLX - bool "flx" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_GOOM - bool "goom" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_GOOM2K1 - bool "goom2k1" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_LAW - bool "law" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_LEVEL - bool "level" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_MATROSKA - bool "matroska" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_MONOSCOPE - bool "monoscope" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_MULTIFILE - bool "multifile" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_MULTIPART - bool "multipart" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_QTDEMUX - bool "qtdemux" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_REPLAYGAIN - bool "replaygain" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_RTP - bool "rtp" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_RTPMANAGER - bool "rtpmanager" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_RTSP - bool "rtsp" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_SMPTE - bool "smpte" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_SPECTRUM - bool "spectrum" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_UDP - depends on BR2_INET_IPV6 - bool "udp" - -comment "udp requires a toolchain with IPv6 support" - depends on !BR2_INET_IPV6 - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_VIDEOBOX - bool "videobox" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_VIDEOCROP - bool "videocrop" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_VIDEOMIXER - bool "videomixer" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_WAVENC - bool "wavenc" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_WAVPARSE - bool "wavparse (*.wav audio)" - default y - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_Y4M - bool "y4m" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_V4L2 - bool "v4l2" - -comment "plugins with external dependencies" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ANNODEX - bool "annodex (XML Library)" - select BR2_PACKAGE_LIBXML2 - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_CAIRO - bool "cairo" - select BR2_PACKAGE_CAIRO - select BR2_PACKAGE_CAIRO_PNG - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_FLAC - bool "flac (libFLAC)" - select BR2_PACKAGE_FLAC - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_OSS - bool "ossaudio (OSS audio)" - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_SOUPHTTPSRC - bool "souphttpsrc (http client)" - select BR2_PACKAGE_LIBSOUP - -config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_SPEEX - bool "speex" - select BR2_PACKAGE_SPEEX - -endif diff --git a/package/multimedia/gst-plugins-ugly/Config.in b/package/multimedia/gst-plugins-ugly/Config.in deleted file mode 100644 index 9f738cf175..0000000000 --- a/package/multimedia/gst-plugins-ugly/Config.in +++ /dev/null @@ -1,54 +0,0 @@ -menuconfig BR2_PACKAGE_GST_PLUGINS_UGLY - bool "gst-plugins-ugly" - depends on BR2_PACKAGE_GSTREAMER - select BR2_PACKAGE_GST_PLUGINS_BASE - help - A set of well-supported plug-ins for GStreamer, but might pose - problems for distributors. - - http://gstreamer.freedesktop.org/ - -if BR2_PACKAGE_GST_PLUGINS_UGLY - -comment "dependency-less plugins" - -config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_ASFDEMUX - bool "asfdemux" - -config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_DVDLPCMDEC - bool "dvdlpcmdec" - -config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_DVDSUB - bool "dvdsub" - -config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_IEC958 - bool "iec958" - -config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_MPEGAUDIOPARSE - bool "mpegaudioparse" - -config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_MPEGSTREAM - bool "mpegstream" - -config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_REALMEDIA - bool "realmedia" - -config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_SYNAESTHESIA - bool "synaesthesia" - -comment "plugins with external dependencies (there may be more available)" - -config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_ID3TAG - bool "id3tag" - select BR2_PACKAGE_LIBID3TAG - -config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_MAD - bool "mad (*.mp3 audio)" - select BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_ID3TAG - select BR2_PACKAGE_LIBMAD - -config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_MPEG2DEC - bool "mpeg2dec" - select BR2_PACKAGE_LIBMPEG2 - -endif diff --git a/package/multimedia/gstreamer/Config.in b/package/multimedia/gstreamer/Config.in deleted file mode 100644 index 7de904c8c9..0000000000 --- a/package/multimedia/gstreamer/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_GSTREAMER - bool "gstreamer" - depends on BR2_USE_WCHAR # glib2 - select BR2_PACKAGE_LIBGLIB2 - help - GStreamer is an open source multimedia framework. - - http://gstreamer.freedesktop.org/ - -comment "gstreamer requires a toolchain with WCHAR support" - depends on !BR2_USE_WCHAR diff --git a/package/multimedia/gstreamer/gstreamer.mk b/package/multimedia/gstreamer/gstreamer.mk deleted file mode 100644 index db5ccaf650..0000000000 --- a/package/multimedia/gstreamer/gstreamer.mk +++ /dev/null @@ -1,26 +0,0 @@ -############################################################# -# -# gstreamer -# -############################################################# -GSTREAMER_VERSION = 0.10.32 -GSTREAMER_SOURCE = gstreamer-$(GSTREAMER_VERSION).tar.bz2 -GSTREAMER_SITE = http://gstreamer.freedesktop.org/src/gstreamer -GSTREAMER_INSTALL_STAGING = YES - -# Checking if unaligned memory access works correctly cannot be done when cross -# compiling. For the following architectures there is no information available -# in the configure script. -ifeq ($(BR2_avr32),y) -GSTREAMER_CONF_ENV = as_cv_unaligned_access=no -endif - -GSTREAMER_CONF_OPT = \ - --disable-examples \ - --disable-tests \ - --disable-failing-tests \ - --disable-loadsave - -GSTREAMER_DEPENDENCIES = libglib2 host-pkg-config - -$(eval $(call AUTOTARGETS,package/multimedia,gstreamer)) diff --git a/package/multimedia/lame/lame-no-static.patch b/package/multimedia/lame/lame-no-static.patch deleted file mode 100644 index f507f7f708..0000000000 --- a/package/multimedia/lame/lame-no-static.patch +++ /dev/null @@ -1,28 +0,0 @@ -We don't want statically compiled binaries by force so nuke that. - -Signed-off-by: Gustavo Zacarias - -diff -Nura lame-3.98.4/frontend/Makefile.am lame-3.98.4.nostatic/frontend/Makefile.am ---- lame-3.98.4/frontend/Makefile.am 2006-09-30 06:17:05.000000000 -0300 -+++ lame-3.98.4.nostatic/frontend/Makefile.am 2011-02-10 13:46:05.512559590 -0300 -@@ -52,7 +52,7 @@ - endif - - CFLAGS = @CFLAGS@ @GTK_CFLAGS@ @FRONTEND_CFLAGS@ @SNDFILE_CFLAGS@ --LDFLAGS = @LDFLAGS@ @FRONTEND_LDFLAGS@ @SNDFILE_LIBS@ -static -+LDFLAGS = @LDFLAGS@ @FRONTEND_LDFLAGS@ @SNDFILE_LIBS@ - - INCLUDES = -I$(top_srcdir)/libmp3lame -I$(top_srcdir)/include -I$(top_builddir) - -diff -Nura lame-3.98.4/frontend/Makefile.in lame-3.98.4.nostatic/frontend/Makefile.in ---- lame-3.98.4/frontend/Makefile.in 2008-06-25 09:17:51.000000000 -0300 -+++ lame-3.98.4.nostatic/frontend/Makefile.in 2011-02-10 13:45:54.752559590 -0300 -@@ -152,7 +152,7 @@ - $(top_builddir)/libmp3lame/libmp3lame.la \ - @FRONTEND_LDADD@ - --LDFLAGS = @LDFLAGS@ @FRONTEND_LDFLAGS@ @SNDFILE_LIBS@ -static -+LDFLAGS = @LDFLAGS@ @FRONTEND_LDFLAGS@ @SNDFILE_LIBS@ - LIBOBJS = @LIBOBJS@ - LIBS = @LIBS@ - LIBTOOL = @LIBTOOL@ diff --git a/package/multimedia/lame/lame.mk b/package/multimedia/lame/lame.mk deleted file mode 100644 index 841cbffb02..0000000000 --- a/package/multimedia/lame/lame.mk +++ /dev/null @@ -1,29 +0,0 @@ -############################################################# -# -# lame -# -############################################################# - -LAME_VERSION = 3.98.4 -LAME_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/lame -LAME_DEPENDENCIES = host-pkg-config -LAME_INSTALL_STAGING = YES - -ifeq ($(BR2_PACKAGE_LIBSNDFILE),y) -LAME_DEPENDENCIES += libsndfile -LAME_CONF_OPT += --with-fileio=sndfile -endif - -ifeq ($(BR2_PACKAGE_NCURSES),y) -LAME_DEPENDENCIES += ncurses -endif - -ifeq ($(BR2_ENDIAN),"BIG") -define LAME_BIGENDIAN_ARCH - echo "#define WORDS_BIGENDIAN 1" >>$(@D)/config.h -endef -endif - -LAME_POST_CONFIGURE_HOOKS += LAME_BIGENDIAN_ARCH - -$(eval $(call AUTOTARGETS,package/multimedia,lame)) diff --git a/package/multimedia/libao/libao.mk b/package/multimedia/libao/libao.mk deleted file mode 100644 index ee02d18c5b..0000000000 --- a/package/multimedia/libao/libao.mk +++ /dev/null @@ -1,21 +0,0 @@ -############################################################# -# -# libao -# -############################################################# - -LIBAO_VERSION = 1.0.0 -LIBAO_SITE = http://downloads.xiph.org/releases/ao -LIBAO_DEPENDENCIES = host-pkg-config -LIBAO_INSTALL_STAGING = YES -LIBAO_CONF_OPT = --disable-esd --disable-wmm --disable-arts \ - --disable-nas --disable-pulse - -ifeq ($(BR2_PACKAGE_ALSA_LIB),y) -LIBAO_DEPENDENCIES += alsa-lib -LIBAO_CONF_OPT += --enable-alsa --enable-alsa-mmap -else -LIBAO_CONF_OPT += --disable-alsa -endif - -$(eval $(call AUTOTARGETS,package/multimedia,libao)) diff --git a/package/multimedia/libcdaudio/libcdaudio.mk b/package/multimedia/libcdaudio/libcdaudio.mk deleted file mode 100644 index 2f37cc24af..0000000000 --- a/package/multimedia/libcdaudio/libcdaudio.mk +++ /dev/null @@ -1,15 +0,0 @@ -############################################################# -# -# libcdaudio -# -############################################################# - -LIBCDAUDIO_VERSION = 0.99.12p2 -LIBCDAUDIO_SOURCE = libcdaudio-$(LIBCDAUDIO_VERSION).tar.gz -LIBCDAUDIO_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/project/libcdaudio/libcdaudio/$(LIBCDAUDIO_VERSION)/ -LIBCDAUDIO_AUTORECONF = YES -LIBCDAUDIO_LIBTOOL_PATCH = YES -LIBCDAUDIO_INSTALL_STAGING = YES -LIBCDAUDIO_INSTALL_TARGET = YES - -$(eval $(call AUTOTARGETS,package/multimedia,libcdaudio)) diff --git a/package/multimedia/libcue/Config.in b/package/multimedia/libcue/Config.in deleted file mode 100644 index e5e2e16265..0000000000 --- a/package/multimedia/libcue/Config.in +++ /dev/null @@ -1,8 +0,0 @@ -config BR2_PACKAGE_LIBCUE - bool "libcue" - select BR2_PACKAGE_FLEX - select BR2_PACKAGE_FLEX_LIBFL - help - CUE Sheet Parser Library - - http://libcue.sourceforge.net/ diff --git a/package/multimedia/libcue/libcue.mk b/package/multimedia/libcue/libcue.mk deleted file mode 100644 index 2de0423147..0000000000 --- a/package/multimedia/libcue/libcue.mk +++ /dev/null @@ -1,13 +0,0 @@ -################################################################################ -# -# libcue -# -################################################################################ - -LIBCUE_VERSION = 1.4.0 -LIBCUE_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/libcue -LIBCUE_SOURCE = libcue-$(LIBCUE_VERSION).tar.bz2 -LIBCUE_DEPENDENCIES = flex -LIBCUE_INSTALL_STAGING = YES - -$(eval $(call AUTOTARGETS,package/multimedia,libcue)) diff --git a/package/multimedia/libdvdnav/Config.in b/package/multimedia/libdvdnav/Config.in deleted file mode 100644 index 5ba31e8752..0000000000 --- a/package/multimedia/libdvdnav/Config.in +++ /dev/null @@ -1,13 +0,0 @@ -config BR2_PACKAGE_LIBDVDNAV - bool "libdvdnav" - depends on BR2_LARGEFILE # libdvdread - select BR2_PACKAGE_LIBDVDREAD - help - libdvdnav is a library that allows easy use of sophisticated - DVD navigation features such as DVD menus, multiangle - playback and even interactive DVD games. - - http://www.mplayerhq.hu - -comment "libdvdnav requires a toolchain with LARGEFILE support" - depends on !BR2_LARGEFILE diff --git a/package/multimedia/libdvdnav/libdvdnav.mk b/package/multimedia/libdvdnav/libdvdnav.mk deleted file mode 100644 index b3fea2fd2e..0000000000 --- a/package/multimedia/libdvdnav/libdvdnav.mk +++ /dev/null @@ -1,20 +0,0 @@ -############################################################# -# -# libdvdnav -# -############################################################# - -LIBDVDNAV_VERSION = 4.1.3 -LIBDVDNAV_SOURCE = libdvdnav-$(LIBDVDNAV_VERSION).tar.bz2 -LIBDVDNAV_SITE = http://www.mplayerhq.hu/MPlayer/releases/dvdnav -LIBDVDNAV_AUTORECONF = YES -LIBDVDNAV_INSTALL_STAGING = YES -LIBDVDNAV_INSTALL_TARGET = YES - -LIBDVDNAV_DEPENDENCIES = libdvdread - -# By default libdvdnav tries to find dvdread-config in $PATH. Because -# of cross compilation, we prefer using pkg-config. -LIBDVDNAV_CONF_OPT = --with-dvdread-config="$(PKG_CONFIG_HOST_BINARY) dvdread" - -$(eval $(call AUTOTARGETS,package/multimedia,libdvdnav)) diff --git a/package/multimedia/libdvdread/Config.in b/package/multimedia/libdvdread/Config.in deleted file mode 100644 index b63f082861..0000000000 --- a/package/multimedia/libdvdread/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_LIBDVDREAD - bool "libdvdread" - depends on BR2_LARGEFILE - help - libdvdread provides a simple foundation for reading - DVD-Video images. - - http://www.mplayerhq.hu/MPlayer/releases/dvdnav/ - -comment "libdvdread requires a toolchain with LARGEFILE support" - depends on !BR2_LARGEFILE diff --git a/package/multimedia/libdvdread/libdvdread.mk b/package/multimedia/libdvdread/libdvdread.mk deleted file mode 100644 index 98b2ef5c32..0000000000 --- a/package/multimedia/libdvdread/libdvdread.mk +++ /dev/null @@ -1,15 +0,0 @@ -############################################################# -# -# libdvdread -# -############################################################# - -LIBDVDREAD_VERSION = 4.1.3 -LIBDVDREAD_SOURCE = libdvdread-$(LIBDVDREAD_VERSION).tar.bz2 -LIBDVDREAD_SITE = http://www.mplayerhq.hu/MPlayer/releases/dvdnav/ -LIBDVDREAD_AUTORECONF = YES -LIBDVDREAD_LIBTOOL_PATCH = YES -LIBDVDREAD_INSTALL_STAGING = YES -LIBDVDREAD_INSTALL_TARGET = YES - -$(eval $(call AUTOTARGETS,package/multimedia,libdvdread)) diff --git a/package/multimedia/libid3tag/libid3tag.mk b/package/multimedia/libid3tag/libid3tag.mk deleted file mode 100644 index bcb110f8c2..0000000000 --- a/package/multimedia/libid3tag/libid3tag.mk +++ /dev/null @@ -1,14 +0,0 @@ -############################################################# -# -# libid3tag -# -############################################################# - -LIBID3TAG_VERSION:=0.15.1b -LIBID3TAG_SOURCE:=libid3tag-$(LIBID3TAG_VERSION).tar.gz -LIBID3TAG_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/mad -LIBID3TAG_INSTALL_STAGING=YES -LIBID3TAG_DEPENDENCIES=zlib -LIBID3TAG_LIBTOOL_PATCH=NO - -$(eval $(call AUTOTARGETS,package/multimedia,libid3tag)) diff --git a/package/multimedia/libmad/Config.in b/package/multimedia/libmad/Config.in deleted file mode 100644 index 4d4f9301a6..0000000000 --- a/package/multimedia/libmad/Config.in +++ /dev/null @@ -1,8 +0,0 @@ -config BR2_PACKAGE_LIBMAD - bool "libmad" - help - High-quality MPEG audio decoder. All computations are performed - with fixed-point integer arithmetic, making it ideal for systems - without a floating-point unit. - - http://www.underbit.com/products/mad/ diff --git a/package/multimedia/libmad/libmad.mk b/package/multimedia/libmad/libmad.mk deleted file mode 100644 index d129aad326..0000000000 --- a/package/multimedia/libmad/libmad.mk +++ /dev/null @@ -1,35 +0,0 @@ -############################################################# -# -# libmad -# -############################################################# - -LIBMAD_VERSION = 0.15.1b -LIBMAD_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/mad/ -LIBMAD_INSTALL_STAGING = YES -LIBMAD_LIBTOOL_PATCH = NO - -define LIBMAD_PREVENT_AUTOMAKE - # Prevent automake from running. - (cd $(@D); touch -c config* aclocal.m4 Makefile*); -endef - -define LIBMAD_INSTALL_STAGING_PC - $(INSTALL) -D package/multimedia/libmad/mad.pc \ - $(STAGING_DIR)/usr/lib/pkgconfig/mad.pc -endef - -define LIBMAD_INSTALL_TARGET_PC - $(INSTALL) -D package/multimedia/libmad/mad.pc \ - $(TARGET_DIR)/usr/lib/pkgconfig/mad.pc -endef - -LIBMAD_POST_PATCH_HOOKS += LIBMAD_PREVENT_AUTOMAKE -LIBMAD_POST_INSTALL_STAGING_HOOKS += LIBMAD_INSTALL_STAGING_PC -LIBMAD_POST_INSTALL_TARGET_HOOKS += LIBMAD_INSTALL_TARGET_PC - -LIBMAD_CONF_OPT = \ - --disable-debugging \ - --enable-speed - -$(eval $(call AUTOTARGETS,package/multimedia,libmad)) diff --git a/package/multimedia/libmms/Config.in b/package/multimedia/libmms/Config.in deleted file mode 100644 index 17cb406a62..0000000000 --- a/package/multimedia/libmms/Config.in +++ /dev/null @@ -1,15 +0,0 @@ -config BR2_PACKAGE_LIBMMS - bool "libmms" - depends on BR2_USE_WCHAR # glib2 - select BR2_PACKAGE_LIBGLIB2 - help - LibMMS is a common library for parsing mms:// and mmsh:// - type network streams. These are commonly used to stream - Windows Media Video content over the web. LibMMS itself is - only for receiving MMS stream, it doesn't handle sending at - all. - - http://launchpad.net/libmms - -comment "libmms requires a toolchain with WCHAR support" - depends on !BR2_USE_WCHAR diff --git a/package/multimedia/libmms/libmms-prevent-unaligned-dereferences.patch b/package/multimedia/libmms/libmms-prevent-unaligned-dereferences.patch deleted file mode 100644 index 9c606eb29e..0000000000 --- a/package/multimedia/libmms/libmms-prevent-unaligned-dereferences.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 4fd16633a8c379971425f7fd482152f163b09158 Mon Sep 17 00:00:00 2001 -From: Paul Burton -Date: Fri, 17 Sep 2010 14:08:57 +0100 -Subject: [PATCH] Endianness macros should not dereference unaligned pointers - -The LE_*/BE_* macros previously worked by casting the pointer passed to them to a pointer to the correct integer type, then dereferencing it. This will not work on architectures which don't allow unaligned data access. Instead, access one byte at a time and shift to form the value. ---- - src/bswap.h | 59 +++++++++++++++++++++++++++++++++++++++++++---------------- - 1 files changed, 43 insertions(+), 16 deletions(-) - -diff --git a/src/bswap.h b/src/bswap.h -index b731da7..59e8716 100644 ---- a/src/bswap.h -+++ b/src/bswap.h -@@ -21,23 +21,50 @@ - */ - - --/* Go cheap now, will rip out glib later. *Sigh* */ --#include -- --/* NOTE: -- * Now, to clear up confusion: LE_XX means "from LE to native, XX bits wide" -- * I know it's not very clear naming (tell me about it, I -- * misinterpreted in first version and caused bad nasty bug, *sigh*), -- * but that's inherited code, will clean up as things go -- * Oh, and one more thing -- they take *pointers*, not actual ints -- */ -+#include -+ -+#define SWAP_ENDIAN_16(val) \ -+ (val[1] | (val[0] << 8)) -+#define SWAP_ENDIAN_32(val) \ -+ (val[3] | (val[2] << 8) | (val[1] << 16) | (val[0] << 24)) -+#define SWAP_ENDIAN_64(val) \ -+ (val[7] | (val[6] << 8) | (val[5] << 16) | (val[4] << 24) | \ -+ ((uint64_t)val[3] << 32) | ((uint64_t)val[2] << 40) | \ -+ ((uint64_t)val[1] << 48) | ((uint64_t)val[0] << 56)) -+ -+#define SAME_ENDIAN_16(val) \ -+ (val[0] | (val[1] << 8)) -+#define SAME_ENDIAN_32(val) \ -+ (val[0] | (val[1] << 8) | (val[2] << 16) | (val[3] << 24)) -+#define SAME_ENDIAN_64(val) \ -+ (val[0] | (val[1] << 8) | (val[2] << 16) | (val[3] << 24) | \ -+ ((uint64_t)val[4] << 32) | ((uint64_t)val[5] << 40) | \ -+ ((uint64_t)val[6] << 48) | ((uint64_t)val[7] << 56)) -+ -+#ifndef WORDS_BIGENDIAN -+ -+/* Little endian */ -+ -+#define LE_16(val) SAME_ENDIAN_16(((uint8_t *)(val))) -+#define LE_32(val) SAME_ENDIAN_32(((uint8_t *)(val))) -+#define LE_64(val) SAME_ENDIAN_64(((uint8_t *)(val))) -+#define BE_16(val) SWAP_ENDIAN_16(((uint8_t *)(val))) -+#define BE_32(val) SWAP_ENDIAN_32(((uint8_t *)(val))) -+#define BE_64(val) SWAP_ENDIAN_64(((uint8_t *)(val))) -+ -+#elif WORDS_BIGENDIAN == 1 -+ -+/* Big endian */ - --#define LE_16(val) (GINT16_FROM_LE (*((u_int16_t*)(val)))) --#define BE_16(val) (GINT16_FROM_BE (*((u_int16_t*)(val)))) --#define LE_32(val) (GINT32_FROM_LE (*((u_int32_t*)(val)))) --#define BE_32(val) (GINT32_FROM_BE (*((u_int32_t*)(val)))) -+#define LE_16(val) SWAP_ENDIAN_16(((uint8_t *)(val))) -+#define LE_32(val) SWAP_ENDIAN_32(((uint8_t *)(val))) -+#define LE_64(val) SWAP_ENDIAN_64(((uint8_t *)(val))) -+#define BE_16(val) SAME_ENDIAN_16(((uint8_t *)(val))) -+#define BE_32(val) SAME_ENDIAN_32(((uint8_t *)(val))) -+#define BE_64(val) SAME_ENDIAN_64(((uint8_t *)(val))) - --#define LE_64(val) (GINT64_FROM_LE (*((u_int64_t*)(val)))) --#define BE_64(val) (GINT64_FROM_BE (*((u_int64_t*)(val)))) -+#else -+#error Unknown endianness! -+#endif - - #endif /* BSWAP_H_INCLUDED */ --- -1.7.2.2 - diff --git a/package/multimedia/libmms/libmms.mk b/package/multimedia/libmms/libmms.mk deleted file mode 100644 index d11f0bead3..0000000000 --- a/package/multimedia/libmms/libmms.mk +++ /dev/null @@ -1,16 +0,0 @@ -############################################################# -# -# libmms -# -############################################################# -LIBMMS_VERSION = 0.6 -LIBMMS_SOURCE = libmms-$(LIBMMS_VERSION).tar.gz -LIBMMS_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/libmms - -LIBMMS_AUTORECONF = NO -LIBMMS_INSTALL_STAGING = YES -LIBMMS_INSTALL_TARGET = YES - -LIBMMS_DEPENDENCIES = host-pkg-config libglib2 - -$(eval $(call AUTOTARGETS,package/multimedia,libmms)) diff --git a/package/multimedia/libmpd/Config.in b/package/multimedia/libmpd/Config.in deleted file mode 100644 index 9259c19ee9..0000000000 --- a/package/multimedia/libmpd/Config.in +++ /dev/null @@ -1,14 +0,0 @@ -config BR2_PACKAGE_LIBMPD - bool "libmpd" - depends on BR2_USE_WCHAR # glib2 - select BR2_PACKAGE_LIBGLIB2 - select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE - help - High-level client library for accessing Music Player Daemon. - LibMpd is a library that provides high-level, callback-based - access to Music Player Daemon (mpd). - - http://gmpcwiki.sarine.nl/index.php?title=Libmpd - -comment "libmpd requires a toolchain with WCHAR support" - depends on !BR2_USE_WCHAR diff --git a/package/multimedia/libmpd/libmpd.mk b/package/multimedia/libmpd/libmpd.mk deleted file mode 100644 index 47a802abeb..0000000000 --- a/package/multimedia/libmpd/libmpd.mk +++ /dev/null @@ -1,12 +0,0 @@ -############################################################# -# -# libmpd -# -############################################################# -LIBMPD_VERSION = 0.17.0 -LIBMPD_SOURCE = libmpd-$(LIBMPD_VERSION).tar.gz -LIBMPD_SITE = http://download.sarine.nl/download/Programs/gmpc/$(LIBMPD_VERSION)/ -LIBMPD_INSTALL_STAGING = YES -LIBMPD_DEPENDENCIES = libglib2 - -$(eval $(call AUTOTARGETS,package/multimedia,libmpd)) diff --git a/package/multimedia/libmpeg2/libmpeg2.mk b/package/multimedia/libmpeg2/libmpeg2.mk deleted file mode 100644 index cd8ac89262..0000000000 --- a/package/multimedia/libmpeg2/libmpeg2.mk +++ /dev/null @@ -1,28 +0,0 @@ -############################################################# -# -# libmpeg2 -# -############################################################# -LIBMPEG2_VERSION = 0.5.1 -LIBMPEG2_SOURCE = libmpeg2-$(LIBMPEG2_VERSION).tar.gz -LIBMPEG2_SITE = http://libmpeg2.sourceforge.net/files/ -LIBMPEG2_INSTALL_STAGING = YES -LIBMPEG2_CONF_OPT = --without-x --disable-directx - -ifeq ($(BR2_PACKAGE_SDL),y) -LIBMPEG2_CONF_OPT += --enable-sdl -LIBMPEG2_DEPENDENCIES += sdl -else -LIBMPEG2_CONF_OPT += --disable-sdl -endif - -ifneq ($(BR2_PACKAGE_LIBMPEG2_BINS),y) -define LIBMPEG2_REMOVE_BINS - rm -f $(addprefix $(TARGET_DIR)/usr/bin/,\ - mpeg2dec corrupt_mpeg2 extract_mpeg2) -endef - -LIBMPEG2_POST_INSTALL_TARGET_HOOKS += LIBMPEG2_REMOVE_BINS -endif - -$(eval $(call AUTOTARGETS,package/multimedia,libmpeg2)) diff --git a/package/multimedia/libogg/Config.in b/package/multimedia/libogg/Config.in deleted file mode 100644 index effe74fb34..0000000000 --- a/package/multimedia/libogg/Config.in +++ /dev/null @@ -1,5 +0,0 @@ -config BR2_PACKAGE_LIBOGG - bool "libogg" - help - Ogg is the name of Xiph.org's container format for audio, - video, and metadata diff --git a/package/multimedia/libogg/libogg.mk b/package/multimedia/libogg/libogg.mk deleted file mode 100644 index 0fd6b27b32..0000000000 --- a/package/multimedia/libogg/libogg.mk +++ /dev/null @@ -1,15 +0,0 @@ -############################################################# -# -# libogg -# -############################################################# -LIBOGG_VERSION = 1.2.2 -LIBOGG_SOURCE = libogg-$(LIBOGG_VERSION).tar.gz -LIBOGG_SITE = http://downloads.xiph.org/releases/ogg -LIBOGG_AUTORECONF = NO -LIBOGG_INSTALL_STAGING = YES -LIBOGG_INSTALL_TARGET = YES - -LIBOGG_DEPENDENCIES = host-pkg-config - -$(eval $(call AUTOTARGETS,package/multimedia,libogg)) diff --git a/package/multimedia/libsndfile/Config.in b/package/multimedia/libsndfile/Config.in deleted file mode 100644 index 9afe4966c0..0000000000 --- a/package/multimedia/libsndfile/Config.in +++ /dev/null @@ -1,8 +0,0 @@ -config BR2_PACKAGE_LIBSNDFILE - bool "libsndfile" - help - Libsndfile is a C library for reading and writing files containing - sampled sound (such as MS Windows WAV and the Apple/SGI AIFF format) - through one standard library interface. - - http://www.mega-nerd.com/libsndfile/ diff --git a/package/multimedia/libsndfile/libsndfile.mk b/package/multimedia/libsndfile/libsndfile.mk deleted file mode 100644 index d554699b98..0000000000 --- a/package/multimedia/libsndfile/libsndfile.mk +++ /dev/null @@ -1,11 +0,0 @@ -############################################################# -# -# libsndfile -# -############################################################# - -LIBSNDFILE_VERSION = 1.0.23 -LIBSNDFILE_SITE = http://www.mega-nerd.com/libsndfile/files -LIBSNDFILE_INSTALL_STAGING = YES - -$(eval $(call AUTOTARGETS,package/multimedia,libsndfile)) diff --git a/package/multimedia/libtheora/libtheora.mk b/package/multimedia/libtheora/libtheora.mk deleted file mode 100644 index e572d1a204..0000000000 --- a/package/multimedia/libtheora/libtheora.mk +++ /dev/null @@ -1,20 +0,0 @@ -############################################################# -# -# libtheora -# -############################################################# -LIBTHEORA_VERSION = 1.1.1 -LIBTHEORA_SOURCE = libtheora-$(LIBTHEORA_VERSION).tar.bz2 -LIBTHEORA_SITE = http://downloads.xiph.org/releases/theora -LIBTHEORA_INSTALL_STAGING = YES - -LIBTHEORA_CONF_OPT = \ - --disable-oggtest \ - --disable-vorbistest \ - --disable-sdltest \ - --disable-examples \ - --disable-spec - -LIBTHEORA_DEPENDENCIES = libogg libvorbis host-pkg-config - -$(eval $(call AUTOTARGETS,package/multimedia,libtheora)) diff --git a/package/multimedia/libvorbis/libvorbis.mk b/package/multimedia/libvorbis/libvorbis.mk deleted file mode 100644 index 0570ea65d7..0000000000 --- a/package/multimedia/libvorbis/libvorbis.mk +++ /dev/null @@ -1,18 +0,0 @@ -############################################################# -# -# libvorbis -# -############################################################# - -LIBVORBIS_VERSION = 1.3.2 -LIBVORBIS_SOURCE = libvorbis-$(LIBVORBIS_VERSION).tar.gz -LIBVORBIS_SITE = http://downloads.xiph.org/releases/vorbis/$(LIBVORBIS-SOURCE) -LIBVORBIS_AUTORECONF = NO -LIBVORBIS_INSTALL_STAGING = YES -LIBVORBIS_INSTALL_TARGET = YES - -LIBVORBIS_CONF_OPT = --disable-oggtest - -LIBVORBIS_DEPENDENCIES = host-pkg-config libogg - -$(eval $(call AUTOTARGETS,package/multimedia,libvorbis)) diff --git a/package/multimedia/madplay/madplay.mk b/package/multimedia/madplay/madplay.mk deleted file mode 100644 index a2ac14d384..0000000000 --- a/package/multimedia/madplay/madplay.mk +++ /dev/null @@ -1,19 +0,0 @@ -############################################################# -# -# madplay -# -############################################################# -MADPLAY_VERSION:=0.15.2b -MADPLAY_SOURCE:=madplay-$(MADPLAY_VERSION).tar.gz -MADPLAY_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/mad -MADPLAY_LIBTOOL_PATCH=NO -MADPLAY_DEPENDENCIES=libmad libid3tag - -# Check if ALSA is built, then we should configure after alsa-lib so -# ./configure can find alsa-lib. -ifeq ($(BR2_PACKAGE_MADPLAY_ALSA),y) -MADPLAY_CONF_OPT+=--with-alsa -MADPLAY_DEPENDENCIES+=alsa-lib -endif - -$(eval $(call AUTOTARGETS,package/multimedia,madplay)) diff --git a/package/multimedia/mpd/Config.in b/package/multimedia/mpd/Config.in deleted file mode 100644 index b3491f22e4..0000000000 --- a/package/multimedia/mpd/Config.in +++ /dev/null @@ -1,164 +0,0 @@ -menuconfig BR2_PACKAGE_MPD - bool "mpd" - depends on BR2_INSTALL_LIBSTDCPP - depends on BR2_USE_WCHAR - select BR2_PACKAGE_LIBGLIB2 - select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE - select BR2_PACKAGE_MPD_TREMOR if !(BR2_PACKAGE_MPD_MAD || BR2_PACKAGE_MPD_MPG123 || BR2_PACKAGE_MPD_VORBIS || BR2_PACKAGE_MPD_WAVPACK || BR2_PACKAGE_MPD_FLAC || BR2_PACKAGE_MPD_MUSEPACK || BR2_PACKAGE_MPD_FFMPEG) - help - MPD is a flexible, powerful, server-side application - for playing music. Through plugins and libraries - it can play a variety of sound files while being - controlled by its network protocol. - - http://www.musicpd.org - -if BR2_PACKAGE_MPD - -config BR2_PACKAGE_MPD_ALSA - bool "alsa" - default y - select BR2_PACKAGE_ALSA_LIB - select BR2_PACKAGE_ALSA_LIB_PCM - select BR2_PACKAGE_ALSA_LIB_MIXER - help - Enable alsa output support. - -config BR2_PACKAGE_MPD_AO - bool "ao" - select BR2_PACKAGE_LIBAO - help - Enable libao output support. - -config BR2_PACKAGE_MPD_BZIP2 - bool "bzip2" - select BR2_PACKAGE_BZIP2 - help - Enable bzip2 archive support. - -config BR2_PACKAGE_MPD_CURL - bool "curl" - select BR2_PACKAGE_LIBCURL - help - Enable curl streaming (http) support. - -config BR2_PACKAGE_MPD_FAAD2 - bool "faad2" - select BR2_PACKAGE_FAAD2 - help - Enable faad2 input support. - Select this if you want to play back MP4/AAC files. - -config BR2_PACKAGE_MPD_FLAC - bool "flac" - select BR2_PACKAGE_FLAC - help - Enable flac input/streaming support. - Select this if you want to play back FLAC files. - -config BR2_PACKAGE_MPD_FFMPEG - bool "ffmpeg" - select BR2_PACKAGE_FFMPEG - depends on BR2_LARGEFILE - help - Enable ffmpeg input support. - Select this if you want to play back files supported by ffmpeg. - -comment "ffmpeg support requires a toolchain with LARGEFILE support" - depends on !BR2_LARGEFILE - -config BR2_PACKAGE_MPD_LAME - bool "lame" - select BR2_PACKAGE_LAME - help - Enable lame (mp3) encoding support. - -config BR2_PACKAGE_MPD_LIBCUE - bool "libcue" - select BR2_PACKAGE_LIBCUE - help - Enable cue file support. - -config BR2_PACKAGE_MPD_LIBSAMPLERATE - bool "libsamplerate" - select BR2_PACKAGE_LIBSAMPLERATE - help - Enable libsamplerate input support. - Select this for software sample rate conversion. - -config BR2_PACKAGE_MPD_LIBSNDFILE - bool "libsndfile" - select BR2_PACKAGE_LIBSNDFILE - help - Enable libsndfile input/streaming support. - Select this if you want to play back WAV files. - -config BR2_PACKAGE_MPD_MAD - bool "mad" - default y - select BR2_PACKAGE_LIBID3TAG - select BR2_PACKAGE_LIBMAD - help - Enable mad input support. - Select this if you want to play back MP3 files. - -config BR2_PACKAGE_MPD_MPG123 - bool "mpg123" - select BR2_PACKAGE_LIBID3TAG - select BR2_PACKAGE_MPG123 - help - Enable mpg123 input support. - Select this if you want to play back MP3 files. - -config BR2_PACKAGE_MPD_MUSEPACK - bool "musepack" - select BR2_PACKAGE_LIBCUEFILE - select BR2_PACKAGE_LIBREPLAYGAIN - select BR2_PACKAGE_MUSEPACK - help - Enable musepack input support. - Select this if you want to play back MPC files. - -config BR2_PACKAGE_MPD_SQLITE - bool "sqlite" - select BR2_PACKAGE_SQLITE - help - Enable sqlite database support. - If you don't use sqlite it will use an ASCII database. - -config BR2_PACKAGE_MPD_TCP - bool "tcp sockets" - default y - help - Enable mpd to listen on tcp sockets. - - You want this on if mpd and the client(s) work - on different machines (the usual scenario). - -config BR2_PACKAGE_MPD_TREMOR - bool "tremor" - select BR2_PACKAGE_LIBOGG - select BR2_PACKAGE_TREMOR - help - Enable vorbis input support. - Select this if you want to play back OGG files on softfloat targets. - -config BR2_PACKAGE_MPD_VORBIS - bool "vorbis" - select BR2_PACKAGE_LIBOGG - select BR2_PACKAGE_LIBVORBIS - help - Enable vorbis input/streaming support. - Select this if you want to play back OGG files on hardfloat targets. - -config BR2_PACKAGE_MPD_WAVPACK - bool "wavpack" - select BR2_PACKAGE_WAVPACK - help - Enable wavpack input support. - Select this if you want to play back WV files. - -endif - -comment "mpd requires a toolchain with C++ and WCHAR support" - depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR diff --git a/package/multimedia/mpg123/mpg123.mk b/package/multimedia/mpg123/mpg123.mk deleted file mode 100644 index f6eaddb24a..0000000000 --- a/package/multimedia/mpg123/mpg123.mk +++ /dev/null @@ -1,44 +0,0 @@ -############################################################# -# -# mpg123 -# -############################################################# - -MPG123_VERSION = 1.13.1 -MPG123_SOURCE = mpg123-$(MPG123_VERSION).tar.bz2 -MPG123_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/mpg123 -MPG123_CONF_OPT = --with-optimization=0 --disable-lfs-alias -MPG123_INSTALL_STAGING = YES -MPG123_CPU = $(if $(BR2_SOFT_FLOAT),generic_nofpu,generic_fpu) - -ifeq ($(BR2_arm),y) -MPG123_CPU = arm_nofpu -endif - -ifeq ($(BR2_i386),y) -MPG123_CPU = x86 -endif - -ifeq ($(BR2_powerpc),y) -ifneq ($(BR2_powerpc_7400)$(BR2_powerpc_7450)$(BR2_powerpc_970),) -MPG123_CPU = altivec -endif -ifeq ($(BR2_SOFT_FLOAT),y) -MPG123_CPU = ppc_nofpu -endif -endif - -ifeq ($(BR2_x86_64),y) -MPG123_CPU = x86-64 -endif - -MPG123_CONF_OPT += --program-prefix='' --with-cpu=$(MPG123_CPU) - -# Check if ALSA is built, then we should configure after alsa-lib so -# ./configure can find alsa-lib. -ifeq ($(BR2_PACKAGE_ALSA_LIB),y) -MPG123_CONF_OPT += --with-audio=alsa -MPG123_DEPENDENCIES += alsa-lib -endif - -$(eval $(call AUTOTARGETS,package/multimedia,mpg123)) diff --git a/package/multimedia/mplayer/Config.in b/package/multimedia/mplayer/Config.in deleted file mode 100644 index a9a4bb6114..0000000000 --- a/package/multimedia/mplayer/Config.in +++ /dev/null @@ -1,22 +0,0 @@ -config BR2_PACKAGE_MPLAYER - bool "mplayer" - help - MPlayer is a movie player which runs on many systems and supports - many different file formats. - - http://www.mplayerhq.hu/ - -if BR2_PACKAGE_MPLAYER - -config BR2_PACKAGE_MPLAYER_MPLAYER - bool "Build and install mplayer" - default y - help - This will install the video player. - -config BR2_PACKAGE_MPLAYER_MENCODER - bool "Build and install mencoder" - help - This will install the video encoder. - -endif diff --git a/package/multimedia/mplayer/mplayer.mk b/package/multimedia/mplayer/mplayer.mk deleted file mode 100644 index 7d4596008a..0000000000 --- a/package/multimedia/mplayer/mplayer.mk +++ /dev/null @@ -1,148 +0,0 @@ -############################################################# -# -# mplayer -# -############################################################# -MPLAYER_VERSION = 32726 -# MPLAYER_SOURCE = MPlayer-$(MPLAYER_VERSION).tar.bz2 -# MPLAYER_SITE = http://www.mplayerhq.hu/MPlayer/releases -MPLAYER_SITE = svn://svn.mplayerhq.hu/mplayer/trunk - -# mplayer needs pcm+mixer support, but configure fails to check for it -ifeq ($(BR2_PACKAGE_ALSA_LIB)$(BR2_PACKAGE_ALSA_LIB_MIXER)$(BR2_PACKAGE_ALSA_LIB_PCM),yyy) -MPLAYER_DEPENDENCIES += alsa-lib -MPLAYER_CONF_OPTS += --enable-alsa -else -MPLAYER_CONF_OPTS += --disable-alsa -endif - -ifeq ($(BR2_ENDIAN),"BIG") -MPLAYER_CONF_OPTS += --enable-big-endian -else -MPLAYER_CONF_OPTS += --disable-big-endian -endif - -# mplayer unfortunately uses --disable-largefiles, so we cannot use -# DISABLE_LARGEFILE -ifeq ($(BR2_LARGEFILE),y) -MPLAYER_CONF_OPTS += --enable-largefiles -else -# dvdread/dvdcss requires largefile support -MPLAYER_CONF_OPTS += \ - --disable-largefiles \ - --disable-dvdread-internal \ - --disable-libdvdcss-internal -endif - -ifeq ($(BR2_PACKAGE_SDL),y) -MPLAYER_CONF_OPTS += \ - --enable-sdl \ - --with-sdl-config=$(STAGING_DIR)/usr/bin/sdl-config -MPLAYER_DEPENDENCIES += sdl -else -MPLAYER_CONF_OPTS += --disable-sdl -endif - -ifeq ($(BR2_PACKAGE_FREETYPE),y) -MPLAYER_CONF_OPTS += \ - --enable-freetype \ - --with-freetype-config=$(STAGING_DIR)/usr/bin/freetype-config -MPLAYER_DEPENDENCIES += freetype -else -MPLAYER_CONF_OPTS += --disable-freetype -endif - -ifeq ($(BR2_PACKAGE_MPLAYER_MPLAYER),y) -MPLAYER_CONF_OPTS += --enable-mplayer -else -MPLAYER_CONF_OPTS += --disable-mplayer -endif - -ifeq ($(BR2_PACKAGE_MPLAYER_MENCODER),y) -MPLAYER_CONF_OPTS += --enable-mencoder -else -MPLAYER_CONF_OPTS += --disable-mencoder -endif - -ifeq ($(BR2_PACKAGE_TREMOR),y) -MPLAYER_DEPENDENCIES += tremor -MPLAYER_CONF_OPTS += --disable-tremor-internal --enable-tremor -endif - -ifeq ($(BR2_PACKAGE_MAD),y) -MPLAYER_DEPENDENCIES += libmad -else -MPLAYER_CONF_OPTS += --disable-mad -endif - -MPLAYER_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBTHEORA),libtheora) -MPLAYER_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBPNG),libpng) -MPLAYER_DEPENDENCIES += $(if $(BR2_PACKAGE_JPEG),jpeg) -MPLAYER_DEPENDENCIES += $(if $(BR2_PACKAGE_XLIB_LIBX11),xlib_libX11) -MPLAYER_DEPENDENCIES += $(if $(BR2_PACKAGE_XLIB_LIBXV),xlib_libXv) - -# ARM optimizations -ifeq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),armv5te) -MPLAYER_CONF_OPTS += --enable-armv5te -endif - -ifeq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),armv6j) -MPLAYER_CONF_OPTS += --enable-armv6 -endif - -ifeq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),armv7-a) -MPLAYER_CONF_OPTS += --enable-neon -endif - -define MPLAYER_CONFIGURE_CMDS - (cd $(@D); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - $(TARGET_CONFIGURE_ARGS) \ - ./configure \ - --prefix=/usr \ - --confdir=/etc \ - --target=$(GNU_TARGET_NAME) \ - --host-cc="$(HOSTCC)" \ - --cc="$(TARGET_CC)" \ - --as="$(TARGET_AS)" \ - --charset=UTF-8 \ - --extra-cflags="$(TARGET_CFLAGS)" \ - --extra-ldflags="$(TARGET_LDFLAGS)" \ - --enable-mad \ - --enable-fbdev \ - $(MPLAYER_CONF_OPTS) \ - --enable-cross-compile \ - --disable-ivtv \ - --disable-tv \ - --disable-live \ - --enable-dynamic-plugins \ - ) -endef - -# this is available on uClibc 0.9.31 even without ipv6 support, breaking the -# build in ffmpeg/libavformat/udp.c -ifneq ($(BR2_INET_IPV6),y) -define MPLAYER_FIXUP_IPV6_MREQ_DETECTION - $(SED) 's/\(#define HAVE_STRUCT_IPV6_MREQ\) 1/\1 0/' $(@D)/config.h -endef - -MPLAYER_POST_CONFIGURE_HOOKS += MPLAYER_FIXUP_IPV6_MREQ_DETECTION -endif - -define MPLAYER_BUILD_CMDS - $(MAKE) -C $(@D) -endef - -define MPLAYER_INSTALL_TARGET_CMDS - $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install -endef - -define MPLAYER_UNINSTALL_TARGET_CMDS - $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) uninstall -endef - -define MPLAYER_CLEAN_CMDS - $(MAKE) -C $(@D) clean -endef - -$(eval $(call GENTARGETS,package/multimedia,mplayer)) diff --git a/package/multimedia/multimedia.mk b/package/multimedia/multimedia.mk deleted file mode 100644 index 843f30e032..0000000000 --- a/package/multimedia/multimedia.mk +++ /dev/null @@ -1 +0,0 @@ -include package/multimedia/*/*.mk diff --git a/package/multimedia/speex/Config.in b/package/multimedia/speex/Config.in deleted file mode 100644 index 424a830019..0000000000 --- a/package/multimedia/speex/Config.in +++ /dev/null @@ -1,25 +0,0 @@ -config BR2_PACKAGE_SPEEX - bool "speex" - select BR2_PACKAGE_LIBOGG - help - Speex is an Open Source/Free Software patent-free - audio compression format designed for speech. - It can be used for Voice over IP - - http://www.speex.org/ - -config BR2_PACKAGE_SPEEX_ARM_GENERIC - bool - default y - depends on BR2_PACKAGE_SPEEX && (BR2_generic_arm || BR2_arm610 || BR2_arm710) - -config BR2_PACKAGE_SPEEX_ARM4 - bool - default y - depends on BR2_PACKAGE_SPEEX && (BR2_arm7tdmi || BR2_arm720t || BR2_arm920t || BR2_arm922t || BR2_sa110 || BR2_sa1100) - -config BR2_PACKAGE_SPEEX_ARM5E - default y - bool - depends on BR2_PACKAGE_SPEEX && BR2_arm && !(BR2_PACKAGE_SPEEX_ARM_GENERIC || BR2_PACKAGE_SPEEX_ARM4) - diff --git a/package/multimedia/speex/speex.mk b/package/multimedia/speex/speex.mk deleted file mode 100644 index 7de3b38305..0000000000 --- a/package/multimedia/speex/speex.mk +++ /dev/null @@ -1,36 +0,0 @@ -############################################################# -# -# speex -# -############################################################# -SPEEX_VERSION=1.2rc1 -SPEEX_SOURCE=speex-$(SPEEX_VERSION).tar.gz -SPEEX_SITE=http://downloads.us.xiph.org/releases/speex -SPEEX_AUTORECONF = NO -SPEEX_INSTALL_STAGING = YES -SPEEX_INSTALL_TARGET = YES -SPEEX_DEPENDENCIES = libogg -SPEEX_CONF_OPT = --with-ogg-libraries=$(STAGING_DIR)/usr/lib \ - --with-ogg-includes=$(STAGING_DIR)/usr/include \ - --enable-fixed-point - -ifeq ($(BR2_PACKAGE_SPEEX_ARM4),y) - SPEEX_CONF_OPT += --enable-arm4-asm -endif - -ifeq ($(BR2_PACKAGE_SPEEX_ARM5E),y) - SPEEX_CONF_OPT += --enable-arm5e-asm -endif - -define SPEEX_LIBTOOL_FIXUP - $(SED) 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' $(@D)/libtool - $(SED) 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' $(@D)/libtool -endef - -SPEEX_POST_CONFIGURE_HOOKS += SPEEX_LIBTOOL_FIXUP - -define SPEEX_BUILD_CMDS - $($(PKG)_MAKE_ENV) $(MAKE) $($(PKG)_MAKE_OPT) -C $(@D)/$($(PKG)_SUBDIR) -endef - -$(eval $(call AUTOTARGETS,package/multimedia,speex)) diff --git a/package/multimedia/swfdec/Config.in b/package/multimedia/swfdec/Config.in deleted file mode 100644 index bc1c73af93..0000000000 --- a/package/multimedia/swfdec/Config.in +++ /dev/null @@ -1,35 +0,0 @@ -config BR2_PACKAGE_SWFDEC - bool "swfdec" - depends on BR2_USE_WCHAR # glib2 - depends on BR2_INSTALL_LIBSTDCPP # pango - select BR2_PACKAGE_LIBOIL - select BR2_PACKAGE_ALSA_LIB - select BR2_PACKAGE_PANGO - select BR2_PACKAGE_CAIRO - select BR2_PACKAGE_CAIRO_PNG - help - Library to play Flash files - - http://swfdec.freedesktop.org/ - -config BR2_PACKAGE_SWFDEC_GTK_SUPPORT - bool "gtk support" - depends on BR2_PACKAGE_SWFDEC - depends on BR2_PACKAGE_LIBGTK2 - select BR2_PACKAGE_LIBSOUP - default y - help - Swfdec-gtk library is used for easy integration - of swfdec in GTK applications - -config BR2_PACKAGE_SWFDEC_GSTREAMER - bool "gstreamer support" - depends on BR2_PACKAGE_SWFDEC - depends on BR2_PACKAGE_GSTREAMER - select BR2_PACKAGE_GST_PLUGINS_BASE - default y - help - Enables GStreamer support - -comment "swfdec requires a toolchain with WCHAR and C++ support" - depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP diff --git a/package/multimedia/swfdec/swfdec.mk b/package/multimedia/swfdec/swfdec.mk deleted file mode 100644 index 9b4b72953c..0000000000 --- a/package/multimedia/swfdec/swfdec.mk +++ /dev/null @@ -1,37 +0,0 @@ -############################################################# -# -# Swfdec -# -############################################################# -SWFDEC_VERSION_MAJOR = 0.8 -SWFDEC_VERSION_MINOR = 4 -SWFDEC_VERSION = $(SWFDEC_VERSION_MAJOR).$(SWFDEC_VERSION_MINOR) -SWFDEC_SOURCE = swfdec-$(SWFDEC_VERSION).tar.gz -SWFDEC_SITE = http://swfdec.freedesktop.org/download/swfdec/$(SWFDEC_VERSION_MAJOR) -SWFDEC_MAKE_OPT = \ - GLIB_MKENUMS=$(HOST_DIR)/usr/bin/glib-mkenums \ - GLIB_GENMARSHAL=$(HOST_DIR)/usr/bin/glib-genmarshal - -SWFDEC_INSTALL_STAGING = YES -SWFDEC_INSTALL_TARGET = YES - -SWFDEC_DEPENDENCIES = liboil alsa-lib pango cairo host-pkg-config - -ifeq ($(BR2_PACKAGE_SWFDEC_GSTREAMER),y) -SWFDEC_DEPENDENCIES += gstreamer gst-plugins-base -else -SWFDEC_CONF_OPT += --disable-gstreamer -endif - -ifeq ($(BR2_PACKAGE_SWFDEC_GTK_SUPPORT),y) -SWFDEC_DEPENDENCIES += libgtk2 libsoup -else -SWFDEC_CONF_OPT += --disable-gtk -endif - -$(eval $(call AUTOTARGETS,package/multimedia,swfdec)) - -# swfdec uses glib-* at install time -# Notice: must come after AUTOTARGETS as that's where these variables gets set -SWFDEC_INSTALL_TARGET_OPT += $(SWFDEC_MAKE_OPT) -SWFDEC_INSTALL_STAGING_OPT += $(SWFDEC_MAKE_OPT) diff --git a/package/multimedia/taglib/Config.in b/package/multimedia/taglib/Config.in deleted file mode 100644 index 3d688a76ce..0000000000 --- a/package/multimedia/taglib/Config.in +++ /dev/null @@ -1,13 +0,0 @@ -config BR2_PACKAGE_TAGLIB - bool "taglib" - depends on BR2_INSTALL_LIBSTDCPP - help - TagLib is a library for reading and editing the meta-data of - several popular audio formats. Currently it supports both ID3v1 - and ID3v2 for MP3 files, Ogg Vorbis comments and ID3 tags and - Vorbis comments in FLAC, MPC, Speex, WavPack and TrueAudio files. - - http://developer.kde.org/~wheeler/taglib.html - -comment "taglib requires a toolchain with C++ support enabled" - depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/multimedia/taglib/taglib-1.5-libtool.patch b/package/multimedia/taglib/taglib-1.5-libtool.patch deleted file mode 100644 index d4160f0ab4..0000000000 --- a/package/multimedia/taglib/taglib-1.5-libtool.patch +++ /dev/null @@ -1,4084 +0,0 @@ -[PATCH] fix libtool - -Update to 1.5.22 so it doesn't get confused about rpath, and apply -buildroot-libtool-v1.5.patch so cross compilation works. - -Signed-off-by: Peter Korsgaard ---- - admin/ltmain.sh | 2080 ++++++++++++++++++++++++++++++++++---------------------- - 1 file changed, 1284 insertions(+), 796 deletions(-) - -Index: taglib-1.5/admin/ltmain.sh -=================================================================== ---- taglib-1.5.orig/admin/ltmain.sh -+++ taglib-1.5/admin/ltmain.sh -@@ -1,7 +1,7 @@ - # ltmain.sh - Provide generalized library-building support services. - # NOTE: Changing this file will not affect anything until you rerun configure. - # --# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003 -+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 - # Free Software Foundation, Inc. - # Originally by Gordon Matzigkeit , 1996 - # -@@ -24,6 +24,34 @@ - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - -+basename="s,^.*/,,g" -+ -+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -+# is ksh but when the shell is invoked as "sh" and the current value of -+# the _XPG environment variable is not equal to 1 (one), the special -+# positional parameter $0, within a function call, is the name of the -+# function. -+progpath="$0" -+ -+# The name of this program: -+progname=`echo "$progpath" | $SED $basename` -+modename="$progname" -+ -+# Global variables: -+EXIT_SUCCESS=0 -+EXIT_FAILURE=1 -+ -+PROGRAM=ltmain.sh -+PACKAGE=libtool -+VERSION=1.5.22 -+TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" -+ -+# See if we are running on zsh, and set the options which allow our -+# commands through without removal of \ escapes. -+if test -n "${ZSH_VERSION+set}" ; then -+ setopt NO_GLOB_SUBST -+fi -+ - # Check that we have a working $echo. - if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. -@@ -36,7 +64,7 @@ - : - else - # Restart under the correct shell, and then maybe $echo will work. -- exec $SHELL "$0" --no-reexec ${1+"$@"} -+ exec $SHELL "$progpath" --no-reexec ${1+"$@"} - fi - - if test "X$1" = X--fallback-echo; then -@@ -45,19 +73,9 @@ - cat <&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - # Global variables. -@@ -111,6 +132,8 @@ - show="$echo" - show_help= - execute_dlfiles= -+duplicate_deps=no -+preserve_args= - lo2o="s/\\.lo\$/.${objext}/" - o2lo="s/\\.${objext}\$/.lo/" - -@@ -118,10 +141,51 @@ - # Shell function definitions: - # This seems to be the best place for them - -+# func_mktempdir [string] -+# Make a temporary directory that won't clash with other running -+# libtool processes, and avoids race conditions if possible. If -+# given, STRING is the basename for that directory. -+func_mktempdir () -+{ -+ my_template="${TMPDIR-/tmp}/${1-$progname}" -+ -+ if test "$run" = ":"; then -+ # Return a directory name, but don't create it in dry-run mode -+ my_tmpdir="${my_template}-$$" -+ else -+ -+ # If mktemp works, use that first and foremost -+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` -+ -+ if test ! -d "$my_tmpdir"; then -+ # Failing that, at least try and use $RANDOM to avoid a race -+ my_tmpdir="${my_template}-${RANDOM-0}$$" -+ -+ save_mktempdir_umask=`umask` -+ umask 0077 -+ $mkdir "$my_tmpdir" -+ umask $save_mktempdir_umask -+ fi -+ -+ # If we're not in dry-run mode, bomb out on failure -+ test -d "$my_tmpdir" || { -+ $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 -+ exit $EXIT_FAILURE -+ } -+ fi -+ -+ $echo "X$my_tmpdir" | $Xsed -+} -+ -+ -+# func_win32_libid arg -+# return the library type of file 'arg' -+# - # Need a lot of goo to handle *both* DLLs and import libs - # Has to be a shell function in order to 'eat' the argument - # that is supplied when $file_magic_command is called. --win32_libid () { -+func_win32_libid () -+{ - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in -@@ -130,17 +194,16 @@ - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ -- grep -E 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then -+ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | \ -- sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` -- if test "X$win32_nmres" = "Ximport" ; then -- win32_libid_type="x86 archive import" -- else -- win32_libid_type="x86 archive static" -- fi -+ $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` -+ case $win32_nmres in -+ import*) win32_libid_type="x86 archive import";; -+ *) win32_libid_type="x86 archive static";; -+ esac - fi - ;; -- *DLL*) -+ *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... -@@ -154,9 +217,182 @@ - $echo $win32_libid_type - } - -+ -+# func_infer_tag arg -+# Infer tagged configuration to use if any are available and -+# if one wasn't chosen via the "--tag" command line option. -+# Only attempt this if the compiler in the base compile -+# command doesn't match the default compiler. -+# arg is usually of the form 'gcc ...' -+func_infer_tag () -+{ -+ if test -n "$available_tags" && test -z "$tagname"; then -+ CC_quoted= -+ for arg in $CC; do -+ case $arg in -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -+ arg="\"$arg\"" -+ ;; -+ esac -+ CC_quoted="$CC_quoted $arg" -+ done -+ case $@ in -+ # Blanks in the command may have been stripped by the calling shell, -+ # but not from the CC environment variable when configure was run. -+ " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; -+ # Blanks at the start of $base_compile will cause this to fail -+ # if we don't check for them as well. -+ *) -+ for z in $available_tags; do -+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then -+ # Evaluate the configuration. -+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" -+ CC_quoted= -+ for arg in $CC; do -+ # Double-quote args containing other shell metacharacters. -+ case $arg in -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -+ arg="\"$arg\"" -+ ;; -+ esac -+ CC_quoted="$CC_quoted $arg" -+ done -+ case "$@ " in -+ " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) -+ # The compiler in the base compile command matches -+ # the one in the tagged configuration. -+ # Assume this is the tagged configuration we want. -+ tagname=$z -+ break -+ ;; -+ esac -+ fi -+ done -+ # If $tagname still isn't set, then no tagged configuration -+ # was found and let the user know that the "--tag" command -+ # line option must be used. -+ if test -z "$tagname"; then -+ $echo "$modename: unable to infer tagged configuration" -+ $echo "$modename: defaulting to \`CC'" -+ $echo "$modename: if this is not correct, specify a tag with \`--tag'" -+# exit $EXIT_FAILURE -+# else -+# $echo "$modename: using $tagname tagged configuration" -+ fi -+ ;; -+ esac -+ fi -+} -+ -+ -+# func_extract_an_archive dir oldlib -+func_extract_an_archive () -+{ -+ f_ex_an_ar_dir="$1"; shift -+ f_ex_an_ar_oldlib="$1" -+ -+ $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" -+ $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? -+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then -+ : -+ else -+ $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 -+ exit $EXIT_FAILURE -+ fi -+} -+ -+# func_extract_archives gentop oldlib ... -+func_extract_archives () -+{ -+ my_gentop="$1"; shift -+ my_oldlibs=${1+"$@"} -+ my_oldobjs="" -+ my_xlib="" -+ my_xabs="" -+ my_xdir="" -+ my_status="" -+ -+ $show "${rm}r $my_gentop" -+ $run ${rm}r "$my_gentop" -+ $show "$mkdir $my_gentop" -+ $run $mkdir "$my_gentop" -+ my_status=$? -+ if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then -+ exit $my_status -+ fi -+ -+ for my_xlib in $my_oldlibs; do -+ # Extract the objects. -+ case $my_xlib in -+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; -+ *) my_xabs=`pwd`"/$my_xlib" ;; -+ esac -+ my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` -+ my_xdir="$my_gentop/$my_xlib" -+ -+ $show "${rm}r $my_xdir" -+ $run ${rm}r "$my_xdir" -+ $show "$mkdir $my_xdir" -+ $run $mkdir "$my_xdir" -+ exit_status=$? -+ if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then -+ exit $exit_status -+ fi -+ case $host in -+ *-darwin*) -+ $show "Extracting $my_xabs" -+ # Do not bother doing anything if just a dry run -+ if test -z "$run"; then -+ darwin_orig_dir=`pwd` -+ cd $my_xdir || exit $? -+ darwin_archive=$my_xabs -+ darwin_curdir=`pwd` -+ darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` -+ darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` -+ if test -n "$darwin_arches"; then -+ darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` -+ darwin_arch= -+ $show "$darwin_base_archive has multiple architectures $darwin_arches" -+ for darwin_arch in $darwin_arches ; do -+ mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" -+ lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" -+ cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" -+ func_extract_an_archive "`pwd`" "${darwin_base_archive}" -+ cd "$darwin_curdir" -+ $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" -+ done # $darwin_arches -+ ## Okay now we have a bunch of thin objects, gotta fatten them up :) -+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` -+ darwin_file= -+ darwin_files= -+ for darwin_file in $darwin_filelist; do -+ darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` -+ lipo -create -output "$darwin_file" $darwin_files -+ done # $darwin_filelist -+ ${rm}r unfat-$$ -+ cd "$darwin_orig_dir" -+ else -+ cd "$darwin_orig_dir" -+ func_extract_an_archive "$my_xdir" "$my_xabs" -+ fi # $darwin_arches -+ fi # $run -+ ;; -+ *) -+ func_extract_an_archive "$my_xdir" "$my_xabs" -+ ;; -+ esac -+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` -+ done -+ func_extract_archives_result="$my_oldobjs" -+} - # End of Shell function definitions - ##################################### - -+# Darwin sucks -+eval std_shrext=\"$shrext_cmds\" -+ -+disable_libs=no -+ - # Parse our command line options once, thoroughly. - while test "$#" -gt 0 - do -@@ -176,12 +412,13 @@ - ;; - tag) - tagname="$arg" -+ preserve_args="${preserve_args}=$arg" - - # Check whether tagname contains only valid characters - case $tagname in - *[!-_A-Za-z0-9,/]*) - $echo "$progname: invalid tag name: $tagname" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - -@@ -191,10 +428,10 @@ - # not specially marked. - ;; - *) -- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then -+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then - taglist="$taglist $tagname" - # Evaluate the configuration. -- eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`" -+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" - else - $echo "$progname: ignoring unknown tag $tagname" 1>&2 - fi -@@ -220,24 +457,25 @@ - --version) - $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" - $echo -- $echo "Copyright (C) 2003 Free Software Foundation, Inc." -+ $echo "Copyright (C) 2005 Free Software Foundation, Inc." - $echo "This is free software; see the source for copying conditions. There is NO" - $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -- exit 0 -+ exit $? - ;; - - --config) -- ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 -+ ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath - # Now print the configurations for the tags. - for tagname in $taglist; do -- ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0" -+ ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" - done -- exit 0 -+ exit $? - ;; - - --debug) - $echo "$progname: enabling shell trace mode" - set -x -+ preserve_args="$preserve_args $arg" - ;; - - --dry-run | -n) -@@ -256,7 +494,7 @@ - else - $echo "disable static libraries" - fi -- exit 0 -+ exit $? - ;; - - --finish) mode="finish" ;; -@@ -268,13 +506,19 @@ - - --quiet | --silent) - show=: -+ preserve_args="$preserve_args $arg" - ;; - -- --tag) prevopt="--tag" prev=tag ;; -+ --tag) -+ prevopt="--tag" -+ prev=tag -+ preserve_args="$preserve_args --tag" -+ ;; - --tag=*) - set tag "$optarg" ${1+"$@"} - shift - prev=tag -+ preserve_args="$preserve_args --tag" - ;; - - -dlopen) -@@ -285,7 +529,7 @@ - -*) - $echo "$modename: unrecognized option \`$arg'" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - - *) -@@ -298,9 +542,21 @@ - if test -n "$prevopt"; then - $echo "$modename: option \`$prevopt' requires an argument" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - -+case $disable_libs in -+no) -+ ;; -+shared) -+ build_libtool_libs=no -+ build_old_libs=yes -+ ;; -+static) -+ build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -+ ;; -+esac -+ - # If this variable is set in any of the actions, the command in it - # will be execed at the end. This prevents here-documents from being - # left over by shells. -@@ -311,7 +567,7 @@ - # Infer the operation mode. - if test -z "$mode"; then - $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 -- $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2 -+ $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 - case $nonopt in - *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) - mode=link -@@ -354,7 +610,7 @@ - if test -n "$execute_dlfiles" && test "$mode" != execute; then - $echo "$modename: unrecognized option \`-dlopen'" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. -@@ -369,13 +625,15 @@ - # Get the compilation command and the source file. - base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" -+ suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= -+ later= - - for arg - do -- case "$arg_mode" in -+ case $arg_mode in - arg ) - # do not "continue". Instead, add this to base_compile - lastarg="$arg" -@@ -394,24 +652,19 @@ - -o) - if test -n "$libobj" ; then - $echo "$modename: you cannot specify \`-o' more than once" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - arg_mode=target - continue - ;; - -- -static) -- build_old_libs=yes -+ -static | -prefer-pic | -prefer-non-pic) -+ later="$later $arg" - continue - ;; - -- -prefer-pic) -- pic_mode=yes -- continue -- ;; -- -- -prefer-non-pic) -- pic_mode=no -+ -no-suppress) -+ suppress_opt=no - continue - ;; - -@@ -424,7 +677,7 @@ - args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` - lastarg= - save_ifs="$IFS"; IFS=',' -- for arg in $args; do -+ for arg in $args; do - IFS="$save_ifs" - - # Double-quote args containing other shell metacharacters. -@@ -462,7 +715,10 @@ - case $lastarg in - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly -- # in scan sets, so we specify it separately. -+ # in scan sets, and some SunOS ksh mistreat backslash-escaping -+ # in scan sets (worked around with variable expansion), -+ # and furthermore cannot handle '|' '&' '(' ')' in scan sets -+ # at all, so we specify them separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - lastarg="\"$lastarg\"" - ;; -@@ -474,11 +730,11 @@ - case $arg_mode in - arg) - $echo "$modename: you must specify an argument for -Xcompile" -- exit 1 -+ exit $EXIT_FAILURE - ;; - target) - $echo "$modename: you must specify a target with \`-o'" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - *) - # Get the name of the library object. -@@ -511,51 +767,39 @@ - *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; - *) - $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - -- # Infer tagged configuration to use if any are available and -- # if one wasn't chosen via the "--tag" command line option. -- # Only attempt this if the compiler in the base compile -- # command doesn't match the default compiler. -- if test -n "$available_tags" && test -z "$tagname"; then -- case $base_compile in -- # Blanks in the command may have been stripped by the calling shell, -- # but not from the CC environment variable when configure was run. -- " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "*) ;; -- # Blanks at the start of $base_compile will cause this to fail -- # if we don't check for them as well. -- *) -- for z in $available_tags; do -- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then -- # Evaluate the configuration. -- eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" -- case "$base_compile " in -- "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) -- # The compiler in the base compile command matches -- # the one in the tagged configuration. -- # Assume this is the tagged configuration we want. -- tagname=$z -- break -- ;; -- esac -- fi -- done -- # If $tagname still isn't set, then no tagged configuration -- # was found and let the user know that the "--tag" command -- # line option must be used. -- if test -z "$tagname"; then -- $echo "$modename: unable to infer tagged configuration" -- $echo "$modename: specify a tag with \`--tag'" 1>&2 -- exit 1 --# else --# $echo "$modename: using $tagname tagged configuration" -- fi -+ func_infer_tag $base_compile -+ -+ for arg in $later; do -+ case $arg in -+ -static) -+ build_old_libs=yes -+ continue -+ ;; -+ -+ -prefer-pic) -+ pic_mode=yes -+ continue -+ ;; -+ -+ -prefer-non-pic) -+ pic_mode=no -+ continue - ;; - esac -- fi -+ done - -+ qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` -+ case $qlibobj in -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -+ qlibobj="\"$qlibobj\"" ;; -+ esac -+ test "X$libobj" != "X$qlibobj" \ -+ && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ -+ && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." - objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$obj"; then -@@ -568,7 +812,7 @@ - if test -z "$base_compile"; then - $echo "$modename: you must specify a compilation command" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - # Delete any leftover library objects. -@@ -579,7 +823,7 @@ - fi - - $run $rm $removelist -- trap "$run $rm $removelist; exit 1" 1 2 15 -+ trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in -@@ -598,7 +842,7 @@ - output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - removelist="$removelist $output_obj $lockfile" -- trap "$run $rm $removelist; exit 1" 1 2 15 -+ trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - else - output_obj= - need_locks=no -@@ -608,7 +852,7 @@ - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then -- until $run ln "$0" "$lockfile" 2>/dev/null; do -+ until $run ln "$progpath" "$lockfile" 2>/dev/null; do - $show "Waiting for $lockfile to be removed" - sleep 2 - done -@@ -626,14 +870,19 @@ - compiler." - - $run $rm $removelist -- exit 1 -+ exit $EXIT_FAILURE - fi -- $echo $srcfile > "$lockfile" -+ $echo "$srcfile" > "$lockfile" - fi - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi -+ qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` -+ case $qsrcfile in -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -+ qsrcfile="\"$qsrcfile\"" ;; -+ esac - - $run $rm "$libobj" "${libobj}T" - -@@ -655,18 +904,18 @@ - fbsd_hideous_sh_bug=$base_compile - - if test "$pic_mode" != no; then -- command="$base_compile $srcfile $pic_flag" -+ command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code -- command="$base_compile $srcfile" -+ command="$base_compile $qsrcfile" - fi - - if test ! -d "${xdir}$objdir"; then - $show "$mkdir ${xdir}$objdir" - $run $mkdir ${xdir}$objdir -- status=$? -- if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then -- exit $status -+ exit_status=$? -+ if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then -+ exit $exit_status - fi - fi - -@@ -681,7 +930,7 @@ - if $run eval "$command"; then : - else - test -n "$output_obj" && $run $rm $removelist -- exit 1 -+ exit $EXIT_FAILURE - fi - - if test "$need_locks" = warn && -@@ -701,7 +950,7 @@ - compiler." - - $run $rm $removelist -- exit 1 -+ exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one -@@ -722,7 +971,9 @@ - EOF - - # Allow error messages only from the first compilation. -- suppress_output=' >/dev/null 2>&1' -+ if test "$suppress_opt" = yes; then -+ suppress_output=' >/dev/null 2>&1' -+ fi - else - # No PIC object so indicate it doesn't exist in the libtool - # object file. -@@ -736,9 +987,9 @@ - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then - # Don't build PIC code -- command="$base_compile $srcfile" -+ command="$base_compile $qsrcfile" - else -- command="$base_compile $srcfile $pic_flag" -+ command="$base_compile $qsrcfile $pic_flag" - fi - if test "$compiler_c_o" = yes; then - command="$command -o $obj" -@@ -751,7 +1002,7 @@ - if $run eval "$command"; then : - else - $run $rm $removelist -- exit 1 -+ exit $EXIT_FAILURE - fi - - if test "$need_locks" = warn && -@@ -771,7 +1022,7 @@ - compiler." - - $run $rm $removelist -- exit 1 -+ exit $EXIT_FAILURE - fi - - # Just move the object if needed -@@ -809,7 +1060,7 @@ - $run $rm "$lockfile" - fi - -- exit 0 -+ exit $EXIT_SUCCESS - ;; - - # libtool link mode -@@ -835,7 +1086,7 @@ - ;; - esac - libtool_args="$nonopt" -- base_compile="$nonopt" -+ base_compile="$nonopt $@" - compile_command="$nonopt" - finalize_command="$nonopt" - -@@ -847,7 +1098,6 @@ - old_convenience= - deplibs= - old_deplibs= -- add_flags= - compiler_flags= - linker_flags= - dllsearchpath= -@@ -868,6 +1118,8 @@ - no_install=no - objs= - non_pic_objects= -+ notinst_path= # paths that contain not-installed libtool libraries -+ precious_files_regex= - prefer_static_libs=no - preload=no - prev= -@@ -881,6 +1133,8 @@ - vinfo= - vinfo_number=no - -+ func_infer_tag $base_compile -+ - # We need to know -static, to get the right output filenames. - for arg - do -@@ -893,14 +1147,15 @@ - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi -+ prefer_static_libs=yes - else - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi -+ prefer_static_libs=built - fi - build_libtool_libs=no - build_old_libs=yes -- prefer_static_libs=yes - break - ;; - esac -@@ -912,7 +1167,6 @@ - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" -- base_compile="$base_compile $arg" - shift - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -@@ -976,7 +1230,7 @@ - export_symbols="$arg" - if test ! -f "$arg"; then - $echo "$modename: symbol file \`$arg' does not exist" -- exit 1 -+ exit $EXIT_FAILURE - fi - prev= - continue -@@ -991,6 +1245,11 @@ - prev= - continue - ;; -+ precious_regex) -+ precious_files_regex="$arg" -+ prev= -+ continue -+ ;; - release) - release="-$arg" - prev= -@@ -1023,7 +1282,7 @@ - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. -@@ -1071,12 +1330,17 @@ - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi -+ else -+ # If the PIC object exists, use it instead. -+ # $xdir was prepended to $pic_object above. -+ non_pic_object="$pic_object" -+ non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - else - # Dry-run case. - -@@ -1097,7 +1361,7 @@ - done - else - $echo "$modename: link input file \`$save_arg' does not exist" -- exit 1 -+ exit $EXIT_FAILURE - fi - arg=$save_arg - prev= -@@ -1109,7 +1373,7 @@ - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - if test "$prev" = rpath; then -@@ -1149,16 +1413,15 @@ - finalize_command="$finalize_command $qarg" - continue - ;; -- framework) -- case $host in -- *-*-darwin*) -- case "$deplibs " in -- *" $qarg.ltframework "*) ;; -- *) deplibs="$deplibs $qarg.ltframework" # this is fixed later -- ;; -- esac -- ;; -- esac -+ shrext) -+ shrext_cmds="$arg" -+ prev= -+ continue -+ ;; -+ darwin_framework|darwin_framework_skip) -+ test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" -+ compile_command="$compile_command $arg" -+ finalize_command="$finalize_command $arg" - prev= - continue - ;; -@@ -1210,7 +1473,7 @@ - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: more than one -exported-symbols argument is not allowed" -- exit 1 -+ exit $EXIT_FAILURE - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms -@@ -1220,6 +1483,18 @@ - continue - ;; - -+ -framework|-arch|-isysroot) -+ case " $CC " in -+ *" ${arg} ${1} "* | *" ${arg} ${1} "*) -+ prev=darwin_framework_skip ;; -+ *) compiler_flags="$compiler_flags $arg" -+ prev=darwin_framework ;; -+ esac -+ compile_command="$compile_command $arg" -+ finalize_command="$finalize_command $arg" -+ continue -+ ;; -+ - -inst-prefix-dir) - prev=inst_prefix - continue -@@ -1246,7 +1521,8 @@ - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 -- exit 1 -+ absdir="$dir" -+ notinst_path="$notinst_path $dir" - fi - dir="$absdir" - ;; -@@ -1260,10 +1536,15 @@ - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) -+ testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac -+ case :$dllsearchpath: in -+ *":$testbindir:"*) ;; -+ *) dllsearchpath="$dllsearchpath:$testbindir";; -+ esac - ;; - esac - continue -@@ -1272,26 +1553,35 @@ - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in -- *-*-cygwin* | *-*-pw32* | *-*-beos*) -+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) - # These systems don't actually have a C or math library (as such) - continue - ;; -- *-*-mingw* | *-*-os2*) -+ *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; -- *-*-openbsd* | *-*-freebsd*) -+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework -- deplibs="$deplibs System.ltframework" -+ deplibs="$deplibs -framework System" - continue -+ ;; -+ *-*-sco3.2v5* | *-*-sco5v6*) -+ # Causes problems with __ctype -+ test "X$arg" = "X-lc" && continue -+ ;; -+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) -+ # Compiler inserts libc in the correct place for threads to work -+ test "X$arg" = "X-lc" && continue -+ ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in -- *-*-openbsd*) -+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; -@@ -1301,18 +1591,41 @@ - continue - ;; - -+ # Tru64 UNIX uses -model [arg] to determine the layout of C++ -+ # classes, name mangling, and exception handling. -+ -model) -+ compile_command="$compile_command $arg" -+ compiler_flags="$compiler_flags $arg" -+ finalize_command="$finalize_command $arg" -+ prev=xcompiler -+ continue -+ ;; -+ -+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) -+ compiler_flags="$compiler_flags $arg" -+ compile_command="$compile_command $arg" -+ finalize_command="$finalize_command $arg" -+ continue -+ ;; -+ - -module) - module=yes - continue - ;; - -- # gcc -m* arguments should be passed to the linker via $compiler_flags -- # in order to pass architecture information to the linker -- # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo -- # but this is not reliable with gcc because gcc may use -mfoo to -- # select a different linker, different libraries, etc, while -- # -Wl,-mfoo simply passes -mfoo to the linker. -- -m*) -+ # -64, -mips[0-9] enable 64-bit mode on the SGI compiler -+ # -r[0-9][0-9]* specifies the processor on the SGI compiler -+ # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler -+ # +DA*, +DD* enable 64-bit mode on the HP compiler -+ # -q* pass through compiler args for the IBM compiler -+ # -m* pass through architecture-specific compiler args for GCC -+ # -m*, -t[45]*, -txscale* pass through architecture-specific -+ # compiler args for GCC -+ # -pg pass through profiling flag for GCC -+ # @file GCC response files -+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ -+ -t[45]*|-txscale*|@*) -+ - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` -@@ -1323,9 +1636,7 @@ - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" -- if test "$with_gcc" = "yes" ; then -- compiler_flags="$compiler_flags $arg" -- fi -+ compiler_flags="$compiler_flags $arg" - continue - ;; - -@@ -1365,6 +1676,11 @@ - - -o) prev=output ;; - -+ -precious-files-regex) -+ prev=precious_regex -+ continue -+ ;; -+ - -release) - prev=release - continue -@@ -1387,7 +1703,7 @@ - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - case "$xrpath " in -@@ -1473,11 +1789,6 @@ - continue - ;; - -- -framework) -- prev=framework -- continue -- ;; -- - # Some other compiler flag. - -* | +*) - # Unknown arguments in both finalize_command and compile_command need -@@ -1488,7 +1799,6 @@ - arg="\"$arg\"" - ;; - esac -- add_flags="$add_flags $arg" - ;; - - *.$objext) -@@ -1516,7 +1826,7 @@ - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. -@@ -1564,12 +1874,17 @@ - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi -+ else -+ # If the PIC object exists, use it instead. -+ # $xdir was prepended to $pic_object above. -+ non_pic_object="$pic_object" -+ non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - else - # Dry-run case. - -@@ -1623,7 +1938,6 @@ - arg="\"$arg\"" - ;; - esac -- add_flags="$add_flags $arg" - ;; - esac # arg - -@@ -1637,48 +1951,7 @@ - if test -n "$prev"; then - $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 - $echo "$help" 1>&2 -- exit 1 -- fi -- -- # Infer tagged configuration to use if any are available and -- # if one wasn't chosen via the "--tag" command line option. -- # Only attempt this if the compiler in the base link -- # command doesn't match the default compiler. -- if test -n "$available_tags" && test -z "$tagname"; then -- case $base_compile in -- # Blanks in the command may have been stripped by the calling shell, -- # but not from the CC environment variable when configure was run. -- "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;; -- # Blanks at the start of $base_compile will cause this to fail -- # if we don't check for them as well. -- *) -- for z in $available_tags; do -- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then -- # Evaluate the configuration. -- eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" -- case $base_compile in -- "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) -- # The compiler in $compile_command matches -- # the one in the tagged configuration. -- # Assume this is the tagged configuration we want. -- tagname=$z -- break -- ;; -- esac -- fi -- done -- # If $tagname still isn't set, then no tagged configuration -- # was found and let the user know that the "--tag" command -- # line option must be used. -- if test -z "$tagname"; then -- $echo "$modename: unable to infer tagged configuration" -- $echo "$modename: specify a tag with \`--tag'" 1>&2 -- exit 1 --# else --# $echo "$modename: using $tagname tagged configuration" -- fi -- ;; -- esac -+ exit $EXIT_FAILURE - fi - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then -@@ -1711,9 +1984,9 @@ - if test ! -d "$output_objdir"; then - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir -- status=$? -- if test "$status" -ne 0 && test ! -d "$output_objdir"; then -- exit $status -+ exit_status=$? -+ if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then -+ exit $exit_status - fi - fi - -@@ -1722,7 +1995,7 @@ - "") - $echo "$modename: you must specify an output file" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; -@@ -1732,7 +2005,7 @@ - - case $host in - *cygwin* | *mingw* | *pw32*) -- # don't eliminate duplcations in $postdeps and $predeps -+ # don't eliminate duplications in $postdeps and $predeps - duplicate_compiler_generated_deps=yes - ;; - *) -@@ -1776,7 +2049,6 @@ - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries -- notinst_path= # paths that contain not-installed libtool libraries - case $linkmode in - lib) - passes="conv link" -@@ -1785,7 +2057,7 @@ - *.la) ;; - *) - $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - done -@@ -1823,18 +2095,23 @@ - lib= - found=no - case $deplib in -+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) -+ if test "$linkmode,$pass" = "prog,link"; then -+ compile_deplibs="$deplib $compile_deplibs" -+ finalize_deplibs="$deplib $finalize_deplibs" -+ else -+ compiler_flags="$compiler_flags $deplib" -+ fi -+ continue -+ ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 - continue - fi -- if test "$pass" = conv && test "$allow_undefined" = yes; then -- deplibs="$deplib $deplibs" -- continue -- fi - name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` - for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do -- for search_ext in .la $shrext .so .a; do -+ for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then -@@ -1895,18 +2172,6 @@ - fi - fi - ;; # -l -- *.ltframework) -- if test "$linkmode,$pass" = "prog,link"; then -- compile_deplibs="$deplib $compile_deplibs" -- finalize_deplibs="$deplib $finalize_deplibs" -- else -- deplibs="$deplib $deplibs" -- if test "$linkmode" = lib ; then -- newdependency_libs="$deplib $newdependency_libs" -- fi -- fi -- continue -- ;; - -L*) - case $linkmode in - lib) -@@ -1922,11 +2187,11 @@ - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" -- newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi -+ newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - *) - $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 -@@ -1954,7 +2219,22 @@ - fi - case $linkmode in - lib) -- if test "$deplibs_check_method" != pass_all; then -+ valid_a_lib=no -+ case $deplibs_check_method in -+ match_pattern*) -+ set dummy $deplibs_check_method -+ match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` -+ if eval $echo \"$deplib\" 2>/dev/null \ -+ | $SED 10q \ -+ | $EGREP "$match_pattern_regex" > /dev/null; then -+ valid_a_lib=yes -+ fi -+ ;; -+ pass_all) -+ valid_a_lib=yes -+ ;; -+ esac -+ if test "$valid_a_lib" != yes; then - $echo - $echo "*** Warning: Trying to link with static lib archive $deplib." - $echo "*** I have the capability to make that library automatically link in when" -@@ -2004,15 +2284,15 @@ - esac # case $deplib - if test "$found" = yes || test -f "$lib"; then : - else -- $echo "$modename: cannot find the library \`$lib'" 1>&2 -- exit 1 -+ $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 -+ exit $EXIT_FAILURE - fi - - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` -@@ -2028,6 +2308,8 @@ - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no -+ avoidtemprpath= -+ - - # Read the .la file - case $lib in -@@ -2035,13 +2317,6 @@ - *) . ./$lib ;; - esac - -- case $host in -- *-*-darwin*) -- # Convert "-framework foo" to "foo.ltframework" in dependency_libs -- test -n "$dependency_libs" && dependency_libs=`$echo "X$dependency_libs" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` -- ;; -- esac -- - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then -@@ -2052,33 +2327,32 @@ - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" -- tmp_libs= -- for deplib in $dependency_libs; do -- #echo "Adding $deplib to \$deplibs" -- deplibs="$deplib $deplibs" -- if test "X$duplicate_deps" = "Xyes" ; then -- case "$tmp_libs " in -- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -- esac -- fi -- tmp_libs="$tmp_libs $deplib" -- done - if test -z "$libdir"; then - if test -z "$old_library"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" -+ tmp_libs= -+ for deplib in $dependency_libs; do -+ deplibs="$deplib $deplibs" -+ if test "X$duplicate_deps" = "Xyes" ; then -+ case "$tmp_libs " in -+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -+ esac -+ fi -+ tmp_libs="$tmp_libs $deplib" -+ done - elif test "$linkmode" != prog && test "$linkmode" != lib; then - $echo "$modename: \`$lib' is not a convenience library" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - continue - fi # $pass = conv - -- -+ - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do -@@ -2086,16 +2360,18 @@ - done - if test -z "$linklib"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi -- if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then -+ if test -z "$dlname" || -+ test "$dlopen_support" != yes || -+ test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't -@@ -2129,14 +2405,28 @@ - absdir="$abs_ladir" - libdir="$abs_ladir" - else -- dir="$libdir" -- absdir="$libdir" -+ # Adding 'libdir' from the .la file to our library search paths -+ # breaks crosscompilation horribly. We cheat here and don't add -+ # it, instead adding the path where we found the .la. -CL -+ dir="$abs_ladir" -+ absdir="$abs_ladir" -+ libdir="$abs_ladir" -+ #dir="$libdir" -+ #absdir="$libdir" - fi -+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else -- dir="$ladir/$objdir" -- absdir="$abs_ladir/$objdir" -- # Remove this search path later -- notinst_path="$notinst_path $abs_ladir" -+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then -+ dir="$ladir" -+ absdir="$abs_ladir" -+ # Remove this search path later -+ notinst_path="$notinst_path $abs_ladir" -+ else -+ dir="$ladir/$objdir" -+ absdir="$abs_ladir/$objdir" -+ # Remove this search path later -+ notinst_path="$notinst_path $abs_ladir" -+ fi - fi # $installed = yes - name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - -@@ -2144,7 +2434,7 @@ - if test "$pass" = dlpreopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). -@@ -2171,7 +2461,7 @@ - continue - fi - -- -+ - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" -@@ -2209,12 +2499,12 @@ - if test -n "$library_names" && - { test "$prefer_static_libs" = no || test -z "$old_library"; }; then - # We need to hardcode the library path -- if test -n "$shlibpath_var"; then -+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath " in - *" $dir "*) ;; - *" $absdir "*) ;; -- *) temp_rpath="$temp_rpath $dir" ;; -+ *) temp_rpath="$temp_rpath $absdir" ;; - esac - fi - -@@ -2251,24 +2541,29 @@ - fi - - link_static=no # Whether the deplib will be linked statically -+ use_static_libs=$prefer_static_libs -+ if test "$use_static_libs" = built && test "$installed" = yes ; then -+ use_static_libs=no -+ fi - if test -n "$library_names" && -- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then -+ { test "$use_static_libs" = no || test -z "$old_library"; }; then - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" -- need_relink=yes -+ need_relink=no - fi - # This is a shared library -- -- # Warn about portability, can't link against -module's on some systems (darwin) -- if test "$shouldnotlink" = yes && test "$pass" = link ; then -+ -+ # Warn about portability, can't link against -module's on -+ # some systems (darwin) -+ if test "$shouldnotlink" = yes && test "$pass" = link ; then - $echo - if test "$linkmode" = prog; then - $echo "*** Warning: Linking the executable $output against the loadable module" - else - $echo "*** Warning: Linking the shared library $output against the loadable module" - fi -- $echo "*** $linklib is not portable!" -- fi -+ $echo "*** $linklib is not portable!" -+ fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. -@@ -2326,9 +2621,10 @@ - else - $show "extracting exported symbol list from \`$soname'" - save_ifs="$IFS"; IFS='~' -- eval cmds=\"$extract_expsyms_cmds\" -+ cmds=$extract_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done -@@ -2339,9 +2635,10 @@ - if test -f "$output_objdir/$newlib"; then :; else - $show "generating import library for \`$soname'" - save_ifs="$IFS"; IFS='~' -- eval cmds=\"$old_archive_from_expsyms_cmds\" -+ cmds=$old_archive_from_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done -@@ -2362,11 +2659,15 @@ - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in -- *-*-sco3.2v5* ) add_dir="-L$dir" ;; -+ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; -+ *-*-sysv4*uw2*) add_dir="-L$dir" ;; -+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ -+ *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) -- # if the lib is a module then we can not link against it, someone -- # is ignoring the new warnings I added -- if /usr/bin/file -L $add 2> /dev/null | grep "bundle" >/dev/null ; then -+ # if the lib is a module then we can not link against -+ # it, someone is ignoring the new warnings I added -+ if /usr/bin/file -L $add 2> /dev/null | -+ $EGREP ": [^:]* bundle" >/dev/null ; then - $echo "** Warning, lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $echo -@@ -2374,7 +2675,7 @@ - $echo "** The link will probably fail, sorry" - else - add="$dir/$old_library" -- fi -+ fi - fi - esac - elif test "$hardcode_minus_L" = no; then -@@ -2397,9 +2698,9 @@ - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then -- case "$libdir" in -+ case $libdir in - [\\/]*) -- add_dir="-L$inst_prefix_dir$libdir $add_dir" -+ add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi -@@ -2416,7 +2717,7 @@ - - if test "$lib_linked" != yes; then - $echo "$modename: configuration error: unsupported hardcode properties" -- exit 1 -+ exit $EXIT_FAILURE - fi - - if test -n "$add_shlibpath"; then -@@ -2459,7 +2760,8 @@ - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then -- if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then -+ if test -n "$inst_prefix_dir" && -+ test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" -@@ -2469,9 +2771,9 @@ - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then -- case "$libdir" in -+ case $libdir in - [\\/]*) -- add_dir="-L$inst_prefix_dir$libdir $add_dir" -+ add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi -@@ -2530,17 +2832,16 @@ - fi - fi - else -- convenience="$convenience $dir/$old_library" -- old_convenience="$old_convenience $dir/$old_library" - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then -- #if test -n "$dependency_libs" && -- # { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || -- # test "$link_static" = yes; }; then -+ if test -n "$dependency_libs" && -+ { test "$hardcode_into_libs" != yes || -+ test "$build_old_libs" = yes || -+ test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do -@@ -2554,7 +2855,7 @@ - esac - done - dependency_libs="$temp_deplibs" -- #fi -+ fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library -@@ -2596,20 +2897,18 @@ - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - if test "$absdir" != "$libdir"; then -- # Sure, some shells/systems don't implement the -ef. -- # Those will have to live with the warning. -- test "$absdir" -ef "$libdir" > /dev/null 2>&1 || -- $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 -+ $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 - fi - path="$absdir" - fi - depdepl= - case $host in - *-*-darwin*) -- # we do not want to link against static libs, but need to link against shared -+ # we do not want to link against static libs, -+ # but need to link against shared - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do -@@ -2617,46 +2916,36 @@ - done - if test -f "$path/$depdepl" ; then - depdepl="$path/$depdepl" -- fi -+ fi - # do not add paths which are already there - case " $newlib_search_path " in - *" $path "*) ;; - *) newlib_search_path="$newlib_search_path $path";; - esac -- path="" - fi -+ path="" - ;; - *) -- path="-L$path" -- ;; -- esac -- -+ path="-L$path" -+ ;; -+ esac - ;; -- -l*) -+ -l*) - case $host in - *-*-darwin*) -- # Again, we only want to link against shared libraries -- eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` -- for tmp in $newlib_search_path ; do -- if test -f "$tmp/lib$tmp_libs.dylib" ; then -- eval depdepl="$tmp/lib$tmp_libs.dylib" -- break -- fi -- done -- path="" -+ # Again, we only want to link against shared libraries -+ eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` -+ for tmp in $newlib_search_path ; do -+ if test -f "$tmp/lib$tmp_libs.dylib" ; then -+ eval depdepl="$tmp/lib$tmp_libs.dylib" -+ break -+ fi -+ done -+ path="" - ;; - *) continue ;; -- esac -- ;; -- -- *.ltframework) -- case $host in -- *-*-darwin*) -- depdepl="$deplib" -- ;; - esac - ;; -- - *) continue ;; - esac - case " $deplibs " in -@@ -2660,12 +2949,12 @@ - *) continue ;; - esac - case " $deplibs " in -- *" $depdepl "*) ;; -- *) deplibs="$deplibs $depdepl" ;; -- esac -- case " $deplibs " in - *" $path "*) ;; -- *) deplibs="$deplibs $path" ;; -+ *) deplibs="$path $deplibs" ;; -+ esac -+ case " $deplibs " in -+ *" $depdepl "*) ;; -+ *) deplibs="$depdepl $deplibs" ;; - esac - done - fi # link_all_deplibs != no -@@ -2752,7 +3041,8 @@ - eval $var=\"$tmp_libs\" - done # for var - fi -- # Last step: remove runtime libs from dependency_libs (they stay in deplibs) -+ # Last step: remove runtime libs from dependency_libs -+ # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in -@@ -2812,19 +3102,19 @@ - case $outputname in - lib*) - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` -- eval shared_ext=\"$shrext\" -+ eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - if test "$module" = no; then - $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` -- eval shared_ext=\"$shrext\" -+ eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` -@@ -2835,7 +3125,7 @@ - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 -- exit 1 -+ exit $EXIT_FAILURE - else - $echo - $echo "*** Warning: Linking the shared library $output against the non-libtool" -@@ -2883,13 +3173,13 @@ - if test -n "$8"; then - $echo "$modename: too many parameters to \`-version-info'" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible -- -+ - case $vinfo_number in - yes) - number_major="$2" -@@ -2929,36 +3219,36 @@ - - # Check that each of the things are valid numbers. - case $current in -- 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; -+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) -- $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 -+ $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - - case $revision in -- 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; -+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) -- $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 -+ $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - - case $age in -- 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; -+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) -- $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 -+ $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - - if test "$age" -gt "$current"; then - $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - # Calculate the version variables. -@@ -2975,7 +3265,7 @@ - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - minor_current=`expr $current + 1` -- verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" -+ verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - ;; - - freebsd-aout) -@@ -3047,7 +3337,7 @@ - *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - -@@ -3098,9 +3388,15 @@ - tempremovelist=`$echo "$output_objdir/*"` - for p in $tempremovelist; do - case $p in -- *.$objext | *$exeext) -+ *.$objext) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) -+ if test "X$precious_files_regex" != "X"; then -+ if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 -+ then -+ continue -+ fi -+ fi - removelist="$removelist $p" - ;; - *) ;; -@@ -3122,9 +3418,9 @@ - - # Eliminate all temporary directories. - for path in $notinst_path; do -- lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'` -- deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` -- dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` -+ lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` -+ deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` -+ dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` - done - - if test -n "$xrpath"; then -@@ -3137,7 +3433,7 @@ - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done -- if true || test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then -+ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi -@@ -3170,14 +3466,19 @@ - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework -- deplibs="$deplibs System.ltframework" -+ deplibs="$deplibs -framework System" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; -- *-*-openbsd* | *-*-freebsd*) -+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. -- test "X$arg" = "X-lc" && continue -+ ;; -+ *-*-sco3.2v5* | *-*-sco5v6*) -+ # Causes problems with __ctype -+ ;; -+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) -+ # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. -@@ -3221,11 +3522,11 @@ - int main() { return 0; } - EOF - $rm conftest -- $LTCC -o conftest conftest.c $deplibs -+ $LTCC $LTCFLAGS -o conftest conftest.c $deplibs - if test "$?" -eq 0 ; then - ldd_output=`ldd conftest` - for i in $deplibs; do -- name="`expr $i : '-l\(.*\)'`" -+ name=`expr $i : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test "$name" != "" && test "$name" -ne "0"; then - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then -@@ -3262,11 +3563,11 @@ - # Error occurred in the first compile. Let's try to salvage - # the situation: Compile a separate program for each library. - for i in $deplibs; do -- name="`expr $i : '-l\(.*\)'`" -+ name=`expr $i : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test "$name" != "" && test "$name" != "0"; then - $rm conftest -- $LTCC -o conftest conftest.c $i -+ $LTCC $LTCFLAGS -o conftest conftest.c $i - # Did it work? - if test "$?" -eq 0 ; then - ldd_output=`ldd conftest` -@@ -3314,7 +3615,7 @@ - set dummy $deplibs_check_method - file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - for a_deplib in $deplibs; do -- name="`expr $a_deplib : '-l\(.*\)'`" -+ name=`expr $a_deplib : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test "$name" != "" && test "$name" != "0"; then - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then -@@ -3383,7 +3684,7 @@ - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - for a_deplib in $deplibs; do -- name="`expr $a_deplib : '-l\(.*\)'`" -+ name=`expr $a_deplib : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test -n "$name" && test "$name" != "0"; then - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then -@@ -3463,7 +3764,7 @@ - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework -- newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` -+ newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - -@@ -3509,17 +3810,39 @@ - fi - fi - fi -- # Time to change all our "foo.ltframework" stuff back to "-framework foo" -- case $host in -- *-*-darwin*) -- newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` -- dependency_libs=`$echo "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` -- ;; -- esac - # Done checking deplibs! - deplibs=$newdeplibs - fi - -+ -+ # move library search paths that coincide with paths to not yet -+ # installed libraries to the beginning of the library search list -+ new_libs= -+ for path in $notinst_path; do -+ case " $new_libs " in -+ *" -L$path/$objdir "*) ;; -+ *) -+ case " $deplibs " in -+ *" -L$path/$objdir "*) -+ new_libs="$new_libs -L$path/$objdir" ;; -+ esac -+ ;; -+ esac -+ done -+ for deplib in $deplibs; do -+ case $deplib in -+ -L*) -+ case " $new_libs " in -+ *" $deplib "*) ;; -+ *) new_libs="$new_libs $deplib" ;; -+ esac -+ ;; -+ *) new_libs="$new_libs $deplib" ;; -+ esac -+ done -+ deplibs="$new_libs" -+ -+ - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= -@@ -3532,7 +3855,7 @@ - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" -- test "$mode" != relink && test "$fast_install" = no && rpath="$compile_rpath$rpath" -+ test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then -@@ -3587,7 +3910,7 @@ - fi - - # Get the real and link names of the library. -- eval shared_ext=\"$shrext\" -+ eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - realname="$2" -@@ -3603,6 +3926,7 @@ - fi - - lib="$output_objdir/$realname" -+ linknames= - for link - do - linknames="$linknames $link" -@@ -3617,10 +3941,11 @@ - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols -- eval cmds=\"$export_symbols_cmds\" -+ cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - if len=`expr "X$cmd" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - $show "$cmd" -@@ -3630,6 +3955,9 @@ - # The command line is too long to execute in one step. - $show "using reloadable object file for export list..." - skipped_export=: -+ # Break out early, otherwise skipped_export may be -+ # set to false by a later but shorter cmd. -+ break - fi - done - IFS="$save_ifs" -@@ -3650,12 +3978,12 @@ - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; -- *) -+ *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done -- deplibs="$tmp_deplibs" -+ deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then -@@ -3663,67 +3991,13 @@ - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${outputname}x" -- $show "${rm}r $gentop" -- $run ${rm}r "$gentop" -- $show "$mkdir $gentop" -- $run $mkdir "$gentop" -- status=$? -- if test "$status" -ne 0 && test ! -d "$gentop"; then -- exit $status -- fi - generated="$generated $gentop" - -- for xlib in $convenience; do -- # Extract the objects. -- case $xlib in -- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; -- *) xabs=`pwd`"/$xlib" ;; -- esac -- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` -- xdir="$gentop/$xlib" -- -- $show "${rm}r $xdir" -- $run ${rm}r "$xdir" -- $show "$mkdir $xdir" -- $run $mkdir "$xdir" -- status=$? -- if test "$status" -ne 0 && test ! -d "$xdir"; then -- exit $status -- fi -- # We will extract separately just the conflicting names and we will no -- # longer touch any unique names. It is faster to leave these extract -- # automatically by $AR in one run. -- $show "(cd $xdir && $AR x $xabs)" -- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? -- if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then -- : -- else -- $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 -- $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 -- $AR t "$xabs" | sort | uniq -cd | while read -r count name -- do -- i=1 -- while test "$i" -le "$count" -- do -- # Put our $i before any first dot (extension) -- # Never overwrite any file -- name_to="$name" -- while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" -- do -- name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` -- done -- $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" -- $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? -- i=`expr $i + 1` -- done -- done -- fi -- -- libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` -- done -+ func_extract_archives $gentop $convenience -+ libobjs="$libobjs $func_extract_archives_result" - fi - fi -- -+ - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" -@@ -3734,31 +4008,27 @@ - $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? - fi - -- # Add all flags from the command line. We here create a library, -- # but those flags were only added to compile_command and -- # finalize_command, which are only used when creating executables. -- # So do it by hand here. -- compiler_flags="$compiler_flags $add_flags" -- # Only add it to commands which use CC, instead of LD, i.e. -- # only to $compiler_flags -- #linker_flags="$linker_flags $add_flags" -- - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then -- eval cmds=\"$module_expsym_cmds\" -+ eval test_cmds=\"$module_expsym_cmds\" -+ cmds=$module_expsym_cmds - else -- eval cmds=\"$module_cmds\" -+ eval test_cmds=\"$module_cmds\" -+ cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then -- eval cmds=\"$archive_expsym_cmds\" -+ eval test_cmds=\"$archive_expsym_cmds\" -+ cmds=$archive_expsym_cmds - else -- eval cmds=\"$archive_cmds\" -+ eval test_cmds=\"$archive_cmds\" -+ cmds=$archive_cmds - fi - fi - -- if test "X$skipped_export" != "X:" && len=`expr "X$cmds" : ".*"` && -+ if test "X$skipped_export" != "X:" && -+ len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else -@@ -3777,6 +4047,7 @@ - save_libobjs=$libobjs - fi - save_output=$output -+ output_la=`$echo "X$output" | $Xsed -e "$basename"` - - # Clear the reloadable object creation command queue and - # initialize k to one. -@@ -3786,13 +4057,13 @@ - delfiles= - last_robj= - k=1 -- output=$output_objdir/$save_output-${k}.$objext -+ output=$output_objdir/$output_la-${k}.$objext - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - eval test_cmds=\"$reload_cmds $objlist $last_robj\" - if test "X$objlist" = X || -- { len=`expr "X$test_cmds" : ".*"` && -+ { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; }; then - objlist="$objlist $obj" - else -@@ -3806,9 +4077,9 @@ - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" - fi -- last_robj=$output_objdir/$save_output-${k}.$objext -+ last_robj=$output_objdir/$output_la-${k}.$objext - k=`expr $k + 1` -- output=$output_objdir/$save_output-${k}.$objext -+ output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - len=1 - fi -@@ -3828,13 +4099,13 @@ - eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" - fi - -- # Set up a command to remove the reloadale object files -+ # Set up a command to remove the reloadable object files - # after they are used. - i=0 - while test "$i" -lt "$k" - do - i=`expr $i + 1` -- delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" -+ delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" - done - - $echo "creating a temporary reloadable object file: $output" -@@ -3859,28 +4130,54 @@ - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. -+ if test "$module" = yes && test -n "$module_cmds" ; then -+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then -+ cmds=$module_expsym_cmds -+ else -+ cmds=$module_cmds -+ fi -+ else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then -- eval cmds=\"$archive_expsym_cmds\" -+ cmds=$archive_expsym_cmds - else -- eval cmds=\"$archive_cmds\" -+ cmds=$archive_cmds -+ fi - fi - - # Append the command to remove the reloadable object files - # to the just-reset $cmds. -- eval cmds=\"\$cmds~$rm $delfiles\" -+ eval cmds=\"\$cmds~\$rm $delfiles\" - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" -- $run eval "$cmd" || exit $? -+ $run eval "$cmd" || { -+ lt_exit=$? -+ -+ # Restore the uninstalled library and exit -+ if test "$mode" = relink; then -+ $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' -+ fi -+ -+ exit $lt_exit -+ } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? -- exit 0 -+ -+ if test -n "$convenience"; then -+ if test -z "$whole_archive_flag_spec"; then -+ $show "${rm}r $gentop" -+ $run ${rm}r "$gentop" -+ fi -+ fi -+ -+ exit $EXIT_SUCCESS - fi - - # Create links to the real library. -@@ -3928,7 +4225,7 @@ - *.lo) - if test -n "$objs$old_deplibs"; then - $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - libobj="$output" - obj=`$echo "X$output" | $Xsed -e "$lo2o"` -@@ -3957,64 +4254,10 @@ - eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${obj}x" -- $show "${rm}r $gentop" -- $run ${rm}r "$gentop" -- $show "$mkdir $gentop" -- $run $mkdir "$gentop" -- status=$? -- if test "$status" -ne 0 && test ! -d "$gentop"; then -- exit $status -- fi - generated="$generated $gentop" - -- for xlib in $convenience; do -- # Extract the objects. -- case $xlib in -- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; -- *) xabs=`pwd`"/$xlib" ;; -- esac -- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` -- xdir="$gentop/$xlib" -- -- $show "${rm}r $xdir" -- $run ${rm}r "$xdir" -- $show "$mkdir $xdir" -- $run $mkdir "$xdir" -- status=$? -- if test "$status" -ne 0 && test ! -d "$xdir"; then -- exit $status -- fi -- # We will extract separately just the conflicting names and we will no -- # longer touch any unique names. It is faster to leave these extract -- # automatically by $AR in one run. -- $show "(cd $xdir && $AR x $xabs)" -- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? -- if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then -- : -- else -- $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 -- $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 -- $AR t "$xabs" | sort | uniq -cd | while read -r count name -- do -- i=1 -- while test "$i" -le "$count" -- do -- # Put our $i before any first dot (extension) -- # Never overwrite any file -- name_to="$name" -- while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" -- do -- name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` -- done -- $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" -- $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? -- i=`expr $i + 1` -- done -- done -- fi -- -- reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` -- done -+ func_extract_archives $gentop $convenience -+ reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - -@@ -4022,10 +4265,11 @@ - reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" -- eval cmds=\"$reload_cmds\" -+ cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done -@@ -4038,7 +4282,7 @@ - $run ${rm}r $gentop - fi - -- exit 0 -+ exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then -@@ -4051,17 +4295,18 @@ - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $run eval "echo timestamp > $libobj" || exit $? -- exit 0 -+ exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" -- eval cmds=\"$reload_cmds\" -+ cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done -@@ -4073,7 +4318,7 @@ - $run ${rm}r $gentop - fi - -- exit 0 -+ exit $EXIT_SUCCESS - ;; - - prog) -@@ -4098,24 +4343,50 @@ - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework -- compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` -- finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` -+ compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` -+ finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - case $host in -- *-*-darwin*) -+ *darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - if test "$tagname" = CXX ; then - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - fi -- # Time to change all our "foo.ltframework" stuff back to "-framework foo" -- compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` -- finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - -+ -+ # move library search paths that coincide with paths to not yet -+ # installed libraries to the beginning of the library search list -+ new_libs= -+ for path in $notinst_path; do -+ case " $new_libs " in -+ *" -L$path/$objdir "*) ;; -+ *) -+ case " $compile_deplibs " in -+ *" -L$path/$objdir "*) -+ new_libs="$new_libs -L$path/$objdir" ;; -+ esac -+ ;; -+ esac -+ done -+ for deplib in $compile_deplibs; do -+ case $deplib in -+ -L*) -+ case " $new_libs " in -+ *" $deplib "*) ;; -+ *) new_libs="$new_libs $deplib" ;; -+ esac -+ ;; -+ *) new_libs="$new_libs $deplib" ;; -+ esac -+ done -+ compile_deplibs="$new_libs" -+ -+ - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - -@@ -4160,10 +4431,15 @@ - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) -+ testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac -+ case :$dllsearchpath: in -+ *":$testbindir:"*) ;; -+ *) dllsearchpath="$dllsearchpath:$testbindir";; -+ esac - ;; - esac - done -@@ -4277,13 +4553,25 @@ - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then -- export_symbols="$output_objdir/$output.exp" -+ export_symbols="$output_objdir/$outputname.exp" - $run $rm $export_symbols -- $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' -+ $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' -+ case $host in -+ *cygwin* | *mingw* ) -+ $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' -+ $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' -+ ;; -+ esac - else -- $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' -- $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' -+ $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' -+ $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - $run eval 'mv "$nlist"T "$nlist"' -+ case $host in -+ *cygwin* | *mingw* ) -+ $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' -+ $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' -+ ;; -+ esac - fi - fi - -@@ -4334,7 +4622,26 @@ - #endif - - /* The mapping between symbol names and symbols. */ -+" -+ -+ case $host in -+ *cygwin* | *mingw* ) -+ $echo >> "$output_objdir/$dlsyms" "\ -+/* DATA imports from DLLs on WIN32 can't be const, because -+ runtime relocations are performed -- see ld's documentation -+ on pseudo-relocs */ -+struct { -+" -+ ;; -+ * ) -+ $echo >> "$output_objdir/$dlsyms" "\ - const struct { -+" -+ ;; -+ esac -+ -+ -+ $echo >> "$output_objdir/$dlsyms" "\ - const char *name; - lt_ptr address; - } -@@ -4381,20 +4688,33 @@ - esac - - # Now compile the dynamic symbol file. -- $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" -- $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? -+ $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" -+ $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? - - # Clean up the generated files. - $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" - $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" - - # Transform the symbol file into the correct name. -- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` -- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` -+ case $host in -+ *cygwin* | *mingw* ) -+ if test -f "$output_objdir/${outputname}.def" ; then -+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` -+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` -+ else -+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` -+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` -+ fi -+ ;; -+ * ) -+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` -+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` -+ ;; -+ esac - ;; - *) - $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - else -@@ -4407,17 +4727,6 @@ - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi - -- # AIX runtime linking requires linking programs with -Wl,-brtl and libs with -Wl,-G -- # Also add -bnolibpath to the beginning of the link line, to clear the hardcoded runpath. -- # Otherwise, things like the -L path to libgcc.a are accidentally hardcoded by ld. -- # This does not apply on AIX for ia64, which uses a SysV linker. -- case "$host" in -- ia64-*-aix5*) ;; -- *-*-aix4* | *-*-aix5*) -- compile_command=`$echo "X$compile_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"` -- finalize_command=`$echo "X$finalize_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"` ;; -- esac -- - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` -@@ -4426,7 +4735,7 @@ - # We have no uninstalled library dependencies, so finalize right now. - $show "$link_command" - $run eval "$link_command" -- status=$? -+ exit_status=$? - - # Delete the generated files. - if test -n "$dlsyms"; then -@@ -4434,7 +4743,7 @@ - $run $rm "$output_objdir/${outputname}S.${objext}" - fi - -- exit $status -+ exit $exit_status - fi - - if test -n "$shlibpath_var"; then -@@ -4493,7 +4802,7 @@ - # Link the executable and exit - $show "$link_command" - $run eval "$link_command" || exit $? -- exit 0 -+ exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then -@@ -4548,10 +4857,10 @@ - fi - - # Quote $echo for shipping. -- if test "X$echo" = "X$SHELL $0 --fallback-echo"; then -- case $0 in -- [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; -- *) qecho="$SHELL `pwd`/$0 --fallback-echo";; -+ if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then -+ case $progpath in -+ [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; -+ *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` - else -@@ -4573,11 +4882,13 @@ - *) exeext= ;; - esac - case $host in -- *mingw* ) -- cwrappersource=`$echo ${output_objdir}/lt-${outputname}.c` -- cwrapper=`$echo ${output}.exe` -- $rm $cwrappersource $cwrapper -- trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 15 -+ *cygwin* | *mingw* ) -+ output_name=`basename $output` -+ output_path=`dirname $output` -+ cwrappersource="$output_path/$objdir/lt-$output_name.c" -+ cwrapper="$output_path/$output_name.exe" -+ $rm $cwrappersource $cwrapper -+ trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - cat > $cwrappersource < - #include - #include -+#include -+#include -+#include - - #if defined(PATH_MAX) - # define LT_PATHMAX PATH_MAX -@@ -4612,15 +4926,19 @@ - #endif - - #ifndef DIR_SEPARATOR --#define DIR_SEPARATOR '/' -+# define DIR_SEPARATOR '/' -+# define PATH_SEPARATOR ':' - #endif - - #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) --#define HAVE_DOS_BASED_FILE_SYSTEM --#ifndef DIR_SEPARATOR_2 --#define DIR_SEPARATOR_2 '\\' --#endif -+# define HAVE_DOS_BASED_FILE_SYSTEM -+# ifndef DIR_SEPARATOR_2 -+# define DIR_SEPARATOR_2 '\\' -+# endif -+# ifndef PATH_SEPARATOR_2 -+# define PATH_SEPARATOR_2 ';' -+# endif - #endif - - #ifndef DIR_SEPARATOR_2 -@@ -4630,17 +4948,32 @@ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) - #endif /* DIR_SEPARATOR_2 */ - -+#ifndef PATH_SEPARATOR_2 -+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -+#else /* PATH_SEPARATOR_2 */ -+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -+#endif /* PATH_SEPARATOR_2 */ -+ - #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) - #define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ - } while (0) - -+/* -DDEBUG is fairly common in CFLAGS. */ -+#undef DEBUG -+#if defined DEBUGWRAPPER -+# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) -+#else -+# define DEBUG(format, ...) -+#endif -+ - const char *program_name = NULL; - - void * xmalloc (size_t num); - char * xstrdup (const char *string); --char * basename (const char *name); --char * fnqualify(const char *path); -+const char * base_name (const char *name); -+char * find_executable(const char *wrapper); -+int check_executable(const char *path); - char * strendzap(char *str, const char *pat); - void lt_fatal (const char *message, ...); - -@@ -4649,30 +4982,52 @@ - { - char **newargz; - int i; -- -- program_name = (char *) xstrdup ((char *) basename (argv[0])); -+ -+ program_name = (char *) xstrdup (base_name (argv[0])); -+ DEBUG("(main) argv[0] : %s\n",argv[0]); -+ DEBUG("(main) program_name : %s\n",program_name); - newargz = XMALLOC(char *, argc+2); - EOF - -- cat >> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" -- newargz[1] = fnqualify(argv[0]); -+ cat >> $cwrappersource <<"EOF" -+ newargz[1] = find_executable(argv[0]); -+ if (newargz[1] == NULL) -+ lt_fatal("Couldn't find %s", argv[0]); -+ DEBUG("(main) found exe at : %s\n",newargz[1]); - /* we know the script has the same name, without the .exe */ - /* so make sure newargz[1] doesn't end in .exe */ -- strendzap(newargz[1],".exe"); -+ strendzap(newargz[1],".exe"); - for (i = 1; i < argc; i++) - newargz[i+1] = xstrdup(argv[i]); - newargz[argc+1] = NULL; -+ -+ for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" -+ cat >> $cwrappersource <<"EOF" -+ return 127; - } - - void * -@@ -4685,59 +5040,159 @@ - return p; - } - --char * -+char * - xstrdup (const char *string) - { - return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL - ; - } - --char * --basename (const char *name) -+const char * -+base_name (const char *name) - { - const char *base; - - #if defined (HAVE_DOS_BASED_FILE_SYSTEM) - /* Skip over the disk name in MSDOS pathnames. */ -- if (isalpha (name[0]) && name[1] == ':') -+ if (isalpha ((unsigned char)name[0]) && name[1] == ':') - name += 2; - #endif - - for (base = name; *name; name++) - if (IS_DIR_SEPARATOR (*name)) - base = name + 1; -- return (char *) base; -+ return base; -+} -+ -+int -+check_executable(const char * path) -+{ -+ struct stat st; -+ -+ DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); -+ if ((!path) || (!*path)) -+ return 0; -+ -+ if ((stat (path, &st) >= 0) && -+ ( -+ /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ -+#if defined (S_IXOTH) -+ ((st.st_mode & S_IXOTH) == S_IXOTH) || -+#endif -+#if defined (S_IXGRP) -+ ((st.st_mode & S_IXGRP) == S_IXGRP) || -+#endif -+ ((st.st_mode & S_IXUSR) == S_IXUSR)) -+ ) -+ return 1; -+ else -+ return 0; - } - --char * --fnqualify(const char *path) -+/* Searches for the full path of the wrapper. Returns -+ newly allocated full path name if found, NULL otherwise */ -+char * -+find_executable (const char* wrapper) - { -- size_t size; -- char *p; -+ int has_slash = 0; -+ const char* p; -+ const char* p_next; -+ /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; -+ int tmp_len; -+ char* concat_name; -+ -+ DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); - -- assert(path != NULL); -+ if ((wrapper == NULL) || (*wrapper == '\0')) -+ return NULL; - -- /* Is it qualified already? */ -+ /* Absolute path? */ - #if defined (HAVE_DOS_BASED_FILE_SYSTEM) -- if (isalpha (path[0]) && path[1] == ':') -- return xstrdup (path); -+ if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') -+ { -+ concat_name = xstrdup (wrapper); -+ if (check_executable(concat_name)) -+ return concat_name; -+ XFREE(concat_name); -+ } -+ else -+ { -+#endif -+ if (IS_DIR_SEPARATOR (wrapper[0])) -+ { -+ concat_name = xstrdup (wrapper); -+ if (check_executable(concat_name)) -+ return concat_name; -+ XFREE(concat_name); -+ } -+#if defined (HAVE_DOS_BASED_FILE_SYSTEM) -+ } - #endif -- if (IS_DIR_SEPARATOR (path[0])) -- return xstrdup (path); - -- /* prepend the current directory */ -- /* doesn't handle '~' */ -+ for (p = wrapper; *p; p++) -+ if (*p == '/') -+ { -+ has_slash = 1; -+ break; -+ } -+ if (!has_slash) -+ { -+ /* no slashes; search PATH */ -+ const char* path = getenv ("PATH"); -+ if (path != NULL) -+ { -+ for (p = path; *p; p = p_next) -+ { -+ const char* q; -+ size_t p_len; -+ for (q = p; *q; q++) -+ if (IS_PATH_SEPARATOR(*q)) -+ break; -+ p_len = q - p; -+ p_next = (*q == '\0' ? q : q + 1); -+ if (p_len == 0) -+ { -+ /* empty path: current directory */ -+ if (getcwd (tmp, LT_PATHMAX) == NULL) -+ lt_fatal ("getcwd failed"); -+ tmp_len = strlen(tmp); -+ concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); -+ memcpy (concat_name, tmp, tmp_len); -+ concat_name[tmp_len] = '/'; -+ strcpy (concat_name + tmp_len + 1, wrapper); -+ } -+ else -+ { -+ concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); -+ memcpy (concat_name, p, p_len); -+ concat_name[p_len] = '/'; -+ strcpy (concat_name + p_len + 1, wrapper); -+ } -+ if (check_executable(concat_name)) -+ return concat_name; -+ XFREE(concat_name); -+ } -+ } -+ /* not found in PATH; assume curdir */ -+ } -+ /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); -- size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ -- p = XMALLOC(char, size); -- sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); -- return p; -+ tmp_len = strlen(tmp); -+ concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); -+ memcpy (concat_name, tmp, tmp_len); -+ concat_name[tmp_len] = '/'; -+ strcpy (concat_name + tmp_len + 1, wrapper); -+ -+ if (check_executable(concat_name)) -+ return concat_name; -+ XFREE(concat_name); -+ return NULL; - } - - char * --strendzap(char *str, const char *pat) -+strendzap(char *str, const char *pat) - { - size_t len, patlen; - -@@ -4757,7 +5212,7 @@ - } - - static void --lt_error_core (int exit_status, const char * mode, -+lt_error_core (int exit_status, const char * mode, - const char * message, va_list ap) - { - fprintf (stderr, "%s: %s: ", program_name, mode); -@@ -4777,16 +5232,16 @@ - va_end (ap); - } - EOF -- # we should really use a build-platform specific compiler -- # here, but OTOH, the wrappers (shell script and this C one) -- # are only useful if you want to execute the "real" binary. -- # Since the "real" binary is built for $host, then this -- # wrapper might as well be built for $host, too. -- $run $LTCC -s -o $cwrapper $cwrappersource -- ;; -- esac -- $rm $output -- trap "$rm $output; exit 1" 1 2 15 -+ # we should really use a build-platform specific compiler -+ # here, but OTOH, the wrappers (shell script and this C one) -+ # are only useful if you want to execute the "real" binary. -+ # Since the "real" binary is built for $host, then this -+ # wrapper might as well be built for $host, too. -+ $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource -+ ;; -+ esac -+ $rm $output -+ trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 - - $echo > $output "\ - #! $SHELL -@@ -4807,7 +5262,7 @@ - - # The HP-UX ksh and POSIX shell print the target directory to stdout - # if CDPATH is set. --if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi -+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - relink_command=\"$relink_command\" - -@@ -4886,7 +5341,7 @@ - else - $echo \"\$relink_command_output\" >&2 - $rm \"\$progdir/\$file\" -- exit 1 -+ exit $EXIT_FAILURE - fi - fi - -@@ -4936,34 +5391,32 @@ - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2*) - $echo >> $output "\ -- exec \$progdir\\\\\$program \${1+\"\$@\"} -+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} - " - ;; - - *) -- # Need to set LD_LIBRARY_PATH, to the value already -- # computed within libtool. - $echo >> $output "\ -- LD_LIBRARY_PATH=\"$rpath\" exec \$progdir/\$program \${1+\"\$@\"} -+ exec \"\$progdir/\$program\" \${1+\"\$@\"} - " - ;; - esac - $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" -- exit 1 -+ exit $EXIT_FAILURE - fi - else - # The program doesn't exist. -- \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 -+ \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$echo \"This script is just a wrapper for \$program.\" 1>&2 - $echo \"See the $PACKAGE documentation for more information.\" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - fi\ - " - chmod +x $output - fi -- exit 0 -+ exit $EXIT_SUCCESS - ;; - esac - -@@ -4986,78 +5439,78 @@ - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" -- $show "${rm}r $gentop" -- $run ${rm}r "$gentop" -- $show "$mkdir $gentop" -- $run $mkdir "$gentop" -- status=$? -- if test "$status" -ne 0 && test ! -d "$gentop"; then -- exit $status -- fi - generated="$generated $gentop" - -- # Add in members from convenience archives. -- for xlib in $addlibs; do -- # Extract the objects. -- case $xlib in -- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; -- *) xabs=`pwd`"/$xlib" ;; -- esac -- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` -- xdir="$gentop/$xlib" -- -- $show "${rm}r $xdir" -- $run ${rm}r "$xdir" -- $show "$mkdir $xdir" -- $run $mkdir "$xdir" -- status=$? -- if test "$status" -ne 0 && test ! -d "$xdir"; then -- exit $status -- fi -- # We will extract separately just the conflicting names and we will no -- # longer touch any unique names. It is faster to leave these extract -- # automatically by $AR in one run. -- $show "(cd $xdir && $AR x $xabs)" -- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? -- if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then -- : -- else -- $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 -- $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 -- $AR t "$xabs" | sort | uniq -cd | while read -r count name -- do -- i=1 -- while test "$i" -le "$count" -- do -- # Put our $i before any first dot (extension) -- # Never overwrite any file -- name_to="$name" -- while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" -- do -- name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` -- done -- $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" -- $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? -- i=`expr $i + 1` -- done -- done -- fi -- -- oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` -- done -+ func_extract_archives $gentop $addlibs -+ oldobjs="$oldobjs $func_extract_archives_result" - fi - -- compiler_flags="$compiler_flags $add_flags" -- - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then -- eval cmds=\"$old_archive_from_new_cmds\" -+ cmds=$old_archive_from_new_cmds - else -+ # POSIX demands no paths to be encoded in archives. We have -+ # to avoid creating archives with duplicate basenames if we -+ # might have to extract them afterwards, e.g., when creating a -+ # static archive out of a convenience library, or when linking -+ # the entirety of a libtool archive into another (currently -+ # not supported by libtool). -+ if (for obj in $oldobjs -+ do -+ $echo "X$obj" | $Xsed -e 's%^.*/%%' -+ done | sort | sort -uc >/dev/null 2>&1); then -+ : -+ else -+ $echo "copying selected object files to avoid basename conflicts..." -+ -+ if test -z "$gentop"; then -+ gentop="$output_objdir/${outputname}x" -+ generated="$generated $gentop" -+ -+ $show "${rm}r $gentop" -+ $run ${rm}r "$gentop" -+ $show "$mkdir $gentop" -+ $run $mkdir "$gentop" -+ exit_status=$? -+ if test "$exit_status" -ne 0 && test ! -d "$gentop"; then -+ exit $exit_status -+ fi -+ fi -+ -+ save_oldobjs=$oldobjs -+ oldobjs= -+ counter=1 -+ for obj in $save_oldobjs -+ do -+ objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` -+ case " $oldobjs " in -+ " ") oldobjs=$obj ;; -+ *[\ /]"$objbase "*) -+ while :; do -+ # Make sure we don't pick an alternate name that also -+ # overlaps. -+ newobj=lt$counter-$objbase -+ counter=`expr $counter + 1` -+ case " $oldobjs " in -+ *[\ /]"$newobj "*) ;; -+ *) if test ! -f "$gentop/$newobj"; then break; fi ;; -+ esac -+ done -+ $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" -+ $run ln "$obj" "$gentop/$newobj" || -+ $run cp "$obj" "$gentop/$newobj" -+ oldobjs="$oldobjs $gentop/$newobj" -+ ;; -+ *) oldobjs="$oldobjs $obj" ;; -+ esac -+ done -+ fi -+ - eval cmds=\"$old_archive_cmds\" - - if len=`expr "X$cmds" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then -- : -+ cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - $echo "using piecewise archive linking..." -@@ -5066,31 +5519,18 @@ - objlist= - concat_cmds= - save_oldobjs=$oldobjs -- # GNU ar 2.10+ was changed to match POSIX; thus no paths are -- # encoded into archives. This makes 'ar r' malfunction in -- # this piecewise linking case whenever conflicting object -- # names appear in distinct ar calls; check, warn and compensate. -- if (for obj in $save_oldobjs -- do -- $echo "X$obj" | $Xsed -e 's%^.*/%%' -- done | sort | sort -uc >/dev/null 2>&1); then -- : -- else -- $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2 -- $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2 -- AR_FLAGS=cq -- fi -+ - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj -- done -+ done - for obj in $save_oldobjs - do - oldobjs="$objlist $obj" - objlist="$objlist $obj" - eval test_cmds=\"$old_archive_cmds\" -- if len=`expr "X$test_cmds" : ".*"` && -+ if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; then - : - else -@@ -5098,7 +5538,7 @@ - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB -- fi -+ fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= -@@ -5109,12 +5549,13 @@ - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else -- eval cmds=\"\$concat_cmds~$old_archive_cmds\" -+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do -+ eval cmd=\"$cmd\" - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? -@@ -5146,11 +5587,13 @@ - fi - done - # Quote the link command for shipping. -- relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)" -+ relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then -- relink_command= -- fi -+ relink_command= -+ fi -+ -+ - # Only create the output if not a dry run. - if test -z "$run"; then - for installed in no yes; do -@@ -5162,13 +5605,17 @@ - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do -+ # Replacing uninstalled with installed can easily break crosscompilation, -+ # since the installed path is generally the wrong architecture. -CL -+ newdependency_libs="$newdependency_libs $deplib" -+ continue - case $deplib in - *.la) - name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - newdependency_libs="$newdependency_libs $libdir/$name" - ;; -@@ -5182,7 +5629,7 @@ - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - newdlfiles="$newdlfiles $libdir/$name" - done -@@ -5193,11 +5640,30 @@ - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - newdlprefiles="$newdlprefiles $libdir/$name" - done - dlprefiles="$newdlprefiles" -+ else -+ newdlfiles= -+ for lib in $dlfiles; do -+ case $lib in -+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; -+ *) abs=`pwd`"/$lib" ;; -+ esac -+ newdlfiles="$newdlfiles $abs" -+ done -+ dlfiles="$newdlfiles" -+ newdlprefiles= -+ for lib in $dlprefiles; do -+ case $lib in -+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; -+ *) abs=`pwd`"/$lib" ;; -+ esac -+ newdlprefiles="$newdlprefiles $abs" -+ done -+ dlprefiles="$newdlprefiles" - fi - $rm $output - # place dlname in correct position for cygwin -@@ -5241,7 +5707,7 @@ - - # Directory that this library needs to be installed in: - libdir='$install_libdir'" -- if test "$installed" = no && test "$need_relink" = yes && test "$fast_install" = no; then -+ if test "$installed" = no && test "$need_relink" = yes; then - $echo >> $output "\ - relink_command=\"$relink_command\"" - fi -@@ -5254,7 +5720,7 @@ - $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? - ;; - esac -- exit 0 -+ exit $EXIT_SUCCESS - ;; - - # libtool install mode -@@ -5265,11 +5731,11 @@ - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. -- $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then -+ $echo "X$nonopt" | grep shtool > /dev/null; then - # Aesthetically quote it. - arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` - case $arg in -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac -@@ -5278,14 +5744,14 @@ - shift - else - install_prog= -- arg="$nonopt" -+ arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac -@@ -5303,28 +5769,31 @@ - do - if test -n "$dest"; then - files="$files $dest" -- dest="$arg" -+ dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; -- -f) prev="-f" ;; -- -g) prev="-g" ;; -- -m) prev="-m" ;; -- -o) prev="-o" ;; -+ -f) -+ case " $install_prog " in -+ *[\\\ /]cp\ *) ;; -+ *) prev=$arg ;; -+ esac -+ ;; -+ -g | -m | -o) prev=$arg ;; - -s) - stripme=" -s" - continue - ;; -- -*) ;; -- -+ -*) -+ ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else -- dest="$arg" -+ dest=$arg - continue - fi - ;; -@@ -5333,7 +5802,7 @@ - # Aesthetically quote the argument. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac -@@ -5343,13 +5812,13 @@ - if test -z "$install_prog"; then - $echo "$modename: you must specify an install program" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - if test -n "$prev"; then - $echo "$modename: the \`$prev' option requires an argument" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - if test -z "$files"; then -@@ -5359,7 +5828,7 @@ - $echo "$modename: you must specify a destination" 1>&2 - fi - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - # Strip any trailing slash from the destination. -@@ -5380,7 +5849,7 @@ - if test "$#" -gt 2; then - $echo "$modename: \`$dest' is not a directory" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - fi - case $destdir in -@@ -5392,7 +5861,7 @@ - *) - $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - done -@@ -5421,7 +5890,7 @@ - else - $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - library_names= -@@ -5461,10 +5930,13 @@ - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. -- if test "$inst_prefix_dir" = "$destdir"; then -- $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 -- exit 1 -- fi -+ # -+ # This breaks install into our staging area. -PB -+ # -+ # if test "$inst_prefix_dir" = "$destdir"; then -+ # $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 -+ # exit $EXIT_FAILURE -+ # fi - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. -@@ -5478,7 +5950,7 @@ - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - fi - -@@ -5502,23 +5974,36 @@ - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. -+ # Try `ln -sf' first, because the `ln' binary might depend on -+ # the symlink we replace! Solaris /bin/ln does not understand -f, -+ # so we also need to try rm && ln -s. - for linkname - do - if test "$linkname" != "$realname"; then -- $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" -- $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" -+ $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" -+ $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - fi - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" -- eval cmds=\"$postinstall_cmds\" -+ cmds=$postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" -- $run eval "$cmd" || exit $? -+ $run eval "$cmd" || { -+ lt_exit=$? -+ -+ # Restore the uninstalled library and exit -+ if test "$mode" = relink; then -+ $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' -+ fi -+ -+ exit $lt_exit -+ } - done - IFS="$save_ifs" - fi -@@ -5556,7 +6041,7 @@ - *) - $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - -@@ -5574,7 +6059,7 @@ - $show "$install_prog $staticobj $staticdest" - $run eval "$install_prog \$staticobj \$staticdest" || exit $? - fi -- exit 0 -+ exit $EXIT_SUCCESS - ;; - - *) -@@ -5612,23 +6097,21 @@ - notinst_deplibs= - relink_command= - -- # To insure that "foo" is sourced, and not "foo.exe", -- # finese the cygwin/MSYS system by explicitly sourcing "foo." -- # which disallows the automatic-append-.exe behavior. -- case $build in -- *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; -- *) wrapperdot=${wrapper} ;; -- esac -+ # Note that it is not necessary on cygwin/mingw to append a dot to -+ # foo even if both foo and FILE.exe exist: automatic-append-.exe -+ # behavior happens only for exec(3), not for open(2)! Also, sourcing -+ # `FILE.' does not work on cygwin managed mounts. -+ # - # If there is no directory component, then add one. -- case $file in -- */* | *\\*) . ${wrapperdot} ;; -- *) . ./${wrapperdot} ;; -+ case $wrapper in -+ */* | *\\*) . ${wrapper} ;; -+ *) . ./${wrapper} ;; - esac - - # Check the variables that should have been set. - if test -z "$notinst_deplibs"; then - $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - finalize=yes -@@ -5650,30 +6133,21 @@ - done - - relink_command= -- # To insure that "foo" is sourced, and not "foo.exe", -- # finese the cygwin/MSYS system by explicitly sourcing "foo." -- # which disallows the automatic-append-.exe behavior. -- case $build in -- *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; -- *) wrapperdot=${wrapper} ;; -- esac -+ # Note that it is not necessary on cygwin/mingw to append a dot to -+ # foo even if both foo and FILE.exe exist: automatic-append-.exe -+ # behavior happens only for exec(3), not for open(2)! Also, sourcing -+ # `FILE.' does not work on cygwin managed mounts. -+ # - # If there is no directory component, then add one. -- case $file in -- */* | *\\*) . ${wrapperdot} ;; -- *) . ./${wrapperdot} ;; -+ case $wrapper in -+ */* | *\\*) . ${wrapper} ;; -+ *) . ./${wrapper} ;; - esac - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - if test "$finalize" = yes && test -z "$run"; then -- tmpdir="/tmp" -- test -n "$TMPDIR" && tmpdir="$TMPDIR" -- tmpdir="$tmpdir/libtool-$$" -- if $mkdir "$tmpdir" && chmod 700 "$tmpdir"; then : -- else -- $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 -- continue -- fi -+ tmpdir=`func_mktempdir` - file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` - outputname="$tmpdir/$file" - # Replace the output file specification. -@@ -5697,7 +6171,7 @@ - fi - - # remove .exe since cygwin /usr/bin/install will append another -- # one anyways -+ # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in -@@ -5729,16 +6203,17 @@ - $show "$install_prog $file $oldlib" - $run eval "$install_prog \$file \$oldlib" || exit $? - -- if test -n "$stripme" && test -n "$striplib"; then -+ if test -n "$stripme" && test -n "$old_striplib"; then - $show "$old_striplib $oldlib" - $run eval "$old_striplib $oldlib" || exit $? - fi - - # Do each command in the postinstall commands. -- eval cmds=\"$old_postinstall_cmds\" -+ cmds=$old_postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done -@@ -5752,9 +6227,9 @@ - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - test -n "$run" && current_libdirs=" -n$current_libdirs" -- exec_cmd='$SHELL $0 --finish$current_libdirs' -+ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else -- exit 0 -+ exit $EXIT_SUCCESS - fi - ;; - -@@ -5773,10 +6248,11 @@ - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. -- eval cmds=\"$finish_cmds\" -+ cmds=$finish_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || admincmds="$admincmds - $cmd" -@@ -5793,9 +6269,9 @@ - fi - - # Exit here if they wanted silent mode. -- exit 0 -+ test "$show" = : && exit $EXIT_SUCCESS - -- $echo "----------------------------------------------------------------------" -+ $echo "X----------------------------------------------------------------------" | $Xsed - $echo "Libraries have been installed in:" - for libdir in $libdirs; do - $echo " $libdir" -@@ -5828,8 +6304,8 @@ - $echo - $echo "See any operating system documentation about shared libraries for" - $echo "more information, such as the ld(1) and ld.so(8) manual pages." -- $echo "----------------------------------------------------------------------" -- exit 0 -+ $echo "X----------------------------------------------------------------------" | $Xsed -+ exit $EXIT_SUCCESS - ;; - - # libtool execute mode -@@ -5841,7 +6317,7 @@ - if test -z "$cmd"; then - $echo "$modename: you must specify a COMMAND" 1>&2 - $echo "$help" -- exit 1 -+ exit $EXIT_FAILURE - fi - - # Handle -dlopen flags immediately. -@@ -5849,7 +6325,7 @@ - if test ! -f "$file"; then - $echo "$modename: \`$file' is not a file" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - dir= -@@ -5860,7 +6336,7 @@ - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - # Read the libtool library. -@@ -5887,7 +6363,7 @@ - dir="$dir/$objdir" - else - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - ;; - -@@ -5967,7 +6443,7 @@ - $echo "export $shlibpath_var" - fi - $echo "$cmd$args" -- exit 0 -+ exit $EXIT_SUCCESS - fi - ;; - -@@ -5995,7 +6471,7 @@ - if test -z "$rm"; then - $echo "$modename: you must specify an RM program" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - rmdirs= -@@ -6045,15 +6521,24 @@ - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" -- test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - -- if test "$mode" = uninstall; then -+ case "$mode" in -+ clean) -+ case " $library_names " in -+ # " " in the beginning catches empty $dlname -+ *" $dlname "*) ;; -+ *) rmfiles="$rmfiles $objdir/$dlname" ;; -+ esac -+ test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" -+ ;; -+ uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. -- eval cmds=\"$postuninstall_cmds\" -+ cmds=$postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then -@@ -6065,10 +6550,11 @@ - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. -- eval cmds=\"$old_postuninstall_cmds\" -+ cmds=$old_postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then -@@ -6078,7 +6564,8 @@ - IFS="$save_ifs" - fi - # FIXME: should reinstall the best remaining shared library. -- fi -+ ;; -+ esac - fi - ;; - -@@ -6107,7 +6594,7 @@ - if test "$mode" = clean ; then - noexename=$name - case $file in -- *.exe) -+ *.exe) - file=`$echo $file|${SED} 's,.exe$,,'` - noexename=`$echo $name|${SED} 's,.exe$,,'` - # $file with .exe has already been added to rmfiles, -@@ -6152,20 +6639,20 @@ - "") - $echo "$modename: you must specify a MODE" 1>&2 - $echo "$generic_help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - - if test -z "$exec_cmd"; then - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - fi # test -z "$show_help" - - if test -n "$exec_cmd"; then - eval exec $exec_cmd -- exit 1 -+ exit $EXIT_FAILURE - fi - - # We need to display help for each of the modes. -@@ -6201,7 +6688,7 @@ - a more detailed description of MODE. - - Report bugs to ." -- exit 0 -+ exit $EXIT_SUCCESS - ;; - - clean) -@@ -6313,6 +6800,8 @@ - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects -+ -precious-files-regex REGEX -+ don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -@@ -6354,14 +6843,14 @@ - *) - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - - $echo - $echo "Try \`$modename --help' for more information about other modes." - --exit 0 -+exit $? - - # The TAGs below are defined such that we never get into a situation - # in which we disable both kinds of libraries. Given conflicting -@@ -6375,12 +6864,11 @@ - # configuration. But we'll never go from static-only to shared-only. - - # ### BEGIN LIBTOOL TAG CONFIG: disable-shared --build_libtool_libs=no --build_old_libs=yes -+disable_libs=shared - # ### END LIBTOOL TAG CONFIG: disable-shared - - # ### BEGIN LIBTOOL TAG CONFIG: disable-static --build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` -+disable_libs=static - # ### END LIBTOOL TAG CONFIG: disable-static - - # Local Variables: diff --git a/package/multimedia/taglib/taglib.mk b/package/multimedia/taglib/taglib.mk deleted file mode 100644 index e5433a42bb..0000000000 --- a/package/multimedia/taglib/taglib.mk +++ /dev/null @@ -1,27 +0,0 @@ -############################################################# -# -# taglib -# -############################################################# -TAGLIB_VERSION = 1.5 -TAGLIB_SOURCE = taglib-$(TAGLIB_VERSION).tar.gz -TAGLIB_SITE = http://developer.kde.org/~wheeler/files/src -TAGLIB_LIBTOOL_PATCH = NO -TAGLIB_INSTALL_STAGING = YES - -TAGLIB_CONF_ENV = \ - DO_NOT_COMPILE='bindings tests examples' \ - ac_cv_header_cppunit_extensions_HelperMacros_h=no \ - ac_cv_header_zlib_h=$(if $(BR2_PACKAGE_ZLIB),yes,no) - -TAGLIB_CONF_OPT = --disable-libsuffix --program-prefix='' - -define TAGLIB_REMOVE_DEVFILE - rm -f $(TARGET_DIR)/usr/bin/taglib-config -endef - -ifneq ($(BR2_HAVE_DEVFILES),y) -TAGLIB_POST_INSTALL_TARGET_HOOKS += TAGLIB_REMOVE_DEVFILE -endif - -$(eval $(call AUTOTARGETS,package/multimedia,taglib)) diff --git a/package/multimedia/tidsp-binaries/tidsp-binaries.mk b/package/multimedia/tidsp-binaries/tidsp-binaries.mk deleted file mode 100644 index 102791fabc..0000000000 --- a/package/multimedia/tidsp-binaries/tidsp-binaries.mk +++ /dev/null @@ -1,13 +0,0 @@ -TIDSP_BINARIES_VERSION=23.i3.8 -TIDSP_BINARIES_SOURCE=tidsp-binaries-$(TIDSP_BINARIES_VERSION).tar.gz -TIDSP_BINARIES_SITE:=http://gst-dsp.googlecode.com/files/ - -define TIDSP_BINARIES_INSTALL_TARGET_CMDS - $(MAKE) -C $(@D) -e DESTDIR=$(TARGET_DIR) install -endef - -define TIDSP_BINARIES_UNINSTALL_TARGET_CMDS - $(RM) -r $(TARGET_DIR)/lib/dsp -endef - -$(eval $(call GENTARGETS,package/multimedia,tidsp-binaries)) diff --git a/package/multimedia/tremor/Config.in b/package/multimedia/tremor/Config.in deleted file mode 100644 index 2e58e09857..0000000000 --- a/package/multimedia/tremor/Config.in +++ /dev/null @@ -1,7 +0,0 @@ -config BR2_PACKAGE_TREMOR - bool "tremor (fixed point vorbis decoder)" - help - Tremor is a fixed point implementation of an Ogg Vorbis - decoder. It provides a decoding API similar to libvorbis, - but gives much better performance on systems without a - floating-point unit. diff --git a/package/multimedia/tremor/tremor-export-all-symbols.patch b/package/multimedia/tremor/tremor-export-all-symbols.patch deleted file mode 100644 index 127d16bc56..0000000000 --- a/package/multimedia/tremor/tremor-export-all-symbols.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- tremor-16259-orig/configure.in 2009-12-02 11:45:11.000000000 +0100 -+++ tremor-16259/configure.in 2009-12-03 16:50:19.000000000 +0100 -@@ -72,23 +72,6 @@ - LDFLAGS="$LDFLAGS $ldflags_save" - - --# Test whenever ld supports -version-script --AC_PROG_LD --AC_PROG_LD_GNU --if test "x$lt_cv_prog_gnu_ld" = "xyes"; then -- SHLIB_VERSION_ARG="Wl,--version-script=Version_script" -- -- dnl Set extra linker options -- case "$target_os" in -- linux* | solaris* ) -- SHLIB_VERSION_ARG="-Wl,--version-script=Version_script" -- ;; -- *) -- ;; -- esac -- LDFLAGS="$LDFLAGS $SHLIB_VERSION_ARG" --fi -- - dnl -------------------------------------------------- - dnl Options - dnl -------------------------------------------------- -@@ -128,4 +111,4 @@ - AC_SUBST(DEBUG) - AC_SUBST(PROFILE) - --AC_OUTPUT(Makefile Version_script) -+AC_OUTPUT(Makefile) diff --git a/package/multimedia/tremor/tremor.mk b/package/multimedia/tremor/tremor.mk deleted file mode 100644 index 654a403ee0..0000000000 --- a/package/multimedia/tremor/tremor.mk +++ /dev/null @@ -1,15 +0,0 @@ -############################################################ -# -# Tremor (Integer decoder for Vorbis) -# -############################################################ - -TREMOR_SITE:=http://svn.xiph.org/trunk/Tremor/ -TREMOR_SITE_METHOD:=svn -TREMOR_VERSION:=16259 - -TREMOR_AUTORECONF = YES -TREMOR_INSTALL_STAGING = YES -TREMOR_INSTALL_TARGET = YES - -$(eval $(call AUTOTARGETS,package/multimedia,tremor)) diff --git a/package/multimedia/vorbis-tools/vorbis-tools.mk b/package/multimedia/vorbis-tools/vorbis-tools.mk deleted file mode 100644 index 6fd6c2a8e7..0000000000 --- a/package/multimedia/vorbis-tools/vorbis-tools.mk +++ /dev/null @@ -1,20 +0,0 @@ -############################################################# -# -# vorbis-tools -# -############################################################# - -VORBIS_TOOLS_VERSION = 1.4.0 -VORBIS_TOOLS_SITE = http://downloads.xiph.org/releases/vorbis -VORBIS_TOOLS_DEPENDENCIES = libao libogg libvorbis libcurl -VORBIS_TOOLS_CONF_OPT = --program-transform-name='' - -ifeq ($(BR2_PACKAGE_FLAC),y) -VORBIS_TOOLS_DEPENDENCIES += flac -endif - -ifeq ($(BR2_PACKAGE_SPEEX),y) -VORBIS_TOOLS_DEPENDENCIES += speex -endif - -$(eval $(call AUTOTARGETS,package/multimedia,vorbis-tools)) diff --git a/package/multimedia/wavpack/wavpack.mk b/package/multimedia/wavpack/wavpack.mk deleted file mode 100644 index 035963a573..0000000000 --- a/package/multimedia/wavpack/wavpack.mk +++ /dev/null @@ -1,16 +0,0 @@ -################################################################################ -# -# wavpack -# -################################################################################ - -WAVPACK_VERSION = 4.60.1 -WAVPACK_SITE = http://www.wavpack.com -WAVPACK_SOURCE = wavpack-$(WAVPACK_VERSION).tar.bz2 -WAVPACK_INSTALL_STAGING = YES - -ifneq ($(BR2_ENABLE_LOCALE),y) -WAVPACK_DEPENDENCIES += libiconv -endif - -$(eval $(call AUTOTARGETS,package/multimedia,wavpack)) diff --git a/package/multimedia/musepack/Config.in b/package/musepack/Config.in similarity index 100% rename from package/multimedia/musepack/Config.in rename to package/musepack/Config.in diff --git a/package/musepack/musepack-shared.patch b/package/musepack/musepack-shared.patch new file mode 100644 index 0000000000..d8c788db7c --- /dev/null +++ b/package/musepack/musepack-shared.patch @@ -0,0 +1,24 @@ +Fixup installation of shared mpcdec library. +Based on gentoo patch. + +Signed-off-by: Gustavo Zacarias +--- + +diff -Nura musepack_src_r475.orig/libmpcdec/CMakeLists.txt musepack_src_r475/libmpcdec/CMakeLists.txt +--- musepack_src_r475.orig/libmpcdec/CMakeLists.txt 2010-08-21 12:55:01.000000000 -0300 ++++ musepack_src_r475/libmpcdec/CMakeLists.txt 2011-08-17 15:53:06.126873408 -0300 +@@ -1,7 +1,12 @@ + include_directories(${libmpc_SOURCE_DIR}/include) + if(SHARED) +- add_library(mpcdec SHARED huffman mpc_decoder mpc_reader streaminfo mpc_bits_reader mpc_demux requant synth_filter ${libmpc_SOURCE_DIR}/common/crc32) ++ add_library(mpcdec_shared SHARED huffman mpc_decoder mpc_reader streaminfo mpc_bits_reader mpc_demux requant synth_filter ${libmpc_SOURCE_DIR}/common/crc32) ++ set_target_properties(mpcdec_shared PROPERTIES OUTPUT_NAME mpcdec CLEAN_DIRECT_OUTPUT 1 VERSION 7.0.1 SOVERSION 7) ++ target_link_libraries(mpcdec_shared m) ++ install(TARGETS mpcdec_shared LIBRARY DESTINATION "lib${LIB_SUFFIX}" ARCHIVE DESTINATION "lib${LIB_SUFFIX}") + else(SHARED) + add_library(mpcdec_static STATIC huffman mpc_decoder mpc_reader streaminfo mpc_bits_reader mpc_demux requant synth_filter ${libmpc_SOURCE_DIR}/common/crc32) ++ set_target_properties(mpcdec_static PROPERTIES OUTPUT_NAME mpcdec CLEAN_DIRECT_OUTPUT 1) ++ target_link_libraries(mpcdec_static m) ++ install(TARGETS mpcdec_static LIBRARY DESTINATION "lib${LIB_SUFFIX}" ARCHIVE DESTINATION "lib${LIB_SUFFIX}") + endif(SHARED) +- diff --git a/package/multimedia/musepack/musepack.mk b/package/musepack/musepack.mk similarity index 77% rename from package/multimedia/musepack/musepack.mk rename to package/musepack/musepack.mk index 34581b6964..ce2d17ea05 100644 --- a/package/multimedia/musepack/musepack.mk +++ b/package/musepack/musepack.mk @@ -4,11 +4,11 @@ # ################################################################################ -MUSEPACK_VERSION = r435 +MUSEPACK_VERSION = r475 MUSEPACK_SITE = http://files.musepack.net/source MUSEPACK_SOURCE = musepack_src_$(MUSEPACK_VERSION).tar.gz MUSEPACK_DEPENDENCIES = libcuefile libreplaygain -MUSEPACK_AUTORECONF = YES MUSEPACK_INSTALL_STAGING = YES +MUSEPACK_MAKE = $(MAKE1) -$(eval $(call AUTOTARGETS,package/multimedia,musepack)) +$(eval $(cmake-package)) diff --git a/package/mutt/Config.in b/package/mutt/Config.in index 754979a6a0..430eeb8f1e 100644 --- a/package/mutt/Config.in +++ b/package/mutt/Config.in @@ -1,11 +1,13 @@ config BR2_PACKAGE_MUTT bool "mutt" depends on BR2_USE_WCHAR + depends on BR2_USE_MMU # fork() select BR2_PACKAGE_NCURSES help Mutt is a sophisticated text-based Mail User Agent (MUA) http://www.mutt.org/ -comment "mutt requires a toolchain with WCHAR support" +comment "mutt needs a toolchain w/ wchar" + depends on BR2_USE_MMU depends on !BR2_USE_WCHAR diff --git a/package/mutt/mutt-1.5.17+20080114-nodoc.patch b/package/mutt/mutt-01-nodoc.patch similarity index 100% rename from package/mutt/mutt-1.5.17+20080114-nodoc.patch rename to package/mutt/mutt-01-nodoc.patch diff --git a/package/mutt/mutt-02-automake.patch b/package/mutt/mutt-02-automake.patch new file mode 100644 index 0000000000..19950a9f79 --- /dev/null +++ b/package/mutt/mutt-02-automake.patch @@ -0,0 +1,16 @@ +Fix for automake 1.12+ +http://dev.mutt.org/trac/ticket/3579 + +Signed-off-by: Gustavo Zacarias + +diff -Nura mutt-1.5.21.orig/configure.ac mutt-1.5.21/configure.ac +--- mutt-1.5.21.orig/configure.ac 2013-09-16 11:07:25.699781892 -0300 ++++ mutt-1.5.21/configure.ac 2013-09-16 11:07:45.120419960 -0300 +@@ -27,7 +27,6 @@ + + AC_PROG_CC + AC_ISC_POSIX +-AM_C_PROTOTYPES + if test "x$U" != "x"; then + AC_MSG_ERROR(Compiler not ANSI compliant) + fi diff --git a/package/mutt/mutt.mk b/package/mutt/mutt.mk index d021aef821..0c17589bae 100644 --- a/package/mutt/mutt.mk +++ b/package/mutt/mutt.mk @@ -1,25 +1,15 @@ -############################################################# +################################################################################ # # mutt # -############################################################# -MUTT_VERSION:=1.5.17+20080114 -MUTT_SOURCE:=mutt_$(MUTT_VERSION).orig.tar.gz -MUTT_PATCH:=mutt_$(MUTT_VERSION)-1.diff.gz -MUTT_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/m/mutt/ -MUTT_DEPENDENCIES=ncurses -MUTT_CONF_OPT = \ - --disable-smtp \ - --disable-iconv \ - --without-wc-funcs -MUTT_AUTORECONF=YES +################################################################################ -define MUTT_APPLY_DEBIAN_PATCHES - if [ -d $(@D)/debian/patches ]; then \ - toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches \*.patch; \ - fi -endef +MUTT_VERSION = 1.5.21 +MUTT_SITE = http://downloads.sourceforge.net/project/mutt/mutt-dev +MUTT_LICENSE = GPLv2+ +MUTT_LICENSE_FILES = GPL +MUTT_DEPENDENCIES = ncurses +MUTT_CONF_OPT = --disable-iconv --disable-smtp +MUTT_AUTORECONF = YES -MUTT_POST_PATCH_HOOKS += MUTT_APPLY_DEBIAN_PATCHES - -$(eval $(call AUTOTARGETS,package,mutt)) \ No newline at end of file +$(eval $(autotools-package)) diff --git a/package/mxml/Config.in b/package/mxml/Config.in new file mode 100644 index 0000000000..d3202b4bc9 --- /dev/null +++ b/package/mxml/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_MXML + bool "Mini-XML" + help + Lightweight XML Library + + http://www.minixml.org diff --git a/package/mxml/mxml-fix-cross-target-installation.patch b/package/mxml/mxml-fix-cross-target-installation.patch new file mode 100644 index 0000000000..3a9fa0c0cf --- /dev/null +++ b/package/mxml/mxml-fix-cross-target-installation.patch @@ -0,0 +1,55 @@ +From: Baruch Siach +Subject: [PATCH] mxml: workaround for cross build + +The added patch is a workaround for cross build as follows: + + * disable run of a test binary at build time + * disable generation of documentation using the mxmldoc binary + * remove now non-existent entries from the install target + * disable strip when running install + +Signed-off-by: Baruch Siach +--- +diff -Nuar mxml-2.7-orig/Makefile.in mxml-2.7/Makefile.in +--- mxml-2.7-orig/Makefile.in 2011-04-13 18:43:32.000000000 +0300 ++++ mxml-2.7/Makefile.in 2012-05-16 07:21:42.677220980 +0300 +@@ -57,7 +57,7 @@ + # Install commands... + # + +-INSTALL_BIN = $(LIBTOOL) $(INSTALL) -m 755 -s ++INSTALL_BIN = $(LIBTOOL) $(INSTALL) -m 755 + INSTALL_DATA = $(INSTALL) -m 644 + INSTALL_DIR = $(INSTALL) -d + INSTALL_LIB = $(LIBTOOL) $(INSTALL) -m 755 +@@ -88,7 +88,7 @@ + mxml-index.o mxml-node.o mxml-search.o mxml-set.o + LIBOBJS = $(PUBLIBOBJS) mxml-private.o mxml-string.o + OBJS = mxmldoc.o testmxml.o $(LIBOBJS) +-TARGETS = $(LIBMXML) mxmldoc testmxml mxml.xml doc/mxml.man ++TARGETS = $(LIBMXML) libmxml.a + + + # +@@ -140,9 +140,6 @@ + # + + install: $(TARGETS) install-$(LIBMXML) install-libmxml.a +- echo Installing mxmldoc in $(BUILDROOT)$(bindir)... +- $(INSTALL_DIR) $(BUILDROOT)$(bindir) +- $(INSTALL_BIN) mxmldoc $(BUILDROOT)$(bindir) + echo Installing documentation in $(BUILDROOT)$(docdir)... + $(INSTALL_DIR) $(BUILDROOT)$(docdir) + for file in $(DOCFILES); do \ +@@ -154,11 +151,6 @@ + echo Installing pkgconfig files in $(BUILDROOT)$(libdir)/pkgconfig... + $(INSTALL_DIR) $(BUILDROOT)$(libdir)/pkgconfig + $(INSTALL_DATA) mxml.pc $(BUILDROOT)$(libdir)/pkgconfig +- echo Installing man pages in $(BUILDROOT)$(mandir)... +- $(INSTALL_DIR) $(BUILDROOT)$(mandir)/man1 +- $(INSTALL_MAN) doc/mxmldoc.man $(BUILDROOT)$(mandir)/man1/mxmldoc.1 +- $(INSTALL_DIR) $(BUILDROOT)$(mandir)/man3 +- $(INSTALL_MAN) doc/mxml.man $(BUILDROOT)$(mandir)/man3/mxml.3 + + install-libmxml.a: + echo Installing libmxml.a to $(BUILDROOT)$(libdir)... diff --git a/package/mxml/mxml.mk b/package/mxml/mxml.mk new file mode 100644 index 0000000000..020cde26a8 --- /dev/null +++ b/package/mxml/mxml.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# mxml +# +################################################################################ + +MXML_VERSION = 2.7 +MXML_SITE = http://www.msweet.org/files/project3 +MXML_LICENSE = LGPLv2+ with exceptions +MXML_LICENSE_FILES = COPYING +MXML_INSTALL_STAGING = YES + +MXML_INSTALL_STAGING_OPT = DSTROOT=$(STAGING_DIR) install +MXML_INSTALL_TARGET_OPT = DSTROOT=$(TARGET_DIR) install +MXML_UNINSTALL_STAGING_OPT = DSTROOT=$(STAGING_DIR) uninstall +MXML_UNINSTALL_TARGET_OPT = DSTROOT=$(TARGET_DIR) uninstall + +$(eval $(autotools-package)) diff --git a/package/mysql_client/Config.in b/package/mysql_client/Config.in index 9696a0d145..c5a02d079d 100644 --- a/package/mysql_client/Config.in +++ b/package/mysql_client/Config.in @@ -1,6 +1,8 @@ config BR2_PACKAGE_MYSQL_CLIENT bool "MySQL client" depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS select BR2_PACKAGE_NCURSES select BR2_PACKAGE_READLINE help @@ -11,5 +13,6 @@ config BR2_PACKAGE_MYSQL_CLIENT_LIB_ONLY default n depends on BR2_PACKAGE_MYSQL_CLIENT -comment "Mysql client requires a toolchain with C++ support enabled" - depends on !BR2_INSTALL_LIBSTDCPP +comment "MySQL client needs a toolchain w/ C++, threads" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/mysql_client/mysql_client-5.1.53-ac_cache_check.patch b/package/mysql_client/mysql_client-ac_cache_check.patch similarity index 100% rename from package/mysql_client/mysql_client-5.1.53-ac_cache_check.patch rename to package/mysql_client/mysql_client-ac_cache_check.patch diff --git a/package/mysql_client/mysql_client-5.1.53-configure-ps-cache-check.patch b/package/mysql_client/mysql_client-configure-ps-cache-check.patch similarity index 100% rename from package/mysql_client/mysql_client-5.1.53-configure-ps-cache-check.patch rename to package/mysql_client/mysql_client-configure-ps-cache-check.patch diff --git a/package/mysql_client/mysql_client-5.1.53-use-new-readline-iface.patch b/package/mysql_client/mysql_client-use-new-readline-iface.patch similarity index 100% rename from package/mysql_client/mysql_client-5.1.53-use-new-readline-iface.patch rename to package/mysql_client/mysql_client-use-new-readline-iface.patch diff --git a/package/mysql_client/mysql_client.mk b/package/mysql_client/mysql_client.mk index d42d050cca..08c87efc2a 100644 --- a/package/mysql_client/mysql_client.mk +++ b/package/mysql_client/mysql_client.mk @@ -1,15 +1,17 @@ -############################################################# +################################################################################ # -# MySQL 5.1 Client +# mysql_client # -############################################################# -MYSQL_CLIENT_VERSION = 5.1.53 +################################################################################ + +MYSQL_CLIENT_VERSION = 5.1.70 MYSQL_CLIENT_SOURCE = mysql-$(MYSQL_CLIENT_VERSION).tar.gz -MYSQL_CLIENT_SITE = http://downloads.mysql.com/archives/mysql-5.1/ -MYSQL_CLIENT_INSTALL_TARGET = YES +MYSQL_CLIENT_SITE = http://downloads.skysql.com/archives/mysql-5.1 MYSQL_CLIENT_INSTALL_STAGING = YES MYSQL_CLIENT_DEPENDENCIES = readline ncurses -MYSQL_CLIENT_AUTORECONF=YES +MYSQL_CLIENT_AUTORECONF = YES +MYSQL_CLIENT_LICENSE = GPLv2 +MYSQL_CLIENT_LICENSE_FILES = README COPYING MYSQL_CLIENT_CONF_ENV = \ ac_cv_sys_restartable_syscalls=yes \ @@ -21,7 +23,6 @@ MYSQL_CLIENT_CONF_ENV = \ mysql_cv_new_rl_interface=yes MYSQL_CLIENT_CONF_OPT = \ - --program-prefix="" \ --without-ndb-binlog \ --without-server \ --without-docs \ @@ -60,4 +61,4 @@ MYSQL_CLIENT_INSTALL_STAGING_CMDS = $(if $(BR2_PACKAGE_MYSQL_CLIENT_LIB_ONLY), $ MYSQL_CLIENT_POST_INSTALL_TARGET_HOOKS += MYSQL_CLIENT_REMOVE_TEST_PROGS MYSQL_CLIENT_POST_INSTALL_TARGET_HOOKS += MYSQL_CLIENT_ADD_MYSQL_LIB_PATH -$(eval $(call AUTOTARGETS,package,mysql_client)) +$(eval $(autotools-package)) diff --git a/package/nano/Config.in b/package/nano/Config.in index 8c780960f8..395af9d86e 100644 --- a/package/nano/Config.in +++ b/package/nano/Config.in @@ -1,8 +1,21 @@ config BR2_PACKAGE_NANO bool "nano" + depends on BR2_USE_WCHAR + # full version uses fork() + select BR2_PACKAGE_NANO_TINY if !BR2_USE_MMU select BR2_PACKAGE_NCURSES help A nice ncurses-based editor. Started out as a clone of pico. Great editor for new users. http://www.nano-editor.org/ + +config BR2_PACKAGE_NANO_TINY + bool "optimize for size" + default y + depends on BR2_PACKAGE_NANO + help + Disable all features for the sake of size. + +comment "nano needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/nano/nano.mk b/package/nano/nano.mk index 87852a15ff..4609f723cc 100644 --- a/package/nano/nano.mk +++ b/package/nano/nano.mk @@ -1,15 +1,28 @@ -############################################################# +################################################################################ # # nano # -############################################################# +################################################################################ -NANO_VERSION = 2.2.6 -NANO_SITE = http://www.nano-editor.org/dist/v2.2 +NANO_VERSION = 2.3.2 +NANO_SITE = http://www.nano-editor.org/dist/v2.3 +NANO_LICENSE = GPLv3+ +NANO_LICENSE_FILES = COPYING NANO_MAKE_ENV = CURSES_LIB="-lncurses" -NANO_CONF_OPT = --without-slang --enable-tiny +NANO_CONF_OPT = --without-slang +NANO_CONF_ENV = ac_cv_prog_NCURSESW_CONFIG=false NANO_DEPENDENCIES = ncurses +ifeq ($(BR2_PACKAGE_FILE),y) + NANO_DEPENDENCIES += file +else + NANO_CONF_ENV += ac_cv_lib_magic_magic_open=no +endif + +ifeq ($(BR2_PACKAGE_NANO_TINY),y) + NANO_CONF_OPT += --enable-tiny +endif + define NANO_INSTALL_TARGET_CMDS $(INSTALL) -m 0755 $(@D)/src/nano $(TARGET_DIR)/usr/bin/nano endef @@ -18,4 +31,4 @@ define NANO_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/bin/nano endef -$(eval $(call AUTOTARGETS,package,nano)) +$(eval $(autotools-package)) diff --git a/package/nanocom/Config.in b/package/nanocom/Config.in new file mode 100644 index 0000000000..51d628aec5 --- /dev/null +++ b/package/nanocom/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_NANOCOM + bool "nanocom" + help + Nanocom is based upon microcom (http://microcom.port5.com/) but + removes the scripting and logging features while introducing support + for setting local/remote echo, parity and stop bits. It also follows + a more standard command line style using the getopt function. + Internally much of the code has been rewritten and reformatted, the + menu system in particular is almost entirely different. + + http://nanocom.sourceforge.net/ diff --git a/package/nanocom/nanocom.mk b/package/nanocom/nanocom.mk new file mode 100644 index 0000000000..d97e26d30a --- /dev/null +++ b/package/nanocom/nanocom.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# nanocom +# +################################################################################ + +NANOCOM_VERSION = 2.6.1 +NANOCOM_SOURCE = nanocom.tar.gz +NANOCOM_SITE = http://downloads.sourceforge.net/project/nanocom/nanocom/v1.0 +NANOCOM_LICENSE = GPLv2+ +NANOCOM_LICENSE_FILES = COPYING + +# N.B. Don't strip any path components during extraction. +define NANOCOM_EXTRACT_CMDS + gzip -d -c $(DL_DIR)/$(NANOCOM_SOURCE) | tar --strip-components=0 -C $(NANOCOM_DIR) -xf - +endef + +define NANOCOM_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS)" -C $(@D) +endef + +define NANOCOM_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/nanocom $(TARGET_DIR)/usr/bin/nanocom +endef + +define NANOCOM_UNINSTALL_TARGET_CMDS + $(RM) $(TARGET_DIR)/usr/bin/nanocom +endef + +$(eval $(generic-package)) diff --git a/package/nasm/nasm.mk b/package/nasm/nasm.mk index 03e8394486..d8045daa5e 100644 --- a/package/nasm/nasm.mk +++ b/package/nasm/nasm.mk @@ -1,18 +1,12 @@ -############################################################ +################################################################################ # # nasm # -# This is special case: nasm is used to build syslinux and -# pxelinux. As these are for the target, we should cross-compile -# nasm. However, as nasm is x86-only, there's no point in -# cross-compiling it. So we just build it for the host. The target -# variant is only provided because of a bug in the package -# infrastructure that prevents having only a host variant. -############################################################ +################################################################################ -NASM_VERSION=2.08.01 -NASM_SOURCE=nasm-$(NASM_VERSION).tar.bz2 -NASM_SITE=http://www.nasm.us/pub/nasm/releasebuilds/2.08.01/ +NASM_VERSION = 2.10.01 +NASM_SOURCE = nasm-$(NASM_VERSION).tar.xz +NASM_SITE = http://www.nasm.us/pub/nasm/releasebuilds/$(NASM_VERSION) -$(eval $(call AUTOTARGETS,package,nasm)) -$(eval $(call AUTOTARGETS,package,nasm,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/nbd/Config.in b/package/nbd/Config.in index 6e92f935d4..a5ded2984b 100644 --- a/package/nbd/Config.in +++ b/package/nbd/Config.in @@ -1,18 +1,15 @@ config BR2_PACKAGE_NBD bool "nbd" depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 select BR2_PACKAGE_LIBGLIB2 help NBD is a set of utilities to configure network block devices, allowing access to remote block devices over TCP/IP network. - Depends on glib. - http://nbd.sf.net/ -comment "nbd requires a toolchain with WCHAR support" - depends on !BR2_USE_WCHAR - if BR2_PACKAGE_NBD config BR2_NBD_CLIENT @@ -27,3 +24,7 @@ config BR2_NBD_SERVER the server part of NBD. endif + +comment "nbd needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/nbd/nbd-server-susv3-legacy.patch b/package/nbd/nbd-server-susv3-legacy.patch deleted file mode 100644 index 58d38e1509..0000000000 --- a/package/nbd/nbd-server-susv3-legacy.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- nbd-2.9.11/nbd-server.c 2009-10-01 16:10:15.000000000 +0200 -+++ nbd-2.9.11/nbd-server.c 2009-10-01 16:10:32.000000000 +0200 -@@ -264,7 +264,7 @@ - - inet_aton(opts->clientname, &client); - while (fgets(line,LINELEN,f)!=NULL) { -- if((tmp=index(line, '/'))) { -+ if((tmp=strchr(line, '/'))) { - if(strlen(line)<=tmp-line) { - msg4(LOG_CRIT, ERRMSG, line, opts->server->authname); - return 0; diff --git a/package/nbd/nbd.mk b/package/nbd/nbd.mk index a09b10b74a..e5b50232fa 100644 --- a/package/nbd/nbd.mk +++ b/package/nbd/nbd.mk @@ -1,14 +1,21 @@ -############################################################# +################################################################################ # # nbd # -############################################################# +################################################################################ -NBD_VERSION = 2.9.15 +NBD_VERSION = 3.3 NBD_SOURCE = nbd-$(NBD_VERSION).tar.bz2 -NBD_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/nbd/ +NBD_SITE = http://downloads.sourceforge.net/project/nbd/nbd/$(NBD_VERSION) NBD_CONF_OPT = $(if $(BR2_LARGEFILE),--enable-lfs,--disable-lfs) NBD_DEPENDENCIES = libglib2 +NBD_LICENSE = GPLv2 + +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +# We have linux/falloc.h +# but uClibc lacks fallocate(2) which is a glibc-ism +NBD_CONF_ENV = ac_cv_header_linux_falloc_h=no +endif ifneq ($(BR2_NBD_CLIENT),y) NBD_TOREMOVE += nbd-client @@ -23,4 +30,4 @@ endef NBD_POST_INSTALL_TARGET_HOOKS += NBD_CLEANUP_AFTER_INSTALL -$(eval $(call AUTOTARGETS,package,nbd)) +$(eval $(autotools-package)) diff --git a/package/ncdu/Config.in b/package/ncdu/Config.in new file mode 100644 index 0000000000..dac744410b --- /dev/null +++ b/package/ncdu/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_NCDU + bool "ncdu" + select BR2_PACKAGE_NCURSES + help + ncdu is a disk usage analyzer with an ncurses interface + + http://dev.yorhel.nl/ncdu diff --git a/package/ncdu/ncdu.mk b/package/ncdu/ncdu.mk new file mode 100644 index 0000000000..a104285765 --- /dev/null +++ b/package/ncdu/ncdu.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# ncdu +# +################################################################################ + +NCDU_VERSION = 1.9 +NCDU_SITE = http://dev.yorhel.nl/download/ + +NCDU_DEPENDENCIES = ncurses + +NCDU_LICENSE = MIT +NCDU_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/ncftp/Config.in b/package/ncftp/Config.in index a29934abcd..4aaa62d240 100644 --- a/package/ncftp/Config.in +++ b/package/ncftp/Config.in @@ -1,6 +1,7 @@ config BR2_PACKAGE_NCFTP bool "ncftp" - depends on BR2_LARGEFILE + # fork() + depends on BR2_USE_MMU help NcFTP Client (also known as just NcFTP) is a set of FREE application programs implementing the File Transfer Protocol (FTP). @@ -31,6 +32,3 @@ config BR2_PACKAGE_NCFTP_BOOKMARKS select BR2_PACKAGE_NCURSES endmenu - -comment "ncftp requires a toolchain with LARGEFILE support" - depends on !BR2_LARGEFILE diff --git a/package/ncftp/ncftp.mk b/package/ncftp/ncftp.mk index f3f47805f2..03874d1598 100644 --- a/package/ncftp/ncftp.mk +++ b/package/ncftp/ncftp.mk @@ -1,35 +1,37 @@ -############################################################# +################################################################################ # -# ncftp client +# ncftp # -############################################################# -NCFTP_VERSION:=3.2.4 -NCFTP_SOURCE:=ncftp-$(NCFTP_VERSION)-src.tar.bz2 -NCFTP_SITE:=ftp://ftp.ncftp.com/ncftp +################################################################################ -NCFTP_TARGET_BINS:=ncftp +NCFTP_VERSION = 3.2.5 +NCFTP_SOURCE = ncftp-$(NCFTP_VERSION)-src.tar.bz2 +NCFTP_SITE = ftp://ftp.ncftp.com/ncftp +NCFTP_TARGET_BINS = ncftp +NCFTP_LICENSE = Clarified Artistic License +NCFTP_LICENSE_FILES = doc/LICENSE.txt ifeq ($(BR2_PACKAGE_NCFTP_GET),y) -NCFTP_TARGET_BINS+=ncftpget + NCFTP_TARGET_BINS += ncftpget endif ifeq ($(BR2_PACKAGE_NCFTP_PUT),y) -NCFTP_TARGET_BINS+=ncftpput + NCFTP_TARGET_BINS += ncftpput endif ifeq ($(BR2_PACKAGE_NCFTP_LS),y) -NCFTP_TARGET_BINS+=ncftpls + NCFTP_TARGET_BINS += ncftpls endif ifeq ($(BR2_PACKAGE_NCFTP_BATCH),y) -NCFTP_TARGET_BINS+=ncftpbatch -NCFTP_INSTALL_NCFTP_BATCH = \ - ln -s /usr/bin/ncftpbatch $(TARGET_DIR)/usr/bin/ncftpspooler + NCFTP_TARGET_BINS += ncftpbatch + NCFTP_INSTALL_NCFTP_BATCH = \ + ln -sf /usr/bin/ncftpbatch $(TARGET_DIR)/usr/bin/ncftpspooler endif ifeq ($(BR2_PACKAGE_NCFTP_BOOKMARKS),y) -NCFTP_TARGET_BINS+=ncftpbookmarks -NCFTP_DEPENDENCIES:=ncurses + NCFTP_TARGET_BINS += ncftpbookmarks + NCFTP_DEPENDENCIES += ncurses endif define NCFTP_INSTALL_TARGET_CMDS @@ -41,4 +43,4 @@ define NCFTP_UNINSTALL_TARGET_CMDS rm -f $(addprefix $(TARGET_DIR)/usr/bin/, $(NCFTP_TARGET_BINS) ncftpspooler) endef -$(eval $(call AUTOTARGETS,package,ncftp)) +$(eval $(autotools-package)) diff --git a/package/ncurses/Config.in b/package/ncurses/Config.in index d80f5733d4..613b5b5384 100644 --- a/package/ncurses/Config.in +++ b/package/ncurses/Config.in @@ -4,6 +4,8 @@ config BR2_PACKAGE_NCURSES The Ncurses (new curses) library is a free software emulation of curses in System V Release 4.0, and more. + This package installs only a few vital termcap entries + http://www.gnu.org/software/ncurses/ config BR2_PACKAGE_NCURSES_TARGET_PANEL diff --git a/package/ncurses/ncurses-01-fixup-pkg-config-handling.patch b/package/ncurses/ncurses-01-fixup-pkg-config-handling.patch new file mode 100644 index 0000000000..e1cfc75164 --- /dev/null +++ b/package/ncurses/ncurses-01-fixup-pkg-config-handling.patch @@ -0,0 +1,89 @@ +Change handling of PKG_CONFIG_LIBDIR + +When PKG_CONFIG_LIBDIR was unset in the environment, the configure +script was deducing the PKG_CONFIG_LIBDIR from the location of the +pkg-config binary, which doesn't make a lot of sense, and isn't done +by other autotools based packages. + +Also, the configure script was checking that the directory really +exists. This forced to create the directory *and* provide an absolute +path in PKG_CONFIG_LIBDIR, which didn't play well with the fact that +at installation time, PKG_CONFIG_LIBDIR is suffixed to DESTDIR, which +means that we got two times the staging directory location. + +This patch fixes both of those issues. Also, since ncurses uses a fork +of autoconf 2.13, we can't simply use _AUTORECONF=YES, so we also fix +the configure script in this patch. + +Signed-off-by: Thomas Petazzoni + +Index: b/configure +=================================================================== +--- a/configure ++++ b/configure +@@ -3623,27 +3623,20 @@ + + # Leave this as something that can be overridden in the environment. + if test -z "$PKG_CONFIG_LIBDIR" ; then +- PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig ++ PKG_CONFIG_LIBDIR="/usr/lib/pkgconfig" + fi ++ + PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'` +- if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then + +-# Check whether --enable-pc-files or --disable-pc-files was given. +-if test "${enable_pc_files+set}" = set; then +- enableval="$enable_pc_files" +- enable_pc_files=$enableval +-else +- enable_pc_files=no +-fi; +- echo "$as_me:3638: result: $enable_pc_files" >&5 +-echo "${ECHO_T}$enable_pc_files" >&6 ++ # Check whether --enable-pc-files or --disable-pc-files was given. ++ if test "${enable_pc_files+set}" = set; then ++ enableval="$enable_pc_files" ++ enable_pc_files=$enableval + else +- echo "$as_me:3641: result: no" >&5 +-echo "${ECHO_T}no" >&6 +- { echo "$as_me:3643: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5 +-echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;} +- enable_pc_files=no +- fi ++ enable_pc_files=no ++ fi; ++ echo "$as_me:3638: result: $enable_pc_files" >&5 ++ echo "${ECHO_T}$enable_pc_files" >&6 + fi + + echo "$as_me:3649: checking if we should assume mixed-case filenames" >&5 +Index: b/configure.in +=================================================================== +--- a/configure.in ++++ b/configure.in +@@ -174,20 +174,14 @@ + + # Leave this as something that can be overridden in the environment. + if test -z "$PKG_CONFIG_LIBDIR" ; then +- PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[[^/]]*/[[^/]]*$,,'`/lib/pkgconfig ++ PKG_CONFIG_LIBDIR="/usr/lib/pkgconfig" + fi + PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'` +- if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then +- AC_ARG_ENABLE(pc-files, ++ AC_ARG_ENABLE(pc-files, + [ --enable-pc-files generate and install .pc files for pkg-config], + [enable_pc_files=$enableval], + [enable_pc_files=no]) +- AC_MSG_RESULT($enable_pc_files) +- else +- AC_MSG_RESULT(no) +- AC_MSG_WARN(did not find library $PKG_CONFIG_LIBDIR) +- enable_pc_files=no +- fi ++ AC_MSG_RESULT($enable_pc_files) + fi + AC_SUBST(PKG_CONFIG_LIBDIR) + diff --git a/package/ncurses/ncurses.mk b/package/ncurses/ncurses.mk index 0a498874dd..dbb514e78c 100644 --- a/package/ncurses/ncurses.mk +++ b/package/ncurses/ncurses.mk @@ -1,47 +1,33 @@ -############################################################# +################################################################################ # # ncurses -# this installs only a few vital termcap entries # -############################################################# -# Copyright (C) 2002 by Ken Restivo -# $Id: ncurses.mk,v 1.7 2005/01/03 04:38:13 andersen Exp $ -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Library General Public License as -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public -# License along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA +################################################################################ -# TARGETS -NCURSES_VERSION = 5.7 +NCURSES_VERSION = 5.9 NCURSES_SITE = $(BR2_GNU_MIRROR)/ncurses -NCURSES_SOURCE = ncurses-$(NCURSES_VERSION).tar.gz NCURSES_INSTALL_STAGING = YES +NCURSES_DEPENDENCIES = host-ncurses +NCURSES_LICENSE = MIT with advertising clause +NCURSES_LICENSE_FILES = README +NCURSES_CONFIG_SCRIPTS = ncurses5-config NCURSES_CONF_OPT = \ - --with-shared \ + $(if $(BR2_PREFER_STATIC_LIB),--without-shared,--with-shared) \ --without-cxx \ --without-cxx-binding \ --without-ada \ --without-progs \ + --without-tests \ --disable-big-core \ --without-profile \ --disable-rpath \ + --disable-rpath-hack \ --enable-echo \ --enable-const \ --enable-overwrite \ - --enable-broken_linker \ - --disable-static + --enable-pc-files \ + $(if $(BR2_HAVE_DOCUMENTATION),,--without-manpages) ifneq ($(BR2_ENABLE_DEBUG),y) NCURSES_CONF_OPT += --without-debug @@ -52,31 +38,7 @@ define NCURSES_BUILD_CMDS $(MAKE1) -C $(@D) DESTDIR=$(STAGING_DIR) endef -define NCURSES_PATCH_NCURSES_CONFIG - $(SED) 's^prefix="^prefix="$(STAGING_DIR)^' \ - $(STAGING_DIR)/usr/bin/ncurses5-config -endef - -NCURSES_POST_STAGING_INSTALL_HOOKS += NCURSES_PATCH_NCURSES_CONFIG - -ifeq ($(BR2_HAVE_DEVFILES),y) -define NCURSES_INSTALL_TARGET_DEVFILES - mkdir -p $(TARGET_DIR)/usr/include - cp -dpf $(NCURSES_DIR)/include/curses.h $(TARGET_DIR)/usr/include/curses.h - cp -dpf $(NCURSES_DIR)/include/ncurses_dll.h $(TARGET_DIR)/usr/include/ncurses_dll.h - cp -dpf $(NCURSES_DIR)/include/term.h $(TARGET_DIR)/usr/include/ - cp -dpf $(NCURSES_DIR)/include/unctrl.h $(TARGET_DIR)/usr/include/ - cp -dpf $(NCURSES_DIR)/include/termcap.h $(TARGET_DIR)/usr/include/ - cp -dpf $(NCURSES_DIR)/lib/libncurses.a $(TARGET_DIR)/usr/lib/ - (cd $(TARGET_DIR)/usr/lib; \ - ln -fs libncurses.a libcurses.a; \ - ln -fs libncurses.a libtermcap.a; \ - ) - (cd $(TARGET_DIR)/usr/include; ln -fs curses.h ncurses.h) - rm -f $(TARGET_DIR)/usr/lib/libncurses.so - (cd $(TARGET_DIR)/usr/lib; ln -fs libncurses.so.$(NCURSES_VERSION) libncurses.so) -endef -endif +ifneq ($(BR2_PREFER_STATIC_LIB),y) ifeq ($(BR2_PACKAGE_NCURSES_TARGET_PANEL),y) define NCURSES_INSTALL_TARGET_PANEL @@ -96,9 +58,11 @@ define NCURSES_INSTALL_TARGET_MENU endef endif +endif + define NCURSES_INSTALL_TARGET_CMDS mkdir -p $(TARGET_DIR)/usr/lib - cp -dpf $(NCURSES_DIR)/lib/libncurses.so* $(TARGET_DIR)/usr/lib/ + $(if $(BR2_PREFER_STATIC_LIB),,cp -dpf $(NCURSES_DIR)/lib/libncurses.so* $(TARGET_DIR)/usr/lib/) $(NCURSES_INSTALL_TARGET_PANEL) $(NCURSES_INSTALL_TARGET_FORM) $(NCURSES_INSTALL_TARGET_MENU) @@ -116,8 +80,26 @@ define NCURSES_INSTALL_TARGET_CMDS cp -dpf $(STAGING_DIR)/usr/share/terminfo/a/ansi $(TARGET_DIR)/usr/share/terminfo/a mkdir -p $(TARGET_DIR)/usr/share/terminfo/l cp -dpf $(STAGING_DIR)/usr/share/terminfo/l/linux $(TARGET_DIR)/usr/share/terminfo/l - -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libncurses.so* - $(NCURSES_INSTALL_TARGET_DEVFILES) + mkdir -p $(TARGET_DIR)/usr/share/terminfo/s + cp -dpf $(STAGING_DIR)/usr/share/terminfo/s/screen $(TARGET_DIR)/usr/share/terminfo/s endef # NCURSES_INSTALL_TARGET_CMDS -$(eval $(call AUTOTARGETS,package,ncurses)) +# +# On systems with an older version of tic, the installation of ncurses hangs +# forever. To resolve the problem, build a static version of tic on host +# ourselves, and use that during installation. +# +define HOST_NCURSES_BUILD_CMDS + $(MAKE1) -C $(@D) sources + $(MAKE) -C $(@D)/progs tic +endef + +HOST_NCURSES_CONF_OPT = \ + --with-shared --without-gpm \ + --without-manpages \ + --without-cxx \ + --without-cxx-binding \ + --without-ada + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/ndisc6/Config.in b/package/ndisc6/Config.in new file mode 100644 index 0000000000..0fad92a9d7 --- /dev/null +++ b/package/ndisc6/Config.in @@ -0,0 +1,52 @@ +comment "ndisc6 needs a toolchain w/ IPv6" + depends on BR2_USE_MMU + depends on !BR2_INET_IPV6 + +config BR2_PACKAGE_NDISC6 + bool "ndisc6 tools" + depends on BR2_INET_IPV6 + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + NDisc6 is a small collection of useful tools for IPv6 networking + + http://www.remlab.net/ndisc6/ + +if BR2_PACKAGE_NDISC6 + +config BR2_PACKAGE_NDISC6_NAME2ADDR + bool "name2addr" + help + name2addr perform DNS lookups from scripts. + +config BR2_PACKAGE_NDISC6_NDISC6 + bool "ndisc6" + help + ndisc6 performs ICMPv6 Neighbor Discovery in userland. + +config BR2_PACKAGE_NDISC6_RDISC6 + bool "rdisc6" + help + rdisc6 performs ICMPv6 Router Discovery in userland. + +config BR2_PACKAGE_NDISC6_RDNSSD + bool "rdnssd" + help + IPv6 Recursive DNS Server discovery Daemon. + +config BR2_PACKAGE_NDISC6_RLTRACEROUTE6 + bool "rltraceroute6" + help + rltraceroute6 is an IPv6 traceroute implementation. + +config BR2_PACKAGE_NDISC6_TCPTRACEROUTE6 + bool "tcptraceroute6" + help + tcptraceroute6 is an TCP/IPv6 traceroute implementation. + +config BR2_PACKAGE_NDISC6_TCPSPRAY + bool "tcpspray" + help + TCP/IP bandwidth measurement tool (Discard and Echo client). + +endif diff --git a/package/ndisc6/ndisc6-trace-tcp-upd-uClibc-fix.patch b/package/ndisc6/ndisc6-trace-tcp-upd-uClibc-fix.patch new file mode 100644 index 0000000000..f84719cf36 --- /dev/null +++ b/package/ndisc6/ndisc6-trace-tcp-upd-uClibc-fix.patch @@ -0,0 +1,64 @@ +From 0be2fe3a750b62cafca9794e37f040624d3a59de Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Thu, 26 Apr 2012 23:45:25 +0200 +Subject: [PATCH] trace-{tcp,udp}.c: fix build on uClibc + +Selection of the BSD variant of struct tcphdr/udphdr on uClibc fails +because of config.h. This is caused by config.h setting _GNU_SOURCE +and the compat handling (uClibc doesn't have inet6_rth_*) including +sys/types.h which in term includes features.h, which figures out +what bsd/gnu/posix variant to use because of: + + /* If _BSD_SOURCE was defined by the user, favor BSD over POSIX. */ + #if defined _BSD_SOURCE && \ + !(defined _POSIX_SOURCE || defined _POSIX_C_SOURCE || \ + defined _XOPEN_SOURCE || defined _XOPEN_SOURCE_EXTENDED || \ + defined _GNU_SOURCE || defined _SVID_SOURCE) + # define __FAVOR_BSD 1 + #endif + +The current workaround of undefining _GNU_SOURCE after config.h doesn't +work as features.h has already been evaluated by then. Instead, simply +don't include config.h as it isn't needed in these two files. + +Signed-off-by: Peter Korsgaard +--- + src/trace-tcp.c | 5 ----- + src/trace-udp.c | 5 ----- + 2 files changed, 10 deletions(-) + +diff --git a/src/trace-tcp.c b/src/trace-tcp.c +index 6a7732d..91b64c2 100644 +--- a/src/trace-tcp.c ++++ b/src/trace-tcp.c +@@ -17,11 +17,6 @@ + * along with this program. If not, see . * + *************************************************************************/ + +-#ifdef HAVE_CONFIG_H +-# include +-#endif +- +-#undef _GNU_SOURCE + #define _BSD_SOURCE 1 + + #include +diff --git a/src/trace-udp.c b/src/trace-udp.c +index 821c24c..1754338 100644 +--- a/src/trace-udp.c ++++ b/src/trace-udp.c +@@ -17,11 +17,6 @@ + * along with this program. If not, see . * + *************************************************************************/ + +-#ifdef HAVE_CONFIG_H +-# include +-#endif +- +-#undef _GNU_SOURCE + #define _BSD_SOURCE 1 + + #include +-- +1.7.10 + diff --git a/package/ndisc6/ndisc6.mk b/package/ndisc6/ndisc6.mk new file mode 100644 index 0000000000..719f85d5b2 --- /dev/null +++ b/package/ndisc6/ndisc6.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# ndisc6 +# +################################################################################ + +NDISC6_VERSION = 1.0.2 +NDISC6_SOURCE = ndisc6-$(NDISC6_VERSION).tar.bz2 +NDISC6_SITE = http://www.remlab.net/files/ndisc6/ +NDISC6_CONF_ENV = CC="$(TARGET_CC) -std=gnu99" +NDISC6_CONF_OPT = --localstatedir=/var --disable-rpath --disable-suid-install + +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) +NDISC6_DEPENDENCIES += gettext +NDISC6_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -lintl" +endif + +NDISC6_BIN_ += dnssort # perl script +NDISC6_BIN_$(BR2_PACKAGE_NDISC6_NAME2ADDR) += name2addr addr2name +NDISC6_BIN_$(BR2_PACKAGE_NDISC6_TCPSPRAY) += tcpspray tcpspray6 + +NDISC6_SBIN_$(BR2_PACKAGE_NDISC6_NDISC6) += ndisc6 +NDISC6_SBIN_$(BR2_PACKAGE_NDISC6_RDISC6) += rdisc6 +NDISC6_SBIN_$(BR2_PACKAGE_NDISC6_RDNSSD) += rdnssd +NDISC6_SBIN_$(BR2_PACKAGE_NDISC6_RLTRACEROUTE6) += rltraceroute6 tracert6 +NDISC6_SBIN_$(BR2_PACKAGE_NDISC6_TCPTRACEROUTE6) += tcptraceroute6 + +NDISC6_MAN1_ = $(addsuffix .1,$(NDISC6_BIN_)) +NDISC6_MAN8_ = $(addsuffix .8,$(NDISC6_SBIN_)) + +define NDISC6_REMOVE_UNNEEDED + rm -rf $(addprefix $(TARGET_DIR)/usr/bin/,$(NDISC6_BIN_)) \ + $(addprefix $(TARGET_DIR)/usr/sbin/,$(NDISC6_SBIN_)) \ + $(addprefix $(TARGET_DIR)/usr/share/man/man1/,$(NDISC6_MAN1_)) \ + $(addprefix $(TARGET_DIR)/usr/share/man/man8/,$(NDISC6_MAN8_)) + $(if $(BR2_PACKAGE_NDISC6_RDNSSD),,\ + rm -rf $(TARGET_DIR)/etc/rdnssd $(TARGET_DIR)/var/run/rdnssd) +endef + +NDISC6_POST_INSTALL_TARGET_HOOKS += NDISC6_REMOVE_UNNEEDED + +$(eval $(autotools-package)) diff --git a/package/ne10/Config.in b/package/ne10/Config.in new file mode 100644 index 0000000000..d0c4983ed5 --- /dev/null +++ b/package/ne10/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_NE10 + bool "ne10" + depends on BR2_arm && BR2_ARM_CPU_HAS_NEON + help + The Ne10 project has been set up to provide a set of common, + useful functions which have been heavily optimized for the + ARM Architecture and provide consistent well tested behavior + that can be easily incorporated into applications. C + interfaces to the functions are provided for both assembler + and NEON implementations. + + http://projectne10.github.io/Ne10/ diff --git a/package/ne10/ne10.mk b/package/ne10/ne10.mk new file mode 100644 index 0000000000..bb5259f849 --- /dev/null +++ b/package/ne10/ne10.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# ne10 +# +################################################################################ + +# We use a Git commit ID because the last tagged version is more than +# one year old. +NE10_VERSION = 88c18f02199947b2c8b57796f5a3ca53160aff96 +NE10_SITE = http://github.com/projectNe10/Ne10/tarball/$(NE10_VERSION) +NE10_LICENSE = BSD-3c or Apache 2.0 +NE10_LICENSE_FILES = doc/LICENSE + +ifeq ($(BR2_PREFER_STATIC_LIB),) +NE10_CONF_OPT = \ + -DNE10_BUILD_SHARED=ON +endif + +# The package does not have any install target, so have to provide +# INSTALL_STAGING_CMDS and INSTALL_TARGET_CMDS. + +ifeq ($(BR2_PREFER_STATIC_LIB),) +define NE10_INSTALL_STAGING_SHARED_LIB + cp -dpf $(@D)/modules/libNE10*.so* $(STAGING_DIR)/usr/lib/ +endef +endif + +define NE10_INSTALL_STAGING_CMDS + cp -dpf $(@D)/inc/NE10*h $(STAGING_DIR)/usr/include/ + cp -dpf $(@D)/modules/libNE10.a $(STAGING_DIR)/usr/lib/ + $(NE10_INSTALL_STAGING_SHARED_LIB) +endef + + +define NE10_INSTALL_TARGET_CMDS + cp -dpf $(@D)/modules/libNE10*.so* $(TARGET_DIR)/usr/lib/ +endef + +$(eval $(cmake-package)) diff --git a/package/neard/Config.in b/package/neard/Config.in new file mode 100644 index 0000000000..ed20e0604b --- /dev/null +++ b/package/neard/Config.in @@ -0,0 +1,28 @@ +config BR2_PACKAGE_NEARD + bool "neard" + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libnl, dbus, libglib2 + depends on BR2_USE_MMU # dbus, libglib2 + select BR2_PACKAGE_DBUS + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBNL + help + Near Field Communication (NFC) manager. This userspace daemon is + a part of the NFC stack provided by the Linux NFC project. + + http://git.kernel.org/?p=network/nfc/neard.git;a=summary + + https://01.org/linux-nfc/documentation/how-start-linux-nfc-code... + +if BR2_PACKAGE_NEARD + +config BR2_PACKAGE_NEARD_TOOLS + bool "neard tools" + help + Build and install neard tools. + +endif + +comment "neard needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/neard/S53neard b/package/neard/S53neard new file mode 100755 index 0000000000..0a75941e27 --- /dev/null +++ b/package/neard/S53neard @@ -0,0 +1,33 @@ +#!/bin/sh +# +# Starts neard +# + +NAME=neard +DAEMON=/usr/libexec/nfc/$NAME + +# Exit gracefully if the package has been removed +[ -x $DAEMON ] || exit 0 + +case "$1" in + start) + echo -n "Starting $NAME: " + start-stop-daemon -S -q -p /var/run/${NAME}.pid -x $DAEMON -- -d '*' + echo "OK" + ;; + stop) + echo -n "Stopping $NAME: " + start-stop-daemon -K -q -p /var/run/${NAME}.pid + echo "OK" + ;; + restart|reload) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/neard/neard.mk b/package/neard/neard.mk new file mode 100644 index 0000000000..0f954b82b3 --- /dev/null +++ b/package/neard/neard.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# neard +# +################################################################################ + +NEARD_VERSION = 0.13 +NEARD_SOURCE = neard-$(NEARD_VERSION).tar.xz +NEARD_SITE = $(BR2_KERNEL_MIRROR)/linux/network/nfc +NEARD_LICENSE = GPLv2 +NEARD_LICENSE_FILES = COPYING + +NEARD_AUTORECONF = YES +NEARD_DEPENDENCIES = host-pkgconf dbus libglib2 libnl +NEARD_CONF_OPT = --disable-traces + +ifeq ($(BR2_PACKAGE_NEARD_TOOLS),y) + NEARD_CONF_OPT += --enable-tools +endif + +define NEARD_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/neard/S53neard \ + $(TARGET_DIR)/etc/init.d/S53neard +endef + +define NEARD_UNINSTALL_INIT_SYSV + $(RM) $(TARGET_DIR)/etc/init.d/S53neard +endef + +$(eval $(autotools-package)) diff --git a/package/neardal/Config.in b/package/neardal/Config.in new file mode 100644 index 0000000000..0e871716f7 --- /dev/null +++ b/package/neardal/Config.in @@ -0,0 +1,25 @@ +config BR2_PACKAGE_NEARDAL + bool "neardal" + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, glib2 + depends on BR2_USE_MMU # dbus + select BR2_PACKAGE_DBUS + select BR2_PACKAGE_DBUS_GLIB + help + Provides a simple C API to exchange data with the neard NFC + manager daemon. + + https://github.com/connectivity/neardal + +if BR2_PACKAGE_NEARDAL + +config BR2_PACKAGE_NEARDAL_NCL + bool "ncl tool" + help + Build and install neardal ncl command line interpreter tool. + +endif + +comment "neardal needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/neardal/neardal-01-automake.patch b/package/neardal/neardal-01-automake.patch new file mode 100644 index 0000000000..e5d822e65b --- /dev/null +++ b/package/neardal/neardal-01-automake.patch @@ -0,0 +1,35 @@ +From 08f26bdd093c7f289638ab506b0e842bd93f3d0d Mon Sep 17 00:00:00 2001 +From: Dmytro Bagrii +Date: Thu, 14 Mar 2013 15:44:40 +0100 +Subject: [PATCH 1/2] Fix 'AM_PROG_AR' autogen.sh error There is an error while + running autogen.sh in some distributions (e.g. Archlinux, automake 1.13.1). + +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 6a4a7c5..eb03a50 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1,7 +1,6 @@ + AC_INIT([neardal], 0.8.0, Neardal for Neard v0.8) + AM_INIT_AUTOMAKE([foreign -Wall -Werror]) + +-AC_PROG_LIBTOOL + AC_CONFIG_HEADERS([config.h]) + + m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) +@@ -15,6 +14,8 @@ traces=no + + AC_PROG_CC + AM_PROG_CC_C_O ++AM_PROG_AR ++AC_PROG_LIBTOOL + + ## Compiler option + ## Debug ? +-- +1.8.1.5 + diff --git a/package/neardal/neardal.mk b/package/neardal/neardal.mk new file mode 100644 index 0000000000..7e085e4ab5 --- /dev/null +++ b/package/neardal/neardal.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# neardal +# +################################################################################ + +NEARDAL_VERSION = 0.8 +NEARDAL_SITE = http://github.com/connectivity/neardal/tarball/$(NEARDAL_VERSION) +NEARDAL_SOURCE = connectivity-neardal-$(NEARDAL_VERSION).tar.gz +NEARDAL_INSTALL_STAGING = YES +NEARDAL_LICENSE = GPLv2 +NEARDAL_LICENSE_FILES = COPYING + +NEARDAL_DEPENDENCIES = host-pkgconf dbus dbus-glib +NEARDAL_AUTORECONF = YES + +define NEARDAL_INSTALL_NCL + $(INSTALL) -m 0755 -D $(@D)/ncl/ncl $(TARGET_DIR)/usr/bin/ncl +endef + +ifeq ($(BR2_PACKAGE_NEARDAL_NCL),y) + NEARDAL_POST_INSTALL_TARGET_HOOKS += NEARDAL_INSTALL_NCL +endif + +$(eval $(autotools-package)) diff --git a/package/neon/Config.in b/package/neon/Config.in index 5ebd64d4a3..e76278c37e 100644 --- a/package/neon/Config.in +++ b/package/neon/Config.in @@ -5,47 +5,37 @@ config BR2_PACKAGE_NEON http://www.webdav.org/neon/ +if BR2_PACKAGE_NEON + config BR2_PACKAGE_NEON_ZLIB bool "ZLIB support" - depends on BR2_PACKAGE_NEON select BR2_PACKAGE_ZLIB help build with ZLIB support config BR2_PACKAGE_NEON_SSL bool "SSL support" - depends on BR2_PACKAGE_NEON select BR2_PACKAGE_OPENSSL help build with SSL support -choice - prompt "XML Support" - default BR2_PACKAGE_NEON_NOXML - depends on BR2_PACKAGE_NEON - help - Select which XML library to use... - expat use expat - libxml2 use libxml2 - none do not build with XML support +# This is an hidden symbol other packages can select to ensure that +# Neon has XML support, either provided by Expat or libxml2. +config BR2_PACKAGE_NEON_XML + bool + select BR2_PACKAGE_NEON_EXPAT if !BR2_PACKAGE_NEON_LIBXML2 config BR2_PACKAGE_NEON_EXPAT - bool "expat" - depends on BR2_PACKAGE_EXPAT + bool "XML support with expat" + select BR2_PACKAGE_EXPAT + depends on !BR2_PACKAGE_NEON_LIBXML2 help - expat use expat, a library for parsing XML. + Enable XML support in neon, using the Expat XML library. config BR2_PACKAGE_NEON_LIBXML2 - bool "libxml2" - depends on BR2_PACKAGE_LIBXML2 + bool "XML support with libxml2" + select BR2_PACKAGE_LIBXML2 help - libxml2 use libxml2, a library to read, modify and - write XML and HTML files. + Enable XML support in neon, using the libxml2 XML library. -config BR2_PACKAGE_NEON_NOXML - bool "none" - help - none don't use XML, if this is the only option - and you want XML support, you must choose - XML handling below. -endchoice +endif diff --git a/package/neon/neon.mk b/package/neon/neon.mk index c570fc1dac..177ae6ae06 100644 --- a/package/neon/neon.mk +++ b/package/neon/neon.mk @@ -1,48 +1,50 @@ -############################################################# +################################################################################ # # neon # -############################################################# -NEON_VERSION:=0.28.3 -NEON_SITE:=http://www.webdav.org/neon/ -NEON_INSTALL_STAGING:=YES -NEON_CONF_OPT:=--enable-shared --without-gssapi --disable-rpath +################################################################################ -NEON_DEPENDENCIES:=host-pkg-config +NEON_VERSION = 0.30.0 +NEON_SITE = http://www.webdav.org/neon/ +NEON_LICENSE = LGPLv2+ (library), GPLv2+ (manual and tests) +NEON_LICENSE_FILES = src/COPYING.LIB test/COPYING README +NEON_INSTALL_STAGING = YES +NEON_CONF_OPT = --without-gssapi --disable-rpath +NEON_CONFIG_SCRIPTS = neon-config +NEON_DEPENDENCIES = host-pkgconf -ifeq ($(BR2_PACKAGE_NEON_LIBXML2),y) -NEON_CONF_OPT+=--with-libxml2=yes -NEON_CONF_OPT+=--with-expat=no -NEON_CONF_ENV+=ac_cv_prog_XML2_CONFIG=$(STAGING_DIR)/usr/bin/xml2-config -NEON_DEPENDENCIES+=libxml2 -endif ifeq ($(BR2_PACKAGE_NEON_ZLIB),y) -NEON_CONF_OPT+=--with-zlib=$(STAGING_DIR) -NEON_DEPENDENCIES+=zlib +NEON_CONF_OPT += --with-zlib=$(STAGING_DIR) +NEON_DEPENDENCIES += zlib else -NEON_CONF_OPT+=--without-zlib +NEON_CONF_OPT += --without-zlib endif + ifeq ($(BR2_PACKAGE_NEON_SSL),y) -NEON_CONF_OPT+=--with-ssl -NEON_DEPENDENCIES+=openssl +NEON_CONF_OPT += --with-ssl +NEON_DEPENDENCIES += openssl else -NEON_CONF_OPT+=--without-ssl +NEON_CONF_OPT += --without-ssl endif + ifeq ($(BR2_PACKAGE_NEON_EXPAT),y) -NEON_CONF_OPT+=--with-expat=$(STAGING_DIR)/usr/lib/libexpat.la -NEON_CONF_OPT+=--with-libxml2=no -NEON_DEPENDENCIES+=expat -endif -ifeq ($(BR2_PACKAGE_NEON_NOXML),y) -# webdav needs xml support -NEON_CONF_OPT+=--disable-webdav +NEON_CONF_OPT += --with-expat=$(STAGING_DIR)/usr/lib/libexpat.la +NEON_DEPENDENCIES += expat +else +NEON_CONF_OPT += --with-expat=no endif -ifeq ($(BR2_PACKAGE_OPENSSL),y) -NEON_CONF_OPT+=--with-ssl -NEON_DEPENDENCIES+=openssl +ifeq ($(BR2_PACKAGE_NEON_LIBXML2),y) +NEON_CONF_OPT += --with-libxml2=yes +NEON_CONF_ENV += ac_cv_prog_XML2_CONFIG=$(STAGING_DIR)/usr/bin/xml2-config +NEON_DEPENDENCIES += libxml2 else -NEON_CONF_OPT+=--without-ssl +NEON_CONF_OPT += --with-libxml2=no +endif + +ifeq ($(BR2_PACKAGE_NEON_EXPAT)$(BR2_PACKAGE_NEON_LIBXML2),) +# webdav needs xml support +NEON_CONF_OPT += --disable-webdav endif -$(eval $(call AUTOTARGETS,package,neon)) +$(eval $(autotools-package)) diff --git a/package/netatalk/Config.in b/package/netatalk/Config.in new file mode 100644 index 0000000000..cdb2039a40 --- /dev/null +++ b/package/netatalk/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_NETATALK + bool "netatalk" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_BERKELEYDB + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_LIBEVENT + select BR2_PACKAGE_LIBGCRYPT + select BR2_PACKAGE_LIBGPG_ERROR + help + Netatalk can be used to turn a *NIX machine into an extremely + high-performance and reliable file server for Macintosh computers. + + http://netatalk.sourceforge.net/ + +comment "netatalk needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/netatalk/S50netatalk b/package/netatalk/S50netatalk new file mode 100755 index 0000000000..f109174961 --- /dev/null +++ b/package/netatalk/S50netatalk @@ -0,0 +1,33 @@ +#!/bin/sh +# +# Start netatalk +# + +start() { + echo "Starting Netatalk" + start-stop-daemon -S -q -p /var/run/netatalk.pid --exec /usr/sbin/netatalk +} + +stop(){ + echo "Stopping Netatalk" + start-stop-daemon -K -q -p /var/run/netatalk.pid +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + start + stop + ;; + *) + echo $"Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/package/netatalk/netatalk-0001-Fix-setting-of-LD_LIBRARY_FLAGS-shlibpath_var.patch b/package/netatalk/netatalk-0001-Fix-setting-of-LD_LIBRARY_FLAGS-shlibpath_var.patch new file mode 100644 index 0000000000..01d5776596 --- /dev/null +++ b/package/netatalk/netatalk-0001-Fix-setting-of-LD_LIBRARY_FLAGS-shlibpath_var.patch @@ -0,0 +1,48 @@ +From 60d100713b5289948e9cdf5b0646ff3cdd2c206b Mon Sep 17 00:00:00 2001 +From: "Arnout Vandecappelle (Essensium/Mind)" +Date: Mon, 17 Dec 2012 22:32:44 +0100 +Subject: [PATCH] Fix setting of LD_LIBRARY_FLAGS ($shlibpath_var). + +LD_LIBRARY_PATH should not be set when cross-compiling, because it +adds the cross-libraries to the build's LD-path. + +Also the restoring of LD_LIBRARY_PATH was done incorrectly: it would +set LD_LIBRARY_PATH=LD_LIBRARY_PATH. + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + macros/db3-check.m4 | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/macros/db3-check.m4 b/macros/db3-check.m4 +index 902220b..d5a5446 100644 +--- a/macros/db3-check.m4 ++++ b/macros/db3-check.m4 +@@ -94,7 +94,7 @@ if test "x$bdb_required" = "xyes"; then + savedldflags="$LDFLAGS" + savedcppflags="$CPPFLAGS" + savedlibs="$LIBS" +- saved_shlibpath_var=$shlibpath_var ++ eval saved_shlibpath_var=\$$shlibpath_var + + dnl required BDB version: 4.6, because of cursor API change + DB_MAJOR_REQ=4 +@@ -148,7 +148,7 @@ if test "x$bdb_required" = "xyes"; then + dnl -- LD_LIBRARY_PATH on many platforms. This will be fairly + dnl -- portable hopefully. Reference: + dnl -- http://lists.gnu.org/archive/html/autoconf/2009-03/msg00040.html +- eval export $shlibpath_var=$bdblibdir ++ test "$cross_compiling" = yes || eval export $shlibpath_var=$bdblibdir + NETATALK_BDB_TRY_LINK + eval export $shlibpath_var=$saved_shlibpath_var + +@@ -171,7 +171,7 @@ if test "x$bdb_required" = "xyes"; then + CPPFLAGS="-I${bdbdir}/include${subdir} $CPPFLAGS" + LDFLAGS="-L$bdblibdir $LDFLAGS" + +- eval export $shlibpath_var=$bdblibdir ++ test "$cross_compiling" = yes || eval export $shlibpath_var=$bdblibdir + NETATALK_BDB_TRY_LINK + eval export $shlibpath_var=$saved_shlibpath_var + +-- diff --git a/package/netatalk/netatalk.mk b/package/netatalk/netatalk.mk new file mode 100644 index 0000000000..2bd63ecb3f --- /dev/null +++ b/package/netatalk/netatalk.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# netatalk +# +################################################################################ + +NETATALK_VERSION = 3.0.5 +NETATALK_SITE = http://downloads.sourceforge.net/project/netatalk/netatalk/$(NETATALK_VERSION) +NETATALK_SOURCE = netatalk-$(NETATALK_VERSION).tar.bz2 +NETATALK_AUTORECONF = YES +NETATALK_CONFIG_SCRIPTS = netatalk-config +NETATALK_DEPENDENCIES = host-pkgconf openssl berkeleydb libgcrypt libgpg-error \ + libevent +NETATALK_LICENSE = GPLv2+, LGPLv3+, MIT-like +NETATALK_LICENSE_FILES = COPYING COPYRIGHT + +# Don't run ldconfig! +NETATALK_CONF_ENV += CC="$(TARGET_CC) -std=gnu99" \ + ac_cv_path_NETA_LDCONFIG="" +NETATALK_CONF_OPT += --with-cnid-cdb-backend \ + --with-bdb=$(STAGING_DIR)/usr \ + --disable-zeroconf \ + --with-ssl-dir=$(STAGING_DIR)/usr \ + --with-libgcrypt-dir=$(STAGING_DIR)/usr \ + --with-shadow \ + --disable-shell-check \ + --without-kerberos \ + --without-pam \ + --with-libevent=no \ + --with-dtrace=no + +ifeq ($(BR2_PACKAGE_CUPS),y) + NETATALK_DEPENDENCIES += cups + NETATALK_CONF_ENV += ac_cv_path_CUPS_CONFIG=$(STAGING_DIR)/usr/bin/cups-config + NETATALK_CONF_OPT += --enable-cups +else + NETATALK_CONF_OPT += --disable-cups +endif + +define NETATALK_INSTALL_EXTRA_FILES + [ -f $(TARGET_DIR)/etc/init.d/S50netatalk ] || \ + $(INSTALL) -m 0755 -D package/netatalk/S50netatalk \ + $(TARGET_DIR)/etc/init.d/S50netatalk +endef + +NETATALK_POST_INSTALL_TARGET_HOOKS += NETATALK_INSTALL_EXTRA_FILES + +$(eval $(autotools-package)) diff --git a/package/netcat/netcat.mk b/package/netcat/netcat.mk index f8263ef351..5d01ebbad6 100644 --- a/package/netcat/netcat.mk +++ b/package/netcat/netcat.mk @@ -1,15 +1,12 @@ -############################################################# +################################################################################ # # netcat # -############################################################# +################################################################################ -NETCAT_VERSION:=0.7.1 -NETCAT_SOURCE:=netcat-$(NETCAT_VERSION).tar.gz -NETCAT_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/netcat -NETCAT_AUTORECONF:=NO -NETCAT_INSTALL_STAGING:=NO -NETCAT_INSTALL_TARGET:=YES -NETCAT_CONF_OPT = --program-prefix='' +NETCAT_VERSION = 0.7.1 +NETCAT_SITE = http://downloads.sourceforge.net/project/netcat/netcat/$(NETCAT_VERSION) +NETCAT_LICENSE = GPLv2+ +NETCAT_LICENSE_FILES = COPYING -$(eval $(call AUTOTARGETS,package,netcat)) +$(eval $(autotools-package)) diff --git a/package/netkitbase/Config.in b/package/netkitbase/Config.in index 725e500ace..49d3b2e199 100644 --- a/package/netkitbase/Config.in +++ b/package/netkitbase/Config.in @@ -1,10 +1,13 @@ config BR2_PACKAGE_NETKITBASE bool "netkitbase" - depends on BR2_INET_RPC + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC + depends on BR2_USE_MMU # fork() + depends on BR2_DEPRECATED help Old-style inetd. ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/ -comment "netkitbase requires a toolchain with RPC support" - depends on !BR2_INET_RPC +comment "netkitbase needs a toolchain w/ RPC" + depends on BR2_USE_MMU && BR2_DEPRECATED + depends on !BR2_TOOLCHAIN_HAS_NATIVE_RPC diff --git a/package/netkitbase/netkitbase.mk b/package/netkitbase/netkitbase.mk index 311c8b28a2..b17ee996db 100644 --- a/package/netkitbase/netkitbase.mk +++ b/package/netkitbase/netkitbase.mk @@ -1,68 +1,35 @@ -############################################################# +################################################################################ # # netkitbase # -############################################################# -NETKITBASE_VERSION:=0.17 -NETKITBASE_SOURCE:=netkit-base-$(NETKITBASE_VERSION).tar.gz -NETKITBASE_SITE:=ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/ -NETKITBASE_DIR:=$(BUILD_DIR)/netkit-base-$(NETKITBASE_VERSION) -NETKITBASE_CAT:=$(ZCAT) -NETKITBASE_BINARY:=inetd/inetd -NETKITBASE_TARGET_BINARY:=usr/sbin/inetd +################################################################################ -$(DL_DIR)/$(NETKITBASE_SOURCE): - $(call DOWNLOAD,$(NETKITBASE_SITE),$(NETKITBASE_SOURCE)) +NETKITBASE_VERSION = 0.17 +NETKITBASE_SOURCE = netkit-base-$(NETKITBASE_VERSION).tar.gz +NETKITBASE_SITE = ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/ +NETKITBASE_LICENSE = BSD-4c -netkitbase-source: $(DL_DIR)/$(NETKITBASE_SOURCE) - -$(NETKITBASE_DIR)/.unpacked: $(DL_DIR)/$(NETKITBASE_SOURCE) - $(NETKITBASE_CAT) $(DL_DIR)/$(NETKITBASE_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - +define NETKITBASE_CONFIGURE_CMDS # use ANSI syntax $(SED) "s/main()/main(void)/;" $(NETKITBASE_DIR)/configure # don't try to run cross compiled binaries while configuring things $(SED) "s~./__conftest~#./__conftest~;" $(NETKITBASE_DIR)/configure - toolchain/patch-kernel.sh $(NETKITBASE_DIR) package/netkitbase/ netkitbase\*.patch - touch $(NETKITBASE_DIR)/.unpacked - -$(NETKITBASE_DIR)/.configured: $(NETKITBASE_DIR)/.unpacked - (cd $(NETKITBASE_DIR); rm -f config.cache; \ - PATH=$(TARGET_PATH) CC="$(TARGET_CC)" \ - ./configure --installroot=$(TARGET_DIR) --with-c-compiler="$(TARGET_CC)" \ - ) - touch $(NETKITBASE_DIR)/.configured - -$(NETKITBASE_DIR)/$(NETKITBASE_BINARY): $(NETKITBASE_DIR)/.configured - $(MAKE) CC="$(TARGET_CC)" -C $(NETKITBASE_DIR) - $(STRIPCMD) $(NETKITBASE_DIR)/$(NETKITBASE_BINARY) - -$(TARGET_DIR)/$(NETKITBASE_TARGET_BINARY): $(NETKITBASE_DIR)/$(NETKITBASE_BINARY) - # Only install a few selected items... - mkdir -p $(TARGET_DIR)/usr/sbin - cp $(NETKITBASE_DIR)/$(NETKITBASE_BINARY) $(TARGET_DIR)/$(NETKITBASE_TARGET_BINARY) - @if [ ! -f $(TARGET_DIR)/etc/inetd.conf ]; then \ - mkdir -p $(TARGET_DIR)/etc; \ - cp $(NETKITBASE_DIR)/etc.sample/inetd.conf $(TARGET_DIR)/etc/; \ + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + ./configure \ + --installroot=$(TARGET_DIR)) +endef + +define NETKITBASE_BUILD_CMDS + $(MAKE) -C $(@D) +endef + +define NETKITBASE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/inetd/inetd $(TARGET_DIR)/usr/sbin/inetd + if [ ! -f $(TARGET_DIR)/etc/inetd.conf ]; then \ + $(INSTALL) -D -m 0644 $(@D)/etc.sample/inetd.conf $(TARGET_DIR)/etc/inetd.conf; \ $(SED) "s/^\([a-z]\)/#\1/;" $(TARGET_DIR)/etc/inetd.conf; \ fi - touch -c $(TARGET_DIR)/$(NETKITBASE_TARGET_BINARY) - -netkitbase: $(TARGET_DIR)/$(NETKITBASE_TARGET_BINARY) +endef -netkitbase-clean: - #$(MAKE) DESTDIR=$(TARGET_DIR) CC="$(TARGET_CC)" -C $(NETKITBASE_DIR) uninstall - -rm -f $(TARGET_DIR)/usr/sbin/inetd $(TARGET_DIR)/etc/inetd.conf - -rm -f $(TARGET_DIR)/etc/inetd.conf - -$(MAKE) -C $(NETKITBASE_DIR) clean - -netkitbase-dirclean: - rm -rf $(NETKITBASE_DIR) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_NETKITBASE),y) -TARGETS+=netkitbase -endif +$(eval $(generic-package)) diff --git a/package/netkittelnet/Config.in b/package/netkittelnet/Config.in index 058d2107cf..da1b245799 100644 --- a/package/netkittelnet/Config.in +++ b/package/netkittelnet/Config.in @@ -1,11 +1,13 @@ config BR2_PACKAGE_NETKITTELNET bool "netkittelnet" - depends on BR2_INET_RPC + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC + depends on BR2_DEPRECATED select BR2_PACKAGE_NETKITBASE help Standard Linux telnet client and server. ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/ -comment "netkittelnet requires a toolchain with RPC support" - depends on !BR2_INET_RPC +comment "netkittelnet needs a toolchain w/ RPC" + depends on BR2_DEPRECATED + depends on !BR2_TOOLCHAIN_HAS_NATIVE_RPC diff --git a/package/netkittelnet/netkittelnet.mk b/package/netkittelnet/netkittelnet.mk index afa3bc451f..ca3b9300b8 100644 --- a/package/netkittelnet/netkittelnet.mk +++ b/package/netkittelnet/netkittelnet.mk @@ -1,68 +1,36 @@ -############################################################# +################################################################################ # # netkittelnet # -############################################################# -NETKITTELNET_VERSION:=0.17 -NETKITTELNET_SOURCE:=netkit-telnet-$(NETKITTELNET_VERSION).tar.gz -NETKITTELNET_SITE:=ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/ -NETKITTELNET_DIR:=$(BUILD_DIR)/netkit-telnet-$(NETKITTELNET_VERSION) -NETKITTELNET_CAT:=$(ZCAT) -NETKITTELNET_BINARY:=telnetd/telnetd -NETKITTELNET_TARGET_BINARY:=usr/sbin/telnetd +################################################################################ -$(DL_DIR)/$(NETKITTELNET_SOURCE): - $(call DOWNLOAD,$(NETKITTELNET_SITE),$(NETKITTELNET_SOURCE)) +NETKITTELNET_VERSION = 0.17 +NETKITTELNET_SOURCE = netkit-telnet-$(NETKITTELNET_VERSION).tar.gz +NETKITTELNET_SITE = ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/ +NETKITTELNET_LICENSE = BSD-4c +NETKITTELNET_DEPENDENCIES = netkitbase -netkittelnet-source: $(DL_DIR)/$(NETKITTELNET_SOURCE) - -$(NETKITTELNET_DIR)/.unpacked: $(DL_DIR)/$(NETKITTELNET_SOURCE) - $(NETKITTELNET_CAT) $(DL_DIR)/$(NETKITTELNET_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - +define NETKITTELNET_CONFIGURE_CMDS # use ANSI syntax - $(SED) "s/main()/main(void)/;" $(NETKITTELNET_DIR)/configure + $(SED) "s/main()/main(void)/;" $(@D)/configure # Disable termcap support - $(SED) "s~\(.*termcap\.h.*\)~/* \1 */~;" $(NETKITTELNET_DIR)/telnetd/telnetd.c - # don't try to run cross compiled binaries while configuring things - toolchain/patch-kernel.sh $(NETKITTELNET_DIR) package/netkittelnet/ netkittelnet\*.patch - touch $(NETKITTELNET_DIR)/.unpacked - -$(NETKITTELNET_DIR)/.configured: $(NETKITTELNET_DIR)/.unpacked - (cd $(NETKITTELNET_DIR); rm -f config.cache; \ - PATH=$(TARGET_PATH) CC="$(TARGET_CC)" \ - ./configure --installroot=$(TARGET_DIR) --with-c-compiler="$(TARGET_CC)" \ - ) - touch $(NETKITTELNET_DIR)/.configured - -$(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY): $(NETKITTELNET_DIR)/.configured - $(MAKE) SUB=telnetd CC="$(TARGET_CC)" -C $(NETKITTELNET_DIR) - $(STRIPCMD) $(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY) - -$(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY): $(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY) - # Only install a few selected items... - mkdir -p $(TARGET_DIR)/usr/sbin - rm -f $(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY) - cp $(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY) $(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY) + $(SED) "s~\(.*termcap\.h.*\)~/* \1 */~;" $(@D)/telnetd/telnetd.c + # C++ support not needed for telnetd + $(SED) 's/CXX/CC/g' -e 's/conftest.cc/conftest.c/g' $(@D)/configure + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + ./configure \ + --installroot=$(TARGET_DIR)) +endef + +define NETKITTELNET_BUILD_CMDS + $(MAKE) SUB=telnetd -C $(@D) +endef + +define NETKITTELNET_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/telnetd/telnetd $(TARGET_DIR)/usr/sbin/telnetd # Enable telnet in inetd $(SED) "s~^#telnet.*~telnet\tstream\ttcp\tnowait\troot\t/usr/sbin/telnetd\t/usr/sbin/telnetd~;" $(TARGET_DIR)/etc/inetd.conf - #$(MAKE) DESTDIR=$(TARGET_DIR) CC="$(TARGET_CC)" -C $(NETKITTELNET_DIR) install - #rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ - # $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc - -netkittelnet: netkitbase $(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY) +endef -netkittelnet-clean: - #$(MAKE) DESTDIR=$(TARGET_DIR) CC="$(TARGET_CC)" -C $(NETKITTELNET_DIR) uninstall - -rm -f $(TARGET_DIR)/usr/sbin/telnetd - -$(MAKE) -C $(NETKITTELNET_DIR) clean - -netkittelnet-dirclean: - rm -rf $(NETKITTELNET_DIR) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_NETKITTELNET),y) -TARGETS+=netkittelnet -endif +$(eval $(generic-package)) diff --git a/package/netkittelnet/netkittelnet.patch b/package/netkittelnet/netkittelnet.patch index c894c2abd8..ee4f37ee49 100644 --- a/package/netkittelnet/netkittelnet.patch +++ b/package/netkittelnet/netkittelnet.patch @@ -24,14 +24,25 @@ ) >/dev/null 2>&1 || continue; CXX=$TRY break; -@@ -141,7 +138,6 @@ - echo -n 'Checking if C++ compiler works... ' - if ( - $CXX __conftest.cc -o __conftest || exit 1 +@@ -138,18 +135,5 @@ + fi + echo "$CXX" +-else +- echo -n 'Checking if C++ compiler works... ' +- if ( +- $CXX __conftest.cc -o __conftest || exit 1 - ./__conftest || exit 1 - ) >/dev/null 2>&1; then - echo 'yes' - else +- ) >/dev/null 2>&1; then +- echo 'yes' +- else +- echo 'no' +- echo 'Compiler '"$CXX"' does not exist or cannot compile C++; try another.' +- rm -f __conftest* +- exit +- fi + fi + + echo -n "Checking if $CXX accepts gcc warnings... " @@ -278,13 +274,11 @@ EOF if ( @@ -66,7 +77,7 @@ -cat <__conftest.cc -#include -#include --int main(void) { +-int main() { - tgetent(NULL, NULL); return 0; -} - diff --git a/package/netperf/netperf-2.4.5-dccp.patch b/package/netperf/netperf-2.4.5-dccp.patch deleted file mode 100644 index ae84cee6d0..0000000000 --- a/package/netperf/netperf-2.4.5-dccp.patch +++ /dev/null @@ -1,38 +0,0 @@ -[PATCH] fix build on systems where IPROTO_DCCP is defined, but SOCK_DCCP isn't - -On some systems (E.G. uClibc 0.9.31) IPROTO_DCCP is defined, but SOCK_DCCP -isn't - Causing the build to break. Fix it by checking for both before -using. - -Signed-off-by: Peter Korsgaard ---- - src/netsh.c | 2 +- - src/nettest_bsd.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -Index: netperf-2.4.5/src/netsh.c -=================================================================== ---- netperf-2.4.5.orig/src/netsh.c -+++ netperf-2.4.5/src/netsh.c -@@ -452,7 +452,7 @@ parse_protocol(char protocol_string[]) - return IPPROTO_SDP; - } - #endif --#ifdef IPPROTO_DCCP -+#if defined(IPPROTO_DCCP) && defined(SOCK_DCCP) - if (!strcasecmp(temp,"dccp")) { - socket_type = SOCK_DCCP; - return IPPROTO_DCCP; -Index: netperf-2.4.5/src/nettest_bsd.c -=================================================================== ---- netperf-2.4.5.orig/src/nettest_bsd.c -+++ netperf-2.4.5/src/nettest_bsd.c -@@ -712,7 +712,7 @@ complete_addrinfo(char *controlhost, cha - that we did this so the code for the Solaris kludge can do - the fix-up for us. also flip error over to EAI_AGAIN and - make sure we don't "count" this time around the loop. */ --#if defined(IPPROTO_DCCP) -+#if defined(IPPROTO_DCCP) && defined(SOCK_DCCP) - /* only tweak on this one the second time around, after we've - kludged the ai_protocol field */ - if ((hints.ai_socktype == SOCK_DCCP) && diff --git a/package/netperf/netperf-2.4.5-netserver.patch b/package/netperf/netperf-2.4.5-netserver.patch deleted file mode 100644 index d841c1c70a..0000000000 --- a/package/netperf/netperf-2.4.5-netserver.patch +++ /dev/null @@ -1,51 +0,0 @@ -http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-analyzer/netperf/files/netperf-2.4.5-netserver.patch?view=log -# Set DEBUG_LOG_FILE location -# Fix compiler warnings (bug #337422): - netserver.c: In function ‘process_requests’: - netserver.c:287: warning: array subscript is above array bounds - inlined from ‘process_requests’ at netserver.c:268: - /usr/include/bits/stdio2.h:65: warning: call to __builtin___snprintf_chk will always overflow destination buffer - inlined from ‘process_requests’ at netserver.c:284: - /usr/include/bits/stdio2.h:65: warning: call to __builtin___snprintf_chk will always overflow destination buffer - ---- a/src/netserver.c -+++ b/src/netserver.c -@@ -142,7 +142,7 @@ - - #ifndef DEBUG_LOG_FILE - #ifndef WIN32 --#define DEBUG_LOG_FILE "/tmp/netperf.debug" -+#define DEBUG_LOG_FILE "/var/log/netperf.debug" - #else - #define DEBUG_LOG_FILE "c:\\temp\\netperf.debug" - #endif /* WIN32 */ -@@ -266,7 +266,7 @@ - (!strstr(local_machine,delims[i])) && - (!strstr(local_version,delims[i]))) { - snprintf((char *)netperf_response.content.test_specific_data, -- sizeof(netperf_response) - 7, -+ MAXSPECDATA, - "%c%s%c%s%c%s%c%s", - delims[i][0], - local_sysname, -@@ -282,15 +282,15 @@ - if (i == 4) { - /* none of the delimiters were unique, use the last one */ - snprintf((char *)netperf_response.content.test_specific_data, -- sizeof(netperf_response) - 7, -+ MAXSPECDATA, - "%c%s%c%s%c%s%c%s", -- delims[i][0], -+ delims[3][0], - "NoDelimUnique", -- delims[i][0], -+ delims[3][0], - "NoDelimUnique", -- delims[i][0], -+ delims[3][0], - "NoDelimUnique", -- delims[i][0], -+ delims[3][0], - "NoDelimUnique"); - } - send_response_n(0); diff --git a/package/netperf/netperf.mk b/package/netperf/netperf.mk index 6bf9b5c172..455f27ed2c 100644 --- a/package/netperf/netperf.mk +++ b/package/netperf/netperf.mk @@ -1,12 +1,15 @@ -############################################################# +################################################################################ # # netperf # -############################################################# +################################################################################ -NETPERF_VERSION = 2.4.5 +NETPERF_VERSION = 2.6.0 NETPERF_SITE = ftp://ftp.netperf.org/netperf NETPERF_CONF_ENV = ac_cv_func_setpgrp_void=set +NETPERF_CONF_OPT = --enable-demo=yes +NETPERF_LICENSE = netperf license +NETPERF_LICENSE_FILES = COPYING define NETPERF_INSTALL_TARGET_CMDS $(INSTALL) -m 0755 $(@D)/src/netperf \ @@ -20,4 +23,4 @@ define NETPERF_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/bin/netserver endef -$(eval $(call AUTOTARGETS,package,netperf)) +$(eval $(autotools-package)) diff --git a/package/netplug/Config.in b/package/netplug/Config.in index 5c9bca6522..593c08a948 100644 --- a/package/netplug/Config.in +++ b/package/netplug/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_NETPLUG bool "netplug" + depends on BR2_USE_MMU # fork() help A Linux daemon that manages network interfaces in response to network cables being plugged in and out. diff --git a/package/netplug/S29netplug b/package/netplug/S29netplug index e246674d53..d95554e895 100755 --- a/package/netplug/S29netplug +++ b/package/netplug/S29netplug @@ -39,7 +39,7 @@ fi case "$1" in start) # Start daemon. - echo -n $"Starting network plug daemon: " + echo -n "Starting network plug daemon: " start-stop-daemon -S -q -p /var/run/netplugd.pid -x /sbin/netplugd ${NETPLUGDARGS} RETVAL=$? echo @@ -47,7 +47,7 @@ case "$1" in ;; stop) # Stop daemon. - echo -n $"Shutting down network plug daemon: " + echo -n "Shutting down network plug daemon: " start-stop-daemon -K -n netplugd RETVAL=$? echo @@ -61,7 +61,7 @@ case "$1" in [ -f /var/lock/subsys/netplugd ] && $0 restart || : ;; *) - echo $"Usage: $0 {start|stop|restart}" + echo "Usage: $0 {start|stop|restart}" RETVAL=1 ;; esac diff --git a/package/netplug/netplug.mk b/package/netplug/netplug.mk index 98d15044c7..fdb1937b3a 100644 --- a/package/netplug/netplug.mk +++ b/package/netplug/netplug.mk @@ -1,11 +1,12 @@ -############################################################# +################################################################################ # # netplug # -############################################################# -NETPLUG_VERSION=1.2.9.2 -NETPLUG_SOURCE=netplug-$(NETPLUG_VERSION).tar.bz2 -NETPLUG_SITE=http://www.red-bean.com/~bos/netplug +################################################################################ + +NETPLUG_VERSION = 1.2.9.2 +NETPLUG_SOURCE = netplug-$(NETPLUG_VERSION).tar.bz2 +NETPLUG_SITE = http://www.red-bean.com/~bos/netplug define NETPLUG_BUILD_CMDS $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) @@ -15,14 +16,19 @@ define NETPLUG_INSTALL_TARGET_CMDS $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install endef +define NETPLUG_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/netplug/S29netplug \ + $(TARGET_DIR)/etc/init.d/S29netplug +endef + define NETPLUG_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/sbin/netplugd rm -rf $(TARGET_DIR)/etc/netplug* - rm -f $(TARGET_DIR)/etc/init.d/S*netplug + rm -f $(TARGET_DIR)/etc/init.d/S29netplug endef define NETPLUG_CLEAN_CMDS -$(MAKE) -C $(@D) clean endef -$(eval $(call GENTARGETS,package,netplug)) +$(eval $(generic-package)) diff --git a/package/netsnmp/Config.in b/package/netsnmp/Config.in index 5a3e9aabce..3d089362f4 100644 --- a/package/netsnmp/Config.in +++ b/package/netsnmp/Config.in @@ -1,8 +1,40 @@ config BR2_PACKAGE_NETSNMP bool "netsnmp" + depends on BR2_USE_MMU # fork() help Suite of applications used to implement SNMP v1, SNMP v2c, and SNMP v3 using both IPv4 and IPv6. http://net-snmp.sourceforge.net/ +config BR2_PACKAGE_NETSNMP_ENABLE_MIBS + bool "Install MIB files on target and enable MIB loading code" + default y + depends on BR2_PACKAGE_NETSNMP + help + The net-snmp package contains a selection of MIB files. + Say yes if you want those MIB files installed on the target + and enable the code that parses the MIB files. + +config BR2_PACKAGE_NETSNMP_WITH_MIB_MODULES + string "Build with these MIB modules" + default "host ucd-snmp/dlmod agentx" + depends on BR2_PACKAGE_NETSNMP + help + Specify which MIB modules to include. + +config BR2_PACKAGE_NETSNMP_WITHOUT_MIB_MODULES + string "Build without these MIB modules" + default "disman/event disman/schedule utilities" + depends on BR2_PACKAGE_NETSNMP + help + Specify which MIB modules to exclude. + +config BR2_PACKAGE_NETSNMP_ENABLE_DEBUGGING + bool "Enable debugging code" + depends on BR2_PACKAGE_NETSNMP + help + By default net-snmp is compiled without debugging support + (--disable-debugging). Enable this options if you need debugging + support, including the ability to log with DEBUGMSG(), + DEBUGMSGTL() and companion macros. diff --git a/package/netsnmp/S59snmpd b/package/netsnmp/S59snmpd index f65317a1d8..5df4b854d6 100755 --- a/package/netsnmp/S59snmpd +++ b/package/netsnmp/S59snmpd @@ -29,7 +29,6 @@ TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid' [ -r /etc/default/snmpd ] && . /etc/default/snmpd ssd_oknodo="-o" -ssd_oknodo="" # Cd to / before starting any daemons. cd / diff --git a/package/netsnmp/netsnmp.mk b/package/netsnmp/netsnmp.mk index e8d77881e5..806f7a6a25 100644 --- a/package/netsnmp/netsnmp.mk +++ b/package/netsnmp/netsnmp.mk @@ -1,26 +1,31 @@ -############################################################# +################################################################################ # # netsnmp # -############################################################# +################################################################################ -NETSNMP_VERSION = 5.6 -NETSNMP_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/net-snmp +NETSNMP_VERSION = 5.7.2 +NETSNMP_SITE = http://downloads.sourceforge.net/project/net-snmp/net-snmp/$(NETSNMP_VERSION) NETSNMP_SOURCE = net-snmp-$(NETSNMP_VERSION).tar.gz +NETSNMP_LICENSE = Various BSD-like +NETSNMP_LICENSE_FILES = COPYING NETSNMP_INSTALL_STAGING = YES NETSNMP_CONF_ENV = ac_cv_NETSNMP_CAN_USE_SYSCTL=yes NETSNMP_CONF_OPT = --with-persistent-directory=/var/lib/snmp --disable-static \ --with-defaults --enable-mini-agent --without-rpm \ --with-logfile=none --without-kmem-usage $(DISABLE_IPV6) \ - --enable-as-needed --disable-debugging --without-perl-modules \ + --enable-as-needed --without-perl-modules \ --disable-embedded-perl --disable-perl-cc-checks \ --disable-scripts --with-default-snmp-version="1" \ --enable-silent-libtool --enable-mfd-rewrites \ --with-sys-contact="root@localhost" \ --with-sys-location="Unknown" \ - --with-mib-modules="host ucd-snmp/dlmod" \ - --with-out-mib-modules="disman/event disman/schedule utilities" \ + --with-mib-modules="$(call qstrip,$(BR2_PACKAGE_NETSNMP_WITH_MIB_MODULES))" \ + --with-out-mib-modules="$(call qstrip,$(BR2_PACKAGE_NETSNMP_WITHOUT_MIB_MODULES))" \ --with-out-transports="Unix" +NETSNMP_MAKE = $(MAKE1) +NETSNMP_CONFIG_SCRIPTS = net-snmp-config + NETSNMP_BLOAT_MIBS = BRIDGE DISMAN-EVENT DISMAN-SCHEDULE DISMAN-SCRIPT EtherLike RFC-1215 RFC1155-SMI RFC1213 SCTP SMUX ifeq ($(BR2_ENDIAN),"BIG") @@ -43,6 +48,11 @@ ifneq ($(BR2_HAVE_DOCUMENTATION),y) NETSNMP_CONF_OPT += --disable-manuals endif +ifneq ($(BR2_PACKAGE_NETSNMP_ENABLE_MIBS),y) + NETSNMP_CONF_OPT += --disable-mib-loading + NETSNMP_CONF_OPT += --disable-mibs +endif + # Remove IPv6 MIBs if there's no IPv6 ifneq ($(BR2_INET_IPV6),y) define NETSNMP_REMOVE_MIBS_IPV6 @@ -50,6 +60,10 @@ define NETSNMP_REMOVE_MIBS_IPV6 endef endif +ifneq ($(BR2_PACKAGE_NETSNMP_ENABLE_DEBUGGING),y) + NETSNMP_CONF_OPT += --disable-debugging +endif + define NETSNMP_INSTALL_TARGET_CMDS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ DESTDIR=$(TARGET_DIR) install @@ -68,4 +82,12 @@ define NETSNMP_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/lib/libnetsnmp* endef -$(eval $(call AUTOTARGETS,package,netsnmp)) +define NETSNMP_STAGING_NETSNMP_CONFIG_FIXUP + $(SED) "s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include\',g" \ + -e "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" \ + $(STAGING_DIR)/usr/bin/net-snmp-config +endef + +NETSNMP_POST_INSTALL_STAGING_HOOKS += NETSNMP_STAGING_NETSNMP_CONFIG_FIXUP + +$(eval $(autotools-package)) diff --git a/package/netstat-nat/netstat-nat.mk b/package/netstat-nat/netstat-nat.mk index 412b6fe766..d94c6f02dc 100644 --- a/package/netstat-nat/netstat-nat.mk +++ b/package/netstat-nat/netstat-nat.mk @@ -1,10 +1,10 @@ -############################################################# +################################################################################ # # netstat-nat # -############################################################# +################################################################################ NETSTAT_NAT_VERSION = 1.4.10 NETSTAT_NAT_SITE = http://tweegy.nl/download -$(eval $(call AUTOTARGETS,package,netstat-nat)) +$(eval $(autotools-package)) diff --git a/package/nettle/Config.in b/package/nettle/Config.in new file mode 100644 index 0000000000..55776216e4 --- /dev/null +++ b/package/nettle/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_NETTLE + bool "nettle" + select BR2_PACKAGE_GMP + help + Nettle is a cryptographic library that is designed to fit easily + in more or less any context: In crypto toolkits for object-oriented + languages, in applications like LSH or GNUPG, or even in kernel space + + http://www.lysator.liu.se/~nisse/nettle/ diff --git a/package/nettle/nettle.mk b/package/nettle/nettle.mk new file mode 100644 index 0000000000..c23b4fa37a --- /dev/null +++ b/package/nettle/nettle.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# nettle +# +################################################################################ + +NETTLE_VERSION = 2.7.1 +NETTLE_SITE = http://www.lysator.liu.se/~nisse/archive +NETTLE_DEPENDENCIES = gmp +NETTLE_INSTALL_STAGING = YES +NETTLE_LICENSE = LGPLv2.1+ +NETTLE_LICENSE_FILES = COPYING.LIB +# don't include openssl support for (unused) examples as it has problems +# with static linking +NETTLE_CONF_OPT = --disable-openssl + +# ARM assembly requires v6+ ISA +ifeq ($(BR2_arm7tdmi)$(BR2_arm720t)$(BR2_arm920t)$(BR2_arm922t)$(BR2_arm926t)$(BR2_arm10t)$(BR2_fa526)$(BR2_strongarm)$(BR2_xscale)$(BR2_iwmmxt),y) +NETTLE_CONF_OPT += --disable-assembler +endif + +# ARM NEON, requires binutils 2.21+ +ifeq ($(BR2_ARM_CPU_HAS_NEON)$(BR2_TOOLCHAIN_BUILDROOT)$(BR2_BINUTILS_VERSION_2_20_1),yy) +NETTLE_CONF_OPT += --enable-arm-neon +else +NETTLE_CONF_OPT += --disable-arm-neon +endif + +define NETTLE_DITCH_DEBUGGING_CFLAGS + $(SED) '/CFLAGS/ s/ -ggdb3//' $(@D)/configure +endef + +NETTLE_POST_EXTRACT_HOOKS += NETTLE_DITCH_DEBUGGING_CFLAGS + +$(eval $(autotools-package)) diff --git a/package/network-manager/Config.in b/package/network-manager/Config.in new file mode 100644 index 0000000000..1e2a876f3a --- /dev/null +++ b/package/network-manager/Config.in @@ -0,0 +1,33 @@ +config BR2_PACKAGE_NETWORK_MANAGER + bool "NetworkManager" + depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV + select BR2_PACKAGE_DBUS + depends on BR2_INET_IPV6 + depends on BR2_LARGEFILE # acl + depends on BR2_USE_WCHAR # libglib2 and gnutls + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, libglib2 + depends on BR2_USE_MMU # dbus + select BR2_PACKAGE_DBUS_GLIB + select BR2_PACKAGE_UDEV + select BR2_PACKAGE_UDEV_ALL_EXTRAS + select BR2_PACKAGE_GNUTLS + select BR2_PACKAGE_LIBGCRYPT + select BR2_PACKAGE_LIBNL + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_WIRELESS_TOOLS + select BR2_PACKAGE_WIRELESS_TOOLS_LIB + help + NetworkManager is a set of co-operative tools that make networking + simple and straightforward. Whether WiFi, wired, 3G, or Bluetooth, + NetworkManager allows you to quickly move from one network to + another: once a network has been configured and joined once, it + can be detected and re-joined automatically the next time it's + available. + + http://projects.gnome.org/NetworkManager/ + +comment "NetworkManager needs a toolchain w/ IPv6, largefile, wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_INET_IPV6 || !BR2_LARGEFILE || !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/network-manager/S45network-manager b/package/network-manager/S45network-manager new file mode 100755 index 0000000000..112aa660e5 --- /dev/null +++ b/package/network-manager/S45network-manager @@ -0,0 +1,46 @@ +#!/bin/sh + +prefix=/usr +exec_prefix=/usr +sbindir=${exec_prefix}/sbin + +NETWORKMANAGER_BIN=${sbindir}/NetworkManager + +[ -x $NETWORKMANAGER_BIN ] || exit 0 + +PID=`pidof -o %PPID NetworkManager` +case "$1" in + start) + echo -n "Starting NetworkManager ... " + [ ! -d /var/run/NetworkManager ] && install -d /var/run/NetworkManager + if [ -z "$PID" ]; then + $NETWORKMANAGER_BIN + fi + if [ ! -z "$PID" -o $? -gt 0 ]; then + echo "failed!" + else + echo "done." + fi + ;; + stop) + echo -n "Stopping NetworkManager ... " + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + echo "failed!" + else + echo "done." + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart|sleep|wake}" + ;; +esac +exit 0 + + + diff --git a/package/network-manager/network-manager.mk b/package/network-manager/network-manager.mk new file mode 100644 index 0000000000..7c9cc88225 --- /dev/null +++ b/package/network-manager/network-manager.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# network-manager +# +################################################################################ + +NETWORK_MANAGER_VERSION_MAJOR = 0.9 +NETWORK_MANAGER_VERSION = $(NETWORK_MANAGER_VERSION_MAJOR).8.0 +NETWORK_MANAGER_SOURCE = NetworkManager-$(NETWORK_MANAGER_VERSION).tar.xz +NETWORK_MANAGER_SITE = http://ftp.gnome.org/pub/GNOME/sources/NetworkManager/$(NETWORK_MANAGER_VERSION_MAJOR) +NETWORK_MANAGER_INSTALL_STAGING = YES +NETWORK_MANAGER_DEPENDENCIES = host-pkgconf udev dbus-glib libnl gnutls \ + libgcrypt wireless_tools util-linux host-intltool + +NETWORK_MANAGER_CONF_ENV = \ + ac_cv_path_LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config \ + ac_cv_file__etc_fedora_release=no \ + ac_cv_file__etc_mandriva_release=no \ + ac_cv_file__etc_debian_version=no \ + ac_cv_file__etc_redhat_release=no \ + ac_cv_file__etc_SuSE_release=no + + +NETWORK_MANAGER_CONF_OPT = \ + --mandir=$(STAGING_DIR)/usr/man/ \ + --disable-tests \ + --disable-more-warnings \ + --without-docs \ + --disable-gtk-doc \ + --localstatedir=/var \ + --with-crypto=gnutls \ + --disable-ppp \ + --with-iptables=/usr/sbin/iptables \ + --disable-ifupdown \ + --disable-ifnet + +# uClibc by default doesn't have backtrace support, so don't use it +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +NETWORK_MANAGER_CONF_OPT += --disable-crashtrace +endif + +define NETWORK_MANAGER_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/network-manager/S45network-manager $(TARGET_DIR)/etc/init.d/S45network-manager +endef + +$(eval $(autotools-package)) diff --git a/package/newt/newt-fix-makefile.patch b/package/newt/newt-fix-makefile.patch new file mode 100644 index 0000000000..227b0f3fc7 --- /dev/null +++ b/package/newt/newt-fix-makefile.patch @@ -0,0 +1,42 @@ +Fix Makefile.in + +* Remove -Os from the CFLAGS (already handled by Buildroot) +* Use $(CC) instead of $(CPP) to generate .depend file because + '$(CPP) -M' call does not support multiple input files. + This avoid the following error: + +make[1]: Entering directory `/opt/br/output/build/newt-0.51.0' +/opt/br/output/host/usr/bin/arm-none-linux-gnueabi-cpp -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -M newt.c button.c form.c checkbox.c entry.c label.c listbox.c scrollbar.c textbox.c scale.c grid.c windows.c buttonbar.c checkboxtree.c > .depend +arm-none-linux-gnueabi-cpp: too many input files +make[1]: *** [depend] Error 1 +make[1]: Leaving directory +`/opt/br/output/build/newt-0.51.0' +make: *** +[/opt/br/output/build/newt-0.51.0/.stamp_built] Error 2 + + +Signed-off-by: Samuel Martin + +--- +Index: newt-0.51.0/Makefile.in +=================================================================== +--- newt-0.51.0.orig/Makefile.in 2012-10-10 22:43:42.042318041 +0200 ++++ newt-0.51.0/Makefile.in 2012-10-11 21:25:44.063873277 +0200 +@@ -3,7 +3,7 @@ SHLIBS = -lslang -lm -lc + + GPM_SUPPORT=@gpm_support@ + +-CFLAGS = -Wall -Os -D_GNU_SOURCE ++CFLAGS += -D_GNU_SOURCE + + VERSION = @VERSION@ + CVSTAG = r$(subst .,-,$(VERSION)) +@@ -86,7 +86,7 @@ clean: + $(SHAREDOBJS) *.so* + + depend: +- $(CPP) $(CFLAGS) -M $(SOURCES) > .depend ++ $(CC) $(CFLAGS) -M $(SOURCES) > .depend + + $(SHAREDDIR): + mkdir -p $(SHAREDDIR) diff --git a/package/newt/newt.mk b/package/newt/newt.mk index 28b5321e7a..1d5e7d58e8 100644 --- a/package/newt/newt.mk +++ b/package/newt/newt.mk @@ -1,79 +1,35 @@ -############################################################# +################################################################################ # # newt # -############################################################# -NEWT_SOURCE=newt-0.51.0.tar.bz2 -NEWT_CAT:=$(BZCAT) -NEWT_SITE=http://www.uclibc.org/ -NEWT_DIR=$(BUILD_DIR)/newt-0.51.0 -NEWT_VERSION=0.51.0 -NEWT_CFLAGS=-Os -g -fPIC - -$(DL_DIR)/$(NEWT_SOURCE): - $(call DOWNLOAD,$(NEWT_SITE),$(NEWT_SOURCE)) - -$(NEWT_DIR)/.source: $(DL_DIR)/$(NEWT_SOURCE) - $(NEWT_CAT) $(DL_DIR)/$(NEWT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - touch $(NEWT_DIR)/.source - -$(NEWT_DIR)/.configured: $(NEWT_DIR)/.source - (cd $(NEWT_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - $(TARGET_CONFIGURE_ARGS) \ - CFLAGS="$(TARGET_CFLAGS) $(NEWT_CFLAGS)" \ - ./configure $(QUIET) \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libdir=/lib \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - $(DISABLE_NLS) \ - ) - touch $(NEWT_DIR)/.configured - -$(NEWT_DIR)/libnewt.so.$(NEWT_VERSION): $(NEWT_DIR)/.configured - $(MAKE) CFLAGS="$(TARGET_CFLAGS) $(NEWT_CFLAGS)" CC="$(TARGET_CC)" -C $(NEWT_DIR) - touch -c $@ - -$(STAGING_DIR)/usr/lib/libnewt.a: $(NEWT_DIR)/libnewt.so.$(NEWT_VERSION) - cp -a $(NEWT_DIR)/libnewt.a $(STAGING_DIR)/usr/lib/ - cp -a $(NEWT_DIR)/newt.h $(STAGING_DIR)/usr/include/ - cp -a $(NEWT_DIR)/libnewt.so* $(STAGING_DIR)/usr/lib/ - (cd $(STAGING_DIR)/usr/lib; ln -fs libnewt.so.$(NEWT_VERSION) libnewt.so) - (cd $(STAGING_DIR)/usr/lib; ln -fs libnewt.so.$(NEWT_VERSION) libnewt.so.0.51) - touch -c $@ - -$(TARGET_DIR)/usr/lib/libnewt.so.$(NEWT_VERSION): $(STAGING_DIR)/usr/lib/libnewt.a - cp -a $(STAGING_DIR)/usr/lib/libnewt.so* $(TARGET_DIR)/usr/lib/ - -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libnewt.so* - touch -c $@ - -newt: slang $(TARGET_DIR)/usr/lib/libnewt.so.$(NEWT_VERSION) - -newt-source: $(DL_DIR)/$(NEWT_SOURCE) - -newt-clean: - rm -f $(TARGET_DIR)/usr/lib/libnewt.so* - -$(MAKE) -C $(NEWT_DIR) clean - -newt-dirclean: slang-dirclean - rm -rf $(NEWT_DIR) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_NEWT),y) -TARGETS+=newt -endif +################################################################################ + +NEWT_VERSION = 0.51.0 +NEWT_SITE = http://www.uclibc.org/ +NEWT_SOURCE = newt-$(NEWT_VERSION).tar.bz2 +NEWT_LICENSE = GPLv2 +NEWT_LICENSE_FILES = COPYING +NEWT_INSTALL_STAGING = YES + +NEWT_DEPENDENCIES = slang + +NEWT_MAKE_ENV += $(TARGET_CONFIGURE_OPTS) +NEWT_MAKE = $(MAKE1) + +define NEWT_INSTALL_STAGING_CMDS + $(INSTALL) -D -m644 $(@D)/newt.h $(STAGING_DIR)/usr/include/newt.h + $(INSTALL) -D -m644 $(@D)/libnewt.a $(STAGING_DIR)/usr/lib/libnewt.a + $(INSTALL) -m755 $(@D)/libnewt.so* $(STAGING_DIR)/usr/lib/ + ln -fs libnewt.so.$(NEWT_VERSION) $(STAGING_DIR)/usr/lib/libnewt.so + ln -fs libnewt.so.$(NEWT_VERSION) $(STAGING_DIR)/usr/lib/libnewt.so.0.51 +endef + +define NEWT_INSTALL_TARGET_CMDS + $(INSTALL) -D -m644 $(@D)/newt.h $(TARGET_DIR)/usr/include/newt.h + $(INSTALL) -D -m644 $(@D)/libnewt.a $(TARGET_DIR)/usr/lib/libnewt.a + $(INSTALL) -m755 $(@D)/libnewt.so* $(TARGET_DIR)/usr/lib/ + ln -fs libnewt.so.$(NEWT_VERSION) $(TARGET_DIR)/usr/lib/libnewt.so + ln -fs libnewt.so.$(NEWT_VERSION) $(TARGET_DIR)/usr/lib/libnewt.so.0.51 +endef + +$(eval $(autotools-package)) diff --git a/package/nfacct/Config.in b/package/nfacct/Config.in new file mode 100644 index 0000000000..4230783a5a --- /dev/null +++ b/package/nfacct/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_NFACCT + bool "nfacct" + depends on BR2_LARGEFILE + select BR2_PACKAGE_LIBNETFILTER_ACCT + help + nfacct is the command line tool to create/retrieve/delete + netfilter accounting objects. + + http://www.netfilter.org/projects/nfacct/ + +comment "nfacct needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE diff --git a/package/nfacct/nfacct-01-uclinux.patch b/package/nfacct/nfacct-01-uclinux.patch new file mode 100644 index 0000000000..295a370b46 --- /dev/null +++ b/package/nfacct/nfacct-01-uclinux.patch @@ -0,0 +1,26 @@ +From da1a0c186232d1bca9c723bd47d11a6e3807ae29 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Tue, 10 Sep 2013 16:16:48 -0300 +Subject: [PATCH] configure: uclinux is also linux + +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 9679112..9a34bdc 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -15,7 +15,7 @@ AC_PROG_INSTALL + AC_PROG_LN_S + + case "$host" in +-*-*-linux*) ;; ++*-*-linux* | *-*-uclinux*) ;; + *) AC_MSG_ERROR([Linux only, dude!]);; + esac + +-- +1.8.1.5 + diff --git a/package/nfacct/nfacct.mk b/package/nfacct/nfacct.mk new file mode 100644 index 0000000000..7e42160957 --- /dev/null +++ b/package/nfacct/nfacct.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# nfacct +# +################################################################################ + +NFACCT_VERSION = 1.0.1 +NFACCT_SOURCE = nfacct-$(NFACCT_VERSION).tar.bz2 +NFACCT_SITE = http://www.netfilter.org/projects/nfacct/files +NFACCT_DEPENDENCIES = host-pkgconf \ + libnetfilter_acct +NFACCT_AUTORECONF = YES +NFACCT_LICENSE = GPLv2 +NFACCT_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/nfs-utils/Config.in b/package/nfs-utils/Config.in index 774395b574..3602a74f50 100644 --- a/package/nfs-utils/Config.in +++ b/package/nfs-utils/Config.in @@ -1,7 +1,9 @@ config BR2_PACKAGE_NFS_UTILS bool "nfs-utils" - depends on BR2_INET_RPC + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC || BR2_TOOLCHAIN_HAS_THREADS # libtirpc + select BR2_PACKAGE_LIBTIRPC if !BR2_TOOLCHAIN_HAS_NATIVE_RPC depends on BR2_LARGEFILE + depends on BR2_USE_MMU # fork() help The NFS Linux kernel server. Warning: We do not force largefile support on here on purpose. @@ -9,8 +11,10 @@ config BR2_PACKAGE_NFS_UTILS http://sourceforge.net/projects/nfs -comment "nfs-utils requires a toolchain with RPC and LARGEFILE support" - depends on !BR2_INET_RPC || !BR2_LARGEFILE +comment "nfs-utils needs a toolchain w/ largefile, threads" + depends on BR2_USE_MMU + depends on !BR2_LARGEFILE || \ + !(BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_HAS_NATIVE_RPC) menu "NFS utilities selection" depends on BR2_PACKAGE_NFS_UTILS diff --git a/package/nfs-utils/nfs-utils-0001-build-avoid-AM_CONDITIONAL-in-conditional-execution.patch b/package/nfs-utils/nfs-utils-0001-build-avoid-AM_CONDITIONAL-in-conditional-execution.patch new file mode 100644 index 0000000000..ba9ad420fa --- /dev/null +++ b/package/nfs-utils/nfs-utils-0001-build-avoid-AM_CONDITIONAL-in-conditional-execution.patch @@ -0,0 +1,57 @@ +From 2a44ed7558f981e15db58dcda799ff7cd3827a6e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= +Date: Thu, 17 May 2012 16:26:44 -0700 +Subject: [PATCH] build: avoid AM_CONDITIONAL in conditional execution. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Automake does not support conditional AM_CONDITIONAL calls; what that +means is that you always have to execute AM_CONDITIONAL one way or the +other. Both the libsqlite3.m4 file and the nfsdcld conditionals are +executed only when NFSv4 is enabled, which breaks building with +--disable-nfsv4. + +Remove the SQLite3 conditional altogether as it's never used, and move +the nfsdcld conditional outside of the conditional code. + +Signed-off-by: Diego Elio Pettenò +--- + aclocal/libsqlite3.m4 | 1 - + configure.ac | 3 +-- + 2 files changed, 1 insertion(+), 3 deletions(-) + +diff --git a/aclocal/libsqlite3.m4 b/aclocal/libsqlite3.m4 +index 73d1e46..8c38993 100644 +--- a/aclocal/libsqlite3.m4 ++++ b/aclocal/libsqlite3.m4 +@@ -29,5 +29,4 @@ AC_DEFUN([AC_SQLITE3_VERS], [ + LIBS="$saved_LIBS"]) + + AC_MSG_RESULT($libsqlite3_cv_is_recent) +- AM_CONDITIONAL(CONFIG_SQLITE3, [test "$libsqlite3_cv_is_recent" = "yes"]) + ])dnl +diff --git a/configure.ac b/configure.ac +index 9ba53e2..b408f1b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -278,8 +278,6 @@ if test "$enable_nfsv4" = yes; then + fi + fi + +- AM_CONDITIONAL(CONFIG_NFSDCLD, [test "$enable_nfsdcld" = "yes" ]) +- + dnl librpcsecgss already has a dependency on libgssapi, + dnl but we need to make sure we get the right version + if test "$enable_gss" = yes; then +@@ -293,6 +291,7 @@ if test "$enable_nfsv41" = yes; then + fi + + dnl enable nfsidmap when its support by libnfsidmap ++AM_CONDITIONAL(CONFIG_NFSDCLD, [test "$enable_nfsdcld" = "yes" ]) + AM_CONDITIONAL(CONFIG_NFSIDMAP, [test "$ac_cv_header_keyutils_h$ac_cv_lib_nfsidmap_nfs4_owner_to_uid" = "yesyes"]) + + +-- +1.7.9.5 + diff --git a/package/nfs-utils/nfs-utils-0002-Patch-taken-from-Gentoo.patch b/package/nfs-utils/nfs-utils-0002-Patch-taken-from-Gentoo.patch new file mode 100644 index 0000000000..e310c4977d --- /dev/null +++ b/package/nfs-utils/nfs-utils-0002-Patch-taken-from-Gentoo.patch @@ -0,0 +1,84 @@ +From 971389625c9602085d399d8ae7fc42b75efcfb7c Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Sat, 10 Nov 2012 18:56:12 +0100 +Subject: [PATCH] Patch taken from Gentoo + +Signed-off-by: Gustavo Zacarias +--- + tools/locktest/Makefile.am | 7 +++---- + tools/rpcdebug/Makefile.am | 7 +++---- + tools/rpcgen/Makefile.am | 8 +++----- + 3 files changed, 9 insertions(+), 13 deletions(-) + +diff --git a/tools/locktest/Makefile.am b/tools/locktest/Makefile.am +index 3156815..efe6fcd 100644 +--- a/tools/locktest/Makefile.am ++++ b/tools/locktest/Makefile.am +@@ -1,12 +1,11 @@ + ## Process this file with automake to produce Makefile.in + + CC=$(CC_FOR_BUILD) +-LIBTOOL = @LIBTOOL@ --tag=CC ++CFLAGS=$(CFLAGS_FOR_BUILD) ++CPPFLAGS=$(CPPFLAGS_FOR_BUILD) ++LDFLAGS=$(LDFLAGS_FOR_BUILD) + + noinst_PROGRAMS = testlk + testlk_SOURCES = testlk.c +-testlk_CFLAGS=$(CFLAGS_FOR_BUILD) +-testlk_CPPFLAGS=$(CPPFLAGS_FOR_BUILD) +-testlk_LDFLAGS=$(LDFLAGS_FOR_BUILD) + + MAINTAINERCLEANFILES = Makefile.in +diff --git a/tools/rpcdebug/Makefile.am b/tools/rpcdebug/Makefile.am +index 39b70c9..0056597 100644 +--- a/tools/rpcdebug/Makefile.am ++++ b/tools/rpcdebug/Makefile.am +@@ -1,15 +1,14 @@ + ## Process this file with automake to produce Makefile.in + + CC=$(CC_FOR_BUILD) +-LIBTOOL = @LIBTOOL@ --tag=CC ++CFLAGS=$(CFLAGS_FOR_BUILD) ++CPPFLAGS=$(CPPFLAGS_FOR_BUILD) ++LDFLAGS=$(LDFLAGS_FOR_BUILD) + + man8_MANS = rpcdebug.man + EXTRA_DIST = $(man8_MANS) + + sbin_PROGRAMS = rpcdebug + rpcdebug_SOURCES = rpcdebug.c +-rpcdebug_CFLAGS=$(CFLAGS_FOR_BUILD) +-rpcdebug_CPPFLAGS=$(CPPFLAGS_FOR_BUILD) -I$(top_srcdir)/support/include +-rpcdebug_LDFLAGS=$(LDFLAGS_FOR_BUILD) + + MAINTAINERCLEANFILES = Makefile.in +diff --git a/tools/rpcgen/Makefile.am b/tools/rpcgen/Makefile.am +index 8a9ec89..5a5b4d3 100644 +--- a/tools/rpcgen/Makefile.am ++++ b/tools/rpcgen/Makefile.am +@@ -1,7 +1,9 @@ + ## Process this file with automake to produce Makefile.in + + CC=$(CC_FOR_BUILD) +-LIBTOOL = @LIBTOOL@ --tag=CC ++CFLAGS=$(CFLAGS_FOR_BUILD) ++CPPFLAGS=$(CPPFLAGS_FOR_BUILD) ++LDFLAGS=$(LDFLAGS_FOR_BUILD) + + noinst_PROGRAMS = rpcgen + rpcgen_SOURCES = rpc_clntout.c rpc_cout.c rpc_hout.c rpc_main.c \ +@@ -9,10 +11,6 @@ rpcgen_SOURCES = rpc_clntout.c rpc_cout.c rpc_hout.c rpc_main.c \ + rpc_util.c rpc_sample.c rpc_output.h rpc_parse.h \ + rpc_scan.h rpc_util.h + +-rpcgen_CFLAGS=$(CFLAGS_FOR_BUILD) +-rpcgen_CPPLAGS=$(CPPFLAGS_FOR_BUILD) +-rpcgen_LDFLAGS=$(LDFLAGS_FOR_BUILD) +-rpcgen_LDADD=$(LIBTIRPC) + + MAINTAINERCLEANFILES = Makefile.in + +-- +1.7.9.5 + diff --git a/package/nfs-utils/nfs-utils-0003-Switch-legacy-index-in-favour-of-strchr.patch b/package/nfs-utils/nfs-utils-0003-Switch-legacy-index-in-favour-of-strchr.patch new file mode 100644 index 0000000000..82a6c43659 --- /dev/null +++ b/package/nfs-utils/nfs-utils-0003-Switch-legacy-index-in-favour-of-strchr.patch @@ -0,0 +1,73 @@ +From 636e78e4c9bc8be174805bde2f3ae7f940dc3d0e Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Sat, 10 Nov 2012 18:58:15 +0100 +Subject: [PATCH] Switch legacy index() in favour of strchr() Updated for + 1.2.6 from the previous patch by Frederik Pasch. + +Signed-off-by: Gustavo Zacarias +--- + support/nfs/nfs_mntent.c | 6 +++--- + utils/mount/error.c | 2 +- + utils/mountd/fsloc.c | 2 +- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/support/nfs/nfs_mntent.c b/support/nfs/nfs_mntent.c +index a2118a2..7496ed6 100644 +--- a/support/nfs/nfs_mntent.c ++++ b/support/nfs/nfs_mntent.c +@@ -9,7 +9,7 @@ + */ + + #include +-#include /* for index */ ++#include /* for strchr */ + #include /* for isdigit */ + #include /* for umask */ + #include /* for ftruncate */ +@@ -172,7 +172,7 @@ nfs_getmntent (mntFILE *mfp) { + return NULL; + + mfp->mntent_lineno++; +- s = index (buf, '\n'); ++ s = strchr (buf, '\n'); + if (s == NULL) { + /* Missing final newline? Otherwise extremely */ + /* long line - assume file was corrupted */ +@@ -180,7 +180,7 @@ nfs_getmntent (mntFILE *mfp) { + fprintf(stderr, _("[mntent]: warning: no final " + "newline at the end of %s\n"), + mfp->mntent_file); +- s = index (buf, 0); ++ s = strchr (buf, 0); + } else { + mfp->mntent_errs = 1; + goto err; +diff --git a/utils/mount/error.c b/utils/mount/error.c +index 83ad1d2..428deef 100644 +--- a/utils/mount/error.c ++++ b/utils/mount/error.c +@@ -62,7 +62,7 @@ static int rpc_strerror(int spos) + char *tmp; + + if (estr) { +- if ((ptr = index(estr, ':'))) ++ if ((ptr = strchr(estr, ':'))) + estr = ++ptr; + + tmp = &errbuf[spos]; +diff --git a/utils/mountd/fsloc.c b/utils/mountd/fsloc.c +index bc737d1..ddbe92f 100644 +--- a/utils/mountd/fsloc.c ++++ b/utils/mountd/fsloc.c +@@ -127,7 +127,7 @@ static struct servers *method_list(char *data) + bool v6esc = false; + + xlog(L_NOTICE, "method_list(%s)", data); +- for (ptr--, listsize=1; ptr; ptr=index(ptr, ':'), listsize++) ++ for (ptr--, listsize=1; ptr; ptr=strchr(ptr, ':'), listsize++) + ptr++; + list = malloc(listsize * sizeof(char *)); + copy = strdup(data); +-- +1.7.9.5 + diff --git a/package/nfs-utils/nfs-utils-0004-fix-build-with-uClibc.patch b/package/nfs-utils/nfs-utils-0004-fix-build-with-uClibc.patch new file mode 100644 index 0000000000..23da28f20c --- /dev/null +++ b/package/nfs-utils/nfs-utils-0004-fix-build-with-uClibc.patch @@ -0,0 +1,31 @@ +From ff82d4c89d6ca771dea06bbaa06ddf3fed760402 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Sat, 10 Nov 2012 18:58:48 +0100 +Subject: [PATCH] fix build with uClibc + +uClibc doesn't have/need libio.h, so don't include it from sockaddr.h + +Signed-off-by: Peter Korsgaard +--- + support/include/sockaddr.h | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/support/include/sockaddr.h b/support/include/sockaddr.h +index 9af2543..5eef2ec 100644 +--- a/support/include/sockaddr.h ++++ b/support/include/sockaddr.h +@@ -20,7 +20,10 @@ + #ifndef NFS_UTILS_SOCKADDR_H + #define NFS_UTILS_SOCKADDR_H + +-#include ++/* uClibc doesn't have/need libio.h */ ++#ifndef __UCLIBC__ ++#include ++#endif + #include + #include + #include +-- +1.7.9.5 + diff --git a/package/nfs-utils/nfs-utils-0005-Allow-usage-of-getrpcbynumber-when-getrpcbynumber_r-.patch b/package/nfs-utils/nfs-utils-0005-Allow-usage-of-getrpcbynumber-when-getrpcbynumber_r-.patch new file mode 100644 index 0000000000..7c9f3c38f6 --- /dev/null +++ b/package/nfs-utils/nfs-utils-0005-Allow-usage-of-getrpcbynumber-when-getrpcbynumber_r-.patch @@ -0,0 +1,70 @@ +From a4c15a4f9f49fd2ae5eee7eef54c67f4842952b2 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 10 Nov 2012 18:42:28 +0100 +Subject: [PATCH] Allow usage of getrpcbynumber() when getrpcbynumber_r() is + not available + +getrpcbynumber_r() is not implemented by libtirpc at the moment, only +the non-reentrant getrpcbynumber() is available. Since nfs-utils seems +to only be using getrpcbynumber_r() is a non multithreaded context, +using getrpcbynumber() should work just as well. + +We also take this opportunity to adjust the autoconf checks to verify +whether any of getrpcbynumber() or getrpcbynumber_r() is available, +and error out if none of them is available. + +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 8 ++++---- + support/nfs/svc_socket.c | 6 ++++++ + 2 files changed, 10 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index b408f1b..41216c9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -246,9 +246,6 @@ AC_CHECK_FUNC([connect], , + AC_CHECK_FUNC([getaddrinfo], , + [AC_MSG_ERROR([Function 'getaddrinfo' not found.])]) + +-AC_CHECK_FUNC([getrpcbynumber], , +- [AC_MSG_ERROR([Function 'getrpcbynumber' not found.])]) +- + AC_CHECK_FUNC([getservbyname], , + [AC_MSG_ERROR([Function 'getservbyname' not found.])]) + +@@ -393,8 +390,11 @@ AC_CHECK_FUNCS([alarm atexit dup2 fdatasync ftruncate getcwd \ + getnameinfo getrpcbyname getifaddrs \ + gettimeofday hasmntopt inet_ntoa innetgr memset mkdir pathconf \ + realpath rmdir select socket strcasecmp strchr strdup \ +- strerror strrchr strtol strtoul sigprocmask]) ++ strerror strrchr strtol strtoul sigprocmask getrpcbynumber getrpcbynumber_r]) + ++if test "$ac_cv_func_getrpcbynumber_r" != "yes" -a "$ac_cv_func_getrpcbynumber" != "yes"; then ++ AC_MSG_ERROR([Neither getrpcbynumber_r nor getrpcbynumber are available]) ++fi + + dnl ************************************************************* + dnl Check for data sizes +diff --git a/support/nfs/svc_socket.c b/support/nfs/svc_socket.c +index f56f310..61ccf5b 100644 +--- a/support/nfs/svc_socket.c ++++ b/support/nfs/svc_socket.c +@@ -42,8 +42,14 @@ int getservport(u_long number, const char *proto) + struct servent servbuf, *servp = NULL; + int ret; + ++#if HAVE_GETRPCBYNUMBER_R + ret = getrpcbynumber_r(number, &rpcbuf, rpcdata, sizeof rpcdata, + &rpcp); ++#else ++ rpcp = getrpcbynumber(number); ++ ret = 0; ++#endif ++ + if (ret == 0 && rpcp != NULL) { + /* First try name. */ + ret = getservbyname_r(rpcp->r_name, proto, &servbuf, servdata, +-- +1.7.9.5 + diff --git a/package/nfs-utils/nfs-utils-0006-Let-the-configure-script-find-getrpcbynumber-in-libt.patch b/package/nfs-utils/nfs-utils-0006-Let-the-configure-script-find-getrpcbynumber-in-libt.patch new file mode 100644 index 0000000000..1ca17b77e9 --- /dev/null +++ b/package/nfs-utils/nfs-utils-0006-Let-the-configure-script-find-getrpcbynumber-in-libt.patch @@ -0,0 +1,38 @@ +From 7ea7814a8b87a0faa50fb9f4a486bfd7a376f3fc Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 10 Nov 2012 18:53:03 +0100 +Subject: [PATCH] Let the configure script find getrpcbynumber in libtirpc + +The getrpcbynumber() function may not be available in the C library, +but only in the libtirpc library. Take this into account when checking +for the existence of getrpcbynumber() and getrpcbynumber_r(). + +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 41216c9..1bbecfa 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -390,7 +390,15 @@ AC_CHECK_FUNCS([alarm atexit dup2 fdatasync ftruncate getcwd \ + getnameinfo getrpcbyname getifaddrs \ + gettimeofday hasmntopt inet_ntoa innetgr memset mkdir pathconf \ + realpath rmdir select socket strcasecmp strchr strdup \ +- strerror strrchr strtol strtoul sigprocmask getrpcbynumber getrpcbynumber_r]) ++ strerror strrchr strtol strtoul sigprocmask]) ++ ++save_CFLAGS=$CFLAGS ++save_LIBS=$LIBS ++CFLAGS="$CFLAGS $AM_CPPFLAGS" ++LIBS="$LIBS $LIBTIRPC" ++AC_CHECK_FUNCS([getrpcbynumber getrpcbynumber_r]) ++CFLAGS=$save_CFLAGS ++LIBS=$save_LIBS + + if test "$ac_cv_func_getrpcbynumber_r" != "yes" -a "$ac_cv_func_getrpcbynumber" != "yes"; then + AC_MSG_ERROR([Neither getrpcbynumber_r nor getrpcbynumber are available]) +-- +1.7.9.5 + diff --git a/package/nfs-utils/nfs-utils-0007-sockaddr-h-needs-stddef-h-for-NULL.patch b/package/nfs-utils/nfs-utils-0007-sockaddr-h-needs-stddef-h-for-NULL.patch new file mode 100644 index 0000000000..8fcf1dded5 --- /dev/null +++ b/package/nfs-utils/nfs-utils-0007-sockaddr-h-needs-stddef-h-for-NULL.patch @@ -0,0 +1,19 @@ +[PATCH] sockaddr.h: needs stddef.h for NULL + +Signed-off-by: Peter Korsgaard +--- + support/include/sockaddr.h | 1 + + 1 file changed, 1 insertion(+) + +Index: nfs-utils-1.2.6/support/include/sockaddr.h +=================================================================== +--- nfs-utils-1.2.6.orig/support/include/sockaddr.h ++++ nfs-utils-1.2.6/support/include/sockaddr.h +@@ -25,6 +25,7 @@ + #include + #endif + #include ++#include + #include + #include + diff --git a/package/nfs-utils/nfs-utils-1.2.3-dont-mix-flags.patch b/package/nfs-utils/nfs-utils-1.2.3-dont-mix-flags.patch deleted file mode 100644 index b5ef5c7172..0000000000 --- a/package/nfs-utils/nfs-utils-1.2.3-dont-mix-flags.patch +++ /dev/null @@ -1,288 +0,0 @@ -[PATCH] don't mix build/target compiler/linker flags - -Build tools should only use CFLAGS_FOR_BUILD / LDFLAGS_FOR_BUILD, and -not the normal CFLAGS / LDFLAGS (which are used for target builds). - -Signed-off-by: Peter Korsgaard ---- - tools/locktest/Makefile.in | 12 +++--- - tools/rpcdebug/Makefile.in | 12 +++--- - tools/rpcgen/Makefile.in | 84 ++++++++++++++++++++++----------------------- - 3 files changed, 54 insertions(+), 54 deletions(-) - -Index: nfs-utils-1.2.3/tools/locktest/Makefile.in -=================================================================== ---- nfs-utils-1.2.3.orig/tools/locktest/Makefile.in -+++ nfs-utils-1.2.3/tools/locktest/Makefile.in -@@ -67,8 +67,8 @@ - testlk_OBJECTS = $(am_testlk_OBJECTS) - testlk_LDADD = $(LDADD) - testlk_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ -- --mode=link $(CCLD) $(testlk_CFLAGS) $(CFLAGS) \ -- $(testlk_LDFLAGS) $(LDFLAGS) -o $@ -+ --mode=link $(CCLD) $(testlk_CFLAGS) \ -+ $(testlk_LDFLAGS) -o $@ - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/support/include - depcomp = $(SHELL) $(top_srcdir)/depcomp - am__depfiles_maybe = depfiles -@@ -330,18 +330,18 @@ - @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - - testlk-testlk.o: testlk.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testlk_CPPFLAGS) $(CPPFLAGS) $(testlk_CFLAGS) $(CFLAGS) -MT testlk-testlk.o -MD -MP -MF $(DEPDIR)/testlk-testlk.Tpo -c -o testlk-testlk.o `test -f 'testlk.c' || echo '$(srcdir)/'`testlk.c -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testlk_CPPFLAGS) $(CPPFLAGS) $(testlk_CFLAGS) -MT testlk-testlk.o -MD -MP -MF $(DEPDIR)/testlk-testlk.Tpo -c -o testlk-testlk.o `test -f 'testlk.c' || echo '$(srcdir)/'`testlk.c - @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testlk-testlk.Tpo $(DEPDIR)/testlk-testlk.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testlk.c' object='testlk-testlk.o' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testlk_CPPFLAGS) $(CPPFLAGS) $(testlk_CFLAGS) $(CFLAGS) -c -o testlk-testlk.o `test -f 'testlk.c' || echo '$(srcdir)/'`testlk.c -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testlk_CPPFLAGS) $(CPPFLAGS) $(testlk_CFLAGS) -c -o testlk-testlk.o `test -f 'testlk.c' || echo '$(srcdir)/'`testlk.c - - testlk-testlk.obj: testlk.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testlk_CPPFLAGS) $(CPPFLAGS) $(testlk_CFLAGS) $(CFLAGS) -MT testlk-testlk.obj -MD -MP -MF $(DEPDIR)/testlk-testlk.Tpo -c -o testlk-testlk.obj `if test -f 'testlk.c'; then $(CYGPATH_W) 'testlk.c'; else $(CYGPATH_W) '$(srcdir)/testlk.c'; fi` -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testlk_CPPFLAGS) $(CPPFLAGS) $(testlk_CFLAGS) -MT testlk-testlk.obj -MD -MP -MF $(DEPDIR)/testlk-testlk.Tpo -c -o testlk-testlk.obj `if test -f 'testlk.c'; then $(CYGPATH_W) 'testlk.c'; else $(CYGPATH_W) '$(srcdir)/testlk.c'; fi` - @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testlk-testlk.Tpo $(DEPDIR)/testlk-testlk.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testlk.c' object='testlk-testlk.obj' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testlk_CPPFLAGS) $(CPPFLAGS) $(testlk_CFLAGS) $(CFLAGS) -c -o testlk-testlk.obj `if test -f 'testlk.c'; then $(CYGPATH_W) 'testlk.c'; else $(CYGPATH_W) '$(srcdir)/testlk.c'; fi` -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(testlk_CPPFLAGS) $(CPPFLAGS) $(testlk_CFLAGS) -c -o testlk-testlk.obj `if test -f 'testlk.c'; then $(CYGPATH_W) 'testlk.c'; else $(CYGPATH_W) '$(srcdir)/testlk.c'; fi` - - mostlyclean-libtool: - -rm -f *.lo -Index: nfs-utils-1.2.3/tools/rpcdebug/Makefile.in -=================================================================== ---- nfs-utils-1.2.3.orig/tools/rpcdebug/Makefile.in -+++ nfs-utils-1.2.3/tools/rpcdebug/Makefile.in -@@ -68,8 +68,8 @@ - rpcdebug_OBJECTS = $(am_rpcdebug_OBJECTS) - rpcdebug_LDADD = $(LDADD) - rpcdebug_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ -- --mode=link $(CCLD) $(rpcdebug_CFLAGS) $(CFLAGS) \ -- $(rpcdebug_LDFLAGS) $(LDFLAGS) -o $@ -+ --mode=link $(CCLD) $(rpcdebug_CFLAGS) \ -+ $(rpcdebug_LDFLAGS) -o $@ - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/support/include - depcomp = $(SHELL) $(top_srcdir)/depcomp - am__depfiles_maybe = depfiles -@@ -391,18 +391,18 @@ - @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - - rpcdebug-rpcdebug.o: rpcdebug.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rpcdebug_CPPFLAGS) $(CPPFLAGS) $(rpcdebug_CFLAGS) $(CFLAGS) -MT rpcdebug-rpcdebug.o -MD -MP -MF $(DEPDIR)/rpcdebug-rpcdebug.Tpo -c -o rpcdebug-rpcdebug.o `test -f 'rpcdebug.c' || echo '$(srcdir)/'`rpcdebug.c -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rpcdebug_CPPFLAGS) $(CPPFLAGS) $(rpcdebug_CFLAGS) -MT rpcdebug-rpcdebug.o -MD -MP -MF $(DEPDIR)/rpcdebug-rpcdebug.Tpo -c -o rpcdebug-rpcdebug.o `test -f 'rpcdebug.c' || echo '$(srcdir)/'`rpcdebug.c - @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/rpcdebug-rpcdebug.Tpo $(DEPDIR)/rpcdebug-rpcdebug.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpcdebug.c' object='rpcdebug-rpcdebug.o' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rpcdebug_CPPFLAGS) $(CPPFLAGS) $(rpcdebug_CFLAGS) $(CFLAGS) -c -o rpcdebug-rpcdebug.o `test -f 'rpcdebug.c' || echo '$(srcdir)/'`rpcdebug.c -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rpcdebug_CPPFLAGS) $(CPPFLAGS) $(rpcdebug_CFLAGS) -c -o rpcdebug-rpcdebug.o `test -f 'rpcdebug.c' || echo '$(srcdir)/'`rpcdebug.c - - rpcdebug-rpcdebug.obj: rpcdebug.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rpcdebug_CPPFLAGS) $(CPPFLAGS) $(rpcdebug_CFLAGS) $(CFLAGS) -MT rpcdebug-rpcdebug.obj -MD -MP -MF $(DEPDIR)/rpcdebug-rpcdebug.Tpo -c -o rpcdebug-rpcdebug.obj `if test -f 'rpcdebug.c'; then $(CYGPATH_W) 'rpcdebug.c'; else $(CYGPATH_W) '$(srcdir)/rpcdebug.c'; fi` -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rpcdebug_CPPFLAGS) $(CPPFLAGS) $(rpcdebug_CFLAGS) -MT rpcdebug-rpcdebug.obj -MD -MP -MF $(DEPDIR)/rpcdebug-rpcdebug.Tpo -c -o rpcdebug-rpcdebug.obj `if test -f 'rpcdebug.c'; then $(CYGPATH_W) 'rpcdebug.c'; else $(CYGPATH_W) '$(srcdir)/rpcdebug.c'; fi` - @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/rpcdebug-rpcdebug.Tpo $(DEPDIR)/rpcdebug-rpcdebug.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpcdebug.c' object='rpcdebug-rpcdebug.obj' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rpcdebug_CPPFLAGS) $(CPPFLAGS) $(rpcdebug_CFLAGS) $(CFLAGS) -c -o rpcdebug-rpcdebug.obj `if test -f 'rpcdebug.c'; then $(CYGPATH_W) 'rpcdebug.c'; else $(CYGPATH_W) '$(srcdir)/rpcdebug.c'; fi` -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rpcdebug_CPPFLAGS) $(CPPFLAGS) $(rpcdebug_CFLAGS) -c -o rpcdebug-rpcdebug.obj `if test -f 'rpcdebug.c'; then $(CYGPATH_W) 'rpcdebug.c'; else $(CYGPATH_W) '$(srcdir)/rpcdebug.c'; fi` - - mostlyclean-libtool: - -rm -f *.lo -Index: nfs-utils-1.2.3/tools/rpcgen/Makefile.in -=================================================================== ---- nfs-utils-1.2.3.orig/tools/rpcgen/Makefile.in -+++ nfs-utils-1.2.3/tools/rpcgen/Makefile.in -@@ -72,8 +72,8 @@ - rpcgen_OBJECTS = $(am_rpcgen_OBJECTS) - rpcgen_LDADD = $(LDADD) - rpcgen_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ -- --mode=link $(CCLD) $(rpcgen_CFLAGS) $(CFLAGS) \ -- $(rpcgen_LDFLAGS) $(LDFLAGS) -o $@ -+ --mode=link $(CCLD) $(rpcgen_CFLAGS) \ -+ $(rpcgen_LDFLAGS) -o $@ - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/support/include - depcomp = $(SHELL) $(top_srcdir)/depcomp - am__depfiles_maybe = depfiles -@@ -349,144 +349,144 @@ - @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - - rpcgen-rpc_clntout.o: rpc_clntout.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -MT rpcgen-rpc_clntout.o -MD -MP -MF $(DEPDIR)/rpcgen-rpc_clntout.Tpo -c -o rpcgen-rpc_clntout.o `test -f 'rpc_clntout.c' || echo '$(srcdir)/'`rpc_clntout.c -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -MT rpcgen-rpc_clntout.o -MD -MP -MF $(DEPDIR)/rpcgen-rpc_clntout.Tpo -c -o rpcgen-rpc_clntout.o `test -f 'rpc_clntout.c' || echo '$(srcdir)/'`rpc_clntout.c - @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/rpcgen-rpc_clntout.Tpo $(DEPDIR)/rpcgen-rpc_clntout.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpc_clntout.c' object='rpcgen-rpc_clntout.o' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -c -o rpcgen-rpc_clntout.o `test -f 'rpc_clntout.c' || echo '$(srcdir)/'`rpc_clntout.c -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -c -o rpcgen-rpc_clntout.o `test -f 'rpc_clntout.c' || echo '$(srcdir)/'`rpc_clntout.c - - rpcgen-rpc_clntout.obj: rpc_clntout.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -MT rpcgen-rpc_clntout.obj -MD -MP -MF $(DEPDIR)/rpcgen-rpc_clntout.Tpo -c -o rpcgen-rpc_clntout.obj `if test -f 'rpc_clntout.c'; then $(CYGPATH_W) 'rpc_clntout.c'; else $(CYGPATH_W) '$(srcdir)/rpc_clntout.c'; fi` -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -MT rpcgen-rpc_clntout.obj -MD -MP -MF $(DEPDIR)/rpcgen-rpc_clntout.Tpo -c -o rpcgen-rpc_clntout.obj `if test -f 'rpc_clntout.c'; then $(CYGPATH_W) 'rpc_clntout.c'; else $(CYGPATH_W) '$(srcdir)/rpc_clntout.c'; fi` - @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/rpcgen-rpc_clntout.Tpo $(DEPDIR)/rpcgen-rpc_clntout.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpc_clntout.c' object='rpcgen-rpc_clntout.obj' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -c -o rpcgen-rpc_clntout.obj `if test -f 'rpc_clntout.c'; then $(CYGPATH_W) 'rpc_clntout.c'; else $(CYGPATH_W) '$(srcdir)/rpc_clntout.c'; fi` -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -c -o rpcgen-rpc_clntout.obj `if test -f 'rpc_clntout.c'; then $(CYGPATH_W) 'rpc_clntout.c'; else $(CYGPATH_W) '$(srcdir)/rpc_clntout.c'; fi` - - rpcgen-rpc_cout.o: rpc_cout.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -MT rpcgen-rpc_cout.o -MD -MP -MF $(DEPDIR)/rpcgen-rpc_cout.Tpo -c -o rpcgen-rpc_cout.o `test -f 'rpc_cout.c' || echo '$(srcdir)/'`rpc_cout.c -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -MT rpcgen-rpc_cout.o -MD -MP -MF $(DEPDIR)/rpcgen-rpc_cout.Tpo -c -o rpcgen-rpc_cout.o `test -f 'rpc_cout.c' || echo '$(srcdir)/'`rpc_cout.c - @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/rpcgen-rpc_cout.Tpo $(DEPDIR)/rpcgen-rpc_cout.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpc_cout.c' object='rpcgen-rpc_cout.o' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -c -o rpcgen-rpc_cout.o `test -f 'rpc_cout.c' || echo '$(srcdir)/'`rpc_cout.c -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -c -o rpcgen-rpc_cout.o `test -f 'rpc_cout.c' || echo '$(srcdir)/'`rpc_cout.c - - rpcgen-rpc_cout.obj: rpc_cout.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -MT rpcgen-rpc_cout.obj -MD -MP -MF $(DEPDIR)/rpcgen-rpc_cout.Tpo -c -o rpcgen-rpc_cout.obj `if test -f 'rpc_cout.c'; then $(CYGPATH_W) 'rpc_cout.c'; else $(CYGPATH_W) '$(srcdir)/rpc_cout.c'; fi` -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -MT rpcgen-rpc_cout.obj -MD -MP -MF $(DEPDIR)/rpcgen-rpc_cout.Tpo -c -o rpcgen-rpc_cout.obj `if test -f 'rpc_cout.c'; then $(CYGPATH_W) 'rpc_cout.c'; else $(CYGPATH_W) '$(srcdir)/rpc_cout.c'; fi` - @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/rpcgen-rpc_cout.Tpo $(DEPDIR)/rpcgen-rpc_cout.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpc_cout.c' object='rpcgen-rpc_cout.obj' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -c -o rpcgen-rpc_cout.obj `if test -f 'rpc_cout.c'; then $(CYGPATH_W) 'rpc_cout.c'; else $(CYGPATH_W) '$(srcdir)/rpc_cout.c'; fi` -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -c -o rpcgen-rpc_cout.obj `if test -f 'rpc_cout.c'; then $(CYGPATH_W) 'rpc_cout.c'; else $(CYGPATH_W) '$(srcdir)/rpc_cout.c'; fi` - - rpcgen-rpc_hout.o: rpc_hout.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -MT rpcgen-rpc_hout.o -MD -MP -MF $(DEPDIR)/rpcgen-rpc_hout.Tpo -c -o rpcgen-rpc_hout.o `test -f 'rpc_hout.c' || echo '$(srcdir)/'`rpc_hout.c -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -MT rpcgen-rpc_hout.o -MD -MP -MF $(DEPDIR)/rpcgen-rpc_hout.Tpo -c -o rpcgen-rpc_hout.o `test -f 'rpc_hout.c' || echo '$(srcdir)/'`rpc_hout.c - @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/rpcgen-rpc_hout.Tpo $(DEPDIR)/rpcgen-rpc_hout.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpc_hout.c' object='rpcgen-rpc_hout.o' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -c -o rpcgen-rpc_hout.o `test -f 'rpc_hout.c' || echo '$(srcdir)/'`rpc_hout.c -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -c -o rpcgen-rpc_hout.o `test -f 'rpc_hout.c' || echo '$(srcdir)/'`rpc_hout.c - - rpcgen-rpc_hout.obj: rpc_hout.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -MT rpcgen-rpc_hout.obj -MD -MP -MF $(DEPDIR)/rpcgen-rpc_hout.Tpo -c -o rpcgen-rpc_hout.obj `if test -f 'rpc_hout.c'; then $(CYGPATH_W) 'rpc_hout.c'; else $(CYGPATH_W) '$(srcdir)/rpc_hout.c'; fi` -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -MT rpcgen-rpc_hout.obj -MD -MP -MF $(DEPDIR)/rpcgen-rpc_hout.Tpo -c -o rpcgen-rpc_hout.obj `if test -f 'rpc_hout.c'; then $(CYGPATH_W) 'rpc_hout.c'; else $(CYGPATH_W) '$(srcdir)/rpc_hout.c'; fi` - @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/rpcgen-rpc_hout.Tpo $(DEPDIR)/rpcgen-rpc_hout.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpc_hout.c' object='rpcgen-rpc_hout.obj' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -c -o rpcgen-rpc_hout.obj `if test -f 'rpc_hout.c'; then $(CYGPATH_W) 'rpc_hout.c'; else $(CYGPATH_W) '$(srcdir)/rpc_hout.c'; fi` -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -c -o rpcgen-rpc_hout.obj `if test -f 'rpc_hout.c'; then $(CYGPATH_W) 'rpc_hout.c'; else $(CYGPATH_W) '$(srcdir)/rpc_hout.c'; fi` - - rpcgen-rpc_main.o: rpc_main.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -MT rpcgen-rpc_main.o -MD -MP -MF $(DEPDIR)/rpcgen-rpc_main.Tpo -c -o rpcgen-rpc_main.o `test -f 'rpc_main.c' || echo '$(srcdir)/'`rpc_main.c -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -MT rpcgen-rpc_main.o -MD -MP -MF $(DEPDIR)/rpcgen-rpc_main.Tpo -c -o rpcgen-rpc_main.o `test -f 'rpc_main.c' || echo '$(srcdir)/'`rpc_main.c - @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/rpcgen-rpc_main.Tpo $(DEPDIR)/rpcgen-rpc_main.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpc_main.c' object='rpcgen-rpc_main.o' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -c -o rpcgen-rpc_main.o `test -f 'rpc_main.c' || echo '$(srcdir)/'`rpc_main.c -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -c -o rpcgen-rpc_main.o `test -f 'rpc_main.c' || echo '$(srcdir)/'`rpc_main.c - - rpcgen-rpc_main.obj: rpc_main.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -MT rpcgen-rpc_main.obj -MD -MP -MF $(DEPDIR)/rpcgen-rpc_main.Tpo -c -o rpcgen-rpc_main.obj `if test -f 'rpc_main.c'; then $(CYGPATH_W) 'rpc_main.c'; else $(CYGPATH_W) '$(srcdir)/rpc_main.c'; fi` -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -MT rpcgen-rpc_main.obj -MD -MP -MF $(DEPDIR)/rpcgen-rpc_main.Tpo -c -o rpcgen-rpc_main.obj `if test -f 'rpc_main.c'; then $(CYGPATH_W) 'rpc_main.c'; else $(CYGPATH_W) '$(srcdir)/rpc_main.c'; fi` - @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/rpcgen-rpc_main.Tpo $(DEPDIR)/rpcgen-rpc_main.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpc_main.c' object='rpcgen-rpc_main.obj' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -c -o rpcgen-rpc_main.obj `if test -f 'rpc_main.c'; then $(CYGPATH_W) 'rpc_main.c'; else $(CYGPATH_W) '$(srcdir)/rpc_main.c'; fi` -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -c -o rpcgen-rpc_main.obj `if test -f 'rpc_main.c'; then $(CYGPATH_W) 'rpc_main.c'; else $(CYGPATH_W) '$(srcdir)/rpc_main.c'; fi` - - rpcgen-rpc_parse.o: rpc_parse.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -MT rpcgen-rpc_parse.o -MD -MP -MF $(DEPDIR)/rpcgen-rpc_parse.Tpo -c -o rpcgen-rpc_parse.o `test -f 'rpc_parse.c' || echo '$(srcdir)/'`rpc_parse.c -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -MT rpcgen-rpc_parse.o -MD -MP -MF $(DEPDIR)/rpcgen-rpc_parse.Tpo -c -o rpcgen-rpc_parse.o `test -f 'rpc_parse.c' || echo '$(srcdir)/'`rpc_parse.c - @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/rpcgen-rpc_parse.Tpo $(DEPDIR)/rpcgen-rpc_parse.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpc_parse.c' object='rpcgen-rpc_parse.o' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -c -o rpcgen-rpc_parse.o `test -f 'rpc_parse.c' || echo '$(srcdir)/'`rpc_parse.c -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -c -o rpcgen-rpc_parse.o `test -f 'rpc_parse.c' || echo '$(srcdir)/'`rpc_parse.c - - rpcgen-rpc_parse.obj: rpc_parse.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -MT rpcgen-rpc_parse.obj -MD -MP -MF $(DEPDIR)/rpcgen-rpc_parse.Tpo -c -o rpcgen-rpc_parse.obj `if test -f 'rpc_parse.c'; then $(CYGPATH_W) 'rpc_parse.c'; else $(CYGPATH_W) '$(srcdir)/rpc_parse.c'; fi` -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -MT rpcgen-rpc_parse.obj -MD -MP -MF $(DEPDIR)/rpcgen-rpc_parse.Tpo -c -o rpcgen-rpc_parse.obj `if test -f 'rpc_parse.c'; then $(CYGPATH_W) 'rpc_parse.c'; else $(CYGPATH_W) '$(srcdir)/rpc_parse.c'; fi` - @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/rpcgen-rpc_parse.Tpo $(DEPDIR)/rpcgen-rpc_parse.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpc_parse.c' object='rpcgen-rpc_parse.obj' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -c -o rpcgen-rpc_parse.obj `if test -f 'rpc_parse.c'; then $(CYGPATH_W) 'rpc_parse.c'; else $(CYGPATH_W) '$(srcdir)/rpc_parse.c'; fi` -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -c -o rpcgen-rpc_parse.obj `if test -f 'rpc_parse.c'; then $(CYGPATH_W) 'rpc_parse.c'; else $(CYGPATH_W) '$(srcdir)/rpc_parse.c'; fi` - - rpcgen-rpc_scan.o: rpc_scan.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -MT rpcgen-rpc_scan.o -MD -MP -MF $(DEPDIR)/rpcgen-rpc_scan.Tpo -c -o rpcgen-rpc_scan.o `test -f 'rpc_scan.c' || echo '$(srcdir)/'`rpc_scan.c -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -MT rpcgen-rpc_scan.o -MD -MP -MF $(DEPDIR)/rpcgen-rpc_scan.Tpo -c -o rpcgen-rpc_scan.o `test -f 'rpc_scan.c' || echo '$(srcdir)/'`rpc_scan.c - @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/rpcgen-rpc_scan.Tpo $(DEPDIR)/rpcgen-rpc_scan.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpc_scan.c' object='rpcgen-rpc_scan.o' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -c -o rpcgen-rpc_scan.o `test -f 'rpc_scan.c' || echo '$(srcdir)/'`rpc_scan.c -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -c -o rpcgen-rpc_scan.o `test -f 'rpc_scan.c' || echo '$(srcdir)/'`rpc_scan.c - - rpcgen-rpc_scan.obj: rpc_scan.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -MT rpcgen-rpc_scan.obj -MD -MP -MF $(DEPDIR)/rpcgen-rpc_scan.Tpo -c -o rpcgen-rpc_scan.obj `if test -f 'rpc_scan.c'; then $(CYGPATH_W) 'rpc_scan.c'; else $(CYGPATH_W) '$(srcdir)/rpc_scan.c'; fi` -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -MT rpcgen-rpc_scan.obj -MD -MP -MF $(DEPDIR)/rpcgen-rpc_scan.Tpo -c -o rpcgen-rpc_scan.obj `if test -f 'rpc_scan.c'; then $(CYGPATH_W) 'rpc_scan.c'; else $(CYGPATH_W) '$(srcdir)/rpc_scan.c'; fi` - @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/rpcgen-rpc_scan.Tpo $(DEPDIR)/rpcgen-rpc_scan.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpc_scan.c' object='rpcgen-rpc_scan.obj' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -c -o rpcgen-rpc_scan.obj `if test -f 'rpc_scan.c'; then $(CYGPATH_W) 'rpc_scan.c'; else $(CYGPATH_W) '$(srcdir)/rpc_scan.c'; fi` -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -c -o rpcgen-rpc_scan.obj `if test -f 'rpc_scan.c'; then $(CYGPATH_W) 'rpc_scan.c'; else $(CYGPATH_W) '$(srcdir)/rpc_scan.c'; fi` - - rpcgen-rpc_svcout.o: rpc_svcout.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -MT rpcgen-rpc_svcout.o -MD -MP -MF $(DEPDIR)/rpcgen-rpc_svcout.Tpo -c -o rpcgen-rpc_svcout.o `test -f 'rpc_svcout.c' || echo '$(srcdir)/'`rpc_svcout.c -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -MT rpcgen-rpc_svcout.o -MD -MP -MF $(DEPDIR)/rpcgen-rpc_svcout.Tpo -c -o rpcgen-rpc_svcout.o `test -f 'rpc_svcout.c' || echo '$(srcdir)/'`rpc_svcout.c - @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/rpcgen-rpc_svcout.Tpo $(DEPDIR)/rpcgen-rpc_svcout.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpc_svcout.c' object='rpcgen-rpc_svcout.o' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -c -o rpcgen-rpc_svcout.o `test -f 'rpc_svcout.c' || echo '$(srcdir)/'`rpc_svcout.c -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -c -o rpcgen-rpc_svcout.o `test -f 'rpc_svcout.c' || echo '$(srcdir)/'`rpc_svcout.c - - rpcgen-rpc_svcout.obj: rpc_svcout.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -MT rpcgen-rpc_svcout.obj -MD -MP -MF $(DEPDIR)/rpcgen-rpc_svcout.Tpo -c -o rpcgen-rpc_svcout.obj `if test -f 'rpc_svcout.c'; then $(CYGPATH_W) 'rpc_svcout.c'; else $(CYGPATH_W) '$(srcdir)/rpc_svcout.c'; fi` -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -MT rpcgen-rpc_svcout.obj -MD -MP -MF $(DEPDIR)/rpcgen-rpc_svcout.Tpo -c -o rpcgen-rpc_svcout.obj `if test -f 'rpc_svcout.c'; then $(CYGPATH_W) 'rpc_svcout.c'; else $(CYGPATH_W) '$(srcdir)/rpc_svcout.c'; fi` - @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/rpcgen-rpc_svcout.Tpo $(DEPDIR)/rpcgen-rpc_svcout.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpc_svcout.c' object='rpcgen-rpc_svcout.obj' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -c -o rpcgen-rpc_svcout.obj `if test -f 'rpc_svcout.c'; then $(CYGPATH_W) 'rpc_svcout.c'; else $(CYGPATH_W) '$(srcdir)/rpc_svcout.c'; fi` -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -c -o rpcgen-rpc_svcout.obj `if test -f 'rpc_svcout.c'; then $(CYGPATH_W) 'rpc_svcout.c'; else $(CYGPATH_W) '$(srcdir)/rpc_svcout.c'; fi` - - rpcgen-rpc_tblout.o: rpc_tblout.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -MT rpcgen-rpc_tblout.o -MD -MP -MF $(DEPDIR)/rpcgen-rpc_tblout.Tpo -c -o rpcgen-rpc_tblout.o `test -f 'rpc_tblout.c' || echo '$(srcdir)/'`rpc_tblout.c -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -MT rpcgen-rpc_tblout.o -MD -MP -MF $(DEPDIR)/rpcgen-rpc_tblout.Tpo -c -o rpcgen-rpc_tblout.o `test -f 'rpc_tblout.c' || echo '$(srcdir)/'`rpc_tblout.c - @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/rpcgen-rpc_tblout.Tpo $(DEPDIR)/rpcgen-rpc_tblout.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpc_tblout.c' object='rpcgen-rpc_tblout.o' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -c -o rpcgen-rpc_tblout.o `test -f 'rpc_tblout.c' || echo '$(srcdir)/'`rpc_tblout.c -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -c -o rpcgen-rpc_tblout.o `test -f 'rpc_tblout.c' || echo '$(srcdir)/'`rpc_tblout.c - - rpcgen-rpc_tblout.obj: rpc_tblout.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -MT rpcgen-rpc_tblout.obj -MD -MP -MF $(DEPDIR)/rpcgen-rpc_tblout.Tpo -c -o rpcgen-rpc_tblout.obj `if test -f 'rpc_tblout.c'; then $(CYGPATH_W) 'rpc_tblout.c'; else $(CYGPATH_W) '$(srcdir)/rpc_tblout.c'; fi` -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -MT rpcgen-rpc_tblout.obj -MD -MP -MF $(DEPDIR)/rpcgen-rpc_tblout.Tpo -c -o rpcgen-rpc_tblout.obj `if test -f 'rpc_tblout.c'; then $(CYGPATH_W) 'rpc_tblout.c'; else $(CYGPATH_W) '$(srcdir)/rpc_tblout.c'; fi` - @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/rpcgen-rpc_tblout.Tpo $(DEPDIR)/rpcgen-rpc_tblout.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpc_tblout.c' object='rpcgen-rpc_tblout.obj' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -c -o rpcgen-rpc_tblout.obj `if test -f 'rpc_tblout.c'; then $(CYGPATH_W) 'rpc_tblout.c'; else $(CYGPATH_W) '$(srcdir)/rpc_tblout.c'; fi` -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -c -o rpcgen-rpc_tblout.obj `if test -f 'rpc_tblout.c'; then $(CYGPATH_W) 'rpc_tblout.c'; else $(CYGPATH_W) '$(srcdir)/rpc_tblout.c'; fi` - - rpcgen-rpc_util.o: rpc_util.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -MT rpcgen-rpc_util.o -MD -MP -MF $(DEPDIR)/rpcgen-rpc_util.Tpo -c -o rpcgen-rpc_util.o `test -f 'rpc_util.c' || echo '$(srcdir)/'`rpc_util.c -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -MT rpcgen-rpc_util.o -MD -MP -MF $(DEPDIR)/rpcgen-rpc_util.Tpo -c -o rpcgen-rpc_util.o `test -f 'rpc_util.c' || echo '$(srcdir)/'`rpc_util.c - @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/rpcgen-rpc_util.Tpo $(DEPDIR)/rpcgen-rpc_util.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpc_util.c' object='rpcgen-rpc_util.o' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -c -o rpcgen-rpc_util.o `test -f 'rpc_util.c' || echo '$(srcdir)/'`rpc_util.c -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -c -o rpcgen-rpc_util.o `test -f 'rpc_util.c' || echo '$(srcdir)/'`rpc_util.c - - rpcgen-rpc_util.obj: rpc_util.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -MT rpcgen-rpc_util.obj -MD -MP -MF $(DEPDIR)/rpcgen-rpc_util.Tpo -c -o rpcgen-rpc_util.obj `if test -f 'rpc_util.c'; then $(CYGPATH_W) 'rpc_util.c'; else $(CYGPATH_W) '$(srcdir)/rpc_util.c'; fi` -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -MT rpcgen-rpc_util.obj -MD -MP -MF $(DEPDIR)/rpcgen-rpc_util.Tpo -c -o rpcgen-rpc_util.obj `if test -f 'rpc_util.c'; then $(CYGPATH_W) 'rpc_util.c'; else $(CYGPATH_W) '$(srcdir)/rpc_util.c'; fi` - @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/rpcgen-rpc_util.Tpo $(DEPDIR)/rpcgen-rpc_util.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpc_util.c' object='rpcgen-rpc_util.obj' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -c -o rpcgen-rpc_util.obj `if test -f 'rpc_util.c'; then $(CYGPATH_W) 'rpc_util.c'; else $(CYGPATH_W) '$(srcdir)/rpc_util.c'; fi` -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -c -o rpcgen-rpc_util.obj `if test -f 'rpc_util.c'; then $(CYGPATH_W) 'rpc_util.c'; else $(CYGPATH_W) '$(srcdir)/rpc_util.c'; fi` - - rpcgen-rpc_sample.o: rpc_sample.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -MT rpcgen-rpc_sample.o -MD -MP -MF $(DEPDIR)/rpcgen-rpc_sample.Tpo -c -o rpcgen-rpc_sample.o `test -f 'rpc_sample.c' || echo '$(srcdir)/'`rpc_sample.c -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -MT rpcgen-rpc_sample.o -MD -MP -MF $(DEPDIR)/rpcgen-rpc_sample.Tpo -c -o rpcgen-rpc_sample.o `test -f 'rpc_sample.c' || echo '$(srcdir)/'`rpc_sample.c - @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/rpcgen-rpc_sample.Tpo $(DEPDIR)/rpcgen-rpc_sample.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpc_sample.c' object='rpcgen-rpc_sample.o' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -c -o rpcgen-rpc_sample.o `test -f 'rpc_sample.c' || echo '$(srcdir)/'`rpc_sample.c -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -c -o rpcgen-rpc_sample.o `test -f 'rpc_sample.c' || echo '$(srcdir)/'`rpc_sample.c - - rpcgen-rpc_sample.obj: rpc_sample.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -MT rpcgen-rpc_sample.obj -MD -MP -MF $(DEPDIR)/rpcgen-rpc_sample.Tpo -c -o rpcgen-rpc_sample.obj `if test -f 'rpc_sample.c'; then $(CYGPATH_W) 'rpc_sample.c'; else $(CYGPATH_W) '$(srcdir)/rpc_sample.c'; fi` -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -MT rpcgen-rpc_sample.obj -MD -MP -MF $(DEPDIR)/rpcgen-rpc_sample.Tpo -c -o rpcgen-rpc_sample.obj `if test -f 'rpc_sample.c'; then $(CYGPATH_W) 'rpc_sample.c'; else $(CYGPATH_W) '$(srcdir)/rpc_sample.c'; fi` - @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/rpcgen-rpc_sample.Tpo $(DEPDIR)/rpcgen-rpc_sample.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpc_sample.c' object='rpcgen-rpc_sample.obj' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) $(CFLAGS) -c -o rpcgen-rpc_sample.obj `if test -f 'rpc_sample.c'; then $(CYGPATH_W) 'rpc_sample.c'; else $(CYGPATH_W) '$(srcdir)/rpc_sample.c'; fi` -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rpcgen_CFLAGS) -c -o rpcgen-rpc_sample.obj `if test -f 'rpc_sample.c'; then $(CYGPATH_W) 'rpc_sample.c'; else $(CYGPATH_W) '$(srcdir)/rpc_sample.c'; fi` - - mostlyclean-libtool: - -rm -f *.lo diff --git a/package/nfs-utils/nfs-utils-1.2.3-uclibc-libio.h.patch b/package/nfs-utils/nfs-utils-1.2.3-uclibc-libio.h.patch deleted file mode 100644 index 589b96f7a4..0000000000 --- a/package/nfs-utils/nfs-utils-1.2.3-uclibc-libio.h.patch +++ /dev/null @@ -1,25 +0,0 @@ -[PATCH] fix build with uClibc - -uClibc doesn't have/need libio.h, so don't include it from sockaddr.h - -Signed-off-by: Peter Korsgaard ---- - support/include/sockaddr.h | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -Index: nfs-utils-1.2.3/support/include/sockaddr.h -=================================================================== ---- nfs-utils-1.2.3.orig/support/include/sockaddr.h -+++ nfs-utils-1.2.3/support/include/sockaddr.h -@@ -20,7 +20,10 @@ - #ifndef NFS_UTILS_SOCKADDR_H - #define NFS_UTILS_SOCKADDR_H - --#include -+/* uClibc doesn't have/need libio.h */ -+#ifndef __UCLIBC__ -+#include -+#endif - #include - #include - #include diff --git a/package/nfs-utils/nfs-utils.mk b/package/nfs-utils/nfs-utils.mk index 382676cc38..76face5369 100644 --- a/package/nfs-utils/nfs-utils.mk +++ b/package/nfs-utils/nfs-utils.mk @@ -1,19 +1,23 @@ -############################################################# +################################################################################ # # nfs-utils # -############################################################# -NFS_UTILS_VERSION = 1.2.3 +################################################################################ + +NFS_UTILS_VERSION = 1.2.6 NFS_UTILS_SOURCE = nfs-utils-$(NFS_UTILS_VERSION).tar.bz2 -NFS_UTILS_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/nfs/ +NFS_UTILS_SITE = http://downloads.sourceforge.net/project/nfs/nfs-utils/$(NFS_UTILS_VERSION) +NFS_UTILS_AUTORECONF = YES +NFS_UTILS_DEPENDENCIES = host-pkgconf NFS_UTILS_CONF_ENV = knfsd_cv_bsd_signals=no NFS_UTILS_CONF_OPT = \ --disable-nfsv4 \ + --disable-nfsv41 \ --disable-gss \ - --disable-tirpc \ --disable-uuid \ + --disable-ipv6 \ --without-tcp-wrappers \ --with-rpcgen=internal @@ -21,12 +25,26 @@ NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPCDEBUG) += usr/sbin/rpcdebug NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPC_LOCKD) += usr/sbin/rpc.lockd NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPC_RQUOTAD) += usr/sbin/rpc.rquotad +ifeq ($(BR2_PACKAGE_LIBTIRPC),y) +NFS_UTILS_CONF_OPT += --enable-tirpc --with-tirpcinclude=$(STAGING_DIR)/usr/include/tirpc/ +NFS_UTILS_DEPENDENCIES += libtirpc +else +NFS_UTILS_CONF_OPT += --disable-tirpc +endif + define NFS_UTILS_INSTALL_FIXUP $(INSTALL) -m 0755 package/nfs-utils/S60nfs \ $(TARGET_DIR)/etc/init.d/S60nfs rm -f $(NFS_UTILS_TARGETS_) endef +define NFS_UTILS_REMOVE_NFSIOSTAT + rm -f $(TARGET_DIR)/usr/sbin/nfsiostat +endef + NFS_UTILS_POST_INSTALL_TARGET_HOOKS += NFS_UTILS_INSTALL_FIXUP -$(eval $(call AUTOTARGETS,package,nfs-utils)) +# nfsiostat is interpreted python, so remove it unless it's in the target +NFS_UTILS_POST_INSTALL_TARGET_HOOKS += $(if $(BR2_PACKAGE_PYTHON),,NFS_UTILS_REMOVE_NFSIOSTAT) + +$(eval $(autotools-package)) diff --git a/package/ngircd/Config.in b/package/ngircd/Config.in new file mode 100644 index 0000000000..f1d8bea904 --- /dev/null +++ b/package/ngircd/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_NGIRCD + bool "ngircd" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_ZLIB + help + Next Generation IRC server deamon. + + http://ngircd.barton.de diff --git a/package/ngircd/ngircd.mk b/package/ngircd/ngircd.mk new file mode 100644 index 0000000000..d60ac06b82 --- /dev/null +++ b/package/ngircd/ngircd.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# ngircd +# +################################################################################ + +NGIRCD_VERSION = 20.3 +NGIRCD_SITE = ftp://ftp.berlios.de/pub/ngircd/ +NGIRCD_DEPENDENCIES = zlib +NGIRCD_LICENSE = GPLv2+ +NGIRCD_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/ngrep/Config.in b/package/ngrep/Config.in new file mode 100644 index 0000000000..cd91225791 --- /dev/null +++ b/package/ngrep/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_NGREP + bool "ngrep" + select BR2_PACKAGE_LIBPCAP + select BR2_PACKAGE_PCRE + help + Network grep. + + http://ngrep.sourceforge.net/ diff --git a/package/ngrep/ngrep-0001-make-objs.patch b/package/ngrep/ngrep-0001-make-objs.patch new file mode 100644 index 0000000000..8b55e3f456 --- /dev/null +++ b/package/ngrep/ngrep-0001-make-objs.patch @@ -0,0 +1,23 @@ +ngrep: don't include regex objects since we're using pcre + +Signed-off-by: Wade Berrier + +--- ngrep-1.45/Makefile.in.orig 2006-11-28 06:35:37.000000000 -0700 ++++ ngrep-1.45/Makefile.in 2011-06-29 14:05:27.000000000 -0600 +@@ -32,13 +32,13 @@ + + INSTALL = ./install-sh + +-REGEX_DIR=@REGEX_DIR@ +-REGEX_OBJS=@REGEX_OBJS@ ++REGEX_DIR= ++REGEX_OBJS= + + + all: $(TARGET) + +-$(TARGET): $(REGEX_OBJS) $(OBJS) ++$(TARGET): $(OBJS) + $(CC) $(CFLAGS) $(LDFLAGS) $(STRIPFLAG) -o $(TARGET) $(OBJS) $(REGEX_OBJS) $(LIBS) + + debug: $(REGEX_OBJS) $(OBJS) diff --git a/package/ngrep/ngrep-0002-pcre-header.patch b/package/ngrep/ngrep-0002-pcre-header.patch new file mode 100644 index 0000000000..40b9234dbc --- /dev/null +++ b/package/ngrep/ngrep-0002-pcre-header.patch @@ -0,0 +1,16 @@ +ngrep: don't use versioned header + +Signed-off-by: Wade Berrier + +diff -ur ngrep-1.45/ngrep.c ngrep-1.45.mod/ngrep.c +--- ngrep-1.45/ngrep.c Tue Nov 28 15:38:43 2006 ++++ ngrep-1.45.mod/ngrep.c Sat May 19 10:21:27 2007 +@@ -92,7 +92,7 @@ + #endif + + #if USE_PCRE +-#include "pcre-5.0/pcre.h" ++#include "pcre.h" + #else + #include "regex-0.12/regex.h" + #endif diff --git a/package/ngrep/ngrep-0003-fix-static-link.patch b/package/ngrep/ngrep-0003-fix-static-link.patch new file mode 100644 index 0000000000..98c262696d --- /dev/null +++ b/package/ngrep/ngrep-0003-fix-static-link.patch @@ -0,0 +1,25 @@ +ngrep: fix static link with pcre + +Libraries must be placed after object files. + +Signed-off-by: Romain Naour +--- + Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index 2ae4506..761d7d9 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -11,7 +11,7 @@ CFLAGS=@CFLAGS@ -D@OS@ @DEFS@ @EXTRA_DEFINES@ + INCLUDES=-I@srcdir@ @PCAP_INCLUDE@ @EXTRA_INCLUDES@ + + LDFLAGS=@LDFLAGS@ @PCAP_LINK@ +-LIBS=-lpcap @EXTRA_LIBS@ ++LIBS=@LIBS@ @EXTRA_LIBS@ + + STRIPFLAG=@STRIPFLAG@ + +-- +1.8.1.4 + diff --git a/package/ngrep/ngrep.mk b/package/ngrep/ngrep.mk new file mode 100644 index 0000000000..0bb5d7ecdb --- /dev/null +++ b/package/ngrep/ngrep.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# ngrep +# +################################################################################ + +NGREP_VERSION = 1.45 +NGREP_SOURCE = ngrep-$(NGREP_VERSION).tar.bz2 +NGREP_SITE = http://downloads.sourceforge.net/project/ngrep/ngrep/$(NGREP_VERSION) +NGREP_LICENSE = BSD-4c-like +NGREP_LICENSE_FILES = LICENSE.txt +NGREP_INSTALL_STAGING = YES +NGREP_CONF_ENV = LIBS="-lpcre" +NGREP_CONF_OPT = \ + --with-pcap-includes=$(STAGING_DIR)/usr/include \ + --enable-pcre \ + --with-pcre=$(STAGING_DIR)/usr \ + --disable-dropprivs + +NGREP_DEPENDENCIES = libpcap pcre + +$(eval $(autotools-package)) diff --git a/package/nmap/Config.in b/package/nmap/Config.in new file mode 100644 index 0000000000..2364dacb5e --- /dev/null +++ b/package/nmap/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_NMAP + bool "nmap" + depends on BR2_INET_IPV6 + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBPCAP + select BR2_PACKAGE_PCRE + help + Nmap ("Network Mapper") is a free and open source (license) + utility for network discovery and security auditing. + + http://nmap.org + +comment "nmap needs a toolchain w/ C++, IPv6, threads" + depends on BR2_USE_MMU + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_INET_IPV6 && BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/nmap/nmap.mk b/package/nmap/nmap.mk new file mode 100644 index 0000000000..47e4cfcb21 --- /dev/null +++ b/package/nmap/nmap.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# nmap +# +################################################################################ + +NMAP_VERSION = 6.01 +NMAP_SITE = http://nmap.org/dist +NMAP_SOURCE = nmap-$(NMAP_VERSION).tar.bz2 +NMAP_DEPENDENCIES = libpcap pcre +NMAP_CONF_OPT = --without-liblua --without-zenmap \ + --with-libdnet=included --with-liblinear=included \ + --with-libpcre="$(STAGING_DIR)/usr" +NMAP_LICENSE = GPLv2 +NMAP_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +NMAP_CONF_OPT += --with-openssl="$(STAGING_DIR)/usr" +NMAP_DEPENDENCIES += openssl +else +NMAP_CONF_OPT += --without-openssl +endif + +$(eval $(autotools-package)) diff --git a/package/nodejs/Config.in b/package/nodejs/Config.in new file mode 100644 index 0000000000..0258460f49 --- /dev/null +++ b/package/nodejs/Config.in @@ -0,0 +1,84 @@ +config BR2_PACKAGE_NODEJS + bool "nodejs" + depends on BR2_INET_IPV6 + depends on BR2_LARGEFILE + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_arm || BR2_i386 || BR2_x86_64 + # ARM needs BLX, so v5t+ + depends on !(BR2_arm7tdmi || BR2_arm720t || BR2_arm920t || BR2_arm922t || BR2_fa526) + # uses fork() + depends on BR2_USE_MMU + help + Event-driven I/O server-side JavaScript environment based on V8. + + http://nodejs.org/ + +comment "nodejs needs a toolchain w/ C++, IPv6, largefile, threads" + depends on BR2_USE_MMU + depends on BR2_arm || BR2_i386 || BR2_x86_64 + depends on !(BR2_arm7tdmi || BR2_arm720t || BR2_arm920t || BR2_arm922t || BR2_fa526) + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_LARGEFILE || \ + !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INET_IPV6 + +if BR2_PACKAGE_NODEJS + +menu "Module Selection" + +config BR2_PACKAGE_NODEJS_NPM + bool "NPM for the target" + select BR2_PACKAGE_OPENSSL + help + NPM is the package manager for the Node JavaScript platform. + Note that enabling NPM on the target also selects OpenSSL for the + target. + + http://www.npmjs.org + + Note that NPM is always built for the buildroot host. + +config BR2_PACKAGE_NODEJS_MODULES_EXPRESS + bool "Express web application framework" + help + Express is a minimal and flexible node.js web application + framework, providing a robust set of features for building + single and multi-page, and hybrid web applications. + + http://www.expressjs.com + https://github.com/visionmedia/express + +config BR2_PACKAGE_NODEJS_MODULES_COFFEESCRIPT + bool "CoffeeScript" + help + CoffeeScript is a little language that compiles into JavaScript. + + http://www.coffeescript.org + +config BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL + string "Additional modules" + help + List of space-separated nodejs modules to install via npm. + See https://npmjs.org/ to find modules and 'npm help install' + for available installation methods. For repeatable builds, + download and save tgz files or clone git repos for the + components you care about. + + Example: serialport uglify-js@1.3.4 /my/module/mymodule.tgz git://github.com/someuser/somemodule.git#v1.2 + + This would install the serialport module (at the newest version), + the uglify-js module at 1.3.4, a module from a filesystem path, + and a module from a git repository. + +config BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL_DEPS + string "Additional module dependencies" + help + List of space-separated buildroot recipes which must be built before + your npms can be installed. For example, if in 'Additional modules' + you specified 'node-curl' (see: + https://github.com/jiangmiao/node-curl), you could then specify + 'libcurl' here, to ensure that buildroot builds the libcurl package, + and does so before building your node modules. + +endmenu + +endif diff --git a/package/nodejs/nodejs-remove-python-bz2-dependency.patch b/package/nodejs/nodejs-remove-python-bz2-dependency.patch new file mode 100644 index 0000000000..75fe437502 --- /dev/null +++ b/package/nodejs/nodejs-remove-python-bz2-dependency.patch @@ -0,0 +1,27 @@ +Remove dependency on Python bz2 module + +The Python bz2 module is only needed in certain cases, so only import +it when needed. In the normal nodejs build, this allows to remove the +dependency on this module. + +Signed-off-by: Thomas Petazzoni +Index: b/deps/v8/tools/js2c.py +=================================================================== +--- a/deps/v8/tools/js2c.py ++++ b/deps/v8/tools/js2c.py +@@ -33,7 +33,6 @@ + + import os, re, sys, string + import jsmin +-import bz2 + + + def ToCAsciiArray(lines): +@@ -344,6 +343,7 @@ + else: + raw_sources_declaration = RAW_SOURCES_COMPRESSION_DECLARATION + if env['COMPRESSION'] == 'bz2': ++ import bz2 + all_sources = bz2.compress("".join(all_sources)) + total_length = len(all_sources) + sources_data = ToCArray(all_sources) diff --git a/package/nodejs/nodejs-v8-gregs-fix.patch b/package/nodejs/nodejs-v8-gregs-fix.patch new file mode 100644 index 0000000000..4af33bc428 --- /dev/null +++ b/package/nodejs/nodejs-v8-gregs-fix.patch @@ -0,0 +1,29 @@ +Fix compilation for ARM/uClibc +Patch from Remi Duraffort , taken from +https://code.google.com/p/v8/source/detail?r=12094 + +Signed-off-by: Daniel Price + +--- a/deps/v8/src/platform-linux.cc ++++ b/deps/v8/src/platform-linux.cc +@@ -1025,7 +1025,8 @@ static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) { + sample->fp = reinterpret_cast
      (mcontext.gregs[REG_RBP]); + #elif V8_HOST_ARCH_ARM + // An undefined macro evaluates to 0, so this applies to Android's Bionic also. +-#if (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3)) ++#if (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3) && \ ++ !defined(__UCLIBC__)) + sample->pc = reinterpret_cast
      (mcontext.gregs[R15]); + sample->sp = reinterpret_cast
      (mcontext.gregs[R13]); + sample->fp = reinterpret_cast
      (mcontext.gregs[R11]); +@@ -1033,7 +1034,8 @@ static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) { + sample->pc = reinterpret_cast
      (mcontext.arm_pc); + sample->sp = reinterpret_cast
      (mcontext.arm_sp); + sample->fp = reinterpret_cast
      (mcontext.arm_fp); +-#endif // (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3)) ++#endif // (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3) && ++ // !defined(__UCLIBC__)) + #elif V8_HOST_ARCH_MIPS + sample->pc = reinterpret_cast
      (mcontext.pc); + sample->sp = reinterpret_cast
      (mcontext.gregs[29]); + diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk new file mode 100644 index 0000000000..874c5f19d2 --- /dev/null +++ b/package/nodejs/nodejs.mk @@ -0,0 +1,114 @@ +################################################################################ +# +# nodejs +# +################################################################################ + +NODEJS_VERSION = 0.8.22 +NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.gz +NODEJS_SITE = http://nodejs.org/dist/v$(NODEJS_VERSION) +NODEJS_DEPENDENCIES = host-python host-nodejs \ + $(call qstrip,$(BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL_DEPS)) +HOST_NODEJS_DEPENDENCIES = host-python +NODEJS_LICENSE = MIT (core code); MIT, Apache and BSD family licenses (Bundled components) +NODEJS_LICENSE_FILES = LICENSE + +ifeq ($(BR2_PACKAGE_OPENSSL),y) + NODEJS_DEPENDENCIES += openssl +endif + +define HOST_NODEJS_CONFIGURE_CMDS + # Build with the static, built-in OpenSSL which is supplied as part of + # the nodejs source distribution. This is needed on the host because + # NPM is non-functional without it, and host-openssl isn't part of + # buildroot. + (cd $(@D); \ + ./configure \ + --prefix=$(HOST_DIR)/usr \ + --without-snapshot \ + --without-dtrace \ + --without-etw \ + ) +endef + +define HOST_NODEJS_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define HOST_NODEJS_INSTALL_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) install +endef + +ifeq ($(BR2_i386),y) +NODEJS_CPU=ia32 +else ifeq ($(BR2_x86_64),y) +NODEJS_CPU=x64 +else ifeq ($(BR2_arm),y) +NODEJS_CPU=arm +# V8 needs to know what floating point ABI the target is using. There's also +# a 'hard' option which we're not exposing here at the moment, because +# buildroot itself doesn't really support it at present. +ifeq ($(BR2_SOFT_FLOAT),y) +NODEJS_ARM_FP=soft +else +NODEJS_ARM_FP=softfp +endif +endif + +define NODEJS_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + LD="$(TARGET_CXX)" \ + ./configure \ + --prefix=/usr \ + --without-snapshot \ + $(if $(BR2_PACKAGE_OPENSSL),--shared-openssl,--without-ssl) \ + $(if $(BR2_PACKAGE_NODEJS_NPM),,--without-npm) \ + --without-dtrace \ + --without-etw \ + --dest-cpu=$(NODEJS_CPU) \ + $(if $(NODEJS_ARM_FP),--with-arm-float-abi=$(NODEJS_ARM_FP)) \ + --dest-os=linux \ + ) +endef + +define NODEJS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +# +# Build the list of modules to install based on the booleans for +# popular modules, as well as the "additional modules" list. +# +NODEJS_MODULES_LIST= $(call qstrip,\ + $(if $(BR2_PACKAGE_NODEJS_MODULES_EXPRESS),express) \ + $(if $(BR2_PACKAGE_NODEJS_MODULES_COFFEESCRIPT),coffee-script) \ + $(BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL)) + +# +# We can only call NPM if there's something to install. +# +ifneq ($(NODEJS_MODULES_LIST),) +define NODEJS_INSTALL_MODULES + # If you're having trouble with module installation, adding -d to the + # npm install call below and setting npm_config_rollback=false can both + # help in diagnosing the problem. + (cd $(TARGET_DIR)/usr/lib && mkdir -p node_modules && \ + $(TARGET_CONFIGURE_OPTS) \ + LD="$(TARGET_CXX)" \ + npm_config_arch=$(NODEJS_CPU) \ + npm_config_nodedir=$(BUILD_DIR)/nodejs-$(NODEJS_VERSION) \ + $(HOST_DIR)/usr/bin/npm install \ + $(NODEJS_MODULES_LIST) \ + ) +endef +endif + +define NODEJS_INSTALL_TARGET_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) DESTDIR=$(TARGET_DIR) install + $(NODEJS_INSTALL_MODULES) +endef + +# node.js configure is a Python script and does not use autotools +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/noip/Config.in b/package/noip/Config.in new file mode 100644 index 0000000000..aea5deb99b --- /dev/null +++ b/package/noip/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_NOIP + bool "noip" + depends on BR2_USE_MMU # fork() + help + Dynamic DNS update client for no-ip.com + + http://www.no-ip.com/downloads.php diff --git a/package/noip/noip.mk b/package/noip/noip.mk new file mode 100644 index 0000000000..04ff5b29e7 --- /dev/null +++ b/package/noip/noip.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# noip +# +################################################################################ + +NOIP_VERSION = 2.1.9 +NOIP_SITE = http://www.no-ip.com/client/linux +NOIP_SOURCE = noip-duc-linux.tar.gz +NOIP_LICENSE = GPLv2+ +NOIP_LICENSE_FILES = COPYING + +define NOIP_BUILD_CMDS + sed -i -e "s:\(#define CONFIG_FILENAME\).*:\1 \"/etc/no-ip2.conf\":" \ + $(@D)/noip2.c + $(MAKE) -C $(@D) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \ + PREFIX=/usr CONFDIR=/etc +endef + +define NOIP_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/noip2 $(TARGET_DIR)/usr/sbin/noip2 +endef + +define NOIP_UNINSTALL_TARGET_CMDS + rm -f "$(TARGET_DIR)/usr/sbin/noip2" +endef + +define NOIP_CLEAN_CMDS + $(MAKE) -C $(@D) clean +endef + +$(eval $(generic-package)) diff --git a/package/nss-mdns/Config.in b/package/nss-mdns/Config.in new file mode 100644 index 0000000000..0192cc2862 --- /dev/null +++ b/package/nss-mdns/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_NSS_MDNS + bool "nss-mdns" + # libdaemon->avahi uses fork() + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_PACKAGE_AVAHI_DAEMON + help + nss-mdns is a plugin for the GNU Name Service Switch (NSS) + functionality of the GNU C Library (glibc) providing host + name resolution via Multicast DNS (aka Zeroconf, aka Apple + Rendezvous, aka Apple Bonjour), effectively allowing name + resolution by common Unix/Linux programs in the ad-hoc + mDNS domain .local. + + http://0pointer.de/lennart/projects/nss-mdns/ + +comment "nss-mdns needs an (e)glibc toolchain" + depends on BR2_USE_MMU && BR2_PACKAGE_AVAHI_DAEMON + depends on !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/nss-mdns/nss-mdns.mk b/package/nss-mdns/nss-mdns.mk new file mode 100644 index 0000000000..30a0a73652 --- /dev/null +++ b/package/nss-mdns/nss-mdns.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# nss-mdns +# +################################################################################ + +NSS_MDNS_VERSION = 0.10 +NSS_MDNS_SITE = http://0pointer.de/lennart/projects/nss-mdns + +NSS_MDNS_CONF_OPT += --localstatedir=/var + +define NSS_MDNS_INSTALL_CONFIG + sed -r -i -e 's/^(hosts:[[:space:]]+).*/\1files mdns4_minimal [NOTFOUND=return] dns mdns4/' \ + $(TARGET_DIR)/etc/nsswitch.conf +endef + +NSS_MDNS_POST_INSTALL_TARGET_HOOKS += NSS_MDNS_INSTALL_CONFIG + +$(eval $(autotools-package)) diff --git a/package/ntfs-3g/Config.in b/package/ntfs-3g/Config.in index 865f9b41f7..0510c124c2 100644 --- a/package/ntfs-3g/Config.in +++ b/package/ntfs-3g/Config.in @@ -2,6 +2,8 @@ config BR2_PACKAGE_NTFS_3G bool "ntfs-3g" depends on BR2_LARGEFILE depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU help The NTFS-3G driver is an open source, freely available read/write NTFS driver for Linux, FreeBSD, Mac OS X, NetBSD, @@ -12,5 +14,22 @@ config BR2_PACKAGE_NTFS_3G http://www.ntfs-3g.org/ -comment "ntfs-3g requires a toolchain with LARGEFILE and WCHAR support" - depends on !(BR2_LARGEFILE && BR2_USE_WCHAR) +if BR2_PACKAGE_NTFS_3G + +config BR2_PACKAGE_NTFS_3G_ENCRYPTED + bool "encrypted volumes" + select BR2_PACKAGE_GNUTLS + select BR2_PACKAGE_LIBGCRYPT + help + Enable support for NTFS encrypted volumes. + +config BR2_PACKAGE_NTFS_3G_NTFSPROGS + bool "ntfsprogs" + help + Install NTFS utilities. + +endif + +comment "ntfs-3g needs a toolchain w/ largefile, wchar, threads" + depends on BR2_USE_MMU + depends on !(BR2_LARGEFILE && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/ntfs-3g/ntfs-3g.mk b/package/ntfs-3g/ntfs-3g.mk index 0472d54e97..026d9e9929 100644 --- a/package/ntfs-3g/ntfs-3g.mk +++ b/package/ntfs-3g/ntfs-3g.mk @@ -1,19 +1,38 @@ -############################################################# +################################################################################ # # ntfs-3g # -############################################################# +################################################################################ NTFS_3G_VERSION = 2013.1.13 NTFS_3G_SOURCE = ntfs-3g_ntfsprogs-$(NTFS_3G_VERSION).tgz NTFS_3G_SITE = http://tuxera.com/opensource -NTFS_3G_CONF_OPT = --disable-ldconfig --program-prefix="" +NTFS_3G_CONF_OPT = --disable-ldconfig NTFS_3G_INSTALL_STAGING = YES +NTFS_3G_DEPENDENCIES = host-pkgconf +NTFS_3G_LICENSE = GPLv2+ LGPLv2+ +NTFS_3G_LICENSE_FILES = COPYING COPYING.LIB define NTFS_3G_TARGET_SYMLINK_CREATE cd $(TARGET_DIR)/sbin; ln -fs mount.ntfs-3g mount.ntfs endef -NTFS_3G_POST_INSTALL_TARGET_HOOKS += NTFS_3G_TARGET_SYMLINK_CREATE +ifeq ($(BR2_PACKAGE_LIBFUSE),y) + NTFS_3G_CONF_OPT += --with-fuse=external + NTFS_3G_DEPENDENCIES += libfuse +endif -$(eval $(call AUTOTARGETS,package,ntfs-3g)) +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y) + NTFS_3G_DEPENDENCIES += util-linux +endif + +ifeq ($(BR2_PACKAGE_NTFS_3G_ENCRYPTED),y) + NTFS_3G_CONF_OPT += --enable-crypto + NTFS_3G_DEPENDENCIES += gnutls libgcrypt +endif + +ifneq ($(BR2_PACKAGE_NTFS_3G_NTFSPROGS),y) + NTFS_3G_CONF_OPT += --disable-ntfsprogs +endif + +$(eval $(autotools-package)) diff --git a/package/ntfsprogs/Config.in b/package/ntfsprogs/Config.in deleted file mode 100644 index 836a2b6fe4..0000000000 --- a/package/ntfsprogs/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_NTFSPROGS - bool "ntfsprogs" - depends on BR2_USE_WCHAR - depends on BR2_LARGEFILE - help - wide collection of NTFS utilities - - http://www.linux-ntfs.org/ - -comment "ntfsprogs requires a toolchain with WCHAR and LARGEFILE support" - depends on !BR2_USE_WCHAR || !BR2_LARGEFILE diff --git a/package/ntfsprogs/ntfsprogs-2.0.0-no-pkgconfig-path-override.patch b/package/ntfsprogs/ntfsprogs-2.0.0-no-pkgconfig-path-override.patch deleted file mode 100644 index bf7824d700..0000000000 --- a/package/ntfsprogs/ntfsprogs-2.0.0-no-pkgconfig-path-override.patch +++ /dev/null @@ -1,42 +0,0 @@ -[PATCH] ntfsprogs: don't override PKG_CONFIG_PATH - -Adding hardcoded directories to the pkg-config search path breaks -cross compilation (E.G. if the host has a .pc for a package the -target doesn't have). - -Signed-off-by: Peter Korsgaard ---- - configure | 4 ---- - configure.ac | 4 ---- - 2 files changed, 8 deletions(-) - -Index: ntfsprogs-2.0.0/configure.ac -=================================================================== ---- ntfsprogs-2.0.0.orig/configure.ac -+++ ntfsprogs-2.0.0/configure.ac -@@ -168,10 +168,6 @@ AC_PROG_MAKE_SET - AC_PROG_LIBTOOL - PKG_PROG_PKG_CONFIG - --# Libraries often install their metadata .pc files in directories not searched --# by pkg-config. Let's workaround this. --export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/lib/pkgconfig:/opt/gnome/lib/pkgconfig:/usr/share/pkgconfig:/usr/local/lib/pkgconfig:$prefix/lib/pkgconfig:/opt/gnome/share/pkgconfig:/usr/local/share/pkgconfig -- - # Enable large file support. - AC_SYS_LARGEFILE - -Index: ntfsprogs-2.0.0/configure -=================================================================== ---- ntfsprogs-2.0.0.orig/configure -+++ ntfsprogs-2.0.0/configure -@@ -20210,10 +20210,6 @@ echo "${ECHO_T}no" >&6; } - - fi - --# Libraries often install their metadata .pc files in directories not searched --# by pkg-config. Let's workaround this. --export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/lib/pkgconfig:/opt/gnome/lib/pkgconfig:/usr/share/pkgconfig:/usr/local/lib/pkgconfig:$prefix/lib/pkgconfig:/opt/gnome/share/pkgconfig:/usr/local/share/pkgconfig -- - # Enable large file support. - # Check whether --enable-largefile was given. - if test "${enable_largefile+set}" = set; then diff --git a/package/ntfsprogs/ntfsprogs.mk b/package/ntfsprogs/ntfsprogs.mk deleted file mode 100644 index 4557747ec7..0000000000 --- a/package/ntfsprogs/ntfsprogs.mk +++ /dev/null @@ -1,26 +0,0 @@ -############################################################# -# -# ntfsprogs -# -############################################################# -NTFSPROGS_VERSION:=2.0.0 -NTFSPROGS_SOURCE:=ntfsprogs-$(NTFSPROGS_VERSION).tar.gz -NTFSPROGS_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/linux-ntfs/ -NTFSPROGS_CONF_OPT:=--disable-gnome-vfs --program-prefix="" --disable-crypto -NTFSPROGS_INSTALL_STAGING:=yes - -NTFSPROGS_BIN:=ntfscat ntfscluster ntfscmp ntfsfix ntfsinfo ntfsls -NTFSPROGS_SBIN:=ntfsclone ntfscp ntfslabel ntfsresize ntfsundelete mkntfs - -ifeq ($(BR2_PACKAGE_LIBFUSE),y) -NTFSPROGS_DEPENDENCIES += libfuse -endif - -define NTFSPROGS_UNINSTALL_TARGET_CMDS - rm -f $(TARGET_DIR)/usr/lib/libntfs.so* - rm -f $(addprefix $(TARGET_DIR)/usr/bin/,$(NTFSPROGS_BIN)) - rm -f $(addprefix $(TARGET_DIR)/usr/sbin/,$(NTFSPROGS_SBIN)) - -unlink $(TARGET_DIR)/sbin/mkfs.ntfs -endef - -$(eval $(call AUTOTARGETS,package,ntfsprogs)) diff --git a/package/ntp/Config.in b/package/ntp/Config.in index 1b2ab4b33a..ec5dbbb40e 100644 --- a/package/ntp/Config.in +++ b/package/ntp/Config.in @@ -6,22 +6,21 @@ config BR2_PACKAGE_NTP http://www.ntp.org/ +if BR2_PACKAGE_NTP + config BR2_PACKAGE_NTP_SNTP bool "sntp" - depends on BR2_PACKAGE_NTP help Simple network time protocol program config BR2_PACKAGE_NTP_NTP_KEYGEN bool "ntp-keygen" - depends on BR2_PACKAGE_NTP help Create a NTP host key config BR2_PACKAGE_NTP_NTP_WAIT bool "ntp-wait" - depends on BR2_PACKAGE_MICROPERL - depends on BR2_PACKAGE_NTP + depends on BR2_PACKAGE_PERL help ntp-wait waits until the locally running ntpd is in state 4 (synchronized). This could be useful at boot time, to delay the @@ -29,7 +28,6 @@ config BR2_PACKAGE_NTP_NTP_WAIT config BR2_PACKAGE_NTP_NTPD bool "ntpd" - depends on BR2_PACKAGE_NTP default y help ntpd is the time synchronization daemon keeping your local @@ -38,29 +36,30 @@ config BR2_PACKAGE_NTP_NTPD config BR2_PACKAGE_NTP_NTPDATE bool "ntpdate" - depends on BR2_PACKAGE_NTP help The ntpdate utility program is used to set the local date and time from an NTP server given as an argument. config BR2_PACKAGE_NTP_NTPDC bool "ntpdc" - depends on BR2_PACKAGE_NTP help The ntpdc utility program is used to query an NTP daemon about its current state and to request changes in that state. config BR2_PACKAGE_NTP_NTPQ bool "ntpq" - depends on BR2_PACKAGE_NTP help The ntpq utility program is used to query NTP servers requesting information about current state and/or changes in that state. +config BR2_PACKAGE_NTP_NTPSNMPD + bool "ntpsnmpd" + help + Install ntpsnmpd NTP SNMP MIB agent. + config BR2_PACKAGE_NTP_NTPTRACE bool "ntptrace" - depends on BR2_PACKAGE_MICROPERL - depends on BR2_PACKAGE_NTP + depends on BR2_PACKAGE_PERL help ntptrace is a perl script that uses the ntpq utility program to follow the chain of NTP servers from a given host back to the @@ -68,6 +67,7 @@ config BR2_PACKAGE_NTP_NTPTRACE config BR2_PACKAGE_NTP_TICKADJ bool "tickadj" - depends on BR2_PACKAGE_NTP help set time-related kernel variables + +endif diff --git a/package/ntp/ntp.mk b/package/ntp/ntp.mk index 5efe0f7f74..da1351a7ed 100644 --- a/package/ntp/ntp.mk +++ b/package/ntp/ntp.mk @@ -1,29 +1,37 @@ -############################################################# +################################################################################ # # ntp # -############################################################# +################################################################################ + NTP_VERSION = 4.2.6p5 -NTP_SOURCE = ntp-$(NTP_VERSION).tar.gz NTP_SITE = http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2 - +NTP_LICENSE = ntp license +NTP_LICENSE_FILES = COPYRIGHT NTP_CONF_ENV = ac_cv_lib_md5_MD5Init=no ifneq ($(BR2_INET_IPV6),y) -NTP_CONF_ENV += isc_cv_have_in6addr_any=no + NTP_CONF_ENV += isc_cv_have_in6addr_any=no endif NTP_CONF_OPT = --with-shared \ --program-transform-name=s,,, \ --enable-clockctl \ - --disable-tickadj \ - --without-ntpsnmpd + --disable-tickadj ifeq ($(BR2_PACKAGE_OPENSSL),y) -NTP_CONF_OPT += --with-crypto -NTP_DEPENDENCIES += openssl + NTP_CONF_OPT += --with-crypto + NTP_DEPENDENCIES += openssl +else + NTP_CONF_OPT += --without-crypto +endif + +ifeq ($(BR2_PACKAGE_NTP_NTPSNMPD),y) + NTP_CONF_OPT += \ + --with-net-snmp-config=$(STAGING_DIR)/usr/bin/net-snmp-config + NTP_DEPENDENCIES += netsnmp else -NTP_CONF_OPT += --without-crypto + NTP_CONF_OPT += --without-ntpsnmpd endif define NTP_PATCH_FIXUPS @@ -36,6 +44,7 @@ NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTP_WAIT) += scripts/ntp-wait NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPDATE) += ntpdate/ntpdate NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPDC) += ntpdc/ntpdc NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPQ) += ntpq/ntpq +NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPSNMPD) += ntpsnmpd/ntpsnmpd NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPTRACE) += scripts/ntptrace NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_SNTP) += sntp/sntp NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_TICKADJ) += util/tickadj @@ -59,4 +68,4 @@ endef NTP_POST_PATCH_HOOKS += NTP_PATCH_FIXUPS -$(eval $(call AUTOTARGETS,package,ntp)) +$(eval $(autotools-package)) diff --git a/package/numactl/Config.in b/package/numactl/Config.in new file mode 100644 index 0000000000..0976de2a7e --- /dev/null +++ b/package/numactl/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_NUMACTL + bool "numactl" + # numactl uses some system calls that are not available on all + # architectures. + depends on BR2_LARGEFILE + depends on BR2_i386 || BR2_mips || BR2_mipsel || \ + BR2_mips64 || BR2_mips64el || BR2_powerpc || BR2_x86_64 + help + numactl allows you to run your application on specific cpus + and memory nodes. It does this by supplying a NUMA memory + policy to the operating system before running your program. + + http://oss.sgi.com/projects/libnuma/ + +comment "numactl needs a toolchain w/ largefile" + depends on BR2_i386 || BR2_mips || BR2_mipsel || \ + BR2_mips64 || BR2_mips64el || BR2_powerpc || BR2_x86_64 + depends on !BR2_LARGEFILE diff --git a/package/numactl/numactl.mk b/package/numactl/numactl.mk new file mode 100644 index 0000000000..ee62f73549 --- /dev/null +++ b/package/numactl/numactl.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# numactl +# +################################################################################ + +NUMACTL_VERSION = 2.0.8 +NUMACTL_SITE = ftp://oss.sgi.com/www/projects/libnuma/download/ +NUMACTL_LICENSE = LGPLv2.1 (libnuma), GPLv2 (programs) +NUMACTL_LICENSE_FILES = README + +define NUMACTL_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define NUMACTL_INSTALL_TARGET_CMDS + $(MAKE) prefix=$(TARGET_DIR) libdir=$(TARGET_DIR)/lib -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/nut/Config.in b/package/nut/Config.in new file mode 100644 index 0000000000..5b47e8bc3f --- /dev/null +++ b/package/nut/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_NUT + bool "nut" + help + Network UPS tools + + The primary goal of the Network UPS Tools (NUT) project is to provide + support for Power Devices, such as Uninterruptible Power Supplies, + Power Distribution Units and Solar Controllers. + + http://www.networkupstools.org/ + +if BR2_PACKAGE_NUT + +config BR2_PACKAGE_NUT_DRIVERS + string "drivers" + help + Select the individual drivers to enable, in a comma-separated list. + Leave empty for all. + +endif # BR2_PACKAGE_NUT diff --git a/package/nut/nut-0001-foo-config.patch b/package/nut/nut-0001-foo-config.patch new file mode 100644 index 0000000000..7202f139cc --- /dev/null +++ b/package/nut/nut-0001-foo-config.patch @@ -0,0 +1,72 @@ +configure: fix calls to {gdlib,net-snmp}-config + +nut directly calls to {gdlib,net-snmp}-config. In Buildroot, +those are not in the PATH, and nut would catch those of the +system (if they are installed), or miss them entirely. + +Fix that by using environment variables that will tell where +to look for them. + +Note: libusb also uses libusb-config, but only as a fallback +if pkg-config fails. Since we ensure that pkg-config exists, +and libusb is properly installed before we build nut, there +is no need to fix the libusb-config calls, since they won't +be called at all. + +Signed-off-by: "Yann E. MORIN" + +diff -durN nut-2.6.5.orig/m4/nut_check_libgd.m4 nut-2.6.5/m4/nut_check_libgd.m4 +--- nut-2.6.5.orig/m4/nut_check_libgd.m4 2012-07-31 19:38:56.000000000 +0200 ++++ nut-2.6.5/m4/nut_check_libgd.m4 2013-11-01 16:24:02.626549810 +0100 +@@ -20,7 +20,7 @@ + LIBS="-lgd -lpng -lz -ljpeg -lfreetype -lm -lXpm -lX11" + + AC_MSG_CHECKING(for gd version via gdlib-config) +- GD_VERSION=`gdlib-config --version 2>/dev/null` ++ GD_VERSION=`${GDLIB_CONFIG} --version 2>/dev/null` + if test "$?" != "0" -o -z "${GD_VERSION}"; then + GD_VERSION="none" + fi +@@ -34,9 +34,9 @@ + AC_MSG_WARN([[If gd detection fails, upgrade gd or use --with-gd-includes and --with-gd-libs]]) + ;; + *) +- CFLAGS="`gdlib-config --includes 2>/dev/null`" +- LDFLAGS="`gdlib-config --ldflags 2>/dev/null`" +- LIBS="`gdlib-config --libs 2>/dev/null`" ++ CFLAGS="`${GDLIB_CONFIG} --includes 2>/dev/null`" ++ LDFLAGS="`${GDLIB_CONFIG} --ldflags 2>/dev/null`" ++ LIBS="`${GDLIB_CONFIG} --libs 2>/dev/null`" + ;; + esac + +diff -durN nut-2.6.5.orig/m4/nut_check_libnetsnmp.m4 nut-2.6.5/m4/nut_check_libnetsnmp.m4 +--- nut-2.6.5.orig/m4/nut_check_libnetsnmp.m4 2012-07-31 19:38:56.000000000 +0200 ++++ nut-2.6.5/m4/nut_check_libnetsnmp.m4 2013-11-01 16:30:07.398282923 +0100 +@@ -15,7 +15,7 @@ + + dnl See which version of the Net-SNMP library (if any) is installed + AC_MSG_CHECKING(for Net-SNMP version via net-snmp-config) +- SNMP_VERSION=`net-snmp-config --version 2>/dev/null` ++ SNMP_VERSION=`${NET_SNMP_CONFIG} --version 2>/dev/null` + if test "$?" != "0" -o -z "${SNMP_VERSION}"; then + SNMP_VERSION="none" + fi +@@ -33,7 +33,7 @@ + CFLAGS="${withval}" + ;; + esac +- ], [CFLAGS="`net-snmp-config --base-cflags 2>/dev/null`"]) ++ ], [CFLAGS="`${NET_SNMP_CONFIG} --base-cflags 2>/dev/null`"]) + AC_MSG_RESULT([${CFLAGS}]) + + AC_MSG_CHECKING(for Net-SNMP libs) +@@ -48,7 +48,7 @@ + LIBS="${withval}" + ;; + esac +- ], [LIBS="`net-snmp-config --libs 2>/dev/null`"]) ++ ], [LIBS="`${NET_SNMP_CONFIG} --libs 2>/dev/null`"]) + AC_MSG_RESULT([${LIBS}]) + + dnl Check if the Net-SNMP library is usable diff --git a/package/nut/nut.mk b/package/nut/nut.mk new file mode 100644 index 0000000000..25b88c4123 --- /dev/null +++ b/package/nut/nut.mk @@ -0,0 +1,87 @@ +################################################################################ +# +# nut +# +################################################################################ + +NUT_VERSION = 2.6.5 +NUT_SITE = http://www.networkupstools.org/source/2.6/ +NUT_LICENSE = GPLv2+, GPLv3+ (python scripts), GPL/Artistic (perl client) +NUT_LICENSE_FILES = COPYING LICENSE-GPL2 LICENSE-GPL3 +NUT_DEPENDENCIES = host-pkgconf + +# Our patch changes m4 macros, so we need to autoreconf +NUT_AUTORECONF = YES + +# Put the PID files in a read-write place (/var/run is a tmpfs) +# since the default location (/var/state/ups) maybe readonly. +NUT_CONF_OPT = \ + --with-altpidpath=/var/run/upsd + +NUT_CONF_ENV = \ + GDLIB_CONFIG=$(STAGING_DIR)/usr/bin/gdlib-config \ + NET_SNMP_CONFIG=$(STAGING_DIR)/usr/bin/net-snmp-config + +# For uClibc-based toolchains, nut forgets to link with -lm +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +NUT_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -lm" +endif + +ifeq ($(call qstrip,$(BR2_PACKAGE_NUT_DRIVERS)),) +NUT_CONF_OPT += --with-drivers=all +else +NUT_CONF_OPT += --with-drivers=$(BR2_PACKAGE_NUT_DRIVERS) +endif + +ifeq ($(BR2_PACKAGE_AVAHI)$(BR2_PACKAGE_DBUS),yy) +NUT_DEPENDENCIES += avahi dbus +NUT_CONF_OPT += --with-avahi +else +NUT_CONF_OPT += --without-avahi +endif + +# gd with support for png is required for the CGI +ifeq ($(BR2_PACKAGE_GD)$(BR2_PACKAGE_LIBPNG),yy) +NUT_DEPENDENCIES += gd libpng +NUT_CONF_OPT += --with-cgi +else +NUT_CONF_OPT += --without-cgi +endif + +# libltdl (libtool) is needed for nut-scanner +ifeq ($(BR2_PACKAGE_LIBTOOL),y) +NUT_DEPENDENCIES += libtool +NUT_CONF_OPT += --with-libltdl +else +NUT_CONF_OPT += --without-libltdl +endif + +ifeq ($(BR2_PACKAGE_LIBUSB_COMPAT),y) +NUT_DEPENDENCIES += libusb-compat +NUT_CONF_OPT += --with-usb +else +NUT_CONF_OPT += --without-usb +endif + +ifeq ($(BR2_PACKAGE_NEON_EXPAT)$(BR2_PACKAGE_NEON_LIBXML2),y) +NUT_DEPENDENCIES += neon +NUT_CONF_OPT += --with-neon +else +NUT_CONF_OPT += --without-neon +endif + +ifeq ($(BR2_PACKAGE_NETSNMP),y) +NUT_DEPENDENCIES += netsnmp +NUT_CONF_OPT += --with-snmp +else +NUT_CONF_OPT += --without-snmp +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +NUT_DEPENDENCIES += openssl +NUT_CONF_OPT += --with-ssl +else +NUT_CONF_OPT += --without-ssl +endif + +$(eval $(autotools-package)) diff --git a/package/nuttcp/Config.in b/package/nuttcp/Config.in index fb6d3b186d..eea88fd4e5 100644 --- a/package/nuttcp/Config.in +++ b/package/nuttcp/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_NUTTCP bool "nuttcp" + depends on BR2_USE_MMU # fork() help nuttcp is a TCP/UDP network testing tool, much like iperf diff --git a/package/nuttcp/nuttcp.mk b/package/nuttcp/nuttcp.mk index e3867ea429..8a99ce39f5 100644 --- a/package/nuttcp/nuttcp.mk +++ b/package/nuttcp/nuttcp.mk @@ -1,12 +1,14 @@ -############################################################# +################################################################################ # # nuttcp # -############################################################# +################################################################################ NUTTCP_VERSION = 6.1.2 NUTTCP_SITE = http://www.lcp.nrl.navy.mil/nuttcp/ NUTTCP_SOURCE = nuttcp-$(NUTTCP_VERSION).tar.bz2 +NUTTCP_LICENSE = GPLv2 +NUTTCP_LICENSE_FILES = LICENSE define NUTTCP_BUILD_CMDS $(MAKE1) CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS)" \ @@ -22,4 +24,4 @@ define NUTTCP_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/bin/nuttcp endef -$(eval $(call GENTARGETS,package,nuttcp)) +$(eval $(generic-package)) diff --git a/package/ocf-linux/ocf-linux-01-modules-cross.patch b/package/ocf-linux/ocf-linux-01-modules-cross.patch new file mode 100644 index 0000000000..f80ef062c8 --- /dev/null +++ b/package/ocf-linux/ocf-linux-01-modules-cross.patch @@ -0,0 +1,42 @@ +Remove the OCF linux kernel extension instead opting to build ocf-linux +modules out of tree. +This is easier for users since no kernel config tweaking is required. +On the downside the OCF drivers can't be used, but then all of the +kernel crypto drivers are available to users via cryptosoft which is +preferred. + +Signed-off-by: Gustavo Zacarias + +diff -Nura ocf-linux-20120127.orig/ocf/Makefile ocf-linux-20120127/ocf/Makefile +--- ocf-linux-20120127.orig/ocf/Makefile 2013-04-27 09:27:04.413911866 -0300 ++++ ocf-linux-20120127/ocf/Makefile 2013-04-27 09:27:31.131775576 -0300 +@@ -2,6 +2,7 @@ + -include $(ROOTDIR)/modules/.config + + OCF_OBJS = crypto.o criov.o ++KDIR ?= /lib/modules/$(shell uname -r)/build + + ifdef CONFIG_OCF_RANDOMHARVEST + OCF_OBJS += random.o +@@ -78,20 +79,13 @@ + # + + ocf_make: +- make -C /lib/modules/$(shell uname -r)/build M=`pwd` $(OCF_TARGET) CONFIG_OCF_OCF=m +- make -C /lib/modules/$(shell uname -r)/build M=`pwd` $(OCF_TARGET) CONFIG_OCF_OCF=m CONFIG_OCF_CRYPTOSOFT=m +- -make -C /lib/modules/$(shell uname -r)/build M=`pwd` $(OCF_TARGET) CONFIG_OCF_OCF=m CONFIG_OCF_BENCH=m +- -make -C /lib/modules/$(shell uname -r)/build M=`pwd` $(OCF_TARGET) CONFIG_OCF_OCF=m CONFIG_OCF_OCFNULL=m +- -make -C /lib/modules/$(shell uname -r)/build M=`pwd` $(OCF_TARGET) CONFIG_OCF_OCF=m CONFIG_OCF_HIFN=m ++ make -C $(KDIR) M=`pwd` $(OCF_TARGET) CONFIG_OCF_OCF=m CONFIG_OCF_CRYPTOSOFT=m CONFIG_OCF_BENCH=m CONFIG_OCF_OCFNULL=m + + ocf_modules: + $(MAKE) ocf_make OCF_TARGET=modules + + ocf_install: + $(MAKE) ocf_make OCF_TARGET="modules modules_install" +- depmod +- mkdir -p /usr/include/crypto +- cp cryptodev.h /usr/include/crypto/. + + # + # generate full kernel patches for 2.4 and 2.6 kernels to make patching diff --git a/package/ocf-linux/ocf-linux.mk b/package/ocf-linux/ocf-linux.mk new file mode 100644 index 0000000000..8ca557840f --- /dev/null +++ b/package/ocf-linux/ocf-linux.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# ocf-linux +# +################################################################################ + +OCF_LINUX_VERSION = 20120127 +OCF_LINUX_SITE = http://downloads.sourceforge.net/project/ocf-linux/ocf-linux/$(OCF_LINUX_VERSION) +OCF_LINUX_DEPENDENCIES = linux +OCF_LINUX_INSTALL_STAGING = YES + +define OCF_LINUX_BUILD_CMDS + $(MAKE) -C $(@D)/ocf $(LINUX_MAKE_FLAGS) KDIR=$(LINUX_DIR) \ + ocf_modules +endef + +define OCF_LINUX_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D)/ocf $(LINUX_MAKE_FLAGS) KDIR=$(LINUX_DIR) \ + ocf_install +endef + +define OCF_LINUX_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 644 $(@D)/ocf/cryptodev.h \ + $(STAGING_DIR)/usr/include/crypto/cryptodev.h +endef + +$(eval $(generic-package)) diff --git a/package/ocrad/Config.in b/package/ocrad/Config.in new file mode 100644 index 0000000000..38d37c612a --- /dev/null +++ b/package/ocrad/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_OCRAD + bool "ocrad" + depends on BR2_INSTALL_LIBSTDCPP + help + GNU Ocrad is an OCR (Optical Character Recognition) program + based on a feature extraction method. + It reads images in pbm (bitmap), pgm (greyscale) or + ppm (color) formats and produces text in byte (8-bit) or + UTF-8 formats. + + http://www.gnu.org/software/ocrad/ + +comment "ocrad needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/ocrad/ocrad.mk b/package/ocrad/ocrad.mk new file mode 100644 index 0000000000..8a038e2ca2 --- /dev/null +++ b/package/ocrad/ocrad.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# ocrad +# +################################################################################ + +OCRAD_VERSION = 0.21 +OCRAD_SITE = $(BR2_GNU_MIRROR)/ocrad +OCRAD_LICENSE = GPLv3+ +OCRAD_LICENSE_FILES = COPYING +OCRAD_INSTALL_STAGING = YES + +# This is not a true autotools package. +define OCRAD_CONFIGURE_CMDS + cd $(@D) && \ + ./configure --prefix=/usr --sysconfdir=/etc $(TARGET_CONFIGURE_OPTS) +endef + +define OCRAD_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define OCRAD_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install +endef + +define OCRAD_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/ofono/Config.in b/package/ofono/Config.in new file mode 100644 index 0000000000..00df25186e --- /dev/null +++ b/package/ofono/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_OFONO + bool "ofono" + depends on BR2_USE_WCHAR # gettext, libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, libglib2 + depends on BR2_USE_MMU # dbus, libglib2 + depends on !BR2_avr32 # libcap-ng + select BR2_PACKAGE_LIBCAP_NG + select BR2_PACKAGE_DBUS + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_MOBILE_BROADBAND_PROVIDER_INFO + help + oFono is a free, open source project for mobile telephony + (GSM/UMTS) applications. It uses high-level D-Bus API for + use by telephony applications. It uses 3GPP standard. + + http://ofono.org/ + +comment "ofono needs a toolchain w/ wchar, threads" + depends on !BR2_avr32 + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/ofono/ofono-uclibc-backtrace.patch b/package/ofono/ofono-uclibc-backtrace.patch new file mode 100644 index 0000000000..8499bcfb93 --- /dev/null +++ b/package/ofono/ofono-uclibc-backtrace.patch @@ -0,0 +1,44 @@ +[PATCH] fix build on uClibc without UCLIBC_HAS_BACKTRACE + +Backtrace support is only used for logging on signal errors, which +isn't really critical, so simply remove backtrace info if not +available in uClibc. + +Signed-off-by: Peter Korsgaard +--- + src/log.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +Index: ofono-1.5/src/log.c +=================================================================== +--- ofono-1.5.orig/src/log.c ++++ ofono-1.5/src/log.c +@@ -30,7 +30,12 @@ + #include + #include + #include ++#include ++/* backtrace support is optional on uClibc */ ++#if !(defined(__UCLIBC__) && !defined (__UCLIBC_HAS_BACKTRACE__)) ++#define HAVE_BACKTRACE + #include ++#endif + #include + + #include "ofono.h" +@@ -115,6 +120,7 @@ + + static void print_backtrace(unsigned int offset) + { ++#ifdef HAVE_BACKTRACE + void *frames[99]; + size_t n_ptrs; + unsigned int i; +@@ -213,6 +219,7 @@ + + close(outfd[1]); + close(infd[0]); ++#endif /* HAVE_BACKTRACE */ + } + + static void signal_handler(int signo) diff --git a/package/ofono/ofono.mk b/package/ofono/ofono.mk new file mode 100644 index 0000000000..4b3b7a5a1c --- /dev/null +++ b/package/ofono/ofono.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# ofono +# +################################################################################ + +OFONO_VERSION = 1.12 +OFONO_SOURCE = ofono-$(OFONO_VERSION).tar.xz +OFONO_SITE = $(BR2_KERNEL_MIRROR)/linux/network/ofono +OFONO_LICENSE = GPLv2 +OFONO_LICENSE_FILES = COPYING +OFONO_DEPENDENCIES = \ + host-pkgconf \ + dbus \ + libglib2 \ + libcap-ng \ + mobile-broadband-provider-info + +OFONO_CONF_OPT = --disable-test + +# N.B. Qualcomm QMI modem support requires O_CLOEXEC; so +# make sure that it is defined. +OFONO_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" + +ifeq ($(BR2_PACKAGE_UDEV),y) + OFONO_CONF_OPT += --enable-udev + OFONO_DEPENDENCIES += udev +else + OFONO_CONF_OPT += --disable-udev +endif + +ifeq ($(BR2_PACKAGE_BLUEZ_UTILS),y) + OFONO_CONF_OPT += --enable-bluetooth + OFONO_DEPENDENCIES += bluez_utils +else + OFONO_CONF_OPT += --disable-bluetooth +endif + +$(eval $(autotools-package)) diff --git a/package/ola/Config.in b/package/ola/Config.in new file mode 100644 index 0000000000..eb24a3a07c --- /dev/null +++ b/package/ola/Config.in @@ -0,0 +1,134 @@ +comment "ola needs a toolchain w/ C++, threads, largefile, wchar" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_LARGEFILE || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_OLA + bool "ola (open lighting architecture)" + select BR2_PACKAGE_PROTOBUF + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX + depends on BR2_INSTALL_LIBSTDCPP # protobuf + depends on BR2_LARGEFILE # util-linux + depends on BR2_USE_WCHAR # util-linux + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Open Lighting Architecture provides applications + with a mechanism to send and receive DMX512 & RDM + commands using hardware devices and DMX over IP protocols. + + http://www.opendmx.net/index.php/OLA + +if BR2_PACKAGE_OLA + +menu "bindings and interface" + +config BR2_PACKAGE_OLA_WEB + bool "http interface" + select BR2_PACKAGE_LIBMICROHTTPD + help + Build OLA with browser interface. + +config BR2_PACKAGE_OLA_PYTHON_BINDINGS + bool "python bindings" + select BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_PROTOBUF + depends on BR2_USE_MMU + help + Build OLA with support for the Python language. + +config BR2_PACKAGE_OLA_SLP + bool "slp tools" + help + Build OLA with slp tools. + +endmenu + +menu "tests and examples" + +config BR2_PACKAGE_OLA_EXAMPLES + bool "examples" + select BR2_PACKAGE_NCURSES + help + Build OLA examples. + +config BR2_PACKAGE_OLA_RDM_TESTS + bool "rdm tests" + select BR2_PACKAGE_OLA_PYTHON_BINDINGS + depends on BR2_USE_MMU + help + Build OLA RDM tests. + +endmenu + +menu "plugin selections" + +config BR2_PACKAGE_OLA_PLUGIN_E131 + bool "acn E131" + help + Build ACN E131 plugin for OLA. + +config BR2_PACKAGE_OLA_PLUGIN_ARTNET + bool "artnet" + help + Build Artnet plugin for OLA. + +config BR2_PACKAGE_OLA_PLUGIN_OPENDMX + bool "DMX4Linux" + help + Build DMX4Linux plugin for OLA. + +config BR2_PACKAGE_OLA_PLUGIN_DUMMY + bool "dummy" + help + Build Dummy plugin for OLA. + +config BR2_PACKAGE_OLA_PLUGIN_ESPNET + bool "espnet" + help + Build EspNet plugin for OLA. + +config BR2_PACKAGE_OLA_PLUGIN_KINET + bool "kinet" + help + Build KiNet plugin for OLA. + +config BR2_PACKAGE_OLA_PLUGIN_MILINT + bool "Milford Instruments" + help + Build Milford Instruments 1-463 plugin for OLA. + +config BR2_PACKAGE_OLA_PLUGIN_OSC + bool "osc" + select BR2_PACKAGE_LIBLO + help + Build Open Sound Control plugin for OLA. + +config BR2_PACKAGE_OLA_PLUGIN_PATHPORT + bool "pathport" + help + Build Pathport plugin for OLA. + +config BR2_PACKAGE_OLA_PLUGIN_SANDNET + bool "sandnet" + help + Build SandNet plugin for OLA. + +config BR2_PACKAGE_OLA_PLUGIN_SHOWNET + bool "shownet" + help + Build ShowNet plugin for OLA. + +config BR2_PACKAGE_OLA_PLUGIN_STAGEPROFI + bool "stageprofi" + select BR2_PACKAGE_LIBUSB + help + Build StageProfi plugin for OLA. + +config BR2_PACKAGE_OLA_PLUGIN_USBPRO + bool "usbpro" + select BR2_PACKAGE_LIBUSB + help + Build UsbPro plugin for OLA. + +endmenu + +endif diff --git a/package/ola/ola-0001-fix-build-warning.patch b/package/ola/ola-0001-fix-build-warning.patch new file mode 100644 index 0000000000..1fdb58fb28 --- /dev/null +++ b/package/ola/ola-0001-fix-build-warning.patch @@ -0,0 +1,27 @@ +Fix build on 64 bits architectures + +This upstream patch fixes a warning that, due to -Werror, is causing +build failures on 64 bits architectures. + +Signed-off-by: Thomas Petazzoni + +commit ea375582b0bfee93d66608ffc807078ffc48e961 +Author: Simon Newton +Date: Wed Oct 30 09:23:49 2013 -0700 + + * Avoid a compiler warning + +diff --git a/plugins/e131/e131/PreamblePacker.cpp b/plugins/e131/e131/PreamblePacker.cpp +index ef29e18..8dfcc72 100644 +--- a/plugins/e131/e131/PreamblePacker.cpp ++++ b/plugins/e131/e131/PreamblePacker.cpp +@@ -77,7 +77,8 @@ const uint8_t *PreamblePacker::Pack(const PDUBlock &pdu_block, + if (!m_send_buffer) + Init(); + +- unsigned int size = MAX_DATAGRAM_SIZE - sizeof(ACN_HEADER); ++ unsigned int size = MAX_DATAGRAM_SIZE - ++ static_cast(sizeof(ACN_HEADER)); + if (!pdu_block.Pack(m_send_buffer + sizeof(ACN_HEADER), &size)) { + OLA_WARN << "Failed to pack E1.31 PDU"; + return NULL; diff --git a/package/ola/ola.mk b/package/ola/ola.mk new file mode 100644 index 0000000000..bc7de24422 --- /dev/null +++ b/package/ola/ola.mk @@ -0,0 +1,147 @@ +################################################################################ +# +# ola +# +################################################################################ + +OLA_VERSION = 0.8.32 +OLA_SITE = https://open-lighting.googlecode.com/files + +OLA_LICENSE = LGPLv2.1+ (libola, libolacommon, Python bindings), GPLv2+ (libolaserver, olad, Python examples and tests) +OLA_LICENSE_FILES = LICENCE GPL LGPL +OLA_INSTALL_STAGING = YES + +# util-linux provides uuid lib +OLA_DEPENDENCIES = protobuf util-linux host-bison host-flex + +OLA_CONF_OPT = \ + --disable-gcov \ + --disable-tcmalloc \ + --disable-unittests \ + --disable-root-check \ + --disable-java-libs \ + --disable-fatal-warnings + +# sets where to find python libs built for target and required by ola +OLA_CONF_ENV = PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages +OLA_MAKE_ENV = PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages + +## OLA Bindings and Interface selections + +ifeq ($(BR2_PACKAGE_OLA_WEB),y) +OLA_CONF_OPT += --enable-http +OLA_DEPENDENCIES += libmicrohttpd +else +OLA_CONF_OPT += --disable-http +endif + +ifeq ($(BR2_PACKAGE_OLA_SLP),y) +OLA_CONF_OPT += --enable-slp +else +OLA_CONF_OPT += --disable-slp +endif + +ifeq ($(BR2_PACKAGE_OLA_PYTHON_BINDINGS),y) +OLA_CONF_OPT += --enable-python-libs +OLA_DEPENDENCIES += python python-protobuf +else +OLA_CONF_OPT += --disable-python-libs +endif + +## OLA Examples and Tests + +ifeq ($(BR2_PACKAGE_OLA_EXAMPLES),y) +OLA_CONF_OPT += --enable-examples +OLA_DEPENDENCIES += ncurses +else +OLA_CONF_OPT += --disable-examples +endif + +ifeq ($(BR2_PACKAGE_OLA_RDM_TESTS),y) +OLA_CONF_OPT += --enable-rdm-tests +else +OLA_CONF_OPT += --disable-rdm-tests +endif + +## OLA Plugin selections + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_E131),y) +OLA_CONF_OPT += --enable-e131 +else +OLA_CONF_OPT += --disable-e131 +endif + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_ARTNET),y) +OLA_CONF_OPT += --enable-artnet +else +OLA_CONF_OPT += --disable-artnet +endif + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_OPENDMX),y) +OLA_CONF_OPT += --enable-opendmx +else +OLA_CONF_OPT += --disable-opendmx +endif + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_DUMMY),y) +OLA_CONF_OPT += --enable-dummy +else +OLA_CONF_OPT += --disable-dummy +endif + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_ESPNET),y) +OLA_CONF_OPT += --enable-espnet +else +OLA_CONF_OPT += --disable-espnet +endif + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_KINET),y) +OLA_CONF_OPT += --enable-kinet +else +OLA_CONF_OPT += --disable-kinet +endif + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_OSC),y) +OLA_CONF_OPT += --enable-osc +OLA_DEPENDENCIES += liblo +else +OLA_CONF_OPT += --disable-osc +endif + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_MILINT),y) +OLA_CONF_OPT += --enable-milinst +else +OLA_CONF_OPT += --disable-milinst +endif + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_PATHPORT),y) +OLA_CONF_OPT += --enable-pathport +else +OLA_CONF_OPT += --disable-pathport +endif + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_SANDNET),y) +OLA_CONF_OPT += --enable-sandnet +else +OLA_CONF_OPT += --disable-sandnet +endif + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_SHOWNET),y) +OLA_CONF_OPT += --enable-shownet +else +OLA_CONF_OPT += --disable-shownet +endif + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_STAGEPROFI),y) +OLA_CONF_OPT += --enable-stageprofi --enable-libusb +else +OLA_CONF_OPT += --disable-stageprofi +endif + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_USBPRO),y) +OLA_CONF_OPT += --enable-usbpro --enable-libusb +else +OLA_CONF_OPT += --disable-usbpro +endif + +$(eval $(autotools-package)) diff --git a/package/olsr/Config.in b/package/olsr/Config.in index ada82b4066..0090643e26 100644 --- a/package/olsr/Config.in +++ b/package/olsr/Config.in @@ -1,6 +1,8 @@ config BR2_PACKAGE_OLSR bool "OLSR mesh networking Daemon" + depends on BR2_USE_MMU # fork() depends on BR2_INET_IPV6 + depends on BR2_TOOLCHAIN_HAS_THREADS help The Optimized Link State Routing protocol (OLSR) is a routing protocol that is optimised for mobile ad-hoc @@ -11,5 +13,6 @@ config BR2_PACKAGE_OLSR http://www.olsr.org/ -comment "olsr requires a toolchain with IPv6 support" - depends on !BR2_INET_IPV6 +comment "olsr needs a toolchain w/ IPv6, threads" + depends on BR2_USE_MMU + depends on !BR2_INET_IPV6 || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/olsr/S50olsr b/package/olsr/S50olsr index a8aefd3745..9f052da53e 100755 --- a/package/olsr/S50olsr +++ b/package/olsr/S50olsr @@ -6,7 +6,7 @@ case "$1" in start) echo "Starting OLSRd daemon: " - /usr/sbin/olsrd -d 0 -nofork & + /usr/sbin/olsrd -d 0 ;; stop) echo "Stopping OLSRd daemon: " diff --git a/package/olsr/olsr-configurable-ldconfig.patch b/package/olsr/olsr-configurable-ldconfig.patch new file mode 100644 index 0000000000..73fff7eecf --- /dev/null +++ b/package/olsr/olsr-configurable-ldconfig.patch @@ -0,0 +1,33 @@ +Make ldconfig configurable + +In a cross-compilation set up, running /sbin/ldconfig is useless, so +we make the path to ldconfig configurable through the environment/make +command line. This allows to pass LDCONFIG=/bin/true when doing +cross-compilation. + +[Gustavo: update patch for olsr 0.6.4] +Signed-off-by: Thomas Petazzoni + +diff -Nura olsrd-0.6.4.orig/make/Makefile.linux olsrd-0.6.4/make/Makefile.linux +--- olsrd-0.6.4.orig/make/Makefile.linux 2013-01-29 09:00:18.041356389 -0300 ++++ olsrd-0.6.4/make/Makefile.linux 2013-01-29 09:01:51.598226624 -0300 +@@ -3,6 +3,7 @@ + # + + ARCH := $(shell uname -m) ++LDCONFIG ?= /sbin/ldconfig + + DESTDIR ?= + prefix ?= /usr/local +@@ -26,9 +27,9 @@ + PLUGIN_SONAME ?= lib$(PLUGIN_NAME).so + PLUGIN_FULLNAME ?= $(PLUGIN_NAME).so.$(PLUGIN_VER) + INSTALL_LIB = install -D -m 755 $(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_FULLNAME); \ +- /sbin/ldconfig -n $(LIBDIR) ++ $(LDCONFIG) -n $(LIBDIR) + UNINSTALL_LIB = rm -f $(LIBDIR)/$(PLUGIN_FULLNAME); \ +- /sbin/ldconfig -n $(LIBDIR) ++ $(LDCONFIG) -n $(LIBDIR) + + ifdef OLSRD_PLUGIN + GENERATE_PIC = true diff --git a/package/olsr/olsr.mk b/package/olsr/olsr.mk index 03a8a02a0b..f96e570613 100644 --- a/package/olsr/olsr.mk +++ b/package/olsr/olsr.mk @@ -1,41 +1,44 @@ -############################################################# +################################################################################ # # olsr # -############################################################# +################################################################################ -OLSR_VERSION_MAJOR=0.5 -OLSR_VERSION_MINOR=6 -OLSR_VERSION:=$(OLSR_VERSION_MAJOR).$(OLSR_VERSION_MINOR) -OLSR_SOURCE:=olsrd-$(OLSR_VERSION).tar.bz2 -OLSR_SITE:=http://www.olsr.org/releases/$(OLSR_VERSION_MAJOR) -OLSR_BINARY:=olsrd -OLSR_TARGET_BINARY:=usr/sbin/olsrd -#OLSR_PLUGINS=httpinfo tas dot_draw nameservice dyn_gw dyn_gw_plain pgraph bmf quagga secure -OLSR_PLUGINS=dot_draw dyn_gw secure -OLSR_TARGET_PLUGIN=usr/lib/ +OLSR_VERSION_MAJOR = 0.6 +OLSR_VERSION_MINOR = 6 +OLSR_VERSION = $(OLSR_VERSION_MAJOR).$(OLSR_VERSION_MINOR) +OLSR_SOURCE = olsrd-$(OLSR_VERSION).tar.bz2 +OLSR_SITE = http://www.olsr.org/releases/$(OLSR_VERSION_MAJOR) +OLSR_PLUGINS = arprefresh bmf dot_draw dyn_gw dyn_gw_plain httpinfo jsoninfo \ + mdns nameservice p2pd pgraph secure txtinfo watchdog +# Doesn't really need quagga but not very useful without it +OLSR_PLUGINS += $(if $(BR2_PACKAGE_QUAGGA),quagga) +OLSR_LICENSE = BSD-3c LGPLv2.1+ +OLSR_LICENSE_FILES = license.txt lib/pud/nmealib/LICENSE +OLSR_DEPENDENCIES = host-flex host-bison define OLSR_BUILD_CMDS - $(TARGET_CONFIGURE_OPTS) $(MAKE) ARCH=$(KERNEL_ARCH) -C $(@D) olsrd $(OLSR_PLUGINS) + $(TARGET_CONFIGURE_OPTS) $(MAKE) ARCH=$(KERNEL_ARCH) -C $(@D) olsrd + for p in $(OLSR_PLUGINS) ; do \ + $(TARGET_CONFIGURE_OPTS) $(MAKE) ARCH=$(KERNEL_ARCH) -C $(@D)/lib/$$p ; \ + done endef define OLSR_INSTALL_TARGET_CMDS - cp -dpf $(@D)/$(OLSR_BINARY) $(TARGET_DIR)/$(OLSR_TARGET_BINARY) - cp -R $(@D)/lib/*/olsrd_*.so* $(TARGET_DIR)/$(OLSR_TARGET_PLUGIN) - mkdir -p $(TARGET_DIR)/etc/init.d - cp -dpf package/olsr/S50olsr $(TARGET_DIR)/etc/init.d/ - test -r $(TARGET_DIR)/etc/olsrd.conf || \ - cp -dpf $(@D)/files/olsrd.conf.default.lq $(TARGET_DIR)/etc/olsrd.conf - -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/$(OLSR_TARGET_PLUGIN)/olsrd_*.so* - $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/$(OLSR_TARGET_BINARY) + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) \ + prefix="/usr" install_bin + for p in $(OLSR_PLUGINS) ; do \ + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/lib/$$p \ + LDCONFIG=/bin/true DESTDIR=$(TARGET_DIR) \ + prefix="/usr" install ; \ + done + $(INSTALL) -D -m 0755 package/olsr/S50olsr $(TARGET_DIR)/etc/init.d/S50olsr + test -r $(TARGET_DIR)/etc/olsrd.conf || \ + $(INSTALL) -D -m 0644 $(@D)/files/olsrd.conf.default.lq $(TARGET_DIR)/etc/olsrd.conf endef define OLSR_CLEAN_CMDS - rm -f $(TARGET_DIR)/$(OLSR_TARGET_BINARY) \ - $(TARGET_DIR)/$(OLSR_TARGET_PLUGIN)/olsrd_*.so* \ - $(TARGET_DIR)/etc/init.d/S50olsr \ - $(TARGET_DIR)/etc/olsrd.conf -$(MAKE) -C $(@D) clean endef -$(eval $(call GENTARGETS,package,olsr)) +$(eval $(generic-package)) diff --git a/package/omap-u-boot-utils/Config.in.host b/package/omap-u-boot-utils/Config.in.host new file mode 100644 index 0000000000..87dcc06938 --- /dev/null +++ b/package/omap-u-boot-utils/Config.in.host @@ -0,0 +1,9 @@ +config BR2_PACKAGE_HOST_OMAP_U_BOOT_UTILS + bool "host omap-u-boot-utils" + depends on BR2_arm || BR2_armeb + help + U-Boot Utilities for Texas Instrument's OMAP platforms. + This is a set of tools to control U-Boot from scripts, generate + OMAP-specific signed image files and more. + + https://github.com/nmenon/omap-u-boot-utils diff --git a/package/omap-u-boot-utils/omap-u-boot-utils.mk b/package/omap-u-boot-utils/omap-u-boot-utils.mk new file mode 100644 index 0000000000..8e037186ab --- /dev/null +++ b/package/omap-u-boot-utils/omap-u-boot-utils.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# omap-u-boot-utils +# +################################################################################ + +OMAP_U_BOOT_UTILS_VERSION = 8aff852322c6f52bd09568bef7725ab509d81725 +OMAP_U_BOOT_UTILS_SITE = http://github.com/nmenon/omap-u-boot-utils/tarball/$(OMAP_U_BOOT_UTILS_VERSION) +OMAP_U_BOOT_UTILS_LICENSE = GPLv2, GPLv2+ +OMAP_U_BOOT_UTILS_LICENSE_FILES = COPYING + +define HOST_OMAP_U_BOOT_UTILS_BUILD_CMDS + $(MAKE) -C $(@D) +endef + +define HOST_OMAP_U_BOOT_UTILS_INSTALL_CMDS + for f in gpsign pserial tagger ucmd ukermit ; do \ + install -m 755 -D $(@D)/$$f $(HOST_DIR)/usr/bin/$$f ; \ + done +endef + +$(eval $(host-generic-package)) diff --git a/package/omniorb/Config.in b/package/omniorb/Config.in new file mode 100644 index 0000000000..192ad54fc2 --- /dev/null +++ b/package/omniorb/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_OMNIORB + bool "omniorb" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + help + omniORB is a robust high performance CORBA ORB for C++ and Python. + omniORB is largely CORBA 2.6 compliant. omniORB is one of only + three ORBs to have been awarded the Open Group's Open Brand for + CORBA. This means that omniORB has been tested and certified + CORBA compliant, to version 2.1 of the CORBA specification. + + http://omniorb.sourceforge.net/ + +comment "omniORB needs a toolchain w/ C++, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/omniorb/omniorb.mk b/package/omniorb/omniorb.mk new file mode 100644 index 0000000000..490ff93c6d --- /dev/null +++ b/package/omniorb/omniorb.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# omniorb +# +################################################################################ + +OMNIORB_VERSION = 4.1.6 +OMNIORB_SITE = http://downloads.sourceforge.net/project/omniorb/omniORB/omniORB-$(OMNIORB_VERSION) +OMNIORB_SOURCE = omniORB-$(OMNIORB_VERSION).tar.bz2 +OMNIORB_INSTALL_STAGING = YES +OMNIORB_LICENSE = GPL2+ LGPLv2.1+ +OMNIORB_LICENSE_FILES = COPYING COPYING.LIB +OMNIORB_DEPENDENCIES = host-omniorb +HOST_OMNIORB_DEPENDENCIES = host-python +OMNIORB_INSTALL_TARGET = YES + +# Defaulting long double support to a safe option for the +# mix of embedded targets, this could later be automated +# based on checking the capability of the cross toolchain +# for "__LONG_DOUBLE_128__". Currently the host and target +# need to match because of the code generation done by the +# host tools during the target compile (ie headers generated +# on host are used in target build). +OMNIORB_CONF_OPT += --disable-longdouble +HOST_OMNIORB_CONF_OPT += --disable-longdouble + +# omniORB is not completely cross-compile friendly and has some +# assumptions where a couple host tools must be built and then +# used by the target build. The host tools generate code from +# the IDL description language, which is then built into the +# cross compiled target OMNIORB application. +define OMNIORB_ADJUST_TOOLDIR + # Point to the host folder to get HOST_OMNIORB tools + $(SED) 's:TOOLBINDIR = $$(TOP)/$$(BINDIR):TOOLBINDIR = $(HOST_DIR)/usr/bin:g' $(@D)/mk/beforeauto.mk + # Disables OMNIORB tool building + echo "EmbeddedSystem=1" >> $(@D)/mk/beforeauto.mk +endef +OMNIORB_POST_CONFIGURE_HOOKS += OMNIORB_ADJUST_TOOLDIR + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/on2-8170-libs/Config.in b/package/on2-8170-libs/Config.in new file mode 100644 index 0000000000..b573cfe3de --- /dev/null +++ b/package/on2-8170-libs/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_ON2_8170_LIBS + #This is a binary only package which has been compiled for glibc + depends on BR2_arm926t + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_LINUX_KERNEL # on2-8170-modules + select BR2_PACKAGE_ON2_8170_MODULES # runtime + bool "on2-8170-libs" + help + Libraries for Hantro X170 video decoder + + http://www.at91.com/linux4sam/bin/view/Linux4SAM/SAM9M10Gstreamer + +comment "on2-8170-libs needs an (e)glibc toolchain and a linux kernel to be built" + depends on BR2_arm926t + depends on !BR2_LINUX_KERNEL || !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/on2-8170-libs/on2-8170-libs.mk b/package/on2-8170-libs/on2-8170-libs.mk new file mode 100644 index 0000000000..7cdb9918af --- /dev/null +++ b/package/on2-8170-libs/on2-8170-libs.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# on2-8170-libs +# +################################################################################ + +ON2_8170_LIBS_VERSION = 1.0 +ON2_8170_LIBS_SITE = ftp://ftp.linux4sam.org/pub/demo/linux4sam_1.9/codec/ + +ON2_8170_LICENSE = PROPRIETARY +# No license file is included in the archive + +ON2_8170_LIBS_INSTALL_STAGING = YES + +define ON2_8170_LIBS_INSTALL_STAGING_CMDS + mkdir -p $(STAGING_DIR)/usr/lib $(STAGING_DIR)/usr/include + cp -dpf $(@D)/*.a $(@D)/*.so $(STAGING_DIR)/usr/lib + cp -dpf $(@D)/*.h $(STAGING_DIR)/usr/include +endef + +define ON2_8170_LIBS_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/usr/lib + cp -dpf $(@D)/*.so $(TARGET_DIR)/usr/lib +endef + +$(eval $(generic-package)) diff --git a/package/on2-8170-modules/Config.in b/package/on2-8170-modules/Config.in new file mode 100644 index 0000000000..58ee88f270 --- /dev/null +++ b/package/on2-8170-modules/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_ON2_8170_MODULES + bool "on2-8170 modules" + depends on BR2_LINUX_KERNEL + depends on BR2_arm926t + help + Kernel modules for Hantro x170 hardware video decompression support. + + http://www.at91.com/linux4sam/bin/view/Linux4SAM/SAM9M10Gstreamer + +comment "on2-8170 modules requires a linux kernel to be built" + depends on BR2_arm926t + depends on !BR2_LINUX_KERNEL diff --git a/package/on2-8170-modules/on2-8170-modules.mk b/package/on2-8170-modules/on2-8170-modules.mk new file mode 100644 index 0000000000..d33288569d --- /dev/null +++ b/package/on2-8170-modules/on2-8170-modules.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# on2-8170-modules +# +################################################################################ + +ON2_8170_MODULES_VERSION = 73b08061d30789178e692bc332b73d1d9922bf39 +ON2_8170_MODULES_SITE = http://github.com/alexandrebelloni/on2-8170-modules/tarball/$(ON2_8170_MODULES_VERSION) + +ON2_8170_MODULES_DEPENDENCIES = linux + +ON2_8170_MODULES_LICENSE = GPLv2+ +#There is no license file + +define ON2_8170_MODULES_BUILD_CMDS + $(MAKE) -C $(LINUX_DIR) $(LINUX_MAKE_FLAGS) M=$(@D) +endef + +define ON2_8170_MODULES_INSTALL_TARGET_CMDS + $(MAKE) -C $(LINUX_DIR) $(LINUX_MAKE_FLAGS) M=$(@D) modules_install +endef + +$(eval $(generic-package)) diff --git a/package/open2300/Config.in b/package/open2300/Config.in new file mode 100644 index 0000000000..df0a969fa6 --- /dev/null +++ b/package/open2300/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_OPEN2300 + bool "open2300" + help + open2300 reads (and writes) data from a Lacrosse + WS2300/WS2305/WS2310/WS2315 Weather Station + + http://www.lavrsen.dk/foswiki/bin/view/Open2300/WebHome diff --git a/package/open2300/open2300.mk b/package/open2300/open2300.mk new file mode 100644 index 0000000000..d083795798 --- /dev/null +++ b/package/open2300/open2300.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# open2300 +# +################################################################################ + +OPEN2300_SITE = http://www.lavrsen.dk/svn/open2300/trunk/ +OPEN2300_SITE_METHOD = svn +OPEN2300_VERSION = 12 + +OPEN2300_BINS = open2300 dump2300 log2300 fetch2300 wu2300 cw2300 history2300 \ + histlog2300 bin2300 xml2300 light2300 interval2300 minmax2300 + +ifeq ($(BR2_PACKAGE_MYSQL),y) + OPEN2300_DEPENDENCIES += mysql_client + OPEN2300_BINS += mysql2300 mysqlhistlog2300 +endif + +define OPEN2300_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) $(OPEN2300_BINS) +endef + +define OPEN2300_INSTALL_TARGET_CMDS + for prog in $(OPEN2300_BINS); do \ + $(INSTALL) -D -m 0755 $(@D)/$$prog $(TARGET_DIR)/usr/bin/$$prog ; \ + done +endef + +$(eval $(generic-package)) diff --git a/package/opencv/Config.in b/package/opencv/Config.in new file mode 100644 index 0000000000..146011ad7c --- /dev/null +++ b/package/opencv/Config.in @@ -0,0 +1,212 @@ +menuconfig BR2_PACKAGE_OPENCV + bool "opencv" + select BR2_PACKAGE_ZLIB + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + help + OpenCV (Open Source Computer Vision) is a library of programming + functions for real time computer vision. + + http://opencv.willowgarage.com/wiki/ + +if BR2_PACKAGE_OPENCV + +comment "OpenCV modules" + +config BR2_PACKAGE_OPENCV_LIB_CALIB3D + bool "calib3d" + default y + help + Include opencv_calib3d module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_CONTRIB + bool "contrib" + default y + help + Include opencv_contrib module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_CORE + bool "core" + default y + help + Include opencv_core module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_FEATURES2D + bool "features2d" + default y + help + Include opencv_features2d module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_FLANN + bool "flann" + default y + help + Include opencv_flann module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_GPU + bool "gpu" + help + Include opencv_gpu module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_HIGHGUI + bool "highgui" + default y + help + Include opencv_highgui module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_IMGPROC + bool "imgproc" + default y + help + Include opencv_imgproc module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_LEGACY + bool "legacy" + default y + help + Include opencv_legacy module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_ML + bool "ml (machine learning)" + default y + help + Include opencv_ml module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_NONFREE + bool "nonfree" + help + Include opencv_nonfree module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_OBJDETECT + bool "objdetect" + default y + help + Include opencv_objdetect module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_PHOTO + bool "photo" + default y + help + Include opencv_photo module into the OpenCV build. + +comment "opencv_python module requires numpy which is not yet available." + +config BR2_PACKAGE_OPENCV_LIB_STITCHING + bool "stitching" + default y + help + Include opencv_stitching module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_TS + bool "ts (touchscreen)" + default y + help + Include opencv_ts module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_VIDEO + bool "video" + default y + help + Include opencv_video module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_VIDEOSTAB + bool "videostab" + default y + help + Include opencv_videostab module into the OpenCV build. + +comment "Test sets" +config BR2_PACKAGE_OPENCV_BUILD_TESTS + bool "build tests" + +config BR2_PACKAGE_OPENCV_BUILD_PERF_TESTS + bool "build performance tests" + +comment "3rd party support" + +config BR2_PACKAGE_OPENCV_WITH_FFMPEG + bool "ffmpeg support" + depends on BR2_LARGEFILE + depends on BR2_INET_IPV6 + select BR2_PACKAGE_BZIP2 + select BR2_PACKAGE_FFMPEG + select BR2_PACKAGE_FFMPEG_SWSCALE + help + Use ffmpeg from the target system. + +comment "ffmpeg support needs a toolchain w/ largefile, IPv6" + depends on !(BR2_LARGEFILE && BR2_INET_IPV6) + +config BR2_PACKAGE_OPENCV_WITH_GSTREAMER + bool "gstreamer support" + depends on BR2_USE_WCHAR # gstreamer -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # gstreamer -> libglib2 + select BR2_PACKAGE_GSTREAMER + select BR2_PACKAGE_GST_PLUGINS_BASE + select BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_APP + +comment "gstreamer support needs a toolchain w/ wchar, threads" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_OPENCV_WITH_GTK + bool "gtk support" + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_WCHAR # libgtk2 -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk2 -> libglib2 + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_LIBGTK2 + +config BR2_PACKAGE_OPENCV_WITH_JPEG + bool "jpeg support" + select BR2_PACKAGE_JPEG + help + Use shared libjpeg from the target system. + +config BR2_PACKAGE_OPENCV_WITH_PNG + bool "png support" + select BR2_PACKAGE_LIBPNG + help + Use shared libpng from the target system. + +config BR2_PACKAGE_OPENCV_WITH_QT + bool "qt backend support" + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_avr32 # qt + select BR2_PACKAGE_QT + select BR2_PACKAGE_QT_STL + default y + help + Use Qt with STL support + +config BR2_PACKAGE_OPENCV_WITH_TIFF + bool "tiff support" + select BR2_PACKAGE_TIFF + help + Use shared libtiff from the target system. + +config BR2_PACKAGE_OPENCV_WITH_V4L + bool "v4l support" + depends on BR2_LARGEFILE + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBV4L + help + Enable Video 4 Linux support. + +comment "v4l support needs a toolchain w/ largefile, threads" + depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS + +comment "Install options" + +config BR2_PACKAGE_OPENCV_INSTALL_DATA + bool "install extra data" + help + Install various data that is used by cv libraries and/or demo + applications, specifically for haarcascades and lbpcascades + features. + + For further information: see OpenCV documentation. + +endif # BR2_PACKAGE_OPENCV + +comment "opencv needs a toolchain w/ C++, wchar" + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR) diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk new file mode 100644 index 0000000000..b9ed8cbc86 --- /dev/null +++ b/package/opencv/opencv.mk @@ -0,0 +1,185 @@ +################################################################################ +# +# opencv +# +################################################################################ + +OPENCV_VERSION = 2.4.2 +OPENCV_SITE = http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/$(OPENCV_VERSION) +OPENCV_SOURCE = OpenCV-$(OPENCV_VERSION).tar.bz2 +OPENCV_INSTALL_STAGING = YES + +OPENCV_CONF_OPT += \ + -DCMAKE_BUILD_TYPE=$(if $(BR2_ENABLE_DEBUG),Debug,Release) \ + -DBUILD_SHARED_LIBS=$(if $(BR2_PREFER_STATIC_LIB),OFF,ON) \ + -DBUILD_WITH_STATIC_CRT=OFF \ + -DBUILD_DOCS=$(if $(BR2_HAVE_DOCUMENTATION),ON,OFF) \ + -DBUILD_EXAMPLES=OFF \ + -DBUILD_PACKAGE=OFF \ + -DBUILD_TESTS=$(if $(BR2_PACKAGE_OPENCV_BUILD_TESTS),ON,OFF) \ + -DBUILD_PERF_TESTS=$(if $(BR2_PACKAGE_OPENCV_BUILD_PERF_TESTS),ON,OFF) \ + -DBUILD_WITH_DEBUG_INFO=OFF \ + -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=OFF \ + -DCMAKE_SKIP_RPATH=OFF \ + -DCMAKE_USE_RELATIVE_PATHS=OFF \ + -DENABLE_FAST_MATH=ON \ + -DENABLE_NOISY_WARNINGS=OFF \ + -DENABLE_OMIT_FRAME_POINTER=ON \ + -DENABLE_PRECOMPILED_HEADERS=OFF \ + -DENABLE_PROFILING=OFF \ + -DENABLE_SOLUTION_FOLDERS=OFF \ + -DOPENCV_CAN_BREAK_BINARY_COMPATIBILITY=ON + +# OpenCV module selection +OPENCV_CONF_OPT += \ + -DBUILD_opencv_androidcamera=OFF \ + -DBUILD_opencv_calib3d=$(if $(BR2_PACKAGE_OPENCV_LIB_CALIB3D),ON,OFF) \ + -DBUILD_opencv_contrib=$(if $(BR2_PACKAGE_OPENCV_LIB_CONTRIB),ON,OFF) \ + -DBUILD_opencv_core=$(if $(BR2_PACKAGE_OPENCV_LIB_CORE),ON,OFF) \ + -DBUILD_opencv_features2d=$(if $(BR2_PACKAGE_OPENCV_LIB_FEATURES2D),ON,OFF) \ + -DBUILD_opencv_flann=$(if $(BR2_PACKAGE_OPENCV_LIB_FLANN),ON,OFF) \ + -DBUILD_opencv_gpu=$(if $(BR2_PACKAGE_OPENCV_LIB_GPU),ON,OFF) \ + -DBUILD_opencv_highgui=$(if $(BR2_PACKAGE_OPENCV_LIB_HIGHGUI),ON,OFF) \ + -DBUILD_opencv_imgproc=$(if $(BR2_PACKAGE_OPENCV_LIB_IMGPROC),ON,OFF) \ + -DBUILD_opencv_java=OFF \ + -DBUILD_opencv_legacy=$(if $(BR2_PACKAGE_OPENCV_LIB_LEGACY),ON,OFF) \ + -DBUILD_opencv_ml=$(if $(BR2_PACKAGE_OPENCV_LIB_ML),ON,OFF) \ + -DBUILD_opencv_nonfree=$(if $(BR2_PACKAGE_OPENCV_LIB_NONFREE),ON,OFF) \ + -DBUILD_opencv_objdetect=$(if $(BR2_PACKAGE_OPENCV_LIB_OBJDETECT),ON,OFF) \ + -DBUILD_opencv_photo=$(if $(BR2_PACKAGE_OPENCV_LIB_PHOTO),ON,OFF) \ + -DBUILD_opencv_python=OFF \ + -DBUILD_opencv_stitching=$(if $(BR2_PACKAGE_OPENCV_LIB_STITCHING),ON,OFF) \ + -DBUILD_opencv_ts=$(if $(BR2_PACKAGE_OPENCV_LIB_TS),ON,OFF) \ + -DBUILD_opencv_video=$(if $(BR2_PACKAGE_OPENCV_LIB_VIDEO),ON,OFF) \ + -DBUILD_opencv_videostab=$(if $(BR2_PACKAGE_OPENCV_LIB_VIDEOSTAB),ON,OFF) \ + -DBUILD_opencv_world=OFF + +# Hardware support options. +# +# * PowerPC support is turned off since its only effect is altering CFLAGS, +# adding '-mcpu=G3 -mtune=G5' to them, which is already handled by Buildroot. +OPENCV_CONF_OPT += \ + -DENABLE_POWERPC=OFF \ + -DENABLE_SSE=$(if $(BR2_X86_CPU_HAS_SSE),ON,OFF) \ + -DENABLE_SSE2=$(if $(BR2_X86_CPU_HAS_SSE2),ON,OFF) \ + -DENABLE_SSE3=$(if $(BR2_X86_CPU_HAS_SSE3),ON,OFF) \ + -DENABLE_SSSE3=$(if $(BR2_X86_CPU_HAS_SSSE3),ON,OFF) + +# Software/3rd-party support options. +OPENCV_CONF_OPT += \ + -DBUILD_JASPER=OFF \ + -DBUILD_JPEG=OFF \ + -DBUILD_PNG=OFF \ + -DBUILD_TIFF=OFF \ + -DBUILD_ZLIB=OFF \ + -DBUILD_ANDROID_CAMERA_WRAPPER=OFF \ + -DBUILD_ANDROID_EXAMPLES=OFF \ + -DBUILD_FAT_JAVA_LIB=OFF \ + -DBUILD_JAVA_SUPPORT=OFF \ + -DBUILD_NEW_PYTHON_SUPPORT=OFF \ + -DINSTALL_ANDROID_EXAMPLES=OFF \ + -DINSTALL_C_EXAMPLES=OFF \ + -DINSTALL_PYTHON_EXAMPLES=OFF \ + -DINSTALL_TO_MANGLED_PATHS=OFF \ + -DWITH_1394=OFF \ + -DWITH_ANDROID_CAMERA=OFF \ + -DWITH_AVFOUNDATION=OFF \ + -DWITH_CARBON=OFF \ + -DWITH_CUBLAS=OFF \ + -DWITH_CUDA=OFF \ + -DWITH_CUFFT=OFF \ + -DWITH_EIGEN=OFF \ + -DWITH_IMAGEIO=OFF \ + -DWITH_IPP=OFF \ + -DWITH_JASPER=OFF \ + -DWITH_OPENEXR=OFF \ + -DWITH_OPENGL=OFF \ + -DWITH_OPENNI=OFF \ + -DWITH_PVAPI=OFF \ + -DWITH_QUICKTIME=OFF \ + -DWITH_TBB=OFF \ + -DWITH_UNICAP=OFF \ + -DWITH_VIDEOINPUT=OFF \ + -DWITH_XIMEA=OFF \ + -DWITH_XINE=OFF + +OPENCV_DEPENDENCIES += zlib + +ifeq ($(BR2_PACKAGE_OPENCV_WITH_FFMPEG),y) +OPENCV_CONF_OPT += -DWITH_FFMPEG=ON +OPENCV_DEPENDENCIES += ffmpeg bzip2 +else +OPENCV_CONF_OPT += -DWITH_FFMPEG=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV_WITH_GSTREAMER),y) +OPENCV_CONF_OPT += -DWITH_GSTREAMER=ON +OPENCV_DEPENDENCIES += gstreamer gst-plugins-base +else +OPENCV_CONF_OPT += -DWITH_GSTREAMER=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK),y) +OPENCV_CONF_OPT += -DWITH_GTK=ON +OPENCV_DEPENDENCIES += libgtk2 +else +OPENCV_CONF_OPT += -DWITH_GTK=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV_WITH_JPEG),y) +OPENCV_CONF_OPT += -DWITH_JPEG=ON +OPENCV_DEPENDENCIES += jpeg +else +OPENCV_CONF_OPT += -DWITH_JPEG=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV_WITH_PNG),y) +OPENCV_CONF_OPT += -DWITH_PNG=ON +OPENCV_DEPENDENCIES += libpng +else +OPENCV_CONF_OPT += -DWITH_PNG=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT),y) +OPENCV_CONF_OPT += -DWITH_QT=ON +OPENCV_DEPENDENCIES += qt +else +OPENCV_CONF_OPT += -DWITH_QT=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV_WITH_TIFF),y) +OPENCV_CONF_OPT += -DWITH_TIFF=ON +OPENCV_DEPENDENCIES += tiff +else +OPENCV_CONF_OPT += -DWITH_TIFF=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV_WITH_V4L),y) +OPENCV_CONF_OPT += -DWITH_V4L=ON +OPENCV_DEPENDENCIES += libv4l +else +OPENCV_CONF_OPT += -DWITH_V4L=OFF +endif + +# Installation hooks: +ifneq ($(BR2_HAVE_DOCUMENTATION),y) +define OPENCV_CLEAN_INSTALL_DOC + $(RM) -fr $(TARGET_DIR)/usr/share/OpenCV/doc +endef +OPENCV_POST_INSTALL_TARGET_HOOKS += OPENCV_CLEAN_INSTALL_DOC +endif + +define OPENCV_CLEAN_INSTALL_CMAKE + $(RM) -f $(TARGET_DIR)/usr/share/OpenCV/OpenCVConfig*.cmake +endef +OPENCV_POST_INSTALL_TARGET_HOOKS += OPENCV_CLEAN_INSTALL_CMAKE + +ifneq ($(BR2_PACKAGE_OPENCV_INSTALL_DATA),y) +define OPENCV_CLEAN_INSTALL_DATA + $(RM) -fr $(TARGET_DIR)/usr/share/OpenCV/haarcascades \ + $(TARGET_DIR)/usr/share/OpenCV/lbpcascades +endef +OPENCV_POST_INSTALL_TARGET_HOOKS += OPENCV_CLEAN_INSTALL_DATA +endif + +$(eval $(cmake-package)) diff --git a/package/opengl/Config.in b/package/opengl/Config.in new file mode 100644 index 0000000000..1636807a84 --- /dev/null +++ b/package/opengl/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_HAS_OPENGL_EGL + bool + +config BR2_PACKAGE_HAS_OPENGL_ES + bool + +config BR2_PACKAGE_HAS_OPENVG + bool + +config BR2_PACKAGE_HAS_OPENMAX + bool diff --git a/package/opengl/libegl/libegl.mk b/package/opengl/libegl/libegl.mk new file mode 100644 index 0000000000..c194b02764 --- /dev/null +++ b/package/opengl/libegl/libegl.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# libegl +# +################################################################################ + +LIBEGL_SOURCE = + +ifeq ($(BR2_PACKAGE_RPI_USERLAND),y) +LIBEGL_DEPENDENCIES += rpi-userland +endif + +ifeq ($(BR2_PACKAGE_TI_GFX),y) +LIBEGL_DEPENDENCIES += ti-gfx +endif + +ifeq ($(BR2_PACKAGE_SUNXI_MALI),y) +LIBEGL_DEPENDENCIES += sunxi-mali +endif + +ifeq ($(BR2_PACKAGE_GPU_VIV_BIN_MX6Q),y) +LIBEGL_DEPENDENCIES += gpu-viv-bin-mx6q +endif + +ifeq ($(LIBEGL_DEPENDENCIES),) +define LIBEGL_CONFIGURE_CMDS + echo "No libEGL implementation selected. Configuration error." + exit 1 +endef +endif + +$(eval $(generic-package)) diff --git a/package/opengl/libgles/libgles.mk b/package/opengl/libgles/libgles.mk new file mode 100644 index 0000000000..ec157ac506 --- /dev/null +++ b/package/opengl/libgles/libgles.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# libgles +# +################################################################################ + +LIBGLES_SOURCE = + +ifeq ($(BR2_PACKAGE_RPI_USERLAND),y) +LIBGLES_DEPENDENCIES += rpi-userland +endif + +ifeq ($(BR2_PACKAGE_TI_GFX),y) +LIBGLES_DEPENDENCIES += ti-gfx +endif + +ifeq ($(BR2_PACKAGE_SUNXI_MALI),y) +LIBGLES_DEPENDENCIES += sunxi-mali +endif + +ifeq ($(BR2_PACKAGE_GPU_VIV_BIN_MX6Q),y) +LIBGLES_DEPENDENCIES += gpu-viv-bin-mx6q +endif + +ifeq ($(LIBGLES_DEPENDENCIES),) +define LIBGLES_CONFIGURE_CMDS + echo "No libGLES implementation selected. Configuration error." + exit 1 +endef +endif + +$(eval $(generic-package)) diff --git a/package/opengl/libopenmax/libopenmax.mk b/package/opengl/libopenmax/libopenmax.mk new file mode 100644 index 0000000000..9e6f89aaa6 --- /dev/null +++ b/package/opengl/libopenmax/libopenmax.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# libopenmax +# +################################################################################ + +LIBOPENMAX_SOURCE = + +ifeq ($(BR2_PACKAGE_RPI_USERLAND),y) +LIBOPENMAX_DEPENDENCIES += rpi-userland +endif + +ifeq ($(BR2_PACKAGE_BELLAGIO),y) +LIBOPENMAX_DEPENDENCIES += bellagio +endif + +ifeq ($(LIBOPENMAX_DEPENDENCIES),) +define LIBOPENMAX_CONFIGURE_CMDS + echo "No libopenmax implementation selected. Configuration error." + exit 1 +endef +endif + +$(eval $(generic-package)) diff --git a/package/opengl/libopenvg/libopenvg.mk b/package/opengl/libopenvg/libopenvg.mk new file mode 100644 index 0000000000..3296f63915 --- /dev/null +++ b/package/opengl/libopenvg/libopenvg.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# libopenvg +# +################################################################################ + +LIBOPENVG_SOURCE = + +ifeq ($(BR2_PACKAGE_RPI_USERLAND),y) +LIBOPENVG_DEPENDENCIES += rpi-userland +endif + +ifeq ($(LIBOPENVG_DEPENDENCIES),) +define LIBOPENVG_CONFIGURE_CMDS + echo "No libOpenVG implementation selected. Configuration error." + exit 1 +endef +endif + +$(eval $(generic-package)) diff --git a/package/opengl/opengl.mk b/package/opengl/opengl.mk new file mode 100644 index 0000000000..abf96d5c70 --- /dev/null +++ b/package/opengl/opengl.mk @@ -0,0 +1 @@ +include $(sort $(wildcard package/opengl/*/*.mk)) diff --git a/package/openntpd/Config.in b/package/openntpd/Config.in index 6b8beb8282..4dd9a297d5 100644 --- a/package/openntpd/Config.in +++ b/package/openntpd/Config.in @@ -1,7 +1,11 @@ config BR2_PACKAGE_OPENNTPD - bool "OpenNTPD" + bool "openntpd" + # fork() + depends on BR2_USE_MMU help - OpenNTPD is an easy to use implementation of the Network Time - Protocol. It provides the ability to sync the local clock - to remote NTP servers and can act as NTP server itself, - redistributing the local clock. It just works. + OpenNTPD is an easy to use implementation of the Network Time + Protocol. It provides the ability to sync the local clock + to remote NTP servers and can act as NTP server itself, + redistributing the local clock. It just works. + + http://www.openntpd.org/ diff --git a/package/openntpd/openntpd.mk b/package/openntpd/openntpd.mk index 3555ffa6cb..cd9bab6519 100644 --- a/package/openntpd/openntpd.mk +++ b/package/openntpd/openntpd.mk @@ -1,12 +1,14 @@ -############################################################# +################################################################################ # -# OpenNTPD +# openntpd # -############################################################# +################################################################################ OPENNTPD_VERSION = 3.9p1 OPENNTPD_SITE = ftp://ftp.openbsd.org/pub/OpenBSD/OpenNTPD OPENNTPD_CONF_OPT = --with-builtin-arc4random --disable-strip +OPENNTPD_LICENSE = MIT-like, BSD-2c, BSD-3c +OPENNTPD_LICENSE_FILES = LICENCE define OPENNTPD_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/sbin/ntpd @@ -14,4 +16,4 @@ define OPENNTPD_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/share/man/man?/ntpd* endef -$(eval $(call AUTOTARGETS,package,openntpd)) +$(eval $(autotools-package)) diff --git a/package/openobex/Config.in b/package/openobex/Config.in new file mode 100644 index 0000000000..9b9d2f9a29 --- /dev/null +++ b/package/openobex/Config.in @@ -0,0 +1,46 @@ +config BR2_PACKAGE_OPENOBEX + bool "openobex" + depends on BR2_INET_IPV6 + help + Free open source implementation of the Object Exchange (OBEX) + protocol. + + http://www.openobex.org + +if BR2_PACKAGE_OPENOBEX + +config BR2_PACKAGE_OPENOBEX_BLUEZ + bool "enable bluez support" + depends on !BR2_avr32 + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, alsa-lib, libglib2 + depends on BR2_USE_MMU # dbus + select BR2_PACKAGE_BLUEZ_UTILS + +comment "bluez support needs a toolchain w/ wchar, threads" + depends on !BR2_avr32 && BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_OPENOBEX_LIBUSB + bool "enable libusb support" + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBUSB + +comment "libusb support needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_OPENOBEX_APPS + bool "install test applications" + help + Also install the openobex test applications on target. + +config BR2_PACKAGE_OPENOBEX_SYSLOG + bool "enable debugging to the system logger" + +config BR2_PACKAGE_OPENOBEX_DUMP + bool "enable protocol dumping for debugging" + +endif + +comment "openobex needs a toolchain w/ IPv6" + depends on !BR2_INET_IPV6 diff --git a/package/openobex/openobex-libusb_check_when_cross-compiling.patch b/package/openobex/openobex-libusb_check_when_cross-compiling.patch new file mode 100644 index 0000000000..7b8056afcc --- /dev/null +++ b/package/openobex/openobex-libusb_check_when_cross-compiling.patch @@ -0,0 +1,18 @@ +Fix libusb check when cross-compiling. + +Signed-off-by: Julien Boibessot +Signed-off-by: Samuel Martin + +Index: openobex-1.5/acinclude.m4 +=================================================================== +--- openobex-1.5.orig/acinclude.m4 2010-06-16 10:32:47.000000000 +0200 ++++ openobex-1.5/acinclude.m4 2010-06-16 10:35:33.000000000 +0200 +@@ -158,7 +158,7 @@ + ;; + *) + PKG_CHECK_MODULES(USB, libusb, usb_lib_found=yes, AC_MSG_RESULT(no)) +- AC_CHECK_FILE(${prefix}/lib/pkgconfig/libusb.pc, REQUIRES="libusb") ++ REQUIRES="libusb" + ;; + esac + AC_SUBST(USB_CFLAGS) diff --git a/package/openobex/openobex-replace_deprecated_functions.patch b/package/openobex/openobex-replace_deprecated_functions.patch new file mode 100644 index 0000000000..17274d385b --- /dev/null +++ b/package/openobex/openobex-replace_deprecated_functions.patch @@ -0,0 +1,30 @@ +obex_test_cable.c: avoid to use SuSv3 LEGACY APIs + +Signed-off-by: Julien Boibessot +Signed-off-by: Samuel Martin + +Index: openobex-1.5/apps/obex_test_cable.c +=================================================================== +--- openobex-1.5.orig/apps/obex_test_cable.c 2009-02-08 19:30:22.000000000 +0100 ++++ openobex-1.5/apps/obex_test_cable.c 2010-06-16 11:11:05.000000000 +0200 +@@ -113,9 +113,9 @@ + if(total == sizeof(tmpbuf)) + return -1; + +- if( (answer = index(tmpbuf, '\n')) ) { ++ if( (answer = strchr(tmpbuf, '\n')) ) { + // Remove first line (echo) +- if( (answer_end = index(answer+1, '\n')) ) { ++ if( (answer_end = strchr(answer+1, '\n')) ) { + // Found end of answer + done = 1; + } +@@ -178,7 +178,7 @@ + } + + tcgetattr(gt->ttyfd, >->oldtio); +- bzero(>->newtio, sizeof(struct termios)); ++ memset(>->newtio, 0, sizeof(struct termios)); + gt->newtio.c_cflag = B115200 | CS8 | CREAD | CRTSCTS; + gt->newtio.c_iflag = IGNPAR; + gt->newtio.c_oflag = 0; diff --git a/package/openobex/openobex.mk b/package/openobex/openobex.mk new file mode 100644 index 0000000000..7195a264aa --- /dev/null +++ b/package/openobex/openobex.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# openobex +# +################################################################################ + +OPENOBEX_VERSION = 1.5 +OPENOBEX_SITE = http://ftp.osuosl.org/pub/linux/bluetooth +# Libraries seems to be released under LGPLv2.1+, +# while other material is under GPLv2+. +OPENOBEX_LICENSE = GPLv2+/LGPLv2.1+ +OPENOBEX_LICENSE_FILES = COPYING COPYING.LIB + +OPENOBEX_DEPENDENCIES = host-pkgconf +OPENOBEX_AUTORECONF = YES +OPENOBEX_INSTALL_STAGING = YES + +OPENOBEX_CONF_OPT += \ + $(if $(BR2_ENABLE_DEBUG),--enable-debug) \ + $(if $(BR2_PACKAGE_OPENOBEX_APPS),--enable-apps) \ + $(if $(BR2_PACKAGE_OPENOBEX_SYSLOG),--enable-syslog) \ + $(if $(BR2_PACKAGE_OPENOBEX_DUMP),--enable-dump) + +ifeq ($(BR2_PACKAGE_OPENOBEX_BLUEZ),y) +OPENOBEX_DEPENDENCIES += bluez_utils +OPENOBEX_CONF_OPT += --with-bluez=$(STAGING_DIR) +else +OPENOBEX_CONF_OPT += --disable-bluetooth +endif + +ifeq ($(BR2_PACKAGE_OPENOBEX_LIBUSB),y) +OPENOBEX_DEPENDENCIES += libusb +OPENOBEX_CONF_OPT += --with-usb=$(STAGING_DIR) +else +OPENOBEX_CONF_OPT += --disable-usb +endif + +$(eval $(autotools-package)) diff --git a/package/openocd/Config.in b/package/openocd/Config.in new file mode 100644 index 0000000000..fc139774cc --- /dev/null +++ b/package/openocd/Config.in @@ -0,0 +1,33 @@ +config BR2_PACKAGE_OPENOCD + bool "openocd" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_LIBUSB_COMPAT + help + OpenOCD - Open On-Chip Debugger + + http://openocd.berlios.de/web/ + +if BR2_PACKAGE_OPENOCD + +comment "Adapters" + +config BR2_PACKAGE_OPENOCD_FT2XXX + bool "FT2xxx/FT4xxx Based JTAG Programmer" + select BR2_PACKAGE_LIBFTDI + help + Enable building support for FT2232 based devices + using the libftdi driver, opensource alternate of FTD2XX + +config BR2_PACKAGE_OPENOCD_JLINK + bool "Segger J-Link JTAG Programmer" + help + Segger J-Link JTAG Programmer and clone such as Atmel SAM-ICE + +config BR2_PACKAGE_OPENOCD_VSLLINK + bool "Versaloon-Link JTAG Programmr" + +endif # BR2_PACKAGE_OPENOCD + +comment "openocd needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/openocd/Config.in.host b/package/openocd/Config.in.host new file mode 100644 index 0000000000..2380942563 --- /dev/null +++ b/package/openocd/Config.in.host @@ -0,0 +1,6 @@ +config BR2_PACKAGE_HOST_OPENOCD + bool "host openocd" + help + OpenOCD - Open On-Chip Debugger + + http://openocd.berlios.de/web/ diff --git a/package/openocd/openocd-0001-fix-cross-compilation-host-libsub-was-used-before.patch b/package/openocd/openocd-0001-fix-cross-compilation-host-libsub-was-used-before.patch new file mode 100644 index 0000000000..caf1a8b6fc --- /dev/null +++ b/package/openocd/openocd-0001-fix-cross-compilation-host-libsub-was-used-before.patch @@ -0,0 +1,33 @@ +From 3728c4af7f6303ccedab56ec220797f8f290580e Mon Sep 17 00:00:00 2001 +From: Jean-Christophe PLAGNIOL-VILLARD +Date: Wed, 10 Aug 2011 00:17:29 +0800 +Subject: [PATCH] fix cross compilation: host libsub was used before + +tested in buildroot + +Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD +--- + configure.in | 7 +++++-- + 1 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/configure.in b/configure.in +index dfa1e8f..cfe2218 100644 +--- a/configure.in ++++ b/configure.in +@@ -1046,8 +1046,11 @@ build_usb=no + if test $build_jlink = yes -o $build_vsllink = yes -o $build_usbprog = yes -o \ + $build_rlink = yes -o $build_ulink = yes -o $build_armjtagew = yes + then +- AC_CHECK_HEADERS([usb.h],[], +- [AC_MSG_ERROR([usb.h is required to build some OpenOCD driver(s)])]) ++ dnl check for libusb ++ PKG_CHECK_MODULES(LIBUSB, libusb >= 0.1.11) ++ CFLAGS="$CFLAGS $LIBUSB_CFLAGS" ++ LDFLAGS="$LDFLAGS $LIBUSB_LDFLAGS" ++ LIBS="$LIBS $LIBUSB_LIBS" + build_usb=yes + fi + +-- +1.7.5.4 + diff --git a/package/openocd/openocd-0002-fix-xscale-uninitialise-breakpoint_pc.patch b/package/openocd/openocd-0002-fix-xscale-uninitialise-breakpoint_pc.patch new file mode 100644 index 0000000000..328241ee44 --- /dev/null +++ b/package/openocd/openocd-0002-fix-xscale-uninitialise-breakpoint_pc.patch @@ -0,0 +1,20 @@ +xscale: fix uninitialise breakpoint_pc + +Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD +--- + src/target/xscale.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: b/src/target/xscale.c +=================================================================== +--- a/src/target/xscale.c ++++ b/src/target/xscale.c +@@ -2811,7 +2811,7 @@ static int xscale_analyze_trace(struct t + struct xscale_common *xscale = target_to_xscale(target); + struct xscale_trace_data *trace_data = xscale->trace.data; + int i, retval; +- uint32_t breakpoint_pc; ++ uint32_t breakpoint_pc = 0; + struct arm_instruction instruction; + uint32_t current_pc = 0; /* initialized when address determined */ + diff --git a/package/openocd/openocd-0003-force-gnu99.patch b/package/openocd/openocd-0003-force-gnu99.patch new file mode 100644 index 0000000000..106d112958 --- /dev/null +++ b/package/openocd/openocd-0003-force-gnu99.patch @@ -0,0 +1,19 @@ +force gnu99 + +Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD +--- + configure.in | 1 + + 1 file changed, 1 insertion(+) + +Index: b/configure.in +=================================================================== +--- a/configure.in ++++ b/configure.in +@@ -28,6 +28,7 @@ AC_DISABLE_SHARED + AC_PROG_LIBTOOL + AC_SUBST(LIBTOOL_DEPS) + ++CFLAGS="$CFLAGS -std=gnu99" + + dnl configure checks required for Jim files (these are obsolete w/ C99) + AC_C_CONST diff --git a/package/openocd/openocd-0004-force_jimtcl_static.patch b/package/openocd/openocd-0004-force_jimtcl_static.patch new file mode 100644 index 0000000000..7118b57d73 --- /dev/null +++ b/package/openocd/openocd-0004-force_jimtcl_static.patch @@ -0,0 +1,25 @@ +force jimtcl to build static + +Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD +--- + jimtcl/auto.def | 5 ----- + 1 file changed, 5 deletions(-) + +Index: b/jimtcl/auto.def +=================================================================== +--- a/jimtcl/auto.def ++++ b/jimtcl/auto.def +@@ -148,13 +148,8 @@ if {[opt-bool references]} { + msg-result "Enabling references" + define JIM_REFERENCES + } +-if {[opt-bool shared with-jim-shared]} { +- msg-result "Building shared library" +- define JIM_LIBTYPE shared +-} else { + msg-result "Building static library" + define JIM_LIBTYPE static +-} + if {[opt-bool install-jim]} { + define install_jim 1 + } else { diff --git a/package/openocd/openocd-0005-dont-force-ldflags.patch b/package/openocd/openocd-0005-dont-force-ldflags.patch new file mode 100644 index 0000000000..1880e00504 --- /dev/null +++ b/package/openocd/openocd-0005-dont-force-ldflags.patch @@ -0,0 +1,37 @@ +[PATCH] don't force library search path / rpath settings + +openocd adds -L$exec_prefix/lib -Wl,rpath,$exec_prefix/lib to the compile +LDFLAGS if it isn't installed into /usr/local, which breaks cross compilation +as the compiler ends up using host libraries. +--- + configure.in | 17 ----------------- + 1 file changed, 17 deletions(-) + +Index: openocd-0.5.0/configure.in +=================================================================== +--- openocd-0.5.0.orig/configure.in ++++ openocd-0.5.0/configure.in +@@ -174,23 +174,6 @@ + # Let make expand exec_prefix. + test x"$OCDxprefix" = xNONE && OCDxprefix="$OCDprefix" + +-# what matters is the "exec-prefix" +-if test "$OCDxprefix" != "$ac_default_prefix" +-then +- # We are installing in a non-standard place +- # Nonstandard --prefix and/or --exec-prefix +- # We have an override of some sort. +- # use build specific install library dir +- +- LDFLAGS="$LDFLAGS -L$OCDxprefix/lib" +- # RPATH becomes an issue on Linux only +- if test $host_os = linux-gnu || test $host_os = linux ; then +- LDFLAGS="$LDFLAGS -Wl,-rpath,$OCDxprefix/lib" +- fi +- # The "INCDIR" is also usable +- CFLAGS="$CFLAGS -I$includedir" +-fi +- + AC_ARG_WITH(ftd2xx, + AS_HELP_STRING([--with-ftd2xx=],[This option has been removed.]), + [ diff --git a/package/openocd/openocd-0006-automake-compat.patch b/package/openocd/openocd-0006-automake-compat.patch new file mode 100644 index 0000000000..cdc6c92ec1 --- /dev/null +++ b/package/openocd/openocd-0006-automake-compat.patch @@ -0,0 +1,40 @@ +Backport from openocd commit 737a52d7b22b1774acc5d20f9bd25000a70ac116 +Fix for automake 1.11.2+ + +Signed-off-by: Gustavo Zacarias + +diff -Nura openocd-0.5.0/src/jtag/drivers/Makefile.am openocd-0.5.0.automake/src/jtag/drivers/Makefile.am +--- openocd-0.5.0/src/jtag/drivers/Makefile.am 2011-08-09 02:34:19.000000000 -0300 ++++ openocd-0.5.0.automake/src/jtag/drivers/Makefile.am 2012-05-01 13:57:01.007561480 -0300 +@@ -5,7 +5,8 @@ + libocdjtagdrivers_la_SOURCES = \ + $(DRIVERFILES) + +-nobase_dist_pkglib_DATA = ++ocddatadir = $(pkglibdir) ++nobase_dist_ocddata_DATA = + + ULINK_FIRMWARE = $(srcdir)/OpenULINK + +@@ -64,7 +65,7 @@ + endif + if ULINK + DRIVERFILES += ulink.c +-nobase_dist_pkglib_DATA += $(ULINK_FIRMWARE)/ulink_firmware.hex ++nobase_dist_ocddata_DATA += $(ULINK_FIRMWARE)/ulink_firmware.hex + endif + if VSLLINK + DRIVERFILES += vsllink.c +diff -Nura openocd-0.5.0/src/target/Makefile.am openocd-0.5.0.automake/src/target/Makefile.am +--- openocd-0.5.0/src/target/Makefile.am 2011-08-09 02:34:19.000000000 -0300 ++++ openocd-0.5.0.automake/src/target/Makefile.am 2012-05-01 13:57:01.934567076 -0300 +@@ -165,7 +165,7 @@ + avr32_mem.h \ + avr32_regs.h + +-nobase_dist_pkglib_DATA = +-nobase_dist_pkglib_DATA += ecos/at91eb40a.elf ++ocddatadir = $(pkglibdir) ++nobase_dist_ocddata_DATA = ecos/at91eb40a.elf + + MAINTAINERCLEANFILES = $(srcdir)/Makefile.in diff --git a/package/openocd/openocd.mk b/package/openocd/openocd.mk new file mode 100644 index 0000000000..ac3cd77c1e --- /dev/null +++ b/package/openocd/openocd.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# openocd +# +################################################################################ + +OPENOCD_VERSION = 0.5.0 +OPENOCD_SOURCE = openocd-$(OPENOCD_VERSION).tar.bz2 +OPENOCD_SITE = http://downloads.sourceforge.net/project/openocd/openocd/$(OPENOCD_VERSION) + +OPENOCD_AUTORECONF = YES +OPENOCD_CONF_OPT = \ + --oldincludedir=$(STAGING_DIR)/usr/include \ + --includedir=$(STAGING_DIR)/usr/include \ + --disable-doxygen-html \ + --enable-dummy + +OPENOCD_DEPENDENCIES = libusb-compat + +# Adapters +ifeq ($(BR2_PACKAGE_OPENOCD_FT2XXX),y) +OPENOCD_CONF_OPT += --enable-ft2232_libftdi +OPENOCD_DEPENDENCIES += libftdi +endif + +ifeq ($(BR2_PACKAGE_OPENOCD_JLINK),y) +OPENOCD_CONF_OPT += --enable-jlink +endif + +ifeq ($(BR2_PACKAGE_OPENOCD_VSLLINK),y) +OPENOCD_CONF_OPT += --enable-vsllink +endif + +HOST_OPENOCD_DEPENDENCIES = host-libusb-compat host-libftdi + +HOST_OPENOCD_CONF_OPT = \ + --disable-doxygen-html \ + --enable-dummy \ + --enable-ft2232_libftdi \ + --enable-jlink \ + --enable-vsllink + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/openpgm/Config.in b/package/openpgm/Config.in new file mode 100644 index 0000000000..8d6763924d --- /dev/null +++ b/package/openpgm/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_OPENPGM + bool "openpgm" + depends on !BR2_avr32 # toolchain lacks required intrinsics + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INET_IPV6 + depends on BR2_USE_WCHAR + help + OpenPGM is an open source implementation of the Pragmatic General + Multicast (PGM) specification in RFC 3208 available at www.ietf.org. + PGM is a reliable and scalable multicast protocol that enables + receivers to detect loss, request retransmission of lost data, or + notify an application of unrecoverable loss. + + http://code.google.com/p/openpgm/ + +comment "openpgm needs a toolchain w/ wchar, threads, IPv6" + depends on !(BR2_TOOLCHAIN_HAS_THREADS && BR2_INET_IPV6 && BR2_USE_WCHAR) + depends on !BR2_avr32 diff --git a/package/openpgm/openpgm-cross-compile.patch b/package/openpgm/openpgm-cross-compile.patch new file mode 100644 index 0000000000..07a24492e5 --- /dev/null +++ b/package/openpgm/openpgm-cross-compile.patch @@ -0,0 +1,38 @@ +configure.ac: cross-compilation fix + +This patch enables to configure the package when cross-compiling in a way +recommended by Autoconf manual (see manual for version 2.69, Section 6.6 +Checking Runtime Behavior). + +Signed-off-by: Alexander Lukichev + +--- a/openpgm/pgm/configure.ac 2011-09-27 20:59:08.000000000 +0300 ++++ b/openpgm/pgm/configure.ac 2013-02-12 10:33:53.000000000 +0200 +@@ -272,14 +272,19 @@ uint32_t add32_with_carry (uint32_t a, u + ;; + esac + # ticket spinlock friendly: unaligned pointers & atomic ops (excl. Sun Pro) +-AC_MSG_CHECKING([for unaligned pointers]) +-AC_RUN_IFELSE( +- [AC_LANG_PROGRAM([[char* nezumi = "mouse";]], +- [[short x = *(short*)(nezumi + 2)]])], +- [AC_MSG_RESULT([yes]) +- pgm_unaligned_pointers=yes], +- [AC_MSG_RESULT([no]) +- pgm_unaligned_pointers=no]) ++AC_CACHE_CHECK([if unaligned access fails], [ac_cv_lbl_unaligned_fail], ++ [AC_RUN_IFELSE( ++ [AC_LANG_PROGRAM([[char* nezumi = "mouse";]], ++ [[short x = *(short*)(nezumi + 2)]])], ++ [ac_cv_lbl_unaligned_fail=no], ++ [ac_cv_lbl_unaligned_fail=yes], ++ [ac_cv_lbl_unaligned_fail=yes]) ++ ]) ++if test "$ac_cv_lbl_unaligned_fail" = yes; then ++ pgm_unaligned_pointers=no ++else ++ pgm_unaligned_pointers=yes ++fi + AC_MSG_CHECKING([for intrinsic atomic ops]) + # AC_PREPROC_IFELSE not always portable + AC_COMPILE_IFELSE( diff --git a/package/openpgm/openpgm.mk b/package/openpgm/openpgm.mk new file mode 100644 index 0000000000..3ec5c77e28 --- /dev/null +++ b/package/openpgm/openpgm.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# openpgm +# +################################################################################ + +OPENPGM_VERSION = 5.1.118~dfsg +OPENPGM_SOURCE = libpgm-$(OPENPGM_VERSION).tar.gz +OPENPGM_SITE = http://openpgm.googlecode.com/files/ +OPENPGM_LICENSE = LGPLv2.1+ +OPENPGM_LICENSE_FILES = openpgm/pgm/LICENSE +OPENPGM_INSTALL_STAGING = YES +OPENPGM_AUTORECONF = YES +OPENPGM_SUBDIR = openpgm/pgm/ +OPENPGM_CONF_ENV = ac_cv_file__proc_cpuinfo=yes ac_cv_file__dev_rtc=no \ + ac_cv_file__dev_hpet=no + +$(eval $(autotools-package)) diff --git a/package/openpowerlink/Config.in b/package/openpowerlink/Config.in new file mode 100644 index 0000000000..cdb09a2e9c --- /dev/null +++ b/package/openpowerlink/Config.in @@ -0,0 +1,113 @@ +comment "openpowerlink needs a toolchain w/ C++, threads" + depends on BR2_i386 || BR2_x86_64 + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_OPENPOWERLINK + bool "openpowerlink" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_i386 || BR2_x86_64 + help + openPOWERLINK is an Open Source Industrial Ethernet + stack implementing the POWERLINK protocol for Managing Node + (MN, POWERLINK Master) and Controlled Node (CN, POWERLINK Slave). + + It is provided by + SYSTEC electronic (http://www.systec-electronic.com), + B&R (http://www.br-automation.com) and + Kalycito (http://www.kalycito.com). + + https://sourceforge.net/projects/openpowerlink/ + +if BR2_PACKAGE_OPENPOWERLINK + +choice + prompt "stack implementation" + +config BR2_PACKAGE_OPENPOWERLINK_LIBPCAP + bool "userspace stack" + select BR2_PACKAGE_LIBPCAP + help + The Linux userspace implementation of the openPOWERLINK stack provides + all functions for a software based POWERLINK solution running as Linux + userspace application. The stack uses the libpcap library for accessing + the network interface and is therefore totally independant of the used + network card and driver. + +config BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE + bool "kernel stack" + depends on BR2_LINUX_KERNEL + help + The openPOWERLINK stack may be implemented as Linux kernel module. + This solution provides the best performance, but is limited to the + available openPOWERLINK network drivers. + You may select BR2_PACKAGE_PCIUTILS for lscpi, + and BR2_PACKAGE_PROCPS for ps command. + These commands are used in EplLoad and EplUndload scripts. + +endchoice + +if BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE + +choice + prompt "select Ethernet Powerlink Driver" + +config BR2_PACKAGE_OPENPOWERLINK_82573 + bool "Intel 82573" + +config BR2_PACKAGE_OPENPOWERLINK_8255x + bool "Intel 8255x" + +config BR2_PACKAGE_OPENPOWERLINK_RTL8139 + bool "Realtek RTL-8139" + +endchoice + +endif + +choice + prompt "Select MN/CN mode" + + config BR2_PACKAGE_OPENPOWERLINK_MN + bool "MN" + help + Enable Managing Node mode + + config BR2_PACKAGE_OPENPOWERLINK_CN + bool "CN" + help + Enable Controlled Node mode + +endchoice + +menu "openpowerlink demos" + +config BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_CONSOLE + bool "console MN demo" + depends on BR2_PACKAGE_OPENPOWERLINK_MN + +config BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_QT + bool "qt MN demo" + depends on BR2_PACKAGE_OPENPOWERLINK_MN + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_QT + select BR2_PACKAGE_QT_STL + +config BR2_PACKAGE_OPENPOWERLINK_DEMO_CN_CONSOLE + bool "console CN demo" + depends on !BR2_PACKAGE_OPENPOWERLINK_MN + +config BR2_PACKAGE_OPENPOWERLINK_DEMO_LINUX_KERNEL + bool "kernel demo" + depends on BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE + depends on BR2_PACKAGE_OPENPOWERLINK_MN + +endmenu + +config BR2_PACKAGE_OPENPOWERLINK_DEBUG_LEVEL + string "debug level for openpowerlink stack" + default "0xEC000000L" + help + Debug level to be used for openPOWERLINK debugging functions. + +endif diff --git a/package/openpowerlink/openpowerlink-0001-Fix-Linux-Powerlink-user-lib-add-INSTALL.patch b/package/openpowerlink/openpowerlink-0001-Fix-Linux-Powerlink-user-lib-add-INSTALL.patch new file mode 100644 index 0000000000..bed878e338 --- /dev/null +++ b/package/openpowerlink/openpowerlink-0001-Fix-Linux-Powerlink-user-lib-add-INSTALL.patch @@ -0,0 +1,28 @@ +From cb6c4ff053e72f7fe5954894aebe2c0d94120b2d Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Thu, 3 Oct 2013 23:22:17 +0200 +Subject: [PATCH 5/5] [FIX] Linux Powerlink user lib: add INSTALL + +Signed-off-by: Romain Naour +--- + Examples/X86/Generic/powerlink_user_lib/CMakeLists.txt | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/Examples/X86/Generic/powerlink_user_lib/CMakeLists.txt b/Examples/X86/Generic/powerlink_user_lib/CMakeLists.txt +index e67d573..40b7756 100644 +--- a/Examples/X86/Generic/powerlink_user_lib/CMakeLists.txt ++++ b/Examples/X86/Generic/powerlink_user_lib/CMakeLists.txt +@@ -329,7 +329,9 @@ ENDIF () + # + # Installation + # +-IF (WIN32) ++IF (UNIX) ++ INSTALL(TARGETS powerlink ARCHIVE DESTINATION lib) ++ELSEIF (WIN32) + IF (CFG_X86_WINDOWS_DLL) + INSTALL(TARGETS openPOWERLINK RUNTIME DESTINATION bin) + ENDIF (CFG_X86_WINDOWS_DLL) +-- +1.8.4 + diff --git a/package/openpowerlink/openpowerlink.mk b/package/openpowerlink/openpowerlink.mk new file mode 100644 index 0000000000..3a60478a0d --- /dev/null +++ b/package/openpowerlink/openpowerlink.mk @@ -0,0 +1,95 @@ +################################################################################ +# +# openpowerlink +# +################################################################################ + +OPENPOWERLINK_VERSION = V1.08.4 +OPENPOWERLINK_SOURCE = openPOWERLINK-$(OPENPOWERLINK_VERSION).zip +OPENPOWERLINK_SITE = http://downloads.sourceforge.net/project/openpowerlink/openPOWERLINK/V1.8.4 + +OPENPOWERLINK_LICENSE = BSD-2c, GPLv2 +OPENPOWERLINK_LICENSE_FILES = license.txt +OPENPOWERLINK_INSTALL_STAGING = YES + +ifeq ($(BR2_i386),y) +OPENPOWERLINK_ARCH = x86 +endif + +ifeq ($(BR2_x86_64),y) +OPENPOWERLINK_ARCH = x86_64 +endif + +OPENPOWERLINK_CONF_OPT = -DCMAKE_SYSTEM_PROCESSOR=$(OPENPOWERLINK_ARCH) + +ifeq ($(BR2_ENABLE_DEBUG),y) +OPENPOWERLINK_CONF_OPT += -DCMAKE_BUILD_TYPE=Debug +else +OPENPOWERLINK_CONF_OPT += -DCMAKE_BUILD_TYPE=Release +endif + +OPENPOWERLINK_CONF_OPT += -DCFG_DEBUG_LVL=$(call qstrip,$(BR2_PACKAGE_OPENPOWERLINK_DEBUG_LEVEL)) + +ifeq ($(BR2_PACKAGE_OPENPOWERLINK_LIBPCAP),y) +# use the user space stack (libpcap) +OPENPOWERLINK_CONF_OPT += -DCFG_KERNEL_STACK=OFF +OPENPOWERLINK_DEPENDENCIES = libpcap +define OPENPOWERLINK_REMOVE_LIB + rm $(TARGET_DIR)/usr/lib/libpowerlink.a +endef +OPENPOWERLINK_POST_INSTALL_TARGET_HOOKS += OPENPOWERLINK_REMOVE_LIB +else +# use the kernel stack +OPENPOWERLINK_CONF_OPT += -DCFG_KERNEL_STACK=ON \ + -DCFG_KERNEL_DIR=$(LINUX_DIR) \ + -DCMAKE_SYSTEM_VERSION=$(LINUX_VERSION) +OPENPOWERLINK_DEPENDENCIES = linux +endif + +ifeq ($(BR2_PACKAGE_OPENPOWERLINK_82573),y) +OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_EDRV=82573 +else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_RTL8139),y) +OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_EDRV=8139 +else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_8255x),y) +OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_EDRV=8255x +endif + +ifeq ($(BR2_PACKAGE_OPENPOWERLINK_MN),y) +OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_MN=ON +else +OPENPOWERLINK_CONF_OPT += -DCFG_POWERLINK_MN=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_CONSOLE),y) +OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_CONSOLE=ON +else +OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_CONSOLE=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_QT),y) +OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_QT=ON +OPENPOWERLINK_DEPENDENCIES += qt +else +OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_MN_QT=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_CN_CONSOLE),y) +OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_CN_CONSOLE=ON +else +OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_CN_CONSOLE=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_LINUX_KERNEL),y) +OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_LINUX_KERNEL=ON +else +OPENPOWERLINK_CONF_OPT += -DCFG_X86_DEMO_LINUX_KERNEL=OFF +endif + +define OPENPOWERLINK_EXTRACT_CMDS + $(RM) -rf $(OPENPOWERLINK_DIR) + unzip -q -d $(BUILD_DIR)/ $(DL_DIR)/$(OPENPOWERLINK_SOURCE) + test -d $(OPENPOWERLINK_DIR) || \ + mv $(BUILD_DIR)/$(subst .zip,,$(OPENPOWERLINK_SOURCE)) $(OPENPOWERLINK_DIR) +endef + +$(eval $(cmake-package)) diff --git a/package/openssh/Config.in b/package/openssh/Config.in index 0c3d993a68..78cc615c03 100644 --- a/package/openssh/Config.in +++ b/package/openssh/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_OPENSSH bool "openssh" + depends on BR2_USE_MMU # fork() select BR2_PACKAGE_OPENSSL select BR2_PACKAGE_ZLIB help diff --git a/package/openssh/S50sshd b/package/openssh/S50sshd index f0d2aef5ab..b65b3c8a70 100644 --- a/package/openssh/S50sshd +++ b/package/openssh/S50sshd @@ -23,7 +23,7 @@ if [ ! -f /etc/ssh_host_dsa_key ] ; then echo Generating DSA Key... echo THIS CAN TAKE A MINUTE OR TWO DEPENDING ON YOUR PROCESSOR! echo - /usr/bin/ssh-keygen -t dsa -f /etc/ssh_host_dsa_key -C '' -N '' + /usr/bin/ssh-keygen -t dsa -f /etc/ssh_host_dsa_key -C '' -N '' fi # Check for the SSH2 ECDSA key @@ -33,38 +33,38 @@ if [ ! -f /etc/ssh_host_ecdsa_key ]; then echo /usr/bin/ssh-keygen -t ecdsa -f /etc/ssh_host_ecdsa_key -C '' -N '' fi - + umask 077 start() { - echo -n "Starting sshd: " + echo -n "Starting sshd: " /usr/sbin/sshd touch /var/lock/sshd echo "OK" -} +} stop() { echo -n "Stopping sshd: " - killall sshd + killall sshd rm -f /var/lock/sshd - echo "OK" + echo "OK" } restart() { stop start -} +} case "$1" in start) - start + start ;; stop) - stop + stop ;; restart|reload) - restart + restart ;; *) - echo $"Usage: $0 {start|stop|restart}" + echo "Usage: $0 {start|stop|restart}" exit 1 esac diff --git a/package/openssh/openssh-01-drop-SUSv3-legacy.patch b/package/openssh/openssh-01-drop-SUSv3-legacy.patch new file mode 100644 index 0000000000..39a63e4c56 --- /dev/null +++ b/package/openssh/openssh-01-drop-SUSv3-legacy.patch @@ -0,0 +1,579 @@ +Switch usage of SUSv3-deprecated bzero(a,b) to memset(a, 0, b). + +Signed-off-by: Gustavo Zacarias + +diff -Nura openssh-6.3p1.orig/auth2-chall.c openssh-6.3p1/auth2-chall.c +--- openssh-6.3p1.orig/auth2-chall.c 2013-06-01 18:31:18.000000000 -0300 ++++ openssh-6.3p1/auth2-chall.c 2013-10-22 09:47:38.665516102 -0300 +@@ -148,7 +148,7 @@ + if (kbdintctxt->device) + kbdint_reset_device(kbdintctxt); + free(kbdintctxt->devices); +- bzero(kbdintctxt, sizeof(*kbdintctxt)); ++ memset(kbdintctxt, 0, sizeof(*kbdintctxt)); + free(kbdintctxt); + } + /* get next device */ +diff -Nura openssh-6.3p1.orig/auth2-jpake.c openssh-6.3p1/auth2-jpake.c +--- openssh-6.3p1.orig/auth2-jpake.c 2013-06-01 18:31:18.000000000 -0300 ++++ openssh-6.3p1/auth2-jpake.c 2013-10-22 09:43:32.504472356 -0300 +@@ -178,7 +178,7 @@ + fatal("%s: not enough bytes for rawsalt (want %u have %u)", + __func__, len, digest_len); + memcpy(rawsalt, digest, len); +- bzero(digest, digest_len); ++ memset(digest, 0, digest_len); + free(digest); + } + +@@ -203,10 +203,10 @@ + fatal("%s: want %u", __func__, want); + + derive_rawsalt(user, rawsalt, sizeof(rawsalt)); +- bzero(ret, sizeof(ret)); ++ memset(ret, 0, sizeof(ret)); + for (i = 0; i < want; i++) + ret[i] = pw_encode64(rawsalt[i]); +- bzero(rawsalt, sizeof(rawsalt)); ++ memset(rawsalt, 0, sizeof(rawsalt)); + + return ret; + } +@@ -360,7 +360,7 @@ + debug3("%s: scheme = %s", __func__, *hash_scheme); + JPAKE_DEBUG_BN((*s, "%s: s = ", __func__)); + #endif +- bzero(secret, secret_len); ++ memset(secret, 0, secret_len); + free(secret); + } + +@@ -401,12 +401,12 @@ + packet_send(); + packet_write_wait(); + +- bzero(hash_scheme, strlen(hash_scheme)); +- bzero(salt, strlen(salt)); ++ memset(hash_scheme, 0, strlen(hash_scheme)); ++ memset(salt, 0, strlen(salt)); + free(hash_scheme); + free(salt); +- bzero(x3_proof, x3_proof_len); +- bzero(x4_proof, x4_proof_len); ++ memset(x3_proof, 0, x3_proof_len); ++ memset(x4_proof, 0, x4_proof_len); + free(x3_proof); + free(x4_proof); + +@@ -453,8 +453,8 @@ + &pctx->b, + &x4_s_proof, &x4_s_proof_len)); + +- bzero(x1_proof, x1_proof_len); +- bzero(x2_proof, x2_proof_len); ++ memset(x1_proof, 0, x1_proof_len); ++ memset(x2_proof, 0, x2_proof_len); + free(x1_proof); + free(x2_proof); + +@@ -468,7 +468,7 @@ + packet_send(); + packet_write_wait(); + +- bzero(x4_s_proof, x4_s_proof_len); ++ memset(x4_s_proof, 0, x4_s_proof_len); + free(x4_s_proof); + + /* Expect step 2 packet from peer */ +@@ -509,7 +509,7 @@ + &pctx->k, + &pctx->h_k_sid_sessid, &pctx->h_k_sid_sessid_len)); + +- bzero(x2_s_proof, x2_s_proof_len); ++ memset(x2_s_proof, 0, x2_s_proof_len); + free(x2_s_proof); + + if (!use_privsep) +diff -Nura openssh-6.3p1.orig/authfd.c openssh-6.3p1/authfd.c +--- openssh-6.3p1.orig/authfd.c 2013-06-01 18:31:18.000000000 -0300 ++++ openssh-6.3p1/authfd.c 2013-10-22 09:47:48.208827946 -0300 +@@ -102,7 +102,7 @@ + if (!authsocket) + return -1; + +- bzero(&sunaddr, sizeof(sunaddr)); ++ memset(&sunaddr, 0, sizeof(sunaddr)); + sunaddr.sun_family = AF_UNIX; + strlcpy(sunaddr.sun_path, authsocket, sizeof(sunaddr.sun_path)); + +diff -Nura openssh-6.3p1.orig/authfile.c openssh-6.3p1/authfile.c +--- openssh-6.3p1.orig/authfile.c 2013-06-01 18:31:18.000000000 -0300 ++++ openssh-6.3p1/authfile.c 2013-10-22 09:47:08.538531649 -0300 +@@ -349,17 +349,17 @@ + __func__, filename == NULL ? "" : filename, + filename == NULL ? "" : " ", strerror(errno)); + buffer_clear(blob); +- bzero(buf, sizeof(buf)); ++ memset(buf, 0, sizeof(buf)); + return 0; + } + buffer_append(blob, buf, len); + if (buffer_len(blob) > MAX_KEY_FILE_SIZE) { + buffer_clear(blob); +- bzero(buf, sizeof(buf)); ++ memset(buf, 0, sizeof(buf)); + goto toobig; + } + } +- bzero(buf, sizeof(buf)); ++ memset(buf, 0, sizeof(buf)); + if ((st.st_mode & (S_IFSOCK|S_IFCHR|S_IFIFO)) == 0 && + st.st_size != buffer_len(blob)) { + debug("%s: key file %.200s%schanged size while reading", +diff -Nura openssh-6.3p1.orig/bufaux.c openssh-6.3p1/bufaux.c +--- openssh-6.3p1.orig/bufaux.c 2013-07-18 03:12:44.000000000 -0300 ++++ openssh-6.3p1/bufaux.c 2013-10-22 09:47:56.220089728 -0300 +@@ -215,7 +215,7 @@ + if (cp == ret + length - 1) + error("buffer_get_cstring_ret: string contains \\0"); + else { +- bzero(ret, length); ++ memset(ret, 0, length); + free(ret); + return NULL; + } +diff -Nura openssh-6.3p1.orig/bufec.c openssh-6.3p1/bufec.c +--- openssh-6.3p1.orig/bufec.c 2013-06-01 18:31:18.000000000 -0300 ++++ openssh-6.3p1/bufec.c 2013-10-22 09:48:07.798468072 -0300 +@@ -77,7 +77,7 @@ + ret = 0; + out: + if (buf != NULL) { +- bzero(buf, len); ++ memset(buf, 0, len); + free(buf); + } + BN_CTX_free(bnctx); +@@ -130,7 +130,7 @@ + ret = 0; + out: + BN_CTX_free(bnctx); +- bzero(buf, len); ++ memset(buf, 0, len); + free(buf); + return ret; + } +diff -Nura openssh-6.3p1.orig/canohost.c openssh-6.3p1/canohost.c +--- openssh-6.3p1.orig/canohost.c 2013-06-01 18:31:18.000000000 -0300 ++++ openssh-6.3p1/canohost.c 2013-10-22 09:48:16.484751912 -0300 +@@ -199,7 +199,7 @@ + memcpy(&inaddr, ((char *)&a6->sin6_addr) + 12, sizeof(inaddr)); + port = a6->sin6_port; + +- bzero(a4, sizeof(*a4)); ++ memset(a4, 0, sizeof(*a4)); + + a4->sin_family = AF_INET; + *len = sizeof(*a4); +diff -Nura openssh-6.3p1.orig/channels.c openssh-6.3p1/channels.c +--- openssh-6.3p1.orig/channels.c 2013-09-13 03:19:31.000000000 -0300 ++++ openssh-6.3p1/channels.c 2013-10-22 09:50:37.059773902 -0300 +@@ -423,7 +423,7 @@ + if (cc->abandon_cb != NULL) + cc->abandon_cb(c, cc->ctx); + TAILQ_REMOVE(&c->status_confirms, cc, entry); +- bzero(cc, sizeof(*cc)); ++ memset(cc, 0, sizeof(*cc)); + free(cc); + } + if (c->filter_cleanup != NULL && c->filter_ctx != NULL) +@@ -2668,7 +2668,7 @@ + return; + cc->cb(type, c, cc->ctx); + TAILQ_REMOVE(&c->status_confirms, cc, entry); +- bzero(cc, sizeof(*cc)); ++ memset(cc, 0, sizeof(*cc)); + free(cc); + } + +@@ -3289,7 +3289,7 @@ + free(cctx->host); + if (cctx->aitop) + freeaddrinfo(cctx->aitop); +- bzero(cctx, sizeof(*cctx)); ++ memset(cctx, 0, sizeof(*cctx)); + cctx->host = NULL; + cctx->ai = cctx->aitop = NULL; + } +diff -Nura openssh-6.3p1.orig/clientloop.c openssh-6.3p1/clientloop.c +--- openssh-6.3p1.orig/clientloop.c 2013-06-10 00:07:12.000000000 -0300 ++++ openssh-6.3p1/clientloop.c 2013-10-22 09:50:20.361228247 -0300 +@@ -549,7 +549,7 @@ + gc->cb(type, seq, gc->ctx); + if (--gc->ref_count <= 0) { + TAILQ_REMOVE(&global_confirms, gc, entry); +- bzero(gc, sizeof(*gc)); ++ memset(gc, 0, sizeof(*gc)); + free(gc); + } + +@@ -876,7 +876,7 @@ + int cancel_port, ok; + Forward fwd; + +- bzero(&fwd, sizeof(fwd)); ++ memset(&fwd, 0, sizeof(fwd)); + fwd.listen_host = fwd.connect_host = NULL; + + leave_raw_mode(options.request_tty == REQUEST_TTY_FORCE); +diff -Nura openssh-6.3p1.orig/hostfile.c openssh-6.3p1/hostfile.c +--- openssh-6.3p1.orig/hostfile.c 2013-07-18 03:12:45.000000000 -0300 ++++ openssh-6.3p1/hostfile.c 2013-10-22 09:50:06.438773307 -0300 +@@ -333,10 +333,10 @@ + free(hostkeys->entries[i].host); + free(hostkeys->entries[i].file); + key_free(hostkeys->entries[i].key); +- bzero(hostkeys->entries + i, sizeof(*hostkeys->entries)); ++ memset(hostkeys->entries + i, 0, sizeof(*hostkeys->entries)); + } + free(hostkeys->entries); +- bzero(hostkeys, sizeof(*hostkeys)); ++ memset(hostkeys, 0, sizeof(*hostkeys)); + free(hostkeys); + } + +diff -Nura openssh-6.3p1.orig/jpake.c openssh-6.3p1/jpake.c +--- openssh-6.3p1.orig/jpake.c 2013-06-01 18:31:18.000000000 -0300 ++++ openssh-6.3p1/jpake.c 2013-10-22 09:49:54.371378983 -0300 +@@ -105,7 +105,7 @@ + #define JPAKE_BUF_CLEAR_FREE(v, l) \ + do { \ + if ((v) != NULL) { \ +- bzero((v), (l)); \ ++ memset((v), 0, (l)); \ + free(v); \ + (v) = NULL; \ + (l) = 0; \ +@@ -133,7 +133,7 @@ + #undef JPAKE_BN_CLEAR_FREE + #undef JPAKE_BUF_CLEAR_FREE + +- bzero(pctx, sizeof(*pctx)); ++ memset(pctx, 0, sizeof(*pctx)); + free(pctx); + } + +@@ -444,7 +444,7 @@ + else if (timingsafe_bcmp(peer_confirm_hash, expected_confirm_hash, + expected_confirm_hash_len) == 0) + success = 1; +- bzero(expected_confirm_hash, expected_confirm_hash_len); ++ memset(expected_confirm_hash, 0, expected_confirm_hash_len); + free(expected_confirm_hash); + debug3("%s: success = %d", __func__, success); + return success; +diff -Nura openssh-6.3p1.orig/krl.c openssh-6.3p1/krl.c +--- openssh-6.3p1.orig/krl.c 2013-07-24 22:52:49.000000000 -0300 ++++ openssh-6.3p1/krl.c 2013-10-22 09:49:27.731508478 -0300 +@@ -238,7 +238,7 @@ + struct revoked_serial rs, *ers, *crs, *irs; + + KRL_DBG(("%s: insert %llu:%llu", __func__, lo, hi)); +- bzero(&rs, sizeof(rs)); ++ memset(&rs, 0, sizeof(rs)); + rs.lo = lo; + rs.hi = hi; + ers = RB_NFIND(revoked_serial_tree, rt, &rs); +@@ -1115,7 +1115,7 @@ + struct revoked_certs *rc; + + /* Check explicitly revoked hashes first */ +- bzero(&rb, sizeof(rb)); ++ memset(&rb, 0, sizeof(rb)); + if ((rb.blob = key_fingerprint_raw(key, SSH_FP_SHA1, &rb.len)) == NULL) + return -1; + erb = RB_FIND(revoked_blob_tree, &krl->revoked_sha1s, &rb); +@@ -1126,7 +1126,7 @@ + } + + /* Next, explicit keys */ +- bzero(&rb, sizeof(rb)); ++ memset(&rb, 0, sizeof(rb)); + if (plain_key_blob(key, &rb.blob, &rb.len) != 0) + return -1; + erb = RB_FIND(revoked_blob_tree, &krl->revoked_keys, &rb); +@@ -1147,7 +1147,7 @@ + return 0; /* No entry for this CA */ + + /* Check revocation by cert key ID */ +- bzero(&rki, sizeof(rki)); ++ memset(&rki, 0, sizeof(rki)); + rki.key_id = key->cert->key_id; + erki = RB_FIND(revoked_key_id_tree, &rc->revoked_key_ids, &rki); + if (erki != NULL) { +@@ -1162,7 +1162,7 @@ + if (key_cert_is_legacy(key) || key->cert->serial == 0) + return 0; + +- bzero(&rs, sizeof(rs)); ++ memset(&rs, 0, sizeof(rs)); + rs.lo = rs.hi = key->cert->serial; + ers = RB_FIND(revoked_serial_tree, &rc->revoked_serials, &rs); + if (ers != NULL) { +diff -Nura openssh-6.3p1.orig/monitor.c openssh-6.3p1/monitor.c +--- openssh-6.3p1.orig/monitor.c 2013-07-20 00:21:53.000000000 -0300 ++++ openssh-6.3p1/monitor.c 2013-10-22 09:46:48.592879890 -0300 +@@ -566,7 +566,7 @@ + struct pollfd pfd[2]; + + for (;;) { +- bzero(&pfd, sizeof(pfd)); ++ memset(&pfd, 0, sizeof(pfd)); + pfd[0].fd = pmonitor->m_sendfd; + pfd[0].events = POLLIN; + pfd[1].fd = pmonitor->m_log_recvfd; +@@ -2193,8 +2193,8 @@ + debug3("%s: sending step1", __func__); + mm_request_send(sock, MONITOR_ANS_JPAKE_STEP1, m); + +- bzero(x3_proof, x3_proof_len); +- bzero(x4_proof, x4_proof_len); ++ memset(x3_proof, 0, x3_proof_len); ++ memset(x4_proof, 0, x4_proof_len); + free(x3_proof); + free(x4_proof); + +@@ -2223,8 +2223,8 @@ + debug3("%s: sending pwdata", __func__); + mm_request_send(sock, MONITOR_ANS_JPAKE_GET_PWDATA, m); + +- bzero(hash_scheme, strlen(hash_scheme)); +- bzero(salt, strlen(salt)); ++ memset(hash_scheme, 0, strlen(hash_scheme)); ++ memset(salt, 0, strlen(salt)); + free(hash_scheme); + free(salt); + +@@ -2263,8 +2263,8 @@ + + JPAKE_DEBUG_CTX((pctx, "step2 done in %s", __func__)); + +- bzero(x1_proof, x1_proof_len); +- bzero(x2_proof, x2_proof_len); ++ memset(x1_proof, 0, x1_proof_len); ++ memset(x2_proof, 0, x2_proof_len); + free(x1_proof); + free(x2_proof); + +@@ -2276,7 +2276,7 @@ + debug3("%s: sending step2", __func__); + mm_request_send(sock, MONITOR_ANS_JPAKE_STEP2, m); + +- bzero(x4_s_proof, x4_s_proof_len); ++ memset(x4_s_proof, 0, x4_s_proof_len); + free(x4_s_proof); + + monitor_permit(mon_dispatch, MONITOR_REQ_JPAKE_KEY_CONFIRM, 1); +@@ -2310,7 +2310,7 @@ + + JPAKE_DEBUG_CTX((pctx, "key_confirm done in %s", __func__)); + +- bzero(x2_s_proof, x2_s_proof_len); ++ memset(x2_s_proof, 0, x2_s_proof_len); + buffer_clear(m); + + /* pctx->k is sensitive, not sent */ +@@ -2344,7 +2344,7 @@ + + JPAKE_DEBUG_CTX((pctx, "check_confirm done in %s", __func__)); + +- bzero(peer_confirm_hash, peer_confirm_hash_len); ++ memset(peer_confirm_hash, 0, peer_confirm_hash_len); + free(peer_confirm_hash); + + buffer_clear(m); +diff -Nura openssh-6.3p1.orig/sandbox-systrace.c openssh-6.3p1/sandbox-systrace.c +--- openssh-6.3p1.orig/sandbox-systrace.c 2013-06-01 18:46:17.000000000 -0300 ++++ openssh-6.3p1/sandbox-systrace.c 2013-10-22 09:49:02.048669246 -0300 +@@ -141,7 +141,7 @@ + box->systrace_fd, child_pid, strerror(errno)); + + /* Allocate and assign policy */ +- bzero(&policy, sizeof(policy)); ++ memset(&policy, 0, sizeof(policy)); + policy.strp_op = SYSTR_POLICY_NEW; + policy.strp_maxents = SYS_MAXSYSCALL; + if (ioctl(box->systrace_fd, STRIOCPOLICY, &policy) == -1) +diff -Nura openssh-6.3p1.orig/schnorr.c openssh-6.3p1/schnorr.c +--- openssh-6.3p1.orig/schnorr.c 2013-06-01 18:31:19.000000000 -0300 ++++ openssh-6.3p1/schnorr.c 2013-10-22 09:47:27.631155534 -0300 +@@ -101,7 +101,7 @@ + SCHNORR_DEBUG_BN((h, "%s: h = ", __func__)); + out: + buffer_free(&b); +- bzero(digest, digest_len); ++ memset(digest, 0, digest_len); + free(digest); + digest_len = 0; + if (success == 0) +@@ -477,7 +477,7 @@ + success = 0; + out: + EVP_MD_CTX_cleanup(&evp_md_ctx); +- bzero(digest, sizeof(digest)); ++ memset(digest, 0, sizeof(digest)); + digest_len = 0; + return success; + } +@@ -572,7 +572,7 @@ + BN_clear_free(grp->p); + if (grp->q != NULL) + BN_clear_free(grp->q); +- bzero(grp, sizeof(*grp)); ++ memset(grp, 0, sizeof(*grp)); + free(grp); + } + +diff -Nura openssh-6.3p1.orig/session.c openssh-6.3p1/session.c +--- openssh-6.3p1.orig/session.c 2013-07-20 00:21:53.000000000 -0300 ++++ openssh-6.3p1/session.c 2013-10-22 09:49:35.085748791 -0300 +@@ -1861,7 +1861,7 @@ + fatal("%s: insane session id %d (max %d nalloc %d)", + __func__, id, options.max_sessions, sessions_nalloc); + } +- bzero(&sessions[id], sizeof(*sessions)); ++ memset(&sessions[id], 0, sizeof(*sessions)); + sessions[id].self = id; + sessions[id].used = 0; + sessions[id].chanid = -1; +diff -Nura openssh-6.3p1.orig/sftp-client.c openssh-6.3p1/sftp-client.c +--- openssh-6.3p1.orig/sftp-client.c 2013-07-25 19:40:00.000000000 -0300 ++++ openssh-6.3p1/sftp-client.c 2013-10-22 09:48:47.139753618 -0300 +@@ -308,7 +308,7 @@ + SSH2_FXP_EXTENDED_REPLY, type); + } + +- bzero(st, sizeof(*st)); ++ memset(st, 0, sizeof(*st)); + st->f_bsize = buffer_get_int64(&msg); + st->f_frsize = buffer_get_int64(&msg); + st->f_blocks = buffer_get_int64(&msg); +diff -Nura openssh-6.3p1.orig/ssh.c openssh-6.3p1/ssh.c +--- openssh-6.3p1.orig/ssh.c 2013-07-24 22:55:53.000000000 -0300 ++++ openssh-6.3p1/ssh.c 2013-10-22 09:45:52.967062218 -0300 +@@ -1539,8 +1539,8 @@ + #endif /* PKCS11 */ + + n_ids = 0; +- bzero(identity_files, sizeof(identity_files)); +- bzero(identity_keys, sizeof(identity_keys)); ++ memset(identity_files, 0, sizeof(identity_files)); ++ memset(identity_keys, 0, sizeof(identity_keys)); + + #ifdef ENABLE_PKCS11 + if (options.pkcs11_provider != NULL && +@@ -1615,9 +1615,9 @@ + memcpy(options.identity_files, identity_files, sizeof(identity_files)); + memcpy(options.identity_keys, identity_keys, sizeof(identity_keys)); + +- bzero(pwname, strlen(pwname)); ++ memset(pwname, 0, strlen(pwname)); + free(pwname); +- bzero(pwdir, strlen(pwdir)); ++ memset(pwdir, 0, strlen(pwdir)); + free(pwdir); + } + +diff -Nura openssh-6.3p1.orig/sshconnect2.c openssh-6.3p1/sshconnect2.c +--- openssh-6.3p1.orig/sshconnect2.c 2013-06-05 19:22:05.000000000 -0300 ++++ openssh-6.3p1/sshconnect2.c 2013-10-22 09:44:58.967297681 -0300 +@@ -1008,14 +1008,14 @@ + &secret, &secret_len) != 0) + fatal("%s: hash_buffer", __func__); + +- bzero(password, strlen(password)); +- bzero(crypted, strlen(crypted)); ++ memset(password, 0, strlen(password)); ++ memset(crypted, 0, strlen(crypted)); + free(password); + free(crypted); + + if ((ret = BN_bin2bn(secret, secret_len, NULL)) == NULL) + fatal("%s: BN_bin2bn (secret)", __func__); +- bzero(secret, secret_len); ++ memset(secret, 0, secret_len); + free(secret); + + return ret; +@@ -1052,8 +1052,8 @@ + + /* Obtain password and derive secret */ + pctx->s = jpake_password_to_secret(authctxt, crypt_scheme, salt); +- bzero(crypt_scheme, strlen(crypt_scheme)); +- bzero(salt, strlen(salt)); ++ memset(crypt_scheme, 0, strlen(crypt_scheme)); ++ memset(salt, 0, strlen(salt)); + free(crypt_scheme); + free(salt); + JPAKE_DEBUG_BN((pctx->s, "%s: s = ", __func__)); +@@ -1068,8 +1068,8 @@ + &pctx->a, + &x2_s_proof, &x2_s_proof_len); + +- bzero(x3_proof, x3_proof_len); +- bzero(x4_proof, x4_proof_len); ++ memset(x3_proof, 0, x3_proof_len); ++ memset(x4_proof, 0, x4_proof_len); + free(x3_proof); + free(x4_proof); + +@@ -1081,7 +1081,7 @@ + packet_put_string(x2_s_proof, x2_s_proof_len); + packet_send(); + +- bzero(x2_s_proof, x2_s_proof_len); ++ memset(x2_s_proof, 0, x2_s_proof_len); + free(x2_s_proof); + + /* Expect step 2 packet from peer */ +@@ -1121,7 +1121,7 @@ + &pctx->k, + &pctx->h_k_cid_sessid, &pctx->h_k_cid_sessid_len); + +- bzero(x4_s_proof, x4_s_proof_len); ++ memset(x4_s_proof, 0, x4_s_proof_len); + free(x4_s_proof); + + JPAKE_DEBUG_CTX((pctx, "confirm sending in %s", __func__)); +@@ -1406,7 +1406,7 @@ + /* If IdentitiesOnly set and key not found then don't use it */ + if (!found && options.identities_only) { + TAILQ_REMOVE(&files, id, next); +- bzero(id, sizeof(*id)); ++ memset(id, 0, sizeof(*id)); + free(id); + } + } +@@ -1814,8 +1814,8 @@ + packet_put_string(x2_proof, x2_proof_len); + packet_send(); + +- bzero(x1_proof, x1_proof_len); +- bzero(x2_proof, x2_proof_len); ++ memset(x1_proof, 0, x1_proof_len); ++ memset(x2_proof, 0, x2_proof_len); + free(x1_proof); + free(x2_proof); + +diff -Nura openssh-6.3p1.orig/ssh-keygen.c openssh-6.3p1/ssh-keygen.c +--- openssh-6.3p1.orig/ssh-keygen.c 2013-07-20 00:22:32.000000000 -0300 ++++ openssh-6.3p1/ssh-keygen.c 2013-10-22 09:45:10.003658313 -0300 +@@ -1693,7 +1693,7 @@ + fatal("Invalid certificate time format %s", s); + } + +- bzero(&tm, sizeof(tm)); ++ memset(&tm, 0, sizeof(tm)); + if (strptime(buf, fmt, &tm) == NULL) + fatal("Invalid certificate time %s", s); + if ((tt = mktime(&tm)) < 0) diff --git a/package/openssh/openssh-02-fix-pam-uclibc-pthreads-clash.patch b/package/openssh/openssh-02-fix-pam-uclibc-pthreads-clash.patch new file mode 100644 index 0000000000..d9bc6e5d0c --- /dev/null +++ b/package/openssh/openssh-02-fix-pam-uclibc-pthreads-clash.patch @@ -0,0 +1,44 @@ +When PAM is enabled, openssh makes its own static versions of pthreads +functions. But when built with a uclibc toolchain, pthreads.h gets +indirectly included. The clashing exported and static definitions of +the pthreads functions then cause a compile error. This patch fixes +the problem by changing the static pthread function names with macros +when the static functions are defined. + +Signed-off-by: Danomi Manchego + +diff -urN openssh-6.1p1.orig/auth-pam.c openssh-6.1p1/auth-pam.c +--- openssh-6.1p1.orig/auth-pam.c 2009-07-12 08:07:21.000000000 -0400 ++++ openssh-6.1p1/auth-pam.c 2012-09-15 19:49:47.677288199 -0400 +@@ -166,6 +166,7 @@ + sigdie("PAM: authentication thread exited uncleanly"); + } + ++#define pthread_exit pthread_exit_AVOID_UCLIBC_PTHREAD_CLASH + /* ARGSUSED */ + static void + pthread_exit(void *value) +@@ -173,6 +174,7 @@ + _exit(0); + } + ++#define pthread_create pthread_create_AVOID_UCLIBC_PTHREAD_CLASH + /* ARGSUSED */ + static int + pthread_create(sp_pthread_t *thread, const void *attr, +@@ -200,6 +202,7 @@ + } + } + ++#define pthread_cancel pthread_cancel_AVOID_UCLIBC_PTHREAD_CLASH + static int + pthread_cancel(sp_pthread_t thread) + { +@@ -207,6 +210,7 @@ + return (kill(thread, SIGTERM)); + } + ++#define pthread_join pthread_join_AVOID_UCLIBC_PTHREAD_CLASH + /* ARGSUSED */ + static int + pthread_join(sp_pthread_t thread, void **value) diff --git a/package/openssh/openssh-drop-SUSv3-legacy.patch b/package/openssh/openssh-drop-SUSv3-legacy.patch deleted file mode 100644 index 8299da19fd..0000000000 --- a/package/openssh/openssh-drop-SUSv3-legacy.patch +++ /dev/null @@ -1,441 +0,0 @@ -Drop SUSv3 legacy fuctions - -Signed-off-by: Gustavo Zacarias ---- - auth2-jpake.c | 24 ++++++++++++------------ - channels.c | 6 +++--- - clientloop.c | 4 ++-- - jpake.c | 6 +++--- - monitor.c | 18 +++++++++--------- - openbsd-compat/port-tun.c | 4 ++-- - schnorr.c | 6 +++--- - session.c | 2 +- - sftp-client.c | 2 +- - ssh-keygen.c | 2 +- - ssh.c | 8 ++++---- - sshconnect2.c | 22 +++++++++++----------- - 12 files changed, 52 insertions(+), 52 deletions(-) - -diff --git a/auth2-jpake.c b/auth2-jpake.c -index 5de5506..b34d696 100644 ---- a/auth2-jpake.c -+++ b/auth2-jpake.c -@@ -173,7 +173,7 @@ derive_rawsalt(const char *username, u_char *rawsalt, u_int len) - fatal("%s: not enough bytes for rawsalt (want %u have %u)", - __func__, len, digest_len); - memcpy(rawsalt, digest, len); -- bzero(digest, digest_len); -+ memset(digest, 0, digest_len); - xfree(digest); - } - -@@ -198,10 +198,10 @@ makesalt(u_int want, const char *user) - fatal("%s: want %u", __func__, want); - - derive_rawsalt(user, rawsalt, sizeof(rawsalt)); -- bzero(ret, sizeof(ret)); -+ memset(ret, 0, sizeof(ret)); - for (i = 0; i < want; i++) - ret[i] = pw_encode64(rawsalt[i]); -- bzero(rawsalt, sizeof(rawsalt)); -+ memset(rawsalt, 0, sizeof(rawsalt)); - - return ret; - } -@@ -355,7 +355,7 @@ auth2_jpake_get_pwdata(Authctxt *authctxt, BIGNUM **s, - debug3("%s: scheme = %s", __func__, *hash_scheme); - JPAKE_DEBUG_BN((*s, "%s: s = ", __func__)); - #endif -- bzero(secret, secret_len); -+ memset(secret, 0, secret_len); - xfree(secret); - } - -@@ -396,12 +396,12 @@ auth2_jpake_start(Authctxt *authctxt) - packet_send(); - packet_write_wait(); - -- bzero(hash_scheme, strlen(hash_scheme)); -- bzero(salt, strlen(salt)); -+ memset(hash_scheme, 0, strlen(hash_scheme)); -+ memset(salt, 0, strlen(salt)); - xfree(hash_scheme); - xfree(salt); -- bzero(x3_proof, x3_proof_len); -- bzero(x4_proof, x4_proof_len); -+ memset(x3_proof, 0, x3_proof_len); -+ memset(x4_proof, 0, x4_proof_len); - xfree(x3_proof); - xfree(x4_proof); - -@@ -448,8 +448,8 @@ input_userauth_jpake_client_step1(int type, u_int32_t seq, void *ctxt) - &pctx->b, - &x4_s_proof, &x4_s_proof_len)); - -- bzero(x1_proof, x1_proof_len); -- bzero(x2_proof, x2_proof_len); -+ memset(x1_proof, 0, x1_proof_len); -+ memset(x2_proof, 0, x2_proof_len); - xfree(x1_proof); - xfree(x2_proof); - -@@ -463,7 +463,7 @@ input_userauth_jpake_client_step1(int type, u_int32_t seq, void *ctxt) - packet_send(); - packet_write_wait(); - -- bzero(x4_s_proof, x4_s_proof_len); -+ memset(x4_s_proof, 0, x4_s_proof_len); - xfree(x4_s_proof); - - /* Expect step 2 packet from peer */ -@@ -504,7 +504,7 @@ input_userauth_jpake_client_step2(int type, u_int32_t seq, void *ctxt) - &pctx->k, - &pctx->h_k_sid_sessid, &pctx->h_k_sid_sessid_len)); - -- bzero(x2_s_proof, x2_s_proof_len); -+ memset(x2_s_proof, 0, x2_s_proof_len); - xfree(x2_s_proof); - - if (!use_privsep) -diff --git a/channels.c b/channels.c -index 1cd5004..89dcfc6 100644 ---- a/channels.c -+++ b/channels.c -@@ -418,7 +418,7 @@ channel_free(Channel *c) - if (cc->abandon_cb != NULL) - cc->abandon_cb(c, cc->ctx); - TAILQ_REMOVE(&c->status_confirms, cc, entry); -- bzero(cc, sizeof(*cc)); -+ memset(cc, 0, sizeof(*cc)); - xfree(cc); - } - if (c->filter_cleanup != NULL && c->filter_ctx != NULL) -@@ -2625,7 +2625,7 @@ channel_input_status_confirm(int type, u_int32_t seq, void *ctxt) - return; - cc->cb(type, c, cc->ctx); - TAILQ_REMOVE(&c->status_confirms, cc, entry); -- bzero(cc, sizeof(*cc)); -+ memset(cc, 0, sizeof(*cc)); - xfree(cc); - } - -@@ -3128,7 +3128,7 @@ channel_connect_ctx_free(struct channel_connect *cctx) - xfree(cctx->host); - if (cctx->aitop) - freeaddrinfo(cctx->aitop); -- bzero(cctx, sizeof(*cctx)); -+ memset(cctx, 0, sizeof(*cctx)); - cctx->host = NULL; - cctx->ai = cctx->aitop = NULL; - } -diff --git a/clientloop.c b/clientloop.c -index de79793..2d08690 100644 ---- a/clientloop.c -+++ b/clientloop.c -@@ -533,7 +533,7 @@ client_global_request_reply(int type, u_int32_t seq, void *ctxt) - gc->cb(type, seq, gc->ctx); - if (--gc->ref_count <= 0) { - TAILQ_REMOVE(&global_confirms, gc, entry); -- bzero(gc, sizeof(*gc)); -+ memset(gc, 0, sizeof(*gc)); - xfree(gc); - } - -@@ -823,7 +823,7 @@ process_cmdline(void) - int cancel_port; - Forward fwd; - -- bzero(&fwd, sizeof(fwd)); -+ memset(&fwd, 0, sizeof(fwd)); - fwd.listen_host = fwd.connect_host = NULL; - - leave_raw_mode(force_tty_flag); -diff --git a/jpake.c b/jpake.c -index cdf65f5..73ba954 100644 ---- a/jpake.c -+++ b/jpake.c -@@ -104,7 +104,7 @@ jpake_free(struct jpake_ctx *pctx) - #define JPAKE_BUF_CLEAR_FREE(v, l) \ - do { \ - if ((v) != NULL) { \ -- bzero((v), (l)); \ -+ memset((v), 0, (l)); \ - xfree(v); \ - (v) = NULL; \ - (l) = 0; \ -@@ -132,7 +132,7 @@ jpake_free(struct jpake_ctx *pctx) - #undef JPAKE_BN_CLEAR_FREE - #undef JPAKE_BUF_CLEAR_FREE - -- bzero(pctx, sizeof(pctx)); -+ memset(pctx, 0, sizeof(pctx)); - xfree(pctx); - } - -@@ -437,7 +437,7 @@ jpake_check_confirm(const BIGNUM *k, - else if (timingsafe_bcmp(peer_confirm_hash, expected_confirm_hash, - expected_confirm_hash_len) == 0) - success = 1; -- bzero(expected_confirm_hash, expected_confirm_hash_len); -+ memset(expected_confirm_hash, 0, expected_confirm_hash_len); - xfree(expected_confirm_hash); - debug3("%s: success = %d", __func__, success); - return success; -diff --git a/monitor.c b/monitor.c -index 9eb4e35..0e85b7a 100644 ---- a/monitor.c -+++ b/monitor.c -@@ -2028,8 +2028,8 @@ mm_answer_jpake_step1(int sock, Buffer *m) - debug3("%s: sending step1", __func__); - mm_request_send(sock, MONITOR_ANS_JPAKE_STEP1, m); - -- bzero(x3_proof, x3_proof_len); -- bzero(x4_proof, x4_proof_len); -+ memset(x3_proof, 0, x3_proof_len); -+ memset(x4_proof, 0, x4_proof_len); - xfree(x3_proof); - xfree(x4_proof); - -@@ -2058,8 +2058,8 @@ mm_answer_jpake_get_pwdata(int sock, Buffer *m) - debug3("%s: sending pwdata", __func__); - mm_request_send(sock, MONITOR_ANS_JPAKE_GET_PWDATA, m); - -- bzero(hash_scheme, strlen(hash_scheme)); -- bzero(salt, strlen(salt)); -+ memset(hash_scheme, 0, strlen(hash_scheme)); -+ memset(salt, 0, strlen(salt)); - xfree(hash_scheme); - xfree(salt); - -@@ -2098,8 +2098,8 @@ mm_answer_jpake_step2(int sock, Buffer *m) - - JPAKE_DEBUG_CTX((pctx, "step2 done in %s", __func__)); - -- bzero(x1_proof, x1_proof_len); -- bzero(x2_proof, x2_proof_len); -+ memset(x1_proof, 0, x1_proof_len); -+ memset(x2_proof, 0, x2_proof_len); - xfree(x1_proof); - xfree(x2_proof); - -@@ -2111,7 +2111,7 @@ mm_answer_jpake_step2(int sock, Buffer *m) - debug3("%s: sending step2", __func__); - mm_request_send(sock, MONITOR_ANS_JPAKE_STEP2, m); - -- bzero(x4_s_proof, x4_s_proof_len); -+ memset(x4_s_proof, 0, x4_s_proof_len); - xfree(x4_s_proof); - - monitor_permit(mon_dispatch, MONITOR_REQ_JPAKE_KEY_CONFIRM, 1); -@@ -2145,7 +2145,7 @@ mm_answer_jpake_key_confirm(int sock, Buffer *m) - - JPAKE_DEBUG_CTX((pctx, "key_confirm done in %s", __func__)); - -- bzero(x2_s_proof, x2_s_proof_len); -+ memset(x2_s_proof, 0, x2_s_proof_len); - buffer_clear(m); - - /* pctx->k is sensitive, not sent */ -@@ -2179,7 +2179,7 @@ mm_answer_jpake_check_confirm(int sock, Buffer *m) - - JPAKE_DEBUG_CTX((pctx, "check_confirm done in %s", __func__)); - -- bzero(peer_confirm_hash, peer_confirm_hash_len); -+ memset(peer_confirm_hash, 0, peer_confirm_hash_len); - xfree(peer_confirm_hash); - - buffer_clear(m); -diff --git a/openbsd-compat/port-tun.c b/openbsd-compat/port-tun.c -index 0d756f7..98332ae 100644 ---- a/openbsd-compat/port-tun.c -+++ b/openbsd-compat/port-tun.c -@@ -67,7 +67,7 @@ sys_tun_open(int tun, int mode) - return (-1); - } - -- bzero(&ifr, sizeof(ifr)); -+ memset(&ifr, 0, sizeof(ifr)); - - if (mode == SSH_TUNMODE_ETHERNET) { - ifr.ifr_flags = IFF_TAP; -@@ -215,7 +215,7 @@ sys_tun_infilter(struct Channel *c, char *buf, int len) - if (len <= 0 || len > (int)(sizeof(rbuf) - sizeof(*af))) - return (-1); - ptr = (char *)&rbuf[0]; -- bcopy(buf, ptr + sizeof(u_int32_t), len); -+ memmove(ptr + sizeof(u_int32_t), buf, len); - len += sizeof(u_int32_t); - af = (u_int32_t *)ptr; - -diff --git a/schnorr.c b/schnorr.c -index c17ff32..ec4e41b 100644 ---- a/schnorr.c -+++ b/schnorr.c -@@ -101,7 +101,7 @@ schnorr_hash(const BIGNUM *p, const BIGNUM *q, const BIGNUM *g, - SCHNORR_DEBUG_BN((h, "%s: h = ", __func__)); - out: - buffer_free(&b); -- bzero(digest, digest_len); -+ memset(digest, 0, digest_len); - xfree(digest); - digest_len = 0; - if (success == 0) -@@ -451,7 +451,7 @@ hash_buffer(const u_char *buf, u_int len, const EVP_MD *md, - success = 0; - out: - EVP_MD_CTX_cleanup(&evp_md_ctx); -- bzero(digest, sizeof(digest)); -+ memset(digest, 0, sizeof(digest)); - digest_len = 0; - return success; - } -@@ -544,7 +544,7 @@ modp_group_free(struct modp_group *grp) - BN_clear_free(grp->p); - if (grp->q != NULL) - BN_clear_free(grp->q); -- bzero(grp, sizeof(*grp)); -+ memset(grp, 0, sizeof(*grp)); - xfree(grp); - } - -diff --git a/session.c b/session.c -index 71e4fbe..70c51f2 100644 ---- a/session.c -+++ b/session.c -@@ -1895,7 +1895,7 @@ session_unused(int id) - fatal("%s: insane session id %d (max %d nalloc %d)", - __func__, id, options.max_sessions, sessions_nalloc); - } -- bzero(&sessions[id], sizeof(*sessions)); -+ memset(&sessions[id], 0, sizeof(*sessions)); - sessions[id].self = id; - sessions[id].used = 0; - sessions[id].chanid = -1; -diff --git a/sftp-client.c b/sftp-client.c -index 9dab477..0815b41 100644 ---- a/sftp-client.c -+++ b/sftp-client.c -@@ -289,7 +289,7 @@ get_decode_statvfs(int fd, struct sftp_statvfs *st, u_int expected_id, - SSH2_FXP_EXTENDED_REPLY, type); - } - -- bzero(st, sizeof(*st)); -+ memset(st, 0, sizeof(*st)); - st->f_bsize = buffer_get_int64(&msg); - st->f_frsize = buffer_get_int64(&msg); - st->f_blocks = buffer_get_int64(&msg); -diff --git a/ssh-keygen.c b/ssh-keygen.c -index d90b1df..d78837a 100644 ---- a/ssh-keygen.c -+++ b/ssh-keygen.c -@@ -1503,7 +1503,7 @@ parse_absolute_time(const char *s) - fatal("Invalid certificate time format %s", s); - } - -- bzero(&tm, sizeof(tm)); -+ memset(&tm, 0, sizeof(tm)); - if (strptime(buf, fmt, &tm) == NULL) - fatal("Invalid certificate time %s", s); - if ((tt = mktime(&tm)) < 0) -diff --git a/ssh.c b/ssh.c -index 4419f76..52a8b5e 100644 ---- a/ssh.c -+++ b/ssh.c -@@ -1436,8 +1436,8 @@ load_public_identity_files(void) - #endif /* PKCS11 */ - - n_ids = 0; -- bzero(identity_files, sizeof(identity_files)); -- bzero(identity_keys, sizeof(identity_keys)); -+ memset(identity_files, 0, sizeof(identity_files)); -+ memset(identity_keys, 0, sizeof(identity_keys)); - - #ifdef ENABLE_PKCS11 - if (options.pkcs11_provider != NULL && -@@ -1511,8 +1511,8 @@ load_public_identity_files(void) - memcpy(options.identity_files, identity_files, sizeof(identity_files)); - memcpy(options.identity_keys, identity_keys, sizeof(identity_keys)); - -- bzero(pwname, strlen(pwname)); -+ memset(pwname, 0, strlen(pwname)); - xfree(pwname); -- bzero(pwdir, strlen(pwdir)); -+ memset(pwdir, 0, strlen(pwdir)); - xfree(pwdir); - } -diff --git a/sshconnect2.c b/sshconnect2.c -index 4c379ae..b5502c2 100644 ---- a/sshconnect2.c -+++ b/sshconnect2.c -@@ -948,14 +948,14 @@ jpake_password_to_secret(Authctxt *authctxt, const char *crypt_scheme, - &secret, &secret_len) != 0) - fatal("%s: hash_buffer", __func__); - -- bzero(password, strlen(password)); -- bzero(crypted, strlen(crypted)); -+ memset(password, 0, strlen(password)); -+ memset(crypted, 0, strlen(crypted)); - xfree(password); - xfree(crypted); - - if ((ret = BN_bin2bn(secret, secret_len, NULL)) == NULL) - fatal("%s: BN_bin2bn (secret)", __func__); -- bzero(secret, secret_len); -+ memset(secret, 0, secret_len); - xfree(secret); - - return ret; -@@ -992,8 +992,8 @@ input_userauth_jpake_server_step1(int type, u_int32_t seq, void *ctxt) - - /* Obtain password and derive secret */ - pctx->s = jpake_password_to_secret(authctxt, crypt_scheme, salt); -- bzero(crypt_scheme, strlen(crypt_scheme)); -- bzero(salt, strlen(salt)); -+ memset(crypt_scheme, 0, strlen(crypt_scheme)); -+ memset(salt, 0, strlen(salt)); - xfree(crypt_scheme); - xfree(salt); - JPAKE_DEBUG_BN((pctx->s, "%s: s = ", __func__)); -@@ -1008,8 +1008,8 @@ input_userauth_jpake_server_step1(int type, u_int32_t seq, void *ctxt) - &pctx->a, - &x2_s_proof, &x2_s_proof_len); - -- bzero(x3_proof, x3_proof_len); -- bzero(x4_proof, x4_proof_len); -+ memset(x3_proof, 0, x3_proof_len); -+ memset(x4_proof, 0, x4_proof_len); - xfree(x3_proof); - xfree(x4_proof); - -@@ -1021,7 +1021,7 @@ input_userauth_jpake_server_step1(int type, u_int32_t seq, void *ctxt) - packet_put_string(x2_s_proof, x2_s_proof_len); - packet_send(); - -- bzero(x2_s_proof, x2_s_proof_len); -+ memset(x2_s_proof, 0, x2_s_proof_len); - xfree(x2_s_proof); - - /* Expect step 2 packet from peer */ -@@ -1061,7 +1061,7 @@ input_userauth_jpake_server_step2(int type, u_int32_t seq, void *ctxt) - &pctx->k, - &pctx->h_k_cid_sessid, &pctx->h_k_cid_sessid_len); - -- bzero(x4_s_proof, x4_s_proof_len); -+ memset(x4_s_proof, 0, x4_s_proof_len); - xfree(x4_s_proof); - - JPAKE_DEBUG_CTX((pctx, "confirm sending in %s", __func__)); -@@ -1725,8 +1725,8 @@ userauth_jpake(Authctxt *authctxt) - packet_put_string(x2_proof, x2_proof_len); - packet_send(); - -- bzero(x1_proof, x1_proof_len); -- bzero(x2_proof, x2_proof_len); -+ memset(x1_proof, 0, x1_proof_len); -+ memset(x2_proof, 0, x2_proof_len); - xfree(x1_proof); - xfree(x2_proof); - --- -1.7.2.2 - diff --git a/package/openssh/openssh.mk b/package/openssh/openssh.mk index 104977e48b..8ab2b476ed 100644 --- a/package/openssh/openssh.mk +++ b/package/openssh/openssh.mk @@ -1,21 +1,26 @@ -############################################################# +################################################################################ # # openssh # -############################################################# +################################################################################ -OPENSSH_VERSION = 5.8p1 +OPENSSH_VERSION = 6.4p1 OPENSSH_SITE = http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable OPENSSH_CONF_ENV = LD="$(TARGET_CC)" LDFLAGS="$(TARGET_CFLAGS)" -OPENSSH_CONF_OPT = --libexecdir=/usr/lib --disable-lastlog --disable-utmp \ +OPENSSH_CONF_OPT = --disable-lastlog --disable-utmp \ --disable-utmpx --disable-wtmp --disable-wtmpx --disable-strip OPENSSH_DEPENDENCIES = zlib openssl +ifeq ($(BR2_PACKAGE_LINUX_PAM),y) +OPENSSH_DEPENDENCIES += linux-pam +OPENSSH_CONF_OPT += --with-pam +endif + define OPENSSH_INSTALL_INITSCRIPT $(INSTALL) -D -m 755 package/openssh/S50sshd $(TARGET_DIR)/etc/init.d/S50sshd endef OPENSSH_POST_INSTALL_TARGET_HOOKS += OPENSSH_INSTALL_INITSCRIPT -$(eval $(call AUTOTARGETS,package,openssh)) +$(eval $(autotools-package)) diff --git a/package/openssl/Config.in b/package/openssl/Config.in index 3e09d88b82..d1ed520278 100644 --- a/package/openssl/Config.in +++ b/package/openssl/Config.in @@ -12,6 +12,8 @@ config BR2_PACKAGE_OPENSSL config BR2_PACKAGE_OPENSSL_BIN bool "openssl binary" depends on BR2_PACKAGE_OPENSSL + # uses fork() + depends on BR2_USE_MMU help Install the openssl binary to the target file system. This is a command line tool for doing various crypthographic stuff. @@ -21,13 +23,3 @@ config BR2_PACKAGE_OPENSSL_ENGINES depends on BR2_PACKAGE_OPENSSL help Install additional encryption engine libraries. - -config BR2_PACKAGE_OPENSSL_OCF - bool "openssl ocf support" - depends on BR2_PACKAGE_OPENSSL - help - Enable openssl cryptodev (OCF) hardware acceleration support. - This requires kernel patches from the ocf-linux project otherwise - you'll just have a bigger openssl library that works as usual. - - http://ocf-linux.sourceforge.net/ diff --git a/package/openssl/ocf-cryptodev-20101223.h b/package/openssl/ocf-cryptodev-20101223.h deleted file mode 100644 index cca0ec822d..0000000000 --- a/package/openssl/ocf-cryptodev-20101223.h +++ /dev/null @@ -1,480 +0,0 @@ -/* $FreeBSD: src/sys/opencrypto/cryptodev.h,v 1.25 2007/05/09 19:37:02 gnn Exp $ */ -/* $OpenBSD: cryptodev.h,v 1.31 2002/06/11 11:14:29 beck Exp $ */ - -/*- - * Linux port done by David McCullough - * Copyright (C) 2006-2010 David McCullough - * Copyright (C) 2004-2005 Intel Corporation. - * The license and original author are listed below. - * - * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) - * Copyright (c) 2002-2006 Sam Leffler, Errno Consulting - * - * This code was written by Angelos D. Keromytis in Athens, Greece, in - * February 2000. Network Security Technologies Inc. (NSTI) kindly - * supported the development of this code. - * - * Copyright (c) 2000 Angelos D. Keromytis - * - * Permission to use, copy, and modify this software with or without fee - * is hereby granted, provided that this entire notice is included in - * all source code copies of any software which is or includes a copy or - * modification of this software. - * - * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY - * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE - * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR - * PURPOSE. - * - * Copyright (c) 2001 Theo de Raadt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Effort sponsored in part by the Defense Advanced Research Projects - * Agency (DARPA) and Air Force Research Laboratory, Air Force - * Materiel Command, USAF, under agreement number F30602-01-2-0537. - * - */ - -#ifndef _CRYPTO_CRYPTO_H_ -#define _CRYPTO_CRYPTO_H_ - -/* Some initial values */ -#define CRYPTO_DRIVERS_INITIAL 4 -#define CRYPTO_SW_SESSIONS 32 - -/* Hash values */ -#define NULL_HASH_LEN 0 -#define MD5_HASH_LEN 16 -#define SHA1_HASH_LEN 20 -#define RIPEMD160_HASH_LEN 20 -#define SHA2_256_HASH_LEN 32 -#define SHA2_384_HASH_LEN 48 -#define SHA2_512_HASH_LEN 64 -#define MD5_KPDK_HASH_LEN 16 -#define SHA1_KPDK_HASH_LEN 20 -/* Maximum hash algorithm result length */ -#define HASH_MAX_LEN SHA2_512_HASH_LEN /* Keep this updated */ - -/* HMAC values */ -#define NULL_HMAC_BLOCK_LEN 1 -#define MD5_HMAC_BLOCK_LEN 64 -#define SHA1_HMAC_BLOCK_LEN 64 -#define RIPEMD160_HMAC_BLOCK_LEN 64 -#define SHA2_256_HMAC_BLOCK_LEN 64 -#define SHA2_384_HMAC_BLOCK_LEN 128 -#define SHA2_512_HMAC_BLOCK_LEN 128 -/* Maximum HMAC block length */ -#define HMAC_MAX_BLOCK_LEN SHA2_512_HMAC_BLOCK_LEN /* Keep this updated */ -#define HMAC_IPAD_VAL 0x36 -#define HMAC_OPAD_VAL 0x5C - -/* Encryption algorithm block sizes */ -#define NULL_BLOCK_LEN 1 -#define DES_BLOCK_LEN 8 -#define DES3_BLOCK_LEN 8 -#define BLOWFISH_BLOCK_LEN 8 -#define SKIPJACK_BLOCK_LEN 8 -#define CAST128_BLOCK_LEN 8 -#define RIJNDAEL128_BLOCK_LEN 16 -#define AES_BLOCK_LEN RIJNDAEL128_BLOCK_LEN -#define CAMELLIA_BLOCK_LEN 16 -#define ARC4_BLOCK_LEN 1 -#define EALG_MAX_BLOCK_LEN AES_BLOCK_LEN /* Keep this updated */ - -/* Encryption algorithm min and max key sizes */ -#define NULL_MIN_KEY_LEN 0 -#define NULL_MAX_KEY_LEN 0 -#define DES_MIN_KEY_LEN 8 -#define DES_MAX_KEY_LEN 8 -#define DES3_MIN_KEY_LEN 24 -#define DES3_MAX_KEY_LEN 24 -#define BLOWFISH_MIN_KEY_LEN 4 -#define BLOWFISH_MAX_KEY_LEN 56 -#define SKIPJACK_MIN_KEY_LEN 10 -#define SKIPJACK_MAX_KEY_LEN 10 -#define CAST128_MIN_KEY_LEN 5 -#define CAST128_MAX_KEY_LEN 16 -#define RIJNDAEL128_MIN_KEY_LEN 16 -#define RIJNDAEL128_MAX_KEY_LEN 32 -#define AES_MIN_KEY_LEN RIJNDAEL128_MIN_KEY_LEN -#define AES_MAX_KEY_LEN RIJNDAEL128_MAX_KEY_LEN -#define CAMELLIA_MIN_KEY_LEN 16 -#define CAMELLIA_MAX_KEY_LEN 32 -#define ARC4_MIN_KEY_LEN 1 -#define ARC4_MAX_KEY_LEN 256 - -/* Max size of data that can be processed */ -#define CRYPTO_MAX_DATA_LEN 64*1024 - 1 - -#define CRYPTO_ALGORITHM_MIN 1 -#define CRYPTO_DES_CBC 1 -#define CRYPTO_3DES_CBC 2 -#define CRYPTO_BLF_CBC 3 -#define CRYPTO_CAST_CBC 4 -#define CRYPTO_SKIPJACK_CBC 5 -#define CRYPTO_MD5_HMAC 6 -#define CRYPTO_SHA1_HMAC 7 -#define CRYPTO_RIPEMD160_HMAC 8 -#define CRYPTO_MD5_KPDK 9 -#define CRYPTO_SHA1_KPDK 10 -#define CRYPTO_RIJNDAEL128_CBC 11 /* 128 bit blocksize */ -#define CRYPTO_AES_CBC 11 /* 128 bit blocksize -- the same as above */ -#define CRYPTO_ARC4 12 -#define CRYPTO_MD5 13 -#define CRYPTO_SHA1 14 -#define CRYPTO_NULL_HMAC 15 -#define CRYPTO_NULL_CBC 16 -#define CRYPTO_DEFLATE_COMP 17 /* Deflate compression algorithm */ -#define CRYPTO_SHA2_256_HMAC 18 -#define CRYPTO_SHA2_384_HMAC 19 -#define CRYPTO_SHA2_512_HMAC 20 -#define CRYPTO_CAMELLIA_CBC 21 -#define CRYPTO_SHA2_256 22 -#define CRYPTO_SHA2_384 23 -#define CRYPTO_SHA2_512 24 -#define CRYPTO_RIPEMD160 25 -#define CRYPTO_LZS_COMP 26 -#define CRYPTO_ALGORITHM_MAX 26 /* Keep updated - see above */ - -/* Algorithm flags */ -#define CRYPTO_ALG_FLAG_SUPPORTED 0x01 /* Algorithm is supported */ -#define CRYPTO_ALG_FLAG_RNG_ENABLE 0x02 /* Has HW RNG for DH/DSA */ -#define CRYPTO_ALG_FLAG_DSA_SHA 0x04 /* Can do SHA on msg */ - -/* - * Crypto driver/device flags. They can set in the crid - * parameter when creating a session or submitting a key - * op to affect the device/driver assigned. If neither - * of these are specified then the crid is assumed to hold - * the driver id of an existing (and suitable) device that - * must be used to satisfy the request. - */ -#define CRYPTO_FLAG_HARDWARE 0x01000000 /* hardware accelerated */ -#define CRYPTO_FLAG_SOFTWARE 0x02000000 /* software implementation */ - -/* NB: deprecated */ -struct session_op { - u_int32_t cipher; /* ie. CRYPTO_DES_CBC */ - u_int32_t mac; /* ie. CRYPTO_MD5_HMAC */ - - u_int32_t keylen; /* cipher key */ - caddr_t key; - int mackeylen; /* mac key */ - caddr_t mackey; - - u_int32_t ses; /* returns: session # */ -}; - -struct session2_op { - u_int32_t cipher; /* ie. CRYPTO_DES_CBC */ - u_int32_t mac; /* ie. CRYPTO_MD5_HMAC */ - - u_int32_t keylen; /* cipher key */ - caddr_t key; - int mackeylen; /* mac key */ - caddr_t mackey; - - u_int32_t ses; /* returns: session # */ - int crid; /* driver id + flags (rw) */ - int pad[4]; /* for future expansion */ -}; - -struct crypt_op { - u_int32_t ses; - u_int16_t op; /* i.e. COP_ENCRYPT */ -#define COP_NONE 0 -#define COP_ENCRYPT 1 -#define COP_DECRYPT 2 - u_int16_t flags; -#define COP_F_BATCH 0x0008 /* Batch op if possible */ - u_int len; - caddr_t src, dst; /* become iov[] inside kernel */ - caddr_t mac; /* must be big enough for chosen MAC */ - caddr_t iv; -}; - -/* - * Parameters for looking up a crypto driver/device by - * device name or by id. The latter are returned for - * created sessions (crid) and completed key operations. - */ -struct crypt_find_op { - int crid; /* driver id + flags */ - char name[32]; /* device/driver name */ -}; - -/* bignum parameter, in packed bytes, ... */ -struct crparam { - caddr_t crp_p; - u_int crp_nbits; -}; - -#define CRK_MAXPARAM 8 - -struct crypt_kop { - u_int crk_op; /* ie. CRK_MOD_EXP or other */ - u_int crk_status; /* return status */ - u_short crk_iparams; /* # of input parameters */ - u_short crk_oparams; /* # of output parameters */ - u_int crk_crid; /* NB: only used by CIOCKEY2 (rw) */ - struct crparam crk_param[CRK_MAXPARAM]; -}; -#define CRK_ALGORITM_MIN 0 -#define CRK_MOD_EXP 0 -#define CRK_MOD_EXP_CRT 1 -#define CRK_DSA_SIGN 2 -#define CRK_DSA_VERIFY 3 -#define CRK_DH_COMPUTE_KEY 4 -#define CRK_ALGORITHM_MAX 4 /* Keep updated - see below */ - -#define CRF_MOD_EXP (1 << CRK_MOD_EXP) -#define CRF_MOD_EXP_CRT (1 << CRK_MOD_EXP_CRT) -#define CRF_DSA_SIGN (1 << CRK_DSA_SIGN) -#define CRF_DSA_VERIFY (1 << CRK_DSA_VERIFY) -#define CRF_DH_COMPUTE_KEY (1 << CRK_DH_COMPUTE_KEY) - -/* - * done against open of /dev/crypto, to get a cloned descriptor. - * Please use F_SETFD against the cloned descriptor. - */ -#define CRIOGET _IOWR('c', 100, u_int32_t) -#define CRIOASYMFEAT CIOCASYMFEAT -#define CRIOFINDDEV CIOCFINDDEV - -/* the following are done against the cloned descriptor */ -#define CIOCGSESSION _IOWR('c', 101, struct session_op) -#define CIOCFSESSION _IOW('c', 102, u_int32_t) -#define CIOCCRYPT _IOWR('c', 103, struct crypt_op) -#define CIOCKEY _IOWR('c', 104, struct crypt_kop) -#define CIOCASYMFEAT _IOR('c', 105, u_int32_t) -#define CIOCGSESSION2 _IOWR('c', 106, struct session2_op) -#define CIOCKEY2 _IOWR('c', 107, struct crypt_kop) -#define CIOCFINDDEV _IOWR('c', 108, struct crypt_find_op) - -struct cryptotstat { - struct timespec acc; /* total accumulated time */ - struct timespec min; /* min time */ - struct timespec max; /* max time */ - u_int32_t count; /* number of observations */ -}; - -struct cryptostats { - u_int32_t cs_ops; /* symmetric crypto ops submitted */ - u_int32_t cs_errs; /* symmetric crypto ops that failed */ - u_int32_t cs_kops; /* asymetric/key ops submitted */ - u_int32_t cs_kerrs; /* asymetric/key ops that failed */ - u_int32_t cs_intrs; /* crypto swi thread activations */ - u_int32_t cs_rets; /* crypto return thread activations */ - u_int32_t cs_blocks; /* symmetric op driver block */ - u_int32_t cs_kblocks; /* symmetric op driver block */ - /* - * When CRYPTO_TIMING is defined at compile time and the - * sysctl debug.crypto is set to 1, the crypto system will - * accumulate statistics about how long it takes to process - * crypto requests at various points during processing. - */ - struct cryptotstat cs_invoke; /* crypto_dipsatch -> crypto_invoke */ - struct cryptotstat cs_done; /* crypto_invoke -> crypto_done */ - struct cryptotstat cs_cb; /* crypto_done -> callback */ - struct cryptotstat cs_finis; /* callback -> callback return */ - - u_int32_t cs_drops; /* crypto ops dropped due to congestion */ -}; - -#ifdef __KERNEL__ - -/* Standard initialization structure beginning */ -struct cryptoini { - int cri_alg; /* Algorithm to use */ - int cri_klen; /* Key length, in bits */ - int cri_mlen; /* Number of bytes we want from the - entire hash. 0 means all. */ - caddr_t cri_key; /* key to use */ - u_int8_t cri_iv[EALG_MAX_BLOCK_LEN]; /* IV to use */ - struct cryptoini *cri_next; -}; - -/* Describe boundaries of a single crypto operation */ -struct cryptodesc { - int crd_skip; /* How many bytes to ignore from start */ - int crd_len; /* How many bytes to process */ - int crd_inject; /* Where to inject results, if applicable */ - int crd_flags; - -#define CRD_F_ENCRYPT 0x01 /* Set when doing encryption */ -#define CRD_F_IV_PRESENT 0x02 /* When encrypting, IV is already in - place, so don't copy. */ -#define CRD_F_IV_EXPLICIT 0x04 /* IV explicitly provided */ -#define CRD_F_DSA_SHA_NEEDED 0x08 /* Compute SHA-1 of buffer for DSA */ -#define CRD_F_KEY_EXPLICIT 0x10 /* Key explicitly provided */ -#define CRD_F_COMP 0x0f /* Set when doing compression */ - - struct cryptoini CRD_INI; /* Initialization/context data */ -#define crd_iv CRD_INI.cri_iv -#define crd_key CRD_INI.cri_key -#define crd_alg CRD_INI.cri_alg -#define crd_klen CRD_INI.cri_klen -#define crd_mlen CRD_INI.cri_mlen - - struct cryptodesc *crd_next; -}; - -/* Structure describing complete operation */ -struct cryptop { - struct list_head crp_next; - wait_queue_head_t crp_waitq; - - u_int64_t crp_sid; /* Session ID */ - int crp_ilen; /* Input data total length */ - int crp_olen; /* Result total length */ - - int crp_etype; /* - * Error type (zero means no error). - * All error codes except EAGAIN - * indicate possible data corruption (as in, - * the data have been touched). On all - * errors, the crp_sid may have changed - * (reset to a new one), so the caller - * should always check and use the new - * value on future requests. - */ - int crp_flags; - -#define CRYPTO_F_SKBUF 0x0001 /* Input/output are skbuf chains */ -#define CRYPTO_F_IOV 0x0002 /* Input/output are uio */ -#define CRYPTO_F_REL 0x0004 /* Must return data in same place */ -#define CRYPTO_F_BATCH 0x0008 /* Batch op if possible */ -#define CRYPTO_F_CBIMM 0x0010 /* Do callback immediately */ -#define CRYPTO_F_DONE 0x0020 /* Operation completed */ -#define CRYPTO_F_CBIFSYNC 0x0040 /* Do CBIMM if op is synchronous */ - - caddr_t crp_buf; /* Data to be processed */ - caddr_t crp_opaque; /* Opaque pointer, passed along */ - struct cryptodesc *crp_desc; /* Linked list of processing descriptors */ - - int (*crp_callback)(struct cryptop *); /* Callback function */ -}; - -#define CRYPTO_BUF_CONTIG 0x0 -#define CRYPTO_BUF_IOV 0x1 -#define CRYPTO_BUF_SKBUF 0x2 - -#define CRYPTO_OP_DECRYPT 0x0 -#define CRYPTO_OP_ENCRYPT 0x1 - -/* - * Hints passed to process methods. - */ -#define CRYPTO_HINT_MORE 0x1 /* more ops coming shortly */ - -struct cryptkop { - struct list_head krp_next; - wait_queue_head_t krp_waitq; - - int krp_flags; -#define CRYPTO_KF_DONE 0x0001 /* Operation completed */ -#define CRYPTO_KF_CBIMM 0x0002 /* Do callback immediately */ - - u_int krp_op; /* ie. CRK_MOD_EXP or other */ - u_int krp_status; /* return status */ - u_short krp_iparams; /* # of input parameters */ - u_short krp_oparams; /* # of output parameters */ - u_int krp_crid; /* desired device, etc. */ - u_int32_t krp_hid; - struct crparam krp_param[CRK_MAXPARAM]; /* kvm */ - int (*krp_callback)(struct cryptkop *); -}; - -#include - -/* - * Session ids are 64 bits. The lower 32 bits contain a "local id" which - * is a driver-private session identifier. The upper 32 bits contain a - * "hardware id" used by the core crypto code to identify the driver and - * a copy of the driver's capabilities that can be used by client code to - * optimize operation. - */ -#define CRYPTO_SESID2HID(_sid) (((_sid) >> 32) & 0x00ffffff) -#define CRYPTO_SESID2CAPS(_sid) (((_sid) >> 32) & 0xff000000) -#define CRYPTO_SESID2LID(_sid) (((u_int32_t) (_sid)) & 0xffffffff) - -extern int crypto_newsession(u_int64_t *sid, struct cryptoini *cri, int hard); -extern int crypto_freesession(u_int64_t sid); -#define CRYPTOCAP_F_HARDWARE CRYPTO_FLAG_HARDWARE -#define CRYPTOCAP_F_SOFTWARE CRYPTO_FLAG_SOFTWARE -#define CRYPTOCAP_F_SYNC 0x04000000 /* operates synchronously */ -extern int32_t crypto_get_driverid(device_t dev, int flags); -extern int crypto_find_driver(const char *); -extern device_t crypto_find_device_byhid(int hid); -extern int crypto_getcaps(int hid); -extern int crypto_register(u_int32_t driverid, int alg, u_int16_t maxoplen, - u_int32_t flags); -extern int crypto_kregister(u_int32_t, int, u_int32_t); -extern int crypto_unregister(u_int32_t driverid, int alg); -extern int crypto_unregister_all(u_int32_t driverid); -extern int crypto_dispatch(struct cryptop *crp); -extern int crypto_kdispatch(struct cryptkop *); -#define CRYPTO_SYMQ 0x1 -#define CRYPTO_ASYMQ 0x2 -extern int crypto_unblock(u_int32_t, int); -extern void crypto_done(struct cryptop *crp); -extern void crypto_kdone(struct cryptkop *); -extern int crypto_getfeat(int *); - -extern void crypto_freereq(struct cryptop *crp); -extern struct cryptop *crypto_getreq(int num); - -extern int crypto_usercrypto; /* userland may do crypto requests */ -extern int crypto_userasymcrypto; /* userland may do asym crypto reqs */ -extern int crypto_devallowsoft; /* only use hardware crypto */ - -/* - * random number support, crypto_unregister_all will unregister - */ -extern int crypto_rregister(u_int32_t driverid, - int (*read_random)(void *arg, u_int32_t *buf, int len), void *arg); -extern int crypto_runregister_all(u_int32_t driverid); - -/* - * Crypto-related utility routines used mainly by drivers. - * - * XXX these don't really belong here; but for now they're - * kept apart from the rest of the system. - */ -struct uio; -extern void cuio_copydata(struct uio* uio, int off, int len, caddr_t cp); -extern void cuio_copyback(struct uio* uio, int off, int len, caddr_t cp); -extern struct iovec *cuio_getptr(struct uio *uio, int loc, int *off); - -extern void crypto_copyback(int flags, caddr_t buf, int off, int size, - caddr_t in); -extern void crypto_copydata(int flags, caddr_t buf, int off, int size, - caddr_t out); -extern int crypto_apply(int flags, caddr_t buf, int off, int len, - int (*f)(void *, void *, u_int), void *arg); - -#endif /* __KERNEL__ */ -#endif /* _CRYPTO_CRYPTO_H_ */ diff --git a/package/openssl/openssl.mk b/package/openssl/openssl.mk index 7bf347ad87..5416141168 100644 --- a/package/openssl/openssl.mk +++ b/package/openssl/openssl.mk @@ -1,44 +1,69 @@ -############################################################# +################################################################################ # # openssl # -############################################################# +################################################################################ -OPENSSL_VERSION = 1.0.0d +OPENSSL_VERSION = 1.0.1e OPENSSL_SITE = http://www.openssl.org/source +OPENSSL_LICENSE = OpenSSL or SSLeay +OPENSSL_LICENSE_FILES = LICENSE OPENSSL_INSTALL_STAGING = YES OPENSSL_DEPENDENCIES = zlib +HOST_OPENSSL_DEPENDENCIES = host-zlib OPENSSL_TARGET_ARCH = generic32 OPENSSL_CFLAGS = $(TARGET_CFLAGS) -ifeq ($(BR2_PACKAGE_OPENSSL_OCF),y) -OPENSSL_CFLAGS += -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS - -define OPENSSL_INSTALL_CRYPTODEV_H -$(INSTALL) -D package/openssl/ocf-cryptodev-20101223.h \ - $(STAGING_DIR)/usr/include/crypto/cryptodev.h +ifeq ($(BR2_PACKAGE_OPENSSL_BIN),) +define OPENSSL_DISABLE_APPS + $(SED) '/^build_apps/! s/build_apps//' $(@D)/Makefile.org + $(SED) '/^DIRS=/ s/apps//' $(@D)/Makefile.org endef +endif + +OPENSSL_PRE_CONFIGURE_HOOKS += OPENSSL_DISABLE_APPS + +ifeq ($(BR2_PACKAGE_CRYPTODEV_LINUX),y) + OPENSSL_CFLAGS += -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS + OPENSSL_DEPENDENCIES += cryptodev-linux +endif -OPENSSL_POST_EXTRACT_HOOKS += OPENSSL_INSTALL_CRYPTODEV_H +ifeq ($(BR2_PACKAGE_OCF_LINUX),y) + OPENSSL_CFLAGS += -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS + OPENSSL_DEPENDENCIES += ocf-linux endif # Some architectures are optimized in OpenSSL ifeq ($(ARCH),arm) -ifneq ($(BR2_generic_arm),y) -ifneq ($(BR2_arm610),y) -ifneq ($(BR2_arm710),y) OPENSSL_TARGET_ARCH = armv4 endif -endif -endif -endif ifeq ($(ARCH),powerpc) +# 4xx cores seem to have trouble with openssl's ASM optimizations +ifeq ($(BR2_powerpc_401)$(BR2_powerpc_403)$(BR2_powerpc_405)$(BR2_powerpc_405fp)$(BR2_powerpc_440)$(BR2_powerpc_440fp),) OPENSSL_TARGET_ARCH = ppc endif +endif ifeq ($(ARCH),x86_64) OPENSSL_TARGET_ARCH = x86_64 endif +# Workaround for bug #3445 +ifeq ($(BR2_x86_i386),y) + OPENSSL_TARGET_ARCH = generic32 386 +endif + +define HOST_OPENSSL_CONFIGURE_CMDS + (cd $(@D); \ + $(HOST_CONFIGURE_OPTS) \ + ./config \ + --prefix=/usr \ + --openssldir=/etc/ssl \ + --libdir=/lib \ + shared \ + no-zlib \ + ) +endef + define OPENSSL_CONFIGURE_CMDS (cd $(@D); \ $(TARGET_CONFIGURE_ARGS) \ @@ -48,57 +73,55 @@ define OPENSSL_CONFIGURE_CMDS --prefix=/usr \ --openssldir=/etc/ssl \ --libdir=/lib \ - threads \ - shared \ + $(if $(BR2_TOOLCHAIN_HAS_THREADS),threads,no-threads) \ + $(if $(BR2_PREFER_STATIC_LIB),no-shared,shared) \ no-idea \ no-rc5 \ enable-camellia \ enable-mdc2 \ enable-tlsext \ - zlib-dynamic \ + $(if $(BR2_PREFER_STATIC_LIB),zlib,zlib-dynamic) \ + $(if $(BR2_PREFER_STATIC_LIB),no-dso) \ ) $(SED) "s:-march=[-a-z0-9] ::" -e "s:-mcpu=[-a-z0-9] ::g" $(@D)/Makefile $(SED) "s:-O[0-9]:$(OPENSSL_CFLAGS):" $(@D)/Makefile + $(SED) "s: build_tests::" $(@D)/Makefile +endef + +define HOST_OPENSSL_BUILD_CMDS + $(MAKE1) -C $(@D) endef define OPENSSL_BUILD_CMDS - $(MAKE1) -C $(@D) all build-shared - $(MAKE1) -C $(@D) do_linux-shared + $(MAKE1) -C $(@D) endef define OPENSSL_INSTALL_STAGING_CMDS $(MAKE1) -C $(@D) INSTALL_PREFIX=$(STAGING_DIR) install endef -define OPENSSL_INSTALL_TARGET_CMDS - $(MAKE1) -C $(@D) INSTALL_PREFIX=$(TARGET_DIR) install +define HOST_OPENSSL_INSTALL_CMDS + $(MAKE1) -C $(@D) INSTALL_PREFIX=$(HOST_DIR) install endef -define OPENSSL_REMOVE_DEV_FILES +define OPENSSL_INSTALL_TARGET_CMDS + $(MAKE1) -C $(@D) INSTALL_PREFIX=$(TARGET_DIR) install rm -rf $(TARGET_DIR)/usr/lib/ssl + rm -f $(TARGET_DIR)/usr/bin/c_rehash endef -ifneq ($(BR2_HAVE_DEVFILES),y) -OPENSSL_POST_INSTALL_TARGET_HOOKS += OPENSSL_REMOVE_DEV_FILES -endif - -define OPENSSL_REMOVE_OPENSSL_BIN - rm -f $(TARGET_DIR)/usr/bin/openssl -endef - -ifneq ($(BR2_PACKAGE_OPENSSL_BIN),y) -OPENSSL_POST_INSTALL_TARGET_HOOKS += OPENSSL_REMOVE_OPENSSL_BIN -endif +ifneq ($(BR2_PREFER_STATIC_LIB),y) -define OPENSSL_INSTALL_FIXUPS - rm -f $(TARGET_DIR)/usr/bin/c_rehash - # libraries gets installed read only, so strip fails +# libraries gets installed read only, so strip fails +define OPENSSL_INSTALL_FIXUPS_SHARED chmod +w $(TARGET_DIR)/usr/lib/engines/lib*.so for i in $(addprefix $(TARGET_DIR)/usr/lib/,libcrypto.so.* libssl.so.*); \ do chmod +w $$i; done endef -OPENSSL_POST_INSTALL_TARGET_HOOKS += OPENSSL_INSTALL_FIXUPS +OPENSSL_POST_INSTALL_TARGET_HOOKS += OPENSSL_INSTALL_FIXUPS_SHARED + +endif define OPENSSL_REMOVE_OPENSSL_ENGINES rm -rf $(TARGET_DIR)/usr/lib/engines @@ -115,4 +138,5 @@ define OPENSSL_UNINSTALL_CMDS rm -rf $(addprefix $(STAGING_DIR)/usr/lib/,ssl engines libcrypto* libssl* pkgconfig/libcrypto.pc) endef -$(eval $(call GENTARGETS,package,openssl)) +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/openswan/Config.in b/package/openswan/Config.in new file mode 100644 index 0000000000..932a75f672 --- /dev/null +++ b/package/openswan/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_OPENSWAN + bool "openswan" + depends on BR2_USE_MMU # iproute2 + select BR2_PACKAGE_GMP + select BR2_PACKAGE_IPROUTE2 + help + Openswan is an implementation of IPsec for Linux + + http://www.openswan.org diff --git a/package/openswan/openswan-wno-error-cpp.patch b/package/openswan/openswan-wno-error-cpp.patch new file mode 100644 index 0000000000..8e79ae9daa --- /dev/null +++ b/package/openswan/openswan-wno-error-cpp.patch @@ -0,0 +1,29 @@ +Kill -Wno-error=cpp, old(ish) gcc versions (< 4.4) don't like it and we still +got 4.3.x available for internal toolchains. + +Signed-off-by: Gustavo Zacarias + +diff -Nura openswan-2.6.39.orig/lib/libopenswan/Makefile openswan-2.6.39/lib/libopenswan/Makefile +--- openswan-2.6.39.orig/lib/libopenswan/Makefile 2013-06-11 07:22:50.228520267 -0300 ++++ openswan-2.6.39/lib/libopenswan/Makefile 2013-06-11 07:27:40.087849447 -0300 +@@ -86,7 +86,7 @@ + CFLAGS+= -Wno-error=cast-qual + + # some junk left in alg_info.c +-CFLAGS+= -Wno-error=cpp ++#CFLAGS+= -Wno-error=cpp + + #CFLAGS+= -Wmissing-declarations + CFLAGS+= -Wstrict-prototypes +diff -Nura openswan-2.6.39.orig/programs/pluto/Makefile openswan-2.6.39/programs/pluto/Makefile +--- openswan-2.6.39.orig/programs/pluto/Makefile 2013-06-11 07:22:49.753504978 -0300 ++++ openswan-2.6.39/programs/pluto/Makefile 2013-06-11 07:27:53.020265681 -0300 +@@ -47,7 +47,7 @@ + + # must turn this off due to myid.c + CFLAGS+= -Wno-error=cast-qual +-CFLAGS+= -Wno-error=cpp ++#CFLAGS+= -Wno-error=cpp + + ifeq ($(HAVE_BROKEN_POPEN),true) + CFLAGS+=-DHAVE_BROKEN_POPEN diff --git a/package/openswan/openswan.mk b/package/openswan/openswan.mk new file mode 100644 index 0000000000..0b8e7d3a69 --- /dev/null +++ b/package/openswan/openswan.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# openswan +# +################################################################################ + +OPENSWAN_VERSION = 2.6.39 +OPENSWAN_SITE = http://download.openswan.org/openswan +OPENSWAN_LICENSE = GPLv2+, BSD-3c +OPENSWAN_LICENSE_FILES = COPYING LICENSE + +OPENSWAN_DEPENDENCIES = host-bison gmp iproute2 +OPENSWAN_MAKE_OPT = ARCH=$(BR2_ARCH) CC="$(TARGET_CC)" \ + USERCOMPILE="$(TARGET_CFLAGS) -fPIE" INC_USRLOCAL=/usr \ + USE_KLIPS=false USE_MAST=false USE_NM=false + +ifeq ($(BR2_PACKAGE_LIBCURL),y) + OPENSWAN_DEPENDENCIES += libcurl + OPENSWAN_MAKE_OPT += USE_LIBCURL=true +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) + OPENSWAN_DEPENDENCIES += openssl + OPENSWAN_MAKE_OPT += HAVE_OPENSSL=true +ifeq ($(BR2_PACKAGE_OCF_LINUX),y) + OPENSWAN_MAKE_OPT += HAVE_OCF=true +endif +endif + +define OPENSWAN_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + $(OPENSWAN_MAKE_OPT) programs +endef + +define OPENSWAN_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + $(OPENSWAN_MAKE_OPT) DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/openvpn/Config.in b/package/openvpn/Config.in index 9f9057df0a..4a5e0ead1f 100644 --- a/package/openvpn/Config.in +++ b/package/openvpn/Config.in @@ -1,5 +1,11 @@ +comment "openvpn needs a toolchain w/ IPv6" + depends on BR2_USE_MMU + depends on !BR2_INET_IPV6 + config BR2_PACKAGE_OPENVPN bool "openvpn" + depends on BR2_INET_IPV6 + depends on BR2_USE_MMU # fork() help OpenVPN is a full-featured SSL VPN solution which can accomodate a wide range of configurations, including road @@ -8,20 +14,42 @@ config BR2_PACKAGE_OPENVPN remote access solutions with load balancing, failover, and fine-grained access-controls. - http://openvpn.sourceforge.net/ + http://openvpn.net/ + +if BR2_PACKAGE_OPENVPN config BR2_PACKAGE_OPENVPN_LZO bool "LZO compression" default y - depends on BR2_PACKAGE_OPENVPN select BR2_PACKAGE_LZO help Enable LZO compression. -config BR2_PACKAGE_OPENVPN_OPENSSL - bool "OpenSSL support" - default y - depends on BR2_PACKAGE_OPENVPN +config BR2_PACKAGE_OPENVPN_SMALL + bool "Optimize for small size" + help + Make OpenVPN as small as possible. + You loose eurephia, debugging info, help messages and more. + It saves around 100 KiB in binary file size. + +choice + prompt "Crypto backend" + default BR2_PACKAGE_OPENVPN_CRYPTO_OPENSSL + help + Select the cryptographic library to use. + + config BR2_PACKAGE_OPENVPN_CRYPTO_OPENSSL + bool "OpenSSL" select BR2_PACKAGE_OPENSSL help Enable TLS-based key exchange and OpenSSL crypto support. + + config BR2_PACKAGE_OPENVPN_CRYPTO_POLARSSL + bool "PolarSSL" + select BR2_PACKAGE_POLARSSL + help + Enable TLS-based key exchange and PolarSSL crypto support. + +endchoice + +endif diff --git a/package/openvpn/openvpn.init b/package/openvpn/S60openvpn similarity index 100% rename from package/openvpn/openvpn.init rename to package/openvpn/S60openvpn diff --git a/package/openvpn/openvpn-2.1.3-fix-build-with-disable-crypto.patch b/package/openvpn/openvpn-2.1.3-fix-build-with-disable-crypto.patch deleted file mode 100644 index 5466558758..0000000000 --- a/package/openvpn/openvpn-2.1.3-fix-build-with-disable-crypto.patch +++ /dev/null @@ -1,30 +0,0 @@ -[PATCH] fix build with --disable-crypto - -options.c is missing the definition for struct context when built with ---disable-crypto, as it then doesn't get pulled in through push.h, -leading to build errors like: - -options.c: In function ‘parse_http_proxy_fallback’: -options.c:1474: error: dereferencing pointer to incomplete type -options.c:1477: error: dereferencing pointer to incomplete type -options.c:1478: error: dereferencing pointer to incomplete type - -Fix it by including forward.h - -Signed-off-by: Peter Korsgaard ---- - options.c | 1 + - 1 file changed, 1 insertion(+) - -Index: openvpn-2.1.3/options.c -=================================================================== ---- openvpn-2.1.3.orig/options.c -+++ openvpn-2.1.3/options.c -@@ -29,6 +29,7 @@ - - #include "syshead.h" - -+#include "forward.h" - #include "buffer.h" - #include "error.h" - #include "common.h" diff --git a/package/openvpn/openvpn.mk b/package/openvpn/openvpn.mk index 89118b12b5..eabd5aa173 100644 --- a/package/openvpn/openvpn.mk +++ b/package/openvpn/openvpn.mk @@ -1,17 +1,33 @@ -############################################################# +################################################################################ # # openvpn # -############################################################# +################################################################################ -OPENVPN_VERSION = 2.1.4 +OPENVPN_VERSION = 2.3.2 +OPENVPN_SOURCE = openvpn-$(OPENVPN_VERSION).tar.xz OPENVPN_SITE = http://swupdate.openvpn.net/community/releases -OPENVPN_CONF_OPT = --enable-small +OPENVPN_DEPENDENCIES = host-pkgconf +OPENVPN_LICENSE = GPLv2 +OPENVPN_LICENSE_FILES = COPYRIGHT.GPL +OPENVPN_CONF_OPT = --disable-plugin-auth-pam --enable-iproute2 +OPENVPN_CONF_ENV = IFCONFIG=/sbin/ifconfig \ + NETSTAT=/bin/netstat \ + ROUTE=/sbin/route -ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) - OPENVPN_CONF_OPT += --enable-pthread +ifeq ($(BR2_PACKAGE_OPENVPN_SMALL),y) +OPENVPN_CONF_OPT += --enable-small --disable-plugins \ + --disable-debug --disable-eurephia +endif + +# Busybox 1.21+ places the ip applet in the "correct" place +# but previous versions didn't. +ifeq ($(BR2_PACKAGE_IPROUTE2),y) +OPENVPN_CONF_ENV += IPROUTE=/sbin/ip +else ifeq ($(BR2_BUSYBOX_VERSION_1_19_X)$(BR2_BUSYBOX_VERSION_1_20_X),y) +OPENVPN_CONF_ENV += IPROUTE=/bin/ip else - OPENVPN_CONF_OPT += --disable-pthread +OPENVPN_CONF_ENV += IPROUTE=/sbin/ip endif ifeq ($(BR2_PACKAGE_OPENVPN_LZO),y) @@ -20,24 +36,26 @@ else OPENVPN_CONF_OPT += --disable-lzo endif -ifeq ($(BR2_PACKAGE_OPENVPN_OPENSSL),y) +ifeq ($(BR2_PACKAGE_OPENVPN_CRYPTO_OPENSSL),y) + OPENVPN_CONF_OPT += --with-crypto-library=openssl OPENVPN_DEPENDENCIES += openssl -else - OPENVPN_CONF_OPT += --disable-crypto --disable-ssl +endif + +ifeq ($(BR2_PACKAGE_OPENVPN_CRYPTO_POLARSSL),y) + OPENVPN_CONF_OPT += --with-crypto-library=polarssl + OPENVPN_DEPENDENCIES += polarssl endif define OPENVPN_INSTALL_TARGET_CMDS - $(INSTALL) -m 755 $(@D)/openvpn \ + $(INSTALL) -m 755 $(@D)/src/openvpn/openvpn \ $(TARGET_DIR)/usr/sbin/openvpn - if [ ! -f $(TARGET_DIR)/etc/init.d/openvpn ]; then \ - $(INSTALL) -m 755 -D package/openvpn/openvpn.init \ - $(TARGET_DIR)/etc/init.d/openvpn; \ - fi + $(INSTALL) -m 755 -D package/openvpn/S60openvpn \ + $(TARGET_DIR)/etc/init.d/S60openvpn endef define OPENVPN_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/sbin/openvpn - rm -f $(TARGET_DIR)/etc/init.d/openvpn + rm -f $(TARGET_DIR)/etc/init.d/S60openvpn endef -$(eval $(call AUTOTARGETS,package,openvpn)) +$(eval $(autotools-package)) diff --git a/package/opkg/Config.in b/package/opkg/Config.in new file mode 100644 index 0000000000..afc13f2c18 --- /dev/null +++ b/package/opkg/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_OPKG + bool "opkg" + depends on BR2_USE_MMU # fork() + help + Opkg is a lightweight package management system, based on ipkg. It is + written in C and resembles apt/dpkg in operation. It is intended for + use on embedded Linux devices. + Opkg is maintained, stable, robust and conservative in its memory + usage, despite its buggy ipkg ancestry. As best it can, opkg + maintains backwards compatibility with ipkg and conforms to a subset + of debian's policy manual regarding control files. + + http://code.google.com/p/opkg/ + +if BR2_PACKAGE_OPKG + +config BR2_PACKAGE_OPKG_GPG_SIGN + bool "gnupg support" + select BR2_PACKAGE_LIBGPGME + help + Enable opkg package signature checking support using + gnupg/libgpgme. + +endif diff --git a/package/opkg/opkg-build b/package/opkg/opkg-build new file mode 100755 index 0000000000..7fd0d3fd28 --- /dev/null +++ b/package/opkg/opkg-build @@ -0,0 +1,127 @@ +#!/bin/sh + +# opkg-build -- construct a .opk from a directory +# Carl Worth +# based on a script by Steve Redler IV, steve@sr-tech.com 5-21-2001 +set -e + +opkg_extract_value() { + sed -e "s/^[^:]*:[[:space:]]*//" +} + +required_field() { + field=$1 + + value=`grep "^$field:" < $CONTROL/control | opkg_extract_value` + if [ -z "$value" ]; then + echo "opkg-build: Error: $CONTROL/control is missing field $field" ; + PKG_ERROR=1 + fi + echo $value +} + +pkg_appears_sane() { + local pkg_dir=$1 + + local owd=`pwd` + cd $pkg_dir + + PKG_ERROR=0 + if [ ! -f "$CONTROL/control" ]; then + echo "opkg-build: Error: Control file $pkg_dir/$CONTROL/control not found." + cd $owd + return 1 + fi + + pkg=`required_field Package` + version=`required_field Version` + arch=`required_field Architecture` + required_field Maintainer >/dev/null + required_field Description >/dev/null + + if echo $pkg | grep '[^a-z0-9.+-]'; then + echo "opkg-build: Error: Package name $name contains illegal characters, (other than [a-z0-9.+-])" + PKG_ERROR=1; + fi + + local bad_fields=`sed -ne 's/^\([^[:space:]][^:[:space:]]\+[[:space:]]\+\)[^:].*/\1/p' < $CONTROL/control | sed -e 's/\\n//'` + if [ -n "$bad_fields" ]; then + bad_fields=`echo $bad_fields` + echo "opkg-build: Error: The following fields in $CONTROL/control are missing a ':'" + echo " $bad_fields" + echo "opkg-build: This may be due to a missing initial space for a multi-line field value" + PKG_ERROR=1 + fi + + for script in $CONTROL/preinst $CONTROL/postinst $CONTROL/prerm $CONTROL/postrm; do + if [ -f $script -a ! -x $script ]; then + echo "opkg-build: Error: package script $script is not executable" + PKG_ERROR=1 + fi + done + + if [ -f $CONTROL/conffiles ]; then + for cf in `cat $CONTROL/conffiles`; do + if [ ! -f ./$cf ]; then + echo "opkg-build: Error: $CONTROL/conffiles mentions conffile $cf which does not exist" + PKG_ERROR=1 + fi + done + fi + + cd $owd + return $PKG_ERROR +} + +### +# opkg-build "main" +### + +case $# in +1) + dest_dir=. + ;; +2) + dest_dir=$2 + ;; +*) + echo "Usage: opkg-build []" ; + exit 1 + ;; +esac + +pkg_dir=$1 + +if [ ! -d $pkg_dir ]; then + echo "opkg-build: Error: Directory $pkg_dir does not exist" + exit 1 +fi + +# CONTROL is second so that it takes precedence +CONTROL= +[ -d $pkg_dir/DEBIAN ] && CONTROL=DEBIAN +[ -d $pkg_dir/CONTROL ] && CONTROL=CONTROL +if [ -z "$CONTROL" ]; then + echo "opkg-build: Error: Directory $pkg_dir has no CONTROL subdirectory." + exit 1 +fi + +if ! pkg_appears_sane $pkg_dir; then + echo "Please fix the above errors and try again." + exit 1 +fi + +tmp_dir=$dest_dir/OPKG_BUILD.$$ +mkdir $tmp_dir + +tar -C $pkg_dir -czf $tmp_dir/data.tar.gz . --exclude=$CONTROL +tar -C $pkg_dir/$CONTROL -czf $tmp_dir/control.tar.gz . + +echo "2.0" > $tmp_dir/debian-binary + +pkg_file=$dest_dir/${pkg}_${version}_${arch}.opk +tar -C $tmp_dir -czf $pkg_file debian-binary data.tar.gz control.tar.gz +rm $tmp_dir/debian-binary $tmp_dir/data.tar.gz $tmp_dir/control.tar.gz +rmdir $tmp_dir + +echo "Packaged contents of $pkg_dir into $pkg_file" diff --git a/package/opkg/opkg.mk b/package/opkg/opkg.mk new file mode 100644 index 0000000000..c57bd7f464 --- /dev/null +++ b/package/opkg/opkg.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# opkg +# +################################################################################ + +OPKG_VERSION = v0.2.0 +OPKG_SOURCE = $(OPKG_VERSION).tar.bz2 +OPKG_SITE = https://bitbucket.org/opkg/opkg/get +# Uses PKG_CHECK_MODULES() in configure.ac +OPKG_DEPENDENCIES = host-pkgconf +OPKG_LICENSE = GPLv2+ +OPKG_LICENSE_FILES = COPYING +OPKG_INSTALL_STAGING = YES +OPKG_CONF_OPT = --disable-curl +OPKG_AUTORECONF = YES + +# Ensure directory for lockfile exists +define OPKG_CREATE_LOCKDIR + mkdir -p $(TARGET_DIR)/usr/lib/opkg +endef + +ifeq ($(BR2_PACKAGE_OPKG_GPG_SIGN),y) +OPKG_CONF_OPT += --enable-gpg +OPKG_CONF_ENV = ac_cv_path_GPGME_CONFIG=$(STAGING_DIR)/usr/bin/gpgme-config +OPKG_DEPENDENCIES += libgpgme +else +OPKG_CONF_OPT += --disable-gpg +endif + +OPKG_POST_INSTALL_TARGET_HOOKS += OPKG_CREATE_LOCKDIR + +$(eval $(autotools-package)) diff --git a/package/oprofile/Config.in b/package/oprofile/Config.in index 0e3652d39b..2847a914e1 100644 --- a/package/oprofile/Config.in +++ b/package/oprofile/Config.in @@ -1,12 +1,11 @@ config BR2_PACKAGE_OPROFILE bool "oprofile" - # The dependency on binutils_target does not work with - # external toolchains since the binutils version was not - # choosen in the config. This will have to be fixed later. - depends on !BR2_TOOLCHAIN_EXTERNAL + depends on BR2_USE_MMU # fork() select BR2_PACKAGE_POPT select BR2_PACKAGE_BINUTILS + select BR2_PACKAGE_LIBPFM4 if BR2_powerpc depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_aarch64 # binutils help OProfile is a system-wide profiler for Linux systems, capable of profiling all running code at low overhead. @@ -23,5 +22,6 @@ config BR2_PACKAGE_OPROFILE interrupt handlers, kernel modules, the kernel, shared libraries, and applications. -comment "oprofile requires a toolchain with C++ support enabled" +comment "oprofile needs a toolchain w/ C++" + depends on BR2_USE_MMU && !BR2_aarch64 depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/oprofile/oprofile-0.9.4-001-avr32-enable-lookup_dcookie.patch b/package/oprofile/oprofile-001-avr32-enable-lookup_dcookie.patch similarity index 100% rename from package/oprofile/oprofile-0.9.4-001-avr32-enable-lookup_dcookie.patch rename to package/oprofile/oprofile-001-avr32-enable-lookup_dcookie.patch diff --git a/package/oprofile/oprofile-0.9.4-002-no-query-modules.patch b/package/oprofile/oprofile-002-no-query-modules.patch similarity index 100% rename from package/oprofile/oprofile-0.9.4-002-no-query-modules.patch rename to package/oprofile/oprofile-002-no-query-modules.patch diff --git a/package/oprofile/oprofile-003-oprofile-ppc32-build-fix.patch b/package/oprofile/oprofile-003-oprofile-ppc32-build-fix.patch new file mode 100644 index 0000000000..0f609df0e2 --- /dev/null +++ b/package/oprofile/oprofile-003-oprofile-ppc32-build-fix.patch @@ -0,0 +1,32 @@ +Upstream-Status: Backport + +From fa889ea74b6b931e241a8cd57e90edc23cd7ab03 Mon Sep 17 00:00:00 2001 +From: William Cohen +Date: Mon, 15 Oct 2012 15:09:55 -0500 +Subject: [PATCH] OProfile doesn't build for 32-bit ppc; the operf_utils.cpp + compile fails. Need to be able to build the 32-bit ppc + version of oprofile to provide the 32-bit ppc java support + libraries. The configure only handles the case of ppc64 + with perf support. + +Signed-off-by: William Cohen +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index b739133..7449854 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -104,7 +104,7 @@ AC_DEFINE_UNQUOTED(HAVE_PERF_EVENTS, $HAVE_PERF_EVENTS, [Kernel support for perf + if test "$HAVE_PERF_EVENTS" = "1"; then + PFM_LIB= + arch="`uname -m`" +- if test "$arch" = "ppc64"; then ++ if test "$arch" = "ppc64" || test "$arch" = "ppc"; then + AC_CHECK_HEADER(perfmon/pfmlib.h,,[AC_MSG_ERROR([pfmlib.h not found; usually provided in papi devel package])]) + AC_CHECK_LIB(pfm,pfm_get_event_name, HAVE_LIBPFM3='1'; HAVE_LIBPFM='1', [ + AC_CHECK_LIB(pfm,pfm_get_os_event_encoding, HAVE_LIBPFM3='0'; HAVE_LIBPFM='1', +-- +1.7.9.7 + diff --git a/package/oprofile/oprofile-004-fix-ppc64-specific-libpfm-usage.patch b/package/oprofile/oprofile-004-fix-ppc64-specific-libpfm-usage.patch new file mode 100644 index 0000000000..d8a43de082 --- /dev/null +++ b/package/oprofile/oprofile-004-fix-ppc64-specific-libpfm-usage.patch @@ -0,0 +1,105 @@ +From 8e36ad01ceb1257d05773b684dbe9358aecd3f71 Mon Sep 17 00:00:00 2001 +From: Maynard Johnson +Date: Tue, 26 Feb 2013 13:41:27 -0600 +Subject: [PATCH] Fix PPC64-specific libpfm usage so it doesn't break ppc32 + architecture + +The configure check to determine whether we should use libpfm or not +is intended only for the ppc64 architecture, but was incorrectly +hitting on the ppc32 architecture, too. Not only that, but it was using +'uname' which is not a good idea in cross-compile situtations. + +Then, aside from that, we had several instances in the source code +of the following: + #if (defined(__powerpc__) || defined(__powerpc64__)) +which incorrectly included ppc32 architecutre also, when it was intended +for use as PPC64 architecture. + +This patch fixes both errors. + +Signed-off-by: Maynard Johnson header.misc == PERF_RECORD_MISC_USER) { + in_kernel = false; + } +-#if (defined(__powerpc__) || defined(__powerpc64__)) ++#if PPC64_ARCH + else if (event->header.misc == PERF_RECORD_MISC_HYPERVISOR) { + #define MAX_HYPERVISOR_ADDRESS 0xfffffffULL + if (data.ip > MAX_HYPERVISOR_ADDRESS) { +diff --git a/libperf_events/operf_utils.h b/libperf_events/operf_utils.h +--- a/libperf_events/operf_utils.h ++++ b/libperf_events/operf_utils.h +@@ -45,6 +45,12 @@ extern bool throttled; + #define MMAP_WINDOW_SZ (32 * 1024 * 1024ULL) + #endif + ++/* A macro to be used for ppc64 architecture-specific code. The '__powerpc__' macro ++ * is defined for both ppc64 and ppc32 architectures, so we must further qualify by ++ * including the 'HAVE_LIBPFM' macro, since that macro will be defined only for ppc64. ++ */ ++#define PPC64_ARCH (HAVE_LIBPFM) && ((defined(__powerpc__) || defined(__powerpc64__))) ++ + extern unsigned int op_nr_counters; + + static inline size_t align_64bit(u64 x) +diff --git a/pe_profiling/operf.cpp b/pe_profiling/operf.cpp +--- a/pe_profiling/operf.cpp ++++ b/pe_profiling/operf.cpp +@@ -1197,9 +1197,9 @@ static void _process_events_list(void) + _get_event_code(&event); + events.push_back(event); + } +-#if (defined(__powerpc__) || defined(__powerpc64__)) ++#if PPC64_ARCH + { +- /* This section of code is for architectures such as ppc[64] for which ++ /* This section of code is soley for the ppc64 architecture for which + * the oprofile event code needs to be converted to the appropriate event + * code to pass to the perf_event_open syscall. + */ +@@ -1244,7 +1244,7 @@ static void get_default_event(void) + _get_event_code(&dft_evt); + events.push_back(dft_evt); + +-#if (defined(__powerpc__) || defined(__powerpc64__)) ++#if PPC64_ARCH + { + /* This section of code is for architectures such as ppc[64] for which + * the oprofile event code needs to be converted to the appropriate event diff --git a/package/oprofile/oprofile-005-fix-up-configure-to-handle-architectures-that-do-not.patch b/package/oprofile/oprofile-005-fix-up-configure-to-handle-architectures-that-do-not.patch new file mode 100644 index 0000000000..6d7a6ef64c --- /dev/null +++ b/package/oprofile/oprofile-005-fix-up-configure-to-handle-architectures-that-do-not.patch @@ -0,0 +1,154 @@ +Upstream-Status: Backport + +From ca6d916a6f8f0f8abbb4c9b6a97dd1a1615bb124 Mon Sep 17 00:00:00 2001 +From: Maynard Johnson +Date: Wed, 5 Dec 2012 10:16:35 -0600 +Subject: [PATCH] Fix up configure to handle architectures that do not + implement perf_event_open + +This patch fixes the following problems: + +1) The configure script allows the user to pass a location to kernel +headers (via --with-kernel option) such that, even if the running +kernel does not have perf_events support, it may be possible to +build operf (e.g., in cross-compile environments). But the message +'This kernel does not have perf_events support; falling back to legacy +oprofile' was being displayed inappropriately in such cases. This +patch changes the configure script so that the "falling back to +legacy oprofile" message will only be displayed if we're running +on a kernel that does not have perf_events support AND the user +did not pass specify the "--with-kernel" option. + +2) Some architectures don't even implement the perf_event_open syscall, so the +configure script must do more than checking kernel version and whether or not +perf_event.h is present in order to decide if perf_events is supported. +This patch provides that extra capability. + +These problems were reported by Tony Jones . + +Signed-off-by: Maynard Johnson +--- + configure.ac | 74 +++++++++++++++++++++++++++++----------- + utils/op_perf_events_checker.c | 6 ++-- + 2 files changed, 58 insertions(+), 22 deletions(-) + +diff --git a/configure.ac b/configure.ac +--- a/configure.ac ++++ b/configure.ac +@@ -70,35 +70,70 @@ KERNELDIR=$withval) + + + dnl Check kernel version for perf_events supported +-AC_MSG_CHECKING([kernel version supports perf_events]) + if test "$KERNELDIR" != ""; then + KINC="$KERNELDIR/include" ++ PERF_EVENT_FLAGS=" -I$KERNELDIR/include" ++ AC_SUBST(PERF_EVENT_FLAGS) ++ PERF_EVENT_H="$KERNELDIR/include/linux/perf_event.h" ++else ++ PERF_EVENT_H="/usr/include/linux/perf_event.h" + fi +-AX_KERNEL_VERSION(2, 6, 31, <=, kernel_has_perf_events_support="yes", ++ ++PERF_EVENT_H_EXISTS="no" ++kernel_may_have_perf_events_support="no" ++AX_KERNEL_VERSION(2, 6, 31, <=, kernel_may_have_perf_events_support="yes", + kernel_has_perf_events_support="no") + +-if test "$kernel_has_perf_events_support" = "no"; then +- AC_MSG_RESULT([This kernel does not have perf_events support; falling back to legacy oprofile]) ++dnl The AX_KERNEL_VERSION macro may return kernel_may_have_perf_events_support="yes", ++dnl indicating a partial answer. Some architectures do not implement the Performance ++dnl Events Kernel Subsystem even with kernel versions > 2.6.31 -- i.e., not even ++dnl implementing the perf_event_open syscall to return ENOSYS. So the check below ++dnl will identify and handle such situations. ++ ++if test "$kernel_may_have_perf_events_support" = "yes"; then ++ AC_CHECK_HEADER($PERF_EVENT_H,PERF_EVENT_H_EXISTS="yes") ++ AC_MSG_CHECKING([kernel supports perf_events]) ++ if test "$PERF_EVENT_H_EXISTS" = "yes"; then ++ rm -f test-for-PERF_EVENT_OPEN ++ AC_LANG_CONFTEST( ++ [AC_LANG_PROGRAM([[#include ++ #include ++ #include ++ #include ++ ]], ++ [[struct perf_event_attr attr; ++ pid_t pid; ++ memset(&attr, 0, sizeof(attr)); ++ attr.size = sizeof(attr); ++ attr.sample_type = PERF_SAMPLE_IP; ++ pid = getpid(); ++ syscall(__NR_perf_event_open, &attr, pid, 0, -1, 0); ++ ]]) ++ ]) ++ $CC conftest.$ac_ext $CFLAGS $LDFLAGS $LIBS $PERF_EVENT_FLAGS -o test-for-PERF_EVENT_OPEN > /dev/null 2>&1 ++ if test -f test-for-PERF_EVENT_OPEN; then ++ kernel_has_perf_events_support="yes" ++ AC_MSG_RESULT(yes) ++ else ++ AC_MSG_RESULT(no) ++ kernel_has_perf_events_support="no" ++ fi ++ else ++ AC_MSG_RESULT(unknown -- perf_event.h not found) ++ fi + else +- AC_MSG_RESULT([This kernel has perf_events support]) ++ AC_MSG_RESULT(kernel supports perf_events... no) ++ kernel_has_perf_events_support="no" ++fi ++AM_CONDITIONAL(BUILD_FOR_PERF_EVENT, test "$kernel_has_perf_events_support" = "yes") ++ ++if test "$kernel_has_perf_events_support" = "yes"; then ++ HAVE_PERF_EVENTS='1' ++else ++ HAVE_PERF_EVENTS='0' ++ AC_MSG_RESULT([No perf_events support available; falling back to legacy oprofile]) + fi + +-if test "$KERNELDIR" == ""; then +- PERF_EVENT_H="/usr/include/linux/perf_event.h" +-else +- PERF_EVENT_H="$KERNELDIR/include/linux/perf_event.h" +-fi +-AC_CHECK_HEADER($PERF_EVENT_H,PERF_EVENT_H_EXISTS="yes") +-AM_CONDITIONAL(BUILD_FOR_PERF_EVENT, test -n "$PERF_EVENT_H_EXISTS") +-if test "$PERF_EVENT_H_EXISTS" = "yes"; then +- HAVE_PERF_EVENTS='1' +- if test "$KERNELDIR" != ""; then +- PERF_EVENT_FLAGS=" -I$KERNELDIR/include" +- AC_SUBST(PERF_EVENT_FLAGS) +- fi +-else +- HAVE_PERF_EVENTS='0' +-fi + AC_DEFINE_UNQUOTED(HAVE_PERF_EVENTS, $HAVE_PERF_EVENTS, [Kernel support for perf_events exists]) + AC_CANONICAL_HOST + if test "$HAVE_PERF_EVENTS" = "1"; then +@@ -414,7 +449,7 @@ elif test "`getent passwd oprofile 2>/de + fi + fi + +-if test "$PERF_EVENT_H_EXISTS" != "yes" && test "$kernel_has_perf_events_support" = "yes"; then ++if test "$PERF_EVENT_H_EXISTS" != "yes" && test "$kernel_may_have_perf_events_support" = "yes"; then + echo "Warning: perf_event.h not found. Please install the kernel headers package if you" + echo " want non-root support built into OProfile." + fi +diff --git a/utils/op_perf_events_checker.c b/utils/op_perf_events_checker.c +--- a/utils/op_perf_events_checker.c ++++ b/utils/op_perf_events_checker.c +@@ -49,8 +49,10 @@ int main(int argc, char **argv) + } + + #if HAVE_PERF_EVENTS +- /* If perf_events syscall is not implemented, the syscall below will fail +- * with ENOSYS (38). If implemented, but the processor type on which this ++ /* Even if the perf_event_open syscall is implemented, the architecture may still ++ * not provide a full implementation of the perf_events subsystem, in which case, ++ * the syscall below will fail with ENOSYS (38). If the perf_events subsystem is ++ * implemented for the architecture, but the processor type on which this + * program is running is not supported by perf_events, the syscall returns + * ENOENT (2). + */ diff --git a/package/oprofile/oprofile.mk b/package/oprofile/oprofile.mk index 42bf0e2571..abfb1cda85 100644 --- a/package/oprofile/oprofile.mk +++ b/package/oprofile/oprofile.mk @@ -1,41 +1,70 @@ -############################################################# +################################################################################ # # oprofile # -############################################################# -OPROFILE_VERSION := 0.9.4 -OPROFILE_CONF_OPT := --localstatedir=/var \ - --with-kernel-support +################################################################################ -OPROFILE_BINARIES := utils/ophelp -OPROFILE_BINARIES += pp/opannotate pp/oparchive pp/opgprof pp/opreport opjitconv/opjitconv -OPROFILE_BINARIES += daemon/oprofiled +OPROFILE_VERSION = 0.9.8 +OPROFILE_SITE = http://downloads.sourceforge.net/project/oprofile/oprofile/oprofile-$(OPROFILE_VERSION) +OPROFILE_LICENSE = GPLv2+ +OPROFILE_LICENSE_FILES = COPYING +OPROFILE_CONF_OPT = \ + --localstatedir=/var \ + --disable-account-check \ + --enable-gui=no \ + --with-kernel=$(STAGING_DIR)/usr +OPROFILE_AUTORECONF = YES +OPROFILE_BINARIES = utils/ophelp pp/opannotate pp/oparchive pp/opgprof +OPROFILE_BINARIES += pp/opreport opjitconv/opjitconv daemon/oprofiled +OPROFILE_BINARIES += utils/op-check-perfevents pe_profiling/operf libabi/opimport +ifeq ($(BR2_i386),y) +OPROFILE_ARCH = i386 +endif +ifeq ($(BR2_mipsel),y) +OPROFILE_ARCH = mips +endif ifeq ($(BR2_powerpc),y) -OPROFILE_ARCH := ppc +OPROFILE_ARCH = ppc endif ifeq ($(BR2_x86_64),y) -OPROFILE_ARCH := x86-64 +OPROFILE_ARCH = x86-64 endif ifeq ($(OPROFILE_ARCH),) -OPROFILE_ARCH := $(BR2_ARCH) +OPROFILE_ARCH = $(BR2_ARCH) endif -OPROFILE_DEPENDENCIES := popt binutils +OPROFILE_DEPENDENCIES = popt binutils host-pkgconf + +ifeq ($(BR2_PACKAGE_LIBPFM4),y) +OPROFILE_DEPENDENCIES += libpfm4 +endif + +define OPROFILE_CREATE_FILES + touch $(@D)/NEWS $(@D)/AUTHORS $(@D)/ChangeLog +endef + +OPROFILE_POST_PATCH_HOOKS += OPROFILE_CREATE_FILES define OPROFILE_INSTALL_TARGET_CMDS $(INSTALL) -d -m 755 $(TARGET_DIR)/usr/bin $(INSTALL) -d -m 755 $(TARGET_DIR)/usr/share/oprofile - cp -dpfr $(@D)/events/$(OPROFILE_ARCH) $(TARGET_DIR)/usr/share/oprofile + $(INSTALL) -d -m 755 $(TARGET_DIR)/usr/lib/oprofile + if [ -d $(@D)/events/$(OPROFILE_ARCH) ]; then \ + cp -dpfr $(@D)/events/$(OPROFILE_ARCH) \ + $(TARGET_DIR)/usr/share/oprofile; \ + fi $(INSTALL) -m 644 $(@D)/libregex/stl.pat $(TARGET_DIR)/usr/share/oprofile $(INSTALL) -m 755 $(@D)/utils/opcontrol $(TARGET_DIR)/usr/bin $(INSTALL) -m 755 $(addprefix $(@D)/, $(OPROFILE_BINARIES)) $(TARGET_DIR)/usr/bin + $(INSTALL) -m 755 $(@D)/libopagent/.libs/*.so* $(TARGET_DIR)/usr/lib/oprofile endef define OPROFILE_UNINSTALL_TARGET_CMDS rm -f $(addprefix $(TARGET_DIR)/usr/bin/, $(notdir $(OPROFILE_BINARIES))) rm -f $(TARGET_DIR)/usr/bin/opcontrol rm -rf $(TARGET_DIR)/usr/share/oprofile + rm -rf $(TARGET_DIR)/usr/lib/oprofile endef -$(eval $(call AUTOTARGETS,package,oprofile)) +$(eval $(autotools-package)) diff --git a/package/opus-tools/Config.in b/package/opus-tools/Config.in new file mode 100644 index 0000000000..2552d19515 --- /dev/null +++ b/package/opus-tools/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_OPUS_TOOLS + bool "opus-tools" + select BR2_PACKAGE_OPUS + select BR2_PACKAGE_LIBOGG + help + Opus codec command line tools. This package provides the + reference implementations of encoder and decoder utilities + for libopus. + + http://opus-codec.org diff --git a/package/opus-tools/opus-tools-largefile.patch b/package/opus-tools/opus-tools-largefile.patch new file mode 100644 index 0000000000..a10fcbc714 --- /dev/null +++ b/package/opus-tools/opus-tools-largefile.patch @@ -0,0 +1,37 @@ +From f1d9376b383f4ee7ec2d7c5a1728d38cdb692df6 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Sat, 15 Dec 2012 00:05:41 +0100 +Subject: [PATCH] audio-in.c: Don't force largefile support + +Buildroot ensures the correct defines are enabled depending on toolchain +configuration, so don't hard code largefile support here. + +Signed-off-by: Peter Korsgaard +--- + src/audio-in.c | 10 ---------- + 1 file changed, 10 deletions(-) + +diff --git a/src/audio-in.c b/src/audio-in.c +index 9bf4f6f..e404629 100644 +--- a/src/audio-in.c ++++ b/src/audio-in.c +@@ -32,16 +32,6 @@ + # include + #endif + +-#if !defined(_LARGEFILE_SOURCE) +-# define _LARGEFILE_SOURCE +-#endif +-#if !defined(_LARGEFILE64_SOURCE) +-# define _LARGEFILE64_SOURCE +-#endif +-#if !defined(_FILE_OFFSET_BITS) +-# define _FILE_OFFSET_BITS 64 +-#endif +- + #include + #include + #include +-- +1.7.10.4 + diff --git a/package/opus-tools/opus-tools.mk b/package/opus-tools/opus-tools.mk new file mode 100644 index 0000000000..f4dee745fe --- /dev/null +++ b/package/opus-tools/opus-tools.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# opus-tools +# +################################################################################ + +OPUS_TOOLS_VERSION = 0.1.7 +OPUS_TOOLS_SITE = http://downloads.xiph.org/releases/opus +OPUS_TOOLS_CONF_OPT = --disable-oggtest --disable-opustest +OPUS_TOOLS_DEPENDENCIES = opus libogg host-pkgconf + +ifeq ($(BR2_PACKAGE_LIBPCAP),y) +OPUS_TOOLS_DEPENDENCIES += libpcap +endif + +ifeq ($(BR2_X86_CPU_HAS_SSE),y) +OPUS_TOOLS_CONF_OPT += --enable-sse +else +OPUS_TOOLS_CONF_OPT += --disable-sse +endif + +ifeq ($(BR2_PACKAGE_FLAC),y) +OPUS_TOOLS_DEPENDENCIES += flac +else +OPUS_TOOLS_CONF_OPT += --without-flac +endif + +$(eval $(autotools-package)) diff --git a/package/opus/Config.in b/package/opus/Config.in new file mode 100644 index 0000000000..12bdfbbdb3 --- /dev/null +++ b/package/opus/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_OPUS + bool "opus" + help + The Opus codec is designed for interactive speech and audio + transmission over the Internet. It is designed by the IETF + Codec Working Group and incorporates technology from Skype's + SILK codec and Xiph.Org's CELT codec. + + It is intended to suit a wide range of interactive audio + applications, including Voice over IP, videoconferencing, + in-game chat, and even remote live music performances. It + can scale from low bit-rate narrowband speech to very high + quality stereo music. + + http://opus-codec.org diff --git a/package/opus/opus.mk b/package/opus/opus.mk new file mode 100644 index 0000000000..96688545b9 --- /dev/null +++ b/package/opus/opus.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# opus +# +################################################################################ + +OPUS_VERSION = 1.0.3 +OPUS_SITE = http://downloads.xiph.org/releases/opus +OPUS_INSTALL_STAGING = YES +OPUS_CONF_OPT = --disable-doc + +ifeq ($(BR2_SOFT_FLOAT),y) +OPUS_CONF_OPT += --enable-fixed-point +endif + +$(eval $(autotools-package)) diff --git a/package/orbit/Config.in b/package/orbit/Config.in new file mode 100644 index 0000000000..556c46eaa3 --- /dev/null +++ b/package/orbit/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_ORBIT + bool "orbit" + # These are runtime dependencies + select BR2_PACKAGE_WSAPI + select BR2_PACKAGE_LUAFILESYSTEM + help + An MVC web framework for Lua. The design is inspired by lightweight + Ruby frameworks such as Camping + + http://keplerproject.github.com/orbit diff --git a/package/orbit/orbit-01-fix-installation.patch b/package/orbit/orbit-01-fix-installation.patch new file mode 100644 index 0000000000..ae50ad9fe5 --- /dev/null +++ b/package/orbit/orbit-01-fix-installation.patch @@ -0,0 +1,26 @@ +Fix installation commands + +The installation commands did not match the location of the source +files within the Orbit source tree. + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -11,12 +11,9 @@ + mkdir -p $(LUA_DIR) + cp src/orbit.lua $(LUA_DIR) + mkdir -p $(LUA_DIR)/orbit +- cp src/model.lua $(LUA_DIR)/orbit +- cp src/cache.lua $(LUA_DIR)/orbit +- cp src/pages.lua $(LUA_DIR)/orbit +- cp src/ophandler.lua $(LUA_DIR)/orbit ++ cp src/orbit/*.lua $(LUA_DIR)/orbit + mkdir -p $(BIN_DIR) +- cp src/orbit $(BIN_DIR) ++ cp src/launchers/* $(BIN_DIR) + if [ -f ./wsapi/Makefile ]; then \ + cd wsapi && make install; \ + fi diff --git a/package/orbit/orbit.mk b/package/orbit/orbit.mk new file mode 100644 index 0000000000..ba1142fe35 --- /dev/null +++ b/package/orbit/orbit.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# orbit +# +################################################################################ + +ORBIT_VERSION = 2.2.0 +ORBIT_SITE = http://github.com/downloads/keplerproject/orbit +ORBIT_LICENSE = MIT +ORBIT_LICENSE_FILES = doc/us/license.md + +define ORBIT_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) \ + LUA_DIR=$(TARGET_DIR)/usr/share/lua/ \ + BIN_DIR=$(TARGET_DIR)/usr/bin \ + install +endef + +$(eval $(generic-package)) diff --git a/package/orc/Config.in b/package/orc/Config.in new file mode 100644 index 0000000000..663d4d338f --- /dev/null +++ b/package/orc/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_ORC + bool "orc" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Orc is a library and set of tools for compiling and executing + very simple programs that operate on arrays of data. + + http://code.entropywave.com/projects/orc/ + +comment "orc needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/orc/orc.mk b/package/orc/orc.mk new file mode 100644 index 0000000000..8db58e9c36 --- /dev/null +++ b/package/orc/orc.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# orc +# +################################################################################ + +ORC_VERSION = 0.4.18 +ORC_SITE = http://code.entropywave.com/download/orc/ +ORC_LICENSE = BSD-2c, BSD-3c +ORC_LICENSE_FILES = COPYING +ORC_INSTALL_STAGING = YES +ORC_DEPENDENCIES = host-orc + +define ORC_REMOVE_BUGREPORT + rm -f $(TARGET_DIR)/usr/bin/orc-bugreport +endef + +define ORC_REMOVE_DEVFILES + rm -f $(TARGET_DIR)/usr/bin/orcc +endef + +ORC_POST_INSTALL_TARGET_HOOKS += ORC_REMOVE_BUGREPORT +ORC_POST_INSTALL_TARGET_HOOKS += ORC_REMOVE_DEVFILES + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/ortp/Config.in b/package/ortp/Config.in new file mode 100644 index 0000000000..2de3c91f92 --- /dev/null +++ b/package/ortp/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_ORTP + bool "oRTP" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + oRTP, a Real-time Transport Protocol (RTP,RFC3550) library + + http://www.linphone.org/eng/documentation/dev/ortp.html + +comment "ortp needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/ortp/ortp.mk b/package/ortp/ortp.mk new file mode 100644 index 0000000000..513be9b438 --- /dev/null +++ b/package/ortp/ortp.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# ortp +# +################################################################################ + +ORTP_VERSION = 0.22.0 +ORTP_SITE = http://download.savannah.nongnu.org/releases/linphone/ortp/sources +ORTP_CONF_OPT = --disable-strict +ORTP_INSTALL_STAGING = YES +ORTP_LICENSE = LGPLv2.1+ +ORTP_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/owl-linux/Config.in b/package/owl-linux/Config.in new file mode 100644 index 0000000000..9b14027d57 --- /dev/null +++ b/package/owl-linux/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_OWL_LINUX + bool "owl-linux" + depends on BR2_LINUX_KERNEL + depends on (BR2_arm920t || BR2_arm922t || BR2_arm926t) + help + Linux kernel driver for the H&D Wireless SPB104 SD-card WiFi SIP. + + owl-linux requires the hidden kernel option WIRELESS_EXT enabled. + + http://linux.hd-wireless.se/bin/view/Linux/GettingStarted + +comment "owl-linux requires a Linux kernel" + depends on !BR2_LINUX_KERNEL + depends on BR2_arm || BR2_armeb + +comment "owl-linux is only supported on ARM9 architecture" + depends on !(BR2_arm920t || BR2_arm922t || BR2_arm926t) + depends on BR2_arm || BR2_armeb diff --git a/package/owl-linux/owl-linux-fix-CROSS_COMPILE-usage-in-Makefile.patch b/package/owl-linux/owl-linux-fix-CROSS_COMPILE-usage-in-Makefile.patch new file mode 100644 index 0000000000..14b4631624 --- /dev/null +++ b/package/owl-linux/owl-linux-fix-CROSS_COMPILE-usage-in-Makefile.patch @@ -0,0 +1,16 @@ +Fix the owl-linux Makefile so that it protects spaces in the CROSS_COMPILE +variable. For example, this variable will contain spaces if ccache is used. + +Signed-off-by: Simon Dawson +diff -Nurp a/Makefile b/Makefile +--- a/Makefile 2012-06-14 10:51:45.000000000 +0100 ++++ b/Makefile 2012-07-20 10:46:41.636752148 +0100 +@@ -35,7 +35,7 @@ else + PWD := $(shell pwd) + + default: +- $(MAKE) -C $(KERNELDIR) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) M=$(PWD) MODE=$(MODE) modules ++ $(MAKE) -C $(KERNELDIR) ARCH=$(ARCH) CROSS_COMPILE="$(CROSS_COMPILE)" M=$(PWD) MODE=$(MODE) modules + + clean: + -rm -f *.o *.mod.c *.ko modules.order Module.symvers diff --git a/package/owl-linux/owl-linux-fix-for-linux-3.3.x.patch b/package/owl-linux/owl-linux-fix-for-linux-3.3.x.patch new file mode 100644 index 0000000000..831ac7fd11 --- /dev/null +++ b/package/owl-linux/owl-linux-fix-for-linux-3.3.x.patch @@ -0,0 +1,21 @@ +Kernel commit b81693d9149c598302e8eb9c20cb20330d922c8e changed the +net_device_ops structure, removing the ndo_set_multicast_list callback. The +ndo_set_rx_mode has also been added to this structure. + +The upshot of these changes is that owl-linux fails to compile with 3.3.x +and later kernels. + +Signed-off-by: Simon Dawson +diff -Nurp a/owl_net.c b/owl_net.c +--- a/owl_net.c 2012-06-14 10:51:45.000000000 +0100 ++++ b/owl_net.c 2012-07-20 13:16:28.772351464 +0100 +@@ -384,7 +384,9 @@ static const struct net_device_ops netde + #endif /* OWL_CONFIG_IFUPDOWN */ + .ndo_start_xmit = owl_net_tx, + .ndo_get_stats = owl_net_get_stats, ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) + .ndo_set_multicast_list = NULL, ++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) */ + .ndo_tx_timeout = owl_net_tx_timeout, + .ndo_set_mac_address = NULL, + }; diff --git a/package/owl-linux/owl-linux.mk b/package/owl-linux/owl-linux.mk new file mode 100644 index 0000000000..371cc02722 --- /dev/null +++ b/package/owl-linux/owl-linux.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# owl-linux +# +################################################################################ + +OWL_LINUX_VERSION = 1.0.7 +OWL_LINUX_SITE = http://linux.hd-wireless.se/pub/Linux/DownloadDrivers +OWL_LINUX_LICENSE = PROPRIETARY +OWL_LINUX_LICENSE_FILES = LICENSE +OWL_LINUX_REDISTRIBUTE = NO + +OWL_LINUX_DEPENDENCIES = linux + +define OWL_LINUX_BUILD_CMDS + $(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) KERNELDIR=$(LINUX_DIR) +endef + +define OWL_LINUX_INSTALL_TARGET_CMDS + $(MAKE) -C $(LINUX_DIR) $(LINUX_MAKE_FLAGS) M="$(@D)" modules_install +endef + +$(eval $(generic-package)) diff --git a/package/p11-kit/Config.in b/package/p11-kit/Config.in new file mode 100644 index 0000000000..8d0cf38344 --- /dev/null +++ b/package/p11-kit/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_P11_KIT + bool "p11-kit" + depends on !BR2_PREFER_STATIC_LIB + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBTASN1 + help + Provides a way to load and enumerate PKCS#11 modules. + Provides a standard configuration setup for installing PKCS#11 + modules in such a way that they're discoverable. + + http://p11-glue.freedesktop.org/p11-kit.html + +comment "p11-kit needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/p11-kit/p11-kit.mk b/package/p11-kit/p11-kit.mk new file mode 100644 index 0000000000..0db5ebfdec --- /dev/null +++ b/package/p11-kit/p11-kit.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# p11-kit +# +################################################################################ + +P11_KIT_VERSION = 0.18.1 +P11_KIT_SITE = http://p11-glue.freedesktop.org/releases +P11_KIT_DEPENDENCIES = host-pkgconf libtasn1 +P11_KIT_INSTALL_STAGING = YES +P11_KIT_CONF_OPT = --disable-static +P11_KIT_CONF_ENV = ac_cv_have_decl_program_invocation_short_name=yes \ + ac_cv_have_decl___progname=no +P11_KIT_LICENSE = BSD-3c +P11_KIT_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/p910nd/Config.in b/package/p910nd/Config.in new file mode 100644 index 0000000000..33f6cf8a5d --- /dev/null +++ b/package/p910nd/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_P910ND + bool "p910nd" + depends on BR2_USE_MMU # fork() + help + p910nd is a small printer daemon intended for diskless + workstations. Using ports 9100-9102, it accepts + print jobs and passes them directly to a USB printer. + + http://p910nd.sourceforge.net/ diff --git a/package/p910nd/p910nd.mk b/package/p910nd/p910nd.mk new file mode 100644 index 0000000000..48bb7e173b --- /dev/null +++ b/package/p910nd/p910nd.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# p910nd +# +################################################################################ + +P910ND_VERSION = 0.95 +P910ND_SITE = http://downloads.sourceforge.net/project/p910nd/p910nd/$(P910ND_VERSION) +P910ND_SOURCE = p910nd-$(P910ND_VERSION).tar.bz2 +P910ND_LICENSE = GPLv2 +P910ND_LICENSE_FILES = COPYING + +define P910ND_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define P910ND_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/p910nd $(TARGET_DIR)/usr/sbin/p910nd +endef + +$(eval $(generic-package)) diff --git a/package/pango/Config.in b/package/pango/Config.in index 923c3d4ac2..774682d0fb 100644 --- a/package/pango/Config.in +++ b/package/pango/Config.in @@ -1,12 +1,16 @@ config BR2_PACKAGE_PANGO bool "pango" depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 depends on BR2_INSTALL_LIBSTDCPP # freetype support select BR2_PACKAGE_LIBGLIB2 select BR2_PACKAGE_EXPAT select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_FONTCONFIG + select BR2_PACKAGE_FREETYPE select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE - select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE + select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 help Pango is a library for laying out and rendering of text, with an emphasis on internationalization. Pango can be used anywhere that @@ -16,5 +20,7 @@ config BR2_PACKAGE_PANGO http://www.pango.org/ -comment "pango requires a toolchain with WCHAR and C++ support" - depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP +comment "pango needs a toolchain w/ wchar, threads, C++" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_INSTALL_LIBSTDCPP diff --git a/package/pango/pango-no-const-return.patch b/package/pango/pango-no-const-return.patch new file mode 100644 index 0000000000..a0749a42e9 --- /dev/null +++ b/package/pango/pango-no-const-return.patch @@ -0,0 +1,475 @@ +From 4b060ca43c9605be2fdb219a379f8a17c33b0d98 Mon Sep 17 00:00:00 2001 +From: Ryan Lortie +Date: Thu, 9 Jun 2011 11:36:59 -0400 +Subject: [PATCH] Stop using G_CONST_RETURN in Pango + +Upstream: 4c7807daee7189f48 + +G_CONST_RETURN is headed for deprecation (as per bug #644611). Stop +using it in Pango. + +https://bugzilla.gnome.org/show_bug.cgi?id=652202 + +Signed-off-by: Peter Korsgaard +--- + modules/hebrew/hebrew-shaper.c | 2 +- + pango/fonts.c | 6 +++--- + pango/pango-attributes.c | 2 +- + pango/pango-attributes.h | 2 +- + pango/pango-context.c | 2 +- + pango/pango-context.h | 6 +++--- + pango/pango-font.h | 6 +++--- + pango/pango-fontmap.c | 2 +- + pango/pango-language.c | 6 +++--- + pango/pango-language.h | 6 +++--- + pango/pango-layout.c | 4 ++-- + pango/pango-layout.h | 2 +- + pango/pango-ot-ruleset.c | 2 +- + pango/pango-renderer.c | 2 +- + pango/pango-renderer.h | 2 +- + pango/pango-script.c | 8 ++++---- + pango/pango-script.h | 12 ++++++------ + pango/pango-utils.c | 4 ++-- + pango/pango-utils.h | 12 ++++++------ + pango/pangocairo-context.c | 4 ++-- + pango/pangoft2.c | 2 +- + pango/pangox-fontmap.c | 4 ++-- + 22 files changed, 49 insertions(+), 49 deletions(-) + +diff --git a/modules/hebrew/hebrew-shaper.c b/modules/hebrew/hebrew-shaper.c +index 8aa3638..db3055b 100644 +--- a/modules/hebrew/hebrew-shaper.c ++++ b/modules/hebrew/hebrew-shaper.c +@@ -167,7 +167,7 @@ static const gboolean compose_table[4][4] = { + #define is_composible(cur_wc, nxt_wc) (compose_table[char_type_table[ucs2iso8859_8 (cur_wc)]]\ + [char_type_table[ucs2iso8859_8 (nxt_wc)]]) + +-G_CONST_RETURN char * ++const char * + hebrew_shaper_get_next_cluster(const char *text, + gint length, + gunichar *cluster, +diff --git a/pango/fonts.c b/pango/fonts.c +index ab5397a..d9de7de 100644 +--- a/pango/fonts.c ++++ b/pango/fonts.c +@@ -165,7 +165,7 @@ pango_font_description_set_family_static (PangoFontDescription *desc, + * %NULL if not previously set. This has the same life-time + * as the font description itself and should not be freed. + **/ +-G_CONST_RETURN char * ++const char * + pango_font_description_get_family (const PangoFontDescription *desc) + { + g_return_val_if_fail (desc != NULL, NULL); +@@ -1927,7 +1927,7 @@ pango_font_family_init (PangoFontFamily *family G_GNUC_UNUSED) + * Return value: the name of the family. This string is owned + * by the family object and must not be modified or freed. + **/ +-G_CONST_RETURN char * ++const char * + pango_font_family_get_name (PangoFontFamily *family) + { + g_return_val_if_fail (PANGO_IS_FONT_FAMILY (family), NULL); +@@ -2060,7 +2060,7 @@ pango_font_face_is_synthesized (PangoFontFace *face) + * Return value: the face name for the face. This string is + * owned by the face object and must not be modified or freed. + **/ +-G_CONST_RETURN char * ++const char * + pango_font_face_get_face_name (PangoFontFace *face) + { + g_return_val_if_fail (PANGO_IS_FONT_FACE (face), NULL); +diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c +index 28c11de..373fba1 100644 +--- a/pango/pango-attributes.c ++++ b/pango/pango-attributes.c +@@ -97,7 +97,7 @@ pango_attr_type_register (const gchar *name) + * + * Since: 1.22 + **/ +-G_CONST_RETURN char * ++const char * + pango_attr_type_get_name (PangoAttrType type) + { + const char *result = NULL; +diff --git a/pango/pango-attributes.h b/pango/pango-attributes.h +index 866e35d..59f97a3 100644 +--- a/pango/pango-attributes.h ++++ b/pango/pango-attributes.h +@@ -180,7 +180,7 @@ struct _PangoAttrFontDesc + }; + + PangoAttrType pango_attr_type_register (const gchar *name); +-G_CONST_RETURN char * pango_attr_type_get_name (PangoAttrType type) G_GNUC_CONST; ++const char * pango_attr_type_get_name (PangoAttrType type) G_GNUC_CONST; + + void pango_attribute_init (PangoAttribute *attr, + const PangoAttrClass *klass); +diff --git a/pango/pango-context.c b/pango/pango-context.c +index 6ec0b56..3c9442a 100644 +--- a/pango/pango-context.c ++++ b/pango/pango-context.c +@@ -188,7 +188,7 @@ pango_context_set_matrix (PangoContext *context, + * + * Since: 1.6 + **/ +-G_CONST_RETURN PangoMatrix * ++const PangoMatrix * + pango_context_get_matrix (PangoContext *context) + { + g_return_val_if_fail (PANGO_IS_CONTEXT (context), NULL); +diff --git a/pango/pango-context.h b/pango/pango-context.h +index d8c3cb8..d85928a 100644 +--- a/pango/pango-context.h ++++ b/pango/pango-context.h +@@ -84,9 +84,9 @@ void pango_context_set_gravity_hint (PangoContext + PangoGravityHint hint); + PangoGravityHint pango_context_get_gravity_hint (PangoContext *context); + +-void pango_context_set_matrix (PangoContext *context, +- const PangoMatrix *matrix); +-G_CONST_RETURN PangoMatrix *pango_context_get_matrix (PangoContext *context); ++void pango_context_set_matrix (PangoContext *context, ++ const PangoMatrix *matrix); ++const PangoMatrix * pango_context_get_matrix (PangoContext *context); + + /* Break a string of Unicode characters into segments with + * consistent shaping/language engine and bidrectional level. +diff --git a/pango/pango-font.h b/pango/pango-font.h +index b5b2cf1..eea27b4 100644 +--- a/pango/pango-font.h ++++ b/pango/pango-font.h +@@ -117,7 +117,7 @@ void pango_font_description_set_family (PangoFontDescript + const char *family); + void pango_font_description_set_family_static (PangoFontDescription *desc, + const char *family); +-G_CONST_RETURN char *pango_font_description_get_family (const PangoFontDescription *desc) G_GNUC_PURE; ++const char *pango_font_description_get_family (const PangoFontDescription *desc) G_GNUC_PURE; + void pango_font_description_set_style (PangoFontDescription *desc, + PangoStyle style); + PangoStyle pango_font_description_get_style (const PangoFontDescription *desc) G_GNUC_PURE; +@@ -212,7 +212,7 @@ GType pango_font_family_get_type (void) G_GNUC_CONST; + void pango_font_family_list_faces (PangoFontFamily *family, + PangoFontFace ***faces, + int *n_faces); +-G_CONST_RETURN char *pango_font_family_get_name (PangoFontFamily *family) G_GNUC_PURE; ++const char *pango_font_family_get_name (PangoFontFamily *family) G_GNUC_PURE; + gboolean pango_font_family_is_monospace (PangoFontFamily *family) G_GNUC_PURE; + + #ifdef PANGO_ENABLE_BACKEND +@@ -261,7 +261,7 @@ struct _PangoFontFamilyClass + GType pango_font_face_get_type (void) G_GNUC_CONST; + + PangoFontDescription *pango_font_face_describe (PangoFontFace *face); +-G_CONST_RETURN char *pango_font_face_get_face_name (PangoFontFace *face) G_GNUC_PURE; ++const char *pango_font_face_get_face_name (PangoFontFace *face) G_GNUC_PURE; + void pango_font_face_list_sizes (PangoFontFace *face, + int **sizes, + int *n_sizes); +diff --git a/pango/pango-fontmap.c b/pango/pango-fontmap.c +index 13f4263..78b1692 100644 +--- a/pango/pango-fontmap.c ++++ b/pango/pango-fontmap.c +@@ -290,7 +290,7 @@ pango_font_map_real_load_fontset (PangoFontMap *fontmap, + * + * Since: 1.4 + **/ +-G_CONST_RETURN char * ++const char * + pango_font_map_get_shape_engine_type (PangoFontMap *fontmap) + { + g_return_val_if_fail (PANGO_IS_FONT_MAP (fontmap), NULL); +diff --git a/pango/pango-language.c b/pango/pango-language.c +index bfde308..2bb294e 100644 +--- a/pango/pango-language.c ++++ b/pango/pango-language.c +@@ -319,7 +319,7 @@ pango_language_from_string (const char *language) + * Returns: a string representing the language tag. This is owned by + * Pango and should not be freed. + */ +-G_CONST_RETURN char * ++const char * + (pango_language_to_string) (PangoLanguage *language) + { + return pango_language_to_string (language); +@@ -531,7 +531,7 @@ static const LangInfo lang_texts[] = { + * Return value: the sample string. This value is owned by Pango + * and should not be freed. + **/ +-G_CONST_RETURN char * ++const char * + pango_language_get_sample_string (PangoLanguage *language) + { + const LangInfo *lang_info; +@@ -592,7 +592,7 @@ pango_language_get_sample_string (PangoLanguage *language) + + * Since: 1.22 + **/ +-G_CONST_RETURN PangoScript * ++const PangoScript * + pango_language_get_scripts (PangoLanguage *language, + int *num_scripts) + { +diff --git a/pango/pango-language.h b/pango/pango-language.h +index 37cdc16..31660ca 100644 +--- a/pango/pango-language.h ++++ b/pango/pango-language.h +@@ -34,11 +34,11 @@ typedef struct _PangoLanguage PangoLanguage; + GType pango_language_get_type (void) G_GNUC_CONST; + PangoLanguage *pango_language_from_string (const char *language); + +-G_CONST_RETURN char *pango_language_to_string (PangoLanguage *language) G_GNUC_CONST; ++const char *pango_language_to_string (PangoLanguage *language) G_GNUC_CONST; + /* For back compat. Will have to keep indefinitely. */ + #define pango_language_to_string(language) ((const char *)language) + +-G_CONST_RETURN char *pango_language_get_sample_string (PangoLanguage *language) G_GNUC_CONST; ++const char *pango_language_get_sample_string (PangoLanguage *language) G_GNUC_CONST; + PangoLanguage *pango_language_get_default (void) G_GNUC_CONST; + + gboolean pango_language_matches (PangoLanguage *language, +@@ -48,7 +48,7 @@ gboolean pango_language_matches (PangoLanguage *language, + + gboolean pango_language_includes_script (PangoLanguage *language, + PangoScript script) G_GNUC_PURE; +-G_CONST_RETURN PangoScript *pango_language_get_scripts (PangoLanguage *language, ++const PangoScript *pango_language_get_scripts (PangoLanguage *language, + int *num_scripts); + + G_END_DECLS +diff --git a/pango/pango-layout.c b/pango/pango-layout.c +index 12f9dee..2dc0c17 100644 +--- a/pango/pango-layout.c ++++ b/pango/pango-layout.c +@@ -677,7 +677,7 @@ pango_layout_set_font_description (PangoLayout *layout, + * + * Since: 1.8 + **/ +-G_CONST_RETURN PangoFontDescription * ++const PangoFontDescription * + pango_layout_get_font_description (PangoLayout *layout) + { + g_return_val_if_fail (PANGO_IS_LAYOUT (layout), NULL); +@@ -1087,7 +1087,7 @@ pango_layout_set_text (PangoLayout *layout, + * + * Return value: the text in the @layout. + **/ +-G_CONST_RETURN char* ++const char* + pango_layout_get_text (PangoLayout *layout) + { + g_return_val_if_fail (PANGO_IS_LAYOUT (layout), NULL); +diff --git a/pango/pango-layout.h b/pango/pango-layout.h +index 3b769ff..d786dc6 100644 +--- a/pango/pango-layout.h ++++ b/pango/pango-layout.h +@@ -116,7 +116,7 @@ void pango_layout_set_markup_with_accel (PangoLayout *layout, + void pango_layout_set_font_description (PangoLayout *layout, + const PangoFontDescription *desc); + +-G_CONST_RETURN PangoFontDescription *pango_layout_get_font_description (PangoLayout *layout); ++const PangoFontDescription *pango_layout_get_font_description (PangoLayout *layout); + + void pango_layout_set_width (PangoLayout *layout, + int width); +diff --git a/pango/pango-ot-ruleset.c b/pango/pango-ot-ruleset.c +index b5e2795..8fe7b72 100644 +--- a/pango/pango-ot-ruleset.c ++++ b/pango/pango-ot-ruleset.c +@@ -107,7 +107,7 @@ pango_ot_ruleset_finalize (GObject *object) + * + * Since: 1.18 + **/ +-G_CONST_RETURN PangoOTRuleset * ++const PangoOTRuleset * + pango_ot_ruleset_get_for_description (PangoOTInfo *info, + const PangoOTRulesetDescription *desc) + { +diff --git a/pango/pango-renderer.c b/pango/pango-renderer.c +index db75446..a1fea5e 100644 +--- a/pango/pango-renderer.c ++++ b/pango/pango-renderer.c +@@ -1352,7 +1352,7 @@ pango_renderer_set_matrix (PangoRenderer *renderer, + * + * Since: 1.8 + **/ +-G_CONST_RETURN PangoMatrix * ++const PangoMatrix * + pango_renderer_get_matrix (PangoRenderer *renderer) + { + g_return_val_if_fail (PANGO_IS_RENDERER (renderer), NULL); +diff --git a/pango/pango-renderer.h b/pango/pango-renderer.h +index 354127b..5410a9f 100644 +--- a/pango/pango-renderer.h ++++ b/pango/pango-renderer.h +@@ -249,7 +249,7 @@ PangoColor *pango_renderer_get_color (PangoRenderer *renderer, + + void pango_renderer_set_matrix (PangoRenderer *renderer, + const PangoMatrix *matrix); +-G_CONST_RETURN PangoMatrix *pango_renderer_get_matrix (PangoRenderer *renderer); ++const PangoMatrix *pango_renderer_get_matrix (PangoRenderer *renderer); + + PangoLayout *pango_renderer_get_layout (PangoRenderer *renderer); + PangoLayoutLine *pango_renderer_get_layout_line (PangoRenderer *renderer); +diff --git a/pango/pango-script.c b/pango/pango-script.c +index 605e46e..1d57a69 100644 +--- a/pango/pango-script.c ++++ b/pango/pango-script.c +@@ -164,10 +164,10 @@ pango_script_iter_free (PangoScriptIter *iter) + * Since: 1.4 + **/ + void +-pango_script_iter_get_range (PangoScriptIter *iter, +- G_CONST_RETURN char **start, +- G_CONST_RETURN char **end, +- PangoScript *script) ++pango_script_iter_get_range (PangoScriptIter *iter, ++ const char **start, ++ const char **end, ++ PangoScript *script) + { + if (start) + *start = iter->script_start; +diff --git a/pango/pango-script.h b/pango/pango-script.h +index 32ef737..ef5f698 100644 +--- a/pango/pango-script.h ++++ b/pango/pango-script.h +@@ -128,12 +128,12 @@ PangoScript pango_script_for_unichar (gunichar ch) G_GNUC_CO + + PangoScriptIter *pango_script_iter_new (const char *text, + int length); +-void pango_script_iter_get_range (PangoScriptIter *iter, +- G_CONST_RETURN char **start, +- G_CONST_RETURN char **end, +- PangoScript *script); +-gboolean pango_script_iter_next (PangoScriptIter *iter); +-void pango_script_iter_free (PangoScriptIter *iter); ++void pango_script_iter_get_range (PangoScriptIter *iter, ++ const char **start, ++ const char **end, ++ PangoScript *script); ++gboolean pango_script_iter_next (PangoScriptIter *iter); ++void pango_script_iter_free (PangoScriptIter *iter); + + #include + +diff --git a/pango/pango-utils.c b/pango/pango-utils.c +index 100dbc7..71deeef 100644 +--- a/pango/pango-utils.c ++++ b/pango/pango-utils.c +@@ -689,7 +689,7 @@ DllMain (HINSTANCE hinstDLL, + * Return value: the Pango sysconf directory. The returned string should + * not be freed. + */ +-G_CONST_RETURN char * ++const char * + pango_get_sysconf_subdirectory (void) + { + #ifdef G_OS_WIN32 +@@ -718,7 +718,7 @@ pango_get_sysconf_subdirectory (void) + * Return value: the Pango lib directory. The returned string should + * not be freed. + */ +-G_CONST_RETURN char * ++const char * + pango_get_lib_subdirectory (void) + { + #ifdef G_OS_WIN32 +diff --git a/pango/pango-utils.h b/pango/pango-utils.h +index 41a8bbb..f86c662 100644 +--- a/pango/pango-utils.h ++++ b/pango/pango-utils.h +@@ -82,13 +82,13 @@ gboolean pango_parse_stretch (const char *str, + * stored in the registry). The returned string should not be + * g_free'd. + */ +-G_CONST_RETURN char * pango_get_sysconf_subdirectory (void) G_GNUC_PURE; ++const char * pango_get_sysconf_subdirectory (void) G_GNUC_PURE; + + /* Ditto for LIBDIR/pango. On Win32, use the same Pango + * installation directory. This returned string should not be + * g_free'd either. + */ +-G_CONST_RETURN char * pango_get_lib_subdirectory (void) G_GNUC_PURE; ++const char * pango_get_lib_subdirectory (void) G_GNUC_PURE; + + #endif /* PANGO_ENABLE_BACKEND */ + +@@ -131,12 +131,12 @@ gboolean pango_is_zero_width (gunichar ch) G_GNUC_CONST; + int pango_version (void) G_GNUC_CONST; + + /* Return run-time Pango version as an string */ +-G_CONST_RETURN char * pango_version_string (void) G_GNUC_CONST; ++const char * pango_version_string (void) G_GNUC_CONST; + + /* Check that run-time Pango is as new as required */ +-G_CONST_RETURN char * pango_version_check (int required_major, +- int required_minor, +- int required_micro) G_GNUC_CONST; ++const char * pango_version_check (int required_major, ++ int required_minor, ++ int required_micro) G_GNUC_CONST; + + G_END_DECLS + +diff --git a/pango/pangocairo-context.c b/pango/pangocairo-context.c +index 69432f0..f61e839 100644 +--- a/pango/pangocairo-context.c ++++ b/pango/pangocairo-context.c +@@ -260,7 +260,7 @@ pango_cairo_context_set_font_options (PangoContext *context, + * + * Since: 1.10 + **/ +-G_CONST_RETURN cairo_font_options_t * ++const cairo_font_options_t * + pango_cairo_context_get_font_options (PangoContext *context) + { + PangoCairoContextInfo *info; +@@ -286,7 +286,7 @@ pango_cairo_context_get_font_options (PangoContext *context) + * Return value: the combined set of font options. This value is owned + * by the context and must not be modified or freed. + **/ +-G_CONST_RETURN cairo_font_options_t * ++const cairo_font_options_t * + _pango_cairo_context_get_merged_font_options (PangoContext *context) + { + PangoCairoContextInfo *info = get_context_info (context, TRUE); +diff --git a/pango/pangoft2.c b/pango/pangoft2.c +index f4a3864..b41c468 100644 +--- a/pango/pangoft2.c ++++ b/pango/pangoft2.c +@@ -520,7 +520,7 @@ ft_error_compare (const void *pkey, + return ((ft_error_description *) pkey)->code - ((ft_error_description *) pbase)->code; + } + +-G_CONST_RETURN char * ++const char * + _pango_ft2_ft_strerror (FT_Error error) + { + #undef __FTERRORS_H__ +diff --git a/pango/pangox-fontmap.c b/pango/pangox-fontmap.c +index 6d5e547..3f5343f 100644 +--- a/pango/pangox-fontmap.c ++++ b/pango/pangox-fontmap.c +@@ -1441,7 +1441,7 @@ pango_x_fontmap_atom_from_name (PangoFontMap *fontmap, + } + + +-G_CONST_RETURN char * ++const char * + pango_x_fontmap_name_from_atom (PangoFontMap *fontmap, + Atom atom) + { +@@ -1645,7 +1645,7 @@ pango_x_family_list_faces (PangoFontFamily *family, + } + } + +-static G_CONST_RETURN char * ++static const char * + pango_x_family_get_name (PangoFontFamily *family) + { + PangoXFamily *xfamily = PANGO_X_FAMILY (family); +-- +1.7.8.3 + diff --git a/package/pango/pango.mk b/package/pango/pango.mk index 0556896791..82ba542997 100644 --- a/package/pango/pango.mk +++ b/package/pango/pango.mk @@ -1,17 +1,17 @@ -############################################################# +################################################################################ # # pango # -############################################################# +################################################################################ + PANGO_VERSION_MAJOR = 1.28 -PANGO_VERSION_MINOR = 2 +PANGO_VERSION_MINOR = 4 PANGO_VERSION = $(PANGO_VERSION_MAJOR).$(PANGO_VERSION_MINOR) PANGO_SOURCE = pango-$(PANGO_VERSION).tar.bz2 PANGO_SITE = http://ftp.gnome.org/pub/GNOME/sources/pango/$(PANGO_VERSION_MAJOR) PANGO_AUTORECONF = YES PANGO_INSTALL_STAGING = YES -PANGO_INSTALL_TARGET = YES PANGO_CONF_ENV = ac_cv_func_posix_getpwuid_r=yes glib_cv_stack_grows=no \ glib_cv_uscore=no ac_cv_func_strtod=yes \ @@ -40,20 +40,28 @@ PANGO_CONF_ENV = ac_cv_func_posix_getpwuid_r=yes glib_cv_stack_grows=no \ ac_use_included_regex=no gl_cv_c_restrict=no \ ac_cv_path_FREETYPE_CONFIG=$(STAGING_DIR)/usr/bin/freetype-config -PANGO_CONF_OPT = --enable-shared --enable-static \ - --enable-explicit-deps=no --disable-debug +PANGO_CONF_OPT = --enable-explicit-deps=no --disable-debug -PANGO_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl) host-pkg-config libglib2 cairo +PANGO_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \ + host-pkgconf \ + libglib2 \ + cairo \ + fontconfig \ + freetype ifeq ($(BR2_PACKAGE_XORG7),y) PANGO_CONF_OPT += --with-x \ --x-includes=$(STAGING_DIR)/usr/include/X11 \ --x-libraries=$(STAGING_DIR)/usr/lib --disable-glibtest - PANGO_DEPENDENCIES += xserver_xorg-server + PANGO_DEPENDENCIES += xlib_libX11 else PANGO_CONF_OPT += --without-x endif +ifeq ($(BR2_PACKAGE_XLIB_LIBXFT)$(BR2_PACKAGE_XLIB_LIBXRENDER),yy) + PANGO_DEPENDENCIES += xlib_libXft xlib_libXrender +endif + define PANGO_INSTALL_INITSCRIPT $(INSTALL) -m 755 -D package/pango/S25pango \ $(TARGET_DIR)/etc/init.d/S25pango @@ -61,4 +69,4 @@ endef PANGO_POST_INSTALL_TARGET_HOOKS += PANGO_INSTALL_INITSCRIPT -$(eval $(call AUTOTARGETS,package,pango)) +$(eval $(autotools-package)) diff --git a/package/parted/Config.in b/package/parted/Config.in new file mode 100644 index 0000000000..8af269326b --- /dev/null +++ b/package/parted/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_PARTED + bool "parted" + depends on BR2_LARGEFILE + depends on BR2_USE_WCHAR + depends on BR2_USE_MMU # lvm2 + select BR2_PACKAGE_LVM2 + select BR2_PACKAGE_READLINE + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + parted, the GNU partition resizing program + + http://www.gnu.org/software/parted/ + +comment "parted needs a toolchain w/ largefile, wchar" + depends on BR2_USE_MMU + depends on !(BR2_LARGEFILE && BR2_USE_WCHAR) diff --git a/package/parted/parted.mk b/package/parted/parted.mk new file mode 100644 index 0000000000..773e332edc --- /dev/null +++ b/package/parted/parted.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# parted +# +################################################################################ + +PARTED_VERSION = 3.1 +PARTED_SOURCE = parted-$(PARTED_VERSION).tar.xz +PARTED_SITE = $(BR2_GNU_MIRROR)/parted +PARTED_DEPENDENCIES = readline util-linux lvm2 +PARTED_INSTALL_STAGING = YES +PARTED_LICENSE = GPLv3+ +PARTED_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/patch/Config.in b/package/patch/Config.in index dd6d51c17b..887c84d4d9 100644 --- a/package/patch/Config.in +++ b/package/patch/Config.in @@ -7,5 +7,5 @@ config BR2_PACKAGE_PATCH http://www.gnu.org/software/patch/ -comment "patch needs a toolchain with WCHAR support" +comment "patch needs a toolchain w/ wchar" depends on !BR2_USE_WCHAR diff --git a/package/patch/patch.mk b/package/patch/patch.mk index 5c46c779c0..2dd45336f8 100644 --- a/package/patch/patch.mk +++ b/package/patch/patch.mk @@ -1,10 +1,13 @@ -############################################################# +################################################################################ # # patch # -############################################################# +################################################################################ -PATCH_VERSION = 2.6 +PATCH_VERSION = 2.7.1 +PATCH_SOURCE = patch-$(PATCH_VERSION).tar.xz PATCH_SITE = $(BR2_GNU_MIRROR)/patch +PATCH_LICENSE = GPLv3+ +PATCH_LICENSE_FILES = COPYING -$(eval $(call AUTOTARGETS,package,patch)) +$(eval $(autotools-package)) diff --git a/package/pax-utils/Config.in b/package/pax-utils/Config.in new file mode 100644 index 0000000000..58100e482a --- /dev/null +++ b/package/pax-utils/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PAX_UTILS + bool "pax-utils" + help + ELF related utils for ELF 32/64 binaries that can check files + for security relevant properties. + + http://www.gentoo.org/proj/en/hardened/pax-utils.xml diff --git a/package/pax-utils/pax-utils.mk b/package/pax-utils/pax-utils.mk new file mode 100644 index 0000000000..69198c278a --- /dev/null +++ b/package/pax-utils/pax-utils.mk @@ -0,0 +1,55 @@ +################################################################################ +# +# pax-utils +# +################################################################################ + +PAX_UTILS_VERSION = 0.7 +PAX_UTILS_SITE = http://distfiles.gentoo.org/distfiles +PAX_UTILS_SOURCE = pax-utils-$(PAX_UTILS_VERSION).tar.xz +PAX_UTILS_LICENSE = GPLv2 +PAX_UTILS_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_LIBCAP),y) +PAX_UTILS_DEPENDENCIES += libcap +PAX_UTILS_USE_CAP = USE_CAP=yes +endif + +# libcap is only useful for pspax (a running system) +HOST_PAX_UTILS_DEPENDENCIES = + +# lddtree and symtree need bash +ifeq ($(BR2_PACKAGE_BASH),) +define PAX_UTILS_REMOVE_BASH_TOOLS + rm -f $(TARGET_DIR)/usr/bin/{lddtree,symtree} +endef +endif +PAX_UTILS_POST_INSTALL_TARGET_HOOKS += PAX_UTILS_REMOVE_BASH_TOOLS + +define HOST_PAX_UTILS_BUILD_CMDS + $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) +endef + +define PAX_UTILS_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) $(PAX_UTILS_USE_CAP) -C $(@D) +endef + +define HOST_PAX_UTILS_CLEAN_CMDS + $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) clean +endef + +define PAX_UTILS_CLEAN_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) clean +endef + +define HOST_PAX_UTILS_INSTALL_CMDS + $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) DESTDIR="$(HOST_DIR)" install +endef + +define PAX_UTILS_INSTALL_TARGET_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + DESTDIR="$(TARGET_DIR)" install +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/pciutils/Config.in b/package/pciutils/Config.in index 7b318dae7f..a082f23997 100644 --- a/package/pciutils/Config.in +++ b/package/pciutils/Config.in @@ -4,7 +4,4 @@ config BR2_PACKAGE_PCIUTILS Various utilities dealing with the PCI bus. Provides things like setpci and lspci. - You'll need a copy of pci.ids or pci.ids.gz in your - target skeleton to enjoy verbose output. - http://atrey.karlin.mff.cuni.cz/~mj/pciutils.html diff --git a/package/pciutils/pciutils.mk b/package/pciutils/pciutils.mk index 782d348ea8..16ba61b07b 100644 --- a/package/pciutils/pciutils.mk +++ b/package/pciutils/pciutils.mk @@ -1,11 +1,15 @@ -############################################################# +################################################################################ # -# PCIUTILS +# pciutils # -############################################################# +################################################################################ -PCIUTILS_VERSION = 3.1.7 +PCIUTILS_VERSION = 3.2.1 PCIUTILS_SITE = ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci +PCIUTILS_INSTALL_STAGING = YES +PCIUTILS_LICENSE = GPLv2+ +PCIUTILS_LICENSE_FILES = COPYING + ifeq ($(BR2_PACKAGE_ZLIB),y) PCIUTILS_ZLIB=yes PCIUTILS_DEPENDENCIES += zlib @@ -15,6 +19,18 @@ endif PCIUTILS_DNS=no PCIUTILS_SHARED=yes +# Build after busybox since it's got a lightweight lspci +ifeq ($(BR2_PACKAGE_BUSYBOX),y) + PCIUTILS_DEPENDENCIES += busybox +endif + +ifeq ($(BR2_PACKAGE_KMOD),y) + PCIUTILS_DEPENDENCIES += kmod + PCIUTILS_KMOD = yes +else + PCIUTILS_KMOD = no +endif + define PCIUTILS_CONFIGURE_CMDS $(SED) 's/wget --no-timestamping/wget/' $(PCIUTILS_DIR)/update-pciids.sh $(SED) 's/uname -s/echo Linux/' \ @@ -24,7 +40,7 @@ define PCIUTILS_CONFIGURE_CMDS endef define PCIUTILS_BUILD_CMDS - $(MAKE) CC="$(TARGET_CC)" \ + $(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" \ HOST="$(KERNEL_ARCH)-linux" \ OPT="$(TARGET_CFLAGS)" \ LDFLAGS="$(TARGET_LDFLAGS)" \ @@ -34,15 +50,27 @@ define PCIUTILS_BUILD_CMDS SHARED=$(PCIUTILS_SHARED) \ ZLIB=$(PCIUTILS_ZLIB) \ DNS=$(PCIUTILS_DNS) \ + LIBKMOD=$(PCIUTILS_KMOD) \ PREFIX=/usr endef # Ditch install-lib if SHARED is an option in the future define PCIUTILS_INSTALL_TARGET_CMDS - $(MAKE) BUILDDIR=$(@D) -C $(@D) PREFIX=$(TARGET_DIR)/usr \ - SHARED=$(PCIUTILS_SHARED) install - $(MAKE) BUILDDIR=$(@D) -C $(@D) PREFIX=$(TARGET_DIR)/usr \ - SHARED=$(PCIUTILS_SHARED) install-lib + $(MAKE1) BUILDDIR=$(@D) -C $(@D) PREFIX=$(TARGET_DIR)/usr \ + SHARED=$(PCIUTILS_SHARED) install install-lib endef -$(eval $(call GENTARGETS,package,pciutils)) +define PCIUTILS_INSTALL_STAGING_CMDS + $(MAKE1) BUILDDIR=$(@D) -C $(@D) PREFIX=$(STAGING_DIR)/usr \ + SHARED=$(PCIUTILS_SHARED) install install-lib +endef + + +# Library lacks +x so strip skips it +define PCIUTILS_FIX_LIBRARY_MODE + -chmod +x $(TARGET_DIR)/usr/lib/libpci.so* +endef + +PCIUTILS_POST_INSTALL_TARGET_HOOKS += PCIUTILS_FIX_LIBRARY_MODE + +$(eval $(generic-package)) diff --git a/package/pcmanfm/Config.in b/package/pcmanfm/Config.in index c8b4debff8..f6a398436f 100644 --- a/package/pcmanfm/Config.in +++ b/package/pcmanfm/Config.in @@ -2,14 +2,17 @@ config BR2_PACKAGE_PCMANFM bool "pcmanfm" depends on BR2_PACKAGE_XORG7 depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 select BR2_PACKAGE_GAMIN select BR2_PACKAGE_STARTUP_NOTIFICATION + select BR2_PACKAGE_XLIB_LIBX11 depends on BR2_PACKAGE_LIBGTK2 help - An extremly fast and lightweight file manager which features - tabbed browsing and user-friendly interface. + An extremely fast and lightweight file manager which features + tabbed browsing and a user-friendly interface. http://internap.dl.sourceforge.net/sourceforge/pcmanfm -comment "pcmanfm requires a toolchain with WCHAR support" - depends on BR2_PACKAGE_XORG7 && !BR2_USE_WCHAR +comment "pcmanfm needs a toolchain w/ wchar, threads" + depends on BR2_PACKAGE_XORG7 && BR2_PACKAGE_LIBGTK2 + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/pcmanfm/pcmanfm-link-against-libx11.patch b/package/pcmanfm/pcmanfm-link-against-libx11.patch new file mode 100644 index 0000000000..f571e77450 --- /dev/null +++ b/package/pcmanfm/pcmanfm-link-against-libx11.patch @@ -0,0 +1,20 @@ +Link against libX11 + +fm-desktop.c uses XSendEvent, so we should link against libX11. + +Signed-off-by: Thomas Petazzoni + +Index: b/configure.in +=================================================================== +--- a/configure.in ++++ b/configure.in +@@ -12,7 +12,8 @@ + + pkg_modules="gtk+-2.0 >= 2.6.0 \ + gthread-2.0 \ +- libstartup-notification-1.0" ++ libstartup-notification-1.0 \ ++ x11" + + AC_FUNC_MMAP + diff --git a/package/pcmanfm/pcmanfm.mk b/package/pcmanfm/pcmanfm.mk index 370cf801af..80eedd40ff 100644 --- a/package/pcmanfm/pcmanfm.mk +++ b/package/pcmanfm/pcmanfm.mk @@ -1,18 +1,13 @@ -############################################################# +################################################################################ # # pcmanfm # -############################################################# -PCMANFM_VERSION = 0.3.5.9 -PCMANFM_SOURCE = pcmanfm-$(PCMANFM_VERSION).tar.gz -PCMANFM_SITE = http://internap.dl.sourceforge.net/sourceforge/pcmanfm -PCMANFM_AUTORECONF = NO -PCMANFM_INSTALL_STAGING = NO -PCMANFM_INSTALL_TARGET = YES +################################################################################ +PCMANFM_VERSION = 0.3.5.9 +PCMANFM_SITE = http://downloads.sourceforge.net/project/pcmanfm/pcmanfm-legacy%20%28Old%200.5%20series%29/PCManFM%20$(PCMANFM_VERSION) PCMANFM_CONF_OPT = --disable-hal +PCMANFM_DEPENDENCIES = host-pkgconf libgtk2 gamin startup-notification xlib_libX11 +PCMANFM_AUTORECONF = YES -PCMANFM_DEPENDENCIES = host-pkg-config libgtk2 gamin startup-notification xserver_xorg-server - -$(eval $(call AUTOTARGETS,package,pcmanfm)) - +$(eval $(autotools-package)) diff --git a/package/pcre/Config.in b/package/pcre/Config.in index a4e2547cef..9d3a143365 100644 --- a/package/pcre/Config.in +++ b/package/pcre/Config.in @@ -1,6 +1,34 @@ config BR2_PACKAGE_PCRE bool "pcre" help - Perl Compatible Regular Expressions + Perl Compatible Regular Expressions. By default, only the + 8-bits libpcre is built. To get the 16-bits and/or 32-bits + variants libpcre16/libpcre32, use the package sub-options. http://www.pcre.org/ + +if BR2_PACKAGE_PCRE + +config BR2_PACKAGE_PCRE_16 + bool "16-bit pcre" + help + This option builds the 16-bits pcre library, i.e 'libpcre16' + +config BR2_PACKAGE_PCRE_32 + bool "32-bit pcre" + help + This option builds the 32-bits pcre library, i.e 'libpcre32' + +config BR2_PACKAGE_PCRE_UTF + bool "UTF-8/16/32 support in pcre" + help + This option builds the pcre library with UTF-8/16/32 support + +config BR2_PACKAGE_PCRE_UCP + bool "Unicode properties support in pcre" + select BR2_PACKAGE_PCRE_UTF + help + This option builds the pcre library with Unicode properties + support (implies UTF-8/16/32 support)' + +endif diff --git a/package/pcre/pcre-01-no-compat.patch b/package/pcre/pcre-01-no-compat.patch new file mode 100644 index 0000000000..7099727737 --- /dev/null +++ b/package/pcre/pcre-01-no-compat.patch @@ -0,0 +1,31 @@ +Kill ABI compatibility bits, we don't need them. +Fixes build failures on non-ELF (blackfin) targets. + +Signed-off-by: Gustavo Zacarias + +diff -Nura pcre-8.32.orig/pcrecpp.cc pcre-8.32/pcrecpp.cc +--- pcre-8.32.orig/pcrecpp.cc 2012-12-28 08:32:10.193847937 -0300 ++++ pcre-8.32/pcrecpp.cc 2012-12-28 08:32:26.924376180 -0300 +@@ -58,22 +58,6 @@ + // Special object that stands-in for no argument + Arg RE::no_arg((void*)NULL); + +-// This is for ABI compatibility with old versions of pcre (pre-7.6), +-// which defined a global no_arg variable instead of putting it in the +-// RE class. This works on GCC >= 3, at least. It definitely works +-// for ELF, but may not for other object formats (Mach-O, for +-// instance, does not support aliases.) We could probably have a more +-// inclusive test if we ever needed it. (Note that not only the +-// __attribute__ syntax, but also __USER_LABEL_PREFIX__, are +-// gnu-specific.) +-#if defined(__GNUC__) && __GNUC__ >= 3 && defined(__ELF__) +-# define ULP_AS_STRING(x) ULP_AS_STRING_INTERNAL(x) +-# define ULP_AS_STRING_INTERNAL(x) #x +-# define USER_LABEL_PREFIX_STR ULP_AS_STRING(__USER_LABEL_PREFIX__) +-extern Arg no_arg +- __attribute__((alias(USER_LABEL_PREFIX_STR "_ZN7pcrecpp2RE6no_argE"))); +-#endif +- + // If a regular expression has no error, its error_ field points here + static const string empty_string; + diff --git a/package/pcre/pcre-02-no-cpp-tests.patch b/package/pcre/pcre-02-no-cpp-tests.patch new file mode 100644 index 0000000000..0255028fb6 --- /dev/null +++ b/package/pcre/pcre-02-no-cpp-tests.patch @@ -0,0 +1,31 @@ +Disable PCRE C++ unit tests, they fail to build on static scenarios +and they're not installed. + +Signed-off-by: Gustavo Zacarias + +diff -Nura pcre-8.33.orig/Makefile.in pcre-8.33/Makefile.in +--- pcre-8.33.orig/Makefile.in 2013-05-28 06:09:27.000000000 -0300 ++++ pcre-8.33/Makefile.in 2013-09-03 11:28:28.398198832 -0300 +@@ -123,12 +123,6 @@ + @WITH_PCRE8_TRUE@am__append_20 = libpcreposix.la + @WITH_GCOV_TRUE@@WITH_PCRE8_TRUE@am__append_21 = $(GCOV_CFLAGS) + @WITH_PCRE_CPP_TRUE@am__append_22 = libpcrecpp.la +-@WITH_PCRE_CPP_TRUE@am__append_23 = pcrecpp_unittest \ +-@WITH_PCRE_CPP_TRUE@ pcre_scanner_unittest \ +-@WITH_PCRE_CPP_TRUE@ pcre_stringpiece_unittest +-@WITH_PCRE_CPP_TRUE@am__append_24 = pcrecpp_unittest \ +-@WITH_PCRE_CPP_TRUE@ pcre_scanner_unittest \ +-@WITH_PCRE_CPP_TRUE@ pcre_stringpiece_unittest + @WITH_GCOV_TRUE@@WITH_PCRE_CPP_TRUE@am__append_25 = $(GCOV_CXXFLAGS) + @WITH_GCOV_TRUE@@WITH_PCRE_CPP_TRUE@am__append_26 = $(GCOV_LIBS) + @WITH_GCOV_TRUE@@WITH_PCRE_CPP_TRUE@am__append_27 = $(GCOV_LIBS) +@@ -360,9 +354,6 @@ + @WITH_PCRE8_TRUE@am__EXEEXT_1 = pcregrep$(EXEEXT) + @WITH_REBUILD_CHARTABLES_TRUE@am__EXEEXT_2 = dftables$(EXEEXT) + @WITH_JIT_TRUE@am__EXEEXT_3 = pcre_jit_test$(EXEEXT) +-@WITH_PCRE_CPP_TRUE@am__EXEEXT_4 = pcrecpp_unittest$(EXEEXT) \ +-@WITH_PCRE_CPP_TRUE@ pcre_scanner_unittest$(EXEEXT) \ +-@WITH_PCRE_CPP_TRUE@ pcre_stringpiece_unittest$(EXEEXT) + PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) + am__dftables_SOURCES_DIST = dftables.c + @WITH_REBUILD_CHARTABLES_TRUE@am_dftables_OBJECTS = \ diff --git a/package/pcre/pcre.mk b/package/pcre/pcre.mk index d2a13318fc..26373545e6 100644 --- a/package/pcre/pcre.mk +++ b/package/pcre/pcre.mk @@ -1,32 +1,25 @@ -############################################################# +################################################################################ # -# PCRE +# pcre # -############################################################# +################################################################################ -PCRE_VERSION = 7.9 +PCRE_VERSION = 8.33 PCRE_SITE = ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre +PCRE_LICENSE = BSD-3c +PCRE_LICENSE_FILES = LICENCE PCRE_INSTALL_STAGING = YES +PCRE_CONFIG_SCRIPTS = pcre-config ifneq ($(BR2_INSTALL_LIBSTDCPP),y) # pcre will use the host g++ if a cross version isn't available PCRE_CONF_OPT = --disable-cpp endif -define PCRE_STAGING_PCRE_CONFIG_FIXUP - $(SED) 's,^prefix=.*,prefix=$(STAGING_DIR)/usr,' \ - -e 's,^exec_prefix=.*,exec_prefix=$(STAGING_DIR)/usr,' \ - $(STAGING_DIR)/usr/bin/pcre-config -endef +PCRE_CONF_OPT += --enable-pcre8 +PCRE_CONF_OPT += $(if $(BR2_PACKAGE_PCRE_16),--enable-pcre16,--disable-pcre16) +PCRE_CONF_OPT += $(if $(BR2_PACKAGE_PCRE_32),--enable-pcre32,--disable-pcre32) +PCRE_CONF_OPT += $(if $(BR2_PACKAGE_PCRE_UTF),--enable-utf,--disable-utf) +PCRE_CONF_OPT += $(if $(BR2_PACKAGE_PCRE_UCP),--enable-unicode-properties,--disable-unicode-properties) -PCRE_POST_INSTALL_STAGING_HOOKS += PCRE_STAGING_PCRE_CONFIG_FIXUP - -define PCRE_TARGET_REMOVE_PCRE_CONFIG - rm -f $(TARGET_DIR)/usr/bin/pcre-config -endef - -ifneq ($(BR2_HAVE_DEVFILES),y) -PCRE_POST_INSTALL_TARGET_HOOKS += PCRE_TARGET_REMOVE_PCRE_CONFIG -endif - -$(eval $(call AUTOTARGETS,package,pcre)) +$(eval $(autotools-package)) diff --git a/package/pcsc-lite/Config.in b/package/pcsc-lite/Config.in new file mode 100644 index 0000000000..4cd89e93bc --- /dev/null +++ b/package/pcsc-lite/Config.in @@ -0,0 +1,33 @@ +config BR2_PACKAGE_PCSC_LITE + bool "pcsc-lite" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + help + Middleware to access smart card using SCard API (PC/SC). + + http://pcsclite.alioth.debian.org/ + +if BR2_PACKAGE_PCSC_LITE + +config BR2_PACKAGE_PCSC_LITE_FORCE_LIBUSB + bool "use libusb" + depends on !BR2_PACKAGE_UDEV + select BR2_PACKAGE_LIBUSB + help + Select Y if you want to support usb smart card readers. + +config BR2_PACKAGE_PCSC_LITE_DEBUGATR + bool "enable ATR debug messages" + help + Enable ATR debug messages from pcscd. + +config BR2_PACKAGE_PCSC_LITE_EMBEDDED + bool "enable embedded mode" + help + Limit RAM and CPU resources by disabling logs. + +endif + +comment "pcsc-lite needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/pcsc-lite/pcsc-lite.mk b/package/pcsc-lite/pcsc-lite.mk new file mode 100644 index 0000000000..4cc628f90f --- /dev/null +++ b/package/pcsc-lite/pcsc-lite.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# pcsc-lite +# +################################################################################ + +PCSC_LITE_VERSION = 1.8.8 +PCSC_LITE_SOURCE = pcsc-lite-$(PCSC_LITE_VERSION).tar.bz2 +PCSC_LITE_SITE = http://alioth.debian.org/frs/download.php/file/3862 +PCSC_LITE_INSTALL_STAGING = YES +PCSC_LITE_DEPENDENCIES = host-pkgconf +PCSC_LITE_LICENSE = BSD-3c +PCSC_LITE_LICENSE_FILES = COPYING + +# - libudev and libusb are optional +# - libudev and libusb can't be used together +# - libudev has a priority over libusb + +ifeq ($(BR2_PACKAGE_UDEV),y) +PCSC_LITE_CONF_OPT += --enable-libudev --disable-libusb +PCSC_LITE_DEPENDENCIES += udev +else +ifeq ($(BR2_PACKAGE_LIBUSB),y) +PCSC_LITE_CONF_OPT += --enable-libusb --disable-libudev +PCSC_LITE_DEPENDENCIES += libusb +else +PCSC_LITE_CONF_OPT += --disable-libusb --disable-libudev +endif +endif + +ifeq ($(PACKAGE_PCSC_LITE_DEBUGATR),y) +PCSC_LITE_CONF_OPT += --enable-debugatr +endif + +ifeq ($(PACKAGE_PCSC_LITE_EMBEDDED),y) +PCSC_LITE_CONF_OPT += --enable-embedded +endif + +$(eval $(autotools-package)) diff --git a/package/perf/Config.in b/package/perf/Config.in new file mode 100644 index 0000000000..88dce93267 --- /dev/null +++ b/package/perf/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_PERF + bool "perf" + depends on BR2_LINUX_KERNEL + depends on BR2_LARGEFILE + help + perf (sometimes "Perf Events" or perf tools, originally + "Performance Counters for Linux") - is a performance + analyzing tool in Linux, available from kernel version + 2.6.31. User-space controlling utility, called 'perf' has + git-like interface with subcommands. It is capable of + statistical profiling of entire system (both kernel and user + code), single CPU or severals threads. + + This package builds and install the userspace 'perf' + command. It is up to the user to ensure that the kernel + configuration has all suitable options enable to allow a + proper operation of 'perf'. + + https://perf.wiki.kernel.org/ + +comment "perf only available if Linux kernel is enabled, and needs a toolchain w/ largefile" + depends on !BR2_LINUX_KERNEL || !BR2_LARGEFILE diff --git a/package/perf/perf.mk b/package/perf/perf.mk new file mode 100644 index 0000000000..d7898d0bc3 --- /dev/null +++ b/package/perf/perf.mk @@ -0,0 +1,56 @@ +################################################################################ +# +# perf +# +################################################################################ + +# Source taken from the Linux kernel tree +PERF_SOURCE = +PERF_VERSION = $(call qstrip,$(BR2_LINUX_KERNEL_VERSION)) + +PERF_DEPENDENCIES = linux host-flex host-bison + +PERF_MAKE_FLAGS = \ + $(LINUX_MAKE_FLAGS) \ + NO_LIBAUDIT=1 \ + NO_NEWT=1 \ + NO_GTK2=1 \ + NO_LIBPERL=1 \ + NO_LIBPYTHON=1 \ + DESTDIR=$(TARGET_DIR) \ + prefix=/usr \ + WERROR=0 \ + ASCIIDOC= + +ifeq ($(BR2_PACKAGE_ELFUTILS),y) + PERF_DEPENDENCIES += elfutils +else + PERF_MAKE_FLAGS += NO_LIBELF=1 NO_DWARF=1 +endif + +define PERF_BUILD_CMDS + $(Q)if test ! -f $(LINUX_DIR)/tools/perf/Makefile ; then \ + echo "Your kernel version is too old and does not have the perf tool." ; \ + echo "At least kernel 2.6.31 must be used." ; \ + exit 1 ; \ + fi + $(Q)if test "$(BR2_PACKAGE_ELFUTILS)" = "" ; then \ + if ! grep -q NO_LIBELF $(LINUX_DIR)/tools/perf/Makefile ; then \ + echo "The perf tool in your kernel cannot be built without libelf." ; \ + echo "Either upgrade your kernel to >= 3.7, or enable the elfutils package." ; \ + exit 1 ; \ + fi \ + fi + $(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools/perf \ + $(PERF_MAKE_FLAGS) O=$(@D) +endef + +# After installation, we remove the Perl and Python scripts from the +# target. +define PERF_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools/perf \ + $(PERF_MAKE_FLAGS) O=$(@D) install + $(RM) -rf $(TARGET_DIR)/usr/libexec/perf-core/scripts/ +endef + +$(eval $(generic-package)) diff --git a/package/perl/Config.in b/package/perl/Config.in new file mode 100644 index 0000000000..b2991b0c66 --- /dev/null +++ b/package/perl/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_PERL + bool "perl" + help + Larry Wall's Practical Extraction and Report Language + An interpreted scripting language, known among some as "Unix's Swiss + Army Chainsaw". + + http://www.perl.org/ + +if BR2_PACKAGE_PERL + +config BR2_PACKAGE_PERL_MODULES + string "custom module selection" + help + List of space-separated perl modules (without .pm) to copy to the + rootfs. + + Examples: constant Getopt/Std Time/Local + + Module dependencies on external libraries are not automatic so + check your needs. + + Leave empty for all modules (as far as the external libraries + are available). + +endif diff --git a/package/perl/perl-fix-Module-Build.patch b/package/perl/perl-fix-Module-Build.patch new file mode 100644 index 0000000000..9101c11495 --- /dev/null +++ b/package/perl/perl-fix-Module-Build.patch @@ -0,0 +1,16 @@ + +Signed-off-by: Francois Perrad + +Index: b/cpan/Module-Build/lib/Module/Build/Base.pm +=================================================================== +--- a/cpan/Module-Build/lib/Module/Build/Base.pm ++++ b/cpan/Module-Build/lib/Module/Build/Base.pm +@@ -460,7 +460,7 @@ + my $proto = shift; + my $c = ref($proto) ? $proto->{config} : 'Module::Build::Config'; + +- my $perl = $^X; ++ my $perl = $ENV{RUN_PERL} || $^X; + my $perl_basename = File::Basename::basename($perl); + + my @potential_perls; diff --git a/package/perl/perl-uClibc-IPv6.patch b/package/perl/perl-uClibc-IPv6.patch new file mode 100644 index 0000000000..8ace75e069 --- /dev/null +++ b/package/perl/perl-uClibc-IPv6.patch @@ -0,0 +1,61 @@ +fix on uClibc without IPv6 support + +Signed-off-by: Francois Perrad + +Index: b/cpan/Socket/Socket.xs +=================================================================== +--- a/cpan/Socket/Socket.xs ++++ b/cpan/Socket/Socket.xs +@@ -896,7 +896,7 @@ + CODE: + #ifdef HAS_INETNTOP + STRLEN addrlen; +-#ifdef AF_INET6 ++#if (defined(__UCLIBC__) && defined(__UCLIBC_HAS_IPV6__)) || (!defined(__UCLIBC__) && defined(AF_INET6)) + struct in6_addr addr; + char str[INET6_ADDRSTRLEN]; + #else +@@ -916,7 +916,7 @@ + croak("Bad address length for Socket::inet_ntop on AF_INET;" + " got %"UVuf", should be 4", (UV)addrlen); + break; +-#ifdef AF_INET6 ++#if (defined(__UCLIBC__) && defined(__UCLIBC_HAS_IPV6__)) || (!defined(__UCLIBC__) && defined(AF_INET6)) + case AF_INET6: + if(addrlen != 16) + croak("Bad address length for Socket::inet_ntop on AF_INET6;" +@@ -925,7 +925,7 @@ + #endif + default: + croak("Bad address family for %s, got %d, should be" +-#ifdef AF_INET6 ++#if (defined(__UCLIBC__) && defined(__UCLIBC_HAS_IPV6__)) || (!defined(__UCLIBC__) && defined(AF_INET6)) + " either AF_INET or AF_INET6", + #else + " AF_INET", +@@ -955,7 +955,7 @@ + #ifdef HAS_INETPTON + int ok; + int addrlen = 0; +-#ifdef AF_INET6 ++#if (defined(__UCLIBC__) && defined(__UCLIBC_HAS_IPV6__)) || (!defined(__UCLIBC__) && defined(AF_INET6)) + struct in6_addr ip_address; + #else + struct in_addr ip_address; +@@ -965,14 +965,14 @@ + case AF_INET: + addrlen = 4; + break; +-#ifdef AF_INET6 ++#if (defined(__UCLIBC__) && defined(__UCLIBC_HAS_IPV6__)) || (!defined(__UCLIBC__) && defined(AF_INET6)) + case AF_INET6: + addrlen = 16; + break; + #endif + default: + croak("Bad address family for %s, got %d, should be" +-#ifdef AF_INET6 ++#if (defined(__UCLIBC__) && defined(__UCLIBC_HAS_IPV6__)) || (!defined(__UCLIBC__) && defined(AF_INET6)) + " either AF_INET or AF_INET6", + #else + " AF_INET", diff --git a/package/perl/perl.mk b/package/perl/perl.mk new file mode 100644 index 0000000000..8fb4fdcee9 --- /dev/null +++ b/package/perl/perl.mk @@ -0,0 +1,109 @@ +################################################################################ +# +# perl +# +################################################################################ + +PERL_VERSION_MAJOR = 18 +PERL_VERSION = 5.$(PERL_VERSION_MAJOR).1 +PERL_SITE = http://www.cpan.org/src/5.0 +PERL_SOURCE = perl-$(PERL_VERSION).tar.bz2 +PERL_LICENSE = Artistic or GPLv1+ +PERL_LICENSE_FILES = Artistic Copying README +PERL_INSTALL_STAGING = YES + +PERL_CROSS_VERSION = 0.8.3 +PERL_CROSS_BASE_VERSION = 5.$(PERL_VERSION_MAJOR).1 +PERL_CROSS_SITE = http://download.berlios.de/perlcross +PERL_CROSS_SOURCE = perl-$(PERL_CROSS_BASE_VERSION)-cross-$(PERL_CROSS_VERSION).tar.gz +PERL_CROSS_OLD_POD = perl$(subst .,,$(PERL_CROSS_BASE_VERSION))delta.pod +PERL_CROSS_NEW_POD = perl$(subst .,,$(PERL_VERSION))delta.pod + +# We use the perlcross hack to cross-compile perl. It should +# be extracted over the perl sources, so we don't define that +# as a separate package. Instead, it is downloaded and extracted +# together with perl + +define PERL_CROSS_DOWNLOAD + $(call DOWNLOAD,$(PERL_CROSS_SITE:/=)/$(PERL_CROSS_SOURCE)) +endef +PERL_POST_DOWNLOAD_HOOKS += PERL_CROSS_DOWNLOAD + +define PERL_CROSS_EXTRACT + $(call suitable-extractor,$(PERL_CROSS_SOURCE)) $(DL_DIR)/$(PERL_CROSS_SOURCE) | \ + $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) - +endef +PERL_POST_EXTRACT_HOOKS += PERL_CROSS_EXTRACT + +define PERL_CROSS_SET_POD + $(SED) s/$(PERL_CROSS_OLD_POD)/$(PERL_CROSS_NEW_POD)/g $(@D)/Makefile +endef +PERL_POST_PATCH_HOOKS += PERL_CROSS_SET_POD + +ifeq ($(BR2_PACKAGE_BERKELEYDB),y) + PERL_DEPENDENCIES += berkeleydb +endif +ifeq ($(BR2_PACKAGE_GDBM),y) + PERL_DEPENDENCIES += gdbm +endif + +# We have to override LD, because an external multilib toolchain ld is not +# wrapped to provide the required sysroot options. We also can't use ccache +# because the configure script doesn't support it. +PERL_CONF_OPT = \ + --target=$(GNU_TARGET_NAME) \ + --target-tools-prefix=$(TARGET_CROSS) \ + --prefix=/usr \ + -Dld="$(TARGET_CC_NOCCACHE)" \ + -Dccflags="$(TARGET_CFLAGS)" \ + -Dldflags="$(TARGET_LDFLAGS) -lm" \ + -Dmydomain="" \ + -Dmyhostname="$(BR2_TARGET_GENERIC_HOSTNAME)" \ + -Dmyuname="Buildroot $(BR2_VERSION_FULL)" \ + -Dosname=linux \ + -Dosvers=$(LINUX_VERSION) \ + -Dperladmin=root + +ifeq ($(shell expr $(PERL_VERSION_MAJOR) % 2), 1) + PERL_CONF_OPT += -Dusedevel +endif + +ifneq ($(BR2_LARGEFILE),y) + PERL_CONF_OPT += -Uuselargefiles +endif + +PERL_MODULES = $(call qstrip,$(BR2_PACKAGE_PERL_MODULES)) +ifneq ($(PERL_MODULES),) +PERL_CONF_OPT += --only-mod=$(subst $(space),$(comma),$(PERL_MODULES)) +endif + +define PERL_CONFIGURE_CMDS + (cd $(@D); HOSTCC='$(HOSTCC_NOCACHE)' ./configure $(PERL_CONF_OPT)) + $(SED) 's/UNKNOWN-/Buildroot $(BR2_VERSION_FULL) /' $(@D)/patchlevel.h +endef + +# perlcross's miniperl_top forgets base, which is required by mktables. +# Instead of patching, it's easier to just set PERL5LIB +define PERL_BUILD_CMDS + PERL5LIB=$(@D)/dist/base/lib $(MAKE1) -C $(@D) perl modules +endef + +define PERL_INSTALL_STAGING_CMDS + PERL5LIB=$(@D)/dist/base/lib $(MAKE1) -C $(@D) DESTDIR="$(STAGING_DIR)" install.perl +endef + +PERL_INSTALL_TARGET_GOALS = install.perl +ifeq ($(BR2_HAVE_DOCUMENTATION),y) +PERL_INSTALL_TARGET_GOALS += install.man +endif + + +define PERL_INSTALL_TARGET_CMDS + PERL5LIB=$(@D)/dist/base/lib $(MAKE1) -C $(@D) DESTDIR="$(TARGET_DIR)" $(PERL_INSTALL_TARGET_GOALS) +endef + +define PERL_CLEAN_CMDS + -$(MAKE1) -C $(@D) clean +endef + +$(eval $(generic-package)) diff --git a/package/php/Config.ext b/package/php/Config.ext index 4f1614e1d2..23d23064bc 100644 --- a/package/php/Config.ext +++ b/package/php/Config.ext @@ -1,28 +1,21 @@ -menu "PHP Extensions" +menu "Extensions" -config BR2_PACKAGE_PHP_CONFIG - string "PHP configuration file to use" - default "$(PHP_DIR)/php.ini-dist" - help - If you want to use a different php.ini file define it here. - Otherwise it'll just copy the default php.ini-dist from PHP. - -config BR2_PACKAGE_PHP_EXT_SOCKETS - bool "socket" +config BR2_PACKAGE_PHP_EXT_CALENDAR + bool "Calendar" help - Sockets support + Calendar and event support -config BR2_PACKAGE_PHP_EXT_POSIX - bool "posix" - default y +config BR2_PACKAGE_PHP_EXT_FILEINFO + bool "Fileinfo" help - POSIX support + File Information support -config BR2_PACKAGE_PHP_EXT_SPL - bool "SPL" - default y +config BR2_PACKAGE_PHP_EXT_READLINE + bool "Readline" + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_READLINE help - Standard PHP library support + Readline support config BR2_PACKAGE_PHP_EXT_SESSION bool "Session" @@ -30,155 +23,331 @@ config BR2_PACKAGE_PHP_EXT_SESSION help Session support +comment "Compression extensions" + +config BR2_PACKAGE_PHP_EXT_BZIP2 + bool "bzip2" + select BR2_PACKAGE_BZIP2 + help + bzip2 read/write support + +config BR2_PACKAGE_PHP_EXT_ZIP + bool "zip" + select BR2_PACKAGE_ZLIB + help + Zip read/write support + +config BR2_PACKAGE_PHP_EXT_ZLIB + bool "zlib" + select BR2_PACKAGE_ZLIB + default y + help + zlib support + +comment "Cryptography extensions" + +config BR2_PACKAGE_PHP_EXT_HASH + bool "hash" + help + HASH message digest framework + config BR2_PACKAGE_PHP_EXT_OPENSSL bool "openssl" select BR2_PACKAGE_OPENSSL help openssl support -config BR2_PACKAGE_PHP_EXT_LIBXML2 - bool "xml2" - select BR2_PACKAGE_LIBXML2 +comment "Database extensions" + +config BR2_PACKAGE_PHP_EXT_DBA + bool "DBA" help - libxml2 support + Database Abstraction Layer -config BR2_PACKAGE_PHP_EXT_SIMPLEXML - bool "simplexml" - select BR2_PACKAGE_PHP_EXT_LIBXML2 +if BR2_PACKAGE_PHP_EXT_DBA + +config BR2_PACKAGE_PHP_EXT_DBA_CDB + bool "cdb" help - SimpleXML support + CDB handler -config BR2_PACKAGE_PHP_EXT_ZLIB - bool "zlib" - select BR2_PACKAGE_ZLIB - default y - help - zlib support +config BR2_PACKAGE_PHP_EXT_DBA_DB4 + bool "db4/5" + select BR2_PACKAGE_BERKELEYDB + help + BerkeleyDB version 4/5 handler -config BR2_PACKAGE_PHP_EXT_EXIF - bool "EXIF" +config BR2_PACKAGE_PHP_EXT_DBA_FLAT + bool "flat" + default y help - EXIF support + Flat file handler -config BR2_PACKAGE_PHP_EXT_FTP - bool "FTP" +config BR2_PACKAGE_PHP_EXT_DBA_INI + bool "ini" + default y + help + INI file handler + +endif + +config BR2_PACKAGE_PHP_EXT_SQLITE + bool "SQLite" + help + Legacy SQLite2 support + +config BR2_PACKAGE_PHP_EXT_SQLITE_UTF8 + bool "sqlite UTF8 support" + depends on BR2_PACKAGE_PHP_EXT_SQLITE + help + UTF8 support for sqlite + +config BR2_PACKAGE_PHP_EXT_MYSQL + bool "Mysql" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # mysql + depends on BR2_TOOLCHAIN_HAS_THREADS # mysql + select BR2_PACKAGE_MYSQL_CLIENT + help + MySQL support + +config BR2_PACKAGE_PHP_EXT_MYSQLI + bool "Mysqli" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # mysql + depends on BR2_TOOLCHAIN_HAS_THREADS # mysql + select BR2_PACKAGE_MYSQL_CLIENT + select BR2_PACKAGE_PHP_EXT_MYSQL + help + MySQL Improved extension support + +config BR2_PACKAGE_PHP_EXT_PDO + bool "PDO" + help + PHP Data Objects support + +if BR2_PACKAGE_PHP_EXT_PDO + +config BR2_PACKAGE_PHP_EXT_PDO_MYSQL + bool "MySQL" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # mysql + depends on BR2_TOOLCHAIN_HAS_THREADS # mysql + select BR2_PACKAGE_MYSQL_CLIENT + help + PDO driver for MySQL + +comment "MySQL drivers need a toolchain w/ C++" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_PHP_EXT_PDO_SQLITE + bool "SQLite3" + select BR2_PACKAGE_SQLITE help - FTP Support + SQLite3 driver for PDO + +endif + +comment "Human language and character encoding support" config BR2_PACKAGE_PHP_EXT_GETTEXT - bool "gettext" + bool "Gettext" select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT depends on BR2_USE_WCHAR help - gettext support + Gettext support -comment "gettext support requires a toolchain with WCHAR support" +comment "Gettext support needs a toolchain w/ wchar" depends on !BR2_USE_WCHAR +config BR2_PACKAGE_PHP_EXT_ICONV + bool "iconv" + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + iconv character set conversion support + +config BR2_PACKAGE_PHP_EXT_INTL + bool "intl" + select BR2_PACKAGE_ICU + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on !BR2_arc # icu -> atomic builtins + help + Internationalization support + +comment "intl support needs a toolchain w/ C++, wchar" + depends on !BR2_arc + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR + +comment "Image processing" + +config BR2_PACKAGE_PHP_EXT_EXIF + bool "EXIF" + help + EXIF support + +comment "Mathematical extensions" + +config BR2_PACKAGE_PHP_EXT_BCMATH + bool "BC math" + help + BCMath arbitrary precision mathematics support + config BR2_PACKAGE_PHP_EXT_GMP - bool "gmp" + bool "GMP" select BR2_PACKAGE_GMP help - GMP support + GNU Multiple Precision support + +comment "Other basic extensions" config BR2_PACKAGE_PHP_EXT_JSON bool "JSON" help JavaScript Object Serialization support -config BR2_PACKAGE_PHP_EXT_READLINE - bool "readline" - depends on (BR2_PACKAGE_PHP_CLI || BR2_PACKAGE_PHP_CGI) && BR2_PACKAGE_READLINE +config BR2_PACKAGE_PHP_EXT_TOKENIZER + bool "Tokenizer" help - readline support + Tokenizer functions support -config BR2_PACKAGE_PHP_EXT_NCURSES - bool "ncurses" - depends on (BR2_PACKAGE_PHP_CLI || BR2_PACKAGE_PHP_CGI) && BR2_PACKAGE_NCURSES +comment "Other services" + +config BR2_PACKAGE_PHP_EXT_CURL + bool "cURL" + select BR2_PACKAGE_LIBCURL + help + cURL for URL streams + +config BR2_PACKAGE_PHP_EXT_FTP + bool "FTP" help - ncurses support + FTP support -config BR2_PACKAGE_PHP_EXT_PCRE - bool "PCRE" +config BR2_PACKAGE_PHP_EXT_SNMP + bool "SNMP" + select BR2_PACKAGE_NETSNMP + select BR2_PACKAGE_NETSNMP_ENABLE_MIBS help - Perl Compatible Regular Expressions support + SNMP support + +config BR2_PACKAGE_PHP_EXT_SOCKETS + bool "sockets" + help + Sockets support + +comment "Process Control" config BR2_PACKAGE_PHP_EXT_PCNTL bool "PCNTL" help - Process Control Support + Process control support + +config BR2_PACKAGE_PHP_EXT_POSIX + bool "Posix" + default y + help + POSIX.1 (IEEE 1003.1) function support + +config BR2_PACKAGE_PHP_EXT_SHMOP + bool "shmop" + help + Shared memory support config BR2_PACKAGE_PHP_EXT_SYSVMSG - bool "sysvmsg - System V Message queue" + bool "sysvmsg" help - System V Message queue support + System V message queue support config BR2_PACKAGE_PHP_EXT_SYSVSEM - bool "sysvsem - System V Semaphores" + bool "sysvsem" help - System V Sempahore support + System V semaphore support config BR2_PACKAGE_PHP_EXT_SYSVSHM - bool "sysvshm - System V Shared memory" + bool "sysvshm" help - System V Shared memory support + System V shared memory support -config BR2_PACKAGE_PHP_EXT_ZIP - bool "zip" +comment "Variable and Type related" + +config BR2_PACKAGE_PHP_EXT_CTYPE + bool "Ctype" help - Zip read/write support + Character type checking support config BR2_PACKAGE_PHP_EXT_FILTER - bool "filter" - select BR2_PACKAGE_PHP_EXT_PCRE + bool "Filter" help Input filter support -config BR2_PACKAGE_PHP_EXT_CALENDAR - bool "calendar" +comment "Web services" + +config BR2_PACKAGE_PHP_EXT_SOAP + bool "SOAP" + select BR2_PACKAGE_PHP_EXT_LIBXML2 help - Calendar and event support + SOAP support -comment "Database extensions" +config BR2_PACKAGE_PHP_EXT_XMLRPC + bool "XML-RPC" + select BR2_PACKAGE_PHP_EXT_LIBXML2 + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + XML-RPC support -config BR2_PACKAGE_PHP_EXT_SQLITE - bool "SQLite" +comment "XML manipulation" + +config BR2_PACKAGE_PHP_EXT_DOM + bool "DOM" + select BR2_PACKAGE_PHP_EXT_LIBXML2 help - Legacy SQLite2 support + Document Object Model support -config BR2_PACKAGE_PHP_EXT_SQLITE_UTF8 - bool "sqlite UTF8 support" - depends on BR2_PACKAGE_PHP_EXT_SQLITE +config BR2_PACKAGE_PHP_EXT_LIBXML2 + bool "libxml" + select BR2_PACKAGE_LIBXML2 help - UTF8 Support for sqlite + libxml2 support -config BR2_PACKAGE_PHP_EXT_PDO - bool "PDO" +config BR2_PACKAGE_PHP_EXT_SIMPLEXML + bool "SimpleXML" + select BR2_PACKAGE_PHP_EXT_LIBXML2 help - PHP Data Objects support + SimpleXML support -config BR2_PACKAGE_PHP_EXT_PDO_SQLITE - bool "PDO_SQLite" - depends on BR2_PACKAGE_PHP_EXT_PDO +config BR2_PACKAGE_PHP_EXT_WDDX + bool "WDDX" + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_PHP_EXT_LIBXML2 help - SQLite driver for PDO + WDDX support -config BR2_PACKAGE_PHP_EXT_PDO_SQLITE_EXTERNAL - bool "PDO_SQLite external" - depends on BR2_PACKAGE_PHP_EXT_PDO_SQLITE - select BR2_PACKAGE_SQLITE +config BR2_PACKAGE_PHP_EXT_XML + bool "XML Parser" + select BR2_PACKAGE_PHP_EXT_LIBXML2 help - Use external sqlite3 library + XML Parser support -config BR2_PACKAGE_PHP_EXT_PDO_MYSQL - bool "PDO_MySQL" - depends on BR2_PACKAGE_PHP_EXT_PDO - depends on BR2_INSTALL_LIBSTDCPP - select BR2_PACKAGE_MYSQL_CLIENT +config BR2_PACKAGE_PHP_EXT_XMLREADER + bool "XMLReader" + select BR2_PACKAGE_PHP_EXT_LIBXML2 help - PDO driver for MySQL + XMLReader support -comment "PDO_MySQL requires a toolchain with C++ support" - depends on !BR2_INSTALL_LIBSTDCPP && BR2_PACKAGE_PHP_EXT_PDO +config BR2_PACKAGE_PHP_EXT_XMLWRITER + bool "XMLWriter" + select BR2_PACKAGE_PHP_EXT_LIBXML2 + help + XMLWriter support + +config BR2_PACKAGE_PHP_EXT_XSL + bool "XSL" + select BR2_PACKAGE_PHP_EXT_DOM + select BR2_PACKAGE_PHP_EXT_LIBXML2 + select BR2_PACKAGE_LIBXSLT + help + XSL transformation support endmenu diff --git a/package/php/Config.in b/package/php/Config.in index 23d86e48e7..46444a5600 100644 --- a/package/php/Config.in +++ b/package/php/Config.in @@ -9,45 +9,43 @@ config BR2_PACKAGE_PHP if BR2_PACKAGE_PHP +source "package/php/Config.ext" + config BR2_PACKAGE_PHP_CLI - bool + bool config BR2_PACKAGE_PHP_CGI - bool + bool choice - prompt "PHP interface" - default BR2_PACKAGE_PHP_SAPI_CGI - help - Select the PHP interface(s). + prompt "Interface" + default BR2_PACKAGE_PHP_SAPI_CGI + help + Select the PHP interface(s). + +config BR2_PACKAGE_PHP_SAPI_CGI + bool "CGI" + # CGI uses fork() + depends on BR2_USE_MMU + select BR2_PACKAGE_PHP_CGI + help + Common Gateway Interface config BR2_PACKAGE_PHP_SAPI_CLI - bool "cli interface" + bool "CLI" select BR2_PACKAGE_PHP_CLI - help - Command line interface for PHP. - -config BR2_PACKAGE_PHP_SAPI_CGI - bool "cgi interface" - select BR2_PACKAGE_PHP_CGI - help - CGI interface for PHP. + help + Command Line Interface config BR2_PACKAGE_PHP_SAPI_CLI_CGI - bool "cli and cgi interfaces" + bool "CGI and CLI" + # CGI uses fork() + depends on BR2_USE_MMU select BR2_PACKAGE_PHP_CLI select BR2_PACKAGE_PHP_CGI help - Command line and CGI interfaces for PHP. + Command line and Common gateway interfaces endchoice -config BR2_PACKAGE_PHP_FASTCGI - bool "fastcgi" - depends on BR2_PACKAGE_PHP_CGI - default y - help - fast cgi interface for php - -source "package/php/Config.ext" endif diff --git a/package/php/php-01-no-iconv-search.patch b/package/php/php-01-no-iconv-search.patch new file mode 100644 index 0000000000..d2a7ae3a13 --- /dev/null +++ b/package/php/php-01-no-iconv-search.patch @@ -0,0 +1,32 @@ +Just assume ICONV_DIR is fine since we pass the correct parameters +to configure. +Otherwise configure will try to guess on absolute directories and +sometimes messes up on some weird edge conditions. + +Signed-off-by: Gustavo Zacarias + +diff -Nura php-5.3.27.orig/configure php-5.3.27/configure +--- php-5.3.27.orig/configure 2013-11-26 09:33:30.874253800 -0300 ++++ php-5.3.27/configure 2013-11-26 09:41:41.495363637 -0300 +@@ -48212,20 +48212,7 @@ + + + if test "$iconv_avail" != "no"; then +- if test -z "$ICONV_DIR"; then +- for i in /usr/local /usr; do +- if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then +- PHP_ICONV_PREFIX="$i" +- break +- fi +- done +- if test -z "$PHP_ICONV_PREFIX"; then +- PHP_ICONV_PREFIX="/usr" +- fi +- else +- PHP_ICONV_PREFIX="$ICONV_DIR" +- fi +- ++ PHP_ICONV_PREFIX="$ICONV_DIR" + CFLAGS="-I$PHP_ICONV_PREFIX/include $CFLAGS" + LDFLAGS="-L$PHP_ICONV_PREFIX/$PHP_LIBDIR $LDFLAGS" + diff --git a/package/php/php-5.2.16-fix-build-when-__GMP_BITS_PER_MP_LIMB-is-not-defined.patch b/package/php/php-5.2.16-fix-build-when-__GMP_BITS_PER_MP_LIMB-is-not-defined.patch deleted file mode 100644 index 221b3c00e5..0000000000 --- a/package/php/php-5.2.16-fix-build-when-__GMP_BITS_PER_MP_LIMB-is-not-defined.patch +++ /dev/null @@ -1,30 +0,0 @@ -From e814fcac0599dbaae50ede1f9f78e20941e27877 Mon Sep 17 00:00:00 2001 -From: pajoye -Date: Tue, 23 Feb 2010 11:07:39 +0000 -Subject: [PATCH] - fix build when __GMP_BITS_PER_MP_LIMB is not defined but GMP_LIMB_BITS (no trace of this change in gmp's changelog...) - -git-svn-id: http://svn.php.net/repository/php/php-src/branches/PHP_5_3@295402 c90b9560-bf6c-de11-be94-00142212c4b1 ---- - ext/gmp/gmp.c | 5 ++++- - 1 files changed, 4 insertions(+), 1 deletions(-) - -diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c -index a54ffe9..f53dcd6 100644 ---- a/ext/gmp/gmp.c -+++ b/ext/gmp/gmp.c -@@ -1374,8 +1374,11 @@ ZEND_FUNCTION(gmp_random) - - GMPG(rand_initialized) = 1; - } -+#ifdef GMP_LIMB_BITS -+ mpz_urandomb(*gmpnum_result, GMPG(rand_state), GMP_ABS (limiter) * GMP_LIMB_BITS); -+#else - mpz_urandomb(*gmpnum_result, GMPG(rand_state), GMP_ABS (limiter) * __GMP_BITS_PER_MP_LIMB); -- -+#endif - ZEND_REGISTER_RESOURCE(return_value, gmpnum_result, le_gmp); - } - /* }}} */ --- -1.7.1 - diff --git a/package/php/php.mk b/package/php/php.mk index ad0ae43c18..e310bd6052 100644 --- a/package/php/php.mk +++ b/package/php/php.mk @@ -1,56 +1,69 @@ -############################################################# +################################################################################ # # php # -############################################################# +################################################################################ -PHP_VERSION = 5.2.17 -PHP_SOURCE = php-$(PHP_VERSION).tar.bz2 +PHP_VERSION = 5.3.27 +PHP_SOURCE = php-$(PHP_VERSION).tar.xz PHP_SITE = http://www.php.net/distributions PHP_INSTALL_STAGING = YES PHP_INSTALL_STAGING_OPT = INSTALL_ROOT=$(STAGING_DIR) install PHP_INSTALL_TARGET_OPT = INSTALL_ROOT=$(TARGET_DIR) install -PHP_LIBTOOL_PATCH = NO +PHP_LICENSE = PHP +PHP_LICENSE_FILES = LICENSE PHP_CONF_OPT = --mandir=/usr/share/man \ --infodir=/usr/share/info \ --disable-all \ --without-pear \ --with-config-file-path=/etc \ --localstatedir=/var \ - -PHP_CFLAGS = $(TARGET_CFLAGS) - -ifneq ($(BR2_PACKAGE_PHP_CLI),y) - PHP_CONF_OPT += --disable-cli + --disable-rpath +ifeq ($(BR2_ENDIAN),"BIG") +PHP_CONF_ENV = ac_cv_c_bigendian_php=yes else - PHP_CONF_OPT += --enable-cli +PHP_CONF_ENV = ac_cv_c_bigendian_php=no endif +PHP_CONFIG_SCRIPTS = php-config -ifneq ($(BR2_PACKAGE_PHP_CGI),y) - PHP_CONF_OPT += --disable-cgi -else - PHP_CONF_OPT += --enable-cgi - ifeq ($(BR2_PACKAGE_PHP_FASTCGI),y) - PHP_CONF_OPT += --enable-fastcgi - endif -endif +PHP_CFLAGS = $(TARGET_CFLAGS) -### Extensions -ifeq ($(BR2_PACKAGE_PHP_EXT_SOCKETS),y) - PHP_CONF_OPT += --enable-sockets +# Workaround for non-IPv6 uClibc toolchain +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +ifneq ($(BR2_INET_IPV6),y) + PHP_CFLAGS += -DHAVE_DEPRECATED_DNS_FUNCS endif - -ifeq ($(BR2_PACKAGE_PHP_EXT_POSIX),y) - PHP_CONF_OPT += --enable-posix endif -ifeq ($(BR2_PACKAGE_PHP_EXT_SPL),y) - PHP_CONF_OPT += --enable-spl -endif +PHP_CONF_OPT += $(if $(BR2_PACKAGE_PHP_CLI),,--disable-cli) +PHP_CONF_OPT += $(if $(BR2_PACKAGE_PHP_CGI),,--disable-cgi) -ifeq ($(BR2_PACKAGE_PHP_EXT_SESSION),y) - PHP_CONF_OPT += --enable-session -endif +### Extensions +PHP_CONF_OPT += $(if $(BR2_PACKAGE_PHP_EXT_SOCKETS),--enable-sockets) \ + $(if $(BR2_PACKAGE_PHP_EXT_POSIX),--enable-posix) \ + $(if $(BR2_PACKAGE_PHP_EXT_SESSION),--enable-session) \ + $(if $(BR2_PACKAGE_PHP_EXT_HASH),--enable-hash) \ + $(if $(BR2_PACKAGE_PHP_EXT_DOM),--enable-dom) \ + $(if $(BR2_PACKAGE_PHP_EXT_SIMPLEXML),--enable-simplexml) \ + $(if $(BR2_PACKAGE_PHP_EXT_SOAP),--enable-soap) \ + $(if $(BR2_PACKAGE_PHP_EXT_XML),--enable-xml) \ + $(if $(BR2_PACKAGE_PHP_EXT_XMLREADER),--enable-xmlreader) \ + $(if $(BR2_PACKAGE_PHP_EXT_XMLWRITER),--enable-xmlwriter) \ + $(if $(BR2_PACKAGE_PHP_EXT_EXIF),--enable-exif) \ + $(if $(BR2_PACKAGE_PHP_EXT_FTP),--enable-ftp) \ + $(if $(BR2_PACKAGE_PHP_EXT_JSON),--enable-json) \ + $(if $(BR2_PACKAGE_PHP_EXT_TOKENIZER),--enable-tokenizer) \ + $(if $(BR2_PACKAGE_PHP_EXT_PCNTL),--enable-pcntl) \ + $(if $(BR2_PACKAGE_PHP_EXT_SHMOP),--enable-shmop) \ + $(if $(BR2_PACKAGE_PHP_EXT_SYSVMSG),--enable-sysvmsg) \ + $(if $(BR2_PACKAGE_PHP_EXT_SYSVSEM),--enable-sysvsem) \ + $(if $(BR2_PACKAGE_PHP_EXT_SYSVSHM),--enable-sysvshm) \ + $(if $(BR2_PACKAGE_PHP_EXT_ZIP),--enable-zip) \ + $(if $(BR2_PACKAGE_PHP_EXT_CTYPE),--enable-ctype) \ + $(if $(BR2_PACKAGE_PHP_EXT_FILTER),--enable-filter) \ + $(if $(BR2_PACKAGE_PHP_EXT_CALENDAR),--enable-calendar) \ + $(if $(BR2_PACKAGE_PHP_EXT_FILEINFO),--enable-fileinfo) \ + $(if $(BR2_PACKAGE_PHP_EXT_BCMATH),--enable-bcmath) ifeq ($(BR2_PACKAGE_PHP_EXT_OPENSSL),y) PHP_CONF_OPT += --with-openssl=$(STAGING_DIR)/usr @@ -58,34 +71,48 @@ ifeq ($(BR2_PACKAGE_PHP_EXT_OPENSSL),y) endif ifeq ($(BR2_PACKAGE_PHP_EXT_LIBXML2),y) - PHP_CONF_OPT += --enable-libxml \ - --with-libxml-dir=${STAGING_DIR}/usr \ - --enable-xml \ - --enable-xmlreader \ - --enable-xmlwriter + PHP_CONF_ENV += php_cv_libxml_build_works=yes + PHP_CONF_OPT += --enable-libxml --with-libxml-dir=${STAGING_DIR}/usr PHP_DEPENDENCIES += libxml2 endif -ifeq ($(BR2_PACKAGE_PHP_EXT_SIMPLEXML),y) - PHP_CONF_OPT += --enable-simplexml +ifeq ($(BR2_PACKAGE_PHP_EXT_WDDX),y) + PHP_CONF_OPT += --enable-wddx --with-libexpat-dir=$(STAGING_DIR)/usr + PHP_DEPENDENCIES += expat +endif + +ifeq ($(BR2_PACKAGE_PHP_EXT_XMLRPC),y) + PHP_CONF_OPT += --with-xmlrpc \ + $(if $(BR2_PACKAGE_LIBICONV),--with-iconv-dir=$(STAGING_DIR)/usr) + PHP_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBICONV),libiconv) endif -ifeq ($(BR2_PACKAGE_PHP_EXT_ZLIB),y) +ifneq ($(BR2_PACKAGE_PHP_EXT_ZLIB)$(BR2_PACKAGE_PHP_EXT_ZIP),) PHP_CONF_OPT += --with-zlib=$(STAGING_DIR)/usr PHP_DEPENDENCIES += zlib endif -ifeq ($(BR2_PACKAGE_PHP_EXT_EXIF),y) - PHP_CONF_OPT += --enable-exif +ifeq ($(BR2_PACKAGE_PHP_EXT_GETTEXT),y) + PHP_CONF_OPT += --with-gettext=$(STAGING_DIR)/usr + PHP_DEPENDENCIES += $(if $(BR2_NEEDS_GETTEXT),gettext) endif -ifeq ($(BR2_PACKAGE_PHP_EXT_FTP),y) - PHP_CONF_OPT += --enable-ftp +ifeq ($(BR2_PACKAGE_PHP_EXT_ICONV),y) +ifeq ($(BR2_PACKAGE_LIBICONV),y) + PHP_CONF_OPT += --with-iconv=$(STAGING_DIR)/usr + PHP_DEPENDENCIES += libiconv +else + PHP_CONF_OPT += --with-iconv +endif endif -ifeq ($(BR2_PACKAGE_PHP_EXT_GETTEXT),y) - PHP_CONF_OPT += --with-gettext=$(STAGING_DIR)/usr - PHP_DEPENDENCIES += $(if $(BR2_NEEDS_GETTEXT),gettext) +ifeq ($(BR2_PACKAGE_PHP_EXT_INTL),y) + PHP_CONF_OPT += --enable-intl --with-icu-dir=$(STAGING_DIR)/usr + PHP_DEPENDENCIES += icu + # The intl module is implemented in C++, but PHP fails to use + # g++ as the compiler for the final link. As a workaround, + # tell it to link libstdc++. + PHP_CONF_ENV += EXTRA_LIBS="-lstdc++" endif ifeq ($(BR2_PACKAGE_PHP_EXT_GMP),y) @@ -93,52 +120,11 @@ ifeq ($(BR2_PACKAGE_PHP_EXT_GMP),y) PHP_DEPENDENCIES += gmp endif -ifeq ($(BR2_PACKAGE_PHP_EXT_JSON),y) - PHP_CONF_OPT += --enable-json -endif - ifeq ($(BR2_PACKAGE_PHP_EXT_READLINE),y) PHP_CONF_OPT += --with-readline=$(STAGING_DIR)/usr PHP_DEPENDENCIES += readline endif -ifeq ($(BR2_PACKAGE_PHP_EXT_NCURSES),y) - PHP_CONF_OPT += --with-ncurses=$(STAGING_DIR)/usr - PHP_DEPENDENCIES += ncurses -endif - -ifeq ($(BR2_PACKAGE_PHP_EXT_PCNTL),y) - PHP_CONF_OPT += --enable-pcntl -endif - -ifeq ($(BR2_PACKAGE_PHP_EXT_SYSVMSG),y) - PHP_CONF_OPT += --enable-sysvmsg -endif - -ifeq ($(BR2_PACKAGE_PHP_EXT_SYSVSEM),y) - PHP_CONF_OPT += --enable-sysvsem -endif - -ifeq ($(BR2_PACKAGE_PHP_EXT_SYSVSHM),y) - PHP_CONF_OPT += --enable-sysvshm -endif - -ifeq ($(BR2_PACKAGE_PHP_EXT_ZIP),y) - PHP_CONF_OPT += --enable-zip -endif - -ifeq ($(BR2_PACKAGE_PHP_EXT_FILTER),y) - PHP_CONF_OPT += --enable-filter -endif - -ifeq ($(BR2_PACKAGE_PHP_EXT_CALENDAR),y) - PHP_CONF_OPT += --enable-calendar -endif - -ifeq ($(BR2_PACKAGE_PHP_EXT_PCRE),y) - PHP_CONF_OPT += --with-pcre-regex -endif - ### Legacy sqlite2 support ifeq ($(BR2_PACKAGE_PHP_EXT_SQLITE),y) PHP_CONF_OPT += --with-sqlite @@ -150,16 +136,22 @@ ifeq ($(BR2_PACKAGE_PHP_EXT_SQLITE_UTF8),y) endif endif +### Native MySQL extensions +ifeq ($(BR2_PACKAGE_PHP_EXT_MYSQL),y) + PHP_CONF_OPT += --with-mysql=$(STAGING_DIR)/usr + PHP_DEPENDENCIES += mysql_client +endif +ifeq ($(BR2_PACKAGE_PHP_EXT_MYSQLI),y) + PHP_CONF_OPT += --with-mysqli=$(STAGING_DIR)/usr/bin/mysql_config + PHP_DEPENDENCIES += mysql_client +endif + ### PDO ifeq ($(BR2_PACKAGE_PHP_EXT_PDO),y) PHP_CONF_OPT += --enable-pdo ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_SQLITE),y) -ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_SQLITE_EXTERNAL),y) PHP_CONF_OPT += --with-pdo-sqlite=$(STAGING_DIR)/usr PHP_DEPENDENCIES += sqlite -else - PHP_CONF_OPT += --with-pdo-sqlite -endif PHP_CFLAGS += -DSQLITE_OMIT_LOAD_EXTENSION ifneq ($(BR2_LARGEFILE),y) PHP_CFLAGS += -DSQLITE_DISABLE_LFS @@ -171,12 +163,57 @@ ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_MYSQL),y) endif endif +### Use external PCRE if it's available +ifeq ($(BR2_PACKAGE_PCRE),y) + PHP_CONF_OPT += --with-pcre-regex=$(STAGING_DIR)/usr + PHP_DEPENDENCIES += pcre +endif + +ifeq ($(BR2_PACKAGE_PHP_EXT_CURL),y) + PHP_CONF_OPT += --with-curl=$(STAGING_DIR)/usr + PHP_DEPENDENCIES += libcurl +endif + +ifeq ($(BR2_PACKAGE_PHP_EXT_XSL),y) + PHP_CONF_OPT += --with-xsl=$(STAGING_DIR)/usr + PHP_DEPENDENCIES += libxslt +endif + +ifeq ($(BR2_PACKAGE_PHP_EXT_BZIP2),y) + PHP_CONF_OPT += --with-bz2=$(STAGING_DIR)/usr + PHP_DEPENDENCIES += bzip2 +endif + +### DBA +ifeq ($(BR2_PACKAGE_PHP_EXT_DBA),y) + PHP_CONF_OPT += --enable-dba +ifneq ($(BR2_PACKAGE_PHP_EXT_DBA_CDB),y) + PHP_CONF_OPT += --without-cdb +endif +ifneq ($(BR2_PACKAGE_PHP_EXT_DBA_FLAT),y) + PHP_CONF_OPT += --without-flatfile +endif +ifneq ($(BR2_PACKAGE_PHP_EXT_DBA_INI),y) + PHP_CONF_OPT += --without-inifile +endif +ifeq ($(BR2_PACKAGE_PHP_EXT_DBA_DB4),y) + PHP_CONF_OPT += --with-db4=$(STAGING_DIR)/usr + PHP_DEPENDENCIES += berkeleydb +endif +endif + +ifeq ($(BR2_PACKAGE_PHP_EXT_SNMP),y) + PHP_CONF_OPT += --with-snmp=$(STAGING_DIR)/usr + PHP_DEPENDENCIES += netsnmp +endif + define PHP_INSTALL_FIXUP rm -rf $(TARGET_DIR)/usr/lib/php rm -f $(TARGET_DIR)/usr/bin/phpize - rm -f $(TARGET_DIR)/usr/bin/php-config if [ ! -f $(TARGET_DIR)/etc/php.ini ]; then \ - $(INSTALL) -m 0755 $(BR2_PACKAGE_PHP_CONFIG) $(TARGET_DIR)/etc/php.ini; fi + $(INSTALL) -m 0755 $(PHP_DIR)/php.ini-production \ + $(TARGET_DIR)/etc/php.ini; \ + fi endef PHP_POST_INSTALL_TARGET_HOOKS += PHP_INSTALL_FIXUP @@ -195,4 +232,4 @@ endef PHP_CONF_ENV += CFLAGS="$(PHP_CFLAGS)" -$(eval $(call AUTOTARGETS,package,php)) +$(eval $(autotools-package)) diff --git a/package/picocom/Config.in b/package/picocom/Config.in new file mode 100644 index 0000000000..bd584e20e0 --- /dev/null +++ b/package/picocom/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PICOCOM + bool "picocom" + help + picocom is a minimal dumb-terminal emulation program. It + is, in principle, very much like minicom, only it's pico + instead of mini! + + http://code.google.com/p/picocom/ diff --git a/package/picocom/picocom.mk b/package/picocom/picocom.mk new file mode 100644 index 0000000000..f6c423a207 --- /dev/null +++ b/package/picocom/picocom.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# picocom +# +################################################################################ + +PICOCOM_VERSION = 1.7 +PICOCOM_SITE = http://picocom.googlecode.com/files/ +PICOCOM_LICENSE = GPLv2+ +PICOCOM_LICENSE_FILES = LICENSE.txt + +define PICOCOM_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define PICOCOM_INSTALL_TARGET_CMDS + install -D -m 0755 $(@D)/picocom $(TARGET_DIR)/usr/bin/picocom +endef + +$(eval $(generic-package)) diff --git a/package/pixman/pixman-0.10.0-no-tests.patch b/package/pixman/pixman-0.10.0-no-tests.patch deleted file mode 100644 index fbd0d26892..0000000000 --- a/package/pixman/pixman-0.10.0-no-tests.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile.in.orig 2008-05-23 14:04:37.000000000 +0000 -+++ b/Makefile.in 2008-05-23 14:04:50.000000000 +0000 -@@ -198,7 +198,7 @@ sysconfdir = @sysconfdir@ - target_alias = @target_alias@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ --SUBDIRS = pixman test -+SUBDIRS = pixman - pkgconfigdir = $(libdir)/pkgconfig - pkgconfig_DATA = pixman-1.pc - USERNAME = $$USER diff --git a/package/pixman/pixman-loongson-cflags.patch b/package/pixman/pixman-loongson-cflags.patch new file mode 100644 index 0000000000..fc53be234e --- /dev/null +++ b/package/pixman/pixman-loongson-cflags.patch @@ -0,0 +1,38 @@ +configure.ac: Verify that the Loongson MMI code can link + +The Loongson MMI code modifies -march and as a result it breaks linking +when the rest of the code is built with a different -match/-mtune. +This patch fixes the problem by trying to link the code instead of just +compiling it. This patch is already committed upstream. + +Signed-off-by: Markos Chandras + +From d77d75cc6e5de14d027d22b70389a4d0c71048b9 Mon Sep 17 00:00:00 2001 +From: Markos Chandras +Date: Wed, 15 May 2013 16:51:20 +0000 +Subject: Use AC_LINK_IFELSE to check if the Loongson MMI code can link + +The Loongson code is compiled with -march=loongson2f to enable the MMI +instructions, but binutils refuses to link object code compiled with +different -march settings, leading to link failures later in the +compile. This avoids that problem by checking if we can link code +compiled for Loongson. + +Reviewed-by: Matt Turner +Signed-off-by: Markos Chandras +--- +diff --git a/configure.ac b/configure.ac +index c43a0d2..221179f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -279,7 +279,7 @@ AC_MSG_CHECKING(whether to use Loongson MMI assembler) + + xserver_save_CFLAGS=$CFLAGS + CFLAGS=" $LS_CFLAGS $CFLAGS -I$srcdir" +-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ ++AC_LINK_IFELSE([AC_LANG_SOURCE([[ + #ifndef __mips_loongson_vector_rev + #error "Loongson Multimedia Instructions are only available on Loongson" + #endif +-- +cgit v0.9.0.2-2-gbebe diff --git a/package/pixman/pixman.mk b/package/pixman/pixman.mk index 8c7a2334b0..4f70ce5e6b 100644 --- a/package/pixman/pixman.mk +++ b/package/pixman/pixman.mk @@ -3,11 +3,24 @@ # pixman # ################################################################################ -PIXMAN_VERSION = 0.17.6 -PIXMAN_SOURCE = pixman-$(PIXMAN_VERSION).tar.gz -PIXMAN_SITE = http://cairographics.org/releases/ -PIXMAN_AUTORECONF = NO + +PIXMAN_VERSION = 0.30.0 +PIXMAN_SITE = http://xorg.freedesktop.org/releases/individual/lib +PIXMAN_LICENSE = MIT +PIXMAN_LICENSE_FILES = COPYING + PIXMAN_INSTALL_STAGING = YES +PIXMAN_DEPENDENCIES = host-pkgconf +PIXMAN_AUTORECONF = YES + +# don't build gtk based demos +PIXMAN_CONF_OPT = --disable-gtk + +# disable iwmmxt support for CPU's that don't have +# this feature +ifneq ($(BR2_iwmmxt),y) +PIXMAN_CONF_OPT += --disable-arm-iwmmxt +endif -$(eval $(call AUTOTARGETS,package,pixman)) -$(eval $(call AUTOTARGETS,package,pixman,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk new file mode 100644 index 0000000000..9523529824 --- /dev/null +++ b/package/pkg-autotools.mk @@ -0,0 +1,315 @@ +################################################################################ +# Autotools package infrastructure +# +# This file implements an infrastructure that eases development of +# package .mk files for autotools packages. It should be used for all +# packages that use the autotools as their build system. +# +# See the Buildroot documentation for details on the usage of this +# infrastructure +# +# In terms of implementation, this autotools infrastructure requires +# the .mk file to only specify metadata informations about the +# package: name, version, download URL, etc. +# +# We still allow the package .mk file to override what the different +# steps are doing, if needed. For example, if _BUILD_CMDS is +# already defined, it is used as the list of commands to perform to +# build the package, instead of the default autotools behaviour. The +# package can also define some post operation hooks. +# +################################################################################ + + +# +# Utility function to upgrade config.sub and config.guess files +# +# argument 1 : directory into which config.guess and config.sub need +# to be updated. Note that config.sub and config.guess are searched +# recursively in this directory. +# +define CONFIG_UPDATE + for file in config.guess config.sub; do \ + for i in $$(find $(1) -name $$file); do \ + cp support/gnuconfig/$$file $$i; \ + done; \ + done +endef + +################################################################################ +# inner-autotools-package -- defines how the configuration, compilation and +# installation of an autotools package should be done, implements a +# few hooks to tune the build process for autotools specifities and +# calls the generic package infrastructure to generate the necessary +# make targets +# +# argument 1 is the lowercase package name +# argument 2 is the uppercase package name, including an HOST_ prefix +# for host packages +# argument 3 is the uppercase package name, without the HOST_ prefix +# for host packages +# argument 4 is the package directory prefix +# argument 5 is the type (target or host) +################################################################################ + +define inner-autotools-package + +ifndef $(2)_LIBTOOL_PATCH + ifdef $(3)_LIBTOOL_PATCH + $(2)_LIBTOOL_PATCH = $($(3)_LIBTOOL_PATCH) + else + $(2)_LIBTOOL_PATCH ?= YES + endif +endif + +ifndef $(2)_MAKE + ifdef $(3)_MAKE + $(2)_MAKE = $($(3)_MAKE) + else + $(2)_MAKE ?= $(MAKE) + endif +endif + +ifndef $(2)_AUTORECONF + ifdef $(3)_AUTORECONF + $(2)_AUTORECONF = $($(3)_AUTORECONF) + else + $(2)_AUTORECONF ?= NO + endif +endif + +$(2)_CONF_ENV ?= +$(2)_CONF_OPT ?= +$(2)_MAKE_ENV ?= +$(2)_MAKE_OPT ?= +$(2)_AUTORECONF_OPT ?= $($(3)_AUTORECONF_OPT) +$(2)_INSTALL_OPT ?= install +$(2)_INSTALL_STAGING_OPT ?= DESTDIR=$$(STAGING_DIR) install +$(2)_INSTALL_TARGET_OPT ?= DESTDIR=$$(TARGET_DIR) install +$(2)_CLEAN_OPT ?= clean +$(2)_UNINSTALL_STAGING_OPT ?= DESTDIR=$$(STAGING_DIR) uninstall +$(2)_UNINSTALL_TARGET_OPT ?= DESTDIR=$$(TARGET_DIR) uninstall + + +# +# Configure step. Only define it if not already defined by the package +# .mk file. And take care of the differences between host and target +# packages. +# +ifndef $(2)_CONFIGURE_CMDS +ifeq ($(5),target) + +# Configure package for target +define $(2)_CONFIGURE_CMDS + (cd $$($$(PKG)_SRCDIR) && rm -rf config.cache && \ + $$(TARGET_CONFIGURE_OPTS) \ + $$(TARGET_CONFIGURE_ARGS) \ + $$($$(PKG)_CONF_ENV) \ + ./configure \ + --target=$$(GNU_TARGET_NAME) \ + --host=$$(GNU_TARGET_NAME) \ + --build=$$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --sysconfdir=/etc \ + --program-prefix="" \ + $$(DISABLE_DOCUMENTATION) \ + $$(DISABLE_NLS) \ + $$(DISABLE_LARGEFILE) \ + $$(DISABLE_IPV6) \ + $$(SHARED_STATIC_LIBS_OPTS) \ + $$(QUIET) $$($$(PKG)_CONF_OPT) \ + ) +endef +else + +# Configure package for host +# disable all kind of documentation generation in the process, +# because it often relies on host tools which may or may not be +# installed. +define $(2)_CONFIGURE_CMDS + (cd $$($$(PKG)_SRCDIR) && rm -rf config.cache; \ + $$(HOST_CONFIGURE_OPTS) \ + CFLAGS="$$(HOST_CFLAGS)" \ + LDFLAGS="$$(HOST_LDFLAGS)" \ + $$($$(PKG)_CONF_ENV) \ + ./configure \ + --prefix="$$(HOST_DIR)/usr" \ + --sysconfdir="$$(HOST_DIR)/etc" \ + --enable-shared --disable-static \ + --disable-gtk-doc \ + --disable-doc \ + --disable-docs \ + --disable-documentation \ + --with-xmlto=no \ + --with-fop=no \ + $$(QUIET) $$($$(PKG)_CONF_OPT) \ + ) +endef +endif +endif + +# +# Hook to update config.sub and config.guess if needed +# +define UPDATE_CONFIG_HOOK + @$$(call MESSAGE,"Updating config.sub and config.guess") + $$(call CONFIG_UPDATE,$$(@D)) +endef + +$(2)_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK + +# +# Hook to patch libtool to make it work properly for cross-compilation +# +define LIBTOOL_PATCH_HOOK + @$$(call MESSAGE,"Patching libtool") + $(Q)if test "$$($$(PKG)_LIBTOOL_PATCH)" = "YES" \ + -a "$$($$(PKG)_AUTORECONF)" != "YES"; then \ + for i in `find $$($$(PKG)_SRCDIR) -name ltmain.sh`; do \ + ltmain_version=`sed -n '/^[ ]*VERSION=/{s/^[ ]*VERSION=//;p;q;}' $$$$i | \ + sed -e 's/\([0-9].[0-9]*\).*/\1/' -e 's/\"//'`; \ + if test $$$${ltmain_version} = '1.5'; then \ + support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v1.5.patch; \ + elif test $$$${ltmain_version} = "2.2"; then\ + support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v2.2.patch; \ + elif test $$$${ltmain_version} = "2.4"; then\ + support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v2.4.patch; \ + fi \ + done \ + fi +endef + +# default values are not evaluated yet, so don't rely on this defaulting to YES +ifneq ($$($(2)_LIBTOOL_PATCH),NO) +$(2)_POST_PATCH_HOOKS += LIBTOOL_PATCH_HOOK +endif + +# +# Hook to autoreconf the package if needed +# +define AUTORECONF_HOOK + @$$(call MESSAGE,"Autoreconfiguring") + $(Q)cd $$($$(PKG)_SRCDIR) && $(AUTORECONF) $$($$(PKG)_AUTORECONF_OPT) + $(Q)if test "$$($$(PKG)_LIBTOOL_PATCH)" = "YES"; then \ + for i in `find $$($$(PKG)_SRCDIR) -name ltmain.sh`; do \ + ltmain_version=`sed -n '/^[ ]*VERSION=/{s/^[ ]*VERSION=//;p;q;}' $$$$i | \ + sed -e 's/\([0-9].[0-9]*\).*/\1/' -e 's/\"//'`; \ + if test $$$${ltmain_version} = "1.5"; then \ + support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v1.5.patch; \ + elif test $$$${ltmain_version} = "2.2"; then\ + support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v2.2.patch; \ + elif test $$$${ltmain_version} = "2.4"; then\ + support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v2.4.patch; \ + fi \ + done \ + fi +endef + +# This must be repeated from inner-generic-package, otherwise we get an empty +# _DEPENDENCIES if _AUTORECONF is YES. Also filter the result of _AUTORECONF +# away from the non-host rule +$(2)_DEPENDENCIES ?= $(filter-out host-automake host-autoconf host-libtool $(1),\ + $(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES)))) + + +ifeq ($$($(2)_AUTORECONF),YES) +$(2)_PRE_CONFIGURE_HOOKS += AUTORECONF_HOOK +$(2)_DEPENDENCIES += host-automake host-autoconf host-libtool +endif + +# +# Build step. Only define it if not already defined by the package .mk +# file. +# +ifndef $(2)_BUILD_CMDS +ifeq ($(5),target) +define $(2)_BUILD_CMDS + $$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) -C $$($$(PKG)_SRCDIR) +endef +else +define $(2)_BUILD_CMDS + $$(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) -C $$($$(PKG)_SRCDIR) +endef +endif +endif + +# +# Host installation step. Only define it if not already defined by the +# package .mk file. +# +ifndef $(2)_INSTALL_CMDS +define $(2)_INSTALL_CMDS + $$(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_INSTALL_OPT) -C $$($$(PKG)_SRCDIR) +endef +endif + +# +# Staging installation step. Only define it if not already defined by +# the package .mk file. +# +ifndef $(2)_INSTALL_STAGING_CMDS +define $(2)_INSTALL_STAGING_CMDS + $$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_INSTALL_STAGING_OPT) -C $$($$(PKG)_SRCDIR) + for i in $$$$(find $(STAGING_DIR)/usr/lib* -name "*.la"); do \ + cp -f $$$$i $$$$i~; \ + $$(SED) "s:\(['= ]\)/usr:\\1$(STAGING_DIR)/usr:g" $$$$i; \ + done +endef +endif + +# +# Target installation step. Only define it if not already defined by +# the package .mk file. +# +ifndef $(2)_INSTALL_TARGET_CMDS +define $(2)_INSTALL_TARGET_CMDS + $$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_INSTALL_TARGET_OPT) -C $$($$(PKG)_SRCDIR) +endef +endif + +# +# Clean step. Only define it if not already defined by +# the package .mk file. +# +ifndef $(2)_CLEAN_CMDS +define $(2)_CLEAN_CMDS + -$$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_CLEAN_OPT) -C $$($$(PKG)_SRCDIR) +endef +endif + +# +# Uninstall from staging step. Only define it if not already defined by +# the package .mk file. +# +ifndef $(2)_UNINSTALL_STAGING_CMDS +define $(2)_UNINSTALL_STAGING_CMDS + $$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_UNINSTALL_STAGING_OPT) -C $$($$(PKG)_SRCDIR) +endef +endif + +# +# Uninstall from target step. Only define it if not already defined +# by the package .mk file. +# Autotools Makefiles do uninstall with ( cd ...; rm -f ... ) +# Since we remove a lot of directories in target-finalize, this is likely +# to fail. Therefore add -k flag. +# +ifndef $(2)_UNINSTALL_TARGET_CMDS +define $(2)_UNINSTALL_TARGET_CMDS + $$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) -k $$($$(PKG)_UNINSTALL_TARGET_OPT) -C $$($$(PKG)_SRCDIR) +endef +endif + +# Call the generic package infrastructure to generate the necessary +# make targets +$(call inner-generic-package,$(1),$(2),$(3),$(4),$(5)) + +endef + +################################################################################ +# autotools-package -- the target generator macro for autotools packages +################################################################################ + +autotools-package = $(call inner-autotools-package,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),target) +host-autotools-package = $(call inner-autotools-package,host-$(call pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),host) diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk new file mode 100644 index 0000000000..0e0872260d --- /dev/null +++ b/package/pkg-cmake.mk @@ -0,0 +1,204 @@ +################################################################################ +# CMake package infrastructure +# +# This file implements an infrastructure that eases development of +# package .mk files for CMake packages. It should be used for all +# packages that use CMake as their build system. +# +# See the Buildroot documentation for details on the usage of this +# infrastructure +# +# In terms of implementation, this CMake infrastructure requires +# the .mk file to only specify metadata informations about the +# package: name, version, download URL, etc. +# +# We still allow the package .mk file to override what the different +# steps are doing, if needed. For example, if _BUILD_CMDS is +# already defined, it is used as the list of commands to perform to +# build the package, instead of the default CMake behaviour. The +# package can also define some post operation hooks. +# +################################################################################ + +################################################################################ +# inner-cmake-package -- defines how the configuration, compilation and +# installation of a CMake package should be done, implements a few hooks to +# tune the build process and calls the generic package infrastructure to +# generate the necessary make targets +# +# argument 1 is the lowercase package name +# argument 2 is the uppercase package name, including an HOST_ prefix +# for host packages +# argument 3 is the uppercase package name, without the HOST_ prefix +# for host packages +# argument 4 is the package directory prefix +# argument 5 is the type (target or host) +################################################################################ + +define inner-cmake-package + +$(2)_CONF_ENV ?= +$(2)_CONF_OPT ?= +$(2)_MAKE ?= $(MAKE) +$(2)_MAKE_ENV ?= +$(2)_MAKE_OPT ?= +$(2)_INSTALL_HOST_OPT ?= install +$(2)_INSTALL_STAGING_OPT ?= DESTDIR=$$(STAGING_DIR) install +$(2)_INSTALL_TARGET_OPT ?= DESTDIR=$$(TARGET_DIR) install +$(2)_CLEAN_OPT ?= clean + +$(2)_SRCDIR = $$($(2)_DIR)/$($(2)_SUBDIR) +$(2)_BUILDDIR = $$($(2)_SRCDIR) + +# +# Configure step. Only define it if not already defined by the package +# .mk file. And take care of the differences between host and target +# packages. +# +ifndef $(2)_CONFIGURE_CMDS +ifeq ($(5),target) + +# Configure package for target +define $(2)_CONFIGURE_CMDS + (cd $$($$(PKG)_BUILDDIR) && \ + rm -f CMakeCache.txt && \ + $$($$(PKG)_CONF_ENV) $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \ + -DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake" \ + -DCMAKE_INSTALL_PREFIX="/usr" \ + $$($$(PKG)_CONF_OPT) \ + ) +endef +else + +# Configure package for host +define $(2)_CONFIGURE_CMDS + (cd $$($$(PKG)_BUILDDIR) && \ + rm -f CMakeCache.txt && \ + $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \ + -DCMAKE_INSTALL_SO_NO_EXE=0 \ + -DCMAKE_FIND_ROOT_PATH="$$(HOST_DIR)" \ + -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="BOTH" \ + -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY="BOTH" \ + -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE="BOTH" \ + -DCMAKE_INSTALL_PREFIX="$$(HOST_DIR)/usr" \ + $$($$(PKG)_CONF_OPT) \ + ) +endef +endif +endif + +# This must be repeated from inner-generic-package, otherwise we only get +# host-cmake in _DEPENDENCIES because of the following line +$(2)_DEPENDENCIES ?= $(filter-out $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES)))) + +$(2)_DEPENDENCIES += host-cmake + +# +# Build step. Only define it if not already defined by the package .mk +# file. +# +ifndef $(2)_BUILD_CMDS +ifeq ($(5),target) +define $(2)_BUILD_CMDS + $(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) -C $$($$(PKG)_BUILDDIR) +endef +else +define $(2)_BUILD_CMDS + $(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) -C $$($$(PKG)_BUILDDIR) +endef +endif +endif + +# +# Host installation step. Only define it if not already defined by the +# package .mk file. +# +ifndef $(2)_INSTALL_CMDS +define $(2)_INSTALL_CMDS + $(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) $$($$(PKG)_INSTALL_HOST_OPT) -C $$($$(PKG)_BUILDDIR) +endef +endif + +# +# Staging installation step. Only define it if not already defined by +# the package .mk file. +# +ifndef $(2)_INSTALL_STAGING_CMDS +define $(2)_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) $$($$(PKG)_INSTALL_STAGING_OPT) -C $$($$(PKG)_BUILDDIR) +endef +endif + +# +# Target installation step. Only define it if not already defined by +# the package .mk file. +# +ifndef $(2)_INSTALL_TARGET_CMDS +define $(2)_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) $$($$(PKG)_INSTALL_TARGET_OPT) -C $$($$(PKG)_BUILDDIR) +endef +endif + +# +# Clean step. Only define it if not already defined by +# the package .mk file. +# +ifndef $(2)_CLEAN_CMDS +define $(2)_CLEAN_CMDS + -$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) $$($$(PKG)_CLEAN_OPT) -C $$($$(PKG)_BUILDDIR) +endef +endif + +# +# Uninstall from staging step. Only define it if not already defined by +# the package .mk file. +# +ifndef $(2)_UNINSTALL_STAGING_CMDS +define $(2)_UNINSTALL_STAGING_CMDS + (cd $$($$(PKG)_BUILDDIR) && sed "s:\(.*\):$$(STAGING_DIR)\1:" install_manifest.txt | xargs rm -f) +endef +endif + +# +# Uninstall from target step. Only define it if not already defined +# by the package .mk file. +# +ifndef $(2)_UNINSTALL_TARGET_CMDS +define $(2)_UNINSTALL_TARGET_CMDS + (cd $$($$(PKG)_BUILDDIR) && sed "s:\(.*\):$$(TARGET_DIR)\1:" install_manifest.txt | xargs rm -f) +endef +endif + +# Call the generic package infrastructure to generate the necessary +# make targets +$(call inner-generic-package,$(1),$(2),$(3),$(4),$(5)) + +endef + +################################################################################ +# cmake-package -- the target generator macro for CMake packages +################################################################################ + +cmake-package = $(call inner-cmake-package,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),target) +host-cmake-package = $(call inner-cmake-package,host-$(call pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),host) + +################################################################################ +# Generation of the CMake toolchain file +################################################################################ + +$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake: + @mkdir -p $(@D) + @echo -en "\ + set(CMAKE_SYSTEM_NAME Linux)\n\ + set(CMAKE_C_COMPILER $(TARGET_CC_NOCCACHE))\n\ + set(CMAKE_CXX_COMPILER $(TARGET_CXX_NOCCACHE))\n\ + set(CMAKE_C_FLAGS \"\$${CMAKE_C_FLAGS} $(TARGET_CFLAGS)\" CACHE STRING \"Buildroot CFLAGS\" FORCE)\n\ + set(CMAKE_CXX_FLAGS \"\$${CMAKE_CXX_FLAGS} $(TARGET_CXXFLAGS)\" CACHE STRING \"Buildroot CXXFLAGS\" FORCE)\n\ + set(CMAKE_INSTALL_SO_NO_EXE 0)\n\ + set(CMAKE_PROGRAM_PATH \"$(HOST_DIR)/usr/bin\")\n\ + set(CMAKE_FIND_ROOT_PATH \"$(STAGING_DIR)\")\n\ + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\n\ + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\n\ + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\n\ + set(ENV{PKG_CONFIG_SYSROOT_DIR} \"$(STAGING_DIR)\")\n\ + " > $@ diff --git a/package/pkg-config/Config.in b/package/pkg-config/Config.in index eae0a21f24..52c0c32ba5 100644 --- a/package/pkg-config/Config.in +++ b/package/pkg-config/Config.in @@ -1,6 +1,9 @@ config BR2_PACKAGE_PKG_CONFIG bool "pkg-config" depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + depends on BR2_DEPRECATED select BR2_PACKAGE_LIBGLIB2 help pkg-config is a system for managing library compile/link @@ -10,5 +13,7 @@ config BR2_PACKAGE_PKG_CONFIG http://www.freedesktop.org/software/pkgconfig/ -comment "pkg-config requires a toolchain with WCHAR support" - depends on !BR2_USE_WCHAR +comment "pkg-config needs a toolchain w/ wchar, threads" + depends on BR2_DEPRECATED + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/pkg-config/pkg-config-0.25-add-with-sysroot.patch b/package/pkg-config/pkg-config-0.25-add-with-sysroot.patch deleted file mode 100644 index e8431ed9f4..0000000000 --- a/package/pkg-config/pkg-config-0.25-add-with-sysroot.patch +++ /dev/null @@ -1,78 +0,0 @@ -[PATCH] Add compiled in default sysroot - -Similar to the --with-pc-path option. It works just like the existing -PKG_CONFIG_SYSROOT_DIR environment variable, but compiled in. -The environment variable overrides this default setting if set. - -Signed-off-by: Peter Korsgaard ---- - Makefile.am | 6 +++++- - configure.in | 6 ++++++ - main.c | 9 +++++++-- - 3 files changed, 18 insertions(+), 3 deletions(-) - -Index: pkg-config-0.25/Makefile.am -=================================================================== ---- pkg-config-0.25.orig/Makefile.am -+++ pkg-config-0.25/Makefile.am -@@ -28,8 +28,12 @@ EXTRA_DIST = $(m4_DATA) $(man_MANS) READ - bin_PROGRAMS = pkg-config - AM_CFLAGS=@WARN_CFLAGS@ - -+if USE_SYSROOT -+sysroot_includes = -DPKG_CONFIG_SYSROOT="\"$(sysroot)\"" -+endif -+ - INCLUDES=-DPKG_CONFIG_PC_PATH="\"$(pc_path)\"" $(included_glib_includes) \ -- $(popt_includes) -+ $(popt_includes) $(sysroot_includes) - - pkg_config_SOURCES= \ - pkg.h \ -Index: pkg-config-0.25/configure.in -=================================================================== ---- pkg-config-0.25.orig/configure.in -+++ pkg-config-0.25/configure.in -@@ -32,6 +32,12 @@ fi - - PKG_CONFIG_FIND_PC_PATH - -+AC_ARG_WITH(sysroot, -+ [ --with-sysroot Use sysroot by default ], -+ [ sysroot="$withval" ]) -+ -+AC_SUBST([sysroot]) -+AM_CONDITIONAL(USE_SYSROOT, test "x$sysroot" != "x") - # - # Code taken from gtk+-2.0's configure.in. - # -Index: pkg-config-0.25/main.c -=================================================================== ---- pkg-config-0.25.orig/main.c -+++ pkg-config-0.25/main.c -@@ -36,10 +36,14 @@ - #undef STRICT - #endif - -+#ifndef PKG_CONFIG_SYSROOT -+#define PKG_CONFIG_SYSROOT NULL -+#endif -+ - static int want_debug_spew = 0; - static int want_verbose_errors = 0; - static int want_stdout_errors = 0; --char *pcsysrootdir = NULL; -+char *pcsysrootdir = PKG_CONFIG_SYSROOT; - - void - debug_spew (const char *format, ...) -@@ -311,7 +315,8 @@ main (int argc, char **argv) - add_search_dirs(PKG_CONFIG_PC_PATH, G_SEARCHPATH_SEPARATOR_S); - } - -- pcsysrootdir = getenv ("PKG_CONFIG_SYSROOT_DIR"); -+ if (getenv ("PKG_CONFIG_SYSROOT_DIR")) -+ pcsysrootdir = getenv ("PKG_CONFIG_SYSROOT_DIR"); - if (pcsysrootdir) - { - define_global_variable ("pc_sysrootdir", pcsysrootdir); diff --git a/package/pkg-config/pkg-config-0.25-fix-variable.patch b/package/pkg-config/pkg-config-0.25-fix-variable.patch index 46b262bbcb..13a2b9191b 100644 --- a/package/pkg-config/pkg-config-0.25-fix-variable.patch +++ b/package/pkg-config/pkg-config-0.25-fix-variable.patch @@ -1,26 +1,29 @@ -[PATCH] prefix sysroot to path variables +[PATCH] prefix sysroot to include/libdir path variables -Prefix path values with sysroot if a variable is requested -(--varable=), similar to how it's done for -I / -L flags. +Prefix includedir / libdir variable values with sysroot if a variable is +requested (--variable=), similar to how it's done for -I / -L flags. This is sometimes used to find header files (E.G. in gst-plugins configure), so ensure the sysroot'ed files are used. Signed-off-by: Peter Korsgaard --- - main.c | 3 +++ - 1 file changed, 3 insertions(+) + main.c | 6 +++++ + 1 file changed, 6 insertions(+) Index: pkg-config-0.25/main.c =================================================================== --- pkg-config-0.25.orig/main.c +++ pkg-config-0.25/main.c -@@ -695,6 +695,9 @@ main (int argc, char **argv) +@@ -700,6 +700,12 @@ if (variable_name) { char *str = packages_get_var (packages, variable_name); -+ /* path variable? */ -+ if (pcsysrootdir && str[0] == '/') ++ /* include/lib variable? */ ++ if (pcsysrootdir && ++ (!strcmp(variable_name, "includedir") || ++ !strcmp(variable_name, "mapdir") || ++ !strcmp(variable_name, "libdir"))) + printf ("%s/", pcsysrootdir); printf ("%s", str); g_free (str); diff --git a/package/pkg-config/pkg-config.mk b/package/pkg-config/pkg-config.mk index 7189c91aa4..a80d7cbafa 100644 --- a/package/pkg-config/pkg-config.mk +++ b/package/pkg-config/pkg-config.mk @@ -1,24 +1,12 @@ -############################################################# +################################################################################ # -# pkgconfig +# pkg-config # -############################################################# +################################################################################ + PKG_CONFIG_VERSION = 0.25 -PKG_CONFIG_SOURCE = pkg-config-$(PKG_CONFIG_VERSION).tar.gz PKG_CONFIG_SITE = http://pkgconfig.freedesktop.org/releases/ - PKG_CONFIG_DEPENDENCIES = libglib2 - PKG_CONFIG_CONF_OPT = --with-installed-glib -HOST_PKG_CONFIG_CONF_OPT = \ - --with-pc-path="$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig" \ - --with-sysroot="$(STAGING_DIR)" \ - --disable-static - -HOST_PKG_CONFIG_AUTORECONF = YES - -$(eval $(call AUTOTARGETS,package,pkg-config)) -$(eval $(call AUTOTARGETS,package,pkg-config,host)) - -PKG_CONFIG_HOST_BINARY:=$(HOST_DIR)/usr/bin/pkg-config +$(eval $(autotools-package)) diff --git a/package/pkg-download.mk b/package/pkg-download.mk new file mode 100644 index 0000000000..e93ea33c38 --- /dev/null +++ b/package/pkg-download.mk @@ -0,0 +1,284 @@ +################################################################################ +# +# This file contains the download helpers for the various package +# infrastructures. It is used to handle downloads from HTTP servers, +# FTP servers, Git repositories, Subversion repositories, Mercurial +# repositories, Bazaar repositories, and SCP servers. +# +################################################################################ + +# Download method commands +WGET := $(call qstrip,$(BR2_WGET)) $(QUIET) +SVN := $(call qstrip,$(BR2_SVN)) +CVS := $(call qstrip,$(BR2_CVS)) +BZR := $(call qstrip,$(BR2_BZR)) +GIT := $(call qstrip,$(BR2_GIT)) +HG := $(call qstrip,$(BR2_HG)) $(QUIET) +SCP := $(call qstrip,$(BR2_SCP)) $(QUIET) +SSH := $(call qstrip,$(BR2_SSH)) $(QUIET) +LOCALFILES := $(call qstrip,$(BR2_LOCALFILES)) +CP:=$(call qstrip,$(BR2_CP)) $(QUIET) + +# Default spider mode is 'DOWNLOAD'. Other possible values are 'SOURCE_CHECK' +# used by the _source-check target and 'SHOW_EXTERNAL_DEPS', used by the +# external-deps target. +DL_MODE=DOWNLOAD + +# Override BR2_DL_DIR if shell variable defined +ifneq ($(BUILDROOT_DL_DIR),) +DL_DIR := $(BUILDROOT_DL_DIR) +else +DL_DIR := $(call qstrip,$(BR2_DL_DIR)) +endif + +ifeq ($(DL_DIR),) +DL_DIR := $(TOPDIR)/dl +endif + +# ensure it exists and a absolute path +DL_DIR := $(shell mkdir -p $(DL_DIR) && cd $(DL_DIR) >/dev/null && pwd) + +# +# URI scheme helper functions +# Example URIs: +# * http://www.example.com/dir/file +# * scp://www.example.com:dir/file (with domainseparator :) +# +# geturischeme: http +geturischeme=$(firstword $(subst ://, ,$(call qstrip,$(1)))) +# stripurischeme: www.example.com/dir/file +stripurischeme=$(lastword $(subst ://, ,$(call qstrip,$(1)))) +# domain: www.example.com +domain=$(firstword $(subst $(call domainseparator,$(2)), ,$(call stripurischeme,$(1)))) +# notdomain: dir/file +notdomain=$(patsubst $(call domain,$(1),$(2))$(call domainseparator,$(2))%,%,$(call stripurischeme,$(1))) +# +# default domainseparator is /, specify alternative value as first argument +domainseparator=$(if $(1),$(1),/) + +################################################################################ +# The DOWNLOAD_* helpers are in charge of getting a working copy +# of the source repository for their corresponding SCM, +# checking out the requested version / commit / tag, and create an +# archive out of it. DOWNLOAD_SCP uses scp to obtain a remote file with +# ssh authentication. DOWNLOAD_WGET is the normal wget-based download +# mechanism. +# +# The SOURCE_CHECK_* helpers are in charge of simply checking that the source +# is available for download. This can be used to make sure one will be able +# to get all the sources needed for one's build configuration. +# +# The SHOW_EXTERNAL_DEPS_* helpers simply output to the console the names +# of the files that will be downloaded, or path and revision of the +# source repositories, producing a list of all the "external dependencies" +# of a given build configuration. +################################################################################ + +# Try a shallow clone - but that only works if the version is a ref (tag or +# branch). Before trying to do a shallow clone we check if $($(PKG)_DL_VERSION) +# is in the list provided by git ls-remote. If not we fall back on a full clone. +# +# Messages for the type of clone used are provided to ease debugging in case of +# problems +define DOWNLOAD_GIT + test -e $(DL_DIR)/$($(PKG)_SOURCE) || \ + (pushd $(DL_DIR) > /dev/null && \ + ((test "`git ls-remote $($(PKG)_SITE) $($(PKG)_DL_VERSION)`" && \ + echo "Doing shallow clone" && \ + $(GIT) clone --depth 1 -b $($(PKG)_DL_VERSION) --bare $($(PKG)_SITE) $($(PKG)_BASE_NAME)) || \ + (echo "Doing full clone" && \ + $(GIT) clone --bare $($(PKG)_SITE) $($(PKG)_BASE_NAME))) && \ + pushd $($(PKG)_BASE_NAME) > /dev/null && \ + $(GIT) archive --format=tar --prefix=$($(PKG)_BASE_NAME)/ $($(PKG)_DL_VERSION) | \ + gzip -c > $(DL_DIR)/$($(PKG)_SOURCE) && \ + popd > /dev/null && \ + rm -rf $($(PKG)_DL_DIR) && \ + popd > /dev/null) +endef + +# TODO: improve to check that the given PKG_DL_VERSION exists on the remote +# repository +define SOURCE_CHECK_GIT + $(GIT) ls-remote --heads $($(PKG)_SITE) > /dev/null +endef + +define SHOW_EXTERNAL_DEPS_GIT + echo $($(PKG)_SOURCE) +endef + + +define DOWNLOAD_BZR + test -e $(DL_DIR)/$($(PKG)_SOURCE) || \ + $(BZR) export $(DL_DIR)/$($(PKG)_SOURCE) $($(PKG)_SITE) -r $($(PKG)_DL_VERSION) +endef + +define SOURCE_CHECK_BZR + $(BZR) ls --quiet $($(PKG)_SITE) > /dev/null +endef + +define SHOW_EXTERNAL_DEPS_BZR + echo $($(PKG)_SOURCE) +endef + +define DOWNLOAD_CVS + test -e $(DL_DIR)/$($(PKG)_SOURCE) || \ + (pushd $(DL_DIR) > /dev/null && \ + $(CVS) -z3 -d:pserver:anonymous@$(call stripurischeme,$(call qstrip,$($(PKG)_SITE))) \ + co -d $($(PKG)_BASE_NAME) -r :$($(PKG)_DL_VERSION) -P $($(PKG)_RAWNAME) && \ + $(TAR) czf $($(PKG)_SOURCE) $($(PKG)_BASE_NAME)/ && \ + rm -rf $($(PKG)_DL_DIR) && \ + popd > /dev/null) +endef + +# Not all CVS servers support ls/rls, use login to see if we can connect +define SOURCE_CHECK_CVS + $(CVS) -d:pserver:anonymous:@$(call stripurischeme,$(call qstrip,$($(PKG)_SITE))) login +endef + +define SHOW_EXTERNAL_DEPS_CVS + echo $($(PKG)_SOURCE) +endef + +define DOWNLOAD_SVN + test -e $(DL_DIR)/$($(PKG)_SOURCE) || \ + (pushd $(DL_DIR) > /dev/null && \ + $(SVN) export -r $($(PKG)_DL_VERSION) $($(PKG)_SITE) $($(PKG)_DL_DIR) && \ + $(TAR) czf $($(PKG)_SOURCE) $($(PKG)_BASE_NAME)/ && \ + rm -rf $($(PKG)_DL_DIR) && \ + popd > /dev/null) +endef + +define SOURCE_CHECK_SVN + $(SVN) ls $($(PKG)_SITE) > /dev/null +endef + +define SHOW_EXTERNAL_DEPS_SVN + echo $($(PKG)_SOURCE) +endef + +# SCP URIs should be of the form scp://[user@]host:filepath +# Note that filepath is relative to the user's home directory, so you may want +# to prepend the path with a slash: scp://[user@]host:/absolutepath +define DOWNLOAD_SCP + test -e $(DL_DIR)/$(2) || \ + $(SCP) '$(call stripurischeme,$(call qstrip,$(1)))' $(DL_DIR)/$(2) +endef + +define SOURCE_CHECK_SCP + $(SSH) $(call domain,$(1),:) ls '$(call notdomain,$(1),:)' > /dev/null +endef + +define SHOW_EXTERNAL_DEPS_SCP + echo $(2) +endef + + +define DOWNLOAD_HG + test -e $(DL_DIR)/$($(PKG)_SOURCE) || \ + (pushd $(DL_DIR) > /dev/null && \ + $(HG) clone --noupdate --rev $($(PKG)_DL_VERSION) $($(PKG)_SITE) $($(PKG)_BASE_NAME) && \ + $(HG) archive --repository $($(PKG)_BASE_NAME) --type tgz --prefix $($(PKG)_BASE_NAME)/ \ + --rev $($(PKG)_DL_VERSION) $(DL_DIR)/$($(PKG)_SOURCE) && \ + rm -rf $($(PKG)_DL_DIR) && \ + popd > /dev/null) +endef + +# TODO: improve to check that the given PKG_DL_VERSION exists on the remote +# repository +define SOURCE_CHECK_HG + $(HG) incoming --force -l1 $($(PKG)_SITE) > /dev/null +endef + +define SHOW_EXTERNAL_DEPS_HG + echo $($(PKG)_SOURCE) +endef + +# Download a file using wget. Only download the file if it doesn't +# already exist in the download directory. If the download fails, +# remove the file (because wget -O creates a 0-byte file even if the +# download fails). To handle an interrupted download as well, download +# to a temporary file first. The temporary file will be overwritten +# the next time the download is tried. +define DOWNLOAD_WGET + test -e $(DL_DIR)/$(2) || \ + ($(WGET) -O $(DL_DIR)/$(2).tmp '$(call qstrip,$(1))' && \ + mv $(DL_DIR)/$(2).tmp $(DL_DIR)/$(2)) || \ + (rm -f $(DL_DIR)/$(2).tmp ; exit 1) +endef + +define SOURCE_CHECK_WGET + $(WGET) --spider '$(call qstrip,$(1))' +endef + +define SHOW_EXTERNAL_DEPS_WGET + echo $(2) +endef + +define DOWNLOAD_LOCALFILES + test -e $(DL_DIR)/$(2) || \ + $(LOCALFILES) $(call stripurischeme,$(call qstrip,$(1))) $(DL_DIR) +endef + +define SOURCE_CHECK_LOCALFILES + test -e $(call stripurischeme,$(call qstrip,$(1))) +endef + +define SHOW_EXTERNAL_DEPS_LOCALFILES + echo $(2) +endef + +define DOWNLOAD_CP + (test -e $(DL_DIR)/$($(PKG)_SOURCE) && test -z `find $($(PKG)_SITE) -newer $(DL_DIR)/$($(PKG)_SOURCE)`) || \ + tar -C $($(PKG)_SITE) . -czf $(DL_DIR)/$($(PKG)_SOURCE) +endef + +################################################################################ +# DOWNLOAD -- Download helper. Will try to download source from: +# 1) BR2_PRIMARY_SITE if enabled +# 2) Download site, unless BR2_PRIMARY_SITE_ONLY is set +# 3) BR2_BACKUP_SITE if enabled, unless BR2_PRIMARY_SITE_ONLY is set +# +# Argument 1 is the source location +# Argument 2 is the source filename +# +# E.G. use like this: +# $(call DOWNLOAD,$(FOO_SITE),$(FOO_SOURCE)) +################################################################################ + +define DOWNLOAD + $(call DOWNLOAD_INNER,$(1),$(if $(2),$(2),$(notdir $(1)))) +endef + +define DOWNLOAD_INNER + $(Q)if test -n "$(call qstrip,$(BR2_PRIMARY_SITE))" ; then \ + case "$(call geturischeme,$(BR2_PRIMARY_SITE))" in \ + scp) $(call $(DL_MODE)_SCP,$(BR2_PRIMARY_SITE)/$(2),$(2)) && exit ;; \ + *) $(call $(DL_MODE)_WGET,$(BR2_PRIMARY_SITE)/$(2),$(2)) && exit ;; \ + esac ; \ + fi ; \ + if test "$(BR2_PRIMARY_SITE_ONLY)" = "y" ; then \ + exit 1 ; \ + fi ; \ + if test -n "$(1)" ; then \ + if test -z "$($(PKG)_SITE_METHOD)" ; then \ + scheme="$(call geturischeme,$(1))" ; \ + else \ + scheme="$($(PKG)_SITE_METHOD)" ; \ + fi ; \ + case "$$scheme" in \ + git) $($(DL_MODE)_GIT) && exit ;; \ + svn) $($(DL_MODE)_SVN) && exit ;; \ + cvs) $($(DL_MODE)_CVS) && exit ;; \ + bzr) $($(DL_MODE)_BZR) && exit ;; \ + file) $($(DL_MODE)_LOCALFILES) && exit ;; \ + cp) $($(DL_MODE)_CP) && exit ;; \ + scp) $($(DL_MODE)_SCP) && exit ;; \ + hg) $($(DL_MODE)_HG) && exit ;; \ + *) $(call $(DL_MODE)_WGET,$(1),$(2)) && exit ;; \ + esac ; \ + fi ; \ + if test -n "$(call qstrip,$(BR2_BACKUP_SITE))" ; then \ + $(call $(DL_MODE)_WGET,$(BR2_BACKUP_SITE)/$(2),$(2)) && exit ; \ + fi ; \ + exit 1 +endef diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk new file mode 100644 index 0000000000..5111f31d92 --- /dev/null +++ b/package/pkg-generic.mk @@ -0,0 +1,581 @@ +################################################################################ +# Generic package infrastructure +# +# This file implements an infrastructure that eases development of +# package .mk files. It should be used for packages that do not rely +# on a well-known build system for which Buildroot has a dedicated +# infrastructure (so far, Buildroot has special support for +# autotools-based and CMake-based packages). +# +# See the Buildroot documentation for details on the usage of this +# infrastructure +# +# In terms of implementation, this generic infrastructure requires the +# .mk file to specify: +# +# 1. Metadata informations about the package: name, version, +# download URL, etc. +# +# 2. Description of the commands to be executed to configure, build +# and install the package +################################################################################ + +################################################################################ +# Implicit targets -- produce a stamp file for each step of a package build +################################################################################ + +# Retrieve the archive +$(BUILD_DIR)/%/.stamp_downloaded: +ifeq ($(DL_MODE),DOWNLOAD) +# Only show the download message if it isn't already downloaded + $(Q)if test ! -e $(DL_DIR)/$($(PKG)_SOURCE); then \ + $(call MESSAGE,"Downloading") ; \ + else \ + for p in $($(PKG)_PATCH) ; do \ + if test ! -e $(DL_DIR)/$$p ; then \ + $(call MESSAGE,"Downloading") ; \ + break ; \ + fi ; \ + done ; \ + fi +endif + $(if $($(PKG)_SOURCE),$(call DOWNLOAD,$($(PKG)_SITE:/=)/$($(PKG)_SOURCE))) + $(foreach p,$($(PKG)_EXTRA_DOWNLOADS),$(call DOWNLOAD,$($(PKG)_SITE:/=)/$(p))$(sep)) + $(foreach p,$($(PKG)_PATCH),\ + $(if $(findstring ://,$(p)),\ + $(call DOWNLOAD,$(p)),\ + $(call DOWNLOAD,$($(PKG)_SITE:/=)/$(p))\ + )\ + $(sep)) + $(foreach hook,$($(PKG)_POST_DOWNLOAD_HOOKS),$(call $(hook))$(sep)) +ifeq ($(DL_MODE),DOWNLOAD) + $(Q)mkdir -p $(@D) + $(Q)touch $@ +endif + +# Unpack the archive +$(BUILD_DIR)/%/.stamp_extracted: + @$(call MESSAGE,"Extracting") + $(Q)mkdir -p $(@D) + $($(PKG)_EXTRACT_CMDS) +# some packages have messed up permissions inside + $(Q)chmod -R +rw $(@D) + $(foreach hook,$($(PKG)_POST_EXTRACT_HOOKS),$(call $(hook))$(sep)) + $(Q)touch $@ + +# Rsync the source directory if the _OVERRIDE_SRCDIR feature is +# used. +$(BUILD_DIR)/%/.stamp_rsynced: + @$(call MESSAGE,"Syncing from source dir $(SRCDIR)") + @test -d $(SRCDIR) || (echo "ERROR: $(SRCDIR) does not exist" ; exit 1) + rsync -au $(RSYNC_VCS_EXCLUSIONS) $(SRCDIR)/ $(@D) + $(foreach hook,$($(PKG)_POST_RSYNC_HOOKS),$(call $(hook))$(sep)) + $(Q)touch $@ + +# Handle the SOURCE_CHECK and SHOW_EXTERNAL_DEPS cases for rsynced +# packages +$(BUILD_DIR)/%/.stamp_rsync_sourced: +ifeq ($(DL_MODE),SOURCE_CHECK) + test -d $(SRCDIR) +else ifeq ($(DL_MODE),SHOW_EXTERNAL_DEPS) + echo "file://$(SRCDIR)" +else + @true # Nothing to do to source a local package +endif + +# Patch +# +# The RAWNAME variable is the lowercased package name, which allows to +# find the package directory (typically package/) and the +# prefix of the patches +$(BUILD_DIR)/%/.stamp_patched: NAMEVER = $(RAWNAME)-$($(PKG)_VERSION) +$(BUILD_DIR)/%/.stamp_patched: PATCH_BASE_DIRS = $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(call qstrip,$(BR2_GLOBAL_PATCH_DIR))/$(RAWNAME) +$(BUILD_DIR)/%/.stamp_patched: + @$(call MESSAGE,"Patching") + $(foreach hook,$($(PKG)_PRE_PATCH_HOOKS),$(call $(hook))$(sep)) + $(foreach p,$($(PKG)_PATCH),support/scripts/apply-patches.sh $(@D) $(DL_DIR) $(notdir $(p))$(sep)) + $(Q)( \ + for D in $(PATCH_BASE_DIRS); do \ + if test -d $${D}; then \ + if test -d $${D}/$($(PKG)_VERSION); then \ + support/scripts/apply-patches.sh $(@D) $${D}/$($(PKG)_VERSION) \*.patch \*.patch.$(ARCH) || exit 1; \ + else \ + support/scripts/apply-patches.sh $(@D) $${D} \*.patch \*.patch.$(ARCH) || exit 1; \ + fi; \ + fi; \ + done; \ + ) + $(foreach hook,$($(PKG)_POST_PATCH_HOOKS),$(call $(hook))$(sep)) + $(Q)touch $@ + +# Configure +$(BUILD_DIR)/%/.stamp_configured: + $(foreach hook,$($(PKG)_PRE_CONFIGURE_HOOKS),$(call $(hook))$(sep)) + @$(call MESSAGE,"Configuring") + $($(PKG)_CONFIGURE_CMDS) + $(foreach hook,$($(PKG)_POST_CONFIGURE_HOOKS),$(call $(hook))$(sep)) + $(Q)touch $@ + +# Build +$(BUILD_DIR)/%/.stamp_built:: + @$(call MESSAGE,"Building") + $($(PKG)_BUILD_CMDS) + $(foreach hook,$($(PKG)_POST_BUILD_HOOKS),$(call $(hook))$(sep)) + $(Q)touch $@ + +# Install to host dir +$(BUILD_DIR)/%/.stamp_host_installed: + @$(call MESSAGE,"Installing to host directory") + $($(PKG)_INSTALL_CMDS) + $(foreach hook,$($(PKG)_POST_INSTALL_HOOKS),$(call $(hook))$(sep)) + $(Q)touch $@ + +# Install to staging dir +$(BUILD_DIR)/%/.stamp_staging_installed: + @$(call MESSAGE,"Installing to staging directory") + $($(PKG)_INSTALL_STAGING_CMDS) + $(foreach hook,$($(PKG)_POST_INSTALL_STAGING_HOOKS),$(call $(hook))$(sep)) + $(Q)if test -n "$($(PKG)_CONFIG_SCRIPTS)" ; then \ + $(call MESSAGE,"Fixing package configuration files") ;\ + $(SED) "s,^\(exec_\)\?prefix=.*,\1prefix=$(STAGING_DIR)/usr,g" \ + -e "s,-I/usr/,-I$(STAGING_DIR)/usr/,g" \ + -e "s,-L/usr/,-L$(STAGING_DIR)/usr/,g" \ + $(addprefix $(STAGING_DIR)/usr/bin/,$($(PKG)_CONFIG_SCRIPTS)) ;\ + fi + $(Q)touch $@ + +# Install to images dir +$(BUILD_DIR)/%/.stamp_images_installed: + @$(call MESSAGE,"Installing to images directory") + $($(PKG)_INSTALL_IMAGES_CMDS) + $(foreach hook,$($(PKG)_POST_INSTALL_IMAGES_HOOKS),$(call $(hook))$(sep)) + $(Q)touch $@ + +# Install to target dir +$(BUILD_DIR)/%/.stamp_target_installed: + @$(call MESSAGE,"Installing to target") + $(if $(BR2_INIT_SYSTEMD),\ + $($(PKG)_INSTALL_INIT_SYSTEMD)) + $(if $(BR2_INIT_SYSV)$(BR2_INIT_BUSYBOX),\ + $($(PKG)_INSTALL_INIT_SYSV)) + $($(PKG)_INSTALL_TARGET_CMDS) + $(foreach hook,$($(PKG)_POST_INSTALL_TARGET_HOOKS),$(call $(hook))$(sep)) + $(Q)if test -n "$($(PKG)_CONFIG_SCRIPTS)" ; then \ + $(RM) -f $(addprefix $(TARGET_DIR)/usr/bin/,$($(PKG)_CONFIG_SCRIPTS)) ; \ + fi + $(Q)touch $@ + +# Clean package +$(BUILD_DIR)/%/.stamp_cleaned: + @$(call MESSAGE,"Cleaning up") + $($(PKG)_CLEAN_CMDS) + rm -f $(@D)/.stamp_built + +# Uninstall package from target and staging +# Uninstall commands tend to fail, so remove the stamp files first +$(BUILD_DIR)/%/.stamp_uninstalled: + @$(call MESSAGE,"Uninstalling") + rm -f $($(PKG)_TARGET_INSTALL_STAGING) + rm -f $($(PKG)_TARGET_INSTALL_TARGET) + $($(PKG)_UNINSTALL_STAGING_CMDS) + $($(PKG)_UNINSTALL_TARGET_CMDS) + $(if $(BR2_INIT_SYSTEMD),\ + $($(PKG)_UNINSTALL_INIT_SYSTEMD)) + $(if $(BR2_INIT_SYSV)$(BR2_INIT_BUSYBOX),\ + $($(PKG)_UNINSTALL_INIT_SYSV)) + +# Remove package sources +$(BUILD_DIR)/%/.stamp_dircleaned: + rm -Rf $(@D) + +################################################################################ +# inner-generic-package -- generates the make targets needed to build a +# generic package +# +# argument 1 is the lowercase package name +# argument 2 is the uppercase package name, including an HOST_ prefix +# for host packages +# argument 3 is the uppercase package name, without the HOST_ prefix +# for host packages +# argument 4 is the package directory prefix +# argument 5 is the type (target or host) +################################################################################ + +define inner-generic-package + +# Define default values for various package-related variables, if not +# already defined. For some variables (version, source, site and +# subdir), if they are undefined, we try to see if a variable without +# the HOST_ prefix is defined. If so, we use such a variable, so that +# these informations have only to be specified once, for both the +# target and host packages of a given .mk file. + +$(2)_TYPE = $(5) +$(2)_NAME = $(1) +$(2)_RAWNAME = $(patsubst host-%,%,$(1)) + +# Keep the package version that may contain forward slashes in the _DL_VERSION +# variable, then replace all forward slashes ('/') by underscores ('_') to +# sanitize the package version that is used in paths, directory and file names. +# Forward slashes may appear in the package's version when pointing to a +# version control system branch or tag, for example remotes/origin/1_10_stable. +ifndef $(2)_VERSION + ifdef $(3)_VERSION + $(2)_DL_VERSION = $($(3)_VERSION) + $(2)_VERSION = $(subst /,_,$($(3)_VERSION)) + else + $(2)_VERSION = undefined + $(2)_DL_VERSION = undefined + endif +else + $(2)_DL_VERSION = $($(2)_VERSION) + $(2)_VERSION = $(subst /,_,$($(2)_VERSION)) +endif + +$(2)_BASE_NAME = $(1)-$$($(2)_VERSION) +$(2)_DL_DIR = $$(DL_DIR)/$$($(2)_BASE_NAME) +$(2)_DIR = $$(BUILD_DIR)/$$($(2)_BASE_NAME) + +ifndef $(2)_SUBDIR + ifdef $(3)_SUBDIR + $(2)_SUBDIR = $$($(3)_SUBDIR) + else + $(2)_SUBDIR ?= + endif +endif + +$(2)_SRCDIR = $$($(2)_DIR)/$$($(2)_SUBDIR) +$(2)_BUILDDIR ?= $$($(2)_SRCDIR) + +ifneq ($$($(2)_OVERRIDE_SRCDIR),) +$(2)_VERSION = custom +endif + +ifndef $(2)_SOURCE + ifdef $(3)_SOURCE + $(2)_SOURCE = $($(3)_SOURCE) + else + $(2)_SOURCE ?= $$($(2)_RAWNAME)-$$($(2)_VERSION).tar.gz + endif +endif + +ifndef $(2)_PATCH + ifdef $(3)_PATCH + $(2)_PATCH = $($(3)_PATCH) + endif +endif + +ifndef $(2)_SITE + ifdef $(3)_SITE + $(2)_SITE = $($(3)_SITE) + endif +endif + +ifndef $(2)_SITE_METHOD + ifdef $(3)_SITE_METHOD + $(2)_SITE_METHOD = $($(3)_SITE_METHOD) + else + # Try automatic detection using the scheme part of the URI + $(2)_SITE_METHOD = $(call geturischeme,$($(2)_SITE)) + endif +endif + +ifeq ($$($(2)_SITE_METHOD),local) +ifeq ($$($(2)_OVERRIDE_SRCDIR),) +$(2)_OVERRIDE_SRCDIR = $$($(2)_SITE) +endif +endif + +ifndef $(2)_LICENSE + ifdef $(3)_LICENSE + $(2)_LICENSE = $($(3)_LICENSE) + endif +endif + +$(2)_LICENSE ?= unknown + +ifndef $(2)_LICENSE_FILES + ifdef $(3)_LICENSE_FILES + $(2)_LICENSE_FILES = $($(3)_LICENSE_FILES) + endif +endif + +ifndef $(2)_REDISTRIBUTE + ifdef $(3)_REDISTRIBUTE + $(2)_REDISTRIBUTE = $($(3)_REDISTRIBUTE) + endif +endif + +$(2)_REDISTRIBUTE ?= YES + + +$(2)_DEPENDENCIES ?= $(filter-out $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES)))) + +$(2)_INSTALL_STAGING ?= NO +$(2)_INSTALL_IMAGES ?= NO +$(2)_INSTALL_TARGET ?= YES +$(2)_DIR_PREFIX = $(4) + +# define sub-target stamps +$(2)_TARGET_INSTALL_TARGET = $$($(2)_DIR)/.stamp_target_installed +$(2)_TARGET_INSTALL_STAGING = $$($(2)_DIR)/.stamp_staging_installed +$(2)_TARGET_INSTALL_IMAGES = $$($(2)_DIR)/.stamp_images_installed +$(2)_TARGET_INSTALL_HOST = $$($(2)_DIR)/.stamp_host_installed +$(2)_TARGET_BUILD = $$($(2)_DIR)/.stamp_built +$(2)_TARGET_CONFIGURE = $$($(2)_DIR)/.stamp_configured +$(2)_TARGET_RSYNC = $$($(2)_DIR)/.stamp_rsynced +$(2)_TARGET_RSYNC_SOURCE = $$($(2)_DIR)/.stamp_rsync_sourced +$(2)_TARGET_PATCH = $$($(2)_DIR)/.stamp_patched +$(2)_TARGET_EXTRACT = $$($(2)_DIR)/.stamp_extracted +$(2)_TARGET_SOURCE = $$($(2)_DIR)/.stamp_downloaded +$(2)_TARGET_UNINSTALL = $$($(2)_DIR)/.stamp_uninstalled +$(2)_TARGET_CLEAN = $$($(2)_DIR)/.stamp_cleaned +$(2)_TARGET_DIRCLEAN = $$($(2)_DIR)/.stamp_dircleaned + +# default extract command +$(2)_EXTRACT_CMDS ?= \ + $$(if $$($(2)_SOURCE),$$(INFLATE$$(suffix $$($(2)_SOURCE))) $(DL_DIR)/$$($(2)_SOURCE) | \ + $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $$($(2)_DIR) $(TAR_OPTIONS) -) + +# post-steps hooks +$(2)_POST_DOWNLOAD_HOOKS ?= +$(2)_POST_EXTRACT_HOOKS ?= +$(2)_POST_RSYNC_HOOKS ?= +$(2)_PRE_PATCH_HOOKS ?= +$(2)_POST_PATCH_HOOKS ?= +$(2)_PRE_CONFIGURE_HOOKS ?= +$(2)_POST_CONFIGURE_HOOKS ?= +$(2)_POST_BUILD_HOOKS ?= +$(2)_POST_INSTALL_HOOKS ?= +$(2)_POST_INSTALL_STAGING_HOOKS ?= +$(2)_POST_INSTALL_TARGET_HOOKS ?= +$(2)_POST_INSTALL_IMAGES_HOOKS ?= +$(2)_POST_LEGAL_INFO_HOOKS ?= + +# human-friendly targets and target sequencing +$(1): $(1)-install + +ifeq ($$($(2)_TYPE),host) +$(1)-install: $(1)-install-host +else +$(1)-install: $(1)-install-staging $(1)-install-target $(1)-install-images +endif + +ifeq ($$($(2)_INSTALL_TARGET),YES) +$(1)-install-target: $(1)-build \ + $$($(2)_TARGET_INSTALL_TARGET) +else +$(1)-install-target: +endif + +ifeq ($$($(2)_INSTALL_STAGING),YES) +$(1)-install-staging: $(1)-build \ + $$($(2)_TARGET_INSTALL_STAGING) +else +$(1)-install-staging: +endif + +ifeq ($$($(2)_INSTALL_IMAGES),YES) +$(1)-install-images: $(1)-build \ + $$($(2)_TARGET_INSTALL_IMAGES) +else +$(1)-install-images: +endif + +$(1)-install-host: $(1)-build $$($(2)_TARGET_INSTALL_HOST) + +$(1)-build: $(1)-configure \ + $$($(2)_TARGET_BUILD) + +ifeq ($$($(2)_OVERRIDE_SRCDIR),) +# In the normal case (no package override), the sequence of steps is +# source, by downloading +# depends +# extract +# patch +# configure +$(1)-configure: $(1)-patch $(1)-depends \ + $$($(2)_TARGET_CONFIGURE) + +$(1)-patch: $(1)-extract $$($(2)_TARGET_PATCH) + +$(1)-extract: $(1)-source \ + $$($(2)_TARGET_EXTRACT) + +$(1)-depends: $$($(2)_DEPENDENCIES) + +$(1)-source: $$($(2)_TARGET_SOURCE) +else +# In the package override case, the sequence of steps +# source, by rsyncing +# depends +# configure +$(1)-configure: $(1)-depends \ + $$($(2)_TARGET_CONFIGURE) + +$(1)-depends: $(1)-rsync $$($(2)_DEPENDENCIES) + +$(1)-patch: $(1)-rsync +$(1)-extract: $(1)-rsync + +$(1)-rsync: $$($(2)_TARGET_RSYNC) + +$(1)-source: $$($(2)_TARGET_RSYNC_SOURCE) +endif + +$(1)-show-depends: + @echo $$($(2)_DEPENDENCIES) + +$(1)-uninstall: $(1)-configure $$($(2)_TARGET_UNINSTALL) + +$(1)-clean: $(1)-uninstall \ + $$($(2)_TARGET_CLEAN) + +$(1)-dirclean: $$($(2)_TARGET_DIRCLEAN) + +$(1)-clean-for-rebuild: +ifneq ($$($(2)_OVERRIDE_SRCDIR),) + rm -f $$($(2)_TARGET_RSYNC) +endif + rm -f $$($(2)_TARGET_BUILD) + rm -f $$($(2)_TARGET_INSTALL_STAGING) + rm -f $$($(2)_TARGET_INSTALL_TARGET) + rm -f $$($(2)_TARGET_INSTALL_IMAGES) + rm -f $$($(2)_TARGET_INSTALL_HOST) + +$(1)-rebuild: $(1)-clean-for-rebuild $(1) + +$(1)-clean-for-reconfigure: $(1)-clean-for-rebuild + rm -f $$($(2)_TARGET_CONFIGURE) + +$(1)-reconfigure: $(1)-clean-for-reconfigure $(1) + +# define the PKG variable for all targets, containing the +# uppercase package variable prefix +$$($(2)_TARGET_INSTALL_TARGET): PKG=$(2) +$$($(2)_TARGET_INSTALL_STAGING): PKG=$(2) +$$($(2)_TARGET_INSTALL_IMAGES): PKG=$(2) +$$($(2)_TARGET_INSTALL_HOST): PKG=$(2) +$$($(2)_TARGET_BUILD): PKG=$(2) +$$($(2)_TARGET_CONFIGURE): PKG=$(2) +$$($(2)_TARGET_RSYNC): SRCDIR=$$($(2)_OVERRIDE_SRCDIR) +$$($(2)_TARGET_RSYNC): PKG=$(2) +$$($(2)_TARGET_RSYNC_SOURCE): SRCDIR=$$($(2)_OVERRIDE_SRCDIR) +$$($(2)_TARGET_RSYNC_SOURCE): PKG=$(2) +$$($(2)_TARGET_PATCH): PKG=$(2) +$$($(2)_TARGET_PATCH): RAWNAME=$(patsubst host-%,%,$(1)) +$$($(2)_TARGET_EXTRACT): PKG=$(2) +$$($(2)_TARGET_SOURCE): PKG=$(2) +$$($(2)_TARGET_UNINSTALL): PKG=$(2) +$$($(2)_TARGET_CLEAN): PKG=$(2) +$$($(2)_TARGET_DIRCLEAN): PKG=$(2) + +# Compute the name of the Kconfig option that correspond to the +# package being enabled. We handle three cases: the special Linux +# kernel case, the bootloaders case, and the normal packages case. +ifeq ($(1),linux) +$(2)_KCONFIG_VAR = BR2_LINUX_KERNEL +else ifeq ($(4),boot/) +$(2)_KCONFIG_VAR = BR2_TARGET_$(2) +else +$(2)_KCONFIG_VAR = BR2_PACKAGE_$(2) +endif + +# legal-info: declare dependencies and set values used later for the manifest +ifneq ($$($(2)_LICENSE_FILES),) +$(2)_MANIFEST_LICENSE_FILES = $$($(2)_LICENSE_FILES) +endif +$(2)_MANIFEST_LICENSE_FILES ?= not saved + +ifeq ($$($(2)_REDISTRIBUTE),YES) +ifneq ($$($(2)_SITE_METHOD),local) +ifneq ($$($(2)_SITE_METHOD),override) +# Packages that have a tarball need it downloaded and extracted beforehand +$(1)-legal-info: $(1)-extract $(REDIST_SOURCES_DIR) +$(2)_MANIFEST_TARBALL = $$($(2)_SOURCE) +endif +endif +endif +$(2)_MANIFEST_TARBALL ?= not saved + +# legal-info: produce legally relevant info. +$(1)-legal-info: +# Packages without a source are assumed to be part of Buildroot, skip them. +ifneq ($(call qstrip,$$($(2)_SOURCE)),) + +ifeq ($$($(2)_SITE_METHOD),local) +# Packages without a tarball: don't save and warn + @$(call legal-warning-pkg-savednothing,$$($(2)_RAWNAME),local) + +else ifneq ($$($(2)_OVERRIDE_SRCDIR),) + @$(call legal-warning-pkg-savednothing,$$($(2)_RAWNAME),override) + +else +# Other packages + +# Save license files if defined +ifeq ($(call qstrip,$$($(2)_LICENSE_FILES)),) + @$(call legal-license-nofiles,$$($(2)_RAWNAME)) + @$(call legal-warning-pkg,$$($(2)_RAWNAME),cannot save license ($(2)_LICENSE_FILES not defined)) +else +# Double dollar signs are really needed here, to catch host packages +# without explicit HOST_FOO_LICENSE_FILES assignment, also in case they +# have multiple license files. + @$$(foreach F,$$($(2)_LICENSE_FILES),$$(call legal-license-file,$$($(2)_RAWNAME),$$(F),$$($(2)_DIR)/$$(F))$$(sep)) +endif # license files + +ifeq ($$($(2)_REDISTRIBUTE),YES) +# Copy the source tarball (just hardlink if possible) + @cp -l $(DL_DIR)/$$($(2)_SOURCE) $(REDIST_SOURCES_DIR) 2>/dev/null || \ + cp $(DL_DIR)/$$($(2)_SOURCE) $(REDIST_SOURCES_DIR) +endif # redistribute + +endif # other packages + @$(call legal-manifest,$$($(2)_RAWNAME),$$($(2)_VERSION),$$($(2)_LICENSE),$$($(2)_MANIFEST_LICENSE_FILES),$$($(2)_MANIFEST_TARBALL)) +endif # ifneq ($(call qstrip,$$($(2)_SOURCE)),) + $(foreach hook,$($(2)_POST_LEGAL_INFO_HOOKS),$(call $(hook))$(sep)) + +# add package to the general list of targets if requested by the buildroot +# configuration +ifeq ($$($$($(2)_KCONFIG_VAR)),y) + +TARGETS += $(1) +PACKAGES_PERMISSIONS_TABLE += $$($(2)_PERMISSIONS)$$(sep) +PACKAGES_DEVICES_TABLE += $$($(2)_DEVICES)$$(sep) +PACKAGES_USERS += $$($(2)_USERS)$$(sep) + +ifeq ($$($(2)_SITE_METHOD),svn) +DL_TOOLS_DEPENDENCIES += svn +else ifeq ($$($(2)_SITE_METHOD),git) +DL_TOOLS_DEPENDENCIES += git +else ifeq ($$($(2)_SITE_METHOD),bzr) +DL_TOOLS_DEPENDENCIES += bzr +else ifeq ($$($(2)_SITE_METHOD),scp) +DL_TOOLS_DEPENDENCIES += scp ssh +else ifeq ($$($(2)_SITE_METHOD),hg) +DL_TOOLS_DEPENDENCIES += hg +else ifeq ($$($(2)_SITE_METHOD),cvs) +DL_TOOLS_DEPENDENCIES += cvs +endif # SITE_METHOD + +# $(firstword) is used here because the extractor can have arguments, like +# ZCAT="gzip -d -c", and to check for the dependency we only want 'gzip'. +# Do not add xzcat to the list of required dependencies, as it gets built +# automatically if it isn't found. +ifneq ($(call suitable-extractor,$($(2)_SOURCE)),$(XZCAT)) +DL_TOOLS_DEPENDENCIES += $(firstword $(call suitable-extractor,$($(2)_SOURCE))) +endif + +endif # $(2)_KCONFIG_VAR +endef # inner-generic-package + +################################################################################ +# generic-package -- the target generator macro for generic packages +################################################################################ + +# In the case of target packages, keep the package name "pkg" +generic-package = $(call inner-generic-package,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),target) +# In the case of host packages, turn the package name "pkg" into "host-pkg" +host-generic-package = $(call inner-generic-package,host-$(call pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),host) + +# :mode=makefile: diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk new file mode 100644 index 0000000000..0ef433dc93 --- /dev/null +++ b/package/pkg-utils.mk @@ -0,0 +1,121 @@ +################################################################################ +# +# This file contains various utility functions used by the package +# infrastructure, or by the packages themselves. +# +################################################################################ + +# UPPERCASE Macro -- transform its argument to uppercase and replace dots and +# hyphens to underscores + +# Heavily inspired by the up macro from gmsl (http://gmsl.sf.net) +# This is approx 5 times faster than forking a shell and tr, and +# as this macro is used a lot it matters +# This works by creating translation character pairs (E.G. a:A b:B) +# and then looping though all of them running $(subst from,to,text) +[FROM] := a b c d e f g h i j k l m n o p q r s t u v w x y z . - +[TO] := A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _ _ + +UPPERCASE = $(strip $(eval __tmp := $1) \ + $(foreach c, $(join $(addsuffix :,$([FROM])),$([TO])), \ + $(eval __tmp := \ + $(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)),\ + $(__tmp)))) \ + $(__tmp)) + +# LOWERCASE macro -- transforms its arguments to lowercase +# The above non-tr implementation is not needed, because LOWERCASE is not +# called very often + +define LOWERCASE +$(shell echo $1 | tr '[:upper:]' '[:lower:]') +endef + +# +# Manipulation of .config files based on the Kconfig +# infrastructure. Used by the Busybox package, the Linux kernel +# package, and more. +# + +define KCONFIG_ENABLE_OPT + $(SED) "/\\<$(1)\\>/d" $(2) + echo "$(1)=y" >> $(2) +endef + +define KCONFIG_SET_OPT + $(SED) "/\\<$(1)\\>/d" $(3) + echo "$(1)=$(2)" >> $(3) +endef + +define KCONFIG_DISABLE_OPT + $(SED) "/\\<$(1)\\>/d" $(2) + echo "# $(1) is not set" >> $(2) +endef + +# Helper functions to determine the name of a package and its +# directory from its makefile directory, using the $(MAKEFILE_LIST) +# variable provided by make. This is used by the *TARGETS macros to +# automagically find where the package is located. Note that the +# pkgdir macro is carefully written to handle the case of the Linux +# package, for which the package directory is an empty string. +pkgdir = $(dir $(lastword $(MAKEFILE_LIST))) +pkgname = $(lastword $(subst /, ,$(call pkgdir))) +pkgparentdir = $(patsubst %$(call pkgname)/,%,$(call pkgdir)) + +# Define extractors for different archive suffixes +INFLATE.bz2 = $(BZCAT) +INFLATE.gz = $(ZCAT) +INFLATE.tbz = $(BZCAT) +INFLATE.tbz2 = $(BZCAT) +INFLATE.tgz = $(ZCAT) +INFLATE.xz = $(XZCAT) +INFLATE.tar = cat +# suitable-extractor(filename): returns extractor based on suffix +suitable-extractor = $(INFLATE$(suffix $(1))) + +# MESSAGE Macro -- display a message in bold type +MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)" +TERM_BOLD := $(shell tput smso) +TERM_RESET := $(shell tput rmso) + +# Utility functions for 'find' +# findfileclauses(filelist) => -name 'X' -o -name 'Y' +findfileclauses = $(call notfirstword,$(patsubst %,-o -name '%',$(1))) +# finddirclauses(base, dirlist) => -path 'base/dirX' -o -path 'base/dirY' +finddirclauses = $(call notfirstword,$(patsubst %,-o -path '$(1)/%',$(2))) + +# Miscellaneous utility functions +# notfirstword(wordlist): returns all but the first word in wordlist +notfirstword = $(wordlist 2,$(words $(1)),$(1)) + +# Needed for the foreach loops to loop over the list of hooks, so that +# each hook call is properly separated by a newline. +define sep + + +endef + +# +# legal-info helper functions +# +LEGAL_INFO_SEPARATOR="::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::" +legal-warning=echo "WARNING: $(1)" >>$(LEGAL_WARNINGS) +legal-warning-pkg=echo "WARNING: $(1): $(2)" >>$(LEGAL_WARNINGS) +define legal-warning-pkg-savednothing # pkg, {local|override} + $(call legal-warning-pkg,$(1),sources and license files not saved ($(2) packages not handled)) +endef +legal-manifest=echo '"$(1)","$(2)","$(3)","$(4)","$(5)"' >>$(LEGAL_MANIFEST_CSV) +define legal-license-header + echo -e "$(LEGAL_INFO_SEPARATOR)\n\t$(1):" \ + "$(2)\n$(LEGAL_INFO_SEPARATOR)\n\n" >>$(LEGAL_LICENSES_TXT) +endef +define legal-license-nofiles + $(call legal-license-header,$(1),unknown license file(s)) +endef +define legal-license-file # pkg, filename, file-fullpath + $(call legal-license-header,$(1),$(2) file) && \ + cat $(3) >>$(LEGAL_LICENSES_TXT) && \ + echo >>$(LEGAL_LICENSES_TXT) && \ + mkdir -p $(LICENSE_FILES_DIR)/$(1)/$(dir $(2)) && \ + cp $(3) $(LICENSE_FILES_DIR)/$(1)/$(2) +endef diff --git a/package/pkgconf/Config.in b/package/pkgconf/Config.in new file mode 100644 index 0000000000..f95847fa3c --- /dev/null +++ b/package/pkgconf/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PKGCONF + bool "pkgconf" + help + pkgconf is a program which helps to configure compiler and linker + flags for development frameworks. It is similar to pkg-config, + but was written from scratch in the summer of 2011 to replace + pkg-config, which now needs itself to build itself + + https://github.com/nenolod/pkgconf diff --git a/package/pkgconf/pkg-config.in b/package/pkgconf/pkg-config.in new file mode 100644 index 0000000000..25a536b0e6 --- /dev/null +++ b/package/pkgconf/pkg-config.in @@ -0,0 +1,2 @@ +#!/bin/sh +PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:-@PKG_CONFIG_LIBDIR@} PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:-@STAGING_DIR@} $(dirname $0)/pkgconf $@ diff --git a/package/pkgconf/pkgconf-fix-variable.patch b/package/pkgconf/pkgconf-fix-variable.patch new file mode 100644 index 0000000000..e19f76c90c --- /dev/null +++ b/package/pkgconf/pkgconf-fix-variable.patch @@ -0,0 +1,27 @@ +[PATCH] prefix sysroot to include/libdir path variables + +Prefix includedir / libdir variable values with sysroot if a variable is +requested (--variable=), similar to how it's done for -I / -L flags. + +This is sometimes used to find header files (E.G. in gst-plugins configure), +so ensure the sysroot'ed files are used. + +Signed-off-by: Gustavo Zacarias + +diff -Nura pkgconf-0.8.9.orig/main.c pkgconf-0.8.9/main.c +--- pkgconf-0.8.9.orig/main.c 2012-10-24 14:32:08.236508699 -0300 ++++ pkgconf-0.8.9/main.c 2012-10-24 14:54:36.771070217 -0300 +@@ -298,7 +298,12 @@ + if (eflag != PKG_ERRF_OK) + return false; + +- printf("%s\n", req.buf); ++ if ( !strcmp(req.variable, "includedir") || ++ !strcmp(req.variable, "mapdir") || ++ !strcmp(req.variable, "libdir")) ++ printf("%s%s\n", sysroot_dir, req.buf); ++ else ++ printf("%s\n", req.buf); + return true; + } + diff --git a/package/pkgconf/pkgconf.mk b/package/pkgconf/pkgconf.mk new file mode 100644 index 0000000000..3ff093f76e --- /dev/null +++ b/package/pkgconf/pkgconf.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# pkgconf +# +################################################################################ + +PKGCONF_VERSION = 0.8.9 +PKGCONF_SITE = http://rabbit.dereferenced.org/~nenolod/distfiles/ +PKGCONF_SOURCE = pkgconf-$(PKGCONF_VERSION).tar.bz2 +PKGCONF_LICENSE = pkgconf license +PKGCONF_LICENSE_FILES = COPYING + +PKG_CONFIG_HOST_BINARY = $(HOST_DIR)/usr/bin/pkg-config + +ifeq ($(BR2_PACKAGE_PKG_CONFIG),) +define PKGCONF_LINK_PKGCONFIG + ln -sf pkgconf $(TARGET_DIR)/usr/bin/pkg-config +endef +endif + +define HOST_PKGCONF_INSTALL_WRAPPER + $(INSTALL) -m 0755 -D package/pkgconf/pkg-config.in \ + $(HOST_DIR)/usr/bin/pkg-config + $(SED) 's,@PKG_CONFIG_LIBDIR@,$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig,' \ + -e 's,@STAGING_DIR@,$(STAGING_DIR),' \ + $(HOST_DIR)/usr/bin/pkg-config +endef + +PKGCONF_POST_INSTALL_TARGET_HOOKS += PKGCONF_LINK_PKGCONFIG +HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_INSTALL_WRAPPER + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/poco/Config.in b/package/poco/Config.in new file mode 100644 index 0000000000..11f70e522a --- /dev/null +++ b/package/poco/Config.in @@ -0,0 +1,65 @@ +config BR2_PACKAGE_POCO + bool "poco" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !(BR2_arc || BR2_bfin || BR2_microblaze || BR2_mipsel || BR2_xtensa) + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_PCRE + help + The C++ Portable Components Libraries + + http://pocoproject.org + +if BR2_PACKAGE_POCO + +comment "poco components" + +config BR2_PACKAGE_POCO_XML + bool "xml" + select BR2_PACKAGE_EXPAT + +config BR2_PACKAGE_POCO_UTIL + bool "util" + select BR2_PACKAGE_POCO_XML + +config BR2_PACKAGE_POCO_NET + bool "net" + +config BR2_PACKAGE_POCO_CRYPTO + bool "crypto" + select BR2_PACKAGE_OPENSSL + +config BR2_PACKAGE_POCO_NETSSL_OPENSSL + bool "netssl_openssl" + select BR2_PACKAGE_POCO_NET + select BR2_PACKAGE_POCO_CRYPTO + select BR2_PACKAGE_POCO_UTIL + select BR2_PACKAGE_OPENSSL + +config BR2_PACKAGE_POCO_ZIP + bool "zip" + select BR2_PACKAGE_POCO_XML + select BR2_PACKAGE_POCO_NET + select BR2_PACKAGE_POCO_UTIL + +config BR2_PACKAGE_POCO_DATA + bool + +config BR2_PACKAGE_POCO_DATA_SQLITE + bool "sqlite" + select BR2_PACKAGE_POCO_DATA + select BR2_PACKAGE_SQLITE + +config BR2_PACKAGE_POCO_DATA_MYSQL + bool "mysql" + depends on BR2_USE_MMU # mysql + select BR2_PACKAGE_POCO_DATA + select BR2_PACKAGE_MYSQL_CLIENT + +endif # BR2_PACKAGE_POCO + +comment "poco needs a toolchain w/ wchar, threads, C++" + depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP \ + || !BR2_TOOLCHAIN_HAS_THREADS + depends on !(BR2_arc || BR2_bfin || BR2_microblaze || BR2_mipsel || BR2_xtensa) diff --git a/package/poco/poco-aarch64.patch b/package/poco/poco-aarch64.patch new file mode 100644 index 0000000000..f629f7ba92 --- /dev/null +++ b/package/poco/poco-aarch64.patch @@ -0,0 +1,39 @@ +From 37899eda9563d9134cb5864751b6432cabfaac3e Mon Sep 17 00:00:00 2001 +From: Will Newton +Date: Tue, 21 May 2013 22:11:05 +0100 +Subject: [PATCH] Foundation/include/Poco/Platform.h: Add support for AArch64. + +Add support for big and little endian AArch64 preprocessor defines. +--- + Foundation/include/Poco/Platform.h | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/Foundation/include/Poco/Platform.h b/Foundation/include/Poco/Platform.h +index f34f277..8ddb4cb 100644 +--- a/Foundation/include/Poco/Platform.h ++++ b/Foundation/include/Poco/Platform.h +@@ -145,6 +145,7 @@ + #define POCO_ARCH_S390 0x0c + #define POCO_ARCH_SH 0x0d + #define POCO_ARCH_NIOS2 0x0e ++#define POCO_ARCH_AARCH64 0x0f + + + #if defined(__ALPHA) || defined(__alpha) || defined(__alpha__) || defined(_M_ALPHA) +@@ -207,7 +208,12 @@ + #else + #define POCO_ARCH_BIG_ENDIAN 1 + #endif +- ++#elif defined(__AARCH64EL__) ++ #define POCO_ARCH POCO_ARCH_AARCH64 ++ #define POCO_ARCH_LITTLE_ENDIAN 1 ++#elif defined(__AARCH64EB__) ++ #define POCO_ARCH POCO_ARCH_AARCH64 ++ #define POCO_ARCH_BIG_ENDIAN 1 + #endif + + +-- +1.8.1.4 + diff --git a/package/poco/poco-add-cross-build-config.patch b/package/poco/poco-add-cross-build-config.patch new file mode 100644 index 0000000000..a08783833b --- /dev/null +++ b/package/poco/poco-add-cross-build-config.patch @@ -0,0 +1,82 @@ +From: Baruch Siach +Subject: [PATCH] poco: add Linux configuration file for generic cross build + +This patch adds the Linux-CrossEnv config file to poco. This file is identical +to the Linux one, except the added CROSSENV variable that allows setting of +the toolchain prefix. + +Signed-off-by: Baruch Siach +--- +diff -Nuar poco-1.4.1p1-dist/build/config/Linux-CrossEnv poco-1.4.1p1/build/config/Linux-CrossEnv +--- poco-1.4.1p1-dist/build/config/Linux-CrossEnv 1970-01-01 02:00:00.000000000 +0200 ++++ poco-1.4.1p1/build/config/Linux-CrossEnv 2011-08-02 18:51:03.682047719 +0300 +@@ -0,0 +1,69 @@ ++# ++# Linux ++# ++# Make settings for cross compiled Linux ++# ++# ++ ++# ++# General Settings ++# ++LINKMODE ?= SHARED ++ ++# ++# Define Tools ++# ++CC = $(CROSSENV)gcc ++CXX = $(CROSSENV)g++ ++LINK = $(CXX) ++LIB = $(CROSSENV)ar -cr ++RANLIB = $(CROSSENV)ranlib ++SHLIB = $(CXX) -shared -Wl,-soname,$(notdir $@) -o $@ ++SHLIBLN = $(POCO_BASE)/build/script/shlibln ++STRIP = $(CROSSENV)strip ++DEP = $(POCO_BASE)/build/script/makedepend.gcc ++SHELL = sh ++RM = rm -rf ++CP = cp ++MKDIR = mkdir -p ++ ++# ++# Extension for Shared Libraries ++# ++SHAREDLIBEXT = .so.$(target_version) ++SHAREDLIBLINKEXT = .so ++ ++# ++# Compiler and Linker Flags ++# ++CFLAGS = ++CFLAGS32 = ++CFLAGS64 = ++CXXFLAGS = -Wall -Wno-sign-compare ++CXXFLAGS32 = ++CXXFLAGS64 = ++LINKFLAGS = ++LINKFLAGS32 = ++LINKFLAGS64 = ++STATICOPT_CC = ++STATICOPT_CXX = ++STATICOPT_LINK = -static ++SHAREDOPT_CC = -fPIC ++SHAREDOPT_CXX = -fPIC ++SHAREDOPT_LINK = -Wl,-rpath,$(LIBPATH) ++DEBUGOPT_CC = -g -D_DEBUG ++DEBUGOPT_CXX = -g -D_DEBUG ++DEBUGOPT_LINK = -g ++RELEASEOPT_CC = -O2 -DNDEBUG ++RELEASEOPT_CXX = -O2 -DNDEBUG ++RELEASEOPT_LINK = -O2 ++ ++# ++# System Specific Flags ++# ++SYSFLAGS = -D_XOPEN_SOURCE=500 -D_REENTRANT -D_THREAD_SAFE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DPOCO_HAVE_FD_EPOLL ++ ++# ++# System Specific Libraries ++# ++SYSLIBS = -lpthread -ldl -lrt diff --git a/package/poco/poco-add-staging-search-path.patch b/package/poco/poco-add-staging-search-path.patch new file mode 100644 index 0000000000..a9397b4f1c --- /dev/null +++ b/package/poco/poco-add-staging-search-path.patch @@ -0,0 +1,23 @@ +From: Baruch Siach +Subject: [PATCH] poco: add the staging path to search path + +Add the mysql headers and client libraries to the search path of the +preprocessor and the linker. The $MYSQL_LIBDIR / $MYSQL_INCIDR variables +must be set from the make command line. + +[Peter: Remove host dirs, add MYSQL_INCDIR] +Signed-off-by: Baruch Siach +--- +--- poco-1.4.4-all-dist/Data/MySQL/Makefile 2012-09-20 01:30:42.000000000 +0300 ++++ poco-1.4.4-all/Data/MySQL/Makefile 2012-10-11 14:36:10.343153420 +0200 +@@ -8,8 +8,8 @@ + + include $(POCO_BASE)/build/rules/global + +-SYSLIBS += -L/usr/local/lib$(LIB64SUFFIX)/mysql -L/usr/lib$(LIB64SUFFIX)/mysql -L/usr/mysql/lib$(LIB64SUFFIX)/mysql -L/usr/local/mysql/lib$(LIB64SUFFIX) -lmysqlclient +-INCLUDE += -I/usr/local/include/mysql/ -I/usr/include/mysql -I/usr/mysql/include/mysql -I/usr/local/mysql/include ++SYSLIBS += -L$(MYSQL_LIBDIR) -lmysqlclient ++INCLUDE += -I$(MYSQL_INCDIR) + SYSFLAGS += -DTHREADSAFE -DNO_TCL + + objects = Binder Extractor SessionImpl Connector \ diff --git a/package/poco/poco-dont-build-debug-libs.patch b/package/poco/poco-dont-build-debug-libs.patch new file mode 100644 index 0000000000..7480963721 --- /dev/null +++ b/package/poco/poco-dont-build-debug-libs.patch @@ -0,0 +1,19 @@ +From: Baruch Siach +Subject: [PATCH] poco: don't build debug libraries + +Remove the debug libraries build dependency from the default target. + +Signed-off-by: Baruch Siach +--- + +--- poco-1.4.1p1-dist/build/rules/compile 2011-02-09 11:12:24.000000000 +0200 ++++ poco-1.4.1p1/build/rules/compile 2011-08-03 07:51:42.946044176 +0300 +@@ -14,7 +14,7 @@ + + all: $(DEFAULT_TARGET) + all_static: static_debug static_release +-all_shared: shared_debug shared_release ++all_shared: shared_release + all_debug: static_debug shared_debug + all_release: static_release shared_release + diff --git a/package/poco/poco.mk b/package/poco/poco.mk new file mode 100644 index 0000000000..3516c04455 --- /dev/null +++ b/package/poco/poco.mk @@ -0,0 +1,67 @@ +################################################################################ +# +# poco +# +################################################################################ + +POCO_VERSION_MAJOR = 1.4.6 +POCO_VERSION = $(POCO_VERSION_MAJOR)p1 +POCO_SOURCE = poco-$(POCO_VERSION)-all.tar.gz +POCO_SITE = http://downloads.sourceforge.net/project/poco/sources/poco-$(POCO_VERSION_MAJOR) +POCO_LICENSE = Boost-v1.0 +POCO_LICENSE_FILES = LICENSE +POCO_INSTALL_STAGING = YES + +POCO_DEPENDENCIES = zlib pcre \ + $(if $(BR2_PACKAGE_POCO_XML),expat) \ + $(if $(BR2_PACKAGE_POCO_CRYPTO),openssl) \ + $(if $(BR2_PACKAGE_POCO_NETSSL_OPENSSL),openssl) \ + $(if $(BR2_PACKAGE_POCO_DATA_SQLITE),sqlite) \ + $(if $(BR2_PACKAGE_POCO_DATA_MYSQL),mysql_client) + +POCO_OMIT = Data/ODBC PageCompiler \ + $(if $(BR2_PACKAGE_POCO_XML),,XML) \ + $(if $(BR2_PACKAGE_POCO_UTIL),,Util) \ + $(if $(BR2_PACKAGE_POCO_NET),,Net) \ + $(if $(BR2_PACKAGE_POCO_NETSSL_OPENSSL),,NetSSL_OpenSSL) \ + $(if $(BR2_PACKAGE_POCO_CRYPTO),,Crypto) \ + $(if $(BR2_PACKAGE_POCO_ZIP),,Zip) \ + $(if $(BR2_PACKAGE_POCO_DATA),,Data) \ + $(if $(BR2_PACKAGE_POCO_DATA_MYSQL),,Data/MySQL) \ + $(if $(BR2_PACKAGE_POCO_DATA_SQLITE),,Data/SQLite) + +ifeq ($(LIBC),uclibc) +POCO_CONF_OPT += --no-fpenvironment --no-wstring +endif + +# sh4a is missing FE_DOWNWARD and FE_UPWARD in its fenv.h +ifeq ($(BR2_sh4a),y) +POCO_CONF_OPT += --no-fpenvironment +endif + +define POCO_CONFIGURE_CMDS + (cd $(@D); ./configure \ + --config=Linux-CrossEnv \ + --prefix=/usr \ + --omit="$(POCO_OMIT)" \ + $(POCO_CONF_OPT) \ + --unbundled \ + --no-tests \ + --no-samples) +endef + +define POCO_BUILD_CMDS + $(MAKE1) POCO_TARGET_OSARCH=$(ARCH) CROSSENV=$(TARGET_CROSS) \ + MYSQL_LIBDIR=$(STAGING_DIR)/usr/lib/mysql \ + MYSQL_INCDIR=$(STAGING_DIR)/usr/include/mysql -C $(@D) +endef + +define POCO_INSTALL_STAGING_CMDS + $(MAKE) DESTDIR=$(STAGING_DIR) POCO_TARGET_OSARCH=$(ARCH) install -C $(@D) +endef + +define POCO_INSTALL_TARGET_CMDS + $(MAKE) DESTDIR=$(TARGET_DIR) POCO_TARGET_OSARCH=$(ARCH) install -C $(@D) +endef + +$(eval $(generic-package)) diff --git a/package/polarssl/Config.in b/package/polarssl/Config.in new file mode 100644 index 0000000000..3414a7f7fd --- /dev/null +++ b/package/polarssl/Config.in @@ -0,0 +1,28 @@ +config BR2_PACKAGE_POLARSSL + bool "polarssl" + help + PolarSSL is an SSL library written in ANSI C. PolarSSL makes + it easy for developers to include cryptographic and SSL/TLS + capabilities in their (embedded) products with as little + hassle as possible. It is designed to be readable, + documented, tested, loosely coupled and portable. + + Warning: PolarSSL is licensed under the GPL. If you want to + use it in your own proprietary applications, you have to + purchase a commercial license. + + http://polarssl.org/ + +config BR2_PACKAGE_POLARSSL_PROGRAMS + bool "polarssl programs" + depends on BR2_PACKAGE_POLARSSL + help + This option enables the installation and the build of + PolarSSL companion programs: aescrypt2, benchmark, cert_app, + crl_app, crypt_and_hash, dh_client, dh_genprime, dh_server, + gen_entropy, generic_sum, gen_random_ctr_drbg, + gen_random_havege, hello, key_app, md5sum, mpi_demo, + rsa_decrypt, rsa_encrypt, rsa_genkey, rsa_sign, rsa_verify, + selftest, sha1sum, sha2sum, ssi-cgi, ssl_cert_test, + ssl_client1, ssl_client2, ssl_fork_server, ssl_mail_client, + ssl_server, ssl_test diff --git a/package/polarssl/polarssl-no-programs.patch b/package/polarssl/polarssl-no-programs.patch new file mode 100644 index 0000000000..f1188716bc --- /dev/null +++ b/package/polarssl/polarssl-no-programs.patch @@ -0,0 +1,26 @@ +Add the BUILD_PROGRAMS option to disable programs build + +By default, PolarSSL builds and installs a large set of companions +programs, which in some cases are not useful. This patch adds the +BUILD_PROGRAMS option which allows to disable the build and +installation of such programs when not needed. + +Signed-off-by: Thomas Petazzoni + +Index: polarssl-1.1.1/CMakeLists.txt +=================================================================== +--- polarssl-1.1.1.orig/CMakeLists.txt ++++ polarssl-1.1.1/CMakeLists.txt +@@ -33,7 +33,11 @@ + add_subdirectory(tests) + endif(CMAKE_COMPILER_IS_GNUCC AND BUILD_TESTS) + +-add_subdirectory(programs) ++option(BUILD_PROGRAMS "Build programs." ON) ++ ++if(BUILD_PROGRAMS) ++ add_subdirectory(programs) ++endif(BUILD_PROGRAMS) + + ADD_CUSTOM_TARGET(apidoc + COMMAND doxygen doxygen/polarssl.doxyfile diff --git a/package/polarssl/polarssl-no-test-suite.patch b/package/polarssl/polarssl-no-test-suite.patch new file mode 100644 index 0000000000..7e0744132d --- /dev/null +++ b/package/polarssl/polarssl-no-test-suite.patch @@ -0,0 +1,26 @@ +Add BUILD_TESTS option to disable test suite + +By default, PolarSSL builds a fairly extensive test suite to validate +the library. In the context of Buildroot, building this test suite is +not really useful, so we add a BUILD_TESTS to disable its build. + +Signed-off-by: Thomas Petazzoni + +Index: polarssl-1.1.1/CMakeLists.txt +=================================================================== +--- polarssl-1.1.1.orig/CMakeLists.txt ++++ polarssl-1.1.1/CMakeLists.txt +@@ -27,9 +27,11 @@ + add_subdirectory(library) + add_subdirectory(include) + +-if(CMAKE_COMPILER_IS_GNUCC) ++option(BUILD_TESTS "Build tests." ON) ++ ++if(CMAKE_COMPILER_IS_GNUCC AND BUILD_TESTS) + add_subdirectory(tests) +-endif(CMAKE_COMPILER_IS_GNUCC) ++endif(CMAKE_COMPILER_IS_GNUCC AND BUILD_TESTS) + + add_subdirectory(programs) + diff --git a/package/polarssl/polarssl-shared-and-static-library.patch b/package/polarssl/polarssl-shared-and-static-library.patch new file mode 100644 index 0000000000..7e41745d36 --- /dev/null +++ b/package/polarssl/polarssl-shared-and-static-library.patch @@ -0,0 +1,55 @@ +Allow both shared and static PolarSSL library + +By default, PolarSSL is built as a static library. If the option +USE_SHARED_POLARSSL_LIBRARY is set, then it is build as a shared +library. But there is no way of building both the shared and static +versions. + +This patch adds the USE_STATIC_POLARSSL_LIBRARY (which defaults to ON) +in addition to the existing USE_SHARED_POLARSSL_LIBRARY (which +defaults to OFF). Both options can be manipulated independently. + +[Gustavo: update for polarssl 1.2.10] +Signed-off-by: Thomas Petazzoni +Signed-off-by: Gustavo Zacarias + +diff -Nura polarssl-1.2.3.orig/library/CMakeLists.txt polarssl-1.2.3/library/CMakeLists.txt +--- polarssl-1.2.3.orig/library/CMakeLists.txt 2012-11-27 17:16:20.735678722 -0300 ++++ polarssl-1.2.3/library/CMakeLists.txt 2012-11-27 17:18:09.760457733 -0300 +@@ -1,4 +1,5 @@ + option(USE_SHARED_POLARSSL_LIBRARY "Build PolarSSL as a shared library." OFF) ++option(USE_STATIC_POLARSSL_LIBRARY "Build PolarSSL as a static library." ON) + + set(src + aes.c +@@ -50,19 +51,23 @@ + set(libs ws2_32) + endif(WIN32) + +-if(NOT USE_SHARED_POLARSSL_LIBRARY) +- +-add_library(polarssl STATIC ${src}) +- +-else(NOT USE_SHARED_POLARSSL_LIBRARY) ++if(USE_SHARED_POLARSSL_LIBRARY) + + add_library(polarssl SHARED ${src}) + set_target_properties(polarssl PROPERTIES VERSION 1.2.10 SOVERSION 3) ++set_target_properties(polarssl PROPERTIES OUTPUT_NAME polarssl) ++ ++endif(USE_SHARED_POLARSSL_LIBRARY) ++ ++if(USE_STATIC_POLARSSL_LIBRARY) ++ ++add_library(polarssl-static STATIC ${src}) ++set_target_properties(polarssl-static PROPERTIES OUTPUT_NAME polarssl) + +-endif(NOT USE_SHARED_POLARSSL_LIBRARY) ++endif(USE_STATIC_POLARSSL_LIBRARY) + + target_link_libraries(polarssl ${libs}) + +-install(TARGETS polarssl ++install(TARGETS polarssl polarssl-static + DESTINATION ${LIB_INSTALL_DIR} + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) diff --git a/package/polarssl/polarssl.mk b/package/polarssl/polarssl.mk new file mode 100644 index 0000000000..20486e3ae1 --- /dev/null +++ b/package/polarssl/polarssl.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# polarssl +# +################################################################################ + +POLARSSL_SITE = https://polarssl.org/code/releases +POLARSSL_VERSION = 1.2.10 +POLARSSL_SOURCE = polarssl-$(POLARSSL_VERSION)-gpl.tgz +POLARSSL_CONF_OPT = \ + -DUSE_SHARED_POLARSSL_LIBRARY=ON \ + -DUSE_STATIC_POLARSSL_LIBRARY=ON \ + -DBUILD_TESTS=OFF \ + -DBUILD_PROGRAMS=$(if $(BR2_PACKAGE_POLARSSL_PROGRAMS),ON,OFF) + +POLARSSL_INSTALL_STAGING = YES +POLARSSL_LICENSE = GPLv2 +POLARSSL_LICENSE_FILES = LICENSE + +$(eval $(cmake-package)) diff --git a/package/polkit/Config.in b/package/polkit/Config.in new file mode 100644 index 0000000000..d685e5cc39 --- /dev/null +++ b/package/polkit/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_POLKIT + bool "polkit" + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_EXPAT + help + PolicyKit is a toolkit for defining and handling + authorizations. It is used for allowing unprivileged + processes to speak to privileged processes. + + http://www.freedesktop.org/wiki/Software/polkit + +comment "polkit needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/polkit/polkit.mk b/package/polkit/polkit.mk new file mode 100644 index 0000000000..5ff530b8ec --- /dev/null +++ b/package/polkit/polkit.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# polkit +# +################################################################################ + +POLKIT_VERSION = 0.103 +POLKIT_SITE = http://www.freedesktop.org/software/polkit/releases/ +POLKIT_LICENSE = GPLv2 +POLKIT_LICENSE_FILES = COPYING + +POLKIT_INSTALL_STAGING = YES + +POLKIT_DEPENDENCIES = libglib2 host-intltool expat + +# We could also support --with-authfw=pam +POLKIT_CONF_OPT = \ + --with-authfw=shadow \ + --with-os-type=unknown \ + --disable-man-pages \ + --disable-examples + +$(eval $(autotools-package)) diff --git a/package/poppler/Config.in b/package/poppler/Config.in new file mode 100644 index 0000000000..919de3eef6 --- /dev/null +++ b/package/poppler/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_POPPLER + bool "poppler" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_FONTCONFIG + select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7 + help + Poppler is a PDF rendering library based on the xpdf-3.0 code base. + + http://poppler.freedesktop.org/ + +comment "poppler needs a toolchain w/ C++, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/poppler/poppler.mk b/package/poppler/poppler.mk new file mode 100644 index 0000000000..56a4d3ffb1 --- /dev/null +++ b/package/poppler/poppler.mk @@ -0,0 +1,64 @@ +################################################################################ +# +# poppler +# +################################################################################ + +POPPLER_VERSION = 0.24.2 +POPPLER_SOURCE = poppler-$(POPPLER_VERSION).tar.xz +POPPLER_SITE = http://poppler.freedesktop.org +POPPLER_DEPENDENCIES = fontconfig +POPPLER_LICENSE = GPLv2+ +POPPLER_LICENSE_FILES = COPYING +POPPLER_CONF_OPT = --with-font-configuration=fontconfig + +ifeq ($(BR2_PACKAGE_LCMS2),y) + POPPLER_CONF_OPT += --enable-cms=lcms2 + POPPLER_DEPENDENCIES += lcms2 +else + POPPLER_CONF_OPT += --enable-cms=none +endif + +ifeq ($(BR2_PACKAGE_TIFF),y) + POPPLER_CONF_OPT += --enable-libtiff + POPPLER_DEPENDENCIES += tiff +else + POPPLER_CONF_OPT += --disable-libtiff +endif + +ifeq ($(BR2_PACKAGE_JPEG),y) + POPPLER_CONF_OPT += --enable-libjpeg + POPPLER_DEPENDENCIES += jpeg +else + POPPLER_CONF_OPT += --disable-libjpeg +endif + +ifeq ($(BR2_PACKAGE_LIBPNG),y) + POPPLER_CONF_OPT += --enable-libpng + POPPLER_DEPENDENCIES += libpng +else + POPPLER_CONF_OPT += --disable-libpng +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) + POPPLER_CONF_OPT += --enable-zlib + POPPLER_DEPENDENCIES += zlib +else + POPPLER_CONF_OPT += --disable-zlib +endif + +ifeq ($(BR2_PACKAGE_POPPLER_LIBCURL),y) + POPPLER_CONF_OPT += --enable-libcurl + POPPLER_DEPENDENCIES += libcurl +else + POPPLER_CONF_OPT += --disable-libcurl +endif + +ifeq ($(BR2_PACKAGE_XORG7),y) + POPPLER_CONF_OPT += --with-x + POPPLER_DEPENDENCIES += xlib_libX11 xlib_libXext +else + POPPLER_CONF_OPT += --without-x +endif + +$(eval $(autotools-package)) diff --git a/package/popt/popt.mk b/package/popt/popt.mk index 0f9d313dcf..180972a293 100644 --- a/package/popt/popt.mk +++ b/package/popt/popt.mk @@ -1,13 +1,15 @@ -############################################################# +################################################################################ # # popt # -############################################################# -POPT_VERSION:=1.15 -POPT_SITE:=http://rpm5.org/files/popt -POPT_INSTALL_STAGING = YES -POPT_INSTALL_TARGET = YES +################################################################################ +POPT_VERSION = 1.16 +# rpm5.org down +POPT_SITE = http://anduin.linuxfromscratch.org/sources/BLFS/svn/p/ +POPT_INSTALL_STAGING = YES +POPT_LICENSE = MIT +POPT_LICENSE_FILES = COPYING POPT_CONF_ENV = ac_cv_va_copy=yes @@ -16,4 +18,5 @@ POPT_CONF_ENV += am_cv_lib_iconv=yes POPT_CONF_OPT += --with-libiconv-prefix=$(STAGING_DIR)/usr endif -$(eval $(call AUTOTARGETS,package,popt)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/portaudio/Config.in b/package/portaudio/Config.in new file mode 100644 index 0000000000..eaf095cc83 --- /dev/null +++ b/package/portaudio/Config.in @@ -0,0 +1,34 @@ +comment "portaudio needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_PORTAUDIO + bool "portaudio" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + PortAudio is a free, cross-platform, open-source, + audio I/O library. + + http://www.portaudio.com/ + +if BR2_PACKAGE_PORTAUDIO + +config BR2_PACKAGE_PORTAUDIO_ALSA + bool "alsa support" + select BR2_PACKAGE_ALSA_LIB + depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib + default y + help + Compile with ALSA support. + +config BR2_PACKAGE_PORTAUDIO_OSS + bool "oss support" + help + Compile with OSS support. + +config BR2_PACKAGE_PORTAUDIO_CXX + bool "C++ bindings" + depends on BR2_INSTALL_LIBSTDCPP + help + Enables C++ bindings. + +endif # BR2_PACKAGE_PORTAUDIO diff --git a/package/portaudio/portaudio.mk b/package/portaudio/portaudio.mk new file mode 100644 index 0000000000..0efec5c168 --- /dev/null +++ b/package/portaudio/portaudio.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# portaudio +# +################################################################################ + +PORTAUDIO_VERSION = v19_20111121 +PORTAUDIO_SITE = http://www.portaudio.com/archives +PORTAUDIO_SOURCE = pa_stable_$(PORTAUDIO_VERSION).tgz +PORTAUDIO_INSTALL_STAGING = YES +PORTAUDIO_MAKE = $(MAKE1) +PORTAUDIO_LICENSE = portaudio license (MIT-like plus special clause) +PORTAUDIO_LICENSE_FILES = LICENSE.txt + +PORTAUDIO_DEPENDENCIES = \ + $(if $(BR2_PACKAGE_PORTAUDIO_WITH_ALSA),alsa-lib) + +PORTAUDIO_CONF_OPT = \ + $(if $(BR2_PACKAGE_PORTAUDIO_ALSA),--with-alsa,--without-alsa) \ + $(if $(BR2_PACKAGE_PORTAUDIO_OSS),--with-oss,--without-oss) \ + $(if $(BR2_PACKAGE_PORTAUDIO_CXX),--enable-cxx,--disable-cxx) + +$(eval $(autotools-package)) diff --git a/package/portmap/Config.in b/package/portmap/Config.in index 1f22ab6cbb..fa7eaf1e0e 100644 --- a/package/portmap/Config.in +++ b/package/portmap/Config.in @@ -1,10 +1,12 @@ config BR2_PACKAGE_PORTMAP bool "portmap" - depends on BR2_INET_RPC + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC help The standard portmapper for RPC services. + Note that portmap is being deprecated in favour of rpcbind. + http://neil.brown.name/portmap/ -comment "portmap requires a toolchain with 'Enable RPC' selected" - depends on !BR2_INET_RPC +comment "portmap needs a toolchain w/ RPC" + depends on !BR2_TOOLCHAIN_HAS_NATIVE_RPC diff --git a/package/portmap/portmap.mk b/package/portmap/portmap.mk index e996824307..a43fc1fc8e 100644 --- a/package/portmap/portmap.mk +++ b/package/portmap/portmap.mk @@ -1,8 +1,8 @@ -############################################################# +################################################################################ # # portmap # -############################################################# +################################################################################ PORTMAP_VERSION = 6.0 PORTMAP_SOURCE = portmap-$(PORTMAP_VERSION).tgz @@ -43,4 +43,4 @@ define PORTMAP_UNINSTALL_TARGET_CMDS $(addsuffix .8,$(PORTMAP_SBINS))) endef -$(eval $(call GENTARGETS,package,portmap)) +$(eval $(generic-package)) diff --git a/package/powervr/Config.in b/package/powervr/Config.in new file mode 100644 index 0000000000..d09ce74d6a --- /dev/null +++ b/package/powervr/Config.in @@ -0,0 +1,2 @@ +config BR2_PACKAGE_HAS_POWERVR + bool diff --git a/package/powervr/powervr.mk b/package/powervr/powervr.mk new file mode 100644 index 0000000000..83392fde36 --- /dev/null +++ b/package/powervr/powervr.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# powervr +# +################################################################################ + +POWERVR_SOURCE = + +ifeq ($(BR2_PACKAGE_TI_GFX),y) +POWERVR_DEPENDENCIES += ti-gfx +endif + +ifeq ($(POWERVR_DEPENDENCIES),) +define POWERVR_CONFIGURE_CMDS + echo "No PowerVR implementation selected. Configuration error." + exit 1 +endef +endif + +$(eval $(generic-package)) diff --git a/package/pppd/Config.in b/package/pppd/Config.in index 879b263cf3..dc16b22cb3 100644 --- a/package/pppd/Config.in +++ b/package/pppd/Config.in @@ -1,5 +1,7 @@ config BR2_PACKAGE_PPPD bool "pppd" + depends on !BR2_PREFER_STATIC_LIB + depends on BR2_USE_MMU help An implementation of the Point-to-point protocol. @@ -19,3 +21,7 @@ config BR2_PACKAGE_PPPD_RADIUS bool "radius" help Install RADIUS support for pppd + +comment "pppd needs a toolchain w/ dynamic library" + depends on BR2_PREFER_STATIC_LIB + depends on BR2_USE_MMU diff --git a/package/pppd/pppd-2.4.5-ol2tpv3-2.6.35.patch b/package/pppd/pppd-2.4.5-ol2tpv3-2.6.35.patch deleted file mode 100644 index 0e71e24093..0000000000 --- a/package/pppd/pppd-2.4.5-ol2tpv3-2.6.35.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- ppp-2.4.5/include/linux/if_pppol2tp.h 2009-11-16 22:26:07.000000000 +0000 -+++ ppp-2.4.5/include/linux/if_pppol2tp.h 2010-07-16 22:35:22.000000000 +0100 -@@ -32,6 +32,20 @@ - __u16 d_tunnel, d_session; /* For sending outgoing packets */ - }; - -+/* The L2TPv3 protocol changes tunnel and session ids from 16 to 32 -+ * bits. So we need a different sockaddr structure. -+ */ -+struct pppol2tpv3_addr { -+ pid_t pid; /* pid that owns the fd. -+ * 0 => current */ -+ int fd; /* FD of UDP or IP socket to use */ -+ -+ struct sockaddr_in addr; /* IP address and port to send to */ -+ -+ __u32 s_tunnel, s_session; /* For matching incoming packets */ -+ __u32 d_tunnel, d_session; /* For sending outgoing packets */ -+}; -+ - /* Socket options: - * DEBUG - bitmask of debug message categories - * SENDSEQ - 0 => don't send packets with sequence numbers - diff --git a/package/pppd/pppd.mk b/package/pppd/pppd.mk index 05c1c32c9d..471a71ea80 100644 --- a/package/pppd/pppd.mk +++ b/package/pppd/pppd.mk @@ -1,12 +1,16 @@ -############################################################# +################################################################################ # # pppd # -############################################################# +################################################################################ PPPD_VERSION = 2.4.5 PPPD_SOURCE = ppp-$(PPPD_VERSION).tar.gz PPPD_SITE = ftp://ftp.samba.org/pub/ppp +PPPD_LICENSE = LGPLv2+ LGPL BSD-4c BSD-3c GPLv2+ +PPPD_LICENSE_FILES = pppd/tdb.c pppd/plugins/pppoatm/COPYING \ + pppdump/bsd-comp.c pppd/ccp.c pppd/plugins/passprompt.c + PPPD_TARGET_BINS = chat pppd pppdump pppstats PPPD_MANPAGES = $(if $(BR2_HAVE_DOCUMENTATION),chat pppd pppdump pppstats) PPPD_RADIUS_MANPAGES = $(if $(BR2_HAVE_DOCUMENTATION),pppd-radattr pppd-radius) @@ -23,10 +27,19 @@ ifeq ($(BR2_INET_IPV6),y) PPPD_MAKE_OPT += HAVE_INET6=y endif +# pppd bundles some but not all of the needed kernel headers. The embedded +# if_pppol2tp.h is unfortunately not compatible with kernel headers > 2.6.34, +# and has been part of the kernel headers since 2.6.23, so drop it +define PPPD_DROP_INTERNAL_IF_PPOL2TP_H + $(RM) $(@D)/include/linux/if_pppol2tp.h +endef + +PPPD_POST_EXTRACT_HOOKS += PPPD_DROP_INTERNAL_IF_PPOL2TP_H + define PPPD_CONFIGURE_CMDS $(SED) 's/FILTER=y/#FILTER=y/' $(PPPD_DIR)/pppd/Makefile.linux $(SED) 's/ifneq ($$(wildcard \/usr\/include\/pcap-bpf.h),)/ifdef FILTER/' $(PPPD_DIR)/*/Makefile.linux - ( cd $(@D); ./configure ) + ( cd $(@D); ./configure --prefix=/usr ) endef define PPPD_BUILD_CMDS @@ -102,4 +115,4 @@ define PPPD_INSTALL_TARGET_CMDS done endef -$(eval $(call GENTARGETS,package,pppd)) +$(eval $(generic-package)) diff --git a/package/pptp-linux/Config.in b/package/pptp-linux/Config.in index 165f79bdc2..e03a906efd 100644 --- a/package/pptp-linux/Config.in +++ b/package/pptp-linux/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_PPTP_LINUX bool "pptp-linux" + depends on BR2_USE_MMU # fork() help An implementation of the Point-to-point protocol client. diff --git a/package/pptp-linux/pptp-linux-1.7.0-001-susv3-legacy.patch b/package/pptp-linux/pptp-linux-001-susv3-legacy.patch similarity index 100% rename from package/pptp-linux/pptp-linux-1.7.0-001-susv3-legacy.patch rename to package/pptp-linux/pptp-linux-001-susv3-legacy.patch diff --git a/package/pptp-linux/pptp-linux-1.7.2-drop-stropts.patch b/package/pptp-linux/pptp-linux-002-drop-stropts.patch similarity index 100% rename from package/pptp-linux/pptp-linux-1.7.2-drop-stropts.patch rename to package/pptp-linux/pptp-linux-002-drop-stropts.patch diff --git a/package/pptp-linux/pptp-linux-1.7.2-ip-path.patch b/package/pptp-linux/pptp-linux-003-ip-path.patch similarity index 100% rename from package/pptp-linux/pptp-linux-1.7.2-ip-path.patch rename to package/pptp-linux/pptp-linux-003-ip-path.patch diff --git a/package/pptp-linux/pptp-linux-004-fix-parallel-build.patch b/package/pptp-linux/pptp-linux-004-fix-parallel-build.patch new file mode 100644 index 0000000000..04a797743f --- /dev/null +++ b/package/pptp-linux/pptp-linux-004-fix-parallel-build.patch @@ -0,0 +1,23 @@ +Fix parallel build issue + +The config.h header file must be created before being used to build +source files that include it, especially version.c. In order for this +to happen even in highly-parallel builds, we add a dependency of all +object files on config.h, in order to ensure it gets generated before +make attempts to build the object files. + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -37,6 +37,8 @@ + + all: config.h $(PPTP_BIN) pptpsetup.8 + ++$(PPTP_OBJS): config.h ++ + $(PPTP_BIN): $(PPTP_OBJS) $(PPTP_DEPS) + $(CC) -o $(PPTP_BIN) $(PPTP_OBJS) $(LDFLAGS) $(LIBS) + diff --git a/package/pptp-linux/pptp-linux.mk b/package/pptp-linux/pptp-linux.mk index 605f30d578..ee0fab6cfe 100644 --- a/package/pptp-linux/pptp-linux.mk +++ b/package/pptp-linux/pptp-linux.mk @@ -1,12 +1,15 @@ -############################################################# +################################################################################ # # pptp-linux # -############################################################# +################################################################################ PPTP_LINUX_VERSION = 1.7.2 -PPTP_LINUX_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/pptpclient +PPTP_LINUX_SITE = http://downloads.sourceforge.net/project/pptpclient/pptp/pptp-$(PPTP_LINUX_VERSION) PPTP_LINUX_SOURCE = pptp-$(PPTP_LINUX_VERSION).tar.gz +PPTP_LINUX_MAKE = $(MAKE1) +PPTP_LINUX_LICENSE = GPLv2+ +PPTP_LINUX_LICENSE_FILES = COPYING define PPTP_LINUX_BUILD_CMDS $(MAKE) -C $(@D) OPTIMIZE= DEBUG= \ @@ -25,4 +28,4 @@ define PPTP_LINUX_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/share/man/man8/pptp.8 endef -$(eval $(call GENTARGETS,package,pptp-linux)) +$(eval $(generic-package)) diff --git a/package/games/prboom/Config.in b/package/prboom/Config.in similarity index 100% rename from package/games/prboom/Config.in rename to package/prboom/Config.in diff --git a/package/games/prboom/prboom-2.5.0-libpng-1.4.patch b/package/prboom/prboom-2.5.0-libpng-1.4.patch similarity index 100% rename from package/games/prboom/prboom-2.5.0-libpng-1.4.patch rename to package/prboom/prboom-2.5.0-libpng-1.4.patch diff --git a/package/games/prboom/prboom.mk b/package/prboom/prboom.mk similarity index 75% rename from package/games/prboom/prboom.mk rename to package/prboom/prboom.mk index 3a50fd502f..1da08ceb98 100644 --- a/package/games/prboom/prboom.mk +++ b/package/prboom/prboom.mk @@ -1,11 +1,13 @@ -############################################################# +################################################################################ # -# PrBoom +# prboom # -############################################################# +################################################################################ + PRBOOM_VERSION = 2.5.0 +PRBOOM_SITE = http://downloads.sourceforge.net/project/prboom/prboom%20stable/$(PRBOOM_VERSION) PRBOOM_CONF_ENV = ac_cv_type_uid_t=yes -PRBOOM_DEPENDENCIES = sdl SDL_net sdl_mixer +PRBOOM_DEPENDENCIES = sdl sdl_net sdl_mixer ifeq ($(BR2_PACKAGE_LIBPNG),y) PRBOOM_DEPENDENCIES += libpng @@ -41,4 +43,4 @@ define PRBOOM_UINSTALL_TARGET_CMDS $(TARGET_DIR)/usr/games/prboom endef -$(eval $(call AUTOTARGETS,package/games,prboom)) +$(eval $(autotools-package)) diff --git a/package/procps/procps-make-3.82.patch b/package/procps/procps-make-3.82.patch new file mode 100644 index 0000000000..2a563561bf --- /dev/null +++ b/package/procps/procps-make-3.82.patch @@ -0,0 +1,23 @@ +[PATCH] procps: fix build with make 3.82 + +Equivalent to upstream fix: +http://procps.cvs.sourceforge.net/viewvc/procps/procps/Makefile?r1=1.70&r2=1.71 + +Signed-off-by: Peter Korsgaard +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: procps-3.2.8/Makefile +=================================================================== +--- procps-3.2.8.orig/Makefile ++++ procps-3.2.8/Makefile +@@ -174,7 +174,7 @@ + # want this rule first, use := on ALL, and ALL not filled in yet + all: do_all + +--include */module.mk ++-include proc/module.mk ps/module.mk + + do_all: $(ALL) + diff --git a/package/procps/procps.mk b/package/procps/procps.mk index 3add243f63..dc2b8413b6 100644 --- a/package/procps/procps.mk +++ b/package/procps/procps.mk @@ -1,53 +1,25 @@ -############################################################# +################################################################################ # # procps # -############################################################# -PROCPS_VERSION:=3.2.7 -PROCPS_SOURCE:=procps-$(PROCPS_VERSION).tar.gz -PROCPS_SITE:=http://procps.sourceforge.net/ -PROCPS_DIR:=$(BUILD_DIR)/procps-$(PROCPS_VERSION) -PROCPS_BINARY:=ps/ps -PROCPS_TARGET_BINARY:=usr/bin/vmstat +################################################################################ -$(DL_DIR)/$(PROCPS_SOURCE): - $(call DOWNLOAD,$(PROCPS_SITE),$(PROCPS_SOURCE)) +PROCPS_VERSION = 3.2.8 +PROCPS_SITE = http://procps.sourceforge.net/ +PROCPS_LICENSE = GPLv2+, libproc and libps LGPLv2+ +PROCPS_LICENSE_FILES = COPYING COPYING.LIB -$(PROCPS_DIR)/.source: $(DL_DIR)/$(PROCPS_SOURCE) - $(ZCAT) $(DL_DIR)/$(PROCPS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - toolchain/patch-kernel.sh $(PROCPS_DIR) package/procps/ procps\*.patch - touch $(PROCPS_DIR)/.source +PROCPS_DEPENDENCIES = ncurses -$(PROCPS_DIR)/$(PROCPS_BINARY): $(PROCPS_DIR)/.source - $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(PROCPS_DIR) +define PROCPS_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef -$(TARGET_DIR)/$(PROCPS_TARGET_BINARY): $(PROCPS_DIR)/$(PROCPS_BINARY) - $(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR=$(TARGET_DIR) \ - install='install -D' -C $(PROCPS_DIR) lib64=/lib \ - ldconfig='/bin/true' install - rm -Rf $(TARGET_DIR)/usr/share/man +define PROCPS_INSTALL_TARGET_CMDS + mkdir -p $(addprefix $(TARGET_DIR)/,usr/bin bin sbin) \ + $(addprefix $(TARGET_DIR)/usr/share/man/,man1 man5 man8) + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) lib64=lib install=install \ + ldconfig=true install +endef -procps: ncurses $(TARGET_DIR)/$(PROCPS_TARGET_BINARY) - -procps-source: $(DL_DIR)/$(PROCPS_SOURCE) - -procps-clean: - for bin in uptime tload free w \ - top vmstat watch skill \ - snice kill sysctl pmap \ - pgrep pkill slabtop; do \ - rm -f $(TARGET_DIR)/usr/bin/$${bin}; \ - done - rm -f $(TARGET_DIR)/lib/libproc* - -procps-dirclean: - rm -rf $(PROCPS_DIR) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_PROCPS),y) -TARGETS+=procps -endif +$(eval $(generic-package)) diff --git a/package/proftpd/Config.in b/package/proftpd/Config.in index abdedc9e5b..18407d173d 100644 --- a/package/proftpd/Config.in +++ b/package/proftpd/Config.in @@ -1,6 +1,13 @@ config BR2_PACKAGE_PROFTPD bool "proftpd" + depends on BR2_USE_MMU # fork() help ProFTPD, a highly configurable FTP server. http://www.proftpd.org/ + +config BR2_PACKAGE_PROFTPD_MOD_REWRITE + bool "mod_rewrite support" + depends on BR2_PACKAGE_PROFTPD + help + Compile ProFTPD with mod_rewrite support diff --git a/package/proftpd/proftpd-1.3.3b-fix-kernel-header-capability-version.patch b/package/proftpd/proftpd-1.3.3g-fix-kernel-header-capability-version.patch similarity index 100% rename from package/proftpd/proftpd-1.3.3b-fix-kernel-header-capability-version.patch rename to package/proftpd/proftpd-1.3.3g-fix-kernel-header-capability-version.patch diff --git a/package/proftpd/proftpd.mk b/package/proftpd/proftpd.mk index 0dc0198180..0aab5cf995 100644 --- a/package/proftpd/proftpd.mk +++ b/package/proftpd/proftpd.mk @@ -1,11 +1,14 @@ -############################################################# +################################################################################ # # proftpd # -############################################################# +################################################################################ + PROFTPD_VERSION = 1.3.4b PROFTPD_SOURCE = proftpd-$(PROFTPD_VERSION).tar.gz PROFTPD_SITE = ftp://ftp.proftpd.org/distrib/source/ +PROFTPD_LICENSE = GPLv2+ +PROFTPD_LICENSE_FILES = COPYING PROFTPD_CONF_ENV = ac_cv_func_setpgrp_void=yes \ ac_cv_func_setgrent_void=yes @@ -19,6 +22,10 @@ PROFTPD_CONF_OPT = --localstatedir=/var/run \ --enable-shadow \ --with-gnu-ld +ifeq ($(BR2_PACKAGE_PROFTPD_MOD_REWRITE),y) +PROFTPD_CONF_OPT += --with-modules=mod_rewrite +endif + define PROFTPD_MAKENAMES $(MAKE1) CC="$(HOSTCC)" CFLAGS="" LDFLAGS="" -C $(@D)/lib/libcap _makenames endef @@ -31,6 +38,7 @@ define PROFTPD_INSTALL_TARGET_CMDS $(INSTALL) -D -m 0755 $(@D)/proftpd $(TARGET_DIR)/usr/sbin/proftpd @if [ ! -f $(TARGET_DIR)/etc/proftpd.conf ]; then \ $(INSTALL) -m 0644 -D $(@D)/sample-configurations/basic.conf $(TARGET_DIR)/etc/proftpd.conf; \ + $(if $(BR2_INET_IPV6),,$(SED) 's/^UseIPv6/# UseIPv6/' $(TARGET_DIR)/etc/proftpd.conf;) \ fi $(INSTALL) -m 0755 package/proftpd/S50proftpd $(TARGET_DIR)/etc/init.d endef @@ -41,4 +49,4 @@ define PROFTPD_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/etc/proftpd.conf endef -$(eval $(call AUTOTARGETS,package,proftpd)) +$(eval $(autotools-package)) diff --git a/package/protobuf-c/Config.in b/package/protobuf-c/Config.in new file mode 100644 index 0000000000..3baa05e895 --- /dev/null +++ b/package/protobuf-c/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_PROTOBUF_C + bool "protobuf-c" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS # protobuf + select BR2_PACKAGE_PROTOBUF + help + Code generator and runtime libraries to use Protocol Buffers + from pure C (not C++). + + http://code.google.com/p/protobuf-c/ + +comment "protobuf-c needs a toolchain w/ C++, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/protobuf-c/protobuf-c.mk b/package/protobuf-c/protobuf-c.mk new file mode 100644 index 0000000000..271f6d812b --- /dev/null +++ b/package/protobuf-c/protobuf-c.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# protobuf-c +# +################################################################################ + +PROTOBUF_C_VERSION = 0.15 +PROTOBUF_C_SITE = http://protobuf-c.googlecode.com/files +PROTOBUF_C_DEPENDENCIES = protobuf host-protobuf-c +HOST_PROTOBUF_C_DEPENDENCIES = host-protobuf +PROTOBUF_C_MAKE = $(MAKE1) +PROTOBUF_C_CONF_OPT = --disable-protoc +PROTOBUF_C_INSTALL_STAGING = YES +PROTOBUF_C_LICENSE = BSD-3c + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/protobuf/Config.in b/package/protobuf/Config.in new file mode 100644 index 0000000000..a4f542e0fc --- /dev/null +++ b/package/protobuf/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_PROTOBUF + bool "protobuf" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Protocol buffers are Google's language-neutral, platform-neutral, + extensible mechanism for serializing structured data. + + http://code.google.com/p/protobuf/ + +comment "protobuf needs a toolchain w/ C++, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/protobuf/protobuf.mk b/package/protobuf/protobuf.mk new file mode 100644 index 0000000000..3538aaad85 --- /dev/null +++ b/package/protobuf/protobuf.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# protobuf +# +################################################################################ + +PROTOBUF_VERSION = 2.4.1 +PROTOBUF_SITE = http://protobuf.googlecode.com/files/ +PROTOBUF_LICENSE = BSD-3c +PROTOBUF_LICENSE_FILES = COPYING.txt + +# N.B. Need to use host protoc during cross compilation. +PROTOBUF_DEPENDENCIES = host-protobuf +PROTOBUF_CONF_OPT = --with-protoc=$(HOST_DIR)/usr/bin/protoc + +PROTOBUF_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_ZLIB),y) +PROTOBUF_DEPENDENCIES += zlib +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/proxychains-ng/Config.in b/package/proxychains-ng/Config.in new file mode 100644 index 0000000000..f2a272faf4 --- /dev/null +++ b/package/proxychains-ng/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_PROXYCHAINS_NG + bool "proxychains-ng" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_PREFER_STATIC_LIB + help + Force any tcp connections to flow through a proxy (or proxy chain) + + https://github.com/rofl0r/proxychains + +comment "proxychains-ng needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_PREFER_STATIC_LIB diff --git a/package/proxychains-ng/proxychains-ng.mk b/package/proxychains-ng/proxychains-ng.mk new file mode 100644 index 0000000000..7c2ffbfb90 --- /dev/null +++ b/package/proxychains-ng/proxychains-ng.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# proxychains-ng +# +################################################################################ + +PROXYCHAINS_NG_VERSION = 4.6 +PROXYCHAINS_NG_SOURCE = proxychains-$(PROXYCHAINS_NG_VERSION).tar.bz2 +PROXYCHAINS_NG_SITE = http://downloads.sourceforge.net/project/proxychains-ng + +define PROXYCHAINS_NG_CONFIGURE_CMDS + cd $(@D) && \ + $(TARGET_CONFIGURE_OPTS) ./configure --prefix=/usr --sysconfdir=/etc +endef + +define PROXYCHAINS_NG_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define PROXYCHAINS_NG_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install install-config +endef + +$(eval $(generic-package)) diff --git a/package/psmisc/Config.in b/package/psmisc/Config.in index a13820426c..cc8420b7bb 100644 --- a/package/psmisc/Config.in +++ b/package/psmisc/Config.in @@ -2,7 +2,6 @@ config BR2_PACKAGE_PSMISC bool "psmisc" select BR2_PACKAGE_NCURSES select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE - select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE help Helpful /proc related utilities such as pstree, fuser, and killall diff --git a/package/psmisc/psmisc-link-against-libintl.patch b/package/psmisc/psmisc-link-against-libintl.patch new file mode 100644 index 0000000000..907e7e75bd --- /dev/null +++ b/package/psmisc/psmisc-link-against-libintl.patch @@ -0,0 +1,33 @@ +Link against libintl if needed + +When built against a C library that has locale support, but for which +intl support is provided by an external libintl library, psmisc +forgets to link against this library, even though the configure script +properly checks that. + +This patch therefore ensure that we link against libintl when needed, +thanks to the @INTLLIBS@ variable provided by the configure script. + +We do not modify the Makefile.am file, because autoreconfiguring this +package doesn't work: because of its usage of gettext, it wants to run +the "autopoint" program, which itself depends on CVS being installed, +for some strange reasons. That's the reason why we fall back to the +hacky solution of modifying the Makefile.in file. + +Forward-ported Thomas's patch to psmisc 22.16 +from commit f066ed70cd6939838d4057f66798cbc1d972cc73 + +Signed-off-by: Gustavo Zacarias + +diff -Nura psmisc-22.16.orig/src/Makefile.in psmisc-22.16/src/Makefile.in +--- psmisc-22.16.orig/src/Makefile.in 2012-03-28 22:27:33.106660358 -0300 ++++ psmisc-22.16/src/Makefile.in 2012-03-28 22:28:55.752219349 -0300 +@@ -76,7 +76,7 @@ + killall_DEPENDENCIES = + am_peekfd_OBJECTS = peekfd.$(OBJEXT) + peekfd_OBJECTS = $(am_peekfd_OBJECTS) +-peekfd_LDADD = $(LDADD) ++peekfd_LDADD = $(LDADD) @LIBINTL@ + am_prtstat_OBJECTS = prtstat.$(OBJEXT) + prtstat_OBJECTS = $(am_prtstat_OBJECTS) + prtstat_DEPENDENCIES = diff --git a/package/psmisc/psmisc-no-__progname.patch b/package/psmisc/psmisc-no-__progname.patch index 063b120eef..51096571cb 100644 --- a/package/psmisc/psmisc-no-__progname.patch +++ b/package/psmisc/psmisc-no-__progname.patch @@ -5,10 +5,12 @@ stuff isn't that critical, so just disable it. Signed-off-by: Peter Korsgaard Signed-off-by: Gustavo Zacarias +Signed-off-by: Thomas Petazzoni -diff -Nura psmisc-22.13.orig/src/pstree.c psmisc-22.13/src/pstree.c ---- psmisc-22.13.orig/src/pstree.c 2010-07-12 08:10:03.000000000 -0300 -+++ psmisc-22.13/src/pstree.c 2011-01-07 15:02:41.902741728 -0300 +Index: psmisc-22.13/src/pstree.c +=================================================================== +--- psmisc-22.13.orig/src/pstree.c 2010-07-12 13:10:03.000000000 +0200 ++++ psmisc-22.13/src/pstree.c 2011-05-21 16:33:37.456530775 +0200 @@ -49,8 +49,6 @@ #include #endif /*WITH_SELINUX */ @@ -28,3 +30,18 @@ diff -Nura psmisc-22.13.orig/src/pstree.c psmisc-22.13/src/pstree.c /* * Attempt to figure out a good default symbol set. Will be overriden by * command-line options, if given. +Index: psmisc-22.13/src/Makefile.in +=================================================================== +--- psmisc-22.13.orig/src/Makefile.in 2011-05-21 16:33:42.748530777 +0200 ++++ psmisc-22.13/src/Makefile.in 2011-05-21 16:33:47.360530782 +0200 +@@ -557,10 +557,6 @@ + grep '^{ 1,"HUP" },$$' signames.h >/dev/null || \ + { rm -f signames.h; exit 1; } + +-install-exec-hook: +- cd $(DESTDIR)$(bindir) && \ +- ( [ -h pstree.x11 ] || $(LN_S) pstree pstree.x11) +- + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff --git a/package/psmisc/psmisc.mk b/package/psmisc/psmisc.mk index 3cbf9418e8..c18ba9472d 100644 --- a/package/psmisc/psmisc.mk +++ b/package/psmisc/psmisc.mk @@ -1,16 +1,23 @@ -############################################################# +################################################################################ # # psmisc # -############################################################# +################################################################################ -PSMISC_VERSION = 22.13 -PSMISC_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/psmisc -PSMISC_DEPENDENCIES = ncurses $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl) +PSMISC_VERSION = 22.20 +PSMISC_SITE = http://downloads.sourceforge.net/project/psmisc/psmisc +PSMISC_LICENSE = GPLv2 +PSMISC_LICENSE_FILES = COPYING +PSMISC_DEPENDENCIES = ncurses $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) + +ifeq ($(BR2_TOOLCHAIN_HAS_SSP),) +# Don't force -fstack-protector when SSP is not available in toolchain +PSMISC_CONF_OPT = --disable-harden-flags +endif # build after busybox, we prefer fat versions while we're at it ifeq ($(BR2_PACKAGE_BUSYBOX),y) PSMISC_DEPENDENCIES += busybox endif -$(eval $(call AUTOTARGETS,package,psmisc)) +$(eval $(autotools-package)) diff --git a/package/psplash/Config.in b/package/psplash/Config.in new file mode 100644 index 0000000000..d68aaa210f --- /dev/null +++ b/package/psplash/Config.in @@ -0,0 +1,31 @@ +config BR2_PACKAGE_PSPLASH + bool "psplash" + depends on BR2_USE_WCHAR + help + PSplash is a userspace graphical boot splash screen for mainly + embedded Linux devices supporting a 16bpp or 32bpp framebuffer. + It has few dependencies (just libc), supports basic images and + text and handles rotation. Its visual look is configurable by + basic source changes. + + Also included is a 'client' command utility for sending + information to psplash such as boot progress information. + + Start the drawing process with 'psplash -n&' as early as possible. + Note: psplash creates a FIFO in /tmp for communication with + psplash-write. + + Usage: + * Set progress bar to 50 percent: + psplash-write "PROGRESS 50" + + * Display message "foobar" above progress bar: + psplash-write "MSG foobar" + + * Terminate psplash: + psplash-write "QUIT" + + http://git.yoctoproject.org/cgit/cgit.cgi/psplash/ + +comment "psplash needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/psplash/psplash.mk b/package/psplash/psplash.mk new file mode 100644 index 0000000000..cb1c54a8c8 --- /dev/null +++ b/package/psplash/psplash.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# psplash +# +################################################################################ + +PSPLASH_VERSION = 0.1 +PSPLASH_SITE = http://downloads.yoctoproject.org/releases/psplash +PSPLASH_LICENSE = GPLv2+ +PSPLASH_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/ptpd/Config.in b/package/ptpd/Config.in new file mode 100644 index 0000000000..2d87ca31bb --- /dev/null +++ b/package/ptpd/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PTPD + bool "ptpd" + help + The PTP daemon (PTPd) implements the Precision Time protocol + (PTP) as defined by the IEEE-1588-2002. + + http://ptpd.sourceforge.net/ diff --git a/package/ptpd/S65ptpd b/package/ptpd/S65ptpd new file mode 100755 index 0000000000..4206c5e0c9 --- /dev/null +++ b/package/ptpd/S65ptpd @@ -0,0 +1,29 @@ +#!/bin/sh +# +# Start ptpd +# + +case "$1" in + start) + echo -n "Starting ptpd: " + start-stop-daemon -S -q -x /usr/sbin/ptpd -- -S + if [ $? != 0 ]; then + echo "FAILED" + exit 1 + else + echo "OK" + fi + ;; + stop) + echo -n "Stopping ptpd: " + start-stop-daemon -K -q -x /usr/sbin/ptpd + echo "OK" + ;; + restart|reload) + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/ptpd/ptpd.mk b/package/ptpd/ptpd.mk new file mode 100644 index 0000000000..ac9ab985ca --- /dev/null +++ b/package/ptpd/ptpd.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# ptpd +# +################################################################################ + +PTPD_VERSION = 1.1.0 +PTPD_SITE = http://downloads.sourceforge.net/project/ptpd/ptpd/$(PTPD_VERSION) +PTPD_LICENSE = BSD +PTPD_LICENSE_FILES = COPYRIGHT + +define PTPD_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/src +endef + +define PTPD_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 -D $(@D)/src/ptpd $(TARGET_DIR)/usr/sbin/ptpd +endef + +define PTPD_INSTALL_INIT_SYSV + $(INSTALL) -m 755 -D package/ptpd/S65ptpd \ + $(TARGET_DIR)/etc/init.d/S65ptpd +endef + +$(eval $(generic-package)) diff --git a/package/ptpd2/Config.in b/package/ptpd2/Config.in new file mode 100644 index 0000000000..bf26453c52 --- /dev/null +++ b/package/ptpd2/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PTPD2 + bool "ptpd2" + help + The PTP daemon (PTPd) implements the Precision Time protocol + (PTP) as defined by the IEEE-1588-2008. + + http://ptpd.sourceforge.net/ diff --git a/package/ptpd2/S65ptpd2 b/package/ptpd2/S65ptpd2 new file mode 100755 index 0000000000..7d4ee7f4bf --- /dev/null +++ b/package/ptpd2/S65ptpd2 @@ -0,0 +1,29 @@ +#!/bin/sh +# +# Start ptpd2 +# + +case "$1" in + start) + echo -n "Starting ptpd2: " + start-stop-daemon -S -q -x /usr/sbin/ptpd2 -- -g + if [ $? != 0 ]; then + echo "FAILED" + exit 1 + else + echo "OK" + fi + ;; + stop) + echo -n "Stopping ptpd2: " + start-stop-daemon -K -q -x /usr/sbin/ptpd2 + echo "OK" + ;; + restart|reload) + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/ptpd2/ptpd2.mk b/package/ptpd2/ptpd2.mk new file mode 100644 index 0000000000..0428c80fd8 --- /dev/null +++ b/package/ptpd2/ptpd2.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# ptpd2 +# +################################################################################ + +PTPD2_VERSION = 2.2.2 +PTPD2_SITE = http://downloads.sourceforge.net/project/ptpd/ptpd/$(PTPD2_VERSION) +PTPD2_SOURCE = ptpd-$(PTPD2_VERSION).tar.gz +PTPD2_LICENSE = BSD-2c +PTPD2_LICENSE_FILES = COPYRIGHT + +define PTPD2_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/src +endef + +define PTPD2_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 -D $(@D)/src/ptpd2 $(TARGET_DIR)/usr/sbin/ptpd2 +endef + +define PTPD2_INSTALL_INIT_SYSV + $(INSTALL) -m 755 -D package/ptpd2/S65ptpd2 \ + $(TARGET_DIR)/etc/init.d/S65ptpd2 +endef + +$(eval $(generic-package)) diff --git a/package/pulseaudio/Config.in b/package/pulseaudio/Config.in new file mode 100644 index 0000000000..010eeab0cf --- /dev/null +++ b/package/pulseaudio/Config.in @@ -0,0 +1,30 @@ +config BR2_PACKAGE_PULSEAUDIO + bool "pulseaudio" + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBTOOL + select BR2_PACKAGE_JSON_C + select BR2_PACKAGE_LIBSNDFILE + select BR2_PACKAGE_SPEEX + depends on BR2_LARGEFILE + help + PulseAudio is a sound system for POSIX OSes, meaning that it + is a proxy for your sound applications. It allows you to do + advanced operations on your sound data as it passes between + your application and your hardware. Things like transferring + the audio to a different machine, changing the sample format + or channel count and mixing several sounds into one are + easily achieved using a sound server. + + http://pulseaudio.org + +config BR2_PACKAGE_PULSEAUDIO_DAEMON + bool "start as a system daemon" + depends on BR2_PACKAGE_PULSEAUDIO + help + PulseAudio can be started as a system daemon. This is not the + recommended way of using PulseAudio unless you are building a + headless system. + +comment "pulseaudio needs a toolchain w/ wchar, largefile, threads" + depends on !BR2_USE_WCHAR || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/pulseaudio/S50pulseaudio b/package/pulseaudio/S50pulseaudio new file mode 100755 index 0000000000..4c6877eb16 --- /dev/null +++ b/package/pulseaudio/S50pulseaudio @@ -0,0 +1,39 @@ +#!/bin/sh +# +# Starts pulseaudio. +# + + +start() { + echo -n "Starting pulseaudio: " + umask 077 + /usr/bin/pulseaudio --system --daemonize + echo "OK" +} +stop() { + echo -n "Stopping pulseaudio: " + pulseaudio --kill + echo "OK" +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/package/pulseaudio/pulseaudio.mk b/package/pulseaudio/pulseaudio.mk new file mode 100644 index 0000000000..cdeabc5c17 --- /dev/null +++ b/package/pulseaudio/pulseaudio.mk @@ -0,0 +1,116 @@ +################################################################################ +# +# pulseaudio +# +################################################################################ + +PULSEAUDIO_VERSION = 4.0 +PULSEAUDIO_SOURCE = pulseaudio-$(PULSEAUDIO_VERSION).tar.xz +PULSEAUDIO_SITE = http://freedesktop.org/software/pulseaudio/releases/ +PULSEAUDIO_INSTALL_STAGING = YES +PULSEAUDIO_LICENSE = LGPLv2.1+ (specific license for modules, see LICENSE file) +PULSEAUDIO_LICENSE_FILES = LICENSE GPL LGPL +PULSEAUDIO_CONF_OPT = \ + --localstatedir=/var \ + --disable-default-build-tests \ + --disable-legacy-runtime-dir \ + --disable-legacy-database-entry-format \ + $(if $(BR2_HAVE_DOCUMENTATION),,--disable-manpages) + +PULSEAUDIO_DEPENDENCIES = \ + host-pkgconf libtool json-c libsndfile speex host-intltool \ + $(if $(BR2_PACKAGE_LIBATOMIC_OPS),libatomic_ops) \ + $(if $(BR2_PACKAGE_LIBSAMPLERATE),libsamplerate) \ + $(if $(BR2_PACKAGE_ALSA_LIB),alsa-lib) \ + $(if $(BR2_PACKAGE_LIBGLIB2),libglib2) \ + $(if $(BR2_PACKAGE_AVAHI_DAEMON),avahi) \ + $(if $(BR2_PACKAGE_DBUS),dbus) \ + $(if $(BR2_PACKAGE_BLUEZ_UTILS),bluez_utils) \ + $(if $(BR2_PACKAGE_UDEV),udev) \ + $(if $(BR2_PACKAGE_OPENSSL),openssl) \ + $(if $(BR2_PACKAGE_FFTW),fftw) \ + $(if $(BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING),webrtc-audio-processing) \ + $(if $(BR2_PACKAGE_SYSTEMD),systemd) + + +ifeq ($(BR2_PACKAGE_ORC),y) +PULSEAUDIO_DEPENDENCIES += orc +PULSEAUDIO_CONF_ENV += ORCC=$(HOST_DIR)/usr/bin/orcc +PULSEAUDIO_CONF_OPT += --enable-orc +else +PULSEAUDIO_CONF_OPT += --disable-orc +endif + +ifneq ($(BR2_INSTALL_LIBSTDCPP),y) +# The optional webrtc echo canceller is written in C++, causing auto* to want +# to link module-echo-cancel.so with CXX even if webrtc ISN'T used. +# If we don't have C++ support enabled in BR, CXX will point to /bin/false, +# which makes configure think we aren't able to create C++ .so files +# (arguable true), breaking the build when it tries to install the .so +# workaround it by patching up the libtool invocations to use C mode instead +define PULSEAUDIO_FORCE_CC + $(SED) 's/--tag=CXX/--tag=CC/g' -e 's/(CXXLD)/(CCLD)/g' \ + $(@D)/src/Makefile.in +endef + +PULSEAUDIO_POST_PATCH_HOOKS += PULSEAUDIO_FORCE_CC +endif + +# neon intrinsics not available with float-abi=soft +ifeq ($(BR2_ARM_SOFT_FLOAT),) +ifeq ($(BR2_ARM_CPU_HAS_NEON),y) +PULSEAUDIO_USE_NEON = y +endif +endif + +ifeq ($(PULSEAUDIO_USE_NEON),y) +PULSEAUDIO_CONF_OPT += --enable-neon-opt=yes +else +PULSEAUDIO_CONF_OPT += --enable-neon-opt=no +endif + +# pulseaudio alsa backend needs pcm/mixer apis +ifneq ($(BR2_PACKAGE_ALSA_LIB_PCM)$(BR2_PACKAGE_ALSA_LIB_MIXER),yy) +PULSEAUDIO_CONF_OPT += --disable-alsa +endif + +ifeq ($(BR2_PACKAGE_LIBXCB)$(BR2_PACKAGE_XLIB_LIBSM)$(BR2_PACKAGE_XLIB_LIBXTST),yyy) +PULSEAUDIO_DEPENDENCIES += libxcb xlib_libSM xlib_libXtst + +# .desktop file generation needs nls support, so fake it for !locale builds +# https://bugs.freedesktop.org/show_bug.cgi?id=54658 +ifneq ($(BR2_ENABLE_LOCALE),y) +define PULSEAUDIO_FIXUP_DESKTOP_FILES + cp $(@D)/src/daemon/pulseaudio.desktop.in \ + $(@D)/src/daemon/pulseaudio.desktop + cp $(@D)/src/daemon/pulseaudio-kde.desktop.in \ + $(@D)/src/daemon/pulseaudio-kde.desktop +endef +PULSEAUDIO_POST_PATCH_HOOKS += PULSEAUDIO_FIXUP_DESKTOP_FILES +endif + +else +PULSEAUDIO_CONF_OPT += --disable-x11 +endif + +ifneq ($(BR2_PACKAGE_VALA),y) +define PULSEAUDIO_REMOVE_VALA + rm -rf $(TARGET_DIR)/usr/share/vala +endef + +PULSEAUDIO_POST_INSTALL_TARGET_HOOKS += PULSEAUDIO_REMOVE_VALA +endif + +ifeq ($(BR2_PACKAGE_PULSEAUDIO_DAEMON),y) +define PULSEAUDIO_USERS + pulse -1 pulse -1 * /var/run/pulse - audio,pulse-access +endef + +define PULSEAUDIO_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/pulseaudio/S50pulseaudio \ + $(TARGET_DIR)/etc/init.d/S50pulseaudio +endef + +endif + +$(eval $(autotools-package)) diff --git a/package/pv/Config.in b/package/pv/Config.in new file mode 100644 index 0000000000..d7322963c0 --- /dev/null +++ b/package/pv/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PV + bool "pv" + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + Pipe Viewer - is a terminal-based tool for + monitoring the progress of data through a + pipeline. + + http://www.ivarch.com/programs/pv.shtml diff --git a/package/pv/pv.mk b/package/pv/pv.mk new file mode 100644 index 0000000000..ab5190a43a --- /dev/null +++ b/package/pv/pv.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# pv +# +################################################################################ + +PV_VERSION = 1.4.12 +PV_SOURCE = pv-$(PV_VERSION).tar.bz2 +PV_SITE = http://www.ivarch.com/programs/sources +PV_LICENSE = Artistic-2.0 +PV_LICENSE_FILES = doc/COPYING +PV_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) + +# While 'pv' uses autoconf, it does not use automake for its +# makefiles. It uses $(LD) $(LDFLAGS) to achieve partial linking, but +# using 'ld' directly doesn't work well with some toolchain +# configuration, as the ld default emulation may not necessarily be +# the correct one. By passing the below values for LD and LDFLAGS, we +# ensure that 'gcc' is used to do these partial linking steps. +PV_MAKE_OPT = \ + LD="$(TARGET_CC)" \ + LDFLAGS="-Wl,-r -nostdlib" + +$(eval $(autotools-package)) diff --git a/package/python-bottle/Config.in b/package/python-bottle/Config.in new file mode 100644 index 0000000000..f9b60ca724 --- /dev/null +++ b/package/python-bottle/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PYTHON_BOTTLE + bool "python-bottle" + help + Bottle is a fast, simple and lightweight WSGI micro web-framework + for Python. It is distributed as a single file module and has no + dependencies other than the Python Standard Library. + + http://bottlepy.org diff --git a/package/python-bottle/python-bottle.mk b/package/python-bottle/python-bottle.mk new file mode 100644 index 0000000000..db71512ec4 --- /dev/null +++ b/package/python-bottle/python-bottle.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# python-bottle +# +################################################################################ + +PYTHON_BOTTLE_VERSION = 0.11.6 +PYTHON_BOTTLE_SOURCE = bottle-$(PYTHON_BOTTLE_VERSION).tar.gz +PYTHON_BOTTLE_SITE = http://pypi.python.org/packages/source/b/bottle +PYTHON_BOTTLE_DEPENDENCIES = python +PYTHON_BOTTLE_LICENSE = MIT +# README.rst refers to the file "LICENSE" but it's not included + +define PYTHON_BOTTLE_BUILD_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build --executable=/usr/bin/python) +endef + +define PYTHON_BOTTLE_INSTALL_TARGET_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) +endef + +$(eval $(generic-package)) diff --git a/package/python-crc16/Config.in b/package/python-crc16/Config.in new file mode 100644 index 0000000000..3fd8da7a85 --- /dev/null +++ b/package/python-crc16/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_PYTHON_CRC16 + bool "python-crc16" + depends on BR2_PACKAGE_PYTHON + help + This library calculates only CRC16 (16-bit codes) and the + only supported variant at the moment is CRC-CCITT (XModem). + CRC is a way of detecting accidental changes in data storage + or transmission. There are many variants of CRC and CRC16, + in particular. + + http://pycrc16.googlecode.com/ diff --git a/package/python-crc16/python-crc16.mk b/package/python-crc16/python-crc16.mk new file mode 100644 index 0000000000..adfdcc67ec --- /dev/null +++ b/package/python-crc16/python-crc16.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# python-crc16 +# +################################################################################ + +PYTHON_CRC16_VERSION = 0.1.1 +PYTHON_CRC16_SOURCE = crc16-$(PYTHON_CRC16_VERSION).tar.gz +PYTHON_CRC16_SITE = http://pycrc16.googlecode.com/files/ +PYTHON_CRC16_LICENSE = LGPLv3+ +PYTHON_CRC16_LICENSE_FILES = COPYING.txt +PYTHON_CRC16_DEPENDENCIES = python host-python + +PYTHON_CRC16_PARAMS = CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDSHARED="$(TARGET_CC) -shared" \ + LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib" \ + CROSS_COMPILING=yes \ + _python_sysroot=$(STAGING_DIR) \ + _python_srcdir=$(PYTHON_DIR) \ + _python_prefix=/usr \ + _python_exec_prefix=/usr + +define PYTHON_CRC16_BUILD_CMDS + (cd $(@D); $(PYTHON_CRC16_PARAMS) \ + $(HOST_DIR)/usr/bin/python setup.py build) +endef + +define PYTHON_CRC16_INSTALL_TARGET_CMDS + (cd $(@D); $(PYTHON_CRC16_PARAMS) \ + $(HOST_DIR)/usr/bin/python setup.py install \ + --prefix=$(TARGET_DIR)/usr) +endef + +$(eval $(generic-package)) diff --git a/package/python-distutilscross/python-distutilscross.mk b/package/python-distutilscross/python-distutilscross.mk new file mode 100644 index 0000000000..df12f97f22 --- /dev/null +++ b/package/python-distutilscross/python-distutilscross.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# python-distutilscross +# +################################################################################ + +PYTHON_DISTUTILSCROSS_VERSION = 0.1 +PYTHON_DISTUTILSCROSS_SOURCE = distutilscross-$(PYTHON_DISTUTILSCROSS_VERSION).tar.gz +PYTHON_DISTUTILSCROSS_SITE = http://pypi.python.org/packages/source/d/distutilscross + +HOST_PYTHON_DISTUTILSCROSS_DEPENDENCIES = host-python host-python-setuptools + +define HOST_PYTHON_DISTUTILSCROSS_BUILD_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build) +endef + +define HOST_PYTHON_DISTUTILSCROSS_INSTALL_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(HOST_DIR)/usr) +endef + +$(eval $(host-generic-package)) diff --git a/package/python-dpkt/Config.in b/package/python-dpkt/Config.in new file mode 100644 index 0000000000..aac9f09c9a --- /dev/null +++ b/package/python-dpkt/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_PYTHON_DPKT + bool "python-dpkt" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_ZLIB + help + Fast, simple packet creation / parsing, with definitions + for the basic TCP/IP protocols. + + http://code.google.com/p/dpkt/ + + diff --git a/package/python-dpkt/python-dpkt.mk b/package/python-dpkt/python-dpkt.mk new file mode 100644 index 0000000000..314415cc32 --- /dev/null +++ b/package/python-dpkt/python-dpkt.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# python-dpkt +# +################################################################################ + +PYTHON_DPKT_VERSION = 1.7 +PYTHON_DPKT_SOURCE = dpkt-$(PYTHON_DPKT_VERSION).tar.gz +PYTHON_DPKT_SITE = http://dpkt.googlecode.com/files + +PYTHON_DPKT_DEPENDENCIES = python + +define PYTHON_DPKT_BUILD_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build) +endef + +define PYTHON_DPKT_INSTALL_TARGET_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) +endef + +$(eval $(generic-package)) diff --git a/package/python-id3/Config.in b/package/python-id3/Config.in new file mode 100644 index 0000000000..829a657321 --- /dev/null +++ b/package/python-id3/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_ID3 + bool "python-id3" + depends on BR2_PACKAGE_PYTHON + help + This module allows one to read and manipulate so-called ID3 + informational tags on MP3 files through an object-oriented + Python interface. + + http://id3-py.sourceforge.net/ diff --git a/package/python-id3/python-id3.mk b/package/python-id3/python-id3.mk new file mode 100644 index 0000000000..9328a0f40a --- /dev/null +++ b/package/python-id3/python-id3.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# python-id3 +# +################################################################################ + +PYTHON_ID3_VERSION = 1.2 +PYTHON_ID3_SOURCE = id3-py_$(PYTHON_ID3_VERSION).tar.gz +PYTHON_ID3_SITE = http://downloads.sourceforge.net/project/id3-py/id3-py/$(PYTHON_ID3_VERSION) + +PYTHON_ID3_DEPENDENCIES = python + +define PYTHON_ID3_BUILD_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build) +endef + +define PYTHON_ID3_INSTALL_TARGET_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) +endef + +$(eval $(generic-package)) diff --git a/package/python-ipy/Config.in b/package/python-ipy/Config.in new file mode 100644 index 0000000000..bead932da8 --- /dev/null +++ b/package/python-ipy/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PYTHON_IPY + bool "python-ipy" + depends on BR2_PACKAGE_PYTHON + help + IPy - class and tools for handling of IPv4 and + IPv6 addresses and networks. + + https://github.com/haypo/python-ipy/ diff --git a/package/python-ipy/python-ipy.mk b/package/python-ipy/python-ipy.mk new file mode 100644 index 0000000000..baac094620 --- /dev/null +++ b/package/python-ipy/python-ipy.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# python-ipy +# +################################################################################ + +PYTHON_IPY_VERSION = IPy-0.75 +PYTHON_IPY_SITE = https://github.com/haypo/python-ipy/tarball/$(PYTHON_IPY_VERSION) +PYTHON_IPY_DEPENDENCIES = host-python python +PYTHON_IPY_LICENSE = BSD-3c +PYTHON_IPY_LICENSE_FILES = COPYING + +define PYTHON_IPY_BUILD_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + $(HOST_DIR)/usr/bin/python setup.py build_ext \ + --include-dirs=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) \ + ) + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build) +endef + +define PYTHON_IPY_INSTALL_TARGET_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) +endef + +$(eval $(generic-package)) diff --git a/package/python-m2crypto/python-m2crypto.mk b/package/python-m2crypto/python-m2crypto.mk new file mode 100644 index 0000000000..1c0efbdbb4 --- /dev/null +++ b/package/python-m2crypto/python-m2crypto.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# python-m2crypto +# +################################################################################ + +PYTHON_M2CRYPTO_VERSION = 0.21.1 +PYTHON_M2CRYPTO_SITE = http://pypi.python.org/packages/source/M/M2Crypto +PYTHON_M2CRYPTO_SOURCE = M2Crypto-$(PYTHON_M2CRYPTO_VERSION).tar.gz +HOST_PYTHON_M2CRYPTO_DEPENDENCIES = host-openssl host-python host-python-setuptools host-swig + +define HOST_PYTHON_M2CRYPTO_BUILD_CMDS + (cd $(@D); \ + $(HOST_CONFIGURE_OPTS) \ + PYTHONXCPREFIX="$(HOST_DIR)/usr/" \ + LDFLAGS="-L$(HOST_DIR)/lib -L$(HOST_DIR)/usr/lib" \ + $(HOST_DIR)/usr/bin/python setup.py build_ext --openssl=$(HOST_DIR)/usr) +endef + +define HOST_PYTHON_M2CRYPTO_INSTALL_CMDS + (cd $(@D); \ + PYTHONPATH=$(HOST_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \ + $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(HOST_DIR)/usr) +endef + +$(eval $(host-generic-package)) diff --git a/package/multimedia/python-mad/Config.in b/package/python-mad/Config.in similarity index 100% rename from package/multimedia/python-mad/Config.in rename to package/python-mad/Config.in diff --git a/package/multimedia/python-mad/python-mad.mk b/package/python-mad/python-mad.mk similarity index 84% rename from package/multimedia/python-mad/python-mad.mk rename to package/python-mad/python-mad.mk index 52d13a650e..eaa1fae6e3 100644 --- a/package/multimedia/python-mad/python-mad.mk +++ b/package/python-mad/python-mad.mk @@ -1,8 +1,8 @@ -############################################################# +################################################################################ # # python-mad # -############################################################# +################################################################################ PYTHON_MAD_VERSION = 0.6 PYTHON_MAD_SOURCE = pymad-$(PYTHON_MAD_VERSION).tar.gz @@ -38,4 +38,4 @@ define PYTHON_MAD_INSTALL_TARGET_CMDS (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) endef -$(eval $(call GENTARGETS,package,python-mad)) +$(eval $(generic-package)) diff --git a/package/python-meld3/Config.in b/package/python-meld3/Config.in new file mode 100644 index 0000000000..8dee723e02 --- /dev/null +++ b/package/python-meld3/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PYTHON_MELD3 + bool "python-meld3" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_PYEXPAT + help + A HTML/XML templating system. + + https://github.com/supervisor/meld3 diff --git a/package/python-meld3/python-meld3.mk b/package/python-meld3/python-meld3.mk new file mode 100644 index 0000000000..27da9c8358 --- /dev/null +++ b/package/python-meld3/python-meld3.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# python-meld3 +# +################################################################################ + +PYTHON_MELD3_VERSION = 0.6.8 +PYTHON_MELD3_SOURCE = meld3-$(PYTHON_MELD3_VERSION).tar.gz +PYTHON_MELD3_SITE = http://pypi.python.org/packages/source/m/meld3/ +PYTHON_MELD3_DEPENDENCIES = python +PYTHON_MELD3_LICENSE = ZPLv2.1 +PYTHON_MELD3_LICENSE_FILES = COPYRIGHT.txt LICENSE.txt + +define PYTHON_MELD3_BUILD_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build) +endef + +define PYTHON_MELD3_INSTALL_TARGET_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) +endef + +$(eval $(generic-package)) diff --git a/package/python-netifaces/Config.in b/package/python-netifaces/Config.in new file mode 100644 index 0000000000..b9d66d8b64 --- /dev/null +++ b/package/python-netifaces/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PYTHON_NETIFACES + bool "python-netifaces" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_SETUPTOOLS + help + Portable access to network interfaces from Python. + + http://alastairs-place.net/projects/netifaces diff --git a/package/python-netifaces/python-netifaces-ifaddrs-uclibc.patch b/package/python-netifaces/python-netifaces-ifaddrs-uclibc.patch new file mode 100644 index 0000000000..375b08da15 --- /dev/null +++ b/package/python-netifaces/python-netifaces-ifaddrs-uclibc.patch @@ -0,0 +1,31 @@ +[PATCH] fix compile error in ifaddrs() for HAVE_SOCKET_IOCTLS variant + +Used on E.G. uClibc. This variant seems to have bitrotten somewhat. + +Signed-off-by: Peter Korsgaard +--- + netifaces.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: netifaces-0.6/netifaces.c +=================================================================== +--- netifaces-0.6.orig/netifaces.c ++++ netifaces-0.6/netifaces.c +@@ -624,7 +624,7 @@ + if (ioctl (sock, SIOCGIFHWADDR, &ifr) == 0) { + found = TRUE; + +- if (string_from_sockaddr (ifr->CNAME(ifr_addr), buffer, sizeof (buffer)) == 0) { ++ if (string_from_sockaddr ((struct sockaddr *)&ifr.CNAME(ifr_addr), buffer, sizeof (buffer)) == 0) { + PyObject *hwaddr = PyString_FromString (buffer); + PyObject *dict = PyDict_New (); + PyObject *list = PyList_New (1); +@@ -633,7 +633,7 @@ + if (!hwaddr || !dict || !list || !family) { + Py_XDECREF (hwaddr); + Py_XDECREF (dict); +- Py_XDECREF (list) ++ Py_XDECREF (list); + Py_XDECREF (family); + Py_XDECREF (result); + close (sock); diff --git a/package/python-netifaces/python-netifaces.mk b/package/python-netifaces/python-netifaces.mk new file mode 100644 index 0000000000..1570fd1c48 --- /dev/null +++ b/package/python-netifaces/python-netifaces.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# python-netifaces +# +################################################################################ + +PYTHON_NETIFACES_VERSION = 0.7 +PYTHON_NETIFACES_SOURCE = netifaces-$(PYTHON_NETIFACES_VERSION).tar.gz +PYTHON_NETIFACES_SITE = http://alastairs-place.net/projects/netifaces + +PYTHON_NETIFACES_DEPENDENCIES = python host-python-setuptools host-python-distutilscross + +define PYTHON_NETIFACES_BUILD_CMDS + (cd $(@D); \ + PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \ + LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ + $(HOST_DIR)/usr/bin/python setup.py build -x) +endef + +define PYTHON_NETIFACES_INSTALL_TARGET_CMDS + (cd $(@D); \ + PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \ + $(HOST_DIR)/usr/bin/python setup.py install \ + --single-version-externally-managed --root=/ --prefix=$(TARGET_DIR)/usr) +endef + +$(eval $(generic-package)) diff --git a/package/python-nfc/Config.in b/package/python-nfc/Config.in new file mode 100644 index 0000000000..9a8102c23c --- /dev/null +++ b/package/python-nfc/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_PYTHON_NFC + bool "python-nfc" + depends on BR2_PACKAGE_PYTHON + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_LIBUSB_COMPAT + help + Python module for near field communication. + + https://launchpad.net/nfcpy + +comment "python-nfc needs a toolchain w/ threads" + depends on BR2_PACKAGE_PYTHON + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/python-nfc/python-nfc-add-setup-py.patch b/package/python-nfc/python-nfc-add-setup-py.patch new file mode 100644 index 0000000000..307b749844 --- /dev/null +++ b/package/python-nfc/python-nfc-add-setup-py.patch @@ -0,0 +1,26 @@ +Add simple setup.py + +Having a setup.py allows to easily get the .py files compiled into +.pyc, which is good because by default, Buildroot only keeps .pyc +files on the target. + +Signed-off-by: Thomas Petazzoni + +Index: b/setup.py +=================================================================== +--- /dev/null ++++ b/setup.py +@@ -0,0 +1,13 @@ ++#!/usr/bin/env python ++ ++from distutils.core import setup ++ ++setup(name='NFC', ++ version='1.0', ++ description='Python NFC', ++ author='Stephen Tiedemann', ++ author_email='stephen.tiedemann@googlemail.com', ++ url='https://launchpad.net/nfcpy', ++ packages=['nfc', 'nfc/dev', 'nfc/llcp', 'nfc/ndef', ++ 'nfc/npp', 'nfc/snep'], ++ ) diff --git a/package/python-nfc/python-nfc.mk b/package/python-nfc/python-nfc.mk new file mode 100644 index 0000000000..63a502b179 --- /dev/null +++ b/package/python-nfc/python-nfc.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# python-nfc +# +################################################################################ + +PYTHON_NFC_VERSION = 142 +PYTHON_NFC_SITE = https://launchpad.net/nfcpy +PYTHON_NFC_SITE_METHOD = bzr +PYTHON_NFC_DEPENDENCIES = python libusb libusb-compat + +define PYTHON_NFC_BUILD_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build) +endef + +define PYTHON_NFC_INSTALL_TARGET_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) +endef + +define PYTHON_NFC_UNINSTALL_TARGET_CMDS + $(RM) -r $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/nfc/ +endef + +$(eval $(generic-package)) diff --git a/package/python-protobuf/Config.in b/package/python-protobuf/Config.in new file mode 100644 index 0000000000..ec2205757a --- /dev/null +++ b/package/python-protobuf/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_PYTHON_PROTOBUF + bool "python-protobuf" + depends on BR2_PACKAGE_PYTHON + help + Python implementation of the Google Protocol Buffers. + + Protocol buffers are Google's language-neutral, platform-neutral, + extensible mechanism for serializing structured data. + + http://code.google.com/p/protobuf/ diff --git a/package/python-protobuf/python-protobuf.mk b/package/python-protobuf/python-protobuf.mk new file mode 100644 index 0000000000..dcf67c25ce --- /dev/null +++ b/package/python-protobuf/python-protobuf.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# python-protobuf +# +################################################################################ + +PYTHON_PROTOBUF_VERSION = $(PROTOBUF_VERSION) +PYTHON_PROTOBUF_SOURCE = $(PROTOBUF_SOURCE) +PYTHON_PROTOBUF_SITE = $(PROTOBUF_SITE) +PYTHON_PROTOBUF_LICENSE = BSD-3c +PYTHON_PROTOBUF_LICENSE_FILES = COPYING.txt + +PYTHON_PROTOBUF_DEPENDENCIES = python host-python-setuptools \ + host-python-distutilscross host-protobuf + +define PYTHON_PROTOBUF_BUILD_CMDS + (cd $(@D)/python; \ + PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \ + PATH=$(HOST_PATH) \ + $(HOST_DIR)/usr/bin/python setup.py build -x) +endef + +define PYTHON_PROTOBUF_INSTALL_TARGET_CMDS + (cd $(@D)/python; PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \ + $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) +endef + +$(eval $(generic-package)) diff --git a/package/python-pygame/Config.in b/package/python-pygame/Config.in new file mode 100644 index 0000000000..1b0a8b96bb --- /dev/null +++ b/package/python-pygame/Config.in @@ -0,0 +1,49 @@ +config BR2_PACKAGE_PYTHON_PYGAME + bool "pygame" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_SDL + help + Pygame is a cross-platfrom library designed to make it easy to write + multimedia software, such as games, in Python. Pygame requires the + Python language and SDL multimedia library. + It can also make use of several other popular libraries. + + http://www.pygame.org/ + +if BR2_PACKAGE_PYTHON_PYGAME +config BR2_PACKAGE_PYTHON_PYGAME_IMAGE + bool "pygame.image" + select BR2_PACKAGE_SDL_IMAGE + select BR2_PACKAGE_SDL_IMAGE_PNG + select BR2_PACKAGE_SDL_IMAGE_JPEG + help + pygame module for loading, saving and transfering images. + Will autoselect sdl_image with png and jpeg support. + +config BR2_PACKAGE_PYTHON_PYGAME_FONT + bool "pygame.font" + select BR2_PACKAGE_SDL_TTF + help + pygame module for loading and rendering fonts. + Will autoselect sdl_ttf. + +config BR2_PACKAGE_PYTHON_PYGAME_MIXER + bool "pygame.mixer" + select BR2_PACKAGE_SDL_MIXER + help + pygame module for loading and playing sounds. + Will autoselect sdl_mixer. + +config BR2_PACKAGE_PYTHON_PYGAME_MIXER_MUSIC + bool "pygame.mixer.music" + depends on BR2_PACKAGE_PYTHON_PYGAME_MIXER + help + pygame module for controlling streamed audio + +config BR2_PACKAGE_PYTHON_PYGAME_SCRAP + bool "pygame.scrap" + depends on BR2_PACKAGE_SDL_X11 + help + pygame module for clipboard support (X11 needed) + +endif diff --git a/package/python-pygame/python-pygame.mk b/package/python-pygame/python-pygame.mk new file mode 100644 index 0000000000..739ba45e71 --- /dev/null +++ b/package/python-pygame/python-pygame.mk @@ -0,0 +1,112 @@ +################################################################################ +# +# python-pygame +# +################################################################################ + +# stable 1.9.1 release requires V4L which has been wiped out of recent Linux +# kernels, so use latest mercurial revision until next stable release is out. +PYTHON_PYGAME_VERSION = f0bb4a4b365d +PYTHON_PYGAME_SOURCE = pygame-$(PYTHON_PYGAME_VERSION).tar.gz +PYTHON_PYGAME_SITE = https://bitbucket.org/pygame/pygame +PYTHON_PYGAME_SITE_METHOD = hg + +ifeq ($(BR2_PACKAGE_PYTHON_PYGAME_IMAGE),y) +PYTHON_PYGAME_OPT_DEPENDS += sdl_image +endif + +ifeq ($(BR2_PACKAGE_PYTHON_PYGAME_FONT),y) +PYTHON_PYGAME_OPT_DEPENDS += sdl_ttf +endif + +ifeq ($(BR2_PACKAGE_PYTHON_PYGAME_MIXER),y) +PYTHON_PYGAME_OPT_DEPENDS += sdl_mixer +endif + +PYTHON_PYGAME_DEPENDENCIES = python sdl $(PYTHON_PYGAME_OPT_DEPENDS) + +ifneq ($(BR2_PACKAGE_PYTHON_PYGAME_IMAGE),y) +define PYTHON_PYGAME_UNCONFIGURE_IMAGE + $(SED) 's/^imageext/#imageext/' $(@D)/Setup +endef +endif + +ifneq ($(BR2_PACKAGE_PYTHON_PYGAME_FONT),y) +define PYTHON_PYGAME_UNCONFIGURE_FONT + $(SED) 's/^font/#font/' $(@D)/Setup +endef +endif + +ifneq ($(BR2_PACKAGE_PYTHON_PYGAME_MIXER),y) +define PYTHON_PYGAME_UNCONFIGURE_MIXER + $(SED) 's/^mixer/#mixer/g' $(@D)/Setup +endef +endif + +# Both require numpy or numeric python module +define PYTHON_PYGAME_UNCONFIGURE_SNDARRAY + $(SED) 's/^_numericsndarray/#_numericsndarray/' $(@D)/Setup +endef + +define PYTHON_PYGAME_UNCONFIGURE_SURFARRAY + $(SED) 's/^_numericsurfarray/#_numericsurfarray/' $(@D)/Setup +endef + +# Requires smpeg +define PYTHON_PYGAME_UNCONFIGURE_MOVIE + $(SED) 's/^movie/#movie/' $(@D)/Setup +endef + +ifneq ($(BR2_PACKAGE_PYTHON_PYGAME_SCRAP),y) +define PYTHON_PYGAME_UNCONFIGURE_SCRAP + $(SED) 's/^scrap/#scrap/' $(@D)/Setup +endef +endif + +PYTHON_PYGAME_SDL_FLAGS = $(shell $(STAGING_DIR)/usr/bin/sdl-config --cflags) +PYTHON_PYGAME_SDL_FLAGS += $(shell $(STAGING_DIR)/usr/bin/sdl-config --libs) + +# Pygame needs a Setup file where options should be commented out if +# dependencies are not available +define PYTHON_PYGAME_CONFIGURE_CMDS + cp -f $(@D)/Setup.in $(@D)/Setup + $(SED) 's~^SDL = ~SDL = $(PYTHON_PYGAME_SDL_FLAGS) \n#~' $(@D)/Setup + $(SED) 's/^pypm/#pypm/' $(@D)/Setup + $(PYTHON_PYGAME_UNCONFIGURE_IMAGE) + $(PYTHON_PYGAME_UNCONFIGURE_FONT) + $(PYTHON_PYGAME_UNCONFIGURE_MIXER) + $(PYTHON_PYGAME_UNCONFIGURE_SNDARRAY) + $(PYTHON_PYGAME_UNCONFIGURE_SURFARRAY) + $(PYTHON_PYGAME_UNCONFIGURE_MOVIE) + $(PYTHON_PYGAME_UNCONFIGURE_SCRAP) +endef + +define PYTHON_PYGAME_BUILD_CMDS + (cd $(@D); CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \ + LDSHARED="$(TARGET_CROSS)gcc -shared" \ + CROSS_COMPILING=yes \ + _python_sysroot=$(STAGING_DIR) \ + _python_srcdir=$(BUILD_DIR)/python$(PYTHON_VERSION) \ + _python_prefix=/usr \ + _python_exec_prefix=/usr \ + $(HOST_DIR)/usr/bin/python setup.py build) +endef + +ifneq ($(BR2_HAVE_DOCUMENTATION),y) +define PYTHON_PYGAME_REMOVE_DOC + rm -rf $(TARGET_DIR)/usr/lib/python*/site-packages/pygame/docs +endef +endif + +define PYTHON_PYGAME_INSTALL_TARGET_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install \ + --prefix=$(TARGET_DIR)/usr) + rm -rf $(TARGET_DIR)/usr/lib/python*/site-packages/pygame/tests + $(PYTHON_PYGAME_REMOVE_DOC) +endef + +define PYTHON_PYGAME_UNINSTALL_TARGET_CMDS + rm -rf $(TARGET_DIR)/usr/lib/python*/site-packages/pygame* +endef + +$(eval $(generic-package)) diff --git a/package/python-pyparsing/Config.in b/package/python-pyparsing/Config.in new file mode 100644 index 0000000000..378119ab05 --- /dev/null +++ b/package/python-pyparsing/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_PYTHON_PYPARSING + bool "pyparsing" + depends on BR2_PACKAGE_PYTHON + help + The pyparsing module is an alternative approach to creating and + executing simple grammars, vs. the traditional lex/yacc approach, + or the use of regular expressions. The pyparsing module provides + a library of classes that client code uses to construct the grammar + directly in Python code. + + http://pyparsing.wikispaces.com/ diff --git a/package/python-pyparsing/python-pyparsing.mk b/package/python-pyparsing/python-pyparsing.mk new file mode 100644 index 0000000000..7814ce3392 --- /dev/null +++ b/package/python-pyparsing/python-pyparsing.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# python-pyparsing +# +################################################################################ + +PYTHON_PYPARSING_VERSION = 1.5.6 +PYTHON_PYPARSING_SOURCE = pyparsing-$(PYTHON_PYPARSING_VERSION).tar.gz +PYTHON_PYPARSING_SITE = http://downloads.sourceforge.net/project/pyparsing/pyparsing/pyparsing-$(PYTHON_PYPARSING_VERSION) +PYTHON_PYPARSING_LICENSE = MIT +PYTHON_PYPARSING_LICENSE_FILES = LICENSE +PYTHON_PYPARSING_INSTALL_STAGING = YES +PYTHON_PYPARSING_DEPENDENCIES = python + +# Shamelessly vampirised from python-pygame ;-) +define PYTHON_PYPARSING_BUILD_CMDS + (cd $(@D); \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDSHARED="$(TARGET_CROSS)gcc -shared" \ + CROSS_COMPILING=yes \ + _python_sysroot=$(STAGING_DIR) \ + _python_srcdir=$(BUILD_DIR)/python$(PYTHON_VERSION) \ + _python_prefix=/usr \ + _python_exec_prefix=/usr \ + $(HOST_DIR)/usr/bin/python setup.py build \ + ) +endef + +# Shamelessly vampirised from python-pygame ;-) +define PYTHON_PYPARSING_INSTALL_TARGET_CMDS + (cd $(@D); \ + $(HOST_DIR)/usr/bin/python setup.py install \ + --prefix=$(TARGET_DIR)/usr \ + ) +endef + +$(eval $(generic-package)) diff --git a/package/python-pyro/Config.in b/package/python-pyro/Config.in new file mode 100644 index 0000000000..eb998c3970 --- /dev/null +++ b/package/python-pyro/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_PYRO + bool "python-pyro" + depends on BR2_PACKAGE_PYTHON + help + python-pyro is a Python library stands for PYthon Remote Objects. + It is an advanced and powerful Distributed Object Technology system + written entirely in Python, that is designed to be very easy to use.. + + https://pypi.python.org/pypi/Pyro/ diff --git a/package/python-pyro/python-pyro.mk b/package/python-pyro/python-pyro.mk new file mode 100644 index 0000000000..67aabc6ba4 --- /dev/null +++ b/package/python-pyro/python-pyro.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# python-pyro +# +################################################################################ + +PYTHON_PYRO_VERSION = 3.14 +PYTHON_PYRO_SOURCE = Pyro-$(PYTHON_PYRO_VERSION).tar.gz +PYTHON_PYRO_SITE = https://pypi.python.org/packages/source/P/Pyro/ +PYTHON_PYRO_LICENSE = MIT +PYTHON_PYRO_LICENSE_FILES = LICENSE +PYTHON_PYRO_DEPENDENCIES = python + +define PYTHON_PYRO_INSTALL_TARGET_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) +endef + +$(eval $(generic-package)) diff --git a/package/python-pyzmq/Config.in b/package/python-pyzmq/Config.in new file mode 100644 index 0000000000..b83c09cf6c --- /dev/null +++ b/package/python-pyzmq/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_PYTHON_PYZMQ + bool "python-pyzmq" + depends on BR2_LARGEFILE # zeromq + depends on BR2_INET_IPV6 # zeromq + depends on BR2_USE_WCHAR # zeromq + depends on BR2_INSTALL_LIBSTDCPP # zeromq + depends on BR2_TOOLCHAIN_HAS_THREADS # zeromq + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_ZEROMQ + help + This package contains the python language binding for zeromq. + + http://zeromq.org/bindings:python + +comment "python-pyzmq needs a toolchain w/ C++, IPv6, largefile, wchar, threads" + depends on BR2_PACKAGE_PYTHON + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_INET_IPV6 && BR2_LARGEFILE \ + && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/python-pyzmq/python-pyzmq-0001-use-buildroot-zmq-version-instead-of-detect.patch b/package/python-pyzmq/python-pyzmq-0001-use-buildroot-zmq-version-instead-of-detect.patch new file mode 100644 index 0000000000..560606989e --- /dev/null +++ b/package/python-pyzmq/python-pyzmq-0001-use-buildroot-zmq-version-instead-of-detect.patch @@ -0,0 +1,43 @@ +detect.py: fix the ZMQ version check to the ZMQ version of the buildroot + +The setup.py script tries to compile a test C program and runs it, to +retrieve a version string for the installed ZMQ library, but if the cross +compiler links it together, the result cannot be run on the host, due to +different architectures and libraries. + +And if the host compiler would compile/link it, it would not link with the +library version inside buildroot but with the library from the host, possibly returning a wrong version number. + +Instead of trying to run the compiled test program to get the version +dynamically, return the version of the buildroot environment. + +Signed-off-by: Michael Rommel + +--- pyzmq-13.0.2/buildutils/detect.py.orig 2013-08-10 00:49:28.242557978 +0200 ++++ pyzmq-13.0.2/buildutils/detect.py 2013-08-10 00:44:35.197572704 +0200 +@@ -119,15 +119,17 @@ def detect_zmq(basedir, compiler=None, * + + efile = test_compilation(cfile, compiler=compiler, **compiler_attrs) + +- result = Popen(efile, stdout=PIPE, stderr=PIPE) +- so, se = result.communicate() ++ # result = Popen(efile, stdout=PIPE, stderr=PIPE) ++ # so, se = result.communicate() + # for py3k: +- so = so.decode() +- se = se.decode() +- if result.returncode: +- msg = "Error running version detection script:\n%s\n%s" % (so,se) +- logging.error(msg) +- raise IOError(msg) ++ #so = so.decode() ++ #se = se.decode() ++ #if result.returncode: ++ # msg = "Error running version detection script:\n%s\n%s" % (so,se) ++ # logging.error(msg) ++ # raise IOError(msg) ++ ++ so = "vers: ##ZEROMQ_VERSION##" + + handlers = {'vers': lambda val: tuple(int(v) for v in val.split('.'))} + diff --git a/package/python-pyzmq/python-pyzmq.mk b/package/python-pyzmq/python-pyzmq.mk new file mode 100644 index 0000000000..e9702fc403 --- /dev/null +++ b/package/python-pyzmq/python-pyzmq.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# python-pyzmq +# +################################################################################ + +PYTHON_PYZMQ_VERSION = 13.1.0 +PYTHON_PYZMQ_SOURCE = pyzmq-$(PYTHON_PYZMQ_VERSION).tar.gz +PYTHON_PYZMQ_SITE = http://pypi.python.org/packages/source/p/pyzmq/ +PYTHON_PYZMQ_LICENSE = LGPLv3+ BSD-3c Apache License Version 2.0 +# Apache license only online: http://www.apache.org/licenses/LICENSE-2.0 +PYTHON_PYZMQ_LICENSE_FILES = COPYING.LESSER COPYING.BSD +PYTHON_PYZMQ_DEPENDENCIES = zeromq python host-python + +# Due to issues with cross-compiling, hardcode to the zeromq in BR +define PYTHON_PYZMQ_PATCH_ZEROMQ_VERSION + $(SED) 's/##ZEROMQ_VERSION##/$(ZEROMQ_VERSION)/' \ + $(@D)/buildutils/detect.py +endef + +PYTHON_PYZMQ_POST_PATCH_HOOKS += PYTHON_PYZMQ_PATCH_ZEROMQ_VERSION + +PYTHON_PYZMQ_PARAMS = CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDSHARED="$(TARGET_CC) -shared" \ + CROSS_COMPILING=yes \ + _python_sysroot=$(STAGING_DIR) \ + _python_srcdir=$(PYTHON_DIR) \ + _python_prefix=/usr \ + _python_exec_prefix=/usr + +define PYTHON_PYZMQ_CONFIGURE_CMDS + (cd $(@D); $(PYTHON_PYZMQ_PARAMS) \ + $(HOST_DIR)/usr/bin/python setup.py configure \ + --zmq=$(STAGING_DIR)/usr) +endef + +define PYTHON_PYZMQ_INSTALL_TARGET_CMDS + (cd $(@D); $(PYTHON_PYZMQ_PARAMS) \ + $(HOST_DIR)/usr/bin/python setup.py install \ + --prefix=$(TARGET_DIR)/usr) +endef + +$(eval $(generic-package)) diff --git a/package/python-serial/python-serial.mk b/package/python-serial/python-serial.mk index 048930bae8..e00577ba1b 100644 --- a/package/python-serial/python-serial.mk +++ b/package/python-serial/python-serial.mk @@ -1,21 +1,21 @@ -############################################################# +################################################################################ # # python-serial # -############################################################# +################################################################################ -PYTHON_SERIAL_VERSION = 2.5 +PYTHON_SERIAL_VERSION = 2.6 PYTHON_SERIAL_SOURCE = pyserial-$(PYTHON_SERIAL_VERSION).tar.gz -PYTHON_SERIAL_SITE = http://pypi.python.org/packages/source/p/pyserial/ +PYTHON_SERIAL_SITE = http://pypi.python.org/packages/source/p/pyserial PYTHON_SERIAL_DEPENDENCIES = python define PYTHON_SERIAL_BUILD_CMDS - (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build) + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build --executable=/usr/bin/python) endef define PYTHON_SERIAL_INSTALL_TARGET_CMDS (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) endef -$(eval $(call GENTARGETS,package,python-serial)) +$(eval $(generic-package)) diff --git a/package/python-setuptools/Config.in b/package/python-setuptools/Config.in new file mode 100644 index 0000000000..63c2b01817 --- /dev/null +++ b/package/python-setuptools/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PYTHON_SETUPTOOLS + bool "python-setuptools" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_ZLIB + help + Download, build, install, upgrade, and uninstall Python packages. + + http://pypi.python.org/pypi/setuptools diff --git a/package/python-setuptools/python-setuptools-add-executable.patch b/package/python-setuptools/python-setuptools-add-executable.patch new file mode 100644 index 0000000000..77127096bd --- /dev/null +++ b/package/python-setuptools/python-setuptools-add-executable.patch @@ -0,0 +1,50 @@ +Add a new --executable option to distribute so that we can +force the shebang line in installed python scripts. + +Signed-off-by: Gustavo Zacarias + +diff -Nura distribute-0.6.36.orig/setuptools/command/install.py distribute-0.6.36/setuptools/command/install.py +--- distribute-0.6.36.orig/setuptools/command/install.py 2013-04-13 09:46:23.160823598 -0300 ++++ distribute-0.6.36/setuptools/command/install.py 2013-04-13 11:17:28.418841986 -0300 +@@ -6,6 +6,7 @@ + """Use easy_install to install the package, w/dependencies""" + + user_options = _install.user_options + [ ++ ('executable=', 'e', "specify final destination interpreter path"), + ('old-and-unmanageable', None, "Try not to use this!"), + ('single-version-externally-managed', None, + "used by system package builders to create 'flat' eggs"), +@@ -21,6 +22,7 @@ + + def initialize_options(self): + _install.initialize_options(self) ++ self.executable = None + self.old_and_unmanageable = None + self.single_version_externally_managed = None + self.no_compile = None # make DISTUTILS_DEBUG work right! +diff -Nura distribute-0.6.36.orig/setuptools/command/install_scripts.py distribute-0.6.36/setuptools/command/install_scripts.py +--- distribute-0.6.36.orig/setuptools/command/install_scripts.py 2013-04-13 09:46:23.160823598 -0300 ++++ distribute-0.6.36/setuptools/command/install_scripts.py 2013-04-13 11:24:32.305416400 -0300 +@@ -10,6 +10,13 @@ + def initialize_options(self): + _install_scripts.initialize_options(self) + self.no_ep = False ++ self.executable = None ++ ++ def finalize_options(self): ++ _install_scripts.finalize_options(self) ++ self.set_undefined_options('install', ++ ('executable','executable') ++ ) + + def run(self): + from setuptools.command.easy_install import get_script_args +@@ -31,6 +38,8 @@ + ) + bs_cmd = self.get_finalized_command('build_scripts') + executable = getattr(bs_cmd,'executable',sys_executable) ++ if self.executable is not None: ++ executable = self.executable + is_wininst = getattr( + self.get_finalized_command("bdist_wininst"), '_is_running', False + ) diff --git a/package/python-setuptools/python-setuptools.mk b/package/python-setuptools/python-setuptools.mk new file mode 100644 index 0000000000..73c819f275 --- /dev/null +++ b/package/python-setuptools/python-setuptools.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# python-setuptools +# +################################################################################ + +# "distribute" is a fork of the unmaintained setuptools package. There +# are plans to re-merge it into setuptools; if this happens, we can +# switch back to it. +# See http://pypi.python.org/packages/source/s/setuptools + +PYTHON_SETUPTOOLS_VERSION = 0.6.36 +PYTHON_SETUPTOOLS_SOURCE = distribute-$(PYTHON_SETUPTOOLS_VERSION).tar.gz +PYTHON_SETUPTOOLS_SITE = http://pypi.python.org/packages/source/d/distribute +PYTHON_SETUPTOOLS_DEPENDENCIES = python + +define HOST_PYTHON_SETUPTOOLS_BUILD_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build) +endef + +define PYTHON_SETUPTOOLS_BUILD_CMDS + (cd $(@D); \ + PYTHONPATH="$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages" \ + $(HOST_DIR)/usr/bin/python setup.py build) +endef + +define HOST_PYTHON_SETUPTOOLS_INSTALL_CMDS + (cd $(@D); \ + $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(HOST_DIR)/usr) +endef + +define PYTHON_SETUPTOOLS_INSTALL_TARGET_CMDS + (cd $(@D); \ + PYTHONPATH="$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages" \ + $(HOST_DIR)/usr/bin/python setup.py install --executable=/usr/bin/python \ + --single-version-externally-managed --root=/ --prefix=$(TARGET_DIR)/usr) +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/python-thrift/Config.in b/package/python-thrift/Config.in new file mode 100644 index 0000000000..94a75900fe --- /dev/null +++ b/package/python-thrift/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_THRIFT + bool "python-thrift" + depends on BR2_PACKAGE_PYTHON + help + python-thrift is a Python bindings for the Apache Thrift RPC system. + + http://thrift.apache.org/ diff --git a/package/python-thrift/python-thrift.mk b/package/python-thrift/python-thrift.mk new file mode 100644 index 0000000000..4cd35e5c08 --- /dev/null +++ b/package/python-thrift/python-thrift.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# python-thrift +# +################################################################################ + +PYTHON_THRIFT_VERSION = 0.9.0 +PYTHON_THRIFT_SOURCE = thrift-$(PYTHON_THRIFT_VERSION).tar.gz +PYTHON_THRIFT_SITE = http://pypi.python.org/packages/source/t/thrift +PYTHON_THRIFT_LICENSE = Apache-2.0 +PYTHON_THRIFT_LICENSE_FILES = README + +PYTHON_THRIFT_DEPENDENCIES = python + +define PYTHON_THRIFT_BUILD_CMDS + (cd $(@D); \ + PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \ + LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ + $(HOST_DIR)/usr/bin/python setup.py build) +endef + +# host-distutilscross, if it has been installed before, will check that +# the installation directory is in python's load path. For host-python, +# it is not, so add it explicitly while installing to target. +define PYTHON_THRIFT_INSTALL_TARGET_CMDS + (cd $(@D); PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \ + $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) +endef + +$(eval $(generic-package)) diff --git a/package/python/Config.in b/package/python/Config.in index 11aa2670d5..b1c0935415 100644 --- a/package/python/Config.in +++ b/package/python/Config.in @@ -1,13 +1,16 @@ config BR2_PACKAGE_PYTHON bool "python" depends on BR2_USE_WCHAR + # uses fork() + depends on BR2_USE_MMU select BR2_PACKAGE_LIBFFI help The python language interpreter. http://www.python.org/ -comment "python requires a toolchain with WCHAR support" +comment "python needs a toolchain w/ wchar" + depends on BR2_USE_MMU depends on !BR2_USE_WCHAR if BR2_PACKAGE_PYTHON @@ -93,6 +96,12 @@ config BR2_PACKAGE_PYTHON_ZLIB help zlib support in Python +config BR2_PACKAGE_PYTHON_HASHLIB + bool "hashlib module" + select BR2_PACKAGE_OPENSSL + help + hashlib support in Python + endmenu endif diff --git a/package/python/python-2.7-001-support-for-build.patch b/package/python/python-2.7-001-support-for-build.patch index 2795e65f32..b0430a4efa 100644 --- a/package/python/python-2.7-001-support-for-build.patch +++ b/package/python/python-2.7-001-support-for-build.patch @@ -22,11 +22,11 @@ Signed-off-by: Thomas Petazzoni configure.in | 17 +++++++++++++++++ 2 files changed, 34 insertions(+), 15 deletions(-) -Index: Python-2.7.1/Makefile.pre.in +Index: Python-2.7.2/Makefile.pre.in =================================================================== ---- Python-2.7.1.orig/Makefile.pre.in -+++ Python-2.7.1/Makefile.pre.in -@@ -178,7 +178,8 @@ +--- Python-2.7.2.orig/Makefile.pre.in ++++ Python-2.7.2/Makefile.pre.in +@@ -181,7 +181,8 @@ UNICODE_OBJS= @UNICODE_OBJS@ PYTHON= python$(EXE) @@ -36,7 +36,7 @@ Index: Python-2.7.1/Makefile.pre.in # The task to run while instrument when building the profile-opt target PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck -@@ -210,7 +211,8 @@ +@@ -213,7 +214,8 @@ ########################################################################## # Parser @@ -46,7 +46,7 @@ Index: Python-2.7.1/Makefile.pre.in POBJS= \ Parser/acceler.o \ -@@ -404,8 +406,8 @@ +@@ -407,8 +409,8 @@ # Build the shared modules sharedmods: $(BUILDPYTHON) @case $$MAKEFLAGS in \ @@ -57,15 +57,16 @@ Index: Python-2.7.1/Makefile.pre.in esac # Build static library -@@ -536,12 +538,12 @@ - $(MAINCC) -c $(PY_CFLAGS) -o $@ $(srcdir)/Modules/python.c +@@ -540,13 +542,13 @@ - --$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT) -+$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN_FOR_BUILD) $(GRAMMAR_INPUT) + # Use a stamp file to prevent make -j invoking pgen twice + $(GRAMMAR_H) $(GRAMMAR_C): Parser/pgen.stamp +-Parser/pgen.stamp: $(PGEN) $(GRAMMAR_INPUT) ++Parser/pgen.stamp: $(PGEN_FOR_BUILD) $(GRAMMAR_INPUT) -@$(INSTALL) -d Include -- -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) -+ -$(PGEN_FOR_BUILD) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) +- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) ++ $(PGEN_FOR_BUILD) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) + -touch Parser/pgen.stamp -$(PGEN): $(PGENOBJS) - $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN) @@ -74,7 +75,7 @@ Index: Python-2.7.1/Makefile.pre.in Parser/grammar.o: $(srcdir)/Parser/grammar.c \ $(srcdir)/Include/token.h \ -@@ -921,25 +923,25 @@ +@@ -926,25 +928,25 @@ done $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ @@ -105,7 +106,7 @@ Index: Python-2.7.1/Makefile.pre.in # Create the PLATDIR source directory, if one wasn't distributed.. $(srcdir)/Lib/$(PLATDIR): -@@ -1044,7 +1046,7 @@ +@@ -1049,7 +1051,7 @@ # Install the dynamically loadable modules # This goes into $(exec_prefix) sharedinstall: sharedmods @@ -114,20 +115,20 @@ Index: Python-2.7.1/Makefile.pre.in --prefix=$(prefix) \ --install-scripts=$(BINDIR) \ --install-platlib=$(DESTSHARED) \ -@@ -1183,7 +1185,7 @@ +@@ -1188,7 +1190,7 @@ find . -name '*.gc??' -exec rm -f {} ';' clobber: clean profile-removal - -rm -f $(BUILDPYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \ + -rm -f $(BUILDPYTHON) $(BUILDPGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \ - tags TAGS \ + tags TAGS Parser/pgen.stamp \ config.cache config.log pyconfig.h Modules/config.c -rm -rf build platform -Index: Python-2.7.1/configure.in +Index: Python-2.7.2/configure.in =================================================================== ---- Python-2.7.1.orig/configure.in -+++ Python-2.7.1/configure.in -@@ -4291,6 +4291,23 @@ +--- Python-2.7.2.orig/configure.in ++++ Python-2.7.2/configure.in +@@ -4305,6 +4305,23 @@ done AC_MSG_RESULT(done) diff --git a/package/python/python-2.7-002-cross-compile-variable.patch b/package/python/python-2.7-002-cross-compile-variable.patch index 04b71b0759..f91ee7122c 100644 --- a/package/python/python-2.7-002-cross-compile-variable.patch +++ b/package/python/python-2.7-002-cross-compile-variable.patch @@ -15,11 +15,11 @@ Signed-off-by: Thomas Petazzoni configure.in | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) -Index: Python-2.7.1/Makefile.pre.in +Index: Python-2.7.2/Makefile.pre.in =================================================================== ---- Python-2.7.1.orig/Makefile.pre.in -+++ Python-2.7.1/Makefile.pre.in -@@ -406,8 +406,8 @@ +--- Python-2.7.2.orig/Makefile.pre.in ++++ Python-2.7.2/Makefile.pre.in +@@ -409,8 +409,8 @@ # Build the shared modules sharedmods: $(BUILDPYTHON) @case $$MAKEFLAGS in \ @@ -30,7 +30,7 @@ Index: Python-2.7.1/Makefile.pre.in esac # Build static library -@@ -1046,7 +1046,7 @@ +@@ -1051,7 +1051,7 @@ # Install the dynamically loadable modules # This goes into $(exec_prefix) sharedinstall: sharedmods @@ -39,11 +39,11 @@ Index: Python-2.7.1/Makefile.pre.in --prefix=$(prefix) \ --install-scripts=$(BINDIR) \ --install-platlib=$(DESTSHARED) \ -Index: Python-2.7.1/configure.in +Index: Python-2.7.2/configure.in =================================================================== ---- Python-2.7.1.orig/configure.in -+++ Python-2.7.1/configure.in -@@ -4308,6 +4308,9 @@ +--- Python-2.7.2.orig/configure.in ++++ Python-2.7.2/configure.in +@@ -4322,6 +4322,9 @@ AC_ARG_VAR(PYTHON_FOR_BUILD,[build system Python]) AC_ARG_VAR(PGEN_FOR_BUILD,[build system Python pgen]) diff --git a/package/python/python-2.7-003-no-import-when-cross-compiling.patch b/package/python/python-2.7-003-no-import-when-cross-compiling.patch index 162ba50319..17d67024d4 100644 --- a/package/python/python-2.7-003-no-import-when-cross-compiling.patch +++ b/package/python/python-2.7-003-no-import-when-cross-compiling.patch @@ -9,10 +9,10 @@ Signed-off-by: Thomas Petazzoni setup.py | 4 ++++ 1 file changed, 4 insertions(+) -Index: Python-2.7.1/setup.py +Index: Python-2.7.2/setup.py =================================================================== ---- Python-2.7.1.orig/setup.py -+++ Python-2.7.1/setup.py +--- Python-2.7.2.orig/setup.py ++++ Python-2.7.2/setup.py @@ -304,6 +304,10 @@ self.announce('WARNING: skipping import check for Cygwin-based "%s"' % ext.name) diff --git a/package/python/python-2.7-004-no-host-headers-libs.patch b/package/python/python-2.7-004-no-host-headers-libs.patch index 033776d465..c0c528aceb 100644 --- a/package/python/python-2.7-004-no-host-headers-libs.patch +++ b/package/python/python-2.7-004-no-host-headers-libs.patch @@ -10,23 +10,37 @@ Signed-off-by: Thomas Petazzoni setup.py | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) -Index: Python-2.7.1/setup.py +Index: Python-2.7.2/setup.py =================================================================== ---- Python-2.7.1.orig/setup.py -+++ Python-2.7.1/setup.py -@@ -351,8 +351,9 @@ +--- Python-2.7.2.orig/setup.py ++++ Python-2.7.2/setup.py +@@ -373,9 +373,10 @@ def detect_modules(self): # Ensure that /usr/local is always used - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') +- self.add_multiarch_paths() + if os.environ.get('CROSS_COMPILING') != 'yes': + add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') + add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') ++ self.add_multiarch_paths() # Add paths specified in the environment variables LDFLAGS and # CPPFLAGS for header and library files. -@@ -388,17 +389,6 @@ +@@ -383,10 +384,7 @@ + # directly since an inconsistently reproducible issue comes up where + # the environment variable is not set even though the value were passed + # into configure and stored in the Makefile (issue found on OS X 10.3). +- for env_var, arg_name, dir_list in ( +- ('LDFLAGS', '-R', self.compiler.runtime_library_dirs), +- ('LDFLAGS', '-L', self.compiler.library_dirs), +- ('CPPFLAGS', '-I', self.compiler.include_dirs)): ++ for env_var, arg_name, dir_list in (): + env_val = sysconfig.get_config_var(env_var) + if env_val: + # To prevent optparse from raising an exception about any +@@ -411,17 +409,6 @@ for directory in reversed(options.dirs): add_dir_to_list(dir_list, directory) @@ -44,7 +58,7 @@ Index: Python-2.7.1/setup.py try: have_unicode = unicode except NameError: -@@ -407,11 +397,16 @@ +@@ -430,11 +417,16 @@ # lib_dirs and inc_dirs are used to search for files; # if a file is found in one of those directories, it can # be assumed that no additional -I,-L directives are needed. @@ -66,7 +80,7 @@ Index: Python-2.7.1/setup.py exts = [] missing = [] -@@ -844,6 +839,9 @@ +@@ -867,6 +859,9 @@ db_inc_paths.append('/pkg/db-3.%d/include' % x) db_inc_paths.append('/opt/db-3.%d/include' % x) @@ -76,7 +90,7 @@ Index: Python-2.7.1/setup.py # Add some common subdirectories for Sleepycat DB to the list, # based on the standard include directories. This way DB3/4 gets # picked up when it is installed in a non-standard prefix and -@@ -996,6 +994,9 @@ +@@ -1019,6 +1014,9 @@ MIN_SQLITE_VERSION = ".".join([str(x) for x in MIN_SQLITE_VERSION_NUMBER]) @@ -86,7 +100,7 @@ Index: Python-2.7.1/setup.py # Scan the default include directories before the SQLite specific # ones. This allows one to override the copy of sqlite on OSX, # where /usr/include contains an old version of sqlite. -@@ -1095,6 +1096,8 @@ +@@ -1118,6 +1116,8 @@ # the more recent berkeleydb's db.h file first in the include path # when attempting to compile and it will fail. f = "/usr/include/db.h" diff --git a/package/python/python-2.7-005-staging-headers-libs.patch b/package/python/python-2.7-005-staging-headers-libs.patch index 170e819709..cd378f28c1 100644 --- a/package/python/python-2.7-005-staging-headers-libs.patch +++ b/package/python/python-2.7-005-staging-headers-libs.patch @@ -12,12 +12,12 @@ Patch ported to python2.7 by Maxime Ripard setup.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) -Index: Python-2.7.1/setup.py +Index: Python-2.7.2/setup.py =================================================================== ---- Python-2.7.1.orig/setup.py -+++ Python-2.7.1/setup.py -@@ -350,6 +350,19 @@ - return sys.platform +--- Python-2.7.2.orig/setup.py ++++ Python-2.7.2/setup.py +@@ -372,6 +372,19 @@ + os.unlink(tmpfile) def detect_modules(self): + try: diff --git a/package/python/python-2.7-006-disable-extensions.patch b/package/python/python-2.7-006-disable-extensions.patch index 642ebc5859..f62a50fb51 100644 --- a/package/python/python-2.7-006-disable-extensions.patch +++ b/package/python/python-2.7-006-disable-extensions.patch @@ -38,11 +38,11 @@ Signed-off-by: Thomas Petazzoni setup.py | 5 ++++- 3 files changed, 11 insertions(+), 4 deletions(-) -Index: Python-2.7.1/Makefile.pre.in +Index: Python-2.7.2/Makefile.pre.in =================================================================== ---- Python-2.7.1.orig/Makefile.pre.in -+++ Python-2.7.1/Makefile.pre.in -@@ -141,6 +141,8 @@ +--- Python-2.7.2.orig/Makefile.pre.in ++++ Python-2.7.2/Makefile.pre.in +@@ -144,6 +144,8 @@ # configure script arguments CONFIG_ARGS= @CONFIG_ARGS@ @@ -51,7 +51,7 @@ Index: Python-2.7.1/Makefile.pre.in # Subdirectories with code SRCDIRS= @SRCDIRS@ -@@ -406,8 +408,8 @@ +@@ -409,8 +411,8 @@ # Build the shared modules sharedmods: $(BUILDPYTHON) @case $$MAKEFLAGS in \ @@ -62,7 +62,7 @@ Index: Python-2.7.1/Makefile.pre.in esac # Build static library -@@ -1046,7 +1048,7 @@ +@@ -1051,7 +1053,7 @@ # Install the dynamically loadable modules # This goes into $(exec_prefix) sharedinstall: sharedmods @@ -71,11 +71,11 @@ Index: Python-2.7.1/Makefile.pre.in --prefix=$(prefix) \ --install-scripts=$(BINDIR) \ --install-platlib=$(DESTSHARED) \ -Index: Python-2.7.1/configure.in +Index: Python-2.7.2/configure.in =================================================================== ---- Python-2.7.1.orig/configure.in -+++ Python-2.7.1/configure.in -@@ -2084,6 +2084,8 @@ +--- Python-2.7.2.orig/configure.in ++++ Python-2.7.2/configure.in +@@ -2098,6 +2098,8 @@ AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) @@ -84,10 +84,10 @@ Index: Python-2.7.1/configure.in # Check for use of the system expat library AC_MSG_CHECKING(for --with-system-expat) AC_ARG_WITH(system_expat, -Index: Python-2.7.1/setup.py +Index: Python-2.7.2/setup.py =================================================================== ---- Python-2.7.1.orig/setup.py -+++ Python-2.7.1/setup.py +--- Python-2.7.2.orig/setup.py ++++ Python-2.7.2/setup.py @@ -21,7 +21,10 @@ COMPILED_WITH_PYDEBUG = hasattr(sys, 'gettotalrefcount') diff --git a/package/python/python-2.7-007-do-not-generate-pyo-files.patch b/package/python/python-2.7-007-do-not-generate-pyo-files.patch index 2cb90cc056..4ae5ef5d6a 100644 --- a/package/python/python-2.7-007-do-not-generate-pyo-files.patch +++ b/package/python/python-2.7-007-do-not-generate-pyo-files.patch @@ -13,11 +13,11 @@ Signed-off-by: Thomas Petazzoni Makefile.pre.in | 9 --------- 1 file changed, 9 deletions(-) -Index: Python-2.7.1/Makefile.pre.in +Index: Python-2.7.2/Makefile.pre.in =================================================================== ---- Python-2.7.1.orig/Makefile.pre.in -+++ Python-2.7.1/Makefile.pre.in -@@ -929,20 +929,11 @@ +--- Python-2.7.2.orig/Makefile.pre.in ++++ Python-2.7.2/Makefile.pre.in +@@ -934,20 +934,11 @@ -d $(LIBDEST) -f \ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ $(DESTDIR)$(LIBDEST) diff --git a/package/python/python-2.7-008-reread-environment.patch b/package/python/python-2.7-008-reread-environment.patch index e36d0cf11d..4ca22a4c9a 100644 --- a/package/python/python-2.7-008-reread-environment.patch +++ b/package/python/python-2.7-008-reread-environment.patch @@ -25,11 +25,11 @@ Signed-off-by: Thomas Petazzoni setup.py | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) -Index: Python-2.7.1/Makefile.pre.in +Index: Python-2.7.2/Makefile.pre.in =================================================================== ---- Python-2.7.1.orig/Makefile.pre.in -+++ Python-2.7.1/Makefile.pre.in -@@ -408,8 +408,8 @@ +--- Python-2.7.2.orig/Makefile.pre.in ++++ Python-2.7.2/Makefile.pre.in +@@ -411,8 +411,8 @@ # Build the shared modules sharedmods: $(BUILDPYTHON) @case $$MAKEFLAGS in \ @@ -40,7 +40,7 @@ Index: Python-2.7.1/Makefile.pre.in esac # Build static library -@@ -1039,7 +1039,7 @@ +@@ -1044,7 +1044,7 @@ # Install the dynamically loadable modules # This goes into $(exec_prefix) sharedinstall: sharedmods @@ -49,10 +49,10 @@ Index: Python-2.7.1/Makefile.pre.in --prefix=$(prefix) \ --install-scripts=$(BINDIR) \ --install-platlib=$(DESTSHARED) \ -Index: Python-2.7.1/setup.py +Index: Python-2.7.2/setup.py =================================================================== ---- Python-2.7.1.orig/setup.py -+++ Python-2.7.1/setup.py +--- Python-2.7.2.orig/setup.py ++++ Python-2.7.2/setup.py @@ -20,6 +20,9 @@ # Were we compiled --with-pydebug or with #define Py_DEBUG? COMPILED_WITH_PYDEBUG = hasattr(sys, 'gettotalrefcount') diff --git a/package/python/python-2.7-009-python-symlink.patch b/package/python/python-2.7-009-python-symlink.patch deleted file mode 100644 index f284dba555..0000000000 --- a/package/python/python-2.7-009-python-symlink.patch +++ /dev/null @@ -1,25 +0,0 @@ -Use a symlink between python and pythonVERSION - -By default, a hard link is used between /usr/bin/python and -/usr/bin/pythonVERSION. Using hard links for such things is fairly -uncommon, so let's make a symbolic link instead. - -Signed-off-by: Thomas Petazzoni - ---- - Makefile.pre.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: Python-2.7.1/Makefile.pre.in -=================================================================== ---- Python-2.7.1.orig/Makefile.pre.in -+++ Python-2.7.1/Makefile.pre.in -@@ -791,7 +791,7 @@ - then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \ - else true; \ - fi -- (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON)) -+ (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)$(EXE) $(PYTHON)) - -rm -f $(DESTDIR)$(BINDIR)/python-config - (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python-config) - -test -d $(DESTDIR)$(LIBPC) || $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(LIBPC) diff --git a/package/python/python-2.7-010-change-pyconfig-h-location.patch b/package/python/python-2.7-010-change-pyconfig-h-location.patch index fddc6c8836..9b95ddb151 100644 --- a/package/python/python-2.7-010-change-pyconfig-h-location.patch +++ b/package/python/python-2.7-010-change-pyconfig-h-location.patch @@ -26,10 +26,10 @@ Signed-off-by: Thomas Petazzoni Makefile.pre.in | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) -Index: Python-2.7.1/Lib/distutils/sysconfig.py +Index: Python-2.7.2/Lib/distutils/sysconfig.py =================================================================== ---- Python-2.7.1.orig/Lib/distutils/sysconfig.py -+++ Python-2.7.1/Lib/distutils/sysconfig.py +--- Python-2.7.2.orig/Lib/distutils/sysconfig.py ++++ Python-2.7.2/Lib/distutils/sysconfig.py @@ -193,7 +193,8 @@ else: inc_dir = project_base @@ -40,11 +40,11 @@ Index: Python-2.7.1/Lib/distutils/sysconfig.py if get_python_version() < '2.2': config_h = 'config.h' else: -Index: Python-2.7.1/Lib/sysconfig.py +Index: Python-2.7.2/Lib/sysconfig.py =================================================================== ---- Python-2.7.1.orig/Lib/sysconfig.py -+++ Python-2.7.1/Lib/sysconfig.py -@@ -371,7 +371,7 @@ +--- Python-2.7.2.orig/Lib/sysconfig.py ++++ Python-2.7.2/Lib/sysconfig.py +@@ -356,7 +356,7 @@ else: inc_dir = _PROJECT_BASE else: @@ -53,11 +53,11 @@ Index: Python-2.7.1/Lib/sysconfig.py return os.path.join(inc_dir, 'pyconfig.h') def get_scheme_names(): -Index: Python-2.7.1/Makefile.pre.in +Index: Python-2.7.2/Makefile.pre.in =================================================================== ---- Python-2.7.1.orig/Makefile.pre.in -+++ Python-2.7.1/Makefile.pre.in -@@ -967,7 +967,6 @@ +--- Python-2.7.2.orig/Makefile.pre.in ++++ Python-2.7.2/Makefile.pre.in +@@ -972,7 +972,6 @@ echo $(INSTALL_DATA) $$i $(INCLUDEPY); \ $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \ done @@ -65,7 +65,7 @@ Index: Python-2.7.1/Makefile.pre.in # Install the library and miscellaneous stuff needed for extending/embedding # This goes into $(exec_prefix) -@@ -1001,6 +1000,8 @@ +@@ -1006,6 +1005,8 @@ $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile diff --git a/package/python/python-2.7-011-no-rpath.patch b/package/python/python-2.7-011-no-rpath.patch index 700c4be8d1..3422dceaab 100644 --- a/package/python/python-2.7-011-no-rpath.patch +++ b/package/python/python-2.7-011-no-rpath.patch @@ -13,11 +13,11 @@ Signed-off-by: Thomas Petazzoni setup.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) -Index: Python-2.7.1/setup.py +Index: Python-2.7.2/setup.py =================================================================== ---- Python-2.7.1.orig/setup.py -+++ Python-2.7.1/setup.py -@@ -977,6 +977,12 @@ +--- Python-2.7.2.orig/setup.py ++++ Python-2.7.2/setup.py +@@ -997,6 +997,12 @@ print "bsddb lib dir:", dblib_dir, " inc dir:", db_incdir db_incs = [db_incdir] dblibs = [dblib] @@ -30,7 +30,7 @@ Index: Python-2.7.1/setup.py # We add the runtime_library_dirs argument because the # BerkeleyDB lib we're linking against often isn't in the # system dynamic library search path. This is usually -@@ -986,7 +992,7 @@ +@@ -1006,7 +1012,7 @@ exts.append(Extension('_bsddb', ['_bsddb.c'], depends = ['bsddb.h'], library_dirs=dblib_dir, @@ -39,7 +39,7 @@ Index: Python-2.7.1/setup.py include_dirs=db_incs, libraries=dblibs)) else: -@@ -1092,12 +1098,17 @@ +@@ -1112,12 +1118,17 @@ else: sqlite_extra_link_args = () @@ -58,7 +58,7 @@ Index: Python-2.7.1/setup.py extra_link_args=sqlite_extra_link_args, libraries=["sqlite3",])) else: -@@ -1198,9 +1209,13 @@ +@@ -1218,9 +1229,13 @@ elif cand == "bdb": if db_incs is not None: print "building dbm using bdb" diff --git a/package/python/python-2.7-012-correct-32bit-64bit-check.patch b/package/python/python-2.7-012-correct-32bit-64bit-check.patch index 88006f02d8..bfccbfd292 100644 --- a/package/python/python-2.7-012-correct-32bit-64bit-check.patch +++ b/package/python/python-2.7-012-correct-32bit-64bit-check.patch @@ -16,10 +16,10 @@ Signed-off-by: Thomas Petazzoni setup.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) -Index: Python-2.7.1/setup.py +Index: Python-2.7.2/setup.py =================================================================== ---- Python-2.7.1.orig/setup.py -+++ Python-2.7.1/setup.py +--- Python-2.7.2.orig/setup.py ++++ Python-2.7.2/setup.py @@ -29,6 +29,14 @@ except KeyError: disabled_module_list = list() @@ -35,7 +35,7 @@ Index: Python-2.7.1/setup.py def add_dir_to_list(dirlist, dir): """Add the directory 'dir' to the list 'dirlist' (at the front) if 1) 'dir' is not already in 'dirlist' -@@ -608,7 +616,7 @@ +@@ -628,7 +636,7 @@ exts.append( Extension('audioop', ['audioop.c']) ) # Disabled on 64-bit platforms @@ -44,7 +44,7 @@ Index: Python-2.7.1/setup.py # Operations on images exts.append( Extension('imageop', ['imageop.c']) ) else: -@@ -1424,7 +1432,7 @@ +@@ -1444,7 +1452,7 @@ missing.append('_codecs_%s' % loc) # Dynamic loading module diff --git a/package/python/python-2.7-013-fix-linux-3-compilation.patch b/package/python/python-2.7-013-fix-linux-3-compilation.patch index 46280d4d93..e834b9f172 100644 --- a/package/python/python-2.7-013-fix-linux-3-compilation.patch +++ b/package/python/python-2.7-013-fix-linux-3-compilation.patch @@ -1,7 +1,7 @@ -Index: Python-2.7.1/configure +Index: Python-2.7.2/configure =================================================================== ---- Python-2.7.1.orig/configure -+++ Python-2.7.1/configure +--- Python-2.7.2.orig/configure ++++ Python-2.7.2/configure @@ -3007,6 +3007,7 @@ darwin*) MACHDEP="darwin";; atheos*) MACHDEP="atheos";; @@ -10,10 +10,10 @@ Index: Python-2.7.1/configure '') MACHDEP="unknown";; esac fi -Index: Python-2.7.1/configure.in +Index: Python-2.7.2/configure.in =================================================================== ---- Python-2.7.1.orig/configure.in -+++ Python-2.7.1/configure.in +--- Python-2.7.2.orig/configure.in ++++ Python-2.7.2/configure.in @@ -297,6 +297,7 @@ darwin*) MACHDEP="darwin";; atheos*) MACHDEP="atheos";; diff --git a/package/python/python-2.7-014-verbose-module-build.patch b/package/python/python-2.7-014-verbose-module-build.patch new file mode 100644 index 0000000000..ea81e55b8d --- /dev/null +++ b/package/python/python-2.7-014-verbose-module-build.patch @@ -0,0 +1,19 @@ +Enables verbose output when building modules + +Patch borrowed from OpenBricks. + +Signed-off-by: Thomas Petazzoni + +Index: Python-2.7.2/Makefile.pre.in +=================================================================== +--- Python-2.7.2.orig/Makefile.pre.in ++++ Python-2.7.2/Makefile.pre.in +@@ -411,7 +411,7 @@ + # Build the shared modules + sharedmods: $(BUILDPYTHON) + @case $$MAKEFLAGS in \ +- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" CONFIG_ARGS="$(CONFIG_ARGS)" $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q build;; \ ++ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" CONFIG_ARGS="$(CONFIG_ARGS)" $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \ + *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" CONFIG_ARGS="$(CONFIG_ARGS)" $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \ + esac + diff --git a/package/python/python-2.7-015-distutils-cross-compilation-support.patch b/package/python/python-2.7-015-distutils-cross-compilation-support.patch new file mode 100644 index 0000000000..8304091429 --- /dev/null +++ b/package/python/python-2.7-015-distutils-cross-compilation-support.patch @@ -0,0 +1,84 @@ +Add some cross-compilation fixes to distutils + +Inspired by work done by Marc Kleine-Budde in +PTXdist. + +Signed-off-by: Thomas Petazzoni +--- + Lib/distutils/sysconfig.py | 7 ++++--- + 1 files changed, 4 insertions(+), 3 deletions(-) + +Index: Python-2.7.2/Lib/distutils/sysconfig.py +=================================================================== +--- Python-2.7.2.orig/Lib/distutils/sysconfig.py ++++ Python-2.7.2/Lib/distutils/sysconfig.py +@@ -19,13 +19,22 @@ + from distutils.errors import DistutilsPlatformError + + # These are needed in a couple of spots, so just compute them once. +-PREFIX = os.path.normpath(sys.prefix) +-EXEC_PREFIX = os.path.normpath(sys.exec_prefix) ++EXECUTABLE_DIRNAME = os.path.dirname(os.path.realpath(sys.executable)) ++if os.environ.get('CROSS_COMPILING') == 'yes': ++ _sysroot=os.environ.get('_python_sysroot') ++ PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix')) ++ EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix')) ++ if '_python_srcdir' in os.environ: ++ EXECUTABLE_DIRNAME = os.path.normpath(os.environ['_python_srcdir']) ++else: ++ PREFIX = os.path.normpath(sys.prefix) ++ EXEC_PREFIX = os.path.normpath(sys.exec_prefix) ++ + + # Path to the base directory of the project. On Windows the binary may + # live in project/PCBuild9. If we're dealing with an x64 Windows build, + # it'll live in project/PCbuild/amd64. +-project_base = os.path.dirname(os.path.abspath(sys.executable)) ++project_base = EXECUTABLE_DIRNAME + if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): + project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) + # PC/VS7.1 +@@ -74,7 +83,7 @@ + + if os.name == "posix": + if python_build: +- buildir = os.path.dirname(sys.executable) ++ buildir = EXECUTABLE_DIRNAME + if plat_specific: + # python.h is located in the buildir + inc_dir = buildir +@@ -206,7 +215,7 @@ + def get_makefile_filename(): + """Return full pathname of installed Makefile from the Python build.""" + if python_build: +- return os.path.join(os.path.dirname(sys.executable), "Makefile") ++ return os.path.join(EXECUTABLE_DIRNAME, "Makefile") + lib_dir = get_python_lib(plat_specific=1, standard_lib=1) + return os.path.join(lib_dir, "config", "Makefile") + +Index: Python-2.7.2/configure.in +=================================================================== +--- Python-2.7.2.orig/configure.in ++++ Python-2.7.2/configure.in +@@ -4328,6 +4328,21 @@ + CROSS_COMPILING=$cross_compiling + AC_SUBST(CROSS_COMPILING) + ++# ++# Cross compiling ++# ++# special RUNSHARED ++if test "$cross_compiling" = "yes"; then ++ RUNSHARED="\ ++ CROSS_COMPILING=yes \ ++ _python_cross_host=${ac_cv_host} \ ++ _python_sysroot=\"\$(sysroot)\" \ ++ _python_srcdir=\"\$(srcdir)\" \ ++ _python_prefix=\"\$(prefix)\" \ ++ _python_exec_prefix=\"\$(exec_prefix)\"" ++fi ++ ++ + # generate output files + AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc) + AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix]) diff --git a/package/python/python-2.7-016-cross-compile-getaddrinfo.patch b/package/python/python-2.7-016-cross-compile-getaddrinfo.patch new file mode 100644 index 0000000000..dae300577d --- /dev/null +++ b/package/python/python-2.7-016-cross-compile-getaddrinfo.patch @@ -0,0 +1,15 @@ +Disable buggy_getaddrinfo configure test when cross-compiling with IPv6 support + +Signed-off-by: Vanya Sergeev + +--- python-2.7.2.orig/configure.in 2012-04-22 06:52:09.361809545 -0400 ++++ python-2.7.2/configure.in 2012-04-22 06:56:37.900634194 -0400 +@@ -3128,7 +3128,7 @@ + + AC_MSG_RESULT($ac_cv_buggy_getaddrinfo) + +-if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes ++if test $have_getaddrinfo = no || test "$cross_compiling" != "yes" -a "$ac_cv_buggy_getaddrinfo" = yes + then + if test $ipv6 = yes + then diff --git a/package/python/python-2.7-100-optional-test-modules.patch b/package/python/python-2.7-100-optional-test-modules.patch index b51ea57cc6..a988717d05 100644 --- a/package/python/python-2.7-100-optional-test-modules.patch +++ b/package/python/python-2.7-100-optional-test-modules.patch @@ -4,26 +4,26 @@ The Python standard distribution comes with many test modules, that are not necessarly useful on embedded targets. Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin --- Makefile.pre.in | 40 +++++++++++++++++++++++++++------------- configure.in | 6 ++++++ 2 files changed, 33 insertions(+), 13 deletions(-) -Index: Python-2.7.1/Makefile.pre.in +Index: Python-2.7.2/Makefile.pre.in =================================================================== ---- Python-2.7.1.orig/Makefile.pre.in -+++ Python-2.7.1/Makefile.pre.in -@@ -851,23 +851,37 @@ +--- Python-2.7.2.orig/Makefile.pre.in ++++ Python-2.7.2/Makefile.pre.in +@@ -856,23 +856,30 @@ plat-mac/lib-scriptpackages/SystemEvents \ plat-mac/lib-scriptpackages/Terminal PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages -LIBSUBDIRS= lib-tk lib-tk/test lib-tk/test/test_tkinter \ -- lib-tk/test/test_ttk site-packages test test/data \ -- test/decimaltestdata test/xmltestdata \ +- lib-tk/test/test_ttk site-packages test test/data \ +- test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \ - test/tracedmodules \ -+LIBSUBDIRS= lib-tk \ -+ site-packages \ ++LIBSUBDIRS= lib-tk site-packages \ encodings compiler hotshot \ - email email/mime email/test email/test/data \ - json json/tests \ @@ -38,8 +38,8 @@ Index: Python-2.7.1/Makefile.pre.in + sqlite3 \ + logging bsddb csv importlib wsgiref \ + lib2to3 lib2to3/fixes lib2to3/pgen2 \ -+ ctypes ctypes/macholib idlelib idlelib/Icons \ -+ distutils distutils/command $(XMLLIBSUBDIRS) \ ++ ctypes ctypes/macholib idlelib idlelib/Icons \ ++ distutils distutils/command $(XMLLIBSUBDIRS) \ multiprocessing multiprocessing/dummy \ - unittest unittest/test \ + unittest \ @@ -47,29 +47,23 @@ Index: Python-2.7.1/Makefile.pre.in curses pydoc_data $(MACHDEPS) + +ifeq (@TEST_MODULES@,yes) -+LIBSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \ -+ lib-tk/test/test_ttk test test/data \ -+ test/decimaltestdata test/xmltestdata \ -+ test/tracedmodules \ -+ email/test email/test/data \ -+ sqlite3/test \ -+ bsddb/test \ -+ lib2to3/tests \ -+ lib2to3/tests/data \ -+ lib2to3/tests/data/fixers \ -+ lib2to3/tests/data/fixers/myfixes \ -+ ctypes/test distutils/tests \ -+ unittest/test ++LIBSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \ ++ lib-tk/test/test_ttk test test/data \ ++ test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \ ++ test/tracedmodules email/test email/test/data \ ++ json/tests sqlite3/test bsddb/test lib2to3/tests \ ++ lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \ ++ ctypes/test distutils/tests unittest/test +endif + - libinstall: build_all $(srcdir)/Lib/$(PLATDIR) + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c @for i in $(SCRIPTDIR) $(LIBDEST); \ do \ -Index: Python-2.7.1/configure.in +Index: Python-2.7.2/configure.in =================================================================== ---- Python-2.7.1.orig/configure.in -+++ Python-2.7.1/configure.in -@@ -2393,6 +2393,12 @@ +--- Python-2.7.2.orig/configure.in ++++ Python-2.7.2/configure.in +@@ -2408,6 +2408,12 @@ fi diff --git a/package/python/python-2.7-101-optional-pydoc.patch b/package/python/python-2.7-101-optional-pydoc.patch index 8d51dc95ba..ccc937bb27 100644 --- a/package/python/python-2.7-101-optional-pydoc.patch +++ b/package/python/python-2.7-101-optional-pydoc.patch @@ -4,6 +4,7 @@ It removes 0.5 MB of data from the target plus the pydoc script itself. Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin --- Makefile.pre.in | 6 +++++- @@ -11,11 +12,11 @@ Signed-off-by: Thomas Petazzoni setup.py | 10 +++++++--- 3 files changed, 17 insertions(+), 4 deletions(-) -Index: Python-2.7.1/Makefile.pre.in +Index: Python-2.7.2/Makefile.pre.in =================================================================== ---- Python-2.7.1.orig/Makefile.pre.in -+++ Python-2.7.1/Makefile.pre.in -@@ -864,7 +864,7 @@ +--- Python-2.7.2.orig/Makefile.pre.in ++++ Python-2.7.2/Makefile.pre.in +@@ -868,7 +868,7 @@ multiprocessing multiprocessing/dummy \ unittest \ lib-old \ @@ -23,23 +24,23 @@ Index: Python-2.7.1/Makefile.pre.in + curses $(MACHDEPS) ifeq (@TEST_MODULES@,yes) - LIBSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \ -@@ -882,6 +882,10 @@ - unittest/test + LIBSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \ +@@ -880,6 +880,10 @@ + ctypes/test distutils/tests unittest/test endif +ifeq (@PYDOC@,yes) +LIBSUBDIRS += pydoc_data +endif + - libinstall: build_all $(srcdir)/Lib/$(PLATDIR) + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c @for i in $(SCRIPTDIR) $(LIBDEST); \ do \ -Index: Python-2.7.1/configure.in +Index: Python-2.7.2/configure.in =================================================================== ---- Python-2.7.1.orig/configure.in -+++ Python-2.7.1/configure.in -@@ -2392,6 +2392,11 @@ +--- Python-2.7.2.orig/configure.in ++++ Python-2.7.2/configure.in +@@ -2407,6 +2407,11 @@ esac]) fi @@ -51,11 +52,11 @@ Index: Python-2.7.1/configure.in AC_SUBST(TEST_MODULES) -Index: Python-2.7.1/setup.py +Index: Python-2.7.2/setup.py =================================================================== ---- Python-2.7.1.orig/setup.py -+++ Python-2.7.1/setup.py -@@ -2072,6 +2072,12 @@ +--- Python-2.7.2.orig/setup.py ++++ Python-2.7.2/setup.py +@@ -2092,6 +2092,12 @@ # turn off warnings when deprecated modules are imported import warnings warnings.filterwarnings("ignore",category=DeprecationWarning) @@ -68,7 +69,7 @@ Index: Python-2.7.1/setup.py setup(# PyPI Metadata (PEP 301) name = "Python", version = sys.version.split()[0], -@@ -2092,9 +2098,7 @@ +@@ -2112,9 +2118,7 @@ ext_modules=[Extension('_struct', ['_struct.c'])], # Scripts to install diff --git a/package/python/python-2.7-102-optional-2to3.patch b/package/python/python-2.7-102-optional-2to3.patch index 3550db1323..0321619fcd 100644 --- a/package/python/python-2.7-102-optional-2to3.patch +++ b/package/python/python-2.7-102-optional-2to3.patch @@ -4,6 +4,7 @@ lib2to3 is a library to convert Python 2.x code to Python 3.x. As such, it is probably not very useful on embedded system targets. Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin --- Makefile.pre.in | 24 +++++++++++++++++------- @@ -11,34 +12,29 @@ Signed-off-by: Thomas Petazzoni setup.py | 5 +++-- 3 files changed, 26 insertions(+), 9 deletions(-) -Index: Python-2.7.1/Makefile.pre.in +Index: Python-2.7.2/Makefile.pre.in =================================================================== ---- Python-2.7.1.orig/Makefile.pre.in -+++ Python-2.7.1/Makefile.pre.in -@@ -856,9 +856,7 @@ - encodings compiler hotshot \ - email email/mime \ +--- Python-2.7.2.orig/Makefile.pre.in ++++ Python-2.7.2/Makefile.pre.in +@@ -862,7 +862,6 @@ json \ -- sqlite3 \ + sqlite3 \ logging bsddb csv importlib wsgiref \ - lib2to3 lib2to3/fixes lib2to3/pgen2 \ - ctypes ctypes/macholib idlelib idlelib/Icons \ - distutils distutils/command $(XMLLIBSUBDIRS) \ + ctypes ctypes/macholib idlelib idlelib/Icons \ + distutils distutils/command $(XMLLIBSUBDIRS) \ multiprocessing multiprocessing/dummy \ -@@ -872,12 +870,7 @@ - test/decimaltestdata test/xmltestdata \ - test/tracedmodules \ - email/test email/test/data \ -- sqlite3/test \ - bsddb/test \ -- lib2to3/tests \ -- lib2to3/tests/data \ -- lib2to3/tests/data/fixers \ -- lib2to3/tests/data/fixers/myfixes \ - ctypes/test distutils/tests \ - unittest/test +@@ -875,8 +874,7 @@ + lib-tk/test/test_ttk test test/data \ + test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \ + test/tracedmodules email/test email/test/data \ +- json/tests sqlite3/test bsddb/test lib2to3/tests \ +- lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \ ++ json/tests sqlite3/test bsddb/test \ + ctypes/test distutils/tests unittest/test endif -@@ -886,6 +879,23 @@ + +@@ -884,6 +882,16 @@ LIBSUBDIRS += pydoc_data endif @@ -52,21 +48,14 @@ Index: Python-2.7.1/Makefile.pre.in +endif +endif + -+ifeq (@SQLITE3@,yes) -+LIBSUBDIRS += sqlite3 -+ifeq (@TEST_MODULES@,yes) -+LIBSUBDIRS += sqlite3/test -+endif -+endif -+ - libinstall: build_all $(srcdir)/Lib/$(PLATDIR) + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c @for i in $(SCRIPTDIR) $(LIBDEST); \ do \ -Index: Python-2.7.1/configure.in +Index: Python-2.7.2/configure.in =================================================================== ---- Python-2.7.1.orig/configure.in -+++ Python-2.7.1/configure.in -@@ -2404,6 +2404,12 @@ +--- Python-2.7.2.orig/configure.in ++++ Python-2.7.2/configure.in +@@ -2419,6 +2419,12 @@ AS_HELP_STRING([--disable-test-modules], [disable test modules]), [ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ]) @@ -79,11 +68,11 @@ Index: Python-2.7.1/configure.in # Check for enable-ipv6 AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified]) AC_MSG_CHECKING([if --enable-ipv6 is specified]) -Index: Python-2.7.1/setup.py +Index: Python-2.7.2/setup.py =================================================================== ---- Python-2.7.1.orig/setup.py -+++ Python-2.7.1/setup.py -@@ -2073,10 +2073,11 @@ +--- Python-2.7.2.orig/setup.py ++++ Python-2.7.2/setup.py +@@ -2093,10 +2093,11 @@ import warnings warnings.filterwarnings("ignore",category=DeprecationWarning) diff --git a/package/python/python-2.7-103-optional-sqlite.patch b/package/python/python-2.7-103-optional-sqlite.patch index 08e8b5d22e..a915c55c3a 100644 --- a/package/python/python-2.7-103-optional-sqlite.patch +++ b/package/python/python-2.7-103-optional-sqlite.patch @@ -1,16 +1,18 @@ Add option to disable the sqlite3 module Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin --- + Makefile.pre.in | 24 +++++++++++++++++------- configure.in | 9 +++++++++ - 1 file changed, 9 insertions(+) + 2 file changed, 9 insertions(+) -Index: Python-2.7.1/configure.in +Index: Python-2.7.2/configure.in =================================================================== ---- Python-2.7.1.orig/configure.in -+++ Python-2.7.1/configure.in -@@ -2392,6 +2392,15 @@ +--- Python-2.7.2.orig/configure.in ++++ Python-2.7.2/configure.in +@@ -2407,6 +2407,15 @@ esac]) fi @@ -26,3 +28,30 @@ Index: Python-2.7.1/configure.in AC_SUBST(PYDOC) AC_ARG_ENABLE(pydoc, +Index: Python-2.7.2/Makefile.pre.in +=================================================================== +--- Python-2.7.2.orig/Makefile.pre.in ++++ Python-2.7.2/Makefile.pre.in +@@ -875,7 +874,7 @@ + lib-tk/test/test_ttk test test/data \ + test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \ + test/tracedmodules email/test email/test/data \ +- json/tests sqlite3/test bsddb/test \ ++ json/tests bsddb/test \ + ctypes/test distutils/tests unittest/test + endif + +@@ -884,6 +882,13 @@ + LIBSUBDIRS += pydoc_data + endif + ++ifeq (@SQLITE3@,yes) ++LIBSUBDIRS += sqlite3 ++ifeq (@TEST_MODULES@,yes) ++LIBSUBDIRS += sqlite3/test ++endif ++endif ++ + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c + @for i in $(SCRIPTDIR) $(LIBDEST); \ + do \ diff --git a/package/python/python-2.7-104-optional-tk.patch b/package/python/python-2.7-104-optional-tk.patch index 6bcdcb8686..9333e33a62 100644 --- a/package/python/python-2.7-104-optional-tk.patch +++ b/package/python/python-2.7-104-optional-tk.patch @@ -1,37 +1,37 @@ Add an option to disable the tk module Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin --- Makefile.pre.in | 14 ++++++++++---- configure.in | 9 +++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) -Index: Python-2.7.1/Makefile.pre.in +Index: Python-2.7.2/Makefile.pre.in =================================================================== ---- Python-2.7.1.orig/Makefile.pre.in -+++ Python-2.7.1/Makefile.pre.in -@@ -851,8 +851,7 @@ +--- Python-2.7.2.orig/Makefile.pre.in ++++ Python-2.7.2/Makefile.pre.in +@@ -856,7 +856,7 @@ plat-mac/lib-scriptpackages/SystemEvents \ plat-mac/lib-scriptpackages/Terminal PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages --LIBSUBDIRS= lib-tk \ -- site-packages \ +-LIBSUBDIRS= lib-tk site-packages \ +LIBSUBDIRS= site-packages \ encodings compiler hotshot \ email email/mime \ json \ -@@ -865,8 +864,7 @@ +@@ -870,8 +870,7 @@ curses $(MACHDEPS) ifeq (@TEST_MODULES@,yes) --LIBSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \ -- lib-tk/test/test_ttk test test/data \ -+LIBSUBDIRS += test test/data \ - test/decimaltestdata test/xmltestdata \ - test/tracedmodules \ - email/test email/test/data \ -@@ -896,6 +894,14 @@ +-LIBSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \ +- lib-tk/test/test_ttk test test/data \ ++LIBSUBDIRS += test test/data \ + test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \ + test/tracedmodules email/test email/test/data \ + json/tests sqlite3/test bsddb/test \ +@@ -899,6 +898,14 @@ endif endif @@ -43,14 +43,14 @@ Index: Python-2.7.1/Makefile.pre.in +endif +endif + - libinstall: build_all $(srcdir)/Lib/$(PLATDIR) + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c @for i in $(SCRIPTDIR) $(LIBDEST); \ do \ -Index: Python-2.7.1/configure.in +Index: Python-2.7.2/configure.in =================================================================== ---- Python-2.7.1.orig/configure.in -+++ Python-2.7.1/configure.in -@@ -2401,6 +2401,15 @@ +--- Python-2.7.2.orig/configure.in ++++ Python-2.7.2/configure.in +@@ -2416,6 +2416,15 @@ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3" fi diff --git a/package/python/python-2.7-105-optional-curses.patch b/package/python/python-2.7-105-optional-curses.patch index 3a1ceabf65..7f8da7c8a2 100644 --- a/package/python/python-2.7-105-optional-curses.patch +++ b/package/python/python-2.7-105-optional-curses.patch @@ -1,17 +1,18 @@ Add an option to disable the curses module Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin --- Makefile.pre.in | 6 +++++- configure.in | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) -Index: Python-2.7.1/Makefile.pre.in +Index: Python-2.7.2/Makefile.pre.in =================================================================== ---- Python-2.7.1.orig/Makefile.pre.in -+++ Python-2.7.1/Makefile.pre.in -@@ -861,7 +861,7 @@ +--- Python-2.7.2.orig/Makefile.pre.in ++++ Python-2.7.2/Makefile.pre.in +@@ -867,7 +867,7 @@ multiprocessing multiprocessing/dummy \ unittest \ lib-old \ @@ -19,8 +20,8 @@ Index: Python-2.7.1/Makefile.pre.in + $(MACHDEPS) ifeq (@TEST_MODULES@,yes) - LIBSUBDIRS += test test/data \ -@@ -902,6 +902,10 @@ + LIBSUBDIRS += test test/data \ +@@ -906,6 +906,10 @@ endif endif @@ -28,14 +29,14 @@ Index: Python-2.7.1/Makefile.pre.in +LIBSUBDIRS += curses +endif + - libinstall: build_all $(srcdir)/Lib/$(PLATDIR) + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c @for i in $(SCRIPTDIR) $(LIBDEST); \ do \ -Index: Python-2.7.1/configure.in +Index: Python-2.7.2/configure.in =================================================================== ---- Python-2.7.1.orig/configure.in -+++ Python-2.7.1/configure.in -@@ -2410,6 +2410,15 @@ +--- Python-2.7.2.orig/configure.in ++++ Python-2.7.2/configure.in +@@ -2425,6 +2425,15 @@ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter" fi diff --git a/package/python/python-2.7-106-optional-expat.patch b/package/python/python-2.7-106-optional-expat.patch index 24272d9ab4..2d8ae74e2b 100644 --- a/package/python/python-2.7-106-optional-expat.patch +++ b/package/python/python-2.7-106-optional-expat.patch @@ -7,6 +7,7 @@ builtin the Python sources, or no expat at all (which disables the installation of XML modules). Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin --- Makefile.pre.in | 6 +++++- @@ -14,20 +15,20 @@ Signed-off-by: Thomas Petazzoni setup.py | 2 +- 3 files changed, 19 insertions(+), 7 deletions(-) -Index: Python-2.7.1/Makefile.pre.in +Index: Python-2.7.2/Makefile.pre.in =================================================================== ---- Python-2.7.1.orig/Makefile.pre.in -+++ Python-2.7.1/Makefile.pre.in -@@ -857,7 +857,7 @@ - json \ +--- Python-2.7.2.orig/Makefile.pre.in ++++ Python-2.7.2/Makefile.pre.in +@@ -863,7 +863,7 @@ + sqlite3 \ logging bsddb csv importlib wsgiref \ - ctypes ctypes/macholib idlelib idlelib/Icons \ -- distutils distutils/command $(XMLLIBSUBDIRS) \ + ctypes ctypes/macholib idlelib idlelib/Icons \ +- distutils distutils/command $(XMLLIBSUBDIRS) \ + distutils distutils/command \ multiprocessing multiprocessing/dummy \ unittest \ lib-old \ -@@ -906,6 +906,10 @@ +@@ -910,6 +910,10 @@ LIBSUBDIRS += curses endif @@ -35,14 +36,14 @@ Index: Python-2.7.1/Makefile.pre.in +LIBSUBDIRS += $(XMLLIBSUBDIRS) +endif + - libinstall: build_all $(srcdir)/Lib/$(PLATDIR) + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c @for i in $(SCRIPTDIR) $(LIBDEST); \ do \ -Index: Python-2.7.1/configure.in +Index: Python-2.7.2/configure.in =================================================================== ---- Python-2.7.1.orig/configure.in -+++ Python-2.7.1/configure.in -@@ -2087,13 +2087,21 @@ +--- Python-2.7.2.orig/configure.in ++++ Python-2.7.2/configure.in +@@ -2102,13 +2102,21 @@ AC_SUBST(DISABLED_EXTENSIONS) # Check for use of the system expat library @@ -69,11 +70,11 @@ Index: Python-2.7.1/configure.in # Check for use of the system libffi library AC_MSG_CHECKING(for --with-system-ffi) -Index: Python-2.7.1/setup.py +Index: Python-2.7.2/setup.py =================================================================== ---- Python-2.7.1.orig/setup.py -+++ Python-2.7.1/setup.py -@@ -1383,7 +1383,7 @@ +--- Python-2.7.2.orig/setup.py ++++ Python-2.7.2/setup.py +@@ -1403,7 +1403,7 @@ # # More information on Expat can be found at www.libexpat.org. # diff --git a/package/python/python-2.7-107-optional-codecs-cjk.patch b/package/python/python-2.7-107-optional-codecs-cjk.patch index 1b0541b10a..8ba61fe082 100644 --- a/package/python/python-2.7-107-optional-codecs-cjk.patch +++ b/package/python/python-2.7-107-optional-codecs-cjk.patch @@ -6,11 +6,11 @@ Signed-off-by: Thomas Petazzoni configure.in | 6 ++++++ 1 file changed, 6 insertions(+) -Index: Python-2.7.1/configure.in +Index: Python-2.7.2/configure.in =================================================================== ---- Python-2.7.1.orig/configure.in -+++ Python-2.7.1/configure.in -@@ -2409,6 +2409,12 @@ +--- Python-2.7.2.orig/configure.in ++++ Python-2.7.2/configure.in +@@ -2424,6 +2424,12 @@ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3" fi diff --git a/package/python/python-2.7-108-optional-nis.patch b/package/python/python-2.7-108-optional-nis.patch index 35be7ff63c..212f8d6ca5 100644 --- a/package/python/python-2.7-108-optional-nis.patch +++ b/package/python/python-2.7-108-optional-nis.patch @@ -9,11 +9,11 @@ Signed-off-by: Thomas Petazzoni configure.in | 6 ++++++ 1 file changed, 6 insertions(+) -Index: Python-2.7.1/configure.in +Index: Python-2.7.2/configure.in =================================================================== ---- Python-2.7.1.orig/configure.in -+++ Python-2.7.1/configure.in -@@ -2415,6 +2415,12 @@ +--- Python-2.7.2.orig/configure.in ++++ Python-2.7.2/configure.in +@@ -2430,6 +2430,12 @@ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk" fi]) diff --git a/package/python/python-2.7-109-optional-unicodedata.patch b/package/python/python-2.7-109-optional-unicodedata.patch index 9973c3c9b0..229ba8c064 100644 --- a/package/python/python-2.7-109-optional-unicodedata.patch +++ b/package/python/python-2.7-109-optional-unicodedata.patch @@ -6,11 +6,11 @@ Signed-off-by: Thomas Petazzoni configure.in | 6 ++++++ 1 file changed, 6 insertions(+) -Index: Python-2.7.1/configure.in +Index: Python-2.7.2/configure.in =================================================================== ---- Python-2.7.1.orig/configure.in -+++ Python-2.7.1/configure.in -@@ -2421,6 +2421,12 @@ +--- Python-2.7.2.orig/configure.in ++++ Python-2.7.2/configure.in +@@ -2436,6 +2436,12 @@ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis" fi]) diff --git a/package/python/python-2.7-110-optional-db.patch b/package/python/python-2.7-110-optional-db.patch index 5589ed3c64..b32eea970f 100644 --- a/package/python/python-2.7-110-optional-db.patch +++ b/package/python/python-2.7-110-optional-db.patch @@ -5,34 +5,36 @@ able to build Python without it, this patch adds an option to disable the build/installation of this Python module. Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin --- Makefile.pre.in | 10 ++++++++-- configure.in | 22 ++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) -Index: Python-2.7.1/Makefile.pre.in +Index: Python-2.7.2/Makefile.pre.in =================================================================== ---- Python-2.7.1.orig/Makefile.pre.in -+++ Python-2.7.1/Makefile.pre.in -@@ -855,7 +855,7 @@ - encodings compiler hotshot \ +--- Python-2.7.2.orig/Makefile.pre.in ++++ Python-2.7.2/Makefile.pre.in +@@ -861,7 +861,7 @@ email email/mime \ json \ + sqlite3 \ - logging bsddb csv importlib wsgiref \ + logging csv importlib wsgiref \ - ctypes ctypes/macholib idlelib idlelib/Icons \ + ctypes ctypes/macholib idlelib idlelib/Icons \ distutils distutils/command \ multiprocessing multiprocessing/dummy \ -@@ -868,7 +868,6 @@ - test/decimaltestdata test/xmltestdata \ - test/tracedmodules \ - email/test email/test/data \ -- bsddb/test \ - ctypes/test distutils/tests \ - unittest/test +@@ -873,7 +873,7 @@ + LIBSUBDIRS += test test/data \ + test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \ + test/tracedmodules email/test email/test/data \ +- json/tests bsddb/test \ ++ json/tests \ + ctypes/test distutils/tests unittest/test endif -@@ -910,6 +909,13 @@ + +@@ -914,6 +914,13 @@ LIBSUBDIRS += $(XMLLIBSUBDIRS) endif @@ -43,14 +45,14 @@ Index: Python-2.7.1/Makefile.pre.in +endif +endif + - libinstall: build_all $(srcdir)/Lib/$(PLATDIR) + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c @for i in $(SCRIPTDIR) $(LIBDEST); \ do \ -Index: Python-2.7.1/configure.in +Index: Python-2.7.2/configure.in =================================================================== ---- Python-2.7.1.orig/configure.in -+++ Python-2.7.1/configure.in -@@ -2421,6 +2421,28 @@ +--- Python-2.7.2.orig/configure.in ++++ Python-2.7.2/configure.in +@@ -2436,6 +2436,28 @@ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis" fi]) diff --git a/package/python/python-2.7-111-optional-ssl.patch b/package/python/python-2.7-111-optional-ssl.patch index ff38507faa..5885b4eec7 100644 --- a/package/python/python-2.7-111-optional-ssl.patch +++ b/package/python/python-2.7-111-optional-ssl.patch @@ -6,11 +6,11 @@ Signed-off-by: Thomas Petazzoni configure.in | 6 ++++++ 1 file changed, 6 insertions(+) -Index: Python-2.7.1/configure.in +Index: Python-2.7.2/configure.in =================================================================== ---- Python-2.7.1.orig/configure.in -+++ Python-2.7.1/configure.in -@@ -2421,6 +2421,12 @@ +--- Python-2.7.2.orig/configure.in ++++ Python-2.7.2/configure.in +@@ -2436,6 +2436,12 @@ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis" fi]) diff --git a/package/python/python-2.7-112-optional-bzip2.patch b/package/python/python-2.7-112-optional-bzip2.patch index f2e4e7cae1..83a2479116 100644 --- a/package/python/python-2.7-112-optional-bzip2.patch +++ b/package/python/python-2.7-112-optional-bzip2.patch @@ -5,11 +5,11 @@ Signed-off-by: Thomas Petazzoni configure.in | 6 ++++++ 1 file changed, 6 insertions(+) -Index: Python-2.7.1/configure.in +Index: Python-2.7.2/configure.in =================================================================== ---- Python-2.7.1.orig/configure.in -+++ Python-2.7.1/configure.in -@@ -2427,6 +2427,12 @@ +--- Python-2.7.2.orig/configure.in ++++ Python-2.7.2/configure.in +@@ -2442,6 +2442,12 @@ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} ssl" fi]) diff --git a/package/python/python-2.7-113-optional-zlib.patch b/package/python/python-2.7-113-optional-zlib.patch index b5d9665363..f24eb17265 100644 --- a/package/python/python-2.7-113-optional-zlib.patch +++ b/package/python/python-2.7-113-optional-zlib.patch @@ -5,11 +5,11 @@ Signed-off-by: Thomas Petazzoni configure.in | 6 ++++++ 1 file changed, 6 insertions(+) -Index: Python-2.7.1/configure.in +Index: Python-2.7.2/configure.in =================================================================== ---- Python-2.7.1.orig/configure.in -+++ Python-2.7.1/configure.in -@@ -2433,6 +2433,12 @@ +--- Python-2.7.2.orig/configure.in ++++ Python-2.7.2/configure.in +@@ -2448,6 +2448,12 @@ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} bz2" fi]) diff --git a/package/python/python.mk b/package/python/python.mk index 54a52a07af..a9e25bc846 100644 --- a/package/python/python.mk +++ b/package/python/python.mk @@ -1,12 +1,15 @@ -############################################################# +################################################################################ # # python # -############################################################# +################################################################################ + PYTHON_VERSION_MAJOR = 2.7 -PYTHON_VERSION = $(PYTHON_VERSION_MAJOR).1 -PYTHON_SOURCE = Python-$(PYTHON_VERSION).tar.bz2 +PYTHON_VERSION = $(PYTHON_VERSION_MAJOR).3 +PYTHON_SOURCE = Python-$(PYTHON_VERSION).tar.xz PYTHON_SITE = http://python.org/ftp/python/$(PYTHON_VERSION) +PYTHON_LICENSE = Python software foundation license v2, others +PYTHON_LICENSE_FILES = LICENSE # Python needs itself and a "pgen" program to build itself, both being # provided in the Python sources. So in order to cross-compile Python, @@ -15,6 +18,7 @@ PYTHON_SITE = http://python.org/ftp/python/$(PYTHON_VERSION) # third-party Python modules. HOST_PYTHON_CONF_OPT += \ + --enable-static \ --without-cxx-main \ --disable-sqlite3 \ --disable-tk \ @@ -28,18 +32,24 @@ HOST_PYTHON_CONF_OPT += \ --disable-bsddb \ --disable-test-modules \ --disable-bz2 \ - --disable-zlib \ --disable-ssl HOST_PYTHON_MAKE_ENV = \ PYTHON_MODULES_INCLUDE=$(HOST_DIR)/usr/include \ PYTHON_MODULES_LIB="$(HOST_DIR)/lib $(HOST_DIR)/usr/lib" -HOST_PYTHON_AUTORECONF = YES + +# Building host python in parallel sometimes triggers a "Bus error" +# during the execution of "./python setup.py build" in the +# installation step. It is probably due to the installation of a +# shared library taking place in parallel to the execution of +# ./python, causing spurious Bus error. Building host-python with +# MAKE1 has shown to workaround the problem. +HOST_PYTHON_MAKE = $(MAKE1) PYTHON_DEPENDENCIES = host-python libffi -HOST_PYTHON_DEPENDENCIES = host-expat +HOST_PYTHON_DEPENDENCIES = host-expat host-zlib PYTHON_INSTALL_STAGING = YES @@ -98,6 +108,10 @@ else PYTHON_CONF_OPT += --disable-zlib endif +ifeq ($(BR2_PACKAGE_PYTHON_HASHLIB),y) +PYTHON_DEPENDENCIES += openssl +endif + PYTHON_CONF_ENV += \ PYTHON_FOR_BUILD=$(HOST_PYTHON_DIR)/python \ PGEN_FOR_BUILD=$(HOST_PYTHON_DIR)/Parser/pgen \ @@ -120,23 +134,27 @@ PYTHON_MAKE_ENV = \ PYTHON_MODULES_INCLUDE=$(STAGING_DIR)/usr/include \ PYTHON_MODULES_LIB="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" -# -# Development files removal -# -define PYTHON_REMOVE_DEVFILES - rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON_VERSION_MAJOR)-config - rm -f $(TARGET_DIR)/usr/bin/python-config +# python distutils adds -L$LIBDIR when linking binary extensions, causing +# trouble for cross compilation +define PYTHON_FIXUP_LIBDIR + $(SED) 's|^LIBDIR=.*|LIBDIR= $(STAGING_DIR)/usr/lib|' \ + $(STAGING_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/config/Makefile endef -ifneq ($(BR2_HAVE_DEVFILES),y) -PYTHON_POST_INSTALL_TARGET_HOOKS += PYTHON_REMOVE_DEVFILES -endif +PYTHON_POST_INSTALL_STAGING_HOOKS += PYTHON_FIXUP_LIBDIR # # Remove useless files. In the config/ directory, only the Makefile # and the pyconfig.h files are needed at runtime. # +# idle & smtpd.py have bad shebangs and are mostly samples +# define PYTHON_REMOVE_USELESS_FILES + rm -f $(TARGET_DIR)/usr/bin/idle + rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON_VERSION_MAJOR)-config + rm -f $(TARGET_DIR)/usr/bin/python2-config + rm -f $(TARGET_DIR)/usr/bin/python-config + rm -f $(TARGET_DIR)/usr/bin/smtpd.py for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/config/ \ -type f -not -name pyconfig.h -a -not -name Makefile` ; do \ rm -f $$i ; \ @@ -147,5 +165,5 @@ PYTHON_POST_INSTALL_TARGET_HOOKS += PYTHON_REMOVE_USELESS_FILES PYTHON_AUTORECONF = YES -$(eval $(call AUTOTARGETS,package,python)) -$(eval $(call AUTOTARGETS,package,python,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/python3/Config.in b/package/python3/Config.in new file mode 100644 index 0000000000..6580cfdc7f --- /dev/null +++ b/package/python3/Config.in @@ -0,0 +1,95 @@ +config BR2_PACKAGE_PYTHON3 + bool "python3" + depends on BR2_USE_WCHAR + # uses fork() + depends on BR2_USE_MMU + select BR2_PACKAGE_LIBFFI + help + The python language interpreter. + + http://www.python.org/ + +comment "python3 needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR + +if BR2_PACKAGE_PYTHON3 + +choice + prompt "python3 module format to install" + default BR2_PACKAGE_PYTHON3_PYC_ONLY + help + Select Python module format to install on target (py, pyc or both) + +config BR2_PACKAGE_PYTHON3_PY_ONLY + bool ".py sources only" + +config BR2_PACKAGE_PYTHON3_PYC_ONLY + bool ".pyc compiled sources only" + +config BR2_PACKAGE_PYTHON3_PY_PYC + bool ".py sources and .pyc compiled" + +endchoice + +menu "core python3 modules" + +comment "The following modules are unusual or require extra libraries" + +config BR2_PACKAGE_PYTHON3_BZIP2 + select BR2_PACKAGE_BZIP2 + bool "bz2 module" + help + bzip2 module for Python3 + +config BR2_PACKAGE_PYTHON3_CODECSCJK + bool "codecscjk module" + help + Chinese/Japanese/Korean codecs module for Python (large). + +config BR2_PACKAGE_PYTHON3_CURSES + select BR2_PACKAGE_NCURSES + bool "curses module" + help + curses module for Python3. + +config BR2_PACKAGE_PYTHON3_PYEXPAT + select BR2_PACKAGE_EXPAT + bool "pyexpat" + help + pyexpat module for Python3. + +config BR2_PACKAGE_PYTHON3_READLINE + select BR2_PACKAGE_READLINE + bool "readline" + help + readline module for Python3 (required for command-line + editing in the Python shell). + +config BR2_PACKAGE_PYTHON3_SSL + select BR2_PACKAGE_OPENSSL + bool "ssl" + help + _ssl module for Python3 (required for https in urllib etc). + +config BR2_PACKAGE_PYTHON3_UNICODEDATA + bool "unicodedata module" + default y + help + Unicode character database (used by stringprep module) (large). + +config BR2_PACKAGE_PYTHON3_SQLITE + bool "sqlite module" + select BR2_PACKAGE_SQLITE + help + SQLite database support + +config BR2_PACKAGE_PYTHON3_ZLIB + bool "zlib module" + select BR2_PACKAGE_ZLIB + help + zlib support in Python3 + +endmenu + +endif diff --git a/package/python3/python3-000-generate-sysconfigdata-buildir.patch b/package/python3/python3-000-generate-sysconfigdata-buildir.patch new file mode 100644 index 0000000000..a29aa0ffc8 --- /dev/null +++ b/package/python3/python3-000-generate-sysconfigdata-buildir.patch @@ -0,0 +1,158 @@ +changeset: 79745:f85c3f4d9b98 +parent: 79743:36b2ca7dc893 +parent: 79744:24d52d3060e8 +user: Trent Nelson +date: Tue Oct 16 08:17:11 2012 -0400 +summary: Merge issue #15298: ensure _sysconfigdata is generated in build directory, + +Taken from upstream. + +--- + Lib/sysconfig.py | 11 ++++++++++- + Makefile.pre.in | 24 +++++++++++++----------- + setup.py | 14 -------------- + 3 files changed, 23 insertions(+), 26 deletions(-) + +Index: Python-3.3.0/Lib/sysconfig.py +=================================================================== +--- Python-3.3.0.orig/Lib/sysconfig.py ++++ Python-3.3.0/Lib/sysconfig.py +@@ -390,13 +390,22 @@ + if _PYTHON_BUILD: + vars['LDSHARED'] = vars['BLDSHARED'] + +- destfile = os.path.join(os.path.dirname(__file__), '_sysconfigdata.py') ++ pybuilddir = 'build/lib.%s-%s' % (get_platform(), sys.version[:3]) ++ if hasattr(sys, "gettotalrefcount"): ++ pybuilddir += '-pydebug' ++ os.makedirs(pybuilddir, exist_ok=True) ++ destfile = os.path.join(pybuilddir, '_sysconfigdata.py') ++ + with open(destfile, 'w', encoding='utf8') as f: + f.write('# system configuration generated and used by' + ' the sysconfig module\n') + f.write('build_time_vars = ') + pprint.pprint(vars, stream=f) + ++ # Create file used for sys.path fixup -- see Modules/getpath.c ++ with open('pybuilddir.txt', 'w', encoding='ascii') as f: ++ f.write(pybuilddir) ++ + def _init_posix(vars): + """Initialize the module as appropriate for POSIX systems.""" + # _sysconfigdata is generated at build time, see _generate_posix_vars() +Index: Python-3.3.0/Makefile.pre.in +=================================================================== +--- Python-3.3.0.orig/Makefile.pre.in ++++ Python-3.3.0/Makefile.pre.in +@@ -410,8 +410,6 @@ + Objects/unicodectype.o \ + Objects/weakrefobject.o + +-SYSCONFIGDATA=$(srcdir)/Lib/_sysconfigdata.py +- + ########################################################################## + # objects that get linked into the Python library + LIBRARY_OBJS_OMIT_FROZEN= \ +@@ -432,7 +430,7 @@ + + # Default target + all: build_all +-build_all: $(BUILDPYTHON) $(SYSCONFIGDATA) oldsharedmods sharedmods gdbhooks Modules/_testembed ++build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Modules/_testembed + + # Compile a binary with gcc profile guided optimization. + profile-opt: +@@ -466,15 +464,17 @@ + $(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) + $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) + +-platform: $(BUILDPYTHON) $(SYSCONFIGDATA) ++platform: $(BUILDPYTHON) + $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print(get_platform()+"-"+sys.version[0:3])' >platform + +-# Generate the sysconfig build-time data +-$(SYSCONFIGDATA): $(BUILDPYTHON) ++# Create build directory and generate the sysconfig build-time data there. ++# pybuilddir.txt contains the name of the build dir and is used for ++# sys.path fixup -- see Modules/getpath.c. ++pybuilddir.txt: $(BUILDPYTHON) + $(RUNSHARED) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars + + # Build the shared modules +-sharedmods: $(BUILDPYTHON) $(SYSCONFIGDATA) ++sharedmods: $(BUILDPYTHON) pybuilddir.txt + case $$MAKEFLAGS in *s*) quiet=-q; esac; \ + $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ + $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build +@@ -1036,7 +1036,7 @@ + else true; \ + fi; \ + done +- @for i in $(srcdir)/Lib/*.py ; \ ++ @for i in $(srcdir)/Lib/*.py `cat pybuilddir.txt`/_sysconfigdata.py; \ + do \ + if test -x $$i; then \ + $(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \ +@@ -1196,6 +1196,8 @@ + --install-scripts=$(BINDIR) \ + --install-platlib=$(DESTSHARED) \ + --root=$(DESTDIR)/ ++ -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata.py ++ -rm -r $(DESTDIR)$(DESTSHARED)/__pycache__ + + # Here are a couple of targets for MacOSX again, to install a full + # framework-based Python. frameworkinstall installs everything, the +@@ -1341,9 +1343,10 @@ + find . -name '*.s[ol]' -exec rm -f {} ';' + find . -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';' + find build -name 'fficonfig.h' -exec rm -f {} ';' || true +- find build -name 'fficonfig.py' -exec rm -f {} ';' || true ++ find build -name '*.py' -exec rm -f {} ';' || true ++ find build -name '*.py[co]' -exec rm -f {} ';' || true ++ -rm -f pybuilddir.txt + -rm -f Lib/lib2to3/*Grammar*.pickle +- -rm -f $(SYSCONFIGDATA) + -rm -f Modules/_testembed Modules/_freeze_importlib + + profile-removal: +@@ -1367,7 +1370,6 @@ + Modules/Setup Modules/Setup.local Modules/Setup.config \ + Modules/ld_so_aix Modules/python.exp Misc/python.pc + -rm -f python*-gdb.py +- -rm -f pybuilddir.txt + find $(srcdir) '(' -name '*.fdc' -o -name '*~' \ + -o -name '[@,#]*' -o -name '*.old' \ + -o -name '*.orig' -o -name '*.rej' \ +Index: Python-3.3.0/setup.py +=================================================================== +--- Python-3.3.0.orig/setup.py ++++ Python-3.3.0/setup.py +@@ -33,10 +33,6 @@ + # This global variable is used to hold the list of modules to be disabled. + disabled_module_list = [] + +-# File which contains the directory for shared mods (for sys.path fixup +-# when running from the build dir, see Modules/getpath.c) +-_BUILDDIR_COOKIE = "pybuilddir.txt" +- + def add_dir_to_list(dirlist, dir): + """Add the directory 'dir' to the list 'dirlist' (after any relative + directories) if: +@@ -252,16 +248,6 @@ + args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags + self.compiler.set_executables(**args) + +- # Not only do we write the builddir cookie, but we manually install +- # the shared modules directory if it isn't already in sys.path. +- # Otherwise trying to import the extensions after building them +- # will fail. +- with open(_BUILDDIR_COOKIE, "wb") as f: +- f.write(self.build_lib.encode('utf-8', 'surrogateescape')) +- abs_build_lib = os.path.join(os.getcwd(), self.build_lib) +- if abs_build_lib not in sys.path: +- sys.path.append(abs_build_lib) +- + build_ext.build_extensions(self) + + longest = max([len(e.name) for e in self.extensions]) diff --git a/package/python3/python3-001-support-for-build.patch b/package/python3/python3-001-support-for-build.patch new file mode 100644 index 0000000000..8c57cfb9cc --- /dev/null +++ b/package/python3/python3-001-support-for-build.patch @@ -0,0 +1,68 @@ +Add support in Python build system to specify host pgen + +Python needs a "pgen" program to build itself. Unfortunately, the +Python build system assumes that it can use the pgen program it has +just built to build itself. Obviously, this cannot work in +cross-compilation mode since the pgen program have been built for the +target. + +Therefore, this patch adds support in the Python build system for the +new PGEN_FOR_BUILD variable, so that we can point Python ./configure +script to the pgen program that have been previously built for the +host. + +Patch ported to python2.7 by Maxime Ripard , and +later significantly reworked by Thomas Petazzoni +, with some inspiration taken +from the Python patches of the PTXdist project, and then ported to +python3.3 by Maxime Ripard + +Signed-off-by: Maxime Ripard +--- + Makefile.pre.in | 5 +++-- + configure.ac | 5 +++++ + 2 files changed, 8 insertions(+), 2 deletions(-) + +Index: Python-3.3.0/Makefile.pre.in +=================================================================== +--- Python-3.3.0.orig/Makefile.pre.in ++++ Python-3.3.0/Makefile.pre.in +@@ -239,6 +239,7 @@ + ########################################################################## + # Parser + PGEN= Parser/pgen$(EXE) ++PGEN_FOR_BUILD=@PGEN_FOR_BUILD@ + + PSRCS= \ + Parser/acceler.c \ +@@ -639,8 +640,8 @@ + + $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS) + @$(MKDIR_P) Include +- $(MAKE) $(PGEN) +- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) ++ $(MAKE) $(PGEN_FOR_BUILD) ++ $(PGEN_FOR_BUILD) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) + $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS) + $(MAKE) $(GRAMMAR_H) + touch $(GRAMMAR_C) +Index: Python-3.3.0/configure.ac +=================================================================== +--- Python-3.3.0.orig/configure.ac ++++ Python-3.3.0/configure.ac +@@ -51,10 +51,15 @@ + AC_MSG_RESULT($interp) + PYTHON_FOR_BUILD="_PYTHON_PROJECT_BASE=$srcdir"' _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp + fi ++ AC_MSG_CHECKING(pgen for build) ++ PGEN_FOR_BUILD="${PGEN_FOR_BUILD}" ++ AC_MSG_RESULT($PGEN_FOR_BUILD) + else + PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E' ++ PGEN_FOR_BUILD='./$(PGEN)' + fi + AC_SUBST(PYTHON_FOR_BUILD) ++AC_SUBST(PGEN_FOR_BUILD) + + dnl Ensure that if prefix is specified, it does not end in a slash. If + dnl it does, we get path names containing '//' which is both ugly and diff --git a/package/python3/python3-002-no-host-headers-libs.patch b/package/python3/python3-002-no-host-headers-libs.patch new file mode 100644 index 0000000000..9783f28ade --- /dev/null +++ b/package/python3/python3-002-no-host-headers-libs.patch @@ -0,0 +1,72 @@ +Do not look at host headers/libraries in cross-compile mode + +When we are cross-compiling, setup.py should never look in /usr or +/usr/local to find headers or libraries. A later patch adds a +mechanism to tell setup.py to look in a specific directory for headers +and libraries. + +Patch first written by Thomas Petazzoni + for python2.7, and then ported +to python3.3 by Maxime Ripard + +Signed-off-by: Maxime Ripard +--- + setup.py | 23 +++++------------------ + 1 file changed, 5 insertions(+), 18 deletions(-) + +Index: Python-3.3.0/setup.py +=================================================================== +--- Python-3.3.0.orig/setup.py ++++ Python-3.3.0/setup.py +@@ -447,10 +447,8 @@ + if not cross_compiling: + add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') + add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') +- # only change this for cross builds for 3.3, issues on Mageia +- if cross_compiling: + self.add_gcc_paths() +- self.add_multiarch_paths() ++ self.add_multiarch_paths() + + # Add paths specified in the environment variables LDFLAGS and + # CPPFLAGS for header and library files. +@@ -458,10 +456,7 @@ + # directly since an inconsistently reproducible issue comes up where + # the environment variable is not set even though the value were passed + # into configure and stored in the Makefile (issue found on OS X 10.3). +- for env_var, arg_name, dir_list in ( +- ('LDFLAGS', '-R', self.compiler.runtime_library_dirs), +- ('LDFLAGS', '-L', self.compiler.library_dirs), +- ('CPPFLAGS', '-I', self.compiler.include_dirs)): ++ for env_var, arg_name, dir_list in (): + env_val = sysconfig.get_config_var(env_var) + if env_val: + # To prevent optparse from raising an exception about any +@@ -486,17 +481,6 @@ + for directory in reversed(options.dirs): + add_dir_to_list(dir_list, directory) + +- if os.path.normpath(sys.base_prefix) != '/usr' \ +- and not sysconfig.get_config_var('PYTHONFRAMEWORK'): +- # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework +- # (PYTHONFRAMEWORK is set) to avoid # linking problems when +- # building a framework with different architectures than +- # the one that is currently installed (issue #7473) +- add_dir_to_list(self.compiler.library_dirs, +- sysconfig.get_config_var("LIBDIR")) +- add_dir_to_list(self.compiler.include_dirs, +- sysconfig.get_config_var("INCLUDEDIR")) +- + # lib_dirs and inc_dirs are used to search for files; + # if a file is found in one of those directories, it can + # be assumed that no additional -I,-L directives are needed. +@@ -506,6 +490,9 @@ + '/lib', '/usr/lib', + ] + inc_dirs = self.compiler.include_dirs + ['/usr/include'] ++ else: ++ lib_dirs = self.compiler.library_dirs ++ inc_dirs = self.compiler.include_dirs + exts = [] + missing = [] + diff --git a/package/python3/python3-003-staging-header-libs.patch b/package/python3/python3-003-staging-header-libs.patch new file mode 100644 index 0000000000..b0efe29614 --- /dev/null +++ b/package/python3/python3-003-staging-header-libs.patch @@ -0,0 +1,41 @@ +Tell setup.py the location of headers/libraries + +Allow the libraries detection routine to look for headers and libs in +other directories than /usr/include or /usr/lib through the +environment variables PYTHON_MODULES_INCLUDE and PYTHON_MODULES_LIB. + +We can then use it to look for libraries in the buildroot staging +directory. + +Ported to python3.3 by Maxime Ripard based +on the work by Thomas Petazzoni + +Signed-off-by: Maxime Ripard +--- + setup.py | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +Index: Python-3.3.0/setup.py +=================================================================== +--- Python-3.3.0.orig/setup.py ++++ Python-3.3.0/setup.py +@@ -441,6 +441,19 @@ + os.unlink(tmpfile) + + def detect_modules(self): ++ try: ++ modules_include_dirs = os.environ["PYTHON_MODULES_INCLUDE"].split() ++ except KeyError: ++ modules_include_dirs = ['/usr/include'] ++ try: ++ modules_lib_dirs = os.environ["PYTHON_MODULES_LIB"].split() ++ except KeyError: ++ modules_lib_dirs = ['/usr/lib'] ++ for dir in modules_include_dirs: ++ add_dir_to_list(self.compiler.include_dirs, dir) ++ for dir in modules_lib_dirs: ++ add_dir_to_list(self.compiler.library_dirs, dir) ++ + # Ensure that /usr/local is always used, but the local build + # directories (i.e. '.' and 'Include') must be first. See issue + # 10520. diff --git a/package/python3/python3-004-no-import-when-cross-compiling.patch b/package/python3/python3-004-no-import-when-cross-compiling.patch new file mode 100644 index 0000000000..cd5a437472 --- /dev/null +++ b/package/python3/python3-004-no-import-when-cross-compiling.patch @@ -0,0 +1,27 @@ +Disable import check when cross-compiling + +Once Python has compiled an extension (i.e some C code, potentially +linked to a library), it tries to import it. This cannot work in +cross-compilation mode, so we just disable this check. + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Maxime Ripard +--- + setup.py | 4 ++++ + 1 file changed, 4 insertions(+) + +Index: Python-3.3.0/setup.py +=================================================================== +--- Python-3.3.0.orig/setup.py ++++ Python-3.3.0/setup.py +@@ -318,6 +318,10 @@ + self.announce('WARNING: skipping import check for Cygwin-based "%s"' + % ext.name) + return ++ if os.environ.get('CROSS_COMPILING') == 'yes': ++ self.announce('WARNING: skipping import check for cross compiled "%s"' ++ % ext.name) ++ return + ext_filename = os.path.join( + self.build_lib, + self.get_ext_filename(self.get_ext_fullname(ext.name))) diff --git a/package/python3/python3-005-do-not-generate-pyo-files.patch b/package/python3/python3-005-do-not-generate-pyo-files.patch new file mode 100644 index 0000000000..983d546473 --- /dev/null +++ b/package/python3/python3-005-do-not-generate-pyo-files.patch @@ -0,0 +1,40 @@ +Do not generate .pyo files + +By default, the Python installation byte-compiles all modules in two +forms: the normal bytecode (.pyc) and an optimized bytecode (.pyo). + +According to +http://www.network-theory.co.uk/docs/pytut/CompiledPythonfiles.html, +the optimization do not do anything useful, and generating both the +"non-optimized" and "optimized" bytecode variants takes time. + +Signed-off-by: Thomas Petazzoni +--- + Makefile.pre.in | 9 --------- + 1 file changed, 9 deletions(-) + +Index: Python-3.3.0/Makefile.pre.in +=================================================================== +--- Python-3.3.0.orig/Makefile.pre.in ++++ Python-3.3.0/Makefile.pre.in +@@ -1082,20 +1082,11 @@ + -d $(LIBDEST) -f \ + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + $(DESTDIR)$(LIBDEST) +- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ +- -d $(LIBDEST) -f \ +- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ +- $(DESTDIR)$(LIBDEST) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST)/site-packages -f \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ +- -d $(LIBDEST)/site-packages -f \ +- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages +- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt diff --git a/package/python3/python3-006-reread-environment.patch b/package/python3/python3-006-reread-environment.patch new file mode 100644 index 0000000000..752b15a4e2 --- /dev/null +++ b/package/python3/python3-006-reread-environment.patch @@ -0,0 +1,63 @@ +Make sure setup.py reads the correct CONFIG_ARGS + +The setup.py script that builds and installs all the Python modules +shipped with the interpreter looks at the CONFIG_ARGS variable stored +in the "sysconfig" module to look at the ./configure options and +adjust its behaviour accordingly. + +Unfortunately, when cross-compiling, the value of CONFIG_ARGS returned +by the sysconfig are the one passed to the ./configure script of the +*host* Python and not the one we're currently building for the target. + +In order to avoid that, we re-initialize the values in the sysconfig +module by re-reading the environment at the beginning of the setup.py +script, and we make sure that the CONFIG_ARGS variable is actually +part of the environment of setup.py. + +See the beginning of +http://article.gmane.org/gmane.comp.python.devel/99772 for the +inspiration. + +Signed-off-by: Thomas Petazzoni + +--- + Makefile.pre.in | 4 +++- + setup.py | 3 +++ + 2 files changed, 6 insertions(+), 1 deletion(-) + +Index: Python-3.3.0/setup.py +=================================================================== +--- Python-3.3.0.orig/setup.py ++++ Python-3.3.0/setup.py +@@ -30,6 +30,9 @@ + # Were we compiled --with-pydebug or with #define Py_DEBUG? + COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS")) + ++sysconfig.get_config_vars() ++sysconfig._CONFIG_VARS.update(os.environ) ++ + # This global variable is used to hold the list of modules to be disabled. + disabled_module_list = [] + +Index: Python-3.3.0/Makefile.pre.in +=================================================================== +--- Python-3.3.0.orig/Makefile.pre.in ++++ Python-3.3.0/Makefile.pre.in +@@ -478,6 +478,7 @@ + sharedmods: $(BUILDPYTHON) pybuilddir.txt + case $$MAKEFLAGS in *s*) quiet=-q; esac; \ + $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ ++ CONFIG_ARGS="$(CONFIG_ARGS)" \ + $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build + + # Build static library +@@ -1183,7 +1184,8 @@ + # Install the dynamically loadable modules + # This goes into $(exec_prefix) + sharedinstall: sharedmods +- $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ ++ $(RUNSHARED) CONFIG_ARGS="$(CONFIG_ARGS)" \ ++ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ + --prefix=$(prefix) \ + --install-scripts=$(BINDIR) \ + --install-platlib=$(DESTSHARED) \ diff --git a/package/python3/python3-007-change-pyconfig-h-location.patch b/package/python3/python3-007-change-pyconfig-h-location.patch new file mode 100644 index 0000000000..8d45daef4d --- /dev/null +++ b/package/python3/python3-007-change-pyconfig-h-location.patch @@ -0,0 +1,76 @@ +Change the location of pyconfig.h + +The Python interpreter has a really strange behaviour: at *runtime*, +it reads a Makefile and a header file named pyconfig.h to get some +information about the configuration. + +The Makefile is located in usr/lib/python3.3/config-3.3m, which is fine +since this location is kept on the target. + +However, by default, the pyconfig.h is installed in +usr/include/python3.3m, but we completely remove the usr/include +directory for the target. Since making an exception just for +pyconfig.h is annoying, this patch also installs pyconfig.h to +usr/lib/python3.3/config-3.3m, and modifies the sysconfig module so that it +looks in this location instead of usr/include. + +The pyconfig.h is still kept in usr/include/python3.3m, because it is +needed in the $(STAGING_DIR) when building third-party Python +extensions that contain C code. + +Signed-off-by: Thomas Petazzoni + +--- + Lib/distutils/sysconfig.py | 3 ++- + Lib/sysconfig.py | 2 +- + Makefile.pre.in | 3 ++- + 3 files changed, 5 insertions(+), 3 deletions(-) + +Index: Python-3.3.0/Lib/distutils/sysconfig.py +=================================================================== +--- Python-3.3.0.orig/Lib/distutils/sysconfig.py ++++ Python-3.3.0/Lib/distutils/sysconfig.py +@@ -239,7 +239,8 @@ + else: + inc_dir = _sys_home or project_base + else: +- inc_dir = get_python_inc(plat_specific=1) ++ lib_dir = get_python_lib(plat_specific=1, standard_lib=1) ++ inc_dir = os.path.join(lib_dir, "config") + if get_python_version() < '2.2': + config_h = 'config.h' + else: +Index: Python-3.3.0/Lib/sysconfig.py +=================================================================== +--- Python-3.3.0.orig/Lib/sysconfig.py ++++ Python-3.3.0/Lib/sysconfig.py +@@ -467,7 +467,7 @@ + else: + inc_dir = _sys_home or _PROJECT_BASE + else: +- inc_dir = get_path('platinclude') ++ inc_dir = os.path.join(get_path('stdlib'), "config") + return os.path.join(inc_dir, 'pyconfig.h') + + +Index: Python-3.3.0/Makefile.pre.in +=================================================================== +--- Python-3.3.0.orig/Makefile.pre.in ++++ Python-3.3.0/Makefile.pre.in +@@ -1123,7 +1123,6 @@ + echo $(INSTALL_DATA) $$i $(INCLUDEPY); \ + $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \ + done +- $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h + + # Install the library and miscellaneous stuff needed for extending/embedding + # This goes into $(exec_prefix) +@@ -1157,6 +1156,8 @@ + $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o + $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in + $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile ++ $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(LIBPL)/pyconfig.h ++ $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h + $(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup + $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local + $(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config diff --git a/package/python3/python3-008-no-rpath.patch b/package/python3/python3-008-no-rpath.patch new file mode 100644 index 0000000000..cdeec22ce9 --- /dev/null +++ b/package/python3/python3-008-no-rpath.patch @@ -0,0 +1,51 @@ +Remove runtime library paths + +For some extensions (sqlite and dbm), Python setup.py script +hardcode a runtime path (rpath) into the extension. However, this +runtime path is incorrect (because it points to the location of the +library directory on the development machine) and useless (because on +the target, all useful libraries are in a standard directory searched +by the dynamic loader). For those reasons, we just get rid of the +runtime paths in cross-compilation mode. + +Signed-off-by: Thomas Petazzoni +--- + setup.py | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +Index: Python-3.3.0/setup.py +=================================================================== +--- Python-3.3.0.orig/setup.py ++++ Python-3.3.0/setup.py +@@ -1134,11 +1134,15 @@ + # can end up with a bad search path order. + if sqlite_incdir not in self.compiler.include_dirs: + include_dirs.append(sqlite_incdir) ++ if cross_compiling: ++ sqlite_runtime_libdir = None ++ else: ++ sqlite_runtime_libdir = sqlite_libdir + exts.append(Extension('_sqlite3', sqlite_srcs, + define_macros=sqlite_defines, + include_dirs=include_dirs, + library_dirs=sqlite_libdir, +- runtime_library_dirs=sqlite_libdir, ++ runtime_library_dirs=sqlite_runtime_libdir, + extra_link_args=sqlite_extra_link_args, + libraries=["sqlite3",])) + else: +@@ -1205,9 +1209,13 @@ + elif cand == "bdb": + if db_incs is not None: + if dbm_setup_debug: print("building dbm using bdb") ++ if cross_compiling: ++ dblib_runtime_libdir = None ++ else: ++ dblib_runtime_libdir = dblib_dir + dbmext = Extension('_dbm', ['_dbmmodule.c'], + library_dirs=dblib_dir, +- runtime_library_dirs=dblib_dir, ++ runtime_library_dirs=dblib_runtime_libdir, + include_dirs=db_incs, + define_macros=[ + ('HAVE_BERKDB_H', None), diff --git a/package/python3/python3-009-verbose-module-build.patch b/package/python3/python3-009-verbose-module-build.patch new file mode 100644 index 0000000000..60b6d797d3 --- /dev/null +++ b/package/python3/python3-009-verbose-module-build.patch @@ -0,0 +1,26 @@ +Enables verbose output when building modules + +Patch borrowed from OpenBricks. + +Signed-off-by: Thomas Petazzoni + +--- + Makefile.pre.in | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +Index: Python-3.3.0/Makefile.pre.in +=================================================================== +--- Python-3.3.0.orig/Makefile.pre.in ++++ Python-3.3.0/Makefile.pre.in +@@ -476,10 +476,9 @@ + + # Build the shared modules + sharedmods: $(BUILDPYTHON) pybuilddir.txt +- case $$MAKEFLAGS in *s*) quiet=-q; esac; \ + $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ + CONFIG_ARGS="$(CONFIG_ARGS)" \ +- $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build ++ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py build + + # Build static library + # avoid long command lines, same as LIBRARY_OBJS diff --git a/package/python3/python3-010-distutils-cross-compilation-support.patch b/package/python3/python3-010-distutils-cross-compilation-support.patch new file mode 100644 index 0000000000..0a51400bf5 --- /dev/null +++ b/package/python3/python3-010-distutils-cross-compilation-support.patch @@ -0,0 +1,71 @@ +Add some cross-compilation fixes to distutils + +Inspired by work done by Marc Kleine-Budde in +PTXdist. + +Signed-off-by: Thomas Petazzoni +--- + Lib/distutils/sysconfig.py | 17 +++++++++++++---- + configure.ac | 8 +++++++- + 2 files changed, 20 insertions(+), 5 deletions(-) + +Index: Python-3.3.0/Lib/distutils/sysconfig.py +=================================================================== +--- Python-3.3.0.orig/Lib/distutils/sysconfig.py ++++ Python-3.3.0/Lib/distutils/sysconfig.py +@@ -16,15 +16,24 @@ + from .errors import DistutilsPlatformError + + # These are needed in a couple of spots, so just compute them once. +-PREFIX = os.path.normpath(sys.prefix) +-EXEC_PREFIX = os.path.normpath(sys.exec_prefix) ++EXECUTABLE_DIRNAME = os.path.dirname(os.path.realpath(sys.executable)) ++if os.environ.get('CROSS_COMPILING') == 'yes': ++ _sysroot=os.environ.get('_python_sysroot') ++ PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix')) ++ EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix')) ++ if '_python_srcdir' in os.environ: ++ EXECUTABLE_DIRNAME = os.path.normpath(os.environ['_python_srcdir']) ++else: ++ PREFIX = os.path.normpath(sys.prefix) ++ EXEC_PREFIX = os.path.normpath(sys.exec_prefix) ++ + BASE_PREFIX = os.path.normpath(sys.base_prefix) + BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) + + # Path to the base directory of the project. On Windows the binary may + # live in project/PCBuild9. If we're dealing with an x64 Windows build, + # it'll live in project/PCbuild/amd64. +-project_base = os.path.dirname(os.path.abspath(sys.executable)) ++project_base = EXECUTABLE_DIRNAME + if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): + project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) + # PC/VS7.1 +@@ -98,7 +107,7 @@ + # the build directory may not be the source directory, we + # must use "srcdir" from the makefile to find the "Include" + # directory. +- base = _sys_home or os.path.dirname(os.path.abspath(sys.executable)) ++ base = _sys_home or EXECUTABLE_DIRNAME + if plat_specific: + return base + if _sys_home: +Index: Python-3.3.0/configure.ac +=================================================================== +--- Python-3.3.0.orig/configure.ac ++++ Python-3.3.0/configure.ac +@@ -963,7 +963,13 @@ + fi + + if test "$cross_compiling" = yes; then +- RUNSHARED= ++ RUNSHARED=" \ ++ CROSS_COMPILING=yes \ ++ _python_cross_host=${ac_cv_host} \ ++ _python_sysroot=\"\$(sysroot)\" \ ++ _python_srcdir=\"\$(srcdir)\" \ ++ _python_prefix=\"\$(prefix)\" \ ++ _python_exec_prefix=\"\$(exec_prefix)\"" + fi + + AC_MSG_RESULT($LDLIBRARY) diff --git a/package/python3/python3-011-cross-compile-getaddrinfo.patch b/package/python3/python3-011-cross-compile-getaddrinfo.patch new file mode 100644 index 0000000000..33286ce391 --- /dev/null +++ b/package/python3/python3-011-cross-compile-getaddrinfo.patch @@ -0,0 +1,21 @@ +Disable buggy_getaddrinfo configure test when cross-compiling with IPv6 support + +Signed-off-by: Vanya Sergeev + +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: Python-3.3.0/configure.ac +=================================================================== +--- Python-3.3.0.orig/configure.ac ++++ Python-3.3.0/configure.ac +@@ -3204,7 +3204,7 @@ + + AC_MSG_RESULT($ac_cv_buggy_getaddrinfo) + +-if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes ++if test $have_getaddrinfo = no || test "$cross_compiling" != "yes" -a "$ac_cv_buggy_getaddrinfo" = yes + then + if test $ipv6 = yes + then diff --git a/package/python3/python3-012-disable-extensions.patch b/package/python3/python3-012-disable-extensions.patch new file mode 100644 index 0000000000..ed1d1e2d93 --- /dev/null +++ b/package/python3/python3-012-disable-extensions.patch @@ -0,0 +1,98 @@ +Add infrastructure to disable the build of certain extensions + +Some of the extensions part of the Python core have dependencies on +external libraries (sqlite, tk, etc.) or are relatively big and not +necessarly always useful (CJK codecs for example). By extensions, we +mean part of Python modules that are written in C and therefore +compiled to binary code. + +Therefore, we introduce a small infrastructure that allows to disable +some of those extensions. This can be done inside the configure.ac by +adding values to the DISABLED_EXTENSIONS variable (which is a +word-separated list of extensions). + +The implementation works as follow : + + * configure.ac defines a DISABLED_EXTENSIONS variable, which is + substituted (so that when Makefile.pre is generated from + Makefile.pre.in, the value of the variable is substituted). For + now, this DISABLED_EXTENSIONS variable is empty, later patches will + use it. + + * Makefile.pre.in passes the DISABLED_EXTENSIONS value down to the + variables passed in the environment when calling the setup.py + script that actually builds and installs those extensions. + + * setup.py is modified so that the existing "disabled_module_list" is + filled with those pre-disabled extensions listed in + DISABLED_EXTENSIONS. + +Patch ported to python2.7 by Maxime Ripard , and +then extended by Thomas Petazzoni +. + +Signed-off-by: Thomas Petazzoni +--- + Makefile.pre.in | 4 ++++ + configure.ac | 2 ++ + setup.py | 5 ++++- + 3 files changed, 10 insertions(+), 1 deletion(-) + +Index: cpython/Makefile.pre.in +=================================================================== +--- cpython.orig/Makefile.pre.in ++++ cpython/Makefile.pre.in +@@ -155,6 +155,8 @@ + # configure script arguments + CONFIG_ARGS= @CONFIG_ARGS@ + ++# disabled extensions ++DISABLED_EXTENSIONS= @DISABLED_EXTENSIONS@ + + # Subdirectories with code + SRCDIRS= @SRCDIRS@ +@@ -478,6 +480,7 @@ + sharedmods: $(BUILDPYTHON) pybuilddir.txt + $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ + CONFIG_ARGS="$(CONFIG_ARGS)" \ ++ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \ + $(PYTHON_FOR_BUILD) $(srcdir)/setup.py build + + # Build static library +@@ -1185,6 +1188,7 @@ + # This goes into $(exec_prefix) + sharedinstall: sharedmods + $(RUNSHARED) CONFIG_ARGS="$(CONFIG_ARGS)" \ ++ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \ + $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ + --prefix=$(prefix) \ + --install-scripts=$(BINDIR) \ +Index: cpython/configure.ac +=================================================================== +--- cpython.orig/configure.ac ++++ cpython/configure.ac +@@ -2175,6 +2175,8 @@ + + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) + ++AC_SUBST(DISABLED_EXTENSIONS) ++ + # Check for use of the system expat library + AC_MSG_CHECKING(for --with-system-expat) + AC_ARG_WITH(system_expat, +Index: cpython/setup.py +=================================================================== +--- cpython.orig/setup.py ++++ cpython/setup.py +@@ -34,7 +34,10 @@ + sysconfig._CONFIG_VARS.update(os.environ) + + # This global variable is used to hold the list of modules to be disabled. +-disabled_module_list = [] ++try: ++ disabled_module_list = sysconfig.get_config_var("DISABLED_EXTENSIONS").split(" ") ++except KeyError: ++ disabled_module_list = list() + + def add_dir_to_list(dirlist, dir): + """Add the directory 'dir' to the list 'dirlist' (after any relative diff --git a/package/python3/python3-100-optional-test-modules.patch b/package/python3/python3-100-optional-test-modules.patch new file mode 100644 index 0000000000..13e73a7ed9 --- /dev/null +++ b/package/python3/python3-100-optional-test-modules.patch @@ -0,0 +1,102 @@ +Add an option to disable installation of test modules + +The Python standard distribution comes with many test modules, that +are not necessarly useful on embedded targets. + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin + +--- + Makefile.pre.in | 50 ++++++++++++++++++++++++++++++++------------------ + configure.ac | 6 ++++++ + 2 files changed, 38 insertions(+), 18 deletions(-) + +Index: cpython/Makefile.pre.in +=================================================================== +--- cpython.orig/Makefile.pre.in ++++ cpython/Makefile.pre.in +@@ -976,8 +976,26 @@ + EXTRAPLATDIR= @EXTRAPLATDIR@ + MACHDEPS= $(PLATDIR) $(EXTRAPLATDIR) + XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax +-LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \ +- tkinter/test/test_ttk site-packages test \ ++LIBSUBDIRS= tkinter \ ++ site-packages \ ++ collections concurrent concurrent/futures encodings \ ++ email email/mime \ ++ html json http dbm xmlrpc \ ++ sqlite3 \ ++ logging csv wsgiref urllib \ ++ lib2to3 lib2to3/fixes lib2to3/pgen2 \ ++ ctypes ctypes/macholib idlelib idlelib/Icons \ ++ distutils distutils/command $(XMLLIBSUBDIRS) \ ++ importlib \ ++ turtledemo \ ++ multiprocessing multiprocessing/dummy \ ++ unittest \ ++ venv venv/scripts venv/scripts/posix \ ++ curses pydoc_data $(MACHDEPS) ++ ++ifeq (@TEST_MODULES@,yes) ++LIBSUBDIRS += tkinter/test tkinter/test/test_tkinter \ ++ tkinter/test/test_ttk test \ + test/capath test/data \ + test/cjkencodings test/decimaltestdata test/xmltestdata \ + test/subprocessdata test/sndhdrdata \ +@@ -1000,26 +1018,22 @@ + test/namespace_pkgs/project3 \ + test/namespace_pkgs/project3/parent \ + test/namespace_pkgs/project3/parent/child \ +- test/namespace_pkgs/module_and_namespace_package \ +- test/namespace_pkgs/module_and_namespace_package/a_test \ +- collections concurrent concurrent/futures encodings \ +- email email/mime test/test_email test/test_email/data \ +- html json test/json_tests http dbm xmlrpc \ +- sqlite3 sqlite3/test \ +- logging csv wsgiref urllib \ +- lib2to3 lib2to3/fixes lib2to3/pgen2 lib2to3/tests \ ++ test/namespace_pkgs/module_and_namespace_package \ ++ test/namespace_pkgs/module_and_namespace_package/a_test \ ++ test/test_email test/test_email/data \ ++ test/json_tests \ ++ sqlite3/test \ ++ lib2to3/tests \ + lib2to3/tests/data lib2to3/tests/data/fixers \ + lib2to3/tests/data/fixers/myfixes \ +- ctypes ctypes/test ctypes/macholib idlelib idlelib/Icons \ +- distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \ +- importlib test/test_importlib test/test_importlib/builtin \ ++ ctypes/test \ ++ distutils/tests \ ++ test/test_importlib test/test_importlib/builtin \ + test/test_importlib/extension test/test_importlib/frozen \ + test/test_importlib/import_ test/test_importlib/source \ +- turtledemo \ +- multiprocessing multiprocessing/dummy \ +- unittest unittest/test unittest/test/testmock \ +- venv venv/scripts venv/scripts/posix \ +- curses pydoc_data $(MACHDEPS) ++ unittest unittest/test unittest/test/testmock ++endif ++ + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c + @for i in $(SCRIPTDIR) $(LIBDEST); \ + do \ +Index: cpython/configure.ac +=================================================================== +--- cpython.orig/configure.ac ++++ cpython/configure.ac +@@ -2449,6 +2449,12 @@ + fi + + ++AC_SUBST(TEST_MODULES) ++ ++AC_ARG_ENABLE(test-modules, ++ AS_HELP_STRING([--disable-test-modules], [disable test modules]), ++ [ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ]) ++ + # Check for enable-ipv6 + AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified]) + AC_MSG_CHECKING([if --enable-ipv6 is specified]) diff --git a/package/python3/python3-101-optional-pydoc.patch b/package/python3/python3-101-optional-pydoc.patch new file mode 100644 index 0000000000..ac50ac39ea --- /dev/null +++ b/package/python3/python3-101-optional-pydoc.patch @@ -0,0 +1,91 @@ +Add an option to disable pydoc + +It removes 0.5 MB of data from the target plus the pydoc script +itself. + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin + +--- + Makefile.pre.in | 8 +++++++- + configure.ac | 5 +++++ + setup.py | 9 +++++++-- + 3 files changed, 19 insertions(+), 3 deletions(-) + +Index: cpython/Makefile.pre.in +=================================================================== +--- cpython.orig/Makefile.pre.in ++++ cpython/Makefile.pre.in +@@ -952,7 +952,9 @@ + -rm -f $(DESTDIR)$(BINDIR)/idle3 + (cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3) + -rm -f $(DESTDIR)$(BINDIR)/pydoc3 ++ifeq (@PYDOC@,yes) + (cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3) ++endif + -rm -f $(DESTDIR)$(BINDIR)/2to3 + (cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3) + -rm -f $(DESTDIR)$(BINDIR)/pyvenv +@@ -991,7 +993,7 @@ + multiprocessing multiprocessing/dummy \ + unittest \ + venv venv/scripts venv/scripts/posix \ +- curses pydoc_data $(MACHDEPS) ++ curses $(MACHDEPS) + + ifeq (@TEST_MODULES@,yes) + LIBSUBDIRS += tkinter/test tkinter/test/test_tkinter \ +@@ -1034,6 +1036,10 @@ + unittest unittest/test unittest/test/testmock + endif + ++ifeq (@PYDOC@,yes) ++LIBSUBDIRS += pydoc_data ++endif ++ + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c + @for i in $(SCRIPTDIR) $(LIBDEST); \ + do \ +Index: cpython/configure.ac +=================================================================== +--- cpython.orig/configure.ac ++++ cpython/configure.ac +@@ -2448,6 +2448,11 @@ + esac]) + fi + ++AC_SUBST(PYDOC) ++ ++AC_ARG_ENABLE(pydoc, ++ AS_HELP_STRING([--disable-pydoc], [disable pydoc]), ++ [ PYDOC="${enableval}" ], [ PYDOC=yes ]) + + AC_SUBST(TEST_MODULES) + +Index: cpython/setup.py +=================================================================== +--- cpython.orig/setup.py ++++ cpython/setup.py +@@ -2123,6 +2123,12 @@ + # turn off warnings when deprecated modules are imported + import warnings + warnings.filterwarnings("ignore",category=DeprecationWarning) ++ ++ scripts = ['Tools/scripts/idle3', 'Tools/scripts/2to3', ++ 'Lib/smtpd.py'] ++ if not '--disable-pydoc' in sysconfig.get_config_var("CONFIG_ARGS"): ++ scripts += [ 'Tools/scripts/pydoc3' ] ++ + setup(# PyPI Metadata (PEP 301) + name = "Python", + version = sys.version.split()[0], +@@ -2147,8 +2153,7 @@ + # If you change the scripts installed here, you also need to + # check the PyBuildScripts command above, and change the links + # created by the bininstall target in Makefile.pre.in +- scripts = ["Tools/scripts/pydoc3", "Tools/scripts/idle3", +- "Tools/scripts/2to3", "Tools/scripts/pyvenv"] ++ scripts = scripts, + ) + + # --install-platlib diff --git a/package/python3/python3-102-optional-2to3.patch b/package/python3/python3-102-optional-2to3.patch new file mode 100644 index 0000000000..f5e821ae6b --- /dev/null +++ b/package/python3/python3-102-optional-2to3.patch @@ -0,0 +1,111 @@ +Add an option to disable lib2to3 + +lib2to3 is a library to convert Python 2.x code to Python 3.x. As +such, it is probably not very useful on embedded system targets. + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin + +--- + Makefile.pre.in | 18 ++++++++++++++---- + configure.ac | 6 ++++++ + setup.py | 5 +++-- + 3 files changed, 23 insertions(+), 6 deletions(-) + +Index: cpython/Makefile.pre.in +=================================================================== +--- cpython.orig/Makefile.pre.in ++++ cpython/Makefile.pre.in +@@ -956,7 +956,9 @@ + (cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3) + endif + -rm -f $(DESTDIR)$(BINDIR)/2to3 ++ifeq (@LIB2TO3@,yes) + (cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3) ++endif + -rm -f $(DESTDIR)$(BINDIR)/pyvenv + (cd $(DESTDIR)$(BINDIR); $(LN) -s pyvenv-$(VERSION) pyvenv) + +@@ -985,7 +987,6 @@ + html json http dbm xmlrpc \ + sqlite3 \ + logging csv wsgiref urllib \ +- lib2to3 lib2to3/fixes lib2to3/pgen2 \ + ctypes ctypes/macholib idlelib idlelib/Icons \ + distutils distutils/command $(XMLLIBSUBDIRS) \ + importlib \ +@@ -1025,9 +1026,6 @@ + test/test_email test/test_email/data \ + test/json_tests \ + sqlite3/test \ +- lib2to3/tests \ +- lib2to3/tests/data lib2to3/tests/data/fixers \ +- lib2to3/tests/data/fixers/myfixes \ + ctypes/test \ + distutils/tests \ + test/test_importlib test/test_importlib/builtin \ +@@ -1040,6 +1038,16 @@ + LIBSUBDIRS += pydoc_data + endif + ++ifeq (@LIB2TO3@,yes) ++LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2 ++ifeq (@TEST_MODULES@,yes) ++LIBSUBDIRS += lib2to3/tests \ ++ lib2to3/tests/data \ ++ lib2to3/tests/data/fixers \ ++ lib2to3/tests/data/fixers/myfixes ++endif ++endif ++ + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c + @for i in $(SCRIPTDIR) $(LIBDEST); \ + do \ +@@ -1109,10 +1117,12 @@ + $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST)/site-packages -f \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages ++ifeq (@LIB2TO3@,yes) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt ++endif + + # Create the PLATDIR source directory, if one wasn't distributed.. + $(srcdir)/Lib/$(PLATDIR): +Index: cpython/setup.py +=================================================================== +--- cpython.orig/setup.py ++++ cpython/setup.py +@@ -2124,10 +2124,11 @@ + import warnings + warnings.filterwarnings("ignore",category=DeprecationWarning) + +- scripts = ['Tools/scripts/idle3', 'Tools/scripts/2to3', +- 'Lib/smtpd.py'] ++ scripts = ['Tools/scripts/idle3', 'Lib/smtpd.py'] + if not '--disable-pydoc' in sysconfig.get_config_var("CONFIG_ARGS"): + scripts += [ 'Tools/scripts/pydoc3' ] ++ if not '--disable-lib2to3' in sysconfig.get_config_var("CONFIG_ARGS"): ++ scripts += [ 'Tools/scripts/2to3' ] + + setup(# PyPI Metadata (PEP 301) + name = "Python", +Index: cpython/configure.ac +=================================================================== +--- cpython.orig/configure.ac ++++ cpython/configure.ac +@@ -2460,6 +2460,12 @@ + AS_HELP_STRING([--disable-test-modules], [disable test modules]), + [ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ]) + ++AC_SUBST(LIB2TO3) ++ ++AC_ARG_ENABLE(lib2to3, ++ AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]), ++ [ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ]) ++ + # Check for enable-ipv6 + AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified]) + AC_MSG_CHECKING([if --enable-ipv6 is specified]) diff --git a/package/python3/python3-103-optional-sqlite.patch b/package/python3/python3-103-optional-sqlite.patch new file mode 100644 index 0000000000..e3a63c3e02 --- /dev/null +++ b/package/python3/python3-103-optional-sqlite.patch @@ -0,0 +1,64 @@ +Add option to disable the sqlite3 module + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin + +--- + Makefile.pre.in | 9 +++++++-- + configure.ac | 9 +++++++++ + 2 files changed, 16 insertions(+), 2 deletions(-) + +Index: cpython/configure.ac +=================================================================== +--- cpython.orig/configure.ac ++++ cpython/configure.ac +@@ -2448,6 +2448,15 @@ + esac]) + fi + ++AC_SUBST(SQLITE3) ++AC_ARG_ENABLE(sqlite3, ++ AS_HELP_STRING([--disable-sqlite3], [disable sqlite3]), ++ [ SQLITE3="${enableval}" ], [ SQLITE3=yes ]) ++ ++if test "$SQLITE3" = "no" ; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3" ++fi ++ + AC_SUBST(PYDOC) + + AC_ARG_ENABLE(pydoc, +Index: cpython/Makefile.pre.in +=================================================================== +--- cpython.orig/Makefile.pre.in ++++ cpython/Makefile.pre.in +@@ -985,7 +985,6 @@ + collections concurrent concurrent/futures encodings \ + email email/mime \ + html json http dbm xmlrpc \ +- sqlite3 \ + logging csv wsgiref urllib \ + ctypes ctypes/macholib idlelib idlelib/Icons \ + distutils distutils/command $(XMLLIBSUBDIRS) \ +@@ -1025,7 +1024,6 @@ + test/namespace_pkgs/module_and_namespace_package/a_test \ + test/test_email test/test_email/data \ + test/json_tests \ +- sqlite3/test \ + ctypes/test \ + distutils/tests \ + test/test_importlib test/test_importlib/builtin \ +@@ -1048,6 +1046,13 @@ + endif + endif + ++ifeq (@SQLITE3@,yes) ++LIBSUBDIRS += sqlite3 ++ifeq (@TEST_MODULES@,yes) ++LIBSUBDIRS += sqlite3/test ++endif ++endif ++ + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c + @for i in $(SCRIPTDIR) $(LIBDEST); \ + do \ diff --git a/package/python3/python3-104-optional-tk.patch b/package/python3/python3-104-optional-tk.patch new file mode 100644 index 0000000000..2f89fe014f --- /dev/null +++ b/package/python3/python3-104-optional-tk.patch @@ -0,0 +1,69 @@ +Add an option to disable the tk module + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin + +--- + Makefile.pre.in | 14 +++++++++++--- + configure.ac | 9 +++++++++ + 2 files changed, 20 insertions(+), 3 deletions(-) + +Index: cpython/Makefile.pre.in +=================================================================== +--- cpython.orig/Makefile.pre.in ++++ cpython/Makefile.pre.in +@@ -980,7 +980,7 @@ + EXTRAPLATDIR= @EXTRAPLATDIR@ + MACHDEPS= $(PLATDIR) $(EXTRAPLATDIR) + XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax +-LIBSUBDIRS= tkinter \ ++LIBSUBDIRS= \ + site-packages \ + collections concurrent concurrent/futures encodings \ + email email/mime \ +@@ -996,8 +996,7 @@ + curses $(MACHDEPS) + + ifeq (@TEST_MODULES@,yes) +-LIBSUBDIRS += tkinter/test tkinter/test/test_tkinter \ +- tkinter/test/test_ttk test \ ++LIBSUBDIRS += test \ + test/capath test/data \ + test/cjkencodings test/decimaltestdata test/xmltestdata \ + test/subprocessdata test/sndhdrdata \ +@@ -1053,6 +1052,15 @@ + endif + endif + ++ifeq (@TK@,yes) ++LIBSUBDIRS += tkinter ++ifeq (@TEST_MODULES@,yes) ++LIBSUBDIRS += \ ++ tkinter/test tkinter/test/test_tkinter \ ++ tkinter/test/test_ttk ++endif ++endif ++ + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c + @for i in $(SCRIPTDIR) $(LIBDEST); \ + do \ +Index: cpython/configure.ac +=================================================================== +--- cpython.orig/configure.ac ++++ cpython/configure.ac +@@ -2457,6 +2457,15 @@ + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3" + fi + ++AC_SUBST(TK) ++AC_ARG_ENABLE(tk, ++ AS_HELP_STRING([--disable-tk], [disable tk]), ++ [ TK="${enableval}" ], [ TK=yes ]) ++ ++if test "$TK" = "no"; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter" ++fi ++ + AC_SUBST(PYDOC) + + AC_ARG_ENABLE(pydoc, diff --git a/package/python3/python3-105-optional-curses.patch b/package/python3/python3-105-optional-curses.patch new file mode 100644 index 0000000000..adb31836fd --- /dev/null +++ b/package/python3/python3-105-optional-curses.patch @@ -0,0 +1,54 @@ +Add an option to disable the curses module + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin + +--- + Makefile.pre.in | 6 +++++- + configure.ac | 9 +++++++++ + 2 files changed, 14 insertions(+), 1 deletion(-) + +Index: cpython/Makefile.pre.in +=================================================================== +--- cpython.orig/Makefile.pre.in ++++ cpython/Makefile.pre.in +@@ -993,7 +993,7 @@ + multiprocessing multiprocessing/dummy \ + unittest \ + venv venv/scripts venv/scripts/posix \ +- curses $(MACHDEPS) ++ $(MACHDEPS) + + ifeq (@TEST_MODULES@,yes) + LIBSUBDIRS += test \ +@@ -1061,6 +1061,10 @@ + endif + endif + ++ifeq (@CURSES@,yes) ++LIBSUBDIRS += curses ++endif ++ + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c + @for i in $(SCRIPTDIR) $(LIBDEST); \ + do \ +Index: cpython/configure.ac +=================================================================== +--- cpython.orig/configure.ac ++++ cpython/configure.ac +@@ -2466,6 +2466,15 @@ + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter" + fi + ++AC_SUBST(CURSES) ++AC_ARG_ENABLE(curses, ++ AS_HELP_STRING([--disable-curses], [disable curses]), ++ [ CURSES="${enableval}" ], [ CURSES=yes ]) ++ ++if test "$CURSES" = "no"; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _curses _curses_panel" ++fi ++ + AC_SUBST(PYDOC) + + AC_ARG_ENABLE(pydoc, diff --git a/package/python3/python3-106-optional-expat.patch b/package/python3/python3-106-optional-expat.patch new file mode 100644 index 0000000000..d171b79ef7 --- /dev/null +++ b/package/python3/python3-106-optional-expat.patch @@ -0,0 +1,85 @@ +Add an option to disable expat + +This patch replaces the existing --with-system-expat option with a +--with-expat={system,builtin,none} option, which allows to tell Python +whether we want to use the system expat (already installed), the expat +builtin the Python sources, or no expat at all (which disables the +installation of XML modules). + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin + +--- + Makefile.pre.in | 6 +++++- + configure.ac | 18 +++++++++++++----- + setup.py | 2 +- + 3 files changed, 19 insertions(+), 7 deletions(-) + +Index: cpython/Makefile.pre.in +=================================================================== +--- cpython.orig/Makefile.pre.in ++++ cpython/Makefile.pre.in +@@ -987,7 +987,7 @@ + html json http dbm xmlrpc \ + logging csv wsgiref urllib \ + ctypes ctypes/macholib idlelib idlelib/Icons \ +- distutils distutils/command $(XMLLIBSUBDIRS) \ ++ distutils distutils/command \ + importlib \ + turtledemo \ + multiprocessing multiprocessing/dummy \ +@@ -1065,6 +1065,10 @@ + LIBSUBDIRS += curses + endif + ++ifeq (@EXPAT@,yes) ++LIBSUBDIRS += $(XMLLIBSUBDIRS) ++endif ++ + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c + @for i in $(SCRIPTDIR) $(LIBDEST); \ + do \ +Index: cpython/configure.ac +=================================================================== +--- cpython.orig/configure.ac ++++ cpython/configure.ac +@@ -2178,13 +2178,21 @@ + AC_SUBST(DISABLED_EXTENSIONS) + + # Check for use of the system expat library +-AC_MSG_CHECKING(for --with-system-expat) +-AC_ARG_WITH(system_expat, +- AS_HELP_STRING([--with-system-expat], [build pyexpat module using an installed expat library]), ++AC_MSG_CHECKING(for --with-expat) ++AC_ARG_WITH(expat, ++ AS_HELP_STRING([--with-expat], [select which expat version to use: system, builtin, none]), + [], +- [with_system_expat="no"]) ++ [with_expat="builtin"]) + +-AC_MSG_RESULT($with_system_expat) ++AC_MSG_RESULT($with_expat) ++ ++if test "$with_expat" != "none"; then ++ EXPAT=yes ++else ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} pyexpat" ++ EXPAT=no ++fi ++AC_SUBST(EXPAT) + + # Check for use of the system libffi library + AC_MSG_CHECKING(for --with-system-ffi) +Index: cpython/setup.py +=================================================================== +--- cpython.orig/setup.py ++++ cpython/setup.py +@@ -1404,7 +1404,7 @@ + # + # More information on Expat can be found at www.libexpat.org. + # +- if '--with-system-expat' in sysconfig.get_config_var("CONFIG_ARGS"): ++ if '--with-expat=system' in sysconfig.get_config_var("CONFIG_ARGS"): + expat_inc = [] + define_macros = [] + expat_lib = ['expat'] diff --git a/package/python3/python3-107-optional-codecs-cjk.patch b/package/python3/python3-107-optional-codecs-cjk.patch new file mode 100644 index 0000000000..de7f9109a4 --- /dev/null +++ b/package/python3/python3-107-optional-codecs-cjk.patch @@ -0,0 +1,25 @@ +Add an option to disable CJK codecs + +Signed-off-by: Thomas Petazzoni + +--- + configure.ac | 6 ++++++ + 1 file changed, 6 insertions(+) + +Index: cpython/configure.ac +=================================================================== +--- cpython.orig/configure.ac ++++ cpython/configure.ac +@@ -2465,6 +2465,12 @@ + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3" + fi + ++AC_ARG_ENABLE(codecs-cjk, ++ AS_HELP_STRING([--disable-codecs-cjk], [disable CJK codecs]), ++ [ if test "$enableval" = "no"; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk _codecs_iso2022" ++ fi]) ++ + AC_SUBST(TK) + AC_ARG_ENABLE(tk, + AS_HELP_STRING([--disable-tk], [disable tk]), diff --git a/package/python3/python3-108-optional-nis.patch b/package/python3/python3-108-optional-nis.patch new file mode 100644 index 0000000000..3c9149769c --- /dev/null +++ b/package/python3/python3-108-optional-nis.patch @@ -0,0 +1,28 @@ +Add an option to disable NIS + +NIS is not necessarily available in uClibc, so we need an option to +not compile support for it. + +Signed-off-by: Thomas Petazzoni + +--- + configure.ac | 6 ++++++ + 1 file changed, 6 insertions(+) + +Index: cpython/configure.ac +=================================================================== +--- cpython.orig/configure.ac ++++ cpython/configure.ac +@@ -2471,6 +2471,12 @@ + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk _codecs_iso2022" + fi]) + ++AC_ARG_ENABLE(nis, ++ AS_HELP_STRING([--disable-nis], [disable NIS]), ++ [ if test "$enableval" = "no"; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis" ++ fi]) ++ + AC_SUBST(TK) + AC_ARG_ENABLE(tk, + AS_HELP_STRING([--disable-tk], [disable tk]), diff --git a/package/python3/python3-109-optional-unicodedata.patch b/package/python3/python3-109-optional-unicodedata.patch new file mode 100644 index 0000000000..c75ee27c74 --- /dev/null +++ b/package/python3/python3-109-optional-unicodedata.patch @@ -0,0 +1,25 @@ +Add an option to disable unicodedata + +Signed-off-by: Thomas Petazzoni + +--- + configure.ac | 6 ++++++ + 1 file changed, 6 insertions(+) + +Index: cpython/configure.ac +=================================================================== +--- cpython.orig/configure.ac ++++ cpython/configure.ac +@@ -2477,6 +2477,12 @@ + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis" + fi]) + ++AC_ARG_ENABLE(unicodedata, ++ AS_HELP_STRING([--disable-unicodedata], [disable unicodedata]), ++ [ if test "$enableval" = "no"; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} unicodedata" ++ fi]) ++ + AC_SUBST(TK) + AC_ARG_ENABLE(tk, + AS_HELP_STRING([--disable-tk], [disable tk]), diff --git a/package/python3/python3-110-optional-idle.patch b/package/python3/python3-110-optional-idle.patch new file mode 100644 index 0000000000..1a7fa65623 --- /dev/null +++ b/package/python3/python3-110-optional-idle.patch @@ -0,0 +1,83 @@ +Add an option to disable IDLE + +IDLE is an IDE embedded into python, written using Tk, so it doesn't make +much sense to have it into our build. + +Signed-off-by: Maxime Ripard + +--- + Makefile.pre.in | 8 +++++++- + configure.ac | 6 ++++++ + setup.py | 4 +++- + 3 files changed, 16 insertions(+), 2 deletions(-) + +Index: cpython/Makefile.pre.in +=================================================================== +--- cpython.orig/Makefile.pre.in ++++ cpython/Makefile.pre.in +@@ -950,7 +950,9 @@ + -rm -f $(DESTDIR)$(LIBPC)/python3.pc + (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python3.pc) + -rm -f $(DESTDIR)$(BINDIR)/idle3 ++ifeq (@IDLE@,yes) + (cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3) ++endif + -rm -f $(DESTDIR)$(BINDIR)/pydoc3 + ifeq (@PYDOC@,yes) + (cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3) +@@ -986,7 +988,7 @@ + email email/mime \ + html json http dbm xmlrpc \ + logging csv wsgiref urllib \ +- ctypes ctypes/macholib idlelib idlelib/Icons \ ++ ctypes ctypes/macholib \ + distutils distutils/command \ + importlib \ + turtledemo \ +@@ -1069,6 +1071,10 @@ + LIBSUBDIRS += $(XMLLIBSUBDIRS) + endif + ++ifeq (@IDLE@,yes) ++LIBSUBDIRS += idlelib idlelib/Icons ++endif ++ + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c + @for i in $(SCRIPTDIR) $(LIBDEST); \ + do \ +Index: cpython/configure.ac +=================================================================== +--- cpython.orig/configure.ac ++++ cpython/configure.ac +@@ -2519,6 +2519,12 @@ + AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]), + [ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ]) + ++AC_SUBST(IDLE) ++ ++AC_ARG_ENABLE(idle3, ++ AS_HELP_STRING([--disable-idle3], [disable idle3 IDE]), ++ [ IDLE="${enableval}" ], [ IDLE=yes ]) ++ + # Check for enable-ipv6 + AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified]) + AC_MSG_CHECKING([if --enable-ipv6 is specified]) +Index: cpython/setup.py +=================================================================== +--- cpython.orig/setup.py ++++ cpython/setup.py +@@ -2124,11 +2124,13 @@ + import warnings + warnings.filterwarnings("ignore",category=DeprecationWarning) + +- scripts = ['Tools/scripts/idle3', 'Lib/smtpd.py'] ++ scripts = ['Lib/smtpd.py'] + if not '--disable-pydoc' in sysconfig.get_config_var("CONFIG_ARGS"): + scripts += [ 'Tools/scripts/pydoc3' ] + if not '--disable-lib2to3' in sysconfig.get_config_var("CONFIG_ARGS"): + scripts += [ 'Tools/scripts/2to3' ] ++ if not '--disable-idle3' in sysconfig.get_config_var("CONFIG_ARGS"): ++ scripts += [ 'Tools/scripts/idle3' ] + + setup(# PyPI Metadata (PEP 301) + name = "Python", diff --git a/package/python3/python3-112-old-stdlib-cache.patch b/package/python3/python3-112-old-stdlib-cache.patch new file mode 100644 index 0000000000..5a2cf8b961 --- /dev/null +++ b/package/python3/python3-112-old-stdlib-cache.patch @@ -0,0 +1,63 @@ +python3: Fix pyc-only related runtime exceptions + +Python3 changes the pyc lookup strategy, ignoring the +__pycache__ directory if the .py file is missing. Change +install location to enable use of .pyc without their parent .py + +See http://www.python.org/dev/peps/pep-3147 + +Signed-off-by: Daniel Nelson + +--- python3-3.3.0/configure.ac 2013-01-27 16:35:52.429067797 -0800 ++++ python3-3.3.0/configure.ac 2013-01-27 16:43:43.528601443 -0800 +@@ -1827,6 +1827,23 @@ + LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; + esac + ++STDLIB_CACHE_FLAGS= ++AC_MSG_CHECKING(for --enable-old-stdlib-cache) ++AC_ARG_ENABLE(old-stdlib-cache, ++ AS_HELP_STRING([--enable-old-stdlib-cache], [enable pre-pep3147 stdlib cache]), ++[ ++ if test "$enableval" = "yes" ++ then ++ STDLIB_CACHE_FLAGS="-b" ++ else ++ STDLIB_CACHE_FLAGS="" ++ fi ++], ++[ ++ STDLIB_CACHE_FLAGS="" ++]) ++AC_SUBST(STDLIB_CACHE_FLAGS) ++ + AC_MSG_CHECKING(for --enable-framework) + if test "$enable_framework" + then +--- python3-3.3.0/Makefile.pre.in 2013-01-27 16:35:52.422067642 -0800 ++++ python3-3.3.0/Makefile.pre.in 2013-01-27 16:37:03.710650439 -0800 +@@ -143,6 +143,9 @@ + # Options to enable prebinding (for fast startup prior to Mac OS X 10.3) + OTHER_LIBTOOL_OPT=@OTHER_LIBTOOL_OPT@ + ++# Option to enable old-style precompiled stdlib ++STDLIB_CACHE_FLAGS=@STDLIB_CACHE_FLAGS@ ++ + # Environment to run shared python without installed libraries + RUNSHARED= @RUNSHARED@ + +@@ -1079,12 +1082,12 @@ + fi + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ +- -d $(LIBDEST) -f \ ++ -d $(LIBDEST) -f $(STDLIB_CACHE_FLAGS) \ + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + $(DESTDIR)$(LIBDEST) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ +- -d $(LIBDEST)/site-packages -f \ ++ -d $(LIBDEST)/site-packages -f $(STDLIB_CACHE_FLAGS) \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt diff --git a/package/python3/python3.mk b/package/python3/python3.mk new file mode 100644 index 0000000000..b5e9689324 --- /dev/null +++ b/package/python3/python3.mk @@ -0,0 +1,184 @@ +################################################################################ +# +# python3 +# +################################################################################ + +PYTHON3_VERSION_MAJOR = 3.3 +PYTHON3_VERSION = $(PYTHON3_VERSION_MAJOR).0 +PYTHON3_SOURCE = Python-$(PYTHON3_VERSION).tar.xz +PYTHON3_SITE = http://python.org/ftp/python/$(PYTHON3_VERSION) + +# Python needs itself and a "pgen" program to build itself, both being +# provided in the Python sources. So in order to cross-compile Python, +# we need to build a host Python first. This host Python is also +# installed in $(HOST_DIR), as it is needed when cross-compiling +# third-party Python modules. + +HOST_PYTHON3_CONF_OPT += \ + --without-cxx-main \ + --disable-sqlite3 \ + --disable-tk \ + --with-expat=system \ + --disable-curses \ + --disable-codecs-cjk \ + --disable-nis \ + --disable-unicodedata \ + --disable-test-modules \ + --disable-idle3 + +HOST_PYTHON3_MAKE_ENV = \ + PYTHON_MODULES_INCLUDE=$(HOST_DIR)/usr/include \ + PYTHON_MODULES_LIB="$(HOST_DIR)/lib $(HOST_DIR)/usr/lib" + + +define HOST_PYTHON3_CONFIGURE_CMDS + (cd $(@D) && rm -rf config.cache; \ + $(HOST_CONFIGURE_OPTS) \ + CFLAGS="$(HOST_CFLAGS)" \ + LDFLAGS="$(HOST_LDFLAGS)" \ + $(HOST_PYTHON3_CONF_ENV) \ + ./configure \ + --prefix="$(HOST_DIR)/usr" \ + --sysconfdir="$(HOST_DIR)/etc" \ + $(HOST_PYTHON3_CONF_OPT) \ + ) +endef + +PYTHON3_DEPENDENCIES = host-python3 libffi + +HOST_PYTHON3_DEPENDENCIES = host-expat host-zlib + +PYTHON3_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_PYTHON3_READLINE),y) +PYTHON3_DEPENDENCIES += readline +endif + +ifeq ($(BR2_PACKAGE_PYTHON3_CURSES),y) +PYTHON3_DEPENDENCIES += ncurses +else +PYTHON3_CONF_OPT += --disable-curses +endif + +ifeq ($(BR2_PACKAGE_PYTHON3_PYEXPAT),y) +PYTHON3_DEPENDENCIES += expat +PYTHON3_CONF_OPT += --with-expat=system +else +PYTHON3_CONF_OPT += --with-expat=none +endif + +ifeq ($(BR2_PACKAGE_PYTHON3_PYC_ONLY),y) +PYTHON3_CONF_OPT += --enable-old-stdlib-cache +endif + +ifeq ($(BR2_PACKAGE_PYTHON3_SQLITE),y) +PYTHON3_DEPENDENCIES += sqlite +else +PYTHON3_CONF_OPT += --disable-sqlite3 +endif + +ifeq ($(BR2_PACKAGE_PYTHON3_SSL),y) +PYTHON3_DEPENDENCIES += openssl +endif + +ifneq ($(BR2_PACKAGE_PYTHON3_CODECSCJK),y) +PYTHON3_CONF_OPT += --disable-codecs-cjk +endif + +ifneq ($(BR2_PACKAGE_PYTHON3_UNICODEDATA),y) +PYTHON3_CONF_OPT += --disable-unicodedata +endif + +ifeq ($(BR2_PACKAGE_PYTHON3_BZIP2),y) +PYTHON3_DEPENDENCIES += bzip2 +endif + +ifeq ($(BR2_PACKAGE_PYTHON3_ZLIB),y) +PYTHON3_DEPENDENCIES += zlib +endif + +PYTHON3_CONF_ENV += \ + _PROJECT_BASE=$(PYTHON3_DIR) \ + _PYTHON_HOST_PLATFORM=$(BR2_HOSTARCH) \ + PYTHON_FOR_BUILD=$(HOST_PYTHON3_DIR)/python \ + PGEN_FOR_BUILD=$(HOST_PYTHON3_DIR)/Parser/pgen \ + ac_cv_have_long_long_format=yes \ + ac_cv_file__dev_ptmx=yes \ + ac_cv_file__dev_ptc=yes \ + +PYTHON3_CONF_OPT += \ + --without-cxx-main \ + --with-system-ffi \ + --disable-pydoc \ + --disable-test-modules \ + --disable-lib2to3 \ + --disable-tk \ + --disable-nis \ + --disable-idle3 + +PYTHON3_MAKE_ENV = \ + _PROJECT_BASE=$(PYTHON3_DIR) \ + _PYTHON_HOST_PLATFORM=$(BR2_HOSTARCH) \ + PYTHON_MODULES_INCLUDE=$(STAGING_DIR)/usr/include \ + PYTHON_MODULES_LIB="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" + +# python distutils adds -L$LIBDIR when linking binary extensions, causing +# trouble for cross compilation +define PYTHON3_FIXUP_LIBDIR + $(SED) 's|^LIBDIR=.*|LIBDIR= $(STAGING_DIR)/usr/lib|' \ + $(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-3.3m/Makefile +endef + +PYTHON3_POST_INSTALL_STAGING_HOOKS += PYTHON3_FIXUP_LIBDIR + +# +# Remove useless files. In the config/ directory, only the Makefile +# and the pyconfig.h files are needed at runtime. +# +define PYTHON3_REMOVE_USELESS_FILES + rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR)-config + rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR)m-config + rm -f $(TARGET_DIR)/usr/bin/python3-config + rm -f $(TARGET_DIR)/usr/bin/smtpd.py.3 + for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-3.3m/ \ + -type f -not -name pyconfig.h -a -not -name Makefile` ; do \ + rm -f $$i ; \ + done +endef + +PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_REMOVE_USELESS_FILES + +PYTHON3_AUTORECONF = YES + +define PYTHON3_INSTALL_SYMLINK + ln -fs python3 $(TARGET_DIR)/usr/bin/python +endef + +ifneq ($(BR2_PACKAGE_PYTHON),y) +PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_INSTALL_SYMLINK +endif + +ifeq ($(BR2_PACKAGE_PYTHON3_PY_ONLY),y) +define PYTHON3_REMOVE_MODULES_FILES + for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR) \ + -name __pycache__` ; do \ + rm -rf $$i ; \ + done +endef +endif + +ifeq ($(BR2_PACKAGE_PYTHON3_PYC_ONLY),y) +define PYTHON3_REMOVE_MODULES_FILES + for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR) \ + -name *.py` ; do \ + rm -f $$i ; \ + done +endef +endif + +PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_REMOVE_MODULES_FILES + + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk new file mode 100644 index 0000000000..a89bf7d20c --- /dev/null +++ b/package/qemu/qemu.mk @@ -0,0 +1,83 @@ +################################################################################ +# +# qemu +# +################################################################################ + +QEMU_VERSION = 1.6.0 +QEMU_SOURCE = qemu-$(QEMU_VERSION).tar.bz2 +QEMU_SITE = http://wiki.qemu.org/download +QEMU_LICENSE = GPLv2 LGPLv2.1 MIT BSD-3c BSD-2c Others/BSD-1c +QEMU_LICENSE_FILES = COPYING COPYING.LIB +# NOTE: there is no top-level license file for non-(L)GPL licenses; +# the non-(L)GPL license texts are specified in the affected +# individual source files. + +#------------------------------------------------------------- +# Host-qemu + +HOST_QEMU_DEPENDENCIES = host-pkgconf host-zlib host-libglib2 host-pixman + +# BR ARCH qemu +# ------- ---- +# arm arm +# armeb armeb +# avr32 not supported +# bfin not supported +# i386 i386 +# i486 i386 +# i586 i386 +# i686 i386 +# x86_64 x86_64 +# m68k m68k +# microblaze microblaze +# mips mips +# mipsel mipsel +# mips64 ? +# mips64el ? +# powerpc ppc +# sh2 not supported +# sh2a not supported +# sh3 not supported +# sh3eb not supported +# sh4 sh4 +# sh4eb sh4eb +# sh4a ? +# sh4aeb ? +# sh64 not supported +# sparc sparc + +HOST_QEMU_ARCH = $(ARCH) +ifeq ($(HOST_QEMU_ARCH),i486) + HOST_QEMU_ARCH = i386 +endif +ifeq ($(HOST_QEMU_ARCH),i586) + HOST_QEMU_ARCH = i386 +endif +ifeq ($(HOST_QEMU_ARCH),i686) + HOST_QEMU_ARCH = i386 +endif +ifeq ($(HOST_QEMU_ARCH),powerpc) + HOST_QEMU_ARCH = ppc +endif +HOST_QEMU_TARGETS=$(HOST_QEMU_ARCH)-linux-user + +# Note: although QEMU has a ./configure script, it is not a real autotools +# package, and ./configure chokes on options such as --host or --target. +# So, provide out own _CONFIGURE_CMDS to override the defaults. +define HOST_QEMU_CONFIGURE_CMDS + (cd $(@D); $(HOST_CONFIGURE_OPTS) ./configure \ + --target-list="$(HOST_QEMU_TARGETS)" \ + --prefix="$(HOST_DIR)/usr" \ + --interp-prefix=$(STAGING_DIR) \ + --cc="$(HOSTCC)" \ + --host-cc="$(HOSTCC)" \ + --extra-cflags="$(HOST_CFLAGS)" \ + --extra-ldflags="$(HOST_LDFLAGS)" \ + ) +endef + +$(eval $(host-autotools-package)) + +# variable used by other packages +QEMU_USER = $(HOST_DIR)/usr/bin/qemu-$(HOST_QEMU_ARCH) diff --git a/package/qextserialport/Config.in b/package/qextserialport/Config.in new file mode 100644 index 0000000000..4e92ecf3bb --- /dev/null +++ b/package/qextserialport/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_QEXTSERIALPORT + bool "qextserialport" + # Qt is a big library, we don't want to select it + # automatically without the user knowing + depends on BR2_PACKAGE_QT + help + A Qt library to manage serial ports + + http://code.google.com/p/qextserialport/ diff --git a/package/qextserialport/qextserialport-gui.patch b/package/qextserialport/qextserialport-gui.patch new file mode 100644 index 0000000000..d3dedae824 --- /dev/null +++ b/package/qextserialport/qextserialport-gui.patch @@ -0,0 +1,16 @@ +Don't require Qt GUI module + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- +diff -Nrup qextserialport-f83b4e7ca922e53.orig/qextserialport.pro qextserialport-f83b4e7ca922e53/qextserialport.pro +--- qextserialport-f83b4e7ca922e53.orig/qextserialport.pro 2012-10-17 09:13:53.000000000 +0200 ++++ qextserialport-f83b4e7ca922e53/qextserialport.pro 2012-11-13 22:48:29.249431510 +0100 +@@ -41,6 +41,8 @@ macx:qesp_mac_framework { + + win32|mac:!wince*:!win32-msvc:!macx-xcode:CONFIG += debug_and_release build_all + ++!win32*:!wince*:QT -= gui ++ + #generate proper library name + greaterThan(QT_MAJOR_VERSION, 4) { + QESP_LIB_BASENAME = QtExtSerialPort diff --git a/package/qextserialport/qextserialport-main-include.patch b/package/qextserialport/qextserialport-main-include.patch new file mode 100644 index 0000000000..858f3354d5 --- /dev/null +++ b/package/qextserialport/qextserialport-main-include.patch @@ -0,0 +1,15 @@ +Create a main include file QExtSerialPort + +This main include file will be installed in + so that Qt applications can use this +library by including header files in a Qt-like style. + +Signed-off-by: Thomas Petazzoni + +Index: qextserialport-ef4af2a2ee3f/src/QExtSerialPort +=================================================================== +--- /dev/null ++++ qextserialport-ef4af2a2ee3f/src/QExtSerialPort +@@ -0,0 +1,2 @@ ++#include "qextserialport.h" ++#include "qextserialenumerator.h" diff --git a/package/qextserialport/qextserialport-pkgconfig.patch b/package/qextserialport/qextserialport-pkgconfig.patch new file mode 100644 index 0000000000..d67f3fcbb3 --- /dev/null +++ b/package/qextserialport/qextserialport-pkgconfig.patch @@ -0,0 +1,19 @@ +Add a pkgconfig file to ease usage with applications + +Signed-off-by: Thomas Petazzoni + +Index: qextserialport-ef4af2a2ee3f/qextserialport.pc +=================================================================== +--- /dev/null ++++ qextserialport-ef4af2a2ee3f/qextserialport.pc +@@ -0,0 +1,10 @@ ++prefix=/usr ++exec_prefix=${prefix} ++libdir=${prefix}/lib ++includedir=${prefix}/include/QExtSerialPort ++ ++Name: QtExtSerialPort ++Description: QtExtSerialPort library ++Version: 1.2.0 ++Libs: -L${libdir} -lqextserialport ++Cflags: -I${includedir} diff --git a/package/qextserialport/qextserialport.mk b/package/qextserialport/qextserialport.mk new file mode 100644 index 0000000000..45dc9b844b --- /dev/null +++ b/package/qextserialport/qextserialport.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# qextserialport +# +################################################################################ + +QEXTSERIALPORT_VERSION = 6c47244de4ce6db43c2f05caee957666c951dae1 +QEXTSERIALPORT_SITE = https://qextserialport.googlecode.com/git/ +QEXTSERIALPORT_SITE_METHOD = git + +QEXTSERIALPORT_LICENSE = MIT + +QEXTSERIALPORT_DEPENDENCIES = qt + +QEXTSERIALPORT_INSTALL_STAGING = YES + +define QEXTSERIALPORT_CONFIGURE_CMDS + (cd $(@D); $(QT_QMAKE)) +endef + +define QEXTSERIALPORT_BUILD_CMDS + $(MAKE) -C $(@D) +endef + +define QEXTSERIALPORT_INSTALL_STAGING_CMDS + mkdir -p $(STAGING_DIR)/usr/include/QExtSerialPort + cp $(@D)/src/*.h $(STAGING_DIR)/usr/include/QExtSerialPort/ + cp $(@D)/src/QExtSerialPort $(STAGING_DIR)/usr/include/QExtSerialPort/ + cp -a $(@D)/*.so* $(STAGING_DIR)/usr/lib/ + cp $(@D)/qextserialport.pc $(STAGING_DIR)/usr/lib/pkgconfig/ +endef + +define QEXTSERIALPORT_INSTALL_TARGET_CMDS + cp -a $(@D)/*.so.* $(TARGET_DIR)/usr/lib +endef + +$(eval $(generic-package)) diff --git a/package/qjson/Config.in b/package/qjson/Config.in new file mode 100644 index 0000000000..c15b12fdab --- /dev/null +++ b/package/qjson/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_QJSON + bool "qjson" + help + QJson is a Qt-based library that maps JSON data to + QVariant objects and vice versa. + + http://qjson.sourceforge.net diff --git a/package/qjson/qjson-fix-qt4-package-error-in-cmakelists.patch b/package/qjson/qjson-fix-qt4-package-error-in-cmakelists.patch new file mode 100644 index 0000000000..058973e99a --- /dev/null +++ b/package/qjson/qjson-fix-qt4-package-error-in-cmakelists.patch @@ -0,0 +1,29 @@ +From 529e50939316abc3c4190f89a482b17a4d4b3355 Mon Sep 17 00:00:00 2001 +From: Zoltan Gyarmati +Date: Sat, 6 Apr 2013 16:54:25 +0200 +Subject: [PATCH] fix Qt4 package error in CMakeLists.txt + +Avoid checking for uic executable by cmake as it results configure +time error if QtGui isn't installed. + +Signed-off-by: Zoltan Gyarmati +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 13e65f1..447f209 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -32,7 +32,7 @@ SET(FRAMEWORK_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/Library/Frameworks" + SET(QT_USE_IMPORTED_TARGETS TRUE) + + # Find Qt4 +-FIND_PACKAGE( Qt4 REQUIRED ) ++find_package(Qt4 COMPONENTS QtCore REQUIRED ) + + IF (NOT WIN32) + SET( QT_DONT_USE_QTGUI TRUE ) +-- +1.7.10.4 + diff --git a/package/qjson/qjson.mk b/package/qjson/qjson.mk new file mode 100644 index 0000000000..29b8c31aac --- /dev/null +++ b/package/qjson/qjson.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# qjson +# +################################################################################ + +QJSON_VERSION = 0.8.1 + +QJSON_SITE = http://github.com/flavio/qjson/tarball/$(QJSON_VERSION) +QJSON_INSTALL_STAGING = YES +QJSON_DEPENDENCIES = qt +QJSON_LICENSE = LGPLv2.1 +QJSON_LICENSE_FILES = COPYING.lib + +$(eval $(cmake-package)) diff --git a/package/qt/Config.gfx.in b/package/qt/Config.gfx.in index dc706657dd..70adeef2ff 100644 --- a/package/qt/Config.gfx.in +++ b/package/qt/Config.gfx.in @@ -23,4 +23,9 @@ config BR2_PACKAGE_QT_GFX_DIRECTFB depends on BR2_PACKAGE_DIRECTFB bool "directFB" +config BR2_PACKAGE_QT_GFX_POWERVR + depends on BR2_PACKAGE_QT_OPENGL_ES + depends on BR2_PACKAGE_HAS_POWERVR + bool "powervr" + endmenu diff --git a/package/qt/Config.in b/package/qt/Config.in index 3a552d090f..dd2b6d9ec9 100644 --- a/package/qt/Config.in +++ b/package/qt/Config.in @@ -1,13 +1,17 @@ -comment "qt requires a toolchain with C++ support enabled" - depends on !BR2_INSTALL_LIBSTDCPP +comment "qt needs a toolchain w/ C++, threads" + depends on !BR2_avr32 + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS menuconfig BR2_PACKAGE_QT bool "Qt" + depends on !BR2_avr32 # lacks TLS depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS help - Qt for Embedded Linux. + Qt is a cross-platform application and UI framework for + developers using C++. - http://www.qtsoftware.com/products/platform/qt-for-embedded-linux + http://qt-project.org if BR2_PACKAGE_QT @@ -18,6 +22,7 @@ config BR2_PACKAGE_QT_DEBUG config BR2_PACKAGE_QT_DEMOS bool "Compile and install demos and examples (with code)" + select BR2_PACKAGE_QT_GUI_MODULE help If unsure, say N. @@ -278,14 +283,28 @@ config BR2_PACKAGE_QT_PHONON_BACKEND help Build the platform Phonon plugin. If unsure, say n. + +config BR2_PACKAGE_QT_OPENGL_ES + bool "OpenGL ES v2.x support" + depends on BR2_PACKAGE_HAS_OPENGL_ES + depends on BR2_PACKAGE_HAS_OPENGL_EGL + help + Enable the OpenGL ES v2.x support. + endif config BR2_PACKAGE_QT_DBUS bool "DBus Module" select BR2_PACKAGE_DBUS + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus + depends on BR2_USE_MMU # dbus help Build the Qt DBus module. +comment "DBus Module needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS + config BR2_PACKAGE_QT_XML bool "XML Module" default y @@ -309,6 +328,7 @@ config BR2_PACKAGE_QT_AUDIO_BACKEND bool "QtMultimedia Audio backend" depends on BR2_PACKAGE_QT_MULTIMEDIA select BR2_PACKAGE_ALSA_LIB + depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib help Build the ALSA audio backend into QtMultimedia @@ -326,23 +346,26 @@ config BR2_PACKAGE_QT_NETWORK Install the Network module. if unsure, say y +config BR2_PACKAGE_QT_ARCH_SUPPORTS_WEBKIT + bool + # see src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h + default y if BR2_arm || BR2_armeb || BR2_i386 || BR2_mips || \ + BR2_mipsel || BR2_powerpc || BR2_sh4 || BR2_sh4eb || \ + BR2_sh4a || BR2_sh4aeb || BR2_sparc || BR2_x86_64 + config BR2_PACKAGE_QT_WEBKIT bool "WebKit Module" depends on BR2_PACKAGE_QT_SHARED depends on BR2_PACKAGE_QT_GUI_MODULE depends on BR2_PACKAGE_QT_NETWORK + depends on BR2_PACKAGE_QT_ARCH_SUPPORTS_WEBKIT help Build the WebKit module. If unsure, say n. comment "WebKit needs shared library/gui/network support" depends on !(BR2_PACKAGE_QT_SHARED && BR2_PACKAGE_QT_GUI_MODULE && BR2_PACKAGE_QT_NETWORK) - -config BR2_PACKAGE_QT_JAVASCRIPTCORE - bool "JavaScriptCore JIT compiler" - help - Build the JavaScriptCore JIT compiler - If unsure, say y + depends on BR2_PACKAGE_QT_ARCH_SUPPORTS_WEBKIT config BR2_PACKAGE_QT_STL bool "STL support" @@ -362,6 +385,7 @@ config BR2_PACKAGE_QT_OPENSSL config BR2_PACKAGE_QT_SCRIPT bool "Script Module" + depends on BR2_PACKAGE_QT_ARCH_SUPPORTS_WEBKIT default y help Build the Qt Script module. diff --git a/package/qt/Config.sql.in b/package/qt/Config.sql.in index eceb15d643..04489c75bf 100644 --- a/package/qt/Config.sql.in +++ b/package/qt/Config.sql.in @@ -9,6 +9,7 @@ config BR2_PACKAGE_QT_MYSQL select BR2_PACKAGE_MYSQL_CLIENT select BR2_PACKAGE_NCURSES select BR2_PACKAGE_READLINE + depends on BR2_USE_MMU # mysql help Build MySQL driver If unsure, say n. diff --git a/package/qt/powervr.ini b/package/qt/powervr.ini new file mode 100644 index 0000000000..57863ebc44 --- /dev/null +++ b/package/qt/powervr.ini @@ -0,0 +1,2 @@ +[default] +WindowSystem=libpvrQWSWSEGL.so.1 diff --git a/package/qt/qt-4.7.4-configure.patch b/package/qt/qt-4.7.4-configure.patch deleted file mode 100644 index cef53e3faf..0000000000 --- a/package/qt/qt-4.7.4-configure.patch +++ /dev/null @@ -1,48 +0,0 @@ -Fix -hostprefix behaviour - -When -hostprefix ./configure option is used, Qt installs all its -headers, libraries and binaries inside the given host prefix, instead -of the prefix. This is used by Buildroot to make sure that all Qt -libraries and headers are installed in $(STAGING_DIR). - -Qt ./configure script also allows to tune the installation location of -various elements, for examples the plugins through the -plugindir -option. Unfortunately, this option only impact the installation path -on the target, but not on the host when -hostprefix is used. - -This patch modifies Qt ./configure script so that HOST_*PATH_STR -variables are composed of the host prefix concatenated with the path -of installation on the target. This way, the plugin installation local -in the $(STAGING_DIR) and on the target remains the same. - -Signed-off-by: Thomas Petazzoni - -Index: qt-4.7.2/configure -=================================================================== ---- qt-4.7.2.orig/configure 2011-03-31 22:28:16.530647168 +0200 -+++ qt-4.7.2/configure 2011-03-31 22:29:38.908081695 +0200 -@@ -4456,15 +4456,15 @@ - - - if [ ! -z "$QT_HOST_PREFIX" ]; then -- HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"` -- HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"` -- HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"` -- HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"` -- HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"` -- HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"` -- HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"` -- HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"` -- HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"` -+ HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX/$QT_INSTALL_PREFIX"` -+ HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/$QT_INSTALL_DOCS"` -+ HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/$QT_INSTALL_HEADERS"` -+ HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/$QT_INSTALL_LIBS"` -+ HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/$QT_INSTALL_BINS"` -+ HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/$QT_INSTALL_PLUGINS"` -+ HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/$QT_INSTALL_IMPORTS"` -+ HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX/$QT_INSTALL_DATA"` -+ HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/$QT_INSTALL_TRANSLATIONS"` - HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"` - HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"` - HOSTDEMOS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"` diff --git a/package/qt/qt-4.7.4-pthread_getattr_np.patch b/package/qt/qt-4.7.4-pthread_getattr_np.patch deleted file mode 100644 index 4b20bb2320..0000000000 --- a/package/qt/qt-4.7.4-pthread_getattr_np.patch +++ /dev/null @@ -1,101 +0,0 @@ -Add pthred_getattr_np / phread_attr_getstrack alternatives for uClibc - -Based on https://dev.openwrt.org/log/packages/Xorg/lib/qt4/patches/100-fix-webkit-for-uclibc.patch?rev=20371 - -Signed-off-by: Johan Sagaert ---- qt-everywhere-opensource-src-4.6.2/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp 2010-02-11 16:55:20.000000000 +0100 -+++ qt-everywhere-opensource-src-4.6.2JS/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp 2010-05-23 10:49:29.000000000 +0200 -@@ -75,6 +75,23 @@ - #endif - #include - -+#if defined(QT_LINUXBASE) -+#include -+#endif -+ -+#if defined(__UCLIBC__) -+// versions of uClibc 0.9.32 and below with linuxthreads.old do not have -+// pthread_getattr_np or pthread_attr_getstack. -+#if __UCLIBC_MAJOR__ == 0 && \ -+ (__UCLIBC_MINOR__ < 9 || \ -+ (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ <= 32)) && \ -+ defined(__LINUXTHREADS_OLD__) -+#define UCLIBC_USE_PROC_SELF_MAPS 1 -+#include -+extern int *__libc_stack_end; -+#endif -+#endif -+ - #if OS(SOLARIS) - #include - #else -@@ -667,18 +683,61 @@ static inline void* currentThreadStackBa - get_thread_info(find_thread(NULL), &threadInfo); - return threadInfo.stack_end; - #elif OS(UNIX) -+#ifdef UCLIBC_USE_PROC_SELF_MAPS -+ // Read /proc/self/maps and locate the line whose address -+ // range contains __libc_stack_end. -+ FILE *file = fopen("/proc/self/maps", "r"); -+ if (!file) -+ return 0; -+ __fsetlocking(file, FSETLOCKING_BYCALLER); -+ char *line = NULL; -+ size_t lineLen = 0; -+ while (!feof_unlocked(file)) { -+ if (getdelim(&line, &lineLen, '\n', file) <= 0) -+ break; -+ -+ long from; -+ long to; -+ if (sscanf (line, "%lx-%lx", &from, &to) != 2) -+ continue; -+ if (from <= (long)__libc_stack_end && (long)__libc_stack_end < to) { -+ fclose(file); -+ free(line); -+#ifdef _STACK_GROWS_UP -+ return (void *)from; -+#else -+ return (void *)to; -+#endif -+ } -+ } -+ fclose(file); -+ free(line); -+ return 0; -+#else - AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex); - MutexLocker locker(mutex); - static void* stackBase = 0; - static size_t stackSize = 0; - static pthread_t stackThread; - pthread_t thread = pthread_self(); - if (stackBase == 0 || thread != stackThread) { -+ -+#if defined(QT_LINUXBASE) -+ // LinuxBase is missing pthread_getattr_np - resolve it once at runtime instead -+ // see http://bugs.linuxbase.org/show_bug.cgi?id=2364 -+ typedef int (*GetAttrPtr)(pthread_t, pthread_attr_t *); -+ static int (*pthread_getattr_np_ptr)(pthread_t, pthread_attr_t *) = 0; -+ if (!pthread_getattr_np_ptr) -+ *(void **)&pthread_getattr_np_ptr = dlsym(RTLD_DEFAULT, "pthread_getattr_np"); -+#endif - pthread_attr_t sattr; - pthread_attr_init(&sattr); - #if HAVE(PTHREAD_NP_H) || OS(NETBSD) - // e.g. on FreeBSD 5.4, neundorf@kde.org - pthread_attr_get_np(thread, &sattr); -+#elif defined(QT_LINUXBASE) -+ if (pthread_getattr_np_ptr) -+ pthread_getattr_np_ptr(thread, &sattr); - #else - // FIXME: this function is non-portable; other POSIX systems may have different np alternatives - pthread_getattr_np(thread, &sattr); -@@ -690,6 +749,7 @@ static inline void* currentThreadStackBa - stackThread = thread; - } - return static_cast(stackBase) + stackSize; -+#endif - #elif OS(WINCE) - AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex); - MutexLocker locker(mutex); diff --git a/package/qt/qt-4.7.4-pthread_getattr_np_webkit.patch b/package/qt/qt-4.7.4-pthread_getattr_np_webkit.patch deleted file mode 100644 index 934c332f47..0000000000 --- a/package/qt/qt-4.7.4-pthread_getattr_np_webkit.patch +++ /dev/null @@ -1,68 +0,0 @@ ---- a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp 2010-09-10 11:05:22.000000000 +0200 -+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp 2010-11-15 16:39:53.000000000 +0100 -@@ -70,6 +70,19 @@ - #endif - #include - -+#if defined(__UCLIBC__) -+// versions of uClibc 0.9.32 with linuxthreads.old and below do not have -+// pthread_getattr_np or pthread_attr_getstack. -+#if __UCLIBC_MAJOR__ == 0 && \ -+ (__UCLIBC_MINOR__ < 9 || \ -+ (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ <= 32)) && \ -+ defined(__LINUXTHREADS_OLD__) -+#define UCLIBC_USE_PROC_SELF_MAPS 1 -+#include -+extern int* __libc_stack_end; -+#endif -+#endif -+ - #if OS(SOLARIS) - #include - #else -@@ -580,6 +592,37 @@ - get_thread_info(find_thread(NULL), &threadInfo); - return threadInfo.stack_end; - #elif OS(UNIX) -+#ifdef UCLIBC_USE_PROC_SELF_MAPS -+ // Read /proc/self/maps and locate the line whose address -+ // range contains __libc_stack_end. -+ FILE* file = fopen("/proc/self/maps", "r"); -+ if (!file) -+ return 0; -+ __fsetlocking(file, FSETLOCKING_BYCALLER); -+ char* line = 0; -+ size_t lineLen = 0; -+ while (!feof_unlocked(file)) { -+ if (getdelim(&line, &lineLen, '\n', file) <= 0) -+ break; -+ -+ long from; -+ long to; -+ if (sscanf (line, "%lx-%lx", &from, &to) != 2) -+ continue; -+ if (from <= (long)__libc_stack_end && (long)__libc_stack_end < to) { -+ fclose(file); -+ free(line); -+#ifdef _STACK_GROWS_UP -+ return (void *)from; -+#else -+ return (void *)to; -+#endif -+ } -+ } -+ fclose(file); -+ free(line); -+ return 0; -+#else - AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex); - MutexLocker locker(mutex); - static void* stackBase = 0; -@@ -603,6 +646,7 @@ - stackThread = thread; - } - return static_cast(stackBase) + stackSize; -+#endif - #elif OS(WINCE) - AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex); - MutexLocker locker(mutex); diff --git a/package/qt/qt-4.7.4-simplegl.patch b/package/qt/qt-4.7.4-simplegl.patch index 3236971512..ddbff94566 100755 --- a/package/qt/qt-4.7.4-simplegl.patch +++ b/package/qt/qt-4.7.4-simplegl.patch @@ -1,9 +1,10 @@ --- qt-4.7.4-org/src/plugins/gfxdrivers/gfxdrivers.pro 2011-09-12 02:49:28.000000000 -0400 +++ qt-4.7.4-mod/src/plugins/gfxdrivers/gfxdrivers.pro 2012-02-07 17:37:13.963125281 -0500 -@@ -7,3 +7,5 @@ contains(gfx-plugins, vnc) :SUBDIRS +@@ -7,4 +7,6 @@ contains(gfx-plugins, vnc) :SUBDIRS contains(gfx-plugins, transformed) :SUBDIRS += transformed contains(gfx-plugins, svgalib) :SUBDIRS += svgalib contains(gfx-plugins, powervr) :SUBDIRS += powervr + contains(gfx-plugins, eglnullws) :SUBDIRS += eglnullws +contains(gfx-plugins, simplegl) :SUBDIRS += simplegl + --- qt-4.7.4-org/src/plugins/gfxdrivers/simplegl/LICENSE.LGPL 1969-12-31 19:00:00.000000000 -0500 diff --git a/package/qt/qt-configure.patch b/package/qt/qt-configure.patch new file mode 100644 index 0000000000..07c9630c90 --- /dev/null +++ b/package/qt/qt-configure.patch @@ -0,0 +1,52 @@ +Fix -hostprefix behaviour + +When -hostprefix ./configure option is used, Qt installs all its +headers, libraries and binaries inside the given host prefix, instead +of the prefix. This is used by Buildroot to make sure that all Qt +libraries and headers are installed in $(STAGING_DIR). + +Qt ./configure script also allows to tune the installation location of +various elements, for examples the plugins through the -plugindir +option. Unfortunately, this option only impact the installation path +on the target, but not on the host when -hostprefix is used. + +This patch modifies Qt ./configure script so that HOST_*PATH_STR +variables are composed of the host prefix concatenated with the path +of installation on the target. This way, the plugin installation local +in the $(STAGING_DIR) and on the target remains the same. + +Signed-off-by: Thomas Petazzoni + +--- + configure | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +Index: qt-everywhere-opensource-src-4.8.1/configure +=================================================================== +--- qt-everywhere-opensource-src-4.8.1.orig/configure ++++ qt-everywhere-opensource-src-4.8.1/configure +@@ -4661,15 +4661,15 @@ + + + if [ ! -z "$QT_HOST_PREFIX" ]; then +- HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"` +- HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"` +- HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"` +- HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"` +- HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"` +- HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"` +- HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"` +- HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"` +- HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"` ++ HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX/$QT_INSTALL_PREFIX"` ++ HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/$QT_INSTALL_DOCS"` ++ HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/$QT_INSTALL_HEADERS"` ++ HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/$QT_INSTALL_LIBS"` ++ HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/$QT_INSTALL_BINS"` ++ HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/$QT_INSTALL_PLUGINS"` ++ HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/$QT_INSTALL_IMPORTS"` ++ HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX/$QT_INSTALL_DATA"` ++ HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/$QT_INSTALL_TRANSLATIONS"` + HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"` + HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"` + HOSTDEMOS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"` diff --git a/package/qt/qt-eglwsegl-use-system.patch b/package/qt/qt-eglwsegl-use-system.patch new file mode 100644 index 0000000000..cb3038138f --- /dev/null +++ b/package/qt/qt-eglwsegl-use-system.patch @@ -0,0 +1,802 @@ +Patch to remove obsolete powervr headers and instead use the headers provided +on the system. + +Signed-off-by: Spenser Gilliland +--- +Index: qt-4.8.5/src/3rdparty/powervr/pvr2d.h +=================================================================== +--- qt-4.8.5.orig/src/3rdparty/powervr/pvr2d.h 2013-07-08 11:24:33.010516867 -0500 ++++ /dev/null 1970-01-01 00:00:00.000000000 +0000 +@@ -1,502 +0,0 @@ +-/*!**************************************************************************** +-@File pvr2d.h +-@Title PVR2D external header file +-@Author Imagination Technologies +-@Copyright Copyright (c) by Imagination Technologies Limited. +- This specification is protected by copyright laws and contains +- material proprietary to Imagination Technologies Limited. +- You may use and distribute this specification free of charge for implementing +- the functionality therein, without altering or removing any trademark, copyright, +- or other notice from the specification. +-@Platform Generic +-@Description PVR2D definitions for PVR2D clients +-******************************************************************************/ +- +- +-/****************************************************************************** +-Modifications :- +-$Log: pvr2d.h $ +-******************************************************************************/ +- +-#ifndef _PVR2D_H_ +-#define _PVR2D_H_ +- +-#ifdef __cplusplus +-extern "C" { +-#endif +- +-/* PVR2D Platform-specific definitions */ +-#define PVR2D_EXPORT +-#define PVR2D_IMPORT +- +- +-#define PVR2D_REV_MAJOR 2 +-#define PVR2D_REV_MINOR 1 +- +-typedef enum +-{ +- PVR2D_FALSE = 0, +- PVR2D_TRUE +-} PVR2D_BOOL; +- +- +-/* error codes */ +-typedef enum +-{ +- PVR2D_OK = 0, +- PVR2DERROR_INVALID_PARAMETER = -1, +- PVR2DERROR_DEVICE_UNAVAILABLE = -2, +- PVR2DERROR_INVALID_CONTEXT = -3, +- PVR2DERROR_MEMORY_UNAVAILABLE = -4, +- PVR2DERROR_DEVICE_NOT_PRESENT = -5, +- PVR2DERROR_IOCTL_ERROR = -6, +- PVR2DERROR_GENERIC_ERROR = -7, +- PVR2DERROR_BLT_NOTCOMPLETE = -8, +- PVR2DERROR_HW_FEATURE_NOT_SUPPORTED = -9, +- PVR2DERROR_NOT_YET_IMPLEMENTED = -10, +- PVR2DERROR_MAPPING_FAILED = -11 +-}PVR2DERROR; +- +- +-/* pixel formats */ +-typedef enum +-{ +- PVR2D_1BPP = 0, +- PVR2D_RGB565, +- PVR2D_ARGB4444, +- PVR2D_RGB888, +- PVR2D_ARGB8888, +- PVR2D_ARGB1555, +- PVR2D_ALPHA8, +- PVR2D_ALPHA4, +- PVR2D_PAL2, +- PVR2D_PAL4, +- PVR2D_PAL8, +- PVR2D_VGAEMU +- +-}PVR2DFORMAT; +- +- +-/* wrap surface type */ +-typedef enum +-{ +- PVR2D_WRAPFLAG_NONCONTIGUOUS = 0, +- PVR2D_WRAPFLAG_CONTIGUOUS = 1, +- +-}PVR2DWRAPFLAGS; +- +-/* flags for control information of additional blits */ +-typedef enum +-{ +- PVR2D_BLIT_DISABLE_ALL = 0x0000, /* disable all additional controls */ +- PVR2D_BLIT_CK_ENABLE = 0x0001, /* enable colour key */ +- PVR2D_BLIT_GLOBAL_ALPHA_ENABLE = 0x0002, /* enable standard global alpha */ +- PVR2D_BLIT_PERPIXEL_ALPHABLEND_ENABLE = 0x0004, /* enable per-pixel alpha bleding */ +- PVR2D_BLIT_PAT_SURFACE_ENABLE = 0x0008, /* enable pattern surf (disable fill) */ +- PVR2D_BLIT_FULLY_SPECIFIED_ALPHA_ENABLE = 0x0010, /* enable fully specified alpha */ +- PVR2D_BLIT_ROT_90 = 0x0020, /* apply 90 degree rotation to the blt */ +- PVR2D_BLIT_ROT_180 = 0x0040, /* apply 180 degree rotation to the blt */ +- PVR2D_BLIT_ROT_270 = 0x0080, /* apply 270 degree rotation to the blt */ +- PVR2D_BLIT_COPYORDER_TL2BR = 0x0100, /* copy order overrides */ +- PVR2D_BLIT_COPYORDER_BR2TL = 0x0200, +- PVR2D_BLIT_COPYORDER_TR2BL = 0x0400, +- PVR2D_BLIT_COPYORDER_BL2TR = 0x0800, +- PVR2D_BLIT_COLKEY_SOURCE = 0x1000, /* Key colour is on the source surface */ +- PVR2D_BLIT_COLKEY_DEST = 0x2000 /* Key colour is on the destination surface */ +- +-} PVR2DBLITFLAGS; +- +-/* standard alpha-blending functions, AlphaBlendingFunc field of PVR2DBLTINFO */ +-typedef enum +-{ +- PVR2D_ALPHA_OP_SRC_DSTINV = 1, /* source alpha : Cdst = Csrc*Asrc + Cdst*(1-Asrc) */ +- PVR2D_ALPHA_OP_SRCP_DSTINV = 2 /* premultiplied source alpha : Cdst = Csrc + Cdst*(1-Asrc) */ +-} PVR2D_ALPHABLENDFUNC; +- +-/* blend ops for fully specified alpha */ +-typedef enum +-{ +- PVR2D_BLEND_OP_ZERO = 0, +- PVR2D_BLEND_OP_ONE = 1, +- PVR2D_BLEND_OP_SRC = 2, +- PVR2D_BLEND_OP_DST = 3, +- PVR2D_BLEND_OP_GLOBAL = 4, +- PVR2D_BLEND_OP_SRC_PLUS_GLOBAL = 5, +- PVR2D_BLEND_OP_DST_PLUS_GLOBAL = 6 +-}PVR2D_BLEND_OP; +- +- +-typedef void* PVR2D_HANDLE; +- +- +-/* Fully specified alpha blend : pAlpha field of PVR2DBLTINFO structure */ +-/* a fully specified Alpha Blend operation is defined as */ +-/* DST (ALPHA) = (ALPHA_1 * SRC (ALPHA)) + (ALPHA_3 * DST (ALPHA)) */ +-/* DST (RGB) = (ALPHA_2 * SRC (RGB)) + (ALPHA_4 * DST (RGB)) */ +-/* if the pre-multiplication stage is enabled then the equations become the following: */ +-/* PRE_MUL = ((SRC(A)) * (Global Alpha Value)) */ +-/* DST (ALPHA) = (ALPHA_1 * SRC (ALPHA)) + (PRE_MUL * DST (ALPHA)) */ +-/* DST (RGB) = (ALPHA_2 * SRC (RGB)) + (PRE_MUL * DST (RGB)) */ +-/* if the transparent source alpha stage is enabled then a source alpha of zero forces the */ +-/* source to be transparent for that pixel regardless of the blend equation being used. */ +-typedef struct _PVR2D_ALPHABLT +-{ +- PVR2D_BLEND_OP eAlpha1; +- PVR2D_BOOL bAlpha1Invert; +- PVR2D_BLEND_OP eAlpha2; +- PVR2D_BOOL bAlpha2Invert; +- PVR2D_BLEND_OP eAlpha3; +- PVR2D_BOOL bAlpha3Invert; +- PVR2D_BLEND_OP eAlpha4; +- PVR2D_BOOL bAlpha4Invert; +- PVR2D_BOOL bPremulAlpha; /* enable pre-multiplication stage */ +- PVR2D_BOOL bTransAlpha; /* enable transparent source alpha stage */ +- PVR2D_BOOL bUpdateAlphaLookup; /* enable and update the 1555-Lookup alpha table */ +- unsigned char uAlphaLookup0; /* 8 bit alpha when A=0 in a 1555-Lookup surface */ +- unsigned char uAlphaLookup1; /* 8 bit alpha when A=1 in a 1555-Lookup surface */ +- unsigned char uGlobalRGB; /* Global Alpha Value for RGB, 0=transparent 255=opaque */ +- unsigned char uGlobalA; /* Global Alpha Value for Alpha */ +- +-} PVR2D_ALPHABLT, *PPVR2D_ALPHABLT; +- +- +-/* surface memory info structure */ +-typedef struct _PVR2DMEMINFO +-{ +- void *pBase; +- unsigned long ui32MemSize; +- unsigned long ui32DevAddr; +- unsigned long ulFlags; +- void *hPrivateData; +- void *hPrivateMapData; +- +-}PVR2DMEMINFO, *PPVR2DMEMINFO; +- +- +-#define PVR2D_MAX_DEVICE_NAME 20 +- +-typedef struct _PVR2DDEVICEINFO +-{ +- unsigned long ulDevID; +- char szDeviceName[PVR2D_MAX_DEVICE_NAME]; +-}PVR2DDEVICEINFO; +- +- +-typedef struct _PVR2DISPLAYINFO +-{ +- unsigned long ulMaxFlipChains; +- unsigned long ulMaxBuffersInChain; +- PVR2DFORMAT eFormat; +- unsigned long ulWidth; +- unsigned long ulHeight; +- long lStride; +- unsigned long ulMinFlipInterval; +- unsigned long ulMaxFlipInterval; +- +-}PVR2DDISPLAYINFO; +- +- +-typedef struct _PVR2DBLTINFO +-{ +- unsigned long CopyCode; /* rop code */ +- unsigned long Colour; /* fill colour */ +- unsigned long ColourKey; /* colour key */ +- unsigned char GlobalAlphaValue; /* global alpha blending */ +- unsigned char AlphaBlendingFunc; /* per-pixel alpha-blending function */ +- +- PVR2DBLITFLAGS BlitFlags; /* additional blit control information */ +- +- PVR2DMEMINFO *pDstMemInfo; /* destination memory */ +- unsigned long DstOffset; /* byte offset from start of allocation to destination surface pixel 0,0 */ +- long DstStride; /* signed stride, the number of bytes from pixel 0,0 to 0,1 */ +- long DstX, DstY; /* pixel offset from start of dest surface to start of blt rectangle */ +- long DSizeX,DSizeY; /* blt size */ +- PVR2DFORMAT DstFormat; /* dest format */ +- unsigned long DstSurfWidth; /* size of dest surface in pixels */ +- unsigned long DstSurfHeight; /* size of dest surface in pixels */ +- +- PVR2DMEMINFO *pSrcMemInfo; /* source mem, (source fields are also used for patterns) */ +- unsigned long SrcOffset; /* byte offset from start of allocation to src/pat surface pixel 0,0 */ +- long SrcStride; /* signed stride, the number of bytes from pixel 0,0 to 0,1 */ +- long SrcX, SrcY; /* pixel offset from start of surface to start of source rectangle */ +- /* for patterns this is the start offset within the pattern */ +- long SizeX,SizeY; /* source rectangle size or pattern size in pixels */ +- PVR2DFORMAT SrcFormat; /* source/pattern format */ +- PVR2DMEMINFO *pPalMemInfo; /* source/pattern palette memory containing argb8888 colour table */ +- unsigned long PalOffset; /* byte offset from start of allocation to start of palette */ +- unsigned long SrcSurfWidth; /* size of source surface in pixels */ +- unsigned long SrcSurfHeight; /* size of source surface in pixels */ +- +- PVR2DMEMINFO *pMaskMemInfo; /* mask memory, 1bpp format implied */ +- unsigned long MaskOffset; /* byte offset from start of allocation to mask surface pixel 0,0 */ +- long MaskStride; /* signed stride, the number of bytes from pixel 0,0 to 0,1 */ +- long MaskX, MaskY; /* mask rect top left (mask size = blt size) */ +- unsigned long MaskSurfWidth; /* size of mask surface in pixels */ +- unsigned long MaskSurfHeight; /* size of mask surface in pixels */ +- +- PPVR2D_ALPHABLT pAlpha; /* fully specified alpha blend */ +- +-}PVR2DBLTINFO, *PPVR2DBLTINFO; +- +-typedef struct _PVR2DRECT +-{ +- long left, top; +- long right, bottom; +-} PVR2DRECT; +- +-typedef struct +-{ +- PVR2DMEMINFO *pSurfMemInfo; /* surface memory */ +- unsigned long SurfOffset; /* byte offset from start of allocation to destination surface pixel 0,0 */ +- long Stride; /* signed stride */ +- PVR2DFORMAT Format; +- unsigned long SurfWidth; /* surface size in pixels */ +- unsigned long SurfHeight; +- +-} PVR2D_SURFACE, *PPVR2D_SURFACE; +- +-typedef struct +-{ +- unsigned long *pUseCode; /* USSE code */ +- unsigned long UseCodeSize; /* usse code size in bytes */ +- +-} PVR2D_USECODE, *PPVR2D_USECODE; +- +-typedef struct +-{ +- PVR2D_SURFACE sDst; /* destination surface */ +- PVR2D_SURFACE sSrc; /* source surface */ +- PVR2DRECT rcDest; /* destination rectangle */ +- PVR2DRECT rcSource; /* source rectangle */ +- PVR2D_HANDLE hUseCode; /* custom USE code (NULL implies source copy) */ +- unsigned long UseParams[2]; /* per-blt params for use code */ +- +-} PVR2D_3DBLT, *PPVR2D_3DBLT; +- +- +-#define MAKE_COPY_BLIT(src,soff,dest,doff,sx,sy,dx,dy,sz) +- +-typedef void* PVR2DCONTEXTHANDLE; +-typedef void* PVR2DFLIPCHAINHANDLE; +- +- +-// CopyCode field of PVR2DBLTINFO structure: +-// the CopyCode field of the PVR2DBLTINFO structure should contain a rop3 or rop4 code. +-// a rop3 is an 8 bit code that describes a blt with three inputs : source dest and pattern +-// rop4 is a 16 bit code that describes a blt with four inputs : source dest pattern and mask +-// common rop3 codes are defined below +-// a colour fill blt is processed in the pattern channel as a constant colour with a rop code of 0xF0 +-// PVR2D_BLIT_PAT_SURFACE_ENABLE defines whether the pattern channel is a surface or a fill colour. +-// a rop4 is defined by two rop3 codes, and the 1 bit-per-pixel mask surface defines which is used. +-// a common rop4 is 0xAAF0 which is the mask copy blt used for text glyphs. +-// CopyCode is taken to be a rop4 when pMaskMemInfo is non zero, otherwise it is assumed to be a rop3 +-// use the PVR2DMASKROP4 macro below to construct a rop4 from two rop3's +-// rop3a is the rop used when mask pixel = 1, and rop3b when mask = 0 +-#define PVR2DROP4(rop3b, rop3a) ((rop3b<<8)|rop3a) +- +-/* common rop codes */ +-#define PVR2DROPclear 0x00 /* 0 (whiteness) */ +-#define PVR2DROPset 0xFF /* 1 (blackness) */ +-#define PVR2DROPnoop 0xAA /* dst (used for masked blts) */ +- +-/* source and dest rop codes */ +-#define PVR2DROPand 0x88 /* src AND dst */ +-#define PVR2DROPandReverse 0x44 /* src AND NOT dst */ +-#define PVR2DROPcopy 0xCC /* src (used for source copy and alpha blts) */ +-#define PVR2DROPandInverted 0x22 /* NOT src AND dst */ +-#define PVR2DROPxor 0x66 /* src XOR dst */ +-#define PVR2DROPor 0xEE /* src OR dst */ +-#define PVR2DROPnor 0x11 /* NOT src AND NOT dst */ +-#define PVR2DROPequiv 0x99 /* NOT src XOR dst */ +-#define PVR2DROPinvert 0x55 /* NOT dst */ +-#define PVR2DROPorReverse 0xDD /* src OR NOT dst */ +-#define PVR2DROPcopyInverted 0x33 /* NOT src */ +-#define PVR2DROPorInverted 0xBB /* NOT src OR dst */ +-#define PVR2DROPnand 0x77 /* NOT src OR NOT dst */ +- +-/* pattern rop codes */ +-#define PVR2DPATROPand 0xA0 /* pat AND dst */ +-#define PVR2DPATROPandReverse 0x50 /* pat AND NOT dst */ +-#define PVR2DPATROPcopy 0xF0 /* pat (used for solid color fills and pattern blts) */ +-#define PVR2DPATROPandInverted 0x0A /* NOT pat AND dst */ +-#define PVR2DPATROPxor 0x5A /* pat XOR dst */ +-#define PVR2DPATROPor 0xFA /* pat OR dst */ +-#define PVR2DPATROPnor 0x05 /* NOT pat AND NOT dst */ +-#define PVR2DPATROPequiv 0xA5 /* NOT pat XOR dst */ +-#define PVR2DPATROPinvert 0x55 /* NOT dst */ +-#define PVR2DPATROPorReverse 0xF5 /* pat OR NOT dst */ +-#define PVR2DPATROPcopyInverted 0x0F /* NOT pat */ +-#define PVR2DPATROPorInverted 0xAF /* NOT pat OR dst */ +-#define PVR2DPATROPnand 0x5F /* NOT pat OR NOT dst */ +- +-/* common rop4 codes */ +-#define PVR2DROP4MaskedCopy PVR2DROP4(PVR2DROPnoop,PVR2DROPcopy) /* masked source copy blt (used for rounded window corners etc) */ +-#define PVR2DROP4MaskedFill PVR2DROP4(PVR2DROPnoop,PVR2DPATROPcopy) /* masked colour fill blt (used for text) */ +- +-/* Legacy support */ +-#define PVR2DROP3_PATMASK PVR2DPATROPcopy +-#define PVR2DROP3_SRCMASK PVR2DROPcopy +- +-/* pixmap memory alignment */ +-#define PVR2D_ALIGNMENT_4 4 /* DWORD alignment */ +-#define PVR2D_ALIGNMENT_ANY 0 /* no alignment */ +-#define PVR2D_ALIGNMENT_PALETTE 16 /* 16 byte alignment is required for palettes */ +- +-/* Heap number for PVR2DGetFrameBuffer */ +-#define PVR2D_FB_PRIMARY_SURFACE 0 +- +-#define PVR2D_PRESENT_PROPERTY_SRCSTRIDE (1 << 0) +-#define PVR2D_PRESENT_PROPERTY_DSTSIZE (1 << 1) +-#define PVR2D_PRESENT_PROPERTY_DSTPOS (1 << 2) +-#define PVR2D_PRESENT_PROPERTY_CLIPRECTS (1 << 3) +-#define PVR2D_PRESENT_PROPERTY_INTERVAL (1 << 4) +- +- +-#define PVR2D_CREATE_FLIPCHAIN_SHARED (1 << 0) +-#define PVR2D_CREATE_FLIPCHAIN_QUERY (1 << 1) +- +-/* Functions that the library exports */ +- +-PVR2D_IMPORT +-int PVR2DEnumerateDevices(PVR2DDEVICEINFO *pDevInfo); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DCreateDeviceContext(unsigned long ulDevID, +- PVR2DCONTEXTHANDLE* phContext, +- unsigned long ulFlags); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DDestroyDeviceContext(PVR2DCONTEXTHANDLE hContext); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DGetDeviceInfo(PVR2DCONTEXTHANDLE hContext, +- PVR2DDISPLAYINFO *pDisplayInfo); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DGetScreenMode(PVR2DCONTEXTHANDLE hContext, +- PVR2DFORMAT *pFormat, +- long *plWidth, +- long *plHeight, +- long *plStride, +- int *piRefreshRate); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DGetFrameBuffer(PVR2DCONTEXTHANDLE hContext, +- int nHeap, +- PVR2DMEMINFO **ppsMemInfo); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DMemAlloc(PVR2DCONTEXTHANDLE hContext, +- unsigned long ulBytes, +- unsigned long ulAlign, +- unsigned long ulFlags, +- PVR2DMEMINFO **ppsMemInfo); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DMemWrap(PVR2DCONTEXTHANDLE hContext, +- void *pMem, +- unsigned long ulFlags, +- unsigned long ulBytes, +- unsigned long alPageAddress[], +- PVR2DMEMINFO **ppsMemInfo); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DMemMap(PVR2DCONTEXTHANDLE hContext, +- unsigned long ulFlags, +- void *hPrivateMapData, +- PVR2DMEMINFO **ppsDstMem); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DMemFree(PVR2DCONTEXTHANDLE hContext, +- PVR2DMEMINFO *psMemInfo); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DBlt(PVR2DCONTEXTHANDLE hContext, +- PVR2DBLTINFO *pBltInfo); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DBltClipped(PVR2DCONTEXTHANDLE hContext, +- PVR2DBLTINFO *pBltInfo, +- unsigned long ulNumClipRects, +- PVR2DRECT *pClipRects); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DQueryBlitsComplete(PVR2DCONTEXTHANDLE hContext, +- PVR2DMEMINFO *pMemInfo, +- unsigned int uiWaitForComplete); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DSetPresentBltProperties(PVR2DCONTEXTHANDLE hContext, +- unsigned long ulPropertyMask, +- long lSrcStride, +- unsigned long ulDstWidth, +- unsigned long ulDstHeight, +- long lDstXPos, +- long lDstYPos, +- unsigned long ulNumClipRects, +- PVR2DRECT *pClipRects, +- unsigned long ulSwapInterval); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DPresentBlt(PVR2DCONTEXTHANDLE hContext, +- PVR2DMEMINFO *pMemInfo, +- long lRenderID); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DCreateFlipChain(PVR2DCONTEXTHANDLE hContext, +- unsigned long ulFlags, +- unsigned long ulNumBuffers, +- unsigned long ulWidth, +- unsigned long ulHeight, +- PVR2DFORMAT eFormat, +- long *plStride, +- unsigned long *pulFlipChainID, +- PVR2DFLIPCHAINHANDLE *phFlipChain); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DDestroyFlipChain(PVR2DCONTEXTHANDLE hContext, +- PVR2DFLIPCHAINHANDLE hFlipChain); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DGetFlipChainBuffers(PVR2DCONTEXTHANDLE hContext, +- PVR2DFLIPCHAINHANDLE hFlipChain, +- unsigned long *pulNumBuffers, +- PVR2DMEMINFO *psMemInfo[]); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DSetPresentFlipProperties(PVR2DCONTEXTHANDLE hContext, +- PVR2DFLIPCHAINHANDLE hFlipChain, +- unsigned long ulPropertyMask, +- long lDstXPos, +- long lDstYPos, +- unsigned long ulNumClipRects, +- PVR2DRECT *pClipRects, +- unsigned long ulSwapInterval); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DPresentFlip(PVR2DCONTEXTHANDLE hContext, +- PVR2DFLIPCHAINHANDLE hFlipChain, +- PVR2DMEMINFO *psMemInfo, +- long lRenderID); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DGetAPIRev(long *lRevMajor, long *lRevMinor); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DLoadUseCode (const PVR2DCONTEXTHANDLE hContext, const unsigned char *pUseCode, +- const unsigned long UseCodeSize, PVR2D_HANDLE *pUseCodeHandle); +-PVR2D_IMPORT +-PVR2DERROR PVR2DFreeUseCode (const PVR2DCONTEXTHANDLE hContext, const PVR2D_HANDLE hUseCodeHandle); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DBlt3D (const PVR2DCONTEXTHANDLE hContext, const PPVR2D_3DBLT pBlt3D); +- +-#ifdef __cplusplus +-} +-#endif +- +-#endif /* _PVR2D_H_ */ +- +-/****************************************************************************** +- End of file (pvr2d.h) +-******************************************************************************/ +Index: qt-4.8.5/src/3rdparty/powervr/wsegl.h +=================================================================== +--- qt-4.8.5.orig/src/3rdparty/powervr/wsegl.h 2013-07-08 11:24:33.010516867 -0500 ++++ /dev/null 1970-01-01 00:00:00.000000000 +0000 +@@ -1,240 +0,0 @@ +-/****************************************************************************** +- Name : wsegl.h +- Copyright : Copyright (c) Imagination Technologies Limited. +- This specification is protected by copyright laws and contains +- material proprietary to Imagination Technologies Limited. +- You may use and distribute this specification free of charge for implementing +- the functionality therein, without altering or removing any trademark, copyright, +- or other notice from the specification. +- Platform : ANSI +-*****************************************************************************/ +- +- +-#if !defined(__WSEGL_H__) +-#define __WSEGL_H__ +- +-#ifdef __cplusplus +-extern "C" { +-#endif +- +-/* +-// WSEGL Platform-specific definitions +-*/ +-#define WSEGL_EXPORT +-#define WSEGL_IMPORT +- +-/* +-// WSEGL API Version Number +-*/ +- +-#define WSEGL_VERSION 1 +-#define WSEGL_DEFAULT_DISPLAY 0 +-#define WSEGL_DEFAULT_NATIVE_ENGINE 0 +- +-#define WSEGL_FALSE 0 +-#define WSEGL_TRUE 1 +-#define WSEGL_NULL 0 +- +-#define WSEGL_UNREFERENCED_PARAMETER(param) (param) = (param) +- +-/* +-// WSEGL handles +-*/ +-typedef void *WSEGLDisplayHandle; +-typedef void *WSEGLDrawableHandle; +- +-/* +-// Display capability type +-*/ +-typedef enum WSEGLCapsType_TAG +-{ +- WSEGL_NO_CAPS = 0, +- WSEGL_CAP_MIN_SWAP_INTERVAL = 1, /* System default value = 1 */ +- WSEGL_CAP_MAX_SWAP_INTERVAL = 2, /* System default value = 1 */ +- WSEGL_CAP_WINDOWS_USE_HW_SYNC = 3, /* System default value = 0 (FALSE) */ +- WSEGL_CAP_PIXMAPS_USE_HW_SYNC = 4, /* System default value = 0 (FALSE) */ +- +-} WSEGLCapsType; +- +-/* +-// Display capability +-*/ +-typedef struct WSEGLCaps_TAG +-{ +- WSEGLCapsType eCapsType; +- unsigned long ui32CapsValue; +- +-} WSEGLCaps; +- +-/* +-// Drawable type +-*/ +-#define WSEGL_NO_DRAWABLE 0x0 +-#define WSEGL_DRAWABLE_WINDOW 0x1 +-#define WSEGL_DRAWABLE_PIXMAP 0x2 +- +- +-/* +-// Pixel format of display/drawable +-*/ +-typedef enum WSEGLPixelFormat_TAG +-{ +- WSEGL_PIXELFORMAT_565 = 0, +- WSEGL_PIXELFORMAT_4444 = 1, +- WSEGL_PIXELFORMAT_8888 = 2, +- WSEGL_PIXELFORMAT_1555 = 3 +- +-} WSEGLPixelFormat; +- +-/* +-// Transparent of display/drawable +-*/ +-typedef enum WSEGLTransparentType_TAG +-{ +- WSEGL_OPAQUE = 0, +- WSEGL_COLOR_KEY = 1, +- +-} WSEGLTransparentType; +- +-/* +-// Display/drawable configuration +-*/ +-typedef struct WSEGLConfig_TAG +-{ +- /* +- // Type of drawables this configuration applies to - +- // OR'd values of drawable types. +- */ +- unsigned long ui32DrawableType; +- +- /* Pixel format */ +- WSEGLPixelFormat ePixelFormat; +- +- /* Native Renderable - set to WSEGL_TRUE if native renderable */ +- unsigned long ulNativeRenderable; +- +- /* FrameBuffer Level Parameter */ +- unsigned long ulFrameBufferLevel; +- +- /* Native Visual ID */ +- unsigned long ulNativeVisualID; +- +- /* Native Visual */ +- void *hNativeVisual; +- +- /* Transparent Type */ +- WSEGLTransparentType eTransparentType; +- +- /* Transparent Color - only used if transparent type is COLOR_KEY */ +- unsigned long ulTransparentColor; /* packed as 0x00RRGGBB */ +- +- +-} WSEGLConfig; +- +-/* +-// WSEGL errors +-*/ +-typedef enum WSEGLError_TAG +-{ +- WSEGL_SUCCESS = 0, +- WSEGL_CANNOT_INITIALISE = 1, +- WSEGL_BAD_NATIVE_DISPLAY = 2, +- WSEGL_BAD_NATIVE_WINDOW = 3, +- WSEGL_BAD_NATIVE_PIXMAP = 4, +- WSEGL_BAD_NATIVE_ENGINE = 5, +- WSEGL_BAD_DRAWABLE = 6, +- WSEGL_BAD_CONFIG = 7, +- WSEGL_OUT_OF_MEMORY = 8 +- +-} WSEGLError; +- +-/* +-// Drawable orientation (in degrees anti-clockwise) +-*/ +-typedef enum WSEGLRotationAngle_TAG +-{ +- WSEGL_ROTATE_0 = 0, +- WSEGL_ROTATE_90 = 1, +- WSEGL_ROTATE_180 = 2, +- WSEGL_ROTATE_270 = 3 +- +-} WSEGLRotationAngle; +- +-/* +-// Drawable information required by OpenGL-ES driver +-*/ +-typedef struct WSEGLDrawableParams_TAG +-{ +- /* Width in pixels of the drawable */ +- unsigned long ui32Width; +- +- /* Height in pixels of the drawable */ +- unsigned long ui32Height; +- +- /* Stride in pixels of the drawable */ +- unsigned long ui32Stride; +- +- /* Pixel format of the drawable */ +- WSEGLPixelFormat ePixelFormat; +- +- /* User space cpu virtual address of the drawable */ +- void *pvLinearAddress; +- +- /* HW address of the drawable */ +- unsigned long ui32HWAddress; +- +- /* Private data for the drawable */ +- void *hPrivateData; +- +-} WSEGLDrawableParams; +- +- +-/* +-// Table of function pointers that is returned by WSEGL_GetFunctionTablePointer() +-// +-// The first entry in the table is the version number of the wsegl.h header file that +-// the module has been written against, and should therefore be set to WSEGL_VERSION +-*/ +-typedef struct WSEGL_FunctionTable_TAG +-{ +- unsigned long ui32WSEGLVersion; +- +- WSEGLError (*pfnWSEGL_IsDisplayValid)(NativeDisplayType); +- +- WSEGLError (*pfnWSEGL_InitialiseDisplay)(NativeDisplayType, WSEGLDisplayHandle *, const WSEGLCaps **, WSEGLConfig **); +- +- WSEGLError (*pfnWSEGL_CloseDisplay)(WSEGLDisplayHandle); +- +- WSEGLError (*pfnWSEGL_CreateWindowDrawable)(WSEGLDisplayHandle, WSEGLConfig *, WSEGLDrawableHandle *, NativeWindowType, WSEGLRotationAngle *); +- +- WSEGLError (*pfnWSEGL_CreatePixmapDrawable)(WSEGLDisplayHandle, WSEGLConfig *, WSEGLDrawableHandle *, NativePixmapType, WSEGLRotationAngle *); +- +- WSEGLError (*pfnWSEGL_DeleteDrawable)(WSEGLDrawableHandle); +- +- WSEGLError (*pfnWSEGL_SwapDrawable)(WSEGLDrawableHandle, unsigned long); +- +- WSEGLError (*pfnWSEGL_SwapControlInterval)(WSEGLDrawableHandle, unsigned long); +- +- WSEGLError (*pfnWSEGL_WaitNative)(WSEGLDrawableHandle, unsigned long); +- +- WSEGLError (*pfnWSEGL_CopyFromDrawable)(WSEGLDrawableHandle, NativePixmapType); +- +- WSEGLError (*pfnWSEGL_CopyFromPBuffer)(void *, unsigned long, unsigned long, unsigned long, WSEGLPixelFormat, NativePixmapType); +- +- WSEGLError (*pfnWSEGL_GetDrawableParameters)(WSEGLDrawableHandle, WSEGLDrawableParams *, WSEGLDrawableParams *); +- +- +-} WSEGL_FunctionTable; +- +- +-WSEGL_IMPORT const WSEGL_FunctionTable *WSEGL_GetFunctionTablePointer(void); +- +-#ifdef __cplusplus +-} +-#endif +- +-#endif /* __WSEGL_H__ */ +- +-/****************************************************************************** +- End of file (wsegl.h) +-******************************************************************************/ +Index: qt-4.8.5/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c +=================================================================== +--- qt-4.8.5.orig/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c 2013-07-08 11:24:33.010516867 -0500 ++++ qt-4.8.5/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c 2013-07-08 11:28:26.142521123 -0500 +@@ -39,7 +39,7 @@ + ** + ****************************************************************************/ + +-#include ++#include + #include + #include + #include +@@ -379,6 +379,20 @@ + return WSEGL_SUCCESS; + } + ++/* Function stub for ConnectDrawable() */ ++static WSEGLError wseglConnectDrawable(WSEGLDrawableHandle hDrawable) ++{ ++ WSEGL_UNREFERENCED_PARAMETER(hDrawable); ++ return WSEGL_SUCCESS; ++} ++ ++/* Function stub for DisconnectDrawable() */ ++static WSEGLError wseglDisconnectDrawable(WSEGLDrawableHandle hDrawable) ++{ ++ WSEGL_UNREFERENCED_PARAMETER(hDrawable); ++ return WSEGL_SUCCESS; ++} ++ + static WSEGL_FunctionTable const wseglFunctions = { + WSEGL_VERSION, + wseglIsDisplayValid, +@@ -392,7 +406,9 @@ + wseglWaitNative, + wseglCopyFromDrawable, + wseglCopyFromPBuffer, +- wseglGetDrawableParameters ++ wseglGetDrawableParameters, ++ wseglConnectDrawable, ++ wseglDisconnectDrawable + }; + + /* Return the table of WSEGL functions to the EGL implementation */ diff --git a/package/qt/qt-fix-const-atomics.patch b/package/qt/qt-fix-const-atomics.patch new file mode 100644 index 0000000000..64853565e8 --- /dev/null +++ b/package/qt/qt-fix-const-atomics.patch @@ -0,0 +1,50 @@ +From d4d07dac01796b2aa0fb501c14865cab7e42b3a9 Mon Sep 17 00:00:00 2001 +From: Mischa Jonker +Date: Sun, 4 Nov 2012 11:42:04 +0100 +Subject: [PATCH] Fix const-related build error in generic atomic ops + +It's still not entirely const-correct though. In all other architectures +this is obfuscated through the use of inline asm (which the compiler +doesn't check). This patch obfuscates through const_cast +--- + src/corelib/arch/generic/qatomic_generic_unix.cpp | 8 ++++---- + src/corelib/arch/qatomic_generic.h | 2 +- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/corelib/arch/generic/qatomic_generic_unix.cpp b/src/corelib/arch/generic/qatomic_generic_unix.cpp +index 1c6cbf0..6fce81d 100644 +--- a/src/corelib/arch/generic/qatomic_generic_unix.cpp ++++ b/src/corelib/arch/generic/qatomic_generic_unix.cpp +@@ -85,13 +85,13 @@ int QBasicAtomicInt_fetchAndAddOrdered(volatile int *_q_value, int valueToAdd) + + Q_CORE_EXPORT + bool QBasicAtomicPointer_testAndSetOrdered(void * volatile *_q_value, +- void *expectedValue, +- void *newValue) ++ const void *expectedValue, ++ const void *newValue) + { + bool returnValue = false; + pthread_mutex_lock(&qAtomicMutex); + if (*_q_value == expectedValue) { +- *_q_value = newValue; ++ *_q_value = const_cast(newValue); + returnValue = true; + } + pthread_mutex_unlock(&qAtomicMutex); +diff --git a/src/corelib/arch/qatomic_generic.h b/src/corelib/arch/qatomic_generic.h +index 621a767..4c14679 100644 +--- a/src/corelib/arch/qatomic_generic.h ++++ b/src/corelib/arch/qatomic_generic.h +@@ -105,7 +105,7 @@ Q_CORE_EXPORT bool QBasicAtomicInt_testAndSetOrdered(volatile int *, int, int); + Q_CORE_EXPORT int QBasicAtomicInt_fetchAndStoreOrdered(volatile int *, int); + Q_CORE_EXPORT int QBasicAtomicInt_fetchAndAddOrdered(volatile int *, int); + +-Q_CORE_EXPORT bool QBasicAtomicPointer_testAndSetOrdered(void * volatile *, void *, void *); ++Q_CORE_EXPORT bool QBasicAtomicPointer_testAndSetOrdered(void * volatile *, const void *, const void *); + Q_CORE_EXPORT void *QBasicAtomicPointer_fetchAndStoreOrdered(void * volatile *, void *); + Q_CORE_EXPORT void *QBasicAtomicPointer_fetchAndAddOrdered(void * volatile *, qptrdiff); + +-- +1.7.0.4 + diff --git a/package/qt/qt-fix-polyline-drawing.patch b/package/qt/qt-fix-polyline-drawing.patch new file mode 100644 index 0000000000..d0c3d07375 --- /dev/null +++ b/package/qt/qt-fix-polyline-drawing.patch @@ -0,0 +1,145 @@ +From b7029fbd12c32e851ed7d81b692197176eb71d9e Mon Sep 17 00:00:00 2001 +From: Gunnar Sletta +Date: Thu, 4 Jul 2013 16:20:40 +1000 +Subject: [PATCH] Fix drawing of 0-width polylines from outside the devicerect. + +This was broken by a previous fix which aimed to fix gaps in +polylines with tiny line segments. The result was that we +skipped updating the origin point when stroke() didn't produce +pixels which accidentally included the case of the line +being completely outside the deviceRect. I fixed this +by returning the value of clipLine in drawLine to the caller +so we could still update the origin for this case. + +Task-number: QTBUG-31579 +Change-Id: Iac29436f042da7658bbeaf9370351dc6f2c95065 +(cherry picked from qtbase/900cccfd459fcbdbc4aa3d313afe12cfbf68fd87) +--- + src/gui/painting/qcosmeticstroker.cpp | 42 ++++++++++++++++++++++------------- + src/gui/painting/qcosmeticstroker_p.h | 2 +- + 2 files changed, 27 insertions(+), 17 deletions(-) + +diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp +index 0061ecb..4413170 100644 +--- a/src/gui/painting/qcosmeticstroker.cpp ++++ b/src/gui/painting/qcosmeticstroker.cpp +@@ -133,10 +133,15 @@ struct NoDasher { + + }; + ++/* ++ * The return value is the result of the clipLine() call performed at the start ++ * of each of the two functions, aka "false" means completely outside the devices ++ * rect. ++ */ + template +-static void drawLine(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps); ++static bool drawLine(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps); + template +-static void drawLineAA(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps); ++static bool drawLineAA(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps); + + inline void drawPixel(QCosmeticStroker *stroker, int x, int y, int coverage) + { +@@ -602,17 +607,20 @@ void QCosmeticStroker::drawPath(const QVectorPath &path) + caps |= CapEnd; + + QCosmeticStroker::Point last = this->lastPixel; +- stroke(this, p.x(), p.y(), p2.x(), p2.y(), caps); ++ bool unclipped = stroke(this, p.x(), p.y(), p2.x(), p2.y(), caps); + + /* fix for gaps in polylines with fastpen and aliased in a sequence + of points with small distances: if current point p2 has been dropped +- out, keep last non dropped point p. */ +- if (fastPenAliased) { +- if (last.x != lastPixel.x || last.y != lastPixel.y || +- points == begin + 2 || points == end - 2 ) { +- { +- p = p2; +- } ++ out, keep last non dropped point p. ++ ++ However, if the line was completely outside the devicerect, we ++ still need to update p to avoid drawing the line after this one from ++ a bad starting position. ++ */ ++ if (fastPenAliased && unclipped) { ++ if (last.x != lastPixel.x || last.y != lastPixel.y ++ || points == begin + 2 || points == end - 2) { ++ p = p2; + } + } else { + p = p2; +@@ -720,10 +728,10 @@ static inline void capAdjust(int caps, int &x1, int &x2, int &y, int yinc) + the drawing shifts from horizontal to vertical or back. + */ + template +-static void drawLine(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2, qreal ry2, int caps) ++static bool drawLine(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2, qreal ry2, int caps) + { + if (stroker->clipLine(rx1, ry1, rx2, ry2)) +- return; ++ return false; + + static const int half = 31; + int x1 = toF26Dot6(rx1) + half; +@@ -813,7 +821,7 @@ static void drawLine(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2, + } else { + // horizontal + if (!dx) +- return; ++ return true; + + QCosmeticStroker::Direction dir = QCosmeticStroker::LeftToRight; + +@@ -886,14 +894,15 @@ static void drawLine(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2, + } + } + stroker->lastPixel = last; ++ return true; + } + + + template +-static void drawLineAA(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2, qreal ry2, int caps) ++static bool drawLineAA(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2, qreal ry2, int caps) + { + if (stroker->clipLine(rx1, ry1, rx2, ry2)) +- return; ++ return false; + + int x1 = toF26Dot6(rx1); + int y1 = toF26Dot6(ry1); +@@ -967,7 +976,7 @@ static void drawLineAA(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx + } else { + // horizontal + if (!dx) +- return; ++ return true; + + int yinc = F16Dot16FixedDiv(dy, dx); + +@@ -1029,6 +1038,7 @@ static void drawLineAA(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx + drawPixel(stroker, x, (y>>16) + 1, alpha * alphaEnd >> 6); + } + } ++ return true; + } + + QT_END_NAMESPACE +diff --git a/src/gui/painting/qcosmeticstroker_p.h b/src/gui/painting/qcosmeticstroker_p.h +index 870738b..3216856 100644 +--- a/src/gui/painting/qcosmeticstroker_p.h ++++ b/src/gui/painting/qcosmeticstroker_p.h +@@ -56,7 +56,7 @@ QT_MODULE(Gui) + class QCosmeticStroker; + + +-typedef void (*StrokeLine)(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps); ++typedef bool (*StrokeLine)(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps); + + class QCosmeticStroker + { +-- +1.8.3.2 + diff --git a/package/qt/qt-pthread_getattr_np.patch b/package/qt/qt-pthread_getattr_np.patch new file mode 100644 index 0000000000..28f0c8411b --- /dev/null +++ b/package/qt/qt-pthread_getattr_np.patch @@ -0,0 +1,107 @@ +Add pthred_getattr_np / phread_attr_getstrack alternatives for uClibc + +Based on https://dev.openwrt.org/log/packages/Xorg/lib/qt4/patches/100-fix-webkit-for-uclibc.patch?rev=20371 + +Signed-off-by: Johan Sagaert +--- + src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp | 61 ++++++++++ + 1 file changed, 61 insertions(+) + +Index: qt-everywhere-opensource-src-4.8.1/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp +=================================================================== +--- qt-everywhere-opensource-src-4.8.1.orig/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp ++++ qt-everywhere-opensource-src-4.8.1/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp +@@ -70,6 +70,23 @@ + #endif + #include + ++#if defined(QT_LINUXBASE) ++#include ++#endif ++ ++#if defined(__UCLIBC__) ++// versions of uClibc 0.9.32 and below with linuxthreads.old do not have ++// pthread_getattr_np or pthread_attr_getstack. ++#if __UCLIBC_MAJOR__ == 0 && \ ++ (__UCLIBC_MINOR__ < 9 || \ ++ (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ <= 32)) && \ ++ defined(__LINUXTHREADS_OLD__) ++#define UCLIBC_USE_PROC_SELF_MAPS 1 ++#include ++extern int *__libc_stack_end; ++#endif ++#endif ++ + #if OS(SOLARIS) + #include + #else +@@ -648,6 +665,37 @@ + get_thread_info(find_thread(NULL), &threadInfo); + return threadInfo.stack_end; + #elif OS(UNIX) ++#ifdef UCLIBC_USE_PROC_SELF_MAPS ++ // Read /proc/self/maps and locate the line whose address ++ // range contains __libc_stack_end. ++ FILE *file = fopen("/proc/self/maps", "r"); ++ if (!file) ++ return 0; ++ __fsetlocking(file, FSETLOCKING_BYCALLER); ++ char *line = NULL; ++ size_t lineLen = 0; ++ while (!feof_unlocked(file)) { ++ if (getdelim(&line, &lineLen, '\n', file) <= 0) ++ break; ++ ++ long from; ++ long to; ++ if (sscanf (line, "%lx-%lx", &from, &to) != 2) ++ continue; ++ if (from <= (long)__libc_stack_end && (long)__libc_stack_end < to) { ++ fclose(file); ++ free(line); ++#ifdef _STACK_GROWS_UP ++ return (void *)from; ++#else ++ return (void *)to; ++#endif ++ } ++ } ++ fclose(file); ++ free(line); ++ return 0; ++#else + AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex); + MutexLocker locker(mutex); + static void* stackBase = 0; +@@ -655,11 +703,23 @@ + static pthread_t stackThread; + pthread_t thread = pthread_self(); + if (stackBase == 0 || thread != stackThread) { ++ ++#if defined(QT_LINUXBASE) ++ // LinuxBase is missing pthread_getattr_np - resolve it once at runtime instead ++ // see http://bugs.linuxbase.org/show_bug.cgi?id=2364 ++ typedef int (*GetAttrPtr)(pthread_t, pthread_attr_t *); ++ static int (*pthread_getattr_np_ptr)(pthread_t, pthread_attr_t *) = 0; ++ if (!pthread_getattr_np_ptr) ++ *(void **)&pthread_getattr_np_ptr = dlsym(RTLD_DEFAULT, "pthread_getattr_np"); ++#endif + pthread_attr_t sattr; + pthread_attr_init(&sattr); + #if HAVE(PTHREAD_NP_H) || OS(NETBSD) + // e.g. on FreeBSD 5.4, neundorf@kde.org + pthread_attr_get_np(thread, &sattr); ++#elif defined(QT_LINUXBASE) ++ if (pthread_getattr_np_ptr) ++ pthread_getattr_np_ptr(thread, &sattr); + #else + // FIXME: this function is non-portable; other POSIX systems may have different np alternatives + pthread_getattr_np(thread, &sattr); +@@ -671,6 +731,7 @@ + stackThread = thread; + } + return static_cast(stackBase) + stackSize; ++#endif + #else + #error Need a way to get the stack base on this platform + #endif diff --git a/package/qt/qt-4.7.4-script-qtdbus-no-gui.patch b/package/qt/qt-script-qtdbus-no-gui.patch similarity index 100% rename from package/qt/qt-4.7.4-script-qtdbus-no-gui.patch rename to package/qt/qt-script-qtdbus-no-gui.patch diff --git a/package/qt/qt-uClibc-lfs-fix.patch b/package/qt/qt-uClibc-lfs-fix.patch new file mode 100644 index 0000000000..ea04a607ea --- /dev/null +++ b/package/qt/qt-uClibc-lfs-fix.patch @@ -0,0 +1,41 @@ +From 6f88b27de256266947a7f6a3e70e18510754aab2 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Sat, 14 Apr 2012 20:36:07 +0200 +Subject: [PATCH] mkspecs/common/posix: fix !largefile builds on uClibc + +uClibc doesn't even define O_LARGEFILE when not configured with large file +support, so ensure this define is only used when Qt is built with +-largefile, otherwise the build fails with: + +io/qtemporaryfile.cpp: In function 'bool createFileFromTemplate( + NativeFileHandle&, QFileSystemEntry::NativePath&, size_t, size_t, + QSystemError&)': +io/qtemporaryfile.cpp:197:57: error: 'O_LARGEFILE' was not declared in + this scope + +Reported-Upstream: https://bugreports.qt-project.org/browse/QTBUG-25321 +Signed-off-by: Peter Korsgaard +--- + mkspecs/common/posix/qplatformdefs.h | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/mkspecs/common/posix/qplatformdefs.h b/mkspecs/common/posix/qplatformdefs.h +index daecc00..8a796cf 100644 +--- a/mkspecs/common/posix/qplatformdefs.h ++++ b/mkspecs/common/posix/qplatformdefs.h +@@ -123,7 +123,12 @@ + #define QT_READ ::read + #define QT_WRITE ::write + ++#ifdef QT_LARGEFILE_SUPPORT + #define QT_OPEN_LARGEFILE O_LARGEFILE ++#else ++#define QT_OPEN_LARGEFILE 0 ++#endif ++ + #define QT_OPEN_RDONLY O_RDONLY + #define QT_OPEN_WRONLY O_WRONLY + #define QT_OPEN_RDWR O_RDWR +-- +1.7.8.3 + diff --git a/package/qt/qt.mk b/package/qt/qt.mk index 3d63225b33..b740924006 100755 --- a/package/qt/qt.mk +++ b/package/qt/qt.mk @@ -1,7 +1,6 @@ -###################################################################### +################################################################################ # # Qt Embedded for Linux -# http://www.qtsoftware.com/ # # This makefile was originally composed by Thomas Lundquist # Later heavily modified by buildroot developers @@ -10,14 +9,20 @@ # the kernels FPU emulation so it's better to choose soft float in the # buildroot config (and uClibc.config of course, if you have your own.) # -###################################################################### +################################################################################ -QT_VERSION = 4.7.4 +QT_VERSION = 4.8.5 QT_SOURCE = qt-everywhere-opensource-src-$(QT_VERSION).tar.gz -QT_SITE = http://get.qt.nokia.com/qt/source - +QT_SITE = http://download.qt-project.org/official_releases/qt/4.8/$(QT_VERSION) +QT_DEPENDENCIES = host-pkgconf QT_INSTALL_STAGING = YES +QT_LICENSE = LGPLv2.1 with exceptions or GPLv3 +ifneq ($(BR2_PACKAGE_QT_LICENSE_APPROVED),y) +QT_LICENSE += or Digia Qt Commercial license +endif +QT_LICENSE_FILES = LICENSE.LGPL LGPL_EXCEPTION.txt LICENSE.GPL3 + ifeq ($(BR2_PACKAGE_QT_LICENSE_APPROVED),y) QT_CONFIGURE_OPTS += -opensource -confirm-license endif @@ -30,6 +35,7 @@ endif QT_CFLAGS = $(TARGET_CFLAGS) QT_CXXFLAGS = $(TARGET_CXXFLAGS) +QT_LDFLAGS = $(TARGET_LDFLAGS) ifeq ($(BR2_LARGEFILE),y) QT_CONFIGURE_OPTS += -largefile @@ -59,12 +65,15 @@ endif # ensure glib is built first if enabled for Qt's glib support ifeq ($(BR2_PACKAGE_LIBGLIB2),y) +QT_CONFIGURE_OPTS += -glib QT_DEPENDENCIES += libglib2 +else +QT_CONFIGURE_OPTS += -no-glib endif ### Pixel depths -QT_PIXEL_DEPTHS := # empty +QT_PIXEL_DEPTHS = # empty ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_1),y) QT_PIXEL_DEPTHS += 1 endif @@ -128,7 +137,11 @@ QT_DEPENDENCIES += directfb else QT_CONFIGURE_OPTS += -no-gfx-directfb endif - +ifeq ($(BR2_PACKAGE_QT_GFX_POWERVR),y) +QT_CONFIGURE_OPTS += \ + -plugin-gfx-powervr -D QT_NO_QWS_CURSOR -D QT_QWS_CLIENTBLIT +QT_DEPENDENCIES += powervr +endif ### Mouse drivers ifeq ($(BR2_PACKAGE_QT_MOUSE_PC),y) @@ -196,19 +209,20 @@ else QT_CONFIGURE_OPTS += -big-endian endif -ifeq ($(BR2_arm),y) -QT_EMB_PLATFORM = arm -else ifeq ($(BR2_armeb),y) +ifeq ($(BR2_arm)$(BR2_armeb),y) QT_EMB_PLATFORM = arm +ifeq ($(BR2_GCC_VERSION_4_6_X),y) +# workaround for gcc issue +# http://gcc.gnu.org/ml/gcc-patches/2010-11/msg02245.html +QT_CXXFLAGS += -fno-strict-volatile-bitfields +endif else ifeq ($(BR2_avr32),y) QT_EMB_PLATFORM = avr32 else ifeq ($(BR2_i386),y) QT_EMB_PLATFORM = x86 else ifeq ($(BR2_x86_64),y) QT_EMB_PLATFORM = x86_64 -else ifeq ($(BR2_mips),y) -QT_EMB_PLATFORM = mips -else ifeq ($(BR2_mipsel),y) +else ifeq ($(BR2_mips)$(BR2_mipsel),y) QT_EMB_PLATFORM = mips else ifeq ($(BR2_powerpc),y) QT_EMB_PLATFORM = powerpc @@ -222,9 +236,7 @@ ifneq ($(BR2_PACKAGE_QT_GUI_MODULE),y) QT_CONFIGURE_OPTS += -no-gui endif -ifeq ($(BR2_PACKAGE_QT_GIF),y) -QT_CONFIGURE_OPTS += -qt-gif -else +ifneq ($(BR2_PACKAGE_QT_GIF),y) QT_CONFIGURE_OPTS += -no-gif endif @@ -306,6 +318,16 @@ else QT_CONFIGURE_OPTS += -no-openssl endif +ifeq ($(BR2_PACKAGE_QT_OPENGL_ES),y) +QT_CONFIGURE_OPTS += -opengl es2 -egl +QT_DEPENDENCIES += libgles libegl +QT_CFLAGS += $(shell $(PKG_CONFIG_HOST_BINARY) --cflags egl) +QT_CXXFLAGS += $(shell $(PKG_CONFIG_HOST_BINARY) --cflags egl) +QT_LDFLAGS += $(shell $(PKG_CONFIG_HOST_BINARY) --libs egl) +else +QT_CONFIGURE_OPTS += -no-opengl +endif + # Qt SQL Drivers ifeq ($(BR2_PACKAGE_QT_SQL_MODULE),y) ifeq ($(BR2_PACKAGE_QT_IBASE),y) @@ -397,12 +419,6 @@ else QT_CONFIGURE_OPTS += -no-scripttools endif -ifeq ($(BR2_PACKAGE_QT_JAVASCRIPTCORE),y) -QT_CONFIGURE_OPTS += -javascript-jit -else -QT_CONFIGURE_OPTS += -no-javascript-jit -endif - ifeq ($(BR2_PACKAGE_QT_STL),y) QT_CONFIGURE_OPTS += -stl else @@ -421,10 +437,10 @@ ifeq ($(BR2_PACKAGE_OPENGL),y) //QT_CONFIGURE_LIBS_EGL = -ldbus-1 -lEGL -lMali endif -# ccache and precompiled headers don't play well together -ifeq ($(BR2_CCACHE),y) +# -no-pch is needed to workaround the issue described at +# http://comments.gmane.org/gmane.comp.lib.qt.devel/5933. +# In addition, ccache and precompiled headers don't play well together QT_CONFIGURE_OPTS += -no-pch -endif # x86x86fix # Workaround Qt Embedded bug when crosscompiling for x86 under x86 with linux @@ -437,7 +453,7 @@ endif # End of workaround. # Variable for other Qt applications to use -QT_QMAKE:=$(HOST_DIR)/usr/bin/qmake -spec qws/linux-$(QT_EMB_PLATFORM)-g++ +QT_QMAKE = $(HOST_DIR)/usr/bin/qmake -spec qws/linux-$(QT_EMB_PLATFORM)-g++ ################################################################################ # QT_QMAKE_SET -- helper macro to set = in @@ -484,7 +500,7 @@ define QT_CONFIGURE_CMDS $(call QT_QMAKE_SET,QMAKE_STRIP,$(TARGET_STRIP),$(@D)) $(call QT_QMAKE_SET,QMAKE_CFLAGS,$(QT_CFLAGS),$(@D)) $(call QT_QMAKE_SET,QMAKE_CXXFLAGS,$(QT_CXXFLAGS),$(@D)) - $(call QT_QMAKE_SET,QMAKE_LFLAGS,$(TARGET_LDFLAGS),$(@D)) + $(call QT_QMAKE_SET,QMAKE_LFLAGS,$(QT_LDFLAGS),$(@D)) $(call QT_QMAKE_SET,PKG_CONFIG,$(HOST_DIR)/usr/bin/pkg-config,$(@D)) $(call QT_QMAKE_SET,QMAKE_LIBS_EGL,$(QT_CONFIGURE_LIBS_EGL),$(@D)) # Don't use TARGET_CONFIGURE_OPTS here, qmake would be compiled for the target @@ -493,13 +509,10 @@ define QT_CONFIGURE_CMDS PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \ PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \ PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig:$(PKG_CONFIG_PATH)" \ - MAKEFLAGS="$(MAKEFLAGS) -j$(BR2_JLEVEL)" ./configure \ + MAKEFLAGS="$(MAKEFLAGS) -j$(PARALLEL_JOBS)" ./configure \ $(if $(VERBOSE),-verbose,-silent) \ -force-pkg-config \ $(QT_CONFIGURE_OPTS) \ - -no-gfx-qnx \ - -no-kbd-qnx \ - -no-mouse-qnx \ -no-xinerama \ -no-cups \ -no-nis \ @@ -507,6 +520,8 @@ define QT_CONFIGURE_CMDS -no-separate-debug-info \ -prefix /usr \ -plugindir /usr/lib/qt/plugins \ + -importdir /usr/lib/qt/imports \ + -translationdir /usr/share/qt/translations \ -hostprefix $(STAGING_DIR) \ -fast \ -no-rpath \ @@ -514,7 +529,7 @@ define QT_CONFIGURE_CMDS endef define QT_BUILD_CMDS - $(MAKE) -C $(@D) + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) endef @@ -566,9 +581,11 @@ endif ifeq ($(BR2_PACKAGE_QT_QT3SUPPORT),y) QT_INSTALL_LIBS += Qt3Support endif -ifeq ($(BR2_PACKAGE_OPENGL),y) -//QT_INSTALL_LIBS += QtOpenVG -//QT_INSTALL_LIBS += QtOpenGL +ifeq ($(BR2_PACKAGE_QT_OPENGL_ES),y) +QT_INSTALL_LIBS += QtOpenGL +endif +ifeq ($(BR2_PACKAGE_QT_GFX_POWERVR),y) +QT_INSTALL_LIBS += pvrQWSWSEGL endif QT_CONF_FILE=$(HOST_DIR)/usr/bin/qt.conf @@ -590,14 +607,20 @@ endef # everything in the STAGING_DIR), we move host programs such as qmake, # rcc or uic to the HOST_DIR so that they are available at the usual # location. A qt.conf file is generated to make sure that all host -# programs still find all files they need. +# programs still find all files they need. The .pc files are tuned to +# remove the sysroot path from them, since pkg-config already adds it +# automatically. define QT_INSTALL_STAGING_CMDS $(MAKE) -C $(@D) install mkdir -p $(HOST_DIR)/usr/bin mv $(addprefix $(STAGING_DIR)/usr/bin/,$(QT_HOST_PROGRAMS)) $(HOST_DIR)/usr/bin - rm -rf $(HOST_DIR)/usr/mkspecs - mv $(STAGING_DIR)/usr/mkspecs $(HOST_DIR)/usr + ln -sf $(STAGING_DIR)/usr/mkspecs $(HOST_DIR)/usr/mkspecs $(QT_INSTALL_QT_CONF) + for i in moc uic rcc lupdate lrelease ; do \ + $(SED) "s,^$${i}_location=.*,$${i}_location=$(HOST_DIR)/usr/bin/$${i}," \ + $(STAGING_DIR)/usr/lib/pkgconfig/Qt*.pc ; \ + done + $(SED) "s,$(STAGING_DIR)/,,g" $(STAGING_DIR)/usr/lib/pkgconfig/Qt*.pc endef # Library installation @@ -617,6 +640,14 @@ define QT_INSTALL_TARGET_PLUGINS fi endef +# Import installation +define QT_INSTALL_TARGET_IMPORTS + if [ -d $(STAGING_DIR)/usr/lib/qt/imports/ ] ; then \ + mkdir -p $(TARGET_DIR)/usr/lib/qt/imports ; \ + cp -dpfr $(STAGING_DIR)/usr/lib/qt/imports/* $(TARGET_DIR)/usr/lib/qt/imports ; \ + fi +endef + # Fonts installation ifneq ($(QT_FONTS),) define QT_INSTALL_TARGET_FONTS @@ -632,11 +663,30 @@ define QT_INSTALL_TARGET_FONTS_TTF endef endif +ifeq ($(BR2_PACKAGE_QT_GFX_POWERVR),y) +define QT_INSTALL_TARGET_POWERVR + # Note: this overwrites the default powervr.ini provided by the ti-gfx + # package. + $(INSTALL) -D -m 0644 package/qt/powervr.ini \ + $(TARGET_DIR)/etc/powervr.ini +endef +endif + +define QT_INSTALL_TARGET_TRANSLATIONS + if [ -d $(STAGING_DIR)/usr/share/qt/translations/ ] ; then \ + mkdir -p $(TARGET_DIR)/usr/share/qt/translations ; \ + cp -dpfr $(STAGING_DIR)/usr/share/qt/translations/* $(TARGET_DIR)/usr/share/qt/translations ; \ + fi +endef + define QT_INSTALL_TARGET_CMDS $(QT_INSTALL_TARGET_LIBS) $(QT_INSTALL_TARGET_PLUGINS) + $(QT_INSTALL_TARGET_IMPORTS) $(QT_INSTALL_TARGET_FONTS) $(QT_INSTALL_TARGET_FONTS_TTF) + $(QT_INSTALL_TARGET_POWERVR) + $(QT_INSTALL_TARGET_TRANSLATIONS) endef define QT_CLEAN_CMDS @@ -649,4 +699,4 @@ define QT_UNINSTALL_TARGET_CMDS -rm $(TARGET_DIR)/usr/lib/libphonon.so.* endef -$(eval $(call GENTARGETS,package,qt)) +$(eval $(generic-package)) diff --git a/package/qt5/Config.in b/package/qt5/Config.in new file mode 100644 index 0000000000..b92d3292b6 --- /dev/null +++ b/package/qt5/Config.in @@ -0,0 +1,35 @@ +comment "Qt5 needs a toolchain w/ wchar, IPv6, threads, C++" + depends on !BR2_PACKAGE_QT + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || !BR2_INET_IPV6 || !BR2_TOOLCHAIN_HAS_THREADS + +menuconfig BR2_PACKAGE_QT5 + bool "Qt5" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_INET_IPV6 + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_PACKAGE_QT + depends on !BR2_mips64 || !BR2_MIPS_NABI64 + help + This option enables the Qt5 framework. Sub-options allow to + select which modules should be built. + + http://qt-project.org + +if BR2_PACKAGE_QT5 +source "package/qt5/qt5base/Config.in" +source "package/qt5/qt5declarative/Config.in" +source "package/qt5/qt5graphicaleffects/Config.in" +source "package/qt5/qt5imageformats/Config.in" +source "package/qt5/qt5jsbackend/Config.in" +source "package/qt5/qt5multimedia/Config.in" +source "package/qt5/qt5quick1/Config.in" +source "package/qt5/qt5quickcontrols/Config.in" +source "package/qt5/qt5script/Config.in" +source "package/qt5/qt5sensors/Config.in" +source "package/qt5/qt5serialport/Config.in" +source "package/qt5/qt5svg/Config.in" +source "package/qt5/qt5webkit/Config.in" +source "package/qt5/qt5x11extras/Config.in" +source "package/qt5/qt5xmlpatterns/Config.in" +endif diff --git a/package/qt5/qt5.mk b/package/qt5/qt5.mk new file mode 100644 index 0000000000..671a217cba --- /dev/null +++ b/package/qt5/qt5.mk @@ -0,0 +1,13 @@ +QT5_VERSION = 5.1.1 +QT5_SITE = http://download.qt-project.org/official_releases/qt/5.1/$(QT5_VERSION)/submodules/ +include $(sort $(wildcard package/qt5/*/*.mk)) + +define QT5_LA_PRL_FILES_FIXUP + for i in $$(find $(STAGING_DIR)/usr/lib* -name "libQt5*.la"); do \ + $(SED) "s:\(['= ]\)/usr:\\1$(STAGING_DIR)/usr:g" $$i; \ + $(SED) "/^dependency_libs=/s%-L/usr/lib %%g" $$i ; \ + done + for i in $$(find $(STAGING_DIR)/usr/lib* -name "libQt5*.prl"); do \ + $(SED) "s%-L/usr/lib%%" $$i; \ + done +endef diff --git a/package/qt5/qt5base/Config.in b/package/qt5/qt5base/Config.in new file mode 100644 index 0000000000..e932e240a4 --- /dev/null +++ b/package/qt5/qt5base/Config.in @@ -0,0 +1,199 @@ +config BR2_PACKAGE_QT5BASE + bool "qt5base" + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_PCRE + select BR2_PACKAGE_PCRE_16 + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5base module, which + contains the base Qt libraries: QtCore, QtNetwork, QtGui, + QtWidgets, etc. + + http://qt-project.org + +if BR2_PACKAGE_QT5BASE + +config BR2_PACKAGE_QT5BASE_LICENSE_APPROVED + bool "Approve free license" + help + Select this if you approve one of the available free licenses for the + Qt5 library. + By doing this you will not be asked while the library is compiled. + Please read and understand the license terms before approving this. + + LGPL v2.1: http://qt-project.org/doc/qt-5.0/qtdoc/lgpl.html + GPL v3.0: http://qt-project.org/doc/qt-5.0/qtdoc/gpl.html + + See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html + +config BR2_PACKAGE_QT5BASE_NETWORK + bool "network module" + help + This options enables the Qt5Network library. + +config BR2_PACKAGE_QT5BASE_CONCURRENT + bool "concurrent module" + help + This options enables the Qt5Concurrent library. + +config BR2_PACKAGE_QT5BASE_SQL + bool "sql module" + help + This options enables the Qt5Sql library. + +if BR2_PACKAGE_QT5BASE_SQL +config BR2_PACKAGE_QT5BASE_MYSQL + bool "MySQL Plugin" + select BR2_PACKAGE_MYSQL_CLIENT + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_READLINE + depends on BR2_USE_MMU # mysql + help + Build MySQL plugin + If unsure, say n. +choice + prompt "SQLite 3 support" + default BR2_PACKAGE_QT5BASE_SQLITE_NONE + help + Select SQLite support. + +config BR2_PACKAGE_QT5BASE_SQLITE_NONE + bool "No sqlite support" + help + Do not compile any kind of SQLite support. + +config BR2_PACKAGE_QT5BASE_SQLITE_QT + bool "Qt SQLite" + help + Use Qt bundled SQLite support. + +config BR2_PACKAGE_QT5BASE_SQLITE_SYSTEM + bool "System SQLite" + select BR2_PACKAGE_SQLITE + help + Use system SQLite. + +endchoice + +endif + +config BR2_PACKAGE_QT5BASE_TEST + bool "test module" + help + This options enables the Qt5Test library. + +config BR2_PACKAGE_QT5BASE_XML + bool "XML module" + help + This options enables the Qt5Xml library. + +config BR2_PACKAGE_QT5BASE_GUI + bool "gui module" + # At least one graphic backend must be enabled, so enable + # linuxfb if nothing is enabled. + select BR2_PACKAGE_QT5BASE_LINUXFB if \ + !BR2_PACKAGE_QT5BASE_DIRECTFB && \ + !BR2_PACKAGE_QT5BASE_XCB && \ + !BR2_PACKAGE_QT5BASE_EGLFS + help + This option enables the Qt5Gui library. + +if BR2_PACKAGE_QT5BASE_GUI + +config BR2_PACKAGE_QT5BASE_WIDGETS + bool "widgets module" + select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_QT5BASE_XCB + help + This option enables the Qt5Widgets library. + +config BR2_PACKAGE_QT5BASE_LINUXFB + bool "linuxfb support" + +config BR2_PACKAGE_QT5BASE_DIRECTFB + bool "directfb support" + select BR2_PACKAGE_DIRECTFB + +config BR2_PACKAGE_QT5BASE_XCB + bool "X.org XCB support" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_LIBX11 + select BR2_PACKAGE_LIBXCB + select BR2_PACKAGE_XCB_UTIL_IMAGE + select BR2_PACKAGE_XCB_UTIL_KEYSYMS + select BR2_PACKAGE_XCB_UTIL_WM + select BR2_PACKAGE_LIBXKBCOMMON + +comment "X.org XCB backend available if X.org is enabled" + depends on !BR2_PACKAGE_XORG7 + +config BR2_PACKAGE_QT5BASE_EGLFS + bool "eglfs support" + depends on BR2_PACKAGE_HAS_OPENGL_EGL + depends on BR2_PACKAGE_HAS_OPENGL_ES + +comment "eglfs backend available if OpenGLES and EGL are enabled" + depends on !BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_OPENGL_ES + +config BR2_PACKAGE_QT5BASE_PRINTSUPPORT + bool "print support module" + select BR2_PACKAGE_QT5BASE_WIDGETS + help + This option enables the Qt5PrintSupport + +config BR2_PACKAGE_QT5BASE_FONTCONFIG + bool "fontconfig support" + select BR2_PACKAGE_FONTCONFIG + help + This option enables Fontconfig and Freetype support using + the system fontconfig and freetype2 libraries. + +config BR2_PACKAGE_QT5BASE_GIF + bool "GIF support" + help + This compiles and installs the plugin for GIF reading support. + +config BR2_PACKAGE_QT5BASE_JPEG + bool "JPEG support" + select BR2_PACKAGE_JPEG + help + This option enables JPEG support using the system libjpeg + library. + +config BR2_PACKAGE_QT5BASE_PNG + bool "PNG support" + select BR2_PACKAGE_LIBPNG + help + This option enables PNG support using the system libpng + library. + +endif + +config BR2_PACKAGE_QT5BASE_DBUS + bool "DBus module" + select BR2_PACKAGE_DBUS + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU + help + This option enables the D-Bus module. + +config BR2_PACKAGE_QT5BASE_ICU + bool "Enable ICU support" + select BR2_PACKAGE_ICU + depends on !BR2_arc # icu -> atomic builtins + help + This option enables ICU support in Qt5. This is for example + needed for Qt5Webkit. + +config BR2_PACKAGE_QT5BASE_TSLIB + bool "Enable Tslib support" + depends on !BR2_PREFER_STATIC_LIB # dlopen + select BR2_PACKAGE_TSLIB + help + This options enables the Tslib plugin + +comment "tslib support needs a toolchain w/ dynamic library" + depends on BR2_PREFER_STATIC_LIB + +endif diff --git a/package/qt5/qt5base/qt5base-0001-xcb-Add-egl-cflags-when-opengles2-is-enabled.patch b/package/qt5/qt5base/qt5base-0001-xcb-Add-egl-cflags-when-opengles2-is-enabled.patch new file mode 100644 index 0000000000..87acd9bef9 --- /dev/null +++ b/package/qt5/qt5base/qt5base-0001-xcb-Add-egl-cflags-when-opengles2-is-enabled.patch @@ -0,0 +1,32 @@ +From cbffa1e467a4c8b9e8061364b69e250b23fb7b59 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fatih=20A=C5=9F=C4=B1c=C4=B1?= +Date: Sun, 15 Sep 2013 11:15:33 +0300 +Subject: [PATCH] xcb: Add egl cflags when opengles2 is enabled +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This patch is sent to upstream and applied: +https://qt.gitorious.org/qt/qtbase/commit/ff7b57bbb936bc86a64aa2a947fa8984adf400c8 + +Signed-off-by: Fatih Aşıcı +--- + src/plugins/platforms/xcb/xcb-plugin.pro | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/plugins/platforms/xcb/xcb-plugin.pro b/src/plugins/platforms/xcb/xcb-plugin.pro +index 8299528..bc21afe 100644 +--- a/src/plugins/platforms/xcb/xcb-plugin.pro ++++ b/src/plugins/platforms/xcb/xcb-plugin.pro +@@ -73,7 +73,7 @@ contains(QT_CONFIG, xcb-render) { + contains(QT_CONFIG, opengl) { + contains(QT_CONFIG, opengles2) { + DEFINES += XCB_USE_EGL +- LIBS += -lEGL ++ CONFIG += egl + HEADERS += qxcbeglsurface.h + + # EGL on MeeGo 1.2 Harmattan needs this macro to map EGLNativeDisplayType +-- +1.7.10.4 + diff --git a/package/qt5/qt5base/qt5base-0002-mkspecs-files.patch b/package/qt5/qt5base/qt5base-0002-mkspecs-files.patch new file mode 100644 index 0000000000..e406cfc278 --- /dev/null +++ b/package/qt5/qt5base/qt5base-0002-mkspecs-files.patch @@ -0,0 +1,67 @@ +Add a Buildroot 'device' to ease cross-compilation + +Qt5 has a mechanism to support "device" profiles, so that people can +specify the compiler, compiler flags and so on for a specific device. + +We leverage this mechanism in the Buildroot packaging of qt5 to +simplify cross-compilation: we have our own "device" definition, which +allows us to easily pass the cross-compiler paths and flags from our +qt5.mk. + +Signed-off-by: Thomas Petazzoni + +Index: b/mkspecs/devices/linux-buildroot-g++/qmake.conf +=================================================================== +--- /dev/null ++++ b/mkspecs/devices/linux-buildroot-g++/qmake.conf +@@ -0,0 +1,44 @@ ++MAKEFILE_GENERATOR = UNIX ++CONFIG += incremental gdb_dwarf_index ++QMAKE_INCREMENTAL_STYLE = sublib ++ ++include(../../common/linux.conf) ++include(../../common/gcc-base-unix.conf) ++include(../../common/g++-unix.conf) ++ ++load(device_config) ++ ++QT_QPA_DEFAULT_PLATFORM = eglfs ++ ++BUILDROOT_CROSS_COMPILE = ++BUILDROOT_COMPILER_CFLAGS = ++BUILDROOT_COMPILER_CXXFLAGS = ++BUILDROOT_INCLUDE_PATH = ++ ++# modifications to g++.conf ++QMAKE_CC = $${BUILDROOT_CROSS_COMPILE}gcc ++QMAKE_CXX = $${BUILDROOT_CROSS_COMPILE}g++ ++QMAKE_LINK = $${QMAKE_CXX} ++QMAKE_LINK_SHLIB = $${QMAKE_CXX} ++ ++# modifications to linux.conf ++QMAKE_AR = $${BUILDROOT_CROSS_COMPILE}ar cqs ++QMAKE_OBJCOPY = $${BUILDROOT_CROSS_COMPILE}objcopy ++QMAKE_NM = $${BUILDROOT_CROSS_COMPILE}nm -P ++QMAKE_STRIP = $${BUILDROOT_CROSS_COMPILE}strip ++ ++#modifications to gcc-base.conf ++QMAKE_CFLAGS += $${BUILDROOT_COMPILER_CFLAGS} ++QMAKE_CXXFLAGS += $${BUILDROOT_COMPILER_CXXFLAGS} ++QMAKE_CXXFLAGS_RELEASE += -O3 ++INCLUDEPATH += $${BUILDROOT_INCLUDE_PATH} ++ ++QMAKE_LIBS += -lrt -lpthread -ldl ++ ++# device specific glue code ++EGLFS_PLATFORM_HOOKS_SOURCES = ++ ++# Sanity check ++deviceSanityCheckCompiler() ++ ++load(qt_config) +Index: b/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h +=================================================================== +--- /dev/null ++++ b/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h +@@ -0,0 +1 @@ ++#include "../../linux-g++/qplatformdefs.h" diff --git a/package/qt5/qt5base/qt5base-0003-uclibc-no-lfs.patch b/package/qt5/qt5base/qt5base-0003-uclibc-no-lfs.patch new file mode 100644 index 0000000000..9772d49144 --- /dev/null +++ b/package/qt5/qt5base/qt5base-0003-uclibc-no-lfs.patch @@ -0,0 +1,36 @@ +From 6f88b27de256266947a7f6a3e70e18510754aab2 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Sat, 14 Apr 2012 20:36:07 +0200 +Subject: [PATCH] mkspecs/common/posix: fix !largefile builds on uClibc + +uClibc doesn't even define O_LARGEFILE when not configured with large file +support, so ensure this define is only used when Qt is built with +-largefile, otherwise the build fails with: + +io/qtemporaryfile.cpp: In function 'bool createFileFromTemplate( + NativeFileHandle&, QFileSystemEntry::NativePath&, size_t, size_t, + QSystemError&)': +io/qtemporaryfile.cpp:197:57: error: 'O_LARGEFILE' was not declared in + this scope + +Moved to qt5 by Thomas Petazzoni. + +Reported-Upstream: https://bugreports.qt-project.org/browse/QTBUG-25321 +Signed-off-by: Peter Korsgaard + +Index: b/mkspecs/common/posix/qplatformdefs.h +=================================================================== +--- a/mkspecs/common/posix/qplatformdefs.h ++++ b/mkspecs/common/posix/qplatformdefs.h +@@ -123,7 +123,11 @@ + #define QT_READ ::read + #define QT_WRITE ::write + ++#ifdef QT_LARGEFILE_SUPPORT + #define QT_OPEN_LARGEFILE O_LARGEFILE ++#else ++#define QT_OPEN_LARGEFILE 0 ++#endif + #define QT_OPEN_RDONLY O_RDONLY + #define QT_OPEN_WRONLY O_WRONLY + #define QT_OPEN_RDWR O_RDWR diff --git a/package/qt5/qt5base/qt5base-0004-egl-cflags.patch b/package/qt5/qt5base/qt5base-0004-egl-cflags.patch new file mode 100644 index 0000000000..bff82a8080 --- /dev/null +++ b/package/qt5/qt5base/qt5base-0004-egl-cflags.patch @@ -0,0 +1,28 @@ +egl.prf: Append egl CFLAGS to QMAKE_C[XX]FLAGS + +Projects including egl in their config (e.g. with CONFIG += egl) cannot get +egl CFLAGS without this. + +Signed-off-by: Fatih Aşıcı + +--- a/configure ++++ b/configure +@@ -4934,6 +4934,7 @@ + QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null` + QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL" + QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL" ++ QMakeVar set QMAKE_CFLAGS_EGL "$QMAKE_CFLAGS_EGL" + fi # detect EGL support + if compileTest qpa/egl "EGL" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then + CFG_EGL=yes +--- a/mkspecs/features/egl.prf ++++ b/mkspecs/features/egl.prf +@@ -14,6 +14,8 @@ + } else { + INCLUDEPATH += $$QMAKE_INCDIR_EGL + LIBS_PRIVATE += $$QMAKE_LIBS_EGL ++ QMAKE_CFLAGS += $$QMAKE_CFLAGS_EGL ++ QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_EGL + LIBS += $$QMAKE_LFLAGS_EGL + for(p, QMAKE_LIBDIR_EGL) { + exists($$p):LIBS_PRIVATE += -L$$p diff --git a/package/qt5/qt5base/qt5base-0005-fix-gui-build-without-png.patch b/package/qt5/qt5base/qt5base-0005-fix-gui-build-without-png.patch new file mode 100644 index 0000000000..ea0a7e3d2d --- /dev/null +++ b/package/qt5/qt5base/qt5base-0005-fix-gui-build-without-png.patch @@ -0,0 +1,22 @@ +[PATCH] fix QtGUI build without PNG support + +Upstream bug: https://bugreports.qt-project.org/browse/QTBUG-33496 + +Signed-off-by: Peter Korsgaard +--- + src/gui/kernel/qplatformtheme.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: qt5base-5.1.1/src/gui/kernel/qplatformtheme.cpp +=================================================================== +--- qt5base-5.1.1.orig/src/gui/kernel/qplatformtheme.cpp ++++ qt5base-5.1.1/src/gui/kernel/qplatformtheme.cpp +@@ -48,7 +48,7 @@ + #include + #include + #include +-#include ++#include + + QT_BEGIN_NAMESPACE + diff --git a/package/qt5/qt5base/qt5base-0006-qeglfshooksrpi-update-vc_dispmanx_element_change_attributes.patch b/package/qt5/qt5base/qt5base-0006-qeglfshooksrpi-update-vc_dispmanx_element_change_attributes.patch new file mode 100644 index 0000000000..417970d55f --- /dev/null +++ b/package/qt5/qt5base/qt5base-0006-qeglfshooksrpi-update-vc_dispmanx_element_change_attributes.patch @@ -0,0 +1,44 @@ +From 90005fae17acc994948aa5a79fc262fd07b69865 Mon Sep 17 00:00:00 2001 +From: Dario Freddi +Date: Fri, 13 Sep 2013 12:10:03 +0200 +Subject: [PATCH] qeglfshooksrpi: update vc_dispmanx_element_change_attributes + +Remove the extern prototype as it's now defined in latest +firmware headers correctly. Moreover, the signature of the function +changed. This patch fixes both issues. + +Change-Id: I0114b436dbaf5a171e6429a1e3760e292c7152cf +Reviewed-by: Andy Nichols +--- + .../devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp | 8 +------- + 1 files changed, 1 insertions(+), 7 deletions(-) + +diff --git a/mkspecs/devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp b/mkspecs/devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp +index 9b48113..add96bf 100644 +--- a/mkspecs/devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp ++++ b/mkspecs/devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp +@@ -88,12 +88,6 @@ static EGLNativeWindowType createDispmanxLayer(const QPoint &pos, const QSize &s + return eglWindow; + } + +-// this function is not part of debian squeeze headers +-extern "C" int VCHPOST_ vc_dispmanx_element_change_attributes(DISPMANX_UPDATE_HANDLE_T update, +- DISPMANX_ELEMENT_HANDLE_T element, uint32_t change_flags, int32_t layer, +- uint8_t opacity, const VC_RECT_T *dest_rect, const VC_RECT_T *src_rect, +- DISPMANX_RESOURCE_HANDLE_T mask, VC_IMAGE_TRANSFORM_T transform); +- + // these constants are not in any headers (yet) + #define ELEMENT_CHANGE_LAYER (1<<0) + #define ELEMENT_CHANGE_OPACITY (1<<1) +@@ -128,7 +122,7 @@ static void moveDispmanxLayer(EGLNativeWindowType window, const QPoint &pos) + &dst_rect, + NULL, + 0, +- (VC_IMAGE_TRANSFORM_T)0); ++ (DISPMANX_TRANSFORM_T)0); + + vc_dispmanx_update_submit_sync(dispman_update); + } +-- +1.7.1 + diff --git a/package/qt5/qt5base/qt5base-0007-detect-posix_fallocate-at-configure-time.patch b/package/qt5/qt5base/qt5base-0007-detect-posix_fallocate-at-configure-time.patch new file mode 100644 index 0000000000..51cea04763 --- /dev/null +++ b/package/qt5/qt5base/qt5base-0007-detect-posix_fallocate-at-configure-time.patch @@ -0,0 +1,166 @@ +From 46e632e2555b6b8abe6b8d8ad7d255e27c128e25 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fatih=20A=C5=9F=C4=B1c=C4=B1?= +Date: Mon, 11 Nov 2013 17:04:46 +0200 +Subject: [PATCH] Detect posix_fallocate at configure time + +Testing feature macros is not enough for uclibc. Fixes build of the built-in +sqlite3 with uclibc <= 0.9.33.2. Later versions will have posix_fallocate(). + +Change-Id: I918a52777ac63624635802221effc6b86fa2269c +Signed-off-by: Fatih Aşıcı +Reported-Upstream: https://codereview.qt-project.org/70935 +--- + .../unix/posix_fallocate/posix_fallocate.cpp | 53 ++++++++++++++++++++++ + .../unix/posix_fallocate/posix_fallocate.pro | 2 + + configure | 14 ++++++ + src/3rdparty/sqlite.pri | 1 + + src/3rdparty/sqlite/sqlite3.c | 7 --- + 5 files changed, 70 insertions(+), 7 deletions(-) + create mode 100644 config.tests/unix/posix_fallocate/posix_fallocate.cpp + create mode 100644 config.tests/unix/posix_fallocate/posix_fallocate.pro + +diff --git a/config.tests/unix/posix_fallocate/posix_fallocate.cpp b/config.tests/unix/posix_fallocate/posix_fallocate.cpp +new file mode 100644 +index 0000000..5acd45a +--- /dev/null ++++ b/config.tests/unix/posix_fallocate/posix_fallocate.cpp +@@ -0,0 +1,53 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the config.tests of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL$ ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 3.0 as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU General Public License version 3.0 requirements will be ++** met: http://www.gnu.org/copyleft/gpl.html. ++** ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++#include ++ ++int main(int, char **) ++{ ++#if _XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L ++ return ::posix_fallocate(0, 0, 0); ++#else ++# error posix_fallocate not available ++ // MIPSpro doesn't understand #error, so force a compiler error ++ force_compiler_error = true; ++#endif ++} +diff --git a/config.tests/unix/posix_fallocate/posix_fallocate.pro b/config.tests/unix/posix_fallocate/posix_fallocate.pro +new file mode 100644 +index 0000000..f01b15f +--- /dev/null ++++ b/config.tests/unix/posix_fallocate/posix_fallocate.pro +@@ -0,0 +1,2 @@ ++SOURCES = posix_fallocate.cpp ++CONFIG -= qt dylib +diff --git a/configure b/configure +index 81e2a93..b67ed89 100755 +--- a/configure ++++ b/configure +@@ -968,6 +968,7 @@ CFG_MIPS_DSP=auto + CFG_MIPS_DSPR2=auto + CFG_CLOCK_GETTIME=auto + CFG_CLOCK_MONOTONIC=auto ++CFG_POSIX_FALLOCATE=auto + CFG_MREMAP=auto + CFG_GETADDRINFO=auto + CFG_IPV6IFNAME=auto +@@ -5653,6 +5654,15 @@ elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then + CFG_CLOCK_MONOTONIC=no + fi + ++# detect posix_fallocate ++if [ "$CFG_POSIX_FALLOCATE" = "auto" ]; then ++ if compileTest unix/posix_fallocate "posix_fallocate"; then ++ CFG_POSIX_FALLOCATE=yes ++ else ++ CFG_POSIX_FALLOCATE=no ++ fi ++fi ++ + # detect mremap + if [ "$CFG_MREMAP" = "auto" ]; then + if compileTest unix/mremap "mremap"; then +@@ -5970,6 +5980,9 @@ fi + if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then + QT_CONFIG="$QT_CONFIG clock-monotonic" + fi ++if [ "$CFG_POSIX_FALLOCATE" = "yes" ]; then ++ QT_CONFIG="$QT_CONFIG posix_fallocate" ++fi + if [ "$CFG_MREMAP" = "yes" ]; then + QT_CONFIG="$QT_CONFIG mremap" + fi +@@ -6449,6 +6462,7 @@ QMakeVar set sql-plugins "$SQL_PLUGINS" + [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB" + [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK" + [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC" ++[ "$CFG_POSIX_FALLOCATE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_POSIX_FALLOCATE" + [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP" + [ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO" + [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME" +diff --git a/src/3rdparty/sqlite.pri b/src/3rdparty/sqlite.pri +index 58d4ddd..072502c 100644 +--- a/src/3rdparty/sqlite.pri ++++ b/src/3rdparty/sqlite.pri +@@ -1,5 +1,6 @@ + CONFIG(release, debug|release):DEFINES *= NDEBUG + DEFINES += SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE SQLITE_ENABLE_FTS3 SQLITE_ENABLE_FTS3_PARENTHESIS SQLITE_ENABLE_RTREE + !contains(CONFIG, largefile):DEFINES += SQLITE_DISABLE_LFS ++contains(QT_CONFIG, posix_fallocate):DEFINES += HAVE_POSIX_FALLOCATE=1 + INCLUDEPATH += $$PWD/sqlite + SOURCES += $$PWD/sqlite/sqlite3.c +diff --git a/src/3rdparty/sqlite/sqlite3.c b/src/3rdparty/sqlite/sqlite3.c +index 03fa649..1ae9be2 100644 +--- a/src/3rdparty/sqlite/sqlite3.c ++++ b/src/3rdparty/sqlite/sqlite3.c +@@ -22935,13 +22935,6 @@ SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){ + */ + #if SQLITE_OS_UNIX /* This file is used on unix only */ + +-/* Use posix_fallocate() if it is available +-*/ +-#if !defined(HAVE_POSIX_FALLOCATE) \ +- && (_XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L) +-# define HAVE_POSIX_FALLOCATE 1 +-#endif +- + /* + ** There are various methods for file locking used for concurrency + ** control: +-- +1.8.4.rc3 + diff --git a/package/qt5/qt5base/qt5base-0008-qatomic-ppc.patch b/package/qt5/qt5base/qt5base-0008-qatomic-ppc.patch new file mode 100644 index 0000000000..906b56a0d4 --- /dev/null +++ b/package/qt5/qt5base/qt5base-0008-qatomic-ppc.patch @@ -0,0 +1,29 @@ +Set loadAcquire() as const + +Fixes powerpc build. + +Fetched-from: https://bugzilla.redhat.com/attachment.cgi?id=812643 +Signed-off-by: Fatih Aşıcı + +Index: qtbase-opensource-src-5.1.1/src/corelib/thread/qoldbasicatomic.h +=================================================================== +--- qtbase-opensource-src-5.1.1.orig/src/corelib/thread/qoldbasicatomic.h ++++ qtbase-opensource-src-5.1.1/src/corelib/thread/qoldbasicatomic.h +@@ -63,7 +63,7 @@ public: + // Atomic API, implemented in qatomic_XXX.h + + int load() const { return _q_value; } +- int loadAcquire() { return _q_value; } ++ int loadAcquire() const { return _q_value; } + void store(int newValue) { _q_value = newValue; } + void storeRelease(int newValue) { _q_value = newValue; } + +@@ -107,7 +107,7 @@ public: + // Atomic API, implemented in qatomic_XXX.h + + T *load() const { return _q_value; } +- T *loadAcquire() { return _q_value; } ++ T *loadAcquire() const { return _q_value; } + void store(T *newValue) { _q_value = newValue; } + void storeRelease(T *newValue) { _q_value = newValue; } + diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk new file mode 100644 index 0000000000..ce78d31256 --- /dev/null +++ b/package/qt5/qt5base/qt5base.mk @@ -0,0 +1,230 @@ +################################################################################ +# +# qt5base +# +################################################################################ + +QT5BASE_VERSION = $(QT5_VERSION) +QT5BASE_SITE = $(QT5_SITE) +QT5BASE_SOURCE = qtbase-opensource-src-$(QT5BASE_VERSION).tar.xz + +QT5BASE_DEPENDENCIES = host-pkgconf zlib pcre +QT5BASE_INSTALL_STAGING = YES + +# A few comments: +# * -no-pch to workaround the issue described at +# http://comments.gmane.org/gmane.comp.lib.qt.devel/5933. +# * -system-zlib because zlib is mandatory for Qt build, and we +# want to use the Buildroot packaged zlib +# * -system-pcre because pcre is mandatory to build Qt, and we +# want to use the one packaged in Buildroot +QT5BASE_CONFIGURE_OPTS += \ + -optimized-qmake \ + -no-kms \ + -no-cups \ + -no-nis \ + -no-libudev \ + -no-iconv \ + -no-gstreamer \ + -no-gtkstyle \ + -system-zlib \ + -system-pcre \ + -no-pch + +ifeq ($(BR2_ENABLE_DEBUG),y) +QT5BASE_CONFIGURE_OPTS += -debug +else +QT5BASE_CONFIGURE_OPTS += -release +endif + +ifeq ($(BR2_PREFER_STATIC_LIB),y) +QT5BASE_CONFIGURE_OPTS += -static +else +# We apparently can't build both the shared and static variants of the +# library. +QT5BASE_CONFIGURE_OPTS += -shared +endif + +ifeq ($(BR2_LARGEFILE),y) +QT5BASE_CONFIGURE_OPTS += -largefile +else +QT5BASE_CONFIGURE_OPTS += -no-largefile +endif + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5BASE_CONFIGURE_OPTS += -opensource -confirm-license +QT5BASE_LICENSE = LGPLv2.1 or GPLv3.0 +QT5BASE_LICENSE_FILES = LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt +else +QT5BASE_LICENSE = Commercial license +QT5BASE_REDISTRIBUTE = NO +endif + +# Qt5 SQL Plugins +ifeq ($(BR2_PACKAGE_QT5BASE_SQL),y) +ifeq ($(BR2_PACKAGE_QT5BASE_MYSQL),y) +QT5BASE_CONFIGURE_OPTS += -plugin-sql-mysql -mysql_config $(STAGING_DIR)/usr/bin/mysql_config +QT5BASE_DEPENDENCIES += mysql_client +else +QT5BASE_CONFIGURE_OPTS += -no-sql-mysql +endif + +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_SQLITE_QT),-plugin-sql-sqlite) +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_SQLITE_SYSTEM),-system-sqlite) +QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_SQLITE_SYSTEM),sqlite) +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_SQLITE_NONE),-no-sql-sqlite) +endif + +# We have to use --enable-linuxfb, otherwise Qt thinks that -linuxfb +# is to add a link against the "inuxfb" library. +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_GUI),-gui,-no-gui) +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_WIDGETS),-widgets,-no-widgets) +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_LINUXFB),--enable-linuxfb,-no-linuxfb) +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_DIRECTFB),-directfb,-no-directfb) +QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_DIRECTFB),directfb) + +ifeq ($(BR2_PACKAGE_QT5BASE_XCB),y) +QT5BASE_CONFIGURE_OPTS += -xcb -system-xkbcommon +QT5BASE_DEPENDENCIES += \ + libxcb \ + xcb-util-wm \ + xcb-util-image \ + xcb-util-keysyms \ + xlib_libX11 \ + libxkbcommon +ifeq ($(BR2_PACKAGE_QT5BASE_WIDGETS),y) +QT5BASE_DEPENDENCIES += xlib_libXext +endif +else +QT5BASE_CONFIGURE_OPTS += -no-xcb +endif + +ifeq ($(BR2_PACKAGE_QT5BASE_EGLFS),y) +QT5BASE_CONFIGURE_OPTS += -opengl es2 -eglfs +QT5BASE_DEPENDENCIES += libgles libegl +ifeq ($(BR2_PACKAGE_GPU_VIV_BIN_MX6Q),y) +QT5BASE_EGLFS_PLATFORM_HOOKS_SOURCES = \ + $(@D)/mkspecs/devices/linux-imx6-g++/qeglfshooks_imx6.cpp +endif +ifeq ($(BR2_PACKAGE_RPI_USERLAND),y) +QT5BASE_EGLFS_PLATFORM_HOOKS_SOURCES = \ + $(@D)/mkspecs/devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp +endif +else +QT5BASE_CONFIGURE_OPTS += -no-opengl -no-eglfs +endif + +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_OPENSSL),-openssl,-no-openssl) +QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_OPENSSL),openssl) + +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_FONTCONFIG),-fontconfig,-no-fontconfig) +QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_FONTCONFIG),fontconfig) +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_GIF),,-no-gif) +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_JPEG),-system-libjpeg,-no-libjpeg) +QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_JPEG),jpeg) +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_PNG),-system-libpng,-no-libpng) +QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_PNG),libpng) + +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_DBUS),-dbus,-no-dbus) +QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_DBUS),dbus) + +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_TSLIB),-tslib,-no-tslib) +QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_TSLIB),tslib) + +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_LIBGLIB2),-glib,-no-glib) +QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBGLIB2),libglib2) + +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_ICU),-icu,-no-icu) +QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_ICU),icu) + +# Build the list of libraries to be installed on the target +QT5BASE_INSTALL_LIBS_y += Qt5Core +QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_NETWORK) += Qt5Network +QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_CONCURRENT) += Qt5Concurrent +QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_SQL) += Qt5Sql +QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_TEST) += Qt5Test +QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_XML) += Qt5Xml +QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS) += Qt5OpenGL + +QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_GUI) += Qt5Gui +QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_WIDGETS) += Qt5Widgets +QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_PRINTSUPPORT) += Qt5PrintSupport + +QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_DBUS) += Qt5DBus + +# Ideally, we could use -device-option to substitute variable values +# in our linux-buildroot-g++/qmake.config, but this mechanism doesn't +# nicely support variable values that contain spaces. So we use the +# good old sed solution here. +define QT5BASE_CONFIG_SET + $(SED) 's%^$(1).*%$(1) = $(2)%g' $(@D)/mkspecs/devices/linux-buildroot-g++/qmake.conf +endef + +define QT5BASE_CONFIGURE_CMDS + $(call QT5BASE_CONFIG_SET,BUILDROOT_CROSS_COMPILE,$(TARGET_CROSS)) + $(call QT5BASE_CONFIG_SET,BUILDROOT_COMPILER_CFLAGS,$(TARGET_CFLAGS)) + $(call QT5BASE_CONFIG_SET,BUILDROOT_COMPILER_CXXFLAGS,$(TARGET_CXXFLAGS)) + $(call QT5BASE_CONFIG_SET,BUILDROOT_INCLUDE_PATH,$(STAGING_DIR)/usr/include) + $(call QT5BASE_CONFIG_SET,EGLFS_PLATFORM_HOOKS_SOURCES, \ + $(QT5BASE_EGLFS_PLATFORM_HOOKS_SOURCES)) + (cd $(@D); \ + PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \ + PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig" \ + PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \ + MAKEFLAGS="$(MAKEFLAGS) -j$(PARALLEL_JOBS)" \ + ./configure \ + -v \ + -prefix /usr \ + -hostprefix $(HOST_DIR)/usr \ + -sysroot $(STAGING_DIR) \ + -plugindir /usr/lib/qt/plugins \ + -no-rpath \ + -nomake examples -nomake tests \ + -device buildroot \ + -no-c++11 \ + $(QT5BASE_CONFIGURE_OPTS) \ + ) +endef + +define QT5BASE_BUILD_CMDS + $(MAKE) -C $(@D) +endef + +define QT5BASE_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +define QT5BASE_INSTALL_TARGET_LIBS + for lib in $(QT5BASE_INSTALL_LIBS_y); do \ + cp -dpf $(STAGING_DIR)/usr/lib/lib$${lib}.so.* $(TARGET_DIR)/usr/lib ; \ + done +endef + +define QT5BASE_INSTALL_TARGET_PLUGINS + if [ -d $(STAGING_DIR)/usr/lib/qt/plugins/ ] ; then \ + mkdir -p $(TARGET_DIR)/usr/lib/qt/plugins ; \ + cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/* $(TARGET_DIR)/usr/lib/qt/plugins ; \ + fi +endef + +define QT5BASE_INSTALL_TARGET_FONTS + if [ -d $(STAGING_DIR)/usr/lib/fonts/ ] ; then \ + mkdir -p $(TARGET_DIR)/usr/lib/fonts ; \ + cp -dpfr $(STAGING_DIR)/usr/lib/fonts/* $(TARGET_DIR)/usr/lib/fonts ; \ + fi +endef + +ifeq ($(BR2_PREFER_STATIC_LIB),y) +define QT5BASE_INSTALL_TARGET_CMDS + $(QT5BASE_INSTALL_TARGET_FONTS) +endef +else +define QT5BASE_INSTALL_TARGET_CMDS + $(QT5BASE_INSTALL_TARGET_LIBS) + $(QT5BASE_INSTALL_TARGET_PLUGINS) + $(QT5BASE_INSTALL_TARGET_FONTS) +endef +endif + +$(eval $(generic-package)) diff --git a/package/qt5/qt5declarative/Config.in b/package/qt5/qt5declarative/Config.in new file mode 100644 index 0000000000..c9a673658a --- /dev/null +++ b/package/qt5/qt5declarative/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_QT5DECLARATIVE + bool "qt5declarative" + select BR2_PACKAGE_QT5XMLPATTERNS + select BR2_PACKAGE_QT5JSBACKEND + select BR2_PACKAGE_QT5BASE + select BR2_PACKAGE_QT5BASE_GUI + select BR2_PACKAGE_QT5BASE_EGLFS + depends on BR2_PACKAGE_HAS_OPENGL_EGL + depends on BR2_PACKAGE_HAS_OPENGL_ES + depends on BR2_PACKAGE_QT5JSBACKEND_AVAILABLE + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5declarative module. + + http://qt-project.org + +comment "qt5declarative requires an OpenGL-capable backend" + depends on (!BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_OPENGL_ES) && \ + BR2_PACKAGE_QT5JSBACKEND_AVAILABLE diff --git a/package/qt5/qt5declarative/qt5declarative.mk b/package/qt5/qt5declarative/qt5declarative.mk new file mode 100644 index 0000000000..11b9287040 --- /dev/null +++ b/package/qt5/qt5declarative/qt5declarative.mk @@ -0,0 +1,52 @@ +################################################################################ +# +# qt5declarative +# +################################################################################ + +QT5DECLARATIVE_VERSION = $(QT5_VERSION) +QT5DECLARATIVE_SITE = $(QT5_SITE) +QT5DECLARATIVE_SOURCE = qtdeclarative-opensource-src-$(QT5DECLARATIVE_VERSION).tar.xz +QT5DECLARATIVE_DEPENDENCIES = qt5base qt5xmlpatterns qt5jsbackend +QT5DECLARATIVE_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5DECLARATIVE_LICENSE = LGPLv2.1 or GPLv3.0 +QT5DECLARATIVE_LICENSE_FILES = LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt +else +QT5DECLARATIVE_LICENSE = Commercial license +QT5DECLARATIVE_REDISTRIBUTE = NO +endif + +define QT5DECLARATIVE_CONFIGURE_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5DECLARATIVE_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + sub-src-all sub-tools-all +endef + +define QT5DECLARATIVE_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + sub-src-install_subtargets \ + sub-tools-install_subtargets + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_PREFER_STATIC_LIB),) +define QT5DECLARATIVE_INSTALL_TARGET_LIBS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5Qml*.so.* $(TARGET_DIR)/usr/lib + cp -dpf $(STAGING_DIR)/usr/lib/libQt5Quick*.so.* $(TARGET_DIR)/usr/lib + cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/accessible $(TARGET_DIR)/usr/lib/qt/plugins + cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/qml* $(TARGET_DIR)/usr/lib/qt/plugins +endef +endif + +define QT5DECLARATIVE_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/bin/qml* $(TARGET_DIR)/usr/bin + cp -dpfr $(STAGING_DIR)/usr/qml $(TARGET_DIR)/usr + $(QT5DECLARATIVE_INSTALL_TARGET_LIBS) +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5graphicaleffects/Config.in b/package/qt5/qt5graphicaleffects/Config.in new file mode 100644 index 0000000000..ed0454ad6c --- /dev/null +++ b/package/qt5/qt5graphicaleffects/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_QT5GRAPHICALEFFECTS + bool "qt5graphicaleffects" + select BR2_PACKAGE_QT5BASE + select BR2_PACKAGE_QT5DECLARATIVE + # qt5declarative -> qt5jsbackend + depends on BR2_PACKAGE_QT5JSBACKEND_AVAILABLE + depends on BR2_PACKAGE_HAS_OPENGL_EGL + depends on BR2_PACKAGE_HAS_OPENGL_ES + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5graphicaleffects module. + + http://qt-project.org + +comment "qt5graphicaleffects requires an OpenGL-capable backend" + depends on (!BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_OPENGL_ES) && \ + BR2_PACKAGE_QT5JSBACKEND_AVAILABLE diff --git a/package/qt5/qt5graphicaleffects/qt5graphicaleffects.mk b/package/qt5/qt5graphicaleffects/qt5graphicaleffects.mk new file mode 100644 index 0000000000..1e492c9da6 --- /dev/null +++ b/package/qt5/qt5graphicaleffects/qt5graphicaleffects.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# qt5graphicaleffects +# +################################################################################ + +QT5GRAPHICALEFFECTS_VERSION = $(QT5_VERSION) +QT5GRAPHICALEFFECTS_SITE = $(QT5_SITE) +QT5GRAPHICALEFFECTS_SOURCE = qtgraphicaleffects-opensource-src-$(QT5GRAPHICALEFFECTS_VERSION).tar.xz +QT5GRAPHICALEFFECTS_DEPENDENCIES = qt5base qt5declarative +QT5GRAPHICALEFFECTS_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5GRAPHICALEFFECTS_LICENSE = LGPLv2.1 or GPLv3.0 +# Here we would like to get license files from qt5base, but qt5base +# may not be extracted at the time we get the legal-info for +# qt5script. +else +QT5GRAPHICALEFFECTS_LICENSE = Commercial license +QT5GRAPHICALEFFECTS_REDISTRIBUTE = NO +endif + +define QT5GRAPHICALEFFECTS_CONFIGURE_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5GRAPHICALEFFECTS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5GRAPHICALEFFECTS_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install +endef + +define QT5GRAPHICALEFFECTS_INSTALL_TARGET_CMDS + cp -dpfr $(STAGING_DIR)/usr/qml/QtGraphicalEffects $(TARGET_DIR)/usr/qml +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5imageformats/Config.in b/package/qt5/qt5imageformats/Config.in new file mode 100644 index 0000000000..f976caff2a --- /dev/null +++ b/package/qt5/qt5imageformats/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_QT5IMAGEFORMATS + bool "qt5imageformats" + select BR2_PACKAGE_QT5BASE + select BR2_PACKAGE_QT5BASE_GUI + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5imageformats module. + + http://qt-project.org diff --git a/package/qt5/qt5imageformats/qt5imageformats.mk b/package/qt5/qt5imageformats/qt5imageformats.mk new file mode 100644 index 0000000000..52192c6802 --- /dev/null +++ b/package/qt5/qt5imageformats/qt5imageformats.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# qt5imageformats +# +################################################################################ + +QT5IMAGEFORMATS_VERSION = $(QT5_VERSION) +QT5IMAGEFORMATS_SITE = $(QT5_SITE) +QT5IMAGEFORMATS_SOURCE = qtimageformats-opensource-src-$(QT5IMAGEFORMATS_VERSION).tar.xz +QT5IMAGEFORMATS_DEPENDENCIES = qt5base +QT5IMAGEFORMATS_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5IMAGEFORMATS_LICENSE = LGPLv2.1 or GPLv3.0 +QT5IMAGEFORMATS_LICENSE_FILES = LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt +else +QT5IMAGEFORMATS_LICENSE = Commercial license +QT5IMAGEFORMATS_REDISTRIBUTE = NO +endif + +define QT5IMAGEFORMATS_CONFIGURE_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5IMAGEFORMATS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5IMAGEFORMATS_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install +endef + +ifeq ($(BR2_PREFER_STATIC_LIB),) +define QT5IMAGEFORMATS_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/lib/qt/plugins/imageformats/*.so $(TARGET_DIR)/usr/lib/qt/plugins/imageformats/ +endef +endif + +$(eval $(generic-package)) diff --git a/package/qt5/qt5jsbackend/Config.in b/package/qt5/qt5jsbackend/Config.in new file mode 100644 index 0000000000..d9301d0976 --- /dev/null +++ b/package/qt5/qt5jsbackend/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_QT5JSBACKEND_AVAILABLE + bool + # v8 is only available on certain architectures + depends on BR2_arm || BR2_i386 || BR2_x86_64 || BR2_mipsel + # ARM needs BLX, so v5t+ + depends on !(BR2_arm7tdmi || BR2_arm720t || BR2_arm920t || BR2_arm922t || BR2_fa526) + default y + +config BR2_PACKAGE_QT5JSBACKEND + bool "qt5jsbackend" + select BR2_PACKAGE_QT5BASE + depends on BR2_PACKAGE_QT5JSBACKEND_AVAILABLE + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5jsbackend module. + + http://qt-project.org diff --git a/package/qt5/qt5jsbackend/qt5jsbackend-0001-dont-import-bz2-python-module.patch b/package/qt5/qt5jsbackend/qt5jsbackend-0001-dont-import-bz2-python-module.patch new file mode 100644 index 0000000000..08f343e5ea --- /dev/null +++ b/package/qt5/qt5jsbackend/qt5jsbackend-0001-dont-import-bz2-python-module.patch @@ -0,0 +1,29 @@ +Only import bz2 python module when needed + +The js2c.py script imports the bz2 module unconditionnally, which +would require us to build the bzip2 support in host-python. Since in +fact bzip2 support is not technically used when building this package, +we ensure that the bz2 module is only imported when needed. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/3rdparty/v8/tools/js2c.py +=================================================================== +--- a/src/3rdparty/v8/tools/js2c.py ++++ b/src/3rdparty/v8/tools/js2c.py +@@ -33,7 +33,6 @@ + + import os, re, sys, string + import jsmin +-import bz2 + + + def ToCAsciiArray(lines): +@@ -344,6 +343,7 @@ + else: + raw_sources_declaration = RAW_SOURCES_COMPRESSION_DECLARATION + if env['COMPRESSION'] == 'bz2': ++ import bz2 + all_sources = bz2.compress("".join(all_sources)) + total_length = len(all_sources) + sources_data = ToCArray(all_sources) diff --git a/package/qt5/qt5jsbackend/qt5jsbackend.mk b/package/qt5/qt5jsbackend/qt5jsbackend.mk new file mode 100644 index 0000000000..9eccd23e53 --- /dev/null +++ b/package/qt5/qt5jsbackend/qt5jsbackend.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# qt5jsbackend +# +################################################################################ + +QT5JSBACKEND_VERSION = $(QT5_VERSION) +QT5JSBACKEND_SITE = $(QT5_SITE) +QT5JSBACKEND_SOURCE = qtjsbackend-opensource-src-$(QT5JSBACKEND_VERSION).tar.xz +QT5JSBACKEND_DEPENDENCIES = qt5base +QT5JSBACKEND_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5JSBACKEND_LICENSE = LGPLv2.1 or GPLv3.0 +QT5JSBACKEND_LICENSE_FILES = LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt +else +QT5JSBACKEND_LICENSE = Commercial license +QT5JSBACKEND_REDISTRIBUTE = NO +endif + +define QT5JSBACKEND_CONFIGURE_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5JSBACKEND_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5JSBACKEND_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_PREFER_STATIC_LIB),) +define QT5JSBACKEND_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5V8*.so.* $(TARGET_DIR)/usr/lib +endef +endif + +$(eval $(generic-package)) diff --git a/package/qt5/qt5multimedia/Config.in b/package/qt5/qt5multimedia/Config.in new file mode 100644 index 0000000000..080cba22c1 --- /dev/null +++ b/package/qt5/qt5multimedia/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_QT5MULTIMEDIA + bool "qt5multimedia" + select BR2_PACKAGE_QT5BASE + select BR2_PACKAGE_QT5DECLARATIVE + depends on BR2_PACKAGE_HAS_OPENGL_EGL + depends on BR2_PACKAGE_HAS_OPENGL_ES + # qt5declarative -> qt5jsbackend + depends on BR2_PACKAGE_QT5JSBACKEND_AVAILABLE + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5multimedia module. + + http://qt-project.org + +comment "qt5multimedia requires an OpenGL-capable backend" + depends on (!BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_OPENGL_ES) && \ + BR2_PACKAGE_QT5JSBACKEND_AVAILABLE diff --git a/package/qt5/qt5multimedia/qt5multimedia.mk b/package/qt5/qt5multimedia/qt5multimedia.mk new file mode 100644 index 0000000000..1a3ca6b901 --- /dev/null +++ b/package/qt5/qt5multimedia/qt5multimedia.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# qt5multimedia +# +################################################################################ + +QT5MULTIMEDIA_VERSION = $(QT5_VERSION) +QT5MULTIMEDIA_SITE = $(QT5_SITE) +QT5MULTIMEDIA_SOURCE = qtmultimedia-opensource-src-$(QT5MULTIMEDIA_VERSION).tar.xz +QT5MULTIMEDIA_DEPENDENCIES = qt5base qt5declarative +QT5MULTIMEDIA_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5MULTIMEDIA_LICENSE = LGPLv2.1 or GPLv3.0 +# Here we would like to get license files from qt5base, but qt5base +# may not be extracted at the time we get the legal-info for +# qt5script. +else +QT5MULTIMEDIA_LICENSE = Commercial license +QT5MULTIMEDIA_REDISTRIBUTE = NO +endif + +define QT5MULTIMEDIA_CONFIGURE_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5MULTIMEDIA_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5MULTIMEDIA_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_PREFER_STATIC_LIB),) +define QT5MULTIMEDIA_INSTALL_TARGET_LIBS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5Multimedia*.so.* $(TARGET_DIR)/usr/lib + cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/* $(TARGET_DIR)/usr/lib/qt/plugins +endef +endif + +define QT5MULTIMEDIA_INSTALL_TARGET_CMDS + cp -dpfr $(STAGING_DIR)/usr/qml/* $(TARGET_DIR)/usr/qml + $(QT5MULTIMEDIA_INSTALL_TARGET_LIBS) +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5quick1/Config.in b/package/qt5/qt5quick1/Config.in new file mode 100644 index 0000000000..9cb97a6fc8 --- /dev/null +++ b/package/qt5/qt5quick1/Config.in @@ -0,0 +1,25 @@ +config BR2_PACKAGE_QT5QUICK1 + bool "qt5quick1" + select BR2_PACKAGE_QT5BASE + select BR2_PACKAGE_QT5BASE_GUI + select BR2_PACKAGE_QT5BASE_WIDGETS + select BR2_PACKAGE_QT5SCRIPT + select BR2_PACKAGE_QT5XMLPATTERNS + select BR2_PACKAGE_QT5DECLARATIVE + select BR2_PACKAGE_QT5JSBACKEND + # This module does not support static linking + depends on !BR2_PREFER_STATIC_LIB + depends on BR2_PACKAGE_HAS_OPENGL_EGL + depends on BR2_PACKAGE_HAS_OPENGL_ES + depends on BR2_PACKAGE_QT5JSBACKEND_AVAILABLE + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5quick1 module. + + http://qt-project.org + +comment "qt5quick1 requires an OpenGL-capable backend" + depends on (!BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_OPENGL_ES) && \ + BR2_PACKAGE_QT5JSBACKEND_AVAILABLE diff --git a/package/qt5/qt5quick1/qt5quick1.mk b/package/qt5/qt5quick1/qt5quick1.mk new file mode 100644 index 0000000000..f9bb3e8e3a --- /dev/null +++ b/package/qt5/qt5quick1/qt5quick1.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# qt5quick1 +# +################################################################################ + +QT5QUICK1_VERSION = $(QT5_VERSION) +QT5QUICK1_SITE = $(QT5_SITE) +QT5QUICK1_SOURCE = qtquick1-opensource-src-$(QT5QUICK1_VERSION).tar.xz +QT5QUICK1_DEPENDENCIES = qt5base qt5xmlpatterns qt5script qt5declarative qt5jsbackend \ + $(if $(BR2_PACKAGE_QT5WEBKIT),qt5webkit) +QT5QUICK1_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5QUICK1_LICENSE = LGPLv2.1 or GPLv3.0 +QT5QUICK1_LICENSE_FILES = LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt +else +QT5QUICK1_LICENSE = Commercial license +QT5QUICK1_REDISTRIBUTE = NO +endif + +define QT5QUICK1_CONFIGURE_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5QUICK1_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5QUICK1_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +define QT5QUICK1_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5Declarative.so.* $(TARGET_DIR)/usr/lib + cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/qml1tooling $(TARGET_DIR)/usr/lib/qt/plugins/ + cp -dpfr $(STAGING_DIR)/usr/imports $(TARGET_DIR)/usr +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5quickcontrols/Config.in b/package/qt5/qt5quickcontrols/Config.in new file mode 100644 index 0000000000..3d8063036d --- /dev/null +++ b/package/qt5/qt5quickcontrols/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_QT5QUICKCONTROLS + bool "qt5quickcontrols" + select BR2_PACKAGE_QT5BASE + select BR2_PACKAGE_QT5BASE_NETWORK + select BR2_PACKAGE_QT5DECLARATIVE + # qt5declarative -> qt5jsbackend + depends on BR2_PACKAGE_QT5JSBACKEND_AVAILABLE + depends on BR2_PACKAGE_HAS_OPENGL_EGL + depends on BR2_PACKAGE_HAS_OPENGL_ES + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5quickcontrols module. + + http://qt-project.org + +comment "qt5quickcontrols requires an OpenGL-capable backend" + depends on (!BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_OPENGL_ES) && \ + BR2_PACKAGE_QT5JSBACKEND_AVAILABLE diff --git a/package/qt5/qt5quickcontrols/qt5quickcontrols.mk b/package/qt5/qt5quickcontrols/qt5quickcontrols.mk new file mode 100644 index 0000000000..f9008b427c --- /dev/null +++ b/package/qt5/qt5quickcontrols/qt5quickcontrols.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# qt5quickcontrols +# +################################################################################ + +QT5QUICKCONTROLS_VERSION = $(QT5_VERSION) +QT5QUICKCONTROLS_SITE = $(QT5_SITE) +QT5QUICKCONTROLS_SOURCE = qtquickcontrols-opensource-src-$(QT5QUICKCONTROLS_VERSION).tar.xz +QT5QUICKCONTROLS_DEPENDENCIES = qt5base qt5declarative +QT5QUICKCONTROLS_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5QUICKCONTROLS_LICENSE = LGPLv2.1 or GPLv3.0 +QT5QUICKCONTROLS_LICENSE_FILES = LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt +else +QT5QUICKCONTROLS_LICENSE = Commercial license +QT5QUICKCONTROLS_REDISTRIBUTE = NO +endif + +define QT5QUICKCONTROLS_CONFIGURE_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5QUICKCONTROLS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5QUICKCONTROLS_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install +endef + +define QT5QUICKCONTROLS_INSTALL_TARGET_CMDS + cp -dpfr $(STAGING_DIR)/usr/qml/QtQuick $(TARGET_DIR)/usr/qml +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5script/Config.in b/package/qt5/qt5script/Config.in new file mode 100644 index 0000000000..3c5d60c127 --- /dev/null +++ b/package/qt5/qt5script/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_QT5SCRIPT + bool "qt5script" + select BR2_PACKAGE_QT5BASE + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5script module. + + http://qt-project.org diff --git a/package/qt5/qt5script/qt5script.mk b/package/qt5/qt5script/qt5script.mk new file mode 100644 index 0000000000..e62e0ac46d --- /dev/null +++ b/package/qt5/qt5script/qt5script.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# qt5script +# +################################################################################ + +QT5SCRIPT_VERSION = $(QT5_VERSION) +QT5SCRIPT_SITE = $(QT5_SITE) +QT5SCRIPT_SOURCE = qtscript-opensource-src-$(QT5SCRIPT_VERSION).tar.xz +QT5SCRIPT_DEPENDENCIES = qt5base +QT5SCRIPT_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5SCRIPT_LICENSE = LGPLv2.1 or GPLv3.0 +QT5SCRIPT_LICENSE_FILES = LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt +else +QT5SCRIPT_LICENSE = Commercial license +QT5SCRIPT_REDISTRIBUTE = NO +endif + +define QT5SCRIPT_CONFIGURE_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5SCRIPT_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5SCRIPT_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_PREFER_STATIC_LIB),) +define QT5SCRIPT_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5Script*.so.* $(TARGET_DIR)/usr/lib +endef +endif + +$(eval $(generic-package)) diff --git a/package/qt5/qt5sensors/Config.in b/package/qt5/qt5sensors/Config.in new file mode 100644 index 0000000000..3e1c4b7c5a --- /dev/null +++ b/package/qt5/qt5sensors/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_QT5SENSORS + bool "qt5sensors" + select BR2_PACKAGE_QT5BASE + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5sensors module. + + http://qt-project.org diff --git a/package/qt5/qt5sensors/qt5sensors.mk b/package/qt5/qt5sensors/qt5sensors.mk new file mode 100644 index 0000000000..21ec36c21f --- /dev/null +++ b/package/qt5/qt5sensors/qt5sensors.mk @@ -0,0 +1,56 @@ +################################################################################ +# +# qt5sensors +# +################################################################################ + +QT5SENSORS_VERSION = $(QT5_VERSION) +QT5SENSORS_SITE = $(QT5_SITE) +QT5SENSORS_SOURCE = qtsensors-opensource-src-$(QT5SENSORS_VERSION).tar.xz +QT5SENSORS_DEPENDENCIES = qt5base +QT5SENSORS_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5SENSORS_LICENSE = LGPLv2.1 or GPLv3.0 +QT5SENSORS_LICENSE_FILES = LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt +else +QT5SENSORS_LICENSE = Commercial license +QT5SENSORS_REDISTRIBUTE = NO +endif + +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y) +QT5SENSORS_DEPENDENCIES += qt5declarative +endif + +define QT5SENSORS_CONFIGURE_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5SENSORS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5SENSORS_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_PREFER_STATIC_LIB),) +define QT5SENSORS_INSTALL_TARGET_LIBS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5Sensors.so.* $(TARGET_DIR)/usr/lib + cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/sensor* $(TARGET_DIR)/usr/lib/qt/plugins +endef +endif + +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y) +define QT5SENSORS_INSTALL_TARGET_QMLS + cp -dpfr $(STAGING_DIR)/usr/qml/QtSensors $(TARGET_DIR)/usr/qml +endef +endif + +define QT5SENSORS_INSTALL_TARGET_CMDS + $(QT5SENSORS_INSTALL_TARGET_LIBS) + $(QT5SENSORS_INSTALL_TARGET_QMLS) +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5serialport/Config.in b/package/qt5/qt5serialport/Config.in new file mode 100644 index 0000000000..772de88805 --- /dev/null +++ b/package/qt5/qt5serialport/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_QT5SERIALPORT + bool "qt5serialport" + select BR2_PACKAGE_QT5BASE + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5serialport module. + + http://qt-project.org diff --git a/package/qt5/qt5serialport/qt5serialport.mk b/package/qt5/qt5serialport/qt5serialport.mk new file mode 100644 index 0000000000..0328ef8d64 --- /dev/null +++ b/package/qt5/qt5serialport/qt5serialport.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# qt5serialport +# +################################################################################ + +QT5SERIALPORT_VERSION = $(QT5_VERSION) +QT5SERIALPORT_SITE = $(QT5_SITE) +QT5SERIALPORT_SOURCE = qtserialport-opensource-src-$(QT5SERIALPORT_VERSION).tar.xz +QT5SERIALPORT_DEPENDENCIES = qt5base +QT5SERIALPORT_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5SERIALPORT_LICENSE = LGPLv2.1 or GPLv3.0 +QT5SERIALPORT_LICENSE_FILES = LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt +else +QT5SERIALPORT_LICENSE = Commercial license +QT5SERIALPORT_REDISTRIBUTE = NO +endif + +define QT5SERIALPORT_CONFIGURE_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5SERIALPORT_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5SERIALPORT_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_PREFER_STATIC_LIB),) +define QT5SERIALPORT_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5SerialPort.so.* $(TARGET_DIR)/usr/lib +endef +endif + +$(eval $(generic-package)) diff --git a/package/qt5/qt5svg/Config.in b/package/qt5/qt5svg/Config.in new file mode 100644 index 0000000000..27e6b05da6 --- /dev/null +++ b/package/qt5/qt5svg/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_QT5SVG + bool "qt5svg" + select BR2_PACKAGE_QT5BASE + select BR2_PACKAGE_QT5BASE_GUI + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5svg module. + + http://qt-project.org diff --git a/package/qt5/qt5svg/qt5svg.mk b/package/qt5/qt5svg/qt5svg.mk new file mode 100644 index 0000000000..2ff7fc8c7c --- /dev/null +++ b/package/qt5/qt5svg/qt5svg.mk @@ -0,0 +1,49 @@ +################################################################################ +# +# qt5svg +# +################################################################################ + +QT5SVG_VERSION = $(QT5_VERSION) +QT5SVG_SITE = $(QT5_SITE) +QT5SVG_SOURCE = qtsvg-opensource-src-$(QT5SVG_VERSION).tar.xz +QT5SVG_DEPENDENCIES = qt5base +QT5SVG_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5SVG_LICENSE = LGPLv2.1 or GPLv3.0 +# Here we would like to get license files from qt5base, but qt5base +# may not be extracted at the time we get the legal-info for qt5svg. +else +QT5SVG_LICENSE = Commercial license +QT5SVG_REDISTRIBUTE = NO +endif + +define QT5SVG_CONFIGURE_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5SVG_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5SVG_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_PACKAGE_QT5BASE_WIDGETS),y) +define QT5SVG_INSTALL_ICONENGINES + cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/iconengines $(TARGET_DIR)/usr/lib/qt/plugins +endef +endif + +ifeq ($(BR2_PREFER_STATIC_LIB),) +define QT5SVG_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5Svg*.so.* $(TARGET_DIR)/usr/lib + cp -dpf $(STAGING_DIR)/usr/lib/qt/plugins/imageformats/libqsvg.so $(TARGET_DIR)/usr/lib/qt/plugins/imageformats/ + $(QT5SVG_INSTALL_ICONENGINES) +endef +endif + +$(eval $(generic-package)) diff --git a/package/qt5/qt5webkit/Config.in b/package/qt5/qt5webkit/Config.in new file mode 100644 index 0000000000..9eb5ef8375 --- /dev/null +++ b/package/qt5/qt5webkit/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_QT5WEBKIT + bool "qt5webkit" + select BR2_PACKAGE_QT5BASE + select BR2_PACKAGE_QT5BASE_ICU + select BR2_PACKAGE_QT5BASE_GUI + select BR2_PACKAGE_SQLITE + select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_QT5BASE_XCB + select BR2_PACKAGE_XLIB_LIBXRENDER if BR2_PACKAGE_QT5BASE_XCB + # This module does not support static linking + depends on !BR2_PREFER_STATIC_LIB + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5webkit module. + + http://qt-project.org diff --git a/package/qt5/qt5webkit/qt5webkit-0001-egl-includepath.patch b/package/qt5/qt5webkit/qt5webkit-0001-egl-includepath.patch new file mode 100644 index 0000000000..de5bcff0d3 --- /dev/null +++ b/package/qt5/qt5webkit/qt5webkit-0001-egl-includepath.patch @@ -0,0 +1,40 @@ +From d6b1b33a12c0cf6c52667afafe34e58a7b00d0d8 Mon Sep 17 00:00:00 2001 +From: Floris Bos +Date: Thu, 7 Mar 2013 19:25:17 +0100 +Subject: [PATCH] Webcore: add EGL and OpenGL (ES) INCDIR to INCLUDEPATH + +When building with 3D graphics support enabled, add the +OpenGL (ES) and EGL include directories to the include path. + +Signed-off-by: Floris Bos +--- + Source/WebCore/Target.pri | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/Source/WebCore/Target.pri b/Source/WebCore/Target.pri +index 2669748..421a849 100644 +--- a/Source/WebCore/Target.pri ++++ b/Source/WebCore/Target.pri +@@ -3992,15 +3992,19 @@ use?(3D_GRAPHICS) { + + contains(QT_CONFIG, opengl) | contains(QT_CONFIG, opengles2) { + !contains(QT_CONFIG, opengles2) { ++ INCLUDEPATH += $$QMAKE_INCDIR_OPENGL + SOURCES += \ + platform/graphics/opengl/GraphicsContext3DOpenGL.cpp \ + platform/graphics/opengl/Extensions3DOpenGL.cpp + } else { ++ INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES2 + SOURCES += \ + platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp \ + platform/graphics/opengl/Extensions3DOpenGLES.cpp + } + ++ !isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL ++ + HEADERS += platform/graphics/opengl/Extensions3DOpenGL.h + + SOURCES += \ +-- +1.7.10.4 + diff --git a/package/qt5/qt5webkit/qt5webkit-0002-ANGLE-doesn-t-build-with-bison-3.0.patch b/package/qt5/qt5webkit/qt5webkit-0002-ANGLE-doesn-t-build-with-bison-3.0.patch new file mode 100644 index 0000000000..e69e137c54 --- /dev/null +++ b/package/qt5/qt5webkit/qt5webkit-0002-ANGLE-doesn-t-build-with-bison-3.0.patch @@ -0,0 +1,38 @@ +From 60ba8bd5b3575d0c7740571fbb4e681b21a49a82 Mon Sep 17 00:00:00 2001 +From: Allan Sandfeld Jensen +Date: Fri, 16 Aug 2013 18:27:07 +0200 +Subject: [PATCH] ANGLE doesn't build with bison 3.0 + +https://bugs.webkit.org/show_bug.cgi?id=119798 + +Reviewed by Antti Koivisto. + +Make glslang.y compatible with bison 3.0 +by using %lex-param to set YYLEX_PARAM. + +* src/compiler/glslang.y: + +git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154109 268f45cc-cd09-0410-ab3c-d52691b4dbfc + +Task-number: QTBUG-32913 +Change-Id: I15505d31f0588c4d558b73befdb9d2358e29c1a3 +Reviewed-by: Jocelyn Turcotte +--- + Source/ThirdParty/ANGLE/src/compiler/glslang.y | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Source/ThirdParty/ANGLE/src/compiler/glslang.y b/Source/ThirdParty/ANGLE/src/compiler/glslang.y +index 3cad335..b41e95a 100644 +--- a/Source/ThirdParty/ANGLE/src/compiler/glslang.y ++++ b/Source/ThirdParty/ANGLE/src/compiler/glslang.y +@@ -47,6 +47,7 @@ WHICH GENERATES THE GLSL ES PARSER (glslang_tab.cpp AND glslang_tab.h). + %expect 1 /* One shift reduce conflict because of if | else */ + %pure-parser + %parse-param {TParseContext* context} ++%lex-param {YYLEX_PARAM} + + %union { + struct { +-- +1.8.4.2 + diff --git a/package/qt5/qt5webkit/qt5webkit.mk b/package/qt5/qt5webkit/qt5webkit.mk new file mode 100644 index 0000000000..300b9d9904 --- /dev/null +++ b/package/qt5/qt5webkit/qt5webkit.mk @@ -0,0 +1,56 @@ +################################################################################ +# +# qt5webkit +# +################################################################################ + +QT5WEBKIT_VERSION = $(QT5_VERSION) +QT5WEBKIT_SITE = $(QT5_SITE) +QT5WEBKIT_SOURCE = qtwebkit-opensource-src-$(QT5WEBKIT_VERSION).tar.xz +QT5WEBKIT_DEPENDENCIES = qt5base sqlite host-ruby host-gperf host-bison +QT5WEBKIT_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5WEBKIT_LICENSE = LGPLv2.1 or GPLv3.0 +# Here we would like to get license files from qt5base, but qt5base +# may not be extracted at the time we get the legal-info for +# qt5script. +else +QT5WEBKIT_LICENSE = Commercial license +QT5WEBKIT_REDISTRIBUTE = NO +endif + +ifeq ($(BR2_PACKAGE_QT5BASE_XCB),y) +QT5WEBKIT_DEPENDENCIES += xlib_libXext xlib_libXrender +endif + +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y) +QT5WEBKIT_DEPENDENCIES += qt5declarative +endif + +define QT5WEBKIT_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5WEBKIT_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5WEBKIT_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y) +define QT5WEBKIT_INSTALL_TARGET_QMLS + cp -dpfr $(STAGING_DIR)/usr/qml/QtWebKit $(TARGET_DIR)/usr/qml/ +endef +endif + +define QT5WEBKIT_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5WebKit*.so.* $(TARGET_DIR)/usr/lib + cp -dpf $(@D)/bin/* $(TARGET_DIR)/usr/bin/ + $(QT5WEBKIT_INSTALL_TARGET_QMLS) +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5x11extras/Config.in b/package/qt5/qt5x11extras/Config.in new file mode 100644 index 0000000000..79ff9b95e1 --- /dev/null +++ b/package/qt5/qt5x11extras/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_QT5X11EXTRAS + bool "qt5x11extras" + select BR2_PACKAGE_QT5BASE_WIDGETS + depends on BR2_PACKAGE_QT5BASE_XCB + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5x11extras module. + + http://qt-project.org diff --git a/package/qt5/qt5x11extras/qt5x11extras.mk b/package/qt5/qt5x11extras/qt5x11extras.mk new file mode 100644 index 0000000000..237fe3221c --- /dev/null +++ b/package/qt5/qt5x11extras/qt5x11extras.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# qt5x11extras +# +################################################################################ + +QT5X11EXTRAS_VERSION = $(QT5_VERSION) +QT5X11EXTRAS_SITE = $(QT5_SITE) +QT5X11EXTRAS_SOURCE = qtx11extras-opensource-src-$(QT5X11EXTRAS_VERSION).tar.xz +QT5X11EXTRAS_DEPENDENCIES = qt5base +QT5X11EXTRAS_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5X11EXTRAS_LICENSE = LGPLv2.1 or GPLv3.0 +QT5X11EXTRAS_LICENSE_FILES = LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt +else +QT5X11EXTRAS_LICENSE = Commercial license +QT5X11EXTRAS_REDISTRIBUTE = NO +endif + +define QT5X11EXTRAS_CONFIGURE_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5X11EXTRAS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5X11EXTRAS_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_PREFER_STATIC_LIB),) +define QT5X11EXTRAS_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5X11Extras.so.* $(TARGET_DIR)/usr/lib +endef +endif + +$(eval $(generic-package)) diff --git a/package/qt5/qt5xmlpatterns/Config.in b/package/qt5/qt5xmlpatterns/Config.in new file mode 100644 index 0000000000..6ea746639d --- /dev/null +++ b/package/qt5/qt5xmlpatterns/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_QT5XMLPATTERNS + bool "qt5xmlpatterns" + select BR2_PACKAGE_QT5BASE + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5xmlpatterns module. + + http://qt-project.org diff --git a/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk new file mode 100644 index 0000000000..6f4fdc8d66 --- /dev/null +++ b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# qt5xmlpatterns +# +################################################################################ + +QT5XMLPATTERNS_VERSION = $(QT5_VERSION) +QT5XMLPATTERNS_SITE = $(QT5_SITE) +QT5XMLPATTERNS_SOURCE = qtxmlpatterns-opensource-src-$(QT5XMLPATTERNS_VERSION).tar.xz +QT5XMLPATTERNS_DEPENDENCIES = qt5base +QT5XMLPATTERNS_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5XMLPATTERNS_LICENSE = LGPLv2.1 or GPLv3.0 +QT5XMLPATTERNS_LICENSE_FILES = LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt +else +QT5XMLPATTERNS_LICENSE = Commercial license +QT5XMLPATTERNS_REDISTRIBUTE = NO +endif + +define QT5XMLPATTERNS_CONFIGURE_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5XMLPATTERNS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5XMLPATTERNS_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_PREFER_STATIC_LIB),) +define QT5XMLPATTERNS_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5XmlPatterns*.so.* $(TARGET_DIR)/usr/lib +endef +endif + +$(eval $(generic-package)) diff --git a/package/qtuio/Config.in b/package/qtuio/Config.in new file mode 100644 index 0000000000..19499fd6e0 --- /dev/null +++ b/package/qtuio/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_QTUIO + bool "qtuio" + depends on BR2_PACKAGE_QT_GUI_MODULE + help + Implementation of an interface connecting TUIO messages + and QT events + + https://github.com/x29a/qTUIO + +config BR2_QTUIO_EXAMPLES + bool "qtuio examples" + depends on BR2_PACKAGE_QTUIO + help + Build and install qtuio examples + +comment "qtuio depends on QT gui module" + depends on !BR2_PACKAGE_QT_GUI_MODULE + diff --git a/package/qtuio/qtuio-TuioServer.cpp-add-missing-include.patch b/package/qtuio/qtuio-TuioServer.cpp-add-missing-include.patch new file mode 100644 index 0000000000..99337026df --- /dev/null +++ b/package/qtuio/qtuio-TuioServer.cpp-add-missing-include.patch @@ -0,0 +1,28 @@ +From 4dd7cad8c95484a882eaa2aeaa74595a3dd93a07 Mon Sep 17 00:00:00 2001 +From: Stephan Hoffmann +Date: Sun, 2 Dec 2012 13:36:41 +0100 +Subject: [PATCH] TuioServer.cpp: add missing include + +If usleep() is used the header has to be included + +Signed-off-by: Stephan Hoffmann +--- + src/3rdparty/tuio/TuioServer.cpp | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/src/3rdparty/tuio/TuioServer.cpp b/src/3rdparty/tuio/TuioServer.cpp +index f17bef9..851144c 100644 +--- a/src/3rdparty/tuio/TuioServer.cpp ++++ b/src/3rdparty/tuio/TuioServer.cpp +@@ -25,6 +25,8 @@ using namespace TUIO; + using namespace osc; + + #ifndef WIN32 ++#include ++ + static void* ThreadFunc( void* obj ) + #else + static DWORD WINAPI ThreadFunc( LPVOID obj ) +-- +1.7.0.4 + diff --git a/package/qtuio/qtuio-dont-append-_d-for-debug.patch b/package/qtuio/qtuio-dont-append-_d-for-debug.patch new file mode 100644 index 0000000000..fbaaf19222 --- /dev/null +++ b/package/qtuio/qtuio-dont-append-_d-for-debug.patch @@ -0,0 +1,29 @@ +[PATCH] don't append _d to library name when Qt is built with debug support + +qtuio appends _d to the library name when Qt was built with debug support, +breaking linking step for examples and staging/target install. + +There's no real advantage to the _d suffix, so simply fix it by removing +the logic appending _d. + +Signed-off-by: Peter Korsgaard +--- + src/qTUIO.pro | 5 ----- + 1 file changed, 5 deletions(-) + +Index: qtuio-abe4973ff6/src/qTUIO.pro +=================================================================== +--- qtuio-abe4973ff6.orig/src/qTUIO.pro ++++ qtuio-abe4973ff6/src/qTUIO.pro +@@ -16,11 +16,6 @@ + win32:LIBS += ws2_32.lib \ + winmm.lib + +-# Changes the name of the target, when is debug mode +-CONFIG( debug, debug|release ) { +- TARGET = $${TARGET}_d +- BUILD_NAME = debug +-} + CONFIG( release, debug|release ):BUILD_NAME = release + + # Temporary folders for the auxiliar files diff --git a/package/qtuio/qtuio.mk b/package/qtuio/qtuio.mk new file mode 100644 index 0000000000..1133591226 --- /dev/null +++ b/package/qtuio/qtuio.mk @@ -0,0 +1,70 @@ +################################################################################ +# +# qtuio +# +################################################################################ + +QTUIO_VERSION = abe4973ff60654aad9df7037c4ca15c45f811d24 +QTUIO_SITE = git://github.com/x29a/qTUIO.git +QTUIO_INSTALL_STAGING = YES +QTUIO_DEPENDENCIES = qt + +QTUIO_LICENSE = GPLv3+ +QTUIO_LICENSE_FILES = COPYING + +# The pong example needs QtOpenGL support, which might become available +# some time in the future. Then add pong to the list of examples. +QTUIO_EXAMPLES = dials fingerpaint knobs pinchzoom + +ifeq ($(BR2_QTUIO_EXAMPLES),y) +define QTUIO_CONFIGURE_EXAMPLES + for example in $(QTUIO_EXAMPLES) ; do \ + (cd $(@D)/examples/$${example} && $(QT_QMAKE)) ; \ + done +endef +endif + +define QTUIO_CONFIGURE_CMDS + cd $(@D)/src && $(QT_QMAKE) + $(QTUIO_CONFIGURE_EXAMPLES) +endef + +ifeq ($(BR2_QTUIO_EXAMPLES),y) +define QTUIO_BUILD_EXAMPLES + for example in $(QTUIO_EXAMPLES) ; do \ + ($(MAKE) -C $(@D)/examples/$${example}) ; \ + done +endef +endif + +define QTUIO_BUILD_CMDS + $(MAKE) -C $(@D)/src + $(QTUIO_BUILD_EXAMPLES) +endef + +# Unfortunately, there is no working "install" target available +ifeq ($(BR2_QTUIO_EXAMPLES),y) +define QTUIO_INSTALL_EXAMPLES + for example in $(QTUIO_EXAMPLES) ; do \ + ($(INSTALL) -D -m 0755 $(@D)/examples/$${example}/$${example} $(TARGET_DIR)/usr/share/qtuio/$${example}) ; \ + done +endef +endif + +define QTUIO_INSTALL_TARGET_CMDS + cp -dpf $(@D)/lib/libqTUIO.so* $(TARGET_DIR)/usr/lib + $(QTUIO_INSTALL_EXAMPLES) +endef + +define QTUIO_INSTALL_STAGING_CMDS + cp -dpf $(@D)/lib/libqTUIO.so* $(STAGING_DIR)/usr/lib +endef + +define QTUIO_CLEAN_CMDS + $(MAKE) -C $(@D)/src clean + for example in $(QTUIO_EXAMPLES) ; do \ + ($(MAKE) -C $(@D)/examples/$${example} clean) ; \ + done +endef + +$(eval $(generic-package)) diff --git a/package/quagga/Config.in b/package/quagga/Config.in index 9ca2f980ec..e79ab02b24 100644 --- a/package/quagga/Config.in +++ b/package/quagga/Config.in @@ -10,11 +10,16 @@ if BR2_PACKAGE_QUAGGA config BR2_PACKAGE_QUAGGA_ZEBRA bool "zebra daemon" + depends on BR2_INET_IPV6 help Build zebra daemon. +comment "zebra daemon needs a toolchain w/ IPv6" + depends on !BR2_INET_IPV6 + config BR2_PACKAGE_QUAGGA_TCP_ZEBRA bool "Use TCP sockets between zebra and protocol daemons" + depends on BR2_PACKAGE_QUAGGA_ZEBRA help Use a TCP socket to communicate between zebra (supervisor) and the different protocol daemons. @@ -22,6 +27,12 @@ config BR2_PACKAGE_QUAGGA_TCP_ZEBRA You'll want this enabled if zebra and the protocol daemon(s) run on different hosts. +config BR2_PACKAGE_QUAGGA_BABELD + bool "BABEL protocol" + depends on BR2_INET_IPV6 + help + Build babeld daemon. + config BR2_PACKAGE_QUAGGA_BGPD bool "BPGv4+ protocol" help @@ -69,8 +80,12 @@ config BR2_PACKAGE_QUAGGA_WATCHQUAGGA config BR2_PACKAGE_QUAGGA_SNMP bool "SNMP support" + depends on BR2_USE_MMU # net-snmp select BR2_PACKAGE_NETSNMP help Make quagga information available via SNMP SMUX. +comment "AgentX support must be enabled in net-snmp or the build will break" + depends on BR2_PACKAGE_QUAGGA_SNMP + endif diff --git a/package/quagga/quagga.mk b/package/quagga/quagga.mk index a807f0f4a7..19a64884a9 100644 --- a/package/quagga/quagga.mk +++ b/package/quagga/quagga.mk @@ -1,90 +1,34 @@ -############################################################# +################################################################################ # -# quagga suite +# quagga # -############################################################# -QUAGGA_VERSION:=0.99.17 -QUAGGA_SOURCE:=quagga-$(QUAGGA_VERSION).tar.gz -QUAGGA_SITE:=http://www.quagga.net/download/ +################################################################################ +QUAGGA_VERSION = 0.99.22.4 +QUAGGA_SOURCE = quagga-$(QUAGGA_VERSION).tar.xz +QUAGGA_SITE = http://download.savannah.gnu.org/releases/quagga QUAGGA_DEPENDENCIES = host-gawk +QUAGGA_LICENSE = GPLv2+ +QUAGGA_LICENSE_FILES = COPYING QUAGGA_CONF_OPT = --program-transform-name='' --enable-netlink -ifeq ($(BR2_PACKAGE_QUAGGA_ZEBRA),y) -QUAGGA_CONF_OPT+=--enable-zebra -else -QUAGGA_CONF_OPT+=--disable-zebra -endif - -ifeq ($(BR2_PACKAGE_QUAGGA_BGPD),y) -QUAGGA_CONF_OPT+=--enable-bgpd -else -QUAGGA_CONF_OPT+=--disable-bgpd -endif - -ifeq ($(BR2_PACKAGE_QUAGGA_RIPD),y) -QUAGGA_CONF_OPT+=--enable-ripd -else -QUAGGA_CONF_OPT+=--disable-ripd -endif - -ifeq ($(BR2_PACKAGE_QUAGGA_RIPNGD),y) -QUAGGA_CONF_OPT+=--enable-ripngd -else -QUAGGA_CONF_OPT+=--disable-ripngd -endif - -ifeq ($(BR2_PACKAGE_QUAGGA_OSPFD),y) -QUAGGA_CONF_OPT+=--enable-ospfd -else -QUAGGA_CONF_OPT+=--disable-ospfd -endif - -ifeq ($(BR2_PACKAGE_QUAGGA_OSPF6D),y) -QUAGGA_CONF_OPT+=--enable-ospf6d -else -QUAGGA_CONF_OPT+=--disable-ospf6d -endif - -ifeq ($(BR2_PACKAGE_QUAGGA_WATCHQUAGGA),y) -QUAGGA_CONF_OPT+=--enable-watchquagga -else -QUAGGA_CONF_OPT+=--disable-watchquagga -endif - -ifeq ($(BR2_PACKAGE_QUAGGA_ISISD),y) -QUAGGA_CONF_OPT+=--enable-isisd -else -QUAGGA_CONF_OPT+=--disable-isisd -endif - -ifeq ($(BR2_PACKAGE_QUAGGA_BGP_ANNOUNCE),y) -QUAGGA_CONF_OPT+=--enable-bgp-announce -else -QUAGGA_CONF_OPT+=--disable-bgp-announce -endif +QUAGGA_CONF_OPT += $(if $(BR2_PACKAGE_QUAGGA_ZEBRA),--enable-zebra,--disable-zebra) +QUAGGA_CONF_OPT += $(if $(BR2_PACKAGE_QUAGGA_BABELD),--enable-babeld,--disable-babeld) +QUAGGA_CONF_OPT += $(if $(BR2_PACKAGE_QUAGGA_BGPD),--enable-bgpd,--disable-bgpd) +QUAGGA_CONF_OPT += $(if $(BR2_PACKAGE_QUAGGA_RIPD),--enable-ripd,--disable-ripd) +QUAGGA_CONF_OPT += $(if $(BR2_PACKAGE_QUAGGA_RIPNGD),--enable-ripngd,--disable-ripngd) +QUAGGA_CONF_OPT += $(if $(BR2_PACKAGE_QUAGGA_OSPFD),--enable-ospfd,--disable-ospfd) +QUAGGA_CONF_OPT += $(if $(BR2_PACKAGE_QUAGGA_OSPF6D),--enable-ospf6d,--disable-ospf6d) +QUAGGA_CONF_OPT += $(if $(BR2_PACKAGE_QUAGGA_WATCHQUAGGA),--enable-watchquagga,--disable-watchquagga) +QUAGGA_CONF_OPT += $(if $(BR2_PACKAGE_QUAGGA_ISISD),--enable-isisd,--disable-isisd) +QUAGGA_CONF_OPT += $(if $(BR2_PACKAGE_QUAGGA_BGP_ANNOUNCE),--enable-bgp-announce,--disable-bgp-announce) +QUAGGA_CONF_OPT += $(if $(BR2_PACKAGE_QUAGGA_TCP_ZERBRA),--enable-tcp-zebra,--disable-tcp-zebra) +QUAGGA_CONF_OPT += $(if $(BR2_PACKAGE_QUAGGA_OPAQUE_LSA),--enable-opaque-lsa,--disable-opaque-lsa) ifeq ($(BR2_PACKAGE_QUAGGA_SNMP),y) -QUAGGA_CONF_OPT+=--enable-snmp -QUAGGA_DEPENDENCIES+=netsnmp -# SNMP support tries -lcrypto by default, disable it if we ain't got openssl -ifneq ($(BR2_PACKAGE_OPENSSL),y) -QUAGGA_CONF_OPT+=--without-crypto -endif -else -QUAGGA_CONF_OPT+=--disable-snmp -endif - -ifeq ($(BR2_PACKAGE_QUAGGA_TCP_ZEBRA),y) -QUAGGA_CONF_OPT+=--enable-tcp-zebra -else -QUAGGA_CONF_OPT+=--disable-tcp-zebra -endif - -ifeq ($(BR2_PACKAGE_QUAGGA_OPAQUE_LSA),y) -QUAGGA_CONF_OPT+=--enable-opaque-lsa -else -QUAGGA_CONF_OPT+=--disable-opaque-lsa +QUAGGA_CONF_ENV += ac_cv_path_NETSNMP_CONFIG=$(STAGING_DIR)/usr/bin/net-snmp-config +QUAGGA_CONF_OPT += --enable-snmp=agentx +QUAGGA_DEPENDENCIES += netsnmp endif -$(eval $(call AUTOTARGETS,package,quagga)) +$(eval $(autotools-package)) diff --git a/package/quota/Config.in b/package/quota/Config.in new file mode 100644 index 0000000000..69f03afd62 --- /dev/null +++ b/package/quota/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_QUOTA + bool "quota" + depends on BR2_LARGEFILE + depends on BR2_USE_WCHAR + depends on BR2_USE_MMU # fork() + depends on !(BR2_microblazeel || BR2_microblazebe) # util-linux + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC || BR2_TOOLCHAIN_HAS_THREADS # libtirpc + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_BINARIES + select BR2_PACKAGE_UTIL_LINUX_MOUNT + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + select BR2_PACKAGE_LIBTIRPC if !BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Implementation of the disk quota system. + + http://sourceforge.net/projects/linuxquota/ + +comment "quota needs a toolchain w/ largefile, wchar, threads" + depends on BR2_USE_MMU && !(BR2_microblazeel || BR2_microblazebe) + depends on !BR2_LARGEFILE || \ + !BR2_USE_WCHAR || \ + !(BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_HAS_NATIVE_RPC) diff --git a/package/quota/quota-tools-getrpcbynumber.patch b/package/quota/quota-tools-getrpcbynumber.patch new file mode 100644 index 0000000000..3fed853c0d --- /dev/null +++ b/package/quota/quota-tools-getrpcbynumber.patch @@ -0,0 +1,42 @@ +allow usage of getrpcbynumber() instead of getrpcbynumber_r() + +libtirpc does not implement the reentrant function getrpcbynumber_r(), +so allow quota to use the non-reentrant version getrpcbynumber(). This +should not be a problem as quota tools are not multi-threaded. + +Signed-off-by: Thomas Petazzoni + +Index: b/configure.in +=================================================================== +--- a/configure.in ++++ b/configure.in +@@ -182,6 +182,12 @@ + AC_C_CONST + AC_C_INLINE + ++AC_CHECK_FUNCS([getrpcbynumber getrpcbynumber_r]) ++ ++if test "$ac_cv_func_getrpcbynumber_r" != "yes" -a "$ac_cv_func_getrpcbynumber" != "yes"; then ++ AC_MSG_ERROR([Neither getrpcbynumber_r nor getrpcbynumber are available]) ++fi ++ + AC_ARG_ENABLE(altformat, + [ --enable-altformat=[yes/no] Enable alternative format used by edquota [default=yes].], + , +Index: b/svc_socket.c +=================================================================== +--- a/svc_socket.c ++++ b/svc_socket.c +@@ -55,7 +55,12 @@ + addr.sin_family = AF_INET; + + if (!port) { ++#if HAVE_GETRPCBYNUMBER_R + ret = getrpcbynumber_r(number, &rpcbuf, rpcdata, sizeof(rpcdata), &rpcp); ++#else ++ rpcp = getrpcbynumber(number); ++ ret = 0; ++#endif + if (ret == 0 && rpcp != NULL) { + /* First try name */ + ret = getservbyname_r(rpcp->r_name, proto, &servbuf, servdata, diff --git a/package/quota/quota.mk b/package/quota/quota.mk new file mode 100644 index 0000000000..4febb50901 --- /dev/null +++ b/package/quota/quota.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# quota +# +################################################################################ + +QUOTA_VERSION = 4.00 +QUOTA_SITE = http://downloads.sourceforge.net/project/linuxquota/quota-tools/$(QUOTA_VERSION) +QUOTA_DEPENDENCIES = host-gettext +QUOTA_AUTORECONF = YES + +QUOTA_CFLAGS = $(TARGET_CFLAGS) +QUOTA_LDFLAGS = $(TARGET_LDFLAGS) + +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) +QUOTA_DEPENDENCIES += gettext +QUOTA_LDFLAGS += -lintl +endif + +ifeq ($(BR2_PACKAGE_LIBTIRPC),y) +QUOTA_DEPENDENCIES += libtirpc +QUOTA_CFLAGS += -I$(STAGING_DIR)/usr/include/tirpc/ +QUOTA_LDFLAGS += -ltirpc +endif + +QUOTA_MAKE_OPT = $(TARGET_CONFIGURE_OPTS) CFLAGS="$(QUOTA_CFLAGS) -D_GNU_SOURCE" LDFLAGS="$(QUOTA_LDFLAGS)" +QUOTA_CONF_ENV = \ + CFLAGS="$(QUOTA_CFLAGS) -D_GNU_SOURCE" LDFLAGS="$(QUOTA_LDFLAGS)" + +# Package uses autoconf but not automake. +QUOTA_INSTALL_TARGET_OPT = \ + ROOTDIR=$(TARGET_DIR) \ + install + +$(eval $(autotools-package)) diff --git a/package/qwt/Config.in b/package/qwt/Config.in new file mode 100644 index 0000000000..3dc6f2275e --- /dev/null +++ b/package/qwt/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_QWT + bool "qwt" + depends on BR2_PACKAGE_QT_GUI_MODULE + help + Qwt is a graphics extension to the Qt GUI application + framework. It provides a 2D plotting widget and more. + + http://qwt.sourceforge.net/ + +if BR2_PACKAGE_QWT + +config BR2_PACKAGE_QWT_SVG + bool "SVG support" + select BR2_PACKAGE_QT_SVG + +config BR2_PACKAGE_QWT_MATHML + bool "MathML support" + +endif + +comment "qwt depends on QT gui module" + depends on !BR2_PACKAGE_QT_GUI_MODULE diff --git a/package/qwt/qwt-remove-installed-check.patch b/package/qwt/qwt-remove-installed-check.patch new file mode 100644 index 0000000000..7490a7b776 --- /dev/null +++ b/package/qwt/qwt-remove-installed-check.patch @@ -0,0 +1,32 @@ +Remove useless check at build time + +At build time, Qwt looks whether the Qwt libraries are already +installed in the destination directory, to avoid confusion between +libraries installed system-wide and locally-built shared +libraries. However, this behaviour conflicts with how Buildroot builds +and installs libraries, so get rid of it. + +Signed-off-by: Thomas Petazzoni + +Index: qwt-6.0.0/qwtbuild.pri +=================================================================== +--- qwt-6.0.0.orig/qwtbuild.pri 2011-09-12 19:37:35.663275952 +0200 ++++ qwt-6.0.0/qwtbuild.pri 2011-09-12 19:37:41.913275949 +0200 +@@ -53,17 +53,3 @@ + !debug_and_release { + OBJECTS_DIR = obj + } +- +-unix { +- +- exists( $${QMAKE_LIBDIR_QT}/libqwt.* ) { +- +- # On some Linux distributions the Qwt libraries are installed +- # in the same directory as the Qt libraries. Unfortunately +- # qmake always adds QMAKE_LIBDIR_QT at the beginning of the +- # linker path, so that the installed libraries will be +- # used instead of the local ones. +- +- error( "local build will conflict with $${QMAKE_LIBDIR_QT}/libqwt.*" ) +- } +-} diff --git a/package/qwt/qwt.mk b/package/qwt/qwt.mk new file mode 100644 index 0000000000..aa5ec9bea9 --- /dev/null +++ b/package/qwt/qwt.mk @@ -0,0 +1,52 @@ +################################################################################ +# +# qwt +# +################################################################################ + +QWT_VERSION = 6.0.2 +QWT_SOURCE = qwt-$(QWT_VERSION).tar.bz2 +QWT_SITE = http://downloads.sourceforge.net/project/qwt/qwt/$(QWT_VERSION) +QWT_INSTALL_STAGING = YES +QWT_DEPENDENCIES = qt + +QWT_CONFIG = 's%QWT_INSTALL_PREFIX.*/usr/local/.*%QWT_INSTALL_PREFIX = /usr%' +QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtDesigner.*$$/\# QWT_CONFIG += QwtDesigner/' +QWT_CONFIG += -e 's%/features%/mkspecs/features%' + +ifeq ($(BR2_PACKAGE_QWT_SVG),y) + QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtSvg.*$$/QWT_CONFIG += QwtSvg/' +else + QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtSvg.*$$/\# QWT_CONFIG += QwtSvg/' +endif + +ifeq ($(BR2_PACKAGE_QWT_MATHML),y) + QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtMathML.*$$/QWT_CONFIG += QwtMathML/' +else + QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtMathML.*$$/\# QWT_CONFIG += QwtMathML/' +endif + +define QWT_CONFIGURE_CMDS + $(SED) $(QWT_CONFIG) $(@D)/qwtconfig.pri + (cd $(@D); $(QT_QMAKE)) +endef + +define QWT_BUILD_CMDS + $(MAKE) -C $(@D) +endef + +# After installation, we fixup the INSTALL_PREFIX in qwtconfig.pri so +# that when building with qmake, -L$(STAGING_DIR)/usr/lib is used and +# not -L/usr/lib. +define QWT_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) install INSTALL_ROOT=$(STAGING_DIR) + $(SED) "s%QWT_INSTALL_PREFIX = .*%QWT_INSTALL_PREFIX = $(STAGING_DIR)/usr%" \ + $(STAGING_DIR)/usr/mkspecs/features/qwtconfig.pri +endef + +define QWT_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) install INSTALL_ROOT=$(TARGET_DIR) + rm -Rf $(TARGET_DIR)/usr/mkspecs +endef + +$(eval $(generic-package)) diff --git a/package/radvd/Config.in b/package/radvd/Config.in index c7753f0387..6edfd7c015 100644 --- a/package/radvd/Config.in +++ b/package/radvd/Config.in @@ -1,9 +1,15 @@ config BR2_PACKAGE_RADVD bool "radvd" + # libdaemon uses fork() + depends on BR2_USE_MMU select BR2_PACKAGE_FLEX - select BR2_PACKAGE_FLEX_LIBFL + select BR2_PACKAGE_LIBDAEMON depends on BR2_INET_IPV6 help IPv6 Router Advertisement Daemon. http://www.litech.org/radvd/ + +comment "radvd needs a toolchain w/ IPv6" + depends on BR2_USE_MMU + depends on !BR2_INET_IPV6 diff --git a/package/radvd/radvd.mk b/package/radvd/radvd.mk index fe8be5d39c..c1c4e41ccd 100644 --- a/package/radvd/radvd.mk +++ b/package/radvd/radvd.mk @@ -1,13 +1,12 @@ -############################################################# +################################################################################ # # radvd # -############################################################# -RADVD_VERSION:=1.6 -RADVD_SOURCE:=radvd-$(RADVD_VERSION).tar.gz -RADVD_SITE:=http://www.litech.org/radvd/dist/ -RADVD_DEPENDENCIES:=flex host-flex -RADVD_CONF_OPT:= --program-prefix='' +################################################################################ + +RADVD_VERSION = 1.9.5 +RADVD_SITE = http://www.litech.org/radvd/dist +RADVD_DEPENDENCIES = host-bison flex libdaemon host-flex host-pkgconf define RADVD_INSTALL_INITSCRIPT $(INSTALL) -m 0755 package/radvd/S50radvd $(TARGET_DIR)/etc/init.d @@ -15,4 +14,4 @@ endef RADVD_POST_INSTALL_TARGET_HOOKS += RADVD_INSTALL_INITSCRIPT -$(eval $(call AUTOTARGETS,package,radvd)) +$(eval $(autotools-package)) diff --git a/package/ramsmp/Config.in b/package/ramsmp/Config.in new file mode 100644 index 0000000000..c379bb17ac --- /dev/null +++ b/package/ramsmp/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_RAMSMP + bool "ramspeed/smp" + help + RAMspeed/SMP is a free open source command line utility + to measure cache and memory performance of multiprocessor machines. + + http://alasir.com/software/ramspeed/ diff --git a/package/ramsmp/Makefile b/package/ramsmp/Makefile new file mode 100644 index 0000000000..5cd76e09d9 --- /dev/null +++ b/package/ramsmp/Makefile @@ -0,0 +1,14 @@ + +all: generic + +generic: ramsmp.c fltmem.c fltmark.c intmem.c intmark.c + $(CC) $(CFLAGS) $(LDFLAGS) $^ -o ramsmp + +i386: ramsmp.c i386/*.s i386/cpuinfo/*.s + $(CC) $(CFLAGS) -DI386_ASM $(LDFLAGS) $^ -o ramsmp + +x86_64: ramsmp.c amd64/*.s + $(CC) $(CFLAGS) -DAMD64_ASM $(LDFLAGS) $^ -o ramsmp + +clean: + rm -f *.o ramsmp diff --git a/package/ramsmp/ramsmp.mk b/package/ramsmp/ramsmp.mk new file mode 100644 index 0000000000..6098376da5 --- /dev/null +++ b/package/ramsmp/ramsmp.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# ramsmp +# +################################################################################ + +RAMSMP_VERSION = 3.5.0 +RAMSMP_SITE = http://www.alasir.com/software/ramspeed +RAMSMP_ARCH = $(if $(BR2_i386),i386)$(if $(BR2_x86_64),x86_64) +RAMSMP_LICENSE = Alasir License +RAMSMP_LICENSE_FILES = LICENCE + +define RAMSMP_BUILD_CMDS + cp -f package/ramsmp/Makefile $(@D) + $(TARGET_CONFIGURE_OPTS) make -C $(@D) $(RAMSMP_ARCH) +endef + +define RAMSMP_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/ramsmp $(TARGET_DIR)/usr/bin/ramsmp +endef + +$(eval $(generic-package)) diff --git a/package/ramspeed/Config.in b/package/ramspeed/Config.in new file mode 100644 index 0000000000..b236329a84 --- /dev/null +++ b/package/ramspeed/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_RAMSPEED + bool "ramspeed" + help + RAMspeed is a free open source command line utility + to measure cache and memory performance. + + http://alasir.com/software/ramspeed/ diff --git a/package/ramspeed/Makefile b/package/ramspeed/Makefile new file mode 100644 index 0000000000..f4a4de6a1e --- /dev/null +++ b/package/ramspeed/Makefile @@ -0,0 +1,14 @@ + +all: generic + +generic: ramspeed.c fltmem.c fltmark.c intmem.c intmark.c + $(CC) $(CFLAGS) $(LDFLAGS) $^ -o ramspeed + +i386: ramspeed.c i386/*.s i386/cpuinfo/*.s + $(CC) $(CFLAGS) -DI386_ASM $(LDFLAGS) $^ -o ramspeed + +x86_64: ramspeed.c amd64/*.s + $(CC) $(CFLAGS) -DAMD64_ASM $(LDFLAGS) $^ -o ramspeed + +clean: + rm -f *.o ramspeed diff --git a/package/ramspeed/ramspeed.mk b/package/ramspeed/ramspeed.mk new file mode 100644 index 0000000000..7dc4faae7c --- /dev/null +++ b/package/ramspeed/ramspeed.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# ramspeed +# +################################################################################ + +RAMSPEED_VERSION = 2.6.0 +RAMSPEED_SITE = http://www.alasir.com/software/ramspeed +RAMSPEED_ARCH = $(if $(BR2_i386),i386)$(if $(BR2_x86_64),x86_64) +RAMSPEED_LICENSE = Alasir License +RAMSPEED_LICENSE_FILES = LICENCE + +define RAMSPEED_BUILD_CMDS + cp -f package/ramspeed/Makefile $(@D) + $(TARGET_CONFIGURE_OPTS) make -C $(@D) $(RAMSPEED_ARCH) +endef + +define RAMSPEED_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/ramspeed $(TARGET_DIR)/usr/bin/ramspeed +endef + +$(eval $(generic-package)) diff --git a/package/rapidjson/Config.in b/package/rapidjson/Config.in new file mode 100644 index 0000000000..d442797b66 --- /dev/null +++ b/package/rapidjson/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_RAPIDJSON + bool "rapidjson" + help + A fast JSON parser/generator for C++ with both SAX/DOM style API. + + https://code.google.com/p/rapidjson/ diff --git a/package/rapidjson/rapidjson.mk b/package/rapidjson/rapidjson.mk new file mode 100644 index 0000000000..6fc1dd3cab --- /dev/null +++ b/package/rapidjson/rapidjson.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# rapidjson +# +################################################################################ + +RAPIDJSON_VERSION = 0.11 +RAPIDJSON_SOURCE = rapidjson-$(RAPIDJSON_VERSION).zip +RAPIDJSON_SITE = http://rapidjson.googlecode.com/files +RAPIDJSON_LICENSE = MIT +RAPIDJSON_LICENSE_FILES = license.txt +RAPIDJSON_INSTALL_TARGET = NO +RAPIDJSON_INSTALL_STAGING = YES + +define RAPIDJSON_EXTRACT_CMDS + unzip -d $(@D) $(DL_DIR)/$(RAPIDJSON_SOURCE) + mv $(@D)/rapidjson/* $(@D) + $(RM) -r $(@D)/rapidjson +endef + +define RAPIDJSON_INSTALL_STAGING_CMDS + $(INSTALL) -m 0755 -d $(STAGING_DIR)/usr/include/rapidjson + $(INSTALL) -m 0755 -d $(STAGING_DIR)/usr/include/rapidjson/internal + $(INSTALL) -m 0644 $(@D)/include/rapidjson/*.h \ + $(STAGING_DIR)/usr/include/rapidjson + $(INSTALL) -m 0644 $(@D)/include/rapidjson/internal/*.h \ + $(STAGING_DIR)/usr/include/rapidjson/internal +endef + +define RAPIDJSON_UNINSTALL_STAGING_CMDS + $(RM) -r $(STAGING_DIR)/usr/include/rapidjson +endef + +$(eval $(generic-package)) diff --git a/package/rdesktop/rdesktop.mk b/package/rdesktop/rdesktop.mk index a55d58f837..94e02829d4 100644 --- a/package/rdesktop/rdesktop.mk +++ b/package/rdesktop/rdesktop.mk @@ -1,13 +1,14 @@ -############################################################# +################################################################################ # # rdesktop # -############################################################# +################################################################################ RDESKTOP_VERSION = 1.5.0 -RDESKTOP_SOURCE = rdesktop-$(RDESKTOP_VERSION).tar.gz -RDESKTOP_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/rdesktop/ +RDESKTOP_SITE = http://downloads.sourceforge.net/project/rdesktop/rdesktop/$(RDESKTOP_VERSION) RDESKTOP_DEPENDENCIES = openssl xlib_libX11 xlib_libXt RDESKTOP_CONF_OPT = --with-openssl=$(STAGING_DIR)/usr +RDESKTOP_LICENSE = GPLv2+ with exceptions +RDESKTOP_LICENSE_FILES = COPYING -$(eval $(call AUTOTARGETS,package,rdesktop)) +$(eval $(autotools-package)) diff --git a/package/read-edid/Config.in b/package/read-edid/Config.in new file mode 100644 index 0000000000..bdcb7a7d2e --- /dev/null +++ b/package/read-edid/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_READ_EDID + bool "read-edid" + depends on BR2_i386 + help + Read-edid is a pair of tools for reading the EDID from a + monitor. It should work with most monitors made since 1996 + (except for newer ones with 256-byte EDID's - WiP), assuming + the video card supports the standard read commands (most + do). Read-edid is a set of two tools - get-edid, which gets + the raw edid information from the monitor, and parse-edid, + which turns the raw binary information into an + XF86Config-compatible monitor section. + + http://polypux.org/projects/read-edid/ diff --git a/package/read-edid/read-edid.mk b/package/read-edid/read-edid.mk new file mode 100644 index 0000000000..02d80d0fdd --- /dev/null +++ b/package/read-edid/read-edid.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# read-edid +# +################################################################################ + +READ_EDID_VERSION = 1.4.2 +READ_EDID_SITE = http://www.polypux.org/projects/read-edid/ + +define READ_EDID_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define READ_EDID_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/get-edid $(TARGET_DIR)/sbin/get-edid + $(INSTALL) -D -m 0755 $(@D)/parse-edid $(TARGET_DIR)/sbin/parse-edid +endef + +$(eval $(autotools-package)) diff --git a/package/readline/Config.in b/package/readline/Config.in index 305955a63d..fbebf18a8a 100644 --- a/package/readline/Config.in +++ b/package/readline/Config.in @@ -2,4 +2,6 @@ config BR2_PACKAGE_READLINE bool "readline" select BR2_PACKAGE_NCURSES help - Enable GNU readline support? + The GNU Readline library provides a set of functions for use + by applications that allow users to edit command lines + as they are typed in. diff --git a/package/readline/readline-6.2-curses-link.patch b/package/readline/readline-6.2-curses-link.patch new file mode 100644 index 0000000000..56b4770220 --- /dev/null +++ b/package/readline/readline-6.2-curses-link.patch @@ -0,0 +1,16 @@ +link readline directly to ncurses since it needs symbols from it + +upstream readline does this on purpose (no direct linking), but +it doesn't make much sense in a Linux world + +--- a/support/shobj-conf ++++ b/support/shobj-conf +@@ -42,7 +42,7 @@ + SHOBJ_LIBS= + + SHLIB_XLDFLAGS= +-SHLIB_LIBS= ++SHLIB_LIBS=-lncurses + + SHLIB_DOT='.' + SHLIB_LIBPREF='lib' diff --git a/package/readline/readline-6.2-pl1.patch b/package/readline/readline-6.2-pl1.patch new file mode 100644 index 0000000000..9ef0e48208 --- /dev/null +++ b/package/readline/readline-6.2-pl1.patch @@ -0,0 +1,29 @@ +Bug-Reported-by: Clark J. Wang +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00157.html + +diff -Nura readline-6.2/callback.c readline-6.2-pl1/callback.c +--- readline-6.2/callback.c 2010-06-06 13:18:58.000000000 -0300 ++++ readline-6.2-pl1/callback.c 2011-04-19 14:20:00.269829168 -0300 +@@ -148,6 +148,9 @@ + eof = _rl_vi_domove_callback (_rl_vimvcxt); + /* Should handle everything, including cleanup, numeric arguments, + and turning off RL_STATE_VIMOTION */ ++ if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0) ++ _rl_internal_char_cleanup (); ++ + return; + } + #endif +diff -Nura readline-6.2/vi_mode.c readline-6.2-pl1/vi_mode.c +--- readline-6.2/vi_mode.c 2010-11-20 21:51:39.000000000 -0300 ++++ readline-6.2-pl1/vi_mode.c 2011-04-19 14:19:24.510586785 -0300 +@@ -1114,7 +1114,7 @@ + rl_beg_of_line (1, c); + _rl_vi_last_motion = c; + RL_UNSETSTATE (RL_STATE_VIMOTION); +- return (0); ++ return (vidomove_dispatch (m)); + } + #if defined (READLINE_CALLBACKS) + /* XXX - these need to handle rl_universal_argument bindings */ diff --git a/package/readline/readline.mk b/package/readline/readline.mk index 9e25e04a13..c9df708483 100644 --- a/package/readline/readline.mk +++ b/package/readline/readline.mk @@ -1,26 +1,21 @@ -############################################################# +################################################################################ # -# build GNU readline +# readline # -############################################################# -READLINE_VERSION = 6.1 -READLINE_SOURCE = readline-$(READLINE_VERSION).tar.gz +################################################################################ + +READLINE_VERSION = 6.2 READLINE_SITE = $(BR2_GNU_MIRROR)/readline READLINE_INSTALL_STAGING = YES -READLINE_INSTALL_TARGET = YES - READLINE_DEPENDENCIES = ncurses - READLINE_CONF_ENV = bash_cv_func_sigsetjmp=yes +READLINE_LICENSE = GPLv3+ +READLINE_LICENSE_FILES = COPYING -define READLINE_INSTALL_TARGET_CMDS - $(MAKE1) DESTDIR=$(TARGET_DIR) -C $(@D) uninstall - $(MAKE1) DESTDIR=$(TARGET_DIR) -C $(@D) install-shared uninstall-doc - chmod 775 $(TARGET_DIR)/usr/lib/libreadline.so.$(READLINE_VERSION) \ - $(TARGET_DIR)/usr/lib/libhistory.so.$(READLINE_VERSION) - $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) \ - $(TARGET_DIR)/usr/lib/libreadline.so.$(READLINE_VERSION) \ - $(TARGET_DIR)/usr/lib/libhistory.so.$(READLINE_VERSION) +define READLINE_PURGE_EXAMPLES + rm -rf $(TARGET_DIR)/usr/share/readline endef -$(eval $(call AUTOTARGETS,package,readline)) +READLINE_POST_INSTALL_TARGET_HOOKS += READLINE_PURGE_EXAMPLES + +$(eval $(autotools-package)) diff --git a/package/redis/Config.in b/package/redis/Config.in new file mode 100644 index 0000000000..b370e7dbbc --- /dev/null +++ b/package/redis/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_REDIS + bool "redis" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_LARGEFILE + help + Redis is an open source, advanced key-value store. It is + often referred to as a data structure server since keys can + contain strings, hashes, lists, sets and sorted sets. + + http://www.redis.io + +comment "redis needs a toolchain w/ largefile, threads" + depends on BR2_USE_MMU + depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/redis/redis-001-uclibc.patch b/package/redis/redis-001-uclibc.patch new file mode 100644 index 0000000000..01657d0ea8 --- /dev/null +++ b/package/redis/redis-001-uclibc.patch @@ -0,0 +1,45 @@ +redis-001-uclibc.patch: This patch fixes redis so that it can be compiled +against uclibc. Patch originates from: + + Support cross-compiling for uClibc targets + https://github.com/antirez/redis/pull/537 + Mike Steinert, mike.steinert@gmail.com + +Signed-off-by: Daniel Price + +========================================================================= +diff -ur old/src/config.h new/src/config.h +--- old/src/config.h 2012-10-26 07:20:24.000000000 -0700 ++++ new/src/config.h 2012-10-31 13:41:51.206309564 -0700 +@@ -1,6 +1,10 @@ + #ifndef __CONFIG_H + #define __CONFIG_H + ++#if defined(__unix) || defined(__linux__) ++#include ++#endif ++ + #ifdef __APPLE__ + #include + #endif +@@ -25,7 +29,7 @@ + #endif + + /* Test for backtrace() */ +-#if defined(__APPLE__) || defined(__linux__) ++#if (defined(__APPLE__) || defined(__linux__) && !defined(__UCLIBC__)) + #define HAVE_BACKTRACE 1 + #endif + +diff -ur old/src/Makefile new/src/Makefile +--- old/src/Makefile 2012-10-26 07:20:24.000000000 -0700 ++++ new/src/Makefile 2012-10-31 13:40:39.224728830 -0700 +@@ -135,7 +135,7 @@ + echo REDIS_LDFLAGS=$(REDIS_LDFLAGS) >> .make-settings + echo PREV_FINAL_CFLAGS=$(FINAL_CFLAGS) >> .make-settings + echo PREV_FINAL_LDFLAGS=$(FINAL_LDFLAGS) >> .make-settings +- -(cd ../deps && $(MAKE) $(DEPENDENCY_TARGETS)) ++ -(cd ../deps && $(MAKE) CC="$(CC)" $(DEPENDENCY_TARGETS)) + + .PHONY: persist-settings + diff --git a/package/redis/redis-002-lua-AR.patch b/package/redis/redis-002-lua-AR.patch new file mode 100644 index 0000000000..68ee70c568 --- /dev/null +++ b/package/redis/redis-002-lua-AR.patch @@ -0,0 +1,32 @@ + +redis-002-lua-AR.patch: Improve redis Makefiles to handle Lua's unusual +definition of AR. Patch originates from: + + Define AR to help with lua cross-compilation + https://github.com/antirez/redis/pull/997 + Daniel Price, daniel.price@gmail.com + +Signed-off-by: Daniel Price + +========================================================================= +diff --git a/deps/Makefile b/deps/Makefile +index d58ee56..c9d7116 100644 +--- a/deps/Makefile ++++ b/deps/Makefile +@@ -60,10 +60,15 @@ endif + + LUA_CFLAGS+= -O2 -Wall -DLUA_ANSI $(CFLAGS) + LUA_LDFLAGS+= $(LDFLAGS) ++# lua's Makefile defines AR="ar rcu", which is unusual, and makes it more ++# challenging to cross-compile lua (and redis). These defines make it easier ++# to fit redis into cross-compilation environments, which typically set AR. ++AR = ar ++ARFLAGS = rcu + + lua: .make-prerequisites + @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) +- cd lua/src && $(MAKE) all CFLAGS="$(LUA_CFLAGS)" MYLDFLAGS="$(LUA_LDFLAGS)" ++ cd lua/src && $(MAKE) all CFLAGS="$(LUA_CFLAGS)" MYLDFLAGS="$(LUA_LDFLAGS)" AR="$(AR) $(ARFLAGS)" + + .PHONY: lua + diff --git a/package/redis/redis-003-largefile-conditional-define.patch b/package/redis/redis-003-largefile-conditional-define.patch new file mode 100644 index 0000000000..747e0552b3 --- /dev/null +++ b/package/redis/redis-003-largefile-conditional-define.patch @@ -0,0 +1,32 @@ +Define _LARGEFILE_SOURCE and _FILE_OFFSET_BITS conditionally + +In order to avoid ugly warnings at compile time, only define +_LARGEFILE_SOURCE and _FILE_OFFSET_BITS if they have not already been +defined through the build command line. + +Avoids: + + In file included from redis.h:33:0, + from migrate.c:1: + fmacros.h:45:0: warning: "_LARGEFILE_SOURCE" redefined + :0:0: note: this is the location of the previous definition + +Signed-off-by: Thomas Petazzoni + +Index: redis-2.6.11/src/fmacros.h +=================================================================== +--- redis-2.6.11.orig/src/fmacros.h 2013-03-25 22:09:15.000000000 +0100 ++++ redis-2.6.11/src/fmacros.h 2013-03-25 22:09:40.000000000 +0100 +@@ -42,7 +42,12 @@ + #define _XOPEN_SOURCE + #endif + ++#ifndef _LARGEFILE_SOURCE + #define _LARGEFILE_SOURCE ++#endif ++ ++#ifndef _FILE_OFFSET_BITS + #define _FILE_OFFSET_BITS 64 ++#endif + + #endif diff --git a/package/redis/redis.mk b/package/redis/redis.mk new file mode 100644 index 0000000000..6974a3553b --- /dev/null +++ b/package/redis/redis.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# redis +# +################################################################################ + +REDIS_VERSION = 2.6.16 +REDIS_SITE = http://download.redis.io/releases +REDIS_LICENSE = BSD-3c (core); MIT and BSD family licenses (Bundled components) +REDIS_LICENSE_FILES = COPYING + +# Redis doesn't support DESTDIR (yet, see +# https://github.com/antirez/redis/pull/609). We set PREFIX +# instead. +REDIS_BUILDOPTS = $(TARGET_CONFIGURE_OPTS) \ + PREFIX=$(TARGET_DIR)/usr MALLOC=libc \ + +define REDIS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(REDIS_BUILDOPTS) -C $(@D) +endef + +define REDIS_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(REDIS_BUILDOPTS) -C $(@D) \ + LDCONFIG=true install +endef + +$(eval $(generic-package)) diff --git a/package/rings/Config.in b/package/rings/Config.in index 2fe14aa0ff..d1f1efe553 100644 --- a/package/rings/Config.in +++ b/package/rings/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_RINGS bool "rings" - depends on BR2_PACKAGE_LUA_SHARED_LIBRARY help Provides a way to create new Lua states from within Lua. diff --git a/package/rings/rings.mk b/package/rings/rings.mk index 36fe666d66..610ded0343 100644 --- a/package/rings/rings.mk +++ b/package/rings/rings.mk @@ -1,12 +1,13 @@ -############################################################# +################################################################################ # # rings # -############################################################# +################################################################################ RINGS_VERSION = 1.2.3 RINGS_SITE = http://github.com/downloads/keplerproject/rings RINGS_DEPENDENCIES = lua +RINGS_LICENSE = MIT define RINGS_BUILD_CMDS $(MAKE) -C $(@D) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS) -fPIC" @@ -26,4 +27,4 @@ define RINGS_CLEAN_CMDS $(MAKE) -C $(@D) clean endef -$(eval $(call GENTARGETS,package,rings)) +$(eval $(generic-package)) diff --git a/package/rng-tools/rng-tools.mk b/package/rng-tools/rng-tools.mk index 9ae5616269..ae0bf14ed2 100644 --- a/package/rng-tools/rng-tools.mk +++ b/package/rng-tools/rng-tools.mk @@ -1,12 +1,14 @@ -############################################################# +################################################################################ # # rng-tools # -############################################################# +################################################################################ -RNG_TOOLS_VERSION = 3 -RNG_TOOLS_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/gkernel +RNG_TOOLS_VERSION = 4 +RNG_TOOLS_SITE = http://downloads.sourceforge.net/project/gkernel/rng-tools/$(RNG_TOOLS_VERSION) RNG_TOOLS_CONF_ENV = LIBS="-largp" RNG_TOOLS_DEPENDENCIES = argp-standalone +RNG_TOOLS_LICENSE = GPLv2 +RNG_TOOLS_LICENSE_FILES = COPYING -$(eval $(call AUTOTARGETS,package,rng-tools)) +$(eval $(autotools-package)) diff --git a/package/rp-pppoe/rp-pppoe-3.10-001-configure-bitfield.patch b/package/rp-pppoe/rp-pppoe-3.10-001-configure-bitfield.patch deleted file mode 100644 index 8cc472f312..0000000000 --- a/package/rp-pppoe/rp-pppoe-3.10-001-configure-bitfield.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- rp-pppoe-3.10.orig/src/configure.in 2006-04-02 16:29:42.000000000 +0200 -+++ rp-pppoe-3.10/src/configure.in 2007-08-24 11:51:04.000000000 +0200 -@@ -231,6 +231,7 @@ esac - - dnl Figure out packing order of structures - AC_MSG_CHECKING([packing order of bit fields]) -+if test "x$rpppoe_cv_pack_bitfields" = "x" ; then - AC_TRY_RUN([ - union foo { - struct bar { -@@ -254,8 +255,8 @@ main(void) - return 2; - } - }], rpppoe_cv_pack_bitfields=normal, rpppoe_cv_pack_bitfields=rev, --$ECHO "no defaults for cross-compiling"; exit 0) -- -+$ECHO "no defaults for cross-compiling") -+fi - if test "$rpppoe_cv_pack_bitfields" = "rev" ; then - AC_MSG_RESULT(reversed) - AC_DEFINE(PACK_BITFIELDS_REVERSED) ---- rp-pppoe-3.10.orig/src/configure 2010-08-20 10:46:39.000000000 -0700 -+++ rp-pppoe-3.10/src/configure 2010-08-20 11:02:16.000000000 -0700 -@@ -6272,7 +6272,9 @@ esac - { echo "$as_me:$LINENO: checking packing order of bit fields" >&5 - echo $ECHO_N "checking packing order of bit fields... $ECHO_C" >&6; } - if test "$cross_compiling" = yes; then -- $ECHO "no defaults for cross-compiling"; exit 0 -+if test "x$rpppoe_cv_pack_bitfields" = "x" ; then -+ $ECHO "no defaults for cross-compiling" -+fi - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ diff --git a/package/rp-pppoe/rp-pppoe-3.10-002-krn-plugin.patch b/package/rp-pppoe/rp-pppoe-3.10-002-krn-plugin.patch index 27c835763d..d364e8684c 100644 --- a/package/rp-pppoe/rp-pppoe-3.10-002-krn-plugin.patch +++ b/package/rp-pppoe/rp-pppoe-3.10-002-krn-plugin.patch @@ -1,17 +1,19 @@ ---- rp-pppoe-3.10/src/configure.theorig 2008-02-05 13:57:15.000000000 -0800 -+++ rp-pppoe-3.10/src/configure 2008-02-05 13:24:36.000000000 -0800 -@@ -6151,7 +6151,7 @@ modprobe ppp_synctty > /dev/null 2>&1 +diff -Nura rp-pppoe-3.11.orig/src/configure rp-pppoe-3.11/src/configure +--- rp-pppoe-3.11.orig/src/configure 2012-08-21 10:01:10.536440032 -0300 ++++ rp-pppoe-3.11/src/configure 2012-08-21 10:01:45.353442397 -0300 +@@ -4517,7 +4517,7 @@ modprobe pppoe > /dev/null 2>&1 fi - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : - ac_cv_linux_kernel_pppoe=no; $ECHO "cross-compiling, default: " + ac_cv_linux_kernel_pppoe=yes; $ECHO "cross-compiling, default: " else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ ---- rp-pppoe-3.10/src/pppoe-server.c.theorig 2006-04-02 07:29:42.000000000 -0700 -+++ rp-pppoe-3.10/src/pppoe-server.c 2008-02-05 13:52:15.000000000 -0800 -@@ -20,6 +20,9 @@ static char const RCSID[] = + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +diff -Nura rp-pppoe-3.11.orig/src/pppoe-server.c rp-pppoe-3.11/src/pppoe-server.c +--- rp-pppoe-3.11.orig/src/pppoe-server.c 2012-08-21 10:01:10.535440032 -0300 ++++ rp-pppoe-3.11/src/pppoe-server.c 2012-08-21 10:02:02.597443569 -0300 +@@ -20,6 +20,9 @@ #include "config.h" diff --git a/package/rp-pppoe/rp-pppoe.mk b/package/rp-pppoe/rp-pppoe.mk index cac994aea0..ff57dc6654 100644 --- a/package/rp-pppoe/rp-pppoe.mk +++ b/package/rp-pppoe/rp-pppoe.mk @@ -1,11 +1,13 @@ -############################################################# +################################################################################ # # rp-pppoe # -############################################################# +################################################################################ -RP_PPPOE_VERSION = 3.10 +RP_PPPOE_VERSION = 3.11 RP_PPPOE_SITE = http://www.roaringpenguin.com/files/download +RP_PPPOE_LICENSE = GPLv2 +RP_PPPOE_LICENSE_FILES = doc/LICENSE RP_PPPOE_DEPENDENCIES = pppd RP_PPPOE_SUBDIR = src RP_PPPOE_TARGET_FILES = pppoe pppoe-server pppoe-relay pppoe-sniff @@ -33,4 +35,4 @@ define RP_PPPOE_UNINSTALL_TARGET_CMDS done endef -$(eval $(call AUTOTARGETS,package,rp-pppoe)) +$(eval $(autotools-package)) diff --git a/package/rpcbind/Config.in b/package/rpcbind/Config.in new file mode 100644 index 0000000000..578c6d66dc --- /dev/null +++ b/package/rpcbind/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_RPCBIND + bool "rpcbind" + # We really need libtirpc and can't work with the native RPC + # implementation of toolchains. + depends on BR2_TOOLCHAIN_HAS_THREADS # libtirpc + select BR2_PACKAGE_LIBTIRPC + # uClibc toolchains provided by ADI don't have AI_ADDRCONFIG + # support, needed for libtirpc + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 && \ + !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1 + help + The rpcbind utility is a server that converts RPC program numbers + into universal addresses. + +comment "rpcbind needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 && \ + !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1 + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/rpcbind/rpcbind-0001-Remove-yellow-pages-support.patch b/package/rpcbind/rpcbind-0001-Remove-yellow-pages-support.patch new file mode 100644 index 0000000000..eba17bf058 --- /dev/null +++ b/package/rpcbind/rpcbind-0001-Remove-yellow-pages-support.patch @@ -0,0 +1,56 @@ +From 6b5db966ae01c0bdaa7b3b90d9332394af6ea0be Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 10 Nov 2012 22:03:43 +0100 +Subject: [PATCH] Remove yellow pages support + +This support requires yellow pages support in libtirpc, which isn't +available. As most Buildroot users are most likely never going to need +such feature, get rid of it. + +Signed-off-by: Thomas Petazzoni +--- + src/security.c | 18 ------------------ + 1 file changed, 18 deletions(-) + +diff --git a/src/security.c b/src/security.c +index 0edeac6..c6c977f 100644 +--- a/src/security.c ++++ b/src/security.c +@@ -23,9 +23,6 @@ + #include + #include + #include +-#include +-#include +-#include + + #include "rpcbind.h" + +@@ -322,24 +319,9 @@ check_callit(SVCXPRT *xprt, struct r_rmtcall_args *args, int versnum /*__unused* + args->rmt_proc != MOUNTPROC_UMNT) + break; + goto deny; +- case YPBINDPROG: +- if (args->rmt_proc != YPBINDPROC_SETDOM) +- break; +- /* FALLTHROUGH */ +- case YPPASSWDPROG: + case NFS_PROGRAM: + case RQUOTAPROG: + goto deny; +- case YPPROG: +- switch (args->rmt_proc) { +- case YPPROC_ALL: +- case YPPROC_MATCH: +- case YPPROC_FIRST: +- case YPPROC_NEXT: +- goto deny; +- default: +- break; +- } + default: + break; + } +-- +1.7.9.5 + diff --git a/package/rpcbind/rpcbind-0002-Do-not-try-to-use-NSS-support-when-not-available-in-.patch b/package/rpcbind/rpcbind-0002-Do-not-try-to-use-NSS-support-when-not-available-in-.patch new file mode 100644 index 0000000000..f7cc4a68c9 --- /dev/null +++ b/package/rpcbind/rpcbind-0002-Do-not-try-to-use-NSS-support-when-not-available-in-.patch @@ -0,0 +1,60 @@ +From cfc70fb4c54e044f724516e9352f974187adb448 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 10 Nov 2012 22:04:12 +0100 +Subject: [PATCH] Do not try to use NSS support when not available in the C + library + +uClibc does not have NSS support, so it is unnecessary to tell the C +library to use the "files" as the source for "services", since it is +the only possible choice. + +Signed-off-by: Thomas Petazzoni +--- + src/rpcbind.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/rpcbind.c b/src/rpcbind.c +index 525ffba..cde8685 100644 +--- a/src/rpcbind.c ++++ b/src/rpcbind.c +@@ -67,7 +67,9 @@ + #include + #include + #include ++#ifdef HAVE_NSS_H + #include ++#endif + #include "config.h" + #include "rpcbind.h" + +@@ -156,11 +158,13 @@ main(int argc, char *argv[]) + exit(1); + } + ++#ifdef HAVE_NSS_H + /* + * Make sure we use the local service file + * for service lookkups + */ + __nss_configure_lookup("services", "files"); ++#endif + + nc_handle = setnetconfig(); /* open netconfig file */ + if (nc_handle == NULL) { +@@ -222,11 +226,13 @@ main(int argc, char *argv[]) + struct passwd *p; + char *id = runasdaemon ? RUN_AS : rpcbinduser; + ++#ifdef HAVE_NSS_H + /* + * Make sure we use the local password file + * for these lookups. + */ + __nss_configure_lookup("passwd", "files"); ++#endif + + if((p = getpwnam(id)) == NULL) { + syslog(LOG_ERR, "cannot get uid of '%s': %m", id); +-- +1.7.9.5 + diff --git a/package/rpcbind/rpcbind-0003-Make-IPv6-configurable.patch b/package/rpcbind/rpcbind-0003-Make-IPv6-configurable.patch new file mode 100644 index 0000000000..576434b56a --- /dev/null +++ b/package/rpcbind/rpcbind-0003-Make-IPv6-configurable.patch @@ -0,0 +1,42 @@ +From ab7769e4b57741c654f1a815b006d6548104ba95 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 10 Nov 2012 22:24:56 +0100 +Subject: [PATCH] Make IPv6 configurable + +Add an autoconf check that verifies whether IPv6 is available or not, +and define the INET6 macro if available, instead of hardcoding it in +src/Makefile.am. + +Signed-off-by: Thomas Petazzoni +--- + configure.in | 3 +++ + src/Makefile.am | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/configure.in b/configure.in +index de1c730..57f0bf0 100644 +--- a/configure.in ++++ b/configure.in +@@ -61,6 +61,9 @@ AC_ARG_ENABLE(libwrap,[ --enable-libwrap Enables host name checking], + esac],[libwarp=false]) + AM_CONDITIONAL(LIBWRAP, test x$libwarp = xtrue) + ++AC_CHECK_HEADER(netinet/ip6.h, ++ AC_DEFINE(INET6, 1, [Define to 1 if IPv6 is available])) ++ + AC_CONFIG_FILES([Makefile src/Makefile man/Makefile]) + AC_OUTPUT() + +diff --git a/src/Makefile.am b/src/Makefile.am +index cc0a85b..3826eca 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -1,4 +1,4 @@ +-INCLUDES = -I$(srcdir)/tirpc -DPORTMAP -DINET6 -DVERSION="\"$(VERSION)\"" \ ++INCLUDES = -I$(srcdir)/tirpc -DPORTMAP -DVERSION="\"$(VERSION)\"" \ + -D_GNU_SOURCE -Wall -pipe + if DEBUG + INCLUDES += -DRPCBIND_DEBUG -DSVC_RUN_DEBUG -DDEBUG_RMTCALL +-- +1.7.9.5 + diff --git a/package/rpcbind/rpcbind.mk b/package/rpcbind/rpcbind.mk new file mode 100644 index 0000000000..19bdace87f --- /dev/null +++ b/package/rpcbind/rpcbind.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# rpcbind +# +################################################################################ + +RPCBIND_VERSION = 0.2.0 +RPCBIND_SITE = http://downloads.sourceforge.net/project/rpcbind/rpcbind/$(RPCBIND_VERSION) +RPCBIND_SOURCE = rpcbind-$(RPCBIND_VERSION).tar.bz2 +RPCBIND_LICENSE = BSD-3c +RPCBIND_LICENSE_FILES = COPYING +RPCBIND_AUTORECONF = YES + +RPCBIND_CONF_ENV += \ + CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/tirpc/" +RPCBIND_DEPENDENCIES += libtirpc + +$(eval $(autotools-package)) diff --git a/package/rpi-firmware/Config.in b/package/rpi-firmware/Config.in new file mode 100644 index 0000000000..eb10a8a808 --- /dev/null +++ b/package/rpi-firmware/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_RPI_FIRMWARE + bool "rpi-firmware" + depends on BR2_arm + help + RaspberryPi Firmware + Pre-compiled binaries of the current bootloader and GPU firmware + + https://github.com/raspberrypi/firmware + diff --git a/package/rpi-firmware/cmdline.txt b/package/rpi-firmware/cmdline.txt new file mode 100644 index 0000000000..061e54b9e0 --- /dev/null +++ b/package/rpi-firmware/cmdline.txt @@ -0,0 +1 @@ +dwc_otg.fiq_fix_enable=1 sdhci-bcm2708.sync_after_dma=0 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootwait diff --git a/package/rpi-firmware/config.txt b/package/rpi-firmware/config.txt new file mode 100644 index 0000000000..994972b0fd --- /dev/null +++ b/package/rpi-firmware/config.txt @@ -0,0 +1,14 @@ +# Please note that this is only a sample, we recommend you to change it to fit +# your needs. +# You should override this file using a post-build script. +# See http://buildroot.org/downloads/manual/manual.html#rootfs-custom +# and http://elinux.org/RPiconfig for a description of config.txt syntax + +arm_freq=700 +core_freq=250 +kernel=zImage +disable_overscan=1 +gpu_mem_256=100 +gpu_mem_512=100 +sdram_freq=400 +over_voltage=0 diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk new file mode 100644 index 0000000000..94badf97da --- /dev/null +++ b/package/rpi-firmware/rpi-firmware.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# rpi-firmware +# +################################################################################ + +RPI_FIRMWARE_VERSION = 18a163f9341755b00841312af2878afeb64c131c +RPI_FIRMWARE_SITE = http://github.com/raspberrypi/firmware/tarball/$(RPI_FIRMWARE_VERSION) +RPI_FIRMWARE_LICENSE = BSD-3c +RPI_FIRMWARE_LICENSE_FILES = boot/LICENCE.broadcom + +define RPI_FIRMWARE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0644 $(@D)/boot/bootcode.bin $(BINARIES_DIR)/rpi-firmware/bootcode.bin + $(INSTALL) -D -m 0644 $(@D)/boot/start.elf $(BINARIES_DIR)/rpi-firmware/start.elf + $(INSTALL) -D -m 0644 $(@D)/boot/start_cd.elf $(BINARIES_DIR)/rpi-firmware/start_cd.elf + $(INSTALL) -D -m 0644 $(@D)/boot/start_x.elf $(BINARIES_DIR)/rpi-firmware/start_x.elf + $(INSTALL) -D -m 0644 $(@D)/boot/fixup.dat $(BINARIES_DIR)/rpi-firmware/fixup.dat + $(INSTALL) -D -m 0644 $(@D)/boot/fixup_cd.dat $(BINARIES_DIR)/rpi-firmware/fixup_cd.dat + $(INSTALL) -D -m 0644 $(@D)/boot/fixup_x.dat $(BINARIES_DIR)/rpi-firmware/fixup_x.dat + $(INSTALL) -D -m 0644 package/rpi-firmware/config.txt $(BINARIES_DIR)/rpi-firmware/config.txt + $(INSTALL) -D -m 0644 package/rpi-firmware/cmdline.txt $(BINARIES_DIR)/rpi-firmware/cmdline.txt +endef + +$(eval $(generic-package)) diff --git a/package/rpi-userland/Config.in b/package/rpi-userland/Config.in new file mode 100644 index 0000000000..8910211836 --- /dev/null +++ b/package/rpi-userland/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_RPI_USERLAND + bool "rpi-userland" + depends on BR2_arm + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_LARGEFILE + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_HAS_OPENGL_EGL + select BR2_PACKAGE_HAS_OPENGL_ES + select BR2_PACKAGE_HAS_OPENVG + select BR2_PACKAGE_HAS_OPENMAX + help + Raspberry Pi Userland contains the necessary library to use the + VideoCore driver. + + Includes source for the ARM side code to interface to: + EGL, mmal, GLESv2, vcos, openmaxil, vchiq_arm, bcm_host, WFC, OpenVG. + + https://github.com/raspberrypi/userland/ + +comment "rpi-userland needs a toolchain w/ C++, largefile, threads" + depends on BR2_arm + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/rpi-userland/rpi-userland-000-add-pkgconfig-files.patch b/package/rpi-userland/rpi-userland-000-add-pkgconfig-files.patch new file mode 100644 index 0000000000..848e49d7ce --- /dev/null +++ b/package/rpi-userland/rpi-userland-000-add-pkgconfig-files.patch @@ -0,0 +1,82 @@ +Add .pc files for the OpenGLESv2, EGL and bcm_host libraries + +Those pkg-config files make it easier for Qt5 to find those libraries +and the appropriate link flags. + +Signed-off-by: Thomas Petazzoni +Signed-off-by: "Yann E. MORIN" + +Index: b/interface/khronos/egl/egl.pc.in +=================================================================== +--- /dev/null ++++ b/interface/khronos/egl/egl.pc.in +@@ -0,0 +1,11 @@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix} ++libdir=${exec_prefix}/lib ++includedir=${prefix}/include ++ ++Name: egl ++Description: RasberryPi implementation of EGL ++Version: 10 ++Libs: -L${libdir} -lEGL -lGLESv2 -lbcm_host ++Cflags: -I${includedir}/ -I${includedir}/interface/vcos/pthreads/ \ ++ -I${includedir}/interface/vmcs_host/linux/ +Index: b/interface/khronos/CMakeLists.txt +=================================================================== +--- a/interface/khronos/CMakeLists.txt ++++ b/interface/khronos/CMakeLists.txt +@@ -74,3 +74,11 @@ + + install(TARGETS EGL GLESv2 OpenVG WFC khrn_client DESTINATION lib) + install(TARGETS EGL_static GLESv2_static khrn_static DESTINATION lib) ++configure_file("${CMAKE_CURRENT_SOURCE_DIR}/egl/egl.pc.in" ++ "${CMAKE_CURRENT_BINARY_DIR}/egl/egl.pc" @ONLY) ++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/egl/egl.pc" ++ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig") ++configure_file("${CMAKE_CURRENT_SOURCE_DIR}/glxx/glesv2.pc.in" ++ "${CMAKE_CURRENT_BINARY_DIR}/glxx/glesv2.pc" @ONLY) ++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glxx/glesv2.pc" ++ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig") +Index: b/interface/khronos/glxx/glesv2.pc.in +=================================================================== +--- /dev/null ++++ b/interface/khronos/glxx/glesv2.pc.in +@@ -0,0 +1,10 @@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix} ++libdir=${exec_prefix}/lib ++includedir=${prefix}/include ++ ++Name: glesv2 ++Description: RasberryPi implementation of OpenGL ESv2 ++Version: 2.0 ++Libs: -L${libdir} -lGLESv2 ++Cflags: -I${includedir}/ +Index: b/host_applications/linux/libs/bcm_host/CMakeLists.txt +=================================================================== +--- a/host_applications/linux/libs/bcm_host/CMakeLists.txt ++++ b/host_applications/linux/libs/bcm_host/CMakeLists.txt +@@ -20,3 +20,7 @@ + + install(TARGETS bcm_host DESTINATION lib) + ++configure_file("${CMAKE_CURRENT_SOURCE_DIR}/bcm_host.pc.in" ++ "${CMAKE_CURRENT_BINARY_DIR}/bcm_host.pc" @ONLY) ++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/bcm_host.pc" ++ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig") +Index: b/host_applications/linux/libs/bcm_host/bcm_host.pc.in +=================================================================== +--- /dev/null ++++ b/host_applications/linux/libs/bcm_host/bcm_host.pc.in +@@ -0,0 +1,10 @@ ++prefix=/usr ++exec_prefix=${prefix} ++libdir=${exec_prefix}/lib ++includedir=${prefix}/include ++ ++Name: bcm_host ++Description: Broadcom VideoCore host API library ++Version: 1 ++Libs: -L${libdir} -lbcm_host -lvcos -lvchiq_arm ++Cflags: -I${includedir} -I${includedir}/interface/vmcs_host/linux -I${includedir}/interface/vcos/pthreads -DUSE_VCHIQ_ARM diff --git a/package/rpi-userland/rpi-userland-001-makefiles-cmake-vmcs.cmake-allow-to-override-VMCS_IN.patch b/package/rpi-userland/rpi-userland-001-makefiles-cmake-vmcs.cmake-allow-to-override-VMCS_IN.patch new file mode 100644 index 0000000000..e54d29e03d --- /dev/null +++ b/package/rpi-userland/rpi-userland-001-makefiles-cmake-vmcs.cmake-allow-to-override-VMCS_IN.patch @@ -0,0 +1,26 @@ +From fec2560cfcb8d3398e4f1ccc3de7923365873676 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sat, 5 Jan 2013 16:04:55 +0100 +Subject: [PATCH] makefiles/cmake/vmcs.cmake: allow to override + VMCS_INSTALL_PREFIX + +Signed-off-by: Samuel Martin +--- + makefiles/cmake/vmcs.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/makefiles/cmake/vmcs.cmake b/makefiles/cmake/vmcs.cmake +index 0f8641b..cc70cca 100644 +--- a/makefiles/cmake/vmcs.cmake ++++ b/makefiles/cmake/vmcs.cmake +@@ -9,7 +9,7 @@ INCLUDE(CPack) + # Where shall we install? + if (ANDROID) + SET(VMCS_INSTALL_PREFIX "/vendor/brcm/islands" CACHE PATH "Prefix prepended to install directories" FORCE) +-else() ++elseif(NOT DEFINED VMCS_INSTALL_PREFIX) + SET(VMCS_INSTALL_PREFIX "/opt/vc" CACHE PATH "Prefix prepended to install directories" FORCE) + endif() + +-- +1.8.1 diff --git a/package/rpi-userland/rpi-userland-002-remove-faulty-assert.patch b/package/rpi-userland/rpi-userland-002-remove-faulty-assert.patch new file mode 100644 index 0000000000..c23c43ae0e --- /dev/null +++ b/package/rpi-userland/rpi-userland-002-remove-faulty-assert.patch @@ -0,0 +1,21 @@ +interface: remove faulty assert() to make weston happy at runtime + +This was removed after a discussion on IRC with the weston guys +('daniels' on irc.freenode.net/#wayland). + +Signed-off-by: "Yann E. MORIN" +--- +Upstream status: no, will be pushed by weston guys later. +If not, I'll do it. + +diff -durN rpi-userland-77d32cd.orig/interface/vmcs_host/vc_vchi_dispmanx.c rpi-userland-77d32cd/interface/vmcs_host/vc_vchi_dispmanx.c +--- rpi-userland-77d32cd.orig/interface/vmcs_host/vc_vchi_dispmanx.c 2013-10-04 17:43:44.000000000 +0200 ++++ rpi-userland-77d32cd/interface/vmcs_host/vc_vchi_dispmanx.c 2013-10-08 22:28:51.611433539 +0200 +@@ -1187,7 +1187,6 @@ + continue; + + if(dispmanx_client.update_callback ) { +- vcos_assert( dispmanx_client.pending_update_handle == (DISPMANX_UPDATE_HANDLE_T) dispmanx_client.notify_buffer[1]); + dispmanx_client.update_callback((DISPMANX_UPDATE_HANDLE_T) dispmanx_client.notify_buffer[1], dispmanx_client.update_callback_param); + } + } diff --git a/package/rpi-userland/rpi-userland.mk b/package/rpi-userland/rpi-userland.mk new file mode 100644 index 0000000000..174115334e --- /dev/null +++ b/package/rpi-userland/rpi-userland.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# rpi-userland +# +################################################################################ + +RPI_USERLAND_VERSION = 0d486513f56453f8203c270fcad0b04f8e4f1fee +RPI_USERLAND_SITE = http://github.com/raspberrypi/userland/tarball/$(RPI_USERLAND_VERSION) +RPI_USERLAND_LICENSE = BSD-3c +RPI_USERLAND_LICENSE_FILES = LICENCE +RPI_USERLAND_INSTALL_STAGING = YES +RPI_USERLAND_CONF_OPT = -DVMCS_INSTALL_PREFIX=/usr + +define RPI_USERLAND_POST_TARGET_CLEANUP + rm -Rf $(TARGET_DIR)/usr/src +endef +RPI_USERLAND_POST_INSTALL_TARGET_HOOKS += RPI_USERLAND_POST_TARGET_CLEANUP + +$(eval $(cmake-package)) diff --git a/package/rpm/Config.in b/package/rpm/Config.in index 8d4c6a3baa..567871bc7c 100644 --- a/package/rpm/Config.in +++ b/package/rpm/Config.in @@ -1,13 +1,14 @@ -comment "rpm requires libneon with SSL, XML and ZLIB support" - depends on !BR2_PACKAGE_NEON || BR2_PACKAGE_NEON_NOXML +comment "rpm needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS config BR2_PACKAGE_RPM bool "rpm" + depends on BR2_TOOLCHAIN_HAS_THREADS # beecrypt select BR2_PACKAGE_BEECRYPT select BR2_PACKAGE_POPT select BR2_PACKAGE_OPENSSL - depends on BR2_PACKAGE_NEON - depends on !BR2_PACKAGE_NEON_NOXML + select BR2_PACKAGE_NEON + select BR2_PACKAGE_NEON_XML select BR2_PACKAGE_NEON_ZLIB select BR2_PACKAGE_NEON_SSL help @@ -15,21 +16,23 @@ config BR2_PACKAGE_RPM http://rpm5.org +if BR2_PACKAGE_RPM + config BR2_PACKAGE_RPM_BZIP2_PAYLOADS bool "support for bzip2 payloads" - depends on BR2_PACKAGE_RPM select BR2_PACKAGE_BZIP2 help Support for bzip2 payloads in RPM. config BR2_PACKAGE_RPM_XZ_PAYLOADS bool "support for xz payloads" - depends on BR2_PACKAGE_RPM depends on BR2_INSTALL_LIBSTDCPP help Support for xz payloads in RPM. -comment "xz payload support requires a toolchain with c++ support" +comment "xz payload support needs a toolchain w/ C++" depends on !BR2_INSTALL_LIBSTDCPP +endif + diff --git a/package/rpm/rpm.mk b/package/rpm/rpm.mk index 1a4c10b8f1..89ce70eed4 100644 --- a/package/rpm/rpm.mk +++ b/package/rpm/rpm.mk @@ -1,35 +1,49 @@ -############################################################# +################################################################################ # # rpm # -############################################################# +################################################################################ + RPM_VERSION = 5.2.0 RPM_SITE = http://rpm5.org/files/rpm/rpm-5.2/ -RPM_AUTORECONF = NO - RPM_DEPENDENCIES = zlib beecrypt neon popt RPM_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/beecrypt -I$(STAGING_DIR)/usr/include/neon -DHAVE_MUTEX_THREAD_ONLY" \ - ac_cv_va_copy=yes + ac_cv_va_copy=yes RPM_CONF_OPT = --disable-build-versionscript --disable-rpath \ --without-selinux \ --without-python --without-perl \ + --with-openssl=external \ --with-zlib=$(STAGING_DIR) \ --with-libbeecrypt=$(STAGING_DIR) \ - --with-popt=$(STAGING_DIR) + --with-popt=$(STAGING_DIR) + +ifeq ($(BR2_PACKAGE_PCRE),y) +RPM_DEPENDENCIES += pcre +RPM_CONF_OPT += --with-pcre=external +else +RPM_CONF_OPT += --with-pcre=no +endif + +ifeq ($(BR2_PACKAGE_FILE),y) +RPM_DEPENDENCIES += file +RPM_CONF_OPT += --with-file=external +else +RPM_CONF_OPT += --with-file=no +endif ifeq ($(BR2_PACKAGE_RPM_XZ_PAYLOADS),y) -RPM_CONF_OPT+=--with-xz +RPM_CONF_OPT += --with-xz endif ifeq ($(BR2_PACKAGE_RPM_BZIP2_PAYLOADS),y) -RPM_CONF_OPT+=--with-bzip2 -RPM_DEPENDENCIES+=bzip2 +RPM_CONF_OPT += --with-bzip2 +RPM_DEPENDENCIES += bzip2 endif RPM_MAKE = $(MAKE1) -RPM_INSTALL_TARGET_OPT=DESTDIR=$(TARGET_DIR) program_transform_name= install +RPM_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) program_transform_name= install -$(eval $(call AUTOTARGETS,package,rpm)) +$(eval $(autotools-package)) diff --git a/package/rrdtool/Config.in b/package/rrdtool/Config.in index d315b57aa4..33fa677745 100644 --- a/package/rrdtool/Config.in +++ b/package/rrdtool/Config.in @@ -11,5 +11,5 @@ config BR2_PACKAGE_RRDTOOL http://oss.oetiker.ch/rrdtool/ -comment "rrdtool requires a toolchain with WCHAR support" +comment "rrdtool needs a toolchain w/ wchar" depends on !BR2_USE_WCHAR diff --git a/package/rrdtool/rrdtool-automake-compat.patch b/package/rrdtool/rrdtool-automake-compat.patch new file mode 100644 index 0000000000..92b753db23 --- /dev/null +++ b/package/rrdtool/rrdtool-automake-compat.patch @@ -0,0 +1,18 @@ +Make it compatible with newer autoconf/automake. +Patch from OpenWRT. + +Signed-off-by: Gustavo Zacarias + +--- a/bindings/tcl/Makefile.am ++++ b/bindings/tcl/Makefile.am +@@ -26,8 +26,8 @@ tclpkgdir = @TCL_PACKAGE_DIR@ + tclpkg_DATA = pkgIndex.tcl + tclpkg_SCRIPTS = ifOctets.tcl + else +-pkglib_DATA = pkgIndex.tcl +-pkglib_SCRIPTS = ifOctets.tcl ++pkgdata_DATA = pkgIndex.tcl ++pkgdata_SCRIPTS = ifOctets.tcl + endif + + # Automake doen't like `tclrrd$(VERSION)$(TCL_SHLIB_SUFFIX)' as diff --git a/package/rrdtool/rrdtool-configure-dont-hardcode-include-dirs.patch b/package/rrdtool/rrdtool-configure-dont-hardcode-include-dirs.patch new file mode 100644 index 0000000000..43b57a1b22 --- /dev/null +++ b/package/rrdtool/rrdtool-configure-dont-hardcode-include-dirs.patch @@ -0,0 +1,26 @@ +[PATCH] configure.ac: don't hardcode include files search paths + +Breaks cross compilation if host has libart/freetype. + +Signed-off-by: Peter Korsgaard +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: rrdtool-1.2.30/configure.ac +=================================================================== +--- rrdtool-1.2.30.orig/configure.ac ++++ rrdtool-1.2.30/configure.ac +@@ -524,10 +524,10 @@ + + CORE_LIBS="$LIBS" + +-EX_CHECK_ALL(art_lgpl_2, art_vpath_add_point, libart_lgpl/libart.h, libart-2.0, 2.3.17, ftp://ftp.gnome.org/pub/GNOME/sources/libart_lgpl/2.3/, /usr/include/libart-2.0) ++EX_CHECK_ALL(art_lgpl_2, art_vpath_add_point, libart_lgpl/libart.h, libart-2.0, 2.3.17, ftp://ftp.gnome.org/pub/GNOME/sources/libart_lgpl/2.3/, "") + EX_CHECK_ALL(z, zlibVersion, zlib.h, zlib, 1.2.3, http://www.gzip.org/zlib/, "") + EX_CHECK_ALL(png, png_access_version_number, png.h, libpng, 1.2.10, http://prdownloads.sourceforge.net/libpng/, "") +-EX_CHECK_ALL(freetype, FT_Init_FreeType, ft2build.h, freetype2, 2.1.10, http://prdownloads.sourceforge.net/freetype/, /usr/include/freetype2) ++EX_CHECK_ALL(freetype, FT_Init_FreeType, ft2build.h, freetype2, 2.1.10, http://prdownloads.sourceforge.net/freetype/, "") + + if test "$EX_CHECK_ALL_ERR" = "YES"; then + AC_MSG_ERROR([Please fix the library issues listed above and try again.]) diff --git a/package/rrdtool/rrdtool.mk b/package/rrdtool/rrdtool.mk index 80789c665d..fe5b872d14 100644 --- a/package/rrdtool/rrdtool.mk +++ b/package/rrdtool/rrdtool.mk @@ -1,17 +1,23 @@ -############################################################# +################################################################################ # # rrdtool # -############################################################# +################################################################################ RRDTOOL_VERSION = 1.2.30 RRDTOOL_SITE = http://oss.oetiker.ch/rrdtool/pub -RRDTOOL_DEPENDENCIES = host-pkg-config freetype libart libpng zlib +RRDTOOL_LICENSE = GPLv2+ with FLOSS license exceptions as explained in COPYRIGHT +RRDTOOL_LICENSE_FILES = COPYING COPYRIGHT + +RRDTOOL_DEPENDENCIES = host-pkgconf freetype libart libpng zlib +RRDTOOL_AUTORECONF = YES RRDTOOL_INSTALL_STAGING = YES RRDTOOL_CONF_ENV = rd_cv_ieee_works=yes rd_cv_null_realloc=nope \ ac_cv_func_mmap_fixed_mapped=yes RRDTOOL_CONF_OPT = --disable-perl --disable-python --disable-ruby \ - --disable-tcl --program-transform-name='' + --disable-tcl --program-transform-name='' \ + $(if $(BR2_TOOLCHAIN_HAS_THREADS),,--disable-pthread) +RRDTOOL_MAKE = $(MAKE1) define RRDTOOL_REMOVE_EXAMPLES rm -rf $(TARGET_DIR)/usr/share/rrdtool/examples @@ -25,4 +31,4 @@ define RRDTOOL_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/lib/librrd* endef -$(eval $(call AUTOTARGETS,package,rrdtool)) +$(eval $(autotools-package)) diff --git a/package/rsh-redone/rsh-redone.mk b/package/rsh-redone/rsh-redone.mk index 6217cb1101..4a7469f970 100644 --- a/package/rsh-redone/rsh-redone.mk +++ b/package/rsh-redone/rsh-redone.mk @@ -1,8 +1,8 @@ -############################################################# +################################################################################ # # rsh-redone # -############################################################# +################################################################################ RSH_REDONE_VERSION = 85 RSH_REDONE_SOURCE = rsh-redone_$(RSH_REDONE_VERSION).orig.tar.gz @@ -33,4 +33,4 @@ define RSH_REDONE_UNINSTALL_TARGET_CMDS $(addprefix $(TARGET_DIR)/usr/sbin/,$(rsh-redone-sbin-y)) endef -$(eval $(call GENTARGETS,package,rsh-redone)) +$(eval $(generic-package)) diff --git a/package/rsync/Config.in b/package/rsync/Config.in index 0f33774499..b952974efb 100644 --- a/package/rsync/Config.in +++ b/package/rsync/Config.in @@ -1,5 +1,9 @@ config BR2_PACKAGE_RSYNC bool "rsync" + # fork() + depends on BR2_USE_MMU + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_POPT help File transfer program to keep remote files in sync. diff --git a/package/rsync/rsync.mk b/package/rsync/rsync.mk index 5ffbfbb3ef..35f128c97e 100644 --- a/package/rsync/rsync.mk +++ b/package/rsync/rsync.mk @@ -1,22 +1,17 @@ -############################################################# +################################################################################ # # rsync # -############################################################# +################################################################################ -RSYNC_VERSION := 3.0.7 -RSYNC_SOURCE := rsync-$(RSYNC_VERSION).tar.gz -RSYNC_SITE := http://rsync.samba.org/ftp/rsync/src -RSYNC_INSTALL_STAGING = NO -RSYNC_INSTALL_TARGET = YES -RSYNC_CONF_OPT = $(if $(BR2_ENABLE_DEBUG),--enable-debug,--disable-debug) -ifeq ($(BR2_ENABLE_DEBUG),y) -RSYNC_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) INSTALLCMD='./install-sh -c' \ - install -else -RSYNC_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) INSTALLCMD='./install-sh -c' \ - STRIPPROG="$(TARGET_STRIP)" install-strip -endif -RSYNC_CONF_OPT = --with-included-popt +RSYNC_VERSION = 3.1.0 +RSYNC_SITE = http://rsync.samba.org/ftp/rsync/src +RSYNC_LICENSE = GPLv3+ +RSYNC_LICENSE_FILES = COPYING +RSYNC_DEPENDENCIES = zlib popt +RSYNC_CONF_OPT = \ + $(if $(BR2_ENABLE_DEBUG),--enable-debug,--disable-debug) \ + --with-included-zlib=no \ + --with-included-popt=no -$(eval $(call AUTOTARGETS,package,rsync)) +$(eval $(autotools-package)) diff --git a/package/rsyslog/Config.in b/package/rsyslog/Config.in new file mode 100644 index 0000000000..2503f711f5 --- /dev/null +++ b/package/rsyslog/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_RSYSLOG + bool "rsyslog" + help + Rsyslog is a powerful and flexible syslog implementation + + http://www.rsyslog.com diff --git a/package/rsyslog/S01rsyslog b/package/rsyslog/S01rsyslog new file mode 100644 index 0000000000..0c4bbc7325 --- /dev/null +++ b/package/rsyslog/S01rsyslog @@ -0,0 +1,38 @@ +#!/bin/sh +# +# Starts rsyslog. +# + +start() { + echo -n "Starting rsyslog daemon: " + umask 077 + start-stop-daemon -S -q -p /var/run/rsyslogd.pid --exec /usr/sbin/rsyslogd + echo "OK" +} +stop() { + echo -n "Stopping rsyslog daemon: " + start-stop-daemon -K -q -p /var/run/rsyslogd.pid + echo "OK" +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/package/rsyslog/rsyslog.mk b/package/rsyslog/rsyslog.mk new file mode 100644 index 0000000000..daae0109f3 --- /dev/null +++ b/package/rsyslog/rsyslog.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# rsyslog +# +################################################################################ + +RSYSLOG_VERSION = 5.8.0 +RSYSLOG_SITE = http://rsyslog.com/files/download/rsyslog/ +RSYSLOG_DEPENDENCIES = zlib + +# Build after Busybox +ifeq ($(BR2_PACKAGE_BUSYBOX),y) + RSYSLOG_DEPENDENCIES += busybox +endif + +define RSYSLOG_INSTALL_CONF_SCRIPT + [ -f $(TARGET_DIR)/etc/init.d/S01rsyslog ] || \ + $(INSTALL) -m 0755 -D package/rsyslog/S01rsyslog \ + $(TARGET_DIR)/etc/init.d/S01rsyslog + [ -f $(TARGET_DIR)/etc/rsyslog.conf ] || \ + $(INSTALL) -m 0644 -D $(@D)/rsyslog.conf \ + $(TARGET_DIR)/etc/rsyslog.conf + mkdir -p $(TARGET_DIR)/etc/rsyslog.d +endef + +RSYSLOG_POST_INSTALL_TARGET_HOOKS += RSYSLOG_INSTALL_CONF_SCRIPT + +$(eval $(autotools-package)) diff --git a/package/rt-tests/Config.in b/package/rt-tests/Config.in new file mode 100644 index 0000000000..36c111bd20 --- /dev/null +++ b/package/rt-tests/Config.in @@ -0,0 +1,27 @@ +config BR2_PACKAGE_RT_TESTS + bool "rt-tests" + depends on BR2_TOOLCHAIN_HAS_THREADS + # Too old uClibc, does not provide priority-inheritance + # mutexes + depends on !BR2_avr32 + help + Set of utilities for testing the real-time behaviour of a + Linux system. + + All tools are simple C programs with no dependencies, except + the hwlatdetect utility, which is a Python script and + therefore requires the Python interpreter. It will only be + installed if a Python interpreter has been selected in the + Buildroot configuration. + + Note that this package requires a toolchain built with the + NPTL implementation of the pthread API (this is always the + case with glibc/eglibc toolchains, but may not necessarily + be the case with uClibc toolchains, since the thread + implementation is configurable). + + http://rt.wiki.kernel.org + +comment "rt-tests needs a toolchain w/ threads" + depends on !BR2_avr32 + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/rt-tests/rt-tests-fix-build-system.patch b/package/rt-tests/rt-tests-fix-build-system.patch new file mode 100644 index 0000000000..9d6aa0523c --- /dev/null +++ b/package/rt-tests/rt-tests-fix-build-system.patch @@ -0,0 +1,43 @@ +Fix various minor issues with rt-tests build system + +The issues fixed are : + + * Remove the automatic NUMA detection from the host + architecture. This is broken when doing cross-compilation. One can + still set NUMA=1 if NUMA support is desired. + + * Expand the CFLAGS provided through the environment instead of + overriding it. + + * Provide a HASPYTHON variable to tell whether the target system has + Python or not. Otherwise, the build system simply tests whether + Python is available on the host. The PYLIB variable is also changed + so that it can be overriden from the environment, in order to + provide the correct Python module location for the target. + +Signed-off-by: Thomas Petazzoni + +Index: rt-tests/Makefile +=================================================================== +--- rt-tests.orig/Makefile ++++ rt-tests/Makefile +@@ -14,15 +14,11 @@ + mandir ?= $(prefix)/share/man + srcdir ?= $(prefix)/src + +-machinetype = $(shell uname -m | \ +- sed -e 's/i.86/i386/' -e 's/mips.*/mips/' -e 's/ppc.*/powerpc/') +-ifneq ($(filter x86_64 i386 ia64 mips powerpc,$(machinetype)),) +-NUMA := 1 +-endif +- +-CFLAGS = -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include ++override CFLAGS += -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include + +-PYLIB := $(shell python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()') ++ifeq ($(HASPYTHON),1) ++PYLIB ?= $(shell python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()') ++endif + + ifndef DEBUG + CFLAGS += -O2 diff --git a/package/rt-tests/rt-tests-uclibc.patch b/package/rt-tests/rt-tests-uclibc.patch new file mode 100644 index 0000000000..b8e1ac5a2f --- /dev/null +++ b/package/rt-tests/rt-tests-uclibc.patch @@ -0,0 +1,103 @@ +[PATCH] fix build with uClibc + +Fix two build issues with (modern) uClibc: +- uClibc has clock_nanosleep() if built with UCLIBC_HAS_ADVANCED_REALTIME, + conflicting with emulation function +- uClibc doesn't provide utmpx.h if not built with UCLIBC_HAS_UTMPX, which + is included in several files (but not needed). + +Signed-off-by: Peter Korsgaard +--- + src/backfire/sendme.c | 1 - + src/cyclictest/cyclictest.c | 3 ++- + src/pmqtest/pmqtest.c | 1 - + src/ptsematest/ptsematest.c | 1 - + src/sigwaittest/sigwaittest.c | 2 -- + src/svsematest/svsematest.c | 1 - + 6 files changed, 2 insertions(+), 7 deletions(-) + +Index: rt-tests-0.83/src/backfire/sendme.c +=================================================================== +--- rt-tests-0.83.orig/src/backfire/sendme.c ++++ rt-tests-0.83/src/backfire/sendme.c +@@ -32,7 +32,6 @@ + #include "rt-utils.h" + #include "rt-get_cpu.h" + +-#include + #include + #include + #include +Index: rt-tests-0.83/src/cyclictest/cyclictest.c +=================================================================== +--- rt-tests-0.83.orig/src/cyclictest/cyclictest.c ++++ rt-tests-0.83/src/cyclictest/cyclictest.c +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -53,7 +54,7 @@ + #define gettid() syscall(__NR_gettid) + #define sigev_notify_thread_id _sigev_un._tid + +-#ifdef __UCLIBC__ ++#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_ADVANCED_REALTIME__) + #define MAKE_PROCESS_CPUCLOCK(pid, clock) \ + ((~(clockid_t) (pid) << 3) | (clockid_t) (clock)) + #define CPUCLOCK_SCHED 2 +Index: rt-tests-0.83/src/pmqtest/pmqtest.c +=================================================================== +--- rt-tests-0.83.orig/src/pmqtest/pmqtest.c ++++ rt-tests-0.83/src/pmqtest/pmqtest.c +@@ -33,7 +33,6 @@ + #include + #include + #include +-#include + #include + #include "rt-utils.h" + #include "rt-get_cpu.h" +Index: rt-tests-0.83/src/ptsematest/ptsematest.c +=================================================================== +--- rt-tests-0.83.orig/src/ptsematest/ptsematest.c ++++ rt-tests-0.83/src/ptsematest/ptsematest.c +@@ -33,7 +33,6 @@ + #include + #include + #include +-#include + #include "rt-utils.h" + #include "rt-get_cpu.h" + +Index: rt-tests-0.83/src/sigwaittest/sigwaittest.c +=================================================================== +--- rt-tests-0.83.orig/src/sigwaittest/sigwaittest.c ++++ rt-tests-0.83/src/sigwaittest/sigwaittest.c +@@ -31,11 +31,9 @@ + #include + #include + #include +-#include + #include + #include + #include +-#include + #include "rt-utils.h" + #include "rt-get_cpu.h" + +Index: rt-tests-0.83/src/svsematest/svsematest.c +=================================================================== +--- rt-tests-0.83.orig/src/svsematest/svsematest.c ++++ rt-tests-0.83/src/svsematest/svsematest.c +@@ -31,7 +31,6 @@ + #include + #include + #include +-#include + + #include + diff --git a/package/rt-tests/rt-tests.mk b/package/rt-tests/rt-tests.mk new file mode 100644 index 0000000000..e6455d556a --- /dev/null +++ b/package/rt-tests/rt-tests.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# rt-tests +# +################################################################################ + +RT_TESTS_SITE = http://snapshot.debian.org/archive/debian/20111202T222101Z/pool/main/r/rt-tests/ +RT_TESTS_VERSION = 0.83 +RT_TESTS_SOURCE = rt-tests_$(RT_TESTS_VERSION).orig.tar.gz + +ifeq ($(BR2_PACKAGE_PYTHON),y) +RT_TESTS_DEPENDENCIES = python +endif + +define RT_TESTS_BUILD_CMDS + $(MAKE) -C $(@D) \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + prefix=/usr +endef + +define RT_TESTS_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) \ + DESTDIR="$(TARGET_DIR)" \ + prefix=/usr \ + $(if $(BR2_PACKAGE_PYTHON),HASPYTHON=1 PYLIB=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/) \ + install +endef + +$(eval $(generic-package)) diff --git a/package/rtai/Config.in b/package/rtai/Config.in new file mode 100644 index 0000000000..ecbff38d47 --- /dev/null +++ b/package/rtai/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_RTAI + bool "rtai" + depends on BR2_LINUX_KERNEL_EXT_RTAI + help + RTAI - the RealTime Application Interface for Linux. + + http://www.rtai.org diff --git a/package/rtai/rtai.mk b/package/rtai/rtai.mk new file mode 100644 index 0000000000..c24fa41631 --- /dev/null +++ b/package/rtai/rtai.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# rtai +# +################################################################################ + +RTAI_VERSION = 3.8.1 +RTAI_SOURCE = rtai-$(RTAI_VERSION).tar.bz2 +RTAI_SITE = http://www.rtai.org/RTAI/ + +RTAI_DEPENDENCIES = linux + +RTAI_CONF_OPT = \ + --with-linux-dir=$(LINUX_DIR) \ + --disable-leds \ + --disable-rtailab \ + --with-module-dir=/lib/modules/$(LINUX_VERSION_PROBED)/rtai + +RTAI_MAKE = $(MAKE1) + +$(eval $(autotools-package)) diff --git a/package/rtorrent/Config.in b/package/rtorrent/Config.in new file mode 100644 index 0000000000..0f39a92f34 --- /dev/null +++ b/package/rtorrent/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_RTORRENT + bool "rtorrent" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_LIBSIGC + select BR2_PACKAGE_LIBTORRENT + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_OPENSSL + help + BitTorrent Client using libtorrent + + http://libtorrent.rakshasa.no/ + +comment "rtorrent needs a toolchain w/ C++, threads, wchar" + depends on BR2_USE_MMU + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/rtorrent/rtorrent-cross_compile.patch b/package/rtorrent/rtorrent-cross_compile.patch new file mode 100644 index 0000000000..2be8d06076 --- /dev/null +++ b/package/rtorrent/rtorrent-cross_compile.patch @@ -0,0 +1,27 @@ +Fix cross compilation, based on OpenWRT patch. + +Signed-off-by: Gustavo Zacarias + +diff -Nura rtorrent-0.9.2/configure.ac rtorrent-0.9.2-cross/configure.ac +--- rtorrent-0.9.2/configure.ac 2012-04-20 03:55:30.000000000 -0300 ++++ rtorrent-0.9.2-cross/configure.ac 2012-05-09 11:06:49.436474039 -0300 +@@ -4,7 +4,6 @@ + + AM_INIT_AUTOMAKE + AM_CONFIG_HEADER(config.h) +-AM_PATH_CPPUNIT(1.9.6) + + AC_PROG_CXX + AC_PROG_LIBTOOL +diff -Nura rtorrent-0.9.2/scripts/common.m4 rtorrent-0.9.2-cross/scripts/common.m4 +--- rtorrent-0.9.2/scripts/common.m4 2012-03-13 09:10:49.000000000 -0300 ++++ rtorrent-0.9.2-cross/scripts/common.m4 2012-05-09 11:05:56.620102678 -0300 +@@ -223,7 +223,7 @@ + AC_DEFUN([TORRENT_CHECK_EXECINFO], [ + AC_MSG_CHECKING(for execinfo.h) + +- AC_RUN_IFELSE([AC_LANG_SOURCE([ ++ AC_LINK_IFELSE([AC_LANG_SOURCE([ + #include + int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;} + ])], diff --git a/package/rtorrent/rtorrent.mk b/package/rtorrent/rtorrent.mk new file mode 100644 index 0000000000..77f0e858f6 --- /dev/null +++ b/package/rtorrent/rtorrent.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# rtorrent +# +################################################################################ + +RTORRENT_VERSION = 0.9.3 +RTORRENT_SITE = http://libtorrent.rakshasa.no/downloads +RTORRENT_DEPENDENCIES = host-pkgconf libcurl libsigc libtorrent ncurses +RTORRENT_AUTORECONF = YES +RTORRENT_LICENSE = GPLv2 +RTORRENT_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/rubix/Config.in b/package/rubix/Config.in new file mode 100644 index 0000000000..7afc0ae7b9 --- /dev/null +++ b/package/rubix/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_RUBIX + bool "rubix" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + help + A 3D rubiks cube game for X + + http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/Rubix diff --git a/package/games/rubix/rubix-1.0.5-dont-use-legacy-functions.patch b/package/rubix/rubix-1.0.5-dont-use-legacy-functions.patch similarity index 100% rename from package/games/rubix/rubix-1.0.5-dont-use-legacy-functions.patch rename to package/rubix/rubix-1.0.5-dont-use-legacy-functions.patch diff --git a/package/games/rubix/rubix-1.0.5.patch b/package/rubix/rubix-1.0.5.patch similarity index 100% rename from package/games/rubix/rubix-1.0.5.patch rename to package/rubix/rubix-1.0.5.patch diff --git a/package/rubix/rubix.mk b/package/rubix/rubix.mk new file mode 100644 index 0000000000..732f807dfd --- /dev/null +++ b/package/rubix/rubix.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# rubix +# +################################################################################ + +RUBIX_VERSION = 1.0.5 +RUBIX_SOURCE = rubix-$(RUBIX_VERSION).tar.bz2 +RUBIX_SITE = http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/Rubix +RUBIX_INSTALL_TARGET_OPT = GAMESDIR=$(TARGET_DIR)/usr/games install + +RUBIX_MAKE_OPT = CC="$(TARGET_CC)" XINC="-I$(STAGING_DIR)/usr/include/X11" XLIB="-L$(STAGING_DIR)/usr/lib -lX11" + +RUBIX_DEPENDENCIES = xlib_libX11 + +$(eval $(autotools-package)) diff --git a/package/ruby/Config.in b/package/ruby/Config.in index c18d8ade28..0de756ba9c 100644 --- a/package/ruby/Config.in +++ b/package/ruby/Config.in @@ -1,10 +1,11 @@ config BR2_PACKAGE_RUBY bool "ruby" depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS help Object Oriented Scripting Language. http://www.ruby-lang.org/ -comment "ruby requires a toolchain with WCHAR support" - depends on !BR2_USE_WCHAR +comment "ruby needs a toolchain w/ wchar, threads" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/ruby/ruby-configure.patch b/package/ruby/ruby-configure.patch deleted file mode 100644 index 0077a67616..0000000000 --- a/package/ruby/ruby-configure.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -Nura ruby-1.9.2-p0.orig/configure.in ruby-1.9.2-p0/configure.in ---- ruby-1.9.2-p0.orig/configure.in 2010-08-14 05:11:59.000000000 -0300 -+++ ruby-1.9.2-p0/configure.in 2010-11-04 15:46:22.478191926 -0300 -@@ -1410,7 +1410,25 @@ - fi - - AC_FUNC_GETPGRP --AC_FUNC_SETPGRP -+ -+dnl AC_FUNC_SETPGRP does not work if cross compiling -+dnl Instead, assume we will have a prototype for setpgrp if cross compiling. -+if test "$cross_compiling" = no; then -+ AC_FUNC_SETPGRP -+else -+ AC_CACHE_CHECK([whether setpgrp takes no argument], ac_cv_func_setpgrp_void, -+ [AC_TRY_COMPILE([ -+#include -+], [ -+ if (setpgrp(1,1) == -1) -+ exit (0); -+ else -+ exit (1); -+], ac_cv_func_setpgrp_void=no, ac_cv_func_setpgrp_void=yes)]) -+if test $ac_cv_func_setpgrp_void = yes; then -+ AC_DEFINE(SETPGRP_VOID, 1) -+fi -+fi - - AC_C_BIGENDIAN - AC_C_CONST diff --git a/package/ruby/ruby-configure2.patch b/package/ruby/ruby-configure2.patch deleted file mode 100644 index 405fc41a95..0000000000 --- a/package/ruby/ruby-configure2.patch +++ /dev/null @@ -1,26 +0,0 @@ -From ac89b1414c84dbc038f623591c738b0637745415 Mon Sep 17 00:00:00 2001 -From: Gustavo Zacarias -Date: Thu, 4 Nov 2010 18:31:38 -0300 -Subject: [PATCH] Fix bad sed in configure.in - -Signed-off-by: Gustavo Zacarias ---- - configure.in | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/configure.in b/configure.in -index e97216f..a978c97 100644 ---- a/configure.in -+++ b/configure.in -@@ -152,7 +152,7 @@ AC_MSG_RESULT([$ARCH_FLAG]) - AC_DEFUN([RUBY_UNIVERSAL_ARCH], [ - # RUBY_UNIVERSAL_ARCH begin - test ${CFLAGS+set} && CFLAGS=`echo "$CFLAGS" | sed -e 's/ *-arch *[^ ]*//g' -e 's/ *-m32//g' -e 's/ *-m64//g'` --test ${LDFLAGS+set} && LDFLAGS=`echo "$LDFLAGS" | sed 's/ *-arch *[^ ]*//g' -e 's/ *-m32//g' -e 's/ *-m64//g'` -+test ${LDFLAGS+set} && LDFLAGS=`echo "$LDFLAGS" | sed -e 's/ *-arch *[^ ]*//g' -e 's/ *-m32//g' -e 's/ *-m64//g'` - unset ARCH_FLAG universal_binary universal_archnames - if test ${target_archs+set}; then - AC_MSG_CHECKING([target architectures]) --- -1.7.2.2 - diff --git a/package/ruby/ruby.mk b/package/ruby/ruby.mk index 966a6a1610..a9c4e7db42 100644 --- a/package/ruby/ruby.mk +++ b/package/ruby/ruby.mk @@ -1,18 +1,28 @@ -############################################################# +################################################################################ # # ruby # -############################################################# +################################################################################ -RUBY_VERSION = 1.9.2-p0 +RUBY_VERSION = 1.9.3-p484 RUBY_SITE = ftp://ftp.ruby-lang.org/pub/ruby/1.9 -RUBY_AUTORECONF = YES -HOST_RUBY_AUTORECONF = YES -RUBY_DEPENDENCIES = host-ruby +RUBY_DEPENDENCIES = host-pkgconf host-ruby +HOST_RUBY_DEPENDENCIES = host-pkgconf RUBY_MAKE_ENV = $(TARGET_MAKE_ENV) -RUBY_CONF_OPT = --disable-install-doc +RUBY_MAKE = $(MAKE1) +RUBY_CONF_OPT = --disable-install-doc --disable-rpath +HOST_RUBY_CONF_OPT = --disable-install-doc --with-out-ext=curses,readline +RUBY_LICENSE = Ruby or BSD-2c, BSD-3c, others +RUBY_LICENSE_FILES = LEGAL COPYING BSDL -HOST_RUBY_CONF_OPT = --disable-install-doc +RUBY_CFLAGS = $(TARGET_CFLAGS) +# With some SuperH toolchains (like Sourcery CodeBench 2012.09), ruby fails to +# build with 'pcrel too far'. This seems to be caused by the -Os option we pass +# by default. To fix the problem, use standard -O2 optimization instead. +ifeq ($(BR2_sh)$(BR2_sh64),y) +RUBY_CFLAGS += -O2 +endif +RUBY_CONF_ENV = CFLAGS="$(RUBY_CFLAGS)" # Force optionals to build before we do ifeq ($(BR2_PACKAGE_BERKELEYDB),y) @@ -31,5 +41,5 @@ ifeq ($(BR2_PACKAGE_ZLIB),y) RUBY_DEPENDENCIES += zlib endif -$(eval $(call AUTOTARGETS,package,ruby)) -$(eval $(call AUTOTARGETS,package,ruby,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/sam-ba/Config.in.host b/package/sam-ba/Config.in.host new file mode 100644 index 0000000000..6093865e4c --- /dev/null +++ b/package/sam-ba/Config.in.host @@ -0,0 +1,10 @@ +config BR2_PACKAGE_HOST_SAM_BA + bool "host sam-ba" + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + select BR2_HOSTARCH_NEEDS_IA32_LIBS + help + Atmel SAM-BA software provides an open set of tools for + programming the Atmel SAM3, SAM7 and SAM9 ARM-based + microcontrollers. + + http://www.at91.com/linux4sam/bin/view/Linux4SAM/SoftwareTools diff --git a/package/sam-ba/sam-ba.mk b/package/sam-ba/sam-ba.mk new file mode 100644 index 0000000000..8e24fa62f3 --- /dev/null +++ b/package/sam-ba/sam-ba.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# sam-ba +# +################################################################################ + +SAM_BA_SITE = http://www.atmel.com/dyn/resources/prod_documents/ +SAM_BA_VERSION = 2.12 +SAM_BA_SOURCE = sam-ba_$(SAM_BA_VERSION).zip +SAM_BA_LICENSE = BSD-like (partly binary-only) +SAM_BA_LICENSE_FILES = doc/readme.txt + +define HOST_SAM_BA_EXTRACT_CMDS + unzip -d $(BUILD_DIR) $(DL_DIR)/$(SAM_BA_SOURCE) + mv $(BUILD_DIR)/sam-ba_cdc_cdc_linux/* $(@D) + rmdir $(BUILD_DIR)/sam-ba_cdc_cdc_linux/ +endef + +# Since it's a prebuilt application and it does not conform to the +# usual Unix hierarchy, we install it in $(HOST_DIR)/opt/sam-ba and +# then create a symbolic link from $(HOST_DIR)/usr/bin to the +# application binary, for easier usage. + +define HOST_SAM_BA_INSTALL_CMDS + mkdir -p $(HOST_DIR)/opt/sam-ba/ + cp -a $(@D)/* $(HOST_DIR)/opt/sam-ba/ + ln -sf ../../opt/sam-ba/sam-ba $(HOST_DIR)/usr/bin/sam-ba +endef + +$(eval $(host-generic-package)) diff --git a/package/samba/Config.in b/package/samba/Config.in index 58a84f3d62..1469075361 100644 --- a/package/samba/Config.in +++ b/package/samba/Config.in @@ -1,6 +1,8 @@ config BR2_PACKAGE_SAMBA bool "samba" - select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_POPT help Provides print services to all manner of SMB/CIFS clients, including the numerous versions of Microsoft Windows @@ -11,20 +13,35 @@ config BR2_PACKAGE_SAMBA NOTE: A complete Samba install takes over 50MB of space, so choose only the components you need. -menu "Samba tools selection" - depends on BR2_PACKAGE_SAMBA +comment "samba needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS -config BR2_PACKAGE_SAMBA_CIFS - bool "cifs" - default y - depends on BR2_PACKAGE_SAMBA +if BR2_PACKAGE_SAMBA + +config BR2_PACKAGE_SAMBA_MAX_DEBUGLEVEL + int "Maximum level of compiled-in debug messages" + range -1 10000 + default -1 help - Support CIFS + Define the level of compiled-in debug messages. + This allows for big space savings, -1 being the lowest (none). + +config BR2_PACKAGE_SAMBA_LIBICONV + bool "extended encodings (libiconv)" + depends on !BR2_ENABLE_LOCALE + select BR2_PACKAGE_LIBICONV + help + Include libiconv support for extended conversion of filename + enconding. Samba has built-in support for UTF-8, ISO-8859-1 + and ASCII, so this is only required if you want to support + other encodings. + +menu "Samba tools selection" config BR2_PACKAGE_SAMBA_EVENTLOGADM bool "eventlogadm" default y - depends on BR2_PACKAGE_SAMBA help Write Eventlog records to a tdb or perform other eventlog functions @@ -33,24 +50,22 @@ config BR2_PACKAGE_SAMBA_FINDSMB default y depends on BR2_PACKAGE_SAMBA_SMBCLIENT depends on BR2_PACKAGE_SAMBA_NMBLOOKUP - depends on BR2_PACKAGE_MICROPERL + depends on BR2_PACKAGE_PERL help Script to browse network comment "findsmb - disabled (requires nmblookup, smbclient and perl)" - depends on !BR2_PACKAGE_SAMBA_SMBCLIENT || !BR2_PACKAGE_SAMBA_NMBLOOKUP || !BR2_PACKAGE_MICROPERL + depends on !BR2_PACKAGE_SAMBA_SMBCLIENT || !BR2_PACKAGE_SAMBA_NMBLOOKUP || !BR2_PACKAGE_PERL config BR2_PACKAGE_SAMBA_NET bool "net" default y - depends on BR2_PACKAGE_SAMBA help Distributed SMB/CIFS Server Management Utility config BR2_PACKAGE_SAMBA_NMBD bool "nmbd" default y - depends on BR2_PACKAGE_SAMBA help NetBIOS name server to provide NetBIOS over IP naming services to clients @@ -58,7 +73,6 @@ config BR2_PACKAGE_SAMBA_NMBD config BR2_PACKAGE_SAMBA_NMBLOOKUP bool "nmblookup" default y - depends on BR2_PACKAGE_SAMBA help Query NetBIOS names and map them to IP addresses in a network using NetBIOS over TCP/IP queries @@ -66,21 +80,18 @@ config BR2_PACKAGE_SAMBA_NMBLOOKUP config BR2_PACKAGE_SAMBA_NTLM_AUTH bool "ntlm_auth" default y - depends on BR2_PACKAGE_SAMBA help Helper utility that authenticates users using NT/LM authentication config BR2_PACKAGE_SAMBA_PDBEDIT bool "pdbedit" default y - depends on BR2_PACKAGE_SAMBA help Manage the SAM database (Database of Samba Users) config BR2_PACKAGE_SAMBA_PROFILES bool "profiles" default y - depends on BR2_PACKAGE_SAMBA help Utility that reports and changes SIDs in Windows NT registry files @@ -88,7 +99,6 @@ config BR2_PACKAGE_SAMBA_RPCCLIENT bool "rpcclient" select BR2_PACKAGE_READLINE default y - depends on BR2_PACKAGE_SAMBA help Tool for executing client side MS-RPC functions using RPC calls from a UNIX workstation. @@ -96,7 +106,6 @@ config BR2_PACKAGE_SAMBA_RPCCLIENT config BR2_PACKAGE_SAMBA_SMBCACLS bool "smbcacls" default y - depends on BR2_PACKAGE_SAMBA help Set or get ACLs on an NT file or directory names @@ -104,80 +113,82 @@ config BR2_PACKAGE_SAMBA_SMBCLIENT bool "smbclient" select BR2_PACKAGE_READLINE default y - depends on BR2_PACKAGE_SAMBA help ftp-like client to access SMB/CIFS resources on servers config BR2_PACKAGE_SAMBA_SMBCONTROL bool "smbcontrol" default y - depends on BR2_PACKAGE_SAMBA help Send messages to smbd, nmbd or winbindd processes config BR2_PACKAGE_SAMBA_SMBCQUOTAS bool "smbcquotas" default y - depends on BR2_PACKAGE_SAMBA help Set or get QUOTAs of NTFS 5 shares +config BR2_PACKAGE_SAMBA_SMBD + bool "smbd" + default y + help + The server daemon that provides filesharing and printing services + config BR2_PACKAGE_SAMBA_SMBGET bool "smbget" default y - depends on BR2_PACKAGE_SAMBA help wget-like utility for download files over SMB config BR2_PACKAGE_SAMBA_SMBLDBTOOLS bool "smbldbtools" default y - depends on BR2_PACKAGE_SAMBA help ldbadd ldbdel ldbedit ldbmodify ldbrename ldbsearch tools config BR2_PACKAGE_SAMBA_SMBPASSWD bool "smbpasswd" default y - depends on BR2_PACKAGE_SAMBA help Change a user's SMB passwd config BR2_PACKAGE_SAMBA_SMBSHARESEC bool "smbsharesec" default y - depends on BR2_PACKAGE_SAMBA help Manipulate share permissions on SMB file shares config BR2_PACKAGE_SAMBA_SMBSPOOL bool "smbspool" default y - depends on BR2_PACKAGE_SAMBA help Send a print file to an SMB printer config BR2_PACKAGE_SAMBA_SMBSTATUS bool "smbstatus" default y - depends on BR2_PACKAGE_SAMBA help Report on current Samba connections config BR2_PACKAGE_SAMBA_SMBTREE bool "smbtree" default y - depends on BR2_PACKAGE_SAMBA help A text based smb network browser config BR2_PACKAGE_SAMBA_SWAT bool "swat" default y - depends on BR2_PACKAGE_SAMBA help Samba Web Administration Tool +config BR2_PACKAGE_SAMBA_SMBTA_UTIL + bool "smbta-util" + default y + help + Tool to ease the configuration of the vfs_smb_traffic_analyzer + module regarding data encryption. + config BR2_PACKAGE_SAMBA_SMBTAR bool "smbtar" default y @@ -191,21 +202,18 @@ comment "smbtar - disabled (requires smbclient)" config BR2_PACKAGE_SAMBA_TDB bool "tdb" default y - depends on BR2_PACKAGE_SAMBA help Tools to operate on the .tdb database files config BR2_PACKAGE_SAMBA_TESTPARM bool "testparm" default y - depends on BR2_PACKAGE_SAMBA help Check an smb.conf configuration file for internal correctness config BR2_PACKAGE_SAMBA_WINBINDD bool "winbindd" default y - depends on BR2_PACKAGE_SAMBA help Name Service Switch daemon for resolving names from NT servers @@ -220,11 +228,9 @@ endmenu menu "Samba libraries selection" - depends on BR2_PACKAGE_SAMBA config BR2_PACKAGE_SAMBA_LIBSMBCLIENT bool "libsmbclient" - depends on BR2_PACKAGE_SAMBA help libsmbclient is a library toolset that permits applications to manipulate CIFS/SMB network resources using many of the @@ -235,24 +241,23 @@ endmenu menu "Samba support selection" - depends on BR2_PACKAGE_SAMBA config BR2_PACKAGE_SAMBA_AVAHI bool "support avahi" default y - depends on BR2_PACKAGE_SAMBA depends on BR2_PACKAGE_AVAHI_DAEMON - depends on BR2_PACKAGE_DBUS + depends on BR2_USE_MMU # dbus + select BR2_PACKAGE_DBUS help Include support for avahi -comment "support avahi - disabled (requires avahi-daemon/dbus)" - depends on !BR2_PACKAGE_AVAHI_DAEMON || !BR2_PACKAGE_DBUS +comment "support avahi - disabled (requires avahi-daemon)" + depends on BR2_USE_MMU + depends on !BR2_PACKAGE_AVAHI_DAEMON config BR2_PACKAGE_SAMBA_GAMIN bool "support gamin" default y - depends on BR2_PACKAGE_SAMBA depends on BR2_PACKAGE_GAMIN help Include support for gamin @@ -262,3 +267,4 @@ comment "support gamin - disabled (requires gamin)" endmenu +endif diff --git a/package/samba/samba-fix-mount.cifs.patch b/package/samba/samba-fix-mount.cifs.patch deleted file mode 100644 index 9c235ea7be..0000000000 --- a/package/samba/samba-fix-mount.cifs.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/client/mount.cifs.c 2011-09-13 10:26:21.000000000 +0200 -+++ b/client/mount.cifs.c 2011-09-13 10:27:16.000000000 +0200 -@@ -39,7 +39,6 @@ - #include - #include - #include --#include - #include "mount.h" - - #define MOUNT_CIFS_VERSION_MAJOR "1" -@@ -255,6 +254,10 @@ - return 0; - } - #else /* CIFS_LEGACY_SETUID_CHECK */ -+ -+#ifndef _PATH_FSTAB -+#define _PATH_FSTAB "/etc/fstab" -+#endif - static int - check_fstab(const char *progname, char *mountpoint, char *devname, - char **options) diff --git a/package/samba/samba-fix-smbd-libs-avahi.patch b/package/samba/samba-fix-smbd-libs-avahi.patch new file mode 100644 index 0000000000..6624f57f6c --- /dev/null +++ b/package/samba/samba-fix-smbd-libs-avahi.patch @@ -0,0 +1,17 @@ +Expliticly link with -lpthread if smbd is compiled with +avahi support. Otherwise the binary will fail to run. + +Signed-off-by: Sven Neumann + +diff -Nura samba-3.6.16.orig/source3/Makefile.in samba-3.6.16/source3/Makefile.in +--- samba-3.6.16.orig/source3/Makefile.in 2013-06-21 08:12:39.995871935 -0300 ++++ samba-3.6.16/source3/Makefile.in 2013-06-21 08:13:17.778103805 -0300 +@@ -1783,7 +1783,7 @@ + $(KRB5LIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) \ + $(ACL_LIBS) $(PASSDB_LIBS) $(LIBS) $(DNSSD_LIBS) $(AVAHI_LIBS) \ + $(POPT_LIBS) @SMBD_LIBS@ $(LIBTALLOC_LIBS) $(LIBTEVENT_LIBS) $(LIBTDB_LIBS) \ +- $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS) ++ $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS) $(PTHREAD_LDFLAGS) + + bin/nmbd@EXEEXT@: $(BINARY_PREREQS) $(NMBD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTEVENT) $(LIBTDB) $(LIBWBCLIENT) + @echo Linking $@ diff --git a/package/samba/samba-getaddrinfo.patch b/package/samba/samba-getaddrinfo.patch new file mode 100644 index 0000000000..df3570ca03 --- /dev/null +++ b/package/samba/samba-getaddrinfo.patch @@ -0,0 +1,20 @@ +Patch forward-ported from OpenWRT. +Don't check for buggy getaddrinfo() assume it's safe if it's present. + +Signed-off-by: Gustavo Zacarias + +diff -Nura samba-3.6.8.orig/source3/configure samba-3.6.8/source3/configure +--- samba-3.6.8.orig/source3/configure 2012-09-14 05:19:52.000000000 -0300 ++++ samba-3.6.8/source3/configure 2012-09-25 20:31:57.861743235 -0300 +@@ -13269,10 +13269,7 @@ + # see bug 5910, use our replacements if we detect + # a broken system. + if test "$cross_compiling" = yes; then : +- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error $? "cannot run test program while cross compiling +-See \`config.log' for more details" "$LINENO" 5; } ++ $as_echo "assuming valid getaddrinfo without bug 5910" >&2 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ diff --git a/package/samba/samba-remove-legacy-index.patch b/package/samba/samba-remove-legacy-index.patch deleted file mode 100644 index 855bca77c6..0000000000 --- a/package/samba/samba-remove-legacy-index.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/source3/registry/reg_perfcount.c -+++ b/source3/registry/reg_perfcount.c -@@ -616,14 +616,14 @@ static bool _reg_perfcount_add_counter(P - obj = NULL; - memset(buf, 0, PERFCOUNT_MAX_LEN); - memcpy(buf, data.dptr, data.dsize); -- begin = index(buf, '['); -- end = index(buf, ']'); -+ begin = strchr(buf, '['); -+ end = strchr(buf, ']'); - if(begin == NULL || end == NULL) - return False; - start = begin+1; - - while(start < end) { -- stop = index(start, ','); -+ stop = strchr(start, ','); - if(stop == NULL) - stop = end; - *stop = '\0'; diff --git a/package/samba/samba.mk b/package/samba/samba.mk index bd174dff00..834bac3b94 100755 --- a/package/samba/samba.mk +++ b/package/samba/samba.mk @@ -1,28 +1,24 @@ -############################################################# +################################################################################ # # samba # -############################################################# -SAMBA_VERSION = 3.5.11 -SAMBA_SOURCE = samba-$(SAMBA_VERSION).tar.gz -SAMBA_SITE = http://ftp.samba.org/pub/samba/stable/ +################################################################################ +SAMBA_VERSION = 3.6.20 +SAMBA_SITE = http://ftp.samba.org/pub/samba/stable SAMBA_SUBDIR = source3 -SAMBA_AUTORECONF = NO - SAMBA_INSTALL_STAGING = YES -SAMBA_INSTALL_TARGET = YES - +SAMBA_LICENSE = GPLv3+ +SAMBA_LICENSE_FILES = COPYING -SAMBA_DEPENDENCIES = \ - $(if $(BR2_ENABLE_LOCALE),,libiconv) \ +SAMBA_DEPENDENCIES = popt \ $(if $(BR2_PACKAGE_SAMBA_RPCCLIENT),readline) \ $(if $(BR2_PACKAGE_SAMBA_SMBCLIENT),readline) \ $(if $(BR2_PACKAGE_SAMBA_AVAHI),avahi) \ $(if $(BR2_PACKAGE_SAMBA_GAMIN),gamin) - SAMBA_CONF_ENV = \ + ac_cv_file__proc_sys_kernel_core_pattern=yes \ samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \ samba_cv_USE_SETREUID=yes \ samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes \ @@ -35,7 +31,6 @@ SAMBA_CONF_ENV = \ libreplace_cv_HAVE_IPV6=$(if $(BR2_INET_IPV6),yes,no) \ $(if $(BR2_PACKAGE_SAMBA_AVAHI),AVAHI_LIBS=-pthread) - SAMBA_CONF_OPT = \ --localstatedir=/var \ --with-piddir=/var/run \ @@ -45,8 +40,6 @@ SAMBA_CONF_OPT = \ --with-privatedir=/etc/samba \ \ --disable-cups \ - --disable-static \ - --enable-shared \ --enable-shared-libs \ --disable-pie \ --disable-relro \ @@ -57,49 +50,38 @@ SAMBA_CONF_OPT = \ $(if $(BR2_PACKAGE_SAMBA_SWAT),--enable-swat,--disable-swat) \ \ --without-cluster-support \ - --without-cifsupcall \ + --without-dnsupdate \ + --with-sys-quotas \ --without-ads \ --without-ldap \ - --with-included-popt \ --with-included-iniparser \ - --with-libiconv=$(STAGING_DIR) \ \ - $(if $(BR2_PACKAGE_SAMBA_CIFS),--with-cifsmount,--without-cifsmount) \ $(if $(BR2_PACKAGE_SAMBA_RPCCLIENT),--with-readline=$(STAGING_DIR)) \ $(if $(BR2_PACKAGE_SAMBA_SMBCLIENT),--with-readline=$(STAGING_DIR)) \ $(if $(BR2_PACKAGE_SAMBA_WINBINDD),--with-winbind,--without-winbind) - SAMBA_INSTALL_TARGET_OPT = \ DESTDIR=$(TARGET_DIR) -C $(SAMBA_DIR)/$(SAMBA_SUBDIR) \ installlibs installservers installbin installscripts \ - $(if $(BR2_PACKAGE_SAMBA_CIFS),installcifsmount) \ $(if $(BR2_PACKAGE_SAMBA_SWAT),installswat) - SAMBA_UNINSTALL_TARGET_OPT = \ DESTDIR=$(TARGET_DIR) -C $(SAMBA_DIR)/$(SAMBA_SUBDIR) \ uninstalllibs uninstallservers uninstallbin uninstallscripts \ - $(if $(BR2_PACKAGE_SAMBA_CIFS),uninstallcifsmount) \ $(if $(BR2_PACKAGE_SAMBA_SWAT),uninstallswat) - # binaries to keep SAMBA_BINTARGETS_y = \ usr/sbin/smbd \ usr/lib/libtalloc.so \ usr/lib/libtdb.so - # binaries to remove SAMBA_BINTARGETS_ = \ usr/lib/libnetapi.so* \ usr/lib/libsmbsharemodes.so* - # binaries to keep or remove -SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_CIFS) += usr/sbin/mount.cifs -SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_CIFS) += usr/sbin/umount.cifs SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_EVENTLOGADM) += usr/bin/eventlogadm SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_NET) += usr/bin/net SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_NMBD) += usr/sbin/nmbd @@ -112,6 +94,7 @@ SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBCACLS) += usr/bin/smbcacls SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBCLIENT) += usr/bin/smbclient SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBCONTROL) += usr/bin/smbcontrol SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBCQUOTAS) += usr/bin/smbcquotas +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBD) += usr/sbin/smbd SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBGET) += usr/bin/smbget SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBLDBTOOLS) += usr/bin/ldbadd SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBLDBTOOLS) += usr/bin/ldbdel @@ -123,6 +106,7 @@ SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBPASSWD) += usr/bin/smbpasswd SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBSHARESEC) += usr/bin/sharesec SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBSPOOL) += usr/bin/smbspool SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBSTATUS) += usr/bin/smbstatus +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBTA_UTIL) += usr/bin/smbta-util SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBTREE) += usr/bin/smbtree SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SWAT) += usr/sbin/swat SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_TDB) += usr/bin/tdbbackup @@ -136,7 +120,6 @@ SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_WBINFO) += usr/bin/wbinfo SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_WINBINDD) += usr/lib/libwbclient.so* SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_LIBSMBCLIENT) += usr/lib/libsmbclient.so* - # non-binaries to remove SAMBA_TXTTARGETS_ = \ usr/include/libsmbclient.h \ @@ -146,7 +129,6 @@ SAMBA_TXTTARGETS_ = \ usr/include/tdb.h \ usr/include/wbclient.h - # non-binaries to keep or remove SAMBA_TXTTARGETS_$(BR2_PACKAGE_SAMBA_FINDSMB) += usr/bin/findsmb SAMBA_TXTTARGETS_$(BR2_PACKAGE_SAMBA_SMBTAR) += usr/bin/smbtar @@ -168,6 +150,17 @@ define SAMBA_REMOVE_SWAT_DOCUMENTATION rm -rf $(TARGET_DIR)/usr/swat/help/welcome.html endef +# --with-libiconv="" is to avoid detecting host libiconv and build failure +ifeq ($(BR2_PACKAGE_SAMBA_LIBICONV),y) +SAMBA_DEPENDENCIES += libiconv +SAMBA_CONF_OPT += --with-libiconv=$(STAGING_DIR) +else +SAMBA_CONF_OPT += --with-libiconv="" +endif + +# Compiled debug messages by level +SAMBA_CONF_OPT += CFLAGS="$(TARGET_CFLAGS) -DMAX_DEBUG_LEVEL=$(BR2_PACKAGE_SAMBA_MAX_DEBUGLEVEL)" + ifeq ($(BR2_PACKAGE_SAMBA_SWAT),y) ifneq ($(BR2_HAVE_DOCUMENTATION),y) SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_REMOVE_SWAT_DOCUMENTATION @@ -187,4 +180,4 @@ endef SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_INSTALL_INITSCRIPTS_CONFIG -$(eval $(call AUTOTARGETS,package,samba)) +$(eval $(autotools-package)) diff --git a/package/sane-backends/Config.in b/package/sane-backends/Config.in new file mode 100644 index 0000000000..04222fc6d8 --- /dev/null +++ b/package/sane-backends/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_SANE_BACKENDS + bool "sane-backends" + help + SANE - Scanner Access Now Easy + + http://www.sane-project.org + + Backends are included automatically based on the libraries that have + been selected: libusb, jpeg, tiff, avahi (with dbus and libglib2), + and netsnmp. diff --git a/package/sane-backends/sane-backends-1.0.22-qcam-x86.patch b/package/sane-backends/sane-backends-1.0.22-qcam-x86.patch new file mode 100644 index 0000000000..f14dd0e980 --- /dev/null +++ b/package/sane-backends/sane-backends-1.0.22-qcam-x86.patch @@ -0,0 +1,61 @@ +[PATCH] backend/qcam.c: fix build on !x86 + +inb/outb/ioperm are x86 specific interfaces, so replace with noops on +!x86. + +Inspired by similar patch in openwrt: +https://dev.openwrt.org/ticket/5689 + +Signed-off-by: Peter Korsgaard +--- + backend/qcam.c | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +Index: sane-backends-1.0.22/backend/qcam.c +=================================================================== +--- sane-backends-1.0.22.orig/backend/qcam.c ++++ sane-backends-1.0.22/backend/qcam.c +@@ -205,12 +205,20 @@ + + #endif /* || || */ + ++/* inb / outb only exist on x86 */ ++#if defined(__i386__) || defined(__x86_64__) + #define read_lpdata(d) inb ((d)->port) + #define read_lpstatus(d) inb ((d)->port + 1) + #define read_lpcontrol(d) inb ((d)->port + 2) + #define write_lpdata(d,v) outb ((v), (d)->port) + #define write_lpcontrol(d,v) outb ((v), (d)->port + 2) +- ++#else ++#define read_lpdata(d) 0 ++#define read_lpstatus(d) 0 ++#define read_lpcontrol(d) 0 ++#define write_lpdata(d,v) ++#define write_lpcontrol(d,v) ++#endif + + static SANE_Status + enable_ports (QC_Device * q) +@@ -219,8 +227,10 @@ + if (q->port < 0x278 || q->port > 0x3bc) + return SANE_STATUS_INVAL; + ++#if defined(__i386__) || defined(__x86_64__) + if (ioperm (q->port, 3, 1) < 0) + return SANE_STATUS_INVAL; ++#endif + + return SANE_STATUS_GOOD; + } +@@ -228,8 +238,10 @@ + static SANE_Status + disable_ports (QC_Device * q) + { ++#if defined(__i386__) || defined(__x86_64__) + if (ioperm (q->port, 3, 0) < 0) + return SANE_STATUS_INVAL; ++#endif + + return SANE_STATUS_GOOD; + } diff --git a/package/sane-backends/sane-backends-1.0.22-v4l.patch b/package/sane-backends/sane-backends-1.0.22-v4l.patch new file mode 100644 index 0000000000..e9bdd20236 --- /dev/null +++ b/package/sane-backends/sane-backends-1.0.22-v4l.patch @@ -0,0 +1,66 @@ +From Fedora git: http://pkgs.fedoraproject.org/gitweb/?p=sane-backends.git;a=blob;f=sane-backends-1.0.22-v4l.patch;hb=4c4b8135b896ef9f00b926ce5f435ae5c9b156d5 + +From 26c69b228b29f612faf4b0cc85db969ee7cc4ea6 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Mon, 14 Mar 2011 13:35:05 +0100 +Subject: [PATCH] patch: v4l + +Squashed commit of the following: + +commit 23381932c76846191b42a48e505b37cd74711265 +Author: Julien BLACHE +Date: Wed Feb 16 19:37:43 2011 +0100 + + Fix v4l build with libv4l 0.8.3+ + + (cherry picked from commit c5ca46c2d1be78c651afb843cc834cf2b5b24953) + + Conflicts: + + ChangeLog + + Signed-off-by: Nils Philippsen +--- + backend/v4l.c | 3 +-- + backend/v4l.h | 3 ++- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/backend/v4l.c b/backend/v4l.c +index 6510ef0..38595ed 100644 +--- a/backend/v4l.c ++++ b/backend/v4l.c +@@ -84,9 +84,8 @@ + #include "../include/sane/sanei_config.h" + #define V4L_CONFIG_FILE "v4l.conf" + +-#include "v4l.h" +- + #include ++#include "v4l.h" + + static const SANE_Device **devlist = NULL; + static int num_devices; +diff --git a/backend/v4l.h b/backend/v4l.h +index 588b96e..6aee586 100644 +--- a/backend/v4l.h ++++ b/backend/v4l.h +@@ -29,6 +29,7 @@ + #ifndef v4l_h + #define v4l_h + ++#ifndef __LINUX_VIDEODEV_H + /* Kernel interface */ + /* Only the stuff we need. For more features, more defines are needed */ + +@@ -165,7 +166,7 @@ struct video_channel + + + /* end of kernel interface */ +- ++#endif /* !__LINUX_VIDEODEV_H */ + + #include <../include/sane/sane.h> + +-- +1.7.4 + diff --git a/package/sane-backends/sane-backends.mk b/package/sane-backends/sane-backends.mk new file mode 100644 index 0000000000..e2adc1af67 --- /dev/null +++ b/package/sane-backends/sane-backends.mk @@ -0,0 +1,47 @@ +################################################################################ +# +# sane-backends +# +################################################################################ + +SANE_BACKENDS_VERSION = 1.0.22 +SANE_BACKENDS_SITE = https://alioth.debian.org/frs/download.php/file/3503 +SANE_BACKENDS_CONFIG_SCRIPTS = sane-config + +ifeq ($(BR2_PACKAGE_LIBUSB),y) +SANE_BACKENDS_DEPENDENCIES += libusb +SANE_BACKENDS_CONF_OPT += --enable-libusb_1_0 +else +SANE_BACKENDS_CONF_OPT += --disable-libusb +endif + +ifeq ($(BR2_PACKAGE_JPEG),y) +SANE_BACKENDS_DEPENDENCIES += jpeg +endif + +ifeq ($(BR2_PACKAGE_TIFF),y) +SANE_BACKENDS_DEPENDENCIES += tiff +endif + +ifeq ($(BR2_PACKAGE_LIBV4L),y) +SANE_BACKENDS_DEPENDENCIES += libv4l +endif + +ifeq ($(BR2_PACKAGE_AVAHI)$(BR2_PACKAGE_DBUS)$(BR2_PACKAGE_LIBGLIB2),yyy) +SANE_BACKENDS_DEPENDENCIES += avahi +SANE_BACKENDS_CONF_OPT += --enable-avahi +endif + +ifeq ($(BR2_PACKAGE_NETSNMP),y) +SANE_BACKENDS_DEPENDENCIES += netsnmp +else +SANE_BACKENDS_CONF_OPT += --without-snmp +endif + +define SANE_BACKENDS_DISABLE_DOCS + $(SED) 's/ doc//' $(@D)/Makefile +endef + +SANE_BACKENDS_POST_CONFIGURE_HOOKS += SANE_BACKENDS_DISABLE_DOCS + +$(eval $(autotools-package)) diff --git a/package/sawman/Config.in b/package/sawman/Config.in index 8dd3ace2bf..2c53dc4550 100644 --- a/package/sawman/Config.in +++ b/package/sawman/Config.in @@ -2,11 +2,11 @@ config BR2_PACKAGE_SAWMAN bool "SawMan (Window Manager)" depends on BR2_PACKAGE_DIRECTFB help - SaWMan is a new window manager module for use with DirectFB. - Its main difference to the default module is that it allows - one process to be an application and window manager, - implementing all kinds of diversity, while SaWMan is only the - working horse. + SaWMan is a new window manager module for use with DirectFB. + Its main difference to the default module is that it allows + one process to be an application and window manager, + implementing all kinds of diversity, while SaWMan is only the + working horse. - See http://www.directfb.org/downloads/Extras/README.SaWMan + See http://www.directfb.org/downloads/Extras/README.SaWMan diff --git a/package/sawman/sawman.mk b/package/sawman/sawman.mk index d2d15d8d22..d807bb48fa 100644 --- a/package/sawman/sawman.mk +++ b/package/sawman/sawman.mk @@ -1,13 +1,13 @@ -############################################################# +################################################################################ # -# SAWMAN +# sawman # -############################################################# -SAWMAN_VERSION:=1.4.11 -SAWMAN_SOURCE:=SaWMan-$(SAWMAN_VERSION).tar.gz -SAWMAN_SITE:=http://www.directfb.org/downloads/Extras +################################################################################ + +SAWMAN_VERSION = 1.6.3 +SAWMAN_SOURCE = SaWMan-$(SAWMAN_VERSION).tar.gz +SAWMAN_SITE = http://www.directfb.org/downloads/Extras SAWMAN_INSTALL_STAGING = YES SAWMAN_DEPENDENCIES = directfb -$(eval $(call AUTOTARGETS,package,sawman)) - +$(eval $(autotools-package)) diff --git a/package/schifra/Config.in b/package/schifra/Config.in new file mode 100644 index 0000000000..5a656eaf61 --- /dev/null +++ b/package/schifra/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_SCHIFRA + bool "schifra" + depends on BR2_INSTALL_LIBSTDCPP + help + Schifra is a very robust, highly optimized and extremely configurable + Reed-Solomon error correcting code library for both software and IP + core based applications with implementations in C++ and VHDL. + + http://www.schifra.com/ + +config BR2_PACKAGE_SCHIFRA_EXAMPLES + bool "schifra examples" + depends on BR2_PACKAGE_SCHIFRA + help + Build and install the schifra example applications. + +comment "schifra needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/schifra/schifra.mk b/package/schifra/schifra.mk new file mode 100644 index 0000000000..673c1a672d --- /dev/null +++ b/package/schifra/schifra.mk @@ -0,0 +1,56 @@ +################################################################################ +# +# schifra +# +################################################################################ + +SCHIFRA_VERSION = 0.0.1 +SCHIFRA_SITE = http://www.schifra.com/downloads +SCHIFRA_SOURCE = schifra.tgz +SCHIFRA_INSTALL_STAGING = YES +SCHIFRA_LICENSE = schifra license +SCHIFRA_LICENSE_FILES = schifra_license.txt + +SCHIFRA_MAKE_OPT = COMPILER="$(TARGET_CXX)" \ + OPTIONS="$(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o" + +# The examples are the only buildable artefacts. +ifeq ($(BR2_PACKAGE_SCHIFRA_EXAMPLES),y) +define SCHIFRA_BUILD_CMDS + $(MAKE) -C $(@D) $(SCHIFRA_MAKE_OPT) all +endef + +define SCHIFRA_INSTALL_EXAMPLES + cd $(@D) && for i in `find -type f -name 'schifra_*' -executable` ; \ + do \ + $(INSTALL) -m 0755 -D $$i $(TARGET_DIR)/usr/bin/$$i; \ + done +endef + +SCHIFRA_POST_INSTALL_TARGET_HOOKS += SCHIFRA_INSTALL_EXAMPLES +endif + +define SCHIFRA_INSTALL_TARGET_CMDS + cd $(@D) && for i in schifra_*.hpp; do \ + $(INSTALL) -m 0644 -D $$i $(TARGET_DIR)/usr/include/$$i; done +endef + +define SCHIFRA_INSTALL_STAGING_CMDS + cd $(@D) && for i in schifra_*.hpp; do \ + $(INSTALL) -m 0644 -D $$i $(STAGING_DIR)/usr/include/$$i; done +endef + +define SCHIFRA_UNINSTALL_TARGET_CMDS + $(RM) $(TARGET_DIR)/usr/include/schifra_*.hpp + $(RM) $(TARGET_DIR)/usr/bin/schifra_* +endef + +define SCHIFRA_UNINSTALL_STAGING_CMDS + $(RM) $(STAGING_DIR)/usr/include/schifra_*.hpp +endef + +define SCHIFRA_CLEAN_CMDS + $(MAKE) -C $(@D) $(SCHIFRA_MAKE_OPT) clean +endef + +$(eval $(generic-package)) diff --git a/package/sconeserver/Config.in b/package/sconeserver/Config.in new file mode 100644 index 0000000000..58c1e036fd --- /dev/null +++ b/package/sconeserver/Config.in @@ -0,0 +1,96 @@ +menuconfig BR2_PACKAGE_SCONESERVER + bool "sconeserver" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_PCRE + help + Sconeserver is a modular, object-orientated and extremely versatile + network server framework for GNU/Linux and UNIX-like platforms. + + http://www.sconemad.com/sconeserver/ + +if BR2_PACKAGE_SCONESERVER + +comment "Sconeserver modules" + +config BR2_PACKAGE_SCONESERVER_EXAMPLES + bool "examples" + help + Example modules for Sconeserver + +config BR2_PACKAGE_SCONESERVER_HTTP_SCONESITE + bool "http::sconesite" + select BR2_PACKAGE_LIBXML2 + help + http::sconesite module for Sconeserver + +config BR2_PACKAGE_SCONESERVER_HTTP_SCONESITE_IMAGE + bool "http::sconesite::image" + depends on BR2_PACKAGE_SCONESERVER_HTTP_SCONESITE + select BR2_PACKAGE_IMAGEMAGICK + help + http::sconesite::image module for Sconeserver + +config BR2_PACKAGE_SCONESERVER_MYSQL + bool "mysql" + depends on BR2_USE_MMU # mysql + select BR2_PACKAGE_MYSQL_CLIENT + help + MySQL module for Sconeserver + +config BR2_PACKAGE_SCONESERVER_BLUETOOTH + bool "bluetooth" + depends on BR2_USE_WCHAR # bluez->libglib2 + depends on BR2_USE_MMU # bluez->dbus + depends on BR2_TOOLCHAIN_HAS_THREADS # bluez->dbus, bluez->libglib2 + depends on !BR2_avr32 # bluez_utils + select BR2_PACKAGE_BLUEZ_UTILS + help + Bluetooth module for Sconeserver + +config BR2_PACKAGE_SCONESERVER_RSS + bool "rss" + select BR2_PACKAGE_LIBXML2 + help + RSS module for Sconeserver + +config BR2_PACKAGE_SCONESERVER_LOCATION + bool "location" + depends on BR2_USE_MMU # gpsd + depends on BR2_TOOLCHAIN_HAS_THREADS # gpsd + select BR2_PACKAGE_GPSD + help + Location module for Sconeserver + +config BR2_PACKAGE_SCONESERVER_LETTUCE + bool "lettuce" + help + Sconeserver module for Lettuce embedded automation platform + + http://www.sconemad.com/lettuce/ + +config BR2_PACKAGE_SCONESERVER_MATHS + bool "maths" + select BR2_PACKAGE_MPFR + help + Mathematics module for Sconeserver + +config BR2_PACKAGE_SCONESERVER_TESTBUILDER + bool "testbuilder" + help + Testbuilder module for Sconeserver + +config BR2_PACKAGE_SCONESERVER_UI + bool "ui" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + help + UI module for Sconeserver + +comment "ui module requires X.org" + depends on !BR2_PACKAGE_XORG7 + +endif # BR2_PACKAGE_SCONESERVER + +comment "sconeserver needs a toolchain w/ C++, threads" + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/sconeserver/sconeserver.mk b/package/sconeserver/sconeserver.mk new file mode 100644 index 0000000000..be5fab7275 --- /dev/null +++ b/package/sconeserver/sconeserver.mk @@ -0,0 +1,115 @@ +################################################################################ +# +# sconeserver +# +################################################################################ + +# Release 0.6.0 doesn't build cleanly, so use a recent +# Git commit. +SCONESERVER_VERSION = d58f2de88c681939554089f786e360042a30c8f8 +SCONESERVER_SITE = git://github.com/sconemad/sconeserver.git +SCONESERVER_LICENSE = GPLv2+ +SCONESERVER_LICENSE_FILES = COPYING + +SCONESERVER_AUTORECONF = YES +SCONESERVER_DEPENDENCIES += pcre +SCONESERVER_CONF_OPT += --with-ip --with-local + +# Sconeserver configure script fails to find the libxml2 headers. +ifeq ($(BR2_PACKAGE_LIBXML2),y) + SCONESERVER_CONF_OPT += \ + --with-xml2-config="$(STAGING_DIR)/usr/bin/xml2-config" +endif + +ifeq ($(BR2_INET_IPV6),y) + SCONESERVER_CONF_OPT += --with-ip6 +else + SCONESERVER_CONF_OPT += --without-ip6 +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) + SCONESERVER_DEPENDENCIES += openssl + SCONESERVER_CONF_OPT += --with-ssl +else + SCONESERVER_CONF_OPT += --without-ssl +endif + +ifeq ($(BR2_PACKAGE_SCONESERVER_EXAMPLES),y) + SCONESERVER_CONF_OPT += --with-examples +else + SCONESERVER_CONF_OPT += --without-examples +endif + +ifeq ($(BR2_PACKAGE_SCONESERVER_HTTP_SCONESITE),y) + SCONESERVER_DEPENDENCIES += libxml2 + SCONESERVER_CONF_OPT += --with-sconesite +else + SCONESERVER_CONF_OPT += --without-sconesite +endif + +ifeq ($(BR2_PACKAGE_SCONESERVER_HTTP_SCONESITE_IMAGE),y) + SCONESERVER_DEPENDENCIES += imagemagick host-pkgconf + SCONESERVER_CONF_OPT += \ + --with-sconesite-image \ + --with-Magick++-config="$(STAGING_DIR)/usr/bin/Magick++-config" +else + SCONESERVER_CONF_OPT += --without-sconesite-image +endif + +ifeq ($(BR2_PACKAGE_SCONESERVER_MYSQL),y) + SCONESERVER_DEPENDENCIES += mysql_client + SCONESERVER_CONF_OPT += --with-mysql \ + --with-mysql_config="$(STAGING_DIR)/usr/bin/mysql_config" \ + LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib/mysql" +else + SCONESERVER_CONF_OPT += --without-mysql +endif + +ifeq ($(BR2_PACKAGE_SCONESERVER_BLUETOOTH),y) + SCONESERVER_DEPENDENCIES += bluez_utils + SCONESERVER_CONF_OPT += --with-bluetooth +else + SCONESERVER_CONF_OPT += --without-bluetooth +endif + +ifeq ($(BR2_PACKAGE_SCONESERVER_RSS),y) + SCONESERVER_DEPENDENCIES += libxml2 + SCONESERVER_CONF_OPT += --with-rss +else + SCONESERVER_CONF_OPT += --without-rss +endif + +ifeq ($(BR2_PACKAGE_SCONESERVER_LOCATION),y) + SCONESERVER_DEPENDENCIES += gpsd + SCONESERVER_CONF_OPT += --with-location +else + SCONESERVER_CONF_OPT += --without-location +endif + +ifeq ($(BR2_PACKAGE_SCONESERVER_LETTUCE),y) + SCONESERVER_CONF_OPT += --with-lettuce +else + SCONESERVER_CONF_OPT += --without-lettuce +endif + +ifeq ($(BR2_PACKAGE_SCONESERVER_MATHS),y) + SCONESERVER_DEPENDENCIES += mpfr + SCONESERVER_CONF_OPT += --with-maths +else + SCONESERVER_CONF_OPT += --without-maths +endif + +ifeq ($(BR2_PACKAGE_SCONESERVER_TESTBUILDER),y) + SCONESERVER_CONF_OPT += --with-testbuilder +else + SCONESERVER_CONF_OPT += --without-testbuilder +endif + +ifeq ($(BR2_PACKAGE_SCONESERVER_UI),y) + SCONESERVER_DEPENDENCIES += xlib_libX11 + SCONESERVER_CONF_OPT += --with-ui +else + SCONESERVER_CONF_OPT += --without-ui +endif + +$(eval $(autotools-package)) diff --git a/package/scons/scons.mk b/package/scons/scons.mk new file mode 100644 index 0000000000..a7747d5bf9 --- /dev/null +++ b/package/scons/scons.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# scons +# +################################################################################ + +SCONS_VERSION = 2.3.0 +SCONS_SITE = http://downloads.sourceforge.net/project/scons/scons/$(SCONS_VERSION) +SCONS_LICENSE = MIT +SCONS_LICENSE_FILES = LICENSE.txt + +define HOST_SCONS_BUILD_CMDS + (cd $(@D); python setup.py build) +endef + +define HOST_SCONS_INSTALL_CMDS + (cd $(@D); python setup.py install --prefix=$(HOST_DIR)/usr \ + --install-lib=$(HOST_DIR)/usr/lib/scons-$(SCONS_VERSION)) +endef + +$(eval $(host-generic-package)) + +# variables used by other packages +SCONS = $(HOST_DIR)/usr/bin/scons diff --git a/package/screen/Config.in b/package/screen/Config.in index c23239235a..b5876e87cf 100644 --- a/package/screen/Config.in +++ b/package/screen/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_SCREEN bool "screen" + depends on BR2_USE_MMU # fork() select BR2_PACKAGE_NCURSES help Screen is a full-screen window manager that multiplexes a physical diff --git a/package/screen/screen.mk b/package/screen/screen.mk index 54a9c9c9df..9fd04c7948 100644 --- a/package/screen/screen.mk +++ b/package/screen/screen.mk @@ -1,14 +1,25 @@ -############################################################# +################################################################################ # # screen # -############################################################# +################################################################################ SCREEN_VERSION = 4.0.3 SCREEN_SITE = $(BR2_GNU_MIRROR)/screen +SCREEN_LICENSE = GPLv2+ +SCREEN_LICENSE_FILES = COPYING SCREEN_DEPENDENCIES = ncurses -SCREEN_CONF_ENV = CFLAGS=-DSYSV=1 -SCREEN_MAKE_OPT = -j1 +SCREEN_CONF_ENV = ac_cv_header_elf_h=no ac_cv_header_dwarf_h=no \ + CFLAGS="$(TARGET_CFLAGS) -DTERMINFO" +SCREEN_MAKE = $(MAKE1) SCREEN_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) SCREEN=screen install_bin -$(eval $(call AUTOTARGETS,package,screen)) +define SCREEN_INSTALL_SCREENRC + if [ ! -f $(TARGET_DIR)/etc/screenrc ]; then \ + $(INSTALL) -m 0755 -D $(@D)/etc/screenrc $(TARGET_DIR)/etc/screenrc; \ + fi +endef + +SCREEN_POST_INSTALL_TARGET_HOOKS += SCREEN_INSTALL_SCREENRC + +$(eval $(autotools-package)) diff --git a/package/sdl/Config.in b/package/sdl/Config.in index 869173d88f..65ac8a2469 100644 --- a/package/sdl/Config.in +++ b/package/sdl/Config.in @@ -24,5 +24,7 @@ config BR2_PACKAGE_SDL_QTOPIA config BR2_PACKAGE_SDL_X11 bool "SDL X11 video driver" depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT endif diff --git a/package/sdl/sdl-1.2-fix-compilation-libX11.patch b/package/sdl/sdl-1.2-fix-compilation-libX11.patch new file mode 100644 index 0000000000..e1a6ff1631 --- /dev/null +++ b/package/sdl/sdl-1.2-fix-compilation-libX11.patch @@ -0,0 +1,44 @@ +--- a/configure.in Wed Apr 17 00:56:53 2013 -0700 ++++ a/configure.in Sun Jun 02 20:48:53 2013 +0600 +@@ -1169,6 +1169,17 @@ + if test x$definitely_enable_video_x11_xrandr = xyes; then + AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR) + fi ++ AC_MSG_CHECKING(for const parameter to _XData32) ++ have_const_param_xdata32=no ++ AC_TRY_COMPILE([ ++ #include ++ extern int _XData32(Display *dpy,register _Xconst long *data,unsigned len); ++ ],[ ++ ],[ ++ have_const_param_xdata32=yes ++ AC_DEFINE(SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32) ++ ]) ++ AC_MSG_RESULT($have_const_param_xdata32) + fi + fi + } +--- a/include/SDL_config.h.in Wed Apr 17 00:56:53 2013 -0700 ++++ a/include/SDL_config.h.in Sun Jun 02 20:48:53 2013 +0600 +@@ -283,6 +283,7 @@ + #undef SDL_VIDEO_DRIVER_WINDIB + #undef SDL_VIDEO_DRIVER_WSCONS + #undef SDL_VIDEO_DRIVER_X11 ++#undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32 + #undef SDL_VIDEO_DRIVER_X11_DGAMOUSE + #undef SDL_VIDEO_DRIVER_X11_DYNAMIC + #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT +--- a/src/video/x11/SDL_x11sym.h Wed Apr 17 00:56:53 2013 -0700 ++++ a/src/video/x11/SDL_x11sym.h Sun Jun 02 20:48:53 2013 +0600 +@@ -165,7 +165,11 @@ + */ + #ifdef LONG64 + SDL_X11_MODULE(IO_32BIT) ++#if SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32 ++SDL_X11_SYM(int,_XData32,(Display *dpy,register _Xconst long *data,unsigned len),(dpy,data,len),return) ++#else + SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return) ++#endif + SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,len),) + #endif + diff --git a/package/sdl/sdl-fix__XGetRequest_undefined.patch b/package/sdl/sdl-fix__XGetRequest_undefined.patch deleted file mode 100644 index 7dd5d7cacc..0000000000 --- a/package/sdl/sdl-fix__XGetRequest_undefined.patch +++ /dev/null @@ -1,60 +0,0 @@ -@@ -, +, @@ - added. - src/video/x11/SDL_x11dyn.c | 24 ++++++++++++++++++++++++ - src/video/x11/SDL_x11sym.h | 6 ++++++ - 2 files changed, 30 insertions(+), 0 deletions(-) ---- a/src/video/x11/SDL_x11dyn.c -+++ a/src/video/x11/SDL_x11dyn.c -@@ -109,6 +109,21 @@ char *(*pXGetICValues)(XIC, ...) = NULL; - #undef SDL_X11_SYM - - -+static void *SDL_XGetRequest_workaround(Display* dpy, CARD8 type, size_t len) -+{ -+ xReq *req; -+ WORD64ALIGN -+ if (dpy->bufptr + len > dpy->bufmax) -+ _XFlush(dpy); -+ dpy->last_req = dpy->bufptr; -+ req = (xReq*)dpy->bufptr; -+ req->reqType = type; -+ req->length = len / 4; -+ dpy->bufptr += len; -+ dpy->request++; -+ return req; -+} -+ - static int x11_load_refcount = 0; - - void SDL_X11_UnloadSymbols(void) -@@ -168,6 +183,15 @@ int SDL_X11_LoadSymbols(void) - X11_GetSym("XGetICValues",&SDL_X11_HAVE_UTF8,(void **)&pXGetICValues); - #endif - -+ /* -+ * In case we're built with newer Xlib headers, we need to make sure -+ * that _XGetRequest() is available, even on older systems. -+ * Otherwise, various Xlib macros we use will call a NULL pointer. -+ */ -+ if (!SDL_X11_HAVE_XGETREQUEST) { -+ p_XGetRequest = SDL_XGetRequest_workaround; -+ } -+ - if (SDL_X11_HAVE_BASEXLIB) { /* all required symbols loaded. */ - SDL_ClearError(); - } else { ---- a/src/video/x11/SDL_x11sym.h -+++ a/src/video/x11/SDL_x11sym.h -@@ -170,6 +170,12 @@ SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data, - #endif - - /* -+ * libX11 1.4.99.1 added _XGetRequest, and macros use it behind the scenes. -+ */ -+SDL_X11_MODULE(XGETREQUEST) -+SDL_X11_SYM(void *,_XGetRequest,(Display* a,CARD8 b,size_t c),(a,b,c),return) -+ -+/* - * These only show up on some variants of Unix. - */ - #if defined(__osf__) diff --git a/package/sdl/sdl-use-correct-directfb-config.patch b/package/sdl/sdl-use-correct-directfb-config.patch new file mode 100644 index 0000000000..225079083f --- /dev/null +++ b/package/sdl/sdl-use-correct-directfb-config.patch @@ -0,0 +1,40 @@ +[PATCH] configure.in: use correct directfb-config in version check + +The configure script has just checked for the correct directfb-config +script, so also use it for the version check instead of whatever +might be in the path. + +Also patch the generated configure, as it doesn't cleanly autoreconf. + +Signed-off-by: Peter Korsgaard +--- + configure | 2 +- + configure.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +Index: SDL-1.2.15/configure.in +=================================================================== +--- SDL-1.2.15.orig/configure.in ++++ SDL-1.2.15/configure.in +@@ -1276,7 +1276,7 @@ + else + set -- `echo $DIRECTFB_REQUIRED_VERSION | sed 's/\./ /g'` + NEED_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3` +- set -- `directfb-config --version | sed 's/\./ /g'` ++ set -- `$DIRECTFBCONFIG --version | sed 's/\./ /g'` + HAVE_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3` + if test $HAVE_VERSION -ge $NEED_VERSION; then + DIRECTFB_CFLAGS=`$DIRECTFBCONFIG --cflags` +Index: SDL-1.2.15/configure +=================================================================== +--- SDL-1.2.15.orig/configure ++++ SDL-1.2.15/configure +@@ -24958,7 +24958,7 @@ + else + set -- `echo $DIRECTFB_REQUIRED_VERSION | sed 's/\./ /g'` + NEED_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3` +- set -- `directfb-config --version | sed 's/\./ /g'` ++ set -- `$DIRECTFBCONFIG --version | sed 's/\./ /g'` + HAVE_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3` + if test $HAVE_VERSION -ge $NEED_VERSION; then + DIRECTFB_CFLAGS=`$DIRECTFBCONFIG --cflags` diff --git a/package/sdl/sdl.mk b/package/sdl/sdl.mk index fddb6e7b15..d3d6bcacc5 100644 --- a/package/sdl/sdl.mk +++ b/package/sdl/sdl.mk @@ -1,67 +1,81 @@ -############################################################# +################################################################################ # -# SDL +# sdl # -############################################################# -SDL_VERSION:=1.2.14 -SDL_SOURCE:=SDL-$(SDL_VERSION).tar.gz -SDL_SITE:=http://www.libsdl.org/release +################################################################################ +SDL_VERSION = 1.2.15 +SDL_SOURCE = SDL-$(SDL_VERSION).tar.gz +SDL_SITE = http://www.libsdl.org/release +SDL_LICENSE = LGPLv2.1+ +SDL_LICENSE_FILES = COPYING SDL_INSTALL_STAGING = YES ifeq ($(BR2_PACKAGE_SDL_FBCON),y) -SDL_CONF_OPT+=--enable-video-fbcon=yes +SDL_CONF_OPT += --enable-video-fbcon=yes else -SDL_CONF_OPT+=--enable-video-fbcon=no +SDL_CONF_OPT += --enable-video-fbcon=no endif ifeq ($(BR2_PACKAGE_SDL_DIRECTFB),y) SDL_DEPENDENCIES += directfb -SDL_CONF_OPT+=--enable-video-directfb=yes +SDL_CONF_OPT += --enable-video-directfb=yes +SDL_CONF_ENV = ac_cv_path_DIRECTFBCONFIG=$(STAGING_DIR)/usr/bin/directfb-config else -SDL_CONF_OPT=--enable-video-directfb=no +SDL_CONF_OPT = --enable-video-directfb=no endif ifeq ($(BR2_PACKAGE_SDL_QTOPIA),y) -SDL_CONF_OPT+=--enable-video-qtopia=yes +SDL_CONF_OPT += --enable-video-qtopia=yes SDL_DEPENDENCIES += qt else -SDL_CONF_OPT+=--enable-video-qtopia=no +SDL_CONF_OPT += --enable-video-qtopia=no endif ifeq ($(BR2_PACKAGE_SDL_X11),y) -SDL_CONF_OPT+=--enable-video-x11=yes -SDL_DEPENDENCIES += xserver_xorg-server +SDL_CONF_OPT += --enable-video-x11=yes +SDL_DEPENDENCIES += xlib_libX11 xlib_libXext \ + $(if $(BR2_PACKAGE_XLIB_LIBXRENDER), xlib_libXrender) \ + $(if $(BR2_PACKAGE_XLIB_LIBXRANDR), xlib_libXrandr) else -SDL_CONF_OPT+=--enable-video-x11=no +SDL_CONF_OPT += --enable-video-x11=no endif ifeq ($(BR2_PACKAGE_TSLIB),y) SDL_DEPENDENCIES += tslib endif +ifeq ($(BR2_PACKAGE_ALSA_LIB),y) +SDL_DEPENDENCIES += alsa-lib +endif + +ifeq ($(BR2_PACKAGE_MESA3D),y) +SDL_DEPENDENCIES += mesa3d +endif + SDL_CONF_OPT += --enable-pulseaudio=no \ --disable-arts \ --disable-esd \ --disable-nasm \ --disable-video-ps3 -# Fixup prefix= and exec_prefix= in sdl-config, and remove the -# -Wl,-rpath option. +define HOST_SDL_AUTOGEN + cd $(@D) && ./autogen.sh +endef + +HOST_SDL_PRE_CONFIGURE_HOOKS += HOST_SDL_AUTOGEN + + + +SDL_CONFIG_SCRIPTS = sdl-config + +# Remove the -Wl,-rpath option. define SDL_FIXUP_SDL_CONFIG - $(SED) 's%prefix=/usr%prefix=$(STAGING_DIR)/usr%' \ - $(STAGING_DIR)/usr/bin/sdl-config - $(SED) 's%exec_prefix=/usr%exec_prefix=$(STAGING_DIR)/usr%' \ - $(STAGING_DIR)/usr/bin/sdl-config $(SED) 's%-Wl,-rpath,\$${libdir}%%' \ $(STAGING_DIR)/usr/bin/sdl-config endef -SDL_POST_INSTALL_STAGING_HOOKS+=SDL_FIXUP_SDL_CONFIG - -define SDL_INSTALL_TARGET_CMDS - cp -dpf $(STAGING_DIR)/usr/lib/libSDL*.so* $(TARGET_DIR)/usr/lib/ -endef +SDL_POST_INSTALL_STAGING_HOOKS += SDL_FIXUP_SDL_CONFIG -$(eval $(call AUTOTARGETS,package,sdl)) -$(eval $(call AUTOTARGETS,package,sdl,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) \ No newline at end of file diff --git a/package/sdl_gfx/sdl_gfx.mk b/package/sdl_gfx/sdl_gfx.mk index c5a6d7eb26..c6b94510ee 100644 --- a/package/sdl_gfx/sdl_gfx.mk +++ b/package/sdl_gfx/sdl_gfx.mk @@ -1,26 +1,27 @@ -############################################################# +################################################################################ # -# SDL_gfx addon for SDL +# sdl_gfx # -############################################################# -SDL_GFX_VERSION:=2.0.19 -SDL_GFX_SOURCE:=SDL_gfx-$(SDL_GFX_VERSION).tar.gz -SDL_GFX_SITE:=http://www.ferzkopp.net/Software/SDL_gfx-2.0/ -SDL_GFX_INSTALL_STAGING:=YES -SDL_GFX_INSTALL_TARGET:=YES - -SDL_GFX_DEPENDENCIES:=sdl +################################################################################ +SDL_GFX_VERSION = 2.0.23 +SDL_GFX_SOURCE = SDL_gfx-$(SDL_GFX_VERSION).tar.gz +SDL_GFX_SITE = http://www.ferzkopp.net/Software/SDL_gfx-2.0/ +SDL_GFX_LICENSE = zlib +SDL_GFX_LICENSE_FILES = COPYING LICENSE +SDL_GFX_INSTALL_STAGING = YES +SDL_GFX_DEPENDENCIES = sdl SDL_GFX_CONF_OPT = \ --with-sdl-prefix=$(STAGING_DIR)/usr \ --disable-sdltest \ --enable-static -# enable mmx for newer x86's -ifeq ($(BR2_i386)$(BR2_x86_i386)$(BR2_x86_i486)$(BR2_x86_i586)$(BR2_x86_pentiumpro)$(BR2_x86_geode),y) +# Even though x86_64 processors support MMX, the MMX-specific assembly +# code in sdl_gfx is IA32 specific, and does not build for x86_64. +ifeq ($(BR2_i386)$(BR2_X86_CPU_HAS_MMX),yy) SDL_GFX_CONF_OPT += --enable-mmx else SDL_GFX_CONF_OPT += --disable-mmx endif -$(eval $(call AUTOTARGETS,package,sdl_gfx)) +$(eval $(autotools-package)) diff --git a/package/sdl_image/Config.in b/package/sdl_image/Config.in index 36aa4a82c5..be0321ab5f 100644 --- a/package/sdl_image/Config.in +++ b/package/sdl_image/Config.in @@ -42,6 +42,10 @@ config BR2_PACKAGE_SDL_IMAGE_TIFF bool "enable TIFF file format support" select BR2_PACKAGE_TIFF +config BR2_PACKAGE_SDL_IMAGE_WEBP + bool "enable WEBP file format support" + select BR2_PACKAGE_WEBP + config BR2_PACKAGE_SDL_IMAGE_XCF bool "enable XCF file format support" diff --git a/package/sdl_image/sdl_image.mk b/package/sdl_image/sdl_image.mk index 252bf49466..17b5676092 100644 --- a/package/sdl_image/sdl_image.mk +++ b/package/sdl_image/sdl_image.mk @@ -1,15 +1,18 @@ -############################################################# +################################################################################ # -# SDL_image addon for SDL +# sdl_image # -############################################################# -SDL_IMAGE_VERSION:=1.2.6 -SDL_IMAGE_SOURCE:=SDL_image-$(SDL_IMAGE_VERSION).tar.gz -SDL_IMAGE_SITE:=http://www.libsdl.org/projects/SDL_image/release -SDL_IMAGE_INSTALL_STAGING:=YES -SDL_IMAGE_INSTALL_TARGET:=YES +################################################################################ -SDL_IMAGE_CONF_OPT:=--with-sdl-prefix=$(STAGING_DIR)/usr \ +SDL_IMAGE_VERSION = 1.2.12 +SDL_IMAGE_SOURCE = SDL_image-$(SDL_IMAGE_VERSION).tar.gz +SDL_IMAGE_SITE = http://www.libsdl.org/projects/SDL_image/release +SDL_IMAGE_INSTALL_STAGING = YES +SDL_IMAGE_INSTALL_TARGET = YES +SDL_IMAGE_LICENSE = zlib +SDL_IMAGE_LICENSE_FILES = COPYING + +SDL_IMAGE_CONF_OPT = --with-sdl-prefix=$(STAGING_DIR)/usr \ --with-sdl-exec-prefix=$(STAGING_DIR)/usr \ --disable-sdltest \ --disable-static \ @@ -25,6 +28,7 @@ SDL_IMAGE_CONF_OPT:=--with-sdl-prefix=$(STAGING_DIR)/usr \ --enable-pnm=$(if $(BR2_PACKAGE_SDL_IMAGE_PNM),yes,no) \ --enable-tga=$(if $(BR2_PACKAGE_SDL_IMAGE_TARGA),yes,no) \ --enable-tif=$(if $(BR2_PACKAGE_SDL_IMAGE_TIFF),yes,no) \ + --enable-webp=$(if $(BR2_PACKAGE_SDL_IMAGE_WEBP),yes,no) \ --enable-xcf=$(if $(BR2_PACKAGE_SDL_IMAGE_XCF),yes,no) \ --enable-xpm=$(if $(BR2_PACKAGE_SDL_IMAGE_XPM),yes,no) \ --enable-xv=$(if $(BR2_PACKAGE_SDL_IMAGE_XV),yes,no) \ @@ -37,12 +41,14 @@ HOST_SDL_IMAGE_CONF_OPT:=--with-sdl-prefix=$(HOST_DIR)/usr \ --disable-png-shared \ --disable-tif-shared \ -SDL_IMAGE_DEPENDENCIES:=sdl \ +SDL_IMAGE_DEPENDENCIES = sdl \ $(if $(BR2_PACKAGE_SDL_IMAGE_JPEG),jpeg) \ $(if $(BR2_PACKAGE_SDL_IMAGE_PNG),libpng) \ - $(if $(BR2_PACKAGE_SDL_IMAGE_TIFF),tiff) + $(if $(BR2_PACKAGE_SDL_IMAGE_TIFF),tiff) \ + $(if $(BR2_PACKAGE_SDL_IMAGE_WEBP),webp) + -HOST_SDL_IMAGE_DEPENDENCIES:=host-jpeg host-libpng host-tiff host-sdl +HOST_SDL_IMAGE_DEPENDENCIES:=host-jpeg-turbo host-libpng host-tiff host-sdl -$(eval $(call AUTOTARGETS,package,sdl_image)) -$(eval $(call AUTOTARGETS,package,sdl_image,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/sdl_mixer/sdl_mixer.mk b/package/sdl_mixer/sdl_mixer.mk index 01129faabe..a192b5a3db 100644 --- a/package/sdl_mixer/sdl_mixer.mk +++ b/package/sdl_mixer/sdl_mixer.mk @@ -1,11 +1,14 @@ -############################################################# +################################################################################ # -# SDL_mixer +# sdl_mixer # -############################################################# -SDL_MIXER_VERSION:=1.2.11 -SDL_MIXER_SOURCE:=SDL_mixer-$(SDL_MIXER_VERSION).tar.gz -SDL_MIXER_SITE:=http://www.libsdl.org/projects/SDL_mixer/release/ +################################################################################ + +SDL_MIXER_VERSION = 1.2.12 +SDL_MIXER_SOURCE = SDL_mixer-$(SDL_MIXER_VERSION).tar.gz +SDL_MIXER_SITE = http://www.libsdl.org/projects/SDL_mixer/release/ +SDL_MIXER_LICENSE = zlib +SDL_MIXER_LICENSE_FILES = COPYING SDL_MIXER_INSTALL_STAGING = YES SDL_MIXER_DEPENDENCIES = sdl @@ -41,4 +44,4 @@ define SDL_MIXER_CLEAN_CMDS -$(MAKE) -C $(@D) clean endef -$(eval $(call AUTOTARGETS,package,sdl_mixer)) +$(eval $(autotools-package)) diff --git a/package/sdl_net/sdl_net.mk b/package/sdl_net/sdl_net.mk index f01a04c221..dc8f25fb61 100644 --- a/package/sdl_net/sdl_net.mk +++ b/package/sdl_net/sdl_net.mk @@ -1,10 +1,14 @@ -############################################################# +################################################################################ # -# SDL_net: network addon for SDL +# sdl_net # -############################################################# -SDL_NET_VERSION:=1.2.7 -SDL_NET_SITE:=http://www.libsdl.org/projects/SDL_net/release +################################################################################ + +SDL_NET_VERSION = 1.2.8 +SDL_NET_SITE = http://www.libsdl.org/projects/SDL_net/release +SDL_NET_SOURCE = SDL_net-$(SDL_NET_VERSION).tar.gz +SDL_NET_LICENSE = zlib +SDL_NET_LICENSE_FILES = COPYING SDL_NET_CONF_OPT = --localstatedir=/var \ --with-sdl-prefix=$(STAGING_DIR)/usr \ @@ -14,6 +18,4 @@ SDL_NET_INSTALL_STAGING = YES SDL_NET_DEPENDENCIES = sdl -$(eval $(call AUTOTARGETS,package,SDL_net)) - -sdl_net: SDL_net +$(eval $(autotools-package)) diff --git a/package/sdl_sound/sdl_sound.mk b/package/sdl_sound/sdl_sound.mk index 8f51e05758..8ae625ee56 100644 --- a/package/sdl_sound/sdl_sound.mk +++ b/package/sdl_sound/sdl_sound.mk @@ -1,13 +1,15 @@ -############################################################# +################################################################################ # -# sdl_sound addon for SDL +# sdl_sound # -############################################################# -SDL_SOUND_VERSION:=1.0.3 -SDL_SOUND_SOURCE:=SDL_sound-$(SDL_SOUND_VERSION).tar.gz -SDL_SOUND_SITE:=http://icculus.org/SDL_sound/downloads/ -SDL_SOUND_INSTALL_STAGING:=YES -SDL_SOUND_INSTALL_TARGET:=YES +################################################################################ + +SDL_SOUND_VERSION = 1.0.3 +SDL_SOUND_SOURCE = SDL_sound-$(SDL_SOUND_VERSION).tar.gz +SDL_SOUND_SITE = http://icculus.org/SDL_sound/downloads/ +SDL_SOUND_LICENSE = LGPLv2.1+ +SDL_SOUND_LICENSE_FILES = COPYING +SDL_SOUND_INSTALL_STAGING = YES SDL_SOUND_DEPENDENCIES = sdl ifneq ($(BR2_ENABLE_LOCALE),y) @@ -31,11 +33,9 @@ SDL_SOUND_CONF_OPT = \ --with-sdl-prefix=$(STAGING_DIR)/usr \ --with-sdl-exec-prefix=$(STAGING_DIR)/usr \ --disable-sdltest \ - --enable-static \ - --program-prefix='' + --enable-static -# enable mmx for newer x86's -ifeq ($(BR2_i386)$(BR2_x86_i386)$(BR2_x86_i486)$(BR2_x86_i586)$(BR2_x86_pentiumpro)$(BR2_x86_geode),y) +ifeq ($(BR2_X86_CPU_HAS_MMX),y) SDL_SOUND_CONF_OPT += --enable-mmx else SDL_SOUND_CONF_OPT += --disable-mmx @@ -50,10 +50,10 @@ SDL_SOUND_POST_INSTALL_TARGET_HOOKS += SDL_SOUND_REMOVE_PLAYSOUND endif # target shared libs doesn't get removed by make uninstall if the .la -# files are removed (E.G. if BR2_HAVE_DEVFILES isn't set) +# files are removed define SDL_SOUND_UNINSTALL_TARGET_CMDS $(MAKE) DESTDIR=$(TARGET_DIR) uninstall -C $(@D) rm -f $(TARGET_DIR)/usr/lib/libSDL_sound*so* endef -$(eval $(call AUTOTARGETS,package,sdl_sound)) +$(eval $(autotools-package)) diff --git a/package/sdl_ttf/sdl_ttf.mk b/package/sdl_ttf/sdl_ttf.mk index 0a8a9e97a1..23fb335154 100644 --- a/package/sdl_ttf/sdl_ttf.mk +++ b/package/sdl_ttf/sdl_ttf.mk @@ -1,11 +1,14 @@ -############################################################# +################################################################################ # -# SDL_ttf +# sdl_ttf # -############################################################# -SDL_TTF_VERSION:=2.0.9 -SDL_TTF_SOURCE:=SDL_ttf-$(SDL_TTF_VERSION).tar.gz -SDL_TTF_SITE:=http://www.libsdl.org/projects/SDL_ttf/release/ +################################################################################ + +SDL_TTF_VERSION = 2.0.11 +SDL_TTF_SOURCE = SDL_ttf-$(SDL_TTF_VERSION).tar.gz +SDL_TTF_SITE = http://www.libsdl.org/projects/SDL_ttf/release/ +SDL_TTF_LICENSE = zlib +SDL_TTF_LICENSE_FILES = COPYING SDL_TTF_INSTALL_STAGING = YES SDL_TTF_DEPENDENCIES = sdl freetype @@ -14,4 +17,4 @@ SDL_TTF_CONF_OPT = --without-x \ --with-sdl-prefix=$(STAGING_DIR)/usr SDL_TTF_MAKE_OPT = INCLUDES="-I$(STAGING_DIR)/usr/include/SDL" LDFLAGS="-L$(STAGING_DIR)/usr/lib" -$(eval $(call AUTOTARGETS,package,sdl_ttf)) +$(eval $(autotools-package)) diff --git a/package/sdparm/sdparm.mk b/package/sdparm/sdparm.mk index ecb30c5d02..1b3ec4b0d0 100644 --- a/package/sdparm/sdparm.mk +++ b/package/sdparm/sdparm.mk @@ -1,5 +1,13 @@ -SDPARM_VERSION = 1.06 +################################################################################ +# +# sdparm +# +################################################################################ + +SDPARM_VERSION = 1.08 SDPARM_SOURCE = sdparm-$(SDPARM_VERSION).tgz -SDPARM_SITE = http://sg.danny.cz/sg/p/ +SDPARM_SITE = http://sg.danny.cz/sg/p +SDPARM_LICENSE = BSD-3c +SDPARM_LICENSE_FILES = COPYING -$(eval $(call AUTOTARGETS,package,sdparm)) +$(eval $(autotools-package)) diff --git a/package/sed/Config.in b/package/sed/Config.in index 950701c9c0..c6c91df48f 100644 --- a/package/sed/Config.in +++ b/package/sed/Config.in @@ -6,4 +6,5 @@ config BR2_PACKAGE_SED http://sed.sourceforge.net/ - Most people will answer Y. +comment "sed needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/sed/sed.mk b/package/sed/sed.mk index 1a313eb1ce..9f17ad3806 100644 --- a/package/sed/sed.mk +++ b/package/sed/sed.mk @@ -1,11 +1,13 @@ -############################################################# +################################################################################ # # sed # -############################################################# -SED_VERSION = 4.2.1 -SED_SOURCE = sed-$(SED_VERSION).tar.gz +################################################################################ + +SED_VERSION = 4.2.2 SED_SITE = $(BR2_GNU_MIRROR)/sed +SED_LICENSE = GPLv3 +SED_LICENSE_FILES = COPYING SED_CONF_OPT = --bindir=/usr/bin \ --libdir=/lib \ @@ -23,4 +25,4 @@ endef SED_POST_INSTALL_TARGET_HOOKS = SED_MOVE_BINARY -$(eval $(call AUTOTARGETS,package,sed)) +$(eval $(autotools-package)) diff --git a/package/ser2net/Config.in b/package/ser2net/Config.in index 7eb3a6af77..552ab0f094 100644 --- a/package/ser2net/Config.in +++ b/package/ser2net/Config.in @@ -1,8 +1,13 @@ config BR2_PACKAGE_SER2NET bool "ser2net" + depends on BR2_USE_MMU # fork() + depends on BR2_INET_IPV6 help Ser2net provides a way for a user to connect from a network connection to a serial port.. http://ser2net.sourceforge.net +comment "ser2net needs a toolchain w/ IPv6" + depends on BR2_USE_MMU + depends on !BR2_INET_IPV6 diff --git a/package/ser2net/ser2net.mk b/package/ser2net/ser2net.mk index 9c3d136c95..5e77d36b42 100644 --- a/package/ser2net/ser2net.mk +++ b/package/ser2net/ser2net.mk @@ -1,11 +1,12 @@ -############################################################# +################################################################################ # # ser2net # -############################################################# +################################################################################ -SER2NET_VERSION = 2.7 -SER2NET_SOURCE = ser2net-$(SER2NET_VERSION).tar.gz -SER2NET_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/ser2net +SER2NET_VERSION = 2.9.1 +SER2NET_SITE = http://downloads.sourceforge.net/project/ser2net/ser2net +SER2NET_LICENSE = GPLv2+ +SER2NET_LICENSE_FILES = COPYING -$(eval $(call AUTOTARGETS,package,ser2net)) +$(eval $(autotools-package)) diff --git a/package/setserial/Config.in b/package/setserial/Config.in index 2f6d6eea82..cffe50ef0e 100644 --- a/package/setserial/Config.in +++ b/package/setserial/Config.in @@ -1,4 +1,6 @@ config BR2_PACKAGE_SETSERIAL bool "setserial" + # Uses fork() + depends on BR2_USE_MMU help Setserial : configuration of serial ports diff --git a/package/setserial/setserial.mk b/package/setserial/setserial.mk index f24af73dff..f8d0a4b5b3 100644 --- a/package/setserial/setserial.mk +++ b/package/setserial/setserial.mk @@ -1,22 +1,23 @@ -############################################################# +################################################################################ # -# Setserial +# setserial # -############################################################# +################################################################################ + SETSERIAL_VERSION = 2.17 -SETSERIAL_PATCH = setserial_2.17-45.2.diff.gz +SETSERIAL_PATCH = setserial_2.17-45.3.diff.gz SETSERIAL_SOURCE = setserial_$(SETSERIAL_VERSION).orig.tar.gz -SETSERIAL_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/s/setserial/ +SETSERIAL_SITE = http://snapshot.debian.org/archive/debian/20131001T214925Z/pool/main/s/setserial/ define SETSERIAL_APPLY_DEBIAN_PATCHES # Touching gorhack.h is needed for the Debian patch 18 to work if [ -d $(@D)/debian/patches ]; then \ touch $(@D)/gorhack.h; \ rm $(@D)/debian/patches/01_makefile.dpatch; \ - toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches *.dpatch; \ + support/scripts/apply-patches.sh $(@D) $(@D)/debian/patches *.dpatch; \ fi endef SETSERIAL_POST_PATCH_HOOKS += SETSERIAL_APPLY_DEBIAN_PATCHES -$(eval $(call AUTOTARGETS,package,setserial)) +$(eval $(autotools-package)) diff --git a/package/sfdisk/Config.in b/package/sfdisk/Config.in deleted file mode 100644 index c5b84be9e8..0000000000 --- a/package/sfdisk/Config.in +++ /dev/null @@ -1,5 +0,0 @@ -config BR2_PACKAGE_SFDISK - bool "sfdisk" - depends on BR2_DEPRECATED - help - Partition table manipulator for Linux. diff --git a/package/sfdisk/sfdisk.001.include_sys_syscalls_h.patch b/package/sfdisk/sfdisk.001.include_sys_syscalls_h.patch deleted file mode 100644 index dd35951786..0000000000 --- a/package/sfdisk/sfdisk.001.include_sys_syscalls_h.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- sfdisk/sfdisk.c.oorig 2006-10-09 16:24:06.000000000 +0200 -+++ sfdisk/sfdisk.c 2006-10-09 16:24:20.000000000 +0200 -@@ -47,6 +47,9 @@ - #include - #include - #ifdef __linux__ -+#define _LIBC -+#include -+#undef _LIBC - #include /* _syscall */ - #endif - #include "nls.h" diff --git a/package/sfdisk/sfdisk.005.no-llseek-fix.patch b/package/sfdisk/sfdisk.005.no-llseek-fix.patch deleted file mode 100644 index 4ea571ce47..0000000000 --- a/package/sfdisk/sfdisk.005.no-llseek-fix.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -ur sfdisk_vanilla/sfdisk.c sfdisk_llseek-fix/sfdisk.c ---- sfdisk_vanilla/sfdisk.c 2004-01-13 13:03:11.000000000 +0000 -+++ sfdisk_llseek-fix/sfdisk.c 2008-04-17 08:42:35.000000000 +0000 -@@ -134,9 +137,17 @@ - * Note: we use 512-byte sectors here, irrespective of the hardware ss. - */ - #if defined(__linux__) && !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) && !defined (__s390x__) -+#if defined(_llseek) - static - _syscall5(int, _llseek, unsigned int, fd, ulong, hi, ulong, lo, - loff_t *, res, unsigned int, wh); -+#else -+static int _llseek (unsigned int fd, unsigned long oh, -+ unsigned long ol, long long *result, -+ unsigned int origin) { -+ return syscall (__NR__llseek, fd, oh, ol, result, origin); -+#endif -+} - #endif - - static int diff --git a/package/sfdisk/sfdisk.010.index-rindex-fix-2.patch b/package/sfdisk/sfdisk.010.index-rindex-fix-2.patch deleted file mode 100644 index b3ca81d908..0000000000 --- a/package/sfdisk/sfdisk.010.index-rindex-fix-2.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -ru sfdisk_vanilla/sfdisk.c sfdisk_index-rindex-fix/sfdisk.c ---- sfdisk_vanilla/sfdisk.c 2004-01-13 13:03:11.000000000 +0000 -+++ sfdisk_index-rindex-fix/sfdisk.c 2008-04-17 13:44:40.000000000 +0000 -@@ -40,7 +40,7 @@ - #include /* read, write */ - #include /* O_RDWR */ - #include /* ERANGE */ --#include /* index() */ -+#include /* strchr, strrchr */ - #include - #include - #include -@@ -1672,12 +1672,12 @@ - eof = 1; - return RD_EOF; - } -- if (!(lp = index(lp, '\n'))) -+ if (!(lp = strchr(lp, '\n'))) - fatal(_("long or incomplete input line - quitting\n")); - *lp = 0; - - /* remove comments, if any */ -- if ((lp = index(line+2, '#')) != 0) -+ if ((lp = strchr(line+2, '#')) != 0) - *lp = 0; - - /* recognize a few commands - to be expanded */ -@@ -1687,7 +1687,7 @@ - } - - /* dump style? - then bad input is fatal */ -- if ((ip = index(line+2, ':')) != 0) { -+ if ((ip = strchr(line+2, ':')) != 0) { - struct dumpfld *d; - - nxtfld: -@@ -2436,7 +2436,7 @@ - - if (argc < 1) - fatal(_("no command?\n")); -- if ((progn = rindex(argv[0], '/')) == NULL) -+ if ((progn = strrchr(argv[0], '/')) == NULL) - progn = argv[0]; - else - progn++; diff --git a/package/sfdisk/sfdisk.mk b/package/sfdisk/sfdisk.mk deleted file mode 100644 index 81c4943dc1..0000000000 --- a/package/sfdisk/sfdisk.mk +++ /dev/null @@ -1,49 +0,0 @@ -############################################################# -# -# sfdisk support -# -############################################################# -SFDISK_VERSION:= -SFDISK_SOURCE=sfdisk$(SFDISK_VERSION).tar.bz2 -SFDISK_CAT:=$(BZCAT) -SFDISK_SITE:=http://www.uclibc.org/ -SFDISK_DIR=$(BUILD_DIR)/sfdisk$(SFDISK_VERSION) - -$(DL_DIR)/$(SFDISK_SOURCE): - $(call DOWNLOAD,$(SFDISK_SITE),$(SFDISK_SOURCE)) - -$(SFDISK_DIR)/.patched: $(DL_DIR)/$(SFDISK_SOURCE) - $(SFDISK_CAT) $(DL_DIR)/$(SFDISK_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - toolchain/patch-kernel.sh $(SFDISK_DIR) package/sfdisk/ sfdisk.\*.patch - touch $@ - - -$(SFDISK_DIR)/sfdisk: $(SFDISK_DIR)/.patched - $(MAKE) \ - CROSS=$(TARGET_CROSS) DEBUG=false OPTIMIZATION="$(TARGET_CFLAGS)" \ - DOLFS=$(if $(BR2_LARGEFILE),true,false) -C $(SFDISK_DIR) - -$(STRIPCMD) $(SFDISK_DIR)/sfdisk - touch -c $(SFDISK_DIR)/sfdisk - -$(TARGET_DIR)/sbin/sfdisk: $(SFDISK_DIR)/sfdisk - cp $(SFDISK_DIR)/sfdisk $(TARGET_DIR)/sbin/sfdisk - touch -c $(TARGET_DIR)/sbin/sfdisk - -sfdisk: $(TARGET_DIR)/sbin/sfdisk - -sfdisk-source: $(DL_DIR)/$(SFDISK_SOURCE) - -sfdisk-clean: - rm -f $(TARGET_DIR)/sbin/sfdisk - -$(MAKE) -C $(SFDISK_DIR) clean - -sfdisk-dirclean: - rm -rf $(SFDISK_DIR) -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_SFDISK),y) -TARGETS+=sfdisk -endif diff --git a/package/sg3_utils/Config.in b/package/sg3_utils/Config.in new file mode 100644 index 0000000000..9d2dbeaffe --- /dev/null +++ b/package/sg3_utils/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_SG3_UTILS + bool "sg3-utils" + depends on BR2_LARGEFILE + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Low level utilities for devices that use a SCSI command set. + This option install only libsgutils2 library not programs. + + http://sg.danny.cz/sg/sg3_utils.html + +config BR2_PACKAGE_SG3_UTILS_PROGS + bool "install programs" + depends on BR2_PACKAGE_SG3_UTILS + +comment "sg3-utils needs a toolchain w/ largefile, threads" + depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/sg3_utils/sg3_utils.mk b/package/sg3_utils/sg3_utils.mk new file mode 100644 index 0000000000..8bb79b5744 --- /dev/null +++ b/package/sg3_utils/sg3_utils.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# sg3_utils +# +################################################################################ + +SG3_UTILS_VERSION = 1.34 +SG3_UTILS_SOURCE = sg3_utils-$(SG3_UTILS_VERSION).tar.xz +SG3_UTILS_SITE = http://sg.danny.cz/sg/p/ +SG3_UTILS_LICENSE = BSD-3c +# utils progs are GPLv2+ licenced +ifeq ($(BR2_PACKAGE_SG3_UTILS_PROGS),y) +SG3_UTILS_LICENSE += GPLv2+ +endif +SG3_UTILS_LICENSE_FILES = COPYING BSD_LICENSE + +# install the libsgutils2 library +SG3_UTILS_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_SG3_UTILS_PROGS),) +define SG3_UTILS_REMOVE_PROGS + for prog in \ + dd decode_sense emc_trespass format get_config \ + get_lba_status ident inq logs luns map26 \ + map sgm_dd modes opcodes sgp_dd persist prevent \ + raw rbuf rdac read readcap read_block_limits \ + read_buffer read_long reassign referrals \ + requests reset rmsn rtpg safte sanitize \ + sat_identify sat_phy_event sat_set_features scan \ + senddiag ses start stpg sync test_rwbuf turs \ + unmap verify vpd write_buffer write_long \ + write_same wr_mode ; do \ + $(RM) $(TARGET_DIR)/usr/bin/sg_$${prog} ; \ + done + $(RM) $(TARGET_DIR)/usr/bin/sginfo +endef + +SG3_UTILS_POST_INSTALL_TARGET_HOOKS += SG3_UTILS_REMOVE_PROGS +endif + +$(eval $(autotools-package)) diff --git a/package/shared-mime-info/Config.in b/package/shared-mime-info/Config.in index b08c1fdaa6..91a5a15a05 100644 --- a/package/shared-mime-info/Config.in +++ b/package/shared-mime-info/Config.in @@ -1,6 +1,8 @@ config BR2_PACKAGE_SHARED_MIME_INFO bool "shared-mime-info" depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 select BR2_PACKAGE_LIBGLIB2 select BR2_PACKAGE_LIBXML2 help @@ -10,5 +12,6 @@ config BR2_PACKAGE_SHARED_MIME_INFO http://freedesktop.org/wiki/Software/shared-mime-info -comment "shared-mime-info requires a toolchain with WCHAR support" - depends on !BR2_USE_WCHAR +comment "shared-mime-info needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/shared-mime-info/shared-mime-info-0.60-fix-xmllint.patch b/package/shared-mime-info/shared-mime-info-0.60-fix-xmllint.patch deleted file mode 100644 index 921333e3d9..0000000000 --- a/package/shared-mime-info/shared-mime-info-0.60-fix-xmllint.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: shared-mime-info-0.60/Makefile.am -=================================================================== ---- shared-mime-info-0.60.orig/Makefile.am -+++ shared-mime-info-0.60/Makefile.am -@@ -72,7 +72,7 @@ - - check: freedesktop.org.xml - if test -n $(XMLLINT) ; then \ -- xmllint --noout --valid $(top_srcdir)/freedesktop.org.xml; \ -+ $(XMLLINT) --noout --valid $(top_srcdir)/freedesktop.org.xml; \ - fi - if test -d CVS/ && test -x ../xdgmime/src/test-mime-data && test -x $(top_builddir)/test-tree-magic ; then \ - mkdir -p $(top_builddir)/temp-mime-dir/mime/packages ; \ diff --git a/package/shared-mime-info/shared-mime-info.mk b/package/shared-mime-info/shared-mime-info.mk index 6abfa7531e..d147bb70a7 100644 --- a/package/shared-mime-info/shared-mime-info.mk +++ b/package/shared-mime-info/shared-mime-info.mk @@ -1,33 +1,33 @@ -############################################################# +################################################################################ # # shared-mime-info # -############################################################# -SHARED_MIME_INFO_VERSION = 0.60 +################################################################################ + +SHARED_MIME_INFO_VERSION = 0.90 SHARED_MIME_INFO_SOURCE = shared-mime-info-$(SHARED_MIME_INFO_VERSION).tar.bz2 SHARED_MIME_INFO_SITE = http://freedesktop.org/~hadess SHARED_MIME_INFO_INSTALL_STAGING = YES -SHARED_MIME_INFO_INSTALL_TARGET = YES -SHARED_MIME_INFO_AUTORECONF = NO SHARED_MIME_INFO_CONF_ENV = XMLLINT=$(HOST_DIR)/usr/bin/xmllint -SHARED_MIME_INFO_DEPENDENCIES = host-pkg-config host-libglib2 host-libxml2 host-shared-mime-info libxml2 libglib2 +SHARED_MIME_INFO_DEPENDENCIES = host-pkgconf host-libglib2 host-libxml2 host-shared-mime-info libxml2 libglib2 SHARED_MIME_INFO_CONF_OPT = --disable-update-mimedb +SHARED_MIME_INFO_MAKE = $(MAKE1) -HOST_SHARED_MIME_INFO_DEPENDENCIES = host-pkg-config host-intltool +HOST_SHARED_MIME_INFO_DEPENDENCIES = host-pkgconf host-intltool -HOST_SHARED_MIME_INFO_CONF_OPT = \ - --disable-update-mimedb +HOST_SHARED_MIME_INFO_CONF_OPT = --disable-update-mimedb +HOST_SHARED_MIME_INFO_MAKE = $(MAKE1) define SHARED_MIME_INFO_INSTALL_TARGET_CMDS $(HOST_MAKE_ENV) $(SHARED_MIME_INFO_HOST_BINARY) $(STAGING_DIR)/usr/share/mime $(INSTALL) -D $(STAGING_DIR)/usr/share/mime/mime.cache $(TARGET_DIR)/usr/share/mime/mime.cache endef -$(eval $(call AUTOTARGETS,package,shared-mime-info)) -$(eval $(call AUTOTARGETS,package,shared-mime-info,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) # shared-mime-info for the host -SHARED_MIME_INFO_HOST_BINARY:=$(HOST_DIR)/usr/bin/update-mime-database +SHARED_MIME_INFO_HOST_BINARY = $(HOST_DIR)/usr/bin/update-mime-database diff --git a/package/slang/slang.mk b/package/slang/slang.mk index 0c604d9cd4..2fb9692bb7 100644 --- a/package/slang/slang.mk +++ b/package/slang/slang.mk @@ -1,8 +1,9 @@ -############################################################# +################################################################################ # # slang # -############################################################# +################################################################################ + SLANG_VERSION = 1.4.5 SLANG_SOURCE = slang-$(SLANG_VERSION)-mini.tar.bz2 SLANG_SITE = http://www.uclibc.org/ @@ -51,4 +52,4 @@ define SLANG_CLEAN_CMDS $(MAKE) -C $(@D) clean endef -$(eval $(call GENTARGETS,package,slang)) +$(eval $(generic-package)) diff --git a/package/slirp/Config.in b/package/slirp/Config.in new file mode 100644 index 0000000000..ecd492dd11 --- /dev/null +++ b/package/slirp/Config.in @@ -0,0 +1,25 @@ +config BR2_PACKAGE_SLIRP + bool "slirp" + help + The Spice project aims to provide a complete open source + solution for interaction with virtualized desktop devices. + The Spice project deals with both the virtualized devices + and the front-end. Interaction between front-end and + back-end is done using VD-Interfaces. + + This package implements the slirp-part for Spice. + Slirp emulates a PPP or SLIP connection over a normal terminal. + + http://www.spice-space.org/ + + NOTE: + This package has some history of a unique kind: + - originally developped as 'slirp' by Danny Gasparovski, and + seemingly abandonned (developper /disapeared/) + - then re-maintained at sourceforge by "Kelly", up to some + time around 2009: http://slirp.sourceforge.net/ + - during that period, QEMU (Fabrice BELLARD) forked the code + and included it in QEMU + - and it was imported from this breed by the Spice project + around May 2009 + - which is what we use here diff --git a/package/slirp/slirp.mk b/package/slirp/slirp.mk new file mode 100644 index 0000000000..0e208434db --- /dev/null +++ b/package/slirp/slirp.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# slirp +# +################################################################################ + +# There's no tarball releases of slirp, so we use the git repo +# Also, there's no tag, so we use a random SHA1 (master's HEAD +# of today) +SLIRP_VERSION = 8c2da74c1385242f20799fec8c04f8378edc6550 +SLIRP_SITE = git://anongit.freedesktop.org/spice/slirp +SLIRP_LICENSE = BSD-4c BSD-2c +# Note: The license file 'COPYRIGHT' is missing from the sources, +# although some files refer to it. +SLIRP_INSTALL_STAGING = YES + +# As we're using the git tree, there's no ./configure, +# so we need to autoreconf. +SLIRP_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/smartmontools/Config.in b/package/smartmontools/Config.in index 18320f0225..92e0037a5a 100644 --- a/package/smartmontools/Config.in +++ b/package/smartmontools/Config.in @@ -1,10 +1,12 @@ config BR2_PACKAGE_SMARTMONTOOLS bool "smartmontools" depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # fork() help Control and monitor storage systems using S.M.A.R.T. http://smartmontools.sourceforge.net/ -comment "smartmontools requires a toolchain with C++ support enabled" +comment "smartmontools needs a toolchain w/ C++" + depends on BR2_USE_MMU depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/smartmontools/smartmontools.mk b/package/smartmontools/smartmontools.mk index d982863e47..903ed47da8 100644 --- a/package/smartmontools/smartmontools.mk +++ b/package/smartmontools/smartmontools.mk @@ -1,10 +1,12 @@ -############################################################# +################################################################################ # # smartmontools # -############################################################# +################################################################################ -SMARTMONTOOLS_VERSION = 5.40 -SMARTMONTOOLS_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/smartmontools +SMARTMONTOOLS_VERSION = 6.2 +SMARTMONTOOLS_SITE = http://downloads.sourceforge.net/project/smartmontools/smartmontools/$(SMARTMONTOOLS_VERSION) +SMARTMONTOOLS_LICENSE = GPLv2+ +SMARTMONTOOLS_LICENSE_FILES = COPYING -$(eval $(call AUTOTARGETS,package,smartmontools)) +$(eval $(autotools-package)) diff --git a/package/snappy/Config.in b/package/snappy/Config.in new file mode 100644 index 0000000000..06d537f1c9 --- /dev/null +++ b/package/snappy/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_SNAPPY + bool "snappy" + depends on BR2_INSTALL_LIBSTDCPP + help + Snappy is a compression/decompression library. It does not aim for + maximum compression, or compatibility with any other compression + library; instead, it aims for very high speeds and reasonable + compression. + + http://code.google.com/p/snappy/ + +comment "snappy needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/snappy/snappy.mk b/package/snappy/snappy.mk new file mode 100644 index 0000000000..d8ec2390b9 --- /dev/null +++ b/package/snappy/snappy.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# snappy +# +################################################################################ + +SNAPPY_VERSION = 1.1.0 +SNAPPY_SITE = http://snappy.googlecode.com/files/ +SNAPPY_LICENSE = BSD-3c +SNAPPY_LICENSE_FILES = COPYING +SNAPPY_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/snmppp/Config.in b/package/snmppp/Config.in new file mode 100644 index 0000000000..5d6d749b81 --- /dev/null +++ b/package/snmppp/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_SNMPPP + bool "snmp++" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_OPENSSL + help + SNMP++v3.x is a C++ API which supports SNMP v1, v2c, and v3. + + http://www.agentpp.com/snmp_pp3_x/snmp_pp3_x.html + +comment "snmp++ needs a toolchain w/ threads, C++" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/snmppp/snmppp.mk b/package/snmppp/snmppp.mk new file mode 100644 index 0000000000..8e8fcebc14 --- /dev/null +++ b/package/snmppp/snmppp.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# snmp++ +# +################################################################################ + +SNMPPP_VERSION = 3.3.0 +SNMPPP_SOURCE = snmp++v$(SNMPPP_VERSION).tar.gz +SNMPPP_SITE = http://www.agentpp.com +SNMPPP_DEPENDENCIES = openssl host-pkgconf +SNMPPP_INSTALL_STAGING = YES +# no configure script in tarball +SNMPPP_AUTORECONF = YES +SNMPPP_LICENSE = SNMP++ +SNMPPP_LICENSE_FILES = snmp_pp/snmp_pp.cpp + +$(eval $(autotools-package)) diff --git a/package/snowball-hdmiservice/Config.in b/package/snowball-hdmiservice/Config.in new file mode 100644 index 0000000000..a22797f124 --- /dev/null +++ b/package/snowball-hdmiservice/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_SNOWBALL_HDMISERVICE + bool "snowball-hdmiservice" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + HDMI userspace control daemon + + This package contains the HDMI userspace control daemon for the + snowball board + + http://www.igloocommunity.org diff --git a/package/snowball-hdmiservice/snowball-hdmiservice.mk b/package/snowball-hdmiservice/snowball-hdmiservice.mk new file mode 100644 index 0000000000..bbe673b647 --- /dev/null +++ b/package/snowball-hdmiservice/snowball-hdmiservice.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# snowball-hdmiservice +# +################################################################################ + +SNOWBALL_HDMISERVICE_VERSION = f75c99d1c52707240a78b4ba78e41d20d3aa3b08 +SNOWBALL_HDMISERVICE_SITE = https://github.com/igloocommunity/hdmiservice +SNOWBALL_HDMISERVICE_LICENSE = MIT +SNOWBALL_HDMISERVICE_LICENSE_FILES = debian/copyright +SNOWBALL_HDMISERVICE_INSTALL_STAGING = YES + +define SNOWBALL_HDMISERVICE_BUILD_CMDS + $(MAKE) -C $(@D) CC="$(TARGET_CC) $(TARGET_CFLAGS)" +endef + +define SNOWBALL_HDMISERVICE_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) CC="$(TARGET_CC) $(TARGET_CFLAGS)" DESTDIR=$(STAGING_DIR) install +endef + +define SNOWBALL_HDMISERVICE_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) CC="$(TARGET_CC) $(TARGET_CFLAGS)" DESTDIR=$(TARGET_DIR) install +endef + +define SNOWBALL_HDMISERVICE_UNINSTALL_STAGING_CMDS + rm -f $(STAGING_DIR)/usr/lib/hdmiservice.so + rm -f $(STAGING_DIR)/usr/bin/hdmistart + rm -f $(STAGING_DIR)/usr/include/hdmi_service_api.h + rm -f $(STAGING_DIR)/usr/include/hdmi_service_local.h +endef + +define SNOWBALL_HDMISERVICE_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/lib/hdmiservice.so + rm -f $(TARGET_DIR)/usr/bin/hdmistart +endef + +define SNOWBALL_HDMISERVICE_CLEAN_CMDS + $(MAKE) -C $(@D) clean +endef + + +$(eval $(generic-package)) diff --git a/package/snowball-init/Config.in b/package/snowball-init/Config.in new file mode 100644 index 0000000000..e6e3272c88 --- /dev/null +++ b/package/snowball-init/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_SNOWBALL_INIT + bool "snowball-init" + # Runtime dependency, needed by snowball startup script + select BR2_PACKAGE_BLUEZ_UTILS + depends on !BR2_avr32 + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, alsa-lib, libglib2 + depends on BR2_USE_MMU # dbus + select BR2_PACKAGE_UX500_FIRMWARE + help + Snowball init scripts + + http://www.igloocommunity.org + +comment "snowball-init needs a toolchain w/ wchar, threads" + depends on !BR2_avr32 && BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/snowball-init/snowball-init.mk b/package/snowball-init/snowball-init.mk new file mode 100644 index 0000000000..d71f347095 --- /dev/null +++ b/package/snowball-init/snowball-init.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# snowball-init +# +################################################################################ + +SNOWBALL_INIT_VERSION = b064be21de25729039e5e54037bbdd2e25cfd5b7 +SNOWBALL_INIT_SITE = https://github.com/igloocommunity/snowball-init +SNOWBALL_INIT_LICENSE = BSD-4c +SNOWBALL_INIT_LICENSE_FILES = debian/copyright + +define SNOWBALL_INIT_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/snowball $(TARGET_DIR)/etc/init.d/S50snowball +endef + +$(eval $(generic-package)) diff --git a/package/socat/Config.in b/package/socat/Config.in index ae88be9073..09eb2b616d 100644 --- a/package/socat/Config.in +++ b/package/socat/Config.in @@ -1,6 +1,12 @@ config BR2_PACKAGE_SOCAT bool "socat" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() help Multipurpose socket relay program. http://www.dest-unreach.org/socat/ + +comment "socat needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/socat/socat-no-documentation.patch b/package/socat/socat-no-documentation.patch new file mode 100644 index 0000000000..ce088dfafc --- /dev/null +++ b/package/socat/socat-no-documentation.patch @@ -0,0 +1,37 @@ +socat: disable documentation build/installation + +The documentation generation process requires a special yold2man +program, for which we don't have a package in Buildroot. Since we +generally don't care much about documentation of packages, just adjust +the package Makefile.in to not build/install its documentation. + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile.in +=================================================================== +--- a/Makefile.in ++++ b/Makefile.in +@@ -93,7 +93,7 @@ + Config/Makefile.Cygwin-1-5-25 Config/config.Cygwin-1-5-25.h \ + Config/Makefile.MacOSX-10-5 Config/config.MacOSX-10-5.h + +-all: progs doc ++all: progs + + scmclean: gitclean + +@@ -136,13 +136,11 @@ + strip: progs + strip $(PROGS) + +-install: progs $(srcdir)/doc/socat.1 ++install: progs + mkdir -p $(DESTDIR)$(BINDEST) + $(INSTALL) -m 755 socat $(DESTDIR)$(BINDEST) + $(INSTALL) -m 755 procan $(DESTDIR)$(BINDEST) + $(INSTALL) -m 755 filan $(DESTDIR)$(BINDEST) +- mkdir -p $(DESTDIR)$(MANDEST)/man1 +- $(INSTALL) -m 644 $(srcdir)/doc/socat.1 $(DESTDIR)$(MANDEST)/man1/ + + uninstall: + rm -f $(DESTDIR)$(BINDEST)/socat diff --git a/package/socat/socat.mk b/package/socat/socat.mk index 5714b8fb0f..df60961c82 100644 --- a/package/socat/socat.mk +++ b/package/socat/socat.mk @@ -1,15 +1,30 @@ -############################################################# +################################################################################ # # socat # -############################################################# +################################################################################ -SOCAT_VERSION = 2.0.0-b2 +SOCAT_VERSION = 2.0.0-b6 SOCAT_SOURCE = socat-$(SOCAT_VERSION).tar.bz2 SOCAT_SITE = http://www.dest-unreach.org/socat/download/ +SOCAT_LICENSE = GPLv2 +SOCAT_LICENSE_FILES = COPYING SOCAT_CONF_ENV = sc_cv_termios_ispeed=no \ sc_cv_sys_crdly_shift=9 \ sc_cv_sys_tabdly_shift=11 \ sc_cv_sys_csize_shift=4 -$(eval $(call AUTOTARGETS,package,socat)) +# We need to run autoconf to regenerate the configure script, in order +# to ensure that the test checking linux/ext2_fs.h works +# properly. However, the package only uses autoconf and not automake, +# so we can't use the normal autoreconf logic. + +SOCAT_DEPENDENCIES = host-autoconf + +define SOCAT_RUN_AUTOCONF + (cd $(@D); $(HOST_DIR)/usr/bin/autoconf) +endef + +SOCAT_PRE_CONFIGURE_HOOKS += SOCAT_RUN_AUTOCONF + +$(eval $(autotools-package)) diff --git a/package/socketcand/Config.in b/package/socketcand/Config.in new file mode 100644 index 0000000000..7d663251cd --- /dev/null +++ b/package/socketcand/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_SOCKETCAND + bool "socketcand" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + help + Socketcand is a daemon that provides access to CAN interfaces + on a machine via a network interface. + + https://github.com/dschanoeh/socketcand + +comment "socketcand needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/socketcand/socketcand-replace-cp-by-install.patch b/package/socketcand/socketcand-replace-cp-by-install.patch new file mode 100644 index 0000000000..4462ddfc46 --- /dev/null +++ b/package/socketcand/socketcand-replace-cp-by-install.patch @@ -0,0 +1,25 @@ +From 9d2797ce08034aba0087e6fe45873c3ccd8db489 Mon Sep 17 00:00:00 2001 +From: Maxime Ripard +Date: Tue, 3 Apr 2012 10:35:09 +0200 +Subject: [PATCH] Remove cp -n which might not exist on old system and rely on install instead + +Signed-off-by: Maxime Ripard +--- + Makefile.in | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 40d8193..290a8dd 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -38,6 +38,6 @@ install: socketcand + mkdir -p $(DESTDIR)$(sysroot)$(mandir) + cp $(srcdir)/socketcand.1 $(DESTDIR)$(sysroot)$(mandir)/ + mkdir -p $(DESTDIR)$(sysroot)/etc/ +- cp -n $(srcdir)/etc/socketcand.conf $(DESTDIR)$(sysroot)/etc/ ++ install -m 0644 $(srcdir)/etc/socketcand.conf $(DESTDIR)$(sysroot)/etc/ + if [ $(init_script) = yes ]; then mkdir -p $(DESTDIR)$(sysroot)/etc/init.d; install --mode=755 $(srcdir)/init.d/socketcand $(DESTDIR)$(sysroot)/etc/init.d/socketcand; fi + if [ $(rc_script) = yes ]; then install --mode=755 $(srcdir)/rc.d/socketcand $(DESTDIR)$(sysroot)/etc/rc.d/socketcand; fi +-- +1.7.4.1 + diff --git a/package/socketcand/socketcand.mk b/package/socketcand/socketcand.mk new file mode 100644 index 0000000000..1a19c92ef9 --- /dev/null +++ b/package/socketcand/socketcand.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# socketcand +# +################################################################################ + +SOCKETCAND_VERSION = dc3437abf17359fa8cb16567415b47e7ef8568d0 +SOCKETCAND_SITE = http://github.com/dschanoeh/socketcand/tarball/$(SOCKETCAND_VERSION) +SOCKETCAND_AUTORECONF = YES + +ifeq ($(BR2_PACKAGE_LIBCONFIG),y) +SOCKETCAND_DEPENDENCIES = libconfig +else +SOCKETCAND_CONF_OPT = --without-config +endif + +$(eval $(autotools-package)) diff --git a/package/sound-theme-borealis/Config.in b/package/sound-theme-borealis/Config.in new file mode 100644 index 0000000000..fcc109fe94 --- /dev/null +++ b/package/sound-theme-borealis/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_SOUND_THEME_BOREALIS + bool "sound-theme-borealis" + help + Borealis sound theme. + + http://kde-look.org/content/show.php?content=12584 diff --git a/package/sound-theme-borealis/sound-theme-borealis.mk b/package/sound-theme-borealis/sound-theme-borealis.mk new file mode 100644 index 0000000000..7cde12dd5c --- /dev/null +++ b/package/sound-theme-borealis/sound-theme-borealis.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# sound-theme-borealis +# +################################################################################ + +SOUND_THEME_BOREALIS_VERSION = 0.9a +SOUND_THEME_BOREALIS_SITE = http://ico.bukvic.net/Linux/Borealis_soundtheme +SOUND_THEME_BOREALIS_SOURCE = \ + Borealis_sound_theme_ogg-$(SOUND_THEME_BOREALIS_VERSION).tar.bz2 + +define SOUND_THEME_BOREALIS_INSTALL_TARGET_CMDS + for f in $(@D)/*.ogg ; do \ + $(INSTALL) -D -m 0644 $$f $(TARGET_DIR)/usr/share/sounds/borealis/stereo/`basename $$f` ; \ + done +endef + +define SOUND_THEME_BOREALIS_UNINSTALL_TARGET_CMDS + $(RM) -r $(TARGET_DIR)/usr/share/sounds/borealis +endef + +$(eval $(generic-package)) diff --git a/package/sound-theme-freedesktop/Config.in b/package/sound-theme-freedesktop/Config.in new file mode 100644 index 0000000000..8b48015f59 --- /dev/null +++ b/package/sound-theme-freedesktop/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_SOUND_THEME_FREEDESKTOP + bool "sound-theme-freedesktop" + help + Default theme for the XDG Sound Theme Specification. + + http://freedesktop.org/wiki/Specifications/sound-theme-spec diff --git a/package/sound-theme-freedesktop/sound-theme-freedesktop.mk b/package/sound-theme-freedesktop/sound-theme-freedesktop.mk new file mode 100644 index 0000000000..ea4c8536c7 --- /dev/null +++ b/package/sound-theme-freedesktop/sound-theme-freedesktop.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# sound-theme-freedesktop +# +################################################################################ + +SOUND_THEME_FREEDESKTOP_VERSION = 0.7 +SOUND_THEME_FREEDESKTOP_SITE = \ + http://people.freedesktop.org/~mccann/dist +SOUND_THEME_FREEDESKTOP_SOURCE = \ + sound-theme-freedesktop-$(SOUND_THEME_FREEDESKTOP_VERSION).tar.bz2 +SOUND_THEME_FREEDESKTOP_DEPENDENCIES = host-intltool + +$(eval $(autotools-package)) diff --git a/package/spawn-fcgi/Config.in b/package/spawn-fcgi/Config.in index 34cbbb1739..59791e8d8e 100644 --- a/package/spawn-fcgi/Config.in +++ b/package/spawn-fcgi/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_SPAWN_FCGI bool "spawn-fcgi" + depends on BR2_USE_MMU # fork() help FastCGI process spawner. Project split from lighttpd. diff --git a/package/spawn-fcgi/spawn-fcgi.mk b/package/spawn-fcgi/spawn-fcgi.mk index 5070f73fce..670daf7625 100644 --- a/package/spawn-fcgi/spawn-fcgi.mk +++ b/package/spawn-fcgi/spawn-fcgi.mk @@ -1,15 +1,17 @@ -############################################################# +################################################################################ # # spawn-fcgi # -############################################################# +################################################################################ SPAWN_FCGI_VERSION = 1.6.3 SPAWN_FCGI_SITE = http://www.lighttpd.net/download SPAWN_FCGI_SOURCE = spawn-fcgi-$(SPAWN_FCGI_VERSION).tar.bz2 +SPAWN_FCGI_LICENSE = BSD-3c +SPAWN_FCGI_LICENSE_FILES = COPYING ifneq ($(BR2_INET_IPV6),y) SPAWN_FCGI_CONF_OPT = --disable-ipv6 endif -$(eval $(call AUTOTARGETS,package,spawn-fcgi)) +$(eval $(autotools-package)) diff --git a/package/speex/Config.in b/package/speex/Config.in new file mode 100644 index 0000000000..a4f0a9e127 --- /dev/null +++ b/package/speex/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_SPEEX + bool "speex" + select BR2_PACKAGE_LIBOGG + help + Speex is an Open Source/Free Software patent-free + audio compression format designed for speech. + It can be used for Voice over IP + + http://www.speex.org/ + +config BR2_PACKAGE_SPEEX_ARM4 + bool + default y + depends on BR2_PACKAGE_SPEEX && (BR2_arm7tdmi || BR2_arm720t || BR2_arm920t || BR2_arm922t || BR2_strongarm || BR2_fa526) + +config BR2_PACKAGE_SPEEX_ARM5E + default y + bool + depends on BR2_PACKAGE_SPEEX && BR2_arm && !BR2_PACKAGE_SPEEX_ARM4 + diff --git a/package/speex/speex-thumb2-support.patch b/package/speex/speex-thumb2-support.patch new file mode 100644 index 0000000000..b6f7369299 --- /dev/null +++ b/package/speex/speex-thumb2-support.patch @@ -0,0 +1,220 @@ +Make speex Thumb2 compatible + +Patch written by Michael Hope from Linaro, available at +http://lists.xiph.org/pipermail/speex-dev/2010-November/008041.html. + +Signed-off-by: Thomas Petazzoni + +diff --git a/libspeex/filters_arm4.h b/libspeex/filters_arm4.h +index 7a74042..6ec1f75 100644 +--- a/libspeex/filters_arm4.h ++++ b/libspeex/filters_arm4.h +@@ -47,8 +47,10 @@ int normalize16(const spx_sig_t *x, spx_word16_t *y, spx_sig_t max_scale, int le + + "\tldr %4, [%0], #4 \n" + "\tcmps %4, %1 \n" ++ "\tit gt \n" + "\tmovgt %1, %4 \n" + "\tcmps %4, %3 \n" ++ "\tit lt \n" + "\tmovlt %3, %4 \n" + + "\tsubs %2, %2, #1 \n" +@@ -56,6 +58,7 @@ int normalize16(const spx_sig_t *x, spx_word16_t *y, spx_sig_t max_scale, int le + + "\trsb %3, %3, #0 \n" + "\tcmp %1, %3 \n" ++ "\tit lt \n" + "\tmovlt %1, %3 \n" + : "=r" (dead1), "=r" (max_val), "=r" (dead3), "=r" (dead4), + "=r" (dead5), "=r" (dead6) +diff --git a/libspeex/fixed_arm4.h b/libspeex/fixed_arm4.h +index b6981ca..b6218ca 100644 +--- a/libspeex/fixed_arm4.h ++++ b/libspeex/fixed_arm4.h +@@ -69,72 +69,90 @@ static inline short DIV32_16(int a, int b) + __asm__ __volatile__ ( + "\teor %5, %0, %1\n" + "\tmovs %4, %0\n" ++ "\tit mi \n" + "\trsbmi %0, %0, #0 \n" + "\tmovs %4, %1\n" ++ "\tit mi \n" + "\trsbmi %1, %1, #0 \n" + "\tmov %4, #1\n" + + "\tsubs %3, %0, %1, asl #14 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #14 \n" + + "\tsubs %3, %0, %1, asl #13 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #13 \n" + + "\tsubs %3, %0, %1, asl #12 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #12 \n" + + "\tsubs %3, %0, %1, asl #11 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #11 \n" + + "\tsubs %3, %0, %1, asl #10 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #10 \n" + + "\tsubs %3, %0, %1, asl #9 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #9 \n" + + "\tsubs %3, %0, %1, asl #8 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #8 \n" + + "\tsubs %3, %0, %1, asl #7 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #7 \n" + + "\tsubs %3, %0, %1, asl #6 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #6 \n" + + "\tsubs %3, %0, %1, asl #5 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #5 \n" + + "\tsubs %3, %0, %1, asl #4 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #4 \n" + + "\tsubs %3, %0, %1, asl #3 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #3 \n" + + "\tsubs %3, %0, %1, asl #2 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #2 \n" + + "\tsubs %3, %0, %1, asl #1 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #1 \n" + + "\tsubs %3, %0, %1 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4 \n" + + "\tmovs %5, %5, lsr #31 \n" ++ "\tit ne \n" + "\trsbne %2, %2, #0 \n" + : "=r" (dead1), "=r" (dead2), "=r" (res), + "=r" (dead3), "=r" (dead4), "=r" (dead5) +diff --git a/libspeex/fixed_arm5e.h b/libspeex/fixed_arm5e.h +index 9b4861c..bdadd02 100644 +--- a/libspeex/fixed_arm5e.h ++++ b/libspeex/fixed_arm5e.h +@@ -97,72 +97,90 @@ static inline short DIV32_16(int a, int b) + __asm__ __volatile__ ( + "\teor %5, %0, %1\n" + "\tmovs %4, %0\n" ++ "\tit mi \n" + "\trsbmi %0, %0, #0 \n" + "\tmovs %4, %1\n" ++ "\tit mi \n" + "\trsbmi %1, %1, #0 \n" + "\tmov %4, #1\n" + + "\tsubs %3, %0, %1, asl #14 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #14 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #13 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #13 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #12 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #12 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #11 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #11 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #10 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #10 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #9 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #9 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #8 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #8 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #7 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #7 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #6 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #6 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #5 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #5 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #4 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #4 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #3 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #3 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #2 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #2 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #1 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #1 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4 \n" + "\tmovpl %0, %3 \n" + + "\tmovs %5, %5, lsr #31 \n" ++ "\tit ne \n" + "\trsbne %2, %2, #0 \n" + : "=r" (dead1), "=r" (dead2), "=r" (res), + "=r" (dead3), "=r" (dead4), "=r" (dead5) diff --git a/package/speex/speex.mk b/package/speex/speex.mk new file mode 100644 index 0000000000..6eb7e90dbb --- /dev/null +++ b/package/speex/speex.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# speex +# +################################################################################ + +SPEEX_VERSION = 1.2rc1 +SPEEX_SITE = http://downloads.us.xiph.org/releases/speex +SPEEX_LICENSE = BSD-3c +SPEEX_LICENSE_FILES = COPYING + +SPEEX_INSTALL_STAGING = YES +SPEEX_DEPENDENCIES = libogg +SPEEX_CONF_OPT = --with-ogg-libraries=$(STAGING_DIR)/usr/lib \ + --with-ogg-includes=$(STAGING_DIR)/usr/include \ + --enable-fixed-point + +ifeq ($(BR2_PACKAGE_SPEEX_ARM4),y) + SPEEX_CONF_OPT += --enable-arm4-asm +endif + +ifeq ($(BR2_PACKAGE_SPEEX_ARM5E),y) + SPEEX_CONF_OPT += --enable-arm5e-asm +endif + +define SPEEX_LIBTOOL_FIXUP + $(SED) 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' $(@D)/libtool + $(SED) 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' $(@D)/libtool +endef + +SPEEX_POST_CONFIGURE_HOOKS += SPEEX_LIBTOOL_FIXUP + +define SPEEX_BUILD_CMDS + $($(PKG)_MAKE_ENV) $(MAKE) $($(PKG)_MAKE_OPT) -C $(@D)/$($(PKG)_SUBDIR) +endef + +$(eval $(autotools-package)) diff --git a/package/spice-protocol/Config.in b/package/spice-protocol/Config.in new file mode 100644 index 0000000000..63b08aa090 --- /dev/null +++ b/package/spice-protocol/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_SPICE_PROTOCOL + bool "spice protocol" + help + The Spice project aims to provide a complete open source + solution for interaction with virtualized desktop devices. + The Spice project deals with both the virtualized devices + and the front-end. Interaction between front-end and + back-end is done using VD-Interfaces. + + This package implements the protocol-part of Spice. + + http://www.spice-space.org/ diff --git a/package/spice-protocol/spice-protocol.mk b/package/spice-protocol/spice-protocol.mk new file mode 100644 index 0000000000..62a028de8d --- /dev/null +++ b/package/spice-protocol/spice-protocol.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# spice-protocol +# +################################################################################ + +SPICE_PROTOCOL_VERSION = 0.12.2 +SPICE_PROTOCOL_SOURCE = spice-protocol-$(SPICE_PROTOCOL_VERSION).tar.bz2 +SPICE_PROTOCOL_SITE = http://www.spice-space.org/download/releases/ +SPICE_PROTOCOL_LICENSE = BSD-3c +SPICE_PROTOCOL_LICENSE_FILES = COPYING +SPICE_PROTOCOL_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/spice/Config.in b/package/spice/Config.in new file mode 100644 index 0000000000..efcc5d7b80 --- /dev/null +++ b/package/spice/Config.in @@ -0,0 +1,59 @@ +comment "spice server depends on python (for pyparsing)" + depends on BR2_i386 || BR2_x86_64 + depends on !BR2_PACKAGE_PYTHON + +config BR2_PACKAGE_SPICE + bool "spice server" + depends on BR2_i386 || BR2_x86_64 + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_ALSA_LIB + select BR2_PACKAGE_CELT051 + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_PIXMAN + select BR2_PACKAGE_PYTHON_PYPARSING + select BR2_PACKAGE_SPICE_PROTOCOL + help + The Spice project aims to provide a complete open source + solution for interaction with virtualized desktop devices. + The Spice project deals with both the virtualized devices + and the front-end. Interaction between front-end and + back-end is done using VD-Interfaces. + + This package implements the server-part of Spice. + + http://www.spice-space.org/ + +if BR2_PACKAGE_SPICE + +comment "client depends on X.org" + depends on !BR2_PACKAGE_XORG7 + +config BR2_PACKAGE_SPICE_CLIENT + bool "Enable client" + depends on BR2_PACKAGE_XORG7 + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_XLIB_LIBXFIXES + select BR2_PACKAGE_XLIB_LIBXRANDR + +comment "client needs a toolchain w/ threads, C++" + depends on BR2_PACKAGE_XORG7 + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_SPICE_GUI + bool "Enable GUI" + depends on BR2_PACKAGE_SPICE_CLIENT + select BR2_PACKAGE_CEGUI06 + help + Say 'y' here to enable the Graphical User Interface (GUI) + start dialog. + +config BR2_PACKAGE_SPICE_TUNNEL + bool "Enable network redirection" + select BR2_PACKAGE_SLIRP + help + Say 'y' here to enable network redirection, aka tunnelling + through a SLIP/SLIRP session. + +endif # BR2_PACKAGE_SPICE diff --git a/package/spice/spice.mk b/package/spice/spice.mk new file mode 100644 index 0000000000..a016da6dd9 --- /dev/null +++ b/package/spice/spice.mk @@ -0,0 +1,80 @@ +################################################################################ +# +# spice +# +################################################################################ + +SPICE_VERSION = 0.12.0 +SPICE_SOURCE = spice-$(SPICE_VERSION).tar.bz2 +SPICE_SITE = http://www.spice-space.org/download/releases/ +SPICE_LICENSE = LGPLv2.1+ +SPICE_LICENSE_FILES = COPYING +SPICE_INSTALL_STAGING = YES +SPICE_DEPENDENCIES = \ + alsa-lib \ + celt051 \ + jpeg \ + openssl \ + pixman \ + python-pyparsing \ + spice-protocol \ + +# We disable everything for now, because the dependency tree can become +# quite deep if we try to enable some features, and I have not tested that. +SPICE_CONF_OPT = \ + --disable-opengl \ + --disable-smartcard \ + --disable-automated-tests \ + --without-sasl \ + +SPICE_DEPENDENCIES += host-pkgconf + +ifeq ($(BR2_PACKAGE_SPICE_CLIENT),y) +SPICE_CONF_OPT += --enable-client +SPICE_DEPENDENCIES += xlib_libXfixes xlib_libXrandr +else +SPICE_CONF_OPT += --disable-client +endif + +ifeq ($(BR2_PACKAGE_SPICE_GUI),y) +SPICE_CONF_OPT += --enable-gui +SPICE_DEPENDENCIES += cegui06 +else +SPICE_CONF_OPT += --disable-gui +endif + +ifeq ($(BR2_PACKAGE_SPICE_TUNNEL),y) +SPICE_CONF_OPT += --enable-tunnel +SPICE_DEPENDENCIES += slirp +else +SPICE_CONF_OPT += --disable-tunnel +endif + +SPICE_CONF_ENV = PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages +SPICE_MAKE_ENV = PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages + +# We need to tweak spice.pc because it /forgets/ (for static linking) that +# it should link against libz and libjpeg. libz is pkg-config-aware, while +# libjpeg isn't, hence the two-line tweak +define SPICE_POST_INSTALL_STAGING_FIX_PC + $(SED) 's/^\(Requires.private:.*\)$$/\1 zlib/; s/^\(Libs.private:.*\)$$/\1 -ljpeg/;' \ + "$(STAGING_DIR)/usr/lib/pkgconfig/spice-server.pc" +endef +SPICE_POST_INSTALL_STAGING_HOOKS += SPICE_POST_INSTALL_STAGING_FIX_PC + +# It is currently not possible to detect if stack-protection is available +# or not, because it requires support from both the compiler *and* the +# C library, but the C library (eg. uClibc) can be compiled without that +# support, even if gcc accepts the -fstack-protector-all option. +# spice's ./configure only checks for gcc's -fstack-protector-all option, +# so it misses the case where the C library doe not provide the requires +# support. +# A correct fix would be to fix spice's ./configure to also check the C +# library, but it might be much more involved. +# So, we simply disable it for now. After all, as uClibc's help puts it: +# Note that NOEXECSTACK on a kernel with address space randomization +# is generally sufficient to prevent most buffer overflow exploits +# without increasing code size. +SPICE_CONF_OPT += gl_cv_warn__fstack_protector_all=no + +$(eval $(autotools-package)) diff --git a/package/sqlcipher/Config.in b/package/sqlcipher/Config.in new file mode 100644 index 0000000000..484340fe1c --- /dev/null +++ b/package/sqlcipher/Config.in @@ -0,0 +1,36 @@ +config BR2_PACKAGE_SQLCIPHER + bool "sqlcipher" + depends on !BR2_PACKAGE_SQLITE + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_OPENSSL + help + SQLCipher is an SQLite extension that provides 256 bits AES + encryption of database files. Note that it is a fork of SQLite + and they cannot be installed side-by-side. + + http://sqlcipher.net + +if BR2_PACKAGE_SQLCIPHER + +config BR2_PACKAGE_SQLCIPHER_READLINE + bool "Command-line editing" + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_READLINE + help + Enable command-line editing. This requires ncurses and readline. + +config BR2_PACKAGE_SQLCIPHER_STAT3 + bool "Additional query optimizations (stat3)" + help + Adds additional logic to the ANALYZE command and to the query + planner that can help SQLite to choose a better query plan under + certain situations. + +endif + +comment "sqlcipher conflicts with sqlite" + depends on BR2_PACKAGE_SQLITE + +comment "sqlcipher needs a toolchain w/ threads" + depends on !BR2_PACKAGE_SQLITE + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/sqlcipher/sqlcipher.mk b/package/sqlcipher/sqlcipher.mk new file mode 100644 index 0000000000..e93d24d127 --- /dev/null +++ b/package/sqlcipher/sqlcipher.mk @@ -0,0 +1,56 @@ +################################################################################ +# +# sqlcipher +# +################################################################################ + +SQLCIPHER_VERSION = v1.1.9 +SQLCIPHER_SITE = http://github.com/sqlcipher/sqlcipher/archive/$(SQLCIPHER_VERSION) +SQLCIPHER_DEPENDENCIES = openssl host-tcl +SQLCIPHER_INSTALL_STAGING = YES + +SQLCIPHER_CONF_ENV = \ + CFLAGS+=" $(SQLCIPHER_CFLAGS)" \ + LDFLAGS+=" $(SQLCIPHER_LDFLAGS)" \ + TCLSH_CMD=$(HOST_DIR)/usr/bin/tclsh$(TCL_VERSION_MAJOR) + +SQLCIPHER_CONF_OPT = \ + --enable-threadsafe \ + --localstatedir=/var + +SQLCIPHER_CFLAGS += -DSQLITE_HAS_CODEC # Required according to the README +SQLCIPHER_LDFLAGS += -lcrypto + +ifneq ($(BR2_LARGEFILE),y) +# the sqlite configure script fails to define SQLITE_DISABLE_LFS when +# --disable-largefile is passed, breaking the build. Work around it by +# simply adding it to CFLAGS for configure instead +SQLCIPHER_CFLAGS += -DSQLITE_DISABLE_LFS +endif + +ifeq ($(BR2_PACKAGE_SQLCIPHER_STAT3),y) +SQLCIPHER_CFLAGS += -DSQLITE_ENABLE_STAT3 +endif + +ifeq ($(BR2_PACKAGE_SQLCIPHER_READLINE),y) +SQLCIPHER_DEPENDENCIES += ncurses readline +SQLCIPHER_CONF_OPT += --with-readline-inc="-I$(STAGING_DIR)/usr/include" +else +SQLCIPHER_CONF_OPT += --disable-readline +endif + +define SQLCIPHER_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/bin/sqlite3 + rm -f $(TARGET_DIR)/usr/lib/libsqlite3* + rm -f $(TARGET_DIR)/usr/lib/pkgconfig/sqlite3.pc + rm -f $(TARGET_DIR)/usr/include/sqlite3*.h +endef + +define SQLCIPHER_UNINSTALL_STAGING_CMDS + rm -f $(STAGING_DIR)/usr/bin/sqlite3 + rm -f $(STAGING_DIR)/usr/lib/libsqlite3* + rm -f $(STAGING_DIR)/usr/lib/pkgconfig/sqlite3.pc + rm -f $(STAGING_DIR)/usr/include/sqlite3*.h +endef + +$(eval $(autotools-package)) diff --git a/package/sqlite/Config.in b/package/sqlite/Config.in index f9b12ae9f2..8766786010 100644 --- a/package/sqlite/Config.in +++ b/package/sqlite/Config.in @@ -14,3 +14,45 @@ config BR2_PACKAGE_SQLITE_READLINE help Enable command-line editing. This requires ncurses and readline. +config BR2_PACKAGE_SQLITE_STAT3 + bool "Additional query optimizations (stat3)" + depends on BR2_PACKAGE_SQLITE + help + Adds additional logic to the ANALYZE command and to the query + planner that can help SQLite to choose a better query plan under + certain situations. + +config BR2_PACKAGE_SQLITE_ENABLE_FTS3 + bool "Enable version 3 of the full-text search engine" + depends on BR2_PACKAGE_SQLITE + help + When this option is defined in the amalgamation + (see http://www.sqlite.org/amalgamation.html), version 3 of + the full-text search engine is added to the build automatically. + +config BR2_PACKAGE_SQLITE_ENABLE_UNLOCK_NOTIFY + bool "Enable sqlite3_unlock_notify() interface" + depends on BR2_PACKAGE_SQLITE + help + This option enables the sqlite3_unlock_notify() interface and its + accosiated functionality. See the documentation + http://www.sqlite.org/unlock_notify.html for additional information. + +config BR2_PACKAGE_SQLITE_SECURE_DELETE + bool "Set the secure_delete pragma on by default" + depends on BR2_PACKAGE_SQLITE + help + This compile-time option changes the default settings of the + secure_delete pragma. When this option is not used, secure_delete + defaults to off. When this option is present, secure_delete defaults + to on. + + The secure_delete setting causes deleted content to be overwritten + with zeros. There is a small performance penalty for this since + additional I/O must occur. On the other hand, secure_delete can + prevent sensitive information from lingering in unused parts + of the database file after it has allegedly been deleted. + See the documentation on the + http://www.sqlite.org/pragma.html#pragma_secure_delete + for additional information. + diff --git a/package/sqlite/sqlite.mk b/package/sqlite/sqlite.mk index 30e75a24fe..c20e7828e6 100644 --- a/package/sqlite/sqlite.mk +++ b/package/sqlite/sqlite.mk @@ -1,28 +1,56 @@ -############################################################# +################################################################################ # # sqlite # -############################################################# +################################################################################ -SQLITE_VERSION = 3070500 +SQLITE_VERSION = 3080002 SQLITE_SOURCE = sqlite-autoconf-$(SQLITE_VERSION).tar.gz -SQLITE_SITE = http://www.sqlite.org +SQLITE_SITE = http://www.sqlite.org/2013 +SQLITE_LICENSE = Public domain SQLITE_INSTALL_STAGING = YES ifneq ($(BR2_LARGEFILE),y) # the sqlite configure script fails to define SQLITE_DISABLE_LFS when # --disable-largefile is passed, breaking the build. Work around it by # simply adding it to CFLAGS for configure instead -SQLITE_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -DSQLITE_DISABLE_LFS" +SQLITE_CFLAGS += -DSQLITE_DISABLE_LFS endif -SQLITE_CONF_OPT = --enable-shared \ - --enable-static \ - --enable-tempstore=yes \ - --enable-threadsafe \ - --enable-releasemode \ - --disable-tcl \ - --localstatedir=/var +ifeq ($(BR2_PACKAGE_SQLITE_STAT3),y) +SQLITE_CFLAGS += -DSQLITE_ENABLE_STAT3 +endif + +ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_FTS3),y) +SQLITE_CFLAGS += -DSQLITE_ENABLE_FTS3 +endif + +ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_UNLOCK_NOTIFY),y) +SQLITE_CFLAGS += -DSQLITE_ENABLE_UNLOCK_NOTIFY +endif + +ifeq ($(BR2_PACKAGE_SQLITE_SECURE_DELETE),y) +SQLITE_CFLAGS += -DSQLITE_SECURE_DELETE +endif + +ifeq ($(BR2_xtensa),y) +SQLITE_CFLAGS += -mtext-section-literals +endif + +SQLITE_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) $(SQLITE_CFLAGS)" + +SQLITE_CONF_OPT = \ + --localstatedir=/var + +ifeq ($(BR2_PREFER_STATIC_LIB),y) +SQLITE_CONF_OPT += --enable-dynamic-extensions=no +endif + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +SQLITE_CONF_OPT += --enable-threadsafe +else +SQLITE_CONF_OPT += --disable-threadsafe +endif ifeq ($(BR2_PACKAGE_SQLITE_READLINE),y) SQLITE_DEPENDENCIES += ncurses readline @@ -43,4 +71,4 @@ define SQLITE_UNINSTALL_STAGING_CMDS rm -f $(STAGING_DIR)/usr/include/sqlite3*.h endef -$(eval $(call AUTOTARGETS,package,sqlite)) +$(eval $(autotools-package)) diff --git a/package/squashfs/Config.in b/package/squashfs/Config.in index 6730708620..b0918567c0 100644 --- a/package/squashfs/Config.in +++ b/package/squashfs/Config.in @@ -1,6 +1,7 @@ config BR2_PACKAGE_SQUASHFS bool "squashfs" depends on BR2_LARGEFILE + depends on BR2_TOOLCHAIN_HAS_THREADS select BR2_PACKAGE_SQUASHFS_GZIP if !(BR2_PACKAGE_SQUASHFS_LZMA || BR2_PACKAGE_SQUASHFS_LZO) help Tools to generate SquashFS filesystems. @@ -10,25 +11,31 @@ config BR2_PACKAGE_SQUASHFS if BR2_PACKAGE_SQUASHFS config BR2_PACKAGE_SQUASHFS_GZIP - bool "gzip support" - default y - select BR2_PACKAGE_ZLIB - help - Support GZIP compression algorithm + bool "gzip support" + default y + select BR2_PACKAGE_ZLIB + help + Support GZIP compression algorithm config BR2_PACKAGE_SQUASHFS_LZMA - bool "lzma support" - select BR2_PACKAGE_XZ - help - Support LZMA compression algorithm + bool "lzma support" + select BR2_PACKAGE_XZ + help + Support LZMA compression algorithm config BR2_PACKAGE_SQUASHFS_LZO - bool "lzo support" - select BR2_PACKAGE_LZO - help - Support LZO compression algorithm + bool "lzo support" + select BR2_PACKAGE_LZO + help + Support LZO compression algorithm + +config BR2_PACKAGE_SQUASHFS_XZ + bool "xz support" + select BR2_PACKAGE_XZ + help + Support XZ compression algorithm endif -comment "squashfs requires a toolchain with LARGEFILE support" - depends on !BR2_LARGEFILE +comment "squashfs needs a toolchain w/ largefile, threads" + depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/squashfs/squashfs-4.1-build-system-fix.patch b/package/squashfs/squashfs-4.1-build-system-fix.patch deleted file mode 100644 index 709f1de1e7..0000000000 --- a/package/squashfs/squashfs-4.1-build-system-fix.patch +++ /dev/null @@ -1,102 +0,0 @@ -[PATCH]: allow custom EXTRA_CFLAGS/LDFLAGS/*_SUPPORT on the make cmd line - -Signed-off-by: Peter Korsgaard ---- - squashfs-tools/Makefile | 26 +++++++++++++------------- - 1 file changed, 13 insertions(+), 13 deletions(-) - -Index: squashfs4.1/squashfs-tools/Makefile -=================================================================== ---- squashfs4.1.orig/squashfs-tools/Makefile -+++ squashfs4.1/squashfs-tools/Makefile -@@ -87,11 +87,11 @@ MKSQUASHFS_OBJS = mksquashfs.o read_fs.o - UNSQUASHFS_OBJS = unsquashfs.o unsquash-1.o unsquash-2.o unsquash-3.o \ - unsquash-4.o swap.o compressor.o - --CFLAGS = $(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ -- -D_GNU_SOURCE -DCOMP_DEFAULT=\"$(COMP_DEFAULT)\" -O2 -Wall -+CFLAGS = $(EXTRA_CFLAGS) $(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ -+ -D_GNU_SOURCE -DCOMP_DEFAULT=\"$(COMP_DEFAULT)\" -Wall - - LIBS = --ifdef GZIP_SUPPORT -+ifeq ($(GZIP_SUPPORT),1) - CFLAGS += -DGZIP_SUPPORT - MKSQUASHFS_OBJS += gzip_wrapper.o - UNSQUASHFS_OBJS += gzip_wrapper.o -@@ -99,7 +99,7 @@ LIBS += -lz - COMPRESSORS += gzip - endif - --ifdef LZMA_SUPPORT -+ifeq ($(LZMA_SUPPORT),1) - LZMA_OBJS = $(LZMA_DIR)/C/Alloc.o $(LZMA_DIR)/C/LzFind.o \ - $(LZMA_DIR)/C/LzmaDec.o $(LZMA_DIR)/C/LzmaEnc.o $(LZMA_DIR)/C/LzmaLib.o - INCLUDEDIR += -I$(LZMA_DIR)/C -@@ -109,7 +109,7 @@ UNSQUASHFS_OBJS += lzma_wrapper.o $(LZMA - COMPRESSORS += lzma - endif - --ifdef XZ_SUPPORT -+ifeq ($(XZ_SUPPORT),1) - CFLAGS += -DLZMA_SUPPORT - MKSQUASHFS_OBJS += xz_wrapper.o - UNSQUASHFS_OBJS += xz_wrapper.o -@@ -117,7 +117,7 @@ LIBS += -llzma - COMPRESSORS += lzma - endif - --ifdef LZO_SUPPORT -+ifeq ($(LZO_SUPPORT),1) - CFLAGS += -DLZO_SUPPORT - ifdef LZO_DIR - INCLUDEDIR += -I$(LZO_DIR)/include -@@ -129,8 +129,8 @@ LIBS += $(LZO_LIBDIR) -llzo2 - COMPRESSORS += lzo - endif - --ifdef XATTR_SUPPORT --ifdef XATTR_DEFAULT -+ifeq ($(XATTR_SUPPORT),1) -+ifeq ($(XATTR_DEFAULT),1) - CFLAGS += -DXATTR_SUPPORT -DXATTR_DEFAULT - else - CFLAGS += -DXATTR_SUPPORT -@@ -142,7 +142,7 @@ endif - # - # If LZMA_SUPPORT is specified then LZO_DIR must be specified too - # --ifdef LZMA_SUPPORT -+ifeq ($(LZMA_SUPPORT),1) - ifndef LZMA_DIR - $(error "LZMA_SUPPORT requires LZMA_DIR to be also defined") - endif -@@ -151,8 +151,8 @@ endif - # - # Both XZ_SUPPORT and LZMA_SUPPORT cannot be specified - # --ifdef XZ_SUPPORT --ifdef LZMA_SUPPORT -+ifeq ($(XZ_SUPPORT),1) -+ifeq ($(LZMA_SUPPORT),1) - $(error "Both XZ_SUPPORT and LZMA_SUPPORT cannot be specified") - endif - endif -@@ -175,7 +175,7 @@ endif - all: mksquashfs unsquashfs - - mksquashfs: $(MKSQUASHFS_OBJS) -- $(CC) $(MKSQUASHFS_OBJS) -lpthread -lm $(LIBS) -o $@ -+ $(CC) $(EXTRA_LDFLAGS) $(MKSQUASHFS_OBJS) -lpthread -lm $(LIBS) -o $@ - - mksquashfs.o: mksquashfs.c squashfs_fs.h mksquashfs.h global.h sort.h \ - squashfs_swap.h xattr.h -@@ -195,7 +195,7 @@ xattr.o: xattr.h - read_xattrs.o: xattr.h - - unsquashfs: $(UNSQUASHFS_OBJS) -- $(CC) $(UNSQUASHFS_OBJS) -lpthread -lm $(LIBS) -o $@ -+ $(CC) $(EXTRA_LDFLAGS) $(UNSQUASHFS_OBJS) -lpthread -lm $(LIBS) -o $@ - - unsquashfs.o: unsquashfs.h unsquashfs.c squashfs_fs.h squashfs_swap.h \ - squashfs_compat.h global.h xattr.h diff --git a/package/squashfs/squashfs-4.2-no-gzip-fix.patch b/package/squashfs/squashfs-4.2-no-gzip-fix.patch new file mode 100644 index 0000000000..4cb5f50cb5 --- /dev/null +++ b/package/squashfs/squashfs-4.2-no-gzip-fix.patch @@ -0,0 +1,26 @@ +[PATCH] squashfs-tools: unbreak builds without gzip support + +The initialization of gzip_comp_ops if gzip support is disabled is +missing 2 null pointers, causing the id element to be initialized to 0 +rather than ZLIB_COMPRESSION, which breaks all the compressor functions +as they loop until finding the correct element or id = 0. + +Signed-off-by: Peter Korsgaard +--- + squashfs-tools/compressor.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +Index: squashfs4.2/squashfs-tools/compressor.c +=================================================================== +--- squashfs4.2.orig/squashfs-tools/compressor.c ++++ squashfs4.2/squashfs-tools/compressor.c +@@ -27,7 +27,8 @@ + + #ifndef GZIP_SUPPORT + static struct compressor gzip_comp_ops = { +- NULL, NULL, NULL, NULL, NULL, NULL, ZLIB_COMPRESSION, "gzip", 0 ++ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ZLIB_COMPRESSION, ++ "gzip", 0 + }; + #else + extern struct compressor gzip_comp_ops; diff --git a/package/squashfs/squashfs.mk b/package/squashfs/squashfs.mk index 50e8964ca9..bff308c2fd 100644 --- a/package/squashfs/squashfs.mk +++ b/package/squashfs/squashfs.mk @@ -1,13 +1,26 @@ -SQUASHFS_VERSION=4.1 -SQUASHFS_SOURCE=squashfs$(SQUASHFS_VERSION).tar.gz -SQUASHFS_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/squashfs +################################################################################ +# +# squashfs +# +################################################################################ -# no libattr/xz in BR +SQUASHFS_VERSION = 4.2 +SQUASHFS_SOURCE = squashfs$(SQUASHFS_VERSION).tar.gz +SQUASHFS_SITE = http://downloads.sourceforge.net/project/squashfs/squashfs/squashfs$(SQUASHFS_VERSION) + +# no libattr in BR SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=0 ifeq ($(BR2_PACKAGE_SQUASHFS_LZMA),y) SQUASHFS_DEPENDENCIES += xz -SQUASHFS_MAKE_ARGS += XZ_SUPPORT=1 COMP_DEFAULT=lzma +SQUASHFS_MAKE_ARGS += LZMA_XZ_SUPPORT=1 COMP_DEFAULT=lzma +else +SQUASHFS_MAKE_ARGS += LZMA_XZ_SUPPORT=0 +endif + +ifeq ($(BR2_PACKAGE_SQUASHFS_XZ),y) +SQUASHFS_DEPENDENCIES += xz +SQUASHFS_MAKE_ARGS += XZ_SUPPORT=1 COMP_DEFAULT=xz else SQUASHFS_MAKE_ARGS += XZ_SUPPORT=0 endif @@ -34,7 +47,8 @@ HOST_SQUASHFS_MAKE_ARGS = \ XATTR_SUPPORT=0 \ XZ_SUPPORT=1 \ GZIP_SUPPORT=1 \ - LZO_SUPPORT=1 + LZO_SUPPORT=1 \ + LZMA_XZ_SUPPORT=1 define SQUASHFS_BUILD_CMDS $(TARGET_MAKE_ENV) $(MAKE) \ @@ -64,5 +78,5 @@ define HOST_SQUASHFS_INSTALL_CMDS -C $(@D)/squashfs-tools/ INSTALL_DIR=$(HOST_DIR)/usr/bin install endef -$(eval $(call GENTARGETS,package,squashfs)) -$(eval $(call GENTARGETS,package,squashfs,host)) +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/squashfs3/Config.in b/package/squashfs3/Config.in index 32912722ff..365eb6a5a0 100644 --- a/package/squashfs3/Config.in +++ b/package/squashfs3/Config.in @@ -7,5 +7,6 @@ config BR2_PACKAGE_SQUASHFS3 http://squashfs.sourceforge.net/ -comment "squashfs3 requires a toolchain with LARGEFILE support" - depends on BR2_DEPRECATED && !BR2_LARGEFILE +comment "squashfs3 needs a toolchain w/ largefile" + depends on BR2_DEPRECATED + depends on !BR2_LARGEFILE diff --git a/package/squashfs3/squashfs3-3.4-get_nprocs.patch b/package/squashfs3/squashfs3-3.4-get_nprocs.patch new file mode 100644 index 0000000000..db4b350026 --- /dev/null +++ b/package/squashfs3/squashfs3-3.4-get_nprocs.patch @@ -0,0 +1,33 @@ +squashfs3: fix build with uClibc + +The squashfs3 package uses the old get_nprocs() GNU extension which does not +exist in uClibc. This has already been fixed in newer squashfs releases +(>=4.0). + +Signed-off-by: Markos Chandras +Index: squashfs3-3.4/squashfs-tools/mksquashfs.c +=================================================================== +--- squashfs3-3.4.orig/squashfs-tools/mksquashfs.c ++++ squashfs3-3.4/squashfs-tools/mksquashfs.c +@@ -3178,7 +3178,7 @@ void initialise_threads() + processors = 1; + } + #else +- processors = get_nprocs(); ++ processors = sysconf(_SC_NPROCESSORS_CONF); + #endif + } + +Index: squashfs3-3.4/squashfs-tools/unsquashfs.c +=================================================================== +--- squashfs3-3.4.orig/squashfs-tools/unsquashfs.c ++++ squashfs3-3.4/squashfs-tools/unsquashfs.c +@@ -2428,7 +2428,7 @@ void initialise_threads(int fragment_buf + processors = 1; + } + #else +- processors = get_nprocs(); ++ processors = sysconf(_SC_NPROCESSORS_CONF); + #endif + } + diff --git a/package/squashfs3/squashfs3.mk b/package/squashfs3/squashfs3.mk index 69aab1489f..fbcc8a470d 100644 --- a/package/squashfs3/squashfs3.mk +++ b/package/squashfs3/squashfs3.mk @@ -1,9 +1,14 @@ -SQUASHFS3_VERSION=3.4 -SQUASHFS3_SOURCE=squashfs$(SQUASHFS3_VERSION).tar.gz -SQUASHFS3_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/squashfs +################################################################################ +# +# squashfs3 +# +################################################################################ + +SQUASHFS3_VERSION = 3.4 +SQUASHFS3_SOURCE = squashfs$(SQUASHFS3_VERSION).tar.gz +SQUASHFS3_SITE = http://downloads.sourceforge.net/project/squashfs/squashfs/$(SQUASHFS3_VERSION) SQUASHFS3_DEPENDENCIES = zlib -HOST_SQUASHFS3_DEPENDENCIES = host-zlib define SQUASHFS3_BUILD_CMDS $(TARGET_MAKE_ENV) $(MAKE) \ @@ -25,6 +30,5 @@ define HOST_SQUASHFS3_INSTALL_CMDS $(HOST_MAKE_ENV) $(MAKE) -C $(@D)/squashfs-tools/ INSTALL_DIR=$(HOST_DIR)/usr/bin install endef -$(eval $(call GENTARGETS,package,squashfs3)) -$(eval $(call GENTARGETS,package,squashfs3,host)) - +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/squid/Config.in b/package/squid/Config.in index 4ec7fa4131..33776ca5de 100644 --- a/package/squid/Config.in +++ b/package/squid/Config.in @@ -1,10 +1,13 @@ -comment "Squid requires a toolchain with C++ and IPv6 support enabled" +comment "squid needs a toolchain w/ C++, IPv6" + depends on BR2_USE_MMU depends on !BR2_INSTALL_LIBSTDCPP || !BR2_INET_IPV6 config BR2_PACKAGE_SQUID bool "squid" depends on BR2_INSTALL_LIBSTDCPP depends on BR2_INET_IPV6 + # needs fork() + depends on BR2_USE_MMU select BR2_PACKAGE_LIBCAP help Caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. diff --git a/package/squid/squid-01-assume-get-certificate-ok.patch b/package/squid/squid-01-assume-get-certificate-ok.patch new file mode 100644 index 0000000000..0f8d93ea22 --- /dev/null +++ b/package/squid/squid-01-assume-get-certificate-ok.patch @@ -0,0 +1,16 @@ +The openssl get_certificate working test isn't cross compile friendly. +Just assume it works ok since we're using a modern OpenSSL version. + +Signed-off-by: Gustavo Zacarias + +diff -Nura squid-3.3.8.orig/configure.ac squid-3.3.8/configure.ac +--- squid-3.3.8.orig/configure.ac 2013-07-26 08:57:50.177259534 -0300 ++++ squid-3.3.8/configure.ac 2013-07-26 08:57:55.997448040 -0300 +@@ -1265,7 +1265,6 @@ + AC_SUBST(SSLLIB) + + if test "x$with_openssl" = "xyes"; then +-SQUID_CHECK_OPENSSL_GETCERTIFICATE_WORKS + SQUID_CHECK_OPENSSL_CONST_SSL_METHOD + SQUID_CHECK_OPENSSL_TXTDB + fi diff --git a/package/squid/squid-02-atomic-cross.patch b/package/squid/squid-02-atomic-cross.patch new file mode 100644 index 0000000000..c1b59dc65e --- /dev/null +++ b/package/squid/squid-02-atomic-cross.patch @@ -0,0 +1,17 @@ +AC_RUN_IFELSE is bad for cross compiling, switch to AC_COMPILE_IFELSE +since it's enough for this test. + +Signed-off-by: Gustavo Zacarias + +diff -Nura squid-3.3.9.orig/configure.ac squid-3.3.9/configure.ac +--- squid-3.3.9.orig/configure.ac 2013-09-13 09:15:32.473365627 -0300 ++++ squid-3.3.9/configure.ac 2013-09-13 13:27:06.829711487 -0300 +@@ -392,7 +392,7 @@ + dnl Check for atomic operations support in the compiler + dnl + AC_MSG_CHECKING([for GNU atomic operations support]) +-AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + int n = 0; + ]],[[ + __sync_add_and_fetch(&n, 10); // n becomes 10 diff --git a/package/squid/squid-03-missing-include-time_h.patch b/package/squid/squid-03-missing-include-time_h.patch new file mode 100644 index 0000000000..18b3ab3b55 --- /dev/null +++ b/package/squid/squid-03-missing-include-time_h.patch @@ -0,0 +1,28 @@ +ipc/Kid.cc: add missing include of time.h + +Function time() comes from , so add the necessary include. +This fixes compilation on some configurations, for example +http://autobuild.buildroot.net/results/b33/b33e1f41e50b6e7ac3e30806b9a617d451bc27b4/ + +Signed-off-by: Thomas De Schampheleire +Upstream-status: submitted (http://bugs.squid-cache.org/show_bug.cgi?id=3967) + +--- + src/ipc/Kid.cc | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + + +diff --git a/src/ipc/Kid.cc b/src/ipc/Kid.cc +--- a/src/ipc/Kid.cc ++++ b/src/ipc/Kid.cc +@@ -11,6 +11,10 @@ + #include + #endif + ++#if HAVE_TIME_H ++#include ++#endif ++ + int TheProcessKind = pkOther; + + Kid::Kid(): diff --git a/package/squid/squid-cross-compile.patch b/package/squid/squid-cross-compile.patch deleted file mode 100644 index 98424aec08..0000000000 --- a/package/squid/squid-cross-compile.patch +++ /dev/null @@ -1,65 +0,0 @@ -diff -Nura squid-3.1.10.orig/configure.ac squid-3.1.10/configure.ac ---- squid-3.1.10.orig/configure.ac 2010-12-22 02:48:27.000000000 -0300 -+++ squid-3.1.10/configure.ac 2010-12-22 11:31:08.420533635 -0300 -@@ -384,7 +384,7 @@ - - dnl Nasty hack to get autoconf 2.64 on Linux to run. - dnl all other uses of RUN_IFELSE are wrapped inside CACHE_CHECK which breaks on 2.64 --AC_RUN_IFELSE([AC_LANG_SOURCE([[ int main(int argc, char **argv) { return 0; } ]])],[],[],[:]) -+dnl AC_RUN_IFELSE([AC_LANG_SOURCE([[ int main(int argc, char **argv) { return 0; } ]])],[],[],[:]) - - dnl This is a developer only option.. developers know how to set defines - dnl -@@ -1889,7 +1889,7 @@ - AC_MSG_NOTICE([Negotiate auth helpers built: $NEGOTIATE_AUTH_HELPERS]) - fi - AC_SUBST(NEGOTIATE_AUTH_HELPERS) --AC_CONFIG_SUBDIRS(helpers/negotiate_auth/squid_kerb_auth) -+dnl AC_CONFIG_SUBDIRS(helpers/negotiate_auth/squid_kerb_auth) - - dnl Select digest auth scheme helpers to build - if test -n "$AUTH_MODULE_digest"; then -@@ -2202,6 +2202,18 @@ - ;; - esac - -+dnl Define CXX_FOR_BUILD -+CXX_FOR_BUILD="$CXX_FOR_BUILD" -+AC_SUBST(CXX_FOR_BUILD) -+ -+dnl Define CXXFLAGS_FOR_BUILD -+CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD" -+AC_SUBST(CXXFLAGS_FOR_BUILD) -+ -+dnl Define LDFLAGS_FOR_BUILD -+LDFLAGS_FOR_BUILD="$LDFLAGS_FOR_BUILD" -+AC_SUBST(LDFLAGS_FOR_BUILD) -+ - dnl Check for programs - AC_PROG_CPP - AC_PROG_INSTALL -diff -Nura squid-3.1.10.orig/src/Makefile.am squid-3.1.10/src/Makefile.am ---- squid-3.1.10.orig/src/Makefile.am 2010-12-22 02:46:56.000000000 -0300 -+++ squid-3.1.10/src/Makefile.am 2010-12-22 11:31:08.422533643 -0300 -@@ -195,8 +195,6 @@ - cf_gen_SOURCES = cf_gen.cc - nodist_cf_gen_HEADER = cf_gen_defines.cci - cf_gen_LDADD= \ -- ../compat/libcompat.la \ -- -L../lib -lmiscutil \ - $(EPOLL_LIBS) \ - $(MINGW_LIBS) \ - $(XTRA_LIBS) -@@ -753,6 +751,12 @@ - squid.conf.default squid.conf.documented: cf_parser.cci - true - -+cf_gen$(EXEEXT): $(cf_gen_OBJECTS) $(cf_gen_DEPENDENCIES) -+ $(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ $(srcdir)/cf_gen.cc \ -+ $(top_srcdir)/lib/util.c \ -+ $(top_srcdir)/compat/assert.cc \ -+ $(cf_gen_LDADD) $(LIBS) ${INCLUDES} -+ - cf_parser.cci: cf.data cf_gen$(EXEEXT) - ./cf_gen cf.data $(srcdir)/cf.data.depend - diff --git a/package/squid/squid.mk b/package/squid/squid.mk index e410bd174d..8324ba8c12 100644 --- a/package/squid/squid.mk +++ b/package/squid/squid.mk @@ -1,24 +1,36 @@ -############################################################# +################################################################################ # # squid # -############################################################# +################################################################################ -SQUID_VERSION = 3.1.11 -SQUID_SITE = http://www.squid-cache.org/Versions/v3/3.1 -SQUID_DEPENDENCIES = libcap host-libcap +SQUID_VERSION = 3.3.9 +SQUID_SOURCE = squid-$(SQUID_VERSION).tar.xz +SQUID_SITE = http://www.squid-cache.org/Versions/v3/3.3 +SQUID_LICENSE = GPLv2+ +SQUID_LICENSE_FILES = COPYING SQUID_AUTORECONF = YES +SQUID_DEPENDENCIES = libcap host-libcap host-pkgconf \ + $(if $(BR2_PACKAGE_LIBNETFILTER_CONNTRACK),libnetfilter_conntrack) SQUID_CONF_ENV = ac_cv_epoll_works=yes ac_cv_func_setresuid=yes \ ac_cv_func_va_copy=yes ac_cv_func___va_copy=yes \ - ac_cv_func_strnstr=no -SQUID_CONF_OPT = --enable-wccp --enable-wccpv2 --enable-async-io=8 \ - --enable-htcp --enable-snmp --enable-linux-netfilter \ + ac_cv_func_strnstr=no ac_cv_have_squid=yes +SQUID_CONF_OPT = --enable-async-io=8 --enable-linux-netfilter \ --enable-removal-policies="lru,heap" \ --with-filedescriptors=1024 --disable-ident-lookups \ - --enable-auth="digest" \ - --enable-digest-auth-helpers="password" \ + --with-krb5-config=no \ + --enable-auth-basic="fake getpwnam" \ + --enable-auth-digest="file" \ + --enable-auth-negotiate="wrapper" \ + --enable-auth-ntlm="fake" \ + --disable-strict-error-checking \ --enable-external-acl-helpers="ip_user" +# On uClibc librt needs libpthread +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS)$(BR2_TOOLCHAIN_USES_UCLIBC),yy) + SQUID_CONF_ENV += ac_cv_search_shm_open="-lrt -lpthread" +endif + ifeq ($(BR2_PACKAGE_OPENSSL),y) SQUID_CONF_OPT += --enable-ssl SQUID_DEPENDENCIES += openssl @@ -33,4 +45,4 @@ endef SQUID_POST_INSTALL_TARGET_HOOKS += SQUID_CLEANUP_TARGET -$(eval $(call AUTOTARGETS,package,squid)) +$(eval $(autotools-package)) diff --git a/package/sredird/Config.in b/package/sredird/Config.in new file mode 100644 index 0000000000..463269a751 --- /dev/null +++ b/package/sredird/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_SREDIRD + bool "sredird" + help + Sredird is a serial port redirector that is compliant with + the RFC 2217 "Telnet Com Port Control Option" protocol. This + protocol lets you share a serial port through the network. diff --git a/package/sredird/sredird.mk b/package/sredird/sredird.mk new file mode 100644 index 0000000000..b9c90d6cc3 --- /dev/null +++ b/package/sredird/sredird.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# sredird +# +################################################################################ + +SREDIRD_VERSION = 2.2.1-1.1 +SREDIRD_SOURCE = sredird_$(SREDIRD_VERSION).tar.gz +SREDIRD_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/s/sredird + +define SREDIRD_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define SREDIRD_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/sredird $(TARGET_DIR)/usr/sbin/sredird +endef + +define SREDIRD_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/sbin/sredird +endef + +define SREDIRD_CLEAN_CMDS + rm -f $(@D)/sredird +endef + +$(eval $(generic-package)) diff --git a/package/sshfs/Config.in b/package/sshfs/Config.in index 1d9f75978e..aa7628dca2 100644 --- a/package/sshfs/Config.in +++ b/package/sshfs/Config.in @@ -3,18 +3,18 @@ config BR2_PACKAGE_SSHFS select BR2_PACKAGE_LIBFUSE select BR2_PACKAGE_LIBGLIB2 select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE - select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE select BR2_PACKAGE_OPENSSH depends on BR2_LARGEFILE depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libfuse, glib2 + depends on BR2_USE_MMU # libfuse, glib2 + depends on !BR2_PREFER_STATIC_LIB # libfuse help - FUSE makes it possible to implement a filesystem in a userspace - program. Features include: simple yet comprehensive API, secure - mounting by non-root users, support for 2.4 and 2.6 Linux - kernels, multi-threaded operation. etc... + FUSE filesystem client based on the SSH File Transfer Protocol. http://fuse.sourceforge.net/sshfs.html -comment "sshfs requires a toolchain with LARGEFILE and WCHAR support" - depends on !BR2_LARGEFILE || !BR2_USE_WCHAR +comment "sshfs needs a toolchain w/ largefile, wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_LARGEFILE || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_PREFER_STATIC_LIB diff --git a/package/sshfs/sshfs.mk b/package/sshfs/sshfs.mk index ae837bbf53..de9b094db9 100644 --- a/package/sshfs/sshfs.mk +++ b/package/sshfs/sshfs.mk @@ -1,15 +1,17 @@ -############################################################# +################################################################################ # # sshfs # -############################################################# +################################################################################ -SSHFS_VERSION = 2.2 -SSHFS_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/fuse/$(SSHFS_VERSION)/sshfs-fuse +SSHFS_VERSION = 2.4 +SSHFS_SITE = http://downloads.sourceforge.net/project/fuse/sshfs-fuse/$(SSHFS_VERSION) SSHFS_SOURCE = sshfs-fuse-$(SSHFS_VERSION).tar.gz +SSHFS_LICENSE = GPLv2 +SSHFS_LICENSE_FILES = COPYING SSHFS_DEPENDENCIES = \ libglib2 libfuse openssh \ - $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl) \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \ $(if $(BR2_ENABLE_LOCALE),,libiconv) -$(eval $(call AUTOTARGETS,package,sshfs)) +$(eval $(autotools-package)) diff --git a/package/sstrip/sstrip.mk b/package/sstrip/sstrip.mk index 2dc383d4ee..c79a501135 100644 --- a/package/sstrip/sstrip.mk +++ b/package/sstrip/sstrip.mk @@ -1,17 +1,12 @@ -############################################################ +################################################################################ # # sstrip # -############################################################ +################################################################################ SSTRIP_SITE = svn://dev.openwrt.org/openwrt/trunk/tools/sstrip SSTRIP_VERSION = 20154 -HOST_SSTRIP_BINARY = $(REAL_GNU_TARGET_NAME)-sstrip - -# This is a kludge to get host-ccache built before us or it fails -ifeq ($(BR2_CCACHE),y) -HOST_SSTRIP_DEPENDENCIES = host-ccache -endif +HOST_SSTRIP_BINARY = $(GNU_TARGET_NAME)-sstrip define SSTRIP_BUILD_CMDS cd $(@D) ; \ @@ -41,5 +36,5 @@ define HOST_SSTRIP_UNINSTALL_CMDS rm -f $(HOST_DIR)/usr/bin/$(HOST_SSTRIP_BINARY) endef -$(eval $(call GENTARGETS,package,sstrip)) -$(eval $(call GENTARGETS,package,sstrip,host)) +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/startup-notification/startup-notification.mk b/package/startup-notification/startup-notification.mk index ad669ac07d..140b681209 100644 --- a/package/startup-notification/startup-notification.mk +++ b/package/startup-notification/startup-notification.mk @@ -1,20 +1,16 @@ -############################################################# +################################################################################ # # startup-notification # -############################################################# +################################################################################ + STARTUP_NOTIFICATION_VERSION = 0.9 -STARTUP_NOTIFICATION_SOURCE = startup-notification-$(STARTUP_NOTIFICATION_VERSION).tar.gz STARTUP_NOTIFICATION_SITE = http://freedesktop.org/software/startup-notification/releases -STARTUP_NOTIFICATION_AUTORECONF = NO STARTUP_NOTIFICATION_INSTALL_STAGING = YES -STARTUP_NOTIFICATION_INSTALL_TARGET = YES STARTUP_NOTIFICATION_DEPENDENCIES = xlib_libX11 - STARTUP_NOTIFICATION_CONF_ENV = lf_cv_sane_realloc=yes STARTUP_NOTIFICATION_CONF_OPT = --with-x \ --x-includes="$(STAGING_DIR)/usr/include/X11" \ --x-libraries="$(STAGING_DIR)/usr/lib" -$(eval $(call AUTOTARGETS,package,startup-notification)) - +$(eval $(autotools-package)) diff --git a/package/statserial/Config.in b/package/statserial/Config.in new file mode 100644 index 0000000000..4db5eb1aa7 --- /dev/null +++ b/package/statserial/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_STATSERIAL + bool "statserial" + select BR2_PACKAGE_NCURSES + help + Displays a table of the signals on a standard + 9-pin or 25-pin serial port, and indicates the + status of the handshaking lines. It can be + useful for debugging problems with serial + ports or modems. + + https://sites.google.com/site/tranter/software diff --git a/package/statserial/statserial.mk b/package/statserial/statserial.mk new file mode 100644 index 0000000000..25989bcb80 --- /dev/null +++ b/package/statserial/statserial.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# statserial +# +################################################################################ + +STATSERIAL_VERSION = 1.1 +STATSERIAL_SITE = http://www.ibiblio.org/pub/Linux/system/serial/ +STATSERIAL_DEPENDENCIES = ncurses + +define STATSERIAL_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D) +endef + +define STATSERIAL_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/statserial $(TARGET_DIR)/usr/bin/statserial +endef + +$(eval $(generic-package)) diff --git a/package/strace/Config.in b/package/strace/Config.in index bbb582ad53..0959ec535b 100644 --- a/package/strace/Config.in +++ b/package/strace/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_STRACE bool "strace" + depends on !BR2_arc help A useful diagnostic, instructional, and debugging tool. Allows you to track what system calls a program makes diff --git a/package/strace/strace-fix-arm-bad-syscall.patch b/package/strace/strace-fix-arm-bad-syscall.patch deleted file mode 100644 index 3f3144e92a..0000000000 --- a/package/strace/strace-fix-arm-bad-syscall.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/syscall.c -+++ b/syscall.c -@@ -1016,6 +1016,15 @@ struct tcb *tcp; - /* - * Note: we only deal with only 32-bit CPUs here. - */ -+ -+ if (!(tcp->flags & TCB_INSYSCALL) && -+ (tcp->flags & TCB_WAITEXECVE)) { -+ /* caught a fake syscall from the execve's exit */ -+ tcp->flags &= ~TCB_WAITEXECVE; -+ return 0; -+ } -+ -+ - if (regs.ARM_cpsr & 0x20) { - /* - * Get the Thumb-mode system call number diff --git a/package/strace/strace-fix-disabled-largefile-syscalls.patch b/package/strace/strace-fix-disabled-largefile-syscalls.patch index f6bcf96cf5..2117a0e407 100644 --- a/package/strace/strace-fix-disabled-largefile-syscalls.patch +++ b/package/strace/strace-fix-disabled-largefile-syscalls.patch @@ -1,8 +1,8 @@ --- a/syscall.c +++ b/syscall.c @@ -125,6 +125,18 @@ - #define TP TRACE_PROCESS - #define TS TRACE_SIGNAL + #define NF SYSCALL_NEVER_FAILS + #define MA MAX_ARGS +#ifndef HAVE_STATFS64 +/* @@ -16,6 +16,6 @@ +#define sys_fstatfs64 sys_fstatfs +#endif + - static const struct sysent sysent0[] = { + const struct_sysent sysent0[] = { #include "syscallent.h" }; diff --git a/package/strace/strace-undef-CTL_PROC.patch b/package/strace/strace-undef-CTL_PROC.patch deleted file mode 100644 index d841999d29..0000000000 --- a/package/strace/strace-undef-CTL_PROC.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/system.c -+++ b/system.c -@@ -1614,7 +1614,9 @@ static const struct xlat sysctl_root[] = - { CTL_KERN, "CTL_KERN" }, - { CTL_VM, "CTL_VM" }, - { CTL_NET, "CTL_NET" }, -+#ifdef CTL_PROC - { CTL_PROC, "CTL_PROC" }, -+#endif - { CTL_FS, "CTL_FS" }, - { CTL_DEBUG, "CTL_DEBUG" }, - { CTL_DEV, "CTL_DEV" }, diff --git a/package/strace/strace.mk b/package/strace/strace.mk index 85e82c1e6c..9addbb6cfc 100644 --- a/package/strace/strace.mk +++ b/package/strace/strace.mk @@ -1,16 +1,17 @@ -############################################################# +################################################################################ # # strace # -############################################################# +################################################################################ -STRACE_VERSION = 4.5.20 -STRACE_SOURCE = strace-$(STRACE_VERSION).tar.bz2 -STRACE_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/strace +STRACE_VERSION = 4.8 +STRACE_SOURCE = strace-$(STRACE_VERSION).tar.xz +STRACE_SITE = http://downloads.sourceforge.net/project/strace/strace/$(STRACE_VERSION) +STRACE_LICENSE = BSD-3c +STRACE_LICENSE_FILES = COPYING STRACE_CONF_ENV = ac_cv_header_linux_if_packet_h=yes \ - ac_cv_header_linux_netlink_h=yes \ - $(if $(BR2_LARGEFILE),ac_cv_type_stat64=yes,ac_cv_type_stat64=no) + ac_cv_header_linux_netlink_h=yes define STRACE_REMOVE_STRACE_GRAPH rm -f $(TARGET_DIR)/usr/bin/strace-graph @@ -18,4 +19,4 @@ endef STRACE_POST_INSTALL_TARGET_HOOKS += STRACE_REMOVE_STRACE_GRAPH -$(eval $(call AUTOTARGETS,package,strace)) +$(eval $(autotools-package)) diff --git a/package/stress/Config.in b/package/stress/Config.in new file mode 100644 index 0000000000..37f8946c2a --- /dev/null +++ b/package/stress/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_STRESS + bool "stress" + depends on BR2_USE_MMU # fork() + help + A deliberately simple workload generator for POSIX systems. + It imposes a configurable amount of CPU, memory, I/O, and + disk stress on the system. + + http://weather.ou.edu/~apw/projects/stress/ diff --git a/package/stress/stress-0001-Remove-largefile.patch b/package/stress/stress-0001-Remove-largefile.patch new file mode 100644 index 0000000000..bf894bc05e --- /dev/null +++ b/package/stress/stress-0001-Remove-largefile.patch @@ -0,0 +1,22 @@ +Remove largefile + +Otherwise it doesn't compile in uClibc without largefile. + +If the toolchain does support largefile, it will still work on large files +anyway. + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- +Upstream status: mail sent to apw@rossby.metr.ou.edu +--- +diff -rup stress-1.0.4.orig/src/Makefile.am stress-1.0.4/src/Makefile.am +--- stress-1.0.4.orig/src/Makefile.am 2009-12-03 02:04:05.000000000 +0100 ++++ stress-1.0.4/src/Makefile.am 2012-05-04 23:09:48.229842463 +0200 +@@ -1,7 +1,5 @@ + MAINTAINERCLEANFILES = Makefile.in + +-AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE +- + bin_PROGRAMS = stress + stress_SOURCES = stress.c + stress_MANS = stress.1 diff --git a/package/stress/stress.mk b/package/stress/stress.mk new file mode 100644 index 0000000000..b0580310fb --- /dev/null +++ b/package/stress/stress.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# stress +# +################################################################################ + +STRESS_VERSION = 1.0.4 +STRESS_SITE = http://people.seas.harvard.edu/~apw/stress +STRESS_LICENSE = GPLv2+ +STRESS_LICENSE_FILES = COPYING +STRESS_AUTORECONF = YES + +# Stress is linked statically if the --enable-static is specified. +# However, this option is always specified in the global +# SHARED_STATIC_LIBS_OPTS to tell packages to build static libraries, +# if supported. +# +# If the BR2_PREFER_STATIC_LIB is not defined, we have to specify +# --disable-static explicitly to get stress linked dynamically. +# +# Also, disable documentation by undefining makeinfo +STRESS_CONF_OPT = \ + $(if $(BR2_PREFER_STATIC_LIB),,--disable-static) \ + MAKEINFO=: + +$(eval $(autotools-package)) diff --git a/package/strongswan/Config.in b/package/strongswan/Config.in new file mode 100644 index 0000000000..3ed0b31748 --- /dev/null +++ b/package/strongswan/Config.in @@ -0,0 +1,116 @@ +menuconfig BR2_PACKAGE_STRONGSWAN + bool "strongswan" + depends on BR2_USE_MMU # fork() + help + strongSwan is an OpenSource IPsec implementation for the + Linux operating system. It is based on the discontinued + FreeS/WAN project and the X.509 patch. + + The focus is on: + - simplicity of configuration + - strong encryption and authentication methods + - powerful IPsec policies supporting large and complex VPN networks + + strongSwan provide many plugins. Only a few are presented here. + + http://www.strongswan.org/ + +if BR2_PACKAGE_STRONGSWAN + +comment "kernel-netlink and socket-default options need a toolchain w/ IPv6" + depends on !BR2_INET_IPV6 + +choice + prompt "Cryptographic backend" + default BR2_PACKAGE_STRONGSWAN_GMP + +config BR2_PACKAGE_STRONGSWAN_OPENSSL + bool "OpenSSL" + select BR2_PACKAGE_OPENSSL + +config BR2_PACKAGE_STRONGSWAN_GCRYPT + bool "libgcrypt" + select BR2_PACKAGE_LIBGCRYPT + +config BR2_PACKAGE_STRONGSWAN_GMP + bool "GNU MP (libgmp)" + select BR2_PACKAGE_GMP + +endchoice + +config BR2_PACKAGE_STRONGSWAN_AF_ALG + bool "Enable AF_ALG crypto interface to Linux Crypto API" + +config BR2_PACKAGE_STRONGSWAN_CURL + bool "Enable CURL fetcher plugin to fetch files via libcurl" + select BR2_PACKAGE_LIBCURL + +config BR2_PACKAGE_STRONGSWAN_CHARON + bool "Enable the IKEv1/IKEv2 keying daemon charon" + default y + +if BR2_PACKAGE_STRONGSWAN_CHARON + +config BR2_PACKAGE_STRONGSWAN_TNCCS_11 + bool "Enable TNCCS 1.1 protocol module" + select BR2_PACKAGE_LIBXML2 + +config BR2_PACKAGE_STRONGSWAN_TNCCS_20 + bool "Enable TNCCS 2.0 protocol module" + +config BR2_PACKAGE_STRONGSWAN_TNCCS_DYNAMIC + bool "Enable dynamic TNCCS protocol discovery module" + +config BR2_PACKAGE_STRONGSWAN_EAP + bool "Enable EAP protocols" + help + Enable various EAP protocols: + - mschapv2 + - tls + - ttls + - peap + - sim + - sim-file + - aka + - aka-3gpp2 + - simaka-sql + - simaka-pseudonym + - simaka-reauth + - identity + - md5 + - gtc + - tnc + - dynamic + - radius + +if BR2_PACKAGE_STRONGSWAN_EAP + +config BR2_PACKAGE_STRONGSWAN_EAP_SIM_PCSC + bool "Enable EAP-SIM smart card backend" + select BR2_PACKAGE_PCSC_LITE + +endif + +config BR2_PACKAGE_STRONGSWAN_UNITY + bool "Enables Cisco Unity extension plugin" + +config BR2_PACKAGE_STRONGSWAN_STROKE + bool "Enable charons stroke configuration backend" + default y + +config BR2_PACKAGE_STRONGSWAN_SQL + bool "Enable SQL database configuration backend" + depends on BR2_PACKAGE_SQLITE || BR2_PACKAGE_MYSQL_CLIENT + +endif + +config BR2_PACKAGE_STRONGSWAN_TOOLS + bool "Enable additional utilities (openac, scepclient and pki)" + default y + +config BR2_PACKAGE_STRONGSWAN_SCRIPTS + bool "Enable additional utilities (found in directory scripts)" + depends on BR2_PACKAGE_STRONGSWAN_CHARON || BR2_PACKAGE_STRONGSWAN_TOOLS + default y + +endif diff --git a/package/strongswan/strongswan-0001-force-tls-when-needed.patch b/package/strongswan/strongswan-0001-force-tls-when-needed.patch new file mode 100644 index 0000000000..8949f62278 --- /dev/null +++ b/package/strongswan/strongswan-0001-force-tls-when-needed.patch @@ -0,0 +1,72 @@ +Force libtls when libpttls is enabled + +The libpttls library expects libtls.la to be present: +libpttls_la_LIBADD = $(top_builddir)/src/libtls/libtls.la +but there is no expressed dependency between them. Therefore, it is possible to +create a configuration where libpttls is enabled and libtls is not, causing a +build failure: + +make[4]: *** No rule to make target `../../src/libtls/libtls.la', needed by `libpttls.la'. Stop. + +libpttls is enabled through USE_PTTLS, set when tnc_tnccs == true. + tnc_tnccs is true when any of tnc-imc, tnc_imv, tnccs_11, tnccs_dynamic or eap_tnc is true. + +libtls is enabled through USE_TLS, set when tls == true. + tls is true when any of eap_tls, eap_ttls or eap_peap is true. + +This patch forces tls to true, when tnc_tnccs is true, so that the required libtls.la dependency +is built before it is used by libpttls. + +Signed-off-by: Thomas De Schampheleire +Upstream-status: will be submitted + +diff --git a/configure b/configure +--- a/configure ++++ b/configure +@@ -15900,10 +15900,6 @@ if test x$eap_sim = xtrue; then + simaka=true; + fi + +-if test x$eap_tls = xtrue -o x$eap_ttls = xtrue -o x$eap_peap = xtrue; then +- tls=true; +-fi +- + if test x$eap_radius = xtrue -o x$radattr = xtrue -o x$tnc_pdp = xtrue; then + radius=true; + fi +@@ -15912,6 +15908,10 @@ if test x$tnc_imc = xtrue -o x$tnc_imv = + tnc_tnccs=true; + fi + ++if test x$eap_tls = xtrue -o x$eap_ttls = xtrue -o x$eap_peap = xtrue -o x$tnc_tnccs = xtrue; then ++ tls=true; ++fi ++ + if test x$imc_test = xtrue -o x$imv_test = xtrue -o x$imc_scanner = xtrue -o x$imv_scanner = xtrue -o x$imc_os = xtrue -o x$imv_os = xtrue -o x$imc_attestation = xtrue -o x$imv_attestation = xtrue; then + imcv=true; + fi +diff --git a/configure.in b/configure.in +--- a/configure.in ++++ b/configure.in +@@ -313,10 +313,6 @@ if test x$eap_sim = xtrue; then + simaka=true; + fi + +-if test x$eap_tls = xtrue -o x$eap_ttls = xtrue -o x$eap_peap = xtrue; then +- tls=true; +-fi +- + if test x$eap_radius = xtrue -o x$radattr = xtrue -o x$tnc_pdp = xtrue; then + radius=true; + fi +@@ -325,6 +321,10 @@ if test x$tnc_imc = xtrue -o x$tnc_imv = + tnc_tnccs=true; + fi + ++if test x$eap_tls = xtrue -o x$eap_ttls = xtrue -o x$eap_peap = xtrue -o x$tnc_tnccs = xtrue; then ++ tls=true; ++fi ++ + if test x$imc_test = xtrue -o x$imv_test = xtrue -o x$imc_scanner = xtrue -o x$imv_scanner = xtrue -o x$imc_os = xtrue -o x$imv_os = xtrue -o x$imc_attestation = xtrue -o x$imv_attestation = xtrue; then + imcv=true; + fi diff --git a/package/strongswan/strongswan-0002-fix-dependency-to-libtnccs.patch b/package/strongswan/strongswan-0002-fix-dependency-to-libtnccs.patch new file mode 100644 index 0000000000..059fc424c2 --- /dev/null +++ b/package/strongswan/strongswan-0002-fix-dependency-to-libtnccs.patch @@ -0,0 +1,26 @@ +It looks like there is a typing error in dependencies of tnccs_20. + +Signed-off-by: Jérôme Pouiller + +--- a/configure 2013-08-19 12:09:33.934651935 +0200 ++++ b/configure 2013-08-19 11:50:34.465118187 +0200 +@@ -15897,7 +15897,7 @@ + radius=true; + fi + +-if test x$tnc_imc = xtrue -o x$tnc_imv = xtrue -o x$tnccs_11 = xtrue -o x$tnccs_11 = xtrue -o x$tnccs_dynamic = xtrue -o x$eap_tnc = xtrue; then ++if test x$tnc_imc = xtrue -o x$tnc_imv = xtrue -o x$tnccs_11 = xtrue -o x$tnccs_20 = xtrue -o x$tnccs_dynamic = xtrue -o x$eap_tnc = xtrue; then + tnc_tnccs=true; + fi + +--- a/configure.in 2013-08-19 12:08:41.762913778 +0200 ++++ b/configure.in 2013-08-19 11:50:22.222886206 +0200 +@@ -317,7 +317,7 @@ + radius=true; + fi + +-if test x$tnc_imc = xtrue -o x$tnc_imv = xtrue -o x$tnccs_11 = xtrue -o x$tnccs_11 = xtrue -o x$tnccs_dynamic = xtrue -o x$eap_tnc = xtrue; then ++if test x$tnc_imc = xtrue -o x$tnc_imv = xtrue -o x$tnccs_11 = xtrue -o x$tnccs_20 = xtrue -o x$tnccs_dynamic = xtrue -o x$eap_tnc = xtrue; then + tnc_tnccs=true; + fi + diff --git a/package/strongswan/strongswan-0003-CVE-2013-5018-fix.patch b/package/strongswan/strongswan-0003-CVE-2013-5018-fix.patch new file mode 100644 index 0000000000..e30ac31dfe --- /dev/null +++ b/package/strongswan/strongswan-0003-CVE-2013-5018-fix.patch @@ -0,0 +1,29 @@ +From 057265e0183ddf52d56f21adaf0db0f3dc6585a4 Mon Sep 17 00:00:00 2001 +From: Tobias Brunner +Date: Mon, 29 Jul 2013 23:45:38 +0200 +Subject: [PATCH] asn1: Fix handling of invalid ASN.1 length in is_asn1() + +Fixes CVE-2013-5018. +--- + src/libstrongswan/asn1/asn1.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/libstrongswan/asn1/asn1.c b/src/libstrongswan/asn1/asn1.c +index 68f37f4..d860ad9 100644 +--- a/src/libstrongswan/asn1/asn1.c ++++ b/src/libstrongswan/asn1/asn1.c +@@ -642,6 +642,11 @@ bool is_asn1(chunk_t blob) + + len = asn1_length(&blob); + ++ if (len == ASN1_INVALID_LENGTH) ++ { ++ return FALSE; ++ } ++ + /* exact match */ + if (len == blob.len) + { +-- +1.7.10.4 + diff --git a/package/strongswan/strongswan-0004-CVE-2013-6075-fix.patch b/package/strongswan/strongswan-0004-CVE-2013-6075-fix.patch new file mode 100644 index 0000000000..d50616a60c --- /dev/null +++ b/package/strongswan/strongswan-0004-CVE-2013-6075-fix.patch @@ -0,0 +1,27 @@ +From aa277adfc204b6bda2c3792710138f9a8723a8f1 Mon Sep 17 00:00:00 2001 +From: Martin Willi +Date: Mon, 7 Oct 2013 14:21:57 +0200 +Subject: [PATCH] identification: Properly check length before comparing for + binary DN equality + +Fixes CVE-2013-6075. +--- + src/libstrongswan/utils/identification.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/libstrongswan/utils/identification.c b/src/libstrongswan/utils/identification.c +index 5df3e5f..9c43ad5 100644 +--- a/src/libstrongswan/utils/identification.c ++++ b/src/libstrongswan/utils/identification.c +@@ -602,7 +602,7 @@ static bool compare_dn(chunk_t t_dn, chunk_t o_dn, int *wc) + } + } + /* try a binary compare */ +- if (memeq(t_dn.ptr, o_dn.ptr, t_dn.len)) ++ if (chunk_equals(t_dn, o_dn)) + { + return TRUE; + } +-- +1.8.1.2 + diff --git a/package/strongswan/strongswan-0005-CVE-2013-6076-fix.patch b/package/strongswan/strongswan-0005-CVE-2013-6076-fix.patch new file mode 100644 index 0000000000..51f0ae37d2 --- /dev/null +++ b/package/strongswan/strongswan-0005-CVE-2013-6076-fix.patch @@ -0,0 +1,27 @@ +From d8867a8452eece3fffab29605f48e6bed47c42d4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Volker=20R=C3=BCmelin?= +Date: Fri, 11 Oct 2013 09:38:24 +0200 +Subject: [PATCH] ikev1: Properly initialize list of fragments in case fragment + ID is 0 + +Fixes CVE-2013-6076. +--- + src/libcharon/sa/ikev1/task_manager_v1.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/libcharon/sa/ikev1/task_manager_v1.c b/src/libcharon/sa/ikev1/task_manager_v1.c +index 6d4ef14..597416e 100644 +--- a/src/libcharon/sa/ikev1/task_manager_v1.c ++++ b/src/libcharon/sa/ikev1/task_manager_v1.c +@@ -1273,7 +1273,7 @@ static status_t handle_fragment(private_task_manager_t *this, message_t *msg) + return FAILED; + } + +- if (this->frag.id != payload->get_id(payload)) ++ if (!this->frag.list || this->frag.id != payload->get_id(payload)) + { + clear_fragments(this, payload->get_id(payload)); + this->frag.list = linked_list_create(); +-- +1.8.1.2 + diff --git a/package/strongswan/strongswan.mk b/package/strongswan/strongswan.mk new file mode 100644 index 0000000000..aa63d0d701 --- /dev/null +++ b/package/strongswan/strongswan.mk @@ -0,0 +1,78 @@ +################################################################################ +# +# strongswan +# +################################################################################ + +STRONGSWAN_VERSION = 5.0.4 +STRONGSWAN_SOURCE = strongswan-$(STRONGSWAN_VERSION).tar.bz2 +STRONGSWAN_SITE = http://download.strongswan.org +STRONGSWAN_LICENSE = GPLv2+ +STRONGSWAN_LICENSE_FILES = COPYING LICENSE +STRONGSWAN_DEPENDENCIES = host-pkgconf +STRONGSWAN_CONF_OPT += \ + --without-lib-prefix \ + --enable-pkcs11=yes \ + --enable-kernel-netlink=$(if $(BR2_INET_IPV6),yes,no) \ + --enable-socket-default=$(if $(BR2_INET_IPV6),yes,no) \ + --enable-openssl=$(if $(BR2_PACKAGE_STRONGSWAN_OPENSSL),yes,no) \ + --enable-gcrypt=$(if $(BR2_PACKAGE_STRONGSWAN_GCRYPT),yes,no) \ + --enable-gmp=$(if $(BR2_PACKAGE_STRONGSWAN_GMP),yes,no) \ + --enable-af-alg=$(if $(BR2_PACKAGE_STRONGSWAN_AF_ALG),yes,no) \ + --enable-curl=$(if $(BR2_PACKAGE_STRONGSWAN_CURL),yes,no) \ + --enable-charon=$(if $(BR2_PACKAGE_STRONGSWAN_CHARON),yes,no) \ + --enable-tnccs-11=$(if $(BR2_PACKAGE_STRONGSWAN_TNCCS_11),yes,no) \ + --enable-tnccs-20=$(if $(BR2_PACKAGE_STRONGSWAN_TNCCS_20),yes,no) \ + --enable-tnccs-dynamic=$(if $(BR2_PACKAGE_STRONGSWAN_TNCCS_DYNAMIC),yes,no) \ + --enable-eap-sim-pcsc=$(if $(BR2_PACKAGE_STRONGSWAN_EAP_SIM_PCSC),yes,no) \ + --enable-unity=$(if $(BR2_PACKAGE_STRONGSWAN_UNITY),yes,no) \ + --enable-stroke=$(if $(BR2_PACKAGE_STRONGSWAN_STROKE),yes,no) \ + --enable-sql=$(if $(BR2_PACKAGE_STRONGSWAN_SQL),yes,no) \ + --enable-tools=$(if $(BR2_PACKAGE_STRONGSWAN_TOOLS),yes,no) \ + --enable-scripts=$(if $(BR2_PACKAGE_STRONGSWAN_SCRIPTS),yes,no) + +ifeq ($(BR2_PACKAGE_STRONGSWAN_EAP),y) +STRONGSWAN_CONF_OPT += \ + --enable-eap-sim \ + --enable-eap-sim-file \ + --enable-eap-aka \ + --enable-eap-aka-3gpp2 \ + --enable-eap-simaka-sql \ + --enable-eap-simaka-pseudonym \ + --enable-eap-simaka-reauth \ + --enable-eap-identity \ + --enable-eap-md5 \ + --enable-eap-gtc \ + --enable-eap-mschapv2 \ + --enable-eap-tls \ + --enable-eap-ttls \ + --enable-eap-peap \ + --enable-eap-tnc \ + --enable-eap-dynamic \ + --enable-eap-radius +STRONGSWAN_DEPENDENCIES += gmp +endif + +STRONGSWAN_DEPENDENCIES += \ + $(if $(BR2_PACKAGE_STRONGSWAN_OPENSSL),openssl) \ + $(if $(BR2_PACKAGE_STRONGSWAN_GCRYPT),libgcrypt) \ + $(if $(BR2_PACKAGE_STRONGSWAN_GMP),gmp) \ + $(if $(BR2_PACKAGE_STRONGSWAN_CURL),libcurl) \ + $(if $(BR2_PACKAGE_STRONGSWAN_TNCCS_11),libxml2) \ + $(if $(BR2_PACKAGE_STRONGSWAN_EAP_SIM_PCSC),pcsc-lite) + +ifeq ($(BR2_PACKAGE_STRONGSWAN_SQL),y) +STRONGSWAN_DEPENDENCIES += \ + $(if $(BR2_PACKAGE_SQLITE),sqlite) \ + $(if $(BR2_PACKAGE_MYSQL_CLIENT),mysql_client) +endif + +# Strongswan uses AC_LIB_PREFIX, which is relatively new. +# Avoid make to try reconfiguring due to timestamp changes, +# after patching configure{,.in}. +define STRONGSWAN_AVOID_RECONF_HOOK + touch $(@D)/aclocal.m4 +endef +STRONGSWAN_POST_PATCH_HOOKS += STRONGSWAN_AVOID_RECONF_HOOK + +$(eval $(autotools-package)) diff --git a/package/stunnel/Config.in b/package/stunnel/Config.in new file mode 100644 index 0000000000..e4a956770e --- /dev/null +++ b/package/stunnel/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_STUNNEL + bool "stunnel" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_OPENSSL + help + Stunnel is a program that wraps any TCP connection with an SSL + connection. + + http://www.stunnel.org/ diff --git a/package/stunnel/S50stunnel b/package/stunnel/S50stunnel new file mode 100644 index 0000000000..95bb301871 --- /dev/null +++ b/package/stunnel/S50stunnel @@ -0,0 +1,36 @@ +#!/bin/sh +# +# Starts stunnel +# + +start() { + echo -n "Starting stunnel: " + start-stop-daemon -S -q -p /var/run/stunnel.pid --exec /usr/bin/stunnel + echo "OK" +} +stop() { + echo -n "Stopping stunnel: " + start-stop-daemon -K -q -p /var/run/stunnel.pid + echo "OK" +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/stunnel/stunnel.mk b/package/stunnel/stunnel.mk new file mode 100644 index 0000000000..fbe7b94908 --- /dev/null +++ b/package/stunnel/stunnel.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# stunnel +# +################################################################################ + +STUNNEL_VERSION = 4.56 +STUNNEL_SITE = http://ftp.nluug.nl/pub/networking/stunnel/archive/4.x/ +STUNNEL_DEPENDENCIES = openssl +STUNNEL_CONF_OPT = --with-ssl=$(STAGING_DIR)/usr --with-threads=fork +STUNNEL_LICENSE = GPLv2+ +STUNNEL_LICENSE_FILES = COPYING COPYRIGHT.GPL + +define STUNNEL_INSTALL_CONF_SCRIPT + $(INSTALL) -m 0755 -D package/stunnel/S50stunnel $(TARGET_DIR)/etc/init.d/S50stunnel + [ -f $(TARGET_DIR)/etc/stunnel/stunnel.conf ] || \ + $(INSTALL) -m 0644 -D $(@D)/tools/stunnel.conf \ + $(TARGET_DIR)/etc/stunnel/stunnel.conf + rm -f $(TARGET_DIR)/etc/stunnel/stunnel.conf-sample +endef + +STUNNEL_POST_INSTALL_TARGET_HOOKS += STUNNEL_INSTALL_CONF_SCRIPT + +$(eval $(autotools-package)) diff --git a/package/subversion/Config.in b/package/subversion/Config.in new file mode 100644 index 0000000000..cc2549f662 --- /dev/null +++ b/package/subversion/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_SUBVERSION + bool "subversion" + select BR2_PACKAGE_APR_UTIL + # apr really needs shared library support + depends on !BR2_PREFER_STATIC_LIB + depends on BR2_USE_MMU # apr + select BR2_PACKAGE_NEON + select BR2_PACKAGE_NEON_XML + help + Subversion is an open source version control system + + http://subversion.apache.org/ diff --git a/package/subversion/subversion.mk b/package/subversion/subversion.mk new file mode 100644 index 0000000000..de4db7c4e4 --- /dev/null +++ b/package/subversion/subversion.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# subversion +# +################################################################################ + +SUBVERSION_VERSION = 1.7.9 +SUBVERSION_SITE = http://archive.apache.org/dist/subversion +SUBVERSION_LICENSE = Apache 2.0 +SUBVERSION_LICENSE_FILES = LICENSE + +SUBVERSION_DEPENDENCIES = apr apr-util expat neon zlib +SUBVERSION_CONF_OPT = \ + --with-expat=$(STAGING_DIR)/usr/include:$(STAGING_DIR)/usr/lib: \ + --with-apr=$(STAGING_DIR)/usr \ + --with-apr-util=$(STAGING_DIR)/usr \ + --with-zlib=$(STAGING_DIR)/usr \ + --with-neon=$(STAGING_DIR)/usr \ + --without-gssapi \ + --without-serf \ + --without-apxs \ + --without-berkeyley-db \ + --without-sasl \ + --without-gnome-keyring \ + --without-ssl \ + --without-libmagic + +$(eval $(autotools-package)) diff --git a/package/sudo/Config.in b/package/sudo/Config.in index a1b596bbe2..cd7ab81210 100644 --- a/package/sudo/Config.in +++ b/package/sudo/Config.in @@ -1,7 +1,11 @@ config BR2_PACKAGE_SUDO bool "sudo" + # uses fork() + depends on BR2_USE_MMU help Sudo is a program designed to allow a sysadmin to give limited root privileges to users and log root activity. The basic philosophy is to give as few privileges as possible but still allow people to get their work done. + + http://www.sudo.ws/sudo/ diff --git a/package/sudo/sudo-1.6.8p12-001-ubuntu6.patch b/package/sudo/sudo-1.6.8p12-001-ubuntu6.patch deleted file mode 100644 index a370bd06cc..0000000000 --- a/package/sudo/sudo-1.6.8p12-001-ubuntu6.patch +++ /dev/null @@ -1,3994 +0,0 @@ ---- sudo-1.6.8p12.orig/sudoers.man.in -+++ sudo-1.6.8p12/sudoers.man.in -@@ -759,7 +759,7 @@ - .IP "exempt_group" 12 - .IX Item "exempt_group" - Users in this group are exempt from password and \s-1PATH\s0 requirements. --This is not set by default. -+On Debian systems, this is set to the group 'sudo' by default. - .IP "verifypw" 12 - .IX Item "verifypw" - This option controls when a password will be required when a user runs ---- sudo-1.6.8p12.orig/sudo.man.in -+++ sudo-1.6.8p12/sudo.man.in -@@ -185,8 +185,7 @@ - \&\fBsudo\fR determines who is an authorized user by consulting the file - \&\fI@sysconfdir@/sudoers\fR. By giving \fBsudo\fR the \fB\-v\fR flag a user - can update the time stamp without running a \fIcommand.\fR The password --prompt itself will also time out if the user's password is not --entered within \f(CW\*(C`@password_timeout@\*(C'\fR minutes (unless overridden via -+prompt itself will not time out in Debian's version (unless overridden via - \&\fIsudoers\fR). - .PP - If a user who is not listed in the \fIsudoers\fR file tries to run a ---- sudo-1.6.8p12.orig/parse.yacc -+++ sudo-1.6.8p12/parse.yacc -@@ -120,6 +120,7 @@ - } \ - match[top].user = UNSPEC; \ - match[top].cmnd = UNSPEC; \ -+ match[top].cmndall= UNSPEC; \ - match[top].host = UNSPEC; \ - match[top].runas = UNSPEC; \ - match[top].nopass = def_authenticate ? UNSPEC : TRUE; \ -@@ -135,6 +136,7 @@ - } \ - match[top].user = match[top-1].user; \ - match[top].cmnd = match[top-1].cmnd; \ -+ match[top].cmndall= match[top-1].cmndall; \ - match[top].host = match[top-1].host; \ - match[top].runas = match[top-1].runas; \ - match[top].nopass = match[top-1].nopass; \ -@@ -675,6 +677,7 @@ - } - } - -+ SETMATCH(cmnd_all, TRUE); - $$ = TRUE; - } - | ALIAS { -@@ -705,6 +708,7 @@ - $$ = NOMATCH; - } - free($1); -+ SETMATCH(cmnd_all, FALSE); - } - | COMMAND { - if (printmatches == TRUE) { -@@ -730,6 +734,7 @@ - free($1.cmnd); - if ($1.args) - free($1.args); -+ SETMATCH(cmnd_all, FALSE); - } - ; - ---- sudo-1.6.8p12.orig/env.c -+++ sudo-1.6.8p12/env.c -@@ -77,7 +77,7 @@ - /* - * Prototypes - */ --char **rebuild_env __P((char **, int, int)); -+char **rebuild_env __P((char **, int, int, int)); - char **zero_env __P((char **)); - static void insert_env __P((char *, int)); - static char *format_env __P((char *, ...)); -@@ -89,6 +89,8 @@ - static const char *initial_badenv_table[] = { - "IFS", - "CDPATH", -+ "SHELLOPTS", -+ "PS4", - "LOCALDOMAIN", - "RES_OPTIONS", - "HOSTALIASES", -@@ -140,6 +142,12 @@ - "LC_*", - "LANG", - "LANGUAGE", -+ "TERM", -+ "HOME", -+ "LOGNAME", -+ "DISPLAY", -+ "XAUTHORITY", -+ "XAUTHORIZATION", - NULL - }; - -@@ -321,10 +329,11 @@ - * Also adds sudo-specific variables (SUDO_*). - */ - char ** --rebuild_env(envp, sudo_mode, noexec) -+rebuild_env(envp, sudo_mode, noexec, noclean) - char **envp; - int sudo_mode; - int noexec; -+ int noclean; - { - char **ep, *cp, *ps1; - int okvar, iswild, didvar; -@@ -429,7 +438,7 @@ - * env_check. - */ - for (ep = envp; *ep; ep++) { -- okvar = 1; -+ okvar = noclean; - - /* Skip variables with values beginning with () (bash functions) */ - if ((cp = strchr(*ep, '=')) != NULL) { -@@ -438,6 +447,7 @@ - } - - /* Skip anything listed in env_delete. */ -+#if 0 - for (cur = def_env_delete; cur && okvar; cur = cur->next) { - len = strlen(cur->value); - /* Deal with '*' wildcard */ -@@ -451,9 +461,10 @@ - okvar = 0; - } - } -+#endif - - /* Check certain variables for '%' and '/' characters. */ -- for (cur = def_env_check; cur && okvar; cur = cur->next) { -+ for (cur = def_env_check; cur; cur = cur->next) { - len = strlen(cur->value); - /* Deal with '*' wildcard */ - if (cur->value[len - 1] == '*') { -@@ -463,8 +474,24 @@ - iswild = 0; - if (strncmp(cur->value, *ep, len) == 0 && - (iswild || (*ep)[len] == '=') && -- strpbrk(*ep, "/%")) { -- okvar = 0; -+ strpbrk(*ep, "/%") == NULL) { -+ okvar = 1; -+ } -+ } -+ -+ /* keep variables in env_keep */ -+ for (cur = def_env_keep; cur; cur = cur->next) { -+ len = strlen(cur->value); -+ /* Deal with '*' wildcard */ -+ if (cur->value[len - 1] == '*') { -+ len--; -+ iswild = 1; -+ } else -+ iswild = 0; -+ if (strncmp(cur->value, *ep, len) == 0 && -+ (iswild || (*ep)[len] == '=')) { -+ okvar = 1; -+ break; - } - } - ---- sudo-1.6.8p12.orig/sudoers.pod -+++ sudo-1.6.8p12/sudoers.pod -@@ -93,7 +93,7 @@ - - Cmnd_Alias ::= NAME '=' Cmnd_List - -- NAME ::= [A-Z]([A-Z][0-9]_)* -+ NAME ::= [A-Z]([a-z][A-Z][0-9]_)* - - Each I definition is of the form - -@@ -568,7 +568,7 @@ - - =item C<%%> - --two consecutive C<%> characters are collaped into a single C<%> character -+two consecutive C<%> characters are collapsed into a single C<%> character - - =back - -@@ -669,8 +669,8 @@ - - =item exempt_group - --Users in this group are exempt from password and PATH requirements. --This is not set by default. -+Users in this group are exempt from password and PATH requirements. This -+option is turned on for Debian. - - =item verifypw - ---- sudo-1.6.8p12.orig/ins_classic.h -+++ sudo-1.6.8p12/ins_classic.h -@@ -32,7 +32,7 @@ - "Where did you learn to type?", - "Are you on drugs?", - "My pet ferret can type better than you!", -- "You type like i drive.", -+ "You type like I drive.", - "Do you think like you type?", - "Your mind just hasn't been the same since the electro-shock, has it?", - ---- sudo-1.6.8p12.orig/config.guess -+++ sudo-1.6.8p12/config.guess -@@ -1,11 +1,9 @@ - #! /bin/sh - # Attempt to guess a canonical system name. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002 Free Software Foundation, Inc. --# --# $Sudo: config.guess,v 1.10 2004/08/09 23:04:35 millert Exp $ -+# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. - --timestamp='2002-11-30' -+timestamp='2005-08-03' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by -@@ -19,13 +17,15 @@ - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - -+ - # Originally written by Per Bothner . - # Please send patches to . Submit a context - # diff and a properly formatted ChangeLog entry. -@@ -55,7 +55,7 @@ - GNU config.guess ($timestamp) - - Originally written by Per Bothner. --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 - Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO -@@ -68,11 +68,11 @@ - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. -@@ -100,14 +100,18 @@ - # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still - # use `HOST_CC' if defined, but it is deprecated. - --# This shell variable is my proudest work .. or something. --bje -+# Portable tmp directory creation inspired by the Autoconf team. - --set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ; --(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old) -- || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ; --dummy=$tmpdir/dummy ; --files="$dummy.c $dummy.o $dummy.rel $dummy" ; --trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ; -+set_cc_for_build=' -+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -+: ${TMPDIR=/tmp} ; -+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || -+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || -+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || -+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -+dummy=$tmp/dummy ; -+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; - case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do -@@ -115,15 +119,13 @@ - CC_FOR_BUILD="$c"; break ; - fi ; - done ; -- rm -f $files ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; --esac ; --unset files' -+esac ; set_cc_for_build= ;' - - # This is needed to find uname on a Pyramid OSx when run in the BSD universe. - # (ghazi@noc.rutgers.edu 1994-08-24) -@@ -196,104 +198,109 @@ - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" -- exit 0 ;; -+ exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ *:ekkoBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} -+ exit ;; -+ macppc:MirBSD:*:*) -+ echo powerppc-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; -+ *:MirBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; - alpha:OSF1:*:*) -- if test $UNAME_RELEASE = "V4.0"; then -+ case $UNAME_RELEASE in -+ *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` -- fi -+ ;; -+ *5.*) -+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` -+ ;; -+ esac -+ # According to Compaq, /usr/sbin/psrinfo has been available on -+ # OSF/1 and Tru64 systems produced since 1995. I hope that -+ # covers most systems running today. This code pipes the CPU -+ # types through head -n 1, so we only detect the type of CPU 0. -+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` -+ case "$ALPHA_CPU_TYPE" in -+ "EV4 (21064)") -+ UNAME_MACHINE="alpha" ;; -+ "EV4.5 (21064)") -+ UNAME_MACHINE="alpha" ;; -+ "LCA4 (21066/21068)") -+ UNAME_MACHINE="alpha" ;; -+ "EV5 (21164)") -+ UNAME_MACHINE="alphaev5" ;; -+ "EV5.6 (21164A)") -+ UNAME_MACHINE="alphaev56" ;; -+ "EV5.6 (21164PC)") -+ UNAME_MACHINE="alphapca56" ;; -+ "EV5.7 (21164PC)") -+ UNAME_MACHINE="alphapca57" ;; -+ "EV6 (21264)") -+ UNAME_MACHINE="alphaev6" ;; -+ "EV6.7 (21264A)") -+ UNAME_MACHINE="alphaev67" ;; -+ "EV6.8CB (21264C)") -+ UNAME_MACHINE="alphaev68" ;; -+ "EV6.8AL (21264B)") -+ UNAME_MACHINE="alphaev68" ;; -+ "EV6.8CX (21264D)") -+ UNAME_MACHINE="alphaev68" ;; -+ "EV6.9A (21264/EV69A)") -+ UNAME_MACHINE="alphaev69" ;; -+ "EV7 (21364)") -+ UNAME_MACHINE="alphaev7" ;; -+ "EV7.9 (21364A)") -+ UNAME_MACHINE="alphaev79" ;; -+ esac -+ # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. -- eval $set_cc_for_build -- cat <$dummy.s -- .data --\$Lformat: -- .byte 37,100,45,37,120,10,0 # "%d-%x\n" -- -- .text -- .globl main -- .align 4 -- .ent main --main: -- .frame \$30,16,\$26,0 -- ldgp \$29,0(\$27) -- .prologue 1 -- .long 0x47e03d80 # implver \$0 -- lda \$2,-1 -- .long 0x47e20c21 # amask \$2,\$1 -- lda \$16,\$Lformat -- mov \$0,\$17 -- not \$1,\$18 -- jsr \$26,printf -- ldgp \$29,0(\$26) -- mov 0,\$16 -- jsr \$26,exit -- .end main --EOF -- $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null -- if test "$?" = 0 ; then -- case `$dummy` in -- 0-0) -- UNAME_MACHINE="alpha" -- ;; -- 1-0) -- UNAME_MACHINE="alphaev5" -- ;; -- 1-1) -- UNAME_MACHINE="alphaev56" -- ;; -- 1-101) -- UNAME_MACHINE="alphapca56" -- ;; -- 2-303) -- UNAME_MACHINE="alphaev6" -- ;; -- 2-307) -- UNAME_MACHINE="alphaev67" -- ;; -- 2-1307) -- UNAME_MACHINE="alphaev68" -- ;; -- 3-1307) -- UNAME_MACHINE="alphaev7" -- ;; -- esac -- fi -- rm -f $dummy.s $dummy && rmdir $tmpdir -- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -- exit 0 ;; -+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -+ exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix -- exit 0 ;; -+ exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 -- exit 0 ;; -+ exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 -- exit 0;; -+ exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos -- exit 0 ;; -+ exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos -- exit 0 ;; -+ exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition -- exit 0 ;; -+ exit ;; -+ *:z/VM:*:*) -+ echo s390-ibm-zvmoe -+ exit ;; -+ *:OS400:*:*) -+ echo powerpc-ibm-os400 -+ exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} -- exit 0;; -+ exit ;; -+ arm:riscos:*:*|arm:RISCOS:*:*) -+ echo arm-unknown-riscos -+ exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp -- exit 0;; -+ exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then -@@ -301,29 +308,32 @@ - else - echo pyramid-pyramid-bsd - fi -- exit 0 ;; -+ exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 -- exit 0 ;; -- DRS?6000:UNIX_SV:4.2*:7*) -+ exit ;; -+ DRS?6000:unix:4.0:6*) -+ echo sparc-icl-nx6 -+ exit ;; -+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in -- sparc) echo sparc-icl-nx7 && exit 0 ;; -+ sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) -@@ -332,10 +342,10 @@ - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` -- exit 0 ;; -+ exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 -@@ -347,10 +357,10 @@ - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac -- exit 0 ;; -+ exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor -@@ -361,37 +371,40 @@ - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ m68k:machten:*:*) -+ echo m68k-apple-machten${UNAME_RELEASE} -+ exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 -- exit 0 ;; -+ exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -@@ -415,33 +428,33 @@ - exit (-1); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c \ -- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ -- && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 -- rm -f $dummy.c $dummy && rmdir $tmpdir -+ $CC_FOR_BUILD -o $dummy $dummy.c && -+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && -+ SYSTEM_NAME=`$dummy $dummyarg` && -+ { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax -- exit 0 ;; -+ exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix -- exit 0 ;; -+ exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 -- exit 0 ;; -+ exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 -- exit 0 ;; -+ exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` -@@ -457,29 +470,29 @@ - else - echo i586-dg-dgux${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 -- exit 0 ;; -+ exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 -- exit 0 ;; -+ exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd -- exit 0 ;; -+ exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` -- exit 0 ;; -+ exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. -- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' -+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix -- exit 0 ;; -+ exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` -@@ -487,7 +500,7 @@ - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build -@@ -502,15 +515,18 @@ - exit(0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 -- rm -f $dummy.c $dummy && rmdir $tmpdir -- echo rs6000-ibm-aix3.2.5 -+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` -+ then -+ echo "$SYSTEM_NAME" -+ else -+ echo rs6000-ibm-aix3.2.5 -+ fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi -- exit 0 ;; -+ exit ;; - *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then -@@ -524,28 +540,28 @@ - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix -- exit 0 ;; -+ exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 -- exit 0 ;; -+ exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to -- exit 0 ;; # report: romp-ibm BSD 4.3 -+ exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx -- exit 0 ;; -+ exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 -- exit 0 ;; -+ exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd -- exit 0 ;; -+ exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 -- exit 0 ;; -+ exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in -@@ -602,16 +618,36 @@ - } - EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` -- if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi -- rm -f $dummy.c $dummy && rmdir $tmpdir -+ test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac -+ if [ ${HP_ARCH} = "hppa2.0w" ] -+ then -+ eval $set_cc_for_build -+ -+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating -+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler -+ # generating 64-bit code. GNU and HP use different nomenclature: -+ # -+ # $ CC_FOR_BUILD=cc ./config.guess -+ # => hppa2.0w-hp-hpux11.23 -+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess -+ # => hppa64-hp-hpux11.23 -+ -+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | -+ grep __LP64__ >/dev/null -+ then -+ HP_ARCH="hppa2.0w" -+ else -+ HP_ARCH="hppa64" -+ fi -+ fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -@@ -639,149 +675,166 @@ - exit (0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 -- rm -f $dummy.c $dummy && rmdir $tmpdir -+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 -- exit 0 ;; -+ exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd -- exit 0 ;; -+ exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd -- exit 0 ;; -+ exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix -- exit 0 ;; -+ exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf -- exit 0 ;; -+ exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf -- exit 0 ;; -+ exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi -- exit 0 ;; -+ exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites -- exit 0 ;; -+ exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -- CRAY*T3D:*:*:*) -- echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; -+ *:UNICOS/mp:*:*) -+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -+ exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -- exit 0 ;; -+ exit ;; -+ 5000:UNIX_System_V:4.*:*) -+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` -+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -+ exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:FreeBSD:*:*) -- # Determine whether the default compiler uses glibc. -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #include -- #if __GLIBC__ >= 2 -- LIBC=gnu -- #else -- LIBC= -- #endif --EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- rm -f $dummy.c && rmdir $tmpdir -- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} -- exit 0 ;; -+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -+ exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin -- exit 0 ;; -+ exit ;; - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 -- exit 0 ;; -+ exit ;; -+ i*:windows32*:*) -+ # uname -m includes "-pc" on this system. -+ echo ${UNAME_MACHINE}-mingw32 -+ exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 -- exit 0 ;; -- x86:Interix*:3*) -- echo i586-pc-interix3 -- exit 0 ;; -+ exit ;; -+ x86:Interix*:[34]*) -+ echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' -+ exit ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks -- exit 0 ;; -+ exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix -- exit 0 ;; -+ exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin -- exit 0 ;; -+ exit ;; -+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) -+ echo x86_64-unknown-cygwin -+ exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin -- exit 0 ;; -+ exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - *:GNU:*:*) -+ # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` -- exit 0 ;; -+ exit ;; -+ *:GNU/*:*:*) -+ # other systems with GNU libc and userland -+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu -+ exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix -- exit 0 ;; -+ exit ;; - arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ cris:Linux:*:*) -+ echo cris-axis-linux-gnu -+ exit ;; -+ crisv32:Linux:*:*) -+ echo crisv32-axis-linux-gnu -+ exit ;; -+ frv:Linux:*:*) -+ echo frv-unknown-linux-gnu -+ exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ m32r*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -@@ -799,8 +852,7 @@ - #endif - EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- rm -f $dummy.c && rmdir $tmpdir -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build -@@ -819,15 +871,17 @@ - #endif - EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- rm -f $dummy.c && rmdir $tmpdir -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; -+ or32:Linux:*:*) -+ echo or32-unknown-linux-gnu -+ exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; -@@ -841,7 +895,7 @@ - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -- exit 0 ;; -+ exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in -@@ -849,22 +903,25 @@ - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac -- exit 0 ;; -+ exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux -- exit 0 ;; -+ exit ;; -+ sh64*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent -@@ -882,15 +939,15 @@ - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" -- exit 0 ;; -+ exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" -- exit 0 ;; -+ exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" -- exit 0 ;; -+ exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build -@@ -913,18 +970,23 @@ - LIBC=gnuaout - #endif - #endif -+ #ifdef __dietlibc__ -+ LIBC=dietlibc -+ #endif - EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- rm -f $dummy.c && rmdir $tmpdir -- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 -- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 -+ test x"${LIBC}" != x && { -+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" -+ exit -+ } -+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 -- exit 0 ;; -+ exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... -@@ -932,24 +994,27 @@ - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx -- exit 0 ;; -+ exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop -- exit 0 ;; -+ exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos -- exit 0 ;; -+ exit ;; -+ i*86:syllable:*:*) -+ echo ${UNAME_MACHINE}-pc-syllable -+ exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp -- exit 0 ;; -+ exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then -@@ -957,15 +1022,16 @@ - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi -- exit 0 ;; -- i*86:*:5:[78]*) -+ exit ;; -+ i*86:*:5:[678]*) -+ # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi -- exit 0 ;; -+ exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv -- exit 0 ;; -+ exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv -- exit 0 ;; -+ exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix -- exit 0 ;; -- M68*:*:R3V[567]*:*) -- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; -- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0) -+ exit ;; -+ M68*:*:R3V[5678]*:*) -+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; -+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4.3${OS_REL} && exit 0 -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4 && exit 0 ;; -+ && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 -- exit 0 ;; -+ exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` -@@ -1057,64 +1123,73 @@ - else - echo ns32k-sni-sysv - fi -- exit 0 ;; -+ exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 -- exit 0 ;; -+ exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 -- exit 0 ;; -+ exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 -- exit 0 ;; -+ exit ;; -+ i*86:VOS:*:*) -+ # From Paul.Green@stratus.com. -+ echo ${UNAME_MACHINE}-stratus-vos -+ exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos -- exit 0 ;; -+ exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 -- exit 0 ;; -+ exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos -- exit 0 ;; -+ exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos -- exit 0 ;; -+ exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos -- exit 0 ;; -+ exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Darwin:*:*) -- echo `uname -p`-apple-darwin${UNAME_RELEASE} -- exit 0 ;; -+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown -+ case $UNAME_PROCESSOR in -+ *86) UNAME_PROCESSOR=i686 ;; -+ unknown) UNAME_PROCESSOR=powerpc ;; -+ esac -+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} -+ exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then -@@ -1122,22 +1197,25 @@ - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:QNX:*:4*) - echo i386-pc-qnx -- exit 0 ;; -- NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) -+ exit ;; -+ NSE-?:NONSTOP_KERNEL:*:*) -+ echo nse-tandem-nsk${UNAME_RELEASE} -+ exit ;; -+ NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux -- exit 0 ;; -+ exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv -- exit 0 ;; -+ exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 -@@ -1148,25 +1226,44 @@ - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 -- exit 0 ;; -+ exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 -- exit 0 ;; -+ exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex -- exit 0 ;; -+ exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 -- exit 0 ;; -+ exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 -- exit 0 ;; -+ exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 -- exit 0 ;; -+ exit ;; - *:ITS:*:*) - echo pdp10-unknown-its -- exit 0 ;; -+ exit ;; -+ SEI:*:*:SEIUX) -+ echo mips-sei-seiux${UNAME_RELEASE} -+ exit ;; -+ *:DragonFly:*:*) -+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -+ exit ;; -+ *:*VMS:*:*) -+ UNAME_MACHINE=`(uname -p) 2>/dev/null` -+ case "${UNAME_MACHINE}" in -+ A*) echo alpha-dec-vms ; exit ;; -+ I*) echo ia64-dec-vms ; exit ;; -+ V*) echo vax-dec-vms ; exit ;; -+ esac ;; -+ *:XENIX:*:SysV) -+ echo i386-pc-xenix -+ exit ;; -+ i*86:skyos:*:*) -+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' -+ exit ;; - esac - - #echo '(No uname command or uname output not recognized.)' 1>&2 -@@ -1198,7 +1295,7 @@ - #endif - - #if defined (__arm) && defined (__acorn) && defined (__unix) -- printf ("arm-acorn-riscix"); exit (0); -+ printf ("arm-acorn-riscix\n"); exit (0); - #endif - - #if defined (hp300) && !defined (hpux) -@@ -1287,12 +1384,12 @@ - } - EOF - --$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 --rm -f $dummy.c $dummy && rmdir $tmpdir -+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - - # Apollos put the system type in the environment. - --test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } -+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - - # Convex versions that predate uname can use getsysinfo(1) - -@@ -1301,22 +1398,22 @@ - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - c34*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - c38*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - c4*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - esac - fi - -@@ -1327,7 +1424,9 @@ - the operating system you are using. It is advised that you - download the most up to date version of the config scripts from - -- ftp://ftp.gnu.org/pub/gnu/config/ -+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess -+and -+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub - - If the version you run ($0) is already up to date, please - send the following data and any information you think might be ---- sudo-1.6.8p12.orig/config.sub -+++ sudo-1.6.8p12/config.sub -@@ -1,11 +1,9 @@ - #! /bin/sh - # Configuration validation subroutine script. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002 Free Software Foundation, Inc. --# --# $Sudo: config.sub,v 1.11 2003/01/20 21:07:51 millert Exp $ -+# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. - --timestamp='2002-11-30' -+timestamp='2005-07-08' - - # This file is (in principle) common to ALL GNU software. - # The presence of a machine in this file suggests that SOME GNU software -@@ -23,14 +21,15 @@ - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, --# Boston, MA 02111-1307, USA. -- -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. -+# - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - -+ - # Please send patches to . Submit a context - # diff and a properly formatted ChangeLog entry. - # -@@ -72,7 +71,7 @@ - version="\ - GNU config.sub ($timestamp) - --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 - Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO -@@ -85,11 +84,11 @@ - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. -@@ -101,7 +100,7 @@ - *local*) - # First pass through any local machine types. - echo $1 -- exit 0;; -+ exit ;; - - * ) - break ;; -@@ -120,7 +119,8 @@ - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) -+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ -+ kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; -@@ -146,7 +146,7 @@ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -- -apple | -axis | -sr2201*) -+ -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; -@@ -230,14 +230,16 @@ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ -+ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ -- | clipper \ -+ | bfin \ -+ | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ -- | ip2k \ -- | m32r | m68000 | m68k | m88k | mcore \ -+ | ip2k | iq2000 \ -+ | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ -@@ -246,28 +248,37 @@ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ -+ | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ -+ | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ -+ | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ -+ | ms1 \ -+ | msp430 \ - | ns16k | ns32k \ -- | openrisc | or32 \ -+ | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ -- | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ -+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ -- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ -+ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ -+ | sparcv8 | sparcv9 | sparcv9b \ - | strongarm \ -- | tahoe | thumb | tic80 | tron \ -+ | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ -- | x86 | xscale | xstormy16 | xtensa \ -+ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; -+ m32c) -+ basic_machine=$basic_machine-unknown -+ ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown -@@ -295,19 +306,19 @@ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* \ -- | bs2000-* \ -- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \ -- | clipper-* | cydra-* \ -+ | bfin-* | bs2000-* \ -+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ -+ | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ -- | ip2k-* \ -- | m32r-* \ -+ | ip2k-* | iq2000-* \ -+ | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -- | m88110-* | m88k-* | mcore-* \ -+ | m88110-* | m88k-* | maxq-* | mcore-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ -@@ -316,29 +327,40 @@ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ -+ | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ -+ | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ -+ | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ -- | mipstx39 | mipstx39el \ -+ | mipstx39-* | mipstx39el-* \ -+ | mmix-* \ -+ | ms1-* \ -+ | msp430-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ -- | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \ -+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ -- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ -- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ -- | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \ -+ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ -+ | sparclite-* \ -+ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ -+ | tahoe-* | thumb-* \ -+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ -+ | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ -- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ -- | xtensa-* \ -+ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ -+ | xstormy16-* | xtensa-* \ - | ymp-* \ - | z8k-*) - ;; -+ m32c-*) -+ ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) -@@ -355,6 +377,9 @@ - basic_machine=a29k-amd - os=-udi - ;; -+ abacus) -+ basic_machine=abacus-unknown -+ ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout -@@ -434,12 +459,27 @@ - basic_machine=j90-cray - os=-unicos - ;; -+ craynv) -+ basic_machine=craynv-cray -+ os=-unicosmp -+ ;; -+ cr16c) -+ basic_machine=cr16c-unknown -+ os=-elf -+ ;; - crds | unos) - basic_machine=m68k-crds - ;; -+ crisv32 | crisv32-* | etraxfs*) -+ basic_machine=crisv32-axis -+ ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; -+ crx) -+ basic_machine=crx-unknown -+ os=-elf -+ ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; -@@ -462,6 +502,10 @@ - basic_machine=m88k-motorola - os=-sysv3 - ;; -+ djgpp) -+ basic_machine=i586-pc -+ os=-msdosdjgpp -+ ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx -@@ -515,10 +559,6 @@ - basic_machine=h8500-hitachi - os=-hms - ;; -- sr2201*) -- basic_machine=harp1e-hitachi -- os=-hiuxmpp -- ;; - harris) - basic_machine=m88k-harris - os=-sysv3 -@@ -644,10 +684,6 @@ - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; -- mmix*) -- basic_machine=mmix-knuth -- os=-mmixware -- ;; - monitor) - basic_machine=m68k-rom68k - os=-coff -@@ -735,9 +771,12 @@ - basic_machine=hppa1.1-oki - os=-proelf - ;; -- or32 | or32-*) -+ openrisc | openrisc-*) - basic_machine=or32-unknown -- os=-coff -+ ;; -+ os400) -+ basic_machine=powerpc-ibm -+ os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson -@@ -770,18 +809,24 @@ - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; -- pentiumii | pentium2) -+ pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; -+ pentium4) -+ basic_machine=i786-pc -+ ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -- pentiumii-* | pentium2-*) -+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -+ pentium4-*) -+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pn) - basic_machine=pn-gould - ;; -@@ -840,6 +885,10 @@ - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; -+ sei) -+ basic_machine=mips-sei -+ os=-seiux -+ ;; - sequent) - basic_machine=i386-sequent - ;; -@@ -847,6 +896,9 @@ - basic_machine=sh-hitachi - os=-hms - ;; -+ sh64) -+ basic_machine=sh64-unknown -+ ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks -@@ -913,10 +965,6 @@ - basic_machine=i386-sequent - os=-dynix - ;; -- t3d) -- basic_machine=alpha-cray -- os=-unicos -- ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos -@@ -925,14 +973,18 @@ - basic_machine=t90-cray - os=-unicos - ;; -- tic4x | c4x*) -- basic_machine=tic4x-unknown -- os=-coff -- ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; -+ tic55x | c55x*) -+ basic_machine=tic55x-unknown -+ os=-coff -+ ;; -+ tic6x | c6x*) -+ basic_machine=tic6x-unknown -+ os=-coff -+ ;; - tx39) - basic_machine=mipstx39-unknown - ;; -@@ -946,6 +998,10 @@ - tower | tower-32) - basic_machine=m68k-ncr - ;; -+ tpf) -+ basic_machine=s390x-ibm -+ os=-tpf -+ ;; - udi29k) - basic_machine=a29k-amd - os=-udi -@@ -989,6 +1045,10 @@ - basic_machine=hppa1.1-winbond - os=-proelf - ;; -+ xbox) -+ basic_machine=i686-pc -+ os=-mingw32 -+ ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; -@@ -1019,6 +1079,9 @@ - romp) - basic_machine=romp-ibm - ;; -+ mmix) -+ basic_machine=mmix-knuth -+ ;; - rs6000) - basic_machine=rs6000-ibm - ;; -@@ -1035,13 +1098,10 @@ - we32k) - basic_machine=we32k-att - ;; -- sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele) -+ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; -- sh64) -- basic_machine=sh64-unknown -- ;; -- sparc | sparcv9 | sparcv9b) -+ sparc | sparcv8 | sparcv9 | sparcv9b) - basic_machine=sparc-sun - ;; - cydra) -@@ -1114,19 +1174,21 @@ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ -- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ -- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ -+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ -+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ -+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ -+ | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ -- | -powermax* | -dnix*) -+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ -+ | -skyos* | -haiku*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) -@@ -1144,12 +1206,15 @@ - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ -- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ -+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; -+ -linux-dietlibc) -+ os=-linux-dietlibc -+ ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; -@@ -1162,6 +1227,9 @@ - -opened*) - os=-openedition - ;; -+ -os400*) -+ os=-os400 -+ ;; - -wince*) - os=-wince - ;; -@@ -1183,6 +1251,9 @@ - -atheos*) - os=-atheos - ;; -+ -syllable*) -+ os=-syllable -+ ;; - -386bsd) - os=-bsd - ;; -@@ -1205,6 +1276,9 @@ - -sinix*) - os=-sysv4 - ;; -+ -tpf*) -+ os=-tpf -+ ;; - -triton*) - os=-sysv3 - ;; -@@ -1235,6 +1309,15 @@ - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; -+ -aros*) -+ os=-aros -+ ;; -+ -kaos*) -+ os=-kaos -+ ;; -+ -zvmoe) -+ os=-zvmoe -+ ;; - -none) - ;; - *) -@@ -1266,6 +1349,9 @@ - arm*-semi) - os=-aout - ;; -+ c4x-* | tic4x-*) -+ os=-coff -+ ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 -@@ -1309,9 +1395,15 @@ - *-be) - os=-beos - ;; -+ *-haiku) -+ os=-haiku -+ ;; - *-ibm) - os=-aix - ;; -+ *-knuth) -+ os=-mmixware -+ ;; - *-wec) - os=-proelf - ;; -@@ -1444,9 +1536,15 @@ - -mvs* | -opened*) - vendor=ibm - ;; -+ -os400*) -+ vendor=ibm -+ ;; - -ptx*) - vendor=sequent - ;; -+ -tpf*) -+ vendor=ibm -+ ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; -@@ -1471,7 +1569,7 @@ - esac - - echo $basic_machine$os --exit 0 -+exit - - # Local variables: - # eval: (add-hook 'write-file-hooks 'time-stamp) ---- sudo-1.6.8p12.orig/sudoers -+++ sudo-1.6.8p12/sudoers -@@ -1,10 +1,17 @@ - # sudoers file. - # - # This file MUST be edited with the 'visudo' command as root. -+# 'visudo' edits the suoders file in a safe fashion. visudo -+# locks the sudoers file against multiple simultaneous edits, -+# provides basic sanity checks, and checks for syntax errors. If -+# the sudoers file is currently being edited you will receive a -+# message to try again later. - # - # See the sudoers man page for the details on how to write a sudoers file. - # - -+# Defaults syslog=auth, secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin" -+ - # Host alias specification - - # User alias specification ---- sudo-1.6.8p12.orig/debian/dirs -+++ sudo-1.6.8p12/debian/dirs -@@ -0,0 +1,7 @@ -+etc/pam.d -+usr/bin -+usr/share/man/man8 -+usr/share/man/man5 -+usr/sbin -+usr/share/doc/sudo/examples -+usr/share/lintian/overrides ---- sudo-1.6.8p12.orig/debian/docs -+++ sudo-1.6.8p12/debian/docs -@@ -0,0 +1,9 @@ -+debian/OPTIONS -+BUGS -+RUNSON -+UPGRADE -+PORTING -+TODO -+HISTORY -+README -+TROUBLESHOOTING ---- sudo-1.6.8p12.orig/debian/sudo-ldap.init.d -+++ sudo-1.6.8p12/debian/sudo-ldap.init.d -@@ -0,0 +1,31 @@ -+#! /bin/sh -+ -+### BEGIN INIT INFO -+# Provides: sudu -+# Required-Start: $local_fs $remote_fs -+# Required-Stop: -+# Default-Start: S 1 2 3 4 5 -+# Default-Stop: 0 6 -+### END INIT INFO -+ -+N=/etc/init.d/sudo -+ -+set -e -+ -+case "$1" in -+ start) -+ # make sure privileges don't persist across reboots -+ if [ -d /var/run/sudo ] -+ then -+ find /var/run/sudo -type f -exec touch -t 198501010000 '{}' \; -+ fi -+ ;; -+ stop|reload|restart|force-reload) -+ ;; -+ *) -+ echo "Usage: $N {start|stop|restart|force-reload}" >&2 -+ exit 1 -+ ;; -+esac -+ -+exit 0 ---- sudo-1.6.8p12.orig/debian/control -+++ sudo-1.6.8p12/debian/control -@@ -0,0 +1,32 @@ -+Source: sudo -+Section: admin -+Priority: optional -+Maintainer: Bdale Garbee -+Build-Depends: debhelper (>= 5), libpam0g-dev, libldap2-dev -+Standards-Version: 3.6.2.1 -+ -+Package: sudo -+Architecture: any -+Depends: ${shlibs:Depends}, libpam-modules -+Conflicts: sudo-ldap -+Replaces: sudo-ldap -+Description: Provide limited super user privileges to specific users -+ Sudo is a program designed to allow a sysadmin to give limited root -+ privileges to users and log root activity. The basic philosophy is to give -+ as few privileges as possible but still allow people to get their work done. -+ . -+ This version is built with minimal shared library dependencies, use the -+ sudo-ldap package instead if you need LDAP support. -+ -+Package: sudo-ldap -+Architecture: any -+Depends: ${shlibs:Depends}, libpam-modules -+Conflicts: sudo -+Replaces: sudo -+Provides: sudo -+Description: Provide limited super user privileges to specific users -+ Sudo is a program designed to allow a sysadmin to give limited root -+ privileges to users and log root activity. The basic philosophy is to give -+ as few privileges as possible but still allow people to get their work done. -+ . -+ This version is built with LDAP support. ---- sudo-1.6.8p12.orig/debian/sudo-ldap.postrm -+++ sudo-1.6.8p12/debian/sudo-ldap.postrm -@@ -0,0 +1,21 @@ -+#! /bin/sh -+ -+set -e -+ -+case "$1" in -+ purge) -+ rm -f /etc/sudoers -+ ;; -+ -+ remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) -+ ;; -+ -+ *) -+ echo "postrm called with unknown argument \`$1'" >&2 -+ exit 1 -+ -+esac -+ -+#DEBHELPER# -+ -+exit 0 ---- sudo-1.6.8p12.orig/debian/prerm -+++ sudo-1.6.8p12/debian/prerm -@@ -0,0 +1,37 @@ -+#!/bin/sh -+ -+set -e -+ -+check_password() { -+ if [ ! "$SUDO_FORCE_REMOVE" = "yes" ]; then -+ # let's check whether the root account is locked. -+ # if it is, we're not going another step. No Sirreee! -+ passwd=$(getent shadow root|cut -f2 -d:) -+ if [ "$passwd" = "*" -o "$passwd" = "!" ]; then -+ # yup, password is locked -+ echo "You have asked that the sudo package be removed," -+ echo "but no root password has been set." -+ echo "Without sudo, you may not be able to gain administrative privileges." -+ echo -+ echo "If you would prefer to access the root account with su(1)" -+ echo "or by logging in directly," -+ echo "you must set a root password with \"sudo passwd\"." -+ echo -+ echo "If you have arranged other means to access the root account," -+ echo "and you are sure this is what you want," -+ echo "you may bypass this check by setting an environment variable " -+ echo "(export SUDO_FORCE_REMOVE=yes)." -+ echo -+ echo "Refusing to remove sudo." -+ exit 1 -+ fi -+ fi -+} -+ -+case $1 in -+ remove) -+ check_password; -+ ;; -+ *) -+ ;; -+esac ---- sudo-1.6.8p12.orig/debian/rules -+++ sudo-1.6.8p12/debian/rules -@@ -0,0 +1,140 @@ -+#!/usr/bin/make -f -+ -+export DH_VERBOSE=1 -+ -+CFLAGS = -O2 -Wall -Wno-comment -+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) -+CFLAGS += -g -+endif -+export CFLAGS -+ -+build: config-stamp -+config-stamp: -+ dh_testdir -+ -+ # simple version -+ mkdir -p build-simple -+ cd build-simple && ../configure --prefix=/usr -v \ -+ --with-all-insults \ -+ --with-exempt=sudo --with-pam --with-fqdn \ -+ --with-logging=syslog --with-logfac=authpriv \ -+ --with-env-editor --with-editor=/usr/bin/editor \ -+ --with-timeout=15 --with-password-timeout=0 \ -+ --disable-root-mailer --disable-setresuid \ -+ --with-sendmail=/usr/sbin/sendmail \ -+ --without-lecture \ -+ --with-secure-path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin" -+ -+ # LDAP version -+ mkdir -p build-ldap -+ cd build-ldap && ../configure --prefix=/usr -v \ -+ --with-all-insults \ -+ --with-exempt=sudo --with-pam --with-ldap --with-fqdn \ -+ --with-logging=syslog --with-logfac=authpriv \ -+ --with-env-editor --with-editor=/usr/bin/editor \ -+ --with-timeout=15 --with-password-timeout=0 \ -+ --disable-root-mailer --disable-setresuid \ -+ --with-sendmail=/usr/sbin/sendmail \ -+ --with-ldap-conf-file=/etc/ldap/ldap.conf \ -+ --with-secure-path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin" -+ -+ touch config-stamp -+ -+build: build-stamp -+build-stamp: config-stamp -+ dh_testdir -+ -+ -$(MAKE) -C build-simple -+ -$(MAKE) -C build-ldap -+ -+ touch build-stamp -+ -+clean: -+ dh_testdir -+ dh_testroot -+ rm -f config-stamp build-stamp -+ rm -rf build-simple build-ldap -+ rm -f config.cache -+ -+ -test -r /usr/share/misc/config.sub && \ -+ cp -f /usr/share/misc/config.sub config.sub -+ -test -r /usr/share/misc/config.guess && \ -+ cp -f /usr/share/misc/config.guess config.guess -+ -+ dh_clean -+ -+install: build-stamp -+ dh_testdir -+ dh_testroot -+ dh_clean -k -+ dh_installdirs -+ -+ # simple version -+ install -o root -g root -m 4755 -s build-simple/sudo debian/sudo/usr/bin/sudo -+ ln -sf sudo debian/sudo/usr/bin/sudoedit -+ install -o root -g root -m 0755 -s build-simple/visudo \ -+ debian/sudo/usr/sbin/visudo -+ install -o root -g root -m 0644 build-simple/sudo.man \ -+ debian/sudo/usr/share/man/man8/sudo.8 -+ ln -sf sudo.8 debian/sudo/usr/share/man/man8/sudoedit.8 -+ install -o root -g root -m 0644 build-simple/visudo.man \ -+ debian/sudo/usr/share/man/man8/visudo.8 -+ install -o root -g root -m 0644 build-simple/sudoers.man \ -+ debian/sudo/usr/share/man/man5/sudoers.5 -+ install -o root -g root -m 0644 sample.sudoers \ -+ debian/sudo/usr/share/doc/sudo/examples/sudoers -+ install -o root -g root -m 0644 debian/sudo.pam \ -+ debian/sudo/etc/pam.d/sudo -+ -+ install -o root -g root -m 0644 debian/sudo.lintian \ -+ debian/sudo/usr/share/lintian/overrides/sudo -+ -+ install -o root -g root -m 0644 debian/sudo_root.8 \ -+ debian/sudo/usr/share/man/man8/sudo_root.8 -+ -+ # LDAP version -+ install -o root -g root -m 4755 -s build-ldap/sudo debian/sudo-ldap/usr/bin/sudo -+ ln -sf sudo debian/sudo-ldap/usr/bin/sudoedit -+ install -o root -g root -m 0755 -s build-ldap/visudo debian/sudo-ldap/usr/sbin/visudo -+ install -o root -g root -m 0644 build-ldap/sudo.man \ -+ debian/sudo-ldap/usr/share/man/man8/sudo.8 -+ ln -sf sudo.8 debian/sudo-ldap/usr/share/man/man8/sudoedit.8 -+ install -o root -g root -m 0644 build-ldap/visudo.man \ -+ debian/sudo-ldap/usr/share/man/man8/visudo.8 -+ install -o root -g root -m 0644 build-ldap/sudoers.man \ -+ debian/sudo-ldap/usr/share/man/man5/sudoers.5 -+ install -o root -g root -m 0644 sample.sudoers \ -+ debian/sudo-ldap/usr/share/doc/sudo-ldap/examples/sudoers -+ install -o root -g root -m 0644 debian/sudo.pam \ -+ debian/sudo-ldap/etc/pam.d/sudo -+ -+ install -o root -g root -m 0644 debian/sudo-ldap.lintian \ -+ debian/sudo-ldap/usr/share/lintian/overrides/sudo-ldap -+ -+ install -o root -g root -m 0644 debian/sudo_root.8 \ -+ debian/sudo/usr/share/man/man8/sudo_root.8 -+ -+binary-indep: build install -+ -+binary-arch: build install -+ dh_testdir -+ dh_testroot -+ dh_installdocs -+ dh_installexamples -A -+# dh_installinit -psudo -psudo-ldap -+ dh_installmanpages fnmatch.3 -+ dh_installinfo -A -+ dh_installchangelogs CHANGES -+ dh_strip -+ dh_compress -+ dh_fixperms -+ chown root.root debian/sudo/usr/bin/sudo debian/sudo-ldap/usr/bin/sudo -+ chmod 4755 debian/sudo/usr/bin/sudo debian/sudo-ldap/usr/bin/sudo -+ dh_installdeb -+ dh_shlibdeps -+ dh_gencontrol -+ dh_md5sums -+ dh_builddeb -+ -+binary: binary-indep binary-arch -+.PHONY: build clean binary-indep binary-arch binary install ---- sudo-1.6.8p12.orig/debian/changelog -+++ sudo-1.6.8p12/debian/changelog -@@ -0,0 +1,769 @@ -+sudo (1.6.8p12-1ubuntu6) dapper; urgency=low -+ -+ * env.c: Preserve additional environment variables for non-almighty sudoers: -+ HOME, LOGNAME, DISPLAY, XAUTHORITY, XAUTHORIZATION. Closes: LP#44500 -+ -+ -- Martin Pitt Wed, 17 May 2006 09:29:15 +0200 -+ -+sudo (1.6.8p12-1ubuntu5) dapper; urgency=low -+ -+ * env.c: Unbreak the env_keep option. Closes: LP#31690 -+ * sudoers: Add some explanatory text why it is a REALLY good idea to use -+ visudo. Closes: LP#11620 -+ -+ -- Martin Pitt Tue, 28 Mar 2006 18:52:24 +0200 -+ -+sudo (1.6.8p12-1ubuntu4) dapper; urgency=low -+ -+ * Remove the init script, it only cleans up /var/run which is a tmpfs. -+ -+ -- Scott James Remnant Wed, 22 Feb 2006 16:28:42 +0000 -+ -+sudo (1.6.8p12-1ubuntu3) dapper; urgency=low -+ -+ * Add debian/sudo_root.8: Introduction about root handling in ubuntu with -+ sudo. -+ * debian/rules: Install that new manpage into sudo and sudo-ldap. -+ -+ -- Martin Pitt Wed, 8 Feb 2006 17:01:50 +0100 -+ -+sudo (1.6.8p12-1ubuntu2) dapper; urgency=low -+ -+ * sudo.c: If the user successfully authenticated and he is in the 'admin' -+ group, then create a stamp ~/.sudo_as_admin_successful. A future -+ /etc/profile will evaluate this flag to display a short help about how to -+ execute things as root. -+ -+ -- Martin Pitt Wed, 18 Jan 2006 09:32:02 +0100 -+ -+sudo (1.6.8p12-1ubuntu1) dapper; urgency=low -+ -+ * Resynchronise with Debian, clean up cruft from Ubuntu diff. -+ * debian/postinst: Do not set env_reset flag in newly created sudoers files; -+ it's incompatible with upgrades. -+ * Clean up environment variable handling to fix vulns like CVE-2005-4158 and -+ CVE-2006-0151 once and for all: Only keep known-good variables if user has -+ limited sudo privileges (blacklist -> whitelist) and keep them all for -+ users with unlimited command privileges (to not drive admins and -+ developers up the wall which actually need to pass env variables from time -+ to time). -+ - parse.h, parse.yacc: -+ + Add a new flag 'cmdall' to the matchstack, and a new macro 'cmnd_all' -+ to access it. -+ + In the "cmnd" grammar rule: Set cmdall to TRUE if command specifier is -+ 'ALL', otherwise to FALSE. -+ - sudo.tab.cc: Re-yaccified to match changes to parse.yacc. -+ - sudo.h: Add new sudoers_lookup() return flag FLAG_CMND_ALL. -+ - parse.c, sudoers_lookup(): Set flag FLAG_CMND_ALL if cmnd_all matched. -+ - ldap.c: -+ + sudo_ldap_check_command(): Add return parameter all, set to true -+ if command specifier is 'ALL'. -+ + sudo_ldap_check(): Set flag FLAG_CMND_ALL if sudo_ldap_check_command() -+ returned all=1. -+ - env.c: -+ + Apply Martin Schulze's patch to switch from blacklist to whitelist -+ environment cleaning. -+ + Add parameter 'noclean' to rebuild_env(); if it is != 0, environment -+ variables are not cleaned. -+ - sudo.c: Call rebuild_env() with noclean=1 if FLAG_CMND_ALL is set. -+ -+ -- Martin Pitt Tue, 17 Jan 2006 10:03:05 +0100 -+ -+sudo (1.6.8p12-1) unstable; urgency=low -+ -+ * new upstream version, closes: #342948 (CVE-2005-4158) -+ * add env_reset to the sudoers file we create if none already exists, -+ as a further precaution in response to discussion about CVS-2005-4158 -+ * split ldap support into a new sudo-ldap package. I was trying to avoid -+ doing this, but the impact of going from 4 to 17 linked shlibs on the -+ autobuilder chroots is sufficient motivation for me. -+ closes: #344034 -+ -+ -- Bdale Garbee Wed, 28 Dec 2005 13:49:10 -0700 -+ -+sudo (1.6.8p9-4) unstable; urgency=low -+ -+ * enable ldap support, deliver README.LDAP and sudoers2ldif, closes: #283231 -+ * merge patch from Martin Pitt / Ubuntu to be more robust about resetting -+ timestamps in the init.d script, closes: #330868 -+ * add dependency header to init.d script, closes: #332849 -+ -+ -- Bdale Garbee Sat, 10 Dec 2005 07:47:07 -0800 -+ -+sudo (1.6.8p9-3ubuntu4) dapper; urgency=low -+ -+ * Revert addition of sudo -t, i. e. revert to version 1.6.8p9-3ubuntu1. As -+ per TB discussion, we will not use sudo for implementing -+ https://wiki.ubuntu.com/HideAdminToolsToUsers. -+ -+ -- Martin Pitt Tue, 29 Nov 2005 23:27:42 +0100 -+ -+sudo (1.6.8p9-3ubuntu3) dapper; urgency=low -+ -+ * sudo.c: Log failures even in test mode, to avoid the possibility of -+ silently poking around for interesting sudo privileges. This will generate -+ a lot of auth log clutter in the desktop case, but will not change sudo -+ semantics where it matters (on servers). -+ -+ -- Martin Pitt Thu, 17 Nov 2005 10:35:04 +0100 -+ -+sudo (1.6.8p9-3ubuntu2) dapper; urgency=low -+ -+ * Add option -t which only tests whether the given command can be executed -+ and does not require a password. This is required for the -+ https://wiki.ubuntu.com/HideAdminToolsToUsers spec. -+ * sudo.h: Add MODE_TESTONLY mode. -+ * sudo.c: Add -t parsing and do not actually run the command in test mode, -+ just return success or failure. Also, add the new option to the "usage" -+ output. -+ * sudo.pod: Document new -t option. -+ * Put patch into debian/ubuntu-patches/sudo.add-test-option.patch to have -+ it separate for future merges (requires a manual "make sudo.man.in" to -+ actually run pod2man). -+ -+ -- Martin Pitt Wed, 9 Nov 2005 17:40:43 -0500 -+ -+sudo (1.6.8p9-3ubuntu1) dapper; urgency=low -+ -+ * Resynchronise with Debian. -+ -+ -- Martin Pitt Wed, 9 Nov 2005 17:12:06 -0500 -+ -+sudo (1.6.8p9-3) unstable; urgency=high -+ -+ * update debhelper compatibility level from 2 to 4 -+ * add man page symlink for sudoedit -+ * Clean SHELLOPTS and PS4 from the environment before executing programs -+ with sudo permissions [env.c, CAN-2005-2959] -+ * fix typo in manpage pointed out by Moray Allen, closes: #285995 -+ * fix paths in sample complex sudoers file, closes: #303542 -+ * fix type in sudoers man page, closes: #311244 -+ -+ -- Bdale Garbee Wed, 28 Sep 2005 01:18:04 -0600 -+ -+sudo (1.6.8p9-2ubuntu2) breezy; urgency=low -+ -+ * debian/init.d: When resetting the timestamps of the tty tags, actually -+ touch the files, not the per-user directories. Since bootclean.sh removes -+ /var/run/* anyway, this is no big deal, but clean it up anyway for the -+ sake of correctness. (Ubuntu #16594) -+ -+ -- Martin Pitt Fri, 30 Sep 2005 09:52:27 +0200 -+ -+sudo (1.6.8p9-2ubuntu1) breezy; urgency=low -+ -+ * Resynchronise with Debian, resolve merging conflicts and unscramble -+ changelog. -+ -+ -- Martin Pitt Thu, 7 Jul 2005 09:01:48 +0000 -+ -+sudo (1.6.8p9-2) unstable; urgency=high -+ -+ * merge the NMU fix for sudoedit symlink problem that was in 1.6.8p7-1.1, -+ closes: #305735 -+ -+ -- Bdale Garbee Tue, 28 Jun 2005 16:18:47 -0400 -+ -+sudo (1.6.8p9-1) unstable; urgency=high -+ -+ * new upstream version, fixes a race condition in sudo's pathname -+ validation, which is a security issue (CAN-2005-1993), -+ closes: #315115, #315718 -+ -+ -- Bdale Garbee Tue, 28 Jun 2005 15:33:11 -0400 -+ -+sudo (1.6.8p7-1) unstable; urgency=low -+ -+ * new upstream version, closes: #299585 -+ * update lintian overrides to squelch the postinst warning -+ * change sudoedit from a hard to a soft link, closes: #296896 -+ * fix regex doc in sudoers man page, closes: #300361 -+ -+ -- Bdale Garbee Sat, 26 Mar 2005 22:18:34 -0700 -+ -+sudo (1.6.8p5-1ubuntu3) breezy; urgency=low -+ -+ * SECURITY UPDATE: Fix privilege escalation. -+ * sudo.c, parse.yacc: safe_cmd contains the actually executed program which -+ is normally taken from /etc/sudoers. However, if sudoers contains "ALL" -+ entries that follow the matching entry, safe_cmd was overwritten with the -+ path the user specified on the command line, which opens up the -+ possibility of executing arbitrary commands by generating symlinks to -+ them. -+ * References: -+ CAN-2005-1993 -+ http://www.securityfocus.com/archive/1/402741 -+ -+ -- Martin Pitt Tue, 21 Jun 2005 13:41:05 +0200 -+ -+sudo (1.6.8p5-1ubuntu2) hoary; urgency=low -+ -+ * Add !fqdn to the Defaults so we don't die horribly when localhost doesn't -+ resolve (Ubuntu: 2772) -+ -+ -- Thom May Wed, 2 Mar 2005 20:34:20 +0000 -+ -+sudo (1.6.8p5-1ubuntu1) hoary; urgency=low -+ -+ * Resync with Debian -+ -+ -- LaMont Jones Mon, 6 Dec 2004 09:31:28 -0700 -+ -+sudo (1.6.8p5-1) unstable; urgency=high -+ -+ * new upstream version -+ * restores ability to use config tuples without a value, which was causing -+ problems on upgrade closes: #283306 -+ * deliver sudoedit, closes: #283078 -+ * marking urgency high since 283306 is a serious upgrade incompatibility -+ -+ -- Bdale Garbee Fri, 3 Dec 2004 10:11:16 -0700 -+ -+sudo (1.6.8p3-2) unstable; urgency=high -+ -+ * update pam.d deliverable so ldap works again, closes: #282191 -+ -+ -- Bdale Garbee Mon, 22 Nov 2004 11:44:46 -0700 -+ -+sudo (1.6.8p3-1) unstable; urgency=high -+ -+ * new upstream version, fixes a flaw in sudo's environment sanitizing that -+ could allow a malicious user with permission to run a shell script that -+ utilized the bash shell to run arbitrary commands, closes: #281665 -+ * patch the sample sudoers to have the proper path for kill on Debian -+ systems, closes: #263486 -+ * patch the sudo manpage to reflect Debian's choice of exempt_group -+ default setting, closes: #236465 -+ * patch the sudo manpage to reflect Debian's choice of no timeout on the -+ password prompt, closes: #271194 -+ -+ -- Bdale Garbee Tue, 16 Nov 2004 23:23:41 -0700 -+ -+sudo (1.6.7p5-2ubuntu2) hoary; urgency=low -+ -+ * SECURITY UPDATE: fix input validation flaw -+ * env.c, rebuild_env(): skip variables with values beginnig with "()" to -+ ignore exported bash functions in the sudo environment; this prevents -+ introducing malicious functions with the name of commands that are -+ executed without full path -+ * References: -+ http://www.sudo.ws/sudo/alerts/bash_functions.html -+ -+ -- Martin Pitt Wed, 17 Nov 2004 18:54:30 +0100 -+ -+sudo (1.6.7p5-2ubuntu1) hoary; urgency=low -+ -+ * Resynchronise with Debian. -+ -+ -- Scott James Remnant Wed, 27 Oct 2004 15:06:39 +0100 -+ -+sudo (1.6.7p5-2) unstable; urgency=low -+ -+ * Jeff Bailey reports that seteuid works on current sparc systems, so we -+ no longer need the "grosshack" stuff in the sudo rules file -+ * add a postrm that removes /etc/sudoers on purge. don't do this with the -+ normal conffile mechanism since it would generate noise on every upgrade, -+ closes: #245405 -+ -+ -- Bdale Garbee Tue, 20 Jul 2004 12:29:48 -0400 -+ -+sudo (1.6.7p5-1ubuntu4) warty; urgency=low -+ -+ * Disable lecture by default. (Warty #987) -+ -+ -- Thom May Wed, 6 Oct 2004 14:31:31 +0100 -+ -+sudo (1.6.7p5-1ubuntu3) warty; urgency=low -+ -+ * Refuse to remove sudo if the root password is not set and the user is -+ running us via sudo -+ -+ -- Thom May Mon, 27 Sep 2004 15:30:09 +0100 -+ -+sudo (1.6.7p5-1ubuntu2) warty; urgency=low -+ -+ * Add 'Defaults !lecture,tty_tickets' to initial sudoers file. -+ -+ -- Colin Watson Mon, 23 Aug 2004 21:03:15 +0100 -+ -+sudo (1.6.7p5-1ubuntu1) warty; urgency=low -+ -+ * Remove /etc/sudoers on purge. (Closes: #245405) -+ -+ -- Fabio M. Di Nitto Mon, 19 Jul 2004 09:42:04 +0200 -+ -+sudo (1.6.7p5-1) unstable; urgency=low -+ -+ * new upstream version, closes: #190265, #193222, #197244 -+ * change from '.' to ':' in postinst chown call, closes: #208369 -+ -+ -- Bdale Garbee Tue, 2 Sep 2003 21:27:06 -0600 -+ -+sudo (1.6.7p3-2) unstable; urgency=low -+ -+ * add --disable-setresuid to configure call since 2.2 kernels don't support -+ setresgid, closes: #189044 -+ * cosmetic cleanups to debian/rules as long as I'm there -+ -+ -- Bdale Garbee Tue, 15 Apr 2003 16:04:48 -0600 -+ -+sudo (1.6.7p3-1) unstable; urgency=low -+ -+ * new upstream version -+ * add overrides to quiet lintian about things it doesn't understand, -+ except the source one that can't be overridden until 129510 is fixed -+ -+ -- Bdale Garbee Mon, 7 Apr 2003 17:34:05 -0600 -+ -+sudo (1.6.6-3) unstable; urgency=low -+ -+ * add code to rules file to update config.sub/guess, closes: #164501 -+ -+ -- Bdale Garbee Sat, 12 Oct 2002 15:35:22 -0600 -+ -+sudo (1.6.6-2) unstable; urgency=low -+ -+ * adopt suggestion from Marcus Brinkmann to feed --with-sendmail option to -+ configure, and lose the build dependency on mail-transport-agent -+ * incorporate changes from LaMont's NMU, closes: #144665, #144737 -+ * update init.d to not try and set time on nonexistent timestamp files, -+ closes: #132616 -+ * build with --with-all-insults, admin must edit sudoers to turn insults -+ on at runtime if desired, closes: #135374 -+ * stop setting /usr/doc symlink in postinst -+ -+ -- Bdale Garbee Sat, 12 Oct 2002 01:54:24 -0600 -+ -+sudo (1.6.6-1.1) unstable; urgency=high -+ -+ * NMU - patch from Colin Watson , in bts. -+ * Revert patch to auth/pam.c that left pass uninitialized, causing a -+ segfault (Closes: #144665). -+ -+ -- LaMont Jones Fri, 26 Apr 2002 22:36:04 -0600 -+ -+sudo (1.6.6-1) unstable; urgency=high -+ -+ * new upstream version, fixes security problem with crafty prompts, -+ closes: #144540 -+ -+ -- Bdale Garbee Thu, 25 Apr 2002 12:45:49 -0600 -+ -+sudo (1.6.5p1-4) unstable; urgency=high -+ -+ * apply patch for auth/pam.c to fix yet another way to make sudo segfault -+ if ctrl/C'ed at password prompt, closes: #131235 -+ -+ -- Bdale Garbee Sun, 3 Mar 2002 23:18:56 -0700 -+ -+sudo (1.6.5p1-3) unstable; urgency=high -+ -+ * ugly hack to add --disable-saved-ids when building on sparc in response -+ to 131592, which will be reassigned to glibc for a real fix -+ * urgency high since the sudo currently in testing for sparc is worthless -+ -+ -- Bdale Garbee Sun, 17 Feb 2002 22:42:10 -0700 -+ -+sudo (1.6.5p1-2) unstable; urgency=high -+ -+ * patch from upstream to fix seg faults caused by versions of pam that -+ follow a NULL pointer, closes: #129512 -+ -+ -- Bdale Garbee Tue, 22 Jan 2002 01:50:13 -0700 -+ -+sudo (1.6.5p1-1) unstable; urgency=high -+ -+ * new upstream version -+ * add --disable-root-mailer option supported by new version to configure -+ call in rules file, closes: #129648 -+ -+ -- Bdale Garbee Fri, 18 Jan 2002 11:29:37 -0700 -+ -+sudo (1.6.4p1-1) unstable; urgency=high -+ -+ * new upstream version, with fix for segfaulting problem in 1.6.4 -+ -+ -- Bdale Garbee Mon, 14 Jan 2002 20:09:46 -0700 -+ -+sudo (1.6.4-1) unstable; urgency=high -+ -+ * new upstream version, includes an important security fix, closes: #127576 -+ -+ -- Bdale Garbee Mon, 14 Jan 2002 09:35:48 -0700 -+ -+sudo (1.6.3p7-5) unstable; urgency=low -+ -+ * only touch /var/run/sudo/* if /var/run/sudo is there, closes: #126872 -+ * fix spelling error in init.d, closes: #126847 -+ -+ -- Bdale Garbee Sat, 29 Dec 2001 11:21:43 -0700 -+ -+sudo (1.6.3p7-4) unstable; urgency=medium -+ -+ * use touch to set status files to an ancient date instead of removing them -+ outright on reboot. this achieves the desired effect of keeping elevated -+ privs from living across reboots, without forcing everyone to see the -+ new-sudo-user lecture after every reboot. pick a time that's 'old enough' -+ for systems with good clocks, and 'recent enough' that broken PC hardware -+ setting the clock to commonly-seen bogus dates trips over the "don't trust -+ future timestamps" rule. closes: #76529, #123559 -+ * apply patch from Steve Langasek to fix seg faults due to interaction with -+ PAM code. upstream confirms the problem, and says they're fixing this -+ differently for their next release... but this should be useful in the -+ meantime, and would be good to get into woody. closes: #119147 -+ * only run the init.d at boot, not on each runlevel change... and don't run -+ it during package configure. closes: #125935 -+ * add DEB_BUILD_OPTIONS support to rules file, closes: #94952 -+ -+ -- Bdale Garbee Wed, 26 Dec 2001 12:40:44 -0700 -+ -+sudo (1.6.3p7-3) unstable; urgency=low -+ -+ * apply patch from Fumitoshi UKAI that fixes segfaults when hostname not -+ resolvable, closes: #86062, #69430, #77852, #82744, #55716, #56718, -+ * fix a typo in the manpage, closes: #97368 -+ * apply patch to configure.in and run autoconf to fix problem building on -+ the hurd, closes: #96325 -+ * add an init.d to clean out /var/run/sudo at boot, so privs are guaranteed -+ to not last across reboots, closes: #76529 -+ * clean up lintian-noticed cosmetic packaging issues -+ -+ -- Bdale Garbee Sat, 1 Dec 2001 02:59:52 -0700 -+ -+sudo (1.6.3p7-2) unstable; urgency=low -+ -+ * update config.sub/guess for hppa support -+ -+ -- Bdale Garbee Sun, 22 Apr 2001 23:23:42 -0600 -+ -+sudo (1.6.3p7-1) unstable; urgency=low -+ -+ * new upstream version -+ * add build dependency on mail-transport-agent, closes: #90685 -+ -+ -- Bdale Garbee Thu, 12 Apr 2001 17:02:42 -0600 -+ -+sudo (1.6.3p6-1) unstable; urgency=high -+ -+ * new upstream version, fixes buffer overflow problem, -+ closes: #87259, #87278, #87263 -+ * revert to using --with-secure-path option at build time, since the option -+ available in sudoers is parsed too late to be useful, and upstream says -+ it won't get fixed quickly. This reopens 85123, which I will mark as -+ forwarded. Closes: #86199, #86117, #85676 -+ -+ -- Bdale Garbee Mon, 26 Feb 2001 11:02:51 -0700 -+ -+sudo (1.6.3p5-2) unstable; urgency=low -+ -+ * lose the dh_suidregister call since it's obsolete -+ * stop using the --with-secure-path option at build time, and instead show -+ how to set it in sudoers. Closes: #85123 -+ * freshen config.sub and config.guess for ia64 and hppa -+ * update sudoers man page to indicate exempt_group is on by default, -+ closes: #70847 -+ -+ -- Bdale Garbee Sat, 10 Feb 2001 02:05:17 -0700 -+ -+sudo (1.6.3p5-1) unstable; urgency=low -+ -+ * new upstream version, closes: #63940, #59175, #61817, #64652, #65743 -+ * this version restores core dumps before the exec, while leaving them -+ disabled during sudo's internal execution, closes: #58289 -+ * update debhelper calls in rules file -+ -+ -- Bdale Garbee Wed, 16 Aug 2000 00:13:15 -0600 -+ -+sudo (1.6.2p2-1) frozen unstable; urgency=medium -+ -+ * new upstream source resulting from direct collaboration with the upstream -+ author to fix ugly pam-related problems on Debian in 1.6.1 and later. -+ Closes: #56129, #55978, #55979, #56550, #56772 -+ * include more upstream documentation, closes: #55054 -+ * pam.d fragment update, closes: #56129 -+ -+ -- Bdale Garbee Sun, 27 Feb 2000 11:48:48 -0700 -+ -+sudo (1.6.1-1) unstable; urgency=low -+ -+ * new upstream source, closes: #52750 -+ -+ -- Bdale Garbee Fri, 7 Jan 2000 21:01:42 -0700 -+ -+sudo (1.6-2) unstable; urgency=low -+ -+ * drop suidregister support for this package. The sudo executable is -+ essentially worthless unless it is setuid root, and making suidregister -+ work involves shipping a non-setuid executable in the .deb and setting the -+ perms in the postinst. On a long upgrade run, this can leave the sudo -+ executable 'broken' for a long time, which is unacceptable. With this -+ version, we ship the executable setuid root in the .deb. Closes: #51742 -+ -+ -- Bdale Garbee Wed, 1 Dec 1999 19:59:44 -0700 -+ -+sudo (1.6-1) unstable; urgency=low -+ -+ * new upstream version, many options previously set at compile-time are now -+ configurable at runtime. -+ Closes: #39255, #20996, #29812, #50705, #49148, #48435, #47190, #45639 -+ * FHS support -+ -+ -- Bdale Garbee Tue, 23 Nov 1999 16:51:22 -0700 -+ -+sudo (1.5.9p4-1) unstable; urgency=low -+ -+ * new upstream version, closes: #43464 -+ * empty password handling was fixed in 1.5.8, closes: #31863 -+ -+ -- Bdale Garbee Thu, 26 Aug 1999 00:00:57 -0600 -+ -+sudo (1.5.9p1-1) unstable; urgency=low -+ -+ * new upstream version -+ -+ -- Bdale Garbee Thu, 15 Apr 1999 22:43:29 -0600 -+ -+sudo (1.5.8p1-1) unstable; urgency=medium -+ -+ * new upstream version, closes 33690 -+ * add dependency on libpam-modules, closes 34215, 33432 -+ -+ -- Bdale Garbee Mon, 8 Mar 1999 10:27:42 -0700 -+ -+sudo (1.5.7p4-2) unstable; urgency=medium -+ -+ * update the pam fragment provided so that sudo works with latest pam bits, -+ closes 33432 -+ -+ -- Bdale Garbee Sun, 21 Feb 1999 00:22:44 -0700 -+ -+sudo (1.5.7p4-1) unstable; urgency=low -+ -+ * new upstream release -+ -+ -- Bdale Garbee Sun, 27 Dec 1998 16:13:53 -0700 -+ -+sudo (1.5.6p5-1) unstable; urgency=low -+ -+ * new upstream patch release -+ * add PAM support, closes 28594 -+ -+ -- Bdale Garbee Mon, 2 Nov 1998 00:00:24 -0700 -+ -+sudo (1.5.6p2-2) unstable; urgency=low -+ -+ * update copyright file, closes 24136 -+ * review and close forwarded bugs believed fixed in this upstream version, -+ closes 17606, 15786. -+ -+ -- Bdale Garbee Mon, 5 Oct 1998 22:30:43 -0600 -+ -+sudo (1.5.6p2-1) unstable; urgency=low -+ -+ * new upstream release -+ -+ -- Bdale Garbee Mon, 5 Oct 1998 22:30:43 -0600 -+ -+sudo (1.5.4-4) frozen unstable; urgency=low -+ -+ * update postinst to use groupadd, closes 21403 -+ * move the suidregister stuff earlier in postinst to ensure it always runs -+ -+ -- Bdale Garbee Sun, 19 Apr 1998 22:07:45 -0600 -+ -+sudo (1.5.4-3) frozen unstable; urgency=low -+ -+ * change /etc/sudoers from a conffile to being handled in postinst, -+ closes 18219 -+ * add suidmanager support, closes 15711 -+ * add '-Wno-comment' to quiet warnings from gcc upstream maintainer is -+ unlikely to ever fix, and which just don't matter. closes 17146 -+ * fix FSF address in copyright file, and submit exception for lintian -+ warning about sudo being setuid root -+ -+ -- Bdale Garbee Thu, 9 Apr 1998 23:59:11 -0600 -+ -+sudo (1.5.4-2) unstable; urgency=high -+ -+ * patch from upstream author correcting/improving security fix -+ -+ -- Bdale Garbee Tue, 13 Jan 1998 10:39:35 -0700 -+ -+sudo (1.5.4-1) unstable; urgency=high -+ -+ * new upstream version, includes a security fix -+ * change default editor from /bin/ae to /usr/bin/editor -+ -+ -- Bdale Garbee Mon, 12 Jan 1998 23:36:41 -0700 -+ -+sudo (1.5.3-1) unstable; urgency=medium -+ -+ * new upstream version, closes bug 15911. -+ * rules file reworked to use debhelper -+ * implement a really gross hack to force use of the sudo-provided -+ lsearch(), since the one in libc6 is broken! This closes bugs -+ 12552, 12557, 14881, 15259, 15916. -+ -+ -- Bdale Garbee Sat, 3 Jan 1998 20:39:23 -0700 -+ -+sudo (1.5.2-6) unstable; urgency=LOW -+ -+ * don't install INSTALL in the doc directory, closes bug 13195. -+ -+ -- Bdale Garbee Sun, 21 Sep 1997 17:10:40 -0600 -+ -+sudo (1.5.2-5) unstable; urgency=LOW -+ -+ * libc6 -+ -+ -- Bdale Garbee Fri, 5 Sep 1997 00:06:22 -0600 -+ -+sudo (1.5.2-4) unstable; urgency=LOW -+ -+ * change TIMEOUT (how long before you have to type your password again) -+ to 15 mins, disable PASSWORD_TIMEOUT. This makes building large Debian -+ packages on slower machines much more tolerable. Closes bug 9076. -+ * touch debian/suid before debstd. Closes bug 8709. -+ -+ -- Bdale Garbee Sat, 26 Apr 1997 00:48:01 -0600 -+ -+sudo (1.5.2-3) frozen unstable; urgency=LOW -+ -+ * patch from upstream maintainer to close Bug 6828 -+ * add a debian/suid file to get debstd to leave my perl postinst alone -+ -+ -- Bdale Garbee Fri, 11 Apr 1997 23:09:55 -0600 -+ -+sudo (1.5.2-2) frozen unstable; urgency=LOW -+ -+ * change rules to use -O2 -Wall as per standards -+ -+ -- Bdale Garbee Sun, 6 Apr 1997 12:48:53 -0600 -+ -+sudo (1.5.2-1) unstable; urgency=LOW -+ -+ * new upstream version -+ * cosmetic changes to debian package control files -+ -+ -- Bdale Garbee Wed, 30 Oct 1996 09:50:00 -0700 -+ -+sudo (1.5-2) unstable; urgency=LOW -+ -+ * add /usr/X11R6/bin to the end of the secure path... this makes it -+ much easier to run xmkmf, etc., during package builds. To the extent -+ that /usr/local/sbin and /usr/local/bin were already included, I see -+ no security reasons not to add this. -+ -+ -- Bdale Garbee Wed, 30 Oct 1996 09:44:58 -0700 -+ -+sudo (1.5-1) unstable; urgency=LOW -+ -+ * New upstream version -+ * New maintainer -+ * New packaging format -+ -+ -- Bdale Garbee Thu, 29 Aug 1996 11:44:22 +0200 -+ -+Tue Mar 5 09:36:41 MET 1996 Michael Meskes -+ -+ sudo (1.4.1-1): -+ -+ * hard code SECURE_PATH to: -+ "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" -+ -+ * enable ENV_EDITOR -+ -+ * enabled EXEMPTGROUP "sudo" -+ -+ * moved timestamp dir to /var/log/sudo -+ -+ * changed parser to check for long and short filenames (Bug#1162) -+ -+Wed Apr 17 13:03:31 MET DST 1996 Michael Meskes -+ -+ sudo (1.4.2-1): -+ -+ * New upstream source -+ -+ * Fixed postinst script -+ (thanks to Peter Tobis ) -+ -+ * Removed special shadow binary. This version works with and without -+ shadow password file. -+ -+Mon May 20 09:35:22 MET DST 1996 Michael Meskes -+ -+ sudo (1.4.2-2): -+ -+ * Corrected editor path to /bin/ae (Bug#3062) -+ -+ * Set file permission to 4755 for sudo and 755 for visudo (Bug#3063) -+ -+Mon Jun 17 12:06:41 MET DST 1996 Michael Meskes -+ -+ sudo (1.4.3-1): -+ -+ * New upstream version -+ -+ * Changed sudoers permission to 440 (owner root, group root) to make -+ sudo usable via NFS -+ -+Wed Jun 19 10:56:54 MET DST 1996 Michael Meskes -+ -+ sudo (1.4.3-2): -+ -+ * Applied upstream patch 1 -+ -+Thu Jun 20 09:02:57 MET DST 1996 Michael Meskes -+ -+ sudo (1.4.3-3): -+ -+ * Applied upstream patch 2 -+ -+Fri Jun 28 12:49:40 MET DST 1996 Michael Meskes -+ -+ sudo (1.4.3-4): -+ -+ * Applied upstream patch 3 (fixes problems with an NFS-mounted -+ sudoers file) -+ -+ -+Sun Jun 30 13:02:44 MET DST 1996 Michael Meskes -+ -+ sudo (1.4.3-5): -+ -+ * Corrected postinst to use /usr/bin/perl instead of /bin/perl -+ [Reported by jdassen@wi.leidenuniv.nl (J.H.M.Dassen)] -+ -+Wed Jul 10 12:44:33 MET DST 1996 Michael Meskes -+ -+ sudo (1.4.3-6): -+ -+ * Applied upstream patch 4 (fixes several bugs) -+ -+ * Changed priority to optional -+ -+Thu Jul 11 19:23:52 MET DST 1996 Michael Meskes -+ -+ sudo (1.4.3-7): -+ -+ * Corrected postinst to create correct permission for /etc/sudoers -+ (Bug#3749) -+ -+Fri Aug 2 10:50:53 MET DST 1996 Michael Meskes -+ -+ sudo (1.4.4-1): -+ -+ * New upstream version -+ -+ -+sudo (1.4.4-2) admin; urgency=HIGH -+ -+ * Fixed major security bug reported by Peter Tobias -+ -+ * Added dchanges support to debian.rules -+ -+sudo (1.4.5-1) admin; urgency=LOW -+ -+ * New upstream version -+ * Minor changes to debian.rules ---- sudo-1.6.8p12.orig/debian/sudo_root.8 -+++ sudo-1.6.8p12/debian/sudo_root.8 -@@ -0,0 +1,135 @@ -+.TH sudo_root 8 "February 8, 2006" -+ -+.SH NAME -+sudo_root \- How to run administrative commands -+ -+.SH SYNOPSIS -+ -+.B sudo -+.I command -+ -+.B sudo \-i -+ -+.SH INTRODUCTION -+ -+By default, the password for the user "root" (the system -+administrator) is locked. This means you cannot login as root or use -+su. Instead, the installer will set up sudo to allow the user that is -+created during install to run all administrative commands. -+ -+This means that in the terminal you can use sudo for commands that -+require root privileges. All programs in the menu will use a graphical -+sudo to prompt for a password. When sudo asks for a password, it needs -+.B your password, -+this means that a root password is not needed. -+ -+To run a command which requires root privileges in a terminal, simply -+prepend -+.B sudo -+in front of it. To get an interactive root shell, use -+.B sudo \-i\fR. -+ -+.SH ALLOWING OTHER USERS TO RUN SUDO -+ -+By default, only the user who installed the system is permitted to run -+sudo. To add more administrators, i. e. users who can run sudo, you -+have to add these users to the group 'admin' by doing one of the -+following steps: -+ -+.IP * 2 -+In a shell, do -+ -+.RS 4 -+.B sudo adduser -+.I username -+.B admin -+.RE -+ -+.IP * 2 -+Use the graphical "Users & Groups" program in the "System settings" -+menu to add the new user to the -+.B admin -+group. -+ -+.SH BENEFITS OF USING SUDO -+ -+The benefits of leaving root disabled by default include the following: -+ -+.IP * 2 -+Users do not have to remember an extra password, which they are likely to forget. -+.IP * 2 -+The installer is able to ask fewer questions. -+.IP * 2 -+It avoids the "I can do anything" interactive login by default \- you -+will be prompted for a password before major changes can happen, which -+should make you think about the consequences of what you are doing. -+.IP * 2 -+Sudo adds a log entry of the command(s) run (in \fB/var/log/auth.log\fR). -+.IP * 2 -+Every attacker trying to brute\-force their way into your box will -+know it has an account named root and will try that first. What they -+do not know is what the usernames of your other users are. -+.IP * 2 -+Allows easy transfer for admin rights, in a short term or long term -+period, by adding and removing users from the admin group, while not -+compromising the root account. -+.IP * 2 -+sudo can be set up with a much more fine\-grained security policy. -+ -+.SH DOWNSIDES OF USING SUDO -+ -+Although for desktops the benefits of using sudo are great, there are -+possible issues which need to be noted: -+ -+.IP * 2 -+Redirecting the output of commands run with sudo can be confusing at -+first. For instance consider -+ -+.RS 4 -+.B sudo ls > /root/somefile -+.RE -+ -+.RS 2 -+will not work since it is the shell that tries to write to that file. You can use -+.RE -+ -+.RS 4 -+.B ls | sudo tee /root/somefile -+.RE -+ -+.RS 2 -+to get the behaviour you want. -+.RE -+ -+.IP * 2 -+In a lot of office environments the ONLY local user on a system is -+root. All other users are imported using NSS techniques such as -+nss\-ldap. To setup a workstation, or fix it, in the case of a network -+failure where nss\-ldap is broken, root is required. This tends to -+leave the system unusable. An extra local user, or an enabled root -+password is needed here. -+ -+.SH GOING BACK TO A TRADITIONAL ROOT ACCOUNT -+ -+.B This is not recommended! -+ -+To enable the root account (i.e. set a password) use: -+ -+.RS 4 -+.B sudo passwd root -+.RE -+ -+Afterwards, edit -+.B /etc/sudoers -+and comment out the line -+ -+.RS 4 -+%admin ALL=(ALL) ALL -+.RE -+ -+to disable sudo access to members of the admin group. -+ -+.SH SEE ALSO -+.BR sudo (8), -+.B https://wiki.ubuntu.com/RootSudo -+ ---- sudo-1.6.8p12.orig/debian/sudo-ldap.postinst -+++ sudo-1.6.8p12/debian/sudo-ldap.postinst -@@ -0,0 +1,62 @@ -+#!/usr/bin/perl -+ -+# remove old link -+ -+unlink ("/etc/alternatives/sudo") if ( -l "/etc/alternatives/sudo"); -+ -+# make sure we have a sudoers file -+if ( ! -f "/etc/sudoers") { -+ -+ print "No /etc/sudoers found... creating one for you.\n"; -+ -+ open (SUDOERS, "> /etc/sudoers"); -+ print SUDOERS "# /etc/sudoers\n", -+ "#\n", -+ "# This file MUST be edited with the 'visudo' command as root.\n", -+ "#\n", -+ "# See the man page for details on how to write a sudoers file.\n", -+ "#\n\nDefaults\tenv_reset\n\n", -+ "# Host alias specification\n\n", -+ "# User alias specification\n\n", -+ "# Cmnd alias specification\n\n", -+ "# User privilege specification\nroot\tALL=(ALL) ALL\n"; -+ close SUDOERS; -+ -+} -+ -+# make sure sudoers has the correct permissions and owner/group -+system ('chown root:root /etc/sudoers'); -+system ('chmod 440 /etc/sudoers'); -+ -+# must do a remove first to un-do the "bad" links created by previous version -+system ('update-rc.d -f sudo remove >/dev/null 2>&1'); -+ -+#system ('update-rc.d sudo start 75 S . >/dev/null'); -+ -+# make sure we have a sudo group -+ -+exit 0 if getgrnam("sudo"); # we're finished if there is a group sudo -+ -+$gid = 27; # start searcg with gid 27 -+setgrent; -+while (getgrgid($gid)) { -+ ++$gid; -+} -+endgrent; -+ -+if ($gid != 27) { -+ print "On Debian we normally use gid 27 for 'sudo'.\n"; -+ $gname = getgrgid(27); -+ print "However, on your system gid 27 is group '$gname'.\n\n"; -+ print "Would you like me to stop configuring sudo so that you can change this? [n] "; -+ $ans = ; -+ if ($ans =~ m/^[yY].*/) { -+ print "'dpkg --pending --configure' will restart the configuration.\n\n\n"; -+ exit 1; -+ } -+} -+ -+print "Creating group 'sudo' with gid = $gid\n"; -+system("groupadd -g $gid sudo"); -+ -+print ""; ---- sudo-1.6.8p12.orig/debian/sudo.lintian -+++ sudo-1.6.8p12/debian/sudo.lintian -@@ -0,0 +1,3 @@ -+sudo: setuid-binary usr/bin/sudo 4755 root/root -+sudo: postrm-contains-additional-updaterc.d-calls /etc/init.d/sudo -+sudo: script-in-etc-init.d-not-registered-via-update-rc.d /etc/init.d/sudo ---- sudo-1.6.8p12.orig/debian/postinst -+++ sudo-1.6.8p12/debian/postinst -@@ -0,0 +1,62 @@ -+#!/usr/bin/perl -+ -+# remove old link -+ -+unlink ("/etc/alternatives/sudo") if ( -l "/etc/alternatives/sudo"); -+ -+# make sure we have a sudoers file -+if ( ! -f "/etc/sudoers") { -+ -+ print "No /etc/sudoers found... creating one for you.\n"; -+ -+ open (SUDOERS, "> /etc/sudoers"); -+ print SUDOERS "# /etc/sudoers\n", -+ "#\n", -+ "# This file MUST be edited with the 'visudo' command as root.\n", -+ "#\n", -+ "# See the man page for details on how to write a sudoers file.\n", -+ "# Host alias specification\n\n", -+ "# User alias specification\n\n", -+ "# Cmnd alias specification\n\n", -+ "# Defaults\n\nDefaults\t!lecture,tty_tickets,!fqdn\n\n", -+ "# User privilege specification\nroot\tALL=(ALL) ALL\n"; -+ close SUDOERS; -+ -+} -+ -+# make sure sudoers has the correct permissions and owner/group -+system ('chown root:root /etc/sudoers'); -+system ('chmod 440 /etc/sudoers'); -+ -+# must do a remove first to un-do the "bad" links created by previous version -+system ('update-rc.d -f sudo remove >/dev/null 2>&1'); -+ -+#system ('update-rc.d sudo start 75 S . >/dev/null'); -+ -+# make sure we have a sudo group -+ -+exit 0 if getgrnam("sudo"); # we're finished if there is a group sudo -+ -+$gid = 27; # start searcg with gid 27 -+setgrent; -+while (getgrgid($gid)) { -+ ++$gid; -+} -+endgrent; -+ -+if ($gid != 27) { -+ print "On Debian we normally use gid 27 for 'sudo'.\n"; -+ $gname = getgrgid(27); -+ print "However, on your system gid 27 is group '$gname'.\n\n"; -+ print "Would you like me to stop configuring sudo so that you can change this? [n] "; -+ $ans = ; -+ if ($ans =~ m/^[yY].*/) { -+ print "'dpkg --pending --configure' will restart the configuration.\n\n\n"; -+ exit 1; -+ } -+} -+ -+print "Creating group 'sudo' with gid = $gid\n"; -+system("groupadd -g $gid sudo"); -+ -+print ""; ---- sudo-1.6.8p12.orig/debian/compat -+++ sudo-1.6.8p12/debian/compat -@@ -0,0 +1 @@ -+4 ---- sudo-1.6.8p12.orig/debian/init.d -+++ sudo-1.6.8p12/debian/init.d -@@ -0,0 +1,31 @@ -+#! /bin/sh -+ -+### BEGIN INIT INFO -+# Provides: sudu -+# Required-Start: $local_fs $remote_fs -+# Required-Stop: -+# Default-Start: S 1 2 3 4 5 -+# Default-Stop: 0 6 -+### END INIT INFO -+ -+N=/etc/init.d/sudo -+ -+set -e -+ -+case "$1" in -+ start) -+ # make sure privileges don't persist across reboots -+ if [ -d /var/run/sudo ] -+ then -+ find /var/run/sudo -type f -exec touch -t 198501010000 '{}' \; -+ fi -+ ;; -+ stop|reload|restart|force-reload) -+ ;; -+ *) -+ echo "Usage: $N {start|stop|restart|force-reload}" >&2 -+ exit 1 -+ ;; -+esac -+ -+exit 0 ---- sudo-1.6.8p12.orig/debian/sudo-ldap.lintian -+++ sudo-1.6.8p12/debian/sudo-ldap.lintian -@@ -0,0 +1,3 @@ -+sudo-ldap: setuid-binary usr/bin/sudo 4755 root/root -+sudo-ldap: postrm-contains-additional-updaterc.d-calls /etc/init.d/sudo-ldap -+sudo-ldap: script-in-etc-init.d-not-registered-via-update-rc.d /etc/init.d/sudo-ldap ---- sudo-1.6.8p12.orig/debian/sudo-ldap.dirs -+++ sudo-1.6.8p12/debian/sudo-ldap.dirs -@@ -0,0 +1,7 @@ -+etc/pam.d -+usr/bin -+usr/share/man/man8 -+usr/share/man/man5 -+usr/sbin -+usr/share/doc/sudo-ldap/examples -+usr/share/lintian/overrides ---- sudo-1.6.8p12.orig/debian/sudo-ldap.docs -+++ sudo-1.6.8p12/debian/sudo-ldap.docs -@@ -0,0 +1,11 @@ -+debian/OPTIONS -+BUGS -+RUNSON -+UPGRADE -+PORTING -+TODO -+HISTORY -+README -+README.LDAP -+TROUBLESHOOTING -+sudoers2ldif ---- sudo-1.6.8p12.orig/debian/postrm -+++ sudo-1.6.8p12/debian/postrm -@@ -0,0 +1,21 @@ -+#! /bin/sh -+ -+set -e -+ -+case "$1" in -+ purge) -+ rm -f /etc/sudoers -+ ;; -+ -+ remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) -+ ;; -+ -+ *) -+ echo "postrm called with unknown argument \`$1'" >&2 -+ exit 1 -+ -+esac -+ -+#DEBHELPER# -+ -+exit 0 ---- sudo-1.6.8p12.orig/debian/OPTIONS -+++ sudo-1.6.8p12/debian/OPTIONS -@@ -0,0 +1,61 @@ -+The following options were used to configure sudo for Debian GNU/Linux. -+ -+ --with-exempt=sudo -+ -+ Any user in group 'sudo' will not need to type their password. It -+ is strongly recommended that no users be put in group sudo, and that -+ instead the NOPASSWD option in the sudoers file be used if desired. -+ -+ --with-pam -+ -+ Support for pluggable authentication modules. -+ -+ --with-ldap -+ -+ Support for LDAP authentication. -+ -+ --with-fqdn -+ -+ Allow use of fully qualified domain names in the sudoers file. -+ -+ --disable-root-mailer -+ -+ Send mail as the invoking user, not as root. -+ -+ --with-logging=syslog -+ --with-logfac=authpriv -+ -+ Where logging information goes. -+ -+ --with-env-editor -+ --with-editor=/usr/bin/editor -+ -+ Honor the EDITOR and VISUAL environment variables. If they are not -+ present, default to the Debian default system editor. -+ -+ --with-timeout=15 -+ --with-password-timeout=0 -+ -+ Allow 15 minutes before a user has to re-type their passord, versus -+ the sudo usual default of 5. Never time out while waiting for a -+ password to be typed, this is a seriously big deal for Debian package -+ developers using 'dpkg-buildpackage -rsudo'. -+ -+ --with-secure-path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:\ -+ /sbin:/bin:/usr/X11R6/bin" -+ -+ Give a reasonable default path for commands run as root via sudo. -+ -+ --with-all-insults -+ -+ Include all the insults in the binary, won't be enabled unless turned -+ on in the sudoers file. -+ -+ --with-sendmail=/usr/sbin/sendmail -+ -+ Use Debian policy to know the location of sendmail instead of trying -+ to detect it at build time. -+ -+ --disable-setresuid -+ -+ Linux 2.2 kernels don't support setresgid. ---- sudo-1.6.8p12.orig/debian/copyright -+++ sudo-1.6.8p12/debian/copyright -@@ -0,0 +1,72 @@ -+This is the Debian GNU/Linux prepackaged version of sudo. sudo is -+used to provide limited super user privileges to specific users. -+ -+This package was put together by Bdale Garbee using sources -+from -+ ftp://ftp.cs.colorado.edu/pub/sudo/ -+ -+Sudo is distributed under the following BSD-style license: -+ -+ Copyright (c) 1994-1996,1998-2002 Todd C. Miller -+ All rights reserved. -+ -+ Redistribution and use in source and binary forms, with or without -+ modification, are permitted provided that the following conditions -+ are met: -+ -+ 1. Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ -+ 2. Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ -+ 3. The name of the author may not be used to endorse or promote products -+ derived from this software without specific prior written permission -+ from the author. -+ -+ 4. Products derived from this software may not be called "Sudo" nor -+ may "Sudo" appear in their names without specific prior written -+ permission from the author. -+ -+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL -+ THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -+ OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -+ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+ -+Additionally, lsearch.c, fnmatch.c, getcwd.c, snprintf.c, strcasecmp.c -+and fnmatch.3 bear the following UCB license: -+ -+ Copyright (c) 1987, 1989, 1990, 1991, 1993, 1994 -+ The Regents of the University of California. All rights reserved. -+ -+ Redistribution and use in source and binary forms, with or without -+ modification, are permitted provided that the following conditions -+ are met: -+ 1. Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ 2. Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ 3. Neither the name of the University nor the names of its contributors -+ may be used to endorse or promote products derived from this software -+ without specific prior written permission. -+ -+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -+ ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -+ SUCH DAMAGE. ---- sudo-1.6.8p12.orig/debian/sudo.pam -+++ sudo-1.6.8p12/debian/sudo.pam -@@ -0,0 +1,4 @@ -+#%PAM-1.0 -+ -+@include common-auth -+@include common-account ---- sudo-1.6.8p12.orig/debian/source.lintian-overrides -+++ sudo-1.6.8p12/debian/source.lintian-overrides -@@ -0,0 +1 @@ -+sudo source: maintainer-script-lacks-debhelper-token debian/postinst ---- sudo-1.6.8p12.orig/sample.sudoers -+++ sudo-1.6.8p12/sample.sudoers -@@ -35,16 +35,16 @@ - # Cmnd alias specification - ## - Cmnd_Alias DUMPS = /usr/sbin/dump, /usr/sbin/rdump, /usr/sbin/restore, \ -- /usr/sbin/rrestore, /usr/bin/mt --Cmnd_Alias KILL = /usr/bin/kill -+ /usr/sbin/rrestore, /bin/mt -+Cmnd_Alias KILL = /bin/kill - Cmnd_Alias PRINTING = /usr/sbin/lpc, /usr/bin/lprm --Cmnd_Alias SHUTDOWN = /usr/sbin/shutdown --Cmnd_Alias HALT = /usr/sbin/halt --Cmnd_Alias REBOOT = /usr/sbin/reboot --Cmnd_Alias SHELLS = /sbin/sh, /usr/bin/sh, /usr/bin/csh, /usr/bin/ksh, \ -- /usr/local/bin/tcsh, /usr/bin/rsh, \ -- /usr/local/bin/zsh --Cmnd_Alias SU = /usr/bin/su -+Cmnd_Alias SHUTDOWN = /sbin/shutdown -+Cmnd_Alias HALT = /sbin/halt -+Cmnd_Alias REBOOT = /sbin/reboot -+Cmnd_Alias SHELLS = /sbin/sh, /bin/sh, /bin/csh, /usr/bin/ksh, \ -+ /usr/bin/tcsh, /usr/bin/rsh, \ -+ /usr/bin/zsh -+Cmnd_Alias SU = /bin/su - Cmnd_Alias VIPW = /usr/sbin/vipw, /usr/bin/passwd, /usr/bin/chsh, \ - /usr/bin/chfn - -@@ -82,7 +82,7 @@ - sudoedit /etc/printcap, /usr/oper/bin/ - - # joe may su only to operator --joe ALL = /usr/bin/su operator -+joe ALL = /bin/su operator - - # pete may change passwords for anyone but root on the hp snakes - pete HPPA = /usr/bin/passwd [A-z]*, !/usr/bin/passwd root -@@ -96,13 +96,13 @@ - - # users in the secretaries netgroup need to help manage the printers - # as well as add and remove users --+secretaries ALL = PRINTING, /usr/bin/adduser, /usr/bin/rmuser -++secretaries ALL = PRINTING, /usr/sbin/adduser, /usr/bin/rmuser - - # fred can run commands as oracle or sybase without a password - fred ALL = (DB) NOPASSWD: ALL - - # on the alphas, john may su to anyone but root and flags are not allowed --john ALPHA = /usr/bin/su [!-]*, !/usr/bin/su *root* -+john ALPHA = /bin/su [!-]*, !/bin/su *root* - - # jen can run anything on all machines except the ones - # in the "SERVERS" Host_Alias ---- sudo-1.6.8p12.orig/sudo.tab.c -+++ sudo-1.6.8p12/sudo.tab.c -@@ -138,6 +138,7 @@ - } \ - match[top].user = UNSPEC; \ - match[top].cmnd = UNSPEC; \ -+ match[top].cmndall= UNSPEC; \ - match[top].host = UNSPEC; \ - match[top].runas = UNSPEC; \ - match[top].nopass = def_authenticate ? UNSPEC : TRUE; \ -@@ -153,6 +154,7 @@ - } \ - match[top].user = match[top-1].user; \ - match[top].cmnd = match[top-1].cmnd; \ -+ match[top].cmndall= match[top-1].cmndall; \ - match[top].host = match[top-1].host; \ - match[top].runas = match[top-1].runas; \ - match[top].nopass = match[top-1].nopass; \ -@@ -1739,6 +1741,7 @@ - } - } - -+ SETMATCH(cmnd_all, TRUE); - yyval.BOOLEAN = TRUE; - } - break; -@@ -1769,6 +1772,7 @@ - YYERROR; - } - } -+ SETMATCH(cmnd_all, FALSE); - yyval.BOOLEAN = NOMATCH; - } - free(yyvsp[0].string); -@@ -1800,6 +1804,7 @@ - free(yyvsp[0].command.cmnd); - if (yyvsp[0].command.args) - free(yyvsp[0].command.args); -+ SETMATCH(cmnd_all, FALSE); - } - break; - case 65: ---- sudo-1.6.8p12.orig/ldap.c -+++ sudo-1.6.8p12/ldap.c -@@ -256,9 +256,10 @@ - * Walks through search result and returns true if we have a - * command match - */ --int sudo_ldap_check_command(ld,entry) -+int sudo_ldap_check_command(ld,entry,all) - LDAP *ld; - LDAPMessage *entry; -+ int* all; - { - char **v=NULL; - char **p=NULL; -@@ -267,6 +268,8 @@ - int ret=0; - int foundbang; - -+ *all=0; -+ - if (!entry) return ret; - - v=ldap_get_values(ld,entry,"sudoCommand"); -@@ -277,6 +280,7 @@ - - /* Match against ALL ? */ - if (!strcasecmp(*p,"ALL")) { -+ *all=1; - ret=1; - if (ldap_conf.debug>1) printf(" MATCH!\n"); - continue; -@@ -711,6 +715,7 @@ - /* flags */ - int ldap_user_matches=0; - int ldap_host_matches=0; -+ int command_all=0; - - if (!sudo_ldap_read_config()) return VALIDATE_ERROR; - -@@ -896,7 +901,7 @@ - /* add matches for listing later */ - sudo_ldap_add_match(ld,entry) && - /* verify command match */ -- sudo_ldap_check_command(ld,entry) && -+ sudo_ldap_check_command(ld,entry,&command_all) && - /* verify runas match */ - sudo_ldap_check_runas(ld,entry) - ) -@@ -907,6 +912,7 @@ - sudo_ldap_parse_options(ld,entry); - /* make sure we dont reenter loop */ - ret=VALIDATE_OK; -+ if(command_all) SET(ret,FLAG_CMND_ALL); - /* break from inside for loop */ - break; - } ---- sudo-1.6.8p12.orig/sudo.c -+++ sudo-1.6.8p12/sudo.c -@@ -106,10 +106,11 @@ - static void set_loginclass __P((struct passwd *)); - static void usage __P((int)); - static void usage_excl __P((int)); -+static void create_admin_success_flag __P((void)); - static struct passwd *get_authpw __P((void)); - extern int sudo_edit __P((int, char **)); - extern void list_matches __P((void)); --extern char **rebuild_env __P((char **, int, int)); -+extern char **rebuild_env __P((char **, int, int, int)); - extern char **zero_env __P((char **)); - extern struct passwd *sudo_getpwnam __P((const char *)); - extern struct passwd *sudo_getpwuid __P((uid_t)); -@@ -368,11 +369,15 @@ - - /* Build a new environment that avoids any nasty bits if we have a cmnd. */ - if (ISSET(sudo_mode, MODE_RUN)) -- new_environ = rebuild_env(envp, sudo_mode, ISSET(validated, FLAG_NOEXEC)); -+ new_environ = rebuild_env(envp, sudo_mode, ISSET(validated, FLAG_NOEXEC), ISSET(validated, FLAG_CMND_ALL)); - else - new_environ = envp; - - if (ISSET(validated, VALIDATE_OK)) { -+ /* If the user is in the admin group, create a dotfile to signal that -+ * sudo was executed successfully. */ -+ create_admin_success_flag(); -+ - /* Finally tell the user if the command did not exist. */ - if (cmnd_status == NOT_FOUND_DOT) { - warnx("ignoring `%s' found in '.'\nUse `sudo ./%s' if this is the `%s' you wish to run.", user_cmnd, user_cmnd, user_cmnd); -@@ -1156,3 +1161,46 @@ - putchar('\n'); - exit(exit_val); - } -+ -+static void create_admin_success_flag(void) -+{ -+ struct group* admin; -+ char** g; -+ int is_admin; -+ char flagfile[PATH_MAX]; -+ int f; -+ -+ if (!sudo_user.pw || !sudo_user.pw->pw_name || !sudo_user.pw->pw_dir) -+ return; -+ -+ /* check whether the user is in the admin group */ -+ admin = getgrnam("admin"); -+ if (!admin || !admin->gr_mem) -+ return; -+ is_admin = 0; -+ for (g = admin->gr_mem; *g; ++g) { -+ if (!strcmp(*g, sudo_user.pw->pw_name)) { -+ is_admin = 1; -+ break; -+ } -+ } -+ if (!is_admin) -+ return; -+ -+ /* build path to flag file */ -+ snprintf(flagfile, sizeof(flagfile), "%s/.sudo_as_admin_successful", -+ sudo_user.pw->pw_dir); -+ if (strlen(flagfile) >= sizeof(flagfile)-1) -+ return; -+ -+ /* do nothing if the file already exists */ -+ if (!access(flagfile, F_OK)) -+ return; -+ -+ /* create file */ -+ f = open(flagfile, O_CREAT|O_WRONLY|O_EXCL, 0644); -+ if(f >= 0) { -+ fchown(f, sudo_user.pw->pw_uid, sudo_user.pw->pw_gid); -+ close(f); -+ } -+} ---- sudo-1.6.8p12.orig/sudo.h -+++ sudo-1.6.8p12/sudo.h -@@ -65,6 +65,7 @@ - #define FLAG_NO_HOST 0x080 - #define FLAG_NO_CHECK 0x100 - #define FLAG_NOEXEC 0x200 -+#define FLAG_CMND_ALL 0x400 - - /* - * Pseudo-boolean values ---- sudo-1.6.8p12.orig/parse.c -+++ sudo-1.6.8p12/parse.c -@@ -200,7 +200,8 @@ - set_perms(PERM_ROOT); - return(VALIDATE_OK | - (no_passwd == TRUE ? FLAG_NOPASS : 0) | -- (no_execve == TRUE ? FLAG_NOEXEC : 0)); -+ (no_execve == TRUE ? FLAG_NOEXEC : 0) | -+ (cmnd_all == TRUE ? FLAG_CMND_ALL : 0)); - } else if ((runas_matches == TRUE && cmnd_matches == FALSE) || - (runas_matches == FALSE && cmnd_matches == TRUE)) { - /* ---- sudo-1.6.8p12.orig/parse.h -+++ sudo-1.6.8p12/parse.h -@@ -29,6 +29,7 @@ - struct matchstack { - int user; - int cmnd; -+ int cmndall; - int host; - int runas; - int nopass; -@@ -46,6 +47,7 @@ - - #define user_matches (match[top-1].user) - #define cmnd_matches (match[top-1].cmnd) -+#define cmnd_all (match[top-1].cmndall) - #define host_matches (match[top-1].host) - #define runas_matches (match[top-1].runas) - #define no_passwd (match[top-1].nopass) diff --git a/package/sudo/sudo-1.6.8p12-002-no-cxx-configcheck.patch b/package/sudo/sudo-1.6.8p12-002-no-cxx-configcheck.patch deleted file mode 100644 index 0a0b0a46ab..0000000000 --- a/package/sudo/sudo-1.6.8p12-002-no-cxx-configcheck.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -u sudo-1.6.8p12.orig/configure sudo-1.6.8p12/configure ---- sudo-1.6.8p12.orig/configure 2006-12-21 12:06:02.000000000 +0100 -+++ sudo-1.6.8p12/configure 2006-12-21 12:12:06.000000000 +0100 -@@ -6072,7 +6072,8 @@ - fi - - done -- -+if test -n "$CXX" -+then - ac_ext=cc - ac_cpp='$CXXCPP $CPPFLAGS' - ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -@@ -6654,7 +6655,7 @@ - ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' - ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -- -+fi - ac_ext=f - ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' - ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' diff --git a/package/sudo/sudo-1.6.8p12-003-cross-compile.patch b/package/sudo/sudo-1.6.8p12-003-cross-compile.patch deleted file mode 100644 index f8ba17338e..0000000000 --- a/package/sudo/sudo-1.6.8p12-003-cross-compile.patch +++ /dev/null @@ -1,10219 +0,0 @@ -diff -ur sudo-1.6.8p9/aclocal.m4 sudo-1.6.8p9-patched/aclocal.m4 ---- sudo-1.6.8p9/aclocal.m4 2004-09-07 12:14:51.000000000 -0500 -+++ sudo-1.6.8p9-patched/aclocal.m4 2006-05-26 13:05:14.000000000 -0500 -@@ -220,13 +220,13 @@ - AC_TRY_RUN([#include - main() { exit(fnmatch("/*/bin/echo *", "/usr/bin/echo just a test", FNM_CASEFOLD)); } - ], sudo_cv_func_fnmatch=yes, sudo_cv_func_fnmatch=no, -- sudo_cv_func_fnmatch=no) -+ sudo_cv_func_fnmatch=no,[true]) - rm -f core core.* *.core])dnl - AC_MSG_RESULT($sudo_cv_func_fnmatch) - if test $sudo_cv_func_fnmatch = yes; then -- [$1] -+ $1 - else -- [$2] -+ $2 - fi - ]) - -@@ -256,7 +256,7 @@ - s.sa_len = 0; - exit(0); - }], sudo_cv_sock_sa_len=yes, sudo_cv_sock_sa_len=no, -- sudo_cv_sock_sa_len=no) -+ sudo_cv_sock_sa_len=no,[true]) - rm -f core core.* *.core])dnl - AC_MSG_RESULT($sudo_cv_sock_sa_len) - if test $sudo_cv_sock_sa_len = yes; then -@@ -292,7 +292,7 @@ - (void) fprintf(f, "%d\n", strlen(b)); - (void) fclose(f); - exit(0); --}], sudo_cv_uid_t_len=`cat conftestdata`, sudo_cv_uid_t_len=10) -+}], sudo_cv_uid_t_len=`cat conftestdata`, sudo_cv_uid_t_len=10,[true]) - ]) - rm -f conftestdata - AC_MSG_RESULT($sudo_cv_uid_t_len) -@@ -305,7 +305,7 @@ - dnl - AC_DEFUN(SUDO_LONG_LONG, [AC_MSG_CHECKING(for long long support) - AC_TRY_LINK(, [long long foo = 1000; foo /= 10;], AC_DEFINE(HAVE_LONG_LONG, 1, [Define if your compiler supports the "long long" type.]) --[AC_TRY_RUN([main() {if (sizeof(long long) == sizeof(long)) exit(0); else exit(1);}], AC_DEFINE(LONG_IS_QUAD, 1, [Define if sizeof(long) == sizeof(long long).]))] -+[AC_TRY_RUN([main() {if (sizeof(long long) == sizeof(long)) exit(0); else exit(1);}], AC_DEFINE(LONG_IS_QUAD, 1, [Define if sizeof(long) == sizeof(long long).]),[true],[true])] - AC_MSG_RESULT(yes), AC_MSG_RESULT(no))]) - - dnl -diff -ur sudo-1.6.8p9/configure sudo-1.6.8p9-patched/configure ---- sudo-1.6.8p9/configure 2004-11-26 14:04:30.000000000 -0600 -+++ sudo-1.6.8p9-patched/configure 2006-05-26 13:05:14.000000000 -0500 -@@ -1,9 +1,8 @@ - #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. --# Generated by GNU Autoconf 2.57 for sudo 1.6.8. -+# Generated by GNU Autoconf 2.59 for sudo 1.6.8. - # --# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 --# Free Software Foundation, Inc. -+# Copyright (C) 2003 Free Software Foundation, Inc. - # This configure script is free software; the Free Software Foundation - # gives unlimited permission to copy, distribute and modify it. - ## --------------------- ## -@@ -20,9 +19,10 @@ - elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix - fi -+DUALCASE=1; export DUALCASE # for MKS sh - - # Support unset when possible. --if (FOO=FOO; unset FOO) >/dev/null 2>&1; then -+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset - else - as_unset=false -@@ -41,7 +41,7 @@ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME - do -- if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then -+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var -@@ -218,16 +218,17 @@ - if mkdir -p . 2>/dev/null; then - as_mkdir_p=: - else -+ test -d ./-p && rmdir ./-p - as_mkdir_p=false - fi - - as_executable_p="test -f" - - # Sed expression to map a string onto a valid CPP name. --as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" -+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - - # Sed expression to map a string onto a valid variable name. --as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" -+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - # IFS -@@ -560,7 +561,7 @@ - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac -- eval enable_$ac_feature='$ac_optarg' ;; -+ eval "enable_$ac_feature='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ -@@ -742,7 +743,7 @@ - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac -- eval with_$ac_package='$ac_optarg' ;; -+ eval "with_$ac_package='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` -@@ -816,7 +817,7 @@ - - # Be sure to have absolute paths. - for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ -- localstatedir libdir includedir oldincludedir infodir mandir -+ localstatedir libdir includedir oldincludedir infodir mandir - do - eval ac_val=$`echo $ac_var` - case $ac_val in -@@ -856,10 +857,10 @@ - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || - $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -- X"$0" : 'X\(//\)[^/]' \| \ -- X"$0" : 'X\(//\)$' \| \ -- X"$0" : 'X\(/\)' \| \ -- . : '\(.\)' 2>/dev/null || -+ X"$0" : 'X\(//\)[^/]' \| \ -+ X"$0" : 'X\(//\)$' \| \ -+ X"$0" : 'X\(/\)' \| \ -+ . : '\(.\)' 2>/dev/null || - echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } -@@ -971,9 +972,9 @@ - cat <<_ACEOF - Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX -- [$ac_default_prefix] -+ [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX -- [PREFIX] -+ [PREFIX] - - By default, \`make install' will install all the files in - \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -@@ -987,7 +988,7 @@ - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] -- --sysconfdir=DIR read-only single-machine data [/etc] -+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] -@@ -1167,12 +1168,45 @@ - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; - esac --# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be --# absolute. --ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` --ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` --ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` --ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` -+ -+# Do not use `cd foo && pwd` to compute absolute paths, because -+# the directories may not exist. -+case `pwd` in -+.) ac_abs_builddir="$ac_dir";; -+*) -+ case "$ac_dir" in -+ .) ac_abs_builddir=`pwd`;; -+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; -+ *) ac_abs_builddir=`pwd`/"$ac_dir";; -+ esac;; -+esac -+case $ac_abs_builddir in -+.) ac_abs_top_builddir=${ac_top_builddir}.;; -+*) -+ case ${ac_top_builddir}. in -+ .) ac_abs_top_builddir=$ac_abs_builddir;; -+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; -+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; -+ esac;; -+esac -+case $ac_abs_builddir in -+.) ac_abs_srcdir=$ac_srcdir;; -+*) -+ case $ac_srcdir in -+ .) ac_abs_srcdir=$ac_abs_builddir;; -+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; -+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; -+ esac;; -+esac -+case $ac_abs_builddir in -+.) ac_abs_top_srcdir=$ac_top_srcdir;; -+*) -+ case $ac_top_srcdir in -+ .) ac_abs_top_srcdir=$ac_abs_builddir;; -+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; -+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; -+ esac;; -+esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. -@@ -1183,13 +1217,13 @@ - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || -- test -f $ac_srcdir/configure.in; then -+ test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help - else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi -- cd $ac_popdir -+ cd "$ac_popdir" - done - fi - -@@ -1197,10 +1231,9 @@ - if $ac_init_version; then - cat <<\_ACEOF - sudo configure 1.6.8 --generated by GNU Autoconf 2.57 -+generated by GNU Autoconf 2.59 - --Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 --Free Software Foundation, Inc. -+Copyright (C) 2003 Free Software Foundation, Inc. - This configure script is free software; the Free Software Foundation - gives unlimited permission to copy, distribute and modify it. - _ACEOF -@@ -1212,7 +1245,7 @@ - running configure, to aid debugging if configure makes a mistake. - - It was created by sudo $as_me 1.6.8, which was --generated by GNU Autoconf 2.57. Invocation command line was -+generated by GNU Autoconf 2.59. Invocation command line was - - $ $0 $@ - -@@ -1289,21 +1322,21 @@ - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then -- ac_must_keep_next=false # Got value, back to normal. -+ ac_must_keep_next=false # Got value, back to normal. - else -- case $ac_arg in -- *=* | --config-cache | -C | -disable-* | --disable-* \ -- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ -- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ -- | -with-* | --with-* | -without-* | --without-* | --x) -- case "$ac_configure_args0 " in -- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; -- esac -- ;; -- -* ) ac_must_keep_next=true ;; -- esac -+ case $ac_arg in -+ *=* | --config-cache | -C | -disable-* | --disable-* \ -+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ -+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ -+ | -with-* | --with-* | -without-* | --without-* | --x) -+ case "$ac_configure_args0 " in -+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; -+ esac -+ ;; -+ -* ) ac_must_keep_next=true ;; -+ esac - fi -- ac_configure_args="$ac_configure_args$ac_sep\"$ac_arg\"" -+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " - ;; -@@ -1335,12 +1368,12 @@ - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) - sed -n \ -- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; -- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" -+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; -+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; - *) - sed -n \ -- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" -+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; - } -@@ -1369,7 +1402,7 @@ - for ac_var in $ac_subst_files - do - eval ac_val=$`echo $ac_var` -- echo "$ac_var='"'"'$ac_val'"'"'" -+ echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - fi -@@ -1388,7 +1421,7 @@ - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" - } >&5 -- rm -f core core.* *.core && -+ rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status - ' 0 -@@ -1468,7 +1501,7 @@ - # value. - ac_cache_corrupted=false - for ac_var in `(set) 2>&1 | -- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do -+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" -@@ -1485,13 +1518,13 @@ - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then -- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 - echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} -- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 - echo "$as_me: former value: $ac_old_val" >&2;} -- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 - echo "$as_me: current value: $ac_new_val" >&2;} -- ac_cache_corrupted=: -+ ac_cache_corrupted=: - fi;; - esac - # Pass precious variables to config.status. -@@ -3866,7 +3899,6 @@ - (exit $ac_status); } - - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -3886,8 +3918,8 @@ - # Try to create an executable without -o first, disregard a.out. - # It will help us diagnose broken compilers, and finding out an intuition - # of exeext. --echo "$as_me:$LINENO: checking for C compiler default output" >&5 --echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 -+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 - ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 -@@ -3907,23 +3939,23 @@ - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) -- ;; -+ ;; - conftest.$ac_ext ) -- # This is the source file. -- ;; -+ # This is the source file. -+ ;; - [ab].out ) -- # We found the default executable, but exeext='' is most -- # certainly right. -- break;; -+ # We found the default executable, but exeext='' is most -+ # certainly right. -+ break;; - *.* ) -- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` -- # FIXME: I believe we export ac_cv_exeext for Libtool, -- # but it would be cool to find out if it's true. Does anybody -- # maintain Libtool? --akim. -- export ac_cv_exeext -- break;; -+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` -+ # FIXME: I believe we export ac_cv_exeext for Libtool, -+ # but it would be cool to find out if it's true. Does anybody -+ # maintain Libtool? --akim. -+ export ac_cv_exeext -+ break;; - * ) -- break;; -+ break;; - esac - done - else -@@ -3997,8 +4029,8 @@ - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` -- export ac_cv_exeext -- break;; -+ export ac_cv_exeext -+ break;; - * ) break;; - esac - done -@@ -4023,7 +4055,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4074,7 +4105,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4094,11 +4124,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4111,7 +4150,7 @@ - - ac_compiler_gnu=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_c_compiler_gnu=$ac_compiler_gnu - - fi -@@ -4127,7 +4166,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4144,11 +4182,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4161,7 +4208,7 @@ - - ac_cv_prog_cc_g=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 - echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 -@@ -4188,7 +4235,6 @@ - ac_cv_prog_cc_stdc=no - ac_save_CC=$CC - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4216,6 +4262,16 @@ - va_end (v); - return s; - } -+ -+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has -+ function prototypes and stuff, but not '\xHH' hex character constants. -+ These don't provoke an error unfortunately, instead are silently treated -+ as 'x'. The following induces an error, until -std1 is added to get -+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an -+ array size at least. It's necessary to write '\x00'==0 to get something -+ that's true only with -std1. */ -+int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -+ - int test (int i, double x); - struct s1 {int (*f) (int a);}; - struct s2 {int (*f) (double a);}; -@@ -4242,11 +4298,20 @@ - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4259,7 +4324,7 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f conftest.$ac_objext -+rm -f conftest.err conftest.$ac_objext - done - rm -f conftest.$ac_ext conftest.$ac_objext - CC=$ac_save_CC -@@ -4287,19 +4352,27 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ -- ''\ -- '#include ' \ -+ '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ -@@ -4307,14 +4380,13 @@ - 'void exit (int);' - do - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ --#include - $ac_declaration -+#include - int - main () - { -@@ -4325,11 +4397,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4342,9 +4423,8 @@ - - continue - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4361,11 +4441,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4377,7 +4466,7 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done - rm -f conftest* - if test -n "$ac_declaration"; then -@@ -4391,7 +4480,7 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=c - ac_cpp='$CPP $CPPFLAGS' - ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -@@ -4407,7 +4496,6 @@ - ac_func_search_save_LIBS=$LIBS - ac_cv_search_strerror=no - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4431,11 +4519,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4447,12 +4544,12 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - if test "$ac_cv_search_strerror" = no; then - for ac_lib in cposix; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4476,11 +4573,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4493,7 +4599,8 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - done - fi - LIBS=$ac_func_search_save_LIBS -@@ -4534,7 +4641,6 @@ - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4545,7 +4651,7 @@ - #else - # include - #endif -- Syntax error -+ Syntax error - _ACEOF - if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -@@ -4557,6 +4663,7 @@ - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -@@ -4577,7 +4684,6 @@ - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4595,6 +4701,7 @@ - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -@@ -4641,7 +4748,6 @@ - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4652,7 +4758,7 @@ - #else - # include - #endif -- Syntax error -+ Syntax error - _ACEOF - if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -@@ -4664,6 +4770,7 @@ - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -@@ -4684,7 +4791,6 @@ - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4702,6 +4808,7 @@ - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -@@ -5419,7 +5526,7 @@ - ;; - *-*-irix6*) - # Find out which ABI we are using. -- echo '#line 5422 "configure"' > conftest.$ac_ext -+ echo '#line 5529 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -@@ -5516,7 +5623,6 @@ - ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -5533,11 +5639,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -5550,7 +5665,8 @@ - - lt_cv_cc_needs_belf=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - ac_ext=c - ac_cpp='$CPP $CPPFLAGS' - ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -@@ -5578,7 +5694,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -5599,11 +5714,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -5616,12 +5740,11 @@ - - ac_cv_header_stdc=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - - if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -5643,7 +5766,6 @@ - if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -5668,7 +5790,6 @@ - : - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -5680,9 +5801,9 @@ - # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) - #else - # define ISLOWER(c) \ -- (('a' <= (c) && (c) <= 'i') \ -- || ('j' <= (c) && (c) <= 'r') \ -- || ('s' <= (c) && (c) <= 'z')) -+ (('a' <= (c) && (c) <= 'i') \ -+ || ('j' <= (c) && (c) <= 'r') \ -+ || ('s' <= (c) && (c) <= 'z')) - # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) - #endif - -@@ -5693,7 +5814,7 @@ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) -- || toupper (i) != TOUPPER (i)) -+ || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); - } -@@ -5718,7 +5839,7 @@ - ( exit $ac_status ) - ac_cv_header_stdc=no - fi --rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - fi - fi -@@ -5743,7 +5864,7 @@ - - - for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ -- inttypes.h stdint.h unistd.h -+ inttypes.h stdint.h unistd.h - do - as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_header" >&5 -@@ -5752,7 +5873,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -5764,11 +5884,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -5781,7 +5910,7 @@ - - eval "$as_ac_Header=no" - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -@@ -5812,7 +5941,6 @@ - echo "$as_me:$LINENO: checking $ac_header usability" >&5 - echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -5823,11 +5951,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -5840,7 +5977,7 @@ - - ac_header_compiler=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 - echo "${ECHO_T}$ac_header_compiler" >&6 - -@@ -5848,7 +5985,6 @@ - echo "$as_me:$LINENO: checking $ac_header presence" >&5 - echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -5866,6 +6002,7 @@ - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -@@ -5885,33 +6022,32 @@ - echo "${ECHO_T}$ac_header_preproc" >&6 - - # So? What about this header? --case $ac_header_compiler:$ac_header_preproc in -- yes:no ) -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 - echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -- ( -- cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## --_ASBOX -- ) | -- sed "s/^/$as_me: WARNING: /" >&2 -+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes - ;; -- no:yes ) -+ no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 - echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 - echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## -+## ------------------------------- ## -+## Report this to the sudo lists. ## -+## ------------------------------- ## - _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 -@@ -5922,7 +6058,7 @@ - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -- eval "$as_ac_Header=$ac_header_preproc" -+ eval "$as_ac_Header=\$ac_header_preproc" - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -@@ -6056,7 +6192,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6076,11 +6211,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -6093,7 +6237,7 @@ - - ac_compiler_gnu=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - - fi -@@ -6109,7 +6253,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6126,11 +6269,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -6143,7 +6295,7 @@ - - ac_cv_prog_cxx_g=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 - echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 -@@ -6163,8 +6315,7 @@ - fi - fi - for ac_declaration in \ -- ''\ -- '#include ' \ -+ '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ -@@ -6172,14 +6323,13 @@ - 'void exit (int);' - do - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ --#include - $ac_declaration -+#include - int - main () - { -@@ -6190,11 +6340,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -6207,9 +6366,8 @@ - - continue - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6226,11 +6384,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -6242,7 +6409,7 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done - rm -f conftest* - if test -n "$ac_declaration"; then -@@ -6281,7 +6448,6 @@ - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6292,7 +6458,7 @@ - #else - # include - #endif -- Syntax error -+ Syntax error - _ACEOF - if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -@@ -6304,6 +6470,7 @@ - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -@@ -6324,7 +6491,6 @@ - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6342,6 +6508,7 @@ - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -@@ -6388,7 +6555,6 @@ - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6399,7 +6565,7 @@ - #else - # include - #endif -- Syntax error -+ Syntax error - _ACEOF - if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -@@ -6411,6 +6577,7 @@ - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -@@ -6431,7 +6598,6 @@ - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6449,6 +6615,7 @@ - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -@@ -6493,7 +6660,7 @@ - ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' - ac_compiler_gnu=$ac_cv_f77_compiler_gnu - if test -n "$ac_tool_prefix"; then -- for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 -+ for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. - set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -@@ -6535,7 +6702,7 @@ - fi - if test -z "$F77"; then - ac_ct_F77=$F77 -- for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 -+ for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran - do - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 -@@ -6580,7 +6747,7 @@ - - - # Provide some information about the compiler. --echo "$as_me:6583:" \ -+echo "$as_me:6750:" \ - "checking for Fortran 77 compiler version" >&5 - ac_compiler=`set X $ac_compile; echo $2` - { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 -@@ -6598,9 +6765,10 @@ - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -+rm -f a.out - - # If we don't use `.F' as extension, the preprocessor is not run on the --# input file. -+# input file. (Note that this only needs to work for GNU compilers.) - ac_save_ext=$ac_ext - ac_ext=F - echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 -@@ -6618,11 +6786,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -6635,14 +6812,13 @@ - - ac_compiler_gnu=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_f77_compiler_gnu=$ac_compiler_gnu - - fi - echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 - echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 - ac_ext=$ac_save_ext --G77=`test $ac_compiler_gnu = yes && echo yes` - ac_test_FFLAGS=${FFLAGS+set} - ac_save_FFLAGS=$FFLAGS - FFLAGS= -@@ -6659,11 +6835,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -6676,7 +6861,7 @@ - - ac_cv_prog_f77_g=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - - fi - echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 -@@ -6684,18 +6869,20 @@ - if test "$ac_test_FFLAGS" = set; then - FFLAGS=$ac_save_FFLAGS - elif test $ac_cv_prog_f77_g = yes; then -- if test "$G77" = yes; then -+ if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-g -O2" - else - FFLAGS="-g" - fi - else -- if test "$G77" = yes; then -+ if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-O2" - else - FFLAGS= - fi - fi -+ -+G77=`test $ac_compiler_gnu = yes && echo yes` - ac_ext=c - ac_cpp='$CPP $CPPFLAGS' - ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -@@ -7589,11 +7776,11 @@ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:7592: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:7779: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:7596: \$? = $ac_status" >&5 -+ echo "$as_me:7783: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings -@@ -7821,11 +8008,11 @@ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:7824: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:8011: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:7828: \$? = $ac_status" >&5 -+ echo "$as_me:8015: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings -@@ -7888,11 +8075,11 @@ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:7891: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:8078: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:7895: \$? = $ac_status" >&5 -+ echo "$as_me:8082: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -8228,7 +8415,6 @@ - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -8245,11 +8431,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -8266,7 +8461,8 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" -@@ -8279,7 +8475,6 @@ - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -8296,11 +8491,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -8317,7 +8521,8 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" -@@ -9384,7 +9589,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-ldl $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -9408,11 +9612,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -9425,7 +9638,8 @@ - - ac_cv_lib_dl_dlopen=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -@@ -9449,21 +9663,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define shl_load to an innocuous variant, in case declares shl_load. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define shl_load innocuous_shl_load -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef shl_load -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -9494,11 +9715,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -9511,7 +9741,8 @@ - - ac_cv_func_shl_load=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 - echo "${ECHO_T}$ac_cv_func_shl_load" >&6 -@@ -9526,7 +9757,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-ldld $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -9550,11 +9780,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -9567,7 +9806,8 @@ - - ac_cv_lib_dld_shl_load=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -@@ -9581,21 +9821,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define dlopen to an innocuous variant, in case declares dlopen. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define dlopen innocuous_dlopen -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef dlopen -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -9626,11 +9873,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -9643,7 +9899,8 @@ - - ac_cv_func_dlopen=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 - echo "${ECHO_T}$ac_cv_func_dlopen" >&6 -@@ -9658,7 +9915,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-ldl $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -9682,11 +9938,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -9699,7 +9964,8 @@ - - ac_cv_lib_dl_dlopen=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -@@ -9715,7 +9981,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lsvld $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -9739,11 +10004,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -9756,7 +10030,8 @@ - - ac_cv_lib_svld_dlopen=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -@@ -9772,7 +10047,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-ldld $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -9796,11 +10070,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -9813,7 +10096,8 @@ - - ac_cv_lib_dld_dld_link=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -@@ -9868,7 +10152,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < conftest.$ac_ext <conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -11019,11 +11302,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -11040,7 +11332,8 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" -@@ -11054,7 +11347,6 @@ - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -11071,11 +11363,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -11092,7 +11393,8 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" -@@ -12102,11 +12404,11 @@ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:12105: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:12407: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:12109: \$? = $ac_status" >&5 -+ echo "$as_me:12411: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings -@@ -12169,11 +12471,11 @@ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:12172: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:12474: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:12176: \$? = $ac_status" >&5 -+ echo "$as_me:12478: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -12889,7 +13191,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-ldl $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -12913,11 +13214,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -12930,7 +13240,8 @@ - - ac_cv_lib_dl_dlopen=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -@@ -12954,21 +13265,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define shl_load to an innocuous variant, in case declares shl_load. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define shl_load innocuous_shl_load -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef shl_load -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -12999,11 +13317,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -13016,7 +13343,8 @@ - - ac_cv_func_shl_load=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 - echo "${ECHO_T}$ac_cv_func_shl_load" >&6 -@@ -13031,7 +13359,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-ldld $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -13055,11 +13382,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -13072,7 +13408,8 @@ - - ac_cv_lib_dld_shl_load=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -@@ -13086,21 +13423,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define dlopen to an innocuous variant, in case declares dlopen. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define dlopen innocuous_dlopen -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef dlopen -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -13131,11 +13475,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -13148,7 +13501,8 @@ - - ac_cv_func_dlopen=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 - echo "${ECHO_T}$ac_cv_func_dlopen" >&6 -@@ -13163,7 +13517,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-ldl $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -13187,11 +13540,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -13204,7 +13566,8 @@ - - ac_cv_lib_dl_dlopen=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -@@ -13220,7 +13583,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lsvld $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -13244,11 +13606,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -13261,7 +13632,8 @@ - - ac_cv_lib_svld_dlopen=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -@@ -13277,7 +13649,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-ldld $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -13301,11 +13672,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -13318,7 +13698,8 @@ - - ac_cv_lib_dld_dld_link=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -@@ -13373,7 +13754,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < conftest.$ac_ext <&5) -+ (eval echo "\"\$as_me:14677: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:14300: \$? = $ac_status" >&5 -+ echo "$as_me:14681: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings -@@ -14360,11 +14741,11 @@ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:14363: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:14744: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:14367: \$? = $ac_status" >&5 -+ echo "$as_me:14748: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -14706,11 +15087,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -14727,7 +15117,8 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" -@@ -14746,11 +15137,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -14767,7 +15167,8 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" -@@ -16272,11 +16673,11 @@ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:16275: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:16676: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:16279: \$? = $ac_status" >&5 -+ echo "$as_me:16680: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings -@@ -16504,11 +16905,11 @@ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:16507: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:16908: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:16511: \$? = $ac_status" >&5 -+ echo "$as_me:16912: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings -@@ -16571,11 +16972,11 @@ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:16574: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:16975: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:16578: \$? = $ac_status" >&5 -+ echo "$as_me:16979: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -16911,7 +17312,6 @@ - allow_undefined_flag_GCJ='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -16928,11 +17328,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -16949,7 +17358,8 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" -@@ -16962,7 +17372,6 @@ - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -16979,11 +17388,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -17000,7 +17418,8 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" -@@ -18067,7 +18486,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-ldl $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -18091,11 +18509,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -18108,7 +18535,8 @@ - - ac_cv_lib_dl_dlopen=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -@@ -18132,21 +18560,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define shl_load to an innocuous variant, in case declares shl_load. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define shl_load innocuous_shl_load -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef shl_load -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -18177,11 +18612,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -18194,7 +18638,8 @@ - - ac_cv_func_shl_load=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 - echo "${ECHO_T}$ac_cv_func_shl_load" >&6 -@@ -18209,7 +18654,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-ldld $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -18233,11 +18677,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -18250,7 +18703,8 @@ - - ac_cv_lib_dld_shl_load=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -@@ -18264,21 +18718,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define dlopen to an innocuous variant, in case declares dlopen. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define dlopen innocuous_dlopen -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef dlopen -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -18309,11 +18770,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -18326,7 +18796,8 @@ - - ac_cv_func_dlopen=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 - echo "${ECHO_T}$ac_cv_func_dlopen" >&6 -@@ -18341,7 +18812,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-ldl $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -18365,11 +18835,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -18382,7 +18861,8 @@ - - ac_cv_lib_dl_dlopen=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -@@ -18398,7 +18878,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lsvld $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -18422,11 +18901,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -18439,7 +18927,8 @@ - - ac_cv_lib_svld_dlopen=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -@@ -18455,7 +18944,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-ldld $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -18479,11 +18967,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -18496,7 +18993,8 @@ - - ac_cv_lib_dld_dld_link=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -@@ -18551,7 +19049,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < conftest.$ac_ext <&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -19879,11 +20384,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -19896,7 +20410,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -19938,7 +20453,6 @@ - O_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -Wl,-blibpath:/usr/lib:/lib" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -19955,11 +20469,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -19983,7 +20506,8 @@ - echo "$as_me:$LINENO: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - LDFLAGS="$O_LDFLAGS" - ;; -@@ -19997,7 +20521,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lsec $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -20021,11 +20544,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -20038,7 +20570,8 @@ - - ac_cv_lib_sec_getprpwnam=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getprpwnam" >&5 -@@ -20057,7 +20590,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lsecurity $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -20081,11 +20613,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -20098,7 +20639,8 @@ - - ac_cv_lib_security_getprpwnam=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5 -@@ -20156,21 +20698,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -20201,11 +20750,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -20218,7 +20776,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -20251,7 +20810,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lsec $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -20275,11 +20833,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -20292,7 +20859,8 @@ - - ac_cv_lib_sec_getprpwnam=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getprpwnam" >&5 -@@ -20309,7 +20877,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lsec $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -20333,11 +20900,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -20350,7 +20926,8 @@ - - ac_cv_lib_sec_iscomsec=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_sec_iscomsec" >&5 -@@ -20377,7 +20954,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lsec $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -20401,11 +20977,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -20418,7 +21003,8 @@ - - ac_cv_lib_sec_getspnam=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getspnam" >&5 -@@ -20473,21 +21059,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define sia_ses_init to an innocuous variant, in case declares sia_ses_init. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define sia_ses_init innocuous_sia_ses_init -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char sia_ses_init (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef sia_ses_init -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -20518,11 +21111,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -20535,7 +21137,8 @@ - - ac_cv_func_sia_ses_init=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_func_sia_ses_init" >&5 - echo "${ECHO_T}$ac_cv_func_sia_ses_init" >&6 -@@ -20561,7 +21164,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lsecurity $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -20585,11 +21187,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -20602,7 +21213,8 @@ - - ac_cv_lib_security_getprpwnam=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5 -@@ -20630,21 +21242,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -20675,11 +21294,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -20692,7 +21320,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -20716,21 +21345,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -20761,11 +21397,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -20778,7 +21423,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -20801,7 +21447,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-ldb $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -20825,11 +21470,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -20842,7 +21496,8 @@ - - ac_cv_lib_db_dbopen=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_db_dbopen" >&5 -@@ -20863,21 +21518,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -20908,11 +21570,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -20925,7 +21596,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -20940,7 +21612,6 @@ - echo "$as_me:$LINENO: checking for broken /usr/include/prot.h" >&5 - echo $ECHO_N "checking for broken /usr/include/prot.h... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -20961,11 +21632,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -20982,7 +21662,7 @@ - sed 's:::g' < /usr/include/prot.h > prot.h - - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - elif test "$CHECKSIA" = "true"; then - with_passwd=no - AUTH_OBJS="sia.o" -@@ -21020,7 +21700,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lsun $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -21044,11 +21723,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -21061,7 +21749,8 @@ - - ac_cv_lib_sun_getpwnam=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_sun_getpwnam" >&5 -@@ -21087,21 +21776,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -21132,11 +21828,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -21149,7 +21854,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -21167,7 +21873,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lshadow $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -21191,11 +21896,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -21208,7 +21922,8 @@ - - ac_cv_lib_shadow_getspnam=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_shadow_getspnam" >&5 -@@ -21244,7 +21959,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lsec $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -21268,11 +21982,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -21285,7 +22008,8 @@ - - ac_cv_lib_sec_getprpwnam=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getprpwnam" >&5 -@@ -21311,7 +22035,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lauth $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -21335,11 +22058,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -21352,7 +22084,8 @@ - - ac_cv_lib_auth_getauthuid=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_auth_getauthuid" >&5 -@@ -21389,7 +22122,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lsec $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -21413,11 +22145,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -21430,7 +22171,8 @@ - - ac_cv_lib_sec_getspnam=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getspnam" >&5 -@@ -21451,13 +22193,12 @@ - if test "$CHECKSHADOW" = "true"; then - echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5 - echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6 --if test "${ac_cv_lib_prot_getprpwnam_lx+set}" = set; then -+if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS - LIBS="-lprot -lx $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -21481,29 +22222,39 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- ac_cv_lib_prot_getprpwnam_lx=yes -+ ac_cv_lib_prot_getprpwnam=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --ac_cv_lib_prot_getprpwnam_lx=no -+ac_cv_lib_prot_getprpwnam=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam_lx" >&5 --echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam_lx" >&6 --if test $ac_cv_lib_prot_getprpwnam_lx = yes; then -+echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5 -+echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6 -+if test $ac_cv_lib_prot_getprpwnam = yes; then - cat >>confdefs.h <<\_ACEOF - #define HAVE_GETPRPWNAM 1 - _ACEOF -@@ -21518,7 +22269,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lgen $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -21542,11 +22292,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -21559,7 +22318,8 @@ - - ac_cv_lib_gen_getspnam=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5 -@@ -21592,7 +22352,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lsec $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -21616,11 +22375,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -21633,7 +22401,8 @@ - - ac_cv_lib_sec_getspnam=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getspnam" >&5 -@@ -21660,7 +22429,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lc89 $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -21684,11 +22452,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -21701,7 +22478,8 @@ - - ac_cv_lib_c89_strcasecmp=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_c89_strcasecmp" >&5 -@@ -21839,21 +22617,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -21884,11 +22669,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -21901,7 +22695,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -21919,7 +22714,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lgen $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -21943,11 +22737,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -21960,7 +22763,8 @@ - - ac_cv_lib_gen_getspnam=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5 -@@ -21983,21 +22787,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define getprpwnam to an innocuous variant, in case declares getprpwnam. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define getprpwnam innocuous_getprpwnam -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char getprpwnam (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef getprpwnam -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -22028,11 +22839,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22045,7 +22865,8 @@ - - ac_cv_func_getprpwnam=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_func_getprpwnam" >&5 - echo "${ECHO_T}$ac_cv_func_getprpwnam" >&6 -@@ -22061,7 +22882,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lsec $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -22085,11 +22905,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22102,7 +22931,8 @@ - - ac_cv_lib_sec_getprpwnam=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getprpwnam" >&5 -@@ -22121,7 +22951,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lsecurity $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -22145,11 +22974,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22162,7 +23000,8 @@ - - ac_cv_lib_security_getprpwnam=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5 -@@ -22181,7 +23020,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lprot $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -22205,11 +23043,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22222,7 +23069,8 @@ - - ac_cv_lib_prot_getprpwnam=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5 -@@ -22250,7 +23098,6 @@ - else - ac_pattern="Autoconf.*'x'" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -22270,7 +23117,6 @@ - - if test $ac_cv_prog_gcc_traditional = no; then - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -22300,7 +23146,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -22363,11 +23208,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22380,7 +23234,7 @@ - - ac_cv_c_const=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 - echo "${ECHO_T}$ac_cv_c_const" >&6 -@@ -22398,7 +23252,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -22417,11 +23270,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22434,7 +23296,7 @@ - - ac_cv_c_volatile=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5 - echo "${ECHO_T}$ac_cv_c_volatile" >&6 -@@ -22686,7 +23548,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -22707,11 +23568,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22724,12 +23594,11 @@ - - ac_cv_header_stdc=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - - if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -22751,7 +23620,6 @@ - if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -22776,7 +23644,6 @@ - : - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -22788,9 +23655,9 @@ - # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) - #else - # define ISLOWER(c) \ -- (('a' <= (c) && (c) <= 'i') \ -- || ('j' <= (c) && (c) <= 'r') \ -- || ('s' <= (c) && (c) <= 'z')) -+ (('a' <= (c) && (c) <= 'i') \ -+ || ('j' <= (c) && (c) <= 'r') \ -+ || ('s' <= (c) && (c) <= 'z')) - # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) - #endif - -@@ -22801,7 +23668,7 @@ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) -- || toupper (i) != TOUPPER (i)) -+ || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); - } -@@ -22826,7 +23693,7 @@ - ( exit $ac_status ) - ac_cv_header_stdc=no - fi --rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - fi - fi -@@ -22854,7 +23721,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -22874,11 +23740,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22891,7 +23766,7 @@ - - eval "$as_ac_Header=no" - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -@@ -22914,7 +23789,6 @@ - ac_func_search_save_LIBS=$LIBS - ac_cv_search_opendir=no - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -22938,11 +23812,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -22954,12 +23837,12 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - if test "$ac_cv_search_opendir" = no; then - for ac_lib in dir; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -22983,11 +23866,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23000,7 +23892,8 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - done - fi - LIBS=$ac_func_search_save_LIBS -@@ -23021,7 +23914,6 @@ - ac_func_search_save_LIBS=$LIBS - ac_cv_search_opendir=no - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -23045,11 +23937,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23061,12 +23962,12 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - if test "$ac_cv_search_opendir" = no; then - for ac_lib in x; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -23090,11 +23991,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23107,7 +24017,8 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - done - fi - LIBS=$ac_func_search_save_LIBS -@@ -23144,7 +24055,6 @@ - echo "$as_me:$LINENO: checking $ac_header usability" >&5 - echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -23155,11 +24065,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23172,7 +24091,7 @@ - - ac_header_compiler=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 - echo "${ECHO_T}$ac_header_compiler" >&6 - -@@ -23180,7 +24099,6 @@ - echo "$as_me:$LINENO: checking $ac_header presence" >&5 - echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -23198,6 +24116,7 @@ - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -@@ -23217,33 +24136,32 @@ - echo "${ECHO_T}$ac_header_preproc" >&6 - - # So? What about this header? --case $ac_header_compiler:$ac_header_preproc in -- yes:no ) -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 - echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -- ( -- cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## --_ASBOX -- ) | -- sed "s/^/$as_me: WARNING: /" >&2 -+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes - ;; -- no:yes ) -+ no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 - echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 - echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## -+## ------------------------------- ## -+## Report this to the sudo lists. ## -+## ------------------------------- ## - _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 -@@ -23254,7 +24172,7 @@ - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -- eval "$as_ac_Header=$ac_header_preproc" -+ eval "$as_ac_Header=\$ac_header_preproc" - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -@@ -23286,7 +24204,6 @@ - echo "$as_me:$LINENO: checking $ac_header usability" >&5 - echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -23297,11 +24214,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23314,7 +24240,7 @@ - - ac_header_compiler=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 - echo "${ECHO_T}$ac_header_compiler" >&6 - -@@ -23322,7 +24248,6 @@ - echo "$as_me:$LINENO: checking $ac_header presence" >&5 - echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -23340,6 +24265,7 @@ - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -@@ -23359,33 +24285,32 @@ - echo "${ECHO_T}$ac_header_preproc" >&6 - - # So? What about this header? --case $ac_header_compiler:$ac_header_preproc in -- yes:no ) -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 - echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -- ( -- cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## --_ASBOX -- ) | -- sed "s/^/$as_me: WARNING: /" >&2 -+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes - ;; -- no:yes ) -+ no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 - echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 - echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## -+## ------------------------------- ## -+## Report this to the sudo lists. ## -+## ------------------------------- ## - _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 -@@ -23396,7 +24321,7 @@ - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -- eval "$as_ac_Header=$ac_header_preproc" -+ eval "$as_ac_Header=\$ac_header_preproc" - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -@@ -23408,7 +24333,14 @@ - _ACEOF - - else -- LIBOBJS="$LIBOBJS err.$ac_objext" -+ case $LIBOBJS in -+ "err.$ac_objext" | \ -+ *" err.$ac_objext" | \ -+ "err.$ac_objext "* | \ -+ *" err.$ac_objext "* ) ;; -+ *) LIBOBJS="$LIBOBJS err.$ac_objext" ;; -+esac -+ - fi - - done -@@ -23420,7 +24352,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -23441,11 +24372,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23458,7 +24398,8 @@ - - ac_cv_sys_posix_termios=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_sys_posix_termios" >&5 - echo "${ECHO_T}$ac_cv_sys_posix_termios" >&6 -@@ -23486,7 +24427,6 @@ - echo "$as_me:$LINENO: checking $ac_header usability" >&5 - echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -23497,11 +24437,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23514,7 +24463,7 @@ - - ac_header_compiler=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 - echo "${ECHO_T}$ac_header_compiler" >&6 - -@@ -23522,7 +24471,6 @@ - echo "$as_me:$LINENO: checking $ac_header presence" >&5 - echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -23540,6 +24488,7 @@ - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -@@ -23559,33 +24508,32 @@ - echo "${ECHO_T}$ac_header_preproc" >&6 - - # So? What about this header? --case $ac_header_compiler:$ac_header_preproc in -- yes:no ) -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 - echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -- ( -- cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## --_ASBOX -- ) | -- sed "s/^/$as_me: WARNING: /" >&2 -+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes - ;; -- no:yes ) -+ no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 - echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 - echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## -+## ------------------------------- ## -+## Report this to the sudo lists. ## -+## ------------------------------- ## - _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 -@@ -23596,7 +24544,7 @@ - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -- eval "$as_ac_Header=$ac_header_preproc" -+ eval "$as_ac_Header=\$ac_header_preproc" - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -@@ -23631,7 +24579,6 @@ - echo "$as_me:$LINENO: checking $ac_header usability" >&5 - echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -23642,11 +24589,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23659,7 +24615,7 @@ - - ac_header_compiler=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 - echo "${ECHO_T}$ac_header_compiler" >&6 - -@@ -23667,7 +24623,6 @@ - echo "$as_me:$LINENO: checking $ac_header presence" >&5 - echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -23685,6 +24640,7 @@ - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -@@ -23704,33 +24660,32 @@ - echo "${ECHO_T}$ac_header_preproc" >&6 - - # So? What about this header? --case $ac_header_compiler:$ac_header_preproc in -- yes:no ) -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 - echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -- ( -- cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## --_ASBOX -- ) | -- sed "s/^/$as_me: WARNING: /" >&2 -+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes - ;; -- no:yes ) -+ no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 - echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 - echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## -+## ------------------------------- ## -+## Report this to the sudo lists. ## -+## ------------------------------- ## - _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 -@@ -23741,7 +24696,7 @@ - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -- eval "$as_ac_Header=$ac_header_preproc" -+ eval "$as_ac_Header=\$ac_header_preproc" - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -@@ -23771,7 +24726,6 @@ - echo "$as_me:$LINENO: checking bsd_auth.h usability" >&5 - echo $ECHO_N "checking bsd_auth.h usability... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -23782,11 +24736,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23799,7 +24762,7 @@ - - ac_header_compiler=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 - echo "${ECHO_T}$ac_header_compiler" >&6 - -@@ -23807,7 +24770,6 @@ - echo "$as_me:$LINENO: checking bsd_auth.h presence" >&5 - echo $ECHO_N "checking bsd_auth.h presence... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -23825,6 +24787,7 @@ - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -@@ -23844,33 +24807,32 @@ - echo "${ECHO_T}$ac_header_preproc" >&6 - - # So? What about this header? --case $ac_header_compiler:$ac_header_preproc in -- yes:no ) -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) - { echo "$as_me:$LINENO: WARNING: bsd_auth.h: accepted by the compiler, rejected by the preprocessor!" >&5 - echo "$as_me: WARNING: bsd_auth.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: bsd_auth.h: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: bsd_auth.h: proceeding with the preprocessor's result" >&2;} -- ( -- cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## --_ASBOX -- ) | -- sed "s/^/$as_me: WARNING: /" >&2 -+ { echo "$as_me:$LINENO: WARNING: bsd_auth.h: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: bsd_auth.h: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes - ;; -- no:yes ) -+ no:yes:* ) - { echo "$as_me:$LINENO: WARNING: bsd_auth.h: present but cannot be compiled" >&5 - echo "$as_me: WARNING: bsd_auth.h: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: bsd_auth.h: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: bsd_auth.h: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: bsd_auth.h: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: bsd_auth.h: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: bsd_auth.h: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: bsd_auth.h: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: bsd_auth.h: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: bsd_auth.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: bsd_auth.h: proceeding with the preprocessor's result" >&5 - echo "$as_me: WARNING: bsd_auth.h: proceeding with the preprocessor's result" >&2;} -+ { echo "$as_me:$LINENO: WARNING: bsd_auth.h: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: bsd_auth.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## -+## ------------------------------- ## -+## Report this to the sudo lists. ## -+## ------------------------------- ## - _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 -@@ -23904,7 +24866,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -23924,11 +24885,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -23941,7 +24911,7 @@ - - ac_cv_type_mode_t=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 - echo "${ECHO_T}$ac_cv_type_mode_t" >&6 -@@ -23961,7 +24931,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -24000,7 +24969,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -24022,11 +24990,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -24039,7 +25016,7 @@ - - ac_cv_type_sig_atomic_t=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5 - echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6 -@@ -24063,7 +25040,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -24085,11 +25061,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -24102,7 +25087,7 @@ - - ac_cv_type_sigaction_t=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_type_sigaction_t" >&5 - echo "${ECHO_T}$ac_cv_type_sigaction_t" >&6 -@@ -24124,7 +25109,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -24147,11 +25131,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -24164,7 +25157,7 @@ - - ac_cv_type_struct_timespec=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_type_struct_timespec" >&5 - echo "${ECHO_T}$ac_cv_type_struct_timespec" >&6 -@@ -24181,7 +25174,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -24221,7 +25213,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -24261,7 +25252,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -24301,7 +25291,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -24338,7 +25327,6 @@ - echo "$as_me:$LINENO: checking for full void implementation" >&5 - echo $ECHO_N "checking for full void implementation... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -24356,11 +25344,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -24384,7 +25381,7 @@ - echo "$as_me:$LINENO: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - - echo "$as_me:$LINENO: checking max length of uid_t" >&5 - echo $ECHO_N "checking max length of uid_t... $ECHO_C" >&6 -@@ -24393,14 +25390,9 @@ - else - rm -f conftestdata - if test "$cross_compiling" = yes; then -- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot run test program while cross compiling --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ true - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -24445,7 +25437,7 @@ - ( exit $ac_status ) - sudo_cv_uid_t_len=10 - fi --rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - - fi -@@ -24462,7 +25454,6 @@ - echo "$as_me:$LINENO: checking for long long support" >&5 - echo $ECHO_N "checking for long long support... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -24479,11 +25470,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -24495,14 +25495,9 @@ - _ACEOF - - if test "$cross_compiling" = yes; then -- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling --See \`config.log' for more details." >&5 --echo "$as_me: error: cannot run test program while cross compiling --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; } -+ true - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -24531,8 +25526,10 @@ - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - -+( exit $ac_status ) -+true - fi --rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: yes" >&5 - echo "${ECHO_T}yes" >&6 -@@ -24543,7 +25540,8 @@ - echo "$as_me:$LINENO: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - echo "$as_me:$LINENO: checking for sa_len field in struct sockaddr" >&5 - echo $ECHO_N "checking for sa_len field in struct sockaddr... $ECHO_C" >&6 - if test "${sudo_cv_sock_sa_len+set}" = set; then -@@ -24553,7 +25551,6 @@ - sudo_cv_sock_sa_len=no - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -24587,7 +25584,7 @@ - ( exit $ac_status ) - sudo_cv_sock_sa_len=no - fi --rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - rm -f core core.* *.core - fi -@@ -24609,7 +25606,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -24636,11 +25632,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -24653,7 +25658,7 @@ - - ac_cv_type_signal=int - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 - echo "${ECHO_T}$ac_cv_type_signal" >&6 -@@ -24686,21 +25691,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -24731,11 +25743,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -24748,7 +25769,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -24770,21 +25792,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -24815,11 +25844,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -24832,7 +25870,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -24860,21 +25899,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -24905,11 +25951,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -24922,7 +25977,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -24946,21 +26002,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -24991,11 +26054,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -25008,7 +26080,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -25032,21 +26105,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -25077,11 +26157,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -25094,7 +26183,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -25112,21 +26202,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -25157,11 +26254,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -25174,7 +26280,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -25203,21 +26310,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -25248,11 +26362,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -25265,7 +26388,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -25289,21 +26413,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -25334,11 +26465,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -25351,7 +26491,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -25361,7 +26502,14 @@ - _ACEOF - - else -- LIBOBJS="$LIBOBJS $ac_func.$ac_objext" -+ case $LIBOBJS in -+ "$ac_func.$ac_objext" | \ -+ *" $ac_func.$ac_objext" | \ -+ "$ac_func.$ac_objext "* | \ -+ *" $ac_func.$ac_objext "* ) ;; -+ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; -+esac -+ - fi - done - -@@ -25378,21 +26526,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -25423,11 +26578,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -25440,7 +26604,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -25463,21 +26628,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -25508,11 +26680,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -25525,7 +26706,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -25548,21 +26730,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -25593,11 +26782,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -25610,7 +26808,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -25628,21 +26827,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -25673,11 +26879,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -25690,7 +26905,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -25715,21 +26931,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -25760,11 +26983,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -25777,7 +27009,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -25795,7 +27028,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lcompat $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -25819,11 +27051,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -25836,7 +27077,8 @@ - - ac_cv_lib_compat_lsearch=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_compat_lsearch" >&5 -@@ -25848,7 +27090,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -25866,6 +27107,7 @@ - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -@@ -25890,12 +27132,26 @@ - _ACEOF - LIBS="${LIBS} -lcompat" - else -- LIBOBJS="$LIBOBJS lsearch.$ac_objext" -+ case $LIBOBJS in -+ "lsearch.$ac_objext" | \ -+ *" lsearch.$ac_objext" | \ -+ "lsearch.$ac_objext "* | \ -+ *" lsearch.$ac_objext "* ) ;; -+ *) LIBOBJS="$LIBOBJS lsearch.$ac_objext" ;; -+esac -+ - fi - - - else -- LIBOBJS="$LIBOBJS lsearch.$ac_objext" -+ case $LIBOBJS in -+ "lsearch.$ac_objext" | \ -+ *" lsearch.$ac_objext" | \ -+ "lsearch.$ac_objext "* | \ -+ *" lsearch.$ac_objext "* ) ;; -+ *) LIBOBJS="$LIBOBJS lsearch.$ac_objext" ;; -+esac -+ - fi - - fi -@@ -25911,21 +27167,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -25956,11 +27219,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -25973,7 +27245,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -25992,21 +27265,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -26037,11 +27317,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -26054,7 +27343,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -26077,21 +27367,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -26122,11 +27419,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -26139,7 +27445,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -26150,7 +27457,14 @@ - - fi - done -- LIBOBJS="$LIBOBJS utimes.$ac_objext" -+ case $LIBOBJS in -+ "utimes.$ac_objext" | \ -+ *" utimes.$ac_objext" | \ -+ "utimes.$ac_objext "* | \ -+ *" utimes.$ac_objext "* ) ;; -+ *) LIBOBJS="$LIBOBJS utimes.$ac_objext" ;; -+esac -+ - fi - done - -@@ -26164,7 +27478,6 @@ - sudo_cv_func_fnmatch=no - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -26194,7 +27507,7 @@ - ( exit $ac_status ) - sudo_cv_func_fnmatch=no - fi --rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - rm -f core core.* *.core - fi -@@ -26206,7 +27519,14 @@ - _ACEOF - - else -- LIBOBJS="$LIBOBJS fnmatch.$ac_objext" -+ case $LIBOBJS in -+ "fnmatch.$ac_objext" | \ -+ *" fnmatch.$ac_objext" | \ -+ "fnmatch.$ac_objext "* | \ -+ *" fnmatch.$ac_objext "* ) ;; -+ *) LIBOBJS="$LIBOBJS fnmatch.$ac_objext" ;; -+esac -+ - fi - - echo "$as_me:$LINENO: checking for isblank" >&5 -@@ -26215,7 +27535,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -26232,11 +27551,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -26249,7 +27577,8 @@ - - sudo_cv_func_isblank=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $sudo_cv_func_isblank" >&5 - echo "${ECHO_T}$sudo_cv_func_isblank" >&6 -@@ -26277,21 +27606,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -26322,11 +27658,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -26339,7 +27684,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -26349,7 +27695,14 @@ - _ACEOF - - else -- LIBOBJS="$LIBOBJS $ac_func.$ac_objext" -+ case $LIBOBJS in -+ "$ac_func.$ac_objext" | \ -+ *" $ac_func.$ac_objext" | \ -+ "$ac_func.$ac_objext "* | \ -+ *" $ac_func.$ac_objext "* ) ;; -+ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; -+esac -+ - fi - done - -@@ -26367,21 +27720,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -26412,11 +27772,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -26429,7 +27798,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -26450,7 +27820,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -26469,11 +27838,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -26485,7 +27863,6 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -26504,11 +27881,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -26521,9 +27907,9 @@ - - ac_cv_member_struct_stat_st_mtim=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_mtim" >&5 - echo "${ECHO_T}$ac_cv_member_struct_stat_st_mtim" >&6 -@@ -26539,7 +27925,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -26558,11 +27943,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -26574,7 +27968,6 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -26593,11 +27986,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -26610,9 +28012,9 @@ - - ac_cv_member_struct_stat_st_mtimespec=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_mtimespec" >&5 - echo "${ECHO_T}$ac_cv_member_struct_stat_st_mtimespec" >&6 -@@ -26628,7 +28030,6 @@ - echo "$as_me:$LINENO: checking for two-parameter timespecsub" >&5 - echo $ECHO_N "checking for two-parameter timespecsub... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -26651,11 +28052,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -26674,10 +28084,9 @@ - echo "$as_me:$LINENO: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -26695,11 +28104,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -26714,7 +28132,6 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -26732,11 +28149,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -26751,11 +28177,20 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - if test -n "$NEED_SNPRINTF"; then -- LIBOBJS="$LIBOBJS snprintf.$ac_objext" -+ case $LIBOBJS in -+ "snprintf.$ac_objext" | \ -+ *" snprintf.$ac_objext" | \ -+ "snprintf.$ac_objext "* | \ -+ *" snprintf.$ac_objext "* ) ;; -+ *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" ;; -+esac -+ - fi - if test -z "$LIB_CRYPT" -a "$with_pam" != "yes"; then - echo "$as_me:$LINENO: checking for crypt" >&5 -@@ -26764,21 +28199,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define crypt to an innocuous variant, in case declares crypt. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define crypt innocuous_crypt -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char crypt (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef crypt -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -26809,11 +28251,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -26826,7 +28277,8 @@ - - ac_cv_func_crypt=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5 - echo "${ECHO_T}$ac_cv_func_crypt" >&6 -@@ -26841,7 +28293,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lcrypt $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -26865,11 +28316,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -26882,7 +28342,8 @@ - - ac_cv_lib_crypt_crypt=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 -@@ -26898,7 +28359,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lcrypt_d $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -26922,11 +28382,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -26939,7 +28408,8 @@ - - ac_cv_lib_crypt_d_crypt=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_d_crypt" >&5 -@@ -26955,7 +28425,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lufc $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -26979,11 +28448,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -26996,7 +28474,8 @@ - - ac_cv_lib_ufc_crypt=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_ufc_crypt" >&5 -@@ -27018,21 +28497,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define socket to an innocuous variant, in case declares socket. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define socket innocuous_socket -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char socket (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef socket -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -27063,11 +28549,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -27080,7 +28575,8 @@ - - ac_cv_func_socket=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5 - echo "${ECHO_T}$ac_cv_func_socket" >&6 -@@ -27095,7 +28591,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lsocket $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -27119,11 +28614,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -27136,7 +28640,8 @@ - - ac_cv_lib_socket_socket=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 -@@ -27152,7 +28657,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-linet $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -27176,11 +28680,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -27193,7 +28706,8 @@ - - ac_cv_lib_inet_socket=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_inet_socket" >&5 -@@ -27205,13 +28719,12 @@ - echo "$as_me: WARNING: unable to find socket() trying -lsocket -lnsl" >&2;} - echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 - echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 --if test "${ac_cv_lib_socket_socket_lnsl+set}" = set; then -+if test "${ac_cv_lib_socket_socket+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS - LIBS="-lsocket -lnsl $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -27235,29 +28748,39 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- ac_cv_lib_socket_socket_lnsl=yes -+ ac_cv_lib_socket_socket=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --ac_cv_lib_socket_socket_lnsl=no -+ac_cv_lib_socket_socket=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket_lnsl" >&5 --echo "${ECHO_T}$ac_cv_lib_socket_socket_lnsl" >&6 --if test $ac_cv_lib_socket_socket_lnsl = yes; then -+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 -+echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 -+if test $ac_cv_lib_socket_socket = yes; then - NET_LIBS="${NET_LIBS} -lsocket -lnsl"; LIBS="${LIBS} -lsocket -lnsl" - fi - -@@ -27273,21 +28796,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define inet_addr to an innocuous variant, in case declares inet_addr. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define inet_addr innocuous_inet_addr -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char inet_addr (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef inet_addr -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -27318,11 +28848,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -27335,7 +28874,8 @@ - - ac_cv_func_inet_addr=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_func_inet_addr" >&5 - echo "${ECHO_T}$ac_cv_func_inet_addr" >&6 -@@ -27348,21 +28888,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define __inet_addr to an innocuous variant, in case declares __inet_addr. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define __inet_addr innocuous___inet_addr -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char __inet_addr (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef __inet_addr -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -27393,11 +28940,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -27410,7 +28966,8 @@ - - ac_cv_func___inet_addr=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_func___inet_addr" >&5 - echo "${ECHO_T}$ac_cv_func___inet_addr" >&6 -@@ -27425,7 +28982,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lnsl $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -27449,11 +29005,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -27466,7 +29031,8 @@ - - ac_cv_lib_nsl_inet_addr=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_inet_addr" >&5 -@@ -27482,7 +29048,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-linet $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -27506,11 +29071,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -27523,7 +29097,8 @@ - - ac_cv_lib_inet_inet_addr=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_inet_inet_addr" >&5 -@@ -27535,13 +29110,12 @@ - echo "$as_me: WARNING: unable to find inet_addr() trying -lsocket -lnsl" >&2;} - echo "$as_me:$LINENO: checking for inet_addr in -lsocket" >&5 - echo $ECHO_N "checking for inet_addr in -lsocket... $ECHO_C" >&6 --if test "${ac_cv_lib_socket_inet_addr_lnsl+set}" = set; then -+if test "${ac_cv_lib_socket_inet_addr+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS - LIBS="-lsocket -lnsl $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -27565,29 +29139,39 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- ac_cv_lib_socket_inet_addr_lnsl=yes -+ ac_cv_lib_socket_inet_addr=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --ac_cv_lib_socket_inet_addr_lnsl=no -+ac_cv_lib_socket_inet_addr=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:$LINENO: result: $ac_cv_lib_socket_inet_addr_lnsl" >&5 --echo "${ECHO_T}$ac_cv_lib_socket_inet_addr_lnsl" >&6 --if test $ac_cv_lib_socket_inet_addr_lnsl = yes; then -+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_inet_addr" >&5 -+echo "${ECHO_T}$ac_cv_lib_socket_inet_addr" >&6 -+if test $ac_cv_lib_socket_inet_addr = yes; then - NET_LIBS="${NET_LIBS} -lsocket -lnsl"; LIBS="${LIBS} -lsocket -lnsl" - fi - -@@ -27605,21 +29189,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define syslog to an innocuous variant, in case declares syslog. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define syslog innocuous_syslog -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char syslog (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef syslog -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -27650,11 +29241,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -27667,7 +29267,8 @@ - - ac_cv_func_syslog=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5 - echo "${ECHO_T}$ac_cv_func_syslog" >&6 -@@ -27682,7 +29283,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lsocket $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -27706,11 +29306,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -27723,7 +29332,8 @@ - - ac_cv_lib_socket_syslog=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_socket_syslog" >&5 -@@ -27739,7 +29349,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lnsl $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -27763,11 +29372,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -27780,7 +29398,8 @@ - - ac_cv_lib_nsl_syslog=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_syslog" >&5 -@@ -27796,7 +29415,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-linet $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -27820,11 +29438,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -27837,7 +29464,8 @@ - - ac_cv_lib_inet_syslog=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_inet_syslog" >&5 -@@ -27861,7 +29489,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -27878,11 +29505,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -27895,7 +29531,8 @@ - - ac_cv_working_alloca_h=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 - echo "${ECHO_T}$ac_cv_working_alloca_h" >&6 -@@ -27913,7 +29550,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -27950,11 +29586,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -27967,7 +29612,8 @@ - - ac_cv_func_alloca_works=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 - echo "${ECHO_T}$ac_cv_func_alloca_works" >&6 -@@ -27997,7 +29643,6 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -28030,21 +29675,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -28075,11 +29727,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -28092,7 +29753,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -28117,7 +29779,6 @@ - ac_cv_c_stack_direction=0 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -28163,7 +29824,7 @@ - ( exit $ac_status ) - ac_cv_c_stack_direction=-1 - fi --rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - fi - echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 -@@ -28187,21 +29848,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -28232,11 +29900,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -28249,7 +29926,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -28267,7 +29945,6 @@ - else - - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -28284,11 +29961,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -28301,7 +29987,8 @@ - - sudo_cv___progname=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - - if test "$sudo_cv___progname" = "yes"; then -@@ -28310,7 +29997,14 @@ - _ACEOF - - else -- LIBOBJS="$LIBOBJS getprogname.$ac_objext" -+ case $LIBOBJS in -+ "getprogname.$ac_objext" | \ -+ *" getprogname.$ac_objext" | \ -+ "getprogname.$ac_objext "* | \ -+ *" getprogname.$ac_objext "* ) ;; -+ *) LIBOBJS="$LIBOBJS getprogname.$ac_objext" ;; -+esac -+ - fi - echo "$as_me:$LINENO: result: $sudo_cv___progname" >&5 - echo "${ECHO_T}$sudo_cv___progname" >&6 -@@ -28342,6 +30036,7 @@ - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -@@ -28394,7 +30089,6 @@ - echo "$as_me:$LINENO: checking krb.h usability" >&5 - echo $ECHO_N "checking krb.h usability... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -28405,11 +30099,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -28422,7 +30125,7 @@ - - ac_header_compiler=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 - echo "${ECHO_T}$ac_header_compiler" >&6 - -@@ -28430,7 +30133,6 @@ - echo "$as_me:$LINENO: checking krb.h presence" >&5 - echo $ECHO_N "checking krb.h presence... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -28448,6 +30150,7 @@ - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -@@ -28467,33 +30170,32 @@ - echo "${ECHO_T}$ac_header_preproc" >&6 - - # So? What about this header? --case $ac_header_compiler:$ac_header_preproc in -- yes:no ) -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) - { echo "$as_me:$LINENO: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&5 - echo "$as_me: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: krb.h: proceeding with the preprocessor's result" >&2;} -- ( -- cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## --_ASBOX -- ) | -- sed "s/^/$as_me: WARNING: /" >&2 -+ { echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: krb.h: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes - ;; -- no:yes ) -+ no:yes:* ) - { echo "$as_me:$LINENO: WARNING: krb.h: present but cannot be compiled" >&5 - echo "$as_me: WARNING: krb.h: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: krb.h: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: krb.h: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: krb.h: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: krb.h: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: krb.h: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: krb.h: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: krb.h: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: krb.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the preprocessor's result" >&5 - echo "$as_me: WARNING: krb.h: proceeding with the preprocessor's result" >&2;} -+ { echo "$as_me:$LINENO: WARNING: krb.h: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: krb.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## -+## ------------------------------- ## -+## Report this to the sudo lists. ## -+## ------------------------------- ## - _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 -@@ -28531,7 +30233,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-ldes $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -28555,11 +30256,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -28572,7 +30282,8 @@ - - ac_cv_lib_des_des_cbc_encrypt=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5 -@@ -28589,7 +30300,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-ldes425 $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -28613,11 +30323,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -28630,7 +30349,8 @@ - - ac_cv_lib_des425_des_cbc_encrypt=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5 -@@ -28647,7 +30367,6 @@ - echo "$as_me:$LINENO: checking whether we are using KTH Kerberos IV" >&5 - echo $ECHO_N "checking whether we are using KTH Kerberos IV... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -28664,11 +30383,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -28686,7 +30414,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lroken $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -28704,11 +30431,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -28721,7 +30457,8 @@ - - ac_cv_lib_roken_main=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_roken_main" >&5 -@@ -28741,17 +30478,15 @@ - - - fi --rm -f conftest.$ac_objext conftest.$ac_ext -- as_ac_Lib=`echo "ac_cv_lib_krb_main$K4LIBS" | $as_tr_sh` --echo "$as_me:$LINENO: checking for main in -lkrb" >&5 -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+ echo "$as_me:$LINENO: checking for main in -lkrb" >&5 - echo $ECHO_N "checking for main in -lkrb... $ECHO_C" >&6 --if eval "test \"\${$as_ac_Lib+set}\" = set"; then -+if test "${ac_cv_lib_krb_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS - LIBS="-lkrb $K4LIBS $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -28769,42 +30504,50 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- eval "$as_ac_Lib=yes" -+ ac_cv_lib_krb_main=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --eval "$as_ac_Lib=no" -+ac_cv_lib_krb_main=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5 --echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6 --if test `eval echo '${'$as_ac_Lib'}'` = yes; then -+echo "$as_me:$LINENO: result: $ac_cv_lib_krb_main" >&5 -+echo "${ECHO_T}$ac_cv_lib_krb_main" >&6 -+if test $ac_cv_lib_krb_main = yes; then - K4LIBS="-lkrb $K4LIBS" - else - -- as_ac_Lib=`echo "ac_cv_lib_krb4_main$K4LIBS" | $as_tr_sh` --echo "$as_me:$LINENO: checking for main in -lkrb4" >&5 -+ echo "$as_me:$LINENO: checking for main in -lkrb4" >&5 - echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6 --if eval "test \"\${$as_ac_Lib+set}\" = set"; then -+if test "${ac_cv_lib_krb4_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS - LIBS="-lkrb4 $K4LIBS $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -28822,29 +30565,39 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- eval "$as_ac_Lib=yes" -+ ac_cv_lib_krb4_main=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --eval "$as_ac_Lib=no" -+ac_cv_lib_krb4_main=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5 --echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6 --if test `eval echo '${'$as_ac_Lib'}'` = yes; then -+echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_main" >&5 -+echo "${ECHO_T}$ac_cv_lib_krb4_main" >&6 -+if test $ac_cv_lib_krb4_main = yes; then - K4LIBS="-lkrb4 $K4LIBS" - else - K4LIBS="-lkrb $K4LIBS" -@@ -28909,7 +30662,6 @@ - echo "$as_me:$LINENO: checking whether we are using Heimdal" >&5 - echo $ECHO_N "checking whether we are using Heimdal... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -28926,11 +30678,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -28950,7 +30711,7 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - fi - if test -n "$with_kerb5" -a -z "$KRB5CONFIG"; then -@@ -28976,6 +30737,7 @@ - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -@@ -29014,7 +30776,6 @@ - echo "$as_me:$LINENO: checking whether we are using Heimdal" >&5 - echo $ECHO_N "checking whether we are using Heimdal... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -29031,11 +30792,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -29057,7 +30827,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lroken $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -29075,11 +30844,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -29092,7 +30870,8 @@ - - ac_cv_lib_roken_main=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_roken_main" >&5 -@@ -29113,7 +30892,7 @@ - - - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - AUTH_OBJS="${AUTH_OBJS} kerb5.o" - fi - -@@ -29126,7 +30905,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-ldl $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -29144,11 +30922,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -29161,7 +30948,8 @@ - - ac_cv_lib_dl_main=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_dl_main" >&5 -@@ -29190,7 +30978,6 @@ - echo "$as_me:$LINENO: checking $ac_header usability" >&5 - echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -29201,11 +30988,20 @@ - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+ (eval $ac_compile) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest.$ac_objext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -29218,7 +31014,7 @@ - - ac_header_compiler=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 - echo "${ECHO_T}$ac_header_compiler" >&6 - -@@ -29226,7 +31022,6 @@ - echo "$as_me:$LINENO: checking $ac_header presence" >&5 - echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -29244,6 +31039,7 @@ - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -@@ -29263,33 +31059,32 @@ - echo "${ECHO_T}$ac_header_preproc" >&6 - - # So? What about this header? --case $ac_header_compiler:$ac_header_preproc in -- yes:no ) -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 - echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -- ( -- cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## --_ASBOX -- ) | -- sed "s/^/$as_me: WARNING: /" >&2 -+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes - ;; -- no:yes ) -+ no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 - echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 - echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## -+## ------------------------------- ## -+## Report this to the sudo lists. ## -+## ------------------------------- ## - _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 -@@ -29300,7 +31095,7 @@ - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -- eval "$as_ac_Header=$ac_header_preproc" -+ eval "$as_ac_Header=\$ac_header_preproc" - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -@@ -29412,6 +31207,7 @@ - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -@@ -29445,6 +31241,7 @@ - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -@@ -29498,7 +31295,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lskey $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -29516,11 +31312,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -29533,7 +31338,8 @@ - - ac_cv_lib_skey_main=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_skey_main" >&5 -@@ -29553,7 +31359,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lskey $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -29577,11 +31382,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -29594,7 +31408,8 @@ - - ac_cv_lib_skey_skeyaccess=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_skey_skeyaccess" >&5 -@@ -29647,6 +31462,7 @@ - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -@@ -29680,6 +31496,7 @@ - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -@@ -29733,7 +31550,6 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lopie $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -29751,11 +31567,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -29768,7 +31593,8 @@ - - ac_cv_lib_opie_main=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_opie_main" >&5 -@@ -29809,7 +31635,7 @@ - # - echo "$as_me:$LINENO: checking for SD_Init in -laceclnt" >&5 - echo $ECHO_N "checking for SD_Init in -laceclnt... $ECHO_C" >&6 --if test "${ac_cv_lib_aceclnt_SD_Init_______lpthread_______+set}" = set; then -+if test "${ac_cv_lib_aceclnt_SD_Init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS -@@ -29818,7 +31644,6 @@ - - $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -29842,29 +31667,39 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- ac_cv_lib_aceclnt_SD_Init_______lpthread_______=yes -+ ac_cv_lib_aceclnt_SD_Init=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --ac_cv_lib_aceclnt_SD_Init_______lpthread_______=no -+ac_cv_lib_aceclnt_SD_Init=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:$LINENO: result: $ac_cv_lib_aceclnt_SD_Init_______lpthread_______" >&5 --echo "${ECHO_T}$ac_cv_lib_aceclnt_SD_Init_______lpthread_______" >&6 --if test $ac_cv_lib_aceclnt_SD_Init_______lpthread_______ = yes; then -+echo "$as_me:$LINENO: result: $ac_cv_lib_aceclnt_SD_Init" >&5 -+echo "${ECHO_T}$ac_cv_lib_aceclnt_SD_Init" >&6 -+if test $ac_cv_lib_aceclnt_SD_Init = yes; then - - AUTH_OBJS="securid5.o" - SUDO_LIBS="${SUDO_LIBS} -laceclnt -lpthread" -@@ -29950,7 +31785,6 @@ - LIBS="${LIBS} $l" - LDAP_LIBS="${LDAP_LIBS} $l" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -29969,11 +31803,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -29985,7 +31828,8 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - done - if test "$found" = "no"; then - LDAP_LIBS=" -ldap" -@@ -29998,7 +31842,6 @@ - echo "$as_me:$LINENO: checking whether lber.h is needed" >&5 - echo $ECHO_N "checking whether lber.h is needed... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -30016,11 +31859,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -30040,7 +31892,8 @@ - _ACEOF - - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - - - -@@ -30053,21 +31906,28 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -+ - #ifdef __STDC__ - # include - #else - # include - #endif -+ -+#undef $ac_func -+ - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" -@@ -30098,11 +31958,20 @@ - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+ (eval $ac_link) 2>conftest.er1 - ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -30115,7 +31984,8 @@ - - eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -@@ -30295,13 +32165,13 @@ - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). - sed -n \ -- "s/'/'\\\\''/g; -- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" -+ "s/'/'\\\\''/g; -+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ -- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" -+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; - } | -@@ -30331,13 +32201,13 @@ - # trailing colons and then remove the whole line if VPATH becomes empty - # (actually we leave an empty line to preserve line numbers). - if test "x$srcdir" = x.; then -- ac_vpsub='/^[ ]*VPATH[ ]*=/{ -+ ac_vpsub='/^[ ]*VPATH[ ]*=/{ - s/:*\$(srcdir):*/:/; - s/:*\${srcdir}:*/:/; - s/:*@srcdir@:*/:/; --s/^\([^=]*=[ ]*\):*/\1/; -+s/^\([^=]*=[ ]*\):*/\1/; - s/:*$//; --s/^[^=]*=[ ]*$//; -+s/^[^=]*=[ ]*$//; - }' - fi - -@@ -30348,7 +32218,7 @@ - for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | -- sed 's/\$U\././;s/\.o$//;s/\.obj$//'` -+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' -@@ -30392,9 +32262,10 @@ - elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix - fi -+DUALCASE=1; export DUALCASE # for MKS sh - - # Support unset when possible. --if (FOO=FOO; unset FOO) >/dev/null 2>&1; then -+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset - else - as_unset=false -@@ -30413,7 +32284,7 @@ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME - do -- if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then -+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var -@@ -30592,16 +32463,17 @@ - if mkdir -p . 2>/dev/null; then - as_mkdir_p=: - else -+ test -d ./-p && rmdir ./-p - as_mkdir_p=false - fi - - as_executable_p="test -f" - - # Sed expression to map a string onto a valid CPP name. --as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" -+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - - # Sed expression to map a string onto a valid variable name. --as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" -+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - # IFS -@@ -30628,7 +32500,7 @@ - cat >&5 <<_CSEOF - - This file was extended by sudo $as_me 1.6.8, which was --generated by GNU Autoconf 2.57. Invocation command line was -+generated by GNU Autoconf 2.59. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS -@@ -30672,9 +32544,9 @@ - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] -- instantiate the configuration file FILE -+ instantiate the configuration file FILE - --header=FILE[:TEMPLATE] -- instantiate the configuration header FILE -+ instantiate the configuration header FILE - - Configuration files: - $config_files -@@ -30688,11 +32560,10 @@ - cat >>$CONFIG_STATUS <<_ACEOF - ac_cs_version="\\ - sudo config.status 1.6.8 --configured by $0, generated by GNU Autoconf 2.57, -+configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" - --Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 --Free Software Foundation, Inc. -+Copyright (C) 2003 Free Software Foundation, Inc. - This config.status script is free software; the Free Software Foundation - gives unlimited permission to copy, distribute and modify it." - srcdir=$srcdir -@@ -31000,9 +32871,9 @@ - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then -- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" -+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else -- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" -+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end -@@ -31020,21 +32891,21 @@ - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin -- cat >$tmp/stdin -- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` -- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; -+ cat >$tmp/stdin -+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` -+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` -- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; -+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || - $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -- X"$ac_file" : 'X\(//\)[^/]' \| \ -- X"$ac_file" : 'X\(//\)$' \| \ -- X"$ac_file" : 'X\(/\)' \| \ -- . : '\(.\)' 2>/dev/null || -+ X"$ac_file" : 'X\(//\)[^/]' \| \ -+ X"$ac_file" : 'X\(//\)$' \| \ -+ X"$ac_file" : 'X\(/\)' \| \ -+ . : '\(.\)' 2>/dev/null || - echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } -@@ -31050,10 +32921,10 @@ - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || - $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -- X"$as_dir" : 'X\(//\)[^/]' \| \ -- X"$as_dir" : 'X\(//\)$' \| \ -- X"$as_dir" : 'X\(/\)' \| \ -- . : '\(.\)' 2>/dev/null || -+ X"$as_dir" : 'X\(//\)[^/]' \| \ -+ X"$as_dir" : 'X\(//\)$' \| \ -+ X"$as_dir" : 'X\(/\)' \| \ -+ . : '\(.\)' 2>/dev/null || - echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } -@@ -31091,20 +32962,48 @@ - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; - esac --# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be --# absolute. --ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` --ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` --ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` --ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` -+ -+# Do not use `cd foo && pwd` to compute absolute paths, because -+# the directories may not exist. -+case `pwd` in -+.) ac_abs_builddir="$ac_dir";; -+*) -+ case "$ac_dir" in -+ .) ac_abs_builddir=`pwd`;; -+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; -+ *) ac_abs_builddir=`pwd`/"$ac_dir";; -+ esac;; -+esac -+case $ac_abs_builddir in -+.) ac_abs_top_builddir=${ac_top_builddir}.;; -+*) -+ case ${ac_top_builddir}. in -+ .) ac_abs_top_builddir=$ac_abs_builddir;; -+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; -+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; -+ esac;; -+esac -+case $ac_abs_builddir in -+.) ac_abs_srcdir=$ac_srcdir;; -+*) -+ case $ac_srcdir in -+ .) ac_abs_srcdir=$ac_abs_builddir;; -+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; -+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; -+ esac;; -+esac -+case $ac_abs_builddir in -+.) ac_abs_top_srcdir=$ac_top_srcdir;; -+*) -+ case $ac_top_srcdir in -+ .) ac_abs_top_srcdir=$ac_abs_builddir;; -+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; -+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; -+ esac;; -+esac - - - -- if test x"$ac_file" != x-; then -- { echo "$as_me:$LINENO: creating $ac_file" >&5 --echo "$as_me: creating $ac_file" >&6;} -- rm -f "$ac_file" -- fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ -@@ -31114,7 +33013,7 @@ - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | -- sed 's,.*/,,'` by configure." -+ sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. -@@ -31123,26 +33022,32 @@ - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) -- # Absolute (can't be DOS-style, as IFS=:) -- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -+ # Absolute (can't be DOS-style, as IFS=:) -+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 - echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } -- echo $f;; -+ echo "$f";; - *) # Relative -- if test -f "$f"; then -- # Build tree -- echo $f -- elif test -f "$srcdir/$f"; then -- # Source tree -- echo $srcdir/$f -- else -- # /dev/null tree -- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -+ if test -f "$f"; then -+ # Build tree -+ echo "$f" -+ elif test -f "$srcdir/$f"; then -+ # Source tree -+ echo "$srcdir/$f" -+ else -+ # /dev/null tree -+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 - echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } -- fi;; -+ fi;; - esac - done` || { (exit 1); exit 1; } -+ -+ if test x"$ac_file" != x-; then -+ { echo "$as_me:$LINENO: creating $ac_file" >&5 -+echo "$as_me: creating $ac_file" >&6;} -+ rm -f "$ac_file" -+ fi - _ACEOF - cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub -@@ -31181,12 +33086,12 @@ - # NAME is the cpp macro being defined and VALUE is the value it is being given. - # - # ac_d sets the value in "#define NAME VALUE" lines. --ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' --ac_dB='[ ].*$,\1#\2' -+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' -+ac_dB='[ ].*$,\1#\2' - ac_dC=' ' - ac_dD=',;t' - # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". --ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' - ac_uB='$,\1#\2define\3' - ac_uC=' ' - ac_uD=',;t' -@@ -31195,11 +33100,11 @@ - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin -- cat >$tmp/stdin -- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` -- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; -+ cat >$tmp/stdin -+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` -+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` -- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; -+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - -@@ -31213,28 +33118,29 @@ - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) -- # Absolute (can't be DOS-style, as IFS=:) -- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -+ # Absolute (can't be DOS-style, as IFS=:) -+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 - echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } -- echo $f;; -+ # Do quote $f, to prevent DOS paths from being IFS'd. -+ echo "$f";; - *) # Relative -- if test -f "$f"; then -- # Build tree -- echo $f -- elif test -f "$srcdir/$f"; then -- # Source tree -- echo $srcdir/$f -- else -- # /dev/null tree -- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -+ if test -f "$f"; then -+ # Build tree -+ echo "$f" -+ elif test -f "$srcdir/$f"; then -+ # Source tree -+ echo "$srcdir/$f" -+ else -+ # /dev/null tree -+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 - echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } -- fi;; -+ fi;; - esac - done` || { (exit 1); exit 1; } - # Remove the trailing spaces. -- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in -+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in - - _ACEOF - -@@ -31257,9 +33163,9 @@ - s,[\\$`],\\&,g - t clear - : clear --s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp -+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp - t end --s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp -+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp - : end - _ACEOF - # If some macros were called several times there might be several times -@@ -31273,13 +33179,13 @@ - # example, in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - cat >>conftest.undefs <<\_ACEOF --s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, - _ACEOF - - # Break up conftest.defines because some shells have a limit on the size - # of here documents, and old seds have small limits too (100 cmds). - echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS --echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS -+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS - echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS - echo ' :' >>$CONFIG_STATUS - rm -f conftest.tail -@@ -31288,7 +33194,7 @@ - # Write a limited-size here document to $tmp/defines.sed. - echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#define' lines. -- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS -+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS -@@ -31315,7 +33221,7 @@ - # Write a limited-size here document to $tmp/undefs.sed. - echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#undef' -- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS -+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS -@@ -31349,10 +33255,10 @@ - else - ac_dir=`(dirname "$ac_file") 2>/dev/null || - $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -- X"$ac_file" : 'X\(//\)[^/]' \| \ -- X"$ac_file" : 'X\(//\)$' \| \ -- X"$ac_file" : 'X\(/\)' \| \ -- . : '\(.\)' 2>/dev/null || -+ X"$ac_file" : 'X\(//\)[^/]' \| \ -+ X"$ac_file" : 'X\(//\)$' \| \ -+ X"$ac_file" : 'X\(/\)' \| \ -+ . : '\(.\)' 2>/dev/null || - echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } -@@ -31368,10 +33274,10 @@ - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || - $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -- X"$as_dir" : 'X\(//\)[^/]' \| \ -- X"$as_dir" : 'X\(//\)$' \| \ -- X"$as_dir" : 'X\(/\)' \| \ -- . : '\(.\)' 2>/dev/null || -+ X"$as_dir" : 'X\(//\)[^/]' \| \ -+ X"$as_dir" : 'X\(//\)$' \| \ -+ X"$as_dir" : 'X\(/\)' \| \ -+ . : '\(.\)' 2>/dev/null || - echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } -diff -ur sudo-1.6.8p9/configure.in sudo-1.6.8p9-patched/configure.in ---- sudo-1.6.8p9/configure.in 2004-11-25 11:31:20.000000000 -0600 -+++ sudo-1.6.8p9-patched/configure.in 2006-05-26 13:05:14.000000000 -0500 -@@ -1703,9 +1703,9 @@ - AC_CHECK_FUNCS(lockf flock, [break]) - AC_CHECK_FUNCS(waitpid wait3, [break]) - AC_CHECK_FUNCS(innetgr _innetgr, [AC_CHECK_FUNCS(getdomainname) [break]]) --AC_CHECK_FUNCS(lsearch, , [AC_CHECK_LIB(compat, lsearch, AC_CHECK_HEADER(search.h, AC_DEFINE(HAVE_LSEARCH) [LIBS="${LIBS} -lcompat"], AC_LIBOBJ(lsearch), -), AC_LIBOBJ(lsearch))]) -+AC_CHECK_FUNCS(lsearch, , [AC_CHECK_LIB(compat, lsearch, [AC_CHECK_HEADER(search.h, AC_DEFINE(HAVE_LSEARCH) [LIBS="${LIBS} -lcompat"], [AC_LIBOBJ(lsearch)], -)], [AC_LIBOBJ(lsearch)])]) - AC_CHECK_FUNCS(utimes, [AC_CHECK_FUNCS(futimes futimesat, [break])], [AC_CHECK_FUNCS(futime) AC_LIBOBJ(utimes)]) --SUDO_FUNC_FNMATCH(AC_DEFINE(HAVE_FNMATCH), AC_LIBOBJ(fnmatch)) -+SUDO_FUNC_FNMATCH(AC_DEFINE(HAVE_FNMATCH), [AC_LIBOBJ(fnmatch)]) - SUDO_FUNC_ISBLANK - AC_REPLACE_FUNCS(strerror strcasecmp sigaction strlcpy strlcat closefrom) - AC_CHECK_FUNCS(snprintf vsnprintf asprintf vasprintf, , [NEED_SNPRINTF=1]) -diff -ur sudo-1.6.8p9/Makefile.in sudo-1.6.8p9-patched/Makefile.in ---- sudo-1.6.8p9/Makefile.in 2005-06-19 15:03:50.000000000 -0500 -+++ sudo-1.6.8p9-patched/Makefile.in 2006-05-26 13:04:20.000000000 -0500 -@@ -301,11 +301,13 @@ - $(DESTDIR)$(noexecdir) - - install-binaries: $(PROGS) -- $(INSTALL) -O $(install_uid) -G $(install_gid) -M 4111 -s sudo $(DESTDIR)$(sudodir)/sudo -+ $(INSTALL) -O $(install_uid) -G $(install_gid) -M 4111 sudo $(DESTDIR)$(sudodir)/sudo -+ $(STRIP) $(DESTDIR)$(sudodir)/sudo - rm -f $(DESTDIR)$(sudodir)/sudoedit - ln $(DESTDIR)$(sudodir)/sudo $(DESTDIR)$(sudodir)/sudoedit - -- $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0111 -s visudo $(DESTDIR)$(visudodir)/visudo -+ $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0111 visudo $(DESTDIR)$(visudodir)/visudo -+ $(STRIP) $(DESTDIR)$(visudodir)/visudo - - install-noexec: sudo_noexec.la - $(LIBTOOL) --mode=install $(INSTALL) sudo_noexec.la $(DESTDIR)$(noexecdir) diff --git a/package/sudo/sudo.mk b/package/sudo/sudo.mk index 5c1028dbb5..e0db465ddd 100644 --- a/package/sudo/sudo.mk +++ b/package/sudo/sudo.mk @@ -1,100 +1,32 @@ -############################################################# +################################################################################ # # sudo # -############################################################# +################################################################################ -SUDO_VERSION:=1.6.8p12 -SUDO_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/s/sudo -SUDO_SOURCE:=sudo_$(SUDO_VERSION).orig.tar.gz - -#SUDO_VERSION:=1.7.0 -#SUDO_SITE:=http://www.courtesan.com/sudo/dist -# 1.7.0 Needs update Cross-Compiler patches -# SUDO_SOURCE:=sudo-$(SUDO_VERSION).tar.gz - -SUDO_DIR:=$(BUILD_DIR)/sudo-$(SUDO_VERSION) -SUDO_UNZIP:=$(ZCAT) - -$(DL_DIR)/$(SUDO_SOURCE): - $(call DOWNLOAD,$(SUDO_SITE),$(SUDO_SOURCE)) - -sudo-source: $(DL_DIR)/$(SUDO_SOURCE) $(SUDO_CONFIG_FILE) - -$(SUDO_DIR)/.unpacked: $(DL_DIR)/$(SUDO_SOURCE) - $(SUDO_UNZIP) $(DL_DIR)/$(SUDO_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - toolchain/patch-kernel.sh $(SUDO_DIR) package/sudo sudo-$(SUDO_VERSION)\*.patch - $(CONFIG_UPDATE) $(SUDO_DIR) - touch $@ - -$(SUDO_DIR)/.configured: $(SUDO_DIR)/.unpacked $(SUDO_CONFIG_FILE) - (cd $(SUDO_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - $(TARGET_CONFIGURE_ARGS) \ - ./configure $(QUIET) \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libdir=/lib \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - $(DISABLE_LARGEFILE) \ +SUDO_VERSION = 1.8.8 +SUDO_SITE = http://www.sudo.ws/sudo/dist +SUDO_LICENSE = ICS BSD-3c +SUDO_LICENSE_FILES = doc/LICENSE +SUDO_CONF_OPT = \ --without-lecture \ --without-sendmail \ --without-umask \ --with-logging=syslog \ --without-interfaces \ - --disable-authentication \ - $(SUDO_EXTRA_CONFIG) \ - ) + --without-pam - touch $@ +# mksigname/mksiglist needs to run on build host to generate source files +define SUDO_BUILD_MKSIGNAME_MKSIGLIST_HOST + $(MAKE) $(HOST_CONFIGURE_OPTS) \ + CPPFLAGS="$(HOST_CPPFLAGS) -I../include -I.." \ + -C $(@D)/compat mksigname mksiglist +endef -$(SUDO_DIR)/sudo: $(SUDO_DIR)/.configured - $(MAKE) -C $(SUDO_DIR) - touch -c $@ +SUDO_POST_CONFIGURE_HOOKS += SUDO_BUILD_MKSIGNAME_MKSIGLIST_HOST -$(TARGET_DIR)/usr/bin/sudo: $(SUDO_DIR)/sudo - rm -f $(TARGET_DIR)/usr/bin/sudo - rm -f $(TARGET_DIR)/usr/sbin/visudo - rm -f $(TARGET_DIR)/etc/sudoers - $(INSTALL) -m 0777 -D $(SUDO_DIR)/sudo $(TARGET_DIR)/usr/bin/sudo - $(INSTALL) -m 0777 -D $(SUDO_DIR)/visudo $(TARGET_DIR)/usr/sbin/visudo - $(STRIPCMD) $(TARGET_DIR)/usr/bin/sudo $(TARGET_DIR)/usr/sbin/visudo - chmod 4555 $(TARGET_DIR)/usr/bin/sudo - chmod 0555 $(TARGET_DIR)/usr/sbin/visudo - $(INSTALL) -m 0440 -D $(SUDO_DIR)/sudoers $(TARGET_DIR)/etc/sudoers - touch -c $(TARGET_DIR)/usr/bin/sudo - -sudo: $(TARGET_DIR)/usr/bin/sudo - -sudo-unpacked: $(SUDO_DIR)/.unpacked - -sudo-clean: - rm -f $(TARGET_DIR)/usr/bin/sudo $(TARGET_DIR)/etc/sudoers \ - $(TARGET_DIR)/usr/sbin/visudo - -$(MAKE) -C $(SUDO_DIR) clean - -sudo-dirclean: - rm -rf $(SUDO_DIR) -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_SUDO),y) -TARGETS+=sudo -endif +define SUDO_PERMISSIONS +/usr/bin/sudo f 4755 0 0 - - - - - +endef -ifeq ($(BR2_PACKAGE_LIBPAM),y) -SUDO_EXTRA_CONFIG=--enable-pam -sudo: libpam -endif +$(eval $(autotools-package)) diff --git a/package/sunxi-boards/Config.in b/package/sunxi-boards/Config.in new file mode 100644 index 0000000000..d9fd8529f3 --- /dev/null +++ b/package/sunxi-boards/Config.in @@ -0,0 +1,25 @@ +config BR2_PACKAGE_SUNXI_BOARDS + bool "sunxi script.bin board file" + depends on BR2_arm + select BR2_PACKAGE_HOST_SUNXI_TOOLS + help + Sunxi-boards requires a compiled .fex files for hardware + description, used by the kernel during boot for hardware + initialization. This package is specific for linux-sunxi + kernel and it is useless for mainline kernel versions. + + https://github.com/linux-sunxi/sunxi-boards + +if BR2_PACKAGE_SUNXI_BOARDS +config BR2_PACKAGE_SUNXI_BOARDS_FEX_FILE + string ".fex file to compile" + help + This field defines the name of the .fex file for which the + .bin file should be generated. + + This should be the path of the .fex file relative to the + sys_config/ directory, and including the .fex extension. + + See inside sys_config/ directory in sunxi-boards source code + to see the list of valid .fex files. +endif diff --git a/package/sunxi-boards/sunxi-boards.mk b/package/sunxi-boards/sunxi-boards.mk new file mode 100644 index 0000000000..ef5b34d116 --- /dev/null +++ b/package/sunxi-boards/sunxi-boards.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# sunxi-boards +# +################################################################################ + +SUNXI_BOARDS_VERSION = 25a868189dbaa40872b2ac7d8a941dd73972eb08 +SUNXI_BOARDS_SITE = https://github.com/linux-sunxi/sunxi-boards/tarball/$(SUNXI_BOARDS_VERSION) +SUNXI_BOARDS_DEPENDENCIES = host-sunxi-tools +SUNXI_BOARDS_INSTALL_IMAGES = YES +SUNXI_BOARDS_INSTALL_TARGET = NO +SUNXI_BOARDS_FEX_FILE = $(call qstrip,$(BR2_PACKAGE_SUNXI_BOARDS_FEX_FILE)) + +define SUNXI_BOARDS_INSTALL_IMAGES_CMDS + $(FEX2BIN) $(@D)/sys_config/$(SUNXI_BOARDS_FEX_FILE) \ + $(BINARIES_DIR)/script.bin +endef + +ifeq ($(BR2_PACKAGE_SUNXI_BOARDS),y) +# we NEED a board name +ifeq ($(filter source,$(MAKECMDGOALS)),) +ifeq ($(SUNXI_BOARDS_FEX_FILE),) +$(error No sunxi .fex file specified. Check your BR2_PACKAGE_SUNXI_BOARDS_FEX_FILE settings) +endif +endif +endif + +$(eval $(generic-package)) diff --git a/package/sunxi-cedarx/Config.in b/package/sunxi-cedarx/Config.in new file mode 100644 index 0000000000..fc6e5298c3 --- /dev/null +++ b/package/sunxi-cedarx/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_SUNXI_CEDARX + bool "sunxi-cedarx" + depends on BR2_arm + depends on BR2_TOOLCHAIN_USES_GLIBC + help + Sunxi CedarX decoder libraries. CedarX is Allwinner's + multimedia co-processing technology for hardware accelerated + video and image decoding, as used inside their A10 SoC's and + others. + + http://github.com/linux-sunxi/cedarx-libs + http://linux-sunxi.org/CedarX + +comment "sunxi-cedarx needs an (e)glibc toolchain" + depends on BR2_arm + depends on !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/sunxi-cedarx/sunxi-cedarx.mk b/package/sunxi-cedarx/sunxi-cedarx.mk new file mode 100644 index 0000000000..5e1c820ab3 --- /dev/null +++ b/package/sunxi-cedarx/sunxi-cedarx.mk @@ -0,0 +1,59 @@ +################################################################################ +# +# sunxi-cedarx +# +################################################################################ + +SUNXI_CEDARX_VERSION = 74923e55fc3ef512d4cd2462da58ae5331611f37 +SUNXI_CEDARX_SITE = http://github.com/linux-sunxi/cedarx-libs/tarball/$(SUNXI_CEDARX_VERSION) + +SUNXI_CEDARX_INSTALL_STAGING = YES + +SUNXI_CEDARX_CONFIGURE_OPTS = \ + CROSS_COMPILE=$(TARGET_CROSS) + +ifeq ($(BR2_ARM_EABIHF),y) +SUNXI_CEDARX_BIN_DIR = $(@D)/libcedarv/linux-armhf +# libavheap.so is only available on EABIHF +define SUNXI_CEDARX_BUILD_AVHEAP + $(TARGET_CC) $(TARGET_CFLAGS) \ + -c $(SUNXI_CEDARX_BIN_DIR)/adapter/avheap/avheap.c \ + -o $(SUNXI_CEDARX_BIN_DIR)/adapter/avheap/avheap.o \ + -I $(SUNXI_CEDARX_BIN_DIR)/adapter/avheap \ + -I $(SUNXI_CEDARX_BIN_DIR)/ + $(TARGET_CC) -shared -L./ -Wl,-soname,libavheap.so \ + -o $(SUNXI_CEDARX_BIN_DIR)/adapter/avheap/libavheap.so \ + $(SUNXI_CEDARX_BIN_DIR)/adapter/avheap/avheap.o +endef +define SUNXI_CEDARX_INSTALL_AVHEAP + $(INSTALL) -D -m 755 $(SUNXI_CEDARX_BIN_DIR)/adapter/avheap/libavheap.so \ + $(1)/usr/lib/libavheap.so +endef +else +SUNXI_CEDARX_BIN_DIR = $(@D)/libcedarv/linux-armel +endif + +define SUNXI_CEDARX_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(SUNXI_CEDARX_BIN_DIR) \ + $(SUNXI_CEDARX_CONFIGURE_OPTS) + $(SUNXI_CEDARX_BUILD_AVHEAP) +endef + +define SUNXI_CEDARX_INSTALL_STAGING_CMDS + $(INSTALL) -d -m 755 $(STAGING_DIR)/usr/include/libvecore + $(INSTALL) -m 664 $(SUNXI_CEDARX_BIN_DIR)/libvecore/*.h \ + $(STAGING_DIR)/usr/include/libvecore + $(INSTALL) -m 644 $(SUNXI_CEDARX_BIN_DIR)/*.h \ + $(STAGING_DIR)/usr/include/ + $(INSTALL) -D -m 755 $(SUNXI_CEDARX_BIN_DIR)/libvecore/libvecore.so \ + $(STAGING_DIR)/usr/lib/libvecore.so + $(call SUNXI_CEDARX_INSTALL_AVHEAP, $(STAGING_DIR)) +endef + +define SUNXI_CEDARX_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(SUNXI_CEDARX_BIN_DIR)/libvecore/libvecore.so \ + $(TARGET_DIR)/usr/lib/libvecore.so + $(call SUNXI_CEDARX_INSTALL_AVHEAP, $(TARGET_DIR)) +endef + +$(eval $(generic-package)) diff --git a/package/sunxi-mali-prop/Config.in b/package/sunxi-mali-prop/Config.in new file mode 100644 index 0000000000..b9efb4e351 --- /dev/null +++ b/package/sunxi-mali-prop/Config.in @@ -0,0 +1,4 @@ +# Sunxi-mali-prop is a git submodule of sunxi-mali. To use this package +# select the sunxi-mali option. +config BR2_PACKAGE_SUNXI_MALI_PROP + bool diff --git a/package/sunxi-mali-prop/sunxi-mali-prop.mk b/package/sunxi-mali-prop/sunxi-mali-prop.mk new file mode 100644 index 0000000000..f04b0b072e --- /dev/null +++ b/package/sunxi-mali-prop/sunxi-mali-prop.mk @@ -0,0 +1,10 @@ +################################################################################ +# +# sunxi-mali-prop +# +################################################################################ + +SUNXI_MALI_PROP_VERSION = e4ced471d576708ac9aa093e41a0f91cf429862b +SUNXI_MALI_PROP_SITE = http://github.com/linux-sunxi/sunxi-mali-proprietary/tarball/$(SUNXI_MALI_PROP_VERSION) + +$(eval $(generic-package)) diff --git a/package/sunxi-mali/Config.in b/package/sunxi-mali/Config.in new file mode 100644 index 0000000000..2ca049db6c --- /dev/null +++ b/package/sunxi-mali/Config.in @@ -0,0 +1,62 @@ +config BR2_PACKAGE_SUNXI_MALI + bool "sunxi-mali" + select BR2_PACKAGE_HAS_OPENGL_EGL + select BR2_PACKAGE_HAS_OPENGL_ES + # The egl/gles mali libraries are provided as a git submodule of the + # sunxi-mali repo and are downloaded by the sunxi-mali-prop package. + select BR2_PACKAGE_SUNXI_MALI_PROP + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_arm + help + Install the ARM Mali drivers for sunxi based systems (i.e + systems based on ARM Allwinner SoCs). This driver requires + either the sunxi-kernel with the ARM Mali driver enabled or + the installation of the ARM Mali drivers as an external + module. + + http://github.com/linux-sunxi/sunxi-mali + +if BR2_PACKAGE_SUNXI_MALI + +config BR2_PACKAGE_SUNXI_MALI_DBG + bool "install malitest and maliver tools" + help + Install 3D triangle demo malitest application and the maliver application + which describes the kernel module version. + +choice + prompt "Version" + default BR2_PACKAGE_SUNXI_MALI_R3P0 + help + Select the version of the kernel module. For the sunxi-kernel, the + appropriate version number is r3p0. For other kernels, use the maliver + application to determine the appropriate version. + +config BR2_PACKAGE_SUNXI_MALI_R2P4 + bool "r2p4" + depends on BR2_ARM_EABI + +comment "r2p4 requires an EABI toolchain" + depends on !BR2_ARM_EABI + +config BR2_PACKAGE_SUNXI_MALI_R3P0 + bool "r3p0" + depends on BR2_ARM_EABIHF + +comment "r3p0 requires an EABIhf toolchain" + depends on !BR2_ARM_EABIHF + +config BR2_PACKAGE_SUNXI_MALI_R3P1 + depends on BR2_ARM_EABIHF + bool "r3p1" + +comment "r3p1 requires an EABIhf toolchain" + depends on !BR2_ARM_EABIHF + +endchoice + +endif + +comment "sunxi-mali needs an (e)glibc toolchain" + depends on BR2_arm + depends on !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/sunxi-mali/S80mali b/package/sunxi-mali/S80mali new file mode 100644 index 0000000000..ecfbab97b4 --- /dev/null +++ b/package/sunxi-mali/S80mali @@ -0,0 +1,54 @@ +#!/bin/sh -e + +install_driver() { + DRIVER=$1 + OPTS=$2 + + modprobe $DRIVER $OPTS + maj=$(awk "\$2==\"${DRIVER}\" { print \$1; }" /proc/devices) + + rm -f /dev/${DRIVER} + + mknod /dev/${DRIVER} c $maj 0 + chmod 600 /dev/${DRIVER} +} + +start() { + echo "mali: starting driver" + + BITSPERPIXEL="$(fbset | awk '/geom/ {print $6}')" + YRES="$(fbset | awk '/geom/ {print $3}')" + # Set RGBA ordering to something the drivers like + if [ "$BITSPERPIXEL" = "32" ] ; then + fbset -rgba 8/16,8/8,8/0,8/24 + fi + # Try to enable triple buffering when there's enough VRAM + fbset -vyres $(( YRES*3 )) + + install_driver mali + install_driver ump +} + +stop() { + echo "mali: stopping driver" + + rmmod ump + rmmod mali +} + +case "$1" in +start) + start +;; +stop) + stop +;; +restart) + stop + start +;; +*) + echo "mali: Please use start, stop, or restart." + exit 1 +;; +esac diff --git a/package/sunxi-mali/egl.pc b/package/sunxi-mali/egl.pc new file mode 100644 index 0000000000..b062ad1d35 --- /dev/null +++ b/package/sunxi-mali/egl.pc @@ -0,0 +1,12 @@ +prefix=/usr/ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: egl +Description: ARM Mali implementation of EGL +Version: 1.4 +Requires: +Libs: -L${libdir} -lEGL -lGLESv2 -lUMP +Cflags: -I${includedir}/EGL/ -I${includedir} + diff --git a/package/sunxi-mali/glesv2.pc b/package/sunxi-mali/glesv2.pc new file mode 100644 index 0000000000..9273678093 --- /dev/null +++ b/package/sunxi-mali/glesv2.pc @@ -0,0 +1,12 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: glesv2 +Description: ARM Mali implementation of OpenGL ESv2 +Version: 2.0 +Requires: +Libs: -L${libdir} -lGLESv2 -lGLESv1_CM -lUMP +Cflags: -I${includedir}/GLES2 + diff --git a/package/sunxi-mali/sunxi-mali.mk b/package/sunxi-mali/sunxi-mali.mk new file mode 100644 index 0000000000..dec211fc49 --- /dev/null +++ b/package/sunxi-mali/sunxi-mali.mk @@ -0,0 +1,84 @@ +################################################################################ +# +# sunxi-mali +# +################################################################################ + +SUNXI_MALI_VERSION = c2491fe952354ba44538064e534ed7c731cedb1e +SUNXI_MALI_SITE = http://github.com/linux-sunxi/sunxi-mali/tarball/$(SUNXI_MALI_VERSION) + +SUNXI_MALI_INSTALL_STAGING = YES +SUNXI_MALI_DEPENDENCIES = sunxi-mali-prop + +# The options below must be provided in the environment. Providing these +# through options overrides the value and prevents the makefiles from +# appending to these variables. This is used throughout the sunxi-mali build +# system. +# +# Furthermore, the -lm -dl -lpthread options are included due to a possible bug +# in the way the linaro 2013.06 toolchain handles shared libraries. +SUNXI_MALI_MAKE_ENV = \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) -lm -ldl -lpthread" \ + $(TARGET_MAKE_ENV) + +ifeq ($(BR2_ARM_EABIHF),y) +SUNXI_MALI_MAKE_OPTS += ABI=armhf +else +SUNXI_MALI_MAKE_OPTS += ABI=armel +endif + +SUNXI_MALI_MAKE_OPTS += EGL_TYPE=framebuffer + +ifeq ($(BR2_PACKAGE_SUNXI_MALI_R2P4),y) +SUNXI_MALI_MAKE_OPTS += VERSION=r2p4 +endif +ifeq ($(BR2_PACKAGE_SUNXI_MALI_R3P0),y) +SUNXI_MALI_MAKE_OPTS += VERSION=r3p0 +endif +ifeq ($(BR2_PACKAGE_SUNXI_MALI_R3P1),y) +SUNXI_MALI_MAKE_OPTS += VERSION=r3p1 +endif + +define SUNXI_MALI_GIT_SUBMODULE_FIXUP + rm -rf $(@D)/lib/mali + cp -rf $(SUNXI_MALI_PROP_SRCDIR) $(@D)/lib/mali +endef + +SUNXI_MALI_PRE_CONFIGURE_HOOKS += SUNXI_MALI_GIT_SUBMODULE_FIXUP + +define SUNXI_MALI_BUILD_CMDS + $(SUNXI_MALI_MAKE_ENV) $(MAKE) -C $(@D) $(SUNXI_MALI_MAKE_OPTS) all + $(TARGET_CC) $(TARGET_CFLAGS) -o $(@D)/version/version \ + $(@D)/version/version.c +endef + +define SUNXI_MALI_INSTALL_STAGING_CMDS + $(SUNXI_MALI_MAKE_ENV) $(MAKE) -C $(@D) \ + $(SUNXI_MALI_MAKE_OPTS) DESTDIR=$(STAGING_DIR) install + # test must be built after install because it depends on headers that are + # generated during the install above. + $(SUNXI_MALI_MAKE_ENV) $(MAKE) -C $(@D) $(SUNXI_MALI_MAKE_OPTS) test + $(INSTALL) -D -m 0644 package/sunxi-mali/egl.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc + $(INSTALL) -D -m 0644 package/sunxi-mali/glesv2.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc +endef + +define SUNXI_MALI_INSTALL_TARGET_CMDS + $(SUNXI_MALI_MAKE_ENV) $(MAKE) -C $(@D)/lib \ + $(SUNXI_MALI_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install + # add execution permissions so that libraries are properly stripped + chmod +x $(addprefix $(TARGET_DIR)/usr/lib/lib,EGL.so GLESv1_CM.so GLESv2.so Mali.so UMP.so*) + $(if $(BR2_PACKAGE_SUNXI_MALI_DBG), + $(INSTALL) -m 755 $(@D)/version/version $(TARGET_DIR)/usr/bin/maliver; \ + $(INSTALL) -m 755 $(@D)/test/test $(TARGET_DIR)/usr/bin/malitest + ) +endef + +define SUNXI_MALI_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/sunxi-mali/S80mali \ + $(TARGET_DIR)/etc/init.d/S80mali +endef + +$(eval $(generic-package)) diff --git a/package/sunxi-tools/Config.in b/package/sunxi-tools/Config.in new file mode 100644 index 0000000000..16bf2dc57b --- /dev/null +++ b/package/sunxi-tools/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_SUNXI_TOOLS + bool "sunxi nand-part" + depends on BR2_arm + help + nand-part is part of sunxi-tools for Allwinner A10 (aka sun4i) and + A13 (aka sun5i) based devices. It is a tool to repartition the + internal NAND on sunxi devices. + + http://linux-sunxi.org/Sunxi-tools diff --git a/package/sunxi-tools/Config.in.host b/package/sunxi-tools/Config.in.host new file mode 100644 index 0000000000..5fab5e6ff5 --- /dev/null +++ b/package/sunxi-tools/Config.in.host @@ -0,0 +1,12 @@ +config BR2_PACKAGE_HOST_SUNXI_TOOLS + bool "host sunxi-tools" + depends on BR2_arm + help + Tools for Allwinner A10 (aka sun4i) and A13 (aka sun5i) + based devices. This includes fex2bin which can be used to + compile .fex board definition files to the binary script.bin + format required by the linux-sunxi kernel. These tools are + specific for linux-sunxi kernel and do not apply to the + mainline Linux kernel version. + + http://linux-sunxi.org/Sunxi-tools diff --git a/package/sunxi-tools/sunxi-tools.mk b/package/sunxi-tools/sunxi-tools.mk new file mode 100644 index 0000000000..d47574c886 --- /dev/null +++ b/package/sunxi-tools/sunxi-tools.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# sunxi-tools +# +################################################################################ + +SUNXI_TOOLS_VERSION = 3a94e721dd8d1e13d0b25da0a83463891e8e9ee0 +SUNXI_TOOLS_SITE = http://github.com/linux-sunxi/sunxi-tools/tarball/$(SUNXI_TOOLS_VERSION) +SUNXI_TOOLS_LICENSE = GPLv2+ +SUNXI_TOOLS_LICENSE_FILES = COPYING +HOST_SUNXI_TOOLS_DEPENDENCIES = host-libusb +FEX2BIN = $(HOST_DIR)/usr/bin/fex2bin + +define HOST_SUNXI_TOOLS_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) \ + CFLAGS="$(HOST_CFLAGS) -std=c99 -D_POSIX_C_SOURCE=200112L -Iinclude/" \ + -C $(@D) +endef + +define HOST_SUNXI_TOOLS_INSTALL_CMDS + for i in fexc bin2fex fex2bin bootinfo fel pio; do \ + $(INSTALL) -D -m 0755 $(@D)/$$i $(HOST_DIR)/usr/bin/$$i ; \ + done +endef + +define SUNXI_TOOLS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -std=c99 -D_POSIX_C_SOURCE=200112L -Iinclude/" \ + -C $(@D) nand-part +endef + +define SUNXI_TOOLS_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/nand-part $(TARGET_DIR)/usr/bin/nand-part +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/supervisor/Config.in b/package/supervisor/Config.in new file mode 100644 index 0000000000..53401810f3 --- /dev/null +++ b/package/supervisor/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_SUPERVISOR + bool "supervisor" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_SETUPTOOLS + select BR2_PACKAGE_PYTHON_MELD3 + help + A client/server system that allows its users to control a + number of processes on UNIX-like operating systems. + + http://supervisord.org/ + +comment "supervisor needs the python interpreter" + depends on !BR2_PACKAGE_PYTHON diff --git a/package/supervisor/S99supervisord b/package/supervisor/S99supervisord new file mode 100755 index 0000000000..0856d65a5d --- /dev/null +++ b/package/supervisor/S99supervisord @@ -0,0 +1,29 @@ +#!/bin/sh + +mkdir -p /var/log/supervisor + +case "$1" in + start) + echo -n "Starting supervisord: " + start-stop-daemon -S -q -p /var/run/supervisord.pid --exec /usr/bin/supervisord + echo "done" + ;; + stop) + echo -n "Stopping supervisord: " + start-stop-daemon -K -q -p /var/run/supervisord.pid + echo "done" + ;; + restart) + "$0" stop + sleep 5 + "$0" start + ;; + reload) + start-stop-daemon -K -q -p /var/run/supervisord.pid -s HUP + ;; + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac + +exit $? diff --git a/package/supervisor/supervisor.mk b/package/supervisor/supervisor.mk new file mode 100644 index 0000000000..40ad8ce3a9 --- /dev/null +++ b/package/supervisor/supervisor.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# supervisor +# +################################################################################ + +SUPERVISOR_VERSION = 3.0a12 +SUPERVISOR_SITE = http://pypi.python.org/packages/source/s/supervisor/ +SUPERVISOR_LICENSE_FILES = LICENSES.txt + +SUPERVISOR_DEPENDENCIES = python host-python-setuptools + +define SUPERVISOR_BUILD_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build) +endef + +define SUPERVISOR_INSTALL_TARGET_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=/usr --root=$(TARGET_DIR)) + sed -i '1s|#!.*python.*|#!/usr/bin/env python|' $(TARGET_DIR)/usr/bin/{echo_supervisord_conf,pidproxy,supervisorctl,supervisord} + $(INSTALL) -d -m 755 $(TARGET_DIR)/etc/supervisor.d + $(INSTALL) -D -m 644 package/supervisor/supervisord.conf $(TARGET_DIR)/etc/supervisord.conf + $(INSTALL) -m 755 package/supervisor/S99supervisord $(TARGET_DIR)/etc/init.d/S99supervisord +endef + +$(eval $(generic-package)) diff --git a/package/supervisor/supervisord.conf b/package/supervisor/supervisord.conf new file mode 100644 index 0000000000..1372a688ab --- /dev/null +++ b/package/supervisor/supervisord.conf @@ -0,0 +1,18 @@ +[unix_http_server] +file = /var/run/supervisor.sock + +[supervisord] +logfile = /var/log/supervisor/supervisord.log +logfile_maxbytes = 200KB +logfile_backups = 1 +pidfile = /var/run/supervisord.pid +childlogdir = /var/log/supervisor + +[rpcinterface:supervisor] +supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface + +[supervisorctl] +serverurl = unix:///var/run/supervisor.sock + +[include] +files = /etc/supervisor.d/*.conf diff --git a/package/swig/swig.mk b/package/swig/swig.mk new file mode 100644 index 0000000000..79839ea7ff --- /dev/null +++ b/package/swig/swig.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# swig +# +################################################################################ + +SWIG_VERSION = 2.0.10 +SWIG_SITE = http://downloads.sourceforge.net/project/swig/swig/swig-$(SWIG_VERSION) +SWIG_DEPENDENCIES = host-bison +HOST_SWIG_CONF_OPT = \ + --without-pcre \ + --disable-ccache \ + --without-octave +SWIG_LICENSE = GPLv3+ BSD-2c BSD-3c +SWIG_LICENSE_FILES = LICENSE LICENSE-GPL LICENSE-UNIVERSITIES + +$(eval $(host-autotools-package)) diff --git a/package/sylpheed/Config.in b/package/sylpheed/Config.in index 16f03bef13..f03ae87706 100644 --- a/package/sylpheed/Config.in +++ b/package/sylpheed/Config.in @@ -4,4 +4,4 @@ config BR2_PACKAGE_SYLPHEED help lightweight and user-friendly e-mail client. - http://sylpheed.sraoss.jp/sylpheed/v2.4 + http://sylpheed.sraoss.jp/en/ diff --git a/package/sylpheed/sylpheed.mk b/package/sylpheed/sylpheed.mk index dbd2408f18..cc79eebadc 100644 --- a/package/sylpheed/sylpheed.mk +++ b/package/sylpheed/sylpheed.mk @@ -1,18 +1,28 @@ -############################################################# +################################################################################ # # sylpheed # -############################################################# -SYLPHEED_VERSION_MAJOR = 3.1 +################################################################################ + +SYLPHEED_VERSION_MAJOR = 3.2 SYLPHEED_VERSION_MINOR = 0 SYLPHEED_VERSION = $(SYLPHEED_VERSION_MAJOR).$(SYLPHEED_VERSION_MINOR) SYLPHEED_SOURCE = sylpheed-$(SYLPHEED_VERSION).tar.bz2 SYLPHEED_SITE = http://sylpheed.sraoss.jp/sylpheed/v$(SYLPHEED_VERSION_MAJOR) +SYLPHEED_LICENSE = GPLv2+ (executables), LGPLv2.1+ (library, attachment plugin) +SYLPHEED_LICENSE_FILES = COPYING COPYING.LIB +SYLPHEED_CONF_OPT = --disable-gtkspell --disable-gpgme +SYLPHEED_DEPENDENCIES = host-pkgconf libgtk2 -SYLPHEED_CONF_OPT = --disable-gtkspell --program-prefix="" \ - --includedir=$(STAGING_DIR)/usr/include +# Remove the -I$(includedir) from the Makefiles +# because it refers to the host /usr/include. +define SYLPHEED_PRECONFIGURE + for i in $$(find $(@D) -name "Makefile*"); do \ + sed -i 's:-I$$(includedir)::g' $$i; \ + done +endef -SYLPHEED_DEPENDENCIES = host-pkg-config libgtk2 +SYLPHEED_PRE_CONFIGURE_HOOKS += SYLPHEED_PRECONFIGURE ifeq ($(BR2_PACKAGE_OPENSSL),y) SYLPHEED_DEPENDENCIES += openssl @@ -21,4 +31,4 @@ else SYLPHEED_CONF_OPT += --disable-ssl endif -$(eval $(call AUTOTARGETS,package,sylpheed)) +$(eval $(autotools-package)) diff --git a/package/synergy/Config.in b/package/synergy/Config.in index 7d8c54eceb..20a3a9a592 100644 --- a/package/synergy/Config.in +++ b/package/synergy/Config.in @@ -12,5 +12,6 @@ config BR2_PACKAGE_SYNERGY http://synergy2.sourceforge.net/ -comment "synergy requires a toolchain with C++ and WCHAR support enabled" - depends on BR2_PACKAGE_XORG7 && !BR2_INSTALL_LIBSTDCPP && !BR2_USE_WCHAR +comment "synergy needs a toolchain w/ C++, wchar" + depends on BR2_PACKAGE_XORG7 + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR) diff --git a/package/synergy/synergy-1.3.1-remove-werror.patch b/package/synergy/synergy-1.3.1-remove-werror.patch new file mode 100644 index 0000000000..31a8c2b510 --- /dev/null +++ b/package/synergy/synergy-1.3.1-remove-werror.patch @@ -0,0 +1,16 @@ +Remove -Werror from CXXFLAGS + +Signed-off-by: Markos Chandras + +Index: synergy-1.3.1/configure.in +=================================================================== +--- synergy-1.3.1.orig/configure.in ++++ synergy-1.3.1/configure.in +@@ -239,7 +239,6 @@ dnl checks for system services + + dnl enable maximum compiler warnings and warnings are errors. + ACX_CXX_WARNINGS +-ACX_CXX_WARNINGS_ARE_ERRORS + + dnl adjust compiler and linker variables + CXXFLAGS="$CXXFLAGS $SYNERGY_CXXFLAGS $ARCH_CFLAGS" diff --git a/package/synergy/synergy.mk b/package/synergy/synergy.mk index ce3f2141a7..89a3d496ac 100644 --- a/package/synergy/synergy.mk +++ b/package/synergy/synergy.mk @@ -1,16 +1,17 @@ -############################################################# +################################################################################ # # synergy # -############################################################# +################################################################################ SYNERGY_VERSION = 1.3.1 -SYNERGY_SOURCE = synergy-$(SYNERGY_VERSION).tar.gz -SYNERGY_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/synergy2/ -SYNERGY_AUTORECONF = NO -SYNERGY_INSTALL_STAGING = NO -SYNERGY_INSTALL_TARGET = YES +SYNERGY_SITE = http://downloads.sourceforge.net/project/synergy2/Sources/$(SYNERGY_VERSION) -SYNERGY_DEPENDENCIES = xserver_xorg-server xlib_libXtst +SYNERGY_AUTORECONF = YES +SYNERGY_CONF_OPT = --x-includes=$(STAGING_DIR)/usr/include/X11 \ + --x-libraries=$(STAGING_DIR)/usr/lib -$(eval $(call AUTOTARGETS,package,synergy)) +SYNERGY_DEPENDENCIES = xlib_libXtst \ + $(if $(BR2_PACKAGE_XLIB_LIBXINERAMA),xlib_libXinerama) + +$(eval $(autotools-package)) diff --git a/package/sysklogd/Config.in b/package/sysklogd/Config.in index e3cf2ba265..1216bccf8c 100644 --- a/package/sysklogd/Config.in +++ b/package/sysklogd/Config.in @@ -6,5 +6,5 @@ config BR2_PACKAGE_SYSKLOGD http://www.infodrom.org/products/sysklogd/ -comment "syslogd requires a toolchain with LARGEFILE support" +comment "syslogd needs a toolchain w/ largefile" depends on !BR2_LARGEFILE diff --git a/package/sysklogd/sysklogd.mk b/package/sysklogd/sysklogd.mk index 11aee2af57..8ffdc0f774 100644 --- a/package/sysklogd/sysklogd.mk +++ b/package/sysklogd/sysklogd.mk @@ -1,8 +1,9 @@ -############################################################# +################################################################################ # # sysklogd # -############################################################# +################################################################################ + SYSKLOGD_VERSION = 1.5 SYSKLOGD_SOURCE = sysklogd_$(SYSKLOGD_VERSION).orig.tar.gz SYSKLOGD_PATCH = sysklogd_$(SYSKLOGD_VERSION)-6.diff.gz @@ -15,7 +16,7 @@ endif define SYSKLOGD_DEBIAN_PATCHES if [ -d $(@D)/debian/patches ]; then \ - toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches \*.patch; \ + support/scripts/apply-patches.sh $(@D) $(@D)/debian/patches \*.patch; \ fi endef @@ -52,4 +53,4 @@ define SYSKLOGD_CLEAN_CMDS $(MAKE) -C $(@D) clean endef -$(eval $(call GENTARGETS,package,sysklogd)) +$(eval $(generic-package)) diff --git a/package/sysprof/Config.in b/package/sysprof/Config.in new file mode 100644 index 0000000000..e1b0488e84 --- /dev/null +++ b/package/sysprof/Config.in @@ -0,0 +1,31 @@ +config BR2_PACKAGE_SYSPROF + bool "sysprof" + select BR2_PACKAGE_LIBGLIB2 + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + # In its util.h file, sysprof contains architecture-specific + # code + depends on BR2_i386 || BR2_x86_64 || BR2_powerpc || BR2_sh4a || BR2_sh4aeb + help + Sysprof is a statistical, system-wide profiler that can + profile user and kernel code using the perf API. + + http://sysprof.com + +if BR2_PACKAGE_SYSPROF + +config BR2_PACKAGE_SYSPROF_GUI + bool "sysprof GUI" + depends on BR2_PACKAGE_LIBGTK2 + select BR2_PACKAGE_LIBGLADE + select BR2_PACKAGE_GDK_PIXBUF + help + GUI for the sysprof system-wide statistical profiler. + +endif + +comment "sysprof needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on BR2_i386 || BR2_x86_64 || BR2_powerpc || BR2_sh4a || BR2_sh4aeb + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/sysprof/sysprof-01-fix-kernel-version-warning.patch b/package/sysprof/sysprof-01-fix-kernel-version-warning.patch new file mode 100644 index 0000000000..7b45b3088d --- /dev/null +++ b/package/sysprof/sysprof-01-fix-kernel-version-warning.patch @@ -0,0 +1,26 @@ +From 6a5dfd385ca86b9e40b1a73237408f76b671b490 Mon Sep 17 00:00:00 2001 +From: Pauli Nieminen +Date: Mon, 09 Apr 2012 18:12:59 +0000 +Subject: Don't complain about old kernel for 3.0+ kernels + +Linux kernel version received bump to 3.0 that causes configure to +complain about older kernel. To avoid the warning configure needs to +check major and minor versions before micro. + +Signed-off-by: Pauli Nieminen +--- +diff --git a/configure.ac b/configure.ac +index 34fdc43..e4f6d5d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -83,7 +83,7 @@ Makefile + + AC_OUTPUT + +-if [[ $KMICRO -lt 31 ]] ; then ++if [[ $KMAJOR -eq 2 -a $KMINOR -eq 6 -a $KMICRO -lt 31 ]] ; then + echo + echo "%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%" + echo "@" +-- +cgit v0.9.0.2 diff --git a/package/sysprof/sysprof-02-define-NT_GNU_BUILD_ID.patch b/package/sysprof/sysprof-02-define-NT_GNU_BUILD_ID.patch new file mode 100644 index 0000000000..dcc2cbe67c --- /dev/null +++ b/package/sysprof/sysprof-02-define-NT_GNU_BUILD_ID.patch @@ -0,0 +1,22 @@ +On uclibc elf.h does not have GNU extentions but we need this define +so we define it locally if its not getting it from elf.h + +Signed-off-by: Khem Raj + +Upstream-Status: Pending + +Index: git/elfparser.h +=================================================================== +--- git.orig/elfparser.h 2011-07-16 18:57:41.000000000 -0700 ++++ git/elfparser.h 2011-07-16 20:28:54.733829895 -0700 +@@ -17,6 +17,10 @@ + */ + #include + ++#ifndef NT_GNU_BUILD_ID ++#define NT_GNU_BUILD_ID 3 ++#endif ++ + typedef struct ElfSym ElfSym; + typedef struct ElfParser ElfParser; + diff --git a/package/sysprof/sysprof-03-fix-powerpc-checks.patch b/package/sysprof/sysprof-03-fix-powerpc-checks.patch new file mode 100644 index 0000000000..8d69f74984 --- /dev/null +++ b/package/sysprof/sysprof-03-fix-powerpc-checks.patch @@ -0,0 +1,26 @@ +From 4708a509aa9d65ae93e9824e42ddbc6e8d42d90c Mon Sep 17 00:00:00 2001 +From: Michel Dänzer +Date: Sat, 27 Aug 2011 18:04:44 +0000 +Subject: Fix PowerPC checks for __NR_perf_counter_open. + +__ppc__ isn't defined here on Debian powerpc. Grepping through the headers +installed in /usr/include, there are a few references to __ppc__ and +__ppc64__, but I suspect they're for other OSs. + +Signed-off-by: Michel Dänzer +--- +diff --git a/collector.c b/collector.c +index b28964f..fe16967 100644 +--- a/collector.c ++++ b/collector.c +@@ -175,7 +175,7 @@ sysprof_perf_counter_open (struct perf_counter_attr *attr, + #define __NR_perf_counter_open 337 + #elif defined(__hppa__) + #define __NR_perf_counter_open 318 +-#elif defined(__ppc__) || defined(__ppc64__) ++#elif defined(__powerpc__) || defined(__powerpc64__) + #define __NR_perf_counter_open 319 + #elif defined(__s390__) + #define __NR_perf_counter_open 331 +-- +cgit v0.9.0.2 diff --git a/package/sysprof/sysprof.mk b/package/sysprof/sysprof.mk new file mode 100644 index 0000000000..f288aaf7cc --- /dev/null +++ b/package/sysprof/sysprof.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# sysprof +# +################################################################################ + +SYSPROF_VERSION = 1.1.8 +SYSPROF_SITE = http://sysprof.com +SYSPROF_DEPENDENCIES = libglib2 +SYSPROF_AUTORECONF = YES + +ifeq ($(BR2_PACKAGE_SYSPROF_GUI),y) +SYSPROF_DEPENDENCIES += libgtk2 libglade gdk-pixbuf +endif + +define SYSPROF_CREATE_M4_DIR + mkdir -p $(@D)/m4 +endef + +SYSPROF_POST_PATCH_HOOKS += SYSPROF_CREATE_M4_DIR + +$(eval $(autotools-package)) diff --git a/package/sysstat/Config.in b/package/sysstat/Config.in index 28274d93e0..c262799104 100644 --- a/package/sysstat/Config.in +++ b/package/sysstat/Config.in @@ -1,40 +1,41 @@ config BR2_PACKAGE_SYSSTAT bool "sysstat" select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE - select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE + # Uses fork() + depends on BR2_USE_MMU help - The sysstat utilities are a collection of performance - monitoring tools for Linux. These include sar, sadf, mpstat, - iostat, pidstat and sa tools. + The sysstat utilities are a collection of performance + monitoring tools for Linux. These include sar, sadf, mpstat, + iostat, pidstat and sa tools. - Some Features : + Some Features : - * Input / Output and transfer rate statistics (global, per - device, per partition, per network filesystem and per - Linux task / PID) - * CPU statistics (global, per CPU and per Linux task / - PID), including support for virtualization architectures - * Memory and swap space utilization statistics - * Virtual memory, paging and fault statistics - * Per-task (per-PID) memory and page fault statistics - * Global CPU and page fault statistics for tasks and all - their children - * Process creation activity - * Interrupt statistics (global, per CPU and per interrupt, - including potential APIC interrupt sources) - * Extensive network statistics: network interface activity - (number of packets and kB received and transmitted per - second, etc.) including failures from network devices; - network traffic statistics for IP, TCP, ICMP and UDP - protocols based on SNMPv2 standards; support for - IPv6-related protocols. - * NFS server and client activity - * Socket statistics - * Run queue and system load statistics - * Kernel internal tables utilization statistics - * System and per Linux task switching activity - * Swapping statistics - * TTY device activity - * Power management statistics + * Input / Output and transfer rate statistics (global, per + device, per partition, per network filesystem and per + Linux task / PID) + * CPU statistics (global, per CPU and per Linux task / + PID), including support for virtualization architectures + * Memory and swap space utilization statistics + * Virtual memory, paging and fault statistics + * Per-task (per-PID) memory and page fault statistics + * Global CPU and page fault statistics for tasks and all + their children + * Process creation activity + * Interrupt statistics (global, per CPU and per interrupt, + including potential APIC interrupt sources) + * Extensive network statistics: network interface activity + (number of packets and kB received and transmitted per + second, etc.) including failures from network devices; + network traffic statistics for IP, TCP, ICMP and UDP + protocols based on SNMPv2 standards; support for + IPv6-related protocols. + * NFS server and client activity + * Socket statistics + * Run queue and system load statistics + * Kernel internal tables utilization statistics + * System and per Linux task switching activity + * Swapping statistics + * TTY device activity + * Power management statistics http://pagesperso-orange.fr/sebastien.godard/ diff --git a/package/sysstat/sysstat.mk b/package/sysstat/sysstat.mk index 09e5177d49..02e4c88503 100644 --- a/package/sysstat/sysstat.mk +++ b/package/sysstat/sysstat.mk @@ -1,20 +1,19 @@ -############################################################# +################################################################################ # # sysstat # -############################################################# +################################################################################ -SYSSTAT_VERSION = 9.1.7 +SYSSTAT_VERSION = 10.0.3 SYSSTAT_SOURCE = sysstat-$(SYSSTAT_VERSION).tar.bz2 -SYSSTAT_SITE = http://pagesperso-orange.fr/sebastien.godard/ +SYSSTAT_SITE = http://pagesperso-orange.fr/sebastien.godard SYSSTAT_CONF_OPT = --disable-man-group --disable-sensors - -ifneq ($(BR2_HAVE_DOCUMENTATION),y) -SYSSTAT_CONF_OPT += --disable-documentation -endif +SYSSTAT_DEPENDENCIES = host-gettext +SYSSTAT_LICENSE = GPLv2+ +SYSSTAT_LICENSE_FILES = COPYING ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) -SYSSTAT_DEPENDENCIES += gettext libintl +SYSSTAT_DEPENDENCIES += gettext SYSSTAT_MAKE_OPT += CFLAGS+=-lintl endif @@ -22,4 +21,4 @@ endif # among other things. So we don't install it. SYSSTAT_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) INSTALL_ISAG=n install -$(eval $(call AUTOTARGETS,package,sysstat)) +$(eval $(autotools-package)) diff --git a/package/systemd/Config.in b/package/systemd/Config.in new file mode 100644 index 0000000000..f6a15e3004 --- /dev/null +++ b/package/systemd/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_SYSTEMD + bool "systemd" + depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV + depends on BR2_INET_IPV6 + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus + depends on BR2_USE_MMU # dbus + select BR2_PACKAGE_DBUS + select BR2_PACKAGE_LIBCAP + help + systemd is a system and service manager for Linux, compatible with + SysV and LSB init scripts. systemd provides aggressive parallelization + capabilities, uses socket and D-Bus activation for starting services, + offers on-demand starting of daemons, keeps track of processes using + Linux cgroups, supports snapshotting and restoring of the system + state, maintains mount and automount points and implements an + elaborate transactional dependency-based service control logic. + It can work as a drop-in replacement for sysvinit. + + http://freedesktop.org/wiki/Software/systemd + +comment "systemd needs udev /dev management and a toolchain w/ IPv6, threads" + depends on BR2_USE_MMU + depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV || !BR2_INET_IPV6 || \\ + !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/systemd/systemd-fix-getty-unit.patch b/package/systemd/systemd-fix-getty-unit.patch new file mode 100644 index 0000000000..6df54b1325 --- /dev/null +++ b/package/systemd/systemd-fix-getty-unit.patch @@ -0,0 +1,34 @@ +Prefer getty to agetty in console setup systemd units + +Signed-off-by: Maxime Ripard +--- + units/getty@.service.m4 | 2 +- + units/serial-getty@.service.m4 | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +Index: systemd-37/units/getty@.service.m4 +=================================================================== +--- systemd-37.orig/units/getty@.service.m4 ++++ systemd-37/units/getty@.service.m4 +@@ -32,7 +32,7 @@ + + [Service] + Environment=TERM=linux +-ExecStart=-/sbin/agetty %I 38400 ++ExecStart=-/sbin/getty -L %I 115200 vt100 + Restart=always + RestartSec=0 + UtmpIdentifier=%I +Index: systemd-37/units/serial-getty@.service.m4 +=================================================================== +--- systemd-37.orig/units/serial-getty@.service.m4 ++++ systemd-37/units/serial-getty@.service.m4 +@@ -32,7 +32,7 @@ + + [Service] + Environment=TERM=vt100 +-ExecStart=-/sbin/agetty -s %I 115200,38400,9600 ++ExecStart=-/sbin/getty -L %I 115200 vt100 + Restart=always + RestartSec=0 + UtmpIdentifier=%I diff --git a/package/systemd/systemd-fix-page-size.patch b/package/systemd/systemd-fix-page-size.patch new file mode 100644 index 0000000000..241ceb8c0b --- /dev/null +++ b/package/systemd/systemd-fix-page-size.patch @@ -0,0 +1,43 @@ +commit 7264278fbbdc1dc6c30fedc902d1337594aa6ff6 +Author: Lennart Poettering +Date: Wed Mar 21 23:47:44 2012 +0100 + + journal: PAGE_SIZE is not known on ppc and other archs + + Let's use NAME_MAX, as suggested by Dan Walsh + +diff --git a/src/journal/journald.c b/src/journal/journald.c +index d27cb60..87390bd 100644 +--- a/src/journal/journald.c ++++ b/src/journal/journald.c +@@ -29,7 +29,6 @@ + #include + #include + #include +-#include + + #include + #include +@@ -2149,10 +2148,20 @@ static int process_event(Server *s, struct epoll_event *ev) { + size_t label_len = 0; + union { + struct cmsghdr cmsghdr; ++ ++ /* We use NAME_MAX space for the ++ * SELinux label here. The kernel ++ * currently enforces no limit, but ++ * according to suggestions from the ++ * SELinux people this will change and ++ * it will probably be identical to ++ * NAME_MAX. For now we use that, but ++ * this should be updated one day when ++ * the final limit is known.*/ + uint8_t buf[CMSG_SPACE(sizeof(struct ucred)) + + CMSG_SPACE(sizeof(struct timeval)) + +- CMSG_SPACE(sizeof(int)) + +- CMSG_SPACE(PAGE_SIZE)]; /* selinux label */ ++ CMSG_SPACE(sizeof(int)) + /* fd */ ++ CMSG_SPACE(NAME_MAX)]; /* selinux label */ + } control; + ssize_t n; + int v; diff --git a/package/systemd/systemd-uclibc-fix.patch b/package/systemd/systemd-uclibc-fix.patch new file mode 100644 index 0000000000..9a208450ad --- /dev/null +++ b/package/systemd/systemd-uclibc-fix.patch @@ -0,0 +1,59 @@ +[PATCH] fix build with uClibc + +Based on OE patch from Khem Raj: + +http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch + +But extended to also cover execvpe (OE carries a patch adding execvpe +support to uClibc). + +Signed-off-by: Peter Korsgaard +--- + src/journal/journal-file.c | 2 ++ + src/macro.h | 15 +++++++++++++++ + 2 files changed, 17 insertions(+) + +Index: systemd-44/src/macro.h +=================================================================== +--- systemd-44.orig/src/macro.h ++++ systemd-44/src/macro.h +@@ -28,6 +28,21 @@ + #include + #include + ++#ifdef __UCLIBC__ ++/* uclibc does not implement mkostemp GNU extension */ ++#define mkostemp(x,y) mkstemp(x) ++/* uclibc does not implement execvpe GNU extension */ ++#ifndef _GNU_SOURCE ++#define _GNU_SOURCE ++#endif ++#include ++static inline int execvpe(const char *file, char *const argv[], ++ char *const envp[]) ++{ ++ environ = (char **)envp; ++ return execvp(file, argv); ++} ++#endif + #define _printf_attr_(a,b) __attribute__ ((format (printf, a, b))) + #define _sentinel_ __attribute__ ((sentinel)) + #define _noreturn_ __attribute__((noreturn)) +Index: systemd-44/src/journal/journal-file.c +=================================================================== +--- systemd-44.orig/src/journal/journal-file.c ++++ systemd-44/src/journal/journal-file.c +@@ -229,11 +229,13 @@ + } + } + ++#ifndef __UCLIBC__ + /* Note that the glibc fallocate() fallback is very + inefficient, hence we try to minimize the allocation area + as we can. */ + if (posix_fallocate(f->fd, old_size, new_size - old_size) < 0) + return -errno; ++#endif + + if (fstat(f->fd, &f->last_stat) < 0) + return -errno; diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk new file mode 100644 index 0000000000..4e4955e2bb --- /dev/null +++ b/package/systemd/systemd.mk @@ -0,0 +1,75 @@ +################################################################################ +# +# systemd +# +################################################################################ + +SYSTEMD_VERSION = 44 +SYSTEMD_SITE = http://www.freedesktop.org/software/systemd/ +SYSTEMD_SOURCE = systemd-$(SYSTEMD_VERSION).tar.xz +SYSTEMD_LICENSE = GPLv2+ +SYSTEMD_LICENSE_FILES = LICENSE +SYSTEMD_INSTALL_STAGING = YES +SYSTEMD_DEPENDENCIES = \ + host-intltool \ + libcap \ + udev \ + dbus + +# Make sure that systemd will always be built after busybox so that we have +# a consistent init setup between two builds +ifeq ($(BR2_PACKAGE_BUSYBOX),y) + SYSTEMD_DEPENDENCIES += busybox +endif + +SYSTEMD_CONF_OPT += \ + --with-distro=other \ + --disable-selinux \ + --disable-pam \ + --disable-libcryptsetup \ + --disable-gtk \ + --disable-plymouth \ + --with-rootdir=/ \ + --with-dbuspolicydir=/etc/dbus-1/system.d \ + --with-dbussessionservicedir=/usr/share/dbus-1/services \ + --with-dbussystemservicedir=/usr/share/dbus-1/system-services \ + --with-dbusinterfacedir=/usr/share/dbus-1/interfaces \ + --with-udevrulesdir=/etc/udev/rules.d \ + --with-sysvinit-path=/etc/init.d/ \ + --without-sysvrcd-path \ + --enable-split-usr + +ifeq ($(BR2_PACKAGE_ACL),y) + SYSTEMD_CONF_OPT += --enable-acl + SYSTEMD_DEPENDENCIES += acl +else + SYSTEMD_CONF_OPT += --disable-acl +endif + +ifneq ($(BR2_LARGEFILE),y) + SYSTEMD_CONF_OPT += --disable-largefile +endif + +# mq_getattr needs -lrt +SYSTEMD_MAKE_OPT += LIBS=-lrt +SYSTEMD_MAKE_OPT += LDFLAGS+=-ldl + +define SYSTEMD_INSTALL_INIT_HOOK + ln -fs ../usr/lib/systemd/systemd $(TARGET_DIR)/sbin/init + ln -fs ../usr/bin/systemctl $(TARGET_DIR)/sbin/halt + ln -fs ../usr/bin/systemctl $(TARGET_DIR)/sbin/poweroff + ln -fs ../usr/bin/systemctl $(TARGET_DIR)/sbin/reboot + + ln -fs ../../../usr/lib/systemd/system/multi-user.target $(TARGET_DIR)/etc/systemd/system/default.target +endef + +define SYSTEMD_INSTALL_TTY_HOOK + rm -f $(TARGET_DIR)/etc/systemd/system/getty.target.wants/getty@tty1.service + ln -fs ../../../../usr/lib/systemd/system/serial-getty@.service $(TARGET_DIR)/etc/systemd/system/getty.target.wants/serial-getty@$(BR2_TARGET_GENERIC_GETTY_PORT).service +endef + +SYSTEMD_POST_INSTALL_TARGET_HOOKS += \ + SYSTEMD_INSTALL_INIT_HOOK \ + SYSTEMD_INSTALL_TTY_HOOK \ + +$(eval $(autotools-package)) diff --git a/package/sysvinit/inittab b/package/sysvinit/inittab index a4bcf82d33..c85e75a045 100644 --- a/package/sysvinit/inittab +++ b/package/sysvinit/inittab @@ -5,8 +5,9 @@ id:1:initdefault: proc::sysinit:/bin/mount -t proc proc /proc -rwmo::sysinit:/bin/mount -o remount,rw / +rwmo::sysinit:/bin/mount -o remount,rw / # REMOUNT_ROOTFS_RW dpts::sysinit:/bin/mkdir -p /dev/pts +dshm::sysinit:/bin/mkdir -p /dev/shm moun::sysinit:/bin/mount -a host::sysinit:/bin/hostname -F /etc/hostname init::sysinit:/etc/init.d/rcS diff --git a/package/sysvinit/sysvinit.mk b/package/sysvinit/sysvinit.mk index 97576b8a92..07bfc6fddf 100644 --- a/package/sysvinit/sysvinit.mk +++ b/package/sysvinit/sysvinit.mk @@ -1,21 +1,24 @@ -############################################################# +################################################################################ # # sysvinit # -############################################################# +################################################################################ + SYSVINIT_VERSION = 2.88 SYSVINIT_SOURCE = sysvinit_$(SYSVINIT_VERSION)dsf.orig.tar.gz SYSVINIT_PATCH = sysvinit_$(SYSVINIT_VERSION)dsf-13.1.diff.gz SYSVINIT_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/s/sysvinit +SYSVINIT_LICENSE = GPLv2+ +SYSVINIT_LICENSE_FILES = COPYING # Override Busybox implementations if Busybox is enabled. ifeq ($(BR2_PACKAGE_BUSYBOX),y) -SYSKLOGD_DEPENDENCIES = busybox +SYSVINIT_DEPENDENCIES = busybox endif define SYSVINIT_DEBIAN_PATCHES if [ -d $(@D)/debian/patches ]; then \ - toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches \*.patch; \ + support/scripts/apply-patches.sh $(@D) $(@D)/debian/patches \*.patch; \ fi endef @@ -24,26 +27,23 @@ SYSVINIT_POST_PATCH_HOOKS = SYSVINIT_DEBIAN_PATCHES define SYSVINIT_BUILD_CMDS # Force sysvinit to link against libcrypt as it otherwise # use an incorrect test to see if it's available - $(MAKE) $(TARGET_CONFIGURE_OPTS) LCRYPT="-lcrypt" -C $(@D)/src + $(MAKE) $(TARGET_CONFIGURE_OPTS) SULOGINLIBS="-lcrypt" -C $(@D)/src endef define SYSVINIT_INSTALL_TARGET_CMDS - for x in halt init shutdown; do \ + for x in halt init shutdown killall5; do \ install -D -m 0755 $(@D)/src/$$x $(TARGET_DIR)/sbin/$$x || exit 1; \ done # Override Busybox's inittab with an inittab compatible with # sysvinit install -D -m 0644 package/sysvinit/inittab $(TARGET_DIR)/etc/inittab -endef - -define SYSVINIT_UNINSTALL_TARGET_CMDS - for x in halt init shutdown; do \ - rm -f $(TARGET_DIR)/sbin/$$x || exit 1; \ - done + ln -sf /sbin/halt $(TARGET_DIR)/sbin/reboot + ln -sf /sbin/halt $(TARGET_DIR)/sbin/poweroff + ln -sf killall5 $(TARGET_DIR)/sbin/pidof endef define SYSVINIT_CLEAN_CMDS $(MAKE) -C $(@D) clean endef -$(eval $(call GENTARGETS,package,sysvinit)) +$(eval $(generic-package)) diff --git a/package/taglib/Config.in b/package/taglib/Config.in new file mode 100644 index 0000000000..b96a9bfef6 --- /dev/null +++ b/package/taglib/Config.in @@ -0,0 +1,22 @@ + +config BR2_PACKAGE_TAGLIB + bool "taglib" + depends on BR2_INSTALL_LIBSTDCPP + help + TagLib is a library for reading and editing the meta-data of + several popular audio formats. Currently it supports both ID3v1 + and ID3v2 for MP3 files, Ogg Vorbis comments and ID3 tags and + Vorbis comments in FLAC, MPC, Speex, WavPack and TrueAudio files. + + http://taglib.github.com + +config BR2_PACKAGE_TAGLIB_MP4 + depends on BR2_PACKAGE_TAGLIB + bool "taglib mp4 support" + +config BR2_PACKAGE_TAGLIB_ASF + depends on BR2_PACKAGE_TAGLIB + bool "taglib wma support" + +comment "taglib needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/taglib/taglib.mk b/package/taglib/taglib.mk new file mode 100644 index 0000000000..75e8e679f0 --- /dev/null +++ b/package/taglib/taglib.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# taglib +# +################################################################################ + +TAGLIB_VERSION = 1.8 +TAGLIB_SITE = http://github.com/downloads/taglib/taglib +TAGLIB_INSTALL_STAGING = YES +TAGLIB_LICENSE = LGPLv2.1 MPL +TAGLIB_LICENSE_FILES = COPYING.LGPL COPYING.MPL + +ifeq ($(BR2_PACKAGE_TAGLIB_ASF),y) +TAGLIB_CONF_OPT += -DWITH_ASF=ON +endif + +ifeq ($(BR2_PACKAGE_TAGLIB_MP4),y) +TAGLIB_CONF_OPT += -DWITH_MP4=ON +endif + +define TAGLIB_REMOVE_DEVFILE + rm -f $(TARGET_DIR)/usr/bin/taglib-config +endef + +TAGLIB_POST_INSTALL_TARGET_HOOKS += TAGLIB_REMOVE_DEVFILE + +$(eval $(cmake-package)) diff --git a/package/tar/Config.in b/package/tar/Config.in index 20529e3783..06a58250e7 100644 --- a/package/tar/Config.in +++ b/package/tar/Config.in @@ -1,11 +1,11 @@ config BR2_PACKAGE_TAR bool "tar" - depends on BR2_USE_WCHAR && BR2_PROGRAM_INVOCATION + depends on BR2_USE_WCHAR help A program that saves many files together into a single tape or disk archive, and can restore individual files from the archive. http://www.gnu.org/software/tar/ -comment "tar requires a toolchain with WCHAR and PROGRAM_INVOCATION support" - depends on !(BR2_USE_WCHAR && BR2_PROGRAM_INVOCATION) +comment "tar needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/tar/tar-1.26-no-gets.patch b/package/tar/tar-1.26-no-gets.patch new file mode 100644 index 0000000000..fb9d1881fb --- /dev/null +++ b/package/tar/tar-1.26-no-gets.patch @@ -0,0 +1,47 @@ +Since the 2.16 release of the glibc, 'gets' is not any more defined in the gnulib. +No tar version synchronized with gnulib since [1] has been released yet. + +This patch avoids the following error occurs when building tar <=1.4.16 on host using +a glibc >=2.16: + +make[5]: Entering directory `/home/samuel/data/workspace/src/buildroot/master/output/build/host-tar-1.26/gnu' + CC areadlink.o + CC areadlinkat.o + CC argp-ba.o + CC argp-eexst.o + CC argp-fmtstream.o + CC argp-fs-xinl.o +In file included from argp.h:24:0, + from argp-eexst.c:27: +./stdio.h:479:1: error ‘gets’ undeclared here (not in a function) +make[5]: *** [argp-eexst.o] Error 1 +make[5]: *** Waiting for unfinished jobs.... +In file included from argp-fmtstream.h:29:0, + from argp-fs-xinl.c:28: +./stdio.h:479:1: error ‘gets’ undeclared here (not in a function) +make[5]: *** [argp-fs-xinl.o] Error 1 +In file included from argp-fmtstream.h:29:0, + from argp-fmtstream.c:35: +./stdio.h:479:1: error ‘gets’ undeclared here (not in a function) +make[5]: *** [argp-fmtstream.o] Error 1 + +References: +[1] http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=66712c23388e93e5c518ebc8515140fa0c807348 +[2] http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-devel/m4/files/m4-1.4.16-no-gets.patch?diff_format=h&revision=1.1&view=markup + +Signed-off-by: Samuel Martin + +--- +diff -purN host-tar-1.26.orig/gnu/stdio.in.h host-tar-1.26/gnu/stdio.in.h +--- host-tar-1.26.orig/gnu/stdio.in.h 2012-07-21 21:17:12.392403084 +0200 ++++ host-tar-1.26/gnu/stdio.in.h 2012-07-21 21:18:27.991993525 +0200 +@@ -164,7 +164,9 @@ _GL_WARN_ON_USE (fflush, "fflush is not + so any use of gets warrants an unconditional warning. Assume it is + always declared, since it is required by C89. */ + #undef gets ++#if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16) + _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); ++#endif + + #if @GNULIB_FOPEN@ + # if @REPLACE_FOPEN@ diff --git a/package/tar/tar.mk b/package/tar/tar.mk index e1e16a2302..6198ffdfed 100644 --- a/package/tar/tar.mk +++ b/package/tar/tar.mk @@ -1,10 +1,30 @@ -############################################################# +################################################################################ # # tar # -############################################################# +################################################################################ -TAR_VERSION = 1.25 +TAR_VERSION = 1.26 TAR_SITE = $(BR2_GNU_MIRROR)/tar +TAR_LICENSE = GPLv3+ +TAR_LICENSE_FILES = COPYING -$(eval $(call AUTOTARGETS,package,tar)) +# Prefer full-blown tar over buybox's version +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +TAR_DEPENDENCIES += busybox +HOST_TAR_DEPENDENCIES = +endif + +$(eval $(autotools-package)) + +# host-tar: use cpio.gz instead of tar.gz to prevent chicken-egg problem +# of needing tar to build tar. +HOST_TAR_SOURCE = tar-$(TAR_VERSION).cpio.gz +define HOST_TAR_EXTRACT_CMDS + mkdir -p $(@D) + cd $(@D) && \ + $(call suitable-extractor,$(HOST_TAR_SOURCE)) $(DL_DIR)/$(HOST_TAR_SOURCE) | cpio -i + mv $(@D)/tar-$(TAR_VERSION)/* $(@D) + rmdir $(@D)/tar-$(TAR_VERSION) +endef +$(eval $(host-autotools-package)) diff --git a/package/tcl/tcl.mk b/package/tcl/tcl.mk index cf46811ccd..58f085a207 100644 --- a/package/tcl/tcl.mk +++ b/package/tcl/tcl.mk @@ -1,28 +1,53 @@ -############################################################# +################################################################################ # -# TCL8.4 +# tcl # -############################################################# -TCL_VERSION:=8.4.19 -TCL_SOURCE:=tcl$(TCL_VERSION)-src.tar.gz -TCL_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/tcl +################################################################################ + +TCL_VERSION_MAJOR = 8.4 +TCL_VERSION_MINOR = 19 +TCL_VERSION = $(TCL_VERSION_MAJOR).$(TCL_VERSION_MINOR) +TCL_SOURCE = tcl$(TCL_VERSION)-src.tar.gz +TCL_SITE = http://downloads.sourceforge.net/project/tcl/Tcl/$(TCL_VERSION) +TCL_LICENSE = tcl license +TCL_LICENSE_FILES = license.terms TCL_SUBDIR = unix +TCL_INSTALL_STAGING = YES TCL_CONF_OPT = \ - --enable-shared \ --disable-symbols \ --disable-langinfo \ --disable-framework -define TCL_POST_INSTALL_CLEANUP - -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libtcl8.4.so - -if [ "$(BR2_PACKAGE_TCL_DEL_ENCODINGS)" = "y" ]; then \ - rm -Rf $(TARGET_DIR)/usr/lib/tcl8.4/encoding/*; \ - fi - -if [ "$(BR2_PACKAGE_TCL_SHLIB_ONLY)" = "y" ]; then \ - rm -f $(TARGET_DIR)/usr/bin/tclsh8.4; \ - fi +HOST_TCL_CONF_OPT = \ + --disable-symbols \ + --disable-langinfo \ + --disable-framework + +ifeq ($(BR2_PACKAGE_TCL_DEL_ENCODINGS),y) +define TCL_REMOVE_ENCODINGS + rm -rf $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/encoding/* +endef +TCL_POST_INSTALL_TARGET_HOOKS += TCL_REMOVE_ENCODINGS +endif + +ifeq ($(BR2_PACKAGE_TCL_SHLIB_ONLY),y) +define TCL_REMOVE_TCLSH + rm -f $(TARGET_DIR)/usr/bin/tclsh$(TCL_VERSION_MAJOR) +endef +TCL_POST_INSTALL_TARGET_HOOKS += TCL_REMOVE_TCLSH +else +define TCL_SYMLINK_TCLSH + ln -sf tclsh$(TCL_VERSION_MAJOR) $(TARGET_DIR)/usr/bin/tclsh +endef +TCL_POST_INSTALL_TARGET_HOOKS += TCL_SYMLINK_TCLSH +endif + +# library get installed read only, so strip fails +define TCL_FIXUP_RO_LIB + chmod +w $(TARGET_DIR)/usr/lib/libtcl* endef -TCL_POST_INSTALL_TARGET_HOOKS += TCL_POST_INSTALL_CLEANUP +TCL_POST_INSTALL_TARGET_HOOKS += TCL_FIXUP_RO_LIB -$(eval $(call AUTOTARGETS,package,tcl)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/tcllib/Config.in b/package/tcllib/Config.in new file mode 100644 index 0000000000..b0a4ad060e --- /dev/null +++ b/package/tcllib/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_TCLLIB + bool "tcllib" + help + Tcllib is a collection of utility modules for Tcl. These + modules provide a wide variety of functionality, from + implementations of standard data structures to + implementations of common networking protocols. The intent + is to collect commonly used function into a single library, + which users can rely on to be available and stable + + http://tcl.activestate.com/software/tcllib/ diff --git a/package/tcllib/tcllib.mk b/package/tcllib/tcllib.mk new file mode 100644 index 0000000000..f2aca364db --- /dev/null +++ b/package/tcllib/tcllib.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# tcllib +# +################################################################################ + +TCLLIB_VERSION = 1.13 +TCLLIB_SOURCE = tcllib-$(TCLLIB_VERSION).tar.bz2 +TCLLIB_SITE = http://downloads.sourceforge.net/project/tcllib/tcllib/$(TCLLIB_VERSION) +TCLLIB_LICENSE = tcl license +TCLLIB_LICENSE_FILES = license.terms +TCLLIB_DEPENDENCIES = host-tcl +TCLLIB_CONF_ENV = ac_cv_path_tclsh="$(HOST_DIR)/usr/bin/tclsh8.4" + +$(eval $(autotools-package)) diff --git a/package/tcpdump/Config.in b/package/tcpdump/Config.in index 09e2740a06..c28439893c 100644 --- a/package/tcpdump/Config.in +++ b/package/tcpdump/Config.in @@ -11,9 +11,3 @@ config BR2_PACKAGE_TCPDUMP_SMB depends on BR2_PACKAGE_TCPDUMP help enable possibly-buggy SMB printer - -config BR2_PACKAGE_DHCPDUMP - bool "dhcpdump" - select BR2_PACKAGE_LIBPCAP - help - A tool for monitoring dhcp requests using tcpdump. diff --git a/package/tcpdump/dhcpdump.mk b/package/tcpdump/dhcpdump.mk deleted file mode 100644 index 0b2d64ace0..0000000000 --- a/package/tcpdump/dhcpdump.mk +++ /dev/null @@ -1,62 +0,0 @@ -############################################################# -# -# dhcpdump -# -############################################################# -# Copyright (C) 2001-2003 by Erik Andersen -# Copyright (C) 2002 by Tim Riker - -DHCPDUMP_VERSION:=1.7 -DHCPDUMP_DIR:=$(BUILD_DIR)/dhcpdump-$(DHCPDUMP_VERSION) -DHCPDUMP_SITE:=http://www.mavetju.org/download/ -DHCPDUMP_SOURCE:=dhcpdump-$(DHCPDUMP_VERSION).tar.gz -DHCPDUMP_CAT:=$(ZCAT) - -$(DL_DIR)/$(DHCPDUMP_SOURCE): - $(call DOWNLOAD,$(DHCPDUMP_SITE),$(DHCPDUMP_SOURCE)) - -dhcpdump-source: $(DL_DIR)/$(DHCPDUMP_SOURCE) - -$(DHCPDUMP_DIR)/.unpacked: $(DL_DIR)/$(DHCPDUMP_SOURCE) - $(DHCPDUMP_CAT) $(DL_DIR)/$(DHCPDUMP_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - touch $@ - -$(DHCPDUMP_DIR)/.configured: $(DHCPDUMP_DIR)/.unpacked - (cd $(DHCPDUMP_DIR); rm -f config.cache; \ - BUILD_CC="$(TARGET_CC)" HOSTCC="$(HOSTCC)" \ - $(TARGET_CONFIGURE_OPTS) \ - $(TARGET_CONFIGURE_ARGS) \ - ./configure $(QUIET) \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - ) - touch $@ - -$(DHCPDUMP_DIR)/dhcpdump: $(DHCPDUMP_DIR)/.configured - $(MAKE) CC="$(TARGET_CC)" -C $(DHCPDUMP_DIR) - -$(TARGET_DIR)/usr/sbin/dhcpdump: $(DHCPDUMP_DIR)/dhcpdump - cp -af $< $@ - -dhcpdump: zlib libpcap $(TARGET_DIR)/usr/sbin/dhcpdump - -dhcpdump-clean: - rm -f $(TARGET_DIR)/usr/sbin/dhcpdump - -$(MAKE) -C $(DHCPDUMP_DIR) clean - -dhcpdump-dirclean: - rm -rf $(DHCPDUMP_DIR) -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_DHCPDUMP),y) -TARGETS+=dhcpdump -endif diff --git a/package/tcpdump/tcpdump-4.1.1-vfork.patch b/package/tcpdump/tcpdump-4.1.1-vfork.patch deleted file mode 100644 index 8213f35f59..0000000000 --- a/package/tcpdump/tcpdump-4.1.1-vfork.patch +++ /dev/null @@ -1,127 +0,0 @@ -https://sourceforge.net/tracker/?func=detail&aid=3120897&group_id=53066&atid=469575 - -From 6f8927c609d1f986a45010b7acae0eb570668642 Mon Sep 17 00:00:00 2001 -From: Mike Frysinger -Date: Sat, 27 Nov 2010 17:18:05 -0500 -Subject: [PATCH] add support for nommu systems - -Rather than hardcode the WIN32 define, add proper fork checks to the -configure script and check those. This fixes building for nommu systems -which lack the fork function. - -While we're here though, add support for this functionality via vfork -so that it does work on nommu systems. And fix an old bug where we -exit properly in the forked child when the exec failed instead of just -returning to the calling code (which isn't expecting it). - -Signed-off-by: Mike Frysinger ---- - ---- tcpdump-4.0.0/config.h.in -+++ tcpdump-4.0.0/config.h.in -@@ -151,6 +151,9 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_FCNTL_H - -+/* Define to 1 if you have the `fork' function. */ -+#undef HAVE_FORK -+ - /* Define to 1 if you have the `getnameinfo' function. */ - #undef HAVE_GETNAMEINFO - -@@ -274,6 +277,9 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_UNISTD_H - -+/* Define to 1 if you have the `vfork' function. */ -+#undef HAVE_VFORK -+ - /* Define to 1 if you have the `vfprintf' function. */ - #undef HAVE_VFPRINTF - ---- tcpdump-4.0.0/configure -+++ tcpdump-4.0.0/configure -@@ -7976,7 +7976,7 @@ done - - - --for ac_func in strftime -+for ac_func in fork vfork strftime - do - as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - { echo "$as_me:$LINENO: checking for $ac_func" >&5 -diff --git a/tcpdump.c b/tcpdump.c -index c8da36b..abf3e69 100644 ---- a/tcpdump.c -+++ b/tcpdump.c -@@ -1250,8 +1250,10 @@ main(int argc, char **argv) - (void)setsignal(SIGPIPE, cleanup); - (void)setsignal(SIGTERM, cleanup); - (void)setsignal(SIGINT, cleanup); -- (void)setsignal(SIGCHLD, child_cleanup); - #endif /* WIN32 */ -+#if defined(HAVE_FORK) || defined(HAVE_VFORK) -+ (void)setsignal(SIGCHLD, child_cleanup); -+#endif - /* Cooperate with nohup(1) */ - #ifndef WIN32 - if ((oldhandler = setsignal(SIGHUP, cleanup)) != SIG_DFL) -@@ -1464,13 +1466,13 @@ cleanup(int signo _U_) - On windows, we do not use a fork, so we do not care less about - waiting a child processes to die - */ --#ifndef WIN32 -+#if defined(HAVE_FORK) || defined(HAVE_VFORK) - static RETSIGTYPE - child_cleanup(int signo _U_) - { - wait(NULL); - } --#endif /* WIN32 */ -+#endif /* HAVE_FORK || HAVE_VFORK */ - - static void - info(register int verbose) -@@ -1514,11 +1516,15 @@ info(register int verbose) - infoprint = 0; - } - --#ifndef WIN32 -+#if defined(HAVE_FORK) || defined(HAVE_VFORK) - static void - compress_savefile(const char *filename) - { -+# ifdef HAVE_FORK - if (fork()) -+# else -+ if (vfork()) -+# endif - return; - /* - * Set to lowest priority so that this doesn't disturb the capture -@@ -1534,15 +1540,20 @@ compress_savefile(const char *filename) - zflag, - filename, - strerror(errno)); -+# ifdef HAVE_FORK -+ exit(1); -+# else -+ _exit(1); -+# endif - } --#else /* WIN32 */ -+#else /* HAVE_FORK || HAVE_VFORK */ - static void - compress_savefile(const char *filename) - { - fprintf(stderr, -- "compress_savefile failed. Functionality not implemented under windows\n"); -+ "compress_savefile failed. Functionality not implemented under your system\n"); - } --#endif /* WIN32 */ -+#endif /* HAVE_FORK || HAVE_VFORK */ - - static void - dump_packet_and_trunc(u_char *user, const struct pcap_pkthdr *h, const u_char *sp) --- -1.7.3.1 diff --git a/package/tcpdump/tcpdump.mk b/package/tcpdump/tcpdump.mk index 720a29acfb..a865e81e0f 100644 --- a/package/tcpdump/tcpdump.mk +++ b/package/tcpdump/tcpdump.mk @@ -1,18 +1,17 @@ -############################################################# +################################################################################ # # tcpdump # -############################################################# -# Copyright (C) 2001-2003 by Erik Andersen -# Copyright (C) 2002 by Tim Riker +################################################################################ -TCPDUMP_VERSION:=4.1.1 -TCPDUMP_SITE:=http://www.tcpdump.org/release -TCPDUMP_SOURCE:=tcpdump-$(TCPDUMP_VERSION).tar.gz -TCPDUMP_CONF_ENV:=ac_cv_linux_vers=2 -TCPDUMP_CONF_OPT:=--without-crypto \ +TCPDUMP_VERSION = 4.4.0 +TCPDUMP_SITE = http://www.tcpdump.org/release +TCPDUMP_LICENSE = BSD-3c +TCPDUMP_LICENSE_FILES = LICENSE +TCPDUMP_CONF_ENV = ac_cv_linux_vers=2 td_cv_buggygetaddrinfo=no +TCPDUMP_CONF_OPT = --without-crypto \ $(if $(BR2_PACKAGE_TCPDUMP_SMB),--enable-smb,--disable-smb) -TCPDUMP_DEPENDENCIES:=zlib libpcap +TCPDUMP_DEPENDENCIES = zlib libpcap # make install installs an unneeded extra copy of the tcpdump binary define TCPDUMP_REMOVE_DUPLICATED_BINARY @@ -21,4 +20,4 @@ endef TCPDUMP_POST_INSTALL_TARGET_HOOKS += TCPDUMP_REMOVE_DUPLICATED_BINARY -$(eval $(call AUTOTARGETS,package,tcpdump)) +$(eval $(autotools-package)) diff --git a/package/tcping/Config.in b/package/tcping/Config.in new file mode 100644 index 0000000000..6677b58b7c --- /dev/null +++ b/package/tcping/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_TCPING + bool "tcping" + help + tcping does a TCP connect to the given ip/port + combination. The user can specify a timeout in seconds. This + is useful in shell scripts running in firewalled + environments. Often SYNs are just being dropped by + firewalls, thus connection establishment will be retried + several times (for minutes) until a TCP timeout is + reached. With tcping it is possible to check first if the + desired port is reachable and then start connection + establishment. + + http://www.linuxco.de/tcping/tcping.html diff --git a/package/tcping/tcping.mk b/package/tcping/tcping.mk new file mode 100644 index 0000000000..ff43490c81 --- /dev/null +++ b/package/tcping/tcping.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# tcping +# +################################################################################ + +TCPING_VERSION = 1.3.5 +TCPING_SITE = http://www.linuxco.de/tcping +TCPING_LICENSE = GPLv3+ +TCPING_LICENSE_FILES = LICENSE + +define TCPING_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" CCFLAGS="$(TARGET_CFLAGS) $(TARGET_LDFLAGS)" \ + -C $(@D) tcping.linux +endef + +define TCPING_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/tcping $(TARGET_DIR)/usr/bin/tcping +endef + +$(eval $(generic-package)) diff --git a/package/tcpreplay/Config.in b/package/tcpreplay/Config.in index 6d3a3bf4de..7337070a8e 100644 --- a/package/tcpreplay/Config.in +++ b/package/tcpreplay/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_TCPREPLAY bool "tcpreplay" + depends on BR2_USE_MMU # fork() select BR2_PACKAGE_LIBPCAP help Tcpreplay is a tool for replaying network traffic from files saved diff --git a/package/tcpreplay/tcpreplay.mk b/package/tcpreplay/tcpreplay.mk index f82867c270..f2b199125c 100644 --- a/package/tcpreplay/tcpreplay.mk +++ b/package/tcpreplay/tcpreplay.mk @@ -1,15 +1,18 @@ -############################################################# +################################################################################ # # tcpreplay # -############################################################# +################################################################################ TCPREPLAY_VERSION = 3.4.3 -TCPREPLAY_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/tcpreplay +TCPREPLAY_SITE = http://downloads.sourceforge.net/project/tcpreplay/tcpreplay/$(TCPREPLAY_VERSION) TCPREPLAY_CONF_ENV = tr_cv_libpcap_version=">= 0.7.0" -TCPREPLAY_CONF_OPT = --program-prefix="" --with-libpcap=$(STAGING_DIR)/usr +TCPREPLAY_CONF_OPT = --with-libpcap=$(STAGING_DIR)/usr +TCPREPLAY_AUTORECONF = YES +TCPREPLAY_DEPENDENCIES = libpcap -TCPREPLAY_DEPENDENCIES = uclibc libpcap - -$(eval $(call AUTOTARGETS,package,tcpreplay)) +# libpcap may depend on symbols in libusb as well +TCPREPLAY_LIBS = -lpcap $(if $(BR2_PACKAGE_LIBUSB),-lusb-1.0) +TCPREPLAY_CONF_ENV += ac_cv_search_pcap_close='$(TCPREPLAY_LIBS)' +$(eval $(autotools-package)) diff --git a/package/texinfo/texinfo.mk b/package/texinfo/texinfo.mk new file mode 100644 index 0000000000..7064e12c1f --- /dev/null +++ b/package/texinfo/texinfo.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# texinfo +# +################################################################################ + +# We are intentionally not using the latest version 5.x, because it +# causes issues with the documentation building process when creating +# a toolchain with the Crosstool-NG backend. + +TEXINFO_VERSION = 4.13a +TEXINFO_SITE = $(BR2_GNU_MIRROR)/texinfo + +$(eval $(host-autotools-package)) diff --git a/package/tftpd/tftpd.mk b/package/tftpd/tftpd.mk index c3b9e1df27..cd72810c63 100644 --- a/package/tftpd/tftpd.mk +++ b/package/tftpd/tftpd.mk @@ -1,16 +1,21 @@ -############################################################# +################################################################################ # # tftpd # -############################################################# -TFTPD_VERSION = 5.0 -TFTPD_SOURCE = tftp-hpa-$(TFTPD_VERSION).tar.bz2 -TFTPD_SITE = $(BR2_KERNEL_MIRROR)/software/network/tftp/ +################################################################################ + +TFTPD_VERSION = 5.2 +TFTPD_SOURCE = tftp-hpa-$(TFTPD_VERSION).tar.xz +TFTPD_SITE = $(BR2_KERNEL_MIRROR)/software/network/tftp/tftp-hpa TFTPD_CONF_OPT = --without-tcpwrappers +ifneq ($(BR2_INET_IPV6),y) +TFTPD_CONF_OPT += --without-ipv6 +endif + define TFTPD_INSTALL_TARGET_CMDS $(INSTALL) -D $(@D)/tftpd/tftpd $(TARGET_DIR)/usr/sbin/tftpd $(INSTALL) -D package/tftpd/S80tftpd-hpa $(TARGET_DIR)/etc/init.d/ endef -$(eval $(call AUTOTARGETS,package,tftpd)) +$(eval $(autotools-package)) diff --git a/package/thirdparty/Config.in b/package/thirdparty/Config.in index b6eaf3bbe1..5e9b09b4e3 100644 --- a/package/thirdparty/Config.in +++ b/package/thirdparty/Config.in @@ -1,11 +1,8 @@ menu "XBMC and its Dependencies" -source "package/thirdparty/bluez_utils/Config.in" -source "package/thirdparty/boost/Config.in" source "package/thirdparty/fribidi/Config.in" source "package/thirdparty/jasper/Config.in" source "package/thirdparty/libass/Config.in" source "package/thirdparty/libcdio/Config.in" -source "package/thirdparty/libcec/Config.in" source "package/thirdparty/libenca/Config.in" source "package/thirdparty/libmodplug/Config.in" source "package/thirdparty/libnfs/Config.in" @@ -16,14 +13,10 @@ source "package/thirdparty/libssh/Config.in" source "package/thirdparty/lirc/Config.in" source "package/thirdparty/afpfs-ng/Config.in" source "package/thirdparty/librtmp/Config.in" -source "package/thirdparty/libssh2/Config.in" source "package/thirdparty/recovery_reboot/Config.in" -source "package/thirdparty/samba30/Config.in" source "package/thirdparty/taglib18/Config.in" source "package/thirdparty/tinyxml/Config.in" -source "package/thirdparty/tvheadend/Config.in" source "package/thirdparty/v4lutils/Config.in" -source "package/thirdparty/yajl/Config.in" source "package/thirdparty/xbmc/Config.in" source "package/thirdparty/xbmcpvr/Config.in" source "package/thirdparty/xios-skin/Config.in" diff --git a/package/thirdparty/afpfs-ng/afpfs-ng.mk b/package/thirdparty/afpfs-ng/afpfs-ng.mk index 41dbd38afa..7731b76e5e 100644 --- a/package/thirdparty/afpfs-ng/afpfs-ng.mk +++ b/package/thirdparty/afpfs-ng/afpfs-ng.mk @@ -16,4 +16,4 @@ AFPFS_NG_CONF_ENV = \ AFPFS_NG_CONF_OPT = \ --disable-fuse -$(eval $(call AUTOTARGETS,package/thirdparty,afpfs-ng)) +$(eval $(autotools-package)) diff --git a/package/thirdparty/bluez_utils/Config.in b/package/thirdparty/bluez_utils/Config.in deleted file mode 100644 index 3517407d8f..0000000000 --- a/package/thirdparty/bluez_utils/Config.in +++ /dev/null @@ -1,34 +0,0 @@ -config BR2_PACKAGE_BLUEZ_UTILS - bool "bluez-utils" - depends on BR2_USE_WCHAR # libglib2 - select BR2_PACKAGE_DBUS - select BR2_PACKAGE_LIBGLIB2 - help - bluez utils - - http://www.kernel.org/pub/linux/bluetooth - -if BR2_PACKAGE_BLUEZ_UTILS - -config BR2_PACKAGE_BLUEZ_UTILS_COMPAT - bool "BlueZ 3.x compatibility binaries" - help - BlueZ 3.x compatibility binaries like pand, hidd, sdp - -config BR2_PACKAGE_BLUEZ_UTILS_AUDIO - bool "audio support" - select BR2_PACKAGE_ALSA_LIB - select BR2_PACKAGE_LIBSNDFILE - help - Audio support - -config BR2_PACKAGE_BLUEZ_UTILS_USB - bool "USB support" - select BR2_PACKAGE_LIBUSB - help - USB support - -endif - -comment "bluez-utils require a toolchain with WCHAR support" - depends on !(BR2_USE_WCHAR) diff --git a/package/thirdparty/bluez_utils/bluez_utils.mk b/package/thirdparty/bluez_utils/bluez_utils.mk deleted file mode 100644 index 6682f6d345..0000000000 --- a/package/thirdparty/bluez_utils/bluez_utils.mk +++ /dev/null @@ -1,48 +0,0 @@ -############################################################# -# -# bluez_utils -# -############################################################# - -BLUEZ_UTILS_VERSION = 4.99 -BLUEZ_UTILS_SOURCE = bluez-$(BLUEZ_UTILS_VERSION).tar.gz -BLUEZ_UTILS_SITE = $(BR2_KERNEL_MIRROR)/linux/bluetooth -BLUEZ_UTILS_INSTALL_STAGING = YES -BLUEZ_UTILS_DEPENDENCIES = dbus libglib2 -BLUEZ_UTILS_CONF_OPT = --enable-test --enable-tools -BLUEZ_UTILS_AUTORECONF = YES - -# BlueZ 3.x compatibility -ifeq ($(BR2_PACKAGE_BLUEZ_UTILS_COMPAT),y) -BLUEZ_UTILS_CONF_OPT += \ - --enable-hidd \ - --enable-pand \ - --enable-sdp \ - --enable-dund -endif - -# audio support -ifeq ($(BR2_PACKAGE_BLUEZ_UTILS_AUDIO),y) -BLUEZ_UTILS_DEPENDENCIES += \ - alsa-lib \ - libsndfile -BLUEZ_UTILS_CONF_OPT += \ - --enable-alsa \ - --enable-audio -else -BLUEZ_UTILS_CONF_OPT += \ - --disable-alsa \ - --disable-audio -endif - -# USB support -ifeq ($(BR2_PACKAGE_BLUEZ_UTILS_USB),y) -BLUEZ_UTILS_DEPENDENCIES += libusb -BLUEZ_UTILS_CONF_OPT += \ - --enable-usb -else -BLUEZ_UTILS_CONF_OPT += \ - --disable-usb -endif - -$(eval $(call AUTOTARGETS,package/thirdparty,bluez_utils)) diff --git a/package/thirdparty/boblight/boblight.mk b/package/thirdparty/boblight/boblight.mk index 94cf3cf77d..575bb2069c 100644 --- a/package/thirdparty/boblight/boblight.mk +++ b/package/thirdparty/boblight/boblight.mk @@ -12,7 +12,7 @@ BOBLIGHT_INSTALL_TARGET = YES BOBLIGHT_AUTORECONF = YES BOBLIGHT_CONF_OPT += --without-portaudio --without-opengl --without-x11 -BOBLIGHT_DEPENDENCIES += linux26 +BOBLIGHT_DEPENDENCIES += linux ifeq ($(findstring yy,$(BR2_PACKAGE_BOBLIGHT_LIBUSB)$(BR2_PACKAGE_LIBUSB)),yy) BOBLIGHT_DEPENDENCIES += libusb @@ -20,4 +20,4 @@ else BOBLIGHT_CONF_OPT += --without-libusb endif -$(eval $(call AUTOTARGETS,package/thirdparty,boblight)) +$(eval $(autotools-package)) diff --git a/package/thirdparty/boost/Config.in b/package/thirdparty/boost/Config.in deleted file mode 100644 index e5262c16b9..0000000000 --- a/package/thirdparty/boost/Config.in +++ /dev/null @@ -1,81 +0,0 @@ -config BR2_PACKAGE_BOOST - bool "boost" - depends on BR2_INSTALL_LIBSTDCPP - help - A well-knownd C++ library - http://www.boost.org - -menu "Boost library selection" - depends on BR2_PACKAGE_BOOST - -config BR2_PACKAGE_BOOST_DATETIME - bool "enable date_time library" - default n - -config BR2_PACKAGE_BOOST_FILESYSTEM - bool "enable filesystem library" - default n - -config BR2_PACKAGE_BOOST_GRAPH - bool "enable graph library" - default n - -config BR2_PACKAGE_BOOST_GRAPH_PARALLEL - bool "enable graph_parallel library" - default n - -config BR2_PACKAGE_BOOST_IOSTREAMS - bool "enable iostreams library" - select BR2_PACKAGE_ZLIB - select BR2_PACKAGE_BZIP2 - default n - -config BR2_PACKAGE_BOOST_MATH - bool "enable math library" - default n - -config BR2_PACKAGE_BOOST_MPI - bool "enable mpi library" - default n - -config BR2_PACKAGE_BOOST_PROGRAM_OPTIONS - bool "enable program_options library" - default n - -config BR2_PACKAGE_BOOST_PYTHON - bool "enable python library" - select BR2_PACKAGE_PYTHON - default n - -config BR2_PACKAGE_BOOST_RANDOM - bool "enable random library" - default n - -config BR2_PACKAGE_BOOST_REGEX - bool "enable regex library" - default n - -config BR2_PACKAGE_BOOST_SERIALIZATION - bool "enable serialization library" - default n - -config BR2_PACKAGE_BOOST_SIGNALS - bool "enable signals library" - default n - -config BR2_PACKAGE_BOOST_SYSTEM - bool "enable system library" - default n - -config BR2_PACKAGE_BOOST_TEST - bool "enable test library" - default n - -config BR2_PACKAGE_BOOST_THREAD - bool "enable thread library" - default n - -config BR2_PACKAGE_BOOST_WAVE - bool "enable wave library" - default n -endmenu diff --git a/package/thirdparty/boost/boost.mk b/package/thirdparty/boost/boost.mk deleted file mode 100644 index f5f0b7b053..0000000000 --- a/package/thirdparty/boost/boost.mk +++ /dev/null @@ -1,109 +0,0 @@ -############################################################# -# -# boost -# -############################################################# -BOOST_VERSION:=1_53_0 -BOOST_VERSION2:=1.53.0 -BOOST_SOURCE:=boost_$(BOOST_VERSION).tar.bz2 -BOOST_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/boost -BOOST_INSTALL_STAGING=YES -BOOST_INSTALL_TARGET=YES - -ifneq ($(BR2_PACKAGE_BOOST_DATETIME),y) -BOOST_LIB_CONF += --without-date_time -endif - -ifneq ($(BR2_PACKAGE_BOOST_FILESYSTEM),y) -BOOST_LIB_CONF += --without-filesystem -endif - -ifneq ($(BR2_PACKAGE_BOOST_GRAPH),y) -BOOST_LIB_CONF += --without-graph -endif - -ifneq ($(BR2_PACKAGE_BOOST_GRAPH_PARALLEL),y) -BOOST_LIB_CONF += --without-graph_parallel -endif - -ifneq ($(BR2_PACKAGE_BOOST_IOSTREAMS),y) -BOOST_LIB_CONF += --without-iostreams -else -BOOST_DEPENDENCIES += zlib bzip2 -endif - -ifneq ($(BR2_PACKAGE_BOOST_MATH),y) -BOOST_LIB_CONF += --without-math -endif - -ifneq ($(BR2_PACKAGE_BOOST_MPI),y) -BOOST_LIB_CONF += --without-mpi -endif - -ifneq ($(BR2_PACKAGE_BOOST_PROGRAM_OPTIONS),y) -BOOST_LIB_CONF += --without-program_options -endif - -ifneq ($(BR2_PACKAGE_BOOST_PYTHON),y) -BOOST_LIB_CONF += --without-python -else -BOOST_DEPENDENCIES += python -endif - -ifneq ($(BR2_PACKAGE_BOOST_RANDOM),y) -BOOST_LIB_CONF += --without-random -endif - -ifneq ($(BR2_PACKAGE_BOOST_REGEX),y) -BOOST_LIB_CONF += --without-regex -endif - -ifneq ($(BR2_PACKAGE_BOOST_SERIALIZATION),y) -BOOST_LIB_CONF += --without-serialization -endif - -ifneq ($(BR2_PACKAGE_BOOST_SIGNALS),y) -BOOST_LIB_CONF += --without-signals -endif - -ifneq ($(BR2_PACKAGE_BOOST_SYSTEM),y) -BOOST_LIB_CONF += --without-system -endif - -ifneq ($(BR2_PACKAGE_BOOST_TEST),y) -BOOST_LIB_CONF += --without-test -endif - -ifneq ($(BR2_PACKAGE_BOOST_THREAD),y) -BOOST_LIB_CONF += --without-thread -endif - -ifneq ($(BR2_PACKAGE_BOOST_WAVE),y) -BOOST_LIB_CONF += --without-wave -endif - -define BOOST_BUILD_CMDS - (cd $(@D);\ - ./bootstrap.sh \ - ) - $(SED) "s,using gcc,using gcc : $(ARCH) : $(TARGET_CXX),g" $(@D)/project-config.jam - $(SED) "s,using python : 2.6 : /usr,using python : $(PYTHON_VERSION_MAJOR) \ - : $(STAGING_DIR)/usr,g" $(@D)/project-config.jam - (cd $(@D); \ - ./bjam install --prefix=$(STAGING_DIR)/usr --layout=system $(BOOST_LIB_CONF) link=shared;\ - ) -endef - - define BOOST_INSTALL_TARGET_CMDS - (cd $(@D); \ - ./bjam stage --stagedir=$(TARGET_DIR)/usr --layout=system $(BOOST_LIB_CONF) link=shared;\ - ) - endef - - - -define BOOST_CLEAN_CMDS - rm -f $(TARGET_DIR)/include/boost -endef - -$(eval $(call GENTARGETS,package/thirdparty,boost)) diff --git a/package/thirdparty/fribidi/fribidi.mk b/package/thirdparty/fribidi/fribidi.mk index 58b66c8c15..395ea2c660 100644 --- a/package/thirdparty/fribidi/fribidi.mk +++ b/package/thirdparty/fribidi/fribidi.mk @@ -11,4 +11,4 @@ FRIBIDI_INSTALL_TARGET = YES FRIBIDI_CONF_OPT = --disable-docs --with-glib=no -$(eval $(call AUTOTARGETS,package/thirdparty,fribidi)) +$(eval $(autotools-package)) diff --git a/package/thirdparty/jasper/jasper.mk b/package/thirdparty/jasper/jasper.mk index 6aa455fb28..f09d53e9d6 100644 --- a/package/thirdparty/jasper/jasper.mk +++ b/package/thirdparty/jasper/jasper.mk @@ -9,4 +9,4 @@ JASPER_SOURCE = jasper-$(JASPER_VERSION).tar.bz2 JASPER_INSTALL_STAGING = YES JASPER_INSTALL_TARGET = YES -$(eval $(call AUTOTARGETS,package/thirdparty,jasper)) +$(eval $(autotools-package)) diff --git a/package/thirdparty/joe/joe.mk b/package/thirdparty/joe/joe.mk index 36639db4ea..7764492171 100644 --- a/package/thirdparty/joe/joe.mk +++ b/package/thirdparty/joe/joe.mk @@ -6,7 +6,7 @@ JOE_VERSION = 3.7 JOE_SOURCE = joe-$(JOE_VERSION).tar.gz -JOE_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/joe-editor +JOE_SITE = http://downloads.sourceforge.net/sourceforge/joe-editor JOE_INSTALL_STAGING = NO JOE_INSTALL_TARGET = YES JOE_DEPENDENCIES = ncurses @@ -19,4 +19,4 @@ endef JOE_POST_INSTALL_TARGET_HOOKS += JOE_INSTALL_ETC -$(eval $(call AUTOTARGETS,package/thirdparty,joe)) +$(eval $(autotools-package)) diff --git a/package/thirdparty/libass/libass.mk b/package/thirdparty/libass/libass.mk index 46acd52663..b818d2d4be 100644 --- a/package/thirdparty/libass/libass.mk +++ b/package/thirdparty/libass/libass.mk @@ -10,4 +10,4 @@ LIBASS_INSTALL_STAGING = YES LIBASS_INSTALL_TARGET = YES LIBASS_DEPENDENCIES += libenca -$(eval $(call AUTOTARGETS,package/thirdparty,libass)) +$(eval $(autotools-package)) diff --git a/package/thirdparty/libbluray/libbluray.mk b/package/thirdparty/libbluray/libbluray.mk index e5a97dcc29..e5abfb5527 100644 --- a/package/thirdparty/libbluray/libbluray.mk +++ b/package/thirdparty/libbluray/libbluray.mk @@ -10,4 +10,4 @@ LIBBLURAY_INSTALL_STAGING = YES LIBBLURAY_INSTALL_TARGET = YES LIBBLURAY_AUTORECONF = YES -$(eval $(call AUTOTARGETS,package/thirdparty,libbluray)) +$(eval $(autotools-package)) diff --git a/package/thirdparty/libcdio/libcdio.mk b/package/thirdparty/libcdio/libcdio.mk index dd96b92ad2..68603cdac5 100644 --- a/package/thirdparty/libcdio/libcdio.mk +++ b/package/thirdparty/libcdio/libcdio.mk @@ -9,4 +9,4 @@ LIBCDIO_SOURCE = libcdio-$(LIBCDIO_VERSION).tar.gz LIBCDIO_INSTALL_STAGING = YES LIBCDIO_INSTALL_TARGET = YES -$(eval $(call AUTOTARGETS,package/thirdparty,libcdio)) +$(eval $(autotools-package)) diff --git a/package/thirdparty/libcec/Config.in b/package/thirdparty/libcec/Config.in deleted file mode 100644 index 9ffacfe05a..0000000000 --- a/package/thirdparty/libcec/Config.in +++ /dev/null @@ -1,6 +0,0 @@ -config BR2_PACKAGE_LIBCEC - bool "libcec" - help - LIBCEC is a client library for hdmi cec device control. - - https://github.com/Pulse-Eight/libcec.git diff --git a/package/thirdparty/libcec/libcec.mk b/package/thirdparty/libcec/libcec.mk deleted file mode 100644 index 2e8cf201e9..0000000000 --- a/package/thirdparty/libcec/libcec.mk +++ /dev/null @@ -1,14 +0,0 @@ -############################################################# -# -# libcec -# -############################################################# -LIBCEC_VERSION = 97ffee06080535a5507d8fbb3c8941bccc51ae13 -LIBCEC_SITE = git://github.com/Pulse-Eight/libcec.git -LIBCEC_INSTALL_STAGING = YES -LIBCEC_INSTALL_TARGET = YES -LIBCEC_AUTORECONF = YES -LIBCEC_DEPENDENCIES += udev -LIBCEC_MAKE=$(MAKE1) - -$(eval $(call AUTOTARGETS,package/thirdparty,libcec)) diff --git a/package/thirdparty/libenca/libenca.mk b/package/thirdparty/libenca/libenca.mk index bf62556666..cf8834d90b 100644 --- a/package/thirdparty/libenca/libenca.mk +++ b/package/thirdparty/libenca/libenca.mk @@ -20,4 +20,4 @@ cd $(LIBENCA_DIR)/tools && $(HOSTCC) -o make_hash make_hash.c endef LIBENCA_POST_CONFIGURE_HOOKS += LIBENCA_MAKE_FIX -$(eval $(call AUTOTARGETS,package/thirdparty,libenca)) +$(eval $(autotools-package)) diff --git a/package/thirdparty/libmodplug/libmodplug.mk b/package/thirdparty/libmodplug/libmodplug.mk index 569c840b7a..26b1348363 100644 --- a/package/thirdparty/libmodplug/libmodplug.mk +++ b/package/thirdparty/libmodplug/libmodplug.mk @@ -9,4 +9,4 @@ LIBMODPLUG_SOURCE = libmodplug-$(LIBMODPLUG_VERSION).tar.gz LIBMODPLUG_INSTALL_STAGING = YES LIBMODPLUG_INSTALL_TARGET = YES -$(eval $(call AUTOTARGETS,package/thirdparty,libmodplug)) +$(eval $(autotools-package)) diff --git a/package/thirdparty/libnfs/libnfs.mk b/package/thirdparty/libnfs/libnfs.mk index e0cd22b5a1..908fdba1cd 100644 --- a/package/thirdparty/libnfs/libnfs.mk +++ b/package/thirdparty/libnfs/libnfs.mk @@ -10,4 +10,4 @@ LIBNFS_INSTALL_TARGET = YES LIBNFS_AUTORECONF = YES LIBNFS_MAKE=$(MAKE1) -$(eval $(call AUTOTARGETS,package/thirdparty,libnfs)) +$(eval $(autotools-package)) diff --git a/package/thirdparty/libplist/libplist.mk b/package/thirdparty/libplist/libplist.mk index e13042c14b..d17bdb2d97 100644 --- a/package/thirdparty/libplist/libplist.mk +++ b/package/thirdparty/libplist/libplist.mk @@ -11,4 +11,4 @@ LIBPLIST_INSTALL_STAGING = YES LIBPLIST_INSTALL_TARGET = YES LIBPLIST_MAKE=$(MAKE1) -$(eval $(call CMAKETARGETS,package/thirdparty,libplist)) +$(eval $(cmake-package)) diff --git a/package/thirdparty/librtmp/librtmp.mk b/package/thirdparty/librtmp/librtmp.mk index 00c85ccb14..e14ee8ff63 100644 --- a/package/thirdparty/librtmp/librtmp.mk +++ b/package/thirdparty/librtmp/librtmp.mk @@ -24,4 +24,4 @@ define LIBRTMP_INSTALL_TARGET_CMDS install -m 644 $(@D)/librtmp/librtmp.so.0 $(TARGET_DIR)/usr/lib endef -$(eval $(call GENTARGETS,package/thirdparty,librtmp)) +$(eval $(generic-package)) diff --git a/package/thirdparty/libshairport/libshairport.mk b/package/thirdparty/libshairport/libshairport.mk index a3a274c45d..203f480619 100644 --- a/package/thirdparty/libshairport/libshairport.mk +++ b/package/thirdparty/libshairport/libshairport.mk @@ -11,4 +11,4 @@ LIBSHAIRPORT_INSTALL_TARGET = YES LIBSHAIRPORT_AUTORECONF = YES LIBSHAIRPORT_DEPENDENCIES += openssl -$(eval $(call AUTOTARGETS,package/thirdparty,libshairport)) +$(eval $(autotools-package)) diff --git a/package/thirdparty/libssh/libssh.mk b/package/thirdparty/libssh/libssh.mk index 0199ccba9d..1f92cf11e6 100644 --- a/package/thirdparty/libssh/libssh.mk +++ b/package/thirdparty/libssh/libssh.mk @@ -13,10 +13,11 @@ LIBSSH_CONFIGURE_CMDS = \ (mkdir -p $(LIBSSH_TEMP_BUILDDIR) && rm -rf $(LIBSSH_TEMP_BUILDDIR)/* && \ cd $(LIBSSH_TEMP_BUILDDIR) && \ $(LIBSSH_CONF_ENV) $(HOST_DIR)/usr/bin/cmake $(LIBSSH_SRCDIR) \ - -DCMAKE_TOOLCHAIN_FILE="$(BASE_DIR)/toolchainfile.cmake" \ + -DCMAKE_TOOLCHAIN_FILE="$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake" \ -DCMAKE_INSTALL_PREFIX="/usr" \ $(LIBSSH_CONF_OPT) \ ) +LIBSSH_DEPENDENCIES += zlib LIBSSH_BUILD_CMDS = \ $(HOST_MAKE_ENV) $(LIBSSH_MAKE_ENV) $(LIBSSH_MAKE) $(LIBSSH_MAKE_OPT) -C $(LIBSSH_TEMP_BUILDDIR) @@ -28,4 +29,4 @@ LIBSSH_INSTALL_TARGET_CMDS = \ $(TARGET_MAKE_ENV) $(LIBSSH_MAKE_ENV) $(LIBSSH_MAKE) $(LIBSSH_MAKE_OPT) $(LIBSSH_INSTALL_TARGET_OPT) -C $(LIBSSH_TEMP_BUILDDIR) && \ rm -rf $(LIBSSH_TEMP_BUILDDIR) -$(eval $(call CMAKETARGETS,package/thirdparty,libssh)) +$(eval $(cmake-package)) diff --git a/package/thirdparty/libssh2/Config.in b/package/thirdparty/libssh2/Config.in deleted file mode 100644 index 03bb022ca4..0000000000 --- a/package/thirdparty/libssh2/Config.in +++ /dev/null @@ -1,6 +0,0 @@ -config BR2_PACKAGE_LIBSSH2 - bool "libssh2" - help - A client-side C library implementing the SSH2 protocol. - - http://www.libssh2.org/ diff --git a/package/thirdparty/libssh2/libssh2.mk b/package/thirdparty/libssh2/libssh2.mk deleted file mode 100644 index 8a7acc0f23..0000000000 --- a/package/thirdparty/libssh2/libssh2.mk +++ /dev/null @@ -1,26 +0,0 @@ -############################################################# -# -# libssh2 -# -############################################################# -LIBSSH2_VERSION = 1.2.8 -LIBSSH2_SITE = http://www.libssh2.org/download -LIBSSH2_SOURCE = libssh2-$(LIBSSH2_VERSION).tar.gz -LIBSSH2_INSTALL_STAGING = YES -LIBSSH2_INSTALL_TARGET = YES - -ifeq ($(BR2_PACKAGE_OPENSSL),y) -LIBSSH2_CONF_OPT += --with-openssl --with-libssl-prefix=$(STAGING_DIR)/usr -LIBSSH2_DEPENDENCIES += openssl -endif - -ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) -LIBSSH2_CONF_OPT = --with-libgcrypt --with-libgcrypt-prefix=$(STAGING_DIR)/usr -LIBSSH2_DEPENDENCIES += libgcrypt -endif - -ifeq ($(BR2_PACKAGE_LIBGCRYPT)$(BR2_PACKAGE_OPENSSL),n) -LIBSSH2_CONF_OPT = --without-openssl --without-libgcrypt -endif - -$(eval $(call AUTOTARGETS,package/thirdparty,libssh2)) diff --git a/package/thirdparty/lirc/lirc.mk b/package/thirdparty/lirc/lirc.mk index feb249dbfa..e8b0b947b4 100644 --- a/package/thirdparty/lirc/lirc.mk +++ b/package/thirdparty/lirc/lirc.mk @@ -1,14 +1,14 @@ LIRC_VERSION = 0.8.7 LIRC_SOURCE = lirc-$(LIRC_VERSION).tar.gz -LIRC_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/project/lirc/LIRC/$(LIRC_VERSION) +LIRC_SITE = http://downloads.sourceforge.net/project/lirc/LIRC/$(LIRC_VERSION) LIRC_INSTALL_STAGING = YES LIRC_INSTALL_TARGET = YES -LIRC_DEPENDENCIES = linux26 +LIRC_DEPENDENCIES = linux LIRC_MAKE=$(MAKE1) -LIRC_CONF_OPT += --with-kerneldir=$(LINUX26_DIR) +LIRC_CONF_OPT += --with-kerneldir=$(LINUX_DIR) LIRC_CONF_OPT += --with-driver=all -LIRC_CONF_OPT += --with-moduledir="/lib/modules/$(LINUX26_VERSION_PROBED)/misc" +LIRC_CONF_OPT += --with-moduledir="/lib/modules/$(LINUX_VERSION_PROBED)/misc" # hack to avoid mknod (requires root). This will be populated automatically. LIRC_CONF_OPT += ac_cv_path_mknod=$(shell which echo) @@ -17,8 +17,8 @@ LIRC_CONF_OPT += ac_cv_path_mknod=$(shell which echo) LIRC_CONF_OPT += --without-x ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) -LIRC_MAKE_ENV += PATH=$(TOOLCHAIN_EXTERNAL_DIR)/bin:$(TARGET_PATH) -LIRC_CONF_ENV += PATH=$(TOOLCHAIN_EXTERNAL_DIR)/bin:$(TARGET_PATH) +LIRC_MAKE_ENV += PATH=$(TOOLCHAIN_EXTERNAL_DIR)/bin:$(TARGET_PATH) CROSS_COMPILE=$(TOOLCHAIN_EXTERNAL_PREFIX)- +LIRC_CONF_ENV += PATH=$(TOOLCHAIN_EXTERNAL_DIR)/bin:$(TARGET_PATH) CROSS_COMPILE=$(TOOLCHAIN_EXTERNAL_PREFIX)- LIBUSB_CONFIG=$(STAGING_DIR)/usr/bin/libusb-config else LIRC_MAKE_ENV += PATH=$(TOOLCHAIN_DIR)/bin:$(TARGET_PATH) LIRC_CONF_ENV += PATH=$(TOOLCHAIN_DIR)/bin:$(TARGET_PATH) @@ -26,7 +26,7 @@ endif #work-around for hard-coded depmod define LIRC_DEPMOD -$(HOST_DIR)/usr/sbin/depmod -b $(TARGET_DIR) -a $(LINUX26_VERSION_PROBED) +$(HOST_DIR)/sbin/depmod -b $(TARGET_DIR) -a $(LINUX_VERSION_PROBED) endef define LIRC_REMOVE_BROKEN_DRIVERS @@ -41,5 +41,4 @@ LIRC_POST_CONFIGURE_HOOKS += LIRC_REMOVE_BROKEN_DRIVERS LIRC_POST_INSTALL_TARGET_HOOKS += LIRC_DEPMOD LIRC_POST_INSTALL_TARGET_HOOKS += LIRC_INSTALL_ETC -$(eval $(call AUTOTARGETS,package/thirdparty,lirc)) - +$(eval $(autotools-package)) diff --git a/package/thirdparty/recovery_reboot/recovery_reboot.mk b/package/thirdparty/recovery_reboot/recovery_reboot.mk index db9cdf87f5..9d55738c01 100644 --- a/package/thirdparty/recovery_reboot/recovery_reboot.mk +++ b/package/thirdparty/recovery_reboot/recovery_reboot.mk @@ -18,4 +18,4 @@ define RECOVERY_REBOOT_INSTALL_TARGET_CMDS install $(@D)/recoveryflash $(TARGET_DIR)/usr/sbin endef -$(eval $(call GENTARGETS,package/thirdparty,recovery_reboot)) +$(eval $(generic-package)) diff --git a/package/thirdparty/samba30/Config.in b/package/thirdparty/samba30/Config.in deleted file mode 100644 index 5fb6e4d58d..0000000000 --- a/package/thirdparty/samba30/Config.in +++ /dev/null @@ -1,25 +0,0 @@ -config BR2_PACKAGE_SAMBA30 - bool "samba 3.0" - select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE - help - Provides print services to all manner of SMB/CIFS clients, - including the numerous versions of Microsoft Windows - operating systems. - - http://www.samba.org/ - - NOTE: A complete Samba install takes over 50MB of space, - so choose only the components you need. - -config BR2_PACKAGE_SAMBA30_AVAHI - bool "support avahi" - default y - depends on BR2_PACKAGE_SAMBA30 - depends on BR2_PACKAGE_AVAHI_DAEMON - depends on BR2_PACKAGE_DBUS - help - Include support for avahi - -comment "support avahi - disabled (requires avahi-daemon/dbus)" - depends on !BR2_PACKAGE_AVAHI_DAEMON || !BR2_PACKAGE_DBUS - diff --git a/package/thirdparty/samba30/samba30-3.0.37-CVE-2010-2063.patch b/package/thirdparty/samba30/samba30-3.0.37-CVE-2010-2063.patch deleted file mode 100644 index b4657de2c0..0000000000 --- a/package/thirdparty/samba30/samba30-3.0.37-CVE-2010-2063.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/source/smbd/process.c b/source/smbd/process.c -index e861e16..6499bc7 100644 ---- a/source/smbd/process.c -+++ b/source/smbd/process.c -@@ -1159,6 +1159,7 @@ int chain_reply(char *inbuf,char *outbuf,int size,int bufsize) - { - static char *orig_inbuf; - static char *orig_outbuf; -+ static int orig_size; - int smb_com1, smb_com2 = CVAL(inbuf,smb_vwv0); - unsigned smb_off2 = SVAL(inbuf,smb_vwv1); - char *inbuf2, *outbuf2; -@@ -1178,6 +1179,13 @@ int chain_reply(char *inbuf,char *outbuf,int size,int bufsize) - /* this is the first part of the chain */ - orig_inbuf = inbuf; - orig_outbuf = outbuf; -+ orig_size = size; -+ } -+ -+ /* Validate smb_off2 */ -+ if ((smb_off2 < smb_wct - 4) || orig_size < (smb_off2 + 4 - smb_wct)) { -+ exit_server_cleanly("Bad chained packet"); -+ return -1; - } - - /* -@@ -1192,6 +1200,11 @@ int chain_reply(char *inbuf,char *outbuf,int size,int bufsize) - SSVAL(outbuf,smb_vwv1,smb_offset(outbuf+outsize,outbuf)); - SCVAL(outbuf,smb_vwv0,smb_com2); - -+ if (outsize <= smb_wct) { -+ exit_server_cleanly("Bad chained packet"); -+ return -1; -+ } -+ - /* remember how much the caller added to the chain, only counting stuff - after the parameter words */ - chain_size += outsize - smb_wct; diff --git a/package/thirdparty/samba30/samba30-3.0.37-configure.in.patch b/package/thirdparty/samba30/samba30-3.0.37-configure.in.patch deleted file mode 100644 index 3af1e125fc..0000000000 --- a/package/thirdparty/samba30/samba30-3.0.37-configure.in.patch +++ /dev/null @@ -1,64 +0,0 @@ ---- samba-3.0.25borig/source/configure.in 2007-05-23 08:29:20.000000000 -0700 -+++ samba3025bfinal/source/configure.in 2007-07-24 12:15:13.000000000 -0700 -@@ -1374,31 +1374,40 @@ - # - case "$host_os" in - *linux*) -- # glibc <= 2.3.2 has a broken getgrouplist -- AC_TRY_RUN([ -+ -+AC_CACHE_CHECK([for a broken Linux getgrouplist API], -+ linux_getgrouplist_ok, -+ [ -+ AC_TRY_RUN([ - #include - #include --main() { -- /* glibc up to 2.3 has a broken getgrouplist */ -+ -+ int main() { -+ /* glibc up to 2.3 has a broken -+getgrouplist */ - #if defined(__GLIBC__) && defined(__GLIBC_MINOR__) -- int libc_major = __GLIBC__; -- int libc_minor = __GLIBC_MINOR__; -+ int libc_major = __GLIBC__; -+ int libc_minor = __GLIBC_MINOR__; -+ -+ if (libc_major < 2) -+ return 1; -+ if ((libc_major == 2) && (libc_minor <= 3)) -+ return 1; -+#endif -+ return 0; -+ } -+ -+ ], -+ [linux_getgrouplist_ok=yes], -+ [linux_getgrouplist_ok=no], -+ [linux_getgrouplist_ok=cross]) -+ ]) -+ -+ if test x"$linux_getgrouplist_ok" = x"yes"; then -+ AC_DEFINE(HAVE_GETGROUPLIST, 1, [Have good getgrouplist]) -+ fi -+ - -- if (libc_major < 2) -- exit(1); -- if ((libc_major == 2) && (libc_minor <= 3)) -- exit(1); --#endif -- exit(0); --} --], [linux_getgrouplist_ok=yes], [linux_getgrouplist_ok=no]) -- if test x"$linux_getgrouplist_ok" = x"yes"; then -- AC_DEFINE(HAVE_GETGROUPLIST, 1, [Have good getgrouplist]) -- fi -- ;; -- *) -- AC_CHECK_FUNCS(getgrouplist) -- ;; - esac - - # diff --git a/package/thirdparty/samba30/samba30-3.0.37-silence-receive-warning.patch b/package/thirdparty/samba30/samba30-3.0.37-silence-receive-warning.patch deleted file mode 100644 index 92b84336c8..0000000000 --- a/package/thirdparty/samba30/samba30-3.0.37-silence-receive-warning.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- samba-3.0.37-clean/source/libsmb/clientgen.c 2009-09-30 05:21:56.000000000 -0700 -+++ samba-3.0.37/source/libsmb/clientgen.c 2010-11-18 21:56:06.874516928 -0800 -@@ -108,7 +108,7 @@ - - /* If the server is not responding, note that now */ - if (!ret) { -- DEBUG(0, ("Receiving SMB: Server stopped responding\n")); -+ DEBUG(1, ("Receiving SMB: Server stopped responding\n")); - cli->smb_rw_error = smb_read_error; - close(cli->fd); - cli->fd = -1; diff --git a/package/thirdparty/samba30/samba30-3.0.37-vfs_default.c.patch b/package/thirdparty/samba30/samba30-3.0.37-vfs_default.c.patch deleted file mode 100644 index 7a640ecb85..0000000000 --- a/package/thirdparty/samba30/samba30-3.0.37-vfs_default.c.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- samba-3.0.25borig/source/modules/vfs_default.c 2007-04-09 10:30:58.000000000 -0700 -+++ samba3025bfinal/source/modules/vfs_default.c 2007-07-24 12:18:07.000000000 -0700 -@@ -813,10 +813,11 @@ - - START_PROFILE(syscall_linux_setlease); - --#ifdef LINUX -+#ifdef HAVE_KERNEL_OPLOCKS_LINUX - /* first set the signal handler */ -- if(linux_set_lease_sighandler(fd) == -1) -+ if(linux_set_lease_sighandler(fd) == -1) { - return -1; -+ } - - result = linux_setlease(fd, leasetype); - #else diff --git a/package/thirdparty/samba30/samba30-3.0.37-wle-fix.patch b/package/thirdparty/samba30/samba30-3.0.37-wle-fix.patch deleted file mode 100644 index 8a41f455a3..0000000000 --- a/package/thirdparty/samba30/samba30-3.0.37-wle-fix.patch +++ /dev/null @@ -1,101 +0,0 @@ -diff -r -u samba-3.0.37-clean/source/libsmb/asn1.c samba-3.0.37/source/libsmb/asn1.c ---- samba-3.0.37-clean/source/libsmb/asn1.c 2009-09-30 05:21:56.000000000 -0700 -+++ samba-3.0.37/source/libsmb/asn1.c 2010-11-18 12:40:06.981517350 -0800 -@@ -261,6 +261,36 @@ - return asn1_read(data, v, 1); - } - -+/* peek to see if a tag is present */ -+/* this was not ported from samba and may not be identical to libsmb mainline */ -+BOOL asn1_peek_tag(ASN1_DATA *data, uint8 tag) -+{ -+ uint8 curtag; -+ -+ if (data->has_error) -+ return False; -+ -+ // overflow checking -+ if (data->ofs + 1 < data->ofs || data->ofs + 1 < 1) { -+ return False; -+ } -+ -+ // boundary checking -+ if (data->ofs + 1 > data->length) { -+ return False; -+ } -+ -+ memcpy( (void*)&curtag, data->data + data->ofs, 1); -+ -+ // don't move cursor -+ // don't set error -+ -+ if( tag != curtag ) -+ return False; -+ -+ return True; -+} -+ - /* start reading a nested asn1 structure */ - BOOL asn1_start_tag(ASN1_DATA *data, uint8 tag) - { -diff -r -u samba-3.0.37-clean/source/libsmb/clispnego.c samba-3.0.37/source/libsmb/clispnego.c ---- samba-3.0.37-clean/source/libsmb/clispnego.c 2009-09-30 05:21:56.000000000 -0700 -+++ samba-3.0.37/source/libsmb/clispnego.c 2010-11-18 12:52:54.833518134 -0800 -@@ -135,9 +135,16 @@ - - asn1_start_tag(&data,ASN1_APPLICATION(0)); - asn1_check_OID(&data,OID_SPNEGO); -+ -+ /* negTokenInit [0] NegTokenInit */ - asn1_start_tag(&data,ASN1_CONTEXT(0)); - asn1_start_tag(&data,ASN1_SEQUENCE(0)); - -+ /* mechTypes [0] MechTypeList OPTIONAL */ -+ -+ /* Not really optional, we depend on this to decide -+ * what mechanisms we have to work with. */ -+ - asn1_start_tag(&data,ASN1_CONTEXT(0)); - asn1_start_tag(&data,ASN1_SEQUENCE(0)); - for (i=0; asn1_tag_remaining(&data) > 0 && i < ASN1_MAX_OIDS-1; i++) { -@@ -150,7 +157,39 @@ - asn1_end_tag(&data); - - *principal = NULL; -- if (asn1_tag_remaining(&data) > 0) { -+ -+ /* -+ Win7 + Live Sign-in Assistant attaches a mechToken -+ ASN1_CONTEXT(2) to the negTokenInit packet -+ which breaks our negotiation if we just assume -+ the next tag is ASN1_CONTEXT(3). -+ */ -+ -+ if (asn1_peek_tag(&data, ASN1_CONTEXT(1))) { -+ uint8 flags; -+ -+ /* reqFlags [1] ContextFlags OPTIONAL */ -+ asn1_start_tag(&data, ASN1_CONTEXT(1)); -+ asn1_start_tag(&data, ASN1_BITFIELD); -+ while (asn1_tag_remaining(&data) > 0) { -+ asn1_read_uint8(&data, &flags); -+ } -+ asn1_end_tag(&data); -+ asn1_end_tag(&data); -+ } -+ -+ if (asn1_peek_tag(&data, ASN1_CONTEXT(2))) { -+ /* mechToken [2] OCTET STRING OPTIONAL */ -+ DATA_BLOB token; -+ asn1_start_tag(&data, ASN1_CONTEXT(2)); -+ asn1_read_OctetString(&data, &token); -+ asn1_end_tag(&data); -+ /* Throw away the token - not used. */ -+ data_blob_free(&token); -+ } -+ -+ if (asn1_peek_tag(&data, ASN1_CONTEXT(3))) { -+ /* mechListMIC [3] OCTET STRING OPTIONAL */ - asn1_start_tag(&data, ASN1_CONTEXT(3)); - asn1_start_tag(&data, ASN1_SEQUENCE(0)); - asn1_start_tag(&data, ASN1_CONTEXT(0)); diff --git a/package/thirdparty/samba30/samba30.mk b/package/thirdparty/samba30/samba30.mk deleted file mode 100644 index 2298196f7e..0000000000 --- a/package/thirdparty/samba30/samba30.mk +++ /dev/null @@ -1,120 +0,0 @@ -############################################################# -# -# samba -# -############################################################# -SAMBA30_VERSION:=3.0.37 -SAMBA30_SOURCE:=samba-$(SAMBA30_VERSION).tar.gz -SAMBA30_SITE:=http://samba.org/samba/ftp/stable - -SAMBA30_SUBDIR = source -SAMBA30_AUTORECONF = NO - -SAMBA30_INSTALL_STAGING = YES -SAMBA30_INSTALL_TARGET = YES - - -SAMBA30_DEPENDENCIES = \ - $(if $(BR2_ENABLE_LOCALE),,libiconv) \ - $(if $(BR2_PACKAGE_SAMBA30_AVAHI),avahi) \ - - -SAMBA30_CONF_ENV = \ - SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=yes \ - libreplace_cv_READDIR_GETDIRENTRIES=no \ - libreplace_cv_READDIR_GETDENTS=no \ - linux_getgrouplist_ok=no \ - samba_cv_REPLACE_READDIR=no \ - samba_cv_HAVE_WRFILE_KEYTAB=yes \ - samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \ - samba_cv_USE_SETREUID=yes \ - samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes \ - samba_cv_HAVE_IFACE_IFCONF=yes \ - samba_cv_HAVE_MMAP=yes \ - samba_cv_HAVE_FCNTL_LOCK=yes \ - samba_cv_HAVE_SECURE_MKSTEMP=yes \ - samba_cv_CC_NEGATIVE_ENUM_VALUES=yes \ - samba_cv_fpie=no \ - samba_cv_have_longlong=yes \ - samba_cv_HAVE_OFF64_T=yes \ - libreplace_cv_HAVE_IPV6=$(if $(BR2_INET_IPV6),yes,no) \ - $(if $(BR2_PACKAGE_SAMBA30_AVAHI),AVAHI_LIBS=-pthread) - - -SAMBA30_CONF_OPT = \ - --localstatedir=/var \ - --with-piddir=/var/run \ - --with-lockdir=/var/lock \ - --with-logfilebase=/var/log \ - --with-configdir=/etc/samba \ - --with-privatedir=/etc/samba \ - \ - --disable-cups \ - --enable-static \ - --enable-shared \ - --disable-shared-libs \ - --disable-pie \ - --disable-iprint \ - --disable-relro \ - --disable-dnssd \ - \ - $(if $(BR2_PACKAGE_SAMBA30_AVAHI),--enable-avahi,--disable-avahi) \ - \ - --disable-fam \ - --disable-swat \ - --without-cluster-support \ - --without-cifsupcall \ - --without-ads \ - --without-ldap \ - --with-included-popt \ - --with-included-iniparser \ - --without-sys-quotas \ - --without-krb5 \ - --without-automount \ - --without-sendfile-support \ - --with-libiconv=$(STAGING_DIR) \ - --without-cifsmount \ - --without-winbind \ - - -SAMBA30_INSTALL_TARGET_OPT = \ - DESTDIR=$(TARGET_DIR) -C $(SAMBA30_DIR)/$(SAMBA30_SUBDIR) \ - installclientlib - -SAMBA30_INSTALL_STAGING_OPT = \ - DESTDIR=$(STAGING_DIR) -C $(SAMBA30_DIR)/$(SAMBA30_SUBDIR) \ - installclientlib - -SAMBA30_UNINSTALL_TARGET_OPT = \ - DESTDIR=$(TARGET_DIR) -C $(SAMBA30_DIR)/$(SAMBA30_SUBDIR) \ - uninstallclientlib - -SAMBA30_UNINSTALL_STAGING_OPT = \ - DESTDIR=$(STAGING_DIR) -C $(SAMBA30_DIR)/$(SAMBA30_SUBDIR) \ - uninstallclientlib - -# non-binaries to remove -SAMBA30_TXTTARGETS_ = \ - usr/include/libsmbclient.h \ - usr/include/netapi.h \ - usr/include/smb_share_modes.h \ - usr/include/talloc.h \ - usr/include/tdb.h \ - usr/include/wbclient.h - -define SAMBA30_REMOVE_UNNEEDED_HEADERS - rm -f $(addprefix $(TARGET_DIR)/, $(SAMBA30_TXTTARGETS_)) -endef - -SAMBA30_POST_INSTALL_TARGET_HOOKS += SAMBA30_REMOVE_UNNEEDED_HEADERS - -define SAMBA30_AUTOGEN - @$(call MESSAGE,"Reconfiguring") - ( cd $(@D)/source && ./autogen.sh ) -endef - -SAMBA30_PRE_CONFIGURE_HOOKS = SAMBA30_AUTOGEN - -$(eval $(call AUTOTARGETS,package/thirdparty,samba30)) - -SAMBA30_CONFIGURE_CMDS += && ( cd $(@D)/source && make proto ) diff --git a/package/thirdparty/taglib18/taglib18.mk b/package/thirdparty/taglib18/taglib18.mk index 2660eb4e66..e1786aa3e6 100644 --- a/package/thirdparty/taglib18/taglib18.mk +++ b/package/thirdparty/taglib18/taglib18.mk @@ -17,4 +17,4 @@ ifneq ($(BR2_HAVE_DEVFILES),y) TAGLIB18_POST_INSTALL_TARGET_HOOKS += TAGLIB18_REMOVE_DEVFILE endif -$(eval $(call CMAKETARGETS,package/thirdparty,taglib18)) +$(eval $(cmake-package)) diff --git a/package/thirdparty/tinyxml/tinyxml.mk b/package/thirdparty/tinyxml/tinyxml.mk index b294f08eb3..391b175855 100644 --- a/package/thirdparty/tinyxml/tinyxml.mk +++ b/package/thirdparty/tinyxml/tinyxml.mk @@ -9,4 +9,5 @@ TINYXML_SITE = http://mirrors.xbmc.org/build-deps/sources TINYXML_AUTORECONF = YES TINYXML_INSTALL_STAGING = YES TINYXML_INSTALL_TARGET = YES -$(eval $(call AUTOTARGETS,package/thirdparty,tinyxml)) + +$(eval $(autotools-package)) diff --git a/package/thirdparty/tvheadend/Config.in b/package/thirdparty/tvheadend/Config.in deleted file mode 100644 index 22da1017be..0000000000 --- a/package/thirdparty/tvheadend/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_TVHEADEND - bool "tvheadend" - help - Web-based PVR. - -config BR2_PACKAGE_TVHEADEND_AVAHI - bool "support avahi" - default y - depends on BR2_PACKAGE_TVHEADEND - depends on BR2_PACKAGE_AVAHI_DAEMON - help - Include support for avahi diff --git a/package/thirdparty/tvheadend/tvheadend.mk b/package/thirdparty/tvheadend/tvheadend.mk deleted file mode 100644 index 8ea63a0cc3..0000000000 --- a/package/thirdparty/tvheadend/tvheadend.mk +++ /dev/null @@ -1,9 +0,0 @@ -TVHEADEND_VERSION = v3.4 -TVHEADEND_SITE_METHOD = git -TVHEADEND_SITE = git://github.com/tvheadend/tvheadend.git -TVHEADEND_INSTALL_STAGING = YES -TVHEADEND_INSTALL_TARGET = YES -TVHEADEND_DEPENDENCIES = v4lutils openssl \ - $(if $(BR2_PACKAGE_TVHEADEND_AVAHI),avahi) - -$(eval $(call AUTOTARGETS,package/thirdparty,tvheadend)) diff --git a/package/thirdparty/v4lutils/v4lutils.mk b/package/thirdparty/v4lutils/v4lutils.mk index d1b546cfed..e7e5ecff94 100644 --- a/package/thirdparty/v4lutils/v4lutils.mk +++ b/package/thirdparty/v4lutils/v4lutils.mk @@ -19,4 +19,4 @@ define V4LUTILS_INSTALL_TARGET_CMDS make DESTDIR="$(TARGET_DIR)" PREFIX="/usr" -C $(@D) install endef -$(eval $(call GENTARGETS,package/thirdparty,v4lutils)) +$(eval $(generic-package)) diff --git a/package/thirdparty/xbmc/Config.in b/package/thirdparty/xbmc/Config.in index e09a1f03c6..f6d08dc267 100644 --- a/package/thirdparty/xbmc/Config.in +++ b/package/thirdparty/xbmc/Config.in @@ -56,8 +56,8 @@ config BR2_PACKAGE_XBMC select BR2_PACKAGE_EXPAT select BR2_PACKAGE_LIBXML2 select BR2_PACKAGE_YAJL - select BR2_PACKAGE_SAMBA30 - select BR2_PACKAGE_SAMBA30_LIBSMBCLIENT + select BR2_PACKAGE_SAMBA + select BR2_PACKAGE_SAMBA_LIBSMBCLIENT select BR2_PACKAGE_LIBNFS select BR2_PACKAGE_LIBRTMP select BR2_PACKAGE_AFPFS_NG diff --git a/package/thirdparty/xbmc/xbmc.mk b/package/thirdparty/xbmc/xbmc.mk index eeba56c4f2..4b6fe10bb0 100644 --- a/package/thirdparty/xbmc/xbmc.mk +++ b/package/thirdparty/xbmc/xbmc.mk @@ -22,7 +22,7 @@ XBMC_DEPENDENCIES += libogg flac libmad libmpeg2 libogg \ freetype jasper jpeg libmodplug libpng libungif tiff libcurl \ libmicrohttpd libssh2 boost fribidi ncurses pcre libnfs afpfs-ng \ libplist libshairport libbluray libcec \ - readline expat libxml2 yajl samba30 libass opengl libusb-compat \ + readline expat libxml2 yajl samba libass opengl libusb-compat \ avahi udev tinyxml taglib18 libssh ifeq ($(BR2_PACKAGE_LIBAMPLAYERM1),y) @@ -85,4 +85,4 @@ ifneq ($(BR2_ENABLE_DEBUG),y) XBMC_POST_INSTALL_TARGET_HOOKS += XBMC_STRIP_BINARIES endif -$(eval $(call AUTOTARGETS,package/thirdparty,xbmc)) +$(eval $(autotools-package)) diff --git a/package/thirdparty/xbmcpvr/xbmcpvr.mk b/package/thirdparty/xbmcpvr/xbmcpvr.mk index 100be5636a..0b5c6605f9 100644 --- a/package/thirdparty/xbmcpvr/xbmcpvr.mk +++ b/package/thirdparty/xbmcpvr/xbmcpvr.mk @@ -7,5 +7,4 @@ XBMCPVR_INSTALL_TARGET = YES XBMCPVR_CONF_ENV += MYSQL_CONFIG=$(TARGET_DIR)/usr/bin/mysql_config XBMCPVR_CONF_OPT += --enable-addons-with-dependencies -$(eval $(call AUTOTARGETS,package/thirdparty,xbmcpvr)) - +$(eval $(autotools-package)) diff --git a/package/thirdparty/xios-skin/Config.in b/package/thirdparty/xios-skin/Config.in index 9e02c6ae53..1598a95c3b 100644 --- a/package/thirdparty/xios-skin/Config.in +++ b/package/thirdparty/xios-skin/Config.in @@ -1,3 +1,3 @@ -config BR2_PACKAGE_XIOS +config BR2_PACKAGE_XIOS_SKIN depends on BR2_PACKAGE_XBMC bool "XIOS Skin" diff --git a/package/thirdparty/xios-skin/xios-skin.mk b/package/thirdparty/xios-skin/xios-skin.mk new file mode 100644 index 0000000000..248577b0a6 --- /dev/null +++ b/package/thirdparty/xios-skin/xios-skin.mk @@ -0,0 +1,24 @@ +XIOS_SKIN_VERSION = 78e564bc2d8411a328459b9957741cd3e3493074 +XIOS_SKIN_SITE_METHOD = git +XIOS_SKIN_SITE = git://github.com/Pivosgroup/skin.pivos.git +XIOS_SKIN_INSTALL_STAGING = YES +XIOS_SKIN_INSTALL_TARGET = YES +XIOS_SKIN_DEPENDENCIES = xbmc +TEXTURE_PACKER=$(XBMC_DIR)/tools/TexturePacker/TexturePacker + +define XIOS_SKIN_BUILD_CMDS + $(TEXTURE_PACKER) -use_none -i $(@D)/media -o $(@D)/media/Textures.xbt +endef + +define XIOS_SKIN_INSTALL_STAGING_CMDS + mkdir -p $(STAGING_DIR)/usr/share/xbmc/addons/skin.xios + cp -rf $(@D)/* $(STAGING_DIR)/usr/share/xbmc/addons/skin.xios/ +endef + +define XIOS_SKIN_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/usr/share/xbmc/addons/skin.xios/media + cd $(@D); cp -rf `ls -I media -1` $(TARGET_DIR)/usr/share/xbmc/addons/skin.xios + cp -f $(@D)/media/Textures.xbt $(TARGET_DIR)/usr/share/xbmc/addons/skin.xios/media +endef + +$(eval $(generic-package)) diff --git a/package/thirdparty/xios-skin/xios.mk b/package/thirdparty/xios-skin/xios.mk deleted file mode 100644 index 676a8fffbb..0000000000 --- a/package/thirdparty/xios-skin/xios.mk +++ /dev/null @@ -1,24 +0,0 @@ -XIOS_VERSION = 78e564bc2d8411a328459b9957741cd3e3493074 -XIOS_SITE_METHOD = git -XIOS_SITE = git://github.com/Pivosgroup/skin.pivos.git -XIOS_INSTALL_STAGING = YES -XIOS_INSTALL_TARGET = YES -XIOS_DEPENDENCIES = xbmc -TEXTURE_PACKER=$(XBMC_DIR)/tools/TexturePacker/TexturePacker - -define XIOS_BUILD_CMDS - $(TEXTURE_PACKER) -use_none -i $(@D)/media -o $(@D)/media/Textures.xbt -endef - -define XIOS_INSTALL_STAGING_CMDS - mkdir -p $(STAGING_DIR)/usr/share/xbmc/addons/skin.xios - cp -rf $(@D)/* $(STAGING_DIR)/usr/share/xbmc/addons/skin.xios/ -endef - -define XIOS_INSTALL_TARGET_CMDS - mkdir -p $(TARGET_DIR)/usr/share/xbmc/addons/skin.xios/media - cd $(@D); cp -rf `ls -I media -1` $(TARGET_DIR)/usr/share/xbmc/addons/skin.xios - cp -f $(@D)/media/Textures.xbt $(TARGET_DIR)/usr/share/xbmc/addons/skin.xios/media -endef - -$(eval $(call GENTARGETS,package/thirdparty,xios)) diff --git a/package/thirdparty/yajl/Config.in b/package/thirdparty/yajl/Config.in deleted file mode 100644 index e1b46f410a..0000000000 --- a/package/thirdparty/yajl/Config.in +++ /dev/null @@ -1,8 +0,0 @@ -config BR2_PACKAGE_YAJL - bool "yajl" - help - Yet Another JSON Library. YAJL is a small event-driven - (SAX-style) JSON parser written in ANSI C, and a small - validating JSON generator. - - http://lloyd.github.com/yajl/ diff --git a/package/thirdparty/yajl/yajl.mk b/package/thirdparty/yajl/yajl.mk deleted file mode 100644 index 9523252481..0000000000 --- a/package/thirdparty/yajl/yajl.mk +++ /dev/null @@ -1,11 +0,0 @@ -################################################################################ -# -## yajl -# -################################################################################# - -YAJL_VERSION = 2.0.2 -YAJL_SITE = git://github.com/lloyd/yajl.git -YAJL_INSTALL_STAGING = YES - -$(eval $(call CMAKETARGETS,package/thirdparty,yajl)) diff --git a/package/thttpd/Config.in b/package/thttpd/Config.in index 172a2d69e7..d359785435 100644 --- a/package/thttpd/Config.in +++ b/package/thttpd/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_THTTPD bool "thttpd" + depends on BR2_USE_MMU # fork() help thttpd is a simple, small, portable, fast, and secure HTTP server diff --git a/package/thttpd/thttpd-2.25b-getline.patch b/package/thttpd/thttpd-2.25b-getline.patch new file mode 100644 index 0000000000..35c366aef1 --- /dev/null +++ b/package/thttpd/thttpd-2.25b-getline.patch @@ -0,0 +1,26 @@ +Fix glibc/eglibc getline() conflicting functions. + +Signed-off-by: Gustavo Zacarias +--- + +diff -Nura thttpd-2.25b.orig/extras/htpasswd.c thttpd-2.25b/extras/htpasswd.c +--- thttpd-2.25b.orig/extras/htpasswd.c 2001-12-18 21:08:08.000000000 -0300 ++++ thttpd-2.25b/extras/htpasswd.c 2011-11-25 11:42:47.198582812 -0300 +@@ -49,7 +49,7 @@ + while((line[y++] = line[x++])); + } + +-static int getline(char *s, int n, FILE *f) { ++static int get_line(char *s, int n, FILE *f) { + register int i=0; + + while(1) { +@@ -189,7 +189,7 @@ + strcpy(user,argv[2]); + + found = 0; +- while(!(getline(line,MAX_STRING_LEN,f))) { ++ while(!(get_line(line,MAX_STRING_LEN,f))) { + if(found || (line[0] == '#') || (!line[0])) { + putline(tfp,line); + continue; diff --git a/package/thttpd/thttpd.mk b/package/thttpd/thttpd.mk index c67aa49cf0..7431cbc022 100644 --- a/package/thttpd/thttpd.mk +++ b/package/thttpd/thttpd.mk @@ -1,8 +1,9 @@ -############################################################# +################################################################################ # # thttpd # -############################################################# +################################################################################ + THTTPD_VERSION = 2.25b THTTPD_SOURCE = thttpd_$(THTTPD_VERSION).orig.tar.gz THTTPD_PATCH = thttpd_$(THTTPD_VERSION)-11.diff.gz @@ -11,7 +12,7 @@ THTTPD_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/t/thttpd/ ifneq ($(THTTPD_PATCH),) define THTTPD_DEBIAN_PATCHES if [ -d $(@D)/debian/patches ]; then \ - toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches \*.patch; \ + support/scripts/apply-patches.sh $(@D) $(@D)/debian/patches \*.patch; \ fi endef endif @@ -48,4 +49,4 @@ define THTTPD_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/bin/syslogtocern endef -$(eval $(call AUTOTARGETS,package,thttpd)) +$(eval $(autotools-package)) diff --git a/package/ti-gfx/Config.in b/package/ti-gfx/Config.in new file mode 100644 index 0000000000..c34947139c --- /dev/null +++ b/package/ti-gfx/Config.in @@ -0,0 +1,65 @@ +config BR2_PACKAGE_TI_GFX + bool "ti-gfx" + select BR2_PACKAGE_HAS_OPENGL_EGL + select BR2_PACKAGE_HAS_OPENGL_ES + select BR2_PACKAGE_HAS_POWERVR + depends on BR2_LINUX_KERNEL && BR2_TOOLCHAIN_USES_GLIBC && BR2_arm + help + Graphics libraries for TI boards. + + http://downloads.ti.com/dsps/dsps_public_sw/gfxsdk/ + +if BR2_PACKAGE_TI_GFX + +config BR2_PACKAGE_TI_GFX_DEBUG + bool "enable debug support" + help + Turns on debugging in the kernel module, install libraries built with + debugging enabled, installs various tests and installs esrev script. + +config BR2_PACKAGE_TI_GFX_DEMOS + bool "install demos" + default y + help + Install the OGLES2ChameleonMan and OGLES2MagicLantern demos + +config BR2_PACKAGE_TI_GFX_EGLIMAGE + bool "install eglimage version of libraries" + help + Installs OpenGL libaries which support the eglimage api. + +choice + prompt "Target" + default BR2_PACKAGE_TI_GFX_ES3 + help + Select the SOC for which you would like to install drivers. Please use the + chart at + http://processors.wiki.ti.com/index.php/OMAP35x_Graphics_SDK_Getting_Started_Guide + +config BR2_PACKAGE_TI_GFX_ES3 + bool "es3.x (OMAP35xx, AM35xx Rev 3.1+)" + help + OMAP35xx, AM35xx Rev 3.1+ + +config BR2_PACKAGE_TI_GFX_ES5 + bool "es5.x (AM37xx, DM37xx)" + help + AM37xx, DM37xx + +config BR2_PACKAGE_TI_GFX_ES6 + bool "es6.x (AM387x, DMA814x, AM389x, DM816x)" + help + AM387x, DM814x, AM389x, DM816x + +config BR2_PACKAGE_TI_GFX_ES8 + bool "es8.x (AM335x)" + help + AM335x + +endchoice + +endif + +comment "ti-gfx needs an (e)glibc toolchain and the linux kernel" + depends on BR2_arm + depends on !(BR2_LINUX_KERNEL && BR2_TOOLCHAIN_USES_GLIBC) diff --git a/package/ti-gfx/S80ti-gfx b/package/ti-gfx/S80ti-gfx new file mode 100644 index 0000000000..fc5999a86d --- /dev/null +++ b/package/ti-gfx/S80ti-gfx @@ -0,0 +1,53 @@ +#!/bin/sh + +start() { + echo "ti-gfx: starting pvr driver" + + BITSPERPIXEL="$(fbset | awk '/geom/ {print $6}')" + YRES="$(fbset | awk '/geom/ {print $3}')" + # Set RGBA ordering to something the drivers like + if [ "$BITSPERPIXEL" = "32" ] ; then + fbset -rgba 8/16,8/8,8/0,8/24 + fi + # Try to enable triple buffering when there's enough VRAM + fbset -vyres $(( YRES*3 )) + + modprobe pvrsrvkm + modprobe omaplfb + modprobe bufferclass_ti + + pvr_maj=$(awk '$2=="pvrsrvkm" { print $1; }' /proc/devices) + rm -f /dev/pvrsrvkm + + mknod /dev/pvrsrvkm c $pvr_maj 0 + chmod 600 /dev/pvrsrvkm + + if ! /usr/bin/pvrsrvctl --start --no-module; then + echo "ti-gfx: unable to start server" + fi +} + +stop() { + echo "ti-gfx: stopping pvr driver" + + rmmod bufferclass_ti + rmmod omaplfb + rmmod pvrsrvkm +} + +case "$1" in +start) + start +;; +stop) + stop +;; +restart) + stop + start +;; +*) + echo "ti-gfx: Please use start, stop, or restart." + exit 1 +;; +esac diff --git a/package/ti-gfx/egl.pc b/package/ti-gfx/egl.pc new file mode 100644 index 0000000000..223fb04b98 --- /dev/null +++ b/package/ti-gfx/egl.pc @@ -0,0 +1,11 @@ +prefix=/usr/ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: egl +Description: TI Graphics SDK implementation of EGL +Version: 1.9.2188537 +Requires: +Libs: -L${libdir} -lEGL -lGLESv2 -lIMGegl +Cflags: -I${includedir}/EGL/ -I${includedir} diff --git a/package/ti-gfx/esrev.sh b/package/ti-gfx/esrev.sh new file mode 100644 index 0000000000..6220d4477d --- /dev/null +++ b/package/ti-gfx/esrev.sh @@ -0,0 +1,59 @@ +#!/bin/sh + +# Debug script to determine proper ES revision for the current board. The +# pvrsrvkm module must be insmoded before attempting to get the es rev. + +machine_id() { # return the machine ID + awk 'BEGIN { FS=": " } /Hardware/ \ + { gsub(" ", "_", $2); print tolower($2) } ' +---- +Index: ti-gfx-4_09_00_01/GFX_Linux_KM/Makefile +=================================================================== +--- ti-gfx-4_09_00_01.orig/GFX_Linux_KM/Makefile 2013-03-07 11:00:11.000000000 -0600 ++++ ti-gfx-4_09_00_01/GFX_Linux_KM/Makefile 2013-05-23 01:36:29.356676281 -0500 +@@ -479,6 +479,9 @@ + all: + $(MAKE) -C $(KERNELDIR) M=`pwd` $* + ++install: ++ $(MAKE) -C $(KERNELDIR) M=`pwd` modules_install ++ + clean: + @find . -name "*.o" -exec rm -r {} \; + @find . -name "*.ko" -exec rm -r {} \; diff --git a/package/ti-gfx/ti-gfx-newclkapi.patch b/package/ti-gfx/ti-gfx-newclkapi.patch new file mode 100644 index 0000000000..8f50c7ee12 --- /dev/null +++ b/package/ti-gfx/ti-gfx-newclkapi.patch @@ -0,0 +1,143 @@ +This patch adjusts the omap3630 portion of the powervr driver to use the new +clk kernel api. + +Signed-off-by: Spenser Gilliland +---- +Index: ti-gfx-4_09_00_01/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c +=================================================================== +--- ti-gfx-4_09_00_01.orig/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c 2013-06-28 13:44:06.352701522 -0500 ++++ ti-gfx-4_09_00_01/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c 2013-06-28 13:45:12.364702727 -0500 +@@ -153,6 +153,49 @@ + psTimingInfo->ui32ActivePowManLatencyms = SYS_SGX_ACTIVE_POWER_LATENCY_MS; + } + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0) ++int clk_disable_unprepare(struct clk *clk) ++{ ++ return clk_disable(clk); ++} ++#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) ++int clk_disable_unprepare(struct clk *clk) ++{ ++ res = clk_disable(clk); ++ if (res < 0) ++ return res; ++ ++ res = clk_unprepare(clk); ++ if (ret < 0) ++ return res; ++ ++ return 0; ++} ++#endif ++ ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0) ++int clk_prepare_enable(struct clk *clk) ++{ ++ return clk_enable(clk); ++} ++#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) ++int clk_prepare_enable(struct clk *clk) ++{ ++ res = clk_prepare(clk); ++ if (ret < 0) ++ return res; ++ ++ res = clk_enable(clk); ++ if (res < 0) { ++ clk_unprepare(clk); ++ return res; ++ } ++ ++ return 0; ++} ++#endif ++ + PVRSRV_ERROR EnableSGXClocks(SYS_DATA *psSysData) + { + #if !defined(NO_HARDWARE) +@@ -167,19 +210,19 @@ + + PVR_DPF((PVR_DBG_MESSAGE, "EnableSGXClocks: Enabling SGX Clocks")); + +- res=clk_enable(psSysSpecData->psSGX_FCK); ++ res=clk_prepare_enable(psSysSpecData->psSGX_FCK); + if (res < 0) + { + PVR_DPF((PVR_DBG_ERROR, "EnableSGXClocks: Couldn't enable SGX functional clock (%d)", res)); + return PVRSRV_ERROR_UNABLE_TO_ENABLE_CLOCK; + } + +- res=clk_enable(psSysSpecData->psSGX_ICK); ++ res=clk_prepare_enable(psSysSpecData->psSGX_ICK); + if (res < 0) + { + PVR_DPF((PVR_DBG_ERROR, "EnableSGXClocks: Couldn't enable SGX interface clock (%d)", res)); + +- clk_disable(psSysSpecData->psSGX_FCK); ++ clk_disable_unprepare(psSysSpecData->psSGX_FCK); + return PVRSRV_ERROR_UNABLE_TO_ENABLE_CLOCK; + } + +@@ -233,7 +276,6 @@ + return PVRSRV_OK; + } + +- + IMG_VOID DisableSGXClocks(SYS_DATA *psSysData) + { + #if !defined(NO_HARDWARE) +@@ -246,9 +288,9 @@ + + PVR_DPF((PVR_DBG_MESSAGE, "DisableSGXClocks: Disabling SGX Clocks")); + +- clk_disable(psSysSpecData->psSGX_FCK); ++ clk_disable_unprepare(psSysSpecData->psSGX_FCK); + +- clk_disable(psSysSpecData->psSGX_ICK); ++ clk_disable_unprepare(psSysSpecData->psSGX_ICK); + + // SysDisableSGXInterrupts(psSysData); + +@@ -374,14 +416,14 @@ + rate = clk_get_rate(psSysSpecData->psGPT11_FCK); + PVR_TRACE(("GPTIMER11 clock is %dMHz", HZ_TO_MHZ(rate))); + +- res = clk_enable(psSysSpecData->psGPT11_FCK); ++ res = clk_prepare_enable(psSysSpecData->psGPT11_FCK); + if (res < 0) + { + PVR_DPF((PVR_DBG_ERROR, "EnableSystemClocks: Couldn't enable GPTIMER11 functional clock (%d)", res)); + goto ExitError; + } + +- res = clk_enable(psSysSpecData->psGPT11_ICK); ++ res = clk_prepare_enable(psSysSpecData->psGPT11_ICK); + if (res < 0) + { + PVR_DPF((PVR_DBG_ERROR, "EnableSystemClocks: Couldn't enable GPTIMER11 interface clock (%d)", res)); +@@ -444,9 +486,9 @@ + + ExitDisableGPT11ICK: + #if defined(PVR_OMAP3_TIMING_PRCM) +- clk_disable(psSysSpecData->psGPT11_ICK); ++ clk_disable_unprepare(psSysSpecData->psGPT11_ICK); + ExitDisableGPT11FCK: +- clk_disable(psSysSpecData->psGPT11_FCK); ++ clk_disable_unprepare(psSysSpecData->psGPT11_FCK); + ExitError: + #endif + eError = PVRSRV_ERROR_CLOCK_REQUEST_FAILED; +@@ -490,9 +532,9 @@ + #endif + + #if defined(PVR_OMAP3_TIMING_PRCM) +- clk_disable(psSysSpecData->psGPT11_ICK); ++ clk_disable_unprepare(psSysSpecData->psGPT11_ICK); + +- clk_disable(psSysSpecData->psGPT11_FCK); ++ clk_disable_unprepare(psSysSpecData->psGPT11_FCK); + #endif + } + #endif diff --git a/package/ti-gfx/ti-gfx.mk b/package/ti-gfx/ti-gfx.mk new file mode 100644 index 0000000000..a94f00dc1f --- /dev/null +++ b/package/ti-gfx/ti-gfx.mk @@ -0,0 +1,199 @@ +################################################################################ +# +# ti-gfx +# +################################################################################ + +TI_GFX_VERSION = 4_09_00_01 +TI_GFX_SO_VERSION = 1.9.2188537 + +ifeq ($(BR2_ARM_EABIHF),y) +TI_GFX_SOURCE = Graphics_SDK_setuplinux_$(TI_GFX_VERSION)_hardfp_minimal_demos.bin +else +TI_GFX_SOURCE = Graphics_SDK_setuplinux_$(TI_GFX_VERSION)_minimal_demos.bin +endif + +TI_GFX_SITE = http://downloads.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/$(TI_GFX_VERSION)/exports/ +TI_GFX_LICENSE = Technology / Software Publicly Available +TI_GFX_LICENSE_FILES = TSPA.txt +TI_GFX_INSTALL_STAGING = YES + +TI_GFX_DEPENDENCIES = linux + +ifeq ($(BR2_PACKAGE_TI_GFX_ES3),y) +TI_GFX_OMAPES = 3.x +TI_GFX_PLATFORM = omap3 +endif +ifeq ($(BR2_PACKAGE_TI_GFX_ES5),y) +TI_GFX_OMAPES = 5.x +TI_GFX_PLATFORM = omap3630 +endif +ifeq ($(BR2_PACKAGE_TI_GFX_ES6),y) +TI_GFX_OMAPES = 6.x +TI_GFX_PLATFORM = ti81xx +endif +ifeq ($(BR2_PACKAGE_TI_GFX_ES8),y) +TI_GFX_OMAPES = 8.x +TI_GFX_PLATFORM = ti335x +endif + +ifeq ($(BR2_PACKAGE_TI_GFX_DEBUG),y) +TI_GFX_DEBUG_LIB = dbg +TI_GFX_DEBUG_KM = debug +else +TI_GFX_DEBUG_LIB = rel +TI_GFX_DEBUG_KM = release +endif + +TI_GFX_BIN_PATH = gfx_$(TI_GFX_DEBUG_LIB)_es$(TI_GFX_OMAPES) + +TI_GFX_KM_MAKE_OPTS = \ + $(LINUX_MAKE_FLAGS) \ + BUILD=$(TI_GFX_DEBUG_KM) \ + TI_PLATFORM=$(TI_GFX_PLATFORM) \ + OMAPES=$(TI_GFX_OMAPES) \ + SUPPORT_XORG=0 \ + KERNELDIR=$(LINUX_DIR) + +TI_GFX_DEMO_MAKE_OPTS = \ + PLATFORM=LinuxARMV7 \ + X11BUILD=0 \ + PLAT_CC="$(TARGET_CC)" \ + PLAT_CPP="$(TARGET_CXX)" \ + PLAT_AR="$(TARGET_AR)" + +# The only required binary is pvrsrvctl all others are optional +TI_GFX_BIN = pvrsrvctl + +ifeq ($(BR2_PACKAGE_TI_GFX_DEBUG),y) +TI_GFX_BIN += \ + eglinfo ews_server ews_server_es2 ews_test_gles1 ews_test_gles2 \ + ews_test_swrender gles1test1 gles2test1 pvr2d_test services_test \ + sgx_blit_test sgx_clipblit_test sgx_flip_test sgx_init_test \ + sgx_render_flip_test xeglinfo xgles1test1 xgles2test1 xmultiegltest +endif + +TI_GFX_LIBS = \ + libews libpvr2d libpvrEWS_WSEGL libpvrPVR2D_BLITWSEGL libpvrPVR2D_DRIWSEGL \ + libpvrPVR2D_FLIPWSEGL libpvrPVR2D_FRONTWSEGL libpvrPVR2D_LINUXFBWSEGL \ + libPVRScopeServices libsrv_init libsrv_um libusc pvr_drv + +TI_GFX_EGLIMAGE_LIBS = \ + libEGL libGLES_CM libGLESv2 libglslcompiler libIMGegl + +TI_GFX_DEMOS = ChameleonMan MagicLantern +TI_GFX_DEMOS_LOC = GFX_Linux_SDK/OGLES2/SDKPackage/Demos +TI_GFX_DEMOS_MAKE_LOC = OGLES2/Build/LinuxGeneric +TI_GFX_DEMOS_BIN_LOC = OGLES2/Build/LinuxARMV7/ReleaseRaw/ + +TI_GFX_HDR_DIRS = OGLES2/EGL OGLES2/EWS OGLES2/GLES2 OGLES2/KHR \ + OGLES/GLES bufferclass_ti/ pvr2d/ wsegl/ + +define TI_GFX_EXTRACT_CMDS + $(RM) -rf $(TI_GFX_DIR) + chmod +x $(DL_DIR)/$(TI_GFX_SOURCE) + printf "Y\nY\n qY\n\n" | $(DL_DIR)/$(TI_GFX_SOURCE) \ + --prefix $(@D) \ + --mode console +endef + +define TI_GFX_BUILD_KM_CMDS + $(MAKE) $(TI_GFX_KM_MAKE_OPTS) -C $(@D)/GFX_Linux_KM all +endef + +ifeq ($(BR2_PACKAGE_TI_GFX_DEMOS),y) +define TI_GFX_BUILD_DEMO_CMDS + $(foreach demo, $(TI_GFX_DEMOS), \ + $(TARGET_MAKE_ENV) $(MAKE1) -C \ + $(@D)/$(TI_GFX_DEMOS_LOC)/$(demo)/$(TI_GFX_DEMOS_MAKE_LOC) \ + $(TI_GFX_DEMO_MAKE_OPTS) all + ) +endef +endif + +define TI_GFX_BUILD_CMDS + $(TI_GFX_BUILD_KM_CMDS) + $(TI_GFX_BUILD_DEMO_CMDS) +endef + +# Install libs +# argument 1 is the location to install to (e.g. STAGING_DIR, TARGET_DIR) +define TI_GFX_INSTALL_LIBS + $(foreach lib,$(TI_GFX_LIBS), + $(INSTALL) -D -m 0644 $(@D)/$(TI_GFX_BIN_PATH)/$(lib).so \ + $(1)/usr/lib/$(lib).so.$(TI_GFX_SO_VERSION); \ + ln -sf $(lib).so.$(TI_GFX_SO_VERSION) \ + $(1)/usr/lib/$(lib).so + ) + $(foreach lib,$(TI_GFX_EGLIMAGE_LIBS), + $(if $(BR2_PACKAGE_TI_GFX_EGLIMAGE), + $(INSTALL) -D -m 0644 $(@D)/$(TI_GFX_BIN_PATH)/$(lib)_eglimage.so \ + $(1)/usr/lib/$(lib).so.$(TI_GFX_SO_VERSION); + , + $(INSTALL) -D -m 0644 $(@D)/$(TI_GFX_BIN_PATH)/$(lib).so \ + $(1)/usr/lib/$(lib).so.$(TI_GFX_SO_VERSION); + ) + ln -sf $(lib).so.$(TI_GFX_SO_VERSION) \ + $(1)/usr/lib/$(lib).so + ) +endef + +define TI_GFX_INSTALL_STAGING_CMDS + $(foreach incdir,$(TI_GFX_HDR_DIRS), + $(INSTALL) -d $(STAGING_DIR)/usr/include/$(notdir $(incdir)); \ + $(INSTALL) -D -m 0644 $(@D)/include/$(incdir)/*.h \ + $(STAGING_DIR)/usr/include/$(notdir $(incdir))/ + ) + $(call TI_GFX_INSTALL_LIBS,$(STAGING_DIR)) + + $(INSTALL) -D -m 0644 package/ti-gfx/egl.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc + $(INSTALL) -D -m 0644 package/ti-gfx/glesv2.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc +endef + +define TI_GFX_INSTALL_KM_CMDS + $(MAKE) $(TI_GFX_KM_MAKE_OPTS) -C $(@D)/GFX_Linux_KM install +endef + +define TI_GFX_INSTALL_BINS_CMDS + $(foreach bin,$(TI_GFX_BIN), + $(INSTALL) -D -m 0755 $(@D)/$(TI_GFX_BIN_PATH)/$(bin) \ + $(TARGET_DIR)/usr/bin/$(bin) + ) + $(if $(BR2_PACKAGE_TI_GFX_DEBUG), + $(INSTALL) -D -m 0755 package/ti-gfx/esrev.sh \ + $(TARGET_DIR)/usr/sbin/esrev + ) +endef + +define TI_GFX_INSTALL_CONF_CMDS + # libs use the following file for configuration. + $(INSTALL) -D -m 0644 package/ti-gfx/powervr.ini \ + $(TARGET_DIR)/etc/powervr.ini +endef + +ifeq ($(BR2_PACKAGE_TI_GFX_DEMOS),y) +define TI_GFX_INSTALL_DEMOS_CMDS + $(foreach demo,$(TI_GFX_DEMOS), + $(INSTALL) -D -m 0755 \ + $(@D)/$(TI_GFX_DEMOS_LOC)/$(demo)/$(TI_GFX_DEMOS_BIN_LOC)/OGLES2$(demo) \ + $(TARGET_DIR)/usr/bin/OGLES2$(demo) + ) +endef +endif + +define TI_GFX_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/ti-gfx/S80ti-gfx \ + $(TARGET_DIR)/etc/init.d/S80ti-gfx +endef + +define TI_GFX_INSTALL_TARGET_CMDS + $(TI_GFX_INSTALL_KM_CMDS) + $(TI_GFX_INSTALL_BINS_CMDS) + $(call TI_GFX_INSTALL_LIBS,$(TARGET_DIR)) + $(TI_GFX_INSTALL_CONF_CMDS) + $(TI_GFX_INSTALL_DEMOS_CMDS) +endef + +$(eval $(generic-package)) diff --git a/package/ti-utils/Config.in b/package/ti-utils/Config.in new file mode 100644 index 0000000000..e48e10bdd2 --- /dev/null +++ b/package/ti-utils/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_TI_UTILS + bool "ti-utils" + depends on BR2_TOOLCHAIN_HAS_THREADS # libnl + select BR2_PACKAGE_LIBNL + help + The calibrator and other useful utilities for TI wireless solution, + based on wl12xx driver. + + http://linuxwireless.org/en/users/Drivers/wl12xx/calibrator + +comment "ti-utils needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/ti-utils/ti-utils.mk b/package/ti-utils/ti-utils.mk new file mode 100644 index 0000000000..8c720b2d79 --- /dev/null +++ b/package/ti-utils/ti-utils.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# ti-utils +# +################################################################################ + +TI_UTILS_VERSION = 06dbdb2727354b5f3ad7c723897f40051fddee49 +TI_UTILS_SITE = http://github.com/gxk/ti-utils/tarball/$(TI_UTILS_VERSION) +TI_UTILS_DEPENDENCIES = libnl + +define TI_UTILS_BUILD_CMDS + $(MAKE1) NFSROOT="$(STAGING_DIR)" \ + CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -I$(STAGING_DIR)/usr/include/libnl3" \ + LIBS="-lnl-3 -lnl-genl-3 -lm" -C $(@D) all +endef + +define TI_UTILS_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/calibrator \ + $(TARGET_DIR)/usr/bin/calibrator + $(INSTALL) -m 0755 -D $(@D)/scripts/go.sh \ + $(TARGET_DIR)/usr/share/ti-utils/scripts/go.sh + + cp -r $(@D)/ini_files $(TARGET_DIR)/usr/share/ti-utils +endef + +define TI_UTILS_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/bin/calibrator + rm -fr $(TARGET_DIR)/usr/share/ti-utils +endef + +$(eval $(generic-package)) diff --git a/package/multimedia/tidsp-binaries/Config.in b/package/tidsp-binaries/Config.in similarity index 100% rename from package/multimedia/tidsp-binaries/Config.in rename to package/tidsp-binaries/Config.in diff --git a/package/tidsp-binaries/tidsp-binaries.mk b/package/tidsp-binaries/tidsp-binaries.mk new file mode 100644 index 0000000000..8c06ea7735 --- /dev/null +++ b/package/tidsp-binaries/tidsp-binaries.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# tidsp-binaries +# +################################################################################ + +TIDSP_BINARIES_VERSION = 23.i3.8 +TIDSP_BINARIES_SITE = http://gst-dsp.googlecode.com/files/ + +define TIDSP_BINARIES_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) -e DESTDIR=$(TARGET_DIR) install +endef + +define TIDSP_BINARIES_UNINSTALL_TARGET_CMDS + $(RM) -r $(TARGET_DIR)/lib/dsp +endef + +$(eval $(generic-package)) diff --git a/package/tiff/Config.in b/package/tiff/Config.in index c6336e23d6..7850965b31 100644 --- a/package/tiff/Config.in +++ b/package/tiff/Config.in @@ -1,8 +1,75 @@ config BR2_PACKAGE_TIFF bool "tiff" - select BR2_PACKAGE_ZLIB - select BR2_PACKAGE_JPEG help Library for handling TIFF (Tag Image File Format) images. http://www.libtiff.org/ + +if BR2_PACKAGE_TIFF +menu "tiff Options" + +config BR2_PACKAGE_TIFF_CCITT + bool "CCITT Group 3 & 4 support" + default y + +config BR2_PACKAGE_TIFF_PACKBITS + bool "Macintosh PackBits algorithm" + default y + +config BR2_PACKAGE_TIFF_LZW + bool "LZW algorithm" + default y + +config BR2_PACKAGE_TIFF_THUNDER + bool "ThunderScan 4-bit RLE algorithm" + default y + +config BR2_PACKAGE_TIFF_NEXT + bool "NeXT 2-bit RLE algorithm" + default y + +config BR2_PACKAGE_TIFF_LOGLUV + bool "LogLuv high dynamic range encoding" + default y + +config BR2_PACKAGE_TIFF_MDI + bool "Microsoft Document Imaging" + default y + +config BR2_PACKAGE_TIFF_ZLIB + bool "Zlib usage (required for Deflate compression)" + select BR2_PACKAGE_ZLIB + default y + +config BR2_PACKAGE_TIFF_PIXARLOG + bool "Pixar log-format algorithm (requires Zlib)" + select BR2_PACKAGE_TIFF_ZLIB + default y + +config BR2_PACKAGE_TIFF_JPEG + bool "JPEG compression" + select BR2_PACKAGE_JPEG + default y + +config BR2_PACKAGE_TIFF_OLD_JPEG + bool "Old JPEG decompression" + default y + +config BR2_PACKAGE_TIFF_JBIG + bool "JBIG compression" + default y +endmenu + +endif + +config BR2_PACKAGE_TIFF_TIFF2PDF + bool "tiff2pdf" + depends on BR2_PACKAGE_TIFF + help + tiff2pdf utility + +config BR2_PACKAGE_TIFF_TIFFCP + bool "tiffcp" + depends on BR2_PACKAGE_TIFF + help + tiffcp utility diff --git a/package/tiff/tiff.mk b/package/tiff/tiff.mk index 3f41b67c68..723079f831 100644 --- a/package/tiff/tiff.mk +++ b/package/tiff/tiff.mk @@ -1,24 +1,89 @@ -############################################################# +################################################################################ # # tiff # -############################################################# -TIFF_VERSION:=3.9.4 -TIFF_SITE:=ftp://ftp.remotesensing.org/pub/libtiff -TIFF_SOURCE:=tiff-$(TIFF_VERSION).tar.gz +################################################################################ + +TIFF_VERSION = 4.0.3 +TIFF_SITE = http://download.osgeo.org/libtiff +TIFF_LICENSE = tiff license +TIFF_LICENSE_FILES = COPYRIGHT TIFF_INSTALL_STAGING = YES TIFF_INSTALL_TARGET = YES TIFF_CONF_OPT = \ - --enable-shared \ - --enable-static \ --disable-cxx \ --without-x \ -TIFF_DEPENDENCIES = host-pkg-config zlib jpeg -HOST_TIFF_DEPENDENCIES = host-zlib host-jpeg +TIFF_DEPENDENCIES = host-pkgconf +HOST_TIFF_DEPENDENCIES = host-zlib host-jpeg-turbo + +TIFF_TOOLS_LIST = +ifeq ($(BR2_PACKAGE_TIFF_TIFF2PDF),y) + TIFF_TOOLS_LIST += tiff2pdf +endif +ifeq ($(BR2_PACKAGE_TIFF_TIFFCP),y) + TIFF_TOOLS_LIST += tiffcp +endif + +ifneq ($(BR2_PACKAGE_TIFF_CCITT),y) + TIFF_CONF_OPT += --disable-ccitt +endif + +ifneq ($(BR2_PACKAGE_TIFF_PACKBITS),y) + TIFF_CONF_OPT += --disable-packbits +endif + +ifneq ($(BR2_PACKAGE_TIFF_LZW),y) + TIFF_CONF_OPT += --disable-lzw +endif + +ifneq ($(BR2_PACKAGE_TIFF_THUNDER),y) + TIFF_CONF_OPT += --disable-thunder +endif + +ifneq ($(BR2_PACKAGE_TIFF_NEXT),y) + TIFF_CONF_OPT += --disable-next +endif + +ifneq ($(BR2_PACKAGE_TIFF_LOGLUV),y) + TIFF_CONF_OPT += --disable-logluv +endif + +ifneq ($(BR2_PACKAGE_TIFF_MDI),y) + TIFF_CONF_OPT += --disable-mdi +endif + +ifneq ($(BR2_PACKAGE_TIFF_ZLIB),y) + TIFF_CONF_OPT += --disable-zlib +else + TIFF_DEPENDENCIES += zlib +endif + +ifneq ($(BR2_PACKAGE_TIFF_PIXARLOG),y) + TIFF_CONF_OPT += --disable-pixarlog +endif + +ifneq ($(BR2_PACKAGE_TIFF_JPEG),y) + TIFF_CONF_OPT += --disable-jpeg +else + TIFF_DEPENDENCIES += jpeg +endif + +ifneq ($(BR2_PACKAGE_TIFF_OLD_JPEG),y) + TIFF_CONF_OPT += --disable-old-jpeg +endif + +ifneq ($(BR2_PACKAGE_TIFF_JBIG),y) + TIFF_CONF_OPT += --disable-jbig +endif + define TIFF_INSTALL_TARGET_CMDS -cp -a $(@D)/libtiff/.libs/libtiff.so* $(TARGET_DIR)/usr/lib/ + for i in $(TIFF_TOOLS_LIST); \ + do \ + $(INSTALL) -m 755 -D $(@D)/tools/$$i $(TARGET_DIR)/usr/bin/$$i; \ + done endef -$(eval $(call AUTOTARGETS,package,tiff)) -$(eval $(call AUTOTARGETS,package,tiff,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/time/Config.in b/package/time/Config.in new file mode 100644 index 0000000000..0ec3be351a --- /dev/null +++ b/package/time/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_TIME + bool "time" + depends on BR2_USE_MMU # fork() + help + The GNU time utility. + + http://savannah.gnu.org/projects/time/ diff --git a/package/time/time.mk b/package/time/time.mk new file mode 100644 index 0000000000..56f28ff484 --- /dev/null +++ b/package/time/time.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# time +# +################################################################################ + +TIME_VERSION = 1.7 +TIME_SITE = $(BR2_GNU_MIRROR)/time +TIME_CONF_ENV = ac_cv_func_wait3=yes +TIME_LICENSE = GPLv2+ +TIME_LICENSE_FILES = COPYING + +# time uses an old version of automake that does not support +# installing in DESTDIR. +define TIME_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/time $(TARGET_DIR)/usr/bin/time +endef + +$(eval $(autotools-package)) diff --git a/package/tinyhttpd/Config.in b/package/tinyhttpd/Config.in index eb601637ee..f7365afa6f 100644 --- a/package/tinyhttpd/Config.in +++ b/package/tinyhttpd/Config.in @@ -1,7 +1,8 @@ config BR2_PACKAGE_TINYHTTPD bool "tinyhttpd" + depends on BR2_USE_MMU # fork() help A relatively simple webserver written as a school project. It is exceedingly simple, threaded and handles basic CGI scripts. - + http://sourceforge.net/projects/tinyhttpd/ diff --git a/package/tinyhttpd/tinyhttpd.mk b/package/tinyhttpd/tinyhttpd.mk index eac416b971..05546ab104 100644 --- a/package/tinyhttpd/tinyhttpd.mk +++ b/package/tinyhttpd/tinyhttpd.mk @@ -1,56 +1,27 @@ -############################################################# +################################################################################ # # tinyhttpd # -############################################################# -TINYHTTPD_VER:=0.1.0 -TINYHTTPD_SOURCE:=tinyhttpd-$(TINYHTTPD_VER).tar.gz -TINYHTTPD_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/tinyhttpd/$(TINYHTTPD_SOURCE) -TINYHTTPD_DIR:=$(BUILD_DIR)/tinyhttpd-$(TINYHTTPD_VER) -TINYHTTPD_CAT:=$(ZCAT) -TINYHTTPD_BINARY:=httpd -TINYHTTPD_TARGET_BINARY:=usr/sbin/tinyhttpd +################################################################################ -$(DL_DIR)/$(TINYHTTPD_SOURCE): - $(call DOWNLOAD,$(TINYHTTPD_SITE),$(TINYHTTPD_SOURCE)) +TINYHTTPD_VERSION = 0.1.0 +TINYHTTPD_SITE = http://downloads.sourceforge.net/project/tinyhttpd/tinyhttpd%20source/tinyhttpd%20$(TINYHTTPD_VERSION) -tinyhttpd-source: $(DL_DIR)/$(TINYHTTPD_SOURCE) +define TINYHTTPD_BUILD_CMDS + $(MAKE) -C $(@D) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" +endef -############################################################# -# -# build tinyhttpd for use on the target system -# -############################################################# -$(TINYHTTPD_DIR)/.unpacked: $(DL_DIR)/$(TINYHTTPD_SOURCE) - $(TINYHTTPD_CAT) $(DL_DIR)/$(TINYHTTPD_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - toolchain/patch-kernel.sh $(TINYHTTPD_DIR) package/tinyhttpd/ tinyhttpd\*.patch - touch $(TINYHTTPD_DIR)/.unpacked - -$(TINYHTTPD_DIR)/$(TINYHTTPD_BINARY): $(TINYHTTPD_DIR)/.unpacked - $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" $(MAKE) -C $(TINYHTTPD_DIR) - -$(TARGET_DIR)/$(TINYHTTPD_TARGET_BINARY): $(TINYHTTPD_DIR)/$(TINYHTTPD_BINARY) - $(INSTALL) -m 0755 $(TINYHTTPD_DIR)/$(TINYHTTPD_BINARY) $(TARGET_DIR)/$(TINYHTTPD_TARGET_BINARY) - $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/$(TINYHTTPD_TARGET_BINARY) - $(INSTALL) -m 0755 package/tinyhttpd/S85tinyhttpd $(TARGET_DIR)/etc/init.d +define TINYHTTPD_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/httpd $(TARGET_DIR)/usr/sbin/tinyhttpd + $(INSTALL) -m 0755 -D package/tinyhttpd/S85tinyhttpd \ + $(TARGET_DIR)/etc/init.d/S85tinyhttpd mkdir -p $(TARGET_DIR)/var/www +endef -tinyhttpd: $(TARGET_DIR)/$(TINYHTTPD_TARGET_BINARY) +define TINYHTTPD_CLEAN_CMDS + rm -f $(TARGET_DIR)/usr/sbin/tinyhttpd + rm -f $(TARGET_DIR)/etc/init.d/S85tinyhttpd +endef -tinyhttpd-clean: - -$(MAKE) -C $(TINYHTTPD_DIR) clean - @rm -f $(TARGET_DIR)/$(TINYHTTPD_TARGET_BINARY) - @rm -f $(TARGET_DIR)/etc/init.d/S85tinyhttpd - @rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/var/www - -tinyhttpd-dirclean: - rm -rf $(TINYHTTPD_DIR) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_TINYHTTPD),y) -TARGETS+=tinyhttpd -endif +$(eval $(generic-package)) diff --git a/package/tinyhttpd/tinyhttpd.patch b/package/tinyhttpd/tinyhttpd.patch index 02eb189af0..05d6e50a70 100644 --- a/package/tinyhttpd/tinyhttpd.patch +++ b/package/tinyhttpd/tinyhttpd.patch @@ -73,7 +73,7 @@ diff -ur tinyhttpd-0.1.0/Makefile tinyhttpd-0.1.0-patched/Makefile httpd: httpd.c - gcc -W -Wall -lsocket -lpthread -o httpd httpd.c -+ $(CC) $(CFLAGS) $(LDFLAGS) -W -Wall -lpthread -o httpd httpd.c ++ $(CC) $(CFLAGS) $(LDFLAGS) -W -Wall -o httpd httpd.c clean: - rm httpd diff --git a/package/tinymembench/Config.in b/package/tinymembench/Config.in new file mode 100644 index 0000000000..8f6e1a2b35 --- /dev/null +++ b/package/tinymembench/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_TINYMEMBENCH + bool "tinymembench" + depends on !BR2_MIPS_NABI32 && !BR2_MIPS_NABI64 + help + Tinymembench is a simple memory benchmark program, which + tries to measure the peak bandwidth of sequential memory + accesses and the latency of random memory accesses. + Bandwidth is measured by running different assembly code for + the aligned memory blocks and attempting different prefetch + strategies. + + https://github.com/ssvb/tinymembench diff --git a/package/tinymembench/tinymembench.mk b/package/tinymembench/tinymembench.mk new file mode 100644 index 0000000000..732616fce8 --- /dev/null +++ b/package/tinymembench/tinymembench.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# tinymembench +# +################################################################################ + +TINYMEMBENCH_VERSION = v0.2 +TINYMEMBENCH_SITE = http://github.com/ssvb/tinymembench/tarball/$(TINYMEMBENCH_VERSION) +TINYMEMBENCH_LICENSE = MIT +TINYMEMBENCH_LICENSE_FILES = main.c + +define TINYMEMBENCH_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define TINYMEMBENCH_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/tinymembench \ + $(TARGET_DIR)/usr/bin/tinymembench +endef + +$(eval $(generic-package)) diff --git a/package/tn5250/tn5250.mk b/package/tn5250/tn5250.mk index 63c6c6c76c..4890f35d35 100644 --- a/package/tn5250/tn5250.mk +++ b/package/tn5250/tn5250.mk @@ -1,13 +1,15 @@ -############################################################# +################################################################################ # # tn5250 # -############################################################# +################################################################################ TN5250_VERSION = 0.17.4 -TN5250_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/tn5250 +TN5250_SITE = http://downloads.sourceforge.net/project/tn5250/tn5250/$(TN5250_VERSION) TN5250_MAKE_OPT = CPPFLAGS="" TN5250_DEPENDENCIES = ncurses +TN5250_LICENSE = LGPLv2.1+ +TN5250_LICENSE_FILES = COPYING ifeq ($(BR2_PACKAGE_OPENSSL),y) TN5250_CONF_OPT += --with-ssl @@ -29,4 +31,4 @@ define TN5250_UNINSTALL_TARGET_CMDS rm -rf $(TARGET_DIR)/usr/share/tn5250 endef -$(eval $(call AUTOTARGETS,package,tn5250)) +$(eval $(autotools-package)) diff --git a/package/torsmo/Config.in b/package/torsmo/Config.in index ec9cb2220b..7d309da04a 100644 --- a/package/torsmo/Config.in +++ b/package/torsmo/Config.in @@ -1,7 +1,9 @@ config BR2_PACKAGE_TORSMO bool "torsmo" depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT help Torsmo is a system monitor that sits in the corner of your desktop. - http://avr32linux.org/twiki/pub/Main/Torsmo + http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/Torsmo diff --git a/package/torsmo/torsmo.mk b/package/torsmo/torsmo.mk index 2b1cb8d8bc..ad846ca257 100644 --- a/package/torsmo/torsmo.mk +++ b/package/torsmo/torsmo.mk @@ -1,20 +1,16 @@ -############################################################# +################################################################################ # # torsmo # -############################################################# +################################################################################ + TORSMO_VERSION = 0.18 -TORSMO_SOURCE = torsmo-$(TORSMO_VERSION).tar.gz -TORSMO_SITE = http://avr32linux.org/twiki/pub/Main/Torsmo -TORSMO_AUTORECONF = NO -TORSMO_INSTALL_STAGING = NO -TORSMO_INSTALL_TARGET = YES +TORSMO_SITE = http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/Torsmo # help2man doesn't work when cross compiling TORSMO_CONF_ENV = ac_cv_path_HELP2MAN='' TORSMO_CONF_OPT = --x-includes="-I$(STAGING_DIR)/usr/include/X11" --x-libraries="-I$(STAGING_DIR)/usr/lib" --with-x -TORSMO_DEPENDENCIES = xserver_xorg-server - -$(eval $(call AUTOTARGETS,package,torsmo)) +TORSMO_DEPENDENCIES = xlib_libX11 xlib_libXext +$(eval $(autotools-package)) diff --git a/package/trace-cmd/Config.in b/package/trace-cmd/Config.in new file mode 100644 index 0000000000..949abce4a6 --- /dev/null +++ b/package/trace-cmd/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_TRACE_CMD + bool "trace-cmd" + depends on BR2_LARGEFILE + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Command line reader for ftrace. + + To use this profiling tool, you should enable ftrace in your kernel + configuration. This command collect traces on your target. + You can analyse these traces on the target or on the host via the gui + "kernel shark" + + http://git.kernel.org/cgit/linux/kernel/git/rostedt/trace-cmd.git + +comment "trace-cmd needs a toolchain w/ largefile, threads" + depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/trace-cmd/trace-cmd-0001-Makefile-use-pkg-config-instead-of-python-config.patch b/package/trace-cmd/trace-cmd-0001-Makefile-use-pkg-config-instead-of-python-config.patch new file mode 100644 index 0000000000..6fed42c41b --- /dev/null +++ b/package/trace-cmd/trace-cmd-0001-Makefile-use-pkg-config-instead-of-python-config.patch @@ -0,0 +1,43 @@ + +trace-cmd use python-config to find out which headers +and libraries should be used to link against the Python libraries. +By default, python-config returns paths that are inappropriate for +cross-compilation. + +Add PYTHON_VERS to build trace-cmd with python2 or python3 + +Signed-off-by: Romain Naour +--- + Makefile | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index 83329ca..23b70d8 100644 +--- a/Makefile ++++ b/Makefile +@@ -80,8 +80,10 @@ ifndef NO_PYTHON + PYTHON := ctracecmd.so + PYTHON_GUI := ctracecmd.so ctracecmdgui.so + ++PYTHON_VERS ?= python ++ + # Can build python? +-ifeq ($(shell sh -c "python-config --includes > /dev/null 2>&1 && echo y"), y) ++ifeq ($(shell sh -c "pkg-config --cflags $(PYTHON_VERS) > /dev/null 2>&1 && echo y"), y) + PYTHON_PLUGINS := plugin_python.so + BUILD_PYTHON := $(PYTHON) $(PYTHON_PLUGINS) + PYTHON_SO_INSTALL := ctracecmd.install +@@ -546,8 +548,8 @@ clean: + + ##### PYTHON STUFF ##### + +-PYTHON_INCLUDES = `python-config --includes` +-PYTHON_LDFLAGS = `python-config --ldflags` \ ++PYTHON_INCLUDES = `pkg-config --cflags $(PYTHON_VERS)` ++PYTHON_LDFLAGS = `pkg-config --libs $(PYTHON_VERS)` \ + $(shell python -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LINKFORSHARED')") + PYGTK_CFLAGS = `pkg-config --cflags pygtk-2.0` + +-- +1.8.4 + diff --git a/package/trace-cmd/trace-cmd-0002-Fix-ptrace-detection.patch b/package/trace-cmd/trace-cmd-0002-Fix-ptrace-detection.patch new file mode 100644 index 0000000000..b17d7df0d2 --- /dev/null +++ b/package/trace-cmd/trace-cmd-0002-Fix-ptrace-detection.patch @@ -0,0 +1,36 @@ +From 0070081ffe65a4fbe442044ddfcc818593c98e33 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Wed, 30 Oct 2013 22:35:34 +0100 +Subject: [PATCH] Fix ptrace detection + +Ptrace support detection is ignored when CFLAGS is set in command +arguments. Use override in Makefile to add -DWARN_NO_PTRACE and +-DNO_PTRACE in CFLAGS if ptrace is not available. + +Signed-off-by: Romain Naour +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 83329ca..01b4f45 100644 +--- a/Makefile ++++ b/Makefile +@@ -223,12 +223,12 @@ LDFLAGS ?= + ifndef NO_PTRACE + ifneq ($(call try-cc,$(SOURCE_PTRACE),),y) + NO_PTRACE = 1 +- CFLAGS += -DWARN_NO_PTRACE ++ override CFLAGS += -DWARN_NO_PTRACE + endif + endif + + ifdef NO_PTRACE +-CFLAGS += -DNO_PTRACE ++override CFLAGS += -DNO_PTRACE + endif + + # Append required CFLAGS +-- +1.8.1.2 + diff --git a/package/trace-cmd/trace-cmd.mk b/package/trace-cmd/trace-cmd.mk new file mode 100644 index 0000000000..69e0e697ac --- /dev/null +++ b/package/trace-cmd/trace-cmd.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# trace-cmd +# +################################################################################ + +TRACE_CMD_VERSION = trace-cmd-v2.2.1 +TRACE_CMD_SITE = http://git.kernel.org/cgit/linux/kernel/git/rostedt/trace-cmd.git +TRACE_CMD_SITE_METHOD = git +TRACE_CMD_INSTALL_STAGING = YES +TRACE_CMD_LICENSE = GPLv2 LGPLv2.1 +TRACE_CMD_LICENSE_FILES = COPYING COPYING.LIB + +TRACE_CMD_DEPENDENCIES = host-pkgconf + +ifeq ($(BR2_PACKAGE_PYTHON),y) +TRACE_CMD_DEPENDENCIES += python host-swig +TRACE_CMD_MAKE_OPTS = PYTHON_VERS=python +else ifeq ($(BR2_PACKAGE_PYTHON3),y) +TRACE_CMD_DEPENDENCIES += python3 host-swig +TRACE_CMD_MAKE_OPTS = PYTHON_VERS=python3 +else +TRACE_CMD_MAKE_OPTS += NO_PYTHON=1 +endif + +# trace-cmd already defines _LARGEFILE64_SOURCE when necessary, +# redefining it on the command line causes build problems. +TRACE_CMD_CFLAGS=$(filter-out -D_LARGEFILE64_SOURCE,$(TARGET_CFLAGS)) -D_GNU_SOURCE + +define TRACE_CMD_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TRACE_CMD_CFLAGS)" \ + $(TRACE_CMD_MAKE_OPTS) \ + -C $(@D) all +endef + +define TRACE_CMD_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/trace-cmd $(TARGET_DIR)/usr/bin/trace-cmd + $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/lib/trace-cmd/plugins + $(INSTALL) -D -m 0755 $(@D)/plugin_*.so $(TARGET_DIR)/usr/lib/trace-cmd/plugins +endef + +$(eval $(generic-package)) diff --git a/package/transmission/Config.in b/package/transmission/Config.in new file mode 100644 index 0000000000..8d413c6529 --- /dev/null +++ b/package/transmission/Config.in @@ -0,0 +1,51 @@ +config BR2_PACKAGE_TRANSMISSION + bool "transmission" + depends on BR2_INET_IPV6 + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_LIBEVENT + help + Transmission is a cross-platform BitTorrent client. + +if BR2_PACKAGE_TRANSMISSION + +config BR2_PACKAGE_TRANSMISSION_UTP + bool "Transmission uTP support" + depends on BR2_INSTALL_LIBSTDCPP + help + Install support for uTorrent Transport Protocol + +comment "uTP needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_TRANSMISSION_CLI + bool "transmission-cli" + help + Install transmission command line interface. + +config BR2_PACKAGE_TRANSMISSION_DAEMON + bool "transmission-daemon" + help + Install transmission daemon. + +config BR2_PACKAGE_TRANSMISSION_REMOTE + bool "transmission-remote" + help + Install transmission remote management tool. + +config BR2_PACKAGE_TRANSMISSION_GTK + bool "transmission-gtk" + depends on BR2_PACKAGE_LIBGTK2 && BR2_ENABLE_LOCALE + help + Install transmission GTK-based GUI interface. + +comment "transmission-gtk needs a toolchain w/ locale" + depends on BR2_PACKAGE_LIBGTK2 && !BR2_ENABLE_LOCALE +endif + +comment "transmission needs a toolchain w/ IPv6, threads" + depends on BR2_USE_MMU + depends on !BR2_INET_IPV6 || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/transmission/S92transmission b/package/transmission/S92transmission new file mode 100644 index 0000000000..f226154892 --- /dev/null +++ b/package/transmission/S92transmission @@ -0,0 +1,161 @@ +#!/bin/sh + +# Original Author: Lennart A. Jtte, based on Rob Howell's script +# Modified by Maarten Van Coile & others (on IRC) + +# Changes for buildroot: +# USERNAME points to 'default' in standard installation +# TODO: set logfile with --logfile option + +# Do NOT "set -e" + +# +# ----- CONFIGURATION ----- +# +# For the default location Transmission uses, visit: +# http://trac.transmissionbt.com/wiki/ConfigFiles +# For a guide on how set the preferences, visit: +# http://trac.transmissionbt.com/wiki/EditConfigFiles +# For the available environement variables, visit: +# http://trac.transmissionbt.com/wiki/EnvironmentVariables +# +# The name of the user that should run Transmission. +# It's RECOMENDED to run Transmission in it's own user, +# by default, this is set to 'transmission'. +# For the sake of security you shouldn't set a password +# on this user +#USERNAME=transmission +USERNAME=default + + + +# ----- *ADVANCED* CONFIGURATION ----- +# Only change these options if you know what you are doing! +# +# The folder where Transmission stores the config & web files. +# ONLY change this you have it at a non-default location +#TRANSMISSION_HOME="/var/config/transmission-daemon" +#TRANSMISSION_WEB_HOME="/usr/share/transmission/web" +# +# The arguments passed on to transmission-daemon. +# ONLY change this you need to, otherwise use the +# settings file as per above. +#TRANSMISSION_ARGS="" + + +# ----- END OF CONFIGURATION ----- +# +# PATH should only include /usr/* if it runs after the mountnfs.sh script. +PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +DESC="bittorrent client" +NAME=transmission-daemon +DAEMON=$(which $NAME) +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Load the VERBOSE setting and other rcS variables +[ -f /etc/default/rcS ] && . /etc/default/rcS + +# +# Function that starts the daemon/service +# + +do_start() +{ + # Export the configuration/web directory, if set + if [ -n "$TRANSMISSION_HOME" ]; then + export TRANSMISSION_HOME + fi + if [ -n "$TRANSMISSION_WEB_HOME" ]; then + export TRANSMISSION_WEB_HOME + fi + + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --chuid $USERNAME --start --pidfile $PIDFILE --make-pidfile \ + --exec $DAEMON --background --test -- -f $TRANSMISSION_ARGS > /dev/null \ + || return 1 + start-stop-daemon --chuid $USERNAME --start --pidfile $PIDFILE --make-pidfile \ + --exec $DAEMON --background -- -f $TRANSMISSION_ARGS \ + || return 2 +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/10/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + + return "$RETVAL" +} + +case "$1" in + start) + echo "Starting $DESC" "$NAME..." + do_start + case "$?" in + 0|1) echo " Starting $DESC $NAME succeeded" ;; + *) echo " Starting $DESC $NAME failed" ;; + esac + ;; + stop) + echo "Stopping $DESC $NAME..." + do_stop + case "$?" in + 0|1) echo " Stopping $DESC $NAME succeeded" ;; + *) echo " Stopping $DESC $NAME failed" ;; + esac + ;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + echo "Restarting $DESC $NAME..." + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0|1) echo " Restarting $DESC $NAME succeeded" ;; + *) echo " Restarting $DESC $NAME failed: couldn't start $NAME" ;; + esac + ;; + *) + echo " Restarting $DESC $NAME failed: couldn't stop $NAME" ;; + esac + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 3 + ;; +esac diff --git a/package/transmission/transmission.mk b/package/transmission/transmission.mk new file mode 100644 index 0000000000..1e7ee48525 --- /dev/null +++ b/package/transmission/transmission.mk @@ -0,0 +1,60 @@ +################################################################################ +# +# transmission +# +################################################################################ + +TRANSMISSION_VERSION = 2.33 +TRANSMISSION_SITE = http://download.transmissionbt.com/files/ +TRANSMISSION_SOURCE = transmission-$(TRANSMISSION_VERSION).tar.xz +TRANSMISSION_DEPENDENCIES = \ + host-pkgconf \ + host-intltool \ + libcurl \ + libevent \ + openssl \ + zlib + +TRANSMISSION_CONF_OPT = \ + --disable-libnotify \ + --enable-lightweight + +define TRANSMISSION_INIT_SCRIPT_INSTALL + [ -f $(TARGET_DIR)/etc/init.d/S92transmission ] || \ + $(INSTALL) -m 0755 -D package/transmission/S92transmission \ + $(TARGET_DIR)/etc/init.d/S92transmission +endef + +ifeq ($(BR2_PACKAGE_TRANSMISSION_UTP),y) + TRANSMISSION_CONF_OPT += --enable-utp +else + TRANSMISSION_CONF_OPT += --disable-utp +endif + +ifeq ($(BR2_PACKAGE_TRANSMISSION_CLI),y) + TRANSMISSION_CONF_OPT += --enable-cli +else + TRANSMISSION_CONF_OPT += --disable-cli +endif + +ifeq ($(BR2_PACKAGE_TRANSMISSION_DAEMON),y) + TRANSMISSION_CONF_OPT += --enable-daemon + TRANSMISSION_POST_INSTALL_TARGET_HOOKS += TRANSMISSION_INIT_SCRIPT_INSTALL +else + TRANSMISSION_CONF_OPT += --disable-daemon +endif + +ifeq ($(BR2_PACKAGE_TRANSMISSION_REMOTE),y) + TRANSMISSION_CONF_OPT += --enable-remote +else + TRANSMISSION_CONF_OPT += --disable-remote +endif + +ifeq ($(BR2_PACKAGE_TRANSMISSION_GTK),y) + TRANSMISSION_CONF_OPT += --enable-gtk + TRANSMISSION_DEPENDENCIES += libgtk2 +else + TRANSMISSION_CONF_OPT += --disable-gtk +endif + +$(eval $(autotools-package)) diff --git a/package/tree/Config.in b/package/tree/Config.in new file mode 100644 index 0000000000..234995f109 --- /dev/null +++ b/package/tree/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_TREE + bool "tree" + depends on BR2_USE_WCHAR + help + Tree is a recursive directory listing command that produces + a depth indented listing of files, which is colorized ala + dircolors if the LS_COLORS environment variable is set and + output is to tty. + + http://mama.indstate.edu/users/ice/tree/ + +comment "tree needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/tree/tree.mk b/package/tree/tree.mk new file mode 100644 index 0000000000..509ba45318 --- /dev/null +++ b/package/tree/tree.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# tree +# +################################################################################ + +TREE_VERSION = 1.6.0 +TREE_SOURCE = tree-$(TREE_VERSION).tgz +TREE_SITE = http://mama.indstate.edu/users/ice/tree/src/ +TREE_LICENSE = GPLv2+ +TREE_LICENSE_FILES = LICENSE + +define TREE_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define TREE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/tree $(TARGET_DIR)/usr/bin/tree + $(INSTALL) -D -m 0644 $(@D)/doc/tree.1 \ + $(TARGET_DIR)/usr/share/man/man1/tree.1 +endef + +define TREE_CLEAN_CMDS + -$(MAKE) -C $(@D) clean +endef + +$(eval $(generic-package)) diff --git a/package/tremor/Config.in b/package/tremor/Config.in new file mode 100644 index 0000000000..61259261e6 --- /dev/null +++ b/package/tremor/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_TREMOR + bool "tremor (fixed point vorbis decoder)" + help + Tremor is a fixed point implementation of an Ogg Vorbis + decoder. It provides a decoding API similar to libvorbis, + but gives much better performance on systems without a + floating-point unit. diff --git a/package/tremor/tremor.mk b/package/tremor/tremor.mk new file mode 100644 index 0000000000..b1515c19d4 --- /dev/null +++ b/package/tremor/tremor.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# tremor +# +################################################################################ + +TREMOR_SITE = http://svn.xiph.org/trunk/Tremor/ +TREMOR_SITE_METHOD = svn +TREMOR_VERSION = 18153 +TREMOR_LICENSE = BSD-3c +TREMOR_LICENSE_FILES = COPYING + +TREMOR_AUTORECONF = YES +TREMOR_INSTALL_STAGING = YES +TREMOR_DEPENDENCIES = libogg + +# tremor has ARM assembly code that cannot be compiled in Thumb2 mode, +# so we must force the traditional ARM mode. +ifeq ($(BR2_arm),y) +TREMOR_CONF_ENV = \ + CFLAGS="$(TARGET_CFLAGS) -marm" +endif + +$(eval $(autotools-package)) diff --git a/package/tslib/Config.in b/package/tslib/Config.in index 76f13490ec..ef03f905d7 100644 --- a/package/tslib/Config.in +++ b/package/tslib/Config.in @@ -1,6 +1,10 @@ config BR2_PACKAGE_TSLIB - bool "libts - The Touchscreen tslib Library" + bool "tslib" + depends on !BR2_PREFER_STATIC_LIB # dlopen help - http://tslib.berlios.de/ + Tslib is an abstraction layer for touchscreen panel events. - Tslib is an abstraction layer for touchscreen panel events. + http://tslib.berlios.de/ + +comment "tslib needs a toolchain w/ dynamic library" + depends on BR2_PREFER_STATIC_LIB diff --git a/package/tslib/tslib.mk b/package/tslib/tslib.mk index 3ca40c50db..751d01e7e9 100644 --- a/package/tslib/tslib.mk +++ b/package/tslib/tslib.mk @@ -1,18 +1,16 @@ -############################################################# +################################################################################ # # tslib # -############################################################# -TSLIB_VERSION:=860d69ca -TSLIB_SITE:=git://github.com/kergoth/tslib.git +################################################################################ + +TSLIB_VERSION = 1.1 +TSLIB_SITE = http://github.com/kergoth/tslib/tarball/$(TSLIB_VERSION) +TSLIB_LICENSE = GPL, LGPL +TSLIB_LICENSE_FILES = COPYING + TSLIB_AUTORECONF = YES TSLIB_INSTALL_STAGING = YES -TSLIB_INSTALL_TARGET = YES TSLIB_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) LDFLAGS=-L$(STAGING_DIR)/usr/lib install -TSLIB_CONF_OPT = \ - --enable-shared \ - --prefix=/usr \ - --sysconfdir=/etc - -$(eval $(call AUTOTARGETS,package,tslib)) +$(eval $(autotools-package)) diff --git a/package/tstools/Config.in b/package/tstools/Config.in new file mode 100644 index 0000000000..24d4403105 --- /dev/null +++ b/package/tstools/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_TSTOOLS + bool "tstools" + depends on BR2_LARGEFILE + help + This is a set of cross-platform command line tools for + working with MPEG data + + The emphasis is on relatively simple tools which concentrate + on MPEG (H.264 and H.262) data packaged according to H.222 + (i.e., TS or PS), with a particular interest in checking for + conformance. + + Transport Stream (TS) is typically used for distribution of + cable and satellite data. Program Stream (PS) is typically + used to store data on DVDs. + + http://tstools.berlios.de/ + +comment "tstools needs a toolchain w/ largefile" + depends on !BR2_LARGEFILE diff --git a/package/tstools/tstools-001-build-get-along-with-buildroot.patch b/package/tstools/tstools-001-build-get-along-with-buildroot.patch new file mode 100644 index 0000000000..1e7a748262 --- /dev/null +++ b/package/tstools/tstools-001-build-get-along-with-buildroot.patch @@ -0,0 +1,40 @@ +From 44f80bce0914d4d9c5e7486c7cdb521ba637b324 Mon Sep 17 00:00:00 2001 +From: Tzu-Jung Lee +Date: Fri, 19 Jul 2013 22:45:18 +0800 +Subject: [PATCH] build: get along with buildroot + +Signed-off-by: Tzu-Jung Lee +--- + Makefile | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/Makefile b/Makefile +index 2c3568e..98bb994 100644 +--- a/Makefile ++++ b/Makefile +@@ -34,12 +34,6 @@ SHELL = /bin/sh + .SUFFIXES: + .SUFFIXES: .c .o + +-ifdef CROSS_COMPILE +-CC = $(CROSS_COMPILE)gcc +-else +-CC = gcc +-endif +- + # Use WARN=1 periodically to get too many warnings... + ifdef WARN + WARNING_FLAGS = -Wall -W -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wcast-qual -Wconversion -Wmissing-prototypes -Wmissing-declarations -Wunreachable-code -Winline +@@ -452,3 +446,9 @@ test_lists: $(BINDIR)/test_nal_unit_list $(BINDIR)/test_es_unit_list + @echo +++ Testing ES unit lists + $(BINDIR)/test_es_unit_list + @echo +++ Test succeeded ++ ++.PHONY: install ++install: ++ @for i in $(PROGS); do \ ++ cp -f $$i $(DESTDIR)/usr/bin/; \ ++ done +-- +1.8.3.2 + diff --git a/package/tstools/tstools-002-build-fix-parallel-build-failure.patch b/package/tstools/tstools-002-build-fix-parallel-build-failure.patch new file mode 100644 index 0000000000..df507474d0 --- /dev/null +++ b/package/tstools/tstools-002-build-fix-parallel-build-failure.patch @@ -0,0 +1,331 @@ +From 2fe4faa9d8eab6068976c7981bc166f576869b36 Mon Sep 17 00:00:00 2001 +From: Tzu-Jung Lee +Date: Sun, 28 Jul 2013 19:40:27 +0800 +Subject: [PATCH 1/1] build: fix parallel build failure + +This is back ported from recent upstream commit + + 0e8463ea1dc55f566a88bb3df29cf3d5f23cc326 + +Once the upstream update the download page with more +recent source tarball, this will no longer be needed. + +Signed-off-by: Tzu-Jung Lee +--- + Makefile | 222 +++++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 115 insertions(+), 107 deletions(-) + +diff --git a/Makefile b/Makefile +index b79a573..ad7f163 100644 +--- a/Makefile ++++ b/Makefile +@@ -67,67 +67,49 @@ LFS_FLAGS = -D_FILE_OFFSET_BITS=64 + # sort of thing (presumably Linux or BSD) + ifeq ($(shell uname -s), Darwin) + SYSTEM = "macosx" +- ARCH_FLAGS = -arch ppc -arch i386 ++ ARCH_FLAGS = ++ # If you're still building on a version of Mac OS X that supports powerpc, ++ # then you may want to uncomment the next line. Obviously, this no longer ++ # works in Lion, which doesn't support powerpc machines any more. ++ #ARCH_FLAGS = -arch ppc -arch i386 + else + SYSTEM = "other" +- ARCH_FLAGS = ++ ARCH_FLAGS = -fPIC + endif + + CFLAGS = $(WARNING_FLAGS) $(OPTIMISE_FLAGS) $(LFS_FLAGS) -I. $(PROFILE_FLAGS) $(ARCH_FLAGS) +-LDFLAGS = -g -lm $(PROFILE_FLAGS) $(ARCH_FLAGS) ++LDFLAGS = -g $(PROFILE_FLAGS) $(ARCH_FLAGS) -lm + + # Target directories + OBJDIR = obj + LIBDIR = lib + BINDIR = bin + +-# All of our non-program source files +-SRCS = \ +- accessunit.c \ +- ac3.c \ +- adts.c \ +- avs.c \ +- bitdata.c \ +- es.c \ +- fmtx.c \ +- h222.c \ +- h262.c \ +- audio.c \ +- l2audio.c \ +- misc.c \ +- nalunit.c \ +- ps.c \ +- pes.c \ +- pidint.c \ +- ts.c \ +- tswrite.c \ +- pcap.c +- + # All of our non-program object modules + OBJS = \ +- accessunit.o \ +- avs.o \ +- ac3.o \ +- adts.o \ +- bitdata.o \ +- es.o \ +- filter.o \ +- fmtx.o \ +- h222.o \ +- h262.o \ +- audio.o \ +- l2audio.o \ +- misc.o \ +- nalunit.o \ +- ps.o \ +- pes.o \ +- pidint.o \ +- reverse.o \ +- ts.o \ +- tswrite.o \ +- pcap.o \ +- ethernet.o \ +- ipv4.o ++ $(OBJDIR)/accessunit.o \ ++ $(OBJDIR)/avs.o \ ++ $(OBJDIR)/ac3.o \ ++ $(OBJDIR)/adts.o \ ++ $(OBJDIR)/bitdata.o \ ++ $(OBJDIR)/es.o \ ++ $(OBJDIR)/filter.o \ ++ $(OBJDIR)/fmtx.o \ ++ $(OBJDIR)/h222.o \ ++ $(OBJDIR)/h262.o \ ++ $(OBJDIR)/audio.o \ ++ $(OBJDIR)/l2audio.o \ ++ $(OBJDIR)/misc.o \ ++ $(OBJDIR)/nalunit.o \ ++ $(OBJDIR)/ps.o \ ++ $(OBJDIR)/pes.o \ ++ $(OBJDIR)/pidint.o \ ++ $(OBJDIR)/reverse.o \ ++ $(OBJDIR)/ts.o \ ++ $(OBJDIR)/tswrite.o \ ++ $(OBJDIR)/pcap.o \ ++ $(OBJDIR)/ethernet.o \ ++ $(OBJDIR)/ipv4.o + + # Our program object modules + PROG_OBJS = \ +@@ -161,9 +143,14 @@ TEST_OBJS = \ + $(OBJDIR)/test_es_unit_list.o + + # Our library +-LIB = $(LIBDIR)/libtstools.a +-LIBOPTS = -L$(LIBDIR) -ltstools $(ARCH_FLAGS) ++STATIC_LIB = $(LIBDIR)/libtstools.a ++LIBOPTS = $(ARCH_FLAGS) $(STATIC_LIB) + ++ifeq ($(shell uname -s), Darwin) ++SHARED_LIB = $(LIBDIR)/libtstools.xxx ++else ++SHARED_LIB = $(LIBDIR)/libtstools.so ++endif + # All of our programs (except the testing ones) + PROGS = \ + $(BINDIR)/esfilter \ +@@ -197,7 +184,7 @@ TEST_PES_PROG = $(BINDIR)/test_pes + TEST_PROGS = test_nal_unit_list test_es_unit_list + + # ------------------------------------------------------------ +-all: $(BINDIR) $(LIBDIR) $(OBJDIR) $(PROGS) ++all: $(BINDIR) $(LIBDIR) $(OBJDIR) $(PROGS) $(SHARED_LIB) + + # ts2ps is not yet an offical program, so for the moment build + # it separately +@@ -205,82 +192,97 @@ all: $(BINDIR) $(LIBDIR) $(OBJDIR) $(PROGS) + ts2ps: $(TS2PS_PROG) + + ifeq ($(shell uname -s), Darwin) +-# Try getting a library containing universal objects on Mac +-$(LIB): $(OBJS) +- libtool -static $(OBJS) -o $(LIB) ++# Make libraries containing universal objects on Mac ++$(STATIC_LIB): $(OBJS) ++ libtool -static $(OBJS) -o $(STATIC_LIB) ++$(SHARED_LIB): $(OBJS) ++ libtool -dynamic $(OBJS) -o $(SHARED_LIB) + else +-$(LIB): $(LIB)($(OBJS)) ++$(STATIC_LIB): $(OBJS) ++ rm -f $(STATIC_LIB) ++ ar rc $(STATIC_LIB) $(OBJS) ++ ++$(SHARED_LIB): $(OBJS) ++ $(LD) -shared -o $(SHARED_LIB) $(OBJS) -lc + endif + +-$(BINDIR)/esfilter: $(OBJDIR)/esfilter.o $(LIB) +- $(CC) $< -o $(BINDIR)/esfilter $(LDFLAGS) $(LIBOPTS) ++# Build all of the utilities with the static library, so that they can ++# be copied around, shared, etc., without having to think about it ++ ++$(BINDIR)/esfilter: $(OBJDIR)/esfilter.o $(STATIC_LIB) ++ $(CC) $< -o $(BINDIR)/esfilter $(LIBOPTS) $(LDFLAGS) ++ ++$(BINDIR)/ts2es: $(OBJDIR)/ts2es.o $(STATIC_LIB) ++ $(CC) $< -o $(BINDIR)/ts2es $(LIBOPTS) $(LDFLAGS) + +-$(BINDIR)/ts2es: $(OBJDIR)/ts2es.o $(LIB) +- $(CC) $< -o $(BINDIR)/ts2es $(LDFLAGS) $(LIBOPTS) ++$(BINDIR)/es2ts: $(OBJDIR)/es2ts.o $(STATIC_LIB) ++ $(CC) $< -o $(BINDIR)/es2ts $(LIBOPTS) $(LDFLAGS) + +-$(BINDIR)/es2ts: $(OBJDIR)/es2ts.o $(LIB) +- $(CC) $< -o $(BINDIR)/es2ts $(LDFLAGS) $(LIBOPTS) ++$(BINDIR)/esdots: $(OBJDIR)/esdots.o $(STATIC_LIB) ++ $(CC) $< -o $(BINDIR)/esdots $(LIBOPTS) $(LDFLAGS) + +-$(BINDIR)/esdots: $(OBJDIR)/esdots.o $(LIB) +- $(CC) $< -o $(BINDIR)/esdots $(LDFLAGS) $(LIBOPTS) ++$(BINDIR)/esmerge: $(OBJDIR)/esmerge.o $(STATIC_LIB) ++ $(CC) $< -o $(BINDIR)/esmerge $(LIBOPTS) $(LDFLAGS) + +-$(BINDIR)/esmerge: $(OBJDIR)/esmerge.o $(LIB) +- $(CC) $< -o $(BINDIR)/esmerge $(LDFLAGS) $(LIBOPTS) ++$(BINDIR)/esreport: $(OBJDIR)/esreport.o $(STATIC_LIB) ++ $(CC) $< -o $(BINDIR)/esreport $(LIBOPTS) $(LDFLAGS) + +-$(BINDIR)/esreport: $(OBJDIR)/esreport.o $(LIB) +- $(CC) $< -o $(BINDIR)/esreport $(LDFLAGS) $(LIBOPTS) ++$(BINDIR)/esreverse: $(OBJDIR)/esreverse.o $(STATIC_LIB) ++ $(CC) $< -o $(BINDIR)/esreverse $(LIBOPTS) $(LDFLAGS) + +-$(BINDIR)/esreverse: $(OBJDIR)/esreverse.o $(LIB) +- $(CC) $< -o $(BINDIR)/esreverse $(LDFLAGS) $(LIBOPTS) ++$(BINDIR)/stream_type: $(OBJDIR)/stream_type.o $(STATIC_LIB) ++ $(CC) $< -o $(BINDIR)/stream_type $(LIBOPTS) $(LDFLAGS) + +-$(BINDIR)/stream_type: $(OBJDIR)/stream_type.o $(LIB) +- $(CC) $< -o $(BINDIR)/stream_type $(LDFLAGS) $(LIBOPTS) ++$(BINDIR)/psreport: $(OBJDIR)/psreport.o $(STATIC_LIB) ++ $(CC) $< -o $(BINDIR)/psreport $(LIBOPTS) $(LDFLAGS) + +-$(BINDIR)/psreport: $(OBJDIR)/psreport.o $(LIB) +- $(CC) $< -o $(BINDIR)/psreport $(LDFLAGS) $(LIBOPTS) ++$(BINDIR)/psdots: $(OBJDIR)/psdots.o $(STATIC_LIB) ++ $(CC) $< -o $(BINDIR)/psdots $(LIBOPTS) $(LDFLAGS) + +-$(BINDIR)/psdots: $(OBJDIR)/psdots.o $(LIB) +- $(CC) $< -o $(BINDIR)/psdots $(LDFLAGS) $(LIBOPTS) ++$(BINDIR)/ps2ts: $(OBJDIR)/ps2ts.o $(STATIC_LIB) ++ $(CC) $< -o $(BINDIR)/ps2ts $(LIBOPTS) $(LDFLAGS) + +-$(BINDIR)/ps2ts: $(OBJDIR)/ps2ts.o $(LIB) +- $(CC) $< -o $(BINDIR)/ps2ts $(LDFLAGS) $(LIBOPTS) ++$(BINDIR)/tsinfo: $(OBJDIR)/tsinfo.o $(STATIC_LIB) ++ $(CC) $< -o $(BINDIR)/tsinfo $(LIBOPTS) $(LDFLAGS) + +-$(BINDIR)/tsinfo: $(OBJDIR)/tsinfo.o $(LIB) +- $(CC) $< -o $(BINDIR)/tsinfo $(LDFLAGS) $(LIBOPTS) ++$(BINDIR)/tsreport: $(OBJDIR)/tsreport.o $(STATIC_LIB) ++ $(CC) $< -o $(BINDIR)/tsreport $(LIBOPTS) $(LDFLAGS) + +-$(BINDIR)/tsreport: $(OBJDIR)/tsreport.o $(LIB) +- $(CC) $< -o $(BINDIR)/tsreport $(LDFLAGS) $(LIBOPTS) ++$(BINDIR)/tsserve: $(OBJDIR)/tsserve.o $(STATIC_LIB) ++ $(CC) $< -o $(BINDIR)/tsserve $(LIBOPTS) $(LDFLAGS) + +-$(BINDIR)/tsserve: $(OBJDIR)/tsserve.o $(LIB) +- $(CC) $< -o $(BINDIR)/tsserve $(LDFLAGS) $(LIBOPTS) ++$(BINDIR)/tsplay: $(OBJDIR)/tsplay.o $(STATIC_LIB) ++ $(CC) $< -o $(BINDIR)/tsplay $(LIBOPTS) $(LDFLAGS) + +-$(BINDIR)/tsplay: $(OBJDIR)/tsplay.o $(LIB) +- $(CC) $< -o $(BINDIR)/tsplay $(LDFLAGS) $(LIBOPTS) ++$(BINDIR)/test_ps: $(OBJDIR)/test_ps.o $(STATIC_LIB) ++ $(CC) $< -o $(BINDIR)/test_ps $(LIBOPTS) $(LDFLAGS) + +-$(BINDIR)/test_ps: $(OBJDIR)/test_ps.o $(LIB) +- $(CC) $< -o $(BINDIR)/test_ps $(LDFLAGS) $(LIBOPTS) ++$(BINDIR)/ts2ps: $(OBJDIR)/ts2ps.o $(STATIC_LIB) ++ $(CC) $< -o $(BINDIR)/ts2ps $(LIBOPTS) $(LDFLAGS) + +-$(BINDIR)/ts2ps: $(OBJDIR)/ts2ps.o $(LIB) +- $(CC) $< -o $(BINDIR)/ts2ps $(LDFLAGS) $(LIBOPTS) ++$(BINDIR)/ts_packet_insert: $(OBJDIR)/ts_packet_insert.o $(STATIC_LIB) ++ $(CC) $< -o $(BINDIR)/ts_packet_insert $(LIBOPTS) $(LDFLAGS) + +-$(BINDIR)/ts_packet_insert: $(OBJDIR)/ts_packet_insert.o $(LIB) +- $(CC) $< -o $(BINDIR)/ts_packet_insert $(LDFLAGS) $(LIBOPTS) ++$(BINDIR)/m2ts2ts: $(OBJDIR)/m2ts2ts.o $(STATIC_LIB) ++ $(CC) $< -o $(BINDIR)/m2ts2ts $(LIBOPTS) $(LDFLAGS) ++$(BINDIR)/pcapreport: $(OBJDIR)/pcapreport.o $(STATIC_LIB) ++ $(CC) $< -o $(BINDIR)/pcapreport $(LIBOPTS) $(LDFLAGS) + +-$(BINDIR)/m2ts2ts: $(OBJDIR)/m2ts2ts.o $(LIB) +- $(CC) $< -o $(BINDIR)/m2ts2ts $(LDFLAGS) $(LIBOPTS) +-$(BINDIR)/pcapreport: $(OBJDIR)/pcapreport.o $(LIB) +- $(CC) $< -o $(BINDIR)/pcapreport $(LDFLAGS) $(LIBOPTS) ++$(BINDIR)/tsfilter: $(OBJDIR)/tsfilter.o $(STATIC_LIB) ++ $(CC) $< -o $(BINDIR)/tsfilter $(LIBOPTS) $(LDFLAGS) ++$(BINDIR)/tsdvbsub: $(OBJDIR)/tsdvbsub.o $(STATIC_LIB) ++ $(CC) $< -o $(BINDIR)/tsdvbsub $(LIBOPTS) $(LDFLAGS) + + + + +-$(BINDIR)/test_pes: $(OBJDIR)/test_pes.o $(LIB) +- $(CC) $< -o $(BINDIR)/test_pes $(LDFLAGS) $(LIBOPTS) ++$(BINDIR)/test_pes: $(OBJDIR)/test_pes.o $(STATIC_LIB) ++ $(CC) $< -o $(BINDIR)/test_pes $(LIBOPTS) $(LDFLAGS) + +-$(BINDIR)/test_nal_unit_list: $(OBJDIR)/test_nal_unit_list.o $(LIB) +- $(CC) $< -o $(BINDIR)/test_nal_unit_list $(LDFLAGS) $(LIBOPTS) +-$(BINDIR)/test_es_unit_list: $(OBJDIR)/test_es_unit_list.o $(LIB) +- $(CC) $< -o $(BINDIR)/test_es_unit_list $(LDFLAGS) $(LIBOPTS) ++$(BINDIR)/test_nal_unit_list: $(OBJDIR)/test_nal_unit_list.o $(STATIC_LIB) ++ $(CC) $< -o $(BINDIR)/test_nal_unit_list $(LIBOPTS) $(LDFLAGS) ++$(BINDIR)/test_es_unit_list: $(OBJDIR)/test_es_unit_list.o $(STATIC_LIB) ++ $(CC) $< -o $(BINDIR)/test_es_unit_list $(LIBOPTS) $(LDFLAGS) + + # Some header files depend upon others, so including one requires + # the others as well +@@ -299,14 +301,19 @@ REVERSE_H = reverse_fns.h reverse_defns.h + FILTER_H = filter_fns.h filter_defns.h $(REVERSE_H) + AUDIO_H = adts_fns.h l2audio_fns.h ac3_fns.h audio_fns.h audio_defns.h adts_defns.h + +-# Everyone depends upon the basic configuration file +-$(LIB)($(OBJS)) $(TEST_OBJS) $(PROG_OBJS): compat.h ++# Everyone depends upon the basic configuration file, and I assert they all ++# want (or may want) printing... ++$(OBJS) $(TEST_OBJS) $(PROG_OBJS): compat.h + + # Which library modules depend on which header files is complex, so + # lets just be simple +-$(LIB)($(OBJS)): $(ACCESSUNIT_H) $(NALUNIT_H) $(TS_H) $(ES_H) $(PES_H) \ +- misc_fns.h $(PS_H) $(H262_H) $(TSWRITE_H) $(AVS_H) \ +- $(REVERSE_H) $(FILTER_H) $(AUDIO_H) ++$(OBJS): \ ++ $(ACCESSUNIT_H) $(NALUNIT_H) $(TS_H) $(ES_H) $(PES_H) \ ++ misc_fns.h $(PS_H) $(H262_H) \ ++ $(TSWRITE_H) $(AVS_H) $(REVERSE_H) $(FILTER_H) $(AUDIO_H) ++ ++$(OBJDIR)/%.o: %.c ++ $(CC) -c $< -o $@ $(CFLAGS) + + $(OBJDIR)/es2ts.o: es2ts.c $(ES_H) $(TS_H) misc_fns.h version.h + $(CC) -c $< -o $@ $(CFLAGS) +@@ -389,7 +396,8 @@ objclean: + .PHONY: clean + clean: objclean + -rm -f $(PROGS) +- -rm -f $(LIB) ++ -rm -f $(STATIC_LIB) ++ -rm -f $(SHARED_LIB) + -rm -f $(PROG_OBJS) + + .PHONY: distclean +-- +1.8.3.2 + diff --git a/package/tstools/tstools.mk b/package/tstools/tstools.mk new file mode 100644 index 0000000000..c9ac9f9c3b --- /dev/null +++ b/package/tstools/tstools.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# tstools +# +################################################################################ + +TSTOOLS_VERSION = 1_11 +TSTOOLS_SITE = https://tstools.googlecode.com/files/ +TSTOOLS_SOURCE = tstools-$(TSTOOLS_VERSION).tgz +TSTOOLS_LICENSE = MPL v1.1 + +define TSTOOLS_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) LD="$(TARGET_CC)" $(TARGET_MAKE_ENV) \ + $(MAKE) -C $(@D) +endef + +define TSTOOLS_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/ttcp/Config.in b/package/ttcp/Config.in index a3f5a719f1..cf68eff33c 100644 --- a/package/ttcp/Config.in +++ b/package/ttcp/Config.in @@ -1,6 +1,7 @@ config BR2_PACKAGE_TTCP bool "ttcp" + depends on BR2_DEPRECATED help Benchmarking tool for determining TCP and UDP performance. - ftp://ftp.sunet.se/pub/network/monitoring/ttcp/ + ftp://ftp.sgi.com/sgi/src/ttcp/README diff --git a/package/ttcp/ttcp-0001-replace-deprecated-bcopy.patch b/package/ttcp/ttcp-0001-replace-deprecated-bcopy.patch new file mode 100644 index 0000000000..fb8ef7ff45 --- /dev/null +++ b/package/ttcp/ttcp-0001-replace-deprecated-bcopy.patch @@ -0,0 +1,15 @@ +Replace deprecated bcopy call by using memmove instead. + +Index: b/ttcp.c +=================================================================== +--- a/ttcp.c ++++ b/ttcp.c +@@ -241,7 +241,7 @@ + if ((addr=gethostbyname(host)) == NULL) + err("bad hostname"); + sinhim.sin_family = addr->h_addrtype; +- bcopy(addr->h_addr,(char*)&addr_tmp, addr->h_length); ++ memmove((char*)&addr_tmp, addr->h_addr, addr->h_length); + #if defined(cray) + sinhim.sin_addr = addr_tmp; + #else diff --git a/package/ttcp/ttcp-bcopy.patch b/package/ttcp/ttcp-bcopy.patch deleted file mode 100644 index c98c88f360..0000000000 --- a/package/ttcp/ttcp-bcopy.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN ttcp-0rig/ttcp.c ttcp/ttcp.c ---- ttcp-0rig/ttcp.c 1993-05-17 00:00:00.000000000 +0200 -+++ ttcp/ttcp.c 2009-01-14 23:46:19.000000000 +0100 -@@ -241,7 +241,7 @@ - if ((addr=gethostbyname(host)) == NULL) - err("bad hostname"); - sinhim.sin_family = addr->h_addrtype; -- bcopy(addr->h_addr,(char*)&addr_tmp, addr->h_length); -+ memmove((char*)&addr_tmp, addr->h_addr, addr->h_length); - #if defined(cray) - sinhim.sin_addr = addr_tmp; - #else diff --git a/package/ttcp/ttcp.mk b/package/ttcp/ttcp.mk index 1c4fe6ff10..7667b20617 100644 --- a/package/ttcp/ttcp.mk +++ b/package/ttcp/ttcp.mk @@ -1,47 +1,25 @@ -############################################################# +################################################################################ # # ttcp # -############################################################# -# -TTCP_VERSION:= -TTCP_SOURCE_URL=http://ftp.sunet.se/pub/network/monitoring/ttcp -TTCP_SOURCE=ttcp$(TTCP_VERSION).c -TTCP_DIR=$(BUILD_DIR)/ttcp$(TTCP_VERSION) - -$(DL_DIR)/$(TTCP_SOURCE): - $(call DOWNLOAD,$(TTCP_SOURCE_URL),$(TTCP_SOURCE)) - -$(TTCP_DIR)/.unpacked: $(DL_DIR)/$(TTCP_SOURCE) - -mkdir $(TTCP_DIR) - cp -af $(DL_DIR)/$(TTCP_SOURCE) $(TTCP_DIR) - toolchain/patch-kernel.sh $(TTCP_DIR) package/ttcp/ ttcp-\*.patch - touch $(TTCP_DIR)/.unpacked - -$(TTCP_DIR)/.configured: $(TTCP_DIR)/.unpacked - touch $(TTCP_DIR)/.configured +################################################################################ -$(TTCP_DIR)/ttcp: $(TTCP_DIR)/.configured - $(TARGET_CC) -O2 -o $(TTCP_DIR)/ttcp $(TTCP_DIR)/$(TTCP_SOURCE) +TTCP_VERSION = 1.12 +TTCP_SITE = ftp://ftp.sgi.com/sgi/src/ttcp/ +TTCP_SOURCE = ttcp.c +TTCP_LICENSE = public domain -$(TARGET_DIR)/usr/bin/ttcp: $(TTCP_DIR)/ttcp - cp -af $(TTCP_DIR)/ttcp $(TARGET_DIR)/usr/bin/ +define TTCP_EXTRACT_CMDS + cp -f -t $(@D) $(DL_DIR)/$(TTCP_SOURCE) +endef -ttcp: $(TARGET_DIR)/usr/bin/ttcp +define TTCP_BUILD_CMDS + $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) \ + -o $(@D)/ttcp $(@D)/$(TTCP_SOURCE) +endef -ttcp-source: $(DL_DIR)/$(TTCP_SOURCE) +define TTCP_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/ttcp $(TARGET_DIR)/usr/bin/ttcp +endef -ttcp-clean: - rm -f $(TTCP_DIR)/*.o $(TTCP_DIR)/ttcp - -ttcp-dirclean: - rm -rf $(TTCP_DIR) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_TTCP),y) -TARGETS+=ttcp -endif +$(eval $(generic-package)) diff --git a/package/tvheadend/Config.in b/package/tvheadend/Config.in new file mode 100644 index 0000000000..04bcde122d --- /dev/null +++ b/package/tvheadend/Config.in @@ -0,0 +1,28 @@ +comment "tvheadend needs a toolchain w/ largefile, IPv6, threads" + depends on !BR2_avr32 + depends on !BR2_LARGEFILE || !BR2_INET_IPV6 || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_TVHEADEND + bool "tvheadend" + depends on BR2_LARGEFILE && BR2_INET_IPV6 + depends on BR2_TOOLCHAIN_HAS_THREADS + # tvheadend requires an atomic_add operation. Either you have + # a gcc >= 4.3 toolchain and it uses the gcc intrinsics, or it + # has special code for x86, x86-64, PPC and ARM. So in the + # context of Buildroot, the only really problematic + # architecture is avr32, which uses gcc 4.2. + depends on !BR2_avr32 + select BR2_PACKAGE_DVB_APPS + select BR2_PACKAGE_OPENSSL + help + Tvheadend is a TV streaming server for Linux supporting DVB-S, + DVB-S2, DVB-C, DVB-T, ATSC, IPTV, and Analog video (V4L) as + input sources. + + https://www.lonelycoder.com/redmine/projects/tvheadend/ + + Note: + - a default user has been created to log in the web configuration + GUI: admin/admin; you can change it at your discretion at runtime. + - if you want Avahi support, you'll need to enable: + Avahi, D-Bus, libdaemon diff --git a/package/tvheadend/S99tvheadend b/package/tvheadend/S99tvheadend new file mode 100644 index 0000000000..c29e32d333 --- /dev/null +++ b/package/tvheadend/S99tvheadend @@ -0,0 +1,54 @@ +#! /bin/sh +# tvheadend startup script inspired by the Debian one in the package + +# Author: Yann E. MORIN + +PATH=/usr/sbin:/usr/bin:/sbin:/bin +NAME=tvheadend +DAEMON=/usr/bin/$NAME +PIDFILE=/var/run/$NAME.pid + +[ -f "${DAEMON}" -a -x "${DAEMON}" ] || exit 0 + +# Read configuration variable file if it is present +[ -r "/etc/default/${NAME}" ] && . "/etc/default/${NAME}" + +ARGS="-f" +[ -z "${TVH_USER}" ] || ARGS="${ARGS} -u ${TVH_USER}" +[ -z "${TVH_GROUP}" ] || ARGS="${ARGS} -g ${TVH_GROUP}" +[ -z "${TVH_ADAPTERS}" ] || ARGS="${ARGS} -a ${TVH_ADAPTERS}" +[ -z "${TVH_HTTP_PORT}" ] || ARGS="${ARGS} -w ${TVH_HTTP_PORT}" +[ -z "${TVH_HTSP_PORT}" ] || ARGS="${ARGS} -e ${TVH_HTSP_PORT}" +[ "${TVH_DEBUG}" = "1" ] && ARGS="${ARGS} -s" + +case "$1" in + start) + printf "Starting TVHeadend daemon: " + if start-stop-daemon -S -q -p ${PIDFILE} -m --exec "${DAEMON}" -- ${ARGS}; then + printf "OK\n" + else + printf "failed\n" + fi + ;; + stop) + printf "Stoping TVHeadend daemon: " + start-stop-daemon -K -q -p ${PIDFILE} -s TERM + sleep 2 + if start-stop-daemon -K -q -p ${PIDFILE} -t; then + printf "failed, killing: " + start-stop-daemon -K -q -p ${PIDFILE} -s KILL -o + fi + printf "OK\n" + ;; + restart|force-reload) + "${0}" stop + sleep 2 + "${0}" start + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +: diff --git a/package/tvheadend/accesscontrol.1 b/package/tvheadend/accesscontrol.1 new file mode 100644 index 0000000000..b920943b51 --- /dev/null +++ b/package/tvheadend/accesscontrol.1 @@ -0,0 +1,13 @@ +{ + "enabled": 1, + "username": "admin", + "password": "admin", + "comment": "TVHeadend admin user", + "prefix": "0.0.0.0/0", + "streaming": 1, + "dvr": 1, + "dvrallcfg": 1, + "webui": 1, + "admin": 1, + "id": "1" +} diff --git a/package/tvheadend/etc.default.tvheadend b/package/tvheadend/etc.default.tvheadend new file mode 100644 index 0000000000..253f8320b1 --- /dev/null +++ b/package/tvheadend/etc.default.tvheadend @@ -0,0 +1,6 @@ +TVH_USER=tvheadend +TVH_GROUP=tvheadend +#TVH_ADAPTERS= +#TVH_HTTP_PORT=9981 +#TVH_HTSP_PORT=9982 +#TVH_DEBUG=1 diff --git a/package/tvheadend/tvheadend-001-no-auto-download-dvbscans.patch b/package/tvheadend/tvheadend-001-no-auto-download-dvbscans.patch new file mode 100644 index 0000000000..b64627e5cf --- /dev/null +++ b/package/tvheadend/tvheadend-001-no-auto-download-dvbscans.patch @@ -0,0 +1,65 @@ +Do not download transponder data as part of the build + +If dvb-scan is enabled, tvheadend will download the transponders data +from the dvb-apps package. This does not play well with buildroot. + +Instead, we rely on the dvb-apps package to install those files, so +it is no longer needed to install those as part of tvheadend. + +Signed-off-by: "Yann E. MORIN" + +diff -durN tvheadend-v3.5.orig/configure tvheadend-v3.5/configure +--- tvheadend-v3.5.orig/configure 2013-02-15 14:41:26.000000000 +0100 ++++ tvheadend-v3.5/configure 2013-02-16 15:41:16.675556099 +0100 +@@ -179,15 +179,16 @@ + # + # DVB scan + # +-if enabled linuxdvb && enabled dvbscan; then +- printf "${TAB}" "fetching dvb-scan files ..." +- "${ROOTDIR}/support/getmuxlist" +- if [ $? -ne 0 ]; then +- echo "fail" +- die "Failed to fetch dvb-scan data (use --disable-dvbscan)" +- fi +- echo "ok" +-fi ++# For buildroot, we already installed those files via the dvb-apps package ++#if enabled linuxdvb && enabled dvbscan; then ++# printf "${TAB}" "fetching dvb-scan files ..." ++# "${ROOTDIR}/support/getmuxlist" ++# if [ $? -ne 0 ]; then ++# echo "fail" ++# die "Failed to fetch dvb-scan data (use --disable-dvbscan)" ++# fi ++# echo "ok" ++#fi + + # ########################################################################### + # Write config +diff -durN tvheadend-v3.5.orig/Makefile tvheadend-v3.5/Makefile +--- tvheadend-v3.5.orig/Makefile 2013-02-15 14:41:26.000000000 +0100 ++++ tvheadend-v3.5/Makefile 2013-02-16 15:41:38.218821287 +0100 +@@ -211,7 +211,7 @@ + SRCS-${CONFIG_BUNDLE} += bundle.c + BUNDLES-yes += docs/html docs/docresources src/webui/static + BUNDLES-yes += data/conf +-BUNDLES-${CONFIG_DVBSCAN} += data/dvb-scan ++#BUNDLES-${CONFIG_DVBSCAN} += data/dvb-scan + BUNDLES = $(BUNDLES-yes) + + # +diff -durN tvheadend-v3.5.orig/support/posix.mk tvheadend-v3.5/support/posix.mk +--- tvheadend-v3.5.orig/support/posix.mk 2013-02-15 14:41:26.000000000 +0100 ++++ tvheadend-v3.5/support/posix.mk 2013-02-16 15:42:41.015290003 +0100 +@@ -15,6 +15,10 @@ + + find ${DESTDIR}${datadir}/tvheadend -name .git -exec rm -rf {} \; &>/dev/null || /bin/true + ++ mkdir -p ${DESTDIR}${datadir}/tvheadend/data ++ rm -f ${DESTDIR}${datadir}/tvheadend/data/dvb-scan ++ ln -sf /usr/share/dvb ${DESTDIR}${datadir}/tvheadend/data/dvb-scan ++ + uninstall: + rm -f ${DESTDIR}${bindir}/tvheadend + rm -f ${DESTDIR}${mandir}/tvheadend.1 diff --git a/package/tvheadend/tvheadend-002-no-check_config.patch b/package/tvheadend/tvheadend-002-no-check_config.patch new file mode 100644 index 0000000000..aad04e5011 --- /dev/null +++ b/package/tvheadend/tvheadend-002-no-check_config.patch @@ -0,0 +1,23 @@ +Makefile: do not use check_config + +test(1) only uses the second to compare two files dates. +test(1) also does a strict comparison wrt. dates. + +But, on very fast systems, the configure and .config.mk +files may be created in the same second, and so would lead +to a false comparison of the files' dates. + +Signed-off-by: "Yann E. MORIN" + +diff -durN tvheadend-v3.5.orig/Makefile tvheadend-v3.5/Makefile +--- tvheadend-v3.5.orig/Makefile 2013-02-17 15:15:03.228749505 +0100 ++++ tvheadend-v3.5/Makefile 2013-02-17 15:15:51.591923062 +0100 +@@ -250,7 +250,7 @@ + $(ROOTDIR)/configure $(CONFIGURE_ARGS) + + # Binary +-${PROG}: check_config $(OBJS) $(ALLDEPS) ++${PROG}: $(OBJS) $(ALLDEPS) + $(CC) -o $@ $(OBJS) $(CFLAGS) $(LDFLAGS) + + # Object diff --git a/package/tvheadend/tvheadend-003-remove-werror.patch b/package/tvheadend/tvheadend-003-remove-werror.patch new file mode 100644 index 0000000000..1b0e68797a --- /dev/null +++ b/package/tvheadend/tvheadend-003-remove-werror.patch @@ -0,0 +1,15 @@ +tvheadend: remove -Werror from CFLAGS + +Signed-off-by: Vicente Olivert Riera + +--- tvheadend-2b649954346aa2e9c81834d500a25c528f31f829/Makefile.orig 2013-11-28 15:52:52.284041848 +0000 ++++ tvheadend-2b649954346aa2e9c81834d500a25c528f31f829/Makefile 2013-11-28 15:53:03.715220194 +0000 +@@ -27,7 +27,7 @@ PROG := $(BUILDDIR)/tvheadend + # Common compiler flags + # + +-CFLAGS += -Wall -Werror -Wwrite-strings -Wno-deprecated-declarations ++CFLAGS += -Wall -Wwrite-strings -Wno-deprecated-declarations + CFLAGS += -Wmissing-prototypes -fms-extensions + CFLAGS += -g -funsigned-char -O2 + CFLAGS += -D_FILE_OFFSET_BITS=64 diff --git a/package/tvheadend/tvheadend.mk b/package/tvheadend/tvheadend.mk new file mode 100644 index 0000000000..7578dab166 --- /dev/null +++ b/package/tvheadend/tvheadend.mk @@ -0,0 +1,49 @@ +################################################################################ +# +# tvheadend +# +################################################################################ + +TVHEADEND_VERSION = 2b649954346aa2e9c81834d500a25c528f31f829 +TVHEADEND_SITE = git://github.com/tvheadend/tvheadend.git +TVHEADEND_LICENSE = GPLv3+ +TVHEADEND_LICENSE_FILES = LICENSE +TVHEADEND_DEPENDENCIES = host-pkgconf host-python openssl + +ifeq ($(BR2_PACKAGE_AVAHI),y) +TVHEADEND_DEPENDENCIES += avahi +endif + +#---------------------------------------------------------------------------- +# tvheadend is a little smuggler and thief! ;-) +# During the ./configure, it downloads some files from the dvb-apps +# package, so it has a list of pre-scanned tunner configurations. +# For buildroot, we add a patch that avoids doing that, but uses the +# scan files installed by the dvb-apps package +TVHEADEND_DEPENDENCIES += dvb-apps + +#---------------------------------------------------------------------------- +# To run tvheadend, we need: +# - a startup script, and its config file +# - a default DB with a tvheadend admin +# - a non-root user to run as +define TVHEADEND_INSTALL_DB + $(INSTALL) -D -m 0600 package/tvheadend/accesscontrol.1 \ + $(TARGET_DIR)/home/tvheadend/.hts/tvheadend/accesscontrol/1 + chmod -R go-rwx $(TARGET_DIR)/home/tvheadend +endef +TVHEADEND_POST_INSTALL_TARGET_HOOKS = TVHEADEND_INSTALL_DB + +define TVHEADEND_INSTALL_INIT_SYSV + $(INSTALL) -D package/tvheadend/etc.default.tvheadend $(TARGET_DIR)/etc/default/tvheadend + $(INSTALL) -D package/tvheadend/S99tvheadend $(TARGET_DIR)/etc/init.d/S99tvheadend +endef + +define TVHEADEND_USERS +tvheadend -1 tvheadend -1 * /home/tvheadend - video TVHeadend daemon +endef + +#---------------------------------------------------------------------------- +# tvheadend is not an autotools-based package, but it is possible to +# call its ./configure script as if it were an autotools one. +$(eval $(autotools-package)) diff --git a/package/tzdata/Config.in b/package/tzdata/Config.in new file mode 100644 index 0000000000..dec5f86c27 --- /dev/null +++ b/package/tzdata/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_TZDATA + bool "tzdata" + depends on BR2_TOOLCHAIN_USES_GLIBC + help + Time zone database + + http://www.iana.org/time-zones/repository/tz-link.html + +config BR2_PACKAGE_TZDATA_ZONELIST + string "Time zone list" + depends on BR2_PACKAGE_TZDATA + default "default" + help + Space-separated list of time zones to compile. + + The value "default" includes all commonly used time zones. Note + that this set consumes around 5.5M. + + The full list is the list of files in the time zone database source, + not including the build and .tab files. diff --git a/package/tzdata/tzdata.mk b/package/tzdata/tzdata.mk new file mode 100644 index 0000000000..9109e2a8f6 --- /dev/null +++ b/package/tzdata/tzdata.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# tzdata +# +################################################################################ + +TZDATA_VERSION = 2013h +TZDATA_SOURCE = tzdata$(TZDATA_VERSION).tar.gz +TZDATA_SITE = ftp://ftp.iana.org/tz/releases +TZDATA_DEPENDENCIES = host-zic +TZDATA_LICENSE = Public domain + +TZDATA_DEFAULT_ZONELIST = africa antarctica asia australasia backward etcetera \ + europe factory northamerica pacificnew southamerica + +ifeq ($(call qstrip,$(BR2_PACKAGE_TZDATA_ZONELIST)),default) +TZDATA_ZONELIST = $(TZDATA_DEFAULT_ZONELIST) +else +TZDATA_ZONELIST = $(call qstrip,$(BR2_PACKAGE_TZDATA_ZONELIST)) +endif + +# Don't strip any path components during extraction. +define TZDATA_EXTRACT_CMDS + gzip -d -c $(DL_DIR)/$(TZDATA_SOURCE) \ + | $(TAR) --strip-components=0 -C $(@D) -xf - +endef + +define TZDATA_BUILD_CMDS + (cd $(@D); \ + for zone in $(TZDATA_ZONELIST); do \ + $(ZIC) -d _output/posix -y yearistype.sh $$zone; \ + $(ZIC) -d _output/right -L leapseconds -y yearistype.sh $$zone; \ + done; \ + ) +endef + +define TZDATA_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/usr/share/zoneinfo + cp -a $(@D)/_output/* $(TARGET_DIR)/usr/share/zoneinfo + cd $(TARGET_DIR)/usr/share/zoneinfo; \ + for zone in posix/*; do \ + ln -sfn "$${zone}" "$${zone##*/}"; \ + done +endef + +$(eval $(generic-package)) diff --git a/package/uboot-tools/Config.in b/package/uboot-tools/Config.in new file mode 100644 index 0000000000..7c8f17ce6b --- /dev/null +++ b/package/uboot-tools/Config.in @@ -0,0 +1,31 @@ +config BR2_PACKAGE_UBOOT_TOOLS + bool "u-boot tools" + help + Companion tools for Das U-Boot bootloader. + + http://www.denx.de/wiki/U-Boot/WebHome + +if BR2_PACKAGE_UBOOT_TOOLS + +config BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE + bool "mkimage" + help + The mkimage tool from Das U-Boot bootloader, which allows + generation of U-Boot images in various formats. + +config BR2_PACKAGE_UBOOT_TOOLS_MKENVIMAGE + bool "mkenvimage" + help + The mkenvimage tool from Das U-Boot bootloader, which allows + generation of a valid binary environment image from a text file + describing the key=value pairs of the environment. + +config BR2_PACKAGE_UBOOT_TOOLS_FWPRINTENV + bool "fw_printenv" + default y + help + The fw_printenv / fw_setenv tools from Das U-Boot + bootloader, which allows access to the U-Boot environment + from Linux. + +endif diff --git a/package/uboot-tools/Config.in.host b/package/uboot-tools/Config.in.host new file mode 100644 index 0000000000..7a844e91c1 --- /dev/null +++ b/package/uboot-tools/Config.in.host @@ -0,0 +1,6 @@ +config BR2_PACKAGE_HOST_UBOOT_TOOLS + bool "host u-boot tools" + help + Companion tools for Das U-Boot bootloader. + + http://www.denx.de/wiki/U-Boot/WebHome diff --git a/package/uboot-tools/uboot-tools-01-drop-configh-from-tools.patch b/package/uboot-tools/uboot-tools-01-drop-configh-from-tools.patch new file mode 100644 index 0000000000..21995ecf06 --- /dev/null +++ b/package/uboot-tools/uboot-tools-01-drop-configh-from-tools.patch @@ -0,0 +1,37 @@ +We need to build u-boot tools without a board configuration for the target. +fw_env just uses config.h to define the default environment of the created +image, so it really isn't mandatory. + +Signed-off-by: Gustavo Zacarias + +diff -Nura u-boot-2013.01.orig/tools/env/fw_env.h u-boot-2013.01/tools/env/fw_env.h +--- u-boot-2013.01.orig/tools/env/fw_env.h 2013-01-19 07:50:53.879241660 -0300 ++++ u-boot-2013.01/tools/env/fw_env.h 2013-01-19 07:58:11.897903403 -0300 +@@ -21,15 +21,6 @@ + * MA 02111-1307 USA + */ + +-/* Pull in the current config to define the default environment */ +-#ifndef __ASSEMBLY__ +-#define __ASSEMBLY__ /* get only #defines from config.h */ +-#include +-#undef __ASSEMBLY__ +-#else +-#include +-#endif +- + /* + * To build the utility with the static configuration + * comment out the next line. +diff -Nura u-boot-2013.01.orig/tools/env/Makefile u-boot-2013.01/tools/env/Makefile +--- u-boot-2013.01.orig/tools/env/Makefile 2013-01-19 07:50:53.879241660 -0300 ++++ u-boot-2013.01/tools/env/Makefile 2013-01-19 07:59:34.926486346 -0300 +@@ -26,7 +26,7 @@ + HOSTSRCS := $(SRCTREE)/lib/crc32.c fw_env.c fw_env_main.c + HOSTSRCS += $(SRCTREE)/lib/ctype.c $(SRCTREE)/lib/linux_string.c + HOSTSRCS += $(SRCTREE)/common/env_attr.c $(SRCTREE)/common/env_flags.c +-HEADERS := fw_env.h $(OBJTREE)/include/config.h ++HEADERS := fw_env.h + + # Compile for a hosted environment on the target + HOSTCPPFLAGS = -idirafter $(SRCTREE)/include \ diff --git a/package/uboot-tools/uboot-tools-02-hostcflags-override-fix.patch b/package/uboot-tools/uboot-tools-02-hostcflags-override-fix.patch new file mode 100644 index 0000000000..0202eda9b4 --- /dev/null +++ b/package/uboot-tools/uboot-tools-02-hostcflags-override-fix.patch @@ -0,0 +1,29 @@ +[PATCH] Fix tools build with custom HOSTCFLAGS + +We always need to append HOSTCPPFLAGS, even if HOSTCFLAGS have been +overridden on the cmdline. + +Signed-off-by: Peter Korsgaard +--- + config.mk | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +Index: u-boot-2011.03/config.mk +=================================================================== +--- u-boot-2011.03.orig/config.mk ++++ u-boot-2011.03/config.mk +@@ -46,10 +46,12 @@ + + ######################################################################### + +-HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \ +- $(HOSTCPPFLAGS) ++HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer + HOSTSTRIP = strip + ++# append CPPFLAGS even if CFLAGS has been overridden on cmdline ++override HOSTCFLAGS += $(HOSTCPPFLAGS) ++ + # + # Mac OS X / Darwin's C preprocessor is Apple specific. It + # generates numerous errors and warnings. We want to bypass it diff --git a/package/uboot-tools/uboot-tools.mk b/package/uboot-tools/uboot-tools.mk new file mode 100644 index 0000000000..5c77887c8f --- /dev/null +++ b/package/uboot-tools/uboot-tools.mk @@ -0,0 +1,83 @@ +################################################################################ +# +# uboot-tools +# +################################################################################ + +UBOOT_TOOLS_VERSION = 2013.10 +UBOOT_TOOLS_SOURCE = u-boot-$(UBOOT_TOOLS_VERSION).tar.bz2 +UBOOT_TOOLS_SITE = ftp://ftp.denx.de/pub/u-boot +UBOOT_TOOLS_LICENSE = GPLv2+ +UBOOT_TOOLS_LICENSE_FILES = Licenses/gpl-2.0.txt + +define UBOOT_TOOLS_BUILD_CMDS + $(MAKE) -C $(@D) \ + HOSTCC="$(TARGET_CC)" \ + HOSTCFLAGS="$(TARGET_CFLAGS)" \ + HOSTLDFLAGS="$(TARGET_LDFLAGS)" \ + HOSTSTRIP=true \ + tools env +endef + +ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE),y) +define UBOOT_TOOLS_INSTALL_MKIMAGE + $(INSTALL) -m 0755 -D $(@D)/tools/mkimage $(TARGET_DIR)/usr/bin/mkimage +endef +endif + +ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_MKENVIMAGE),y) +define UBOOT_TOOLS_INSTALL_MKENVIMAGE + $(INSTALL) -m 0755 -D $(@D)/tools/mkenvimage $(TARGET_DIR)/usr/bin/mkenvimage +endef +endif + +ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FWPRINTENV),y) +define UBOOT_TOOLS_INSTALL_FWPRINTENV + $(INSTALL) -m 0755 -D $(@D)/tools/env/fw_printenv $(TARGET_DIR)/usr/sbin/fw_printenv + ln -sf fw_printenv $(TARGET_DIR)/usr/sbin/fw_setenv +endef +endif + +define UBOOT_TOOLS_INSTALL_TARGET_CMDS + $(UBOOT_TOOLS_INSTALL_MKIMAGE) + $(UBOOT_TOOLS_INSTALL_MKENVIMAGE) + $(UBOOT_TOOLS_INSTALL_FWPRINTENV) +endef + +define UBOOT_TOOLS_UNINSTALL_TARGET_CMDS + rm -f $(addprefix $(TARGET_DIR)/,\ + usr/bin/mkimage usr/sbin/fw_printenv usr/sbin/fw_setenv) +endef + +define HOST_UBOOT_TOOLS_BUILD_CMDS + $(MAKE1) -C $(@D) \ + HOSTCC="$(HOSTCC)" \ + HOSTCFLAGS="$(HOST_CFLAGS)" \ + HOSTLDFLAGS="$(HOST_LDFLAGS)" \ + tools +endef + +define HOST_UBOOT_TOOLS_INSTALL_CMDS + $(INSTALL) -m 0755 -D $(@D)/tools/mkimage $(HOST_DIR)/usr/bin/mkimage + $(INSTALL) -m 0755 -D $(@D)/tools/mkenvimage $(HOST_DIR)/usr/bin/mkenvimage +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) + +# Convenience variables for other mk files that make use of mkimage + +MKIMAGE = $(HOST_DIR)/usr/bin/mkimage + +# mkimage supports arm avr32 blackfin m68k microblaze mips mips64 nios2 powerpc ppc sh sparc sparc64 x86 +# KERNEL_ARCH can be arm64 arc arm avr32 blackfin m68k microblaze mips nios2 powerpc sh sparc i386 x86_64 xtensa +# For arm64, arc, xtensa we'll just keep KERNEL_ARCH +# For mips64, we'll just keep mips +# For i386 and x86_64, we need to convert +ifeq ($(KERNEL_ARCH),x86_64) +MKIMAGE_ARCH = x86 +else ifeq ($(KERNEL_ARCH),i386) +MKIMAGE_ARCH = x86 +else +MKIMAGE_ARCH = $(KERNEL_ARCH) +endif diff --git a/toolchain/uClibc/uClibc-0.9.31-add-bsd-endian-conversions.patch b/package/uclibc/0.9.31.1/uclibc-0001-add-bsd-endian-conversions.patch similarity index 100% rename from toolchain/uClibc/uClibc-0.9.31-add-bsd-endian-conversions.patch rename to package/uclibc/0.9.31.1/uclibc-0001-add-bsd-endian-conversions.patch diff --git a/package/uclibc/0.9.31.1/uclibc-0002-add-inotify-init1.patch b/package/uclibc/0.9.31.1/uclibc-0002-add-inotify-init1.patch new file mode 100644 index 0000000000..cbec426238 --- /dev/null +++ b/package/uclibc/0.9.31.1/uclibc-0002-add-inotify-init1.patch @@ -0,0 +1,64 @@ +From a2e5630af426f85fdd8721b2820786d9bd2aa695 Mon Sep 17 00:00:00 2001 +From: Vladimir Zapolskiy +Date: Tue, 1 Jun 2010 20:02:54 +0400 +Subject: [PATCH] inotify: add inotify_init1 system call support + +This patch introduces support for inotify_init1 system call, found +since Linux 2.6.27. + +Signed-off-by: Vladimir Zapolskiy +Signed-off-by: Khem Raj +--- + libc/sysdeps/linux/common/inotify.c | 4 ++++ + libc/sysdeps/linux/common/sys/inotify.h | 13 +++++++++++++ + 2 files changed, 17 insertions(+), 0 deletions(-) + +diff --git a/libc/sysdeps/linux/common/inotify.c b/libc/sysdeps/linux/common/inotify.c +index e5a6120..e35f043 100644 +--- a/libc/sysdeps/linux/common/inotify.c ++++ b/libc/sysdeps/linux/common/inotify.c +@@ -15,6 +15,10 @@ + _syscall0(int, inotify_init) + #endif + ++#ifdef __NR_inotify_init1 ++_syscall1(int, inotify_init1, int, flags) ++#endif ++ + #ifdef __NR_inotify_add_watch + _syscall3(int, inotify_add_watch, int, fd, const char *, path, uint32_t, mask) + #endif +diff --git a/libc/sysdeps/linux/common/sys/inotify.h b/libc/sysdeps/linux/common/sys/inotify.h +index 0131db9..dc4e19d 100644 +--- a/libc/sysdeps/linux/common/sys/inotify.h ++++ b/libc/sysdeps/linux/common/sys/inotify.h +@@ -22,6 +22,16 @@ + #include + + ++/* Flags for the parameter of inotify_init1. */ ++enum ++ { ++ IN_CLOEXEC = 02000000, ++#define IN_CLOEXEC IN_CLOEXEC ++ IN_NONBLOCK = 04000 ++#define IN_NONBLOCK IN_NONBLOCK ++ }; ++ ++ + /* Structure describing an inotify event. */ + struct inotify_event + { +@@ -79,6 +89,9 @@ __BEGIN_DECLS + /* Create and initialize inotify instance. */ + extern int inotify_init (void) __THROW; + ++/* Create and initialize inotify instance. */ ++extern int inotify_init1 (int __flags) __THROW; ++ + /* Add watch of object NAME to inotify instance FD. Notify about + events specified by MASK. */ + extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask) +-- +1.7.3.4 + diff --git a/package/uclibc/0.9.31.1/uclibc-0003-add-sock-cloexec.patch b/package/uclibc/0.9.31.1/uclibc-0003-add-sock-cloexec.patch new file mode 100644 index 0000000000..a7089a98ac --- /dev/null +++ b/package/uclibc/0.9.31.1/uclibc-0003-add-sock-cloexec.patch @@ -0,0 +1,43 @@ +From 83333e9c873e4eca6b2c945f7770b1f5373b0427 Mon Sep 17 00:00:00 2001 +From: Vladimir Zapolskiy +Date: Tue, 1 Jun 2010 20:02:39 +0400 +Subject: [PATCH] bits/socket.h: add SOCK_CLOEXEC and SOCK_NONBLOCK support + +This patch adds support for SOCK_CLOEXEC and SOCK_NONBLOCK socket +descriptor flags, which are introduced since Linux 2.6.27 + +Signed-off-by: Vladimir Zapolskiy +Signed-off-by: Khem Raj +--- + libc/sysdeps/linux/common/bits/socket.h | 12 +++++++++++- + 1 files changed, 11 insertions(+), 1 deletions(-) + +diff --git a/libc/sysdeps/linux/common/bits/socket.h b/libc/sysdeps/linux/common/bits/socket.h +index ac5a433..11f6e97 100644 +--- a/libc/sysdeps/linux/common/bits/socket.h ++++ b/libc/sysdeps/linux/common/bits/socket.h +@@ -53,10 +53,20 @@ enum __socket_type + SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, + datagrams of fixed maximum length. */ + #define SOCK_SEQPACKET SOCK_SEQPACKET +- SOCK_PACKET = 10 /* Linux specific way of getting packets ++ SOCK_PACKET = 10, /* Linux specific way of getting packets + at the dev level. For writing rarp and + other similar things on the user level. */ + #define SOCK_PACKET SOCK_PACKET ++ ++ /* Flags to be ORed into the type parameter of socket and socketpair and ++ used for the flags parameter of paccept. */ ++ ++ SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the ++ new descriptor(s). */ ++#define SOCK_CLOEXEC SOCK_CLOEXEC ++ SOCK_NONBLOCK = 04000 /* Atomically mark descriptor(s) as ++ non-blocking. */ ++#define SOCK_NONBLOCK SOCK_NONBLOCK + }; + + /* Protocol families. */ +-- +1.7.3.4 + diff --git a/package/uclibc/0.9.31.1/uclibc-0004-export-strverscmp.patch b/package/uclibc/0.9.31.1/uclibc-0004-export-strverscmp.patch new file mode 100644 index 0000000000..19bc021b88 --- /dev/null +++ b/package/uclibc/0.9.31.1/uclibc-0004-export-strverscmp.patch @@ -0,0 +1,30 @@ +From 139b8f0c673fed465d27f99c98568e5d5e1b9b72 Mon Sep 17 00:00:00 2001 +From: Denys Vlasenko +Date: Fri, 4 Jun 2010 13:36:30 +0200 +Subject: [PATCH] strverscmp: I forgot to export it + +Result was: + +strverscmp.o: +000000ec T __GI_strverscmp + +i.e. no plain "strverscmp"! + +Signed-off-by: Denys Vlasenko +Signed-off-by: Gustavo Zacarias +--- + libc/string/strverscmp.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/libc/string/strverscmp.c b/libc/string/strverscmp.c +index 74ae4c6..b19e8f0 100644 +--- a/libc/string/strverscmp.c ++++ b/libc/string/strverscmp.c +@@ -115,3 +115,4 @@ int strverscmp (const char *s1, const char *s2) + return state; + } + } ++libc_hidden_def(strverscmp) +-- +1.7.3.4 + diff --git a/package/uclibc/0.9.31.1/uclibc-0005-fix-daylight-saving-time-handling.patch b/package/uclibc/0.9.31.1/uclibc-0005-fix-daylight-saving-time-handling.patch new file mode 100644 index 0000000000..5a96113877 --- /dev/null +++ b/package/uclibc/0.9.31.1/uclibc-0005-fix-daylight-saving-time-handling.patch @@ -0,0 +1,36 @@ +From 47f3da1cf49377c25772bb54d07db55225bbb142 Mon Sep 17 00:00:00 2001 +From: Guillaume Bourcier +Date: Tue, 11 Oct 2011 13:45:33 +0200 +Subject: [PATCH] libc: fix daylight saving time handling + +The algorithm computing daylight saving time incorrectly adds a day for +each month after January for leap years. The clock shift from/to DST can +be delayed if the last Sunday of a transition month is exactly seven +days before the first of the following month. + +This change adds a day for the February month only. + +Signed-off-by: Guillaume Bourcier +Signed-off-by: Richard Braun +Signed-off-by: Carmelo Amoroso +Signed-off-by: Gustavo Zacarias +--- + libc/misc/time/time.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c +index 19d68e1..8e2ebf1 100644 +--- a/libc/misc/time/time.c ++++ b/libc/misc/time/time.c +@@ -689,7 +689,7 @@ static int tm_isdst(register const struct tm *__restrict ptm, + ++day; + } + monlen = 31 + day_cor[r->month -1] - day_cor[r->month]; +- if (isleap && (r->month > 1)) { ++ if (isleap && (r->month == 2)) { + ++monlen; + } + /* Wweekday (0 is Sunday) of 1st of the month +-- +1.7.3.4 + diff --git a/toolchain/uClibc/uClibc-0.9.31-fix-error-locale-utf-8.patch b/package/uclibc/0.9.31.1/uclibc-0006-fix-error-locale-utf-8.patch similarity index 100% rename from toolchain/uClibc/uClibc-0.9.31-fix-error-locale-utf-8.patch rename to package/uclibc/0.9.31.1/uclibc-0006-fix-error-locale-utf-8.patch diff --git a/package/uclibc/0.9.31.1/uclibc-0007-linuxthreads-errno-fix.patch b/package/uclibc/0.9.31.1/uclibc-0007-linuxthreads-errno-fix.patch new file mode 100644 index 0000000000..c49821bde7 --- /dev/null +++ b/package/uclibc/0.9.31.1/uclibc-0007-linuxthreads-errno-fix.patch @@ -0,0 +1,98 @@ +From af8b2d71ce37b9d4d24ddbc755cdea68de02949a Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Mon, 5 Jul 2010 14:08:17 +0200 +Subject: [PATCH] don't make __errno_location / __h_errno_location hidden + +Closes #2089 (https://bugs.busybox.net/show_bug.cgi?id=2089) + +__errno_location / __h_errno_location access has to go through the PLT +like malloc/free, so the linuxthread variants gets used instead when +compiling with -pthread. + +Based on http://github.com/mat-c/uClibc/commit/328d392c54aa5dc2b8e7f398a419087de497de2b + +Signed-off-by: Peter Korsgaard +--- + include/netdb.h | 1 - + libc/misc/internals/__errno_location.c | 3 --- + libc/misc/internals/__h_errno_location.c | 1 - + libc/misc/internals/__uClibc_main.c | 2 -- + libc/sysdeps/linux/common/bits/errno.h | 1 - + libc/sysdeps/linux/common/bits/uClibc_errno.h | 3 --- + 6 files changed, 0 insertions(+), 11 deletions(-) + +diff --git a/include/netdb.h b/include/netdb.h +index 9d3807d..ac411ab 100644 +--- a/include/netdb.h ++++ b/include/netdb.h +@@ -59,7 +59,6 @@ __BEGIN_DECLS + + /* Function to get address of global `h_errno' variable. */ + extern int *__h_errno_location (void) __THROW __attribute__ ((__const__)); +-libc_hidden_proto(__h_errno_location) + + /* Macros for accessing h_errno from inside libc. */ + #ifdef _LIBC +diff --git a/libc/misc/internals/__errno_location.c b/libc/misc/internals/__errno_location.c +index 487a9c2..0620860 100644 +--- a/libc/misc/internals/__errno_location.c ++++ b/libc/misc/internals/__errno_location.c +@@ -11,6 +11,3 @@ int * weak_const_function __errno_location (void) + { + return &errno; + } +-#ifdef IS_IN_libc /* not really need, only to keep in sync w/ libc_hidden_proto */ +-libc_hidden_weak(__errno_location) +-#endif +diff --git a/libc/misc/internals/__h_errno_location.c b/libc/misc/internals/__h_errno_location.c +index 213d398..235df4e 100644 +--- a/libc/misc/internals/__h_errno_location.c ++++ b/libc/misc/internals/__h_errno_location.c +@@ -10,4 +10,3 @@ int * weak_const_function __h_errno_location (void) + { + return &h_errno; + } +-libc_hidden_weak(__h_errno_location) +diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c +index 6e520fa..f4a9ebb 100644 +--- a/libc/misc/internals/__uClibc_main.c ++++ b/libc/misc/internals/__uClibc_main.c +@@ -64,9 +64,7 @@ void internal_function _dl_aux_init (ElfW(auxv_t) *av); + * Prototypes. + */ + extern int *weak_const_function __errno_location(void); +-libc_hidden_proto(__errno_location) + extern int *weak_const_function __h_errno_location(void); +-libc_hidden_proto(__h_errno_location) + + extern void weak_function _stdio_init(void) attribute_hidden; + #ifdef __UCLIBC_HAS_LOCALE__ +diff --git a/libc/sysdeps/linux/common/bits/errno.h b/libc/sysdeps/linux/common/bits/errno.h +index 0bf6354..de9688a 100644 +--- a/libc/sysdeps/linux/common/bits/errno.h ++++ b/libc/sysdeps/linux/common/bits/errno.h +@@ -43,7 +43,6 @@ + # ifndef __ASSEMBLER__ + /* Function to get address of global `errno' variable. */ + extern int *__errno_location (void) __THROW __attribute__ ((__const__)); +-libc_hidden_proto(__errno_location) + + # ifdef __UCLIBC_HAS_THREADS__ + /* When using threads, errno is a per-thread value. */ +diff --git a/libc/sysdeps/linux/common/bits/uClibc_errno.h b/libc/sysdeps/linux/common/bits/uClibc_errno.h +index 9c15618..79eb7e6 100644 +--- a/libc/sysdeps/linux/common/bits/uClibc_errno.h ++++ b/libc/sysdeps/linux/common/bits/uClibc_errno.h +@@ -33,9 +33,6 @@ extern int *__errno_location (void) __THROW __attribute__ ((__const__)) + ; + # if defined __UCLIBC_HAS_THREADS__ + # include +-# if defined USE___THREAD && USE___THREAD +-libc_hidden_proto(__errno_location) +-# endif + # endif + + #endif /* !__ASSEMBLER__ */ +-- +1.7.1 + diff --git a/toolchain/uClibc/uClibc-0.9.31-more-workarounds-GCC-PR32219.patch b/package/uclibc/0.9.31.1/uclibc-0008-more-workarounds-GCC-PR32219.patch similarity index 100% rename from toolchain/uClibc/uClibc-0.9.31-more-workarounds-GCC-PR32219.patch rename to package/uclibc/0.9.31.1/uclibc-0008-more-workarounds-GCC-PR32219.patch diff --git a/package/uclibc/0.9.31.1/uclibc-0009-unshare.patch b/package/uclibc/0.9.31.1/uclibc-0009-unshare.patch new file mode 100644 index 0000000000..ad440d9dc2 --- /dev/null +++ b/package/uclibc/0.9.31.1/uclibc-0009-unshare.patch @@ -0,0 +1,74 @@ +Backport of unshare() syscall. +From uClibc git 19dd090a0f68765db87990ef8eda9bf77bb29581 + +Signed-off-by: Gustavo Zacarias + +--- +diff -Nura uClibc-0.9.31.1.orig/libc/sysdeps/linux/common/bits/sched.h uClibc-0.9.31.1/libc/sysdeps/linux/common/bits/sched.h +--- uClibc-0.9.31.1.orig/libc/sysdeps/linux/common/bits/sched.h 2011-06-08 15:58:40.000000000 -0300 ++++ uClibc-0.9.31.1/libc/sysdeps/linux/common/bits/sched.h 2011-12-05 08:10:02.491978849 -0300 +@@ -58,7 +58,13 @@ + force CLONE_PTRACE on this clone. */ + # define CLONE_CHILD_SETTID 0x01000000 /* Store TID in userlevel buffer in + the child. */ +-# define CLONE_STOPPED 0x02000000 /* Start in stopped state. */ ++# define CLONE_STOPPED 0x02000000 /* Start in stopped state. */ ++# define CLONE_NEWUTS 0x04000000 /* New utsname group. */ ++# define CLONE_NEWIPC 0x08000000 /* New ipcs. */ ++# define CLONE_NEWUSER 0x10000000 /* New user namespace. */ ++# define CLONE_NEWPID 0x20000000 /* New pid namespace. */ ++# define CLONE_NEWNET 0x40000000 /* New network namespace. */ ++# define CLONE_IO 0x80000000 /* Clone I/O context. */ + #endif + + /* The official definition. */ +@@ -74,11 +80,9 @@ + extern int clone (int (*__fn) (void *__arg), void *__child_stack, + int __flags, void *__arg, ...) __THROW; + +-#if 0 + /* Unshare the specified resources. */ + extern int unshare (int __flags) __THROW; + #endif +-#endif + + __END_DECLS + +diff -Nura uClibc-0.9.31.1.orig/libc/sysdeps/linux/common/Makefile.in uClibc-0.9.31.1/libc/sysdeps/linux/common/Makefile.in +--- uClibc-0.9.31.1.orig/libc/sysdeps/linux/common/Makefile.in 2011-06-08 15:58:40.000000000 -0300 ++++ uClibc-0.9.31.1/libc/sysdeps/linux/common/Makefile.in 2011-12-05 08:23:28.353757602 -0300 +@@ -31,7 +31,8 @@ + remap_file_pages.c sched_getaffinity.c sched_setaffinity.c \ + sendfile64.c sendfile.c setfsgid.c setfsuid.c setresuid.c \ + splice.c vmsplice.c tee.c signalfd.c swapoff.c swapon.c \ +- sync_file_range.c sysctl.c sysinfo.c timerfd.c uselib.c vhangup.c,$(CSRC)) ++ sync_file_range.c sysctl.c sysinfo.c timerfd.c unshare.c uselib.c \ ++ vhangup.c,$(CSRC)) + endif + + ifneq ($(UCLIBC_BSD_SPECIFIC),y) +diff -Nura uClibc-0.9.31.1.orig/libc/sysdeps/linux/common/unshare.c uClibc-0.9.31.1/libc/sysdeps/linux/common/unshare.c +--- uClibc-0.9.31.1.orig/libc/sysdeps/linux/common/unshare.c 1969-12-31 21:00:00.000000000 -0300 ++++ uClibc-0.9.31.1/libc/sysdeps/linux/common/unshare.c 2011-12-05 08:22:45.954453512 -0300 +@@ -0,0 +1,21 @@ ++/* vi: set sw=4 ts=4: */ ++/* ++ * unshare() for uClibc ++ * ++ * Copyright (C) 2011 Henning Heinold ++ * ++ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. ++ */ ++ ++#include ++#include ++ ++#if defined __NR_unshare && defined __UCLIBC_LINUX_SPECIFIC__ ++_syscall1(int, unshare, int, flags) ++#else ++int unshare(int flags) ++{ ++ __set_errno(ENOSYS); ++ return -1; ++} ++#endif diff --git a/toolchain/uClibc/uClibc-0.9.31-workaround-GCC-PR32219.patch b/package/uclibc/0.9.31.1/uclibc-0010-workaround-GCC-PR32219.patch similarity index 100% rename from toolchain/uClibc/uClibc-0.9.31-workaround-GCC-PR32219.patch rename to package/uclibc/0.9.31.1/uclibc-0010-workaround-GCC-PR32219.patch diff --git a/package/uclibc/0.9.31.1/uclibc-0011-startfiles-Make-targets.patch b/package/uclibc/0.9.31.1/uclibc-0011-startfiles-Make-targets.patch new file mode 100644 index 0000000000..9a7f3045c5 --- /dev/null +++ b/package/uclibc/0.9.31.1/uclibc-0011-startfiles-Make-targets.patch @@ -0,0 +1,60 @@ +Add startfiles and install_startfiles targets to the top-level Makefile, as +in uClibc 0.9.32 and later. + +Signed-off-by: Simon Dawson + +diff -Nurp a/Makefile.help b/Makefile.help +--- a/Makefile.help 2011-06-08 19:58:40.000000000 +0100 ++++ b/Makefile.help 2013-08-10 21:17:46.572104259 +0100 +@@ -14,6 +14,7 @@ help: + @echo 'Build:' + @echo ' all - libraries and generated headers' + @echo ' pregen - generate headers' ++ @echo ' startfiles - build startfiles (crt)' + @echo ' utils - build target utilities' + @echo ' (ldd, ldconfig, locale, iconv)' + @echo ' hostutils - build host utilities (see utils)' +@@ -32,6 +33,7 @@ help: + @echo ' install - install both the runtime and the headers' + @echo ' install_runtime - install the libraries' + @echo ' install_dev - install all headers and static libs' ++ @echo ' install_startfiles - install startfiles (crt)' + @echo ' install_headers - install headers excluding generated ones' + @echo ' install_utils - install target utilities' + @echo ' install_hostutils - install host utilities' +diff -Nurp a/Makefile.in b/Makefile.in +--- a/Makefile.in 2011-06-08 19:58:40.000000000 +0100 ++++ b/Makefile.in 2013-08-10 21:10:55.248649101 +0100 +@@ -193,6 +193,8 @@ install: install_runtime install_dev + + RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB=$(shell $(top_srcdir)extra/scripts/relative_path.sh $(DEVEL_PREFIX)$(MULTILIB_DIR) $(RUNTIME_PREFIX)$(MULTILIB_DIR)) + ++startfiles: $(crt-y) ++ + $(top_builddir)extra/scripts/unifdef: |$(top_builddir)extra/scripts + $(top_builddir)extra/scripts/unifdef: $(top_srcdir)extra/scripts/unifdef.c + $(hcompile.u) +@@ -301,6 +303,10 @@ else + cd $(PREFIX)$(DEVEL_PREFIX)include && $(RM) -f wchar-stub.h + endif + ++# Installs startfiles ++install_startfiles: startfiles | $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR) ++ -$(INSTALL) -m 644 $(startfiles) $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/ ++ + # Installs development library links. + install_dev: install_headers install_runtime | $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR) + -$(INSTALL) -m 644 $(top_builddir)lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/ +diff -Nurp a/Makerules b/Makerules +--- a/Makerules 2011-06-08 19:58:40.000000000 +0100 ++++ b/Makerules 2013-08-10 21:24:21.287583111 +0100 +@@ -406,7 +406,8 @@ endif + CRTS_COMPAT := + #endif + +-$(crt-y): $(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC) ++startfiles = $(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC) ++$(crt-y): $(startfiles) + $(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC): | headers + + $(top_builddir)lib/$(NONSHARED_LIBNAME): $(libc-nonshared-y) diff --git a/package/uclibc/0.9.31.1/uclibc-0012-netlinkaccess-header-types.patch b/package/uclibc/0.9.31.1/uclibc-0012-netlinkaccess-header-types.patch new file mode 100644 index 0000000000..bc981a4171 --- /dev/null +++ b/package/uclibc/0.9.31.1/uclibc-0012-netlinkaccess-header-types.patch @@ -0,0 +1,35 @@ +Using kernel headers newer than 3.6.x, uclibc 0.9.31.1 fails to build: + + In file included from output/host/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/rtnetlink.h:6, + from libc/inet/netlinkaccess.h:34, + from libc/inet/if_index.c:36: + output/host/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/if_link.h:314: error: expected specifier-qualifier-list before '__be16' + make[1]: *** [libc/inet/if_index.os] Error 1 + make[1]: Leaving directory `output/build/uclibc-0.9.31.1' + make: *** [output/build/uclibc-0.9.31.1/.stamp_built] Error 2 + +This patch adjusts the system type definitions in the netlinkaccess.h +header, updating the types to match those used in uClibc 0.9.33.2. + +Signed-off-by: Simon Dawson + +diff -Nurp a/libc/inet/netlinkaccess.h b/libc/inet/netlinkaccess.h +--- a/libc/inet/netlinkaccess.h 2011-06-08 19:58:40.000000000 +0100 ++++ b/libc/inet/netlinkaccess.h 2012-12-20 12:16:34.251965672 +0000 +@@ -22,15 +22,8 @@ + #include + #include + #include +-#include +- + #if defined __ASSUME_NETLINK_SUPPORT || defined __UCLIBC_USE_NETLINK__ +-#define _LINUX_TYPES_H +-typedef uint8_t __u8; +-typedef uint16_t __u16; +-typedef uint32_t __u32; +-typedef uint64_t __u64; +-typedef int32_t __s32; ++#include + #include + #include + diff --git a/package/uclibc/0.9.31.1/uclibc-0013-libc-sysdeps-add-__kernel_long-and-__kernel_ulong.patch b/package/uclibc/0.9.31.1/uclibc-0013-libc-sysdeps-add-__kernel_long-and-__kernel_ulong.patch new file mode 100644 index 0000000000..55cb0c57b4 --- /dev/null +++ b/package/uclibc/0.9.31.1/uclibc-0013-libc-sysdeps-add-__kernel_long-and-__kernel_ulong.patch @@ -0,0 +1,21 @@ +libc/sysdeps: add __kernel_long and __kernel_ulong + +Linux 3.4 added __kernel_long_t and __kernel_ulong_t and various +exported header files were updated to use these new types. Add the +definitions for __kernel_long_t and __kernel_ulong_t to the relevant +kernel_types.h headers. + +Signed-off-by: Simon Dawson + +diff -Nurp a/libc/sysdeps/linux/avr32/bits/kernel_types.h b/libc/sysdeps/linux/avr32/bits/kernel_types.h +--- a/libc/sysdeps/linux/avr32/bits/kernel_types.h 2011-06-08 19:58:40.000000000 +0100 ++++ b/libc/sysdeps/linux/avr32/bits/kernel_types.h 2013-11-15 08:01:09.209037851 +0000 +@@ -39,6 +39,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef unsigned short __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + #ifdef __GNUC__ + typedef long long __kernel_loff_t; diff --git a/package/uclibc/0.9.32.1/uclibc-0001-Fix-e500-__fe_nomask_env-use-of-__set_errno.patch b/package/uclibc/0.9.32.1/uclibc-0001-Fix-e500-__fe_nomask_env-use-of-__set_errno.patch new file mode 100644 index 0000000000..1908925a33 --- /dev/null +++ b/package/uclibc/0.9.32.1/uclibc-0001-Fix-e500-__fe_nomask_env-use-of-__set_errno.patch @@ -0,0 +1,34 @@ +>From 49f58308779cb0b798f5e7bc902bbc515c1ec394 Mon Sep 17 00:00:00 2001 +From: Jason Woodward +Date: Sat, 11 Jun 2011 22:00:59 -0400 +Subject: [PATCH] Fix e500 __fe_nomask_env use of __set_errno w/o CFLAGS-libm + +Since the new _LIBC guard in 96c9a8f7d00cdf6bb7968a2390b9d87da8a45e2d we need +to use CFLAGS-libm (-DNOT_IN_libc -DIS_IN_libm) or we end up with linker +errors like: + + lib/libm.a(fe_nomask.os): In function `__fe_nomask_env': + fe_nomask.c:(.text+0x26): undefined reference to `__libc_errno' + collect2: ld returned 1 exit status + +Signed-off-by: Jason Woodward +--- + libm/powerpc/e500/fpu/Makefile.arch | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/libm/powerpc/e500/fpu/Makefile.arch b/libm/powerpc/e500/fpu/Makefile.arch +index 904561e..a64843f 100644 +--- a/libm/powerpc/e500/fpu/Makefile.arch ++++ b/libm/powerpc/e500/fpu/Makefile.arch +@@ -11,6 +11,8 @@ libm_ARCH_SRC:=$(wildcard $(libm_ARCH_fpu_DIR)/*.c) + libm_ARCH_OBJ:=$(patsubst $(libm_ARCH_fpu_DIR)/%.c,$(libm_ARCH_fpu_OUT)/%.o,$(libm_ARCH_SRC)) + endif + ++CFLAGS-fe_nomask.c := $(CFLAGS-libm) ++ + libm_ARCH_OBJS:=$(libm_ARCH_OBJ) + + ifeq ($(DOPIC),y) +-- +1.7.0.4 + diff --git a/package/uclibc/0.9.32.1/uclibc-0002-Fix-__libc_epoll_pwait-compile-failure-on-x86.patch b/package/uclibc/0.9.32.1/uclibc-0002-Fix-__libc_epoll_pwait-compile-failure-on-x86.patch new file mode 100644 index 0000000000..8cda4f902c --- /dev/null +++ b/package/uclibc/0.9.32.1/uclibc-0002-Fix-__libc_epoll_pwait-compile-failure-on-x86.patch @@ -0,0 +1,43 @@ +From 8245f3b4638fdff2011c2657af1bb211def704bc Mon Sep 17 00:00:00 2001 +From: Phil Blundell +Date: Sat, 11 Jun 2011 01:10:46 -0400 +Subject: [PATCH] Fix __libc_epoll_pwait compile failure on x86 + +This prevents "memory input 7 is not directly addressable" errors. + +| libc/sysdeps/linux/common/epoll.c: In function '__libc_epoll_pwait': +| libc/sysdeps/linux/common/epoll.c:71:80: error: memory input 7 is not directly addressable +| libc/sysdeps/linux/common/epoll.c:75:86: error: memory input 7 is not directly addressable +| make: *** [libc/sysdeps/linux/common/epoll.o] Error 1 +| make: *** Waiting for unfinished jobs.... + +Signed-off-by: Phil Blundell +Signed-off-by: Jason Woodward +Signed-off-by: Khem Raj +--- + libc/sysdeps/linux/common/epoll.c | 5 +++-- + 1 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/libc/sysdeps/linux/common/epoll.c b/libc/sysdeps/linux/common/epoll.c +index 85b0cfd..ab3e73b 100644 +--- a/libc/sysdeps/linux/common/epoll.c ++++ b/libc/sysdeps/linux/common/epoll.c +@@ -67,12 +67,13 @@ extern __typeof(epoll_pwait) __libc_epoll_pwait; + int __libc_epoll_pwait(int epfd, struct epoll_event *events, int maxevents, + int timeout, const sigset_t *set) + { ++ int nsig = _NSIG / 8; + if (SINGLE_THREAD_P) +- return INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, _NSIG / 8); ++ return INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, nsig); + # ifdef __UCLIBC_HAS_THREADS_NATIVE__ + else { + int oldtype = LIBC_CANCEL_ASYNC (); +- int result = INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, _NSIG / 8); ++ int result = INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, nsig); + LIBC_CANCEL_RESET (oldtype); + return result; + } +-- +1.7.5.4 + diff --git a/package/uclibc/0.9.32.1/uclibc-0003-libc-sysdeps-add-__kernel_long-and-__kernel_ulong.patch b/package/uclibc/0.9.32.1/uclibc-0003-libc-sysdeps-add-__kernel_long-and-__kernel_ulong.patch new file mode 100644 index 0000000000..4ba60e93fc --- /dev/null +++ b/package/uclibc/0.9.32.1/uclibc-0003-libc-sysdeps-add-__kernel_long-and-__kernel_ulong.patch @@ -0,0 +1,392 @@ +From 6a76edddaa62ff06f178143b582167734cb55c18 Mon Sep 17 00:00:00 2001 +From: Chris Packham +Date: Mon, 1 Oct 2012 18:12:54 +1300 +Subject: [PATCH] libc/sysdeps: add __kernel_long and __kernel_ulong + +Linux 3.4 added __kernel_long_t and __kernel_ulong_t and various +exported header files were updated to use these new types. Add the +definitions for __kernel_long_t and __kernel_ulong_t to the relevant +kernel_types.h headers. + +This change was automated with the following scriptlet + + git grep --name-only 'typedef.*__kernel_old_dev_t' \ + | xargs sed -i '/typedef.*__kernel_old_dev_t/ a\ + typedef long\t\t__kernel_long_t;\ + typedef unsigned long\t__kernel_ulong_t;' + +Whitespace in arm, avr32, hppa, sparc was then manually fixed up. + +Signed-off-by: Chris Packham +-- +Here's a cleaned up patch which should get the whitespace right. I'm a +bit iffy about the sparc changes they make sense to me but it's not a +platform I have access to. + +I can break this up per arch or per maintainer if requested. + + libc/sysdeps/linux/alpha/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/arm/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/avr32/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/bfin/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/c6x/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/cris/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/e1/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/h8300/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/hppa/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/i386/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/ia64/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/m68k/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/microblaze/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/mips/bits/kernel_types.h | 4 ++++ + libc/sysdeps/linux/nios2/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/powerpc/bits/kernel_types.h | 4 ++++ + libc/sysdeps/linux/sh/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/sh64/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/sparc/bits/kernel_types.h | 4 ++++ + libc/sysdeps/linux/v850/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/x86_64/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/xtensa/bits/kernel_types.h | 2 ++ + 22 files changed, 50 insertions(+) +Signed-off-by: Bernhard Reutner-Fischer +Signed-off-by: Gustavo Zacarias +--- + libc/sysdeps/linux/alpha/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/arm/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/avr32/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/bfin/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/c6x/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/cris/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/e1/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/h8300/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/hppa/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/i386/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/ia64/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/m68k/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/microblaze/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/mips/bits/kernel_types.h | 4 ++++ + libc/sysdeps/linux/nios2/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/powerpc/bits/kernel_types.h | 4 ++++ + libc/sysdeps/linux/sh/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/sh64/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/sparc/bits/kernel_types.h | 4 ++++ + libc/sysdeps/linux/v850/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/x86_64/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/xtensa/bits/kernel_types.h | 2 ++ + 22 files changed, 50 insertions(+) + +diff --git a/libc/sysdeps/linux/alpha/bits/kernel_types.h b/libc/sysdeps/linux/alpha/bits/kernel_types.h +index d5574c9..cd59b9d 100644 +--- a/libc/sysdeps/linux/alpha/bits/kernel_types.h ++++ b/libc/sysdeps/linux/alpha/bits/kernel_types.h +@@ -33,6 +33,8 @@ typedef __kernel_gid_t __kernel_old_gid_t; + typedef __kernel_uid_t __kernel_uid32_t; + typedef __kernel_gid_t __kernel_gid32_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + int val[2]; +diff --git a/libc/sysdeps/linux/arm/bits/kernel_types.h b/libc/sysdeps/linux/arm/bits/kernel_types.h +index 766a306..6b36f32 100644 +--- a/libc/sysdeps/linux/arm/bits/kernel_types.h ++++ b/libc/sysdeps/linux/arm/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef long long __kernel_loff_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + #ifdef __USE_ALL +diff --git a/libc/sysdeps/linux/avr32/bits/kernel_types.h b/libc/sysdeps/linux/avr32/bits/kernel_types.h +index f7d8b52..c551d57 100644 +--- a/libc/sysdeps/linux/avr32/bits/kernel_types.h ++++ b/libc/sysdeps/linux/avr32/bits/kernel_types.h +@@ -39,6 +39,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef unsigned short __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + #ifdef __GNUC__ + typedef long long __kernel_loff_t; +diff --git a/libc/sysdeps/linux/bfin/bits/kernel_types.h b/libc/sysdeps/linux/bfin/bits/kernel_types.h +index d69a875..9fec595 100644 +--- a/libc/sysdeps/linux/bfin/bits/kernel_types.h ++++ b/libc/sysdeps/linux/bfin/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef long long __kernel_loff_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + #ifdef __USE_ALL +diff --git a/libc/sysdeps/linux/c6x/bits/kernel_types.h b/libc/sysdeps/linux/c6x/bits/kernel_types.h +index 7557309..2c363a8 100644 +--- a/libc/sysdeps/linux/c6x/bits/kernel_types.h ++++ b/libc/sysdeps/linux/c6x/bits/kernel_types.h +@@ -22,6 +22,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned int __kernel_old_uid_t; + typedef unsigned int __kernel_old_gid_t; + typedef unsigned int __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef unsigned int __kernel_size_t; + typedef int __kernel_ssize_t; + typedef int __kernel_ptrdiff_t; +diff --git a/libc/sysdeps/linux/cris/bits/kernel_types.h b/libc/sysdeps/linux/cris/bits/kernel_types.h +index f122c7f..5d31f7b 100644 +--- a/libc/sysdeps/linux/cris/bits/kernel_types.h ++++ b/libc/sysdeps/linux/cris/bits/kernel_types.h +@@ -28,6 +28,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + #ifdef __GNUC__ + typedef long long __kernel_loff_t; +diff --git a/libc/sysdeps/linux/e1/bits/kernel_types.h b/libc/sysdeps/linux/e1/bits/kernel_types.h +index 8017d85..f55a129 100644 +--- a/libc/sysdeps/linux/e1/bits/kernel_types.h ++++ b/libc/sysdeps/linux/e1/bits/kernel_types.h +@@ -31,6 +31,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + /* +diff --git a/libc/sysdeps/linux/h8300/bits/kernel_types.h b/libc/sysdeps/linux/h8300/bits/kernel_types.h +index 0570675..4cfd1bf 100644 +--- a/libc/sysdeps/linux/h8300/bits/kernel_types.h ++++ b/libc/sysdeps/linux/h8300/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef long long __kernel_loff_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + #ifdef __USE_ALL +diff --git a/libc/sysdeps/linux/hppa/bits/kernel_types.h b/libc/sysdeps/linux/hppa/bits/kernel_types.h +index 4441f9b..6b2e794 100644 +--- a/libc/sysdeps/linux/hppa/bits/kernel_types.h ++++ b/libc/sysdeps/linux/hppa/bits/kernel_types.h +@@ -45,6 +45,8 @@ typedef long long __kernel_off64_t; + typedef unsigned long long __kernel_ino64_t; + + typedef unsigned int __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + #ifdef __USE_ALL +diff --git a/libc/sysdeps/linux/i386/bits/kernel_types.h b/libc/sysdeps/linux/i386/bits/kernel_types.h +index 9c07c72..59044b8 100644 +--- a/libc/sysdeps/linux/i386/bits/kernel_types.h ++++ b/libc/sysdeps/linux/i386/bits/kernel_types.h +@@ -40,6 +40,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + typedef struct { +diff --git a/libc/sysdeps/linux/ia64/bits/kernel_types.h b/libc/sysdeps/linux/ia64/bits/kernel_types.h +index c8ef86d..e31dc65 100644 +--- a/libc/sysdeps/linux/ia64/bits/kernel_types.h ++++ b/libc/sysdeps/linux/ia64/bits/kernel_types.h +@@ -52,5 +52,7 @@ typedef __kernel_gid_t __kernel_gid32_t; + + typedef unsigned int __kernel_dev_t; + typedef unsigned int __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + #endif /* _ASM_IA64_POSIX_TYPES_H */ +diff --git a/libc/sysdeps/linux/m68k/bits/kernel_types.h b/libc/sysdeps/linux/m68k/bits/kernel_types.h +index 0a77a8f..176b968 100644 +--- a/libc/sysdeps/linux/m68k/bits/kernel_types.h ++++ b/libc/sysdeps/linux/m68k/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef long long __kernel_loff_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + #ifdef __USE_ALL +diff --git a/libc/sysdeps/linux/microblaze/bits/kernel_types.h b/libc/sysdeps/linux/microblaze/bits/kernel_types.h +index 2a70575..a9f736b 100644 +--- a/libc/sysdeps/linux/microblaze/bits/kernel_types.h ++++ b/libc/sysdeps/linux/microblaze/bits/kernel_types.h +@@ -44,6 +44,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned int __kernel_old_uid_t; + typedef unsigned int __kernel_old_gid_t; + typedef unsigned int __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + #ifdef __GNUC__ + typedef long long __kernel_loff_t; +diff --git a/libc/sysdeps/linux/mips/bits/kernel_types.h b/libc/sysdeps/linux/mips/bits/kernel_types.h +index 9fc3b96..97faeac 100644 +--- a/libc/sysdeps/linux/mips/bits/kernel_types.h ++++ b/libc/sysdeps/linux/mips/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef int __kernel_gid32_t; + typedef __kernel_uid_t __kernel_old_uid_t; + typedef __kernel_gid_t __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + #else + typedef unsigned int __kernel_dev_t; +@@ -68,6 +70,8 @@ typedef int __kernel_gid32_t; + typedef __kernel_uid_t __kernel_old_uid_t; + typedef __kernel_gid_t __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + #endif + +diff --git a/libc/sysdeps/linux/nios2/bits/kernel_types.h b/libc/sysdeps/linux/nios2/bits/kernel_types.h +index 8b86d79..3c030e7 100644 +--- a/libc/sysdeps/linux/nios2/bits/kernel_types.h ++++ b/libc/sysdeps/linux/nios2/bits/kernel_types.h +@@ -31,6 +31,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef unsigned short __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + typedef struct { +diff --git a/libc/sysdeps/linux/powerpc/bits/kernel_types.h b/libc/sysdeps/linux/powerpc/bits/kernel_types.h +index 3f3b933..1167de2 100644 +--- a/libc/sysdeps/linux/powerpc/bits/kernel_types.h ++++ b/libc/sysdeps/linux/powerpc/bits/kernel_types.h +@@ -36,6 +36,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned int __kernel_old_uid_t; + typedef unsigned int __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + #else + typedef unsigned int __kernel_dev_t; + typedef unsigned int __kernel_ino_t; +@@ -61,6 +63,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned int __kernel_old_uid_t; + typedef unsigned int __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + #endif + +diff --git a/libc/sysdeps/linux/sh/bits/kernel_types.h b/libc/sysdeps/linux/sh/bits/kernel_types.h +index f96e9fa..ac97261 100644 +--- a/libc/sysdeps/linux/sh/bits/kernel_types.h ++++ b/libc/sysdeps/linux/sh/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + typedef struct { +diff --git a/libc/sysdeps/linux/sh64/bits/kernel_types.h b/libc/sysdeps/linux/sh64/bits/kernel_types.h +index 671cc83..8cc6c61 100644 +--- a/libc/sysdeps/linux/sh64/bits/kernel_types.h ++++ b/libc/sysdeps/linux/sh64/bits/kernel_types.h +@@ -43,6 +43,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + typedef struct { +diff --git a/libc/sysdeps/linux/sparc/bits/kernel_types.h b/libc/sysdeps/linux/sparc/bits/kernel_types.h +index 0cc4bc2..a10e075 100644 +--- a/libc/sysdeps/linux/sparc/bits/kernel_types.h ++++ b/libc/sysdeps/linux/sparc/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef unsigned short __kernel_gid16_t; + typedef __kernel_uid_t __kernel_old_uid_t; + typedef __kernel_gid_t __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef __kernel_uid_t __kernel_uid32_t; + typedef __kernel_gid_t __kernel_gid32_t; + typedef int __kernel_suseconds_t; +@@ -62,6 +64,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + #endif + +diff --git a/libc/sysdeps/linux/v850/bits/kernel_types.h b/libc/sysdeps/linux/v850/bits/kernel_types.h +index 3e851ab..780aa8a 100644 +--- a/libc/sysdeps/linux/v850/bits/kernel_types.h ++++ b/libc/sysdeps/linux/v850/bits/kernel_types.h +@@ -41,6 +41,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + #ifdef __USE_ALL +diff --git a/libc/sysdeps/linux/x86_64/bits/kernel_types.h b/libc/sysdeps/linux/x86_64/bits/kernel_types.h +index de800d7..0cae08c 100644 +--- a/libc/sysdeps/linux/x86_64/bits/kernel_types.h ++++ b/libc/sysdeps/linux/x86_64/bits/kernel_types.h +@@ -40,6 +40,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + typedef struct { +diff --git a/libc/sysdeps/linux/xtensa/bits/kernel_types.h b/libc/sysdeps/linux/xtensa/bits/kernel_types.h +index 44f1075..ed38f2e 100644 +--- a/libc/sysdeps/linux/xtensa/bits/kernel_types.h ++++ b/libc/sysdeps/linux/xtensa/bits/kernel_types.h +@@ -33,6 +33,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef unsigned short __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + /* Beginning in 2.6 kernels, which is the first version that includes the +-- +1.8.1.5 + diff --git a/package/uclibc/0.9.32.1/uclibc-0004-sparc-errno-fix.patch b/package/uclibc/0.9.32.1/uclibc-0004-sparc-errno-fix.patch new file mode 100644 index 0000000000..44d06cb62f --- /dev/null +++ b/package/uclibc/0.9.32.1/uclibc-0004-sparc-errno-fix.patch @@ -0,0 +1,11 @@ +--- uClibc-0.9.32.ori/libc/sysdeps/linux/sparc/pipe.S 2011-06-08 21:35:20.000000000 +0200 ++++ uClibc-0.9.32/libc/sysdeps/linux/sparc/pipe.S 2011-11-11 15:57:25.000000000 +0100 +@@ -52,7 +52,7 @@ + restore %g0,%g0,%o0 + + .Lerror: +- call HIDDEN_JUMPTARGET(__errno_location) ++ call __errno_location + or %g0,EINVAL,%i0 + st %i0,[%o0] + ret diff --git a/package/uclibc/0.9.32.1/uclibc-0005-unshare.patch b/package/uclibc/0.9.32.1/uclibc-0005-unshare.patch new file mode 100644 index 0000000000..5820e15bbe --- /dev/null +++ b/package/uclibc/0.9.32.1/uclibc-0005-unshare.patch @@ -0,0 +1,82 @@ +Backport of unshare() syscall. +From uClibc git 19dd090a0f68765db87990ef8eda9bf77bb29581 + +Signed-off-by: Gustavo Zacarias + +--- +diff -Nura uClibc-0.9.32.orig/libc/sysdeps/linux/common/bits/sched.h uClibc-0.9.32/libc/sysdeps/linux/common/bits/sched.h +--- uClibc-0.9.32.orig/libc/sysdeps/linux/common/bits/sched.h 2011-12-02 23:54:30.571841170 -0300 ++++ uClibc-0.9.32/libc/sysdeps/linux/common/bits/sched.h 2011-12-02 23:57:45.874205079 -0300 +@@ -58,7 +58,13 @@ + force CLONE_PTRACE on this clone. */ + # define CLONE_CHILD_SETTID 0x01000000 /* Store TID in userlevel buffer in + the child. */ +-# define CLONE_STOPPED 0x02000000 /* Start in stopped state. */ ++# define CLONE_STOPPED 0x02000000 /* Start in stopped state. */ ++# define CLONE_NEWUTS 0x04000000 /* New utsname group. */ ++# define CLONE_NEWIPC 0x08000000 /* New ipcs. */ ++# define CLONE_NEWUSER 0x10000000 /* New user namespace. */ ++# define CLONE_NEWPID 0x20000000 /* New pid namespace. */ ++# define CLONE_NEWNET 0x40000000 /* New network namespace. */ ++# define CLONE_IO 0x80000000 /* Clone I/O context. */ + #endif + + /* The official definition. */ +@@ -74,11 +80,9 @@ + extern int clone (int (*__fn) (void *__arg), void *__child_stack, + int __flags, void *__arg, ...) __THROW; + +-#if 0 + /* Unshare the specified resources. */ + extern int unshare (int __flags) __THROW; + #endif +-#endif + + __END_DECLS + +diff -Nura uClibc-0.9.32.orig/libc/sysdeps/linux/common/Makefile.in uClibc-0.9.32/libc/sysdeps/linux/common/Makefile.in +--- uClibc-0.9.32.orig/libc/sysdeps/linux/common/Makefile.in 2011-12-02 23:54:30.577841215 -0300 ++++ uClibc-0.9.32/libc/sysdeps/linux/common/Makefile.in 2011-12-02 23:56:08.801527166 -0300 +@@ -24,7 +24,8 @@ + remap_file_pages.c sched_getaffinity.c sched_setaffinity.c \ + sendfile64.c sendfile.c setfsgid.c setfsuid.c setresuid.c \ + splice.c vmsplice.c tee.c signalfd.c swapoff.c swapon.c \ +- sync_file_range.c sysctl.c sysinfo.c timerfd.c uselib.c vhangup.c ++ sync_file_range.c sysctl.c sysinfo.c timerfd.c unshare.c uselib.c \ ++ vhangup.c + # NPTL needs these internally: madvise.c + CSRC-$(findstring y,$(UCLIBC_LINUX_SPECIFIC)$(UCLIBC_HAS_THREADS_NATIVE)) += madvise.c + ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y) +diff -Nura uClibc-0.9.32.orig/libc/sysdeps/linux/common/stubs.c uClibc-0.9.32/libc/sysdeps/linux/common/stubs.c +--- uClibc-0.9.32.orig/libc/sysdeps/linux/common/stubs.c 2011-12-02 23:54:30.577841215 -0300 ++++ uClibc-0.9.32/libc/sysdeps/linux/common/stubs.c 2011-12-02 23:58:18.803435042 -0300 +@@ -278,6 +278,10 @@ + make_stub(umount2) + #endif + ++#if !defined __NR_unshare && defined __UCLIBC_LINUX_SPECIFIC__ ++make_stub(unshare) ++#endif ++ + #ifndef __NR_utimensat + make_stub(futimens) + make_stub(utimensat) +diff -Nura uClibc-0.9.32.orig/libc/sysdeps/linux/common/unshare.c uClibc-0.9.32/libc/sysdeps/linux/common/unshare.c +--- uClibc-0.9.32.orig/libc/sysdeps/linux/common/unshare.c 1969-12-31 21:00:00.000000000 -0300 ++++ uClibc-0.9.32/libc/sysdeps/linux/common/unshare.c 2011-12-02 23:58:42.693601880 -0300 +@@ -0,0 +1,15 @@ ++/* vi: set sw=4 ts=4: */ ++/* ++ * unshare() for uClibc ++ * ++ * Copyright (C) 2011 Henning Heinold ++ * ++ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. ++ */ ++ ++#include ++#include ++ ++#if defined __NR_unshare ++_syscall1(int, unshare, int, flags) ++#endif diff --git a/package/uclibc/0.9.32.1/uclibc-0006-linuxthreads-errno-fix.patch b/package/uclibc/0.9.32.1/uclibc-0006-linuxthreads-errno-fix.patch new file mode 100644 index 0000000000..c4d0d00df9 --- /dev/null +++ b/package/uclibc/0.9.32.1/uclibc-0006-linuxthreads-errno-fix.patch @@ -0,0 +1,68 @@ +From af8b2d71ce37b9d4d24ddbc755cdea68de02949a Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Mon, 5 Jul 2010 14:08:17 +0200 +Subject: [PATCH] don't make __errno_location / __h_errno_location hidden + +Closes #2089 (https://bugs.busybox.net/show_bug.cgi?id=2089) + +__errno_location / __h_errno_location access has to go through the PLT +like malloc/free, so the linuxthread variants gets used instead when +compiling with -pthread. + +Based on http://github.com/mat-c/uClibc/commit/328d392c54aa5dc2b8e7f398a419087de497de2b + +Signed-off-by: Peter Korsgaard +--- + include/netdb.h | 1 - + libc/misc/internals/__errno_location.c | 3 --- + libc/misc/internals/__h_errno_location.c | 1 - + libc/sysdeps/linux/common/bits/errno.h | 1 - + 6 files changed, 0 insertions(+), 11 deletions(-) + +diff --git a/include/netdb.h b/include/netdb.h +index 9d3807d..ac411ab 100644 +--- a/include/netdb.h ++++ b/include/netdb.h +@@ -59,7 +59,6 @@ __BEGIN_DECLS + + /* Function to get address of global `h_errno' variable. */ + extern int *__h_errno_location (void) __THROW __attribute__ ((__const__)); +-libc_hidden_proto(__h_errno_location) + + /* Macros for accessing h_errno from inside libc. */ + #ifdef _LIBC +diff --git a/libc/misc/internals/__errno_location.c b/libc/misc/internals/__errno_location.c +index 487a9c2..0620860 100644 +--- a/libc/misc/internals/__errno_location.c ++++ b/libc/misc/internals/__errno_location.c +@@ -15,6 +15,3 @@ int * weak_const_function __errno_location (void) + { + return &errno; + } +-#ifdef IS_IN_libc /* not really need, only to keep in sync w/ libc_hidden_proto */ +-libc_hidden_weak(__errno_location) +-#endif +diff --git a/libc/misc/internals/__h_errno_location.c b/libc/misc/internals/__h_errno_location.c +index 213d398..235df4e 100644 +--- a/libc/misc/internals/__h_errno_location.c ++++ b/libc/misc/internals/__h_errno_location.c +@@ -10,4 +10,3 @@ int * weak_const_function __h_errno_location (void) + { + return &h_errno; + } +-libc_hidden_weak(__h_errno_location) +diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c +index 6e520fa..f4a9ebb 100644 +--- a/libc/sysdeps/linux/common/bits/errno.h ++++ b/libc/sysdeps/linux/common/bits/errno.h +@@ -43,7 +43,6 @@ + # ifndef __ASSEMBLER__ + /* Function to get address of global `errno' variable. */ + extern int *__errno_location (void) __THROW __attribute__ ((__const__)); +-libc_hidden_proto(__errno_location) + + # ifdef __UCLIBC_HAS_THREADS__ + /* When using threads, errno is a per-thread value. */ +-- +1.7.1 + diff --git a/package/uclibc/0.9.32.1/uclibc-0007-libc-add-non-standard-execvpe-function.patch b/package/uclibc/0.9.32.1/uclibc-0007-libc-add-non-standard-execvpe-function.patch new file mode 100644 index 0000000000..81413338c0 --- /dev/null +++ b/package/uclibc/0.9.32.1/uclibc-0007-libc-add-non-standard-execvpe-function.patch @@ -0,0 +1,163 @@ +From 0eb30761a26c46aaf555464114851202ae9c27bd Mon Sep 17 00:00:00 2001 +From: Henning Heinold +Date: Sat, 4 Jun 2011 21:23:15 +0200 +Subject: [PATCH] libc: add non standard execvpe function + +[Gustavo]: Drop TODO modification to make it compatible +Signed-off-by: Henning Heinold +Signed-off-by: Bernhard Reutner-Fischer +--- + include/unistd.h | 8 ++++++++ + libc/unistd/exec.c | 38 +++++++++++++++++++++++++++++++++----- + libc/unistd/execvpe.c | 7 +++++++ + 4 files changed, 52 insertions(+), 5 deletions(-) + create mode 100644 libc/unistd/execvpe.c + +diff --git a/include/unistd.h b/include/unistd.h +index feadf93..9479554 100644 +--- a/include/unistd.h ++++ b/include/unistd.h +@@ -619,6 +619,14 @@ extern int execlp (const char *__file, const char *__arg, ...) + __THROW __nonnull ((1)); + libc_hidden_proto(execlp) + ++#ifdef __USE_GNU ++/* Execute FILE, searching in the `PATH' environment variable if it contains ++ no slashes, with arguments ARGV and environment from a pointer */ ++extern int execvpe (__const char *__file, char *__const __argv[], char *__const __envp[]) ++ __THROW __nonnull ((1)); ++libc_hidden_proto(execvpe) ++#endif ++ + + #if defined __USE_MISC || defined __USE_XOPEN + /* Add INC to priority of the current process. */ +diff --git a/libc/unistd/exec.c b/libc/unistd/exec.c +index ba92989..8fa42e5 100644 +--- a/libc/unistd/exec.c ++++ b/libc/unistd/exec.c +@@ -32,6 +32,8 @@ + /**********************************************************************/ + #define EXEC_FUNC_COMMON 0 + #define EXEC_FUNC_EXECVP 1 ++#define EXEC_FUNC_EXECVPE 2 ++ + #if defined(__ARCH_USE_MMU__) + + /* We have an MMU, so use alloca() to grab space for buffers and arg lists. */ +@@ -58,6 +60,7 @@ + * execle(a) -> execve(-) + * execv(-) -> execve(-) + * execvp(a) -> execve(-) ++ * execvpe(a) -> execve(-) + */ + + # define EXEC_ALLOC_SIZE(VAR) /* nothing to do */ +@@ -219,15 +222,18 @@ libc_hidden_def(execlp) + + #endif + /**********************************************************************/ +-#ifdef L_execvp ++#if defined (L_execvp) || defined(L_execvpe) + + + /* Use a default path that matches glibc behavior, since SUSv3 says + * this is implementation-defined. The default is current working dir, + * /bin, and then /usr/bin. */ + static const char default_path[] = ":/bin:/usr/bin"; +- ++#if defined (L_execvp) + int execvp(const char *path, char *const argv[]) ++#elif defined (L_execvpe) ++int execvpe(const char *path, char *const argv[], char *const envp[]) ++#endif + { + char *buf = NULL; + char *p; +@@ -245,7 +251,11 @@ int execvp(const char *path, char *const argv[]) + } + + if (strchr(path, '/')) { ++#if defined (L_execvp) + execve(path, argv, __environ); ++#elif defined (L_execvpe) ++ execve(path, argv, envp); ++#endif + if (errno == ENOEXEC) { + char **nargv; + EXEC_ALLOC_SIZE(size2) /* Do NOT add a semicolon! */ +@@ -254,11 +264,19 @@ int execvp(const char *path, char *const argv[]) + /* Need the dimension - 1. We omit counting the trailing + * NULL but we actually omit the first entry. */ + for (n=0 ; argv[n] ; n++) {} ++#if defined (L_execvp) + nargv = (char **) EXEC_ALLOC((n+2) * sizeof(char *), size2, EXEC_FUNC_EXECVP); ++#elif defined (L_execvpe) ++ nargv = (char **) EXEC_ALLOC((n+2) * sizeof(char *), size2, EXEC_FUNC_EXECVPE); ++#endif + nargv[0] = argv[0]; + nargv[1] = (char *)path; + memcpy(nargv+2, argv+1, n*sizeof(char *)); ++#if defined (L_execvp) + execve("/bin/sh", nargv, __environ); ++#elif defined (L_execvpe) ++ execve("/bin/sh", nargv, envp); ++#endif + EXEC_FREE(nargv, size2); + } + } else { +@@ -277,8 +295,11 @@ int execvp(const char *path, char *const argv[]) + return -1; + } + len = (FILENAME_MAX - 1) - plen; +- ++#if defined (L_execvp) + buf = EXEC_ALLOC(FILENAME_MAX, size, EXEC_FUNC_EXECVP); ++#elif defined (L_execvpe) ++ buf = EXEC_ALLOC(FILENAME_MAX, size, EXEC_FUNC_EXECVPE); ++#endif + { + int seen_small = 0; + s0 = buf + len; +@@ -300,8 +321,11 @@ int execvp(const char *path, char *const argv[]) + s[plen-1] = '/'; + } + ++#if defined (L_execvp) + execve(s, argv, __environ); +- ++#elif defined (L_execvpe) ++ execve(s, argv, envp); ++#endif + seen_small = 1; + + if (errno == ENOEXEC) { +@@ -325,7 +349,11 @@ int execvp(const char *path, char *const argv[]) + + return -1; + } ++#if defined (L_execvp) + libc_hidden_def(execvp) +- ++#elif defined (L_execvpe) ++libc_hidden_def(execvpe) + #endif ++ ++#endif /* #if defined (L_execvp) || defined(L_execvpe) */ + /**********************************************************************/ +diff --git a/libc/unistd/execvpe.c b/libc/unistd/execvpe.c +new file mode 100644 +index 0000000..c3c1e43 +--- /dev/null ++++ b/libc/unistd/execvpe.c +@@ -0,0 +1,7 @@ ++/* Copyright (C) 2011-2013 Hennning Heinold ++ * ++ * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball. ++ */ ++ ++#define L_execvpe ++#include "exec.c" +-- +1.8.1.5 + diff --git a/package/uclibc/0.9.32.1/uclibc-0008-libc-stdlib-add-mkostemp-helpers.patch b/package/uclibc/0.9.32.1/uclibc-0008-libc-stdlib-add-mkostemp-helpers.patch new file mode 100644 index 0000000000..80022408aa --- /dev/null +++ b/package/uclibc/0.9.32.1/uclibc-0008-libc-stdlib-add-mkostemp-helpers.patch @@ -0,0 +1,155 @@ +From 42d1b23fc0f3748b8bf474e456d6c44aa7e563fd Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Wed, 14 Nov 2012 00:30:54 -0500 +Subject: [PATCH] libc/stdlib: add mkostemp helpers + +Some projects (like udev) are starting to use this. + +Imported from glibc. + +Signed-off-by: Mike Frysinger +--- + include/stdlib.h | 23 +++++++++++++++++++++++ + libc/stdlib/Makefile.in | 4 ++-- + libc/stdlib/mkostemp.c | 32 ++++++++++++++++++++++++++++++++ + libc/stdlib/mkostemp64.c | 33 +++++++++++++++++++++++++++++++++ + 4 files changed, 90 insertions(+), 2 deletions(-) + create mode 100644 libc/stdlib/mkostemp.c + create mode 100644 libc/stdlib/mkostemp64.c + +diff --git a/include/stdlib.h b/include/stdlib.h +index 354fc66..79ccc55 100644 +--- a/include/stdlib.h ++++ b/include/stdlib.h +@@ -652,6 +652,29 @@ extern int mkstemp64 (char *__template) __nonnull ((1)) __wur; + extern char *mkdtemp (char *__template) __THROW __nonnull ((1)) __wur; + #endif + ++#ifdef __USE_GNU ++/* Generate a unique temporary file name from TEMPLATE similar to ++ mkstemp. But allow the caller to pass additional flags which are ++ used in the open call to create the file.. ++ ++ This function is a possible cancellation point and therefore not ++ marked with __THROW. */ ++# ifndef __USE_FILE_OFFSET64 ++extern int mkostemp (char *__template, int __flags) __nonnull ((1)) __wur; ++# else ++# ifdef __REDIRECT ++extern int __REDIRECT (mkostemp, (char *__template, int __flags), mkostemp64) ++ __nonnull ((1)) __wur; ++# else ++# define mkostemp mkostemp64 ++# endif ++# endif ++# ifdef __USE_LARGEFILE64 ++extern int mkostemp64 (char *__template, int __flags) __nonnull ((1)) __wur; ++# endif ++ ++#endif ++ + + __BEGIN_NAMESPACE_STD + /* Execute the given line as a shell command. +diff --git a/libc/stdlib/Makefile.in b/libc/stdlib/Makefile.in +index 3166b8e..b92f7ce 100644 +--- a/libc/stdlib/Makefile.in ++++ b/libc/stdlib/Makefile.in +@@ -12,7 +12,7 @@ include $(top_srcdir)libc/stdlib/malloc-simple/Makefile.in + include $(top_srcdir)libc/stdlib/malloc-standard/Makefile.in + + CSRC-y := \ +- abort.c getenv.c mkdtemp.c realpath.c canonicalize.c mkstemp.c \ ++ abort.c getenv.c mkdtemp.c realpath.c canonicalize.c mkstemp.c mkostemp.c \ + rand.c random.c random_r.c setenv.c div.c ldiv.c lldiv.c \ + getpt.c drand48-iter.c jrand48.c \ + jrand48_r.c lcong48.c lrand48.c lrand48_r.c mrand48.c mrand48_r.c nrand48.c \ +@@ -21,7 +21,7 @@ CSRC-y := \ + CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_memalign.c + CSRC-$(UCLIBC_HAS_PTY) += grantpt.c unlockpt.c ptsname.c + CSRC-$(UCLIBC_HAS_ARC4RANDOM) += arc4random.c +-CSRC-$(UCLIBC_HAS_LFS) += mkstemp64.c ++CSRC-$(UCLIBC_HAS_LFS) += mkstemp64.c mkostemp64.c + CSRC-$(UCLIBC_HAS_FLOATS) += drand48.c drand48_r.c erand48.c erand48_r.c + CSRC-$(if $(findstring yy,$(UCLIBC_HAS_FLOATS)$(UCLIBC_SUSV3_LEGACY)),y) += \ + gcvt.c +diff --git a/libc/stdlib/mkostemp.c b/libc/stdlib/mkostemp.c +new file mode 100644 +index 0000000..93b50fc +--- /dev/null ++++ b/libc/stdlib/mkostemp.c +@@ -0,0 +1,32 @@ ++/* Copyright (C) 1998-2012 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include "../misc/internals/tempname.h" ++ ++/* Generate a unique temporary file name from TEMPLATE. ++ The last six characters of TEMPLATE must be "XXXXXX"; ++ they are replaced with a string that makes the filename unique. ++ Then open the file and return a fd. */ ++int ++mkostemp (template, flags) ++ char *template; ++ int flags; ++{ ++ return __gen_tempname (template, __GT_FILE, flags); ++} +diff --git a/libc/stdlib/mkostemp64.c b/libc/stdlib/mkostemp64.c +new file mode 100644 +index 0000000..5509d8c +--- /dev/null ++++ b/libc/stdlib/mkostemp64.c +@@ -0,0 +1,33 @@ ++/* Copyright (C) 2000-2012 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include "../misc/internals/tempname.h" ++ ++/* Generate a unique temporary file name from TEMPLATE. ++ The last six characters of TEMPLATE must be "XXXXXX"; ++ they are replaced with a string that makes the filename unique. ++ Then open the file and return a fd. */ ++int ++mkostemp64 (template, flags) ++ char *template; ++ int flags; ++{ ++ return __gen_tempname (template, __GT_BIGFILE, flags | O_LARGEFILE); ++} +-- +1.8.1.5 + diff --git a/package/uclibc/0.9.33-arc/fix-fstat-for-be.patch b/package/uclibc/0.9.33-arc/fix-fstat-for-be.patch new file mode 100644 index 0000000000..2cdb517b68 --- /dev/null +++ b/package/uclibc/0.9.33-arc/fix-fstat-for-be.patch @@ -0,0 +1,32 @@ +From f394d65c74631a0e715bac582b09c302ee84114f Mon Sep 17 00:00:00 2001 +From: Mischa Jonker +Date: Tue, 23 Jul 2013 17:59:04 +0200 +Subject: [PATCH] libc/sysdeps: Fix common-generic stat.h for BE part 2 + +Previous patch only fixed the build. This patch fixes the behavior at +run-time as well. + +It fixes "Value too large for defined data type" messages caused by +fstat syscall wrapper returning -EOVERFLOW. + +Signed-off-by: Mischa Jonker +--- + libc/sysdeps/linux/common-generic/bits/stat.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libc/sysdeps/linux/common-generic/bits/stat.h b/libc/sysdeps/linux/common-generic/bits/stat.h +index 07716ab..945c408 100644 +--- a/libc/sysdeps/linux/common-generic/bits/stat.h ++++ b/libc/sysdeps/linux/common-generic/bits/stat.h +@@ -63,8 +63,8 @@ struct stat + unsigned long long __pad4; + long __pad5; + long st_size; /* Size of file, in bytes. */ +- int __pad6; + int st_blksize; /* Optimal block size for I/O. */ ++ int __pad6; + long __pad7; + long st_blocks; /* Number 512-byte blocks allocated */ + # endif /* __LITTLE_ENDIAN */ +-- +1.7.9.5 diff --git a/package/uclibc/0.9.33-arc/fix-susv3-legacy-bcmp.patch b/package/uclibc/0.9.33-arc/fix-susv3-legacy-bcmp.patch new file mode 100644 index 0000000000..e0884ea7bc --- /dev/null +++ b/package/uclibc/0.9.33-arc/fix-susv3-legacy-bcmp.patch @@ -0,0 +1,37 @@ +From 0594ba53b9b8d9a1ac409fd187e4d1ba8f2e7f2a Mon Sep 17 00:00:00 2001 +From: Vineet Gupta +Date: Thu, 8 Aug 2013 15:41:51 +0530 +Subject: [PATCH] ARC: SuSv3 legacy support: Add "bcmp" alias for memcmp + +Although uClibc provides this already as UCLIBC_SUSV3_LEGACY_MACROS, +that however requires UCLIBC_SUSV3_LEGACY to be switched off, causing a +bunch of other things to be not available (usleep) + +Signed-off-by: Vineet Gupta +--- + libc/string/arc/memcmp.S | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/libc/string/arc/memcmp.S b/libc/string/arc/memcmp.S +index 0c7c345..cb25990 100644 +--- a/libc/string/arc/memcmp.S ++++ b/libc/string/arc/memcmp.S +@@ -1,6 +1,7 @@ + /* Copyright (C) 2007 ARC International (UK) LTD */ + + #include ++#include + + #ifdef __LITTLE_ENDIAN__ + #define WORD2 r2 +@@ -115,3 +116,7 @@ ENTRY(memcmp) + j_s.d [blink] + mov r0,0 + ENDFUNC(memcmp) ++ ++#ifdef __UCLIBC_SUSV3_LEGACY__ ++strong_alias(memcmp,bcmp) ++#endif +-- +1.8.1.2 + diff --git a/package/uclibc/0.9.33-arc/fix-susv3-legacy.patch b/package/uclibc/0.9.33-arc/fix-susv3-legacy.patch new file mode 100644 index 0000000000..a768024dc7 --- /dev/null +++ b/package/uclibc/0.9.33-arc/fix-susv3-legacy.patch @@ -0,0 +1,36 @@ +From 3124ace804337d32974392e0a73a09cdc0d60fc8 Mon Sep 17 00:00:00 2001 +From: Mischa Jonker +Date: Mon, 15 Jul 2013 13:06:11 +0200 +Subject: [PATCH] ARC: Add alias 'index' to strcmp for susv3 legacy + compatibility + +This fixes build errors for 'keyutils' + +Signed-off-by: Mischa Jonker +--- + libc/string/arc/strchr.S | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/libc/string/arc/strchr.S b/libc/string/arc/strchr.S +index b9f28c0..8d51aa4 100644 +--- a/libc/string/arc/strchr.S ++++ b/libc/string/arc/strchr.S +@@ -1,6 +1,7 @@ + /* Copyright (C) 2007 ARC International (UK) LTD */ + + #include ++#include + + /* ARC700 has a relatively long pipeline and branch prediction, so we want + to avoid branches that are hard to predict. On the other hand, the +@@ -115,3 +116,7 @@ ENTRY(strchr) + mov.mi r0,0 + #endif /* ENDIAN */ + ENDFUNC(strchr) ++ ++#ifdef __UCLIBC_SUSV3_LEGACY__ ++strong_alias(strchr,index) ++#endif +-- +1.7.9.5 + diff --git a/package/uclibc/0.9.33-arc/uclibc-arc-add-__kernel_long.patch b/package/uclibc/0.9.33-arc/uclibc-arc-add-__kernel_long.patch new file mode 100644 index 0000000000..caebac145a --- /dev/null +++ b/package/uclibc/0.9.33-arc/uclibc-arc-add-__kernel_long.patch @@ -0,0 +1,29 @@ +From 5164fb28e9205626211d0436933e6eb4960be582 Mon Sep 17 00:00:00 2001 +From: Mischa Jonker +Date: Wed, 10 Jul 2013 09:05:25 +0200 +Subject: [PATCH] ARC: libc/sysdeps: add __kernel_long and __kernel_ulong + +Linux 3.4 added these two types and updated various exported header +files to use them. While other architectures were updated before, +this was not the case for ARC. + +This fixes the build failure with Linux 3.10 headers. + +Signed-off-by: Mischa Jonker +--- + libc/sysdeps/linux/arc/bits/kernel_types.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libc/sysdeps/linux/arc/bits/kernel_types.h b/libc/sysdeps/linux/arc/bits/kernel_types.h +index fd52e1c..fc28fa1 100755 +--- a/libc/sysdeps/linux/arc/bits/kernel_types.h ++++ b/libc/sysdeps/linux/arc/bits/kernel_types.h +@@ -39,6 +39,8 @@ typedef __kernel_uid_t __kernel_old_uid_t; + typedef __kernel_gid_t __kernel_old_gid_t; + typedef long long __kernel_loff_t; + typedef unsigned int __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + #ifdef __USE_ALL diff --git a/package/uclibc/0.9.33.2/uclibc-0001-bits-time.h-sync-with-glibc-2.16.patch b/package/uclibc/0.9.33.2/uclibc-0001-bits-time.h-sync-with-glibc-2.16.patch new file mode 100644 index 0000000000..d93df6d748 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0001-bits-time.h-sync-with-glibc-2.16.patch @@ -0,0 +1,37 @@ +From bb08cd16cb0353b3d4116ca8959dbecd2e78f545 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Tue, 3 Jul 2012 15:54:57 +0200 +Subject: [PATCH 1/8] bits/time.h: sync with glibc 2.16 + +CLOCK_MONOTONIC_RAW is available since 2.6.28 +(2d42244ae71d: clocksource: introduce CLOCK_MONOTONIC_RAW), and +CLOCK_*_COARSE since 2.6.32 (da15cfdae033: time: Introduce +CLOCK_REALTIME_COARSE). + +Signed-off-by: Peter Korsgaard +Signed-off-by: Bernhard Reutner-Fischer +Signed-off-by: Thomas Petazzoni +--- + libc/sysdeps/linux/common/bits/time.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/libc/sysdeps/linux/common/bits/time.h b/libc/sysdeps/linux/common/bits/time.h +index 7ed54bf..c871223 100644 +--- a/libc/sysdeps/linux/common/bits/time.h ++++ b/libc/sysdeps/linux/common/bits/time.h +@@ -54,6 +54,12 @@ + # define CLOCK_PROCESS_CPUTIME_ID 2 + /* Thread-specific CPU-time clock. */ + # define CLOCK_THREAD_CPUTIME_ID 3 ++/* Monotonic system-wide clock, not adjusted for frequency scaling. */ ++# define CLOCK_MONOTONIC_RAW 4 ++/* Identifier for system-wide realtime clock, updated only on ticks. */ ++# define CLOCK_REALTIME_COARSE 5 ++/* Monotonic system-wide clock, updated only on ticks. */ ++# define CLOCK_MONOTONIC_COARSE 6 + + /* Flag to indicate time is absolute. */ + # define TIMER_ABSTIME 1 +-- +1.8.1.2 + diff --git a/package/uclibc/0.9.33.2/uclibc-0003-Add-dup3-syscall.patch b/package/uclibc/0.9.33.2/uclibc-0003-Add-dup3-syscall.patch new file mode 100644 index 0000000000..663b0e1bca --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0003-Add-dup3-syscall.patch @@ -0,0 +1,54 @@ +From 518bc50ae42540574bba360225c8a65b56b79148 Mon Sep 17 00:00:00 2001 +From: Jonas Bonn +Date: Tue, 6 Sep 2011 10:30:40 +0200 +Subject: [PATCH 3/8] Add dup3 syscall + +Signed-off-by: Jonas Bonn +Signed-off-by: Thomas Petazzoni +--- + include/unistd.h | 4 ++++ + libc/sysdeps/linux/common/dup3.c | 17 +++++++++++++++++ + 2 files changed, 21 insertions(+) + create mode 100644 libc/sysdeps/linux/common/dup3.c + +diff --git a/include/unistd.h b/include/unistd.h +index 1b2fd4d..f7d070b 100644 +--- a/include/unistd.h ++++ b/include/unistd.h +@@ -513,6 +513,10 @@ extern int dup (int __fd) __THROW __wur; + extern int dup2 (int __fd, int __fd2) __THROW; + libc_hidden_proto(dup2) + ++/* Duplicate FD to FD2, closing FD2 and making it open on the same file. */ ++extern int dup3 (int __fd, int __fd2, int __flags) __THROW; ++libc_hidden_proto(dup3) ++ + /* NULL-terminated array of "NAME=VALUE" environment variables. */ + extern char **__environ; + #ifdef __USE_GNU +diff --git a/libc/sysdeps/linux/common/dup3.c b/libc/sysdeps/linux/common/dup3.c +new file mode 100644 +index 0000000..7b57438 +--- /dev/null ++++ b/libc/sysdeps/linux/common/dup3.c +@@ -0,0 +1,17 @@ ++/* vi: set sw=4 ts=4: */ ++/* ++ * dup3() for uClibc ++ * ++ * Copyright (C) 2000-2006 Erik Andersen ++ * ++ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. ++ */ ++ ++#include ++#include ++ ++ ++#ifdef __NR_dup3 ++_syscall3(int, dup3, int, oldfd, int, newfd, int, flags) ++libc_hidden_def(dup3) ++#endif +-- +1.8.1.2 + diff --git a/package/uclibc/0.9.33.2/uclibc-0004-libc-sysdeps-add-__kernel_long-and-__kernel_ulong.patch b/package/uclibc/0.9.33.2/uclibc-0004-libc-sysdeps-add-__kernel_long-and-__kernel_ulong.patch new file mode 100644 index 0000000000..0381ba8013 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0004-libc-sysdeps-add-__kernel_long-and-__kernel_ulong.patch @@ -0,0 +1,393 @@ +From 7fef6b983456e4c529a5239ea90715050e6f4452 Mon Sep 17 00:00:00 2001 +From: Chris Packham +Date: Mon, 1 Oct 2012 18:12:54 +1300 +Subject: [PATCH 4/8] libc/sysdeps: add __kernel_long and __kernel_ulong + +Linux 3.4 added __kernel_long_t and __kernel_ulong_t and various +exported header files were updated to use these new types. Add the +definitions for __kernel_long_t and __kernel_ulong_t to the relevant +kernel_types.h headers. + +This change was automated with the following scriptlet + + git grep --name-only 'typedef.*__kernel_old_dev_t' \ + | xargs sed -i '/typedef.*__kernel_old_dev_t/ a\ + typedef long\t\t__kernel_long_t;\ + typedef unsigned long\t__kernel_ulong_t;' + +Whitespace in arm, avr32, hppa, sparc was then manually fixed up. + +Signed-off-by: Chris Packham +-- +Here's a cleaned up patch which should get the whitespace right. I'm a +bit iffy about the sparc changes they make sense to me but it's not a +platform I have access to. + +I can break this up per arch or per maintainer if requested. + + libc/sysdeps/linux/alpha/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/arm/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/avr32/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/bfin/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/c6x/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/cris/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/e1/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/h8300/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/hppa/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/i386/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/ia64/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/m68k/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/microblaze/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/mips/bits/kernel_types.h | 4 ++++ + libc/sysdeps/linux/nios2/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/powerpc/bits/kernel_types.h | 4 ++++ + libc/sysdeps/linux/sh/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/sh64/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/sparc/bits/kernel_types.h | 4 ++++ + libc/sysdeps/linux/v850/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/x86_64/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/xtensa/bits/kernel_types.h | 2 ++ + 22 files changed, 50 insertions(+) +Signed-off-by: Bernhard Reutner-Fischer +Signed-off-by: Gustavo Zacarias +Signed-off-by: Thomas Petazzoni +--- + libc/sysdeps/linux/alpha/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/arm/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/avr32/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/bfin/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/c6x/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/cris/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/e1/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/h8300/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/hppa/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/i386/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/ia64/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/m68k/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/microblaze/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/mips/bits/kernel_types.h | 4 ++++ + libc/sysdeps/linux/nios2/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/powerpc/bits/kernel_types.h | 4 ++++ + libc/sysdeps/linux/sh/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/sh64/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/sparc/bits/kernel_types.h | 4 ++++ + libc/sysdeps/linux/v850/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/x86_64/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/xtensa/bits/kernel_types.h | 2 ++ + 22 files changed, 50 insertions(+) + +diff --git a/libc/sysdeps/linux/alpha/bits/kernel_types.h b/libc/sysdeps/linux/alpha/bits/kernel_types.h +index d5574c9..cd59b9d 100644 +--- a/libc/sysdeps/linux/alpha/bits/kernel_types.h ++++ b/libc/sysdeps/linux/alpha/bits/kernel_types.h +@@ -33,6 +33,8 @@ typedef __kernel_gid_t __kernel_old_gid_t; + typedef __kernel_uid_t __kernel_uid32_t; + typedef __kernel_gid_t __kernel_gid32_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + int val[2]; +diff --git a/libc/sysdeps/linux/arm/bits/kernel_types.h b/libc/sysdeps/linux/arm/bits/kernel_types.h +index 766a306..6b36f32 100644 +--- a/libc/sysdeps/linux/arm/bits/kernel_types.h ++++ b/libc/sysdeps/linux/arm/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef long long __kernel_loff_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + #ifdef __USE_ALL +diff --git a/libc/sysdeps/linux/avr32/bits/kernel_types.h b/libc/sysdeps/linux/avr32/bits/kernel_types.h +index f7d8b52..c551d57 100644 +--- a/libc/sysdeps/linux/avr32/bits/kernel_types.h ++++ b/libc/sysdeps/linux/avr32/bits/kernel_types.h +@@ -39,6 +39,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef unsigned short __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + #ifdef __GNUC__ + typedef long long __kernel_loff_t; +diff --git a/libc/sysdeps/linux/bfin/bits/kernel_types.h b/libc/sysdeps/linux/bfin/bits/kernel_types.h +index d69a875..9fec595 100644 +--- a/libc/sysdeps/linux/bfin/bits/kernel_types.h ++++ b/libc/sysdeps/linux/bfin/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef long long __kernel_loff_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + #ifdef __USE_ALL +diff --git a/libc/sysdeps/linux/c6x/bits/kernel_types.h b/libc/sysdeps/linux/c6x/bits/kernel_types.h +index 7557309..2c363a8 100644 +--- a/libc/sysdeps/linux/c6x/bits/kernel_types.h ++++ b/libc/sysdeps/linux/c6x/bits/kernel_types.h +@@ -22,6 +22,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned int __kernel_old_uid_t; + typedef unsigned int __kernel_old_gid_t; + typedef unsigned int __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef unsigned int __kernel_size_t; + typedef int __kernel_ssize_t; + typedef int __kernel_ptrdiff_t; +diff --git a/libc/sysdeps/linux/cris/bits/kernel_types.h b/libc/sysdeps/linux/cris/bits/kernel_types.h +index f122c7f..5d31f7b 100644 +--- a/libc/sysdeps/linux/cris/bits/kernel_types.h ++++ b/libc/sysdeps/linux/cris/bits/kernel_types.h +@@ -28,6 +28,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + #ifdef __GNUC__ + typedef long long __kernel_loff_t; +diff --git a/libc/sysdeps/linux/e1/bits/kernel_types.h b/libc/sysdeps/linux/e1/bits/kernel_types.h +index 8017d85..f55a129 100644 +--- a/libc/sysdeps/linux/e1/bits/kernel_types.h ++++ b/libc/sysdeps/linux/e1/bits/kernel_types.h +@@ -31,6 +31,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + /* +diff --git a/libc/sysdeps/linux/h8300/bits/kernel_types.h b/libc/sysdeps/linux/h8300/bits/kernel_types.h +index 0570675..4cfd1bf 100644 +--- a/libc/sysdeps/linux/h8300/bits/kernel_types.h ++++ b/libc/sysdeps/linux/h8300/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef long long __kernel_loff_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + #ifdef __USE_ALL +diff --git a/libc/sysdeps/linux/hppa/bits/kernel_types.h b/libc/sysdeps/linux/hppa/bits/kernel_types.h +index 4441f9b..6b2e794 100644 +--- a/libc/sysdeps/linux/hppa/bits/kernel_types.h ++++ b/libc/sysdeps/linux/hppa/bits/kernel_types.h +@@ -45,6 +45,8 @@ typedef long long __kernel_off64_t; + typedef unsigned long long __kernel_ino64_t; + + typedef unsigned int __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + #ifdef __USE_ALL +diff --git a/libc/sysdeps/linux/i386/bits/kernel_types.h b/libc/sysdeps/linux/i386/bits/kernel_types.h +index 9c07c72..59044b8 100644 +--- a/libc/sysdeps/linux/i386/bits/kernel_types.h ++++ b/libc/sysdeps/linux/i386/bits/kernel_types.h +@@ -40,6 +40,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + typedef struct { +diff --git a/libc/sysdeps/linux/ia64/bits/kernel_types.h b/libc/sysdeps/linux/ia64/bits/kernel_types.h +index c8ef86d..e31dc65 100644 +--- a/libc/sysdeps/linux/ia64/bits/kernel_types.h ++++ b/libc/sysdeps/linux/ia64/bits/kernel_types.h +@@ -52,5 +52,7 @@ typedef __kernel_gid_t __kernel_gid32_t; + + typedef unsigned int __kernel_dev_t; + typedef unsigned int __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + #endif /* _ASM_IA64_POSIX_TYPES_H */ +diff --git a/libc/sysdeps/linux/m68k/bits/kernel_types.h b/libc/sysdeps/linux/m68k/bits/kernel_types.h +index 0a77a8f..176b968 100644 +--- a/libc/sysdeps/linux/m68k/bits/kernel_types.h ++++ b/libc/sysdeps/linux/m68k/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef long long __kernel_loff_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + #ifdef __USE_ALL +diff --git a/libc/sysdeps/linux/microblaze/bits/kernel_types.h b/libc/sysdeps/linux/microblaze/bits/kernel_types.h +index 2a70575..a9f736b 100644 +--- a/libc/sysdeps/linux/microblaze/bits/kernel_types.h ++++ b/libc/sysdeps/linux/microblaze/bits/kernel_types.h +@@ -44,6 +44,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned int __kernel_old_uid_t; + typedef unsigned int __kernel_old_gid_t; + typedef unsigned int __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + #ifdef __GNUC__ + typedef long long __kernel_loff_t; +diff --git a/libc/sysdeps/linux/mips/bits/kernel_types.h b/libc/sysdeps/linux/mips/bits/kernel_types.h +index 9fc3b96..97faeac 100644 +--- a/libc/sysdeps/linux/mips/bits/kernel_types.h ++++ b/libc/sysdeps/linux/mips/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef int __kernel_gid32_t; + typedef __kernel_uid_t __kernel_old_uid_t; + typedef __kernel_gid_t __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + #else + typedef unsigned int __kernel_dev_t; +@@ -68,6 +70,8 @@ typedef int __kernel_gid32_t; + typedef __kernel_uid_t __kernel_old_uid_t; + typedef __kernel_gid_t __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + #endif + +diff --git a/libc/sysdeps/linux/nios2/bits/kernel_types.h b/libc/sysdeps/linux/nios2/bits/kernel_types.h +index 8b86d79..3c030e7 100644 +--- a/libc/sysdeps/linux/nios2/bits/kernel_types.h ++++ b/libc/sysdeps/linux/nios2/bits/kernel_types.h +@@ -31,6 +31,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef unsigned short __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + typedef struct { +diff --git a/libc/sysdeps/linux/powerpc/bits/kernel_types.h b/libc/sysdeps/linux/powerpc/bits/kernel_types.h +index 3f3b933..1167de2 100644 +--- a/libc/sysdeps/linux/powerpc/bits/kernel_types.h ++++ b/libc/sysdeps/linux/powerpc/bits/kernel_types.h +@@ -36,6 +36,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned int __kernel_old_uid_t; + typedef unsigned int __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + #else + typedef unsigned int __kernel_dev_t; + typedef unsigned int __kernel_ino_t; +@@ -61,6 +63,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned int __kernel_old_uid_t; + typedef unsigned int __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + #endif + +diff --git a/libc/sysdeps/linux/sh/bits/kernel_types.h b/libc/sysdeps/linux/sh/bits/kernel_types.h +index f96e9fa..ac97261 100644 +--- a/libc/sysdeps/linux/sh/bits/kernel_types.h ++++ b/libc/sysdeps/linux/sh/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + typedef struct { +diff --git a/libc/sysdeps/linux/sh64/bits/kernel_types.h b/libc/sysdeps/linux/sh64/bits/kernel_types.h +index 671cc83..8cc6c61 100644 +--- a/libc/sysdeps/linux/sh64/bits/kernel_types.h ++++ b/libc/sysdeps/linux/sh64/bits/kernel_types.h +@@ -43,6 +43,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + typedef struct { +diff --git a/libc/sysdeps/linux/sparc/bits/kernel_types.h b/libc/sysdeps/linux/sparc/bits/kernel_types.h +index 0cc4bc2..a10e075 100644 +--- a/libc/sysdeps/linux/sparc/bits/kernel_types.h ++++ b/libc/sysdeps/linux/sparc/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef unsigned short __kernel_gid16_t; + typedef __kernel_uid_t __kernel_old_uid_t; + typedef __kernel_gid_t __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef __kernel_uid_t __kernel_uid32_t; + typedef __kernel_gid_t __kernel_gid32_t; + typedef int __kernel_suseconds_t; +@@ -62,6 +64,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + #endif + +diff --git a/libc/sysdeps/linux/v850/bits/kernel_types.h b/libc/sysdeps/linux/v850/bits/kernel_types.h +index 3e851ab..780aa8a 100644 +--- a/libc/sysdeps/linux/v850/bits/kernel_types.h ++++ b/libc/sysdeps/linux/v850/bits/kernel_types.h +@@ -41,6 +41,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + #ifdef __USE_ALL +diff --git a/libc/sysdeps/linux/x86_64/bits/kernel_types.h b/libc/sysdeps/linux/x86_64/bits/kernel_types.h +index de800d7..0cae08c 100644 +--- a/libc/sysdeps/linux/x86_64/bits/kernel_types.h ++++ b/libc/sysdeps/linux/x86_64/bits/kernel_types.h +@@ -40,6 +40,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + typedef struct { +diff --git a/libc/sysdeps/linux/xtensa/bits/kernel_types.h b/libc/sysdeps/linux/xtensa/bits/kernel_types.h +index 44f1075..ed38f2e 100644 +--- a/libc/sysdeps/linux/xtensa/bits/kernel_types.h ++++ b/libc/sysdeps/linux/xtensa/bits/kernel_types.h +@@ -33,6 +33,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef unsigned short __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + /* Beginning in 2.6 kernels, which is the first version that includes the +-- +1.8.1.2 + diff --git a/package/uclibc/0.9.33.2/uclibc-0005-Patch-from-OpenWRT-for-avr32.patch b/package/uclibc/0.9.33.2/uclibc-0005-Patch-from-OpenWRT-for-avr32.patch new file mode 100644 index 0000000000..9b6be2b78e --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0005-Patch-from-OpenWRT-for-avr32.patch @@ -0,0 +1,28 @@ +From b0bbb35065e1c8fdd308573f38eed35c30760d87 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 13 Jul 2013 17:14:49 +0200 +Subject: [PATCH 5/8] Patch from OpenWRT for avr32. + +https://dev.openwrt.org/browser/trunk/toolchain/uClibc/patches-0.9.32/140-avr32_atomic_fix.patch + +Signed-off-by: Simon Dawson +Signed-off-by: Thomas Petazzoni +--- + libc/sysdeps/linux/avr32/bits/atomic.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libc/sysdeps/linux/avr32/bits/atomic.h b/libc/sysdeps/linux/avr32/bits/atomic.h +index e6be41f..3bc2aee 100644 +--- a/libc/sysdeps/linux/avr32/bits/atomic.h ++++ b/libc/sysdeps/linux/avr32/bits/atomic.h +@@ -28,6 +28,7 @@ typedef uintmax_t uatomic_max_t; + + #define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ + ({ \ ++ __uint32_t __result; \ + __typeof__(*(mem)) __prev; \ + __asm__ __volatile__( \ + "/* __arch_compare_and_exchange_val_32_acq */\n" \ +-- +1.8.1.2 + diff --git a/package/uclibc/0.9.33.2/uclibc-0006-arm-clone-restore-stack-pointer-just-after-return-fr.patch b/package/uclibc/0.9.33.2/uclibc-0006-arm-clone-restore-stack-pointer-just-after-return-fr.patch new file mode 100644 index 0000000000..de97850826 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0006-arm-clone-restore-stack-pointer-just-after-return-fr.patch @@ -0,0 +1,42 @@ +From 963671276c0ef14458e0a7990107bcd2c075f3cd Mon Sep 17 00:00:00 2001 +From: Filippo Arcidiacono +Date: Mon, 10 Dec 2012 09:50:52 +0100 +Subject: [PATCH 6/8] arm: clone: restore stack pointer just after return from + syscall + +If the syscall returns with an error the stack pointer and r4 register +are not restored because the instruction 'ldmnefd sp!, {r4}' is executed +after branching to '__error' label. +This bug has been spotted out by running './utstest clone 5' from LTP +built with -fstack-protector-all compiler flag as log below: + +root@cortex-a9:/usr/tests/ltp/testcases/bin# ./utstest clone 5 +stack smashing detected: ./utstest terminated() + +Regression introduced by commit e58798e107d652644629a1daaa95d76430808d53 + +Signed-off-by: Filippo Arcidiacono +Signed-off-by: Giuseppe Di Giore +Signed-off-by: Carmelo Amoroso +Signed-off-by: Thomas Petazzoni +--- + libc/sysdeps/linux/arm/clone.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libc/sysdeps/linux/arm/clone.S b/libc/sysdeps/linux/arm/clone.S +index fdc05b8..e4101ba 100644 +--- a/libc/sysdeps/linux/arm/clone.S ++++ b/libc/sysdeps/linux/arm/clone.S +@@ -111,8 +111,8 @@ __clone: + ldr r4, [sp, #12] + DO_CALL (clone) + movs a1, a1 +- blt __error + ldmnefd sp!, {r4} ++ blt __error + IT(t, ne) + #if defined(__USE_BX__) + bxne lr +-- +1.8.1.2 + diff --git a/package/uclibc/0.9.33.2/uclibc-0007-arm-clone.S-Add-missing-IT-instruction-for-Thumb2.patch b/package/uclibc/0.9.33.2/uclibc-0007-arm-clone.S-Add-missing-IT-instruction-for-Thumb2.patch new file mode 100644 index 0000000000..f4097e98ca --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0007-arm-clone.S-Add-missing-IT-instruction-for-Thumb2.patch @@ -0,0 +1,29 @@ +From c12211a2f1832169e31063512b3e2081e503e856 Mon Sep 17 00:00:00 2001 +From: Will Newton +Date: Tue, 2 Apr 2013 13:53:35 +0100 +Subject: [PATCH 7/8] arm/clone.S: Add missing IT instruction for Thumb2. + +The conditional load needs to be made part of an IT block on Thumb2 +cores. + +Signed-off-by: Will Newton +Signed-off-by: Thomas Petazzoni +--- + libc/sysdeps/linux/arm/clone.S | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libc/sysdeps/linux/arm/clone.S b/libc/sysdeps/linux/arm/clone.S +index e4101ba..1f7f09d 100644 +--- a/libc/sysdeps/linux/arm/clone.S ++++ b/libc/sysdeps/linux/arm/clone.S +@@ -111,6 +111,7 @@ __clone: + ldr r4, [sp, #12] + DO_CALL (clone) + movs a1, a1 ++ IT(t, ne) + ldmnefd sp!, {r4} + blt __error + IT(t, ne) +-- +1.8.1.2 + diff --git a/package/uclibc/0.9.33.2/uclibc-0008-arm-move-check-for-BX-to-its-own-header.patch b/package/uclibc/0.9.33.2/uclibc-0008-arm-move-check-for-BX-to-its-own-header.patch new file mode 100644 index 0000000000..c3031b418b --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0008-arm-move-check-for-BX-to-its-own-header.patch @@ -0,0 +1,257 @@ +From 06827e81c976d16aa5861a40ac0d780b63a4d470 Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" +Date: Thu, 11 Apr 2013 23:02:03 +0200 +Subject: [PATCH 8/8] arm: move check for BX to its own header + +As Will noticed, the header this check is currently done in +is asm-only, and is not meant to be included from C code. +This breaks compilation when compiled for a Thumb2-aware CPU. + +Move the BX check to its own header, and revert 7a246fd. + +Reported-by: Will Newton +Signed-off-by: "Yann E. MORIN" +Cc: Will Newton +Signed-off-by: Thomas Petazzoni +--- + ldso/ldso/arm/dl-startup.h | 2 +- + ldso/ldso/arm/resolve.S | 1 + + libc/string/arm/_memcpy.S | 1 + + libc/string/arm/memcmp.S | 1 + + libc/string/arm/memset.S | 1 + + libc/string/arm/strcmp.S | 1 + + libc/string/arm/strlen.S | 1 + + libc/sysdeps/linux/arm/__longjmp.S | 2 +- + libc/sysdeps/linux/arm/bits/arm_asm.h | 8 -------- + libc/sysdeps/linux/arm/bits/arm_bx.h | 34 ++++++++++++++++++++++++++++++++++ + libc/sysdeps/linux/arm/clone.S | 1 + + libc/sysdeps/linux/arm/mmap64.S | 1 + + libc/sysdeps/linux/arm/syscall-eabi.S | 1 + + libc/sysdeps/linux/arm/sysdep.h | 2 +- + libc/sysdeps/linux/arm/vfork.S | 1 + + 15 files changed, 47 insertions(+), 11 deletions(-) + create mode 100644 libc/sysdeps/linux/arm/bits/arm_bx.h + +diff --git a/ldso/ldso/arm/dl-startup.h b/ldso/ldso/arm/dl-startup.h +index f7d6052..8d6122b 100644 +--- a/ldso/ldso/arm/dl-startup.h ++++ b/ldso/ldso/arm/dl-startup.h +@@ -7,7 +7,7 @@ + */ + + #include +-#include ++#include + + #if !defined(__thumb__) + __asm__( +diff --git a/ldso/ldso/arm/resolve.S b/ldso/ldso/arm/resolve.S +index 08889d0..600d3af 100644 +--- a/ldso/ldso/arm/resolve.S ++++ b/ldso/ldso/arm/resolve.S +@@ -92,6 +92,7 @@ + + #include + #include ++#include + + #include + +diff --git a/libc/string/arm/_memcpy.S b/libc/string/arm/_memcpy.S +index b26080d..c59f5b8 100644 +--- a/libc/string/arm/_memcpy.S ++++ b/libc/string/arm/_memcpy.S +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + + #if !defined(THUMB1_ONLY) + /* +diff --git a/libc/string/arm/memcmp.S b/libc/string/arm/memcmp.S +index 65409f4..9f78415 100644 +--- a/libc/string/arm/memcmp.S ++++ b/libc/string/arm/memcmp.S +@@ -31,6 +31,7 @@ + + #include + #include ++#include + + .text + .global memcmp +diff --git a/libc/string/arm/memset.S b/libc/string/arm/memset.S +index 66aa603..6f78128 100644 +--- a/libc/string/arm/memset.S ++++ b/libc/string/arm/memset.S +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + .text + .global memset +diff --git a/libc/string/arm/strcmp.S b/libc/string/arm/strcmp.S +index 97363c1..8b77ab0 100644 +--- a/libc/string/arm/strcmp.S ++++ b/libc/string/arm/strcmp.S +@@ -31,6 +31,7 @@ + + #include + #include ++#include + + .text + .global strcmp +diff --git a/libc/string/arm/strlen.S b/libc/string/arm/strlen.S +index 949e918..141f849 100644 +--- a/libc/string/arm/strlen.S ++++ b/libc/string/arm/strlen.S +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + + /* size_t strlen(const char *S) + * entry: r0 -> string +diff --git a/libc/sysdeps/linux/arm/__longjmp.S b/libc/sysdeps/linux/arm/__longjmp.S +index 5faf4ec..7418dc2 100644 +--- a/libc/sysdeps/linux/arm/__longjmp.S ++++ b/libc/sysdeps/linux/arm/__longjmp.S +@@ -19,11 +19,11 @@ + + #include + #include ++#include + #define _SETJMP_H + #define _ASM + #include + +- + .global __longjmp + .type __longjmp,%function + .align 2 +diff --git a/libc/sysdeps/linux/arm/bits/arm_asm.h b/libc/sysdeps/linux/arm/bits/arm_asm.h +index 921c9a3..ff8ea92 100644 +--- a/libc/sysdeps/linux/arm/bits/arm_asm.h ++++ b/libc/sysdeps/linux/arm/bits/arm_asm.h +@@ -24,12 +24,4 @@ + #define THUMB1_ONLY 1 + #endif + +-#if defined(__USE_BX__) +-# if ( defined (__ARM_ARCH_2__) || defined (__ARM_ARCH_3__) \ +- || defined (__ARM_ARCH_3M__) || defined (__ARM_ARCH_4__) \ +- ) +-# error Use of BX was requested, but is not available on the target processor. +-# endif /* ARCH level */ +-#endif /* __USE_BX__ */ +- + #endif /* _ARM_ASM_H */ +diff --git a/libc/sysdeps/linux/arm/bits/arm_bx.h b/libc/sysdeps/linux/arm/bits/arm_bx.h +new file mode 100644 +index 0000000..321490e +--- /dev/null ++++ b/libc/sysdeps/linux/arm/bits/arm_bx.h +@@ -0,0 +1,34 @@ ++/* Copyright (C) 2013 Yann E. MORIN ++ * ++ * This file is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU Lesser General Public License as ++ * published by the Free Software Foundation; either version 2.1 of ++ * the License, or (at your option) any later version. ++ * ++ * This file is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with the GNU C Library; if not, see ++ * . ++ */ ++ ++#ifndef _ARM_BX_H ++#define _ARM_BX_H ++ ++/* We need features.h first */ ++#if !defined _FEATURES_H ++#error Please include features.h first ++#endif /* features.h not yet included */ ++ ++#if defined(__USE_BX__) ++# if ( defined (__ARM_ARCH_2__) || defined (__ARM_ARCH_3__) \ ++ || defined (__ARM_ARCH_3M__) || defined (__ARM_ARCH_4__) \ ++ ) ++# error Use of BX was requested, but is not available on the target processor. ++# endif /* ARCH level */ ++#endif /* __USE_BX__ */ ++ ++#endif /* _ARM_BX_H */ +diff --git a/libc/sysdeps/linux/arm/clone.S b/libc/sysdeps/linux/arm/clone.S +index 1f7f09d..4d646be 100644 +--- a/libc/sysdeps/linux/arm/clone.S ++++ b/libc/sysdeps/linux/arm/clone.S +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #if defined(__NR_clone) + /* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */ +diff --git a/libc/sysdeps/linux/arm/mmap64.S b/libc/sysdeps/linux/arm/mmap64.S +index 7071541..bd2cfb8 100644 +--- a/libc/sysdeps/linux/arm/mmap64.S ++++ b/libc/sysdeps/linux/arm/mmap64.S +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + + #if defined __UCLIBC_HAS_LFS__ && defined __NR_mmap2 + +diff --git a/libc/sysdeps/linux/arm/syscall-eabi.S b/libc/sysdeps/linux/arm/syscall-eabi.S +index b931882..019f701 100644 +--- a/libc/sysdeps/linux/arm/syscall-eabi.S ++++ b/libc/sysdeps/linux/arm/syscall-eabi.S +@@ -18,6 +18,7 @@ + + #include + #include ++#include + + /* In the EABI syscall interface, we don't need a special syscall to + implement syscall(). It won't work reliably with 64-bit arguments +diff --git a/libc/sysdeps/linux/arm/sysdep.h b/libc/sysdeps/linux/arm/sysdep.h +index e498695..9c1dbca 100644 +--- a/libc/sysdeps/linux/arm/sysdep.h ++++ b/libc/sysdeps/linux/arm/sysdep.h +@@ -21,7 +21,7 @@ + #define _LINUX_ARM_SYSDEP_H 1 + + #include +-#include ++#include + + #include + /* For Linux we can use the system call table in the header file +diff --git a/libc/sysdeps/linux/arm/vfork.S b/libc/sysdeps/linux/arm/vfork.S +index 17d6a4d..6c55d71 100644 +--- a/libc/sysdeps/linux/arm/vfork.S ++++ b/libc/sysdeps/linux/arm/vfork.S +@@ -7,6 +7,7 @@ + + #include + #include ++#include + + #define _ERRNO_H + #include +-- +1.8.1.2 + diff --git a/package/uclibc/0.9.33.2/uclibc-0009-mips64-fix-n64-interp.patch b/package/uclibc/0.9.33.2/uclibc-0009-mips64-fix-n64-interp.patch new file mode 100644 index 0000000000..7efef7891d --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0009-mips64-fix-n64-interp.patch @@ -0,0 +1,51 @@ +From 603af30d6992e94ac30a66b953264076f4f2fd71 Mon Sep 17 00:00:00 2001 +From: Markos Chandras +Date: Thu, 11 Jul 2013 16:59:16 +0000 +Subject: Rules.mak: MIPS64: Select correct interpreter + +gcc (eg 4.7.3) hardcodes the MIPS64 interpreters like this: +(see gcc/config/linux.h and gcc/config/mips/linux64.h) + +o32: UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +n32: UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0" +n64: UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" + +The existing check for MIPS64 in uClibc is wrong because it does +not respect the selected ABI + +We fix this by explicitely checking the selected ABI instead of the +selected MIPS variant. + +Signed-off-by: Markos Chandras +Cc: Anthony G. Basile +Signed-off-by: Bernhard Reutner-Fischer +--- +diff --git a/Rules.mak b/Rules.mak +index 792b794..889108e 100644 +--- a/Rules.mak ++++ b/Rules.mak +@@ -138,13 +138,19 @@ export MAJOR_VERSION MINOR_VERSION SUBLEVEL VERSION ABI_VERSION LC_ALL + LIBC := libc + SHARED_LIBNAME := $(LIBC).so.$(ABI_VERSION) + UBACKTRACE_DSO := libubacktrace.so.$(ABI_VERSION) +-ifneq ($(findstring $(TARGET_ARCH) , hppa64 ia64 mips64 powerpc64 s390x sparc64 x86_64 ),) ++ ++UCLIBC_LDSO_NAME := ld-uClibc ++ARCH_NATIVE_BIT := 32 ++ifneq ($(findstring $(TARGET_ARCH),hppa64 ia64 powerpc64 s390x sparc64 x86_64),) + UCLIBC_LDSO_NAME := ld64-uClibc + ARCH_NATIVE_BIT := 64 + else +-UCLIBC_LDSO_NAME := ld-uClibc +-ARCH_NATIVE_BIT := 32 ++ifeq ($(CONFIG_MIPS_N64_ABI),y) ++UCLIBC_LDSO_NAME := ld64-uClibc ++ARCH_NATIVE_BIT := 64 + endif ++endif ++ + UCLIBC_LDSO := $(UCLIBC_LDSO_NAME).so.$(ABI_VERSION) + NONSHARED_LIBNAME := uclibc_nonshared.a + libc := $(top_builddir)lib/$(SHARED_LIBNAME) +-- +cgit v0.9.1 diff --git a/package/uclibc/0.9.33.2/uclibc-0010-Rules.mak-fix-breakage-from-603af30d.patch b/package/uclibc/0.9.33.2/uclibc-0010-Rules.mak-fix-breakage-from-603af30d.patch new file mode 100644 index 0000000000..61ed439cdb --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0010-Rules.mak-fix-breakage-from-603af30d.patch @@ -0,0 +1,31 @@ +From f5017653dc63d62c94cc2884ed3a50a4f93001cd Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Wed, 24 Jul 2013 12:28:19 -0300 +Subject: [PATCHv2] Rules.mak: fix breakage from 603af30d + +Removing the whitespace from findstring for 64 bit architectures has +bad consequences since powerpc would be a match in powerpc64 and sparc +would also be a match in sparc64. +That doesn't make them 64 bits in reality causing general breakage. + +Signed-off-by: Gustavo Zacarias +--- + Rules.mak | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Rules.mak b/Rules.mak +index 889108e..be53d81 100644 +--- a/Rules.mak ++++ b/Rules.mak +@@ -141,7 +141,7 @@ UBACKTRACE_DSO := libubacktrace.so.$(ABI_VERSION) + + UCLIBC_LDSO_NAME := ld-uClibc + ARCH_NATIVE_BIT := 32 +-ifneq ($(findstring $(TARGET_ARCH),hppa64 ia64 powerpc64 s390x sparc64 x86_64),) ++ifneq ($(findstring $(TARGET_ARCH) , hppa64 ia64 powerpc64 s390x sparc64 x86_64 ),) + UCLIBC_LDSO_NAME := ld64-uClibc + ARCH_NATIVE_BIT := 64 + else +-- +1.8.1.5 + diff --git a/package/uclibc/0.9.33.2/uclibc-0011-libc-add-non-standard-execvpe-function.patch b/package/uclibc/0.9.33.2/uclibc-0011-libc-add-non-standard-execvpe-function.patch new file mode 100644 index 0000000000..81413338c0 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0011-libc-add-non-standard-execvpe-function.patch @@ -0,0 +1,163 @@ +From 0eb30761a26c46aaf555464114851202ae9c27bd Mon Sep 17 00:00:00 2001 +From: Henning Heinold +Date: Sat, 4 Jun 2011 21:23:15 +0200 +Subject: [PATCH] libc: add non standard execvpe function + +[Gustavo]: Drop TODO modification to make it compatible +Signed-off-by: Henning Heinold +Signed-off-by: Bernhard Reutner-Fischer +--- + include/unistd.h | 8 ++++++++ + libc/unistd/exec.c | 38 +++++++++++++++++++++++++++++++++----- + libc/unistd/execvpe.c | 7 +++++++ + 4 files changed, 52 insertions(+), 5 deletions(-) + create mode 100644 libc/unistd/execvpe.c + +diff --git a/include/unistd.h b/include/unistd.h +index feadf93..9479554 100644 +--- a/include/unistd.h ++++ b/include/unistd.h +@@ -619,6 +619,14 @@ extern int execlp (const char *__file, const char *__arg, ...) + __THROW __nonnull ((1)); + libc_hidden_proto(execlp) + ++#ifdef __USE_GNU ++/* Execute FILE, searching in the `PATH' environment variable if it contains ++ no slashes, with arguments ARGV and environment from a pointer */ ++extern int execvpe (__const char *__file, char *__const __argv[], char *__const __envp[]) ++ __THROW __nonnull ((1)); ++libc_hidden_proto(execvpe) ++#endif ++ + + #if defined __USE_MISC || defined __USE_XOPEN + /* Add INC to priority of the current process. */ +diff --git a/libc/unistd/exec.c b/libc/unistd/exec.c +index ba92989..8fa42e5 100644 +--- a/libc/unistd/exec.c ++++ b/libc/unistd/exec.c +@@ -32,6 +32,8 @@ + /**********************************************************************/ + #define EXEC_FUNC_COMMON 0 + #define EXEC_FUNC_EXECVP 1 ++#define EXEC_FUNC_EXECVPE 2 ++ + #if defined(__ARCH_USE_MMU__) + + /* We have an MMU, so use alloca() to grab space for buffers and arg lists. */ +@@ -58,6 +60,7 @@ + * execle(a) -> execve(-) + * execv(-) -> execve(-) + * execvp(a) -> execve(-) ++ * execvpe(a) -> execve(-) + */ + + # define EXEC_ALLOC_SIZE(VAR) /* nothing to do */ +@@ -219,15 +222,18 @@ libc_hidden_def(execlp) + + #endif + /**********************************************************************/ +-#ifdef L_execvp ++#if defined (L_execvp) || defined(L_execvpe) + + + /* Use a default path that matches glibc behavior, since SUSv3 says + * this is implementation-defined. The default is current working dir, + * /bin, and then /usr/bin. */ + static const char default_path[] = ":/bin:/usr/bin"; +- ++#if defined (L_execvp) + int execvp(const char *path, char *const argv[]) ++#elif defined (L_execvpe) ++int execvpe(const char *path, char *const argv[], char *const envp[]) ++#endif + { + char *buf = NULL; + char *p; +@@ -245,7 +251,11 @@ int execvp(const char *path, char *const argv[]) + } + + if (strchr(path, '/')) { ++#if defined (L_execvp) + execve(path, argv, __environ); ++#elif defined (L_execvpe) ++ execve(path, argv, envp); ++#endif + if (errno == ENOEXEC) { + char **nargv; + EXEC_ALLOC_SIZE(size2) /* Do NOT add a semicolon! */ +@@ -254,11 +264,19 @@ int execvp(const char *path, char *const argv[]) + /* Need the dimension - 1. We omit counting the trailing + * NULL but we actually omit the first entry. */ + for (n=0 ; argv[n] ; n++) {} ++#if defined (L_execvp) + nargv = (char **) EXEC_ALLOC((n+2) * sizeof(char *), size2, EXEC_FUNC_EXECVP); ++#elif defined (L_execvpe) ++ nargv = (char **) EXEC_ALLOC((n+2) * sizeof(char *), size2, EXEC_FUNC_EXECVPE); ++#endif + nargv[0] = argv[0]; + nargv[1] = (char *)path; + memcpy(nargv+2, argv+1, n*sizeof(char *)); ++#if defined (L_execvp) + execve("/bin/sh", nargv, __environ); ++#elif defined (L_execvpe) ++ execve("/bin/sh", nargv, envp); ++#endif + EXEC_FREE(nargv, size2); + } + } else { +@@ -277,8 +295,11 @@ int execvp(const char *path, char *const argv[]) + return -1; + } + len = (FILENAME_MAX - 1) - plen; +- ++#if defined (L_execvp) + buf = EXEC_ALLOC(FILENAME_MAX, size, EXEC_FUNC_EXECVP); ++#elif defined (L_execvpe) ++ buf = EXEC_ALLOC(FILENAME_MAX, size, EXEC_FUNC_EXECVPE); ++#endif + { + int seen_small = 0; + s0 = buf + len; +@@ -300,8 +321,11 @@ int execvp(const char *path, char *const argv[]) + s[plen-1] = '/'; + } + ++#if defined (L_execvp) + execve(s, argv, __environ); +- ++#elif defined (L_execvpe) ++ execve(s, argv, envp); ++#endif + seen_small = 1; + + if (errno == ENOEXEC) { +@@ -325,7 +349,11 @@ int execvp(const char *path, char *const argv[]) + + return -1; + } ++#if defined (L_execvp) + libc_hidden_def(execvp) +- ++#elif defined (L_execvpe) ++libc_hidden_def(execvpe) + #endif ++ ++#endif /* #if defined (L_execvp) || defined(L_execvpe) */ + /**********************************************************************/ +diff --git a/libc/unistd/execvpe.c b/libc/unistd/execvpe.c +new file mode 100644 +index 0000000..c3c1e43 +--- /dev/null ++++ b/libc/unistd/execvpe.c +@@ -0,0 +1,7 @@ ++/* Copyright (C) 2011-2013 Hennning Heinold ++ * ++ * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball. ++ */ ++ ++#define L_execvpe ++#include "exec.c" +-- +1.8.1.5 + diff --git a/package/uclibc/0.9.33.2/uclibc-0012-libc-stdlib-add-mkostemp-helpers.patch b/package/uclibc/0.9.33.2/uclibc-0012-libc-stdlib-add-mkostemp-helpers.patch new file mode 100644 index 0000000000..80022408aa --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0012-libc-stdlib-add-mkostemp-helpers.patch @@ -0,0 +1,155 @@ +From 42d1b23fc0f3748b8bf474e456d6c44aa7e563fd Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Wed, 14 Nov 2012 00:30:54 -0500 +Subject: [PATCH] libc/stdlib: add mkostemp helpers + +Some projects (like udev) are starting to use this. + +Imported from glibc. + +Signed-off-by: Mike Frysinger +--- + include/stdlib.h | 23 +++++++++++++++++++++++ + libc/stdlib/Makefile.in | 4 ++-- + libc/stdlib/mkostemp.c | 32 ++++++++++++++++++++++++++++++++ + libc/stdlib/mkostemp64.c | 33 +++++++++++++++++++++++++++++++++ + 4 files changed, 90 insertions(+), 2 deletions(-) + create mode 100644 libc/stdlib/mkostemp.c + create mode 100644 libc/stdlib/mkostemp64.c + +diff --git a/include/stdlib.h b/include/stdlib.h +index 354fc66..79ccc55 100644 +--- a/include/stdlib.h ++++ b/include/stdlib.h +@@ -652,6 +652,29 @@ extern int mkstemp64 (char *__template) __nonnull ((1)) __wur; + extern char *mkdtemp (char *__template) __THROW __nonnull ((1)) __wur; + #endif + ++#ifdef __USE_GNU ++/* Generate a unique temporary file name from TEMPLATE similar to ++ mkstemp. But allow the caller to pass additional flags which are ++ used in the open call to create the file.. ++ ++ This function is a possible cancellation point and therefore not ++ marked with __THROW. */ ++# ifndef __USE_FILE_OFFSET64 ++extern int mkostemp (char *__template, int __flags) __nonnull ((1)) __wur; ++# else ++# ifdef __REDIRECT ++extern int __REDIRECT (mkostemp, (char *__template, int __flags), mkostemp64) ++ __nonnull ((1)) __wur; ++# else ++# define mkostemp mkostemp64 ++# endif ++# endif ++# ifdef __USE_LARGEFILE64 ++extern int mkostemp64 (char *__template, int __flags) __nonnull ((1)) __wur; ++# endif ++ ++#endif ++ + + __BEGIN_NAMESPACE_STD + /* Execute the given line as a shell command. +diff --git a/libc/stdlib/Makefile.in b/libc/stdlib/Makefile.in +index 3166b8e..b92f7ce 100644 +--- a/libc/stdlib/Makefile.in ++++ b/libc/stdlib/Makefile.in +@@ -12,7 +12,7 @@ include $(top_srcdir)libc/stdlib/malloc-simple/Makefile.in + include $(top_srcdir)libc/stdlib/malloc-standard/Makefile.in + + CSRC-y := \ +- abort.c getenv.c mkdtemp.c realpath.c canonicalize.c mkstemp.c \ ++ abort.c getenv.c mkdtemp.c realpath.c canonicalize.c mkstemp.c mkostemp.c \ + rand.c random.c random_r.c setenv.c div.c ldiv.c lldiv.c \ + getpt.c drand48-iter.c jrand48.c \ + jrand48_r.c lcong48.c lrand48.c lrand48_r.c mrand48.c mrand48_r.c nrand48.c \ +@@ -21,7 +21,7 @@ CSRC-y := \ + CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_memalign.c + CSRC-$(UCLIBC_HAS_PTY) += grantpt.c unlockpt.c ptsname.c + CSRC-$(UCLIBC_HAS_ARC4RANDOM) += arc4random.c +-CSRC-$(UCLIBC_HAS_LFS) += mkstemp64.c ++CSRC-$(UCLIBC_HAS_LFS) += mkstemp64.c mkostemp64.c + CSRC-$(UCLIBC_HAS_FLOATS) += drand48.c drand48_r.c erand48.c erand48_r.c + CSRC-$(if $(findstring yy,$(UCLIBC_HAS_FLOATS)$(UCLIBC_SUSV3_LEGACY)),y) += \ + gcvt.c +diff --git a/libc/stdlib/mkostemp.c b/libc/stdlib/mkostemp.c +new file mode 100644 +index 0000000..93b50fc +--- /dev/null ++++ b/libc/stdlib/mkostemp.c +@@ -0,0 +1,32 @@ ++/* Copyright (C) 1998-2012 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include "../misc/internals/tempname.h" ++ ++/* Generate a unique temporary file name from TEMPLATE. ++ The last six characters of TEMPLATE must be "XXXXXX"; ++ they are replaced with a string that makes the filename unique. ++ Then open the file and return a fd. */ ++int ++mkostemp (template, flags) ++ char *template; ++ int flags; ++{ ++ return __gen_tempname (template, __GT_FILE, flags); ++} +diff --git a/libc/stdlib/mkostemp64.c b/libc/stdlib/mkostemp64.c +new file mode 100644 +index 0000000..5509d8c +--- /dev/null ++++ b/libc/stdlib/mkostemp64.c +@@ -0,0 +1,33 @@ ++/* Copyright (C) 2000-2012 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include "../misc/internals/tempname.h" ++ ++/* Generate a unique temporary file name from TEMPLATE. ++ The last six characters of TEMPLATE must be "XXXXXX"; ++ they are replaced with a string that makes the filename unique. ++ Then open the file and return a fd. */ ++int ++mkostemp64 (template, flags) ++ char *template; ++ int flags; ++{ ++ return __gen_tempname (template, __GT_BIGFILE, flags | O_LARGEFILE); ++} +-- +1.8.1.5 + diff --git a/package/uclibc/0.9.33.2/uclibc-0013-eventfd-Implement-eventfd2-and-fix-eventfd.patch b/package/uclibc/0.9.33.2/uclibc-0013-eventfd-Implement-eventfd2-and-fix-eventfd.patch new file mode 100644 index 0000000000..fea8ccdd1b --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0013-eventfd-Implement-eventfd2-and-fix-eventfd.patch @@ -0,0 +1,64 @@ +From 7810e4f8027b5c4c8ceec6fefec4eb779362ebb5 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 10 Jun 2012 09:36:23 -0700 +Subject: [PATCH] eventfd: Implement eventfd2 and fix eventfd + +eventfd: evntfd assumes to take two arguments instead it +should be one evntfd expects two therefore implement both syscalls with +correct parameters + +Thanks Eugene Rudoy for reporting it and also providing the patch + +Signed-off-by: Khem Raj +--- + libc/sysdeps/linux/common/eventfd.c | 16 ++++++++++++++-- + libc/sysdeps/linux/common/stubs.c | 2 +- + 2 files changed, 15 insertions(+), 3 deletions(-) + +diff --git a/libc/sysdeps/linux/common/eventfd.c b/libc/sysdeps/linux/common/eventfd.c +index cc3f3f0..96597ab 100644 +--- a/libc/sysdeps/linux/common/eventfd.c ++++ b/libc/sysdeps/linux/common/eventfd.c +@@ -7,12 +7,24 @@ + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ + ++#include + #include + #include + + /* + * eventfd() + */ +-#ifdef __NR_eventfd +-_syscall2(int, eventfd, int, count, int, flags) ++#if defined __NR_eventfd || defined __NR_eventfd2 ++int eventfd (int count, int flags) ++{ ++#if defined __NR_eventfd2 ++ return INLINE_SYSCALL (eventfd2, 2, count, flags); ++#elif defined __NR_eventfd ++ if (flags != 0) { ++ __set_errno (EINVAL); ++ return -1; ++ } ++ return INLINE_SYSCALL (eventfd, 1, count); ++#endif ++} + #endif +diff --git a/libc/sysdeps/linux/common/stubs.c b/libc/sysdeps/linux/common/stubs.c +index 4d1e26c..7af14c1 100644 +--- a/libc/sysdeps/linux/common/stubs.c ++++ b/libc/sysdeps/linux/common/stubs.c +@@ -93,7 +93,7 @@ make_stub(epoll_ctl) + make_stub(epoll_wait) + #endif + +-#if !defined __NR_eventfd && defined __UCLIBC_LINUX_SPECIFIC__ ++#if !defined __NR_eventfd && !defined __NR_eventfd2 && defined __UCLIBC_LINUX_SPECIFIC__ + make_stub(eventfd) + #endif + +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0014-pread-pwrite-backport-fix.patch b/package/uclibc/0.9.33.2/uclibc-0014-pread-pwrite-backport-fix.patch new file mode 100644 index 0000000000..e04607cff6 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0014-pread-pwrite-backport-fix.patch @@ -0,0 +1,219 @@ +From 342a3d861fde5651ee53486addbacddcec6a0a58 Mon Sep 17 00:00:00 2001 +From: Natanael Copa +Date: Sat, 4 Aug 2012 19:32:45 +0200 +Subject: [PATCH] pread/pwrite: backport fix + +pread/pwrite syscalls has been renamed to pread64/pwrite in 2.6 kernel. + +There was a fallback function using lseek for kernels who did not have +this syscall (pre 2.1.60). This is broken in many ways. + +uclibc have been using the broken fallback due to they forgot to rename +pread syscall. + +This got detected with git-1.7.11 which introduced threaded index-pack +which broke in similar ways a windows (msys). + +This issue in uclibc have been reported upstream and fixed in git master +so this patch does not need to be upstreamed. It might be an idea to +backport it properly for 0.9.33 branch though. + +Signed-off-by: Natanael Copa +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/sysdeps/linux/common/pread_write.c | 143 ++++--------------------------- + 1 file changed, 19 insertions(+), 124 deletions(-) + +diff --git a/libc/sysdeps/linux/common/pread_write.c b/libc/sysdeps/linux/common/pread_write.c +index 88e6957..baf8691 100644 +--- a/libc/sysdeps/linux/common/pread_write.c ++++ b/libc/sysdeps/linux/common/pread_write.c +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + + extern __typeof(pread) __libc_pread; + extern __typeof(pwrite) __libc_pwrite; +@@ -27,15 +28,17 @@ extern __typeof(pwrite64) __libc_pwrite64; + + #include + +-#ifdef __NR_pread +- +-# define __NR___syscall_pread __NR_pread ++# define __NR___syscall_pread __NR_pread64 + static __inline__ _syscall5(ssize_t, __syscall_pread, int, fd, void *, buf, + size_t, count, off_t, offset_hi, off_t, offset_lo) + + ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset) + { +- return __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset)); ++ int oldtype = LIBC_CANCEL_ASYNC (); ++ int result = __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset)); ++ LIBC_CANCEL_RESET (oldtype); ++ return result; ++ + } + weak_alias(__libc_pread,pread) + +@@ -44,22 +47,24 @@ ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset) + { + uint32_t low = offset & 0xffffffff; + uint32_t high = offset >> 32; +- return __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(high, low)); ++ int oldtype = LIBC_CANCEL_ASYNC (); ++ int result = __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(high, low)); ++ LIBC_CANCEL_RESET (oldtype); ++ return result; + } + weak_alias(__libc_pread64,pread64) + # endif /* __UCLIBC_HAS_LFS__ */ + +-#endif /* __NR_pread */ +- +-#ifdef __NR_pwrite +- +-# define __NR___syscall_pwrite __NR_pwrite ++# define __NR___syscall_pwrite __NR_pwrite64 + static __inline__ _syscall5(ssize_t, __syscall_pwrite, int, fd, const void *, buf, + size_t, count, off_t, offset_hi, off_t, offset_lo) + + ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset) + { +- return __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset)); ++ int oldtype = LIBC_CANCEL_ASYNC (); ++ int result = __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset)); ++ LIBC_CANCEL_RESET (oldtype); ++ return result; + } + weak_alias(__libc_pwrite,pwrite) + +@@ -68,120 +73,10 @@ ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset) + { + uint32_t low = offset & 0xffffffff; + uint32_t high = offset >> 32; +- return __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(high, low)); +-} +-weak_alias(__libc_pwrite64,pwrite64) +-# endif /* __UCLIBC_HAS_LFS__ */ +-#endif /* __NR_pwrite */ +- +-#if ! defined __NR_pread || ! defined __NR_pwrite +- +-static ssize_t __fake_pread_write(int fd, void *buf, +- size_t count, off_t offset, int do_pwrite) +-{ +- int save_errno; +- ssize_t result; +- off_t old_offset; +- +- /* Since we must not change the file pointer preserve the +- * value so that we can restore it later. */ +- if ((old_offset=lseek(fd, 0, SEEK_CUR)) == (off_t) -1) +- return -1; +- +- /* Set to wanted position. */ +- if (lseek(fd, offset, SEEK_SET) == (off_t) -1) +- return -1; +- +- if (do_pwrite == 1) { +- /* Write the data. */ +- result = write(fd, buf, count); +- } else { +- /* Read the data. */ +- result = read(fd, buf, count); +- } +- +- /* Now we have to restore the position. If this fails we +- * have to return this as an error. */ +- save_errno = errno; +- if (lseek(fd, old_offset, SEEK_SET) == (off_t) -1) +- { +- if (result == -1) +- __set_errno(save_errno); +- return -1; +- } +- __set_errno(save_errno); +- return(result); +-} +- +-# ifdef __UCLIBC_HAS_LFS__ +- +-static ssize_t __fake_pread_write64(int fd, void *buf, +- size_t count, off64_t offset, int do_pwrite) +-{ +- int save_errno; +- ssize_t result; +- off64_t old_offset; +- +- /* Since we must not change the file pointer preserve the +- * value so that we can restore it later. */ +- if ((old_offset=lseek64(fd, 0, SEEK_CUR)) == (off64_t) -1) +- return -1; +- +- /* Set to wanted position. */ +- if (lseek64(fd, offset, SEEK_SET) == (off64_t) -1) +- return -1; +- +- if (do_pwrite == 1) { +- /* Write the data. */ +- result = write(fd, buf, count); +- } else { +- /* Read the data. */ +- result = read(fd, buf, count); +- } +- +- /* Now we have to restore the position. */ +- save_errno = errno; +- if (lseek64(fd, old_offset, SEEK_SET) == (off64_t) -1) { +- if (result == -1) +- __set_errno (save_errno); +- return -1; +- } +- __set_errno (save_errno); ++ int oldtype = LIBC_CANCEL_ASYNC (); ++ int result = __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(high, low)); ++ LIBC_CANCEL_RESET (oldtype); + return result; + } +-# endif /* __UCLIBC_HAS_LFS__ */ +-#endif /* ! defined __NR_pread || ! defined __NR_pwrite */ +- +-#ifndef __NR_pread +-ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset) +-{ +- return __fake_pread_write(fd, buf, count, offset, 0); +-} +-weak_alias(__libc_pread,pread) +- +-# ifdef __UCLIBC_HAS_LFS__ +-ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset) +-{ +- return __fake_pread_write64(fd, buf, count, offset, 0); +-} +-weak_alias(__libc_pread64,pread64) +-# endif /* __UCLIBC_HAS_LFS__ */ +-#endif /* ! __NR_pread */ +- +-#ifndef __NR_pwrite +-ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset) +-{ +- /* we won't actually be modifying the buffer, +- *just cast it to get rid of warnings */ +- return __fake_pread_write(fd, (void*)buf, count, offset, 1); +-} +-weak_alias(__libc_pwrite,pwrite) +- +-# ifdef __UCLIBC_HAS_LFS__ +-ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset) +-{ +- return __fake_pread_write64(fd, (void*)buf, count, offset, 1); +-} + weak_alias(__libc_pwrite64,pwrite64) + # endif /* __UCLIBC_HAS_LFS__ */ +-#endif /* ! __NR_pwrite */ +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0015-add-posix_madvise.c.patch b/package/uclibc/0.9.33.2/uclibc-0015-add-posix_madvise.c.patch new file mode 100644 index 0000000000..097f8fcbc7 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0015-add-posix_madvise.c.patch @@ -0,0 +1,61 @@ +From 93b8ce8886e30986be31c1403b606b6367dc258a Mon Sep 17 00:00:00 2001 +From: "Peter S. Mazinger" +Date: Tue, 26 Apr 2011 23:03:44 +0200 +Subject: [PATCH] add posix_madvise.c + +Signed-off-by: Peter S. Mazinger +Signed-off-by: Bernhard Reutner-Fischer +Signed-off-by: Mike Frysinger +--- + libc/sysdeps/linux/common/Makefile.in | 2 +- + libc/sysdeps/linux/common/posix_madvise.c | 25 +++++++++++++++++++++++++ + 2 files changed, 26 insertions(+), 1 deletion(-) + create mode 100644 libc/sysdeps/linux/common/posix_madvise.c + +diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in +index 3b5763c..b39082b 100644 +--- a/libc/sysdeps/linux/common/Makefile.in ++++ b/libc/sysdeps/linux/common/Makefile.in +@@ -81,7 +81,7 @@ CSRC-$(UCLIBC_HAS_REALTIME) += clock_getres.c clock_gettime.c clock_settime.c \ + sched_get_priority_max.c sched_get_priority_min.c sched_getscheduler.c \ + sched_rr_get_interval.c sched_setparam.c sched_setscheduler.c sigqueue.c + # clock_getcpuclockid|clock_nanosleep|mq_timedreceive|mq_timedsend|posix_fadvise|posix_fallocate|posix_madvise|posix_memalign|posix_mem_offset|posix_spawnattr_destroy|posix_spawnattr_init|posix_spawnattr_getflags|posix_spawnattr_setflags|posix_spawnattr_getpgroup|posix_spawnattr_setpgroup|posix_spawnattr_getschedparam|posix_spawnattr_setschedparam|posix_spawnattr_getschedpolicy|posix_spawnattr_setschedpolicy|posix_spawnattr_getsigdefault|posix_spawnattr_setsigdefault|posix_spawnattr_getsigmask|posix_spawnattr_setsigmask|posix_spawnattr_init|posix_spawnattr_setflags|posix_spawnattr_setpgroup|posix_spawnattr_setschedparam|posix_spawnattr_setschedpolicy|posix_spawnattr_setsigdefault|posix_spawnattr_setsigmask|posix_spawn_file_actions_addclose|posix_spawn_file_actions_addopen|posix_spawn_file_actions_adddup2|posix_spawn_file_actions_addopen|posix_spawn_file_actions_destroy|posix_spawn_file_actions_init|posix_spawn_file_actions_init|posix_spawn|posix_spawnp|posix_spawnp|posix_typed_mem_get_info|pthread_mutex_timedlock|sem_timedwait +-CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise64.c posix_fadvise.c ++CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise64.c posix_fadvise.c posix_madvise.c + CSRC-$(UCLIBC_SUSV4_LEGACY) += utime.c + CSRC-$(UCLIBC_HAS_EPOLL) += epoll.c + CSRC-$(UCLIBC_HAS_XATTR) += xattr.c +diff --git a/libc/sysdeps/linux/common/posix_madvise.c b/libc/sysdeps/linux/common/posix_madvise.c +new file mode 100644 +index 0000000..2f95bcb +--- /dev/null ++++ b/libc/sysdeps/linux/common/posix_madvise.c +@@ -0,0 +1,25 @@ ++/* vi: set sw=4 ts=4: */ ++/* Licensed under the LGPL v2.1, see the file LICENSE in this tarball. */ ++ ++#include ++#include ++ ++#if defined __NR_madvise && defined __USE_XOPEN2K && defined __UCLIBC_HAS_ADVANCED_REALTIME__ ++int posix_madvise(void *addr, size_t len, int advice) ++{ ++ int result; ++ /* We have one problem: the kernel's MADV_DONTNEED does not ++ * correspond to POSIX's POSIX_MADV_DONTNEED. The former simply ++ * discards changes made to the memory without writing it back to ++ * disk, if this would be necessary. The POSIX behaviour does not ++ * allow this. There is no functionality mapping for the POSIX ++ * behaviour so far so we ignore that advice for now. */ ++ if (advice == POSIX_MADV_DONTNEED) ++ return 0; ++ ++ /* this part might use madvise function */ ++ INTERNAL_SYSCALL_DECL (err); ++ result = INTERNAL_SYSCALL (madvise, err, 3, addr, len, advice); ++ return INTERNAL_SYSCALL_ERRNO (result, err); ++} ++#endif +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0016-nptl-sh-fix-race-condition-in-lll_wait_tid.patch b/package/uclibc/0.9.33.2/uclibc-0016-nptl-sh-fix-race-condition-in-lll_wait_tid.patch new file mode 100644 index 0000000000..233f2bee0a --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0016-nptl-sh-fix-race-condition-in-lll_wait_tid.patch @@ -0,0 +1,38 @@ +From ffd9e147b120e9c2bf30ba4861860f1bc59362c5 Mon Sep 17 00:00:00 2001 +From: Stas Sergeev +Date: Thu, 14 Jun 2012 01:00:02 +0200 +Subject: [PATCH] nptl: sh: fix race condition in lll_wait_tid + +Make a local copy of the tid value to avoid a race condition, +as the value could have been changed to 0, thus using a pointer +it would have been passed to the lll_futex_wait modified. + +Signed-off-by: Stas Sergeev +Signed-off-by: Carmelo Amoroso +(cherry picked from commit 0dcc13bf7a61b1d0708e5dd103d5515e0ffec79a) + +Signed-off-by: Carmelo Amoroso +--- + libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h +index d10cd61..b83d863 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h +@@ -396,9 +396,9 @@ extern int __lll_unlock_wake (int *__futex, int private) attribute_hidden; + + #define lll_wait_tid(tid) \ + do { \ +- __typeof (tid) *__tid = &(tid); \ +- while (*__tid != 0) \ +- lll_futex_wait (__tid, *__tid, LLL_SHARED); \ ++ __typeof (tid) __tid; \ ++ while ((__tid = (tid)) != 0) \ ++ lll_futex_wait (&(tid), __tid, LLL_SHARED); \ + } while (0) + + extern int __lll_timedwait_tid (int *tid, const struct timespec *abstime) +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0017-librt-re-add-SIGCANCEL-to-the-list-of-blocked-signal.patch b/package/uclibc/0.9.33.2/uclibc-0017-librt-re-add-SIGCANCEL-to-the-list-of-blocked-signal.patch new file mode 100644 index 0000000000..9a263f8d79 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0017-librt-re-add-SIGCANCEL-to-the-list-of-blocked-signal.patch @@ -0,0 +1,37 @@ +From fec308fdfaf9f557ef5fb17c308c48259012b825 Mon Sep 17 00:00:00 2001 +From: Filippo Arcidiacono +Date: Thu, 12 Jul 2012 09:24:39 +0200 +Subject: [PATCH] librt: re-add SIGCANCEL to the list of blocked signal in + helper thread + +Indeed if the libpthread is before the libc in the library look up +the SIGCANCEL is removed from the list of the blocked signal by +sigfillset func, this can produce the handler not properly called. +This commit revert what Denys modified in commit +162cfaea20d807f0ae329efe39292a9b22593b41. + +Signed-off-by: Filippo Arcidiacono +Signed-off-by: Carmelo Amoroso +(cherry picked from commit cb43f2afba0633400387fa7c55dda3396517f58a) + +Signed-off-by: Carmelo Amoroso +--- + libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c b/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c +index 4319d8d..2681961 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c +@@ -175,7 +175,7 @@ __start_helper_thread (void) + sigset_t ss; + sigset_t oss; + sigfillset (&ss); +- /*__sigaddset (&ss, SIGCANCEL); - already done by sigfillset */ ++ __sigaddset (&ss, SIGCANCEL); + INTERNAL_SYSCALL_DECL (err); + INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &ss, &oss, _NSIG / 8); + +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0018-ldso-include-dlfcn.h-for-RTLD_NODELETE.patch b/package/uclibc/0.9.33.2/uclibc-0018-ldso-include-dlfcn.h-for-RTLD_NODELETE.patch new file mode 100644 index 0000000000..37fb9132ef --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0018-ldso-include-dlfcn.h-for-RTLD_NODELETE.patch @@ -0,0 +1,52 @@ +From 2f09c67232cebca62f3afa4fc296c83aa813427c Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Sun, 18 Nov 2012 04:41:06 -0500 +Subject: [PATCH] ldso: include dlfcn.h for RTLD_NODELETE + +Building with NPTL enabled and shared library support disabled we hit: +In file included from libpthread/nptl/sysdeps/generic/dl-tls.c:30:0: +./ldso/include/dl-elf.h: In function '__dl_parse_dynamic_info': +./ldso/include/dl-elf.h:173:20: error: 'RTLD_NODELETE' undeclared (first use in this function) +./ldso/include/dl-elf.h:173:20: note: each undeclared identifier is reported only once for each function it appears in +make: *** [libpthread/nptl/sysdeps/generic/dl-tls.os] Error 1 + +A previous commit (f26c5f6952ce9bf8edec9c1571c47addb1bcc442) touched +on a similar issue, but added the include to the incorrect location. + +Reported-by: Christophe Lyon [arm nommu] +Reported-by: Daniel Beecham [static x86_64] +Signed-off-by: Mike Frysinger +Signed-off-by: Carmelo Amoroso +--- + ldso/include/dl-elf.h | 2 ++ + ldso/include/ldso.h | 1 - + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/ldso/include/dl-elf.h b/ldso/include/dl-elf.h +index 29d1a00..e1185f7 100644 +--- a/ldso/include/dl-elf.h ++++ b/ldso/include/dl-elf.h +@@ -18,6 +18,8 @@ struct elf_resolve; + struct r_scope_elem; + + #include ++#include ++ + #ifdef __LDSO_CACHE_SUPPORT__ + extern int _dl_map_cache(void); + extern int _dl_unmap_cache(void); +diff --git a/ldso/include/ldso.h b/ldso/include/ldso.h +index 6f3b728..e250e30 100644 +--- a/ldso/include/ldso.h ++++ b/ldso/include/ldso.h +@@ -42,7 +42,6 @@ + #ifndef __ARCH_HAS_NO_SHARED__ + #include + #include +-#include + /* Now the ldso specific headers */ + #include + #ifdef __UCLIBC_HAS_TLS__ +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0019-include-elf.h-update-for-ELFOSABI_-changes.patch b/package/uclibc/0.9.33.2/uclibc-0019-include-elf.h-update-for-ELFOSABI_-changes.patch new file mode 100644 index 0000000000..b3507af78d --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0019-include-elf.h-update-for-ELFOSABI_-changes.patch @@ -0,0 +1,34 @@ +From 788d9ca73b7ed1262c83580ccc62fb3625e603c3 Mon Sep 17 00:00:00 2001 +From: Thomas Schwinge +Date: Wed, 31 Oct 2012 20:41:50 +0100 +Subject: [PATCH] include/elf.h: update for ELFOSABI_* changes. + +ELFOSABI_GNU replaces ELFOSABI_LINUX, the latter is kept as a compatibility +alias, and ELFOSABI_HURD is removed. See the table on + for +reference. + +Signed-off-by: Thomas Schwinge +Signed-off-by: Bernhard Reutner-Fischer +--- + include/elf.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/elf.h b/include/elf.h +index ba3e804..470046e 100644 +--- a/include/elf.h ++++ b/include/elf.h +@@ -148,8 +148,8 @@ typedef struct + #define ELFOSABI_SYSV 0 /* Alias. */ + #define ELFOSABI_HPUX 1 /* HP-UX */ + #define ELFOSABI_NETBSD 2 /* NetBSD. */ +-#define ELFOSABI_LINUX 3 /* Linux. */ +-#define ELFOSABI_HURD 4 /* GNU/Hurd */ ++#define ELFOSABI_GNU 3 /* Object uses GNU ELF extensions. */ ++#define ELFOSABI_LINUX ELFOSABI_GNU /* Compatibility alias. */ + #define ELFOSABI_SOLARIS 6 /* Sun Solaris. */ + #define ELFOSABI_AIX 7 /* IBM AIX. */ + #define ELFOSABI_IRIX 8 /* SGI Irix. */ +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0020-update-ptrace.h-to-latest-from-glibc.patch b/package/uclibc/0.9.33.2/uclibc-0020-update-ptrace.h-to-latest-from-glibc.patch new file mode 100644 index 0000000000..a46af7e5f7 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0020-update-ptrace.h-to-latest-from-glibc.patch @@ -0,0 +1,113 @@ +From 2d0c3a704afe6bdc7be129e9f9217ec1369c1bc8 Mon Sep 17 00:00:00 2001 +From: James Hogan +Date: Fri, 30 Nov 2012 10:08:13 +0000 +Subject: [PATCH] update ptrace.h to latest from glibc + +Update libc/sysdeps/linux/common/sys/ptrace.h to latest from glibc's +sysdeps/unix/sysv/linux/sys/ptrace.h. + +This adds definitions for operations: + - PTRACE_GETREGSET + - PTRACE_SETREGSET + - PTRACE_SEIZE + - PTRACE_INTERRUPT + - PTRACE_LISTEN + +And adds flags: + - PTRACE_SEIZE_DEVEL + +And adds event codes: + - PTRACE_EVENT_SECCOMP + +This is to allow access to the generic interface for accessing +architecture specific regsets using the corresponding NT_* types, +required for new Linux kernel architecture ports. + +Signed-off-by: James Hogan +Signed-off-by: Mike Frysinger +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/sysdeps/linux/common/sys/ptrace.h | 42 +++++++++++++++++++++++++++----- + 1 file changed, 36 insertions(+), 6 deletions(-) + +diff --git a/libc/sysdeps/linux/common/sys/ptrace.h b/libc/sysdeps/linux/common/sys/ptrace.h +index 08658f9..95b3fdf 100644 +--- a/libc/sysdeps/linux/common/sys/ptrace.h ++++ b/libc/sysdeps/linux/common/sys/ptrace.h +@@ -1,5 +1,5 @@ + /* `ptrace' debugger support interface. Linux version. +- Copyright (C) 1996-1999,2000,2006,2007 Free Software Foundation, Inc. ++ Copyright (C) 1996-2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -125,13 +125,40 @@ enum __ptrace_request + #define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ +- PTRACE_SETSIGINFO = 0x4203 ++ PTRACE_SETSIGINFO = 0x4203, + #define PT_SETSIGINFO PTRACE_SETSIGINFO ++ ++ /* Get register content. */ ++ PTRACE_GETREGSET = 0x4204, ++#define PTRACE_GETREGSET PTRACE_GETREGSET ++ ++ /* Set register content. */ ++ PTRACE_SETREGSET = 0x4205, ++#define PTRACE_SETREGSET PTRACE_SETREGSET ++ ++ /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect ++ signal or group stop state. */ ++ PTRACE_SEIZE = 0x4206, ++#define PTRACE_SEIZE PTRACE_SEIZE ++ ++ /* Trap seized tracee. */ ++ PTRACE_INTERRUPT = 0x4207, ++#define PTRACE_INTERRUPT PTRACE_INTERRUPT ++ ++ /* Wait for next group event. */ ++ PTRACE_LISTEN = 0x4208 + }; + + ++/* Flag for PTRACE_LISTEN. */ ++enum __ptrace_flags ++{ ++ PTRACE_SEIZE_DEVEL = 0x80000000 ++}; ++ + /* Options set using PTRACE_SETOPTIONS. */ +-enum __ptrace_setoptions { ++enum __ptrace_setoptions ++{ + PTRACE_O_TRACESYSGOOD = 0x00000001, + PTRACE_O_TRACEFORK = 0x00000002, + PTRACE_O_TRACEVFORK = 0x00000004, +@@ -139,17 +166,20 @@ enum __ptrace_setoptions { + PTRACE_O_TRACEEXEC = 0x00000010, + PTRACE_O_TRACEVFORKDONE = 0x00000020, + PTRACE_O_TRACEEXIT = 0x00000040, +- PTRACE_O_MASK = 0x0000007f ++ PTRACE_O_TRACESECCOMP = 0x00000080, ++ PTRACE_O_MASK = 0x000000ff + }; + + /* Wait extended result codes for the above trace options. */ +-enum __ptrace_eventcodes { ++enum __ptrace_eventcodes ++{ + PTRACE_EVENT_FORK = 1, + PTRACE_EVENT_VFORK = 2, + PTRACE_EVENT_CLONE = 3, + PTRACE_EVENT_EXEC = 4, + PTRACE_EVENT_VFORK_DONE = 5, +- PTRACE_EVENT_EXIT = 6 ++ PTRACE_EVENT_EXIT = 6, ++ PTRAVE_EVENT_SECCOMP = 7 + }; + + /* Perform process tracing functions. REQUEST is one of the values +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0021-pread-pwrite-fix-for-threads.patch b/package/uclibc/0.9.33.2/uclibc-0021-pread-pwrite-fix-for-threads.patch new file mode 100644 index 0000000000..5b95dd8642 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0021-pread-pwrite-fix-for-threads.patch @@ -0,0 +1,37 @@ +From b7cc54be07412f02ff464aa47a8871ba7a910e3e Mon Sep 17 00:00:00 2001 +From: Bernhard Reutner-Fischer +Date: Tue, 8 Jan 2013 10:14:22 +0100 +Subject: [PATCH] pread/pwrite: fix for !threads + +This is done properly via cancel.h on master. + +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/sysdeps/linux/common/pread_write.c | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/libc/sysdeps/linux/common/pread_write.c b/libc/sysdeps/linux/common/pread_write.c +index baf8691..c142038 100644 +--- a/libc/sysdeps/linux/common/pread_write.c ++++ b/libc/sysdeps/linux/common/pread_write.c +@@ -17,7 +17,16 @@ + #include + #include + #include +-#include ++#ifdef __UCLIBC_HAS_THREADS_NATIVE__ ++#include "sysdep-cancel.h" ++#else ++/* No multi-thread handling enabled. */ ++#define SINGLE_THREAD_P (1) ++#define RTLD_SINGLE_THREAD_P (1) ++#define LIBC_CANCEL_ASYNC() 0 /* Just a dummy value. */ ++#define LIBC_CANCEL_RESET(val) ((void)(val)) /* Nothing, but evaluate it. */ ++#define LIBC_CANCEL_HANDLED() /* Nothing. */ ++#endif + + extern __typeof(pread) __libc_pread; + extern __typeof(pwrite) __libc_pwrite; +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0022-inet-rpc-fix-authnone_marshal-in-multithreading-cont.patch b/package/uclibc/0.9.33.2/uclibc-0022-inet-rpc-fix-authnone_marshal-in-multithreading-cont.patch new file mode 100644 index 0000000000..6d8e2b21a6 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0022-inet-rpc-fix-authnone_marshal-in-multithreading-cont.patch @@ -0,0 +1,128 @@ +From 5c797a24a7d6337b5e654079a8d815199b1e8364 Mon Sep 17 00:00:00 2001 +From: Carmelo Amoroso +Date: Thu, 2 Feb 2012 18:22:36 +0100 +Subject: [PATCH] inet:rpc: fix authnone_marshal in multithreading context + +This is a port of glibc's fix by Zack Weinberg as reported +in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=142312, +and discussed in http://sourceware.org/ml/libc-alpha/2002-04/msg00069.html +and following. + +Signed-off-by: Carmelo Amoroso +--- + libc/inet/rpc/auth_none.c | 59 +++++++++++++++++++++---------------------- + libc/inet/rpc/rpc_private.h | 2 -- + libc/inet/rpc/rpc_thread.c | 1 - + 3 files changed, 29 insertions(+), 33 deletions(-) + +diff --git a/libc/inet/rpc/auth_none.c b/libc/inet/rpc/auth_none.c +index c48bbfe..d066f6b 100644 +--- a/libc/inet/rpc/auth_none.c ++++ b/libc/inet/rpc/auth_none.c +@@ -66,49 +66,48 @@ struct authnone_private_s { + char marshalled_client[MAX_MARSHAL_SIZE]; + u_int mcnt; + }; +-#ifdef __UCLIBC_HAS_THREADS__ +-#define authnone_private (*(struct authnone_private_s **)&RPC_THREAD_VARIABLE(authnone_private_s)) +-#else +-static struct authnone_private_s *authnone_private; +-#endif + +-AUTH * +-authnone_create (void) ++static struct authnone_private_s authnone_private; ++__libc_once_define(static, authnone_private_guard); ++ ++static void authnone_create_once (void); ++ ++static void ++authnone_create_once (void) + { + struct authnone_private_s *ap; + XDR xdr_stream; + XDR *xdrs; + +- ap = (struct authnone_private_s *) authnone_private; +- if (ap == NULL) +- { +- ap = (struct authnone_private_s *) calloc (1, sizeof (*ap)); +- if (ap == NULL) +- return NULL; +- authnone_private = ap; +- } +- if (!ap->mcnt) +- { +- ap->no_client.ah_cred = ap->no_client.ah_verf = _null_auth; +- ap->no_client.ah_ops = (struct auth_ops *)&ops; +- xdrs = &xdr_stream; +- xdrmem_create (xdrs, ap->marshalled_client, (u_int) MAX_MARSHAL_SIZE, +- XDR_ENCODE); +- (void) xdr_opaque_auth (xdrs, &ap->no_client.ah_cred); +- (void) xdr_opaque_auth (xdrs, &ap->no_client.ah_verf); +- ap->mcnt = XDR_GETPOS (xdrs); +- XDR_DESTROY (xdrs); +- } +- return (&ap->no_client); ++ ap = &authnone_private; ++ ++ ap->no_client.ah_cred = ap->no_client.ah_verf = _null_auth; ++ ap->no_client.ah_ops = (struct auth_ops *) &ops; ++ xdrs = &xdr_stream; ++ xdrmem_create(xdrs, ap->marshalled_client, ++ (u_int) MAX_MARSHAL_SIZE, XDR_ENCODE); ++ (void) xdr_opaque_auth(xdrs, &ap->no_client.ah_cred); ++ (void) xdr_opaque_auth(xdrs, &ap->no_client.ah_verf); ++ ap->mcnt = XDR_GETPOS (xdrs); ++ XDR_DESTROY (xdrs); ++} ++ ++AUTH * ++authnone_create (void) ++{ ++ __libc_once (authnone_private_guard, authnone_create_once); ++ return &authnone_private.no_client; + } + libc_hidden_def(authnone_create) + + static bool_t +-authnone_marshal (AUTH *client attribute_unused, XDR *xdrs) ++authnone_marshal (AUTH *client, XDR *xdrs) + { + struct authnone_private_s *ap; + +- ap = authnone_private; ++ /* authnone_create returned authnone_private->no_client, which is ++ the first field of struct authnone_private_s. */ ++ ap = (struct authnone_private_s *) client; + if (ap == NULL) + return FALSE; + return (*xdrs->x_ops->x_putbytes) (xdrs, ap->marshalled_client, ap->mcnt); +diff --git a/libc/inet/rpc/rpc_private.h b/libc/inet/rpc/rpc_private.h +index ede3ddf..e1214d2 100644 +--- a/libc/inet/rpc/rpc_private.h ++++ b/libc/inet/rpc/rpc_private.h +@@ -18,8 +18,6 @@ struct rpc_thread_variables { + struct pollfd *svc_pollfd_s; /* Global, rpc_common.c */ + int svc_max_pollfd_s; /* Global, rpc_common.c */ + +- void *authnone_private_s; /* auth_none.c */ +- + void *clnt_perr_buf_s; /* clnt_perr.c */ + + void *clntraw_private_s; /* clnt_raw.c */ +diff --git a/libc/inet/rpc/rpc_thread.c b/libc/inet/rpc/rpc_thread.c +index 71303b2..3367659 100644 +--- a/libc/inet/rpc/rpc_thread.c ++++ b/libc/inet/rpc/rpc_thread.c +@@ -32,7 +32,6 @@ __rpc_thread_destroy (void) + __rpc_thread_svc_cleanup (); + __rpc_thread_clnt_cleanup (); + /*__rpc_thread_key_cleanup (); */ +- free (tvp->authnone_private_s); + free (tvp->clnt_perr_buf_s); + free (tvp->clntraw_private_s); + free (tvp->svcraw_private_s); +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0023-MIPS-Convert-__syscall_error-callers-to-use-a0-for-a.patch b/package/uclibc/0.9.33.2/uclibc-0023-MIPS-Convert-__syscall_error-callers-to-use-a0-for-a.patch new file mode 100644 index 0000000000..7103f59dd9 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0023-MIPS-Convert-__syscall_error-callers-to-use-a0-for-a.patch @@ -0,0 +1,57 @@ +From 6e2dbd7387bc2381e08aa85d6d33bb2d2d140843 Mon Sep 17 00:00:00 2001 +From: Kevin Cernekee +Date: Tue, 5 Jun 2012 15:05:19 -0700 +Subject: [PATCH] MIPS: Convert __syscall_error() callers to use $a0 for + argument + +Some callers passed the first argument in $v0, while others used $a0. +Change the callers to use $a0 consistently. + +Signed-off-by: Kevin Cernekee +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/sysdeps/linux/mips/vfork.S | 1 + + .../linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h | 2 +- + libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S | 1 + + 3 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/libc/sysdeps/linux/mips/vfork.S b/libc/sysdeps/linux/mips/vfork.S +index b307447..00cc675 100644 +--- a/libc/sysdeps/linux/mips/vfork.S ++++ b/libc/sysdeps/linux/mips/vfork.S +@@ -84,6 +84,7 @@ NESTED(__vfork,FRAMESZ,sp) + + /* Something bad happened -- no child created. */ + L(error): ++ move a0, v0 + #ifdef __PIC__ + PTR_LA t9, __syscall_error + RESTORE_GP64 +diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h +index fc51774..4d2c405 100644 +--- a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h ++++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h +@@ -31,7 +31,7 @@ + # undef PSEUDO + # define PSEUDO(name, syscall_name, args) \ + .align 2; \ +- 99: \ ++ 99: move a0, v0; \ + PTR_LA t9,__syscall_error; \ + /* manual cpreturn. */ \ + REG_L gp, STKOFF_GP(sp); \ +diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S +index 7bbab5c..238d798 100644 +--- a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S ++++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S +@@ -80,6 +80,7 @@ NESTED(__vfork,FRAMESZ,sp) + + /* Something bad happened -- no child created. */ + L(error): ++ move a0, v0 + #ifdef __PIC__ + PTR_LA t9, __syscall_error + RESTORE_GP64 +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0024-MIPS-Use-a0-instead-of-v0-for-__syscall_error-argume.patch b/package/uclibc/0.9.33.2/uclibc-0024-MIPS-Use-a0-instead-of-v0-for-__syscall_error-argume.patch new file mode 100644 index 0000000000..f48b9aeb45 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0024-MIPS-Use-a0-instead-of-v0-for-__syscall_error-argume.patch @@ -0,0 +1,63 @@ +From c8f9e946bc2a0a42e84b5f97f272932de6485b54 Mon Sep 17 00:00:00 2001 +From: Kevin Cernekee +Date: Tue, 5 Jun 2012 15:05:20 -0700 +Subject: [PATCH] MIPS: Use $a0 instead of $v0 for __syscall_error() argument + +$a0 is saved across _dl_runtime_resolve(); $v0 is not. Unfortunately, +__syscall_error() uses $v0 for its argument, not $a0 as is the MIPS ABI +standard. This means that if lazy binding was used for __syscall_error(), +the errno value in $v0 could get corrupted. + +The problem can be easily seen in testcases where syscalls in librt fail; +when librt tries to call __syscall_error() in libc, the argument gets +lost and errno gets set to a bogus value: + + # ./tst-mqueue1 ; echo $? + mq_receive on O_WRONLY mqd_t did not fail with EBADF: Unknown error 2004684208 + 1 + # ./tst-mqueue2 ; echo $? + mq_timedreceive with too small msg_len did not fail with EMSGSIZE: Unknown error 1997360560 + 1 + # ./tst-mqueue4 ; echo $? + mq_timedsend did not fail with ETIMEDOUT: Unknown error 2008747440 + 1 + +When _dl_runtime_resolve() was taken out of the equation, the same test +cases passed: + + # LD_BIND_NOW=y ./tst-mqueue1 ; echo $? + 0 + # LD_BIND_NOW=y ./tst-mqueue2 ; echo $? + 0 + # LD_BIND_NOW=y ./tst-mqueue4 ; echo $? + 0 + +Changing __syscall_error() to look at $a0 instead of $v0 fixed the +problem. + +(Note that there is also a "__syscall_error.c" file which presumably +uses the standard C calling conventions, but I do not think it is used +on MIPS.) + +Signed-off-by: Kevin Cernekee +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/sysdeps/linux/mips/syscall_error.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libc/sysdeps/linux/mips/syscall_error.S b/libc/sysdeps/linux/mips/syscall_error.S +index 51a8efa..0cc20da 100644 +--- a/libc/sysdeps/linux/mips/syscall_error.S ++++ b/libc/sysdeps/linux/mips/syscall_error.S +@@ -43,7 +43,7 @@ ENTRY(__syscall_error) + #ifdef __PIC__ + SAVE_GP(GPOFF) + #endif +- REG_S v0, V0OFF(sp) ++ REG_S a0, V0OFF(sp) + REG_S ra, RAOFF(sp) + + /* Find our per-thread errno address */ +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0025-ldso-use-.arm-mode-for-resolver-unconditionally.patch b/package/uclibc/0.9.33.2/uclibc-0025-ldso-use-.arm-mode-for-resolver-unconditionally.patch new file mode 100644 index 0000000000..d33a0cddcb --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0025-ldso-use-.arm-mode-for-resolver-unconditionally.patch @@ -0,0 +1,29 @@ +From 753e4e4cd9177f25981e81f82cd9fe8612a95ba6 Mon Sep 17 00:00:00 2001 +From: Bernhard Reutner-Fischer +Date: Fri, 15 Jun 2012 13:44:35 +0200 +Subject: [PATCH] ldso: use .arm mode for resolver unconditionally + +as per comment in the file. +Fixes runtime with __THUMB_INTERWORK__ enabled. + +Signed-off-by: Bernhard Reutner-Fischer +--- + ldso/ldso/arm/resolve.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ldso/ldso/arm/resolve.S b/ldso/ldso/arm/resolve.S +index 08889d0..b0907f7 100644 +--- a/ldso/ldso/arm/resolve.S ++++ b/ldso/ldso/arm/resolve.S +@@ -101,7 +101,7 @@ + + .text + .align 4 @ 16 byte boundary and there are 32 bytes below (arm case) +- #if !defined(__thumb__) || defined(__thumb2__) ++#if 1 /*(!defined(__thumb__) || defined __THUMB_INTERWORK__) || defined(__thumb2__)*/ + .arm + .globl _dl_linux_resolve + .type _dl_linux_resolve,%function +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0026-make-NPTL-s-getpid-behave-similar-to-the-common-one.patch b/package/uclibc/0.9.33.2/uclibc-0026-make-NPTL-s-getpid-behave-similar-to-the-common-one.patch new file mode 100644 index 0000000000..11f7e2e0fa --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0026-make-NPTL-s-getpid-behave-similar-to-the-common-one.patch @@ -0,0 +1,53 @@ +From 8a2b550a510cf2a1a0989fc0a665a6a42c83efd4 Mon Sep 17 00:00:00 2001 +From: "Peter S. Mazinger" +Date: Fri, 22 Apr 2011 00:52:22 +0200 +Subject: [PATCH] make NPTL's getpid behave similar to the common one + +make __getpid static +provide getppid alias if needed +remove unneeded libc_hidden_proto + +Signed-off-by: Peter S. Mazinger +Signed-off-by: Bernhard Reutner-Fischer +--- + libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c b/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c +index d4de3cd..d2b3384 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c +@@ -21,6 +21,10 @@ + #include + #include + ++#ifdef __NR_getxpid ++# undef __NR_getpid ++# define __NR_getpid __NR_getxpid ++#endif + + #ifndef NOT_IN_libc + static inline __attribute__((always_inline)) pid_t really_getpid (pid_t oldval); +@@ -46,8 +50,7 @@ really_getpid (pid_t oldval) + } + #endif + +-extern __typeof(getpid) __getpid; +-pid_t ++static pid_t + __getpid (void) + { + #ifdef NOT_IN_libc +@@ -60,6 +63,8 @@ __getpid (void) + #endif + return result; + } +-libc_hidden_proto(getpid) + weak_alias(__getpid, getpid) + libc_hidden_weak(getpid) ++#if !defined NOT_IN_libc && !defined __NR_getppid ++strong_alias(getpid,getppid) ++#endif +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0027-i386-bits-syscalls.h-allow-immediate-values-as-6th-s.patch b/package/uclibc/0.9.33.2/uclibc-0027-i386-bits-syscalls.h-allow-immediate-values-as-6th-s.patch new file mode 100644 index 0000000000..5df42ea95d --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0027-i386-bits-syscalls.h-allow-immediate-values-as-6th-s.patch @@ -0,0 +1,33 @@ +From 576983880a0ab5d27a4f530d2cef36239b617e78 Mon Sep 17 00:00:00 2001 +From: Natanael Copa +Date: Thu, 5 Jul 2012 11:55:19 +0000 +Subject: [PATCH] i386/bits/syscalls.h: allow immediate values as 6th syscall + arg + +Allow use of immedate values as the 6th syscall argument. Otherwise we must +store the arg on memory. This gives gcc more options to optimize better. + +This also works around an issue with posix_fallocate. + +Signed-off-by: Natanael Copa +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/sysdeps/linux/i386/bits/syscalls.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libc/sysdeps/linux/i386/bits/syscalls.h b/libc/sysdeps/linux/i386/bits/syscalls.h +index 9fb4f35..566b5ac 100644 +--- a/libc/sysdeps/linux/i386/bits/syscalls.h ++++ b/libc/sysdeps/linux/i386/bits/syscalls.h +@@ -136,7 +136,7 @@ __asm__ ( + #define ASMFMT_5(arg1, arg2, arg3, arg4, arg5) \ + , "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5) + #define ASMFMT_6(arg1, arg2, arg3, arg4, arg5, arg6) \ +- , "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5), "m" (arg6) ++ , "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5), "g" (arg6) + + #else /* !PIC */ + +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0028-dl-fix-dlsym-lookups-with-RTLD_NEXT.patch b/package/uclibc/0.9.33.2/uclibc-0028-dl-fix-dlsym-lookups-with-RTLD_NEXT.patch new file mode 100644 index 0000000000..374136757c --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0028-dl-fix-dlsym-lookups-with-RTLD_NEXT.patch @@ -0,0 +1,57 @@ +From f5108ce0c0f72a285e4cb198426e477295c84517 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timo=20Ter=C3=A4s?= +Date: Tue, 8 Jan 2013 11:55:26 +0200 +Subject: [PATCH] dl: fix dlsym lookups with RTLD_NEXT +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The current code for dlsym() when invoked with RTLD_NEXT lookup +searches for the module where it's being called from, and executes the +_dl_find_hash only for the next module in the chain. However, if the +looked symbol is not there, the rest of the modules are not checked. + +Generally this is not a problem as symbols are merged for the parent +modules; so this affects only RTLD_NEXT. + +This patch adds a loop iterating through all the following modules. + +Signed-off-by: Timo Teräs +Reviewed-by: Filippo ARCIDIACONO +Tested-by: Florian Fainelli +Signed-off-by: Bernhard Reutner-Fischer +--- + ldso/libdl/libdl.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c +index 51bcf7d..71ade1f 100644 +--- a/ldso/libdl/libdl.c ++++ b/ldso/libdl/libdl.c +@@ -671,7 +671,7 @@ static void *do_dlsym(void *vhandle, const char *name, void *caller_address) + { + struct elf_resolve *tpnt, *tfrom; + struct dyn_elf *handle; +- ElfW(Addr) from; ++ ElfW(Addr) from = 0; + struct dyn_elf *rpnt; + void *ret; + struct symbol_ref sym_ref = { NULL, NULL }; +@@ -729,7 +729,13 @@ static void *do_dlsym(void *vhandle, const char *name, void *caller_address) + tpnt = NULL; + if (handle == _dl_symbol_tables) + tpnt = handle->dyn; /* Only search RTLD_GLOBAL objs if global object */ +- ret = _dl_find_hash(name2, &handle->dyn->symbol_scope, tpnt, ELF_RTYPE_CLASS_DLSYM, &sym_ref); ++ ++ do { ++ ret = _dl_find_hash(name2, &handle->dyn->symbol_scope, tpnt, ELF_RTYPE_CLASS_DLSYM, &sym_ref); ++ if (ret != NULL) ++ break; ++ handle = handle->next; ++ } while (from && handle); + + #if defined(USE_TLS) && USE_TLS && defined SHARED + if (sym_ref.sym && (ELF_ST_TYPE(sym_ref.sym->st_info) == STT_TLS) && (sym_ref.tpnt)) { +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0029-inet-rpc-fix-build-in-NPTL-case.patch b/package/uclibc/0.9.33.2/uclibc-0029-inet-rpc-fix-build-in-NPTL-case.patch new file mode 100644 index 0000000000..716052a15d --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0029-inet-rpc-fix-build-in-NPTL-case.patch @@ -0,0 +1,58 @@ +From 3a732cacd650bd39d86ac13ba0f57eee0df82d5a Mon Sep 17 00:00:00 2001 +From: Carmelo Amoroso +Date: Wed, 14 Mar 2012 15:21:36 +0100 +Subject: [PATCH] inet:rpc: fix build in !NPTL case + +__libc_once is not available / needed when multithreading support +is not enabled, so authnone_create() calls authnone_create_once() +directly. +When LT.{old,new} is used instead of NPTL, it needs to explicitly +include to get __libc_once to be visible. + +Signed-off-by: Carmelo Amoroso +--- + libc/inet/rpc/auth_none.c | 6 ++++++ + libc/inet/rpc/rpc_private.h | 1 + + 2 files changed, 7 insertions(+) + +diff --git a/libc/inet/rpc/auth_none.c b/libc/inet/rpc/auth_none.c +index d066f6b..70bee5b 100644 +--- a/libc/inet/rpc/auth_none.c ++++ b/libc/inet/rpc/auth_none.c +@@ -68,7 +68,9 @@ struct authnone_private_s { + }; + + static struct authnone_private_s authnone_private; ++#ifdef __UCLIBC_HAS_THREADS__ + __libc_once_define(static, authnone_private_guard); ++#endif + + static void authnone_create_once (void); + +@@ -95,7 +97,11 @@ authnone_create_once (void) + AUTH * + authnone_create (void) + { ++#ifdef __UCLIBC_HAS_THREADS__ + __libc_once (authnone_private_guard, authnone_create_once); ++#else ++ authnone_create_once(); ++#endif + return &authnone_private.no_client; + } + libc_hidden_def(authnone_create) +diff --git a/libc/inet/rpc/rpc_private.h b/libc/inet/rpc/rpc_private.h +index e1214d2..38ade1c 100644 +--- a/libc/inet/rpc/rpc_private.h ++++ b/libc/inet/rpc/rpc_private.h +@@ -12,6 +12,7 @@ extern u_long _create_xid (void) attribute_hidden; + */ + #ifdef __UCLIBC_HAS_THREADS__ + #include ++#include + struct rpc_thread_variables { + fd_set svc_fdset_s; /* Global, rpc_common.c */ + struct rpc_createerr rpc_createerr_s; /* Global, rpc_common.c */ +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0030-stdio-implement-assignment-allocation-m-character.patch b/package/uclibc/0.9.33.2/uclibc-0030-stdio-implement-assignment-allocation-m-character.patch new file mode 100644 index 0000000000..42a27372da --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0030-stdio-implement-assignment-allocation-m-character.patch @@ -0,0 +1,190 @@ +From 050cd6971f92c2337bc506043dfcf1395dd5d622 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Sun, 6 May 2012 03:50:44 -0400 +Subject: [PATCH] stdio: implement assignment-allocation "m" character + +The latest POSIX spec introduces a "m" character to allocate buffers for +the user when using scanf type functions. This is like the old glibc "a" +flag, but now standardized. With packages starting to use these, we need +to implement it. + +for example: + char *s; + sscanf("foo", "%ms", &s); + printf("%s\n", s); + free(s); +This will automatically allocate storage for "s", read in "foo" to it, +and then display it. + +I'm not terribly familiar with the stdio layer, so this could be wrong. +But it seems to work for me. + +Signed-off-by: Mike Frysinger +--- + extra/Configs/Config.in | 13 --------- + libc/stdio/_scanf.c | 68 +++++++++++++++++++++++++++-------------------- + 2 files changed, 39 insertions(+), 42 deletions(-) + +diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in +index 1060729..c2f2fc7 100644 +--- a/extra/Configs/Config.in ++++ b/extra/Configs/Config.in +@@ -1590,19 +1590,6 @@ config UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS + + Most people will answer 9. + +- +-config UCLIBC_HAS_SCANF_GLIBC_A_FLAG +- bool "Support glibc's 'a' flag for scanf string conversions (not implemented)" +- help +- NOTE!!! Currently Not Implemented!!! Just A Place Holder!! NOTE!!! +- NOTE!!! Conflicts with an ANSI/ISO C99 scanf flag!! NOTE!!! +- +- Answer Y to enable support for glibc's 'a' flag for the scanf string +- conversions '%s', '%[', '%ls', '%l[', and '%S'. This is used to +- auto-allocate sufficient memory to hold the data retrieved. +- +- Most people will answer N. +- + choice + prompt "Stdio buffer size" + default UCLIBC_HAS_STDIO_BUFSIZ_4096 +diff --git a/libc/stdio/_scanf.c b/libc/stdio/_scanf.c +index f38e72b..952853c 100644 +--- a/libc/stdio/_scanf.c ++++ b/libc/stdio/_scanf.c +@@ -77,14 +77,6 @@ + #include + #endif /* __UCLIBC_HAS_FLOATS__ */ + +-#ifdef __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__ +-#ifdef L_vfscanf +-/* only emit this once */ +-#warning Forcing undef of __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__ until implemented! +-#endif +-#undef __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__ +-#endif +- + #undef __STDIO_HAS_VSSCANF + #if defined(__STDIO_BUFFERS) || !defined(__UCLIBC_HAS_WCHAR__) || defined(__UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__) + #define __STDIO_HAS_VSSCANF 1 +@@ -433,8 +425,9 @@ libc_hidden_def(vswscanf) + + + /* float layout 0123456789012345678901 repeat n for "l[" */ +-#define SPEC_CHARS "npxXoudifFeEgGaACSncs[" +-/* npxXoudif eEgG CS cs[ */ ++#define SPEC_CHARS "npxXoudifFeEgGaACSnmcs[" ++/* npxXoudif eEgG CS cs[ */ ++/* NOTE: the 'm' flag must come before any convs that support it */ + + /* NOTE: Ordering is important! In particular, CONV_LEFTBRACKET + * must immediately precede CONV_c. */ +@@ -444,7 +437,7 @@ enum { + CONV_p, + CONV_x, CONV_X, CONV_o, CONV_u, CONV_d, CONV_i, + CONV_f, CONV_F, CONV_e, CONV_E, CONV_g, CONV_G, CONV_a, CONV_A, +- CONV_C, CONV_S, CONV_LEFTBRACKET, CONV_c, CONV_s, CONV_leftbracket, ++ CONV_C, CONV_S, CONV_LEFTBRACKET, CONV_m, CONV_c, CONV_s, CONV_leftbracket, + CONV_percent, CONV_whitespace /* not in SPEC_* and no flags */ + }; + +@@ -474,7 +467,7 @@ enum { + FLAG_SURPRESS = 0x10, /* MUST BE 1ST!! See DO_FLAGS. */ + FLAG_THOUSANDS = 0x20, + FLAG_I18N = 0x40, /* only works for d, i, u */ +- FLAG_MALLOC = 0x80, /* only works for s, S, and [ (and l[)*/ ++ FLAG_MALLOC = 0x80, /* only works for c, s, S, and [ (and l[)*/ + }; + + +@@ -491,7 +484,7 @@ enum { + /* fFeEgGaA */ (0x0c|FLAG_SURPRESS|FLAG_THOUSANDS|FLAG_I18N), \ + /* C */ ( 0|FLAG_SURPRESS), \ + /* S and l[ */ ( 0|FLAG_SURPRESS|FLAG_MALLOC), \ +- /* c */ (0x04|FLAG_SURPRESS), \ ++ /* c */ (0x04|FLAG_SURPRESS|FLAG_MALLOC), \ + /* s and [ */ (0x04|FLAG_SURPRESS|FLAG_MALLOC), \ + } + +@@ -904,17 +897,17 @@ int attribute_hidden __psfs_parse_spec(register psfs_t *psfs) + if (*psfs->fmt == *p) { + int p_m_spec_chars = p - spec_chars; + +-#ifdef __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__ +-#error implement gnu a flag +- if ((*p == 'a') +- && ((psfs->fmt[1] == '[') || ((psfs->fmt[1]|0x20) == 's')) +- ) { /* Assumes ascii for 's' and 'S' test. */ +- psfs->flags |= FLAG_MALLOC; ++ if (*p == 'm' && ++ (psfs->fmt[1] == '[' || psfs->fmt[1] == 'c' || ++ /* Assumes ascii for 's' and 'S' test. */ ++ (psfs->fmt[1] | 0x20) == 's')) ++ { ++ if (psfs->store) ++ psfs->flags |= FLAG_MALLOC; + ++psfs->fmt; + ++p; +- continue; /* The related conversions follow 'a'. */ ++ continue; /* The related conversions follow 'm'. */ + } +-#endif /* __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__ */ + + for (p = spec_ranges; p_m_spec_chars > *p ; ++p) {} + if (((psfs->dataargtype >> 8) | psfs->flags) +@@ -1265,12 +1258,6 @@ int VFSCANF (FILE *__restrict fp, const Wchar *__restrict format, va_list arg) + while (*wf && __isascii(*wf) && (b < buf + sizeof(buf) - 1)) { + *b++ = *wf++; + } +-#ifdef __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__ +-#error this is wrong... we need to ched in __psfs_parse_spec instead since this checks last char in buffer and conversion my have stopped before it. +- if ((*b == 'a') && ((*wf == '[') || ((*wf|0x20) == 's'))) { +- goto DONE; /* Spec was excessively long. */ +- } +-#endif /* __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__ */ + *b = 0; + if (b == buf) { /* Bad conversion specifier! */ + goto DONE; +@@ -1390,13 +1377,36 @@ int VFSCANF (FILE *__restrict fp, const Wchar *__restrict format, va_list arg) + } + + if (psfs.conv_num == CONV_s) { ++ /* We might have to handle the allocation ourselves */ ++ int len; ++ /* With 'm', we actually got a pointer to a pointer */ ++ unsigned char **ptr = (void *)b; ++ ++ i = 0; ++ if (psfs.flags & FLAG_MALLOC) { ++ len = 0; ++ b = NULL; ++ } else ++ len = -1; ++ + /* Yes, believe it or not, a %s conversion can store nuls. */ + while ((__scan_getc(&sc) >= 0) && !isspace(sc.cc)) { + zero_conversions = 0; +- *b = sc.cc; +- b += psfs.store; ++ if (i == len) { ++ /* Pick a size that won't trigger a lot of ++ * mallocs early on ... */ ++ len += 256; ++ b = realloc(b, len + 1); ++ } ++ b[i] = sc.cc; ++ i += psfs.store; + fail = 0; + } ++ ++ if (psfs.flags & FLAG_MALLOC) ++ *ptr = b; ++ /* The code below takes care of terminating NUL */ ++ b += i; + } else { + #ifdef __UCLIBC_HAS_WCHAR__ + assert((psfs.conv_num == CONV_LEFTBRACKET) || \ +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0031-mmap-sys_mmap2-do-unsigned-shift-of-offset.patch b/package/uclibc/0.9.33.2/uclibc-0031-mmap-sys_mmap2-do-unsigned-shift-of-offset.patch new file mode 100644 index 0000000000..475dcfdea7 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0031-mmap-sys_mmap2-do-unsigned-shift-of-offset.patch @@ -0,0 +1,35 @@ +From 569d1423ac2b585b5cb38bee545b5e0ae2bd7f67 Mon Sep 17 00:00:00 2001 +From: James Hogan +Date: Thu, 17 May 2012 12:42:54 +0100 +Subject: [PATCH] mmap()->sys_mmap2: do unsigned shift of offset + +Fix the implementation of mmap based on the mmap2 system call, to +construct pgoffset from offset with an unsigned shift rather than a +signed (off_t) shift. The mmap2 test in the testsuite catches this case +by mmap'ing with a large offset (with the sign bit set). The signed +shift repeats the sign bit making the page shift way out of range. This +is already fixed similarly in mmap64(). + +Signed-off-by: James Hogan +Signed-off-by: Mike Frysinger +--- + libc/sysdeps/linux/common/mmap.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libc/sysdeps/linux/common/mmap.c b/libc/sysdeps/linux/common/mmap.c +index 8995898..d53eabb 100644 +--- a/libc/sysdeps/linux/common/mmap.c ++++ b/libc/sysdeps/linux/common/mmap.c +@@ -63,7 +63,8 @@ __ptr_t mmap(__ptr_t addr, size_t len, int prot, int flags, int fd, __off_t offs + __set_errno(EINVAL); + return MAP_FAILED; + } +- return __syscall_mmap2(addr, len, prot, flags, fd, offset >> MMAP2_PAGE_SHIFT); ++ return __syscall_mmap2(addr, len, prot, flags, ++ fd, ((__u_long) offset >> MMAP2_PAGE_SHIFT)); + } + + libc_hidden_def(mmap) +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0032-pread-pwrite-handle-renamed-syscalls-in-common-ppc-x.patch b/package/uclibc/0.9.33.2/uclibc-0032-pread-pwrite-handle-renamed-syscalls-in-common-ppc-x.patch new file mode 100644 index 0000000000..6e6d88131b --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0032-pread-pwrite-handle-renamed-syscalls-in-common-ppc-x.patch @@ -0,0 +1,114 @@ +From 923e6f201b1d792cf069ca7f13c3715f4e9c9353 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Wed, 30 May 2012 01:15:03 -0400 +Subject: [PATCH] pread/pwrite: handle renamed syscalls in common/ppc/xtensa + code + +Some arches got this fix, but many did not. So copy the ifdef logic to +the ones that missed it to fix behavior in linux-2.6+. + +URL: https://bugs.busybox.net/show_bug.cgi?id=5258 +Reported-by: David Laight +Signed-off-by: Mike Frysinger +--- + libc/sysdeps/linux/common/pread_write.c | 12 +++++++++++- + libc/sysdeps/linux/powerpc/pread_write.c | 13 +++++++++++++ + libc/sysdeps/linux/xtensa/pread_write.c | 14 ++++++++++++++ + 3 files changed, 38 insertions(+), 1 deletion(-) + +diff --git a/libc/sysdeps/linux/common/pread_write.c b/libc/sysdeps/linux/common/pread_write.c +index c142038..b13de66 100644 +--- a/libc/sysdeps/linux/common/pread_write.c ++++ b/libc/sysdeps/linux/common/pread_write.c +@@ -35,6 +35,11 @@ extern __typeof(pread64) __libc_pread64; + extern __typeof(pwrite64) __libc_pwrite64; + #endif + ++#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */ ++# undef __NR_pread ++# define __NR_pread __NR_pread64 ++#endif ++ + #include + + # define __NR___syscall_pread __NR_pread64 +@@ -64,7 +69,12 @@ ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset) + weak_alias(__libc_pread64,pread64) + # endif /* __UCLIBC_HAS_LFS__ */ + +-# define __NR___syscall_pwrite __NR_pwrite64 ++#ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */ ++# undef __NR_pwrite ++# define __NR_pwrite __NR_pwrite64 ++#endif ++ ++# define __NR___syscall_pwrite __NR_pwrite + static __inline__ _syscall5(ssize_t, __syscall_pwrite, int, fd, const void *, buf, + size_t, count, off_t, offset_hi, off_t, offset_lo) + +diff --git a/libc/sysdeps/linux/powerpc/pread_write.c b/libc/sysdeps/linux/powerpc/pread_write.c +index 7f988d3..23f256f 100644 +--- a/libc/sysdeps/linux/powerpc/pread_write.c ++++ b/libc/sysdeps/linux/powerpc/pread_write.c +@@ -20,6 +20,13 @@ + # define off64_t off_t + #endif + ++#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */ ++# ifdef __NR_pread ++# error "__NR_pread and __NR_pread64 both defined???" ++# endif ++# define __NR_pread __NR_pread64 ++#endif ++ + #ifdef __NR_pread + extern __typeof(pread) __libc_pread; + # define __NR___syscall_pread __NR_pread +@@ -42,6 +49,12 @@ weak_alias(__libc_pread64,pread64) + # endif /* __UCLIBC_HAS_LFS__ */ + #endif /* __NR_pread */ + ++#ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */ ++# ifdef __NR_pwrite ++# error "__NR_pwrite and __NR_pwrite64 both defined???" ++# endif ++# define __NR_pwrite __NR_pwrite64 ++#endif + + #ifdef __NR_pwrite + extern __typeof(pwrite) __libc_pwrite; +diff --git a/libc/sysdeps/linux/xtensa/pread_write.c b/libc/sysdeps/linux/xtensa/pread_write.c +index 71ba22b..bcf7dee 100644 +--- a/libc/sysdeps/linux/xtensa/pread_write.c ++++ b/libc/sysdeps/linux/xtensa/pread_write.c +@@ -27,6 +27,13 @@ extern __typeof(pwrite64) __libc_pwrite64; + + #include + ++#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */ ++# ifdef __NR_pread ++# error "__NR_pread and __NR_pread64 both defined???" ++# endif ++# define __NR_pread __NR_pread64 ++#endif ++ + #ifdef __NR_pread + + # define __NR___syscall_pread __NR_pread +@@ -52,6 +59,13 @@ weak_alias(__libc_pread64,pread64) + + #endif /* __NR_pread */ + ++#ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */ ++# ifdef __NR_pwrite ++# error "__NR_pwrite and __NR_pwrite64 both defined???" ++# endif ++# define __NR_pwrite __NR_pwrite64 ++#endif ++ + #ifdef __NR_pwrite + + # define __NR___syscall_pwrite __NR_pwrite +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0033-rpmatch-backport-function.patch b/package/uclibc/0.9.33.2/uclibc-0033-rpmatch-backport-function.patch new file mode 100644 index 0000000000..6a74d78f68 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0033-rpmatch-backport-function.patch @@ -0,0 +1,78 @@ +From 929b1a121c5ff0daa33b2107b4c1a68b650d93ee Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Mon, 30 Apr 2012 00:40:49 -0400 +Subject: [PATCH] rpmatch: backport function + +rpmatch will match ^[Yy] and ^[Nn] regardless of locale + +Signed-off-by: Mike Frysinger +Signed-off-by: Bernhard Reutner-Fischer +--- + include/stdlib.h | 2 +- + libc/stdlib/Makefile.in | 2 +- + libc/stdlib/rpmatch.c | 7 +++++++ + libc/stdlib/stdlib.c | 8 ++++++++ + 4 files changed, 17 insertions(+), 2 deletions(-) + create mode 100644 libc/stdlib/rpmatch.c + +diff --git a/include/stdlib.h b/include/stdlib.h +index 4aa1227..42b585c 100644 +--- a/include/stdlib.h ++++ b/include/stdlib.h +@@ -851,7 +851,7 @@ __END_NAMESPACE_STD + #endif /* __UCLIBC_HAS_WCHAR__ */ + + +-#if 0 /*def __USE_SVID*/ ++#ifdef __USE_SVID + /* Determine whether the string value of RESPONSE matches the affirmation + or negative response expression as specified by the LC_MESSAGES category + in the program's current locale. Returns 1 if affirmative, 0 if +diff --git a/libc/stdlib/Makefile.in b/libc/stdlib/Makefile.in +index f219d21..e802441 100644 +--- a/libc/stdlib/Makefile.in ++++ b/libc/stdlib/Makefile.in +@@ -33,7 +33,7 @@ endif + + # multi source stdlib.c + CSRC-y += abs.c labs.c atoi.c atol.c strtol.c strtoul.c _stdlib_strto_l.c \ +- qsort.c qsort_r.c bsearch.c \ ++ qsort.c qsort_r.c bsearch.c rpmatch.c \ + llabs.c atoll.c strtoll.c strtoull.c _stdlib_strto_ll.c + # (aliases) strtoq.o strtouq.o + CSRC-$(UCLIBC_HAS_FLOATS) += atof.c +diff --git a/libc/stdlib/rpmatch.c b/libc/stdlib/rpmatch.c +new file mode 100644 +index 0000000..dce06b6 +--- /dev/null ++++ b/libc/stdlib/rpmatch.c +@@ -0,0 +1,7 @@ ++/* Copyright (C) 2012 Bernhard Reutner-Fischer ++ * ++ * Licensed under the LGPL v2.1+, see the file COPYING.LIB in this tarball. ++ */ ++ ++#define L_rpmatch ++#include "stdlib.c" +diff --git a/libc/stdlib/stdlib.c b/libc/stdlib/stdlib.c +index 9e8c347..de8f084 100644 +--- a/libc/stdlib/stdlib.c ++++ b/libc/stdlib/stdlib.c +@@ -318,6 +318,14 @@ long long atoll(const char *nptr) + + #endif + /**********************************************************************/ ++#ifdef L_rpmatch ++int rpmatch (__const char *__response) ++{ ++ return (__response[0] == 'y' || __response[0] == 'Y') ? 1 : ++ (__response[0] == 'n' || __response[0] == 'N') ? 0 : -1; ++} ++#endif ++/**********************************************************************/ + #if defined(L_strtol) || defined(L_strtol_l) + + libc_hidden_proto(__XL_NPP(strtol)) +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0034-statfs-support-f_frsize.patch b/package/uclibc/0.9.33.2/uclibc-0034-statfs-support-f_frsize.patch new file mode 100644 index 0000000000..102c5e815b --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0034-statfs-support-f_frsize.patch @@ -0,0 +1,189 @@ +From 479f8407c4822d2b872afb8bb14e5ab596714744 Mon Sep 17 00:00:00 2001 +From: Bernhard Reutner-Fischer +Date: Thu, 17 Jan 2013 22:44:00 +0100 +Subject: [PATCH] statfs: support f_frsize + +closes bugzilla #5834 + +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/misc/statfs/fstatfs64.c | 3 +++ + libc/misc/statfs/internal_statvfs.c | 8 ++++++-- + libc/misc/statfs/statfs64.c | 3 +++ + test/.gitignore | 3 +++ + test/misc/Makefile.in | 6 ++++++ + test/misc/tst-statfs.c | 33 +++++++++++++++++++++++++++++++++ + test/misc/tst-statvfs.c | 28 ++++++++++++++++++++++++++++ + 7 files changed, 82 insertions(+), 2 deletions(-) + create mode 100644 test/misc/tst-statfs.c + create mode 100644 test/misc/tst-statvfs.c + +diff --git a/libc/misc/statfs/fstatfs64.c b/libc/misc/statfs/fstatfs64.c +index 27bb8d6..42df1ae 100644 +--- a/libc/misc/statfs/fstatfs64.c ++++ b/libc/misc/statfs/fstatfs64.c +@@ -43,6 +43,9 @@ int fstatfs64 (int fd, struct statfs64 *buf) + buf->f_files = buf32.f_files; + buf->f_ffree = buf32.f_ffree; + buf->f_fsid = buf32.f_fsid; ++#ifdef _STATFS_F_FRSIZE ++ buf->f_frsize = buf32.f_frsize; ++#endif + buf->f_namelen = buf32.f_namelen; + memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare)); + +diff --git a/libc/misc/statfs/internal_statvfs.c b/libc/misc/statfs/internal_statvfs.c +index 6075e9c..c1862b5 100644 +--- a/libc/misc/statfs/internal_statvfs.c ++++ b/libc/misc/statfs/internal_statvfs.c +@@ -19,8 +19,12 @@ + + /* Now fill in the fields we have information for. */ + buf->f_bsize = fsbuf.f_bsize; +- /* Linux does not support f_frsize, so set it to the full block size. */ ++#ifdef _STATFS_F_FRSIZE ++ buf->f_frsize = fsbuf.f_frsize; ++#else ++ /* No support for f_frsize so set it to the full block size. */ + buf->f_frsize = fsbuf.f_bsize; ++#endif + buf->f_blocks = fsbuf.f_blocks; + buf->f_bfree = fsbuf.f_bfree; + buf->f_bavail = fsbuf.f_bavail; +@@ -39,7 +43,7 @@ + buf->__f_unused = 0; + #endif + buf->f_namemax = fsbuf.f_namelen; +- memset (buf->__f_spare, '\0', 6 * sizeof (int)); ++ memset (buf->__f_spare, '\0', sizeof(buf->__f_spare)); + + /* What remains to do is to fill the fields f_favail and f_flag. */ + +diff --git a/libc/misc/statfs/statfs64.c b/libc/misc/statfs/statfs64.c +index 0cc8595..35329bd 100644 +--- a/libc/misc/statfs/statfs64.c ++++ b/libc/misc/statfs/statfs64.c +@@ -42,6 +42,9 @@ int statfs64 (const char *file, struct statfs64 *buf) + buf->f_ffree = buf32.f_ffree; + buf->f_fsid = buf32.f_fsid; + buf->f_namelen = buf32.f_namelen; ++#ifdef _STATFS_F_FRSIZE ++ buf->f_frsize = buf32.f_frsize; ++#endif + memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare)); + + return 0; +diff --git a/test/.gitignore b/test/.gitignore +index c892816..7234c48 100644 +--- a/test/.gitignore ++++ b/test/.gitignore +@@ -148,6 +148,8 @@ misc/sem + misc/stdarg + misc/tst-scandir + misc/tst-seekdir ++misc/tst-statfs ++misc/tst-statvfs + misc/tst-utmp + mmap/mmap + mmap/mmap2 +@@ -254,6 +256,7 @@ stdio/64bit + stdio/fclose-loop + stdlib/ptytest + stdlib/qsort ++stdlib/testarc4random + stdlib/testatexit + stdlib/test-canon + stdlib/test-canon2 +diff --git a/test/misc/Makefile.in b/test/misc/Makefile.in +index 2263211..9b74d22 100644 +--- a/test/misc/Makefile.in ++++ b/test/misc/Makefile.in +@@ -9,6 +9,12 @@ CFLAGS_dirent64 := -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS + + DODIFF_dirent := 1 + DODIFF_dirent64 := 1 ++DODIFF_tst-statfs := 1 ++DODIFF_tst-statvfs := 1 + + OPTS_bug-glob1 := $(PWD) + OPTS_tst-fnmatch := < tst-fnmatch.input ++ ++MNTENTS = $(shell mount | while read dev on mp rest; do echo $$mp; done) ++OPTS_tst-statfs := $(MNTENTS) ++OPTS_tst-statvfs := $(MNTENTS) +diff --git a/test/misc/tst-statfs.c b/test/misc/tst-statfs.c +new file mode 100644 +index 0000000..44ab3aa +--- /dev/null ++++ b/test/misc/tst-statfs.c +@@ -0,0 +1,33 @@ ++#define _FILE_OFFSET_BITS 64 ++ ++#include ++#include ++#include ++#include ++#include ++ ++int ++main(int argc, char* argv[]) ++{ ++ struct statfs s; ++ int ret = 0, i; ++ ++ for (i = 1; i < argc; i++) { ++ if (statfs(argv[i], &s) != 0) { ++ fprintf(stderr, "%s: %s: statfs failed. %s\n", ++ *argv, argv[i], strerror(errno)); ++ exit(EXIT_FAILURE); ++ } ++ ++ret; ++ printf("statfs %s:\n\tblocks=%lld\n\tblkfree=%lld\n\tbsize=%d\n", ++ argv[i], s.f_blocks, s.f_bfree, s.f_bsize); ++#ifdef _STATFS_F_FRSIZE ++ printf("\tfrsize=%lld\n", s.f_frsize); ++#elif defined __mips__ ++ printf("\tfrsize=mips, unsupported?\n"); ++#else ++# error no _STATFS_F_FRSIZE ++#endif ++ } ++ exit(ret ? EXIT_SUCCESS : EXIT_FAILURE); ++} +diff --git a/test/misc/tst-statvfs.c b/test/misc/tst-statvfs.c +new file mode 100644 +index 0000000..c1e8fde +--- /dev/null ++++ b/test/misc/tst-statvfs.c +@@ -0,0 +1,28 @@ ++#define _FILE_OFFSET_BITS 64 ++ ++#include ++#include ++#include ++#include ++#include ++ ++int ++main(int argc, char* argv[]) ++{ ++ struct statvfs s; ++ int i; ++ ++ for (i = 1; i < argc; i++) { ++ if (statvfs(argv[i], &s) != 0) { ++ fprintf(stderr, "%s: %s: statvfs failed. %s\n", ++ *argv, argv[i], strerror(errno)); ++ exit(EXIT_FAILURE); ++ } ++ printf("statvfs %s:\n\tblocks=%lld\n\tblkfree=%lld\n\tbsize=%d\n", ++ argv[i], s.f_blocks, s.f_bfree, s.f_bsize); ++#if 1 // def _STATFS_F_FRSIZE ++ printf("\tfrsize=%lld\n", s.f_frsize); ++#endif ++ } ++ exit(EXIT_SUCCESS); ++} +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0035-socket.h-pull-socket_type.h-from-eglibc.patch b/package/uclibc/0.9.33.2/uclibc-0035-socket.h-pull-socket_type.h-from-eglibc.patch new file mode 100644 index 0000000000..1bea7fb259 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0035-socket.h-pull-socket_type.h-from-eglibc.patch @@ -0,0 +1,1374 @@ +From 8eccce991d08960d135b97066621c8d3248a79b7 Mon Sep 17 00:00:00 2001 +From: Bernhard Reutner-Fischer +Date: Thu, 17 Jan 2013 19:29:22 +0100 +Subject: [PATCH] socket.h: pull socket_type.h from eglibc + +Signed-off-by: Bernhard Reutner-Fischer +--- + Makefile.in | 2 +- + libc/inet/opensock.c | 9 +- + libc/sysdeps/linux/alpha/bits/socket_type.h | 54 ++++ + libc/sysdeps/linux/common/bits/kernel-features.h | 10 +- + libc/sysdeps/linux/common/bits/socket.h | 104 +++--- + libc/sysdeps/linux/common/bits/socket_type.h | 54 ++++ + libc/sysdeps/linux/common/cmsg_nxthdr.c | 1 + + libc/sysdeps/linux/hppa/bits/socket_type.h | 54 ++++ + libc/sysdeps/linux/mips/bits/socket.h | 369 --------------------- + libc/sysdeps/linux/mips/bits/socket_type.h | 55 ++++ + libc/sysdeps/linux/sparc/bits/socket.h | 376 ---------------------- + libc/sysdeps/linux/sparc/bits/socket_type.h | 54 ++++ + 12 files changed, 325 insertions(+), 817 deletions(-) + create mode 100644 libc/sysdeps/linux/alpha/bits/socket_type.h + create mode 100644 libc/sysdeps/linux/common/bits/socket_type.h + create mode 100644 libc/sysdeps/linux/hppa/bits/socket_type.h + delete mode 100644 libc/sysdeps/linux/mips/bits/socket.h + create mode 100644 libc/sysdeps/linux/mips/bits/socket_type.h + delete mode 100644 libc/sysdeps/linux/sparc/bits/socket.h + create mode 100644 libc/sysdeps/linux/sparc/bits/socket_type.h + +diff --git a/Makefile.in b/Makefile.in +index 87b8e4b..69abfaf 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -255,7 +255,7 @@ HEADERS_RM-$(UCLIBC_HAS_REALTIME) += mqueue.h bits/mqueue.h sched.h \ + HEADERS_RM-$(UCLIBC_HAS_REGEX) += regex.h regexp.h + HEADERS_RM-$(UCLIBC_HAS_RPC) += rpc + HEADERS_RM-$(UCLIBC_HAS_SHADOW) += shadow.h +-HEADERS_RM-$(UCLIBC_HAS_SOCKET) += sys/socket.h bits/socket.h sys/socketvar.h ++HEADERS_RM-$(UCLIBC_HAS_SOCKET) += sys/socket.h bits/socket.h sys/socketvar.h bits/socket_type.h + HEADERS_RM-$(UCLIBC_HAS_SYSLOG) += syslog.h sys/syslog.h bits/syslog*.h + HEADERS_RM-$(UCLIBC_HAS_THREADS) += *thread*.h semaphore.h \ + bits/*thread*.h \ +diff --git a/libc/inet/opensock.c b/libc/inet/opensock.c +index 86f8c59..da5858f 100644 +--- a/libc/inet/opensock.c ++++ b/libc/inet/opensock.c +@@ -16,14 +16,11 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +-#include +-#include +-#include +-#include +-#include +-#include ++ + #include + #include ++#include ++#include + + /* Return a socket of any type. The socket can be used in subsequent + ioctl calls to talk to the kernel. */ +diff --git a/libc/sysdeps/linux/alpha/bits/socket_type.h b/libc/sysdeps/linux/alpha/bits/socket_type.h +new file mode 100644 +index 0000000..ee55d66 +--- /dev/null ++++ b/libc/sysdeps/linux/alpha/bits/socket_type.h +@@ -0,0 +1,54 @@ ++/* Define enum __socket_type for Linux/Alpha. ++ Copyright (C) 1991-2012 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library. If not, see ++ . */ ++ ++#ifndef _SYS_SOCKET_H ++# error "Never include directly; use instead." ++#endif ++ ++/* Types of sockets. */ ++enum __socket_type ++{ ++ SOCK_STREAM = 1, /* Sequenced, reliable, connection-based ++ byte streams. */ ++#define SOCK_STREAM SOCK_STREAM ++ SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams ++ of fixed maximum length. */ ++#define SOCK_DGRAM SOCK_DGRAM ++ SOCK_RAW = 3, /* Raw protocol interface. */ ++#define SOCK_RAW SOCK_RAW ++ SOCK_RDM = 4, /* Reliably-delivered messages. */ ++#define SOCK_RDM SOCK_RDM ++ SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, ++ datagrams of fixed maximum length. */ ++#define SOCK_SEQPACKET SOCK_SEQPACKET ++ SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */ ++#define SOCK_DCCP SOCK_DCCP ++ SOCK_PACKET = 10, /* Linux specific way of getting packets ++ at the dev level. For writing rarp and ++ other similar things on the user level. */ ++#define SOCK_PACKET SOCK_PACKET ++ ++ /* Flags to be ORed into the type parameter of socket and socketpair. */ ++ ++ SOCK_CLOEXEC = 010000000, /* Atomically set close-on-exec flag for the ++ new descriptor(s). */ ++#define SOCK_CLOEXEC SOCK_CLOEXEC ++ SOCK_NONBLOCK = 0x40000000 /* Atomically mark descriptor(s) as ++ non-blocking. */ ++#define SOCK_NONBLOCK SOCK_NONBLOCK ++}; +diff --git a/libc/sysdeps/linux/common/bits/kernel-features.h b/libc/sysdeps/linux/common/bits/kernel-features.h +index 5ea85d2..5665e24 100644 +--- a/libc/sysdeps/linux/common/bits/kernel-features.h ++++ b/libc/sysdeps/linux/common/bits/kernel-features.h +@@ -311,17 +311,19 @@ + + /* Support for various CLOEXEC and NONBLOCK flags was added for x86, + * x86-64, PPC, IA-64, and SPARC in 2.6.27. */ +-#if __LINUX_KERNEL_VERSION >= 0x02061b \ +- && (defined __i386__ || defined __x86_64__ || defined __powerpc__ \ +- || defined __ia64__ || defined __sparc__ || defined __s390__) ++#if (__LINUX_KERNEL_VERSION >= 0x02061b \ ++ && (defined __i386__ || defined __x86_64__ || defined __powerpc__ \ ++ || defined __ia64__ || defined __sparc__ || defined __s390__) \ ++ ) || (__LINUX_KERNEL_VERSION >= 0x020621 && defined __alpha__) \ ++ || defined __aarch64__ || defined __tile__ + /* # define __ASSUME_SOCK_CLOEXEC 1 */ + /* # define __ASSUME_IN_NONBLOCK 1 */ + # define __ASSUME_PIPE2 1 + /* # define __ASSUME_EVENTFD2 1 */ + /* # define __ASSUME_SIGNALFD4 1 */ ++/* # define __ASSUME_DUP3 1 */ + #endif + +- + /* These features were surely available with 2.4.12. */ + #if __LINUX_KERNEL_VERSION >= 132108 && defined __mc68000__ + # define __ASSUME_MMAP2_SYSCALL 1 +diff --git a/libc/sysdeps/linux/common/bits/socket.h b/libc/sysdeps/linux/common/bits/socket.h +index 7e12733..6a89340 100644 +--- a/libc/sysdeps/linux/common/bits/socket.h ++++ b/libc/sysdeps/linux/common/bits/socket.h +@@ -1,5 +1,6 @@ + /* System-specific socket constants and types. Linux version. +- Copyright (C) 1991,1992,1994-2001,2004,2006 Free Software Foundation, Inc. ++ Copyright (C) 1991,1992,1994-2001,2004,2006-2012 ++ Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -20,12 +21,11 @@ + #ifndef __BITS_SOCKET_H + #define __BITS_SOCKET_H + +-#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H ++#ifndef _SYS_SOCKET_H + # error "Never include directly; use instead." + #endif + + #define __need_size_t +-#define __need_NULL + #include + + #include +@@ -37,37 +37,8 @@ typedef __socklen_t socklen_t; + # define __socklen_t_defined + #endif + +-/* Types of sockets. */ +-enum __socket_type +-{ +- SOCK_STREAM = 1, /* Sequenced, reliable, connection-based +- byte streams. */ +-#define SOCK_STREAM SOCK_STREAM +- SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams +- of fixed maximum length. */ +-#define SOCK_DGRAM SOCK_DGRAM +- SOCK_RAW = 3, /* Raw protocol interface. */ +-#define SOCK_RAW SOCK_RAW +- SOCK_RDM = 4, /* Reliably-delivered messages. */ +-#define SOCK_RDM SOCK_RDM +- SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, +- datagrams of fixed maximum length. */ +-#define SOCK_SEQPACKET SOCK_SEQPACKET +- SOCK_PACKET = 10, /* Linux specific way of getting packets +- at the dev level. For writing rarp and +- other similar things on the user level. */ +-#define SOCK_PACKET SOCK_PACKET +- +- /* Flags to be ORed into the type parameter of socket and socketpair and +- used for the flags parameter of paccept. */ +- +- SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the +- new descriptor(s). */ +-#define SOCK_CLOEXEC SOCK_CLOEXEC +- SOCK_NONBLOCK = 04000 /* Atomically mark descriptor(s) as +- non-blocking. */ +-#define SOCK_NONBLOCK SOCK_NONBLOCK +-}; ++/* Get the architecture-dependent definition of enum __socket_type. */ ++#include + + /* Protocol families. */ + #define PF_UNSPEC 0 /* Unspecified. */ +@@ -94,22 +65,24 @@ enum __socket_type + #define PF_ASH 18 /* Ash. */ + #define PF_ECONET 19 /* Acorn Econet. */ + #define PF_ATMSVC 20 /* ATM SVCs. */ ++#define PF_RDS 21 /* RDS sockets. */ + #define PF_SNA 22 /* Linux SNA Project */ + #define PF_IRDA 23 /* IRDA sockets. */ + #define PF_PPPOX 24 /* PPPoX sockets. */ + #define PF_WANPIPE 25 /* Wanpipe API sockets. */ +-#define PF_LLC 26 /* Linux LLC. */ +-#define PF_CAN 29 /* Controller Area Network. */ +-#define PF_TIPC 30 /* TIPC sockets. */ ++#define PF_LLC 26 /* Linux LLC. */ ++#define PF_CAN 29 /* Controller Area Network. */ ++#define PF_TIPC 30 /* TIPC sockets. */ + #define PF_BLUETOOTH 31 /* Bluetooth sockets. */ + #define PF_IUCV 32 /* IUCV sockets. */ +-#define PF_RXRPC 33 /* RxRPC sockets. */ +-#define PF_ISDN 34 /* mISDN sockets. */ +-#define PF_PHONET 35 /* Phonet sockets. */ +-#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */ +-#define PF_CAIF 37 /* CAIF sockets. */ +-#define PF_ALG 38 /* Algorithm sockets. */ +-#define PF_MAX 39 /* For now.. */ ++#define PF_RXRPC 33 /* RxRPC sockets. */ ++#define PF_ISDN 34 /* mISDN sockets. */ ++#define PF_PHONET 35 /* Phonet sockets. */ ++#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */ ++#define PF_CAIF 37 /* CAIF sockets. */ ++#define PF_ALG 38 /* Algorithm sockets. */ ++#define PF_NFC 39 /* NFC sockets. */ ++#define PF_MAX 40 /* For now.. */ + + /* Address families. */ + #define AF_UNSPEC PF_UNSPEC +@@ -136,21 +109,23 @@ enum __socket_type + #define AF_ASH PF_ASH + #define AF_ECONET PF_ECONET + #define AF_ATMSVC PF_ATMSVC ++#define AF_RDS PF_RDS + #define AF_SNA PF_SNA + #define AF_IRDA PF_IRDA + #define AF_PPPOX PF_PPPOX + #define AF_WANPIPE PF_WANPIPE +-#define AF_LLC PF_LLC +-#define AF_CAN PF_CAN +-#define AF_TIPC PF_TIPC ++#define AF_LLC PF_LLC ++#define AF_CAN PF_CAN ++#define AF_TIPC PF_TIPC + #define AF_BLUETOOTH PF_BLUETOOTH +-#define AF_IUCV PF_IUCV +-#define AF_RXRPC PF_RXRPC +-#define AF_ISDN PF_ISDN +-#define AF_PHONET PF_PHONET +-#define AF_IEEE802154 PF_IEEE802154 +-#define AF_CAIF PF_CAIF +-#define AF_ALG PF_ALG ++#define AF_IUCV PF_IUCV ++#define AF_RXRPC PF_RXRPC ++#define AF_ISDN PF_ISDN ++#define AF_PHONET PF_PHONET ++#define AF_IEEE802154 PF_IEEE802154 ++#define AF_CAIF PF_CAIF ++#define AF_ALG PF_ALG ++#define AF_NFC PF_NFC + #define AF_MAX PF_MAX + + /* Socket level values. Others are defined in the appropriate headers. +@@ -235,8 +210,14 @@ enum + #define MSG_ERRQUEUE MSG_ERRQUEUE + MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */ + #define MSG_NOSIGNAL MSG_NOSIGNAL +- MSG_MORE = 0x8000 /* Sender will send more. */ ++ MSG_MORE = 0x8000, /* Sender will send more. */ + #define MSG_MORE MSG_MORE ++ MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/ ++#define MSG_WAITFORONE MSG_WAITFORONE ++ MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file ++ descriptor received through ++ SCM_RIGHTS. */ ++#define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC + }; + + +@@ -290,7 +271,7 @@ struct cmsghdr + #define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) + #define CMSG_FIRSTHDR(mhdr) \ + ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ +- ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL) ++ ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0) + #define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ + & (size_t) ~(sizeof (size_t) - 1)) + #define CMSG_SPACE(len) (CMSG_ALIGN (len) \ +@@ -302,14 +283,14 @@ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, + libc_hidden_proto(__cmsg_nxthdr) + #ifdef __USE_EXTERN_INLINES + # ifndef _EXTERN_INLINE +-# define _EXTERN_INLINE extern __inline ++# define _EXTERN_INLINE __extern_inline + # endif + _EXTERN_INLINE struct cmsghdr * + __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)) + { + if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) + /* The kernel header does this so there may be a reason. */ +- return 0; ++ return (struct cmsghdr *) 0; + + __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg + + CMSG_ALIGN (__cmsg->cmsg_len)); +@@ -318,7 +299,7 @@ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)) + || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) + > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) + /* No more entries. */ +- return 0; ++ return (struct cmsghdr *) 0; + return __cmsg; + } + #endif /* Use `extern inline'. */ +@@ -329,20 +310,21 @@ enum + { + SCM_RIGHTS = 0x01 /* Transfer file descriptors. */ + #define SCM_RIGHTS SCM_RIGHTS +-#ifdef __USE_BSD ++#ifdef __USE_GNU + , SCM_CREDENTIALS = 0x02 /* Credentials passing. */ + # define SCM_CREDENTIALS SCM_CREDENTIALS + #endif + }; + ++#ifdef __USE_GNU + /* User visible structure for SCM_CREDENTIALS message */ +- + struct ucred + { + pid_t pid; /* PID of sending process. */ + uid_t uid; /* UID of sending process. */ + gid_t gid; /* GID of sending process. */ + }; ++#endif + + /* Get socket manipulation related informations from kernel headers. */ + #ifndef __GLIBC__ +diff --git a/libc/sysdeps/linux/common/bits/socket_type.h b/libc/sysdeps/linux/common/bits/socket_type.h +new file mode 100644 +index 0000000..65436b0 +--- /dev/null ++++ b/libc/sysdeps/linux/common/bits/socket_type.h +@@ -0,0 +1,54 @@ ++/* Define enum __socket_type for generic Linux. ++ Copyright (C) 1991-2012 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#ifndef _SYS_SOCKET_H ++# error "Never include directly; use instead." ++#endif ++ ++/* Types of sockets. */ ++enum __socket_type ++{ ++ SOCK_STREAM = 1, /* Sequenced, reliable, connection-based ++ byte streams. */ ++#define SOCK_STREAM SOCK_STREAM ++ SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams ++ of fixed maximum length. */ ++#define SOCK_DGRAM SOCK_DGRAM ++ SOCK_RAW = 3, /* Raw protocol interface. */ ++#define SOCK_RAW SOCK_RAW ++ SOCK_RDM = 4, /* Reliably-delivered messages. */ ++#define SOCK_RDM SOCK_RDM ++ SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, ++ datagrams of fixed maximum length. */ ++#define SOCK_SEQPACKET SOCK_SEQPACKET ++ SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */ ++#define SOCK_DCCP SOCK_DCCP ++ SOCK_PACKET = 10, /* Linux specific way of getting packets ++ at the dev level. For writing rarp and ++ other similar things on the user level. */ ++#define SOCK_PACKET SOCK_PACKET ++ ++ /* Flags to be ORed into the type parameter of socket and socketpair. */ ++ ++ SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the ++ new descriptor(s). */ ++#define SOCK_CLOEXEC SOCK_CLOEXEC ++ SOCK_NONBLOCK = 00004000 /* Atomically mark descriptor(s) as ++ non-blocking. */ ++#define SOCK_NONBLOCK SOCK_NONBLOCK ++}; +diff --git a/libc/sysdeps/linux/common/cmsg_nxthdr.c b/libc/sysdeps/linux/common/cmsg_nxthdr.c +index 0360b47..9c21190 100644 +--- a/libc/sysdeps/linux/common/cmsg_nxthdr.c ++++ b/libc/sysdeps/linux/common/cmsg_nxthdr.c +@@ -19,6 +19,7 @@ + + #define __FORCE_GLIBC + #include ++#include + /* Prevent math.h from defining a colliding inline */ + #undef __USE_EXTERN_INLINES + #include +diff --git a/libc/sysdeps/linux/hppa/bits/socket_type.h b/libc/sysdeps/linux/hppa/bits/socket_type.h +new file mode 100644 +index 0000000..c6df6c3 +--- /dev/null ++++ b/libc/sysdeps/linux/hppa/bits/socket_type.h +@@ -0,0 +1,54 @@ ++/* Define enum __socket_type for Linux/HP-PARISC. ++ Copyright (C) 2012 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#ifndef _SYS_SOCKET_H ++# error "Never include directly; use instead." ++#endif ++ ++/* Types of sockets. */ ++enum __socket_type ++{ ++ SOCK_STREAM = 1, /* Sequenced, reliable, connection-based ++ byte streams. */ ++#define SOCK_STREAM SOCK_STREAM ++ SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams ++ of fixed maximum length. */ ++#define SOCK_DGRAM SOCK_DGRAM ++ SOCK_RAW = 3, /* Raw protocol interface. */ ++#define SOCK_RAW SOCK_RAW ++ SOCK_RDM = 4, /* Reliably-delivered messages. */ ++#define SOCK_RDM SOCK_RDM ++ SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, ++ datagrams of fixed maximum length. */ ++#define SOCK_SEQPACKET SOCK_SEQPACKET ++ SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */ ++#define SOCK_DCCP SOCK_DCCP ++ SOCK_PACKET = 10, /* Linux specific way of getting packets ++ at the dev level. For writing rarp and ++ other similar things on the user level. */ ++#define SOCK_PACKET SOCK_PACKET ++ ++ /* Flags to be ORed into the type parameter of socket and socketpair. */ ++ ++ SOCK_CLOEXEC = 010000000, /* Atomically set close-on-exec flag for the ++ new descriptor(s). */ ++#define SOCK_CLOEXEC SOCK_CLOEXEC ++ SOCK_NONBLOCK = 0x40000000 /* Atomically mark descriptor(s) as ++ non-blocking. */ ++#define SOCK_NONBLOCK SOCK_NONBLOCK ++}; +diff --git a/libc/sysdeps/linux/mips/bits/socket.h b/libc/sysdeps/linux/mips/bits/socket.h +deleted file mode 100644 +index 27ceafa..0000000 +--- a/libc/sysdeps/linux/mips/bits/socket.h ++++ /dev/null +@@ -1,369 +0,0 @@ +-/* System-specific socket constants and types. Linux/MIPS version. +- Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006 +- Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C Library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- The GNU C Library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#ifndef __BITS_SOCKET_H +-#define __BITS_SOCKET_H +- +-#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H +-# error "Never include directly; use instead." +-#endif +- +-#define __need_size_t +-#define __need_NULL +-#include +- +-#include +-#include +- +-/* Type for length arguments in socket calls. */ +-#ifndef __socklen_t_defined +-typedef __socklen_t socklen_t; +-# define __socklen_t_defined +-#endif +- +-/* Types of sockets. */ +-enum __socket_type +-{ +- SOCK_DGRAM = 1, /* Connectionless, unreliable datagrams +- of fixed maximum length. */ +-#define SOCK_DGRAM SOCK_DGRAM +- SOCK_STREAM = 2, /* Sequenced, reliable, connection-based +- byte streams. */ +-#define SOCK_STREAM SOCK_STREAM +- SOCK_RAW = 3, /* Raw protocol interface. */ +-#define SOCK_RAW SOCK_RAW +- SOCK_RDM = 4, /* Reliably-delivered messages. */ +-#define SOCK_RDM SOCK_RDM +- SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, +- datagrams of fixed maximum length. */ +-#define SOCK_SEQPACKET SOCK_SEQPACKET +- SOCK_DCCP = 6, +-#define SOCK_DCCP SOCK_DCCP /* Datagram Congestion Control Protocol. */ +- SOCK_PACKET = 10, /* Linux specific way of getting packets +- at the dev level. For writing rarp and +- other similar things on the user level. */ +-#define SOCK_PACKET SOCK_PACKET +- /* Flags to be ORed into the type parameter of socket and socketpair and +- used for the flags parameter of paccept. */ +- +- SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the +- new descriptor(s). */ +-#define SOCK_CLOEXEC SOCK_CLOEXEC +- SOCK_NONBLOCK = 0200 /* Atomically mark descriptor(s) as +- non-blocking. */ +-#define SOCK_NONBLOCK SOCK_NONBLOCK +-}; +- +-/* Protocol families. */ +-#define PF_UNSPEC 0 /* Unspecified. */ +-#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */ +-#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */ +-#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */ +-#define PF_INET 2 /* IP protocol family. */ +-#define PF_AX25 3 /* Amateur Radio AX.25. */ +-#define PF_IPX 4 /* Novell Internet Protocol. */ +-#define PF_APPLETALK 5 /* Appletalk DDP. */ +-#define PF_NETROM 6 /* Amateur radio NetROM. */ +-#define PF_BRIDGE 7 /* Multiprotocol bridge. */ +-#define PF_ATMPVC 8 /* ATM PVCs. */ +-#define PF_X25 9 /* Reserved for X.25 project. */ +-#define PF_INET6 10 /* IP version 6. */ +-#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */ +-#define PF_DECnet 12 /* Reserved for DECnet project. */ +-#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */ +-#define PF_SECURITY 14 /* Security callback pseudo AF. */ +-#define PF_KEY 15 /* PF_KEY key management API. */ +-#define PF_NETLINK 16 +-#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */ +-#define PF_PACKET 17 /* Packet family. */ +-#define PF_ASH 18 /* Ash. */ +-#define PF_ECONET 19 /* Acorn Econet. */ +-#define PF_ATMSVC 20 /* ATM SVCs. */ +-#define PF_SNA 22 /* Linux SNA Project */ +-#define PF_IRDA 23 /* IRDA sockets. */ +-#define PF_PPPOX 24 /* PPPoX sockets. */ +-#define PF_WANPIPE 25 /* Wanpipe API sockets. */ +-#define PF_LLC 26 /* Linux LLC. */ +-#define PF_CAN 29 /* Controller Area Network. */ +-#define PF_TIPC 30 /* TIPC sockets. */ +-#define PF_BLUETOOTH 31 /* Bluetooth sockets. */ +-#define PF_IUCV 32 /* IUCV sockets. */ +-#define PF_RXRPC 33 /* RxRPC sockets. */ +-#define PF_ISDN 34 /* mISDN sockets. */ +-#define PF_PHONET 35 /* Phonet sockets. */ +-#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */ +-#define PF_CAIF 37 /* CAIF sockets. */ +-#define PF_ALG 38 /* Algorithm sockets. */ +-#define PF_MAX 39 /* For now.. */ +- +-/* Address families. */ +-#define AF_UNSPEC PF_UNSPEC +-#define AF_LOCAL PF_LOCAL +-#define AF_UNIX PF_UNIX +-#define AF_FILE PF_FILE +-#define AF_INET PF_INET +-#define AF_AX25 PF_AX25 +-#define AF_IPX PF_IPX +-#define AF_APPLETALK PF_APPLETALK +-#define AF_NETROM PF_NETROM +-#define AF_BRIDGE PF_BRIDGE +-#define AF_ATMPVC PF_ATMPVC +-#define AF_X25 PF_X25 +-#define AF_INET6 PF_INET6 +-#define AF_ROSE PF_ROSE +-#define AF_DECnet PF_DECnet +-#define AF_NETBEUI PF_NETBEUI +-#define AF_SECURITY PF_SECURITY +-#define AF_KEY PF_KEY +-#define AF_NETLINK PF_NETLINK +-#define AF_ROUTE PF_ROUTE +-#define AF_PACKET PF_PACKET +-#define AF_ASH PF_ASH +-#define AF_ECONET PF_ECONET +-#define AF_ATMSVC PF_ATMSVC +-#define AF_SNA PF_SNA +-#define AF_IRDA PF_IRDA +-#define AF_PPPOX PF_PPPOX +-#define AF_WANPIPE PF_WANPIPE +-#define AF_LLC PF_LLC +-#define AF_CAN PF_CAN +-#define AF_TIPC PF_TIPC +-#define AF_BLUETOOTH PF_BLUETOOTH +-#define AF_IUCV PF_IUCV +-#define AF_RXRPC PF_RXRPC +-#define AF_ISDN PF_ISDN +-#define AF_PHONET PF_PHONET +-#define AF_IEEE802154 PF_IEEE802154 +-#define AF_CAIF PF_CAIF +-#define AF_ALG PF_ALG +-#define AF_MAX PF_MAX +- +-/* Socket level values. Others are defined in the appropriate headers. +- +- XXX These definitions also should go into the appropriate headers as +- far as they are available. */ +-#define SOL_RAW 255 +-#define SOL_DECNET 261 +-#define SOL_X25 262 +-#define SOL_PACKET 263 +-#define SOL_ATM 264 /* ATM layer (cell level). */ +-#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */ +-#define SOL_IRDA 266 +- +-/* Maximum queue length specifiable by listen. */ +-#define SOMAXCONN 128 +- +-/* Get the definition of the macro to define the common sockaddr members. */ +-#include +- +-/* Structure describing a generic socket address. */ +-struct sockaddr +- { +- __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ +- char sa_data[14]; /* Address data. */ +- }; +- +- +-/* Structure large enough to hold any socket address (with the historical +- exception of AF_UNIX). We reserve 128 bytes. */ +-#define __ss_aligntype unsigned long int +-#define _SS_SIZE 128 +-#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype))) +- +-struct sockaddr_storage +- { +- __SOCKADDR_COMMON (ss_); /* Address family, etc. */ +- __ss_aligntype __ss_align; /* Force desired alignment. */ +- char __ss_padding[_SS_PADSIZE]; +- }; +- +- +-/* Bits in the FLAGS argument to `send', `recv', et al. */ +-enum +- { +- MSG_OOB = 0x01, /* Process out-of-band data. */ +-#define MSG_OOB MSG_OOB +- MSG_PEEK = 0x02, /* Peek at incoming messages. */ +-#define MSG_PEEK MSG_PEEK +- MSG_DONTROUTE = 0x04, /* Don't use local routing. */ +-#define MSG_DONTROUTE MSG_DONTROUTE +-#ifdef __USE_GNU +- /* DECnet uses a different name. */ +- MSG_TRYHARD = MSG_DONTROUTE, +-# define MSG_TRYHARD MSG_DONTROUTE +-#endif +- MSG_CTRUNC = 0x08, /* Control data lost before delivery. */ +-#define MSG_CTRUNC MSG_CTRUNC +- MSG_PROXY = 0x10, /* Supply or ask second address. */ +-#define MSG_PROXY MSG_PROXY +- MSG_TRUNC = 0x20, +-#define MSG_TRUNC MSG_TRUNC +- MSG_DONTWAIT = 0x40, /* Nonblocking IO. */ +-#define MSG_DONTWAIT MSG_DONTWAIT +- MSG_EOR = 0x80, /* End of record. */ +-#define MSG_EOR MSG_EOR +- MSG_WAITALL = 0x100, /* Wait for a full request. */ +-#define MSG_WAITALL MSG_WAITALL +- MSG_FIN = 0x200, +-#define MSG_FIN MSG_FIN +- MSG_SYN = 0x400, +-#define MSG_SYN MSG_SYN +- MSG_CONFIRM = 0x800, /* Confirm path validity. */ +-#define MSG_CONFIRM MSG_CONFIRM +- MSG_RST = 0x1000, +-#define MSG_RST MSG_RST +- MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */ +-#define MSG_ERRQUEUE MSG_ERRQUEUE +- MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */ +-#define MSG_NOSIGNAL MSG_NOSIGNAL +- MSG_MORE = 0x8000, /* Sender will send more. */ +-#define MSG_MORE MSG_MORE +- MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/ +-#define MSG_WAITFORONE MSG_WAITFORONE +- +- MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file +- descriptor received through +- SCM_RIGHTS. */ +-#define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC +- }; +- +- +-/* Structure describing messages sent by +- `sendmsg' and received by `recvmsg'. */ +-/* Note: do not change these members to match glibc; these match the +- SuSv3 spec already (e.g. msg_iovlen/msg_controllen). +- http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/socket.h.html */ +-/* Note: linux kernel uses __kernel_size_t (which is 8bytes on 64bit +- platforms, and 4bytes on 32bit platforms) for msg_iovlen/msg_controllen */ +-struct msghdr +- { +- void *msg_name; /* Address to send to/receive from. */ +- socklen_t msg_namelen; /* Length of address data. */ +- +- struct iovec *msg_iov; /* Vector of data to send/receive into. */ +-#if __WORDSIZE == 32 +- int msg_iovlen; /* Number of elements in the vector. */ +-#else +- size_t msg_iovlen; /* Number of elements in the vector. */ +-#endif +- +- void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ +-#if __WORDSIZE == 32 +- socklen_t msg_controllen; /* Ancillary data buffer length. */ +-#else +- size_t msg_controllen; /* Ancillary data buffer length. */ +-#endif +- +- int msg_flags; /* Flags on received message. */ +- }; +- +-/* Structure used for storage of ancillary data object information. */ +-struct cmsghdr +- { +- size_t cmsg_len; /* Length of data in cmsg_data plus length +- of cmsghdr structure. */ +- int cmsg_level; /* Originating protocol. */ +- int cmsg_type; /* Protocol specific type. */ +-#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L +- __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ +-#endif +- }; +- +-/* Ancillary data object manipulation macros. */ +-#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L +-# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) +-#else +-# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) +-#endif +-#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) +-#define CMSG_FIRSTHDR(mhdr) \ +- ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ +- ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL) +-#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ +- & (size_t) ~(sizeof (size_t) - 1)) +-#define CMSG_SPACE(len) (CMSG_ALIGN (len) \ +- + CMSG_ALIGN (sizeof (struct cmsghdr))) +-#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) +- +-extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, +- struct cmsghdr *__cmsg) __THROW; +-libc_hidden_proto(__cmsg_nxthdr) +-#ifdef __USE_EXTERN_INLINES +-# ifndef _EXTERN_INLINE +-# define _EXTERN_INLINE extern __inline +-# endif +-_EXTERN_INLINE struct cmsghdr * +-__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)) +-{ +- if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) +- /* The kernel header does this so there may be a reason. */ +- return 0; +- +- __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg +- + CMSG_ALIGN (__cmsg->cmsg_len)); +- if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control +- + __mhdr->msg_controllen) +- || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) +- > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) +- /* No more entries. */ +- return 0; +- return __cmsg; +-} +-#endif /* Use `extern inline'. */ +- +-/* Socket level message types. This must match the definitions in +- . */ +-enum +- { +- SCM_RIGHTS = 0x01 /* Transfer file descriptors. */ +-#define SCM_RIGHTS SCM_RIGHTS +-#ifdef __USE_BSD +- , SCM_CREDENTIALS = 0x02 /* Credentials passing. */ +-# define SCM_CREDENTIALS SCM_CREDENTIALS +-#endif +- }; +- +-/* User visible structure for SCM_CREDENTIALS message */ +- +-struct ucred +-{ +- pid_t pid; /* PID of sending process. */ +- uid_t uid; /* UID of sending process. */ +- gid_t gid; /* GID of sending process. */ +-}; +- +-/* Get socket manipulation related informations from kernel headers. */ +-#ifndef __GLIBC__ +-#define __GLIBC__ 2 +-#include +-#undef __GLIBC__ +-#else +-#include +-#endif +- +- +-/* Structure used to manipulate the SO_LINGER option. */ +-struct linger +- { +- int l_onoff; /* Nonzero to linger on close. */ +- int l_linger; /* Time to linger. */ +- }; +- +-#endif /* bits/socket.h */ +diff --git a/libc/sysdeps/linux/mips/bits/socket_type.h b/libc/sysdeps/linux/mips/bits/socket_type.h +new file mode 100644 +index 0000000..20d2732 +--- /dev/null ++++ b/libc/sysdeps/linux/mips/bits/socket_type.h +@@ -0,0 +1,55 @@ ++/* System-specific socket constants and types. Linux/MIPS version. ++ Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006 ++ Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#ifndef _SYS_SOCKET_H ++# error "Never include directly; use instead." ++#endif ++ ++/* Types of sockets. */ ++enum __socket_type ++{ ++ SOCK_DGRAM = 1, /* Connectionless, unreliable datagrams ++ of fixed maximum length. */ ++#define SOCK_DGRAM SOCK_DGRAM ++ SOCK_STREAM = 2, /* Sequenced, reliable, connection-based ++ byte streams. */ ++#define SOCK_STREAM SOCK_STREAM ++ SOCK_RAW = 3, /* Raw protocol interface. */ ++#define SOCK_RAW SOCK_RAW ++ SOCK_RDM = 4, /* Reliably-delivered messages. */ ++#define SOCK_RDM SOCK_RDM ++ SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, ++ datagrams of fixed maximum length. */ ++#define SOCK_SEQPACKET SOCK_SEQPACKET ++ SOCK_DCCP = 6, ++#define SOCK_DCCP SOCK_DCCP /* Datagram Congestion Control Protocol. */ ++ SOCK_PACKET = 10, /* Linux specific way of getting packets ++ at the dev level. For writing rarp and ++ other similar things on the user level. */ ++#define SOCK_PACKET SOCK_PACKET ++ ++ /* Flags to be ORed into the type parameter of socket and socketpair. */ ++ ++ SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the ++ new descriptor(s). */ ++#define SOCK_CLOEXEC SOCK_CLOEXEC ++ SOCK_NONBLOCK = 00000200 /* Atomically mark descriptor(s) as ++ non-blocking. */ ++#define SOCK_NONBLOCK SOCK_NONBLOCK ++}; +diff --git a/libc/sysdeps/linux/sparc/bits/socket.h b/libc/sysdeps/linux/sparc/bits/socket.h +deleted file mode 100644 +index 64973e2..0000000 +--- a/libc/sysdeps/linux/sparc/bits/socket.h ++++ /dev/null +@@ -1,376 +0,0 @@ +-/* System-specific socket constants and types. Linux version. +- Copyright (C) 1991,1992,1994-2001,2004,2006 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C Library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- The GNU C Library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#ifndef __BITS_SOCKET_H +-#define __BITS_SOCKET_H +- +-#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H +-# error "Never include directly; use instead." +-#endif +- +-#define __need_size_t +-#define __need_NULL +-#include +- +-#include +-#include +- +-/* Type for length arguments in socket calls. */ +-#ifndef __socklen_t_defined +-typedef __socklen_t socklen_t; +-# define __socklen_t_defined +-#endif +- +-/* Types of sockets. */ +-enum __socket_type +-{ +- SOCK_STREAM = 1, /* Sequenced, reliable, connection-based +- byte streams. */ +-#define SOCK_STREAM SOCK_STREAM +- SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams +- of fixed maximum length. */ +-#define SOCK_DGRAM SOCK_DGRAM +- SOCK_RAW = 3, /* Raw protocol interface. */ +-#define SOCK_RAW SOCK_RAW +- SOCK_RDM = 4, /* Reliably-delivered messages. */ +-#define SOCK_RDM SOCK_RDM +- SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, +- datagrams of fixed maximum length. */ +-#define SOCK_SEQPACKET SOCK_SEQPACKET +- SOCK_PACKET = 10 /* Linux specific way of getting packets +- at the dev level. For writing rarp and +- other similar things on the user level. */ +-#define SOCK_PACKET SOCK_PACKET +-}; +- +-/* Protocol families. */ +-#define PF_UNSPEC 0 /* Unspecified. */ +-#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */ +-#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */ +-#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */ +-#define PF_INET 2 /* IP protocol family. */ +-#define PF_AX25 3 /* Amateur Radio AX.25. */ +-#define PF_IPX 4 /* Novell Internet Protocol. */ +-#define PF_APPLETALK 5 /* Appletalk DDP. */ +-#define PF_NETROM 6 /* Amateur radio NetROM. */ +-#define PF_BRIDGE 7 /* Multiprotocol bridge. */ +-#define PF_ATMPVC 8 /* ATM PVCs. */ +-#define PF_X25 9 /* Reserved for X.25 project. */ +-#define PF_INET6 10 /* IP version 6. */ +-#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */ +-#define PF_DECnet 12 /* Reserved for DECnet project. */ +-#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */ +-#define PF_SECURITY 14 /* Security callback pseudo AF. */ +-#define PF_KEY 15 /* PF_KEY key management API. */ +-#define PF_NETLINK 16 +-#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */ +-#define PF_PACKET 17 /* Packet family. */ +-#define PF_ASH 18 /* Ash. */ +-#define PF_ECONET 19 /* Acorn Econet. */ +-#define PF_ATMSVC 20 /* ATM SVCs. */ +-#define PF_SNA 22 /* Linux SNA Project */ +-#define PF_IRDA 23 /* IRDA sockets. */ +-#define PF_PPPOX 24 /* PPPoX sockets. */ +-#define PF_WANPIPE 25 /* Wanpipe API sockets. */ +-#define PF_LLC 26 /* Linux LLC. */ +-#define PF_CAN 29 /* Controller Area Network. */ +-#define PF_TIPC 30 /* TIPC sockets. */ +-#define PF_BLUETOOTH 31 /* Bluetooth sockets. */ +-#define PF_IUCV 32 /* IUCV sockets. */ +-#define PF_RXRPC 33 /* RxRPC sockets. */ +-#define PF_ISDN 34 /* mISDN sockets. */ +-#define PF_PHONET 35 /* Phonet sockets. */ +-#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */ +-#define PF_CAIF 37 /* CAIF sockets. */ +-#define PF_ALG 38 /* Algorithm sockets. */ +-#define PF_MAX 39 /* For now.. */ +- +-/* Address families. */ +-#define AF_UNSPEC PF_UNSPEC +-#define AF_LOCAL PF_LOCAL +-#define AF_UNIX PF_UNIX +-#define AF_FILE PF_FILE +-#define AF_INET PF_INET +-#define AF_AX25 PF_AX25 +-#define AF_IPX PF_IPX +-#define AF_APPLETALK PF_APPLETALK +-#define AF_NETROM PF_NETROM +-#define AF_BRIDGE PF_BRIDGE +-#define AF_ATMPVC PF_ATMPVC +-#define AF_X25 PF_X25 +-#define AF_INET6 PF_INET6 +-#define AF_ROSE PF_ROSE +-#define AF_DECnet PF_DECnet +-#define AF_NETBEUI PF_NETBEUI +-#define AF_SECURITY PF_SECURITY +-#define AF_KEY PF_KEY +-#define AF_NETLINK PF_NETLINK +-#define AF_ROUTE PF_ROUTE +-#define AF_PACKET PF_PACKET +-#define AF_ASH PF_ASH +-#define AF_ECONET PF_ECONET +-#define AF_ATMSVC PF_ATMSVC +-#define AF_SNA PF_SNA +-#define AF_IRDA PF_IRDA +-#define AF_PPPOX PF_PPPOX +-#define AF_WANPIPE PF_WANPIPE +-#define AF_LLC PF_LLC +-#define AF_CAN PF_CAN +-#define AF_TIPC PF_TIPC +-#define AF_BLUETOOTH PF_BLUETOOTH +-#define AF_IUCV PF_IUCV +-#define AF_RXRPC PF_RXRPC +-#define AF_ISDN PF_ISDN +-#define AF_PHONET PF_PHONET +-#define AF_IEEE802154 PF_IEEE802154 +-#define AF_CAIF PF_CAIF +-#define AF_ALG PF_ALG +-#define AF_MAX PF_MAX +- +-/* Socket level values. Others are defined in the appropriate headers. +- +- XXX These definitions also should go into the appropriate headers as +- far as they are available. */ +-#define SOL_RAW 255 +-#define SOL_DECNET 261 +-#define SOL_X25 262 +-#define SOL_PACKET 263 +-#define SOL_ATM 264 /* ATM layer (cell level). */ +-#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */ +-#define SOL_IRDA 266 +- +-/* Maximum queue length specifiable by listen. */ +-#define SOMAXCONN 128 +- +-/* Get the definition of the macro to define the common sockaddr members. */ +-#include +- +-/* Structure describing a generic socket address. */ +-struct sockaddr +- { +- __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ +- char sa_data[14]; /* Address data. */ +- }; +- +- +-/* Structure large enough to hold any socket address (with the historical +- exception of AF_UNIX). We reserve 128 bytes. */ +-#if ULONG_MAX > 0xffffffff +-# define __ss_aligntype __uint64_t +-#else +-# define __ss_aligntype __uint32_t +-#endif +-#define _SS_SIZE 128 +-#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype))) +- +-struct sockaddr_storage +- { +- __SOCKADDR_COMMON (ss_); /* Address family, etc. */ +- __ss_aligntype __ss_align; /* Force desired alignment. */ +- char __ss_padding[_SS_PADSIZE]; +- }; +- +- +-/* Bits in the FLAGS argument to `send', `recv', et al. */ +-enum +- { +- MSG_OOB = 0x01, /* Process out-of-band data. */ +-#define MSG_OOB MSG_OOB +- MSG_PEEK = 0x02, /* Peek at incoming messages. */ +-#define MSG_PEEK MSG_PEEK +- MSG_DONTROUTE = 0x04, /* Don't use local routing. */ +-#define MSG_DONTROUTE MSG_DONTROUTE +-#ifdef __USE_GNU +- /* DECnet uses a different name. */ +- MSG_TRYHARD = MSG_DONTROUTE, +-# define MSG_TRYHARD MSG_DONTROUTE +-#endif +- MSG_CTRUNC = 0x08, /* Control data lost before delivery. */ +-#define MSG_CTRUNC MSG_CTRUNC +- MSG_PROXY = 0x10, /* Supply or ask second address. */ +-#define MSG_PROXY MSG_PROXY +- MSG_TRUNC = 0x20, +-#define MSG_TRUNC MSG_TRUNC +- MSG_DONTWAIT = 0x40, /* Nonblocking IO. */ +-#define MSG_DONTWAIT MSG_DONTWAIT +- MSG_EOR = 0x80, /* End of record. */ +-#define MSG_EOR MSG_EOR +- MSG_WAITALL = 0x100, /* Wait for a full request. */ +-#define MSG_WAITALL MSG_WAITALL +- MSG_FIN = 0x200, +-#define MSG_FIN MSG_FIN +- MSG_SYN = 0x400, +-#define MSG_SYN MSG_SYN +- MSG_CONFIRM = 0x800, /* Confirm path validity. */ +-#define MSG_CONFIRM MSG_CONFIRM +- MSG_RST = 0x1000, +-#define MSG_RST MSG_RST +- MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */ +-#define MSG_ERRQUEUE MSG_ERRQUEUE +- MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */ +-#define MSG_NOSIGNAL MSG_NOSIGNAL +- MSG_MORE = 0x8000 /* Sender will send more. */ +-#define MSG_MORE MSG_MORE +- }; +- +- +-/* Structure describing messages sent by +- `sendmsg' and received by `recvmsg'. */ +-/* Note: do not change these members to match glibc; these match the +- SuSv3 spec already (e.g. msg_iovlen/msg_controllen). +- http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/socket.h.html */ +-/* Note: linux kernel uses __kernel_size_t (which is 8bytes on 64bit +- platforms, and 4bytes on 32bit platforms) for msg_iovlen/msg_controllen */ +-struct msghdr +- { +- void *msg_name; /* Address to send to/receive from. */ +- socklen_t msg_namelen; /* Length of address data. */ +- +- struct iovec *msg_iov; /* Vector of data to send/receive into. */ +-#if __WORDSIZE == 32 +- int msg_iovlen; /* Number of elements in the vector. */ +-#else +- size_t msg_iovlen; /* Number of elements in the vector. */ +-#endif +- +- void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ +-#if __WORDSIZE == 32 +- socklen_t msg_controllen; /* Ancillary data buffer length. */ +-#else +- size_t msg_controllen; /* Ancillary data buffer length. */ +-#endif +- +- int msg_flags; /* Flags on received message. */ +- }; +- +-/* Structure used for storage of ancillary data object information. */ +-struct cmsghdr +- { +- size_t cmsg_len; /* Length of data in cmsg_data plus length +- of cmsghdr structure. */ +- int cmsg_level; /* Originating protocol. */ +- int cmsg_type; /* Protocol specific type. */ +-#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L +- __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ +-#endif +- }; +- +-/* Ancillary data object manipulation macros. */ +-#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L +-# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) +-#else +-# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) +-#endif +-#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) +-#define CMSG_FIRSTHDR(mhdr) \ +- ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ +- ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL) +-#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ +- & (size_t) ~(sizeof (size_t) - 1)) +-#define CMSG_SPACE(len) (CMSG_ALIGN (len) \ +- + CMSG_ALIGN (sizeof (struct cmsghdr))) +-#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) +- +-extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, +- struct cmsghdr *__cmsg) __THROW; +-libc_hidden_proto(__cmsg_nxthdr) +-#ifdef __USE_EXTERN_INLINES +-# ifndef _EXTERN_INLINE +-# define _EXTERN_INLINE extern __inline +-# endif +-_EXTERN_INLINE struct cmsghdr * +-__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)) +-{ +- if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) +- /* The kernel header does this so there may be a reason. */ +- return 0; +- +- __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg +- + CMSG_ALIGN (__cmsg->cmsg_len)); +- if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control +- + __mhdr->msg_controllen) +- || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) +- > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) +- /* No more entries. */ +- return 0; +- return __cmsg; +-} +-#endif /* Use `extern inline'. */ +- +-/* Socket level message types. This must match the definitions in +- . */ +-enum +- { +- SCM_RIGHTS = 0x01 /* Transfer file descriptors. */ +-#define SCM_RIGHTS SCM_RIGHTS +-#ifdef __USE_BSD +- , SCM_CREDENTIALS = 0x02 /* Credentials passing. */ +-# define SCM_CREDENTIALS SCM_CREDENTIALS +-#endif +- }; +- +-/* User visible structure for SCM_CREDENTIALS message */ +- +-struct ucred +-{ +- pid_t pid; /* PID of sending process. */ +- uid_t uid; /* UID of sending process. */ +- gid_t gid; /* GID of sending process. */ +-}; +- +-/* Get socket manipulation related informations from kernel headers. */ +-#ifndef __GLIBC__ +-#define __GLIBC__ 2 +-#include +-#undef __GLIBC__ +-#else +-#include +-#endif +- +- +-/* Structure used to manipulate the SO_LINGER option. */ +-struct linger +- { +- int l_onoff; /* Nonzero to linger on close. */ +- int l_linger; /* Time to linger. */ +- }; +- +-/* Prefer socketcall over all these for sparc32, +- since it only has socketcall */ +-#ifndef __arch64__ +- #undef __NR_accept +- #undef __NR_bind +- #undef __NR_connect +- #undef __NR_getpeername +- #undef __NR_getsockname +- #undef __NR_getsockopt +- #undef __NR_listen +- #undef __NR_recv +- #undef __NR_recvfrom +- #undef __NR_recvmsg +- #undef __NR_send +- #undef __NR_sendmsg +- #undef __NR_sendto +- #undef __NR_setsockopt +- #undef __NR_shutdown +- #undef __NR_socket +- #undef __NR_socketpair +-#endif +- +-#endif /* bits/socket.h */ +diff --git a/libc/sysdeps/linux/sparc/bits/socket_type.h b/libc/sysdeps/linux/sparc/bits/socket_type.h +new file mode 100644 +index 0000000..494655f +--- /dev/null ++++ b/libc/sysdeps/linux/sparc/bits/socket_type.h +@@ -0,0 +1,54 @@ ++/* System-specific socket constants and types. Linux version. ++ Copyright (C) 1991,1992,1994-2001,2004,2006 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#ifndef _SYS_SOCKET_H ++# error "Never include directly; use instead." ++#endif ++ ++/* Types of sockets. */ ++enum __socket_type ++{ ++ SOCK_STREAM = 1, /* Sequenced, reliable, connection-based ++ byte streams. */ ++#define SOCK_STREAM SOCK_STREAM ++ SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams ++ of fixed maximum length. */ ++#define SOCK_DGRAM SOCK_DGRAM ++ SOCK_RAW = 3, /* Raw protocol interface. */ ++#define SOCK_RAW SOCK_RAW ++ SOCK_RDM = 4, /* Reliably-delivered messages. */ ++#define SOCK_RDM SOCK_RDM ++ SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, ++ datagrams of fixed maximum length. */ ++#define SOCK_SEQPACKET SOCK_SEQPACKET ++ SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */ ++#define SOCK_DCCP SOCK_DCCP ++ SOCK_PACKET = 10, /* Linux specific way of getting packets ++ at the dev level. For writing rarp and ++ other similar things on the user level. */ ++#define SOCK_PACKET SOCK_PACKET ++ ++ /* Flags to be ORed into the type parameter of socket and socketpair. */ ++ ++ SOCK_CLOEXEC = 0x400000, /* Atomically set close-on-exec flag for the ++ new descriptor(s). */ ++#define SOCK_CLOEXEC SOCK_CLOEXEC ++ SOCK_NONBLOCK = 0x004000 /* Atomically mark descriptor(s) as ++ non-blocking. */ ++#define SOCK_NONBLOCK SOCK_NONBLOCK ++}; +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0036-mount.h-update.patch b/package/uclibc/0.9.33.2/uclibc-0036-mount.h-update.patch new file mode 100644 index 0000000000..4c9826cd19 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0036-mount.h-update.patch @@ -0,0 +1,91 @@ +From 641a5356a021f90ee922229bd8e1aa6eafe152bc Mon Sep 17 00:00:00 2001 +From: Bernhard Reutner-Fischer +Date: Fri, 18 Jan 2013 11:12:49 +0100 +Subject: [PATCH] mount.h: update + +Signed-off-by: Bernhard Reutner-Fischer +--- + include/sys/mount.h | 45 +++++++++++++++++++++++++++++++++++---------- + 1 file changed, 35 insertions(+), 10 deletions(-) + +diff --git a/include/sys/mount.h b/include/sys/mount.h +index 57d440f..9eecc5a 100644 +--- a/include/sys/mount.h ++++ b/include/sys/mount.h +@@ -1,5 +1,5 @@ + /* Header file for mounting/unmount Linux filesystems. +- Copyright (C) 1996,1997,1998,1999,2000,2004 Free Software Foundation, Inc. ++ Copyright (C) 1996-2000, 2004, 2010, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -47,23 +47,46 @@ enum + #define MS_REMOUNT MS_REMOUNT + MS_MANDLOCK = 64, /* Allow mandatory locks on an FS. */ + #define MS_MANDLOCK MS_MANDLOCK +- S_WRITE = 128, /* Write on file/directory/symlink. */ +-#define S_WRITE S_WRITE +- S_APPEND = 256, /* Append-only file. */ +-#define S_APPEND S_APPEND +- S_IMMUTABLE = 512, /* Immutable file. */ +-#define S_IMMUTABLE S_IMMUTABLE ++ MS_DIRSYNC = 128, /* Directory modifications are synchronous. */ ++#define MS_DIRSYNC MS_DIRSYNC + MS_NOATIME = 1024, /* Do not update access times. */ + #define MS_NOATIME MS_NOATIME + MS_NODIRATIME = 2048, /* Do not update directory access times. */ + #define MS_NODIRATIME MS_NODIRATIME + MS_BIND = 4096, /* Bind directory at different place. */ + #define MS_BIND MS_BIND ++ MS_MOVE = 8192, ++#define MS_MOVE MS_MOVE ++ MS_REC = 16384, ++#define MS_REC MS_REC ++ MS_SILENT = 32768, ++#define MS_SILENT MS_SILENT ++ MS_POSIXACL = 1 << 16, /* VFS does not apply the umask. */ ++#define MS_POSIXACL MS_POSIXACL ++ MS_UNBINDABLE = 1 << 17, /* Change to unbindable. */ ++#define MS_UNBINDABLE MS_UNBINDABLE ++ MS_PRIVATE = 1 << 18, /* Change to private. */ ++#define MS_PRIVATE MS_PRIVATE ++ MS_SLAVE = 1 << 19, /* Change to slave. */ ++#define MS_SLAVE MS_SLAVE ++ MS_SHARED = 1 << 20, /* Change to shared. */ ++#define MS_SHARED MS_SHARED ++ MS_RELATIME = 1 << 21, /* Update atime relative to mtime/ctime. */ ++#define MS_RELATIME MS_RELATIME ++ MS_KERNMOUNT = 1 << 22, /* This is a kern_mount call. */ ++#define MS_KERNMOUNT MS_KERNMOUNT ++ MS_I_VERSION = 1 << 23, /* Update inode I_version field. */ ++#define MS_I_VERSION MS_I_VERSION ++ MS_STRICTATIME = 1 << 24, /* Always perform atime updates. */ ++#define MS_STRICTATIME MS_STRICTATIME ++ MS_ACTIVE = 1 << 30, ++#define MS_ACTIVE MS_ACTIVE ++ MS_NOUSER = 1 << 31 ++#define MS_NOUSER MS_NOUSER + }; + + /* Flags that can be altered by MS_REMOUNT */ +-#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_NOATIME \ +- |MS_NODIRATIME) ++#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_I_VERSION) + + + /* Magic mount flag number. Has to be or-ed to the flag values. */ +@@ -100,8 +123,10 @@ enum + #define MNT_FORCE MNT_FORCE + MNT_DETACH = 2, /* Just detach from the tree. */ + #define MNT_DETACH MNT_DETACH +- MNT_EXPIRE = 4 /* Mark for expiry. */ ++ MNT_EXPIRE = 4, /* Mark for expiry. */ + #define MNT_EXPIRE MNT_EXPIRE ++ UMOUNT_NOFOLLOW = 8 /* Don't follow symlink on umount. */ ++#define UMOUNT_NOFOLLOW UMOUNT_NOFOLLOW + }; + + +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0037-buildsys-gen_bits_syscall_h-do-not-leave-undefined-S.patch b/package/uclibc/0.9.33.2/uclibc-0037-buildsys-gen_bits_syscall_h-do-not-leave-undefined-S.patch new file mode 100644 index 0000000000..c3107253f6 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0037-buildsys-gen_bits_syscall_h-do-not-leave-undefined-S.patch @@ -0,0 +1,38 @@ +From 29411db7b6cf872e73b5560c46dd941f91e704cd Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Sat, 26 Jan 2013 14:13:12 -0500 +Subject: [PATCH] buildsys: gen_bits_syscall_h: do not leave undefined SYS_xxx + around + +If we end up doing '#undef __NR_xxx', we don't want to leave the +corresponding SYS_xxx symbol defined. So undef it too. + +For example, with the ARM EABI layer, we have a bunch of legacy +syscalls that we define early on and then later undefine (such +as __NR_utime). But we left SYS_utime defined so code that tests +for that define before using it would be broken (since it'd be +defined to a non-existent symbol). + +URL: https://bugs.gentoo.org/425006 +Signed-off-by: Mike Frysinger +--- + extra/scripts/gen_bits_syscall_h.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/extra/scripts/gen_bits_syscall_h.sh b/extra/scripts/gen_bits_syscall_h.sh +index f6353ba..fd141f0 100755 +--- a/extra/scripts/gen_bits_syscall_h.sh ++++ b/extra/scripts/gen_bits_syscall_h.sh +@@ -40,7 +40,8 @@ $CC -E $INCLUDE_OPTS - | + sed -ne 's/^UCLIBC\(__ARM_NR_\|__NR_\)\([A-Za-z0-9_]*\) *\(.*\)/#undef \1\2\ + #define \1\2 \3\ + #define SYS_\2 \1\2/gp' \ +- -e 's/^UNDEFUCLIBC\(__ARM_NR_\|__NR_\)\([A-Za-z0-9_]*\).*/#undef \1\2/gp' ++ -e 's/^UNDEFUCLIBC\(__ARM_NR_\|__NR_\)\([A-Za-z0-9_]*\).*/#undef \1\2\ ++#undef SYS_\2/gp' + echo ; + echo "#endif" ; + ) +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0038-libc-sysdeps-sync-bits-in.h-with-glibc.patch b/package/uclibc/0.9.33.2/uclibc-0038-libc-sysdeps-sync-bits-in.h-with-glibc.patch new file mode 100644 index 0000000000..6f4246840a --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0038-libc-sysdeps-sync-bits-in.h-with-glibc.patch @@ -0,0 +1,117 @@ +From 4b7f3716b8678c9ff423445f41e6ffb47fd295cd Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Sat, 26 Jan 2013 17:40:24 -0500 +Subject: [PATCH] libc/sysdeps: sync bits/in.h with glibc + +URL: https://bugs.busybox.net/show_bug.cgi?id=5888 +Signed-off-by: Mike Frysinger +--- + libc/sysdeps/linux/common/bits/in.h | 61 +++++++++++++++++++++++------------ + 1 file changed, 41 insertions(+), 20 deletions(-) + +diff --git a/libc/sysdeps/linux/common/bits/in.h b/libc/sysdeps/linux/common/bits/in.h +index 1f2b817..d9c5e2b 100644 +--- a/libc/sysdeps/linux/common/bits/in.h ++++ b/libc/sysdeps/linux/common/bits/in.h +@@ -1,4 +1,4 @@ +-/* Copyright (C) 1991-1999, 2000, 2004 Free Software Foundation, Inc. ++/* Copyright (C) 1991-2013 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -43,31 +43,49 @@ + #define IP_ADD_SOURCE_MEMBERSHIP 39 /* ip_mreq_source: join source group */ + #define IP_DROP_SOURCE_MEMBERSHIP 40 /* ip_mreq_source: leave source group */ + #define IP_MSFILTER 41 +-#define MCAST_JOIN_GROUP 42 /* group_req: join any-source group */ +-#define MCAST_BLOCK_SOURCE 43 /* group_source_req: block from given group */ +-#define MCAST_UNBLOCK_SOURCE 44 /* group_source_req: unblock from given group*/ +-#define MCAST_LEAVE_GROUP 45 /* group_req: leave any-source group */ +-#define MCAST_JOIN_SOURCE_GROUP 46 /* group_source_req: join source-spec gr */ +-#define MCAST_LEAVE_SOURCE_GROUP 47 /* group_source_req: leave source-spec gr*/ +-#define MCAST_MSFILTER 48 +- +-#define MCAST_EXCLUDE 0 +-#define MCAST_INCLUDE 1 +- +-#define IP_ROUTER_ALERT 5 /* bool */ +-#define IP_PKTINFO 8 /* bool */ +-#define IP_PKTOPTIONS 9 +-#define IP_PMTUDISC 10 /* obsolete name? */ +-#define IP_MTU_DISCOVER 10 /* int; see below */ +-#define IP_RECVERR 11 /* bool */ +-#define IP_RECVTTL 12 /* bool */ +-#define IP_RECVTOS 13 /* bool */ ++#if defined __USE_MISC || defined __USE_GNU ++# define MCAST_JOIN_GROUP 42 /* group_req: join any-source group */ ++# define MCAST_BLOCK_SOURCE 43 /* group_source_req: block from given group */ ++# define MCAST_UNBLOCK_SOURCE 44 /* group_source_req: unblock from given group*/ ++# define MCAST_LEAVE_GROUP 45 /* group_req: leave any-source group */ ++# define MCAST_JOIN_SOURCE_GROUP 46 /* group_source_req: join source-spec gr */ ++# define MCAST_LEAVE_SOURCE_GROUP 47 /* group_source_req: leave source-spec gr*/ ++# define MCAST_MSFILTER 48 ++# define IP_MULTICAST_ALL 49 ++# define IP_UNICAST_IF 50 ++ ++# define MCAST_EXCLUDE 0 ++# define MCAST_INCLUDE 1 ++#endif ++ ++#define IP_ROUTER_ALERT 5 /* bool */ ++#define IP_PKTINFO 8 /* bool */ ++#define IP_PKTOPTIONS 9 ++#define IP_PMTUDISC 10 /* obsolete name? */ ++#define IP_MTU_DISCOVER 10 /* int; see below */ ++#define IP_RECVERR 11 /* bool */ ++#define IP_RECVTTL 12 /* bool */ ++#define IP_RECVTOS 13 /* bool */ ++#define IP_MTU 14 /* int */ ++#define IP_FREEBIND 15 ++#define IP_IPSEC_POLICY 16 ++#define IP_XFRM_POLICY 17 ++#define IP_PASSSEC 18 ++#define IP_TRANSPARENT 19 ++#define IP_MULTICAST_ALL 49 /* bool */ ++ ++/* TProxy original addresses */ ++#define IP_ORIGDSTADDR 20 ++#define IP_RECVORIGDSTADDR IP_ORIGDSTADDR ++ ++#define IP_MINTTL 21 + + + /* IP_MTU_DISCOVER arguments. */ + #define IP_PMTUDISC_DONT 0 /* Never send DF frames. */ + #define IP_PMTUDISC_WANT 1 /* Use per route hints. */ + #define IP_PMTUDISC_DO 2 /* Always DF. */ ++#define IP_PMTUDISC_PROBE 3 /* Ignore dst pmtu. */ + + /* To select the IP level. */ + #define SOL_IP 0 +@@ -76,6 +94,7 @@ + #define IP_DEFAULT_MULTICAST_LOOP 1 + #define IP_MAX_MEMBERSHIPS 20 + ++#if defined __USE_MISC || defined __USE_GNU + /* Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS. + The `ip_dst' field is used for the first-hop gateway when using a + source route (this gets put into the header proper). */ +@@ -100,6 +119,7 @@ struct in_pktinfo + struct in_addr ipi_spec_dst; /* Routing destination address */ + struct in_addr ipi_addr; /* Header destination address */ + }; ++#endif + + #ifdef __UCLIBC_HAS_IPV6__ + /* Options for use with `getsockopt' and `setsockopt' at the IPv6 level. +@@ -159,6 +179,7 @@ struct in_pktinfo + #define IPV6_PMTUDISC_DONT 0 /* Never send DF frames. */ + #define IPV6_PMTUDISC_WANT 1 /* Use per route hints. */ + #define IPV6_PMTUDISC_DO 2 /* Always DF. */ ++#define IPV6_PMTUDISC_PROBE 3 /* Ignore dst pmtu. */ + + /* Socket level values for IPv6. */ + #define SOL_IPV6 41 +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0039-libc-atexit-reuse-free-slots-at-the-end-of-exit-func.patch b/package/uclibc/0.9.33.2/uclibc-0039-libc-atexit-reuse-free-slots-at-the-end-of-exit-func.patch new file mode 100644 index 0000000000..ac9022c235 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0039-libc-atexit-reuse-free-slots-at-the-end-of-exit-func.patch @@ -0,0 +1,43 @@ +From 893d4fb45bb0811bcc939054e60e37a47a1786c5 Mon Sep 17 00:00:00 2001 +From: Ronald Wahl +Date: Mon, 4 Feb 2013 14:51:46 +0100 +Subject: [PATCH] libc: atexit: reuse free slots at the end of exit functions + table + +Continuosly dlopen and dlclose of shared object will cause a memory leak +in atexit function. This fix reuse free slots at the end of the list. + +For further detail see https://bugs.busybox.net/show_bug.cgi?id=2455 + +Signed-off-by: Ronald Wahl +Tested-by: Filippo Arcidiacono +Signed-off-by: Carmelo Amoroso +(cherry picked from commit 389cd96704f21549cafc0b5bdcd0ef762b98bc08) +--- + libc/stdlib/_atexit.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/libc/stdlib/_atexit.c b/libc/stdlib/_atexit.c +index 48b97ff..0af8c57 100644 +--- a/libc/stdlib/_atexit.c ++++ b/libc/stdlib/_atexit.c +@@ -240,6 +240,16 @@ struct exit_function attribute_hidden *__new_exitfn(void) + + __UCLIBC_MUTEX_LOCK(__atexit_lock); + ++ /* ++ * Reuse free slots at the end of the list. ++ * This avoids eating memory when dlopen and dlclose modules multiple times. ++ */ ++ while (__exit_count > 0) { ++ if (__exit_function_table[__exit_count-1].type == ef_free) { ++ --__exit_count; ++ } else break; ++ } ++ + #ifdef __UCLIBC_DYNAMIC_ATEXIT__ + /* If we are out of function table slots, make some more */ + if (__exit_slots < __exit_count+1) { +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0040-mman-rename-MAP_UNINITIALIZE-to-MAP_UNINITIALIZED.patch b/package/uclibc/0.9.33.2/uclibc-0040-mman-rename-MAP_UNINITIALIZE-to-MAP_UNINITIALIZED.patch new file mode 100644 index 0000000000..431969436f --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0040-mman-rename-MAP_UNINITIALIZE-to-MAP_UNINITIALIZED.patch @@ -0,0 +1,200 @@ +From fb1b8fc191bffd6b3bc6db6bfa824b2d41e18485 Mon Sep 17 00:00:00 2001 +From: Bernhard Reutner-Fischer +Date: Tue, 5 Feb 2013 19:13:06 +0100 +Subject: [PATCH] mman: rename MAP_UNINITIALIZE to MAP_UNINITIALIZED + +The name was changed to include a trailing 'D' when it went into the +kernel. + +Signed-off-by: Bernhard Reutner-Fischer +--- + ldso/ldso/dl-elf.c | 2 +- + ldso/ldso/ldso.c | 2 +- + libc/stdlib/malloc-simple/alloc.c | 4 ++-- + libc/stdlib/malloc-standard/malloc.h | 6 +++--- + libc/stdlib/malloc/malloc.c | 2 +- + libc/sysdeps/linux/alpha/bits/mman.h | 2 +- + libc/sysdeps/linux/common/bits/mman-common.h | 2 +- + libc/sysdeps/linux/hppa/bits/mman.h | 2 +- + libc/sysdeps/linux/mips/bits/mman.h | 2 +- + libc/sysdeps/linux/powerpc/bits/mman.h | 2 +- + libc/sysdeps/linux/sparc/bits/mman.h | 2 +- + libc/sysdeps/linux/xtensa/bits/mman.h | 2 +- + 12 files changed, 15 insertions(+), 15 deletions(-) + +diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c +index 9e2a12c..0e6d2cd 100644 +--- a/ldso/ldso/dl-elf.c ++++ b/ldso/ldso/dl-elf.c +@@ -500,7 +500,7 @@ struct elf_resolve *_dl_load_elf_shared_library(unsigned rflags, + return NULL; + } + header = _dl_mmap((void *) 0, _dl_pagesize, PROT_READ | PROT_WRITE, +- MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZE, -1, 0); ++ MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZED, -1, 0); + if (_dl_mmap_check_error(header)) { + _dl_dprintf(2, "%s:%i: can't map '%s'\n", _dl_progname, __LINE__, libname); + _dl_internal_error_number = LD_ERROR_MMAP_FAILED; +diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c +index 85d27a3..df46e24 100644 +--- a/ldso/ldso/ldso.c ++++ b/ldso/ldso/ldso.c +@@ -245,7 +245,7 @@ void *_dl_malloc(size_t size) + + _dl_debug_early("mmapping more memory\n"); + _dl_mmap_zero = _dl_malloc_addr = _dl_mmap((void *) 0, rounded_size, +- PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZE, -1, 0); ++ PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZED, -1, 0); + if (_dl_mmap_check_error(_dl_mmap_zero)) { + _dl_dprintf(_dl_debug_file, "%s: mmap of a spare page failed!\n", _dl_progname); + _dl_exit(20); +diff --git a/libc/stdlib/malloc-simple/alloc.c b/libc/stdlib/malloc-simple/alloc.c +index 914c89d..ec49781 100644 +--- a/libc/stdlib/malloc-simple/alloc.c ++++ b/libc/stdlib/malloc-simple/alloc.c +@@ -36,7 +36,7 @@ void *malloc(size_t size) + #ifdef __ARCH_USE_MMU__ + # define MMAP_FLAGS MAP_PRIVATE | MAP_ANONYMOUS + #else +-# define MMAP_FLAGS MAP_SHARED | MAP_ANONYMOUS | MAP_UNINITIALIZE ++# define MMAP_FLAGS MAP_SHARED | MAP_ANONYMOUS | MAP_UNINITIALIZED + #endif + + result = mmap((void *) 0, size + sizeof(size_t), PROT_READ | PROT_WRITE, +@@ -63,7 +63,7 @@ void * calloc(size_t nmemb, size_t lsize) + result = malloc(size); + + #ifndef __ARCH_USE_MMU__ +- /* mmap'd with MAP_UNINITIALIZE, we have to blank memory ourselves */ ++ /* mmap'd with MAP_UNINITIALIZED, we have to blank memory ourselves */ + if (result != NULL) { + memset(result, 0, size); + } +diff --git a/libc/stdlib/malloc-standard/malloc.h b/libc/stdlib/malloc-standard/malloc.h +index 73d4b12..e6ae544 100644 +--- a/libc/stdlib/malloc-standard/malloc.h ++++ b/libc/stdlib/malloc-standard/malloc.h +@@ -349,13 +349,13 @@ __UCLIBC_MUTEX_EXTERN(__malloc_lock); + #endif + + #ifdef __ARCH_USE_MMU__ +-# define _MAP_UNINITIALIZE 0 ++# define _MAP_UNINITIALIZED 0 + #else +-# define _MAP_UNINITIALIZE MAP_UNINITIALIZE ++# define _MAP_UNINITIALIZED MAP_UNINITIALIZED + #endif + + #define MMAP(addr, size, prot) \ +- (mmap((addr), (size), (prot), MAP_PRIVATE|MAP_ANONYMOUS|_MAP_UNINITIALIZE, 0, 0)) ++ (mmap((addr), (size), (prot), MAP_PRIVATE|MAP_ANONYMOUS|_MAP_UNINITIALIZED, 0, 0)) + + + /* ----------------------- Chunk representations ----------------------- */ +diff --git a/libc/stdlib/malloc/malloc.c b/libc/stdlib/malloc/malloc.c +index d58a7d0..2b47077 100644 +--- a/libc/stdlib/malloc/malloc.c ++++ b/libc/stdlib/malloc/malloc.c +@@ -124,7 +124,7 @@ __malloc_from_heap (size_t size, struct heap_free_area **heap + MAP_PRIVATE | MAP_ANONYMOUS, 0, 0); + #else + block = mmap ((void *)0, block_size, PROT_READ | PROT_WRITE, +- MAP_SHARED | MAP_ANONYMOUS | MAP_UNINITIALIZE, 0, 0); ++ MAP_SHARED | MAP_ANONYMOUS | MAP_UNINITIALIZED, 0, 0); + #endif + + #endif /* MALLOC_USE_SBRK */ +diff --git a/libc/sysdeps/linux/alpha/bits/mman.h b/libc/sysdeps/linux/alpha/bits/mman.h +index cafad4a..31327ed 100644 +--- a/libc/sysdeps/linux/alpha/bits/mman.h ++++ b/libc/sysdeps/linux/alpha/bits/mman.h +@@ -71,7 +71,7 @@ + # define MAP_NORESERVE 0x10000 /* Don't check for reservations. */ + # define MAP_POPULATE 0x20000 /* Populate (prefault) pagetables. */ + # define MAP_NONBLOCK 0x40000 /* Do not block on IO. */ +-# define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could ++# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could + be uninitialized. */ + #endif + +diff --git a/libc/sysdeps/linux/common/bits/mman-common.h b/libc/sysdeps/linux/common/bits/mman-common.h +index f00cb1a..c733a87 100644 +--- a/libc/sysdeps/linux/common/bits/mman-common.h ++++ b/libc/sysdeps/linux/common/bits/mman-common.h +@@ -64,7 +64,7 @@ + # define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */ + # define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ + # define MAP_STACK 0x20000 /* Allocation is for a stack. */ +-# define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could ++# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could + be uninitialized. */ + #endif + +diff --git a/libc/sysdeps/linux/hppa/bits/mman.h b/libc/sysdeps/linux/hppa/bits/mman.h +index 7f9bf4e..fc73c91 100644 +--- a/libc/sysdeps/linux/hppa/bits/mman.h ++++ b/libc/sysdeps/linux/hppa/bits/mman.h +@@ -45,7 +45,7 @@ + #define MAP_GROWSDOWN 0x8000 /* stack-like segment */ + #define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */ + #define MAP_NONBLOCK 0x20000 /* do not block on IO */ +-#define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could ++#define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could + be uninitialized. */ + + #define MS_SYNC 1 /* synchronous memory sync */ +diff --git a/libc/sysdeps/linux/mips/bits/mman.h b/libc/sysdeps/linux/mips/bits/mman.h +index c480be4..f9a8128 100644 +--- a/libc/sysdeps/linux/mips/bits/mman.h ++++ b/libc/sysdeps/linux/mips/bits/mman.h +@@ -66,7 +66,7 @@ + # define MAP_LOCKED 0x8000 /* pages are locked */ + # define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */ + # define MAP_NONBLOCK 0x20000 /* do not block on IO */ +-# define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could ++# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could + be uninitialized. */ + #endif + +diff --git a/libc/sysdeps/linux/powerpc/bits/mman.h b/libc/sysdeps/linux/powerpc/bits/mman.h +index 2d234c5..b766cb6 100644 +--- a/libc/sysdeps/linux/powerpc/bits/mman.h ++++ b/libc/sysdeps/linux/powerpc/bits/mman.h +@@ -63,7 +63,7 @@ + # define MAP_NORESERVE 0x00040 /* Don't check for reservations. */ + # define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */ + # define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ +-# define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could ++# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could + be uninitialized. */ + #endif + +diff --git a/libc/sysdeps/linux/sparc/bits/mman.h b/libc/sysdeps/linux/sparc/bits/mman.h +index 74921e4..2463e7d 100644 +--- a/libc/sysdeps/linux/sparc/bits/mman.h ++++ b/libc/sysdeps/linux/sparc/bits/mman.h +@@ -65,7 +65,7 @@ + # define _MAP_NEW 0x80000000 /* Binary compatibility with SunOS. */ + # define MAP_POPULATE 0x8000 /* Populate (prefault) pagetables. */ + # define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ +-# define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could ++# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could + be uninitialized. */ + #endif + +diff --git a/libc/sysdeps/linux/xtensa/bits/mman.h b/libc/sysdeps/linux/xtensa/bits/mman.h +index fead3ac..dfd9e4c 100644 +--- a/libc/sysdeps/linux/xtensa/bits/mman.h ++++ b/libc/sysdeps/linux/xtensa/bits/mman.h +@@ -64,7 +64,7 @@ + # define MAP_NORESERVE 0x0400 /* Don't check for reservations. */ + # define MAP_POPULATE 0x10000 /* Populate (prefault) pagetables. */ + # define MAP_NONBLOCK 0x20000 /* Do not block on IO. */ +-# define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could ++# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could + be uninitialized. */ + #endif + +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0041-libc-add-posix_fallocate.patch b/package/uclibc/0.9.33.2/uclibc-0041-libc-add-posix_fallocate.patch new file mode 100644 index 0000000000..64fb43d537 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0041-libc-add-posix_fallocate.patch @@ -0,0 +1,337 @@ +From 8fc83b7f3fd7425aa4e96c870a7d46df1d81c16c Mon Sep 17 00:00:00 2001 +From: Bernhard Reutner-Fischer +Date: Tue, 17 Apr 2012 09:30:15 +0200 +Subject: [PATCH] libc: add posix_fallocate() + +Signed-off-by: Bernhard Reutner-Fischer +--- + include/fcntl.h | 4 +- + libc/sysdeps/linux/common/Makefile.in | 3 +- + libc/sysdeps/linux/common/bits/kernel-features.h | 8 ++ + libc/sysdeps/linux/common/posix_fallocate.c | 43 ++++++++ + libc/sysdeps/linux/common/posix_fallocate64.c | 39 +++++++ + test/.gitignore | 2 + + test/unistd/Makefile.in | 5 +- + test/unistd/tst-posix_fallocate.c | 127 ++++++++++++++++++++++ + test/unistd/tst-posix_fallocate64.c | 2 + + 9 files changed, 228 insertions(+), 5 deletions(-) + create mode 100644 libc/sysdeps/linux/common/posix_fallocate.c + create mode 100644 libc/sysdeps/linux/common/posix_fallocate64.c + create mode 100644 test/unistd/tst-posix_fallocate.c + create mode 100644 test/unistd/tst-posix_fallocate64.c + +diff --git a/include/fcntl.h b/include/fcntl.h +index 26ad1fe..c4a47af 100644 +--- a/include/fcntl.h ++++ b/include/fcntl.h +@@ -210,9 +210,7 @@ extern int posix_fadvise64 (int __fd, __off64_t __offset, __off64_t __len, + + #endif + +-#if 0 /* && defined __UCLIBC_HAS_ADVANCED_REALTIME__ */ +- +-/* FIXME -- uClibc should probably implement these... */ ++#if defined __UCLIBC_HAS_ADVANCED_REALTIME__ + + /* Reserve storage for the data of the file associated with FD. + +diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in +index e9baa47..e4ac4ff 100644 +--- a/libc/sysdeps/linux/common/Makefile.in ++++ b/libc/sysdeps/linux/common/Makefile.in +@@ -82,7 +82,8 @@ CSRC-$(UCLIBC_HAS_REALTIME) += clock_getres.c clock_gettime.c clock_settime.c \ + sched_get_priority_max.c sched_get_priority_min.c sched_getscheduler.c \ + sched_rr_get_interval.c sched_setparam.c sched_setscheduler.c sigqueue.c + # clock_getcpuclockid|clock_nanosleep|mq_timedreceive|mq_timedsend|posix_fadvise|posix_fallocate|posix_madvise|posix_memalign|posix_mem_offset|posix_spawnattr_destroy|posix_spawnattr_init|posix_spawnattr_getflags|posix_spawnattr_setflags|posix_spawnattr_getpgroup|posix_spawnattr_setpgroup|posix_spawnattr_getschedparam|posix_spawnattr_setschedparam|posix_spawnattr_getschedpolicy|posix_spawnattr_setschedpolicy|posix_spawnattr_getsigdefault|posix_spawnattr_setsigdefault|posix_spawnattr_getsigmask|posix_spawnattr_setsigmask|posix_spawnattr_init|posix_spawnattr_setflags|posix_spawnattr_setpgroup|posix_spawnattr_setschedparam|posix_spawnattr_setschedpolicy|posix_spawnattr_setsigdefault|posix_spawnattr_setsigmask|posix_spawn_file_actions_addclose|posix_spawn_file_actions_addopen|posix_spawn_file_actions_adddup2|posix_spawn_file_actions_addopen|posix_spawn_file_actions_destroy|posix_spawn_file_actions_init|posix_spawn_file_actions_init|posix_spawn|posix_spawnp|posix_spawnp|posix_typed_mem_get_info|pthread_mutex_timedlock|sem_timedwait +-CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise64.c posix_fadvise.c posix_madvise.c ++CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise64.c posix_fadvise.c posix_madvise.c \ ++ posix_fallocate.c posix_fallocate64.c + CSRC-$(UCLIBC_SUSV4_LEGACY) += utime.c + CSRC-$(UCLIBC_HAS_EPOLL) += epoll.c + CSRC-$(UCLIBC_HAS_XATTR) += xattr.c +diff --git a/libc/sysdeps/linux/common/bits/kernel-features.h b/libc/sysdeps/linux/common/bits/kernel-features.h +index 5665e24..13c7a63 100644 +--- a/libc/sysdeps/linux/common/bits/kernel-features.h ++++ b/libc/sysdeps/linux/common/bits/kernel-features.h +@@ -496,6 +496,14 @@ + # define __ASSUME_PRIVATE_FUTEX 1 + #endif + ++/* Support for fallocate was added in 2.6.23, ++ on s390 only after 2.6.23-rc1, on alpha only after 2.6.33-rc1. */ ++#if __LINUX_KERNEL_VERSION >= 0x020617 \ ++ && (!defined __s390__ || __LINUX_KERNEL_VERSION >= 0x020618) \ ++ && (!defined __alpha__ || __LINUX_KERNEL_VERSION >= 0x020621) ++# define __ASSUME_FALLOCATE 1 ++#endif ++ + /* getcpu is a syscall for x86-64 since 3.1. */ + #if defined __x86_64__ && __LINUX_KERNEL_VERSION >= 0x030100 + # define __ASSUME_GETCPU_SYSCALL 1 +diff --git a/libc/sysdeps/linux/common/posix_fallocate.c b/libc/sysdeps/linux/common/posix_fallocate.c +new file mode 100644 +index 0000000..9aaa6ce +--- /dev/null ++++ b/libc/sysdeps/linux/common/posix_fallocate.c +@@ -0,0 +1,43 @@ ++/* vi: set sw=4 ts=4: */ ++/* ++ * posix_fallocate() for uClibc ++ * http://www.opengroup.org/onlinepubs/9699919799/functions/posix_fallocate.html ++ * ++ * Copyright (C) 2000-2006 Erik Andersen ++ * ++ * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#if defined __NR_fallocate ++int posix_fallocate(int fd, __off_t offset, __off_t len) ++{ ++ int ret; ++ ++# if __WORDSIZE == 32 ++ uint32_t off_low = offset; ++ uint32_t len_low = len; ++ /* may assert that these >>31 are 0 */ ++ uint32_t zero = 0; ++ INTERNAL_SYSCALL_DECL(err); ++ ret = (int) (INTERNAL_SYSCALL(fallocate, err, 6, fd, 0, ++ __LONG_LONG_PAIR (zero, off_low), ++ __LONG_LONG_PAIR (zero, len_low))); ++# elif __WORDSIZE == 64 ++ INTERNAL_SYSCALL_DECL(err); ++ ret = (int) (INTERNAL_SYSCALL(fallocate, err, 4, fd, 0, offset, len)); ++# else ++# error your machine is neither 32 bit or 64 bit ... it must be magical ++#endif ++ if (unlikely(INTERNAL_SYSCALL_ERROR_P (ret, err))) ++ return INTERNAL_SYSCALL_ERRNO (ret, err); ++ return 0; ++} ++# if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64 ++strong_alias(posix_fallocate,posix_fallocate64) ++# endif ++#endif +diff --git a/libc/sysdeps/linux/common/posix_fallocate64.c b/libc/sysdeps/linux/common/posix_fallocate64.c +new file mode 100644 +index 0000000..818d868 +--- /dev/null ++++ b/libc/sysdeps/linux/common/posix_fallocate64.c +@@ -0,0 +1,39 @@ ++/* vi: set sw=4 ts=4: */ ++/* ++ * posix_fallocate() for uClibc ++ * http://www.opengroup.org/onlinepubs/9699919799/functions/posix_fallocate.html ++ * ++ * Copyright (C) 2000-2006 Erik Andersen ++ * ++ * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#if defined __NR_fallocate ++ ++# if __WORDSIZE == 64 ++/* Can use normal posix_fallocate() */ ++# elif __WORDSIZE == 32 ++int posix_fallocate64(int fd, __off64_t offset, __off64_t len) ++{ ++ int ret; ++ uint32_t off_low = offset & 0xffffffff; ++ uint32_t off_high = offset >> 32; ++ uint32_t len_low = len & 0xffffffff; ++ uint32_t len_high = len >> 32; ++ INTERNAL_SYSCALL_DECL(err); ++ ret = (int) (INTERNAL_SYSCALL(fallocate, err, 6, fd, 0, ++ __LONG_LONG_PAIR (off_high, off_low), ++ __LONG_LONG_PAIR (len_high, len_low))); ++ if (unlikely(INTERNAL_SYSCALL_ERROR_P (ret, err))) ++ return INTERNAL_SYSCALL_ERRNO (ret, err); ++ return 0; ++} ++# else ++# error your machine is neither 32 bit or 64 bit ... it must be magical ++# endif ++#endif +diff --git a/test/.gitignore b/test/.gitignore +index 7234c48..ef152e9 100644 +--- a/test/.gitignore ++++ b/test/.gitignore +@@ -305,6 +305,8 @@ unistd/getcwd + unistd/getopt + unistd/getopt_long + unistd/tstgetopt ++unistd/tst-posix_fallocate ++unistd/tst-posix_fallocate64 + unistd/tst-preadwrite + unistd/tst-preadwrite64 + unistd/vfork +diff --git a/test/unistd/Makefile.in b/test/unistd/Makefile.in +index c542f98..24b9a37 100644 +--- a/test/unistd/Makefile.in ++++ b/test/unistd/Makefile.in +@@ -2,7 +2,10 @@ + # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + + ifeq ($(UCLIBC_HAS_LFS),) +-TESTS_DISABLED := tst-preadwrite64 ++TESTS_DISABLED := tst-preadwrite64 tst-posix_fallocate64 ++endif ++ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),) ++TESTS_DISABLED := tst-posix_fallocate + endif + OPTS_getopt := -abcXXX -9 + OPTS_getopt_long := --add XXX --delete YYY --verbose +diff --git a/test/unistd/tst-posix_fallocate.c b/test/unistd/tst-posix_fallocate.c +new file mode 100644 +index 0000000..d41c604 +--- /dev/null ++++ b/test/unistd/tst-posix_fallocate.c +@@ -0,0 +1,127 @@ ++#include ++#include ++ ++#ifndef TST_POSIX_FALLOCATE64 ++# define stat64 stat ++# define fstat64 fstat ++# else ++# ifndef O_LARGEFILE ++# error no O_LARGEFILE but you want to test with LFS enabled ++# endif ++#endif ++ ++static void do_prepare (void); ++#define PREPARE(argc, argv) do_prepare () ++static int do_test (void); ++#define TEST_FUNCTION do_test () ++#include ++ ++static int fd; ++static void ++do_prepare (void) ++{ ++ fd = create_temp_file ("tst-posix_fallocate.", NULL); ++ if (fd == -1) ++ { ++ printf ("cannot create temporary file: %m\n"); ++ exit (1); ++ } ++} ++ ++ ++static int ++do_test (void) ++{ ++ struct stat64 st; ++ ++ if (fstat64 (fd, &st) != 0) ++ { ++ puts ("1st fstat failed"); ++ return 1; ++ } ++ ++ if (st.st_size != 0) ++ { ++ puts ("file not created with size 0"); ++ return 1; ++ } ++ ++ if (posix_fallocate (fd, 512, 768) != 0) ++ { ++ puts ("1st posix_fallocate call failed"); ++ return 1; ++ } ++ ++ if (fstat64 (fd, &st) != 0) ++ { ++ puts ("2nd fstat failed"); ++ return 1; ++ } ++ ++ if (st.st_size != 512 + 768) ++ { ++ printf ("file size after 1st posix_fallocate call is %llu, expected %u\n", ++ (unsigned long long int) st.st_size, 512u + 768u); ++ return 1; ++ } ++ ++ if (posix_fallocate (fd, 0, 1024) != 0) ++ { ++ puts ("2nd posix_fallocate call failed"); ++ return 1; ++ } ++ ++ if (fstat64 (fd, &st) != 0) ++ { ++ puts ("3rd fstat failed"); ++ return 1; ++ } ++ ++ if (st.st_size != 512 + 768) ++ { ++ puts ("file size changed in 2nd posix_fallocate"); ++ return 1; ++ } ++ ++ if (posix_fallocate (fd, 2048, 64) != 0) ++ { ++ puts ("3rd posix_fallocate call failed"); ++ return 1; ++ } ++ ++ if (fstat64 (fd, &st) != 0) ++ { ++ puts ("4th fstat failed"); ++ return 1; ++ } ++ ++ if (st.st_size != 2048 + 64) ++ { ++ printf ("file size after 3rd posix_fallocate call is %llu, expected %u\n", ++ (unsigned long long int) st.st_size, 2048u + 64u); ++ return 1; ++ } ++#ifdef TST_POSIX_FALLOCATE64 ++ if (posix_fallocate64 (fd, 4097ULL, 4294967295ULL + 2ULL) != 0) ++ { ++ puts ("4th posix_fallocate call failed"); ++ return 1; ++ } ++ ++ if (fstat64 (fd, &st) != 0) ++ { ++ puts ("5th fstat failed"); ++ return 1; ++ } ++ ++ if (st.st_size != 4097ULL + 4294967295ULL + 2ULL) ++ { ++ printf ("file size after 4th posix_fallocate call is %llu, expected %llu\n", ++ (unsigned long long int) st.st_size, 4097ULL + 4294967295ULL + 2ULL); ++ return 1; ++ } ++#endif ++ close (fd); ++ ++ return 0; ++} +diff --git a/test/unistd/tst-posix_fallocate64.c b/test/unistd/tst-posix_fallocate64.c +new file mode 100644 +index 0000000..b1ee0ff +--- /dev/null ++++ b/test/unistd/tst-posix_fallocate64.c +@@ -0,0 +1,2 @@ ++#define TST_POSIX_FALLOCATE64 ++#include "tst-posix_fallocate.c" +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0042-nice-fix-overflow-checking-in-int_add_no_wrap.patch b/package/uclibc/0.9.33.2/uclibc-0042-nice-fix-overflow-checking-in-int_add_no_wrap.patch new file mode 100644 index 0000000000..a6e6349cb8 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0042-nice-fix-overflow-checking-in-int_add_no_wrap.patch @@ -0,0 +1,44 @@ +From e6735556ed0a5e791ea81a015a90c130a0eea060 Mon Sep 17 00:00:00 2001 +From: Xi Wang +Date: Wed, 20 Feb 2013 12:45:45 -0500 +Subject: [PATCH] nice: fix overflow checking in int_add_no_wrap() + +In C, signed integer overflow is undefined behavior. Many compilers +optimize away checks like `a + b < a'. + +Use safe precondition testing instead. + +Signed-off-by: Xi Wang +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/sysdeps/linux/common/nice.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/libc/sysdeps/linux/common/nice.c b/libc/sysdeps/linux/common/nice.c +index 3694db8..ed39946 100644 +--- a/libc/sysdeps/linux/common/nice.c ++++ b/libc/sysdeps/linux/common/nice.c +@@ -25,15 +25,15 @@ static __inline__ _syscall1(int, __syscall_nice, int, incr) + + static __inline__ int int_add_no_wrap(int a, int b) + { +- int s = a + b; +- + if (b < 0) { +- if (s > a) s = INT_MIN; ++ if (a < INT_MIN - b) ++ return INT_MIN; + } else { +- if (s < a) s = INT_MAX; ++ if (a > INT_MAX - b) ++ return INT_MAX; + } + +- return s; ++ return a + b; + } + + static __inline__ int __syscall_nice(int incr) +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0043-buildsys-Add-missing-SYMBOL_PREFIX-to-symbol-names.patch b/package/uclibc/0.9.33.2/uclibc-0043-buildsys-Add-missing-SYMBOL_PREFIX-to-symbol-names.patch new file mode 100644 index 0000000000..06fe6626c6 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0043-buildsys-Add-missing-SYMBOL_PREFIX-to-symbol-names.patch @@ -0,0 +1,86 @@ +From 0600966321c011c31edbb60945bbdca3fa34b7cb Mon Sep 17 00:00:00 2001 +From: Markos Chandras +Date: Mon, 25 Feb 2013 09:41:25 +0000 +Subject: [PATCH] buildsys: Add missing $(SYMBOL_PREFIX) to symbol names + +Signed-off-by: Markos Chandras +Signed-off-by: Bernhard Reutner-Fischer +--- + Makerules | 2 +- + ldso/ldso/Makefile.in | 2 +- + ldso/ldso/bfin/dl-startup.h | 5 +---- + ldso/libdl/Makefile.in | 2 +- + libpthread/nptl/Makefile.in | 2 +- + 5 files changed, 5 insertions(+), 8 deletions(-) + +diff --git a/Makerules b/Makerules +index 60acaa8..28bbdef 100644 +--- a/Makerules ++++ b/Makerules +@@ -300,7 +300,7 @@ define create-lds + -Wl,-z,relro -Wl,--hash-style=gnu -Wl,-z,defs \ + -Wl,--verbose 2>&1 | LC_ALL=C \ + sed -e '/^=========/,/^=========/!d;/^=========/d' \ +- -e 's/\. = .* + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' > $@.lds ++ -e 's/\. = .* + SIZEOF_HEADERS;/& $(SYMBOL_PREFIX)_begin = . - SIZEOF_HEADERS;/' > $@.lds + endef + + define link.so +diff --git a/ldso/ldso/Makefile.in b/ldso/ldso/Makefile.in +index eb1570a..91165c6 100644 +--- a/ldso/ldso/Makefile.in ++++ b/ldso/ldso/Makefile.in +@@ -36,7 +36,7 @@ LDFLAGS-$(UCLIBC_LDSO_NAME).so := $(LDFLAGS) + else + LDFLAGS-$(UCLIBC_LDSO_NAME).so := $(LDFLAGS_NOSTRIP) -Wl,-z,defs + endif +-LDFLAGS-$(UCLIBC_LDSO_NAME).so += -Wl,-e,_start -Wl,-z,now -Wl,-Bsymbolic \ ++LDFLAGS-$(UCLIBC_LDSO_NAME).so += -Wl,-e,$(SYMBOL_PREFIX)_start -Wl,-z,now -Wl,-Bsymbolic \ + -Wl,--export-dynamic $(CFLAG_-Wl--sort-common) -Wl,--discard-locals \ + $(CFLAG_-Wl--discard-all) -Wl,--no-undefined + +diff --git a/ldso/ldso/bfin/dl-startup.h b/ldso/ldso/bfin/dl-startup.h +index 76ae150..860b7c6 100644 +--- a/ldso/ldso/bfin/dl-startup.h ++++ b/ldso/ldso/bfin/dl-startup.h +@@ -40,10 +40,7 @@ __asm__( + " .text\n" + " .global __start\n" + " .type __start,@function\n" +- /* Build system expects a "_start" for the entry point; +- provide it as it's free to do so with aliases. */ +- " .set _start, __start\n" +- " .global _start\n" ++ " .hidden __start\n" + "__start:\n" + " call .Lcall\n" + ".Lcall:\n" +diff --git a/ldso/libdl/Makefile.in b/ldso/libdl/Makefile.in +index be236c8..edf95a6 100644 +--- a/ldso/libdl/Makefile.in ++++ b/ldso/libdl/Makefile.in +@@ -23,7 +23,7 @@ LDFLAGS-$(UCLIBC_FORMAT_DSBT_ELF)-libdl.so := -Wl,--dsbt-index=3 + LDFLAGS-libdl.so := $(LDFLAGS) + + ifeq ($(LDSO_NO_CLEANUP),) +-LDFLAGS-libdl.so += -Wl,-fini,dl_cleanup ++LDFLAGS-libdl.so += -Wl,-fini,$(SYMBOL_PREFIX)dl_cleanup + endif + + LIBS-libdl.so := $(LIBS) $(ldso) +diff --git a/libpthread/nptl/Makefile.in b/libpthread/nptl/Makefile.in +index 158bcae..0008822 100644 +--- a/libpthread/nptl/Makefile.in ++++ b/libpthread/nptl/Makefile.in +@@ -145,7 +145,7 @@ LDFLAGS-libpthread.so += $(LDFLAGS) + endif + + LDFLAGS-libpthread.so += $(top_builddir)lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so $(top_builddir)lib/libdl-$(VERSION).so \ +- -Wl,-z,nodelete,-z,initfirst,-init=__pthread_initialize_minimal_internal ++ -Wl,-z,nodelete,-z,initfirst,-init=$(SYMBOL_PREFIX)__pthread_initialize_minimal_internal + + LIBS-libpthread.so := $(LIBS) + +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0044-inet-do-not-filter-responses-in-res_query.patch b/package/uclibc/0.9.33.2/uclibc-0044-inet-do-not-filter-responses-in-res_query.patch new file mode 100644 index 0000000000..0a8c94bb57 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0044-inet-do-not-filter-responses-in-res_query.patch @@ -0,0 +1,46 @@ +From 5e40582d549b4a186de2fea9efafadd06904424c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timo=20Ter=C3=A4s?= +Date: Thu, 18 Jun 2009 06:55:46 +0000 +Subject: [PATCH] inet: do not filter responses in res_query +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes bug #5342 + +res_query was silently rejecting responses against T_ANY DNS +questions. + +Remove the type-filtering from res_query altogether. +__dns_lookup is supposed to return the proper stuff that you asked +for (and only that). + +Signed-off-by: Timo Teräs +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/inet/resolv.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c +index e738098..7bd634c 100644 +--- a/libc/inet/resolv.c ++++ b/libc/inet/resolv.c +@@ -3740,11 +3740,10 @@ int res_query(const char *dname, int class, int type, + + free(a.dotted); + +- if (a.atype == type) { /* CNAME */ +- if (i > anslen) +- i = anslen; +- memcpy(answer, packet, i); +- } ++ if (i > anslen) ++ i = anslen; ++ memcpy(answer, packet, i); ++ + free(packet); + return i; + } +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0045-Remove-pragma-weak-for-undeclared-symbol.patch b/package/uclibc/0.9.33.2/uclibc-0045-Remove-pragma-weak-for-undeclared-symbol.patch new file mode 100644 index 0000000000..19a06473c6 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0045-Remove-pragma-weak-for-undeclared-symbol.patch @@ -0,0 +1,39 @@ +From 9a7b71facfcaee5f3a45429358c55fcd5377c509 Mon Sep 17 00:00:00 2001 +From: Bernd Schmidt +Date: Tue, 24 Jul 2012 15:39:48 +0200 +Subject: [PATCH] Remove pragma weak for undeclared symbol + +pthread_initialize is a static function and should not be mentioned in a +header. The #pragma weak for it appears to confuse gcc-4.7. + +see gcc PR middle-end/36282 + +Signed-off-by: Bernd Schmidt +Signed-off-by: Bernhard Reutner-Fischer +--- + libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-lock.h | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-lock.h b/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-lock.h +index 78593ac..f41375b 100644 +--- a/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-lock.h ++++ b/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-lock.h +@@ -375,7 +375,6 @@ weak_extern (BP_SYM (__pthread_key_create)) + weak_extern (BP_SYM (__pthread_setspecific)) + weak_extern (BP_SYM (__pthread_getspecific)) + weak_extern (BP_SYM (__pthread_once)) +-weak_extern (__pthread_initialize) + weak_extern (__pthread_atfork) + weak_extern (BP_SYM (_pthread_cleanup_push)) + weak_extern (BP_SYM (_pthread_cleanup_pop)) +@@ -400,7 +399,6 @@ weak_extern (BP_SYM (_pthread_cleanup_pop_restore)) + # pragma weak __pthread_setspecific + # pragma weak __pthread_getspecific + # pragma weak __pthread_once +-# pragma weak __pthread_initialize + # pragma weak __pthread_atfork + # pragma weak _pthread_cleanup_push_defer + # pragma weak _pthread_cleanup_pop_restore +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0046-inet-fix-getting-the-nameserver-from-_res-state-afte.patch b/package/uclibc/0.9.33.2/uclibc-0046-inet-fix-getting-the-nameserver-from-_res-state-afte.patch new file mode 100644 index 0000000000..c294a46fc7 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0046-inet-fix-getting-the-nameserver-from-_res-state-afte.patch @@ -0,0 +1,34 @@ +From 41063cebafa7b90427837757db00cdbfe2690f82 Mon Sep 17 00:00:00 2001 +From: Felix Fietkau +Date: Fri, 21 Sep 2012 17:29:12 +0200 +Subject: [PATCH] inet: fix getting the nameserver from _res state after + res_init. + +Fixes displaying the nameserver in busybox nslookup. + +Signed-off-by: Felix Fietkau +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/inet/resolv.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c +index 7bd634c..6f58260 100644 +--- a/libc/inet/resolv.c ++++ b/libc/inet/resolv.c +@@ -3653,11 +3653,11 @@ res_init(void) + */ + if (!_res.id) + _res.id = res_randomid(); +- __res_sync = res_sync_func; + + __UCLIBC_MUTEX_UNLOCK(__resolv_lock); + + __res_vinit(&_res, 1); ++ __res_sync = res_sync_func; + + return 0; + } +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0047-_vfprintf.c-use-fputws_unlocked-S-F-instead-of-fputw.patch b/package/uclibc/0.9.33.2/uclibc-0047-_vfprintf.c-use-fputws_unlocked-S-F-instead-of-fputw.patch new file mode 100644 index 0000000000..426835021d --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0047-_vfprintf.c-use-fputws_unlocked-S-F-instead-of-fputw.patch @@ -0,0 +1,30 @@ +From 543460903545b59903bc83221a6cea02afd0e04f Mon Sep 17 00:00:00 2001 +From: Mirko Vogt +Date: Fri, 21 Sep 2012 17:29:15 +0200 +Subject: [PATCH] _vfprintf.c: use 'fputws_unlocked(S, F)' instead of + 'fputws(S, F)' + +This eliminates a source of reproduceable freezes + +Signed-off-by: Mirko Vogt +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/stdio/_vfprintf.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libc/stdio/_vfprintf.c b/libc/stdio/_vfprintf.c +index 3db8cdf..069db16 100644 +--- a/libc/stdio/_vfprintf.c ++++ b/libc/stdio/_vfprintf.c +@@ -1229,7 +1229,7 @@ static size_t _fp_out_narrow(FILE *fp, intptr_t type, intptr_t len, intptr_t buf + #define STRLEN wcslen + #define _PPFS_init _ppwfs_init + /* Pulls in fseek: */ +-#define OUTPUT(F,S) fputws(S,F) ++#define OUTPUT(F,S) fputws_unlocked(S,F) + /* TODO: #define OUTPUT(F,S) _wstdio_fwrite((S),wcslen(S),(F)) */ + #define _outnwcs(stream, wstring, len) _wstdio_fwrite((const wchar_t *)(wstring), len, stream) + #define FP_OUT _fp_out_wide +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0048-Fix-a-problem-with-scanning-wide-chars.patch b/package/uclibc/0.9.33.2/uclibc-0048-Fix-a-problem-with-scanning-wide-chars.patch new file mode 100644 index 0000000000..4baf8597a1 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0048-Fix-a-problem-with-scanning-wide-chars.patch @@ -0,0 +1,66 @@ +From 12846e741d925630a4079ac02290b28c6f00b887 Mon Sep 17 00:00:00 2001 +From: Nathan Sidwell +Date: Fri, 22 Mar 2013 17:46:52 +0100 +Subject: [PATCH] Fix a problem with scanning wide chars. + +We found that the testcase + +int +main (void) +{ + wchar_t s[10]; + memset (s, 0, sizeof (s)); + int r = sscanf ("s", "%ls", s); + printf ("%d\n", r); + printf ("%ls\n", s); + return 0; +} + +printed +0 + + +rather than the expected +1 +s + +The problem was the enum in _scanf.c, which has had a 'CONV_m' value +inserted. The attached patch fixes the problem in __psfs_parse_spec by +not presuming a particular displacement between the two sets of +char-like conversion values. With this patch the above program produces +the expected output. + +Signed-off-by: Nathan Sidwell +Signed-off-by: Bernd Schmidt +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/stdio/_scanf.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/libc/stdio/_scanf.c b/libc/stdio/_scanf.c +index 952853c..3848a09 100644 +--- a/libc/stdio/_scanf.c ++++ b/libc/stdio/_scanf.c +@@ -429,8 +429,8 @@ libc_hidden_def(vswscanf) + /* npxXoudif eEgG CS cs[ */ + /* NOTE: the 'm' flag must come before any convs that support it */ + +-/* NOTE: Ordering is important! In particular, CONV_LEFTBRACKET +- * must immediately precede CONV_c. */ ++/* NOTE: Ordering is important! The CONV_{C,S,LEFTBRACKET} must map ++ simply to their lowercase equivalents. */ + + enum { + CONV_n = 0, +@@ -921,7 +921,7 @@ int attribute_hidden __psfs_parse_spec(register psfs_t *psfs) + psfs->dataargtype = PA_FLAG_LONG; + } else if ((p_m_spec_chars >= CONV_c) + && (psfs->dataargtype & PA_FLAG_LONG)) { +- p_m_spec_chars -= 3; /* lc -> C, ls -> S, l[ -> ?? */ ++ p_m_spec_chars -= CONV_c - CONV_C; /* lc -> C, ls -> S, l[ -> ?? */ + } + + psfs->conv_num = p_m_spec_chars; +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0049-Fix-some-fragileness-in-dlopen-do_dlopen-wrapper-wor.patch b/package/uclibc/0.9.33.2/uclibc-0049-Fix-some-fragileness-in-dlopen-do_dlopen-wrapper-wor.patch new file mode 100644 index 0000000000..1c220db437 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0049-Fix-some-fragileness-in-dlopen-do_dlopen-wrapper-wor.patch @@ -0,0 +1,66 @@ +From 2f0580cece3ab2baaf9214f434c7146e389566a4 Mon Sep 17 00:00:00 2001 +From: Nathan Sidwell +Date: Fri, 22 Mar 2013 17:48:51 +0100 +Subject: [PATCH] Fix some fragileness in dlopen/do_dlopen wrapper & worker + pair. + +do_dlopen contains __builtin_return_address to determine from +whence it was called, and uses that to determine which dynamic +object's data it should use to start the search. (In the bug I was +tracking, this related to whether the application's RPATH was used or +not.) For that to work, it has to have been inlined into the wrapper +function. + +As it happens, it wasn't being inlined. That's an unfortunate compiler +behaviour, but it isn't wrong and shouldn't have caused dlopen to fail. + +This patch changes things so the wrapper function determines the +return address, and passes it to the worker. If the worker's inlined, +the generated code should be exactly the same as before. + +Signed-off-by: Nathan Sidwell +Signed-off-by: Bernd Schmidt +Signed-off-by: Bernhard Reutner-Fischer +--- + ldso/libdl/libdl.c | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c +index 71ade1f..018c720 100644 +--- a/ldso/libdl/libdl.c ++++ b/ldso/libdl/libdl.c +@@ -296,11 +296,10 @@ static ptrdiff_t _dl_build_local_scope (struct elf_resolve **list, + return p - list; + } + +-static void *do_dlopen(const char *libname, int flag) ++static void *do_dlopen(const char *libname, int flag, ElfW(Addr) from) + { + struct elf_resolve *tpnt, *tfrom; + struct dyn_elf *dyn_chain, *rpnt = NULL, *dyn_ptr, *relro_ptr, *handle; +- ElfW(Addr) from; + struct elf_resolve *tpnt1; + void (*dl_brk) (void); + int now_flag; +@@ -320,8 +319,6 @@ static void *do_dlopen(const char *libname, int flag) + return NULL; + } + +- from = (ElfW(Addr)) __builtin_return_address(0); +- + if (!_dl_init) { + _dl_init = true; + _dl_malloc_function = malloc; +@@ -661,7 +658,8 @@ void *dlopen(const char *libname, int flag) + void *ret; + + __UCLIBC_MUTEX_CONDITIONAL_LOCK(_dl_mutex, 1); +- ret = do_dlopen(libname, flag); ++ ret = do_dlopen(libname, flag, ++ (ElfW(Addr)) __builtin_return_address(0)); + __UCLIBC_MUTEX_CONDITIONAL_UNLOCK(_dl_mutex, 1); + + return ret; +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0050-libdl-fix-dlopen-implementation-from-statically-link.patch b/package/uclibc/0.9.33.2/uclibc-0050-libdl-fix-dlopen-implementation-from-statically-link.patch new file mode 100644 index 0000000000..87a852b5e2 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0050-libdl-fix-dlopen-implementation-from-statically-link.patch @@ -0,0 +1,60 @@ +From 7f82a682a730899d30d8640b6af5178919339837 Mon Sep 17 00:00:00 2001 +From: Filippo Arcidiacono +Date: Thu, 9 May 2013 09:04:20 +0200 +Subject: [PATCH] libdl: fix dlopen implementation from statically linked + application + +Calling dlopen from statically linked application is actually broken, +because _dl_find_hash enters into an infinite loop when trying to +resolve symbols. In this case it doesn't need to extend the global +scope, it is readyto be used as it is, because _dl_loaded_modules already points +to the dlopened library. + +The patch also fixesi a typo in __LDSO_LD_LIBRARY_PATH__ macro, that was +preventing to get the actual value of the LD_LIBRARY_PATH. + +Signed-off-by: Filippo Arcidiacono +Signed-off-by: Carmelo Amoroso +(cherry picked from commit 231e4a9b4b972662a6832f714a05525a3754892d) + +Signed-off-by: Carmelo Amoroso +--- + ldso/libdl/libdl.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c +index 018c720..49711a8 100644 +--- a/ldso/libdl/libdl.c ++++ b/ldso/libdl/libdl.c +@@ -374,7 +374,7 @@ static void *do_dlopen(const char *libname, int flag, ElfW(Addr) from) + if (getenv("LD_BIND_NOW")) + now_flag = RTLD_NOW; + +-#if !defined SHARED && defined __LDSO_LIBRARY_PATH__ ++#if !defined SHARED && defined __LDSO_LD_LIBRARY_PATH__ + /* When statically linked, the _dl_library_path is not yet initialized */ + _dl_library_path = getenv("LD_LIBRARY_PATH"); + #endif +@@ -541,11 +541,18 @@ static void *do_dlopen(const char *libname, int flag, ElfW(Addr) from) + * to the GOT tables. We need to do this in reverse order so that COPY + * directives work correctly */ + +- /* Get the tail of the list */ ++#ifdef SHARED ++ /* ++ * Get the tail of the list. ++ * In the static case doesn't need to extend the global scope, it is ++ * ready to be used as it is, because _dl_loaded_modules already points ++ * to the dlopened library. ++ */ + for (ls = &_dl_loaded_modules->symbol_scope; ls && ls->next; ls = ls->next); + + /* Extend the global scope by adding the local scope of the dlopened DSO. */ + ls->next = &dyn_chain->dyn->symbol_scope; ++#endif + #ifdef __mips__ + /* + * Relocation of the GOT entries for MIPS have to be done +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0051-libubacktrace-fix-backtrace-for-statically-linked-ap.patch b/package/uclibc/0.9.33.2/uclibc-0051-libubacktrace-fix-backtrace-for-statically-linked-ap.patch new file mode 100644 index 0000000000..b208484854 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0051-libubacktrace-fix-backtrace-for-statically-linked-ap.patch @@ -0,0 +1,168 @@ +From 6b2250a1a39362abe53e78a45897caecf65ec73f Mon Sep 17 00:00:00 2001 +From: Filippo Arcidiacono +Date: Thu, 9 May 2013 11:42:23 +0200 +Subject: [PATCH] libubacktrace: fix backtrace for statically linked + application + +libgcc_s.so's unwinder could not access unwind tables of statically +linked binaries, so we really want to use _Unwind_* stuff from +libgcc_eh.a. +It required to build backtrace.c differentiating between shared and +static case. + +Signed-off-by: Filippo Arcidiacono +Signed-off-by: Carmelo Amoroso +(cherry picked from commit 71c10c484e7dc113396cccb7e503befb759c6346) + +Signed-off-by: Carmelo Amoroso +--- + libubacktrace/Makefile.in | 23 ++++++++++++++--------- + libubacktrace/arm/Makefile.arch | 2 +- + libubacktrace/arm/backtrace.c | 7 +++++++ + libubacktrace/backtrace.c | 7 +++++++ + 4 files changed, 29 insertions(+), 10 deletions(-) + +diff --git a/libubacktrace/Makefile.in b/libubacktrace/Makefile.in +index 8a4b081..612bf2d 100644 +--- a/libubacktrace/Makefile.in ++++ b/libubacktrace/Makefile.in +@@ -25,11 +25,13 @@ libubacktrace_ARCH_OUT:=$(libubacktrace_OUT)/$(TARGET_ARCH) + -include $(libubacktrace_ARCH_DIR)/Makefile.arch + + libubacktrace_SRC-y := +-libubacktrace_SRC-$(UCLIBC_HAS_BACKTRACE) := backtrace.c backtracesyms.c backtracesymsfd.c ++libubacktrace_SRC-$(UCLIBC_HAS_BACKTRACE) := backtracesyms.c backtracesymsfd.c ++libubacktrace_SRC_SHARED-$(UCLIBC_HAS_BACKTRACE) := backtrace.c + + # remove generic sources, if arch specific version is present + ifneq ($(strip $(libubacktrace_ARCH_SRC-y)),) + libubacktrace_SRC-y := $(filter-out $(notdir $(libubacktrace_ARCH_SRC-y)),$(libubacktrace_SRC-y)) ++libubacktrace_SRC_SHARED-y := $(filter-out $(notdir $(libubacktrace_ARCH_SRC-y)),$(libubacktrace_SRC_SHARED-y)) + endif + + # -fasynchronous-unwind-tables is required for backtrace to work using dwarf2 +@@ -43,12 +45,19 @@ endif + libubacktrace_SRCS := $(patsubst %.c,$(libubacktrace_DIR)/%.c,$(libubacktrace_SRC-y)) + libubacktrace_OBJS := $(patsubst $(libubacktrace_DIR)/%.c,$(libubacktrace_OUT)/%.o,$(libubacktrace_SRCS)) + ++libubacktrace_SHARED_SRCS := $(patsubst %.c,$(libubacktrace_DIR)/%.c,$(libubacktrace_SHARED_SRC-y)) ++libubacktrace_SHARED_OBJS := $(patsubst $(libubacktrace_DIR)/%.c,$(libubacktrace_OUT)/%.s,$(libubacktrace_SHARED_SRCS)) ++ ++libubacktrace-shared-y := $(libubacktrace_SHARED_OBJS:.os=.oS) ++libubacktrace-static-y := $(libubacktrace_SHARED_OBJS) ++ + ifeq ($(DOPIC),y) +-libubacktrace-a-y += $(libubacktrace_OBJS:.o=.os) ++libubacktrace-a-y += $(libubacktrace_OBJS:.o=.os) $(libubacktrace-static-y:.o=.os) + else +-libubacktrace-a-y += $(libubacktrace_OBJS) ++libubacktrace-a-y += $(libubacktrace_OBJS) $(libubacktrace-static-y) + endif +-libubacktrace-so-y += $(libubacktrace_OBJS:.o=.os) ++libubacktrace-so-y += $(libubacktrace_OBJS:.o=.os) $(libubacktrace-shared-y) ++ + + lib-a-$(UCLIBC_HAS_BACKTRACE) += $(top_builddir)lib/libubacktrace.a + lib-so-$(UCLIBC_HAS_BACKTRACE) += $(top_builddir)lib/libubacktrace.so +@@ -56,11 +65,7 @@ lib-so-$(UCLIBC_HAS_BACKTRACE) += $(top_builddir)lib/libubacktrace.so + objclean-y += CLEAN_libubacktrace + + ifeq ($(DOMULTI),n) +-ifeq ($(DOPIC),y) +-$(top_builddir)lib/libubacktrace.so: $(top_builddir)lib/libubacktrace.a $(libdl.depend) +-else + $(top_builddir)lib/libubacktrace.so: $(libubacktrace_OUT)/libubacktrace_so.a $(libdl.depend) +-endif + $(call link.so,$(libubacktrace_FULL_NAME),$(ABI_VERSION)) + else + $(top_builddir)lib/libubacktrace.so: $(libubacktrace_OUT)/libubacktrace.oS | $(libdl.depend) +@@ -71,7 +76,7 @@ $(libubacktrace_OUT)/libubacktrace_so.a: $(libubacktrace-so-y) + $(Q)$(RM) $@ + $(do_ar) + +-$(libubacktrace_OUT)/libubacktrace.oS: $(libubacktrace_SRCS) $(libubacktrace_ARCH_SRCS) ++$(libubacktrace_OUT)/libubacktrace.oS: $(libubacktrace_SRCS) $(libubacktrace_ARCH_SRCS) $(libubacktrace_SHARED_SRCS) + $(Q)$(RM) $@ + $(compile-m) + +diff --git a/libubacktrace/arm/Makefile.arch b/libubacktrace/arm/Makefile.arch +index 53b8c0e..b3fb500 100644 +--- a/libubacktrace/arm/Makefile.arch ++++ b/libubacktrace/arm/Makefile.arch +@@ -14,4 +14,4 @@ libubacktrace-a-y+=$(libubacktrace_ARCH_OBJS:.o=.os) + else + libubacktrace-a-y+=$(libubacktrace_ARCH_OBJS) + endif +-libubacktrace-so-y+=$(libubacktrace_ARCH_OBJS:.o=.os) ++libubacktrace-so-y+=$(libubacktrace_ARCH_OBJS:.o=.oS) +diff --git a/libubacktrace/arm/backtrace.c b/libubacktrace/arm/backtrace.c +index d4eca32..5955189 100644 +--- a/libubacktrace/arm/backtrace.c ++++ b/libubacktrace/arm/backtrace.c +@@ -25,6 +25,7 @@ struct trace_arg + int cnt, size; + }; + ++#ifdef SHARED + static _Unwind_Reason_Code (*unwind_backtrace) (_Unwind_Trace_Fn, void *); + static _Unwind_VRS_Result (*unwind_vrs_get) (_Unwind_Context *, + _Unwind_VRS_RegClass, +@@ -42,6 +43,10 @@ static void backtrace_init (void) + abort(); + } + } ++#else ++# define unwind_backtrace _Unwind_Backtrace ++# define unwind_vrs_get _Unwind_VRS_Get ++#endif + /* This function is identical to "_Unwind_GetGR", except that it uses + "unwind_vrs_get" instead of "_Unwind_VRS_Get". */ + static inline _Unwind_Word +@@ -80,8 +85,10 @@ int backtrace (void **array, int size) + { + struct trace_arg arg = { .array = array, .size = size, .cnt = -1 }; + ++#ifdef SHARED + if (unwind_backtrace == NULL) + backtrace_init(); ++#endif + + if (size >= 1) + unwind_backtrace (backtrace_helper, &arg); +diff --git a/libubacktrace/backtrace.c b/libubacktrace/backtrace.c +index fdd5981..1e0a0ec 100644 +--- a/libubacktrace/backtrace.c ++++ b/libubacktrace/backtrace.c +@@ -33,6 +33,7 @@ struct trace_arg + int cnt, size; + }; + ++#ifdef SHARED + static _Unwind_Reason_Code (*unwind_backtrace) (_Unwind_Trace_Fn, void *); + static _Unwind_Ptr (*unwind_getip) (struct _Unwind_Context *); + +@@ -47,6 +48,10 @@ static void backtrace_init (void) + abort(); + } + } ++#else ++# define unwind_backtrace _Unwind_Backtrace ++# define unwind_getip _Unwind_GetIP ++#endif + + static _Unwind_Reason_Code + backtrace_helper (struct _Unwind_Context *ctx, void *a) +@@ -71,8 +76,10 @@ int backtrace (void **array, int size) + { + struct trace_arg arg = { .array = array, .size = size, .cnt = -1 }; + ++#ifdef SHARED + if (unwind_backtrace == NULL) + backtrace_init(); ++#endif + + if (size >= 1) + unwind_backtrace (backtrace_helper, &arg); +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0052-libubacktrace-fix-build-due-to-some-typos.patch b/package/uclibc/0.9.33.2/uclibc-0052-libubacktrace-fix-build-due-to-some-typos.patch new file mode 100644 index 0000000000..42105cfd06 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0052-libubacktrace-fix-build-due-to-some-typos.patch @@ -0,0 +1,39 @@ +From bcfb096af20bac667381c1601e54c78bcbb09d42 Mon Sep 17 00:00:00 2001 +From: Filippo Arcidiacono +Date: Mon, 13 May 2013 14:06:11 +0200 +Subject: [PATCH] libubacktrace: fix build due to some typos + +Commit 71c10c484e7dc113396cccb7e503befb759c6346 broke libubactrace build +due to some typos, so that backtrace.o[sS] were not built. +This definetively fixes this problem. + +Signed-off-by: Filippo Arcidiacono +Signed-off-by: Carmelo Amoroso +(cherry picked from commit e19afed1bd3af6bf8976912517c0677d238309f8) + +Signed-off-by: Carmelo Amoroso +--- + libubacktrace/Makefile.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/libubacktrace/Makefile.in b/libubacktrace/Makefile.in +index 612bf2d..1cd5f83 100644 +--- a/libubacktrace/Makefile.in ++++ b/libubacktrace/Makefile.in +@@ -45,10 +45,10 @@ endif + libubacktrace_SRCS := $(patsubst %.c,$(libubacktrace_DIR)/%.c,$(libubacktrace_SRC-y)) + libubacktrace_OBJS := $(patsubst $(libubacktrace_DIR)/%.c,$(libubacktrace_OUT)/%.o,$(libubacktrace_SRCS)) + +-libubacktrace_SHARED_SRCS := $(patsubst %.c,$(libubacktrace_DIR)/%.c,$(libubacktrace_SHARED_SRC-y)) +-libubacktrace_SHARED_OBJS := $(patsubst $(libubacktrace_DIR)/%.c,$(libubacktrace_OUT)/%.s,$(libubacktrace_SHARED_SRCS)) ++libubacktrace_SHARED_SRCS := $(patsubst %.c,$(libubacktrace_DIR)/%.c,$(libubacktrace_SRC_SHARED-y)) ++libubacktrace_SHARED_OBJS := $(patsubst $(libubacktrace_DIR)/%.c,$(libubacktrace_OUT)/%.o,$(libubacktrace_SHARED_SRCS)) + +-libubacktrace-shared-y := $(libubacktrace_SHARED_OBJS:.os=.oS) ++libubacktrace-shared-y := $(libubacktrace_SHARED_OBJS:.o=.oS) + libubacktrace-static-y := $(libubacktrace_SHARED_OBJS) + + ifeq ($(DOPIC),y) +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0053-libc-elf-explicitly-include-uClibc_page.h-to-make-PA.patch b/package/uclibc/0.9.33.2/uclibc-0053-libc-elf-explicitly-include-uClibc_page.h-to-make-PA.patch new file mode 100644 index 0000000000..3197a21002 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0053-libc-elf-explicitly-include-uClibc_page.h-to-make-PA.patch @@ -0,0 +1,30 @@ +From b8fb56dcd9686d1bdaf02c2f4f395bb185c093d7 Mon Sep 17 00:00:00 2001 +From: Carmelo Amoroso +Date: Mon, 27 May 2013 16:30:36 +0200 +Subject: [PATCH] libc: elf: explicitly include uClibc_page.h to make + PAGE_SIZE visible + +Signed-off-by: Filippo Arcidiacono +Signed-off-by: Carmelo Amoroso +(cherry picked from commit 215c2868aca096364a4725a42c3ffb46dc4e8b39) + +Signed-off-by: Carmelo Amoroso +--- + libc/misc/elf/dl-support.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libc/misc/elf/dl-support.c b/libc/misc/elf/dl-support.c +index f194692..908fb06 100644 +--- a/libc/misc/elf/dl-support.c ++++ b/libc/misc/elf/dl-support.c +@@ -19,6 +19,7 @@ + #include + #include + #endif ++#include + + #if defined(USE_TLS) && USE_TLS + +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/uclibc-0054-common-pread_write.c-unbreak-on-archs-without-__NR_p.patch b/package/uclibc/0.9.33.2/uclibc-0054-common-pread_write.c-unbreak-on-archs-without-__NR_p.patch new file mode 100644 index 0000000000..b071493d88 --- /dev/null +++ b/package/uclibc/0.9.33.2/uclibc-0054-common-pread_write.c-unbreak-on-archs-without-__NR_p.patch @@ -0,0 +1,36 @@ +From 1f7602f1dde43b12bead54433934ae4ddefa8118 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Fri, 4 Oct 2013 21:09:09 +0200 +Subject: [PATCH-0.9.33] common/pread_write.c: unbreak on archs without __NR_pread64 + +Some archs (avr32 in particular) still doesn't define __NR_pread64, so +we should fall back to __NR_pread if it isn't available. + +The code nicely checks for it, but then ends up hard coding the syscall +to use __NR_pread64 afterwards, rendering the check useless. Fix it by +using the result of the test instead. + +Signed-off-by: Peter Korsgaard +--- +Noticed when adding the pending patches for 0.9.33.3 to Buildroot: +http://jenkins.free-electrons.com/job/buildroot/config=atstk100x_defconfig/116/console + + libc/sysdeps/linux/common/pread_write.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libc/sysdeps/linux/common/pread_write.c b/libc/sysdeps/linux/common/pread_write.c +index b13de66..8562ab4 100644 +--- a/libc/sysdeps/linux/common/pread_write.c ++++ b/libc/sysdeps/linux/common/pread_write.c +@@ -42,7 +42,7 @@ extern __typeof(pwrite64) __libc_pwrite64; + + #include + +-# define __NR___syscall_pread __NR_pread64 ++# define __NR___syscall_pread __NR_pread + static __inline__ _syscall5(ssize_t, __syscall_pread, int, fd, void *, buf, + size_t, count, off_t, offset_hi, off_t, offset_lo) + +-- +1.7.10.4 + diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in new file mode 100644 index 0000000000..82dd3aa72f --- /dev/null +++ b/package/uclibc/Config.in @@ -0,0 +1,269 @@ +if BR2_TOOLCHAIN_BUILDROOT_UCLIBC + +comment "uClibc Options" + +choice + prompt "uClibc C library Version" + default BR2_UCLIBC_VERSION_0_9_33 + help + Select the version of uClibc you wish to use. + + config BR2_UCLIBC_VERSION_0_9_31 + bool "uClibc 0.9.31.x" + depends on BR2_avr32 + + config BR2_UCLIBC_VERSION_0_9_32 + bool "uClibc 0.9.32.x" + depends on !(BR2_arc || BR2_avr32 || BR2_sh || BR2_xtensa) + + config BR2_UCLIBC_VERSION_0_9_33 + bool "uClibc 0.9.33.x" + depends on !(BR2_arc || BR2_avr32 || BR2_xtensa) + + config BR2_UCLIBC_VERSION_0_9_33_ARC + bool "uClibc 0.9.33.x-arc" + depends on BR2_arc + + config BR2_UCLIBC_VERSION_SNAPSHOT + bool "daily snapshot" + +endchoice + +config BR2_USE_UCLIBC_SNAPSHOT + string "Date (yyyymmdd) of snapshot or 'snapshot' for latest" + default "snapshot" + depends on BR2_UCLIBC_VERSION_SNAPSHOT + help + Use latest snapshot or one from a specific date? + +config BR2_UCLIBC_VERSION_STRING + string + default 0.9.31.1 if BR2_UCLIBC_VERSION_0_9_31 + default 0.9.32.1 if BR2_UCLIBC_VERSION_0_9_32 + default 0.9.33.2 if BR2_UCLIBC_VERSION_0_9_33 + default 0.9.33-arc if BR2_UCLIBC_VERSION_0_9_33_ARC + default BR2_USE_UCLIBC_SNAPSHOT if BR2_UCLIBC_VERSION_SNAPSHOT + +config BR2_UCLIBC_CONFIG + string "uClibc configuration file to use?" + default "package/uclibc/uClibc-0.9.31.config" if BR2_UCLIBC_VERSION_0_9_31 + default "package/uclibc/uClibc-0.9.32.config" if BR2_UCLIBC_VERSION_0_9_32 + default "package/uclibc/uClibc-0.9.33.config" if BR2_UCLIBC_VERSION_0_9_33 + default "package/uclibc/uClibc-snapshot.config" if BR2_UCLIBC_VERSION_0_9_33_ARC + default "package/uclibc/uClibc-snapshot.config" if BR2_UCLIBC_VERSION_SNAPSHOT + help + Some people may wish to use their own modified uClibc configuration + file and will specify their config file location with this option. + See also docs/README in this package. + If unsure, use the default. + +config BR2_TOOLCHAIN_BUILDROOT_LARGEFILE + bool "Enable large file (files > 2 GB) support" + select BR2_LARGEFILE + help + Enable this option if you want your toolchain to support + files bigger than 2 GB. + +config BR2_TOOLCHAIN_BUILDROOT_INET_IPV6 + bool "Enable IPv6 support" + select BR2_INET_IPV6 + help + Enable this option if you want your toolchain to support + IPv6. + +config BR2_TOOLCHAIN_BUILDROOT_INET_RPC + bool "Enable RPC support" + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Enable this option if you want your toolchain to support + RPC (needed for NFS, for example). + +config BR2_TOOLCHAIN_BUILDROOT_WCHAR + bool "Enable WCHAR support" + select BR2_USE_WCHAR + help + Enable this option if you want your toolchain to support + wide characters (i.e characters longer than 8 bits, needed + for locale support). + +config BR2_TOOLCHAIN_BUILDROOT_LOCALE + bool "Enable toolchain locale/i18n support" + select BR2_TOOLCHAIN_BUILDROOT_WCHAR + select BR2_ENABLE_LOCALE + help + Enable this option if you want your toolchain to support + localization and internationalization. + +choice + prompt "Thread library implementation" + default BR2_PTHREADS_NATIVE if !(BR2_avr32 || BR2_xtensa) + default BR2_PTHREADS_OLD + help + Use this option to select the thread library implementation + that should be used in your toolchain. Not all thread + variants work with all versions of uClibc, the "linuxthreads + (stable/old)" may be a working fallback if you need + threading at all. + + config BR2_PTHREADS_NONE + bool "none" + + config BR2_PTHREADS + bool "linuxthreads" + depends on !BR2_bfin + depends on !BR2_xtensa + select BR2_TOOLCHAIN_HAS_THREADS + + config BR2_PTHREADS_OLD + bool "linuxthreads (stable/old)" + select BR2_TOOLCHAIN_HAS_THREADS + + config BR2_PTHREADS_NATIVE + bool "Native POSIX Threading (NPTL)" + select BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_arc + depends on !BR2_avr32 + depends on !BR2_bfin + depends on !BR2_xtensa + depends on !BR2_x86_i386 +endchoice + +config BR2_PTHREAD_DEBUG + bool "Thread library debugging" + depends on BR2_PTHREADS || BR2_PTHREADS_OLD || BR2_PTHREADS_NATIVE + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + help + Build the thread library with debugging enabled. + +config BR2_TOOLCHAIN_BUILDROOT_USE_SSP + bool "Enable stack protection support" + select BR2_TOOLCHAIN_HAS_SSP + help + Enable stack smashing protection support using GCCs + -fstack-protector-all option in uClibc. + + See http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt + for details. + +config BR2_UCLIBC_INSTALL_UTILS + bool "Compile and install uClibc utilities" + depends on !BR2_bfin + default y + help + Enabling this option will compile and install the getconf, + ldconfig and ldd uClibc utilities for the target. + + You can save ~32 KiB in target space by disabling them since + they're normally not needed. + +config BR2_UCLIBC_INSTALL_TEST_SUITE + bool "Compile and install uClibc tests" + select BR2_PACKAGE_MAKE + help + Enabling this option will compile and install the uClibc test suite. + This is useful if you want to check if the uClibc library is working + for your architecture and/or help developing uClibc. + + The test suite will be installed into /root/uClibc directory. To run + the test suite enter the /root/uClibc/test directory and type + "make UCLIBC_ONLY=1 CC=/bin/true check". + + See the /root/uClibc/test/README for additional information. + + This is not needed at all for normal builds, so you can safely say no + if you do not plan to dig into your C library. + +# Mapping from the Buildroot architecture configuration options to the +# uClibc architecture names. +config BR2_UCLIBC_TARGET_ARCH + string + default arc if BR2_arcle || BR2_arceb + default arm if BR2_arm || BR2_armeb + default avr32 if BR2_avr32 + default bfin if BR2_bfin + default m68k if BR2_m68k + default mips if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + default powerpc if BR2_powerpc + default sh if BR2_sh + default sparc if BR2_sparc + default xtensa if BR2_xtensa + default i386 if BR2_i386 + default x86_64 if BR2_x86_64 + +# This is only useful for uClibc <= 0.9.32. It can be removed once +# Buildroot will support only uClibc >= 0.9.33 on ARM. +config BR2_UCLIBC_ARM_TYPE + string + depends on BR2_UCLIBC_TARGET_ARCH = "arm" + default GENERIC_ARM if BR2_fa526 + default ARM7TDMI if BR2_arm7tdmi + default ARM720T if BR2_arm720t + default ARM920T if BR2_arm920t + default ARM922T if BR2_arm922t + default ARM926T if BR2_arm926t + default ARM10T if BR2_arm10t + default ARM1136JF_S if BR2_arm1136jf_s + default ARM1176JZ_S if BR2_arm1176jz_s + default ARM1176JZF_S if BR2_arm1176jzf_s + default ARM_SA1100 if BR2_strongarm + default ARM_XSCALE if BR2_xscale + default ARM_IWMMXT if BR2_iwmmxt + default ARM_CORTEXA8 if BR2_cortex_a8 + default ARM_CORTEXA9 if BR2_cortex_a9 + +config BR2_UCLIBC_ARM_BX + bool + depends on BR2_UCLIBC_TARGET_ARCH = "arm" + default y if (BR2_ARM_CPU_HAS_THUMB || BR2_ARM_CPU_HAS_THUMB2) + +config BR2_UCLIBC_MIPS_ABI + string + depends on BR2_UCLIBC_TARGET_ARCH = "mips" + default O32 if BR2_MIPS_OABI32 + default N32 if BR2_MIPS_NABI32 + default N64 if BR2_MIPS_NABI64 + +config BR2_UCLIBC_MIPS_ISA + string + depends on BR2_UCLIBC_TARGET_ARCH = "mips" + default 1 if BR2_mips_1 + default 2 if BR2_mips_2 + default 3 if BR2_mips_3 + default 4 if BR2_mips_4 + default MIPS32 if BR2_mips_32 + default MIPS32R2 if BR2_mips_32r2 + default MIPS64 if BR2_mips_64 + +config BR2_UCLIBC_SH_TYPE + string + depends on BR2_UCLIBC_TARGET_ARCH = "sh" + default SHA2 if BR2_sh2 + default SH3 if BR2_sh3 || BR2_sh3eb + default SH4 if BR2_sh4 || BR2_sh4eb + +config BR2_UCLIBC_SPARC_TYPE + string + depends on BR2_UCLIBC_TARGET_ARCH = "sparc" + default V7 if BR2_sparc_v7 || BR2_sparc_sparchfleon || BR2_sparc_sparcsfleon + default V8 if BR2_sparc_v8 || BR2_sparc_sparchfleonv8 || BR2_sparc_sparcsfleonv8 + +config BR2_UCLIBC_POWERPC_TYPE + string + depends on BR2_UCLIBC_TARGET_ARCH = "powerpc" + default CLASSIC if !BR2_powerpc_8540 && !BR2_powerpc_8548 + default E500 if BR2_powerpc_8540 || BR2_powerpc_8548 + +config BR2_UCLIBC_X86_TYPE + string + depends on BR2_UCLIBC_TARGET_ARCH = "i386" + default 386 if BR2_x86_i386 + default 486 if BR2_x86_i486 + default 586 if BR2_x86_i586 + default 586MMX if BR2_x86_pentium_mmx + default 686 if BR2_x86_i686 || BR2_x86_pentiumpro + default PENTIUMII if BR2_x86_pentium2 + default PENTIUMIII if BR2_x86_pentium3 + default PENTIUM4 if BR2_x86_pentium4 || BR2_x86_pentium_m || \ + BR2_x86_nocona || BR2_x86_core2 + +endif # BR2_TOOLCHAIN_BUILDROOT_UCLIBC diff --git a/toolchain/uClibc/uClibc-0.9.31.config b/package/uclibc/uClibc-0.9.31.config similarity index 96% rename from toolchain/uClibc/uClibc-0.9.31.config rename to package/uclibc/uClibc-0.9.31.config index 60b4628061..e990178df5 100644 --- a/toolchain/uClibc/uClibc-0.9.31.config +++ b/package/uclibc/uClibc-0.9.31.config @@ -89,8 +89,8 @@ UCLIBC_SUSV3_LEGACY=y UCLIBC_SUSV4_LEGACY=y # UCLIBC_HAS_STUBS is not set UCLIBC_HAS_SHADOW=y -# UCLIBC_HAS_PROGRAM_INVOCATION_NAME is not set -# UCLIBC_HAS___PROGNAME is not set +UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y +UCLIBC_HAS___PROGNAME=y UCLIBC_HAS_PTY=y ASSUME_DEVPTS=y UNIX98PTY_ONLY=y @@ -135,7 +135,7 @@ UCLIBC_HAS_IPV4=y # UCLIBC_HAS_FULL_RPC is not set # UCLIBC_HAS_REENTRANT_RPC is not set UCLIBC_USE_NETLINK=y -# UCLIBC_SUPPORT_AI_ADDRCONFIG is not set +UCLIBC_SUPPORT_AI_ADDRCONFIG=y # UCLIBC_HAS_BSD_RES_CLOSE is not set UCLIBC_HAS_COMPAT_RES_STATE=y # UCLIBC_HAS_EXTRA_COMPAT_RES_STATE is not set @@ -150,8 +150,8 @@ UCLIBC_HAS_STRING_ARCH_OPT=y UCLIBC_HAS_CTYPE_TABLES=y UCLIBC_HAS_CTYPE_SIGNED=y # UCLIBC_HAS_CTYPE_UNSAFE is not set -# UCLIBC_HAS_CTYPE_CHECKED is not set -UCLIBC_HAS_CTYPE_ENFORCED=y +UCLIBC_HAS_CTYPE_CHECKED=y +# UCLIBC_HAS_CTYPE_ENFORCED is not set # UCLIBC_HAS_WCHAR is not set # UCLIBC_HAS_LOCALE is not set UCLIBC_HAS_HEXADECIMAL_FLOATS=y @@ -238,7 +238,7 @@ WARNINGS="-Wall" # DOMULTI is not set # UCLIBC_MJN3_ONLY is not set -# USE_BX is not set +USE_BX=y # CONFIG_GENERIC_ARM is not set # CONFIG_ARM610 is not set # CONFIG_ARM710 is not set diff --git a/toolchain/uClibc/uClibc-0.9.32.config b/package/uclibc/uClibc-0.9.32.config similarity index 95% rename from toolchain/uClibc/uClibc-0.9.32.config rename to package/uclibc/uClibc-0.9.32.config index 9c83d68140..68efac9079 100644 --- a/toolchain/uClibc/uClibc-0.9.32.config +++ b/package/uclibc/uClibc-0.9.32.config @@ -28,6 +28,7 @@ # TARGET_vax is not set # TARGET_x86_64 is not set # TARGET_xtensa is not set +# TARGET_c6x is not set # CONFIG_GENERIC_ARM is not set # CONFIG_ARM610 is not set @@ -109,10 +110,11 @@ UCLIBC_DYNAMIC_ATEXIT=y UCLIBC_SUSV3_LEGACY=y # UCLIBC_SUSV3_LEGACY_MACROS is not set UCLIBC_SUSV4_LEGACY=y +# UCLIBC_STRICT_HEADERS is not set # UCLIBC_HAS_STUBS is not set UCLIBC_HAS_SHADOW=y -# UCLIBC_HAS_PROGRAM_INVOCATION_NAME is not set -# UCLIBC_HAS___PROGNAME is not set +UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y +UCLIBC_HAS___PROGNAME=y UCLIBC_HAS_PTY=y ASSUME_DEVPTS=y UNIX98PTY_ONLY=y @@ -158,7 +160,7 @@ UCLIBC_HAS_IPV4=y # UCLIBC_HAS_FULL_RPC is not set # UCLIBC_HAS_REENTRANT_RPC is not set UCLIBC_USE_NETLINK=y -# UCLIBC_SUPPORT_AI_ADDRCONFIG is not set +UCLIBC_SUPPORT_AI_ADDRCONFIG=y # UCLIBC_HAS_BSD_RES_CLOSE is not set UCLIBC_HAS_COMPAT_RES_STATE=y # UCLIBC_HAS_EXTRA_COMPAT_RES_STATE is not set @@ -173,8 +175,8 @@ UCLIBC_HAS_STRING_ARCH_OPT=y UCLIBC_HAS_CTYPE_TABLES=y UCLIBC_HAS_CTYPE_SIGNED=y # UCLIBC_HAS_CTYPE_UNSAFE is not set -# UCLIBC_HAS_CTYPE_CHECKED is not set -UCLIBC_HAS_CTYPE_ENFORCED=y +UCLIBC_HAS_CTYPE_CHECKED=y +# UCLIBC_HAS_CTYPE_ENFORCED is not set # UCLIBC_HAS_WCHAR is not set # UCLIBC_HAS_LOCALE is not set UCLIBC_HAS_HEXADECIMAL_FLOATS=y @@ -218,9 +220,10 @@ UCLIBC_HAS_FNMATCH=y # UCLIBC_HAS_WORDEXP is not set UCLIBC_HAS_NFTW=y UCLIBC_HAS_FTW=y +UCLIBC_HAS_FTS=y UCLIBC_HAS_GLOB=y UCLIBC_HAS_GNU_GLOB=y -# UCLIBC_HAS_UTMPX is not set +UCLIBC_HAS_UTMPX=y # # Library Installation Options @@ -258,6 +261,7 @@ DOSTRIP=y # SUPPORT_LD_DEBUG is not set # SUPPORT_LD_DEBUG_EARLY is not set # UCLIBC_MALLOC_DEBUGGING is not set +# UCLIBC_HAS_BACKTRACE is not set WARNINGS="-Wall" # EXTRA_WARNINGS is not set # DOMULTI is not set diff --git a/package/uclibc/uClibc-0.9.33.config b/package/uclibc/uClibc-0.9.33.config new file mode 100644 index 0000000000..eb39df6eda --- /dev/null +++ b/package/uclibc/uClibc-0.9.33.config @@ -0,0 +1,278 @@ +# +# Automatically generated make config: don't edit +# Version: 0.9.32-git +# Fri Jul 9 22:31:59 2010 +# +# TARGET_alpha is not set +# TARGET_arm is not set +# TARGET_avr32 is not set +# TARGET_bfin is not set +# TARGET_cris is not set +# TARGET_e1 is not set +# TARGET_frv is not set +# TARGET_h8300 is not set +# TARGET_hppa is not set +# TARGET_i386 is not set +# TARGET_i960 is not set +# TARGET_ia64 is not set +# TARGET_m68k is not set +# TARGET_microblaze is not set +# TARGET_mips is not set +# TARGET_nios is not set +# TARGET_nios2 is not set +# TARGET_powerpc is not set +# TARGET_sh is not set +# TARGET_sh64 is not set +# TARGET_sparc is not set +# TARGET_v850 is not set +# TARGET_vax is not set +# TARGET_x86_64 is not set +# TARGET_xtensa is not set +# TARGET_c6x is not set + +# CONFIG_GENERIC_ARM is not set +# CONFIG_ARM610 is not set +# CONFIG_ARM710 is not set +# CONFIG_ARM7TDMI is not set +# CONFIG_ARM720T is not set +# CONFIG_ARM920T is not set +# CONFIG_ARM922T is not set +# CONFIG_ARM926T is not set +# CONFIG_ARM10T is not set +# CONFIG_ARM1136JF_S is not set +# CONFIG_ARM1176JZ_S is not set +# CONFIG_ARM1176JZF_S is not set +# CONFIG_ARM_CORTEX_M3 is not set +# CONFIG_ARM_CORTEX_M1 is not set +# CONFIG_ARM_SA110 is not set +# CONFIG_ARM_SA1100 is not set +# CONFIG_ARM_XSCALE is not set +# CONFIG_ARM_IWMMXT is not set + +# COMPILE_IN_THUMB_MODE is not set +USE_BX=y + +TARGET_SUBARCH="" +# +# Target Architecture Features and Options +# +TARGET_ARCH="none" +FORCE_OPTIONS_FOR_ARCH=y +# +# Using ELF file format +# +# ARCH_LITTLE_ENDIAN is not set +# ARCH_BIG_ENDIAN is not set +# ARCH_WANTS_LITTLE_ENDIAN is not set +# ARCH_WANTS_BIG_ENDIAN is not set +ARCH_HAS_MMU=y +ARCH_USE_MMU=y +UCLIBC_HAS_FLOATS=y +UCLIBC_HAS_FPU=y +DO_C99_MATH=y +# DO_XSI_MATH is not set +# UCLIBC_HAS_FENV is not set +UCLIBC_HAS_LONG_DOUBLE_MATH=y +KERNEL_HEADERS="/usr/src/linux/include" +HAVE_DOT_CONFIG=y + +# +# General Library Settings +# +# HAVE_NO_PIC is not set +DOPIC=y +# ARCH_HAS_NO_SHARED is not set +# ARCH_HAS_NO_LDSO is not set +HAVE_SHARED=y +# FORCE_SHAREABLE_TEXT_SEGMENTS is not set +LDSO_LDD_SUPPORT=y +# LDSO_CACHE_SUPPORT is not set +LDSO_PRELOAD_ENV_SUPPORT=y +# LDSO_PRELOAD_FILE_SUPPORT is not set +# LDSO_STANDALONE_SUPPORT is not set +# LDSO_PRELINK_SUPPORT is not set +# UCLIBC_STATIC_LDCONFIG is not set +LDSO_RUNPATH=y +LDSO_SEARCH_INTERP_PATH=y +LDSO_LD_LIBRARY_PATH=y +# LDSO_NO_CLEANUP is not set +UCLIBC_CTOR_DTOR=y +# LDSO_GNU_HASH_SUPPORT is not set +# HAS_NO_THREADS is not set +LINUXTHREADS_OLD=y +# LINUXTHREADS_NEW is not set +# UCLIBC_HAS_THREADS_NATIVE is not set +UCLIBC_HAS_THREADS=y +# PTHREADS_DEBUG_SUPPORT is not set +UCLIBC_HAS_SYSLOG=y +UCLIBC_HAS_LFS=y +# MALLOC is not set +# MALLOC_SIMPLE is not set +MALLOC_STANDARD=y +MALLOC_GLIBC_COMPAT=y +UCLIBC_DYNAMIC_ATEXIT=y +# COMPAT_ATEXIT is not set +UCLIBC_SUSV3_LEGACY=y +# UCLIBC_SUSV3_LEGACY_MACROS is not set +UCLIBC_SUSV4_LEGACY=y +# UCLIBC_STRICT_HEADERS is not set +# UCLIBC_HAS_STUBS is not set +UCLIBC_HAS_SHADOW=y +UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y +UCLIBC_HAS___PROGNAME=y +UCLIBC_HAS_PTY=y +ASSUME_DEVPTS=y +UNIX98PTY_ONLY=y +UCLIBC_HAS_GETPT=y +UCLIBC_HAS_LIBUTIL=y +UCLIBC_HAS_TM_EXTENSIONS=y +UCLIBC_HAS_TZ_CACHING=y +UCLIBC_HAS_TZ_FILE=y +UCLIBC_HAS_TZ_FILE_READ_MANY=y +UCLIBC_TZ_FILE_PATH="/etc/TZ" +UCLIBC_FALLBACK_TO_ETC_LOCALTIME=y + +# +# Advanced Library Settings +# +UCLIBC_PWD_BUFFER_SIZE=256 +UCLIBC_GRP_BUFFER_SIZE=256 + +# +# Support various families of functions +# +UCLIBC_LINUX_MODULE_26=y +# UCLIBC_LINUX_MODULE_24 is not set +UCLIBC_LINUX_SPECIFIC=y +UCLIBC_HAS_GNU_ERROR=y +UCLIBC_BSD_SPECIFIC=y +UCLIBC_HAS_BSD_ERR=y +# UCLIBC_HAS_OBSOLETE_BSD_SIGNAL is not set +# UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL is not set +# UCLIBC_NTP_LEGACY is not set +# UCLIBC_SV4_DEPRECATED is not set +UCLIBC_HAS_REALTIME=y +UCLIBC_HAS_ADVANCED_REALTIME=y +UCLIBC_HAS_EPOLL=y +UCLIBC_HAS_XATTR=y +UCLIBC_HAS_PROFILING=y +UCLIBC_HAS_CRYPT_IMPL=y +# UCLIBC_HAS_SHA256_CRYPT_IMPL is not set +# UCLIBC_HAS_SHA512_CRYPT_IMPL is not set +UCLIBC_HAS_CRYPT=y +UCLIBC_HAS_NETWORK_SUPPORT=y +UCLIBC_HAS_SOCKET=y +UCLIBC_HAS_IPV4=y +# UCLIBC_HAS_IPV6 is not set +# UCLIBC_HAS_RPC is not set +# UCLIBC_HAS_FULL_RPC is not set +# UCLIBC_HAS_REENTRANT_RPC is not set +UCLIBC_USE_NETLINK=y +UCLIBC_SUPPORT_AI_ADDRCONFIG=y +# UCLIBC_HAS_BSD_RES_CLOSE is not set +UCLIBC_HAS_COMPAT_RES_STATE=y +# UCLIBC_HAS_EXTRA_COMPAT_RES_STATE is not set +UCLIBC_HAS_RESOLVER_SUPPORT=y +UCLIBC_HAS_LIBRESOLV_STUB=y +UCLIBC_HAS_LIBNSL_STUB=y + +# +# String and Stdio Support +# +# UCLIBC_HAS_STRING_GENERIC_OPT is not set +UCLIBC_HAS_STRING_ARCH_OPT=y +UCLIBC_HAS_CTYPE_TABLES=y +UCLIBC_HAS_CTYPE_SIGNED=y +# UCLIBC_HAS_CTYPE_UNSAFE is not set +UCLIBC_HAS_CTYPE_CHECKED=y +# UCLIBC_HAS_CTYPE_ENFORCED is not set +# UCLIBC_HAS_WCHAR is not set +# UCLIBC_HAS_LOCALE is not set +UCLIBC_HAS_HEXADECIMAL_FLOATS=y +# UCLIBC_HAS_GLIBC_DIGIT_GROUPING is not set +UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y +# USE_OLD_VFPRINTF is not set +UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9 +UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y +# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set +# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set +UCLIBC_HAS_STDIO_BUFSIZ_4096=y +# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set +UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set +# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set +# UCLIBC_HAS_STDIO_GETC_MACRO is not set +# UCLIBC_HAS_STDIO_PUTC_MACRO is not set +UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y +# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set +UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y +# UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE is not set +UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y +UCLIBC_HAS_PRINTF_M_SPEC=y +UCLIBC_HAS_ERRNO_MESSAGES=y +# UCLIBC_HAS_SYS_ERRLIST is not set +UCLIBC_HAS_SIGNUM_MESSAGES=y +# UCLIBC_HAS_SYS_SIGLIST is not set +UCLIBC_HAS_GNU_GETOPT=y +# UCLIBC_HAS_GNU_GETSUBOPT is not set + +# +# Big and Tall +# +UCLIBC_HAS_REGEX=y +# UCLIBC_HAS_REGEX_OLD is not set +UCLIBC_HAS_FNMATCH=y +# UCLIBC_HAS_FNMATCH_OLD is not set +# UCLIBC_HAS_WORDEXP is not set +UCLIBC_HAS_NFTW=y +UCLIBC_HAS_FTW=y +# UCLIBC_HAS_FTS is not set +UCLIBC_HAS_GLOB=y +UCLIBC_HAS_GNU_GLOB=y +UCLIBC_HAS_UTMPX=y + +# +# Library Installation Options +# +RUNTIME_PREFIX="/" +DEVEL_PREFIX="/usr/" +MULTILIB_DIR="lib" +HARDWIRED_ABSPATH=y + +# +# Security options +# +# UCLIBC_BUILD_PIE is not set +# UCLIBC_HAS_ARC4RANDOM is not set +# HAVE_NO_SSP is not set +UCLIBC_HAS_SSP=y +# UCLIBC_HAS_SSP_COMPAT is not set +# SSP_QUICK_CANARY is not set +PROPOLICE_BLOCK_ABRT=y +# PROPOLICE_BLOCK_SEGV is not set +# UCLIBC_BUILD_SSP is not set +UCLIBC_BUILD_RELRO=y +UCLIBC_BUILD_NOW=y +UCLIBC_BUILD_NOEXECSTACK=y + +# +# uClibc development/debugging options +# +CROSS_COMPILER_PREFIX="" +UCLIBC_EXTRA_CFLAGS="" +# DODEBUG is not set +# DODEBUG_PT is not set +DOSTRIP=y +# DOASSERTS is not set +# SUPPORT_LD_DEBUG is not set +# SUPPORT_LD_DEBUG_EARLY is not set +# UCLIBC_MALLOC_DEBUGGING is not set +# UCLIBC_HAS_BACKTRACE is not set +WARNINGS="-Wall" +# EXTRA_WARNINGS is not set +# DOMULTI is not set +# UCLIBC_MJN3_ONLY is not set diff --git a/toolchain/uClibc/uClibc-snapshot.config b/package/uclibc/uClibc-snapshot.config similarity index 88% rename from toolchain/uClibc/uClibc-snapshot.config rename to package/uclibc/uClibc-snapshot.config index 9c83d68140..9ca3f9ea98 100644 --- a/toolchain/uClibc/uClibc-snapshot.config +++ b/package/uclibc/uClibc-snapshot.config @@ -4,6 +4,7 @@ # Fri Jul 9 22:31:59 2010 # # TARGET_alpha is not set +# TARGET_arc is not set # TARGET_arm is not set # TARGET_avr32 is not set # TARGET_bfin is not set @@ -16,6 +17,7 @@ # TARGET_i960 is not set # TARGET_ia64 is not set # TARGET_m68k is not set +# TARGET_metag is not set # TARGET_microblaze is not set # TARGET_mips is not set # TARGET_nios is not set @@ -28,6 +30,7 @@ # TARGET_vax is not set # TARGET_x86_64 is not set # TARGET_xtensa is not set +# TARGET_c6x is not set # CONFIG_GENERIC_ARM is not set # CONFIG_ARM610 is not set @@ -48,6 +51,7 @@ # CONFIG_ARM_XSCALE is not set # CONFIG_ARM_IWMMXT is not set +# COMPILE_IN_THUMB_MODE is not set USE_BX=y TARGET_SUBARCH="" @@ -87,9 +91,14 @@ LDSO_LDD_SUPPORT=y # LDSO_CACHE_SUPPORT is not set LDSO_PRELOAD_ENV_SUPPORT=y # LDSO_PRELOAD_FILE_SUPPORT is not set +# LDSO_STANDALONE_SUPPORT is not set +# LDSO_PRELINK_SUPPORT is not set # UCLIBC_STATIC_LDCONFIG is not set LDSO_RUNPATH=y +LDSO_SAFE_RUNPATH=y LDSO_SEARCH_INTERP_PATH=y +LDSO_LD_LIBRARY_PATH=y +# LDSO_NO_CLEANUP is not set UCLIBC_CTOR_DTOR=y # LDSO_GNU_HASH_SUPPORT is not set # HAS_NO_THREADS is not set @@ -104,15 +113,18 @@ UCLIBC_HAS_LFS=y # MALLOC_SIMPLE is not set MALLOC_STANDARD=y MALLOC_GLIBC_COMPAT=y +UCLIBC_HAS_OBSTACK=y UCLIBC_DYNAMIC_ATEXIT=y # COMPAT_ATEXIT is not set +UCLIBC_SUSV2_LEGACY=y UCLIBC_SUSV3_LEGACY=y # UCLIBC_SUSV3_LEGACY_MACROS is not set UCLIBC_SUSV4_LEGACY=y +# UCLIBC_STRICT_HEADERS is not set # UCLIBC_HAS_STUBS is not set UCLIBC_HAS_SHADOW=y -# UCLIBC_HAS_PROGRAM_INVOCATION_NAME is not set -# UCLIBC_HAS___PROGNAME is not set +UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y +UCLIBC_HAS___PROGNAME=y UCLIBC_HAS_PTY=y ASSUME_DEVPTS=y UNIX98PTY_ONLY=y @@ -134,7 +146,8 @@ UCLIBC_GRP_BUFFER_SIZE=256 # # Support various families of functions # -UCLIBC_LINUX_MODULE_24=y +UCLIBC_LINUX_MODULE_26=y +# UCLIBC_LINUX_MODULE_24 is not set UCLIBC_LINUX_SPECIFIC=y UCLIBC_HAS_GNU_ERROR=y UCLIBC_BSD_SPECIFIC=y @@ -149,6 +162,8 @@ UCLIBC_HAS_EPOLL=y UCLIBC_HAS_XATTR=y UCLIBC_HAS_PROFILING=y UCLIBC_HAS_CRYPT_IMPL=y +# UCLIBC_HAS_SHA256_CRYPT_IMPL is not set +# UCLIBC_HAS_SHA512_CRYPT_IMPL is not set UCLIBC_HAS_CRYPT=y UCLIBC_HAS_NETWORK_SUPPORT=y UCLIBC_HAS_SOCKET=y @@ -158,10 +173,11 @@ UCLIBC_HAS_IPV4=y # UCLIBC_HAS_FULL_RPC is not set # UCLIBC_HAS_REENTRANT_RPC is not set UCLIBC_USE_NETLINK=y -# UCLIBC_SUPPORT_AI_ADDRCONFIG is not set +UCLIBC_SUPPORT_AI_ADDRCONFIG=y # UCLIBC_HAS_BSD_RES_CLOSE is not set UCLIBC_HAS_COMPAT_RES_STATE=y # UCLIBC_HAS_EXTRA_COMPAT_RES_STATE is not set +UCLIBC_HAS_RESOLVER_SUPPORT=y UCLIBC_HAS_LIBRESOLV_STUB=y UCLIBC_HAS_LIBNSL_STUB=y @@ -173,8 +189,8 @@ UCLIBC_HAS_STRING_ARCH_OPT=y UCLIBC_HAS_CTYPE_TABLES=y UCLIBC_HAS_CTYPE_SIGNED=y # UCLIBC_HAS_CTYPE_UNSAFE is not set -# UCLIBC_HAS_CTYPE_CHECKED is not set -UCLIBC_HAS_CTYPE_ENFORCED=y +UCLIBC_HAS_CTYPE_CHECKED=y +# UCLIBC_HAS_CTYPE_ENFORCED is not set # UCLIBC_HAS_WCHAR is not set # UCLIBC_HAS_LOCALE is not set UCLIBC_HAS_HEXADECIMAL_FLOATS=y @@ -199,6 +215,7 @@ UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y # UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y +# UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE is not set UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y UCLIBC_HAS_PRINTF_M_SPEC=y UCLIBC_HAS_ERRNO_MESSAGES=y @@ -218,9 +235,10 @@ UCLIBC_HAS_FNMATCH=y # UCLIBC_HAS_WORDEXP is not set UCLIBC_HAS_NFTW=y UCLIBC_HAS_FTW=y +# UCLIBC_HAS_FTS is not set UCLIBC_HAS_GLOB=y UCLIBC_HAS_GNU_GLOB=y -# UCLIBC_HAS_UTMPX is not set +UCLIBC_HAS_UTMPX=y # # Library Installation Options @@ -258,6 +276,7 @@ DOSTRIP=y # SUPPORT_LD_DEBUG is not set # SUPPORT_LD_DEBUG_EARLY is not set # UCLIBC_MALLOC_DEBUGGING is not set +# UCLIBC_HAS_BACKTRACE is not set WARNINGS="-Wall" # EXTRA_WARNINGS is not set # DOMULTI is not set diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk new file mode 100644 index 0000000000..20d3bb6685 --- /dev/null +++ b/package/uclibc/uclibc.mk @@ -0,0 +1,558 @@ +################################################################################ +# +# uclibc +# +################################################################################ + +UCLIBC_VERSION = $(call qstrip,$(BR2_UCLIBC_VERSION_STRING)) +UCLIBC_SOURCE = uClibc-$(UCLIBC_VERSION).tar.bz2 + +ifeq ($(BR2_UCLIBC_VERSION_SNAPSHOT),y) +UCLIBC_SITE = http://www.uclibc.org/downloads/snapshots +else ifeq ($(findstring arc,$(UCLIBC_VERSION)),arc) +UCLIBC_SITE = $(BR2_ARC_SITE) +else +UCLIBC_SITE = http://www.uclibc.org/downloads +UCLIBC_SOURCE = uClibc-$(UCLIBC_VERSION).tar.xz +endif + +UCLIBC_INSTALL_STAGING = YES + +# Before uClibc is configured, we must have the first stage +# cross-compiler and the kernel headers +UCLIBC_DEPENDENCIES = host-gcc-initial linux-headers + +# Before uClibc is built, we must have the second stage cross-compiler +uclibc-build: host-gcc-intermediate + +# specifying UCLIBC_CONFIG_FILE on the command-line overrides the .config +# setting. +ifndef UCLIBC_CONFIG_FILE +UCLIBC_CONFIG_FILE = $(call qstrip,$(BR2_UCLIBC_CONFIG)) +endif + +UCLIBC_TARGET_ARCH = $(call qstrip,$(BR2_UCLIBC_TARGET_ARCH)) + +ifeq ($(GENERATE_LOCALE),) +# We need at least one locale +UCLIBC_LOCALES = en_US +else +# Strip out the encoding part of locale names, if any +UCLIBC_LOCALES = $(foreach locale,$(GENERATE_LOCALE),\ + $(firstword $(subst .,$(space),$(locale)))) +endif + +# +# Utility functions to manipulation the uClibc configuration file +# + +define UCLIBC_OPT_SET + $(SED) '/$(1)/d' $(3)/.config + echo '$(1)=$(2)' >> $(3)/.config +endef + +define UCLIBC_OPT_UNSET + $(SED) '/$(1)/d' $(2)/.config + echo '# $(1) is not set' >> $(2)/.config +endef + +# +# ARM definitions +# + +ifeq ($(UCLIBC_TARGET_ARCH),arm) +UCLIBC_ARM_TYPE = CONFIG_$(call qstrip,$(BR2_UCLIBC_ARM_TYPE)) + +define UCLIBC_ARM_TYPE_CONFIG + $(SED) 's/^\(CONFIG_[^_]*[_]*ARM[^=]*\)=.*/# \1 is not set/g' \ + $(@D)/.config + $(call UCLIBC_OPT_SET,$(UCLIBC_ARM_TYPE),y,$(@D)) +endef + +define UCLIBC_ARM_ABI_CONFIG + $(SED) '/CONFIG_ARM_.ABI/d' $(@D)/.config + $(call UCLIBC_OPT_SET,CONFIG_ARM_EABI,y,$(@D)) +endef + +# Thumb build is broken with threads, build in ARM mode +ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB)$(BR2_TOOLCHAIN_HAS_THREADS),yy) +UCLIBC_EXTRA_CFLAGS += -marm +endif + +ifeq ($(BR2_UCLIBC_ARM_BX),y) +define UCLIBC_ARM_BX_CONFIG + $(call UCLIBC_OPT_SET,USE_BX,y,$(@D)) +endef +else +define UCLIBC_ARM_BX_CONFIG + $(call UCLIBC_OPT_UNSET,USE_BX,$(@D)) +endef +endif + +endif # arm + +# +# MIPS definitions +# + +ifeq ($(UCLIBC_TARGET_ARCH),mips) +UCLIBC_MIPS_ABI = CONFIG_MIPS_$(call qstrip,$(BR2_UCLIBC_MIPS_ABI))_ABI +define UCLIBC_MIPS_ABI_CONFIG + $(SED) '/CONFIG_MIPS_[NO].._ABI/d' $(@D)/.config + $(call UCLIBC_OPT_SET,$(UCLIBC_MIPS_ABI),y,$(@D)) +endef + +UCLIBC_MIPS_ISA = CONFIG_MIPS_ISA_$(call qstrip,$(BR2_UCLIBC_MIPS_ISA)) +define UCLIBC_MIPS_ISA_CONFIG + $(SED) '/CONFIG_MIPS_ISA_.*/d' $(@D)/.config + $(call UCLIBC_OPT_SET,$(UCLIBC_MIPS_ISA),y,$(@D)) +endef +endif # mips + +# +# SH definitions +# + +ifeq ($(UCLIBC_TARGET_ARCH),sh) +UCLIBC_SH_TYPE = CONFIG_$(call qstrip,$(BR2_UCLIBC_SH_TYPE)) +define UCLIBC_SH_TYPE_CONFIG + $(SED) '/CONFIG_SH[234A]*/d' $(@D)/.config + $(call UCLIBC_OPT_SET,$(UCLIBC_SH_TYPE),y,$(@D)) +endef +endif # sh + +# +# SPARC definitions +# + +ifeq ($(UCLIBC_TARGET_ARCH),sparc) +UCLIBC_SPARC_TYPE = CONFIG_SPARC_$(call qstrip,$(BR2_UCLIBC_SPARC_TYPE)) +define UCLIBC_SPARC_TYPE_CONFIG + $(SED) 's/^\(CONFIG_[^_]*[_]*SPARC[^=]*\)=.*/# \1 is not set/g' \ + $(@D)/.config + $(call UCLIBC_OPT_SET,$(UCLIBC_SPARC_TYPE),y,$(@D)) +endef +endif # sparc + +# +# PowerPC definitions +# + +ifeq ($(UCLIBC_TARGET_ARCH),powerpc) +UCLIBC_POWERPC_TYPE = CONFIG_$(call qstrip,$(BR2_UCLIBC_POWERPC_TYPE)) +define UCLIBC_POWERPC_TYPE_CONFIG + $(call UCLIBC_OPT_UNSET,CONFIG_GENERIC,$(@D)) + $(call UCLIBC_OPT_UNSET,CONFIG_E500,$(@D)) + $(call UCLIBC_OPT_SET,$(UCLIBC_POWERPC_TYPE),y,$(@D)) +endef +endif # powerpc + +# +# Blackfin definitions +# + +ifeq ($(UCLIBC_TARGET_ARCH),bfin) +ifeq ($(BR2_BINFMT_FDPIC),y) +define UCLIBC_BFIN_CONFIG + $(call UCLIBC_OPT_UNSET,UCLIBC_FORMAT_FLAT,$(@D)) + $(call UCLIBC_OPT_UNSET,UCLIBC_FORMAT_FLAT_SEP_DATA,$(@D)) + $(call UCLIBC_OPT_UNSET,UCLIBC_FORMAT_SHARED_FLAT,$(@D)) + $(call UCLIBC_OPT_SET,UCLIBC_FORMAT_FDPIC_ELF,y,$(@D)) +endef +endif +ifeq ($(BR2_BINFMT_FLAT_ONE),y) +define UCLIBC_BFIN_CONFIG + $(call UCLIBC_OPT_SET,UCLIBC_FORMAT_FLAT,y,$(@D)) + $(call UCLIBC_OPT_UNSET,UCLIBC_FORMAT_FLAT_SEP_DATA,$(@D)) + $(call UCLIBC_OPT_UNSET,UCLIBC_FORMAT_SHARED_FLAT,$(@D)) + $(call UCLIBC_OPT_UNSET,UCLIBC_FORMAT_FDPIC_ELF,$(@D)) +endef +endif +ifeq ($(BR2_BINFMT_FLAT_SEP_DATA),y) +define UCLIBC_BFIN_CONFIG + $(call UCLIBC_OPT_UNSET,UCLIBC_FORMAT_FLAT,$(@D)) + $(call UCLIBC_OPT_SET,UCLIBC_FORMAT_FLAT_SEP_DATA,y,$(@D)) + $(call UCLIBC_OPT_UNSET,UCLIBC_FORMAT_SHARED_FLAT,$(@D)) + $(call UCLIBC_OPT_UNSET,UCLIBC_FORMAT_FDPIC_ELF,$(@D)) +endef +endif +ifeq ($(BR2_BINFMT_FLAT_SHARED),y) +define UCLIBC_BFIN_CONFIG + $(call UCLIBC_OPT_UNSET,UCLIBC_FORMAT_FLAT,$(@D)) + $(call UCLIBC_OPT_UNSET,UCLIBC_FORMAT_FLAT_SEP_DATA,$(@D)) + $(call UCLIBC_OPT_SET,UCLIBC_FORMAT_SHARED_FLAT,y,$(@D)) + $(call UCLIBC_OPT_UNSET,UCLIBC_FORMAT_FDPIC_ELF,$(@D)) +endef +endif +endif # bfin + +# +# AVR32 definitions +# + +ifeq ($(UCLIBC_TARGET_ARCH),avr32) +define UCLIBC_AVR32_CONFIG + $(call UCLIBC_OPT_SET,LINKRELAX,y,$(@D)) +endef +endif # avr32 + +# +# x86 definitions +# +ifeq ($(UCLIBC_TARGET_ARCH),i386) +UCLIBC_X86_TYPE = CONFIG_$(call qstrip,$(BR2_UCLIBC_X86_TYPE)) +define UCLIBC_X86_TYPE_CONFIG + $(call UCLIBC_OPT_SET,$(UCLIBC_X86_TYPE),y,$(@D)) +endef +endif + +# +# Endianess +# + +ifeq ($(call qstrip,$(BR2_ENDIAN)),BIG) +define UCLIBC_ENDIAN_CONFIG + $(call UCLIBC_OPT_SET,ARCH_BIG_ENDIAN,y,$(@D)) + $(call UCLIBC_OPT_SET,ARCH_WANTS_BIG_ENDIAN,y,$(@D)) + $(call UCLIBC_OPT_UNSET,ARCH_LITTLE_ENDIAN,$(@D)) + $(call UCLIBC_OPT_UNSET,ARCH_WANTS_LITTLE_ENDIAN,$(@D)) +endef +else +define UCLIBC_ENDIAN_CONFIG + $(call UCLIBC_OPT_SET,ARCH_LITTLE_ENDIAN,y,$(@D)) + $(call UCLIBC_OPT_SET,ARCH_WANTS_LITTLE_ENDIAN,y,$(@D)) + $(call UCLIBC_OPT_UNSET,ARCH_BIG_ENDIAN,$(@D)) + $(call UCLIBC_OPT_UNSET,ARCH_WANTS_BIG_ENDIAN,$(@D)) +endef +endif + +# +# Largefile +# + +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_LARGEFILE),y) +define UCLIBC_LARGEFILE_CONFIG + $(call UCLIBC_OPT_SET,UCLIBC_HAS_LFS,y,$(@D)) +endef +else +define UCLIBC_LARGEFILE_CONFIG + $(call UCLIBC_OPT_UNSET,UCLIBC_HAS_LFS,$(@D)) + $(call UCLIBC_OPT_UNSET,UCLIBC_HAS_FOPEN_LARGEFILE_MODE,$(@D)) +endef +endif + +# +# MMU +# + +ifeq ($(BR2_USE_MMU),y) +define UCLIBC_MMU_CONFIG + $(call UCLIBC_OPT_SET,ARCH_USE_MMU,y,$(@D)) +endef +else +define UCLIBC_MMU_CONFIG + $(call UCLIBC_OPT_UNSET,ARCH_USE_MMU,$(@D)) +endef +endif + +# +# IPv6 +# + +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_INET_IPV6),y) +UCLIBC_IPV6_CONFIG = $(call UCLIBC_OPT_SET,UCLIBC_HAS_IPV6,y,$(@D)) +else +UCLIBC_IPV6_CONFIG = $(call UCLIBC_OPT_UNSET,UCLIBC_HAS_IPV6,$(@D)) +endif + +# +# RPC +# + +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_INET_RPC),y) +define UCLIBC_RPC_CONFIG + $(call UCLIBC_OPT_SET,UCLIBC_HAS_RPC,y,$(@D)) + $(call UCLIBC_OPT_SET,UCLIBC_HAS_FULL_RPC,y,$(@D)) + $(call UCLIBC_OPT_SET,UCLIBC_HAS_REENTRANT_RPC,y,$(@D)) +endef +else +define UCLIBC_RPC_CONFIG + $(call UCLIBC_OPT_UNSET,UCLIBC_HAS_RPC,$(@D)) + $(call UCLIBC_OPT_UNSET,UCLIBC_HAS_FULL_RPC,$(@D)) + $(call UCLIBC_OPT_UNSET,UCLIBC_HAS_REENTRANT_RPC,$(@D)) +endef +endif + +# +# soft-float +# + +ifeq ($(BR2_SOFT_FLOAT),y) +define UCLIBC_FLOAT_CONFIG + $(call UCLIBC_OPT_UNSET,UCLIBC_HAS_FPU,$(@D)) + $(call UCLIBC_OPT_SET,UCLIBC_HAS_FLOATS,y,$(@D)) + $(call UCLIBC_OPT_SET,DO_C99_MATH,y,$(@D)) +endef +else +define UCLIBC_FLOAT_CONFIG + $(call UCLIBC_OPT_SET,UCLIBC_HAS_FPU,y,$(@D)) + $(call UCLIBC_OPT_SET,UCLIBC_HAS_FLOATS,y,$(@D)) +endef +endif + +# +# SSP +# +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_USE_SSP),y) +define UCLIBC_SSP_CONFIG + $(call UCLIBC_OPT_SET,UCLIBC_HAS_SSP,y,$(@D)) + $(call UCLIBC_OPT_SET,UCLIBC_BUILD_SSP,y,$(@D)) +endef +else +define UCLIBC_SSP_CONFIG + $(call UCLIBC_OPT_UNSET,UCLIBC_HAS_SSP,$(@D)) + $(call UCLIBC_OPT_UNSET,UCLIBC_BUILD_SSP,$(@D)) +endef +endif + +# +# Threads +# +ifeq ($(BR2_PTHREADS_NONE),y) +define UCLIBC_THREAD_CONFIG + $(call UCLIBC_OPT_UNSET,UCLIBC_HAS_THREADS,$(@D)) + $(call UCLIBC_OPT_UNSET,LINUXTHREADS,$(@D)) + $(call UCLIBC_OPT_UNSET,LINUXTHREADS_OLD,$(@D)) + $(call UCLIBC_OPT_UNSET,UCLIBC_HAS_THREADS_NATIVE,$(@D)) +endef +else ifeq ($(BR2_PTHREADS),y) +define UCLIBC_THREAD_CONFIG + $(call UCLIBC_OPT_SET,UCLIBC_HAS_THREADS,y,$(@D)) + $(call UCLIBC_OPT_SET,LINUXTHREADS_NEW,y,$(@D)) + $(call UCLIBC_OPT_UNSET,LINUXTHREADS_OLD,$(@D)) + $(call UCLIBC_OPT_UNSET,UCLIBC_HAS_THREADS_NATIVE,$(@D)) +endef +else ifeq ($(BR2_PTHREADS_OLD),y) +define UCLIBC_THREAD_CONFIG + $(call UCLIBC_OPT_SET,UCLIBC_HAS_THREADS,y,$(@D)) + $(call UCLIBC_OPT_UNSET,LINUXTHREADS_NEW,$(@D)) + $(call UCLIBC_OPT_SET,LINUXTHREADS_OLD,y,$(@D)) + $(call UCLIBC_OPT_UNSET,UCLIBC_HAS_THREADS_NATIVE,$(@D)) +endef +else ifeq ($(BR2_PTHREADS_NATIVE),y) +define UCLIBC_THREAD_CONFIG + $(call UCLIBC_OPT_SET,UCLIBC_HAS_THREADS,y,$(@D)) + $(call UCLIBC_OPT_UNSET,LINUXTHREADS_NEW,$(@D)) + $(call UCLIBC_OPT_UNSET,LINUXTHREADS_OLD,$(@D)) + $(call UCLIBC_OPT_SET,UCLIBC_HAS_THREADS_NATIVE,y,$(@D)) +endef +endif + +# +# Thread debug +# + +ifeq ($(BR2_PTHREAD_DEBUG),y) +UCLIBC_THREAD_DEBUG_CONFIG = $(call UCLIBC_OPT_SET,PTHREADS_DEBUG_SUPPORT,y,$(@D)) +else +UCLIBC_THREAD_DEBUG_CONFIG = $(call UCLIBC_OPT_UNSET,PTHREADS_DEBUG_SUPPORT,$(@D)) +endif + +# +# Locale +# + +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_LOCALE),y) +define UCLIBC_LOCALE_CONFIG + $(call UCLIBC_OPT_SET,UCLIBC_HAS_LOCALE,y,$(@D)) + $(call UCLIBC_OPT_UNSET,UCLIBC_BUILD_ALL_LOCALE,$(@D)) + $(call UCLIBC_OPT_SET,UCLIBC_BUILD_MINIMAL_LOCALE,y,$(@D)) + $(call UCLIBC_OPT_SET,UCLIBC_BUILD_MINIMAL_LOCALES,"$(UCLIBC_LOCALES)",$(@D)) + $(call UCLIBC_OPT_UNSET,UCLIBC_PREGENERATED_LOCALE_DATA,$(@D)) + $(call UCLIBC_OPT_UNSET,DOWNLOAD_PREGENERATED_LOCALE_DATA,$(@D)) + $(call UCLIBC_OPT_SET,UCLIBC_HAS_XLOCALE,y,$(@D)) + $(call UCLIBC_OPT_UNSET,UCLIBC_HAS_GLIBC_DIGIT_GROUPING,$(@D)) +endef +else +define UCLIBC_LOCALE_CONFIG + $(call UCLIBC_OPT_UNSET,UCLIBC_HAS_LOCALE,$(@D)) +endef +endif + +# +# wchar +# + +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_WCHAR),y) +UCLIBC_WCHAR_CONFIG = $(call UCLIBC_OPT_SET,UCLIBC_HAS_WCHAR,y,$(@D)) +else +UCLIBC_WCHAR_CONFIG = $(call UCLIBC_OPT_UNSET,UCLIBC_HAS_WCHAR,$(@D)) +endif + +# +# debug +# + +ifeq ($(BR2_ENABLE_DEBUG),y) +UCLIBC_DEBUG_CONFIG = $(call UCLIBC_OPT_SET,DODEBUG,y,$(@D)) +endif + +# +# strip +# + +ifeq ($(BR2_STRIP_none),y) +UCLIBC_STRIP_CONFIG = $(call UCLIBC_OPT_SET,DOSTRIP,y,$(@D)) +endif + +# +# Commands +# + +UCLIBC_MAKE_FLAGS = \ + ARCH="$(UCLIBC_TARGET_ARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + UCLIBC_EXTRA_CFLAGS="$(UCLIBC_EXTRA_CFLAGS) $(TARGET_ABI)" \ + HOSTCC="$(HOSTCC)" + +define UCLIBC_SETUP_DOT_CONFIG + cp -f $(UCLIBC_CONFIG_FILE) $(@D)/.config + $(call UCLIBC_OPT_SET,CROSS_COMPILER_PREFIX,"$(TARGET_CROSS)",$(@D)) + $(call UCLIBC_OPT_SET,TARGET_$(UCLIBC_TARGET_ARCH),y,$(@D)) + $(call UCLIBC_OPT_SET,TARGET_ARCH,"$(UCLIBC_TARGET_ARCH)",$(@D)) + $(call UCLIBC_OPT_SET,KERNEL_HEADERS,"$(STAGING_DIR)/usr/include",$(@D)) + $(call UCLIBC_OPT_SET,RUNTIME_PREFIX,"/",$(@D)) + $(call UCLIBC_OPT_SET,DEVEL_PREFIX,"/usr",$(@D)) + $(call UCLIBC_OPT_SET,SHARED_LIB_LOADER_PREFIX,"/lib",$(@D)) + $(UCLIBC_MMU_CONFIG) + $(UCLIBC_ARM_TYPE_CONFIG) + $(UCLIBC_ARM_ABI_CONFIG) + $(UCLIBC_ARM_BX_CONFIG) + $(UCLIBC_MIPS_ABI_CONFIG) + $(UCLIBC_MIPS_ISA_CONFIG) + $(UCLIBC_SH_TYPE_CONFIG) + $(UCLIBC_SPARC_TYPE_CONFIG) + $(UCLIBC_POWERPC_TYPE_CONFIG) + $(UCLIBC_AVR32_CONFIG) + $(UCLIBC_BFIN_CONFIG) + $(UCLIBC_X86_TYPE_CONFIG) + $(UCLIBC_ENDIAN_CONFIG) + $(UCLIBC_LARGEFILE_CONFIG) + $(UCLIBC_IPV6_CONFIG) + $(UCLIBC_RPC_CONFIG) + $(UCLIBC_FLOAT_CONFIG) + $(UCLIBC_SSP_CONFIG) + $(UCLIBC_THREAD_CONFIG) + $(UCLIBC_THREAD_DEBUG_CONFIG) + $(UCLIBC_LOCALE_CONFIG) + $(UCLIBC_WCHAR_CONFIG) + $(UCLIBC_STRIP_CONFIG) + $(UCLIBC_DEBUG_CONFIG) + yes "" | $(MAKE1) -C $(@D) \ + $(UCLIBC_MAKE_FLAGS) \ + PREFIX=$(STAGING_DIR) \ + DEVEL_PREFIX=/usr/ \ + RUNTIME_PREFIX=$(STAGING_DIR) \ + oldconfig +endef + +UCLIBC_POST_PATCH_HOOKS += UCLIBC_SETUP_DOT_CONFIG + +define UCLIBC_CONFIGURE_CMDS + $(MAKE1) -C $(UCLIBC_DIR) \ + $(UCLIBC_MAKE_FLAGS) \ + PREFIX=$(STAGING_DIR) \ + DEVEL_PREFIX=/usr/ \ + RUNTIME_PREFIX=$(STAGING_DIR) \ + headers startfiles \ + install_headers install_startfiles + $(TARGET_CROSS)gcc -nostdlib \ + -nostartfiles -shared -x c /dev/null -o $(STAGING_DIR)/usr/lib/libc.so + $(TARGET_CROSS)gcc -nostdlib \ + -nostartfiles -shared -x c /dev/null -o $(STAGING_DIR)/usr/lib/libm.so +endef + +ifeq ($(BR2_UCLIBC_INSTALL_TEST_SUITE),y) +define UCLIBC_BUILD_TEST_SUITE + $(MAKE1) -C $(@D)/test \ + $(UCLIBC_MAKE_FLAGS) \ + ARCH_CFLAGS=-I$(STAGING_DIR)/usr/include \ + UCLIBC_ONLY=1 \ + TEST_INSTALLED_UCLIBC=1 \ + compile +endef +endif + +define UCLIBC_BUILD_CMDS + $(MAKE1) -C $(@D) \ + $(UCLIBC_MAKE_FLAGS) \ + PREFIX= \ + DEVEL_PREFIX=/ \ + RUNTIME_PREFIX=/ \ + all + $(MAKE1) -C $(@D)/utils \ + PREFIX=$(HOST_DIR) \ + HOSTCC="$(HOSTCC)" hostutils + $(UCLIBC_BUILD_TEST_SUITE) +endef + +ifeq ($(BR2_UCLIBC_INSTALL_TEST_SUITE),y) +define UCLIBC_INSTALL_TEST_SUITE + mkdir -p $(TARGET_DIR)/root/uClibc + cp -rdpf $(@D)/test $(TARGET_DIR)/root/uClibc + $(INSTALL) -D -m 0644 $(@D)/Rules.mak $(TARGET_DIR)/root/uClibc/Rules.mak + $(INSTALL) -D -m 0644 $(@D)/.config $(TARGET_DIR)/root/uClibc/.config +endef +endif + +ifeq ($(BR2_UCLIBC_INSTALL_UTILS),y) +define UCLIBC_INSTALL_UTILS_TARGET + $(MAKE1) -C $(@D) \ + CC="$(TARGET_CC)" CPP="$(TARGET_CPP)" LD="$(TARGET_LD)" \ + ARCH="$(UCLIBC_TARGET_ARCH)" \ + PREFIX=$(TARGET_DIR) \ + utils install_utils +endef +endif + +define UCLIBC_INSTALL_TARGET_CMDS + $(MAKE1) -C $(@D) \ + $(UCLIBC_MAKE_FLAGS) \ + PREFIX=$(TARGET_DIR) \ + DEVEL_PREFIX=/usr/ \ + RUNTIME_PREFIX=/ \ + install_runtime + $(UCLIBC_INSTALL_UTILS_TARGET) + $(UCLIBC_INSTALL_TEST_SUITE) +endef + +# For FLAT binfmts (static) there are no host utils +ifeq ($(BR2_BINFMT_FLAT),) +define UCLIBC_INSTALL_UTILS_STAGING + $(INSTALL) -D -m 0755 $(@D)/utils/ldd.host $(HOST_DIR)/usr/bin/ldd + ln -sf ldd $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldd + $(INSTALL) -D -m 0755 $(@D)/utils/ldconfig.host $(HOST_DIR)/usr/bin/ldconfig + ln -sf ldconfig $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldconfig +endef +endif + +define UCLIBC_INSTALL_STAGING_CMDS + $(MAKE1) -C $(@D) \ + $(UCLIBC_MAKE_FLAGS) \ + PREFIX=$(STAGING_DIR) \ + DEVEL_PREFIX=/usr/ \ + RUNTIME_PREFIX=/ \ + install_runtime install_dev + $(UCLIBC_INSTALL_UTILS_STAGING) +endef + +uclibc-menuconfig: dirs uclibc-patch + $(MAKE1) -C $(UCLIBC_DIR) \ + $(UCLIBC_MAKE_FLAGS) \ + PREFIX=$(STAGING_DIR) \ + DEVEL_PREFIX=/usr/ \ + RUNTIME_PREFIX=$(STAGING_DIR)/ \ + menuconfig + rm -f $(UCLIBC_DIR)/.stamp_{configured,built,target_installed,staging_installed} + +$(eval $(generic-package)) diff --git a/package/udev/Config.in b/package/udev/Config.in index 0e3572c5f4..f4e3d553d6 100644 --- a/package/udev/Config.in +++ b/package/udev/Config.in @@ -1,9 +1,17 @@ config BR2_PACKAGE_UDEV bool "udev" depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV + depends on BR2_LARGEFILE # util-linux + depends on BR2_USE_WCHAR # util-linux + depends on !BR2_PREFER_STATIC_LIB # kmod + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_KMOD help Userspace device daemon. + udev requires a Linux kernel >= 2.6.34: it relies on devtmpfs. + ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/ if BR2_PACKAGE_UDEV @@ -14,23 +22,31 @@ config BR2_PACKAGE_UDEV_MTD_PROBE help mtd_probe - udev callout to probe mtd devices +config BR2_PACKAGE_UDEV_RULES_GEN + bool "enable rules generator" + help + Enable persistant rules generator + config BR2_PACKAGE_UDEV_ALL_EXTRAS bool "enable all extras" depends on BR2_LARGEFILE # acl depends on BR2_USE_WCHAR # libglib2 - depends on BR2_PROGRAM_INVOCATION # usbutils select BR2_PACKAGE_ACL select BR2_PACKAGE_LIBUSB select BR2_PACKAGE_LIBUSB_COMPAT select BR2_PACKAGE_USBUTILS select BR2_PACKAGE_HWDATA select BR2_PACKAGE_LIBGLIB2 + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 help Enable all extras with external dependencies like - libacl, libusb, libusb-compat, usbutils, hwdata + libacl, hwdata and libglib2 -comment "udev extras requires a toolchain with LARGEFILE/WCHAR/PROGRAM_INVOCATION support" - depends on !(BR2_LARGEFILE && BR2_USE_WCHAR && BR2_PROGRAM_INVOCATION) +comment "enabling all extras needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS endif diff --git a/package/udev/S10udev b/package/udev/S10udev index c178421961..13dd55ae9d 100755 --- a/package/udev/S10udev +++ b/package/udev/S10udev @@ -2,7 +2,7 @@ # # udev This is a minimal non-LSB version of a UDEV startup script. It # was derived by stripping down the udev-058 LSB version for use -# with buildroot on embedded hardware using Linux 2.6.12+ kernels. +# with buildroot on embedded hardware using Linux 2.6.34+ kernels. # # You may need to customize this for your system's resource limits # (including startup time!) and administration. For example, if @@ -17,7 +17,7 @@ # # Check for missing binaries -UDEV_BIN=/sbin/udevd +UDEV_BIN=/lib/udev/udevd test -x $UDEV_BIN || exit 5 # Check for config file and read it @@ -27,9 +27,10 @@ test -r $UDEV_CONFIG || exit 6 case "$1" in start) - echo -n "Populating $udev_root using udev: " + echo -n "Populating ${udev_root:-/dev} using udev: " echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug $UDEV_BIN -d || (echo "FAIL" && exit 1) + udevadm trigger echo "done" echo "Initializing coldplug devices" /sbin/udevadm trigger --action=add --type=subsystems 2>/dev/null @@ -38,7 +39,7 @@ case "$1" in ;; stop) # Stop execution of events - udevadm control --stop_exec_queue + udevadm control --stop-exec-queue killall udevd ;; *) diff --git a/package/udev/udev-accept4.patch b/package/udev/udev-accept4.patch index 0cd5c5f8eb..0f12369ffa 100644 --- a/package/udev/udev-accept4.patch +++ b/package/udev/udev-accept4.patch @@ -1,6 +1,6 @@ -diff -urN a/udev/udev-ctrl.c b/udev/udev-ctrl.c ---- a/udev/udev-ctrl.c 2011-10-09 17:10:32.000000000 -0600 -+++ b/udev/udev-ctrl.c 2011-10-25 15:11:09.000000000 -0600 +diff -ruN udev.orig/src/udev-ctrl.c udev.new/src/udev-ctrl.c +--- udev.orig/src/udev-ctrl.c 2012-01-29 01:15:46.000000000 +0100 ++++ udev.new/src/udev-ctrl.c 2013-12-03 15:45:44.000000000 +0100 @@ -15,6 +15,7 @@ #include #include @@ -10,32 +10,32 @@ diff -urN a/udev/udev-ctrl.c b/udev/udev-ctrl.c #include #include @@ -182,6 +183,7 @@ - struct ucred ucred; - socklen_t slen; - const int on = 1; -+ int flgs; + struct ucred ucred; + socklen_t slen; + const int on = 1; ++ int flgs; - conn = calloc(1, sizeof(struct udev_ctrl_connection)); - if (conn == NULL) + conn = calloc(1, sizeof(struct udev_ctrl_connection)); + if (conn == NULL) @@ -189,13 +191,19 @@ - conn->refcount = 1; - conn->uctrl = uctrl; + conn->refcount = 1; + conn->uctrl = uctrl; -- conn->sock = accept4(uctrl->sock, NULL, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK); -+// conn->sock = accept4(uctrl->sock, NULL, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK); -+ conn->sock = accept(uctrl->sock, NULL, NULL); - if (conn->sock < 0) { - if (errno != EINTR) - err(uctrl->udev, "unable to receive ctrl connection: %m\n"); - goto err; - } +- conn->sock = accept4(uctrl->sock, NULL, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK); ++// conn->sock = accept4(uctrl->sock, NULL, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK); ++ conn->sock = accept(uctrl->sock, NULL, NULL); + if (conn->sock < 0) { + if (errno != EINTR) + err(uctrl->udev, "unable to receive ctrl connection: %m\n"); + goto err; + } -+// Since we don't have accept4 -+ flgs = fcntl(conn->sock, F_GETFL, NULL); -+ if(flgs >= 0) fcntl(conn->sock, F_SETFL, flgs | O_NONBLOCK); -+ fcntl(conn->sock, F_SETFD, FD_CLOEXEC); ++ // Since we don't have accept4 ++ flgs = fcntl(conn->sock, F_GETFL, NULL); ++ if(flgs >= 0) fcntl(conn->sock, F_SETFL, flgs | O_NONBLOCK); ++ fcntl(conn->sock, F_SETFD, FD_CLOEXEC); + - /* check peer credential of connection */ - slen = sizeof(ucred); - if (getsockopt(conn->sock, SOL_SOCKET, SO_PEERCRED, &ucred, &slen) < 0) { - + /* check peer credential of connection */ + slen = sizeof(ucred); + if (getsockopt(conn->sock, SOL_SOCKET, SO_PEERCRED, &ucred, &slen) < 0) { +Binary files udev.orig/src/.udev-ctrl.c.swp and udev.new/src/.udev-ctrl.c.swp differ diff --git a/package/udev/udev-trigger_happy.patch b/package/udev/udev-trigger_happy.patch index a8452ac79a..15b18b33d7 100644 --- a/package/udev/udev-trigger_happy.patch +++ b/package/udev/udev-trigger_happy.patch @@ -1,9 +1,9 @@ -diff -ruN udev-173/extras/input_id/input_id.c udev-173-good//extras/input_id/input_id.c ---- udev-173/extras/input_id/input_id.c 2011-07-18 14:00:25.747859817 -0400 -+++ udev-173-good//extras/input_id/input_id.c 2012-04-05 23:11:19.677562254 -0400 +diff -ruN udev.orig/src/udev-builtin-input_id.c udev.new/src/udev-builtin-input_id.c +--- udev.orig/src/udev-builtin-input_id.c 2012-01-29 01:15:46.000000000 +0100 ++++ udev.new/src/udev-builtin-input_id.c 2013-12-03 15:48:39.000000000 +0100 @@ -30,6 +30,10 @@ - #include "libudev.h" - #include "libudev-private.h" + + #include "udev.h" +#ifndef BTN_TRIGGER_HAPPY +#define BTN_TRIGGER_HAPPY 0x2c0 diff --git a/package/udev/udev.mk b/package/udev/udev.mk index 5714192467..668eaac5a3 100644 --- a/package/udev/udev.mk +++ b/package/udev/udev.mk @@ -1,21 +1,29 @@ -############################################################# +################################################################################ # # udev # -############################################################# -UDEV_VERSION = 173 -UDEV_SOURCE = udev-$(UDEV_VERSION).tar.bz2 -UDEV_SITE = http://linuxfromscratch.pl/pub/LFS/lfs-packages/7.0 +################################################################################ + +UDEV_VERSION = 182 +UDEV_SOURCE = udev-$(UDEV_VERSION).tar.xz +UDEV_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/kernel/hotplug/ +UDEV_LICENSE = GPLv2+ +UDEV_LICENSE_FILES = COPYING UDEV_INSTALL_STAGING = YES +# mq_getattr is in librt +UDEV_CONF_ENV += LIBS=-lrt + UDEV_CONF_OPT = \ --sbindir=/sbin \ --with-rootlibdir=/lib \ - --libexecdir=/lib/udev \ - --disable-introspection \ - --disable-gtk-doc-html + --libexecdir=/lib \ + --with-usb-ids-path=/usr/share/hwdata/usb.ids \ + --with-pci-ids-path=/usr/share/hwdata/pci.ids \ + --with-firmware-path=/lib/firmware \ + --disable-introspection -UDEV_DEPENDENCIES = host-gperf host-pkg-config +UDEV_DEPENDENCIES = host-gperf host-pkgconf util-linux kmod define UDEV_REMOVE_MTD_PROBE_RULE rm -f $(TARGET_DIR)/lib/udev/rules.d/75-probe_mtd.rules @@ -27,22 +35,27 @@ UDEV_CONF_OPT += --disable-mtd_probe UDEV_POST_INSTALL_TARGET_HOOKS += UDEV_REMOVE_MTD_PROBE_RULE endif -ifeq ($(BR2_PACKAGE_UDEV_ALL_EXTRAS),y) -UDEV_DEPENDENCIES += libusb libusb-compat usbutils hwdata libglib2 -UDEV_CONF_OPT += \ - --with-pci-ids-path=/usr/share/hwdata/pci.ids \ - --with-usb-ids-path=/usr/share/hwdata/usb.ids \ +ifeq ($(BR2_PACKAGE_UDEV_RULES_GEN),y) +UDEV_CONF_OPT += --enable-rule_generator +endif +ifeq ($(BR2_PACKAGE_UDEV_ALL_EXTRAS),y) +UDEV_DEPENDENCIES += acl hwdata libglib2 +UDEV_CONF_OPT += \ + --enable-udev_acl else UDEV_CONF_OPT += \ - --disable-hwdb \ --disable-gudev endif +ifeq ($(BR2_PACKAGE_SYSTEMD),y) + UDEV_CONF_OPT += --with-systemdsystemunitdir=/lib/systemd/system/ +endif + define UDEV_INSTALL_INITSCRIPT $(INSTALL) -m 0755 package/udev/S10udev $(TARGET_DIR)/etc/init.d/S10udev endef UDEV_POST_INSTALL_TARGET_HOOKS += UDEV_INSTALL_INITSCRIPT -$(eval $(call AUTOTARGETS,package,udev)) +$(eval $(autotools-package)) diff --git a/package/udisks/Config.in b/package/udisks/Config.in new file mode 100644 index 0000000000..09070b4caa --- /dev/null +++ b/package/udisks/Config.in @@ -0,0 +1,41 @@ +config BR2_PACKAGE_UDISKS + bool "udisks" + depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus-glib -> glib2 + depends on BR2_USE_MMU # lvm2 + select BR2_PACKAGE_UDEV + select BR2_PACKAGE_UDEV_ALL_EXTRAS + select BR2_PACKAGE_DBUS + select BR2_PACKAGE_DBUS_GLIB + depends on BR2_USE_WCHAR # dbus-glib -> glib2 + select BR2_PACKAGE_SG3_UTILS + select BR2_PACKAGE_POLKIT + select BR2_PACKAGE_PARTED + select BR2_PACKAGE_LVM2 + select BR2_PACKAGE_LIBATASMART + help + The udisks project provides + + o A storage daemon that implements well-defined D-Bus + interfaces that can be used to query and manipulate + storage devices. + + o a command-line tool, udisks(1), that can be used to query + and use the daemon + + http://www.freedesktop.org/wiki/Software/udisks + +if BR2_PACKAGE_UDISKS + +config BR2_PACKAGE_UDISKS_LVM2 + bool "lvm2 support" + select BR2_PACKAGE_LVM2_APP_LIBRARY + help + Enable LVM2 support + +endif + +comment "udisks needs udev /dev management and a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV || \ + !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/udisks/udisks.mk b/package/udisks/udisks.mk new file mode 100644 index 0000000000..08e942ae19 --- /dev/null +++ b/package/udisks/udisks.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# udisks +# +################################################################################ + +UDISKS_VERSION = 1.0.4 +UDISKS_SITE = http://hal.freedesktop.org/releases/ +UDISKS_LICENSE = GPLv2+ +UDISKS_LICENSE_FILES = COPYING + +UDISKS_DEPENDENCIES = \ + sg3_utils \ + host-pkgconf \ + udev \ + dbus \ + dbus-glib \ + polkit \ + parted \ + lvm2 \ + libatasmart + +UDISKS_CONF_OPT = --disable-remote-access \ + $(if $(BR2_HAVE_DOCUMENTATION),,--disable-man-pages) + +ifeq ($(BR2_PACKAGE_UDISKS_LVM2),y) +UDISKS_CONF_OPT += --enable-lvm2 +endif + +$(eval $(autotools-package)) diff --git a/package/udpcast/Config.in b/package/udpcast/Config.in index d7ccfb4306..0543b4bb42 100644 --- a/package/udpcast/Config.in +++ b/package/udpcast/Config.in @@ -1,14 +1,17 @@ config BR2_PACKAGE_UDPCAST bool "udpcast" depends on BR2_LARGEFILE + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() help A multicast protocol implementation which happens to be very handy for imaging drives over the network. http://www.udpcast.linux.lu/ -comment "udpcast requires a toolchain with LARGEFILE support" - depends on !BR2_LARGEFILE +comment "udpcast needs a toolchain w/ largefile, threads" + depends on BR2_USE_MMU + depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS menu "udpcast tools selection" depends on BR2_PACKAGE_UDPCAST diff --git a/package/udpcast/udpcast-select-h.patch b/package/udpcast/udpcast-select-h.patch new file mode 100644 index 0000000000..9a8cfc9d5e --- /dev/null +++ b/package/udpcast/udpcast-select-h.patch @@ -0,0 +1,11 @@ +--- udpcast-20120424/console.h 2005-12-22 22:59:18.000000000 +0000 ++++ udpcast-20120424.mod/console.h 2013-05-22 22:22:19.835474140 +0100 +@@ -6,6 +6,8 @@ + #include + #endif /* __MINGW32__ */ + ++#include ++ + #define prepareConsole udpc_prepareConsole + #define getConsoleFd udpc_getConsoleFd + #define restoreConsole udpc_restoreConsole diff --git a/package/udpcast/udpcast.mk b/package/udpcast/udpcast.mk index 8672dd599c..8c22130d23 100644 --- a/package/udpcast/udpcast.mk +++ b/package/udpcast/udpcast.mk @@ -1,12 +1,13 @@ -############################################################# +################################################################################ # # udpcast # -############################################################# -UDPCAST_VERSION:=20071228 -UDPCAST_SOURCE:=udpcast-$(UDPCAST_VERSION).tar.gz -UDPCAST_SITE:=http://www.udpcast.linux.lu/download +################################################################################ + +UDPCAST_VERSION = 20120424 +UDPCAST_SITE = http://www.udpcast.linux.lu/download UDPCAST_CONF_ENV = $(if $(BR_LARGEFILE),ac_cv_type_stat64=yes,ac_cv_type_stat64=no) +UDPCAST_DEPENDENCIES = host-m4 define UDPCAST_REMOVE_UDP_SENDER rm -f $(TARGET_DIR)/usr/sbin/udp-sender @@ -26,4 +27,4 @@ ifneq ($(BR2_PACKAGE_UDPCAST_RECEIVER),y) UDPCAST_POST_INSTALL_TARGET_HOOKS += UDPCAST_REMOVE_UDP_RECEIVER endif -$(eval $(call AUTOTARGETS,package,udpcast)) +$(eval $(autotools-package)) diff --git a/package/uemacs/uemacs-4.0.15-lt.03.ixon.patch b/package/uemacs/uemacs-4.0.15-lt.03.ixon.patch new file mode 100644 index 0000000000..d0aaa79793 --- /dev/null +++ b/package/uemacs/uemacs-4.0.15-lt.03.ixon.patch @@ -0,0 +1,28 @@ +[PATCH] clear ixon termios flag on initialization + +Otherwise ctrl-S/Q gets intercepted by the tty layer instead of +handled by uemacs. + +Signed-off-by: Peter Korsgaard +diff -U8 em-4.0.15-lt-orig/posix.c em-4.0.15-lt/posix.c +--- em-4.0.15-lt-orig/posix.c 1999-05-16 02:06:19.000000000 -0500 ++++ em-4.0.15-lt/posix.c 2012-04-25 16:14:25.000000000 -0500 +@@ -45,17 +45,17 @@ + /* + * base new settings on old ones - don't change things + * we don't know about + */ + ntermios = otermios; + + /* raw CR/NL etc input handling, but keep ISTRIP if we're on a 7-bit line */ + ntermios.c_iflag &= ~(IGNBRK | BRKINT | IGNPAR | PARMRK +- | INPCK | INLCR | IGNCR | ICRNL); ++ | INPCK | INLCR | IGNCR | ICRNL | IXON); + + /* raw CR/NR etc output handling */ + ntermios.c_oflag &= ~(OPOST | ONLCR | OLCUC | OCRNL | ONOCR | ONLRET); + + /* No signal handling, no echo etc */ + ntermios.c_lflag &= ~(ISIG | ICANON | XCASE | ECHO | ECHOE | ECHOK + | ECHONL | NOFLSH | TOSTOP | ECHOCTL | ECHOPRT + | ECHOKE | FLUSHO | PENDIN | IEXTEN); diff --git a/package/uemacs/uemacs.mk b/package/uemacs/uemacs.mk index 539ad51f0e..0cd38e051b 100644 --- a/package/uemacs/uemacs.mk +++ b/package/uemacs/uemacs.mk @@ -1,48 +1,26 @@ -############################################################# +################################################################################ # # uemacs # -############################################################# -UEMACS_VERSION:=4.0.15-lt -UEMACS_SOURCE:=em-$(UEMACS_VERSION).tar.bz2 -UEMACS_CAT:=$(BZCAT) -UEMACS_SITE:=$(BR2_KERNEL_MIRROR)/software/editors/uemacs/ -UEMACS_DIR:=$(BUILD_DIR)/em-$(UEMACS_VERSION) -UEMACS_BINARY:=em -UEMACS_TARGET_BINARY:=usr/bin/emacs +################################################################################ -$(DL_DIR)/$(UEMACS_SOURCE): - $(call DOWNLOAD,$(UEMACS_SITE),$(UEMACS_SOURCE)) +UEMACS_VERSION = 4.0.15-lt +UEMACS_SOURCE = em-$(UEMACS_VERSION).tar.gz +UEMACS_SITE = $(BR2_KERNEL_MIRROR)/software/editors/uemacs/ +UEMACS_DEPENDENCIES = ncurses -uemacs-source: $(DL_DIR)/$(UEMACS_SOURCE) +define UEMACS_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + CC="$(TARGET_CC)" DEFINES="-DAUTOCONF -DPOSIX -DUSG" \ + CFLAGS+="$(TARGET_CFLAGS) " LIBS="$(TARGET_CFLAGS) -lncurses" +endef -$(UEMACS_DIR)/.unpacked: $(DL_DIR)/$(UEMACS_SOURCE) - $(UEMACS_CAT) $(DL_DIR)/$(UEMACS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - toolchain/patch-kernel.sh $(UEMACS_DIR) package/uemacs/ uemacs\*.patch - touch $(UEMACS_DIR)/.unpacked +define UEMACS_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/em $(TARGET_DIR)/usr/bin/em +endef -$(UEMACS_DIR)/$(UEMACS_BINARY): $(UEMACS_DIR)/.unpacked - $(MAKE) -C $(UEMACS_DIR) \ - CC="$(TARGET_CC)" DEFINES="-DAUTOCONF -DPOSIX -DUSG" CFLAGS+="$(TARGET_CFLAGS) " LIBS="$(TARGET_CFLAGS) -lncurses" - $(STRIPCMD) $(UEMACS_DIR)/$(UEMACS_BINARY) +define UEMACS_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/bin/em +endef -$(TARGET_DIR)/$(UEMACS_TARGET_BINARY): $(UEMACS_DIR)/$(UEMACS_BINARY) - $(INSTALL) -m 0755 -D $(UEMACS_DIR)/$(UEMACS_BINARY) $(TARGET_DIR)/$(UEMACS_TARGET_BINARY) - -uemacs: ncurses $(TARGET_DIR)/$(UEMACS_TARGET_BINARY) - -uemacs-clean: - rm -f $(TARGET_DIR)/$(UEMACS_TARGET_BINARY) - -$(MAKE) -C $(UEMACS_DIR) clean - -uemacs-dirclean: - rm -rf $(UEMACS_DIR) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_UEMACS),y) -TARGETS+=uemacs -endif +$(eval $(generic-package)) diff --git a/package/ulogd/Config.in b/package/ulogd/Config.in new file mode 100644 index 0000000000..04acf0c501 --- /dev/null +++ b/package/ulogd/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_ULOGD + bool "ulogd" + depends on BR2_INET_IPV6 + depends on BR2_LARGEFILE + depends on !BR2_PREFER_STATIC_LIB + depends on BR2_USE_MMU + select BR2_PACKAGE_LIBMNL + select BR2_PACKAGE_LIBNETFILTER_ACCT + select BR2_PACKAGE_LIBNETFILTER_CONNTRACK + select BR2_PACKAGE_LIBNETFILTER_LOG + select BR2_PACKAGE_LIBNFNETLINK + help + ulogd is a userspace logging daemon for netfilter/iptables related logging. + + http://www.netfilter.org/projects/ulogd/ + +comment "ulogd needs a toolchain w/ IPv6, largefile, dynamic library" + depends on !BR2_INET_IPV6 || !BR2_LARGEFILE || BR2_PREFER_STATIC_LIB + depends on BR2_USE_MMU diff --git a/package/ulogd/ulogd.mk b/package/ulogd/ulogd.mk new file mode 100644 index 0000000000..11780ace4c --- /dev/null +++ b/package/ulogd/ulogd.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# ulogd +# +################################################################################ + +ULOGD_VERSION = 2.0.2 +ULOGD_SOURCE = ulogd-$(ULOGD_VERSION).tar.bz2 +ULOGD_SITE = http://www.netfilter.org/projects/ulogd/files +ULOGD_CONF_OPT = --with-dbi=no --with-pgsql=no +ULOGD_AUTORECONF = YES +ULOGD_DEPENDENCIES = host-pkgconf \ + libmnl libnetfilter_acct libnetfilter_conntrack libnetfilter_log \ + libnfnetlink $(if $(BR2_PACKAGE_SQLITE),sqlite) +ULOGD_LICENSE = GPLv2 +ULOGD_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_MYSQL_CLIENT),y) +ULOGD_CONF_OPT += --with-mysql=$(STAGING_DIR)/usr +ULOGD_DEPENDENCIES += mysql_client +else +ULOGD_CONF_OPT += --with-mysql=no +endif + +$(eval $(autotools-package)) diff --git a/package/unionfs/Config.in b/package/unionfs/Config.in new file mode 100644 index 0000000000..de3d341cf3 --- /dev/null +++ b/package/unionfs/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_UNIONFS + bool "unionfs (FUSE)" + select BR2_PACKAGE_LIBFUSE + depends on BR2_LARGEFILE + depends on BR2_TOOLCHAIN_HAS_THREADS # libfuse + depends on BR2_USE_MMU # libfuse + depends on !BR2_PREFER_STATIC_LIB # libfuse + help + A userspace unionfs implementation. + + http://podgorny.cz/moin/UnionFsFuse + +comment "unionfs needs a toolchain w/ largefile, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS || BR2_PREFER_STATIC_LIB diff --git a/package/unionfs/unionfs-fuse-no-cxx-needed.patch b/package/unionfs/unionfs-fuse-no-cxx-needed.patch new file mode 100644 index 0000000000..56f7e2455b --- /dev/null +++ b/package/unionfs/unionfs-fuse-no-cxx-needed.patch @@ -0,0 +1,19 @@ +By default, CMake assumes a project uses the C and C++ languages, so +it checks for both the C and the C++ compiler to exist. + +However, unionfs-fuse is written purely in C, so checking for a C++ +compiler is useless, and even prevents unionfs-fuse from building +properly on targets for which no C++ compiler is available. + +Signed-off-by: Thomas Petazzoni + +Index: b/CMakeLists.txt +=================================================================== +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-project(unionfs-fuse) ++project(unionfs-fuse C) + + cmake_minimum_required(VERSION 2.0) + INCLUDE (CheckIncludeFiles) diff --git a/package/unionfs/unionfs.mk b/package/unionfs/unionfs.mk new file mode 100644 index 0000000000..e5c5993b3e --- /dev/null +++ b/package/unionfs/unionfs.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# unionfs +# +################################################################################ + +UNIONFS_VERSION = 0.26 +UNIONFS_SITE = http://podgorny.cz/unionfs-fuse/releases +UNIONFS_SOURCE = unionfs-fuse-$(UNIONFS_VERSION).tar.xz +UNIONFS_DEPENDENCIES = libfuse host-pkgconf +UNIONFS_LICENSE = BSD-3c +UNIONFS_LICENSE_FILES = LICENSE + +$(eval $(cmake-package)) diff --git a/package/urg/Config.in b/package/urg/Config.in new file mode 100644 index 0000000000..ded8204406 --- /dev/null +++ b/package/urg/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_URG + bool "urg" + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_SDL + select BR2_PACKAGE_SDL_NET + help + Library to control Hokuyo's URG series sensors. + Requires SDL & SDL_net. + + http://www.hokuyo-aut.jp/02sensor/07scanner/download/urg_programs_en/ + +comment "urg needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/urg/urg-select-h.patch b/package/urg/urg-select-h.patch new file mode 100644 index 0000000000..09d1530443 --- /dev/null +++ b/package/urg/urg-select-h.patch @@ -0,0 +1,11 @@ +--- urg-0.8.18/src/c/connection/serial_ctrl_lin.c 2010-11-22 01:48:01.000000000 +0000 ++++ urg-0.8.18.mod/src/c/connection/serial_ctrl_lin.c 2013-05-21 20:56:35.822025969 +0100 +@@ -17,7 +17,7 @@ + #include + #include + #include +- ++#include + //#include + + enum { diff --git a/package/urg/urg.mk b/package/urg/urg.mk new file mode 100644 index 0000000000..e16393a5f9 --- /dev/null +++ b/package/urg/urg.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# urg +# +################################################################################ + +URG_VERSION = 0.8.18 +URG_SITE = http://www.hokuyo-aut.jp/02sensor/07scanner/download/urg_programs_en/ +URG_SOURCE = urg-$(URG_VERSION).zip +URG_LICENSE = LGPLv3 +URG_LICENSE_FILES = COPYING + +URG_INSTALL_STAGING = YES + +URG_DEPENDENCIES = sdl sdl_net + +URG_CONF_OPT = --with-sdl-prefix=$(STAGING_DIR)/usr \ + --with-sdl-exec-prefix=$(STAGING_DIR)/usr + +URG_CONFIG_SCRIPTS = c_urg-config urg-config + +define URG_EXTRACT_CMDS + $(RM) -rf $(URG_DIR) + unzip -q -d $(BUILD_DIR)/ $(DL_DIR)/$(URG_SOURCE) + test -d $(URG_DIR) || \ + mv $(BUILD_DIR)/$(subst .zip,,$(URG_SOURCE)) $(URG_DIR) +endef + +$(eval $(autotools-package)) diff --git a/package/usb_modeswitch/Config.in b/package/usb_modeswitch/Config.in index ae10a55501..5d8a6d2abc 100644 --- a/package/usb_modeswitch/Config.in +++ b/package/usb_modeswitch/Config.in @@ -1,9 +1,12 @@ config BR2_PACKAGE_USB_MODESWITCH bool "usb_modeswitch" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb select BR2_PACKAGE_LIBUSB - select BR2_PACKAGE_LIBUSB_COMPAT help USB mode switcher. Used to switch mode on multiple-function devices http://www.draisberghof.de/usb_modeswitch/ + +comment "usb_modeswitch needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/usb_modeswitch/usb_modeswitch-makefile.patch b/package/usb_modeswitch/usb_modeswitch-makefile.patch deleted file mode 100644 index 918200b61d..0000000000 --- a/package/usb_modeswitch/usb_modeswitch-makefile.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -Nura usb-modeswitch-1.1.2.orig/Makefile usb-modeswitch-1.1.2/Makefile ---- usb-modeswitch-1.1.2.orig/Makefile 2010-04-17 15:27:11.000000000 -0300 -+++ usb-modeswitch-1.1.2/Makefile 2010-04-22 15:05:32.363471807 -0300 -@@ -1,6 +1,6 @@ - PROG = usb_modeswitch - VERS = 1.1.2 --CC = gcc -+CC ?= gcc - CFLAGS += -Wall -l usb - RM = /bin/rm -f - OBJS = usb_modeswitch.c -@@ -23,8 +23,9 @@ - install: all - install -d $(SBINDIR) - install --mode=755 usb_modeswitch $(SBINDIR)/usb_modeswitch -- install --mode=755 usb_modeswitch.tcl $(UDEVDIR)/usb_modeswitch -- install --mode=644 usb_modeswitch.conf $(ETCDIR)/usb_modeswitch.conf -+ #install --mode=755 usb_modeswitch.tcl $(UDEVDIR)/usb_modeswitch -+ #install --mode=644 usb_modeswitch.conf $(ETCDIR)/usb_modeswitch.conf -+ install -d $(MANDIR) - install --mode=644 usb_modeswitch.1 $(MANDIR)/usb_modeswitch.1 - - diff --git a/package/usb_modeswitch/usb_modeswitch.mk b/package/usb_modeswitch/usb_modeswitch.mk index 620c5d05a3..ef9ff0d649 100644 --- a/package/usb_modeswitch/usb_modeswitch.mk +++ b/package/usb_modeswitch/usb_modeswitch.mk @@ -1,29 +1,44 @@ -############################################################# +################################################################################ # # usb_modeswitch # -############################################################# +################################################################################ -USB_MODESWITCH_VERSION = 1.1.2 +USB_MODESWITCH_VERSION = 2.0.1 USB_MODESWITCH_SOURCE = usb-modeswitch-$(USB_MODESWITCH_VERSION).tar.bz2 USB_MODESWITCH_SITE = http://www.draisberghof.de/usb_modeswitch -USB_MODESWITCH_DEPENDENCIES = libusb-compat +USB_MODESWITCH_DEPENDENCIES = libusb +USB_MODESWITCH_LICENSE = GPLv2+ +USB_MODESWITCH_LICENSE_FILES = COPYING + +USB_MODESWITCH_BUILD_TARGETS = static +USB_MODESWITCH_INSTALL_TARGETS = install-static + +ifeq ($(BR2_PACKAGE_TCL)$(BR2_PACKAGE_TCL_SHLIB_ONLY),y) + USB_MODESWITCH_DEPENDENCIES += tcl + USB_MODESWITCH_BUILD_TARGETS = script + USB_MODESWITCH_INSTALL_TARGETS = install-script +endif define USB_MODESWITCH_BUILD_CMDS - $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE -Wall -I." \ + -C $(@D) $(USB_MODESWITCH_BUILD_TARGETS) endef define USB_MODESWITCH_INSTALL_TARGET_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install - $(INSTALL) -D $(@D)/usb_modeswitch.setup -m 0644 \ - $(TARGET_DIR)/etc/usb_modeswitch.setup + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + DESTDIR=$(TARGET_DIR) \ + -C $(@D) $(USB_MODESWITCH_INSTALL_TARGETS) endef + define USB_MODESWITCH_CLEAN_CMDS - rm -f $(TARGET_DIR)/usr/sbin/usb_modeswitch - rm -f $(TARGET_DIR)/etc/usb_modeswitch.setup - rm -f $(TARGET_DIR)/usr/share/man/man1/usb_modeswitch.1 + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) clean endef -$(eval $(call GENTARGETS,package,usb_modeswitch)) +define USB_MODESWITCH_UNINSTALL_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) uninstall +endef +$(eval $(generic-package)) diff --git a/package/usb_modeswitch_data/Config.in b/package/usb_modeswitch_data/Config.in new file mode 100644 index 0000000000..ad96726ad6 --- /dev/null +++ b/package/usb_modeswitch_data/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_USB_MODESWITCH_DATA + bool "usb_modeswitch_data" + select BR2_PACKAGE_USB_MODESWITCH + depends on BR2_TOOLCHAIN_HAS_THREADS # usb_modeswitch -> libusb + help + USB mode switch data + Contains udev rules and events to allow usb_modeswitch to + function automatically + + http://www.draisberghof.de/usb_modeswitch/ + +comment "usb_modeswitch_data needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/usb_modeswitch_data/usb_modeswitch_data-makefile.patch b/package/usb_modeswitch_data/usb_modeswitch_data-makefile.patch new file mode 100644 index 0000000000..28441fe003 --- /dev/null +++ b/package/usb_modeswitch_data/usb_modeswitch_data-makefile.patch @@ -0,0 +1,28 @@ +Fixed Makefile install sections to not reload udev rules. In a +cross-compiler environment, it is not wanted to reload the host udev rules. + +Signed-off-by: J.C. Woltz +Signed-off-by: Patrick Ziegler +--- a/Makefile 2013-06-10 22:32:53.000000000 +0200 ++++ b/Makefile 2013-06-11 10:38:03.181161401 +0200 +@@ -13,9 +13,9 @@ + clean: + $(RM) 40-usb_modeswitch.rules + +-install: all files-install db-install rules-reload ++install: all files-install db-install + +-install-packed: files-install db-install-packed rules-reload ++install-packed: files-install db-install-packed + + files-install: + install -d $(PREFIX)/share/usb_modeswitch +@@ -54,7 +54,7 @@ + fi \ + fi + +-uninstall: files-uninstall rules-reload ++uninstall: files-uninstall + + files-uninstall: + $(RM) $(RULESDIR)/40-usb_modeswitch.rules diff --git a/package/usb_modeswitch_data/usb_modeswitch_data.mk b/package/usb_modeswitch_data/usb_modeswitch_data.mk new file mode 100644 index 0000000000..10a39024c4 --- /dev/null +++ b/package/usb_modeswitch_data/usb_modeswitch_data.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# usb_modeswitch_data +# +################################################################################ + +USB_MODESWITCH_DATA_VERSION = 20130807 +USB_MODESWITCH_DATA_SOURCE = usb-modeswitch-data-$(USB_MODESWITCH_DATA_VERSION).tar.bz2 +USB_MODESWITCH_DATA_SITE = http://www.draisberghof.de/usb_modeswitch +USB_MODESWITCH_DATA_DEPENDENCIES = usb_modeswitch +USB_MODESWITCH_DATA_LICENSE = GPLv2+ +USB_MODESWITCH_DATA_LICENSE_FILES = COPYING + +# Nothing to build, it is a pure data package + +define USB_MODESWITCH_DATA_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +define USB_MODESWITCH_DATA_CLEAN_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) clean +endef + +$(eval $(generic-package)) diff --git a/package/usbmount/Config.in b/package/usbmount/Config.in index cf5fee8b88..2583e7cc7c 100644 --- a/package/usbmount/Config.in +++ b/package/usbmount/Config.in @@ -1,16 +1,12 @@ config BR2_PACKAGE_USBMOUNT bool "usbmount" - depends on BR2_LARGEFILE # util-linux - depends on BR2_USE_WCHAR # util-linux depends on BR2_PACKAGE_UDEV select BR2_PACKAGE_LOCKFILE_PROGS - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBBLKID help The usbmount package automatically mounts USB mass storage devices when they are plugged in, and unmounts them when they are removed. http://usbmount.alioth.debian.org/ -comment "usbmount requires a toolchain with LARGEFILE + WCHAR support" - depends on !(BR2_LARGEFILE && BR2_USE_WCHAR) && BR2_PACKAGE_UDEV \ No newline at end of file +comment "usbmount requires udev to be enabled" + depends on !BR2_PACKAGE_UDEV diff --git a/package/usbmount/usbmount-0001-if-devinfo-is-empty-ensure-variable-is-empty.patch b/package/usbmount/usbmount-0001-if-devinfo-is-empty-ensure-variable-is-empty.patch deleted file mode 100644 index b1dd1150bd..0000000000 --- a/package/usbmount/usbmount-0001-if-devinfo-is-empty-ensure-variable-is-empty.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 00bc8e3031dd5c4d9f33c2a92b8eac8b235940d7 Mon Sep 17 00:00:00 2001 -From: Trent Nelson -Date: Fri, 18 Oct 2013 23:43:54 -0400 -Subject: [PATCH 1/4] if devinfo is empty, ensure variable is empty - ---- - usbmount | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/usbmount b/usbmount -index 75f249a..f887f68 100755 ---- a/usbmount -+++ b/usbmount -@@ -88,9 +88,9 @@ if [ "$1" = add ]; then - # FIXME: improvement: implement mounting by label (notice that labels - # can contain spaces, which makes things a little bit less comfortable). - DEVINFO=$(/sbin/blkid -p $DEVNAME) -- FSTYPE=$(echo "$DEVINFO" | sed 's/.*[[:blank:]]TYPE="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;') -- UUID=$(echo "$DEVINFO" | sed 's/.*[[:blank:]]UUID="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;') -- USAGE=$(echo "$DEVINFO" | sed 's/.*[[:blank:]]USAGE="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;') -+ FSTYPE=$(echo "$DEVINFO" | sed -ne 's/.*[[:blank:]]TYPE="\([^"]*\)".*/\1/pg; s/[[:blank:]]*//g;') -+ UUID=$(echo "$DEVINFO" | sed -ne 's/.*[[:blank:]]UUID="\([^"]*\)".*/\1/pg; s/[[:blank:]]*//g;') -+ USAGE=$(echo "$DEVINFO" | sed -ne 's/.*[[:blank:]]USAGE="\([^"]*\)".*/\1/pg; s/[[:blank:]]*//g;') - - if ! echo $USAGE | egrep -q "(filesystem|disklabel)"; then - log info "$DEVNAME does not contain a filesystem or disklabel" --- -1.8.1.2 - diff --git a/package/usbmount/usbmount-0003-usbmount-use-fs-label-as-mount-point.patch b/package/usbmount/usbmount-0003-usbmount-use-fs-label-as-mount-point.patch index 1e5d8ed925..254f6b40c3 100644 --- a/package/usbmount/usbmount-0003-usbmount-use-fs-label-as-mount-point.patch +++ b/package/usbmount/usbmount-0003-usbmount-use-fs-label-as-mount-point.patch @@ -20,14 +20,6 @@ index d51c68a..4521aa5 100755 if [ -r /etc/usbmount/usbmount.conf ]; then . /etc/usbmount/usbmount.conf -@@ -91,6 +92,7 @@ if [ "$1" = add ]; then - FSTYPE=$(echo "$DEVINFO" | sed -ne 's/.*[[:blank:]]TYPE="\([^"]*\)".*/\1/pg; s/[[:blank:]]*//g;') - UUID=$(echo "$DEVINFO" | sed -ne 's/.*[[:blank:]]UUID="\([^"]*\)".*/\1/pg; s/[[:blank:]]*//g;') - USAGE=$(echo "$DEVINFO" | sed -ne 's/.*[[:blank:]]USAGE="\([^"]*\)".*/\1/pg; s/[[:blank:]]*//g;') -+ LABEL=$(echo "$DEVINFO" | sed -ne 's/.*[[:blank:]]LABEL="\([^"]*\)".*/\1/pg; s/[[:blank:]]*//g;') - - if ! echo $USAGE | egrep -q "(filesystem|disklabel)"; then - log info "$DEVNAME does not contain a filesystem or disklabel" @@ -113,14 +115,20 @@ if [ "$1" = add ]; then # Test if the filesystem type is in the list of filesystem # types to mount. @@ -40,8 +32,8 @@ index d51c68a..4521aa5 100755 - break - fi - done -+ if [ -n "${LABEL}" ]; then -+ mountpoint="${MOUNT_BASE}/${LABEL}" ++ if [ -n "${ID_FS_LABEL}" ]; then ++ mountpoint="${MOUNT_BASE}/${ID_FS_LABEL}" + elif [ -n "$DEVNAME" ]; then + mountpoint="${MOUNT_BASE}/`basename ${DEVNAME}`" + else diff --git a/package/usbmount/usbmount-rules-fix.patch b/package/usbmount/usbmount-rules-fix.patch index b80bb45457..5913ce1eae 100644 --- a/package/usbmount/usbmount-rules-fix.patch +++ b/package/usbmount/usbmount-rules-fix.patch @@ -1,3 +1,8 @@ +Signed-off-by: Yegor Yefremov +--- + usbmount.rules | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + Index: b/usbmount.rules =================================================================== --- a/usbmount.rules diff --git a/package/usbmount/usbmount-use-udev-environment-instead-of-blkid.patch b/package/usbmount/usbmount-use-udev-environment-instead-of-blkid.patch new file mode 100644 index 0000000000..27928b5d54 --- /dev/null +++ b/package/usbmount/usbmount-use-udev-environment-instead-of-blkid.patch @@ -0,0 +1,71 @@ +udev can provide all the values that usbmount determined using the +blkid binary. This patch drops use of blkid in favor of using the +environment variables set by udev. Thus it removes the dependency +on blkid from usbmount. + +Signed-off-by: Sven Neumann +--- usbmount-0.0.22/usbmount.orig 2013-06-18 14:44:40.143096147 +0200 ++++ usbmount-0.0.22/usbmount 2013-06-19 16:13:09.882434896 +0200 +@@ -59,11 +59,6 @@ + exit 0 + fi + +-if [ ! -x /sbin/blkid ]; then +- log err "cannot execute /sbin/blkid" +- exit 1 +-fi +- + # Per Policy 9.3.2, directories under /var/run have to be created + # after every reboot. + if [ ! -e /var/run/usbmount ]; then +@@ -83,15 +78,7 @@ + trap '( lockfile-remove /var/run/usbmount/.mount )' 0 + log debug "acquired lock /var/run/usbmount/.mount.lock" + +- # Grab device information from device and "divide it" +- # FIXME: improvement: implement mounting by label (notice that labels +- # can contain spaces, which makes things a little bit less comfortable). +- DEVINFO=$(/sbin/blkid -p $DEVNAME) +- FSTYPE=$(echo "$DEVINFO" | sed 's/.*[[:blank:]]TYPE="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;') +- UUID=$(echo "$DEVINFO" | sed 's/.*[[:blank:]]UUID="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;') +- USAGE=$(echo "$DEVINFO" | sed 's/.*[[:blank:]]USAGE="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;') +- +- if ! echo $USAGE | egrep -q "(filesystem|disklabel)"; then ++ if ! echo $ID_FS_USAGE | egrep -q "(filesystem|disklabel)"; then + log info "$DEVNAME does not contain a filesystem or disklabel" + exit 1 + fi +@@ -101,14 +88,14 @@ + log info "executing command: mount $DEVNAME" + mount $DEVNAME || log err "mount by DEVNAME with $DEVNAME wasn't successful; return code $?" + +- elif grep -q "^[[:blank:]]*UUID=$UUID" /etc/fstab; then +- log info "executing command: mount -U $UUID" +- mount -U $UUID || log err "mount by UUID with $UUID wasn't successful; return code $?" ++ elif grep -q "^[[:blank:]]*UUID=$ID_FS_UUID" /etc/fstab; then ++ log info "executing command: mount -U $ID_FS_UUID" ++ mount -U $ID_FS_UUID || log err "mount by UUID with $ID_FS_UUID wasn't successful; return code $?" + + else +- log debug "$DEVNAME contains filesystem type $FSTYPE" ++ log debug "$DEVNAME contains filesystem type $ID_FS_TYPE" + +- fstype=$FSTYPE ++ fstype=$ID_FS_TYPE + # Test if the filesystem type is in the list of filesystem + # types to mount. + if in_list "$fstype" "$FILESYSTEMS"; then +@@ -176,11 +163,13 @@ + + # Run hook scripts; ignore errors. + export UM_DEVICE="$DEVNAME" ++ export UM_UUID="$ID_FS_UUID" + export UM_MOUNTPOINT="$mountpoint" + export UM_FILESYSTEM="$fstype" + export UM_MOUNTOPTIONS="$options" + export UM_VENDOR="$vendor" + export UM_MODEL="$model" ++ export UM_LABEL="$ID_FS_LABEL" + log info "executing command: run-parts /etc/usbmount/mount.d" + run-parts /etc/usbmount/mount.d || : + else diff --git a/package/usbmount/usbmount.mk b/package/usbmount/usbmount.mk index 65180694a3..5f4e01f09a 100644 --- a/package/usbmount/usbmount.mk +++ b/package/usbmount/usbmount.mk @@ -1,32 +1,35 @@ -############################################################# +################################################################################ # # usbmount # -############################################################# +################################################################################ + USBMOUNT_VERSION = 0.0.22 USBMOUNT_SOURCE = usbmount_$(USBMOUNT_VERSION).tar.gz USBMOUNT_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/u/usbmount -USBMOUNT_DEPENDENCIES = udev lockfile-progs util-linux +USBMOUNT_DEPENDENCIES = udev lockfile-progs define USBMOUNT_INSTALL_TARGET_CMDS $(INSTALL) -m 0755 -D $(@D)/usbmount $(TARGET_DIR)/usr/share/usbmount/usbmount $(INSTALL) -m 0755 -D $(@D)/00_create_model_symlink \ - $(TARGET_DIR)/etc/usbmount/usbmount.d/00_create_model_symlink + $(TARGET_DIR)/etc/usbmount/mount.d/00_create_model_symlink $(INSTALL) -m 0755 -D $(@D)/00_remove_model_symlink \ - $(TARGET_DIR)/etc/usbmount/usbmount.d/00_remove_model_symlink + $(TARGET_DIR)/etc/usbmount/umount.d/00_remove_model_symlink $(INSTALL) -m 0644 -D $(@D)/usbmount.rules $(TARGET_DIR)/lib/udev/rules.d/usbmount.rules @if [ ! -f $(TARGET_DIR)/etc/usbmount/usbmount.conf ]; then \ $(INSTALL) -m 0644 -D $(@D)/usbmount.conf $(TARGET_DIR)/etc/usbmount/usbmount.conf; \ fi + + mkdir -p $(addprefix $(TARGET_DIR)/media/usb,0 1 2 3 4 5 6 7) endef define USBMOUNT_UNINSTALL_TARGET_CMDS - rm -rf $(TARGET_DIR)/etc/usbmount.d \ - $(TARGET_DIR)/etc/usbmount.conf \ + rm -rf $(TARGET_DIR)/etc/usbmount \ $(TARGET_DIR)/usr/share/usbmount/usbmount \ - $(TARGET_DIR)/lib/udev/rules.d/usbmount.rules + $(TARGET_DIR)/lib/udev/rules.d/usbmount.rules \ + $(TARGET_DIR)/media/usb? endef -$(eval $(call GENTARGETS,package,usbmount)) +$(eval $(generic-package)) diff --git a/package/usbredir/Config.in b/package/usbredir/Config.in new file mode 100644 index 0000000000..2157f9ce67 --- /dev/null +++ b/package/usbredir/Config.in @@ -0,0 +1,29 @@ +comment "usbredir needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_USBREDIR + bool "usbredir" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_LIBUSB + help + usbredir is the name of a network protocol for sending usb device + traffic over a network connection. It is also the name of the + software package offering a parsing library, a usbredirhost library + and several utilities implementing this protocol. + + Note: only the library is installed, not the utilities. Say 'y' + below if you want the server too. + + http://www.spice-space.org/page/UsbRedir + +if BR2_PACKAGE_USBREDIR + +config BR2_PACKAGE_USBREDIR_SERVER + bool "usbredirserver on target" + help + If you want to serve usbredir requests on your target, say 'y' + here to have the usbredir server on the target. + + Note: the server is not required to use the library. + +endif diff --git a/package/usbredir/usbredir.mk b/package/usbredir/usbredir.mk new file mode 100644 index 0000000000..ad593a4d92 --- /dev/null +++ b/package/usbredir/usbredir.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# usbredir +# +################################################################################ + +USBREDIR_VERSION = 0.6 +USBREDIR_SOURCE = usbredir-$(USBREDIR_VERSION).tar.bz2 +USBREDIR_SITE = http://spice-space.org/download/usbredir +USBREDIR_LICENSE = LGPLv2.1+ +USBREDIR_LICENSE_FILES = COPYING.LIB +USBREDIR_INSTALL_STAGING = YES +USBREDIR_DEPENDENCIES = host-pkgconf libusb + +ifeq ($(BR2_PACKAGE_USBREDIR_SERVER),y) + +USBREDIR_LICENSE += (for the library), GPLv2+ (for the server) +USBREDIR_LICENSE_FILES += COPYING + +else # BR2_PACKAGE_USBREDIR_SERVER != y + +define USBREDIR_POST_INSTALL_TARGET_RM_SERVER + rm -f $(TARGET_DIR)/usr/sbin/usbredirserver +endef +USBREDIR_POST_INSTALL_TARGET_HOOKS += USBREDIR_POST_INSTALL_TARGET_RM_SERVER + +endif # BR2_PACKAGE_USBREDIR_SERVER + +$(eval $(autotools-package)) diff --git a/package/usbutils/Config.in b/package/usbutils/Config.in index 0aabc4ab3b..8f0b8f593f 100644 --- a/package/usbutils/Config.in +++ b/package/usbutils/Config.in @@ -1,11 +1,7 @@ -comment "usbutils requires a toolchain with PROGRAM_INVOCATION support" - depends on !BR2_PROGRAM_INVOCATION - config BR2_PACKAGE_USBUTILS bool "usbutils" - depends on BR2_PROGRAM_INVOCATION + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb select BR2_PACKAGE_LIBUSB - select BR2_PACKAGE_LIBUSB_COMPAT help USB enumeration utilities @@ -20,3 +16,6 @@ config BR2_PACKAGE_USBUTILS_ZLIB This makes the data file smaller if you're not using a compressed filesystem, but it also makes lsusb slower since it has to decompress the file every time it's run. + +comment "usbutils needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/usbutils/usbutils.mk b/package/usbutils/usbutils.mk index 46c889eff3..a821da65f3 100644 --- a/package/usbutils/usbutils.mk +++ b/package/usbutils/usbutils.mk @@ -1,12 +1,16 @@ -############################################################# +################################################################################ # # usbutils # -############################################################# +################################################################################ -USBUTILS_VERSION = 0.91 +USBUTILS_VERSION = 007 +USBUTILS_SOURCE = usbutils-$(USBUTILS_VERSION).tar.xz USBUTILS_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/usb/usbutils -USBUTILS_DEPENDENCIES = host-pkg-config libusb-compat +USBUTILS_DEPENDENCIES = host-pkgconf libusb +USBUTILS_INSTALL_STAGING = YES +USBUTILS_LICENSE = GPLv2+ +USBUTILS_LICENSE_FILES = COPYING ifeq ($(BR2_PACKAGE_USBUTILS_ZLIB),y) USBUTILS_DEPENDENCIES += zlib @@ -14,6 +18,20 @@ else USBUTILS_CONF_OPT = --disable-zlib endif +# Build after busybox since it's got a lightweight lsusb +ifeq ($(BR2_PACKAGE_BUSYBOX),y) + USBUTILS_DEPENDENCIES += busybox +endif + +# Nice lsusb.py script only if there's python +ifeq ($(BR2_PACKAGE_PYTHON),) +define USBUTILS_REMOVE_PYTHON + rm -f $(TARGET_DIR)/usr/bin/lsusb.py +endef + +USBUTILS_POST_INSTALL_TARGET_HOOKS += USBUTILS_REMOVE_PYTHON +endif + define USBUTILS_TARGET_CLEANUP rm -f $(TARGET_DIR)/usr/bin/usb-devices rm -f $(TARGET_DIR)/usr/sbin/update-usbids.sh @@ -40,8 +58,6 @@ define USBUTILS_REMOVE_DEVFILES rm -f $(TARGET_DIR)/usr/bin/libusb-config endef -ifneq ($(BR2_HAVE_DEVFILES),y) USBUTILS_POST_INSTALL_TARGET_HOOKS += USBUTILS_REMOVE_DEVFILES -endif -$(eval $(call AUTOTARGETS,package,usbutils)) +$(eval $(autotools-package)) diff --git a/package/ushare/Config.in b/package/ushare/Config.in new file mode 100644 index 0000000000..981f0812d1 --- /dev/null +++ b/package/ushare/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_USHARE + bool "ushare" + depends on BR2_LARGEFILE + depends on BR2_TOOLCHAIN_HAS_THREADS # libupnp + select BR2_PACKAGE_LIBUPNP + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + uShare is a UPnP (TM) A/V & DLNA Media Server. + It implements the server component that provides UPnP media devices + with information on available multimedia files. + + http://ushare.geexbox.org/ + +comment "ushare needs a toolchain w/ largefile, threads" + depends on !(BR2_LARGEFILE && BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/ushare/ushare-compile-fixes.patch b/package/ushare/ushare-compile-fixes.patch new file mode 100644 index 0000000000..cfdf5e3404 --- /dev/null +++ b/package/ushare/ushare-compile-fixes.patch @@ -0,0 +1,206 @@ +Patch nixed from OpenWRT svn to fix build breakage. + +Signed-off-by: Gustavo Zacarias + +--- a/src/cds.c ++++ b/src/cds.c +@@ -20,6 +20,8 @@ + */ + + #include ++#include ++#include + #include + #include + +--- a/src/http.c ++++ b/src/http.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -77,8 +78,7 @@ set_info_file (struct File_Info *info, c + info->content_type = ixmlCloneDOMString (content_type); + } + +-static int +-http_get_info (const char *filename, struct File_Info *info) ++int http_get_info (const char *filename, struct File_Info *info) + { + extern struct ushare_t *ut; + struct upnp_entry_t *entry = NULL; +@@ -197,8 +197,7 @@ get_file_memory (const char *fullpath, c + return ((UpnpWebFileHandle) file); + } + +-static UpnpWebFileHandle +-http_open (const char *filename, enum UpnpOpenFileMode mode) ++UpnpWebFileHandle http_open (const char *filename, enum UpnpOpenFileMode mode) + { + extern struct ushare_t *ut; + struct upnp_entry_t *entry = NULL; +@@ -251,8 +250,7 @@ http_open (const char *filename, enum Up + return ((UpnpWebFileHandle) file); + } + +-static int +-http_read (UpnpWebFileHandle fh, char *buf, size_t buflen) ++int http_read (UpnpWebFileHandle fh, char *buf, size_t buflen) + { + struct web_file_t *file = (struct web_file_t *) fh; + ssize_t len = -1; +@@ -286,8 +284,7 @@ http_read (UpnpWebFileHandle fh, char *b + return len; + } + +-static int +-http_write (UpnpWebFileHandle fh __attribute__((unused)), ++int http_write (UpnpWebFileHandle fh __attribute__((unused)), + char *buf __attribute__((unused)), + size_t buflen __attribute__((unused))) + { +@@ -296,8 +293,7 @@ http_write (UpnpWebFileHandle fh __attri + return 0; + } + +-static int +-http_seek (UpnpWebFileHandle fh, off_t offset, int origin) ++int http_seek (UpnpWebFileHandle fh, off_t offset, int origin) + { + struct web_file_t *file = (struct web_file_t *) fh; + off_t newpos = -1; +@@ -371,8 +367,7 @@ http_seek (UpnpWebFileHandle fh, off_t o + return 0; + } + +-static int +-http_close (UpnpWebFileHandle fh) ++int http_close (UpnpWebFileHandle fh) + { + struct web_file_t *file = (struct web_file_t *) fh; + +@@ -402,13 +397,3 @@ http_close (UpnpWebFileHandle fh) + + return 0; + } +- +-struct UpnpVirtualDirCallbacks virtual_dir_callbacks = +- { +- http_get_info, +- http_open, +- http_read, +- http_write, +- http_seek, +- http_close +- }; +--- a/src/http.h ++++ b/src/http.h +@@ -25,6 +25,18 @@ + #include + #include + +-struct UpnpVirtualDirCallbacks virtual_dir_callbacks; ++int http_get_info (const char *filename, struct File_Info *info); ++ ++UpnpWebFileHandle http_open (const char *filename, enum UpnpOpenFileMode mode); ++ ++int http_read (UpnpWebFileHandle fh, char *buf, size_t buflen); ++ ++int http_seek (UpnpWebFileHandle fh, off_t offset, int origin); ++ ++int http_write (UpnpWebFileHandle fh __attribute__((unused)), ++ char *buf __attribute__((unused)), ++ size_t buflen __attribute__((unused))); ++ ++int http_close (UpnpWebFileHandle fh); + + #endif /* _HTTP_H_ */ +--- a/src/ushare.c ++++ b/src/ushare.c +@@ -188,7 +188,7 @@ handle_action_request (struct Upnp_Actio + if (strcmp (request->DevUDN + 5, ut->udn)) + return; + +- ip = request->CtrlPtIPAddr.s_addr; ++ ip = (*(struct sockaddr_in *)&request->CtrlPtIPAddr).sin_addr.s_addr; + ip = ntohl (ip); + sprintf (val, "%d.%d.%d.%d", + (ip >> 24) & 0xFF, (ip >> 16) & 0xFF, (ip >> 8) & 0xFF, ip & 0xFF); +@@ -348,13 +348,23 @@ init_upnp (struct ushare_t *ut) + + UpnpEnableWebserver (TRUE); + +- res = UpnpSetVirtualDirCallbacks (&virtual_dir_callbacks); +- if (res != UPNP_E_SUCCESS) +- { +- log_error (_("Cannot set virtual directory callbacks\n")); +- free (description); +- return -1; +- } ++#define upnp_set_callback(cb, func) \ ++ do { \ ++ res = UpnpVirtualDir_set_##cb##Callback(func); \ ++ if (res != UPNP_E_SUCCESS) \ ++ { \ ++ log_error (_("Cannot set virtual directory callbacks\n")); \ ++ free (description); \ ++ return -1; \ ++ } \ ++ } while(0) ++ ++ upnp_set_callback(GetInfo, http_get_info); ++ upnp_set_callback(Open, http_open); ++ upnp_set_callback(Read, http_read); ++ upnp_set_callback(Seek, http_seek); ++ upnp_set_callback(Write, http_write); ++ upnp_set_callback(Close, http_close); + + res = UpnpAddVirtualDir (VIRTUAL_DIR); + if (res != UPNP_E_SUCCESS) +--- a/src/cms.c ++++ b/src/cms.c +@@ -20,6 +20,8 @@ + */ + + #include ++#include ++#include + #include + #include + +--- a/src/mime.c ++++ b/src/mime.c +@@ -20,6 +20,7 @@ + */ + + #include ++#include + #include + + #include "mime.h" +--- a/src/presentation.c ++++ b/src/presentation.c +@@ -19,6 +19,8 @@ + */ + + #include ++#include ++#include + + #if HAVE_LANGINFO_CODESET + # include +--- a/src/services.c ++++ b/src/services.c +@@ -20,6 +20,8 @@ + */ + + #include ++#include ++#include + #include + #include + diff --git a/package/ushare/ushare.mk b/package/ushare/ushare.mk new file mode 100644 index 0000000000..25f880c35f --- /dev/null +++ b/package/ushare/ushare.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# ushare +# +################################################################################ + +USHARE_VERSION = 1.1a +USHARE_SOURCE = ushare-$(USHARE_VERSION).tar.bz2 +USHARE_SITE = http://ushare.geexbox.org/releases +USHARE_DEPENDENCIES = host-pkgconf libupnp +USHARE_LICENSE = GPLv2+ +USHARE_LICENSE_FILES = COPYING + +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) +USHARE_DEPENDENCIES += gettext +USHARE_LDFLAGS += -lintl +endif + +define USHARE_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + ./configure --prefix=/usr $(DISABLE_NLS) --cross-compile \ + --cross-prefix="$(TARGET_CROSS)" --sysconfdir=/etc \ + --disable-strip \ + ) +endef + +define USHARE_BUILD_CMDS + $(MAKE) LDFLAGS="$(TARGET_LDFLAGS) $(USHARE_LDFLAGS)" -C $(@D) +endef + +define USHARE_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install + rm -f $(TARGET_DIR)/etc/init.d/ushare +endef + +# Even though configure is called it's not autoconf +$(eval $(generic-package)) diff --git a/package/ussp-push/Config.in b/package/ussp-push/Config.in new file mode 100644 index 0000000000..4a79779dd0 --- /dev/null +++ b/package/ussp-push/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_USSP_PUSH + bool "ussp-push" + depends on BR2_INET_IPV6 + depends on !BR2_avr32 + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, alsa-lib, libglib2 + depends on BR2_USE_MMU # dbus + select BR2_PACKAGE_OPENOBEX + select BR2_PACKAGE_OPENOBEX_BLUEZ + select BR2_PACKAGE_BLUEZ_UTILS + help + ussp-push is an OBEX object pusher for Linux, using the BlueZ + BlueTooth stack. + + http://www.xmailserver.org/ussp-push.html + +comment "ussp-push needs a toolchain w/ wchar, IPv6, threads" + depends on !BR2_avr32 && BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INET_IPV6 diff --git a/package/ussp-push/ussp-push-fix-build-against-bluez-4.patch b/package/ussp-push/ussp-push-fix-build-against-bluez-4.patch new file mode 100644 index 0000000000..0694bfbadd --- /dev/null +++ b/package/ussp-push/ussp-push-fix-build-against-bluez-4.patch @@ -0,0 +1,15 @@ +Fix build against bluez4. + +Signed-off-by: Samuel Martin + +--- ussp-push-0.11.orig/src/obex_socket.c 2012-11-01 09:58:51.049538708 +0100 ++++ ussp-push-0.11/src/obex_socket.c 2012-11-01 12:10:10.719506951 +0100 +@@ -197,7 +197,7 @@ static int bt_sock_name2bth(int devid, c + for (i = 0; i < niinf; i++) { + char devname[128]; + +- if (hci_remote_name(dd, &piinf[i].bdaddr, sizeof(devname) - 1, ++ if (hci_read_remote_name(dd, &piinf[i].bdaddr, sizeof(devname) - 1, + devname, 100000) >= 0) { + if (strcasecmp(devname, btname) == 0) { + *btaddr = piinf[i].bdaddr; diff --git a/package/ussp-push/ussp-push.mk b/package/ussp-push/ussp-push.mk new file mode 100644 index 0000000000..c3d11f97bf --- /dev/null +++ b/package/ussp-push/ussp-push.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# ussp-push +# +################################################################################ + +USSP_PUSH_VERSION = 0.11 +USSP_PUSH_SITE = http://www.xmailserver.org +USSP_PUSH_LICENSE = GPLv2+ +USSP_PUSH_LICENSE_FILES = COPYING + +USSP_PUSH_DEPENDENCIES = bluez_utils openobex + +$(eval $(autotools-package)) diff --git a/package/util-linux/Config.in b/package/util-linux/Config.in index c91f69dc94..8c8fd7ab5c 100644 --- a/package/util-linux/Config.in +++ b/package/util-linux/Config.in @@ -2,8 +2,9 @@ config BR2_PACKAGE_UTIL_LINUX bool "util-linux" depends on BR2_LARGEFILE depends on BR2_USE_WCHAR + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE help - Various useful/essential Linux utilities. + Various useful/essential linux libraries and utilities. Things like mkfs, mkswap, swapon, fdisk, mount, dmesg, etc... @@ -11,98 +12,168 @@ config BR2_PACKAGE_UTIL_LINUX if BR2_PACKAGE_UTIL_LINUX -############################################ -# default enabled and should be disabled by -# --disable-foo -# - -config BR2_PACKAGE_UTIL_LINUX_MOUNT - bool "build mount utilties" - select BR2_PACKAGE_UTIL_LINUX_LIBBLKID - -config BR2_PACKAGE_UTIL_LINUX_FSCK - select BR2_PACKAGE_UTIL_LINUX_LIBBLKID - bool "build \"fsck\"" +config BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + bool "libblkid" + help + Install libblkid. config BR2_PACKAGE_UTIL_LINUX_LIBMOUNT select BR2_PACKAGE_UTIL_LINUX_LIBBLKID - bool "build libmount" + # libc lacks UTIME_NOW & UTIME_COMMIT + depends on !(BR2_microblazeel || BR2_microblazebe) + bool "libmount" + help + Install libmount. config BR2_PACKAGE_UTIL_LINUX_LIBUUID - bool "build libuuid and uuid utilities" - default y - -config BR2_PACKAGE_UTIL_LINUX_UUIDD - bool "build \"uuidd\"" + bool "libuuid" + help + Install libuuid. -config BR2_PACKAGE_UTIL_LINUX_LIBBLKID +config BR2_PACKAGE_UTIL_LINUX_BINARIES + bool "install utilities" + depends on BR2_USE_MMU # fork() + # libc lacks UTIME_NOW & UTIME_COMMIT for libmount + depends on !(BR2_microblazeel || BR2_microblazebe) + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT select BR2_PACKAGE_UTIL_LINUX_LIBUUID - bool "build libblkid and blkid utilities" - default y + help + Install the basic set of util-linux binaries. + +if BR2_PACKAGE_UTIL_LINUX_BINARIES config BR2_PACKAGE_UTIL_LINUX_AGETTY - bool "build \"agetty\"" + bool "agetty" + help + Alternative linux getty + +config BR2_PACKAGE_UTIL_LINUX_ARCH + bool "arch" + help + Print machine architecture config BR2_PACKAGE_UTIL_LINUX_CRAMFS - bool "build \"fsck.cramfs, mkfs.cramfs\"" + bool "cramfs utilities" + select BR2_PACKAGE_ZLIB + help + Build fsck.cramfs and mkfs.cramfs -config BR2_PACKAGE_UTIL_LINUX_SWITCH_ROOT - bool "build \"switch_root\"" +config BR2_PACKAGE_UTIL_LINUX_DDATE + bool "ddate" + help + Convert Gregorian dates to Discordian dates -config BR2_PACKAGE_UTIL_LINUX_PIVOT_ROOT - bool "build \"pivot_root\"" +config BR2_PACKAGE_UTIL_LINUX_EJECT + bool "eject" + help + Eject removable media config BR2_PACKAGE_UTIL_LINUX_FALLOCATE - bool "build \"fallocate\"" + bool "fallocate" + depends on !BR2_avr32 # fallocate not implemented + help + Preallocate space to a file -config BR2_PACKAGE_UTIL_LINUX_UNSHARE - bool "build \"unshare\"" +config BR2_PACKAGE_UTIL_LINUX_FSCK + bool "fsck" + help + Check and repair a linux filesystem -config BR2_PACKAGE_UTIL_LINUX_RENAME - bool "build \"rename\"" +config BR2_PACKAGE_UTIL_LINUX_KILL + bool "kill" + help + Send a signal to a process -config BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS - bool "build \"chrt, ionice, teskset\"" +config BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS + bool "login utilities" + depends on BR2_ENABLE_LOCALE # linux-pam + select BR2_PACKAGE_LINUX_PAM + help + Build login utilities (last, login, su, sulogin) -config BR2_PACKAGE_UTIL_LINUX_WALL - bool "build \"wall\"" +comment "login utilities needs a toolchain w/ locale" + depends on !BR2_ENABLE_LOCALE + +config BR2_PACKAGE_UTIL_LINUX_MESG + bool "mesg" + help + Control write access to your terminal + +config BR2_PACKAGE_UTIL_LINUX_MOUNT + bool "mount/umount" + help + Mount/unmount filesystems + +config BR2_PACKAGE_UTIL_LINUX_PIVOT_ROOT + bool "pivot_root" + help + Change the root filesystem config BR2_PACKAGE_UTIL_LINUX_PARTX - bool "build \"addpart, delpart, partx\"" - select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + bool "partition utilities" + help + Partition tools (addpart, delpart, partx) -############################################ -# default disabled and should be enabled by -# --enable-foo -# -config BR2_PACKAGE_UTIL_LINUX_ARCH - bool "build \"arch\"" +config BR2_PACKAGE_UTIL_LINUX_RAW + bool "raw" + help + Build a linux raw character device -config BR2_PACKAGE_UTIL_LINUX_INIT - bool "build \"simpleinit, shutdown, initctl\"" +config BR2_PACKAGE_UTIL_LINUX_RENAME + bool "rename" + help + Rename files -config BR2_PACKAGE_UTIL_LINUX_KILL - bool "build \"kill\"" +config BR2_PACKAGE_UTIL_LINUX_RESET + bool "reset" + help + Reset the terminal + +config BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS + bool "schedutils" + help + Scheduling utilities (chrt, ionice, taskset) -config BR2_PACKAGE_UTIL_LINUX_LAST - bool "build \"last\"" +config BR2_PACKAGE_UTIL_LINUX_SWITCH_ROOT + bool "switch_root" + help + Switch to another filesystem as the root of the mount tree -config BR2_PACKAGE_UTIL_LINUX_MESG - bool "build \"mesg\"" +config BR2_PACKAGE_UTIL_LINUX_UNSHARE + bool "unshare" + help + Run program with some namespaces unshared from parent -config BR2_PACKAGE_UTIL_LINUX_RAW - bool "build \"raw\"" +config BR2_PACKAGE_UTIL_LINUX_UTMPDUMP + bool "utmpdump" + help + Dump UTMP and WTMP files in raw format -config BR2_PACKAGE_UTIL_LINUX_RESET - bool "build \"reset\"" +config BR2_PACKAGE_UTIL_LINUX_UUIDD + bool "uuidd" + help + UUID generation daemon -config BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS - bool "build \"chfn, chsh, login, newgrp, vipw\"" +config BR2_PACKAGE_UTIL_LINUX_WALL + bool "wall" + help + Send a message to everybody's terminal + +config BR2_PACKAGE_WDCTL + bool "wdctl" + help + Shows hardware watchdog status config BR2_PACKAGE_UTIL_LINUX_WRITE - bool "build \"write\"" + bool "write" + help + Send a message to another user + +endif endif -comment "util-linux requires a toolchain with LARGEFILE + WCHAR support" - depends on !(BR2_LARGEFILE && BR2_USE_WCHAR) \ No newline at end of file +comment "util-linux needs a toolchain w/ largefile, wchar" + depends on !(BR2_LARGEFILE && BR2_USE_WCHAR) diff --git a/package/util-linux/util-linux-001-sscanf-no-ms-as.patch b/package/util-linux/util-linux-001-sscanf-no-ms-as.patch new file mode 100644 index 0000000000..c95b7553e0 --- /dev/null +++ b/package/util-linux/util-linux-001-sscanf-no-ms-as.patch @@ -0,0 +1,136 @@ +Fix libmount build under uClibc + +See https://bugs.gentoo.org/show_bug.cgi?id=406303 +http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-apps/util-linux/files/util-linux-2.21.1-no-printf-alloc.patch?revision=1.2 +ported to util-linux-2.23.2 + +--- a/configure.ac 2013-07-30 03:39:26.188738061 -0500 ++++ b/configure.ac 2013-09-05 15:31:11.460864363 -0500 +@@ -755,7 +755,6 @@ + UL_BUILD_INIT([libmount]) + UL_REQUIRES_LINUX([libmount]) + UL_REQUIRES_BUILD([libmount], [libblkid]) +-UL_REQUIRES_HAVE([libmount], [scanf_alloc_modifier], [scanf string alloc modifier]) + AM_CONDITIONAL(BUILD_LIBMOUNT, test "x$build_libmount" = xyes) + AM_CONDITIONAL(BUILD_LIBMOUNT_TESTS, test "x$build_libmount" = xyes -a "x$enable_static" = xyes) + +--- a/libmount/src/tab_parse.c 2013-07-30 03:39:26.218738358 -0500 ++++ b/libmount/src/tab_parse.c 2013-09-05 15:31:11.460864363 -0500 +@@ -22,6 +22,10 @@ + #include "pathnames.h" + #include "strutils.h" + ++#ifndef HAVE_SCANF_MS_MODIFIER ++# define UL_SCNsA "%s" ++#endif ++ + static inline char *skip_spaces(char *s) + { + assert(s); +@@ -61,16 +65,31 @@ + int rc, n = 0, xrc; + char *src = NULL, *fstype = NULL, *optstr = NULL; + ++#ifndef HAVE_SCANF_MS_MODIFIER ++ size_t len = strlen(s) + 1; ++ src = malloc(len); ++ fstype = malloc(len); ++ fs->target = malloc(len); ++ optstr = malloc(len); ++#endif ++ + rc = sscanf(s, UL_SCNsA" " /* (1) source */ + UL_SCNsA" " /* (2) target */ + UL_SCNsA" " /* (3) FS type */ + UL_SCNsA" " /* (4) options */ + "%n", /* byte count */ + ++#ifdef HAVE_SCANF_MS_MODIFIER + &src, + &fs->target, + &fstype, + &optstr, ++#else ++ src, ++ fs->target, ++ fstype, ++ optstr, ++#endif + &n); + xrc = rc; + +@@ -136,6 +155,16 @@ + unsigned int maj, min; + char *fstype = NULL, *src = NULL, *p; + ++#ifndef HAVE_SCANF_MS_MODIFIER ++ size_t len = strlen(s) + 1; ++ fs->root = malloc(len); ++ fs->target = malloc(len); ++ fs->vfs_optstr = malloc(len); ++ fs->fs_optstr = malloc(len); ++ fstype = malloc(len); ++ src = malloc(len); ++#endif ++ + rc = sscanf(s, "%u " /* (1) id */ + "%u " /* (2) parent */ + "%u:%u " /* (3) maj:min */ +@@ -147,9 +176,15 @@ + &fs->id, + &fs->parent, + &maj, &min, ++#ifdef HAVE_SCANF_MS_MODIFIER + &fs->root, + &fs->target, + &fs->vfs_optstr, ++#else ++ fs->root, ++ fs->target, ++ fs->vfs_optstr, ++#endif + &end); + + if (rc >= 7 && end > 0) +@@ -169,9 +204,15 @@ + UL_SCNsA" " /* (9) source */ + UL_SCNsA, /* (10) fs options (fs specific) */ + ++#ifdef HAVE_SCANF_MS_MODIFIER + &fstype, + &src, + &fs->fs_optstr); ++#else ++ fstype, ++ src, ++ fs->fs_optstr); ++#endif + + if (rc >= 10) { + fs->flags |= MNT_FS_KERNEL; +@@ -279,14 +320,25 @@ + int rc; + char *src = NULL; + ++#ifndef HAVE_SCANF_MS_MODIFIER ++ size_t len = strlen(s) + 1; ++ src = malloc(len); ++ fs->swaptype = malloc(len); ++#endif ++ + rc = sscanf(s, UL_SCNsA" " /* (1) source */ + UL_SCNsA" " /* (2) type */ + "%jd" /* (3) size */ + "%jd" /* (4) used */ + "%d", /* priority */ + ++#ifdef HAVE_SCANF_MS_MODIFIER + &src, + &fs->swaptype, ++#else ++ src, ++ fs->swaptype, ++#endif + &fsz, + &usz, + &fs->priority); diff --git a/package/util-linux/util-linux-002-support-older-machines.patch b/package/util-linux/util-linux-002-support-older-machines.patch new file mode 100644 index 0000000000..5736a9808d --- /dev/null +++ b/package/util-linux/util-linux-002-support-older-machines.patch @@ -0,0 +1,208 @@ +This patch was adopted from +http://git.yoctoproject.org/cgit.cgi/poky/plain/meta/recipes-core/util-linux/util-linux/util-linux-native.patch + +Support older hosts with latest util-linux-native + +mkostemp is not defined on older machines. So we detect this and +provide a define that uses mkstemp instead. + +O_CLOEXEC is not defined on older machines. It is however defined +in the 'c.h' header. Fix up the users to include 'c.h'. + +fdisks/fdisksunlabel.c was modified to use qsort_r, however +this is not defined on older hosts. Revert: + commit c69bbca9c1f6645097bd20fe3a21f5a99a2a0698 + fdisk: (sun): use ask API, remove global variable + +Upstream-Status: Inappropriate [other] +Patches revert upstream changes in order to support older +machines. + +Signed-off-by: Mark Hatle + +--- a/configure.ac 2013-09-05 15:31:11.460864363 -0500 ++++ b/configure.ac 2013-09-05 15:31:21.590981268 -0500 +@@ -323,6 +323,7 @@ + llseek \ + lseek64 \ + mempcpy \ ++ mkostemp \ + nanosleep \ + personality \ + posix_fadvise \ +--- a/include/c.h 2013-07-30 03:39:26.200738180 -0500 ++++ b/include/c.h 2013-09-05 15:31:21.590981268 -0500 +@@ -236,6 +236,13 @@ + #endif + + /* ++ * mkostemp replacement ++ */ ++#ifndef HAVE_MKOSTEMP ++#define mkostemp(template, flags) mkstemp(template) ++#endif ++ ++/* + * MAXHOSTNAMELEN replacement + */ + static inline size_t get_hostname_max(void) +--- a/lib/randutils.c 2013-06-13 02:46:10.408650519 -0500 ++++ b/lib/randutils.c 2013-09-05 15:31:21.650099925 -0500 +@@ -16,6 +16,7 @@ + #include + + #include "randutils.h" ++#include "c.h" + + #ifdef HAVE_TLS + #define THREAD_LOCAL static __thread +--- a/lib/wholedisk.c 2013-06-13 02:46:10.411650545 -0500 ++++ b/lib/wholedisk.c 2013-09-05 15:31:21.650099925 -0500 +@@ -10,6 +10,7 @@ + + #include "blkdev.h" + #include "wholedisk.h" ++#include "c.h" + + int is_whole_disk_fd(int fd, const char *name) + { +--- a/fdisks/fdisksunlabel.c 2013-07-30 03:39:26.197738150 -0500 ++++ b/fdisks/fdisksunlabel.c 2013-09-05 15:31:21.650099925 -0500 +@@ -383,10 +383,10 @@ + } + } + +-static int verify_sun_cmp(int *a, int *b, void *data) +-{ +- unsigned int *verify_sun_starts = (unsigned int *) data; ++static unsigned int *verify_sun_starts; + ++static int verify_sun_cmp(int *a, int *b) ++{ + if (*a == -1) + return 1; + if (*b == -1) +@@ -401,7 +401,6 @@ + uint32_t starts[SUN_MAXPARTITIONS], lens[SUN_MAXPARTITIONS], start, stop; + uint32_t i,j,k,starto,endo; + int array[SUN_MAXPARTITIONS]; +- unsigned int *verify_sun_starts; + + assert(cxt); + assert(cxt->label); +@@ -442,16 +441,14 @@ + } + } + } +- + for (i = 0; i < SUN_MAXPARTITIONS; i++) { + if (lens[i]) + array[i] = i; + else + array[i] = -1; + } +- qsort_r(array,ARRAY_SIZE(array),sizeof(array[0]), +- (int (*)(const void *,const void *,void *)) verify_sun_cmp, +- verify_sun_starts); ++ qsort(array,ARRAY_SIZE(array),sizeof(array[0]), ++ (int (*)(const void *,const void *)) verify_sun_cmp); + + if (array[0] == -1) { + fdisk_info(cxt, _("No partitions defined")); +@@ -468,6 +465,7 @@ + start = (starts[array[i]] + lens[array[i]]); + if (start < stop) + fdisk_warnx(cxt, _("Unused gap - sectors %d-%d"), start, stop); ++ + return 0; + } + +@@ -746,18 +744,12 @@ + } + } + +- + void fdisk_sun_set_alt_cyl(struct fdisk_context *cxt) + { + struct sun_disklabel *sunlabel = self_disklabel(cxt); +- uintmax_t res; +- int rc = fdisk_ask_number(cxt, 0, /* low */ +- be16_to_cpu(sunlabel->acyl), /* default */ +- 65535, /* high */ +- _("Number of alternate cylinders"), /* query */ +- &res); /* result */ +- if (!rc) +- sunlabel->acyl = cpu_to_be16(res); ++ sunlabel->acyl = ++ cpu_to_be16(read_int(cxt, 0, be16_to_cpu(sunlabel->acyl), 65535, 0, ++ _("Number of alternate cylinders"))); + } + + void fdisk_sun_set_ncyl(struct fdisk_context *cxt, int cyl) +@@ -769,54 +761,33 @@ + void fdisk_sun_set_xcyl(struct fdisk_context *cxt) + { + struct sun_disklabel *sunlabel = self_disklabel(cxt); +- uintmax_t res; +- int rc = fdisk_ask_number(cxt, 0, /* low */ +- be16_to_cpu(sunlabel->apc), /* default */ +- cxt->geom.sectors, /* high */ +- _("Extra sectors per cylinder"), /* query */ +- &res); /* result */ +- if (!rc) +- sunlabel->apc = cpu_to_be16(res); ++ sunlabel->apc = ++ cpu_to_be16(read_int(cxt, 0, be16_to_cpu(sunlabel->apc), cxt->geom.sectors, 0, ++ _("Extra sectors per cylinder"))); + } + + void fdisk_sun_set_ilfact(struct fdisk_context *cxt) + { + struct sun_disklabel *sunlabel = self_disklabel(cxt); +- uintmax_t res; +- int rc = fdisk_ask_number(cxt, 1, /* low */ +- be16_to_cpu(sunlabel->intrlv), /* default */ +- 32, /* high */ +- _("Interleave factor"), /* query */ +- &res); /* result */ +- if (!rc) +- sunlabel->intrlv = cpu_to_be16(res); ++ sunlabel->intrlv = ++ cpu_to_be16(read_int(cxt, 1, be16_to_cpu(sunlabel->intrlv), 32, 0, ++ _("Interleave factor"))); + } + + void fdisk_sun_set_rspeed(struct fdisk_context *cxt) + { + struct sun_disklabel *sunlabel = self_disklabel(cxt); +- uintmax_t res; +- int rc = fdisk_ask_number(cxt, 1, /* low */ +- be16_to_cpu(sunlabel->rpm), /* default */ +- USHRT_MAX, /* high */ +- _("Rotation speed (rpm)"), /* query */ +- &res); /* result */ +- if (!rc) +- sunlabel->rpm = cpu_to_be16(res); +- ++ sunlabel->rpm = ++ cpu_to_be16(read_int(cxt, 1, be16_to_cpu(sunlabel->rpm), 100000, 0, ++ _("Rotation speed (rpm)"))); + } + + void fdisk_sun_set_pcylcount(struct fdisk_context *cxt) + { + struct sun_disklabel *sunlabel = self_disklabel(cxt); +- uintmax_t res; +- int rc = fdisk_ask_number(cxt, 0, /* low */ +- be16_to_cpu(sunlabel->pcyl), /* default */ +- USHRT_MAX, /* high */ +- _("Number of physical cylinders"), /* query */ +- &res); /* result */ +- if (!rc) +- sunlabel->pcyl = cpu_to_be16(res); ++ sunlabel->pcyl = ++ cpu_to_be16(read_int(cxt, 0, be16_to_cpu(sunlabel->pcyl), 65535, 0, ++ _("Number of physical cylinders"))); + } + + static int sun_write_disklabel(struct fdisk_context *cxt) diff --git a/package/util-linux/util-linux-003-program-invocation-short-name.patch b/package/util-linux/util-linux-003-program-invocation-short-name.patch new file mode 100644 index 0000000000..95fea3f13d --- /dev/null +++ b/package/util-linux/util-linux-003-program-invocation-short-name.patch @@ -0,0 +1,11 @@ +--- a/configure.ac 2013-09-05 15:31:21.590981268 -0500 ++++ b/configure.ac 2013-09-05 15:31:29.160981049 -0500 +@@ -387,7 +387,7 @@ + + AC_MSG_CHECKING([whether program_invocation_short_name is defined]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +- #include ++ #include + ]], [[ + program_invocation_short_name = "test"; + ]])], [ diff --git a/package/util-linux/util-linux-2.20.1-sscanf-no-ms-as.patch b/package/util-linux/util-linux-2.20.1-sscanf-no-ms-as.patch deleted file mode 100644 index 5b0ac36463..0000000000 --- a/package/util-linux/util-linux-2.20.1-sscanf-no-ms-as.patch +++ /dev/null @@ -1,87 +0,0 @@ -[PATCH] Fix libmount build under uClibc - -Taken from gentoo-hardened: -http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=91879751 - -For details, see https://bugs.gentoo.org/show_bug.cgi?id=406303 - -Signed-off-by: Peter Korsgaard -diff -Naur util-linux-2.20.1.orig/libmount/src/tab_parse.c util-linux-2.20.1/libmount/src/tab_parse.c ---- util-linux-2.20.1.orig/libmount/src/tab_parse.c 2011-12-12 20:51:06.646614964 -0500 -+++ util-linux-2.20.1/libmount/src/tab_parse.c 2011-12-12 21:02:03.587865010 -0500 -@@ -51,19 +51,21 @@ - */ - static int mnt_parse_table_line(struct libmnt_fs *fs, char *s) - { -- int rc, n = 0; -- char *src, *fstype, *optstr; -- -- rc = sscanf(s, UL_SCNsA" " /* (1) source */ -- UL_SCNsA" " /* (2) target */ -- UL_SCNsA" " /* (3) FS type */ -- UL_SCNsA" " /* (4) options */ -+ int rc, n = 0, len = strlen (s) + 1; -+ char *src = malloc (sizeof *src * len); -+ char *fstype = malloc (sizeof *fstype * len); -+ char *optstr = malloc (sizeof *optstr * len); -+ -+ rc = sscanf(s, "%s"" " /* (1) source */ -+ "%s"" " /* (2) target */ -+ "%s"" " /* (3) FS type */ -+ "%s"" " /* (4) options */ - "%n", /* byte count */ - -- &src, -- &fs->target, -- &fstype, -- &optstr, -+ src, -+ fs->target, -+ fstype, -+ optstr, - &n); - - if (rc == 4) { -@@ -108,16 +110,20 @@ - */ - static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, char *s) - { -- int rc, end = 0; -+ int rc, end = 0, len = strlen (s) + 1; - unsigned int maj, min; - char *fstype, *src, *p; - -+ fs->root = malloc (sizeof *fs->root * len); -+ fs->target = malloc (sizeof *fs->target * len); -+ fs->vfs_optstr = malloc (sizeof *fs->vfs_optstr * len); -+ - rc = sscanf(s, "%u " /* (1) id */ - "%u " /* (2) parent */ - "%u:%u " /* (3) maj:min */ -- UL_SCNsA" " /* (4) mountroot */ -- UL_SCNsA" " /* (5) target */ -- UL_SCNsA /* (6) vfs options (fs-independent) */ -+ "%s"" " /* (4) mountroot */ -+ "%s"" " /* (5) target */ -+ "%s" /* (6) vfs options (fs-independent) */ - "%n", /* number of read bytes */ - - &fs->id, -@@ -139,9 +145,14 @@ - } - s = p + 3; - -- rc += sscanf(s, UL_SCNsA" " /* (8) FS type */ -- UL_SCNsA" " /* (9) source */ -- UL_SCNsA, /* (10) fs options (fs specific) */ -+ len = strlen (s) + 1; -+ fstype = malloc (sizeof *fstype * len); -+ src = malloc (sizeof *src * len); -+ fs->fs_optstr = malloc (sizeof *fs->fs_optstr * len); -+ -+ rc += sscanf(s, "%s"" " /* (8) FS type */ -+ "%s"" " /* (9) source */ -+ "%s", /* (10) fs options (fs specific) */ - - &fstype, - &src, diff --git a/package/util-linux/util-linux-uclibc-build-fix.patch b/package/util-linux/util-linux-uclibc-build-fix.patch deleted file mode 100644 index 5003d2152f..0000000000 --- a/package/util-linux/util-linux-uclibc-build-fix.patch +++ /dev/null @@ -1,15 +0,0 @@ -Signed-off-by: Khem Raj - -Index: util-linux-2.19.1/configure.ac -=================================================================== ---- util-linux-2.19.1.orig/configure.ac -+++ util-linux-2.19.1/configure.ac -@@ -250,7 +250,7 @@ esac - - - AC_MSG_CHECKING(whether program_invocation_short_name is defined) --AC_TRY_COMPILE([#include ], -+AC_TRY_COMPILE([#include ], - [program_invocation_short_name = "test";], - AC_DEFINE(HAVE_PROGRAM_INVOCATION_SHORT_NAME, 1, - [Define if program_invocation_short_name is defined]) diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk index bc3aa60fd6..84759dc00d 100644 --- a/package/util-linux/util-linux.mk +++ b/package/util-linux/util-linux.mk @@ -1,21 +1,27 @@ -############################################################# +################################################################################ # # util-linux # -############################################################# -UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).1 -UTIL_LINUX_VERSION_MAJOR = 2.20 -UTIL_LINUX_SOURCE = util-linux-$(UTIL_LINUX_VERSION).tar.bz2 +################################################################################ + +UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).2 +UTIL_LINUX_VERSION_MAJOR = 2.23 +UTIL_LINUX_SOURCE = util-linux-$(UTIL_LINUX_VERSION).tar.xz UTIL_LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/util-linux/v$(UTIL_LINUX_VERSION_MAJOR) + +# README.licensing claims that some files are GPLv2-only, but this is not true. +# Some files are GPLv3+ but only in tests. +UTIL_LINUX_LICENSE = GPLv2+, BSD-4c, libblkid and libmount LGPLv2.1+, libuuid BSD-3c +UTIL_LINUX_LICENSE_FILES = README.licensing Documentation/licenses/COPYING.GPLv2 Documentation/licenses/COPYING.UCB Documentation/licenses/COPYING.LGPLv2.1 Documentation/licenses/COPYING.BSD-3 + UTIL_LINUX_AUTORECONF = YES UTIL_LINUX_INSTALL_STAGING = YES -UTIL_LINUX_DEPENDENCIES = host-pkg-config +UTIL_LINUX_DEPENDENCIES = host-pkgconf UTIL_LINUX_CONF_ENV = scanf_cv_type_modifier=no - UTIL_LINUX_CONF_OPT += --disable-rpath --disable-makeinstall-chown # We don't want the host-busybox dependency to be added automatically -HOST_UTIL_LINUX_DEPENDENCIES = host-pkg-config +HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf # If both util-linux and busybox are selected, make certain util-linux # wins the fight over who gets to have their utils actually installed @@ -33,69 +39,80 @@ endef endif UTIL_LINUX_POST_INSTALL_TARGET_HOOKS += UTIL_LINUX_TARGET_HELPERS - ifeq ($(BR2_PACKAGE_NCURSES),y) UTIL_LINUX_DEPENDENCIES += ncurses else UTIL_LINUX_CONF_OPT += --without-ncurses endif -ifeq ($(BR2_PACKAGE_LIBINTL),y) -UTIL_LINUX_DEPENDENCIES += libintl +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) +UTIL_LINUX_DEPENDENCIES += gettext UTIL_LINUX_MAKE_OPT += LIBS=-lintl endif -############################################# -# -# disable default utilities -# -UTIL_LINUX_CONF_OPT += \ - $(if $(BR2_PACKAGE_UTIL_LINUX_MOUNT),,--disable-mount) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_FSCK),,--disable-fsck) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),,--disable-libmount) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_LIBUUID),,--disable-libuuid) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_UUIDD),,--disable-uuidd) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_LIBBLKID),,--disable-libblkid) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_AGETTY),,--disable-agetty) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_CRAMFS),,--disable-cramfs) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_SWITCH_ROOT),,--disable-switch_root) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_PIVOT_ROOT),,--disable-pivot_root) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_FALLOCATE),,--disable-fallocate) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_UNSHARE),,--disable-unshare) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_RENAME),,--disable-rename) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS),,--disable-schedutils) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_WALL),,--disable-wall) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_PARTX),,--disable-partx) +# Used by cramfs utils +UTIL_LINUX_DEPENDENCIES += $(if $(BR2_PACKAGE_ZLIB),zlib) -############################################# -# -# enable extra utilities -# +# Used by login-utils +UTIL_LINUX_DEPENDENCIES += $(if $(BR2_PACKAGE_LINUX_PAM),linux-pam) + +# Disable/Enable utilities UTIL_LINUX_CONF_OPT += \ - $(if $(BR2_PACKAGE_UTIL_LINUX_ARCH),--enable-arch) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_INIT),--enable-init) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_KILL),--enable-kill) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_LAST),--enable-last) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_MESG),--enable-mesg) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_RAW),--enable-raw) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_RESET),--enable-reset) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS),--enable-login-utils) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_WRITE),--enable-write) + $(if $(BR2_PACKAGE_UTIL_LINUX_AGETTY),--enable-agetty,--disable-agetty) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_ARCH),--enable-arch,--disable-arch) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_CRAMFS),--enable-cramfs,--disable-cramfs) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_DDATE),--enable-ddate,--disable-ddate) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_EJECT),--enable-eject,--disable-eject) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_FALLOCATE),--enable-fallocate,--disable-fallocate) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_FSCK),--enable-fsck,--disable-fsck) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_KILL),--enable-kill,--disable-kill) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LIBBLKID),--enable-libblkid,--disable-libblkid) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),--enable-libmount,--disable-libmount) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LIBUUID),--enable-libuuid,--disable-libuuid) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS),--enable-last --enable-login --enable-su --enable-sulogin,--disable-last --disable-login --disable-su --disable-sulogin) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_MESG),--enable-mesg,--disable-mesg) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_MOUNT),--enable-mount,--disable-mount) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_PARTX),,--disable-partx) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_PIVOT_ROOT),--enable-pivot_root,--disable-pivot_root) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_RAW),--enable-raw,--disable-raw) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_RENAME),--enable-rename,--disable-rename) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_RESET),--enable-reset,--disable-reset) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS),--enable-schedutils,--disable-schedutils) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_SWITCH_ROOT),--enable-switch_root,--disable-switch_root) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_UNSHARE),--enable-unshare,--disable-unshare) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_UTMPDUMP),--enable-utmpdump,--disable-utmpdump) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_UUIDD),--enable-uuidd,--disable-uuidd) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_WALL),--enable-wall,--disable-wall) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_WRITE),--enable-write,--disable-write) # In the host version of util-linux, we so far only require libuuid, # and none of the util-linux utilities, so we disable all of them. HOST_UTIL_LINUX_CONF_OPT += \ --enable-libuuid \ - --disable-mount --disable-fsck --disable-libmount \ - --disable-uuidd --disable-libblkid --disable-agetty \ - --disable-cramfs --disable-switch_root --disable-pivot_root \ - --disable-fallocate --disable-unshare --disable-rename \ - --disable-schedutils --disable-wall --disable-partx + --disable-agetty --disable-cramfs --disable-fallocate \ + --disable-fsck --disable-libblkid --disable-libmount \ + --disable-login --disable-mount --disable-partx \ + --disable-pivot_root --disable-rename --disable-schedutils \ + --disable-su --disable-switch_root --disable-unshare \ + --disable-uuidd --disable-wall --without-ncurses + +# Avoid building the tools if they are disabled since we can't install on +# a per-directory basis. +ifeq ($(BR2_PACKAGE_UTIL_LINUX_BINARIES),) +define UTIL_LINUX_DISABLE_TOOLS + $(SED) '/schedutils/d' -e '/text-utils/d' -e '/term-utils/d' \ + -e '/login-utils/d' -e '/mount-deprecated/d' \ + -e '/sys-utils/d' -e '/misc-utils/d' -e '/disk-utils/d' \ + -e '/fdisks/d' $(@D)/Makefile.am +endef +UTIL_LINUX_PRE_PATCH_HOOKS += UTIL_LINUX_DISABLE_TOOLS +endif -$(eval $(call AUTOTARGETS,package,util-linux)) -$(eval $(call AUTOTARGETS,package,util-linux,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) # MKINSTALLDIRS comes from tweaked m4/nls.m4, but autoreconf uses staging # one, so it disappears UTIL_LINUX_INSTALL_STAGING_OPT += MKINSTALLDIRS=$(@D)/config/mkinstalldirs UTIL_LINUX_INSTALL_TARGET_OPT += MKINSTALLDIRS=$(@D)/config/mkinstalldirs +HOST_UTIL_LINUX_INSTALL_OPT += MKINSTALLDIRS=$(@D)/config/mkinstalldirs diff --git a/package/ux500-firmware/Config.in b/package/ux500-firmware/Config.in new file mode 100644 index 0000000000..7e8a94b2a4 --- /dev/null +++ b/package/ux500-firmware/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_UX500_FIRMWARE + bool "ux500-firmware" + help + This package provides various binary firmware files (closed binary blobs) + for the Azurewave AW-NH580 combo module (wifi, bt, gps). + + https://launchpad.net/~igloocommunity-maintainers/+archive/snowball/+files/ diff --git a/package/ux500-firmware/ux500-firmware.mk b/package/ux500-firmware/ux500-firmware.mk new file mode 100644 index 0000000000..14b4a8e190 --- /dev/null +++ b/package/ux500-firmware/ux500-firmware.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# ux500-firmware +# +################################################################################ + +UX500_FIRMWARE_VERSION = 1.1.3-6 +UX500_FIRMWARE_SOURCE = ux500-firmware_$(UX500_FIRMWARE_VERSION)linaro1.tar.gz +UX500_FIRMWARE_SITE = https://launchpad.net/~igloocommunity-maintainers/+archive/snowball/+files/ +UX500_FIRMWARE_LICENSE = Snowball click-wrap license +UX500_FIRMWARE_LICENSE_FILES = license.txt +UX500_FIRMWARE_REDISTRIBUTE = NO + +# The CG2900 linux driver has to load firmware named CG29XX_* but the firmware +# filenames contained in this package are CG2900_* hence the code below +define UX500_FIRMWARE_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install + for f in $(TARGET_DIR)/lib/firmware/CG2900* ; do \ + mv $$f $${f/CG2900/CG29XX}; \ + done +endef + +$(eval $(generic-package)) diff --git a/package/vala/Config.in b/package/vala/Config.in new file mode 100644 index 0000000000..b9477bf9f1 --- /dev/null +++ b/package/vala/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_VALA + bool "vala" + # We no longer support a toolchain on the target + depends on BR2_DEPRECATED + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + Compiler for the GObject type system. + + http://live.gnome.org/Vala + +comment "vala needs a toolchain w/ wchar, threads" + depends on BR2_DEPRECATED + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/vala/vala-dont-add-dirty-to-valac-version.patch b/package/vala/vala-dont-add-dirty-to-valac-version.patch new file mode 100644 index 0000000000..a2a0623369 --- /dev/null +++ b/package/vala/vala-dont-add-dirty-to-valac-version.patch @@ -0,0 +1,25 @@ +valac: don't append -dirty to version + +Don't append -dirty to the valac version number if the Buildroot Git +tree has uncommited changes. + +The patched script is meant for the valac developers, but it also +activates if you build valac in a subdirectory of a Git tree (e.g. +as is commonly done in Buildroot). + +The effect is that valac gets built as being version x.y.z-dirty, which +breaks programs (such as Midori) that explicitly check for valac-x.y.z. + +Signed-off-by: Simon Dawson +diff -Nur a/build-aux/git-version-gen b/build-aux/git-version-gen +--- a/build-aux/git-version-gen 2010-08-15 12:49:03.000000000 +0100 ++++ b/build-aux/git-version-gen 2012-05-14 10:17:19.977204570 +0100 +@@ -135,7 +135,7 @@ + *) # Append the suffix only if there isn't one already. + case $v in + *-dirty) ;; +- *) v="$v-dirty" ;; ++ #*) v="$v-dirty" ;; + esac ;; + esac + diff --git a/package/vala/vala.mk b/package/vala/vala.mk new file mode 100644 index 0000000000..8dc887b317 --- /dev/null +++ b/package/vala/vala.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# vala +# +################################################################################ + +VALA_VERSION_MAJOR = 0.18 +VALA_VERSION_MINOR = 1 +VALA_VERSION = $(VALA_VERSION_MAJOR).$(VALA_VERSION_MINOR) +VALA_SITE = http://download.gnome.org/sources/vala/$(VALA_VERSION_MAJOR) +VALA_SOURCE = vala-$(VALA_VERSION).tar.xz +VALA_LICENSE = LGPLv2.1+ +VALA_LICENSE_FILES = COPYING + +VALA_DEPENDENCIES = host-flex host-bison libglib2 \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) + +# If we want the documentation, then xsltproc is needed. If we don't +# want the documentation, force Vala to not use the host xsltproc even +# if available, because it may or may not work with Vala documentation +# (some versions of xsltproc segfault) +ifeq ($(BR2_HAVE_DOCUMENTATION),y) +VALA_DEPENDENCIES += host-libxslt +else +VALA_CONF_ENV = ac_cv_path_XSLTPROC=: +endif + +HOST_VALA_DEPENDENCIES = host-flex host-libglib2 +# Yes, the autoconf script understands ':' as "xsltproc is not +# available". +HOST_VALA_CONF_ENV = ac_cv_path_XSLTPROC=: + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/valgrind/Config.in b/package/valgrind/Config.in index db1bc3b190..dacdd86554 100644 --- a/package/valgrind/Config.in +++ b/package/valgrind/Config.in @@ -1,7 +1,74 @@ config BR2_PACKAGE_VALGRIND bool "valgrind" - depends on BR2_i386 || BR2_x86_64 + depends on BR2_i386 || BR2_x86_64 || BR2_cortex_a8 || \ + BR2_cortex_a9 || BR2_powerpc help Tool for debugging and profiling Linux programs. http://valgrind.kde.org/ + +if BR2_PACKAGE_VALGRIND + +config BR2_PACKAGE_VALGRIND_MEMCHECK + bool "Memcheck: a memory error detector" + default y + help + This option allows to install the Memcheck tool + +config BR2_PACKAGE_VALGRIND_CACHEGRIND + bool "Cachegrind: a cache and branch-prediction profiler" + default y + help + This option allows to install the Cachegrind tool + +config BR2_PACKAGE_VALGRIND_CALLGRIND + bool "Callgrind: a call-graph generating cache and branch prediction profiler" + default y + help + This option allows to install the Callgrind tool + +config BR2_PACKAGE_VALGRIND_HELGRIND + bool "Helgrind: a thread error detector" + default y + help + This option allows to install the Helgrind tool + +config BR2_PACKAGE_VALGRIND_DRD + bool "DRD: a thread error detector" + default y + help + This option allows to install the DRD tool + +config BR2_PACKAGE_VALGRIND_MASSIF + bool "Massif: a heap profiler" + default y + help + This option allows to install the Massif tool + +config BR2_PACKAGE_VALGRIND_DHAT + bool "DHAT: a dynamic heap analysis tool" + default y + help + This option allows to install the DHAT tool + +config BR2_PACKAGE_VALGRIND_PTRCHECK + bool "Ptrcheck: an experimental head, stack and global array overrun detector" + help + This option allows to install the Ptrcheck tool + +config BR2_PACKAGE_VALGRIND_BBV + bool "BBV: an experimental basic block vector generation tool" + help + This option allows to install the BBV tool + +config BR2_PACKAGE_VALGRIND_LACKEY + bool "Lackey: an example tool" + help + This option allows to install the Lackey tool + +config BR2_PACKAGE_VALGRIND_NULGRIND + bool "Nulgrind: the minimal Valgrind tool" + help + This option allows to install the Nulgrind tool + +endif diff --git a/package/valgrind/valgrind-add-support-for-glibc-2.17-and-2.18.patch b/package/valgrind/valgrind-add-support-for-glibc-2.17-and-2.18.patch new file mode 100644 index 0000000000..c07dda2468 --- /dev/null +++ b/package/valgrind/valgrind-add-support-for-glibc-2.17-and-2.18.patch @@ -0,0 +1,50 @@ +From bca21896dbdba12963aa7991d7f1b732b6a709a8 Mon Sep 17 00:00:00 2001 +From: Phil Eichinger +Date: Wed, 23 Oct 2013 18:28:15 +0200 +Subject: [PATCH 1/1] Add support for glibc 2.17 and 2.18. + + +Signed-off-by: Phil Eichinger +--- +Status: fixed in upstream r13228 & r13504, not yet released. + + configure.in | 16 +++++++++++++++- + 1 file changed, 15 insertions(+), 1 deletion(-) + +diff --git a/configure.in b/configure.in +index 1da3a2c..ccc60a0 100644 +--- a/configure.in ++++ b/configure.in +@@ -906,6 +906,20 @@ case "${GLIBC_VERSION}" in + DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" + ;; ++ 2.17) ++ AC_MSG_RESULT(2.17 family) ++ AC_DEFINE([GLIBC_2_17], 1, [Define to 1 if you're using glibc 2.17.x]) ++ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" ++ ;; ++ 2.18) ++ AC_MSG_RESULT(2.18 family) ++ AC_DEFINE([GLIBC_2_18], 1, [Define to 1 if you're using glibc 2.18.x]) ++ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" ++ ;; + darwin) + AC_MSG_RESULT(Darwin) + AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin]) +@@ -919,7 +933,7 @@ case "${GLIBC_VERSION}" in + + *) + AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}]) +- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.16]) ++ AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.18]) + AC_MSG_ERROR([or Darwin libc]) + ;; + esac +-- +1.7.10.4 + diff --git a/package/valgrind/valgrind-dont-include-a-out-header.patch b/package/valgrind/valgrind-dont-include-a-out-header.patch new file mode 100644 index 0000000000..2afd44a886 --- /dev/null +++ b/package/valgrind/valgrind-dont-include-a-out-header.patch @@ -0,0 +1,45 @@ +Add replacement for + +Valgrind includes to get the definition of 'struct +nlist'. However, while glibc directly defines 'struct nlist' in +, uClibc relies on it being defined by kernel headers (i.e + simply includes ). This works for most +architectures, but not for PowerPC, on which the a.out binary format +has never been supported, and therefore the kernel +header does not exist. + +One solution would have been to use the header, but this one +is only available in glibc, and it also has a slightly different +definition than the one in . So, for the time being, the +easiest solution is to just replace the #include in Valgrind +code by a copy/paste of the 'struct nlist' definition. + +Signed-off-by: Thomas Petazzoni + +Index: b/coregrind/m_debuginfo/readstabs.c +=================================================================== +--- a/coregrind/m_debuginfo/readstabs.c ++++ b/coregrind/m_debuginfo/readstabs.c +@@ -53,7 +53,21 @@ + + /* --- !!! --- EXTERNAL HEADERS start --- !!! --- */ + #if defined(VGO_linux) +-# include /* stabs defns */ ++/* Copied from a.out.h, because it is otherwise not available on ++ PowerPC/uClibc */ ++struct nlist ++{ ++ union ++ { ++ char *n_name; ++ struct nlist *n_next; ++ long n_strx; ++ } n_un; ++ unsigned char n_type; ++ char n_other; ++ short n_desc; ++ unsigned long n_value; ++}; + #elif defined(VGO_darwin) + # include + # define n_other n_sect diff --git a/package/valgrind/valgrind-fix-ccache-support.patch b/package/valgrind/valgrind-fix-ccache-support.patch new file mode 100644 index 0000000000..40ada8d81b --- /dev/null +++ b/package/valgrind/valgrind-fix-ccache-support.patch @@ -0,0 +1,49 @@ +Fix link_tool_exe_linux.in to work with ccache + +The link_tool_exe_linux.in Perl script makes the assumption that the +compilation command line is always: + + gcc -o foobar foobar.c -someflags + +I.e, it assumes that the compiler is the first word of the command +line. However, this is not true with ccache, where the command line +is: + + /path/to/ccache /path/to/crossgcc -o foobar foobar.c -someflags + +Therefore, we tune the script to take into account the case where +ccache is used. + +Signed-off-by: Thomas Petazzoni + +Index: b/coregrind/link_tool_exe_linux.in +=================================================================== +--- a/coregrind/link_tool_exe_linux.in ++++ b/coregrind/link_tool_exe_linux.in +@@ -60,8 +60,16 @@ + die "Bogus alt-load address" + if (length($ala) < 3 || index($ala, "0x") != 0); + ++shift(@ARGV); ++ ++if ($ARGV[0] =~ /.*ccache/) { ++ shift(@ARGV); ++} ++ + # The cc invokation to do the final link +-my $cc = $ARGV[1]; ++my $cc = $ARGV[0]; ++ ++shift(@ARGV); + + # and the 'restargs' are argv[2 ..] + +@@ -82,7 +90,7 @@ + } + + # Add the rest of the parameters +-foreach my $n (2 .. $#ARGV) { ++foreach my $n (0 .. $#ARGV) { + $cmd = "$cmd $ARGV[$n]"; + } + diff --git a/package/valgrind/valgrind-largefile.patch b/package/valgrind/valgrind-largefile.patch index 9ef5708bc8..3a8a780f0d 100644 --- a/package/valgrind/valgrind-largefile.patch +++ b/package/valgrind/valgrind-largefile.patch @@ -5,23 +5,52 @@ _FILE_OFFSET_BITS is set to 64), so don't define it if that combination is detected. Signed-off-by: Peter Korsgaard ---- - coregrind/m_ume.c | 4 ++++ - 1 file changed, 4 insertions(+) -Index: valgrind-3.2.3/coregrind/m_ume.c +Index: b/coregrind/m_initimg/initimg-linux.c =================================================================== ---- valgrind-3.2.3.orig/coregrind/m_ume.c -+++ valgrind-3.2.3/coregrind/m_ume.c -@@ -31,7 +31,11 @@ +--- a/coregrind/m_initimg/initimg-linux.c ++++ b/coregrind/m_initimg/initimg-linux.c +@@ -55,7 +55,11 @@ + /* --- !!! --- EXTERNAL HEADERS start --- !!! --- */ + #define _GNU_SOURCE ++#include ++/* uclibc without largefile support #errors on _FILE_OFFSET_BITS=64 */ ++#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_LFS__)) + #define _FILE_OFFSET_BITS 64 ++#endif + /* This is for ELF types etc, and also the AT_ constants. */ + #include + /* --- !!! --- EXTERNAL HEADERS end --- !!! --- */ +Index: b/coregrind/m_main.c +=================================================================== +--- a/coregrind/m_main.c ++++ b/coregrind/m_main.c +@@ -2948,7 +2948,11 @@ + /* --- !!! --- EXTERNAL HEADERS start --- !!! --- */ #define _GNU_SOURCE +#include +/* uclibc without largefile support #errors on _FILE_OFFSET_BITS=64 */ +#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_LFS__)) #define _FILE_OFFSET_BITS 64 +#endif + /* This is in order to get AT_NULL and AT_PAGESIZE. */ + #include + /* --- !!! --- EXTERNAL HEADERS end --- !!! --- */ +Index: b/coregrind/m_ume/elf.c +=================================================================== +--- a/coregrind/m_ume/elf.c ++++ b/coregrind/m_ume/elf.c +@@ -48,7 +48,11 @@ - // It seems that on SuSE 9.1 (x86) something in messes up stuff - // acquired indirectly from vki-x86-linux.h. Therefore our headers must be + /* --- !!! --- EXTERNAL HEADERS start --- !!! --- */ + #define _GNU_SOURCE ++#include ++/* uclibc without largefile support #errors on _FILE_OFFSET_BITS=64 */ ++#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_LFS__)) + #define _FILE_OFFSET_BITS 64 ++#endif + /* This is for ELF types etc, and also the AT_ constants. */ + #include + /* --- !!! --- EXTERNAL HEADERS end --- !!! --- */ diff --git a/package/valgrind/valgrind-workaround-SIGSEGV-on-PPC.patch b/package/valgrind/valgrind-workaround-SIGSEGV-on-PPC.patch new file mode 100644 index 0000000000..3358c24ce3 --- /dev/null +++ b/package/valgrind/valgrind-workaround-SIGSEGV-on-PPC.patch @@ -0,0 +1,25 @@ +From db894abcaa12555f60880a15840010f81d354806 Mon Sep 17 00:00:00 2001 +From: Pierre Habouzit +Date: Tue, 10 May 2011 23:11:45 +0200 +Subject: [PATCH] workaround SIGSEGV on PPC. + +Signed-off-by: Pierre Habouzit +--- + coregrind/m_machine.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +Index: b/coregrind/m_machine.c +=================================================================== +--- a/coregrind/m_machine.c ++++ b/coregrind/m_machine.c +@@ -27,6 +27,10 @@ + The GNU General Public License is contained in the file COPYING. + */ + ++#ifdef __powerpc__ ++# pragma GCC optimize ("-O0") ++#endif ++ + #include "pub_core_basics.h" + #include "pub_core_vki.h" + #include "pub_core_libcsetjmp.h" // setjmp facilities diff --git a/package/valgrind/valgrind.mk b/package/valgrind/valgrind.mk index 5bf0a9d284..953f929490 100644 --- a/package/valgrind/valgrind.mk +++ b/package/valgrind/valgrind.mk @@ -1,88 +1,126 @@ -############################################################# +################################################################################ # # valgrind # -############################################################# - -VALGRIND_VERSION=3.2.3 -VALGRIND_SITE:=http://valgrind.org/downloads/ -VALGRIND_DIR:=$(BUILD_DIR)/valgrind-$(VALGRIND_VERSION) -VALGRIND_SOURCE:=valgrind-$(VALGRIND_VERSION).tar.bz2 -VALGRIND_CAT:=$(BZCAT) - -$(DL_DIR)/$(VALGRIND_SOURCE): - $(call DOWNLOAD,$(VALGRIND_SITE),$(VALGRIND_SOURCE)) - -$(VALGRIND_DIR)/.unpacked: $(DL_DIR)/$(VALGRIND_SOURCE) - $(VALGRIND_CAT) $(DL_DIR)/$(VALGRIND_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - touch $(VALGRIND_DIR)/.unpacked - -$(VALGRIND_DIR)/.patched: $(VALGRIND_DIR)/.unpacked - toolchain/patch-kernel.sh $(VALGRIND_DIR) package/valgrind/ valgrind\*.patch - touch $(VALGRIND_DIR)/.patched - -$(VALGRIND_DIR)/.configured: $(VALGRIND_DIR)/.patched - (cd $(VALGRIND_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - $(TARGET_CONFIGURE_ARGS) \ - CC="$(TARGET_CC) $(TARGET_CFLAGS) -I$(LINUX_HEADERS_DIR)/include" \ - ./configure $(QUIET) \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - $(DISABLE_NLS) \ - --without-uiout --disable-valgrindmi \ - --disable-tui --disable-valgrindtk \ - --without-x --without-included-gettext \ - --disable-tls \ - ) - touch $(VALGRIND_DIR)/.configured - -$(VALGRIND_DIR)/coregrind/valgrind: $(VALGRIND_DIR)/.configured - $(MAKE) -C $(VALGRIND_DIR) - touch -c $@ - -$(TARGET_DIR)/usr/bin/valgrind: $(VALGRIND_DIR)/coregrind/valgrind - $(MAKE) \ - prefix=$(TARGET_DIR)/usr \ - exec_prefix=$(TARGET_DIR)/usr \ - bindir=$(TARGET_DIR)/usr/bin \ - sbindir=$(TARGET_DIR)/usr/sbin \ - libexecdir=$(TARGET_DIR)/usr/lib \ - datadir=$(TARGET_DIR)/usr/share \ - sysconfdir=$(TARGET_DIR)/etc \ - sharedstatedir=$(TARGET_DIR)/usr/com \ - localstatedir=$(TARGET_DIR)/var \ - libdir=$(TARGET_DIR)/usr/lib \ - infodir=$(TARGET_DIR)/usr/info \ - mandir=$(TARGET_DIR)/usr/man \ - includedir=$(TARGET_DIR)/usr/include \ - -C $(VALGRIND_DIR) install - mv $(TARGET_DIR)/usr/bin/valgrind $(TARGET_DIR)/usr/bin/valgrind.bin - cp package/valgrind/uclibc.supp $(TARGET_DIR)/usr/lib/valgrind/ - cp package/valgrind/valgrind.sh $(TARGET_DIR)/usr/bin/valgrind - chmod a+x $(TARGET_DIR)/usr/bin/valgrind - rm -rf $(TARGET_DIR)/usr/share/doc/valgrind - touch -c $@ - -valgrind: $(TARGET_DIR)/usr/bin/valgrind - -valgrind-source: $(DL_DIR)/$(VALGRIND_SOURCE) - -valgrind-clean: - -$(MAKE) -C $(VALGRIND_DIR) clean - -rm -f $(TARGET_DIR)/usr/bin/valgrind* - rm -rf $(TARGET_DIR)/usr/lib/valgrind - -valgrind-dirclean: - rm -rf $(VALGRIND_DIR) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_VALGRIND),y) -TARGETS+=valgrind +################################################################################ + +VALGRIND_VERSION = 3.8.1 +VALGRIND_SITE = http://valgrind.org/downloads/ +VALGRIND_SOURCE = valgrind-$(VALGRIND_VERSION).tar.bz2 +VALGRIND_LICENSE = GPLv2 GFDLv1.2 +VALGRIND_LICENSE_FILES = COPYING COPYING.DOCS +VALGRIND_AUTORECONF = YES +VALGRIND_CONF_OPT = --disable-tls + +# On ARM, Valgrind only supports ARMv7, and uses the arch part of the +# host tuple to determine whether it's being built for ARMv7 or +# not. Therefore, we adjust the host tuple to specify we're on +# ARMv7. The valgrind package is guaranteed, through Config.in, to +# only be selected on Cortex A8 and Cortex A9 platforms. +ifeq ($(BR2_cortex_a8)$(BR2_cortex_a9),y) +VALGRIND_CONF_OPT += \ + --host=$(patsubst arm-%,armv7-%,$(GNU_TARGET_NAME)) +endif + +define VALGRIND_INSTALL_UCLIBC_SUPP + install -D -m 0644 package/valgrind/uclibc.supp $(TARGET_DIR)/usr/lib/valgrind/uclibc.supp +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_INSTALL_UCLIBC_SUPP + +ifeq ($(BR2_PACKAGE_VALGRIND_MEMCHECK),) +define VALGRIND_REMOVE_MEMCHECK + rm -f $(TARGET_DIR)/usr/lib/valgrind/*memcheck* +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_MEMCHECK +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_CACHEGRIND),) +define VALGRIND_REMOVE_CACHEGRIND + rm -f $(TARGET_DIR)/usr/lib/valgrind/*cachegrind* + for i in cg_annotate cg_diff cg_merge; do \ + rm -f $(TARGET_DIR)/usr/bin/$$i ; \ + done +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_CACHEGRIND +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_CALLGRIND),) +define VALGRIND_REMOVE_CALLGRIND + rm -f $(TARGET_DIR)/usr/lib/valgrind/*callgrind* + for i in callgrind_annotate callgrind_control ; do \ + rm -f $(TARGET_DIR)/usr/bin/$$i ; \ + done +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_CALLGRIND +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_HELGRIND),) +define VALGRIND_REMOVE_HELGRIND + rm -f $(TARGET_DIR)/usr/lib/valgrind/*helgrind* +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_HELGRIND +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_DRD),) +define VALGRIND_REMOVE_DRD + rm -f $(TARGET_DIR)/usr/lib/valgrind/*drd* +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_DRD +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_MASSIF),) +define VALGRIND_REMOVE_MASSIF + rm -f $(TARGET_DIR)/usr/lib/valgrind/*massif* + rm -f $(TARGET_DIR)/usr/bin/ms_script +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_MASSIF +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_DHAT),) +define VALGRIND_REMOVE_DHAT + rm -f $(TARGET_DIR)/usr/lib/valgrind/*dhat* +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_DHAT +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_PTRCHECK),) +define VALGRIND_REMOVE_PTRCHECK + rm -f $(TARGET_DIR)/usr/lib/valgrind/*ptrcheck* +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_PTRCHECK endif + +ifeq ($(BR2_PACKAGE_VALGRIND_BBV),) +define VALGRIND_REMOVE_BBV + rm -f $(TARGET_DIR)/usr/lib/valgrind/*bbv* +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_BBV +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_LACKEY),) +define VALGRIND_REMOVE_LACKEY + rm -f $(TARGET_DIR)/usr/lib/valgrind/*lackey* +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_LACKEY +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_NULGRIND),) +define VALGRIND_REMOVE_NULGRIND + rm -f $(TARGET_DIR)/usr/lib/valgrind/*none* +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_NULGRIND +endif + +$(eval $(autotools-package)) diff --git a/package/valgrind/valgrind.patch b/package/valgrind/valgrind.patch deleted file mode 100644 index afdd53efc8..0000000000 --- a/package/valgrind/valgrind.patch +++ /dev/null @@ -1,205 +0,0 @@ ---- valgrind/coregrind/m_syswrap/syswrap-amd64-linux.c.orig 2006-08-02 16:51:51.000000000 -0600 -+++ valgrind/coregrind/m_syswrap/syswrap-amd64-linux.c 2006-08-02 16:53:19.000000000 -0600 -@@ -1124,7 +1124,7 @@ - GENXY(__NR_times, sys_times), // 100 - PLAXY(__NR_ptrace, sys_ptrace), // 101 - GENX_(__NR_getuid, sys_getuid), // 102 -- // (__NR_syslog, sys_syslog), // 103 -+ LINXY(__NR_syslog, sys_syslog), // 103 - GENX_(__NR_getgid, sys_getgid), // 104 - - GENX_(__NR_setuid, sys_setuid), // 105 ---- valgrind/include/vki-linux.h.orig 2006-08-02 18:22:21.000000000 -0600 -+++ valgrind/include/vki-linux.h 2006-08-02 18:38:02.000000000 -0600 -@@ -1556,7 +1556,9 @@ - - #define VKI_BLKROSET _VKI_IO(0x12,93) /* set device read-only (0 = read-write) */ - #define VKI_BLKROGET _VKI_IO(0x12,94) /* get read-only status (0 = read_write) */ -+#define VKI_BLKRRPART _VKI_IO(0x12,95) /* re-read partition table */ - #define VKI_BLKGETSIZE _VKI_IO(0x12,96) /* return device size /512 (long *arg) */ -+#define VKI_BLKFLSBUF _VKI_IO(0x12,97) /* flush buffer cache */ - #define VKI_BLKRASET _VKI_IO(0x12,98) /* set read ahead for block device */ - #define VKI_BLKRAGET _VKI_IO(0x12,99) /* get current read ahead setting */ - #define VKI_BLKFRASET _VKI_IO(0x12,100)/* set filesystem (mm/filemap.c) read-ahead */ -@@ -1631,6 +1633,54 @@ - //#define SG_GET_COMMAND_Q 0x2270 /* Yields 0 (queuing off) or 1 (on) */ - #define VKI_SG_SET_COMMAND_Q 0x2271 /* Change queuing state with 0 or 1 */ - -+ -+typedef struct vki_scsi_idlun -+{ -+ int mux4; -+ int host_unique_id; -+ -+} vki_scsi_idlun_t; -+#define VKI_SCSI_IOCTL_GET_IDLUN 0x5382 /* Gets a struct vki_scsi_idlun */ -+#define VKI_SCSI_IOCTL_PROBE_HOST 0x5385 /* Gets an arrary describing the SCSI host */ -+#define VKI_SCSI_IOCTL_GET_BUS_NUMBER 0x5386 /* Get the bus number for a device */ -+ -+//---------------------------------------------------------------------- -+// From linux-2.6.8.1/include/linux/fd.h -+//---------------------------------------------------------------------- -+#define VKI_FDRESET 0x254 /* Takes an int by value */ -+#define VKI_FDGETDRVTYP 0x20f /* Returns char floppy_drive_name[16] */ -+typedef struct vki_floppy_drive_struct { -+ unsigned long flags; -+ unsigned long spinup_date; -+ unsigned long select_date; -+ unsigned long first_read_date; -+ short probed_format; -+ short track; -+ short maxblock; -+ short maxtrack; -+ int generation; -+ int keep_data; -+ int fd_ref; -+ int fd_device; -+ unsigned long last_checked; -+ char *dmabuf; -+ int bufblocks; -+} vki_floppy_drive_struct_t; -+#define VKI_FDPOLLDRVSTAT 0x213 /* returns a struct floppy_drive_struct */ -+typedef struct vki_floppy_struct { -+ unsigned int size; -+ unsigned int sect; -+ unsigned int head; -+ unsigned int track; -+ unsigned int stretch; -+ unsigned char gap; -+ unsigned char rate; -+ unsigned char spec1; -+ unsigned char fmt_gap; -+ const char * name; -+} vki_floppy_struct_t; -+#define VKI_FDGETPRM 0x204 /* returns a struct floppy_struct */ -+ - //---------------------------------------------------------------------- - // From linux-2.6.8.1/include/linux/cdrom.h - //---------------------------------------------------------------------- -@@ -1640,6 +1690,7 @@ - (struct cdrom_tochdr) */ - #define VKI_CDROMREADTOCENTRY 0x5306 /* Read TOC entry - (struct cdrom_tocentry) */ -+#define VKI_CDROMEJECT 0x5309 /* Eject cdrom media */ - #define VKI_CDROMSUBCHNL 0x530b /* Read subchannel data - (struct cdrom_subchnl) */ - #define VKI_CDROMREADMODE2 0x530c /* Read CDROM mode 2 data (2336 Bytes) ---- valgrind/coregrind/m_syswrap/syswrap-generic.c.orig 2006-08-02 18:22:13.000000000 -0600 -+++ valgrind/coregrind/m_syswrap/syswrap-generic.c 2006-08-02 18:43:49.000000000 -0600 -@@ -3227,6 +3227,33 @@ - case VKI_SG_GET_SG_TABLESIZE: /* 0x227f */ - PRE_MEM_WRITE( "ioctl(SG_GET_SG_TABLESIZE)", ARG3, sizeof(int) ); - break; -+ case VKI_SCSI_IOCTL_GET_IDLUN: -+ PRE_MEM_WRITE( "ioctl(SCSI_IOCTL_GET_IDLUN)", ARG3, sizeof(vki_scsi_idlun_t) ); -+ break; -+ case VKI_SCSI_IOCTL_PROBE_HOST: -+ { -+ int arraylen; -+ char *array = (char*)ARG3; -+ PRE_MEM_READ("ioctl(SCSI_IOCTL_PROBE_HOST)", ARG3, sizeof(char)*4 ); -+ arraylen = array[0] + (array[1]<<8) + (array[2]<<16) + (array[3]<<24); -+ PRE_MEM_WRITE( "ioctl(SCSI_IOCTL_PROBE_HOST)", ARG3, sizeof(char)*arraylen ); -+ } -+ break; -+ case VKI_SCSI_IOCTL_GET_BUS_NUMBER: -+ PRE_MEM_WRITE( "ioctl(SCSI_IOCTL_GET_BUS_NUMBER)", ARG3, sizeof(int) ); -+ break; -+ -+ case VKI_FDRESET: -+ break; -+ case VKI_FDGETDRVTYP: -+ PRE_MEM_WRITE( "ioctl(FDGETDRVTYP)", ARG3, sizeof(char)*16 ); -+ break; -+ case VKI_FDPOLLDRVSTAT: -+ PRE_MEM_WRITE( "ioctl(FDPOLLDRVSTAT)", ARG3, sizeof(vki_floppy_drive_struct_t) ); -+ break; -+ case VKI_FDGETPRM: -+ PRE_MEM_WRITE( "ioctl(FDGETPRM)", ARG3, sizeof(vki_floppy_struct_t) ); -+ break; - - case VKI_IIOCGETCPS: - PRE_MEM_WRITE( "ioctl(IIOCGETCPS)", ARG3, -@@ -3550,6 +3578,8 @@ - case VKI_BLKROGET: - PRE_MEM_WRITE( "ioctl(BLKROGET)", ARG3, sizeof(int)); - break; -+ case VKI_BLKRRPART: -+ break; - case VKI_BLKGETSIZE: - PRE_MEM_WRITE( "ioctl(BLKGETSIZE)", ARG3, sizeof(unsigned long)); - break; -@@ -3558,6 +3588,8 @@ - case VKI_BLKRAGET: - PRE_MEM_WRITE( "ioctl(BLKRAGET)", ARG3, sizeof(long)); - break; -+ case VKI_BLKFLSBUF: -+ break; - case VKI_BLKFRASET: - break; - case VKI_BLKFRAGET: -@@ -3624,6 +3656,8 @@ - PRE_MEM_WRITE( "ioctl(CDROMREADTOCENTRY)", ARG3, - sizeof(struct vki_cdrom_tocentry)); - break; -+ case VKI_CDROMEJECT: -+ break; - case VKI_CDROMMULTISESSION: /* 0x5310 */ - PRE_MEM_WRITE( "ioctl(CDROMMULTISESSION)", ARG3, - sizeof(struct vki_cdrom_multisession)); -@@ -4042,6 +4076,28 @@ - case VKI_SG_GET_SG_TABLESIZE: - POST_MEM_WRITE(ARG3, sizeof(int)); - break; -+ case VKI_SCSI_IOCTL_GET_IDLUN: -+ POST_MEM_WRITE(ARG3, sizeof(vki_scsi_idlun_t)); -+ break; -+ case VKI_SCSI_IOCTL_PROBE_HOST: -+ if (RES > 0 && ARG3 ) -+ POST_MEM_WRITE(ARG3, sizeof(char)*RES); -+ break; -+ case VKI_SCSI_IOCTL_GET_BUS_NUMBER: -+ POST_MEM_WRITE(ARG3, sizeof(int)); -+ break; -+ -+ case VKI_FDRESET: -+ break; -+ case VKI_FDGETDRVTYP: -+ POST_MEM_WRITE( ARG3, sizeof(char)*16 ); -+ break; -+ case VKI_FDPOLLDRVSTAT: -+ POST_MEM_WRITE( ARG3, sizeof(vki_floppy_drive_struct_t) ); -+ break; -+ case VKI_FDGETPRM: -+ POST_MEM_WRITE( ARG3, sizeof(vki_floppy_struct_t) ); -+ break; - - case VKI_IIOCGETCPS: - POST_MEM_WRITE( ARG3, VKI_ISDN_MAX_CHANNELS * 2 * sizeof(unsigned long) ); -@@ -4260,6 +4317,8 @@ - case VKI_BLKROGET: - POST_MEM_WRITE(ARG3, sizeof(int)); - break; -+ case VKI_BLKRRPART: -+ break; - case VKI_BLKGETSIZE: - POST_MEM_WRITE(ARG3, sizeof(unsigned long)); - break; -@@ -4268,6 +4327,8 @@ - case VKI_BLKRAGET: - POST_MEM_WRITE(ARG3, sizeof(long)); - break; -+ case VKI_BLKFLSBUF: -+ break; - case VKI_BLKFRASET: - break; - case VKI_BLKFRAGET: -@@ -4309,6 +4370,8 @@ - case VKI_CDROMREADTOCENTRY: - POST_MEM_WRITE(ARG3, sizeof(struct vki_cdrom_tocentry)); - break; -+ case VKI_CDROMEJECT: -+ break; - case VKI_CDROMMULTISESSION: - POST_MEM_WRITE(ARG3, sizeof(struct vki_cdrom_multisession)); - break; diff --git a/package/valgrind/valgrind.sh b/package/valgrind/valgrind.sh deleted file mode 100755 index 4b8eb2e57b..0000000000 --- a/package/valgrind/valgrind.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -e -# -# Valgrind wrapper - -# Use special suppression file for uClibc -export VALGRIND_OPTS="$VALGRIND_OPTS --suppressions=/usr/lib/valgrind/uclibc.supp" - -# Use 'exec' to avoid having another shell process hanging around. -exec $0.bin "$@" - diff --git a/package/vde2/Config.in b/package/vde2/Config.in new file mode 100644 index 0000000000..2bbd822c22 --- /dev/null +++ b/package/vde2/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_VDE2 + bool "vde2" + depends on BR2_USE_MMU # fork() + help + VDE is an ethernet compliant virtual network that can be + spawned over a set of physical computers over the Internet. + VDE is part of the virtualsquare project. + + http://vde.sourceforge.net/ diff --git a/package/vde2/vde2-no-cxx.patch b/package/vde2/vde2-no-cxx.patch new file mode 100644 index 0000000000..67cefa2bb8 --- /dev/null +++ b/package/vde2/vde2-no-cxx.patch @@ -0,0 +1,22 @@ +configure: do not test for CXX, it's not needed + +There is no C++ source file, so no reason to require a C++ compiler. + +Reported-by: Peter Korsgaard +Signed-off-by: "Yann E. MORIN" + +--- +Patch sent upstream +( not yet in archives, awaits moderator approval... :-/ ) + +diff -durN vde2-2.3.2.orig/configure.ac vde2-2.3.2/configure.ac +--- vde2-2.3.2.orig/configure.ac 2011-11-23 17:41:19.000000000 +0100 ++++ vde2-2.3.2/configure.ac 2012-12-14 21:56:47.146319686 +0100 +@@ -11,7 +11,6 @@ + AC_CONFIG_LIBOBJ_DIR(src/common) + + # Checks for programs. +-AC_PROG_CXX + AC_PROG_CC + AC_PROG_INSTALL + AC_PROG_LN_S diff --git a/package/vde2/vde2.mk b/package/vde2/vde2.mk new file mode 100644 index 0000000000..1b1ecd554c --- /dev/null +++ b/package/vde2/vde2.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# vde2 +# +################################################################################ + +VDE2_VERSION = 2.3.2 +VDE2_SOURCE = vde2-$(VDE2_VERSION).tar.bz2 +VDE2_SITE = http://downloads.sourceforge.net/project/vde/vde2/$(VDE2_VERSION) +VDE2_LICENSE = GPLv2+ LGPLv2.1+ BSD-3c +VDE2_LICENSE_FILES = COPYING COPYING.libvdeplug COPYING.slirpvde +VDE2_INSTALL_STAGING = YES + +# We touch configure.ac, so we need to autoreconf +VDE2_AUTORECONF = YES + +# Reasons for enabling/disabling stuff: +# - tuntap is enabled in the hope we're using a recent-enough toolchain +# that does have if_tun.h (virtually everything these days) +# - kvde_switch is disabled because it requires a patched kernel +# - cryptcab is disabled to not depend on openSSL +# - python is disabled to not depend on Python +# - pcap is disabled to not depend on libpcap +# - profiling is disabled because we do not want to debug/profile +# +# Note: disabled features can be added with corresponding dependencies +# in future commits. +VDE2_CONF_OPT = --disable-experimental \ + --disable-cryptcab \ + --disable-pcap \ + --disable-python \ + --disable-profile \ + --disable-kernel-switch \ + --enable-tuntap \ + +# Package does not build in parallel due to improper make rules +VDE2_MAKE = $(MAKE1) + +$(eval $(autotools-package)) diff --git a/package/vim/Config.in b/package/vim/Config.in index 30b73d3051..0b2f4b5b85 100644 --- a/package/vim/Config.in +++ b/package/vim/Config.in @@ -1,6 +1,8 @@ config BR2_PACKAGE_VIM bool "vim" + depends on BR2_USE_MMU # uses fork() select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE help VIM Text editor @@ -12,4 +14,4 @@ config BR2_PACKAGE_VIM_RUNTIME depends on BR2_PACKAGE_VIM help Install VIM runtime (syntax highlighing + macros). - This option adds about 13MB of data to /usr/share/ + This option adds about 15MB of data to /usr/share/ diff --git a/package/vim/vim-0001-fix-nls-check.patch b/package/vim/vim-0001-fix-nls-check.patch new file mode 100644 index 0000000000..ce5854932f --- /dev/null +++ b/package/vim/vim-0001-fix-nls-check.patch @@ -0,0 +1,120 @@ +configure: use minimal LIBS during gettext check + +In some configurations, vim fails to link correctly with messages such as: +edit.c:(.text+0x1614): undefined reference to `libintl_gettext' + +In particular, this has been seen by the buildroot autobuilds (see [1]) but +has also been reported at [2] and [3]. + +In the bad case, the configure script says: +checking for NLS... gettext() works +In the good case, it says: +checking for NLS... gettext() works with -lintl + +In the bad case, the system has libelf, vim detects that and takes it along +in $LIBS. Libelf needs libintl on this system, and so linking the test +program with -lelf will automatically take -lintl too. This causes configure +to think gettext() does not need libintl, while in reality it does. + +In the good case, libelf is not present and thus not used. The first +configure test for gettext fails, and then configure retries with -lintl +(which succeeds). + +Until now, there isn't really a problem. In both cases, you could link +correctly. In the 'bad' case, libintl is implicitly taken through libelf, in +the second case it is explicitly taken. + +The real problem occurs because configure also tests whether the linker +supports --as-needed and uses it when possible, instead of the link.sh +script. However, --as-needed seems to cause libintl NOT to be taken in the +bad case, causing the undefined references to libintl_gettext. + +This patch changes the configure script so that the gettext check does not +use additional libraries such as libelf. The test program is linked either +with nothing, or with libintl alone. This will cause libintl to +be added explicitly to LIBS, when needed. + +[1] http://autobuild.buildroot.net/results/21b5a910e6a27fa1cb12d0002ffed7e6ed9d6c83/ +[2] http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2012-November/243930.html +[3] http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2012-May/234184.html + + +Signed-off-by: Thomas De Schampheleire +Upstream-status: accepted (http://article.gmane.org/gmane.editors.vim.devel/43528) + +--- + src/auto/configure | 11 ++++++----- + src/configure.in | 13 +++++++++---- + 2 files changed, 15 insertions(+), 9 deletions(-) + +diff --git a/src/auto/configure b/src/auto/configure +--- a/src/auto/configure ++++ b/src/auto/configure +@@ -12271,6 +12271,8 @@ fi + if test -f po/Makefile; then + have_gettext="no" + if test -n "$MSGFMT"; then ++ olibs=$LIBS ++ LIBS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include +@@ -12284,10 +12286,9 @@ gettext("Test"); + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works" >&5 +-$as_echo "gettext() works" >&6; }; have_gettext="yes" +-else +- olibs=$LIBS +- LIBS="$LIBS -lintl" ++$as_echo "gettext() works" >&6; }; have_gettext="yes"; LIBS=$olibs; ++else ++ LIBS="-lintl" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include +@@ -12301,7 +12302,7 @@ gettext("Test"); + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works with -lintl" >&5 +-$as_echo "gettext() works with -lintl" >&6; }; have_gettext="yes" ++$as_echo "gettext() works with -lintl" >&6; }; have_gettext="yes"; LIBS="$olibs -lintl"; + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5 + $as_echo "gettext() doesn't work" >&6; }; +diff --git a/src/configure.in b/src/configure.in +--- a/src/configure.in ++++ b/src/configure.in +@@ -3484,6 +3484,9 @@ if test "$MANDEF" = "man -s"; then + fi + + dnl Check if gettext() is working and if it needs -lintl ++dnl We take care to base this on an empty LIBS: on some systems libelf would be ++dnl in LIBS and implicitly take along libintl. The final LIBS would then not ++dnl contain libintl, and the link step would fail due to -Wl,--as-needed. + AC_MSG_CHECKING(--disable-nls argument) + AC_ARG_ENABLE(nls, + [ --disable-nls Don't support NLS (gettext()).], , +@@ -3502,16 +3505,18 @@ if test "$enable_nls" = "yes"; then + if test -f po/Makefile; then + have_gettext="no" + if test -n "$MSGFMT"; then ++ olibs=$LIBS ++ LIBS="" + AC_TRY_LINK( + [#include ], + [gettext("Test");], +- AC_MSG_RESULT([gettext() works]); have_gettext="yes", +- olibs=$LIBS +- LIBS="$LIBS -lintl" ++ AC_MSG_RESULT([gettext() works]); have_gettext="yes"; LIBS=$olibs, ++ LIBS="-lintl" + AC_TRY_LINK( + [#include ], + [gettext("Test");], +- AC_MSG_RESULT([gettext() works with -lintl]); have_gettext="yes", ++ AC_MSG_RESULT([gettext() works with -lintl]); have_gettext="yes"; ++ LIBS="$olibs -lintl", + AC_MSG_RESULT([gettext() doesn't work]); + LIBS=$olibs)) + else diff --git a/package/vim/vim.mk b/package/vim/vim.mk index 917d1d47c8..bd909cd702 100644 --- a/package/vim/vim.mk +++ b/package/vim/vim.mk @@ -1,14 +1,14 @@ -############################################################# +################################################################################ # # vim # -############################################################# +################################################################################ -# svn r1889 == 7.2 release + patchlevel 446 -VIM_SITE = https://vim.svn.sourceforge.net/svnroot/vim/branches/vim7.2 -VIM_SITE_METHOD = svn -VIM_VERSION = 1889 -VIM_DEPENDENCIES = ncurses +VIM_SITE = https://vim.googlecode.com/hg +VIM_SITE_METHOD = hg +# 7.3 release patchlevel 762 +VIM_VERSION = 699f8d8f096d +VIM_DEPENDENCIES = ncurses $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) VIM_SUBDIR = src VIM_CONF_ENV = vim_cv_toupper_broken=no \ vim_cv_terminfo=yes \ @@ -19,8 +19,10 @@ VIM_CONF_ENV = vim_cv_toupper_broken=no \ vim_cv_memmove_handles_overlap=yes \ ac_cv_sizeof_int=4 \ ac_cv_small_wchar_t=no - -VIM_CONF_OPT = --with-tlib=ncurses +# GUI/X11 headers leak from the host so forcibly disable them +VIM_CONF_OPT = --with-tlib=ncurses --enable-gui=no --without-x +VIM_LICENSE = Charityware +VIM_LICENSE_FILES = README.txt define VIM_INSTALL_TARGET_CMDS cd $(@D)/src; \ @@ -34,8 +36,15 @@ define VIM_INSTALL_RUNTIME_CMDS $(MAKE) DESTDIR=$(TARGET_DIR) installmacros endef +define VIM_REMOVE_DOCS + find $(TARGET_DIR)/usr/share/vim -type f -name "*.txt" -delete +endef + ifeq ($(BR2_PACKAGE_VIM_RUNTIME),y) VIM_POST_INSTALL_TARGET_HOOKS += VIM_INSTALL_RUNTIME_CMDS +ifneq ($(BR2_HAVE_DOCUMENTATION),y) +VIM_POST_INSTALL_TARGET_HOOKS += VIM_REMOVE_DOCS +endif endif -$(eval $(call AUTOTARGETS,package,vim)) +$(eval $(autotools-package)) diff --git a/package/multimedia/vorbis-tools/Config.in b/package/vorbis-tools/Config.in similarity index 100% rename from package/multimedia/vorbis-tools/Config.in rename to package/vorbis-tools/Config.in diff --git a/package/vorbis-tools/vorbis-tools.mk b/package/vorbis-tools/vorbis-tools.mk new file mode 100644 index 0000000000..464081e7ae --- /dev/null +++ b/package/vorbis-tools/vorbis-tools.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# vorbis-tools +# +################################################################################ + +VORBIS_TOOLS_VERSION = 1.4.0 +VORBIS_TOOLS_SITE = http://downloads.xiph.org/releases/vorbis +VORBIS_TOOLS_LICENSE = GPLv2 +VORBIS_TOOLS_LICENSE_FILES = COPYING +VORBIS_TOOLS_DEPENDENCIES = libao libogg libvorbis libcurl +VORBIS_TOOLS_CONF_OPT = --program-transform-name='' + +ifeq ($(BR2_PACKAGE_FLAC),y) +VORBIS_TOOLS_DEPENDENCIES += flac +endif + +ifeq ($(BR2_PACKAGE_SPEEX),y) +VORBIS_TOOLS_DEPENDENCIES += speex +endif + +$(eval $(autotools-package)) diff --git a/package/vpnc/Config.in b/package/vpnc/Config.in index 9abc0c5f50..bc27331c6f 100644 --- a/package/vpnc/Config.in +++ b/package/vpnc/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_VPNC bool "vpnc" + depends on BR2_USE_MMU # fork() select BR2_PACKAGE_LIBGCRYPT select BR2_PACKAGE_LIBGPG_ERROR help diff --git a/package/vpnc/vpnc-0.5.3-fix-build.patch b/package/vpnc/vpnc-0.5.3-fix-build.patch new file mode 100644 index 0000000000..e21348b4e3 --- /dev/null +++ b/package/vpnc/vpnc-0.5.3-fix-build.patch @@ -0,0 +1,71 @@ +Misc. Makefile cleanup and fix the VERSION definition. + +Signed-off-by: Samuel Martin + +--- +diff -purN vpnc-0.5.3.orig/Makefile vpnc-0.5.3/Makefile +--- vpnc-0.5.3.orig/Makefile 2012-08-06 00:03:22.677914146 +0200 ++++ vpnc-0.5.3/Makefile 2012-08-06 00:06:58.506744901 +0200 +@@ -19,21 +19,19 @@ + # + # $Id: Makefile 312 2008-06-15 18:09:42Z Joerg Mayer $ + +-DESTDIR= +-PREFIX=/usr/local +-ETCDIR=/etc/vpnc +-BINDIR=$(PREFIX)/bin +-SBINDIR=$(PREFIX)/sbin +-MANDIR=$(PREFIX)/share/man +-DOCDIR=$(PREFIX)/share/doc/vpnc +- +-SRCS = sysdep.c vpnc-debug.c isakmp-pkt.c tunip.c config.c dh.c math_group.c supp.c decrypt-utils.c +-BINS = vpnc cisco-decrypt +-OBJS = $(addsuffix .o,$(basename $(SRCS))) ++DESTDIR = ++PREFIX ?= /usr/local ++ETCDIR = /etc/vpnc ++BINDIR = $(PREFIX)/bin ++SBINDIR = $(PREFIX)/sbin ++MANDIR = $(PREFIX)/share/man ++DOCDIR = $(PREFIX)/share/doc/vpnc ++ ++SRCS = sysdep.c vpnc-debug.c isakmp-pkt.c tunip.c config.c dh.c math_group.c supp.c decrypt-utils.c ++BINS = vpnc cisco-decrypt ++OBJS = $(addsuffix .o,$(basename $(SRCS))) + BINOBJS = $(addsuffix .o,$(BINS)) + BINSRCS = $(addsuffix .c,$(BINS)) +-VERSION := $(shell sh mk-version) +-RELEASE_VERSION := $(shell cat VERSION) + + # The license of vpnc (Gpl >= 2) is quite likely incompatible with the + # openssl license. Openssl is currently used to provide certificate +@@ -50,13 +48,13 @@ RELEASE_VERSION := $(shell cat VERSION) + #OPENSSL_GPL_VIOLATION = -DOPENSSL_GPL_VIOLATION + #OPENSSLLIBS = -lcrypto + +-CC=gcc +-CFLAGS ?= -O3 -g +-CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings +-CFLAGS += $(shell libgcrypt-config --cflags) +-CPPFLAGS += -DVERSION=\"$(VERSION)\" $(OPENSSL_GPL_VIOLATION) +-LDFLAGS ?= -g +-LDFLAGS += $(shell libgcrypt-config --libs) $(OPENSSLLIBS) ++CC ?= gcc ++CFLAGS ?= -O3 -g ++CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings ++CFLAGS += $(shell libgcrypt-config --cflags) ++CPPFLAGS += $(OPENSSL_GPL_VIOLATION) ++LDFLAGS ?= -g ++LDFLAGS += $(shell libgcrypt-config --libs) $(OPENSSLLIBS) + + ifeq ($(shell uname -s), SunOS) + LDFLAGS += -lnsl -lresolv -lsocket +@@ -84,7 +82,7 @@ cisco-decrypt : cisco-decrypt.o decrypt- + $(CC) -o $@ $^ $(LDFLAGS) + + .depend: $(SRCS) $(BINSRCS) +- $(CC) -MM $(SRCS) $(BINSRCS) $(CFLAGS) $(CPPFLAGS) > $@ ++ $(CC) -MM $(SRCS) $(BINSRCS) $(CPPFLAGS) $(CFLAGS) > $@ + + vpnc-debug.c vpnc-debug.h : isakmp.h enum2debug.pl + LC_ALL=C perl -w ./enum2debug.pl isakmp.h >vpnc-debug.c 2>vpnc-debug.h diff --git a/package/vpnc/vpnc.mk b/package/vpnc/vpnc.mk index c4f23fa2ab..4d3e7b68a3 100644 --- a/package/vpnc/vpnc.mk +++ b/package/vpnc/vpnc.mk @@ -1,62 +1,28 @@ -############################################################# +################################################################################ # # vpnc # -############################################################# +################################################################################ -VPNC_VERSION=0.5.3 -VPNC_SOURCE=vpnc-$(VPNC_VERSION).tar.gz -VPNC_SITE=http://www.unix-ag.uni-kl.de/~massar/vpnc -VPNC_DIR=$(BUILD_DIR)/vpnc-$(VPNC_VERSION) -VPNC_CAT:=$(ZCAT) -VPNC_BINARY:=$(VPNC_DIR)/vpnc -VPNC_DEST_DIR:=$(TARGET_DIR)/usr/local/sbin -VPNC_TARGET_BINARY:=$(VPNC_DEST_DIR)/vpnc -VPNC_TARGET_SCRIPT:=$(TARGET_DIR)/etc/vpnc/default.conf +VPNC_VERSION = 0.5.3 +VPNC_SITE = http://www.unix-ag.uni-kl.de/~massar/vpnc +VPNC_LICENSE = GPLv2+ +VPNC_LICENSE_FILES = COPYING -$(DL_DIR)/$(VPNC_SOURCE): - $(call DOWNLOAD,$(VPNC_SITE),$(VPNC_SOURCE)) +VPNC_DEPENDENCIES = libgcrypt libgpg-error -$(VPNC_DIR)/.unpacked: $(DL_DIR)/$(VPNC_SOURCE) - $(VPNC_CAT) $(DL_DIR)/$(VPNC_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - toolchain/patch-kernel.sh $(VPNC_DIR) package/vpnc vpnc-$(VPNC_VERSION)\*.patch - touch $@ +VPNC_LDFLAGS = $(TARGET_LDFLAGS) -lgcrypt -lgpg-error +VPNC_CPPFLAGS = -DVERSION=\\\"$(VPNC_VERSION)\\\" -$(VPNC_BINARY): $(VPNC_DIR)/.unpacked - rm -f $@ - $(MAKE) $(TARGET_CONFIGURE_OPTS) INCLUDE=$(STAGING_DIR)/usr/include \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDFLAGS+=-lgcrypt LDFLAGS+=-lgpg-error LDFLAGS+="$(TARGET_CFLAGS)" \ - CC="$(TARGET_CC)" -C $(VPNC_DIR) +define VPNC_BUILD_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \ + CPPFLAGS="$(VPNC_CPPFLAGS)" LDFLAGS="$(VPNC_LDFLAGS)" +endef -$(VPNC_TARGET_BINARY): $(VPNC_BINARY) - $(MAKE) $(TARGET_CONFIGURE_OPTS) \ - DESTDIR=$(TARGET_DIR) \ - BINDIR=/usr/local/bin \ - SBINDIR=/usr/local/sbin \ - ETCDIR=/etc/vpnc \ - MANDIR=/usr/share/man \ - VERSION=$(VPNC_VERSION) \ - INCLUDE=$(STAGING_DIR)/usr/include \ - LDFLAGS="-lgcrypt -lgpg-error $(TARGET_CFLAGS)" \ - -C $(VPNC_DIR) install - $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(VPNC_TARGET_BINARY) +define VPNC_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) install $(TARGET_CONFIGURE_OPTS) \ + CPPFLAGS="$(VPNC_CPPFLAGS)" LDFLAGS="$(VPNC_LDFLAGS)" \ + DESTDIR="$(TARGET_DIR)" PREFIX=/usr +endef -vpnc: libgcrypt $(VPNC_TARGET_BINARY) - -vpnc-source: $(DL_DIR)/$(VPNC_SOURCE) - -vpnc-clean: - -$(MAKE) -C $(VPNC_DIR) clean - rm -f $(STAGING_DIR)/usr/bin/vpnc - -vpnc-dirclean: - rm -rf $(VPNC_DIR) -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_VPNC),y) -TARGETS+=vpnc -endif +$(eval $(generic-package)) diff --git a/package/vsftpd/Config.in b/package/vsftpd/Config.in index 8414c88f72..54ef7bdc73 100644 --- a/package/vsftpd/Config.in +++ b/package/vsftpd/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_VSFTPD bool "vsftpd" + depends on BR2_USE_MMU # fork() help vsftpd is an ftp daemon written with security in mind. http://vsftpd.beasts.org/ diff --git a/package/vsftpd/vsftpd-2.3.2-dont-force-largefile.patch b/package/vsftpd/vsftpd-dont-force-largefile.patch similarity index 100% rename from package/vsftpd/vsftpd-2.3.2-dont-force-largefile.patch rename to package/vsftpd/vsftpd-dont-force-largefile.patch diff --git a/package/vsftpd/vsftpd.mk b/package/vsftpd/vsftpd.mk index 64a56ccf22..c54499654d 100644 --- a/package/vsftpd/vsftpd.mk +++ b/package/vsftpd/vsftpd.mk @@ -1,13 +1,14 @@ -############################################################# +################################################################################ # # vsftpd # -############################################################# -VSFTPD_VERSION = 2.3.2 -VSFTPD_SOURCE = vsftpd-$(VSFTPD_VERSION).tar.gz -VSFTPD_SITE = ftp://vsftpd.beasts.org/users/cevans +################################################################################ +VSFTPD_VERSION = 3.0.2 +VSFTPD_SITE = https://security.appspot.com/downloads VSFTPD_LIBS = -lcrypt +VSFTPD_LICENSE = GPLv2 +VSFTPD_LICENSE_FILES = COPYING define VSFTPD_ENABLE_SSL $(SED) 's/.*VSF_BUILD_SSL/#define VSF_BUILD_SSL/' $(@D)/builddefs.h @@ -15,7 +16,7 @@ endef ifeq ($(BR2_PACKAGE_OPENSSL),y) VSFTPD_DEPENDENCIES += openssl -VSFTPD_LIBS += -lssl +VSFTPD_LIBS += -lssl -lcrypto VSFTPD_POST_CONFIGURE_HOOKS += VSFTPD_ENABLE_SSL endif @@ -24,6 +25,11 @@ VSFTPD_DEPENDENCIES += libcap VSFTPD_LIBS += -lcap endif +ifeq ($(BR2_PACKAGE_LINUX_PAM),y) +VSFTPD_DEPENDENCIES += linux-pam +VSFTPD_LIBS += -lpam +endif + define VSFTPD_BUILD_CMDS $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \ LDFLAGS="$(TARGET_LDFLAGS)" LIBS="$(VSFTPD_LIBS)" -C $(@D) @@ -38,6 +44,10 @@ define VSFTPD_INSTALL_TARGET_CMDS test -f $(TARGET_DIR)/etc/init.d/S70vsftpd || \ $(INSTALL) -D -m 755 package/vsftpd/vsftpd-init \ $(TARGET_DIR)/etc/init.d/S70vsftpd + test -f $(TARGET_DIR)/etc/vsftpd.conf || \ + $(INSTALL) -D -m 644 $(@D)/vsftpd.conf \ + $(TARGET_DIR)/etc/vsftpd.conf + install -d -m 700 $(TARGET_DIR)/usr/share/empty endef define VSFTPD_UNINSTALL_TARGET_CMDS @@ -51,4 +61,4 @@ define VSFTPD_CLEAN_CMDS -$(MAKE) -C $(@D) clean endef -$(eval $(call GENTARGETS,package,vsftpd)) +$(eval $(generic-package)) diff --git a/package/vtun/Config.in b/package/vtun/Config.in index b40de255bc..c1f6d384fc 100644 --- a/package/vtun/Config.in +++ b/package/vtun/Config.in @@ -1,11 +1,16 @@ config BR2_PACKAGE_VTUN - bool "vtun - BEWARE: read package/vtun/README.txt before use" + bool "vtun" select BR2_PACKAGE_LZO select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + depends on BR2_USE_MMU # fork() help Tool for easily creating Virtual Tunnels over TCP/IP networks with traffic shaping, compression, and encryption. It supports IP, PPP, SLIP, Ethernet and other tunnel types. + NOTE: It uses start-stop-daemon in init script, so be sure + to enable that within busybox + http://vtun.sourceforge.net/ diff --git a/package/vtun/README.txt b/package/vtun/README.txt deleted file mode 100644 index 5ee047958d..0000000000 --- a/package/vtun/README.txt +++ /dev/null @@ -1,37 +0,0 @@ -Previous vtun was version 2.6. -This does not buld because its "configure" requires -that -llzo contains "lzolx_decompress". -"vtun" does not build, evenm if liblzo is available. - -The LZO package currently used by buildroot -does not contain ANY reference to "lzolx_decompress" - -"vtun" has been upgraded to 3.0.2 and now builds OK, -but is yet to be tested on a target. -The previous patch containing three diffs, -has been broken up into three files. - -The second patch fails. - -This patch tries to replace a perl script -($(VTUN_DIR)/scripts/vtund.rc.debian) -with a shell script with the same name. - -In vtun-3.0.2, vtund.rc.debian is a shell script which is -fairly similar to the shell script provided by the patch. -For now, it has been decided not to replace this shell -script with the script generated by the patch for 2.6 - -vtun will thus be built with the 3.0.2 vtund.rc.debian. -The start-stop-daemon parameters and other things -in this script may be inappropriate for something based on busybox. - -I will leave the decision which script to use, -the 2-6 script or the 3.0.2 script to someone else. - -Both files are kept in the directory, but should -be removed once it has been decided what to do -about this script. - -Signed-Off by: Ulf Samuelsson - diff --git a/package/vtun/vtun-001-fix-installation.patch b/package/vtun/vtun-001-fix-installation.patch new file mode 100644 index 0000000000..d9659fa885 --- /dev/null +++ b/package/vtun/vtun-001-fix-installation.patch @@ -0,0 +1,44 @@ +Makefile.in: fix installation steps + +Not sure what the reason for that patch is, but originally added by Ulf +Samuelsson , when upgrading from 2.6.x to 3.0.2. + +yann.morin.1998@free.fr: the initial commit in the Buildroot tree had the +SoB by Ulf, but it was not explicitly reproduced here in the patch; so I +added it here directly in the patch. + +Somewhat-signed-off-by: Ulf Samuelsson +Signed-off-by: "Yann E. MORIN" +diff -durN vtun-3.0.3.orig/Makefile.in vtun-3.0.3/Makefile.in +--- vtun-3.0.3.orig/Makefile.in 2012-07-09 06:55:38.000000000 +0200 ++++ vtun-3.0.3/Makefile.in 2013-02-16 23:28:47.034036869 +0100 +@@ -28,7 +28,7 @@ + LEXFLAGS = -t + + INSTALL = @INSTALL@ +-INSTALL_OWNER = -o root -g 0 ++INSTALL_OWNER = + + prefix = @prefix@ + exec_prefix = @exec_prefix@ +@@ -89,16 +89,15 @@ + + install_config: + $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(ETC_DIR) +- if [ ! -f $(ETC_DIR)/vtund.conf ]; then \ +- $(INSTALL) -m 600 $(INSTALL_OWNER) vtund.conf $(DESTDIR)$(ETC_DIR); \ +- fi ++ $(INSTALL) -m 600 $(INSTALL_OWNER) vtund.conf $(DESTDIR)$(ETC_DIR); ++ $(INSTALL) -m 600 $(INSTALL_OWNER) scripts/vtund-start.conf $(DESTDIR)$(ETC_DIR); + + install: vtund install_config install_man +- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(VAR_DIR)/run + $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(STAT_DIR) + $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(LOCK_DIR) + $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(SBIN_DIR) + $(INSTALL) -m 755 $(INSTALL_OWNER) vtund $(DESTDIR)$(SBIN_DIR) +- $(BIN_DIR)/strip $(DESTDIR)$(SBIN_DIR)/vtund ++ $(INSTALL) -m 755 -D $(INSTALL_OWNER) scripts/vtund.rc.debian \ ++ $(DESTDIR)$(ETC_DIR)/init.d/S90vtun + + # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/package/vtun/vtun-002-fix-ssl-headers-checks.patch b/package/vtun/vtun-002-fix-ssl-headers-checks.patch new file mode 100644 index 0000000000..765411af84 --- /dev/null +++ b/package/vtun/vtun-002-fix-ssl-headers-checks.patch @@ -0,0 +1,47 @@ +configure.in: do not hard-code search patch for SSL headers + +Do. Not. Do. That. It breaks cross-compilation. + +Also use the SSL headers dir to look for blowfish headers. + +Signed-off-by: "Yann E. MORIN" + +diff -durN vtun-3.0.3.orig/configure.in vtun-3.0.3/configure.in +--- vtun-3.0.3.orig/configure.in 2009-03-29 12:08:51.000000000 +0200 ++++ vtun-3.0.3/configure.in 2013-02-16 23:44:44.004339680 +0100 +@@ -166,7 +166,7 @@ + AC_MSG_RESULT() + AC_CHECKING( for md5 Library and Header files ... ) + AC_SEARCH_HEADERS(md5.h, +- $SSL_HDR_DIR /usr/include/openssl "" /usr/include /usr/include/ssl /usr/local/include /usr/local/ssl/include /usr/include/sys, ++ $SSL_HDR_DIR "" , + , + AC_MSG_ERROR( SSL headers not found. ) + ) +@@ -176,7 +176,7 @@ + AC_MSG_RESULT() + AC_CHECKING( for blowfish Library and Header files ... ) + AC_SEARCH_HEADERS(blowfish.h, +- $BLOWFISH_HDR_DIR /usr/include/ssl /usr/include/openssl /usr/include /usr/local/include /usr/local/ssl/include /usr/include/crypto, ++ $BLOWFISH_HDR_DIR $SSL_HDR_DIR, + AC_CHECK_LIB(crypto, BF_set_key, + [ + LIBS="$LIBS -lcrypto" +@@ -193,7 +193,7 @@ + AC_MSG_RESULT() + AC_CHECKING( for AES Library and Header files ... ) + AC_SEARCH_HEADERS(aes.h, +- $SSL_HDR_DIR /usr/include/ssl /usr/include/openssl /usr/include /usr/local/include /usr/local/ssl/include /usr/include/crypto, ++ $SSL_HDR_DIR , + AC_CHECK_LIB(crypto, AES_set_encrypt_key, + [ + AC_DEFINE(HAVE_SSL_AES) +@@ -208,7 +208,7 @@ + AC_MSG_RESULT() + AC_CHECKING( for EVP Library and Header files ... ) + AC_SEARCH_HEADERS(evp.h, +- $SSL_HDR_DIR /usr/include/ssl /usr/include/openssl /usr/include /usr/local/include /usr/local/ssl/include /usr/include/crypto, ++ $SSL_HDR_DIR , + AC_CHECK_LIB(crypto, EVP_EncryptInit, + [ + AC_DEFINE(HAVE_SSL_EVP) diff --git a/package/vtun/vtun-003-fixup-configure.in.patch b/package/vtun/vtun-003-fixup-configure.in.patch new file mode 100644 index 0000000000..cb2ac67aa2 --- /dev/null +++ b/package/vtun/vtun-003-fixup-configure.in.patch @@ -0,0 +1,92 @@ +configure.in: minimal syntax fixup for autoreconf + +This is the strictly minimal syntax fixups to make autoreconf happy... + +Signed-off-by: "Yann E. MORIN" + +--- +Note: configure.in is still full of incorrect syntax, but fixing it is +a task for another day, and would have to be upstreamed. But upstream +looks to be moribund at best, if not dead... :-( + +So, keep it for ourselves for now... Too bad, vtun is really helpfull. + +--- vtun-3.0.3.orig/configure.in 2013-02-16 23:54:52.582451817 +0100 ++++ vtun-3.0.3/configure.in 2013-02-17 00:03:13.640887353 +0100 +@@ -110,10 +110,10 @@ + AC_SEARCH_LIBS(nanosleep, rt posix4) + + dnl Check for setproctitle in libutil +-AC_SEARCH_LIBS(setproctitle, util bsd, AC_DEFINE(HAVE_SETPROC_TITLE) ) ++AC_SEARCH_LIBS(setproctitle, util bsd, AC_DEFINE([HAVE_SETPROC_TITLE],[],[Define to set title in /proc]) ) + + if test "$SHAPER" = "yes"; then +- AC_DEFINE(HAVE_SHAPER) ++ AC_DEFINE([HAVE_SHAPER],[],[Define to use shapper]) + fi + + if test "$ZLIB" = "yes"; then +@@ -121,7 +121,7 @@ + AC_CHECKING( for ZLIB Library and Header files ... ) + AC_CHECK_LIB(z, deflate, + LIBS="$LIBS -lz" +- AC_DEFINE(HAVE_ZLIB), ++ AC_DEFINE([HAVE_ZLIB],[],[Define to use ZLIB]), + AC_MSG_ERROR( Zlib library not found.) + ) + fi +@@ -148,7 +148,7 @@ + AC_CHECK_LIB($I, lzo1x_decompress, + [ + LIBS="$LIBS -l"$I +- AC_DEFINE(HAVE_LZO) ++ AC_DEFINE([HAVE_LZO],[],[Define to use LZO]) + havelzo=1 + ] + ) +@@ -180,8 +180,8 @@ + AC_CHECK_LIB(crypto, BF_set_key, + [ + LIBS="$LIBS -lcrypto" +- AC_DEFINE(HAVE_SSL) +- AC_DEFINE(HAVE_SSL_BLOWFISH) ++ AC_DEFINE([HAVE_SSL],[],[Define to use SSL]) ++ AC_DEFINE([HAVE_SSL_BLOWFISH],[],[Define to use blowfish]) + ], + AC_MSG_ERROR( SSL library not found. ) + ), +@@ -196,7 +196,7 @@ + $SSL_HDR_DIR , + AC_CHECK_LIB(crypto, AES_set_encrypt_key, + [ +- AC_DEFINE(HAVE_SSL_AES) ++ AC_DEFINE([HAVE_SSL_AES],[],[Define to use AES]) + ], + AC_MSG_ERROR( AES library not found. ) + ), +@@ -211,7 +211,7 @@ + $SSL_HDR_DIR , + AC_CHECK_LIB(crypto, EVP_EncryptInit, + [ +- AC_DEFINE(HAVE_SSL_EVP) ++ AC_DEFINE([HAVE_SSL_EVP],[],Define to use EVP) + ], + AC_MSG_ERROR( EVP library not found. ) + ), +@@ -220,7 +220,7 @@ + fi + + if test "$NATHACK" = "yes"; then +- AC_DEFINE(ENABLE_NAT_HACK) ++ AC_DEFINE([ENABLE_NAT_HACK],[],[Define to use NAT hack]) + fi + + if test "$SOCKS" = "yes"; then +@@ -274,6 +274,6 @@ + REL=`echo 'BRANCH-3_X' | tr -d '$: \-' | sed 's/^[A-Za-z]*//' | sed 's/\_/\./'` + changequote([,]) + +-AC_DEFINE_UNQUOTED(VTUN_VER, "$REL `date '+%m/%d/%Y'`") ++AC_DEFINE_UNQUOTED([VTUN_VER], ["$REL `date '+%m/%d/%Y'`"], [vtun version]) + + AC_OUTPUT(Makefile) diff --git a/package/vtun/vtun-3.0.2-001-Makefile.in.patch b/package/vtun/vtun-3.0.2-001-Makefile.in.patch deleted file mode 100644 index 1f93969260..0000000000 --- a/package/vtun/vtun-3.0.2-001-Makefile.in.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -urN vtun/Makefile.in vtun-2.6/Makefile.in ---- vtun/Makefile.in 2002-12-20 09:55:47.000000000 -0700 -+++ vtun-2.6/Makefile.in 2003-06-05 12:38:31.000000000 -0600 -@@ -28,7 +28,7 @@ - LEXFLAGS = -t - - INSTALL = @INSTALL@ --INSTALL_OWNER = -o root -g 0 -+INSTALL_OWNER = - - prefix = @prefix@ - exec_prefix = @exec_prefix@ -@@ -86,15 +86,15 @@ - - install_config: - $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(ETC_DIR) -- if [ ! -f $(ETC_DIR)/vtund.conf ]; then \ -- $(INSTALL) -m 600 $(INSTALL_OWNER) vtund.conf $(DESTDIR)$(ETC_DIR); \ -- fi -+ $(INSTALL) -m 600 $(INSTALL_OWNER) vtund.conf $(DESTDIR)$(ETC_DIR); -+ $(INSTALL) -m 600 $(INSTALL_OWNER) scripts/vtund-start.conf $(DESTDIR)$(ETC_DIR); - - install: vtund install_config install_man -- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(VAR_DIR)/run - $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(STAT_DIR) - $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(LOCK_DIR) - $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(SBIN_DIR) - $(INSTALL) -m 755 $(INSTALL_OWNER) vtund $(DESTDIR)$(SBIN_DIR) -+ $(INSTALL) -m 755 -D $(INSTALL_OWNER) scripts/vtund.rc.debian \ -+ $(DESTDIR)$(ETC_DIR)/init.d/S90vtun - - # DO NOT DELETE THIS LINE -- make depend depends on it. - diff --git a/package/vtun/vtun-3.0.2-003-configure.patch b/package/vtun/vtun-3.0.2-003-configure.patch deleted file mode 100644 index 7ddc0431a3..0000000000 --- a/package/vtun/vtun-3.0.2-003-configure.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- vtun-2.6/configure.dist 2004-03-11 10:39:10.000000000 -0600 -+++ vtun-2.6/configure 2004-03-11 10:45:52.000000000 -0600 -@@ -2112,7 +2112,7 @@ - echo $ac_n "checking "for blowfish.h"""... $ac_c" 1>&6 - echo "configure:2114: checking "for blowfish.h"" >&5 - ac_hdr_found=no -- for p in $BLOWFISH_HDR_DIR /usr/include/ssl /usr/include/openssl /usr/include /usr/local/include /usr/local/ssl/include /usr/include/crypto; do -+ for p in $BLOWFISH_HDR_DIR $SSL_HDR_DIR /usr/include/ssl /usr/include/openssl /usr/include /usr/local/include /usr/local/ssl/include /usr/include/crypto; do - if test -n "$p"; then - dir="$p" - else - diff --git a/package/vtun/vtun.mk b/package/vtun/vtun.mk index 78ea44f3bb..7c0e70abdb 100644 --- a/package/vtun/vtun.mk +++ b/package/vtun/vtun.mk @@ -1,19 +1,17 @@ -############################################################# +################################################################################ # # vtun # -# NOTE: Uses start-stop-daemon in init script, so be sure -# to enable that within busybox -# -############################################################# -VTUN_VERSION:=3.0.2 -VTUN_SOURCE:=vtun-$(VTUN_VERSION).tar.gz -VTUN_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/vtun/ -VTUN_DEPENDENCIES = zlib lzo openssl +################################################################################ + +VTUN_VERSION = 3.0.3 +VTUN_SITE = http://downloads.sourceforge.net/project/vtun/vtun/$(VTUN_VERSION) +VTUN_DEPENDENCIES = host-bison host-flex zlib lzo openssl +VTUN_AUTORECONF = YES VTUN_CONF_OPT = \ --with-ssl-headers=$(STAGING_DIR)/usr/include/openssl \ --with-lzo-headers=$(STAGING_DIR)/usr/include/lzo \ --with-lzo-lib=$(STAGING_DIR)/usr/lib -$(eval $(call AUTOTARGETS,package,vtun)) +$(eval $(autotools-package)) diff --git a/package/vtun/vtund.rc.debian-2.6 b/package/vtun/vtund.rc.debian-2.6 deleted file mode 100644 index eb8226e9cb..0000000000 --- a/package/vtun/vtund.rc.debian-2.6 +++ /dev/null @@ -1,50 +0,0 @@ -#! /bin/sh -# - -PATH=/bin:/usr/bin:/sbin:/usr/sbin -DAEMON=/usr/sbin/vtund -CONFFILE=/etc/vtund-start.conf -PIDPREFIX=/var/run/vtund - -test -f $DAEMON || exit 0 - -case "$1" in - start) - # find all the defined tunnels - egrep -v '^[:space:]*(#.*)?$' $CONFFILE | while true; - do - read i - # no more lines available? done, then. - if [ $? != 0 ] ; then break; fi - SARGS=`echo $i|sed -ne 's/--server--\s*/-s -P /p'`; - if [ -n "$SARGS" ]; - then - echo "Starting vtund server." - start-stop-daemon -S -x $DAEMON -- $SARGS; - else - # split args into host and rest - HOST=`echo $i|cut -f 1 -d " "`; - TARGET=`echo $i|cut -f 2 -d " "`; - echo "Starting vtund client $HOST to $TARGET."; - start-stop-daemon -S -x $DAEMON -- $i; - - fi - done - ;; - stop) - echo "Stopping vtund."; - start-stop-daemon -K -x vtund; - ;; - - restart|reload|force-reload) - $0 stop - sleep 1; - $0 start - ;; - *) - echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2 - exit 1 - ;; -esac -exit 0 - diff --git a/package/vtun/vtund.rc.debian-3.0.2 b/package/vtun/vtund.rc.debian-3.0.2 deleted file mode 100644 index 5158663f16..0000000000 --- a/package/vtun/vtund.rc.debian-3.0.2 +++ /dev/null @@ -1,61 +0,0 @@ -#! /bin/sh -# -# submitted by Morgon Kanter -# - -PATH=/bin:/usr/bin:/sbin:/usr/sbin -DAEMON=/usr/sbin/vtund -CONFFILE=/etc/vtund-start.conf -PIDPREFIX=/var/run/vtund - -test -f $DAEMON || exit 0 - -case "$1" in - start) - # find all the defined tunnels - egrep -v '^[:space:]*(#.*)?$' $CONFFILE | while true; - do - read i - # no more lines available? done, then. - if [ $? != 0 ] ; then break; fi - SARGS=`echo $i|sed -ne 's/--server--\s*/-s -P /p'`; - if [ -n "$SARGS" ]; - then - echo "Starting vtund server." - start-stop-daemon --start --exec $DAEMON --pidfile $PIDPREFIX.pid -- $SARGS; - else - # split args into host and rest - HOST=`echo $i|cut -f 1 -d " "`; - TARGET=`echo $i|cut -f 2 -d " "`; - echo "Starting vtund client $HOST to $TARGET."; - start-stop-daemon --start --exec $DAEMON --pidfile $PIDPREFIX.$HOST.pid -- $i; - - fi - done - ;; - stop) - echo "Stopping vtund."; - for i in $PIDPREFIX*; - do - start-stop-daemon --stop --pidfile $i; - rm -f $i; - done - ;; - reload|force-reload) - echo "Reloading vtund."; - for i in $PIDPREFIX*; - do - start-stop-daemon --stop --signal 1 --pidfile $i; - done - ;; - restart) - $0 stop - sleep 1; - $0 start - ;; - *) - echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2 - exit 1 - ;; -esac -exit 0 diff --git a/package/w_scan/Config.in b/package/w_scan/Config.in new file mode 100644 index 0000000000..4487b0a869 --- /dev/null +++ b/package/w_scan/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_W_SCAN + bool "w_scan" + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + w_scan is a small command line utility used to perform frequency + scans for DVB and ATSC transmissions. It is capable of creating + channels.conf files (in different output formats !) as well as + initial tuning data for scan. + + http://wirbel.htpc-forum.de/w_scan/index_en.html diff --git a/package/w_scan/w_scan.mk b/package/w_scan/w_scan.mk new file mode 100644 index 0000000000..5ca02b8f23 --- /dev/null +++ b/package/w_scan/w_scan.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# w_scan +# +################################################################################ + +W_SCAN_VERSION = 20130331 +W_SCAN_SOURCE = w_scan-$(W_SCAN_VERSION).tar.bz2 +W_SCAN_SITE = http://wirbel.htpc-forum.de/w_scan +W_SCAN_LICENSE = GPLv2+ +W_SCAN_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +W_SCAN_DEPENDENCIES += libiconv +W_SCAN_CONF_ENV += LIBS=-liconv +endif + +$(eval $(autotools-package)) diff --git a/package/multimedia/wavpack/Config.in b/package/wavpack/Config.in similarity index 100% rename from package/multimedia/wavpack/Config.in rename to package/wavpack/Config.in diff --git a/package/wavpack/wavpack.mk b/package/wavpack/wavpack.mk new file mode 100644 index 0000000000..a7c703feae --- /dev/null +++ b/package/wavpack/wavpack.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# wavpack +# +################################################################################ + +WAVPACK_VERSION = 4.60.1 +WAVPACK_SITE = http://www.wavpack.com +WAVPACK_SOURCE = wavpack-$(WAVPACK_VERSION).tar.bz2 +WAVPACK_INSTALL_STAGING = YES +# configure not up to date +WAVPACK_AUTORECONF = YES +WAVPACK_DEPENDENCIES = $(if $(BR2_ENABLE_LOCALE),,libiconv) +WAVPACK_LICENSE = BSD-3c +WAVPACK_LICENSE_FILES = license.txt + +$(eval $(autotools-package)) diff --git a/package/wayland/Config.in b/package/wayland/Config.in new file mode 100644 index 0000000000..c92f9ea1fc --- /dev/null +++ b/package/wayland/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_WAYLAND + bool "wayland" + depends on !BR2_avr32 # no epoll_create1, timerfd_create or timerfd_settime + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBFFI + select BR2_PACKAGE_EXPAT + help + Wayland is a project to define a protocol for a compositor + to talk to its clients as well as a library implementation + of the protocol. + + http://wayland.freedesktop.org/ + +comment "wayland needs a toolchain w/ threads" + depends on !BR2_avr32 + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/wayland/wayland.mk b/package/wayland/wayland.mk new file mode 100644 index 0000000000..b6fa4bef1b --- /dev/null +++ b/package/wayland/wayland.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# wayland +# +################################################################################ + +WAYLAND_VERSION = 1.3.0 +WAYLAND_SITE = http://wayland.freedesktop.org/releases/ +WAYLAND_SOURCE = wayland-$(WAYLAND_VERSION).tar.xz +WAYLAND_LICENSE = MIT +WAYLAND_LICENSE_FILES = COPYING + +WAYLAND_INSTALL_STAGING = YES +WAYLAND_DEPENDENCIES = libffi host-pkgconf expat host-expat + +# wayland needs a wayland-scanner program to generate some of its +# source code. By default, it builds it with CC, so it doesn't work with +# cross-compilation. Therefore, we build it manually, and tell wayland +# that the tool is already available. +WAYLAND_CONF_OPT = --disable-scanner + +define WAYLAND_BUILD_SCANNER + (cd $(@D)/src/; \ + $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) \ + -o wayland-scanner scanner.c wayland-util.c -lexpat; \ + $(INSTALL) -m 0755 -D wayland-scanner \ + $(HOST_DIR)/usr/bin/wayland-scanner) +endef + +WAYLAND_POST_CONFIGURE_HOOKS += WAYLAND_BUILD_SCANNER + +$(eval $(autotools-package)) diff --git a/package/webif/Config.in b/package/webif/Config.in deleted file mode 100644 index 2ecbf36566..0000000000 --- a/package/webif/Config.in +++ /dev/null @@ -1,28 +0,0 @@ -config BR2_PACKAGE_WEBIF - bool "webif - Status Console" - depends on BR2_PACKAGE_BUSYBOX # httpd - depends on BR2_DEPRECATED - select BR2_PACKAGE_HASERL - help - A web interface for showing different network status. This package - requires awk support on the system, either the one provided by - Busybox or gawk. - - The default login on the status web pages are root/root and - admin/admin. This can be changed in the etc/httpd.conf file. - -config BR2_PACKAGE_WEBIF_INSTALL_INDEX_HTML - bool "instal index.html in /www which redirects to webif" - depends on BR2_PACKAGE_WEBIF - help - Installs a /www/index.html which redirects to the status console cgi - scripts. - -config BR2_PACKAGE_WEBIF_LANGUAGES - bool "install language support" - depends on BR2_PACKAGE_WEBIF - help - This option installs support for other languages than english. - - Supported languages: ca, cz, de, dk, ee, es, fr, hr, hu, it, nl, no, - pl, pt, ru and se. diff --git a/package/webif/files/etc/httpd.conf b/package/webif/files/etc/httpd.conf deleted file mode 100644 index 9e125daba2..0000000000 --- a/package/webif/files/etc/httpd.conf +++ /dev/null @@ -1,8 +0,0 @@ -.asp:text/html -/cgi-bin/webif:root:root -/cgi-bin/webif:admin:admin -.svg:image/svg+xml -.png:image/png -.gif:image/gif -.jpg:image/jpg - diff --git a/package/webif/files/usr/lib/webif/apply.sh b/package/webif/files/usr/lib/webif/apply.sh deleted file mode 100755 index 9cbadf44a2..0000000000 --- a/package/webif/files/usr/lib/webif/apply.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/ash -# -# Default handlers for config files -# -HANDLERS_config=' - wireless) reload_wireless;; - network) reload_network;; - system) reload_system;; -' -HANDLERS_file=' - hosts) rm -f /etc/hosts; mv $config /etc/hosts; killall -HUP dnsmasq ;; - ethers) rm -f /etc/ethers; mv $config /etc/ethers; killall -HUP dnsmasq ;; - firewall) mv /tmp/.webif/file-firewall /etc/config/firewall && /etc/init.d/S45firewall;; -' - -# for some reason a for loop with "." doesn't work -eval "$(cat /usr/lib/webif/apply-*.sh 2>&-)" - -reload_network() { - echo '@TR<> @TR<> ...' - grep '^wan_' config-network >&- 2>&- && { - ifdown wan - ifup wan - killall -HUP dnsmasq - } - - grep '^lan_' config-network >&- 2>&- && { - ifdown lan - ifup lan - killall dnsmasq - /etc/init.d/S??dnsmasq - } -} - -reload_wireless() { - echo '@TR<> @TR<> ...' - killall nas >&- 2>&- && sleep 2 - ( - /sbin/wifi - [ -f /etc/init.d/S41wpa ] && /etc/init.d/S41wpa - ) >&- 2>&- <&- -} - -reload_system() { - echo '@TR<> @TR<> ...' - echo "$(nvram get wan_hostname)" > /proc/sys/kernel/hostname -} - -cd /tmp/.webif - -# file-* other config files -for config in $(ls file-* 2>&-); do - name=${config#file-} - echo "@TR<> @TR<>: $name" - eval 'case "$name" in - '"$HANDLERS_file"' - esac' -done - -# config-* simple config files -( - cd /proc/self - cat /tmp/.webif/config-* 2>&- | grep '=' >&- 2>&- && { - cat /tmp/.webif/config-* 2>&- | tee fd/1 | xargs -n1 nvram set - echo "@TR<> NVRAM ..." - nvram commit - } -) -for config in $(ls config-* 2>&-); do - name=${config#config-} - eval 'case "$name" in - '"$HANDLERS_config"' - esac' -done -sleep 2 -rm -f config-* diff --git a/package/webif/files/usr/lib/webif/categories.awk b/package/webif/files/usr/lib/webif/categories.awk deleted file mode 100644 index 00312c93da..0000000000 --- a/package/webif/files/usr/lib/webif/categories.awk +++ /dev/null @@ -1,27 +0,0 @@ -BEGIN { - n = 0 - sel = 0 - FS=":" -} -($3 == "category") && (categories !~ /:$4:/) { - categories = categories ":" $4 ":"; - n++ - if ($4 ~ "^" selected "$") sel = n - c[n] = $4 - if (f[$4] == "") f[$4] = rootdir "/" indexpage "?cat=" $4 -} -($3 == "name") && ((p[$4] == 0) || (p[$4] > int($5))) { - gsub(/^.*\//, "", $1); - p[$4] = int($5) + 1 - f[$4] = rootdir "/" $1 -} -END { - print "

      @TR<>:

      " -} diff --git a/package/webif/files/usr/lib/webif/common.awk b/package/webif/files/usr/lib/webif/common.awk deleted file mode 100644 index de3483e150..0000000000 --- a/package/webif/files/usr/lib/webif/common.awk +++ /dev/null @@ -1,38 +0,0 @@ -function start_form(title, field_opts, field_opts2) { - print "
      " - if (title != "") print "

      " title "

      " - print "
      " -} - -function end_form(form_help, form_help_link) { - print "
      " - if (form_help != "") form_help = "
      " form_help "
      " - print "

      @TR<>:

      " form_help form_help_link "
      " - print "
       
      " -} - -function textinput(name, value) { - return "" -} - -function hidden(name, value) { - return "" -} - -function button(name, caption) { - return ">\" />" -} - -function helpitem(name) { - return "
      @TR<<" name ">>:
      " -} - -function helptext(short, name) { - return "
      @TR<<" short "|" name ">>:
      " -} - -function sel_option(name, caption, default, sel) { - if (default == name) sel = " selected=\"selected\"" - else sel = "" - return "" -} diff --git a/package/webif/files/usr/lib/webif/form.awk b/package/webif/files/usr/lib/webif/form.awk deleted file mode 100644 index 808b99ebd9..0000000000 --- a/package/webif/files/usr/lib/webif/form.awk +++ /dev/null @@ -1,100 +0,0 @@ -# $1 = type -# $2 = form variable name -# $3 = form variable value -# $4 = (radio button) value of button -# $5 = string to append -# $6 = additional attributes - -BEGIN { - FS="|" -} - -# trim leading whitespaces -{ - gsub(/^[ \t]+/,"",$1) -} - -$1 ~ /^onchange/ { - onchange = $2 -} - -($1 != "") && ($1 !~ /^option/) && (select_open == 1) { - select_open = 0 - printf "" -} -$1 ~ /^start_form/ { - if ($3 != "") field_opts=" id=\"" $3 "\"" - else field_opts="" - if ($4 == "hidden") field_opts = field_opts " style=\"display: none\"" - start_form($2, field_opts); - print "" - form_help = "" - form_help_link = "" -} -$1 ~ /^field/ { - if (field_open == 1) print "" - if ($3 != "") field_opts=" id=\"" $3 "\"" - else field_opts="" - if ($4 == "hidden") field_opts = field_opts " style=\"display: none\"" - print "" - if ($2 != "") print "" - } - print "" -} -$1 ~ /^caption/ { print "" $2 "" } -$1 ~ /^string/ { print $2 } -$1 ~ /^text/ { print "" $4 } -$1 ~ /^password/ { print "" $4 } -$1 ~ /^upload/ { print "" } -$1 ~ /^submit/ { print "" } -$1 ~ /^helpitem/ { form_help = form_help "
      @TR<<" $2 ">>:
      " } -$1 ~ /^helptext/ { form_help = form_help "
      @TR<<" $2 ">>
      " } -$1 ~ /^helplink/ { form_help_link = "" } - -($1 ~ /^checkbox/) || ($1 ~ /^radio/) { - print $5 -} - -$1 ~ /^end_form/ { - if (field_open == 1) print "" - field_open = 0 - print "
      " $2 "" - else print "" - - field_open=1 -} -$1 ~ /^checkbox/ { - if ($3==$4) opts="checked=\"checked\" " - else opts="" - if (onchange != "") opts = opts " onClick=\"" onchange "()\" onChange=\"" onchange "()\"" - print "" -} -$1 ~ /^radio/ { - if ($3==$4) opts="checked=\"checked\" " - else opts="" - if (onchange != "") opts = opts " onClick=\"" onchange "()\" onChange=\"" onchange "()\"" - print "" -} -$1 ~ /^select/ { - opts = "" - if (onchange != "") opts = opts " onClick=\"" onchange "()\" onChange=\"" onchange "()\"" - print "
      " items[i] " @TR<>
      >\" />
      " - end_form(form_help, form_help_link); - form_help = "" - form_help_link = "" -} diff --git a/package/webif/files/usr/lib/webif/lang/ca/common.txt b/package/webif/files/usr/lib/webif/lang/ca/common.txt deleted file mode 100644 index 3d19974bc9..0000000000 --- a/package/webif/files/usr/lib/webif/lang/ca/common.txt +++ /dev/null @@ -1,226 +0,0 @@ -lang => Català -# Common -Settings saved => Canvis desats -Settings not saved => No s'han pogut desar els canvis -Save Changes => Desar canvis -Apply Changes => Aplicar canvis -Clear Changes => Desfer canvis -Review Changes => Comprovar canvis -Host Name => Nom de l'equip -Uptime => Uptime -Load => Càrrega del sistema -Version => Versió -Categories => Categories -Subcategories => Subcategories -more... => més... -Add => Afegir -Remove => Eliminar -Warning => Atenció -Password_warning => No heu establert una clau d'accés pel router (accés web i ssh). Per favor, elegiu-ne una ara (el nom d'usuari serà 'root') - -# Categories -Info => Info -About => Quant a -Router Info => Informació del router - -Status => Estat -Connections => Connexions -DHCP => DHCP -Wireless => Wi-Fi - -System => Sistema -Password => Clau -Settings => Configuració -Installed Software => Programes instal·lats -Firmware Upgrade => Actualitzar Firmware - -Network => Xarxa -LAN => LAN -WAN => Internet -Wireless => Wi-Fi -Advanced Wireless => Wi-Fi (avançat) -Hosts => Configuració de hosts - - -# 'About' page -Copyright => Copyright - -GPL_Text => Aquest programa és programari lliure; podeu redistribuir-lo i/o
      modificar-lo baix els termes de la General Public License
      tal i com està publicada per la Free Sofware Foundation; bé la versió 2 d'aquesta Llicència o bé (segons la seva elecció) de qualsevol posterior. -Contributions by => Contribuidors -Layout based on => Aspecte basat en -by => realitzat per - - -No config change. => No hi ha hagut canvis a la configuració. -Config discarded. => Els canvis no s'han acceptat. -Config changes: => Configuració actual: -Updating config... => Actualitzant la configuració... - - -# 'Router Info' page -Firmware Version => Versió del firmware -Kernel Version => Versió del Kernel -Current Date/Time => Data/Hora -MAC Address => Adreça MAC - - -# 'Connections' page -Connection Status => Estat de les connexions -Physical Connections => Connexions físiques -Router Connections => Connexions del router - - -# 'DHCP' page -DHCP leases => Préstecs DHCP -IP Address => Adreça IP -Name => Nom -Expires in => Caduca d'ara a - - -# 'Wireless Status' page -Wireless Status => Estat del Wi-Fi - -# 'Password' page -Password Change => Canvi de la clau -New Password => Nova clau -Confirm Password => Confirmeu la clau - -# 'System Settings' page -System Settings => Paràmetres del sistema -Host Name => Nom de l'host -Language => Idioma - -# 'Installed Software' page -Installed Packages => Paquets instal·lats -Update package lists => Actualització de la llista de paquets -Uninstall => Desinstal·lar -Install => Instal·lar - - -# 'Firmware Upgrade' page -Firmware format => Format del firmware -Error => Error -done => fet -Invalid_formt => Format del firmware invàlid -Erase_JFFS2 => Esborrar la partició JFFS2 -Options => Opcions -Firmware_image => Fitxer del firmware -Upgrade => Actualitzar -Upgrading... => Actualitzant... - -# 'LAN Settings' page -LAN Settings => Opcions LAN -LAN Configuration => Configuració LAN -Netmask => Màscara de subxarxa -Default Gateway => Porta d'enllaç (gateway) -DNS Servers => Servidor DNS -DNS Address => Adreça IP del DNS - -Note => Nota - -# 'WAN Settings' page -WAN Settings => Opcions d'Internet -WAN Configuration => Configuració d'Internet -PPTP Server IP => Adreça IP del servidor PPTP -Connection Type => Tipus de connexió -No WAN => Sense configuració d'Internet -DHCP => DHCP -Static IP => IP estàtica -IP Settings => Opcions IP -PPP Settings => Opcions PPP -Redial Policy => Política de reconnexió -Connect on Demand => Baix demanda -Keep Alive => Connexió permanent -Maximum Idle Time => Temps màxim d'inactivitat -Redial Timeout => Temps de reconnexió -MTU => MTU (mida dels paquets) -Username => Nom d'usuari - - -# 'Wireless Configuration' page -Wireless Configuration => Configuració Wi-Fi -Wireless Interface => Interfície Wi-Fi -WEP Key => Clau WEP -Selected WEP Key => Clau WEP seleccionada -WPA PSK => WPA-PSK -ESSID => ESSID -Channel => Canal -RADIUS IP Address => Adreça IP del servidor RADIUS -RADIUS Server Key => Secret RADIUS -Enabled => Actiu -Disabled => Inactiu -ESSID Broadcast => Difusió del SSID -Show => Mostrar -Hide => Ocultar -WLAN Mode => Mode Wi-Fi -Access Point => Punt d'accés -Client => Client -Bridge => Bridge -Ad-Hoc => Ad-Hoc -Operation mode => Mode de funcionament -Encryption Settings => Paràmetres d'enriptació -Encryption Type => Tipus d'encriptació -PSK => PSK -WPA Mode => Mode WPA -WPA Algorithms => Algoritmes WPA -WEP Keys => Clau WEP - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => Configuració Wi-Fi avançada -WDS Connections => Connexions WDS -MAC Filter List => Filtrat per adreça MAC -Filter Mode => Mode de filtrat -Allow => Autoritzar -Deny => Denegar -Set => Establir -Settings => Paràmetres -Automatic WDS => WDS automàtic - -# "Hosts" page - -MAC Address => Adreça MAC -Configured Hosts => Equips configurats -DHCP Static => Entrades DHCP estàtiques -Host Names => Nom dels equips - -Up => Pujar -Down => Baixar -Edit => Editar -Delete => Esborrar -Save => Desar -Cancel => Rebutjar - -Forward => Redirigir -Accept => Acceptar -Drop => Rebutjar - -Firewall => Firewall -Firewall Rules => Regles del Firewall -Firewall Configuration => Configuració del Firewall - -New Rule => Nova regla -Match => Filtrar -Target => Acció -Port => Port - -Protocol => Protocol -Source IP => IP origen -Destination IP => IP destí -Source Ports => Ports origen -Destination Ports => Ports destí - -Forward to => Redirigir a -Port => Port - -Helptext ESSID => SSID -Helptext DNS save => És recomanable desar els canvis abans d'afegir o eliminar servidors DNS a la llista - -Helptext Operation mode => Estableix el mode d'operació de la xarxa inalàmbrica (Wi-Fi) 'Client (bridge)' no canviarà la configuració de la interfície de xarxa. Simplement afegirà uns paràmetres que permetran que la interfície wireless actui en certa mida com un bridge. -Helptext Encryption Type => 'WPA (RADIUS)' només pot emprar-se en mode Punt d'Accés.
      'WPA (PSK)' no funciona en mode Ad-Hoc. -Helptext IP Settings => Les opcions IP són opcionals per a DHCP y PPTP. Si les elegiu, s'empraran per defecte en cas de que la configuració automàtica falli. -Helptext Idle Time => Nombre de segons sense activitat amb Internet que ha d'esperar el router abans de desconectar-se. (Només pel mode Baix Demanda). -Helptext Redial Timeout => Nombre de segons sense rebre resposta del servidor que ha d'esperar el router per a tornar a connectar-se. - -# untranslated: -Available packages => Paquets disponibles - diff --git a/package/webif/files/usr/lib/webif/lang/cz/common.txt b/package/webif/files/usr/lib/webif/lang/cz/common.txt deleted file mode 100644 index 773e9d9011..0000000000 --- a/package/webif/files/usr/lib/webif/lang/cz/common.txt +++ /dev/null @@ -1,225 +0,0 @@ -lang => Česky -# Common -Settings saved => Nastavení uloženo -Settings not saved => Nastavení nebylo uloženo -Save Changes => Uložit zmĕny -Apply Changes => Provést zmĕny -Clear Changes => Vymazat zmĕny -Review Changes => Prohlédnout zmĕny -Host Name => Hostname -Uptime => Uptime -Load => Zatížení -Version => Verze -Categories => Kategorie -Subcategories => Podkategorie -more... => více... -Add => Přidat -Remove => Odebrat -Warning => Varování -Password_warning => není nastaveno žádné heslo pro přístup do webové administrace a přes SSH.
      Nastavte jej prosím nyní (Login ve webu používejte: 'root'). - -# Categories -Info => Info -About => Projekt -Router Info => Router - -Status => Stav -Connections => Připojení -DHCP => DHCP -Wireless => WLAN - -System => Systém -Password => Heslo -Settings => Nastavení -Installed Software => Nainstalovaný software -Firmware Upgrade => Flashnutí firmware - -Network => Síť -LAN => LAN -WAN => WAN port -Wireless => WLAN -Advanced Wireless => WLAN (podrobné) -Hosts => Stanice (hosts) - - -# 'About' page -Copyright => Copyright - -GPL_Text => Tento program patří mezi volný software, můžete jej distribuovat a/nebo mĕnit pod podmínkami uvedenými
      v licenci GNU GPL (General Public License) vydanými Nadací pro svobodný software (Free Software Foundation),
      její druhé verze, případnĕ pozdĕjších verzí. -Contributions by => S přispĕním -Layout based on => Layout postaven na -by => od - - -No config change. => Nebyly provedeny žádné zmĕny konfigurace. -Config discarded. => Vaše nastavení byla zahozena. -Config changes: => Aktuální zmĕny konfigurace: -Updating config... => Aktualizuji konfiguraci... - - -# 'Router Info' page -Firmware Version => Verze firmware -Kernel Version => Verze jádra -Current Date/Time => Aktuální datum/čas -MAC Address => MAC adresa - - -# 'Connections' page -Connection Status => Stav spojení -Physical Connections => Obsah ARP cache - aktivní MAC/IP adresy -Router Connections => Spojení na router - - -# 'DHCP' page -DHCP leases => DHCP výpůjčky -IP Address => IP adresa -Name => Jméno -Expires in => Vyprší - - -# 'Wireless Status' page -Wireless Status => Stav wifi - -# 'Password' page -Password Change => Zmĕna hesla -New Password => Nové heslo -Confirm Password => Nové heslo (potvrzení) - -# 'System Settings' page -System Settings => Systémová nastavení -Host Name => Hostname -Language => Jazyk - -# 'Installed Software' page -Installed Packages => Nainstalované balíčky -Available packages => Dostupné balíčky -Update package lists => Aktualizovat seznam balíčků -Uninstall => Odinstalovat -Install => Nainstalovat - - -# 'Firmware Upgrade' page -Firmware format => Formát firmware -Error => Chyba -done => hotovo -Invalid_format => Formát firmware je neznámý -Erase_JFFS2 => Smazat JFFS2 oblast -Options => Možnosti -Firmware_image => Soubor firmware: -Upgrade => Flashnout -Upgrading... => Flashuji... - -# 'LAN Settings' page -LAN Settings => Nastavení LAN -LAN Configuration => Konfigurace LAN -Netmask => Maska -Default Gateway => Brána -DNS Servers => DNS servery -DNS Address => Adresa DNS serveru - -Note => Poznámka - - -# 'WAN Settings' page -WAN Settings => Nastavení WAN portu -WAN Configuration => Konfigurace -PPTP Server IP => Adresa PPTP serveru -Connection Type => Typ připojení -No WAN => Odpojeno -DHCP => DHCP -Static IP => Pevná IP -IP Settings => Nastavení IP -PPP Settings => Nastavení PPP -Redial Policy => Navázání spojení -Connect on Demand => Na vyžádání (Connect on Demand) -Keep Alive => Stále připojen (Keep Alive) -Maximum Idle Time => Maximální čas bez aktivity (Maximum Idle Time) -Redial Timeout => Prodleva znovunavázání spojení po jeho ztrátĕ (Redial Timeout) -MTU => Maximální velikost paketu (MTU) -Username => Uživatelské jméno - - -# 'Wireless Configuration' page -Wireless Configuration => Konfigurace wifi -Wireless Interface => Wifi rozhraní -WEP Key => WEP klíč -Selected WEP Key => Vybraný WEP klíč -WPA PSK => WPA klíč -ESSID => ESSID -Channel => Kanál -RADIUS IP Address => Adresa RADIUS serveru -RADIUS Server Key => Heslo RADIUS serveru -Enabled => Zapnuto -Disabled => Vypnuto -ESSID Broadcast => Skrytí ESSID (ESSID-Broadcast) -Show => Zobrazeno -Hide => Skryto -WLAN Mode => Operační mód -Access Point => Access Point -Client => Klient -Bridge => Bridge -Ad-Hoc => Ad-Hoc -Encryption Settings => Šifrování přenosu -Encryption Type => Typ šifrování -PSK => WPA PSK -WPA Mode => Mód WPA -WPA Algorithms => WPA algoritmus -WEP Keys => WEP klíče - - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => Rozšířené nastavení wifi -WDS Connections => WDS spojení -MAC Filter List => Seznam MAC filtru -Filter Mode => Mód MAC filtru -Allow => Povolit MAC v seznamu -Deny => Zakázat MAC s seznamu -Set => Nastavit -Settings => Nastavení -Automatic WDS => Automatické WDS spojení (LazyWDS) - -# "Hosts" page - -MAC Address => MAC adresa -Configured Hosts => Konfigurace stanic (hosts) -DHCP Static => Pevné přidĕlení IP podle MAC (DHCP) -Host Names => Jména stanic (hosts) - - -Up => Nahoru -Down => Dolů -Edit => Editovat -Delete => Smazat -Save => Uložit -Cancel => Storno - -Forward => Forward -Accept => Accept -Drop => Drop - -Firewall => Firewall -Firewall Rules => Pravidla firewallu -Firewall Configuration => Konfigurace firewallu - -New Rule => Nové pravidlo -Match => Filtr -Target => Cíl -Port => Port - -Protocol => Protokol -Source IP => Zdrojová IP -Destination IP => Cílová IP -Source Ports => Zdrojový port -Destination Ports => Cílový port - -Forward to => Forward na -Port => Port - -Helptext ESSID => Název Vaší bezdrátové sítĕ -Helptext DNS save => Před úpravou nastavení DNS serverů uložte ostatní zmĕny na této stránce. - -Helptext Operation mode => Toto nastavení mĕní mód bezdrátové sítĕ. Volbou Klient (bridge) se nezmĕní nastavení síťových rozhraní, pouze se nastaví nĕkteré parametry ovladače wifi, které umožní funkčnĕ omezenou možnost vytvoření bridge nad rozhraními. -Helptext Encryption Type => 'WPA (RADIUS)' lze použít pouze v módu Access Point.
      'WPA (PSK)' nelze použít v Ad-Hoc módu. -Helptext IP Settings => Nastavení IP je pro možnost DHCP a PPTP volitelné. Zadaná adresa se použije v případĕ, že není DHCP server dostupný. -Helptext Idle Time => Čas v sekundách, po který když nedojde k žádné aktivitĕ, je spojení do Internetu uzavřeno. (pouze pro volbu Connect on Demand) -Helptext Redial Timeout => Čas po odpojení, po který router čeká, než se pokusí znovu navázat spojení. diff --git a/package/webif/files/usr/lib/webif/lang/de/common.txt b/package/webif/files/usr/lib/webif/lang/de/common.txt deleted file mode 100644 index f8ab28df1d..0000000000 --- a/package/webif/files/usr/lib/webif/lang/de/common.txt +++ /dev/null @@ -1,228 +0,0 @@ -lang => Deutsch -# Common -Settings saved => Einstellungen gespeichert -Settings not saved => Einstellungen nicht gespeichert -Save Changes => Speichern -Apply Changes => Übernehmen -Clear Changes => Verwerfen -Review Changes => Anzeigen -Host Name => Hostname -Uptime => Uptime -Load => Systemlast -Version => Version -Categories => Kategorien -Subcategories => Unterkategorien -more... => Weitere Informationen... -Add => Hinzufügen -Remove => Entfernen -Warning => Warnung -Password_warning => es wurde noch kein Passwort für Web-Administration und SSH gesetzt.
      Bitte geben Sie jetzt ein neues Passwort ein (Benutzername im Browser: 'root'). - -# Categories -Info => Info -About => Über -Router Info => Routerinformationen - -Status => Status -Connections => Netzwerkverbindungen -DHCP => DHCP -Wireless => WLAN - -System => System -Password => Passwort -Settings => Einstellungen -Installed Software => Installierte Software -Firmware Upgrade => Firmware aktualisieren - -Network => Netzwerk -LAN => LAN -WAN => Internet -Wireless => WLAN -Advanced Wireless => WLAN (erweitert) -Hosts => Host-Konfiguration - - -# 'About' page -Copyright => Copyright - -GPL_Text => Dieses Programm ist freie Software. Sie können es unter den Bedingungen der GNU General Public License,
      wie von der Free Software Foundation veröffentlicht, weitergeben und/oder modifizieren,
      entweder gemäß Version 2 der Lizenz oder (nach Ihrer Option) jeder späteren Version. -Contributions by => Mit Beiträgen von -Layout based on => Layout basiert auf -by => von - - -No config change. => Es wurden keine Konfigurationsänderungen vorgenommen. -Config discarded. => Ihre Konfigurationsänderungen wurden verworfen. -Config changes: => Aktuelle Konfigurationsänderungen: -Updating config... => Aktualisiere die Konfiguration... - - -# 'Router Info' page -Firmware Version => Firmwareversion -Kernel Version => Kernelversion -Current Date/Time => Datum/Uhrzeit -MAC Address => MAC-Adresse - - -# 'Connections' page -Connection Status => Verbindungsstatus -Physical Connections => Netzwerkschnittstellen -Router Connections => Netzwerkverbindungen auf dem Router - - -# 'DHCP' page -DHCP leases => DHCP-Leases -IP Address => IP-Adresse -Name => Name -Expires in => Gültigkeitsdauer - - -# 'Wireless Status' page -Wireless Status => WLAN-Status - -# 'Password' page -Password Change => Passwort ändern -New Password => Neues Passwort -Confirm Password => Passwort bestätigen - -# 'System Settings' page -System Settings => Systemeinstellungen -Host Name => Hostname -Language => Sprache - -# 'Installed Software' page -Installed Packages => Installierte Pakete -Update package lists => Paketlisten aktualisieren -Uninstall => Deinstallieren -Install => Installieren - - -# 'Firmware Upgrade' page -Firmware format => Firmware-Format -Error => Fehler -done => fertig -Invalid_format => Das Dateiformat der Firmware ist ungültig -Erase_JFFS2 => JFFS2-Partition löschen -Options => Optionen -Firmware_image => Firmware-Datei: -Upgrade => Aktualisieren -Upgrading... => Aktualisiere... - -# 'LAN Settings' page -LAN Settings => Netzwerkeinstellungen -LAN Configuration => Netzwerkkonfiguration -Netmask => Subnetzmaske -Default Gateway => Standardgateway -DNS Servers => DNS-Server -DNS Address => DNS-Serveradresse - -Note => Hinweis - - -# 'WAN Settings' page -WAN Settings => Internet-Einstellungen -WAN Configuration => Internet-Konfiguration -PPTP Server IP => PPTP-Serveradresse -Connection Type => Verbindungsart -No WAN => Keine Verbindung -DHCP => DHCP -Static IP => Statische Konfiguration -IP Settings => IP-Konfiguration -PPP Settings => PPP-Einstellungen -Redial Policy => Verbindungsaufbau -Connect on Demand => Bei Bedarf -Keep Alive => Verbindung aufrechterhalten -Maximum Idle Time => Wartezeit bei Inaktivität -Redial Timeout => Wartezeit bei unterbrochener Verbindung -MTU => Maximale Paketgröße -Username => Benutzername - - -# 'Wireless Configuration' page -Wireless Configuration => WLAN-Konfiguration -Wireless Interface => WLAN-Interface -WEP Key => WEP-Schlüssel -Selected WEP Key => Ausgewählter WEP Schlüssel -WPA PSK => WPA-Schlüssel -ESSID => ESSID -Channel => Kanal -RADIUS IP Address => RADIUS-Serveradresse -RADIUS Server Key => RADIUS-Serverpasswort -Enabled => Aktiviert -Disabled => Deaktiviert -ESSID Broadcast => ESSID-Broadcast -Show => Anzeigen -Hide => Verstecken -WLAN Mode => Betriebsmodus -Access Point => Access Point -Client => Client -Bridge => Bridge -Ad-Hoc => Ad-Hoc -Encryption Settings => Verschlüsselungseinstellungen -Encryption Type => Verschlüsselungsart -PSK => Passwort -WPA Mode => WPA-Modus -WPA Algorithms => WPA-Verschlüsselungsalgorithmen -WEP Keys => WEP-Schlüssel - - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => WLAN-Konfiguration (erweitert) -WDS Connections => WDS-Verbindungen -MAC Filter List => Zugriffsbeschränkung (MAC-Adresse) -Filter Mode => Filtermodus -Allow => Erlauben -Deny => Verweigern -Set => Setzen -Settings => Einstellungen -Automatic WDS => Automatische WDS-Verbindung - -# "Hosts" page - -MAC Address => MAC-Adresse -Configured Hosts => Konfigurierte Hosts -DHCP Static => Statische DHCP-Einträge -Host Names => Host-Einträge - - -Up => Hoch -Down => Runter -Edit => Bearbeiten -Delete => Löschen -Save => Speichern -Cancel => Abbrechen - -Forward => Weiterleiten -Accept => Zulassen -Drop => Verweigern - -Firewall => Firewall -Firewall Rules => Firewall-Regeln -Firewall Configuration => Firewall-Konfiguration - -New Rule => Neue Regel -Match => Filter -Target => Ziel -Port => Port - -Protocol => Protokoll -Source IP => Quell-IP -Destination IP => Ziel-IP -Source Ports => Quell-Ports -Destination Ports => Ziel-Ports - -Forward to => Weiterleiten an -Port => Port - -Helptext ESSID => Name des Funknetzwerks -Helptext DNS save => Sie müssen Ihre Änderungen an dieser Seite speichern, bevor Sie DNS-Server hinzufügen oder entfernen - -Helptext Operation mode => Setzt den Betriebsmodus für das WLAN-Interface. Die Einstellung 'Client (Bridge)' ändert nichts an den eigentlichen Netzwerkeinstellungen, es ändert lediglich einige Parameter im WLAN-Treiber, damit man das Interface eingeschränkt in einer Bridge verwenden kann. -Helptext Encryption Type => 'WPA (RADIUS)' wird nur im Access-Point-Modus unterstützt.
      'WPA (PSK)' funktioniert nicht im Ad-Hoc-Modus. -Helptext IP Settings => IP-Einstellungen sind optional für DHCP und PPTP. Wenn sie gesetzt sind, werden sie als Standardwerte verwendet, falls kein DHCP-Server erreichbar ist. -Helptext Idle Time => Wartezeit in Sekunden, nach der bei Inaktivität die Internetverbindung getrennt wird. -Helptext Redial Timeout => Maximale Zeit, die der Router auf Antwort vom Provider warten soll, bevor die Verbindung neu aufgebaut wird. - -# untranslated: -Available packages => Verfügbare Pakete - diff --git a/package/webif/files/usr/lib/webif/lang/dk/common.txt b/package/webif/files/usr/lib/webif/lang/dk/common.txt deleted file mode 100644 index bd8f86745a..0000000000 --- a/package/webif/files/usr/lib/webif/lang/dk/common.txt +++ /dev/null @@ -1,231 +0,0 @@ -lang => Dansk -# Common -Settings saved => Indstillingerne er gemt -Settings not saved => Indstillinger er ikke gemt -Save Changes => Gem ændringerne -Apply Changes => Aktiver ændringer -Clear Changes => Glem ændringerne -Review Changes => Se ændringer -Host Name => Værtsnavn -Uptime => Oppetid -Load => Systembelastning -Version => Version -Categories => Kategorier -Subcategories => Underkategorier -more... => mere... -Add => Tilføje -Remove => Fjern -Warning => Advarsel -Password_warning => Der er ikke sat noget kodeord eller løsen på hverken Webadministration eller SSH.
      Vær venlig at vælge og/eller indtaste dit kodeord (Brugernavn er 'root' med små bogstaver). - -# Categories -Info => Info -About => Om -Router Info => Routerinformation - -Status => Status -Connections => Netværksforbindelser -DHCP => DHCP -Wireless => Trådløs - -System => System -Password => Kodeord -Settings => Indstillinger -Installed Software => Installeret programmel -Firmware Upgrade => Firmware opgradering - -Network => Netværk -LAN => Lokalnet -WAN => Internet -Wireless => Trådløs -Advanced Wireless => Avanceret trådløs -Hosts => Værtsnavne - - -# 'About' page -Copyright => Ophavsret - -GPL_Text => Dette program er fri software. De må bruge, ændre og videredistribuere det under betingelserne for "GNU General Public License",
      som offentliggjort af "Free Software Foundation" (Den frie softwarebevægelse), enten i version 2 af licensen eller (efter deres valg), en hvilkensomhelst senere version. - -Contributions by => Bidrag fra -Layout based on => Layoutet er baseret på -by => af - - -No config change. => Ingen konfigurationsændring foretaget -Config discarded. => Konfigurationsændringerne blev kasseret -Config changes: => Foreløbige ændringer -Updating config... => Sætter ændringerne i kraft - -# 'Router Info' page -Firmware Version => Firmwareversion -Kernel Version => Kerneversion -Current Date/Time => Aktuel dato/tid -MAC Address => MAC adresse - - -# 'Connections' page -Connection Status => Forbindelsesstatus -Physical Connections => Fysiske forbindelser -Router Connections => Routerens forbindelser - - -# 'DHCP' page -DHCP leases => DHCP leasinger -IP Address => IP adresse -Name => Navn -Expires in => Udløbstid - - -# 'Wireless Status' page -Wireless Status => Trådløs status - -# 'Password' page -Password Change => Ændre kodeord -New Password => Nyt kodeord -Confirm Password => Nyt kodeord igen - -# 'System Settings' page -System Settings => Systemindstillinger -Host Name => Værtsnavn -Language => Sprog - -# 'Installed Software' page -Installed Packages => Installerede pakker -Update package lists => Opdater pakkelisten -Uninstall => Afindstaller -Install => Installer - - -# 'Firmware Upgrade' page -Firmware format => Firmwareformat -Error => Fejl -done => færdig -Invalid_format => Ubrugelig_format -Erase_JFFS2 => Slet JFFS2 partitionen -Options => Tilvalg -Firmware_image => Firmwarefil: -Upgrade => Opgradere -Upgrading... => Opgraderer... - -# 'LAN Settings' page -LAN Settings => Lokale netindstillinger -LAN Configuration => Lokal netværkskonfiguration -Netmask => Undernetmaske -Default Gateway => Standard gateway -DNS Servers => DNS-Server -DNS Address => DNS-Serveradresse - -Note => Bemærk - - -# 'WAN Settings' page -WAN Settings => Internet indstillinger -WAN Configuration => Internetkonfiguration -PPTP Server IP => PPTP-serveradresse -Connection Type => Forbindelsestype -No WAN => Ingen Internetopsætning -DHCP => DHCP -Static IP => Statisk IP -IP Settings => IP indstillinger -PPP Settings => PPP indstillinger -Redial Policy => Genopkaldspolitik -Connect on Demand => Forbind når behovet er der -Keep Alive => Hold forbindelsen i live (keep alive) -Maximum Idle Time => Maksimal tid i tomgang (max idle) -Redial Timeout => Opkaldstimeout -MTU => Maksimal pakkestørelse (MTU) -Username => Brugernavn - - -# 'Wireless Configuration' page -Wireless Configuration => Trådløs konfiguration -Wireless Interface => Trådløs netkort -WEP Key => WEP nøgle -Selected WEP Key => Valgt WEP nøgle -WPA PSK => WPA nøgle -ESSID => ESSID -Channel => Kanal -RADIUS IP Address => IP adressen på RADIUS server -RADIUS Server Key => Kodeord til RADIUS server -Enabled => Aktiveret -Disabled => Deaktiveret -ESSID Broadcast => ESSID-Broadcast -Show => Vis -Hide => Skjul -WLAN Mode => Trådløs tilstand -Access Point => Access Point -Client => Klient -Bridge => bro -Ad-Hoc => Ad-Hoc -Encryption Settings => Krypteringsindstillinger -Encryption Type => Krypteringstype -PSK => PSK kode -WPA Mode => WPA tilstand -WPA Algorithms => WPA krypteringsalgoritme -WEP Keys => WEP nøgler - - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => Avanceret opsætning af trådløs -WDS Connections => WDS forbindelser (WDS repeater) -MAC Filter List => Filteringsliste (MAC-numre) -Filter Mode => Filtreingstilstand -Allow => Tillad -Deny => Forbyd -Set => Sæt -Settings => Indstillinger -Automatic WDS => Automatisk WDS forbindelse - -# "Hosts" page - -MAC Address => MAC adresse -Configured Hosts => Værtsnavne -DHCP Static => Statiske IP adresser til DHCP -Host Names => Værtsnavne - - -Up => Op -Down => Ned -Edit => Rette -Delete => Slette -Save => Gemme -Cancel => Annullere - -Forward => Forward (videresend) -Accept => Accept (tillad) -Drop => Drop (smid væk) - -Firewall => Firewall -Firewall Rules => Firewall regler -Firewall Configuration => Firewallkonfiguration - -New Rule => Ny regel -Match => Match (sammenlign) -Target => Target (Gå til) -Port => Port - -Protocol => Protokol -Source IP => Afsenders IP -Destination IP => Modtagers IP -Source Ports => Afsender porte -Destination Ports => Modtager porte - -Forward to => Send videre til -Port => Port - -Helptext ESSID => Navn på trådløs netværk -Helptext DNS save => Gem ændringer på denne side før du tilføjer eller fjerner DNS servere. (Hvis ikke du vil miste dem.) - -Helptext Operation mode => Sætter driftstilstanden for den trådløse del af routeren. 'Klient' og 'Klient (bro)' bruges til at forbinde 2 trådløse routere. I mange tilfælde er WDS en bedre (men mere avanceret) løsning. 'Klient' udnytter dog båndbredden bedst, hvis du vitterlig kun har en maskine tilsluttet.
      Indstillingen 'Klient (bro)' ændrer ikke direkte ved netværksindstillingerne. Det er et beskidt hack som får routeren til at foregiver at kun en maskine (et MAC nummer) er tilsluttet. Det sker for at overvinde et problem i 802.11 protokollen, som forhindrer at man problemfrit (i almindelig 'Klient'-tilstand) kan bruge den trådløse forbindelse fra flere maskiner samtidig.
      AP bruges til en standalone router, hvor f.eks. bærbare computere skal have adgang til Internet og/eller lokalnet.
      Hvis du ikke ved hvad 'Ad Hoc' tilstanden gør, har du højst sandsynligt ikke brug for den. - -Helptext Encryption Type => 'WPA (RADIUS)' er kun understøttet i AP (Access Point) tilstand.
      'WPA (PSK)' fungerer ikke i 'Ad-Hoc' tilstand. - -Helptext IP Settings => IP indstilinger er frivillig for DHCP og PPTP. Når de er sat, bliver de brugt som standværdiger, hvis der ikke er en tilgængelig DHCP server. - -Helptext Idle Time => Ventetid i sekunder før inaktivitet bliver årsagen til at forbindelsen afbrydes. - -Helptext Redial Timeout => Ventetid før der prøves at ringe op igen. - -# untranslated: -Available packages => Available packages diff --git a/package/webif/files/usr/lib/webif/lang/ee/common.txt b/package/webif/files/usr/lib/webif/lang/ee/common.txt deleted file mode 100644 index e3690cd5f5..0000000000 --- a/package/webif/files/usr/lib/webif/lang/ee/common.txt +++ /dev/null @@ -1,230 +0,0 @@ -lang => Eesti -#Common -Settings saved => Sätted salvestatud -Settings not saved => Sätted on salvestamata -Save Changes => Salvesta muudatused -Apply Changes => Rakenda muudatused -Clear Changes => Kustuta muudatused -Review Changes => Vaata tehtud muudatusi -Host Name => Hostinimi -Uptime => Töövõimeaega seni -Load => Koormus -Version => Versioon -Categories => Kategooriad -Subcategories => Alamkategooriad -more... => veel... -Add => Lisa -Remove => Eemalda -Warning => Hoiatus -Password_warning => veebilidese ja SSH salasõna on seadmata
      Palun, sisesta see (veebiliidese kasutajanimi on 'root'). - -# Categories -Info => Info -About => Teavet -Router Info => Marsruuteri info - -Status => Olek -Connections => Ühendused -DHCP => DHCP -Wireless => Raadioliides - -System => Süsteem -Password => Parool -Settings => Sätted -Installed Software => Installitud tarkvara -Firmware Upgrade => Püsivara uuendamine - -Network => Võrk -LAN => LAN -WAN => WAN -Wireless => Raadioliides -Advanced Wireless => Raadioliidese täpsemad sätted -Hosts => Hostid - - -# About page -Copyright => Copyright - -GPL_Text => Käesolev programm on vabavara; seda võib levitada ja/või
      modifitseerida vastavalt Free Software Foundationi
      avaldatud avaliku litsentsi GNU General Public License 2. versiooni või
      (teie valikul) mis tahes uuema versiooni tingimustele. - -Contributions by => Kaasaaitajad -Layout based on => Kujunduse idee -by => autor - - -No config change. => Konfiguratsioon muutmata. -Config discarded. => Konfiguratsioon hüljatud. -Config changes: => Konfiguratsiooni muudatused: -Updating config... => Uuendan konfiguratsiooni... - -# Router Info page -Firmware Version => Püsivara versioon -Kernel Version => Kerneli versioon -Current Date/Time => Praegune kuupäev/kellaaeg -MAC Address => MAC-aadress - - -# Connections page -Connection Status => Ühenduse olek -Physical Connections => Füüsilised ühendused -Router Connections => Marsruuteriühendused - - -# DHCP page -DHCP leases => DHCP antud aadressid -IP Address => IP-aadress -Name => Nimi -Expires in => Aegub - - -# Wireless Status page -Wireless Status => Raadioliidese olek - -# Password page -Password Change => Parooli muutmine -New Password => Uus parool -Confirm Password => Korrake parooli - -# System Settings page -System Settings => Süsteemi sätted -Host Name => Hostinimi -Language => Keel - -# Installed Software page -Installed Packages => Installitud paketid -Update package lists => Värskenda paketiloendit -Uninstall => Desinstalli -Install => Installi -Available packages => Saadaolevad paketid - -# Firmware Upgrade page -Firmware format => Püsivara vorming -Error => Tõrge -done => valmis -Invalid_format => Vale vorming -Erase_JFFS2 => Kustuta JFFS2 -Options => Valikud -Firmware_image => Püsivara tõmmis -Upgrade => Versiooniuuendus -Upgrading... => Uuendan... - -# LAN Settings page -LAN Settings => LAN-i sätted -LAN Configuration => LAN-i konfiguratsioon -Netmask => Võrgu mask -Default Gateway => Vaikelüüs -DNS Servers => DNS-serverid -DNS Address => DNS-i aadress - -Note => Märkus - - -# WAN Settings page -WAN Settings => WAN-i sätted -WAN Configuration => WAN-i konfiguratsioon -PPTP Server IP => PPTP-serveri IP -Connection Type => Ühenduse tüüp -No WAN => WAN-i ei kasutata -DHCP => DHCP -Static IP => Staatiline IP -IP Settings => IP-sätted -PPP Settings => PPP-sätted -Redial Policy => Kordusvalimispoliitika -Connect on Demand => Ühenda nõudmisel -Keep Alive => Hoia ühendust töös -Maximum Idle Time => Maksimaalne jõudeaeg -Redial Timeout => Kordusvalimise aegumine -MTU => MTU -Username => Kasutajanimi - - -# Wireless Configuration page -Wireless Configuration => Raadioliidese konfiguratsioon -Wireless Interface => Raadioliides -WEP Key => WEP-võti -Selected WEP Key => Valitud WEP-võti -WPA PSK => WPA PSK -ESSID => ESSID -Channel => Kanal -RADIUS IP Address => RADIUS IP-aadress -RADIUS Server Key => RADIUS-serveri võti -Enabled => Lubatud -Disabled => Keelatud -ESSID Broadcast => ESSID-i levindamine -Show => Näita -Hide => Peida -WLAN Mode => WLAN-i rez"iim -Access Point => AP -Client => Klient -Bridge => Sild -Ad-Hoc => Ad-Hoc -Encryption Settings => Krüpteerimise sätted -Encryption Type => Krüpteerimise tüüp -PSK => PSK -WPA Mode => WPA rez"iim -WPA Algorithms => WPA algoritmid -WEP Keys => WEP-võtmed - - -# Advanced Wireless Configuration page -Advanced Wireless Configuration => Raadioliidese täpsem konfiguratsioon -WDS Connections => WDS-ühendused -MAC Filter List => MAC-filtri loend -Filter Mode => Filtri rez"iim -Allow => Luba -Deny => Keela -Set => Sea -Settings => Sätted -Automatic WDS => Automaatne WDS - -# "Hosts" page - -MAC Address => MAC-aadress -Configured Hosts => Konfigureeritud hostid -DHCP Static => Staatiline DHCP -Host Names => Hostinimed - - -Up => Üles -Down => Alla -Edit => Muuda -Delete => Kustuta -Save => Salvesta -Cancel => Loobu - -Forward => Forward -Accept => Accept -Drop => Drop - -Firewall => Tulemüür -Firewall Rules => Tulemüüri reeglid -Firewall Configuration => Tulemüüri konfiguratsioon - -New Rule => Uus reegel -Match => Vastavus -Target => Sihtkoht -Port => Port - -Protocol => Protokoll -Source IP => Saatja IP -Destination IP => Saaja IP -Source Ports => Saatja pordid -Destination Ports => Saaja pordid - -Forward to => Suuna: -Port => Port - -Helptext ESSID => Teie traadita võrgu võrgunimi - -Helptext DNS save => Sellel lehel tehtud muudatused tuleb enne DNS-serverite lisamist/eemaldamist salvestada - -Helptext Operation mode => Määrab teie traadita võrgu tööreziimi. Säte "Klient (Sild)" ei muuda võrguliidese sätteid. Muudetakse ainult raadioliidese draiveri teatud parameetreid, mis on seotud liidese sillarez"iimi piirangute lubamisega - -Helptext Encryption Type => 'WPA (RADIUS)' on lubatud ainult rez"iimis "AP".
      Säte 'WPA (PSK)' ei tööta võrdõigusvõrgurez"iimis (Ad-Hoc) - -Helptext IP Settings => IP-sätted on DHCP ja PPTP puhul valikulised. Kui muudate neid sätteid, siis rakendatakse need vaikesätetena juhul, kui DHCP-server pole saadaval. - -Helptext Idle Time => Aeg sekundites, mille vältel marsruuter enne Interneti-ühenduse katkestamist ootab (ainult sätte Connect on Demand puhul). - -Helptext Redial Timeout => Aeg sekundites, kui kaua marsruuter pärast teenusepakkuja võrgust teate "pole vastust" saamist ootab, enne kui asub ühendust taastama. - diff --git a/package/webif/files/usr/lib/webif/lang/es/common.txt b/package/webif/files/usr/lib/webif/lang/es/common.txt deleted file mode 100644 index d488d1f433..0000000000 --- a/package/webif/files/usr/lib/webif/lang/es/common.txt +++ /dev/null @@ -1,227 +0,0 @@ -lang => Español -# Common -Settings saved => Cambios guardados -Settings not saved => No se han podido guardar los cambios -Save Changes => Guardar cambios -Apply Changes => Aplicar cambios -Clear Changes => Deshacer cambios -Review Changes => Comprobar cambios -Host Name => Nombre del equipo -Uptime => Uptime -Load => Carga del sistema -Version => Versión -Categories => Categorías -Subcategories => Subcategorís -more... => más... -Add => Añadir -Remove => Eliminar -Warning => Atención -Password_warning => no has establecido una contraseña de protección para el router (acceso web y ssh). Por favor, elija una ahora (el nombre de usuario será 'root') - -# Categories -Info => Info -About => Acerca de -Router Info => Información del router - -Status => Estado -Connections => Conexiones -DHCP => DHCP -Wireless => Wi-Fi - -System => Sistema -Password => Contraseña -Settings => Configuración -Installed Software => Programas instalados -Firmware Upgrade => Actualizar Firmware - -Network => Red -LAN => LAN -WAN => Internet -Wireless => Wi-Fi -Advanced Wireless => Wi-Fi (avanzado) -Hosts => Configuration de hosts - - -# 'About' page -Copyright => Copyright - -GPL_Text => Este programa es software libre; Usted puede distribuirlo y/o
      modificarlo bajo los términos de la General Public License
      como está publicada por la Free Sofware Foundation; bien de la versión 2 de dicha Licencia o bien (según su elección) de cualquier versión posterior. -Contributions by => Contribuidores -Layout based on => Aspecto basado en -by => por - - -No config change. => No ha habido cambios de configuración. -Config discarded. => Los cambios no se han aceptado. -Config changes: => Configuración actual: -Updating config... => Actualizando la configuración... - - -# 'Router Info' page -Firmware Version => Versión del firmware -Kernel Version => Versión del Kernel -Current Date/Time => Fecha/Hora -MAC Address => Dirección MAC - - -# 'Connections' page -Connection Status => Estado de las conexiones -Physical Connections => Conexiones físicas -Router Connections => Conexiones del router - - -# 'DHCP' page -DHCP leases => Préstamos DHCP -IP Address => Dirección IP -Name => Nombre -Expires in => Caduca en - - -# 'Wireless Status' page -Wireless Status => Estado del Wi-Fi - -# 'Password' page -Password Change => Cambio de la contraseña -New Password => Nueva contraseña -Confirm Password => Confirme la contraseña - -# 'System Settings' page -System Settings => Parámetros del sistema -Host Name => Nombre del host -Language => Idioma - -# 'Installed Software' page -Installed Packages => Paquetes instalados -Update package lists => Actualización de la lista de paquetes -Uninstall => Desinstalar -Install => Instalar - - -# 'Firmware Upgrade' page -Firmware format => Formato del firmware -Error => Error -done => hecho -Invalid_formt => Formato del firmware inválido -Erase_JFFS2 => Borrar la partición JFFS2 -Options => Opciones -Firmware_image => Archivo del firmware -Upgrade => Actualizar -Upgrading... => Actualización... - -# 'LAN Settings' page -LAN Settings => Configuración LAN -LAN Configuration => Configuración LAN -Netmask => Máscara de subred -Default Gateway => Puerta de enlace (gateway) -DNS Servers => Servidor DNS -DNS Address => Dirección IP del DNS - -Note => Nota - -# 'WAN Settings' page -WAN Settings => Configuración de Internet -WAN Configuration => Configuración de Internet -PPTP Server IP => Dirección IP del servidor PPTP -Connection Type => Tipo de conexión -No WAN => Sin configuración de Internet -DHCP => DHCP -Static IP => IP estática -IP Settings => Configuración IP -PPP Settings => Configuración PPP -Redial Policy => Opciones de reconexión -Connect on Demand => Bajo demanda -Keep Alive => Conexión permanente -Maximum Idle Time => Tiempo máximo de inactividad -Redial Timeout => Tiempo de reconexión -MTU => MTU (tamaño de los paquetes) -Username => Nombre de usuario - - -# 'Wireless Configuration' page -Wireless Configuration => Configuración Wi-Fi -Wireless Interface => Interfaz Wi-Fi -WEP Key => Clave WEP -Selected WEP Key => Clave WEP seleccionada -WPA PSK => WPA-PSK -ESSID => ESSID -Channel => Canal -RADIUS IP Address => Dirección IP del servidor RADIUS -RADIUS Server Key => Secreto RADIUS -Enabled => Activado -Disabled => Desactivado -ESSID Broadcast => Difusión del SSID -Show => Mostrar -Hide => Ocultar -WLAN Mode => Modo Wi-Fi -Access Point => Punto de acceso -Client => Cliente -Bridge => Bridge -Ad-Hoc => Ad-Hoc -Operation mode => Modo de funcionamiento -Encryption Settings => Parámetros de enriptación -Encryption Type => Tipo de encriptación -PSK => PSK -WPA Mode => Modo WPA -WPA Algorithms => Algoritmos WPA -WEP Keys => Clave WEP - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => Configuración Wi-Fi avanzada -WDS Connections => Conexiones WDS -MAC Filter List => Filtrar por dirección MAC -Filter Mode => Modo de filtrado -Allow => Autorizar -Deny => Denegar -Set => Establecer -Settings => Parámetros -Automatic WDS => WDS automático - -# "Hosts" page - -MAC Address => Dirección MAC -Configured Hosts => Equipos configurados -DHCP Static => Entradas DHCP estáticas -Host Names => Nombre de los equipos - -Up => Subir -Down => Bajar -Edit => Editar -Delete => Borrar -Save => Guardar -Cancel => Cancelar - -Forward => Redirigir -Accept => Aceptar -Drop => Descartar - -Firewall => Firewall -Firewall Rules => Reglas del Firewall -Firewall Configuration => Configuración del Firewall - -New Rule => Nueva regla -Match => Filtrar -Target => Acción -Port => Puerto - -Protocol => Protocolo -Source IP => IP origen -Destination IP => IP destino -Source Ports => Puertos origen -Destination Ports => Puertos destino - -Forward to => Redirigir a -Port => Puerto - -Helptext ESSID => SSID -Helptext DNS save => Es recomendable guardar los cambios antes de añadir o eliminar servidores de DNS de la lista - -Helptext Operation mode => Establece el modo de operación de tu red wireless. Eligiendo 'Client (bridge)' no cambiará la configuración de la interfaz de red. Simplemente añadirá unos parámetros que permitirán que la interfaz wireless actúe en cierta medida en modo bridge. -Helptext Encryption Type => 'WPA (RADIUS)' sólo puede usarse en modo Punto de Acceso.
      'WPA (PSK)' no funciona en modo Ad-Hoc. -Helptext IP Settings => Las opciones IP son opcionales para DHCP y PPTP. Si las eliges, se utilizarán por defecto en caso de que la configuración automática falle. -Helptext Idle Time => Número de segundos sin actividad con Internet que debe esperar el router antes de desconectarse. (Sólo para el modo Bajo Demanda). -Helptext Redial Timeout => Número de segundos sin recibir respuesta del servidor que debe esperar el router para volver a conectarse. - - -# untranslated: -Available packages => Available packages - diff --git a/package/webif/files/usr/lib/webif/lang/fr/common.txt b/package/webif/files/usr/lib/webif/lang/fr/common.txt deleted file mode 100644 index 96cdb83a77..0000000000 --- a/package/webif/files/usr/lib/webif/lang/fr/common.txt +++ /dev/null @@ -1,238 +0,0 @@ -lang => Français -Encoding => UTF-8 - -# Common -Settings saved => Sauvegardé -Settings not saved => Non sauvegardé -Save Changes => Sauvegarder -Apply Changes => Appliquer -Clear Changes => Effacer -Review Changes => Revoir -Host Name => Nom de machine -Uptime => Uptime -Load => Charge système -Version => Version -Categories => Catégories -Subcategories => Sous-catétgories -more... => davantage... -Add => Ajouter -Remove => Enlever - -Warning => Attention -Password_warning => vous n'avez pas configuré de mot de passe pour l'interface Web et l'accès SSH
      Entrez en un maintenant (le nom d'utilisateur dans le navigateur sera 'root'). - -# Categories -Info => Info -About => A propos -Router Info => Informations routeur - -Status => Statut -Connections => Connexions réseau -DHCP => DHCP -Wireless => Wi-Fi - -System => Système -Password => Mot de passe -Settings => Paramètres -Installed Software => Logiciels installés -Firmware Upgrade => Mise à jour firmware - -Network => Réseau -LAN => LAN -WAN => Internet -Wireless => Wi-Fi -Advanced Wireless => Wi-Fi (avancé) -Hosts => Configuration des hôtes - - -# 'About' page -Copyright => Copyright - -GPL_Text => Ce programme est un logiciel libre; vous pouvez le redistribuer -et/ou le modifier sous les termes de la General Public License telle qu'elle -est publiée par la Free Sofware Foundation; que ce soit sous la version -2 de la license, ou (à votre convenance) une version ultérieure -Contributions by => Contributions par -Layout based on => Présentation basée sur -by => par - - -No config change. => Pas de changements. -Config discarded. => Pas de prise en compte. -Config changes: => Configuration actuelle: -Updating config... => Mise à jour... - - -# 'Router Info' page -Firmware Version => Version du firmware -Kernel Version => Version du noyau -Current Date/Time => Date et heure -MAC Address => Adresse MAC - - -# 'Connections' page -Connection Status => Etat des connexions -Physical Connections => Connexions physiques -Router Connections => Connexions au routeur - - -# 'DHCP' page -DHCP leases => Baux DHCP -IP Address => Adresse IP -Name => Nom -Expires in => Expire dans - - -# 'Wireless Status' page -Wireless Status => Etat du Wi-Fi - -# 'Password' page -Password Change => Changement du mot de passe -New Password => Nouveau mot de passe -Confirm Password => Confirmez le mot de passe - -# 'System Settings' page -System Settings => Paramètres du système -Host Name => Nom d'hôte -Language => Langue - -# 'Installed Software' page -Installed Packages => Paquets logiciels installés -Update package lists => Mise à jour de la liste des paquets -Uninstall => Désinstaller -Install => Installer - - -# 'Firmware Upgrade' page -Firmware format => Format du firmware -Error => Erreur -done => prêt -Invalid_formt => Le firmware n'a pas un format valide -Erase_JFFS2 => Effacer la partition JFFS2 -Options => Options -Firmware_image => Fichier firmware -Upgrade => Mettre à jour -Upgrading... => Mise à jour en cours... - -# 'LAN Settings' page -LAN Settings => Paramètres LAN -LAN Configuration => Configuration LAN -Netmask => Masque réseau -Default Gateway => Passerelle par défaut -DNS Servers => Serveur DNS -DNS Address => Addresse DNS - -Note => Note - - -# 'WAN Settings' page -WAN Settings => Paramètres Internet -WAN Configuration => Configuration Internet -PPTP Server IP => Adresse IP du serveur PPTP -Connection Type => Type de connexion -No WAN => Pas de configuration WAN -DHCP => DHCP -Static IP => IP statique -IP Settings => Paramètres IP -PPP Settings => Paramètres PPP -Redial Policy => Options de renumérotation -Connect on Demand => Sur demande -Keep Alive => Toujours connecté -Maximum Idle Time => Délai maximal d'inactivté -Redial Timeout => Délai avant renumérotation -MTU => Taille maximale des paquets -Username => Nom d'utilisateur - - -# 'Wireless Configuration' page -Wireless Configuration => Configuration Wi-Fi -Wireless Interface => Interface Wi-Fi -WEP Key => Clé WEP -Selected WEP Key => Choix de la clé WEP -WPA PSK => WPA clé pré-partagée -ESSID => ESSID -Channel => Canal -RADIUS IP Address => Adresse IP du serveur RADIUS -RADIUS Server Key => Secret partagé avec le serveur RADIUS -Enabled => Activé -Disabled => Désactivé -ESSID Broadcast => Diffusion du SSID -Show => Montrer -Hide => Cacher -WLAN Mode => Mode de fonctionnement Wi-Fi -Access Point => Point d'accès -Client => Client -Bridge => Pont-réseau -Ad-Hoc => Ad-Hoc -Encryption Settings => Paramètres de chiffrement -Encryption Type => Type de chiffrement -PSK => Clé pré-partagée -WPA Mode => Mode WPA -WPA Algorithms => Algorithmes WPA -WEP Keys => Clés WEP - - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => Configuration Wi-Fi avancée -WDS Connections => Connexions WDS -MAC Filter List => Filtre par adresses MAC -Filter Mode => Mode de filtrage -Allow => Autoriser -Deny => Refuser -Set => Paramètrer -Settings => Paramètres -Automatic WDS => WDS automatique -WDS watchdog timeout => Délai d'inactivité WDS -Antenna selection => Sélection de l'antenne - -# "Hosts" page - -MAC Address => Adresse MAC -Configured Hosts => Hôtes configurés -DHCP Static => Entrées DHCP statiques -Host Names => Noms d'hôtes - -Up => Monter -Down => Descendre -Edit => Editer -Delete => Effacer -Save => Sauvegarder -Cancel => Annuler - -Forward => Transférer -Accept => Accepter -Drop => Ignorer - -Firewall => Pare-feu -Firewall Rules => Règles du pare-feu -Firewall Configuration => Configuration du pare-feu - -New Rule => Nouvelle règle -Match => Concordance -Target => Destination -Port => Port - -Protocol => Protocole -Source IP => IP source -Destination IP => IP de destination -Source Ports => Ports source -Destination Ports => Ports de destination - -Forward to => Transférer vers -Port => Port - - -Helptext ESSID => Nom du réseau sans-fil -Helptext DNS save => Il est recommandé de sauvegarder vos paramètres avant d'ajouter/enlever des serveurs DNS - - -Helptext Operation mode => Configure le mode de fonctionnement de votre -réseau sans-fil. Le mode Client (Pont réseau sans-fil) ne changera pas les paramètres de votre interface. Certains paramètres de la carte Wi-Fi seront modifiés de manière à pouvoir fonctionner en mode réseau sans-fil. -Helptext Encryption Type => 'WPA (RADIUS)' ne fonctionne qu'en mode point d'accès.
      'WPA (PSK)' ne fonctionne pas en mode Ad-hoc. -Helptext IP Settings => Les paramètres IP sont optionnels pour DHCP et PPTP. Si vous les configurez, ils seront utilisé comme paramètres par défaut dans le cas oú le serveur DHCP ne répond< pas. -Helptext Idle Time => Nombre de secondes sans traffic internet à attendre avant que le routeur déconnecte d'Internet (Connexion à la demande) -Helptext Redial Timeout => Nombre de secondes à attendre après n'avoir recu aucune réponse du fournisseur avant un nouvel éssai de connexion. - - -Available packages => Paquetages disponibles - diff --git a/package/webif/files/usr/lib/webif/lang/hr/common.txt b/package/webif/files/usr/lib/webif/lang/hr/common.txt deleted file mode 100644 index a6291a26a6..0000000000 --- a/package/webif/files/usr/lib/webif/lang/hr/common.txt +++ /dev/null @@ -1,199 +0,0 @@ -lang => Hrvatski -Encoding => UTF-8 -# Common -Settings saved => Postavke Spremljene -Settings not saved => Postavke Nisu Spremljene -Save Changes => Spremi Postavke -Apply Changes => Primijeni Postavke -Clear Changes => Obriši Postavke -Review Changes => Pregledaj Izmjene -Host Name => Naziv Hosta -Uptime => U Pogonu Od -Load => Optereæenje -Version => Verzija -Categories => Kategorije -Subcategories => Podkategorije -more... => nastavak... -Add => Dodaj -Remove => Makni -Warning => Upozorenje -Password_warning => Niste postavili lozinku za Web suèelje i SSH pristup -Molimo vas unesite lozinku (korisnièko ime u vašem pregledniku æ biti 'root'). -# Categories -Info => Informacije -About => Opis -Router Info => O ureðaju -Status => Status -Connections => Veze -DHCP => DHCP -Wireless => Wireless -System => Sustav -Password => Lozinka -Settings => Postavke -Installed Software => Instalirani Softver -Firmware Upgrade => Nadogradnja Firmware-a -Network => Mreža -LAN => LAN -WAN => WAN -Wireless => Wireless -Advanced Wireless => Napredne Wireless Postavke -Hosts => Konfigurirani Hostovi - -# 'About' page -Copyright => Copyright -GPL_Text => This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -Contributions by => Contributions by SL SOLUCIJE d.o.o. -Layout based on => Layout based on SmartHop webif -by => by Silvije Filipovic - silvije.filipovic@slsolucije.hr - -No config change. => Nema nikakvih promjena konfiguracije. -Config discarded. => Vaše promjene konfiguracije su opozvane. -Config changes: => Trenutne promjene konfiguracije: -Updating config... => Konfiguracija se nadograðuje... - -# 'Router Info' page -Firmware Version => Firmware Verzija -Kernel Version => Kernel Verzija -Current Date/Time => Trenutni Datum/ Vrijeme -MAC Address => Mac Adresa - -# 'Connections' page -Connection Status => Status Veza -Physical Connections => Fizièke Veze -Router Connections => Usmjeravanje - -# 'DHCP' page -DHCP leases => DHCP dodjela -IP Address => IP Adresa -Name => Naziv -Expires in => Rok istjecanja - -# 'Wireless Status' page -Wireless Status => Wireless Status -# 'Password' page -Password Change => Promjena Lozinke -New Password => Nova Lozinka -Confirm Password => Potvrdi Lozinku -# 'System Settings' page -System Settings => Postavke Sustava -Host Name => Naziv Hosta -Language => Jezik -# 'Installed Software' page -Installed Packages => Instalirani Paketi -Update package lists => Ažuriraj listu paketa -Uninstall => Deinstaliraj -Install => Instaliraj - -# 'Firmware Upgrade' page -Firmware format => Firmware format -Error => Greška -done => gotovo -Invalid_formt => Neispravan Firmware Format -Erase_JFFS2 => Izbriši JFFS2 particiju -Options => Opcije -Firmware_image => Firmware image za upload -Upgrade => Nadogradi -Upgrading... => Nadogradnja u tijeku... -# 'LAN Settings' page -LAN Settings => LAN Postavke -LAN Configuration => LAN Konfiguracija -Netmask => Netmask -Default Gateway => Default Gateway -DNS Servers => DNS Serveri -DNS Address => DNS Adresa -Note => Bilješke -# 'WAN Settings' page -WAN Settings => WAN Postavke -WAN Configuration => WAN Konfiguracija -PPTP Server IP => PPTP Server IP -Connection Type => Tip Konekcije -No WAN => Bez WAN Konekcije -DHCP => DHCP -Static IP => Statièki IP -IP Settings => IP Postavke -PPP Settings => PPP Postavke -Redial Policy => Redial Policy -Connect on Demand => Spajanje na Zahtjev -Keep Alive => Keep Alive -Maximum Idle Time => Dozvoljeni Max. Idle Time -Redial Timeout => Redial Timeout -MTU => MTU -Username => Korisnièko Ime - -# 'Wireless Configuration' page -Wireless Configuration => Wireless Konfiguracija -Wireless Interface => Wireless Interface -WEP Key => WEP Key -Selected WEP Key => Odabrani WEP Key -WPA PSK => WPA PSK -ESSID => ESSID -Channel => Kanal -RADIUS IP Address => RADIUS IP Adresa -RADIUS Server Key => RADIUS Server Key -Enabled => Omoguæeno -Disabled => Onemoguæeno -ESSID Broadcast => ESSID Broadcast -Show => Neskriveni -Hide => Skriveni -WLAN Mode => WLAN Mod -Access Point => Access Point -Client => Client -Bridge => Bridge -Ad-Hoc => Ad-Hoc -Operation mode => Operaativni mod -Encryption Settings => Postavke Enkripcije -Encryption Type => Tip Enkripcije -PSK => PSK -WPA Mode => WPA Mod -WPA Algorithms => WPA Algoritmi -WEP Keys => WEP Keys -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => Napredne Wireless Postavke -WDS Connections => WDS Veze -MAC Filter List => MAC Filter Lista -Filter Mode => Filter Mod -Allow => Dozvoli -Deny => Zabrani -Set => Postavi -Settings => Postavke -Automatic WDS => Automatski WDS -# "Hosts" page -MAC Address => MAC Adresa -Configured Hosts => Konfigurirani Hostovi -DHCP Static => Statièki DHCP -Host Names => Nazivi Hostova -Up => Gore -Down => Dolje -Edit => Uredi -Delete => Briši -Save => Spremi -Cancel => Odustani -Forward => Naprijed -Accept => Prihvati -Drop => Otkaži -Firewall => Firewall -Firewall Rules => Firewall Pravila -Firewall Configuration => Firewall Konfiguracija -New Rule => Novo Pravilo -Match => Uvjet -Target => Cilj -Port => Port -Protocol => Protokol -Source IP => Ishodišni IP -Destination IP => Odredišni IP -Source Ports => Ishodišni Portovi -Destination Ports => Odredišni Portovi -Forward to => Preusmjeravanje na -Port => Port -Helptext ESSID => Naziv Wireless Mreže -Helptext DNS save => Trebali biste spremiti vaše postavke na ovoj stranici prije dodavanja/brisanja DNS posljužitelja -Helptext Operation mode => Ova opcija odreðuje operativni mod rada vaše wireless mreže. Odabir 'Client (Bridge)' neæe promijeniti postavke mrežnog suèelja. Samo æe biti dodani parametri u pogonski program koji omoguæavaju ogranièene bridging funkcije suèelja. -Helptext Encryption Type => 'WPA (RADIUS)' je podržan samo u Access Point modu. -'WPA (PSK)' ne radi u Ad-Hoc modu. -Helptext IP Settings => IP Postavke su opcionalne za DHCP i PPTP. Ukoliko su postavljene, koriste se kao pretpostavljene, u sluèaju kada DHCP poslužitelj nije dostupan. -Helptext Idle Time => Vrijeme u sekundama bez internet prometa do kojeg ureðaj treba èekati prije prekida veze (samo kod Spajanja na Zahtjev) -Helptext Redial Timeout => Vrijeme u sekundama za prijem odgovora od prividera prije ponovnog spajanja diff --git a/package/webif/files/usr/lib/webif/lang/hu/common.txt b/package/webif/files/usr/lib/webif/lang/hu/common.txt deleted file mode 100644 index a8a08e6588..0000000000 --- a/package/webif/files/usr/lib/webif/lang/hu/common.txt +++ /dev/null @@ -1,227 +0,0 @@ -lang => Magyar -# Common -Settings saved => Beállítások elmentve -Settings not saved => Beállítások mentésének mellőzése -Save Changes => Változatások mentése -Apply Changes => Változtatások alkalmazása -Clear Changes => Változtatások eldobása -Review Changes => Változtatások megtekintése -Host Name => Host név -Uptime => Üzemidő -Load => Rendszer terhelés -Version => Verzió -Categories => Kategoriák -Subcategories => Alkategóriák -more... => További információk... -Add => Hozzáad -Remove => Eltávolít -Warning => Vigyázat -Password_warning => A Web-Adminisztrátoenak és az SSH hozzáféréshez még nincs jelszó beállítva.
      Adjon meg most egy új jelszót (felhasználónév a böngészőben: 'root'). - -# Categories -Info => Információ -About => Rólunk -Router Info => Router információ - -Status => Állapot -Connections => Hálózati kapcsolatok -DHCP => DHCP -Wireless => WLAN - -System => Rendszer -Password => Jelszó -Settings => Beállítások -Installed Software => Telepítés -Firmware Upgrade => Firmware frissítés - -Network => Hálózat -LAN => LAN -WAN => Internet -Wireless => WLAN -Advanced Wireless => WLAN (haladó) -Hosts => Host konfiguráció - - -# 'About' page -Copyright => Copyright - -GPL_Text => This program is free software; you can redistribute it and/or
      modify it under the terms of the GNU General Public License
      as published by the Free Software Foundation; either version 2
      of the License, or (at your option) any later version. -Contributions by => Contributions by -Layout based on => Layout based on -by => by - -No config change. => A konfigurációban nincs változás. -Config discarded. => Konfiguráció változtatások eldobva. -Config changes: => Konfiguráció módodítások: -Updating config... => Konfiguráció frissítése... - - -# 'Router Info' page -Firmware Version => Firmware verzió -Kernel Version => Kernel verzió -Current Date/Time => Aktuális dátum/idő -MAC Address => MAC Address - - -# 'Connections' page -Connection Status => Kapcsolatok -Physical Connections => Fizikai kapcsolatok -Router Connections => Router kapcsolatok - - -# 'DHCP' page -DHCP leases => DHCP bérletek -IP Address => IP cím -Name => Név -Expires in => Lejár - - -# 'Wireless Status' page -Wireless Status => WLAN állapot - -# 'Password' page -Password Change => Jelszó csere -New Password => Új jelszó -Confirm Password => Jelszó mégegyszer - -# 'System Settings' page -System Settings => Rendszer beállítások -Host Name => Host név -Language => Nyelv - -# 'Installed Software' page -Installed Packages => Telepített csomagok -Update package lists => Csomaglista frissítése -Uninstall => Eltávolítás -Install => Telepítés - - -# 'Firmware Upgrade' page -Firmware format => Firmware format -Error => Hiba -done => Kész -Invalid_format => Érvénytelen Firmware -Erase_JFFS2 => JFFS2 partíció törlése -Options => Opciók -Firmware_image => Firmware -Upgrade => Frissítés -Upgrading... => Frissítés folyamatban... - -# 'LAN Settings' page -LAN Settings => Hálózat beállítások -LAN Configuration => Hálózat konfiguráció -Netmask => Hálózati maszk -Default Gateway => Alapértelmezett átjáró -DNS Servers => DNS szerverek -DNS Address => DNS szerver cím - -Note => Megjegyzés - - -# 'WAN Settings' page -WAN Settings => Internet beállítások -WAN Configuration => Internet konfiguráció -PPTP Server IP => PPTP szerver cím -Connection Type => Kapcsolat típusa -No WAN => Nincs internet -DHCP => DHCP -Static IP => Statikus IP konfiguráció -IP Settings => IP beállítások -PPP Settings => PPP beállítások -Redial Policy => Újratárcsázás szabálya -Connect on Demand => Csatlakozás kérés esetén -Keep Alive => Tartsd életben -Maximum Idle Time => Maximum inaktív ídő -Redial Timeout => Újratárcsázási idő -MTU => Maximal Transfer Unit -Username => Felhasználó - - -# 'Wireless Configuration' page -Wireless Configuration => WLAN konfiguráció -Wireless Interface => WLAN interfész -WEP Key => WEP kulcs -Selected WEP Key => Választott WEP kulcs -WPA PSK => WPA PSK -ESSID => ESSID -Channel => Csatorna -RADIUS IP Address => RADIUS szerver cím -RADIUS Server Key => RADIUS szerver kulcs -Enabled => Engedélyezve -Disabled => Tiltva -ESSID Broadcast => ESSID hirdetése (szórása) -Show => Engedélyezve -Hide => Tiltva -WLAN Mode => WLAN mód -Access Point => Access Point -Client => Client -Bridge => Bridge -Ad-Hoc => Ad-Hoc -Encryption Settings => Titkosítás beállítások -Encryption Type => Titkosítás típusa -PSK => PSK -WPA Mode => WPA mód -WPA Algorithms => WPA algoritmus -WEP Keys => WEP kulcsok - - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => WLAN konfiguráció (haladó) -WDS Connections => WDS kapcsolatok -MAC Filter List => MAC Address szürés -Filter Mode => Szürő mód -Allow => Engedélyező -Deny => Tiltó -Set => Beállítás -Settings => Beállítások -Automatic WDS => Automatikus WDS - -# "Hosts" page - -MAC Address => MAC-Address -Configured Hosts => Konfigurált gépek -DHCP Static => Statikus DHCP beállítások -Host Names => Host nevek - - -Up => Fel -Down => Le -Edit => Szerkesztés -Delete => Törlés -Save => Mentés -Cancel => Mégse - -Forward => Továbbít -Accept => Elfogad -Drop => Eldob - -Firewall => Tűzfal -Firewall Rules => Tűzfal szabályok -Firewall Configuration => Tűzfal konfiguráció - -New Rule => Új szabály -Match => Illeszt -Target => Cél -Port => Port - -Protocol => Protokoll -Source IP => Forrás-IP -Destination IP => Cél-IP -Source Ports => Forrás-Portok -Destination Ports => Cél-Portok - -Forward to => Továbbít -Port => Port - -Helptext ESSID => A vezeték nélküli hálózat neve. -Helptext DNS save => Mentsd el a beállításokat, mielőtt ezen az oldalon hozzáadsz ill. eltávolítasz DNS szervert. - -Helptext Operation mode => Ezek a beállítsok a vezeték nélküli hálozat működését határozzák meg. A 'Client (Bridge)' mód a hálózati csatoló beállításait nem módosítja. Csak néhány paramétert állít a vezetéknélküli eszközmeghajtóban, a korlátozott áthidaláshoz. -Helptext Encryption Type => 'WPA (RADIUS)' csak Access-Pont módban támogatott.
      'WPA (PSK)' nem működik Ad-Hoc módban. -Helptext IP Settings => IP beállítások opcionálisak a DHCP-hez és a PPTP-hez. Az itt beállított értékek lesznek az alapértelmezettek, ha a DHCP szerver nem elérhető. -Helptext Idle Time => Maximális idő másodpercben internet forgalom nélkül, amennyit a router vár mielőtt bontja a kapcsolatot (csak 'Csatlakozás kérés esetén' módban). -Helptext Redial Timeout => Maximális idő másodpercben az újratárcsázás előtt, ha a szolgáltató nem válaszol. - -# untranslated: -Available packages => Használható csomagok - diff --git a/package/webif/files/usr/lib/webif/lang/it/common.txt b/package/webif/files/usr/lib/webif/lang/it/common.txt deleted file mode 100644 index 8607facf21..0000000000 --- a/package/webif/files/usr/lib/webif/lang/it/common.txt +++ /dev/null @@ -1,226 +0,0 @@ -lang => Italiano -# Common -Settings saved => Cambiamenti salvati -Settings not saved => Cambiamenti non salvati -Save Changes => Salva cambiamenti -Apply Changes => Applica cambiamenti -Clear Changes => Elimina cambiamenti -Review Changes => Controlla cambiamenti -Host Name => Nome Host -Uptime => Uptime -Load => Caricamento del sistema -Version => Versione -Categories => Categoria -Subcategories => Sottocategoria -more... => altro... -Add => Aggiungi -Remove => Elimina -Warning => Attenzione -Password_warning => non e' stata ancora impostata una password di protezione per il router (accesso web o ssh). Per favore, inseriscine una ora (il nome utente sara': 'root') - -# Categories -Info => Info -About => Ringraziamenti -Router Info => Informazioni del router - -Status => Stato -Connections => Connessioni -DHCP => DHCP -Wireless => Wireless - -System => Sistema -Password => Password -Settings => Configurazione -Installed Software => Programmi installati -Firmware Upgrade => Aggiornamento Firmware - -Network => Rete -LAN => LAN -WAN => Internet -Wireless => Wireless -Advanced Wireless => Wireless (avanzato) -Hosts => Configurazione Host - - -# 'About' page -Copyright => Copyright - -GPL_Text => Questo programma software libero; lecito ridistribuirlo e/o
      modificarlo secondo i termini della Licenza Pubblica Generica GNU
      come pubblicata dalla Free Software Foundation; o la versione 2 della licenza o (a scelta) una versione successiva. -Contributions by => Contributi -Layout based on => Interfaccia basata su -by => da - - -No config change. => Nessun cambiamento della configurazione. -Config discarded. => I cambiamenti non sono stati accettati. -Config changes: => Cambiamenti configurazione: -Updating config... => Aggiornamento configurazione... - - -# 'Router Info' page -Firmware Version => Versione del firmware -Kernel Version => Versione del Kernel -Current Date/Time => Data/Ora -MAC Address => Indirizzo MAC - - -# 'Connections' page -Connection Status => Stato della connessione -Physical Connections => Connessioni fisiche -Router Connections => Connessioni del router - - -# 'DHCP' page -DHCP leases => lease DHCP -IP Address => Indirizzo IP -Name => Nome -Expires in => Scade il - - -# 'Wireless Status' page -Wireless Status => Stato Wireless - -# 'Password' page -Password Change => Cambio password -New Password => Nuova password -Confirm Password => Confema password - -# 'System Settings' page -System Settings => Parametri di sistema -Host Name => Nome dell'host -Language => Linguaggio - -# 'Installed Software' page -Installed Packages => Pacchetti installati -Update package lists => Aggiorna la lista dei pacchetti -Uninstall => Disinstalla -Install => Installa - - -# 'Firmware Upgrade' page -Firmware format => Formato del firmware -Error => Errore -done => eseguito -Invalid_formt => Formato del firmware invalido -Erase_JFFS2 => Cancella la partizione JFFS2 -Options => Opzioni -Firmware_image => Immagine del firmware -Upgrade => Aggiorna -Upgrading... => Aggiornamento in corso... - -# 'LAN Settings' page -LAN Settings => Parametri LAN -LAN Configuration => Configuzione LAN -Netmask => Netmask -Default Gateway => Default Gateway -DNS Servers => Server DNS -DNS Address => Indirizzo IP del DNS - -Note => Nota - -# 'WAN Settings' page -WAN Settings => Parametri Internet -WAN Configuration => Configurazione Internet -PPTP Server IP => Indirizzo IP del server PPTP -Connection Type => Tipo di connessione -No WAN => No WAN -DHCP => DHCP -Static IP => IP statico -IP Settings => Paramentri IP -PPP Settings => Parametri PPP -Redial Policy => Opzioni di riconnessione -Connect on Demand => Connessione su richiesta -Keep Alive => Connessione permanente -Maximum Idle Time => Tempo di inattivita' massimo -Redial Timeout => Tempo di riconnessione -MTU => MTU (grandezza pacchetti) -Username => Nome utente - - -# 'Wireless Configuration' page -Wireless Configuration => Parametri Wireless -Wireless Interface => Interfaccia Wireless -WEP Key => Chiave WEP -Selected WEP Key => Chiave WEP selezionata -WPA PSK => WPA-PSK -ESSID => ESSID -Channel => Canale -RADIUS IP Address => Indirizzo IP del server RADIUS -RADIUS Server Key => Server Key RADIUS -Enabled => Attivato -Disabled => Disattivato -ESSID Broadcast => SSID Broadcast -Show => Mostra -Hide => Nascondi -WLAN Mode => Modo WLAN -Access Point => Punto di accesso -Client => Client -Bridge => Bridge -Ad-Hoc => Ad-Hoc -Operation mode => Modo di funzionamento -Encryption Settings => Parametri di encryption -Encryption Type => Tipo di encryption -PSK => PSK -WPA Mode => Modo WPA -WPA Algorithms => Algoritmo WPA -WEP Keys => Chiave WEP - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => Configurazione Wireless avanzata -WDS Connections => Connessioni WDS -MAC Filter List => Filtro per indirizzo MAC -Filter Mode => Metodo di filtraggio -Allow => Autorizza -Deny => Nega -Set => Setta -Settings => Parametri -Automatic WDS => WDS Automatico - -# "Hosts" page - -MAC Address => Indirizzo MAC -Configured Hosts => Host configurati -DHCP Static => DHCP Statico -Host Names => Nome Host - -Up => Su -Down => Giu' -Edit => Edita -Delete => Elimina -Save => Salva -Cancel => Cancella - -Forward => Ridirigi -Accept => Accetta -Drop => Scarta - -Firewall => Firewall -Firewall Rules => Regole del Firewall -Firewall Configuration => Configurazione del Firewall - -New Rule => Nuova regola -Match => Filtro -Target => Obiettivo -Port => Porta - -Protocol => Protocollo -Source IP => IP di origine -Destination IP => IP di destinazione -Source Ports => Porta di origine -Destination Ports => Porta di destinazione - -Forward to => Redirigi su -Port => Porta - -Helptext ESSID => SSID -Helptext DNS save => E' consigliabile salvare i cambiamenti prima di aggiungere o eliminare server DNS dalla lista - -Helptext Operation mode => Imposta il metodo di utilizzo della rete wireless. Scegliendo 'Client (bridge)' non cambiera' la configurazione dell'interfaccia di rete. -Helptext Encryption Type => 'WPA (RADIUS)' puo' essere usato solo nel modo Access Point.
      'WPA (PSK)' non funziona nel modo Ad-Hoc. -Helptext IP Settings => Le opzioni IP sono opzioni per DHCP e PPTP. -Helptext Idle Time => Numero di secondi che deve aspettare il router prima di disconnettersi. (Solo nel metodo ' Connessione su richiesta'). -Helptext Redial Timeout => Numero di secondi che il router deve aspettare per effettuare una nuova riconnessione. - -# untranslated: -Available packages => Available packages - diff --git a/package/webif/files/usr/lib/webif/lang/nl/common.txt b/package/webif/files/usr/lib/webif/lang/nl/common.txt deleted file mode 100644 index 875ba6c0ce..0000000000 --- a/package/webif/files/usr/lib/webif/lang/nl/common.txt +++ /dev/null @@ -1,224 +0,0 @@ -lang => Nederlands -# Common -Settings saved => Instellingen bewaard -Settings not saved => Instellingen niet bewaard -Save Changes => Bewaar wijzigingen -Apply Changes => Gebruik wijzigingen -Clear Changes => Wis wijzigingen -Review Changes => Bekijk wijzigingen -Host Name => Host naam -Uptime => Uptime -Load => Laad -Version => Versie -Categories => Categorie -Subcategories => Subcategorie -more... => meer... -Add => Bijvoegen -Remove => Verwijder -Warning => Waarschuwing -Password_warning => U hebt nog geen wachtwoord ingesteld voor de Web interface en SSH toegang. Gelieve er nu een in te geven (de gebruikersnaam in uw browser zal 'root' zijn). - -# Categories -Info => Info -About => Over -Router Info => Router Info - -Status => Status -Connections => Connecties -DHCP => DHCP -Wireless => Draadloos - -System => Systeem -Password => Wachtwoord -Settings => Instellingen -Installed Software => Geinstalleerde Software -Firmware Upgrade => Firmware Upgrade - -Network => Netwerk -LAN => LAN -WAN => WAN -Wireless => Draadloos -Advanced Wireless => Geavanceerd Draadloos -Hosts => Geconfigureerde Hosts - - -# 'About' page -Copyright => Copyright - -GPL_Text => Dit programma is vrije software; u mag het verdelen en/of wijzigen onder de voorwaarden van GNU General Public License zoals gepubliceerd door de Free Software Foundation; ofwel versie 2 van de licentie, of (volgens Uw keuze) iedere latere versie. - -Contributions by => Bijdragen door -Layout based on => Layout gebasseerd op -by => door - - -No config change. => Er werden geen configuratie wijzigingen aangebracht. -Config discarded. => Uw configuratie wijzigingen werden verworpen. -Config changes: => Huidige configuratie wijzigingen: -Updating config... => Uw configuratie wordt aangepast... - - -# 'Router Info' page -Firmware Version => Firmware Versie -Kernel Version => Kernel Versie -Current Date/Time => Huidige Datum/Tijd -MAC Address => MAC Adres - - -# 'Connections' page -Connection Status => Verbindings Status -Physical Connections => Fysieke Verbindingen -Router Connections => Router Verbindingen - - -# 'DHCP' page -DHCP leases => DHCP leases -IP Address => IP Adres -Name => Naam -Expires in => Vervalt binnen - - -# 'Wireless Status' page -Wireless Status => Draadloos Status - -# 'Password' page -Password Change => Wachtwoord Wijzigen -New Password => Nieuw Wachtwoord -Confirm Password => Bevestig Wachtwoord - -# 'System Settings' page -System Settings => Systeem Instellingen -Host Name => Host naam -Language => Taal - -# 'Installed Software' page -Installed Packages => Geinstalleerde Pakketten -Available packages => Beschikbare pakketten -Update package lists => Aanpassen Pakketlijst -Uninstall => Deinstalleren -Install => Installeren - - -# 'Firmware Upgrade' page -Firmware format => Firmware Formaat -Error => Fout -done => voltooid -Erase_JFFS2 => Wis JFFS2 partitie -Options => Opties -Firmware_image => Firmware image om te laden -Upgrade => Upgrade -Upgrading... => Upgrading... - -# 'LAN Settings' page -LAN Settings => LAN Instellingen -LAN Configuration => LAN Configuratie -Netmask => Netmask -Default Gateway => Standaard Gateway -DNS Servers => DNS Servers -DNS Address => DNS Adres - -Note => Nota - -# 'WAN Settings' page -WAN Settings => WAN Instellingen -WAN Configuration => WAN configuratie -PPTP Server IP => PPTP Server IP -Connection Type => Connectie Type -No WAN => Geen WAN -DHCP => DHCP -Static IP => Statisch IP -IP Settings => IP Instellingen -PPP Settings => PPP Instellingen -Redial Policy => Opnieuw bel beleid -Redial Timeout => Bel vertraging -Connect on Demand => Verbinden op Aanvraag -Keep Alive => Hou actief -Maximum Idle Time => Maximale Idle Time -MTU => MTU -Username => Gebruikersnaam - - -# 'Wireless Configuration' page -Wireless Configuration => Draadloos Configuratie -Wireless Interface => Draadloos Interface -WEP Key => WEP Sleutel -Selected WEP Key => Geselecteerde WEP sleutely -WPA PSK => WPA PSK -ESSID => ESSID -Channel => Kanaal -RADIUS IP Address => RADIUS IP Adres -RADIUS Server Key => RADIUS Server Sleutel -Enabled => Ingeschakeld -Disabled => Uitgeschakeld -ESSID Broadcast => ESSID Broadcast -Show => Toon -Hide => Verberg -WLAN Mode => WLAN Mode -Access Point => Toegangs Punt -# Was "Klant" first which can only be translated as an economical client, i.e. a customer. AFAIK Dutch doesn't provide any true translation for Client in this context -Client => Client -Bridge => Brug -Ad-Hoc => Ad-Hoc -Operation mode => Operation mode -Encryption Settings => Encryptie Instelligen -Encryption Type => Encryptie Type -PSK => PSK -WPA Mode => WPA Mode -WPA Algorithms => WPA Algoritmen -WEP Keys => WEP Sleutels - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => Geavanceerde Draadloze Configuratie -WDS Connections => WDS Verbindingen -MAC Filter List => MAC Filter Lijst -Filter Mode => Filter Mode -Allow => Toelaten -Deny => Weigeren -Set => Stel -Settings => Instellingen -Automatic WDS => Automatische WDS - -# "Hosts" page - -MAC Address => MAC Adres -Configured Hosts => Geconfigureerde Hosts -DHCP Static => DHCP Statisch -Host Names => Host Namen - -Up => Op -Down => Neer -Edit => Wijzig -Delete => Wis -Save => Bewaar -Cancel => Afbreken - -Forward => Doorsturen -Accept => Accepteren -Drop => Negeren - -Firewall => Firewall -Firewall Rules => Firewall Regels -Firewall Configuration => Firewall Configuratie - -New Rule => Nieuwe Regel -Match => Overeenstemmen -Target => Doel -Port => Poort - -Protocol => Protocol -Source IP => Bron IP -Destination IP => Bestemmings IP -Source Ports => Bron Poorten -Destination Ports => Bestemmings Poorten - -Forward to => Doorsturen naar -Port => Poort - -Helptext ESSID => Naam van uw Draadloos Netwerk -Helptext DNS save => U moet de instellingen op deze pagina bewaren alvorens DNS servers te wijzigen/verwijderen - -Helptext Operation mode => Dit stelt de Operatie Mode voor uw draadloos netwerk in. Door 'Client (Brug)' te kiezen zullen uw network interface instellingen niet wijzigen. Er zullen alleen enkele parameters ingesteld worden in de draadloze driver die gelimiteerde overbrugging van de interface mogelijk maakt. -Helptext Encryption Type => 'WPA (RADIUS)' wordt enkel ondersteund in de Toegangs Punt mode.
      'WPA (PSK)' werkt niet in Ad-Hoc mode. -Helptext IP Settings => IP instellingen zijn optioneel voor DHCP en PPTP. Indien U ze instelt dan worden ze als standaardwaarden gebruikt indien de DHCP server onbeschikbaar is. -Helptext Idle Time => Het aantal seconden zonder internet verkeer dat de router zou moeten wachten alvorens zich af te sluiten van het Internet (Alleen bij Verbinden op Aanvraag) -Helptext Redial Timeout => Het aantal seconden dat gewacht moet worden alvorens opnieuw een verbinding wordt gemaakt indien deze geweigerd werd door uw ISP. diff --git a/package/webif/files/usr/lib/webif/lang/no/common.txt b/package/webif/files/usr/lib/webif/lang/no/common.txt deleted file mode 100644 index f94684fa5e..0000000000 --- a/package/webif/files/usr/lib/webif/lang/no/common.txt +++ /dev/null @@ -1,230 +0,0 @@ -lang => Norsk -# Common -Settings saved => Innstillingene ble lagret -Settings not saved => Innstillingene ble ikke lagret -Save Changes => Lagre endringer -Apply Changes => Aktiver endringer -Clear Changes => Glem endringer -Review Changes => Se endringer -Host Name => Vertsnavn -Uptime => Oppetid -Load => Systembelastning -Version => Versjon -Categories => Kategorier -Subcategories => Underkategorier -more... => mer... -Add => Legg til -Remove => Fjern -Warning => Advarsel -Password_warning => Det er ikke satt et passord på hverken Webadministrasjon eller SSH.
      Vennligst velg eller tast inn ditt passord (Brukernavn er 'root' med små bokstaver). - -# Categories -Info => Info -About => Om -Router Info => Routerinformasjon - -Status => Status -Connections => Nettverksforbindelser -DHCP => DHCP -Wireless => Trådløs - -System => System -Password => Passord -Settings => Innstillinger -Installed Software => Installerte programmer -Firmware Upgrade => Firmwareoppgradering - -Network => Nettverk -LAN => Lokalnett -WAN => Internett -Wireless => Trådløs -Advanced Wireless => Avansert trådløs -Hosts => Vertsnavn - - -# 'About' page -Copyright => Opphavsrett - -GPL_Text => Dette programmet er fri programvare. Du må bruke, endre og videredistribuere det under betingelsene i "GNU General Public License",
      som offentliggjort av "Free Software Foundation" (Den frie programbevegelse), enten i versjon 2 av lisensen eller (etter ditt valg), en hvilkensomhelst senere versjon. - -Contributions by => Bidrag fra -Layout based on => Layout er basert på -by => av - - -No config change. => Ingen konfigurasjonsendring foretatt -Config discarded. => Konfigurasjonsendringerne ble forkastet -Config changes: => Foreløpige endringer -Updating config... => Oppdaterer konfigurasjonen - -# 'Router Info' page -Firmware Version => Firmwareversjon -Kernel Version => Kjerneversjon -Current Date/Time => Nåværende tid/dato -MAC Address => MAC adresse - - -# 'Connections' page -Connection Status => Forbindelsesstatus -Physical Connections => Fysiske forbindelser -Router Connections => Routerens forbindelser - - -# 'DHCP' page -DHCP leases => DHCP leasinger -IP Address => IP adresse -Name => Navn -Expires in => Utløpstid - - -# 'Wireless Status' page -Wireless Status => Trådløs status - -# 'Password' page -Password Change => Endre passord -New Password => Nytt passord -Confirm Password => Nytt passord igjen - -# 'System Settings' page -System Settings => Systeminnstillinger -Host Name => Vertsnavn -Language => Språk - -# 'Installed Software' page -Installed Packages => Installerte pakker -Update package lists => Oppdater pakkelisten -Uninstall => Avinstaller -Install => Installer -Available packages => Tilgjengelige pakker - - -# 'Firmware Upgrade' page -Firmware format => Firmwareformat -Error => Feil -done => ferdig -Invalid_format => Ugyldig_format -Erase_JFFS2 => Slett_JFFS2_partisjonen -Options => Alternativer -Firmware_image => Firmwarefil -Upgrade => Oppgrader -Upgrading... => Oppgraderer... - -# 'LAN Settings' page -LAN Settings => Lokale nettinnstillinger -LAN Configuration => Lokal nettverkskonfigurasjon -Netmask => Undernettmaske -Default Gateway => Standard gateway -DNS Servers => DNS-tjenere -DNS Address => DNS-tjeneradresse - -Note => Merk - - -# 'WAN Settings' page -WAN Settings => WAN-innstillinger -WAN Configuration => WAN-konfigurasjon -PPTP Server IP => PPTP-tjeneradresse -Connection Type => Forbindelsestype -No WAN => Ingen WAN -DHCP => DHCP -Static IP => Statisk IP -IP Settings => IP-innstillinger -PPP Settings => PPP-innstillinger -Redial Policy => Gjenoppringingspolise -Connect on Demand => Ring opp når behovet er der -Keep Alive => Hold forbindelsen i live (keep alive) -Maximum Idle Time => Maksimal tid i tomgang (max idle) -Redial Timeout => Gjenoppringningsavbrekkstid -MTU => MTU -Username => Brukernavn - - -# 'Wireless Configuration' page -Wireless Configuration => Trådløs konfigurasjon -Wireless Interface => Trådløst nettkort -WEP Key => WEP nøkler -Selected WEP Key => Valgt WEP nøkkel -WPA PSK => WPA nøkler -ESSID => ESSID -Channel => Kanal -RADIUS IP Address => IP adressen på RADIUS server -RADIUS Server Key => Passord til RADIUS server -Enabled => Aktivert -Disabled => Deaktivert -ESSID Broadcast => ESSID-Kringkasting -Show => Vis -Hide => Skjul -WLAN Mode => Trådløs tilstand -Access Point => Tilgangspunkt -Client => Klient -Bridge => Bro -Ad-Hoc => Ad-Hoc -Encryption Settings => Krypteringsinnstillinger -Encryption Type => Krypteringstype -PSK => PSK-kode -WPA Mode => WPA tilstand -WPA Algorithms => WPA krypteringsalgoritme -WEP Keys => WEP nøkler - - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => Avansert oppsett av trådløs -WDS Connections => WDS forbindelser (WDS repeater) -MAC Filter List => Filteringsliste (MAC-nummer) -Filter Mode => Filtreringstilstand -Allow => Tillat -Deny => Forby -Set => Sett -Settings => Innstillinger -Automatic WDS => Automatisk WDS-forbindelse - -# "Hosts" page - -MAC Address => MAC-adresse -Configured Hosts => Vertsnavn -DHCP Static => Statiske IP adresser til DHCP -Host Names => Vertsnavn - - -Up => Opp -Down => Ned -Edit => Endre -Delete => Slette -Save => Lagre -Cancel => Annuller - -Forward => Forward (videresend) -Accept => Accept (tillat) -Drop => Drop (kast) - -Firewall => Brannmur -Firewall Rules => Brannmurregler -Firewall Configuration => Brannmurkonfigurasjon - -New Rule => Ny regel -Match => Match (sammenlign) -Target => Target (Gå til) -Port => Port - -Protocol => Protokoll -Source IP => Avsenders IP -Destination IP => Mottakers IP -Source Ports => Avsenders porter -Destination Ports => Mottakers porter - -Forward to => Send videre til -Port => Port - -Helptext ESSID => Navn på trådløs nettverk -Helptext DNS save => Lagre endringer på denne siden før du legger til eller fjerner DNS-tjenere (Hvis du ikke vil miste dem.) - -Helptext Operation mode => Setter driftstilstanden for den trådløse delen av routeren. 'Klient' og 'Klient (bro)' brukes for å koble 2 trådløse routere. I mange tilfeller er WDS en bedre (men mer avansert) løning. 'Klient' utnytter dog båndbredden best, hvis du kun har en maskin tilkoblet.
      Innstillingen 'Klient (bro)' endrer ikke direkte ved nettverksinnstillingene. Det er et lite 'hack' som få routeren til å tro at kun en maskin (en MAC-adresse) er tilkoblet. Det er gjort for å overvinne begrensninger i 802.11-protokollen, som forhindrer at man problemfritt (i vanlig 'Klient'-tilstand) kan bruke den trådløse forbindelsen fra flere maskiner samtidig.
      AP brukes til en standalone router, hvor f.eks bærbare pc'er skal ha tilgang til Internett og/eller lokalt nettverk.
      Hvis du ikke vet hva 'Ad Hoc'-tilstanden gjø, har du sannsynligvis ikke bruk for den. - -Helptext Encryption Type => 'WPA (RADIUS)' er kun støttet i AP (Tilgangspunkt)-tilstand.
      'WPA (PSK)' fungerer ikke i 'Ad-Hoc' tilstand. - -Helptext IP Settings => IP-innstillinger er frivillig for DHCP og PPTP. Nå de er satt, blir de brukt som standardverdier hvis en DHCP-tjener ikke er tilgjengelig. - -Helptext Idle Time => Ventetid med inaktivitet før routeren kobler ned forbindelesen. - -Helptext Redial Timeout => Ventetid før routeren forsøker å ringe opp igjen. - diff --git a/package/webif/files/usr/lib/webif/lang/pl/common.txt b/package/webif/files/usr/lib/webif/lang/pl/common.txt deleted file mode 100644 index c01b20c838..0000000000 --- a/package/webif/files/usr/lib/webif/lang/pl/common.txt +++ /dev/null @@ -1,228 +0,0 @@ -lang => Polski -# Common -Settings saved => Ustawienia zostały zapisane -Settings not saved => Ustawienia niezostały zapisane -Save Changes => Zapisz zmiany -Apply Changes => Zastosuj zmiany -Clear Changes => Czyść zmiany -Review Changes => Przejżyj zmiany -Host Name => Hostname -Uptime => Czas pracy -Load => Obciążenie -Version => Wersja -Categories => Kategorie -Subcategories => Podkategorie -more... => Więcej Informacji... -Add => Dodaj -Remove => Usuń -Warning => Uwaga -Password_warning => Niemasz ustawionego hasła dostępu do WWW oraz SSH
      Prosze wpisz je teraz(nazwa użytkownika to 'root') - -# Categories -Info => Info -About => O Autorze -Router Info => Info o WRT - -Status => Status -Connections => Połaczenia -DHCP => DHCP -Wireless => WLAN - -System => System -Password => Hasło -Settings => Ustawienia -Installed Software => Zainstalowane pakiety -Firmware Upgrade => Aktualizacja opr. - -Network => Sieć -LAN => LAN -WAN => Internet(WAN) -Wireless => WLAN -Advanced Wireless => Zaawansowane WLAN -Hosts => Konfiguracja Hostów - - -# 'About' page -Copyright => Copyright - -GPL_Text => This program is free software; you can redistribute it and/or
      modify it under the terms of the GNU General Public License
      as published by the Free Software Foundation; either version 2
      of the License, or (at your option) any later version. -Contributions by => Wspólpracownicy -Layout based on => Layout bazuje na -by => by - - -No config change. => Nie dokonano zmian. -Config discarded. => Zmiany zostały anulowane. -Config changes: => Aktualna konfiguracja: -Updating config... => Aktualizacja konfiguracji... - - -# 'Router Info' page -Firmware Version => Wersja Opr. -Kernel Version => Wersja kernela -Current Date/Time => Aktualna Data/Czas -MAC Address => Adres MAC - - -# 'Connections' page -Connection Status => Stan połaczeń -Physical Connections => Połączenia fizyczne -Router Connections => Połączenia do routera - - -# 'DHCP' page -DHCP leases => Dzierżawa DHCP -IP Address => Adres IP -Name => Nazwa -Expires in => Wygasa za - - -# 'Wireless Status' page -Wireless Status => Status WLAN - -# 'Password' page -Password Change => Zmien hasło -New Password => Nowe hasło -Confirm Password => Potwierdz hasło - -# 'System Settings' page -System Settings => Ustawienia Systemu -Host Name => Hostname -Language => Język - -# 'Installed Software' page -Installed Packages => Zainstalowane pakiety -Update package lists => Aktualizuj liste pakietów -Uninstall => Usuń -Install => Instaluj - - -# 'Firmware Upgrade' page -Firmware format => Format pliku firmware -Error => Błąd -done => Gotowe -Invalid_format => Błędny format firmware -Erase_JFFS2 => Formatuj JFFS2 -Options => Opcje -Firmware_image => Obraz FW: -Upgrade => Aktualizuj -Upgrading... => Aktualizuje... - -# 'LAN Settings' page -LAN Settings => Ustawienia LAN -LAN Configuration => Konfiguracja LAN -Netmask => Maska sieci -Default Gateway => Brama domyślna -DNS Servers => Serwer DNS -DNS Address => Adres DNS - -Note => Notatka - - -# 'WAN Settings' page -WAN Settings => Ustawienia WAN -WAN Configuration => Konfiguracja WAN -PPTP Server IP => Adres serwera PPTP -Connection Type => Połaczenie -No WAN => Bez WAN -DHCP => DHCP -Static IP => Statyczne IP -IP Settings => Ustawienia IP -PPP Settings => Ustawienia PPP -Redial Policy => Rodzaj wydzwaniania -Connect on Demand => Połączenia na żadanie -Keep Alive => Trzymaj połączenie -Maximum Idle Time => Max. czas bezczynności - -MTU => MTU -Username => Nazwa uzyt. - - -# 'Wireless Configuration' page -Wireless Configuration => WLAN-Konfiguracja -Wireless Interface => Intefejs WLAN -WEP Key => Klucz WEP -Selected WEP Key => Wybrany klucz WEP -WPA PSK => WPA PSK -ESSID => ESSID -Channel => Kanał -RADIUS IP Address => Adres IP RADIUS -RADIUS Server Key => Klucz RADIUS -Enabled => Właczone -Disabled => Wyłączone -ESSID Broadcast => Rozsyłanie ESSID -Show => Pokaż -Hide => Ukryj -WLAN Mode => Tryb Radiowy -Access Point => Punkt Dostępowy -Client => Klient -Bridge => Most -Ad-Hoc => Ad-Hoc -Encryption Settings => Ustawienia kodowania -Encryption Type => Rodzaj kodowania -PSK => PSK -WPA Mode => Tryb WPA -WPA Algorithms => Algorytm WPA -WEP Keys => Klucze WEP - - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => Zaawansowane WLAN -WDS Connections => Połączenie WDS -MAC Filter List => Filtrowanie MAC -Filter Mode => Rodzaj filtra -Allow => Udzielaj dostępu -Deny => Odrzucaj dostęp -Set => Ustaw -Settings => Ustawienia -Automatic WDS => Automatyczny WDS - -# "Hosts" page - -MAC Address => Adres MAC -Configured Hosts => Konfiguracja Hostów -DHCP Static => Statyczne DHCP -Host Names => Lista Hostów - - -Up => W górę -Down => W dół -Edit => Edytuj -Delete => Kasuj -Save => Zapisz -Cancel => Anuluj - -Forward => Przekieruj -Accept => Akceptuj -Drop => Odrzuć - -Firewall => Firewall -Firewall Rules => Reguły Firewalla -Firewall Configuration => Konfiguracja Firewalla - -New Rule => Nowa reguła -Match => Dotyczy -Target => Cel -Port => Port - -Protocol => Protokół -Source IP => IP żródłowe -Destination IP => IP docelowe -Source Ports => Port żródłowy -Destination Ports => Port docelowy - -Forward to => Przekieruj do -Port => Port - -Helptext ESSID => Nazwa sieci radiowej -Helptext DNS save => Musisz zapisać ustawienia przed dodaniem/usunięciem serwera DNS - -Helptext Operation mode => Umożliwia wybór pracy urządzenia. -Helptext Encryption Type => 'WPA (RADIUS)' działa tylko w trybie Access Point
      'WPA (PSK)' nie działa w trybie Ad-Hoc. -Helptext IP Settings => Ustawienia numeru IP dla DHCP i PPTP jest niekonieczne. Jeżeli je ustawisz, będa używane jako domyślnje w przypadku , gdy serwer DHCP bedzie niedostępny. -Helptext Idle Time => Czas w sekundach bezruchu internetowego, po upływie których następuje rozłaczenie (tylko Połączenie na ządanie) -Helptext Redial Timeout => Liczba sekund, które trzeba odczekac po tym, jak nie otrzymales odpowiedzi od providera (przed ponowna proba podlaczenia) - -# untranslated: -Available packages => Available packages - diff --git a/package/webif/files/usr/lib/webif/lang/pt/common.txt b/package/webif/files/usr/lib/webif/lang/pt/common.txt deleted file mode 100644 index 2fb4693a0b..0000000000 --- a/package/webif/files/usr/lib/webif/lang/pt/common.txt +++ /dev/null @@ -1,454 +0,0 @@ -lang => Português - -# Common - -Settings saved => Alterações guardadas - -Settings not saved => Alterações não foram guardadas - -Save Changes => Guardar alterações - -Apply Changes => Aplicar alterações - -Clear Changes => Eliminar alterações - -Review Changes => Verificar alterações - -Host Name => Nome do sistema - -Uptime => Uptime - -Load => Carga do sistema - -Version => Versão - -Categories => Categorias - -Subcategories => Subcategorias - -more... => mais - -Add => Adicionar - -Remove => Eliminar - -Warning => Atenção - -Password_warning => Não foi estabelecida uma palavra-chave para o acesso ao router (acesso web e ssh). Por favor, estabeleça uma palavra-chave agora (o nome de utilizador será ‘root’) - - - -# Categories - -Info => Informação - -About => Acerca de - -Router Info => Informações do router - - - -Status => Estado - -Connections => Ligações - -DHCP => DHCP - -Wireless => Wi-Fi - - - -System => Sistema - -Password => Palavra-chave - -Settings => Configurações - -Installed Software => Software instalado - -Firmware Upgrade => Actualizar Firmware - - - -Network => Rede - -LAN => LAN - -WAN => Internet - -Wireless => Rede sem fios - -Advanced Wireless => Rede sem fios (avançado) - -Hosts => Configuração de sistemas (hosts) - - - - - -# 'About' page - -Copyright => Copyright - - - -GPL_Text => Este programa é livre e poderá ser distribuído e/ou
      modificado segundo os termos da licença GPL (General Public License)
      tal como publicada pela Free Software Foundation como está publicada por la Free Sofware Foundation; quer pela versão 2
      quer por qualquer versão posterior (à sua escolha). - -Contributions by => Contribuidores - -Layout based on => Layout baseado em - -by => por - - - - - -No config change. => Não existem alterações de configurações. - -Config discarded. => As alterações foram ignoradas. - -Config changes: => Configuração actual: - -Updating config... => Actualizando as alterações... - - - - - -# 'Router Info' page - -Firmware Version => Versão do firmware - -Kernel Version => Versão do Kernel - -Current Date/Time => Data/Hora - -MAC Address => Endereço MAC - - - - - -# 'Connections' page - -Connection Status => Estado das ligações - -Physical Connections => Ligações físicas - -Router Connections => Ligações do router - - - - - -# 'DHCP' page - -DHCP leases => Préstimos de DHCP - -IP Address => Endereço IP - -Name => Nome - -Expires in => Expira em - - - - - -# 'Wireless Status' page - -Wireless Status => Estado da rede sem fios - - - -# 'Password' page - -Password Change => Alteração da palavra-chave - -New Password => Nova palavra-chave - -Confirm Password => Confirme a palavra-chave - - - -# 'System Settings' page - -System Settings => Parâmetros do sistema - -Host Name => Nome do sistema - -Language => Idioma - - - -# 'Installed Software' page - -Installed Packages => Pacotes (packages) instalados - -Update package lists => Actualização da lista de pacotes - -Uninstall => Remover - -Install => Instalar - -Available packages => Pacotes disponíveis - - - - - -# 'Firmware Upgrade' page - -Firmware format => Formato do firmware - -Error => Erro - -done => terminado - -Invalid_formt => Formato de firmware inválido - -Erase_JFFS2 => Apagar partição JFFS2 - -Options => Opções - -Firmware_image => Ficheiro de firmware - -Upgrade => Actualizar - -Upgrading... => Actualizando... - - - -# 'LAN Settings' page - -LAN Settings => Configurações da LAN (rede local) - -LAN Configuration => Parâmetros LAN - -Netmask => Máscara da sub rede (netmask) - -Default Gateway => Gateway - -DNS Servers => Servidor DNS - -DNS Address => Endereço IP do DNS - - - -Note => Nota - - - -# 'WAN Settings' page - -WAN Settings => Configurações Internet - -WAN Configuration => Parâmetros de Internet - -PPTP Server IP => Endereço IP do servidor PPTP - -Connection Type => Tipo de ligação - -No WAN => Sem ligação à Internet - -DHCP => DHCP - -Static IP => IP estático - -IP Settings => Configurações IP - -PPP Settings => Configurações PPP - -Redial Policy => Opções de restabelecimento da ligação - -Connect on Demand => Ligar quando necessário - -Keep Alive => Manter ligação sempre activa - -Maximum Idle Time => Tempo máximo de inactividade - -Redial Timeout => Tempo de restabelecimento da ligação - -MTU => MTU (tamanho dos pacotes) - -Username => Nome do utilizador - - - - - -# 'Wireless Configuration' page - -Wireless Configuration => Configurações rede sem fios - -Wireless Interface => Interface rede sem fios - -WEP Key => Chave WEP - -Selected WEP Key => Palavra-chave WEP seleccionada - -WPA PSK => WPA-PSK - -ESSID => ESSID - -Channel => Canal - -RADIUS IP Address => Endereço IP do servidor RADIUS - -RADIUS Server Key => Palavra-chave RADIUS - -Enabled => Activo - -Disabled => Inactivo - -ESSID Broadcast => Difusão do SSID - -Show => Mostrar - -Hide => Ocultar - -WLAN Mode => Modo rede sem fios - -Access Point => Ponto de acesso - -Client => Cliente - -Bridge => Ponte (Bridge) - -Ad-Hoc => Ad-Hoc - -Operation mode => Modo de funcionamento - -Encryption Settings => Parâmetros de encriptação - -Encryption Type => Tipo de encriptação - -PSK => PSK - -WPA Mode => Modo WPA - -WPA Algorithms => Algoritmos WPA - -WEP Keys => Palavra-chave WEP - - - -# 'Advanced Wireless Configuration' page - -Advanced Wireless Configuration => Configurações rede sem fios (avançadas) - -WDS Connections => Ligações WDS - -MAC Filter List => Filtrar por endereço MAC - -Filter Mode => Tipo de filtro - -Allow => Autorizar - -Deny => Negar - -Set => Estabelecer - -Settings => Parâmetros - -Automatic WDS => WDS automático - - - -# "Hosts" page - - - -MAC Address => Endereço MAC - -Configured Hosts => Sistemas configurados - -DHCP Static => DHCP estático - -Host Names => Nome dos sistemas - - - -Up => Subir - -Down => Baixar - -Edit => Editar - -Delete => eliminar - -Save => Guardar - -Cancel => Cancelar - - - -Forward => Redireccionar - -Accept => Aceitar - -Drop => Descartar - - - -Firewall => Firewall - -Firewall Rules => Regras da Firewall - -Firewall Configuration => Configurações da Firewall - - - -New Rule => Nova regra - -Match => Filtrar - -Target => Destino - -Port => Porta - - - -Protocol => Protocolo - -Source IP => IP de origem - -Destination IP => IP de destino - -Source Ports => Portas de origem - -Destination Ports => Portas de destino - - - -Forward to => Redireccionar para - -Port => Porta - - - -Helptext ESSID => SSID - -Helptext DNS save => É recomendável guardar as alterações antes de adicionar ou eliminar servidores DNS - - - -Helptext Operation mode => Estabelece o modo de operação da rede sem fios. Escolhendo ‘Client (bridge)’ não altera a configuração da interface de rede. Irá simplesmente configurar alguns parâmetros da rede sem fios para operar em modo ponte (bridge). - - - -Helptext Encryption Type => 'WPA (RADIUS)' só pode ser usado em modo ‘Ponto de acesso’.
      'WPA (PSK)' não funciona em modo Ad-Hoc. - - - -Helptext IP Settings => As opções IP são opcionais para os modos DHCP e PPTP. Apenas serão usadas caso alguma das configurações automática falhe - -. - -Helptext Idle Time => Número de segundos sem actividade na Internet que o router deve esperar antes de se desligar da Internet. - -(Apenas para o modo ‘Ligar quando necessário’ (connect on demand)) - - -Helptext Redial Timeout => Número de segundo sem receber resposta que o router deve esperar para voltar a estabelecer ligação à Internet. \ No newline at end of file diff --git a/package/webif/files/usr/lib/webif/lang/ru/common.txt b/package/webif/files/usr/lib/webif/lang/ru/common.txt deleted file mode 100644 index 1d490bdfbf..0000000000 --- a/package/webif/files/usr/lib/webif/lang/ru/common.txt +++ /dev/null @@ -1,223 +0,0 @@ -lang => Русский -# Common -Settings saved => Настройки сохранены -Settings not saved => Настройки не сохранены -Save Changes => Сохранить настройки -Apply Changes => Применить изменения -Clear Changes => Отменить изменения -Review Changes => Пересмотреть изменения -Host Name => Имя узла -Uptime => Время работы -Load => Загрузка -Version => Версия -Categories => Категории -Subcategories => Подкатегории -more... => далее... -Add => Добавить -Remove => Удалить -Warning => Предупреждение -Password_warning => Пароль для веб-интерфейса и доступа по SSH не задан
      Введите новый пароль (имя пользователя в web-интерфейсе: 'root'). - -# Categories -Info => Информация -About => О системе -Router Info => Маршрутизатор - -Status => Статус -Connections => Соединения -DHCP => DHCP -Wireless => Беспроводная сеть - -System => Система -Password => Пароль -Settings => Настройки -Installed Software => Установленные пакеты -Firmware Upgrade => Обновление прошивки - -Network => Сеть -LAN => Локальная -WAN => Внешняя -Wireless => Беспроводная -Advanced Wireless => Беспроводная (подробнее) -Hosts => Узлы - - -# 'About' page -Copyright => Copyright - -GPL_Text => Это свободное программное обеспечение. Оно распространяется и модифицируется в соответствии с лицензией GNU General Public License,
      опубликованной Free Software Foundation; версии 2 или по усмотрению пользователя любой более поздней версии. -Contributions by => Помощники -Layout based on => Дизайнер -by => от - - -No config change. => Конфигурация не изменялась. -Config discarded. => Конфигурация отклонена. -Config changes: => Изменение конфигурации: -Updating config... => Обновление конфигурации... - - -# 'Router Info' page -Firmware Version => Версия прошивки -Kernel Version => Версия ядра -Current Date/Time => Время и дата -MAC Address => MAC-адрес - -# 'Connections' page -Connection Status => Соединение -Physical Connections => Аппаратные соединения -Router Connections => Программные соединения маршрутизатора - - -# 'DHCP' page -DHCP leases => DHCP клиенты -IP Address => IP адрес -Name => Имя -Expires in => Истекает - - -# 'Wireless Status' page -Wireless Status => Беспроводная сеть - -# 'Password' page -Password Change => Изменить пароль -New Password => Новый пароль -Confirm Password => Подтверждение пароля - -# 'System Settings' page -System Settings => Настройки системы -Host Name => Имя узла -Language => Язык - -# 'Installed Software' page -Installed Packages => Установленные пакеты -Update package lists => Обновить список пакетов -Available packages => Доступные пакеты -Uninstall => Удалить -Install => Установить - - -# 'Firmware Upgrade' page -Firmware format => Формат прошивки -Error => Ошибка -done => готово -Invalid_format => Неизвестный формат прошивки -Erase_JFFS2 => Очистить раздел jffs2 -Options => Параметры -Firmware_image => Образ прошивки: -Upgrade => Обновить -Upgrading... => Обновление... - -# 'LAN Settings' page -LAN Settings => Настройки сети -LAN Configuration => Конфигурация сети -Netmask => Маска подсети -Default Gateway => Шлюз по умолчанию -DNS Servers => сервера DNS -DNS Address => адрес DNS - -Note => Заметка - - -# 'WAN Settings' page -WAN Settings => Настройки внешней сети -WAN Configuration => Конфигурация внешней сети -PPTP Server IP => адрес IP сервера PPTP -Connection Type => Тип соединения -No WAN => Нет внешней сети -DHCP => DHCP -Static IP => Статический IP -IP Settings => Настройки IP -PPP Settings => Настройки PPP -Redial Policy => Разрыв соединения -Connect on Demand => Соединяться по требованию -Keep Alive => Поддерживать связь -Maximum Idle Time => Наибольшее время простоя -Redial Timeout => Задержка перед повторным соединением -MTU => MTU -Username => Имя пользователя - - -# 'Wireless Configuration' page -Wireless Configuration => Конфигурация беспроводной сети -Wireless Interface => Беспроводной интерфейс -WEP Key => Ключ WEP -Selected WEP Key => Выбранный ключ WEP -WPA PSK => WPA разделяемый ключ -ESSID => ESSID -Channel => Канал -RADIUS IP Address => Адрес IP сервера RADIUS -RADIUS Server Key => Ключ сервера RADIUS -Enabled => Включён -Disabled => Выключен -ESSID Broadcast => Вещание ESSID -Show => Показать -Hide => Спрятать -WLAN Mode => Режим беспроводной сети -Access Point => Точка доступа -Client => Клиент -Bridge => Мост -Ad-Hoc => По запросу -Encryption Settings => Настройки безопасности -Encryption Type => Тип шифрования -PSK => Пароль -WPA Mode => Режим WPA -WPA Algorithms => Алгоритм WPA -WEP Keys => WEP ключи - - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => Расширенная конфигурация беспроводной сети -WDS Connections => Соединение WDS -MAC Filter List => Фильтр MAC-адресов -Filter Mode => режим фильтра -Allow => Пропустить -Deny => Отклонить -Set => Установить -Settings => Настройки -Automatic WDS => Автоматический WDS - -# "Hosts" page - -MAC Address => MAC-адрес -Configured Hosts => Настроенные узлы -DHCP Static => Статический DHCP -Host Names => Имена узлов - - -Up => Вверх -Down => Вниз -Edit => Правка -Delete => Удалить -Save => Сохранить -Cancel => Отменить - -Forward => Перенаправить -Accept => Принять -Drop => Отклонить - -Firewall => Сетевой экран -Firewall Rules => Правила сетевого экрана -Firewall Configuration => Настройки сетевого экрана - -New Rule => Новое правило -Match => Фильтр -Target => Цель -Port => Порт - -Protocol => Протокол -Source IP => IP отправителя -Destination IP => IP получателя -Source Ports => Порты отправителя -Destination Ports => Порты получателя - -Forward to => Перенаправить на -Port => Порт - -Helptext ESSID => Имя беспроводной сети -Helptext DNS save => Нужно сохранить настройки на этой странице перед правкой DNS серверов. -Helptext Operation mode => Эта настройка задаёт режим работы беспроводной сети. Выбор 'Клиент или Мост' неповлияет на настройки сетевого интерфейса. Будут обновлены только некоторые параметры драйвера беспроводной сети, который позволят маршрутизацию пакетов с этого интерфейса. -Helptext Encryption Type => 'WPA (RADIUS)' поддерживается только в режиме точки доступа
      'WPA (PSK)' не работает в режиме по запросу. -Helptext IP Settings => Настройки IP могут не задаваться в режимах DHCP и PPTP. Если DHCP сервер будет недоступен, будут использоваться заданные настройки. -Helptext Idle Time => Промежуток времени в секундах по истечению которого соединение будет разорвано, если данные не передовались по внешнему интерфейсу (используется только в режиме соединения по запросу). -Helptext Redial Timeout => Задержка в секундах перед попыткой установки повторного соединения с провайдером. diff --git a/package/webif/files/usr/lib/webif/lang/se/common.txt b/package/webif/files/usr/lib/webif/lang/se/common.txt deleted file mode 100644 index 1c019f501d..0000000000 --- a/package/webif/files/usr/lib/webif/lang/se/common.txt +++ /dev/null @@ -1,223 +0,0 @@ -lang => Svenska -# Common -Settings saved => Inställningar sparade -Settings not saved => Inställningar inte sparade -Save Changes => Spara förändringar -Apply Changes => Applicera förändringar -Clear Changes => Ta bort förändringar -Review Changes => Se gjorda förändringar -Host Name => Värdnamn -Uptime => Tid uppe -Load => Ladda -Version => Version -Categories => Kategorier -Subcategories => Underkategorier -more... => mer... -Add => Lägg till -Remove => Ta bort -Warning => Varning -Password_warning => Du har inte satt något lösenord för Web-gränssnittet och SSH accessen
      Var vänlig och gör detta nu (användarnamnet i din browser kommer vara 'root'). -# Categories -Info => Info -About => Om -Router Info => Router Info - -Status => Status -Connections => Anslutningar -DHCP => DHCP -Wireless => Trådlös - -System => System -Password => Lösenord -Settings => Inställningar -Installed Software => Installerad mjukvara -Firmware Upgrade => Firmware uppgradering - -Network => Nätverk -LAN => LAN -WAN => WAN -Wireless => Trådlös -Advanced Wireless => Avancerad Trådlös -Hosts => Konfigurerade Värdar - - -# 'About' page -Copyright => Copyright - -GPL_Text => Detta program är öppen programvara; du kan återdistribuera den och/eller
      modifiera den under villkoren av bestämmelserna i GNU General Public License
      publicerad av Free Software Foundation; antingen version 2
      av licensen eller senare.
      -Contributions by => Bidrag av -Layout based on => Layout baserad på -by => av - - -No config change. => Inga ändringar i inställningarna gjordes. -Config discarded. => Dina ändringar i inställningarna har avbrutits. -Config changes: => Nuvarande ändringar i inställningarna: -Updating config... => Uppdaterar dina inställningar... - -# 'Router Info' page -Firmware Version => Firmware Version -Kernel Version => Kernel Version -Current Date/Time => Nuvarande Datum/Tid -MAC Address => Mac Adress - - -# 'Connections' page -Connection Status => Anslutningsstatus -Physical Connections => Fysiska anslutningar -Router Connections => Router anslutningar - - -# 'DHCP' page -DHCP leases => DHCP leases -IP Address => IP Adress -Name => Namn -Expires in => Utgår om - - -# 'Wireless Status' page -Wireless Status => Trådlös Status - -# 'Password' page -Password Change => Byt lösenord -New Password => Nytt lösenord -Confirm Password => Bekräfta nytt lösenord - -# 'System Settings' page -System Settings => System Inställningar -Host Name => Värdnamn -Language => Språk - -# 'Installed Software' page -Installed Packages => Installerade mjukvaror -Update package lists => Uppdatera mjukvarulista -Uninstall => Avinstallera -Install => Installera - - -# 'Firmware Upgrade' page -Firmware format => Firmware format -Error => Fel -done => utförd -Invalid_formt => Felaktigt Firmware Format -Erase_JFFS2 => Ta bort JFFS2 partition -Options => Möjligheter -Firmware_image => Firmware att ladda upp -Upgrade => Uppgradering -Upgrading... => Uppgradering... - -# 'LAN Settings' page -LAN Settings => LAN Inställningar -LAN Configuration => LAN Inställningar -Netmask => Netmask -Default Gateway => Default Gateway -DNS Servers => DNS Servrar -DNS Address => DNS Adress - -Note => Noteringar - -# 'WAN Settings' page -WAN Settings => WAN Inställningar -WAN Configuration => WAN Inställningar -PPTP Server IP => PPTP Server IP -Connection Type => Anslutningstyp -No WAN => Ingen -DHCP => DHCP -Static IP => Statisk IP -IP Settings => IP Inställningar -PPP Settings => PPP Inställningar -Redial Policy => Återuppringsnings Policy -Connect on Demand => Anslut på begäran -Keep Alive => Håll levande -Maximum Idle Time => Maximum tid i vila -Redial Timeout => Timeout för återuppringning -MTU => MTU -Username => Användarnamn - -# 'Wireless Configuration' page -Wireless Configuration => Trådlösa Inställningar -Wireless Interface => Trådlöst Gränssnitt -WEP Key => WEP Nyckel -Selected WEP Key => Vald WEP Nyckel -WPA PSK => WPA PSK -ESSID => ESSID -Channel => Kanal -RADIUS IP Address => RADIUS IP Adress -RADIUS Server Key => RADIUS Server Nyckel -Enabled => Påsatt -Disabled => Avstängd -ESSID Broadcast => ESSID Broadcast -Show => Visa -Hide => Göm -WLAN Mode => WLAN Läge -Access Point => Accesspunkt -Client => Klient -Bridge => Brygga -Ad-Hoc => Ad-Hoc -Operation mode => Tillståndsläge -Encryption Settings => Krypteringsinställningar -Encryption Type => Krypteringstyp -PSK => PSK -WPA Mode => WPA Läge -WPA Algorithms => WPA Algoritmer -WEP Keys => WEP Nyckel - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => Avancerad Trådlös Inställning -WDS Connections => WDS Anslutningar -MAC Filter List => MAC Filter Lista -Filter Mode => Filterläge -Allow => Tillåt -Deny => Neka -Set => Sätt -Settings => Settings -Automatic WDS => Automatisk WDS - -# "Hosts" page - -MAC Address => MAC Adress -Configured Hosts => Konfigurerade Värdar -DHCP Static => Statisk DHCP -Host Names => Värdnamn - -Up => Upp -Down => Ned -Edit => Editera -Delete => Ta bort -Save => Spara -Cancel => Avbryt - -Forward => Framåt -Accept => Acceptera -Drop => Tappa - -Firewall => Brandvägg -Firewall Rules => Brandväggsregler -Firewall Configuration => Brandväggsinställningar - -New Rule => Ny Regel -Match => Match -Target => Mål -Port => Port - -Protocol => Protokoll -Source IP => Käll IP -Destination IP => Destinations IP -Source Ports => Källport -Destination Ports => Destinationsport - -Forward to => Skicka till -Port => Port - -Helptext ESSID => Namn på ditt trådlösa Nätverk -Helptext DNS save => Du bör spara dina inställningar på denna sida före du lägger till/tar bort DNS servrar - -Helptext Operation mode => Detta sätter lägesinställningen för ditt trådlösa nätverk. Att välja 'Klient (Brygga)' kommer inte ändra ditt nätverks gränssnittsinställningar. Det kommer endast att sätta några parametrar i drivrutinerna som tillåter en begränsad bryggning av gränssnittet. -Helptext Encryption Type => 'WPA (RADIUS)' stödjs endast i Accesspunktsläge.
      'WPA (PSK)' fungerar inte i Ad-Hoc läge. -Helptext IP Settings => IP inställningar är inte obligatoriska för DHCP och PPTP. Om du sätter dem så används de som standard om DHCP-servern inte är tillgänlig. -Helptext Idle Time => Antalet sekunder utan internet trafik som routern skall vänta på innan den frånkopplar sig från Internet. (Anslut endast på begäran) -Helptext Redial Timeout => Antalet sekunder att vänta i innan försök till ny uppkoppling görs. (om ingen kontakt kunnat upprättas med tillhandahållaren) - -# untranslated: -Available packages => Available packages - diff --git a/package/webif/files/usr/lib/webif/languages.awk b/package/webif/files/usr/lib/webif/languages.awk deleted file mode 100644 index f0111dd26f..0000000000 --- a/package/webif/files/usr/lib/webif/languages.awk +++ /dev/null @@ -1,12 +0,0 @@ -BEGIN { - print "option|en|English" -} - -/webif\/lang\/[a-zA-Z][a-zA-Z]*/ { - gsub(/^.*webif\/lang\//, "") - shortname = $0 - gsub(/\/.*$/, "", shortname) - gsub(/^.*=>[ \t]*/, "") - longname = $0 - print "option|" shortname "|" longname -} diff --git a/package/webif/files/usr/lib/webif/subcategories.awk b/package/webif/files/usr/lib/webif/subcategories.awk deleted file mode 100644 index 8891ce44db..0000000000 --- a/package/webif/files/usr/lib/webif/subcategories.awk +++ /dev/null @@ -1,12 +0,0 @@ -BEGIN { - FS=":" - print "

      @TR<>:

      " -} - diff --git a/package/webif/files/usr/lib/webif/validate.awk b/package/webif/files/usr/lib/webif/validate.awk deleted file mode 100644 index 60b5915e24..0000000000 --- a/package/webif/files/usr/lib/webif/validate.awk +++ /dev/null @@ -1,151 +0,0 @@ -# $1 = type -# $2 = variable name -# $3 = field name -# $4 = options -# $5 = value -BEGIN { - FS="|" - output="" -} - -{ - valid_type = 0 - valid = 1 - # XXX: weird hack, but it works... - n = split($0, param, "|") - value = param[5] - for (i = 6; i <= n; i++) value = value FS param[i] - verr = "" -} - -$1 == "int" { - valid_type = 1 - if (value !~ /^[0-9]*$/) { valid = 0; verr = "@TR<>" } -} - -# FIXME: add proper netmask validation -($1 == "ip") || ($1 == "netmask") { - valid_type = 1 - if ((value != "") && (value !~ /^[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$/)) valid = 0 - else { - split(value, ipaddr, "\\.") - for (i = 1; i <= 4; i++) { - if ((ipaddr[i] < 0) || (ipaddr[i] > 255)) valid = 0 - } - } - if (valid == 0) verr = "@TR<>" -} - -$1 == "wep" { - valid_type = 1 - if (value !~ /^[0-9A-Fa-f]*$/) { - valid = 0 - verr = "@TR<>" - } else if ((length(value) != 0) && (length(value) != 10) && (length(value) != 26)) { - valid = 0 - verr = "Invalid key length" - } else if (value ~ /0$/) { - valid = 0 - verr = "Key must not end with '0'" - } -} - -$1 == "hostname" { - valid_type = 1 - if (value !~ /^[0-9a-zA-z\.\-]*$/) { - valid = 0 - verr = "@TR<>" - } -} - -$1 == "string" { - valid_type = 1 -} - -$1 == "mac" { - valid_type = 1 - if ((value != "") && (value !~ /^[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]$/)) { - valid = 0 - verr = "@TR<>" - } -} - -$1 == "port" { - valid_type = 1 - if (value !~ /^[0-9]*$/) { - valid = 0 - verr = "@TR<>" - } -} - -$1 == "ports" { - valid_type = 1 - n = split(value ",", ports, ",") - for (i = 1; i <= n; i++) { - if ((ports[i] !~ /^[0-9]*$/) && (ports[i] !~ /^[0-9][0-9]*-[0-9][0-9]*$/)) { - valid = 0 - verr = "@TR<>" - } - } -} - -$1 == "wpapsk" { - valid_type = 1 - if (length(value) > 64) { - valid = 0 - verr = "String too long" - } - if ((length(value) != 0) && (length(value) < 8)) { - valid = 0 - verr = "String too short" - } - if ((length(value) == 64) && (value ~ /[^0-9a-fA-F]/)) { - valid = 0 - verr = "Invalid hex key" - } -} - -valid_type != 1 { valid = 0 } - -valid == 1 { - n = split($4, options, " ") - for (i = 1; (valid == 1) && (i <= n); i++) { - if (options[i] == "required") { - if (value == "") { valid = 0; verr = "No value entered" } - } else if ((options[i] ~ /^min=/) && (value != "")) { - min = options[i] - sub(/^min=/, "", min) - min = int(min) - if ($1 == "int") { - if (value < min) { valid = 0; verr = "Value too small (minimum: " min ")" } - } else if ($1 == "string") { - if (length(value) < min) { valid = 0; verr = "Value too small (minimum length: " min ")"} - } - } else if ((options[i] ~ /^max=/) && (value != "")) { - max = options[i] - sub(/^max=/, "", max) - max = int(max) - if ($1 == "int") { - if (value > max) { valid = 0; verr = "@TR<> (@TR<>: " max ")" } - } else if ($1 == "string") { - if (length(value) > max) { valid = 0; verr = "@TR<> (@TR<>: " max ")" } - } - } else if ((options[i] == "nodots") && ($1 == "hostname")) { - if (value ~ /\./) { - valid = 0 - verr = "@TR<>" - } - } - } -} - -valid_type == 1 { - if (valid == 1) output = output $2 "=\"" value "\";\n" - else error = error "Error in " $3 ": " verr "
      " -} - -END { - print output "ERROR=\"" error "\";\n" - if (error == "") print "return 0" - else print "return 255" -} diff --git a/package/webif/files/usr/lib/webif/webif.sh b/package/webif/files/usr/lib/webif/webif.sh deleted file mode 100755 index e6147fd6dd..0000000000 --- a/package/webif/files/usr/lib/webif/webif.sh +++ /dev/null @@ -1,286 +0,0 @@ -libdir=/usr/lib/webif -wwwdir=/www -cgidir=/www/cgi-bin/webif -rootdir=/cgi-bin/webif -indexpage=index.sh - -# workarounds for stupid busybox slowness on [ ] -empty() { - case "$1" in - "") return 0 ;; - *) return 255 ;; - esac -} -equal() { - case "$1" in - "$2") return 0 ;; - *) return 255 ;; - esac -} -neq() { - case "$1" in - "$2") return 255 ;; - *) return 0 ;; - esac -} -# very crazy, but also very fast :-) -exists() { - ( < $1 ) 2>&- -} - -categories() { - grep '##WEBIF:' $cgidir/.categories $cgidir/*.sh 2>/dev/null | \ - awk -v "selected=$1" \ - -v "rootdir=$rootdir" \ - -v "indexpage=$indexpage" \ - -f /usr/lib/webif/categories.awk - -} - -subcategories() { - grep -H "##WEBIF:name:$1:" $cgidir/*.sh 2>/dev/null | \ - sed -e 's,^.*/\([a-zA-Z0-9_\.\-]*\):\(.*\)$,\2:\1,' | \ - sort -n | \ - awk -v "selected=$2" \ - -v "rootdir=$rootdir" \ - -f /usr/lib/webif/subcategories.awk - -} - -update_changes() { - CHANGES=$(($( (cat /tmp/.webif/config-* ; ls /tmp/.webif/file-*) 2>&- | wc -l))) -} - -header() { - empty "$ERROR" && { - _saved_title="${SAVED:+: @TR<>}" - } || { - FORM_submit=""; - ERROR="

      $ERROR



      " - _saved_title=": @TR<>" - } - - _category="$1" - _uptime="$(uptime)" - _loadavg="${_uptime#*load average: }" - _uptime="${_uptime#*up }" - _uptime="${_uptime%%,*}" - _hostname=$(cat /proc/sys/kernel/hostname) - _version=$( grep "(" /etc/banner ) - _version="${_version%% ---*}" - _head="${3:+

      $3$_saved_title

      }" - _form="${5:+
      }" - _savebutton="${5:+

      >\" />

      }" - _categories=$(categories $1) - _subcategories=${2:+$(subcategories "$1" "$2")} - - empty "$REMOTE_USER" && neq "${SCRIPT_NAME#/cgi-bin/}" "webif.sh" && grep 'root:!' /etc/passwd >&- 2>&- && { - _nopasswd=1 - _form="" - _savebutton="" - } - - update_changes - cat < - - - - @TR<<Web Status Console>> - - - - -
      - - $_form -
      -
      - $_head - $ERROR -EOF - empty "$REMOTE_USER" && neq "${SCRIPT_NAME#/cgi-bin/}" "webif.sh" && { - empty "$FORM_passwd1" || { - echo '
      '
      -			(
      -				echo "$FORM_passwd1"
      -				sleep 1
      -				echo "$FORM_passwd2"
      -			) | passwd root 2>&1 && apply_passwd
      -			echo '
      ' - footer - exit - } - - equal "$_nopasswd" 1 && { - cat < -
      -
      -

      @TR<>: @TR<Please enter one now (the user name in your browser will be 'root').>>

      -
      -
      -EOF - empty "$NOINPUT" && cat < - - - - - - - - - - - - -
      @TR<>:
      @TR<>:  
      -
      - -EOF - footer - exit - } || { - apply_passwd - } - } -} - -footer() { - _changes=${CHANGES#0} - _changes=${_changes:+(${_changes})} - _endform=${_savebutton:+} - cat < -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      - $_endform -
      - -EOF -} - -apply_passwd() { - case ${SERVER_SOFTWARE%% *} in - mini_httpd/*) - grep '^root:' /etc/passwd | cut -d: -f1,2 > $cgidir/.htpasswd - killall -HUP mini_httpd - ;; - esac -} - -display_form() { - if empty "$1"; then - awk -F'|' -f /usr/lib/webif/common.awk -f /usr/lib/webif/form.awk - else - echo "$1" | awk -F'|' -f /usr/lib/webif/common.awk -f /usr/lib/webif/form.awk - fi -} - -list_remove() { - echo "$1 " | awk ' -BEGIN { - RS=" " - FS=":" -} -($0 !~ /^'"$2"'/) && ($0 != "") { - printf " " $0 - first = 0 -}' -} - -handle_list() { - # $1 - remove - # $2 - add - # $3 - submit - # $4 - validate - - empty "$1" || { - LISTVAL="$(list_remove "$LISTVAL" "$1") " - LISTVAL="${LISTVAL# }" - LISTVAL="${LISTVAL%% }" - _changed=1 - } - - empty "$3" || { - validate "${4:-none}|$2" && { - if empty "$LISTVAL"; then - LISTVAL="$2" - else - LISTVAL="$LISTVAL $2" - fi - _changed=1 - } - } - - LISTVAL="${LISTVAL# }" - LISTVAL="${LISTVAL%% }" - LISTVAL="${LISTVAL:- }" - - if empty "$_changed"; then - return 255 - else - return 0 - fi -} - -load_settings() { - equal "$1" "nvram" || { - exists /etc/config/$1 && . /etc/config/$1 - } - exists /tmp/.webif/config-$1 && . /tmp/.webif/config-$1 -} - -validate() { - if empty "$1"; then - eval "$(awk -f /usr/lib/webif/validate.awk)" - else - eval "$(echo "$1" | awk -f /usr/lib/webif/validate.awk)" - fi -} - - -save_setting() { - exists /tmp/.webif/* || mkdir -p /tmp/.webif - oldval=$(eval "echo \${$2}") - oldval=${oldval:-$(nvram get "$2")} - grep "^$2=" /tmp/.webif/config-$1 >&- 2>&- && { - grep -v "^$2=" /tmp/.webif/config-$1 > /tmp/.webif/config-$1-new 2>&- - mv /tmp/.webif/config-$1-new /tmp/.webif/config-$1 2>&- >&- - oldval="" - } - equal "$oldval" "$3" || echo "$2=\"$3\"" >> /tmp/.webif/config-$1 -} - - -is_bcm947xx() { - read _systype < /proc/cpuinfo - equal "${_systype##* }" "BCM947XX" -} - diff --git a/package/webif/files/www/cgi-bin/webif.sh b/package/webif/files/www/cgi-bin/webif.sh deleted file mode 100755 index 63ed48f5cb..0000000000 --- a/package/webif/files/www/cgi-bin/webif.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./webif/info.sh diff --git a/package/webif/files/www/cgi-bin/webif/.categories b/package/webif/files/www/cgi-bin/webif/.categories deleted file mode 100644 index 331d4dfd1c..0000000000 --- a/package/webif/files/www/cgi-bin/webif/.categories +++ /dev/null @@ -1,2 +0,0 @@ -##WEBIF:category:Info -##WEBIF:category:Status diff --git a/package/webif/files/www/cgi-bin/webif/about.sh b/package/webif/files/www/cgi-bin/webif/about.sh deleted file mode 100755 index a0049c2267..0000000000 --- a/package/webif/files/www/cgi-bin/webif/about.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/webif-page ->..." -?> - -

      webif - @TR<>

      -
      -@TR<modify it under the terms of the GNU General Public License
      as published by the Free Software Foundation; either version 2
      of the License, or (at your option) any later version.
      >> -
      -@TR<> © 2005-2006 OpenWrt.org
      -
      -@TR<>: - - - - - diff --git a/package/webif/files/www/cgi-bin/webif/config.sh b/package/webif/files/www/cgi-bin/webif/config.sh deleted file mode 100755 index 0259537aa4..0000000000 --- a/package/webif/files/www/cgi-bin/webif/config.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/webif-page ->";; - clear) - rm -rf /tmp/.webif >&- 2>&- - header $FORM_cat . "@TR<>" - CHANGES="" - echo "${FORM_prev:+}" - ;; - review) - header $FORM_cat . "@TR<>" - cd /tmp/.webif - for configname in config-*; do - grep = $configname >&- 2>&- && { - echo -n "

      ${configname#config-}


      "
      -				cat $configname
      -				echo '

      ' - } - done - CONFIGFILES="" - for configname in file-*; do - exists "$configname" && CONFIGFILES="$CONFIGFILES ${configname#file-}" - done - CONFIGFILES="${CONFIGFILES:+

      Config files:

      $CONFIGFILES
      }" - echo $CONFIGFILES - ;; - save) - header $FORM_cat . "@TR<>" - CHANGES="" - echo "
      "
      -		sh /usr/lib/webif/apply.sh 2>&1
      -		echo "
      ${FORM_prev:+}" - ;; -esac - -footer - -?> diff --git a/package/webif/files/www/cgi-bin/webif/index.sh b/package/webif/files/www/cgi-bin/webif/index.sh deleted file mode 100755 index 466b34d208..0000000000 --- a/package/webif/files/www/cgi-bin/webif/index.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/webif-page - diff --git a/package/webif/files/www/cgi-bin/webif/info.sh b/package/webif/files/www/cgi-bin/webif/info.sh deleted file mode 100755 index cc7639702c..0000000000 --- a/package/webif/files/www/cgi-bin/webif/info.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/webif-page ->" - -?> -
      
      -
      -
      - - - - - - - - - - - - - - - - - - - -
      @TR<>$_version
      @TR<>$_kversion
      @TR<>$_date
      @TR<>$_mac
      -EOF - -footer -?> - diff --git a/package/webif/files/www/cgi-bin/webif/ipkg.sh b/package/webif/files/www/cgi-bin/webif/ipkg.sh deleted file mode 100755 index 62c0fae90b..0000000000 --- a/package/webif/files/www/cgi-bin/webif/ipkg.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./system-ipkg.sh diff --git a/package/webif/files/www/cgi-bin/webif/status-connection.sh b/package/webif/files/www/cgi-bin/webif/status-connection.sh deleted file mode 100755 index fbf329b1b3..0000000000 --- a/package/webif/files/www/cgi-bin/webif/status-connection.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/webif-page ->" -?> - - - - - - - - - - - - - - - - - - -
      @TR<>


      @TR<>
      &- | awk '$0 ~ /^Active UNIX/ {ignore = 1}; ignore != 1 { print $0 }' ?>
      - - - diff --git a/package/webif/files/www/cgi-bin/webif/status-dhcp.sh b/package/webif/files/www/cgi-bin/webif/status-dhcp.sh deleted file mode 100755 index 5517b781f4..0000000000 --- a/package/webif/files/www/cgi-bin/webif/status-dhcp.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/webif-page ->" -?> - - - - - - - - - 0 { - print "" - print "" - print "" - print "" - print "" - print "" -} -' /tmp/dhcp.leases ?> - -
      @TR<>@TR<>@TR<>@TR<>
      " $2 "" $3 "" $4 "" - t = $1 - date - h = int(t / 60 / 60) - if (h > 0) printf h "h " - m = int(t / 60 % 60) - if (m > 0) printf m "min " - s = int(t % 60) - printf s "sec " - printf "
      - - - diff --git a/package/webif/files/www/cgi-bin/webif/status-wireless.sh b/package/webif/files/www/cgi-bin/webif/status-wireless.sh deleted file mode 100755 index c7ad0a3068..0000000000 --- a/package/webif/files/www/cgi-bin/webif/status-wireless.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/webif-page ->" -?> - -
      &1 | grep -v 'no wireless' | grep '\w' ?>
      - - - diff --git a/package/webif/files/www/index.html b/package/webif/files/www/index.html deleted file mode 100644 index 72a918726e..0000000000 --- a/package/webif/files/www/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - Web Administrative Console - - -
      -

      Web Administrative Console
      Redirecting to : main page

      -
      - - diff --git a/package/webif/files/www/webif.css b/package/webif/files/www/webif.css deleted file mode 100644 index 86c5a62f90..0000000000 --- a/package/webif/files/www/webif.css +++ /dev/null @@ -1,296 +0,0 @@ -/* layout */ - -* { - margin: 0; - padding: 0; -} - -html, body { - width: inherit; - height: 100%; -} - -dd { - margin-left: 1em; - margin-bottom: 0.2em; -} - -ul { - display: inline; - list-style-type: none; -} - -ul.about { - list-style-type: disc; -} - -li.about { - margin-left: 2em; -} - -hr, -#submenu h3, -#short-status h3, -#content .settings-block .settings .settings-help h3 { - display: none; -} - -ul.about, -hr.separator { - display: block; -} - -option { - padding-right: 1em; -} - -#container { - position: relative; - min-height: 100%; -} - -#header { - position: relative; - width: 100%; -} - -#header-title { - padding-top: 2em; - padding-bottom: 0.2em; -} - -#openwrt-title { - position: relative; - float: left; - left: 1em; - top: 0.7em; -} - -#short-status { - position: relative; - right: 1em; - line-height: 1.2em; - padding-bottom: 0.2em; -} - -#mainmenu, -#submenu { - position: absolute; - width: 100%; - padding-top: 0.2em; - padding-bottom: 0.2em; -} - -#mainmenu -{ - top: 0; - left: 0; -} - -#mainmenu h3 { - padding-left: 1em; - float: left; -} - -#mainmenu li { - font-size: 0.9em; - float: left; - margin-left: 1.5em; -} - -#submenu li { - float: left; - margin-left: 1em; -} - - -#content { - padding-top: 2em; - margin-left: 1em; - padding-bottom: 6em; -} - -#content .settings-block { - margin-bottom: 1.5em; -} - -#content .settings-block .settings-block-title { - margin-bottom: 10px; -} - -#content .settings-block .settings { - clear: both; - margin-left: 1.5em; - padding-right: 1em; -} - -#content .settings-block .settings-block-title, -#content .settings-block .settings .settings-title { - padding: 0.2em; -} - -#content .settings-block .settings .settings-content { - padding-top: 1em; - margin-left: 1em; - float: left; - width: 58%; - padding-bottom: 0.5em; -} - -#content .settings-block .settings .settings-content select, -#content .settings-block .settings .settings-content input { - margin-top: 0.8em; -} - -#content .settings-block .settings .settings-help { - padding: 0.4em; - padding-top: 1.4em; - margin-left: 42%; -} - -#content .settings-block .settings .settings-help .more-help { - margin-right: 10%; - text-align: right; -} - -#save { - position: absolute; - bottom: 0; - width: 100%; -} - -#save .page-save div { - float: right; - width: 15em; - height: 1.5em; - padding-right: 1em; - padding-top: 0.5em; - padding-bottom: 0.4em; -} - -#save .apply { - clear: both; - width: 100%; - height: 5em; -} - -#save .apply div { - float: right; - width: 15em; - height: 4em; - padding-right: 1em; - padding-top: 0.5em; - padding-bottom: 0.5em; -} - -th { - text-align: left; -} - -#content .settings-block .settings .settings-help .more-help, -#save, -#short-status { - text-align: right; -} - -/* font */ -body { - font-family: Verdana, Helvetica, sans-serif; - font-size: 1.0em; -} - -dt, -.selected-maincat, -#mainmenu a:active, -#submenu a { - font-weight: bold; -} - - - -#openwrt-title h1 { - font-size: 2.8em; -} - - -#short-status ul { - font-size: 0.8em; -} - -#mainmenu h3, -#mainmenu li, -#short-status h3 { - font-size: 0.9em; -} - -#mainmenu a, -#submenu a, -#save a { - text-decoration: none; -} - -#save a:hover { - text-decoration: underline; -} - -#mainmenu h3 { - text-transform: uppercase; -} - -#save a { - font-weight: normal; - font-size: 1.1em; -} - - -/* color */ - -#header-title, -#submenu, -#submenu a, -#save a, -#save .page-save -{ - color: #fff; -} - -#header-title, -#save .apply div { - background-color: #3D5C7A; -} - -#mainmenu { - color: #C3C4D2; - background-color: #213242; -} - -#mainmenu a { - color: #C3C4D2; -} - -#mainmenu a:hover { - color: rgb(193,102,90); -} - -#submenu, -#save div { - background-color: #7590AE; -} - -#content .settings-block .settings-block-title h2 { - color: #7590AE; -} - -#submenu a:hover { - color: #FB0; -} - -#content .settings-block .settings .settings-title { - color: #000; - background-color: #CCC; -} - -#save .page-save { - background-color: #FFF; -} - diff --git a/package/webif/files/www/webif.js b/package/webif/files/www/webif.js deleted file mode 100644 index 64d26cd8b5..0000000000 --- a/package/webif/files/www/webif.js +++ /dev/null @@ -1,33 +0,0 @@ -function value(name) -{ - var item = document.getElementById(name); - return (item ? item.value : ""); -} -function isset(name, val) -{ - return (value(name) == val); -} -function checked(name) -{ - var item = document.getElementById(name); - return ((item) && item.checked); -} -function hide(name) -{ - var item = document.getElementById(name); - if (item) - item.style.display = 'none'; -} -function show(name) -{ - var item = document.getElementById(name); - if (item) - item.style.display = ''; -} -function set_visible(name, value) -{ - if (value) - show(name) - else - hide(name) -} diff --git a/package/webif/src/bstrip.c b/package/webif/src/bstrip.c deleted file mode 100644 index 1e17d4e00a..0000000000 --- a/package/webif/src/bstrip.c +++ /dev/null @@ -1,75 +0,0 @@ -#include -#include -#include - -#define BUF_SIZE 1024 -#define READ_LEN 14 - -static int read_len = READ_LEN; -static char rbuf[32]; -static char rbuflen = 0; - -int do_gets(char *buf) -{ - int r = 0, c = 0; - char *m; - - if (rbuflen > 0) - memcpy(buf, rbuf, rbuflen); - c += rbuflen; - - while ((c + read_len < BUF_SIZE) && ((r = read(0, &buf[c], read_len)) > 0)) { - m = NULL; - - if ((m = memchr(&buf[c], '\n', r)) != NULL) { - rbuflen = r - (m - &buf[c] + 1); - if (rbuflen > 0) - memcpy(rbuf, m + 1, rbuflen); - c += m - &buf[c] + 1; - } else { - rbuflen = 0; - c += r; - } - - if ((c > 3) && (memcmp(&buf[c - 3], "---", 3) == 0)) - read_len = 1; - - if (m != NULL) - return c; - } - - return c; -} - -int main(int argc, char **argv) -{ - char buf[BUF_SIZE]; - char buf1[BUF_SIZE]; - char *tmp; - int len, r = 0, r1 = 0; - - if (argc != 2) { - fprintf(stderr, "Syntax: %s (name|data )\n", argv[0]); - exit(1); - } - while (tmp = strchr(argv[1], '\r')) - *tmp = 0; - - len = strlen(argv[1]); - - *buf = 0; - while ((strncmp(buf, argv[1], len) != 0) && - (strncmp(buf + 2, argv[1], len) != 0)) { - if (r > 0) { - if (r1 > 0) - write (1, buf1, r1); - r1 = r; - memcpy(buf1, buf, r); - } - if ((r = do_gets(buf)) <= 0) - exit(1); - } - - if (r1 > 2) - write(1, buf1, r1 - 2); -} diff --git a/package/webif/src/webif-page.c b/package/webif/src/webif-page.c deleted file mode 100644 index 13e70937ec..0000000000 --- a/package/webif/src/webif-page.c +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Webif page translator - * - * Copyright (C) 2005 Felix Fietkau - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - - -#include -#include -#include -#include -#include -#ifdef NVRAM -#include -#endif - -#define HASH_MAX 100 -#define LINE_BUF 1024 /* max. buffer allocated for one line */ -#define MAX_TR 32 /* max. translations done on one line */ -#define TR_START "@TR<<" -#define TR_END ">>" - -struct lstr { - char *name; - char *value; - struct lstr *next; -}; -typedef struct lstr lstr; - -static lstr *ltable[HASH_MAX]; -static char buf[LINE_BUF], buf2[LINE_BUF]; - -/* djb2 hash function */ -static inline unsigned long hash(char *str) -{ - unsigned long hash = 5381; - int c; - - while ((c = *str++)) - hash = ((hash << 5) + hash) + c; /* hash * 33 + c */ - - return hash; -} - -static inline char *translate_lookup(char *str) -{ - char *name, *def, *p, *res = NULL; - lstr *i; - int h; - - def = name = str; - if (((p = strchr(str, '|')) != NULL) - || ((p = strchr(str, '#')) != NULL)) { - def = p + 1; - *p = 0; - } - - h = hash(name) % HASH_MAX; - i = ltable[h]; - while ((res == NULL) && (i != NULL)) { - if (strcmp(name, i->name) == 0) - res = i->value; - i = i->next; - } - - if (res == NULL) - res = def; - - return res; -} - -static inline void add_line(char *name, char *value) -{ - int h = hash(name) % HASH_MAX; - lstr *s = malloc(sizeof(lstr)); - lstr *p; - - s->name = strdup(name); - s->value = strdup(value); - s->next = NULL; - - if (ltable[h] == NULL) - ltable[h] = s; - else { - for(p = ltable[h]; p->next != NULL; p = p->next); - p->next = s; - } -} - -static char *translate_line(char *line) -{ - static char *tok[MAX_TR * 3]; - char *l, *p, *p2, *res; - int len = 0, pos = 0, i; - - l = line; - while (l != NULL) { - if ((p = strstr(l, TR_START)) == NULL) { - len += strlen((tok[pos++] = l)); - break; - } - - p2 = strstr(p, TR_END); - if (p2 == NULL) - break; - - *p = 0; - *p2 = 0; - len += strlen((tok[pos++] = l)); - len += strlen((tok[pos++] = translate_lookup(p + strlen(TR_START)))); - - l = p2; - l += strlen(TR_END); - } - len++; - - if (len > LINE_BUF) - p = malloc(len); - else - p = buf2; - - p[0] = 0; - res = p; - for (i = 0; i < pos; i++) { - strcat(p, tok[i]); - p += strlen(tok[i]); - } - - return res; -} - -/* load and parse language file */ -static void load_lang(char *file) -{ - FILE *f; - char *b, *name, *value; - - f = fopen(file, "r"); - while (!feof(f) && (fgets(buf, LINE_BUF - 1, f) != NULL)) { - b = buf; - while (isspace(*b)) - b++; /* skip leading spaces */ - if (!*b) - continue; - - name = b; - if ((b = strstr(name, "=>")) == NULL) - continue; /* separator not found */ - - value = b + 2; - if (!*value) - continue; - - *b = 0; - for (b--; isspace(*b); b--) - *b = 0; /* remove trailing spaces */ - - while (isspace(*value)) - value++; /* skip leading spaces */ - - for (b = value + strlen(value) - 1; isspace(*b); b--) - *b = 0; /* remove trailing spaces */ - - if (!*value) - continue; - - add_line(name, value); - } -} - -int main (int argc, char **argv) -{ - FILE *f; - int len, i, done; - char line[LINE_BUF], *tmp, *arg; - glob_t langfiles; - char *lang = NULL; - char *proc = "/usr/bin/haserl"; - - memset(ltable, 0, HASH_MAX * sizeof(lstr *)); -#ifdef NVRAM - if ((lang = nvram_get("language")) != NULL) { -#else - if ((f = fopen("/etc/config/webif", "r")) != NULL) { - int n, i; - - while (!feof(f) && (lang == NULL)) { - fgets(line, LINE_BUF - 1, f); - - if (strncasecmp(line, "lang", 4) != 0) - goto nomatch; - - lang = line + 4; - while (isspace(*lang)) - lang++; - - if (*lang != '=') - goto nomatch; - - lang++; - - while (isspace(*lang)) - lang++; - - for (i = 0; isalpha(lang[i]) && (i < 32); i++); - lang[i] = 0; - continue; -nomatch: - lang = NULL; - } - fclose(f); -#endif - - sprintf(buf, "/usr/lib/webif/lang/%s/*.txt", lang); - i = glob(buf, GLOB_ERR | GLOB_MARK, NULL, &langfiles); - if (i == GLOB_NOSPACE || i == GLOB_ABORTED || i == GLOB_NOMATCH) { - // no language files found - } else { - for (i = 0; i < langfiles.gl_pathc; i++) { - load_lang(langfiles.gl_pathv[i]); - } - } - } - - /* - * command line options for this parser are stored in argv[1] only. - * filename to be processed is in argv[2] - */ - done = 0; - i = 1; - while (!done) { - if (argv[1] == NULL) { - done = 1; - } else if (strncmp(argv[1], "-e", 2) == 0) { - argv[1] = strchr(argv[1], ' '); - argv[1]++; - if (argv[1] != NULL) { - arg = argv[1]; - if ((tmp = strchr(argv[1], ' ')) != NULL) { - *tmp = 0; - argv[1] = &tmp[1]; - } else { - argv[1] = NULL; - i++; - } - system(arg); - } - } else if (strncmp(argv[1], "-p", 2) == 0) { - argv[1] = strchr(argv[1], ' '); - argv[1]++; - if (argv[1] != NULL) { - arg = argv[1]; - if ((tmp = strchr(argv[1], ' ')) != NULL) { - *tmp = 0; - argv[1] = &tmp[1]; - } else { - argv[1] = NULL; - i++; - } - proc = strdup(arg); - } - } else { - done = 1; - } - } - - strcpy(buf, proc); - while (argv[i]) { - sprintf(buf + strlen(buf), " %s", argv[i++]); - } - f = popen(buf, "r"); - - while (!feof(f) && (fgets(buf, LINE_BUF - 1, f)) != NULL) { - fprintf(stdout, "%s", translate_line(buf)); - fflush(stdout); - } - - return 0; -} diff --git a/package/webif/webif.mk b/package/webif/webif.mk deleted file mode 100644 index d9f3e049ba..0000000000 --- a/package/webif/webif.mk +++ /dev/null @@ -1,71 +0,0 @@ -############################################################# -# -# webif -# -############################################################# -WEBIF_VERSION:=0.2 -WEBIF_SOURCE:=package/webif -WEBIF_SITE:=https://svn.openwrt.org/openwrt/tags/whiterussian_0.9/package/webif -WEBIF_DIR:=$(BUILD_DIR)/webif-$(WEBIF_VERSION) - -$(WEBIF_DIR)/.unpacked: - mkdir -p $(WEBIF_DIR) - touch $@ - -$(WEBIF_DIR)/.built: $(WEBIF_DIR)/.unpacked - $(TARGET_CC) $(TARGET_CFLAGS) -o $(WEBIF_DIR)/webif-page $(WEBIF_SOURCE)/src/webif-page.c - $(TARGET_CC) $(TARGET_CFLAGS) -o $(WEBIF_DIR)/bstrip $(WEBIF_SOURCE)/src/bstrip.c - $(STRIPCMD) --strip-unneeded $(WEBIF_DIR)/webif-page $(WEBIF_DIR)/bstrip - touch $@ - -$(TARGET_DIR)/www/webif.css: $(WEBIF_DIR)/.built - mkdir -p $(TARGET_DIR)/etc - mkdir -p $(TARGET_DIR)/usr/bin - mkdir -p $(TARGET_DIR)/usr/lib - mkdir -p $(TARGET_DIR)/www - cat $(WEBIF_SOURCE)/files/etc/httpd.conf >> $(TARGET_DIR)/etc/httpd.conf - cp -dpfr $(WEBIF_SOURCE)/files/usr/lib/webif $(TARGET_DIR)/usr/lib/ -ifneq ($(BR2_PACKAGE_WEBIF_LANGUAGES),y) - rm -rf $(TARGET_DIR)/usr/lib/webif/lang -endif - $(INSTALL) -m0755 $(WEBIF_DIR)/webif-page $(TARGET_DIR)/usr/bin/ - $(INSTALL) -m0755 $(WEBIF_DIR)/bstrip $(TARGET_DIR)/usr/bin/ -ifeq ($(BR2_PACKAGE_WEBIF_INSTALL_INDEX_HTML),y) - @if [ -f "$(TARGET_DIR)/www/index.html" ]; then \ - echo; \ - echo "webif WARNING:"; \ - echo "There is already a $(TARGET_DIR)/www/index.html"; \ - echo "webif might be replacing another package;" \ - echo; \ - echo "Sleeping for 10 seconds"; \ - sleep 10; \ - fi - cp -dpf $(WEBIF_SOURCE)/files/www/index.html $(TARGET_DIR)/www/ -endif - cp -dpfr $(WEBIF_SOURCE)/files/www/cgi-bin $(TARGET_DIR)/www/ - cp -dpfr $(WEBIF_SOURCE)/files/www/webif.* $(TARGET_DIR)/www/ - @if [ ! -f $(TARGET_DIR)/etc/banner ]; then \ - ln -sf issue $(TARGET_DIR)/etc/banner; \ - fi - touch $@ - -webif: busybox $(TARGET_DIR)/www/webif.css - -webif-clean: - rm -rf $(TARGET_DIR)/www/cgi-bin/webif* $(TARGET_DIR)/www/webif.* - rm -rf $(TARGET_DIR)/usr/lib/webif - rm -f $(TARGET_DIR)/usr/bin/bstrip $(TARGET_DIR)/usr/bin/webif-page - rm -r $(WEBIF_DIR)/bstrip $(WEBIF_DIR)/webif-page - -webif-source: - -webif-dirclean: - rm -rf $(WEBIF_DIR) -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_WEBIF),y) -TARGETS+=webif -endif diff --git a/package/webkit/Config.in b/package/webkit/Config.in index 34071e4859..0207a6d78c 100644 --- a/package/webkit/Config.in +++ b/package/webkit/Config.in @@ -1,17 +1,24 @@ config BR2_PACKAGE_WEBKIT bool "webkit" depends on BR2_INSTALL_LIBSTDCPP - depends on BR2_USE_WCHAR + depends on BR2_USE_WCHAR # enchant -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # enchant -> libglib2 depends on BR2_PACKAGE_LIBGTK2 + depends on (BR2_arm || BR2_armeb || BR2_i386 || BR2_mips || BR2_mipsel || \ + BR2_powerpc || BR2_sh || BR2_sparc || BR2_x86_64) + select BR2_PACKAGE_CAIRO_PNG + select BR2_PACKAGE_ENCHANT + select BR2_PACKAGE_HARFBUZZ select BR2_PACKAGE_ICU + select BR2_PACKAGE_JPEG select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_LIBGAIL + select BR2_PACKAGE_LIBSECRET + select BR2_PACKAGE_LIBSOUP select BR2_PACKAGE_LIBXML2 select BR2_PACKAGE_LIBXSLT select BR2_PACKAGE_SQLITE - select BR2_PACKAGE_ENCHANT - select BR2_PACKAGE_LIBSOUP - select BR2_PACKAGE_CAIRO_PNG - select BR2_PACKAGE_LIBGAIL + select BR2_PACKAGE_WEBP select BR2_PACKAGE_XLIB_LIBXT if BR2_PACKAGE_XORG7 help WebKit is an open source, standards compliant web browser engine. @@ -21,5 +28,8 @@ config BR2_PACKAGE_WEBKIT http://webkit.org/ -comment "webkit requires C++, WCHAR in toolchain and libgtk2" - depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || !BR2_PACKAGE_LIBGTK2 +comment "webkit needs libgtk2 and a toolchain w/ C++, wchar, threads" + depends on (BR2_arm || BR2_armeb || BR2_i386 || BR2_mips || BR2_mipsel || \ + BR2_powerpc || BR2_sh || BR2_sparc || BR2_x86_64) + depends on !BR2_PACKAGE_LIBGTK2 || !BR2_INSTALL_LIBSTDCPP || \ + !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/webkit/webkit-0001-build-fix-for-32-bit-autotools.patch b/package/webkit/webkit-0001-build-fix-for-32-bit-autotools.patch new file mode 100644 index 0000000000..d7765ead0e --- /dev/null +++ b/package/webkit/webkit-0001-build-fix-for-32-bit-autotools.patch @@ -0,0 +1,34 @@ +Add missing symbol for WebCore::TextIterator::getLocationAndLengthFromRange + +Signed-off-by: Markos Chandras + +From f5bb58f9096061f00c948e668335811d364ba360 Mon Sep 17 00:00:00 2001 +From: "kov@webkit.org" +Date: Thu, 7 Feb 2013 13:48:46 +0000 +Subject: [PATCH] Unreviewed build fix after r141196 for 32 bits autotools. + +* Source/autotools/symbols.filter: restore 32 bits version of the +WebCore::TextIterator::getLocationAndLengthFromRange(WebCore::Node*, +WebCore::Range const*, unsigned int&, unsigned int&) symbol. + +git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142105 268f45cc-cd09-0410-ab3c-d52691b4dbfc +--- + ChangeLog | 8 ++++++++ + Source/autotools/symbols.filter | 1 + + 2 files changed, 9 insertions(+) + +diff --git a/Source/autotools/symbols.filter b/Source/autotools/symbols.filter +index 9d730b3..2edefaf 100644 +--- a/Source/autotools/symbols.filter ++++ b/Source/autotools/symbols.filter +@@ -57,6 +57,7 @@ _ZN7WebCore11HistoryItem16setDocumentStateERKN3WTF6VectorINS1_6StringELj0EEE; + _ZN7WebCore11HistoryItem16setDocumentStateERKN3WTF6VectorINS1_6StringELm0EEE; + _ZN7WebCore11MemoryCache14resourceForURLERKNS_4KURLE; + _ZN7WebCore12TextIterator26rangeFromLocationAndLengthEPNS_13ContainerNodeEiib; ++_ZN7WebCore12TextIterator29getLocationAndLengthFromRangeEPNS_4NodeEPKNS_5RangeERjS6_; + _ZN7WebCore12TextIterator29getLocationAndLengthFromRangeEPNS_4NodeEPKNS_5RangeERmS6_; + _ZN7WebCore12PrintContext20pageNumberForElementEPNS_7ElementERKNS_9FloatSizeE; + _ZN7WebCore13createWrapperEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_4NodeE; +-- +1.8.3.2 + diff --git a/package/webkit/webkit-0002-build-fix-for-gtklauncher.patch b/package/webkit/webkit-0002-build-fix-for-gtklauncher.patch new file mode 100644 index 0000000000..9a840b62fe --- /dev/null +++ b/package/webkit/webkit-0002-build-fix-for-gtklauncher.patch @@ -0,0 +1,51 @@ +Make gstreamer support conditional + +Signed-off-by: Markos Chandras + +From f1055f61bce46eccf8dc0aa017113a08d3d71944 Mon Sep 17 00:00:00 2001 +From: "commit-queue@webkit.org" + +Date: Fri, 15 Mar 2013 07:13:51 +0000 +Subject: [PATCH] Build fix for Tools/GtkLauncher/Programs_GtkLauncher-main.o + if gstreamer is not installed https://bugs.webkit.org/show_bug.cgi?id=112394 + +Patch by Tobias Mueller on 2013-03-15 +Reviewed by Philippe Normand. + +* GtkLauncher/main.c: +(main): Guard using the gstreamer function with #ifdef WTF_USE_GSTREAMER + +git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145881 268f45cc-cd09-0410-ab3c-d52691b4dbfc +--- + Tools/ChangeLog | 10 ++++++++++ + Tools/GtkLauncher/main.c | 5 ++++- + 2 files changed, 14 insertions(+), 1 deletion(-) + +diff --git a/Tools/GtkLauncher/main.c b/Tools/GtkLauncher/main.c +index 32baf4a..84c8833 100644 +--- a/Tools/GtkLauncher/main.c ++++ b/Tools/GtkLauncher/main.c +@@ -28,7 +28,9 @@ + #include "autotoolsconfig.h" + #include "LauncherInspectorWindow.h" + #include ++#ifdef WTF_USE_GSTREAMER + #include ++#endif + #include + #include + #include +@@ -489,8 +491,9 @@ int main(int argc, char* argv[]) + GOptionContext *context = g_option_context_new(0); + g_option_context_add_main_entries(context, commandLineOptions, 0); + g_option_context_add_group(context, gtk_get_option_group(TRUE)); ++#ifdef WTF_USE_GSTREAMER + g_option_context_add_group(context, gst_init_get_option_group()); +- ++#endif + webkitSettings = webkit_web_settings_new(); + g_object_set(webkitSettings, "enable-developer-extras", TRUE, NULL); + if (!addWebSettingsGroupToContext(context, webkitSettings)) { +-- +1.8.3.2 + diff --git a/package/webkit/webkit-0003-detect-harfbuzz-icu.patch b/package/webkit/webkit-0003-detect-harfbuzz-icu.patch new file mode 100644 index 0000000000..dc93c67e33 --- /dev/null +++ b/package/webkit/webkit-0003-detect-harfbuzz-icu.patch @@ -0,0 +1,28 @@ +harfbuzz-icu detections based on the following upstream commits + +- 5f3ae29ffb29c499c1825578ba7f3ffcbf1aa8b9 +- ad2a23ec44b692bde43a13b658990770caa8dfc5 +- 22b4786377142424bfb6562ff029997acd0846d1 + +Signed-off-by: Markos Chandras + +Index: webkit-1.11.5/configure.ac +=================================================================== +--- webkit-1.11.5.orig/configure.ac ++++ webkit-1.11.5/configure.ac +@@ -938,6 +938,15 @@ PKG_CHECK_MODULES([FREETYPE], + freetype2 >= $FREETYPE2_REQUIRED_VERSION + harfbuzz]) + fi ++# HarfBuzz 0.9.18 splits harbuzz-icu into a separate library. ++# Since we support earlier HarfBuzz versions we keep this conditional for now. ++m4_define([harfbuzz_required_version], [0.9.7]) ++if $PKG_CONFIG --atleast-version 0.9.18 harfbuzz; then ++ PKG_CHECK_MODULES([HARFBUZZ_ICU], [harfbuzz-icu >= $harfbuzz_required_version]) ++ FREETYPE_CFLAGS+=" $HARFBUZZ_ICU_CFLAGS" ++ FREETYPE_LIBS+=" $HARFBUZZ_ICU_LIBS" ++fi ++ + AC_SUBST([FREETYPE_CFLAGS]) + AC_SUBST([FREETYPE_LIBS]) + diff --git a/package/webkit/webkit-0004-disable-docrebase.patch b/package/webkit/webkit-0004-disable-docrebase.patch new file mode 100644 index 0000000000..2692d617a4 --- /dev/null +++ b/package/webkit/webkit-0004-disable-docrebase.patch @@ -0,0 +1,27 @@ +This patch prevents documentation from being rebased or installed. This +prevents an error when gtk-doc --rebase is called. + +Signed-off-by: Spenser Gilliland +Signed-off-by: Markos Chandras + +Index: webkit-1.11.5/Tools/GNUmakefile.am +=================================================================== +--- webkit-1.11.5.orig/Tools/GNUmakefile.am ++++ webkit-1.11.5/Tools/GNUmakefile.am +@@ -308,6 +308,8 @@ EXTRA_DIST += \ + Tools/Scripts/webkit-build-directory \ + Tools/Scripts/webkitdirs.pm + ++if ENABLE_GTK_DOC ++ + docs: docs-build.stamp + .PHONY : docs + DISTCLEANFILES += docs-build.stamp +@@ -412,7 +414,6 @@ if ENABLE_WEBKIT2 + rm -rf $${installdir} + endif + +-if ENABLE_GTK_DOC + all: docs-build.stamp + endif + diff --git a/package/webkit/webkit-0005-disable-tests.patch b/package/webkit/webkit-0005-disable-tests.patch new file mode 100644 index 0000000000..6fa6daae6b --- /dev/null +++ b/package/webkit/webkit-0005-disable-tests.patch @@ -0,0 +1,80 @@ +This prevents the Webkit test suites from being built. + +Signed-off-by: Spenser Gilliland +---- +Index: webkit-1.9.6/GNUmakefile.am +=================================================================== +--- webkit-1.9.6.orig/GNUmakefile.am 2012-08-06 03:17:24.000000000 -0500 ++++ webkit-1.9.6/GNUmakefile.am 2013-05-28 10:08:53.645129501 -0500 +@@ -282,11 +282,14 @@ + include Tools/DumpRenderTree/gtk/GNUmakefile.ImageDiff.am + + include Source/WebKit2/GNUmakefile.am +-include Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am + include Tools/MiniBrowser/gtk/GNUmakefile.am ++ ++if ENABLE_TESTS ++include Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am + include Tools/WebKitTestRunner/GNUmakefile.am + include Source/ThirdParty/gtest/GNUmakefile.am + include Tools/TestWebKitAPI/GNUmakefile.am ++endif # ENABLE_TESTS + # [GTK] Refactor the translations now that we have webkit2 + # https://bugs.webkit.org/show_bug.cgi?id=55153 + +Index: webkit-1.9.6/Source/WebKit/gtk/GNUmakefile.am +=================================================================== +--- webkit-1.9.6.orig/Source/WebKit/gtk/GNUmakefile.am 2012-07-19 05:02:29.000000000 -0500 ++++ webkit-1.9.6/Source/WebKit/gtk/GNUmakefile.am 2013-05-28 10:09:49.277130516 -0500 +@@ -413,6 +413,7 @@ + dist_resources_DATA = \ + $(shell ls $(srcdir)/Source/WebKit/gtk/resources/*.html) + ++if ENABLE_TESTS + # Build unit tests + webkit_tests_cflags = \ + -fno-strict-aliasing \ +@@ -613,6 +614,8 @@ + Programs_unittests_testcopyandpaste_LDADD = $(webkit_tests_ldadd) + Programs_unittests_testcopyandpaste_LDFLAGS = $(webkit_tests_ldflags) + ++endif # ENABLE_TESTS ++ + # Project-wide clean rules + # Files that will be cleaned + CLEANFILES += \ +Index: webkit-1.9.6/configure.ac +=================================================================== +--- webkit-1.9.6.orig/configure.ac 2012-08-06 08:45:10.000000000 -0500 ++++ webkit-1.9.6/configure.ac 2013-05-28 10:07:55.817128445 -0500 +@@ -516,6 +516,14 @@ + AC_SUBST(CAIRO_CFLAGS) + AC_SUBST(CAIRO_LIBS) + ++# check wheter to build tests ++AC_MSG_CHECKING([wheter to build tests]) ++AC_ARG_ENABLE(tests, ++ AC_HELP_STRING([--enable-tests], ++ [turn on tests [default=no]]), ++ [],[enable_debug="no"]) ++AC_MSG_RESULT([$enable_tests]) ++ + # check whether to build with debugging enabled + AC_MSG_CHECKING([whether to do a debug build]) + AC_ARG_ENABLE(debug, +@@ -1423,6 +1431,7 @@ + AM_CONDITIONAL([USE_FARSTREAM], [test "$have_farstream" = "yes"]) + + # WebKit feature conditionals ++AM_CONDITIONAL([ENABLE_TESTS],[test "$enable_tests" = "yes"]) + AM_CONDITIONAL([ENABLE_DEBUG],[test "$enable_debug_features" = "yes"]) + AM_CONDITIONAL([ENABLE_UNSTABLE_FEATURES],[test "$enable_unstable_features" = "yes"]) + AM_CONDITIONAL([ENABLE_WEBGL],[test "$enable_webgl" = "yes"]) +@@ -1534,6 +1543,7 @@ + WebKit was configured with the following options: + + Build configuration: ++ Enable tests (slow) : $enable_tests + Enable debugging (slow) : $enable_debug + Compile with debug symbols (slow) : $enable_debug_symbols + Enable debug features (slow) : $enable_debug_features diff --git a/package/webkit/webkit-0006-execinfo_h.patch b/package/webkit/webkit-0006-execinfo_h.patch new file mode 100644 index 0000000000..f5508a1cb1 --- /dev/null +++ b/package/webkit/webkit-0006-execinfo_h.patch @@ -0,0 +1,20 @@ +Fixes uclibc build as uclibc does not include backtrace functionality + +Signed-of-by: Spenser Gilliland +Signed-of-by: Markos Chandras + +Index: webkit-1.11.5/Source/WTF/wtf/Assertions.cpp +=================================================================== +--- webkit-1.11.5.orig/Source/WTF/wtf/Assertions.cpp ++++ webkit-1.11.5/Source/WTF/wtf/Assertions.cpp +@@ -61,8 +61,10 @@ + #if (OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))) && !OS(ANDROID) + #include + #include ++#if !defined(__UCLIBC__) + #include + #endif ++#endif + + #if OS(ANDROID) + #include "android/log.h" diff --git a/package/webkit/webkit-0007-mips-dfg.patch b/package/webkit/webkit-0007-mips-dfg.patch new file mode 100644 index 0000000000..39259514b9 --- /dev/null +++ b/package/webkit/webkit-0007-mips-dfg.patch @@ -0,0 +1,1490 @@ +Upstream patch for DFG implementation for MIPS + +Signed-off-by: Markos Chandras + +From c921d19863ccf66bdd0ffa5d38eaf05efab6b136 Mon Sep 17 00:00:00 2001 +From: "commit-queue@webkit.org" + +Date: Mon, 18 Feb 2013 19:25:23 +0000 +Subject: [PATCH] MIPS DFG implementation. + https://bugs.webkit.org/show_bug.cgi?id=101328 + +Patch by Balazs Kilvady on 2013-02-18 +Reviewed by Oliver Hunt. + +DFG implementation for MIPS. + +Source/JavaScriptCore: + +* assembler/MIPSAssembler.h: +(JSC::MIPSAssembler::MIPSAssembler): +(JSC::MIPSAssembler::sllv): +(JSC::MIPSAssembler::movd): +(MIPSAssembler): +(JSC::MIPSAssembler::negd): +(JSC::MIPSAssembler::labelForWatchpoint): +(JSC::MIPSAssembler::label): +(JSC::MIPSAssembler::vmov): +(JSC::MIPSAssembler::linkDirectJump): +(JSC::MIPSAssembler::maxJumpReplacementSize): +(JSC::MIPSAssembler::revertJumpToMove): +(JSC::MIPSAssembler::replaceWithJump): +* assembler/MacroAssembler.h: +(MacroAssembler): +(JSC::MacroAssembler::poke): +* assembler/MacroAssemblerMIPS.h: +(JSC::MacroAssemblerMIPS::add32): +(MacroAssemblerMIPS): +(JSC::MacroAssemblerMIPS::and32): +(JSC::MacroAssemblerMIPS::lshift32): +(JSC::MacroAssemblerMIPS::mul32): +(JSC::MacroAssemblerMIPS::or32): +(JSC::MacroAssemblerMIPS::rshift32): +(JSC::MacroAssemblerMIPS::urshift32): +(JSC::MacroAssemblerMIPS::sub32): +(JSC::MacroAssemblerMIPS::xor32): +(JSC::MacroAssemblerMIPS::store32): +(JSC::MacroAssemblerMIPS::jump): +(JSC::MacroAssemblerMIPS::branchAdd32): +(JSC::MacroAssemblerMIPS::branchMul32): +(JSC::MacroAssemblerMIPS::branchSub32): +(JSC::MacroAssemblerMIPS::branchNeg32): +(JSC::MacroAssemblerMIPS::call): +(JSC::MacroAssemblerMIPS::loadDouble): +(JSC::MacroAssemblerMIPS::moveDouble): +(JSC::MacroAssemblerMIPS::swapDouble): +(JSC::MacroAssemblerMIPS::subDouble): +(JSC::MacroAssemblerMIPS::mulDouble): +(JSC::MacroAssemblerMIPS::divDouble): +(JSC::MacroAssemblerMIPS::negateDouble): +(JSC::MacroAssemblerMIPS::branchEqual): +(JSC::MacroAssemblerMIPS::branchNotEqual): +(JSC::MacroAssemblerMIPS::branchTruncateDoubleToInt32): +(JSC::MacroAssemblerMIPS::branchTruncateDoubleToUint32): +(JSC::MacroAssemblerMIPS::truncateDoubleToInt32): +(JSC::MacroAssemblerMIPS::truncateDoubleToUint32): +(JSC::MacroAssemblerMIPS::branchDoubleNonZero): +(JSC::MacroAssemblerMIPS::branchDoubleZeroOrNaN): +(JSC::MacroAssemblerMIPS::invert): +(JSC::MacroAssemblerMIPS::replaceWithJump): +(JSC::MacroAssemblerMIPS::maxJumpReplacementSize): +* dfg/DFGAssemblyHelpers.h: +(AssemblyHelpers): +(JSC::DFG::AssemblyHelpers::preserveReturnAddressAfterCall): +(JSC::DFG::AssemblyHelpers::restoreReturnAddressBeforeReturn): +(JSC::DFG::AssemblyHelpers::debugCall): +* dfg/DFGCCallHelpers.h: +(CCallHelpers): +(JSC::DFG::CCallHelpers::setupArguments): +(JSC::DFG::CCallHelpers::setupArgumentsWithExecState): +* dfg/DFGFPRInfo.h: +(DFG): +(FPRInfo): +(JSC::DFG::FPRInfo::toRegister): +(JSC::DFG::FPRInfo::toIndex): +(JSC::DFG::FPRInfo::debugName): +* dfg/DFGGPRInfo.h: +(DFG): +(GPRInfo): +(JSC::DFG::GPRInfo::toRegister): +(JSC::DFG::GPRInfo::toIndex): +(JSC::DFG::GPRInfo::debugName): +* dfg/DFGSpeculativeJIT.h: +(SpeculativeJIT): +* jit/JSInterfaceJIT.h: +(JSInterfaceJIT): +* runtime/JSGlobalData.h: +(JSC::ScratchBuffer::allocationSize): +(ScratchBuffer): + +Source/WTF: + +* wtf/Platform.h: + +git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143247 268f45cc-cd09-0410-ab3c-d52691b4dbfc +--- + Source/JavaScriptCore/ChangeLog | 90 ++++ + Source/JavaScriptCore/assembler/MIPSAssembler.h | 109 ++++- + Source/JavaScriptCore/assembler/MacroAssembler.h | 7 + + .../JavaScriptCore/assembler/MacroAssemblerMIPS.h | 480 +++++++++++++++++++-- + Source/JavaScriptCore/dfg/DFGAssemblyHelpers.h | 19 +- + Source/JavaScriptCore/dfg/DFGCCallHelpers.h | 92 ++-- + Source/JavaScriptCore/dfg/DFGFPRInfo.h | 68 +++ + Source/JavaScriptCore/dfg/DFGGPRInfo.h | 67 +++ + Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h | 4 +- + Source/JavaScriptCore/jit/JSInterfaceJIT.h | 4 + + Source/JavaScriptCore/runtime/JSGlobalData.h | 6 +- + Source/WTF/ChangeLog | 11 + + Source/WTF/wtf/Platform.h | 4 + + 13 files changed, 888 insertions(+), 73 deletions(-) + +diff --git a/Source/JavaScriptCore/assembler/MIPSAssembler.h b/Source/JavaScriptCore/assembler/MIPSAssembler.h +index 026f87e..7f553bb 100644 +--- a/Source/JavaScriptCore/assembler/MIPSAssembler.h ++++ b/Source/JavaScriptCore/assembler/MIPSAssembler.h +@@ -152,6 +152,8 @@ public: + typedef SegmentedVector Jumps; + + MIPSAssembler() ++ : m_indexOfLastWatchpoint(INT_MIN) ++ , m_indexOfTailOfLastWatchpoint(INT_MIN) + { + } + +@@ -325,7 +327,7 @@ public: + emitInst(0x00000000 | (rd << OP_SH_RD) | (rt << OP_SH_RT) | ((shamt & 0x1f) << OP_SH_SHAMT)); + } + +- void sllv(RegisterID rd, RegisterID rt, int rs) ++ void sllv(RegisterID rd, RegisterID rt, RegisterID rs) + { + emitInst(0x00000004 | (rd << OP_SH_RD) | (rt << OP_SH_RT) | (rs << OP_SH_RS)); + } +@@ -527,6 +529,16 @@ public: + emitInst(0x46200004 | (fd << OP_SH_FD) | (fs << OP_SH_FS)); + } + ++ void movd(FPRegisterID fd, FPRegisterID fs) ++ { ++ emitInst(0x46200006 | (fd << OP_SH_FD) | (fs << OP_SH_FS)); ++ } ++ ++ void negd(FPRegisterID fd, FPRegisterID fs) ++ { ++ emitInst(0x46200007 | (fd << OP_SH_FD) | (fs << OP_SH_FS)); ++ } ++ + void truncwd(FPRegisterID fd, FPRegisterID fs) + { + emitInst(0x4620000d | (fd << OP_SH_FD) | (fs << OP_SH_FS)); +@@ -619,9 +631,24 @@ public: + return m_buffer.label(); + } + ++ AssemblerLabel labelForWatchpoint() ++ { ++ AssemblerLabel result = m_buffer.label(); ++ if (static_cast(result.m_offset) != m_indexOfLastWatchpoint) ++ result = label(); ++ m_indexOfLastWatchpoint = result.m_offset; ++ m_indexOfTailOfLastWatchpoint = result.m_offset + maxJumpReplacementSize(); ++ return result; ++ } ++ + AssemblerLabel label() + { +- return m_buffer.label(); ++ AssemblerLabel result = m_buffer.label(); ++ while (UNLIKELY(static_cast(result.m_offset) < m_indexOfTailOfLastWatchpoint)) { ++ nop(); ++ result = m_buffer.label(); ++ } ++ return result; + } + + AssemblerLabel align(int alignment) +@@ -664,14 +691,24 @@ public: + // Assembly helpers for moving data between fp and registers. + void vmov(RegisterID rd1, RegisterID rd2, FPRegisterID rn) + { ++#if WTF_MIPS_ISA_REV(2) && WTF_MIPS_FP64 ++ mfc1(rd1, rn); ++ mfhc1(rd2, rn); ++#else + mfc1(rd1, rn); + mfc1(rd2, FPRegisterID(rn + 1)); ++#endif + } + + void vmov(FPRegisterID rd, RegisterID rn1, RegisterID rn2) + { ++#if WTF_MIPS_ISA_REV(2) && WTF_MIPS_FP64 ++ mtc1(rn1, rd); ++ mthc1(rn2, rd); ++#else + mtc1(rn1, rd); + mtc1(rn2, FPRegisterID(rd + 1)); ++#endif + } + + static unsigned getCallReturnOffset(AssemblerLabel call) +@@ -688,6 +725,35 @@ public: + // writable region of memory; to modify the code in an execute-only execuable + // pool the 'repatch' and 'relink' methods should be used. + ++ static size_t linkDirectJump(void* code, void* to) ++ { ++ MIPSWord* insn = reinterpret_cast(reinterpret_cast(code)); ++ size_t ops = 0; ++ int32_t slotAddr = reinterpret_cast(insn) + 4; ++ int32_t toAddr = reinterpret_cast(to); ++ ++ if ((slotAddr & 0xf0000000) != (toAddr & 0xf0000000)) { ++ // lui ++ *insn = 0x3c000000 | (MIPSRegisters::t9 << OP_SH_RT) | ((toAddr >> 16) & 0xffff); ++ ++insn; ++ // ori ++ *insn = 0x34000000 | (MIPSRegisters::t9 << OP_SH_RT) | (MIPSRegisters::t9 << OP_SH_RS) | (toAddr & 0xffff); ++ ++insn; ++ // jr ++ *insn = 0x00000008 | (MIPSRegisters::t9 << OP_SH_RS); ++ ++insn; ++ ops = 4 * sizeof(MIPSWord); ++ } else { ++ // j ++ *insn = 0x08000000 | ((toAddr & 0x0fffffff) >> 2); ++ ++insn; ++ ops = 2 * sizeof(MIPSWord); ++ } ++ // nop ++ *insn = 0x00000000; ++ return ops; ++ } ++ + void linkJump(AssemblerLabel from, AssemblerLabel to) + { + ASSERT(to.isSet()); +@@ -825,29 +891,36 @@ public: + #endif + } + +- static void revertJumpToMove(void* instructionStart, RegisterID rt, int imm) ++ static ptrdiff_t maxJumpReplacementSize() + { +- MIPSWord* insn = static_cast(instructionStart) + 1; +- ASSERT((*insn & 0xfc000000) == 0x34000000); +- *insn = (*insn & 0xfc1f0000) | (imm & 0xffff); +- cacheFlush(insn, sizeof(MIPSWord)); ++ return sizeof(MIPSWord) * 4; + } + +- static void replaceWithJump(void* instructionStart, void* to) ++ static void revertJumpToMove(void* instructionStart, RegisterID rt, int imm) + { +- MIPSWord* instruction = reinterpret_cast(instructionStart); +- intptr_t jumpTo = reinterpret_cast(to); ++ MIPSWord* insn = static_cast(instructionStart); ++ size_t codeSize = 2 * sizeof(MIPSWord); + + // lui +- instruction[0] = 0x3c000000 | (MIPSRegisters::t9 << OP_SH_RT) | ((jumpTo >> 16) & 0xffff); ++ *insn = 0x3c000000 | (rt << OP_SH_RT) | ((imm >> 16) & 0xffff); ++ ++insn; + // ori +- instruction[1] = 0x34000000 | (MIPSRegisters::t9 << OP_SH_RT) | (MIPSRegisters::t9 << OP_SH_RS) | (jumpTo & 0xffff); +- // jr +- instruction[2] = 0x00000008 | (MIPSRegisters::t9 << OP_SH_RS); +- // nop +- instruction[3] = 0x0; ++ *insn = 0x34000000 | (rt << OP_SH_RS) | (rt << OP_SH_RT) | (imm & 0xffff); ++ ++insn; ++ // if jr $t9 ++ if (*insn == 0x03200008) { ++ *insn = 0x00000000; ++ codeSize += sizeof(MIPSWord); ++ } ++ cacheFlush(insn, codeSize); ++ } + +- cacheFlush(instruction, sizeof(MIPSWord) * 4); ++ static void replaceWithJump(void* instructionStart, void* to) ++ { ++ ASSERT(!(bitwise_cast(instructionStart) & 3)); ++ ASSERT(!(bitwise_cast(to) & 3)); ++ size_t ops = linkDirectJump(instructionStart, to); ++ cacheFlush(instructionStart, ops); + } + + static void replaceWithLoad(void* instructionStart) +@@ -1023,6 +1096,8 @@ private: + + AssemblerBuffer m_buffer; + Jumps m_jumps; ++ int m_indexOfLastWatchpoint; ++ int m_indexOfTailOfLastWatchpoint; + }; + + } // namespace JSC +diff --git a/Source/JavaScriptCore/assembler/MacroAssembler.h b/Source/JavaScriptCore/assembler/MacroAssembler.h +index 60a93db..1f0c3de 100644 +--- a/Source/JavaScriptCore/assembler/MacroAssembler.h ++++ b/Source/JavaScriptCore/assembler/MacroAssembler.h +@@ -200,6 +200,13 @@ public: + } + #endif + ++#if CPU(MIPS) ++ void poke(FPRegisterID src, int index = 0) ++ { ++ ASSERT(!(index & 1)); ++ storeDouble(src, addressForPoke(index)); ++ } ++#endif + + // Backwards banches, these are currently all implemented using existing forwards branch mechanisms. + void branchPtr(RelationalCondition cond, RegisterID op1, TrustedImmPtr imm, Label target) +diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h b/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h +index 43ad434..4f14960 100644 +--- a/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h ++++ b/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h +@@ -114,6 +114,11 @@ public: + m_assembler.addu(dest, dest, src); + } + ++ void add32(RegisterID op1, RegisterID op2, RegisterID dest) ++ { ++ m_assembler.addu(dest, op1, op2); ++ } ++ + void add32(TrustedImm32 imm, RegisterID dest) + { + add32(imm, dest, dest); +@@ -267,6 +272,11 @@ public: + m_assembler.andInsn(dest, dest, src); + } + ++ void and32(RegisterID op1, RegisterID op2, RegisterID dest) ++ { ++ m_assembler.andInsn(dest, op1, op2); ++ } ++ + void and32(TrustedImm32 imm, RegisterID dest) + { + if (!imm.m_value && !m_fixedWidth) +@@ -283,9 +293,16 @@ public: + } + } + +- void lshift32(TrustedImm32 imm, RegisterID dest) ++ void and32(TrustedImm32 imm, RegisterID src, RegisterID dest) + { +- m_assembler.sll(dest, dest, imm.m_value); ++ if (!imm.m_value && !m_fixedWidth) ++ move(MIPSRegisters::zero, dest); ++ else if (imm.m_value > 0 && imm.m_value < 65535 && !m_fixedWidth) ++ m_assembler.andi(dest, src, imm.m_value); ++ else { ++ move(imm, immTempRegister); ++ m_assembler.andInsn(dest, src, immTempRegister); ++ } + } + + void lshift32(RegisterID shiftAmount, RegisterID dest) +@@ -293,11 +310,33 @@ public: + m_assembler.sllv(dest, dest, shiftAmount); + } + ++ void lshift32(RegisterID src, RegisterID shiftAmount, RegisterID dest) ++ { ++ m_assembler.sllv(dest, src, shiftAmount); ++ } ++ ++ void lshift32(TrustedImm32 imm, RegisterID dest) ++ { ++ move(imm, immTempRegister); ++ m_assembler.sllv(dest, dest, immTempRegister); ++ } ++ ++ void lshift32(RegisterID src, TrustedImm32 imm, RegisterID dest) ++ { ++ move(imm, immTempRegister); ++ m_assembler.sllv(dest, src, immTempRegister); ++ } ++ + void mul32(RegisterID src, RegisterID dest) + { + m_assembler.mul(dest, dest, src); + } + ++ void mul32(RegisterID op1, RegisterID op2, RegisterID dest) ++ { ++ m_assembler.mul(dest, op1, op2); ++ } ++ + void mul32(TrustedImm32 imm, RegisterID src, RegisterID dest) + { + if (!imm.m_value && !m_fixedWidth) +@@ -348,6 +387,24 @@ public: + m_assembler.orInsn(dest, dest, dataTempRegister); + } + ++ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) ++ { ++ if (!imm.m_value && !m_fixedWidth) ++ return; ++ ++ if (imm.m_value > 0 && imm.m_value < 65535 && !m_fixedWidth) { ++ m_assembler.ori(dest, src, imm.m_value); ++ return; ++ } ++ ++ /* ++ li dataTemp, imm ++ or dest, src, dataTemp ++ */ ++ move(imm, dataTempRegister); ++ m_assembler.orInsn(dest, src, dataTempRegister); ++ } ++ + void or32(RegisterID src, AbsoluteAddress dest) + { + load32(dest.m_ptr, dataTempRegister); +@@ -360,6 +417,11 @@ public: + m_assembler.srav(dest, dest, shiftAmount); + } + ++ void rshift32(RegisterID src, RegisterID shiftAmount, RegisterID dest) ++ { ++ m_assembler.srav(dest, src, shiftAmount); ++ } ++ + void rshift32(TrustedImm32 imm, RegisterID dest) + { + m_assembler.sra(dest, dest, imm.m_value); +@@ -375,16 +437,31 @@ public: + m_assembler.srlv(dest, dest, shiftAmount); + } + ++ void urshift32(RegisterID src, RegisterID shiftAmount, RegisterID dest) ++ { ++ m_assembler.srlv(dest, src, shiftAmount); ++ } ++ + void urshift32(TrustedImm32 imm, RegisterID dest) + { + m_assembler.srl(dest, dest, imm.m_value); + } + ++ void urshift32(RegisterID src, TrustedImm32 imm, RegisterID dest) ++ { ++ m_assembler.srl(dest, src, imm.m_value); ++ } ++ + void sub32(RegisterID src, RegisterID dest) + { + m_assembler.subu(dest, dest, src); + } + ++ void sub32(RegisterID op1, RegisterID op2, RegisterID dest) ++ { ++ m_assembler.subu(dest, op1, op2); ++ } ++ + void sub32(TrustedImm32 imm, RegisterID dest) + { + if (imm.m_value >= -32767 && imm.m_value <= 32768 +@@ -495,6 +572,11 @@ public: + m_assembler.xorInsn(dest, dest, src); + } + ++ void xor32(RegisterID op1, RegisterID op2, RegisterID dest) ++ { ++ m_assembler.xorInsn(dest, op1, op2); ++ } ++ + void xor32(TrustedImm32 imm, RegisterID dest) + { + if (imm.m_value == -1) { +@@ -510,6 +592,21 @@ public: + m_assembler.xorInsn(dest, dest, immTempRegister); + } + ++ void xor32(TrustedImm32 imm, RegisterID src, RegisterID dest) ++ { ++ if (imm.m_value == -1) { ++ m_assembler.nor(dest, src, MIPSRegisters::zero); ++ return; ++ } ++ ++ /* ++ li immTemp, imm ++ xor dest, dest, immTemp ++ */ ++ move(imm, immTempRegister); ++ m_assembler.xorInsn(dest, src, immTempRegister); ++ } ++ + void sqrtDouble(FPRegisterID src, FPRegisterID dst) + { + m_assembler.sqrtd(dst, src); +@@ -989,6 +1086,44 @@ public: + } + } + ++ void store32(TrustedImm32 imm, BaseIndex address) ++ { ++ if (address.offset >= -32768 && address.offset <= 32767 && !m_fixedWidth) { ++ /* ++ sll addrTemp, address.index, address.scale ++ addu addrTemp, addrTemp, address.base ++ sw src, address.offset(addrTemp) ++ */ ++ m_assembler.sll(addrTempRegister, address.index, address.scale); ++ m_assembler.addu(addrTempRegister, addrTempRegister, address.base); ++ if (!imm.m_value) ++ m_assembler.sw(MIPSRegisters::zero, addrTempRegister, address.offset); ++ else { ++ move(imm, immTempRegister); ++ m_assembler.sw(immTempRegister, addrTempRegister, address.offset); ++ } ++ } else { ++ /* ++ sll addrTemp, address.index, address.scale ++ addu addrTemp, addrTemp, address.base ++ lui immTemp, (address.offset + 0x8000) >> 16 ++ addu addrTemp, addrTemp, immTemp ++ sw src, (address.offset & 0xffff)(at) ++ */ ++ m_assembler.sll(addrTempRegister, address.index, address.scale); ++ m_assembler.addu(addrTempRegister, addrTempRegister, address.base); ++ m_assembler.lui(immTempRegister, (address.offset + 0x8000) >> 16); ++ m_assembler.addu(addrTempRegister, addrTempRegister, immTempRegister); ++ if (!imm.m_value && !m_fixedWidth) ++ m_assembler.sw(MIPSRegisters::zero, addrTempRegister, address.offset); ++ else { ++ move(imm, immTempRegister); ++ m_assembler.sw(immTempRegister, addrTempRegister, address.offset); ++ } ++ } ++ } ++ ++ + void store32(RegisterID src, const void* address) + { + /* +@@ -1336,6 +1471,15 @@ public: + m_fixedWidth = false; + } + ++ void jump(AbsoluteAddress address) ++ { ++ m_fixedWidth = true; ++ load32(address.m_ptr, MIPSRegisters::t9); ++ m_assembler.jr(MIPSRegisters::t9); ++ m_assembler.nop(); ++ m_fixedWidth = false; ++ } ++ + void moveDoubleToInts(FPRegisterID src, RegisterID dest1, RegisterID dest2) + { + m_assembler.vmov(dest1, dest2, src); +@@ -1404,6 +1548,53 @@ public: + return Jump(); + } + ++ Jump branchAdd32(ResultCondition cond, RegisterID op1, RegisterID op2, RegisterID dest) ++ { ++ ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); ++ if (cond == Overflow) { ++ /* ++ move dataTemp, op1 ++ xor cmpTemp, dataTemp, op2 ++ bltz cmpTemp, No_overflow # diff sign bit -> no overflow ++ addu dest, dataTemp, op2 ++ xor cmpTemp, dest, dataTemp ++ bgez cmpTemp, No_overflow # same sign big -> no overflow ++ nop ++ b Overflow ++ nop ++ nop ++ nop ++ nop ++ nop ++ No_overflow: ++ */ ++ move(op1, dataTempRegister); ++ m_assembler.xorInsn(cmpTempRegister, dataTempRegister, op2); ++ m_assembler.bltz(cmpTempRegister, 10); ++ m_assembler.addu(dest, dataTempRegister, op2); ++ m_assembler.xorInsn(cmpTempRegister, dest, dataTempRegister); ++ m_assembler.bgez(cmpTempRegister, 7); ++ m_assembler.nop(); ++ return jump(); ++ } ++ if (cond == Signed) { ++ add32(op1, op2, dest); ++ // Check if dest is negative. ++ m_assembler.slt(cmpTempRegister, dest, MIPSRegisters::zero); ++ return branchNotEqual(cmpTempRegister, MIPSRegisters::zero); ++ } ++ if (cond == Zero) { ++ add32(op1, op2, dest); ++ return branchEqual(dest, MIPSRegisters::zero); ++ } ++ if (cond == NonZero) { ++ add32(op1, op2, dest); ++ return branchNotEqual(dest, MIPSRegisters::zero); ++ } ++ ASSERT(0); ++ return Jump(); ++ } ++ + Jump branchAdd32(ResultCondition cond, TrustedImm32 imm, RegisterID dest) + { + move(imm, immTempRegister); +@@ -1417,6 +1608,111 @@ public: + return branchAdd32(cond, immTempRegister, dest); + } + ++ Jump branchAdd32(ResultCondition cond, TrustedImm32 imm, AbsoluteAddress dest) ++ { ++ ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); ++ if (cond == Overflow) { ++ /* ++ move dataTemp, dest ++ xori cmpTemp, dataTemp, imm ++ bltz cmpTemp, No_overflow # diff sign bit -> no overflow ++ addiu dataTemp, dataTemp, imm ++ move dest, dataTemp ++ xori cmpTemp, dataTemp, imm ++ bgez cmpTemp, No_overflow # same sign big -> no overflow ++ nop ++ b Overflow ++ nop ++ nop ++ nop ++ nop ++ nop ++ No_overflow: ++ */ ++ if (imm.m_value >= -32768 && imm.m_value <= 32767 && !m_fixedWidth) { ++ load32(dest.m_ptr, dataTempRegister); ++ m_assembler.xori(cmpTempRegister, dataTempRegister, imm.m_value); ++ m_assembler.bltz(cmpTempRegister, 10); ++ m_assembler.addiu(dataTempRegister, dataTempRegister, imm.m_value); ++ store32(dataTempRegister, dest.m_ptr); ++ m_assembler.xori(cmpTempRegister, dataTempRegister, imm.m_value); ++ m_assembler.bgez(cmpTempRegister, 7); ++ m_assembler.nop(); ++ } else { ++ load32(dest.m_ptr, dataTempRegister); ++ move(imm, immTempRegister); ++ m_assembler.xorInsn(cmpTempRegister, dataTempRegister, immTempRegister); ++ m_assembler.bltz(cmpTempRegister, 10); ++ m_assembler.addiu(dataTempRegister, dataTempRegister, immTempRegister); ++ store32(dataTempRegister, dest.m_ptr); ++ m_assembler.xori(cmpTempRegister, dataTempRegister, immTempRegister); ++ m_assembler.bgez(cmpTempRegister, 7); ++ m_assembler.nop(); ++ } ++ return jump(); ++ } ++ move(imm, immTempRegister); ++ load32(dest.m_ptr, dataTempRegister); ++ add32(immTempRegister, dataTempRegister); ++ store32(dataTempRegister, dest.m_ptr); ++ if (cond == Signed) { ++ // Check if dest is negative. ++ m_assembler.slt(cmpTempRegister, dataTempRegister, MIPSRegisters::zero); ++ return branchNotEqual(cmpTempRegister, MIPSRegisters::zero); ++ } ++ if (cond == Zero) ++ return branchEqual(dataTempRegister, MIPSRegisters::zero); ++ if (cond == NonZero) ++ return branchNotEqual(dataTempRegister, MIPSRegisters::zero); ++ ASSERT(0); ++ return Jump(); ++ } ++ ++ Jump branchMul32(ResultCondition cond, RegisterID src1, RegisterID src2, RegisterID dest) ++ { ++ ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); ++ if (cond == Overflow) { ++ /* ++ mult src, dest ++ mfhi dataTemp ++ mflo dest ++ sra addrTemp, dest, 31 ++ beq dataTemp, addrTemp, No_overflow # all sign bits (bit 63 to bit 31) are the same -> no overflow ++ nop ++ b Overflow ++ nop ++ nop ++ nop ++ nop ++ nop ++ No_overflow: ++ */ ++ m_assembler.mult(src1, src2); ++ m_assembler.mfhi(dataTempRegister); ++ m_assembler.mflo(dest); ++ m_assembler.sra(addrTempRegister, dest, 31); ++ m_assembler.beq(dataTempRegister, addrTempRegister, 7); ++ m_assembler.nop(); ++ return jump(); ++ } ++ if (cond == Signed) { ++ mul32(src1, src2, dest); ++ // Check if dest is negative. ++ m_assembler.slt(cmpTempRegister, dest, MIPSRegisters::zero); ++ return branchNotEqual(cmpTempRegister, MIPSRegisters::zero); ++ } ++ if (cond == Zero) { ++ mul32(src1, src2, dest); ++ return branchEqual(dest, MIPSRegisters::zero); ++ } ++ if (cond == NonZero) { ++ mul32(src1, src2, dest); ++ return branchNotEqual(dest, MIPSRegisters::zero); ++ } ++ ASSERT(0); ++ return Jump(); ++ } ++ + Jump branchMul32(ResultCondition cond, RegisterID src, RegisterID dest) + { + ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); +@@ -1465,8 +1761,7 @@ public: + Jump branchMul32(ResultCondition cond, TrustedImm32 imm, RegisterID src, RegisterID dest) + { + move(imm, immTempRegister); +- move(src, dest); +- return branchMul32(cond, immTempRegister, dest); ++ return branchMul32(cond, immTempRegister, src, dest); + } + + Jump branchSub32(ResultCondition cond, RegisterID src, RegisterID dest) +@@ -1525,8 +1820,60 @@ public: + Jump branchSub32(ResultCondition cond, RegisterID src, TrustedImm32 imm, RegisterID dest) + { + move(imm, immTempRegister); +- move(src, dest); +- return branchSub32(cond, immTempRegister, dest); ++ return branchSub32(cond, src, immTempRegister, dest); ++ } ++ ++ Jump branchSub32(ResultCondition cond, RegisterID op1, RegisterID op2, RegisterID dest) ++ { ++ ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); ++ if (cond == Overflow) { ++ /* ++ move dataTemp, op1 ++ xor cmpTemp, dataTemp, op2 ++ bgez cmpTemp, No_overflow # same sign bit -> no overflow ++ subu dest, dataTemp, op2 ++ xor cmpTemp, dest, dataTemp ++ bgez cmpTemp, No_overflow # same sign bit -> no overflow ++ nop ++ b Overflow ++ nop ++ nop ++ nop ++ nop ++ nop ++ No_overflow: ++ */ ++ move(op1, dataTempRegister); ++ m_assembler.xorInsn(cmpTempRegister, dataTempRegister, op2); ++ m_assembler.bgez(cmpTempRegister, 10); ++ m_assembler.subu(dest, dataTempRegister, op2); ++ m_assembler.xorInsn(cmpTempRegister, dest, dataTempRegister); ++ m_assembler.bgez(cmpTempRegister, 7); ++ m_assembler.nop(); ++ return jump(); ++ } ++ if (cond == Signed) { ++ sub32(op1, op2, dest); ++ // Check if dest is negative. ++ m_assembler.slt(cmpTempRegister, dest, MIPSRegisters::zero); ++ return branchNotEqual(cmpTempRegister, MIPSRegisters::zero); ++ } ++ if (cond == Zero) { ++ sub32(op1, op2, dest); ++ return branchEqual(dest, MIPSRegisters::zero); ++ } ++ if (cond == NonZero) { ++ sub32(op1, op2, dest); ++ return branchNotEqual(dest, MIPSRegisters::zero); ++ } ++ ASSERT(0); ++ return Jump(); ++ } ++ ++ Jump branchNeg32(ResultCondition cond, RegisterID srcDest) ++ { ++ m_assembler.li(dataTempRegister, -1); ++ return branchMul32(cond, dataTempRegister, srcDest); + } + + Jump branchOr32(ResultCondition cond, RegisterID src, RegisterID dest) +@@ -1578,7 +1925,8 @@ public: + + Call call(RegisterID target) + { +- m_assembler.jalr(target); ++ move(target, MIPSRegisters::t9); ++ m_assembler.jalr(MIPSRegisters::t9); + m_assembler.nop(); + return Call(m_assembler.label(), Call::None); + } +@@ -1822,7 +2170,7 @@ public: + lui immTemp, (address.offset + 0x8000) >> 16 + addu addrTemp, addrTemp, immTemp + lwc1 dest, (address.offset & 0xffff)(at) +- lwc1 dest+4, (address.offset & 0xffff + 4)(at) ++ lwc1 dest+1, (address.offset & 0xffff + 4)(at) + */ + m_assembler.sll(addrTempRegister, address.index, address.scale); + m_assembler.addu(addrTempRegister, addrTempRegister, address.base); +@@ -2009,6 +2357,19 @@ public: + #endif + } + ++ void moveDouble(FPRegisterID src, FPRegisterID dest) ++ { ++ if (src != dest || m_fixedWidth) ++ m_assembler.movd(dest, src); ++ } ++ ++ void swapDouble(FPRegisterID fr1, FPRegisterID fr2) ++ { ++ moveDouble(fr1, fpTempRegister); ++ moveDouble(fr2, fr1); ++ moveDouble(fpTempRegister, fr2); ++ } ++ + void addDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.addd(dest, dest, src); +@@ -2036,6 +2397,11 @@ public: + m_assembler.subd(dest, dest, src); + } + ++ void subDouble(FPRegisterID op1, FPRegisterID op2, FPRegisterID dest) ++ { ++ m_assembler.subd(dest, op1, op2); ++ } ++ + void subDouble(Address src, FPRegisterID dest) + { + loadDouble(src, fpTempRegister); +@@ -2053,11 +2419,32 @@ public: + m_assembler.muld(dest, dest, fpTempRegister); + } + ++ void mulDouble(FPRegisterID op1, FPRegisterID op2, FPRegisterID dest) ++ { ++ m_assembler.muld(dest, op1, op2); ++ } ++ + void divDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.divd(dest, dest, src); + } + ++ void divDouble(FPRegisterID op1, FPRegisterID op2, FPRegisterID dest) ++ { ++ m_assembler.divd(dest, op1, op2); ++ } ++ ++ void divDouble(Address src, FPRegisterID dest) ++ { ++ loadDouble(src, fpTempRegister); ++ m_assembler.divd(dest, dest, fpTempRegister); ++ } ++ ++ void negateDouble(FPRegisterID src, FPRegisterID dest) ++ { ++ m_assembler.negd(dest, src); ++ } ++ + void convertInt32ToDouble(RegisterID src, FPRegisterID dest) + { + m_assembler.mtc1(src, fpTempRegister); +@@ -2117,6 +2504,8 @@ public: + + Jump branchEqual(RegisterID rs, RegisterID rt) + { ++ m_assembler.nop(); ++ m_assembler.nop(); + m_assembler.appendJump(); + m_assembler.beq(rs, rt, 0); + m_assembler.nop(); +@@ -2126,6 +2515,8 @@ public: + + Jump branchNotEqual(RegisterID rs, RegisterID rt) + { ++ m_assembler.nop(); ++ m_assembler.nop(); + m_assembler.appendJump(); + m_assembler.bne(rs, rt, 0); + m_assembler.nop(); +@@ -2192,11 +2583,33 @@ public: + // If the result is not representable as a 32 bit value, branch. + // May also branch for some values that are representable in 32 bits + // (specifically, in this case, INT_MAX 0x7fffffff). +- Jump branchTruncateDoubleToInt32(FPRegisterID src, RegisterID dest) ++ enum BranchTruncateType { BranchIfTruncateFailed, BranchIfTruncateSuccessful }; ++ Jump branchTruncateDoubleToInt32(FPRegisterID src, RegisterID dest, BranchTruncateType branchType = BranchIfTruncateFailed) ++ { ++ m_assembler.truncwd(fpTempRegister, src); ++ m_assembler.mfc1(dest, fpTempRegister); ++ return branch32(branchType == BranchIfTruncateFailed ? Equal : NotEqual, dest, TrustedImm32(0x7fffffff)); ++ } ++ ++ Jump branchTruncateDoubleToUint32(FPRegisterID src, RegisterID dest, BranchTruncateType branchType = BranchIfTruncateFailed) ++ { ++ m_assembler.truncwd(fpTempRegister, src); ++ m_assembler.mfc1(dest, fpTempRegister); ++ return branch32(branchType == BranchIfTruncateFailed ? Equal : NotEqual, dest, TrustedImm32(0)); ++ } ++ ++ // Result is undefined if the value is outside of the integer range. ++ void truncateDoubleToInt32(FPRegisterID src, RegisterID dest) ++ { ++ m_assembler.truncwd(fpTempRegister, src); ++ m_assembler.mfc1(dest, fpTempRegister); ++ } ++ ++ // Result is undefined if src > 2^31 ++ void truncateDoubleToUint32(FPRegisterID src, RegisterID dest) + { + m_assembler.truncwd(fpTempRegister, src); + m_assembler.mfc1(dest, fpTempRegister); +- return branch32(Equal, dest, TrustedImm32(0x7fffffff)); + } + + // Convert 'src' to an integer, and places the resulting 'dest'. +@@ -2218,28 +2631,43 @@ public: + + Jump branchDoubleNonZero(FPRegisterID reg, FPRegisterID scratch) + { +-#if WTF_MIPS_ISA_REV(2) && WTF_MIPS_FP64 +- m_assembler.mtc1(MIPSRegisters::zero, scratch); +- m_assembler.mthc1(MIPSRegisters::zero, scratch); +-#else +- m_assembler.mtc1(MIPSRegisters::zero, scratch); +- m_assembler.mtc1(MIPSRegisters::zero, FPRegisterID(scratch + 1)); +-#endif ++ m_assembler.vmov(scratch, MIPSRegisters::zero, MIPSRegisters::zero); + return branchDouble(DoubleNotEqual, reg, scratch); + } + + Jump branchDoubleZeroOrNaN(FPRegisterID reg, FPRegisterID scratch) + { +-#if WTF_MIPS_ISA_REV(2) && WTF_MIPS_FP64 +- m_assembler.mtc1(MIPSRegisters::zero, scratch); +- m_assembler.mthc1(MIPSRegisters::zero, scratch); +-#else +- m_assembler.mtc1(MIPSRegisters::zero, scratch); +- m_assembler.mtc1(MIPSRegisters::zero, FPRegisterID(scratch + 1)); +-#endif ++ m_assembler.vmov(scratch, MIPSRegisters::zero, MIPSRegisters::zero); + return branchDouble(DoubleEqualOrUnordered, reg, scratch); + } + ++ // Invert a relational condition, e.g. == becomes !=, < becomes >=, etc. ++ static RelationalCondition invert(RelationalCondition cond) ++ { ++ RelationalCondition r; ++ if (cond == Equal) ++ r = NotEqual; ++ else if (cond == NotEqual) ++ r = Equal; ++ else if (cond == Above) ++ r = BelowOrEqual; ++ else if (cond == AboveOrEqual) ++ r = Below; ++ else if (cond == Below) ++ r = AboveOrEqual; ++ else if (cond == BelowOrEqual) ++ r = Above; ++ else if (cond == GreaterThan) ++ r = LessThanOrEqual; ++ else if (cond == GreaterThanOrEqual) ++ r = LessThan; ++ else if (cond == LessThan) ++ r = GreaterThanOrEqual; ++ else if (cond == LessThanOrEqual) ++ r = GreaterThan; ++ return r; ++ } ++ + void nop() + { + m_assembler.nop(); +@@ -2252,12 +2680,12 @@ public: + + static void replaceWithJump(CodeLocationLabel instructionStart, CodeLocationLabel destination) + { +- RELEASE_ASSERT_NOT_REACHED(); ++ MIPSAssembler::replaceWithJump(instructionStart.dataLocation(), destination.dataLocation()); + } + + static ptrdiff_t maxJumpReplacementSize() + { +- RELEASE_ASSERT_NOT_REACHED(); ++ MIPSAssembler::maxJumpReplacementSize(); + return 0; + } + +diff --git a/Source/JavaScriptCore/dfg/DFGAssemblyHelpers.h b/Source/JavaScriptCore/dfg/DFGAssemblyHelpers.h +index fa0f5e0..573d8dc 100644 +--- a/Source/JavaScriptCore/dfg/DFGAssemblyHelpers.h ++++ b/Source/JavaScriptCore/dfg/DFGAssemblyHelpers.h +@@ -93,6 +93,23 @@ public: + } + #endif + ++#if CPU(MIPS) ++ ALWAYS_INLINE void preserveReturnAddressAfterCall(RegisterID reg) ++ { ++ move(returnAddressRegister, reg); ++ } ++ ++ ALWAYS_INLINE void restoreReturnAddressBeforeReturn(RegisterID reg) ++ { ++ move(reg, returnAddressRegister); ++ } ++ ++ ALWAYS_INLINE void restoreReturnAddressBeforeReturn(Address address) ++ { ++ loadPtr(address, returnAddressRegister); ++ } ++#endif ++ + void emitGetFromCallFrameHeaderPtr(JSStack::CallFrameHeaderEntry entry, GPRReg to) + { + loadPtr(Address(GPRInfo::callFrameRegister, entry * sizeof(Register)), to); +@@ -193,7 +210,7 @@ public: + move(TrustedImmPtr(scratchBuffer->activeLengthPtr()), GPRInfo::regT0); + storePtr(TrustedImmPtr(scratchSize), GPRInfo::regT0); + +-#if CPU(X86_64) || CPU(ARM) ++#if CPU(X86_64) || CPU(ARM) || CPU(MIPS) + move(TrustedImmPtr(buffer), GPRInfo::argumentGPR2); + move(TrustedImmPtr(argument), GPRInfo::argumentGPR1); + move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); +diff --git a/Source/JavaScriptCore/dfg/DFGCCallHelpers.h b/Source/JavaScriptCore/dfg/DFGCCallHelpers.h +index 8adde05..3d99f6f 100644 +--- a/Source/JavaScriptCore/dfg/DFGCCallHelpers.h ++++ b/Source/JavaScriptCore/dfg/DFGCCallHelpers.h +@@ -576,6 +576,39 @@ public: + poke(GPRInfo::nonArgGPR0); + } + #endif // CPU(ARM_HARDFP) ++#elif CPU(MIPS) ++ ALWAYS_INLINE void setupArguments(FPRReg arg1) ++ { ++ moveDouble(arg1, FPRInfo::argumentFPR0); ++ } ++ ++ ALWAYS_INLINE void setupArguments(FPRReg arg1, FPRReg arg2) ++ { ++ if (arg2 != FPRInfo::argumentFPR0) { ++ moveDouble(arg1, FPRInfo::argumentFPR0); ++ moveDouble(arg2, FPRInfo::argumentFPR1); ++ } else if (arg1 != FPRInfo::argumentFPR1) { ++ moveDouble(arg2, FPRInfo::argumentFPR1); ++ moveDouble(arg1, FPRInfo::argumentFPR0); ++ } else { ++ // Swap arg1, arg2. ++ swapDouble(FPRInfo::argumentFPR0, FPRInfo::argumentFPR1); ++ } ++ } ++ ++ ALWAYS_INLINE void setupArgumentsWithExecState(FPRReg arg1, GPRReg arg2) ++ { ++ assembler().vmov(GPRInfo::argumentGPR2, GPRInfo::argumentGPR3, arg1); ++ move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); ++ poke(arg2, 4); ++ } ++ ++ ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, FPRReg arg3) ++ { ++ setupStubArguments(arg1, arg2); ++ move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); ++ poke(arg3, 4); ++ } + #else + #error "DFG JIT not supported on this platform." + #endif +@@ -803,119 +836,126 @@ public: + // These methods are suitable for any calling convention that provides for + // exactly 4 argument registers, e.g. ARMv7. + #if NUMBER_OF_ARGUMENT_REGISTERS == 4 ++ ++#if CPU(MIPS) ++#define POKE_ARGUMENT_OFFSET 4 ++#else ++#define POKE_ARGUMENT_OFFSET 0 ++#endif ++ + ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4) + { +- poke(arg4); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, GPRReg arg3, TrustedImm32 arg4) + { +- poke(arg4); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, TrustedImmPtr arg2, TrustedImm32 arg3, GPRReg arg4) + { +- poke(arg4); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, TrustedImmPtr arg2, TrustedImm32 arg3, GPRReg arg4, GPRReg arg5) + { +- poke(arg5, 1); +- poke(arg4); ++ poke(arg5, POKE_ARGUMENT_OFFSET + 1); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, TrustedImm32 arg3, TrustedImm32 arg4) + { +- poke(arg4); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, TrustedImm32 arg2, GPRReg arg3, GPRReg arg4) + { +- poke(arg4); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, GPRReg arg3, TrustedImmPtr arg4) + { +- poke(arg4); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4, GPRReg arg5) + { +- poke(arg5, 1); +- poke(arg4); ++ poke(arg5, POKE_ARGUMENT_OFFSET + 1); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4) + { +- poke(arg4); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, GPRReg arg2, GPRReg arg3, TrustedImmPtr arg4) + { +- poke(arg4); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, GPRReg arg2, TrustedImm32 arg3, TrustedImmPtr arg4) + { +- poke(arg4); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, GPRReg arg2, TrustedImm32 arg3, GPRReg arg4) + { +- poke(arg4); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, TrustedImm32 arg3, GPRReg arg4, GPRReg arg5) + { +- poke(arg5, 1); +- poke(arg4); ++ poke(arg5, POKE_ARGUMENT_OFFSET + 1); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, TrustedImm32 arg3, GPRReg arg4, TrustedImm32 arg5) + { +- poke(arg5, 1); +- poke(arg4); ++ poke(arg5, POKE_ARGUMENT_OFFSET + 1); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4, TrustedImmPtr arg5) + { +- poke(arg5, 1); +- poke(arg4); ++ poke(arg5, POKE_ARGUMENT_OFFSET + 1); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, GPRReg arg2, GPRReg arg3, TrustedImm32 arg4, TrustedImm32 arg5) + { +- poke(arg5, 1); +- poke(arg4); ++ poke(arg5, POKE_ARGUMENT_OFFSET + 1); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, TrustedImm32 arg2, TrustedImm32 arg3, GPRReg arg4, GPRReg arg5) + { +- poke(arg5, 1); +- poke(arg4); ++ poke(arg5, POKE_ARGUMENT_OFFSET + 1); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4, GPRReg arg5) + { +- poke(arg5, 1); +- poke(arg4); ++ poke(arg5, POKE_ARGUMENT_OFFSET + 1); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + +diff --git a/Source/JavaScriptCore/dfg/DFGFPRInfo.h b/Source/JavaScriptCore/dfg/DFGFPRInfo.h +index 17aaa7d..e18ec06 100644 +--- a/Source/JavaScriptCore/dfg/DFGFPRInfo.h ++++ b/Source/JavaScriptCore/dfg/DFGFPRInfo.h +@@ -164,6 +164,74 @@ public: + + #endif + ++#if CPU(MIPS) ++ ++class FPRInfo { ++public: ++ typedef FPRReg RegisterType; ++ static const unsigned numberOfRegisters = 6; ++ ++ // Temporary registers. ++ static const FPRReg fpRegT0 = MIPSRegisters::f0; ++ static const FPRReg fpRegT1 = MIPSRegisters::f4; ++ static const FPRReg fpRegT2 = MIPSRegisters::f6; ++ static const FPRReg fpRegT3 = MIPSRegisters::f8; ++ static const FPRReg fpRegT4 = MIPSRegisters::f10; ++ static const FPRReg fpRegT5 = MIPSRegisters::f18; ++ ++ static const FPRReg returnValueFPR = MIPSRegisters::f0; ++ ++ static const FPRReg argumentFPR0 = MIPSRegisters::f12; ++ static const FPRReg argumentFPR1 = MIPSRegisters::f14; ++ ++ static FPRReg toRegister(unsigned index) ++ { ++ static const FPRReg registerForIndex[numberOfRegisters] = { ++ fpRegT0, fpRegT1, fpRegT2, fpRegT3, fpRegT4, fpRegT5 }; ++ ++ ASSERT(index < numberOfRegisters); ++ return registerForIndex[index]; ++ } ++ ++ static unsigned toIndex(FPRReg reg) ++ { ++ ASSERT(reg != InvalidFPRReg); ++ ASSERT(reg < 20); ++ static const unsigned indexForRegister[20] = { ++ 0, InvalidIndex, InvalidIndex, InvalidIndex, ++ 1, InvalidIndex, 2, InvalidIndex, ++ 3, InvalidIndex, 4, InvalidIndex, ++ InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex, ++ InvalidIndex, InvalidIndex, 5, InvalidIndex, ++ }; ++ unsigned result = indexForRegister[reg]; ++ ASSERT(result != InvalidIndex); ++ return result; ++ } ++ ++ static const char* debugName(FPRReg reg) ++ { ++ ASSERT(reg != InvalidFPRReg); ++ ASSERT(reg < 32); ++ static const char* nameForRegister[32] = { ++ "f0", "f1", "f2", "f3", ++ "f4", "f5", "f6", "f7", ++ "f8", "f9", "f10", "f11", ++ "f12", "f13", "f14", "f15" ++ "f16", "f17", "f18", "f19" ++ "f20", "f21", "f22", "f23" ++ "f24", "f25", "f26", "f27" ++ "f28", "f29", "f30", "f31" ++ }; ++ return nameForRegister[reg]; ++ } ++private: ++ ++ static const unsigned InvalidIndex = 0xffffffff; ++}; ++ ++#endif ++ + typedef RegisterBank::iterator fpr_iterator; + + } } // namespace JSC::DFG +diff --git a/Source/JavaScriptCore/dfg/DFGGPRInfo.h b/Source/JavaScriptCore/dfg/DFGGPRInfo.h +index 3d07556..aa634cd 100644 +--- a/Source/JavaScriptCore/dfg/DFGGPRInfo.h ++++ b/Source/JavaScriptCore/dfg/DFGGPRInfo.h +@@ -461,6 +461,73 @@ private: + + #endif + ++#if CPU(MIPS) ++#define NUMBER_OF_ARGUMENT_REGISTERS 4 ++ ++class GPRInfo { ++public: ++ typedef GPRReg RegisterType; ++ static const unsigned numberOfRegisters = 6; ++ ++ // Temporary registers. ++ static const GPRReg regT0 = MIPSRegisters::v0; ++ static const GPRReg regT1 = MIPSRegisters::v1; ++ static const GPRReg regT2 = MIPSRegisters::t4; ++ static const GPRReg regT3 = MIPSRegisters::t5; ++ static const GPRReg regT4 = MIPSRegisters::t6; ++ static const GPRReg regT5 = MIPSRegisters::t7; ++ // These registers match the baseline JIT. ++ static const GPRReg cachedResultRegister = regT0; ++ static const GPRReg cachedResultRegister2 = regT1; ++ static const GPRReg callFrameRegister = MIPSRegisters::s0; ++ // These constants provide the names for the general purpose argument & return value registers. ++ static const GPRReg argumentGPR0 = MIPSRegisters::a0; ++ static const GPRReg argumentGPR1 = MIPSRegisters::a1; ++ static const GPRReg argumentGPR2 = MIPSRegisters::a2; ++ static const GPRReg argumentGPR3 = MIPSRegisters::a3; ++ static const GPRReg nonArgGPR0 = regT2; ++ static const GPRReg nonArgGPR1 = regT3; ++ static const GPRReg nonArgGPR2 = regT4; ++ static const GPRReg returnValueGPR = regT0; ++ static const GPRReg returnValueGPR2 = regT1; ++ static const GPRReg nonPreservedNonReturnGPR = regT5; ++ ++ static GPRReg toRegister(unsigned index) ++ { ++ ASSERT(index < numberOfRegisters); ++ static const GPRReg registerForIndex[numberOfRegisters] = { regT0, regT1, regT2, regT3, regT4, regT5 }; ++ return registerForIndex[index]; ++ } ++ ++ static unsigned toIndex(GPRReg reg) ++ { ++ ASSERT(reg != InvalidGPRReg); ++ ASSERT(reg < 16); ++ static const unsigned indexForRegister[16] = { InvalidIndex, InvalidIndex, 0, 1, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex, 2, 3, 4, 5 }; ++ unsigned result = indexForRegister[reg]; ++ ASSERT(result != InvalidIndex); ++ return result; ++ } ++ ++ static const char* debugName(GPRReg reg) ++ { ++ ASSERT(reg != InvalidGPRReg); ++ ASSERT(reg < 16); ++ static const char* nameForRegister[16] = { ++ "zero", "at", "v0", "v1", ++ "a0", "a1", "a2", "a3", ++ "t0", "t1", "t2", "t3", ++ "t4", "t5", "t6", "t7" ++ }; ++ return nameForRegister[reg]; ++ } ++private: ++ ++ static const unsigned InvalidIndex = 0xffffffff; ++}; ++ ++#endif ++ + typedef RegisterBank::iterator gpr_iterator; + + } } // namespace JSC::DFG +diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h +index ea33f38..247274b 100644 +--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h ++++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h +@@ -1241,7 +1241,7 @@ public: + + // EncodedJSValue in JSVALUE32_64 is a 64-bit integer. When being compiled in ARM EABI, it must be aligned even-numbered register (r0, r2 or [sp]). + // To avoid assemblies from using wrong registers, let's occupy r1 or r3 with a dummy argument when necessary. +-#if COMPILER_SUPPORTS(EABI) && CPU(ARM) ++#if (COMPILER_SUPPORTS(EABI) && CPU(ARM)) || CPU(MIPS) + #define EABI_32BIT_DUMMY_ARG TrustedImm32(0), + #else + #define EABI_32BIT_DUMMY_ARG +@@ -1691,7 +1691,7 @@ public: + } + #endif + +-#if !defined(NDEBUG) && !CPU(ARM) ++#if !defined(NDEBUG) && !CPU(ARM) && !CPU(MIPS) + void prepareForExternalCall() + { + // We're about to call out to a "native" helper function. The helper +diff --git a/Source/JavaScriptCore/jit/JSInterfaceJIT.h b/Source/JavaScriptCore/jit/JSInterfaceJIT.h +index 7fdeaf0..48ad6b2 100644 +--- a/Source/JavaScriptCore/jit/JSInterfaceJIT.h ++++ b/Source/JavaScriptCore/jit/JSInterfaceJIT.h +@@ -125,6 +125,10 @@ namespace JSC { + static const RegisterID cachedResultRegister = MIPSRegisters::v0; + static const RegisterID firstArgumentRegister = MIPSRegisters::a0; + ++#if ENABLE(VALUE_PROFILER) ++ static const RegisterID bucketCounterRegister = MIPSRegisters::s3; ++#endif ++ + // regT0 must be v0 for returning a 32-bit value. + static const RegisterID regT0 = MIPSRegisters::v0; + +diff --git a/Source/JavaScriptCore/runtime/JSGlobalData.h b/Source/JavaScriptCore/runtime/JSGlobalData.h +index 5d47ab9..c02f336 100644 +--- a/Source/JavaScriptCore/runtime/JSGlobalData.h ++++ b/Source/JavaScriptCore/runtime/JSGlobalData.h +@@ -141,14 +141,18 @@ namespace JSC { + return result; + } + +- static size_t allocationSize(size_t bufferSize) { return sizeof(size_t) + bufferSize; } ++ static size_t allocationSize(size_t bufferSize) { return sizeof(ScratchBuffer) + bufferSize; } + void setActiveLength(size_t activeLength) { m_activeLength = activeLength; } + size_t activeLength() const { return m_activeLength; }; + size_t* activeLengthPtr() { return &m_activeLength; }; + void* dataBuffer() { return m_buffer; } + + size_t m_activeLength; ++#if CPU(MIPS) && (defined WTF_MIPS_ARCH_REV && WTF_MIPS_ARCH_REV == 2) ++ void* m_buffer[0] __attribute__((aligned(8))); ++#else + void* m_buffer[0]; ++#endif + }; + #if COMPILER(MSVC) + #pragma warning(pop) +diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h +index 1698247..2d90359 100644 +--- a/Source/WTF/wtf/Platform.h ++++ b/Source/WTF/wtf/Platform.h +@@ -818,6 +818,10 @@ + #if CPU(ARM_TRADITIONAL) + #define ENABLE_DFG_JIT 1 + #endif ++/* Enable the DFG JIT on MIPS. */ ++#if CPU(MIPS) ++#define ENABLE_DFG_JIT 1 ++#endif + #endif + + /* If the jit is not available, enable the LLInt C Loop: */ +-- +1.8.3.2 + diff --git a/package/webkit/webkit-0008-support-bison-3.0.patch b/package/webkit/webkit-0008-support-bison-3.0.patch new file mode 100644 index 0000000000..c081b207ee --- /dev/null +++ b/package/webkit/webkit-0008-support-bison-3.0.patch @@ -0,0 +1,22 @@ +ANGLE doesn't build with bison 3.0 + +Author: allan.jensen@digia.com +​https://bugs.webkit.org/show_bug.cgi?id=119798 +Reviewed by Antti Koivisto. +Make glslang.y compatible with bison 3.0, by using %lex-param +to set YYLEX_PARAM and getting rid of useless YYID macro. + +From upstream: http://trac.webkit.org/changeset/154109 +[Arnout: adapted to our older webkit version] +Signed-off-by: Arnout Vandecaeppelle (Essensium/Mind) +--- +Index: trunk/Source/ThirdParty/ANGLE/src/compiler/glslang.y +=================================================================== +--- trunk/Source/ThirdParty/ANGLE/src/compiler/glslang.y (revision 154108) ++++ trunk/Source/ThirdParty/ANGLE/src/compiler/glslang.y (revision 154109) +@@ -48,4 +48,5 @@ + %pure-parser + %parse-param {TParseContext* context} ++%lex-param {YYLEX_PARAM} + + %union { diff --git a/package/webkit/webkit-fix-build-issue-with-old-gtk.patch b/package/webkit/webkit-fix-build-issue-with-old-gtk.patch deleted file mode 100644 index 2b20bae6dd..0000000000 --- a/package/webkit/webkit-fix-build-issue-with-old-gtk.patch +++ /dev/null @@ -1,22 +0,0 @@ -The WebKit code conditionally calls getRootCoords() when the Gtk -version is old (i.e < 2.17.3), but fails to declare the prototype of -this function (which is implemented after its call site). This build -failure has probably been missed due to the fact that not many people -try to compile recent WebKit versions with old Gtk. - -Signed-off-by: Thomas Petazzoni - -Index: webkit-1.2.3/WebKitTools/DumpRenderTree/gtk/EventSender.cpp -=================================================================== ---- webkit-1.2.3.orig/WebKitTools/DumpRenderTree/gtk/EventSender.cpp 2010-07-19 20:42:27.000000000 +0200 -+++ webkit-1.2.3/WebKitTools/DumpRenderTree/gtk/EventSender.cpp 2010-07-19 20:42:57.000000000 +0200 -@@ -86,6 +86,9 @@ - static void sendOrQueueEvent(GdkEvent event); - static void dispatchEvent(GdkEvent event); - static guint getStateFlags(); -+#if !GTK_CHECK_VERSION(2,17,3) -+static void getRootCoords(GtkWidget* view, int* rootX, int* rootY); -+#endif - - static JSValueRef getDragModeCallback(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) - { diff --git a/package/webkit/webkit-fix-compilation-on-DirectFB.patch b/package/webkit/webkit-fix-compilation-on-DirectFB.patch deleted file mode 100644 index 256f8a1700..0000000000 --- a/package/webkit/webkit-fix-compilation-on-DirectFB.patch +++ /dev/null @@ -1,144 +0,0 @@ -From 91a2bf4c3a21720a27223ba293ba90f58c349959 Mon Sep 17 00:00:00 2001 -From: Lionel Landwerlin -Date: Sun, 11 Apr 2010 14:38:57 +0200 -Subject: [PATCH] Fix compilation with DirectFB - -Signed-off-by: Lionel Landwerlin ---- - GNUmakefile.am | 2 ++ - WebCore/plugins/PluginView.h | 6 +++--- - WebCore/plugins/gtk/PluginViewGtk.cpp | 17 ++++++++--------- - 3 files changed, 13 insertions(+), 12 deletions(-) - -diff --git a/GNUmakefile.am b/GNUmakefile.am -index 3bdfe53..8626bbb 100644 ---- a/GNUmakefile.am -+++ b/GNUmakefile.am -@@ -122,8 +122,10 @@ corekit_cppflags += \ - - # For the Gtk port we want to use XP_UNIX both in X11 and Mac - if !TARGET_WIN32 -+if !TARGET_DIRECTFB - corekit_cppflags += -DXP_UNIX - endif -+endif - - # Default compiler flags - global_cflags += \ -diff --git a/WebCore/plugins/PluginView.h b/WebCore/plugins/PluginView.h -index 21a25f6..8116864 100644 ---- a/WebCore/plugins/PluginView.h -+++ b/WebCore/plugins/PluginView.h -@@ -22,7 +22,7 @@ - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - #ifndef PluginView_h -@@ -312,7 +312,7 @@ namespace WebCore { - bool m_haveInitialized; - bool m_isWaitingToStart; - --#if defined(XP_UNIX) -+#if defined(XP_UNIX) || PLATFORM(DIRECTFB) - bool m_needsXEmbed; - #endif - -@@ -340,7 +340,7 @@ public: - - private: - --#if defined(XP_UNIX) || OS(SYMBIAN) -+#if defined(XP_UNIX) || OS(SYMBIAN) || PLATFORM(DIRECTFB) - void setNPWindowIfNeeded(); - #elif defined(XP_MACOSX) - NP_CGContext m_npCgContext; -diff --git a/WebCore/plugins/gtk/PluginViewGtk.cpp b/WebCore/plugins/gtk/PluginViewGtk.cpp -index 8de63e0..039a845 100644 ---- a/WebCore/plugins/gtk/PluginViewGtk.cpp -+++ b/WebCore/plugins/gtk/PluginViewGtk.cpp -@@ -23,7 +23,7 @@ - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - #include "config.h" -@@ -45,6 +45,7 @@ - #include "Image.h" - #include "KeyboardEvent.h" - #include "MouseEvent.h" -+#include "NotImplemented.h" - #include "Page.h" - #include "PlatformKeyboardEvent.h" - #include "PlatformMouseEvent.h" -@@ -137,7 +138,7 @@ void PluginView::updatePluginWidget() - if (!m_isWindowed) { - if (m_drawable) - XFreePixmap(GDK_DISPLAY(), m_drawable); -- -+ - m_drawable = XCreatePixmap(GDK_DISPLAY(), getRootWindow(m_parentFrame.get()), - m_windowRect.width(), m_windowRect.height(), - ((NPSetWindowCallbackStruct*)m_npWindow.ws_info)->depth); -@@ -571,7 +572,7 @@ NPError PluginView::handlePostReadFile(Vector& buffer, uint32 len, const c - - //FIXME - read the file data into buffer - FILE* fileHandle = fopen((filename.utf8()).data(), "r"); -- -+ - if (fileHandle == 0) - return NPERR_FILE_NOT_FOUND; - -@@ -706,6 +707,7 @@ void PluginView::forceRedraw() - gtk_widget_queue_draw(m_parentFrame->view()->hostWindow()->platformPageClient()); - } - -+#if defined(XP_UNIX) - static Display* getPluginDisplay() - { - // The plugin toolkit might have a different X connection open. Since we're -@@ -713,14 +715,9 @@ static Display* getPluginDisplay() - // plugins, so we can return that. We might want to add other implementations here - // later. - --#if defined(XP_UNIX) - return GDK_DISPLAY_XDISPLAY(gdk_display_get_default()); --#else -- return 0; --#endif - } - --#if defined(XP_UNIX) - static void getVisualAndColormap(int depth, Visual** visual, Colormap* colormap) - { - *visual = 0; -@@ -794,9 +791,9 @@ bool PluginView::platformStart() - } - - if (m_isWindowed) { --#if defined(XP_UNIX) - GtkWidget* pageClient = m_parentFrame->view()->hostWindow()->platformPageClient(); - -+#if defined(XP_UNIX) - if (m_needsXEmbed) { - // If our parent is not anchored the startup process will - // fail miserably for XEmbed plugins a bit later on when -@@ -817,7 +814,9 @@ bool PluginView::platformStart() - #endif - } else { - setPlatformWidget(0); -+#if defined(XP_UNIX) - m_pluginDisplay = getPluginDisplay(); -+#endif - } - - show(); --- -1.7.0.4 - diff --git a/package/webkit/webkit-fix-pool.patch b/package/webkit/webkit-fix-pool.patch deleted file mode 100644 index 5a66a82296..0000000000 --- a/package/webkit/webkit-fix-pool.patch +++ /dev/null @@ -1,67 +0,0 @@ -Description: Fixup pool and add sparc support -Nixed from gentoo - ---- webkit-1.2.1.orig/JavaScriptCore/wtf/ListHashSet.h -+++ webkit-1.2.1/JavaScriptCore/wtf/ListHashSet.h -@@ -127,7 +127,7 @@ namespace WTF { - : m_freeList(pool()) - , m_isDoneWithInitialFreeList(false) - { -- memset(m_pool.pool, 0, sizeof(m_pool.pool)); -+ memset(m_pool, 0, sizeof(m_pool)); - } - - Node* allocate() -@@ -171,7 +171,7 @@ namespace WTF { - } - - private: -- Node* pool() { return reinterpret_cast(m_pool.pool); } -+ Node* pool() { return reinterpret_cast(m_pool); } - Node* pastPool() { return pool() + m_poolSize; } - - bool inPool(Node* node) -@@ -182,10 +182,7 @@ namespace WTF { - Node* m_freeList; - bool m_isDoneWithInitialFreeList; - static const size_t m_poolSize = 256; -- union { -- char pool[sizeof(Node) * m_poolSize]; -- double forAlignment; -- } m_pool; -+ uint32_t m_pool[(sizeof(Node) * m_poolSize + sizeof(uint32_t) - 1) / sizeof(uint32_t)]; - }; - - template struct ListHashSetNode { ---- webkit-1.2.1.orig/WebCore/platform/text/AtomicString.cpp -+++ webkit-1.2.1/WebCore/platform/text/AtomicString.cpp -@@ -103,9 +103,9 @@ static inline bool equal(StringImpl* str - if (string->length() != length) - return false; - -+#if CPU(ARM) || CPU(SPARC) || CPU(SH4) - // FIXME: perhaps we should have a more abstract macro that indicates when - // going 4 bytes at a time is unsafe --#if CPU(ARM) || CPU(SH4) - const UChar* stringCharacters = string->characters(); - for (unsigned i = 0; i != length; ++i) { - if (*stringCharacters++ != *characters++) ---- webkit-1.2.1.orig/WebCore/platform/text/StringHash.h -+++ webkit-1.2.1/WebCore/platform/text/StringHash.h -@@ -54,13 +54,13 @@ namespace WebCore { - - // FIXME: perhaps we should have a more abstract macro that indicates when - // going 4 bytes at a time is unsafe --#if CPU(ARM) || CPU(SH4) -+#if CPU(ARM) || CPU(SPARC) || CPU(SH4) - const UChar* aChars = a->characters(); - const UChar* bChars = b->characters(); -- for (unsigned i = 0; i != aLength; ++i) { -+ for (unsigned i = 0; i != aLength; ++i) - if (*aChars++ != *bChars++) - return false; -- } -+ - return true; - #else - /* Do it 4-bytes-at-a-time on architectures where it's safe */ diff --git a/package/webkit/webkit-pthread_getattr_np.patch b/package/webkit/webkit-pthread_getattr_np.patch deleted file mode 100644 index b71c8789e6..0000000000 --- a/package/webkit/webkit-pthread_getattr_np.patch +++ /dev/null @@ -1,79 +0,0 @@ -Patch WebKit because pthread_getattr_np is not implemented in uClibc - -Define UCLIBC_USE_PROC_SELF_MAPS etc. as a workaround for uClibc. This -code was in the qtoipa webkit but appears to have been removed from -more recent versions of webkit. - -See: http://bugreports.qt.nokia.com/browse/QTBUG-6551 -Credit for fix: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=545066#545066 - -Signed-off-by: Paul Jones - -Index: webkit-1.2.3/JavaScriptCore/runtime/Collector.cpp -=================================================================== ---- webkit-1.2.3.orig/JavaScriptCore/runtime/Collector.cpp 2010-07-22 17:16:19.000000000 +0200 -+++ webkit-1.2.3/JavaScriptCore/runtime/Collector.cpp 2010-07-22 17:25:02.000000000 +0200 -@@ -75,6 +75,18 @@ - #endif - #include - -+#if defined(__UCLIBC__) -+// versions of uClibc 0.9.31 and below do not have -+// pthread_getattr_np or pthread_attr_getstack. -+#if __UCLIBC_MAJOR__ == 0 && \ -+ (__UCLIBC_MINOR__ < 9 || \ -+ (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ <= 31)) -+#define UCLIBC_USE_PROC_SELF_MAPS 1 -+#include -+extern int *__libc_stack_end; -+#endif -+#endif -+ - #if OS(SOLARIS) - #include - #else -@@ -610,6 +622,36 @@ - get_thread_info(find_thread(NULL), &threadInfo); - return threadInfo.stack_end; - #elif OS(UNIX) -+#ifdef UCLIBC_USE_PROC_SELF_MAPS -+ // Read /proc/self/maps and locate the line whose address -+ // range contains __libc_stack_end. -+ FILE *file = fopen("/proc/self/maps", "r"); -+ if (!file) -+ return 0; -+ __fsetlocking(file, FSETLOCKING_BYCALLER); -+ char *line = NULL; -+ size_t lineLen = 0; -+ while (!feof_unlocked(file)) { -+ if (getdelim(&line, &lineLen, '\n', file) <= 0) -+ break; -+ long from; -+ long to; -+ if (sscanf (line, "%lx-%lx", &from, &to) != 2) -+ continue; -+ if (from <= (long)__libc_stack_end && (long)__libc_stack_end < to) { -+ fclose(file); -+ free(line); -+#ifdef _STACK_GROWS_UP -+ return (void *)from; -+#else -+ return (void *)to; -+#endif -+ } -+ } -+ fclose(file); -+ free(line); -+ return 0; -+#else - static void* stackBase = 0; - static size_t stackSize = 0; - static pthread_t stackThread; -@@ -631,6 +673,7 @@ - stackThread = thread; - } - return static_cast(stackBase) + stackSize; -+#endif - #elif OS(WINCE) - if (g_stackBase) - return g_stackBase; diff --git a/package/webkit/webkit.mk b/package/webkit/webkit.mk index 6ab609bf26..21b535ffe1 100644 --- a/package/webkit/webkit.mk +++ b/package/webkit/webkit.mk @@ -1,26 +1,51 @@ -############################################################# +################################################################################ # # webkit # -############################################################# +################################################################################ -WEBKIT_VERSION = 1.2.6 -WEBKIT_SITE = http://www.webkitgtk.org +WEBKIT_VERSION = 1.11.5 +WEBKIT_SITE = http://www.webkitgtk.org/releases +WEBKIT_SOURCE = webkitgtk-$(WEBKIT_VERSION).tar.xz WEBKIT_INSTALL_STAGING = YES -WEBKIT_DEPENDENCIES = host-flex host-gperf icu libcurl libxml2 libxslt \ - libgtk2 sqlite enchant libsoup jpeg libgail -WEBKIT_CONF_ENV = ac_cv_path_icu_config=$(STAGING_DIR)/usr/bin/icu-config +WEBKIT_DEPENDENCIES = host-ruby host-flex host-bison host-gperf enchant harfbuzz \ + icu jpeg libcurl libgail libsecret libsoup libxml2 libxslt libgtk2 sqlite webp -ifeq ($(BR2_PACKAGE_XORG7),y) - WEBKIT_CONF_OPT += --with-target=x11 - WEBKIT_DEPENDENCIES += xserver_xorg-server xlib_libXt -endif +# webkit-disable-tests.patch changes configure.ac therefore autoreconf required +WEBKIT_AUTORECONF = YES +WEBKIT_AUTORECONF_OPT = -I $(@D)/Source/autotools -ifeq ($(BR2_PACKAGE_DIRECTFB),y) - WEBKIT_CONF_OPT += --with-target=directfb - WEBKIT_DEPENDENCIES += directfb -endif +# parallel make install deadlocks with make 3.81 +WEBKIT_INSTALL_STAGING_OPT = -j1 DESTDIR=$(STAGING_DIR) install +WEBKIT_INSTALL_TARGET_OPT = -j1 DESTDIR=$(TARGET_DIR) install -WEBKIT_CONF_OPT += --disable-video +# Does not build and it's disabled by default +# in newer releases +define DISABLE_INDEXED_DATABASE + $(SED) '/ENABLE_INDEXED_DATABASE/s:1:0:' \ + $(@D)/Source/WebCore/GNUmakefile.features.am +endef -$(eval $(call AUTOTARGETS,package,webkit)) +WEBKIT_PRE_CONFIGURE_HOOKS += DISABLE_INDEXED_DATABASE + +# Give explicit path to icu-config, and silence gazillions of warnings +# with recent gcc versions. +WEBKIT_CONF_ENV = ac_cv_path_icu_config=$(STAGING_DIR)/usr/bin/icu-config \ + CFLAGS="$(TARGET_CFLAGS) -Wno-cast-align -Wno-sign-compare" \ + CXXFLAGS="$(TARGET_CXXFLAGS) -Wno-cast-align -Wno-sign-compare" \ + AR_FLAGS="cru" + +WEBKIT_CONF_OPT += \ + --with-gtk=2.0 \ + --disable-geolocation \ + --disable-webkit2 \ + --disable-glibtest \ + --disable-video \ + --disable-gtk-doc-html \ + --disable-tests + +# Xorg Dependencies +WEBKIT_CONF_OPT += --with-target=x11 +WEBKIT_DEPENDENCIES += xlib_libXt + +$(eval $(autotools-package)) diff --git a/package/webp/Config.in b/package/webp/Config.in new file mode 100644 index 0000000000..e385b5ee4f --- /dev/null +++ b/package/webp/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_WEBP + bool "webp" + help + WebP is a new image format that provides lossless and lossy + compression for images on the web + + https://developers.google.com/speed/webp/ diff --git a/package/webp/webp.mk b/package/webp/webp.mk new file mode 100644 index 0000000000..15acd8ad51 --- /dev/null +++ b/package/webp/webp.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# webp +# +################################################################################ + +WEBP_VERSION = 0.3.1 +WEBP_SOURCE = libwebp-$(WEBP_VERSION).tar.gz +WEBP_SITE = https://webp.googlecode.com/files +WEBP_LICENSE = BSD-3c +WEBP_LICENSE_FILES = COPYING +WEBP_INSTALL_STAGING = YES + +WEBP_CONF_OPT += \ + --with-jpegincludedir=$(STAGING_DIR)/usr/include \ + --with-jpeglibdir=$(STAGING_DIR)/usr/lib \ + --with-tiffincludedir=$(STAGING_DIR)/usr/include \ + --with-tifflibdir=$(STAGING_DIR)/usr/lib + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +WEBP_DEPENDENCIES += libpng +WEBP_CONF_ENV += ac_cv_path_LIBPNG_CONFIG=$(STAGING_DIR)/usr/bin/libpng-config +else +WEBP_CONF_ENV += ac_cv_path_LIBPNG_CONFIG=/bin/false +endif + +WEBP_DEPENDENCIES += $(if $(BR2_PACKAGE_JPEG),jpeg) +WEBP_DEPENDENCIES += $(if $(BR2_PACKAGE_TIFF),tiff) + +$(eval $(autotools-package)) diff --git a/package/webrtc-audio-processing/Config.in b/package/webrtc-audio-processing/Config.in new file mode 100644 index 0000000000..f228bc7c18 --- /dev/null +++ b/package/webrtc-audio-processing/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING + bool "webrtc-audio-processing" + depends on BR2_arm || BR2_i386 || BR2_x86_64 + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + help + AudioProcessing library based on Google's implementation of + WebRTC. + + http://freedesktop.org/software/pulseaudio/webrtc-audio-processing/ + +comment "webrtc-audio-processing needs a toolchain w/ C++, threads" + depends on BR2_arm || BR2_i386 || BR2_x86_64 + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/webrtc-audio-processing/webrtc-audio-processing.mk b/package/webrtc-audio-processing/webrtc-audio-processing.mk new file mode 100644 index 0000000000..9f76cba5e8 --- /dev/null +++ b/package/webrtc-audio-processing/webrtc-audio-processing.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# webrtc-audio-processing +# +################################################################################ + +WEBRTC_AUDIO_PROCESSING_VERSION = 0.1 +WEBRTC_AUDIO_PROCESSING_SOURCE = webrtc-audio-processing-$(WEBRTC_AUDIO_PROCESSING_VERSION).tar.xz +WEBRTC_AUDIO_PROCESSING_SITE = http://freedesktop.org/software/pulseaudio/webrtc-audio-processing/ +WEBRTC_AUDIO_PROCESSING_INSTALL_STAGING = YES + +ifeq ($(BR2_SOFT_FLOAT),y) +WEBRTC_AUDIO_PROCESSING_CONF_OPT += --with-ns-mode=fixed +endif + +$(eval $(autotools-package)) diff --git a/package/weston/Config.in b/package/weston/Config.in new file mode 100644 index 0000000000..247efc8883 --- /dev/null +++ b/package/weston/Config.in @@ -0,0 +1,51 @@ +comment "weston needs udev and a toolchain w/ threads" + depends on !BR2_avr32 + depends on !BR2_PACKAGE_UDEV || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_WESTON + bool "weston" + select BR2_PACKAGE_WAYLAND + select BR2_PACKAGE_LIBXKBCOMMON + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_CAIRO_PNG + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_MTDEV + depends on BR2_PACKAGE_UDEV + depends on !BR2_avr32 # wayland + depends on BR2_TOOLCHAIN_HAS_THREADS # wayland + # Runtime dependency + select BR2_PACKAGE_XKEYBOARD_CONFIG + # Make sure at least one compositor is selected. + select BR2_PACKAGE_WESTON_FBDEV if !BR2_PACKAGE_WESTON_HAS_COMPOSITOR + help + Weston is the reference implementation of a Wayland + compositor, and a useful compositor in its own right. + Weston has various backends that lets it run on Linux kernel + modesetting and evdev input as well as under X11. + + http://wayland.freedesktop.org/ + +if BR2_PACKAGE_WESTON + +# Helper to make sure at least one compositor is selected. +config BR2_PACKAGE_WESTON_HAS_COMPOSITOR + bool + +config BR2_PACKAGE_WESTON_FBDEV + bool "fbdev compositor" + +comment "RPi compositor needs a toolchain w/ C++, largefile, threads" + depends on BR2_arm + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_WESTON_RPI + bool "RPi compositor" + depends on BR2_arm # rpi-userland + depends on BR2_INSTALL_LIBSTDCPP # rpi-userland + depends on BR2_LARGEFILE # rpi-userland + depends on BR2_TOOLCHAIN_HAS_THREADS # rpi-userland + select BR2_PACKAGE_RPI_USERLAND + select BR2_PACKAGE_WESTON_HAS_COMPOSITOR + +endif diff --git a/package/weston/weston-0000-dont-leak-fd-on-launcher-error.patch b/package/weston/weston-0000-dont-leak-fd-on-launcher-error.patch new file mode 100644 index 0000000000..0929d010b1 --- /dev/null +++ b/package/weston/weston-0000-dont-leak-fd-on-launcher-error.patch @@ -0,0 +1,77 @@ +commit 4a74d5a4a45423752105f865a8310ce878b1790a +Author: Kristian Høgsberg +Date: Wed Oct 9 11:19:11 2013 -0700 + + launcher: Don't leak tty file descriptor on error + +--- +Signed-off-by: "Yann E. MORIN" + +diff --git a/src/launcher-util.c b/src/launcher-util.c +index d90271f..8ab61f1 100644 +--- a/src/launcher-util.c ++++ b/src/launcher-util.c +@@ -275,7 +275,7 @@ setup_tty(struct weston_launcher *launcher, int tty) + weston_log("%s not a vt\n", tty_device); + weston_log("if running weston from ssh, " + "use --tty to specify a tty\n"); +- return -1; ++ goto err_close; + } + + ret = ioctl(launcher->tty, KDGETMODE, &kd_mode); +@@ -286,7 +286,7 @@ setup_tty(struct weston_launcher *launcher, int tty) + if (kd_mode != KD_TEXT) { + weston_log("%s is already in graphics mode, " + "is another display server running?\n", tty_device); +- return -1; ++ goto err_close; + } + + ret = ioctl(launcher->tty, VT_ACTIVATE, minor(buf.st_rdev)); +@@ -297,19 +297,19 @@ setup_tty(struct weston_launcher *launcher, int tty) + + if (ioctl(launcher->tty, KDGKBMODE, &launcher->kb_mode)) { + weston_log("failed to read keyboard mode: %m\n"); +- return -1; ++ goto err_close; + } + + if (ioctl(launcher->tty, KDSKBMUTE, 1) && + ioctl(launcher->tty, KDSKBMODE, K_OFF)) { + weston_log("failed to set K_OFF keyboard mode: %m\n"); +- return -1; ++ goto err_close; + } + + ret = ioctl(launcher->tty, KDSETMODE, KD_GRAPHICS); + if (ret) { + weston_log("failed to set KD_GRAPHICS mode on tty: %m\n"); +- return -1; ++ goto err_close; + } + + mode.mode = VT_PROCESS; +@@ -317,16 +317,20 @@ setup_tty(struct weston_launcher *launcher, int tty) + mode.acqsig = SIGUSR1; + if (ioctl(launcher->tty, VT_SETMODE, &mode) < 0) { + weston_log("failed to take control of vt handling\n"); +- return -1; ++ goto err_close; + } + + loop = wl_display_get_event_loop(launcher->compositor->wl_display); + launcher->vt_source = + wl_event_loop_add_signal(loop, SIGUSR1, vt_handler, launcher); + if (!launcher->vt_source) +- return -1; ++ goto err_close; + + return 0; ++ ++ err_close: ++ close(launcher->tty); ++ return -1; + } + + int diff --git a/package/weston/weston-0001-enable-build-without-libdrm.patch b/package/weston/weston-0001-enable-build-without-libdrm.patch new file mode 100644 index 0000000000..9d1162350a --- /dev/null +++ b/package/weston/weston-0001-enable-build-without-libdrm.patch @@ -0,0 +1,45 @@ +commit 0b12db5f519a347ce0e1d5262e0cb2e9e2cc6990 +Author: Tomeu Vizoso +Date: Wed Oct 9 11:30:57 2013 +0200 + + launcher: Wrap drmGetMagic and drmAuthMagic so we can build without libdrm + +--- +Signed-off-by: "Yann E. MORIN" + +diff --git a/src/launcher-util.c b/src/launcher-util.c +index 6b6a5f3..35a5698 100644 +--- a/src/launcher-util.c ++++ b/src/launcher-util.c +@@ -80,9 +80,19 @@ drm_set_master(int drm_fd) + return drmSetMaster(drm_fd); + return -EBADF; + } ++static int ++drm_check_master(int drm_fd) ++{ ++ drm_magic_t magic; ++ if (drm_fd != -1) ++ return drmGetMagic(drm_fd, &magic) != 0 || ++ drmAuthMagic(drm_fd, magic) != 0; ++ return 0; ++} + #else + static int drm_drop_master(int drm_fd) {return 0;} + static int drm_set_master(int drm_fd) {return 0;} ++static int drm_check_master(int drm_fd) {return 1;} + #endif + + int +@@ -110,10 +120,8 @@ weston_launcher_open(struct weston_launcher *launcher, + } + + if (major(s.st_rdev) == DRM_MAJOR) { +- drm_magic_t magic; + launcher->drm_fd = fd; +- if (drmGetMagic(fd, &magic) != 0 || +- drmAuthMagic(fd, magic) != 0) { ++ if (!drm_check_master(fd)) { + weston_log("drm fd not master\n"); + close(fd); + return -1; diff --git a/package/weston/weston-0002-fbdev-fix-compilation-without-EGL.patch b/package/weston/weston-0002-fbdev-fix-compilation-without-EGL.patch new file mode 100644 index 0000000000..501822b7bb --- /dev/null +++ b/package/weston/weston-0002-fbdev-fix-compilation-without-EGL.patch @@ -0,0 +1,29 @@ +commit 9acd374822022793b09427d67ea4033915343dd8 +Author: Kristian Høgsberg +Date: Fri Oct 11 15:25:42 2013 -0700 + + fbdev: Fix compilation without EGL + + We have to duplicate #defines and typedefs for the EGL types and constants + we use in gl-renderer.h so we can compile the fbdev backend without EGL. + + https://bugs.freedesktop.org/show_bug.cgi?id=70392 + +--- +Signed-off-by: "Yann E. MORIN" + +To be noted: the bug referenced above was opened by me, +and quickly fixed during an IRC session. Nice! :-) + +diff --git a/src/gl-renderer.h b/src/gl-renderer.h +index 4919a1e..d16ade2 100644 +--- a/src/gl-renderer.h ++++ b/src/gl-renderer.h +@@ -56,6 +56,7 @@ typedef void *EGLDisplay; + typedef void *EGLSurface; + typedef intptr_t EGLNativeDisplayType; + typedef intptr_t EGLNativeWindowType; ++#define EGL_DEFAULT_DISPLAY NULL + + static const EGLint gl_renderer_opaque_attribs[]; + static const EGLint gl_renderer_alpha_attribs[]; diff --git a/package/weston/weston-0003-dont-build-tests.patch b/package/weston/weston-0003-dont-build-tests.patch new file mode 100644 index 0000000000..a8ace515e0 --- /dev/null +++ b/package/weston/weston-0003-dont-build-tests.patch @@ -0,0 +1,18 @@ +Makefile: do not build tests + +Tests are broken if no EGL support is available. + +Reported-by: Peter Korsgaard +Signed-off-by: "Yann E. MORIN" +diff -durN weston-1.3.0.orig/Makefile.am weston-1.3.0/Makefile.am +--- weston-1.3.0.orig/Makefile.am 2013-08-20 20:15:19.000000000 +0200 ++++ weston-1.3.0/Makefile.am 2013-10-14 23:08:12.016392097 +0200 +@@ -2,7 +2,7 @@ + wcap_subdir = wcap + endif + +-SUBDIRS = shared src clients data protocol tests $(wcap_subdir) man ++SUBDIRS = shared src clients data protocol $(wcap_subdir) man + + DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install + diff --git a/package/weston/weston.mk b/package/weston/weston.mk new file mode 100644 index 0000000000..1682fdf1c4 --- /dev/null +++ b/package/weston/weston.mk @@ -0,0 +1,49 @@ +################################################################################ +# +# weston +# +################################################################################ + +WESTON_VERSION = 1.3.0 +WESTON_SITE = http://wayland.freedesktop.org/releases/ +WESTON_SOURCE = weston-$(WESTON_VERSION).tar.xz +WESTON_LICENSE = MIT +WESTON_LICENSE_FILES = COPYING + +WESTON_DEPENDENCIES = host-pkgconf wayland libxkbcommon pixman libpng \ + jpeg mtdev udev cairo + +# We're touching Makefile.am +WESTON_AUTORECONF = YES + +WESTON_CONF_OPT = \ + --disable-egl \ + --disable-simple-egl-clients \ + --disable-xwayland \ + --disable-x11-compositor \ + --disable-drm-compositor \ + --disable-wayland-compositor \ + --disable-headless-compositor \ + --disable-weston-launch \ + --disable-colord \ + --disable-libunwind + +ifeq ($(BR2_PACKAGE_WESTON_FBDEV),y) +WESTON_CONF_OPT += --enable-fbdev-compositor +else +WESTON_CONF_OPT += --disable-fbdev-compositor +endif + +ifeq ($(BR2_PACKAGE_WESTON_RPI),y) +WESTON_DEPENDENCIES += rpi-userland +WESTON_CONF_OPT += --enable-rpi-compositor \ + --disable-resize-optimization \ + --disable-setuid-install \ + --disable-xwayland-test \ + --disable-simple-egl-clients \ + WESTON_NATIVE_BACKEND=rpi-backend.so +else +WESTON_CONF_OPT += --disable-rpi-compositor +endif # BR2_PACKAGE_WESTON_RPI + +$(eval $(autotools-package)) diff --git a/package/wget/0001-Fix-error-in-texi2pod-intriduced-with-Perl-5.18.patch b/package/wget/0001-Fix-error-in-texi2pod-intriduced-with-Perl-5.18.patch new file mode 100644 index 0000000000..cf423a377c --- /dev/null +++ b/package/wget/0001-Fix-error-in-texi2pod-intriduced-with-Perl-5.18.patch @@ -0,0 +1,26 @@ +From 7f43748544f26008d0dd337704f02a6ed3200aaf Mon Sep 17 00:00:00 2001 +From: Dave Reisner +Date: Mon, 17 Jun 2013 23:31:46 +0530 +Subject: [PATCH] Fix error in texi2pod intriduced with Perl 5.18 + +--- + doc/ChangeLog | 5 +++++ + doc/texi2pod.pl | 2 +- + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/doc/texi2pod.pl b/doc/texi2pod.pl +index 86c4b18..9db6de1 100755 +--- a/doc/texi2pod.pl ++++ b/doc/texi2pod.pl +@@ -291,7 +291,7 @@ while(<$inf>) { + if (defined $1) { + my $thing = $1; + if ($ic =~ /\@asis/) { +- $_ = "\n=item $thing\n"; ++ $_ = "\n=item C<$thing>\n"; + } else { + # Entity escapes prevent munging by the <> processing below. + $_ = "\n=item $ic\<$thing\>\n"; +-- +1.8.4.rc3 + diff --git a/package/wget/Config.in b/package/wget/Config.in index 172359c24a..26a2019d47 100644 --- a/package/wget/Config.in +++ b/package/wget/Config.in @@ -1,10 +1,13 @@ config BR2_PACKAGE_WGET bool "wget" + # fork() + depends on BR2_USE_MMU depends on BR2_USE_WCHAR help Network utility to retrieve files from http, https and ftp. http://www.gnu.org/software/wget/ -comment "wget requires a toolchain with WCHAR support" +comment "wget needs a toolchain w/ wchar" + depends on BR2_USE_MMU depends on !BR2_USE_WCHAR diff --git a/package/wget/wget.mk b/package/wget/wget.mk index 23c82af4f7..429fbdaef1 100644 --- a/package/wget/wget.mk +++ b/package/wget/wget.mk @@ -1,15 +1,36 @@ -############################################################# +################################################################################ # # wget # -############################################################# +################################################################################ -WGET_VERSION = 1.12 +WGET_VERSION = 1.14 +WGET_SOURCE = wget-$(WGET_VERSION).tar.xz WGET_SITE = $(BR2_GNU_MIRROR)/wget +WGET_LICENSE = GPLv3+ +WGET_LICENSE_FILES = COPYING + +# Prefer full-blown wget over busybox +ifeq ($(BR2_PACKAGE_BUSYBOX),y) + WGET_DEPENDENCIES += busybox +endif + +ifeq ($(BR2_PACKAGE_GNUTLS),y) + WGET_CONF_OPT += --with-ssl=gnutls \ + --with-libgnutls-prefix=$(STAGING_DIR) + WGET_DEPENDENCIES += gnutls +endif ifeq ($(BR2_PACKAGE_OPENSSL),y) - WGET_CONF_OPT += --with-ssl --with-libssl-prefix=$(STAGING_DIR) + WGET_CONF_OPT += --with-ssl=openssl --with-libssl-prefix=$(STAGING_DIR) WGET_DEPENDENCIES += openssl endif -$(eval $(call AUTOTARGETS,package,wget)) +# --with-ssl is default +ifneq ($(BR2_PACKAGE_GNUTLS),y) +ifneq ($(BR2_PACKAGE_OPENSSL),y) + WGET_CONF_OPT += --without-ssl +endif +endif + +$(eval $(autotools-package)) diff --git a/package/whetstone/whetstone.mk b/package/whetstone/whetstone.mk index d47fbcda72..f9318d8404 100644 --- a/package/whetstone/whetstone.mk +++ b/package/whetstone/whetstone.mk @@ -1,13 +1,17 @@ -############################################################# +################################################################################ # # whetstone # -############################################################# +################################################################################ WHETSTONE_VERSION = 1.2 WHETSTONE_SOURCE = whetstone.c WHETSTONE_SITE = http://www.netlib.org/benchmark/ +define WHETSTONE_EXTRACT_CMDS + cp $(DL_DIR)/$($(PKG)_SOURCE) $(@D)/ +endef + define WHETSTONE_BUILD_CMDS $(TARGET_CONFIGURE_OPTS) $(MAKE) LDLIBS="-lm" -C $(@D) whetstone endef @@ -24,10 +28,4 @@ define WHETSTONE_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/bin/whetstone endef -$(eval $(call GENTARGETS,package,whetstone)) - -$(BUILD_DIR)/whetstone-$(WHETSTONE_VERSION)/.stamp_extracted: - @$(call MESSAGE,"Extracting") - $(Q)mkdir -p $(@D) - $(Q)cp $(DL_DIR)/$($(PKG)_SOURCE) $(@D)/ - $(Q)touch $@ +$(eval $(generic-package)) diff --git a/package/which/which.mk b/package/which/which.mk index 3bdfaca505..019c479164 100644 --- a/package/which/which.mk +++ b/package/which/which.mk @@ -1,13 +1,12 @@ -############################################################# +################################################################################ # # which # -############################################################# -WHICH_VERSION:=2.20 -WHICH_SOURCE:=which-$(WHICH_VERSION).tar.gz -WHICH_SITE:=http://www.xs4all.nl/~carlo17/which/ -WHICH_AUTORECONF:=NO -WHICH_INSTALL_STAGING:=NO -WHICH_INSTALL_TARGET:=YES +################################################################################ -$(eval $(call AUTOTARGETS,package,which)) +WHICH_VERSION = 2.20 +WHICH_SITE = http://carlo17.home.xs4all.nl/which +WHICH_LICENSE = GPLv3+ +WHICH_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/wipe/Config.in b/package/wipe/Config.in index a053a72e94..0241c13715 100644 --- a/package/wipe/Config.in +++ b/package/wipe/Config.in @@ -4,4 +4,4 @@ config BR2_PACKAGE_WIPE Wipe is a little command for securely erasing files from magnetic media. It compiles under various unix platforms. - http://lambda-diode.com/software/wipe + http://wipe.sourceforge.net diff --git a/package/wipe/wipe-dont-force-lfs.patch b/package/wipe/wipe-dont-force-lfs.patch new file mode 100644 index 0000000000..08916e24a8 --- /dev/null +++ b/package/wipe/wipe-dont-force-lfs.patch @@ -0,0 +1,16 @@ +LARGEFILE support shouldn't be forced into CFLAGS + +Signed-off-by: Gustavo Zacarias + +diff -Nura wipe-2.3.1/configure.in wipe-2.3.1-lfs/configure.in +--- wipe-2.3.1/configure.in 2009-06-15 22:55:11.000000000 -0300 ++++ wipe-2.3.1-lfs/configure.in 2012-03-05 11:25:30.463221948 -0300 +@@ -91,7 +91,7 @@ + test "$with_efence" = "yes" && temp2CFLAGS="$debugCFLAGS" && LIBS="-lefence" + + DEBUG="$debugCFLAGS $fullCFLAGS" +-fullCFLAGS="$temp2CFLAGS $fullCFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" ++fullCFLAGS="$temp2CFLAGS $fullCFLAGS" + CFLAGS="$checkCFLAGS -D__USE_BSD -D_BSD_SOURCE -D__USE_POSIX -D_POSIX_SOURCE -D_POSIX_MAPPED_FILES" + + dnl Checks for libraries. diff --git a/package/wipe/wipe.mk b/package/wipe/wipe.mk index d2273894aa..c3d4f67303 100644 --- a/package/wipe/wipe.mk +++ b/package/wipe/wipe.mk @@ -1,23 +1,15 @@ -############################################################# +################################################################################ # # wipe # -############################################################# +################################################################################ -WIPE_VERSION = 0.22 -WIPE_SITE = http://lambda-diode.com/resources/wipe -WIPE_CFLAGS = $(TARGET_CFLAGS) -DHAVE_DEV_URANDOM -DHAVE_OSYNC -DHAVE_STRCASECMP -DHAVE_RANDOM -DSYNC_WAITS_FOR_SYNC -DFIND_DEVICE_SIZE_BY_BLKGETSIZE - -ifeq ($(BR2_LARGEFILE),y) -WIPE_CFLAGS += -DSIXTYFOUR -endif - -define WIPE_BUILD_CMDS - # Fix busted git version logic - $(SED) "s/which/!which/" $(@D)/Makefile - $(MAKE) -C $(@D) linux CC_LINUX="$(TARGET_CC)" \ - CCO_LINUX="$(WIPE_CFLAGS)" -endef +WIPE_VERSION = 2.3.1 +WIPE_SITE = http://downloads.sourceforge.net/project/wipe/wipe/$(WIPE_VERSION) +WIPE_SOURCE = wipe-$(WIPE_VERSION).tar.bz2 +WIPE_AUTORECONF = YES +WIPE_LICENSE = GPLv2+ +WIPE_LICENSE_FILES = LICENSE define WIPE_INSTALL_TARGET_CMDS $(INSTALL) -D $(@D)/wipe $(TARGET_DIR)/usr/bin/wipe @@ -29,8 +21,4 @@ define WIPE_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/share/man/man1/wipe.1 endef -define WIPE_CLEAN_CMDS - $(MAKE) -C $(@D) clean -endef - -$(eval $(call GENTARGETS,package,wipe)) +$(eval $(autotools-package)) diff --git a/package/wireless-regdb/Config.in b/package/wireless-regdb/Config.in new file mode 100644 index 0000000000..d9c7b8d2d1 --- /dev/null +++ b/package/wireless-regdb/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_WIRELESS_REGDB + bool "wireless-regdb" + help + Wireless regulatory database. + + Wireless regulatory database for CRDA. The database lists the + allowed radio frequencies for each local jurisdiction. + + http://linuxwireless.org/en/developers/Regulatory diff --git a/package/wireless-regdb/wireless-regdb.mk b/package/wireless-regdb/wireless-regdb.mk new file mode 100644 index 0000000000..2681090928 --- /dev/null +++ b/package/wireless-regdb/wireless-regdb.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# wireless-regdb +# +################################################################################ + +WIRELESS_REGDB_VERSION = 2013.02.13 +WIRELESS_REGDB_SOURCE = wireless-regdb-$(WIRELESS_REGDB_VERSION).tar.xz +WIRELESS_REGDB_SITE = http://kernel.org/pub/software/network/wireless-regdb +WIRELESS_REGDB_LICENSE = ISC +WIRELESS_REGDB_LICENSE_FILES = LICENSE + +define WIRELESS_REGDB_INSTALL_TARGET_CMDS + $(INSTALL) -m 644 -D -T $(@D)/regulatory.bin \ + $(TARGET_DIR)/usr/lib/crda/regulatory.bin + $(INSTALL) -m 644 -D -T $(@D)/linville.key.pub.pem \ + $(TARGET_DIR)/etc/wireless-regdb/pubkeys/linville.key.pub.pem +endef + +$(eval $(generic-package)) diff --git a/package/wireless_tools/wireless_tools.mk b/package/wireless_tools/wireless_tools.mk index d8358ba09b..e614ec4bc2 100644 --- a/package/wireless_tools/wireless_tools.mk +++ b/package/wireless_tools/wireless_tools.mk @@ -1,12 +1,14 @@ -############################################################# +################################################################################ # # wireless_tools # -############################################################# +################################################################################ WIRELESS_TOOLS_VERSION = 29 WIRELESS_TOOLS_SITE = http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux WIRELESS_TOOLS_SOURCE = wireless_tools.$(WIRELESS_TOOLS_VERSION).tar.gz +WIRELESS_TOOLS_LICENSE = GPLv2 +WIRELESS_TOOLS_LICENSE_FILES = COPYING WIRELESS_TOOLS_INSTALL_STAGING = YES WIRELESS_TOOLS_BUILD_TARGETS = iwmulticall @@ -18,7 +20,7 @@ ifeq ($(BR2_PACKAGE_WIRELESS_TOOLS_LIB),y) WIRELESS_TOOLS_INSTALL_TARGETS += install-dynamic define WIRELESS_TOOLS_INSTALL_STAGING_CMDS - $(MAKE) -C $(@D) PREFIX="$(STAGING_DIR)" install-dynamic + $(MAKE) -C $(@D) PREFIX="$(STAGING_DIR)" LDCONFIG=/bin/true install-dynamic $(MAKE) -C $(@D) PREFIX="$(STAGING_DIR)/usr" install-hdr endef @@ -34,7 +36,7 @@ define WIRELESS_TOOLS_CLEAN_CMDS endef define WIRELESS_TOOLS_INSTALL_TARGET_CMDS - $(MAKE) -C $(@D) PREFIX="$(TARGET_DIR)" $(WIRELESS_TOOLS_INSTALL_TARGETS) + $(MAKE) -C $(@D) PREFIX="$(TARGET_DIR)" LDCONFIG=/bin/true $(WIRELESS_TOOLS_INSTALL_TARGETS) $(MAKE) -C $(@D) INSTALL_MAN="$(TARGET_DIR)/usr/share/man" install-man endef @@ -42,4 +44,4 @@ define WIRELESS_TOOLS_UNINSTALL_TARGET_CMDS $(MAKE) -C $(@D) PREFIX="$(TARGET_DIR)" uninstall endef -$(eval $(call GENTARGETS,package,wireless_tools)) +$(eval $(generic-package)) diff --git a/package/wireshark/Config.in b/package/wireshark/Config.in new file mode 100644 index 0000000000..f559c220cd --- /dev/null +++ b/package/wireshark/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_WIRESHARK + bool "wireshark" + select BR2_PACKAGE_LIBPCAP + select BR2_PACKAGE_LIBGCRYPT + select BR2_PACKAGE_LIBGLIB2 + depends on BR2_USE_MMU # fork(), glib2 + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + help + Network traffic sniffer and protocol decoder. Currently only tshark, + the console interface, is enabled. + + http://www.wireshark.org + +comment "wireshark needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/wireshark/wireshark.mk b/package/wireshark/wireshark.mk new file mode 100644 index 0000000000..9f968fda08 --- /dev/null +++ b/package/wireshark/wireshark.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# wireshark +# +################################################################################ + +WIRESHARK_VERSION = 1.8.11 +WIRESHARK_SOURCE = wireshark-$(WIRESHARK_VERSION).tar.bz2 +WIRESHARK_SITE = http://www.wireshark.org/download/src/all-versions +WIRESHARK_LICENSE = wireshark license +WIRESHARK_LICENSE_FILES = COPYING +WIRESHARK_DEPENDENCIES = libpcap libgcrypt libglib2 +WIRESHARK_AUTORECONF = YES +WIRESHARK_CONF_ENV = LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config \ + ac_cv_path_PCAP_CONFIG=$(STAGING_DIR)/usr/bin/pcap-config + +# wireshark adds -I$includedir to CFLAGS, causing host/target headers mixup. +# Work around it by pointing includedir at staging +WIRESHARK_CONF_OPT = --disable-wireshark --without-krb5 --disable-usr-local \ + --enable-static=no --with-gnutls=no --with-libsmi=no \ + --includedir=$(STAGING_DIR)/usr/include + +$(eval $(autotools-package)) diff --git a/package/wpa_supplicant/Config.in b/package/wpa_supplicant/Config.in index 8ac2576f83..8b0b366936 100644 --- a/package/wpa_supplicant/Config.in +++ b/package/wpa_supplicant/Config.in @@ -5,35 +5,53 @@ config BR2_PACKAGE_WPA_SUPPLICANT http://hostap.epitest.fi/wpa_supplicant/ +if BR2_PACKAGE_WPA_SUPPLICANT + config BR2_PACKAGE_WPA_SUPPLICANT_EAP bool "Enable EAP" - depends on BR2_PACKAGE_WPA_SUPPLICANT help Enable support for EAP. config BR2_PACKAGE_WPA_SUPPLICANT_CLI bool "Install wpa_cli binary" - depends on BR2_PACKAGE_WPA_SUPPLICANT help Install wpa_cli command line utility config BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE bool "Install wpa_passphrase binary" - depends on BR2_PACKAGE_WPA_SUPPLICANT help Install wpa_passphrase command line utility config BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT bool "Enable support for soft AP" - depends on BR2_PACKAGE_WPA_SUPPLICANT help With this option enabled, wpa_supplicant can act as access point. This can be used for open and WPA2-Personal networks (optionally, with WPS); this links in parts of hostapd functionality into wpa_supplicant. +config BR2_PACKAGE_WPA_SUPPLICANT_DBUS_OLD + bool "Enable support for old DBus control interface" + depends on BR2_PACKAGE_DBUS + help + Enable support for old DBus control interface + (fi.epitest.hostap.WPASupplicant). + +config BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW + bool "Enable support for new DBus control interface" + depends on BR2_PACKAGE_DBUS + help + Enable support for new DBus control interface (fi.w1.wpa_supplicant1). + +config BR2_PACKAGE_WPA_SUPPLICANT_DBUS_INTROSPECTION + bool "Introspection support" + depends on BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW + help + Add introspection support for new DBus control interface. + config BR2_PACKAGE_WPA_SUPPLICANT_WPS bool "Enable support for WPS" - depends on BR2_PACKAGE_WPA_SUPPLICANT help Enable support for Wi-Fi Protected Setup (WPS) + +endif diff --git a/package/wpa_supplicant/wpa_supplicant-0.7.3-dbus-emit-property.patch b/package/wpa_supplicant/wpa_supplicant-0.7.3-dbus-emit-property.patch deleted file mode 100644 index 4c50020036..0000000000 --- a/package/wpa_supplicant/wpa_supplicant-0.7.3-dbus-emit-property.patch +++ /dev/null @@ -1,61 +0,0 @@ -From b80b5639935d37b95d00f86b57f2844a9c775f57 Mon Sep 17 00:00:00 2001 -From: Dan Williams -Date: Fri, 17 Dec 2010 15:56:01 +0200 -Subject: [PATCH] dbus: Emit property changed events when adding/removing BSSes - -The supplicant was not emitting property changed events when the BSSs -property changed. - -Signed-off-by: Dan Williams -(cherry picked from commit 1e6288df6b07a353a9246b77e0de2a840b5f2c72) ---- - wpa_supplicant/dbus/dbus_new.c | 6 ++++++ - wpa_supplicant/dbus/dbus_new.h | 1 + - 2 files changed, 7 insertions(+), 0 deletions(-) - -diff --git a/wpa_supplicant/dbus/dbus_new.c b/wpa_supplicant/dbus/dbus_new.c -index bdfbbac..c66640a 100644 ---- a/wpa_supplicant/dbus/dbus_new.c -+++ b/wpa_supplicant/dbus/dbus_new.c -@@ -691,6 +691,10 @@ void wpas_dbus_signal_prop_changed(struct wpa_supplicant *wpa_s, - wpas_dbus_getter_current_network; - prop = "CurrentNetwork"; - break; -+ case WPAS_DBUS_PROP_BSSS: -+ getter = (WPADBusPropertyAccessor) wpas_dbus_getter_bsss; -+ prop = "BSSs"; -+ break; - default: - wpa_printf(MSG_ERROR, "dbus: %s: Unknown Property value %d", - __func__, property); -@@ -1199,6 +1203,7 @@ int wpas_dbus_unregister_bss(struct wpa_supplicant *wpa_s, - } - - wpas_dbus_signal_bss_removed(wpa_s, bss_obj_path); -+ wpas_dbus_signal_prop_changed(wpa_s, WPAS_DBUS_PROP_BSSS); - - return 0; - } -@@ -1263,6 +1268,7 @@ int wpas_dbus_register_bss(struct wpa_supplicant *wpa_s, - } - - wpas_dbus_signal_bss_added(wpa_s, bss_obj_path); -+ wpas_dbus_signal_prop_changed(wpa_s, WPAS_DBUS_PROP_BSSS); - - return 0; - -diff --git a/wpa_supplicant/dbus/dbus_new.h b/wpa_supplicant/dbus/dbus_new.h -index 80ea98c..9cdefcb 100644 ---- a/wpa_supplicant/dbus/dbus_new.h -+++ b/wpa_supplicant/dbus/dbus_new.h -@@ -30,6 +30,7 @@ enum wpas_dbus_prop { - WPAS_DBUS_PROP_STATE, - WPAS_DBUS_PROP_CURRENT_BSS, - WPAS_DBUS_PROP_CURRENT_NETWORK, -+ WPAS_DBUS_PROP_BSSS, - }; - - enum wpas_dbus_bss_prop { --- -1.7.4-rc1 - diff --git a/package/wpa_supplicant/wpa_supplicant-0.7.3-ht40-secondary.patch b/package/wpa_supplicant/wpa_supplicant-0.7.3-ht40-secondary.patch deleted file mode 100644 index 7664f03606..0000000000 --- a/package/wpa_supplicant/wpa_supplicant-0.7.3-ht40-secondary.patch +++ /dev/null @@ -1,52 +0,0 @@ -From dea50507861b79f522c70500fe978072f143af8f Mon Sep 17 00:00:00 2001 -From: Jouni Malinen -Date: Fri, 12 Nov 2010 18:31:56 +0200 -Subject: [PATCH] AP: Verify that HT40 secondary channel is supported - -Refuse to enable HT40 mode AP unless both the primary and secondary -channels are enabled for AP use. -(cherry picked from commit 8ea3dd21d2e8b760612af0c7b6a3bb5b89ba7304) ---- - src/ap/hw_features.c | 26 ++++++++++++++++++++++++++ - 1 files changed, 26 insertions(+), 0 deletions(-) - -diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c -index 0159c72..7fc5b83 100644 ---- a/src/ap/hw_features.c -+++ b/src/ap/hw_features.c -@@ -642,6 +642,32 @@ int hostapd_select_hw_mode(struct hostapd_iface *iface) - break; - } - } -+ if (ok && iface->conf->secondary_channel) { -+ int sec_ok = 0; -+ int sec_chan = iface->conf->channel + -+ iface->conf->secondary_channel * 4; -+ for (j = 0; j < iface->current_mode->num_channels; j++) { -+ struct hostapd_channel_data *chan = -+ &iface->current_mode->channels[j]; -+ if (!(chan->flag & HOSTAPD_CHAN_DISABLED) && -+ (chan->chan == sec_chan)) { -+ sec_ok = 1; -+ break; -+ } -+ } -+ if (!sec_ok) { -+ hostapd_logger(iface->bss[0], NULL, -+ HOSTAPD_MODULE_IEEE80211, -+ HOSTAPD_LEVEL_WARNING, -+ "Configured HT40 secondary channel " -+ "(%d) not found from the channel list " -+ "of current mode (%d) %s", -+ sec_chan, iface->current_mode->mode, -+ hostapd_hw_mode_txt( -+ iface->current_mode->mode)); -+ ok = 0; -+ } -+ } - if (iface->conf->channel == 0) { - /* TODO: could request a scan of neighboring BSSes and select - * the channel automatically */ --- -1.7.4-rc1 - diff --git a/package/wpa_supplicant/wpa_supplicant-0.7.3-nl80211-cipher-suites.patch b/package/wpa_supplicant/wpa_supplicant-0.7.3-nl80211-cipher-suites.patch deleted file mode 100644 index 231498e994..0000000000 --- a/package/wpa_supplicant/wpa_supplicant-0.7.3-nl80211-cipher-suites.patch +++ /dev/null @@ -1,89 +0,0 @@ -From d0f3f451f0002339ad75b43e79f1322f2e2e4ed1 Mon Sep 17 00:00:00 2001 -From: Jouni Malinen -Date: Mon, 13 Dec 2010 21:08:53 +0200 -Subject: [PATCH] nl80211: Set cipher suites when using user space SME - -Previously, pairwise and group cipher suites were configured only -when kernel SME (nl80211 connect API) was used. However, mac80211 -needs this information even in the user space SME case for one -thing: to disable HT when TKIP/WEP is used. Add -NL80211_ATTR_CIPHER_SUITES_PAIRWISE to fix this special case with -user space SME. This allows mac80211 to disable HT properly when -the AP is configured with configuration that is not allowed. -(cherry picked from commit aca016054885c17d58c41888698761f2e1ce2b39) ---- - src/drivers/driver_nl80211.c | 44 ++++++++++++++++++++++++++++++++++++++++++ - wpa_supplicant/sme.c | 2 + - 2 files changed, 46 insertions(+), 0 deletions(-) - -diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c -index 364158c..fb75c2e 100644 ---- a/src/drivers/driver_nl80211.c -+++ b/src/drivers/driver_nl80211.c -@@ -3940,6 +3940,50 @@ static int wpa_driver_nl80211_associate( - NLA_PUT(msg, NL80211_ATTR_IE, params->wpa_ie_len, - params->wpa_ie); - -+ if (params->pairwise_suite != CIPHER_NONE) { -+ int cipher; -+ -+ switch (params->pairwise_suite) { -+ case CIPHER_WEP40: -+ cipher = WLAN_CIPHER_SUITE_WEP40; -+ break; -+ case CIPHER_WEP104: -+ cipher = WLAN_CIPHER_SUITE_WEP104; -+ break; -+ case CIPHER_CCMP: -+ cipher = WLAN_CIPHER_SUITE_CCMP; -+ break; -+ case CIPHER_TKIP: -+ default: -+ cipher = WLAN_CIPHER_SUITE_TKIP; -+ break; -+ } -+ wpa_printf(MSG_DEBUG, " * pairwise=0x%x\n", cipher); -+ NLA_PUT_U32(msg, NL80211_ATTR_CIPHER_SUITES_PAIRWISE, cipher); -+ } -+ -+ if (params->group_suite != CIPHER_NONE) { -+ int cipher; -+ -+ switch (params->group_suite) { -+ case CIPHER_WEP40: -+ cipher = WLAN_CIPHER_SUITE_WEP40; -+ break; -+ case CIPHER_WEP104: -+ cipher = WLAN_CIPHER_SUITE_WEP104; -+ break; -+ case CIPHER_CCMP: -+ cipher = WLAN_CIPHER_SUITE_CCMP; -+ break; -+ case CIPHER_TKIP: -+ default: -+ cipher = WLAN_CIPHER_SUITE_TKIP; -+ break; -+ } -+ wpa_printf(MSG_DEBUG, " * group=0x%x\n", cipher); -+ NLA_PUT_U32(msg, NL80211_ATTR_CIPHER_SUITE_GROUP, cipher); -+ } -+ - #ifdef CONFIG_IEEE80211W - if (params->mgmt_frame_protection == MGMT_FRAME_PROTECTION_REQUIRED) - NLA_PUT_U32(msg, NL80211_ATTR_USE_MFP, NL80211_MFP_REQUIRED); -diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c -index 5604e97..878bbf0 100644 ---- a/wpa_supplicant/sme.c -+++ b/wpa_supplicant/sme.c -@@ -333,6 +333,8 @@ void sme_associate(struct wpa_supplicant *wpa_s, enum wpas_mode mode, - params.wpa_ie = wpa_s->sme.assoc_req_ie_len ? - wpa_s->sme.assoc_req_ie : NULL; - params.wpa_ie_len = wpa_s->sme.assoc_req_ie_len; -+ params.pairwise_suite = cipher_suite2driver(wpa_s->pairwise_cipher); -+ params.group_suite = cipher_suite2driver(wpa_s->group_cipher); - #ifdef CONFIG_IEEE80211R - if (auth_type == WLAN_AUTH_FT && wpa_s->sme.ft_ies) { - params.wpa_ie = wpa_s->sme.ft_ies; --- -1.7.4-rc1 - diff --git a/package/wpa_supplicant/wpa_supplicant.conf b/package/wpa_supplicant/wpa_supplicant.conf new file mode 100644 index 0000000000..1994a6c739 --- /dev/null +++ b/package/wpa_supplicant/wpa_supplicant.conf @@ -0,0 +1,6 @@ +ctrl_interface=/var/run/wpa_supplicant +ap_scan=1 + +network={ + key_mgmt=NONE +} diff --git a/package/wpa_supplicant/wpa_supplicant.mk b/package/wpa_supplicant/wpa_supplicant.mk index 7702126dcc..4c031d1cd0 100644 --- a/package/wpa_supplicant/wpa_supplicant.mk +++ b/package/wpa_supplicant/wpa_supplicant.mk @@ -1,91 +1,136 @@ -############################################################# +################################################################################ # # wpa_supplicant # -############################################################# +################################################################################ -WPA_SUPPLICANT_VERSION = 0.7.3 +WPA_SUPPLICANT_VERSION = 2.0 WPA_SUPPLICANT_SITE = http://hostap.epitest.fi/releases -WPA_SUPPLICANT_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install +WPA_SUPPLICANT_LICENSE = GPLv2/BSD-3c +WPA_SUPPLICANT_LICENSE_FILES = README WPA_SUPPLICANT_CONFIG = $(WPA_SUPPLICANT_DIR)/wpa_supplicant/.config WPA_SUPPLICANT_SUBDIR = wpa_supplicant -WPA_SUPPLICANT_TARGET_BINS = wpa_cli wpa_supplicant wpa_passphrase -WPA_SUPPLICANT_DBUS_SERVICE = fi.w1.wpa_supplicant1 +WPA_SUPPLICANT_DBUS_OLD_SERVICE = fi.epitest.hostap.WPASupplicant +WPA_SUPPLICANT_DBUS_NEW_SERVICE = fi.w1.wpa_supplicant1 +WPA_SUPPLICANT_CFLAGS = $(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/libnl3/ +WPA_SUPPLICANT_LDFLAGS = $(TARGET_LDFLAGS) WPA_SUPPLICANT_TARGET_LIBDIR = /lib WPA_SUPPLICANT_TARGET_BINDIR = /sbin ifeq ($(BR2_PACKAGE_LIBNL),y) WPA_SUPPLICANT_DEPENDENCIES += libnl define WPA_SUPPLICANT_LIBNL_CONFIG - $(SED) "s/^#CONFIG_DRIVER_NL80211/CONFIG_DRIVER_NL80211/" $(WPA_SUPPLICANT_CONFIG) - echo "CONFIG_LIBNL20=y" >>$(WPA_SUPPLICANT_CONFIG) + echo 'CONFIG_LIBNL32=y' >>$(WPA_SUPPLICANT_CONFIG) +endef +else +define WPA_SUPPLICANT_LIBNL_CONFIG + $(SED) 's/^\(CONFIG_DRIVER_NL80211.*\)/#\1/' $(WPA_SUPPLICANT_CONFIG) endef endif -ifneq ($(BR2_PACKAGE_WPA_SUPPLICANT_EAP),y) +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_EAP),y) +define WPA_SUPPLICANT_EAP_CONFIG + $(SED) 's/\(#\)\(CONFIG_EAP_AKA.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) + $(SED) 's/\(#\)\(CONFIG_EAP_FAST.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) + $(SED) 's/\(#\)\(CONFIG_EAP_GPSK.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) + $(SED) 's/\(#\)\(CONFIG_EAP_IKEV2.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) + $(SED) 's/\(#\)\(CONFIG_EAP_PAX.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) + $(SED) 's/\(#\)\(CONFIG_EAP_PSK.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) + $(SED) 's/\(#\)\(CONFIG_EAP_SAKE.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) + $(SED) 's/\(#\)\(CONFIG_EAP_SIM.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) + $(SED) 's/\(#\)\(CONFIG_EAP_TNC.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) + $(SED) 's/\(#\)\(CONFIG_TLSV1.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) +endef +else define WPA_SUPPLICANT_EAP_CONFIG - $(SED) "s/^CONFIG_EAP_*/#CONFIG_EAP_/g" $(WPA_SUPPLICANT_CONFIG) + $(SED) 's/^\(CONFIG_EAP.*\)/#\1/' $(WPA_SUPPLICANT_CONFIG) endef endif ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT),y) define WPA_SUPPLICANT_AP_CONFIG - echo "CONFIG_AP=y" >>$(WPA_SUPPLICANT_CONFIG) -endef -else -define WPA_SUPPLICANT_AP_CONFIG - $(SED) "s/^CONFIG_AP=y//" $(WPA_SUPPLICANT_CONFIG) + echo 'CONFIG_AP=y' >>$(WPA_SUPPLICANT_CONFIG) endef endif ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_WPS),y) define WPA_SUPPLICANT_WPS_CONFIG - echo "CONFIG_WPS=y" >>$(WPA_SUPPLICANT_CONFIG) + $(SED) 's/\(#\)\(CONFIG_WPS.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) endef endif -define WPA_SUPPLICANT_CRYPTO_CONFIG - echo "CONFIG_CRYPTO=internal" >>$(WPA_SUPPLICANT_CONFIG) - echo "CONFIG_INTERNAL_LIBTOMMATH=y" >>$(WPA_SUPPLICANT_CONFIG) - echo "CONFIG_INTERNAL_LIBTOMMATH_FAST=y" >>$(WPA_SUPPLICANT_CONFIG) +define WPA_SUPPLICANT_LIBTOMMATH_CONFIG + $(SED) 's/\(#\)\(CONFIG_INTERNAL_LIBTOMMATH.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) endef -# Try to use openssl for TLS if it's already available -# gnutls is also supported for TLS +# Try to use openssl if it's already available ifeq ($(BR2_PACKAGE_OPENSSL),y) WPA_SUPPLICANT_DEPENDENCIES += openssl define WPA_SUPPLICANT_TLS_CONFIG - echo "CONFIG_TLS=openssl" >>$(WPA_SUPPLICANT_CONFIG) + $(SED) 's/\(#\)\(CONFIG_TLS=openssl\)/\2/' $(WPA_SUPPLICANT_CONFIG) + $(SED) 's/\(#\)\(CONFIG_EAP_PWD.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) endef else define WPA_SUPPLICANT_TLS_CONFIG - echo "CONFIG_TLS=internal" >>$(WPA_SUPPLICANT_CONFIG) + $(SED) 's/\(#\)\(CONFIG_TLS=\).*/\2internal/' $(WPA_SUPPLICANT_CONFIG) endef endif ifeq ($(BR2_PACKAGE_DBUS),y) - WPA_SUPPLICANT_DEPENDENCIES += host-pkg-config dbus + WPA_SUPPLICANT_DEPENDENCIES += host-pkgconf dbus WPA_SUPPLICANT_MAKE_ENV = \ PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \ PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_OLD),y) +define WPA_SUPPLICANT_DBUS_OLD_CONFIG + $(SED) 's/\(#\)\(CONFIG_CTRL_IFACE_DBUS=\)/\2/' $(WPA_SUPPLICANT_CONFIG) +endef +define WPA_SUPPLICANT_INSTALL_DBUS_OLD + $(INSTALL) -D \ + $(@D)/wpa_supplicant/dbus/$(WPA_SUPPLICANT_DBUS_OLD_SERVICE).service \ + $(TARGET_DIR)/usr/share/dbus-1/system-services/$(WPA_SUPPLICANT_DBUS_OLD_SERVICE).service +endef +endif + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW),y) +define WPA_SUPPLICANT_DBUS_NEW_CONFIG + $(SED) 's/\(#\)\(CONFIG_CTRL_IFACE_DBUS_NEW=\)/\2/' $(WPA_SUPPLICANT_CONFIG) +endef +define WPA_SUPPLICANT_INSTALL_DBUS_NEW + $(INSTALL) -D \ + $(@D)/wpa_supplicant/dbus/$(WPA_SUPPLICANT_DBUS_NEW_SERVICE).service \ + $(TARGET_DIR)/usr/share/dbus-1/system-services/$(WPA_SUPPLICANT_DBUS_NEW_SERVICE).service +endef +endif + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_INTROSPECTION),y) +define WPA_SUPPLICANT_DBUS_INTROSPECTION_CONFIG + $(SED) 's/\(#\)\(CONFIG_CTRL_IFACE_DBUS_INTRO=\)/\2/' $(WPA_SUPPLICANT_CONFIG) +endef +endif + define WPA_SUPPLICANT_DBUS_CONFIG - $(SED) "s/^#CONFIG_CTRL_IFACE_DBUS/CONFIG_CTRL_IFACE_DBUS/" $(WPA_SUPPLICANT_CONFIG) + $(WPA_SUPPLICANT_DBUS_OLD_CONFIG) + $(WPA_SUPPLICANT_DBUS_NEW_CONFIG) + $(WPA_SUPPLICANT_DBUS_INTROSPECTION_CONFIG) endef + endif define WPA_SUPPLICANT_CONFIGURE_CMDS cp $(@D)/wpa_supplicant/defconfig $(WPA_SUPPLICANT_CONFIG) - echo "CFLAGS += $(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/libnl3/" >>$(WPA_SUPPLICANT_CONFIG) - echo "LDFLAGS += $(TARGET_LDFLAGS)" >>$(WPA_SUPPLICANT_CONFIG) - echo "CC = $(TARGET_CC)" >>$(WPA_SUPPLICANT_CONFIG) - $(SED) "s/^#CONFIG_IEEE80211R/CONFIG_IEEE80211R/" $(WPA_SUPPLICANT_CONFIG) - $(SED) "s/^#CONFIG_DELAYED_MIC/CONFIG_DELAYED_MIC/" $(WPA_SUPPLICANT_CONFIG) - $(SED) "s/^CONFIG_DRIVER_ATMEL/#CONFIG_DRIVER_ATMEL/" $(WPA_SUPPLICANT_CONFIG) - $(SED) "s/^CONFIG_SMARTCARD/#CONFIG_SMARTCARD/" $(WPA_SUPPLICANT_CONFIG) - $(SED) "s/\/local//" $(@D)/wpa_supplicant/Makefile + $(SED) 's/\(#\)\(CONFIG_HS20.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) + $(SED) 's/\(#\)\(CONFIG_IEEE80211N.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) + $(SED) 's/\(#\)\(CONFIG_IEEE80211R.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) + $(SED) 's/\(#\)\(CONFIG_IEEE80211W.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) + $(SED) 's/\(#\)\(CONFIG_INTERWORKING.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) + $(SED) 's/\(#\)\(CONFIG_DELAYED_MIC.*\)/\2/' $(WPA_SUPPLICANT_CONFIG) + $(SED) 's/\(CONFIG_DRIVER_ATMEL\)/#\1/' $(WPA_SUPPLICANT_CONFIG) + $(SED) 's/\(CONFIG_SMARTCARD\)/#\1/' $(WPA_SUPPLICANT_CONFIG) $(SED) "s:/usr/lib/:$(WPA_SUPPLICANT_TARGET_LIBDIR)/:" $(@D)/wpa_supplicant/Makefile $(SED) "s:/usr/sbin/:$(WPA_SUPPLICANT_TARGET_BINDIR)/:" $(@D)/wpa_supplicant/Makefile - $(WPA_SUPPLICANT_CRYPTO_CONFIG) + $(WPA_SUPPLICANT_LIBTOMMATH_CONFIG) $(WPA_SUPPLICANT_TLS_CONFIG) $(WPA_SUPPLICANT_EAP_CONFIG) $(WPA_SUPPLICANT_WPS_CONFIG) @@ -94,39 +139,44 @@ define WPA_SUPPLICANT_CONFIGURE_CMDS $(WPA_SUPPLICANT_AP_CONFIG) endef -define WPA_SUPPLICANT_REMOVE_CLI - rm -f $(TARGET_DIR)$(WPA_SUPPLICANT_TARGET_BINDIR)/wpa_cli +define WPA_SUPPLICANT_BUILD_CMDS + $(TARGET_MAKE_ENV) CFLAGS="$(WPA_SUPPLICANT_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" BINDIR=/usr/sbin \ + $(MAKE) CC="$(TARGET_CC)" -C $(@D)/$(WPA_SUPPLICANT_SUBDIR) endef -ifneq ($(BR2_PACKAGE_WPA_SUPPLICANT_CLI),y) -WPA_SUPPLICANT_POST_INSTALL_TARGET_HOOKS += WPA_SUPPLICANT_REMOVE_CLI +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_CLI),y) +define WPA_SUPPLICANT_INSTALL_CLI + $(INSTALL) -m 0755 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/wpa_cli \ + $(TARGET_DIR)/$(WPA_SUPPLICANT_TARGET_BINDIR)/wpa_cli +endef endif -define WPA_SUPPLICANT_REMOVE_PASSPHRASE - rm -f $(TARGET_DIR)$(WPA_SUPPLICANT_TARGET_BINDIR)/wpa_passphrase +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE),y) +define WPA_SUPPLICANT_INSTALL_PASSPHRASE + $(INSTALL) -m 0755 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/wpa_passphrase \ + $(TARGET_DIR)/$(WPA_SUPPLICANT_TARGET_BINDIR)/wpa_passphrase endef - -ifneq ($(BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE),y) -WPA_SUPPLICANT_POST_INSTALL_TARGET_HOOKS += WPA_SUPPLICANT_REMOVE_PASSPHRASE endif +ifeq ($(BR2_PACKAGE_DBUS),y) define WPA_SUPPLICANT_INSTALL_DBUS $(INSTALL) -D \ $(@D)/wpa_supplicant/dbus/dbus-wpa_supplicant.conf \ $(TARGET_DIR)/etc/dbus-1/system.d/wpa_supplicant.conf - $(INSTALL) -D \ - $(@D)/wpa_supplicant/dbus/$(WPA_SUPPLICANT_DBUS_SERVICE).service \ - $(TARGET_DIR)/usr/share/dbus-1/system-services/$(WPA_SUPPLICANT_DBUS_SERVICE).service + $(WPA_SUPPLICANT_INSTALL_DBUS_OLD) + $(WPA_SUPPLICANT_INSTALL_DBUS_NEW) endef - -ifeq ($(BR2_PACKAGE_DBUS),y) -WPA_SUPPLICANT_POST_INSTALL_TARGET_HOOKS += WPA_SUPPLICANT_INSTALL_DBUS endif -define WPA_SUPPLICANT_UNINSTALL_TARGET_CMDS - rm -f $(addprefix $(TARGET_DIR)$(WPA_SUPPLICANT_TARGET_BINDIR)/, $(WPA_SUPPLICANT_TARGET_BINS)) - rm -f $(TARGET_DIR)/etc/dbus-1/system.d/wpa_supplicant.conf - rm -f $(TARGET_DIR)/usr/share/dbus-1/system-services/$(WPA_SUPPLICANT_DBUS_SERVICE).service +define WPA_SUPPLICANT_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/wpa_supplicant \ + $(TARGET_DIR)/$(WPA_SUPPLICANT_TARGET_BINDIR)/wpa_supplicant + $(INSTALL) -m 644 -D package/wpa_supplicant/wpa_supplicant.conf \ + $(TARGET_DIR)/etc/wpa_supplicant.conf + $(WPA_SUPPLICANT_INSTALL_CLI) + $(WPA_SUPPLICANT_INSTALL_PASSPHRASE) + $(WPA_SUPPLICANT_INSTALL_DBUS) endef -$(eval $(call AUTOTARGETS,package,wpa_supplicant)) +$(eval $(generic-package)) diff --git a/package/wsapi/Config.in b/package/wsapi/Config.in index 3621648484..348a0404b6 100644 --- a/package/wsapi/Config.in +++ b/package/wsapi/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_WSAPI bool "wsapi" + # Runtime dependency only select BR2_PACKAGE_COXPCALL select BR2_PACKAGE_LUAFILESYSTEM select BR2_PACKAGE_RINGS diff --git a/package/wsapi/wsapi.mk b/package/wsapi/wsapi.mk index c0f9c8bdb5..c70502b7e8 100644 --- a/package/wsapi/wsapi.mk +++ b/package/wsapi/wsapi.mk @@ -1,12 +1,12 @@ -############################################################# +################################################################################ # # wsapi # -############################################################# +################################################################################ -WSAPI_VERSION = 1.3.4 +WSAPI_VERSION = 1.5 WSAPI_SITE = http://github.com/downloads/keplerproject/wsapi -WSAPI_DEPENDENCIES = coxpcall luafilesystem rings +WSAPI_LICENSE = MIT define WSAPI_INSTALL_TARGET_CMDS mkdir -p $(TARGET_DIR)/usr/share/lua/wsapi @@ -18,4 +18,4 @@ define WSAPI_UNINSTALL_TARGET_CMDS rm -rf "$(TARGET_DIR)/usr/share/lua/wsapi" endef -$(eval $(call GENTARGETS,package,wsapi)) +$(eval $(generic-package)) diff --git a/package/wvdial/Config.in b/package/wvdial/Config.in new file mode 100644 index 0000000000..ef4cd759ac --- /dev/null +++ b/package/wvdial/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_WVDIAL + bool "wvdial" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_LARGEFILE + depends on BR2_USE_MMU # wvstreams + select BR2_PACKAGE_WVSTREAMS + help + wvdial is an intelligent Point-to-Point Protocol dialer + + http://wvdial.googlecode.com/ + +comment "wvdial needs a toolchain w/ C++, largefile" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_LARGEFILE diff --git a/package/wvdial/wvdial-0001-uClibc-scandir.patch b/package/wvdial/wvdial-0001-uClibc-scandir.patch new file mode 100644 index 0000000000..b611e94a0b --- /dev/null +++ b/package/wvdial/wvdial-0001-uClibc-scandir.patch @@ -0,0 +1,23 @@ +Fix wvdial so that it works with scandir as defined in uClibc. + +Signed-off-by: Simon Dawson + +diff -Nurp a/wvmodemscan.cc b/wvmodemscan.cc +--- a/wvmodemscan.cc 2009-09-29 18:27:28.000000000 +0100 ++++ b/wvmodemscan.cc 2012-07-28 14:03:56.359729660 +0100 +@@ -495,13 +495,13 @@ static int fileselect(const struct diren + // (no internal ISDN support) || !strncmp(e->d_name, "ttyI", 4); + } + +-#if defined(__GLIBC__) && __GLIBC_PREREQ(2, 10) ++#if defined(__UCLIBC__) || (defined(__GLIBC__) && __GLIBC_PREREQ(2, 10)) + static int filesort(const dirent **e1, const dirent **e2) + #else + static int filesort(const void *_e1, const void *_e2) + #endif + { +-#if !(defined(__GLIBC__) && __GLIBC_PREREQ(2, 10)) ++#if !(defined(__UCLIBC__) || (defined(__GLIBC__) && __GLIBC_PREREQ(2, 10))) + dirent const * const *e1 = (dirent const * const *)_e1; + dirent const * const *e2 = (dirent const * const *)_e2; + #endif diff --git a/package/wvdial/wvdial.mk b/package/wvdial/wvdial.mk new file mode 100644 index 0000000000..58d8173192 --- /dev/null +++ b/package/wvdial/wvdial.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# wvdial +# +################################################################################ + +WVDIAL_VERSION = 1.61 +WVDIAL_SITE = http://wvdial.googlecode.com/files +WVDIAL_SOURCE = wvdial-$(WVDIAL_VERSION).tar.bz2 +WVDIAL_DEPENDENCIES = wvstreams + +WVDIAL_LICENSE = LGPLv2 +WVDIAL_LICENSE_FILES = COPYING.LIB + +# N.B. parallel make fails +WVDIAL_MAKE = $(MAKE1) + +WVDIAL_MAKE_ENV += $(TARGET_CONFIGURE_OPTS) \ + WVSTREAMS_INC="$(STAGING_DIR)/usr/include" \ + WVSTREAMS_LIB="$(STAGING_DIR)/usr/lib" + +define WVDIAL_BUILD_CMDS + $(TARGET_MAKE_ENV) $(WVDIAL_MAKE_ENV) $(WVDIAL_MAKE) -C $(@D) +endef + +define WVDIAL_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(WVDIAL_MAKE_ENV) $(WVDIAL_MAKE) \ + prefix="$(TARGET_DIR)/usr" PPPDIR="$(TARGET_DIR)/etc/ppp/peers" \ + install -C $(@D) +endef + +define WVDIAL_UNINSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(WVDIAL_MAKE_ENV) $(WVDIAL_MAKE) \ + prefix="$(TARGET_DIR)/usr" PPPDIR="$(TARGET_DIR)/etc/ppp/peers" \ + uninstall -C $(@D) +endef + +define WVDIAL_CLEAN_CMDS + $(TARGET_MAKE_ENV) $(WVDIAL_MAKE_ENV) $(WVDIAL_MAKE) clean -C $(@D) +endef + +$(eval $(generic-package)) diff --git a/package/wvstreams/Config.in b/package/wvstreams/Config.in new file mode 100644 index 0000000000..c29937e953 --- /dev/null +++ b/package/wvstreams/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_WVSTREAMS + bool "wvstreams" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_LARGEFILE + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + help + C++ Network Programming Library. + + http://wvstreams.googlecode.com/ + +comment "wvstreams needs a toolchain w/ C++, largefile" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_LARGEFILE diff --git a/package/wvstreams/wvstreams-0001-fix-uClibc-compile-getcontext.patch b/package/wvstreams/wvstreams-0001-fix-uClibc-compile-getcontext.patch new file mode 100644 index 0000000000..c78cc1893c --- /dev/null +++ b/package/wvstreams/wvstreams-0001-fix-uClibc-compile-getcontext.patch @@ -0,0 +1,273 @@ +Fix wvstreams so that it builds with uClibc, which does not have the +getcontext() and setcontext() functions. + +Signed-off-by: Simon Dawson + +diff -Nurp a/include/wvtask.h b/include/wvtask.h +--- a/include/wvtask.h 2008-07-14 20:11:35.000000000 +0100 ++++ b/include/wvtask.h 2012-07-28 12:29:53.559981240 +0100 +@@ -28,6 +28,13 @@ + + #define WVTASK_MAGIC 0x123678 + ++#undef HAVE_GETCONTEXT ++#ifdef HAVE_GETCONTEXT ++typedef ucontext_t TaskContext; ++#else ++typedef jmp_buf TaskContext; ++#endif ++ + class WvTaskMan; + + /** Represents a single thread of control. */ +@@ -54,8 +61,8 @@ class WvTask + bool running, recycled; + + WvTaskMan &man; +- ucontext_t mystate; // used for resuming the task +- ucontext_t func_call, func_return; ++ TaskContext mystate; // used for resuming the task ++ TaskContext func_call, func_return; + + TaskFunc *func; + void *userdata; +@@ -94,13 +101,13 @@ class WvTaskMan + static void call_func(WvTask *task); + + static char *stacktop; +- static ucontext_t stackmaster_task; ++ static TaskContext stackmaster_task; + + static WvTask *stack_target; +- static ucontext_t get_stack_return; ++ static TaskContext get_stack_return; + + static WvTask *current_task; +- static ucontext_t toplevel; ++ static TaskContext toplevel; + + WvTaskMan(); + virtual ~WvTaskMan(); +diff -Nurp a/utils/wvtask.cc b/utils/wvtask.cc +--- a/utils/wvtask.cc 2009-05-13 22:42:52.000000000 +0100 ++++ b/utils/wvtask.cc 2012-07-28 12:32:23.855974538 +0100 +@@ -60,12 +60,14 @@ int WvTask::taskcount, WvTask::numtasks, + WvTaskMan *WvTaskMan::singleton; + int WvTaskMan::links, WvTaskMan::magic_number; + WvTaskList WvTaskMan::all_tasks, WvTaskMan::free_tasks; +-ucontext_t WvTaskMan::stackmaster_task, WvTaskMan::get_stack_return, ++TaskContext WvTaskMan::stackmaster_task, WvTaskMan::get_stack_return, + WvTaskMan::toplevel; + WvTask *WvTaskMan::current_task, *WvTaskMan::stack_target; + char *WvTaskMan::stacktop; + ++#ifdef HAVE_GETCONTEXT + static int context_return; ++#endif + + + static bool use_shared_stack() +@@ -198,9 +200,13 @@ WvTaskMan::WvTaskMan() + + stacktop = (char *)alloca(0); + ++#ifdef HAVE_GETCONTEXT + context_return = 0; + assert(getcontext(&get_stack_return) == 0); + if (context_return == 0) ++#else ++ if (setjmp(get_stack_return) == 0) ++#endif + { + // initial setup - start the stackmaster() task (never returns!) + stackmaster(); +@@ -257,22 +263,30 @@ int WvTaskMan::run(WvTask &task, int val + + WvTask *old_task = current_task; + current_task = &task; +- ucontext_t *state; ++ TaskContext *state; + + if (!old_task) + state = &toplevel; // top-level call (not in an actual task yet) + else + state = &old_task->mystate; + ++#ifdef HAVE_GETCONTEXT + context_return = 0; + assert(getcontext(state) == 0); + int newval = context_return; ++#else ++ int newval = setjmp(*state); ++#endif + if (newval == 0) + { + // saved the state, now run the task. ++#ifdef HAVE_GETCONTEXT + context_return = val; + setcontext(&task.mystate); + return -1; ++#else ++ longjmp(task.mystate, val); ++#endif + } + else + { +@@ -317,16 +331,24 @@ int WvTaskMan::yield(int val) + (long)current_task->stacksize); + } + #endif +- ++ ++#ifdef HAVE_GETCONTEXT + context_return = 0; + assert(getcontext(¤t_task->mystate) == 0); + int newval = context_return; ++#else ++ int newval = setjmp(current_task->mystate); ++#endif + if (newval == 0) + { + // saved the task state; now yield to the toplevel. ++#ifdef HAVE_GETCONTEXT + context_return = val; + setcontext(&toplevel); + return -1; ++#else ++ longjmp(toplevel, val); ++#endif + } + else + { +@@ -340,9 +362,13 @@ int WvTaskMan::yield(int val) + + void WvTaskMan::get_stack(WvTask &task, size_t size) + { ++#ifdef HAVE_GETCONTEXT + context_return = 0; + assert(getcontext(&get_stack_return) == 0); + if (context_return == 0) ++#else ++ if (setjmp(get_stack_return) == 0) ++#endif + { + assert(magic_number == -WVTASK_MAGIC); + assert(task.magic_number == WVTASK_MAGIC); +@@ -358,6 +384,7 @@ void WvTaskMan::get_stack(WvTask &task, + static char *next_stack_addr = NULL; + #endif + ++#ifndef HAVE_GETCONTEXT + task.stack = mmap(next_stack_addr, task.stacksize, + PROT_READ | PROT_WRITE, + #ifndef MACOS +@@ -366,12 +393,17 @@ void WvTaskMan::get_stack(WvTask &task, + MAP_PRIVATE, + #endif + -1, 0); ++#endif // !HAVE_GETCONTEXT + } + + // initial setup + stack_target = &task; ++#ifdef HAVE_GETCONTEXT + context_return = size/1024 + (size%1024 > 0); + setcontext(&stackmaster_task); ++#else ++ longjmp(stackmaster_task, size/1024 + (size%1024 > 0)); ++#endif + } + else + { +@@ -408,9 +440,13 @@ void WvTaskMan::_stackmaster() + { + assert(magic_number == -WVTASK_MAGIC); + ++#ifdef HAVE_GETCONTEXT + context_return = 0; + assert(getcontext(&stackmaster_task) == 0); + val = context_return; ++#else ++ val = setjmp(stackmaster_task); ++#endif + if (val == 0) + { + assert(magic_number == -WVTASK_MAGIC); +@@ -418,8 +454,12 @@ void WvTaskMan::_stackmaster() + // just did setjmp; save stackmaster's current state (with + // all current stack allocations) and go back to get_stack + // (or the constructor, if that's what called us) ++#ifdef HAVE_GETCONTEXT + context_return = 1; + setcontext(&get_stack_return); ++#else ++ longjmp(get_stack_return, 1); ++#endif + } + else + { +@@ -462,7 +502,9 @@ void WvTaskMan::call_func(WvTask *task) + task->func(task->userdata); + Dprintf("WvTaskMan: returning from task #%d (%s)\n", + task->tid, (const char *)task->name); ++#ifdef HAVE_GETCONTEXT + context_return = 1; ++#endif + } + + +@@ -473,9 +515,13 @@ void WvTaskMan::do_task() + assert(task->magic_number == WVTASK_MAGIC); + + // back here from longjmp; someone wants stack space. ++#ifdef HAVE_GETCONTEXT + context_return = 0; + assert(getcontext(&task->mystate) == 0); + if (context_return == 0) ++#else ++ if (setjmp(task->mystate) == 0) ++#endif + { + // done the setjmp; that means the target task now has + // a working jmp_buf all set up. Leave space on the stack +@@ -510,6 +556,7 @@ void WvTaskMan::do_task() + } + else + { ++#ifdef HAVE_GETCONTEXT + assert(getcontext(&task->func_call) == 0); + task->func_call.uc_stack.ss_size = task->stacksize; + task->func_call.uc_stack.ss_sp = task->stack; +@@ -519,11 +566,19 @@ void WvTaskMan::do_task() + task->tid, (const char *)task->name); + makecontext(&task->func_call, + (void (*)(void))call_func, 1, task); ++#else ++ assert(setjmp(task->func_call) == 0); ++#endif + ++#ifdef HAVE_GETCONTEXT + context_return = 0; + assert(getcontext(&task->func_return) == 0); + if (context_return == 0) + setcontext(&task->func_call); ++#else ++ if (setjmp(task->func_return) == 0) ++ longjmp(task->func_call, 0); ++#endif + } + + // the task's function terminated. +@@ -544,8 +599,12 @@ const void *WvTaskMan::current_top_of_st + if (use_shared_stack() || current_task == NULL) + return __libc_stack_end; + else ++#ifdef HAVE_GETCONTEXT + return (const char *)current_task->stack + current_task->stacksize; + #else ++ return 0; ++#endif ++#else + return 0; + #endif + } diff --git a/package/wvstreams/wvstreams-0002-fix-uClibc-compile-execinfo-backtrace.patch b/package/wvstreams/wvstreams-0002-fix-uClibc-compile-execinfo-backtrace.patch new file mode 100644 index 0000000000..c6317da4dc --- /dev/null +++ b/package/wvstreams/wvstreams-0002-fix-uClibc-compile-execinfo-backtrace.patch @@ -0,0 +1,31 @@ +Fix wvstreams so that it builds with uClibc: we don't have execinfo.h, +so we can't do backtrace() stuff. + +Signed-off-by: Simon Dawson + +diff -Nurp a/utils/wvcrash.cc b/utils/wvcrash.cc +--- a/utils/wvcrash.cc 2008-12-17 12:24:20.000000000 +0000 ++++ b/utils/wvcrash.cc 2012-07-27 22:00:15.456502262 +0100 +@@ -28,7 +28,9 @@ + // FIXME: this file mostly only works in Linux + #ifdef __linux + +-# include ++#ifdef HAVE_EXECINFO_H ++#include ++#endif + #include + + #ifdef __USE_GNU +@@ -267,9 +269,11 @@ static void wvcrash_real(int sig, int fd + } + } + ++#ifdef HAVE_EXECINFO_H + wr(fd, "\nBacktrace:\n"); + backtrace_symbols_fd(trace, + backtrace(trace, sizeof(trace)/sizeof(trace[0])), fd); ++#endif + + if (pid > 0) + { diff --git a/package/wvstreams/wvstreams-0003-fix-uClibc-compile-misc.patch b/package/wvstreams/wvstreams-0003-fix-uClibc-compile-misc.patch new file mode 100644 index 0000000000..690a961c12 --- /dev/null +++ b/package/wvstreams/wvstreams-0003-fix-uClibc-compile-misc.patch @@ -0,0 +1,16 @@ +Fix wvstreams so that it builds with uClibc: const cast problem. + +Signed-off-by: Simon Dawson + +diff -Nurp a/crypto/wvx509.cc b/crypto/wvx509.cc +--- a/crypto/wvx509.cc 2008-10-23 21:23:49.000000000 +0100 ++++ b/crypto/wvx509.cc 2012-06-15 18:45:06.605899292 +0100 +@@ -1157,7 +1157,7 @@ WvString WvX509::get_extension(int nid) + + if (ext) + { +- X509V3_EXT_METHOD *method = X509V3_EXT_get(ext); ++ X509V3_EXT_METHOD *method = const_cast(X509V3_EXT_get(ext)); + if (!method) + { + WvDynBuf buf; diff --git a/package/wvstreams/wvstreams-0004-build-fixes.patch b/package/wvstreams/wvstreams-0004-build-fixes.patch new file mode 100644 index 0000000000..21792d7422 --- /dev/null +++ b/package/wvstreams/wvstreams-0004-build-fixes.patch @@ -0,0 +1,40 @@ +Add missing includes for proper build on Linux/glibc + +The current wvstreams code doesn't build on Linux/glibc, with error +about chmod() not being available (for wvunixdgsocket.cc) or umask() +not being available (for wvatomicfile.cc). Those errors turn out to be +missing includes. Those includes were in fact already done, but +conditionally for MacOS. We make them unconditional (it probably +breaks other platforms, but since Buildroot is Linux only, we don't +care). + +Signed-off-by: Thomas Petazzoni + +Index: b/ipstreams/wvunixdgsocket.cc +=================================================================== +--- a/ipstreams/wvunixdgsocket.cc ++++ b/ipstreams/wvunixdgsocket.cc +@@ -1,8 +1,6 @@ + #include "wvunixdgsocket.h" +-#ifdef MACOS + #include + #include +-#endif + + WvUnixDGSocket::WvUnixDGSocket(WvStringParm filename, bool _server, int perms) + : socketfile(filename) +Index: b/streams/wvatomicfile.cc +=================================================================== +--- a/streams/wvatomicfile.cc ++++ b/streams/wvatomicfile.cc +@@ -10,10 +10,7 @@ + #include "wvatomicfile.h" + #include "wvfileutils.h" + #include "wvstrutils.h" +- +-#ifdef MACOS + #include +-#endif + + WvAtomicFile::WvAtomicFile(WvStringParm filename, int flags, mode_t create_mode) + : tmp_file(WvString::null) diff --git a/package/wvstreams/wvstreams-0005-getuid.patch b/package/wvstreams/wvstreams-0005-getuid.patch new file mode 100644 index 0000000000..60150665ce --- /dev/null +++ b/package/wvstreams/wvstreams-0005-getuid.patch @@ -0,0 +1,25 @@ +[PATCH] wvuid.cc: getuid needs sys/types.h + unistd.h + +Otherwise the build fails with: + +utils/wvuid.cc: In function 'wvuid_t wvgetuid()': +utils/wvuid.cc:63:19: error: 'getuid' was not declared in this scope + +Signed-off-by: Peter Korsgaard +--- + utils/wvuid.cc | 2 ++ + 1 file changed, 2 insertions(+) + +Index: wvstreams-4.6.1/utils/wvuid.cc +=================================================================== +--- wvstreams-4.6.1.orig/utils/wvuid.cc ++++ wvstreams-4.6.1/utils/wvuid.cc +@@ -33,6 +33,8 @@ + + #else // not WIN32 + ++#include ++#include + + WvString wv_username_from_uid(wvuid_t uid) + { diff --git a/package/wvstreams/wvstreams.mk b/package/wvstreams/wvstreams.mk new file mode 100644 index 0000000000..41155a740f --- /dev/null +++ b/package/wvstreams/wvstreams.mk @@ -0,0 +1,56 @@ +################################################################################ +# +# wvstreams +# +################################################################################ + +WVSTREAMS_VERSION = 4.6.1 +WVSTREAMS_SITE = http://wvstreams.googlecode.com/files +WVSTREAMS_DEPENDENCIES = openssl zlib host-pkgconf +WVSTREAMS_INSTALL_STAGING = YES + +WVSTREAMS_LICENSE = LGPLv2+ +WVSTREAMS_LICENSE_FILES = LICENSE + +# N.B. parallel make fails +WVSTREAMS_MAKE = $(MAKE1) + +# Needed to work around problem with wvassert.h +WVSTREAMS_CONF_OPT += CPPFLAGS=-DNDEBUG + +WVSTREAMS_CONF_OPT += \ + --with-openssl \ + --with-zlib \ + --without-pam \ + --disable-warnings \ + --without-tcl + +# needed for openssl detection when statically linking (as ssl needs lz) +WVSTREAMS_CONF_ENV += LIBS=-lz + +ifneq ($(BR2_PREFER_STATIC_LIB),y) + WVSTREAMS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -fPIC" +endif + +ifeq ($(BR2_PACKAGE_DBUS),y) + WVSTREAMS_DEPENDENCIES += dbus + WVSTREAMS_CONF_OPT += --with-dbus +else + WVSTREAMS_CONF_OPT += --without-dbus +endif + +ifeq ($(BR2_PACKAGE_QT),y) + WVSTREAMS_DEPENDENCIES += qt + WVSTREAMS_CONF_OPT += --with-qt +else + WVSTREAMS_CONF_OPT += --without-qt +endif + +ifeq ($(BR2_PACKAGE_VALGRIND),y) + WVSTREAMS_DEPENDENCIES += valgrind + WVSTREAMS_CONF_OPT += --with-valgrind +else + WVSTREAMS_CONF_OPT += --without-valgrind +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/Config.in b/package/x11r7/Config.in index c0c0043ba3..a534df9190 100644 --- a/package/x11r7/Config.in +++ b/package/x11r7/Config.in @@ -1,42 +1,24 @@ menuconfig BR2_PACKAGE_XORG7 - bool "X.org X Window System, X11R7, release 7.5" - select BR2_PACKAGE_ZLIB - select BR2_PACKAGE_LIBPNG - select BR2_PACKAGE_EXPAT - select BR2_PACKAGE_FONTCONFIG + bool "X.org X Window System" depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS help Support for X11R7 libraries, servers, drivers, and/or applications in the target. -if BR2_PACKAGE_XORG7 - -choice - prompt "X Window System server type" - default BR2_PACKAGE_XSERVER_tinyx - help - Select the X Window System server to use - -config BR2_PACKAGE_XSERVER_xorg - bool "Modular X.org" - depends on BR2_LARGEFILE && BR2_INSTALL_LIBSTDCPP - -comment 'X.org requires largefile and C++ support' - depends on !(BR2_LARGEFILE && BR2_INSTALL_LIBSTDCPP) + http://xorg.freedesktop.org -config BR2_PACKAGE_XSERVER_tinyx - bool "TinyX" - -endchoice - -menu "X11R7 Servers" - source package/x11r7/xserver_xorg-server/Config.in -endmenu +if BR2_PACKAGE_XORG7 + menu "X11R7 Servers" + source package/x11r7/xserver_xorg-server/Config.in + endmenu menu "X11R7 Libraries" source package/x11r7/libxcb/Config.in source package/x11r7/mesa3d/Config.in - source package/x11r7/pthread-stubs/Config.in source package/x11r7/xcb-util/Config.in + source package/x11r7/xcb-util-image/Config.in + source package/x11r7/xcb-util-keysyms/Config.in + source package/x11r7/xcb-util-wm/Config.in source package/x11r7/xlib_libFS/Config.in source package/x11r7/xlib_libICE/Config.in source package/x11r7/xlib_libSM/Config.in @@ -51,15 +33,11 @@ endmenu source package/x11r7/xlib_libXext/Config.in source package/x11r7/xlib_libXfixes/Config.in source package/x11r7/xlib_libXfont/Config.in - source package/x11r7/xlib_libXfontcache/Config.in source package/x11r7/xlib_libXft/Config.in source package/x11r7/xlib_libXi/Config.in source package/x11r7/xlib_libXinerama/Config.in source package/x11r7/xlib_libXmu/Config.in - source package/x11r7/xlib_libXp/Config.in source package/x11r7/xlib_libXpm/Config.in - source package/x11r7/xlib_libXprintAppUtil/Config.in - source package/x11r7/xlib_libXprintUtil/Config.in source package/x11r7/xlib_libXrandr/Config.in source package/x11r7/xlib_libXrender/Config.in source package/x11r7/xlib_libXres/Config.in @@ -71,11 +49,10 @@ endmenu source package/x11r7/xlib_libXxf86vm/Config.in source package/x11r7/xlib_libdmx/Config.in source package/x11r7/xlib_libfontenc/Config.in - source package/x11r7/xlib_liboldX/Config.in source package/x11r7/xlib_libxkbfile/Config.in - source package/x11r7/xlib_libxkbui/Config.in source package/x11r7/xlib_xtrans/Config.in source package/x11r7/xlib_libpciaccess/Config.in + source package/x11r7/xlib_libpthread-stubs/Config.in endmenu menu "X11R7 Applications" source package/x11r7/xapp_appres/Config.in @@ -129,6 +106,7 @@ endmenu source package/x11r7/xapp_xhost/Config.in source package/x11r7/xapp_xinit/Config.in source package/x11r7/xapp_xinput/Config.in + source package/x11r7/xapp_xinput-calibrator/Config.in source package/x11r7/xapp_xkbcomp/Config.in source package/x11r7/xapp_xkbevd/Config.in source package/x11r7/xapp_xkbprint/Config.in @@ -145,9 +123,7 @@ endmenu source package/x11r7/xapp_xmh/Config.in source package/x11r7/xapp_xmodmap/Config.in source package/x11r7/xapp_xmore/Config.in - source package/x11r7/xapp_xplsprinters/Config.in source package/x11r7/xapp_xpr/Config.in - source package/x11r7/xapp_xprehashprinterlist/Config.in source package/x11r7/xapp_xprop/Config.in source package/x11r7/xapp_xrandr/Config.in source package/x11r7/xapp_xrdb/Config.in @@ -164,22 +140,19 @@ endmenu source package/x11r7/xapp_xwininfo/Config.in source package/x11r7/xapp_xwud/Config.in endmenu - if BR2_PACKAGE_XSERVER_xorg + if BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR menu "X11R7 Drivers" - source package/x11r7/xdriver_xf86-input-acecad/Config.in - source package/x11r7/xdriver_xf86-input-aiptek/Config.in source package/x11r7/xdriver_xf86-input-evdev/Config.in source package/x11r7/xdriver_xf86-input-joystick/Config.in source package/x11r7/xdriver_xf86-input-keyboard/Config.in source package/x11r7/xdriver_xf86-input-mouse/Config.in source package/x11r7/xdriver_xf86-input-synaptics/Config.in + source package/x11r7/xdriver_xf86-input-tslib/Config.in source package/x11r7/xdriver_xf86-input-vmmouse/Config.in source package/x11r7/xdriver_xf86-input-void/Config.in - source package/x11r7/xdriver_xf86-video-apm/Config.in source package/x11r7/xdriver_xf86-video-ark/Config.in source package/x11r7/xdriver_xf86-video-ast/Config.in source package/x11r7/xdriver_xf86-video-ati/Config.in - source package/x11r7/xdriver_xf86-video-chips/Config.in source package/x11r7/xdriver_xf86-video-cirrus/Config.in source package/x11r7/xdriver_xf86-video-dummy/Config.in source package/x11r7/xdriver_xf86-video-fbdev/Config.in @@ -187,7 +160,6 @@ endmenu source package/x11r7/xdriver_xf86-video-glide/Config.in source package/x11r7/xdriver_xf86-video-glint/Config.in source package/x11r7/xdriver_xf86-video-i128/Config.in - source package/x11r7/xdriver_xf86-video-i740/Config.in source package/x11r7/xdriver_xf86-video-intel/Config.in source package/x11r7/xdriver_xf86-video-mach64/Config.in source package/x11r7/xdriver_xf86-video-mga/Config.in @@ -196,30 +168,17 @@ endmenu source package/x11r7/xdriver_xf86-video-nv/Config.in source package/x11r7/xdriver_xf86-video-openchrome/Config.in source package/x11r7/xdriver_xf86-video-r128/Config.in - source package/x11r7/xdriver_xf86-video-rendition/Config.in - source package/x11r7/xdriver_xf86-video-s3/Config.in - source package/x11r7/xdriver_xf86-video-s3virge/Config.in source package/x11r7/xdriver_xf86-video-savage/Config.in source package/x11r7/xdriver_xf86-video-siliconmotion/Config.in source package/x11r7/xdriver_xf86-video-sis/Config.in - source package/x11r7/xdriver_xf86-video-sisusb/Config.in - source package/x11r7/xdriver_xf86-video-suncg14/Config.in - source package/x11r7/xdriver_xf86-video-suncg3/Config.in - source package/x11r7/xdriver_xf86-video-suncg6/Config.in - source package/x11r7/xdriver_xf86-video-sunffb/Config.in - source package/x11r7/xdriver_xf86-video-sunleo/Config.in - source package/x11r7/xdriver_xf86-video-suntcx/Config.in source package/x11r7/xdriver_xf86-video-tdfx/Config.in source package/x11r7/xdriver_xf86-video-tga/Config.in source package/x11r7/xdriver_xf86-video-trident/Config.in - source package/x11r7/xdriver_xf86-video-tseng/Config.in source package/x11r7/xdriver_xf86-video-v4l/Config.in source package/x11r7/xdriver_xf86-video-vesa/Config.in source package/x11r7/xdriver_xf86-video-vmware/Config.in source package/x11r7/xdriver_xf86-video-voodoo/Config.in source package/x11r7/xdriver_xf86-video-wsfb/Config.in - source package/x11r7/xdriver_xf86-video-xgi/Config.in - source package/x11r7/xdriver_xf86-video-xgixp/Config.in endmenu endif menu "X11R7 Fonts" @@ -240,7 +199,6 @@ endmenu source package/x11r7/xfont_font-bh-type1/Config.in source package/x11r7/xfont_font-bitstream-100dpi/Config.in source package/x11r7/xfont_font-bitstream-75dpi/Config.in - source package/x11r7/xfont_font-bitstream-speedo/Config.in source package/x11r7/xfont_font-bitstream-type1/Config.in source package/x11r7/xfont_font-cronyx-cyrillic/Config.in source package/x11r7/xfont_font-cursor-misc/Config.in @@ -276,7 +234,6 @@ endmenu source package/x11r7/xproto_glproto/Config.in source package/x11r7/xproto_inputproto/Config.in source package/x11r7/xproto_kbproto/Config.in - source package/x11r7/xproto_printproto/Config.in source package/x11r7/xproto_randrproto/Config.in source package/x11r7/xproto_recordproto/Config.in source package/x11r7/xproto_renderproto/Config.in @@ -289,7 +246,6 @@ endmenu source package/x11r7/xproto_xf86bigfontproto/Config.in source package/x11r7/xproto_xf86dgaproto/Config.in source package/x11r7/xproto_xf86driproto/Config.in - source package/x11r7/xproto_xf86rushproto/Config.in source package/x11r7/xproto_xf86vidmodeproto/Config.in source package/x11r7/xproto_xineramaproto/Config.in source package/x11r7/xproto_xproto/Config.in @@ -302,9 +258,9 @@ endmenu menu "X11R7 Other data" source package/x11r7/xdata_xbitmaps/Config.in source package/x11r7/xdata_xcursor-themes/Config.in - source package/x11r7/xkeyboard-config/Config.in + source package/x11r7/xcursor-transparent-theme/Config.in endmenu endif -comment "X.org requires a toolchain with WCHAR support" - depends on !BR2_USE_WCHAR +comment "X.org needs a toolchain w/ wchar, threads" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/x11r7/libxcb/Config.in b/package/x11r7/libxcb/Config.in index fb48a02651..1e1afb4cf7 100644 --- a/package/x11r7/libxcb/Config.in +++ b/package/x11r7/libxcb/Config.in @@ -1,14 +1,12 @@ config BR2_PACKAGE_LIBXCB bool "libxcb" - select BR2_PACKAGE_PTHREAD_STUBS + select BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS select BR2_PACKAGE_XCB_PROTO select BR2_PACKAGE_XLIB_LIBXDMCP select BR2_PACKAGE_XLIB_LIBXAU help - The X protocol C-language Binding (XCB) is a replacement for - Xlib featuring a small footprint, latency hiding, direct access - to the protocol, improved threading support, and extensibility. - - http://xcb.freedesktop.org/ - + The X protocol C-language Binding (XCB) is a replacement for + Xlib featuring a small footprint, latency hiding, direct access + to the protocol, improved threading support, and extensibility. + http://xcb.freedesktop.org/ diff --git a/package/x11r7/libxcb/libxcb.mk b/package/x11r7/libxcb/libxcb.mk index a3c87d1010..dfcf6faa93 100644 --- a/package/x11r7/libxcb/libxcb.mk +++ b/package/x11r7/libxcb/libxcb.mk @@ -1,26 +1,26 @@ -############################################################# +################################################################################ # # libxcb # -############################################################# -LIBXCB_VERSION = 1.5 +################################################################################ + +LIBXCB_VERSION = 1.8.1 LIBXCB_SOURCE = libxcb-$(LIBXCB_VERSION).tar.bz2 LIBXCB_SITE = http://xcb.freedesktop.org/dist/ +LIBXCB_LICENSE = MIT +LIBXCB_LICENSE_FILES = COPYING LIBXCB_INSTALL_STAGING = YES -LIBXCB_AUTORECONF = NO LIBXCB_DEPENDENCIES = \ - host-libxslt pthread-stubs xcb-proto xlib_libXdmcp xlib_libXau \ - host-xcb-proto host-python + host-libxslt xlib_libpthread-stubs xcb-proto xlib_libXdmcp xlib_libXau \ + host-xcb-proto host-python host-pkgconf LIBXCB_CONF_ENV = STAGING_DIR="$(STAGING_DIR)" LIBXCB_MAKE_OPT = XCBPROTO_XCBINCLUDEDIR=$(STAGING_DIR)/usr/share/xcb \ XCBPROTO_XCBPYTHONDIR=$(HOST_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages +LIBXCB_CONF_OPT = --disable-build-docs -HOST_LIBXCB_DEPENDENCIES = \ - host-libxslt host-pthread-stubs host-xcb-proto host-xlib_libXdmcp \ - host-xlib_libXau host-python - -$(eval $(call AUTOTARGETS,package/x11r7,libxcb)) -$(eval $(call AUTOTARGETS,package/x11r7,libxcb,host)) +HOST_LIBXCB_CONF_OPT = --disable-build-docs +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/mcookie/Config.in b/package/x11r7/mcookie/Config.in index 1462a7b50f..2e9cfc76ea 100644 --- a/package/x11r7/mcookie/Config.in +++ b/package/x11r7/mcookie/Config.in @@ -1,7 +1,6 @@ config BR2_PACKAGE_MCOOKIE bool "mcookie" help - cookie generator for X server - - http://www.x.org + cookie generator for X server + http://www.x.org diff --git a/package/x11r7/mcookie/mcookie.mk b/package/x11r7/mcookie/mcookie.mk index 12ef475799..87a236fb18 100644 --- a/package/x11r7/mcookie/mcookie.mk +++ b/package/x11r7/mcookie/mcookie.mk @@ -1,20 +1,23 @@ -############################################################# +################################################################################ # # mcookie # -############################################################# +################################################################################ -$(TARGET_DIR)/usr/bin/mcookie: package/x11r7/mcookie/mcookie.c - $(TARGET_CC) -Wall -Os -s package/x11r7/mcookie/mcookie.c -o $(TARGET_DIR)/usr/bin/mcookie +# Source included in Buildroot +MCOOKIE_SOURCE = +MCOOKIE_LICENSE = Public Domain +define MCOOKIE_EXTRACT_CMDS + cp package/x11r7/mcookie/mcookie.c $(@D)/ +endef -mcookie: $(TARGET_DIR)/usr/bin/mcookie +define MCOOKIE_BUILD_CMDS + (cd $(@D); $(TARGET_CC) -Wall -Os -s mcookie.c -o mcookie) +endef -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_MCOOKIE),y) -TARGETS+=mcookie -endif +define MCOOKIE_INSTALL_TARGET_CMDS + install -m 0755 -D $(@D)/mcookie $(TARGET_DIR)/usr/bin/mcookie +endef + +$(eval $(generic-package)) diff --git a/package/x11r7/mesa3d/Config.in b/package/x11r7/mesa3d/Config.in index 596eea3919..080f56a8b8 100644 --- a/package/x11r7/mesa3d/Config.in +++ b/package/x11r7/mesa3d/Config.in @@ -7,8 +7,8 @@ config BR2_PACKAGE_MESA3D select BR2_PACKAGE_XPROTO_DRI2PROTO select BR2_PACKAGE_LIBDRM select BR2_PACKAGE_EXPAT - depends on BR2_PACKAGE_XSERVER_XORG_SERVER - depends on BR2_PACKAGE_XSERVER_xorg + select BR2_PACKAGE_HOST_LIBXML2_PYTHON + depends on BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR depends on BR2_INSTALL_LIBSTDCPP help Mesa 3D, an open-source implementation of the OpenGL specification. diff --git a/package/x11r7/mesa3d/mesa3d-uclibc-locale.patch b/package/x11r7/mesa3d/mesa3d-uclibc-locale.patch new file mode 100644 index 0000000000..99afe8dc95 --- /dev/null +++ b/package/x11r7/mesa3d/mesa3d-uclibc-locale.patch @@ -0,0 +1,56 @@ +[PATCH] Fix compilation on uClibc without locale support + +Based on similar patch from OE: + +http://git.openembedded.org/openembedded-core/commit/meta/recipes-graphics/mesa/mesa/0001-Compile-with-uclibc.patch?id=e4039eb74b20e96d4b8837cd58cf2d13d091e1ad + +Signed-off-by: Peter Korsgaard +--- + configure.ac | 3 +++ + src/glsl/strtod.c | 2 +- + src/mesa/main/imports.c | 2 +- + 3 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index fbaa376..454dad2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -450,6 +450,9 @@ AC_SUBST([DLOPEN_LIBS]) + dnl See if posix_memalign is available + AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"]) + ++dnl See if newlocale is available ++AC_CHECK_FUNCS_ONCE(newlocale) ++ + dnl SELinux awareness. + AC_ARG_ENABLE([selinux], + [AS_HELP_STRING([--enable-selinux], +diff --git a/src/glsl/strtod.c b/src/glsl/strtod.c +index a876e13..9fce7e9 100644 +--- a/src/glsl/strtod.c ++++ b/src/glsl/strtod.c +@@ -44,7 +44,7 @@ double + double + glsl_strtod(const char *s, char **end) + { +-#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) ++#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && defined(HAVE_NEWLOCALE) + static locale_t loc = NULL; + if (!loc) { + loc = newlocale(LC_CTYPE_MASK, "C", NULL); +diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c +index d3727ef..363bf32 100644 +--- a/src/mesa/main/imports.c ++++ b/src/mesa/main/imports.c +@@ -757,7 +757,7 @@ float + float + _mesa_strtof( const char *s, char **end ) + { +-#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) ++#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && defined(HAVE_NEWLOCALE) + static locale_t loc = NULL; + if (!loc) { + loc = newlocale(LC_CTYPE_MASK, "C", NULL); +-- +1.7.10.4 + diff --git a/package/x11r7/mesa3d/mesa3d.mk b/package/x11r7/mesa3d/mesa3d.mk index cb0690dc07..d4080d47d0 100644 --- a/package/x11r7/mesa3d/mesa3d.mk +++ b/package/x11r7/mesa3d/mesa3d.mk @@ -1,16 +1,40 @@ -############################################################# +################################################################################ # # mesa3d # -############################################################# -MESA3D_VERSION:=7.6.1 -MESA3D_SOURCE:=MesaLib-$(MESA3D_VERSION).tar.gz -MESA3D_SITE:=ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_VERSION) +################################################################################ -MESA3D_AUTORECONF = NO -MESA3D_CONF_OPT = --disable-egl --disable-glu --disable-glw --disable-glut --disable-gallium --with-driver=dri --with-dri-drivers=swrast +MESA3D_VERSION = 7.10.3 +MESA3D_SOURCE = MesaLib-$(MESA3D_VERSION).tar.gz +MESA3D_SITE = ftp://ftp.freedesktop.org/pub/mesa/older-versions/7.x/$(MESA3D_VERSION) +MESA3D_LICENSE = MIT, SGI, Khronos +MESA3D_LICENSE_FILES = docs/license.html + +MESA3D_AUTORECONF = YES MESA3D_INSTALL_STAGING = YES -MESA3D_DEPENDENCIES = xproto_glproto xlib_libXxf86vm xlib_libXdamage xlib_libXfixes xproto_dri2proto libdrm expat +MESA3D_CONF_OPT = \ + --disable-egl \ + --disable-glu \ + --disable-glw \ + --disable-glut \ + --disable-gallium \ + --with-driver=dri \ + --with-dri-drivers=swrast \ + --disable-static + +MESA3D_DEPENDENCIES = \ + xproto_glproto \ + xlib_libXxf86vm \ + xlib_libXdamage \ + xlib_libXfixes \ + xproto_dri2proto \ + libdrm \ + expat \ + host-xutil_makedepend \ + host-libxml2 \ + host-python \ + host-bison \ + host-flex -$(eval $(call AUTOTARGETS,package/x11r7,mesa3d)) +$(eval $(autotools-package)) diff --git a/package/x11r7/pthread-stubs/Config.in b/package/x11r7/pthread-stubs/Config.in deleted file mode 100644 index de13e87b90..0000000000 --- a/package/x11r7/pthread-stubs/Config.in +++ /dev/null @@ -1,8 +0,0 @@ -config BR2_PACKAGE_PTHREAD_STUBS - bool "pthread-stubs" - help - This library provides weak aliases for pthread functions not - provided in libc or otherwise available by default. - - http://xcb.freedesktop.org/ - diff --git a/package/x11r7/pthread-stubs/pthread-stubs.mk b/package/x11r7/pthread-stubs/pthread-stubs.mk deleted file mode 100644 index 75980c85d6..0000000000 --- a/package/x11r7/pthread-stubs/pthread-stubs.mk +++ /dev/null @@ -1,14 +0,0 @@ -############################################################# -# -# pthread-stubs -# -############################################################# -PTHREAD_STUBS_VERSION = 0.3 -PTHREAD_STUBS_SOURCE = libpthread-stubs-$(PTHREAD_STUBS_VERSION).tar.bz2 -PTHREAD_STUBS_SITE = http://xcb.freedesktop.org/dist/ - -PTHREAD_STUBS_INSTALL_STAGING = YES - -$(eval $(call AUTOTARGETS,package/x11r7,pthread-stubs)) -$(eval $(call AUTOTARGETS,package/x11r7,pthread-stubs,host)) - diff --git a/package/x11r7/x11r7.mk b/package/x11r7/x11r7.mk index 7c7ae6905b..85ecbc5968 100644 --- a/package/x11r7/x11r7.mk +++ b/package/x11r7/x11r7.mk @@ -1,3 +1 @@ -ifeq ($(BR2_PACKAGE_XORG7),y) -include package/x11r7/*/*.mk -endif +include $(sort $(wildcard package/x11r7/*/*.mk)) diff --git a/package/x11r7/xapp_appres/xapp_appres.mk b/package/x11r7/xapp_appres/xapp_appres.mk index 308634c5a9..c2f8d994e6 100644 --- a/package/x11r7/xapp_appres/xapp_appres.mk +++ b/package/x11r7/xapp_appres/xapp_appres.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_appres -- list X application resource database +# xapp_appres # ################################################################################ XAPP_APPRES_VERSION = 1.0.1 XAPP_APPRES_SOURCE = appres-$(XAPP_APPRES_VERSION).tar.bz2 XAPP_APPRES_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_APPRES_AUTORECONF = NO +XAPP_APPRES_LICENSE = MIT +XAPP_APPRES_LICENSE_FILES = COPYING XAPP_APPRES_DEPENDENCIES = xlib_libX11 xlib_libXt -$(eval $(call AUTOTARGETS,package/x11r7,xapp_appres)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_bdftopcf/xapp_bdftopcf.mk b/package/x11r7/xapp_bdftopcf/xapp_bdftopcf.mk index 0350a87412..b03f80e38e 100644 --- a/package/x11r7/xapp_bdftopcf/xapp_bdftopcf.mk +++ b/package/x11r7/xapp_bdftopcf/xapp_bdftopcf.mk @@ -1,15 +1,15 @@ ################################################################################ # -# xapp_bdftopcf -- X.Org bdftopcf application +# xapp_bdftopcf # ################################################################################ -XAPP_BDFTOPCF_VERSION = 1.0.2 +XAPP_BDFTOPCF_VERSION = 1.0.3 XAPP_BDFTOPCF_SOURCE = bdftopcf-$(XAPP_BDFTOPCF_VERSION).tar.bz2 XAPP_BDFTOPCF_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_BDFTOPCF_AUTORECONF = NO +XAPP_BDFTOPCF_LICENSE = MIT +XAPP_BDFTOPCF_LICENSE_FILES = COPYING XAPP_BDFTOPCF_DEPENDENCIES = xlib_libXfont -HOST_XAPP_BDFTOPCF_DEPENDENCIES = host-xlib_libXfont -$(eval $(call AUTOTARGETS,package/x11r7,xapp_bdftopcf)) -$(eval $(call AUTOTARGETS,package/x11r7,xapp_bdftopcf,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xapp_beforelight/xapp_beforelight.mk b/package/x11r7/xapp_beforelight/xapp_beforelight.mk index 8c1273f1fa..e92f056b35 100644 --- a/package/x11r7/xapp_beforelight/xapp_beforelight.mk +++ b/package/x11r7/xapp_beforelight/xapp_beforelight.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_beforelight -- screen saver +# xapp_beforelight # ################################################################################ XAPP_BEFORELIGHT_VERSION = 1.0.2 XAPP_BEFORELIGHT_SOURCE = beforelight-$(XAPP_BEFORELIGHT_VERSION).tar.bz2 XAPP_BEFORELIGHT_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_BEFORELIGHT_AUTORECONF = NO +XAPP_BEFORELIGHT_LICENSE = MIT +XAPP_BEFORELIGHT_LICENSE_FILES = COPYING XAPP_BEFORELIGHT_DEPENDENCIES = xlib_libX11 xlib_libXScrnSaver xlib_libXaw xlib_libXt -$(eval $(call AUTOTARGETS,package/x11r7,xapp_beforelight)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_bitmap/xapp_bitmap.mk b/package/x11r7/xapp_bitmap/xapp_bitmap.mk index 252507e578..bfe7246273 100644 --- a/package/x11r7/xapp_bitmap/xapp_bitmap.mk +++ b/package/x11r7/xapp_bitmap/xapp_bitmap.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_bitmap -- X.Org bitmap application +# xapp_bitmap # ################################################################################ -XAPP_BITMAP_VERSION = 1.0.3 +XAPP_BITMAP_VERSION = 1.0.6 XAPP_BITMAP_SOURCE = bitmap-$(XAPP_BITMAP_VERSION).tar.bz2 XAPP_BITMAP_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_BITMAP_AUTORECONF = NO +XAPP_BITMAP_LICENSE = MIT +XAPP_BITMAP_LICENSE_FILES = COPYING XAPP_BITMAP_DEPENDENCIES = xlib_libX11 xlib_libXaw xlib_libXmu xdata_xbitmaps -$(eval $(call AUTOTARGETS,package/x11r7,xapp_bitmap)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_editres/xapp_editres.mk b/package/x11r7/xapp_editres/xapp_editres.mk index 54f1b017f7..fc439f5174 100644 --- a/package/x11r7/xapp_editres/xapp_editres.mk +++ b/package/x11r7/xapp_editres/xapp_editres.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_editres -- a dynamic resource editor for X Toolkit applications +# xapp_editres # ################################################################################ -XAPP_EDITRES_VERSION = 1.0.2 +XAPP_EDITRES_VERSION = 1.0.5 XAPP_EDITRES_SOURCE = editres-$(XAPP_EDITRES_VERSION).tar.bz2 XAPP_EDITRES_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_EDITRES_AUTORECONF = NO +XAPP_EDITRES_LICENSE = MIT +XAPP_EDITRES_LICENSE_FILES = COPYING XAPP_EDITRES_DEPENDENCIES = xlib_libX11 xlib_libXaw xlib_libXmu xlib_libXt -$(eval $(call AUTOTARGETS,package/x11r7,xapp_editres)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_fonttosfnt/xapp_fonttosfnt.mk b/package/x11r7/xapp_fonttosfnt/xapp_fonttosfnt.mk index 00b64f1086..f935e542e4 100644 --- a/package/x11r7/xapp_fonttosfnt/xapp_fonttosfnt.mk +++ b/package/x11r7/xapp_fonttosfnt/xapp_fonttosfnt.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_fonttosfnt -- X.Org fonttosfnt application +# xapp_fonttosfnt # ################################################################################ XAPP_FONTTOSFNT_VERSION = 1.0.3 XAPP_FONTTOSFNT_SOURCE = fonttosfnt-$(XAPP_FONTTOSFNT_VERSION).tar.bz2 XAPP_FONTTOSFNT_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_FONTTOSFNT_AUTORECONF = NO +XAPP_FONTTOSFNT_LICENSE = MIT +XAPP_FONTTOSFNT_LICENSE_FILES = COPYING XAPP_FONTTOSFNT_DEPENDENCIES = freetype xlib_libX11 xlib_libfontenc -$(eval $(call AUTOTARGETS,package/x11r7,xapp_fonttosfnt)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_fslsfonts/xapp_fslsfonts.mk b/package/x11r7/xapp_fslsfonts/xapp_fslsfonts.mk index 469fb4c297..14623c942f 100644 --- a/package/x11r7/xapp_fslsfonts/xapp_fslsfonts.mk +++ b/package/x11r7/xapp_fslsfonts/xapp_fslsfonts.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_fslsfonts -- list fonts served by X font server +# xapp_fslsfonts # ################################################################################ XAPP_FSLSFONTS_VERSION = 1.0.1 XAPP_FSLSFONTS_SOURCE = fslsfonts-$(XAPP_FSLSFONTS_VERSION).tar.bz2 XAPP_FSLSFONTS_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_FSLSFONTS_AUTORECONF = NO +XAPP_FSLSFONTS_LICENSE = MIT +XAPP_FSLSFONTS_LICENSE_FILES = COPYING XAPP_FSLSFONTS_DEPENDENCIES = xlib_libFS xlib_libX11 -$(eval $(call AUTOTARGETS,package/x11r7,xapp_fslsfonts)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_fstobdf/xapp_fstobdf.mk b/package/x11r7/xapp_fstobdf/xapp_fstobdf.mk index 052b572fda..b93f7ddbe4 100644 --- a/package/x11r7/xapp_fstobdf/xapp_fstobdf.mk +++ b/package/x11r7/xapp_fstobdf/xapp_fstobdf.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_fstobdf -- generate BDF font from X font server +# xapp_fstobdf # ################################################################################ XAPP_FSTOBDF_VERSION = 1.0.2 XAPP_FSTOBDF_SOURCE = fstobdf-$(XAPP_FSTOBDF_VERSION).tar.bz2 XAPP_FSTOBDF_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_FSTOBDF_AUTORECONF = NO +XAPP_FSTOBDF_LICENSE = MIT +XAPP_FSTOBDF_LICENSE_FILES = COPYING XAPP_FSTOBDF_DEPENDENCIES = xlib_libFS xlib_libX11 -$(eval $(call AUTOTARGETS,package/x11r7,xapp_fstobdf)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_iceauth/xapp_iceauth.mk b/package/x11r7/xapp_iceauth/xapp_iceauth.mk index 3b9e373e7d..28b111d7de 100644 --- a/package/x11r7/xapp_iceauth/xapp_iceauth.mk +++ b/package/x11r7/xapp_iceauth/xapp_iceauth.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_iceauth -- ICE authority file utility +# xapp_iceauth # ################################################################################ -XAPP_ICEAUTH_VERSION = 1.0.3 +XAPP_ICEAUTH_VERSION = 1.0.5 XAPP_ICEAUTH_SOURCE = iceauth-$(XAPP_ICEAUTH_VERSION).tar.bz2 XAPP_ICEAUTH_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_ICEAUTH_AUTORECONF = NO +XAPP_ICEAUTH_LICENSE = MIT +XAPP_ICEAUTH_LICENSE_FILES = COPYING XAPP_ICEAUTH_DEPENDENCIES = xlib_libICE xlib_libX11 -$(eval $(call AUTOTARGETS,package/x11r7,xapp_iceauth)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_ico/xapp_ico.mk b/package/x11r7/xapp_ico/xapp_ico.mk index 9edeacb16b..aecd95adb9 100644 --- a/package/x11r7/xapp_ico/xapp_ico.mk +++ b/package/x11r7/xapp_ico/xapp_ico.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_ico -- animate an icosahedron or other polyhedron +# xapp_ico # ################################################################################ XAPP_ICO_VERSION = 1.0.2 XAPP_ICO_SOURCE = ico-$(XAPP_ICO_VERSION).tar.bz2 XAPP_ICO_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_ICO_AUTORECONF = NO +XAPP_ICO_LICENSE = MIT +XAPP_ICO_LICENSE_FILES = COPYING XAPP_ICO_DEPENDENCIES = xlib_libX11 -$(eval $(call AUTOTARGETS,package/x11r7,xapp_ico)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_listres/xapp_listres.mk b/package/x11r7/xapp_listres/xapp_listres.mk index f856d7c0cf..88cdd4f033 100644 --- a/package/x11r7/xapp_listres/xapp_listres.mk +++ b/package/x11r7/xapp_listres/xapp_listres.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_listres -- list resources in widgets +# xapp_listres # ################################################################################ -XAPP_LISTRES_VERSION = 1.0.1 +XAPP_LISTRES_VERSION = 1.0.3 XAPP_LISTRES_SOURCE = listres-$(XAPP_LISTRES_VERSION).tar.bz2 XAPP_LISTRES_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_LISTRES_AUTORECONF = NO +XAPP_LISTRES_LICENSE = MIT +XAPP_LISTRES_LICENSE_FILES = COPYING XAPP_LISTRES_DEPENDENCIES = xlib_libX11 xlib_libXaw xlib_libXmu xlib_libXt -$(eval $(call AUTOTARGETS,package/x11r7,xapp_listres)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_luit/xapp_luit-posix-openpt.patch b/package/x11r7/xapp_luit/xapp_luit-posix-openpt.patch new file mode 100644 index 0000000000..c8ff8e4396 --- /dev/null +++ b/package/x11r7/xapp_luit/xapp_luit-posix-openpt.patch @@ -0,0 +1,19 @@ +Suggested workaround to build with recent gcc versions + +Upstream bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47792 + +Signed-off-by: Markos Chandras + +Index: xapp_luit-1.1.1/sys.c +=================================================================== +--- xapp_luit-1.1.1.orig/sys.c ++++ xapp_luit-1.1.1/sys.c +@@ -20,6 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWAR + THE SOFTWARE. + */ + ++#define _XOPEN_SOURCE 600 ++ + #ifdef HAVE_CONFIG_H + # include "config.h" + #endif diff --git a/package/x11r7/xapp_luit/xapp_luit.mk b/package/x11r7/xapp_luit/xapp_luit.mk index dc53e050a5..d3217fe581 100644 --- a/package/x11r7/xapp_luit/xapp_luit.mk +++ b/package/x11r7/xapp_luit/xapp_luit.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_luit -- Locale and ISO 2022 support for Unicode terminals +# xapp_luit # ################################################################################ -XAPP_LUIT_VERSION = 1.0.4 +XAPP_LUIT_VERSION = 1.1.1 XAPP_LUIT_SOURCE = luit-$(XAPP_LUIT_VERSION).tar.bz2 XAPP_LUIT_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_LUIT_AUTORECONF = NO +XAPP_LUIT_LICENSE = MIT +XAPP_LUIT_LICENSE_FILES = COPYING XAPP_LUIT_DEPENDENCIES = xlib_libX11 xlib_libfontenc -$(eval $(call AUTOTARGETS,package/x11r7,xapp_luit)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_mkfontdir/xapp_mkfontdir.mk b/package/x11r7/xapp_mkfontdir/xapp_mkfontdir.mk index 443b44f34b..b74f9939ce 100644 --- a/package/x11r7/xapp_mkfontdir/xapp_mkfontdir.mk +++ b/package/x11r7/xapp_mkfontdir/xapp_mkfontdir.mk @@ -1,15 +1,15 @@ ################################################################################ # -# xapp_mkfontdir -- create an index of X font files in a directory +# xapp_mkfontdir # ################################################################################ -XAPP_MKFONTDIR_VERSION = 1.0.5 +XAPP_MKFONTDIR_VERSION = 1.0.7 XAPP_MKFONTDIR_SOURCE = mkfontdir-$(XAPP_MKFONTDIR_VERSION).tar.bz2 XAPP_MKFONTDIR_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_MKFONTDIR_AUTORECONF = NO +XAPP_MKFONTDIR_LICENSE = MIT +XAPP_MKFONTDIR_LICENSE_FILES = COPYING XAPP_MKFONTDIR_DEPENDENCIES = xapp_mkfontscale -HOST_XAPP_MKFONTDIR_DEPENDENCIES = host-xapp_mkfontscale -$(eval $(call AUTOTARGETS,package/x11r7,xapp_mkfontdir)) -$(eval $(call AUTOTARGETS,package/x11r7,xapp_mkfontdir,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xapp_mkfontscale/xapp_mkfontscale.mk b/package/x11r7/xapp_mkfontscale/xapp_mkfontscale.mk index beec9f1c88..067f380254 100644 --- a/package/x11r7/xapp_mkfontscale/xapp_mkfontscale.mk +++ b/package/x11r7/xapp_mkfontscale/xapp_mkfontscale.mk @@ -1,15 +1,15 @@ ################################################################################ # -# xapp_mkfontscale -- create an index of scalable font files for X +# xapp_mkfontscale # ################################################################################ -XAPP_MKFONTSCALE_VERSION = 1.0.7 +XAPP_MKFONTSCALE_VERSION = 1.1.0 XAPP_MKFONTSCALE_SOURCE = mkfontscale-$(XAPP_MKFONTSCALE_VERSION).tar.bz2 XAPP_MKFONTSCALE_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_MKFONTSCALE_AUTORECONF = NO +XAPP_MKFONTSCALE_LICENSE = MIT +XAPP_MKFONTSCALE_LICENSE_FILES = COPYING XAPP_MKFONTSCALE_DEPENDENCIES = zlib freetype xlib_libfontenc xproto_xproto -HOST_XAPP_MKFONTSCALE_DEPENDENCIES = host-zlib host-freetype host-xlib_libfontenc host-xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xapp_mkfontscale)) -$(eval $(call AUTOTARGETS,package/x11r7,xapp_mkfontscale,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xapp_oclock/xapp_oclock.mk b/package/x11r7/xapp_oclock/xapp_oclock.mk index d3f09c0fec..d3949de2c0 100644 --- a/package/x11r7/xapp_oclock/xapp_oclock.mk +++ b/package/x11r7/xapp_oclock/xapp_oclock.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_oclock -- round X clock +# xapp_oclock # ################################################################################ XAPP_OCLOCK_VERSION = 1.0.1 XAPP_OCLOCK_SOURCE = oclock-$(XAPP_OCLOCK_VERSION).tar.bz2 XAPP_OCLOCK_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_OCLOCK_AUTORECONF = NO +XAPP_OCLOCK_LICENSE = MIT +XAPP_OCLOCK_LICENSE_FILES = COPYING XAPP_OCLOCK_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXmu -$(eval $(call AUTOTARGETS,package/x11r7,xapp_oclock)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_rgb/xapp_rgb.mk b/package/x11r7/xapp_rgb/xapp_rgb.mk index 95ee70bbf9..f597c8c775 100644 --- a/package/x11r7/xapp_rgb/xapp_rgb.mk +++ b/package/x11r7/xapp_rgb/xapp_rgb.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_rgb -- uncompile an rgb color-name database +# xapp_rgb # ################################################################################ XAPP_RGB_VERSION = 1.0.1 XAPP_RGB_SOURCE = rgb-$(XAPP_RGB_VERSION).tar.bz2 XAPP_RGB_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_RGB_AUTORECONF = NO +XAPP_RGB_LICENSE = MIT +XAPP_RGB_LICENSE_FILES = COPYING XAPP_RGB_DEPENDENCIES = xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xapp_rgb)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_rstart/xapp_rstart.mk b/package/x11r7/xapp_rstart/xapp_rstart.mk index aa37f29a52..aa6a4b3a71 100644 --- a/package/x11r7/xapp_rstart/xapp_rstart.mk +++ b/package/x11r7/xapp_rstart/xapp_rstart.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_rstart -- X.Org rstart application +# xapp_rstart # ################################################################################ XAPP_RSTART_VERSION = 1.0.2 XAPP_RSTART_SOURCE = rstart-$(XAPP_RSTART_VERSION).tar.bz2 XAPP_RSTART_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_RSTART_AUTORECONF = NO +XAPP_RSTART_LICENSE = MIT +XAPP_RSTART_LICENSE_FILES = COPYING XAPP_RSTART_DEPENDENCIES = xlib_libX11 -$(eval $(call AUTOTARGETS,package/x11r7,xapp_rstart)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_scripts/xapp_scripts.mk b/package/x11r7/xapp_scripts/xapp_scripts.mk index 00fb6956aa..5146db5708 100644 --- a/package/x11r7/xapp_scripts/xapp_scripts.mk +++ b/package/x11r7/xapp_scripts/xapp_scripts.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_scripts -- start an X program on a remote machine +# xapp_scripts # ################################################################################ XAPP_SCRIPTS_VERSION = 1.0.1 XAPP_SCRIPTS_SOURCE = scripts-$(XAPP_SCRIPTS_VERSION).tar.bz2 XAPP_SCRIPTS_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_SCRIPTS_AUTORECONF = NO +XAPP_SCRIPTS_LICENSE = MIT +XAPP_SCRIPTS_LICENSE_FILES = COPYING XAPP_SCRIPTS_DEPENDENCIES = xlib_libX11 -$(eval $(call AUTOTARGETS,package/x11r7,xapp_scripts)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_sessreg/xapp_sessreg.mk b/package/x11r7/xapp_sessreg/xapp_sessreg.mk index 699537d70c..ba2a07b086 100644 --- a/package/x11r7/xapp_sessreg/xapp_sessreg.mk +++ b/package/x11r7/xapp_sessreg/xapp_sessreg.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_sessreg -- manage utmp/wtmp entries for non-init clients +# xapp_sessreg # ################################################################################ -XAPP_SESSREG_VERSION = 1.0.5 +XAPP_SESSREG_VERSION = 1.0.7 XAPP_SESSREG_SOURCE = sessreg-$(XAPP_SESSREG_VERSION).tar.bz2 XAPP_SESSREG_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_SESSREG_AUTORECONF = NO +XAPP_SESSREG_LICENSE = MIT +XAPP_SESSREG_LICENSE_FILES = COPYING XAPP_SESSREG_DEPENDENCIES = xlib_libX11 xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xapp_sessreg)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_setxkbmap/xapp_setxkbmap.mk b/package/x11r7/xapp_setxkbmap/xapp_setxkbmap.mk index 7c9d0f823d..9ecf9533ad 100644 --- a/package/x11r7/xapp_setxkbmap/xapp_setxkbmap.mk +++ b/package/x11r7/xapp_setxkbmap/xapp_setxkbmap.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_setxkbmap -- Controls the keyboard layout of a running X server. +# xapp_setxkbmap # ################################################################################ -XAPP_SETXKBMAP_VERSION = 1.1.0 +XAPP_SETXKBMAP_VERSION = 1.3.0 XAPP_SETXKBMAP_SOURCE = setxkbmap-$(XAPP_SETXKBMAP_VERSION).tar.bz2 XAPP_SETXKBMAP_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_SETXKBMAP_AUTORECONF = NO +XAPP_SETXKBMAP_LICENSE = MIT +XAPP_SETXKBMAP_LICENSE_FILES = COPYING XAPP_SETXKBMAP_DEPENDENCIES = xlib_libX11 xlib_libxkbfile -$(eval $(call AUTOTARGETS,package/x11r7,xapp_setxkbmap)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_showfont/xapp_showfont.mk b/package/x11r7/xapp_showfont/xapp_showfont.mk index 21273e401f..413786a8f7 100644 --- a/package/x11r7/xapp_showfont/xapp_showfont.mk +++ b/package/x11r7/xapp_showfont/xapp_showfont.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_showfont -- font dumper for X font server +# xapp_showfont # ################################################################################ XAPP_SHOWFONT_VERSION = 1.0.1 XAPP_SHOWFONT_SOURCE = showfont-$(XAPP_SHOWFONT_VERSION).tar.bz2 XAPP_SHOWFONT_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_SHOWFONT_AUTORECONF = NO +XAPP_SHOWFONT_LICENSE = MIT +XAPP_SHOWFONT_LICENSE_FILES = COPYING XAPP_SHOWFONT_DEPENDENCIES = xlib_libFS -$(eval $(call AUTOTARGETS,package/x11r7,xapp_showfont)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_smproxy/xapp_smproxy.mk b/package/x11r7/xapp_smproxy/xapp_smproxy.mk index fa2acb3b5b..863e4f62c5 100644 --- a/package/x11r7/xapp_smproxy/xapp_smproxy.mk +++ b/package/x11r7/xapp_smproxy/xapp_smproxy.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_smproxy -- Session Manager Proxy +# xapp_smproxy # ################################################################################ -XAPP_SMPROXY_VERSION = 1.0.3 +XAPP_SMPROXY_VERSION = 1.0.5 XAPP_SMPROXY_SOURCE = smproxy-$(XAPP_SMPROXY_VERSION).tar.bz2 XAPP_SMPROXY_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_SMPROXY_AUTORECONF = NO +XAPP_SMPROXY_LICENSE = MIT +XAPP_SMPROXY_LICENSE_FILES = COPYING XAPP_SMPROXY_DEPENDENCIES = xlib_libXmu xlib_libXt -$(eval $(call AUTOTARGETS,package/x11r7,xapp_smproxy)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_twm/xapp_twm.mk b/package/x11r7/xapp_twm/xapp_twm.mk index bc35293e44..f566e104e3 100644 --- a/package/x11r7/xapp_twm/xapp_twm.mk +++ b/package/x11r7/xapp_twm/xapp_twm.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_twm -- No description available +# xapp_twm # ################################################################################ -XAPP_TWM_VERSION = 1.0.3 +XAPP_TWM_VERSION = 1.0.6 XAPP_TWM_SOURCE = twm-$(XAPP_TWM_VERSION).tar.bz2 XAPP_TWM_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_TWM_AUTORECONF = NO +XAPP_TWM_LICENSE = MIT +XAPP_TWM_LICENSE_FILES = COPYING XAPP_TWM_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXt xlib_libXmu -$(eval $(call AUTOTARGETS,package/x11r7,xapp_twm)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_viewres/xapp_viewres.mk b/package/x11r7/xapp_viewres/xapp_viewres.mk index a2cd1ea691..6a7fe51eba 100644 --- a/package/x11r7/xapp_viewres/xapp_viewres.mk +++ b/package/x11r7/xapp_viewres/xapp_viewres.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_viewres -- graphical class browser for Xt +# xapp_viewres # ################################################################################ -XAPP_VIEWRES_VERSION = 1.0.1 +XAPP_VIEWRES_VERSION = 1.0.3 XAPP_VIEWRES_SOURCE = viewres-$(XAPP_VIEWRES_VERSION).tar.bz2 XAPP_VIEWRES_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_VIEWRES_AUTORECONF = NO +XAPP_VIEWRES_LICENSE = MIT +XAPP_VIEWRES_LICENSE_FILES = COPYING XAPP_VIEWRES_DEPENDENCIES = xlib_libXaw -$(eval $(call AUTOTARGETS,package/x11r7,xapp_viewres)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_x11perf/xapp_x11perf.mk b/package/x11r7/xapp_x11perf/xapp_x11perf.mk index ac8cd7a61f..a871486422 100644 --- a/package/x11r7/xapp_x11perf/xapp_x11perf.mk +++ b/package/x11r7/xapp_x11perf/xapp_x11perf.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_x11perf -- summarize x11perf results +# xapp_x11perf # ################################################################################ -XAPP_X11PERF_VERSION = 1.5.1 +XAPP_X11PERF_VERSION = 1.5.4 XAPP_X11PERF_SOURCE = x11perf-$(XAPP_X11PERF_VERSION).tar.bz2 XAPP_X11PERF_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_X11PERF_AUTORECONF = NO +XAPP_X11PERF_LICENSE = MIT +XAPP_X11PERF_LICENSE_FILES = COPYING XAPP_X11PERF_DEPENDENCIES = xlib_libX11 xlib_libXmu xlib_libXft -$(eval $(call AUTOTARGETS,package/x11r7,xapp_x11perf)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xauth/xapp_xauth-1.0.3-xcb.patch b/package/x11r7/xapp_xauth/xapp_xauth-1.0.3-xcb.patch deleted file mode 100644 index 61c6b14f99..0000000000 --- a/package/x11r7/xapp_xauth/xapp_xauth-1.0.3-xcb.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- xauth-1.0.3/configure.ac.orig 2007-06-06 22:33:44.000000000 +0200 -+++ xauth-1.0.3/configure.ac 2007-06-06 22:33:57.000000000 +0200 -@@ -40,7 +40,7 @@ - AC_CHECK_HEADERS([net/errno.h]) - - # Checks for pkg-config packages --PKG_CHECK_MODULES(XAUTH, x11 xau xext xmuu) -+PKG_CHECK_MODULES(XAUTH, x11 xau xext xmuu xcb) - AC_SUBST(XAUTH_CFLAGS) - AC_SUBST(XAUTH_LIBS) - diff --git a/package/x11r7/xapp_xauth/xapp_xauth.mk b/package/x11r7/xapp_xauth/xapp_xauth.mk index c0ab92d08a..0c13463f81 100644 --- a/package/x11r7/xapp_xauth/xapp_xauth.mk +++ b/package/x11r7/xapp_xauth/xapp_xauth.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xauth -- X authority file utility +# xapp_xauth # ################################################################################ -XAPP_XAUTH_VERSION = 1.0.4 +XAPP_XAUTH_VERSION = 1.0.7 XAPP_XAUTH_SOURCE = xauth-$(XAPP_XAUTH_VERSION).tar.bz2 XAPP_XAUTH_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XAUTH_AUTORECONF = NO +XAPP_XAUTH_LICENSE = MIT +XAPP_XAUTH_LICENSE_FILES = COPYING XAPP_XAUTH_DEPENDENCIES = xlib_libX11 xlib_libXau xlib_libXext xlib_libXmu -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xauth)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xbacklight/xapp_xbacklight.mk b/package/x11r7/xapp_xbacklight/xapp_xbacklight.mk index 9da0c65a67..d4325aa084 100644 --- a/package/x11r7/xapp_xbacklight/xapp_xbacklight.mk +++ b/package/x11r7/xapp_xbacklight/xapp_xbacklight.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_backlight -- xbacklight +# xapp_xbacklight # ################################################################################ -XAPP_XBACKLIGHT_VERSION = 1.1.1 +XAPP_XBACKLIGHT_VERSION = 1.1.2 XAPP_XBACKLIGHT_SOURCE = xbacklight-$(XAPP_XBACKLIGHT_VERSION).tar.bz2 XAPP_XBACKLIGHT_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XBACKLIGHT_AUTORECONF = NO +XAPP_XBACKLIGHT_LICENSE = MIT +XAPP_XBACKLIGHT_LICENSE_FILES = COPYING XAPP_XBACKLIGHT_DEPENDENCIES = xlib_libX11 xlib_libXrandr xlib_libXrender -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xbacklight)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xbiff/xapp_xbiff.mk b/package/x11r7/xapp_xbiff/xapp_xbiff.mk index 6959398253..73e0350afb 100644 --- a/package/x11r7/xapp_xbiff/xapp_xbiff.mk +++ b/package/x11r7/xapp_xbiff/xapp_xbiff.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xbiff -- mailbox flag for X +# xapp_xbiff # ################################################################################ -XAPP_XBIFF_VERSION = 1.0.1 +XAPP_XBIFF_VERSION = 1.0.3 XAPP_XBIFF_SOURCE = xbiff-$(XAPP_XBIFF_VERSION).tar.bz2 XAPP_XBIFF_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XBIFF_AUTORECONF = NO +XAPP_XBIFF_LICENSE = MIT +XAPP_XBIFF_LICENSE_FILES = COPYING XAPP_XBIFF_DEPENDENCIES = xlib_libXaw xdata_xbitmaps -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xbiff)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xcalc/xapp_xcalc.mk b/package/x11r7/xapp_xcalc/xapp_xcalc.mk index e3ef39c56d..b53684b2ff 100644 --- a/package/x11r7/xapp_xcalc/xapp_xcalc.mk +++ b/package/x11r7/xapp_xcalc/xapp_xcalc.mk @@ -1,14 +1,15 @@ ################################################################################ # -# xapp_xcalc -- scientific calculator for X +# xapp_xcalc # ################################################################################ XAPP_XCALC_VERSION = 1.0.2 XAPP_XCALC_SOURCE = xcalc-$(XAPP_XCALC_VERSION).tar.bz2 XAPP_XCALC_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XCALC_AUTORECONF = NO +XAPP_XCALC_LICENSE = MIT +XAPP_XCALC_LICENSE_FILES = COPYING XAPP_XCALC_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install-exec install-data XAPP_XCALC_DEPENDENCIES = xlib_libXaw -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xcalc)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xclipboard/xapp_xclipboard.mk b/package/x11r7/xapp_xclipboard/xapp_xclipboard.mk index 9cfeddd258..1d45970c37 100644 --- a/package/x11r7/xapp_xclipboard/xapp_xclipboard.mk +++ b/package/x11r7/xapp_xclipboard/xapp_xclipboard.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xclipboard -- interchange between cut buffer and selection +# xapp_xclipboard # ################################################################################ -XAPP_XCLIPBOARD_VERSION = 1.0.1 +XAPP_XCLIPBOARD_VERSION = 1.1.2 XAPP_XCLIPBOARD_SOURCE = xclipboard-$(XAPP_XCLIPBOARD_VERSION).tar.bz2 XAPP_XCLIPBOARD_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XCLIPBOARD_AUTORECONF = NO -XAPP_XCLIPBOARD_DEPENDENCIES = xlib_libXaw +XAPP_XCLIPBOARD_LICENSE = MIT +XAPP_XCLIPBOARD_LICENSE_FILES = COPYING +XAPP_XCLIPBOARD_DEPENDENCIES = xlib_libXaw xlib_libXmu xlib_libXt -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xclipboard)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xclock/xapp_xclock.mk b/package/x11r7/xapp_xclock/xapp_xclock.mk index 56b22fca67..5f4eb31fac 100644 --- a/package/x11r7/xapp_xclock/xapp_xclock.mk +++ b/package/x11r7/xapp_xclock/xapp_xclock.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xclock -- analog / digital clock for X +# xapp_xclock # ################################################################################ -XAPP_XCLOCK_VERSION = 1.0.3 +XAPP_XCLOCK_VERSION = 1.0.6 XAPP_XCLOCK_SOURCE = xclock-$(XAPP_XCLOCK_VERSION).tar.bz2 XAPP_XCLOCK_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XCLOCK_AUTORECONF = NO +XAPP_XCLOCK_LICENSE = MIT +XAPP_XCLOCK_LICENSE_FILES = COPYING XAPP_XCLOCK_DEPENDENCIES = xlib_libX11 xlib_libXaw xlib_libXft xlib_libXrender xlib_libxkbfile -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xclock)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xcmsdb/xapp_xcmsdb.mk b/package/x11r7/xapp_xcmsdb/xapp_xcmsdb.mk index 06af50de75..d08dfaade4 100644 --- a/package/x11r7/xapp_xcmsdb/xapp_xcmsdb.mk +++ b/package/x11r7/xapp_xcmsdb/xapp_xcmsdb.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xcmsdb -- Device Color Characterization utility for X Color Management System +# xapp_xcmsdb # ################################################################################ -XAPP_XCMSDB_VERSION = 1.0.2 +XAPP_XCMSDB_VERSION = 1.0.4 XAPP_XCMSDB_SOURCE = xcmsdb-$(XAPP_XCMSDB_VERSION).tar.bz2 XAPP_XCMSDB_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XCMSDB_AUTORECONF = NO +XAPP_XCMSDB_LICENSE = MIT +XAPP_XCMSDB_LICENSE_FILES = COPYING XAPP_XCMSDB_DEPENDENCIES = xlib_libX11 -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xcmsdb)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xcursorgen/xapp_xcursorgen.mk b/package/x11r7/xapp_xcursorgen/xapp_xcursorgen.mk index 746564ffd9..174fa17bbd 100644 --- a/package/x11r7/xapp_xcursorgen/xapp_xcursorgen.mk +++ b/package/x11r7/xapp_xcursorgen/xapp_xcursorgen.mk @@ -1,13 +1,15 @@ ################################################################################ # -# xapp_xcursorgen -- create an X cursor file from a collection of PNG images +# xapp_xcursorgen # ################################################################################ -XAPP_XCURSORGEN_VERSION = 1.0.4 +XAPP_XCURSORGEN_VERSION = 1.0.5 XAPP_XCURSORGEN_SOURCE = xcursorgen-$(XAPP_XCURSORGEN_VERSION).tar.bz2 XAPP_XCURSORGEN_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XCURSORGEN_AUTORECONF = NO +XAPP_XCURSORGEN_LICENSE = MIT +XAPP_XCURSORGEN_LICENSE_FILES = COPYING XAPP_XCURSORGEN_DEPENDENCIES = libpng xlib_libX11 xlib_libXcursor -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xcursorgen)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xapp_xdbedizzy/Config.in b/package/x11r7/xapp_xdbedizzy/Config.in index 5cba398f11..e4a5960fdd 100644 --- a/package/x11r7/xapp_xdbedizzy/Config.in +++ b/package/x11r7/xapp_xdbedizzy/Config.in @@ -1,7 +1,5 @@ config BR2_PACKAGE_XAPP_XDBEDIZZY bool "xdbedizzy" select BR2_PACKAGE_XLIB_LIBXEXT - select BR2_PACKAGE_XLIB_LIBXP - select BR2_PACKAGE_XLIB_LIBXPRINTUTIL help X.Org xdbedizzy application diff --git a/package/x11r7/xapp_xdbedizzy/xapp_xdbedizzy.mk b/package/x11r7/xapp_xdbedizzy/xapp_xdbedizzy.mk index 9f8135798b..e732dc4124 100644 --- a/package/x11r7/xapp_xdbedizzy/xapp_xdbedizzy.mk +++ b/package/x11r7/xapp_xdbedizzy/xapp_xdbedizzy.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xdbedizzy -- X.Org xdbedizzy application +# xapp_xdbedizzy # ################################################################################ XAPP_XDBEDIZZY_VERSION = 1.0.2 XAPP_XDBEDIZZY_SOURCE = xdbedizzy-$(XAPP_XDBEDIZZY_VERSION).tar.bz2 XAPP_XDBEDIZZY_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XDBEDIZZY_AUTORECONF = NO -XAPP_XDBEDIZZY_DEPENDENCIES = xlib_libXext xlib_libXp xlib_libXprintUtil +XAPP_XDBEDIZZY_LICENSE = MIT +XAPP_XDBEDIZZY_LICENSE_FILES = COPYING +XAPP_XDBEDIZZY_DEPENDENCIES = xlib_libXext -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xdbedizzy)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xditview/xapp_xditview.mk b/package/x11r7/xapp_xditview/xapp_xditview.mk index 9d69d81bd9..2ead9a5e47 100644 --- a/package/x11r7/xapp_xditview/xapp_xditview.mk +++ b/package/x11r7/xapp_xditview/xapp_xditview.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xditview -- display ditroff output +# xapp_xditview # ################################################################################ -XAPP_XDITVIEW_VERSION = 1.0.1 +XAPP_XDITVIEW_VERSION = 1.0.2 XAPP_XDITVIEW_SOURCE = xditview-$(XAPP_XDITVIEW_VERSION).tar.bz2 XAPP_XDITVIEW_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XDITVIEW_AUTORECONF = NO +XAPP_XDITVIEW_LICENSE = MIT +XAPP_XDITVIEW_LICENSE_FILES = COPYING XAPP_XDITVIEW_DEPENDENCIES = xlib_libXaw -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xditview)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xdm/Config.in b/package/x11r7/xapp_xdm/Config.in index b1c50d5247..477cd771cd 100644 --- a/package/x11r7/xapp_xdm/Config.in +++ b/package/x11r7/xapp_xdm/Config.in @@ -1,6 +1,7 @@ config BR2_PACKAGE_XAPP_XDM bool "xdm" - select BR2_PACKAGE_XAPP_XINIT + # Runtime dependency: can't start an X server unless there is one + depends on BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XAPP_SESSREG select BR2_PACKAGE_XAPP_XRDB select BR2_PACKAGE_XLIB_LIBX11 diff --git a/package/x11r7/xapp_xdm/S99xdm b/package/x11r7/xapp_xdm/S99xdm new file mode 100644 index 0000000000..4dd1cd8882 --- /dev/null +++ b/package/x11r7/xapp_xdm/S99xdm @@ -0,0 +1,25 @@ +#!/bin/sh + +XDM_BIN=/usr/bin/xdm + +case "$1" in + start) + echo -n "Starting XDM: " + $XDM_BIN + echo "done" + ;; + stop) + echo "Stopping XDM" + killall -q xdm + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 + ;; +esac + +exit 0 diff --git a/package/x11r7/xapp_xdm/xapp_xdm.mk b/package/x11r7/xapp_xdm/xapp_xdm.mk index e05ffc8adf..42c93ddd93 100644 --- a/package/x11r7/xapp_xdm/xapp_xdm.mk +++ b/package/x11r7/xapp_xdm/xapp_xdm.mk @@ -1,14 +1,24 @@ ################################################################################ # -# xapp_xdm -- X.Org xdm application +# xapp_xdm # ################################################################################ -XAPP_XDM_VERSION = 1.1.6 +XAPP_XDM_VERSION = 1.1.11 XAPP_XDM_SOURCE = xdm-$(XAPP_XDM_VERSION).tar.bz2 XAPP_XDM_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XDM_AUTORECONF = NO +XAPP_XDM_LICENSE = MIT +XAPP_XDM_LICENSE_FILES = COPYING XAPP_XDM_CONF_ENV = ac_cv_file__dev_urandom=yes -XAPP_XDM_DEPENDENCIES = xapp_xinit xapp_sessreg xapp_xrdb xlib_libX11 xlib_libXaw xlib_libXdmcp xlib_libXinerama xlib_libXt xproto_xineramaproto xproto_xproto +XAPP_XDM_DEPENDENCIES = xapp_sessreg xapp_xrdb xlib_libX11 xlib_libXaw xlib_libXdmcp xlib_libXinerama xlib_libXt xproto_xineramaproto xproto_xproto +XAPP_XDM_CONF_OPT = --with-utmp-file=/var/adm/utmpx \ + --with-wtmp-file=/var/adm/wtmpx -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xdm)) +define XAPP_XDM_INSTALL_STARTUP_SCRIPT + $(INSTALL) -m 0755 -D package/x11r7/xapp_xdm/S99xdm \ + $(TARGET_DIR)/etc/init.d/S99xdm +endef + +XAPP_XDM_POST_INSTALL_TARGET_HOOKS += XAPP_XDM_INSTALL_STARTUP_SCRIPT + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xdpyinfo/Config.in b/package/x11r7/xapp_xdpyinfo/Config.in index e6ff686113..261a63fe71 100644 --- a/package/x11r7/xapp_xdpyinfo/Config.in +++ b/package/x11r7/xapp_xdpyinfo/Config.in @@ -3,14 +3,12 @@ config BR2_PACKAGE_XAPP_XDPYINFO select BR2_PACKAGE_XLIB_LIBX11 select BR2_PACKAGE_XLIB_LIBXEXT select BR2_PACKAGE_XLIB_LIBXI - select BR2_PACKAGE_XLIB_LIBXP select BR2_PACKAGE_XLIB_LIBXRENDER select BR2_PACKAGE_XLIB_LIBXTST select BR2_PACKAGE_XLIB_LIBXXF86DGA select BR2_PACKAGE_XLIB_LIBXXF86VM select BR2_PACKAGE_XPROTO_INPUTPROTO select BR2_PACKAGE_XPROTO_KBPROTO - select BR2_PACKAGE_XPROTO_PRINTPROTO select BR2_PACKAGE_XPROTO_RENDERPROTO select BR2_PACKAGE_XPROTO_XF86DGAPROTO select BR2_PACKAGE_XPROTO_XF86VIDMODEPROTO diff --git a/package/x11r7/xapp_xdpyinfo/xapp_xdpyinfo.mk b/package/x11r7/xapp_xdpyinfo/xapp_xdpyinfo.mk index 36cc0679b5..21439884e5 100644 --- a/package/x11r7/xapp_xdpyinfo/xapp_xdpyinfo.mk +++ b/package/x11r7/xapp_xdpyinfo/xapp_xdpyinfo.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xdpyinfo -- display information utility for X +# xapp_xdpyinfo # ################################################################################ -XAPP_XDPYINFO_VERSION = 1.1.0 +XAPP_XDPYINFO_VERSION = 1.3.0 XAPP_XDPYINFO_SOURCE = xdpyinfo-$(XAPP_XDPYINFO_VERSION).tar.bz2 XAPP_XDPYINFO_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XDPYINFO_AUTORECONF = NO -XAPP_XDPYINFO_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXi xlib_libXp xlib_libXrender xlib_libXtst xlib_libXxf86dga xlib_libXxf86vm xproto_inputproto xproto_kbproto xproto_printproto xproto_renderproto xproto_xf86dgaproto xproto_xf86vidmodeproto xlib_libdmx +XAPP_XDPYINFO_LICENSE = MIT +XAPP_XDPYINFO_LICENSE_FILES = COPYING +XAPP_XDPYINFO_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXi xlib_libXrender xlib_libXtst xlib_libXxf86dga xlib_libXxf86vm xproto_inputproto xproto_kbproto xproto_renderproto xproto_xf86dgaproto xproto_xf86vidmodeproto xlib_libdmx -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xdpyinfo)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xdriinfo/xapp_xdriinfo.mk b/package/x11r7/xapp_xdriinfo/xapp_xdriinfo.mk index ce4716dca5..d37ec32ba3 100644 --- a/package/x11r7/xapp_xdriinfo/xapp_xdriinfo.mk +++ b/package/x11r7/xapp_xdriinfo/xapp_xdriinfo.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xdriinfo -- query configuration information of DRI drivers +# xapp_xdriinfo # ################################################################################ -XAPP_XDRIINFO_VERSION = 1.0.3 +XAPP_XDRIINFO_VERSION = 1.0.4 XAPP_XDRIINFO_SOURCE = xdriinfo-$(XAPP_XDRIINFO_VERSION).tar.bz2 XAPP_XDRIINFO_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XDRIINFO_AUTORECONF = NO +XAPP_XDRIINFO_LICENSE = MIT +XAPP_XDRIINFO_LICENSE_FILES = COPYING XAPP_XDRIINFO_DEPENDENCIES = xlib_libX11 xproto_glproto mesa3d -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xdriinfo)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xedit/Config.in b/package/x11r7/xapp_xedit/Config.in index 98e230d3d5..5a7045907c 100644 --- a/package/x11r7/xapp_xedit/Config.in +++ b/package/x11r7/xapp_xedit/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XAPP_XEDIT bool "xedit" select BR2_PACKAGE_XLIB_LIBXAW - select BR2_PACKAGE_XLIB_LIBXPRINTUTIL help simple text editor for X diff --git a/package/x11r7/xapp_xedit/xapp_xedit.mk b/package/x11r7/xapp_xedit/xapp_xedit.mk index 888d54ec4b..f180ad2c9d 100644 --- a/package/x11r7/xapp_xedit/xapp_xedit.mk +++ b/package/x11r7/xapp_xedit/xapp_xedit.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xedit -- simple text editor for X +# xapp_xedit # ################################################################################ -XAPP_XEDIT_VERSION = 1.0.2 +XAPP_XEDIT_VERSION = 1.2.0 XAPP_XEDIT_SOURCE = xedit-$(XAPP_XEDIT_VERSION).tar.bz2 XAPP_XEDIT_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XEDIT_AUTORECONF = NO -XAPP_XEDIT_DEPENDENCIES = xlib_libXaw xlib_libXprintUtil +XAPP_XEDIT_LICENSE = MIT +XAPP_XEDIT_LICENSE_FILES = COPYING +XAPP_XEDIT_DEPENDENCIES = xlib_libXaw -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xedit)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xev/Config.in b/package/x11r7/xapp_xev/Config.in index e2e05b35d0..864d6424da 100644 --- a/package/x11r7/xapp_xev/Config.in +++ b/package/x11r7/xapp_xev/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_XAPP_XEV bool "xev" select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXRANDR help print contents of X events diff --git a/package/x11r7/xapp_xev/xapp_xev.mk b/package/x11r7/xapp_xev/xapp_xev.mk index 19be2c166f..f98868ccb9 100644 --- a/package/x11r7/xapp_xev/xapp_xev.mk +++ b/package/x11r7/xapp_xev/xapp_xev.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xev -- print contents of X events +# xapp_xev # ################################################################################ -XAPP_XEV_VERSION = 1.0.4 +XAPP_XEV_VERSION = 1.2.0 XAPP_XEV_SOURCE = xev-$(XAPP_XEV_VERSION).tar.bz2 XAPP_XEV_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XEV_AUTORECONF = NO -XAPP_XEV_DEPENDENCIES = xlib_libX11 +XAPP_XEV_LICENSE = MIT +XAPP_XEV_LICENSE_FILES = COPYING +XAPP_XEV_DEPENDENCIES = xlib_libX11 xlib_libXrandr -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xev)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xeyes/xapp_xeyes.mk b/package/x11r7/xapp_xeyes/xapp_xeyes.mk index 74358d543b..2bed751732 100644 --- a/package/x11r7/xapp_xeyes/xapp_xeyes.mk +++ b/package/x11r7/xapp_xeyes/xapp_xeyes.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xeyes -- X.Org xeyes application +# xapp_xeyes # ################################################################################ XAPP_XEYES_VERSION = 1.0.1 XAPP_XEYES_SOURCE = xeyes-$(XAPP_XEYES_VERSION).tar.bz2 XAPP_XEYES_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XEYES_AUTORECONF = NO +XAPP_XEYES_LICENSE = MIT +XAPP_XEYES_LICENSE_FILES = COPYING XAPP_XEYES_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXmu xlib_libXt -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xeyes)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xf86dga/xapp_xf86dga.mk b/package/x11r7/xapp_xf86dga/xapp_xf86dga.mk index da141ae4f6..07b6ac9d5b 100644 --- a/package/x11r7/xapp_xf86dga/xapp_xf86dga.mk +++ b/package/x11r7/xapp_xf86dga/xapp_xf86dga.mk @@ -1,13 +1,20 @@ ################################################################################ # -# xapp_xf86dga -- test program for the XFree86-DGA extension +# xapp_xf86dga # ################################################################################ XAPP_XF86DGA_VERSION = 1.0.2 XAPP_XF86DGA_SOURCE = xf86dga-$(XAPP_XF86DGA_VERSION).tar.bz2 XAPP_XF86DGA_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XF86DGA_AUTORECONF = NO -XAPP_XF86DGA_DEPENDENCIES = xlib_libX11 xlib_libXxf86dga +XAPP_XF86DGA_LICENSE = MIT +XAPP_XF86DGA_LICENSE_FILES = COPYING +XAPP_XF86DGA_DEPENDENCIES = \ + host-pkgconf \ + xlib_libX11 \ + xlib_libXxf86dga \ + xlib_libXt \ + xlib_libXaw \ + xlib_libXmu -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xf86dga)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xfd/xapp_xfd.mk b/package/x11r7/xapp_xfd/xapp_xfd.mk index 622dafd9a4..5308a5c9f9 100644 --- a/package/x11r7/xapp_xfd/xapp_xfd.mk +++ b/package/x11r7/xapp_xfd/xapp_xfd.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xfd -- X.Org xfd application +# xapp_xfd # ################################################################################ -XAPP_XFD_VERSION = 1.0.1 +XAPP_XFD_VERSION = 1.1.1 XAPP_XFD_SOURCE = xfd-$(XAPP_XFD_VERSION).tar.bz2 XAPP_XFD_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XFD_AUTORECONF = NO +XAPP_XFD_LICENSE = MIT +XAPP_XFD_LICENSE_FILES = COPYING XAPP_XFD_DEPENDENCIES = freetype fontconfig xlib_libXaw xlib_libXft -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xfd)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xfontsel/xapp_xfontsel.mk b/package/x11r7/xapp_xfontsel/xapp_xfontsel.mk index 2b271605df..1a6476395f 100644 --- a/package/x11r7/xapp_xfontsel/xapp_xfontsel.mk +++ b/package/x11r7/xapp_xfontsel/xapp_xfontsel.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xfontsel -- point and click selection of X11 font names +# xapp_xfontsel # ################################################################################ -XAPP_XFONTSEL_VERSION = 1.0.1 +XAPP_XFONTSEL_VERSION = 1.0.4 XAPP_XFONTSEL_SOURCE = xfontsel-$(XAPP_XFONTSEL_VERSION).tar.bz2 XAPP_XFONTSEL_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XFONTSEL_AUTORECONF = NO +XAPP_XFONTSEL_LICENSE = MIT +XAPP_XFONTSEL_LICENSE_FILES = COPYING XAPP_XFONTSEL_DEPENDENCIES = xlib_libXaw -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xfontsel)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xfs/xapp_xfs.mk b/package/x11r7/xapp_xfs/xapp_xfs.mk index 2398d6b1cb..3c639061d3 100644 --- a/package/x11r7/xapp_xfs/xapp_xfs.mk +++ b/package/x11r7/xapp_xfs/xapp_xfs.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xfs -- X font server +# xapp_xfs # ################################################################################ XAPP_XFS_VERSION = 1.0.5 XAPP_XFS_SOURCE = xfs-$(XAPP_XFS_VERSION).tar.bz2 XAPP_XFS_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XFS_AUTORECONF = NO +XAPP_XFS_LICENSE = MIT +XAPP_XFS_LICENSE_FILES = COPYING XAPP_XFS_DEPENDENCIES = xlib_libFS xlib_libXfont xproto_fontsproto -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xfs)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xfsinfo/xapp_xfsinfo.mk b/package/x11r7/xapp_xfsinfo/xapp_xfsinfo.mk index 1ea7306416..738b28ad81 100644 --- a/package/x11r7/xapp_xfsinfo/xapp_xfsinfo.mk +++ b/package/x11r7/xapp_xfsinfo/xapp_xfsinfo.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xfsinfo -- X font server information utility +# xapp_xfsinfo # ################################################################################ XAPP_XFSINFO_VERSION = 1.0.1 XAPP_XFSINFO_SOURCE = xfsinfo-$(XAPP_XFSINFO_VERSION).tar.bz2 XAPP_XFSINFO_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XFSINFO_AUTORECONF = NO +XAPP_XFSINFO_LICENSE = MIT +XAPP_XFSINFO_LICENSE_FILES = COPYING XAPP_XFSINFO_DEPENDENCIES = xlib_libFS xlib_libX11 -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xfsinfo)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xgamma/xapp_xgamma.mk b/package/x11r7/xapp_xgamma/xapp_xgamma.mk index 2bdaa27377..bd87f52091 100644 --- a/package/x11r7/xapp_xgamma/xapp_xgamma.mk +++ b/package/x11r7/xapp_xgamma/xapp_xgamma.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xgamma -- Alter a monitor's gamma correction through the X server +# xapp_xgamma # ################################################################################ -XAPP_XGAMMA_VERSION = 1.0.3 +XAPP_XGAMMA_VERSION = 1.0.5 XAPP_XGAMMA_SOURCE = xgamma-$(XAPP_XGAMMA_VERSION).tar.bz2 XAPP_XGAMMA_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XGAMMA_AUTORECONF = NO +XAPP_XGAMMA_LICENSE = MIT +XAPP_XGAMMA_LICENSE_FILES = COPYING XAPP_XGAMMA_DEPENDENCIES = xlib_libXxf86vm -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xgamma)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xgc/xapp_xgc-replace-ac-check-file.patch b/package/x11r7/xapp_xgc/xapp_xgc-replace-ac-check-file.patch new file mode 100644 index 0000000000..97cbcdab9a --- /dev/null +++ b/package/x11r7/xapp_xgc/xapp_xgc-replace-ac-check-file.patch @@ -0,0 +1,29 @@ +From ff668395fc408f540604bd534e323b483f52a4ea Mon Sep 17 00:00:00 2001 +From: Gaetan Nadon +Date: Mon, 01 Nov 2010 17:19:23 +0000 +Subject: config: replace AC_CHECK_FILE with test -f + +* AC_CHECK_FILE doesn't work for cross compilation + +Signed-off-by: Gaetan Nadon +--- +diff --git a/configure.ac b/configure.ac +index 667a3e7..0644050 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -36,8 +36,11 @@ XORG_DEFAULT_OPTIONS + AC_PROG_LEX + AC_PROG_YACC + AC_PATH_PROG([YACC_INST], $YACC) +-AC_CHECK_FILE([$srcdir/gram.c], [], +- [test -z "$YACC_INST" && AC_MSG_ERROR([yacc not found - unable to compile gram.y])]) ++if test ! -f "gram.c"; then ++ if test -z "$YACC_INST"; then ++ AC_MSG_ERROR([yacc not found - unable to compile gram.y]) ++ fi ++fi + + PKG_CHECK_MODULES(XGC, xaw7 xt) + xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt` +-- +cgit v0.9.0.2-2-gbebe diff --git a/package/x11r7/xapp_xgc/xapp_xgc.mk b/package/x11r7/xapp_xgc/xapp_xgc.mk index 9e642e2d1a..69c464f612 100644 --- a/package/x11r7/xapp_xgc/xapp_xgc.mk +++ b/package/x11r7/xapp_xgc/xapp_xgc.mk @@ -1,13 +1,15 @@ ################################################################################ # -# xapp_xgc -- X graphics demo +# xapp_xgc # ################################################################################ -XAPP_XGC_VERSION = 1.0.1 +XAPP_XGC_VERSION = 1.0.3 XAPP_XGC_SOURCE = xgc-$(XAPP_XGC_VERSION).tar.bz2 XAPP_XGC_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XGC_AUTORECONF = NO +XAPP_XGC_LICENSE = MIT +XAPP_XGC_LICENSE_FILES = COPYING XAPP_XGC_DEPENDENCIES = xlib_libXaw +XAPP_XGC_AUTORECONF = YES -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xgc)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xhost/xapp_xhost.mk b/package/x11r7/xapp_xhost/xapp_xhost.mk index fd8153750a..b81e1b9b03 100644 --- a/package/x11r7/xapp_xhost/xapp_xhost.mk +++ b/package/x11r7/xapp_xhost/xapp_xhost.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xhost -- Controls host and/or user access to a running X server. +# xapp_xhost # ################################################################################ -XAPP_XHOST_VERSION = 1.0.3 +XAPP_XHOST_VERSION = 1.0.5 XAPP_XHOST_SOURCE = xhost-$(XAPP_XHOST_VERSION).tar.bz2 XAPP_XHOST_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XHOST_AUTORECONF = NO +XAPP_XHOST_LICENSE = MIT +XAPP_XHOST_LICENSE_FILES = COPYING XAPP_XHOST_DEPENDENCIES = xlib_libX11 xlib_libXmu -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xhost)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xinit/Config.in b/package/x11r7/xapp_xinit/Config.in index 9ac28175a6..aede5d9691 100644 --- a/package/x11r7/xapp_xinit/Config.in +++ b/package/x11r7/xapp_xinit/Config.in @@ -1,5 +1,9 @@ config BR2_PACKAGE_XAPP_XINIT bool "xinit" + # Runtime dependency: can't start an X server unless there is one + depends on BR2_PACKAGE_XSERVER_XORG_SERVER + # Runtime dependency; mcookie is also in util-linux + select BR2_PACKAGE_MCOOKIE if !BR2_PACKAGE_UTIL_LINUX select BR2_PACKAGE_XAPP_XAUTH select BR2_PACKAGE_XLIB_LIBX11 help diff --git a/package/x11r7/xapp_xinit/xapp_xinit.mk b/package/x11r7/xapp_xinit/xapp_xinit.mk index 52105c2e65..da167ec811 100644 --- a/package/x11r7/xapp_xinit/xapp_xinit.mk +++ b/package/x11r7/xapp_xinit/xapp_xinit.mk @@ -1,12 +1,12 @@ ################################################################################ # -# xapp_xinit -- X Window System initializer +# xapp_xinit # ################################################################################ -XAPP_XINIT_VERSION = 1.2.1 +XAPP_XINIT_VERSION = 1.3.2 XAPP_XINIT_SOURCE = xinit-$(XAPP_XINIT_VERSION).tar.bz2 XAPP_XINIT_SITE = http://xorg.freedesktop.org/releases/individual/app XAPP_XINIT_DEPENDENCIES = xapp_xauth xlib_libX11 -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xinit)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xinput-calibrator/Config.in b/package/x11r7/xapp_xinput-calibrator/Config.in new file mode 100644 index 0000000000..76fbcd4305 --- /dev/null +++ b/package/x11r7/xapp_xinput-calibrator/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_XAPP_XINPUT_CALIBRATOR + bool "xinput-calibrator" + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXI + help + A generic touchscreen calibration program for X.Org. + + http://www.freedesktop.org/wiki/Software/xinput_calibrator + +comment "xinput-calibrator needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/x11r7/xapp_xinput-calibrator/xapp_xinput-calibrator.mk b/package/x11r7/xapp_xinput-calibrator/xapp_xinput-calibrator.mk new file mode 100644 index 0000000000..974b83df2c --- /dev/null +++ b/package/x11r7/xapp_xinput-calibrator/xapp_xinput-calibrator.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xinput-calibrator +# +################################################################################ + +XAPP_XINPUT_CALIBRATOR_VERSION = 0.7.5 +XAPP_XINPUT_CALIBRATOR_SOURCE = xinput_calibrator-$(XAPP_XINPUT_CALIBRATOR_VERSION).tar.gz +XAPP_XINPUT_CALIBRATOR_SITE = http://github.com/downloads/tias/xinput_calibrator +XAPP_XINPUT_CALIBRATOR_LICENSE = MIT +XAPP_XINPUT_CALIBRATOR_LICENSE_FILES = COPYING +XAPP_XINPUT_CALIBRATOR_DEPENDENCIES = xlib_libX11 xlib_libXi + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xinput/Config.in b/package/x11r7/xapp_xinput/Config.in index 2505dd3495..e438a45bdb 100644 --- a/package/x11r7/xapp_xinput/Config.in +++ b/package/x11r7/xapp_xinput/Config.in @@ -2,5 +2,7 @@ config BR2_PACKAGE_XAPP_XINPUT bool "xinput" select BR2_PACKAGE_XLIB_LIBX11 select BR2_PACKAGE_XLIB_LIBXI + select BR2_PACKAGE_XLIB_LIBXRANDR + select BR2_PACKAGE_XLIB_LIBXINERAMA help xinput diff --git a/package/x11r7/xapp_xinput/xapp_xinput.mk b/package/x11r7/xapp_xinput/xapp_xinput.mk index 423c7c2f0b..790f2c0af8 100644 --- a/package/x11r7/xapp_xinput/xapp_xinput.mk +++ b/package/x11r7/xapp_xinput/xapp_xinput.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xinput -- xinput +# xapp_xinput # ################################################################################ -XAPP_XINPUT_VERSION = 1.5.0 +XAPP_XINPUT_VERSION = 1.6.0 XAPP_XINPUT_SOURCE = xinput-$(XAPP_XINPUT_VERSION).tar.bz2 XAPP_XINPUT_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XINPUT_AUTORECONF = NO -XAPP_XINPUT_DEPENDENCIES = xlib_libX11 xlib_libXi +XAPP_XINPUT_LICENSE = MIT +XAPP_XINPUT_LICENSE_FILES = COPYING +XAPP_XINPUT_DEPENDENCIES = xlib_libX11 xlib_libXi xlib_libXrandr xlib_libXinerama -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xinput)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xkbcomp/xapp_xkbcomp.mk b/package/x11r7/xapp_xkbcomp/xapp_xkbcomp.mk index e9f7174a87..94fbd68de5 100644 --- a/package/x11r7/xapp_xkbcomp/xapp_xkbcomp.mk +++ b/package/x11r7/xapp_xkbcomp/xapp_xkbcomp.mk @@ -1,15 +1,16 @@ ################################################################################ # -# xapp_xkbcomp -- compile XKB keyboard description +# xapp_xkbcomp # ################################################################################ -XAPP_XKBCOMP_VERSION = 1.1.1 +XAPP_XKBCOMP_VERSION = 1.2.4 XAPP_XKBCOMP_SOURCE = xkbcomp-$(XAPP_XKBCOMP_VERSION).tar.bz2 XAPP_XKBCOMP_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XKBCOMP_AUTORECONF = NO +XAPP_XKBCOMP_LICENSE = MIT +XAPP_XKBCOMP_LICENSE_FILES = COPYING XAPP_XKBCOMP_DEPENDENCIES = xlib_libX11 xlib_libxkbfile -HOST_XAPP_XKBCOMP_DEPENDENCIES = host-xlib_libX11 host-xlib_libxkbfile +XAPP_XKBCOMP_CONF_ENV = ac_cv_file___xkbparse_c=yes -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xkbcomp)) -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xkbcomp,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xapp_xkbevd/xapp_xkbevd.mk b/package/x11r7/xapp_xkbevd/xapp_xkbevd.mk index 48d65656fa..eb8a3876b9 100644 --- a/package/x11r7/xapp_xkbevd/xapp_xkbevd.mk +++ b/package/x11r7/xapp_xkbevd/xapp_xkbevd.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xkbevd -- XKB event daemon +# xapp_xkbevd # ################################################################################ -XAPP_XKBEVD_VERSION = 1.1.0 +XAPP_XKBEVD_VERSION = 1.1.3 XAPP_XKBEVD_SOURCE = xkbevd-$(XAPP_XKBEVD_VERSION).tar.bz2 XAPP_XKBEVD_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XKBEVD_AUTORECONF = NO +XAPP_XKBEVD_LICENSE = MIT +XAPP_XKBEVD_LICENSE_FILES = COPYING XAPP_XKBEVD_DEPENDENCIES = xlib_libxkbfile -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xkbevd)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xkbprint/xapp_xkbprint.mk b/package/x11r7/xapp_xkbprint/xapp_xkbprint.mk index ec96c94487..8d2efbcf39 100644 --- a/package/x11r7/xapp_xkbprint/xapp_xkbprint.mk +++ b/package/x11r7/xapp_xkbprint/xapp_xkbprint.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xkbprint -- print an XKB keyboard description +# xapp_xkbprint # ################################################################################ XAPP_XKBPRINT_VERSION = 1.0.1 XAPP_XKBPRINT_SOURCE = xkbprint-$(XAPP_XKBPRINT_VERSION).tar.bz2 XAPP_XKBPRINT_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XKBPRINT_AUTORECONF = NO +XAPP_XKBPRINT_LICENSE = MIT +XAPP_XKBPRINT_LICENSE_FILES = COPYING XAPP_XKBPRINT_DEPENDENCIES = xlib_libxkbfile -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xkbprint)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xkbutils/xapp_xkbutils.mk b/package/x11r7/xapp_xkbutils/xapp_xkbutils.mk index 07a34f4681..eaabea58ea 100644 --- a/package/x11r7/xapp_xkbutils/xapp_xkbutils.mk +++ b/package/x11r7/xapp_xkbutils/xapp_xkbutils.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xkbutils -- X.Org xkbutils application +# xapp_xkbutils # ################################################################################ -XAPP_XKBUTILS_VERSION = 1.0.2 +XAPP_XKBUTILS_VERSION = 1.0.3 XAPP_XKBUTILS_SOURCE = xkbutils-$(XAPP_XKBUTILS_VERSION).tar.bz2 XAPP_XKBUTILS_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XKBUTILS_AUTORECONF = NO +XAPP_XKBUTILS_LICENSE = MIT +XAPP_XKBUTILS_LICENSE_FILES = COPYING XAPP_XKBUTILS_DEPENDENCIES = xlib_libXaw xlib_libxkbfile -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xkbutils)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xkill/xapp_xkill.mk b/package/x11r7/xapp_xkill/xapp_xkill.mk index 894c552a8b..092c0d3259 100644 --- a/package/x11r7/xapp_xkill/xapp_xkill.mk +++ b/package/x11r7/xapp_xkill/xapp_xkill.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xkill -- kill a client by its X resource +# xapp_xkill # ################################################################################ -XAPP_XKILL_VERSION = 1.0.2 +XAPP_XKILL_VERSION = 1.0.3 XAPP_XKILL_SOURCE = xkill-$(XAPP_XKILL_VERSION).tar.bz2 XAPP_XKILL_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XKILL_AUTORECONF = NO +XAPP_XKILL_LICENSE = MIT +XAPP_XKILL_LICENSE_FILES = COPYING XAPP_XKILL_DEPENDENCIES = xlib_libX11 xlib_libXmu -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xkill)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xload/xapp_xload.mk b/package/x11r7/xapp_xload/xapp_xload.mk index e1ae662d61..6b4207ac08 100644 --- a/package/x11r7/xapp_xload/xapp_xload.mk +++ b/package/x11r7/xapp_xload/xapp_xload.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xload -- system load average display for X +# xapp_xload # ################################################################################ -XAPP_XLOAD_VERSION = 1.0.2 +XAPP_XLOAD_VERSION = 1.1.1 XAPP_XLOAD_SOURCE = xload-$(XAPP_XLOAD_VERSION).tar.bz2 XAPP_XLOAD_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XLOAD_AUTORECONF = NO +XAPP_XLOAD_LICENSE = MIT +XAPP_XLOAD_LICENSE_FILES = COPYING XAPP_XLOAD_DEPENDENCIES = xlib_libXaw -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xload)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xlogo/Config.in b/package/x11r7/xapp_xlogo/Config.in index 04f779dee3..aacb75ffb0 100644 --- a/package/x11r7/xapp_xlogo/Config.in +++ b/package/x11r7/xapp_xlogo/Config.in @@ -1,7 +1,6 @@ config BR2_PACKAGE_XAPP_XLOGO bool "xlogo" select BR2_PACKAGE_XLIB_LIBXAW - select BR2_PACKAGE_XLIB_LIBXPRINTUTIL select BR2_PACKAGE_XLIB_LIBXRENDER select BR2_PACKAGE_XLIB_LIBXFT help diff --git a/package/x11r7/xapp_xlogo/xapp_xlogo.mk b/package/x11r7/xapp_xlogo/xapp_xlogo.mk index eb35a6dc8b..af5b222f23 100644 --- a/package/x11r7/xapp_xlogo/xapp_xlogo.mk +++ b/package/x11r7/xapp_xlogo/xapp_xlogo.mk @@ -1,14 +1,15 @@ ################################################################################ # -# xapp_xlogo -- X Window System logo +# xapp_xlogo # ################################################################################ -XAPP_XLOGO_VERSION = 1.0.1 +XAPP_XLOGO_VERSION = 1.0.4 XAPP_XLOGO_SOURCE = xlogo-$(XAPP_XLOGO_VERSION).tar.bz2 XAPP_XLOGO_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XLOGO_AUTORECONF = NO -XAPP_XLOGO_DEPENDENCIES = xlib_libXaw xlib_libXprintUtil xlib_libXrender \ - xlib_libXft host-pkg-config +XAPP_XLOGO_LICENSE = MIT +XAPP_XLOGO_LICENSE_FILES = COPYING +XAPP_XLOGO_DEPENDENCIES = xlib_libXaw xlib_libXrender \ + xlib_libXft host-pkgconf -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xlogo)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xlsatoms/xapp_xlsatoms.mk b/package/x11r7/xapp_xlsatoms/xapp_xlsatoms.mk index d202114623..13c93d5cc4 100644 --- a/package/x11r7/xapp_xlsatoms/xapp_xlsatoms.mk +++ b/package/x11r7/xapp_xlsatoms/xapp_xlsatoms.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xlsatoms -- list interned atoms defined on server +# xapp_xlsatoms # ################################################################################ -XAPP_XLSATOMS_VERSION = 1.0.2 +XAPP_XLSATOMS_VERSION = 1.1.1 XAPP_XLSATOMS_SOURCE = xlsatoms-$(XAPP_XLSATOMS_VERSION).tar.bz2 XAPP_XLSATOMS_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XLSATOMS_AUTORECONF = NO +XAPP_XLSATOMS_LICENSE = MIT +XAPP_XLSATOMS_LICENSE_FILES = COPYING XAPP_XLSATOMS_DEPENDENCIES = xlib_libX11 xlib_libXmu -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xlsatoms)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xlsclients/Config.in b/package/x11r7/xapp_xlsclients/Config.in index f8f6132858..a934af45e9 100644 --- a/package/x11r7/xapp_xlsclients/Config.in +++ b/package/x11r7/xapp_xlsclients/Config.in @@ -2,5 +2,7 @@ config BR2_PACKAGE_XAPP_XLSCLIENTS bool "xlsclients" select BR2_PACKAGE_XLIB_LIBX11 select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_LIBXCB + select BR2_PACKAGE_XCB_UTIL help X.Org xlsclients application diff --git a/package/x11r7/xapp_xlsclients/xapp_xlsclients.mk b/package/x11r7/xapp_xlsclients/xapp_xlsclients.mk index cd522db83f..a5af935f09 100644 --- a/package/x11r7/xapp_xlsclients/xapp_xlsclients.mk +++ b/package/x11r7/xapp_xlsclients/xapp_xlsclients.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xlsclients -- X.Org xlsclients application +# xapp_xlsclients # ################################################################################ -XAPP_XLSCLIENTS_VERSION = 1.0.2 +XAPP_XLSCLIENTS_VERSION = 1.1.2 XAPP_XLSCLIENTS_SOURCE = xlsclients-$(XAPP_XLSCLIENTS_VERSION).tar.bz2 XAPP_XLSCLIENTS_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XLSCLIENTS_AUTORECONF = NO -XAPP_XLSCLIENTS_DEPENDENCIES = xlib_libX11 xlib_libXmu +XAPP_XLSCLIENTS_LICENSE = MIT +XAPP_XLSCLIENTS_LICENSE_FILES = COPYING +XAPP_XLSCLIENTS_DEPENDENCIES = xlib_libX11 xlib_libXmu libxcb xcb-util -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xlsclients)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xlsfonts/xapp_xlsfonts.mk b/package/x11r7/xapp_xlsfonts/xapp_xlsfonts.mk index 120669c11e..619b7c5fe1 100644 --- a/package/x11r7/xapp_xlsfonts/xapp_xlsfonts.mk +++ b/package/x11r7/xapp_xlsfonts/xapp_xlsfonts.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xlsfonts -- X.Org xlsfonts application +# xapp_xlsfonts # ################################################################################ XAPP_XLSFONTS_VERSION = 1.0.1 XAPP_XLSFONTS_SOURCE = xlsfonts-$(XAPP_XLSFONTS_VERSION).tar.bz2 XAPP_XLSFONTS_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XLSFONTS_AUTORECONF = NO +XAPP_XLSFONTS_LICENSE = MIT +XAPP_XLSFONTS_LICENSE_FILES = COPYING XAPP_XLSFONTS_DEPENDENCIES = xlib_libX11 -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xlsfonts)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xmag/xapp_xmag.mk b/package/x11r7/xapp_xmag/xapp_xmag.mk index 518fe484d8..bd98695002 100644 --- a/package/x11r7/xapp_xmag/xapp_xmag.mk +++ b/package/x11r7/xapp_xmag/xapp_xmag.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xmag -- X.Org xmag application +# xapp_xmag # ################################################################################ -XAPP_XMAG_VERSION = 1.0.2 +XAPP_XMAG_VERSION = 1.0.4 XAPP_XMAG_SOURCE = xmag-$(XAPP_XMAG_VERSION).tar.bz2 XAPP_XMAG_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XMAG_AUTORECONF = NO +XAPP_XMAG_LICENSE = MIT +XAPP_XMAG_LICENSE_FILES = COPYING XAPP_XMAG_DEPENDENCIES = xlib_libXaw -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xmag)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xman/Config.in b/package/x11r7/xapp_xman/Config.in index af9525bf40..4f4f067e31 100644 --- a/package/x11r7/xapp_xman/Config.in +++ b/package/x11r7/xapp_xman/Config.in @@ -1,4 +1,5 @@ config BR2_PACKAGE_XAPP_XMAN bool "xman" + select BR2_PACKAGE_XLIB_LIBXAW help Manual page display program for the X Window System diff --git a/package/x11r7/xapp_xman/xapp_xman.mk b/package/x11r7/xapp_xman/xapp_xman.mk index d9729d4ef0..28288053fc 100644 --- a/package/x11r7/xapp_xman/xapp_xman.mk +++ b/package/x11r7/xapp_xman/xapp_xman.mk @@ -1,20 +1,18 @@ -############################################################# +################################################################################ # -# xapp_xman - Manual page display program for the X Window System +# xapp_xman # -############################################################# -XAPP_XMAN_VERSION:=1.0.3 -XAPP_XMAN_SOURCE:=xman-$(XAPP_XMAN_VERSION).tar.bz2 -XAPP_XMAN_SITE:=http://xorg.freedesktop.org/releases/individual/app -XAPP_XMAN_AUTORECONF = NO -XAPP_XMAN_INSTALL_TARGET = YES +################################################################################ + +XAPP_XMAN_VERSION = 1.0.3 +XAPP_XMAN_SOURCE = xman-$(XAPP_XMAN_VERSION).tar.bz2 +XAPP_XMAN_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XMAN_LICENSE = MIT +XAPP_XMAN_LICENSE_FILES = COPYING +XAPP_XMAN_DEPENDENCIES = xlib_libXaw XAPP_XMAN_CONF_ENV = ac_cv_file__etc_man_conf=no \ ac_cv_file__etc_man_config=no \ ac_cv_file__etc_manpath_config=no -XAPP_XMAN_CONF_OPT = --enable-shared \ - --disable-static \ - --disable-IPv6 - -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xman)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xmessage/xapp_xmessage.mk b/package/x11r7/xapp_xmessage/xapp_xmessage.mk index 9f1aa743ef..61b8a0825b 100644 --- a/package/x11r7/xapp_xmessage/xapp_xmessage.mk +++ b/package/x11r7/xapp_xmessage/xapp_xmessage.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xmessage -- display a message or query in a window (X-based /bin/echo) +# xapp_xmessage # ################################################################################ XAPP_XMESSAGE_VERSION = 1.0.2 XAPP_XMESSAGE_SOURCE = xmessage-$(XAPP_XMESSAGE_VERSION).tar.bz2 XAPP_XMESSAGE_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XMESSAGE_AUTORECONF = NO +XAPP_XMESSAGE_LICENSE = MIT +XAPP_XMESSAGE_LICENSE_FILES = COPYING XAPP_XMESSAGE_DEPENDENCIES = xlib_libXaw -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xmessage)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xmh/Config.in b/package/x11r7/xapp_xmh/Config.in index 3da965a698..1ef65c762f 100644 --- a/package/x11r7/xapp_xmh/Config.in +++ b/package/x11r7/xapp_xmh/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_XAPP_XMH bool "xmh" select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XDATA_XBITMAPS help send and read mail with an X interface to MH diff --git a/package/x11r7/xapp_xmh/xapp_xmh.mk b/package/x11r7/xapp_xmh/xapp_xmh.mk index 500801b106..ada1df550b 100644 --- a/package/x11r7/xapp_xmh/xapp_xmh.mk +++ b/package/x11r7/xapp_xmh/xapp_xmh.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xmh -- send and read mail with an X interface to MH +# xapp_xmh # ################################################################################ -XAPP_XMH_VERSION = 1.0.1 +XAPP_XMH_VERSION = 1.0.2 XAPP_XMH_SOURCE = xmh-$(XAPP_XMH_VERSION).tar.bz2 XAPP_XMH_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XMH_AUTORECONF = NO -XAPP_XMH_DEPENDENCIES = xlib_libXaw +XAPP_XMH_LICENSE = MIT +XAPP_XMH_LICENSE_FILES = COPYING +XAPP_XMH_DEPENDENCIES = xlib_libXaw xdata_xbitmaps -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xmh)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xmodmap/xapp_xmodmap-asprintf.patch b/package/x11r7/xapp_xmodmap/xapp_xmodmap-asprintf.patch new file mode 100644 index 0000000000..8eb2b9c452 --- /dev/null +++ b/package/x11r7/xapp_xmodmap/xapp_xmodmap-asprintf.patch @@ -0,0 +1,69 @@ +Fixes build problems due to missing asprintf() definition + +Upstream bug: https://bugs.freedesktop.org/show_bug.cgi?id=48696 + +Signed-off-by: Markos Chandras + +From dab3ce5b4b9d7078cd55515441b2ba244a32516a Mon Sep 17 00:00:00 2001 +From: Alan Coopersmith +Date: Mon, 23 Apr 2012 07:28:39 -0700 +Subject: [PATCH:xmodmap] include config.h before stdio.h & other system + headers + +Ensures definitions like _GNU_SOURCE are visible when needed. + +Signed-off-by: Alan Coopersmith +--- + exec.c | 4 ++++ + pf.c | 4 ++++ + xmodmap.c | 4 ++++ + 3 files changed, 12 insertions(+) + +diff --git a/exec.c b/exec.c +index dbcb669..419b10e 100644 +--- a/exec.c ++++ b/exec.c +@@ -54,6 +54,10 @@ from The Open Group. + * original xmodmap, written by David Rosenthal, of Sun Microsystems. + */ + ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ + #include + #include + #include +diff --git a/pf.c b/pf.c +index 0eb0f55..3f0c3f4 100644 +--- a/pf.c ++++ b/pf.c +@@ -26,6 +26,10 @@ from The Open Group. + + */ + ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ + #include + #include + #include +diff --git a/xmodmap.c b/xmodmap.c +index 58a8e70..0f89629 100644 +--- a/xmodmap.c ++++ b/xmodmap.c +@@ -26,6 +26,10 @@ from The Open Group. + + */ + ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ + #include + #include + #include +-- +1.7.9.2 + diff --git a/package/x11r7/xapp_xmodmap/xapp_xmodmap.mk b/package/x11r7/xapp_xmodmap/xapp_xmodmap.mk index df4280b125..c5bce07559 100644 --- a/package/x11r7/xapp_xmodmap/xapp_xmodmap.mk +++ b/package/x11r7/xapp_xmodmap/xapp_xmodmap.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xmodmap -- utility for modifying keymaps and pointer button mappings in X +# xapp_xmodmap # ################################################################################ -XAPP_XMODMAP_VERSION = 1.0.4 +XAPP_XMODMAP_VERSION = 1.0.7 XAPP_XMODMAP_SOURCE = xmodmap-$(XAPP_XMODMAP_VERSION).tar.bz2 XAPP_XMODMAP_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XMODMAP_AUTORECONF = NO +XAPP_XMODMAP_LICENSE = MIT +XAPP_XMODMAP_LICENSE_FILES = COPYING XAPP_XMODMAP_DEPENDENCIES = xlib_libX11 -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xmodmap)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xmore/Config.in b/package/x11r7/xapp_xmore/Config.in index 23fd1477ba..80c3950bb0 100644 --- a/package/x11r7/xapp_xmore/Config.in +++ b/package/x11r7/xapp_xmore/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XAPP_XMORE bool "xmore" - select BR2_PACKAGE_XLIB_LIBXPRINTUTIL select BR2_PACKAGE_XLIB_LIBXAW help plain text display program for the X Window System diff --git a/package/x11r7/xapp_xmore/xapp_xmore.mk b/package/x11r7/xapp_xmore/xapp_xmore.mk index 0b68e71963..05dfdcec93 100644 --- a/package/x11r7/xapp_xmore/xapp_xmore.mk +++ b/package/x11r7/xapp_xmore/xapp_xmore.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xmore -- plain text display program for the X Window System +# xapp_xmore # ################################################################################ XAPP_XMORE_VERSION = 1.0.1 XAPP_XMORE_SOURCE = xmore-$(XAPP_XMORE_VERSION).tar.bz2 XAPP_XMORE_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XMORE_AUTORECONF = NO -XAPP_XMORE_DEPENDENCIES = xlib_libXprintUtil xlib_libXaw +XAPP_XMORE_LICENSE = MIT +XAPP_XMORE_LICENSE_FILES = COPYING +XAPP_XMORE_DEPENDENCIES = xlib_libXaw -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xmore)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xplsprinters/Config.in b/package/x11r7/xapp_xplsprinters/Config.in deleted file mode 100644 index 16a139b8bf..0000000000 --- a/package/x11r7/xapp_xplsprinters/Config.in +++ /dev/null @@ -1,7 +0,0 @@ -config BR2_PACKAGE_XAPP_XPLSPRINTERS - bool "xplsprinters" - select BR2_PACKAGE_XLIB_LIBX11 - select BR2_PACKAGE_XLIB_LIBXP - select BR2_PACKAGE_XLIB_LIBXPRINTUTIL - help - shows a list of Xprint printers and it's attributes diff --git a/package/x11r7/xapp_xplsprinters/xapp_xplsprinters.mk b/package/x11r7/xapp_xplsprinters/xapp_xplsprinters.mk deleted file mode 100644 index e16733bf00..0000000000 --- a/package/x11r7/xapp_xplsprinters/xapp_xplsprinters.mk +++ /dev/null @@ -1,13 +0,0 @@ -################################################################################ -# -# xapp_xplsprinters -- shows a list of Xprint printers and it's attributes -# -################################################################################ - -XAPP_XPLSPRINTERS_VERSION = 1.0.1 -XAPP_XPLSPRINTERS_SOURCE = xplsprinters-$(XAPP_XPLSPRINTERS_VERSION).tar.bz2 -XAPP_XPLSPRINTERS_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XPLSPRINTERS_AUTORECONF = NO -XAPP_XPLSPRINTERS_DEPENDENCIES = xlib_libX11 xlib_libXp xlib_libXprintUtil - -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xplsprinters)) diff --git a/package/x11r7/xapp_xpr/xapp_xpr.mk b/package/x11r7/xapp_xpr/xapp_xpr.mk index 257d10b14d..b2c4e040c3 100644 --- a/package/x11r7/xapp_xpr/xapp_xpr.mk +++ b/package/x11r7/xapp_xpr/xapp_xpr.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xpr -- X.Org xpr application +# xapp_xpr # ################################################################################ -XAPP_XPR_VERSION = 1.0.3 +XAPP_XPR_VERSION = 1.0.4 XAPP_XPR_SOURCE = xpr-$(XAPP_XPR_VERSION).tar.bz2 XAPP_XPR_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XPR_AUTORECONF = NO +XAPP_XPR_LICENSE = MIT +XAPP_XPR_LICENSE_FILES = COPYING XAPP_XPR_DEPENDENCIES = xlib_libX11 xlib_libXmu -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xpr)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xprehashprinterlist/Config.in b/package/x11r7/xapp_xprehashprinterlist/Config.in deleted file mode 100644 index 056fdb6b5b..0000000000 --- a/package/x11r7/xapp_xprehashprinterlist/Config.in +++ /dev/null @@ -1,6 +0,0 @@ -config BR2_PACKAGE_XAPP_XPREHASHPRINTERLIST - bool "xprehashprinterlist" - select BR2_PACKAGE_XLIB_LIBX11 - select BR2_PACKAGE_XLIB_LIBXP - help - Recomputes the list of available printers. diff --git a/package/x11r7/xapp_xprehashprinterlist/xapp_xprehashprinterlist.mk b/package/x11r7/xapp_xprehashprinterlist/xapp_xprehashprinterlist.mk deleted file mode 100644 index e9f8f43001..0000000000 --- a/package/x11r7/xapp_xprehashprinterlist/xapp_xprehashprinterlist.mk +++ /dev/null @@ -1,13 +0,0 @@ -################################################################################ -# -# xapp_xprehashprinterlist -- Recomputes the list of available printers. -# -################################################################################ - -XAPP_XPREHASHPRINTERLIST_VERSION = 1.0.1 -XAPP_XPREHASHPRINTERLIST_SOURCE = xprehashprinterlist-$(XAPP_XPREHASHPRINTERLIST_VERSION).tar.bz2 -XAPP_XPREHASHPRINTERLIST_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XPREHASHPRINTERLIST_AUTORECONF = NO -XAPP_XPREHASHPRINTERLIST_DEPENDENCIES = xlib_libX11 xlib_libXp - -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xprehashprinterlist)) diff --git a/package/x11r7/xapp_xprop/xapp_xprop.mk b/package/x11r7/xapp_xprop/xapp_xprop.mk index 7bcd1f00b7..956e4846cf 100644 --- a/package/x11r7/xapp_xprop/xapp_xprop.mk +++ b/package/x11r7/xapp_xprop/xapp_xprop.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xprop -- property displayer for X +# xapp_xprop # ################################################################################ -XAPP_XPROP_VERSION = 1.1.0 +XAPP_XPROP_VERSION = 1.2.1 XAPP_XPROP_SOURCE = xprop-$(XAPP_XPROP_VERSION).tar.bz2 XAPP_XPROP_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XPROP_AUTORECONF = NO +XAPP_XPROP_LICENSE = MIT +XAPP_XPROP_LICENSE_FILES = COPYING XAPP_XPROP_DEPENDENCIES = xlib_libX11 xlib_libXmu -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xprop)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xrandr/xapp_xrandr-1.2.3-clone-redef.patch b/package/x11r7/xapp_xrandr/xapp_xrandr-1.2.3-clone-redef.patch deleted file mode 100644 index 6dc353466c..0000000000 --- a/package/x11r7/xapp_xrandr/xapp_xrandr-1.2.3-clone-redef.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- a/xrandr.c.orig 2008-02-02 17:09:45.000000000 -0500 -+++ b/xrandr.c 2008-02-02 17:04:51.000000000 -0500 -@@ -189,7 +189,7 @@ reflection_name (Rotation rotation) - - #if HAS_RANDR_1_2 - typedef enum _policy { -- clone, extend -+ clone1, extend - } policy_t; - - typedef enum _relation { -@@ -1602,7 +1602,7 @@ main (int argc, char **argv) - int ret = 0; - #if HAS_RANDR_1_2 - output_t *output = NULL; -- policy_t policy = clone; -+ policy_t policy = clone1; - Bool setit_1_2 = False; - Bool query_1_2 = False; - Bool modeit = False; -@@ -1863,7 +1863,7 @@ main (int argc, char **argv) - continue; - } - if (!strcmp ("--clone", argv[i])) { -- policy = clone; -+ policy = clone1; - setit_1_2 = True; - continue; - } diff --git a/package/x11r7/xapp_xrandr/xapp_xrandr.mk b/package/x11r7/xapp_xrandr/xapp_xrandr.mk index 70c7e1a2d2..9ba733244a 100644 --- a/package/x11r7/xapp_xrandr/xapp_xrandr.mk +++ b/package/x11r7/xapp_xrandr/xapp_xrandr.mk @@ -1,14 +1,15 @@ ################################################################################ # -# xapp_xrandr -- primitive command line interface to RandR extension +# xapp_xrandr # ################################################################################ -XAPP_XRANDR_VERSION = 1.3.2 +XAPP_XRANDR_VERSION = 1.3.5 XAPP_XRANDR_SOURCE = xrandr-$(XAPP_XRANDR_VERSION).tar.bz2 XAPP_XRANDR_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XRANDR_AUTORECONF = NO +XAPP_XRANDR_LICENSE = MIT +XAPP_XRANDR_LICENSE_FILES = COPYING XAPP_XRANDR_DEPENDENCIES = xlib_libXrandr xlib_libX11 XAPP_XRANDR_CONF_OPT = --disable-malloc0returnsnull -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xrandr)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xrdb/xapp_xrdb.mk b/package/x11r7/xapp_xrdb/xapp_xrdb.mk index c7b24b5f74..4101d841ab 100644 --- a/package/x11r7/xapp_xrdb/xapp_xrdb.mk +++ b/package/x11r7/xapp_xrdb/xapp_xrdb.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xrdb -- X server resource database utility +# xapp_xrdb # ################################################################################ -XAPP_XRDB_VERSION = 1.0.6 +XAPP_XRDB_VERSION = 1.0.9 XAPP_XRDB_SOURCE = xrdb-$(XAPP_XRDB_VERSION).tar.bz2 XAPP_XRDB_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XRDB_AUTORECONF = NO +XAPP_XRDB_LICENSE = MIT +XAPP_XRDB_LICENSE_FILES = COPYING XAPP_XRDB_DEPENDENCIES = xlib_libX11 xlib_libXmu -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xrdb)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xrefresh/xapp_xrefresh.mk b/package/x11r7/xapp_xrefresh/xapp_xrefresh.mk index 9a9022c423..5578e4610b 100644 --- a/package/x11r7/xapp_xrefresh/xapp_xrefresh.mk +++ b/package/x11r7/xapp_xrefresh/xapp_xrefresh.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xrefresh -- refresh all or part of an X screen +# xapp_xrefresh # ################################################################################ -XAPP_XREFRESH_VERSION = 1.0.3 +XAPP_XREFRESH_VERSION = 1.0.4 XAPP_XREFRESH_SOURCE = xrefresh-$(XAPP_XREFRESH_VERSION).tar.bz2 XAPP_XREFRESH_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XREFRESH_AUTORECONF = NO +XAPP_XREFRESH_LICENSE = MIT +XAPP_XREFRESH_LICENSE_FILES = COPYING XAPP_XREFRESH_DEPENDENCIES = xlib_libX11 -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xrefresh)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xset/Config.in b/package/x11r7/xapp_xset/Config.in index ff697e5091..71497ab7da 100644 --- a/package/x11r7/xapp_xset/Config.in +++ b/package/x11r7/xapp_xset/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XAPP_XSET bool "xset" - select BR2_PACKAGE_XLIB_LIBXFONTCACHE select BR2_PACKAGE_XLIB_LIBXMU help X.Org xset application diff --git a/package/x11r7/xapp_xset/xapp_xset.mk b/package/x11r7/xapp_xset/xapp_xset.mk index 51ddd98c18..9a3758864a 100644 --- a/package/x11r7/xapp_xset/xapp_xset.mk +++ b/package/x11r7/xapp_xset/xapp_xset.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xset -- X.Org xset application +# xapp_xset # ################################################################################ -XAPP_XSET_VERSION = 1.1.0 +XAPP_XSET_VERSION = 1.2.2 XAPP_XSET_SOURCE = xset-$(XAPP_XSET_VERSION).tar.bz2 XAPP_XSET_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XSET_AUTORECONF = NO -XAPP_XSET_DEPENDENCIES = xlib_libXfontcache xlib_libXmu +XAPP_XSET_LICENSE = MIT +XAPP_XSET_LICENSE_FILES = COPYING +XAPP_XSET_DEPENDENCIES = xlib_libXmu -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xset)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xsetmode/xapp_xsetmode.mk b/package/x11r7/xapp_xsetmode/xapp_xsetmode.mk index 23db1f93e4..c4599a9be1 100644 --- a/package/x11r7/xapp_xsetmode/xapp_xsetmode.mk +++ b/package/x11r7/xapp_xsetmode/xapp_xsetmode.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xsetmode -- set the mode for an X Input device +# xapp_xsetmode # ################################################################################ XAPP_XSETMODE_VERSION = 1.0.0 XAPP_XSETMODE_SOURCE = xsetmode-$(XAPP_XSETMODE_VERSION).tar.bz2 XAPP_XSETMODE_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XSETMODE_AUTORECONF = NO +XAPP_XSETMODE_LICENSE = MIT +XAPP_XSETMODE_LICENSE_FILES = COPYING XAPP_XSETMODE_DEPENDENCIES = xlib_libX11 xlib_libXi -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xsetmode)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xsetpointer/xapp_xsetpointer.mk b/package/x11r7/xapp_xsetpointer/xapp_xsetpointer.mk index 7c65bc716e..f56cdd58a1 100644 --- a/package/x11r7/xapp_xsetpointer/xapp_xsetpointer.mk +++ b/package/x11r7/xapp_xsetpointer/xapp_xsetpointer.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xsetpointer -- set an X Input device as the main pointer +# xapp_xsetpointer # ################################################################################ XAPP_XSETPOINTER_VERSION = 1.0.0 XAPP_XSETPOINTER_SOURCE = xsetpointer-$(XAPP_XSETPOINTER_VERSION).tar.bz2 XAPP_XSETPOINTER_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XSETPOINTER_AUTORECONF = NO +XAPP_XSETPOINTER_LICENSE = MIT +XAPP_XSETPOINTER_LICENSE_FILES = COPYING XAPP_XSETPOINTER_DEPENDENCIES = xproto_inputproto xlib_libX11 xlib_libXi -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xsetpointer)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xsetroot/Config.in b/package/x11r7/xapp_xsetroot/Config.in index 82c0dbaeae..a70df80d91 100644 --- a/package/x11r7/xapp_xsetroot/Config.in +++ b/package/x11r7/xapp_xsetroot/Config.in @@ -2,6 +2,7 @@ config BR2_PACKAGE_XAPP_XSETROOT bool "xsetroot" select BR2_PACKAGE_XLIB_LIBX11 select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_XLIB_LIBXCURSOR select BR2_PACKAGE_XDATA_XBITMAPS help X.Org xsetroot application diff --git a/package/x11r7/xapp_xsetroot/xapp_xsetroot.mk b/package/x11r7/xapp_xsetroot/xapp_xsetroot.mk index 523c89a842..0f2312837a 100644 --- a/package/x11r7/xapp_xsetroot/xapp_xsetroot.mk +++ b/package/x11r7/xapp_xsetroot/xapp_xsetroot.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xsetroot -- X.Org xsetroot application +# xapp_xsetroot # ################################################################################ -XAPP_XSETROOT_VERSION = 1.0.3 +XAPP_XSETROOT_VERSION = 1.1.0 XAPP_XSETROOT_SOURCE = xsetroot-$(XAPP_XSETROOT_VERSION).tar.bz2 XAPP_XSETROOT_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XSETROOT_AUTORECONF = NO -XAPP_XSETROOT_DEPENDENCIES = xlib_libX11 xlib_libXmu xdata_xbitmaps +XAPP_XSETROOT_LICENSE = MIT +XAPP_XSETROOT_LICENSE_FILES = COPYING +XAPP_XSETROOT_DEPENDENCIES = xlib_libX11 xlib_libXmu xlib_libXcursor xdata_xbitmaps -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xsetroot)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xsm/xapp_xsm.mk b/package/x11r7/xapp_xsm/xapp_xsm.mk index 76cc07b118..9229bbe89d 100644 --- a/package/x11r7/xapp_xsm/xapp_xsm.mk +++ b/package/x11r7/xapp_xsm/xapp_xsm.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xsm -- X Session Manager +# xapp_xsm # ################################################################################ -XAPP_XSM_VERSION = 1.0.1 +XAPP_XSM_VERSION = 1.0.2 XAPP_XSM_SOURCE = xsm-$(XAPP_XSM_VERSION).tar.bz2 XAPP_XSM_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XSM_AUTORECONF = NO +XAPP_XSM_LICENSE = MIT +XAPP_XSM_LICENSE_FILES = COPYING XAPP_XSM_DEPENDENCIES = xlib_libXaw -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xsm)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xstdcmap/xapp_xstdcmap.mk b/package/x11r7/xapp_xstdcmap/xapp_xstdcmap.mk index 6137974932..8a21080e90 100644 --- a/package/x11r7/xapp_xstdcmap/xapp_xstdcmap.mk +++ b/package/x11r7/xapp_xstdcmap/xapp_xstdcmap.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xstdcmap -- X standard colormap utility +# xapp_xstdcmap # ################################################################################ XAPP_XSTDCMAP_VERSION = 1.0.1 XAPP_XSTDCMAP_SOURCE = xstdcmap-$(XAPP_XSTDCMAP_VERSION).tar.bz2 XAPP_XSTDCMAP_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XSTDCMAP_AUTORECONF = NO +XAPP_XSTDCMAP_LICENSE = MIT +XAPP_XSTDCMAP_LICENSE_FILES = COPYING XAPP_XSTDCMAP_DEPENDENCIES = xlib_libX11 xlib_libXmu -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xstdcmap)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xvidtune/xapp_xvidtune.mk b/package/x11r7/xapp_xvidtune/xapp_xvidtune.mk index 039da1883e..41c9dfe9dc 100644 --- a/package/x11r7/xapp_xvidtune/xapp_xvidtune.mk +++ b/package/x11r7/xapp_xvidtune/xapp_xvidtune.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xvidtune -- video mode tuner for Xorg +# xapp_xvidtune # ################################################################################ -XAPP_XVIDTUNE_VERSION = 1.0.1 +XAPP_XVIDTUNE_VERSION = 1.0.2 XAPP_XVIDTUNE_SOURCE = xvidtune-$(XAPP_XVIDTUNE_VERSION).tar.bz2 XAPP_XVIDTUNE_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XVIDTUNE_AUTORECONF = NO +XAPP_XVIDTUNE_LICENSE = MIT +XAPP_XVIDTUNE_LICENSE_FILES = COPYING XAPP_XVIDTUNE_DEPENDENCIES = xlib_libXaw xlib_libXxf86vm -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xvidtune)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xvinfo/xapp_xvinfo.mk b/package/x11r7/xapp_xvinfo/xapp_xvinfo.mk index 59d8ad3f44..2db78400ab 100644 --- a/package/x11r7/xapp_xvinfo/xapp_xvinfo.mk +++ b/package/x11r7/xapp_xvinfo/xapp_xvinfo.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xvinfo -- Print out X-Video extension adaptor information +# xapp_xvinfo # ################################################################################ -XAPP_XVINFO_VERSION = 1.1.0 +XAPP_XVINFO_VERSION = 1.1.1 XAPP_XVINFO_SOURCE = xvinfo-$(XAPP_XVINFO_VERSION).tar.bz2 XAPP_XVINFO_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XVINFO_AUTORECONF = NO +XAPP_XVINFO_LICENSE = MIT +XAPP_XVINFO_LICENSE_FILES = COPYING XAPP_XVINFO_DEPENDENCIES = xlib_libX11 xlib_libXv -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xvinfo)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xwd/xapp_xwd.mk b/package/x11r7/xapp_xwd/xapp_xwd.mk index bdd6182d65..87cf256dce 100644 --- a/package/x11r7/xapp_xwd/xapp_xwd.mk +++ b/package/x11r7/xapp_xwd/xapp_xwd.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xwd -- dump an image of an X window +# xapp_xwd # ################################################################################ -XAPP_XWD_VERSION = 1.0.3 +XAPP_XWD_VERSION = 1.0.5 XAPP_XWD_SOURCE = xwd-$(XAPP_XWD_VERSION).tar.bz2 XAPP_XWD_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XWD_AUTORECONF = NO +XAPP_XWD_LICENSE = MIT +XAPP_XWD_LICENSE_FILES = COPYING XAPP_XWD_DEPENDENCIES = xlib_libX11 xlib_libXmu -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xwd)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xwininfo/xapp_xwininfo.mk b/package/x11r7/xapp_xwininfo/xapp_xwininfo.mk index 36f11f779a..a6d7c46335 100644 --- a/package/x11r7/xapp_xwininfo/xapp_xwininfo.mk +++ b/package/x11r7/xapp_xwininfo/xapp_xwininfo.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xwininfo -- window information utility for X +# xapp_xwininfo # ################################################################################ -XAPP_XWININFO_VERSION = 1.0.5 +XAPP_XWININFO_VERSION = 1.1.2 XAPP_XWININFO_SOURCE = xwininfo-$(XAPP_XWININFO_VERSION).tar.bz2 XAPP_XWININFO_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XWININFO_AUTORECONF = NO +XAPP_XWININFO_LICENSE = MIT +XAPP_XWININFO_LICENSE_FILES = COPYING XAPP_XWININFO_DEPENDENCIES = xlib_libX11 xlib_libXmu -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xwininfo)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xwud/xapp_xwud.mk b/package/x11r7/xapp_xwud/xapp_xwud.mk index 0640f78eed..60afd86287 100644 --- a/package/x11r7/xapp_xwud/xapp_xwud.mk +++ b/package/x11r7/xapp_xwud/xapp_xwud.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xapp_xwud -- image displayer for X +# xapp_xwud # ################################################################################ -XAPP_XWUD_VERSION = 1.0.2 +XAPP_XWUD_VERSION = 1.0.4 XAPP_XWUD_SOURCE = xwud-$(XAPP_XWUD_VERSION).tar.bz2 XAPP_XWUD_SITE = http://xorg.freedesktop.org/releases/individual/app -XAPP_XWUD_AUTORECONF = NO +XAPP_XWUD_LICENSE = MIT +XAPP_XWUD_LICENSE_FILES = COPYING XAPP_XWUD_DEPENDENCIES = xlib_libX11 -$(eval $(call AUTOTARGETS,package/x11r7,xapp_xwud)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xcb-proto/xcb-proto.mk b/package/x11r7/xcb-proto/xcb-proto.mk index 47a38cb671..98d0f029cb 100644 --- a/package/x11r7/xcb-proto/xcb-proto.mk +++ b/package/x11r7/xcb-proto/xcb-proto.mk @@ -1,16 +1,18 @@ -############################################################# +################################################################################ # # xcb-proto # -############################################################# -XCB_PROTO_VERSION = 1.6 +################################################################################ + +XCB_PROTO_VERSION = 1.7.1 XCB_PROTO_SOURCE = xcb-proto-$(XCB_PROTO_VERSION).tar.bz2 XCB_PROTO_SITE = http://xcb.freedesktop.org/dist/ +XCB_PROTO_LICENSE = MIT +XCB_PROTO_LICENSE_FILES = COPYING XCB_PROTO_INSTALL_STAGING = YES XCB_PROTO_DEPENDENCIES = host-python -$(eval $(call AUTOTARGETS,package/x11r7,xcb-proto)) -$(eval $(call AUTOTARGETS,package/x11r7,xcb-proto,host)) - +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xcb-util-image/Config.in b/package/x11r7/xcb-util-image/Config.in new file mode 100644 index 0000000000..31fc61a50c --- /dev/null +++ b/package/x11r7/xcb-util-image/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_XCB_UTIL_IMAGE + bool "xcb-util-image" + select BR2_PACKAGE_XCB_UTIL + help + The XCB util modules provides a number of libraries which sit on top + of libxcb, the core X protocol library, and some of the extension + libraries. These experimental libraries provide convenience functions + and interfaces which make the raw X protocol more usable. Some of the + libraries also provide client-side code which is not strictly part of + the X protocol but which have traditionally been provided by Xlib. + + XCB util-image module provides the following library: + - image: Port of Xlib's XImage and XShmImage functions. + + http://xcb.freedesktop.org/ diff --git a/package/x11r7/xcb-util-image/xcb-util-image.mk b/package/x11r7/xcb-util-image/xcb-util-image.mk new file mode 100644 index 0000000000..7933b74873 --- /dev/null +++ b/package/x11r7/xcb-util-image/xcb-util-image.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xcb-util-image +# +################################################################################ + +XCB_UTIL_IMAGE_VERSION = 0.3.9 +XCB_UTIL_IMAGE_SITE = http://xcb.freedesktop.org/dist/ +XCB_UTIL_IMAGE_SOURCE = xcb-util-image-$(XCB_UTIL_IMAGE_VERSION).tar.bz2 +XCB_UTIL_IMAGE_INSTALL_STAGING = YES +XCB_UTIL_IMAGE_LICENSE = MIT +XCB_UTIL_IMAGE_DEPENDENCIES = xcb-util + +$(eval $(autotools-package)) diff --git a/package/x11r7/xcb-util-keysyms/Config.in b/package/x11r7/xcb-util-keysyms/Config.in new file mode 100644 index 0000000000..ef42eb2920 --- /dev/null +++ b/package/x11r7/xcb-util-keysyms/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_XCB_UTIL_KEYSYMS + bool "xcb-util-keysyms" + help + The XCB util modules provides a number of libraries which sit on top + of libxcb, the core X protocol library, and some of the extension + libraries. These experimental libraries provide convenience functions + and interfaces which make the raw X protocol more usable. Some of the + libraries also provide client-side code which is not strictly part of + the X protocol but which have traditionally been provided by Xlib. + + XCB util-keysyms module provides the following library: keysyms: + Standard X key constants and conversion to/from keycodes. + + http://xcb.freedesktop.org/ diff --git a/package/x11r7/xcb-util-keysyms/xcb-util-keysyms.mk b/package/x11r7/xcb-util-keysyms/xcb-util-keysyms.mk new file mode 100644 index 0000000000..8598b20def --- /dev/null +++ b/package/x11r7/xcb-util-keysyms/xcb-util-keysyms.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xcb-util-keysyms +# +################################################################################ + +XCB_UTIL_KEYSYMS_VERSION = 0.3.9 +XCB_UTIL_KEYSYMS_SOURCE = xcb-util-keysyms-$(XCB_UTIL_KEYSYMS_VERSION).tar.bz2 +XCB_UTIL_KEYSYMS_SITE = http://xcb.freedesktop.org/dist/ + +# unfortunately, no license file +XCB_UTIL_KEYSYMS_LICENSE = MIT + +XCB_UTIL_KEYSYMS_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/x11r7/xcb-util-wm/Config.in b/package/x11r7/xcb-util-wm/Config.in new file mode 100644 index 0000000000..5e7d94e1d2 --- /dev/null +++ b/package/x11r7/xcb-util-wm/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_XCB_UTIL_WM + bool "xcb-util-wm" + select BR2_PACKAGE_LIBXCB + help + The XCB util modules provides a number of libraries which sit on top + of libxcb, the core X protocol library, and some of the extension + libraries. These experimental libraries provide convenience functions + and interfaces which make the raw X protocol more usable. Some of the + libraries also provide client-side code which is not strictly part of + the X protocol but which have traditionally been provided by Xlib. + + XCB util-wm module provides the following libraries: + - ewmh: Both client and window-manager helpers for EWMH. + - icccm: Both client and window-manager helpers for ICCCM. + + http://xcb.freedesktop.org/ diff --git a/package/x11r7/xcb-util-wm/xcb-util-wm.mk b/package/x11r7/xcb-util-wm/xcb-util-wm.mk new file mode 100644 index 0000000000..622f295ecb --- /dev/null +++ b/package/x11r7/xcb-util-wm/xcb-util-wm.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xcb-util-wm +# +################################################################################ + +XCB_UTIL_WM_VERSION = 0.3.9 +XCB_UTIL_WM_SITE = http://xcb.freedesktop.org/dist/ +XCB_UTIL_WM_SOURCE = xcb-util-wm-$(XCB_UTIL_WM_VERSION).tar.bz2 +XCB_UTIL_WM_INSTALL_STAGING = YES +XCB_UTIL_WM_LICENSE = MIT +XCB_UTIL_WM_DEPENDENCIES = libxcb + +$(eval $(autotools-package)) diff --git a/package/x11r7/xcb-util/Config.in b/package/x11r7/xcb-util/Config.in index cf79327353..dd77b1d9d4 100644 --- a/package/x11r7/xcb-util/Config.in +++ b/package/x11r7/xcb-util/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_XCB_UTIL bool "xcb-util" + depends on BR2_PACKAGE_LIBXCB help Libraries which sit on top of libxcb, the core X protocol library, and some of the extension libraries. diff --git a/package/x11r7/xcb-util/xcb-util.mk b/package/x11r7/xcb-util/xcb-util.mk index 2983280dce..a3531d0200 100644 --- a/package/x11r7/xcb-util/xcb-util.mk +++ b/package/x11r7/xcb-util/xcb-util.mk @@ -1,12 +1,17 @@ -############################################################# +################################################################################ # # xcb-util # -############################################################# -XCB_UTIL_VERSION = 0.3.6 +################################################################################ + +XCB_UTIL_VERSION = 0.3.9 XCB_UTIL_SOURCE = xcb-util-$(XCB_UTIL_VERSION).tar.bz2 XCB_UTIL_SITE = http://xcb.freedesktop.org/dist/ -XCB_UTIL_DEPENDENCIES = host-gperf -$(eval $(call AUTOTARGETS,package/x11r7,xcb-util)) +# unfortunately, no license file +XCB_UTIL_LICENSE = MIT + +XCB_UTIL_INSTALL_STAGING = YES +XCB_UTIL_DEPENDENCIES = host-gperf libxcb +$(eval $(autotools-package)) diff --git a/package/x11r7/xcursor-transparent-theme/Config.in b/package/x11r7/xcursor-transparent-theme/Config.in new file mode 100644 index 0000000000..8282db897a --- /dev/null +++ b/package/x11r7/xcursor-transparent-theme/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XCURSOR_TRANSPARENT_THEME + bool "xcursor-transparent-theme" + select BR2_PACKAGE_XLIB_LIBXCURSOR + help + Completely transparent theme for hiding the X11 cursor. + + No upstream site. diff --git a/package/x11r7/xcursor-transparent-theme/index.theme b/package/x11r7/xcursor-transparent-theme/index.theme new file mode 100644 index 0000000000..5300850fba --- /dev/null +++ b/package/x11r7/xcursor-transparent-theme/index.theme @@ -0,0 +1,2 @@ +[Icon Theme] +Inherits=xcursor-transparent diff --git a/package/x11r7/xcursor-transparent-theme/xcursor-transparent-theme-0001-fix-symlink.patch b/package/x11r7/xcursor-transparent-theme/xcursor-transparent-theme-0001-fix-symlink.patch new file mode 100644 index 0000000000..9cf351f238 --- /dev/null +++ b/package/x11r7/xcursor-transparent-theme/xcursor-transparent-theme-0001-fix-symlink.patch @@ -0,0 +1,37 @@ +Do not symlink to a host directory + +The installation of xcursor-transparent-theme creates many symbolic +links to the 'transp' cursor file, but it does so using an absolute +directory, that happens to point to the installation location, which +is incorrect when cross-compiling. + +Also add the -f option so that the package can be reinstalled even if +it has already been installed. + +Signed-off-by: Thomas Petazzoni + +Index: b/cursors/Makefile.am +=================================================================== +--- a/cursors/Makefile.am ++++ b/cursors/Makefile.am +@@ -91,6 +91,6 @@ + $(INSTALL_DATA) $(CURSOR_REAL) $(DESTDIR)$(CURSOR_DIR)/ + for CURSOR in $(CURSOR_NAMES); do \ + echo '-- Installing cursor '$$CURSOR; \ +- ln -s $(DESTDIR)$(CURSOR_DIR)/transp $(DESTDIR)$(CURSOR_DIR)/$$CURSOR; \ ++ ln -sf transp $(DESTDIR)$(CURSOR_DIR)/$$CURSOR; \ + done + +Index: b/cursors/Makefile.in +=================================================================== +--- a/cursors/Makefile.in ++++ b/cursors/Makefile.in +@@ -177,7 +177,7 @@ + $(INSTALL_DATA) $(CURSOR_REAL) $(DESTDIR)$(CURSOR_DIR)/ + for CURSOR in $(CURSOR_NAMES); do \ + echo '-- Installing cursor '$$CURSOR; \ +- ln -s $(DESTDIR)$(CURSOR_DIR)/transp $(DESTDIR)$(CURSOR_DIR)/$$CURSOR; \ ++ ln -sf transp $(DESTDIR)$(CURSOR_DIR)/$$CURSOR; \ + done + + # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/package/x11r7/xcursor-transparent-theme/xcursor-transparent-theme.mk b/package/x11r7/xcursor-transparent-theme/xcursor-transparent-theme.mk new file mode 100644 index 0000000000..f2bccb032b --- /dev/null +++ b/package/x11r7/xcursor-transparent-theme/xcursor-transparent-theme.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# xcursor-transparent-theme +# +################################################################################ + +XCURSOR_TRANSPARENT_THEME_VERSION = 0.1.1 +XCURSOR_TRANSPARENT_THEME_SITE = http://downloads.yoctoproject.org/releases/matchbox/utils/ +XCURSOR_TRANSPARENT_THEME_DEPENDENCIES = xlib_libXcursor host-xapp_xcursorgen +XCURSOR_TRANSPARENT_THEME_LICENSE = GPLv2 +XCURSOR_TRANSPARENT_THEME_LICENSE_FILES = COPYING + +define ICONS_DEFAULT_CONFIG_INSTALL + $(INSTALL) -m 0755 -D package/x11r7/xcursor-transparent-theme/index.theme \ + $(TARGET_DIR)/usr/share/icons/default/index.theme +endef + +XCURSOR_TRANSPARENT_THEME_POST_INSTALL_TARGET_HOOKS += ICONS_DEFAULT_CONFIG_INSTALL + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdata_xbitmaps/xdata_xbitmaps.mk b/package/x11r7/xdata_xbitmaps/xdata_xbitmaps.mk index c1bb3010ac..9767f2c143 100644 --- a/package/x11r7/xdata_xbitmaps/xdata_xbitmaps.mk +++ b/package/x11r7/xdata_xbitmaps/xdata_xbitmaps.mk @@ -1,14 +1,15 @@ ################################################################################ # -# xdata_xbitmaps -- No description available +# xdata_xbitmaps # ################################################################################ -XDATA_XBITMAPS_VERSION = 1.1.0 +XDATA_XBITMAPS_VERSION = 1.1.1 XDATA_XBITMAPS_SOURCE = xbitmaps-$(XDATA_XBITMAPS_VERSION).tar.bz2 XDATA_XBITMAPS_SITE = http://xorg.freedesktop.org/releases/individual/data -XDATA_XBITMAPS_AUTORECONF = NO +XDATA_XBITMAPS_LICENSE = MIT +XDATA_XBITMAPS_LICENSE_FILES = COPYING + XDATA_XBITMAPS_INSTALL_STAGING = YES -XDATA_XBITMAPS_INSTALL_TARGET = YES -$(eval $(call AUTOTARGETS,package/x11r7,xdata_xbitmaps)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdata_xcursor-themes/xdata_xcursor-themes.mk b/package/x11r7/xdata_xcursor-themes/xdata_xcursor-themes.mk index da928f4fda..8f3e6817ec 100644 --- a/package/x11r7/xdata_xcursor-themes/xdata_xcursor-themes.mk +++ b/package/x11r7/xdata_xcursor-themes/xdata_xcursor-themes.mk @@ -1,14 +1,16 @@ -############################################################# +################################################################################ # -# xdata_xcursor-themes - No description available +# xdata_xcursor-themes # -############################################################# -XDATA_XCURSOR_THEMES_VERSION = 1.0.2 +################################################################################ + +XDATA_XCURSOR_THEMES_VERSION = 1.0.3 XDATA_XCURSOR_THEMES_SOURCE = xcursor-themes-$(XDATA_XCURSOR_THEMES_VERSION).tar.bz2 XDATA_XCURSOR_THEMES_SITE = http://xorg.freedesktop.org/releases/individual/data -XDATA_XCURSOR_THEMES_AUTORECONF = NO +XDATA_XCURSOR_THEMES_LICENSE = MIT +XDATA_XCURSOR_THEMES_LICENSE_FILES = COPYING + XDATA_XCURSOR_THEMES_INSTALL_STAGING = YES -XDATA_XCURSOR_THEMES_INSTALL_TARGET = YES -XDATA_XCURSOR_THEMES_DEPENDENCIES = xlib_libXcursor +XDATA_XCURSOR_THEMES_DEPENDENCIES = xlib_libXcursor host-xapp_xcursorgen -$(eval $(call AUTOTARGETS,package/x11r7,xdata_xcursor-themes)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-input-acecad/Config.in b/package/x11r7/xdriver_xf86-input-acecad/Config.in deleted file mode 100644 index 7e1838e617..0000000000 --- a/package/x11r7/xdriver_xf86-input-acecad/Config.in +++ /dev/null @@ -1,8 +0,0 @@ -config BR2_PACKAGE_XDRIVER_XF86_INPUT_ACECAD - bool "xf86-input-acecad" - select BR2_PACKAGE_XSERVER_XORG_SERVER - select BR2_PACKAGE_XPROTO_INPUTPROTO - select BR2_PACKAGE_XPROTO_RANDRPROTO - select BR2_PACKAGE_XPROTO_XPROTO - help - Acecad Flair input driver diff --git a/package/x11r7/xdriver_xf86-input-acecad/xdriver_xf86-input-acecad.mk b/package/x11r7/xdriver_xf86-input-acecad/xdriver_xf86-input-acecad.mk deleted file mode 100644 index d6f958cbdb..0000000000 --- a/package/x11r7/xdriver_xf86-input-acecad/xdriver_xf86-input-acecad.mk +++ /dev/null @@ -1,13 +0,0 @@ -################################################################################ -# -# xdriver_xf86-input-acecad -- Acecad Flair input driver -# -################################################################################ - -XDRIVER_XF86_INPUT_ACECAD_VERSION = 1.4.0 -XDRIVER_XF86_INPUT_ACECAD_SOURCE = xf86-input-acecad-$(XDRIVER_XF86_INPUT_ACECAD_VERSION).tar.bz2 -XDRIVER_XF86_INPUT_ACECAD_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_INPUT_ACECAD_AUTORECONF = NO -XDRIVER_XF86_INPUT_ACECAD_DEPENDENCIES = xserver_xorg-server xproto_inputproto xproto_randrproto xproto_xproto - -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-input-acecad)) diff --git a/package/x11r7/xdriver_xf86-input-aiptek/Config.in b/package/x11r7/xdriver_xf86-input-aiptek/Config.in deleted file mode 100644 index 87fe5b3983..0000000000 --- a/package/x11r7/xdriver_xf86-input-aiptek/Config.in +++ /dev/null @@ -1,8 +0,0 @@ -config BR2_PACKAGE_XDRIVER_XF86_INPUT_AIPTEK - bool "xf86-input-aiptek" - select BR2_PACKAGE_XSERVER_XORG_SERVER - select BR2_PACKAGE_XPROTO_INPUTPROTO - select BR2_PACKAGE_XPROTO_RANDRPROTO - select BR2_PACKAGE_XPROTO_XPROTO - help - Aiptek USB Digital Tablet Input Driver for Linux diff --git a/package/x11r7/xdriver_xf86-input-aiptek/xdriver_xf86-input-aiptek.mk b/package/x11r7/xdriver_xf86-input-aiptek/xdriver_xf86-input-aiptek.mk deleted file mode 100644 index aa93fdc497..0000000000 --- a/package/x11r7/xdriver_xf86-input-aiptek/xdriver_xf86-input-aiptek.mk +++ /dev/null @@ -1,13 +0,0 @@ -################################################################################ -# -# xdriver_xf86-input-aiptek -- Aiptek USB Digital Tablet Input Driver for Linux -# -################################################################################ - -XDRIVER_XF86_INPUT_AIPTEK_VERSION = 1.3.0 -XDRIVER_XF86_INPUT_AIPTEK_SOURCE = xf86-input-aiptek-$(XDRIVER_XF86_INPUT_AIPTEK_VERSION).tar.bz2 -XDRIVER_XF86_INPUT_AIPTEK_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_INPUT_AIPTEK_AUTORECONF = NO -XDRIVER_XF86_INPUT_AIPTEK_DEPENDENCIES = xserver_xorg-server xproto_inputproto xproto_randrproto xproto_xproto - -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-input-aiptek)) diff --git a/package/x11r7/xdriver_xf86-input-evdev/Config.in b/package/x11r7/xdriver_xf86-input-evdev/Config.in index 248be7e96a..88d3e6e82d 100644 --- a/package/x11r7/xdriver_xf86-input-evdev/Config.in +++ b/package/x11r7/xdriver_xf86-input-evdev/Config.in @@ -1,8 +1,11 @@ config BR2_PACKAGE_XDRIVER_XF86_INPUT_EVDEV bool "xf86-input-evdev" + depends on BR2_PACKAGE_UDEV # libudev is configure dependency select BR2_PACKAGE_XPROTO_INPUTPROTO - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_XPROTO help Generic Linux input driver + +comment "xf86-input-evdev requires udev to be enabled" + depends on !BR2_PACKAGE_UDEV diff --git a/package/x11r7/xdriver_xf86-input-evdev/xdriver_xf86-input-evdev.mk b/package/x11r7/xdriver_xf86-input-evdev/xdriver_xf86-input-evdev.mk index bb5a1d7289..61f0ce74fe 100644 --- a/package/x11r7/xdriver_xf86-input-evdev/xdriver_xf86-input-evdev.mk +++ b/package/x11r7/xdriver_xf86-input-evdev/xdriver_xf86-input-evdev.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-input-evdev -- Generic Linux input driver +# xdriver_xf86-input-evdev # ################################################################################ -XDRIVER_XF86_INPUT_EVDEV_VERSION = 2.3.0 +XDRIVER_XF86_INPUT_EVDEV_VERSION = 2.7.0 XDRIVER_XF86_INPUT_EVDEV_SOURCE = xf86-input-evdev-$(XDRIVER_XF86_INPUT_EVDEV_VERSION).tar.bz2 XDRIVER_XF86_INPUT_EVDEV_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_INPUT_EVDEV_AUTORECONF = NO -XDRIVER_XF86_INPUT_EVDEV_DEPENDENCIES = xproto_inputproto xserver_xorg-server xproto_randrproto xproto_xproto +XDRIVER_XF86_INPUT_EVDEV_LICENSE = MIT +XDRIVER_XF86_INPUT_EVDEV_LICENSE_FILES = COPYING +XDRIVER_XF86_INPUT_EVDEV_DEPENDENCIES = xproto_inputproto xserver_xorg-server xproto_randrproto xproto_xproto udev -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-input-evdev)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-input-joystick/Config.in b/package/x11r7/xdriver_xf86-input-joystick/Config.in index 4a7439aac1..ff9f25f549 100644 --- a/package/x11r7/xdriver_xf86-input-joystick/Config.in +++ b/package/x11r7/xdriver_xf86-input-joystick/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_INPUT_JOYSTICK bool "xf86-input-joystick" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_INPUTPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_XPROTO diff --git a/package/x11r7/xdriver_xf86-input-joystick/xdriver_xf86-input-joystick.mk b/package/x11r7/xdriver_xf86-input-joystick/xdriver_xf86-input-joystick.mk index f6d561957a..9ab47cd9f0 100644 --- a/package/x11r7/xdriver_xf86-input-joystick/xdriver_xf86-input-joystick.mk +++ b/package/x11r7/xdriver_xf86-input-joystick/xdriver_xf86-input-joystick.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-input-joystick -- X.Org driver for joystick input devices +# xdriver_xf86-input-joystick # ################################################################################ -XDRIVER_XF86_INPUT_JOYSTICK_VERSION = 1.4.99.2 +XDRIVER_XF86_INPUT_JOYSTICK_VERSION = 1.6.1 XDRIVER_XF86_INPUT_JOYSTICK_SOURCE = xf86-input-joystick-$(XDRIVER_XF86_INPUT_JOYSTICK_VERSION).tar.bz2 XDRIVER_XF86_INPUT_JOYSTICK_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_INPUT_JOYSTICK_AUTORECONF = NO +XDRIVER_XF86_INPUT_JOYSTICK_LICENSE = MIT +XDRIVER_XF86_INPUT_JOYSTICK_LICENSE_FILES = COPYING XDRIVER_XF86_INPUT_JOYSTICK_DEPENDENCIES = xserver_xorg-server xproto_inputproto xproto_randrproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-input-joystick)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-input-keyboard/Config.in b/package/x11r7/xdriver_xf86-input-keyboard/Config.in index 481c76324c..0a0352424e 100644 --- a/package/x11r7/xdriver_xf86-input-keyboard/Config.in +++ b/package/x11r7/xdriver_xf86-input-keyboard/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_INPUT_KEYBOARD bool "xf86-input-keyboard" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_INPUTPROTO select BR2_PACKAGE_XPROTO_KBPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO diff --git a/package/x11r7/xdriver_xf86-input-keyboard/xdriver_xf86-input-keyboard.mk b/package/x11r7/xdriver_xf86-input-keyboard/xdriver_xf86-input-keyboard.mk index 15b07155a6..f93652cb96 100644 --- a/package/x11r7/xdriver_xf86-input-keyboard/xdriver_xf86-input-keyboard.mk +++ b/package/x11r7/xdriver_xf86-input-keyboard/xdriver_xf86-input-keyboard.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-input-keyboard -- Keyboard input driver +# xdriver_xf86-input-keyboard # ################################################################################ -XDRIVER_XF86_INPUT_KEYBOARD_VERSION = 1.4.0 +XDRIVER_XF86_INPUT_KEYBOARD_VERSION = 1.6.1 XDRIVER_XF86_INPUT_KEYBOARD_SOURCE = xf86-input-keyboard-$(XDRIVER_XF86_INPUT_KEYBOARD_VERSION).tar.bz2 XDRIVER_XF86_INPUT_KEYBOARD_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_INPUT_KEYBOARD_AUTORECONF = NO +XDRIVER_XF86_INPUT_KEYBOARD_LICENSE = MIT +XDRIVER_XF86_INPUT_KEYBOARD_LICENSE_FILES = COPYING XDRIVER_XF86_INPUT_KEYBOARD_DEPENDENCIES = xserver_xorg-server xproto_inputproto xproto_kbproto xproto_randrproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-input-keyboard)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-input-mouse/Config.in b/package/x11r7/xdriver_xf86-input-mouse/Config.in index c8e39b0221..20e1803a99 100644 --- a/package/x11r7/xdriver_xf86-input-mouse/Config.in +++ b/package/x11r7/xdriver_xf86-input-mouse/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_INPUT_MOUSE bool "xf86-input-mouse" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_INPUTPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_XPROTO diff --git a/package/x11r7/xdriver_xf86-input-mouse/xdriver_xf86-input-mouse.mk b/package/x11r7/xdriver_xf86-input-mouse/xdriver_xf86-input-mouse.mk index 6be28c7d1e..d9001f5084 100644 --- a/package/x11r7/xdriver_xf86-input-mouse/xdriver_xf86-input-mouse.mk +++ b/package/x11r7/xdriver_xf86-input-mouse/xdriver_xf86-input-mouse.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-input-mouse -- X.Org driver for mouse input devices +# xdriver_xf86-input-mouse # ################################################################################ -XDRIVER_XF86_INPUT_MOUSE_VERSION = 1.5.0 +XDRIVER_XF86_INPUT_MOUSE_VERSION = 1.7.2 XDRIVER_XF86_INPUT_MOUSE_SOURCE = xf86-input-mouse-$(XDRIVER_XF86_INPUT_MOUSE_VERSION).tar.bz2 XDRIVER_XF86_INPUT_MOUSE_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_INPUT_MOUSE_AUTORECONF = NO +XDRIVER_XF86_INPUT_MOUSE_LICENSE = MIT +XDRIVER_XF86_INPUT_MOUSE_LICENSE_FILES = COPYING XDRIVER_XF86_INPUT_MOUSE_DEPENDENCIES = xserver_xorg-server xproto_inputproto xproto_randrproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-input-mouse)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-input-synaptics/Config.in b/package/x11r7/xdriver_xf86-input-synaptics/Config.in index 258dee244d..6b5e5b6185 100644 --- a/package/x11r7/xdriver_xf86-input-synaptics/Config.in +++ b/package/x11r7/xdriver_xf86-input-synaptics/Config.in @@ -1,8 +1,8 @@ config BR2_PACKAGE_XDRIVER_XF86_INPUT_SYNAPTICS bool "xf86-input-synaptics" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_INPUTPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_XPROTO + select BR2_PACKAGE_MTDEV help X.Org driver for synaptics input devices diff --git a/package/x11r7/xdriver_xf86-input-synaptics/xdriver_xf86-input-synaptics.mk b/package/x11r7/xdriver_xf86-input-synaptics/xdriver_xf86-input-synaptics.mk index 4cb16ea0f4..af63036fe1 100644 --- a/package/x11r7/xdriver_xf86-input-synaptics/xdriver_xf86-input-synaptics.mk +++ b/package/x11r7/xdriver_xf86-input-synaptics/xdriver_xf86-input-synaptics.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-input-synaptics -- X.Org driver for synaptics input devices +# xdriver_xf86-input-synaptics # ################################################################################ -XDRIVER_XF86_INPUT_SYNAPTICS_VERSION = 1.2.0 +XDRIVER_XF86_INPUT_SYNAPTICS_VERSION = 1.6.2 XDRIVER_XF86_INPUT_SYNAPTICS_SOURCE = xf86-input-synaptics-$(XDRIVER_XF86_INPUT_SYNAPTICS_VERSION).tar.bz2 XDRIVER_XF86_INPUT_SYNAPTICS_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_INPUT_SYNAPTICS_AUTORECONF = NO -XDRIVER_XF86_INPUT_SYNAPTICS_DEPENDENCIES = xserver_xorg-server xproto_inputproto xproto_randrproto xproto_xproto +XDRIVER_XF86_INPUT_SYNAPTICS_LICENSE = MIT +XDRIVER_XF86_INPUT_SYNAPTICS_LICENSE_FILES = COPYING +XDRIVER_XF86_INPUT_SYNAPTICS_DEPENDENCIES = xserver_xorg-server xproto_inputproto xproto_randrproto xproto_xproto mtdev -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-input-synaptics)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-input-tslib/Config.in b/package/x11r7/xdriver_xf86-input-tslib/Config.in new file mode 100644 index 0000000000..7cf5926adb --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-tslib/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_XDRIVER_XF86_INPUT_TSLIB + bool "xf86-input-tslib" + depends on !BR2_PREFER_STATIC_LIB # tslib + select BR2_PACKAGE_XPROTO_INPUTPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_XPROTO + select BR2_PACKAGE_TSLIB + help + Touch screen library input driver + + http://www.ptxdist.org/software/xf86-input-tslib/index_en.html + +comment "xf86-input-tslib needs a toolchain w/ dynamic library" + depends on BR2_PREFER_STATIC_LIB diff --git a/package/x11r7/xdriver_xf86-input-tslib/xdriver_xf86-input-tslib-0001-fix-segfault.patch b/package/x11r7/xdriver_xf86-input-tslib/xdriver_xf86-input-tslib-0001-fix-segfault.patch new file mode 100644 index 0000000000..adef18b302 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-tslib/xdriver_xf86-input-tslib-0001-fix-segfault.patch @@ -0,0 +1,34 @@ +Fetch from: https://launchpad.net/ubuntu/+archive/primary/+files/xf86-input-tslib_0.0.6-7build3.debian.tar.gz + +Signed-off-by: Jesper Baekdahl +--- +--- xf86-input-tslib-0.0.6/src/tslib.c 2009-10-19 18:07:18.000000000 +0300 ++++ xf86-input-tslib-0.0.6.new/src/tslib.c 2010-02-12 16:15:05.000000000 +0200 +@@ -103,8 +103,6 @@ + static void + PointerControlProc(DeviceIntPtr dev, PtrCtrl * ctrl) + { +- ErrorF("%s\n", __FUNCTION__); +- return; + } + + static Bool +@@ -406,7 +404,9 @@ + xf86MotionHistoryAllocate(pInfo); + #endif + +- break; ++ if (!InitPtrFeedbackClassDeviceStruct(device, PointerControlProc)) ++ return !Success; ++ break; + + case DEVICE_ON: + AddEnabledDevice(pInfo->fd); +@@ -435,6 +435,7 @@ + xf86TslibControlProc(pInfo->dev, DEVICE_OFF); + ts_close(priv->ts); + xfree(pInfo->private); ++ pInfo->private = NULL; + xf86DeleteInput(pInfo, 0); + } + diff --git a/package/x11r7/xdriver_xf86-input-tslib/xdriver_xf86-input-tslib-0002-port-abi-12.patch b/package/x11r7/xdriver_xf86-input-tslib/xdriver_xf86-input-tslib-0002-port-abi-12.patch new file mode 100644 index 0000000000..eb8fb542fd --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-tslib/xdriver_xf86-input-tslib-0002-port-abi-12.patch @@ -0,0 +1,196 @@ +Fetch from: https://launchpad.net/ubuntu/+archive/primary/+files/xf86-input-tslib_0.0.6-7build3.debian.tar.gz +Fixes build against newer versions of xorg. + +Signed-off-by: Jesper Baekdahl +--- +Index: xf86-input-tslib-trunk/src/tslib.c +=================================================================== +--- xf86-input-tslib-trunk/src/tslib.c (revision 48) ++++ xf86-input-tslib-trunk/src/tslib.c (working copy) +@@ -69,6 +69,13 @@ + #define DEFAULT_HEIGHT 240 + #define DEFAULT_WIDTH 320 + ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 ++#define COLLECT_INPUT_OPTIONS(pInfo, options) xf86CollectInputOptions((pInfo), (options), NULL) ++#else ++#define COLLECT_INPUT_OPTIONS(pInfo, options) xf86CollectInputOptions((pInfo), (options)) ++#endif ++ ++ + enum { TSLIB_ROTATE_NONE=0, TSLIB_ROTATE_CW=270, TSLIB_ROTATE_UD=180, TSLIB_ROTATE_CCW=90 }; + + enum button_state { BUTTON_NOT_PRESSED = 0, BUTTON_1_PRESSED = 1, BUTTON_3_CLICK = 3, BUTTON_3_CLICKED=4, BUTTON_EMULATION_OFF=-1 }; +@@ -106,7 +113,7 @@ + } + + static Bool +-ConvertProc( LocalDevicePtr local, ++ConvertProc( InputInfoPtr local, + int first, + int num, + int v0, +@@ -135,7 +142,7 @@ + return t; + } + +-static void ReadInput (LocalDevicePtr local) ++static void ReadInput (InputInfoPtr local) + { + struct ts_priv *priv = (struct ts_priv *) (local->private); + struct ts_sample samp; +@@ -382,7 +389,11 @@ + axiswidth - 1, /* max val */ + axiswidth, /* resolution */ + 0, /* min_res */ +- axiswidth); /* max_res */ ++ axiswidth /* max_res */ ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 ++ ,Absolute ++#endif ++ ); + + InitValuatorAxisStruct(device, 1, + #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 +@@ -392,7 +403,11 @@ + axisheight - 1, /* max val */ + axisheight, /* resolution */ + 0, /* min_res */ +- axisheight); /* max_res */ ++ axisheight /* max_res */ ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 ++ ,Absolute ++#endif ++ ); + + if (InitProximityClassDeviceStruct (device) == FALSE) { + ErrorF ("Unable to allocate EVTouch touchscreen ProximityClassDeviceStruct\n"); +@@ -434,7 +449,7 @@ + ErrorF("%s\n", __FUNCTION__); + xf86TslibControlProc(pInfo->dev, DEVICE_OFF); + ts_close(priv->ts); +- xfree(pInfo->private); ++ free(pInfo->private); + pInfo->private = NULL; + xf86DeleteInput(pInfo, 0); + } +@@ -444,47 +459,57 @@ + * + * called when the module subsection is found in XF86Config + */ ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 ++static int ++xf86TslibInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) ++#else + static InputInfoPtr + xf86TslibInit(InputDriverPtr drv, IDevPtr dev, int flags) ++#endif + { + struct ts_priv *priv; + char *s; ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 + InputInfoPtr pInfo; ++#endif + +- priv = xcalloc (1, sizeof (struct ts_priv)); ++ priv = calloc (1, sizeof (struct ts_priv)); + if (!priv) +- return NULL; ++ return BadValue; + ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 + if (!(pInfo = xf86AllocateInput(drv, 0))) { +- xfree(priv); +- return NULL; ++ free(priv); ++ return BadValue; + } + + /* Initialise the InputInfoRec. */ + pInfo->name = dev->identifier; +- pInfo->type_name = XI_TOUCHSCREEN; + pInfo->flags = + XI86_KEYBOARD_CAPABLE | XI86_POINTER_CAPABLE | + XI86_SEND_DRAG_EVENTS; +- pInfo->device_control = xf86TslibControlProc; +- pInfo->read_input = ReadInput; + #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0 + pInfo->motion_history_proc = xf86GetMotionEvents; + pInfo->history_size = 0; + #endif +- pInfo->control_proc = NULL; ++ pInfo->conf_idev = dev; + pInfo->close_proc = NULL; +- pInfo->switch_mode = NULL; + pInfo->conversion_proc = ConvertProc; + pInfo->reverse_conversion_proc = NULL; +- pInfo->dev = NULL; + pInfo->private_flags = 0; + pInfo->always_core_feedback = 0; +- pInfo->conf_idev = dev; ++#endif ++ ++ pInfo->type_name = XI_TOUCHSCREEN; ++ pInfo->control_proc = NULL; ++ pInfo->read_input = ReadInput; ++ pInfo->device_control = xf86TslibControlProc; ++ pInfo->switch_mode = NULL; + pInfo->private = priv; ++ pInfo->dev = NULL; + + /* Collect the options, and process the common options. */ +- xf86CollectInputOptions(pInfo, NULL, NULL); ++ COLLECT_INPUT_OPTIONS(pInfo, NULL); + xf86ProcessCommonOptions(pInfo, pInfo->options); + + priv->screen_num = xf86SetIntOption(pInfo->options, "ScreenNumber", 0 ); +@@ -510,23 +535,31 @@ + priv->rotate = TSLIB_ROTATE_NONE; + } + ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 + s = xf86CheckStrOption(dev->commonOptions, "path", NULL); ++#else ++ s = xf86CheckStrOption(pInfo->options, "path", NULL); ++#endif + if (!s) ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 + s = xf86CheckStrOption(dev->commonOptions, "Device", NULL); ++#else ++ s = xf86CheckStrOption(pInfo->options, "Device", NULL); ++#endif + + priv->ts = ts_open(s, 1); +- xfree(s); ++ free(s); + + if (!priv->ts) { + ErrorF("ts_open failed (device=%s)\n",s); + xf86DeleteInput(pInfo, 0); +- return NULL; ++ return BadValue; + } + + if (ts_config(priv->ts)) { + ErrorF("ts_config failed\n"); + xf86DeleteInput(pInfo, 0); +- return NULL; ++ return BadValue; + } + + pInfo->fd = ts_fd(priv->ts); +@@ -536,11 +569,13 @@ + priv->state = BUTTON_EMULATION_OFF; + } + ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 + /* Mark the device configured */ + pInfo->flags |= XI86_CONFIGURED; ++#endif + + /* Return the configured device */ +- return (pInfo); ++ return Success; + } + + _X_EXPORT InputDriverRec TSLIB = { diff --git a/package/x11r7/xdriver_xf86-input-tslib/xdriver_xf86-input-tslib.mk b/package/x11r7/xdriver_xf86-input-tslib/xdriver_xf86-input-tslib.mk new file mode 100644 index 0000000000..c9a1995e2d --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-tslib/xdriver_xf86-input-tslib.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# xdriver_xf86-input-tslib +# +################################################################################ + +XDRIVER_XF86_INPUT_TSLIB_VERSION = 0.0.6 +XDRIVER_XF86_INPUT_TSLIB_SOURCE = xf86-input-tslib-$(XDRIVER_XF86_INPUT_TSLIB_VERSION).tar.bz2 +XDRIVER_XF86_INPUT_TSLIB_SITE = http://www.ptxdist.org/software/xf86-input-tslib/download +XDRIVER_XF86_INPUT_TSLIB_LICENSE = MIT +XDRIVER_XF86_INPUT_TSLIB_LICENSE_FILES = COPYING +XDRIVER_XF86_INPUT_TSLIB_DEPENDENCIES = \ + xproto_inputproto \ + xserver_xorg-server \ + xproto_randrproto \ + xproto_xproto \ + tslib + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-input-vmmouse/Config.in b/package/x11r7/xdriver_xf86-input-vmmouse/Config.in index 377e7e456e..de989eb34a 100644 --- a/package/x11r7/xdriver_xf86-input-vmmouse/Config.in +++ b/package/x11r7/xdriver_xf86-input-vmmouse/Config.in @@ -1,6 +1,6 @@ config BR2_PACKAGE_XDRIVER_XF86_INPUT_VMMOUSE bool "xf86-input-vmmouse" - select BR2_PACKAGE_XSERVER_XORG_SERVER + depends on BR2_i386 || BR2_x86_64 select BR2_PACKAGE_XPROTO_INPUTPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_XPROTO diff --git a/package/x11r7/xdriver_xf86-input-vmmouse/xdriver_xf86-input-vmmouse.mk b/package/x11r7/xdriver_xf86-input-vmmouse/xdriver_xf86-input-vmmouse.mk index 3526236608..05374ef779 100644 --- a/package/x11r7/xdriver_xf86-input-vmmouse/xdriver_xf86-input-vmmouse.mk +++ b/package/x11r7/xdriver_xf86-input-vmmouse/xdriver_xf86-input-vmmouse.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-input-vmmouse -- VMWare mouse input driver +# xdriver_xf86-input-vmmouse # ################################################################################ -XDRIVER_XF86_INPUT_VMMOUSE_VERSION = 12.6.5 +XDRIVER_XF86_INPUT_VMMOUSE_VERSION = 12.8.0 XDRIVER_XF86_INPUT_VMMOUSE_SOURCE = xf86-input-vmmouse-$(XDRIVER_XF86_INPUT_VMMOUSE_VERSION).tar.bz2 XDRIVER_XF86_INPUT_VMMOUSE_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_INPUT_VMMOUSE_AUTORECONF = NO +XDRIVER_XF86_INPUT_VMMOUSE_LICENSE = MIT +XDRIVER_XF86_INPUT_VMMOUSE_LICENSE_FILES = COPYING XDRIVER_XF86_INPUT_VMMOUSE_DEPENDENCIES = xserver_xorg-server xproto_inputproto xproto_randrproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-input-vmmouse)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-input-void/Config.in b/package/x11r7/xdriver_xf86-input-void/Config.in index ab4230b52a..d6fdef2914 100644 --- a/package/x11r7/xdriver_xf86-input-void/Config.in +++ b/package/x11r7/xdriver_xf86-input-void/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_INPUT_VOID bool "xf86-input-void" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_INPUTPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_XPROTO diff --git a/package/x11r7/xdriver_xf86-input-void/xdriver_xf86-input-void.mk b/package/x11r7/xdriver_xf86-input-void/xdriver_xf86-input-void.mk index fb16bb7fea..cab37532aa 100644 --- a/package/x11r7/xdriver_xf86-input-void/xdriver_xf86-input-void.mk +++ b/package/x11r7/xdriver_xf86-input-void/xdriver_xf86-input-void.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-input-void -- null input driver +# xdriver_xf86-input-void # ################################################################################ -XDRIVER_XF86_INPUT_VOID_VERSION = 1.3.0 +XDRIVER_XF86_INPUT_VOID_VERSION = 1.4.0 XDRIVER_XF86_INPUT_VOID_SOURCE = xf86-input-void-$(XDRIVER_XF86_INPUT_VOID_VERSION).tar.bz2 XDRIVER_XF86_INPUT_VOID_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_INPUT_VOID_AUTORECONF = NO +XDRIVER_XF86_INPUT_VOID_LICENSE = MIT +XDRIVER_XF86_INPUT_VOID_LICENSE_FILES = COPYING XDRIVER_XF86_INPUT_VOID_DEPENDENCIES = xserver_xorg-server xproto_inputproto xproto_randrproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-input-void)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-apm/Config.in b/package/x11r7/xdriver_xf86-video-apm/Config.in deleted file mode 100644 index dea52580b1..0000000000 --- a/package/x11r7/xdriver_xf86-video-apm/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_XDRIVER_XF86_VIDEO_APM - bool "xf86-video-apm" - select BR2_PACKAGE_XSERVER_XORG_SERVER - select BR2_PACKAGE_XPROTO_FONTSPROTO - select BR2_PACKAGE_XPROTO_RANDRPROTO - select BR2_PACKAGE_XPROTO_RENDERPROTO - select BR2_PACKAGE_XPROTO_VIDEOPROTO - select BR2_PACKAGE_XPROTO_XEXTPROTO - select BR2_PACKAGE_XPROTO_XF86RUSHPROTO - select BR2_PACKAGE_XPROTO_XPROTO - help - Alliance ProMotion video driver diff --git a/package/x11r7/xdriver_xf86-video-apm/xdriver_xf86-video-apm.mk b/package/x11r7/xdriver_xf86-video-apm/xdriver_xf86-video-apm.mk deleted file mode 100644 index c0f4b82e4d..0000000000 --- a/package/x11r7/xdriver_xf86-video-apm/xdriver_xf86-video-apm.mk +++ /dev/null @@ -1,13 +0,0 @@ -################################################################################ -# -# xdriver_xf86-video-apm -- Alliance ProMotion video driver -# -################################################################################ - -XDRIVER_XF86_VIDEO_APM_VERSION = 1.2.2 -XDRIVER_XF86_VIDEO_APM_SOURCE = xf86-video-apm-$(XDRIVER_XF86_VIDEO_APM_VERSION).tar.bz2 -XDRIVER_XF86_VIDEO_APM_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_APM_AUTORECONF = NO -XDRIVER_XF86_VIDEO_APM_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xf86rushproto xproto_xproto - -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-apm)) diff --git a/package/x11r7/xdriver_xf86-video-ark/Config.in b/package/x11r7/xdriver_xf86-video-ark/Config.in index d9703de234..cecedde024 100644 --- a/package/x11r7/xdriver_xf86-video-ark/Config.in +++ b/package/x11r7/xdriver_xf86-video-ark/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_ARK bool "xf86-video-ark" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_FONTSPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_RENDERPROTO diff --git a/package/x11r7/xdriver_xf86-video-ark/xdriver_xf86-video-ark.mk b/package/x11r7/xdriver_xf86-video-ark/xdriver_xf86-video-ark.mk index 744270644b..9b94b2a260 100644 --- a/package/x11r7/xdriver_xf86-video-ark/xdriver_xf86-video-ark.mk +++ b/package/x11r7/xdriver_xf86-video-ark/xdriver_xf86-video-ark.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-video-ark -- X.Org driver for ark cards +# xdriver_xf86-video-ark # ################################################################################ -XDRIVER_XF86_VIDEO_ARK_VERSION = 0.7.2 +XDRIVER_XF86_VIDEO_ARK_VERSION = 0.7.4 XDRIVER_XF86_VIDEO_ARK_SOURCE = xf86-video-ark-$(XDRIVER_XF86_VIDEO_ARK_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_ARK_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_ARK_AUTORECONF = NO +XDRIVER_XF86_VIDEO_ARK_LICENSE = MIT +XDRIVER_XF86_VIDEO_ARK_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_ARK_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xextproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-ark)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-ast/xdriver_xf86-video-ast.mk b/package/x11r7/xdriver_xf86-video-ast/xdriver_xf86-video-ast.mk index daa94bbd88..887dc912ef 100644 --- a/package/x11r7/xdriver_xf86-video-ast/xdriver_xf86-video-ast.mk +++ b/package/x11r7/xdriver_xf86-video-ast/xdriver_xf86-video-ast.mk @@ -1,12 +1,13 @@ ################################################################################ # -# xdriver_xf86-video-ast -- No description available +# xdriver_xf86-video-ast # ################################################################################ -XDRIVER_XF86_VIDEO_AST_VERSION = 0.89.9 +XDRIVER_XF86_VIDEO_AST_VERSION = 0.93.10 XDRIVER_XF86_VIDEO_AST_SOURCE = xf86-video-ast-$(XDRIVER_XF86_VIDEO_AST_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_AST_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_AST_AUTORECONF = NO +XDRIVER_XF86_VIDEO_AST_LICENSE = MIT +XDRIVER_XF86_VIDEO_AST_LICENSE_FILES = COPYING -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-ast)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-ati/Config.in b/package/x11r7/xdriver_xf86-video-ati/Config.in index 107a57b7b0..3c0cac36c5 100644 --- a/package/x11r7/xdriver_xf86-video-ati/Config.in +++ b/package/x11r7/xdriver_xf86-video-ati/Config.in @@ -1,7 +1,7 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_ATI bool "xf86-video-ati" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_LIBDRM_RADEON select BR2_PACKAGE_MESA3D select BR2_PACKAGE_XPROTO_FONTSPROTO select BR2_PACKAGE_XPROTO_GLPROTO diff --git a/package/x11r7/xdriver_xf86-video-ati/xdriver_xf86-video-ati-cross-compile.patch b/package/x11r7/xdriver_xf86-video-ati/xdriver_xf86-video-ati-cross-compile.patch deleted file mode 100644 index d27617606e..0000000000 --- a/package/x11r7/xdriver_xf86-video-ati/xdriver_xf86-video-ati-cross-compile.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/configure.ac 2008-06-23 10:39:28.000000000 -0400 -+++ b/configure.ac 2008-06-23 10:40:46.000000000 -0400 -@@ -85,14 +85,20 @@ sdkdir=$(pkg-config --variable=sdkdir xo - AC_HEADER_STDC - - if test "$DRI" != no; then -- AC_CHECK_FILE([${sdkdir}/dri.h], -+ if test "$cross_compiling" = "no" ; then -+ AC_CHECK_FILE([${sdkdir}/dri.h], - [have_dri_h="yes"], [have_dri_h="no"]) -- AC_CHECK_FILE([${sdkdir}/sarea.h], -+ AC_CHECK_FILE([${sdkdir}/sarea.h], - [have_sarea_h="yes"], [have_sarea_h="no"]) -- AC_CHECK_FILE([${sdkdir}/dristruct.h], -+ AC_CHECK_FILE([${sdkdir}/dristruct.h], - [have_dristruct_h="yes"], [have_dristruct_h="no"]) -- AC_CHECK_FILE([${sdkdir}/damage.h], -+ AC_CHECK_FILE([${sdkdir}/damage.h], - [have_damage_h="yes"], [have_damage_h="no"]) -+ else -+ have_dri_h="yes" -+ have_sarea_h="yes" -+ have_dristruct_h="yes" -+ fi - fi - - AC_MSG_CHECKING([whether to include DRI support]) diff --git a/package/x11r7/xdriver_xf86-video-ati/xdriver_xf86-video-ati.mk b/package/x11r7/xdriver_xf86-video-ati/xdriver_xf86-video-ati.mk index 8a5a1d0b3d..b90f10ad64 100644 --- a/package/x11r7/xdriver_xf86-video-ati/xdriver_xf86-video-ati.mk +++ b/package/x11r7/xdriver_xf86-video-ati/xdriver_xf86-video-ati.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-video-ati -- ATI video driver +# xdriver_xf86-video-ati # ################################################################################ -XDRIVER_XF86_VIDEO_ATI_VERSION = 6.12.4 +XDRIVER_XF86_VIDEO_ATI_VERSION = 6.14.4 XDRIVER_XF86_VIDEO_ATI_SOURCE = xf86-video-ati-$(XDRIVER_XF86_VIDEO_ATI_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_ATI_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_ATI_AUTORECONF = YES +XDRIVER_XF86_VIDEO_ATI_LICENSE = MIT +XDRIVER_XF86_VIDEO_ATI_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_ATI_DEPENDENCIES = xserver_xorg-server libdrm xproto_fontsproto xproto_glproto xproto_randrproto xproto_videoproto xproto_xextproto xproto_xf86driproto xproto_xineramaproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-ati)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-chips/Config.in b/package/x11r7/xdriver_xf86-video-chips/Config.in deleted file mode 100644 index 29a99ecf73..0000000000 --- a/package/x11r7/xdriver_xf86-video-chips/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_XDRIVER_XF86_VIDEO_CHIPS - bool "xf86-video-chips" - select BR2_PACKAGE_XSERVER_XORG_SERVER - select BR2_PACKAGE_XPROTO_FONTSPROTO - select BR2_PACKAGE_XPROTO_RANDRPROTO - select BR2_PACKAGE_XPROTO_RENDERPROTO - select BR2_PACKAGE_XPROTO_VIDEOPROTO - select BR2_PACKAGE_XPROTO_XPROTO - help - Chips and Technologies video driver diff --git a/package/x11r7/xdriver_xf86-video-chips/xdriver_xf86-video-chips.mk b/package/x11r7/xdriver_xf86-video-chips/xdriver_xf86-video-chips.mk deleted file mode 100644 index 0dc5dd108c..0000000000 --- a/package/x11r7/xdriver_xf86-video-chips/xdriver_xf86-video-chips.mk +++ /dev/null @@ -1,13 +0,0 @@ -################################################################################ -# -# xdriver_xf86-video-chips -- Chips and Technologies video driver -# -################################################################################ - -XDRIVER_XF86_VIDEO_CHIPS_VERSION = 1.2.2 -XDRIVER_XF86_VIDEO_CHIPS_SOURCE = xf86-video-chips-$(XDRIVER_XF86_VIDEO_CHIPS_VERSION).tar.bz2 -XDRIVER_XF86_VIDEO_CHIPS_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_CHIPS_AUTORECONF = NO -XDRIVER_XF86_VIDEO_CHIPS_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xproto - -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-chips)) diff --git a/package/x11r7/xdriver_xf86-video-cirrus/Config.in b/package/x11r7/xdriver_xf86-video-cirrus/Config.in index 31ed634298..11c9df8e0e 100644 --- a/package/x11r7/xdriver_xf86-video-cirrus/Config.in +++ b/package/x11r7/xdriver_xf86-video-cirrus/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_CIRRUS bool "xf86-video-cirrus" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_FONTSPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_RENDERPROTO diff --git a/package/x11r7/xdriver_xf86-video-cirrus/xdriver_xf86-video-cirrus.mk b/package/x11r7/xdriver_xf86-video-cirrus/xdriver_xf86-video-cirrus.mk index 47c3c9ba88..9e38115669 100644 --- a/package/x11r7/xdriver_xf86-video-cirrus/xdriver_xf86-video-cirrus.mk +++ b/package/x11r7/xdriver_xf86-video-cirrus/xdriver_xf86-video-cirrus.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-video-cirrus -- Cirrus Logic video driver +# xdriver_xf86-video-cirrus # ################################################################################ -XDRIVER_XF86_VIDEO_CIRRUS_VERSION = 1.3.2 +XDRIVER_XF86_VIDEO_CIRRUS_VERSION = 1.4.0 XDRIVER_XF86_VIDEO_CIRRUS_SOURCE = xf86-video-cirrus-$(XDRIVER_XF86_VIDEO_CIRRUS_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_CIRRUS_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_CIRRUS_AUTORECONF = NO +XDRIVER_XF86_VIDEO_CIRRUS_LICENSE = MIT +XDRIVER_XF86_VIDEO_CIRRUS_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_CIRRUS_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-cirrus)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-dummy/Config.in b/package/x11r7/xdriver_xf86-video-dummy/Config.in index 2a172cc747..00f7e1df40 100644 --- a/package/x11r7/xdriver_xf86-video-dummy/Config.in +++ b/package/x11r7/xdriver_xf86-video-dummy/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_DUMMY bool "xf86-video-dummy" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_FONTSPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_RENDERPROTO diff --git a/package/x11r7/xdriver_xf86-video-dummy/xdriver_xf86-video-dummy.mk b/package/x11r7/xdriver_xf86-video-dummy/xdriver_xf86-video-dummy.mk index 2121748587..ee2aedb418 100644 --- a/package/x11r7/xdriver_xf86-video-dummy/xdriver_xf86-video-dummy.mk +++ b/package/x11r7/xdriver_xf86-video-dummy/xdriver_xf86-video-dummy.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-video-dummy -- X.Org driver for dummy cards +# xdriver_xf86-video-dummy # ################################################################################ -XDRIVER_XF86_VIDEO_DUMMY_VERSION = 0.3.2 +XDRIVER_XF86_VIDEO_DUMMY_VERSION = 0.3.5 XDRIVER_XF86_VIDEO_DUMMY_SOURCE = xf86-video-dummy-$(XDRIVER_XF86_VIDEO_DUMMY_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_DUMMY_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_DUMMY_AUTORECONF = NO +XDRIVER_XF86_VIDEO_DUMMY_LICENSE = MIT +XDRIVER_XF86_VIDEO_DUMMY_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_DUMMY_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xf86dgaproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-dummy)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-fbdev/Config.in b/package/x11r7/xdriver_xf86-video-fbdev/Config.in index 8907fe1b94..9f7c5402b8 100644 --- a/package/x11r7/xdriver_xf86-video-fbdev/Config.in +++ b/package/x11r7/xdriver_xf86-video-fbdev/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_FBDEV bool "xf86-video-fbdev" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_FONTSPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_RENDERPROTO diff --git a/package/x11r7/xdriver_xf86-video-fbdev/xdriver_xf86-video-fbdev.mk b/package/x11r7/xdriver_xf86-video-fbdev/xdriver_xf86-video-fbdev.mk index 97c20fa53f..12eb315eeb 100644 --- a/package/x11r7/xdriver_xf86-video-fbdev/xdriver_xf86-video-fbdev.mk +++ b/package/x11r7/xdriver_xf86-video-fbdev/xdriver_xf86-video-fbdev.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-video-fbdev -- video driver for framebuffer device +# xdriver_xf86-video-fbdev # ################################################################################ -XDRIVER_XF86_VIDEO_FBDEV_VERSION = 0.4.1 +XDRIVER_XF86_VIDEO_FBDEV_VERSION = 0.4.2 XDRIVER_XF86_VIDEO_FBDEV_SOURCE = xf86-video-fbdev-$(XDRIVER_XF86_VIDEO_FBDEV_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_FBDEV_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_FBDEV_AUTORECONF = NO +XDRIVER_XF86_VIDEO_FBDEV_LICENSE = MIT +XDRIVER_XF86_VIDEO_FBDEV_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_FBDEV_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-fbdev)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-geode/Config.in b/package/x11r7/xdriver_xf86-video-geode/Config.in index c60b62c052..0b45fb165d 100644 --- a/package/x11r7/xdriver_xf86-video-geode/Config.in +++ b/package/x11r7/xdriver_xf86-video-geode/Config.in @@ -1,10 +1,10 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_GEODE bool "xf86-video-geode" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_FONTSPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_RENDERPROTO select BR2_PACKAGE_XPROTO_VIDEOPROTO select BR2_PACKAGE_XPROTO_XPROTO + depends on BR2_i386 help video driver for geode device diff --git a/package/x11r7/xdriver_xf86-video-geode/xdriver_xf86-video-geode.mk b/package/x11r7/xdriver_xf86-video-geode/xdriver_xf86-video-geode.mk index cd94246f5c..7c7feb23a3 100644 --- a/package/x11r7/xdriver_xf86-video-geode/xdriver_xf86-video-geode.mk +++ b/package/x11r7/xdriver_xf86-video-geode/xdriver_xf86-video-geode.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-video-geode -- video driver for geode device +# xdriver_xf86-video-geode # ################################################################################ -XDRIVER_XF86_VIDEO_GEODE_VERSION = 2.11.6 +XDRIVER_XF86_VIDEO_GEODE_VERSION = 2.11.13 XDRIVER_XF86_VIDEO_GEODE_SOURCE = xf86-video-geode-$(XDRIVER_XF86_VIDEO_GEODE_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_GEODE_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_GEODE_AUTORECONF = NO +XDRIVER_XF86_VIDEO_GEODE_LICENSE = MIT +XDRIVER_XF86_VIDEO_GEODE_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_GEODE_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-geode)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-glide/Config.in b/package/x11r7/xdriver_xf86-video-glide/Config.in index ea9abd703c..413acce02c 100644 --- a/package/x11r7/xdriver_xf86-video-glide/Config.in +++ b/package/x11r7/xdriver_xf86-video-glide/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_GLIDE bool "xf86-video-glide" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_FONTSPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_RENDERPROTO diff --git a/package/x11r7/xdriver_xf86-video-glide/xdriver_xf86-video-glide.mk b/package/x11r7/xdriver_xf86-video-glide/xdriver_xf86-video-glide.mk index 0115cec959..c120aee486 100644 --- a/package/x11r7/xdriver_xf86-video-glide/xdriver_xf86-video-glide.mk +++ b/package/x11r7/xdriver_xf86-video-glide/xdriver_xf86-video-glide.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-video-glide -- video driver for glide device +# xdriver_xf86-video-glide # ################################################################################ -XDRIVER_XF86_VIDEO_GLIDE_VERSION = 1.0.3 +XDRIVER_XF86_VIDEO_GLIDE_VERSION = 1.2.0 XDRIVER_XF86_VIDEO_GLIDE_SOURCE = xf86-video-glide-$(XDRIVER_XF86_VIDEO_GLIDE_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_GLIDE_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_GLIDE_AUTORECONF = NO +XDRIVER_XF86_VIDEO_GLIDE_LICENSE = MIT +XDRIVER_XF86_VIDEO_GLIDE_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_GLIDE_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-glide)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-glint/Config.in b/package/x11r7/xdriver_xf86-video-glint/Config.in index 782b6dac51..bd92788830 100644 --- a/package/x11r7/xdriver_xf86-video-glint/Config.in +++ b/package/x11r7/xdriver_xf86-video-glint/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_GLINT bool "xf86-video-glint" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_LIBDRM select BR2_PACKAGE_MESA3D select BR2_PACKAGE_XPROTO_FONTSPROTO diff --git a/package/x11r7/xdriver_xf86-video-glint/xdriver_xf86-video-glint-1.2.1-cross-compile.patch b/package/x11r7/xdriver_xf86-video-glint/xdriver_xf86-video-glint-1.2.1-cross-compile.patch deleted file mode 100644 index 8c420d3a85..0000000000 --- a/package/x11r7/xdriver_xf86-video-glint/xdriver_xf86-video-glint-1.2.1-cross-compile.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- a/configure.ac 2008-06-23 11:17:07.000000000 -0400 -+++ b/configure.ac 2008-06-23 11:16:31.000000000 -0400 -@@ -75,12 +75,20 @@ CPPFLAGS="$SAVE_CPPFLAGS" - AC_HEADER_STDC - - if test "$DRI" != no; then -- AC_CHECK_FILE([${sdkdir}/dri.h], -- [have_dri_h="yes"], [have_dri_h="no"]) -- AC_CHECK_FILE([${sdkdir}/sarea.h], -- [have_sarea_h="yes"], [have_sarea_h="no"]) -- AC_CHECK_FILE([${sdkdir}/dristruct.h], -- [have_dristruct_h="yes"], [have_dristruct_h="no"]) -+ if test "$cross_compiling" = "no" ; then -+ AC_CHECK_FILE([${sdkdir}/dri.h], -+ [have_dri_h="yes"], [have_dri_h="no"]) -+ AC_CHECK_FILE([${sdkdir}/sarea.h], -+ [have_sarea_h="yes"], [have_sarea_h="no"]) -+ AC_CHECK_FILE([${sdkdir}/dristruct.h], -+ [have_dristruct_h="yes"], [have_dristruct_h="no"]) -+ AC_CHECK_FILE([${sdkdir}/damage.h], -+ [have_damage_h="yes"], [have_damage_h="no"]) -+ else -+ have_dri_h="yes" -+ have_sarea_h="yes" -+ have_dristruct_h="yes" -+ fi - fi - - AC_MSG_CHECKING([whether to include DRI support]) diff --git a/package/x11r7/xdriver_xf86-video-glint/xdriver_xf86-video-glint.mk b/package/x11r7/xdriver_xf86-video-glint/xdriver_xf86-video-glint.mk index 5d50da1f3f..396a1627b3 100644 --- a/package/x11r7/xdriver_xf86-video-glint/xdriver_xf86-video-glint.mk +++ b/package/x11r7/xdriver_xf86-video-glint/xdriver_xf86-video-glint.mk @@ -1,13 +1,15 @@ ################################################################################ # -# xdriver_xf86-video-glint -- GLINT/Permedia video driver +# xdriver_xf86-video-glint # ################################################################################ -XDRIVER_XF86_VIDEO_GLINT_VERSION = 1.2.4 +XDRIVER_XF86_VIDEO_GLINT_VERSION = 1.2.7 XDRIVER_XF86_VIDEO_GLINT_SOURCE = xf86-video-glint-$(XDRIVER_XF86_VIDEO_GLINT_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_GLINT_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_GLINT_LICENSE = MIT +XDRIVER_XF86_VIDEO_GLINT_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_GLINT_AUTORECONF = YES XDRIVER_XF86_VIDEO_GLINT_DEPENDENCIES = xserver_xorg-server libdrm xproto_fontsproto xproto_glproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xf86dgaproto xproto_xf86driproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-glint)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-i128/Config.in b/package/x11r7/xdriver_xf86-video-i128/Config.in index a66fda6d5f..30b240cc1f 100644 --- a/package/x11r7/xdriver_xf86-video-i128/Config.in +++ b/package/x11r7/xdriver_xf86-video-i128/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_I128 bool "xf86-video-i128" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_FONTSPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_RENDERPROTO diff --git a/package/x11r7/xdriver_xf86-video-i128/xdriver_xf86-video-i128.mk b/package/x11r7/xdriver_xf86-video-i128/xdriver_xf86-video-i128.mk index 63c9ad7e10..d18beb3125 100644 --- a/package/x11r7/xdriver_xf86-video-i128/xdriver_xf86-video-i128.mk +++ b/package/x11r7/xdriver_xf86-video-i128/xdriver_xf86-video-i128.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-video-i128 -- Number 9 I128 video driver +# xdriver_xf86-video-i128 # ################################################################################ -XDRIVER_XF86_VIDEO_I128_VERSION = 1.3.3 +XDRIVER_XF86_VIDEO_I128_VERSION = 1.3.5 XDRIVER_XF86_VIDEO_I128_SOURCE = xf86-video-i128-$(XDRIVER_XF86_VIDEO_I128_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_I128_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_I128_AUTORECONF = NO +XDRIVER_XF86_VIDEO_I128_LICENSE = MIT +XDRIVER_XF86_VIDEO_I128_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_I128_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-i128)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-i740/Config.in b/package/x11r7/xdriver_xf86-video-i740/Config.in deleted file mode 100644 index 9d1a040294..0000000000 --- a/package/x11r7/xdriver_xf86-video-i740/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_XDRIVER_XF86_VIDEO_I740 - bool "xf86-video-i740" - select BR2_PACKAGE_XSERVER_XORG_SERVER - select BR2_PACKAGE_XPROTO_FONTSPROTO - select BR2_PACKAGE_XPROTO_RANDRPROTO - select BR2_PACKAGE_XPROTO_RENDERPROTO - select BR2_PACKAGE_XPROTO_VIDEOPROTO - select BR2_PACKAGE_XPROTO_XEXTPROTO - select BR2_PACKAGE_XPROTO_XPROTO - help - Intel i740 video driver diff --git a/package/x11r7/xdriver_xf86-video-i740/xdriver_xf86-video-i740.mk b/package/x11r7/xdriver_xf86-video-i740/xdriver_xf86-video-i740.mk deleted file mode 100644 index 493fd348ec..0000000000 --- a/package/x11r7/xdriver_xf86-video-i740/xdriver_xf86-video-i740.mk +++ /dev/null @@ -1,13 +0,0 @@ -################################################################################ -# -# xdriver_xf86-video-i740 -- Intel i740 video driver -# -################################################################################ - -XDRIVER_XF86_VIDEO_I740_VERSION = 1.3.2 -XDRIVER_XF86_VIDEO_I740_SOURCE = xf86-video-i740-$(XDRIVER_XF86_VIDEO_I740_VERSION).tar.bz2 -XDRIVER_XF86_VIDEO_I740_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_I740_AUTORECONF = NO -XDRIVER_XF86_VIDEO_I740_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xproto - -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-i740)) diff --git a/package/x11r7/xdriver_xf86-video-intel/Config.in b/package/x11r7/xdriver_xf86-video-intel/Config.in index 9a1d6cf92a..83b714a433 100644 --- a/package/x11r7/xdriver_xf86-video-intel/Config.in +++ b/package/x11r7/xdriver_xf86-video-intel/Config.in @@ -1,12 +1,13 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_INTEL bool "xf86-video-intel" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_FONTSPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_RENDERPROTO select BR2_PACKAGE_XPROTO_XPROTO select BR2_PACKAGE_XLIB_LIBPCIACCESS select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_LIBDRM_INTEL select BR2_PACKAGE_MESA3D + depends on (BR2_i386 || BR2_x86_64) help Intel video driver diff --git a/package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel-2.10.0-cross-compile.patch b/package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel-2.10.0-cross-compile.patch deleted file mode 100644 index 0b020ac5cb..0000000000 --- a/package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel-2.10.0-cross-compile.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/configure.ac.orig 2010-01-04 22:20:07.000000000 +0000 -+++ b/configure.ac 2010-02-19 12:12:50.000000000 +0000 -@@ -103,7 +103,7 @@ - CFLAGS="$XORG_CFLAGS $DRI_CFLAGS $DRM_CFLAGS" - CPPFLAGS="$XORG_CFLAGS $DRI_CFLAGS $DRM_CFLAGS" - AC_MSG_CHECKING([whether to include DRI support]) --if test x$DRI != xno; then -+if test "$cross_compiling" = "no" -a test x$DRI != xno; then - AC_CHECK_FILE([${sdkdir}/dri.h], - [have_dri_h="yes"], [have_dri_h="no"]) - AC_CHECK_FILE([${sdkdir}/sarea.h], diff --git a/package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel-2.9.1-cross-compile.patch b/package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel-2.9.1-cross-compile.patch deleted file mode 100644 index 76a33eb1dd..0000000000 --- a/package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel-2.9.1-cross-compile.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- xdriver_xf86-video-intel-2.9.1/configure.ac.orig 2010-01-28 11:18:27.526329157 +0200 -+++ xdriver_xf86-video-intel-2.9.1/configure.ac 2010-01-28 11:21:38.065198735 +0200 -@@ -114,6 +114,7 @@ save_CFLAGS="$CFLAGS" - CFLAGS="$XORG_CFLAGS $DRI_CFLAGS $drm_cflags" - CPPFLAGS="$XORG_CFLAGS $DRI_CFLAGS $drm_cflags" - AC_MSG_CHECKING([whether to include DRI support]) -+if test "$cross_compiling" = "no" ; then - if test x$DRI != xno; then - AC_CHECK_FILE([${sdkdir}/dri.h], - [have_dri_h="yes"], [have_dri_h="no"]) -@@ -132,6 +133,14 @@ if test x$DRI = xauto; then - DRI="no" - fi - fi -+else -+if test x$DRI != xno; then -+ have_dri_h="yes" -+ have_sarea_h="yes" -+ have_dristruct_h="yes" -+ DRI="yes" -+fi -+fi - AC_MSG_RESULT([$DRI]) - CFLAGS="$save_CFLAGS $DEBUGFLAGS" - diff --git a/package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel.mk b/package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel.mk index 83d0a4419b..97fef99a78 100644 --- a/package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel.mk +++ b/package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel.mk @@ -1,14 +1,16 @@ ################################################################################ # -# xdriver_xf86-video-intel -- Intel video driver +# xdriver_xf86-video-intel # ################################################################################ -XDRIVER_XF86_VIDEO_INTEL_VERSION = 2.10.0 +XDRIVER_XF86_VIDEO_INTEL_VERSION = 2.19.0 XDRIVER_XF86_VIDEO_INTEL_SOURCE = xf86-video-intel-$(XDRIVER_XF86_VIDEO_INTEL_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_INTEL_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_INTEL_LICENSE = MIT +XDRIVER_XF86_VIDEO_INTEL_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_INTEL_AUTORECONF = YES XDRIVER_XF86_VIDEO_INTEL_CONF_OPT = --enable-dri XDRIVER_XF86_VIDEO_INTEL_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xproto libdrm xlib_libpciaccess -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-intel)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-mach64/Config.in b/package/x11r7/xdriver_xf86-video-mach64/Config.in index f2464e7317..31f4c5843f 100644 --- a/package/x11r7/xdriver_xf86-video-mach64/Config.in +++ b/package/x11r7/xdriver_xf86-video-mach64/Config.in @@ -1,7 +1,6 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_MACH64 bool "xf86-video-mach64" select BR2_PACKAGE_MESA3D - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_FONTSPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_RENDERPROTO diff --git a/package/x11r7/xdriver_xf86-video-mach64/xdriver_xf86-video-mach64.mk b/package/x11r7/xdriver_xf86-video-mach64/xdriver_xf86-video-mach64.mk index 5b727691b0..7534d29e14 100644 --- a/package/x11r7/xdriver_xf86-video-mach64/xdriver_xf86-video-mach64.mk +++ b/package/x11r7/xdriver_xf86-video-mach64/xdriver_xf86-video-mach64.mk @@ -1,13 +1,15 @@ ################################################################################ # -# xdriver_xf86-video-mach64 -- mach64 video driver +# xdriver_xf86-video-mach64 # ################################################################################ -XDRIVER_XF86_VIDEO_MACH64_VERSION = 6.8.2 +XDRIVER_XF86_VIDEO_MACH64_VERSION = 6.9.3 XDRIVER_XF86_VIDEO_MACH64_SOURCE = xf86-video-mach64-$(XDRIVER_XF86_VIDEO_MACH64_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_MACH64_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_MACH64_LICENSE = MIT +XDRIVER_XF86_VIDEO_MACH64_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_MACH64_AUTORECONF = YES XDRIVER_XF86_VIDEO_MACH64_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xextproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-mach64)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-mga/Config.in b/package/x11r7/xdriver_xf86-video-mga/Config.in index 40c6f3a947..2fc38375dd 100644 --- a/package/x11r7/xdriver_xf86-video-mga/Config.in +++ b/package/x11r7/xdriver_xf86-video-mga/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_MGA bool "xf86-video-mga" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_LIBDRM select BR2_PACKAGE_MESA3D select BR2_PACKAGE_XPROTO_FONTSPROTO diff --git a/package/x11r7/xdriver_xf86-video-mga/xdriver_xf86-video-mga.mk b/package/x11r7/xdriver_xf86-video-mga/xdriver_xf86-video-mga.mk index 033a32c9f4..916a0989fb 100644 --- a/package/x11r7/xdriver_xf86-video-mga/xdriver_xf86-video-mga.mk +++ b/package/x11r7/xdriver_xf86-video-mga/xdriver_xf86-video-mga.mk @@ -1,13 +1,15 @@ ################################################################################ # -# xdriver_xf86-video-mga -- Matrox video driver +# xdriver_xf86-video-mga # ################################################################################ -XDRIVER_XF86_VIDEO_MGA_VERSION = 1.4.11 +XDRIVER_XF86_VIDEO_MGA_VERSION = 1.5.0 XDRIVER_XF86_VIDEO_MGA_SOURCE = xf86-video-mga-$(XDRIVER_XF86_VIDEO_MGA_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_MGA_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_MGA_LICENSE = MIT +XDRIVER_XF86_VIDEO_MGA_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_MGA_AUTORECONF = YES XDRIVER_XF86_VIDEO_MGA_DEPENDENCIES = xserver_xorg-server libdrm xproto_fontsproto xproto_glproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xf86driproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-mga)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-neomagic/Config.in b/package/x11r7/xdriver_xf86-video-neomagic/Config.in index 2e028a7ed6..f8c8c47fce 100644 --- a/package/x11r7/xdriver_xf86-video-neomagic/Config.in +++ b/package/x11r7/xdriver_xf86-video-neomagic/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_NEOMAGIC bool "xf86-video-neomagic" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_FONTSPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_RENDERPROTO diff --git a/package/x11r7/xdriver_xf86-video-neomagic/xdriver_xf86-video-neomagic.mk b/package/x11r7/xdriver_xf86-video-neomagic/xdriver_xf86-video-neomagic.mk index db9c2c0cd7..0c1ece46dd 100644 --- a/package/x11r7/xdriver_xf86-video-neomagic/xdriver_xf86-video-neomagic.mk +++ b/package/x11r7/xdriver_xf86-video-neomagic/xdriver_xf86-video-neomagic.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-video-neomagic -- Neomagic video driver +# xdriver_xf86-video-neomagic # ################################################################################ -XDRIVER_XF86_VIDEO_NEOMAGIC_VERSION = 1.2.4 +XDRIVER_XF86_VIDEO_NEOMAGIC_VERSION = 1.2.6 XDRIVER_XF86_VIDEO_NEOMAGIC_SOURCE = xf86-video-neomagic-$(XDRIVER_XF86_VIDEO_NEOMAGIC_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_NEOMAGIC_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_NEOMAGIC_AUTORECONF = NO +XDRIVER_XF86_VIDEO_NEOMAGIC_LICENSE = MIT +XDRIVER_XF86_VIDEO_NEOMAGIC_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_NEOMAGIC_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xf86dgaproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-neomagic)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-newport/Config.in b/package/x11r7/xdriver_xf86-video-newport/Config.in index e2effe8f60..d9c89b176d 100644 --- a/package/x11r7/xdriver_xf86-video-newport/Config.in +++ b/package/x11r7/xdriver_xf86-video-newport/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_NEWPORT bool "xf86-video-newport" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_FONTSPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_RENDERPROTO diff --git a/package/x11r7/xdriver_xf86-video-newport/xdriver_xf86-video-newport.mk b/package/x11r7/xdriver_xf86-video-newport/xdriver_xf86-video-newport.mk index b9bf3e7911..cacf39f5c0 100644 --- a/package/x11r7/xdriver_xf86-video-newport/xdriver_xf86-video-newport.mk +++ b/package/x11r7/xdriver_xf86-video-newport/xdriver_xf86-video-newport.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-video-newport -- Newport video driver +# xdriver_xf86-video-newport # ################################################################################ -XDRIVER_XF86_VIDEO_NEWPORT_VERSION = 0.2.3 +XDRIVER_XF86_VIDEO_NEWPORT_VERSION = 0.2.4 XDRIVER_XF86_VIDEO_NEWPORT_SOURCE = xf86-video-newport-$(XDRIVER_XF86_VIDEO_NEWPORT_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_NEWPORT_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_NEWPORT_AUTORECONF = NO +XDRIVER_XF86_VIDEO_NEWPORT_LICENSE = MIT +XDRIVER_XF86_VIDEO_NEWPORT_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_NEWPORT_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-newport)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-nv/Config.in b/package/x11r7/xdriver_xf86-video-nv/Config.in index 943bc1462e..8898f56729 100644 --- a/package/x11r7/xdriver_xf86-video-nv/Config.in +++ b/package/x11r7/xdriver_xf86-video-nv/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_NV bool "xf86-video-nv" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_FONTSPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_RENDERPROTO diff --git a/package/x11r7/xdriver_xf86-video-nv/xdriver_xf86-video-nv.mk b/package/x11r7/xdriver_xf86-video-nv/xdriver_xf86-video-nv.mk index 9f969e5915..8f9d6e87af 100644 --- a/package/x11r7/xdriver_xf86-video-nv/xdriver_xf86-video-nv.mk +++ b/package/x11r7/xdriver_xf86-video-nv/xdriver_xf86-video-nv.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-video-nv -- NVIDIA video driver +# xdriver_xf86-video-nv # ################################################################################ -XDRIVER_XF86_VIDEO_NV_VERSION = 2.1.15 +XDRIVER_XF86_VIDEO_NV_VERSION = 2.1.18 XDRIVER_XF86_VIDEO_NV_SOURCE = xf86-video-nv-$(XDRIVER_XF86_VIDEO_NV_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_NV_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_NV_AUTORECONF = NO +XDRIVER_XF86_VIDEO_NV_LICENSE = MIT +XDRIVER_XF86_VIDEO_NV_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_NV_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-nv)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-openchrome/Config.in b/package/x11r7/xdriver_xf86-video-openchrome/Config.in index 4a69246890..24b74bc2f0 100644 --- a/package/x11r7/xdriver_xf86-video-openchrome/Config.in +++ b/package/x11r7/xdriver_xf86-video-openchrome/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_OPENCHROME bool "xf86-video-openchrome" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_LIBDRM select BR2_PACKAGE_MESA3D select BR2_PACKAGE_XLIB_LIBX11 diff --git a/package/x11r7/xdriver_xf86-video-openchrome/xdriver_xf86-video-openchrome.mk b/package/x11r7/xdriver_xf86-video-openchrome/xdriver_xf86-video-openchrome.mk index 87c519378c..dda18fcc28 100644 --- a/package/x11r7/xdriver_xf86-video-openchrome/xdriver_xf86-video-openchrome.mk +++ b/package/x11r7/xdriver_xf86-video-openchrome/xdriver_xf86-video-openchrome.mk @@ -1,11 +1,14 @@ -############################################################# +################################################################################ # -# openchrome +# xdriver_xf86-video-openchrome # -############################################################# -XDRIVER_XF86_VIDEO_OPENCHROME_VERSION = 0.2.904 +################################################################################ + +XDRIVER_XF86_VIDEO_OPENCHROME_VERSION = 0.2.906 XDRIVER_XF86_VIDEO_OPENCHROME_SOURCE = xf86-video-openchrome-$(XDRIVER_XF86_VIDEO_OPENCHROME_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_OPENCHROME_SITE = http://www.openchrome.org/releases +XDRIVER_XF86_VIDEO_OPENCHROME_LICENSE = MIT +XDRIVER_XF86_VIDEO_OPENCHROME_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_OPENCHROME_DEPENDENCIES = \ xserver_xorg-server \ @@ -23,6 +26,5 @@ XDRIVER_XF86_VIDEO_OPENCHROME_DEPENDENCIES = \ XDRIVER_XF86_VIDEO_OPENCHROME_AUTORECONF = YES -XDRIVER_XF86_VIDEO_OPENCHROME_CONF_OPT = --enable-shared --disable-static -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-openchrome)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-r128/Config.in b/package/x11r7/xdriver_xf86-video-r128/Config.in index 96bd8d7d3d..07e314283c 100644 --- a/package/x11r7/xdriver_xf86-video-r128/Config.in +++ b/package/x11r7/xdriver_xf86-video-r128/Config.in @@ -1,7 +1,6 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_R128 bool "xf86-video-r128" select BR2_PACKAGE_MESA3D - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_FONTSPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_RENDERPROTO diff --git a/package/x11r7/xdriver_xf86-video-r128/xdriver_xf86-video-r128.mk b/package/x11r7/xdriver_xf86-video-r128/xdriver_xf86-video-r128.mk index 0e74607a15..d55d1a6efd 100644 --- a/package/x11r7/xdriver_xf86-video-r128/xdriver_xf86-video-r128.mk +++ b/package/x11r7/xdriver_xf86-video-r128/xdriver_xf86-video-r128.mk @@ -1,13 +1,15 @@ ################################################################################ # -# xdriver_xf86-video-r128 -- R128 video driver +# xdriver_xf86-video-r128 # ################################################################################ -XDRIVER_XF86_VIDEO_R128_VERSION = 6.8.1 +XDRIVER_XF86_VIDEO_R128_VERSION = 6.8.2 XDRIVER_XF86_VIDEO_R128_SOURCE = xf86-video-r128-$(XDRIVER_XF86_VIDEO_R128_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_R128_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_R128_LICENSE = MIT +XDRIVER_XF86_VIDEO_R128_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_R128_AUTORECONF = YES XDRIVER_XF86_VIDEO_R128_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xextproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-r128)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-rendition/Config.in b/package/x11r7/xdriver_xf86-video-rendition/Config.in deleted file mode 100644 index 9238aec41a..0000000000 --- a/package/x11r7/xdriver_xf86-video-rendition/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_XDRIVER_XF86_VIDEO_RENDITION - bool "xf86-video-rendition" - select BR2_PACKAGE_XSERVER_XORG_SERVER - select BR2_PACKAGE_XPROTO_FONTSPROTO - select BR2_PACKAGE_XPROTO_RANDRPROTO - select BR2_PACKAGE_XPROTO_RENDERPROTO - select BR2_PACKAGE_XPROTO_XEXTPROTO - select BR2_PACKAGE_XPROTO_XPROTO - help - Rendition video driver diff --git a/package/x11r7/xdriver_xf86-video-rendition/xdriver_xf86-video-rendition.mk b/package/x11r7/xdriver_xf86-video-rendition/xdriver_xf86-video-rendition.mk deleted file mode 100644 index dc03a877fd..0000000000 --- a/package/x11r7/xdriver_xf86-video-rendition/xdriver_xf86-video-rendition.mk +++ /dev/null @@ -1,13 +0,0 @@ -################################################################################ -# -# xdriver_xf86-video-rendition -- Rendition video driver -# -################################################################################ - -XDRIVER_XF86_VIDEO_RENDITION_VERSION = 4.2.3 -XDRIVER_XF86_VIDEO_RENDITION_SOURCE = xf86-video-rendition-$(XDRIVER_XF86_VIDEO_RENDITION_VERSION).tar.bz2 -XDRIVER_XF86_VIDEO_RENDITION_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_RENDITION_AUTORECONF = NO -XDRIVER_XF86_VIDEO_RENDITION_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xextproto xproto_xproto - -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-rendition)) diff --git a/package/x11r7/xdriver_xf86-video-s3/Config.in b/package/x11r7/xdriver_xf86-video-s3/Config.in deleted file mode 100644 index 109102806b..0000000000 --- a/package/x11r7/xdriver_xf86-video-s3/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_XDRIVER_XF86_VIDEO_S3 - bool "xf86-video-s3" - select BR2_PACKAGE_XSERVER_XORG_SERVER - select BR2_PACKAGE_XPROTO_FONTSPROTO - select BR2_PACKAGE_XPROTO_RANDRPROTO - select BR2_PACKAGE_XPROTO_RENDERPROTO - select BR2_PACKAGE_XPROTO_VIDEOPROTO - select BR2_PACKAGE_XPROTO_XEXTPROTO - select BR2_PACKAGE_XPROTO_XPROTO - help - X.Org driver for s3 cards diff --git a/package/x11r7/xdriver_xf86-video-s3/xdriver_xf86-video-s3.mk b/package/x11r7/xdriver_xf86-video-s3/xdriver_xf86-video-s3.mk deleted file mode 100644 index d6f732718e..0000000000 --- a/package/x11r7/xdriver_xf86-video-s3/xdriver_xf86-video-s3.mk +++ /dev/null @@ -1,13 +0,0 @@ -################################################################################ -# -# xdriver_xf86-video-s3 -- X.Org driver for s3 cards -# -################################################################################ - -XDRIVER_XF86_VIDEO_S3_VERSION = 0.6.3 -XDRIVER_XF86_VIDEO_S3_SOURCE = xf86-video-s3-$(XDRIVER_XF86_VIDEO_S3_VERSION).tar.bz2 -XDRIVER_XF86_VIDEO_S3_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_S3_AUTORECONF = NO -XDRIVER_XF86_VIDEO_S3_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xproto - -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-s3)) diff --git a/package/x11r7/xdriver_xf86-video-s3virge/Config.in b/package/x11r7/xdriver_xf86-video-s3virge/Config.in deleted file mode 100644 index 6f31864ccd..0000000000 --- a/package/x11r7/xdriver_xf86-video-s3virge/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_XDRIVER_XF86_VIDEO_S3VIRGE - bool "xf86-video-s3virge" - select BR2_PACKAGE_XSERVER_XORG_SERVER - select BR2_PACKAGE_XPROTO_FONTSPROTO - select BR2_PACKAGE_XPROTO_RANDRPROTO - select BR2_PACKAGE_XPROTO_RENDERPROTO - select BR2_PACKAGE_XPROTO_VIDEOPROTO - select BR2_PACKAGE_XPROTO_XEXTPROTO - select BR2_PACKAGE_XPROTO_XPROTO - help - S3 ViRGE video driver diff --git a/package/x11r7/xdriver_xf86-video-s3virge/xdriver_xf86-video-s3virge.mk b/package/x11r7/xdriver_xf86-video-s3virge/xdriver_xf86-video-s3virge.mk deleted file mode 100644 index 9c7b2c26ed..0000000000 --- a/package/x11r7/xdriver_xf86-video-s3virge/xdriver_xf86-video-s3virge.mk +++ /dev/null @@ -1,13 +0,0 @@ -################################################################################ -# -# xdriver_xf86-video-s3virge -- S3 ViRGE video driver -# -################################################################################ - -XDRIVER_XF86_VIDEO_S3VIRGE_VERSION = 1.10.4 -XDRIVER_XF86_VIDEO_S3VIRGE_SOURCE = xf86-video-s3virge-$(XDRIVER_XF86_VIDEO_S3VIRGE_VERSION).tar.bz2 -XDRIVER_XF86_VIDEO_S3VIRGE_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_S3VIRGE_AUTORECONF = NO -XDRIVER_XF86_VIDEO_S3VIRGE_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xproto - -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-s3virge)) diff --git a/package/x11r7/xdriver_xf86-video-savage/Config.in b/package/x11r7/xdriver_xf86-video-savage/Config.in index a9c8f6c4e1..93a731e639 100644 --- a/package/x11r7/xdriver_xf86-video-savage/Config.in +++ b/package/x11r7/xdriver_xf86-video-savage/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_SAVAGE bool "xf86-video-savage" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_LIBDRM select BR2_PACKAGE_MESA3D select BR2_PACKAGE_XPROTO_FONTSPROTO diff --git a/package/x11r7/xdriver_xf86-video-savage/xdriver_xf86-video-savage.mk b/package/x11r7/xdriver_xf86-video-savage/xdriver_xf86-video-savage.mk index 44707366ae..e0faf07994 100644 --- a/package/x11r7/xdriver_xf86-video-savage/xdriver_xf86-video-savage.mk +++ b/package/x11r7/xdriver_xf86-video-savage/xdriver_xf86-video-savage.mk @@ -1,13 +1,15 @@ ################################################################################ # -# xdriver_xf86-video-savage -- S3 Savage video driver +# xdriver_xf86-video-savage # ################################################################################ -XDRIVER_XF86_VIDEO_SAVAGE_VERSION = 2.3.1 +XDRIVER_XF86_VIDEO_SAVAGE_VERSION = 2.3.4 XDRIVER_XF86_VIDEO_SAVAGE_SOURCE = xf86-video-savage-$(XDRIVER_XF86_VIDEO_SAVAGE_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_SAVAGE_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_SAVAGE_LICENSE = MIT +XDRIVER_XF86_VIDEO_SAVAGE_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_SAVAGE_AUTORECONF = YES XDRIVER_XF86_VIDEO_SAVAGE_DEPENDENCIES = xserver_xorg-server libdrm xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xf86driproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-savage)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-siliconmotion/Config.in b/package/x11r7/xdriver_xf86-video-siliconmotion/Config.in index db1511608b..727004a55a 100644 --- a/package/x11r7/xdriver_xf86-video-siliconmotion/Config.in +++ b/package/x11r7/xdriver_xf86-video-siliconmotion/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_SILICONMOTION bool "xf86-video-siliconmotion" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_FONTSPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_RENDERPROTO diff --git a/package/x11r7/xdriver_xf86-video-siliconmotion/xdriver_xf86-video-siliconmotion.mk b/package/x11r7/xdriver_xf86-video-siliconmotion/xdriver_xf86-video-siliconmotion.mk index 97e416a596..91c8453884 100644 --- a/package/x11r7/xdriver_xf86-video-siliconmotion/xdriver_xf86-video-siliconmotion.mk +++ b/package/x11r7/xdriver_xf86-video-siliconmotion/xdriver_xf86-video-siliconmotion.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-video-siliconmotion -- Silicon Motion video driver +# xdriver_xf86-video-siliconmotion # ################################################################################ -XDRIVER_XF86_VIDEO_SILICONMOTION_VERSION = 1.7.3 +XDRIVER_XF86_VIDEO_SILICONMOTION_VERSION = 1.7.6 XDRIVER_XF86_VIDEO_SILICONMOTION_SOURCE = xf86-video-siliconmotion-$(XDRIVER_XF86_VIDEO_SILICONMOTION_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_SILICONMOTION_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_SILICONMOTION_AUTORECONF = NO +XDRIVER_XF86_VIDEO_SILICONMOTION_LICENSE = MIT +XDRIVER_XF86_VIDEO_SILICONMOTION_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_SILICONMOTION_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-siliconmotion)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-sis/Config.in b/package/x11r7/xdriver_xf86-video-sis/Config.in index ac2b63201d..e1845052f2 100644 --- a/package/x11r7/xdriver_xf86-video-sis/Config.in +++ b/package/x11r7/xdriver_xf86-video-sis/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_SIS bool "xf86-video-sis" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_LIBDRM select BR2_PACKAGE_MESA3D select BR2_PACKAGE_XPROTO_FONTSPROTO diff --git a/package/x11r7/xdriver_xf86-video-sis/xdriver_xf86-video-sis.mk b/package/x11r7/xdriver_xf86-video-sis/xdriver_xf86-video-sis.mk index 0fb335c915..03276bb840 100644 --- a/package/x11r7/xdriver_xf86-video-sis/xdriver_xf86-video-sis.mk +++ b/package/x11r7/xdriver_xf86-video-sis/xdriver_xf86-video-sis.mk @@ -1,13 +1,15 @@ ################################################################################ # -# xdriver_xf86-video-sis -- SiS and XGI video driver +# xdriver_xf86-video-sis # ################################################################################ -XDRIVER_XF86_VIDEO_SIS_VERSION = 0.10.2 +XDRIVER_XF86_VIDEO_SIS_VERSION = 0.10.4 XDRIVER_XF86_VIDEO_SIS_SOURCE = xf86-video-sis-$(XDRIVER_XF86_VIDEO_SIS_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_SIS_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_SIS_LICENSE = MIT +XDRIVER_XF86_VIDEO_SIS_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_SIS_AUTORECONF = YES XDRIVER_XF86_VIDEO_SIS_DEPENDENCIES = xserver_xorg-server libdrm xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xf86dgaproto xproto_xf86driproto xproto_xineramaproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-sis)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-sisusb/Config.in b/package/x11r7/xdriver_xf86-video-sisusb/Config.in deleted file mode 100644 index b00a8a77bf..0000000000 --- a/package/x11r7/xdriver_xf86-video-sisusb/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_XDRIVER_XF86_VIDEO_SISUSB - bool "xf86-video-sisusb" - select BR2_PACKAGE_XSERVER_XORG_SERVER - select BR2_PACKAGE_XPROTO_FONTSPROTO - select BR2_PACKAGE_XPROTO_RANDRPROTO - select BR2_PACKAGE_XPROTO_RENDERPROTO - select BR2_PACKAGE_XPROTO_VIDEOPROTO - select BR2_PACKAGE_XPROTO_XEXTPROTO - select BR2_PACKAGE_XPROTO_XINERAMAPROTO - select BR2_PACKAGE_XPROTO_XPROTO - help - SiS USB video driver diff --git a/package/x11r7/xdriver_xf86-video-sisusb/xdriver_xf86-video-sisusb.mk b/package/x11r7/xdriver_xf86-video-sisusb/xdriver_xf86-video-sisusb.mk deleted file mode 100644 index 3cd6012bed..0000000000 --- a/package/x11r7/xdriver_xf86-video-sisusb/xdriver_xf86-video-sisusb.mk +++ /dev/null @@ -1,13 +0,0 @@ -################################################################################ -# -# xdriver_xf86-video-sisusb -- SiS USB video driver -# -################################################################################ - -XDRIVER_XF86_VIDEO_SISUSB_VERSION = 0.9.3 -XDRIVER_XF86_VIDEO_SISUSB_SOURCE = xf86-video-sisusb-$(XDRIVER_XF86_VIDEO_SISUSB_VERSION).tar.bz2 -XDRIVER_XF86_VIDEO_SISUSB_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_SISUSB_AUTORECONF = NO -XDRIVER_XF86_VIDEO_SISUSB_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xineramaproto xproto_xproto - -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-sisusb)) diff --git a/package/x11r7/xdriver_xf86-video-suncg14/Config.in b/package/x11r7/xdriver_xf86-video-suncg14/Config.in deleted file mode 100644 index 661c1799e2..0000000000 --- a/package/x11r7/xdriver_xf86-video-suncg14/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_XDRIVER_XF86_VIDEO_SUNCG14 - bool "xf86-video-suncg14" - select BR2_PACKAGE_XSERVER_XORG_SERVER - select BR2_PACKAGE_XPROTO_FONTSPROTO - select BR2_PACKAGE_XPROTO_RANDRPROTO - select BR2_PACKAGE_XPROTO_RENDERPROTO - select BR2_PACKAGE_XPROTO_XPROTO - help - CG14 video driver diff --git a/package/x11r7/xdriver_xf86-video-suncg14/xdriver_xf86-video-suncg14.mk b/package/x11r7/xdriver_xf86-video-suncg14/xdriver_xf86-video-suncg14.mk deleted file mode 100644 index 6a0fb0494b..0000000000 --- a/package/x11r7/xdriver_xf86-video-suncg14/xdriver_xf86-video-suncg14.mk +++ /dev/null @@ -1,13 +0,0 @@ -################################################################################ -# -# xdriver_xf86-video-suncg14 -- CG14 video driver -# -################################################################################ - -XDRIVER_XF86_VIDEO_SUNCG14_VERSION = 1.1.1 -XDRIVER_XF86_VIDEO_SUNCG14_SOURCE = xf86-video-suncg14-$(XDRIVER_XF86_VIDEO_SUNCG14_VERSION).tar.bz2 -XDRIVER_XF86_VIDEO_SUNCG14_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_SUNCG14_AUTORECONF = NO -XDRIVER_XF86_VIDEO_SUNCG14_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xproto - -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-suncg14)) diff --git a/package/x11r7/xdriver_xf86-video-suncg3/Config.in b/package/x11r7/xdriver_xf86-video-suncg3/Config.in deleted file mode 100644 index 539a95ace3..0000000000 --- a/package/x11r7/xdriver_xf86-video-suncg3/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_XDRIVER_XF86_VIDEO_SUNCG3 - bool "xf86-video-suncg3" - select BR2_PACKAGE_XSERVER_XORG_SERVER - select BR2_PACKAGE_XPROTO_FONTSPROTO - select BR2_PACKAGE_XPROTO_RANDRPROTO - select BR2_PACKAGE_XPROTO_RENDERPROTO - select BR2_PACKAGE_XPROTO_XPROTO - help - CG3 video driver diff --git a/package/x11r7/xdriver_xf86-video-suncg3/xdriver_xf86-video-suncg3.mk b/package/x11r7/xdriver_xf86-video-suncg3/xdriver_xf86-video-suncg3.mk deleted file mode 100644 index 7ba7ecd921..0000000000 --- a/package/x11r7/xdriver_xf86-video-suncg3/xdriver_xf86-video-suncg3.mk +++ /dev/null @@ -1,13 +0,0 @@ -################################################################################ -# -# xdriver_xf86-video-suncg3 -- CG3 video driver -# -################################################################################ - -XDRIVER_XF86_VIDEO_SUNCG3_VERSION = 1.1.1 -XDRIVER_XF86_VIDEO_SUNCG3_SOURCE = xf86-video-suncg3-$(XDRIVER_XF86_VIDEO_SUNCG3_VERSION).tar.bz2 -XDRIVER_XF86_VIDEO_SUNCG3_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_SUNCG3_AUTORECONF = NO -XDRIVER_XF86_VIDEO_SUNCG3_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xproto - -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-suncg3)) diff --git a/package/x11r7/xdriver_xf86-video-suncg6/Config.in b/package/x11r7/xdriver_xf86-video-suncg6/Config.in deleted file mode 100644 index 9496f8d997..0000000000 --- a/package/x11r7/xdriver_xf86-video-suncg6/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_XDRIVER_XF86_VIDEO_SUNCG6 - bool "xf86-video-suncg6" - select BR2_PACKAGE_XSERVER_XORG_SERVER - select BR2_PACKAGE_XPROTO_FONTSPROTO - select BR2_PACKAGE_XPROTO_RANDRPROTO - select BR2_PACKAGE_XPROTO_RENDERPROTO - select BR2_PACKAGE_XPROTO_XPROTO - help - GX/Turbo GX video driver diff --git a/package/x11r7/xdriver_xf86-video-suncg6/xdriver_xf86-video-suncg6.mk b/package/x11r7/xdriver_xf86-video-suncg6/xdriver_xf86-video-suncg6.mk deleted file mode 100644 index 7234e98321..0000000000 --- a/package/x11r7/xdriver_xf86-video-suncg6/xdriver_xf86-video-suncg6.mk +++ /dev/null @@ -1,13 +0,0 @@ -################################################################################ -# -# xdriver_xf86-video-suncg6 -- GX/Turbo GX video driver -# -################################################################################ - -XDRIVER_XF86_VIDEO_SUNCG6_VERSION = 1.1.1 -XDRIVER_XF86_VIDEO_SUNCG6_SOURCE = xf86-video-suncg6-$(XDRIVER_XF86_VIDEO_SUNCG6_VERSION).tar.bz2 -XDRIVER_XF86_VIDEO_SUNCG6_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_SUNCG6_AUTORECONF = NO -XDRIVER_XF86_VIDEO_SUNCG6_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xproto - -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-suncg6)) diff --git a/package/x11r7/xdriver_xf86-video-sunffb/Config.in b/package/x11r7/xdriver_xf86-video-sunffb/Config.in deleted file mode 100644 index 76f5b9ac89..0000000000 --- a/package/x11r7/xdriver_xf86-video-sunffb/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_XDRIVER_XF86_VIDEO_SUNFFB - bool "xf86-video-sunffb" - select BR2_PACKAGE_XSERVER_XORG_SERVER - select BR2_PACKAGE_LIBDRM - select BR2_PACKAGE_XPROTO_FONTSPROTO - select BR2_PACKAGE_XPROTO_RANDRPROTO - select BR2_PACKAGE_XPROTO_RENDERPROTO - select BR2_PACKAGE_XPROTO_XEXTPROTO - select BR2_PACKAGE_XPROTO_XF86DRIPROTO - select BR2_PACKAGE_XPROTO_XPROTO - help - SUNFFB video driver diff --git a/package/x11r7/xdriver_xf86-video-sunffb/xdriver_xf86-video-sunffb.mk b/package/x11r7/xdriver_xf86-video-sunffb/xdriver_xf86-video-sunffb.mk deleted file mode 100644 index 7c6019b6db..0000000000 --- a/package/x11r7/xdriver_xf86-video-sunffb/xdriver_xf86-video-sunffb.mk +++ /dev/null @@ -1,13 +0,0 @@ -################################################################################ -# -# xdriver_xf86-video-sunffb -- SUNFFB video driver -# -################################################################################ - -XDRIVER_XF86_VIDEO_SUNFFB_VERSION = 1.2.1 -XDRIVER_XF86_VIDEO_SUNFFB_SOURCE = xf86-video-sunffb-$(XDRIVER_XF86_VIDEO_SUNFFB_VERSION).tar.bz2 -XDRIVER_XF86_VIDEO_SUNFFB_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_SUNFFB_AUTORECONF = NO -XDRIVER_XF86_VIDEO_SUNFFB_DEPENDENCIES = xserver_xorg-server libdrm xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xextproto xproto_xf86driproto xproto_xproto - -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-sunffb)) diff --git a/package/x11r7/xdriver_xf86-video-sunleo/Config.in b/package/x11r7/xdriver_xf86-video-sunleo/Config.in deleted file mode 100644 index 29d24a229d..0000000000 --- a/package/x11r7/xdriver_xf86-video-sunleo/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_XDRIVER_XF86_VIDEO_SUNLEO - bool "xf86-video-sunleo" - select BR2_PACKAGE_XSERVER_XORG_SERVER - select BR2_PACKAGE_XPROTO_FONTSPROTO - select BR2_PACKAGE_XPROTO_RANDRPROTO - select BR2_PACKAGE_XPROTO_RENDERPROTO - select BR2_PACKAGE_XPROTO_XPROTO - help - Leo video driver diff --git a/package/x11r7/xdriver_xf86-video-sunleo/xdriver_xf86-video-sunleo.mk b/package/x11r7/xdriver_xf86-video-sunleo/xdriver_xf86-video-sunleo.mk deleted file mode 100644 index 38af6d0f31..0000000000 --- a/package/x11r7/xdriver_xf86-video-sunleo/xdriver_xf86-video-sunleo.mk +++ /dev/null @@ -1,13 +0,0 @@ -################################################################################ -# -# xdriver_xf86-video-sunleo -- Leo video driver -# -################################################################################ - -XDRIVER_XF86_VIDEO_SUNLEO_VERSION = 1.2.0 -XDRIVER_XF86_VIDEO_SUNLEO_SOURCE = xf86-video-sunleo-$(XDRIVER_XF86_VIDEO_SUNLEO_VERSION).tar.bz2 -XDRIVER_XF86_VIDEO_SUNLEO_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_SUNLEO_AUTORECONF = NO -XDRIVER_XF86_VIDEO_SUNLEO_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xproto - -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-sunleo)) diff --git a/package/x11r7/xdriver_xf86-video-suntcx/Config.in b/package/x11r7/xdriver_xf86-video-suntcx/Config.in deleted file mode 100644 index 3c82739d62..0000000000 --- a/package/x11r7/xdriver_xf86-video-suntcx/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_XDRIVER_XF86_VIDEO_SUNTCX - bool "xf86-video-suntcx" - select BR2_PACKAGE_XSERVER_XORG_SERVER - select BR2_PACKAGE_XPROTO_FONTSPROTO - select BR2_PACKAGE_XPROTO_RANDRPROTO - select BR2_PACKAGE_XPROTO_RENDERPROTO - select BR2_PACKAGE_XPROTO_XPROTO - help - TCX video driver diff --git a/package/x11r7/xdriver_xf86-video-suntcx/xdriver_xf86-video-suntcx.mk b/package/x11r7/xdriver_xf86-video-suntcx/xdriver_xf86-video-suntcx.mk deleted file mode 100644 index b26d659b77..0000000000 --- a/package/x11r7/xdriver_xf86-video-suntcx/xdriver_xf86-video-suntcx.mk +++ /dev/null @@ -1,13 +0,0 @@ -################################################################################ -# -# xdriver_xf86-video-suntcx -- TCX video driver -# -################################################################################ - -XDRIVER_XF86_VIDEO_SUNTCX_VERSION = 1.1.1 -XDRIVER_XF86_VIDEO_SUNTCX_SOURCE = xf86-video-suntcx-$(XDRIVER_XF86_VIDEO_SUNTCX_VERSION).tar.bz2 -XDRIVER_XF86_VIDEO_SUNTCX_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_SUNTCX_AUTORECONF = NO -XDRIVER_XF86_VIDEO_SUNTCX_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xproto - -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-suntcx)) diff --git a/package/x11r7/xdriver_xf86-video-tdfx/Config.in b/package/x11r7/xdriver_xf86-video-tdfx/Config.in index 57bb4117d2..811eba2592 100644 --- a/package/x11r7/xdriver_xf86-video-tdfx/Config.in +++ b/package/x11r7/xdriver_xf86-video-tdfx/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_TDFX bool "xf86-video-tdfx" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_LIBDRM select BR2_PACKAGE_MESA3D select BR2_PACKAGE_XPROTO_FONTSPROTO diff --git a/package/x11r7/xdriver_xf86-video-tdfx/xdriver_xf86-video-tdfx.mk b/package/x11r7/xdriver_xf86-video-tdfx/xdriver_xf86-video-tdfx.mk index c11e40806e..7c06fb83a9 100644 --- a/package/x11r7/xdriver_xf86-video-tdfx/xdriver_xf86-video-tdfx.mk +++ b/package/x11r7/xdriver_xf86-video-tdfx/xdriver_xf86-video-tdfx.mk @@ -1,13 +1,15 @@ ################################################################################ # -# xdriver_xf86-video-tdfx -- 3Dfx video driver +# xdriver_xf86-video-tdfx # ################################################################################ -XDRIVER_XF86_VIDEO_TDFX_VERSION = 1.4.3 +XDRIVER_XF86_VIDEO_TDFX_VERSION = 1.4.4 XDRIVER_XF86_VIDEO_TDFX_SOURCE = xf86-video-tdfx-$(XDRIVER_XF86_VIDEO_TDFX_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_TDFX_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_TDFX_LICENSE = MIT +XDRIVER_XF86_VIDEO_TDFX_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_TDFX_AUTORECONF = YES XDRIVER_XF86_VIDEO_TDFX_DEPENDENCIES = xserver_xorg-server libdrm xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xf86driproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-tdfx)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-tga/Config.in b/package/x11r7/xdriver_xf86-video-tga/Config.in index 800a8f6ec8..9d03db3b38 100644 --- a/package/x11r7/xdriver_xf86-video-tga/Config.in +++ b/package/x11r7/xdriver_xf86-video-tga/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_TGA bool "xf86-video-tga" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_FONTSPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_RENDERPROTO diff --git a/package/x11r7/xdriver_xf86-video-tga/xdriver_xf86-video-tga.mk b/package/x11r7/xdriver_xf86-video-tga/xdriver_xf86-video-tga.mk index 68e58fbe4c..16423a2fdf 100644 --- a/package/x11r7/xdriver_xf86-video-tga/xdriver_xf86-video-tga.mk +++ b/package/x11r7/xdriver_xf86-video-tga/xdriver_xf86-video-tga.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-video-tga -- X.Org driver for tga cards +# xdriver_xf86-video-tga # ################################################################################ XDRIVER_XF86_VIDEO_TGA_VERSION = 1.2.1 XDRIVER_XF86_VIDEO_TGA_SOURCE = xf86-video-tga-$(XDRIVER_XF86_VIDEO_TGA_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_TGA_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_TGA_AUTORECONF = NO +XDRIVER_XF86_VIDEO_TGA_LICENSE = MIT +XDRIVER_XF86_VIDEO_TGA_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_TGA_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xf86dgaproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-tga)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-trident/Config.in b/package/x11r7/xdriver_xf86-video-trident/Config.in index 4a7a477e3e..15ac3ea726 100644 --- a/package/x11r7/xdriver_xf86-video-trident/Config.in +++ b/package/x11r7/xdriver_xf86-video-trident/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_TRIDENT bool "xf86-video-trident" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_FONTSPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_RENDERPROTO diff --git a/package/x11r7/xdriver_xf86-video-trident/xdriver_xf86-video-trident.mk b/package/x11r7/xdriver_xf86-video-trident/xdriver_xf86-video-trident.mk index da3edbbec1..ea73f1b763 100644 --- a/package/x11r7/xdriver_xf86-video-trident/xdriver_xf86-video-trident.mk +++ b/package/x11r7/xdriver_xf86-video-trident/xdriver_xf86-video-trident.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-video-trident -- Trident video driver +# xdriver_xf86-video-trident # ################################################################################ -XDRIVER_XF86_VIDEO_TRIDENT_VERSION = 1.3.3 +XDRIVER_XF86_VIDEO_TRIDENT_VERSION = 1.3.5 XDRIVER_XF86_VIDEO_TRIDENT_SOURCE = xf86-video-trident-$(XDRIVER_XF86_VIDEO_TRIDENT_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_TRIDENT_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_TRIDENT_AUTORECONF = NO +XDRIVER_XF86_VIDEO_TRIDENT_LICENSE = MIT +XDRIVER_XF86_VIDEO_TRIDENT_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_TRIDENT_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xf86dgaproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-trident)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-tseng/Config.in b/package/x11r7/xdriver_xf86-video-tseng/Config.in deleted file mode 100644 index f72b87be60..0000000000 --- a/package/x11r7/xdriver_xf86-video-tseng/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_XDRIVER_XF86_VIDEO_TSENG - bool "xf86-video-tseng" - select BR2_PACKAGE_XSERVER_XORG_SERVER - select BR2_PACKAGE_XPROTO_FONTSPROTO - select BR2_PACKAGE_XPROTO_RANDRPROTO - select BR2_PACKAGE_XPROTO_RENDERPROTO - select BR2_PACKAGE_XPROTO_VIDEOPROTO - select BR2_PACKAGE_XPROTO_XEXTPROTO - select BR2_PACKAGE_XPROTO_XPROTO - help - Tseng Labs video driver diff --git a/package/x11r7/xdriver_xf86-video-tseng/xdriver_xf86-video-tseng.mk b/package/x11r7/xdriver_xf86-video-tseng/xdriver_xf86-video-tseng.mk deleted file mode 100644 index 6ad802378d..0000000000 --- a/package/x11r7/xdriver_xf86-video-tseng/xdriver_xf86-video-tseng.mk +++ /dev/null @@ -1,13 +0,0 @@ -################################################################################ -# -# xdriver_xf86-video-tseng -- Tseng Labs video driver -# -################################################################################ - -XDRIVER_XF86_VIDEO_TSENG_VERSION = 1.2.3 -XDRIVER_XF86_VIDEO_TSENG_SOURCE = xf86-video-tseng-$(XDRIVER_XF86_VIDEO_TSENG_VERSION).tar.bz2 -XDRIVER_XF86_VIDEO_TSENG_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_TSENG_AUTORECONF = NO -XDRIVER_XF86_VIDEO_TSENG_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xproto - -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-tseng)) diff --git a/package/x11r7/xdriver_xf86-video-v4l/Config.in b/package/x11r7/xdriver_xf86-video-v4l/Config.in index 3bb41fc55c..6d85c1781e 100644 --- a/package/x11r7/xdriver_xf86-video-v4l/Config.in +++ b/package/x11r7/xdriver_xf86-video-v4l/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_V4L bool "xf86-video-v4l" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_VIDEOPROTO select BR2_PACKAGE_XPROTO_XPROTO diff --git a/package/x11r7/xdriver_xf86-video-v4l/xdriver_xf86-video-v4l.mk b/package/x11r7/xdriver_xf86-video-v4l/xdriver_xf86-video-v4l.mk index dffcf13e0b..607b605f80 100644 --- a/package/x11r7/xdriver_xf86-video-v4l/xdriver_xf86-video-v4l.mk +++ b/package/x11r7/xdriver_xf86-video-v4l/xdriver_xf86-video-v4l.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-video-v4l -- video4linux driver +# xdriver_xf86-video-v4l # ################################################################################ XDRIVER_XF86_VIDEO_V4L_VERSION = 0.2.0 XDRIVER_XF86_VIDEO_V4L_SOURCE = xf86-video-v4l-$(XDRIVER_XF86_VIDEO_V4L_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_V4L_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_V4L_AUTORECONF = NO +XDRIVER_XF86_VIDEO_V4L_LICENSE = MIT +XDRIVER_XF86_VIDEO_V4L_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_V4L_DEPENDENCIES = xserver_xorg-server xproto_randrproto xproto_videoproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-v4l)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-vesa/Config.in b/package/x11r7/xdriver_xf86-video-vesa/Config.in index 865f52cea2..98f434704f 100644 --- a/package/x11r7/xdriver_xf86-video-vesa/Config.in +++ b/package/x11r7/xdriver_xf86-video-vesa/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_VESA bool "xf86-video-vesa" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_FONTSPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_RENDERPROTO diff --git a/package/x11r7/xdriver_xf86-video-vesa/xdriver_xf86-video-vesa-2.0.0.patch b/package/x11r7/xdriver_xf86-video-vesa/xdriver_xf86-video-vesa-2.0.0.patch deleted file mode 100644 index bf9ffe79ef..0000000000 --- a/package/x11r7/xdriver_xf86-video-vesa/xdriver_xf86-video-vesa-2.0.0.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- xf86-video-vesa-2.0.0/configure.ac.orig 2007-06-11 13:10:35.000000000 +0200 -+++ xf86-video-vesa-2.0.0/configure.ac 2007-06-11 14:16:45.000000000 +0200 -@@ -56,8 +56,8 @@ - PKG_CHECK_MODULES(XORG, xorg-server >= 1.0.99.901 xproto fontsproto $REQUIRED_MODULES) - sdkdir=$(pkg-config --variable=sdkdir xorg-server) - --CFLAGS="$CFLAGS $XORG_CFLAGS "' -I$(top_srcdir)/src' --INCLUDES="$XORG_INCS -I${sdkdir} "'-I$(top_srcdir)/src -I$(prefix)/include' -+CFLAGS="$CFLAGS $XORG_CFLAGS "'-I$(top_srcdir)/src' -+INCLUDES="$XORG_INCS "'-I$(top_srcdir)/src' - AC_SUBST([CFLAGS]) - AC_SUBST([INCLUDES]) - diff --git a/package/x11r7/xdriver_xf86-video-vesa/xdriver_xf86-video-vesa.mk b/package/x11r7/xdriver_xf86-video-vesa/xdriver_xf86-video-vesa.mk index 5d0ed12ad6..3c69276fe7 100644 --- a/package/x11r7/xdriver_xf86-video-vesa/xdriver_xf86-video-vesa.mk +++ b/package/x11r7/xdriver_xf86-video-vesa/xdriver_xf86-video-vesa.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-video-vesa -- Generic VESA video driver +# xdriver_xf86-video-vesa # ################################################################################ -XDRIVER_XF86_VIDEO_VESA_VERSION = 2.2.1 +XDRIVER_XF86_VIDEO_VESA_VERSION = 2.3.1 XDRIVER_XF86_VIDEO_VESA_SOURCE = xf86-video-vesa-$(XDRIVER_XF86_VIDEO_VESA_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_VESA_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_VESA_AUTORECONF = YES +XDRIVER_XF86_VIDEO_VESA_LICENSE = MIT +XDRIVER_XF86_VIDEO_VESA_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_VESA_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xextproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-vesa)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-vmware/Config.in b/package/x11r7/xdriver_xf86-video-vmware/Config.in index 9093b385e0..2ab70e3888 100644 --- a/package/x11r7/xdriver_xf86-video-vmware/Config.in +++ b/package/x11r7/xdriver_xf86-video-vmware/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_VMWARE bool "xf86-video-vmware" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_FONTSPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_RENDERPROTO diff --git a/package/x11r7/xdriver_xf86-video-vmware/xdriver_xf86-video-vmware.mk b/package/x11r7/xdriver_xf86-video-vmware/xdriver_xf86-video-vmware.mk index a92bc3b487..53a87be6eb 100644 --- a/package/x11r7/xdriver_xf86-video-vmware/xdriver_xf86-video-vmware.mk +++ b/package/x11r7/xdriver_xf86-video-vmware/xdriver_xf86-video-vmware.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-video-vmware -- VMware SVGA video driver +# xdriver_xf86-video-vmware # ################################################################################ -XDRIVER_XF86_VIDEO_VMWARE_VERSION = 10.16.8 +XDRIVER_XF86_VIDEO_VMWARE_VERSION = 12.0.2 XDRIVER_XF86_VIDEO_VMWARE_SOURCE = xf86-video-vmware-$(XDRIVER_XF86_VIDEO_VMWARE_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_VMWARE_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_VMWARE_AUTORECONF = NO +XDRIVER_XF86_VIDEO_VMWARE_LICENSE = MIT +XDRIVER_XF86_VIDEO_VMWARE_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_VMWARE_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xextproto xproto_xineramaproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-vmware)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-voodoo/Config.in b/package/x11r7/xdriver_xf86-video-voodoo/Config.in index 9b770bec1b..f531676dab 100644 --- a/package/x11r7/xdriver_xf86-video-voodoo/Config.in +++ b/package/x11r7/xdriver_xf86-video-voodoo/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_VOODOO bool "xf86-video-voodoo" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_FONTSPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_RENDERPROTO diff --git a/package/x11r7/xdriver_xf86-video-voodoo/xdriver_xf86-video-voodoo.mk b/package/x11r7/xdriver_xf86-video-voodoo/xdriver_xf86-video-voodoo.mk index dadd3f4b98..d394403601 100644 --- a/package/x11r7/xdriver_xf86-video-voodoo/xdriver_xf86-video-voodoo.mk +++ b/package/x11r7/xdriver_xf86-video-voodoo/xdriver_xf86-video-voodoo.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-video-voodoo -- Voodoo video driver +# xdriver_xf86-video-voodoo # ################################################################################ -XDRIVER_XF86_VIDEO_VOODOO_VERSION = 1.2.3 +XDRIVER_XF86_VIDEO_VOODOO_VERSION = 1.2.4 XDRIVER_XF86_VIDEO_VOODOO_SOURCE = xf86-video-voodoo-$(XDRIVER_XF86_VIDEO_VOODOO_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_VOODOO_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_VOODOO_AUTORECONF = NO +XDRIVER_XF86_VIDEO_VOODOO_LICENSE = MIT +XDRIVER_XF86_VIDEO_VOODOO_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_VOODOO_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xextproto xproto_xf86dgaproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-voodoo)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-wsfb/Config.in b/package/x11r7/xdriver_xf86-video-wsfb/Config.in index 3b3d406fb2..968ee10c8c 100644 --- a/package/x11r7/xdriver_xf86-video-wsfb/Config.in +++ b/package/x11r7/xdriver_xf86-video-wsfb/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_WSFB bool "xf86-video-wsfb" - select BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_FONTSPROTO select BR2_PACKAGE_XPROTO_RANDRPROTO select BR2_PACKAGE_XPROTO_RENDERPROTO diff --git a/package/x11r7/xdriver_xf86-video-wsfb/xdriver_xf86-video-wsfb.mk b/package/x11r7/xdriver_xf86-video-wsfb/xdriver_xf86-video-wsfb.mk index e71715a7e9..c2d7d4df3a 100644 --- a/package/x11r7/xdriver_xf86-video-wsfb/xdriver_xf86-video-wsfb.mk +++ b/package/x11r7/xdriver_xf86-video-wsfb/xdriver_xf86-video-wsfb.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xdriver_xf86-video-wsfb -- WSFB video driver +# xdriver_xf86-video-wsfb # ################################################################################ -XDRIVER_XF86_VIDEO_WSFB_VERSION = 0.3.0 +XDRIVER_XF86_VIDEO_WSFB_VERSION = 0.4.0 XDRIVER_XF86_VIDEO_WSFB_SOURCE = xf86-video-wsfb-$(XDRIVER_XF86_VIDEO_WSFB_VERSION).tar.bz2 XDRIVER_XF86_VIDEO_WSFB_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_WSFB_AUTORECONF = NO +XDRIVER_XF86_VIDEO_WSFB_LICENSE = MIT +XDRIVER_XF86_VIDEO_WSFB_LICENSE_FILES = COPYING XDRIVER_XF86_VIDEO_WSFB_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xextproto xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-wsfb)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-xgi/Config.in b/package/x11r7/xdriver_xf86-video-xgi/Config.in deleted file mode 100644 index d0fe665335..0000000000 --- a/package/x11r7/xdriver_xf86-video-xgi/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_XDRIVER_XF86_VIDEO_XGI - bool "xf86-video-xgi" - select BR2_PACKAGE_MESA3D - select BR2_PACKAGE_XSERVER_XORG_SERVER - select BR2_PACKAGE_XPROTO_FONTSPROTO - select BR2_PACKAGE_XPROTO_RANDRPROTO - select BR2_PACKAGE_XPROTO_RENDERPROTO - select BR2_PACKAGE_XPROTO_XEXTPROTO - select BR2_PACKAGE_XPROTO_XPROTO - help - XGI based chips video driver diff --git a/package/x11r7/xdriver_xf86-video-xgi/xdriver_xf86-video-xgi-cross-compile.patch b/package/x11r7/xdriver_xf86-video-xgi/xdriver_xf86-video-xgi-cross-compile.patch deleted file mode 100644 index fc7903c46b..0000000000 --- a/package/x11r7/xdriver_xf86-video-xgi/xdriver_xf86-video-xgi-cross-compile.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- xdriver_xf86-video-xgi-1.5.1/configure.ac.orig 2009-09-07 08:03:18.000000000 +0300 -+++ xdriver_xf86-video-xgi-1.5.1/configure.ac 2010-02-03 23:58:40.507035914 +0200 -@@ -78,12 +78,18 @@ sdkdir=$(pkg-config --variable=sdkdir xo - AC_HEADER_STDC - - if test "x$DRI" = xauto; then -- AC_CHECK_FILE([${sdkdir}/dri.h], -+ if test "$cross_compiling" = "no" ; then -+ AC_CHECK_FILE([${sdkdir}/dri.h], - [have_dri_h="yes"], [have_dri_h="no"]) -- AC_CHECK_FILE([${sdkdir}/sarea.h], -+ AC_CHECK_FILE([${sdkdir}/sarea.h], - [have_sarea_h="yes"], [have_sarea_h="no"]) -- AC_CHECK_FILE([${sdkdir}/dristruct.h], -+ AC_CHECK_FILE([${sdkdir}/dristruct.h], - [have_dristruct_h="yes"], [have_dristruct_h="no"]) -+ else -+ have_dri_h="yes" -+ have_sarea_h="yes" -+ have_dristruct_h="yes" -+ fi - fi - - AC_MSG_CHECKING([whether to include DRI support]) diff --git a/package/x11r7/xdriver_xf86-video-xgi/xdriver_xf86-video-xgi.mk b/package/x11r7/xdriver_xf86-video-xgi/xdriver_xf86-video-xgi.mk deleted file mode 100644 index 49fb8b0af9..0000000000 --- a/package/x11r7/xdriver_xf86-video-xgi/xdriver_xf86-video-xgi.mk +++ /dev/null @@ -1,13 +0,0 @@ -################################################################################ -# -# xdriver_xf86-video-xgi -- XGI video driver -# -################################################################################ - -XDRIVER_XF86_VIDEO_XGI_VERSION = 1.5.1 -XDRIVER_XF86_VIDEO_XGI_SOURCE = xf86-video-xgi-$(XDRIVER_XF86_VIDEO_XGI_VERSION).tar.bz2 -XDRIVER_XF86_VIDEO_XGI_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_XGI_AUTORECONF = YES -XDRIVER_XF86_VIDEO_XGI_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xextproto xproto_xproto - -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-xgi)) diff --git a/package/x11r7/xdriver_xf86-video-xgixp/Config.in b/package/x11r7/xdriver_xf86-video-xgixp/Config.in deleted file mode 100644 index 8d466f45d0..0000000000 --- a/package/x11r7/xdriver_xf86-video-xgixp/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_PACKAGE_XDRIVER_XF86_VIDEO_XGIXP - bool "xf86-video-xgixp" - select BR2_PACKAGE_MESA3D - select BR2_PACKAGE_XSERVER_XORG_SERVER - select BR2_PACKAGE_XPROTO_FONTSPROTO - select BR2_PACKAGE_XPROTO_RANDRPROTO - select BR2_PACKAGE_XPROTO_RENDERPROTO - select BR2_PACKAGE_XPROTO_XEXTPROTO - select BR2_PACKAGE_XPROTO_XPROTO - help - XGIXP based chips video driver diff --git a/package/x11r7/xdriver_xf86-video-xgixp/xdriver_xf86-video-xgixp-cross-compile.patch b/package/x11r7/xdriver_xf86-video-xgixp/xdriver_xf86-video-xgixp-cross-compile.patch deleted file mode 100644 index 9736252f2e..0000000000 --- a/package/x11r7/xdriver_xf86-video-xgixp/xdriver_xf86-video-xgixp-cross-compile.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- xdriver_xf86-video-xgixp-1.7.99.4/configure.ac.orig 2009-09-07 08:09:14.000000000 +0300 -+++ xdriver_xf86-video-xgixp-1.7.99.4/configure.ac 2010-02-04 00:12:22.159108635 +0200 -@@ -63,12 +63,18 @@ sdkdir=$(pkg-config --variable=sdkdir xo - # Checks for header files. - AC_HEADER_STDC - --AC_CHECK_FILE([${sdkdir}/dri.h], -+if test "$cross_compiling" = "no" ; then -+ AC_CHECK_FILE([${sdkdir}/dri.h], - [have_dri_h="yes"], [have_dri_h="no"]) --AC_CHECK_FILE([${sdkdir}/sarea.h], -+ AC_CHECK_FILE([${sdkdir}/sarea.h], - [have_sarea_h="yes"], [have_sarea_h="no"]) --AC_CHECK_FILE([${sdkdir}/dristruct.h], -+ AC_CHECK_FILE([${sdkdir}/dristruct.h], - [have_dristruct_h="yes"], [have_dristruct_h="no"]) -+else -+ have_dri_h="yes" -+ have_sarea_h="yes" -+ have_dristruct_h="yes" -+fi - - AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support]) - diff --git a/package/x11r7/xdriver_xf86-video-xgixp/xdriver_xf86-video-xgixp.mk b/package/x11r7/xdriver_xf86-video-xgixp/xdriver_xf86-video-xgixp.mk deleted file mode 100644 index c55390ac2c..0000000000 --- a/package/x11r7/xdriver_xf86-video-xgixp/xdriver_xf86-video-xgixp.mk +++ /dev/null @@ -1,13 +0,0 @@ -################################################################################ -# -# xdriver_xf86-video-xgixp -- XGIXP video driver -# -################################################################################ - -XDRIVER_XF86_VIDEO_XGIXP_VERSION = 1.7.99.4 -XDRIVER_XF86_VIDEO_XGIXP_SOURCE = xf86-video-xgixp-$(XDRIVER_XF86_VIDEO_XGIXP_VERSION).tar.bz2 -XDRIVER_XF86_VIDEO_XGIXP_SITE = http://xorg.freedesktop.org/releases/individual/driver -XDRIVER_XF86_VIDEO_XGIXP_AUTORECONF = YES -XDRIVER_XF86_VIDEO_XGIXP_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xextproto xproto_xproto - -$(eval $(call AUTOTARGETS,package/x11r7,xdriver_xf86-video-xgixp)) diff --git a/package/x11r7/xfont_encodings/xfont_encodings.mk b/package/x11r7/xfont_encodings/xfont_encodings.mk index ed94e49bd3..568dbcbde8 100644 --- a/package/x11r7/xfont_encodings/xfont_encodings.mk +++ b/package/x11r7/xfont_encodings/xfont_encodings.mk @@ -1,16 +1,16 @@ ################################################################################ # -# xfont_encodings -- No description available +# xfont_encodings # ################################################################################ -XFONT_ENCODINGS_VERSION = 1.0.3 +XFONT_ENCODINGS_VERSION = 1.0.4 XFONT_ENCODINGS_SOURCE = encodings-$(XFONT_ENCODINGS_VERSION).tar.bz2 XFONT_ENCODINGS_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_ENCODINGS_AUTORECONF = NO -XFONT_ENCODINGS_MAKE_OPT = -XFONT_ENCODINGS_DEPENDENCIES = host-xapp_mkfontscale -HOST_XFONT_ENCODINGS_DEPENDENCIES = host-xapp_mkfontscale +XFONT_ENCODINGS_LICENSE = Public Domain +XFONT_ENCODINGS_LICENSE_FILES = COPYING -$(eval $(call AUTOTARGETS,package/x11r7,xfont_encodings)) -$(eval $(call AUTOTARGETS,package/x11r7,xfont_encodings,host)) +XFONT_ENCODINGS_DEPENDENCIES = host-xapp_mkfontscale host-pkgconf xutil_util-macros + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xfont_font-adobe-100dpi/xfont_font-adobe-100dpi.mk b/package/x11r7/xfont_font-adobe-100dpi/xfont_font-adobe-100dpi.mk index 2b9c50c246..5f109a192a 100644 --- a/package/x11r7/xfont_font-adobe-100dpi/xfont_font-adobe-100dpi.mk +++ b/package/x11r7/xfont_font-adobe-100dpi/xfont_font-adobe-100dpi.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-adobe-100dpi -- No description available +# xfont_font-adobe-100dpi # ################################################################################ -XFONT_FONT_ADOBE_100DPI_VERSION = 1.0.1 +XFONT_FONT_ADOBE_100DPI_VERSION = 1.0.3 XFONT_FONT_ADOBE_100DPI_SOURCE = font-adobe-100dpi-$(XFONT_FONT_ADOBE_100DPI_VERSION).tar.bz2 XFONT_FONT_ADOBE_100DPI_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_ADOBE_100DPI_AUTORECONF = NO +XFONT_FONT_ADOBE_100DPI_LICENSE = MIT +XFONT_FONT_ADOBE_100DPI_LICENSE_FILES = COPYING + XFONT_FONT_ADOBE_100DPI_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_ADOBE_100DPI_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_ADOBE_100DPI_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-adobe-100dpi)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-adobe-75dpi/xfont_font-adobe-75dpi.mk b/package/x11r7/xfont_font-adobe-75dpi/xfont_font-adobe-75dpi.mk index 2d7791a51d..51813e4f9d 100644 --- a/package/x11r7/xfont_font-adobe-75dpi/xfont_font-adobe-75dpi.mk +++ b/package/x11r7/xfont_font-adobe-75dpi/xfont_font-adobe-75dpi.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-adobe-75dpi -- No description available +# xfont_font-adobe-75dpi # ################################################################################ -XFONT_FONT_ADOBE_75DPI_VERSION = 1.0.1 +XFONT_FONT_ADOBE_75DPI_VERSION = 1.0.3 XFONT_FONT_ADOBE_75DPI_SOURCE = font-adobe-75dpi-$(XFONT_FONT_ADOBE_75DPI_VERSION).tar.bz2 XFONT_FONT_ADOBE_75DPI_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_ADOBE_75DPI_AUTORECONF = NO +XFONT_FONT_ADOBE_75DPI_LICENSE = MIT +XFONT_FONT_ADOBE_75DPI_LICENSE_FILES = COPYING + XFONT_FONT_ADOBE_75DPI_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_ADOBE_75DPI_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_ADOBE_75DPI_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-adobe-75dpi)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-adobe-utopia-100dpi/xfont_font-adobe-utopia-100dpi.mk b/package/x11r7/xfont_font-adobe-utopia-100dpi/xfont_font-adobe-utopia-100dpi.mk index 2ed27f4951..88b6d73553 100644 --- a/package/x11r7/xfont_font-adobe-utopia-100dpi/xfont_font-adobe-utopia-100dpi.mk +++ b/package/x11r7/xfont_font-adobe-utopia-100dpi/xfont_font-adobe-utopia-100dpi.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-adobe-utopia-100dpi -- No description available +# xfont_font-adobe-utopia-100dpi # ################################################################################ -XFONT_FONT_ADOBE_UTOPIA_100DPI_VERSION = 1.0.2 +XFONT_FONT_ADOBE_UTOPIA_100DPI_VERSION = 1.0.4 XFONT_FONT_ADOBE_UTOPIA_100DPI_SOURCE = font-adobe-utopia-100dpi-$(XFONT_FONT_ADOBE_UTOPIA_100DPI_VERSION).tar.bz2 XFONT_FONT_ADOBE_UTOPIA_100DPI_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_ADOBE_UTOPIA_100DPI_AUTORECONF = NO +XFONT_FONT_ADOBE_UTOPIA_100DPI_LICENSE = Adobe License (no modification allowed) +XFONT_FONT_ADOBE_UTOPIA_100DPI_LICENSE_FILES = COPYING + XFONT_FONT_ADOBE_UTOPIA_100DPI_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_ADOBE_UTOPIA_100DPI_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_ADOBE_UTOPIA_100DPI_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-adobe-utopia-100dpi)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-adobe-utopia-75dpi/xfont_font-adobe-utopia-75dpi.mk b/package/x11r7/xfont_font-adobe-utopia-75dpi/xfont_font-adobe-utopia-75dpi.mk index ead419635d..7ff2ef975f 100644 --- a/package/x11r7/xfont_font-adobe-utopia-75dpi/xfont_font-adobe-utopia-75dpi.mk +++ b/package/x11r7/xfont_font-adobe-utopia-75dpi/xfont_font-adobe-utopia-75dpi.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-adobe-utopia-75dpi -- No description available +# xfont_font-adobe-utopia-75dpi # ################################################################################ -XFONT_FONT_ADOBE_UTOPIA_75DPI_VERSION = 1.0.2 +XFONT_FONT_ADOBE_UTOPIA_75DPI_VERSION = 1.0.4 XFONT_FONT_ADOBE_UTOPIA_75DPI_SOURCE = font-adobe-utopia-75dpi-$(XFONT_FONT_ADOBE_UTOPIA_75DPI_VERSION).tar.bz2 XFONT_FONT_ADOBE_UTOPIA_75DPI_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_ADOBE_UTOPIA_75DPI_AUTORECONF = NO +XFONT_FONT_ADOBE_UTOPIA_75DPI_LICENSE = Adobe License (no modification allowed) +XFONT_FONT_ADOBE_UTOPIA_75DPI_LICENSE_FILES = COPYING + XFONT_FONT_ADOBE_UTOPIA_75DPI_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_ADOBE_UTOPIA_75DPI_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_ADOBE_UTOPIA_75DPI_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-adobe-utopia-75dpi)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-adobe-utopia-type1/xfont_font-adobe-utopia-type1.mk b/package/x11r7/xfont_font-adobe-utopia-type1/xfont_font-adobe-utopia-type1.mk index 983bab6dbd..647ef576f5 100644 --- a/package/x11r7/xfont_font-adobe-utopia-type1/xfont_font-adobe-utopia-type1.mk +++ b/package/x11r7/xfont_font-adobe-utopia-type1/xfont_font-adobe-utopia-type1.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-adobe-utopia-type1 -- No description available +# xfont_font-adobe-utopia-type1 # ################################################################################ -XFONT_FONT_ADOBE_UTOPIA_TYPE1_VERSION = 1.0.2 +XFONT_FONT_ADOBE_UTOPIA_TYPE1_VERSION = 1.0.4 XFONT_FONT_ADOBE_UTOPIA_TYPE1_SOURCE = font-adobe-utopia-type1-$(XFONT_FONT_ADOBE_UTOPIA_TYPE1_VERSION).tar.bz2 XFONT_FONT_ADOBE_UTOPIA_TYPE1_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_ADOBE_UTOPIA_TYPE1_AUTORECONF = NO +XFONT_FONT_ADOBE_UTOPIA_TYPE1_LICENSE = Adobe License (no modification allowed) +XFONT_FONT_ADOBE_UTOPIA_TYPE1_LICENSE_FILES = COPYING + XFONT_FONT_ADOBE_UTOPIA_TYPE1_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_ADOBE_UTOPIA_TYPE1_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_ADOBE_UTOPIA_TYPE1_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-adobe-utopia-type1)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-alias/xfont_font-alias.mk b/package/x11r7/xfont_font-alias/xfont_font-alias.mk index 1e85f3ed6d..43ed253e44 100644 --- a/package/x11r7/xfont_font-alias/xfont_font-alias.mk +++ b/package/x11r7/xfont_font-alias/xfont_font-alias.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-alias -- No description available +# xfont_font-alias # ################################################################################ -XFONT_FONT_ALIAS_VERSION = 1.0.2 +XFONT_FONT_ALIAS_VERSION = 1.0.3 XFONT_FONT_ALIAS_SOURCE = font-alias-$(XFONT_FONT_ALIAS_VERSION).tar.bz2 XFONT_FONT_ALIAS_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_ALIAS_AUTORECONF = NO +XFONT_FONT_ALIAS_LICENSE = MIT +XFONT_FONT_ALIAS_LICENSE_FILES = COPYING + XFONT_FONT_ALIAS_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_ALIAS_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_ALIAS_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-alias)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-arabic-misc/xfont_font-arabic-misc.mk b/package/x11r7/xfont_font-arabic-misc/xfont_font-arabic-misc.mk index 5a1253a6f2..3b000a35bb 100644 --- a/package/x11r7/xfont_font-arabic-misc/xfont_font-arabic-misc.mk +++ b/package/x11r7/xfont_font-arabic-misc/xfont_font-arabic-misc.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-arabic-misc -- No description available +# xfont_font-arabic-misc # ################################################################################ -XFONT_FONT_ARABIC_MISC_VERSION = 1.0.1 +XFONT_FONT_ARABIC_MISC_VERSION = 1.0.3 XFONT_FONT_ARABIC_MISC_SOURCE = font-arabic-misc-$(XFONT_FONT_ARABIC_MISC_VERSION).tar.bz2 XFONT_FONT_ARABIC_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_ARABIC_MISC_AUTORECONF = NO +XFONT_FONT_ARABIC_MISC_LICENSE = MIT +XFONT_FONT_ARABIC_MISC_LICENSE_FILES = COPYING + XFONT_FONT_ARABIC_MISC_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_ARABIC_MISC_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_ARABIC_MISC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-arabic-misc)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bh-100dpi/xfont_font-bh-100dpi.mk b/package/x11r7/xfont_font-bh-100dpi/xfont_font-bh-100dpi.mk index f2f796a3ad..dc153711eb 100644 --- a/package/x11r7/xfont_font-bh-100dpi/xfont_font-bh-100dpi.mk +++ b/package/x11r7/xfont_font-bh-100dpi/xfont_font-bh-100dpi.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-bh-100dpi -- No description available +# xfont_font-bh-100dpi # ################################################################################ -XFONT_FONT_BH_100DPI_VERSION = 1.0.1 +XFONT_FONT_BH_100DPI_VERSION = 1.0.3 XFONT_FONT_BH_100DPI_SOURCE = font-bh-100dpi-$(XFONT_FONT_BH_100DPI_VERSION).tar.bz2 XFONT_FONT_BH_100DPI_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_BH_100DPI_AUTORECONF = NO +XFONT_FONT_BH_100DPI_LICENSE = Bigelow & Holmes License (no modification) +XFONT_FONT_BH_100DPI_LICENSE_FILES = COPYING + XFONT_FONT_BH_100DPI_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_BH_100DPI_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_BH_100DPI_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-bh-100dpi)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bh-75dpi/xfont_font-bh-75dpi.mk b/package/x11r7/xfont_font-bh-75dpi/xfont_font-bh-75dpi.mk index 4d08be40ba..f86c1d1d1d 100644 --- a/package/x11r7/xfont_font-bh-75dpi/xfont_font-bh-75dpi.mk +++ b/package/x11r7/xfont_font-bh-75dpi/xfont_font-bh-75dpi.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-bh-75dpi -- No description available +# xfont_font-bh-75dpi # ################################################################################ -XFONT_FONT_BH_75DPI_VERSION = 1.0.1 +XFONT_FONT_BH_75DPI_VERSION = 1.0.3 XFONT_FONT_BH_75DPI_SOURCE = font-bh-75dpi-$(XFONT_FONT_BH_75DPI_VERSION).tar.bz2 XFONT_FONT_BH_75DPI_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_BH_75DPI_AUTORECONF = NO +XFONT_FONT_BH_75DPI_LICENSE = Bigelow & Holmes License (no modification) +XFONT_FONT_BH_75DPI_LICENSE_FILES = COPYING + XFONT_FONT_BH_75DPI_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_BH_75DPI_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_BH_75DPI_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-bh-75dpi)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bh-lucidatypewriter-100dpi/xfont_font-bh-lucidatypewriter-100dpi.mk b/package/x11r7/xfont_font-bh-lucidatypewriter-100dpi/xfont_font-bh-lucidatypewriter-100dpi.mk index a7897c261b..c2be04814c 100644 --- a/package/x11r7/xfont_font-bh-lucidatypewriter-100dpi/xfont_font-bh-lucidatypewriter-100dpi.mk +++ b/package/x11r7/xfont_font-bh-lucidatypewriter-100dpi/xfont_font-bh-lucidatypewriter-100dpi.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-bh-lucidatypewriter-100dpi -- No description available +# xfont_font-bh-lucidatypewriter-100dpi # ################################################################################ -XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_VERSION = 1.0.1 +XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_VERSION = 1.0.3 XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_SOURCE = font-bh-lucidatypewriter-100dpi-$(XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_VERSION).tar.bz2 XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_AUTORECONF = NO +XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_LICENSE = Bigelow & Holmes License (no modification) +XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_LICENSE_FILES = COPYING + XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-bh-lucidatypewriter-100dpi)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bh-lucidatypewriter-75dpi/xfont_font-bh-lucidatypewriter-75dpi.mk b/package/x11r7/xfont_font-bh-lucidatypewriter-75dpi/xfont_font-bh-lucidatypewriter-75dpi.mk index 04a3246243..c22d22fe57 100644 --- a/package/x11r7/xfont_font-bh-lucidatypewriter-75dpi/xfont_font-bh-lucidatypewriter-75dpi.mk +++ b/package/x11r7/xfont_font-bh-lucidatypewriter-75dpi/xfont_font-bh-lucidatypewriter-75dpi.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-bh-lucidatypewriter-75dpi -- No description available +# xfont_font-bh-lucidatypewriter-75dpi # ################################################################################ -XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_VERSION = 1.0.1 +XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_VERSION = 1.0.3 XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_SOURCE = font-bh-lucidatypewriter-75dpi-$(XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_VERSION).tar.bz2 XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_AUTORECONF = NO +XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_LICENSE = Bigelow & Holmes License (no modification) +XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_LICENSE_FILES = COPYING + XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-bh-lucidatypewriter-75dpi)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bh-ttf/xfont_font-bh-ttf.mk b/package/x11r7/xfont_font-bh-ttf/xfont_font-bh-ttf.mk index ea2c82a26c..cbf46c6241 100644 --- a/package/x11r7/xfont_font-bh-ttf/xfont_font-bh-ttf.mk +++ b/package/x11r7/xfont_font-bh-ttf/xfont_font-bh-ttf.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-bh-ttf -- No description available +# xfont_font-bh-ttf # ################################################################################ -XFONT_FONT_BH_TTF_VERSION = 1.0.1 +XFONT_FONT_BH_TTF_VERSION = 1.0.3 XFONT_FONT_BH_TTF_SOURCE = font-bh-ttf-$(XFONT_FONT_BH_TTF_VERSION).tar.bz2 XFONT_FONT_BH_TTF_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_BH_TTF_AUTORECONF = NO +XFONT_FONT_BH_TTF_LICENSE = Bigelow & Holmes License (no modification) +XFONT_FONT_BH_TTF_LICENSE_FILES = COPYING + XFONT_FONT_BH_TTF_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_BH_TTF_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_BH_TTF_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-bh-ttf)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bh-type1/xfont_font-bh-type1.mk b/package/x11r7/xfont_font-bh-type1/xfont_font-bh-type1.mk index 3f5a025d01..bf8b65ed69 100644 --- a/package/x11r7/xfont_font-bh-type1/xfont_font-bh-type1.mk +++ b/package/x11r7/xfont_font-bh-type1/xfont_font-bh-type1.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-bh-type1 -- No description available +# xfont_font-bh-type1 # ################################################################################ -XFONT_FONT_BH_TYPE1_VERSION = 1.0.1 +XFONT_FONT_BH_TYPE1_VERSION = 1.0.3 XFONT_FONT_BH_TYPE1_SOURCE = font-bh-type1-$(XFONT_FONT_BH_TYPE1_VERSION).tar.bz2 XFONT_FONT_BH_TYPE1_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_BH_TYPE1_AUTORECONF = NO +XFONT_FONT_BH_TYPE1_LICENSE = Bigelow & Holmes License (no modification) +XFONT_FONT_BH_TYPE1_LICENSE_FILES = COPYING + XFONT_FONT_BH_TYPE1_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_BH_TYPE1_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_BH_TYPE1_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-bh-type1)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bitstream-100dpi/xfont_font-bitstream-100dpi.mk b/package/x11r7/xfont_font-bitstream-100dpi/xfont_font-bitstream-100dpi.mk index a89db53e3a..4126263c1f 100644 --- a/package/x11r7/xfont_font-bitstream-100dpi/xfont_font-bitstream-100dpi.mk +++ b/package/x11r7/xfont_font-bitstream-100dpi/xfont_font-bitstream-100dpi.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-bitstream-100dpi -- No description available +# xfont_font-bitstream-100dpi # ################################################################################ -XFONT_FONT_BITSTREAM_100DPI_VERSION = 1.0.1 +XFONT_FONT_BITSTREAM_100DPI_VERSION = 1.0.3 XFONT_FONT_BITSTREAM_100DPI_SOURCE = font-bitstream-100dpi-$(XFONT_FONT_BITSTREAM_100DPI_VERSION).tar.bz2 XFONT_FONT_BITSTREAM_100DPI_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_BITSTREAM_100DPI_AUTORECONF = NO +XFONT_FONT_BITSTREAM_100DPI_LICENSE = MIT +XFONT_FONT_BITSTREAM_100DPI_LICENSE_FILES = COPYING + XFONT_FONT_BITSTREAM_100DPI_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_BITSTREAM_100DPI_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_BITSTREAM_100DPI_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-bitstream-100dpi)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bitstream-75dpi/xfont_font-bitstream-75dpi.mk b/package/x11r7/xfont_font-bitstream-75dpi/xfont_font-bitstream-75dpi.mk index ea2fd41eb9..330d551495 100644 --- a/package/x11r7/xfont_font-bitstream-75dpi/xfont_font-bitstream-75dpi.mk +++ b/package/x11r7/xfont_font-bitstream-75dpi/xfont_font-bitstream-75dpi.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-bitstream-75dpi -- No description available +# xfont_font-bitstream-75dpi # ################################################################################ -XFONT_FONT_BITSTREAM_75DPI_VERSION = 1.0.1 +XFONT_FONT_BITSTREAM_75DPI_VERSION = 1.0.3 XFONT_FONT_BITSTREAM_75DPI_SOURCE = font-bitstream-75dpi-$(XFONT_FONT_BITSTREAM_75DPI_VERSION).tar.bz2 XFONT_FONT_BITSTREAM_75DPI_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_BITSTREAM_75DPI_AUTORECONF = NO +XFONT_FONT_BITSTREAM_75DPI_LICENSE = MIT +XFONT_FONT_BITSTREAM_75DPI_LICENSE_FILES = COPYING + XFONT_FONT_BITSTREAM_75DPI_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_BITSTREAM_75DPI_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_BITSTREAM_75DPI_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-bitstream-75dpi)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bitstream-speedo/Config.in b/package/x11r7/xfont_font-bitstream-speedo/Config.in deleted file mode 100644 index 70750f632d..0000000000 --- a/package/x11r7/xfont_font-bitstream-speedo/Config.in +++ /dev/null @@ -1,4 +0,0 @@ -config BR2_PACKAGE_XFONT_FONT_BITSTREAM_SPEEDO - bool "font-bitstream-speedo" - help - No description available diff --git a/package/x11r7/xfont_font-bitstream-speedo/xfont_font-bitstream-speedo.mk b/package/x11r7/xfont_font-bitstream-speedo/xfont_font-bitstream-speedo.mk deleted file mode 100644 index f867c7ebb3..0000000000 --- a/package/x11r7/xfont_font-bitstream-speedo/xfont_font-bitstream-speedo.mk +++ /dev/null @@ -1,16 +0,0 @@ -################################################################################ -# -# font-bitstream-speedo -- No description available -# -################################################################################ - -XFONT_FONT_BITSTREAM_SPEEDO_VERSION = 1.0.1 -XFONT_FONT_BITSTREAM_SPEEDO_SOURCE = font-bitstream-speedo-$(XFONT_FONT_BITSTREAM_SPEEDO_VERSION).tar.bz2 -XFONT_FONT_BITSTREAM_SPEEDO_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_BITSTREAM_SPEEDO_AUTORECONF = NO -XFONT_FONT_BITSTREAM_SPEEDO_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install -XFONT_FONT_BITSTREAM_SPEEDO_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data -XFONT_FONT_BITSTREAM_SPEEDO_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf - -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-bitstream-speedo)) - diff --git a/package/x11r7/xfont_font-bitstream-type1/xfont_font-bitstream-type1.mk b/package/x11r7/xfont_font-bitstream-type1/xfont_font-bitstream-type1.mk index 75a60de155..7b1a588e01 100644 --- a/package/x11r7/xfont_font-bitstream-type1/xfont_font-bitstream-type1.mk +++ b/package/x11r7/xfont_font-bitstream-type1/xfont_font-bitstream-type1.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-bitstream-type1 -- No description available +# xfont_font-bitstream-type1 # ################################################################################ -XFONT_FONT_BITSTREAM_TYPE1_VERSION = 1.0.1 +XFONT_FONT_BITSTREAM_TYPE1_VERSION = 1.0.3 XFONT_FONT_BITSTREAM_TYPE1_SOURCE = font-bitstream-type1-$(XFONT_FONT_BITSTREAM_TYPE1_VERSION).tar.bz2 XFONT_FONT_BITSTREAM_TYPE1_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_BITSTREAM_TYPE1_AUTORECONF = NO +XFONT_FONT_BITSTREAM_TYPE1_LICENSE = MIT +XFONT_FONT_BITSTREAM_TYPE1_LICENSE_FILES = COPYING + XFONT_FONT_BITSTREAM_TYPE1_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_BITSTREAM_TYPE1_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_BITSTREAM_TYPE1_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-bitstream-type1)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-cronyx-cyrillic/xfont_font-cronyx-cyrillic.mk b/package/x11r7/xfont_font-cronyx-cyrillic/xfont_font-cronyx-cyrillic.mk index 484bf4b8ff..aa230867db 100644 --- a/package/x11r7/xfont_font-cronyx-cyrillic/xfont_font-cronyx-cyrillic.mk +++ b/package/x11r7/xfont_font-cronyx-cyrillic/xfont_font-cronyx-cyrillic.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-cronyx-cyrillic -- No description available +# xfont_font-cronyx-cyrillic # ################################################################################ -XFONT_FONT_CRONYX_CYRILLIC_VERSION = 1.0.1 +XFONT_FONT_CRONYX_CYRILLIC_VERSION = 1.0.3 XFONT_FONT_CRONYX_CYRILLIC_SOURCE = font-cronyx-cyrillic-$(XFONT_FONT_CRONYX_CYRILLIC_VERSION).tar.bz2 XFONT_FONT_CRONYX_CYRILLIC_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_CRONYX_CYRILLIC_AUTORECONF = NO +XFONT_FONT_CRONYX_CYRILLIC_LICENSE = MIT +XFONT_FONT_CRONYX_CYRILLIC_LICENSE_FILES = COPYING + XFONT_FONT_CRONYX_CYRILLIC_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_CRONYX_CYRILLIC_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_CRONYX_CYRILLIC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-cronyx-cyrillic)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-cursor-misc/xfont_font-cursor-misc.mk b/package/x11r7/xfont_font-cursor-misc/xfont_font-cursor-misc.mk index 755f6ec70b..f84124a397 100644 --- a/package/x11r7/xfont_font-cursor-misc/xfont_font-cursor-misc.mk +++ b/package/x11r7/xfont_font-cursor-misc/xfont_font-cursor-misc.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-cursor-misc -- No description available +# xfont_font-cursor-misc # ################################################################################ -XFONT_FONT_CURSOR_MISC_VERSION = 1.0.1 +XFONT_FONT_CURSOR_MISC_VERSION = 1.0.3 XFONT_FONT_CURSOR_MISC_SOURCE = font-cursor-misc-$(XFONT_FONT_CURSOR_MISC_VERSION).tar.bz2 XFONT_FONT_CURSOR_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_CURSOR_MISC_AUTORECONF = NO +XFONT_FONT_CURSOR_MISC_LICENSE = unencumbered +XFONT_FONT_CURSOR_MISC_LICENSE_FILES = COPYING + XFONT_FONT_CURSOR_MISC_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_CURSOR_MISC_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_CURSOR_MISC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-cursor-misc)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-daewoo-misc/xfont_font-daewoo-misc.mk b/package/x11r7/xfont_font-daewoo-misc/xfont_font-daewoo-misc.mk index c66bbbbc35..576f760a06 100644 --- a/package/x11r7/xfont_font-daewoo-misc/xfont_font-daewoo-misc.mk +++ b/package/x11r7/xfont_font-daewoo-misc/xfont_font-daewoo-misc.mk @@ -1,16 +1,16 @@ ################################################################################ # -# font-daewoo-misc -- No description available +# xfont_font-daewoo-misc # ################################################################################ -XFONT_FONT_DAEWOO_MISC_VERSION = 1.0.1 +XFONT_FONT_DAEWOO_MISC_VERSION = 1.0.3 XFONT_FONT_DAEWOO_MISC_SOURCE = font-daewoo-misc-$(XFONT_FONT_DAEWOO_MISC_VERSION).tar.bz2 XFONT_FONT_DAEWOO_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_DAEWOO_MISC_AUTORECONF = NO +XFONT_FONT_DAEWOO_MISC_LICENSE_FILES = COPYING + XFONT_FONT_DAEWOO_MISC_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_DAEWOO_MISC_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_DAEWOO_MISC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-daewoo-misc)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-dec-misc/xfont_font-dec-misc.mk b/package/x11r7/xfont_font-dec-misc/xfont_font-dec-misc.mk index 9c510a1d59..d4c7984e68 100644 --- a/package/x11r7/xfont_font-dec-misc/xfont_font-dec-misc.mk +++ b/package/x11r7/xfont_font-dec-misc/xfont_font-dec-misc.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-dec-misc -- No description available +# xfont_font-dec-misc # ################################################################################ -XFONT_FONT_DEC_MISC_VERSION = 1.0.1 +XFONT_FONT_DEC_MISC_VERSION = 1.0.3 XFONT_FONT_DEC_MISC_SOURCE = font-dec-misc-$(XFONT_FONT_DEC_MISC_VERSION).tar.bz2 XFONT_FONT_DEC_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_DEC_MISC_AUTORECONF = NO +XFONT_FONT_DEC_MISC_LICENSE = MIT +XFONT_FONT_DEC_MISC_LICENSE_FILES = COPYING + XFONT_FONT_DEC_MISC_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_DEC_MISC_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_DEC_MISC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-dec-misc)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-ibm-type1/xfont_font-ibm-type1.mk b/package/x11r7/xfont_font-ibm-type1/xfont_font-ibm-type1.mk index 075f4baccc..da0ebb64ce 100644 --- a/package/x11r7/xfont_font-ibm-type1/xfont_font-ibm-type1.mk +++ b/package/x11r7/xfont_font-ibm-type1/xfont_font-ibm-type1.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-ibm-type1 -- No description available +# xfont_font-ibm-type1 # ################################################################################ -XFONT_FONT_IBM_TYPE1_VERSION = 1.0.1 +XFONT_FONT_IBM_TYPE1_VERSION = 1.0.3 XFONT_FONT_IBM_TYPE1_SOURCE = font-ibm-type1-$(XFONT_FONT_IBM_TYPE1_VERSION).tar.bz2 XFONT_FONT_IBM_TYPE1_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_IBM_TYPE1_AUTORECONF = NO +XFONT_FONT_IBM_TYPE1_LICENSE = IBM/MIT X Consortium Courier Typefont agreement (no modification) +XFONT_FONT_IBM_TYPE1_LICENSE_FILES = COPYING + XFONT_FONT_IBM_TYPE1_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_IBM_TYPE1_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_IBM_TYPE1_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-ibm-type1)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-isas-misc/xfont_font-isas-misc.mk b/package/x11r7/xfont_font-isas-misc/xfont_font-isas-misc.mk index 5635ff6f2d..d4b2c6b395 100644 --- a/package/x11r7/xfont_font-isas-misc/xfont_font-isas-misc.mk +++ b/package/x11r7/xfont_font-isas-misc/xfont_font-isas-misc.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-isas-misc -- No description available +# xfont_font-isas-misc # ################################################################################ -XFONT_FONT_ISAS_MISC_VERSION = 1.0.1 +XFONT_FONT_ISAS_MISC_VERSION = 1.0.3 XFONT_FONT_ISAS_MISC_SOURCE = font-isas-misc-$(XFONT_FONT_ISAS_MISC_VERSION).tar.bz2 XFONT_FONT_ISAS_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_ISAS_MISC_AUTORECONF = NO +XFONT_FONT_ISAS_MISC_LICENSE = MIT +XFONT_FONT_ISAS_MISC_LICENSE_FILES = COPYING + XFONT_FONT_ISAS_MISC_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_ISAS_MISC_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_ISAS_MISC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-isas-misc)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-jis-misc/xfont_font-jis-misc.mk b/package/x11r7/xfont_font-jis-misc/xfont_font-jis-misc.mk index 4f1a74ed3e..d19e5bcab9 100644 --- a/package/x11r7/xfont_font-jis-misc/xfont_font-jis-misc.mk +++ b/package/x11r7/xfont_font-jis-misc/xfont_font-jis-misc.mk @@ -1,16 +1,16 @@ ################################################################################ # -# font-jis-misc -- No description available +# xfont_font-jis-misc # ################################################################################ -XFONT_FONT_JIS_MISC_VERSION = 1.0.1 +XFONT_FONT_JIS_MISC_VERSION = 1.0.3 XFONT_FONT_JIS_MISC_SOURCE = font-jis-misc-$(XFONT_FONT_JIS_MISC_VERSION).tar.bz2 XFONT_FONT_JIS_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_JIS_MISC_AUTORECONF = NO +XFONT_FONT_JIS_MISC_LICENSE_FILES = COPYING + XFONT_FONT_JIS_MISC_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_JIS_MISC_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_JIS_MISC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-jis-misc)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-micro-misc/xfont_font-micro-misc.mk b/package/x11r7/xfont_font-micro-misc/xfont_font-micro-misc.mk index 0b1f35cd93..e60b230358 100644 --- a/package/x11r7/xfont_font-micro-misc/xfont_font-micro-misc.mk +++ b/package/x11r7/xfont_font-micro-misc/xfont_font-micro-misc.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-micro-misc -- No description available +# xfont_font-micro-misc # ################################################################################ -XFONT_FONT_MICRO_MISC_VERSION = 1.0.1 +XFONT_FONT_MICRO_MISC_VERSION = 1.0.3 XFONT_FONT_MICRO_MISC_SOURCE = font-micro-misc-$(XFONT_FONT_MICRO_MISC_VERSION).tar.bz2 XFONT_FONT_MICRO_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_MICRO_MISC_AUTORECONF = NO +XFONT_FONT_MICRO_MISC_LICENSE = Public Domain +XFONT_FONT_MICRO_MISC_LICENSE_FILES = COPYING + XFONT_FONT_MICRO_MISC_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_MICRO_MISC_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_MICRO_MISC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-micro-misc)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-misc-cyrillic/xfont_font-misc-cyrillic.mk b/package/x11r7/xfont_font-misc-cyrillic/xfont_font-misc-cyrillic.mk index 3ae408d021..3cc529bc00 100644 --- a/package/x11r7/xfont_font-misc-cyrillic/xfont_font-misc-cyrillic.mk +++ b/package/x11r7/xfont_font-misc-cyrillic/xfont_font-misc-cyrillic.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-misc-cyrillic -- No description available +# xfont_font-misc-cyrillic # ################################################################################ -XFONT_FONT_MISC_CYRILLIC_VERSION = 1.0.1 +XFONT_FONT_MISC_CYRILLIC_VERSION = 1.0.3 XFONT_FONT_MISC_CYRILLIC_SOURCE = font-misc-cyrillic-$(XFONT_FONT_MISC_CYRILLIC_VERSION).tar.bz2 XFONT_FONT_MISC_CYRILLIC_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_MISC_CYRILLIC_AUTORECONF = NO +XFONT_FONT_MISC_CYRILLIC_LICENSE = MIT / Public Domain +XFONT_FONT_MISC_CYRILLIC_LICENSE_FILES = COPYING + XFONT_FONT_MISC_CYRILLIC_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_MISC_CYRILLIC_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_MISC_CYRILLIC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-misc-cyrillic)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-misc-ethiopic/xfont_font-misc-ethiopic.mk b/package/x11r7/xfont_font-misc-ethiopic/xfont_font-misc-ethiopic.mk index e0937813f7..7e42b71e04 100644 --- a/package/x11r7/xfont_font-misc-ethiopic/xfont_font-misc-ethiopic.mk +++ b/package/x11r7/xfont_font-misc-ethiopic/xfont_font-misc-ethiopic.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-misc-ethiopic -- No description available +# xfont_font-misc-ethiopic # ################################################################################ -XFONT_FONT_MISC_ETHIOPIC_VERSION = 1.0.1 +XFONT_FONT_MISC_ETHIOPIC_VERSION = 1.0.3 XFONT_FONT_MISC_ETHIOPIC_SOURCE = font-misc-ethiopic-$(XFONT_FONT_MISC_ETHIOPIC_VERSION).tar.bz2 XFONT_FONT_MISC_ETHIOPIC_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_MISC_ETHIOPIC_AUTORECONF = NO +XFONT_FONT_MISC_ETHIOPIC_LICENSE = MIT +XFONT_FONT_MISC_ETHIOPIC_LICENSE_FILES = COPYING + XFONT_FONT_MISC_ETHIOPIC_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_MISC_ETHIOPIC_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_MISC_ETHIOPIC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-misc-ethiopic)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-misc-meltho/xfont_font-misc-meltho.mk b/package/x11r7/xfont_font-misc-meltho/xfont_font-misc-meltho.mk index e04f01d9d4..10046943b9 100644 --- a/package/x11r7/xfont_font-misc-meltho/xfont_font-misc-meltho.mk +++ b/package/x11r7/xfont_font-misc-meltho/xfont_font-misc-meltho.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-misc-meltho -- No description available +# xfont_font-misc-meltho # ################################################################################ -XFONT_FONT_MISC_MELTHO_VERSION = 1.0.1 +XFONT_FONT_MISC_MELTHO_VERSION = 1.0.3 XFONT_FONT_MISC_MELTHO_SOURCE = font-misc-meltho-$(XFONT_FONT_MISC_MELTHO_VERSION).tar.bz2 XFONT_FONT_MISC_MELTHO_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_MISC_MELTHO_AUTORECONF = NO +XFONT_FONT_MISC_MELTHO_LICENSE = Meltho License +XFONT_FONT_MISC_MELTHO_LICENSE_FILES = COPYING + XFONT_FONT_MISC_MELTHO_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_MISC_MELTHO_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_MISC_MELTHO_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-misc-meltho)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-misc-misc/xfont_font-misc-misc.mk b/package/x11r7/xfont_font-misc-misc/xfont_font-misc-misc.mk index f6a5564938..81cf3203f1 100644 --- a/package/x11r7/xfont_font-misc-misc/xfont_font-misc-misc.mk +++ b/package/x11r7/xfont_font-misc-misc/xfont_font-misc-misc.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-misc-misc -- No description available +# xfont_font-misc-misc # ################################################################################ -XFONT_FONT_MISC_MISC_VERSION = 1.1.0 +XFONT_FONT_MISC_MISC_VERSION = 1.1.2 XFONT_FONT_MISC_MISC_SOURCE = font-misc-misc-$(XFONT_FONT_MISC_MISC_VERSION).tar.bz2 XFONT_FONT_MISC_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_MISC_MISC_AUTORECONF = NO +XFONT_FONT_MISC_MISC_LICENSE = Public Domain +XFONT_FONT_MISC_MISC_LICENSE_FILES = COPYING + XFONT_FONT_MISC_MISC_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_MISC_MISC_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_MISC_MISC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-misc-misc)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-mutt-misc/xfont_font-mutt-misc.mk b/package/x11r7/xfont_font-mutt-misc/xfont_font-mutt-misc.mk index 28995ef7b9..65aa9958ed 100644 --- a/package/x11r7/xfont_font-mutt-misc/xfont_font-mutt-misc.mk +++ b/package/x11r7/xfont_font-mutt-misc/xfont_font-mutt-misc.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-mutt-misc -- No description available +# xfont_font-mutt-misc # ################################################################################ -XFONT_FONT_MUTT_MISC_VERSION = 1.0.1 +XFONT_FONT_MUTT_MISC_VERSION = 1.0.3 XFONT_FONT_MUTT_MISC_SOURCE = font-mutt-misc-$(XFONT_FONT_MUTT_MISC_VERSION).tar.bz2 XFONT_FONT_MUTT_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_MUTT_MISC_AUTORECONF = NO +XFONT_FONT_MUTT_MISC_LICENSE = MIT +XFONT_FONT_MUTT_MISC_LICENSE_FILES = COPYING + XFONT_FONT_MUTT_MISC_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_MUTT_MISC_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_MUTT_MISC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-mutt-misc)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-schumacher-misc/xfont_font-schumacher-misc.mk b/package/x11r7/xfont_font-schumacher-misc/xfont_font-schumacher-misc.mk index 86dc54be48..4544940bc5 100644 --- a/package/x11r7/xfont_font-schumacher-misc/xfont_font-schumacher-misc.mk +++ b/package/x11r7/xfont_font-schumacher-misc/xfont_font-schumacher-misc.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-schumacher-misc -- No description available +# xfont_font-schumacher-misc # ################################################################################ -XFONT_FONT_SCHUMACHER_MISC_VERSION = 1.1.0 +XFONT_FONT_SCHUMACHER_MISC_VERSION = 1.1.2 XFONT_FONT_SCHUMACHER_MISC_SOURCE = font-schumacher-misc-$(XFONT_FONT_SCHUMACHER_MISC_VERSION).tar.bz2 XFONT_FONT_SCHUMACHER_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_SCHUMACHER_MISC_AUTORECONF = NO +XFONT_FONT_SCHUMACHER_MISC_LICENSE = MIT +XFONT_FONT_SCHUMACHER_MISC_LICENSE_FILES = COPYING + XFONT_FONT_SCHUMACHER_MISC_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_SCHUMACHER_MISC_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_SCHUMACHER_MISC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-schumacher-misc)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-screen-cyrillic/xfont_font-screen-cyrillic.mk b/package/x11r7/xfont_font-screen-cyrillic/xfont_font-screen-cyrillic.mk index d0db502f2c..030d418b64 100644 --- a/package/x11r7/xfont_font-screen-cyrillic/xfont_font-screen-cyrillic.mk +++ b/package/x11r7/xfont_font-screen-cyrillic/xfont_font-screen-cyrillic.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-screen-cyrillic -- No description available +# xfont_font-screen-cyrillic # ################################################################################ -XFONT_FONT_SCREEN_CYRILLIC_VERSION = 1.0.2 +XFONT_FONT_SCREEN_CYRILLIC_VERSION = 1.0.4 XFONT_FONT_SCREEN_CYRILLIC_SOURCE = font-screen-cyrillic-$(XFONT_FONT_SCREEN_CYRILLIC_VERSION).tar.bz2 XFONT_FONT_SCREEN_CYRILLIC_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_SCREEN_CYRILLIC_AUTORECONF = NO +XFONT_FONT_SCREEN_CYRILLIC_LICENSE = MIT +XFONT_FONT_SCREEN_CYRILLIC_LICENSE_FILES = COPYING + XFONT_FONT_SCREEN_CYRILLIC_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_SCREEN_CYRILLIC_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_SCREEN_CYRILLIC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-screen-cyrillic)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-sony-misc/xfont_font-sony-misc.mk b/package/x11r7/xfont_font-sony-misc/xfont_font-sony-misc.mk index 7fc9cbfba6..ff77d7a090 100644 --- a/package/x11r7/xfont_font-sony-misc/xfont_font-sony-misc.mk +++ b/package/x11r7/xfont_font-sony-misc/xfont_font-sony-misc.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-sony-misc -- No description available +# xfont_font-sony-misc # ################################################################################ -XFONT_FONT_SONY_MISC_VERSION = 1.0.1 +XFONT_FONT_SONY_MISC_VERSION = 1.0.3 XFONT_FONT_SONY_MISC_SOURCE = font-sony-misc-$(XFONT_FONT_SONY_MISC_VERSION).tar.bz2 XFONT_FONT_SONY_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_SONY_MISC_AUTORECONF = NO +XFONT_FONT_SONY_MISC_LICENSE = MIT +XFONT_FONT_SONY_MISC_LICENSE_FILES = COPYING + XFONT_FONT_SONY_MISC_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_SONY_MISC_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_SONY_MISC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-sony-misc)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-sun-misc/xfont_font-sun-misc.mk b/package/x11r7/xfont_font-sun-misc/xfont_font-sun-misc.mk index 9364e4a38d..f335735324 100644 --- a/package/x11r7/xfont_font-sun-misc/xfont_font-sun-misc.mk +++ b/package/x11r7/xfont_font-sun-misc/xfont_font-sun-misc.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-sun-misc -- No description available +# xfont_font-sun-misc # ################################################################################ -XFONT_FONT_SUN_MISC_VERSION = 1.0.1 +XFONT_FONT_SUN_MISC_VERSION = 1.0.3 XFONT_FONT_SUN_MISC_SOURCE = font-sun-misc-$(XFONT_FONT_SUN_MISC_VERSION).tar.bz2 XFONT_FONT_SUN_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_SUN_MISC_AUTORECONF = NO +XFONT_FONT_SUN_MISC_LICENSE = MIT +XFONT_FONT_SUN_MISC_LICENSE_FILES = COPYING + XFONT_FONT_SUN_MISC_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_SUN_MISC_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_SUN_MISC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-sun-misc)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-util/xfont_font-util.mk b/package/x11r7/xfont_font-util/xfont_font-util.mk index 82b66a5d0c..946bb0261d 100644 --- a/package/x11r7/xfont_font-util/xfont_font-util.mk +++ b/package/x11r7/xfont_font-util/xfont_font-util.mk @@ -1,17 +1,18 @@ ################################################################################ # -# font-util -- No description available +# xfont_font-util # ################################################################################ -XFONT_FONT_UTIL_VERSION = 1.1.1 +XFONT_FONT_UTIL_VERSION = 1.3.0 XFONT_FONT_UTIL_SOURCE = font-util-$(XFONT_FONT_UTIL_VERSION).tar.bz2 XFONT_FONT_UTIL_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_UTIL_DEPENDENCIES = host-pkg-config +XFONT_FONT_UTIL_LICENSE = MIT/BSD-2c +XFONT_FONT_UTIL_LICENSE_FILES = COPYING + +XFONT_FONT_UTIL_DEPENDENCIES = host-pkgconf XFONT_FONT_UTIL_INSTALL_STAGING = YES XFONT_FONT_UTIL_INSTALL_TARGET = NO -HOST_XFONT_FONT_UTIL_DEPENDENCIES = host-pkg-config - -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-util)) -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-util,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xfont_font-winitzki-cyrillic/xfont_font-winitzki-cyrillic.mk b/package/x11r7/xfont_font-winitzki-cyrillic/xfont_font-winitzki-cyrillic.mk index 377f281df9..0df49cac17 100644 --- a/package/x11r7/xfont_font-winitzki-cyrillic/xfont_font-winitzki-cyrillic.mk +++ b/package/x11r7/xfont_font-winitzki-cyrillic/xfont_font-winitzki-cyrillic.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-winitzki-cyrillic -- No description available +# xfont_font-winitzki-cyrillic # ################################################################################ -XFONT_FONT_WINITZKI_CYRILLIC_VERSION = 1.0.1 +XFONT_FONT_WINITZKI_CYRILLIC_VERSION = 1.0.3 XFONT_FONT_WINITZKI_CYRILLIC_SOURCE = font-winitzki-cyrillic-$(XFONT_FONT_WINITZKI_CYRILLIC_VERSION).tar.bz2 XFONT_FONT_WINITZKI_CYRILLIC_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_WINITZKI_CYRILLIC_AUTORECONF = NO +XFONT_FONT_WINITZKI_CYRILLIC_LICENSE = Public Domain +XFONT_FONT_WINITZKI_CYRILLIC_LICENSE_FILES = COPYING + XFONT_FONT_WINITZKI_CYRILLIC_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_WINITZKI_CYRILLIC_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_WINITZKI_CYRILLIC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-winitzki-cyrillic)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-xfree86-type1/xfont_font-xfree86-type1.mk b/package/x11r7/xfont_font-xfree86-type1/xfont_font-xfree86-type1.mk index 6e3e564695..946e409cc2 100644 --- a/package/x11r7/xfont_font-xfree86-type1/xfont_font-xfree86-type1.mk +++ b/package/x11r7/xfont_font-xfree86-type1/xfont_font-xfree86-type1.mk @@ -1,16 +1,17 @@ ################################################################################ # -# font-xfree86-type1 -- No description available +# xfont_font-xfree86-type1 # ################################################################################ -XFONT_FONT_XFREE86_TYPE1_VERSION = 1.0.2 +XFONT_FONT_XFREE86_TYPE1_VERSION = 1.0.4 XFONT_FONT_XFREE86_TYPE1_SOURCE = font-xfree86-type1-$(XFONT_FONT_XFREE86_TYPE1_VERSION).tar.bz2 XFONT_FONT_XFREE86_TYPE1_SITE = http://xorg.freedesktop.org/releases/individual/font -XFONT_FONT_XFREE86_TYPE1_AUTORECONF = NO +XFONT_FONT_XFREE86_TYPE1_LICENSE = MIT +XFONT_FONT_XFREE86_TYPE1_LICENSE_FILES = COPYING + XFONT_FONT_XFREE86_TYPE1_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install XFONT_FONT_XFREE86_TYPE1_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data XFONT_FONT_XFREE86_TYPE1_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf -$(eval $(call AUTOTARGETS,package/x11r7,xfont_font-xfree86-type1)) - +$(eval $(autotools-package)) diff --git a/package/x11r7/xkeyboard-config/Config.in b/package/x11r7/xkeyboard-config/Config.in index 8e27dacb46..5d1d6a72ed 100644 --- a/package/x11r7/xkeyboard-config/Config.in +++ b/package/x11r7/xkeyboard-config/Config.in @@ -1,6 +1,9 @@ config BR2_PACKAGE_XKEYBOARD_CONFIG bool "xkeyboard-config" - select BR2_PACKAGE_XAPP_XKBCOMP + # Runtime dependencies + select BR2_PACKAGE_XAPP_XKBCOMP if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XPROTO_XPROTO if BR2_PACKAGE_XORG7 help keyboard configuration database for X diff --git a/package/x11r7/xkeyboard-config/xkeyboard-config.mk b/package/x11r7/xkeyboard-config/xkeyboard-config.mk index f5ad44d7fb..49540df8e6 100644 --- a/package/x11r7/xkeyboard-config/xkeyboard-config.mk +++ b/package/x11r7/xkeyboard-config/xkeyboard-config.mk @@ -1,17 +1,16 @@ -############################################################# +################################################################################ # # xkeyboard-config # -############################################################# -XKEYBOARD_CONFIG_VERSION = 2.0 +################################################################################ + +XKEYBOARD_CONFIG_VERSION = 2.6 XKEYBOARD_CONFIG_SOURCE = xkeyboard-config-$(XKEYBOARD_CONFIG_VERSION).tar.bz2 XKEYBOARD_CONFIG_SITE = http://www.x.org/releases/individual/data/xkeyboard-config/ -XKEYBOARD_CONFIG_AUTORECONF = NO -XKEYBOARD_CONFIG_INSTALL_STAGING = NO -XKEYBOARD_CONFIG_INSTALL_TARGET = YES -XKEYBOARD_CONFIG_DEPENDENCIES = host-intltool host-xapp_xkbcomp - -XKEYBOARD_CONFIG_CONF_OPT = GMSGFMT=/usr/bin/msgfmt +XKEYBOARD_CONFIG_LICENSE = MIT +XKEYBOARD_CONFIG_LICENSE_FILES = COPYING -$(eval $(call AUTOTARGETS,package/x11r7,xkeyboard-config)) +XKEYBOARD_CONFIG_DEPENDENCIES = host-gettext host-intltool host-xapp_xkbcomp +XKEYBOARD_CONFIG_CONF_OPT += --disable-runtime-deps +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libFS/xlib_libFS.mk b/package/x11r7/xlib_libFS/xlib_libFS.mk index e7a92e63a8..c8ca83ee06 100644 --- a/package/x11r7/xlib_libFS/xlib_libFS.mk +++ b/package/x11r7/xlib_libFS/xlib_libFS.mk @@ -1,15 +1,16 @@ ################################################################################ # -# xlib_libFS -- X.Org FS library +# xlib_libFS # ################################################################################ -XLIB_LIBFS_VERSION = 1.0.2 +XLIB_LIBFS_VERSION = 1.0.4 XLIB_LIBFS_SOURCE = libFS-$(XLIB_LIBFS_VERSION).tar.bz2 XLIB_LIBFS_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBFS_AUTORECONF = NO +XLIB_LIBFS_LICENSE = MIT +XLIB_LIBFS_LICENSE_FILES = COPYING XLIB_LIBFS_INSTALL_STAGING = YES XLIB_LIBFS_DEPENDENCIES = xlib_xtrans xproto_xproto xproto_fontsproto -XLIB_LIBFS_CONF_OPT = --disable-malloc0returnsnull --enable-shared --disable-static +XLIB_LIBFS_CONF_OPT = --disable-malloc0returnsnull -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libFS)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libICE/xlib_libICE.mk b/package/x11r7/xlib_libICE/xlib_libICE.mk index 99cb11b4ef..dd6814e4e3 100644 --- a/package/x11r7/xlib_libICE/xlib_libICE.mk +++ b/package/x11r7/xlib_libICE/xlib_libICE.mk @@ -1,15 +1,15 @@ ################################################################################ # -# xlib_libICE -- X.Org ICE library +# xlib_libICE # ################################################################################ -XLIB_LIBICE_VERSION = 1.0.6 +XLIB_LIBICE_VERSION = 1.0.8 XLIB_LIBICE_SOURCE = libICE-$(XLIB_LIBICE_VERSION).tar.bz2 XLIB_LIBICE_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBICE_AUTORECONF = NO +XLIB_LIBICE_LICENSE = MIT +XLIB_LIBICE_LICENSE_FILES = COPYING XLIB_LIBICE_INSTALL_STAGING = YES XLIB_LIBICE_DEPENDENCIES = xlib_xtrans xproto_xproto -XLIB_LIBICE_CONF_OPT = --enable-shared --disable-static -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libICE)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libSM/xlib_libSM.mk b/package/x11r7/xlib_libSM/xlib_libSM.mk index 5aeb42d355..ac3bd3774a 100644 --- a/package/x11r7/xlib_libSM/xlib_libSM.mk +++ b/package/x11r7/xlib_libSM/xlib_libSM.mk @@ -1,15 +1,16 @@ ################################################################################ # -# xlib_libSM -- X.Org SM library +# xlib_libSM # ################################################################################ -XLIB_LIBSM_VERSION = 1.1.1 +XLIB_LIBSM_VERSION = 1.2.1 XLIB_LIBSM_SOURCE = libSM-$(XLIB_LIBSM_VERSION).tar.bz2 XLIB_LIBSM_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBSM_AUTORECONF = NO +XLIB_LIBSM_LICENSE = MIT +XLIB_LIBSM_LICENSE_FILES = COPYING XLIB_LIBSM_INSTALL_STAGING = YES XLIB_LIBSM_DEPENDENCIES = xlib_libICE xlib_xtrans xproto_xproto -XLIB_LIBSM_CONF_OPT = --enable-shared --disable-static --without-libuuid +XLIB_LIBSM_CONF_OPT = --without-libuuid -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libSM)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libX11/Config.in b/package/x11r7/xlib_libX11/Config.in index e1189ff574..3ad8d00ae5 100644 --- a/package/x11r7/xlib_libX11/Config.in +++ b/package/x11r7/xlib_libX11/Config.in @@ -10,7 +10,5 @@ config BR2_PACKAGE_XLIB_LIBX11 select BR2_PACKAGE_XPROTO_XEXTPROTO select BR2_PACKAGE_XPROTO_INPUTPROTO select BR2_PACKAGE_XPROTO_XF86BIGFONTPROTO - select BR2_PACKAGE_XPROTO_BIGREQSPROTO - select BR2_PACKAGE_XPROTO_XCMISCPROTO help X.Org X11 library diff --git a/package/x11r7/xlib_libX11/xlib_libX11-1.3.2-keysymdef.patch b/package/x11r7/xlib_libX11/xlib_libX11-1.3.2-keysymdef.patch deleted file mode 100644 index 9c4eae2b30..0000000000 --- a/package/x11r7/xlib_libX11/xlib_libX11-1.3.2-keysymdef.patch +++ /dev/null @@ -1,35 +0,0 @@ -[patch]: configure: add --with-keysymdef argument for cross compilation - -Based on a similar patch from Openembedded. - -The libX11 configure script hardcodes the location to keysymdef.h as -/include/X11/keysymdef.h, which is fine for native compilation, -but breaks with cross compilation as that directory is a location on -the target, not the build host. - -Fix it by providing an explicit --with-keysymdef=. - -Signed-off-by: Peter Korsgaard Index: libX11-1.1.5/configure.ac -=================================================================== -Index: xlib_libX11-1.3.2/configure.ac -=================================================================== ---- xlib_libX11-1.3.2.orig/configure.ac 2009-10-23 22:55:03.000000000 +0200 -+++ xlib_libX11-1.3.2/configure.ac 2010-05-04 16:26:39.000000000 +0200 -@@ -280,8 +280,15 @@ - # Find keysymdef.h - # - AC_MSG_CHECKING([keysymdef.h]) --dir=`pkg-config --variable=includedir xproto` --KEYSYMDEF="$dir/X11/keysymdef.h" -+AC_ARG_WITH(keysymdef, -+ AC_HELP_STRING([--with-keysymdef=DIR/keysymdef.h], [The location of keysymdef.h]), -+ KEYSYMDEF=$withval, KEYSYMDEF="") -+ -+if test x$KEYSYMDEF = x; then -+ dir=`pkg-config --variable=includedir xproto` -+ KEYSYMDEF="$dir/X11/keysymdef.h" -+fi -+ - if test -f "$KEYSYMDEF"; then - AC_MSG_RESULT([$KEYSYMDEF]) - else diff --git a/package/x11r7/xlib_libX11/xlib_libX11.mk b/package/x11r7/xlib_libX11/xlib_libX11.mk index 1acc35c0e1..f8b19e43ac 100644 --- a/package/x11r7/xlib_libX11/xlib_libX11.mk +++ b/package/x11r7/xlib_libX11/xlib_libX11.mk @@ -1,42 +1,49 @@ ################################################################################ # -# xlib_libX11 -- X.Org X11 library +# xlib_libX11 # ################################################################################ -XLIB_LIBX11_VERSION = 1.3.2 +XLIB_LIBX11_VERSION = 1.5.0 XLIB_LIBX11_SOURCE = libX11-$(XLIB_LIBX11_VERSION).tar.bz2 XLIB_LIBX11_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBX11_AUTORECONF = YES +XLIB_LIBX11_LICENSE = MIT +XLIB_LIBX11_LICENSE_FILES = COPYING XLIB_LIBX11_INSTALL_STAGING = YES -XLIB_LIBX11_DEPENDENCIES = libxcb xutil_util-macros xlib_xtrans xlib_libXau xlib_libXdmcp xproto_kbproto xproto_xproto xproto_xextproto xproto_inputproto xproto_xf86bigfontproto xproto_bigreqsproto xproto_xcmiscproto host-xproto_xproto +XLIB_LIBX11_DEPENDENCIES = \ + libxcb \ + xutil_util-macros \ + xlib_xtrans \ + xlib_libXau \ + xlib_libXdmcp \ + xproto_kbproto \ + xproto_xproto \ + xproto_xextproto \ + xproto_inputproto \ + xproto_xf86bigfontproto \ + host-xproto_xproto + XLIB_LIBX11_CONF_OPT = \ --disable-malloc0returnsnull \ --with-xcb \ - --enable-shared \ - --disable-static \ - --with-keysymdef=$(STAGING_DIR)/usr/include/X11/keysymdef.h \ - --disable-specs + --disable-specs \ + --without-perl -HOST_XLIB_LIBX11_DEPENDENCIES = host-xproto_xextproto host-libxcb host-xutil_util-macros host-xlib_xtrans host-xlib_libXau host-xlib_libXdmcp host-xproto_kbproto host-xproto_xproto host-xproto_xextproto host-xproto_inputproto host-xproto_xf86bigfontproto xproto_bigreqsproto host-xproto_xcmiscproto +HOST_XLIB_LIBX11_CONF_OPT = \ + --disable-specs \ + --without-perl # src/util/makekeys is executed at build time to generate ks_tables.h, so # it should get compiled for the host. The libX11 makefile unfortunately -# doesn't know about cross compilation so this doesn't work. -# Long term, we should probably teach it about HOSTCC / HOST_CFLAGS, but for -# now simply disable the src/util Makefile and build makekeys by hand in -# advance -define XLIB_LIBX11_DISABLE_MAKEKEYS_BUILD - echo '' > $(@D)/src/util/Makefile.am -endef - -XLIB_LIBX11_POST_EXTRACT_HOOKS += XLIB_LIBX11_DISABLE_MAKEKEYS_BUILD - -define XLIB_LIBX11_BUILD_MAKEKEYS_FOR_HOST - cd $(@D)/src/util && $(HOSTCC) $(HOST_CFLAGS) -o makekeys makekeys.c +# doesn't have X11_CFLAGS_FOR_BUILD so this doesn't work. For buildroot, +# we know the X11 includes are in $(HOST_DIR)/usr/include, which are already +# in the CFLAGS_FOR_BUILD, so we can just remove the X11_CFLAGS +define XLIB_LIBX11_DISABLE_MAKEKEYS_X11_CFLAGS + $(SED) '/X11_CFLAGS/d' $(@D)/src/util/Makefile* endef -XLIB_LIBX11_POST_CONFIGURE_HOOKS += XLIB_LIBX11_BUILD_MAKEKEYS_FOR_HOST +XLIB_LIBX11_POST_PATCH_HOOKS += XLIB_LIBX11_DISABLE_MAKEKEYS_X11_CFLAGS +HOST_XLIB_LIBX11_POST_PATCH_HOOKS += XLIB_LIBX11_DISABLE_MAKEKEYS_X11_CFLAGS -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libX11)) -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libX11,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libXScrnSaver/xlib_libXScrnSaver.mk b/package/x11r7/xlib_libXScrnSaver/xlib_libXScrnSaver.mk index ee459488c7..2a648c9216 100644 --- a/package/x11r7/xlib_libXScrnSaver/xlib_libXScrnSaver.mk +++ b/package/x11r7/xlib_libXScrnSaver/xlib_libXScrnSaver.mk @@ -1,15 +1,16 @@ ################################################################################ # -# xlib_libXScrnSaver -- X.Org XScrnSaver library +# xlib_libXScrnSaver # ################################################################################ -XLIB_LIBXSCRNSAVER_VERSION = 1.2.0 +XLIB_LIBXSCRNSAVER_VERSION = 1.2.2 XLIB_LIBXSCRNSAVER_SOURCE = libXScrnSaver-$(XLIB_LIBXSCRNSAVER_VERSION).tar.bz2 XLIB_LIBXSCRNSAVER_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXSCRNSAVER_AUTORECONF = NO +XLIB_LIBXSCRNSAVER_LICENSE = MIT +XLIB_LIBXSCRNSAVER_LICENSE_FILES = COPYING XLIB_LIBXSCRNSAVER_INSTALL_STAGING = YES XLIB_LIBXSCRNSAVER_DEPENDENCIES = xlib_libX11 xlib_libXext xproto_scrnsaverproto -XLIB_LIBXSCRNSAVER_CONF_OPT = --disable-malloc0returnsnull --enable-shared --disable-static +XLIB_LIBXSCRNSAVER_CONF_OPT = --disable-malloc0returnsnull -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXScrnSaver)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXau/xlib_libXau.mk b/package/x11r7/xlib_libXau/xlib_libXau.mk index af4dde897b..83deb75242 100644 --- a/package/x11r7/xlib_libXau/xlib_libXau.mk +++ b/package/x11r7/xlib_libXau/xlib_libXau.mk @@ -1,19 +1,16 @@ ################################################################################ # -# xlib_libXau -- X.Org Xau library +# xlib_libXau # ################################################################################ -XLIB_LIBXAU_VERSION = 1.0.5 +XLIB_LIBXAU_VERSION = 1.0.7 XLIB_LIBXAU_SOURCE = libXau-$(XLIB_LIBXAU_VERSION).tar.bz2 XLIB_LIBXAU_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXAU_AUTORECONF = NO +XLIB_LIBXAU_LICENSE = MIT +XLIB_LIBXAU_LICENSE_FILES = COPYING XLIB_LIBXAU_INSTALL_STAGING = YES XLIB_LIBXAU_DEPENDENCIES = xutil_util-macros xproto_xproto -XLIB_LIBXAU_CONF_OPT = --enable-shared --disable-static -HOST_XLIB_LIBXAU_DEPENDENCIES = host-xutil_util-macros host-xproto_xproto -HOST_XLIB_LIBXAU_CONF_OPT = --enable-shared --disable-static - -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXau)) -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXau,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libXaw/Config.in b/package/x11r7/xlib_libXaw/Config.in index 1c10bc0476..3695bb679f 100644 --- a/package/x11r7/xlib_libXaw/Config.in +++ b/package/x11r7/xlib_libXaw/Config.in @@ -5,6 +5,5 @@ config BR2_PACKAGE_XLIB_LIBXAW select BR2_PACKAGE_XLIB_LIBXMU select BR2_PACKAGE_XLIB_LIBXPM select BR2_PACKAGE_XPROTO_XPROTO - select BR2_PACKAGE_XLIB_LIBXP help X.Org Xaw library diff --git a/package/x11r7/xlib_libXaw/xlib_libXaw.mk b/package/x11r7/xlib_libXaw/xlib_libXaw.mk index ac8c5f8282..fd4c5736da 100644 --- a/package/x11r7/xlib_libXaw/xlib_libXaw.mk +++ b/package/x11r7/xlib_libXaw/xlib_libXaw.mk @@ -1,14 +1,16 @@ ################################################################################ # -# xlib_libXaw -- X.Org Xaw library +# xlib_libXaw # ################################################################################ -XLIB_LIBXAW_VERSION = 1.0.7 +XLIB_LIBXAW_VERSION = 1.0.11 XLIB_LIBXAW_SOURCE = libXaw-$(XLIB_LIBXAW_VERSION).tar.bz2 XLIB_LIBXAW_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXAW_LICENSE = MIT +XLIB_LIBXAW_LICENSE_FILES = COPYING XLIB_LIBXAW_INSTALL_STAGING = YES -XLIB_LIBXAW_DEPENDENCIES = xlib_libX11 xlib_libXt xlib_libXmu xlib_libXpm xproto_xproto xlib_libXp -XLIB_LIBXAW_CONF_OPT = --enable-shared --disable-static --disable-docs +XLIB_LIBXAW_DEPENDENCIES = xlib_libX11 xlib_libXt xlib_libXmu xlib_libXpm xproto_xproto +XLIB_LIBXAW_CONF_OPT = --disable-docs -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXaw)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXcomposite/xlib_libXcomposite.mk b/package/x11r7/xlib_libXcomposite/xlib_libXcomposite.mk index 64b98d4af0..e097e3ca58 100644 --- a/package/x11r7/xlib_libXcomposite/xlib_libXcomposite.mk +++ b/package/x11r7/xlib_libXcomposite/xlib_libXcomposite.mk @@ -1,15 +1,15 @@ ################################################################################ # -# xlib_libXcomposite -- X.Org Xcomposite library +# xlib_libXcomposite # ################################################################################ -XLIB_LIBXCOMPOSITE_VERSION = 0.4.1 +XLIB_LIBXCOMPOSITE_VERSION = 0.4.3 XLIB_LIBXCOMPOSITE_SOURCE = libXcomposite-$(XLIB_LIBXCOMPOSITE_VERSION).tar.bz2 XLIB_LIBXCOMPOSITE_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXCOMPOSITE_AUTORECONF = NO +XLIB_LIBXCOMPOSITE_LICENSE = MIT +XLIB_LIBXCOMPOSITE_LICENSE_FILES = COPYING XLIB_LIBXCOMPOSITE_INSTALL_STAGING = YES XLIB_LIBXCOMPOSITE_DEPENDENCIES = xproto_compositeproto xlib_libX11 xlib_libXext xlib_libXfixes xproto_xproto -XLIB_LIBXCOMPOSITE_CONF_OPT = --enable-shared --disable-static -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXcomposite)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXcursor/xlib_libXcursor.mk b/package/x11r7/xlib_libXcursor/xlib_libXcursor.mk index abe823b1ec..37afa5d0a6 100644 --- a/package/x11r7/xlib_libXcursor/xlib_libXcursor.mk +++ b/package/x11r7/xlib_libXcursor/xlib_libXcursor.mk @@ -1,15 +1,16 @@ ################################################################################ # -# xlib_libXcursor -- X.Org Xcursor library +# xlib_libXcursor # ################################################################################ -XLIB_LIBXCURSOR_VERSION = 1.1.10 +XLIB_LIBXCURSOR_VERSION = 1.1.13 XLIB_LIBXCURSOR_SOURCE = libXcursor-$(XLIB_LIBXCURSOR_VERSION).tar.bz2 XLIB_LIBXCURSOR_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXCURSOR_AUTORECONF = NO +XLIB_LIBXCURSOR_LICENSE = MIT +XLIB_LIBXCURSOR_LICENSE_FILES = COPYING XLIB_LIBXCURSOR_INSTALL_STAGING = YES XLIB_LIBXCURSOR_DEPENDENCIES = xlib_libX11 xlib_libXfixes xlib_libXrender xproto_xproto -XLIB_LIBXCURSOR_CONF_OPT = --enable-shared --disable-static -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXcursor)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libXdamage/xlib_libXdamage.mk b/package/x11r7/xlib_libXdamage/xlib_libXdamage.mk index 92f92e5800..69014f511d 100644 --- a/package/x11r7/xlib_libXdamage/xlib_libXdamage.mk +++ b/package/x11r7/xlib_libXdamage/xlib_libXdamage.mk @@ -1,15 +1,15 @@ ################################################################################ # -# xlib_libXdamage -- X.Org Xdamage library +# xlib_libXdamage # ################################################################################ -XLIB_LIBXDAMAGE_VERSION = 1.1.2 +XLIB_LIBXDAMAGE_VERSION = 1.1.3 XLIB_LIBXDAMAGE_SOURCE = libXdamage-$(XLIB_LIBXDAMAGE_VERSION).tar.bz2 XLIB_LIBXDAMAGE_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXDAMAGE_AUTORECONF = NO +XLIB_LIBXDAMAGE_LICENSE = MIT +XLIB_LIBXDAMAGE_LICENSE_FILES = COPYING XLIB_LIBXDAMAGE_INSTALL_STAGING = YES XLIB_LIBXDAMAGE_DEPENDENCIES = xproto_damageproto xlib_libX11 xlib_libXfixes xproto_xproto -XLIB_LIBXDAMAGE_CONF_OPT = --enable-shared --disable-static -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXdamage)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXdmcp/xlib_libXdmcp.mk b/package/x11r7/xlib_libXdmcp/xlib_libXdmcp.mk index 1a11ea6601..866f10ba90 100644 --- a/package/x11r7/xlib_libXdmcp/xlib_libXdmcp.mk +++ b/package/x11r7/xlib_libXdmcp/xlib_libXdmcp.mk @@ -1,19 +1,16 @@ ################################################################################ # -# xlib_libXdmcp -- X.Org Xdmcp library +# xlib_libXdmcp # ################################################################################ -XLIB_LIBXDMCP_VERSION = 1.0.3 +XLIB_LIBXDMCP_VERSION = 1.1.1 XLIB_LIBXDMCP_SOURCE = libXdmcp-$(XLIB_LIBXDMCP_VERSION).tar.bz2 XLIB_LIBXDMCP_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXDMCP_AUTORECONF = NO +XLIB_LIBXDMCP_LICENSE = MIT +XLIB_LIBXDMCP_LICENSE_FILES = COPYING XLIB_LIBXDMCP_INSTALL_STAGING = YES XLIB_LIBXDMCP_DEPENDENCIES = xutil_util-macros xproto_xproto -XLIB_LIBXDMCP_CONF_OPT = --enable-shared --disable-static -HOST_XLIB_LIBXDMCP_DEPENDENCIES = host-xutil_util-macros host-xproto_xproto -HOST_XLIB_LIBXDMCP_CONF_OPT = --enable-shared --disable-static - -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXdmcp)) -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXdmcp,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libXext/xlib_libXext.mk b/package/x11r7/xlib_libXext/xlib_libXext.mk index 0db96267cd..3fc19e2154 100644 --- a/package/x11r7/xlib_libXext/xlib_libXext.mk +++ b/package/x11r7/xlib_libXext/xlib_libXext.mk @@ -1,15 +1,16 @@ ################################################################################ # -# xlib_libXext -- X.Org Xext library +# xlib_libXext # ################################################################################ -XLIB_LIBXEXT_VERSION = 1.1.1 +XLIB_LIBXEXT_VERSION = 1.3.1 XLIB_LIBXEXT_SOURCE = libXext-$(XLIB_LIBXEXT_VERSION).tar.bz2 XLIB_LIBXEXT_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXEXT_AUTORECONF = NO +XLIB_LIBXEXT_LICENSE = MIT +XLIB_LIBXEXT_LICENSE_FILES = COPYING XLIB_LIBXEXT_INSTALL_STAGING = YES XLIB_LIBXEXT_DEPENDENCIES = xlib_libX11 xproto_xextproto xproto_xproto -XLIB_LIBXEXT_CONF_OPT = --disable-malloc0returnsnull --enable-shared --disable-static +XLIB_LIBXEXT_CONF_OPT = --disable-malloc0returnsnull -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXext)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXfixes/xlib_libXfixes.mk b/package/x11r7/xlib_libXfixes/xlib_libXfixes.mk index f2fd1f8166..7e956a6a64 100644 --- a/package/x11r7/xlib_libXfixes/xlib_libXfixes.mk +++ b/package/x11r7/xlib_libXfixes/xlib_libXfixes.mk @@ -1,15 +1,16 @@ ################################################################################ # -# xlib_libXfixes -- X.Org Xfixes library +# xlib_libXfixes # ################################################################################ -XLIB_LIBXFIXES_VERSION = 4.0.4 +XLIB_LIBXFIXES_VERSION = 5.0 XLIB_LIBXFIXES_SOURCE = libXfixes-$(XLIB_LIBXFIXES_VERSION).tar.bz2 XLIB_LIBXFIXES_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXFIXES_AUTORECONF = NO +XLIB_LIBXFIXES_LICENSE = MIT +XLIB_LIBXFIXES_LICENSE_FILES = COPYING XLIB_LIBXFIXES_INSTALL_STAGING = YES XLIB_LIBXFIXES_DEPENDENCIES = xproto_fixesproto xlib_libX11 xproto_xextproto xproto_xproto -XLIB_LIBXFIXES_CONF_OPT = --enable-shared --disable-static -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXfixes)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libXfont/Config.in b/package/x11r7/xlib_libXfont/Config.in index 407a0992af..cc1da0ea39 100644 --- a/package/x11r7/xlib_libXfont/Config.in +++ b/package/x11r7/xlib_libXfont/Config.in @@ -3,7 +3,6 @@ config BR2_PACKAGE_XLIB_LIBXFONT select BR2_PACKAGE_FREETYPE select BR2_PACKAGE_XLIB_LIBFONTENC select BR2_PACKAGE_XLIB_XTRANS - select BR2_PACKAGE_XPROTO_FONTCACHEPROTO select BR2_PACKAGE_XPROTO_FONTSPROTO select BR2_PACKAGE_XPROTO_XPROTO select BR2_PACKAGE_XFONT_ENCODINGS diff --git a/package/x11r7/xlib_libXfont/xlib_libXfont.mk b/package/x11r7/xlib_libXfont/xlib_libXfont.mk index 3cb52c3b0d..cf27aad221 100644 --- a/package/x11r7/xlib_libXfont/xlib_libXfont.mk +++ b/package/x11r7/xlib_libXfont/xlib_libXfont.mk @@ -1,18 +1,20 @@ ################################################################################ # -# xlib_libXfont -- X.Org Xfont library +# xlib_libXfont # ################################################################################ -XLIB_LIBXFONT_VERSION = 1.4.1 +XLIB_LIBXFONT_VERSION = 1.4.5 XLIB_LIBXFONT_SOURCE = libXfont-$(XLIB_LIBXFONT_VERSION).tar.bz2 XLIB_LIBXFONT_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXFONT_LICENSE = MIT +XLIB_LIBXFONT_LICENSE_FILES = COPYING XLIB_LIBXFONT_AUTORECONF = YES XLIB_LIBXFONT_INSTALL_STAGING = YES -XLIB_LIBXFONT_DEPENDENCIES = freetype xlib_libfontenc xlib_xtrans xproto_fontcacheproto xproto_fontsproto xproto_xproto xfont_encodings -XLIB_LIBXFONT_CONF_OPT = --enable-shared --disable-static --disable-devel-docs +XLIB_LIBXFONT_DEPENDENCIES = freetype xlib_libfontenc xlib_xtrans xproto_fontsproto xproto_xproto xfont_encodings +XLIB_LIBXFONT_CONF_OPT = --disable-devel-docs -HOST_XLIB_LIBXFONT_DEPENDENCIES = host-freetype host-xlib_libfontenc host-xlib_xtrans host-xproto_fontcacheproto host-xproto_fontsproto host-xproto_xproto host-xfont_encodings +HOST_XLIB_LIBXFONT_CONF_OPT = --disable-devel-docs -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXfont)) -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXfont,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libXfontcache/Config.in b/package/x11r7/xlib_libXfontcache/Config.in deleted file mode 100644 index 3a20451143..0000000000 --- a/package/x11r7/xlib_libXfontcache/Config.in +++ /dev/null @@ -1,7 +0,0 @@ -config BR2_PACKAGE_XLIB_LIBXFONTCACHE - bool "libXfontcache" - select BR2_PACKAGE_XLIB_LIBX11 - select BR2_PACKAGE_XLIB_LIBXEXT - select BR2_PACKAGE_XPROTO_FONTCACHEPROTO - help - X.Org Xfontcache library diff --git a/package/x11r7/xlib_libXfontcache/xlib_libXfontcache.mk b/package/x11r7/xlib_libXfontcache/xlib_libXfontcache.mk deleted file mode 100644 index a0d924bfec..0000000000 --- a/package/x11r7/xlib_libXfontcache/xlib_libXfontcache.mk +++ /dev/null @@ -1,15 +0,0 @@ -################################################################################ -# -# xlib_libXfontcache -- X.Org Xfontcache library -# -################################################################################ - -XLIB_LIBXFONTCACHE_VERSION = 1.0.5 -XLIB_LIBXFONTCACHE_SOURCE = libXfontcache-$(XLIB_LIBXFONTCACHE_VERSION).tar.bz2 -XLIB_LIBXFONTCACHE_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXFONTCACHE_AUTORECONF = NO -XLIB_LIBXFONTCACHE_INSTALL_STAGING = YES -XLIB_LIBXFONTCACHE_DEPENDENCIES = xlib_libX11 xlib_libXext xproto_fontcacheproto -XLIB_LIBXFONTCACHE_CONF_OPT = --disable-malloc0returnsnull --enable-shared --disable-static - -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXfontcache)) diff --git a/package/x11r7/xlib_libXft/xlib_libXft.mk b/package/x11r7/xlib_libXft/xlib_libXft.mk index eaef1ba558..37f4434072 100644 --- a/package/x11r7/xlib_libXft/xlib_libXft.mk +++ b/package/x11r7/xlib_libXft/xlib_libXft.mk @@ -1,15 +1,16 @@ ################################################################################ # -# xlib_libXft -- X.Org Xft library +# xlib_libXft # ################################################################################ -XLIB_LIBXFT_VERSION = 2.1.14 +XLIB_LIBXFT_VERSION = 2.3.1 XLIB_LIBXFT_SOURCE = libXft-$(XLIB_LIBXFT_VERSION).tar.bz2 XLIB_LIBXFT_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXFT_LICENSE = MIT +XLIB_LIBXFT_LICENSE_FILES = COPYING XLIB_LIBXFT_AUTORECONF = YES XLIB_LIBXFT_INSTALL_STAGING = YES XLIB_LIBXFT_DEPENDENCIES = fontconfig freetype xlib_libX11 xlib_libXext xlib_libXrender xproto_xproto -XLIB_LIBXFT_CONF_OPT = --enable-shared --disable-static -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXft)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXi/xlib_libXi.mk b/package/x11r7/xlib_libXi/xlib_libXi.mk index c1da9c67e7..cac3787b7a 100644 --- a/package/x11r7/xlib_libXi/xlib_libXi.mk +++ b/package/x11r7/xlib_libXi/xlib_libXi.mk @@ -1,15 +1,16 @@ ################################################################################ # -# xlib_libXi -- X.Org Xi library +# xlib_libXi # ################################################################################ -XLIB_LIBXI_VERSION = 1.3 +XLIB_LIBXI_VERSION = 1.6.1 XLIB_LIBXI_SOURCE = libXi-$(XLIB_LIBXI_VERSION).tar.bz2 XLIB_LIBXI_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXI_AUTORECONF = NO +XLIB_LIBXI_LICENSE = MIT +XLIB_LIBXI_LICENSE_FILES = COPYING XLIB_LIBXI_INSTALL_STAGING = YES XLIB_LIBXI_DEPENDENCIES = xproto_inputproto xlib_libX11 xlib_libXext xproto_xproto -XLIB_LIBXI_CONF_OPT = --disable-malloc0returnsnull --enable-shared --disable-static +XLIB_LIBXI_CONF_OPT = --disable-malloc0returnsnull -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXi)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXinerama/xlib_libXinerama.mk b/package/x11r7/xlib_libXinerama/xlib_libXinerama.mk index 4c43e79e76..ce660ed098 100644 --- a/package/x11r7/xlib_libXinerama/xlib_libXinerama.mk +++ b/package/x11r7/xlib_libXinerama/xlib_libXinerama.mk @@ -1,15 +1,16 @@ ################################################################################ # -# xlib_libXinerama -- X.Org Xinerama library +# xlib_libXinerama # ################################################################################ -XLIB_LIBXINERAMA_VERSION = 1.1 +XLIB_LIBXINERAMA_VERSION = 1.1.2 XLIB_LIBXINERAMA_SOURCE = libXinerama-$(XLIB_LIBXINERAMA_VERSION).tar.bz2 XLIB_LIBXINERAMA_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXINERAMA_AUTORECONF = NO +XLIB_LIBXINERAMA_LICENSE = MIT +XLIB_LIBXINERAMA_LICENSE_FILES = COPYING XLIB_LIBXINERAMA_INSTALL_STAGING = YES XLIB_LIBXINERAMA_DEPENDENCIES = xlib_libX11 xlib_libXext xproto_xineramaproto -XLIB_LIBXINERAMA_CONF_OPT = --disable-malloc0returnsnull --enable-shared --disable-static +XLIB_LIBXINERAMA_CONF_OPT = --disable-malloc0returnsnull -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXinerama)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXmu/xlib_libXmu.mk b/package/x11r7/xlib_libXmu/xlib_libXmu.mk index 8ad72800a1..eda4151e48 100644 --- a/package/x11r7/xlib_libXmu/xlib_libXmu.mk +++ b/package/x11r7/xlib_libXmu/xlib_libXmu.mk @@ -1,15 +1,15 @@ ################################################################################ # -# xlib_libXmu -- X.Org Xmu library +# xlib_libXmu # ################################################################################ -XLIB_LIBXMU_VERSION = 1.0.5 +XLIB_LIBXMU_VERSION = 1.1.1 XLIB_LIBXMU_SOURCE = libXmu-$(XLIB_LIBXMU_VERSION).tar.bz2 XLIB_LIBXMU_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXMU_AUTORECONF = NO +XLIB_LIBXMU_LICENSE = MIT +XLIB_LIBXMU_LICENSE_FILES = COPYING XLIB_LIBXMU_INSTALL_STAGING = YES XLIB_LIBXMU_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXt xproto_xproto -XLIB_LIBXMU_CONF_OPT = --enable-shared --disable-static -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXmu)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXp/Config.in b/package/x11r7/xlib_libXp/Config.in deleted file mode 100644 index 532d8ac739..0000000000 --- a/package/x11r7/xlib_libXp/Config.in +++ /dev/null @@ -1,8 +0,0 @@ -config BR2_PACKAGE_XLIB_LIBXP - bool "libXp" - select BR2_PACKAGE_XLIB_LIBX11 - select BR2_PACKAGE_XLIB_LIBXAU - select BR2_PACKAGE_XLIB_LIBXEXT - select BR2_PACKAGE_XPROTO_PRINTPROTO - help - X.Org Xp library diff --git a/package/x11r7/xlib_libXp/xlib_libXp.mk b/package/x11r7/xlib_libXp/xlib_libXp.mk deleted file mode 100644 index c462eee4b8..0000000000 --- a/package/x11r7/xlib_libXp/xlib_libXp.mk +++ /dev/null @@ -1,15 +0,0 @@ -################################################################################ -# -# xlib_libXp -- X.Org Xp library -# -################################################################################ - -XLIB_LIBXP_VERSION = 1.0.0 -XLIB_LIBXP_SOURCE = libXp-$(XLIB_LIBXP_VERSION).tar.bz2 -XLIB_LIBXP_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXP_AUTORECONF = NO -XLIB_LIBXP_INSTALL_STAGING = YES -XLIB_LIBXP_DEPENDENCIES = xlib_libX11 xlib_libXau xlib_libXext xproto_printproto -XLIB_LIBXP_CONF_OPT = --disable-malloc0returnsnull --enable-shared --disable-static - -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXp)) diff --git a/package/x11r7/xlib_libXpm/xlib_libXpm.mk b/package/x11r7/xlib_libXpm/xlib_libXpm.mk index 00180b45a9..e0b4f2f7bf 100644 --- a/package/x11r7/xlib_libXpm/xlib_libXpm.mk +++ b/package/x11r7/xlib_libXpm/xlib_libXpm.mk @@ -1,15 +1,16 @@ ################################################################################ # -# xlib_libXpm -- X.Org Xpm library +# xlib_libXpm # ################################################################################ -XLIB_LIBXPM_VERSION = 3.5.8 +XLIB_LIBXPM_VERSION = 3.5.10 XLIB_LIBXPM_SOURCE = libXpm-$(XLIB_LIBXPM_VERSION).tar.bz2 XLIB_LIBXPM_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXPM_AUTORECONF = NO +XLIB_LIBXPM_LICENSE = MIT +XLIB_LIBXPM_LICENSE_FILES = COPYING XLIB_LIBXPM_INSTALL_STAGING = YES -XLIB_LIBXPM_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXt xproto_xproto -XLIB_LIBXPM_CONF_OPT = --enable-shared --disable-static +XLIB_LIBXPM_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXt xproto_xproto \ + host-gettext -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXpm)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXprintAppUtil/Config.in b/package/x11r7/xlib_libXprintAppUtil/Config.in deleted file mode 100644 index 351675ab34..0000000000 --- a/package/x11r7/xlib_libXprintAppUtil/Config.in +++ /dev/null @@ -1,7 +0,0 @@ -config BR2_PACKAGE_XLIB_LIBXPRINTAPPUTIL - bool "libXprintAppUtil" - select BR2_PACKAGE_XLIB_LIBX11 - select BR2_PACKAGE_XLIB_LIBXP - select BR2_PACKAGE_XLIB_LIBXPRINTUTIL - help - X.Org XprintAppUtil library diff --git a/package/x11r7/xlib_libXprintAppUtil/xlib_libXprintAppUtil.mk b/package/x11r7/xlib_libXprintAppUtil/xlib_libXprintAppUtil.mk deleted file mode 100644 index c3d2b989b3..0000000000 --- a/package/x11r7/xlib_libXprintAppUtil/xlib_libXprintAppUtil.mk +++ /dev/null @@ -1,15 +0,0 @@ -################################################################################ -# -# xlib_libXprintAppUtil -- X.Org XprintAppUtil library -# -################################################################################ - -XLIB_LIBXPRINTAPPUTIL_VERSION = 1.0.1 -XLIB_LIBXPRINTAPPUTIL_SOURCE = libXprintAppUtil-$(XLIB_LIBXPRINTAPPUTIL_VERSION).tar.bz2 -XLIB_LIBXPRINTAPPUTIL_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXPRINTAPPUTIL_AUTORECONF = NO -XLIB_LIBXPRINTAPPUTIL_INSTALL_STAGING = YES -XLIB_LIBXPRINTAPPUTIL_DEPENDENCIES = xlib_libX11 xlib_libXp xlib_libXprintUtil -XLIB_LIBXPRINTAPPUTIL_CONF_OPT = --enable-shared --disable-static - -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXprintAppUtil)) diff --git a/package/x11r7/xlib_libXprintUtil/Config.in b/package/x11r7/xlib_libXprintUtil/Config.in deleted file mode 100644 index 1f397f4788..0000000000 --- a/package/x11r7/xlib_libXprintUtil/Config.in +++ /dev/null @@ -1,8 +0,0 @@ -config BR2_PACKAGE_XLIB_LIBXPRINTUTIL - bool "libXprintUtil" - select BR2_PACKAGE_XLIB_LIBX11 - select BR2_PACKAGE_XLIB_LIBXP - select BR2_PACKAGE_XLIB_LIBXT - select BR2_PACKAGE_XPROTO_PRINTPROTO - help - X.Org XprintUtil library diff --git a/package/x11r7/xlib_libXprintUtil/xlib_libXprintUtil.mk b/package/x11r7/xlib_libXprintUtil/xlib_libXprintUtil.mk deleted file mode 100644 index 9df0153b08..0000000000 --- a/package/x11r7/xlib_libXprintUtil/xlib_libXprintUtil.mk +++ /dev/null @@ -1,15 +0,0 @@ -################################################################################ -# -# xlib_libXprintUtil -- X.Org XprintUtil library -# -################################################################################ - -XLIB_LIBXPRINTUTIL_VERSION = 1.0.1 -XLIB_LIBXPRINTUTIL_SOURCE = libXprintUtil-$(XLIB_LIBXPRINTUTIL_VERSION).tar.bz2 -XLIB_LIBXPRINTUTIL_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXPRINTUTIL_AUTORECONF = NO -XLIB_LIBXPRINTUTIL_INSTALL_STAGING = YES -XLIB_LIBXPRINTUTIL_DEPENDENCIES = xlib_libX11 xlib_libXp xlib_libXt xproto_printproto -XLIB_LIBXPRINTUTIL_CONF_OPT = --enable-shared --disable-static - -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXprintUtil)) diff --git a/package/x11r7/xlib_libXrandr/xlib_libXrandr.mk b/package/x11r7/xlib_libXrandr/xlib_libXrandr.mk index 08fbaa4ad0..7986611554 100644 --- a/package/x11r7/xlib_libXrandr/xlib_libXrandr.mk +++ b/package/x11r7/xlib_libXrandr/xlib_libXrandr.mk @@ -1,15 +1,16 @@ ################################################################################ # -# xlib_libXrandr -- X.Org Xrandr library +# xlib_libXrandr # ################################################################################ -XLIB_LIBXRANDR_VERSION = 1.3.0 +XLIB_LIBXRANDR_VERSION = 1.3.2 XLIB_LIBXRANDR_SOURCE = libXrandr-$(XLIB_LIBXRANDR_VERSION).tar.bz2 XLIB_LIBXRANDR_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXRANDR_AUTORECONF = NO +XLIB_LIBXRANDR_LICENSE = MIT +XLIB_LIBXRANDR_LICENSE_FILES = COPYING XLIB_LIBXRANDR_INSTALL_STAGING = YES XLIB_LIBXRANDR_DEPENDENCIES = xproto_randrproto xlib_libX11 xlib_libXext xlib_libXrender xproto_renderproto xproto_xproto -XLIB_LIBXRANDR_CONF_OPT = --disable-malloc0returnsnull --enable-shared --disable-static +XLIB_LIBXRANDR_CONF_OPT = --disable-malloc0returnsnull -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXrandr)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXrender/xlib_libXrender.mk b/package/x11r7/xlib_libXrender/xlib_libXrender.mk index fe5acf3174..4515b82d92 100644 --- a/package/x11r7/xlib_libXrender/xlib_libXrender.mk +++ b/package/x11r7/xlib_libXrender/xlib_libXrender.mk @@ -1,15 +1,17 @@ ################################################################################ # -# xlib_libXrender -- X.Org Xrender library +# xlib_libXrender # ################################################################################ -XLIB_LIBXRENDER_VERSION = 0.9.5 +XLIB_LIBXRENDER_VERSION = 0.9.7 XLIB_LIBXRENDER_SOURCE = libXrender-$(XLIB_LIBXRENDER_VERSION).tar.bz2 XLIB_LIBXRENDER_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXRENDER_AUTORECONF = NO +XLIB_LIBXRENDER_LICENSE = MIT +XLIB_LIBXRENDER_LICENSE_FILES = COPYING XLIB_LIBXRENDER_INSTALL_STAGING = YES XLIB_LIBXRENDER_DEPENDENCIES = xlib_libX11 xproto_renderproto xproto_xproto -XLIB_LIBXRENDER_CONF_OPT = --disable-malloc0returnsnull --enable-shared --disable-static +XLIB_LIBXRENDER_CONF_OPT = --disable-malloc0returnsnull -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXrender)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libXres/xlib_libXres.mk b/package/x11r7/xlib_libXres/xlib_libXres.mk index 155cbfbe64..8d5b79b0de 100644 --- a/package/x11r7/xlib_libXres/xlib_libXres.mk +++ b/package/x11r7/xlib_libXres/xlib_libXres.mk @@ -1,15 +1,16 @@ ################################################################################ # -# xlib_libXres -- X.Org XRes library +# xlib_libXres # ################################################################################ -XLIB_LIBXRES_VERSION = 1.0.4 +XLIB_LIBXRES_VERSION = 1.0.6 XLIB_LIBXRES_SOURCE = libXres-$(XLIB_LIBXRES_VERSION).tar.bz2 XLIB_LIBXRES_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXRES_AUTORECONF = NO +XLIB_LIBXRES_LICENSE = MIT +XLIB_LIBXRES_LICENSE_FILES = COPYING XLIB_LIBXRES_INSTALL_STAGING = YES XLIB_LIBXRES_DEPENDENCIES = xlib_libX11 xlib_libXext xproto_resourceproto xproto_xproto -XLIB_LIBXRES_CONF_OPT = --disable-malloc0returnsnull --enable-shared --disable-static +XLIB_LIBXRES_CONF_OPT = --disable-malloc0returnsnull -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXres)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXt/xlib_libXt-0001-util-don-t-link-makestrs-with-target-cflags.patch b/package/x11r7/xlib_libXt/xlib_libXt-0001-util-don-t-link-makestrs-with-target-cflags.patch new file mode 100644 index 0000000000..692d03b31f --- /dev/null +++ b/package/x11r7/xlib_libXt/xlib_libXt-0001-util-don-t-link-makestrs-with-target-cflags.patch @@ -0,0 +1,50 @@ +From 3f064076c783914cafdff028db303681dae4291d Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 15 Nov 2012 18:31:53 +0100 +Subject: [PATCH] libXt: util: don't link makestrs with target cflags + +The line: + +AM_CFLAGS = $(XT_CFLAGS) + +in util/Makefile.am is wrong because it adds target cflags to the +compilation of makestrs, which is built for the build machine, which +leads to build failures when cross-compiling. + +We also remove the inclusion of from makestrs.c, because +it was the only non-standard header being included (and therefore +possibly requiring special cflags), but it was in reality not useful +at all to build makestrs.c. + +Signed-off-by: Thomas Petazzoni +--- + util/Makefile.am | 1 - + util/makestrs.c | 1 - + 2 files changed, 2 deletions(-) + +diff --git a/util/Makefile.am b/util/Makefile.am +index dedfa6b..cc6f3fc 100644 +--- a/util/Makefile.am ++++ b/util/Makefile.am +@@ -10,7 +10,6 @@ EXTRA_DIST = \ + StrDefs.ht \ + string.list + +-AM_CFLAGS = $(XT_CFLAGS) + makestrs_SOURCES = makestrs.c + + +diff --git a/util/makestrs.c b/util/makestrs.c +index a52866a..00c861f 100644 +--- a/util/makestrs.c ++++ b/util/makestrs.c +@@ -27,7 +27,6 @@ in this Software without prior written authorization from The Open Group. + /* Constructs string definitions */ + + #include +-#include + #include + #include + +-- +1.7.9.5 diff --git a/package/x11r7/xlib_libXt/xlib_libXt-1.0.7-fix-cross-compile.patch b/package/x11r7/xlib_libXt/xlib_libXt-1.0.7-fix-cross-compile.patch deleted file mode 100644 index fc5ea7d757..0000000000 --- a/package/x11r7/xlib_libXt/xlib_libXt-1.0.7-fix-cross-compile.patch +++ /dev/null @@ -1,96 +0,0 @@ -From da5ba611fbff6f939a7cec9ca41fa7df0f76a197 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?R=C3=A9mi=20Cardona?= -Date: Thu, 5 Nov 2009 11:55:22 +0100 -Subject: [PATCH] fix cross-compile again -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -makestrs should always be built for the target arch. When cross-compiling, -create a native version "xmakestrs" which will always be noinst, and use it -to generate the other sources. - -This avoids installing a makestrs built for the wrong arch. - -Based on this patch : -http://overlays.gentoo.org/proj/embedded/browser/openmoko/trunk/openmoko-target/x11-libs/libXt/files/libXt-1.0.7-crosscompile-makestr.patch - -Signed-off-by: Rémi Cardona ---- - configure.ac | 2 ++ - src/Makefile.am | 8 +++++++- - util/Makefile.am | 15 ++++++++++----- - 3 files changed, 19 insertions(+), 6 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 6a66d45..73bfbc0 100755 ---- a/configure.ac -+++ b/configure.ac -@@ -40,6 +40,8 @@ AC_PROG_LIBTOOL - AM_PROG_CC_C_O - XORG_DEFAULT_OPTIONS - -+AM_CONDITIONAL(CROSS_COMPILING, [ test $cross_compiling = yes ]) -+ - if test x"$CC_FOR_BUILD" = x; then - if test x"$cross_compiling" = xyes; then - AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc) -diff --git a/src/Makefile.am b/src/Makefile.am -index a43fb22..6b767a7 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -92,12 +92,18 @@ BUILT_FILES = $(BUILT_SOURCE) $(BUILT_HEADER) - - STRING_LIST = $(top_srcdir)/util/string.list - -+if CROSS_COMPILING -+MAKESTRS=$(top_builddir)/util/xmakestrs -+else -+MAKESTRS=$(top_builddir)/util/makestrs -+endif -+ - all-local: $(BUILT_FILES) - - $(BUILT_HEADER): $(BUILT_SOURCE) - - $(BUILT_SOURCE): -- $(top_builddir)/util/makestrs -i $(top_srcdir) $(STRINGSABIOPTIONS) < $(STRING_LIST) > StringDefs.c -+ $(MAKESTRS) -i $(top_srcdir) $(STRINGSABIOPTIONS) < $(STRING_LIST) > StringDefs.c - mkdir -p $(top_builddir)/src - mkdir -p $(top_builddir)/include/X11 - cp StringDefs.h $(top_builddir)/include/X11 -diff --git a/util/Makefile.am b/util/Makefile.am -index d51365e..6853d89 100644 ---- a/util/Makefile.am -+++ b/util/Makefile.am -@@ -1,13 +1,10 @@ - if INSTALL_MAKESTRS - bin_PROGRAMS = makestrs -+noinst_PROGRAMS = $(MAKESTRS_PROG) - else --noinst_PROGRAMS = makestrs -+noinst_PROGRAMS = makestrs $(MAKESTRS_PROG) - endif - --CC = @CC_FOR_BUILD@ --CFLAGS = @CFLAGS_FOR_BUILD@ --LDFLAGS = @LDFLAGS_FOR_BUILD@ -- - EXTRA_DIST = \ - Shell.ht \ - StrDefs.ct \ -@@ -45,3 +42,11 @@ SUFFIXES = .$(APP_MAN_SUFFIX) .man - - .man.$(APP_MAN_SUFFIX): - $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ -+ -+if CROSS_COMPILING -+MAKESTRS_PROG=xmakestrs$(EXEEXT) -+ -+xmakestrs$(EXEEXT): makestrs.c -+ $(AM_V_GEN)$(CC_FOR_BUILD) $(X11_CFLAGS) $(CPPFLAGS_FOR_BUILD) \ -+ $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ makestrs.c -+endif --- -1.6.5.2 - diff --git a/package/x11r7/xlib_libXt/xlib_libXt.mk b/package/x11r7/xlib_libXt/xlib_libXt.mk index c1cdb15160..f186df054f 100644 --- a/package/x11r7/xlib_libXt/xlib_libXt.mk +++ b/package/x11r7/xlib_libXt/xlib_libXt.mk @@ -1,15 +1,17 @@ ################################################################################ # -# xlib_libXt -- X.Org Xt library +# xlib_libXt # ################################################################################ -XLIB_LIBXT_VERSION = 1.0.7 +XLIB_LIBXT_VERSION = 1.1.3 XLIB_LIBXT_SOURCE = libXt-$(XLIB_LIBXT_VERSION).tar.bz2 XLIB_LIBXT_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXT_AUTORECONF = YES +XLIB_LIBXT_LICENSE = MIT +XLIB_LIBXT_LICENSE_FILES = COPYING XLIB_LIBXT_INSTALL_STAGING = YES XLIB_LIBXT_DEPENDENCIES = xlib_libSM xlib_libX11 xproto_kbproto xproto_xproto xcb-proto libxcb host-xproto_xproto -XLIB_LIBXT_CONF_OPT = --disable-malloc0returnsnull --enable-shared --disable-static --disable-install-makestrs +XLIB_LIBXT_CONF_OPT = --disable-malloc0returnsnull --disable-install-makestrs +XLIB_LIBXT_AUTORECONF = YES -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXt)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXtst/xlib_libXtst.mk b/package/x11r7/xlib_libXtst/xlib_libXtst.mk index 935d034ef3..46d58e2327 100644 --- a/package/x11r7/xlib_libXtst/xlib_libXtst.mk +++ b/package/x11r7/xlib_libXtst/xlib_libXtst.mk @@ -1,12 +1,14 @@ ################################################################################ # -# xlib_libXtst -- X.Org Xtst library +# xlib_libXtst # ################################################################################ -XLIB_LIBXTST_VERSION = 1.1.0 +XLIB_LIBXTST_VERSION = 1.2.1 XLIB_LIBXTST_SOURCE = libXtst-$(XLIB_LIBXTST_VERSION).tar.bz2 XLIB_LIBXTST_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXTST_LICENSE = MIT +XLIB_LIBXTST_LICENSE_FILES = COPYING XLIB_LIBXTST_INSTALL_STAGING = YES XLIB_LIBXTST_DEPENDENCIES = \ @@ -15,6 +17,4 @@ XLIB_LIBXTST_DEPENDENCIES = \ xlib_libXi \ xproto_recordproto -XLIB_LIBXTST_CONF_OPT = --enable-shared --disable-static - -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXtst)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXv/xlib_libXv.mk b/package/x11r7/xlib_libXv/xlib_libXv.mk index df47f797c8..8bf06c538d 100644 --- a/package/x11r7/xlib_libXv/xlib_libXv.mk +++ b/package/x11r7/xlib_libXv/xlib_libXv.mk @@ -1,15 +1,16 @@ ################################################################################ # -# xlib_libXv -- X.Org Xv library +# xlib_libXv # ################################################################################ -XLIB_LIBXV_VERSION = 1.0.5 +XLIB_LIBXV_VERSION = 1.0.7 XLIB_LIBXV_SOURCE = libXv-$(XLIB_LIBXV_VERSION).tar.bz2 XLIB_LIBXV_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXV_AUTORECONF = NO +XLIB_LIBXV_LICENSE = MIT +XLIB_LIBXV_LICENSE_FILES = COPYING XLIB_LIBXV_INSTALL_STAGING = YES XLIB_LIBXV_DEPENDENCIES = xlib_libX11 xlib_libXext xproto_videoproto xproto_xproto -XLIB_LIBXV_CONF_OPT = --disable-malloc0returnsnull --enable-shared --disable-static +XLIB_LIBXV_CONF_OPT = --disable-malloc0returnsnull -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXv)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXvMC/xlib_libXvMC.mk b/package/x11r7/xlib_libXvMC/xlib_libXvMC.mk index aaa87a771f..2be5840e53 100644 --- a/package/x11r7/xlib_libXvMC/xlib_libXvMC.mk +++ b/package/x11r7/xlib_libXvMC/xlib_libXvMC.mk @@ -1,15 +1,16 @@ ################################################################################ # -# xlib_libXvMC -- X.Org XvMC library +# xlib_libXvMC # ################################################################################ -XLIB_LIBXVMC_VERSION = 1.0.5 +XLIB_LIBXVMC_VERSION = 1.0.7 XLIB_LIBXVMC_SOURCE = libXvMC-$(XLIB_LIBXVMC_VERSION).tar.bz2 XLIB_LIBXVMC_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXVMC_AUTORECONF = NO +XLIB_LIBXVMC_LICENSE = MIT +XLIB_LIBXVMC_LICENSE_FILES = COPYING XLIB_LIBXVMC_INSTALL_STAGING = YES XLIB_LIBXVMC_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXv xproto_videoproto xproto_xproto -XLIB_LIBXVMC_CONF_OPT = --disable-malloc0returnsnull --enable-shared --disable-static +XLIB_LIBXVMC_CONF_OPT = --disable-malloc0returnsnull -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXvMC)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXxf86dga/xlib_libXxf86dga-0001-fix-compilation.patch b/package/x11r7/xlib_libXxf86dga/xlib_libXxf86dga-0001-fix-compilation.patch new file mode 100644 index 0000000000..23ab1179ff --- /dev/null +++ b/package/x11r7/xlib_libXxf86dga/xlib_libXxf86dga-0001-fix-compilation.patch @@ -0,0 +1,27 @@ +Backported from d4f89f7f42484963575b4c7d2fa694051e111e76 + +Signed-off-by: Jesper Baekdahl +--- +From d4f89f7f42484963575b4c7d2fa694051e111e76 Mon Sep 17 00:00:00 2001 +From: Jeremy Huddleston +Date: Fri, 09 Mar 2012 10:48:14 +0000 +Subject: Include for uintptr_t + +Found-by: Tinderbox + +Signed-off-by: Jeremy Huddleston +--- +diff --git a/src/XF86DGA2.c b/src/XF86DGA2.c +index 32f455b..964de18 100644 +--- a/src/XF86DGA2.c ++++ b/src/XF86DGA2.c +@@ -21,6 +21,7 @@ Copyright (c) 1995,1996 The XFree86 Project, Inc + #include + #include + ++#include + + /* If you change this, change the Bases[] array below as well */ + #define MAX_HEADS 16 +-- +cgit v0.9.0.2-2-gbebe diff --git a/package/x11r7/xlib_libXxf86dga/xlib_libXxf86dga-0002-fix-compilation.patch b/package/x11r7/xlib_libXxf86dga/xlib_libXxf86dga-0002-fix-compilation.patch new file mode 100644 index 0000000000..f586e2eae9 --- /dev/null +++ b/package/x11r7/xlib_libXxf86dga/xlib_libXxf86dga-0002-fix-compilation.patch @@ -0,0 +1,28 @@ +Backported from 56b5a5887349e9d0e1d28da157fe6441ca691f56 + +Signed-off-by: Jesper Baekdahl +--- +From 56b5a5887349e9d0e1d28da157fe6441ca691f56 Mon Sep 17 00:00:00 2001 +From: Jeremy Huddleston +Date: Thu, 08 Mar 2012 19:49:36 +0000 +Subject: Build fix when sizeof(off_t) > sizeof(void *) + +https://trac.macports.org/ticket/33532 + +Signed-off-by: Jeremy Huddleston +--- +diff --git a/src/XF86DGA2.c b/src/XF86DGA2.c +index e81b486..32f455b 100644 +--- a/src/XF86DGA2.c ++++ b/src/XF86DGA2.c +@@ -928,7 +928,7 @@ DGAMapPhysical( + if ((pMap->fd = open(name, O_RDWR)) < 0) + return False; + pMap->virtual = mmap(NULL, size, PROT_READ | PROT_WRITE, +- MAP_FILE | MAP_SHARED, pMap->fd, (off_t)base); ++ MAP_FILE | MAP_SHARED, pMap->fd, (off_t)(uintptr_t)base); + if (pMap->virtual == (void *)-1) + return False; + mprotect(pMap->virtual, size, PROT_READ | PROT_WRITE); +-- +cgit v0.9.0.2-2-gbebe diff --git a/package/x11r7/xlib_libXxf86dga/xlib_libXxf86dga.mk b/package/x11r7/xlib_libXxf86dga/xlib_libXxf86dga.mk index e2e3d1545a..95e2d177ab 100644 --- a/package/x11r7/xlib_libXxf86dga/xlib_libXxf86dga.mk +++ b/package/x11r7/xlib_libXxf86dga/xlib_libXxf86dga.mk @@ -1,15 +1,16 @@ ################################################################################ # -# xlib_libXxf86dga -- X.Org Xxf86dga library +# xlib_libXxf86dga # ################################################################################ -XLIB_LIBXXF86DGA_VERSION = 1.1.1 +XLIB_LIBXXF86DGA_VERSION = 1.1.3 XLIB_LIBXXF86DGA_SOURCE = libXxf86dga-$(XLIB_LIBXXF86DGA_VERSION).tar.bz2 XLIB_LIBXXF86DGA_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXXF86DGA_AUTORECONF = NO +XLIB_LIBXXF86DGA_LICENSE = MIT +XLIB_LIBXXF86DGA_LICENSE_FILES = COPYING XLIB_LIBXXF86DGA_INSTALL_STAGING = YES XLIB_LIBXXF86DGA_DEPENDENCIES = xlib_libX11 xlib_libXext xproto_xf86dgaproto xproto_xproto -XLIB_LIBXXF86DGA_CONF_OPT = --disable-malloc0returnsnull --enable-shared --disable-static +XLIB_LIBXXF86DGA_CONF_OPT = --disable-malloc0returnsnull -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXxf86dga)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXxf86vm/xlib_libXxf86vm.mk b/package/x11r7/xlib_libXxf86vm/xlib_libXxf86vm.mk index b35c492a83..8ec1cf71df 100644 --- a/package/x11r7/xlib_libXxf86vm/xlib_libXxf86vm.mk +++ b/package/x11r7/xlib_libXxf86vm/xlib_libXxf86vm.mk @@ -1,15 +1,16 @@ ################################################################################ # -# xlib_libXxf86vm -- X.Org Xxf86vm library +# xlib_libXxf86vm # ################################################################################ -XLIB_LIBXXF86VM_VERSION = 1.1.0 +XLIB_LIBXXF86VM_VERSION = 1.1.2 XLIB_LIBXXF86VM_SOURCE = libXxf86vm-$(XLIB_LIBXXF86VM_VERSION).tar.bz2 XLIB_LIBXXF86VM_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXXF86VM_AUTORECONF = NO +XLIB_LIBXXF86VM_LICENSE = MIT +XLIB_LIBXXF86VM_LICENSE_FILES = COPYING XLIB_LIBXXF86VM_INSTALL_STAGING = YES XLIB_LIBXXF86VM_DEPENDENCIES = xlib_libX11 xlib_libXext xproto_xf86vidmodeproto xproto_xproto -XLIB_LIBXXF86VM_CONF_OPT = --disable-malloc0returnsnull --enable-shared --disable-static +XLIB_LIBXXF86VM_CONF_OPT = --disable-malloc0returnsnull -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXxf86vm)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libdmx/xlib_libdmx.mk b/package/x11r7/xlib_libdmx/xlib_libdmx.mk index e7c7837e09..73c4b658da 100644 --- a/package/x11r7/xlib_libdmx/xlib_libdmx.mk +++ b/package/x11r7/xlib_libdmx/xlib_libdmx.mk @@ -1,15 +1,16 @@ ################################################################################ # -# xlib_libdmx -- X.Org dmx library +# xlib_libdmx # ################################################################################ -XLIB_LIBDMX_VERSION = 1.1.0 +XLIB_LIBDMX_VERSION = 1.1.2 XLIB_LIBDMX_SOURCE = libdmx-$(XLIB_LIBDMX_VERSION).tar.bz2 XLIB_LIBDMX_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBDMX_AUTORECONF = NO +XLIB_LIBDMX_LICENSE = MIT +XLIB_LIBDMX_LICENSE_FILES = COPYING XLIB_LIBDMX_INSTALL_STAGING = YES XLIB_LIBDMX_DEPENDENCIES = xlib_libX11 xlib_libXext xproto_dmxproto -XLIB_LIBDMX_CONF_OPT = --disable-malloc0returnsnull --enable-shared --disable-static +XLIB_LIBDMX_CONF_OPT = --disable-malloc0returnsnull -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libdmx)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libfontenc/xlib_libfontenc.mk b/package/x11r7/xlib_libfontenc/xlib_libfontenc.mk index a2ba2d79cc..d47a7d3852 100644 --- a/package/x11r7/xlib_libfontenc/xlib_libfontenc.mk +++ b/package/x11r7/xlib_libfontenc/xlib_libfontenc.mk @@ -1,18 +1,16 @@ ################################################################################ # -# xlib_libfontenc -- X.Org fontenc library +# xlib_libfontenc # ################################################################################ -XLIB_LIBFONTENC_VERSION = 1.0.5 +XLIB_LIBFONTENC_VERSION = 1.1.1 XLIB_LIBFONTENC_SOURCE = libfontenc-$(XLIB_LIBFONTENC_VERSION).tar.bz2 XLIB_LIBFONTENC_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBFONTENC_AUTORECONF = NO +XLIB_LIBFONTENC_LICENSE = MIT +XLIB_LIBFONTENC_LICENSE_FILES = COPYING XLIB_LIBFONTENC_INSTALL_STAGING = YES XLIB_LIBFONTENC_DEPENDENCIES = zlib xproto_xproto -XLIB_LIBFONTENC_CONF_OPT = --enable-shared --disable-static -HOST_XLIB_LIBFONTENC_DEPENDENCIES = host-zlib host-xproto_xproto - -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libfontenc)) -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libfontenc,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_liboldX/Config.in b/package/x11r7/xlib_liboldX/Config.in deleted file mode 100644 index e3129216f7..0000000000 --- a/package/x11r7/xlib_liboldX/Config.in +++ /dev/null @@ -1,5 +0,0 @@ -config BR2_PACKAGE_XLIB_LIBOLDX - bool "liboldX" - select BR2_PACKAGE_XLIB_LIBX11 - help - X.Org oldX library diff --git a/package/x11r7/xlib_liboldX/xlib_liboldX.mk b/package/x11r7/xlib_liboldX/xlib_liboldX.mk deleted file mode 100644 index 2e6d53f3e1..0000000000 --- a/package/x11r7/xlib_liboldX/xlib_liboldX.mk +++ /dev/null @@ -1,15 +0,0 @@ -################################################################################ -# -# xlib_liboldX -- X.Org oldX library -# -################################################################################ - -XLIB_LIBOLDX_VERSION = 1.0.1 -XLIB_LIBOLDX_SOURCE = liboldX-$(XLIB_LIBOLDX_VERSION).tar.bz2 -XLIB_LIBOLDX_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBOLDX_AUTORECONF = NO -XLIB_LIBOLDX_INSTALL_STAGING = YES -XLIB_LIBOLDX_DEPENDENCIES = xlib_libX11 -XLIB_LIBOLDX_CONF_OPT = --disable-malloc0returnsnull --enable-shared --disable-static - -$(eval $(call AUTOTARGETS,package/x11r7,xlib_liboldX)) diff --git a/package/x11r7/xlib_libpciaccess/Config.in b/package/x11r7/xlib_libpciaccess/Config.in index b53aa313e0..5f7d136799 100644 --- a/package/x11r7/xlib_libpciaccess/Config.in +++ b/package/x11r7/xlib_libpciaccess/Config.in @@ -4,5 +4,5 @@ config BR2_PACKAGE_XLIB_LIBPCIACCESS help X.Org libpciaccess -comment "libpciaccess requires a toolchain with LARGEFILE support" +comment "libpciaccess needs a toolchain w/ largefile" depends on !BR2_LARGEFILE diff --git a/package/x11r7/xlib_libpciaccess/xlib_libpciaccess.mk b/package/x11r7/xlib_libpciaccess/xlib_libpciaccess.mk index c42f35da8b..9196e47491 100644 --- a/package/x11r7/xlib_libpciaccess/xlib_libpciaccess.mk +++ b/package/x11r7/xlib_libpciaccess/xlib_libpciaccess.mk @@ -1,13 +1,14 @@ ################################################################################ # -# xlib_libpciaccess -- X.Org pciaccess library +# xlib_libpciaccess # ################################################################################ -XLIB_LIBPCIACCESS_VERSION = 0.11.0 +XLIB_LIBPCIACCESS_VERSION = 0.13.1 XLIB_LIBPCIACCESS_SOURCE = libpciaccess-$(XLIB_LIBPCIACCESS_VERSION).tar.bz2 XLIB_LIBPCIACCESS_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBPCIACCESS_LICENSE = MIT +XLIB_LIBPCIACCESS_LICENSE_FILES = COPYING XLIB_LIBPCIACCESS_INSTALL_STAGING = YES -XLIB_LIBPCIACCESS_CONF_OPT = --enable-shared --disable-static -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libpciaccess)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libpthread-stubs/Config.in b/package/x11r7/xlib_libpthread-stubs/Config.in new file mode 100644 index 0000000000..6ce1b94fcd --- /dev/null +++ b/package/x11r7/xlib_libpthread-stubs/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS + bool "libpthread-stubs" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + This library provides weak aliases for pthread functions not + provided in libc or otherwise available by default. + + http://xcb.freedesktop.org/ + +comment "libpthread-stubs needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/x11r7/xlib_libpthread-stubs/xlib_libpthread-stubs.mk b/package/x11r7/xlib_libpthread-stubs/xlib_libpthread-stubs.mk new file mode 100644 index 0000000000..6343691564 --- /dev/null +++ b/package/x11r7/xlib_libpthread-stubs/xlib_libpthread-stubs.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# xlib_libpthread-stubs +# +################################################################################ + +XLIB_LIBPTHREAD_STUBS_VERSION = 0.3 +XLIB_LIBPTHREAD_STUBS_SOURCE = libpthread-stubs-$(XLIB_LIBPTHREAD_STUBS_VERSION).tar.bz2 +XLIB_LIBPTHREAD_STUBS_SITE = http://xcb.freedesktop.org/dist/ +XLIB_LIBPTHREAD_STUBS_LICENSE = MIT +XLIB_LIBPTHREAD_STUBS_LICENSE_FILES = COPYING + +XLIB_LIBPTHREAD_STUBS_INSTALL_STAGING = YES + +ifeq ($(BR2_PREFER_STATIC_LIB),y) +XLIB_LIBPTHREAD_STUBS_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -pthread" +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libxkbfile/xlib_libxkbfile.mk b/package/x11r7/xlib_libxkbfile/xlib_libxkbfile.mk index e71b36b83a..2d5e574681 100644 --- a/package/x11r7/xlib_libxkbfile/xlib_libxkbfile.mk +++ b/package/x11r7/xlib_libxkbfile/xlib_libxkbfile.mk @@ -1,19 +1,16 @@ ################################################################################ # -# xlib_libxkbfile -- X.Org xkbfile library +# xlib_libxkbfile # ################################################################################ -XLIB_LIBXKBFILE_VERSION = 1.0.6 +XLIB_LIBXKBFILE_VERSION = 1.0.8 XLIB_LIBXKBFILE_SOURCE = libxkbfile-$(XLIB_LIBXKBFILE_VERSION).tar.bz2 XLIB_LIBXKBFILE_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXKBFILE_AUTORECONF = NO +XLIB_LIBXKBFILE_LICENSE = MIT +XLIB_LIBXKBFILE_LICENSE_FILES = COPYING XLIB_LIBXKBFILE_INSTALL_STAGING = YES XLIB_LIBXKBFILE_DEPENDENCIES = xlib_libX11 xproto_kbproto -XLIB_LIBXKBFILE_CONF_OPT = --enable-shared --disable-static -HOST_XLIB_LIBXKBFILE_DEPENDENCIES = host-xlib_libX11 host-xproto_kbproto -HOST_XLIB_LIBXKBFILE_CONF_OPT = --enable-shared --disable-static - -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libxkbfile)) -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libxkbfile,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libxkbui/Config.in b/package/x11r7/xlib_libxkbui/Config.in deleted file mode 100644 index ceab3053ce..0000000000 --- a/package/x11r7/xlib_libxkbui/Config.in +++ /dev/null @@ -1,7 +0,0 @@ -config BR2_PACKAGE_XLIB_LIBXKBUI - bool "libxkbui" - select BR2_PACKAGE_XLIB_LIBXKBFILE - select BR2_PACKAGE_XLIB_LIBXT - select BR2_PACKAGE_XPROTO_KBPROTO - help - X.Org xkbui library diff --git a/package/x11r7/xlib_libxkbui/xlib_libxkbui.mk b/package/x11r7/xlib_libxkbui/xlib_libxkbui.mk deleted file mode 100644 index 31e87e7d4f..0000000000 --- a/package/x11r7/xlib_libxkbui/xlib_libxkbui.mk +++ /dev/null @@ -1,15 +0,0 @@ -################################################################################ -# -# xlib_libxkbui -- X.Org xkbui library -# -################################################################################ - -XLIB_LIBXKBUI_VERSION = 1.0.2 -XLIB_LIBXKBUI_SOURCE = libxkbui-$(XLIB_LIBXKBUI_VERSION).tar.bz2 -XLIB_LIBXKBUI_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_LIBXKBUI_AUTORECONF = NO -XLIB_LIBXKBUI_INSTALL_STAGING = YES -XLIB_LIBXKBUI_DEPENDENCIES = xlib_libxkbfile xlib_libXt xproto_kbproto -XLIB_LIBXKBUI_CONF_OPT = --enable-shared --disable-static - -$(eval $(call AUTOTARGETS,package/x11r7,xlib_libxkbui)) diff --git a/package/x11r7/xlib_xtrans/xlib_xtrans-1.2.5-fix_pkgconfig_dir.patch b/package/x11r7/xlib_xtrans/xlib_xtrans-1.2.5-fix_pkgconfig_dir.patch deleted file mode 100644 index e8270c9bb2..0000000000 --- a/package/x11r7/xlib_xtrans/xlib_xtrans-1.2.5-fix_pkgconfig_dir.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- xlib_xtrans-1.2.5/Makefile.in.orig 2010-01-23 16:24:25.287333323 +0200 -+++ xlib_xtrans-1.2.5/Makefile.in 2010-01-23 16:25:06.336331430 +0200 -@@ -222,7 +222,7 @@ Xtransinclude_HEADERS = \ - - aclocaldir = $(datadir)/aclocal - aclocal_DATA = xtrans.m4 --pkgconfigdir = $(datadir)/pkgconfig -+pkgconfigdir = $(libdir)/pkgconfig - pkgconfig_DATA = xtrans.pc - EXTRA_DIST = xtrans.pc.in ${aclocal_DATA} ChangeLog Xtrans.mm - MAINTAINERCLEANFILES = ChangeLog diff --git a/package/x11r7/xlib_xtrans/xlib_xtrans.mk b/package/x11r7/xlib_xtrans/xlib_xtrans.mk index aaf2208366..9e02d2113f 100644 --- a/package/x11r7/xlib_xtrans/xlib_xtrans.mk +++ b/package/x11r7/xlib_xtrans/xlib_xtrans.mk @@ -1,14 +1,15 @@ ################################################################################ # -# xlib_xtrans -- X.Org xtrans library +# xlib_xtrans # ################################################################################ -XLIB_XTRANS_VERSION = 1.2.5 +XLIB_XTRANS_VERSION = 1.2.7 XLIB_XTRANS_SOURCE = xtrans-$(XLIB_XTRANS_VERSION).tar.bz2 XLIB_XTRANS_SITE = http://xorg.freedesktop.org/releases/individual/lib -XLIB_XTRANS_AUTORECONF = NO +XLIB_XTRANS_LICENSE = MIT +XLIB_XTRANS_LICENSE_FILES = COPYING XLIB_XTRANS_INSTALL_STAGING = YES -$(eval $(call AUTOTARGETS,package/x11r7,xlib_xtrans)) -$(eval $(call AUTOTARGETS,package/x11r7,xlib_xtrans,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xproto_applewmproto/xproto_applewmproto.mk b/package/x11r7/xproto_applewmproto/xproto_applewmproto.mk index 189c24f735..998d0aa33b 100644 --- a/package/x11r7/xproto_applewmproto/xproto_applewmproto.mk +++ b/package/x11r7/xproto_applewmproto/xproto_applewmproto.mk @@ -1,14 +1,15 @@ ################################################################################ # -# xproto_applewmproto -- No description available +# xproto_applewmproto # ################################################################################ -XPROTO_APPLEWMPROTO_VERSION = 1.4.1 +XPROTO_APPLEWMPROTO_VERSION = 1.4.2 XPROTO_APPLEWMPROTO_SOURCE = applewmproto-$(XPROTO_APPLEWMPROTO_VERSION).tar.bz2 XPROTO_APPLEWMPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_APPLEWMPROTO_AUTORECONF = NO +XPROTO_APPLEWMPROTO_LICENSE = MIT +XPROTO_APPLEWMPROTO_LICENSE_FILES = COPYING XPROTO_APPLEWMPROTO_INSTALL_STAGING = YES XPROTO_APPLEWMPROTO_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xproto_applewmproto)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_bigreqsproto/xproto_bigreqsproto.mk b/package/x11r7/xproto_bigreqsproto/xproto_bigreqsproto.mk index 7ae7795b32..bca5a3cdfd 100644 --- a/package/x11r7/xproto_bigreqsproto/xproto_bigreqsproto.mk +++ b/package/x11r7/xproto_bigreqsproto/xproto_bigreqsproto.mk @@ -1,14 +1,15 @@ ################################################################################ # -# xproto_bigreqsproto -- X.Org BigReqs protocol headers +# xproto_bigreqsproto # ################################################################################ -XPROTO_BIGREQSPROTO_VERSION = 1.1.0 +XPROTO_BIGREQSPROTO_VERSION = 1.1.2 XPROTO_BIGREQSPROTO_SOURCE = bigreqsproto-$(XPROTO_BIGREQSPROTO_VERSION).tar.bz2 XPROTO_BIGREQSPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_BIGREQSPROTO_AUTORECONF = NO +XPROTO_BIGREQSPROTO_LICENSE = MIT +XPROTO_BIGREQSPROTO_LICENSE_FILES = COPYING XPROTO_BIGREQSPROTO_INSTALL_STAGING = YES XPROTO_BIGREQSPROTO_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xproto_bigreqsproto)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_compositeproto/xproto_compositeproto.mk b/package/x11r7/xproto_compositeproto/xproto_compositeproto.mk index b176b69843..21613582ec 100644 --- a/package/x11r7/xproto_compositeproto/xproto_compositeproto.mk +++ b/package/x11r7/xproto_compositeproto/xproto_compositeproto.mk @@ -1,14 +1,15 @@ ################################################################################ # -# xproto_compositeproto -- X.Org Composite protocol headers +# xproto_compositeproto # ################################################################################ -XPROTO_COMPOSITEPROTO_VERSION = 0.4.1 +XPROTO_COMPOSITEPROTO_VERSION = 0.4.2 XPROTO_COMPOSITEPROTO_SOURCE = compositeproto-$(XPROTO_COMPOSITEPROTO_VERSION).tar.bz2 XPROTO_COMPOSITEPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_COMPOSITEPROTO_AUTORECONF = NO +XPROTO_COMPOSITEPROTO_LICENSE = MIT +XPROTO_COMPOSITEPROTO_LICENSE_FILES = COPYING XPROTO_COMPOSITEPROTO_INSTALL_STAGING = YES XPROTO_COMPOSITEPROTO_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xproto_compositeproto)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_damageproto/xproto_damageproto.mk b/package/x11r7/xproto_damageproto/xproto_damageproto.mk index a2f8c715ea..0311ea4901 100644 --- a/package/x11r7/xproto_damageproto/xproto_damageproto.mk +++ b/package/x11r7/xproto_damageproto/xproto_damageproto.mk @@ -1,14 +1,15 @@ ################################################################################ # -# xproto_damageproto -- X.Org Damage protocol headers +# xproto_damageproto # ################################################################################ -XPROTO_DAMAGEPROTO_VERSION = 1.2.0 +XPROTO_DAMAGEPROTO_VERSION = 1.2.1 XPROTO_DAMAGEPROTO_SOURCE = damageproto-$(XPROTO_DAMAGEPROTO_VERSION).tar.bz2 XPROTO_DAMAGEPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_DAMAGEPROTO_AUTORECONF = NO +XPROTO_DAMAGEPROTO_LICENSE = MIT +XPROTO_DAMAGEPROTO_LICENSE_FILES = COPYING XPROTO_DAMAGEPROTO_INSTALL_STAGING = YES XPROTO_DAMAGEPROTO_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xproto_damageproto)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_dmxproto/xproto_dmxproto.mk b/package/x11r7/xproto_dmxproto/xproto_dmxproto.mk index ff31e7e7e5..4cc795c212 100644 --- a/package/x11r7/xproto_dmxproto/xproto_dmxproto.mk +++ b/package/x11r7/xproto_dmxproto/xproto_dmxproto.mk @@ -1,14 +1,15 @@ ################################################################################ # -# xproto_dmxproto -- X.Org DMX protocol headers +# xproto_dmxproto # ################################################################################ -XPROTO_DMXPROTO_VERSION = 2.3 +XPROTO_DMXPROTO_VERSION = 2.3.1 XPROTO_DMXPROTO_SOURCE = dmxproto-$(XPROTO_DMXPROTO_VERSION).tar.bz2 XPROTO_DMXPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_DMXPROTO_AUTORECONF = NO +XPROTO_DMXPROTO_LICENSE = MIT +XPROTO_DMXPROTO_LICENSE_FILES = COPYING XPROTO_DMXPROTO_INSTALL_STAGING = YES XPROTO_DMXPROTO_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xproto_dmxproto)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_dri2proto/xproto_dri2proto.mk b/package/x11r7/xproto_dri2proto/xproto_dri2proto.mk index f3b37c909a..9b56bb1569 100644 --- a/package/x11r7/xproto_dri2proto/xproto_dri2proto.mk +++ b/package/x11r7/xproto_dri2proto/xproto_dri2proto.mk @@ -1,14 +1,15 @@ ################################################################################ # -# xproto_dri2proto -- X.Org DRI2 protocol headers +# xproto_dri2proto # ################################################################################ -XPROTO_DRI2PROTO_VERSION = 2.3 +XPROTO_DRI2PROTO_VERSION = 2.6 XPROTO_DRI2PROTO_SOURCE = dri2proto-$(XPROTO_DRI2PROTO_VERSION).tar.bz2 XPROTO_DRI2PROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_DRI2PROTO_AUTORECONF = NO +XPROTO_DRI2PROTO_LICENSE = MIT +XPROTO_DRI2PROTO_LICENSE_FILES = COPYING XPROTO_DRI2PROTO_INSTALL_STAGING = YES XPROTO_DRI2PROTO_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xproto_dri2proto)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_fixesproto/xproto_fixesproto.mk b/package/x11r7/xproto_fixesproto/xproto_fixesproto.mk index 1395e0c985..55212b2678 100644 --- a/package/x11r7/xproto_fixesproto/xproto_fixesproto.mk +++ b/package/x11r7/xproto_fixesproto/xproto_fixesproto.mk @@ -1,14 +1,16 @@ ################################################################################ # -# xproto_fixesproto -- X.Org Fixes protocol headers +# xproto_fixesproto # ################################################################################ -XPROTO_FIXESPROTO_VERSION = 4.1.1 +XPROTO_FIXESPROTO_VERSION = 5.0 XPROTO_FIXESPROTO_SOURCE = fixesproto-$(XPROTO_FIXESPROTO_VERSION).tar.bz2 XPROTO_FIXESPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_FIXESPROTO_AUTORECONF = NO +XPROTO_FIXESPROTO_LICENSE = MIT +XPROTO_FIXESPROTO_LICENSE_FILES = COPYING XPROTO_FIXESPROTO_INSTALL_STAGING = YES XPROTO_FIXESPROTO_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xproto_fixesproto)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xproto_fontcacheproto/xproto_fontcacheproto.mk b/package/x11r7/xproto_fontcacheproto/xproto_fontcacheproto.mk index 40917cd804..0cb205ad59 100644 --- a/package/x11r7/xproto_fontcacheproto/xproto_fontcacheproto.mk +++ b/package/x11r7/xproto_fontcacheproto/xproto_fontcacheproto.mk @@ -1,15 +1,16 @@ ################################################################################ # -# xproto_fontcacheproto -- X.Org Fontcache protocol headers +# xproto_fontcacheproto # ################################################################################ XPROTO_FONTCACHEPROTO_VERSION = 0.1.3 XPROTO_FONTCACHEPROTO_SOURCE = fontcacheproto-$(XPROTO_FONTCACHEPROTO_VERSION).tar.bz2 XPROTO_FONTCACHEPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_FONTCACHEPROTO_AUTORECONF = NO +XPROTO_FONTCACHEPROTO_LICENSE = MIT +XPROTO_FONTCACHEPROTO_LICENSE_FILES = COPYING XPROTO_FONTCACHEPROTO_INSTALL_STAGING = YES XPROTO_FONTCACHEPROTO_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xproto_fontcacheproto)) -$(eval $(call AUTOTARGETS,package/x11r7,xproto_fontcacheproto,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xproto_fontsproto/xproto_fontsproto.mk b/package/x11r7/xproto_fontsproto/xproto_fontsproto.mk index 5e2a64a600..64d7bea3a8 100644 --- a/package/x11r7/xproto_fontsproto/xproto_fontsproto.mk +++ b/package/x11r7/xproto_fontsproto/xproto_fontsproto.mk @@ -1,15 +1,16 @@ ################################################################################ # -# xproto_fontsproto -- X.Org Fonts protocol headers +# xproto_fontsproto # ################################################################################ -XPROTO_FONTSPROTO_VERSION = 2.1.0 +XPROTO_FONTSPROTO_VERSION = 2.1.2 XPROTO_FONTSPROTO_SOURCE = fontsproto-$(XPROTO_FONTSPROTO_VERSION).tar.bz2 XPROTO_FONTSPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_FONTSPROTO_AUTORECONF = NO +XPROTO_FONTSPROTO_LICENSE = MIT +XPROTO_FONTSPROTO_LICENSE_FILES = COPYING XPROTO_FONTSPROTO_INSTALL_STAGING = YES XPROTO_FONTSPROTO_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xproto_fontsproto)) -$(eval $(call AUTOTARGETS,package/x11r7,xproto_fontsproto,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xproto_glproto/xproto_glproto.mk b/package/x11r7/xproto_glproto/xproto_glproto.mk index 98c6b2fa0e..7c4b13ac18 100644 --- a/package/x11r7/xproto_glproto/xproto_glproto.mk +++ b/package/x11r7/xproto_glproto/xproto_glproto.mk @@ -1,14 +1,15 @@ ################################################################################ # -# xproto_glproto -- X.Org GL protocol headers +# xproto_glproto # ################################################################################ -XPROTO_GLPROTO_VERSION = 1.4.10 +XPROTO_GLPROTO_VERSION = 1.4.15 XPROTO_GLPROTO_SOURCE = glproto-$(XPROTO_GLPROTO_VERSION).tar.bz2 XPROTO_GLPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_GLPROTO_AUTORECONF = NO +XPROTO_GLPROTO_LICENSE = MIT +XPROTO_GLPROTO_LICENSE_FILES = COPYING XPROTO_GLPROTO_INSTALL_STAGING = YES XPROTO_GLPROTO_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xproto_glproto)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_inputproto/xproto_inputproto.mk b/package/x11r7/xproto_inputproto/xproto_inputproto.mk index 825ebed4c4..11316c3620 100644 --- a/package/x11r7/xproto_inputproto/xproto_inputproto.mk +++ b/package/x11r7/xproto_inputproto/xproto_inputproto.mk @@ -1,15 +1,16 @@ ################################################################################ # -# xproto_inputproto -- X.Org Input protocol headers +# xproto_inputproto # ################################################################################ -XPROTO_INPUTPROTO_VERSION = 2.0 +XPROTO_INPUTPROTO_VERSION = 2.2 XPROTO_INPUTPROTO_SOURCE = inputproto-$(XPROTO_INPUTPROTO_VERSION).tar.bz2 XPROTO_INPUTPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_INPUTPROTO_AUTORECONF = NO +XPROTO_INPUTPROTO_LICENSE = MIT +XPROTO_INPUTPROTO_LICENSE_FILES = COPYING XPROTO_INPUTPROTO_INSTALL_STAGING = YES XPROTO_INPUTPROTO_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xproto_inputproto)) -$(eval $(call AUTOTARGETS,package/x11r7,xproto_inputproto,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xproto_kbproto/xproto_kbproto.mk b/package/x11r7/xproto_kbproto/xproto_kbproto.mk index ecdabf127d..868e518119 100644 --- a/package/x11r7/xproto_kbproto/xproto_kbproto.mk +++ b/package/x11r7/xproto_kbproto/xproto_kbproto.mk @@ -1,15 +1,16 @@ ################################################################################ # -# xproto_kbproto -- X.Org KB protocol headers +# xproto_kbproto # ################################################################################ -XPROTO_KBPROTO_VERSION = 1.0.4 +XPROTO_KBPROTO_VERSION = 1.0.6 XPROTO_KBPROTO_SOURCE = kbproto-$(XPROTO_KBPROTO_VERSION).tar.bz2 XPROTO_KBPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_KBPROTO_AUTORECONF = NO +XPROTO_KBPROTO_LICENSE = MIT +XPROTO_KBPROTO_LICENSE_FILES = COPYING XPROTO_KBPROTO_INSTALL_STAGING = YES XPROTO_KBPROTO_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xproto_kbproto)) -$(eval $(call AUTOTARGETS,package/x11r7,xproto_kbproto,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xproto_printproto/Config.in b/package/x11r7/xproto_printproto/Config.in deleted file mode 100644 index 69e214fa1e..0000000000 --- a/package/x11r7/xproto_printproto/Config.in +++ /dev/null @@ -1,4 +0,0 @@ -config BR2_PACKAGE_XPROTO_PRINTPROTO - bool "printproto" - help - X.Org Print protocol headers diff --git a/package/x11r7/xproto_printproto/xproto_printproto.mk b/package/x11r7/xproto_printproto/xproto_printproto.mk deleted file mode 100644 index c06c5c3800..0000000000 --- a/package/x11r7/xproto_printproto/xproto_printproto.mk +++ /dev/null @@ -1,14 +0,0 @@ -################################################################################ -# -# xproto_printproto -- X.Org Print protocol headers -# -################################################################################ - -XPROTO_PRINTPROTO_VERSION = 1.0.3 -XPROTO_PRINTPROTO_SOURCE = printproto-$(XPROTO_PRINTPROTO_VERSION).tar.bz2 -XPROTO_PRINTPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_PRINTPROTO_AUTORECONF = NO -XPROTO_PRINTPROTO_INSTALL_STAGING = YES -XPROTO_PRINTPROTO_INSTALL_TARGET = NO - -$(eval $(call AUTOTARGETS,package/x11r7,xproto_printproto)) diff --git a/package/x11r7/xproto_randrproto/xproto_randrproto.mk b/package/x11r7/xproto_randrproto/xproto_randrproto.mk index e6befea457..b12653eb07 100644 --- a/package/x11r7/xproto_randrproto/xproto_randrproto.mk +++ b/package/x11r7/xproto_randrproto/xproto_randrproto.mk @@ -1,14 +1,15 @@ ################################################################################ # -# xproto_randrproto -- X.Org Randr protocol headers +# xproto_randrproto # ################################################################################ -XPROTO_RANDRPROTO_VERSION = 1.3.1 +XPROTO_RANDRPROTO_VERSION = 1.3.2 XPROTO_RANDRPROTO_SOURCE = randrproto-$(XPROTO_RANDRPROTO_VERSION).tar.bz2 XPROTO_RANDRPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_RANDRPROTO_AUTORECONF = NO +XPROTO_RANDRPROTO_LICENSE = MIT +XPROTO_RANDRPROTO_LICENSE_FILES = COPYING XPROTO_RANDRPROTO_INSTALL_STAGING = YES XPROTO_RANDRPROTO_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xproto_randrproto)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_recordproto/xproto_recordproto.mk b/package/x11r7/xproto_recordproto/xproto_recordproto.mk index 83178bd5c7..2d2cceac22 100644 --- a/package/x11r7/xproto_recordproto/xproto_recordproto.mk +++ b/package/x11r7/xproto_recordproto/xproto_recordproto.mk @@ -1,14 +1,15 @@ ################################################################################ # -# xproto_recordproto -- X.Org Record protocol headers +# xproto_recordproto # ################################################################################ -XPROTO_RECORDPROTO_VERSION = 1.14 +XPROTO_RECORDPROTO_VERSION = 1.14.2 XPROTO_RECORDPROTO_SOURCE = recordproto-$(XPROTO_RECORDPROTO_VERSION).tar.bz2 XPROTO_RECORDPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_RECORDPROTO_AUTORECONF = NO +XPROTO_RECORDPROTO_LICENSE = MIT +XPROTO_RECORDPROTO_LICENSE_FILES = COPYING XPROTO_RECORDPROTO_INSTALL_STAGING = YES XPROTO_RECORDPROTO_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xproto_recordproto)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_renderproto/xproto_renderproto.mk b/package/x11r7/xproto_renderproto/xproto_renderproto.mk index 1763efdf69..41a8445409 100644 --- a/package/x11r7/xproto_renderproto/xproto_renderproto.mk +++ b/package/x11r7/xproto_renderproto/xproto_renderproto.mk @@ -1,14 +1,16 @@ ################################################################################ # -# xproto_renderproto -- X.Org Render protocol headers +# xproto_renderproto # ################################################################################ -XPROTO_RENDERPROTO_VERSION = 0.11 +XPROTO_RENDERPROTO_VERSION = 0.11.1 XPROTO_RENDERPROTO_SOURCE = renderproto-$(XPROTO_RENDERPROTO_VERSION).tar.bz2 XPROTO_RENDERPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_RENDERPROTO_AUTORECONF = NO +XPROTO_RENDERPROTO_LICENSE = MIT +XPROTO_RENDERPROTO_LICENSE_FILES = COPYING XPROTO_RENDERPROTO_INSTALL_STAGING = YES XPROTO_RENDERPROTO_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xproto_renderproto)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xproto_resourceproto/xproto_resourceproto.mk b/package/x11r7/xproto_resourceproto/xproto_resourceproto.mk index c5e0d47337..960ca13372 100644 --- a/package/x11r7/xproto_resourceproto/xproto_resourceproto.mk +++ b/package/x11r7/xproto_resourceproto/xproto_resourceproto.mk @@ -1,14 +1,15 @@ ################################################################################ # -# xproto_resourceproto -- X.Org Resource protocol headers +# xproto_resourceproto # ################################################################################ -XPROTO_RESOURCEPROTO_VERSION = 1.1.0 +XPROTO_RESOURCEPROTO_VERSION = 1.2.0 XPROTO_RESOURCEPROTO_SOURCE = resourceproto-$(XPROTO_RESOURCEPROTO_VERSION).tar.bz2 XPROTO_RESOURCEPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_RESOURCEPROTO_AUTORECONF = NO +XPROTO_RESOURCEPROTO_LICENSE = MIT +XPROTO_RESOURCEPROTO_LICENSE_FILES = COPYING XPROTO_RESOURCEPROTO_INSTALL_STAGING = YES XPROTO_RESOURCEPROTO_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xproto_resourceproto)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_scrnsaverproto/xproto_scrnsaverproto.mk b/package/x11r7/xproto_scrnsaverproto/xproto_scrnsaverproto.mk index f7f53e6d78..57047cf5a7 100644 --- a/package/x11r7/xproto_scrnsaverproto/xproto_scrnsaverproto.mk +++ b/package/x11r7/xproto_scrnsaverproto/xproto_scrnsaverproto.mk @@ -1,14 +1,15 @@ ################################################################################ # -# xproto_scrnsaverproto -- X.Org ScrnSaver protocol headers +# xproto_scrnsaverproto # ################################################################################ -XPROTO_SCRNSAVERPROTO_VERSION = 1.2.0 +XPROTO_SCRNSAVERPROTO_VERSION = 1.2.2 XPROTO_SCRNSAVERPROTO_SOURCE = scrnsaverproto-$(XPROTO_SCRNSAVERPROTO_VERSION).tar.bz2 XPROTO_SCRNSAVERPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_SCRNSAVERPROTO_AUTORECONF = NO +XPROTO_SCRNSAVERPROTO_LICENSE = MIT +XPROTO_SCRNSAVERPROTO_LICENSE_FILES = COPYING XPROTO_SCRNSAVERPROTO_INSTALL_STAGING = YES XPROTO_SCRNSAVERPROTO_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xproto_scrnsaverproto)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_videoproto/xproto_videoproto.mk b/package/x11r7/xproto_videoproto/xproto_videoproto.mk index 3b98370892..2861c9190b 100644 --- a/package/x11r7/xproto_videoproto/xproto_videoproto.mk +++ b/package/x11r7/xproto_videoproto/xproto_videoproto.mk @@ -1,14 +1,15 @@ ################################################################################ # -# xproto_videoproto -- X.Org Video protocol headers +# xproto_videoproto # ################################################################################ -XPROTO_VIDEOPROTO_VERSION = 2.3.0 +XPROTO_VIDEOPROTO_VERSION = 2.3.1 XPROTO_VIDEOPROTO_SOURCE = videoproto-$(XPROTO_VIDEOPROTO_VERSION).tar.bz2 XPROTO_VIDEOPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_VIDEOPROTO_AUTORECONF = NO +XPROTO_VIDEOPROTO_LICENSE = MIT +XPROTO_VIDEOPROTO_LICENSE_FILES = COPYING XPROTO_VIDEOPROTO_INSTALL_STAGING = YES XPROTO_VIDEOPROTO_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xproto_videoproto)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_windowswmproto/xproto_windowswmproto.mk b/package/x11r7/xproto_windowswmproto/xproto_windowswmproto.mk index 827d7975f6..067bccf01a 100644 --- a/package/x11r7/xproto_windowswmproto/xproto_windowswmproto.mk +++ b/package/x11r7/xproto_windowswmproto/xproto_windowswmproto.mk @@ -1,14 +1,15 @@ ################################################################################ # -# xproto_windowswmproto -- No description available +# xproto_windowswmproto # ################################################################################ XPROTO_WINDOWSWMPROTO_VERSION = 1.0.4 XPROTO_WINDOWSWMPROTO_SOURCE = windowswmproto-$(XPROTO_WINDOWSWMPROTO_VERSION).tar.bz2 XPROTO_WINDOWSWMPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_WINDOWSWMPROTO_AUTORECONF = NO +XPROTO_WINDOWSWMPROTO_LICENSE = MIT +XPROTO_WINDOWSWMPROTO_LICENSE_FILES = COPYING XPROTO_WINDOWSWMPROTO_INSTALL_STAGING = YES XPROTO_WINDOWSWMPROTO_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xproto_windowswmproto)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_xcmiscproto/xproto_xcmiscproto.mk b/package/x11r7/xproto_xcmiscproto/xproto_xcmiscproto.mk index 1846f20043..fd3cb07fa3 100644 --- a/package/x11r7/xproto_xcmiscproto/xproto_xcmiscproto.mk +++ b/package/x11r7/xproto_xcmiscproto/xproto_xcmiscproto.mk @@ -1,15 +1,17 @@ ################################################################################ # -# xproto_xcmiscproto -- X.Org XCMisc protocol headers +# xproto_xcmiscproto # ################################################################################ -XPROTO_XCMISCPROTO_VERSION = 1.2.0 +XPROTO_XCMISCPROTO_VERSION = 1.2.2 XPROTO_XCMISCPROTO_SOURCE = xcmiscproto-$(XPROTO_XCMISCPROTO_VERSION).tar.bz2 XPROTO_XCMISCPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_XCMISCPROTO_AUTORECONF = NO +XPROTO_XCMISCPROTO_LICENSE = MIT +XPROTO_XCMISCPROTO_LICENSE_FILES = COPYING XPROTO_XCMISCPROTO_INSTALL_STAGING = YES -XPROTO_XCMISCPROTO_INSTALL_TARGET = NO +XPROTO_XCMISCPROTO_CONF_OPT = $(if $(BR2_HAVE_DOCUMENTATION),,--disable-specs) +HOST_XPROTO_XCMISCPROTO_CONF_OPT = --disable-specs -$(eval $(call AUTOTARGETS,package/x11r7,xproto_xcmiscproto)) -$(eval $(call AUTOTARGETS,package/x11r7,xproto_xcmiscproto,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xproto_xextproto/xproto_xextproto.mk b/package/x11r7/xproto_xextproto/xproto_xextproto.mk index 1fd39c91d6..b78ba4a77a 100644 --- a/package/x11r7/xproto_xextproto/xproto_xextproto.mk +++ b/package/x11r7/xproto_xextproto/xproto_xextproto.mk @@ -1,15 +1,17 @@ ################################################################################ # -# xproto_xextproto -- X.Org XExt protocol headers +# xproto_xextproto # ################################################################################ -XPROTO_XEXTPROTO_VERSION = 7.1.1 +XPROTO_XEXTPROTO_VERSION = 7.2.1 XPROTO_XEXTPROTO_SOURCE = xextproto-$(XPROTO_XEXTPROTO_VERSION).tar.bz2 XPROTO_XEXTPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_XEXTPROTO_AUTORECONF = NO +XPROTO_XEXTPROTO_LICENSE = MIT +XPROTO_XEXTPROTO_LICENSE_FILES = COPYING XPROTO_XEXTPROTO_INSTALL_STAGING = YES -XPROTO_XEXTPROTO_INSTALL_TARGET = NO +XPROTO_XEXTPROTO_CONF_OPT = $(if $(BR2_HAVE_DOCUMENTATION),,--disable-specs) +HOST_XPROTO_XEXTPROTO_CONF_OPT = --disable-specs -$(eval $(call AUTOTARGETS,package/x11r7,xproto_xextproto)) -$(eval $(call AUTOTARGETS,package/x11r7,xproto_xextproto,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xproto_xf86bigfontproto/xproto_xf86bigfontproto.mk b/package/x11r7/xproto_xf86bigfontproto/xproto_xf86bigfontproto.mk index 1872873b56..f88f5ecace 100644 --- a/package/x11r7/xproto_xf86bigfontproto/xproto_xf86bigfontproto.mk +++ b/package/x11r7/xproto_xf86bigfontproto/xproto_xf86bigfontproto.mk @@ -1,15 +1,16 @@ ################################################################################ # -# xproto_xf86bigfontproto -- X.Org XF86BigFont protocol headers +# xproto_xf86bigfontproto # ################################################################################ XPROTO_XF86BIGFONTPROTO_VERSION = 1.2.0 XPROTO_XF86BIGFONTPROTO_SOURCE = xf86bigfontproto-$(XPROTO_XF86BIGFONTPROTO_VERSION).tar.bz2 XPROTO_XF86BIGFONTPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_XF86BIGFONTPROTO_AUTORECONF = NO +XPROTO_XF86BIGFONTPROTO_LICENSE = MIT +XPROTO_XF86BIGFONTPROTO_LICENSE_FILES = COPYING XPROTO_XF86BIGFONTPROTO_INSTALL_STAGING = YES XPROTO_XF86BIGFONTPROTO_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xproto_xf86bigfontproto)) -$(eval $(call AUTOTARGETS,package/x11r7,xproto_xf86bigfontproto,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xproto_xf86dgaproto/xproto_xf86dgaproto.mk b/package/x11r7/xproto_xf86dgaproto/xproto_xf86dgaproto.mk index d654a1c4b5..d671bf0094 100644 --- a/package/x11r7/xproto_xf86dgaproto/xproto_xf86dgaproto.mk +++ b/package/x11r7/xproto_xf86dgaproto/xproto_xf86dgaproto.mk @@ -1,14 +1,15 @@ ################################################################################ # -# xproto_xf86dgaproto -- X.Org XF86DGA protocol headers +# xproto_xf86dgaproto # ################################################################################ XPROTO_XF86DGAPROTO_VERSION = 2.1 XPROTO_XF86DGAPROTO_SOURCE = xf86dgaproto-$(XPROTO_XF86DGAPROTO_VERSION).tar.bz2 XPROTO_XF86DGAPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_XF86DGAPROTO_AUTORECONF = NO +XPROTO_XF86DGAPROTO_LICENSE = MIT +XPROTO_XF86DGAPROTO_LICENSE_FILES = COPYING XPROTO_XF86DGAPROTO_INSTALL_STAGING = YES XPROTO_XF86DGAPROTO_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xproto_xf86dgaproto)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_xf86driproto/xproto_xf86driproto.mk b/package/x11r7/xproto_xf86driproto/xproto_xf86driproto.mk index 4c37fa12c9..e6bb0f12f1 100644 --- a/package/x11r7/xproto_xf86driproto/xproto_xf86driproto.mk +++ b/package/x11r7/xproto_xf86driproto/xproto_xf86driproto.mk @@ -1,14 +1,15 @@ ################################################################################ # -# xproto_xf86driproto -- X.Org XF86DRI protocol headers +# xproto_xf86driproto # ################################################################################ -XPROTO_XF86DRIPROTO_VERSION = 2.1.0 +XPROTO_XF86DRIPROTO_VERSION = 2.1.1 XPROTO_XF86DRIPROTO_SOURCE = xf86driproto-$(XPROTO_XF86DRIPROTO_VERSION).tar.bz2 XPROTO_XF86DRIPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_XF86DRIPROTO_AUTORECONF = NO +XPROTO_XF86DRIPROTO_LICENSE = MIT +XPROTO_XF86DRIPROTO_LICENSE_FILES = COPYING XPROTO_XF86DRIPROTO_INSTALL_STAGING = YES XPROTO_XF86DRIPROTO_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xproto_xf86driproto)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_xf86rushproto/Config.in b/package/x11r7/xproto_xf86rushproto/Config.in deleted file mode 100644 index 961c31f73a..0000000000 --- a/package/x11r7/xproto_xf86rushproto/Config.in +++ /dev/null @@ -1,4 +0,0 @@ -config BR2_PACKAGE_XPROTO_XF86RUSHPROTO - bool "xf86rushproto" - help - X.Org XF86Rush protocol headers diff --git a/package/x11r7/xproto_xf86rushproto/xproto_xf86rushproto.mk b/package/x11r7/xproto_xf86rushproto/xproto_xf86rushproto.mk deleted file mode 100644 index 032b839dac..0000000000 --- a/package/x11r7/xproto_xf86rushproto/xproto_xf86rushproto.mk +++ /dev/null @@ -1,14 +0,0 @@ -################################################################################ -# -# xproto_xf86rushproto -- X.Org XF86Rush protocol headers -# -################################################################################ - -XPROTO_XF86RUSHPROTO_VERSION = 1.1.2 -XPROTO_XF86RUSHPROTO_SOURCE = xf86rushproto-$(XPROTO_XF86RUSHPROTO_VERSION).tar.bz2 -XPROTO_XF86RUSHPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_XF86RUSHPROTO_AUTORECONF = NO -XPROTO_XF86RUSHPROTO_INSTALL_STAGING = YES -XPROTO_XF86RUSHPROTO_INSTALL_TARGET = NO - -$(eval $(call AUTOTARGETS,package/x11r7,xproto_xf86rushproto)) diff --git a/package/x11r7/xproto_xf86vidmodeproto/xproto_xf86vidmodeproto.mk b/package/x11r7/xproto_xf86vidmodeproto/xproto_xf86vidmodeproto.mk index c3f3fe5926..41637983a6 100644 --- a/package/x11r7/xproto_xf86vidmodeproto/xproto_xf86vidmodeproto.mk +++ b/package/x11r7/xproto_xf86vidmodeproto/xproto_xf86vidmodeproto.mk @@ -1,14 +1,15 @@ ################################################################################ # -# xproto_xf86vidmodeproto -- X.Org XF86VidMode protocol headers +# xproto_xf86vidmodeproto # ################################################################################ -XPROTO_XF86VIDMODEPROTO_VERSION = 2.3 +XPROTO_XF86VIDMODEPROTO_VERSION = 2.3.1 XPROTO_XF86VIDMODEPROTO_SOURCE = xf86vidmodeproto-$(XPROTO_XF86VIDMODEPROTO_VERSION).tar.bz2 XPROTO_XF86VIDMODEPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_XF86VIDMODEPROTO_AUTORECONF = NO +XPROTO_XF86VIDMODEPROTO_LICENSE = MIT +XPROTO_XF86VIDMODEPROTO_LICENSE_FILES = COPYING XPROTO_XF86VIDMODEPROTO_INSTALL_STAGING = YES XPROTO_XF86VIDMODEPROTO_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xproto_xf86vidmodeproto)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_xineramaproto/xproto_xineramaproto.mk b/package/x11r7/xproto_xineramaproto/xproto_xineramaproto.mk index bca3c8fd65..4c9ae11d28 100644 --- a/package/x11r7/xproto_xineramaproto/xproto_xineramaproto.mk +++ b/package/x11r7/xproto_xineramaproto/xproto_xineramaproto.mk @@ -1,14 +1,15 @@ ################################################################################ # -# xproto_xineramaproto -- X.Org Xinerama protocol headers +# xproto_xineramaproto # ################################################################################ -XPROTO_XINERAMAPROTO_VERSION = 1.2 +XPROTO_XINERAMAPROTO_VERSION = 1.2.1 XPROTO_XINERAMAPROTO_SOURCE = xineramaproto-$(XPROTO_XINERAMAPROTO_VERSION).tar.bz2 XPROTO_XINERAMAPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_XINERAMAPROTO_AUTORECONF = NO +XPROTO_XINERAMAPROTO_LICENSE = MIT +XPROTO_XINERAMAPROTO_LICENSE_FILES = COPYING XPROTO_XINERAMAPROTO_INSTALL_STAGING = YES XPROTO_XINERAMAPROTO_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xproto_xineramaproto)) +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_xproto/xproto_xproto.mk b/package/x11r7/xproto_xproto/xproto_xproto.mk index c1e24495fd..bfff3bea2f 100644 --- a/package/x11r7/xproto_xproto/xproto_xproto.mk +++ b/package/x11r7/xproto_xproto/xproto_xproto.mk @@ -1,15 +1,16 @@ ################################################################################ # -# xproto_xproto -- X.Org xproto protocol headers +# xproto_xproto # ################################################################################ -XPROTO_XPROTO_VERSION = 7.0.16 +XPROTO_XPROTO_VERSION = 7.0.23 XPROTO_XPROTO_SOURCE = xproto-$(XPROTO_XPROTO_VERSION).tar.bz2 XPROTO_XPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto -XPROTO_XPROTO_AUTORECONF = NO +XPROTO_XPROTO_LICENSE = MIT +XPROTO_XPROTO_LICENSE_FILES = COPYING XPROTO_XPROTO_INSTALL_STAGING = YES XPROTO_XPROTO_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xproto_xproto)) -$(eval $(call AUTOTARGETS,package/x11r7,xproto_xproto,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xserver_xorg-server/Config.in b/package/x11r7/xserver_xorg-server/Config.in index ddc03c6aeb..5f0c2d811e 100644 --- a/package/x11r7/xserver_xorg-server/Config.in +++ b/package/x11r7/xserver_xorg-server/Config.in @@ -1,13 +1,15 @@ config BR2_PACKAGE_XSERVER_XORG_SERVER bool "xorg-server" - select BR2_PACKAGE_LIBDRM if BR2_PACKAGE_XSERVER_xorg - select BR2_PACKAGE_MCOOKIE - select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_LIBDRM if BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR + # We need a SHA1 implementation. If either openssl or + # libgcrypt are already part of the build, we'll use one of + # them, otherwise, use the small libsha1 library. + select BR2_PACKAGE_LIBSHA1 if (!BR2_PACKAGE_OPENSSL && !BR2_PACKAGE_LIBGCRYPT) select BR2_PACKAGE_PIXMAN select BR2_PACKAGE_XFONT_FONT_ALIAS if !BR2_PACKAGE_XSERVER_XORG_SERVER_BUILTIN_FONTS select BR2_PACKAGE_XFONT_FONT_MISC_MISC if !BR2_PACKAGE_XSERVER_XORG_SERVER_BUILTIN_FONTS select BR2_PACKAGE_XFONT_FONT_CURSOR_MISC if !BR2_PACKAGE_XSERVER_XORG_SERVER_BUILTIN_FONTS - select BR2_PACKAGE_XLIB_LIBPCIACCESS if BR2_PACKAGE_XSERVER_xorg + select BR2_PACKAGE_XLIB_LIBPCIACCESS if BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR select BR2_PACKAGE_XLIB_LIBX11 select BR2_PACKAGE_XLIB_LIBXAU select BR2_PACKAGE_XLIB_LIBXCURSOR @@ -43,27 +45,94 @@ config BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_XF86BIGFONTPROTO select BR2_PACKAGE_XPROTO_XF86DGAPROTO select BR2_PACKAGE_XPROTO_XF86DRIPROTO if BR2_PACKAGE_MESA3D - select BR2_PACKAGE_XPROTO_XF86RUSHPROTO select BR2_PACKAGE_XPROTO_XF86VIDMODEPROTO select BR2_PACKAGE_XPROTO_XPROTO select BR2_PACKAGE_XUTIL_UTIL_MACROS select BR2_PACKAGE_XKEYBOARD_CONFIG depends on !BR2_avr32 help - xorg-server 1.7.5 - No description available + X.Org X server + + http://xorg.freedesktop.org comment "xorg-xserver is BROKEN on AVR32" depends on BR2_avr32 +if BR2_PACKAGE_XSERVER_XORG_SERVER + +choice + prompt "X Window System server type" + default BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE + help + Select the X Window System server to use + +config BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR + bool "Modular X.org" + depends on BR2_LARGEFILE && BR2_INSTALL_LIBSTDCPP + help + This variant of the X.org server is the full-blown variant, + as used by desktop GNU/Linux distributions. The drivers (for + input and graphics) are built separately from the X.org + server (see the xdriver* packages). + +comment "Modular X.org needs a toolchain w/ largefile, C++" + depends on !(BR2_LARGEFILE && BR2_INSTALL_LIBSTDCPP) + +config BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE + bool "KDrive / TinyX" + help + This variant of the X.org server is a lightweight version + intended for embedded systems. The drivers (for input and + graphics) are built into the server. It is generally used + directly on top of the Linux framebuffer without DRM or + video card specific drivers. + +endchoice + config BR2_PACKAGE_XSERVER_XORG_SERVER_NULL_CURSOR - bool "Null root cursor" - depends on BR2_PACKAGE_XSERVER_XORG_SERVER - help - Don't display root cursor. + bool "Null root cursor" + help + Don't display root cursor. config BR2_PACKAGE_XSERVER_XORG_SERVER_AIGLX - bool "Enable AIGLX Extension" - depends on BR2_PACKAGE_XSERVER_XORG_SERVER - help - Enable/Use AIGLX extension. + bool "Enable AIGLX Extension" + help + Enable/Use AIGLX extension. + +if BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE + +config BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE_EVDEV + bool "Enable KDrive/TinyX evdev input driver" + help + Enable evdev input driver in KDrive. This allows KDrive to + use input devices that are integrated in the Linux input + subsystem, i.e have a /dev/input/eventX device file. This is + most likely the input driver you want to use. + + This driver can then be enabled by running the X server + using: + + Xfbdev -keybd evdev,,device=/dev/input/eventX -mouse evdev,,device=/dev/input/eventY. + +config BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE_KBD + bool "Enable KDrive/TinyX kbd input driver" + help + Enable kbd input driver in KDrive. It uses the console + keyboard as input device. + +config BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE_MOUSE + bool "Enable KDrive/TinyX mouse input driver" + help + Enable mouse input driver in KDrive. It supports PS/2 mice + and serial port mice. + +endif + +comment "Optional Servers" + +config BR2_PACKAGE_XSERVER_XORG_SERVER_XVFB + bool "Xvfb server" + help + Virtual frame buffer X server. + +endif diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server-01-aarch64-support.patch b/package/x11r7/xserver_xorg-server/xserver_xorg-server-01-aarch64-support.patch new file mode 100644 index 0000000000..ec497c8092 --- /dev/null +++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server-01-aarch64-support.patch @@ -0,0 +1,23 @@ +Add necessary definitions for AArch64 + +Signed-off-by: Thomas Petazzoni + +Index: xserver_xorg-server-1.9.4/include/servermd.h +=================================================================== +--- xserver_xorg-server-1.9.4.orig/include/servermd.h 2009-11-04 20:31:46.000000000 +0100 ++++ xserver_xorg-server-1.9.4/include/servermd.h 2012-12-28 18:16:55.000000000 +0100 +@@ -68,6 +68,14 @@ + * GLYPHPADBYTES is used. + */ + ++#ifdef __aarch64__ ++ ++# define IMAGE_BYTE_ORDER LSBFirst ++# define BITMAP_BIT_ORDER LSBFirst ++# define GLYPHPADBYTES 4 ++ ++#endif ++ + #ifdef __avr32__ + + #define IMAGE_BYTE_ORDER MSBFirst diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server-02-cve-2013-1940.patch b/package/x11r7/xserver_xorg-server/xserver_xorg-server-02-cve-2013-1940.patch new file mode 100644 index 0000000000..d85494f902 --- /dev/null +++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server-02-cve-2013-1940.patch @@ -0,0 +1,34 @@ +From 6ca03b9161d33b1d2b55a3a1a913cf88deb2343f Mon Sep 17 00:00:00 2001 +From: Dave Airlie +Date: Wed, 10 Apr 2013 06:09:01 +0000 +Subject: xf86: fix flush input to work with Linux evdev devices. + +So when we VT switch back and attempt to flush the input devices, +we don't succeed because evdev won't return part of an event, +since we were only asking for 4 bytes, we'd only get -EINVAL back. + +This could later cause events to be flushed that we shouldn't have +gotten. + +This is a fix for CVE-2013-1940. + +Signed-off-by: Dave Airlie +Reviewed-by: Peter Hutterer +Signed-off-by: Peter Hutterer +--- +diff --git a/hw/xfree86/os-support/shared/posix_tty.c b/hw/xfree86/os-support/shared/posix_tty.c +index ab3757a..4d08c1e 100644 +--- a/hw/xfree86/os-support/shared/posix_tty.c ++++ b/hw/xfree86/os-support/shared/posix_tty.c +@@ -421,7 +421,8 @@ xf86FlushInput(int fd) + { + fd_set fds; + struct timeval timeout; +- char c[4]; ++ /* this needs to be big enough to flush an evdev event. */ ++ char c[256]; + + DebugF("FlushingSerial\n"); + if (tcflush(fd, TCIFLUSH) == 0) +-- +cgit v0.9.0.2-2-gbebe diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server-03-Revert-kinput-allocate-enough-space-for-null-charact.patch b/package/x11r7/xserver_xorg-server/xserver_xorg-server-03-Revert-kinput-allocate-enough-space-for-null-charact.patch new file mode 100644 index 0000000000..d19bc46909 --- /dev/null +++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server-03-Revert-kinput-allocate-enough-space-for-null-charact.patch @@ -0,0 +1,59 @@ +From 09f1e5b15b769e1122f0a8d7cae0820038992312 Mon Sep 17 00:00:00 2001 +From: Julien Cristau +Date: Sun, 7 Oct 2012 18:40:35 +0200 +Subject: [PATCH] Revert "kinput: allocate enough space for null character." +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This reverts commit 531785dd746d64ef7f473a83ca73bb20e74b6fca. + +The above commit breaks Xephyr option parsing. Andrzej writes: + + Xephyr -retro -keybd evdev,,device=/dev/input/event2,xkbrules=evdev,xkbmodel=evdev,xkblayout=pl -mouse evdev,,device=/dev/input/event1 :3 + + results in: + + + Pointer option key (device=) of value (/dev/input/event1) not assigned! + Kbd option key (device=) of value (/dev/input/event2) not assigned! + Kbd option key (xkbrules=) of value (evdev) not assigned! + Kbd option key (xkbmodel=) of value (evdev) not assigned! + Kbd option key (xkblayout=) of value (pl) not assigned! + + + The effect of the patch is that the "key=value" pairs are parsed in such + a way that the key is added an "equals" sign to it and we end up with + keys like "device=" instead of "device". This in turn has effect on + KdParsePointerOptions and KdParseKbdOptions: the key does not match + any choice presented in the "switch" statement, and so "Pointer/Kbd + option key (...) of value (...) not assigned!" happens, making all + "key=value" options inaccessible to the user. Reverting the patch makes + them available again. + +Reference: http://bugs.debian.org/689246 +Reported-by: Andrzej Pietrasiewicz +Signed-off-by: Julien Cristau +Cc: Dave Airlie +Reviewed-by: Søren Sandmann +Signed-off-by: Keith Packard +--- + hw/kdrive/src/kinput.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c +index d35dcf8..b1068bb 100644 +--- a/hw/kdrive/src/kinput.c ++++ b/hw/kdrive/src/kinput.c +@@ -1034,7 +1034,7 @@ KdGetOptions(InputOption **options, char *string) + + if (strchr(string, '=')) { + tam_key = (strchr(string, '=') - string); +- key = strndup(string, tam_key + 1); ++ key = strndup(string, tam_key); + if (!key) + goto out; + +-- +1.7.10.4 + diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk index 6dc1705bde..4089aab83c 100644 --- a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk +++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk @@ -1,17 +1,17 @@ ################################################################################ # -# xserver_xorg-server -- No description available +# xserver_xorg-server # ################################################################################ -XSERVER_XORG_SERVER_VERSION = 1.7.5 +XSERVER_XORG_SERVER_VERSION = 1.12.4 XSERVER_XORG_SERVER_SOURCE = xorg-server-$(XSERVER_XORG_SERVER_VERSION).tar.bz2 XSERVER_XORG_SERVER_SITE = http://xorg.freedesktop.org/releases/individual/xserver +XSERVER_XORG_SERVER_LICENSE = MIT +XSERVER_XORG_SERVER_LICENSE_FILES = COPYING XSERVER_XORG_SERVER_MAKE = $(MAKE1) # make install fails with parallel make -XSERVER_XORG_SERVER_AUTORECONF = NO XSERVER_XORG_SERVER_INSTALL_STAGING = YES XSERVER_XORG_SERVER_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) install install-data - XSERVER_XORG_SERVER_DEPENDENCIES = \ xutil_util-macros \ xlib_libXfont \ @@ -48,35 +48,54 @@ XSERVER_XORG_SERVER_DEPENDENCIES = \ xproto_xextproto \ xproto_xf86bigfontproto \ xproto_xf86dgaproto \ - xproto_xf86rushproto \ xproto_xf86vidmodeproto \ xproto_xproto \ xkeyboard-config \ pixman \ - openssl \ - mcookie + mcookie \ + host-pkgconf XSERVER_XORG_SERVER_CONF_OPT = --disable-config-hal \ - --disable-xnest --disable-xephyr --disable-xvfb \ + --disable-xnest --disable-xephyr --disable-dmx \ --with-builder-addr=buildroot@uclibc.org \ CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/pixman-1" \ - --with-fontdir=/usr/share/fonts/X11/ + --with-fontdir=/usr/share/fonts/X11/ --localstatedir=/var \ + --$(if $(BR2_PACKAGE_XSERVER_XORG_SERVER_XVFB),en,dis)able-xvfb -ifeq ($(BR2_PACKAGE_XSERVER_xorg),y) +ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR),y) XSERVER_XORG_SERVER_CONF_OPT += --enable-xorg XSERVER_XORG_SERVER_DEPENDENCIES += xlib_libpciaccess libdrm else XSERVER_XORG_SERVER_CONF_OPT += --disable-xorg endif -ifeq ($(BR2_PACKAGE_XSERVER_tinyx),y) +ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE),y) XSERVER_XORG_SERVER_CONF_OPT += --enable-kdrive --enable-xfbdev \ --disable-glx --disable-dri --disable-xsdl define XSERVER_CREATE_X_SYMLINK ln -f -s Xfbdev $(TARGET_DIR)/usr/bin/X endef XSERVER_XORG_SERVER_POST_INSTALL_TARGET_HOOKS += XSERVER_CREATE_X_SYMLINK + +ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE_EVDEV),y) +XSERVER_XORG_SERVER_CONF_OPT += --enable-kdrive-evdev +else +XSERVER_XORG_SERVER_CONF_OPT += --disable-kdrive-evdev +endif + +ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE_KBD),y) +XSERVER_XORG_SERVER_CONF_OPT += --enable-kdrive-kbd +else +XSERVER_XORG_SERVER_CONF_OPT += --disable-kdrive-kbd +endif + +ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE_MOUSE),y) +XSERVER_XORG_SERVER_CONF_OPT += --enable-kdrive-mouse else +XSERVER_XORG_SERVER_CONF_OPT += --disable-kdrive-mouse +endif + +else # modular XSERVER_XORG_SERVER_CONF_OPT += --disable-kdrive --disable-xfbdev endif @@ -104,10 +123,15 @@ XSERVER_XORG_SERVER_DEPENDENCIES += tslib XSERVER_XORG_SERVER_CONF_OPT += --enable-tslib LDFLAGS="-lts" endif +ifeq ($(BR2_PACKAGE_UDEV),y) +XSERVER_XORG_SERVER_DEPENDENCIES += udev +XSERVER_XORG_SERVER_CONF_OPT += --enable-config-udev +else ifeq ($(BR2_PACKAGE_DBUS),y) XSERVER_XORG_SERVER_DEPENDENCIES += dbus XSERVER_XORG_SERVER_CONF_OPT += --enable-config-dbus endif +endif ifeq ($(BR2_PACKAGE_FREETYPE),y) XSERVER_XORG_SERVER_DEPENDENCIES += freetype @@ -116,6 +140,8 @@ endif ifeq ($(BR2_PACKAGE_XPROTO_RECORDPROTO),y) XSERVER_XORG_SERVER_DEPENDENCIES += xproto_recordproto XSERVER_XORG_SERVER_CONF_OPT += --enable-record +else +XSERVER_XORG_SERVER_CONF_OPT += --disable-record endif ifneq ($(BR2_PACKAGE_XLIB_LIBXVMC),y) @@ -126,7 +152,7 @@ ifneq ($(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),y) XSERVER_XORG_SERVER_CONF_OPT += --disable-composite endif -ifeq ($(BR2_PACKAGE_XSERVER_xorg),y) +ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR),y) ifeq ($(BR2_PACKAGE_XPROTO_DRI2PROTO),y) XSERVER_XORG_SERVER_DEPENDENCIES += xproto_dri2proto XSERVER_XORG_SERVER_CONF_OPT += --enable-dri2 @@ -152,4 +178,15 @@ else XSERVER_XORG_SERVER_CONF_OPT += --disable-glx endif -$(eval $(call AUTOTARGETS,package/x11r7,xserver_xorg-server)) +ifeq ($(BR2_PACKAGE_OPENSSL),y) +XSERVER_XORG_SERVER_CONF_OPT += --with-sha1=libcrypto +XSERVER_XORG_SERVER_DEPENDENCIES += openssl +else ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +XSERVER_XORG_SERVER_CONF_OPT += --with-sha1=libgcrypt +XSERVER_XORG_SERVER_DEPENDENCIES += libgcrypt +else +XSERVER_XORG_SERVER_CONF_OPT += --with-sha1=libsha1 +XSERVER_XORG_SERVER_DEPENDENCIES += libsha1 +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/xutil_makedepend/xutil_makedepend.mk b/package/x11r7/xutil_makedepend/xutil_makedepend.mk index 660323de91..0a436d11ef 100644 --- a/package/x11r7/xutil_makedepend/xutil_makedepend.mk +++ b/package/x11r7/xutil_makedepend/xutil_makedepend.mk @@ -1,17 +1,16 @@ ################################################################################ # -# xutil_makedepend -- No description available +# xutil_makedepend # ################################################################################ -XUTIL_MAKEDEPEND_VERSION = 1.0.2 +XUTIL_MAKEDEPEND_VERSION = 1.0.4 XUTIL_MAKEDEPEND_SOURCE = makedepend-$(XUTIL_MAKEDEPEND_VERSION).tar.bz2 XUTIL_MAKEDEPEND_SITE = http://xorg.freedesktop.org/releases/individual/util -XUTIL_MAKEDEPEND_AUTORECONF = NO -XUTIL_MAKEDEPEND_INSTALL_STAGING = NO -XUTIL_MAKEDEPEND_INSTALL_TARGET = YES +XUTIL_MAKEDEPEND_LICENSE = MIT +XUTIL_MAKEDEPEND_LICENSE_FILES = COPYING -HOST_XUTIL_MAKEDEPEND_DEPENDENCIES = host-xproto_xproto +XUTIL_MAKEDEPEND_DEPENDENCIES = xproto_xproto -$(eval $(call AUTOTARGETS,package/x11r7,xutil_makedepend)) -$(eval $(call AUTOTARGETS,package/x11r7,xutil_makedepend,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xutil_util-macros/xutil_util-macros-1.3.0.patch b/package/x11r7/xutil_util-macros/xutil_util-macros-1.3.0.patch deleted file mode 100644 index de3ff01b41..0000000000 --- a/package/x11r7/xutil_util-macros/xutil_util-macros-1.3.0.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- xutil_util-macros-1.3.0/xorg-macros.m4.in.orig 2010-01-23 19:23:30.306334212 +0200 -+++ xutil_util-macros-1.3.0/xorg-macros.m4.in 2010-01-23 19:25:03.462333685 +0200 -@@ -499,3 +499,6 @@ XORG_RELEASE_VERSION - XORG_CHANGELOG - XORG_MANPAGE_SECTIONS - ]) # XORG_DEFAULT_OPTIONS -+ -+# Buildroot stuff -+AC_SUBST(STAGING_DIR) diff --git a/package/x11r7/xutil_util-macros/xutil_util-macros.mk b/package/x11r7/xutil_util-macros/xutil_util-macros.mk index b600a46942..f2656c270f 100644 --- a/package/x11r7/xutil_util-macros/xutil_util-macros.mk +++ b/package/x11r7/xutil_util-macros/xutil_util-macros.mk @@ -1,15 +1,17 @@ ################################################################################ # -# xutil_util-macros -- No description available +# xutil_util-macros # ################################################################################ -XUTIL_UTIL_MACROS_VERSION = 1.3.0 +XUTIL_UTIL_MACROS_VERSION = 1.17 XUTIL_UTIL_MACROS_SOURCE = util-macros-$(XUTIL_UTIL_MACROS_VERSION).tar.bz2 XUTIL_UTIL_MACROS_SITE = http://xorg.freedesktop.org/releases/individual/util -XUTIL_UTIL_MACROS_AUTORECONF = NO +XUTIL_UTIL_MACROS_LICENSE = MIT +XUTIL_UTIL_MACROS_LICENSE_FILES = COPYING + XUTIL_UTIL_MACROS_INSTALL_STAGING = YES XUTIL_UTIL_MACROS_INSTALL_TARGET = NO -$(eval $(call AUTOTARGETS,package/x11r7,xutil_util-macros)) -$(eval $(call AUTOTARGETS,package/x11r7,xutil_util-macros,host)) +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11vnc/Config.in b/package/x11vnc/Config.in index fdb3badac6..5693754bf2 100644 --- a/package/x11vnc/Config.in +++ b/package/x11vnc/Config.in @@ -2,5 +2,9 @@ config BR2_PACKAGE_X11VNC bool "x11vnc" depends on BR2_PACKAGE_XORG7 select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXTST help VNC server for X11 display + + http://www.karlrunge.com/x11vnc/ diff --git a/package/x11vnc/x11vnc-ipv6.patch b/package/x11vnc/x11vnc-ipv6.patch new file mode 100644 index 0000000000..89c28357a1 --- /dev/null +++ b/package/x11vnc/x11vnc-ipv6.patch @@ -0,0 +1,25 @@ +[PATCH] fix build on uClibc without IPv6 support + +Some systems (like uClibc) defines AF_INET6 even when configured without +IPv6 support, so don't use that to decide if IPv6 support should be enabled. + +Instead use the X11VNC_IPV6 define like elsewhere in the code. + +Signed-off-by: Peter Korsgaard +--- + x11vnc/enc.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: x11vnc-0.9.13/x11vnc/enc.h +=================================================================== +--- x11vnc-0.9.13.orig/x11vnc/enc.h ++++ x11vnc-0.9.13/x11vnc/enc.h +@@ -1733,7 +1733,7 @@ + } + + try6: +-#ifdef AF_INET6 ++#if X11VNC_IPV6 + if (!getenv("ULTRAVNC_DSM_HELPER_NOIPV6")) { + struct sockaddr_in6 sin; + int one = 1, sock = -1; diff --git a/package/x11vnc/x11vnc.mk b/package/x11vnc/x11vnc.mk index 9e1db05a50..a2d68f62e0 100644 --- a/package/x11vnc/x11vnc.mk +++ b/package/x11vnc/x11vnc.mk @@ -1,17 +1,70 @@ -############################################################# +################################################################################ # -# X11VNC +# x11vnc # -############################################################# -X11VNC_VERSION = 0.9.3 -X11VNC_SOURCE = x11vnc-$(X11VNC_VERSION).tar.gz -X11VNC_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/libvncserver -X11VNC_INSTALL_STAGING = NO -X11VNC_INSTALL_TARGET = YES +################################################################################ -X11VNC_CONF_OPT = \ - --without-avahi +X11VNC_VERSION = 0.9.13 +X11VNC_SITE = http://downloads.sourceforge.net/project/libvncserver/x11vnc/$(X11VNC_VERSION) +# sdl support is not used in x11vnc, but host include / library search paths +# leak in if host has sdl-config +X11VNC_CONF_OPT = --without-sdl -X11VNC_DEPENDENCIES = xserver_xorg-server xlib_libXt +X11VNC_DEPENDENCIES = xlib_libXt xlib_libXext xlib_libXtst -$(eval $(call AUTOTARGETS,package,x11vnc)) +ifneq ($(BR2_INET_IPV6),y) +# configure option only used for libvncserver +X11VNC_CONF_OPT += --without-ipv6 +X11VNC_CONF_ENV += CFLAGS='$(TARGET_CFLAGS) -DX11VNC_IPV6=0' +endif + +ifeq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yy) +X11VNC_DEPENDENCIES += avahi dbus +else +X11VNC_CONF_OPT += --without-avahi +endif + +ifeq ($(BR2_PACKAGE_JPEG),y) +X11VNC_DEPENDENCIES += jpeg +else +X11VNC_CONF_OPT += --without-jpeg +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +X11VNC_DEPENDENCIES += openssl +else +X11VNC_CONF_OPT += --without-ssl --without-crypto +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y) +X11VNC_DEPENDENCIES += xlib_libXinerama +else +X11VNC_CONF_OPT += --without-xinerama +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y) +X11VNC_DEPENDENCIES += xlib_libXrandr +else +X11VNC_CONF_OPT += --without-xrandr +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXFIXES),y) +X11VNC_DEPENDENCIES += xlib_libXfixes +else +X11VNC_CONF_OPT += --without-xfixes +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXDAMAGE),y) +X11VNC_DEPENDENCIES += xlib_libXdamage +else +X11VNC_CONF_OPT += --without-xdamage +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +X11VNC_DEPENDENCIES += zlib +else +X11VNC_CONF_OPT += --without-zlib +endif + + +$(eval $(autotools-package)) diff --git a/package/xavante/Config.in b/package/xavante/Config.in index a7df530217..be8e6d905d 100644 --- a/package/xavante/Config.in +++ b/package/xavante/Config.in @@ -1,6 +1,6 @@ config BR2_PACKAGE_XAVANTE bool "xavante" - select BR2_PACKAGE_LUA_SHARED_LIBRARY + # Runtime dependency only select BR2_PACKAGE_CGILUA select BR2_PACKAGE_COPAS select BR2_PACKAGE_COXPCALL diff --git a/package/xavante/xavante.mk b/package/xavante/xavante.mk index 525b09f40d..dd2a707d90 100644 --- a/package/xavante/xavante.mk +++ b/package/xavante/xavante.mk @@ -1,12 +1,12 @@ -############################################################# +################################################################################ # # xavante # -############################################################# +################################################################################ -XAVANTE_VERSION = 2.2.0 +XAVANTE_VERSION = 2.2.1 XAVANTE_SITE = http://github.com/downloads/keplerproject/xavante -XAVANTE_DEPENDENCIES = cgilua copas coxpcall lua luafilesystem luasocket wsapi +XAVANTE_LICENSE = MIT define XAVANTE_INSTALL_TARGET_CMDS $(MAKE) -C $(@D) PREFIX=/usr \ @@ -20,4 +20,4 @@ define XAVANTE_UNINSTALL_TARGET_CMDS rm -f "$(TARGET_DIR)/usr/share/sajax.lua" endef -$(eval $(call GENTARGETS,package,xavante)) +$(eval $(generic-package)) diff --git a/package/xenomai/Config.in b/package/xenomai/Config.in new file mode 100644 index 0000000000..02b6d0f223 --- /dev/null +++ b/package/xenomai/Config.in @@ -0,0 +1,101 @@ +comment "xenomai needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_i386 || BR2_x86_64 || BR2_arm || \ + BR2_bfin || BR2_powerpc || BR2_sh4 + +config BR2_PACKAGE_XENOMAI + bool "Xenomai Userspace" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_i386 || BR2_x86_64 || BR2_arm || \ + BR2_bfin || BR2_powerpc || BR2_sh4 + help + Real-Time Framework for Linux + http://www.xenomai.org + + Xenomai is split in two parts: a kernel part and an + userspace part. + + This package contains the userspace part, which consists + mainly in libraries to write userspace real-time programs + that interact with the in-kernel Xenomai real-time core. + + For those libraries to work, you need a Xenomai-enabled + kernel. This is possible in two ways: + - if you compile your kernel with Buildroot, you need to go + to Linux Kernel -> Linux Kernel Extensions to enable the + Xenomai extension. + - if you compile your kernel outside of Buildroot, you need + to make sure that it is Xenomai-enabled. + + Finally, if you are using a static /dev, make sure to + uncomment the Xenomai entries listed in + target/generic/device_table_dev.txt. + +if BR2_PACKAGE_XENOMAI + +config BR2_PACKAGE_XENOMAI_VERSION + string "Custom Xenomai version" + help + Manually select Xenomai version. If left empty, the default + version will be used. + + Make sure that the selected version has a patch for your + selected Linux kernel. If it does not, download and select + a patch manually with + BR2_LINUX_KERNEL_EXT_XENOMAI_ADEOS_PATCH, in the Linux + Kernel -> Linux Kernel Extensions menu. + +config BR2_PACKAGE_XENOMAI_TESTSUITE + bool "Install testsuite" + help + This option allows to install the Xenomai test programs. + +config BR2_PACKAGE_XENOMAI_RTCAN + bool "RTCan utilities" + help + This option allows to install the Xenomai RT-CAN utilities. + +config BR2_PACKAGE_XENOMAI_ANALOGY + bool "Analogy libs and utils" + help + This option allows to install the Xenomai Analogy utilities + and libraries + +config BR2_PACKAGE_XENOMAI_NATIVE_SKIN + bool "Native skin library" + default y + help + This option allows to install the Native Xenomai skin + +config BR2_PACKAGE_XENOMAI_POSIX_SKIN + bool "POSIX skin library" + default y + help + This option allows to install the POSIX Xenomai skin + +config BR2_PACKAGE_XENOMAI_VXWORKS_SKIN + bool "VX-Works skin library" + help + This option allows to install the VX-Works Xenomai skin + +config BR2_PACKAGE_XENOMAI_PSOS_SKIN + bool "PSOS skin library" + help + This option allows to install the PSOS Xenomai skin + +config BR2_PACKAGE_XENOMAI_RTAI_SKIN + bool "RTAI skin library" + help + This option allows to install the RTAI Xenomai skin + +config BR2_PACKAGE_XENOMAI_UITRON_SKIN + bool "uiTron skin library" + help + This option allows to install the uiTron Xenomai skin + +config BR2_PACKAGE_XENOMAI_VRTX_SKIN + bool "VRTX skin library" + help + This option allows to install the VRTX Xenomai skin + +endif diff --git a/package/xenomai/xenomai.mk b/package/xenomai/xenomai.mk new file mode 100644 index 0000000000..786bdfd211 --- /dev/null +++ b/package/xenomai/xenomai.mk @@ -0,0 +1,110 @@ +################################################################################ +# +# xenomai +# +################################################################################ + +XENOMAI_VERSION = $(call qstrip,$(BR2_PACKAGE_XENOMAI_VERSION)) +ifeq ($(XENOMAI_VERSION),) +XENOMAI_VERSION = 2.6.2.1 +endif + +XENOMAI_SITE = http://download.gna.org/xenomai/stable/ +XENOMAI_SOURCE = xenomai-$(XENOMAI_VERSION).tar.bz2 +XENOMAI_LICENSE = headers: GPLv2+ with exception, libraries: LGPLv2.1+, kernel: GPLv2+, docs: GFDLv1.2+, ipipe patch and can driver: GPLv2 +# GFDL is not included but refers to gnu.org +XENOMAI_LICENSE_FILES = debian/copyright include/COPYING src/skins/native/COPYING ksrc/nucleus/COPYING + +XENOMAI_INSTALL_STAGING = YES +XENOMAI_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install-user +XENOMAI_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) install-user + +XENOMAI_CONF_OPT += --includedir=/usr/include/xenomai/ + +define XENOMAI_REMOVE_DEVFILES + for i in xeno-config xeno-info wrap-link.sh ; do \ + rm -f $(TARGET_DIR)/usr/bin/$$i ; \ + done +endef + +XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_DEVFILES + +ifeq ($(BR2_PACKAGE_XENOMAI_TESTSUITE),) +define XENOMAI_REMOVE_TESTSUITE + rm -rf $(TARGET_DIR)/usr/share/xenomai/ + for i in klatency rtdm xeno xeno-load check-vdso \ + irqloop cond-torture-posix switchtest arith \ + sigtest clocktest cyclictest latency wakeup-time \ + xeno-test cond-torture-native mutex-torture-posix \ + mutex-torture-native ; do \ + rm -f $(TARGET_DIR)/usr/bin/$$i ; \ + done +endef + +XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_TESTSUITE +endif + +ifeq ($(BR2_PACKAGE_XENOMAI_RTCAN),) +define XENOMAI_REMOVE_RTCAN_PROGS + for i in rtcanrecv rtcansend ; do \ + rm -f $(TARGET_DIR)/usr/bin/$$i ; \ + done + rm -f $(TARGET_DIR)/usr/sbin/rtcanconfig +endef + +XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_RTCAN_PROGS +endif + +ifeq ($(BR2_PACKAGE_XENOMAI_ANALOGY),) +define XENOMAI_REMOVE_ANALOGY + for i in cmd_bits cmd_read cmd_write insn_write \ + insn_bits insn_read ; do \ + rm -f $(TARGET_DIR)/usr/bin/$$i ; \ + done + rm -f $(TARGET_DIR)/usr/sbin/analogy_config + rm -f $(TARGET_DIR)/usr/lib/libanalogy.* +endef + +XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_ANALOGY +endif + +XENOMAI_REMOVE_SKIN_LIST += $(if $(BR2_PACKAGE_XENOMAI_NATIVE_SKIN),,native) +XENOMAI_REMOVE_SKIN_LIST += $(if $(BR2_PACKAGE_XENOMAI_POSIX_SKIN),,posix) +XENOMAI_REMOVE_SKIN_LIST += $(if $(BR2_PACKAGE_XENOMAI_VXWORKS_SKIN),,vxworks) +XENOMAI_REMOVE_SKIN_LIST += $(if $(BR2_PACKAGE_XENOMAI_PSOS_SKIN),,psos) +XENOMAI_REMOVE_SKIN_LIST += $(if $(BR2_PACKAGE_XENOMAI_RTAI_SKIN),,rtai) +XENOMAI_REMOVE_SKIN_LIST += $(if $(BR2_PACKAGE_XENOMAI_UITRON_SKIN),,uitron) +XENOMAI_REMOVE_SKIN_LIST += $(if $(BR2_PACKAGE_XENOMAI_VRTX_SKIN),,vrtx) + +define XENOMAI_REMOVE_SKINS + for i in $(XENOMAI_REMOVE_SKIN_LIST) ; do \ + rm -f $(TARGET_DIR)/usr/lib/lib$$i.* ; \ + if [ $$i == "posix" ] ; then \ + rm -f $(TARGET_DIR)/usr/lib/posix.wrappers ; \ + fi ; \ + done +endef + +XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_SKINS + +define XENOMAI_DEVICES +/dev/rtheap c 666 0 0 10 254 0 0 - +/dev/rtscope c 666 0 0 10 253 0 0 - +/dev/rtp c 666 0 0 150 0 0 1 32 +endef + +ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV),y) +XENOMAI_DEPENDENCIES += udev + +define XENOMAI_INSTALL_UDEV_RULES + if test -d $(TARGET_DIR)/etc/udev/rules.d ; then \ + for f in $(@D)/ksrc/nucleus/udev/*.rules ; do \ + cp $$f $(TARGET_DIR)/etc/udev/rules.d/ ; \ + done ; \ + fi; +endef + +XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_INSTALL_UDEV_RULES +endif # udev + +$(eval $(autotools-package)) diff --git a/package/xerces/Config.in b/package/xerces/Config.in index b77794d772..8d55a5cbc2 100644 --- a/package/xerces/Config.in +++ b/package/xerces/Config.in @@ -1,11 +1,10 @@ config BR2_PACKAGE_XERCES bool "xerces-c++" depends on BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR - select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE help Xerces-C++ is a validating XML parser written in portable C++. http://xml.apache.org/xerces-c/ -comment "xerces-c++ requires a toolchain with C++ and WCHAR support enabled" +comment "xerces-c++ needs a toolchain w/ C++, wchar" depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR) diff --git a/package/xerces/xerces.mk b/package/xerces/xerces.mk index 6e84e64a84..7bd7070e11 100644 --- a/package/xerces/xerces.mk +++ b/package/xerces/xerces.mk @@ -1,118 +1,27 @@ -############################################################# +################################################################################ # # xerces # -############################################################# -XERCES_VERSION:=3.0.1 -XERCES_SOURCE:=xerces-c-$(XERCES_VERSION).tar.gz -XERCES_SITE:=http://archive.apache.org/dist/xerces/c/3/sources/ -XERCES_CAT:=$(ZCAT) -XERCES_DIR:=$(BUILD_DIR)/xerces-c-$(XERCES_VERSION) -LIBXERCES_BINARY:=libxerces-c-3.0.so - -# XERCES-C will install a number of applications -# in $(STAGING_DIR)/usr/bin -# We may want to copy these to the target - -XERCES_APPS:= \ - CreateDOMDocument \ - DOMCount \ - DOMPrint \ - EnumVal \ - MemParse \ - PParse \ - PSVIWriter \ - Redirect \ - SAX2Count \ - SAX2Print \ - SAXCount \ - SAXPrint \ - SCMPrint \ - SEnumVal \ - StdInParse - -# XERCES-C installs a 4.2MB worth of "*.hpp" files -# in the -# "dom", "framework", "internal", "parsers", -# "sax", "sax2", "util", "validators", "xinclude" -# directories - -XERCES_INCLUDES:=/usr/include/xercesc - -ifneq ($(BR2_ENABLE_LOCALE),y) -XERCES_MAKE_OPT=LIBS="-liconv" +################################################################################ + +XERCES_VERSION = 3.1.1 +XERCES_SOURCE = xerces-c-$(XERCES_VERSION).tar.gz +XERCES_SITE = http://archive.apache.org/dist/xerces/c/3/sources/ +XERCES_MAKE = $(MAKE1) +XERCES_INSTALL_STAGING = YES +XERCES_CONF_OPT = --disable-threads \ + --with-gnu-ld + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +XERCES_CONF_ENV += LIBS=-liconv +XERCES_DEPENDENCIES += libiconv endif -$(DL_DIR)/$(XERCES_SOURCE): - $(call DOWNLOAD,$(XERCES_SITE),$(XERCES_SOURCE)) - -xerces-source: $(DL_DIR)/$(XERCES_SOURCE) - -$(XERCES_DIR)/.unpacked: $(DL_DIR)/$(XERCES_SOURCE) - $(XERCES_CAT) $(DL_DIR)/$(XERCES_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - -# toolchain/patch-kernel.sh $(XERCES_DIR) package/xerces/ \*.patch* - touch $(XERCES_DIR)/.unpacked - -# Support for the following should be added later -# --with-curl= -# --with-icu= -# --with-pkgconfigdir= - -$(XERCES_DIR)/.configured: $(XERCES_DIR)/.unpacked - (cd $(XERCES_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --libdir=/usr/lib \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --enable-shared \ - --disable-threads \ - --disable-network \ - --with-gnu-ld \ - ) - touch $@ - -$(XERCES_DIR)/src/.libs/$(LIBXERCES_BINARY): $(XERCES_DIR)/.configured - $(MAKE1) $(TARGET_CONFIGURE_OPTS) $(XERCES_MAKE_OPT) -C $(XERCES_DIR) - -$(STAGING_DIR)/usr/lib/$(LIBXERCES_BINARY): $(XERCES_DIR)/src/.libs/$(LIBXERCES_BINARY) - $(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR=$(STAGING_DIR) \ - -C $(XERCES_DIR) install - $(INSTALL) -c $(XERCES_DIR)/src/.libs/libxerces-c.lai \ - $(STAGING_DIR)/usr/lib/libxerces-c.la - $(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libxerces-c.la - -$(TARGET_DIR)/usr/lib/$(LIBXERCES_BINARY): $(STAGING_DIR)/usr/lib/$(LIBXERCES_BINARY) - cp -a $(STAGING_DIR)/usr/lib/$(LIBXERCES_BINARY)* $(TARGET_DIR)/usr/lib - $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/$(LIBXERCES_BINARY) - -xerces: $(if $(BR2_PACKAGE_LIBICONV),libiconv) $(TARGET_DIR)/usr/lib/$(LIBXERCES_BINARY) - -xerces-bin: $(XERCES_DIR)/usr/lib/$(LIBXERCES_BINARY) - -xerces-tbin: $(STAGING_DIR)/usr/lib/$(LIBXERCES_BINARY) - -xerces-unpacked: $(XERCES_DIR)/.unpacked - -xerces-clean: - rm -rf $(STAGING_DIR)/usr/include/xercesc - rm -f $(STAGING_DIR)/lib/libxerces* - rm -f $(TARGET_DIR)/usr/lib/libxerces* - -$(MAKE) -C $(XERCES_DIR) clean - -xerces-dirclean: - rm -rf $(XERCES_DIR) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_XERCES),y) -TARGETS+=xerces +ifeq ($(BR2_PACKAGE_LIBCURL),y) +XERCES_CONF_OPT += --enable-netaccessor-curl +XERCES_DEPENDENCIES += libcurl +else +XERCES_CONF_OPT += --disable-network endif + +$(eval $(autotools-package)) diff --git a/package/xfsprogs/Config.in b/package/xfsprogs/Config.in index 12bc69e1eb..2df72ad106 100644 --- a/package/xfsprogs/Config.in +++ b/package/xfsprogs/Config.in @@ -2,14 +2,15 @@ comment "Note that xfsprogs needs a toolchain with UCLIBC_SV4_DEPRECATED and UCLIBC_HAS_OBSOLETE_BSD_SIGNAL enabled" depends on BR2_PACKAGE_XFSPROGS -comment "xfsprogs requires a toolchain with LARGEFILE support" - depends on !BR2_LARGEFILE +comment "xfsprogs needs a toolchain w/ largefile, wchar" + depends on !(BR2_LARGEFILE && BR2_USE_WCHAR) config BR2_PACKAGE_XFSPROGS bool "xfsprogs" depends on BR2_LARGEFILE - select BR2_PACKAGE_E2FSPROGS - select BR2_PACKAGE_E2FSPROGS_LIBUUID + depends on BR2_USE_WCHAR # util-linux + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID help The XFS file system utilities and libraries diff --git a/package/xfsprogs/xfsprogs.mk b/package/xfsprogs/xfsprogs.mk index 866e9b295c..4437e38a43 100644 --- a/package/xfsprogs/xfsprogs.mk +++ b/package/xfsprogs/xfsprogs.mk @@ -1,98 +1,22 @@ -############################################################# +################################################################################ # # xfsprogs # -############################################################# -XFSPROGS_VERSION:=3.0.3 -XFSPROGS_SOURCE=xfsprogs-$(XFSPROGS_VERSION).tar.gz -XFSPROGS_SITE=ftp://oss.sgi.com/projects/xfs/cmd_tars -XFSPROGS_DIR=$(BUILD_DIR)/xfsprogs-$(XFSPROGS_VERSION) -XFSPROGS_CAT:=$(ZCAT) -XFSPROGS_BINARY:=mkfs/mkfs.xfs -XFSPROGS_TARGET_BINARY:=sbin/mkfs.xfs +################################################################################ -XFSPROGS_STRIP:= fsck/fsck.xfs mkfile/xfs_mkfile rtcp/xfs_rtcp -XFSPROGS_STRIP_LIBDEP:= \ - copy/xfs_copy db/xfs_db growfs/xfs_growfs io/xfs_io \ - logprint/xfs_logprint mkfs/fstyp mkfs/mkfs.xfs \ - repair/xfs_repair quota/xfs_quota +XFSPROGS_VERSION = 3.1.11 +XFSPROGS_SITE = ftp://oss.sgi.com/projects/xfs/cmd_tars -$(DL_DIR)/$(XFSPROGS_SOURCE): - $(call DOWNLOAD,$(XFSPROGS_SITE),$(XFSPROGS_SOURCE)) +XFSPROGS_DEPENDENCIES = util-linux -xfsprogs-source: $(DL_DIR)/$(XFSPROGS_SOURCE) +XFSPROGS_CONF_ENV = ac_cv_header_aio_h=yes ac_cv_lib_rt_lio_listio=yes +XFSPROGS_CONF_OPT = \ + --enable-lib64=no \ + --enable-gettext=no \ + INSTALL_USER=root \ + INSTALL_GROUP=root -$(XFSPROGS_DIR)/.unpacked: $(DL_DIR)/$(XFSPROGS_SOURCE) - $(XFSPROGS_CAT) $(DL_DIR)/$(XFSPROGS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - toolchain/patch-kernel.sh $(XFSPROGS_DIR) package/xfsprogs/ xfsprogs\*.patch - touch $(XFSPROGS_DIR)/.unpacked +XFSPROGS_INSTALL_TARGET_OPT = DIST_ROOT=$(TARGET_DIR) install +XFSPROGS_UNINSTALL_TARGET_OPT = DIST_ROOT=$(TARGET_DIR) uninstall -#XFSPROGS_CONFIG_SHARED:=--disable-shared -XFSPROGS_CONFIG_SHARED:=--enable-shared - -$(XFSPROGS_DIR)/.configured: $(XFSPROGS_DIR)/.unpacked - (cd $(XFSPROGS_DIR); rm -rf config.cache; \ - ac_cv_header_aio_h=yes ac_cv_lib_rt_lio_listio=yes \ - $(TARGET_CONFIGURE_OPTS) \ - $(TARGET_CONFIGURE_ARGS) \ - CPPFLAGS="-I$(E2FSPROGS_DIR)/lib" \ - LDFLAGS="-L$(E2FSPROGS_DIR)/lib" \ - INSTALL_USER=$(shell whoami) \ - INSTALL_GROUP=$(shell groups | cut -d" " -f1) \ - ./configure $(QUIET) \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --exec-prefix=/ \ - --enable-gettext=no \ - $(XFSPROGS_CONFIG_SHARED) \ - ) - touch $(XFSPROGS_DIR)/.configured - -$(XFSPROGS_DIR)/$(XFSPROGS_BINARY): $(XFSPROGS_DIR)/.configured - $(MAKE1) PATH=$(TARGET_PATH) CPPFLAGS="-I$(E2FSPROGS_DIR)/lib" \ - LDFLAGS="-L$(E2FSPROGS_DIR)/lib" -C $(XFSPROGS_DIR) -ifeq ($(XFSPROGS_CONFIG_SHARED),--enable-shared) - ( \ - cd $(XFSPROGS_DIR); \ - $(STRIPCMD) $(XFSPROGS_STRIP); \ - $(STRIPCMD) $(join $(dir $(XFSPROGS_STRIP_LIBDEP)), \ - $(addprefix .libs/,$(notdir $(XFSPROGS_STRIP_LIBDEP)))) \ - ) - $(STRIPCMD) $(XFSPROGS_DIR)/lib*/.libs/lib*.so.*.* -else - ( \ - cd $(XFSPROGS_DIR); \ - $(STRIPCMD) $(XFSPROGS_STRIP) $(XFSPROGS_STRIP_LIBDEP) \ - ) - $(STRIPCMD) $(XFSPROGS_DIR)/lib*/lib*.so.*.* -endif - touch -c $(XFSPROGS_DIR)/$(XFSPROGS_BINARY) - -$(TARGET_DIR)/$(XFSPROGS_TARGET_BINARY): $(XFSPROGS_DIR)/$(XFSPROGS_BINARY) - $(MAKE1) PATH=$(TARGET_PATH) \ - DIST_ROOT=$(TARGET_DIR) \ - exec-prefix=/ \ - -C $(XFSPROGS_DIR) install - rm -rf $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc - touch -c $(TARGET_DIR)/$(XFSPROGS_TARGET_BINARY) - -xfsprogs: e2fsprogs $(TARGET_DIR)/$(XFSPROGS_TARGET_BINARY) - -xfsprogs-clean: - rm -f $(TARGET_DIR)/bin/xfs_* $(TARGET_DIR)/sbin/xfs_* $(TARGET_DIR)/sbin/*.xfs - rm -f $(TARGET_DIR)/usr/lib/libhandle.so* - rm -f $(TARGET_DIR)/usr/lib/libdisk.so* $(TARGET_DIR)/usr/lib/libxfs.so* - -$(MAKE1) -C $(XFSPROGS_DIR) clean - -xfsprogs-dirclean: - rm -rf $(XFSPROGS_DIR) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_XFSPROGS),y) -TARGETS+=xfsprogs -endif +$(eval $(autotools-package)) diff --git a/package/xinetd/Config.in b/package/xinetd/Config.in new file mode 100644 index 0000000000..7f3575cedb --- /dev/null +++ b/package/xinetd/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XINETD + bool "xinetd" + depends on BR2_USE_MMU # fork() + help + xinetd is a secure replacement for inetd. It was originally written by + panos@cs.colorado.edu. + + http://www.xinetd.org diff --git a/package/xinetd/xinetd-001-ar.patch b/package/xinetd/xinetd-001-ar.patch new file mode 100644 index 0000000000..566f2f75ee --- /dev/null +++ b/package/xinetd/xinetd-001-ar.patch @@ -0,0 +1,74 @@ +This patch changes all of the hard-coded invocations of "ar" to $(AR), to +support a cross-compilation toolchain. + +The content of this patch was copied from the OpenWrt project: +https://dev.openwrt.org/browser/packages/net/xinetd/patches/001-ar.patch + +Signed-off-by: Danomi Manchego + +--- a/libs/src/misc/Makefile.in ++++ b/libs/src/misc/Makefile.in +@@ -62,7 +62,7 @@ + + + $(LIBNAME): $(OBJECTS) +- ar r $@ $? ++ $(AR) r $@ $? + $(RANLIB) $@ + + install: $(LIBNAME) +--- a/libs/src/portable/Makefile.in ++++ b/libs/src/portable/Makefile.in +@@ -57,7 +57,7 @@ + + + $(LIBNAME): $(OBJECTS) +- ar r $@ $? ++ $(AR) r $@ $? + $(RANLIB) $@ + + install: $(LIBNAME) +--- a/libs/src/pset/Makefile.in ++++ b/libs/src/pset/Makefile.in +@@ -53,7 +53,7 @@ + mv $(LIBNAME) $(LIBDIR)/optimized + + $(LIBNAME): $(OBJECTS) +- ar r $@ $? ++ $(AR) r $@ $? + $(RANLIB) $@ + + install: $(LIBNAME) +--- a/libs/src/sio/Makefile.in ++++ b/libs/src/sio/Makefile.in +@@ -52,7 +52,7 @@ + $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)/optimized + + $(LIBNAME): $(OBJECTS) +- ar r $@ $? ++ $(AR) r $@ $? + $(RANLIB) $@ + + install: $(LIBNAME) +--- a/libs/src/str/Makefile.in ++++ b/libs/src/str/Makefile.in +@@ -63,7 +63,7 @@ + $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)-O + + $(LIBNAME): $(OBJECTS) +- ar r $@ $? ++ $(AR) r $@ $? + $(RANLIB) $@ + + LINT_IGNORE=possible pointer alignment|RCSid unused +--- a/libs/src/xlog/Makefile.in ++++ b/libs/src/xlog/Makefile.in +@@ -58,7 +58,7 @@ + $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)/optimized + + $(LIBNAME): $(OBJECTS) +- ar r $@ $? ++ $(AR) r $@ $? + $(RANLIB) $@ + + install: $(LIBNAME) diff --git a/package/xinetd/xinetd-002-destdir.patch b/package/xinetd/xinetd-002-destdir.patch new file mode 100644 index 0000000000..7a323eb68a --- /dev/null +++ b/package/xinetd/xinetd-002-destdir.patch @@ -0,0 +1,55 @@ +This patch adds $(DESTDIR) to xinetd's installation paths, to support +installation to a cross-compiled RFS area. + +The content of this patch was inspired by the OpenWrt project: +https://dev.openwrt.org/browser/packages/net/xinetd/patches/002-destdir.patch + +Signed-off-by: Danomi Manchego + +diff -urN xinetd-2.3.15.ORIG/Makefile.in xinetd-2.3.15/Makefile.in +--- xinetd-2.3.15.ORIG/Makefile.in 2007-09-20 13:01:52.000000000 -0400 ++++ xinetd-2.3.15/Makefile.in 2012-06-18 10:20:00.540864388 -0400 +@@ -75,27 +75,27 @@ + + install: build + for i in $(DAEMONDIR) $(BINDIR) $(MANDIR)/man5 $(MANDIR)/man8 ; do \ +- test -d $$i || mkdir -p $$i ; done +- $(INSTALL_CMD) -m 755 xinetd/xinetd $(DAEMONDIR) +- $(INSTALL_CMD) -m 755 xinetd/itox $(DAEMONDIR) +- $(INSTALL_CMD) -m 755 $(SRCDIR)/xinetd/xconv.pl $(DAEMONDIR) +- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.conf.man $(MANDIR)/man5/xinetd.conf.5 +- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.log.man $(MANDIR)/man8/xinetd.log.8 +- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.man $(MANDIR)/man8/xinetd.8 +- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/itox.8 $(MANDIR)/man8/itox.8 +- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xconv.pl.8 $(MANDIR)/man8/xconv.pl.8 ++ test -d $(DESTDIR)$$i || mkdir -p $(DESTDIR)$$i ; done ++ $(INSTALL_CMD) -m 755 xinetd/xinetd $(DESTDIR)$(DAEMONDIR) ++ $(INSTALL_CMD) -m 755 xinetd/itox $(DESTDIR)$(DAEMONDIR) ++ $(INSTALL_CMD) -m 755 $(SRCDIR)/xinetd/xconv.pl $(DESTDIR)$(DAEMONDIR) ++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.conf.man $(DESTDIR)$(MANDIR)/man5/xinetd.conf.5 ++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.log.man $(DESTDIR)$(MANDIR)/man8/xinetd.log.8 ++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.man $(DESTDIR)$(MANDIR)/man8/xinetd.8 ++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/itox.8 $(DESTDIR)$(MANDIR)/man8/itox.8 ++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xconv.pl.8 $(DESTDIR)$(MANDIR)/man8/xconv.pl.8 + @echo "You must put your xinetd.conf in /etc/xinetd.conf" + @echo "There is a sample config file in xinetd/sample.conf and you can" + @echo "use xconv.pl to convert your old inetd.conf file to an xinetd format" + + uninstall: +- rm -f $(DAEMONDIR)/xinetd +- rm -f $(DAEMONDIR)/itox +- rm -f $(DAEMONDIR)/xconv.pl +- rm -f $(MANDIR)/man5/xinetd.conf.5 +- rm -f $(MANDIR)/man8/xinetd.log.8 +- rm -f $(MANDIR)/man8/xinetd.8 +- rm -f $(MANDIR)/man8/itox.8 ++ rm -f $(DESTDIR)$(DAEMONDIR)/xinetd ++ rm -f $(DESTDIR)$(DAEMONDIR)/itox ++ rm -f $(DESTDIR)$(DAEMONDIR)/xconv.pl ++ rm -f $(DESTDIR)$(MANDIR)/man5/xinetd.conf.5 ++ rm -f $(DESTDIR)$(MANDIR)/man8/xinetd.log.8 ++ rm -f $(DESTDIR)$(MANDIR)/man8/xinetd.8 ++ rm -f $(DESTDIR)$(MANDIR)/man8/itox.8 + + distclean: clean + rm -f config.cache config.log Makefile config.status xinetd/itox diff --git a/package/xinetd/xinetd-003-rpc-fix.patch b/package/xinetd/xinetd-003-rpc-fix.patch new file mode 100644 index 0000000000..6c32b7291e --- /dev/null +++ b/package/xinetd/xinetd-003-rpc-fix.patch @@ -0,0 +1,26 @@ +This patch fixes compiling xinetd without RPC support. + +The content of this patch was copied from the OpenWrt project: +https://dev.openwrt.org/browser/packages/net/xinetd/patches/003-rpc_fix.patch + +Signed-off-by: Danomi Manchego + +--- a/xinetd/confparse.c ++++ b/xinetd/confparse.c +@@ -745,7 +745,7 @@ static status_e check_entry( struct serv + } + } + +-/* #ifndef NO_RPC */ ++#ifndef NO_RPC + #if defined(HAVE_RPC_RPCENT_H) || defined(HAVE_NETDB_H) + if ( SC_IS_RPC( scp ) && !SC_IS_UNLISTED( scp ) ) + { +@@ -759,6 +759,7 @@ static status_e check_entry( struct serv + SC_RPCDATA( scp )->rd_program_number = rep->r_number ; + } + else ++#endif + #endif /* ! NO_RPC */ + { + if ( !SC_IS_UNLISTED( scp ) ) diff --git a/package/xinetd/xinetd.mk b/package/xinetd/xinetd.mk new file mode 100644 index 0000000000..34a449f907 --- /dev/null +++ b/package/xinetd/xinetd.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# xinetd +# +################################################################################ + +XINETD_VERSION = 2.3.15 +XINETD_SITE = http://www.xinetd.org +XINETD_LICENSE = xinetd license +XINETD_LICENSE_FILES = COPYRIGHT + +XINETD_CFLAGS = $(TARGET_CFLAGS) + +# Three cases here: +# 1. We have libtirpc, use it by passing special flags +# 2. We have native RPC support, use it, no need to pass special +# flags (so this case 2 is implicit and not visible below) +# 3. We don't have RPC support, pass -DNO_RPC to disable it +ifeq ($(BR2_PACKAGE_LIBTIRPC),y) +XINETD_DEPENDENCIES += libtirpc +XINETD_CFLAGS += -I$(STAGING_DIR)/usr/include/tirpc/ +XINETD_LIBS += -ltirpc +else ifeq ($(BR2_TOOLCHAIN_HAS_NATIVE_RPC),) +XINETD_CFLAGS += -DNO_RPC +endif + +XINETD_CONF_ENV += \ + CFLAGS="$(XINETD_CFLAGS)" \ + LIBS="$(XINETD_LIBS)" + +XINETD_MAKE_OPT = AR="$(TARGET_AR)" + +$(eval $(autotools-package)) diff --git a/package/xl2tp/Config.in b/package/xl2tp/Config.in index 8f9d9b110b..7e2d2f6e97 100644 --- a/package/xl2tp/Config.in +++ b/package/xl2tp/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_XL2TP bool "xl2tp" + depends on BR2_USE_MMU # fork() select BR2_PACKAGE_LIBPCAP help Layer 2 Tunnelling Protocol (RFC2661). diff --git a/package/xl2tp/xl2tp-1.2.7-makefile-flags.patch b/package/xl2tp/xl2tp-1.2.7-makefile-flags.patch deleted file mode 100644 index 68a56a60b3..0000000000 --- a/package/xl2tp/xl2tp-1.2.7-makefile-flags.patch +++ /dev/null @@ -1,33 +0,0 @@ -Make sure that the CFLAGS passed on the command line are taken into -account. - ---- xl2tp-1.2.7/Makefile-orig 2010-08-05 15:33:46.000000000 -0700 -+++ xl2tp-1.2.7/Makefile 2010-09-30 22:34:54.000000000 -0700 -@@ -90,7 +90,7 @@ OSFLAGS?= -DLINUX -I$(KERNELSRC)/include - - IPFLAGS?= -DIP_ALLOCATION - --CFLAGS+= $(DFLAGS) -O2 -fno-builtin -Wall -DSANITY $(OSFLAGS) $(IPFLAGS) -+COMPILE_FLAGS+= $(DFLAGS) -fno-builtin -Wall -DSANITY $(OSFLAGS) $(IPFLAGS) - HDRS=l2tp.h avp.h misc.h control.h call.h scheduler.h file.h aaa.h md5.h - OBJS=xl2tpd.o pty.o misc.o control.o avp.o call.o network.o avpsend.o scheduler.o file.o aaa.o md5.o - SRCS=${OBJS:.o=.c} ${HDRS} -@@ -105,6 +105,9 @@ MANDIR?=$(DESTDIR)${PREFIX}/share/man - - all: $(EXEC) pfc - -+%.o: %.c -+ $(CC) $(COMPILE_FLAGS) $(CFLAGS) -c -o $@ -shared $< -+ - clean: - rm -f $(OBJS) $(EXEC) pfc.o pfc - -@@ -112,7 +115,7 @@ $(EXEC): $(OBJS) $(HDRS) - $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS) - - pfc: -- $(CC) $(CFLAGS) -c contrib/pfc.c -+ $(CC) $(COMPILE_FLAGS) $(CFLAGS) -c contrib/pfc.c - $(CC) $(LDFLAGS) -lpcap $(LDLIBS) -o pfc pfc.o - - romfs: diff --git a/package/xl2tp/xl2tp-1.2.7-legacy.patch b/package/xl2tp/xl2tp-legacy.patch similarity index 100% rename from package/xl2tp/xl2tp-1.2.7-legacy.patch rename to package/xl2tp/xl2tp-legacy.patch diff --git a/package/xl2tp/xl2tp.mk b/package/xl2tp/xl2tp.mk index bcaacf3ba7..7b0a228ae6 100644 --- a/package/xl2tp/xl2tp.mk +++ b/package/xl2tp/xl2tp.mk @@ -1,33 +1,20 @@ -############################################################# +################################################################################ # # xl2tp # -############################################################# -XL2TP_VERSION = 1.2.7 -XL2TP_SOURCE = xl2tpd-$(XL2TP_VERSION).tar.gz -XL2TP_SITE = ftp://ftp.xelerance.com/xl2tpd/ +################################################################################ +XL2TP_VERSION = v1.3.1 +XL2TP_SITE = http://github.com/xelerance/xl2tpd/tarball/$(XL2TP_VERSION) XL2TP_DEPENDENCIES = libpcap define XL2TP_BUILD_CMDS - $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) + $(SED) 's/ -O2 //' $(@D)/Makefile + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) endef define XL2TP_INSTALL_TARGET_CMDS $(MAKE) DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D) install endef -define XL2TP_UNINSTALL_TARGET_CMDS - rm -f $(TARGET_DIR)/usr/bin/pfc - rm -f $(TARGET_DIR)/usr/sbin/xl2tpd - rm -f $(TARGET_DIR)/usr/share/man/man1/pfc.1 - rm -f $(TARGET_DIR)/usr/share/man/man8/xl2tpd.8 - rm -f $(TARGET_DIR)/usr/share/man/man5/xl2tpd.conf.5 - rm -f $(TARGET_DIR)/usr/share/man/man5/l2tp-secrets.5 -endef - -define XL2TP_CLEAN_CMDS - -$(MAKE) -C $(@D) clean -endef - -$(eval $(call GENTARGETS,package,xl2tp)) +$(eval $(generic-package)) diff --git a/package/xmlstarlet/xmlstarlet.mk b/package/xmlstarlet/xmlstarlet.mk index d7613f8085..16f736ee88 100644 --- a/package/xmlstarlet/xmlstarlet.mk +++ b/package/xmlstarlet/xmlstarlet.mk @@ -1,14 +1,13 @@ -############################################################# +################################################################################ # -# XMLstarlet +# xmlstarlet # -############################################################# +################################################################################ -XMLSTARLET_VERSION:=1.0.4 -XMLSTARLET_SOURCE:=xmlstarlet-$(XMLSTARLET_VERSION).tar.gz -XMLSTARLET_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/project/xmlstar/xmlstarlet/$(XMLSTARLET_VERSION) -XMLSTARLET_INSTALL_STAGING:=NO -XMLSTARLET_INSTALL_TARGET:=YES +XMLSTARLET_VERSION = 1.5.0 +XMLSTARLET_SITE = http://downloads.sourceforge.net/project/xmlstar/xmlstarlet/$(XMLSTARLET_VERSION) +XMLSTARLET_LICENSE = MIT +XMLSTARLET_LICENSE_FILES = COPYING XMLSTARLET_DEPENDENCIES += libxml2 libxslt \ $(if $(BR2_PACKAGE_LIBICONV),libiconv) @@ -18,4 +17,4 @@ XMLSTARLET_CONF_OPT += --disable-static-libs \ --with-libxslt-prefix=${STAGING_DIR}/usr \ --with-libiconv-prefix=${STAGING_DIR}/usr -$(eval $(call AUTOTARGETS,package,xmlstarlet)) +$(eval $(autotools-package)) diff --git a/package/xscreensaver/Config.in b/package/xscreensaver/Config.in new file mode 100644 index 0000000000..21a19d001e --- /dev/null +++ b/package/xscreensaver/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_XSCREENSAVER + bool "xscreensaver" + depends on BR2_PACKAGE_XORG7 + depends on BR2_INSTALL_LIBSTDCPP # libgtk2->pango + depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk2->glib2 + select BR2_PACKAGE_LIBGTK2 + select BR2_PACKAGE_LIBGLADE + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXT + help + XScreenSaver is the standard screen saver collection shipped on most + Linux and Unix systems running the X11 Window System. + + On X11 systems, XScreenSaver is two things: it is both a large + collection of screen savers; and it is also the framework for + blanking and locking the screen. + + http://www.jwz.org/xscreensaver/ + +comment "xscreensaver needs a toolchain w/ C++, threads" + depends on BR2_PACKAGE_XORG7 + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/xscreensaver/xscreensaver-0001-fix-cross-compile-ansi-c-bailout.patch b/package/xscreensaver/xscreensaver-0001-fix-cross-compile-ansi-c-bailout.patch new file mode 100644 index 0000000000..4d05f03614 --- /dev/null +++ b/package/xscreensaver/xscreensaver-0001-fix-cross-compile-ansi-c-bailout.patch @@ -0,0 +1,29 @@ +The configure bails out when cross-compiling, because it is over-cautious +about ANSI support in the C compiler. Work around this by disabling the +bail-out code. + +Signed-off-by: Simon Dawson + +diff -Nurp a/configure b/configure +--- a/configure 2013-07-16 10:23:32.000000000 +0100 ++++ b/configure 2013-09-22 14:50:07.186953454 +0100 +@@ -3537,9 +3537,7 @@ $as_echo "Solaris: adding -D__EXTENSIONS + { $as_echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5 + $as_echo_n "checking whether the compiler works on ANSI C... " >&6; } + if test "$cross_compiling" = yes; then +- { { $as_echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5 +-$as_echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;} +- { (exit 1); exit 1; }; } ++ : + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -8616,7 +8614,7 @@ fi + $as_echo "$ac_cv_xpointer" >&6; } + if test "$ac_cv_xpointer" != yes; then + cat >>confdefs.h <<\_ACEOF +-#define XPointer char* ++/* #define XPointer char* */ + _ACEOF + + fi diff --git a/package/xscreensaver/xscreensaver-0002-fix-minixpm-build-problem.patch b/package/xscreensaver/xscreensaver-0002-fix-minixpm-build-problem.patch new file mode 100644 index 0000000000..842fb205bf --- /dev/null +++ b/package/xscreensaver/xscreensaver-0002-fix-minixpm-build-problem.patch @@ -0,0 +1,134 @@ +Fix compile and link errors related to the minixpm code. + +Signed-off-by: Simon Dawson + +diff -Nurp a/hacks/Makefile.in b/hacks/Makefile.in +--- a/hacks/Makefile.in 2013-07-16 10:23:32.000000000 +0100 ++++ b/hacks/Makefile.in 2013-09-22 18:47:56.389238980 +0100 +@@ -73,17 +73,22 @@ UTIL_SRCS = $(UTILS_SRC)/alpha.c $(UTILS + $(UTILS_SRC)/minixpm.c \ + $(UTILS_SRC)/yarandom.c $(UTILS_SRC)/erase.c \ + $(UTILS_SRC)/xshm.c $(UTILS_SRC)/xdbe.c \ +- $(UTILS_SRC)/textclient.c ++ $(UTILS_SRC)/colorbars.c \ ++ $(UTILS_SRC)/fade.c \ ++ $(UTILS_SRC)/textclient.c \ ++ $(UTILS_SRC)/overlay.c + UTIL_OBJS = $(UTILS_BIN)/alpha.o $(UTILS_BIN)/colors.o \ + $(UTILS_BIN)/grabclient.o \ + $(UTILS_BIN)/hsv.o $(UTILS_BIN)/resources.o \ + $(UTILS_BIN)/spline.o $(UTILS_BIN)/usleep.o \ + $(UTILS_BIN)/visual.o $(UTILS_BIN)/logo.o \ +- $(UTILS_SRC)/minixpm.c \ ++ $(UTILS_BIN)/minixpm.o \ + $(UTILS_BIN)/yarandom.o $(UTILS_BIN)/erase.o \ + $(UTILS_BIN)/xshm.o $(UTILS_BIN)/xdbe.o \ + $(UTILS_BIN)/colorbars.o \ +- $(UTILS_SRC)/textclient.o ++ $(UTILS_BIN)/fade.o \ ++ $(UTILS_BIN)/textclient.o \ ++ $(UTILS_BIN)/overlay.o + + SRCS = attraction.c blitspin.c bouboule.c braid.c bubbles.c \ + bubbles-default.c decayscreen.c deco.c drift.c flag.c \ +@@ -559,11 +564,11 @@ xscreensaver-sgigl: xscreensaver-sgigl.c + attraction: attraction.o $(HACK_OBJS) $(COL) $(SPL) + $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(COL) $(SPL) $(HACK_LIBS) + +-blitspin: blitspin.o $(HACK_OBJS) $(GRAB) $(XPM) +- $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(GRAB) $(XPM) $(XPM_LIBS) ++blitspin: blitspin.o $(HACK_OBJS) $(GRAB) $(XPM) $(MINIXPM) ++ $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(GRAB) $(XPM) $(MINIXPM) $(XPM_LIBS) + +-bubbles: bubbles.o $(HACK_OBJS) bubbles-default.o $(XPM) +- $(CC_HACK) -o $@ $@.o $(HACK_OBJS) bubbles-default.o $(XPM) $(XPM_LIBS) ++bubbles: bubbles.o $(HACK_OBJS) bubbles-default.o $(XPM) $(MINIXPM) ++ $(CC_HACK) -o $@ $@.o $(HACK_OBJS) bubbles-default.o $(XPM) $(MINIXPM) $(XPM_LIBS) + + decayscreen: decayscreen.o $(HACK_OBJS) $(GRAB) + $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(GRAB) $(HACK_LIBS) +@@ -604,8 +609,8 @@ moire: moire.o $(HACK_OBJS) $(COL) $(S + moire2: moire2.o $(HACK_OBJS) $(COL) $(DBE) + $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(COL) $(DBE) $(HACK_LIBS) + +-noseguy: noseguy.o $(HACK_OBJS) $(XPM) $(TEXT) +- $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(XPM) $(TEXT) $(XPM_LIBS) $(TEXT_LIBS) ++noseguy: noseguy.o $(HACK_OBJS) $(XPM) $(TEXT) $(MINIXPM) ++ $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(XPM) $(TEXT) $(MINIXPM) $(XPM_LIBS) $(TEXT_LIBS) + + pedal: pedal.o $(HACK_OBJS) $(HSV) $(ERASE) + $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HSV) $(ERASE) $(HACK_LIBS) +@@ -658,14 +663,14 @@ interference: interference.o $(HACK_OBJ + truchet: truchet.o $(HACK_OBJS) $(COL) + $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(COL) $(HACK_LIBS) + +-bsod: bsod.o $(HACK_OBJS) $(GRAB) $(APPLE2) $(XPM) +- $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(GRAB) $(APPLE2) $(XPM) $(XPM_LIBS) ++bsod: bsod.o $(HACK_OBJS) $(GRAB) $(APPLE2) $(XPM) $(MINIXPM) ++ $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(GRAB) $(APPLE2) $(XPM) $(MINIXPM) $(XPM_LIBS) + + apple2: apple2.o apple2-main.o $(HACK_OBJS) $(ATV) $(GRAB) $(TEXT) + $(CC_HACK) -o $@ $@.o apple2-main.o $(HACK_OBJS) $(ATV) $(GRAB) $(TEXT) $(XPM_LIBS) $(TEXT_LIBS) + +-xanalogtv: xanalogtv.o $(HACK_OBJS) $(ATV) $(GRAB) $(XPM) +- $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(ATV) $(GRAB) $(XPM) $(XPM_LIBS) $(HACK_LIBS) ++xanalogtv: xanalogtv.o $(HACK_OBJS) $(ATV) $(GRAB) $(XPM) $(MINIXPM) ++ $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(ATV) $(GRAB) $(XPM) $(MINIXPM) $(XPM_LIBS) $(HACK_LIBS) + + distort: distort.o $(HACK_OBJS) $(GRAB) $(SHM) + $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(GRAB) $(SHM) $(HACK_LIBS) +@@ -688,8 +693,8 @@ compass: compass.o $(HACK_OBJS) $(DBE) + squiral: squiral.o $(HACK_OBJS) $(COL) + $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(COL) $(HACK_LIBS) + +-xflame: xflame.o $(HACK_OBJS) $(SHM) $(XPM) +- $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(SHM) $(XPM) $(XPM_LIBS) ++xflame: xflame.o $(HACK_OBJS) $(SHM) $(XPM) $(MINIXPM) ++ $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(SHM) $(XPM) $(MINIXPM) $(XPM_LIBS) + + wander: wander.o $(HACK_OBJS) $(COL) $(ERASE) + $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(COL) $(ERASE) $(HACK_LIBS) +@@ -703,8 +708,8 @@ critical: critical.o $(HACK_OBJS) $(COL) + phosphor: phosphor.o $(HACK_OBJS) $(TEXT) $(COL) + $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(TEXT) $(COL) $(HACK_LIBS) $(TEXT_LIBS) + +-xmatrix: xmatrix.o $(HACK_OBJS) $(TEXT) $(XPM) +- $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(TEXT) $(XPM) $(XPM_LIBS) $(TEXT_LIBS) ++xmatrix: xmatrix.o $(HACK_OBJS) $(TEXT) $(XPM) $(MINIXPM) ++ $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(TEXT) $(XPM) $(MINIXPM) $(XPM_LIBS) $(TEXT_LIBS) + + petri: petri.o $(HACK_OBJS) $(COL) $(SPL) + $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(COL) $(SPL) $(HACK_LIBS) +@@ -787,8 +792,8 @@ cloudlife: cloudlife.o $(HACK_OBJS) $(CO + fontglide: fontglide.o $(HACK_OBJS) $(DBE) $(TEXT) + $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(DBE) $(TEXT) $(HACK_LIBS) $(TEXT_LIBS) + +-pong: pong.o $(HACK_OBJS) $(ATV) $(GRAB) $(XPM) +- $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(ATV) $(GRAB) $(XPM) $(XPM_LIBS) $(HACK_LIBS) ++pong: pong.o $(HACK_OBJS) $(ATV) $(GRAB) $(XPM) $(MINIXPM) ++ $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(ATV) $(GRAB) $(XPM) $(MINIXPM) $(XPM_LIBS) $(HACK_LIBS) + + wormhole: wormhole.o $(HACK_OBJS) + $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS) +@@ -856,8 +861,8 @@ braid: braid.o $(XLOCK_OBJS) $(ERASE) + drift: drift.o $(XLOCK_OBJS) $(ERASE) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(ERASE) $(HACK_LIBS) + +-flag: flag.o $(XLOCK_OBJS) $(XPM) +- $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(XPM) $(XPM_LIBS) ++flag: flag.o $(XLOCK_OBJS) $(XPM) $(MINIXPM) ++ $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(XPM) $(MINIXPM) $(XPM_LIBS) + + forest: forest.o $(XLOCK_OBJS) $(ERASE) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(ERASE) $(HACK_LIBS) +@@ -959,8 +964,8 @@ thornbird: thornbird.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + + PACOBJS=pacman_ai.o pacman_level.o +-pacman: pacman.o $(PACOBJS) $(XLOCK_OBJS) $(XPM) +- $(CC_HACK) -o $@ $@.o $(PACOBJS) $(XLOCK_OBJS) $(XPM) $(XPM_LIBS) ++pacman: pacman.o $(PACOBJS) $(XLOCK_OBJS) $(XPM) $(MINIXPM) ++ $(CC_HACK) -o $@ $@.o $(PACOBJS) $(XLOCK_OBJS) $(XPM) $(MINIXPM) $(XPM_LIBS) + + fiberlamp: fiberlamp.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) diff --git a/package/xscreensaver/xscreensaver.mk b/package/xscreensaver/xscreensaver.mk new file mode 100644 index 0000000000..0e84d27004 --- /dev/null +++ b/package/xscreensaver/xscreensaver.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# xscreensaver +# +################################################################################ + +XSCREENSAVER_VERSION = 5.22 +XSCREENSAVER_SITE = http://www.jwz.org/xscreensaver + +# N.B. GPLv2+ code (in the hacks/glx subdirectory) is not currently built. +XSCREENSAVER_LICENSE = MIT-like GPLv2+ +XSCREENSAVER_LICENSE_FILES = hacks/screenhack.h hacks/glx/chessmodels.h + +XSCREENSAVER_DEPENDENCIES = jpeg libglade libgtk2 xlib_libX11 xlib_libXt \ + $(if $(BR2_PACKAGE_GETTEXT),gettext) + +XSCREENSAVER_CONF_ENV = $(if $(BR2_PACKAGE_GETTEXT),LIBS=-lintl) + +# otherwise we end up with host include/library dirs passed to the +# compiler/linker +XSCREENSAVER_CONF_OPT = \ + --includedir=$(STAGING_DIR)/usr/include \ + --libdir=$(STAGING_DIR)/usr/lib + +XSCREENSAVER_INSTALL_TARGET_OPT = install_prefix="$(TARGET_DIR)" install + +$(eval $(autotools-package)) diff --git a/package/xstroke/Config.in b/package/xstroke/Config.in index 5589fe6a4f..4f3f5f6c37 100644 --- a/package/xstroke/Config.in +++ b/package/xstroke/Config.in @@ -1,10 +1,14 @@ config BR2_PACKAGE_XSTROKE bool "xstroke" depends on BR2_PACKAGE_XORG7 + # dead upstream, probably not many users + depends on BR2_DEPRECATED select BR2_PACKAGE_XLIB_LIBXFT select BR2_PACKAGE_XLIB_LIBXTST select BR2_PACKAGE_XLIB_LIBXPM + select BR2_PACKAGE_XLIB_LIBXRENDER + select BR2_PACKAGE_XLIB_LIBXEXT help Handwriting recognition for X - http://avr32linux.org/twiki/pub/Main/XStroke + http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/XStroke diff --git a/package/xstroke/xstroke-fix-link-issues.patch b/package/xstroke/xstroke-fix-link-issues.patch new file mode 100644 index 0000000000..9a6d71ed17 --- /dev/null +++ b/package/xstroke/xstroke-fix-link-issues.patch @@ -0,0 +1,35 @@ +Fix link issues by linking against all needed libraries + +Since gcc 4.6, all libraries that are directly used must be explicitly +passed on the command line. In the case of xstroke, linking against +Xrender, Xext and dl was missing. For the first two, they are added +through addition PKG_CHECK_MODULES() checks, for the latter, it is +added next to -lm and -lpthread in Makefile.am. + +Signed-off-by: Thomas Petazzoni +Index: b/Makefile.am +=================================================================== +--- a/Makefile.am ++++ b/Makefile.am +@@ -40,7 +40,7 @@ + BUILT_SOURCES = rec_parse.h rec_lex.h rec_lex.c + AM_YFLAGS = -d + +-xstroke_LDADD = @XSTROKE_LIBS@ -lm -lpthread $(X_LIBS) -lXpm -lXtst ++xstroke_LDADD = @XSTROKE_LIBS@ -ldl -lm -lpthread $(X_LIBS) -lXpm -lXtst + AM_CFLAGS = @XSTROKE_CFLAGS@ -DXSTROKE_CONF_DIR='"$(sysconfdir)/xstroke"' $(X_CFLAGS) + + EXTRA_DIST = xstroke_active.xpm xstroke_inactive.xpm etc/alphabet +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -26,7 +26,7 @@ + AC_CHECK_FUNCS([gettimeofday localtime_r]) + + AC_PATH_XTRA +-PKG_CHECK_MODULES(XSTROKE, xft) ++PKG_CHECK_MODULES(XSTROKE, [xft xrender xext]) + + AC_CONFIG_FILES([Makefile]) + AC_OUTPUT diff --git a/package/xstroke/xstroke.mk b/package/xstroke/xstroke.mk index f6795b5a2a..bc4b2c636d 100644 --- a/package/xstroke/xstroke.mk +++ b/package/xstroke/xstroke.mk @@ -1,13 +1,13 @@ -############################################################# +################################################################################ # # xstroke # -############################################################# -XSTROKE_VERSION = 0.6 -XSTROKE_SOURCE = xstroke-$(XSTROKE_VERSION).tar.gz -XSTROKE_SITE = http://avr32linux.org/twiki/pub/Main/XStroke +################################################################################ -XSTROKE_DEPENDENCIES = xlib_libXft xlib_libXtst xlib_libXpm +XSTROKE_VERSION = 0.6 +XSTROKE_SITE = http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/XStroke -$(eval $(call AUTOTARGETS,package,xstroke)) +XSTROKE_DEPENDENCIES = xlib_libXft xlib_libXtst xlib_libXpm xlib_libXrender xlib_libXext +XSTROKE_AUTORECONF = YES +$(eval $(autotools-package)) diff --git a/package/xterm/Config.in b/package/xterm/Config.in index 9473fad85e..33adf25f4f 100644 --- a/package/xterm/Config.in +++ b/package/xterm/Config.in @@ -1,7 +1,9 @@ config BR2_PACKAGE_XTERM bool "xterm" + select BR2_PACKAGE_NCURSES select BR2_PACKAGE_XLIB_LIBXAW depends on BR2_PACKAGE_XORG7 help xterm terminal emulator + http://invisible-island.net/xterm/ diff --git a/package/xterm/xterm.mk b/package/xterm/xterm.mk index 8952e24dfc..ec8251fa47 100644 --- a/package/xterm/xterm.mk +++ b/package/xterm/xterm.mk @@ -1,13 +1,13 @@ -############################################################# +################################################################################ # # xterm # -############################################################# +################################################################################ -XTERM_VERSION:=262 -XTERM_SOURCE:=xterm-$(XTERM_VERSION).tgz -XTERM_SITE:=ftp://invisible-island.net/xterm -XTERM_DEPENDENCIES = xserver_xorg-server xlib_libXaw +XTERM_VERSION = 278 +XTERM_SOURCE = xterm-$(XTERM_VERSION).tgz +XTERM_SITE = ftp://invisible-island.net/xterm +XTERM_DEPENDENCIES = ncurses xlib_libXaw XTERM_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install -$(eval $(call AUTOTARGETS,package,xterm)) +$(eval $(autotools-package)) diff --git a/package/xvkbd/Config.in b/package/xvkbd/Config.in index a75687d213..bd3f2aa8a0 100644 --- a/package/xvkbd/Config.in +++ b/package/xvkbd/Config.in @@ -1,7 +1,14 @@ config BR2_PACKAGE_XVKBD bool "xvkbd" depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBICE + select BR2_PACKAGE_XLIB_LIBSM + select BR2_PACKAGE_XLIB_LIBX11 select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_XLIB_LIBXPM + select BR2_PACKAGE_XLIB_LIBXT select BR2_PACKAGE_XLIB_LIBXTST help on-screen keyboard for X diff --git a/package/xvkbd/xvkbd-2.8-makefile.patch b/package/xvkbd/xvkbd-2.8-makefile.patch deleted file mode 100644 index e0ac21afc1..0000000000 --- a/package/xvkbd/xvkbd-2.8-makefile.patch +++ /dev/null @@ -1,2405 +0,0 @@ ---- a/.stamp_configured 2008-03-04 06:14:55.425005441 -0500 -+++ b/.stamp_configured 2008-03-05 08:42:53.000000000 -0500 -@@ -0,0 +1 @@ -+dummy -\ No newline at end of file ---- a/Makefile 2008-03-04 06:14:55.425005441 -0500 -+++ b/Makefile 2008-03-05 08:40:50.000000000 -0500 -@@ -0,0 +1,2397 @@ -+# Makefile generated by imake - do not edit! -+# $Xorg: imake.c,v 1.6 2001/02/09 02:03:15 xorgcvs Exp $ -+ -+# ---------------------------------------------------------------------- -+# Makefile generated from "Imake.tmpl" and -+# $Xorg: Imake.tmpl,v 1.4 2000/08/17 19:41:46 cpqbld Exp $ -+# $XdotOrg: util/cf/Imake.tmpl,v 1.17 2006/04/15 15:55:25 herrb Exp $ -+# -+# -+# -+# -+# $XFree86: xc/config/cf/Imake.tmpl,v 3.155 2003/12/24 18:58:41 dickey Exp $ -+# ---------------------------------------------------------------------- -+ -+all:: -+ -+.SUFFIXES: .i -+ -+# $XdotOrg: util/cf/Imake.cf,v 1.12 2005/11/08 06:33:24 jkj Exp $ -+# $Xorg: Imake.cf,v 1.4 2000/08/17 19:41:45 cpqbld Exp $ -+ -+# $XFree86: xc/config/cf/Imake.cf,v 3.88 2003/12/16 21:30:21 herrb Exp $ -+ -+# Keep cpp from replacing path elements containing i486/i586/i686 -+ -+# ----------------------------------------------------------------------- -+# site-specific configuration parameters that need to come before -+# the platform-specific parameters - edit site.def to change -+ -+# site: $TOG: site.sample /main/r64_final/1 1998/02/05 16:28:49 kaleb $ -+ -+# site: $XFree86: xc/config/cf/site.def,v 3.24 2000/06/25 20:17:29 dawes Exp $ -+ -+# $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ -+ -+# ---------------------------------------------------------------------- -+# platform-specific configuration parameters - edit linux.cf to change -+ -+# $XdotOrg: util/cf/linux.cf,v 1.31 2005/10/21 19:10:27 ajax Exp $ -+# platform: $Xorg: linux.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $ -+ -+# platform: $XFree86: xc/config/cf/linux.cf,v 3.220 2003/12/30 22:38:33 tsi Exp $ -+ -+# operating system: Linux 2.6.23.8-63.fc8 i686 [ELF] (2.6.23) -+# libc: (6.7.0) -+# binutils: (217) -+ -+# $Xorg: lnxLib.rules,v 1.3 2000/08/17 19:41:47 cpqbld Exp $ -+# $XFree86: xc/config/cf/lnxLib.rules,v 3.52 2003/10/31 20:49:03 herrb Exp $ -+ -+# $XdotOrg: util/cf/xorg.cf,v 1.53 2005/10/03 16:08:44 alanc Exp $ -+ -+# $Xorg: xfree86.cf,v 1.4 2000/08/17 19:41:49 cpqbld Exp $ -+ -+XORG_VERSION_CURRENT = (((6) * 10000000) + ((8) * 100000) + ((99) * 1000) + 903) -+RELEASE_VERSION = RELEASE-1 -+ -+AFB_DEFS = -DUSE_AFB -+ -+DRIVERSDKDIR = $(USRLIBDIR)/Server -+DRIVERSDKMODULEDIR = $(USRLIBDIR)/Server/modules -+DRIVERSDKINCLUDEDIR = $(USRLIBDIR)/Server/include -+ -+ XF86SRC = $(SERVERSRC)/hw/xfree86 -+ XF86COMSRC = $(XF86SRC)/common -+ XF86PARSERSRC = $(XF86SRC)/parser -+ XF86OSSRC = $(XF86SRC)/os-support -+ XF86DRIVERSRC = $(XF86SRC)/drivers -+ DRIVERSRC = $(XF86DRIVERSRC) -+ -+ XFREE86DOCDIR = $(DOCDIR) -+ XFREE86PSDOCDIR = $(DOCPSDIR) -+ XFREE86PDFDOCDIR = $(DOCPDFDIR) -+ XFREE86HTMLDOCDIR = $(DOCHTMLDIR) -+XFREE86JAPANESEDOCDIR = $(DOCDIR)/Japanese -+ -+# $Xorg: xf86.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $ -+ -+# $XFree86: xc/config/cf/xf86.rules,v 3.34tsi Exp $ -+ -+# ---------------------------------------------------------------------- -+# site-specific configuration parameters that go after -+# the platform-specific parameters - edit site.def to change -+ -+# site: $TOG: site.sample /main/r64_final/1 1998/02/05 16:28:49 kaleb $ -+ -+# site: $XFree86: xc/config/cf/site.def,v 3.24 2000/06/25 20:17:29 dawes Exp $ -+ -+# --------------------------------------------------------------------- -+# Imake rules for building libraries, programs, scripts, and data files -+# rules: $Xorg: Imake.rules,v 1.3 2000/08/17 19:41:46 cpqbld Exp $ -+# rules: $XdotOrg: util/cf/Imake.rules,v 1.11 2005/11/08 06:33:24 jkj Exp $ -+# -+# -+# -+# -+# rules: $XFree86: xc/config/cf/Imake.rules,v 3.128 2003/11/15 03:25:17 dawes Exp $ -+ -+.PHONY: all interfaces install install.man install.lib install.sdk depend includes cleandir -+ -+ _NULLCMD_ = @ echo -n -+ -+X_BYTE_ORDER = X_LITTLE_ENDIAN -+ -+GLIDE2INCDIR = -+ -+GLIDE3INCDIR = -+ -+GLIDE3LIBNAME = -+ -+TKLIBNAME = -+ -+TKLIBDIR = -+ -+TCLLIBNAME = -+ -+TCLIBDIR = -+ -+ PATHSEP = / -+ SHELL = /bin/sh -e -+ -+ TOP = . -+ CURRENT_DIR = . -+ -+ IMAKE = imake -+ DEPEND = gccmakedep -+ MKDIRHIER = mkdir -p -+ REVPATH = revpath -+ EXPORTLISTGEN = -+ RMAN = RmanCmd -+ RMANBASENAME = rman -+ RMANOPTIONS = RmanOptions -+ CONFIGSRC = $(TOP)/config -+ IMAKESRC = $(CONFIGSRC)/imake -+ DEPENDSRC = $(CONFIGSRC)/util -+ -+ INCROOT = /usr/include -+ USRLIBDIR = /usr/lib -+ VARDIR = /var -+ VARLIBDIR = $(VARDIR)/lib -+ SYSTEMUSRLIBDIR = /usr/lib -+ SYSTEMUSRINCDIR = /usr/include -+ SHLIBDIR = /usr/lib -+ LINTLIBDIR = $(USRLIBDIR)/lint -+ MANPATH = /usr/share/man -+ MANSOURCEPATH = $(MANPATH)/man -+ MANDIR = $(MANSOURCEPATH)1 -+ LIBMANDIR = $(MANSOURCEPATH)3 -+ FILEMANDIR = $(MANSOURCEPATH)5 -+ MISCMANDIR = $(MANSOURCEPATH)$(MISCMANSUFFIX) -+ DRIVERMANDIR = $(MANSOURCEPATH)$(DRIVERMANSUFFIX) -+ LOGDIRECTORY = $(VARDIR)/log -+ -+ VARRUNDIR = $(VARDIR)/run -+ -+ VARDBDIR = $(VARDIR)/lib -+ -+ AR = ar clq -+ -+# Nice try but useless: make will inherit BOOTSTRAPCFLAGS -+# from top Makefile -+ BOOTSTRAPCFLAGS = -+ -+ CC = gcc -m32 -+ AS = gcc -m32 -c -x assembler -+ -+.SUFFIXES: .cc -+ -+ CXX = c++ -m32 -+ -+ CXXFILT = c++filt -+ -+ CXXLIB = -lstdc++ -+ -+ CXXDEBUGFLAGS = -O2 -fno-strength-reduce -fno-strict-aliasing -+CXXDEPENDINCLUDES = -+ CXXEXTRA_DEFINES = -+CXXEXTRA_INCLUDES = -+ CXXSTD_DEFINES = -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(CXXPROJECT_DEFINES) -+ CXXOPTIONS = -+ CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES) -+ CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(DEFINES) $(CXXEXTRA_DEFINES) -+ CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES) -+ -+ COMPRESS = compress -+ GZIPCMD = gzip -+ -+ CPP = cpp $(STD_CPP_DEFINES) -+ RAWCPP = cpp -undef $(STD_CPP_OPTIONS) -+ PREPROCESSCMD = gcc -m32 -E $(STD_CPP_DEFINES) -+ -+ INSTALL = install -+ INSTALLFLAGS = -c -+ -+ LD = gcc -m32 -nostdlib -+ -+ LEX = flex -l -+ M4 = m4 -+ M4FLAGS = -+ LEXLIB = -lfl -+ YACC = bison -y -+ CCYACC = bison -y -+ -+ LINT = lint -+ -+ LINTLIBFLAG = -C -+ LINTOPTS = -axz -+ LN = ln -s -+ MAKE = make -+ MV = mv -f -+ CP = cp -+ -+ RANLIB = ranlib -+ -+ RANLIBINSTFLAGS = -+ -+ RM = rm -f -+ PERL = perl -+ PERLOPTS = -+ PERLENVSETUP = env LC_ALL=C -+ MANSUFFIX = 1x -+ LIBMANSUFFIX = 3x -+ FILEMANSUFFIX = 5x -+ MISCMANSUFFIX = 7 -+ DRIVERMANSUFFIX = 4 -+ ADMINMANSUFFIX = 8 -+ MANSRCSUFFIX = man -+ MANNEWSUFFIX = _man -+ MANDEFS = -D__apploaddir__=$(XAPPLOADDIR) -D__appmansuffix__=$(MANSUFFIX) -D__filemansuffix__=$(FILEMANSUFFIX) -D__libmansuffix__=$(LIBMANSUFFIX) -D__miscmansuffix__=$(MISCMANSUFFIX) -D__drivermansuffix__=$(DRIVERMANSUFFIX) -D__adminmansuffix__=$(ADMINMANSUFFIX) -D__projectroot__=$(PROJECTROOT) -D__xconfigfile__=$(XCONFIGFILE) -D__xconfigdir__=$(XCONFIGDIR) -D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME) $(XORGMANDEFS) $(VENDORMANDEFS) -+ -+ COMPRESSMANCMD = gzip -n -+ -+ TROFF = groff -Tps -+ NROFF = nroff -+ -+ MSMACROS = -ms -+ MANMACROS = -man -+ TBL = tbl -+ EQN = eqn -+ NEQN = neqn -+ COL = col -+ COLFLAGS = -b -+ -+ MODCC = gcc -m32 -+ -+ MODCPP = cpp -+ MODCFLAGS = $(CFLAGS) -+ MODAS = gcc -m32 -c -x assembler -+ MODASFLAGS = -+ -+ MODLD = gcc -m32 -nostdlib -+ -+ MODLDFLAGS = -+MODLDCOMBINEFLAGS = -r -+ MODAR = ar clq -+ -+ MODRANLIB = ranlib -+ -+ STD_INCLUDES = -+ STD_CPP_OPTIONS = -traditional -+ STD_CPP_DEFINES = -traditional -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(PROJECT_DEFINES) -+ STD_DEFINES = -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(PROJECT_DEFINES) -+ EXTRA_LOAD_FLAGS = -+ EXTRA_LDOPTIONS = -+ EXTRA_LIBRARIES = -+ TAGS = ctags -+ -+ PARALLELMFLAGS = -+ -+ SHAREDCODEDEF = -+ SHLIBDEF = -+ -+ SHLIBLDFLAGS = -shared $(SHLIBGLOBALSFLAGS) -+ -+ NOSTDLIB = -nostdlib -+ POSTNOSTDLIB = -Wl,-Bstatic -lgcc -Wl,-Bdynamic -+ -+ PICFLAGS = -fPIC -+ -+ CXXPICFLAGS = -fPIC -+ -+ PROTO_DEFINES = -DFUNCPROTO=15 -DNARROWPROTO -+ -+ INSTPGMFLAGS = -+ -+ INSTBINFLAGS = -m 0755 -+ INSTUIDFLAGS = -m 4711 -+ INSTLIBFLAGS = -m 0644 -+ INSTINCFLAGS = -m 0444 -+ INSTMANFLAGS = -m 0444 -+ INSTDATFLAGS = -m 0444 -+ INSTKMEMFLAGS = -m 4711 -+ -+ PROJECTROOT = /usr -+ -+ CDEBUGFLAGS = -O2 -fno-strength-reduce -fno-strict-aliasing -+ CCOPTIONS = -+ -+ ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(INSTALLED_INCLUDES) $(STD_INCLUDES) -+ ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(MODULE_DEFINES) $(DEFINES) $(EXTRA_DEFINES) -+ CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(MODULE_CFLAGS) $(ALLDEFINES) -+ LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES) -+ LDPRELIB = -L$(USRLIBDIR) $(INSTALLED_LIBS) -+ LDPOSTLIB = -+ LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS) -+ CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS) -+ -+ LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) -+ -+ CCLINK = $(CC) -+ -+ CXXLINK = $(CXX) -+ -+ LDSTRIPFLAGS = -x -+ LDCOMBINEFLAGS = -r -+ DEPENDFLAGS = -+ DEPEND_DEFINES = -+ -+# Not sure this belongs here -+ TKLIBDIR = -+ TKINCDIR = -+ TKLIBNAME = -+ TKLIBRARY = -L$(TKLIBDIR) -l$(TKLIBNAME) -+ TCLLIBDIR = -+ TCLINCDIR = -+ TCLLIBNAME = -+ TCLLIBRARY = -L$(TCLLIBDIR) -l$(TCLLIBNAME) -+ -+ MACROFILE = linux.cf -+ RM_CMD = $(RM) -+ -+ IMAKE_DEFINES = -+ IMAKE_WARNINGS = -Wundef -+ -+ IRULESRC = $(CONFIGDIR) -+ IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) $(IMAKE_WARNINGS) -+ -+ ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) $(IRULESRC)/xfree86.cf $(IRULESRC)/xf86.rules $(IRULESRC)/xorgsite.def $(IRULESRC)/host.def $(EXTRA_ICONFIGFILES) -+ -+# $Xorg: X11.rules,v 1.4 2000/08/17 19:41:46 cpqbld Exp $ -+ -+# $XFree86: xc/config/cf/X11.rules,v 1.6 2001/01/17 16:22:31 dawes Exp $ -+ -+# ---------------------------------------------------------------------- -+# X Window System Build Parameters and Rules -+# $XdotOrg: util/cf/X11.tmpl,v 1.54 2006/04/15 15:55:25 herrb Exp $ -+# $Xorg: X11.tmpl,v 1.6 2000/08/17 19:41:46 cpqbld Exp $ -+# -+# -+# -+# -+# $XFree86: xc/config/cf/X11.tmpl,v 1.248 2004/02/16 04:07:37 dawes Exp $ -+ -+XORGRELSTRING = `echo 6 8 99 903 | sed -e 's/ /./g' -e 's/^/Version\\\ /'` -+ XORGMANNAME = X Version 11 -+ -+STICKY_DEFINES = -DHAS_STICKY_DIR_BIT -+ -+FCHOWN_DEFINES = -DHAS_FCHOWN -+ -+# ----------------------------------------------------------------------- -+# X Window System make variables; these need to be coordinated with rules -+ -+ XTOP = $(TOP) -+ BINDIR = /usr/bin -+ BUILDINCROOT = $(TOP)/exports -+ BUILDINCDIR = $(BUILDINCROOT)/include -+ BUILDINCTOP = ../.. -+ BUILDLIBDIR = $(TOP)/exports/lib -+ BUILDLIBTOP = ../.. -+ BUILDBINDIR = $(TOP)/exports/bin -+ BUILDBINTOP = ../.. -+ BUILDMODULEDIR = $(BUILDLIBDIR)/modules -+ BUILDI18NDIR = $(BUILDLIBDIR)/locale -+ BUILDMODULETOP = $(BUILDLIBTOP)/.. -+ XBUILDINCROOT = $(XTOP)/exports -+ XBUILDINCDIR = $(XBUILDINCROOT)/include/X11 -+ XBUILDINCTOP = ../../.. -+ XBUILDBINDIR = $(XBUILDINCROOT)/bin -+ INCDIR = $(INCROOT) -+ ADMDIR = /usr/adm -+ LIBDIR = /usr/lib/X11 -+ SHAREDIR = /usr/share/X11 -+ LIBEXECDIR = /usr/libexec -+ MODULEDIR = $(USRLIBDIR)/modules -+ TOP_X_INCLUDES = -+ XBINDIR = $(PROJECTROOT)/bin -+ -+ INSTSRCDIR = /usr/src -+ -+ ETCX11DIR = /etc/X11 -+ -+ CONFDIR = $(ETCX11DIR) -+ -+ DOCDIR = $(LIBDIR)/doc -+ DOCHTMLDIR = $(DOCDIR)/html -+ DOCPSDIR = $(DOCDIR)/PostScript -+ DOCPDFDIR = $(DOCDIR)/PDF -+ FONTDIR = $(LIBDIR)/fonts -+ ENCODINGSDIR = $(LIBDIR)/fonts/encodings -+ XINITDIR = $(LIBDIR)/xinit -+ XDMDIR = $(LIBDIR)/xdm -+ XDMVARDIR = $(VARLIBDIR)/xdm -+ TWMDIR = $(LIBDIR)/twm -+ XSMDIR = $(LIBDIR)/xsm -+ NLSDIR = $(LIBDIR)/nls -+ XLOCALEDIR = $(LIBDIR)/locale -+ LBXPROXYDIR = $(LIBDIR)/lbxproxy -+ PROXYMANAGERDIR = $(LIBDIR)/proxymngr -+ XPRINTDIR = $(LIBDIR)/xserver -+ XAPPLOADDIR = /usr/share/X11/app-defaults -+ FONTCFLAGS = -t -+ -+ INSTAPPFLAGS = $(INSTDATFLAGS) -+ -+ RGB = $(XBINDIR)/rgb -+ FONTC = $(XBINDIR)/bdftopcf -+ MKFONTSCALE = $(XBINDIR)/mkfontscale -+ MKFONTDIR = $(XBINDIR)/mkfontdir -+ MKHTMLINDEX = $(XBINDIR)/mkhtmlindex -+ UCS2ANY = $(XBINDIR)/ucs2any -+ BDFTRUNCATE = $(XBINDIR)/bdftruncate -+ UCSMAPPREFIX = $(FONTDIR)/util/map- -+ XCURSORGEN = $(XBINDIR)/xcursorgen -+ -+ HTMLINDEXCMD = HtmlIndexCmd -+ -+ DOCUTILSRC = $(XTOP)/doc/util -+ CLIENTSRC = $(TOP)/clients -+ DEMOSRC = $(TOP)/demos -+ XDOCMACROS = $(DOCUTILSRC)/macros.t -+ XIDXMACROS = $(DOCUTILSRC)/indexmacros.t -+ PROGRAMSRC = $(TOP)/programs -+ LIBSRC = $(XTOP)/lib -+ FONTSRC = $(XTOP)/fonts -+ ENCODINGSSRC = $(FONTSRC)/encodings -+ INCLUDESRC = $(BUILDINCROOT)/include -+ XINCLUDESRC = $(INCLUDESRC)/X11 -+ SERVERSRC = $(XTOP)/programs/Xserver -+ CONTRIBSRC = $(XTOP)/../contrib -+ UNSUPPORTEDSRC = $(XTOP)/unsupported -+ DOCSRC = $(XTOP)/doc -+ RGBSRC = $(XTOP)/programs/rgb -+ BDFTOPCFSRC = $(PROGRAMSRC)/bdftopcf -+ MKFONTDIRSRC = $(PROGRAMSRC)/mkfontdir -+ FONTSERVERSRC = $(PROGRAMSRC)/xfs -+ FONTINCSRC = $(XTOP)/include/fonts -+ EXTINCSRC = $(XTOP)/include/extensions -+ FTSOURCEDIR = FreeTypeSrcDir -+ DRMSRCDIR = $(TOP)/extras/drm -+ MESASRCDIR = $(TOP)/extras/Mesa -+ OGLSAMPLESRCDIR = $(TOP)/extras/ogl-sample -+ PSWRAPSRC = $(XTOP)/config/pswrap -+ TRANSCOMMSRC = $(LIBSRC)/xtrans -+ TRANS_INCLUDES = -I$(TRANSCOMMSRC) -+ CONNECTION_FLAGS = -DUNIXCONN -DTCPCONN $(STICKY_DEFINES) $(FCHOWN_DEFINES) -DIPv6 -+XTRANS_FAILDEFINES = -DFAIL_HARD -+ -+ VENDORMANNAME = X.Org -+ VENDORMANVERSION = `echo 6 8 99 903 | sed -e 's/ /./g' -e 's/^/Version\\\ /'` -+ XORGMANDEFS = -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" -+ VENDORMANDEFS = -D__vendorversion__="$(VENDORMANVERSION) $(VENDORMANNAME)" -+ VENDORNAME = The X.Org Foundation -+ VENDORNAMESHORT = X.Org -+ -+ VENDORWEBSUPPORT = http://wiki.X.Org -+ -+VENDORSUPPORTDEFS = -D__VENDORDWEBSUPPORT__='"$(VENDORWEBSUPPORT)"' -+ -+ XKBDEFRULES = xorg -+ XKBDEFRULESDEFS = -D__XKBDEFRULES__='"$(XKBDEFRULES)"' -+ -+ XCONFIGFILE = xorg.conf -+ XCONFIGDIR = $(LIBDIR) -+ XLOGFILE = Xorg -+ XSERVERNAME = Xorg -+ -+ XENVLIBDIR = $(USRLIBDIR) -+ CLIENTENVSETUP = LD_LIBRARY_PATH=$(XENVLIBDIR) XLOCALEDIR=$(BUILDLIBDIR)/locale -+ -+# $Xorg: lnxLib.tmpl,v 1.3 2000/08/17 19:41:47 cpqbld Exp $ -+# $XFree86: xc/config/cf/lnxLib.tmpl,v 3.19 2003/10/15 22:47:48 herrb Exp $ -+ -+ XLIBSRC = $(LIBSRC)/X11 -+ -+SOXLIBREV = 6.2 -+DEPXONLYLIB = -+XONLYLIB = -lX11 -+ -+LINTXONLY = $(LINTLIBDIR)/llib-lX11.ln -+ -+ DEPXLIBONLY = $(DEPXONLYLIB) -+ XLIBONLY = $(XONLYLIB) -+ LINTXONLYLIB = $(LINTXONLY) -+ -+ XEXTLIBSRC = $(LIBSRC)/Xext -+ -+SOXEXTREV = 6.4 -+DEPEXTENSIONLIB = -+EXTENSIONLIB = -lXext -+ -+LINTEXTENSION = $(LINTLIBDIR)/llib-lXext.ln -+ -+LINTEXTENSIONLIB = $(LINTEXTENSION) -+ DEPXLIB = $(DEPEXTENSIONLIB) $(DEPXONLYLIB) -+ XLIB = $(EXTENSIONLIB) $(XONLYLIB) -+ LINTXLIB = $(LINTXONLYLIB) -+ -+ XSSLIBSRC = $(LIBSRC)/Xss -+ -+SOXSSREV = 1.0 -+DEPXSSLIB = -+XSSLIB = -lXss -+ -+LINTXSS = $(LINTLIBDIR)/llib-lXss.ln -+ -+ XXF86MISCLIBSRC = $(LIBSRC)/Xxf86misc -+ -+SOXXF86MISCREV = 1.1 -+DEPXXF86MISCLIB = -+XXF86MISCLIB = -lXxf86misc -+ -+LINTXXF86MISC = $(LINTLIBDIR)/llib-lXxf86misc.ln -+ -+ XXF86VMLIBSRC = $(LIBSRC)/Xxf86vm -+ -+SOXXF86VMREV = 1.0 -+DEPXXF86VMLIB = -+XXF86VMLIB = -lXxf86vm -+ -+LINTXXF86VM = $(LINTLIBDIR)/llib-lXxf86vm.ln -+ -+ XXF86DGALIBSRC = $(LIBSRC)/Xxf86dga -+ -+SOXXF86DGAREV = 1.0 -+DEPXXF86DGALIB = -+XXF86DGALIB = -lXxf86dga -+ -+LINTXXF86DGA = $(LINTLIBDIR)/llib-lXxf86dga.ln -+ -+ XXF86RUSHLIBSRC = $(LIBSRC)/Xxf86rush -+ -+SOXXF86RUSHREV = 1.0 -+DEPXXF86RUSHLIB = -+XXF86RUSHLIB = -lXxf86rush -+ -+LINTXXF86RUSH = $(LINTLIBDIR)/llib-lXxf86rush.ln -+ -+ XVLIBSRC = $(LIBSRC)/Xv -+ -+SOXVREV = 1.0 -+DEPXVLIB = -+XVLIB = -lXv -+ -+LINTXV = $(LINTLIBDIR)/llib-lXv.ln -+ -+ XVMCLIBSRC = $(LIBSRC)/XvMC -+ -+SOXVMCREV = 1.0 -+DEPXVMCLIB = -+XVMCLIB = -lXvMC -+ -+LINTXVMC = $(LINTLIBDIR)/llib-lXvMC.ln -+ -+ XINERAMALIBSRC = $(LIBSRC)/Xinerama -+ -+SOXINERAMAREV = 1.0 -+DEPXINERAMALIB = -+XINERAMALIB = -lXinerama -+ -+LINTXINERAMA = $(LINTLIBDIR)/llib-lXinerama.ln -+ -+ XRESLIBSRC = $(LIBSRC)/XRes -+ -+SOXRESREV = 1.0 -+DEPXRESLIB = -+XRESLIB = -lXRes -+ -+LINTXRES = $(LINTLIBDIR)/llib-lXRes.ln -+ -+ DMXLIBSRC = $(LIBSRC)/dmx -+ -+DEPDMXLIB = $(USRLIBDIR)/libdmx.a -+DMXLIB = -ldmx -+ -+LINTDMX = $(LINTLIBDIR)/llib-ldmx.ln -+ -+ DPSLIBSRC = $(LIBSRC)/dps -+ -+DEPDPSLIB = $(USRLIBDIR)/libdps.a -+DPSLIB = -ldps -+ -+LINTDPS = $(LINTLIBDIR)/llib-ldps.ln -+ -+ DPSTKLIBSRC = $(LIBSRC)/dpstk -+ -+DEPDPSTKLIB = $(USRLIBDIR)/libdpstk.a -+DPSTKLIB = -ldpstk -+ -+LINTDPSTK = $(LINTLIBDIR)/llib-ldpstk.ln -+ -+ PSRESLIBSRC = $(LIBSRC)/psres -+ -+DEPPSRESLIB = $(USRLIBDIR)/libpsres.a -+PSRESLIB = -lpsres -+ -+LINTPSRES = $(LINTLIBDIR)/llib-lpsres.ln -+ -+ GLULIBSRC = $(LIBSRC)/GLU -+ -+SOGLUREV = 1.3 -+DEPGLULIB = -+GLULIB = -lGLU -+ -+LINTGLU = $(LINTLIBDIR)/llib-lGLU.ln -+ -+ GLXLIBSRC = $(LIBSRC)/GL -+ -+SOGLREV = 1.2 -+DEPGLXLIB = -+GLXLIB = -lGL -+ -+LINTGLX = $(LINTLIBDIR)/llib-lGL.ln -+ -+ GLWIDGETSRC = $(LIBSRC)/GLw -+ -+SOGLWREV = 1.0 -+DEPGLWLIB = -+GLWLIB = -lGLw -+ -+LINTGLW = $(LINTLIBDIR)/llib-lGLw.ln -+ -+ XRENDERLIBSRC = $(LIBSRC)/Xrender -+ -+SOXRENDERREV = 1.2.2 -+DEPXRENDERLIB = -+XRENDERLIB = -lXrender -+ -+LINTXRENDER = $(LINTLIBDIR)/llib-lXrender.ln -+ -+ XRANDRLIBSRC = $(LIBSRC)/Xrandr -+ -+SOXRANDRREV = 2.0 -+DEPXRANDRLIB = -+XRANDRLIB = -lXrandr -+ -+LINTXRANDR = $(LINTLIBDIR)/llib-lXrandr.ln -+ -+ XFIXESLIBSRC = $(LIBSRC)/Xfixes -+ -+SOXFIXESREV = 3.0 -+DEPXFIXESLIB = -+XFIXESLIB = -lXfixes -+ -+LINTXFIXES = $(LINTLIBDIR)/llib-lXfixes.ln -+ -+ XDAMAGELIBSRC = $(LIBSRC)/Xdamage -+ -+SOXDAMAGEREV = 1.0 -+DEPXDAMAGELIB = -+XDAMAGELIB = -lXdamage -+ -+LINTXDAMAGE = $(LINTLIBDIR)/llib-lXdamage.ln -+ -+XCOMPOSITELIBSRC = $(LIBSRC)/Xcomposite -+ -+SOXCOMPOSITEREV = 1.0 -+DEPXCOMPOSITELIB = -+XCOMPOSITELIB = -lXcomposite -+ -+LINTXCOMPOSITE = $(LINTLIBDIR)/llib-lXcomposite.ln -+ -+XEVIELIBSRC = $(LIBSRC)/Xevie -+ -+SOXEVIEREV = 1.0 -+DEPXEVIELIB = -+XEVIELIB = -lXevie -+ -+LINTXEVIE = $(LINTLIBDIR)/llib-lXevie.ln -+ -+ XCURSORLIBSRC = $(LIBSRC)/Xcursor -+ -+SOXCURSORREV = 1.0.2 -+DEPXCURSORLIB = -+XCURSORLIB = -lXcursor -+ -+LINTXCURSOR = $(LINTLIBDIR)/llib-lXcursor.ln -+ -+ APPLEWMLIBSRC = $(LIBSRC)/apple -+ -+DEPAPPLEWMLIB = $(USRLIBDIR)/libAppleWM.a -+APPLEWMLIB = -lAppleWM -+ -+LINTAPPLEWM = $(LINTLIBDIR)/llib-lAppleWM.ln -+ -+ WINDOWSWMLIBSRC = $(LIBSRC)/windows -+ -+DEPWINDOWSWMLIB = $(USRLIBDIR)/libWindowsWM.a -+WINDOWSWMLIB = -lWindowsWM -+ -+LINTWINDOWSWM = $(LINTLIBDIR)/llib-lWindowsWM.ln -+ -+ XFONTCACHELIBSRC = $(LIBSRC)/Xfontcache -+ -+SOXFONTCACHEREV = 1.2 -+DEPXFONTCACHELIB = -+XFONTCACHELIB = -lXfontcache -+ -+LINTXFONTCACHE = $(LINTLIBDIR)/llib-lXfontcache.ln -+ -+ XAUTHSRC = $(LIBSRC)/Xau -+ -+SOXAUTHREV = 6.0 -+DEPXAUTHLIB = -+XAUTHLIB = -lXau -+ -+LINTXAUTH = $(LINTLIBDIR)/llib-lXau.ln -+ -+ XDMCPLIBSRC = $(LIBSRC)/Xdmcp -+ -+SOXDMCPREV = 6.0 -+DEPXDMCPLIB = -+XDMCPLIB = -lXdmcp -+ -+LINTXDMCP = $(LINTLIBDIR)/llib-lXdmcp.ln -+ -+ XMUSRC = $(LIBSRC)/Xmu -+ -+SOXMUREV = 6.2 -+DEPXMULIB = -+XMULIB = -lXmu -+ -+LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln -+ -+ XMUUSRC = $(LIBSRC)/Xmuu -+ -+SOXMUUREV = 1.0 -+DEPXMUULIB = -+XMUULIB = -lXmuu -+ -+LINTXMUU = $(LINTLIBDIR)/llib-lXmuu.ln -+ -+ OLDXLIBSRC = $(LIBSRC)/oldX -+ -+DEPOLDXLIB = $(USRLIBDIR)/liboldX.a -+OLDXLIB = -loldX -+ -+LINTOLDX = $(LINTLIBDIR)/llib-loldX.ln -+ -+ XPLIBSRC = $(LIBSRC)/Xp -+ -+SOXPREV = 6.2 -+DEPXPLIB = -+XPLIB = -lXp -+ -+LINTXP = $(LINTLIBDIR)/llib-lXp.ln -+ -+ TOOLKITSRC = $(LIBSRC)/Xt -+ -+SOXTREV = 6.0 -+DEPXTOOLONLYLIB = -+XTOOLONLYLIB = -lXt -+ -+LINTXTOOLONLY = $(LINTLIBDIR)/llib-lXt.ln -+ -+ DEPXTOOLLIB = $(DEPXTOOLONLYLIB) $(DEPSMLIB) $(DEPICELIB) -+ XTOOLLIB = $(XTOOLONLYLIB) $(SMLIB) $(ICELIB) -+ LINTXTOOLLIB = $(LINTXTOOLONLYLIB) -+ -+ XALIBSRC = $(LIBSRC)/Xa -+ -+SOXAREV = 1.0 -+DEPXALIB = -+XALIB = -lXa -+ -+LINTXA = $(LINTLIBDIR)/llib-lXa.ln -+ -+ AWIDGETSRC = $(LIBSRC)/Xaw -+ -+SOXAWREV = 8.0 -+DEPXAWLIB = -+XAWLIB = -lXaw -+ -+LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln -+ -+ AWIDGET7SRC = $(LIBSRC)/Xaw7 -+ -+SOXAW7REV = 7.0 -+DEPXAW7LIB = -+XAW7LIB = -lXaw -+ -+LINTXAW7 = $(LINTLIBDIR)/llib-lXaw.ln -+ -+ AWIDGET6SRC = $(LIBSRC)/Xaw6 -+ -+SOXAW6REV = 6.1 -+DEPXAW6LIB = -+XAW6LIB = -lXaw -+ -+LINTXAW6 = $(LINTLIBDIR)/llib-lXaw.ln -+ -+ XILIBSRC = $(LIBSRC)/Xi -+ -+SOXINPUTREV = 6.0 -+DEPXILIB = -+XILIB = -lXi -+ -+LINTXI = $(LINTLIBDIR)/llib-lXi.ln -+ -+ XTESTLIBSRC = $(LIBSRC)/Xtst -+ -+SOXTESTREV = 6.1 -+DEPXTESTLIB = -+XTESTLIB = -lXtst -+ -+LINTXTEST = $(LINTLIBDIR)/llib-lXtst.ln -+ -+DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a -+XBSDLIB = -lXbsd -+ -+LINTXBSD = $(LINTLIBDIR)/llib-lXbsd.ln -+ -+ ICESRC = $(LIBSRC)/ICE -+ -+SOICEREV = 6.4 -+DEPICELIB = -+ICELIB = -lICE -+ -+LINTICE = $(LINTLIBDIR)/llib-lICE.ln -+ -+ SMSRC = $(LIBSRC)/SM -+ -+SOSMREV = 6.0 -+DEPSMLIB = -+SMLIB = -lSM -+ -+LINTSM = $(LINTLIBDIR)/llib-lSM.ln -+ -+ XKEYSRC = $(LIBSRC)/Xkey -+ -+SOXKEYREV = 6.0 -+DEPXKEYLIB = -+XKEYLIB = -lXkey -+ -+LINTXKEY = $(LINTLIBDIR)/llib-lXkey.ln -+ -+ FSLIBSRC = $(LIBSRC)/FS -+ -+SOFSREV = 6.0 -+DEPFSLIB = -+FSLIB = -lFS -+ -+LINTFS = $(LINTLIBDIR)/llib-lFS.ln -+ -+ FONTLIBSRC = $(LIBSRC)/font -+ -+SOFONTREV = 1.5 -+DEPFONTLIB = -+FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) -lXfont -+ -+LINTXFONT = $(LINTLIBDIR)/llib-lXfont.ln -+# -+SOFONTREV = 1.5 -+DEPXFONTLIB = -+XFONTLIB = -lXfont -+ -+LINTXFONT = $(LINTLIBDIR)/llib-lXfont.ln -+ -+ FONTSTUBLIBSRC = $(FONTLIBSRC)/stubs -+ -+DEPFONTSTUBLIB = $(USRLIBDIR)/libfntstubs.a -+FONTSTUBLIB = -lfntstubs -+ -+LINTFONTSTUB = $(LINTLIBDIR)/llib-lfntstubs.ln -+ DEPFONTLIB = $(DEPXFONTLIB) $(DEPFONTSTUBLIB) -+ FONTLIB = $(XFONTLIB) $(FONTSTUBLIB) $(FREETYPE2LIB) -+ -+ FONTENCLIBSRC = $(LIBSRC)/fontenc -+ -+SOFONTENCREV = 1.0 -+DEPXFONTENCLIB = -+XFONTENCLIB = -lfontenc -+ -+LINTXFONTENC = $(LINTLIBDIR)/llib-lfontenc.ln -+ -+ XPMLIBSRC = $(LIBSRC)/Xpm -+ -+SOXPMREV = 4.11 -+DEPXPMLIB = -+XPMLIB = -lXpm -+ -+LINTXPM = $(LINTLIBDIR)/llib-lXpm.ln -+ -+FREETYPE2DIR = /usr -+FREETYPE2LIBDIR = /usr/lib -+FREETYPE2INCDIR = /usr/include -+ -+FREETYPE2LIB = -lfreetype -+ -+FREETYPE2INCLUDES = -I$(FREETYPE2INCDIR)/freetype2 -I$(FREETYPE2INCDIR)/freetype2/config -+ -+FREETYPE2DEFINES = -DFREETYPE2 -+ -+ EXPATLIBSRC = $(LIBSRC)/expat -+ -+SOEXPATREV = 0.4 -+DEPEXPATLIB = -+EXPATLIB = -lexpat -+ -+LINTEXPAT = $(LINTLIBDIR)/llib-lexpat.ln -+ -+EXPATDIR = /usr -+EXPATLIBDIR = /usr/lib -+EXPATINCDIR = /usr/include -+ -+EXPATINCLUDES = -+ -+EXPATLIB = -lexpat -+ -+EXPATDEFINES = -DEXPAT -+ -+ XFT1LIBSRC = $(LIBSRC)/Xft1 -+ -+SOXFT1REV = 1.1 -+DEPXFT1LIB = -+XFT1LIB = -lXft -+ -+LINTXFT1 = $(LINTLIBDIR)/llib-lXft.ln -+ -+ XFTLIBSRC = $(LIBSRC)/Xft -+ -+SOXFTREV = 2.1.2 -+DEPXFTLIB = -+XFTLIB = -lXft -+ -+LINTXFT = $(LINTLIBDIR)/llib-lXft.ln -+ -+ FONTCONFIGLIBSRC = $(LIBSRC)/fontconfig -+ -+SOFONTCONFIGREV = 1.0.4 -+DEPFONTCONFIGLIB = -+FONTCONFIGLIB = -lfontconfig -+ -+LINTFONTCONFIG = $(LINTLIBDIR)/llib-lfontconfig.ln -+ -+FONTCONFIGINCDIR=$(INCDIR) -+ -+FONTCONFIGINCLUDES = -I$(FONTCONFIGINCDIR) -+ -+FCCACHE = $(BINDIR)/fc-cache -+ -+FONTCONFIGDEFINES = -DFONTCONFIG -+ -+XFTINCLUDES=$(FONTCONFIGINCLUDES) $(FREETYPE2INCLUDES) -+ -+LIBPNGINCDIR = /usr/include -+ -+LIBPNGINC= -+ -+LIBPNGDIR = /usr -+LIBPNGLIBDIR = /usr/lib -+LIBPNGINCDIR = /usr/include -+ -+LIBPNGLIB = -lpng -+ -+ XKBFILELIBSRC = $(LIBSRC)/xkbfile -+ -+SOXKBFILEREV = 1.0 -+DEPXKBFILELIB = -+XKBFILELIB = -lxkbfile -+ -+LINTXKBFILE = $(LINTLIBDIR)/llib-lxkbfile.ln -+ -+ XKBCOMPCMD = $(XBINDIR)/xkbcomp -+ -+ XKBUILIBSRC = $(LIBSRC)/xkbui -+ -+SOXKBUIREV = 1.0 -+DEPXKBUILIB = -+XKBUILIB = -lxkbui -+ -+LINTXKBUI = $(LINTLIBDIR)/llib-lxkbui.ln -+ -+EXTRAXAWREQS = -+ -+EXTRAXAWCLIENTDEPLIBS = -+ -+EXTRAXAWCLIENTLIBS = -+ -+ XTRAPLIBSRC = $(LIBSRC)/XTrap -+ -+SOXTRAPREV = 6.4 -+DEPXTRAPLIB = -+XTRAPLIB = -lXTrap -+ -+LINTXTRAP = $(LINTLIBDIR)/llib-lXTrap.ln -+ -+ DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) -+ -+ DEPLIBS1 = $(DEPLIBS) -+ DEPLIBS2 = $(DEPLIBS) -+ DEPLIBS3 = $(DEPLIBS) -+ DEPLIBS4 = $(DEPLIBS) -+ DEPLIBS5 = $(DEPLIBS) -+ DEPLIBS6 = $(DEPLIBS) -+ DEPLIBS7 = $(DEPLIBS) -+ DEPLIBS8 = $(DEPLIBS) -+ DEPLIBS9 = $(DEPLIBS) -+ DEPLIBS10 = $(DEPLIBS) -+ -+ FCPRELOADPATTERN = libfontconfig.so.? -+ -+ XFTPRELOADPATTERN = libXft.so.? -+ XRENDERPRELOADPATTERN = libXrender.so.? -+ XFONTPRELOADPATTERN = libXfont*.so.? -+ -+XMULIBONLY = -lXmu -+XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB) -+ -+ CONFIGDIR = /usr/share/X11/config -+ -+ USRLIBDIRPATH = $(USRLIBDIR) -+ LDPRELIBS = -L$(USRLIBDIR) $(INSTALLED_LIBS) -+ LDPOSTLIBS = -+ TOP_INCLUDES = -I$(INCROOT) $(TOP_X_INCLUDES) -+ PROJECT_DEFINES = -+ VENDOR_DEFINES = -DXVENDORNAME='"$(VENDORNAME)"' -DXVENDORNAMESHORT='"$(VENDORNAMESHORT)"' -+ -+CXXPROJECT_DEFINES = -+ -+# ---------------------------------------------------------------------- -+# start of Imakefile -+ -+# Remove the next line if you want genuine Xaw instead of Xaw3d -+ -+# Remove the next line if you don't want to enable XTEST support -+ -+# Remove the next line if you want to disable internationalization -+ -+SRCS = xvkbd.c findwidget.c -+OBJS = xvkbd.o findwidget.o -+DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXPMLIB) $(EXTRAXAWCLIENTDEPLIBS) $(DEPXLIB) -+SYS_LIBRARIES = $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWCLIENTLIBS) $(XLIB) -+ -+D_XTEST = -DUSE_XTEST -+SYS_LIBRARIES = $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWCLIENTLIBS) $(XLIB) -lXtst -+ -+D_I18N = -DUSE_I18N -+ -+DEFINES = $(D_XAW3D) $(D_XTEST) $(D_I18N) -+ -+xvkbd.o: xvkbd.c resources.h XVkbd-common.h -+ $(RM) $@ -+ $(CC) -c $(CFLAGS) $*.c -+ -+ PROGRAM = xvkbd -+ -+all:: xvkbd -+ -+xvkbd: $(OBJS) $(DEPLIBS) -+ $(RM) $@ -+ $(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS) -+ -+install:: xvkbd -+ @if [ -d $(DESTDIR)$(BINDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(BINDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(BINDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTPGMFLAGS) xvkbd $(DESTDIR)$(BINDIR)/xvkbd -+ -+all:: xvkbd.$(MANNEWSUFFIX) -+ -+xvkbd.$(MANNEWSUFFIX): xvkbd.$(MANSRCSUFFIX) -+ $(RM) $@ -+ if test -z "$(PREPROCESSMANPAGES)" ; then \ -+ cd `dirname xvkbd` && \ -+ $(LN) `basename xvkbd.$(MANSRCSUFFIX)` `basename $@`; \ -+ else \ -+ $(RAWCPP) $(MANDEFS) $(EXTRAMANDEFS) \ -+ < xvkbd.$(MANSRCSUFFIX) | sed -e '/^# *[0-9][0-9]* *.*$$/d' -e '/^#line *[0-9][0-9]* *.*$$/d' -e '/^[ ]*XCOMM$$/s/XCOMM/#/' -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/#/' -e '/^[ ]*XHASH/s/XHASH/#/' -e '/\@\@$$/s/\@\@$$/\\/' >$@; \ -+ fi -+ -+cleandir:: -+ $(RM) xvkbd.$(MANNEWSUFFIX) -+ -+install.man:: xvkbd.$(MANNEWSUFFIX) -+ @if [ -d $(DESTDIR)$(MANDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(MANDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(MANDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTMANFLAGS) xvkbd.$(MANNEWSUFFIX) $(DESTDIR)$(MANDIR)/xvkbd.$(MANSUFFIX) -+ -+depend:: -+ $(DEPEND) $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS) -+ -+lint: -+ $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS) -+lint1: -+ $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS) -+ -+cleandir:: -+ $(RM) xvkbd -+ -+install:: -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ fi -+ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ -+ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ -+ fi -+ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ RELPATH=`echo $(LIBDIR)/. | \ -+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ -+ cd $(DESTDIR)$(LIBDIR)/.; \ -+ if [ -d app-defaults -a ! -h app-defaults ]; then \ -+ (cd app-defaults; tar cf - . | \ -+ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ tar xf -; exit 0); exit 0); \ -+ fi; \ -+ $(RM) -r app-defaults; \ -+ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ -+ fi -+ -+install:: XVkbd.ad -+ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd -+ -+install:: -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ fi -+ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ -+ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ -+ fi -+ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ RELPATH=`echo $(LIBDIR)/. | \ -+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ -+ cd $(DESTDIR)$(LIBDIR)/.; \ -+ if [ -d app-defaults -a ! -h app-defaults ]; then \ -+ (cd app-defaults; tar cf - . | \ -+ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ tar xf -; exit 0); exit 0); \ -+ fi; \ -+ $(RM) -r app-defaults; \ -+ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ -+ fi -+ -+install:: XVkbd-belgian.ad -+ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-belgian.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-belgian -+ -+install:: -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ fi -+ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ -+ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ -+ fi -+ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ RELPATH=`echo $(LIBDIR)/. | \ -+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ -+ cd $(DESTDIR)$(LIBDIR)/.; \ -+ if [ -d app-defaults -a ! -h app-defaults ]; then \ -+ (cd app-defaults; tar cf - . | \ -+ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ tar xf -; exit 0); exit 0); \ -+ fi; \ -+ $(RM) -r app-defaults; \ -+ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ -+ fi -+ -+install:: XVkbd-common.ad -+ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-common.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-common -+ -+install:: -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ fi -+ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ -+ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ -+ fi -+ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ RELPATH=`echo $(LIBDIR)/. | \ -+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ -+ cd $(DESTDIR)$(LIBDIR)/.; \ -+ if [ -d app-defaults -a ! -h app-defaults ]; then \ -+ (cd app-defaults; tar cf - . | \ -+ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ tar xf -; exit 0); exit 0); \ -+ fi; \ -+ $(RM) -r app-defaults; \ -+ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ -+ fi -+ -+install:: XVkbd-danish.ad -+ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-danish.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-danish -+ -+install:: -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ fi -+ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ -+ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ -+ fi -+ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ RELPATH=`echo $(LIBDIR)/. | \ -+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ -+ cd $(DESTDIR)$(LIBDIR)/.; \ -+ if [ -d app-defaults -a ! -h app-defaults ]; then \ -+ (cd app-defaults; tar cf - . | \ -+ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ tar xf -; exit 0); exit 0); \ -+ fi; \ -+ $(RM) -r app-defaults; \ -+ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ -+ fi -+ -+install:: XVkbd-fitaly.ad -+ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-fitaly.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-fitaly -+ -+install:: -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ fi -+ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ -+ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ -+ fi -+ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ RELPATH=`echo $(LIBDIR)/. | \ -+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ -+ cd $(DESTDIR)$(LIBDIR)/.; \ -+ if [ -d app-defaults -a ! -h app-defaults ]; then \ -+ (cd app-defaults; tar cf - . | \ -+ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ tar xf -; exit 0); exit 0); \ -+ fi; \ -+ $(RM) -r app-defaults; \ -+ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ -+ fi -+ -+install:: XVkbd-french.ad -+ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-french.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-french -+ -+install:: -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ fi -+ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ -+ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ -+ fi -+ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ RELPATH=`echo $(LIBDIR)/. | \ -+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ -+ cd $(DESTDIR)$(LIBDIR)/.; \ -+ if [ -d app-defaults -a ! -h app-defaults ]; then \ -+ (cd app-defaults; tar cf - . | \ -+ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ tar xf -; exit 0); exit 0); \ -+ fi; \ -+ $(RM) -r app-defaults; \ -+ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ -+ fi -+ -+install:: XVkbd-french2.ad -+ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-french2.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-french2 -+ -+install:: -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ fi -+ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ -+ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ -+ fi -+ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ RELPATH=`echo $(LIBDIR)/. | \ -+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ -+ cd $(DESTDIR)$(LIBDIR)/.; \ -+ if [ -d app-defaults -a ! -h app-defaults ]; then \ -+ (cd app-defaults; tar cf - . | \ -+ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ tar xf -; exit 0); exit 0); \ -+ fi; \ -+ $(RM) -r app-defaults; \ -+ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ -+ fi -+ -+install:: XVkbd-german.ad -+ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-german.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-german -+ -+install:: -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ fi -+ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ -+ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ -+ fi -+ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ RELPATH=`echo $(LIBDIR)/. | \ -+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ -+ cd $(DESTDIR)$(LIBDIR)/.; \ -+ if [ -d app-defaults -a ! -h app-defaults ]; then \ -+ (cd app-defaults; tar cf - . | \ -+ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ tar xf -; exit 0); exit 0); \ -+ fi; \ -+ $(RM) -r app-defaults; \ -+ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ -+ fi -+ -+install:: XVkbd-greek.ad -+ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-greek.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-greek -+ -+install:: -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ fi -+ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ -+ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ -+ fi -+ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ RELPATH=`echo $(LIBDIR)/. | \ -+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ -+ cd $(DESTDIR)$(LIBDIR)/.; \ -+ if [ -d app-defaults -a ! -h app-defaults ]; then \ -+ (cd app-defaults; tar cf - . | \ -+ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ tar xf -; exit 0); exit 0); \ -+ fi; \ -+ $(RM) -r app-defaults; \ -+ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ -+ fi -+ -+install:: XVkbd-hebrew.ad -+ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-hebrew.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-hebrew -+ -+install:: -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ fi -+ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ -+ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ -+ fi -+ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ RELPATH=`echo $(LIBDIR)/. | \ -+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ -+ cd $(DESTDIR)$(LIBDIR)/.; \ -+ if [ -d app-defaults -a ! -h app-defaults ]; then \ -+ (cd app-defaults; tar cf - . | \ -+ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ tar xf -; exit 0); exit 0); \ -+ fi; \ -+ $(RM) -r app-defaults; \ -+ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ -+ fi -+ -+install:: XVkbd-icelandic.ad -+ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-icelandic.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-icelandic -+ -+install:: -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ fi -+ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ -+ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ -+ fi -+ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ RELPATH=`echo $(LIBDIR)/. | \ -+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ -+ cd $(DESTDIR)$(LIBDIR)/.; \ -+ if [ -d app-defaults -a ! -h app-defaults ]; then \ -+ (cd app-defaults; tar cf - . | \ -+ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ tar xf -; exit 0); exit 0); \ -+ fi; \ -+ $(RM) -r app-defaults; \ -+ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ -+ fi -+ -+install:: XVkbd-italian.ad -+ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-italian.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-italian -+ -+install:: -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ fi -+ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ -+ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ -+ fi -+ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ RELPATH=`echo $(LIBDIR)/. | \ -+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ -+ cd $(DESTDIR)$(LIBDIR)/.; \ -+ if [ -d app-defaults -a ! -h app-defaults ]; then \ -+ (cd app-defaults; tar cf - . | \ -+ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ tar xf -; exit 0); exit 0); \ -+ fi; \ -+ $(RM) -r app-defaults; \ -+ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ -+ fi -+ -+install:: XVkbd-jisx6002.ad -+ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-jisx6002.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-jisx6002 -+ -+install:: -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ fi -+ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ -+ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ -+ fi -+ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ RELPATH=`echo $(LIBDIR)/. | \ -+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ -+ cd $(DESTDIR)$(LIBDIR)/.; \ -+ if [ -d app-defaults -a ! -h app-defaults ]; then \ -+ (cd app-defaults; tar cf - . | \ -+ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ tar xf -; exit 0); exit 0); \ -+ fi; \ -+ $(RM) -r app-defaults; \ -+ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ -+ fi -+ -+install:: XVkbd-jisx6004.ad -+ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-jisx6004.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-jisx6004 -+ -+install:: -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ fi -+ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ -+ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ -+ fi -+ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ RELPATH=`echo $(LIBDIR)/. | \ -+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ -+ cd $(DESTDIR)$(LIBDIR)/.; \ -+ if [ -d app-defaults -a ! -h app-defaults ]; then \ -+ (cd app-defaults; tar cf - . | \ -+ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ tar xf -; exit 0); exit 0); \ -+ fi; \ -+ $(RM) -r app-defaults; \ -+ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ -+ fi -+ -+install:: XVkbd-korean.ad -+ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-korean.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-korean -+ -+install:: -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ fi -+ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ -+ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ -+ fi -+ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ RELPATH=`echo $(LIBDIR)/. | \ -+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ -+ cd $(DESTDIR)$(LIBDIR)/.; \ -+ if [ -d app-defaults -a ! -h app-defaults ]; then \ -+ (cd app-defaults; tar cf - . | \ -+ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ tar xf -; exit 0); exit 0); \ -+ fi; \ -+ $(RM) -r app-defaults; \ -+ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ -+ fi -+ -+install:: XVkbd-latin1.ad -+ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-latin1.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-latin1 -+ -+install:: -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ fi -+ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ -+ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ -+ fi -+ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ RELPATH=`echo $(LIBDIR)/. | \ -+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ -+ cd $(DESTDIR)$(LIBDIR)/.; \ -+ if [ -d app-defaults -a ! -h app-defaults ]; then \ -+ (cd app-defaults; tar cf - . | \ -+ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ tar xf -; exit 0); exit 0); \ -+ fi; \ -+ $(RM) -r app-defaults; \ -+ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ -+ fi -+ -+install:: XVkbd-norwegian.ad -+ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-norwegian.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-norwegian -+ -+install:: -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ fi -+ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ -+ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ -+ fi -+ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ RELPATH=`echo $(LIBDIR)/. | \ -+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ -+ cd $(DESTDIR)$(LIBDIR)/.; \ -+ if [ -d app-defaults -a ! -h app-defaults ]; then \ -+ (cd app-defaults; tar cf - . | \ -+ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ tar xf -; exit 0); exit 0); \ -+ fi; \ -+ $(RM) -r app-defaults; \ -+ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ -+ fi -+ -+install:: XVkbd-portuguese.ad -+ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-portuguese.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-portuguese -+ -+install:: -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ fi -+ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ -+ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ -+ fi -+ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ RELPATH=`echo $(LIBDIR)/. | \ -+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ -+ cd $(DESTDIR)$(LIBDIR)/.; \ -+ if [ -d app-defaults -a ! -h app-defaults ]; then \ -+ (cd app-defaults; tar cf - . | \ -+ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ tar xf -; exit 0); exit 0); \ -+ fi; \ -+ $(RM) -r app-defaults; \ -+ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ -+ fi -+ -+install:: XVkbd-slovene.ad -+ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-slovene.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-slovene -+ -+install:: -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ fi -+ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ -+ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ -+ fi -+ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ RELPATH=`echo $(LIBDIR)/. | \ -+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ -+ cd $(DESTDIR)$(LIBDIR)/.; \ -+ if [ -d app-defaults -a ! -h app-defaults ]; then \ -+ (cd app-defaults; tar cf - . | \ -+ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ tar xf -; exit 0); exit 0); \ -+ fi; \ -+ $(RM) -r app-defaults; \ -+ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ -+ fi -+ -+install:: XVkbd-small.ad -+ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-small.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-small -+ -+install:: -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ fi -+ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ -+ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ -+ fi -+ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ RELPATH=`echo $(LIBDIR)/. | \ -+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ -+ cd $(DESTDIR)$(LIBDIR)/.; \ -+ if [ -d app-defaults -a ! -h app-defaults ]; then \ -+ (cd app-defaults; tar cf - . | \ -+ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ tar xf -; exit 0); exit 0); \ -+ fi; \ -+ $(RM) -r app-defaults; \ -+ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ -+ fi -+ -+install:: XVkbd-spanish.ad -+ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-spanish.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-spanish -+ -+install:: -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ fi -+ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ -+ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ -+ fi -+ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ RELPATH=`echo $(LIBDIR)/. | \ -+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ -+ cd $(DESTDIR)$(LIBDIR)/.; \ -+ if [ -d app-defaults -a ! -h app-defaults ]; then \ -+ (cd app-defaults; tar cf - . | \ -+ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ tar xf -; exit 0); exit 0); \ -+ fi; \ -+ $(RM) -r app-defaults; \ -+ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ -+ fi -+ -+install:: XVkbd-swedish.ad -+ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-swedish.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-swedish -+ -+install:: -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ fi -+ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ -+ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ -+ fi -+ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ RELPATH=`echo $(LIBDIR)/. | \ -+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ -+ cd $(DESTDIR)$(LIBDIR)/.; \ -+ if [ -d app-defaults -a ! -h app-defaults ]; then \ -+ (cd app-defaults; tar cf - . | \ -+ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ tar xf -; exit 0); exit 0); \ -+ fi; \ -+ $(RM) -r app-defaults; \ -+ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ -+ fi -+ -+install:: XVkbd-swissgerman.ad -+ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-swissgerman.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-swissgerman -+ -+install:: -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ fi -+ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ -+ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ -+ fi -+ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ RELPATH=`echo $(LIBDIR)/. | \ -+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ -+ cd $(DESTDIR)$(LIBDIR)/.; \ -+ if [ -d app-defaults -a ! -h app-defaults ]; then \ -+ (cd app-defaults; tar cf - . | \ -+ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ tar xf -; exit 0); exit 0); \ -+ fi; \ -+ $(RM) -r app-defaults; \ -+ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ -+ fi -+ -+install:: XVkbd-turkish.ad -+ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-turkish.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-turkish -+ -+install:: -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ fi -+ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ -+ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ -+ fi -+ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ -+ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ -+ fi -+ @for flag in ${MAKEFLAGS} ''; do \ -+ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ -+ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ -+ RELPATH=`echo $(LIBDIR)/. | \ -+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ -+ cd $(DESTDIR)$(LIBDIR)/.; \ -+ if [ -d app-defaults -a ! -h app-defaults ]; then \ -+ (cd app-defaults; tar cf - . | \ -+ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ -+ tar xf -; exit 0); exit 0); \ -+ fi; \ -+ $(RM) -r app-defaults; \ -+ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ -+ fi -+ -+install:: XVkbd-uk.ad -+ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ set +x; \ -+ else \ -+ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ -+ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi; \ -+ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ -+ fi -+ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-uk.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-uk -+ -+# ============================ -+# These rules are only for me -+ -+_distclean: cleandir -+ -rm Makefile -+ -+XVkbd-common.h: XVkbd-common.ad -+ -which ad2c > /dev/null && ad2c XVkbd-common.ad > XVkbd-common.h -+ -+HTML = $(HOME)/public_html/homepage3.nifty.com/xvkbd/index.html -+_readme: -+ -[ -f $(HTML) ] && html2man $(HTML) > xvkbd.man -+ ( echo ".pl 10000"; echo ".ll 75"; echo ".hy 0"; echo ".ad l" ) | cat - xvkbd.man | groff -Tascii -man | sed 's/.//g' | head -9000 | cat -s | tail +3 > README -+ -+# ============================ -+ -+# ---------------------------------------------------------------------- -+# common rules for all Makefiles - do not edit -+ -+.c.i: -+ $(RM) $@ -+ $(CC) -E $(CFLAGS) $(_NOOP_) $*.c > $@ -+ -+.SUFFIXES: .ii -+ -+.cc.ii: -+ $(RM) $@ -+ $(CC) -E $(CFLAGS) $(_NOOP_) $*.cc > $@ -+ -+.SUFFIXES: .s -+ -+.c.s: -+ $(RM) $@ -+ $(CC) -S $(CFLAGS) $(_NOOP_) $*.c -+ -+.cc.s: -+ $(RM) $@ -+ $(CC) -S $(CFLAGS) $(_NOOP_) $*.cc -+ -+emptyrule:: -+ -+cleandir:: -+ $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut "#"* -+ -+Makefile:: -+ -@if [ -f Makefile ]; then set -x; \ -+ $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \ -+ else exit 0; fi -+ $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) -+ -+tags:: -+ $(TAGS) -w *.[ch] -+ $(TAGS) -xw *.[ch] > TAGS -+ -+man_keywords:: -+ -+html_index:: -+ -+clean:: cleandir -+ -+distclean:: cleandir -+ -+# ---------------------------------------------------------------------- -+# empty rules for directories that do not have SUBDIRS - do not edit -+ -+install:: -+ @echo "install in $(CURRENT_DIR) done" -+ -+install.man:: -+ @echo "install.man in $(CURRENT_DIR) done" -+ -+install.sdk:: -+ @echo "install.sdk in $(CURRENT_DIR) done" -+ -+Makefiles:: -+ -+includes:: -+ -+depend:: -+ -+distclean:: -+ $(RM) Makefile Makefile.dep -+ -+# ---------------------------------------------------------------------- -+# dependencies generated by makedepend -+ diff --git a/package/xvkbd/xvkbd-makefile.patch b/package/xvkbd/xvkbd-makefile.patch new file mode 100644 index 0000000000..a8f6577387 --- /dev/null +++ b/package/xvkbd/xvkbd-makefile.patch @@ -0,0 +1,2400 @@ +--- a/Makefile 2008-03-04 06:14:55.425005441 -0500 ++++ b/Makefile 2008-03-05 08:40:50.000000000 -0500 +@@ -0,0 +1,2397 @@ ++# Makefile generated by imake - do not edit! ++# $Xorg: imake.c,v 1.6 2001/02/09 02:03:15 xorgcvs Exp $ ++ ++# ---------------------------------------------------------------------- ++# Makefile generated from "Imake.tmpl" and ++# $Xorg: Imake.tmpl,v 1.4 2000/08/17 19:41:46 cpqbld Exp $ ++# $XdotOrg: util/cf/Imake.tmpl,v 1.17 2006/04/15 15:55:25 herrb Exp $ ++# ++# ++# ++# ++# $XFree86: xc/config/cf/Imake.tmpl,v 3.155 2003/12/24 18:58:41 dickey Exp $ ++# ---------------------------------------------------------------------- ++ ++all:: ++ ++.SUFFIXES: .i ++ ++# $XdotOrg: util/cf/Imake.cf,v 1.12 2005/11/08 06:33:24 jkj Exp $ ++# $Xorg: Imake.cf,v 1.4 2000/08/17 19:41:45 cpqbld Exp $ ++ ++# $XFree86: xc/config/cf/Imake.cf,v 3.88 2003/12/16 21:30:21 herrb Exp $ ++ ++# Keep cpp from replacing path elements containing i486/i586/i686 ++ ++# ----------------------------------------------------------------------- ++# site-specific configuration parameters that need to come before ++# the platform-specific parameters - edit site.def to change ++ ++# site: $TOG: site.sample /main/r64_final/1 1998/02/05 16:28:49 kaleb $ ++ ++# site: $XFree86: xc/config/cf/site.def,v 3.24 2000/06/25 20:17:29 dawes Exp $ ++ ++# $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ ++ ++# ---------------------------------------------------------------------- ++# platform-specific configuration parameters - edit linux.cf to change ++ ++# $XdotOrg: util/cf/linux.cf,v 1.31 2005/10/21 19:10:27 ajax Exp $ ++# platform: $Xorg: linux.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $ ++ ++# platform: $XFree86: xc/config/cf/linux.cf,v 3.220 2003/12/30 22:38:33 tsi Exp $ ++ ++# operating system: Linux 2.6.23.8-63.fc8 i686 [ELF] (2.6.23) ++# libc: (6.7.0) ++# binutils: (217) ++ ++# $Xorg: lnxLib.rules,v 1.3 2000/08/17 19:41:47 cpqbld Exp $ ++# $XFree86: xc/config/cf/lnxLib.rules,v 3.52 2003/10/31 20:49:03 herrb Exp $ ++ ++# $XdotOrg: util/cf/xorg.cf,v 1.53 2005/10/03 16:08:44 alanc Exp $ ++ ++# $Xorg: xfree86.cf,v 1.4 2000/08/17 19:41:49 cpqbld Exp $ ++ ++XORG_VERSION_CURRENT = (((6) * 10000000) + ((8) * 100000) + ((99) * 1000) + 903) ++RELEASE_VERSION = RELEASE-1 ++ ++AFB_DEFS = -DUSE_AFB ++ ++DRIVERSDKDIR = $(USRLIBDIR)/Server ++DRIVERSDKMODULEDIR = $(USRLIBDIR)/Server/modules ++DRIVERSDKINCLUDEDIR = $(USRLIBDIR)/Server/include ++ ++ XF86SRC = $(SERVERSRC)/hw/xfree86 ++ XF86COMSRC = $(XF86SRC)/common ++ XF86PARSERSRC = $(XF86SRC)/parser ++ XF86OSSRC = $(XF86SRC)/os-support ++ XF86DRIVERSRC = $(XF86SRC)/drivers ++ DRIVERSRC = $(XF86DRIVERSRC) ++ ++ XFREE86DOCDIR = $(DOCDIR) ++ XFREE86PSDOCDIR = $(DOCPSDIR) ++ XFREE86PDFDOCDIR = $(DOCPDFDIR) ++ XFREE86HTMLDOCDIR = $(DOCHTMLDIR) ++XFREE86JAPANESEDOCDIR = $(DOCDIR)/Japanese ++ ++# $Xorg: xf86.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $ ++ ++# $XFree86: xc/config/cf/xf86.rules,v 3.34tsi Exp $ ++ ++# ---------------------------------------------------------------------- ++# site-specific configuration parameters that go after ++# the platform-specific parameters - edit site.def to change ++ ++# site: $TOG: site.sample /main/r64_final/1 1998/02/05 16:28:49 kaleb $ ++ ++# site: $XFree86: xc/config/cf/site.def,v 3.24 2000/06/25 20:17:29 dawes Exp $ ++ ++# --------------------------------------------------------------------- ++# Imake rules for building libraries, programs, scripts, and data files ++# rules: $Xorg: Imake.rules,v 1.3 2000/08/17 19:41:46 cpqbld Exp $ ++# rules: $XdotOrg: util/cf/Imake.rules,v 1.11 2005/11/08 06:33:24 jkj Exp $ ++# ++# ++# ++# ++# rules: $XFree86: xc/config/cf/Imake.rules,v 3.128 2003/11/15 03:25:17 dawes Exp $ ++ ++.PHONY: all interfaces install install.man install.lib install.sdk depend includes cleandir ++ ++ _NULLCMD_ = @ echo -n ++ ++X_BYTE_ORDER = X_LITTLE_ENDIAN ++ ++GLIDE2INCDIR = ++ ++GLIDE3INCDIR = ++ ++GLIDE3LIBNAME = ++ ++TKLIBNAME = ++ ++TKLIBDIR = ++ ++TCLLIBNAME = ++ ++TCLIBDIR = ++ ++ PATHSEP = / ++ SHELL = /bin/sh -e ++ ++ TOP = . ++ CURRENT_DIR = . ++ ++ IMAKE = imake ++ DEPEND = gccmakedep ++ MKDIRHIER = mkdir -p ++ REVPATH = revpath ++ EXPORTLISTGEN = ++ RMAN = RmanCmd ++ RMANBASENAME = rman ++ RMANOPTIONS = RmanOptions ++ CONFIGSRC = $(TOP)/config ++ IMAKESRC = $(CONFIGSRC)/imake ++ DEPENDSRC = $(CONFIGSRC)/util ++ ++ INCROOT = /usr/include ++ USRLIBDIR = /usr/lib ++ VARDIR = /var ++ VARLIBDIR = $(VARDIR)/lib ++ SYSTEMUSRLIBDIR = /usr/lib ++ SYSTEMUSRINCDIR = /usr/include ++ SHLIBDIR = /usr/lib ++ LINTLIBDIR = $(USRLIBDIR)/lint ++ MANPATH = /usr/share/man ++ MANSOURCEPATH = $(MANPATH)/man ++ MANDIR = $(MANSOURCEPATH)1 ++ LIBMANDIR = $(MANSOURCEPATH)3 ++ FILEMANDIR = $(MANSOURCEPATH)5 ++ MISCMANDIR = $(MANSOURCEPATH)$(MISCMANSUFFIX) ++ DRIVERMANDIR = $(MANSOURCEPATH)$(DRIVERMANSUFFIX) ++ LOGDIRECTORY = $(VARDIR)/log ++ ++ VARRUNDIR = $(VARDIR)/run ++ ++ VARDBDIR = $(VARDIR)/lib ++ ++ AR = ar clq ++ ++# Nice try but useless: make will inherit BOOTSTRAPCFLAGS ++# from top Makefile ++ BOOTSTRAPCFLAGS = ++ ++ CC = gcc -m32 ++ AS = gcc -m32 -c -x assembler ++ ++.SUFFIXES: .cc ++ ++ CXX = c++ -m32 ++ ++ CXXFILT = c++filt ++ ++ CXXLIB = -lstdc++ ++ ++ CXXDEBUGFLAGS = -O2 -fno-strength-reduce -fno-strict-aliasing ++CXXDEPENDINCLUDES = ++ CXXEXTRA_DEFINES = ++CXXEXTRA_INCLUDES = ++ CXXSTD_DEFINES = -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(CXXPROJECT_DEFINES) ++ CXXOPTIONS = ++ CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES) ++ CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(DEFINES) $(CXXEXTRA_DEFINES) ++ CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES) ++ ++ COMPRESS = compress ++ GZIPCMD = gzip ++ ++ CPP = cpp $(STD_CPP_DEFINES) ++ RAWCPP = cpp -undef $(STD_CPP_OPTIONS) ++ PREPROCESSCMD = gcc -m32 -E $(STD_CPP_DEFINES) ++ ++ INSTALL = install ++ INSTALLFLAGS = -c ++ ++ LD = gcc -m32 -nostdlib ++ ++ LEX = flex -l ++ M4 = m4 ++ M4FLAGS = ++ LEXLIB = -lfl ++ YACC = bison -y ++ CCYACC = bison -y ++ ++ LINT = lint ++ ++ LINTLIBFLAG = -C ++ LINTOPTS = -axz ++ LN = ln -s ++ MAKE = make ++ MV = mv -f ++ CP = cp ++ ++ RANLIB = ranlib ++ ++ RANLIBINSTFLAGS = ++ ++ RM = rm -f ++ PERL = perl ++ PERLOPTS = ++ PERLENVSETUP = env LC_ALL=C ++ MANSUFFIX = 1x ++ LIBMANSUFFIX = 3x ++ FILEMANSUFFIX = 5x ++ MISCMANSUFFIX = 7 ++ DRIVERMANSUFFIX = 4 ++ ADMINMANSUFFIX = 8 ++ MANSRCSUFFIX = man ++ MANNEWSUFFIX = _man ++ MANDEFS = -D__apploaddir__=$(XAPPLOADDIR) -D__appmansuffix__=$(MANSUFFIX) -D__filemansuffix__=$(FILEMANSUFFIX) -D__libmansuffix__=$(LIBMANSUFFIX) -D__miscmansuffix__=$(MISCMANSUFFIX) -D__drivermansuffix__=$(DRIVERMANSUFFIX) -D__adminmansuffix__=$(ADMINMANSUFFIX) -D__projectroot__=$(PROJECTROOT) -D__xconfigfile__=$(XCONFIGFILE) -D__xconfigdir__=$(XCONFIGDIR) -D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME) $(XORGMANDEFS) $(VENDORMANDEFS) ++ ++ COMPRESSMANCMD = gzip -n ++ ++ TROFF = groff -Tps ++ NROFF = nroff ++ ++ MSMACROS = -ms ++ MANMACROS = -man ++ TBL = tbl ++ EQN = eqn ++ NEQN = neqn ++ COL = col ++ COLFLAGS = -b ++ ++ MODCC = gcc -m32 ++ ++ MODCPP = cpp ++ MODCFLAGS = $(CFLAGS) ++ MODAS = gcc -m32 -c -x assembler ++ MODASFLAGS = ++ ++ MODLD = gcc -m32 -nostdlib ++ ++ MODLDFLAGS = ++MODLDCOMBINEFLAGS = -r ++ MODAR = ar clq ++ ++ MODRANLIB = ranlib ++ ++ STD_INCLUDES = ++ STD_CPP_OPTIONS = -traditional ++ STD_CPP_DEFINES = -traditional -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(PROJECT_DEFINES) ++ STD_DEFINES = -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(PROJECT_DEFINES) ++ EXTRA_LOAD_FLAGS = ++ EXTRA_LDOPTIONS = ++ EXTRA_LIBRARIES = ++ TAGS = ctags ++ ++ PARALLELMFLAGS = ++ ++ SHAREDCODEDEF = ++ SHLIBDEF = ++ ++ SHLIBLDFLAGS = -shared $(SHLIBGLOBALSFLAGS) ++ ++ NOSTDLIB = -nostdlib ++ POSTNOSTDLIB = -Wl,-Bstatic -lgcc -Wl,-Bdynamic ++ ++ PICFLAGS = -fPIC ++ ++ CXXPICFLAGS = -fPIC ++ ++ PROTO_DEFINES = -DFUNCPROTO=15 -DNARROWPROTO ++ ++ INSTPGMFLAGS = ++ ++ INSTBINFLAGS = -m 0755 ++ INSTUIDFLAGS = -m 4711 ++ INSTLIBFLAGS = -m 0644 ++ INSTINCFLAGS = -m 0444 ++ INSTMANFLAGS = -m 0444 ++ INSTDATFLAGS = -m 0444 ++ INSTKMEMFLAGS = -m 4711 ++ ++ PROJECTROOT = /usr ++ ++ CDEBUGFLAGS = -O2 -fno-strength-reduce -fno-strict-aliasing ++ CCOPTIONS = ++ ++ ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(INSTALLED_INCLUDES) $(STD_INCLUDES) ++ ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(MODULE_DEFINES) $(DEFINES) $(EXTRA_DEFINES) ++ CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(MODULE_CFLAGS) $(ALLDEFINES) ++ LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES) ++ LDPRELIB = -L$(USRLIBDIR) $(INSTALLED_LIBS) ++ LDPOSTLIB = ++ LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS) ++ CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS) ++ ++ LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) ++ ++ CCLINK = $(CC) ++ ++ CXXLINK = $(CXX) ++ ++ LDSTRIPFLAGS = -x ++ LDCOMBINEFLAGS = -r ++ DEPENDFLAGS = ++ DEPEND_DEFINES = ++ ++# Not sure this belongs here ++ TKLIBDIR = ++ TKINCDIR = ++ TKLIBNAME = ++ TKLIBRARY = -L$(TKLIBDIR) -l$(TKLIBNAME) ++ TCLLIBDIR = ++ TCLINCDIR = ++ TCLLIBNAME = ++ TCLLIBRARY = -L$(TCLLIBDIR) -l$(TCLLIBNAME) ++ ++ MACROFILE = linux.cf ++ RM_CMD = $(RM) ++ ++ IMAKE_DEFINES = ++ IMAKE_WARNINGS = -Wundef ++ ++ IRULESRC = $(CONFIGDIR) ++ IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) $(IMAKE_WARNINGS) ++ ++ ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) $(IRULESRC)/xfree86.cf $(IRULESRC)/xf86.rules $(IRULESRC)/xorgsite.def $(IRULESRC)/host.def $(EXTRA_ICONFIGFILES) ++ ++# $Xorg: X11.rules,v 1.4 2000/08/17 19:41:46 cpqbld Exp $ ++ ++# $XFree86: xc/config/cf/X11.rules,v 1.6 2001/01/17 16:22:31 dawes Exp $ ++ ++# ---------------------------------------------------------------------- ++# X Window System Build Parameters and Rules ++# $XdotOrg: util/cf/X11.tmpl,v 1.54 2006/04/15 15:55:25 herrb Exp $ ++# $Xorg: X11.tmpl,v 1.6 2000/08/17 19:41:46 cpqbld Exp $ ++# ++# ++# ++# ++# $XFree86: xc/config/cf/X11.tmpl,v 1.248 2004/02/16 04:07:37 dawes Exp $ ++ ++XORGRELSTRING = `echo 6 8 99 903 | sed -e 's/ /./g' -e 's/^/Version\\\ /'` ++ XORGMANNAME = X Version 11 ++ ++STICKY_DEFINES = -DHAS_STICKY_DIR_BIT ++ ++FCHOWN_DEFINES = -DHAS_FCHOWN ++ ++# ----------------------------------------------------------------------- ++# X Window System make variables; these need to be coordinated with rules ++ ++ XTOP = $(TOP) ++ BINDIR = /usr/bin ++ BUILDINCROOT = $(TOP)/exports ++ BUILDINCDIR = $(BUILDINCROOT)/include ++ BUILDINCTOP = ../.. ++ BUILDLIBDIR = $(TOP)/exports/lib ++ BUILDLIBTOP = ../.. ++ BUILDBINDIR = $(TOP)/exports/bin ++ BUILDBINTOP = ../.. ++ BUILDMODULEDIR = $(BUILDLIBDIR)/modules ++ BUILDI18NDIR = $(BUILDLIBDIR)/locale ++ BUILDMODULETOP = $(BUILDLIBTOP)/.. ++ XBUILDINCROOT = $(XTOP)/exports ++ XBUILDINCDIR = $(XBUILDINCROOT)/include/X11 ++ XBUILDINCTOP = ../../.. ++ XBUILDBINDIR = $(XBUILDINCROOT)/bin ++ INCDIR = $(INCROOT) ++ ADMDIR = /usr/adm ++ LIBDIR = /usr/lib/X11 ++ SHAREDIR = /usr/share/X11 ++ LIBEXECDIR = /usr/libexec ++ MODULEDIR = $(USRLIBDIR)/modules ++ TOP_X_INCLUDES = ++ XBINDIR = $(PROJECTROOT)/bin ++ ++ INSTSRCDIR = /usr/src ++ ++ ETCX11DIR = /etc/X11 ++ ++ CONFDIR = $(ETCX11DIR) ++ ++ DOCDIR = $(LIBDIR)/doc ++ DOCHTMLDIR = $(DOCDIR)/html ++ DOCPSDIR = $(DOCDIR)/PostScript ++ DOCPDFDIR = $(DOCDIR)/PDF ++ FONTDIR = $(LIBDIR)/fonts ++ ENCODINGSDIR = $(LIBDIR)/fonts/encodings ++ XINITDIR = $(LIBDIR)/xinit ++ XDMDIR = $(LIBDIR)/xdm ++ XDMVARDIR = $(VARLIBDIR)/xdm ++ TWMDIR = $(LIBDIR)/twm ++ XSMDIR = $(LIBDIR)/xsm ++ NLSDIR = $(LIBDIR)/nls ++ XLOCALEDIR = $(LIBDIR)/locale ++ LBXPROXYDIR = $(LIBDIR)/lbxproxy ++ PROXYMANAGERDIR = $(LIBDIR)/proxymngr ++ XPRINTDIR = $(LIBDIR)/xserver ++ XAPPLOADDIR = /usr/share/X11/app-defaults ++ FONTCFLAGS = -t ++ ++ INSTAPPFLAGS = $(INSTDATFLAGS) ++ ++ RGB = $(XBINDIR)/rgb ++ FONTC = $(XBINDIR)/bdftopcf ++ MKFONTSCALE = $(XBINDIR)/mkfontscale ++ MKFONTDIR = $(XBINDIR)/mkfontdir ++ MKHTMLINDEX = $(XBINDIR)/mkhtmlindex ++ UCS2ANY = $(XBINDIR)/ucs2any ++ BDFTRUNCATE = $(XBINDIR)/bdftruncate ++ UCSMAPPREFIX = $(FONTDIR)/util/map- ++ XCURSORGEN = $(XBINDIR)/xcursorgen ++ ++ HTMLINDEXCMD = HtmlIndexCmd ++ ++ DOCUTILSRC = $(XTOP)/doc/util ++ CLIENTSRC = $(TOP)/clients ++ DEMOSRC = $(TOP)/demos ++ XDOCMACROS = $(DOCUTILSRC)/macros.t ++ XIDXMACROS = $(DOCUTILSRC)/indexmacros.t ++ PROGRAMSRC = $(TOP)/programs ++ LIBSRC = $(XTOP)/lib ++ FONTSRC = $(XTOP)/fonts ++ ENCODINGSSRC = $(FONTSRC)/encodings ++ INCLUDESRC = $(BUILDINCROOT)/include ++ XINCLUDESRC = $(INCLUDESRC)/X11 ++ SERVERSRC = $(XTOP)/programs/Xserver ++ CONTRIBSRC = $(XTOP)/../contrib ++ UNSUPPORTEDSRC = $(XTOP)/unsupported ++ DOCSRC = $(XTOP)/doc ++ RGBSRC = $(XTOP)/programs/rgb ++ BDFTOPCFSRC = $(PROGRAMSRC)/bdftopcf ++ MKFONTDIRSRC = $(PROGRAMSRC)/mkfontdir ++ FONTSERVERSRC = $(PROGRAMSRC)/xfs ++ FONTINCSRC = $(XTOP)/include/fonts ++ EXTINCSRC = $(XTOP)/include/extensions ++ FTSOURCEDIR = FreeTypeSrcDir ++ DRMSRCDIR = $(TOP)/extras/drm ++ MESASRCDIR = $(TOP)/extras/Mesa ++ OGLSAMPLESRCDIR = $(TOP)/extras/ogl-sample ++ PSWRAPSRC = $(XTOP)/config/pswrap ++ TRANSCOMMSRC = $(LIBSRC)/xtrans ++ TRANS_INCLUDES = -I$(TRANSCOMMSRC) ++ CONNECTION_FLAGS = -DUNIXCONN -DTCPCONN $(STICKY_DEFINES) $(FCHOWN_DEFINES) -DIPv6 ++XTRANS_FAILDEFINES = -DFAIL_HARD ++ ++ VENDORMANNAME = X.Org ++ VENDORMANVERSION = `echo 6 8 99 903 | sed -e 's/ /./g' -e 's/^/Version\\\ /'` ++ XORGMANDEFS = -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" ++ VENDORMANDEFS = -D__vendorversion__="$(VENDORMANVERSION) $(VENDORMANNAME)" ++ VENDORNAME = The X.Org Foundation ++ VENDORNAMESHORT = X.Org ++ ++ VENDORWEBSUPPORT = http://wiki.X.Org ++ ++VENDORSUPPORTDEFS = -D__VENDORDWEBSUPPORT__='"$(VENDORWEBSUPPORT)"' ++ ++ XKBDEFRULES = xorg ++ XKBDEFRULESDEFS = -D__XKBDEFRULES__='"$(XKBDEFRULES)"' ++ ++ XCONFIGFILE = xorg.conf ++ XCONFIGDIR = $(LIBDIR) ++ XLOGFILE = Xorg ++ XSERVERNAME = Xorg ++ ++ XENVLIBDIR = $(USRLIBDIR) ++ CLIENTENVSETUP = LD_LIBRARY_PATH=$(XENVLIBDIR) XLOCALEDIR=$(BUILDLIBDIR)/locale ++ ++# $Xorg: lnxLib.tmpl,v 1.3 2000/08/17 19:41:47 cpqbld Exp $ ++# $XFree86: xc/config/cf/lnxLib.tmpl,v 3.19 2003/10/15 22:47:48 herrb Exp $ ++ ++ XLIBSRC = $(LIBSRC)/X11 ++ ++SOXLIBREV = 6.2 ++DEPXONLYLIB = ++XONLYLIB = -lX11 ++ ++LINTXONLY = $(LINTLIBDIR)/llib-lX11.ln ++ ++ DEPXLIBONLY = $(DEPXONLYLIB) ++ XLIBONLY = $(XONLYLIB) ++ LINTXONLYLIB = $(LINTXONLY) ++ ++ XEXTLIBSRC = $(LIBSRC)/Xext ++ ++SOXEXTREV = 6.4 ++DEPEXTENSIONLIB = ++EXTENSIONLIB = -lXext ++ ++LINTEXTENSION = $(LINTLIBDIR)/llib-lXext.ln ++ ++LINTEXTENSIONLIB = $(LINTEXTENSION) ++ DEPXLIB = $(DEPEXTENSIONLIB) $(DEPXONLYLIB) ++ XLIB = $(EXTENSIONLIB) $(XONLYLIB) ++ LINTXLIB = $(LINTXONLYLIB) ++ ++ XSSLIBSRC = $(LIBSRC)/Xss ++ ++SOXSSREV = 1.0 ++DEPXSSLIB = ++XSSLIB = -lXss ++ ++LINTXSS = $(LINTLIBDIR)/llib-lXss.ln ++ ++ XXF86MISCLIBSRC = $(LIBSRC)/Xxf86misc ++ ++SOXXF86MISCREV = 1.1 ++DEPXXF86MISCLIB = ++XXF86MISCLIB = -lXxf86misc ++ ++LINTXXF86MISC = $(LINTLIBDIR)/llib-lXxf86misc.ln ++ ++ XXF86VMLIBSRC = $(LIBSRC)/Xxf86vm ++ ++SOXXF86VMREV = 1.0 ++DEPXXF86VMLIB = ++XXF86VMLIB = -lXxf86vm ++ ++LINTXXF86VM = $(LINTLIBDIR)/llib-lXxf86vm.ln ++ ++ XXF86DGALIBSRC = $(LIBSRC)/Xxf86dga ++ ++SOXXF86DGAREV = 1.0 ++DEPXXF86DGALIB = ++XXF86DGALIB = -lXxf86dga ++ ++LINTXXF86DGA = $(LINTLIBDIR)/llib-lXxf86dga.ln ++ ++ XXF86RUSHLIBSRC = $(LIBSRC)/Xxf86rush ++ ++SOXXF86RUSHREV = 1.0 ++DEPXXF86RUSHLIB = ++XXF86RUSHLIB = -lXxf86rush ++ ++LINTXXF86RUSH = $(LINTLIBDIR)/llib-lXxf86rush.ln ++ ++ XVLIBSRC = $(LIBSRC)/Xv ++ ++SOXVREV = 1.0 ++DEPXVLIB = ++XVLIB = -lXv ++ ++LINTXV = $(LINTLIBDIR)/llib-lXv.ln ++ ++ XVMCLIBSRC = $(LIBSRC)/XvMC ++ ++SOXVMCREV = 1.0 ++DEPXVMCLIB = ++XVMCLIB = -lXvMC ++ ++LINTXVMC = $(LINTLIBDIR)/llib-lXvMC.ln ++ ++ XINERAMALIBSRC = $(LIBSRC)/Xinerama ++ ++SOXINERAMAREV = 1.0 ++DEPXINERAMALIB = ++XINERAMALIB = -lXinerama ++ ++LINTXINERAMA = $(LINTLIBDIR)/llib-lXinerama.ln ++ ++ XRESLIBSRC = $(LIBSRC)/XRes ++ ++SOXRESREV = 1.0 ++DEPXRESLIB = ++XRESLIB = -lXRes ++ ++LINTXRES = $(LINTLIBDIR)/llib-lXRes.ln ++ ++ DMXLIBSRC = $(LIBSRC)/dmx ++ ++DEPDMXLIB = $(USRLIBDIR)/libdmx.a ++DMXLIB = -ldmx ++ ++LINTDMX = $(LINTLIBDIR)/llib-ldmx.ln ++ ++ DPSLIBSRC = $(LIBSRC)/dps ++ ++DEPDPSLIB = $(USRLIBDIR)/libdps.a ++DPSLIB = -ldps ++ ++LINTDPS = $(LINTLIBDIR)/llib-ldps.ln ++ ++ DPSTKLIBSRC = $(LIBSRC)/dpstk ++ ++DEPDPSTKLIB = $(USRLIBDIR)/libdpstk.a ++DPSTKLIB = -ldpstk ++ ++LINTDPSTK = $(LINTLIBDIR)/llib-ldpstk.ln ++ ++ PSRESLIBSRC = $(LIBSRC)/psres ++ ++DEPPSRESLIB = $(USRLIBDIR)/libpsres.a ++PSRESLIB = -lpsres ++ ++LINTPSRES = $(LINTLIBDIR)/llib-lpsres.ln ++ ++ GLULIBSRC = $(LIBSRC)/GLU ++ ++SOGLUREV = 1.3 ++DEPGLULIB = ++GLULIB = -lGLU ++ ++LINTGLU = $(LINTLIBDIR)/llib-lGLU.ln ++ ++ GLXLIBSRC = $(LIBSRC)/GL ++ ++SOGLREV = 1.2 ++DEPGLXLIB = ++GLXLIB = -lGL ++ ++LINTGLX = $(LINTLIBDIR)/llib-lGL.ln ++ ++ GLWIDGETSRC = $(LIBSRC)/GLw ++ ++SOGLWREV = 1.0 ++DEPGLWLIB = ++GLWLIB = -lGLw ++ ++LINTGLW = $(LINTLIBDIR)/llib-lGLw.ln ++ ++ XRENDERLIBSRC = $(LIBSRC)/Xrender ++ ++SOXRENDERREV = 1.2.2 ++DEPXRENDERLIB = ++XRENDERLIB = -lXrender ++ ++LINTXRENDER = $(LINTLIBDIR)/llib-lXrender.ln ++ ++ XRANDRLIBSRC = $(LIBSRC)/Xrandr ++ ++SOXRANDRREV = 2.0 ++DEPXRANDRLIB = ++XRANDRLIB = -lXrandr ++ ++LINTXRANDR = $(LINTLIBDIR)/llib-lXrandr.ln ++ ++ XFIXESLIBSRC = $(LIBSRC)/Xfixes ++ ++SOXFIXESREV = 3.0 ++DEPXFIXESLIB = ++XFIXESLIB = -lXfixes ++ ++LINTXFIXES = $(LINTLIBDIR)/llib-lXfixes.ln ++ ++ XDAMAGELIBSRC = $(LIBSRC)/Xdamage ++ ++SOXDAMAGEREV = 1.0 ++DEPXDAMAGELIB = ++XDAMAGELIB = -lXdamage ++ ++LINTXDAMAGE = $(LINTLIBDIR)/llib-lXdamage.ln ++ ++XCOMPOSITELIBSRC = $(LIBSRC)/Xcomposite ++ ++SOXCOMPOSITEREV = 1.0 ++DEPXCOMPOSITELIB = ++XCOMPOSITELIB = -lXcomposite ++ ++LINTXCOMPOSITE = $(LINTLIBDIR)/llib-lXcomposite.ln ++ ++XEVIELIBSRC = $(LIBSRC)/Xevie ++ ++SOXEVIEREV = 1.0 ++DEPXEVIELIB = ++XEVIELIB = -lXevie ++ ++LINTXEVIE = $(LINTLIBDIR)/llib-lXevie.ln ++ ++ XCURSORLIBSRC = $(LIBSRC)/Xcursor ++ ++SOXCURSORREV = 1.0.2 ++DEPXCURSORLIB = ++XCURSORLIB = -lXcursor ++ ++LINTXCURSOR = $(LINTLIBDIR)/llib-lXcursor.ln ++ ++ APPLEWMLIBSRC = $(LIBSRC)/apple ++ ++DEPAPPLEWMLIB = $(USRLIBDIR)/libAppleWM.a ++APPLEWMLIB = -lAppleWM ++ ++LINTAPPLEWM = $(LINTLIBDIR)/llib-lAppleWM.ln ++ ++ WINDOWSWMLIBSRC = $(LIBSRC)/windows ++ ++DEPWINDOWSWMLIB = $(USRLIBDIR)/libWindowsWM.a ++WINDOWSWMLIB = -lWindowsWM ++ ++LINTWINDOWSWM = $(LINTLIBDIR)/llib-lWindowsWM.ln ++ ++ XFONTCACHELIBSRC = $(LIBSRC)/Xfontcache ++ ++SOXFONTCACHEREV = 1.2 ++DEPXFONTCACHELIB = ++XFONTCACHELIB = -lXfontcache ++ ++LINTXFONTCACHE = $(LINTLIBDIR)/llib-lXfontcache.ln ++ ++ XAUTHSRC = $(LIBSRC)/Xau ++ ++SOXAUTHREV = 6.0 ++DEPXAUTHLIB = ++XAUTHLIB = -lXau ++ ++LINTXAUTH = $(LINTLIBDIR)/llib-lXau.ln ++ ++ XDMCPLIBSRC = $(LIBSRC)/Xdmcp ++ ++SOXDMCPREV = 6.0 ++DEPXDMCPLIB = ++XDMCPLIB = -lXdmcp ++ ++LINTXDMCP = $(LINTLIBDIR)/llib-lXdmcp.ln ++ ++ XMUSRC = $(LIBSRC)/Xmu ++ ++SOXMUREV = 6.2 ++DEPXMULIB = ++XMULIB = -lXmu ++ ++LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln ++ ++ XMUUSRC = $(LIBSRC)/Xmuu ++ ++SOXMUUREV = 1.0 ++DEPXMUULIB = ++XMUULIB = -lXmuu ++ ++LINTXMUU = $(LINTLIBDIR)/llib-lXmuu.ln ++ ++ OLDXLIBSRC = $(LIBSRC)/oldX ++ ++DEPOLDXLIB = $(USRLIBDIR)/liboldX.a ++OLDXLIB = -loldX ++ ++LINTOLDX = $(LINTLIBDIR)/llib-loldX.ln ++ ++ XPLIBSRC = $(LIBSRC)/Xp ++ ++SOXPREV = 6.2 ++DEPXPLIB = ++XPLIB = -lXp ++ ++LINTXP = $(LINTLIBDIR)/llib-lXp.ln ++ ++ TOOLKITSRC = $(LIBSRC)/Xt ++ ++SOXTREV = 6.0 ++DEPXTOOLONLYLIB = ++XTOOLONLYLIB = -lXt ++ ++LINTXTOOLONLY = $(LINTLIBDIR)/llib-lXt.ln ++ ++ DEPXTOOLLIB = $(DEPXTOOLONLYLIB) $(DEPSMLIB) $(DEPICELIB) ++ XTOOLLIB = $(XTOOLONLYLIB) $(SMLIB) $(ICELIB) ++ LINTXTOOLLIB = $(LINTXTOOLONLYLIB) ++ ++ XALIBSRC = $(LIBSRC)/Xa ++ ++SOXAREV = 1.0 ++DEPXALIB = ++XALIB = -lXa ++ ++LINTXA = $(LINTLIBDIR)/llib-lXa.ln ++ ++ AWIDGETSRC = $(LIBSRC)/Xaw ++ ++SOXAWREV = 8.0 ++DEPXAWLIB = ++XAWLIB = -lXaw ++ ++LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln ++ ++ AWIDGET7SRC = $(LIBSRC)/Xaw7 ++ ++SOXAW7REV = 7.0 ++DEPXAW7LIB = ++XAW7LIB = -lXaw ++ ++LINTXAW7 = $(LINTLIBDIR)/llib-lXaw.ln ++ ++ AWIDGET6SRC = $(LIBSRC)/Xaw6 ++ ++SOXAW6REV = 6.1 ++DEPXAW6LIB = ++XAW6LIB = -lXaw ++ ++LINTXAW6 = $(LINTLIBDIR)/llib-lXaw.ln ++ ++ XILIBSRC = $(LIBSRC)/Xi ++ ++SOXINPUTREV = 6.0 ++DEPXILIB = ++XILIB = -lXi ++ ++LINTXI = $(LINTLIBDIR)/llib-lXi.ln ++ ++ XTESTLIBSRC = $(LIBSRC)/Xtst ++ ++SOXTESTREV = 6.1 ++DEPXTESTLIB = ++XTESTLIB = -lXtst ++ ++LINTXTEST = $(LINTLIBDIR)/llib-lXtst.ln ++ ++DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a ++XBSDLIB = -lXbsd ++ ++LINTXBSD = $(LINTLIBDIR)/llib-lXbsd.ln ++ ++ ICESRC = $(LIBSRC)/ICE ++ ++SOICEREV = 6.4 ++DEPICELIB = ++ICELIB = -lICE ++ ++LINTICE = $(LINTLIBDIR)/llib-lICE.ln ++ ++ SMSRC = $(LIBSRC)/SM ++ ++SOSMREV = 6.0 ++DEPSMLIB = ++SMLIB = -lSM ++ ++LINTSM = $(LINTLIBDIR)/llib-lSM.ln ++ ++ XKEYSRC = $(LIBSRC)/Xkey ++ ++SOXKEYREV = 6.0 ++DEPXKEYLIB = ++XKEYLIB = -lXkey ++ ++LINTXKEY = $(LINTLIBDIR)/llib-lXkey.ln ++ ++ FSLIBSRC = $(LIBSRC)/FS ++ ++SOFSREV = 6.0 ++DEPFSLIB = ++FSLIB = -lFS ++ ++LINTFS = $(LINTLIBDIR)/llib-lFS.ln ++ ++ FONTLIBSRC = $(LIBSRC)/font ++ ++SOFONTREV = 1.5 ++DEPFONTLIB = ++FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) -lXfont ++ ++LINTXFONT = $(LINTLIBDIR)/llib-lXfont.ln ++# ++SOFONTREV = 1.5 ++DEPXFONTLIB = ++XFONTLIB = -lXfont ++ ++LINTXFONT = $(LINTLIBDIR)/llib-lXfont.ln ++ ++ FONTSTUBLIBSRC = $(FONTLIBSRC)/stubs ++ ++DEPFONTSTUBLIB = $(USRLIBDIR)/libfntstubs.a ++FONTSTUBLIB = -lfntstubs ++ ++LINTFONTSTUB = $(LINTLIBDIR)/llib-lfntstubs.ln ++ DEPFONTLIB = $(DEPXFONTLIB) $(DEPFONTSTUBLIB) ++ FONTLIB = $(XFONTLIB) $(FONTSTUBLIB) $(FREETYPE2LIB) ++ ++ FONTENCLIBSRC = $(LIBSRC)/fontenc ++ ++SOFONTENCREV = 1.0 ++DEPXFONTENCLIB = ++XFONTENCLIB = -lfontenc ++ ++LINTXFONTENC = $(LINTLIBDIR)/llib-lfontenc.ln ++ ++ XPMLIBSRC = $(LIBSRC)/Xpm ++ ++SOXPMREV = 4.11 ++DEPXPMLIB = ++XPMLIB = -lXpm ++ ++LINTXPM = $(LINTLIBDIR)/llib-lXpm.ln ++ ++FREETYPE2DIR = /usr ++FREETYPE2LIBDIR = /usr/lib ++FREETYPE2INCDIR = /usr/include ++ ++FREETYPE2LIB = -lfreetype ++ ++FREETYPE2INCLUDES = -I$(FREETYPE2INCDIR)/freetype2 -I$(FREETYPE2INCDIR)/freetype2/config ++ ++FREETYPE2DEFINES = -DFREETYPE2 ++ ++ EXPATLIBSRC = $(LIBSRC)/expat ++ ++SOEXPATREV = 0.4 ++DEPEXPATLIB = ++EXPATLIB = -lexpat ++ ++LINTEXPAT = $(LINTLIBDIR)/llib-lexpat.ln ++ ++EXPATDIR = /usr ++EXPATLIBDIR = /usr/lib ++EXPATINCDIR = /usr/include ++ ++EXPATINCLUDES = ++ ++EXPATLIB = -lexpat ++ ++EXPATDEFINES = -DEXPAT ++ ++ XFT1LIBSRC = $(LIBSRC)/Xft1 ++ ++SOXFT1REV = 1.1 ++DEPXFT1LIB = ++XFT1LIB = -lXft ++ ++LINTXFT1 = $(LINTLIBDIR)/llib-lXft.ln ++ ++ XFTLIBSRC = $(LIBSRC)/Xft ++ ++SOXFTREV = 2.1.2 ++DEPXFTLIB = ++XFTLIB = -lXft ++ ++LINTXFT = $(LINTLIBDIR)/llib-lXft.ln ++ ++ FONTCONFIGLIBSRC = $(LIBSRC)/fontconfig ++ ++SOFONTCONFIGREV = 1.0.4 ++DEPFONTCONFIGLIB = ++FONTCONFIGLIB = -lfontconfig ++ ++LINTFONTCONFIG = $(LINTLIBDIR)/llib-lfontconfig.ln ++ ++FONTCONFIGINCDIR=$(INCDIR) ++ ++FONTCONFIGINCLUDES = -I$(FONTCONFIGINCDIR) ++ ++FCCACHE = $(BINDIR)/fc-cache ++ ++FONTCONFIGDEFINES = -DFONTCONFIG ++ ++XFTINCLUDES=$(FONTCONFIGINCLUDES) $(FREETYPE2INCLUDES) ++ ++LIBPNGINCDIR = /usr/include ++ ++LIBPNGINC= ++ ++LIBPNGDIR = /usr ++LIBPNGLIBDIR = /usr/lib ++LIBPNGINCDIR = /usr/include ++ ++LIBPNGLIB = -lpng ++ ++ XKBFILELIBSRC = $(LIBSRC)/xkbfile ++ ++SOXKBFILEREV = 1.0 ++DEPXKBFILELIB = ++XKBFILELIB = -lxkbfile ++ ++LINTXKBFILE = $(LINTLIBDIR)/llib-lxkbfile.ln ++ ++ XKBCOMPCMD = $(XBINDIR)/xkbcomp ++ ++ XKBUILIBSRC = $(LIBSRC)/xkbui ++ ++SOXKBUIREV = 1.0 ++DEPXKBUILIB = ++XKBUILIB = -lxkbui ++ ++LINTXKBUI = $(LINTLIBDIR)/llib-lxkbui.ln ++ ++EXTRAXAWREQS = ++ ++EXTRAXAWCLIENTDEPLIBS = ++ ++EXTRAXAWCLIENTLIBS = ++ ++ XTRAPLIBSRC = $(LIBSRC)/XTrap ++ ++SOXTRAPREV = 6.4 ++DEPXTRAPLIB = ++XTRAPLIB = -lXTrap ++ ++LINTXTRAP = $(LINTLIBDIR)/llib-lXTrap.ln ++ ++ DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) ++ ++ DEPLIBS1 = $(DEPLIBS) ++ DEPLIBS2 = $(DEPLIBS) ++ DEPLIBS3 = $(DEPLIBS) ++ DEPLIBS4 = $(DEPLIBS) ++ DEPLIBS5 = $(DEPLIBS) ++ DEPLIBS6 = $(DEPLIBS) ++ DEPLIBS7 = $(DEPLIBS) ++ DEPLIBS8 = $(DEPLIBS) ++ DEPLIBS9 = $(DEPLIBS) ++ DEPLIBS10 = $(DEPLIBS) ++ ++ FCPRELOADPATTERN = libfontconfig.so.? ++ ++ XFTPRELOADPATTERN = libXft.so.? ++ XRENDERPRELOADPATTERN = libXrender.so.? ++ XFONTPRELOADPATTERN = libXfont*.so.? ++ ++XMULIBONLY = -lXmu ++XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB) ++ ++ CONFIGDIR = /usr/share/X11/config ++ ++ USRLIBDIRPATH = $(USRLIBDIR) ++ LDPRELIBS = -L$(USRLIBDIR) $(INSTALLED_LIBS) ++ LDPOSTLIBS = ++ TOP_INCLUDES = -I$(INCROOT) $(TOP_X_INCLUDES) ++ PROJECT_DEFINES = ++ VENDOR_DEFINES = -DXVENDORNAME='"$(VENDORNAME)"' -DXVENDORNAMESHORT='"$(VENDORNAMESHORT)"' ++ ++CXXPROJECT_DEFINES = ++ ++# ---------------------------------------------------------------------- ++# start of Imakefile ++ ++# Remove the next line if you want genuine Xaw instead of Xaw3d ++ ++# Remove the next line if you don't want to enable XTEST support ++ ++# Remove the next line if you want to disable internationalization ++ ++SRCS = xvkbd.c findwidget.c ++OBJS = xvkbd.o findwidget.o ++DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXPMLIB) $(EXTRAXAWCLIENTDEPLIBS) $(DEPXLIB) ++SYS_LIBRARIES = $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWCLIENTLIBS) $(XLIB) ++ ++D_XTEST = -DUSE_XTEST ++SYS_LIBRARIES = $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWCLIENTLIBS) $(XLIB) -lXtst ++ ++D_I18N = -DUSE_I18N ++ ++DEFINES = $(D_XAW3D) $(D_XTEST) $(D_I18N) ++ ++xvkbd.o: xvkbd.c resources.h XVkbd-common.h ++ $(RM) $@ ++ $(CC) -c $(CFLAGS) $*.c ++ ++ PROGRAM = xvkbd ++ ++all:: xvkbd ++ ++xvkbd: $(OBJS) $(DEPLIBS) ++ $(RM) $@ ++ $(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS) ++ ++install:: xvkbd ++ @if [ -d $(DESTDIR)$(BINDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(BINDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(BINDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTPGMFLAGS) xvkbd $(DESTDIR)$(BINDIR)/xvkbd ++ ++all:: xvkbd.$(MANNEWSUFFIX) ++ ++xvkbd.$(MANNEWSUFFIX): xvkbd.$(MANSRCSUFFIX) ++ $(RM) $@ ++ if test -z "$(PREPROCESSMANPAGES)" ; then \ ++ cd `dirname xvkbd` && \ ++ $(LN) `basename xvkbd.$(MANSRCSUFFIX)` `basename $@`; \ ++ else \ ++ $(RAWCPP) $(MANDEFS) $(EXTRAMANDEFS) \ ++ < xvkbd.$(MANSRCSUFFIX) | sed -e '/^# *[0-9][0-9]* *.*$$/d' -e '/^#line *[0-9][0-9]* *.*$$/d' -e '/^[ ]*XCOMM$$/s/XCOMM/#/' -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/#/' -e '/^[ ]*XHASH/s/XHASH/#/' -e '/\@\@$$/s/\@\@$$/\\/' >$@; \ ++ fi ++ ++cleandir:: ++ $(RM) xvkbd.$(MANNEWSUFFIX) ++ ++install.man:: xvkbd.$(MANNEWSUFFIX) ++ @if [ -d $(DESTDIR)$(MANDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(MANDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(MANDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTMANFLAGS) xvkbd.$(MANNEWSUFFIX) $(DESTDIR)$(MANDIR)/xvkbd.$(MANSUFFIX) ++ ++depend:: ++ $(DEPEND) $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS) ++ ++lint: ++ $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS) ++lint1: ++ $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS) ++ ++cleandir:: ++ $(RM) xvkbd ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-belgian.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-belgian.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-belgian ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-common.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-common.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-common ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-danish.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-danish.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-danish ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-fitaly.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-fitaly.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-fitaly ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-french.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-french.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-french ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-french2.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-french2.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-french2 ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-german.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-german.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-german ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-greek.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-greek.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-greek ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-hebrew.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-hebrew.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-hebrew ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-icelandic.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-icelandic.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-icelandic ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-italian.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-italian.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-italian ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-jisx6002.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-jisx6002.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-jisx6002 ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-jisx6004.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-jisx6004.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-jisx6004 ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-korean.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-korean.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-korean ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-latin1.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-latin1.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-latin1 ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-norwegian.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-norwegian.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-norwegian ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-portuguese.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-portuguese.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-portuguese ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-slovene.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-slovene.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-slovene ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-small.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-small.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-small ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-spanish.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-spanish.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-spanish ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-swedish.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-swedish.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-swedish ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-swissgerman.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-swissgerman.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-swissgerman ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-turkish.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-turkish.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-turkish ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-uk.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-uk.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-uk ++ ++# ============================ ++# These rules are only for me ++ ++_distclean: cleandir ++ -rm Makefile ++ ++XVkbd-common.h: XVkbd-common.ad ++ -which ad2c > /dev/null && ad2c XVkbd-common.ad > XVkbd-common.h ++ ++HTML = $(HOME)/public_html/homepage3.nifty.com/xvkbd/index.html ++_readme: ++ -[ -f $(HTML) ] && html2man $(HTML) > xvkbd.man ++ ( echo ".pl 10000"; echo ".ll 75"; echo ".hy 0"; echo ".ad l" ) | cat - xvkbd.man | groff -Tascii -man | sed 's/.//g' | head -9000 | cat -s | tail +3 > README ++ ++# ============================ ++ ++# ---------------------------------------------------------------------- ++# common rules for all Makefiles - do not edit ++ ++.c.i: ++ $(RM) $@ ++ $(CC) -E $(CFLAGS) $(_NOOP_) $*.c > $@ ++ ++.SUFFIXES: .ii ++ ++.cc.ii: ++ $(RM) $@ ++ $(CC) -E $(CFLAGS) $(_NOOP_) $*.cc > $@ ++ ++.SUFFIXES: .s ++ ++.c.s: ++ $(RM) $@ ++ $(CC) -S $(CFLAGS) $(_NOOP_) $*.c ++ ++.cc.s: ++ $(RM) $@ ++ $(CC) -S $(CFLAGS) $(_NOOP_) $*.cc ++ ++emptyrule:: ++ ++cleandir:: ++ $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut "#"* ++ ++Makefile:: ++ -@if [ -f Makefile ]; then set -x; \ ++ $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \ ++ else exit 0; fi ++ $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) ++ ++tags:: ++ $(TAGS) -w *.[ch] ++ $(TAGS) -xw *.[ch] > TAGS ++ ++man_keywords:: ++ ++html_index:: ++ ++clean:: cleandir ++ ++distclean:: cleandir ++ ++# ---------------------------------------------------------------------- ++# empty rules for directories that do not have SUBDIRS - do not edit ++ ++install:: ++ @echo "install in $(CURRENT_DIR) done" ++ ++install.man:: ++ @echo "install.man in $(CURRENT_DIR) done" ++ ++install.sdk:: ++ @echo "install.sdk in $(CURRENT_DIR) done" ++ ++Makefiles:: ++ ++includes:: ++ ++depend:: ++ ++distclean:: ++ $(RM) Makefile Makefile.dep ++ ++# ---------------------------------------------------------------------- ++# dependencies generated by makedepend ++ diff --git a/package/xvkbd/xvkbd.mk b/package/xvkbd/xvkbd.mk index fc66554a10..15aa940539 100644 --- a/package/xvkbd/xvkbd.mk +++ b/package/xvkbd/xvkbd.mk @@ -1,19 +1,32 @@ -############################################################# +################################################################################ # # xvkbd # -############################################################# +################################################################################ + XVKBD_VERSION = 3.2 -XVKBD_SOURCE = xvkbd-$(XVKBD_VERSION).tar.gz XVKBD_SITE = http://homepage3.nifty.com/tsato/xvkbd -XVKBD_AUTORECONF = NO -XVKBD_INSTALL_STAGING = NO -XVKBD_INSTALL_TARGET = YES -XVKBD_MAKE_OPT = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" LD="$(TARGET_CC)" \ - CFLAGS="-O2 -I$(STAGING_DIR)/usr/include" USRLIBDIR="$(STAGING_DIR)/usr/lib" +# Passing USRLIBDIR ensures that the stupid Makefile doesn't add +# /usr/lib to the library search path. +define XVKBD_BUILD_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \ + USRLIBDIR="$(STAGING_DIR)/usr/lib" +endef -XVKBD_DEPENDENCIES = xserver_xorg-server xlib_libXaw xlib_libXtst +define XVKBD_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef -$(eval $(call AUTOTARGETS,package,xvkbd)) +XVKBD_DEPENDENCIES = \ + xlib_libICE \ + xlib_libSM \ + xlib_libX11 \ + xlib_libXaw \ + xlib_libXext \ + xlib_libXmu \ + xlib_libXpm \ + xlib_libXt \ + xlib_libXtst +$(eval $(generic-package)) diff --git a/package/xz/xz.mk b/package/xz/xz.mk index 2da8fcb949..af90f05919 100644 --- a/package/xz/xz.mk +++ b/package/xz/xz.mk @@ -1,12 +1,18 @@ -############################################################# +################################################################################ # -# xz-utils +# xz # -############################################################# -XZ_VERSION = 5.0.0 +################################################################################ + +XZ_VERSION = 5.0.5 XZ_SOURCE = xz-$(XZ_VERSION).tar.bz2 XZ_SITE = http://tukaani.org/xz/ XZ_INSTALL_STAGING = YES +XZ_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' +XZ_LICENSE = GPLv2+ GPLv3+ LGPLv2.1+ +XZ_LICENSE_FILES = COPYING.GPLv2 COPYING.GPLv3 COPYING.LGPLv2.1 + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) -$(eval $(call AUTOTARGETS,package,xz)) -$(eval $(call AUTOTARGETS,package,xz,host)) +XZ = $(HOST_DIR)/usr/bin/xz diff --git a/package/yajl/Config.in b/package/yajl/Config.in new file mode 100644 index 0000000000..be2c133f43 --- /dev/null +++ b/package/yajl/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_YAJL + bool "yajl" + help + Yet Another JSON Library. YAJL is a small event-driven + (SAX-style) JSON parser written in ANSI C, and a small + validating JSON generator. + + http://lloyd.github.com/yajl/ diff --git a/package/yajl/yajl-2.0.4-math-link.patch b/package/yajl/yajl-2.0.4-math-link.patch new file mode 100644 index 0000000000..355a24856f --- /dev/null +++ b/package/yajl/yajl-2.0.4-math-link.patch @@ -0,0 +1,24 @@ +[PATCH] fix json_reformat linking on uClibc + +json_reformat calls yajl_gen_* functions, which internally use isnan() / +isinf(). On Glibc, these are provided by libc, but on uClibc you need to +link with -lm (like the spec says), so ensure we do so. + +Signed-off-by: Peter Korsgaard +--- + reformatter/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: yajl-2.0.2/reformatter/CMakeLists.txt +=================================================================== +--- yajl-2.0.2.orig/reformatter/CMakeLists.txt ++++ yajl-2.0.2/reformatter/CMakeLists.txt +@@ -26,7 +26,7 @@ + + ADD_EXECUTABLE(json_reformat ${SRCS}) + +-TARGET_LINK_LIBRARIES(json_reformat yajl_s) ++TARGET_LINK_LIBRARIES(json_reformat yajl_s m) + + # copy the binary into the output directory + GET_TARGET_PROPERTY(binPath json_reformat LOCATION) diff --git a/package/yajl/yajl.mk b/package/yajl/yajl.mk new file mode 100644 index 0000000000..6f9c6401ac --- /dev/null +++ b/package/yajl/yajl.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# yajl +# +################################################################################ + +YAJL_VERSION = 2.0.4 +YAJL_SITE = http://github.com/lloyd/yajl/tarball/$(YAJL_VERSION) +YAJL_INSTALL_STAGING = YES +YAJL_LICENSE = ISC +YAJL_LICENSE_FILES = COPYING + +$(eval $(cmake-package)) diff --git a/package/yasm/Config.in b/package/yasm/Config.in new file mode 100644 index 0000000000..2dc25aadb2 --- /dev/null +++ b/package/yasm/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_YASM + bool "yasm" + depends on BR2_i386 || BR2_x86_64 + help + Yasm is a complete rewrite of the NASM-2.10.01 assembler. + It supports the x86 and AMD64 instruction sets, accepts NASM + and GAS assembler syntaxes and outputs binary, ELF32 and ELF64 + object formats. + + http://www.tortall.net/projects/yasm/ diff --git a/package/yasm/yasm.mk b/package/yasm/yasm.mk new file mode 100644 index 0000000000..20063ba218 --- /dev/null +++ b/package/yasm/yasm.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# yasm +# +################################################################################ + +YASM_VERSION = 1.2.0 +YASM_SITE = http://www.tortall.net/projects/yasm/releases/ + +define YASM_PRE_CONFIGURE_FIXUP +# This sed prevents it compiling 2 programs (vsyasm and ytasm) +# that are only of use on Microsoft Windows. + sed -i 's#) ytasm.*#)#' $(@D)/Makefile.in +endef + +YASM_PRE_CONFIGURE_HOOKS += YASM_PRE_CONFIGURE_FIXUP +HOST_YASM_PRE_CONFIGURE_HOOKS += YASM_PRE_CONFIGURE_FIXUP + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/yavta/Config.in b/package/yavta/Config.in new file mode 100644 index 0000000000..6a42a944d6 --- /dev/null +++ b/package/yavta/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_YAVTA + bool "yavta" + help + Yet Another V4L2 Test Application + + http://git.ideasonboard.org/yavta.git diff --git a/package/yavta/yavta.mk b/package/yavta/yavta.mk new file mode 100644 index 0000000000..04af2a63c1 --- /dev/null +++ b/package/yavta/yavta.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# yavta +# +################################################################################ + +YAVTA_VERSION = 82ff2efdb9787737b9f21b6f4759f077c827b238 +YAVTA_SITE = git://git.ideasonboard.org/yavta.git +YAVTA_LICENSE = GPLv2+ +YAVTA_LICENSE_FILES = COPYING.GPL + +define YAVTA_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define YAVTA_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/yavta $(TARGET_DIR)/usr/bin/yavta +endef + +$(eval $(generic-package)) diff --git a/package/zd1211-firmware/Config.in b/package/zd1211-firmware/Config.in new file mode 100644 index 0000000000..4469533b0a --- /dev/null +++ b/package/zd1211-firmware/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_ZD1211_FIRMWARE + bool "zd1211-firmware" + help + Firmware for the ZyDAS ZD1211 / Atheros AR5007UG wifi devices. diff --git a/package/zd1211-firmware/zd1211-firmware.mk b/package/zd1211-firmware/zd1211-firmware.mk new file mode 100644 index 0000000000..59ea2199c4 --- /dev/null +++ b/package/zd1211-firmware/zd1211-firmware.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# zd1211-firmware +# +################################################################################ + +ZD1211_FIRMWARE_VERSION = 1.4 +ZD1211_FIRMWARE_SITE = http://downloads.sourceforge.net/project/zd1211/zd1211-firmware/$(ZD1211_FIRMWARE_VERSION) +ZD1211_FIRMWARE_SOURCE = zd1211-firmware-$(ZD1211_FIRMWARE_VERSION).tar.bz2 +ZD1211_FIRMWARE_LICENSE = GPLv2 +ZD1211_FIRMWARE_LICENSE_FILES = COPYING + +# Not all of the firmware files are used +define ZD1211_FIRMWARE_INSTALL_TARGET_CMDS + $(INSTALL) -d -m 0755 $(TARGET_DIR)/lib/firmware/zd1211/ + cp -dpf $(@D)/zd1211*{ub,uphr,ur} $(TARGET_DIR)/lib/firmware/zd1211 +endef + +$(eval $(generic-package)) diff --git a/package/zeromq/Config.in b/package/zeromq/Config.in new file mode 100644 index 0000000000..a74ce88f34 --- /dev/null +++ b/package/zeromq/Config.in @@ -0,0 +1,38 @@ +comment "zeromq needs a toolchain w/ C++, IPv6, largefile, wchar, threads" + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_INET_IPV6 && BR2_LARGEFILE \ + && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS) + +config BR2_PACKAGE_ZEROMQ + bool "zeromq" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_INET_IPV6 + depends on BR2_LARGEFILE # util-linux + depends on BR2_USE_WCHAR # util-linux + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + ØMQ (ZeroMQ, 0MQ, zmq) looks like an embeddable networking + library but acts like a concurrency framework. It gives you + sockets that carry whole messages across various transports + like in-process, inter- process, TCP, and multicast. You can + connect sockets N-to-N with patterns like fanout, pub-sub, + task distribution, and request-reply. It's fast enough to + be the fabric for clustered products. Its asynchronous I/O + model gives you scalable multicore applications, built as + asynchronous message-processing tasks. It has a score of + language APIs and runs on most operating systems. + + ØMQ is from iMatix and is LGPL open source. + + http://www.zeromq.org/ + +config BR2_PACKAGE_ZEROMQ_PGM + bool "PGM/EPGM support" + depends on BR2_PACKAGE_ZEROMQ + depends on !BR2_avr32 # openpgm + select BR2_PACKAGE_OPENPGM + help + Add support for Pragmatic General Multicast protocol (RFC 3208) + implemented either over raw IP packets or UDP datagrams + (encapsulated PGM). This requires OpenPGM library. diff --git a/package/zeromq/zeromq.mk b/package/zeromq/zeromq.mk new file mode 100644 index 0000000000..a624b52b52 --- /dev/null +++ b/package/zeromq/zeromq.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# zeromq +# +################################################################################ + +ZEROMQ_VERSION = 3.2.4 +ZEROMQ_SITE = http://download.zeromq.org/ +ZEROMQ_INSTALL_STAGING = YES +ZEROMQ_DEPENDENCIES = util-linux +ZEROMQ_LICENSE = LGPLv3+ with exceptions +ZEROMQ_LICENSE_FILES = COPYING COPYING.LESSER + +ifeq ($(BR2_PACKAGE_ZEROMQ_PGM),y) + ZEROMQ_DEPENDENCIES += host-pkgconf openpgm + ZEROMQ_CONF_OPT = --with-system-pgm +endif + +$(eval $(autotools-package)) diff --git a/package/zic/zic-fix-dependencies.patch b/package/zic/zic-fix-dependencies.patch new file mode 100644 index 0000000000..e1cbc12f0d --- /dev/null +++ b/package/zic/zic-fix-dependencies.patch @@ -0,0 +1,27 @@ +From 4a2a55a640dd9316dac5f31832064f28f59ab0ae Mon Sep 17 00:00:00 2001 +From: Richard Braun +Date: Fri, 4 Jan 2013 10:57:24 +0100 +Subject: [PATCH] zic: fix dependencies + +The yearistype script is provided by the tzdata package, and is required +at runtime only. +--- + Makefile | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/Makefile b/Makefile +index d76a81e..30df7dc 100644 +--- a/Makefile ++++ b/Makefile +@@ -349,7 +349,7 @@ version.h: + zdump: $(TZDOBJS) + $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZDOBJS) $(LDLIBS) + +-zic: $(TZCOBJS) yearistype ++zic: $(TZCOBJS) + $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZCOBJS) $(LDLIBS) + + yearistype: yearistype.sh +-- +1.7.2.5 + diff --git a/package/zic/zic.mk b/package/zic/zic.mk new file mode 100644 index 0000000000..780643b9e7 --- /dev/null +++ b/package/zic/zic.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# zic +# +################################################################################ + +ZIC_VERSION = 2013h +ZIC_SOURCE = tzcode$(ZIC_VERSION).tar.gz +ZIC_SITE = ftp://ftp.iana.org/tz/releases +ZIC_LICENSE = Public domain + +# Don't strip any path components during extraction. +define HOST_ZIC_EXTRACT_CMDS + gzip -d -c $(DL_DIR)/$(ZIC_SOURCE) \ + | $(TAR) --strip-components=0 -C $(@D) -xf - +endef + +define HOST_ZIC_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) zic +endef + +define HOST_ZIC_INSTALL_CMDS + mkdir -p $(HOST_DIR)/usr/sbin + install -D -m 755 $(@D)/zic $(HOST_DIR)/usr/sbin/zic +endef + +$(eval $(host-generic-package)) + +ZIC = $(HOST_DIR)/usr/sbin/zic diff --git a/package/zlib/zlib-1.2.5-fix-static-install.patch b/package/zlib/zlib-1.2.5-fix-static-install.patch deleted file mode 100644 index 0a885f742f..0000000000 --- a/package/zlib/zlib-1.2.5-fix-static-install.patch +++ /dev/null @@ -1,24 +0,0 @@ -[PATCH] fix make install for static builds - -Only try to install shared lib if we've built one. - -Signed-off-by: Peter Korsgaard ---- - Makefile.in | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -Index: zlib-1.2.5/Makefile.in -=================================================================== ---- zlib-1.2.5.orig/Makefile.in -+++ zlib-1.2.5/Makefile.in -@@ -168,7 +168,9 @@ install-libs: $(LIBS) - -@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi - -@if [ ! -d $(DESTDIR)$(pkgconfigdir) ]; then mkdir -p $(DESTDIR)$(pkgconfigdir); fi - cp $(STATICLIB) $(DESTDIR)$(libdir) -- cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir) -+ if test "$(SHAREDLIBV)" -a -f $(SHAREDLIBV); then \ -+ cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir); \ -+ fi - cd $(DESTDIR)$(libdir); chmod u=rw,go=r $(STATICLIB) - -@(cd $(DESTDIR)$(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1 - -@cd $(DESTDIR)$(sharedlibdir); if test "$(SHAREDLIBV)" -a -f $(SHAREDLIBV); then \ diff --git a/package/zlib/zlib.mk b/package/zlib/zlib.mk index dcd2548da8..f26fe4af2c 100644 --- a/package/zlib/zlib.mk +++ b/package/zlib/zlib.mk @@ -1,19 +1,22 @@ -############################################################# +################################################################################ # # zlib # -############################################################# -ZLIB_VERSION:=1.2.5 -ZLIB_SOURCE:=zlib-$(ZLIB_VERSION).tar.bz2 -ZLIB_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/libpng -ZLIB_INSTALL_STAGING=YES +################################################################################ + +ZLIB_VERSION = 1.2.8 +ZLIB_SOURCE = zlib-$(ZLIB_VERSION).tar.xz +ZLIB_SITE = http://downloads.sourceforge.net/project/libpng/zlib/$(ZLIB_VERSION) +ZLIB_LICENSE = zlib license +ZLIB_LICENSE_FILES = README +ZLIB_INSTALL_STAGING = YES ifeq ($(BR2_PREFER_STATIC_LIB),y) -ZLIB_PIC := -ZLIB_SHARED := --static +ZLIB_PIC = +ZLIB_SHARED = --static else -ZLIB_PIC := -fPIC -ZLIB_SHARED := --shared +ZLIB_PIC = -fPIC +ZLIB_SHARED = --shared endif define ZLIB_CONFIGURE_CMDS @@ -31,9 +34,7 @@ define HOST_ZLIB_CONFIGURE_CMDS (cd $(@D); rm -rf config.cache; \ $(HOST_CONFIGURE_ARGS) \ $(HOST_CONFIGURE_OPTS) \ - CFLAGS="$(ZLIB_PIC)" \ ./configure \ - $(ZLIB_SHARED) \ --prefix="$(HOST_DIR)/usr" \ --sysconfdir="$(HOST_DIR)/etc" \ ) @@ -75,5 +76,5 @@ define HOST_ZLIB_UNINSTALL_TARGET_CMDS $(MAKE1) -C $(@D) uninstall endef -$(eval $(call GENTARGETS,package,zlib)) -$(eval $(call GENTARGETS,package,zlib,host)) +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/zmqpp/Config.in b/package/zmqpp/Config.in new file mode 100644 index 0000000000..68dbf4e756 --- /dev/null +++ b/package/zmqpp/Config.in @@ -0,0 +1,37 @@ +config BR2_PACKAGE_ZMQPP + bool "zmqpp" + depends on !BR2_avr32 # compiler needs c++0x support + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_INET_IPV6 # zeromq + depends on BR2_LARGEFILE # util-linux + depends on BR2_USE_WCHAR # util-linux + depends on BR2_TOOLCHAIN_HAS_THREADS # zeromq + select BR2_PACKAGE_ZEROMQ + help + C++ binding for zeromq (ZeroMQ, 0MQ, zmq). + + This C++ binding is a 'high-level' library that hides most of the + C-style interface core zeromq provides. + + http://github.com/benjamg/zmqpp + +comment "zmqpp needs a toolchain w/ C++, IPv6, largefile, wchar, threads" + depends on !BR2_avr32 + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_INET_IPV6 && BR2_LARGEFILE \ + && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS) + +if BR2_PACKAGE_ZMQPP + +config BR2_PACKAGE_ZMQPP_CLIENT + bool "zmqpp client" + depends on BR2_TOOLCHAIN_HAS_THREADS # boost + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS + help + Build and install the zmqpp client, a command line tool that can be + used to listen or send to zeromq sockets. + +comment "zmqpp client needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +endif diff --git a/package/zmqpp/zmqpp-fix-typos-in-code.patch b/package/zmqpp/zmqpp-fix-typos-in-code.patch new file mode 100644 index 0000000000..a873de9d53 --- /dev/null +++ b/package/zmqpp/zmqpp-fix-typos-in-code.patch @@ -0,0 +1,46 @@ +Fix a couple of typos in the zmqpp source code. + +Signed-off-by: Simon Dawson + +diff -Nurp a/src/zmqpp/socket.cpp b/src/zmqpp/socket.cpp +--- a/src/zmqpp/socket.cpp 2012-12-11 11:06:23.000000000 +0000 ++++ b/src/zmqpp/socket.cpp 2013-03-18 17:32:01.464761776 +0000 +@@ -587,7 +587,7 @@ void socket::get(socket_option const& op + } + } + +-socket::socket(socket&& source) noexcept ++socket::socket(socket& source) noexcept + : _socket(source._socket) + , _type(source._type) + , _recv_buffer() +@@ -601,7 +601,7 @@ socket::socket(socket&& source) noexcept + source._socket = nullptr; + } + +-socket& socket::operator=(socket&& source) noexcept ++socket& socket::operator=(socket& source) noexcept + { + _socket = source._socket; + source._socket = nullptr; +diff -Nurp a/src/zmqpp/socket.hpp b/src/zmqpp/socket.hpp +--- a/src/zmqpp/socket.hpp 2012-12-11 11:06:23.000000000 +0000 ++++ b/src/zmqpp/socket.hpp 2013-03-18 17:31:53.556790457 +0000 +@@ -400,7 +400,7 @@ public: + * + * \param source target socket to steal internals from + */ +- socket(socket&& source) noexcept; ++ socket(socket& source) noexcept; + + /*! + * Move operator +@@ -413,7 +413,7 @@ public: + * \param source target socket to steal internals from + * \return socket reference to this + */ +- socket& operator=(socket&& source) noexcept; ++ socket& operator=(socket& source) noexcept; + + /*! + * Check the socket is still valid diff --git a/package/zmqpp/zmqpp.mk b/package/zmqpp/zmqpp.mk new file mode 100644 index 0000000000..4c8417fced --- /dev/null +++ b/package/zmqpp/zmqpp.mk @@ -0,0 +1,56 @@ +################################################################################ +# +# zmqpp +# +################################################################################ + +ZMQPP_VERSION = 31220ca4a0fb43a0848d78f5e4f23fce39945777 +ZMQPP_SITE = git://github.com/benjamg/zmqpp.git +ZMQPP_INSTALL_STAGING = YES +ZMQPP_DEPENDENCIES = zeromq +ZMQPP_LICENSE = MIT +ZMQPP_LICENSE_FILES = LICENSE + +ZMQPP_MAKE_OPT = LD="$(TARGET_CXX)" BUILD_PATH=./build PREFIX=/usr +ZMQPP_LDFLAGS = $(TARGET_LDFLAGS) -lpthread + +ifeq ($(BR2_PACKAGE_ZMQPP_CLIENT),y) +ZMQPP_DEPENDENCIES += boost +endif + +define ZMQPP_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + LDFLAGS="$(ZMQPP_LDFLAGS)" \ + $(ZMQPP_MAKE_OPT) $(if $(BR2_PACKAGE_ZMQPP_CLIENT),all) -C $(@D) +endef + +define ZMQPP_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -d $(TARGET_DIR)/usr/include/zmqpp + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + $(ZMQPP_MAKE_OPT) DESTDIR=$(TARGET_DIR) install -C $(@D) +endef + +define ZMQPP_UNINSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + $(ZMQPP_MAKE_OPT) DESTDIR=$(TARGET_DIR) uninstall -C $(@D) + $(RM) $(TARGET_DIR)/usr/include/zmqpp +endef + +define ZMQPP_INSTALL_STAGING_CMDS + $(INSTALL) -m 0755 -d $(STAGING_DIR)/usr/include/zmqpp + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + $(ZMQPP_MAKE_OPT) DESTDIR=$(STAGING_DIR) install -C $(@D) +endef + +define ZMQPP_UNINSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + $(ZMQPP_MAKE_OPT) DESTDIR=$(STAGING_DIR) uninstall -C $(@D) + $(RM) $(STAGING_DIR)/usr/include/zmqpp +endef + +define ZMQPP_CLEAN_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) $(ZMQPP_MAKE_OPT) \ + clean -C $(@D) +endef + +$(eval $(generic-package)) diff --git a/package/zsh/Config.in b/package/zsh/Config.in new file mode 100644 index 0000000000..6853249b98 --- /dev/null +++ b/package/zsh/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_ZSH + bool "zsh" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_NCURSES + help + zsh is a shell designed for interactive use, although it is also + a powerful scripting language. Many of the useful features of bash, + ksh, and tcsh were incorporated into zsh; many original features + were added. + + http://zsh.sourceforge.net/ diff --git a/package/zsh/zsh.mk b/package/zsh/zsh.mk new file mode 100644 index 0000000000..ca865a42c3 --- /dev/null +++ b/package/zsh/zsh.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# zsh +# +################################################################################ + +ZSH_VERSION=5.0.2 +ZSH_SITE=http://downloads.sourceforge.net/project/zsh/zsh/$(ZSH_VERSION) +ZSH_LICENSE = MIT-like +ZSH_LICENSE_FILES = LICENCE + +ZSH_DEPENDENCIES = ncurses + +$(eval $(autotools-package)) diff --git a/package/zxing/Config.in b/package/zxing/Config.in new file mode 100644 index 0000000000..b69dfc9230 --- /dev/null +++ b/package/zxing/Config.in @@ -0,0 +1,14 @@ +comment "zxing needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_ZXING + bool "zxing" + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + ZXing (pronounced "zebra crossing") is an open-source, + multi-format 1D/2D barcode image processing library + implemented in Java, with ports to other languages. This + compiles the C++ port. + + http://code.google.com/p/zxing/ diff --git a/package/zxing/zxing-makefile.patch b/package/zxing/zxing-makefile.patch new file mode 100644 index 0000000000..66896bf327 --- /dev/null +++ b/package/zxing/zxing-makefile.patch @@ -0,0 +1,30 @@ +[PATCH] add Makefile + +The scons based build system doesn't handle cross compilation, special +compiler flags or (un)installation, so add a simple makefile instead +which does. + +Signed-off-by: Peter Korsgaard +--- + cpp/core/src/Makefile | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +Index: zxing-2.0/cpp/core/src/Makefile +=================================================================== +--- /dev/null ++++ zxing-2.0/cpp/core/src/Makefile +@@ -0,0 +1,14 @@ ++override CXXFLAGS += -I. ++SRCS := $(shell find -name '*.cpp') ++ ++libzxing.a: $(SRCS:.cpp=.o) ++ $(AR) $(ARFLAGS) $@ $^ ++ ++install: libzxing.a ++ install -D -m 0644 $^ $(DESTDIR)/usr/lib/$^ ++ find -name '*.h' -exec install -m 0644 -D "{}" \ ++ "$(DESTDIR)/usr/include/{}" ";" ++ ++uninstall: ++ rm -f $(DESTDIR)/usr/lib/libzxing.a ++ rm -rf $(DESTDIR)/usr/include/zxing diff --git a/package/zxing/zxing.mk b/package/zxing/zxing.mk new file mode 100644 index 0000000000..73fc34935b --- /dev/null +++ b/package/zxing/zxing.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# zxing +# +################################################################################ + +ZXING_VERSION = 2.0 +ZXING_SITE = http://zxing.googlecode.com/files +ZXING_SOURCE = ZXing-$(ZXING_VERSION).zip +ZXING_LICENSE = Apache v2.0 +ZXING_LICENSE_FILES = COPYING +ZXING_INSTALL_STAGING = YES + +ifneq ($(BR2_ENABLE_LOCALE),y) +ZXING_DEPENDENCIES += libiconv +endif + +define ZXING_EXTRACT_CMDS + unzip -d $(BUILD_DIR) $(DL_DIR)/$(ZXING_SOURCE) +endef + +define ZXING_BUILD_CMDS + $(MAKE) -C $(@D)/cpp/core/src $(TARGET_CONFIGURE_OPTS) +endef + +define ZXING_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D)/cpp/core/src DESTDIR=$(STAGING_DIR) install +endef + +define ZXING_UNINSTALL_STAGING_CMDS + $(MAKE) -C $(@D)/cpp/core/src DESTDIR=$(STAGING_DIR) uninstall +endef + +define ZXING_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D)/cpp/core/src DESTDIR=$(TARGET_DIR) install +endef + +define ZXING_UNINSTALL_TARGET_CMDS + $(MAKE) -C $(@D)/cpp/core/src DESTDIR=$(TARGET_DIR) uninstall +endef + +$(eval $(generic-package)) diff --git a/package/zyre/Config.in b/package/zyre/Config.in new file mode 100644 index 0000000000..5833ccc18c --- /dev/null +++ b/package/zyre/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_ZYRE + bool "zyre" + depends on BR2_INSTALL_LIBSTDCPP # filemq + depends on BR2_INET_IPV6 # filemq + depends on BR2_LARGEFILE # filemq + depends on BR2_USE_WCHAR # filemq + depends on BR2_TOOLCHAIN_HAS_THREADS # filemq + # uClibc toolchains provided by ADI don't have AI_ADDRCONFIG + # support, needed by filemq -> czmq + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 && \ + !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1 + select BR2_PACKAGE_FILEMQ + help + An open-source framework for proximity-based peer-to-peer + applications. + + http://zyre.org + +comment "zyre needs a toolchain w/ C++, IPv6, largefile, wchar, threads" + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 && \ + !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1 + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_INET_IPV6 && BR2_LARGEFILE \ + && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/zyre/zyre.mk b/package/zyre/zyre.mk new file mode 100644 index 0000000000..3e28212872 --- /dev/null +++ b/package/zyre/zyre.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# zyre +# +################################################################################ + +ZYRE_VERSION = 44a57a449a34bb6310b5ce4b17f1ce42f9b17beb +ZYRE_SITE = git://github.com/zeromq/zyre.git +ZYRE_LICENSE = LGPLv3+ +ZYRE_LICENSE_FILES = COPYING COPYING.LESSER +ZYRE_INSTALL_STAGING = YES +ZYRE_DEPENDENCIES = filemq +ZYRE_AUTORECONF = YES +ZYRE_AUTORECONF_OPT = --install --force --verbose + +define ZYRE_CREATE_CONFIG_DIR + mkdir -p $(@D)/config +endef + +ZYRE_POST_PATCH_HOOKS += ZYRE_CREATE_CONFIG_DIR + +$(eval $(autotools-package)) diff --git a/scripts/add_new_package.wizard b/scripts/add_new_package.wizard deleted file mode 100755 index 4ee02dfb2a..0000000000 --- a/scripts/add_new_package.wizard +++ /dev/null @@ -1,120 +0,0 @@ -#!/bin/sh - -echo "**** Autotools Add New Package Wizard ****" -echo " This script will generate files to add a" -echo " new package to buildroot." -echo - -echo "What is the name of the package?" -read PACKAGE_NAME - -echo "What is the version number?" -read VERSION_NUM - -echo "What is the web address of the tarball?" -read DOWNLOAD_LOC - -echo "Enter any known dependencies, separated" -echo "by spaces, or just press enter." -read EXTRA_DEPS - -echo "Enter a description of the package." -read DESCRIPTION - -echo "Does autoreconf need to be run first? (y/n)" -read ANSWER - -if [ "$ANSWER" = "y" ]; then - RECONF="YES" -else - RECONF="NO" -fi - -echo "Does it need to be installed to the staging dir?" -echo "Say yes, if other packages depend on it." -echo "(If not sure, just say yes. It will only use more" -echo "space on your hard drive.)" -read ANSWER - -if [ "$ANSWER" = "y" ]; then - STAGING="YES" -else - STAGING="NO" -fi - -echo "Enter an additional subdirectory below package/" -echo "as category, or just press enter." -read SUB_DIR - -if [ -z "$SUB_DIR" ]; then - CATEGORY_DIR=package -else - CATEGORY_DIR=package/${SUB_DIR} -fi - -echo "Enter any configure script options." -read CONFIG_OPTIONS - -URL=${DOWNLOAD_LOC%/*} -TARBALL=${DOWNLOAD_LOC##*/} -EXTENSION=${TARBALL##*.tar.} -NAME_UPPER=`echo ${PACKAGE_NAME} | tr a-z- A-Z_` -PACKAGE_DIR=`dirname $0`/../${CATEGORY_DIR}/${PACKAGE_NAME} - -mkdir -p ${PACKAGE_DIR} - -sed -e 's/ *$//g' > ${PACKAGE_DIR}/${PACKAGE_NAME}.mk < ${PACKAGE_DIR}/Config.in < /dev/null - - # create the control file - cd ${BUILDROOT_DIR} - mkdir ${BUILDROOT_DIR}/ipkg-temp/CONTROL - - # find it's corresponding buildroot package directory - PACK_NAME=`find ./package -path './package/config' -prune -o -name ${NAME_WITHOUT_DIR}` - PACK_NAME=${PACK_NAME%./package/config} - PACK_NAME=${PACK_NAME#./package/config} - PACK_NAME=`echo -n ${PACK_NAME}` - - # there must be an better way to extract the description and - # dependencies from the Config.in and *.mk file. - # Haven't figured it out just yet. - CONF_FILE=`cat ${PACK_NAME}/Config.in` - #MAKE_FILE=`cat ${PACK_NAME}/*.mk` - HELP_STR=${CONF_FILE#*help} - HELP_STR=${HELP_STR%%comment*} - HELP_STR=${HELP_STR%%choice*} - HELP_STR=${HELP_STR%%depends*} - HELP_STR=${HELP_STR%%http*} - HELP_STR=`echo -n ${HELP_STR}` - - echo ${HELP_STR} - - if [ "${PACK_NAME}" != "" ]; then - echo "Creating ipkg of: ${PACKAGE}" - -cat > ${BUILDROOT_DIR}/ipkg-temp/CONTROL/control <-linux-2.6...config" or -# "-linux-2.6..config" -# -####################################################################### - -TOPDIR=`pwd` -DEBUG=0 -# parameter #1 BOARD_PATH -# parameter #2 LINUX26_DIR - -CONFIGS=`ls -X $1/*linux-2.6.*.config | sed s/[.]config// - | sort` -LINUX26_DIR=`basename $2` -LINUX26_CONFIG=${2}/.config -LINUX_MAJOR_VERSION=${LINUX26_DIR:10:2} -LINUX_MINOR_VERSION=${LINUX26_DIR:13} - -function DBG_PRINT -{ - if [ ${DEBUG} = 1 ] ; then - echo $1 - fi -} - -function linux_version() -{ - local KCONFIG - KCONFIG=`basename $1` - KERNEL=`echo ${KCONFIG} | sed s/.*linux-2.6./linux-2.6./g -` - THIS_MAJOR=${KERNEL:10:2} - THIS_MINOR=${KERNEL:13} - THIS_MINOR=${THIS_MINOR:=0} -} - -# Try to be careful... -DBG_PRINT MAJOR=\"${LINUX_MAJOR_VERSION}\" -DBG_PRINT MINOR=\"${LINUX_MINOR_VERSION}\" - -for i in ${CONFIGS} ; do - DBG_PRINT FILE=$i - linux_version $i - DBG_PRINT KERNEL=${KERNEL} - if [ ${THIS_MAJOR} -lt ${LINUX_MAJOR_VERSION} ] ; then - echo Copying `basename $i`.config ... - cp $i.config ${LINUX26_CONFIG} - elif [ ${THIS_MAJOR} -eq ${LINUX_MAJOR_VERSION} ] ; then - if [ "${LINUX_MINOR_VERSION}X" = "X" ] ; then - if [ "${THIS_MINOR}X" = "X" ] ; then - echo Copying `basename $i`.config ... - cp $i.config ${LINUX26_CONFIG} - else - return - fi - elif [ ${THIS_MINOR} -le ${LINUX_MINOR_VERSION} ] ; then - echo Copying `basename $i`.config ... - cp $i.config ${LINUX26_CONFIG} - fi - else - return - fi -done - -# Did not work... - be promisceous - -if [ ! -f "${LINUX26_CONFIG}" ] ; then \ - for i in `ls $1/*linux*.config` ; do - echo Copying `basename $i` ... - cp $i ${LINUX26_CONFIG} - done -fi - diff --git a/scripts/graph-depends b/scripts/graph-depends deleted file mode 100755 index 4d82282f50..0000000000 --- a/scripts/graph-depends +++ /dev/null @@ -1,169 +0,0 @@ -#!/usr/bin/python - -# Usage (the graphviz package must be installed in your distribution) -# ./scripts/graph-depends [package-name] > test.dot -# dot -Tpdf test.dot -o test.pdf -# -# With no arguments, graph-depends will draw a complete graph of -# dependencies for the current configuration. With an argument, -# graph-depends will draw a graph of dependencies for the given -# package name. -# -# Limitations -# -# * Some packages have dependencies that depend on the Buildroot -# configuration. For example, many packages have a dependency on -# openssl if openssl has been enabled. This tool will graph the -# dependencies as they are with the current Buildroot -# configuration. -# -# * The X.org package definitions are only included when -# BR2_PACKAGE_XORG7 is enabled, so if this option is not enabled, -# it isn't possible to graph the dependencies of X.org stack -# components. -# -# Copyright (C) 2010 Thomas Petazzoni - -import sys -import subprocess - -# In FULL_MODE, we draw the full dependency graph for all selected -# packages -FULL_MODE = 1 - -# In PKG_MODE, we only draw the dependency graph for a given package -PKG_MODE = 2 - -mode = 0 - -if len(sys.argv) == 1: - mode = FULL_MODE -elif len(sys.argv) == 2: - mode = PKG_MODE - rootpkg = sys.argv[1] -else: - print "Usage: graph-depends [package-name]" - sys.exit(1) - -allpkgs = [] -unknownpkgs = [] - -# Execute the "make show-targets" command to get the list of the main -# Buildroot TARGETS and return it formatted as a Python list. This -# list is used as the starting point for full dependency graphs -def get_targets(): - sys.stderr.write("Getting targets\n") - cmd = ["make", "show-targets"] - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - output = p.communicate()[0].strip() - if p.returncode != 0: - return None - if output == '': - return [] - return output.split(' ') - -# Execute the "make -show-depends" command to get the list of -# dependencies of a given package, and return the list of dependencies -# formatted as a Python list. -def get_depends(pkg): - sys.stderr.write("Getting dependencies for %s\n" % pkg) - cmd = ["make", "%s-show-depends" % pkg] - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - output = p.communicate()[0].strip() - if p.returncode != 0: - return None - if output == '': - return [] - return output.split(' ') - -# Recursive function that builds the tree of dependencies for a given -# package. The dependencies are built in a list called 'dependencies', -# which contains tuples of the form (pkg1 -> -# pkg2_on_which_pkg1_depends) and the function finally returns this -# list. -def get_all_depends(pkg): - dependencies = [] - - # We already have the dependencies for this package - if pkg in allpkgs: - return - allpkgs.append(pkg) - depends = get_depends(pkg) - - # We couldn't get the dependencies of this package, because it - # doesn't use the generic or autotools infrastructure. Add it to - # unknownpkgs so that it is later rendered in red color to warn - # the user. - if depends == None: - unknownpkgs.append(pkg) - return - - # This package has no dependency. - if depends == []: - return - - # Add dependencies to the list of dependencies - for dep in depends: - dependencies.append((pkg, dep)) - - # Recurse into the dependencies - for dep in depends: - newdeps = get_all_depends(dep) - if newdeps != None: - dependencies += newdeps - - return dependencies - -# The Graphviz "dot" utility doesn't like dashes in node names. So for -# node names, we strip all dashes. -def pkg_node_name(pkg): - return pkg.replace("-","") - -# In full mode, start with the result of get_targets() to get the main -# targets and then use get_all_depends() for each individual target. -if mode == FULL_MODE: - targets = get_targets() - dependencies = [] - allpkgs.append('all') - for tg in targets: - # Skip uninteresting targets - if tg == 'target-generic-issue' or \ - tg == 'target-finalize' or \ - tg == 'erase-fakeroots' or \ - tg == 'target-generic-hostname': - continue - dependencies.append(('all', tg)) - deps = get_all_depends(tg) - if deps != None: - dependencies += deps - -# In pkg mode, start directly with get_all_depends() on the requested -# package -elif mode == PKG_MODE: - dependencies = get_all_depends(rootpkg) - -# Start printing the graph data -print "digraph G {" - -# First, the dependencies. Usage of set allows to remove duplicated -# dependencies in the graph -for dep in set(dependencies): - print "%s -> %s" % (pkg_node_name(dep[0]), pkg_node_name(dep[1])) - -# Then, the node attributes: color, style and label. -for pkg in allpkgs: - if pkg == 'all': - print "all [label = \"ALL\"]" - print "all [color=lightblue,style=filled]" - continue - - print "%s [label = \"%s\"]" % (pkg_node_name(pkg), pkg) - - if pkg in unknownpkgs: - print "%s [color=red,style=filled]" % pkg_node_name(pkg) - elif mode == PKG_MODE and pkg == rootpkg: - print "%s [color=lightblue,style=filled]" % pkg_node_name(rootpkg) - else: - print "%s [color=grey,style=filled]" % pkg_node_name(pkg) - -print "}" diff --git a/scripts/pkg-stats b/scripts/pkg-stats deleted file mode 100755 index 01af89de09..0000000000 --- a/scripts/pkg-stats +++ /dev/null @@ -1,234 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2009 by Thomas Petazzoni -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -# This script generates an HTML file that contains a report about all -# Buildroot packages, their usage of the different package -# infrastructure and possible cleanup actions -# -# Run the script from the Buildroot toplevel directory: -# -# ./scripts/pkg-stats > /tmp/pkg.html -# - -echo " - - - -Results
      - - - - - - - - - - - - - - - - - -" - -convert_to_generic_target=0 -convert_to_generic_host=0 -convert_to_autotools=0 -cnt=1 -for i in $(find package/ -name '*.mk') ; do - - if test $i = "package/mtd/mtd.mk" -o \ - $i = "package/java/java.mk" -o \ - $i = "package/database/database.mk" -o \ - $i = "package/editors/editors.mk" -o \ - $i = "package/games/games.mk" -o \ - $i = "package/multimedia/multimedia.mk" -o \ - $i = "package/customize/customize.mk" -o \ - $i = "package/gnuconfig/gnuconfig.mk" -o \ - $i = "package/x11r7/x11r7.mk" ; then - echo "skipping $i" 1>&2 - continue - fi - - cnt=$((cnt+1)) - - is_auto_host=0 - is_auto_target=0 - is_pkg_target=0 - is_pkg_host=0 - is_manual_target=0 - is_manual_host=0 - - if grep -E "\(call AUTOTARGETS,[^,]*,[^,]*,host\)" $i > /dev/null ; then - is_auto_host=1 - fi - - if grep -E "\(call AUTOTARGETS,[^,]*,[^,]*(,target|)\)" $i > /dev/null ; then - is_auto_target=1 - fi - - if grep -E "\(call GENTARGETS,[^,]*,[^,]*,host\)" $i > /dev/null ; then - is_pkg_host=1 - fi - - if grep -E "\(call GENTARGETS,[^,]*,[^,]*(,target|)\)" $i > /dev/null ; then - is_pkg_target=1 - fi - - pkg=$(basename $i) - pkg=${pkg%.mk} - - if grep "^host-$pkg:" $i > /dev/null ; then - is_manual_host=1 - fi - - if test $is_pkg_target -eq 0 -a $is_auto_target -eq 0 ; then - is_manual_target=1 - fi - - tasks="" - - if [ $is_manual_target -eq 1 ] ; then - if grep "/configure" $i > /dev/null ; then - tasks=$tasks"
    • convert package to autotools ?
    • " - convert_to_target_autotools=$((convert_to_target_autotools+1)) - else - tasks=$tasks"
    • convert to generic target
    • " - convert_to_generic_target=$((convert_to_generic_target+1)) - fi - fi - - if [ $is_manual_host -eq 1 ]; then - if grep "/configure" $i > /dev/null ; then - tasks=$tasks"
    • convert package to autotools ?
    • " - convert_to_host_autotools=$((convert_to_host_autotools+1)) - else - tasks=$tasks"
    • convert to generic host
    • " - convert_to_generic_host=$((convert_to_generic_host+1)) - fi - fi - - if test -n "$tasks" ; then - echo "" - else - echo "" - fi - - echo "" - echo "" - - echo "" - - echo "" - - echo "" - - echo "" - - echo "" - - echo "" - - echo "" - - echo "" - -done -echo "
      IdPackageAUTOTARGETSGENTARGETSmanualActions
      hosttargethosttargethosttarget
      $cnt$i" - if [ $is_auto_host -eq 1 ] ; then - echo "YES" - else - echo "NO" - fi - echo "" - if [ $is_auto_target -eq 1 ] ; then - echo "YES" - else - echo "NO" - fi - echo "" - if [ $is_pkg_host -eq 1 ] ; then - echo "YES" - else - echo "NO" - fi - echo "" - if [ $is_pkg_target -eq 1 ] ; then - echo "YES" - else - echo "NO" - fi - echo "" - if [ $is_manual_host -eq 1 ] ; then - echo "YES" - else - echo "NO" - fi - echo "" - if [ $is_manual_target -eq 1 ] ; then - echo "YES" - else - echo "NO" - fi - echo "" - echo "
        " - echo $tasks - echo "
      " - echo "
      " - -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "
      Packages to convert to generic target$convert_to_generic_target
      Packages to convert to generic host$convert_to_generic_host
      Packages to convert to target autotools$convert_to_target_autotools
      Packages to convert to host autotools$convert_to_host_autotools
      TOTAL$cnt
      " diff --git a/scripts/setlocalversion b/scripts/setlocalversion deleted file mode 100755 index cc2c128f0a..0000000000 --- a/scripts/setlocalversion +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/sh -# Print additional version information for non-release trees. - -usage() { - echo "Usage: $0 [srctree]" >&2 - exit 1 -} - -cd "${1:-.}" || usage - -# Check for git and a git repo. -if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then - # Do we have an untagged version? - if git name-rev --tags HEAD | grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$' > /dev/null; then - if tag=`git describe 2>/dev/null`; then - echo $tag | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}' - else - printf '%s%s' -g $head - fi - fi - - # Is this git on svn? - if git config --get svn-remote.svn.url >/dev/null; then - printf -- '-svn%s' "`git svn find-rev $head`" - fi - - # Are there uncommitted changes? - git update-index --refresh --unmerged > /dev/null - if git diff-index --name-only HEAD | grep -v "^scripts/package" \ - | read dummy; then - printf '%s' -dirty - fi - - # All done with git - exit -fi - -# Check for mercurial and a mercurial repo. -if hgid=`hg id 2>/dev/null`; then - tag=`printf '%s' "$hgid" | cut -d' ' -f2` - - # Do we have an untagged version? - if [ -z "$tag" -o "$tag" = tip ]; then - id=`printf '%s' "$hgid" | sed 's/[+ ].*//'` - printf '%s%s' -hg "$id" - fi - - # Are there uncommitted changes? - # These are represented by + after the changeset id. - case "$hgid" in - *+|*+\ *) printf '%s' -dirty ;; - esac - - # All done with mercurial - exit -fi - -# Check for svn and a svn repo. -if rev=`svn info 2>/dev/null | grep '^Last Changed Rev'`; then - rev=`echo $rev | awk '{print $NF}'` - changes=`svn status 2>/dev/null | grep '^[AMD]' | wc -l` - - # Are there uncommitted changes? - if [ $changes != 0 ]; then - printf -- '-svn%s%s' "$rev" -dirty - else - printf -- '-svn%s' "$rev" - fi - - # All done with svn - exit -fi diff --git a/support/dependencies/check-host-asciidoc.sh b/support/dependencies/check-host-asciidoc.sh new file mode 100755 index 0000000000..fc5fcba443 --- /dev/null +++ b/support/dependencies/check-host-asciidoc.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +candidate="$1" #ignored + +asciidoc=`which asciidoc` +if [ ! -x "$asciidoc" ]; then + # echo nothing: no suitable asciidoc found + exit 1 +fi + +# Output of 'asciidoc --version' examples: +# asciidoc 8.6.7 +version=`$asciidoc --version | cut -d\ -f2` +major=`echo "$version" | cut -d. -f1` +minor=`echo "$version" | cut -d. -f2` +bugfix=`echo "$version" | cut -d. -f3` + +# To generate the manual, we need asciidoc >= 8.6.3 +major_min=8 +minor_min=6 +bugfix_min=3 +if [ $major -gt $major_min ]; then + echo $asciidoc +else + if [ $major -eq $major_min -a $minor -ge $minor_min ]; then + echo $asciidoc + else + if [ $major -eq $major_min -a $minor -eq $minor_min \ + -a $bugfix -ge $bugfix_min ]; then + echo $asciidoc + else + # echo nothing: no suitable asciidoc found + exit 1 + fi + fi +fi diff --git a/support/dependencies/check-host-tar.mk b/support/dependencies/check-host-tar.mk new file mode 100644 index 0000000000..010bde7a51 --- /dev/null +++ b/support/dependencies/check-host-tar.mk @@ -0,0 +1,9 @@ +TAR ?= tar + +ifeq (,$(call suitable-host-package,tar,$(TAR))) + DEPENDENCIES_HOST_PREREQ += host-tar + TAR = $(HOST_DIR)/usr/bin/tar +endif + +# Since TAR is at least 1.17, it will certainly support --strip-components +TAR_STRIP_COMPONENTS = --strip-components diff --git a/support/dependencies/check-host-tar.sh b/support/dependencies/check-host-tar.sh new file mode 100755 index 0000000000..2cfc2b3cc2 --- /dev/null +++ b/support/dependencies/check-host-tar.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +candidate="$1" + +tar=`which $candidate` +if [ ! -x "$tar" ]; then + tar=`which tar` + if [ ! -x "$tar" ]; then + # echo nothing: no suitable tar found + exit 1 + fi +fi + +# Output of 'tar --version' examples: +# tar (GNU tar) 1.15.1 +# tar (GNU tar) 1.25 +version=`$tar --version | head -n 1 | sed 's/^.*\s\([0-9]\+\.\S\+\).*$/\1/'` +major=`echo "$version" | cut -d. -f1` +minor=`echo "$version" | cut -d. -f2` +bugfix=`echo "$version" | cut -d. -f3` + +# Minimal version = 1.17 (previous versions do not correctly unpack archives +# containing hard-links if the --strip-components option is used). +major_min=1 +minor_min=17 +if [ $major -gt $major_min ]; then + echo $tar +else + if [ $major -eq $major_min -a $minor -ge $minor_min ]; then + echo $tar + else + # echo nothing: no suitable tar found + exit 1 + fi +fi diff --git a/support/dependencies/check-host-xzcat.mk b/support/dependencies/check-host-xzcat.mk new file mode 100644 index 0000000000..24286ef5c8 --- /dev/null +++ b/support/dependencies/check-host-xzcat.mk @@ -0,0 +1,7 @@ +# XZCAT is taken from BR2_XZCAT (defaults to 'xzcat') (see Makefile) +# If it is not present, build our own host-xzcat + +ifeq (,$(call suitable-host-package,xzcat,$(XZCAT))) + DEPENDENCIES_HOST_PREREQ += host-xz + XZCAT = $(HOST_DIR)/usr/bin/xzcat +endif diff --git a/support/dependencies/check-host-xzcat.sh b/support/dependencies/check-host-xzcat.sh new file mode 100755 index 0000000000..10f1c4562a --- /dev/null +++ b/support/dependencies/check-host-xzcat.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +candidate="$1" + +xzcat=`which $candidate 2>/dev/null` +if [ ! -x "$xzcat" ]; then + xzcat=`which xzcat 2>/dev/null` + if [ ! -x "$xzcat" ]; then + # echo nothing: no suitable xzcat found + exit 1 + fi +fi + +echo $xzcat diff --git a/support/dependencies/dependencies.mk b/support/dependencies/dependencies.mk new file mode 100644 index 0000000000..155a90988c --- /dev/null +++ b/support/dependencies/dependencies.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# Check buildroot dependencies and bail out if the user's +# system is judged to be lacking.... +# +################################################################################ + +DEPENDENCIES_HOST_PREREQ := + +# suitable-host-pkg: calls check-host-$(1).sh shell script. Parameter (2) +# can be the candidate to be checked. If not present, the check-host-$(1).sh +# script should use 'which' to find a candidate. The script should return +# the path to the suitable host tool, or nothing if no suitable tool was found. +define suitable-host-package +$(shell support/dependencies/check-host-$(1).sh $(2)) +endef +-include $(sort $(wildcard support/dependencies/check-host-*.mk)) + +ifeq ($(BR2_STRIP_sstrip),y) +DEPENDENCIES_HOST_PREREQ+=host-sstrip +endif + +ifeq ($(BR2_CCACHE),y) +DEPENDENCIES_HOST_PREREQ += host-ccache +endif + +core-dependencies: + @HOSTCC="$(firstword $(HOSTCC))" MAKE="$(MAKE)" \ + DL_TOOLS="$(sort $(DL_TOOLS_DEPENDENCIES))" \ + $(TOPDIR)/support/dependencies/dependencies.sh + +dependencies: HOSTCC=$(HOSTCC_NOCCACHE) +dependencies: HOSTCXX=$(HOSTCXX_NOCCACHE) +dependencies: core-dependencies $(DEPENDENCIES_HOST_PREREQ) + +################################################################################ +# +# Toplevel Makefile options +# +################################################################################ +.PHONY: dependencies core-dependencies diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh new file mode 100755 index 0000000000..b563f6096a --- /dev/null +++ b/support/dependencies/dependencies.sh @@ -0,0 +1,195 @@ +#!/bin/sh +# vi: set sw=4 ts=4: +#set -x + +export LC_ALL=C + +# Verify that grep works +echo "WORKS" | grep "WORKS" >/dev/null 2>&1 +if test $? != 0 ; then + /bin/echo -e "\ngrep doesn't work\n" + exit 1 +fi + +# sanity check for CWD in LD_LIBRARY_PATH +# try not to rely on egrep.. +if test -n "$LD_LIBRARY_PATH" ; then + /bin/echo TRiGGER_start"$LD_LIBRARY_PATH"TRiGGER_end | /bin/grep ':\.:' >/dev/null 2>&1 || + /bin/echo TRiGGER_start"$LD_LIBRARY_PATH"TRiGGER_end | /bin/grep 'TRiGGER_start\.:' >/dev/null 2>&1 || + /bin/echo TRiGGER_start"$LD_LIBRARY_PATH"TRiGGER_end | /bin/grep ':\.TRiGGER_end' >/dev/null 2>&1 || + /bin/echo TRiGGER_start"$LD_LIBRARY_PATH"TRiGGER_end | /bin/grep 'TRiGGER_start\.TRiGGER_end' >/dev/null 2>&1 + if test $? = 0; then + /bin/echo -e "\nYou seem to have the current working directory in your" + /bin/echo -e "LD_LIBRARY_PATH environment variable. This doesn't work.\n" + exit 1; + fi +fi; + +# sanity check for CWD in PATH. Having the current working directory +# in the PATH makes the toolchain build process break. +# try not to rely on egrep.. +if test -n "$PATH" ; then + /bin/echo TRiGGER_start"$PATH"TRiGGER_end | /bin/grep ':\.:' >/dev/null 2>&1 || + /bin/echo TRiGGER_start"$PATH"TRiGGER_end | /bin/grep 'TRiGGER_start\.:' >/dev/null 2>&1 || + /bin/echo TRiGGER_start"$PATH"TRiGGER_end | /bin/grep ':\.TRiGGER_end' >/dev/null 2>&1 || + /bin/echo TRiGGER_start"$PATH"TRiGGER_end | /bin/grep 'TRiGGER_start\.TRiGGER_end' >/dev/null 2>&1 + if test $? = 0; then + /bin/echo -e "\nYou seem to have the current working directory in your" + /bin/echo -e "PATH environment variable. This doesn't work.\n" + exit 1; + fi +fi; + +if test -n "$PERL_MM_OPT" ; then + /bin/echo -e "\nYou have PERL_MM_OPT defined because Perl local::lib" + /bin/echo -e "is installed on your system. Please unset this variable" + /bin/echo -e "before starting Buildroot, otherwise the compilation of" + /bin/echo -e "Perl related packages will fail" + exit 1 +fi + +# Verify that which is installed +if ! which which > /dev/null ; then + /bin/echo -e "\nYou must install 'which' on your build machine\n"; + exit 1; +fi; + +if ! which sed > /dev/null ; then + /bin/echo -e "\nYou must install 'sed' on your build machine\n" + exit 1 +fi + +# Check make +MAKE=$(which make 2> /dev/null) +if [ -z "$MAKE" ] ; then + /bin/echo -e "\nYou must install 'make' on your build machine\n"; + exit 1; +fi; +MAKE_VERSION=$($MAKE --version 2>&1 | sed -e 's/^.* \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q') +if [ -z "$MAKE_VERSION" ] ; then + /bin/echo -e "\nYou must install 'make' on your build machine\n"; + exit 1; +fi; +MAKE_MAJOR=$(echo $MAKE_VERSION | sed -e "s/\..*//g") +MAKE_MINOR=$(echo $MAKE_VERSION | sed -e "s/^$MAKE_MAJOR\.//g" -e "s/\..*//g" -e "s/[a-zA-Z].*//g") +if [ $MAKE_MAJOR -lt 3 ] || [ $MAKE_MAJOR -eq 3 -a $MAKE_MINOR -lt 81 ] ; then + /bin/echo -e "\nYou have make '$MAKE_VERSION' installed. GNU make >=3.81 is required\n" + exit 1; +fi; + +# Check host gcc +COMPILER=$(which $HOSTCC_NOCCACHE 2> /dev/null) +if [ -z "$COMPILER" ] ; then + COMPILER=$(which cc 2> /dev/null) +fi; +if [ -z "$COMPILER" ] ; then + /bin/echo -e "\nYou must install 'gcc' on your build machine\n"; + exit 1; +fi; + +COMPILER_VERSION=$($COMPILER -v 2>&1 | sed -n '/^gcc version/p' | + sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q') +if [ -z "$COMPILER_VERSION" ] ; then + /bin/echo -e "\nYou must install 'gcc' on your build machine\n"; + exit 1; +fi; +COMPILER_MAJOR=$(echo $COMPILER_VERSION | sed -e "s/\..*//g") +COMPILER_MINOR=$(echo $COMPILER_VERSION | sed -e "s/^$COMPILER_MAJOR\.//g" -e "s/\..*//g") +if [ $COMPILER_MAJOR -lt 3 -o $COMPILER_MAJOR -eq 2 -a $COMPILER_MINOR -lt 95 ] ; then + echo "\nYou have gcc '$COMPILER_VERSION' installed. gcc >= 2.95 is required\n" + exit 1; +fi; + +# check for host CXX +CXXCOMPILER=$(which $HOSTCXX_NOCCACHE 2> /dev/null) +if [ -z "$CXXCOMPILER" ] ; then + CXXCOMPILER=$(which c++ 2> /dev/null) +fi +if [ -z "$CXXCOMPILER" ] ; then + /bin/echo -e "\nYou may have to install 'g++' on your build machine\n" + #exit 1 +fi +if [ ! -z "$CXXCOMPILER" ] ; then + CXXCOMPILER_VERSION=$($CXXCOMPILER -v 2>&1 | sed -n '/^gcc version/p' | + sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q') + if [ -z "$CXXCOMPILER_VERSION" ] ; then + /bin/echo -e "\nYou may have to install 'g++' on your build machine\n" + fi + + CXXCOMPILER_MAJOR=$(echo $CXXCOMPILER_VERSION | sed -e "s/\..*//g") + CXXCOMPILER_MINOR=$(echo $CXXCOMPILER_VERSION | sed -e "s/^$CXXCOMPILER_MAJOR\.//g" -e "s/\..*//g") + if [ $CXXCOMPILER_MAJOR -lt 3 -o $CXXCOMPILER_MAJOR -eq 2 -a $CXXCOMPILER_MINOR -lt 95 ] ; then + /bin/echo -e "\nYou have g++ '$CXXCOMPILER_VERSION' installed. g++ >= 2.95 is required\n" + exit 1 + fi +fi + +# Check bash +if ! $SHELL --version 2>&1 | grep -q '^GNU bash'; then + /bin/echo -e "\nYou must install 'bash' on your build machine\n"; + exit 1; +fi; + +# Check that a few mandatory programs are installed +missing_progs="no" +for prog in patch perl tar wget cpio python unzip rsync bc ${DL_TOOLS} ; do + if ! which $prog > /dev/null ; then + /bin/echo -e "You must install '$prog' on your build machine"; + missing_progs="yes" + if test $prog = "svn" ; then + /bin/echo -e " svn is usually part of the subversion package in your distribution" + elif test $prog = "hg" ; then + /bin/echo -e " hg is usually part of the mercurial package in your distribution" + elif test $prog = "zcat" ; then + /bin/echo -e " zcat is usually part of the gzip package in your distribution" + elif test $prog = "bzcat" ; then + /bin/echo -e " bzcat is usually part of the bzip2 package in your distribution" + fi + fi +done + +if test "${missing_progs}" = "yes" ; then + exit 1 +fi + +if grep ^BR2_TOOLCHAIN_BUILDROOT=y $BUILDROOT_CONFIG > /dev/null && \ + grep ^BR2_ENABLE_LOCALE=y $BUILDROOT_CONFIG > /dev/null ; then + if ! which locale > /dev/null ; then + /bin/echo -e "\nYou need locale support on your build machine to build a toolchain supporting locales\n" + exit 1 ; + fi + if ! locale -a | grep -q -i utf8$ ; then + /bin/echo -e "\nYou need at least one UTF8 locale to build a toolchain supporting locales\n" + exit 1 ; + fi +fi + +if grep -q ^BR2_PACKAGE_CLASSPATH=y $BUILDROOT_CONFIG ; then + for prog in javac jar; do + if ! which $prog > /dev/null ; then + /bin/echo -e "\nYou must install '$prog' on your build machine\n" >&2 + exit 1 + fi + done +fi + +if grep -q ^BR2_HOSTARCH_NEEDS_IA32_LIBS=y $BUILDROOT_CONFIG ; then + if test ! -f /lib/ld-linux.so.2 ; then + /bin/echo -e "\nYour Buildroot configuration uses pre-built tools for the x86 architecture," + /bin/echo -e "but your build machine uses the x86-64 architecture without the 32 bits compatibility" + /bin/echo -e "library." + /bin/echo -e "If you're running a Debian/Ubuntu distribution, install the libc6:i386," + /bin/echo -e "libstdc++6:i386, and zlib1g:i386 packages." + /bin/echo -e "For other distributions, refer to the documentation on how to install the 32 bits" + /bin/echo -e "compatibility libraries." + exit 1 + fi +fi + +# Check that the Perl installation is complete enough to build +# host-autoconf. +if ! perl -e "require Data::Dumper" > /dev/null 2>&1 ; then + /bin/echo -e "Your Perl installation is not complete enough, at least Data::Dumper is missing." + /bin/echo -e "On Debian/Ubuntu distributions, install the 'perl' package." + exit 1 +fi diff --git a/support/gnuconfig/README.buildroot b/support/gnuconfig/README.buildroot new file mode 100644 index 0000000000..0898cb541c --- /dev/null +++ b/support/gnuconfig/README.buildroot @@ -0,0 +1,27 @@ +--- HOWTO --- +If your package uses config.guess and/or config.sub, then it probably +relies on the autotools as its build system. In this case, you should +use the autotools-package infrastructure, which will take care of updating +the config.guess and/or config.sub files appropriately. See the +Buildroot documentation for details about the autotools-package +infrastructure. + +If for some reason your package does not use the autotools-package +infrastructure, you can request the config.guess and/or config.sub +files of your package to be updated by using: + + $(call CONFIG_UPDATE,directory-of-your-package-sources) + +--- UPDATE --- +GNU config is now managed in git, so to update: + +# git clone git://git.savannah.gnu.org/config.git +# cp config/config.* . +# for p in $(ls patches/*.patch); do patch -p1 < $p; done +# rm -rf config + +Currently no patches are needed, but they may be needed again in the +future. + +The current Buildroot version is based on the Git commit +5e4de70bb0064d974a848fbe3a445d5dafaf7b48 of the config.git repository. diff --git a/support/gnuconfig/config.guess b/support/gnuconfig/config.guess new file mode 100755 index 0000000000..b79252d6b1 --- /dev/null +++ b/support/gnuconfig/config.guess @@ -0,0 +1,1558 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2013 Free Software Foundation, Inc. + +timestamp='2013-06-10' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner. +# +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches with a ChangeLog entry to config-patches@gnu.org. + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2013 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + else + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + cris:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + crisv32:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + frv:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:Linux:*:*) + echo ${UNAME_MACHINE}-pc-linux-${LIBC} + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + ;; + or1k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-${LIBC} + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-${LIBC} + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-${LIBC} + exit ;; + x86_64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; +esac + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/support/gnuconfig/config.sub b/support/gnuconfig/config.sub new file mode 100755 index 0000000000..61cb4bc22d --- /dev/null +++ b/support/gnuconfig/config.sub @@ -0,0 +1,1793 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2013 Free Software Foundation, Inc. + +timestamp='2013-10-01' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2013 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze*) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | epiphany \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 \ + | or1k | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pyramid \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | we32k \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pyramid-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze*) + basic_machine=microblaze-xilinx + ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i686-pc + os=-msys + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or1k-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/package/config/.gitignore b/support/kconfig/.gitignore similarity index 100% rename from package/config/.gitignore rename to support/kconfig/.gitignore diff --git a/support/kconfig/Makefile b/support/kconfig/Makefile new file mode 100644 index 0000000000..d28b7ac45c --- /dev/null +++ b/support/kconfig/Makefile @@ -0,0 +1,317 @@ +# =========================================================================== +# Kernel configuration targets +# These targets are used from top-level makefile + +PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \ + localmodconfig localyesconfig + +ifdef KBUILD_KCONFIG +Kconfig := $(KBUILD_KCONFIG) +else +Kconfig := Kconfig +endif + +# We need this, in case the user has it in its environment +unexport CONFIG_ + +xconfig: $(obj)/qconf + $< $(Kconfig) + +gconfig: $(obj)/gconf + $< $(Kconfig) + +menuconfig: $(obj)/mconf + $< $(Kconfig) + +config: $(obj)/conf + $< --oldaskconfig $(Kconfig) + +nconfig: $(obj)/nconf + $< $(Kconfig) + +oldconfig: $(obj)/conf + $< --$@ $(Kconfig) + +silentoldconfig: $(obj)/conf + $(Q)mkdir -p include/generated + $< --$@ $(Kconfig) + +localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf + $(Q)mkdir -p include/generated + $(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config + $(Q)if [ -f .config ]; then \ + cmp -s .tmp.config .config || \ + (mv -f .config .config.old.1; \ + mv -f .tmp.config .config; \ + $(obj)/conf --silentoldconfig $(Kconfig); \ + mv -f .config.old.1 .config.old) \ + else \ + mv -f .tmp.config .config; \ + $(obj)/conf --silentoldconfig $(Kconfig); \ + fi + $(Q)rm -f .tmp.config + +# Create new linux.pot file +# Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files +update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h + $(Q)echo " GEN config.pot" + $(Q)xgettext --default-domain=linux \ + --add-comments --keyword=_ --keyword=N_ \ + --from-code=UTF-8 \ + --files-from=$(srctree)/scripts/kconfig/POTFILES.in \ + --directory=$(srctree) --directory=$(objtree) \ + --output $(obj)/config.pot + $(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot + $(Q)(for i in `ls $(srctree)/arch/*/Kconfig \ + $(srctree)/arch/*/um/Kconfig`; \ + do \ + echo " GEN $$i"; \ + $(obj)/kxgettext $$i \ + >> $(obj)/config.pot; \ + done ) + $(Q)echo " GEN linux.pot" + $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \ + --output $(obj)/linux.pot + $(Q)rm -f $(obj)/config.pot + +PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig + +allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf + $< --$@ $(Kconfig) + +PHONY += listnewconfig olddefconfig oldnoconfig savedefconfig defconfig + +listnewconfig olddefconfig: $(obj)/conf + $< --$@ $(Kconfig) + +# oldnoconfig is an alias of olddefconfig, because people already are dependent +# on its behavior(sets new symbols to their default value but not 'n') with the +# counter-intuitive name. +oldnoconfig: $(obj)/conf + $< --olddefconfig $(Kconfig) + +savedefconfig: $(obj)/conf + $< --$@=defconfig $(Kconfig) + +defconfig: $(obj)/conf +ifeq ($(KBUILD_DEFCONFIG),) + $< --defconfig $(Kconfig) +else + @echo "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'" + $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) +endif + +%_defconfig: $(obj)/conf + $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig) + +# Help text used by make help +help: + @echo ' config - Update current config utilising a line-oriented program' + @echo ' nconfig - Update current config utilising a ncurses menu based program' + @echo ' menuconfig - Update current config utilising a menu based program' + @echo ' xconfig - Update current config utilising a QT based front-end' + @echo ' gconfig - Update current config utilising a GTK based front-end' + @echo ' oldconfig - Update current config utilising a provided .config as base' + @echo ' localmodconfig - Update current config disabling modules not loaded' + @echo ' localyesconfig - Update current config converting local mods to core' + @echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps' + @echo ' defconfig - New config with default from ARCH supplied defconfig' + @echo ' savedefconfig - Save current config as ./defconfig (minimal config)' + @echo ' allnoconfig - New config where all options are answered with no' + @echo ' allyesconfig - New config where all options are accepted with yes' + @echo ' allmodconfig - New config selecting modules when possible' + @echo ' alldefconfig - New config with all symbols set to default' + @echo ' randconfig - New config with random answer to all options' + @echo ' listnewconfig - List new options' + @echo ' olddefconfig - Same as silentoldconfig but sets new symbols to their default value' + +# lxdialog stuff +check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh + +# Use recursively expanded variables so we do not call gcc unless +# we really need to do so. (Do not call gcc as part of make mrproper) +HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \ + -DLOCALE + +# =========================================================================== +# Shared Makefile for the various kconfig executables: +# conf: Used for defconfig, oldconfig and related targets +# nconf: Used for the nconfig target. +# Utilizes ncurses +# mconf: Used for the menuconfig target +# Utilizes the lxdialog package +# qconf: Used for the xconfig target +# Based on QT which needs to be installed to compile it +# gconf: Used for the gconfig target +# Based on GTK which needs to be installed to compile it +# object files used by all kconfig flavours + +lxdialog := lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o +lxdialog += lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o + +conf-objs := conf.o zconf.tab.o +mconf-objs := mconf.o zconf.tab.o $(lxdialog) +nconf-objs := nconf.o zconf.tab.o nconf.gui.o +kxgettext-objs := kxgettext.o zconf.tab.o +qconf-cxxobjs := qconf.o +qconf-objs := zconf.tab.o +gconf-objs := gconf.o zconf.tab.o + +hostprogs-y := conf + +ifeq ($(MAKECMDGOALS),nconf) + hostprogs-y += nconf +endif + +ifeq ($(MAKECMDGOALS),mconf) + hostprogs-y += mconf +endif + +ifeq ($(MAKECMDGOALS),update-po-config) + hostprogs-y += kxgettext +endif + +ifeq ($(MAKECMDGOALS),qconf) + qconf-target := 1 +endif +ifeq ($(MAKECMDGOALS),gconf) + gconf-target := 1 +endif + + +ifeq ($(qconf-target),1) + hostprogs-y += qconf +endif + +ifeq ($(gconf-target),1) + hostprogs-y += gconf +endif + +clean-files := qconf.moc .tmp_qtcheck .tmp_gtkcheck +clean-files += zconf.tab.c zconf.lex.c zconf.hash.c gconf.glade.h +clean-files += mconf qconf gconf nconf +clean-files += config.pot linux.pot + +# Check that we have the required ncurses stuff installed for lxdialog (menuconfig) +PHONY += $(obj)/dochecklxdialog +$(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog +$(obj)/dochecklxdialog: + $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf) + +always := dochecklxdialog + +# Add environment specific flags +HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS)) + +# generated files seem to need this to find local include files +HOSTCFLAGS_zconf.lex.o := -I$(src) +HOSTCFLAGS_zconf.tab.o := -I$(src) + +LEX_PREFIX_zconf := zconf +YACC_PREFIX_zconf := zconf + +HOSTLOADLIBES_qconf = $(KC_QT_LIBS) +HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) + +HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0` +HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \ + -Wno-missing-prototypes + +HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) + +HOSTLOADLIBES_nconf = -lmenu -lpanel -lncurses +$(obj)/qconf.o: $(obj)/.tmp_qtcheck + +ifeq ($(qconf-target),1) +$(obj)/.tmp_qtcheck: $(src)/Makefile +-include $(obj)/.tmp_qtcheck + +# QT needs some extra effort... +$(obj)/.tmp_qtcheck: + @set -e; echo " CHECK qt"; dir=""; pkg=""; \ + if ! pkg-config --exists QtCore 2> /dev/null; then \ + echo "* Unable to find the QT4 tool qmake. Trying to use QT3"; \ + pkg-config --exists qt 2> /dev/null && pkg=qt; \ + pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \ + if [ -n "$$pkg" ]; then \ + cflags="\$$(shell pkg-config $$pkg --cflags)"; \ + libs="\$$(shell pkg-config $$pkg --libs)"; \ + moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \ + dir="$$(pkg-config $$pkg --variable=prefix)"; \ + else \ + for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \ + if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \ + done; \ + if [ -z "$$dir" ]; then \ + echo >&2 "*"; \ + echo >&2 "* Unable to find any QT installation. Please make sure that"; \ + echo >&2 "* the QT4 or QT3 development package is correctly installed and"; \ + echo >&2 "* either qmake can be found or install pkg-config or set"; \ + echo >&2 "* the QTDIR environment variable to the correct location."; \ + echo >&2 "*"; \ + false; \ + fi; \ + libpath=$$dir/lib; lib=qt; osdir=""; \ + $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \ + osdir=x$$($(HOSTCXX) -print-multi-os-directory); \ + test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \ + test -f $$libpath/libqt-mt.so && lib=qt-mt; \ + cflags="-I$$dir/include"; \ + libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \ + moc="$$dir/bin/moc"; \ + fi; \ + if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \ + echo "*"; \ + echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \ + echo "*"; \ + moc="/usr/bin/moc"; \ + fi; \ + else \ + cflags="\$$(shell pkg-config QtCore QtGui Qt3Support --cflags)"; \ + libs="\$$(shell pkg-config QtCore QtGui Qt3Support --libs)"; \ + moc="\$$(shell pkg-config QtCore --variable=moc_location)"; \ + [ -n "$$moc" ] || moc="\$$(shell pkg-config QtCore --variable=prefix)/bin/moc"; \ + fi; \ + echo "KC_QT_CFLAGS=$$cflags" > $@; \ + echo "KC_QT_LIBS=$$libs" >> $@; \ + echo "KC_QT_MOC=$$moc" >> $@ +endif + +$(obj)/gconf.o: $(obj)/.tmp_gtkcheck + +ifeq ($(gconf-target),1) +-include $(obj)/.tmp_gtkcheck + +# GTK needs some extra effort, too... +$(obj)/.tmp_gtkcheck: + @if `pkg-config --exists gtk+-2.0 gmodule-2.0 libglade-2.0`; then \ + if `pkg-config --atleast-version=2.0.0 gtk+-2.0`; then \ + touch $@; \ + else \ + echo >&2 "*"; \ + echo >&2 "* GTK+ is present but version >= 2.0.0 is required."; \ + echo >&2 "*"; \ + false; \ + fi \ + else \ + echo >&2 "*"; \ + echo >&2 "* Unable to find the GTK+ installation. Please make sure that"; \ + echo >&2 "* the GTK+ 2.0 development package is correctly installed..."; \ + echo >&2 "* You need gtk+-2.0, glib-2.0 and libglade-2.0."; \ + echo >&2 "*"; \ + false; \ + fi +endif + +$(obj)/zconf.tab.o: $(obj)/zconf.lex.c $(obj)/zconf.hash.c + +$(obj)/qconf.o: $(obj)/qconf.moc + +$(obj)/%.moc: $(src)/%.h $(obj)/.tmp_qtcheck + $(KC_QT_MOC) -i $< -o $@ + +# Extract gconf menu items for I18N support +$(obj)/gconf.glade.h: $(obj)/gconf.glade + $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \ + $(obj)/gconf.glade + diff --git a/package/config/Makefile.br b/support/kconfig/Makefile.br similarity index 92% rename from package/config/Makefile.br rename to support/kconfig/Makefile.br index c24b6b50f5..41c5ce165d 100644 --- a/package/config/Makefile.br +++ b/support/kconfig/Makefile.br @@ -19,13 +19,13 @@ host-cxxmulti := $(foreach m,$(__hostprogs),\ host-cobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-objs)))) host-cxxobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-cxxobjs)))) -HOST_EXTRACFLAGS += -I$(obj) +HOST_EXTRACFLAGS += -I$(obj) -DCONFIG_=\"\" $(host-csingle): %: %.c - $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $< $(HOST_LOADLIBES) -o $(obj)/$@ + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $< -o $(obj)/$@ $(host-cmulti): %: $(host-cobjs) $(host-cshlib) - $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs)) $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@ + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@ $(host-cxxmulti): %: $(host-cxxobjs) $(host-cobjs) $(host-cshlib) $(HOSTCXX) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs) $($(@F)-cxxobjs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@ diff --git a/package/config/POTFILES.in b/support/kconfig/POTFILES.in similarity index 100% rename from package/config/POTFILES.in rename to support/kconfig/POTFILES.in diff --git a/support/kconfig/README.buildroot b/support/kconfig/README.buildroot new file mode 100644 index 0000000000..0e16e81076 --- /dev/null +++ b/support/kconfig/README.buildroot @@ -0,0 +1,20 @@ +This is a copy of the kconfig code in the kernel (currently 3.9-rc2) tweaked +to suit Buildroot. + +To update: + cp -r /usr/src/linux/scripts/kconfig support/kconfig.new + cd support/kconfig.new + cp -a ../kconfig/patches ../kconfig/README.buildroot . + quilt push -a + # Fix any conflict + cd .. + rm -rf kconfig + mv kconfig.new kconfig + +Then verify the toplevel targets work: + config + defconfig + menuconfig + xconfig + gconfig + oldconfig diff --git a/package/config/check.sh b/support/kconfig/check.sh similarity index 78% rename from package/config/check.sh rename to support/kconfig/check.sh index fa59cbf9d6..854d9c7c67 100755 --- a/package/config/check.sh +++ b/support/kconfig/check.sh @@ -1,6 +1,6 @@ #!/bin/sh # Needed for systems without gettext -$* -xc -o /dev/null - > /dev/null 2>&1 << EOF +$* -x c -o /dev/null - > /dev/null 2>&1 << EOF #include int main() { diff --git a/package/config/conf.c b/support/kconfig/conf.c similarity index 81% rename from package/config/conf.c rename to support/kconfig/conf.c index 652e079a60..c104941cb2 100644 --- a/package/config/conf.c +++ b/support/kconfig/conf.c @@ -14,11 +14,11 @@ #include #include -#define LKC_DIRECT_LINK #include "lkc.h" static void conf(struct menu *menu); static void check_conf(struct menu *menu); +static void xfgets(char *str, int size, FILE *in); enum input_mode { oldaskconfig, @@ -32,12 +32,11 @@ enum input_mode { defconfig, savedefconfig, listnewconfig, - oldnoconfig, + olddefconfig, } input_mode = oldaskconfig; -char *defconfig_file; - static int indent = 1; +static int tty_stdio; static int valid_stdin = 1; static int sync_kconfig; static int conf_cnt; @@ -106,9 +105,12 @@ static int conf_askvalue(struct symbol *sym, const char *def) return 0; } check_stdin(); + /* fall through */ case oldaskconfig: fflush(stdout); xfgets(line, 128, stdin); + if (!tty_stdio) + printf("\n"); return 1; default: break; @@ -150,6 +152,7 @@ static int conf_string(struct menu *menu) def = NULL; break; } + /* fall through */ default: line[strlen(line)-1] = 0; def = line; @@ -304,6 +307,7 @@ static int conf_choice(struct menu *menu) break; } check_stdin(); + /* fall through */ case oldaskconfig: fflush(stdout); xfgets(line, 128, stdin); @@ -332,7 +336,7 @@ static int conf_choice(struct menu *menu) } if (!child) continue; - if (line[strlen(line) - 1] == '?') { + if (line[0] && line[strlen(line) - 1] == '?') { print_help(child); continue; } @@ -364,11 +368,12 @@ static void conf(struct menu *menu) case P_MENU: if ((input_mode == silentoldconfig || input_mode == listnewconfig || - input_mode == oldnoconfig) && + input_mode == olddefconfig) && rootEntry != menu) { check_conf(menu); return; } + /* fall through */ case P_COMMENT: prompt = menu_get_prompt(menu); if (prompt) @@ -427,7 +432,7 @@ static void check_conf(struct menu *menu) if (sym->name && !sym_is_choice_value(sym)) { printf("%s%s\n", CONFIG_, sym->name); } - } else if (input_mode != oldnoconfig) { + } else if (input_mode != olddefconfig) { if (!conf_cnt++) printf(_("*\n* Restart config...\n*\n")); rootEntry = menu_get_parent_menu(menu); @@ -452,20 +457,49 @@ static struct option long_opts[] = { {"alldefconfig", no_argument, NULL, alldefconfig}, {"randconfig", no_argument, NULL, randconfig}, {"listnewconfig", no_argument, NULL, listnewconfig}, - {"oldnoconfig", no_argument, NULL, oldnoconfig}, + {"olddefconfig", no_argument, NULL, olddefconfig}, + /* + * oldnoconfig is an alias of olddefconfig, because people already + * are dependent on its behavior(sets new symbols to their default + * value but not 'n') with the counter-intuitive name. + */ + {"oldnoconfig", no_argument, NULL, olddefconfig}, {NULL, 0, NULL, 0} }; +static void conf_usage(const char *progname) +{ + + printf("Usage: %s [option] \n", progname); + printf("[option] is _one_ of the following:\n"); + printf(" --listnewconfig List new options\n"); + printf(" --oldaskconfig Start a new configuration using a line-oriented program\n"); + printf(" --oldconfig Update a configuration using a provided .config as base\n"); + printf(" --silentoldconfig Same as oldconfig, but quietly, additionally update deps\n"); + printf(" --olddefconfig Same as silentoldconfig but sets new symbols to their default value\n"); + printf(" --oldnoconfig An alias of olddefconfig\n"); + printf(" --defconfig New config with default defined in \n"); + printf(" --savedefconfig Save the minimal current configuration to \n"); + printf(" --allnoconfig New config where all options are answered with no\n"); + printf(" --allyesconfig New config where all options are answered with yes\n"); + printf(" --allmodconfig New config where all options are answered with mod\n"); + printf(" --alldefconfig New config with all symbols set to default\n"); + printf(" --randconfig New config with random answer to all options\n"); +} + int main(int ac, char **av) { + const char *progname = av[0]; int opt; - const char *name; + const char *name, *defconfig_file = NULL /* gcc uninit */; struct stat tmpstat; setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); + tty_stdio = isatty(0) && isatty(1) && isatty(2); + while ((opt = getopt_long(ac, av, "", long_opts, NULL)) != -1) { input_mode = (enum input_mode)opt; switch (opt) { @@ -491,14 +525,24 @@ int main(int ac, char **av) srand(seed); break; } + case oldaskconfig: + case oldconfig: + case allnoconfig: + case allyesconfig: + case allmodconfig: + case alldefconfig: + case listnewconfig: + case olddefconfig: + break; case '?': - fprintf(stderr, _("See README for usage info\n")); + conf_usage(progname); exit(1); break; } } if (ac == optind) { printf(_("%s: Kconfig file missing\n"), av[0]); + conf_usage(progname); exit(1); } name = av[optind]; @@ -532,7 +576,7 @@ int main(int ac, char **av) case oldaskconfig: case oldconfig: case listnewconfig: - case oldnoconfig: + case olddefconfig: conf_read(NULL); break; case allnoconfig: @@ -541,8 +585,15 @@ int main(int ac, char **av) case alldefconfig: case randconfig: name = getenv("KCONFIG_ALLCONFIG"); - if (name && !stat(name, &tmpstat)) { - conf_read_simple(name, S_DEF_USER); + if (!name) + break; + if ((strcmp(name, "") != 0) && (strcmp(name, "1") != 0)) { + if (conf_read_simple(name, S_DEF_USER)) { + fprintf(stderr, + _("*** Can't read seed configuration \"%s\"!\n"), + name); + exit(1); + } break; } switch (input_mode) { @@ -553,10 +604,13 @@ int main(int ac, char **av) case randconfig: name = "allrandom.config"; break; default: break; } - if (!stat(name, &tmpstat)) - conf_read_simple(name, S_DEF_USER); - else if (!stat("all.config", &tmpstat)) - conf_read_simple("all.config", S_DEF_USER); + if (conf_read_simple(name, S_DEF_USER) && + conf_read_simple("all.config", S_DEF_USER)) { + fprintf(stderr, + _("*** KCONFIG_ALLCONFIG set, but no \"%s\" or \"all.config\" file found\n"), + name); + exit(1); + } break; default: break; @@ -571,7 +625,7 @@ int main(int ac, char **av) return 1; } } - valid_stdin = isatty(0) && isatty(1) && isatty(2); + valid_stdin = tty_stdio; } switch (input_mode) { @@ -602,7 +656,7 @@ int main(int ac, char **av) /* fall through */ case oldconfig: case listnewconfig: - case oldnoconfig: + case olddefconfig: case silentoldconfig: /* Update until a loop caused no more changes */ do { @@ -610,7 +664,7 @@ int main(int ac, char **av) check_conf(&rootmenu); } while (conf_cnt && (input_mode != listnewconfig && - input_mode != oldnoconfig)); + input_mode != olddefconfig)); break; } @@ -640,13 +694,11 @@ int main(int ac, char **av) } return 0; } + /* * Helper function to facilitate fgets() by Jean Sacren. */ -void xfgets(str, size, in) - char *str; - int size; - FILE *in; +void xfgets(char *str, int size, FILE *in) { if (fgets(str, size, in) == NULL) fprintf(stderr, "\nError in reading or end of file.\n"); diff --git a/package/config/confdata.c b/support/kconfig/confdata.c similarity index 78% rename from package/config/confdata.c rename to support/kconfig/confdata.c index c9f13eec74..db1fac5132 100644 --- a/package/config/confdata.c +++ b/support/kconfig/confdata.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -14,7 +15,6 @@ #include #include -#define LKC_DIRECT_LINK #include "lkc.h" static void conf_warning(const char *fmt, ...) @@ -127,6 +127,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) sym->flags |= def_flags; break; } + /* fall through */ case S_BOOLEAN: if (p[0] == 'y') { sym->def[def].tri = yes; @@ -139,7 +140,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) break; } conf_warning("symbol value '%s' invalid for %s", p, sym->name); - break; + return 1; case S_OTHER: if (*p != '"') { for (p2 = p; *p2 && !isspace(*p2); p2++) @@ -147,6 +148,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) sym->type = S_STRING; goto done; } + /* fall through */ case S_STRING: if (*p++ != '"') break; @@ -161,6 +163,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) conf_warning("invalid string found"); return 1; } + /* fall through */ case S_INT: case S_HEX: done: @@ -178,10 +181,66 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) return 0; } +#define LINE_GROWTH 16 +static int add_byte(int c, char **lineptr, size_t slen, size_t *n) +{ + char *nline; + size_t new_size = slen + 1; + if (new_size > *n) { + new_size += LINE_GROWTH - 1; + new_size *= 2; + nline = realloc(*lineptr, new_size); + if (!nline) + return -1; + + *lineptr = nline; + *n = new_size; + } + + (*lineptr)[slen] = c; + + return 0; +} + +static ssize_t compat_getline(char **lineptr, size_t *n, FILE *stream) +{ + char *line = *lineptr; + size_t slen = 0; + + for (;;) { + int c = getc(stream); + + switch (c) { + case '\n': + if (add_byte(c, &line, slen, n) < 0) + goto e_out; + slen++; + /* fall through */ + case EOF: + if (add_byte('\0', &line, slen, n) < 0) + goto e_out; + *lineptr = line; + if (slen == 0) + return -1; + return slen; + default: + if (add_byte(c, &line, slen, n) < 0) + goto e_out; + slen++; + } + } + +e_out: + line[slen-1] = '\0'; + *lineptr = line; + return -1; +} + int conf_read_simple(const char *name, int def) { FILE *in = NULL; - char line[1024]; + char *line = NULL; + size_t line_asize = 0; char *p, *p2; struct symbol *sym; int i, def_flags; @@ -236,32 +295,33 @@ int conf_read_simple(const char *name, int def) case S_STRING: if (sym->def[def].val) free(sym->def[def].val); + /* fall through */ default: sym->def[def].val = NULL; sym->def[def].tri = no; } } - while (fgets(line, sizeof(line), in)) { + while (compat_getline(&line, &line_asize, in) != -1) { conf_lineno++; sym = NULL; if (line[0] == '#') { if (memcmp(line + 2, CONFIG_, strlen(CONFIG_))) continue; - p = strchr(line + 2, ' '); + p = strchr(line + 2 + strlen(CONFIG_), ' '); if (!p) continue; *p++ = 0; if (strncmp(p, "is not set", 10)) continue; if (def == S_DEF_USER) { - sym = sym_find(line + 2); + sym = sym_find(line + 2 + strlen(CONFIG_)); if (!sym) { sym_add_change_count(1); goto setsym; } } else { - sym = sym_lookup(line + 2, 0); + sym = sym_lookup(line + 2 + strlen(CONFIG_), 0); if (sym->type == S_UNKNOWN) sym->type = S_BOOLEAN; } @@ -277,8 +337,8 @@ int conf_read_simple(const char *name, int def) default: ; } - } else if (isupper(line[0])) { - p = strchr(line, '='); + } else if (memcmp(line, CONFIG_, strlen(CONFIG_)) == 0) { + p = strchr(line + strlen(CONFIG_), '='); if (!p) continue; *p++ = 0; @@ -289,13 +349,13 @@ int conf_read_simple(const char *name, int def) *p2 = 0; } if (def == S_DEF_USER) { - sym = sym_find(line); + sym = sym_find(line + strlen(CONFIG_)); if (!sym) { sym_add_change_count(1); goto setsym; } } else { - sym = sym_lookup(line, 0); + sym = sym_lookup(line + strlen(CONFIG_), 0); if (sym->type == S_UNKNOWN) sym->type = S_OTHER; } @@ -330,6 +390,7 @@ int conf_read_simple(const char *name, int def) cs->def[def].tri = EXPR_OR(cs->def[def].tri, sym->def[def].tri); } } + free(line); fclose(in); if (modules_sym) @@ -339,10 +400,8 @@ int conf_read_simple(const char *name, int def) int conf_read(const char *name) { - struct symbol *sym, *choice_sym; - struct property *prop; - struct expr *e; - int i, flags; + struct symbol *sym; + int i; sym_set_change_count(0); @@ -352,7 +411,7 @@ int conf_read(const char *name) for_all_symbols(i, sym) { sym_calc_value(sym); if (sym_is_choice(sym) || (sym->flags & SYMBOL_AUTO)) - goto sym_ok; + continue; if (sym_has_value(sym) && (sym->flags & SYMBOL_WRITE)) { /* check that calculated value agrees with saved value */ switch (sym->type) { @@ -361,29 +420,18 @@ int conf_read(const char *name) if (sym->def[S_DEF_USER].tri != sym_get_tristate_value(sym)) break; if (!sym_is_choice(sym)) - goto sym_ok; + continue; + /* fall through */ default: if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val)) - goto sym_ok; + continue; break; } } else if (!sym_has_value(sym) && !(sym->flags & SYMBOL_WRITE)) /* no previous value and not saved */ - goto sym_ok; + continue; conf_unsaved++; /* maybe print value in verbose mode... */ - sym_ok: - if (!sym_is_choice(sym)) - continue; - /* The choice symbol only has a set value (and thus is not new) - * if all its visible childs have values. - */ - prop = sym_get_choice_prop(sym); - flags = sym->flags; - expr_list_for_each_sym(prop->expr, e, choice_sym) - if (choice_sym->visible != no) - flags &= choice_sym->flags; - sym->flags &= flags | ~SYMBOL_DEF_USER; } for_all_symbols(i, sym) { @@ -416,64 +464,191 @@ int conf_read(const char *name) return 0; } -/* Write a S_STRING */ -static void conf_write_string(bool headerfile, const char *name, - const char *str, FILE *out) +/* + * Kconfig configuration printer + * + * This printer is used when generating the resulting configuration after + * kconfig invocation and `defconfig' files. Unset symbol might be omitted by + * passing a non-NULL argument to the printer. + * + */ +static void +kconfig_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) { - int l; - if (headerfile) - fprintf(out, "#define %s \"", name); - else - fprintf(out, "%s=\"", name); - while (1) { - l = strcspn(str, "\"\\"); + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + if (*value == 'n') { + bool skip_unset = (arg != NULL); + + if (!skip_unset) + fprintf(fp, "# %s%s is not set\n", + CONFIG_, sym->name); + return; + } + break; + default: + break; + } + + fprintf(fp, "%s%s=%s\n", CONFIG_, sym->name, value); +} + +static void +kconfig_print_comment(FILE *fp, const char *value, void *arg) +{ + const char *p = value; + size_t l; + + for (;;) { + l = strcspn(p, "\n"); + fprintf(fp, "#"); if (l) { - xfwrite(str, l, 1, out); - str += l; + fprintf(fp, " "); + xfwrite(p, l, 1, fp); + p += l; } - if (!*str) + fprintf(fp, "\n"); + if (*p++ == '\0') break; - fprintf(out, "\\%c", *str++); } - fputs("\"\n", out); } -static void conf_write_symbol(struct symbol *sym, FILE *out, bool write_no) +static struct conf_printer kconfig_printer_cb = +{ + .print_symbol = kconfig_print_symbol, + .print_comment = kconfig_print_comment, +}; + +/* + * Header printer + * + * This printer is used when generating the `include/generated/autoconf.h' file. + */ +static void +header_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) { - const char *str; switch (sym->type) { case S_BOOLEAN: - case S_TRISTATE: - switch (sym_get_tristate_value(sym)) { - case no: - if (write_no) - fprintf(out, "# %s is not set\n", - sym->name); - break; - case mod: - fprintf(out, "%s=m\n", sym->name); - break; - case yes: - fprintf(out, "%s=y\n", sym->name); + case S_TRISTATE: { + const char *suffix = ""; + + switch (*value) { + case 'n': break; + case 'm': + suffix = "_MODULE"; + /* fall through */ + default: + fprintf(fp, "#define %s%s%s 1\n", + CONFIG_, sym->name, suffix); } break; - case S_STRING: - conf_write_string(false, sym->name, sym_get_string_value(sym), out); + } + case S_HEX: { + const char *prefix = ""; + + if (value[0] != '0' || (value[1] != 'x' && value[1] != 'X')) + prefix = "0x"; + fprintf(fp, "#define %s%s %s%s\n", + CONFIG_, sym->name, prefix, value); break; - case S_HEX: + } + case S_STRING: case S_INT: - str = sym_get_string_value(sym); - fprintf(out, "%s=%s\n", sym->name, str); + fprintf(fp, "#define %s%s %s\n", + CONFIG_, sym->name, value); break; + default: + break; + } + +} + +static void +header_print_comment(FILE *fp, const char *value, void *arg) +{ + const char *p = value; + size_t l; + + fprintf(fp, "/*\n"); + for (;;) { + l = strcspn(p, "\n"); + fprintf(fp, " *"); + if (l) { + fprintf(fp, " "); + xfwrite(p, l, 1, fp); + p += l; + } + fprintf(fp, "\n"); + if (*p++ == '\0') + break; + } + fprintf(fp, " */\n"); +} + +static struct conf_printer header_printer_cb = +{ + .print_symbol = header_print_symbol, + .print_comment = header_print_comment, +}; + +/* + * Tristate printer + * + * This printer is used when generating the `include/config/tristate.conf' file. + */ +static void +tristate_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) +{ + + if (sym->type == S_TRISTATE && *value != 'n') + fprintf(fp, "%s%s=%c\n", CONFIG_, sym->name, (char)toupper(*value)); +} + +static struct conf_printer tristate_printer_cb = +{ + .print_symbol = tristate_print_symbol, + .print_comment = kconfig_print_comment, +}; + +static void conf_write_symbol(FILE *fp, struct symbol *sym, + struct conf_printer *printer, void *printer_arg) +{ + const char *str; + + switch (sym->type) { case S_OTHER: case S_UNKNOWN: break; + case S_STRING: + str = sym_get_string_value(sym); + str = sym_escape_string_value(str); + printer->print_symbol(fp, sym, str, printer_arg); + free((void *)str); + break; + default: + str = sym_get_string_value(sym); + printer->print_symbol(fp, sym, str, printer_arg); } } +static void +conf_write_heading(FILE *fp, struct conf_printer *printer, void *printer_arg) +{ + char buf[256]; + + snprintf(buf, sizeof(buf), + "\n" + "Automatically generated file; DO NOT EDIT.\n" + "%s\n", + rootmenu.prompt->text); + + printer->print_comment(fp, buf, printer_arg); +} + /* * Write out a minimal config. * All values that has default values are skipped as this is redundant. @@ -530,7 +705,7 @@ int conf_write_defconfig(const char *filename) goto next_menu; } } - conf_write_symbol(sym, out, true); + conf_write_symbol(out, sym, &kconfig_printer_cb, NULL); } next_menu: if (menu->list != NULL) { @@ -559,8 +734,6 @@ int conf_write(const char *name) const char *basename; const char *str; char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1]; - time_t now; - int use_timestamp = 1; char *env; if (!name) @@ -600,19 +773,7 @@ int conf_write(const char *name) if (!out) return 1; - time(&now); - env = getenv("KCONFIG_NOTIMESTAMP"); - if (env && *env) - use_timestamp = 0; - - fprintf(out, _("#\n" - "# Automatically generated make config: don't edit\n" - "# %s\n" - "%s%s" - "#\n"), - rootmenu.prompt->text, - use_timestamp ? "# " : "", - use_timestamp ? ctime(&now) : ""); + conf_write_heading(out, &kconfig_printer_cb, NULL); if (!conf_get_changed()) sym_clear_all_valid(); @@ -633,8 +794,8 @@ int conf_write(const char *name) if (!(sym->flags & SYMBOL_WRITE)) goto next; sym->flags &= ~SYMBOL_WRITE; - /* Write config symbol to file */ - conf_write_symbol(sym, out, true); + + conf_write_symbol(out, sym, &kconfig_printer_cb, NULL); } next: @@ -798,10 +959,8 @@ static int conf_split_config(void) int conf_write_autoconf(void) { struct symbol *sym; - const char *str; const char *name; FILE *out, *tristate, *out_h; - time_t now; int i; char dir[PATH_MAX+1], buf[PATH_MAX+1]; char *s; @@ -841,71 +1000,23 @@ int conf_write_autoconf(void) return 1; } - time(&now); - fprintf(out, "#\n" - "# Automatically generated make config: don't edit\n" - "# %s\n" - "# %s" - "#\n", - rootmenu.prompt->text, ctime(&now)); - fprintf(tristate, "#\n" - "# Automatically generated - do not edit\n" - "\n"); - fprintf(out_h, "/*\n" - " * Automatically generated C config: don't edit\n" - " * %s\n" - " * %s" - " */\n", - rootmenu.prompt->text, ctime(&now)); + conf_write_heading(out, &kconfig_printer_cb, NULL); + + conf_write_heading(tristate, &tristate_printer_cb, NULL); + + conf_write_heading(out_h, &header_printer_cb, NULL); for_all_symbols(i, sym) { sym_calc_value(sym); if (!(sym->flags & SYMBOL_WRITE) || !sym->name) continue; - /* write symbol to config file */ - conf_write_symbol(sym, out, false); + /* write symbol to auto.conf, tristate and header files */ + conf_write_symbol(out, sym, &kconfig_printer_cb, (void *)1); - /* update autoconf and tristate files */ - switch (sym->type) { - case S_BOOLEAN: - case S_TRISTATE: - switch (sym_get_tristate_value(sym)) { - case no: - break; - case mod: - fprintf(tristate, "%s=M\n", - sym->name); - fprintf(out_h, "#define %s_MODULE 1\n", - sym->name); - break; - case yes: - if (sym->type == S_TRISTATE) - fprintf(tristate,"%s=Y\n", - sym->name); - fprintf(out_h, "#define %s 1\n", - sym->name); - break; - } - break; - case S_STRING: - conf_write_string(true, sym->name, sym_get_string_value(sym), out_h); - break; - case S_HEX: - str = sym_get_string_value(sym); - if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) { - fprintf(out_h, "#define %s 0x%s\n", - sym->name, str); - break; - } - case S_INT: - str = sym_get_string_value(sym); - fprintf(out_h, "#define %s %s\n", - sym->name, str); - break; - default: - break; - } + conf_write_symbol(tristate, sym, &tristate_printer_cb, (void *)1); + + conf_write_symbol(out_h, sym, &header_printer_cb, NULL); } fclose(out); fclose(tristate); diff --git a/package/config/expr.c b/support/kconfig/expr.c similarity index 98% rename from package/config/expr.c rename to support/kconfig/expr.c index c5182f4d43..bf776b6e90 100644 --- a/package/config/expr.c +++ b/support/kconfig/expr.c @@ -7,15 +7,13 @@ #include #include -#define LKC_DIRECT_LINK #include "lkc.h" #define DEBUG_EXPR 0 struct expr *expr_alloc_symbol(struct symbol *sym) { - struct expr *e = malloc(sizeof(*e)); - memset(e, 0, sizeof(*e)); + struct expr *e = xcalloc(1, sizeof(*e)); e->type = E_SYMBOL; e->left.sym = sym; return e; @@ -23,8 +21,7 @@ struct expr *expr_alloc_symbol(struct symbol *sym) struct expr *expr_alloc_one(enum expr_type type, struct expr *ce) { - struct expr *e = malloc(sizeof(*e)); - memset(e, 0, sizeof(*e)); + struct expr *e = xcalloc(1, sizeof(*e)); e->type = type; e->left.expr = ce; return e; @@ -32,8 +29,7 @@ struct expr *expr_alloc_one(enum expr_type type, struct expr *ce) struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2) { - struct expr *e = malloc(sizeof(*e)); - memset(e, 0, sizeof(*e)); + struct expr *e = xcalloc(1, sizeof(*e)); e->type = type; e->left.expr = e1; e->right.expr = e2; @@ -42,8 +38,7 @@ struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2) { - struct expr *e = malloc(sizeof(*e)); - memset(e, 0, sizeof(*e)); + struct expr *e = xcalloc(1, sizeof(*e)); e->type = type; e->left.sym = s1; e->right.sym = s2; @@ -71,7 +66,7 @@ struct expr *expr_copy(const struct expr *org) if (!org) return NULL; - e = malloc(sizeof(*org)); + e = xmalloc(sizeof(*org)); memcpy(e, org, sizeof(*org)); switch (org->type) { case E_SYMBOL: diff --git a/package/config/expr.h b/support/kconfig/expr.h similarity index 97% rename from package/config/expr.h rename to support/kconfig/expr.h index 3d238db497..cdd48600e0 100644 --- a/package/config/expr.h +++ b/support/kconfig/expr.h @@ -10,7 +10,9 @@ extern "C" { #endif +#include #include +#include "list.h" #ifndef __cplusplus #include #endif @@ -20,12 +22,8 @@ struct file { struct file *parent; const char *name; int lineno; - int flags; }; -#define FILE_BUSY 0x0001 -#define FILE_SCANNED 0x0002 - typedef enum tristate { no, mod, yes } tristate; @@ -176,7 +174,14 @@ struct menu { #define MENU_CHANGED 0x0001 #define MENU_ROOT 0x0002 -#ifndef SWIG +struct jump_key { + struct list_head entries; + size_t offset; + struct menu *target; + int index; +}; + +#define JUMP_NB 9 extern struct file *file_list; extern struct file *current_file; @@ -222,7 +227,6 @@ static inline int expr_is_no(struct expr *e) { return e && (e->type == E_SYMBOL && e->left.sym == &symbol_no); } -#endif #ifdef __cplusplus } diff --git a/package/config/foo.h b/support/kconfig/foo.h similarity index 100% rename from package/config/foo.h rename to support/kconfig/foo.h diff --git a/package/config/gconf.c b/support/kconfig/gconf.c similarity index 96% rename from package/config/gconf.c rename to support/kconfig/gconf.c index 21185a0cbd..7cbe68eb01 100644 --- a/package/config/gconf.c +++ b/support/kconfig/gconf.c @@ -10,6 +10,7 @@ # include #endif +#include #include "lkc.h" #include "images.c" @@ -22,7 +23,6 @@ #include #include #include -#include //#define DEBUG @@ -253,7 +253,7 @@ void init_left_tree(void) gtk_tree_view_set_model(view, model1); gtk_tree_view_set_headers_visible(view, TRUE); - gtk_tree_view_set_rules_hint(view, FALSE); + gtk_tree_view_set_rules_hint(view, TRUE); column = gtk_tree_view_column_new(); gtk_tree_view_append_column(view, column); @@ -285,8 +285,6 @@ void init_left_tree(void) static void renderer_edited(GtkCellRendererText * cell, const gchar * path_string, const gchar * new_text, gpointer user_data); -static void renderer_toggled(GtkCellRendererToggle * cellrenderertoggle, - gchar * arg1, gpointer user_data); void init_right_tree(void) { @@ -298,7 +296,7 @@ void init_right_tree(void) gtk_tree_view_set_model(view, model2); gtk_tree_view_set_headers_visible(view, TRUE); - gtk_tree_view_set_rules_hint(view, FALSE); + gtk_tree_view_set_rules_hint(view, TRUE); column = gtk_tree_view_column_new(); gtk_tree_view_append_column(view, column); @@ -320,8 +318,6 @@ void init_right_tree(void) "inconsistent", COL_BTNINC, "visible", COL_BTNVIS, "radio", COL_BTNRAD, NULL); - /*g_signal_connect(G_OBJECT(renderer), "toggled", - G_CALLBACK(renderer_toggled), NULL); */ renderer = gtk_cell_renderer_text_new(); gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), renderer, FALSE); @@ -687,7 +683,7 @@ void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data) dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, - GTK_BUTTONS_CLOSE, intro_text); + GTK_BUTTONS_CLOSE, "%s", intro_text); g_signal_connect_swapped(GTK_OBJECT(dialog), "response", G_CALLBACK(gtk_widget_destroy), GTK_OBJECT(dialog)); @@ -705,7 +701,7 @@ void on_about1_activate(GtkMenuItem * menuitem, gpointer user_data) dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, - GTK_BUTTONS_CLOSE, about_text); + GTK_BUTTONS_CLOSE, "%s", about_text); g_signal_connect_swapped(GTK_OBJECT(dialog), "response", G_CALLBACK(gtk_widget_destroy), GTK_OBJECT(dialog)); @@ -724,7 +720,7 @@ void on_license1_activate(GtkMenuItem * menuitem, gpointer user_data) dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, - GTK_BUTTONS_CLOSE, license_text); + GTK_BUTTONS_CLOSE, "%s", license_text); g_signal_connect_swapped(GTK_OBJECT(dialog), "response", G_CALLBACK(gtk_widget_destroy), GTK_OBJECT(dialog)); @@ -756,7 +752,6 @@ void on_load_clicked(GtkButton * button, gpointer user_data) void on_single_clicked(GtkButton * button, gpointer user_data) { view_mode = SINGLE_VIEW; - gtk_paned_set_position(GTK_PANED(hpaned), 0); gtk_widget_hide(tree1_w); current = &rootmenu; display_tree_part(); @@ -782,7 +777,6 @@ void on_split_clicked(GtkButton * button, gpointer user_data) void on_full_clicked(GtkButton * button, gpointer user_data) { view_mode = FULL_VIEW; - gtk_paned_set_position(GTK_PANED(hpaned), 0); gtk_widget_hide(tree1_w); if (tree2) gtk_tree_store_clear(tree2); @@ -836,7 +830,7 @@ static void renderer_edited(GtkCellRendererText * cell, static void change_sym_value(struct menu *menu, gint col) { struct symbol *sym = menu->sym; - tristate oldval, newval; + tristate newval; if (!sym) return; @@ -853,7 +847,6 @@ static void change_sym_value(struct menu *menu, gint col) switch (sym_get_type(sym)) { case S_BOOLEAN: case S_TRISTATE: - oldval = sym_get_tristate_value(sym); if (!sym_tristate_within_range(sym, newval)) newval = yes; sym_set_tristate_value(sym, newval); @@ -890,35 +883,6 @@ static void toggle_sym_value(struct menu *menu) display_tree_part(); //fixme: keep exp/coll } -static void renderer_toggled(GtkCellRendererToggle * cell, - gchar * path_string, gpointer user_data) -{ - GtkTreePath *path, *sel_path = NULL; - GtkTreeIter iter, sel_iter; - GtkTreeSelection *sel; - struct menu *menu; - - path = gtk_tree_path_new_from_string(path_string); - if (!gtk_tree_model_get_iter(model2, &iter, path)) - return; - - sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree2_w)); - if (gtk_tree_selection_get_selected(sel, NULL, &sel_iter)) - sel_path = gtk_tree_model_get_path(model2, &sel_iter); - if (!sel_path) - goto out1; - if (gtk_tree_path_compare(path, sel_path)) - goto out2; - - gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1); - toggle_sym_value(menu); - - out2: - gtk_tree_path_free(sel_path); - out1: - gtk_tree_path_free(path); -} - static gint column2index(GtkTreeViewColumn * column) { gint i; @@ -1174,6 +1138,7 @@ static gchar **fill_row(struct menu *menu) row[COL_BTNVIS] = GINT_TO_POINTER(TRUE); if (sym_is_choice(sym)) break; + /* fall through */ case S_TRISTATE: val = sym_get_tristate_value(sym); switch (val) { @@ -1312,7 +1277,6 @@ static void update_tree(struct menu *src, GtkTreeIter * dst) gboolean valid; GtkTreeIter *sibling; struct symbol *sym; - struct property *prop; struct menu *menu1, *menu2; if (src == &rootmenu) @@ -1321,7 +1285,6 @@ static void update_tree(struct menu *src, GtkTreeIter * dst) valid = gtk_tree_model_iter_children(model2, child2, dst); for (child1 = src->list; child1; child1 = child1->next) { - prop = child1->prompt; sym = child1->sym; reparse: @@ -1444,6 +1407,12 @@ static void display_tree(struct menu *menu) if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT)) || (view_mode == FULL_VIEW) || (view_mode == SPLIT_VIEW))*/ + + /* Change paned position if the view is not in 'split mode' */ + if (view_mode == SINGLE_VIEW || view_mode == FULL_VIEW) { + gtk_paned_set_position(GTK_PANED(hpaned), 0); + } + if (((view_mode == SINGLE_VIEW) && (menu->flags & MENU_ROOT)) || (view_mode == FULL_VIEW) || (view_mode == SPLIT_VIEW)) { @@ -1502,10 +1471,6 @@ int main(int ac, char *av[]) char *env; gchar *glade_file; -#ifndef LKC_DIRECT_LINK - kconfig_load(); -#endif - bindtextdomain(PACKAGE, LOCALEDIR); bind_textdomain_codeset(PACKAGE, "UTF-8"); textdomain(PACKAGE); @@ -1521,7 +1486,7 @@ int main(int ac, char *av[]) /* Determine GUI path */ env = getenv(SRCTREE); if (env) - glade_file = g_strconcat(env, "/package/config/gconf.glade", NULL); + glade_file = g_strconcat(env, "/support/kconfig/gconf.glade", NULL); else if (av[0][0] == '/') glade_file = g_strconcat(av[0], ".glade", NULL); else diff --git a/package/config/gconf.glade b/support/kconfig/gconf.glade similarity index 100% rename from package/config/gconf.glade rename to support/kconfig/gconf.glade diff --git a/package/config/images.c b/support/kconfig/images.c similarity index 100% rename from package/config/images.c rename to support/kconfig/images.c diff --git a/package/config/kxgettext.c b/support/kconfig/kxgettext.c similarity index 99% rename from package/config/kxgettext.c rename to support/kconfig/kxgettext.c index e9d8e791bf..2858738b22 100644 --- a/package/config/kxgettext.c +++ b/support/kconfig/kxgettext.c @@ -7,7 +7,6 @@ #include #include -#define LKC_DIRECT_LINK #include "lkc.h" static char *escape(const char* text, char *bf, int len) diff --git a/support/kconfig/list.h b/support/kconfig/list.h new file mode 100644 index 0000000000..0ae730be5f --- /dev/null +++ b/support/kconfig/list.h @@ -0,0 +1,91 @@ +#ifndef LIST_H +#define LIST_H + +/* + * Copied from include/linux/... + */ + +#undef offsetof +#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) + +/** + * container_of - cast a member of a structure out to the containing structure + * @ptr: the pointer to the member. + * @type: the type of the container struct this is embedded in. + * @member: the name of the member within the struct. + * + */ +#define container_of(ptr, type, member) ({ \ + const typeof( ((type *)0)->member ) *__mptr = (ptr); \ + (type *)( (char *)__mptr - offsetof(type,member) );}) + + +struct list_head { + struct list_head *next, *prev; +}; + + +#define LIST_HEAD_INIT(name) { &(name), &(name) } + +#define LIST_HEAD(name) \ + struct list_head name = LIST_HEAD_INIT(name) + +/** + * list_entry - get the struct for this entry + * @ptr: the &struct list_head pointer. + * @type: the type of the struct this is embedded in. + * @member: the name of the list_struct within the struct. + */ +#define list_entry(ptr, type, member) \ + container_of(ptr, type, member) + +/** + * list_for_each_entry - iterate over list of given type + * @pos: the type * to use as a loop cursor. + * @head: the head for your list. + * @member: the name of the list_struct within the struct. + */ +#define list_for_each_entry(pos, head, member) \ + for (pos = list_entry((head)->next, typeof(*pos), member); \ + &pos->member != (head); \ + pos = list_entry(pos->member.next, typeof(*pos), member)) + +/** + * list_empty - tests whether a list is empty + * @head: the list to test. + */ +static inline int list_empty(const struct list_head *head) +{ + return head->next == head; +} + +/* + * Insert a new entry between two known consecutive entries. + * + * This is only for internal list manipulation where we know + * the prev/next entries already! + */ +static inline void __list_add(struct list_head *_new, + struct list_head *prev, + struct list_head *next) +{ + next->prev = _new; + _new->next = next; + _new->prev = prev; + prev->next = _new; +} + +/** + * list_add_tail - add a new entry + * @new: new entry to be added + * @head: list head to add it before + * + * Insert a new entry before the specified head. + * This is useful for implementing queues. + */ +static inline void list_add_tail(struct list_head *_new, struct list_head *head) +{ + __list_add(_new, head->prev, head); +} + +#endif diff --git a/package/config/lkc.h b/support/kconfig/lkc.h similarity index 89% rename from package/config/lkc.h rename to support/kconfig/lkc.h index e899066221..f8aee5fc6d 100644 --- a/package/config/lkc.h +++ b/support/kconfig/lkc.h @@ -21,12 +21,7 @@ static inline char *bind_textdomain_codeset(const char *dn, char *c) { return c; extern "C" { #endif -#ifdef LKC_DIRECT_LINK #define P(name,type,arg) extern type name arg -#else -#include "lkc_defs.h" -#define P(name,type,arg) extern type (*name ## _p) arg -#endif #include "lkc_proto.h" #undef P @@ -42,8 +37,14 @@ extern "C" { #define N_(text) (text) #ifndef CONFIG_ -#define CONFIG_ "BR2_" +#define CONFIG_ "CONFIG_" #endif +static inline const char *CONFIG_prefix(void) +{ + return getenv( "CONFIG_" ) ?: CONFIG_; +} +#undef CONFIG_ +#define CONFIG_ CONFIG_prefix() #define TF_COMMAND 0x0001 #define TF_PARAM 0x0002 @@ -68,9 +69,7 @@ struct kconf_id { enum symbol_type stype; }; -#ifdef YYDEBUG extern int zconfdebug; -#endif int zconfparse(void); void zconfdump(FILE *out); @@ -81,9 +80,6 @@ void zconf_nextfile(const char *name); int zconf_lineno(void); const char *zconf_curname(void); -/* conf.c */ -void xfgets(char *str, int size, FILE *in); - /* confdata.c */ const char *conf_get_configname(void); const char *conf_get_autoconfig_name(void); @@ -92,15 +88,19 @@ void sym_set_change_count(int count); void sym_add_change_count(int count); void conf_set_all_new_symbols(enum conf_def_mode mode); +struct conf_printer { + void (*print_symbol)(FILE *, struct symbol *, const char *, void *); + void (*print_comment)(FILE *, const char *, void *); +}; + /* confdata.c and expr.c */ static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out) { - if (fwrite(str, len, count, out) < count) - fprintf(stderr, "\nError in writing or end of file.\n"); -} + assert(len != 0); -/* kconfig_load.c */ -void kconfig_load(void); + if (fwrite(str, len, count, out) != count) + fprintf(stderr, "Error in writing or end of file.\n"); +} /* menu.c */ void _menu_init(void); @@ -122,6 +122,8 @@ void menu_set_type(int type); /* util.c */ struct file *file_lookup(const char *name); int file_write_dep(const char *name); +void *xmalloc(size_t size); +void *xcalloc(size_t nmemb, size_t size); struct gstr { size_t len; diff --git a/package/config/lkc_proto.h b/support/kconfig/lkc_proto.h similarity index 90% rename from package/config/lkc_proto.h rename to support/kconfig/lkc_proto.h index 17342fef38..ef1a7381f9 100644 --- a/package/config/lkc_proto.h +++ b/support/kconfig/lkc_proto.h @@ -21,8 +21,10 @@ P(menu_get_root_menu,struct menu *,(struct menu *menu)); P(menu_get_parent_menu,struct menu *,(struct menu *menu)); P(menu_has_help,bool,(struct menu *menu)); P(menu_get_help,const char *,(struct menu *menu)); -P(get_symbol_str, void, (struct gstr *r, struct symbol *sym)); -P(get_relations_str, struct gstr, (struct symbol **sym_arr)); +P(get_symbol_str, void, (struct gstr *r, struct symbol *sym, struct list_head + *head)); +P(get_relations_str, struct gstr, (struct symbol **sym_arr, struct list_head + *head)); P(menu_get_ext_help,void,(struct menu *menu, struct gstr *help)); /* symbol.c */ @@ -31,6 +33,7 @@ P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]); P(sym_lookup,struct symbol *,(const char *name, int flags)); P(sym_find,struct symbol *,(const char *name)); P(sym_expand_string_value,const char *,(const char *in)); +P(sym_escape_string_value, const char *,(const char *in)); P(sym_re_search,struct symbol **,(const char *pattern)); P(sym_type_name,const char *,(enum symbol_type type)); P(sym_calc_value,void,(struct symbol *sym)); diff --git a/package/config/lxdialog/.gitignore b/support/kconfig/lxdialog/.gitignore similarity index 100% rename from package/config/lxdialog/.gitignore rename to support/kconfig/lxdialog/.gitignore diff --git a/package/config/lxdialog/BIG.FAT.WARNING b/support/kconfig/lxdialog/BIG.FAT.WARNING similarity index 100% rename from package/config/lxdialog/BIG.FAT.WARNING rename to support/kconfig/lxdialog/BIG.FAT.WARNING diff --git a/package/config/lxdialog/check-lxdialog.sh b/support/kconfig/lxdialog/check-lxdialog.sh similarity index 88% rename from package/config/lxdialog/check-lxdialog.sh rename to support/kconfig/lxdialog/check-lxdialog.sh index 969cd4cc0e..6f6fd9d5c8 100644 --- a/package/config/lxdialog/check-lxdialog.sh +++ b/support/kconfig/lxdialog/check-lxdialog.sh @@ -4,7 +4,7 @@ # What library to link ldflags() { - for ext in so a dylib ; do + for ext in so a dll.a dylib ; do for lib in ncursesw ncurses curses ; do $cc -print-file-name=lib${lib}.${ext} | grep -q / if [ $? -eq 0 ]; then @@ -19,12 +19,13 @@ ldflags() # Where is ncurses.h? ccflags() { - if [ -f /usr/include/ncurses/ncurses.h ]; then + if [ -f /usr/include/ncursesw/curses.h ]; then + echo '-I/usr/include/ncursesw -DCURSES_LOC=""' + echo ' -DNCURSES_WIDECHAR=1' + elif [ -f /usr/include/ncurses/ncurses.h ]; then echo '-I/usr/include/ncurses -DCURSES_LOC=""' elif [ -f /usr/include/ncurses/curses.h ]; then echo '-I/usr/include/ncurses -DCURSES_LOC=""' - elif [ -f /usr/include/ncursesw/curses.h ]; then - echo '-I/usr/include/ncursesw -DCURSES_LOC=""' elif [ -f /usr/include/ncurses.h ]; then echo '-DCURSES_LOC=""' else @@ -38,7 +39,7 @@ trap "rm -f $tmp" 0 1 2 3 15 # Check if we can link to ncurses check() { - $cc -xc - -o $tmp 2>/dev/null <<'EOF' + $cc -x c - -o $tmp 2>/dev/null <<'EOF' #include CURSES_LOC main() {} EOF diff --git a/package/config/lxdialog/checklist.c b/support/kconfig/lxdialog/checklist.c similarity index 100% rename from package/config/lxdialog/checklist.c rename to support/kconfig/lxdialog/checklist.c diff --git a/package/config/lxdialog/dialog.h b/support/kconfig/lxdialog/dialog.h similarity index 94% rename from package/config/lxdialog/dialog.h rename to support/kconfig/lxdialog/dialog.h index b5211fce0d..307022a8be 100644 --- a/package/config/lxdialog/dialog.h +++ b/support/kconfig/lxdialog/dialog.h @@ -144,6 +144,7 @@ struct dialog_info { */ extern struct dialog_info dlg; extern char dialog_input_result[]; +extern int saved_x, saved_y; /* Needed in signal handler in mconf.c */ /* * Function prototypes @@ -209,12 +210,17 @@ int first_alpha(const char *string, const char *exempt); int dialog_yesno(const char *title, const char *prompt, int height, int width); int dialog_msgbox(const char *title, const char *prompt, int height, int width, int pause); -int dialog_textbox(const char *title, const char *file, int height, int width); + + +typedef void (*update_text_fn)(char *buf, size_t start, size_t end, void + *_data); +int dialog_textbox(const char *title, char *tbuf, int initial_height, + int initial_width, int *keys, int *_vscroll, int *_hscroll, + update_text_fn update_text, void *data); int dialog_menu(const char *title, const char *prompt, const void *selected, int *s_scroll); int dialog_checklist(const char *title, const char *prompt, int height, int width, int list_height); -extern char dialog_input_result[]; int dialog_inputbox(const char *title, const char *prompt, int height, int width, const char *init); diff --git a/support/kconfig/lxdialog/inputbox.c b/support/kconfig/lxdialog/inputbox.c new file mode 100644 index 0000000000..21404a04d7 --- /dev/null +++ b/support/kconfig/lxdialog/inputbox.c @@ -0,0 +1,301 @@ +/* + * inputbox.c -- implements the input box + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "dialog.h" + +char dialog_input_result[MAX_LEN + 1]; + +/* + * Print the termination buttons + */ +static void print_buttons(WINDOW * dialog, int height, int width, int selected) +{ + int x = width / 2 - 11; + int y = height - 2; + + print_button(dialog, gettext(" Ok "), y, x, selected == 0); + print_button(dialog, gettext(" Help "), y, x + 14, selected == 1); + + wmove(dialog, y, x + 1 + 14 * selected); + wrefresh(dialog); +} + +/* + * Display a dialog box for inputing a string + */ +int dialog_inputbox(const char *title, const char *prompt, int height, int width, + const char *init) +{ + int i, x, y, box_y, box_x, box_width; + int input_x = 0, key = 0, button = -1; + int show_x, len, pos; + char *instr = dialog_input_result; + WINDOW *dialog; + + if (!init) + instr[0] = '\0'; + else + strcpy(instr, init); + +do_resize: + if (getmaxy(stdscr) <= (height - 2)) + return -ERRDISPLAYTOOSMALL; + if (getmaxx(stdscr) <= (width - 2)) + return -ERRDISPLAYTOOSMALL; + + /* center dialog box on screen */ + x = (COLS - width) / 2; + y = (LINES - height) / 2; + + draw_shadow(stdscr, y, x, height, width); + + dialog = newwin(height, width, y, x); + keypad(dialog, TRUE); + + draw_box(dialog, 0, 0, height, width, + dlg.dialog.atr, dlg.border.atr); + wattrset(dialog, dlg.border.atr); + mvwaddch(dialog, height - 3, 0, ACS_LTEE); + for (i = 0; i < width - 2; i++) + waddch(dialog, ACS_HLINE); + wattrset(dialog, dlg.dialog.atr); + waddch(dialog, ACS_RTEE); + + print_title(dialog, title, width); + + wattrset(dialog, dlg.dialog.atr); + print_autowrap(dialog, prompt, width - 2, 1, 3); + + /* Draw the input field box */ + box_width = width - 6; + getyx(dialog, y, x); + box_y = y + 2; + box_x = (width - box_width) / 2; + draw_box(dialog, y + 1, box_x - 1, 3, box_width + 2, + dlg.dialog.atr, dlg.border.atr); + + print_buttons(dialog, height, width, 0); + + /* Set up the initial value */ + wmove(dialog, box_y, box_x); + wattrset(dialog, dlg.inputbox.atr); + + len = strlen(instr); + pos = len; + + if (len >= box_width) { + show_x = len - box_width + 1; + input_x = box_width - 1; + for (i = 0; i < box_width - 1; i++) + waddch(dialog, instr[show_x + i]); + } else { + show_x = 0; + input_x = len; + waddstr(dialog, instr); + } + + wmove(dialog, box_y, box_x + input_x); + + wrefresh(dialog); + + while (key != KEY_ESC) { + key = wgetch(dialog); + + if (button == -1) { /* Input box selected */ + switch (key) { + case TAB: + case KEY_UP: + case KEY_DOWN: + break; + case KEY_BACKSPACE: + case 127: + if (pos) { + wattrset(dialog, dlg.inputbox.atr); + if (input_x == 0) { + show_x--; + } else + input_x--; + + if (pos < len) { + for (i = pos - 1; i < len; i++) { + instr[i] = instr[i+1]; + } + } + + pos--; + len--; + instr[len] = '\0'; + wmove(dialog, box_y, box_x); + for (i = 0; i < box_width; i++) { + if (!instr[show_x + i]) { + waddch(dialog, ' '); + break; + } + waddch(dialog, instr[show_x + i]); + } + wmove(dialog, box_y, input_x + box_x); + wrefresh(dialog); + } + continue; + case KEY_LEFT: + if (pos > 0) { + if (input_x > 0) { + wmove(dialog, box_y, --input_x + box_x); + } else if (input_x == 0) { + show_x--; + wmove(dialog, box_y, box_x); + for (i = 0; i < box_width; i++) { + if (!instr[show_x + i]) { + waddch(dialog, ' '); + break; + } + waddch(dialog, instr[show_x + i]); + } + wmove(dialog, box_y, box_x); + } + pos--; + } + continue; + case KEY_RIGHT: + if (pos < len) { + if (input_x < box_width - 1) { + wmove(dialog, box_y, ++input_x + box_x); + } else if (input_x == box_width - 1) { + show_x++; + wmove(dialog, box_y, box_x); + for (i = 0; i < box_width; i++) { + if (!instr[show_x + i]) { + waddch(dialog, ' '); + break; + } + waddch(dialog, instr[show_x + i]); + } + wmove(dialog, box_y, input_x + box_x); + } + pos++; + } + continue; + default: + if (key < 0x100 && isprint(key)) { + if (len < MAX_LEN) { + wattrset(dialog, dlg.inputbox.atr); + if (pos < len) { + for (i = len; i > pos; i--) + instr[i] = instr[i-1]; + instr[pos] = key; + } else { + instr[len] = key; + } + pos++; + len++; + instr[len] = '\0'; + + if (input_x == box_width - 1) { + show_x++; + } else { + input_x++; + } + + wmove(dialog, box_y, box_x); + for (i = 0; i < box_width; i++) { + if (!instr[show_x + i]) { + waddch(dialog, ' '); + break; + } + waddch(dialog, instr[show_x + i]); + } + wmove(dialog, box_y, input_x + box_x); + wrefresh(dialog); + } else + flash(); /* Alarm user about overflow */ + continue; + } + } + } + switch (key) { + case 'O': + case 'o': + delwin(dialog); + return 0; + case 'H': + case 'h': + delwin(dialog); + return 1; + case KEY_UP: + case KEY_LEFT: + switch (button) { + case -1: + button = 1; /* Indicates "Help" button is selected */ + print_buttons(dialog, height, width, 1); + break; + case 0: + button = -1; /* Indicates input box is selected */ + print_buttons(dialog, height, width, 0); + wmove(dialog, box_y, box_x + input_x); + wrefresh(dialog); + break; + case 1: + button = 0; /* Indicates "OK" button is selected */ + print_buttons(dialog, height, width, 0); + break; + } + break; + case TAB: + case KEY_DOWN: + case KEY_RIGHT: + switch (button) { + case -1: + button = 0; /* Indicates "OK" button is selected */ + print_buttons(dialog, height, width, 0); + break; + case 0: + button = 1; /* Indicates "Help" button is selected */ + print_buttons(dialog, height, width, 1); + break; + case 1: + button = -1; /* Indicates input box is selected */ + print_buttons(dialog, height, width, 0); + wmove(dialog, box_y, box_x + input_x); + wrefresh(dialog); + break; + } + break; + case ' ': + case '\n': + delwin(dialog); + return (button == -1 ? 0 : button); + case 'X': + case 'x': + key = KEY_ESC; + break; + case KEY_ESC: + key = on_key_esc(dialog); + break; + case KEY_RESIZE: + delwin(dialog); + on_key_resize(); + goto do_resize; + } + } + + delwin(dialog); + return KEY_ESC; /* ESC pressed */ +} diff --git a/package/config/lxdialog/menubox.c b/support/kconfig/lxdialog/menubox.c similarity index 97% rename from package/config/lxdialog/menubox.c rename to support/kconfig/lxdialog/menubox.c index 1d604738fa..48d382e7e3 100644 --- a/package/config/lxdialog/menubox.c +++ b/support/kconfig/lxdialog/menubox.c @@ -26,7 +26,7 @@ * * *) A bugfix for the Page-Down problem * - * *) Formerly when I used Page Down and Page Up, the cursor would be set + * *) Formerly when I used Page Down and Page Up, the cursor would be set * to the first position in the menu box. Now lxdialog is a bit * smarter and works more like other menu systems (just have a look at * it). @@ -154,12 +154,14 @@ static void print_arrows(WINDOW * win, int item_no, int scroll, int y, int x, */ static void print_buttons(WINDOW * win, int height, int width, int selected) { - int x = width / 2 - 16; + int x = width / 2 - 28; int y = height - 2; print_button(win, gettext("Select"), y, x, selected == 0); print_button(win, gettext(" Exit "), y, x + 12, selected == 1); print_button(win, gettext(" Help "), y, x + 24, selected == 2); + print_button(win, gettext(" Save "), y, x + 36, selected == 3); + print_button(win, gettext(" Load "), y, x + 48, selected == 4); wmove(win, y, x + 1 + 12 * selected); wrefresh(win); @@ -372,7 +374,7 @@ int dialog_menu(const char *title, const char *prompt, case TAB: case KEY_RIGHT: button = ((key == KEY_LEFT ? --button : ++button) < 0) - ? 2 : (button > 2 ? 0 : button); + ? 4 : (button > 4 ? 0 : button); print_buttons(dialog, height, width, button); wrefresh(menu); @@ -399,17 +401,17 @@ int dialog_menu(const char *title, const char *prompt, return 2; case 's': case 'y': - return 3; + return 5; case 'n': - return 4; + return 6; case 'm': - return 5; + return 7; case ' ': - return 6; + return 8; case '/': - return 7; + return 9; case 'z': - return 8; + return 10; case '\n': return button; } diff --git a/support/kconfig/lxdialog/textbox.c b/support/kconfig/lxdialog/textbox.c new file mode 100644 index 0000000000..a48bb93e09 --- /dev/null +++ b/support/kconfig/lxdialog/textbox.c @@ -0,0 +1,408 @@ +/* + * textbox.c -- implements the text box + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "dialog.h" + +static void back_lines(int n); +static void print_page(WINDOW *win, int height, int width, update_text_fn + update_text, void *data); +static void print_line(WINDOW *win, int row, int width); +static char *get_line(void); +static void print_position(WINDOW * win); + +static int hscroll; +static int begin_reached, end_reached, page_length; +static char *buf; +static char *page; + +/* + * refresh window content + */ +static void refresh_text_box(WINDOW *dialog, WINDOW *box, int boxh, int boxw, + int cur_y, int cur_x, update_text_fn update_text, + void *data) +{ + print_page(box, boxh, boxw, update_text, data); + print_position(dialog); + wmove(dialog, cur_y, cur_x); /* Restore cursor position */ + wrefresh(dialog); +} + + +/* + * Display text from a file in a dialog box. + * + * keys is a null-terminated array + * update_text() may not add or remove any '\n' or '\0' in tbuf + */ +int dialog_textbox(const char *title, char *tbuf, int initial_height, + int initial_width, int *keys, int *_vscroll, int *_hscroll, + update_text_fn update_text, void *data) +{ + int i, x, y, cur_x, cur_y, key = 0; + int height, width, boxh, boxw; + WINDOW *dialog, *box; + bool done = false; + + begin_reached = 1; + end_reached = 0; + page_length = 0; + hscroll = 0; + buf = tbuf; + page = buf; /* page is pointer to start of page to be displayed */ + + if (_vscroll && *_vscroll) { + begin_reached = 0; + + for (i = 0; i < *_vscroll; i++) + get_line(); + } + if (_hscroll) + hscroll = *_hscroll; + +do_resize: + getmaxyx(stdscr, height, width); + if (height < 8 || width < 8) + return -ERRDISPLAYTOOSMALL; + if (initial_height != 0) + height = initial_height; + else + if (height > 4) + height -= 4; + else + height = 0; + if (initial_width != 0) + width = initial_width; + else + if (width > 5) + width -= 5; + else + width = 0; + + /* center dialog box on screen */ + x = (COLS - width) / 2; + y = (LINES - height) / 2; + + draw_shadow(stdscr, y, x, height, width); + + dialog = newwin(height, width, y, x); + keypad(dialog, TRUE); + + /* Create window for box region, used for scrolling text */ + boxh = height - 4; + boxw = width - 2; + box = subwin(dialog, boxh, boxw, y + 1, x + 1); + wattrset(box, dlg.dialog.atr); + wbkgdset(box, dlg.dialog.atr & A_COLOR); + + keypad(box, TRUE); + + /* register the new window, along with its borders */ + draw_box(dialog, 0, 0, height, width, + dlg.dialog.atr, dlg.border.atr); + + wattrset(dialog, dlg.border.atr); + mvwaddch(dialog, height - 3, 0, ACS_LTEE); + for (i = 0; i < width - 2; i++) + waddch(dialog, ACS_HLINE); + wattrset(dialog, dlg.dialog.atr); + wbkgdset(dialog, dlg.dialog.atr & A_COLOR); + waddch(dialog, ACS_RTEE); + + print_title(dialog, title, width); + + print_button(dialog, gettext(" Exit "), height - 2, width / 2 - 4, TRUE); + wnoutrefresh(dialog); + getyx(dialog, cur_y, cur_x); /* Save cursor position */ + + /* Print first page of text */ + attr_clear(box, boxh, boxw, dlg.dialog.atr); + refresh_text_box(dialog, box, boxh, boxw, cur_y, cur_x, update_text, + data); + + while (!done) { + key = wgetch(dialog); + switch (key) { + case 'E': /* Exit */ + case 'e': + case 'X': + case 'x': + case 'q': + case '\n': + done = true; + break; + case 'g': /* First page */ + case KEY_HOME: + if (!begin_reached) { + begin_reached = 1; + page = buf; + refresh_text_box(dialog, box, boxh, boxw, + cur_y, cur_x, update_text, + data); + } + break; + case 'G': /* Last page */ + case KEY_END: + + end_reached = 1; + /* point to last char in buf */ + page = buf + strlen(buf); + back_lines(boxh); + refresh_text_box(dialog, box, boxh, boxw, cur_y, + cur_x, update_text, data); + break; + case 'K': /* Previous line */ + case 'k': + case KEY_UP: + if (begin_reached) + break; + + back_lines(page_length + 1); + refresh_text_box(dialog, box, boxh, boxw, cur_y, + cur_x, update_text, data); + break; + case 'B': /* Previous page */ + case 'b': + case 'u': + case KEY_PPAGE: + if (begin_reached) + break; + back_lines(page_length + boxh); + refresh_text_box(dialog, box, boxh, boxw, cur_y, + cur_x, update_text, data); + break; + case 'J': /* Next line */ + case 'j': + case KEY_DOWN: + if (end_reached) + break; + + back_lines(page_length - 1); + refresh_text_box(dialog, box, boxh, boxw, cur_y, + cur_x, update_text, data); + break; + case KEY_NPAGE: /* Next page */ + case ' ': + case 'd': + if (end_reached) + break; + + begin_reached = 0; + refresh_text_box(dialog, box, boxh, boxw, cur_y, + cur_x, update_text, data); + break; + case '0': /* Beginning of line */ + case 'H': /* Scroll left */ + case 'h': + case KEY_LEFT: + if (hscroll <= 0) + break; + + if (key == '0') + hscroll = 0; + else + hscroll--; + /* Reprint current page to scroll horizontally */ + back_lines(page_length); + refresh_text_box(dialog, box, boxh, boxw, cur_y, + cur_x, update_text, data); + break; + case 'L': /* Scroll right */ + case 'l': + case KEY_RIGHT: + if (hscroll >= MAX_LEN) + break; + hscroll++; + /* Reprint current page to scroll horizontally */ + back_lines(page_length); + refresh_text_box(dialog, box, boxh, boxw, cur_y, + cur_x, update_text, data); + break; + case KEY_ESC: + if (on_key_esc(dialog) == KEY_ESC) + done = true; + break; + case KEY_RESIZE: + back_lines(height); + delwin(box); + delwin(dialog); + on_key_resize(); + goto do_resize; + default: + for (i = 0; keys[i]; i++) { + if (key == keys[i]) { + done = true; + break; + } + } + } + } + delwin(box); + delwin(dialog); + if (_vscroll) { + const char *s; + + s = buf; + *_vscroll = 0; + back_lines(page_length); + while (s < page && (s = strchr(s, '\n'))) { + (*_vscroll)++; + s++; + } + } + if (_hscroll) + *_hscroll = hscroll; + return key; +} + +/* + * Go back 'n' lines in text. Called by dialog_textbox(). + * 'page' will be updated to point to the desired line in 'buf'. + */ +static void back_lines(int n) +{ + int i; + + begin_reached = 0; + /* Go back 'n' lines */ + for (i = 0; i < n; i++) { + if (*page == '\0') { + if (end_reached) { + end_reached = 0; + continue; + } + } + if (page == buf) { + begin_reached = 1; + return; + } + page--; + do { + if (page == buf) { + begin_reached = 1; + return; + } + page--; + } while (*page != '\n'); + page++; + } +} + +/* + * Print a new page of text. + */ +static void print_page(WINDOW *win, int height, int width, update_text_fn + update_text, void *data) +{ + int i, passed_end = 0; + + if (update_text) { + char *end; + + for (i = 0; i < height; i++) + get_line(); + end = page; + back_lines(height); + update_text(buf, page - buf, end - buf, data); + } + + page_length = 0; + for (i = 0; i < height; i++) { + print_line(win, i, width); + if (!passed_end) + page_length++; + if (end_reached && !passed_end) + passed_end = 1; + } + wnoutrefresh(win); +} + +/* + * Print a new line of text. + */ +static void print_line(WINDOW * win, int row, int width) +{ + char *line; + + line = get_line(); + line += MIN(strlen(line), hscroll); /* Scroll horizontally */ + wmove(win, row, 0); /* move cursor to correct line */ + waddch(win, ' '); + waddnstr(win, line, MIN(strlen(line), width - 2)); + + /* Clear 'residue' of previous line */ +#if OLD_NCURSES + { + int x = getcurx(win); + int i; + for (i = 0; i < width - x; i++) + waddch(win, ' '); + } +#else + wclrtoeol(win); +#endif +} + +/* + * Return current line of text. Called by dialog_textbox() and print_line(). + * 'page' should point to start of current line before calling, and will be + * updated to point to start of next line. + */ +static char *get_line(void) +{ + int i = 0; + static char line[MAX_LEN + 1]; + + end_reached = 0; + while (*page != '\n') { + if (*page == '\0') { + end_reached = 1; + break; + } else if (i < MAX_LEN) + line[i++] = *(page++); + else { + /* Truncate lines longer than MAX_LEN characters */ + if (i == MAX_LEN) + line[i++] = '\0'; + page++; + } + } + if (i <= MAX_LEN) + line[i] = '\0'; + if (!end_reached) + page++; /* move past '\n' */ + + return line; +} + +/* + * Print current position + */ +static void print_position(WINDOW * win) +{ + int percent; + + wattrset(win, dlg.position_indicator.atr); + wbkgdset(win, dlg.position_indicator.atr & A_COLOR); + percent = (page - buf) * 100 / strlen(buf); + wmove(win, getmaxy(win) - 3, getmaxx(win) - 9); + wprintw(win, "(%3d%%)", percent); +} diff --git a/support/kconfig/lxdialog/util.c b/support/kconfig/lxdialog/util.c new file mode 100644 index 0000000000..109d53117d --- /dev/null +++ b/support/kconfig/lxdialog/util.c @@ -0,0 +1,664 @@ +/* + * util.c + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include + +#include "dialog.h" + +/* Needed in signal handler in mconf.c */ +int saved_x, saved_y; + +struct dialog_info dlg; + +static void set_mono_theme(void) +{ + dlg.screen.atr = A_NORMAL; + dlg.shadow.atr = A_NORMAL; + dlg.dialog.atr = A_NORMAL; + dlg.title.atr = A_BOLD; + dlg.border.atr = A_NORMAL; + dlg.button_active.atr = A_REVERSE; + dlg.button_inactive.atr = A_DIM; + dlg.button_key_active.atr = A_REVERSE; + dlg.button_key_inactive.atr = A_BOLD; + dlg.button_label_active.atr = A_REVERSE; + dlg.button_label_inactive.atr = A_NORMAL; + dlg.inputbox.atr = A_NORMAL; + dlg.inputbox_border.atr = A_NORMAL; + dlg.searchbox.atr = A_NORMAL; + dlg.searchbox_title.atr = A_BOLD; + dlg.searchbox_border.atr = A_NORMAL; + dlg.position_indicator.atr = A_BOLD; + dlg.menubox.atr = A_NORMAL; + dlg.menubox_border.atr = A_NORMAL; + dlg.item.atr = A_NORMAL; + dlg.item_selected.atr = A_REVERSE; + dlg.tag.atr = A_BOLD; + dlg.tag_selected.atr = A_REVERSE; + dlg.tag_key.atr = A_BOLD; + dlg.tag_key_selected.atr = A_REVERSE; + dlg.check.atr = A_BOLD; + dlg.check_selected.atr = A_REVERSE; + dlg.uarrow.atr = A_BOLD; + dlg.darrow.atr = A_BOLD; +} + +#define DLG_COLOR(dialog, f, b, h) \ +do { \ + dlg.dialog.fg = (f); \ + dlg.dialog.bg = (b); \ + dlg.dialog.hl = (h); \ +} while (0) + +static void set_classic_theme(void) +{ + DLG_COLOR(screen, COLOR_CYAN, COLOR_BLUE, true); + DLG_COLOR(shadow, COLOR_BLACK, COLOR_BLACK, true); + DLG_COLOR(dialog, COLOR_BLACK, COLOR_WHITE, false); + DLG_COLOR(title, COLOR_YELLOW, COLOR_WHITE, true); + DLG_COLOR(border, COLOR_WHITE, COLOR_WHITE, true); + DLG_COLOR(button_active, COLOR_WHITE, COLOR_BLUE, true); + DLG_COLOR(button_inactive, COLOR_BLACK, COLOR_WHITE, false); + DLG_COLOR(button_key_active, COLOR_WHITE, COLOR_BLUE, true); + DLG_COLOR(button_key_inactive, COLOR_RED, COLOR_WHITE, false); + DLG_COLOR(button_label_active, COLOR_YELLOW, COLOR_BLUE, true); + DLG_COLOR(button_label_inactive, COLOR_BLACK, COLOR_WHITE, true); + DLG_COLOR(inputbox, COLOR_BLACK, COLOR_WHITE, false); + DLG_COLOR(inputbox_border, COLOR_BLACK, COLOR_WHITE, false); + DLG_COLOR(searchbox, COLOR_BLACK, COLOR_WHITE, false); + DLG_COLOR(searchbox_title, COLOR_YELLOW, COLOR_WHITE, true); + DLG_COLOR(searchbox_border, COLOR_WHITE, COLOR_WHITE, true); + DLG_COLOR(position_indicator, COLOR_YELLOW, COLOR_WHITE, true); + DLG_COLOR(menubox, COLOR_BLACK, COLOR_WHITE, false); + DLG_COLOR(menubox_border, COLOR_WHITE, COLOR_WHITE, true); + DLG_COLOR(item, COLOR_BLACK, COLOR_WHITE, false); + DLG_COLOR(item_selected, COLOR_WHITE, COLOR_BLUE, true); + DLG_COLOR(tag, COLOR_YELLOW, COLOR_WHITE, true); + DLG_COLOR(tag_selected, COLOR_YELLOW, COLOR_BLUE, true); + DLG_COLOR(tag_key, COLOR_YELLOW, COLOR_WHITE, true); + DLG_COLOR(tag_key_selected, COLOR_YELLOW, COLOR_BLUE, true); + DLG_COLOR(check, COLOR_BLACK, COLOR_WHITE, false); + DLG_COLOR(check_selected, COLOR_WHITE, COLOR_BLUE, true); + DLG_COLOR(uarrow, COLOR_GREEN, COLOR_WHITE, true); + DLG_COLOR(darrow, COLOR_GREEN, COLOR_WHITE, true); +} + +static void set_blackbg_theme(void) +{ + DLG_COLOR(screen, COLOR_RED, COLOR_BLACK, true); + DLG_COLOR(shadow, COLOR_BLACK, COLOR_BLACK, false); + DLG_COLOR(dialog, COLOR_WHITE, COLOR_BLACK, false); + DLG_COLOR(title, COLOR_RED, COLOR_BLACK, false); + DLG_COLOR(border, COLOR_BLACK, COLOR_BLACK, true); + + DLG_COLOR(button_active, COLOR_YELLOW, COLOR_RED, false); + DLG_COLOR(button_inactive, COLOR_YELLOW, COLOR_BLACK, false); + DLG_COLOR(button_key_active, COLOR_YELLOW, COLOR_RED, true); + DLG_COLOR(button_key_inactive, COLOR_RED, COLOR_BLACK, false); + DLG_COLOR(button_label_active, COLOR_WHITE, COLOR_RED, false); + DLG_COLOR(button_label_inactive, COLOR_BLACK, COLOR_BLACK, true); + + DLG_COLOR(inputbox, COLOR_YELLOW, COLOR_BLACK, false); + DLG_COLOR(inputbox_border, COLOR_YELLOW, COLOR_BLACK, false); + + DLG_COLOR(searchbox, COLOR_YELLOW, COLOR_BLACK, false); + DLG_COLOR(searchbox_title, COLOR_YELLOW, COLOR_BLACK, true); + DLG_COLOR(searchbox_border, COLOR_BLACK, COLOR_BLACK, true); + + DLG_COLOR(position_indicator, COLOR_RED, COLOR_BLACK, false); + + DLG_COLOR(menubox, COLOR_YELLOW, COLOR_BLACK, false); + DLG_COLOR(menubox_border, COLOR_BLACK, COLOR_BLACK, true); + + DLG_COLOR(item, COLOR_WHITE, COLOR_BLACK, false); + DLG_COLOR(item_selected, COLOR_WHITE, COLOR_RED, false); + + DLG_COLOR(tag, COLOR_RED, COLOR_BLACK, false); + DLG_COLOR(tag_selected, COLOR_YELLOW, COLOR_RED, true); + DLG_COLOR(tag_key, COLOR_RED, COLOR_BLACK, false); + DLG_COLOR(tag_key_selected, COLOR_YELLOW, COLOR_RED, true); + + DLG_COLOR(check, COLOR_YELLOW, COLOR_BLACK, false); + DLG_COLOR(check_selected, COLOR_YELLOW, COLOR_RED, true); + + DLG_COLOR(uarrow, COLOR_RED, COLOR_BLACK, false); + DLG_COLOR(darrow, COLOR_RED, COLOR_BLACK, false); +} + +static void set_bluetitle_theme(void) +{ + set_classic_theme(); + DLG_COLOR(title, COLOR_BLUE, COLOR_WHITE, true); + DLG_COLOR(button_key_active, COLOR_YELLOW, COLOR_BLUE, true); + DLG_COLOR(button_label_active, COLOR_WHITE, COLOR_BLUE, true); + DLG_COLOR(searchbox_title, COLOR_BLUE, COLOR_WHITE, true); + DLG_COLOR(position_indicator, COLOR_BLUE, COLOR_WHITE, true); + DLG_COLOR(tag, COLOR_BLUE, COLOR_WHITE, true); + DLG_COLOR(tag_key, COLOR_BLUE, COLOR_WHITE, true); + +} + +/* + * Select color theme + */ +static int set_theme(const char *theme) +{ + int use_color = 1; + if (!theme) + set_bluetitle_theme(); + else if (strcmp(theme, "classic") == 0) + set_classic_theme(); + else if (strcmp(theme, "bluetitle") == 0) + set_bluetitle_theme(); + else if (strcmp(theme, "blackbg") == 0) + set_blackbg_theme(); + else if (strcmp(theme, "mono") == 0) + use_color = 0; + + return use_color; +} + +static void init_one_color(struct dialog_color *color) +{ + static int pair = 0; + + pair++; + init_pair(pair, color->fg, color->bg); + if (color->hl) + color->atr = A_BOLD | COLOR_PAIR(pair); + else + color->atr = COLOR_PAIR(pair); +} + +static void init_dialog_colors(void) +{ + init_one_color(&dlg.screen); + init_one_color(&dlg.shadow); + init_one_color(&dlg.dialog); + init_one_color(&dlg.title); + init_one_color(&dlg.border); + init_one_color(&dlg.button_active); + init_one_color(&dlg.button_inactive); + init_one_color(&dlg.button_key_active); + init_one_color(&dlg.button_key_inactive); + init_one_color(&dlg.button_label_active); + init_one_color(&dlg.button_label_inactive); + init_one_color(&dlg.inputbox); + init_one_color(&dlg.inputbox_border); + init_one_color(&dlg.searchbox); + init_one_color(&dlg.searchbox_title); + init_one_color(&dlg.searchbox_border); + init_one_color(&dlg.position_indicator); + init_one_color(&dlg.menubox); + init_one_color(&dlg.menubox_border); + init_one_color(&dlg.item); + init_one_color(&dlg.item_selected); + init_one_color(&dlg.tag); + init_one_color(&dlg.tag_selected); + init_one_color(&dlg.tag_key); + init_one_color(&dlg.tag_key_selected); + init_one_color(&dlg.check); + init_one_color(&dlg.check_selected); + init_one_color(&dlg.uarrow); + init_one_color(&dlg.darrow); +} + +/* + * Setup for color display + */ +static void color_setup(const char *theme) +{ + int use_color; + + use_color = set_theme(theme); + if (use_color && has_colors()) { + start_color(); + init_dialog_colors(); + } else + set_mono_theme(); +} + +/* + * Set window to attribute 'attr' + */ +void attr_clear(WINDOW * win, int height, int width, chtype attr) +{ + int i, j; + + wattrset(win, attr); + for (i = 0; i < height; i++) { + wmove(win, i, 0); + for (j = 0; j < width; j++) + waddch(win, ' '); + } + touchwin(win); +} + +void dialog_clear(void) +{ + attr_clear(stdscr, LINES, COLS, dlg.screen.atr); + /* Display background title if it exists ... - SLH */ + if (dlg.backtitle != NULL) { + int i; + + wattrset(stdscr, dlg.screen.atr); + mvwaddstr(stdscr, 0, 1, (char *)dlg.backtitle); + wmove(stdscr, 1, 1); + for (i = 1; i < COLS - 1; i++) + waddch(stdscr, ACS_HLINE); + } + wnoutrefresh(stdscr); +} + +/* + * Do some initialization for dialog + */ +int init_dialog(const char *backtitle) +{ + int height, width; + + initscr(); /* Init curses */ + + /* Get current cursor position for signal handler in mconf.c */ + getyx(stdscr, saved_y, saved_x); + + getmaxyx(stdscr, height, width); + if (height < 19 || width < 80) { + endwin(); + return -ERRDISPLAYTOOSMALL; + } + + dlg.backtitle = backtitle; + color_setup(getenv("MENUCONFIG_COLOR")); + + keypad(stdscr, TRUE); + cbreak(); + noecho(); + dialog_clear(); + + return 0; +} + +void set_dialog_backtitle(const char *backtitle) +{ + dlg.backtitle = backtitle; +} + +/* + * End using dialog functions. + */ +void end_dialog(int x, int y) +{ + /* move cursor back to original position */ + move(y, x); + refresh(); + endwin(); +} + +/* Print the title of the dialog. Center the title and truncate + * tile if wider than dialog (- 2 chars). + **/ +void print_title(WINDOW *dialog, const char *title, int width) +{ + if (title) { + int tlen = MIN(width - 2, strlen(title)); + wattrset(dialog, dlg.title.atr); + mvwaddch(dialog, 0, (width - tlen) / 2 - 1, ' '); + mvwaddnstr(dialog, 0, (width - tlen)/2, title, tlen); + waddch(dialog, ' '); + } +} + +/* + * Print a string of text in a window, automatically wrap around to the + * next line if the string is too long to fit on one line. Newline + * characters '\n' are replaced by spaces. We start on a new line + * if there is no room for at least 4 nonblanks following a double-space. + */ +void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x) +{ + int newl, cur_x, cur_y; + int i, prompt_len, room, wlen; + char tempstr[MAX_LEN + 1], *word, *sp, *sp2; + + strcpy(tempstr, prompt); + + prompt_len = strlen(tempstr); + + /* + * Remove newlines + */ + for (i = 0; i < prompt_len; i++) { + if (tempstr[i] == '\n') + tempstr[i] = ' '; + } + + if (prompt_len <= width - x * 2) { /* If prompt is short */ + wmove(win, y, (width - prompt_len) / 2); + waddstr(win, tempstr); + } else { + cur_x = x; + cur_y = y; + newl = 1; + word = tempstr; + while (word && *word) { + sp = strchr(word, ' '); + if (sp) + *sp++ = 0; + + /* Wrap to next line if either the word does not fit, + or it is the first word of a new sentence, and it is + short, and the next word does not fit. */ + room = width - cur_x; + wlen = strlen(word); + if (wlen > room || + (newl && wlen < 4 && sp + && wlen + 1 + strlen(sp) > room + && (!(sp2 = strchr(sp, ' ')) + || wlen + 1 + (sp2 - sp) > room))) { + cur_y++; + cur_x = x; + } + wmove(win, cur_y, cur_x); + waddstr(win, word); + getyx(win, cur_y, cur_x); + cur_x++; + if (sp && *sp == ' ') { + cur_x++; /* double space */ + while (*++sp == ' ') ; + newl = 1; + } else + newl = 0; + word = sp; + } + } +} + +/* + * Print a button + */ +void print_button(WINDOW * win, const char *label, int y, int x, int selected) +{ + int i, temp; + + wmove(win, y, x); + wattrset(win, selected ? dlg.button_active.atr + : dlg.button_inactive.atr); + waddstr(win, "<"); + temp = strspn(label, " "); + label += temp; + wattrset(win, selected ? dlg.button_label_active.atr + : dlg.button_label_inactive.atr); + for (i = 0; i < temp; i++) + waddch(win, ' '); + wattrset(win, selected ? dlg.button_key_active.atr + : dlg.button_key_inactive.atr); + waddch(win, label[0]); + wattrset(win, selected ? dlg.button_label_active.atr + : dlg.button_label_inactive.atr); + waddstr(win, (char *)label + 1); + wattrset(win, selected ? dlg.button_active.atr + : dlg.button_inactive.atr); + waddstr(win, ">"); + wmove(win, y, x + temp + 1); +} + +/* + * Draw a rectangular box with line drawing characters + */ +void +draw_box(WINDOW * win, int y, int x, int height, int width, + chtype box, chtype border) +{ + int i, j; + + wattrset(win, 0); + for (i = 0; i < height; i++) { + wmove(win, y + i, x); + for (j = 0; j < width; j++) + if (!i && !j) + waddch(win, border | ACS_ULCORNER); + else if (i == height - 1 && !j) + waddch(win, border | ACS_LLCORNER); + else if (!i && j == width - 1) + waddch(win, box | ACS_URCORNER); + else if (i == height - 1 && j == width - 1) + waddch(win, box | ACS_LRCORNER); + else if (!i) + waddch(win, border | ACS_HLINE); + else if (i == height - 1) + waddch(win, box | ACS_HLINE); + else if (!j) + waddch(win, border | ACS_VLINE); + else if (j == width - 1) + waddch(win, box | ACS_VLINE); + else + waddch(win, box | ' '); + } +} + +/* + * Draw shadows along the right and bottom edge to give a more 3D look + * to the boxes + */ +void draw_shadow(WINDOW * win, int y, int x, int height, int width) +{ + int i; + + if (has_colors()) { /* Whether terminal supports color? */ + wattrset(win, dlg.shadow.atr); + wmove(win, y + height, x + 2); + for (i = 0; i < width; i++) + waddch(win, winch(win) & A_CHARTEXT); + for (i = y + 1; i < y + height + 1; i++) { + wmove(win, i, x + width); + waddch(win, winch(win) & A_CHARTEXT); + waddch(win, winch(win) & A_CHARTEXT); + } + wnoutrefresh(win); + } +} + +/* + * Return the position of the first alphabetic character in a string. + */ +int first_alpha(const char *string, const char *exempt) +{ + int i, in_paren = 0, c; + + for (i = 0; i < strlen(string); i++) { + c = tolower(string[i]); + + if (strchr("<[(", c)) + ++in_paren; + if (strchr(">])", c) && in_paren > 0) + --in_paren; + + if ((!in_paren) && isalpha(c) && strchr(exempt, c) == 0) + return i; + } + + return 0; +} + +/* + * ncurses uses ESC to detect escaped char sequences. This resutl in + * a small timeout before ESC is actually delivered to the application. + * lxdialog suggest which is correctly translated to two + * times esc. But then we need to ignore the second esc to avoid stepping + * out one menu too much. Filter away all escaped key sequences since + * keypad(FALSE) turn off ncurses support for escape sequences - and thats + * needed to make notimeout() do as expected. + */ +int on_key_esc(WINDOW *win) +{ + int key; + int key2; + int key3; + + nodelay(win, TRUE); + keypad(win, FALSE); + key = wgetch(win); + key2 = wgetch(win); + do { + key3 = wgetch(win); + } while (key3 != ERR); + nodelay(win, FALSE); + keypad(win, TRUE); + if (key == KEY_ESC && key2 == ERR) + return KEY_ESC; + else if (key != ERR && key != KEY_ESC && key2 == ERR) + ungetch(key); + + return -1; +} + +/* redraw screen in new size */ +int on_key_resize(void) +{ + dialog_clear(); + return KEY_RESIZE; +} + +struct dialog_list *item_cur; +struct dialog_list item_nil; +struct dialog_list *item_head; + +void item_reset(void) +{ + struct dialog_list *p, *next; + + for (p = item_head; p; p = next) { + next = p->next; + free(p); + } + item_head = NULL; + item_cur = &item_nil; +} + +void item_make(const char *fmt, ...) +{ + va_list ap; + struct dialog_list *p = malloc(sizeof(*p)); + + if (item_head) + item_cur->next = p; + else + item_head = p; + item_cur = p; + memset(p, 0, sizeof(*p)); + + va_start(ap, fmt); + vsnprintf(item_cur->node.str, sizeof(item_cur->node.str), fmt, ap); + va_end(ap); +} + +void item_add_str(const char *fmt, ...) +{ + va_list ap; + size_t avail; + + avail = sizeof(item_cur->node.str) - strlen(item_cur->node.str); + + va_start(ap, fmt); + vsnprintf(item_cur->node.str + strlen(item_cur->node.str), + avail, fmt, ap); + item_cur->node.str[sizeof(item_cur->node.str) - 1] = '\0'; + va_end(ap); +} + +void item_set_tag(char tag) +{ + item_cur->node.tag = tag; +} +void item_set_data(void *ptr) +{ + item_cur->node.data = ptr; +} + +void item_set_selected(int val) +{ + item_cur->node.selected = val; +} + +int item_activate_selected(void) +{ + item_foreach() + if (item_is_selected()) + return 1; + return 0; +} + +void *item_data(void) +{ + return item_cur->node.data; +} + +char item_tag(void) +{ + return item_cur->node.tag; +} + +int item_count(void) +{ + int n = 0; + struct dialog_list *p; + + for (p = item_head; p; p = p->next) + n++; + return n; +} + +void item_set(int n) +{ + int i = 0; + item_foreach() + if (i++ == n) + return; +} + +int item_n(void) +{ + int n = 0; + struct dialog_list *p; + + for (p = item_head; p; p = p->next) { + if (p == item_cur) + return n; + n++; + } + return 0; +} + +const char *item_str(void) +{ + return item_cur->node.str; +} + +int item_is_selected(void) +{ + return (item_cur->node.selected != 0); +} + +int item_is_tag(char tag) +{ + return (item_cur->node.tag == tag); +} diff --git a/package/config/lxdialog/yesno.c b/support/kconfig/lxdialog/yesno.c similarity index 100% rename from package/config/lxdialog/yesno.c rename to support/kconfig/lxdialog/yesno.c diff --git a/package/config/mconf.c b/support/kconfig/mconf.c similarity index 83% rename from package/config/mconf.c rename to support/kconfig/mconf.c index 3ed8a25300..fa61759aa9 100644 --- a/package/config/mconf.c +++ b/support/kconfig/mconf.c @@ -15,10 +15,10 @@ #include #include #include +#include #include #include -#define LKC_DIRECT_LINK #include "lkc.h" #include "lxdialog/dialog.h" @@ -105,10 +105,10 @@ static const char mconf_readme[] = N_( "Text Box (Help Window)\n" "--------\n" "o Use the cursor keys to scroll up/down/left/right. The VI editor\n" -" keys h,j,k,l function here as do and for those\n" -" who are familiar with less and lynx.\n" +" keys h,j,k,l function here as do , , and for \n" +" those who are familiar with less and lynx.\n" "\n" -"o Press , , or to exit.\n" +"o Press , , , or to exit.\n" "\n" "\n" "Alternate Configuration Files\n" @@ -236,16 +236,19 @@ search_help[] = N_( "Result:\n" "-----------------------------------------------------------------\n" "Symbol: FOO [=m]\n" + "Type : tristate\n" "Prompt: Foo bus is used to drive the bar HW\n" - "Defined at drivers/pci/Kconfig:47\n" - "Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n" - "Location:\n" - " -> Bus options (PCI, PCMCIA, EISA, MCA, ISA)\n" - " -> PCI support (PCI [=y])\n" - " -> PCI access mode ( [=y])\n" - "Selects: LIBCRC32\n" - "Selected by: BAR\n" + " Defined at drivers/pci/Kconfig:47\n" + " Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n" + " Location:\n" + " -> Bus options (PCI, PCMCIA, EISA, ISA)\n" + " -> PCI support (PCI [=y])\n" + "(1) -> PCI access mode ( [=y])\n" + " Selects: LIBCRC32\n" + " Selected by: BAR\n" "-----------------------------------------------------------------\n" + "o The line 'Type:' shows the type of the configuration option for\n" + " this symbol (boolean, tristate, string, ...)\n" "o The line 'Prompt:' shows the text used in the menu structure for\n" " this symbol\n" "o The 'Defined at' line tell at what file / line number the symbol\n" @@ -254,8 +257,12 @@ search_help[] = N_( " this symbol to be visible in the menu (selectable)\n" "o The 'Location:' lines tell where in the menu structure this symbol\n" " is located\n" - " A location followed by a [=y] indicate that this is a selectable\n" - " menu item - and current value is displayed inside brackets.\n" + " A location followed by a [=y] indicates that this is a\n" + " selectable menu item - and the current value is displayed inside\n" + " brackets.\n" + " Press the key in the (#) prefix to jump directly to that\n" + " location. You will be returned to the current search results\n" + " after exiting this new menu.\n" "o The 'Selects:' line tell what symbol will be automatically\n" " selected if this symbol is selected (y or m)\n" "o The 'Selected by' line tell what symbol has selected this symbol\n" @@ -273,12 +280,16 @@ static struct menu *current_menu; static int child_count; static int single_menu_mode; static int show_all_options; +static int save_and_exit; -static void conf(struct menu *menu); +static void conf(struct menu *menu, struct menu *active_menu); static void conf_choice(struct menu *menu); static void conf_string(struct menu *menu); static void conf_load(void); static void conf_save(void); +static int show_textbox_ext(const char *title, char *text, int r, int c, + int *keys, int *vscroll, int *hscroll, + update_text_fn update_text, void *data); static void show_textbox(const char *title, const char *text, int r, int c); static void show_helptext(const char *title, const char *text); static void show_help(struct menu *menu); @@ -301,17 +312,56 @@ static void set_config_filename(const char *config_filename) } +struct search_data { + struct list_head *head; + struct menu **targets; + int *keys; +}; + +static void update_text(char *buf, size_t start, size_t end, void *_data) +{ + struct search_data *data = _data; + struct jump_key *pos; + int k = 0; + + list_for_each_entry(pos, data->head, entries) { + if (pos->offset >= start && pos->offset < end) { + char header[4]; + + if (k < JUMP_NB) { + int key = '0' + (pos->index % JUMP_NB) + 1; + + sprintf(header, "(%c)", key); + data->keys[k] = key; + data->targets[k] = pos->target; + k++; + } else { + sprintf(header, " "); + } + + memcpy(buf + pos->offset, header, sizeof(header) - 1); + } + } + data->keys[k] = 0; +} + static void search_conf(void) { struct symbol **sym_arr; struct gstr res; + struct gstr title; char *dialog_input; - int dres; + int dres, vscroll = 0, hscroll = 0; + bool again; + + title = str_new(); + str_printf( &title, _("Enter %s (sub)string to search for " + "(with or without \"%s\")"), CONFIG_, CONFIG_); + again: dialog_clear(); dres = dialog_inputbox(_("Search Configuration Parameter"), - _("Enter " CONFIG_ " (sub)string to search for " - "(with or without \"" CONFIG_ "\")"), + str_get(&title), 10, 75, ""); switch (dres) { case 0: @@ -320,6 +370,7 @@ static void search_conf(void) show_helptext(_("Search Configuration"), search_help); goto again; default: + str_free(&title); return; } @@ -329,10 +380,31 @@ static void search_conf(void) dialog_input += strlen(CONFIG_); sym_arr = sym_re_search(dialog_input); - res = get_relations_str(sym_arr); + do { + LIST_HEAD(head); + struct menu *targets[JUMP_NB]; + int keys[JUMP_NB + 1], i; + struct search_data data = { + .head = &head, + .targets = targets, + .keys = keys, + }; + + res = get_relations_str(sym_arr, &head); + dres = show_textbox_ext(_("Search Results"), (char *) + str_get(&res), 0, 0, keys, &vscroll, + &hscroll, &update_text, (void *) + &data); + again = false; + for (i = 0; i < JUMP_NB && keys[i]; i++) + if (dres == keys[i]) { + conf(targets[i]->parent, targets[i]); + again = true; + } + str_free(&res); + } while (again); free(sym_arr); - show_textbox(_("Search Results"), str_get(&res), 0, 0); - str_free(&res); + str_free(&title); } static void build_conf(struct menu *menu) @@ -513,12 +585,11 @@ static void build_conf(struct menu *menu) indent -= doint; } -static void conf(struct menu *menu) +static void conf(struct menu *menu, struct menu *active_menu) { struct menu *submenu; const char *prompt = menu_get_prompt(menu); struct symbol *sym; - struct menu *active_menu = NULL; int res; int s_scroll = 0; @@ -528,14 +599,6 @@ static void conf(struct menu *menu) build_conf(menu); if (!child_count) break; - if (menu == &rootmenu) { - item_make("--- "); - item_set_tag(':'); - item_make(_(" Load an Alternate Configuration File")); - item_set_tag('L'); - item_make(_(" Save an Alternate Configuration File")); - item_set_tag('S'); - } dialog_clear(); res = dialog_menu(prompt ? _(prompt) : _("Main Menu"), _(menu_instructions), @@ -561,23 +624,17 @@ static void conf(struct menu *menu) if (single_menu_mode) submenu->data = (void *) (long) !submenu->data; else - conf(submenu); + conf(submenu, NULL); break; case 't': if (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes) conf_choice(submenu); else if (submenu->prompt->type == P_MENU) - conf(submenu); + conf(submenu, NULL); break; case 's': conf_string(submenu); break; - case 'L': - conf_load(); - break; - case 'S': - conf_save(); - break; } break; case 2: @@ -587,6 +644,12 @@ static void conf(struct menu *menu) show_helptext(_("README"), _(mconf_readme)); break; case 3: + conf_save(); + break; + case 4: + conf_load(); + break; + case 5: if (item_is_tag('t')) { if (sym_set_tristate_value(sym, yes)) break; @@ -594,34 +657,43 @@ static void conf(struct menu *menu) show_textbox(NULL, setmod_text, 6, 74); } break; - case 4: + case 6: if (item_is_tag('t')) sym_set_tristate_value(sym, no); break; - case 5: + case 7: if (item_is_tag('t')) sym_set_tristate_value(sym, mod); break; - case 6: + case 8: if (item_is_tag('t')) sym_toggle_tristate_value(sym); else if (item_is_tag('m')) - conf(submenu); + conf(submenu, NULL); break; - case 7: + case 9: search_conf(); break; - case 8: + case 10: show_all_options = !show_all_options; break; } } } -static void show_textbox(const char *title, const char *text, int r, int c) +static int show_textbox_ext(const char *title, char *text, int r, int c, int + *keys, int *vscroll, int *hscroll, update_text_fn + update_text, void *data) { dialog_clear(); - dialog_textbox(title, text, r, c); + return dialog_textbox(title, text, r, c, keys, vscroll, hscroll, + update_text, data); +} + +static void show_textbox(const char *title, const char *text, int r, int c) +{ + show_textbox_ext(title, (char *) text, r, c, (int []) {0}, NULL, NULL, + NULL, NULL); } static void show_helptext(const char *title, const char *text) @@ -629,6 +701,17 @@ static void show_helptext(const char *title, const char *text) show_textbox(title, text, 0, 0); } +static void conf_message_callback(const char *fmt, va_list ap) +{ + char buf[PATH_MAX+1]; + + vsnprintf(buf, sizeof(buf), fmt, ap); + if (save_and_exit) + printf("%s", buf); + else + show_textbox(NULL, buf, 6, 60); +} + static void show_help(struct menu *menu) { struct gstr help = str_new(); @@ -793,9 +876,57 @@ static void conf_save(void) } } +static int handle_exit(void) +{ + int res; + + save_and_exit = 1; + dialog_clear(); + if (conf_get_changed()) + res = dialog_yesno(NULL, + _("Do you wish to save your new configuration ?\n" + " to continue."), + 6, 60); + else + res = -1; + + end_dialog(saved_x, saved_y); + + switch (res) { + case 0: + if (conf_write(filename)) { + fprintf(stderr, _("\n\n" + "Error while writing of the configuration.\n" + "Your configuration changes were NOT saved." + "\n\n")); + return 1; + } + /* fall through */ + case -1: + printf(_("\n\n" + "*** End of the configuration.\n" + "*** Execute 'make' to start the build or try 'make help'." + "\n\n")); + res = 0; + break; + default: + fprintf(stderr, _("\n\n" + "Your configuration changes were NOT saved." + "\n\n")); + if (res != KEY_ESC) + res = 0; + } + + return res; +} + +static void sig_handler(int signo) +{ + exit(handle_exit()); +} + int main(int ac, char **av) { - int saved_x, saved_y; char *mode; int res; @@ -803,6 +934,8 @@ int main(int ac, char **av) bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); + signal(SIGINT, sig_handler); + conf_parse(av[1]); conf_read(NULL); @@ -812,9 +945,6 @@ int main(int ac, char **av) single_menu_mode = 1; } - initscr(); - - getyx(stdscr, saved_y, saved_x); if (init_dialog(NULL)) { fprintf(stderr, N_("Your display is too small to run Menuconfig!\n")); fprintf(stderr, N_("It must be at least 19 lines by 80 columns.\n")); @@ -822,41 +952,12 @@ int main(int ac, char **av) } set_config_filename(conf_get_configname()); + conf_set_message_callback(conf_message_callback); do { - conf(&rootmenu); - dialog_clear(); - if (conf_get_changed()) - res = dialog_yesno(NULL, - _("Do you wish to save your " - "new configuration?\n" - " to continue."), - 6, 60); - else - res = -1; + conf(&rootmenu, NULL); + res = handle_exit(); } while (res == KEY_ESC); - end_dialog(saved_x, saved_y); - - switch (res) { - case 0: - if (conf_write(filename)) { - fprintf(stderr, _("\n\n" - "Error while writing of the configuration.\n" - "Your configuration changes were NOT saved." - "\n\n")); - return 1; - } - case -1: - printf(_("\n\n" - "*** End of the configuration.\n" - "*** Execute 'make' to start the build or try 'make help'." - "\n\n")); - break; - default: - fprintf(stderr, _("\n\n" - "Your configuration changes were NOT saved." - "\n\n")); - } - return 0; + return res; } diff --git a/package/config/menu.c b/support/kconfig/menu.c similarity index 89% rename from package/config/menu.c rename to support/kconfig/menu.c index d49f8b8ff1..f3bffa3093 100644 --- a/package/config/menu.c +++ b/support/kconfig/menu.c @@ -3,14 +3,14 @@ * Released under the terms of the GNU GPL v2.0. */ +#include +#include #include #include -#define LKC_DIRECT_LINK #include "lkc.h" -static const char nohelp_text[] = N_( - "There is no help available for this option.\n"); +static const char nohelp_text[] = "There is no help available for this option."; struct menu rootmenu; static struct menu **last_entry_ptr; @@ -48,7 +48,7 @@ void menu_add_entry(struct symbol *sym) { struct menu *menu; - menu = malloc(sizeof(*menu)); + menu = xmalloc(sizeof(*menu)); memset(menu, 0, sizeof(*menu)); menu->sym = sym; menu->parent = current_menu; @@ -350,7 +350,7 @@ void menu_finalize(struct menu *parent) last_menu->next = NULL; } - sym->dir_dep.expr = parent->dep; + sym->dir_dep.expr = expr_alloc_or(sym->dir_dep.expr, parent->dep); } for (menu = parent->list; menu; menu = menu->next) { if (sym && sym_is_choice(sym) && @@ -507,10 +507,12 @@ const char *menu_get_help(struct menu *menu) return ""; } -static void get_prompt_str(struct gstr *r, struct property *prop) +static void get_prompt_str(struct gstr *r, struct property *prop, + struct list_head *head) { int i, j; - struct menu *submenu[8], *menu; + struct menu *submenu[8], *menu, *location = NULL; + struct jump_key *jump; str_printf(r, _("Prompt: %s\n"), _(prop->text)); str_printf(r, _(" Defined at %s:%d\n"), prop->menu->file->name, @@ -521,13 +523,44 @@ static void get_prompt_str(struct gstr *r, struct property *prop) str_append(r, "\n"); } menu = prop->menu->parent; - for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent) + for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent) { + bool accessible = menu_is_visible(menu); + submenu[i++] = menu; + if (location == NULL && accessible) + location = menu; + } + if (head && location) { + jump = xmalloc(sizeof(struct jump_key)); + + if (menu_is_visible(prop->menu)) { + /* + * There is not enough room to put the hint at the + * beginning of the "Prompt" line. Put the hint on the + * last "Location" line even when it would belong on + * the former. + */ + jump->target = prop->menu; + } else + jump->target = location; + + if (list_empty(head)) + jump->index = 0; + else + jump->index = list_entry(head->prev, struct jump_key, + entries)->index + 1; + + list_add_tail(&jump->entries, head); + } + if (i > 0) { str_printf(r, _(" Location:\n")); for (j = 4; --i >= 0; j += 2) { menu = submenu[i]; - str_printf(r, "%*c-> %s", j, ' ', _(menu_get_prompt(menu))); + if (head && location && menu == location) + jump->offset = r->len - 1; + str_printf(r, "%*c-> %s", j, ' ', + _(menu_get_prompt(menu))); if (menu->sym) { str_printf(r, " (%s [=%s])", menu->sym->name ? menu->sym->name : _(""), @@ -538,7 +571,11 @@ static void get_prompt_str(struct gstr *r, struct property *prop) } } -void get_symbol_str(struct gstr *r, struct symbol *sym) +/* + * head is optional and may be NULL + */ +void get_symbol_str(struct gstr *r, struct symbol *sym, + struct list_head *head) { bool hit; struct property *prop; @@ -557,7 +594,7 @@ void get_symbol_str(struct gstr *r, struct symbol *sym) } } for_all_prompts(sym, prop) - get_prompt_str(r, prop); + get_prompt_str(r, prop, head); hit = false; for_all_properties(sym, prop, P_SELECT) { if (!hit) { @@ -577,14 +614,14 @@ void get_symbol_str(struct gstr *r, struct symbol *sym) str_append(r, "\n\n"); } -struct gstr get_relations_str(struct symbol **sym_arr) +struct gstr get_relations_str(struct symbol **sym_arr, struct list_head *head) { struct symbol *sym; struct gstr res = str_new(); int i; for (i = 0; sym_arr && (sym = sym_arr[i]); i++) - get_symbol_str(&res, sym); + get_symbol_str(&res, sym, head); if (!i) str_append(&res, _("No matches found.\n")); return res; @@ -594,16 +631,14 @@ struct gstr get_relations_str(struct symbol **sym_arr) void menu_get_ext_help(struct menu *menu, struct gstr *help) { struct symbol *sym = menu->sym; + const char *help_text = nohelp_text; if (menu_has_help(menu)) { - if (sym->name) { - str_printf(help, "%s:\n\n", sym->name); - str_append(help, _(menu_get_help(menu))); - str_append(help, "\n"); - } - } else { - str_append(help, nohelp_text); + if (sym->name) + str_printf(help, "%s%s:\n\n", CONFIG_, sym->name); + help_text = menu_get_help(menu); } + str_printf(help, "%s\n", _(help_text)); if (sym) - get_symbol_str(help, sym); + get_symbol_str(help, sym, NULL); } diff --git a/support/kconfig/merge_config.sh b/support/kconfig/merge_config.sh new file mode 100755 index 0000000000..05274fccb8 --- /dev/null +++ b/support/kconfig/merge_config.sh @@ -0,0 +1,142 @@ +#!/bin/sh +# merge_config.sh - Takes a list of config fragment values, and merges +# them one by one. Provides warnings on overridden values, and specified +# values that did not make it to the resulting .config file (due to missed +# dependencies or config symbol removal). +# +# Portions reused from kconf_check and generate_cfg: +# http://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-tools/tree/tools/kconf_check +# http://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-tools/tree/tools/generate_cfg +# +# Copyright (c) 2009-2010 Wind River Systems, Inc. +# Copyright 2011 Linaro +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU General Public License for more details. + +clean_up() { + rm -f $TMP_FILE + exit +} +trap clean_up HUP INT TERM + +usage() { + echo "Usage: $0 [OPTIONS] [CONFIG [...]]" + echo " -h display this help text" + echo " -m only merge the fragments, do not execute the make command" + echo " -n use allnoconfig instead of alldefconfig" + echo " -r list redundant entries when merging fragments" + echo " -O dir to put generated output files" +} + +MAKE=true +ALLTARGET=alldefconfig +WARNREDUN=false +OUTPUT=. + +while true; do + case $1 in + "-n") + ALLTARGET=allnoconfig + shift + continue + ;; + "-m") + MAKE=false + shift + continue + ;; + "-h") + usage + exit + ;; + "-r") + WARNREDUN=true + shift + continue + ;; + "-O") + if [ -d $2 ];then + OUTPUT=$(echo $2 | sed 's/\/*$//') + else + echo "output directory $2 does not exist" 1>&2 + exit 1 + fi + shift 2 + continue + ;; + *) + break + ;; + esac +done + +INITFILE=$1 +shift; + +MERGE_LIST=$* +SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p" +TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX) + +echo "Using $INITFILE as base" +cat $INITFILE > $TMP_FILE + +# Merge files, printing warnings on overrided values +for MERGE_FILE in $MERGE_LIST ; do + echo "Merging $MERGE_FILE" + CFG_LIST=$(sed -n "$SED_CONFIG_EXP" $MERGE_FILE) + + for CFG in $CFG_LIST ; do + grep -q -w $CFG $TMP_FILE + if [ $? -eq 0 ] ; then + PREV_VAL=$(grep -w $CFG $TMP_FILE) + NEW_VAL=$(grep -w $CFG $MERGE_FILE) + if [ "x$PREV_VAL" != "x$NEW_VAL" ] ; then + echo Value of $CFG is redefined by fragment $MERGE_FILE: + echo Previous value: $PREV_VAL + echo New value: $NEW_VAL + echo + elif [ "$WARNREDUN" = "true" ]; then + echo Value of $CFG is redundant by fragment $MERGE_FILE: + fi + sed -i "/$CFG[ =]/d" $TMP_FILE + fi + done + cat $MERGE_FILE >> $TMP_FILE +done + +if [ "$MAKE" = "false" ]; then + cp $TMP_FILE $OUTPUT/.config + echo "#" + echo "# merged configuration written to $OUTPUT/.config (needs make)" + echo "#" + clean_up + exit +fi + +# Use the merged file as the starting point for: +# alldefconfig: Fills in any missing symbols with Kconfig default +# allnoconfig: Fills in any missing symbols with # CONFIG_* is not set +make KCONFIG_ALLCONFIG=$TMP_FILE O=$OUTPUT $ALLTARGET + + +# Check all specified config values took (might have missed-dependency issues) +for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do + + REQUESTED_VAL=$(grep -w -e "$CFG" $TMP_FILE) + ACTUAL_VAL=$(grep -w -e "$CFG" $OUTPUT/.config) + if [ "x$REQUESTED_VAL" != "x$ACTUAL_VAL" ] ; then + echo "Value requested for $CFG not in final .config" + echo "Requested value: $REQUESTED_VAL" + echo "Actual value: $ACTUAL_VAL" + echo "" + fi +done + +clean_up diff --git a/package/config/nconf.c b/support/kconfig/nconf.c similarity index 75% rename from package/config/nconf.c rename to support/kconfig/nconf.c index db56377393..dbf31edd22 100644 --- a/package/config/nconf.c +++ b/support/kconfig/nconf.c @@ -7,217 +7,208 @@ */ #define _GNU_SOURCE #include -#define LKC_DIRECT_LINK +#include + #include "lkc.h" #include "nconf.h" #include -static const char nconf_readme[] = N_( -"Overview\n" -"--------\n" -"This interface let you select features and parameters for the build.\n" -"Features can either be built-in, modularized, or ignored. Parameters\n" -"must be entered in as decimal or hexadecimal numbers or text.\n" -"\n" -"Menu items beginning with following braces represent features that\n" -" [ ] can be built in or removed\n" -" < > can be built in, modularized or removed\n" -" { } can be built in or modularized (selected by other feature)\n" -" - - are selected by other feature,\n" -" XXX cannot be selected. Use Symbol Info to find out why,\n" -"while *, M or whitespace inside braces means to build in, build as\n" -"a module or to exclude the feature respectively.\n" +static const char nconf_global_help[] = N_( +"Help windows\n" +"------------\n" +"o Global help: Unless in a data entry window, pressing will give \n" +" you the global help window, which you are just reading.\n" "\n" -"To change any of these features, highlight it with the cursor\n" -"keys and press to build it in, to make it a module or\n" -" to removed it. You may also press the to cycle\n" -"through the available options (ie. Y->N->M->Y).\n" +"o A short version of the global help is available by pressing .\n" "\n" -"Some additional keyboard hints:\n" +"o Local help: To get help related to the current menu entry, use any\n" +" of , or if in a data entry window then press .\n" "\n" -"Menus\n" -"----------\n" -"o Use the Up/Down arrow keys (cursor keys) to highlight the item\n" -" you wish to change use or . Goto submenu by \n" -" pressing of . Use or to go back.\n" -" Submenus are designated by \"--->\".\n" "\n" -" Searching: pressing '/' triggers interactive search mode.\n" -" nconfig performs a case insensitive search for the string\n" -" in the menu prompts (no regex support).\n" -" Pressing the up/down keys highlights the previous/next\n" -" matching item. Backspace removes one character from the\n" -" match string. Pressing either '/' again or ESC exits\n" -" search mode. All other keys behave normally.\n" +"Menu entries\n" +"------------\n" +"This interface lets you select features and parameters for the kernel\n" +"build. Kernel features can either be built-in, modularized, or removed.\n" +"Parameters must be entered as text or decimal or hexadecimal numbers.\n" "\n" -" You may also use the and keys to scroll\n" -" unseen options into view.\n" +"Menu entries beginning with following braces represent features that\n" +" [ ] can be built in or removed\n" +" < > can be built in, modularized or removed\n" +" { } can be built in or modularized, are selected by another feature\n" +" - - are selected by another feature\n" +" XXX cannot be selected. Symbol Info tells you why.\n" +"*, M or whitespace inside braces means to build in, build as a module\n" +"or to exclude the feature respectively.\n" "\n" -"o To exit a menu use the just press or .\n" +"To change any of these features, highlight it with the movement keys\n" +"listed below and press to build it in, to make it a module or\n" +" to remove it. You may press the key to cycle through the\n" +"available options.\n" "\n" -"o To get help with an item, press \n" -" Shortcut: Press or .\n" +"A trailing \"--->\" designates a submenu.\n" "\n" "\n" -"Radiolists (Choice lists)\n" -"-----------\n" -"o Use the cursor keys to select the option you wish to set and press\n" -" or the .\n" +"Menu navigation keys\n" +"----------------------------------------------------------------------\n" +"Linewise up \n" +"Linewise down \n" +"Pagewise up \n" +"Pagewise down \n" +"First entry \n" +"Last entry \n" +"Enter a submenu \n" +"Go back to parent menu \n" +"Close a help window \n" +"Close entry window, apply \n" +"Close entry window, forget \n" +"Start incremental, case-insensitive search for STRING in menu entries,\n" +" no regex support, STRING is displayed in upper left corner\n" +" STRING\n" +" Remove last character \n" +" Jump to next hit \n" +" Jump to previous hit \n" +"Exit menu search mode \n" +"Search for configuration variables with or without leading CONFIG_\n" +" RegExpr\n" +"Verbose search help \n" +"----------------------------------------------------------------------\n" "\n" -" Shortcut: Press the first letter of the option you wish to set then\n" -" press or .\n" +"Unless in a data entry window, key <1> may be used instead of ,\n" +"<2> instead of , etc.\n" "\n" -"o To see available help for the item, press \n" -" Shortcut: Press or .\n" "\n" +"Radiolist (Choice list)\n" +"-----------------------\n" +"Use the movement keys listed above to select the option you wish to set\n" +"and press .\n" "\n" -"Data Entry\n" -"-----------\n" -"o Enter the requested information and press \n" -" If you are entering hexadecimal values, it is not necessary to\n" -" add the '0x' prefix to the entry.\n" "\n" -"o For help, press .\n" +"Data entry\n" +"----------\n" +"Enter the requested information and press . Hexadecimal values\n" +"may be entered without the \"0x\" prefix.\n" "\n" "\n" -"Text Box (Help Window)\n" -"--------\n" -"o Use the cursor keys to scroll up/down/left/right. The VI editor\n" -" keys h,j,k,l function here as do for those\n" -" who are familiar with less and lynx.\n" +"Text Box (Help Window)\n" +"----------------------\n" +"Use movement keys as listed in table above.\n" "\n" -"o Press , , , or to exit.\n" +"Press any of to exit.\n" "\n" "\n" -"Alternate Configuration Files\n" +"Alternate configuration files\n" "-----------------------------\n" -"nconfig supports the use of alternate configuration files for\n" -"those who, for various reasons, find it necessary to switch\n" -"between different configurations.\n" +"nconfig supports switching between different configurations.\n" +"Press to save your current configuration. Press and enter\n" +"a file name to load a previously saved configuration.\n" "\n" -"At the end of the main menu you will find two options. One is\n" -"for saving the current configuration to a file of your choosing.\n" -"The other option is for loading a previously saved alternate\n" -"configuration.\n" "\n" -"Even if you don't use alternate configuration files, but you\n" -"find during a nconfig session that you have completely messed\n" -"up your settings, you may use the \"Load Alternate...\" option to\n" -"restore your previously saved settings from \".config\" without\n" -"restarting nconfig.\n" +"Terminal configuration\n" +"----------------------\n" +"If you use nconfig in a xterm window, make sure your TERM environment\n" +"variable specifies a terminal configuration which supports at least\n" +"16 colors. Otherwise nconfig will look rather bad.\n" "\n" -"Other information\n" -"-----------------\n" -"If you use nconfig in an XTERM window make sure you have your\n" -"$TERM variable set to point to a xterm definition which supports color.\n" -"Otherwise, nconfig will look rather bad. nconfig will not\n" -"display correctly in a RXVT window because rxvt displays only one\n" -"intensity of color, bright.\n" +"If the \"stty size\" command reports the current terminalsize correctly,\n" +"nconfig will adapt to sizes larger than the traditional 80x25 \"standard\"\n" +"and display longer menus properly.\n" "\n" -"nconfig will display larger menus on screens or xterms which are\n" -"set to display more than the standard 25 row by 80 column geometry.\n" -"In order for this to work, the \"stty size\" command must be able to\n" -"display the screen's current row and column geometry. I STRONGLY\n" -"RECOMMEND that you make sure you do NOT have the shell variables\n" -"LINES and COLUMNS exported into your environment. Some distributions\n" -"export those variables via /etc/profile. Some ncurses programs can\n" -"become confused when those variables (LINES & COLUMNS) don't reflect\n" -"the true screen size.\n" "\n" -"Optional personality available\n" -"------------------------------\n" -"If you prefer to have all of the options listed in a single menu, rather\n" -"than the default multimenu hierarchy, run the nconfig with NCONFIG_MODE\n" -"environment variable set to single_menu. Example:\n" +"Single menu mode\n" +"----------------\n" +"If you prefer to have all of the menu entries listed in a single menu,\n" +"rather than the default multimenu hierarchy, run nconfig with\n" +"NCONFIG_MODE environment variable set to single_menu. Example:\n" "\n" "make NCONFIG_MODE=single_menu nconfig\n" "\n" -" will then unroll the appropriate category, or enfold it if it\n" -"is already unrolled.\n" +" will then unfold the appropriate category, or fold it if it\n" +"is already unfolded. Folded menu entries will be designated by a\n" +"leading \"++>\" and unfolded entries by a leading \"-->\".\n" "\n" -"Note that this mode can eventually be a little more CPU expensive\n" -"(especially with a larger number of unrolled categories) than the\n" -"default mode.\n" +"Note that this mode can eventually be a little more CPU expensive than\n" +"the default mode, especially with a larger number of unfolded submenus.\n" "\n"), menu_no_f_instructions[] = N_( -" You do not have function keys support. Please follow the\n" -" following instructions:\n" -" Arrow keys navigate the menu.\n" -" or selects submenus --->.\n" -" Capital Letters are hotkeys.\n" -" Pressing includes, excludes, modularizes features.\n" -" Pressing SpaceBar toggles between the above options.\n" -" Press or to go back one menu,\n" -" or for Help, for Search.\n" -" <1> is interchangeable with , <2> with , etc.\n" -" Legend: [*] built-in [ ] excluded module < > module capable.\n" -" always leaves the current window.\n"), +"Legend: [*] built-in [ ] excluded module < > module capable.\n" +"Submenus are designated by a trailing \"--->\".\n" +"\n" +"Use the following keys to navigate the menus:\n" +"Move up or down with and .\n" +"Enter a submenu with or .\n" +"Exit a submenu to its parent menu with or .\n" +"Pressing includes, excludes, modularizes features.\n" +"Pressing cycles through the available options.\n" +"To search for menu entries press .\n" +" always leaves the current window.\n" +"\n" +"You do not have function keys support.\n" +"Press <1> instead of , <2> instead of , etc.\n" +"For verbose global help use key <1>.\n" +"For help related to the current menu entry press or .\n"), menu_instructions[] = N_( -" Arrow keys navigate the menu.\n" -" or selects submenus --->.\n" -" Capital Letters are hotkeys.\n" -" Pressing includes, excludes, modularizes features.\n" -" Pressing SpaceBar toggles between the above options\n" -" Press , or to go back one menu,\n" -" , or for Help, for Search.\n" -" <1> is interchangeable with , <2> with , etc.\n" -" Legend: [*] built-in [ ] excluded module < > module capable.\n" -" always leaves the current window\n"), +"Legend: [*] built-in [ ] excluded module < > module capable.\n" +"Submenus are designated by a trailing \"--->\".\n" +"\n" +"Use the following keys to navigate the menus:\n" +"Move up or down with or .\n" +"Enter a submenu with or .\n" +"Exit a submenu to its parent menu with or .\n" +"Pressing includes, excludes, modularizes features.\n" +"Pressing cycles through the available options.\n" +"To search for menu entries press .\n" +" always leaves the current window.\n" +"\n" +"Pressing <1> may be used instead of , <2> instead of , etc.\n" +"For verbose global help press .\n" +"For help related to the current menu entry press or .\n"), radiolist_instructions[] = N_( -" Use the arrow keys to navigate this window or\n" -" press the hotkey of the item you wish to select\n" -" followed by the .\n" -" Press , or for additional information about this option.\n"), +"Press , , or to navigate a radiolist, select\n" +"with .\n" +"For help related to the current entry press or .\n" +"For global help press .\n"), inputbox_instructions_int[] = N_( "Please enter a decimal value.\n" "Fractions will not be accepted.\n" -"Press to accept, to cancel."), +"Press to apply, to cancel."), inputbox_instructions_hex[] = N_( "Please enter a hexadecimal value.\n" -"Press to accept, to cancel."), +"Press to apply, to cancel."), inputbox_instructions_string[] = N_( "Please enter a string value.\n" -"Press to accept, to cancel."), +"Press to apply, to cancel."), setmod_text[] = N_( -"This feature depends on another which\n" -"has been configured as a module.\n" -"As a result, this feature will be built as a module."), -nohelp_text[] = N_( -"There is no help available for this option.\n"), +"This feature depends on another feature which has been configured as a\n" +"module. As a result, the current feature will be built as a module too."), load_config_text[] = N_( "Enter the name of the configuration file you wish to load.\n" -"Accept the name shown to restore the configuration you\n" -"last retrieved. Leave blank to abort."), +"Accept the name shown to restore the configuration you last\n" +"retrieved. Leave empty to abort."), load_config_help[] = N_( -"\n" "For various reasons, one may wish to keep several different\n" "configurations available on a single machine.\n" "\n" "If you have saved a previous configuration in a file other than the\n" -"default one, entering its name here will allow you to modify that\n" -"configuration.\n" +"default one, entering its name here will allow you to load and modify\n" +"that configuration.\n" "\n" -"If you are uncertain, then you have probably never used alternate\n" -"configuration files. You should therefor leave this blank to abort.\n"), +"Leave empty to abort.\n"), save_config_text[] = N_( "Enter a filename to which this configuration should be saved\n" -"as an alternate. Leave blank to abort."), +"as an alternate. Leave empty to abort."), save_config_help[] = N_( -"\n" -"For various reasons, one may wish to keep different configurations\n" -"available on a single machine.\n" +"For various reasons, one may wish to keep several different\n" +"configurations available on a single machine.\n" "\n" "Entering a file name here will allow you to later retrieve, modify\n" "and use the current configuration as an alternate to whatever\n" "configuration options you have selected at that time.\n" "\n" -"If you are uncertain what all this means then you should probably\n" -"leave this blank.\n"), +"Leave empty to abort.\n"), search_help[] = N_( -"\n" -"Search for symbols and display their relations. Regular expressions\n" -"are allowed.\n" -"Example: search for \"^FOO\"\n" +"Search for symbols (configuration variable names CONFIG_*) and display\n" +"their relations. Regular expressions are supported.\n" +"Example: Search for \"^FOO\".\n" "Result:\n" "-----------------------------------------------------------------\n" "Symbol: FOO [ = m]\n" @@ -225,32 +216,32 @@ search_help[] = N_( "Defined at drivers/pci/Kconfig:47\n" "Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n" "Location:\n" -" -> Bus options (PCI, PCMCIA, EISA, MCA, ISA)\n" +" -> Bus options (PCI, PCMCIA, EISA, ISA)\n" " -> PCI support (PCI [ = y])\n" " -> PCI access mode ( [ = y])\n" "Selects: LIBCRC32\n" "Selected by: BAR\n" "-----------------------------------------------------------------\n" -"o The line 'Prompt:' shows the text used in the menu structure for\n" -" this symbol\n" -"o The 'Defined at' line tell at what file / line number the symbol\n" -" is defined\n" -"o The 'Depends on:' line tell what symbols needs to be defined for\n" -" this symbol to be visible in the menu (selectable)\n" -"o The 'Location:' lines tell where in the menu structure this symbol\n" -" is located\n" -" A location followed by a [ = y] indicate that this is a selectable\n" -" menu item - and current value is displayed inside brackets.\n" -"o The 'Selects:' line tell what symbol will be automatically\n" -" selected if this symbol is selected (y or m)\n" -"o The 'Selected by' line tell what symbol has selected this symbol\n" +"o The line 'Prompt:' shows the text displayed for this symbol in\n" +" the menu hierarchy.\n" +"o The 'Defined at' line tells at what file / line number the symbol is\n" +" defined.\n" +"o The 'Depends on:' line lists symbols that need to be defined for\n" +" this symbol to be visible and selectable in the menu.\n" +"o The 'Location:' lines tell, where in the menu structure this symbol\n" +" is located. A location followed by a [ = y] indicates that this is\n" +" a selectable menu item, and the current value is displayed inside\n" +" brackets.\n" +"o The 'Selects:' line tells, what symbol will be automatically selected\n" +" if this symbol is selected (y or m).\n" +"o The 'Selected by' line tells what symbol has selected this symbol.\n" "\n" "Only relevant lines are shown.\n" "\n\n" "Search examples:\n" -"Examples: USB => find all symbols containing USB\n" -" ^USB => find all symbols starting with USB\n" -" USB$ => find all symbols ending with USB\n" +"USB => find all symbols containing USB\n" +"^USB => find all symbols starting with USB\n" +"USB$ => find all symbols ending with USB\n" "\n"); struct mitem { @@ -280,6 +271,9 @@ static int global_exit; /* the currently selected button */ const char *current_instructions = menu_instructions; +static char *dialog_input_result; +static int dialog_input_result_len; + static void conf(struct menu *menu); static void conf_choice(struct menu *menu); static void conf_string(struct menu *menu); @@ -318,19 +312,19 @@ struct function_keys function_keys[] = { }, { .key_str = "F2", - .func = "Sym Info", + .func = "SymInfo", .key = F_SYMBOL, .handler = handle_f2, }, { .key_str = "F3", - .func = "Insts", + .func = "Help 2", .key = F_INSTS, .handler = handle_f3, }, { .key_str = "F4", - .func = "Config", + .func = "ShowAll", .key = F_CONF, .handler = handle_f4, }, @@ -354,7 +348,7 @@ struct function_keys function_keys[] = { }, { .key_str = "F8", - .func = "Sym Search", + .func = "SymSearch", .key = F_SEARCH, .handler = handle_f8, }, @@ -373,25 +367,25 @@ static void print_function_line(void) const int skip = 1; for (i = 0; i < function_keys_num; i++) { - wattrset(main_window, attributes[FUNCTION_HIGHLIGHT]); + (void) wattrset(main_window, attributes[FUNCTION_HIGHLIGHT]); mvwprintw(main_window, LINES-3, offset, "%s", function_keys[i].key_str); - wattrset(main_window, attributes[FUNCTION_TEXT]); + (void) wattrset(main_window, attributes[FUNCTION_TEXT]); offset += strlen(function_keys[i].key_str); mvwprintw(main_window, LINES-3, offset, "%s", function_keys[i].func); offset += strlen(function_keys[i].func) + skip; } - wattrset(main_window, attributes[NORMAL]); + (void) wattrset(main_window, attributes[NORMAL]); } /* help */ static void handle_f1(int *key, struct menu *current_item) { show_scroll_win(main_window, - _("README"), _(nconf_readme)); + _("Global help"), _(nconf_global_help)); return; } @@ -406,7 +400,7 @@ static void handle_f2(int *key, struct menu *current_item) static void handle_f3(int *key, struct menu *current_item) { show_scroll_win(main_window, - _("Instructions"), + _("Short help"), _(current_instructions)); return; } @@ -695,15 +689,19 @@ static void search_conf(void) { struct symbol **sym_arr; struct gstr res; - char dialog_input_result[100]; + struct gstr title; char *dialog_input; int dres; + + title = str_new(); + str_printf( &title, _("Enter %s (sub)string to search for " + "(with or without \"%s\")"), CONFIG_, CONFIG_); + again: dres = dialog_inputbox(main_window, _("Search Configuration Parameter"), - _("Enter " CONFIG_ " (sub)string to search for " - "(with or without \"" CONFIG_ "\")"), - "", dialog_input_result, 99); + str_get(&title), + "", &dialog_input_result, &dialog_input_result_len); switch (dres) { case 0: break; @@ -712,6 +710,7 @@ static void search_conf(void) _("Search Configuration"), search_help); goto again; default: + str_free(&title); return; } @@ -721,11 +720,12 @@ static void search_conf(void) dialog_input += strlen(CONFIG_); sym_arr = sym_re_search(dialog_input); - res = get_relations_str(sym_arr); + res = get_relations_str(sym_arr, NULL); free(sym_arr); show_scroll_win(main_window, _("Search Results"), str_get(&res)); str_free(&res); + str_free(&title); } @@ -953,16 +953,16 @@ static void show_menu(const char *prompt, const char *instructions, current_instructions = instructions; clear(); - wattrset(main_window, attributes[NORMAL]); + (void) wattrset(main_window, attributes[NORMAL]); print_in_middle(stdscr, 1, 0, COLS, menu_backtitle, attributes[MAIN_HEADING]); - wattrset(main_window, attributes[MAIN_MENU_BOX]); + (void) wattrset(main_window, attributes[MAIN_MENU_BOX]); box(main_window, 0, 0); - wattrset(main_window, attributes[MAIN_MENU_HEADING]); + (void) wattrset(main_window, attributes[MAIN_MENU_HEADING]); mvwprintw(main_window, 0, 3, " %s ", prompt); - wattrset(main_window, attributes[NORMAL]); + (void) wattrset(main_window, attributes[NORMAL]); set_menu_items(curses_menu, curses_menu_items); @@ -1067,7 +1067,6 @@ static void conf(struct menu *menu) struct menu *submenu = 0; const char *prompt = menu_get_prompt(menu); struct symbol *sym; - struct menu *active_menu = NULL; int res; int current_index = 0; int last_top_row = 0; @@ -1152,13 +1151,9 @@ static void conf(struct menu *menu) continue; submenu = (struct menu *) item_data(); - active_menu = (struct menu *)item_data(); if (!submenu || !menu_is_visible(submenu)) continue; - if (submenu) - sym = submenu->sym; - else - sym = NULL; + sym = submenu->sym; switch (res) { case ' ': @@ -1222,20 +1217,13 @@ static void conf_message_callback(const char *fmt, va_list ap) static void show_help(struct menu *menu) { - struct gstr help = str_new(); - - if (menu && menu->sym && menu_has_help(menu)) { - if (menu->sym->name) { - str_printf(&help, "%s%s:\n\n", CONFIG_, menu->sym->name); - str_append(&help, _(menu_get_help(menu))); - str_append(&help, "\n"); - get_symbol_str(&help, menu->sym); - } else { - str_append(&help, _(menu_get_help(menu))); - } - } else { - str_append(&help, nohelp_text); - } + struct gstr help; + + if (!menu) + return; + + help = str_new(); + menu_get_ext_help(menu, &help); show_scroll_win(main_window, _(menu_get_prompt(menu)), str_get(&help)); str_free(&help); } @@ -1360,7 +1348,6 @@ static void conf_choice(struct menu *menu) static void conf_string(struct menu *menu) { const char *prompt = menu_get_prompt(menu); - char dialog_input_result[256]; while (1) { int res; @@ -1383,8 +1370,8 @@ static void conf_string(struct menu *menu) prompt ? _(prompt) : _("Main Menu"), heading, sym_get_string_value(menu->sym), - dialog_input_result, - sizeof(dialog_input_result)); + &dialog_input_result, + &dialog_input_result_len); switch (res) { case 0: if (sym_set_string_value(menu->sym, @@ -1404,14 +1391,13 @@ static void conf_string(struct menu *menu) static void conf_load(void) { - char dialog_input_result[256]; while (1) { int res; res = dialog_inputbox(main_window, NULL, load_config_text, filename, - dialog_input_result, - sizeof(dialog_input_result)); + &dialog_input_result, + &dialog_input_result_len); switch (res) { case 0: if (!dialog_input_result[0]) @@ -1436,14 +1422,13 @@ static void conf_load(void) static void conf_save(void) { - char dialog_input_result[256]; while (1) { int res; res = dialog_inputbox(main_window, NULL, save_config_text, filename, - dialog_input_result, - sizeof(dialog_input_result)); + &dialog_input_result, + &dialog_input_result_len); switch (res) { case 0: if (!dialog_input_result[0]) @@ -1518,7 +1503,11 @@ int main(int ac, char **av) } notimeout(stdscr, FALSE); +#if NCURSES_REENTRANT + set_escdelay(1); +#else ESCDELAY = 1; +#endif /* set btns menu */ curses_menu = new_menu(curses_menu_items); diff --git a/package/config/nconf.gui.c b/support/kconfig/nconf.gui.c similarity index 89% rename from package/config/nconf.gui.c rename to support/kconfig/nconf.gui.c index f8137b3a53..9f8c44ecc7 100644 --- a/package/config/nconf.gui.c +++ b/support/kconfig/nconf.gui.c @@ -48,7 +48,7 @@ static void set_normal_colors(void) init_pair(INPUT_FIELD, -1, -1); init_pair(FUNCTION_HIGHLIGHT, -1, -1); - init_pair(FUNCTION_TEXT, COLOR_BLUE, -1); + init_pair(FUNCTION_TEXT, COLOR_YELLOW, -1); } /* available attributes: @@ -356,7 +356,7 @@ int btn_dialog(WINDOW *main_window, const char *msg, int btn_num, ...) int dialog_inputbox(WINDOW *main_window, const char *title, const char *prompt, - const char *init, char *result, int result_len) + const char *init, char **resultp, int *result_len) { int prompt_lines = 0; int prompt_width = 0; @@ -367,7 +367,13 @@ int dialog_inputbox(WINDOW *main_window, int i, x, y; int res = -1; int cursor_position = strlen(init); + int cursor_form_win; + char *result = *resultp; + if (strlen(init)+1 > *result_len) { + *result_len = strlen(init)+1; + *resultp = result = realloc(result, *result_len); + } /* find the widest line of msg: */ prompt_lines = get_line_no(prompt); @@ -384,7 +390,7 @@ int dialog_inputbox(WINDOW *main_window, y = (LINES-(prompt_lines+4))/2; x = (COLS-(prompt_width+4))/2; - strncpy(result, init, result_len); + strncpy(result, init, *result_len); /* create the windows */ win = newwin(prompt_lines+6, prompt_width+7, y, x); @@ -405,7 +411,9 @@ int dialog_inputbox(WINDOW *main_window, fill_window(prompt_win, prompt); mvwprintw(form_win, 0, 0, "%*s", prompt_width, " "); - mvwprintw(form_win, 0, 0, "%s", result); + cursor_form_win = min(cursor_position, prompt_width-1); + mvwprintw(form_win, 0, 0, "%s", + result + cursor_position-cursor_form_win); /* create panels */ panel = new_panel(win); @@ -431,6 +439,8 @@ int dialog_inputbox(WINDOW *main_window, &result[cursor_position], len-cursor_position+1); cursor_position--; + cursor_form_win--; + len--; } break; case KEY_DC: @@ -438,38 +448,63 @@ int dialog_inputbox(WINDOW *main_window, memmove(&result[cursor_position], &result[cursor_position+1], len-cursor_position+1); + len--; } break; case KEY_UP: case KEY_RIGHT: - if (cursor_position < len && - cursor_position < min(result_len, prompt_width)) + if (cursor_position < len) { cursor_position++; + cursor_form_win++; + } break; case KEY_DOWN: case KEY_LEFT: - if (cursor_position > 0) + if (cursor_position > 0) { cursor_position--; + cursor_form_win--; + } + break; + case KEY_HOME: + cursor_position = 0; + cursor_form_win = 0; + break; + case KEY_END: + cursor_position = len; + cursor_form_win = min(cursor_position, prompt_width-1); break; default: - if ((isgraph(res) || isspace(res)) && - len-2 < result_len) { + if ((isgraph(res) || isspace(res))) { + /* one for new char, one for '\0' */ + if (len+2 > *result_len) { + *result_len = len+2; + *resultp = result = realloc(result, + *result_len); + } /* insert the char at the proper position */ memmove(&result[cursor_position+1], &result[cursor_position], - len+1); + len-cursor_position+1); result[cursor_position] = res; cursor_position++; + cursor_form_win++; + len++; } else { - mvprintw(0, 0, "unknow key: %d\n", res); + mvprintw(0, 0, "unknown key: %d\n", res); } break; } + if (cursor_form_win < 0) + cursor_form_win = 0; + else if (cursor_form_win > prompt_width-1) + cursor_form_win = prompt_width-1; + wmove(form_win, 0, 0); wclrtoeol(form_win); mvwprintw(form_win, 0, 0, "%*s", prompt_width, " "); - mvwprintw(form_win, 0, 0, "%s", result); - wmove(form_win, 0, cursor_position); + mvwprintw(form_win, 0, 0, "%s", + result + cursor_position-cursor_form_win); + wmove(form_win, 0, cursor_form_win); touchwin(win); refresh_all_windows(main_window); @@ -569,9 +604,11 @@ void show_scroll_win(WINDOW *main_window, switch (res) { case KEY_NPAGE: case ' ': + case 'd': start_y += text_lines-2; break; case KEY_PPAGE: + case 'u': start_y -= text_lines+2; break; case KEY_HOME: @@ -597,10 +634,10 @@ void show_scroll_win(WINDOW *main_window, start_x++; break; } - if (res == 10 || res == 27 || res == 'q' - || res == KEY_F(F_BACK) || res == KEY_F(F_EXIT)) { + if (res == 10 || res == 27 || res == 'q' || + res == KEY_F(F_HELP) || res == KEY_F(F_BACK) || + res == KEY_F(F_EXIT)) break; - } if (start_y < 0) start_y = 0; if (start_y >= total_lines-text_lines) diff --git a/package/config/nconf.h b/support/kconfig/nconf.h similarity index 97% rename from package/config/nconf.h rename to support/kconfig/nconf.h index 58fbda8fc0..0d5261705e 100644 --- a/package/config/nconf.h +++ b/support/kconfig/nconf.h @@ -89,7 +89,7 @@ void fill_window(WINDOW *win, const char *text); int btn_dialog(WINDOW *main_window, const char *msg, int btn_num, ...); int dialog_inputbox(WINDOW *main_window, const char *title, const char *prompt, - const char *init, char *result, int result_len); + const char *init, char **resultp, int *result_len); void refresh_all_windows(WINDOW *main_window); void show_scroll_win(WINDOW *main_window, const char *title, diff --git a/support/kconfig/patches/01-kconfig-kernel-to-buildroot.patch b/support/kconfig/patches/01-kconfig-kernel-to-buildroot.patch new file mode 100644 index 0000000000..d7206a0040 --- /dev/null +++ b/support/kconfig/patches/01-kconfig-kernel-to-buildroot.patch @@ -0,0 +1,85 @@ +--- + confdata.c | 4 ++-- + gconf.glade | 2 +- + mconf.c | 4 ++-- + zconf.tab.c_shipped | 2 +- + zconf.y | 2 +- + 5 files changed, 7 insertions(+), 7 deletions(-) + +Index: b/gconf.glade +=================================================================== +--- a/gconf.glade ++++ b/gconf.glade +@@ -4,7 +4,7 @@ + + + True +- Gtk Kernel Configurator ++ Gtk Buildroot Configurator + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False +Index: b/mconf.c +=================================================================== +--- a/mconf.c ++++ b/mconf.c +@@ -178,9 +178,9 @@ + "Arrow keys navigate the menu. " + " selects submenus --->. " + "Highlighted letters are hotkeys. " +- "Pressing includes, excludes, modularizes features. " ++ "Pressing selectes a feature, while will exclude a feature. " + "Press to exit, for Help, for Search. " +- "Legend: [*] built-in [ ] excluded module < > module capable"), ++ "Legend: [*] feature is selected [ ] feature is excluded"), + radiolist_instructions[] = N_( + "Use the arrow keys to navigate this window or " + "press the hotkey of the item you wish to select " +Index: b/zconf.tab.c_shipped +=================================================================== +--- a/zconf.tab.c_shipped ++++ b/zconf.tab.c_shipped +@@ -2259,7 +2259,7 @@ + modules_sym = sym_lookup(NULL, 0); + modules_sym->type = S_BOOLEAN; + modules_sym->flags |= SYMBOL_AUTO; +- rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); ++ rootmenu.prompt = menu_add_prompt(P_MENU, "Buildroot Configuration", NULL); + + if (getenv("ZCONF_DEBUG")) + zconfdebug = 1; +Index: b/zconf.y +=================================================================== +--- a/zconf.y ++++ b/zconf.y +@@ -496,7 +496,7 @@ + modules_sym = sym_lookup(NULL, 0); + modules_sym->type = S_BOOLEAN; + modules_sym->flags |= SYMBOL_AUTO; +- rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); ++ rootmenu.prompt = menu_add_prompt(P_MENU, "Buildroot Configuration", NULL); + + if (getenv("ZCONF_DEBUG")) + zconfdebug = 1; +Index: b/confdata.c +=================================================================== +--- a/confdata.c ++++ b/confdata.c +@@ -25,7 +26,7 @@ + static const char *conf_filename; + static int conf_lineno, conf_warnings, conf_unsaved; + +-const char conf_defname[] = "arch/$ARCH/defconfig"; ++const char conf_defname[] = ".defconfig"; + + static void conf_warning(const char *fmt, ...) + { +@@ -63,7 +64,7 @@ + + const char *conf_get_configname(void) + { +- char *name = getenv("KCONFIG_CONFIG"); ++ char *name = getenv("BUILDROOT_CONFIG"); + + return name ? name : ".config"; + } diff --git a/package/config/patches/02-cpp-comments-to-c-comments.patch b/support/kconfig/patches/02-cpp-comments-to-c-comments.patch similarity index 95% rename from package/config/patches/02-cpp-comments-to-c-comments.patch rename to support/kconfig/patches/02-cpp-comments-to-c-comments.patch index cb27056adf..72afa84ff9 100644 --- a/package/config/patches/02-cpp-comments-to-c-comments.patch +++ b/support/kconfig/patches/02-cpp-comments-to-c-comments.patch @@ -2,11 +2,11 @@ expr.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) -Index: config/expr.c +Index: b/expr.c =================================================================== ---- config.orig/expr.c -+++ config/expr.c -@@ -331,7 +331,7 @@ +--- a/expr.c ++++ b/expr.c +@@ -326,7 +326,7 @@ e->right.expr = expr_trans_bool(e->right.expr); break; case E_UNEQUAL: @@ -15,7 +15,7 @@ Index: config/expr.c if (e->left.sym->type == S_TRISTATE) { if (e->right.sym == &symbol_no) { e->type = E_SYMBOL; -@@ -380,19 +380,19 @@ +@@ -375,19 +375,19 @@ if (e1->type == E_EQUAL && e2->type == E_EQUAL && ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) || (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes))) { @@ -38,7 +38,7 @@ Index: config/expr.c return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_yes); } } -@@ -443,29 +443,29 @@ +@@ -438,29 +438,29 @@ if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_yes) || (e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_yes)) @@ -73,7 +73,7 @@ Index: config/expr.c sym2 = e2->right.sym; if ((e1->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST)) return sym2 != e1->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2) -@@ -474,19 +474,19 @@ +@@ -469,19 +469,19 @@ if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL && ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) || (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes))) @@ -96,7 +96,7 @@ Index: config/expr.c return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes); if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_mod) || -@@ -579,7 +579,7 @@ +@@ -574,7 +574,7 @@ switch (e1->type) { case E_OR: expr_eliminate_dups2(e1->type, &e1, &e1); @@ -105,7 +105,7 @@ Index: config/expr.c tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1))); tmp2 = expr_copy(e2); tmp = expr_extract_eq_and(&tmp1, &tmp2); -@@ -594,7 +594,7 @@ +@@ -589,7 +589,7 @@ break; case E_AND: expr_eliminate_dups2(e1->type, &e1, &e1); @@ -114,7 +114,7 @@ Index: config/expr.c tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1))); tmp2 = expr_copy(e2); tmp = expr_extract_eq_or(&tmp1, &tmp2); -@@ -703,7 +703,7 @@ +@@ -698,7 +698,7 @@ case E_NOT: switch (e->left.expr->type) { case E_NOT: @@ -123,7 +123,7 @@ Index: config/expr.c tmp = e->left.expr->left.expr; free(e->left.expr); free(e); -@@ -712,14 +712,14 @@ +@@ -707,14 +707,14 @@ break; case E_EQUAL: case E_UNEQUAL: @@ -140,7 +140,7 @@ Index: config/expr.c tmp = e->left.expr; e->type = E_AND; e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr); -@@ -728,7 +728,7 @@ +@@ -723,7 +723,7 @@ e = expr_transform(e); break; case E_AND: @@ -149,7 +149,7 @@ Index: config/expr.c tmp = e->left.expr; e->type = E_OR; e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr); -@@ -738,7 +738,7 @@ +@@ -733,7 +733,7 @@ break; case E_SYMBOL: if (e->left.expr->left.sym == &symbol_yes) { @@ -158,7 +158,7 @@ Index: config/expr.c tmp = e->left.expr; free(e); e = tmp; -@@ -747,7 +747,7 @@ +@@ -742,7 +742,7 @@ break; } if (e->left.expr->left.sym == &symbol_mod) { @@ -167,7 +167,7 @@ Index: config/expr.c tmp = e->left.expr; free(e); e = tmp; -@@ -756,7 +756,7 @@ +@@ -751,7 +751,7 @@ break; } if (e->left.expr->left.sym == &symbol_no) { diff --git a/support/kconfig/patches/06-br-build-system-integration.patch b/support/kconfig/patches/06-br-build-system-integration.patch new file mode 100644 index 0000000000..3faa39ed63 --- /dev/null +++ b/support/kconfig/patches/06-br-build-system-integration.patch @@ -0,0 +1,35 @@ +--- + Makefile | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +Index: b/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -159,11 +159,11 @@ + + hostprogs-y := conf + +-ifeq ($(MAKECMDGOALS),nconfig) ++ifeq ($(MAKECMDGOALS),nconf) + hostprogs-y += nconf + endif + +-ifeq ($(MAKECMDGOALS),menuconfig) ++ifeq ($(MAKECMDGOALS),mconf) + hostprogs-y += mconf + endif + +@@ -171,10 +171,10 @@ + hostprogs-y += kxgettext + endif + +-ifeq ($(MAKECMDGOALS),xconfig) ++ifeq ($(MAKECMDGOALS),qconf) + qconf-target := 1 + endif +-ifeq ($(MAKECMDGOALS),gconfig) ++ifeq ($(MAKECMDGOALS),gconf) + gconf-target := 1 + endif + diff --git a/package/config/patches/09-implement-kconfig-probability.patch b/support/kconfig/patches/09-implement-kconfig-probability.patch similarity index 89% rename from package/config/patches/09-implement-kconfig-probability.patch rename to support/kconfig/patches/09-implement-kconfig-probability.patch index 3f09673b81..45fa2513a1 100644 --- a/package/config/patches/09-implement-kconfig-probability.patch +++ b/support/kconfig/patches/09-implement-kconfig-probability.patch @@ -2,11 +2,11 @@ confdata.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) -Index: config/confdata.c +Index: b/confdata.c =================================================================== ---- config.orig/confdata.c -+++ config/confdata.c -@@ -996,7 +996,16 @@ +--- a/confdata.c ++++ b/confdata.c +@@ -1106,7 +1106,16 @@ void conf_set_all_new_symbols(enum conf_def_mode mode) { struct symbol *sym, *csym; @@ -24,7 +24,7 @@ Index: config/confdata.c for_all_symbols(i, sym) { if (sym_has_value(sym)) -@@ -1015,8 +1024,15 @@ +@@ -1125,8 +1134,15 @@ sym->def[S_DEF_USER].tri = no; break; case def_random: diff --git a/package/config/patches/10-br-build-system.patch b/support/kconfig/patches/10-br-build-system.patch similarity index 91% rename from package/config/patches/10-br-build-system.patch rename to support/kconfig/patches/10-br-build-system.patch index 85125e519f..be6fda07af 100644 --- a/package/config/patches/10-br-build-system.patch +++ b/support/kconfig/patches/10-br-build-system.patch @@ -3,10 +3,10 @@ foo.h | 12 ++++++++++++ 2 files changed, 65 insertions(+) -Index: config/Makefile.br +Index: b/Makefile.br =================================================================== --- /dev/null -+++ config/Makefile.br ++++ b/Makefile.br @@ -0,0 +1,53 @@ +src := . +top_srcdir=../../ @@ -29,13 +29,13 @@ Index: config/Makefile.br +host-cobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-objs)))) +host-cxxobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-cxxobjs)))) + -+HOST_EXTRACFLAGS += -I$(obj) ++HOST_EXTRACFLAGS += -I$(obj) -DCONFIG_=\"\" + +$(host-csingle): %: %.c -+ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $< $(HOST_LOADLIBES) -o $(obj)/$@ ++ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $< -o $(obj)/$@ + +$(host-cmulti): %: $(host-cobjs) $(host-cshlib) -+ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs)) $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@ ++ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@ + +$(host-cxxmulti): %: $(host-cxxobjs) $(host-cobjs) $(host-cshlib) + $(HOSTCXX) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs) $($(@F)-cxxobjs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@ @@ -61,10 +61,10 @@ Index: config/Makefile.br + +FORCE: +.PHONY: FORCE clean distclean -Index: config/foo.h +Index: b/foo.h =================================================================== --- /dev/null -+++ config/foo.h ++++ b/foo.h @@ -0,0 +1,12 @@ +#ifndef __KCONFIG_FOO_H +#define __KCONFIG_FOO_H diff --git a/support/kconfig/patches/11-use-mktemp-for-lxdialog.patch b/support/kconfig/patches/11-use-mktemp-for-lxdialog.patch new file mode 100644 index 0000000000..1e0c80396a --- /dev/null +++ b/support/kconfig/patches/11-use-mktemp-for-lxdialog.patch @@ -0,0 +1,17 @@ +--- + lxdialog/check-lxdialog.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: b/lxdialog/check-lxdialog.sh +=================================================================== +--- a/lxdialog/check-lxdialog.sh ++++ b/lxdialog/check-lxdialog.sh +@@ -34,7 +34,7 @@ + } + + # Temp file, try to clean up after us +-tmp=.lxdialog.tmp ++tmp=$(mktemp) + trap "rm -f $tmp" 0 1 2 3 15 + + # Check if we can link to ncurses diff --git a/support/kconfig/patches/12-fix-glade-file-path.patch b/support/kconfig/patches/12-fix-glade-file-path.patch new file mode 100644 index 0000000000..a5777da3e9 --- /dev/null +++ b/support/kconfig/patches/12-fix-glade-file-path.patch @@ -0,0 +1,17 @@ +--- + gconf.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: b/gconf.c +=================================================================== +--- a/gconf.c ++++ b/gconf.c +@@ -1486,7 +1486,7 @@ + /* Determine GUI path */ + env = getenv(SRCTREE); + if (env) +- glade_file = g_strconcat(env, "/scripts/kconfig/gconf.glade", NULL); ++ glade_file = g_strconcat(env, "/support/kconfig/gconf.glade", NULL); + else if (av[0][0] == '/') + glade_file = g_strconcat(av[0], ".glade", NULL); + else diff --git a/package/config/patches/14-support-out-of-tree-config.patch b/support/kconfig/patches/14-support-out-of-tree-config.patch similarity index 87% rename from package/config/patches/14-support-out-of-tree-config.patch rename to support/kconfig/patches/14-support-out-of-tree-config.patch index 9fa6384d31..e764fb26b7 100644 --- a/package/config/patches/14-support-out-of-tree-config.patch +++ b/support/kconfig/patches/14-support-out-of-tree-config.patch @@ -4,11 +4,11 @@ util.c | 16 +++++++++++++-- 3 files changed, 61 insertions(+), 18 deletions(-) -Index: config/conf.c +Index: b/conf.c =================================================================== ---- config.orig/conf.c -+++ config/conf.c -@@ -503,7 +503,6 @@ +--- a/conf.c ++++ b/conf.c +@@ -547,7 +547,6 @@ } name = av[optind]; conf_parse(name); @@ -16,11 +16,19 @@ Index: config/conf.c if (sync_kconfig) { name = conf_get_configname(); if (stat(name, &tmpstat)) { -Index: config/confdata.c +Index: b/confdata.c =================================================================== ---- config.orig/confdata.c -+++ config/confdata.c -@@ -71,9 +71,7 @@ +--- a/confdata.c ++++ b/confdata.c +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #include "lkc.h" + +@@ -70,9 +71,7 @@ const char *conf_get_autoconfig_name(void) { @@ -31,8 +39,8 @@ Index: config/confdata.c } static char *conf_expand_value(const char *in) -@@ -565,6 +563,9 @@ - int use_timestamp = 1; +@@ -737,6 +736,9 @@ + char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1]; char *env; + if (!name) @@ -41,7 +49,7 @@ Index: config/confdata.c dirname[0] = 0; if (name && name[0]) { struct stat st; -@@ -671,6 +672,7 @@ +@@ -831,6 +833,7 @@ { const char *name; char path[PATH_MAX+1]; @@ -49,7 +57,7 @@ Index: config/confdata.c char *s, *d, c; struct symbol *sym; struct stat sb; -@@ -679,8 +681,20 @@ +@@ -839,8 +842,20 @@ name = conf_get_autoconfig_name(); conf_read_simple(name, S_DEF_AUTO); @@ -72,7 +80,7 @@ Index: config/confdata.c res = 0; for_all_symbols(i, sym) { -@@ -773,9 +787,11 @@ +@@ -933,9 +948,11 @@ close(fd); } out: @@ -87,9 +95,9 @@ Index: config/confdata.c return res; } -@@ -787,25 +803,38 @@ +@@ -945,25 +962,38 @@ + const char *name; FILE *out, *tristate, *out_h; - time_t now; int i; + char dir[PATH_MAX+1], buf[PATH_MAX+1]; + char *s; @@ -130,7 +138,7 @@ Index: config/confdata.c if (!out_h) { fclose(out); fclose(tristate); -@@ -885,19 +914,22 @@ +@@ -995,19 +1025,22 @@ name = getenv("KCONFIG_AUTOHEADER"); if (!name) name = "include/generated/autoconf.h"; @@ -156,11 +164,11 @@ Index: config/confdata.c return 1; return 0; -Index: config/util.c +Index: b/util.c =================================================================== ---- config.orig/util.c -+++ config/util.c -@@ -147,6 +147,8 @@ +--- a/util.c ++++ b/util.c +@@ -34,6 +34,8 @@ /* write a dependency file as used by kbuild to track dependencies */ int file_write_dep(const char *name) { @@ -169,7 +177,7 @@ Index: config/util.c struct symbol *sym, *env_sym; struct expr *e; struct file *file; -@@ -154,7 +156,16 @@ +@@ -41,7 +43,16 @@ if (!name) name = ".kconfig.d"; @@ -187,13 +195,13 @@ Index: config/util.c if (!out) return 1; fprintf(out, "deps_config := \\\n"); -@@ -185,7 +196,8 @@ +@@ -72,7 +83,8 @@ fprintf(out, "\n$(deps_config): ;\n"); fclose(out); - rename("..config.tmp", name); + sprintf(buf2, "%s%s", dir, name); + rename(buf, buf2); - return write_make_deps(NULL); + return 0; } diff --git a/support/kconfig/patches/15-fix-qconf-moc-rule.patch b/support/kconfig/patches/15-fix-qconf-moc-rule.patch new file mode 100644 index 0000000000..eae978ebf1 --- /dev/null +++ b/support/kconfig/patches/15-fix-qconf-moc-rule.patch @@ -0,0 +1,24 @@ +Fix the rule that generates the .moc file + +The Linux kernel has a "cmd" make function, but we don't have it in +Buildroot, so we need to adjust this rule. + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -307,11 +307,8 @@ + + $(obj)/qconf.o: $(obj)/qconf.moc + +-quiet_cmd_moc = MOC $@ +- cmd_moc = $(KC_QT_MOC) -i $< -o $@ +- + $(obj)/%.moc: $(src)/%.h $(obj)/.tmp_qtcheck +- $(call cmd,moc) ++ $(KC_QT_MOC) -i $< -o $@ + + # Extract gconf menu items for I18N support + $(obj)/gconf.glade.h: $(obj)/gconf.glade diff --git a/support/kconfig/patches/series b/support/kconfig/patches/series new file mode 100644 index 0000000000..523e652399 --- /dev/null +++ b/support/kconfig/patches/series @@ -0,0 +1,9 @@ +01-kconfig-kernel-to-buildroot.patch +02-cpp-comments-to-c-comments.patch +06-br-build-system-integration.patch +09-implement-kconfig-probability.patch +10-br-build-system.patch +11-use-mktemp-for-lxdialog.patch +12-fix-glade-file-path.patch +14-support-out-of-tree-config.patch +15-fix-qconf-moc-rule.patch diff --git a/package/config/qconf.cc b/support/kconfig/qconf.cc similarity index 99% rename from package/config/qconf.cc rename to support/kconfig/qconf.cc index 06dd2e3358..1500c38f0c 100644 --- a/package/config/qconf.cc +++ b/support/kconfig/qconf.cc @@ -6,6 +6,7 @@ #include #if QT_VERSION < 0x040000 +#include #include #include #include @@ -1478,10 +1479,13 @@ void ConfigMainWindow::loadConfig(void) ConfigView::updateListAll(); } -void ConfigMainWindow::saveConfig(void) +bool ConfigMainWindow::saveConfig(void) { - if (conf_write(NULL)) + if (conf_write(NULL)) { QMessageBox::information(this, "qconf", _("Unable to save configuration!")); + return false; + } + return true; } void ConfigMainWindow::saveConfigAs(void) @@ -1489,8 +1493,7 @@ void ConfigMainWindow::saveConfigAs(void) QString s = Q3FileDialog::getSaveFileName(conf_get_configname(), NULL, this); if (s.isNull()) return; - if (conf_write(QFile::encodeName(s))) - QMessageBox::information(this, "qconf", _("Unable to save configuration!")); + saveConfig(); } void ConfigMainWindow::searchConfig(void) @@ -1643,7 +1646,11 @@ void ConfigMainWindow::closeEvent(QCloseEvent* e) mb.setButtonText(QMessageBox::Cancel, _("Cancel Exit")); switch (mb.exec()) { case QMessageBox::Yes: - conf_write(NULL); + if (saveConfig()) + e->accept(); + else + e->ignore(); + break; case QMessageBox::No: e->accept(); break; @@ -1746,10 +1753,6 @@ int main(int ac, char** av) bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); -#ifndef LKC_DIRECT_LINK - kconfig_load(); -#endif - progname = av[0]; configApp = new QApplication(ac, av); if (ac > 1 && av[1][0] == '-') { diff --git a/package/config/qconf.h b/support/kconfig/qconf.h similarity index 99% rename from package/config/qconf.h rename to support/kconfig/qconf.h index 91677d900d..3715b3e721 100644 --- a/package/config/qconf.h +++ b/support/kconfig/qconf.h @@ -311,7 +311,7 @@ public slots: void listFocusChanged(void); void goBack(void); void loadConfig(void); - void saveConfig(void); + bool saveConfig(void); void saveConfigAs(void); void searchConfig(void); void showSingleView(void); diff --git a/support/kconfig/streamline_config.pl b/support/kconfig/streamline_config.pl new file mode 100644 index 0000000000..3368939695 --- /dev/null +++ b/support/kconfig/streamline_config.pl @@ -0,0 +1,634 @@ +#!/usr/bin/perl -w +# +# Copyright 2005-2009 - Steven Rostedt +# Licensed under the terms of the GNU GPL License version 2 +# +# It's simple enough to figure out how this works. +# If not, then you can ask me at stripconfig@goodmis.org +# +# What it does? +# +# If you have installed a Linux kernel from a distribution +# that turns on way too many modules than you need, and +# you only want the modules you use, then this program +# is perfect for you. +# +# It gives you the ability to turn off all the modules that are +# not loaded on your system. +# +# Howto: +# +# 1. Boot up the kernel that you want to stream line the config on. +# 2. Change directory to the directory holding the source of the +# kernel that you just booted. +# 3. Copy the configuraton file to this directory as .config +# 4. Have all your devices that you need modules for connected and +# operational (make sure that their corresponding modules are loaded) +# 5. Run this script redirecting the output to some other file +# like config_strip. +# 6. Back up your old config (if you want too). +# 7. copy the config_strip file to .config +# 8. Run "make oldconfig" +# +# Now your kernel is ready to be built with only the modules that +# are loaded. +# +# Here's what I did with my Debian distribution. +# +# cd /usr/src/linux-2.6.10 +# cp /boot/config-2.6.10-1-686-smp .config +# ~/bin/streamline_config > config_strip +# mv .config config_sav +# mv config_strip .config +# make oldconfig +# +use strict; +use Getopt::Long; + +# set the environment variable LOCALMODCONFIG_DEBUG to get +# debug output. +my $debugprint = 0; +$debugprint = 1 if (defined($ENV{LOCALMODCONFIG_DEBUG})); + +sub dprint { + return if (!$debugprint); + print STDERR @_; +} + +my $config = ".config"; + +my $uname = `uname -r`; +chomp $uname; + +my @searchconfigs = ( + { + "file" => ".config", + "exec" => "cat", + }, + { + "file" => "/proc/config.gz", + "exec" => "zcat", + }, + { + "file" => "/boot/config-$uname", + "exec" => "cat", + }, + { + "file" => "/boot/vmlinuz-$uname", + "exec" => "scripts/extract-ikconfig", + "test" => "scripts/extract-ikconfig", + }, + { + "file" => "vmlinux", + "exec" => "scripts/extract-ikconfig", + "test" => "scripts/extract-ikconfig", + }, + { + "file" => "/lib/modules/$uname/kernel/kernel/configs.ko", + "exec" => "scripts/extract-ikconfig", + "test" => "scripts/extract-ikconfig", + }, + { + "file" => "kernel/configs.ko", + "exec" => "scripts/extract-ikconfig", + "test" => "scripts/extract-ikconfig", + }, + { + "file" => "kernel/configs.o", + "exec" => "scripts/extract-ikconfig", + "test" => "scripts/extract-ikconfig", + }, +); + +sub read_config { + foreach my $conf (@searchconfigs) { + my $file = $conf->{"file"}; + + next if ( ! -f "$file"); + + if (defined($conf->{"test"})) { + `$conf->{"test"} $conf->{"file"} 2>/dev/null`; + next if ($?); + } + + my $exec = $conf->{"exec"}; + + print STDERR "using config: '$file'\n"; + + open(my $infile, '-|', "$exec $file") || die "Failed to run $exec $file"; + my @x = <$infile>; + close $infile; + return @x; + } + die "No config file found"; +} + +my @config_file = read_config; + +# Parse options +my $localmodconfig = 0; +my $localyesconfig = 0; + +GetOptions("localmodconfig" => \$localmodconfig, + "localyesconfig" => \$localyesconfig); + +# Get the build source and top level Kconfig file (passed in) +my $ksource = ($ARGV[0] ? $ARGV[0] : '.'); +my $kconfig = $ARGV[1]; +my $lsmod_file = $ENV{'LSMOD'}; + +my @makefiles = `find $ksource -name Makefile 2>/dev/null`; +chomp @makefiles; + +my %depends; +my %selects; +my %prompts; +my %objects; +my $var; +my $iflevel = 0; +my @ifdeps; + +# prevent recursion +my %read_kconfigs; + +sub read_kconfig { + my ($kconfig) = @_; + + my $state = "NONE"; + my $config; + my @kconfigs; + + my $cont = 0; + my $line; + + my $source = "$ksource/$kconfig"; + my $last_source = ""; + + # Check for any environment variables used + while ($source =~ /\$(\w+)/ && $last_source ne $source) { + my $env = $1; + $last_source = $source; + $source =~ s/\$$env/$ENV{$env}/; + } + + open(my $kinfile, '<', $source) || die "Can't open $kconfig"; + while (<$kinfile>) { + chomp; + + # Make sure that lines ending with \ continue + if ($cont) { + $_ = $line . " " . $_; + } + + if (s/\\$//) { + $cont = 1; + $line = $_; + next; + } + + $cont = 0; + + # collect any Kconfig sources + if (/^source\s*"(.*)"/) { + $kconfigs[$#kconfigs+1] = $1; + } + + # configs found + if (/^\s*(menu)?config\s+(\S+)\s*$/) { + $state = "NEW"; + $config = $2; + + # Add depends for 'if' nesting + for (my $i = 0; $i < $iflevel; $i++) { + if ($i) { + $depends{$config} .= " " . $ifdeps[$i]; + } else { + $depends{$config} = $ifdeps[$i]; + } + $state = "DEP"; + } + + # collect the depends for the config + } elsif ($state eq "NEW" && /^\s*depends\s+on\s+(.*)$/) { + $state = "DEP"; + $depends{$config} = $1; + } elsif ($state eq "DEP" && /^\s*depends\s+on\s+(.*)$/) { + $depends{$config} .= " " . $1; + + # Get the configs that select this config + } elsif ($state ne "NONE" && /^\s*select\s+(\S+)/) { + my $conf = $1; + if (defined($selects{$conf})) { + $selects{$conf} .= " " . $config; + } else { + $selects{$conf} = $config; + } + + # configs without prompts must be selected + } elsif ($state ne "NONE" && /^\s*tristate\s\S/) { + # note if the config has a prompt + $prompts{$config} = 1; + + # Check for if statements + } elsif (/^if\s+(.*\S)\s*$/) { + my $deps = $1; + # remove beginning and ending non text + $deps =~ s/^[^a-zA-Z0-9_]*//; + $deps =~ s/[^a-zA-Z0-9_]*$//; + + my @deps = split /[^a-zA-Z0-9_]+/, $deps; + + $ifdeps[$iflevel++] = join ':', @deps; + + } elsif (/^endif/) { + + $iflevel-- if ($iflevel); + + # stop on "help" + } elsif (/^\s*help\s*$/) { + $state = "NONE"; + } + } + close($kinfile); + + # read in any configs that were found. + foreach my $kconfig (@kconfigs) { + if (!defined($read_kconfigs{$kconfig})) { + $read_kconfigs{$kconfig} = 1; + read_kconfig($kconfig); + } + } +} + +if ($kconfig) { + read_kconfig($kconfig); +} + +# Makefiles can use variables to define their dependencies +sub convert_vars { + my ($line, %vars) = @_; + + my $process = ""; + + while ($line =~ s/^(.*?)(\$\((.*?)\))//) { + my $start = $1; + my $variable = $2; + my $var = $3; + + if (defined($vars{$var})) { + $process .= $start . $vars{$var}; + } else { + $process .= $start . $variable; + } + } + + $process .= $line; + + return $process; +} + +# Read all Makefiles to map the configs to the objects +foreach my $makefile (@makefiles) { + + my $line = ""; + my %make_vars; + + open(my $infile, '<', $makefile) || die "Can't open $makefile"; + while (<$infile>) { + # if this line ends with a backslash, continue + chomp; + if (/^(.*)\\$/) { + $line .= $1; + next; + } + + $line .= $_; + $_ = $line; + $line = ""; + + my $objs; + + # Convert variables in a line (could define configs) + $_ = convert_vars($_, %make_vars); + + # collect objects after obj-$(CONFIG_FOO_BAR) + if (/obj-\$\((CONFIG_[^\)]*)\)\s*[+:]?=\s*(.*)/) { + $var = $1; + $objs = $2; + + # check if variables are set + } elsif (/^\s*(\S+)\s*[:]?=\s*(.*\S)/) { + $make_vars{$1} = $2; + } + if (defined($objs)) { + foreach my $obj (split /\s+/,$objs) { + $obj =~ s/-/_/g; + if ($obj =~ /(.*)\.o$/) { + # Objects may be enabled by more than one config. + # Store configs in an array. + my @arr; + + if (defined($objects{$1})) { + @arr = @{$objects{$1}}; + } + + $arr[$#arr+1] = $var; + + # The objects have a hash mapping to a reference + # of an array of configs. + $objects{$1} = \@arr; + } + } + } + } + close($infile); +} + +my %modules; +my $linfile; + +if (defined($lsmod_file)) { + if ( ! -f $lsmod_file) { + if ( -f $ENV{'objtree'}."/".$lsmod_file) { + $lsmod_file = $ENV{'objtree'}."/".$lsmod_file; + } else { + die "$lsmod_file not found"; + } + } + + my $otype = ( -x $lsmod_file) ? '-|' : '<'; + open($linfile, $otype, $lsmod_file); + +} else { + + # see what modules are loaded on this system + my $lsmod; + + foreach my $dir ( ("/sbin", "/bin", "/usr/sbin", "/usr/bin") ) { + if ( -x "$dir/lsmod" ) { + $lsmod = "$dir/lsmod"; + last; + } +} + if (!defined($lsmod)) { + # try just the path + $lsmod = "lsmod"; + } + + open($linfile, '-|', $lsmod) || die "Can not call lsmod with $lsmod"; +} + +while (<$linfile>) { + next if (/^Module/); # Skip the first line. + if (/^(\S+)/) { + $modules{$1} = 1; + } +} +close ($linfile); + +# add to the configs hash all configs that are needed to enable +# a loaded module. This is a direct obj-${CONFIG_FOO} += bar.o +# where we know we need bar.o so we add FOO to the list. +my %configs; +foreach my $module (keys(%modules)) { + if (defined($objects{$module})) { + my @arr = @{$objects{$module}}; + foreach my $conf (@arr) { + $configs{$conf} = $module; + dprint "$conf added by direct ($module)\n"; + } + } else { + # Most likely, someone has a custom (binary?) module loaded. + print STDERR "$module config not found!!\n"; + } +} + +# Read the current config, and see what is enabled. We want to +# ignore configs that we would not enable anyway. + +my %orig_configs; +my $valid = "A-Za-z_0-9"; + +foreach my $line (@config_file) { + $_ = $line; + + if (/(CONFIG_[$valid]*)=(m|y)/) { + $orig_configs{$1} = $2; + } +} + +my $repeat = 1; + +my $depconfig; + +# +# Note, we do not care about operands (like: &&, ||, !) we want to add any +# config that is in the depend list of another config. This script does +# not enable configs that are not already enabled. If we come across a +# config A that depends on !B, we can still add B to the list of depends +# to keep on. If A was on in the original config, B would not have been +# and B would not be turned on by this script. +# +sub parse_config_depends +{ + my ($p) = @_; + + while ($p =~ /[$valid]/) { + + if ($p =~ /^[^$valid]*([$valid]+)/) { + my $conf = "CONFIG_" . $1; + + $p =~ s/^[^$valid]*[$valid]+//; + + # We only need to process if the depend config is a module + if (!defined($orig_configs{$conf}) || !$orig_configs{conf} eq "m") { + next; + } + + if (!defined($configs{$conf})) { + # We must make sure that this config has its + # dependencies met. + $repeat = 1; # do again + dprint "$conf selected by depend $depconfig\n"; + $configs{$conf} = 1; + } + } else { + die "this should never happen"; + } + } +} + +# Select is treated a bit differently than depends. We call this +# when a config has no prompt and requires another config to be +# selected. We use to just select all configs that selected this +# config, but found that that can balloon into enabling hundreds +# of configs that we do not care about. +# +# The idea is we look at all the configs that select it. If one +# is already in our list of configs to enable, then there's nothing +# else to do. If there isn't, we pick the first config that was +# enabled in the orignal config and use that. +sub parse_config_selects +{ + my ($config, $p) = @_; + + my $next_config; + + while ($p =~ /[$valid]/) { + + if ($p =~ /^[^$valid]*([$valid]+)/) { + my $conf = "CONFIG_" . $1; + + $p =~ s/^[^$valid]*[$valid]+//; + + # Make sure that this config exists in the current .config file + if (!defined($orig_configs{$conf})) { + dprint "$conf not set for $config select\n"; + next; + } + + # Check if something other than a module selects this config + if (defined($orig_configs{$conf}) && $orig_configs{$conf} ne "m") { + dprint "$conf (non module) selects config, we are good\n"; + # we are good with this + return; + } + if (defined($configs{$conf})) { + dprint "$conf selects $config so we are good\n"; + # A set config selects this config, we are good + return; + } + # Set this config to be selected + if (!defined($next_config)) { + $next_config = $conf; + } + } else { + die "this should never happen"; + } + } + + # If no possible config selected this, then something happened. + if (!defined($next_config)) { + print STDERR "WARNING: $config is required, but nothing in the\n"; + print STDERR " current config selects it.\n"; + return; + } + + # If we are here, then we found no config that is set and + # selects this config. Repeat. + $repeat = 1; + # Make this config need to be selected + $configs{$next_config} = 1; + dprint "$next_config selected by select $config\n"; +} + +my %process_selects; + +# loop through all configs, select their dependencies. +sub loop_depend { + $repeat = 1; + + while ($repeat) { + $repeat = 0; + + forloop: + foreach my $config (keys %configs) { + + # If this config is not a module, we do not need to process it + if (defined($orig_configs{$config}) && $orig_configs{$config} ne "m") { + next forloop; + } + + $config =~ s/^CONFIG_//; + $depconfig = $config; + + if (defined($depends{$config})) { + # This config has dependencies. Make sure they are also included + parse_config_depends $depends{$config}; + } + + # If the config has no prompt, then we need to check if a config + # that is enabled selected it. Or if we need to enable one. + if (!defined($prompts{$config}) && defined($selects{$config})) { + $process_selects{$config} = 1; + } + } + } +} + +sub loop_select { + + foreach my $config (keys %process_selects) { + $config =~ s/^CONFIG_//; + + dprint "Process select $config\n"; + + # config has no prompt and must be selected. + parse_config_selects $config, $selects{$config}; + } +} + +while ($repeat) { + # Get the first set of configs and their dependencies. + loop_depend; + + $repeat = 0; + + # Now we need to see if we have to check selects; + loop_select; +} + +my %setconfigs; + +# Finally, read the .config file and turn off any module enabled that +# we could not find a reason to keep enabled. +foreach my $line (@config_file) { + $_ = $line; + + if (/CONFIG_IKCONFIG/) { + if (/# CONFIG_IKCONFIG is not set/) { + # enable IKCONFIG at least as a module + print "CONFIG_IKCONFIG=m\n"; + # don't ask about PROC + print "# CONFIG_IKCONFIG_PROC is not set\n"; + } else { + print; + } + next; + } + + if (/^(CONFIG.*)=(m|y)/) { + if (defined($configs{$1})) { + if ($localyesconfig) { + $setconfigs{$1} = 'y'; + print "$1=y\n"; + next; + } else { + $setconfigs{$1} = $2; + } + } elsif ($2 eq "m") { + print "# $1 is not set\n"; + next; + } + } + print; +} + +# Integrity check, make sure all modules that we want enabled do +# indeed have their configs set. +loop: +foreach my $module (keys(%modules)) { + if (defined($objects{$module})) { + my @arr = @{$objects{$module}}; + foreach my $conf (@arr) { + if (defined($setconfigs{$conf})) { + next loop; + } + } + print STDERR "module $module did not have configs"; + foreach my $conf (@arr) { + print STDERR " " , $conf; + } + print STDERR "\n"; + } +} diff --git a/package/config/symbol.c b/support/kconfig/symbol.c similarity index 96% rename from package/config/symbol.c rename to support/kconfig/symbol.c index a796c95fe8..ecc5aa5f86 100644 --- a/package/config/symbol.c +++ b/support/kconfig/symbol.c @@ -9,7 +9,6 @@ #include #include -#define LKC_DIRECT_LINK #include "lkc.h" struct symbol symbol_yes = { @@ -263,11 +262,18 @@ static struct symbol *sym_calc_choice(struct symbol *sym) struct symbol *def_sym; struct property *prop; struct expr *e; + int flags; /* first calculate all choice values' visibilities */ + flags = sym->flags; prop = sym_get_choice_prop(sym); - expr_list_for_each_sym(prop->expr, e, def_sym) + expr_list_for_each_sym(prop->expr, e, def_sym) { sym_calc_visibility(def_sym); + if (def_sym->visible != no) + flags &= def_sym->flags; + } + + sym->flags &= flags | ~SYMBOL_DEF_USER; /* is the user choice visible? */ def_sym = sym->def[S_DEF_USER].val; @@ -650,11 +656,11 @@ bool sym_set_string_value(struct symbol *sym, const char *newval) size = strlen(newval) + 1; if (sym->type == S_HEX && (newval[0] != '0' || (newval[1] != 'x' && newval[1] != 'X'))) { size += 2; - sym->def[S_DEF_USER].val = val = malloc(size); + sym->def[S_DEF_USER].val = val = xmalloc(size); *val++ = '0'; *val++ = 'x'; } else if (!oldval || strcmp(oldval, newval)) - sym->def[S_DEF_USER].val = val = malloc(size); + sym->def[S_DEF_USER].val = val = xmalloc(size); else return true; @@ -751,7 +757,8 @@ const char *sym_get_string_value(struct symbol *sym) case no: return "n"; case mod: - return "m"; + sym_calc_value(modules_sym); + return (modules_sym->curr.tri == no) ? "n" : "m"; case yes: return "y"; } @@ -805,7 +812,7 @@ struct symbol *sym_lookup(const char *name, int flags) hash = 0; } - symbol = malloc(sizeof(*symbol)); + symbol = xmalloc(sizeof(*symbol)); memset(symbol, 0, sizeof(*symbol)); symbol->name = new_name; symbol->type = S_UNKNOWN; @@ -856,7 +863,7 @@ const char *sym_expand_string_value(const char *in) size_t reslen; reslen = strlen(in) + 1; - res = malloc(reslen); + res = xmalloc(reslen); res[0] = '\0'; while ((src = strchr(in, '$'))) { @@ -893,6 +900,49 @@ const char *sym_expand_string_value(const char *in) return res; } +const char *sym_escape_string_value(const char *in) +{ + const char *p; + size_t reslen; + char *res; + size_t l; + + reslen = strlen(in) + strlen("\"\"") + 1; + + p = in; + for (;;) { + l = strcspn(p, "\"\\"); + p += l; + + if (p[0] == '\0') + break; + + reslen++; + p++; + } + + res = xmalloc(reslen); + res[0] = '\0'; + + strcat(res, "\""); + + p = in; + for (;;) { + l = strcspn(p, "\"\\"); + strncat(res, p, l); + p += l; + + if (p[0] == '\0') + break; + + strcat(res, "\\"); + strncat(res, p++, 1); + } + + strcat(res, "\""); + return res; +} + struct symbol **sym_re_search(const char *pattern) { struct symbol *sym, **sym_arr = NULL; @@ -1178,7 +1228,7 @@ struct property *prop_alloc(enum prop_type type, struct symbol *sym) struct property *prop; struct property **propp; - prop = malloc(sizeof(*prop)); + prop = xmalloc(sizeof(*prop)); memset(prop, 0, sizeof(*prop)); prop->type = type; prop->sym = sym; diff --git a/support/kconfig/util.c b/support/kconfig/util.c new file mode 100644 index 0000000000..60eb566180 --- /dev/null +++ b/support/kconfig/util.c @@ -0,0 +1,171 @@ +/* + * Copyright (C) 2002-2005 Roman Zippel + * Copyright (C) 2002-2005 Sam Ravnborg + * + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include "lkc.h" + +/* file already present in list? If not add it */ +struct file *file_lookup(const char *name) +{ + struct file *file; + const char *file_name = sym_expand_string_value(name); + + for (file = file_list; file; file = file->next) { + if (!strcmp(name, file->name)) { + free((void *)file_name); + return file; + } + } + + file = xmalloc(sizeof(*file)); + memset(file, 0, sizeof(*file)); + file->name = file_name; + file->next = file_list; + file_list = file; + return file; +} + +/* write a dependency file as used by kbuild to track dependencies */ +int file_write_dep(const char *name) +{ + char *str; + char buf[PATH_MAX+1], buf2[PATH_MAX+1], dir[PATH_MAX+1]; + struct symbol *sym, *env_sym; + struct expr *e; + struct file *file; + FILE *out; + + if (!name) + name = ".kconfig.d"; + + strcpy(dir, conf_get_configname()); + str = strrchr(dir, '/'); + if (str) + str[1] = 0; + else + dir[0] = 0; + + sprintf(buf, "%s..config.tmp", dir); + out = fopen(buf, "w"); + if (!out) + return 1; + fprintf(out, "deps_config := \\\n"); + for (file = file_list; file; file = file->next) { + if (file->next) + fprintf(out, "\t%s \\\n", file->name); + else + fprintf(out, "\t%s\n", file->name); + } + fprintf(out, "\n%s: \\\n" + "\t$(deps_config)\n\n", conf_get_autoconfig_name()); + + expr_list_for_each_sym(sym_env_list, e, sym) { + struct property *prop; + const char *value; + + prop = sym_get_env_prop(sym); + env_sym = prop_get_symbol(prop); + if (!env_sym) + continue; + value = getenv(env_sym->name); + if (!value) + value = ""; + fprintf(out, "ifneq \"$(%s)\" \"%s\"\n", env_sym->name, value); + fprintf(out, "%s: FORCE\n", conf_get_autoconfig_name()); + fprintf(out, "endif\n"); + } + + fprintf(out, "\n$(deps_config): ;\n"); + fclose(out); + sprintf(buf2, "%s%s", dir, name); + rename(buf, buf2); + return 0; +} + + +/* Allocate initial growable string */ +struct gstr str_new(void) +{ + struct gstr gs; + gs.s = xmalloc(sizeof(char) * 64); + gs.len = 64; + gs.max_width = 0; + strcpy(gs.s, "\0"); + return gs; +} + +/* Allocate and assign growable string */ +struct gstr str_assign(const char *s) +{ + struct gstr gs; + gs.s = strdup(s); + gs.len = strlen(s) + 1; + gs.max_width = 0; + return gs; +} + +/* Free storage for growable string */ +void str_free(struct gstr *gs) +{ + if (gs->s) + free(gs->s); + gs->s = NULL; + gs->len = 0; +} + +/* Append to growable string */ +void str_append(struct gstr *gs, const char *s) +{ + size_t l; + if (s) { + l = strlen(gs->s) + strlen(s) + 1; + if (l > gs->len) { + gs->s = realloc(gs->s, l); + gs->len = l; + } + strcat(gs->s, s); + } +} + +/* Append printf formatted string to growable string */ +void str_printf(struct gstr *gs, const char *fmt, ...) +{ + va_list ap; + char s[10000]; /* big enough... */ + va_start(ap, fmt); + vsnprintf(s, sizeof(s), fmt, ap); + str_append(gs, s); + va_end(ap); +} + +/* Retrieve value of growable string */ +const char *str_get(struct gstr *gs) +{ + return gs->s; +} + +void *xmalloc(size_t size) +{ + void *p = malloc(size); + if (p) + return p; + fprintf(stderr, "Out of memory.\n"); + exit(1); +} + +void *xcalloc(size_t nmemb, size_t size) +{ + void *p = calloc(nmemb, size); + if (p) + return p; + fprintf(stderr, "Out of memory.\n"); + exit(1); +} + + diff --git a/package/config/zconf.gperf b/support/kconfig/zconf.gperf similarity index 92% rename from package/config/zconf.gperf rename to support/kconfig/zconf.gperf index c9e690eb75..f14ab41154 100644 --- a/package/config/zconf.gperf +++ b/support/kconfig/zconf.gperf @@ -9,7 +9,7 @@ struct kconf_id; -static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); +static const struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); %% mainmenu, T_MAINMENU, TF_COMMAND diff --git a/support/kconfig/zconf.hash.c_shipped b/support/kconfig/zconf.hash.c_shipped new file mode 100644 index 0000000000..40df0005da --- /dev/null +++ b/support/kconfig/zconf.hash.c_shipped @@ -0,0 +1,286 @@ +/* ANSI-C code produced by gperf version 3.0.4 */ +/* Command-line: gperf -t --output-file scripts/kconfig/zconf.hash.c_shipped -a -C -E -g -k '1,3,$' -p -t scripts/kconfig/zconf.gperf */ + +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +#error "gperf generated tables don't work with this execution character set. Please report a bug to ." +#endif + +#line 10 "scripts/kconfig/zconf.gperf" +struct kconf_id; + +static const struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); +/* maximum key range = 71, duplicates = 0 */ + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static unsigned int +kconf_id_hash (register const char *str, register unsigned int len) +{ + static const unsigned char asso_values[] = + { + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 25, 25, + 0, 0, 0, 5, 0, 0, 73, 73, 5, 0, + 10, 5, 45, 73, 20, 20, 0, 15, 15, 73, + 20, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73 + }; + register int hval = len; + + switch (hval) + { + default: + hval += asso_values[(unsigned char)str[2]]; + /*FALLTHROUGH*/ + case 2: + case 1: + hval += asso_values[(unsigned char)str[0]]; + break; + } + return hval + asso_values[(unsigned char)str[len - 1]]; +} + +struct kconf_id_strings_t + { + char kconf_id_strings_str2[sizeof("if")]; + char kconf_id_strings_str3[sizeof("int")]; + char kconf_id_strings_str5[sizeof("endif")]; + char kconf_id_strings_str7[sizeof("default")]; + char kconf_id_strings_str8[sizeof("tristate")]; + char kconf_id_strings_str9[sizeof("endchoice")]; + char kconf_id_strings_str12[sizeof("def_tristate")]; + char kconf_id_strings_str13[sizeof("def_bool")]; + char kconf_id_strings_str14[sizeof("defconfig_list")]; + char kconf_id_strings_str17[sizeof("on")]; + char kconf_id_strings_str18[sizeof("optional")]; + char kconf_id_strings_str21[sizeof("option")]; + char kconf_id_strings_str22[sizeof("endmenu")]; + char kconf_id_strings_str23[sizeof("mainmenu")]; + char kconf_id_strings_str25[sizeof("menuconfig")]; + char kconf_id_strings_str27[sizeof("modules")]; + char kconf_id_strings_str29[sizeof("menu")]; + char kconf_id_strings_str31[sizeof("select")]; + char kconf_id_strings_str32[sizeof("comment")]; + char kconf_id_strings_str33[sizeof("env")]; + char kconf_id_strings_str35[sizeof("range")]; + char kconf_id_strings_str36[sizeof("choice")]; + char kconf_id_strings_str39[sizeof("bool")]; + char kconf_id_strings_str41[sizeof("source")]; + char kconf_id_strings_str42[sizeof("visible")]; + char kconf_id_strings_str43[sizeof("hex")]; + char kconf_id_strings_str46[sizeof("config")]; + char kconf_id_strings_str47[sizeof("boolean")]; + char kconf_id_strings_str51[sizeof("string")]; + char kconf_id_strings_str54[sizeof("help")]; + char kconf_id_strings_str56[sizeof("prompt")]; + char kconf_id_strings_str72[sizeof("depends")]; + }; +static const struct kconf_id_strings_t kconf_id_strings_contents = + { + "if", + "int", + "endif", + "default", + "tristate", + "endchoice", + "def_tristate", + "def_bool", + "defconfig_list", + "on", + "optional", + "option", + "endmenu", + "mainmenu", + "menuconfig", + "modules", + "menu", + "select", + "comment", + "env", + "range", + "choice", + "bool", + "source", + "visible", + "hex", + "config", + "boolean", + "string", + "help", + "prompt", + "depends" + }; +#define kconf_id_strings ((const char *) &kconf_id_strings_contents) +#ifdef __GNUC__ +__inline +#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ +__attribute__ ((__gnu_inline__)) +#endif +#endif +const struct kconf_id * +kconf_id_lookup (register const char *str, register unsigned int len) +{ + enum + { + TOTAL_KEYWORDS = 32, + MIN_WORD_LENGTH = 2, + MAX_WORD_LENGTH = 14, + MIN_HASH_VALUE = 2, + MAX_HASH_VALUE = 72 + }; + + static const struct kconf_id wordlist[] = + { + {-1}, {-1}, +#line 25 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_IF, TF_COMMAND|TF_PARAM}, +#line 36 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3, T_TYPE, TF_COMMAND, S_INT}, + {-1}, +#line 26 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str5, T_ENDIF, TF_COMMAND}, + {-1}, +#line 29 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_DEFAULT, TF_COMMAND, S_UNKNOWN}, +#line 31 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_TYPE, TF_COMMAND, S_TRISTATE}, +#line 20 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str9, T_ENDCHOICE, TF_COMMAND}, + {-1}, {-1}, +#line 32 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_TRISTATE}, +#line 35 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN}, +#line 45 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_OPT_DEFCONFIG_LIST,TF_OPTION}, + {-1}, {-1}, +#line 43 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_ON, TF_PARAM}, +#line 28 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_OPTIONAL, TF_COMMAND}, + {-1}, {-1}, +#line 42 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_OPTION, TF_COMMAND}, +#line 17 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_ENDMENU, TF_COMMAND}, +#line 15 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_MAINMENU, TF_COMMAND}, + {-1}, +#line 23 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str25, T_MENUCONFIG, TF_COMMAND}, + {-1}, +#line 44 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_OPT_MODULES, TF_OPTION}, + {-1}, +#line 16 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND}, + {-1}, +#line 39 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31, T_SELECT, TF_COMMAND}, +#line 21 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND}, +#line 46 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_OPT_ENV, TF_OPTION}, + {-1}, +#line 40 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_RANGE, TF_COMMAND}, +#line 19 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_CHOICE, TF_COMMAND}, + {-1}, {-1}, +#line 33 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str39, T_TYPE, TF_COMMAND, S_BOOLEAN}, + {-1}, +#line 18 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_SOURCE, TF_COMMAND}, +#line 41 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42, T_VISIBLE, TF_COMMAND}, +#line 37 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str43, T_TYPE, TF_COMMAND, S_HEX}, + {-1}, {-1}, +#line 22 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_CONFIG, TF_COMMAND}, +#line 34 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str47, T_TYPE, TF_COMMAND, S_BOOLEAN}, + {-1}, {-1}, {-1}, +#line 38 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str51, T_TYPE, TF_COMMAND, S_STRING}, + {-1}, {-1}, +#line 24 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str54, T_HELP, TF_COMMAND}, + {-1}, +#line 30 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str56, T_PROMPT, TF_COMMAND}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, +#line 27 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str72, T_DEPENDS, TF_COMMAND} + }; + + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + register int key = kconf_id_hash (str, len); + + if (key <= MAX_HASH_VALUE && key >= 0) + { + register int o = wordlist[key].name; + if (o >= 0) + { + register const char *s = o + kconf_id_strings; + + if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0') + return &wordlist[key]; + } + } + } + return 0; +} +#line 47 "scripts/kconfig/zconf.gperf" + diff --git a/package/config/zconf.l b/support/kconfig/zconf.l similarity index 84% rename from package/config/zconf.l rename to support/kconfig/zconf.l index 3dbaec185c..6555a47545 100644 --- a/package/config/zconf.l +++ b/support/kconfig/zconf.l @@ -1,5 +1,5 @@ -%option backup nostdinit noyywrap never-interactive full ecs -%option 8bit backup nodefault perf-report perf-report +%option nostdinit noyywrap never-interactive full ecs +%option 8bit nodefault perf-report perf-report %option noinput %x COMMAND HELP STRING PARAM %{ @@ -14,7 +14,6 @@ #include #include -#define LKC_DIRECT_LINK #include "lkc.h" #define START_STRSIZE 16 @@ -41,7 +40,7 @@ static void zconf_endfile(void); static void new_string(void) { - text = malloc(START_STRSIZE); + text = xmalloc(START_STRSIZE); text_asize = START_STRSIZE; text_size = 0; *text = 0; @@ -63,7 +62,7 @@ static void append_string(const char *str, int size) static void alloc_string(const char *str, int size) { - text = malloc(size + 1); + text = xmalloc(size + 1); memcpy(text, str, size); text[size] = 0; } @@ -96,7 +95,7 @@ n [A-Za-z0-9_] { {n}+ { - struct kconf_id *id = kconf_id_lookup(yytext, yyleng); + const struct kconf_id *id = kconf_id_lookup(yytext, yyleng); BEGIN(PARAM); current_pos.file = current_file; current_pos.lineno = current_file->lineno; @@ -132,7 +131,7 @@ n [A-Za-z0-9_] \n BEGIN(INITIAL); current_file->lineno++; return T_EOL; --- /* ignore */ ({n}|[-/.])+ { - struct kconf_id *id = kconf_id_lookup(yytext, yyleng); + const struct kconf_id *id = kconf_id_lookup(yytext, yyleng); if (id && id->flags & TF_PARAM) { zconflval.id = id; return id->token; @@ -289,18 +288,18 @@ void zconf_initscan(const char *name) exit(1); } - current_buf = malloc(sizeof(*current_buf)); + current_buf = xmalloc(sizeof(*current_buf)); memset(current_buf, 0, sizeof(*current_buf)); current_file = file_lookup(name); current_file->lineno = 1; - current_file->flags = FILE_BUSY; } void zconf_nextfile(const char *name) { + struct file *iter; struct file *file = file_lookup(name); - struct buffer *buf = malloc(sizeof(*buf)); + struct buffer *buf = xmalloc(sizeof(*buf)); memset(buf, 0, sizeof(*buf)); current_buf->state = YY_CURRENT_BUFFER; @@ -314,18 +313,25 @@ void zconf_nextfile(const char *name) buf->parent = current_buf; current_buf = buf; - if (file->flags & FILE_BUSY) { - printf("%s:%d: do not source '%s' from itself\n", - zconf_curname(), zconf_lineno(), name); - exit(1); - } - if (file->flags & FILE_SCANNED) { - printf("%s:%d: file '%s' is already sourced from '%s'\n", - zconf_curname(), zconf_lineno(), name, - file->parent->name); - exit(1); + for (iter = current_file->parent; iter; iter = iter->parent ) { + if (!strcmp(current_file->name,iter->name) ) { + printf("%s:%d: recursive inclusion detected. " + "Inclusion path:\n current file : '%s'\n", + zconf_curname(), zconf_lineno(), + zconf_curname()); + iter = current_file->parent; + while (iter && \ + strcmp(iter->name,current_file->name)) { + printf(" included from: '%s:%d'\n", + iter->name, iter->lineno-1); + iter = iter->parent; + } + if (iter) + printf(" included from: '%s:%d'\n", + iter->name, iter->lineno+1); + exit(1); + } } - file->flags |= FILE_BUSY; file->lineno = 1; file->parent = current_file; current_file = file; @@ -335,8 +341,6 @@ static void zconf_endfile(void) { struct buffer *parent; - current_file->flags |= FILE_SCANNED; - current_file->flags &= ~FILE_BUSY; current_file = current_file->parent; parent = current_buf->parent; diff --git a/support/kconfig/zconf.lex.c_shipped b/support/kconfig/zconf.lex.c_shipped new file mode 100644 index 0000000000..a0521aa597 --- /dev/null +++ b/support/kconfig/zconf.lex.c_shipped @@ -0,0 +1,2420 @@ + +#line 3 "scripts/kconfig/zconf.lex.c_shipped" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define yy_create_buffer zconf_create_buffer +#define yy_delete_buffer zconf_delete_buffer +#define yy_flex_debug zconf_flex_debug +#define yy_init_buffer zconf_init_buffer +#define yy_flush_buffer zconf_flush_buffer +#define yy_load_buffer_state zconf_load_buffer_state +#define yy_switch_to_buffer zconf_switch_to_buffer +#define yyin zconfin +#define yyleng zconfleng +#define yylex zconflex +#define yylineno zconflineno +#define yyout zconfout +#define yyrestart zconfrestart +#define yytext zconftext +#define yywrap zconfwrap +#define yyalloc zconfalloc +#define yyrealloc zconfrealloc +#define yyfree zconffree + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 35 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) + +#define YY_USE_CONST + +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE zconfrestart(zconfin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#define YY_BUF_SIZE 16384 +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +extern int zconfleng; + +extern FILE *zconfin, *zconfout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up zconftext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up zconftext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, (yytext_ptr) ) + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via zconfrestart()), so that the user can continue scanning by + * just pointing zconfin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* yy_hold_char holds the character lost when zconftext is formed. */ +static char yy_hold_char; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int zconfleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow zconfwrap()'s to do buffer switches + * instead of setting up a fresh zconfin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void zconfrestart (FILE *input_file ); +void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE zconf_create_buffer (FILE *file,int size ); +void zconf_delete_buffer (YY_BUFFER_STATE b ); +void zconf_flush_buffer (YY_BUFFER_STATE b ); +void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer ); +void zconfpop_buffer_state (void ); + +static void zconfensure_buffer_stack (void ); +static void zconf_load_buffer_state (void ); +static void zconf_init_buffer (YY_BUFFER_STATE b,FILE *file ); + +#define YY_FLUSH_BUFFER zconf_flush_buffer(YY_CURRENT_BUFFER ) + +YY_BUFFER_STATE zconf_scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE zconf_scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE zconf_scan_bytes (yyconst char *bytes,int len ); + +void *zconfalloc (yy_size_t ); +void *zconfrealloc (void *,yy_size_t ); +void zconffree (void * ); + +#define yy_new_buffer zconf_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + zconfensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + zconf_create_buffer(zconfin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + zconfensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + zconf_create_buffer(zconfin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define zconfwrap(n) 1 +#define YY_SKIP_YYWRAP + +typedef unsigned char YY_CHAR; + +FILE *zconfin = (FILE *) 0, *zconfout = (FILE *) 0; + +typedef int yy_state_type; + +extern int zconflineno; + +int zconflineno = 1; + +extern char *zconftext; +#define yytext_ptr zconftext +static yyconst flex_int16_t yy_nxt[][17] = + { + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0 + }, + + { + 11, 12, 13, 14, 12, 12, 15, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12 + }, + + { + 11, 12, 13, 14, 12, 12, 15, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12 + }, + + { + 11, 16, 16, 17, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 18, 16, 16, 16 + }, + + { + 11, 16, 16, 17, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 18, 16, 16, 16 + + }, + + { + 11, 19, 20, 21, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19 + }, + + { + 11, 19, 20, 21, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19 + }, + + { + 11, 22, 22, 23, 22, 24, 22, 22, 24, 22, + 22, 22, 22, 22, 22, 25, 22 + }, + + { + 11, 22, 22, 23, 22, 24, 22, 22, 24, 22, + 22, 22, 22, 22, 22, 25, 22 + }, + + { + 11, 26, 26, 27, 28, 29, 30, 31, 29, 32, + 33, 34, 35, 35, 36, 37, 38 + + }, + + { + 11, 26, 26, 27, 28, 29, 30, 31, 29, 32, + 33, 34, 35, 35, 36, 37, 38 + }, + + { + -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, + -11, -11, -11, -11, -11, -11, -11 + }, + + { + 11, -12, -12, -12, -12, -12, -12, -12, -12, -12, + -12, -12, -12, -12, -12, -12, -12 + }, + + { + 11, -13, 39, 40, -13, -13, 41, -13, -13, -13, + -13, -13, -13, -13, -13, -13, -13 + }, + + { + 11, -14, -14, -14, -14, -14, -14, -14, -14, -14, + -14, -14, -14, -14, -14, -14, -14 + + }, + + { + 11, 42, 42, 43, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42 + }, + + { + 11, -16, -16, -16, -16, -16, -16, -16, -16, -16, + -16, -16, -16, -16, -16, -16, -16 + }, + + { + 11, -17, -17, -17, -17, -17, -17, -17, -17, -17, + -17, -17, -17, -17, -17, -17, -17 + }, + + { + 11, -18, -18, -18, -18, -18, -18, -18, -18, -18, + -18, -18, -18, 44, -18, -18, -18 + }, + + { + 11, 45, 45, -19, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45 + + }, + + { + 11, -20, 46, 47, -20, -20, -20, -20, -20, -20, + -20, -20, -20, -20, -20, -20, -20 + }, + + { + 11, 48, -21, -21, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48 + }, + + { + 11, 49, 49, 50, 49, -22, 49, 49, -22, 49, + 49, 49, 49, 49, 49, -22, 49 + }, + + { + 11, -23, -23, -23, -23, -23, -23, -23, -23, -23, + -23, -23, -23, -23, -23, -23, -23 + }, + + { + 11, -24, -24, -24, -24, -24, -24, -24, -24, -24, + -24, -24, -24, -24, -24, -24, -24 + + }, + + { + 11, 51, 51, 52, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51 + }, + + { + 11, -26, -26, -26, -26, -26, -26, -26, -26, -26, + -26, -26, -26, -26, -26, -26, -26 + }, + + { + 11, -27, -27, -27, -27, -27, -27, -27, -27, -27, + -27, -27, -27, -27, -27, -27, -27 + }, + + { + 11, -28, -28, -28, -28, -28, -28, -28, -28, -28, + -28, -28, -28, -28, 53, -28, -28 + }, + + { + 11, -29, -29, -29, -29, -29, -29, -29, -29, -29, + -29, -29, -29, -29, -29, -29, -29 + + }, + + { + 11, 54, 54, -30, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54 + }, + + { + 11, -31, -31, -31, -31, -31, -31, 55, -31, -31, + -31, -31, -31, -31, -31, -31, -31 + }, + + { + 11, -32, -32, -32, -32, -32, -32, -32, -32, -32, + -32, -32, -32, -32, -32, -32, -32 + }, + + { + 11, -33, -33, -33, -33, -33, -33, -33, -33, -33, + -33, -33, -33, -33, -33, -33, -33 + }, + + { + 11, -34, -34, -34, -34, -34, -34, -34, -34, -34, + -34, 56, 57, 57, -34, -34, -34 + + }, + + { + 11, -35, -35, -35, -35, -35, -35, -35, -35, -35, + -35, 57, 57, 57, -35, -35, -35 + }, + + { + 11, -36, -36, -36, -36, -36, -36, -36, -36, -36, + -36, -36, -36, -36, -36, -36, -36 + }, + + { + 11, -37, -37, 58, -37, -37, -37, -37, -37, -37, + -37, -37, -37, -37, -37, -37, -37 + }, + + { + 11, -38, -38, -38, -38, -38, -38, -38, -38, -38, + -38, -38, -38, -38, -38, -38, 59 + }, + + { + 11, -39, 39, 40, -39, -39, 41, -39, -39, -39, + -39, -39, -39, -39, -39, -39, -39 + + }, + + { + 11, -40, -40, -40, -40, -40, -40, -40, -40, -40, + -40, -40, -40, -40, -40, -40, -40 + }, + + { + 11, 42, 42, 43, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42 + }, + + { + 11, 42, 42, 43, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42 + }, + + { + 11, -43, -43, -43, -43, -43, -43, -43, -43, -43, + -43, -43, -43, -43, -43, -43, -43 + }, + + { + 11, -44, -44, -44, -44, -44, -44, -44, -44, -44, + -44, -44, -44, 44, -44, -44, -44 + + }, + + { + 11, 45, 45, -45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45 + }, + + { + 11, -46, 46, 47, -46, -46, -46, -46, -46, -46, + -46, -46, -46, -46, -46, -46, -46 + }, + + { + 11, 48, -47, -47, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48 + }, + + { + 11, -48, -48, -48, -48, -48, -48, -48, -48, -48, + -48, -48, -48, -48, -48, -48, -48 + }, + + { + 11, 49, 49, 50, 49, -49, 49, 49, -49, 49, + 49, 49, 49, 49, 49, -49, 49 + + }, + + { + 11, -50, -50, -50, -50, -50, -50, -50, -50, -50, + -50, -50, -50, -50, -50, -50, -50 + }, + + { + 11, -51, -51, 52, -51, -51, -51, -51, -51, -51, + -51, -51, -51, -51, -51, -51, -51 + }, + + { + 11, -52, -52, -52, -52, -52, -52, -52, -52, -52, + -52, -52, -52, -52, -52, -52, -52 + }, + + { + 11, -53, -53, -53, -53, -53, -53, -53, -53, -53, + -53, -53, -53, -53, -53, -53, -53 + }, + + { + 11, 54, 54, -54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54 + + }, + + { + 11, -55, -55, -55, -55, -55, -55, -55, -55, -55, + -55, -55, -55, -55, -55, -55, -55 + }, + + { + 11, -56, -56, -56, -56, -56, -56, -56, -56, -56, + -56, 60, 57, 57, -56, -56, -56 + }, + + { + 11, -57, -57, -57, -57, -57, -57, -57, -57, -57, + -57, 57, 57, 57, -57, -57, -57 + }, + + { + 11, -58, -58, -58, -58, -58, -58, -58, -58, -58, + -58, -58, -58, -58, -58, -58, -58 + }, + + { + 11, -59, -59, -59, -59, -59, -59, -59, -59, -59, + -59, -59, -59, -59, -59, -59, -59 + + }, + + { + 11, -60, -60, -60, -60, -60, -60, -60, -60, -60, + -60, 57, 57, 57, -60, -60, -60 + }, + + } ; + +static yy_state_type yy_get_previous_state (void ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); +static int yy_get_next_buffer (void ); +static void yy_fatal_error (yyconst char msg[] ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up zconftext. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + zconfleng = (size_t) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; + +#define YY_NUM_RULES 33 +#define YY_END_OF_BUFFER 34 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[61] = + { 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 34, 5, 4, 2, 3, 7, 8, 6, 32, 29, + 31, 24, 28, 27, 26, 22, 17, 13, 16, 20, + 22, 11, 12, 19, 19, 14, 22, 22, 4, 2, + 3, 3, 1, 6, 32, 29, 31, 30, 24, 23, + 26, 25, 15, 20, 9, 19, 19, 21, 10, 18 + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 5, 6, 1, 1, 7, 8, 9, + 10, 1, 1, 1, 11, 12, 12, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 1, 1, 1, + 14, 1, 1, 1, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 1, 15, 1, 1, 13, 1, 13, 13, 13, 13, + + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 1, 16, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +extern int zconf_flex_debug; +int zconf_flex_debug = 0; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *zconftext; +#define YY_NO_INPUT 1 + +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include + +#include "lkc.h" + +#define START_STRSIZE 16 + +static struct { + struct file *file; + int lineno; +} current_pos; + +static char *text; +static int text_size, text_asize; + +struct buffer { + struct buffer *parent; + YY_BUFFER_STATE state; +}; + +struct buffer *current_buf; + +static int last_ts, first_ts; + +static void zconf_endhelp(void); +static void zconf_endfile(void); + +static void new_string(void) +{ + text = xmalloc(START_STRSIZE); + text_asize = START_STRSIZE; + text_size = 0; + *text = 0; +} + +static void append_string(const char *str, int size) +{ + int new_size = text_size + size + 1; + if (new_size > text_asize) { + new_size += START_STRSIZE - 1; + new_size &= -START_STRSIZE; + text = realloc(text, new_size); + text_asize = new_size; + } + memcpy(text + text_size, str, size); + text_size += size; + text[text_size] = 0; +} + +static void alloc_string(const char *str, int size) +{ + text = xmalloc(size + 1); + memcpy(text, str, size); + text[size] = 0; +} + +#define INITIAL 0 +#define COMMAND 1 +#define HELP 2 +#define STRING 3 +#define PARAM 4 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals (void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int zconflex_destroy (void ); + +int zconfget_debug (void ); + +void zconfset_debug (int debug_flag ); + +YY_EXTRA_TYPE zconfget_extra (void ); + +void zconfset_extra (YY_EXTRA_TYPE user_defined ); + +FILE *zconfget_in (void ); + +void zconfset_in (FILE * in_str ); + +FILE *zconfget_out (void ); + +void zconfset_out (FILE * out_str ); + +int zconfget_leng (void ); + +char *zconfget_text (void ); + +int zconfget_lineno (void ); + +void zconfset_lineno (int line_number ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int zconfwrap (void ); +#else +extern int zconfwrap (void ); +#endif +#endif + + static void yyunput (int c,char *buf_ptr ); + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (void ); +#else +static int input (void ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO do { if (fwrite( zconftext, zconfleng, 1, zconfout )) {} } while (0) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + errno=0; \ + while ( (result = read( fileno(zconfin), (char *) buf, max_size )) < 0 ) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(zconfin); \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int zconflex (void); + +#define YY_DECL int zconflex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after zconftext and zconfleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + + int str = 0; + int ts, i; + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! zconfin ) + zconfin = stdin; + + if ( ! zconfout ) + zconfout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + zconfensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + zconf_create_buffer(zconfin,YY_BUF_SIZE ); + } + + zconf_load_buffer_state( ); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of zconftext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); +yy_match: + while ( (yy_current_state = yy_nxt[yy_current_state][ yy_ec[YY_SC_TO_UI(*yy_cp)] ]) > 0 ) + ++yy_cp; + + yy_current_state = -yy_current_state; + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ +case 1: +/* rule 1 can match eol */ +case 2: +/* rule 2 can match eol */ +YY_RULE_SETUP +{ + current_file->lineno++; + return T_EOL; +} + YY_BREAK +case 3: +YY_RULE_SETUP + + YY_BREAK +case 4: +YY_RULE_SETUP +{ + BEGIN(COMMAND); +} + YY_BREAK +case 5: +YY_RULE_SETUP +{ + unput(zconftext[0]); + BEGIN(COMMAND); +} + YY_BREAK + +case 6: +YY_RULE_SETUP +{ + const struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng); + BEGIN(PARAM); + current_pos.file = current_file; + current_pos.lineno = current_file->lineno; + if (id && id->flags & TF_COMMAND) { + zconflval.id = id; + return id->token; + } + alloc_string(zconftext, zconfleng); + zconflval.string = text; + return T_WORD; + } + YY_BREAK +case 7: +YY_RULE_SETUP + + YY_BREAK +case 8: +/* rule 8 can match eol */ +YY_RULE_SETUP +{ + BEGIN(INITIAL); + current_file->lineno++; + return T_EOL; + } + YY_BREAK + +case 9: +YY_RULE_SETUP +return T_AND; + YY_BREAK +case 10: +YY_RULE_SETUP +return T_OR; + YY_BREAK +case 11: +YY_RULE_SETUP +return T_OPEN_PAREN; + YY_BREAK +case 12: +YY_RULE_SETUP +return T_CLOSE_PAREN; + YY_BREAK +case 13: +YY_RULE_SETUP +return T_NOT; + YY_BREAK +case 14: +YY_RULE_SETUP +return T_EQUAL; + YY_BREAK +case 15: +YY_RULE_SETUP +return T_UNEQUAL; + YY_BREAK +case 16: +YY_RULE_SETUP +{ + str = zconftext[0]; + new_string(); + BEGIN(STRING); + } + YY_BREAK +case 17: +/* rule 17 can match eol */ +YY_RULE_SETUP +BEGIN(INITIAL); current_file->lineno++; return T_EOL; + YY_BREAK +case 18: +YY_RULE_SETUP +/* ignore */ + YY_BREAK +case 19: +YY_RULE_SETUP +{ + const struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng); + if (id && id->flags & TF_PARAM) { + zconflval.id = id; + return id->token; + } + alloc_string(zconftext, zconfleng); + zconflval.string = text; + return T_WORD; + } + YY_BREAK +case 20: +YY_RULE_SETUP +/* comment */ + YY_BREAK +case 21: +/* rule 21 can match eol */ +YY_RULE_SETUP +current_file->lineno++; + YY_BREAK +case 22: +YY_RULE_SETUP + + YY_BREAK +case YY_STATE_EOF(PARAM): +{ + BEGIN(INITIAL); + } + YY_BREAK + +case 23: +/* rule 23 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up zconftext again */ +YY_RULE_SETUP +{ + append_string(zconftext, zconfleng); + zconflval.string = text; + return T_WORD_QUOTE; + } + YY_BREAK +case 24: +YY_RULE_SETUP +{ + append_string(zconftext, zconfleng); + } + YY_BREAK +case 25: +/* rule 25 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up zconftext again */ +YY_RULE_SETUP +{ + append_string(zconftext + 1, zconfleng - 1); + zconflval.string = text; + return T_WORD_QUOTE; + } + YY_BREAK +case 26: +YY_RULE_SETUP +{ + append_string(zconftext + 1, zconfleng - 1); + } + YY_BREAK +case 27: +YY_RULE_SETUP +{ + if (str == zconftext[0]) { + BEGIN(PARAM); + zconflval.string = text; + return T_WORD_QUOTE; + } else + append_string(zconftext, 1); + } + YY_BREAK +case 28: +/* rule 28 can match eol */ +YY_RULE_SETUP +{ + printf("%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno()); + current_file->lineno++; + BEGIN(INITIAL); + return T_EOL; + } + YY_BREAK +case YY_STATE_EOF(STRING): +{ + BEGIN(INITIAL); + } + YY_BREAK + +case 29: +YY_RULE_SETUP +{ + ts = 0; + for (i = 0; i < zconfleng; i++) { + if (zconftext[i] == '\t') + ts = (ts & ~7) + 8; + else + ts++; + } + last_ts = ts; + if (first_ts) { + if (ts < first_ts) { + zconf_endhelp(); + return T_HELPTEXT; + } + ts -= first_ts; + while (ts > 8) { + append_string(" ", 8); + ts -= 8; + } + append_string(" ", ts); + } + } + YY_BREAK +case 30: +/* rule 30 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up zconftext again */ +YY_RULE_SETUP +{ + current_file->lineno++; + zconf_endhelp(); + return T_HELPTEXT; + } + YY_BREAK +case 31: +/* rule 31 can match eol */ +YY_RULE_SETUP +{ + current_file->lineno++; + append_string("\n", 1); + } + YY_BREAK +case 32: +YY_RULE_SETUP +{ + while (zconfleng) { + if ((zconftext[zconfleng-1] != ' ') && (zconftext[zconfleng-1] != '\t')) + break; + zconfleng--; + } + append_string(zconftext, zconfleng); + if (!first_ts) + first_ts = last_ts; + } + YY_BREAK +case YY_STATE_EOF(HELP): +{ + zconf_endhelp(); + return T_HELPTEXT; + } + YY_BREAK + +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(COMMAND): +{ + if (current_file) { + zconf_endfile(); + return T_EOL; + } + fclose(zconfin); + yyterminate(); +} + YY_BREAK +case 33: +YY_RULE_SETUP +YY_FATAL_ERROR( "flex scanner jammed" ); + YY_BREAK + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed zconfin at a new source and called + * zconflex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = zconfin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_c_buf_p); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( zconfwrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * zconftext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +} /* end of zconflex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (void) +{ + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = (yytext_ptr); + register int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + zconfrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), (size_t) num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + zconfrestart(zconfin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) zconfrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (void) +{ + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = (yy_start); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + yy_current_state = yy_nxt[yy_current_state][(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1)]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ + register int yy_is_jam; + + yy_current_state = yy_nxt[yy_current_state][1]; + yy_is_jam = (yy_current_state <= 0); + + return yy_is_jam ? 0 : yy_current_state; +} + + static void yyunput (int c, register char * yy_bp ) +{ + register char *yy_cp; + + yy_cp = (yy_c_buf_p); + + /* undo effects of setting up zconftext */ + *yy_cp = (yy_hold_char); + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = (yy_n_chars) + 2; + register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + register char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; +} + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (void) +#else + static int input (void) +#endif + +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + zconfrestart(zconfin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( zconfwrap( ) ) + return EOF; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve zconftext */ + (yy_hold_char) = *++(yy_c_buf_p); + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void zconfrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + zconfensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + zconf_create_buffer(zconfin,YY_BUF_SIZE ); + } + + zconf_init_buffer(YY_CURRENT_BUFFER,input_file ); + zconf_load_buffer_state( ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * zconfpop_buffer_state(); + * zconfpush_buffer_state(new_buffer); + */ + zconfensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + zconf_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (zconfwrap()) processing, but the only time this flag + * is looked at is after zconfwrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + +static void zconf_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + zconfin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE zconf_create_buffer (FILE * file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) zconfalloc(b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + zconf_init_buffer(b,file ); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with zconf_create_buffer() + * + */ + void zconf_delete_buffer (YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + zconffree((void *) b->yy_ch_buf ); + + zconffree((void *) b ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a zconfrestart() or at EOF. + */ + static void zconf_init_buffer (YY_BUFFER_STATE b, FILE * file ) + +{ + int oerrno = errno; + + zconf_flush_buffer(b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then zconf_init_buffer was _probably_ + * called from zconfrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void zconf_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + zconf_load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + zconfensure_buffer_stack(); + + /* This block is copied from zconf_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from zconf_switch_to_buffer. */ + zconf_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void zconfpop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + zconf_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + zconf_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void zconfensure_buffer_stack (void) +{ + int num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + (yy_buffer_stack) = (struct yy_buffer_state**)zconfalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in zconfensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)zconfrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in zconfensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE zconf_scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + zconf_switch_to_buffer(b ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to zconflex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * zconf_scan_bytes() instead. + */ +YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr ) +{ + + return zconf_scan_bytes(yystr,strlen(yystr) ); +} + +/** Setup the input buffer state to scan the given bytes. The next call to zconflex() will + * scan from a @e copy of @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE zconf_scan_bytes (yyconst char * yybytes, int _yybytes_len ) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _yybytes_len + 2; + buf = (char *) zconfalloc(n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = zconf_scan_buffer(buf,n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in zconf_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yy_fatal_error (yyconst char* msg ) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up zconftext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + zconftext[zconfleng] = (yy_hold_char); \ + (yy_c_buf_p) = zconftext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + zconfleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the current line number. + * + */ +int zconfget_lineno (void) +{ + + return zconflineno; +} + +/** Get the input stream. + * + */ +FILE *zconfget_in (void) +{ + return zconfin; +} + +/** Get the output stream. + * + */ +FILE *zconfget_out (void) +{ + return zconfout; +} + +/** Get the length of the current token. + * + */ +int zconfget_leng (void) +{ + return zconfleng; +} + +/** Get the current token. + * + */ + +char *zconfget_text (void) +{ + return zconftext; +} + +/** Set the current line number. + * @param line_number + * + */ +void zconfset_lineno (int line_number ) +{ + + zconflineno = line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * + * @see zconf_switch_to_buffer + */ +void zconfset_in (FILE * in_str ) +{ + zconfin = in_str ; +} + +void zconfset_out (FILE * out_str ) +{ + zconfout = out_str ; +} + +int zconfget_debug (void) +{ + return zconf_flex_debug; +} + +void zconfset_debug (int bdebug ) +{ + zconf_flex_debug = bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from zconflex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = 0; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = (char *) 0; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + zconfin = stdin; + zconfout = stdout; +#else + zconfin = (FILE *) 0; + zconfout = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * zconflex_init() + */ + return 0; +} + +/* zconflex_destroy is for both reentrant and non-reentrant scanners. */ +int zconflex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + zconf_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + zconfpop_buffer_state(); + } + + /* Destroy the stack itself. */ + zconffree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * zconflex() is called, initialization will occur. */ + yy_init_globals( ); + + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s ) +{ + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *zconfalloc (yy_size_t size ) +{ + return (void *) malloc( size ); +} + +void *zconfrealloc (void * ptr, yy_size_t size ) +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +void zconffree (void * ptr ) +{ + free( (char *) ptr ); /* see zconfrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +void zconf_starthelp(void) +{ + new_string(); + last_ts = first_ts = 0; + BEGIN(HELP); +} + +static void zconf_endhelp(void) +{ + zconflval.string = text; + BEGIN(INITIAL); +} + +/* + * Try to open specified file with following names: + * ./name + * $(srctree)/name + * The latter is used when srctree is separate from objtree + * when compiling the kernel. + * Return NULL if file is not found. + */ +FILE *zconf_fopen(const char *name) +{ + char *env, fullname[PATH_MAX+1]; + FILE *f; + + f = fopen(name, "r"); + if (!f && name != NULL && name[0] != '/') { + env = getenv(SRCTREE); + if (env) { + sprintf(fullname, "%s/%s", env, name); + f = fopen(fullname, "r"); + } + } + return f; +} + +void zconf_initscan(const char *name) +{ + zconfin = zconf_fopen(name); + if (!zconfin) { + printf("can't find file %s\n", name); + exit(1); + } + + current_buf = xmalloc(sizeof(*current_buf)); + memset(current_buf, 0, sizeof(*current_buf)); + + current_file = file_lookup(name); + current_file->lineno = 1; +} + +void zconf_nextfile(const char *name) +{ + struct file *iter; + struct file *file = file_lookup(name); + struct buffer *buf = xmalloc(sizeof(*buf)); + memset(buf, 0, sizeof(*buf)); + + current_buf->state = YY_CURRENT_BUFFER; + zconfin = zconf_fopen(file->name); + if (!zconfin) { + printf("%s:%d: can't open file \"%s\"\n", + zconf_curname(), zconf_lineno(), file->name); + exit(1); + } + zconf_switch_to_buffer(zconf_create_buffer(zconfin,YY_BUF_SIZE)); + buf->parent = current_buf; + current_buf = buf; + + for (iter = current_file->parent; iter; iter = iter->parent ) { + if (!strcmp(current_file->name,iter->name) ) { + printf("%s:%d: recursive inclusion detected. " + "Inclusion path:\n current file : '%s'\n", + zconf_curname(), zconf_lineno(), + zconf_curname()); + iter = current_file->parent; + while (iter && \ + strcmp(iter->name,current_file->name)) { + printf(" included from: '%s:%d'\n", + iter->name, iter->lineno-1); + iter = iter->parent; + } + if (iter) + printf(" included from: '%s:%d'\n", + iter->name, iter->lineno+1); + exit(1); + } + } + file->lineno = 1; + file->parent = current_file; + current_file = file; +} + +static void zconf_endfile(void) +{ + struct buffer *parent; + + current_file = current_file->parent; + + parent = current_buf->parent; + if (parent) { + fclose(zconfin); + zconf_delete_buffer(YY_CURRENT_BUFFER); + zconf_switch_to_buffer(parent->state); + } + free(current_buf); + current_buf = parent; +} + +int zconf_lineno(void) +{ + return current_pos.lineno; +} + +const char *zconf_curname(void) +{ + return current_pos.file ? current_pos.file->name : ""; +} + diff --git a/package/config/zconf.tab.c_shipped b/support/kconfig/zconf.tab.c_shipped similarity index 97% rename from package/config/zconf.tab.c_shipped rename to support/kconfig/zconf.tab.c_shipped index c27391d42b..47fa84904c 100644 --- a/package/config/zconf.tab.c_shipped +++ b/support/kconfig/zconf.tab.c_shipped @@ -1,10 +1,9 @@ - -/* A Bison parser, made by GNU Bison 2.4.1. */ +/* A Bison parser, made by GNU Bison 2.4.3. */ /* Skeleton implementation for Bison's Yacc-like parsers in C - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -46,7 +45,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.4.1" +#define YYBISON_VERSION "2.4.3" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -88,7 +87,6 @@ #include #include -#define LKC_DIRECT_LINK #include "lkc.h" #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) @@ -102,22 +100,18 @@ extern int zconflex(void); static void zconfprint(const char *err, ...); static void zconf_error(const char *err, ...); static void zconferror(const char *err); -static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken); +static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken); struct symbol *symbol_hash[SYMBOL_HASHSIZE]; static struct menu *current_menu, *current_entry; -#define YYDEBUG 0 -#if YYDEBUG -#define YYERROR_VERBOSE -#endif /* Enabling traces. */ #ifndef YYDEBUG -# define YYDEBUG 0 +# define YYDEBUG 1 #endif /* Enabling verbose error messages. */ @@ -188,7 +182,7 @@ typedef union YYSTYPE struct symbol *symbol; struct expr *expr; struct menu *menu; - struct kconf_id *id; + const struct kconf_id *id; @@ -255,7 +249,7 @@ typedef short int yytype_int16; #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ -# if YYENABLE_NLS +# if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) @@ -535,18 +529,18 @@ static const yytype_int8 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 108, 108, 108, 110, 110, 112, 114, 115, 116, - 117, 118, 119, 123, 127, 127, 127, 127, 127, 127, - 127, 127, 131, 132, 133, 134, 135, 136, 140, 141, - 147, 155, 161, 169, 179, 181, 182, 183, 184, 185, - 186, 189, 197, 203, 213, 219, 225, 228, 230, 241, - 242, 247, 256, 261, 269, 272, 274, 275, 276, 277, - 278, 281, 287, 298, 304, 314, 316, 321, 329, 337, - 340, 342, 343, 344, 349, 356, 363, 368, 376, 379, - 381, 382, 383, 386, 394, 401, 408, 414, 421, 423, - 424, 425, 428, 436, 438, 439, 442, 449, 451, 456, - 457, 460, 461, 462, 466, 467, 470, 471, 474, 475, - 476, 477, 478, 479, 480, 483, 484, 487, 488 + 0, 104, 104, 104, 106, 106, 108, 110, 111, 112, + 113, 114, 115, 119, 123, 123, 123, 123, 123, 123, + 123, 123, 127, 128, 129, 130, 131, 132, 136, 137, + 143, 151, 157, 165, 175, 177, 178, 179, 180, 181, + 182, 185, 193, 199, 209, 215, 221, 224, 226, 237, + 238, 243, 252, 257, 265, 268, 270, 271, 272, 273, + 274, 277, 283, 294, 300, 310, 312, 317, 325, 333, + 336, 338, 339, 340, 345, 352, 359, 364, 372, 375, + 377, 378, 379, 382, 390, 397, 404, 410, 417, 419, + 420, 421, 424, 432, 434, 435, 438, 445, 447, 452, + 453, 456, 457, 458, 462, 463, 466, 467, 470, 471, + 472, 473, 474, 475, 476, 479, 480, 483, 484 }; #endif @@ -806,9 +800,18 @@ static const yytype_uint8 yystos[] = /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ + Once GCC version 2 has supplanted version 1, this can go. However, + YYFAIL appears to be in use. Nevertheless, it is formally deprecated + in Bison 2.4.2's NEWS entry, where a plan to phase it out is + discussed. */ #define YYFAIL goto yyerrlab +#if defined YYFAIL + /* This is here to suppress warnings from the GCC cpp's + -Wunused-macros. Normally we don't worry about that warning, but + some users do, and we want to make it easy for users to remove + YYFAIL uses, which will produce warnings from Bison 2.5. */ +#endif #define YYRECOVERING() (!!yyerrstatus) @@ -865,7 +868,7 @@ while (YYID (0)) we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT -# if YYLTYPE_IS_TRIVIAL +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ @@ -1753,7 +1756,7 @@ yyreduce: case 48: { - struct kconf_id *id = kconf_id_lookup((yyvsp[(2) - (3)].string), strlen((yyvsp[(2) - (3)].string))); + const struct kconf_id *id = kconf_id_lookup((yyvsp[(2) - (3)].string), strlen((yyvsp[(2) - (3)].string))); if (id && id->flags & TF_OPTION) menu_add_option(id->token, (yyvsp[(3) - (3)].string)); else @@ -2258,10 +2261,8 @@ void conf_parse(const char *name) modules_sym->flags |= SYMBOL_AUTO; rootmenu.prompt = menu_add_prompt(P_MENU, "Buildroot Configuration", NULL); -#if YYDEBUG if (getenv("ZCONF_DEBUG")) zconfdebug = 1; -#endif zconfparse(); if (zconfnerrs) exit(1); @@ -2300,7 +2301,7 @@ static const char *zconf_tokenname(int token) return ""; } -static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken) +static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken) { if (id->token != endtoken) { zconf_error("unexpected '%s' within %s block", @@ -2345,9 +2346,7 @@ static void zconf_error(const char *err, ...) static void zconferror(const char *err) { -#if YYDEBUG fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err); -#endif } static void print_quoted_string(FILE *out, const char *str) @@ -2496,7 +2495,7 @@ void zconfdump(FILE *out) } } -#include "lex.zconf.c" +#include "zconf.lex.c" #include "util.c" #include "confdata.c" #include "expr.c" diff --git a/package/config/zconf.y b/support/kconfig/zconf.y similarity index 97% rename from package/config/zconf.y rename to support/kconfig/zconf.y index 0717a32353..92ac107f4e 100644 --- a/package/config/zconf.y +++ b/support/kconfig/zconf.y @@ -11,7 +11,6 @@ #include #include -#define LKC_DIRECT_LINK #include "lkc.h" #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) @@ -25,16 +24,12 @@ extern int zconflex(void); static void zconfprint(const char *err, ...); static void zconf_error(const char *err, ...); static void zconferror(const char *err); -static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken); +static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken); struct symbol *symbol_hash[SYMBOL_HASHSIZE]; static struct menu *current_menu, *current_entry; -#define YYDEBUG 0 -#if YYDEBUG -#define YYERROR_VERBOSE -#endif %} %expect 30 @@ -45,7 +40,7 @@ static struct menu *current_menu, *current_entry; struct symbol *symbol; struct expr *expr; struct menu *menu; - struct kconf_id *id; + const struct kconf_id *id; } %token T_MAINMENU @@ -229,7 +224,7 @@ symbol_option_list: /* empty */ | symbol_option_list T_WORD symbol_option_arg { - struct kconf_id *id = kconf_id_lookup($2, strlen($2)); + const struct kconf_id *id = kconf_id_lookup($2, strlen($2)); if (id && id->flags & TF_OPTION) menu_add_option(id->token, $3); else @@ -503,10 +498,8 @@ void conf_parse(const char *name) modules_sym->flags |= SYMBOL_AUTO; rootmenu.prompt = menu_add_prompt(P_MENU, "Buildroot Configuration", NULL); -#if YYDEBUG if (getenv("ZCONF_DEBUG")) zconfdebug = 1; -#endif zconfparse(); if (zconfnerrs) exit(1); @@ -545,7 +538,7 @@ static const char *zconf_tokenname(int token) return ""; } -static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken) +static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken) { if (id->token != endtoken) { zconf_error("unexpected '%s' within %s block", @@ -590,9 +583,7 @@ static void zconf_error(const char *err, ...) static void zconferror(const char *err) { -#if YYDEBUG fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err); -#endif } static void print_quoted_string(FILE *out, const char *str) @@ -741,7 +732,7 @@ void zconfdump(FILE *out) } } -#include "lex.zconf.c" +#include "zconf.lex.c" #include "util.c" #include "confdata.c" #include "expr.c" diff --git a/support/legal-info/README.header b/support/legal-info/README.header new file mode 100644 index 0000000000..3321adb7ed --- /dev/null +++ b/support/legal-info/README.header @@ -0,0 +1,24 @@ +Most of the packages that were used by Buildroot to produce the image files, +including Buildroot itself, have open-source licenses. It is your +responsibility to comply to the requirements of these licenses. +To make this easier for you, Buildroot collected in this directory some +material you may need to get it done. + +This material is composed of the following items. + * The scripts used to control compilation of the packages and the generation + of image files, i.e. the Buildroot sources. + Note: this has not been saved due to technical limitations, you must + collect it manually. + * The Buildroot configuration file; this has been saved in buildroot.config. + * The toolchain (cross-compiler and related tools) used to generate all the + compiled programs. + Note: this has not been saved due to technical limitations, you must + collect it manually. + * The source code for all packages; this has been saved in the sources/ + subdirectory (except for the proprietary packages, which have not been + saved); patches applied to some packages by Buildroot are included in the + Buildroot sources and were not duplicated in the sources/ subdirectory. + * A manifest file listing the configured packages and related information. + * The license text of the packages; they have been saved in the licenses/ + subdirectory. + diff --git a/support/legal-info/README.warnings-header b/support/legal-info/README.warnings-header new file mode 100644 index 0000000000..cd0829069c --- /dev/null +++ b/support/legal-info/README.warnings-header @@ -0,0 +1,4 @@ +Due to technical limitations or lack of license definition in the package +makefile, some of the material listed above could not been saved, as the +following list details. + diff --git a/package/buildroot-libtool-v1.5.patch b/support/libtool/buildroot-libtool-v1.5.patch similarity index 100% rename from package/buildroot-libtool-v1.5.patch rename to support/libtool/buildroot-libtool-v1.5.patch diff --git a/package/buildroot-libtool-v2.2.patch b/support/libtool/buildroot-libtool-v2.2.patch similarity index 100% rename from package/buildroot-libtool-v2.2.patch rename to support/libtool/buildroot-libtool-v2.2.patch diff --git a/support/libtool/buildroot-libtool-v2.4.patch b/support/libtool/buildroot-libtool-v2.4.patch new file mode 100644 index 0000000000..d82d610624 --- /dev/null +++ b/support/libtool/buildroot-libtool-v2.4.patch @@ -0,0 +1,47 @@ +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -1416,8 +1416,8 @@ + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then +- func_echo "unable to infer tagged configuration" +- func_fatal_error "specify a tag with \`--tag'" ++ func_echo "defaulting to \`CC'" ++ func_echo "if this is not correct, specify a tag with \`--tag'" + # else + # func_verbose "using $tagname tagged configuration" + fi +@@ -2962,8 +2962,11 @@ + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. +- test "$inst_prefix_dir" = "$destdir" && \ +- func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" ++ # ++ # This breaks install into our staging area. -PB ++ # ++ # test "$inst_prefix_dir" = "$destdir" && \ ++ # func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. +@@ -6683,7 +6686,7 @@ + *) + if test "$installed" = no; then + func_append notinst_deplibs " $lib" +- need_relink=yes ++ need_relink=no + fi + ;; + esac +@@ -9257,6 +9260,10 @@ + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do ++ # Replacing uninstalled with installed can easily break crosscompilation, ++ # since the installed path is generally the wrong architecture. -CL ++ newdependency_libs="$newdependency_libs $deplib" ++ continue + case $deplib in + *.la) + func_basename "$deplib" diff --git a/support/misc/target-dir-warning.txt b/support/misc/target-dir-warning.txt new file mode 100644 index 0000000000..90f88414b7 --- /dev/null +++ b/support/misc/target-dir-warning.txt @@ -0,0 +1,29 @@ +Warning! +======== + +This directory does *not* contain the root filesystem that you can use +on your embedded system. Since Buildroot does not run as root, it +cannot create device files and set the permissions and ownership of +files correctly in this directory to make it usable as a root +filesystem. + +For that reason, do *not* use the contents of this directory to mount +your root filesystem over NFS or copy the contents of this directory +to a SD card or USB key, thinking it will work as the root filesystem +for your embedded system. It will simply *not* work. + +Instead, if you need a usable root filesystem, please select one of +the filesystem image formats available in the Buildroot configuration +interface (make menuconfig or others) in the "Filesystem images" +sub-menu. If you want to get a filesystem image that you can easily +extract to your SD card or to some directory exposed through NFS, +please use the "tar the root filesystem" option. It will generate a +images/rootfs.tar image in your Buildroot output directory, which you +can extract as root: + + sudo tar -C /destination/of/extraction -xf images/rootfs.tar + +Those image files are created using the contents of the target/ +directory, but there is a post-processing step to create device files +and set owernship/permissions properly even if Buildroot does not run +as root. diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh new file mode 100755 index 0000000000..ff72b45240 --- /dev/null +++ b/support/scripts/apply-patches.sh @@ -0,0 +1,131 @@ +#! /bin/bash +# A little script I whipped up to make it easy to +# patch source trees and have sane error handling +# -Erik +# +# (c) 2002 Erik Andersen +# +# Parameters: +# - the build directory, optional, default value is '.'. The place where are +# the package sources. +# - the patch directory, optional, default '../kernel-patches'. The place +# where are the scripts you want to apply. +# - other parameters are the patch name patterns, optional, default value is +# '*'. Pattern(s) describing the patch names you want to apply. +# +# The script will look recursively for patches from the patch directory. If a +# file is named 'series' then only patches mentionned into it will be applied. +# If not, the script will look for file names matching pattern(s). If the name +# ends with '.tar.*', '.tbz2' or '.tgz', the file is considered as an archive +# and will be uncompressed into a directory named +# '.patches-name_of_the_archive-unpacked'. It's the turn of this directory to +# be scanned with '*' as pattern. Remember that scanning is recursive. Other +# files than series file and archives are considered as a patch. +# +# Once a patch is found, the script will try to apply it. If its name doesn't +# end with '.gz', '.bz', '.bz2', '.xz', '.zip', '.Z', '.diff*' or '.patch*', +# it will be skipped. If necessary, the patch will be uncompressed before being +# applied. The list of the patches applied is stored in '.applied_patches_list' +# file in the build directory. + +# Set directories from arguments, or use defaults. +builddir=${1-.} +patchdir=${2-../kernel-patches} +shift 2 +patchpattern=${@-*} + +# use a well defined sorting order +export LC_COLLATE=C + +if [ ! -d "${builddir}" ] ; then + echo "Aborting. '${builddir}' is not a directory." + exit 1 +fi +if [ ! -d "${patchdir}" ] ; then + echo "Aborting. '${patchdir}' is not a directory." + exit 1 +fi + +# Remove any rejects present BEFORE patching - Because if there are +# any, even if patches are well applied, at the end it will complain +# about rejects in builddir. +find ${builddir}/ '(' -name '*.rej' -o -name '.*.rej' ')' -print0 | \ + xargs -0 -r rm -f + +function apply_patch { + path=$1 + patch=$2 + case "$patch" in + *.gz) + type="gzip"; uncomp="gunzip -dc"; ;; + *.bz) + type="bzip"; uncomp="bunzip -dc"; ;; + *.bz2) + type="bzip2"; uncomp="bunzip2 -dc"; ;; + *.xz) + type="xz"; uncomp="unxz -dc"; ;; + *.zip) + type="zip"; uncomp="unzip -d"; ;; + *.Z) + type="compress"; uncomp="uncompress -c"; ;; + *.diff*) + type="diff"; uncomp="cat"; ;; + *.patch*) + type="patch"; uncomp="cat"; ;; + *) + echo "Unsupported file type for ${path}/${patch}, skipping"; + return 0 + ;; + esac + echo "" + echo "Applying $patch using ${type}: " + if [ ! -e "${path}/$patch" ] ; then + echo "Error: missing patch file ${path}/$patch" + exit 1 + fi + echo $patch >> ${builddir}/.applied_patches_list + ${uncomp} "${path}/$patch" | patch -g0 -p1 -E -d "${builddir}" -t -N + if [ $? != 0 ] ; then + echo "Patch failed! Please fix ${patch}!" + exit 1 + fi +} + +function scan_patchdir { + path=$1 + shift 1 + patches=${@-*} + + # If there is a series file, use it instead of using ls sort order + # to apply patches. Skip line starting with a dash. + if [ -e "${path}/series" ] ; then + for i in `grep -Ev "^#" ${path}/series 2> /dev/null` ; do + apply_patch "$path" "$i" + done + else + for i in `cd $path; ls -d $patches 2> /dev/null` ; do + if [ -d "${path}/$i" ] ; then + scan_patchdir "${path}/$i" + elif echo "$i" | grep -q -E "\.tar(\..*)?$|\.tbz2?$|\.tgz$" ; then + unpackedarchivedir="$builddir/.patches-$(basename $i)-unpacked" + rm -rf "$unpackedarchivedir" 2> /dev/null + mkdir "$unpackedarchivedir" + tar -C "$unpackedarchivedir" -xaf "${path}/$i" + scan_patchdir "$unpackedarchivedir" + else + apply_patch "$path" "$i" + fi + done + fi +} + +scan_patchdir "$patchdir" "$patchpattern" + +# Check for rejects... +if [ "`find $builddir/ '(' -name '*.rej' -o -name '.*.rej' ')' -print`" ] ; then + echo "Aborting. Reject files found." + exit 1 +fi + +# Remove backup files +find $builddir/ '(' -name '*.orig' -o -name '.*.orig' ')' -exec rm -f {} \; diff --git a/scripts/build-ext3-img b/support/scripts/build-ext3-img similarity index 100% rename from scripts/build-ext3-img rename to support/scripts/build-ext3-img diff --git a/support/scripts/eclipse-register-toolchain b/support/scripts/eclipse-register-toolchain new file mode 100755 index 0000000000..6f919985c0 --- /dev/null +++ b/support/scripts/eclipse-register-toolchain @@ -0,0 +1,76 @@ +#!/bin/sh + +# This script registers the toolchain of a Buildroot project into the +# Eclipse plugin. To do so, it adds a new line for the Buildroot +# toolchain into the $HOME/.buildroot-eclipse.toolchains file, which +# the Eclipse Buildroot plugin reads to discover automatically the +# available Buildroot toolchains on the system. +# +# This script should typically not be called manually. Instead, one +# should enable the BR2_ECLIPSE_REGISTER configuration option, which +# will lead Buildroot to automatically call this script with the +# appropriate arguments. +# +# Usage: +# eclipse-register-toolchain project-directory toolchain-prefix architecture +# +# project-directory is the absolute path to the Buildroot project +# output directory (which contains the host/, target/, build/, +# images/, etc. subdirectories). It should be an absolute and +# canonical path. +# +# toolchain-prefix is the prefix of the cross-compilation tools, i.e +# 'arm-linux-' if the cross-compiler executable is 'arm-linux-gcc'. +# +# architecture is the lower-cased name of the architecture targetted +# by the Buildroot project. + +if test $# -ne 3; then + echo "Invalid number of arguments." + echo "Usage: $0 project-directory toolchain-prefix architecture" + exit 1 +fi + +project_directory=$1 +toolchain_prefix=$2 +architecture=$3 + +if test ! -d ${project_directory} ; then + echo "Non-existing project directory ${project_directory}" + exit 1 +fi + +if test ! -d ${project_directory}/host ; then + echo "Your project directory does not look like a Buildroot output" + exit 1 +fi + +if test ! -e ${project_directory}/host/usr/bin/${toolchain_prefix}gcc ; then + echo "Cannot find the cross-compiler in the project directory" + exit 1 +fi + +TOOLCHAIN_ECLIPSE_FILE=${HOME}/.buildroot-eclipse.toolchains + +# First, we remove all lines from the ${TOOLCHAIN_ECLISPE_FILE} that +# correspond to toolchains that no longer exist. +if test -f ${TOOLCHAIN_ECLIPSE_FILE} ; then + mv ${TOOLCHAIN_ECLIPSE_FILE} ${TOOLCHAIN_ECLIPSE_FILE}.tmp + cat ${TOOLCHAIN_ECLIPSE_FILE}.tmp | while read toolchain ; do + path=$(echo ${toolchain} | cut -f1 -d ':') + # Filter lines corresponding to still existing projects + echo "Testing ${path} ..." + if ! test -d ${path} ; then + continue + fi + # .. and the current project + if test ${path} = ${project_directory} ; then + continue + fi + echo ${toolchain} >> ${TOOLCHAIN_ECLIPSE_FILE} + done + rm ${TOOLCHAIN_ECLIPSE_FILE}.tmp +fi + +# Add the toolchain +echo "${project_directory}:${toolchain_prefix}:${architecture}" >> ${TOOLCHAIN_ECLIPSE_FILE} diff --git a/support/scripts/gen-manual-lists.py b/support/scripts/gen-manual-lists.py new file mode 100755 index 0000000000..4546e07656 --- /dev/null +++ b/support/scripts/gen-manual-lists.py @@ -0,0 +1,378 @@ +#!/usr/bin/env python +## +## gen-manual-lists.py +## +## This script generates the following Buildroot manual appendices: +## - the package tables (one for the target, the other for host tools); +## - the deprecated items. +## +## Author(s): +## - Samuel Martin +## +## Copyright (C) 2013 Samuel Martin +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## + +## Note about python2. +## +## This script can currently only be run using python2 interpreter due to +## its kconfiglib dependency (which is not yet python3 friendly). + +from __future__ import print_function +from __future__ import unicode_literals + +import os +import re +import sys +import datetime +from argparse import ArgumentParser + +try: + import kconfiglib +except ImportError: + message = """ +Could not find the module 'kconfiglib' in the PYTHONPATH: +""" + message += "\n".join([" {0}".format(path) for path in sys.path]) + message += """ + +Make sure the Kconfiglib directory is in the PYTHONPATH, then relaunch the +script. + +You can get kconfiglib from: + https://github.com/ulfalizer/Kconfiglib + + +""" + sys.stderr.write(message) + raise + + +def get_symbol_subset(root, filter_func): + """ Return a generator of kconfig items. + + :param root_item: Root item of the generated subset of items + :param filter_func: Filter function + + """ + if hasattr(root, "get_items"): + get_items = root.get_items + elif hasattr(root, "get_top_level_items"): + get_items = root.get_top_level_items + else: + message = "The symbol does not contain any subset of symbols" + raise Exception(message) + for item in get_items(): + if item.is_symbol(): + if not item.prompts: + continue + if not filter_func(item): + continue + yield item + elif item.is_menu() or item.is_choice(): + for i in get_symbol_subset(item, filter_func): + yield i + + +def get_symbol_parents(item, root=None, enable_choice=False): + """ Return the list of the item's parents. The last item of the list is + the closest parent, the first the furthest. + + :param item: Item from which the the parent list is generated + :param root: Root item stopping the search (not included in the + parent list) + :param enable_choice: Flag enabling choices to appear in the parent list + + """ + parent = item.get_parent() + parents = [] + while parent and parent != root: + if parent.is_menu(): + parents.append(parent.get_title()) + elif enable_choice and parent.is_choice(): + parents.append(parent.prompts[0][0]) + parent = parent.get_parent() + if isinstance(root, kconfiglib.Menu) or \ + (enable_choice and isinstance(root, kconfiglib.Choice)): + parents.append("") # Dummy empty parent to get a leading arrow -> + parents.reverse() + return parents + + +def format_asciidoc_table(root, get_label_func, filter_func=lambda x: True, + enable_choice=False, sorted=True, sub_menu=True, + item_label=None): + """ Return the asciidoc formatted table of the items and their location. + + :param root: Root item of the item subset + :param get_label_func: Item's label getter function + :param filter_func: Filter function to apply on the item subset + :param enable_choice: Enable choices to appear as part of the item's + location + :param sorted: Flag to alphabetically sort the table + :param sub_menu: Output the column with the sub-menu path + + """ + def _format_entry(item, parents, sub_menu): + """ Format an asciidoc table entry. + + """ + if sub_menu: + return "| {0:<40} <| {1}\n".format(item, " -> ".join(parents)) + else: + return "| {0:<40}\n".format(item) + lines = [] + for item in get_symbol_subset(root, filter_func): + if not item.is_symbol() or not item.prompts: + continue + loc = get_symbol_parents(item, root, enable_choice=enable_choice) + lines.append(_format_entry(get_label_func(item), loc, sub_menu)) + if sorted: + lines.sort(key=lambda x: x.lower()) + if hasattr(root, "get_title"): + loc_label = get_symbol_parents(root, None, enable_choice=enable_choice) + loc_label += [root.get_title(), "..."] + else: + loc_label = ["Location"] + if not item_label: + item_label = "Items" + table = ":halign: center\n\n" + if sub_menu: + width = "100%" + columns = "^1,4" + else: + width = "30%" + columns = "^1" + table = "[width=\"{0}\",cols=\"{1}\",options=\"header\"]\n".format(width, columns) + table += "|===================================================\n" + table += _format_entry(item_label, loc_label, sub_menu) + table += "\n" + "".join(lines) + "\n" + table += "|===================================================\n" + return table + + +class Buildroot: + """ Buildroot configuration object. + + """ + root_config = "Config.in" + package_dirname = "package" + package_prefixes = ["BR2_PACKAGE_", "BR2_PACKAGE_HOST_"] + re_pkg_prefix = re.compile(r"^(" + "|".join(package_prefixes) + ").*") + deprecated_symbol = "BR2_DEPRECATED" + list_in = """\ +// +// Automatically generated list for Buildroot manual. +// + +{table} +""" + + list_info = { + 'target-packages': { + 'filename': "package-list", + 'root_menu': "Target packages", + 'filter': "_is_package", + 'sorted': True, + 'sub_menu': True, + }, + 'host-packages': { + 'filename': "host-package-list", + 'root_menu': "Host utilities", + 'filter': "_is_package", + 'sorted': True, + 'sub_menu': False, + }, + 'deprecated': { + 'filename': "deprecated-list", + 'root_menu': None, + 'filter': "_is_deprecated", + 'sorted': False, + 'sub_menu': True, + }, + } + + def __init__(self): + self.base_dir = os.environ.get("TOPDIR") + self.output_dir = os.environ.get("O") + self.package_dir = os.path.join(self.base_dir, self.package_dirname) + # The kconfiglib requires an environment variable named "srctree" to + # load the configuration, so set it. + os.environ.update({'srctree': self.base_dir}) + self.config = kconfiglib.Config(os.path.join(self.base_dir, + self.root_config)) + self._deprecated = self.config.get_symbol(self.deprecated_symbol) + + self.gen_date = datetime.datetime.utcnow() + self.br_version_full = os.environ.get("BR2_VERSION_FULL") + if self.br_version_full and self.br_version_full.endswith("-git"): + self.br_version_full = self.br_version_full[:-4] + if not self.br_version_full: + self.br_version_full = "undefined" + + def _get_package_symbols(self, package_name): + """ Return a tuple containing the target and host package symbol. + + """ + symbols = re.sub("[-+.]", "_", package_name) + symbols = symbols.upper() + symbols = tuple([prefix + symbols for prefix in self.package_prefixes]) + return symbols + + def _is_deprecated(self, symbol): + """ Return True if the symbol is marked as deprecated, otherwise False. + + """ + return self._deprecated in symbol.get_referenced_symbols() + + def _is_package(self, symbol): + """ Return True if the symbol is a package or a host package, otherwise + False. + + """ + if not self.re_pkg_prefix.match(symbol.get_name()): + return False + pkg_name = re.sub("BR2_PACKAGE_(HOST_)?(.*)", r"\2", symbol.get_name()) + + pattern = "^(HOST_)?" + pkg_name + "$" + pattern = re.sub("_", ".", pattern) + pattern = re.compile(pattern, re.IGNORECASE) + # Here, we cannot just check for the location of the Config.in because + # of the "virtual" package. + # + # So, to check that a symbol is a package (not a package option or + # anything else), we check for the existence of the package *.mk file. + # + # By the way, to actually check for a package, we should grep all *.mk + # files for the following regex: + # "\$\(eval \$\((host-)?(generic|autotools|cmake)-package\)\)" + # + # Implementation details: + # + # * The package list is generated from the *.mk file existence, the + # first time this function is called. Despite the memory consumption, + # this list is stored because the execution time of this script is + # noticeably shorter than rescanning the package sub-tree for each + # symbol. + if not hasattr(self, "_package_list"): + pkg_list = [] + for _, _, files in os.walk(self.package_dir): + for file_ in (f for f in files if f.endswith(".mk")): + pkg_list.append(re.sub(r"(.*?)\.mk", r"\1", file_)) + setattr(self, "_package_list", pkg_list) + for pkg in getattr(self, "_package_list"): + if pattern.match(pkg): + return True + return False + + def _get_symbol_label(self, symbol, mark_deprecated=True): + """ Return the label (a.k.a. prompt text) of the symbol. + + :param symbol: The symbol + :param mark_deprecated: Append a 'deprecated' to the label + + """ + label = symbol.prompts[0][0] + if self._is_deprecated(symbol) and mark_deprecated: + label += " *(deprecated)*" + return label + + def print_list(self, list_type, enable_choice=True, enable_deprecated=True, + dry_run=False, output=None): + """ Print the requested list. If not dry run, then the list is + automatically written in its own file. + + :param list_type: The list type to be generated + :param enable_choice: Flag enabling choices to appear in the list + :param enable_deprecated: Flag enabling deprecated items to appear in + the package lists + :param dry_run: Dry run (print the list in stdout instead of + writing the list file + + """ + def _get_menu(title): + """ Return the first symbol menu matching the given title. + + """ + menus = self.config.get_menus() + menu = [m for m in menus if m.get_title().lower() == title.lower()] + if not menu: + message = "No such menu: '{0}'".format(title) + raise Exception(message) + return menu[0] + + list_config = self.list_info[list_type] + root_title = list_config.get('root_menu') + if root_title: + root_item = _get_menu(root_title) + else: + root_item = self.config + filter_ = getattr(self, list_config.get('filter')) + filter_func = lambda x: filter_(x) + if not enable_deprecated and list_type != "deprecated": + filter_func = lambda x: filter_(x) and not self._is_deprecated(x) + mark_depr = list_type != "deprecated" + get_label = lambda x: self._get_symbol_label(x, mark_depr) + item_label = "Features" if list_type == "deprecated" else "Packages" + + table = format_asciidoc_table(root_item, get_label, + filter_func=filter_func, + enable_choice=enable_choice, + sorted=list_config.get('sorted'), + sub_menu=list_config.get('sub_menu'), + item_label=item_label) + + content = self.list_in.format(table=table) + + if dry_run: + print(content) + return + + if not output: + output_dir = self.output_dir + if not output_dir: + print("Warning: Undefined output directory.") + print("\tUse source directory as output location.") + output_dir = self.base_dir + output = os.path.join(output_dir, + list_config.get('filename') + ".txt") + if not os.path.exists(os.path.dirname(output)): + os.makedirs(os.path.dirname(output)) + print("Writing the {0} list in:\n\t{1}".format(list_type, output)) + with open(output, 'w') as fout: + fout.write(content) + + +if __name__ == '__main__': + list_types = ['target-packages', 'host-packages', 'deprecated'] + parser = ArgumentParser() + parser.add_argument("list_type", nargs="?", choices=list_types, + help="""\ +Generate the given list (generate all lists if unspecified)""") + parser.add_argument("-n", "--dry-run", dest="dry_run", action='store_true', + help="Output the generated list to stdout") + parser.add_argument("--output-target", dest="output_target", + help="Output target package file") + parser.add_argument("--output-host", dest="output_host", + help="Output host package file") + parser.add_argument("--output-deprecated", dest="output_deprecated", + help="Output deprecated file") + args = parser.parse_args() + lists = [args.list_type] if args.list_type else list_types + buildroot = Buildroot() + for list_name in lists: + output = getattr(args, "output_" + list_name.split("-", 1)[0]) + buildroot.print_list(list_name, dry_run=args.dry_run, output=output) diff --git a/support/scripts/graph-depends b/support/scripts/graph-depends new file mode 100755 index 0000000000..ac240867bc --- /dev/null +++ b/support/scripts/graph-depends @@ -0,0 +1,223 @@ +#!/usr/bin/python + +# Usage (the graphviz package must be installed in your distribution) +# ./support/scripts/graph-depends [package-name] > test.dot +# dot -Tpdf test.dot -o test.pdf +# +# With no arguments, graph-depends will draw a complete graph of +# dependencies for the current configuration. With an argument, +# graph-depends will draw a graph of dependencies for the given +# package name. +# +# Limitations +# +# * Some packages have dependencies that depend on the Buildroot +# configuration. For example, many packages have a dependency on +# openssl if openssl has been enabled. This tool will graph the +# dependencies as they are with the current Buildroot +# configuration. +# +# Copyright (C) 2010-2013 Thomas Petazzoni + +import sys +import subprocess + +# In FULL_MODE, we draw the full dependency graph for all selected +# packages +FULL_MODE = 1 + +# In PKG_MODE, we only draw the dependency graph for a given package +PKG_MODE = 2 + +mode = 0 + +if len(sys.argv) == 1: + mode = FULL_MODE +elif len(sys.argv) == 2: + mode = PKG_MODE + rootpkg = sys.argv[1] +else: + print "Usage: graph-depends [package-name]" + sys.exit(1) + +allpkgs = [] + +# Execute the "make show-targets" command to get the list of the main +# Buildroot TARGETS and return it formatted as a Python list. This +# list is used as the starting point for full dependency graphs +def get_targets(): + sys.stderr.write("Getting targets\n") + cmd = ["make", "-s", "show-targets"] + p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + output = p.communicate()[0].strip() + if p.returncode != 0: + return None + if output == '': + return [] + return output.split(' ') + +# Execute the "make -show-depends" command to get the list of +# dependencies of a given list of packages, and return the list of +# dependencies formatted as a Python dictionary. +def get_depends(pkgs): + sys.stderr.write("Getting dependencies for %s\n" % pkgs) + cmd = ["make", "-s" ] + for pkg in pkgs: + cmd.append("%s-show-depends" % pkg) + p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + output = p.communicate()[0] + if p.returncode != 0: + sys.stderr.write("Error getting dependencies %s\n" % pkgs) + sys.exit(1) + output = output.split("\n") + if len(output) != len(pkgs) + 1: + sys.stderr.write("Error getting dependencies\n") + sys.exit(1) + deps = {} + for i in range(0, len(pkgs)): + pkg = pkgs[i] + pkg_deps = output[i].split(" ") + if pkg_deps == ['']: + deps[pkg] = [] + else: + deps[pkg] = pkg_deps + return deps + +# Recursive function that builds the tree of dependencies for a given +# list of packages. The dependencies are built in a list called +# 'dependencies', which contains tuples of the form (pkg1 -> +# pkg2_on_which_pkg1_depends, pkg3 -> pkg4_on_which_pkg3_depends) and +# the function finally returns this list. +def get_all_depends(pkgs): + dependencies = [] + + # Filter the packages for which we already have the dependencies + filtered_pkgs = [] + for pkg in pkgs: + if pkg in allpkgs: + continue + filtered_pkgs.append(pkg) + allpkgs.append(pkg) + + if len(filtered_pkgs) == 0: + return [] + + depends = get_depends(filtered_pkgs) + + deps = set() + for pkg in filtered_pkgs: + pkg_deps = depends[pkg] + + # This package has no dependency. + if pkg_deps == []: + continue + + # Add dependencies to the list of dependencies + for dep in pkg_deps: + dependencies.append((pkg, dep)) + deps.add(dep) + + if len(deps) != 0: + newdeps = get_all_depends(deps) + if newdeps != None: + dependencies += newdeps + + return dependencies + +# The Graphviz "dot" utility doesn't like dashes in node names. So for +# node names, we strip all dashes. +def pkg_node_name(pkg): + return pkg.replace("-","") + +# Helper function for remove_redundant_deps(). This function tells +# whether package "pkg" is the dependency of another package that is +# not the special "all" package. +def has_redundant_deps(deps, pkg): + for dep in deps: + if dep[0] != "all" and dep[1] == pkg: + return True + return False + +# This function removes redundant dependencies of the special "all" +# package. This "all" package is created to reflect the origin of the +# selection for all packages that are not themselves selected by any +# other package. So for example if you enable libpng, zlib is enabled +# as a dependency. But zlib being selected by libpng, it also appears +# as a dependency of the "all" package. This needlessly complicates +# the generated dependency graph. So when we have the dependency list +# (all -> zlib, all -> libpn, libpng -> zlib), we get rid of the 'all +# -> zlib' dependency, because zlib is already a dependency of a +# regular package. +def remove_redundant_deps(deps): + newdeps = [] + for dep in deps: + if dep[0] != "all": + newdeps.append(dep) + continue + if not has_redundant_deps(deps, dep[1]): + newdeps.append(dep) + continue + sys.stderr.write("Removing redundant dep all -> %s\n" % dep[1]) + return newdeps + +TARGET_EXCEPTIONS = [ + "target-generic-securetty", + "target-generic-issue", + "target-generic-getty-busybox", + "target-generic-do-remount-rw", + "target-generic-dont-remount-rw", + "target-finalize", + "erase-fakeroots", + "target-generic-hostname", + "target-root-passwd", + "target-post-image", + "target-purgelocales", +] + +# In full mode, start with the result of get_targets() to get the main +# targets and then use get_all_depends() for all targets +if mode == FULL_MODE: + targets = get_targets() + dependencies = [] + allpkgs.append('all') + filtered_targets = [] + for tg in targets: + # Skip uninteresting targets + if tg in TARGET_EXCEPTIONS: + continue + dependencies.append(('all', tg)) + filtered_targets.append(tg) + deps = get_all_depends(filtered_targets) + if deps != None: + dependencies += deps + +# In pkg mode, start directly with get_all_depends() on the requested +# package +elif mode == PKG_MODE: + dependencies = get_all_depends([rootpkg]) + +dependencies = remove_redundant_deps(dependencies) + +# Start printing the graph data +print "digraph G {" + +# First, the dependencies. Usage of set allows to remove duplicated +# dependencies in the graph +for dep in set(dependencies): + print "%s -> %s" % (pkg_node_name(dep[0]), pkg_node_name(dep[1])) + +# Then, the node attributes: color, style and label. +for pkg in allpkgs: + if pkg == 'all': + print "all [label = \"ALL\"]" + print "all [color=lightblue,style=filled]" + continue + + print "%s [label = \"%s\"]" % (pkg_node_name(pkg), pkg) + + if mode == PKG_MODE and pkg == rootpkg: + print "%s [color=lightblue,style=filled]" % pkg_node_name(rootpkg) + else: + print "%s [color=grey,style=filled]" % pkg_node_name(pkg) + +print "}" diff --git a/support/scripts/kconfiglib.py b/support/scripts/kconfiglib.py new file mode 100644 index 0000000000..0704cc0573 --- /dev/null +++ b/support/scripts/kconfiglib.py @@ -0,0 +1,3772 @@ +# This is Kconfiglib, a Python library for scripting, debugging, and extracting +# information from Kconfig-based configuration systems. To view the +# documentation, run +# +# $ pydoc kconfiglib +# +# or, if you prefer HTML, +# +# $ pydoc -w kconfiglib +# +# The examples/ subdirectory contains examples, to be run with e.g. +# +# $ make scriptconfig SCRIPT=Kconfiglib/examples/print_tree.py +# +# Look in testsuite.py for the test suite. + +""" +Kconfiglib is a Python library for scripting and extracting information from +Kconfig-based configuration systems. Features include the following: + + - Symbol values and properties can be looked up and values assigned + programmatically. + - .config files can be read and written. + - Expressions can be evaluated in the context of a Kconfig configuration. + - Relations between symbols can be quickly determined, such as finding all + symbols that reference a particular symbol. + - Highly compatible with the scripts/kconfig/*conf utilities. The test suite + automatically compares outputs between Kconfiglib and the C implementation + for a large number of cases. + +For the Linux kernel, scripts are run using + + $ make scriptconfig SCRIPT= [SCRIPT_ARG=] + +Running scripts via the 'scriptconfig' target ensures that required environment +variables (SRCARCH, ARCH, srctree, KERNELVERSION, etc.) are set up correctly. +Alternative architectures can be specified like for other 'make *config' +targets: + + $ make scriptconfig ARCH=mips SCRIPT= [SCRIPT_ARG=] + +The script will receive the name of the Kconfig file to load in sys.argv[1]. +(As of Linux 3.7.0-rc8 this is always "Kconfig" from the kernel top-level +directory.) If an argument is provided with SCRIPT_ARG, it will appear in +sys.argv[2]. + +To get an interactive Python prompt with Kconfiglib preloaded and a Config +object 'c' created, use + + $ make iscriptconfig [ARCH=] + +Kconfiglib requires Python 2. For (i)scriptconfig the command to run the Python +interpreter can be passed in the environment variable PYTHONCMD (defaults to +'python'; PyPy works too and is a bit faster). + +Look in the examples/ subdirectory for examples, which can be run with e.g. + + $ make scriptconfig SCRIPT=Kconfiglib/examples/print_tree.py + +or + + $ make scriptconfig SCRIPT=Kconfiglib/examples/help_grep.py SCRIPT_ARG="kernel" + +Look in testsuite.py for the test suite. + +Credits: Written by Ulf "Ulfalizer" Magnusson + +Send bug reports, suggestions and other feedback to kconfiglib@gmail.com . +Don't wrestle with internal APIs. Tell me what you need and I might add it in a +safe way as a client API instead.""" + +# If you have Psyco installed (32-bit installations, Python <= 2.6 only), +# setting this to True (right here, not at runtime) might give a nice speedup. +# (22% faster for parsing arch/x86/Kconfig and 58% faster for evaluating all +# symbols in it without a .config on my Core Duo.) +use_psyco = False + +import os +import re +import string +import sys + +class Config(): + + """Represents a Kconfig configuration, e.g. for i386 or ARM. This is the + set of symbols and other items appearing in the configuration together with + their values. Creating any number of Config objects -- including for + different architectures -- is safe; Kconfiglib has no global state.""" + + # + # Public interface + # + + def __init__(self, + filename = "Kconfig", + base_dir = "$srctree", + print_warnings = True, + print_undef_assign = False): + """Creates a new Config object, representing a Kconfig configuration. + Raises Kconfig_Syntax_Error on syntax errors. + + filename (default: "Kconfig") -- The base Kconfig file of the + configuration. For the Linux kernel, this should usually be be + "Kconfig" from the top-level directory, as environment + variables will make sure the right Kconfig is included from + there (usually arch//Kconfig). If you are using + kconfiglib via 'make scriptconfig' the filename of the + correct Kconfig will be in sys.argv[1]. + + base_dir (default: "$srctree") -- The base directory relative to which + 'source' statements within Kconfig files will work. For the + Linux kernel this should be the top-level directory of the + kernel tree. $-references to environment variables will be + expanded. + + The environment variable 'srctree' is set by the Linux makefiles + to the top-level kernel directory. A default of "." would not + work if an alternative build directory is used. + + print_warnings (default: True) -- Set to True if warnings related to + this configuration should be printed to stderr. This can + be changed later with Config.set_print_warnings(). It is + provided as a constructor argument since warnings might + be generated during parsing. + + print_undef_assign (default: False) -- Set to True if informational + messages related to assignments to undefined symbols + should be printed to stderr for this configuration. + Can be changed later with + Config.set_print_undef_assign().""" + + # The set of all symbols, indexed by name (a string) + self.syms = {} + + # The set of all defined symbols in the configuration in the order they + # appear in the Kconfig files. This excludes the special symbols n, m, + # and y as well as symbols that are referenced but never defined. + self.kconfig_syms = [] + + # The set of all named choices (yes, choices can have names), indexed + # by name (a string) + self.named_choices = {} + + def register_special_symbol(type, name, value): + sym = Symbol() + sym.is_special_ = True + sym.is_defined_ = True + sym.config = self + sym.name = name + sym.type = type + sym.cached_value = value + self.syms[name] = sym + return sym + + # The special symbols n, m and y, used as shorthand for "n", "m" and + # "y" + self.n = register_special_symbol(TRISTATE, "n", "n") + self.m = register_special_symbol(TRISTATE, "m", "m") + self.y = register_special_symbol(TRISTATE, "y", "y") + + # DEFCONFIG_LIST uses this + register_special_symbol(STRING, "UNAME_RELEASE", os.uname()[2]) + + # The symbol with "option defconfig_list" set, containing a list of + # default .config files + self.defconfig_sym = None + + # See Symbol.get_(src)arch() + self.arch = os.environ.get("ARCH") + self.srcarch = os.environ.get("SRCARCH") + + # See Config.__init__(). We need this for get_defconfig_filename(). + self.srctree = os.environ.get("srctree") + if self.srctree is None: + self.srctree = "." + + self.filename = filename + self.base_dir = _strip_trailing_slash(os.path.expandvars(base_dir)) + + # The 'mainmenu' text + self.mainmenu_text = None + + # The filename of the most recently loaded .config file + self.config_filename = None + + # The textual header of the most recently loaded .config, uncommented + self.config_header = None + + self.print_warnings = print_warnings + self.print_undef_assign = print_undef_assign + + # Lists containing all choices, menus and comments in the configuration + + self.choices = [] + self.menus = [] + self.comments = [] + + # For parsing routines that stop when finding a line belonging to a + # different construct, these holds that line and the tokenized version + # of that line. The purpose is to avoid having to re-tokenize the line, + # which is inefficient and causes problems when recording references to + # symbols. + self.end_line = None + self.end_line_tokens = None + + # See the comment in _parse_expr(). + self.parse_expr_cur_sym_or_choice = None + self.parse_expr_line = None + self.parse_expr_filename = None + self.parse_expr_linenr = None + self.parse_expr_transform_m = None + + # Parse the Kconfig files + self.top_block = self._parse_file(filename, None, None, None) + + # Build Symbol.dep for all symbols + self._build_dep() + + def load_config(self, filename, replace = True): + """Loads symbol values from a file in the familiar .config format. + Equivalent to calling Symbol.set_user_value() to set each of the + values. + + filename -- The .config file to load. $-references to environment + variables will be expanded. For scripts to work even + when an alternative build directory is used with the + Linux kernel, you need to refer to the top-level kernel + directory with "$srctree". + + replace (default: True) -- True if the configuration should replace + the old configuration; False if it should add to it.""" + + def warn_override(filename, linenr, name, old_user_val, new_user_val): + self._warn("overriding the value of {0}. " + 'Old value: "{1}", new value: "{2}".' + .format(name, old_user_val, new_user_val), + filename, + linenr) + + filename = os.path.expandvars(filename) + + # Put this first so that a missing file doesn't screw up our state + line_feeder = _FileFeed(_get_lines(filename), filename) + + self.config_filename = filename + + # Invalidate everything. This is usually faster than finding the + # minimal set of symbols that needs to be invalidated, as nearly all + # symbols will tend to be affected anyway. + if replace: + self.unset_user_values() + else: + self._invalidate_all() + + # Read header + + self.config_header = None + + def is_header_line(line): + return line.startswith("#") and \ + not unset_re.match(line) + + first_line = line_feeder.get_next() + + if first_line is None: + return + + if not is_header_line(first_line): + line_feeder.go_back() + else: + self.config_header = first_line[1:] + + # Read remaining header lines + while 1: + line = line_feeder.get_next() + + if line is None: + break + + if not is_header_line(line): + line_feeder.go_back() + break + + self.config_header += line[1:] + + # Remove trailing newline + if self.config_header.endswith("\n"): + self.config_header = self.config_header[:-1] + + # Read assignments + + filename = line_feeder.get_filename() + + while 1: + line = line_feeder.get_next() + if line is None: + return + + linenr = line_feeder.get_linenr() + + line = line.strip() + + set_re_match = set_re.match(line) + if set_re_match: + name, val = set_re_match.groups() + # The unescaping producedure below should be safe since " can + # only appear as \" inside the string + val = _strip_quotes(val, line, filename, linenr)\ + .replace('\\"', '"').replace("\\\\", "\\") + if name in self.syms: + sym = self.syms[name] + + old_user_val = sym.user_val + if old_user_val is not None: + warn_override(filename, linenr, name, old_user_val, val) + + if sym.is_choice_symbol_: + user_mode = sym.parent.user_mode + if user_mode is not None and user_mode != val: + self._warn("assignment to {0} changes mode of containing " + 'choice from "{1}" to "{2}".' + .format(name, val, user_mode), + filename, + linenr) + + sym._set_user_value_no_invalidate(val, True) + + else: + self._undef_assign('attempt to assign the value "{0}" to the ' + "undefined symbol {1}." + .format(val, name), + filename, + linenr) + + else: + unset_re_match = unset_re.match(line) + if unset_re_match: + name = unset_re_match.group(1) + if name in self.syms: + sym = self.syms[name] + + old_user_val = sym.user_val + if old_user_val is not None: + warn_override(filename, linenr, name, old_user_val, "n") + + sym._set_user_value_no_invalidate("n", True) + + def write_config(self, filename, header = None): + """Writes out symbol values in the familiar .config format. + + filename -- The filename under which to save the configuration. + + header (default: None) -- A textual header that will appear at the + beginning of the file, with each line commented out + automatically. None means no header.""" + + # already_written is set when _make_conf() is called on a symbol, so + # that symbols defined in multiple locations only get one entry in the + # .config. We need to reset it prior to writing out a new .config. + for sym in self.syms.itervalues(): + sym.already_written = False + + with open(filename, "w") as f: + # Write header + if header is not None: + f.write(_comment(header)) + f.write("\n") + + # Write configuration. + # (You'd think passing a list around to all the nodes and appending + # to it to avoid copying would be faster, but it's actually a lot + # slower with PyPy, and about as fast with Python. Passing the file + # around is slower too.) + f.write("\n".join(self.top_block._make_conf())) + f.write("\n") + + def get_kconfig_filename(self): + """Returns the name of the (base) kconfig file this configuration was + loaded from.""" + return self.filename + + def get_arch(self): + """Returns the value the environment variable ARCH had at the time the + Config instance was created, or None if ARCH was not set. For the + kernel, this corresponds to the architecture being built for, with + values such as "i386" or "mips".""" + return self.arch + + def get_srcarch(self): + """Returns the value the environment variable SRCARCH had at the time + the Config instance was created, or None if SRCARCH was not set. For + the kernel, this corresponds to the arch/ subdirectory containing + architecture-specific source code.""" + return self.srcarch + + def get_srctree(self): + """Returns the value the environment variable srctree had at the time + the Config instance was created, or None if srctree was not defined. + This variable points to the source directory and is used when building + in a separate directory.""" + return self.srctree + + def get_config_filename(self): + """Returns the name of the most recently loaded configuration file, or + None if no configuration has been loaded.""" + return self.config_filename + + def get_mainmenu_text(self): + """Returns the text of the 'mainmenu' statement (with $-references to + symbols replaced by symbol values), or None if the configuration has no + 'mainmenu' statement.""" + return None if self.mainmenu_text is None else \ + self._expand_sym_refs(self.mainmenu_text) + + def get_defconfig_filename(self): + """Returns the name of the defconfig file, which is the first existing + file in the list given in a symbol having 'option defconfig_list' set. + $-references to symbols will be expanded ("$FOO bar" -> "foo bar" if + FOO has the value "foo"). Returns None in case of no defconfig file. + Setting 'option defconfig_list' on multiple symbols currently results + in undefined behavior. + + If the environment variable 'srctree' was set when the Config was + created, get_defconfig_filename() will first look relative to that + directory before looking in the current directory; see + Config.__init__().""" + + if self.defconfig_sym is None: + return None + + for (filename, cond_expr) in self.defconfig_sym.def_exprs: + if self._eval_expr(cond_expr) == "y": + filename = self._expand_sym_refs(filename) + + # We first look in $srctree. os.path.join() won't work here as + # an absolute path in filename would override $srctree. + srctree_filename = os.path.normpath(self.srctree + "/" + filename) + if os.path.exists(srctree_filename): + return srctree_filename + + if os.path.exists(filename): + return filename + + return None + + def get_symbol(self, name): + """Returns the symbol with name 'name', or None if no such symbol + appears in the configuration. An alternative shorthand is conf[name], + where conf is a Config instance, though that will instead raise + KeyError if the symbol does not exist.""" + return self.syms.get(name) + + def get_top_level_items(self): + """Returns a list containing the items (symbols, menus, choice + statements and comments) at the top level of the configuration -- that + is, all items that do not appear within a menu or choice. The items + appear in the same order as within the configuration.""" + return self.top_block.get_items() + + def get_symbols(self, all_symbols = True): + """Returns a list of symbols from the configuration. An alternative for + iterating over all defined symbols (in the order of definition) is + + for sym in config: + ... + + which relies on Config implementing __iter__() and is equivalent to + + for sym in config.get_symbols(False): + ... + + all_symbols (default: True) -- If True, all symbols - including special + and undefined symbols - will be included in the result, in + an undefined order. If False, only symbols actually defined + and not merely referred to in the configuration will be + included in the result, and will appear in the order that + they are defined within the Kconfig configuration files.""" + return self.syms.values() if all_symbols else self.kconfig_syms + + def get_choices(self): + """Returns a list containing all choice statements in the + configuration, in the order they appear in the Kconfig files.""" + return self.choices + + def get_menus(self): + """Returns a list containing all menus in the configuration, in the + order they appear in the Kconfig files.""" + return self.menus + + def get_comments(self): + """Returns a list containing all comments in the configuration, in the + order they appear in the Kconfig files.""" + return self.comments + + def eval(self, s): + """Returns the value of the expression 's' -- where 's' is represented + as a string -- in the context of the configuration. Raises + Kconfig_Syntax_Error if syntax errors are detected in 's'. + + For example, if FOO and BAR are tristate symbols at least one of which + has the value "y", then config.eval("y && (FOO || BAR)") => "y" + + This functions always yields a tristate value. To get the value of + non-bool, non-tristate symbols, use Symbol.get_value(). + + The result of this function is consistent with how evaluation works for + conditional expressions in the configuration as well as in the C + implementation. "m" and m are rewritten as '"m" && MODULES' and 'm && + MODULES', respectively, and a result of "m" will get promoted to "y" if + we're running without modules.""" + return self._eval_expr(self._parse_expr(self._tokenize(s, True), # Feed + None, # Current symbol or choice + s)) # line + + def get_config_header(self): + """Returns the (uncommented) textual header of the .config file most + recently loaded with load_config(). Returns None if no .config file has + been loaded or if the most recently loaded .config file has no header. + The header comprises all lines up to but not including the first line + that either + + 1. Does not start with "#" + 2. Has the form "# CONFIG_FOO is not set." + """ + return self.config_header + + def get_base_dir(self): + """Returns the base directory relative to which 'source' statements + will work, passed as an argument to Config.__init__().""" + return self.base_dir + + def set_print_warnings(self, print_warnings): + """Determines whether warnings related to this configuration (for + things like attempting to assign illegal values to symbols with + Symbol.set_user_value()) should be printed to stderr. + + print_warnings -- True if warnings should be + printed, otherwise False.""" + self.print_warnings = print_warnings + + def set_print_undef_assign(self, print_undef_assign): + """Determines whether informational messages related to assignments to + undefined symbols should be printed to stderr for this configuration. + + print_undef_assign -- If True, such messages will be printed.""" + self.print_undef_assign = print_undef_assign + + def __getitem__(self, key): + """Returns the symbol with name 'name'. Raises KeyError if the symbol + does not appear in the configuration.""" + return self.syms[key] + + def __iter__(self): + """Convenience function for iterating over the set of all defined + symbols in the configuration, used like + + for sym in conf: + ... + + The iteration happens in the order of definition within the Kconfig + configuration files. Symbols only referred to but not defined will not + be included, nor will the special symbols n, m, and y. If you want to + include such symbols as well, see config.get_symbols().""" + return iter(self.kconfig_syms) + + def unset_user_values(self): + """Resets the values of all symbols, as if Config.load_config() or + Symbol.set_user_value() had never been called.""" + for sym in self.syms.itervalues(): + sym._unset_user_value_no_recursive_invalidate() + + def __str__(self): + """Returns a string containing various information about the Config.""" + return _sep_lines("Configuration", + "File : " + self.filename, + "Base directory : " + self.base_dir, + "Value of $ARCH at creation time : " + + ("(not set)" if self.arch is None else self.arch), + "Value of $SRCARCH at creation time : " + + ("(not set)" if self.srcarch is None else self.srcarch), + "Source tree (derived from $srctree;", + "defaults to '.' if $srctree isn't set) : " + self.srctree, + "Most recently loaded .config : " + + ("(no .config loaded)" if self.config_filename is None else + self.config_filename), + "Print warnings : " + + bool_str[self.print_warnings], + "Print assignments to undefined symbols : " + + bool_str[self.print_undef_assign]) + + + # + # Private methods + # + + def _invalidate_all(self): + for sym in self.syms.itervalues(): + sym._invalidate() + + def _tokenize(self, + s, + for_eval = False, + filename = None, + linenr = None): + """Returns a _Feed instance containing tokens derived from the string + 's'. Registers any new symbols encountered (via _sym_lookup()). + + (I experimented with a pure regular expression implementation, but it + came out slower, less readable, and wouldn't have been as flexible.) + + for_eval -- True when parsing an expression for a call to + Config.eval(), in which case we should not treat the first + token specially nor register new symbols.""" + s = s.lstrip() + if s == "" or s[0] == "#": + return _Feed([]) + + if for_eval: + i = 0 # The current index in the string being tokenized + previous = None # The previous token seen + tokens = [] + else: + # The initial word on a line is parsed specially. Let + # command_chars = [A-Za-z0-9_]. Then + # - leading non-command_chars characters on the line are ignored, and + # - the first token consists the following one or more command_chars + # characters. + # This is why things like "----help--" are accepted. + + initial_token_match = initial_token_re.match(s) + if initial_token_match is None: + return _Feed([]) + # The current index in the string being tokenized + i = initial_token_match.end() + + keyword = keywords.get(initial_token_match.group(1)) + if keyword is None: + # We expect a keyword as the first token + _tokenization_error(s, len(s), filename, linenr) + if keyword == T_HELP: + # Avoid junk after "help", e.g. "---", being registered as a + # symbol + return _Feed([T_HELP]) + tokens = [keyword] + previous = keyword + + # _tokenize() is a hotspot during parsing, and this speeds things up a + # bit + strlen = len(s) + append = tokens.append + + # Main tokenization loop. (Handles tokens past the first one.) + while i < strlen: + # Test for an identifier/keyword preceded by whitespace first; this + # is the most common case. + id_keyword_match = id_keyword_re.match(s, i) + if id_keyword_match: + # We have an identifier or keyword. The above also stripped any + # whitespace for us. + name = id_keyword_match.group(1) + # Jump past it + i = id_keyword_match.end() + + # Keyword? + keyword = keywords.get(name) + if keyword is not None: + append(keyword) + # What would ordinarily be considered a name is treated as a + # string after certain tokens. + elif previous in string_lex: + append(name) + else: + # We're dealing with a symbol. _sym_lookup() will take care + # of allocating a new Symbol instance if it's the first + # time we see it. + sym = self._sym_lookup(name, not for_eval) + + if previous == T_CONFIG or previous == T_MENUCONFIG: + # If the previous token is T_(MENU)CONFIG + # ("(menu)config"), we're tokenizing the first line of + # a symbol definition, and should remember this as a + # location where the symbol is defined. + sym.def_locations.append((filename, linenr)) + else: + # Otherwise, it's a reference to the symbol + sym.ref_locations.append((filename, linenr)) + + append(sym) + + else: + # This restrips whitespace that could have been stripped in the + # regex above, but it's worth it since identifiers/keywords are + # more common + s = s[i:].lstrip() + if s == "": + break + strlen = len(s) + i = 0 + c = s[0] + + # String literal (constant symbol) + if c == '"' or c == "'": + i += 1 + + if "\\" in s: + # Slow path: This could probably be sped up, but it's a + # very unusual case anyway. + quote = c + value = "" + while 1: + if i >= strlen: + _tokenization_error(s, strlen, filename, + linenr) + c = s[i] + if c == quote: + break + if c == "\\": + if i + 1 >= strlen: + _tokenization_error(s, strlen, filename, + linenr) + value += s[i + 1] + i += 2 + else: + value += c + i += 1 + i += 1 + append(value) + else: + # Fast path: If the string contains no backslashes (almost + # always) we can simply look for the matching quote. + end = s.find(c, i) + if end == -1: + _tokenization_error(s, strlen, filename, linenr) + append(s[i:end]) + i = end + 1 + + elif c == "&": + if i + 1 >= strlen: + # Invalid characters are ignored + continue + if s[i + 1] != "&": + # Invalid characters are ignored + i += 1 + continue + append(T_AND) + i += 2 + + elif c == "|": + if i + 1 >= strlen: + # Invalid characters are ignored + continue + if s[i + 1] != "|": + # Invalid characters are ignored + i += 1 + continue + append(T_OR) + i += 2 + + elif c == "!": + if i + 1 >= strlen: + _tokenization_error(s, strlen, filename, linenr) + if s[i + 1] == "=": + append(T_UNEQUAL) + i += 2 + else: + append(T_NOT) + i += 1 + + elif c == "=": + append(T_EQUAL) + i += 1 + + elif c == "(": + append(T_OPEN_PAREN) + i += 1 + + elif c == ")": + append(T_CLOSE_PAREN) + i += 1 + + elif c == "#": + break + + else: + # Invalid characters are ignored + i += 1 + continue + + previous = tokens[-1] + + return _Feed(tokens) + + # + # Parsing + # + + # Expression grammar: + # + # -> + # '=' + # '!=' + # '(' ')' + # '!' + # '&&' + # '||' + + def _parse_expr(self, + feed, + cur_sym_or_choice, + line, + filename = None, + linenr = None, + transform_m = True): + """Parse an expression from the tokens in 'feed' using a simple + top-down approach. The result has the form (, ). + + feed -- _Feed instance containing the tokens for the expression. + + cur_sym_or_choice -- The symbol or choice currently being parsed, or + None if we're not parsing a symbol or choice. + Used for recording references to symbols. + + line -- The line containing the expression being parsed. + + filename (default: None) -- The file containing the expression. + + linenr (default: None) -- The line number containing the expression. + + transform_m (default: False) -- Determines if 'm' should be rewritten to + 'm && MODULES' -- see + parse_val_and_cond().""" + + # Use instance variables to avoid having to pass these as arguments + # through the top-down parser in _parse_expr_2(), which is tedious and + # obfuscates the code. A profiler run shows no noticeable performance + # difference. + self.parse_expr_cur_sym_or_choice = cur_sym_or_choice + self.parse_expr_line = line + self.parse_expr_filename = filename + self.parse_expr_linenr = linenr + self.parse_expr_transform_m = transform_m + + return self._parse_expr_2(feed) + + def _parse_expr_2(self, feed): + or_terms = [self._parse_or_term(feed)] + # Keep parsing additional terms while the lookahead is '||' + while feed.check(T_OR): + or_terms.append(self._parse_or_term(feed)) + + return or_terms[0] if len(or_terms) == 1 else (OR, or_terms) + + def _parse_or_term(self, feed): + and_terms = [self._parse_factor(feed)] + # Keep parsing additional terms while the lookahead is '&&' + while feed.check(T_AND): + and_terms.append(self._parse_factor(feed)) + + return and_terms[0] if len(and_terms) == 1 else (AND, and_terms) + + def _parse_factor(self, feed): + if feed.check(T_OPEN_PAREN): + expr_parse = self._parse_expr_2(feed) + + if not feed.check(T_CLOSE_PAREN): + _parse_error(self.parse_expr_line, + "missing end parenthesis.", + self.parse_expr_filename, + self.parse_expr_linenr) + + return expr_parse + + if feed.check(T_NOT): + return (NOT, self._parse_factor(feed)) + + sym_or_string = feed.get_next() + + if not isinstance(sym_or_string, (Symbol, str)): + _parse_error(self.parse_expr_line, + "malformed expression.", + self.parse_expr_filename, + self.parse_expr_linenr) + + if self.parse_expr_cur_sym_or_choice is not None and \ + isinstance(sym_or_string, Symbol): + self.parse_expr_cur_sym_or_choice.referenced_syms.add(sym_or_string) + + next_token = feed.peek_next() + + # For conditional expressions ('depends on ', '... if ', + # etc.), "m" and m are rewritten to "m" && MODULES. + if next_token != T_EQUAL and next_token != T_UNEQUAL: + if self.parse_expr_transform_m and (sym_or_string is self.m or + sym_or_string == "m"): + return (AND, ["m", self._sym_lookup("MODULES")]) + return sym_or_string + + relation = EQUAL if (feed.get_next() == T_EQUAL) else UNEQUAL + sym_or_string_2 = feed.get_next() + + if self.parse_expr_cur_sym_or_choice is not None and \ + isinstance(sym_or_string_2, Symbol): + self.parse_expr_cur_sym_or_choice.referenced_syms.add(sym_or_string_2) + + if sym_or_string is self.m: + sym_or_string = "m" + + if sym_or_string_2 is self.m: + sym_or_string_2 = "m" + + return (relation, sym_or_string, sym_or_string_2) + + def _parse_file(self, filename, parent, deps, visible_if_deps, res = None): + """Parse the Kconfig file 'filename'. The result is a _Block with all + items from the file. See _parse_block() for the meaning of the + parameters.""" + line_feeder = _FileFeed(_get_lines(filename), filename) + return self._parse_block(line_feeder, None, parent, deps, visible_if_deps, res) + + def _parse_block(self, line_feeder, end_marker, parent, deps, + visible_if_deps = None, res = None): + """Parses a block, which is the contents of either a file or an if, + menu, or choice statement. The result is a _Block with the items from + the block. + + end_marker -- The token that ends the block, e.g. T_ENDIF ("endif") for + if's. None for files. + + parent -- The enclosing menu, choice or if, or None if we're at the top + level. + + deps -- Dependencies from enclosing menus, choices and if's. + + visible_if_deps (default: None) -- 'visible if' dependencies from + enclosing menus. + + res (default: None) -- The _Block to add items to. If None, a new + _Block is created to hold the items.""" + + block = _Block() if res is None else res + + filename = line_feeder.get_filename() + + while 1: + + # Do we already have a tokenized line that we determined wasn't + # part of whatever we were parsing earlier? See comment in + # Config.__init__(). + if self.end_line is not None: + assert self.end_line_tokens is not None + tokens = self.end_line_tokens + tokens.go_to_start() + + line = self.end_line + linenr = line_feeder.get_linenr() + + self.end_line = None + self.end_line_tokens = None + + else: + line = line_feeder.get_next() + if line is None: + if end_marker is not None: + raise Kconfig_Syntax_Error, ( + "Unexpected end of file {0}." + .format(line_feeder.get_filename())) + return block + + linenr = line_feeder.get_linenr() + + tokens = self._tokenize(line, False, filename, linenr) + + if tokens.is_empty(): + continue + + t0 = tokens.get_next() + + # Have we reached the end of the block? + if t0 == end_marker: + return block + + if t0 == T_CONFIG or t0 == T_MENUCONFIG: + # The tokenizer will automatically allocate a new Symbol object + # for any new names it encounters, so we don't need to worry + # about that here. + sym = tokens.get_next() + + # Symbols defined in multiple places get the parent of their + # first definition. However, for symbols whose parents are choice + # statements, the choice statement takes precedence. + if not sym.is_defined_ or isinstance(parent, Choice): + sym.parent = parent + + sym.is_defined_ = True + + self.kconfig_syms.append(sym) + block.add_item(sym) + + self._parse_properties(line_feeder, sym, deps, visible_if_deps) + + elif t0 == T_MENU: + menu = Menu() + self.menus.append(menu) + menu.config = self + menu.parent = parent + menu.title = tokens.get_next() + + menu.filename = filename + menu.linenr = linenr + + # Parse properties and contents + self._parse_properties(line_feeder, menu, deps, visible_if_deps) + menu.block = self._parse_block(line_feeder, + T_ENDMENU, + menu, + menu.dep_expr, + _make_and(visible_if_deps, + menu.visible_if_expr)) + + block.add_item(menu) + + elif t0 == T_IF: + # If statements are treated as syntactic sugar for adding + # dependencies to enclosed items and do not have an explicit + # object representation. + + dep_expr = self._parse_expr(tokens, None, line, filename, linenr) + self._parse_block(line_feeder, + T_ENDIF, + parent, + _make_and(dep_expr, deps), + visible_if_deps, + block) # Add items to the same block + + elif t0 == T_CHOICE: + # We support named choices + already_defined = False + name = None + if len(tokens) > 1 and isinstance(tokens[1], str): + name = tokens[1] + already_defined = name in self.named_choices + + if already_defined: + choice = self.named_choices[name] + else: + choice = Choice() + self.choices.append(choice) + if name is not None: + choice.name = name + self.named_choices[name] = choice + + choice.config = self + choice.parent = parent + + choice.def_locations.append((filename, linenr)) + + # Parse properties and contents + self._parse_properties(line_feeder, choice, deps, visible_if_deps) + choice.block = self._parse_block(line_feeder, + T_ENDCHOICE, + choice, + None, + visible_if_deps) + + choice._determine_actual_symbols() + + # If no type is set for the choice, its type is that of the first + # choice item + if choice.type == UNKNOWN: + for item in choice.get_symbols(): + if item.type != UNKNOWN: + choice.type = item.type + break + + # Each choice item of UNKNOWN type gets the type of the choice + for item in choice.get_symbols(): + if item.type == UNKNOWN: + item.type = choice.type + + # For named choices defined in multiple locations, only record + # at the first definition + if not already_defined: + block.add_item(choice) + + elif t0 == T_COMMENT: + comment = Comment() + comment.config = self + comment.parent = parent + + comment.filename = filename + comment.linenr = linenr + + comment.text = tokens.get_next() + self._parse_properties(line_feeder, comment, deps, visible_if_deps) + + block.add_item(comment) + self.comments.append(comment) + + elif t0 == T_SOURCE: + kconfig_file = tokens.get_next() + exp_kconfig_file = self._expand_sym_refs(kconfig_file) + f = os.path.join(self.base_dir, exp_kconfig_file) + + if not os.path.exists(f): + raise IOError, ('{0}:{1}: sourced file "{2}" (expands to\n' + '"{3}") not found. Perhaps base_dir\n' + '(argument to Config.__init__(), currently\n' + '"{4}") is set to the wrong value.' + .format(filename, + linenr, + kconfig_file, + exp_kconfig_file, + self.base_dir)) + + # Add items to the same block + self._parse_file(f, parent, deps, visible_if_deps, block) + + elif t0 == T_MAINMENU: + text = tokens.get_next() + + if self.mainmenu_text is not None: + self._warn("overriding 'mainmenu' text. " + 'Old value: "{0}", new value: "{1}".' + .format(self.mainmenu_text, text), + filename, + linenr) + + self.mainmenu_text = text + + else: + _parse_error(line, "unrecognized construct.", filename, linenr) + + def _parse_properties(self, line_feeder, stmt, deps, visible_if_deps): + """Parsing of properties for symbols, menus, choices, and comments.""" + + def parse_val_and_cond(tokens, line, filename, linenr): + """Parses ' if ' constructs, where the 'if' part is + optional. Returns a tuple containing the parsed expressions, with + None as the second element if the 'if' part is missing.""" + val = self._parse_expr(tokens, stmt, line, filename, linenr, False) + + if tokens.check(T_IF): + return (val, self._parse_expr(tokens, stmt, line, filename, linenr)) + + return (val, None) + + # In case the symbol is defined in multiple locations, we need to + # remember what prompts, defaults, and selects are new for this + # definition, as "depends on" should only apply to the local + # definition. + new_prompt = None + new_def_exprs = [] + new_selects = [] + + # Dependencies from 'depends on' statements + depends_on_expr = None + + while 1: + line = line_feeder.get_next() + if line is None: + break + + filename = line_feeder.get_filename() + linenr = line_feeder.get_linenr() + + tokens = self._tokenize(line, False, filename, linenr) + + if tokens.is_empty(): + continue + + t0 = tokens.get_next() + + if t0 == T_HELP: + # Find first non-empty line and get its indentation + + line_feeder.remove_while(str.isspace) + line = line_feeder.get_next() + + if line is None: + stmt.help = "" + break + + indent = _indentation(line) + + # If the first non-empty lines has zero indent, there is no + # help text + if indent == 0: + stmt.help = "" + line_feeder.go_back() + break + + help_lines = [_deindent(line, indent)] + + # The help text goes on till the first non-empty line with less + # indent + while 1: + line = line_feeder.get_next() + if (line is None) or \ + (not line.isspace() and _indentation(line) < indent): + stmt.help = "".join(help_lines) + break + + help_lines.append(_deindent(line, indent)) + + if line is None: + break + + line_feeder.go_back() + + elif t0 == T_PROMPT: + # 'prompt' properties override each other within a single + # definition of a symbol, but additional prompts can be added + # by defining the symbol multiple times; hence 'new_prompt' + # instead of 'prompt'. + new_prompt = parse_val_and_cond(tokens, line, filename, linenr) + + elif t0 == T_DEFAULT: + new_def_exprs.append(parse_val_and_cond(tokens, line, filename, linenr)) + + elif t0 == T_DEPENDS: + if not tokens.check(T_ON): + _parse_error(line, 'expected "on" after "depends".', filename, linenr) + + parsed_deps = self._parse_expr(tokens, stmt, line, filename, linenr) + + if isinstance(stmt, (Menu, Comment)): + stmt.dep_expr = _make_and(stmt.dep_expr, parsed_deps) + else: + depends_on_expr = _make_and(depends_on_expr, parsed_deps) + + elif t0 == T_VISIBLE: + if not tokens.check(T_IF): + _parse_error(line, 'expected "if" after "visible".', filename, linenr) + if not isinstance(stmt, Menu): + _parse_error(line, + "'visible if' is only valid for menus.", + filename, + linenr) + + parsed_deps = self._parse_expr(tokens, stmt, line, filename, linenr) + stmt.visible_if_expr = _make_and(stmt.visible_if_expr, parsed_deps) + + elif t0 == T_SELECT: + target = tokens.get_next() + + stmt.referenced_syms.add(target) + stmt.selected_syms.add(target) + + if tokens.check(T_IF): + new_selects.append((target, + self._parse_expr(tokens, stmt, line, filename, linenr))) + else: + new_selects.append((target, None)) + + elif t0 in (T_BOOL, T_TRISTATE, T_INT, T_HEX, T_STRING): + stmt.type = token_to_type[t0] + + if len(tokens) > 1: + new_prompt = parse_val_and_cond(tokens, line, filename, linenr) + + elif t0 == T_RANGE: + lower = tokens.get_next() + upper = tokens.get_next() + stmt.referenced_syms.add(lower) + stmt.referenced_syms.add(upper) + + if tokens.check(T_IF): + stmt.ranges.append((lower, upper, + self._parse_expr(tokens, stmt, line, filename, linenr))) + else: + stmt.ranges.append((lower, upper, None)) + + elif t0 == T_DEF_BOOL: + stmt.type = BOOL + + if len(tokens) > 1: + new_def_exprs.append(parse_val_and_cond(tokens, line, filename, linenr)) + + elif t0 == T_DEF_TRISTATE: + stmt.type = TRISTATE + + if len(tokens) > 1: + new_def_exprs.append(parse_val_and_cond(tokens, line, filename, linenr)) + + elif t0 == T_OPTIONAL: + if not isinstance(stmt, Choice): + _parse_error(line, + '"optional" is only valid for choices.', + filename, + linenr) + stmt.optional = True + + elif t0 == T_OPTION: + if tokens.check(T_ENV) and tokens.check(T_EQUAL): + env_var = tokens.get_next() + + stmt.is_special_ = True + stmt.is_from_env = True + + if env_var not in os.environ: + self._warn(""" +The symbol {0} references the non-existent environment variable {1} and will +get the empty string as its value. + +If you're using kconfiglib via 'make (i)scriptconfig' it should have set up the +environment correctly for you. If you still got this message, that might be an +error, and you should e-mail kconfiglib@gmail.com. +.""" .format(stmt.name, env_var), + filename, + linenr) + + stmt.cached_value = "" + else: + stmt.cached_value = os.environ[env_var] + + elif tokens.check(T_DEFCONFIG_LIST): + self.defconfig_sym = stmt + + elif tokens.check(T_MODULES): + self._warn("the 'modules' option is not supported. " + "Let me know if this is a problem for you; " + "it shouldn't be that hard to implement.", + filename, + linenr) + + else: + _parse_error(line, "unrecognized option.", filename, linenr) + + else: + # See comment in Config.__init__() + self.end_line = line + self.end_line_tokens = tokens + break + + # Propagate dependencies from enclosing menus and if's. + + # For menus and comments.. + if isinstance(stmt, (Menu, Comment)): + stmt.orig_deps = stmt.dep_expr + stmt.deps_from_containing = deps + stmt.dep_expr = _make_and(stmt.dep_expr, deps) + + stmt.all_referenced_syms = \ + stmt.referenced_syms | _get_expr_syms(deps) + + # For symbols and choices.. + else: + + # See comment for 'menu_dep' + stmt.menu_dep = depends_on_expr + + # Propagate dependencies specified with 'depends on' to any new + # default expressions, prompts, and selections. ("New" since a + # symbol might be defined in multiple places and the dependencies + # should only apply to the local definition.) + + new_def_exprs = [(val_expr, _make_and(cond_expr, depends_on_expr)) + for (val_expr, cond_expr) in new_def_exprs] + + new_selects = [(target, _make_and(cond_expr, depends_on_expr)) + for (target, cond_expr) in new_selects] + + if new_prompt is not None: + prompt, cond_expr = new_prompt + + # 'visible if' dependencies from enclosing menus get propagated + # to prompts + if visible_if_deps is not None: + cond_expr = _make_and(cond_expr, visible_if_deps) + + new_prompt = (prompt, _make_and(cond_expr, depends_on_expr)) + + # We save the original expressions -- before any menu and if + # conditions have been propagated -- so these can be retrieved + # later. + + stmt.orig_def_exprs.extend(new_def_exprs) + if new_prompt is not None: + stmt.orig_prompts.append(new_prompt) + + # Only symbols can select + if isinstance(stmt, Symbol): + stmt.orig_selects.extend(new_selects) + + # Save dependencies from enclosing menus and if's + stmt.deps_from_containing = deps + + # The set of symbols referenced directly by the symbol/choice plus + # all symbols referenced by enclosing menus and if's. + stmt.all_referenced_syms = \ + stmt.referenced_syms | _get_expr_syms(deps) + + # Propagate dependencies from enclosing menus and if's + + stmt.def_exprs.extend([(val_expr, _make_and(cond_expr, deps)) + for (val_expr, cond_expr) in new_def_exprs]) + + for (target, cond) in new_selects: + target.rev_dep = _make_or(target.rev_dep, + _make_and(stmt, + _make_and(cond, deps))) + + if new_prompt is not None: + prompt, cond_expr = new_prompt + stmt.prompts.append((prompt, _make_and(cond_expr, deps))) + + # + # Symbol table manipulation + # + + def _sym_lookup(self, name, add_sym_if_not_exists = True): + """Fetches the symbol 'name' from the symbol table, optionally adding + it if it does not exist (this is usually what we want).""" + if name in self.syms: + return self.syms[name] + + new_sym = Symbol() + new_sym.config = self + new_sym.name = name + + if add_sym_if_not_exists: + self.syms[name] = new_sym + else: + # This warning is generated while evaluating an expression + # containing undefined symbols using Config.eval() + self._warn("no symbol {0} in configuration".format(name)) + + return new_sym + + # + # Evaluation of symbols and expressions + # + + def _eval_expr(self, expr): + """Evaluates an expression and returns one of the tristate values "n", + "m" or "y".""" + res = self._eval_expr_2(expr) + + # Promote "m" to "y" if we're running without modules. Internally, "m" + # is often rewritten to "m" && MODULES by both the C implementation and + # kconfiglib, which takes care of cases where "m" should be false if + # we're running without modules. + if res == "m" and not self._has_modules(): + return "y" + + return res + + def _eval_expr_2(self, expr): + if expr is None: + return "y" + + if isinstance(expr, Symbol): + # Non-bool/tristate symbols are always "n" in a tristate sense, + # regardless of their value + if expr.type != BOOL and expr.type != TRISTATE: + return "n" + return expr.get_value() + + if isinstance(expr, str): + return expr if (expr == "y" or expr == "m") else "n" + + first_expr = expr[0] + + if first_expr == OR: + res = "n" + + for subexpr in expr[1]: + ev = self._eval_expr_2(subexpr) + + # Return immediately upon discovering a "y" term + if ev == "y": + return "y" + + if ev == "m": + res = "m" + + # 'res' is either "n" or "m" here; we already handled the + # short-circuiting "y" case in the loop. + return res + + if first_expr == AND: + res = "y" + + for subexpr in expr[1]: + ev = self._eval_expr_2(subexpr) + + # Return immediately upon discovering an "n" term + if ev == "n": + return "n" + + if ev == "m": + res = "m" + + # 'res' is either "m" or "y" here; we already handled the + # short-circuiting "n" case in the loop. + return res + + if first_expr == NOT: + ev = self._eval_expr_2(expr[1]) + + if ev == "y": + return "n" + + return "y" if (ev == "n") else "m" + + if first_expr == EQUAL: + return "y" if (self._get_str_value(expr[1]) == + self._get_str_value(expr[2])) else "n" + + if first_expr == UNEQUAL: + return "y" if (self._get_str_value(expr[1]) != + self._get_str_value(expr[2])) else "n" + + _internal_error("Internal error while evaluating expression: " + "unknown operation {0}.".format(first_expr)) + + def _get_str_value(self, obj): + if isinstance(obj, str): + return obj + # obj is a Symbol + return obj.get_value() + + def _eval_min(self, e1, e2): + e1_eval = self._eval_expr(e1) + e2_eval = self._eval_expr(e2) + + return e1_eval if tri_less(e1_eval, e2_eval) else e2_eval + + def _eval_max(self, e1, e2): + e1_eval = self._eval_expr(e1) + e2_eval = self._eval_expr(e2) + + return e1_eval if tri_greater(e1_eval, e2_eval) else e2_eval + + # + # Methods related to the MODULES symbol + # + + def _has_modules(self): + modules_sym = self.syms.get("MODULES") + return (modules_sym is not None) and (modules_sym.get_value() == "y") + + # + # Dependency tracking + # + + def _build_dep(self): + """Populates the Symbol.dep sets, linking the symbol to the symbols + that immediately depend on it in the sense that changing the value of + the symbol might affect the values of those other symbols. This is used + for caching/invalidation purposes. The calculated sets might be larger + than necessary as we don't do any complicated analysis of the + expressions.""" + for sym in self.syms.itervalues(): + sym.dep = set() + + # Adds 'sym' as a directly dependent symbol to all symbols that appear + # in the expression 'e' + def add_expr_deps(e, sym): + for s in _get_expr_syms(e): + s.dep.add(sym) + + # The directly dependent symbols of a symbol are: + # - Any symbols whose prompts, default values, rev_dep (select + # condition), or ranges depend on the symbol + # - Any symbols that belong to the same choice statement as the symbol + # (these won't be included in 'dep' as that makes the dependency + # graph unwieldy, but Symbol._get_dependent() will include them) + # - Any symbols in a choice statement that depends on the symbol + for sym in self.syms.itervalues(): + for (_, e) in sym.prompts: + add_expr_deps(e, sym) + + for (v, e) in sym.def_exprs: + add_expr_deps(v, sym) + add_expr_deps(e, sym) + + add_expr_deps(sym.rev_dep, sym) + + for (l, u, e) in sym.ranges: + add_expr_deps(l, sym) + add_expr_deps(u, sym) + add_expr_deps(e, sym) + + if sym.is_choice_symbol_: + choice = sym.parent + + for (_, e) in choice.prompts: + add_expr_deps(e, sym) + + for (_, e) in choice.def_exprs: + add_expr_deps(e, sym) + + def _expr_val_str(self, expr, no_value_str = "(none)", get_val_instead_of_eval = False): + # Since values are valid expressions, _expr_to_str() will get a nice + # string representation for those as well. + + if expr is None: + return no_value_str + + if get_val_instead_of_eval: + if isinstance(expr, str): + return _expr_to_str(expr) + val = expr.get_value() + else: + val = self._eval_expr(expr) + + return "{0} (value: {1})".format(_expr_to_str(expr), _expr_to_str(val)) + + def _expand_sym_refs(self, s): + """Expands $-references to symbols in 's' to symbol values, or to the + empty string for undefined symbols.""" + + while 1: + sym_ref_re_match = sym_ref_re.search(s) + if sym_ref_re_match is None: + return s + + sym_name = sym_ref_re_match.group(0)[1:] + sym = self.syms.get(sym_name) + expansion = "" if sym is None else sym.get_value() + + s = s[:sym_ref_re_match.start()] + \ + expansion + \ + s[sym_ref_re_match.end():] + + def _get_sym_or_choice_str(self, sc): + """Symbols and choices have many properties in common, so we factor out + common __str__() stuff here. "sc" is short for "symbol or choice".""" + + # As we deal a lot with string representations here, use some + # convenient shorthand: + s = _expr_to_str + + # + # Common symbol/choice properties + # + + user_value_str = "(no user value)" if sc.user_val is None else s(sc.user_val) + + visibility_str = s(sc.get_visibility()) + + # Build prompts string + if sc.prompts == []: + prompts_str = " (no prompts)" + else: + prompts_str_rows = [] + + for (prompt, cond_expr) in sc.orig_prompts: + if cond_expr is None: + prompts_str_rows.append(' "{0}"'.format(prompt)) + else: + prompts_str_rows.append(' "{0}" if '.format(prompt) + + self._expr_val_str(cond_expr)) + + prompts_str = "\n".join(prompts_str_rows) + + # Build locations string + if sc.def_locations == []: + locations_str = "(no locations)" + else: + locations_str = " ".join(["{0}:{1}".format(filename, linenr) for + (filename, linenr) in sc.def_locations]) + + # Build additional-dependencies-from-menus-and-if's string + additional_deps_str = " " + self._expr_val_str(sc.deps_from_containing, + "(no additional dependencies)") + + # + # Symbol-specific stuff + # + + if isinstance(sc, Symbol): + + # Build value string + value_str = s(sc.get_value()) + + # Build ranges string + if isinstance(sc, Symbol): + if sc.ranges == []: + ranges_str = " (no ranges)" + else: + ranges_str_rows = [] + + for (l, u, cond_expr) in sc.ranges: + if cond_expr is None: + ranges_str_rows.append(" [{0}, {1}]".format(s(l), s(u))) + else: + ranges_str_rows.append(" [{0}, {1}] if {2}" + .format(s(l), s(u), self._expr_val_str(cond_expr))) + + ranges_str = "\n".join(ranges_str_rows) + + # Build default values string + if sc.def_exprs == []: + defaults_str = " (no default values)" + else: + defaults_str_rows = [] + + for (val_expr, cond_expr) in sc.orig_def_exprs: + row_str = " " + self._expr_val_str(val_expr, "(none)", sc.type == STRING) + defaults_str_rows.append(row_str) + defaults_str_rows.append(" Condition: " + self._expr_val_str(cond_expr)) + + defaults_str = "\n".join(defaults_str_rows) + + # Build selects string + if sc.orig_selects == []: + selects_str = " (no selects)" + else: + selects_str_rows = [] + + for (target, cond_expr) in sc.orig_selects: + if cond_expr is None: + selects_str_rows.append(" {0}".format(target.name)) + else: + selects_str_rows.append(" {0} if ".format(target.name) + + self._expr_val_str(cond_expr)) + + selects_str = "\n".join(selects_str_rows) + + # Build reverse dependencies string + if sc.rev_dep == "n": + rev_dep_str = " (no reverse dependencies)" + else: + rev_dep_str = " " + self._expr_val_str(sc.rev_dep) + + res = _sep_lines("Symbol " + (sc.name if sc.name is not None else "(no name)"), + "Type : " + typename[sc.type], + "Value : " + value_str, + "User value : " + user_value_str, + "Visibility : " + visibility_str, + "Is choice item : " + bool_str[sc.is_choice_symbol_], + "Is defined : " + bool_str[sc.is_defined_], + "Is from env. : " + bool_str[sc.is_from_env], + "Is special : " + bool_str[sc.is_special_] + "\n") + + if sc.ranges != []: + res += _sep_lines("Ranges:", + ranges_str + "\n") + + res += _sep_lines("Prompts:", + prompts_str, + "Default values:", + defaults_str, + "Selects:", + selects_str, + "Reverse dependencies:", + rev_dep_str, + "Additional dependencies from enclosing menus and if's:", + additional_deps_str, + "Locations: " + locations_str) + + return res + + # + # Choice-specific stuff + # + + # Build name string (for named choices) + if sc.name is None: + name_str = "(no name)" + else: + name_str = sc.name + + # Build selected symbol string + sel = sc.get_selection() + if sel is None: + sel_str = "(no selection)" + else: + sel_str = sel.name + + # Build mode string + mode_str = s(sc.get_mode()) + + # Build default values string + if sc.def_exprs == []: + defaults_str = " (no default values)" + else: + defaults_str_rows = [] + + for (sym, cond_expr) in sc.orig_def_exprs: + if cond_expr is None: + defaults_str_rows.append(" {0}".format(sym.name)) + else: + defaults_str_rows.append(" {0} if ".format(sym.name) + + self._expr_val_str(cond_expr)) + + defaults_str = "\n".join(defaults_str_rows) + + # Build contained symbols string + names = [sym.name for sym in sc.get_symbols()] + + if names == []: + syms_string = "(empty)" + else: + syms_string = " ".join(names) + + return _sep_lines("Choice", + "Name (for named choices): " + name_str, + "Type : " + typename[sc.type], + "Selected symbol : " + sel_str, + "User value : " + user_value_str, + "Mode : " + mode_str, + "Visibility : " + visibility_str, + "Optional : " + bool_str[sc.optional], + "Prompts:", + prompts_str, + "Defaults:", + defaults_str, + "Choice symbols:", + " " + syms_string, + "Additional dependencies from enclosing menus and if's:", + additional_deps_str, + "Locations: " + locations_str) + + def _expr_depends_on(self, expr, sym): + """Reimplementation of expr_depends_symbol() from mconf.c. Used to + determine if a submenu should be implicitly created, which influences what + items inside choice statements are considered choice items.""" + if expr is None: + return False + + def rec(expr): + if isinstance(expr, str): + return False + + if isinstance(expr, Symbol): + return expr is sym + + e0 = expr[0] + + if e0 == EQUAL or e0 == UNEQUAL: + return self._eq_to_sym(expr) is sym + + if e0 == AND: + for and_expr in expr[1]: + if rec(and_expr): + return True + + return False + + return rec(expr) + + def _eq_to_sym(self, eq): + """_expr_depends_on() helper. For (in)equalities of the form sym = y/m + or sym != n, returns sym. For other (in)equalities, returns None.""" + relation, left, right = eq + + left = self._transform_n_m_y(left) + right = self._transform_n_m_y(right) + + # Make sure the symbol (if any) appears to the left + if not isinstance(left, Symbol): + left, right = right, left + + if not isinstance(left, Symbol): + return None + + if (relation == EQUAL and (right == "m" or right == "y")) or \ + (relation == UNEQUAL and right == "n"): + return left + + return None + + def _transform_n_m_y(self, item): + """_eq_to_sym() helper. Translates the symbols n, m, and y to their + string equivalents.""" + if item is self.n: + return "n" + if item is self.m: + return "m" + if item is self.y: + return "y" + return item + + def _warn(self, msg, filename = None, linenr = None): + """For printing warnings to stderr.""" + if self.print_warnings: + self._warn_or_undef_assign(msg, WARNING, filename, linenr) + + def _undef_assign(self, msg, filename = None, linenr = None): + """For printing informational messages related to assignments + to undefined variables to stderr.""" + if self.print_undef_assign: + self._warn_or_undef_assign(msg, UNDEF_ASSIGN, filename, linenr) + + def _warn_or_undef_assign(self, msg, msg_type, filename, linenr): + if filename is not None: + sys.stderr.write("{0}:".format(_clean_up_path(filename))) + if linenr is not None: + sys.stderr.write("{0}:".format(linenr)) + + if msg_type == WARNING: + sys.stderr.write("warning: ") + elif msg_type == UNDEF_ASSIGN: + sys.stderr.write("info: ") + else: + _internal_error('Internal error while printing warning: unknown warning type "{0}".' + .format(msg_type)) + + sys.stderr.write(msg + "\n") + +def _get_expr_syms(expr): + """Returns the set() of symbols appearing in expr.""" + res = set() + if expr is None: + return res + + def rec(expr): + if isinstance(expr, Symbol): + res.add(expr) + return + + if isinstance(expr, str): + return + + e0 = expr[0] + + if e0 == OR or e0 == AND: + for term in expr[1]: + rec(term) + + elif e0 == NOT: + rec(expr[1]) + + elif e0 == EQUAL or e0 == UNEQUAL: + _, v1, v2 = expr + + if isinstance(v1, Symbol): + res.add(v1) + + if isinstance(v2, Symbol): + res.add(v2) + + else: + _internal_error("Internal error while fetching symbols from an " + "expression with token stream {0}.".format(expr)) + + rec(expr) + return res + + +# +# Construction of expressions +# + +# These functions as well as the _eval_min/max() functions above equate +# None with "y", which is usually what we want, but needs to be kept in +# mind. + +def _make_or(e1, e2): + # Perform trivial simplification and avoid None's (which + # correspond to y's) + if e1 is None or e2 is None or \ + e1 == "y" or e2 == "y": + return "y" + + if e1 == "n": + return e2 + + if e2 == "n": + return e1 + + # Prefer to merge/update argument list if possible instead of creating + # a new OR node + + if isinstance(e1, tuple) and e1[0] == OR: + if isinstance(e2, tuple) and e2[0] == OR: + return (OR, e1[1] + e2[1]) + return (OR, e1[1] + [e2]) + + if isinstance(e2, tuple) and e2[0] == OR: + return (OR, e2[1] + [e1]) + + return (OR, [e1, e2]) + +# Note: returns None if e1 == e2 == None + +def _make_and(e1, e2): + if e1 == "n" or e2 == "n": + return "n" + + if e1 is None or e1 == "y": + return e2 + + if e2 is None or e2 == "y": + return e1 + + # Prefer to merge/update argument list if possible instead of creating + # a new AND node + + if isinstance(e1, tuple) and e1[0] == AND: + if isinstance(e2, tuple) and e2[0] == AND: + return (AND, e1[1] + e2[1]) + return (AND, e1[1] + [e2]) + + if isinstance(e2, tuple) and e2[0] == AND: + return (AND, e2[1] + [e1]) + + return (AND, [e1, e2]) + +# +# Constants and functions related to types, parsing, evaluation and printing, +# put globally to unclutter the Config class a bit. +# + +# Tokens +(T_OR, T_AND, T_NOT, + T_OPEN_PAREN, T_CLOSE_PAREN, + T_EQUAL, T_UNEQUAL, + T_MAINMENU, T_MENU, T_ENDMENU, + T_SOURCE, T_CHOICE, T_ENDCHOICE, + T_COMMENT, T_CONFIG, T_MENUCONFIG, + T_HELP, T_IF, T_ENDIF, T_DEPENDS, T_ON, + T_OPTIONAL, T_PROMPT, T_DEFAULT, + T_BOOL, T_TRISTATE, T_HEX, T_INT, T_STRING, + T_DEF_BOOL, T_DEF_TRISTATE, + T_SELECT, T_RANGE, T_OPTION, T_ENV, + T_DEFCONFIG_LIST, T_MODULES, T_VISIBLE) = range(0, 38) + +# Keyword to token map +keywords = { + "mainmenu" : T_MAINMENU, + "menu" : T_MENU, + "endmenu" : T_ENDMENU, + "endif" : T_ENDIF, + "endchoice" : T_ENDCHOICE, + "source" : T_SOURCE, + "choice" : T_CHOICE, + "config" : T_CONFIG, + "comment" : T_COMMENT, + "menuconfig" : T_MENUCONFIG, + "help" : T_HELP, + "if" : T_IF, + "depends" : T_DEPENDS, + "on" : T_ON, + "optional" : T_OPTIONAL, + "prompt" : T_PROMPT, + "default" : T_DEFAULT, + "bool" : T_BOOL, + "boolean" : T_BOOL, + "tristate" : T_TRISTATE, + "int" : T_INT, + "hex" : T_HEX, + "def_bool" : T_DEF_BOOL, + "def_tristate" : T_DEF_TRISTATE, + "string" : T_STRING, + "select" : T_SELECT, + "range" : T_RANGE, + "option" : T_OPTION, + "env" : T_ENV, + "defconfig_list" : T_DEFCONFIG_LIST, + "modules" : T_MODULES, + "visible" : T_VISIBLE } + +# Strings to use for True and False +bool_str = { False : "false", True : "true" } + +# Tokens after which identifier-like lexemes are treated as strings. T_CHOICE +# is included to avoid symbols being registered for named choices. +string_lex = frozenset((T_BOOL, T_TRISTATE, T_INT, T_HEX, T_STRING, T_CHOICE, + T_PROMPT, T_MENU, T_COMMENT, T_SOURCE, T_MAINMENU)) + +# Matches the initial token on a line; see _tokenize(). +initial_token_re = re.compile(r"[^\w]*(\w+)") + +# Matches an identifier/keyword optionally preceded by whitespace +id_keyword_re = re.compile(r"\s*([\w./-]+)") + +# Regular expressions for parsing .config files +set_re = re.compile(r"CONFIG_(\w+)=(.*)") +unset_re = re.compile(r"# CONFIG_(\w+) is not set") + +# Regular expression for finding $-references to symbols in strings +sym_ref_re = re.compile(r"\$[A-Za-z_]+") + +# Integers representing symbol types +UNKNOWN, BOOL, TRISTATE, STRING, HEX, INT = range(0, 6) + +# Strings to use for types +typename = { + UNKNOWN : "unknown", + BOOL : "bool", + TRISTATE : "tristate", + STRING : "string", + HEX : "hex", + INT : "int" } + +# Token to type mapping +token_to_type = { T_BOOL : BOOL, + T_TRISTATE : TRISTATE, + T_STRING : STRING, + T_INT : INT, + T_HEX : HEX } + +# Default values for symbols of different types (the value the symbol gets if +# it is not assigned a user value and none of its 'default' clauses kick in) +default_value = { BOOL : "n", + TRISTATE : "n", + STRING : "", + INT : "", + HEX : "" } + +# Indicates that no item is selected in a choice statement +NO_SELECTION = 0 + +# Integers representing expression types +OR, AND, NOT, EQUAL, UNEQUAL = range(0, 5) + +# Map from tristate values to integers +tri_to_int = { "n" : 0, "m" : 1, "y" : 2 } + +# Printing-related stuff + +op_to_str = { AND : " && ", + OR : " || ", + EQUAL : " = ", + UNEQUAL : " != " } + +precedence = { OR : 0, AND : 1, NOT : 2 } + +# Types of informational messages +WARNING = 0 +UNDEF_ASSIGN = 1 + +def _intersperse(lst, op): + """_expr_to_str() helper. Gets the string representation of each expression in lst + and produces a list where op has been inserted between the elements.""" + if lst == []: + return "" + + res = [] + + def handle_sub_expr(expr): + no_parens = isinstance(expr, (str, Symbol)) or \ + expr[0] in (EQUAL, UNEQUAL) or \ + precedence[op] <= precedence[expr[0]] + if not no_parens: + res.append("(") + res.extend(_expr_to_str_rec(expr)) + if not no_parens: + res.append(")") + + op_str = op_to_str[op] + + handle_sub_expr(lst[0]) + for expr in lst[1:]: + res.append(op_str) + handle_sub_expr(expr) + + return res + +def _expr_to_str(expr): + s = "".join(_expr_to_str_rec(expr)) + return s + +def _sym_str_string(sym_or_str): + if isinstance(sym_or_str, str): + return '"{0}"'.format(sym_or_str) + return sym_or_str.name + +def _expr_to_str_rec(expr): + if expr is None: + return [""] + + if isinstance(expr, (Symbol, str)): + return [_sym_str_string(expr)] + + e0 = expr[0] + + if e0 == OR or e0 == AND: + return _intersperse(expr[1], expr[0]) + + if e0 == NOT: + need_parens = not isinstance(expr[1], (str, Symbol)) + + res = ["!"] + if need_parens: + res.append("(") + res.extend(_expr_to_str_rec(expr[1])) + if need_parens: + res.append(")") + return res + + if e0 == EQUAL or e0 == UNEQUAL: + return [_sym_str_string(expr[1]), + op_to_str[expr[0]], + _sym_str_string(expr[2])] + +class _Block: + + """Represents a list of items (symbols, menus, choice statements and + comments) appearing at the top-level of a file or witin a menu, choice or + if statement.""" + + def __init__(self): + self.items = [] + + def get_items(self): + return self.items + + def add_item(self, item): + self.items.append(item) + + def _make_conf(self): + # Collect the substrings in a list and later use join() instead of += + # to build the final .config contents. With older Python versions, this + # yields linear instead of quadratic complexity. + strings = [] + for item in self.items: + strings.extend(item._make_conf()) + + return strings + + def add_depend_expr(self, expr): + for item in self.items: + item.add_depend_expr(expr) + +class Item(): + + """Base class for symbols and other Kconfig constructs. Subclasses are + Symbol, Choice, Menu, and Comment.""" + + def is_symbol(self): + """Returns True if the item is a symbol, otherwise False. Short for + isinstance(item, kconfiglib.Symbol).""" + return isinstance(self, Symbol) + + def is_choice(self): + """Returns True if the item is a choice, otherwise False. Short for + isinstance(item, kconfiglib.Choice).""" + return isinstance(self, Choice) + + def is_menu(self): + """Returns True if the item is a menu, otherwise False. Short for + isinstance(item, kconfiglib.Menu).""" + return isinstance(self, Menu) + + def is_comment(self): + """Returns True if the item is a comment, otherwise False. Short for + isinstance(item, kconfiglib.Comment).""" + return isinstance(self, Comment) + +class _HasVisibility(): + + """Base class for elements that have a "visibility" that acts as an upper + limit on the values a user can set for them. Subclasses are Symbol and + Choice (which supply some of the attributes).""" + + def __init__(self): + self.cached_visibility = None + self.prompts = [] + + def _invalidate(self): + self.cached_visibility = None + + def _get_visibility(self): + if self.cached_visibility is None: + vis = "n" + for (prompt, cond_expr) in self.prompts: + vis = self.config._eval_max(vis, cond_expr) + + if isinstance(self, Symbol) and self.is_choice_symbol_: + vis = self.config._eval_min(vis, self.parent._get_visibility()) + + # Promote "m" to "y" if we're dealing with a non-tristate + if vis == "m" and self.type != TRISTATE: + vis = "y" + + self.cached_visibility = vis + + return self.cached_visibility + +class Symbol(Item, _HasVisibility): + + """Represents a configuration symbol - e.g. FOO for + + config FOO + ...""" + + # + # Public interface + # + + def get_value(self): + """Calculate and return the value of the symbol. See also + Symbol.set_user_value().""" + + if self.cached_value is not None: + return self.cached_value + + self.write_to_conf = False + + # As a quirk of Kconfig, undefined symbols get their name as their + # value. This is why things like "FOO = bar" work for seeing if FOO has + # the value "bar". + if self.type == UNKNOWN: + self.cached_value = self.name + return self.name + + new_val = default_value[self.type] + + vis = self._get_visibility() + + if self.type == BOOL or self.type == TRISTATE: + # The visibility and mode (modules-only or single-selection) of + # choice items will be taken into account in self._get_visibility() + + if self.is_choice_symbol_: + if vis != "n": + choice = self.parent + mode = choice.get_mode() + + self.write_to_conf = (mode != "n") + + if mode == "y": + new_val = "y" if (choice.get_selection() is self) else "n" + elif mode == "m": + if self.user_val == "m" or self.user_val == "y": + new_val = "m" + + else: + use_defaults = True + + if vis != "n": + # If the symbol is visible and has a user value, use that. + # Otherwise, look at defaults. + self.write_to_conf = True + + if self.user_val is not None: + new_val = self.config._eval_min(self.user_val, vis) + use_defaults = False + + if use_defaults: + for (val_expr, cond_expr) in self.def_exprs: + cond_eval = self.config._eval_expr(cond_expr) + + if cond_eval != "n": + self.write_to_conf = True + new_val = self.config._eval_min(val_expr, cond_eval) + break + + # Reverse dependencies take precedence + rev_dep_val = self.config._eval_expr(self.rev_dep) + + if rev_dep_val != "n": + self.write_to_conf = True + new_val = self.config._eval_max(new_val, rev_dep_val) + + # Promote "m" to "y" for booleans + if new_val == "m" and self.type == BOOL: + new_val = "y" + + elif self.type == STRING: + use_defaults = True + + if vis != "n": + self.write_to_conf = True + if self.user_val is not None: + new_val = self.user_val + use_defaults = False + + if use_defaults: + for (val_expr, cond_expr) in self.def_exprs: + if self.config._eval_expr(cond_expr) != "n": + self.write_to_conf = True + new_val = self.config._get_str_value(val_expr) + break + + elif self.type == HEX or self.type == INT: + has_active_range = False + low = None + high = None + use_defaults = True + + base = 16 if self.type == HEX else 10 + + for(l, h, cond_expr) in self.ranges: + if self.config._eval_expr(cond_expr) != "n": + has_active_range = True + + low_str = self.config._get_str_value(l) + high_str = self.config._get_str_value(h) + + low = int(low_str, base) if \ + _is_base_n(low_str, base) else 0 + high = int(high_str, base) if \ + _is_base_n(high_str, base) else 0 + + break + + if vis != "n": + self.write_to_conf = True + + if self.user_val is not None and \ + _is_base_n(self.user_val, base) and \ + (not has_active_range or + low <= int(self.user_val, base) <= high): + + # If the user value is OK, it is stored in exactly the same + # form as specified in the assignment (with or without + # "0x", etc). + + use_defaults = False + new_val = self.user_val + + if use_defaults: + for (val_expr, cond_expr) in self.def_exprs: + if self.config._eval_expr(cond_expr) != "n": + self.write_to_conf = True + + # If the default value is OK, it is stored in exactly + # the same form as specified. Otherwise, it is clamped + # to the range, and the output has "0x" as appropriate + # for the type. + + new_val = self.config._get_str_value(val_expr) + + if _is_base_n(new_val, base): + new_val_num = int(new_val, base) + if has_active_range: + clamped_val = None + + if new_val_num < low: + clamped_val = low + elif new_val_num > high: + clamped_val = high + + if clamped_val is not None: + new_val = (hex(clamped_val) if \ + self.type == HEX else str(clamped_val)) + + break + else: # For the for loop + # If no user value or default kicks in but the hex/int has + # an active range, then the low end of the range is used, + # provided it's > 0, with "0x" prepended as appropriate. + + if has_active_range and low > 0: + new_val = (hex(low) if self.type == HEX else str(low)) + + self.cached_value = new_val + return new_val + + def set_user_value(self, v): + """Sets the user value of the symbol. + + Equal in effect to assigning the value to the symbol within a .config + file. Use get_lower/upper_bound() or get_assignable_values() to find + the range of currently assignable values for bool and tristate symbols; + setting values outside this range will cause the user value to differ + from the result of Symbol.get_value() (be truncated). Values that are + invalid for the type (such as a_bool.set_user_value("foo")) are + ignored, and a warning is emitted if an attempt is made to assign such + a value. + + For any type of symbol, is_modifiable() can be used to check if a user + value will currently have any effect on the symbol, as determined by + its visibility and range of assignable values. Any value that is valid + for the type (bool, tristate, etc.) will end up being reflected in + get_user_value() though, and might have an effect later if conditions + change. To get rid of the user value, use unset_user_value(). + + Any symbols dependent on the symbol are (recursively) invalidated, so + things will just work with regards to dependencies. + + v -- The user value to give to the symbol.""" + self._set_user_value_no_invalidate(v, False) + + # There might be something more efficient you could do here, but play + # it safe. + if self.name == "MODULES": + self.config._invalidate_all() + return + + self._invalidate() + self._invalidate_dependent() + + def unset_user_value(self): + """Resets the user value of the symbol, as if the symbol had never + gotten a user value via Config.load_config() or + Symbol.set_user_value().""" + self._unset_user_value_no_recursive_invalidate() + self._invalidate_dependent() + + def get_user_value(self): + """Returns the value assigned to the symbol in a .config or via + Symbol.set_user_value() (provided the value was valid for the type of the + symbol). Returns None in case of no user value.""" + return self.user_val + + def get_name(self): + """Returns the name of the symbol.""" + return self.name + + def get_upper_bound(self): + """For string/hex/int symbols and for bool and tristate symbols that + cannot be modified (see is_modifiable()), returns None. + + Otherwise, returns the highest value the symbol can be set to with + Symbol.set_user_value() (that will not be truncated): one of "m" or "y", + arranged from lowest to highest. This corresponds to the highest value + the symbol could be given in e.g. the 'make menuconfig' interface. + + See also the tri_less*() and tri_greater*() functions, which could come + in handy.""" + if self.type != BOOL and self.type != TRISTATE: + return None + rev_dep = self.config._eval_expr(self.rev_dep) + # A bool selected to "m" gets promoted to "y" + if self.type == BOOL and rev_dep == "m": + rev_dep = "y" + vis = self._get_visibility() + if (tri_to_int[vis] - tri_to_int[rev_dep]) > 0: + return vis + return None + + def get_lower_bound(self): + """For string/hex/int symbols and for bool and tristate symbols that + cannot be modified (see is_modifiable()), returns None. + + Otherwise, returns the lowest value the symbol can be set to with + Symbol.set_user_value() (that will not be truncated): one of "n" or "m", + arranged from lowest to highest. This corresponds to the lowest value + the symbol could be given in e.g. the 'make menuconfig' interface. + + See also the tri_less*() and tri_greater*() functions, which could come + in handy.""" + if self.type != BOOL and self.type != TRISTATE: + return None + rev_dep = self.config._eval_expr(self.rev_dep) + # A bool selected to "m" gets promoted to "y" + if self.type == BOOL and rev_dep == "m": + rev_dep = "y" + if (tri_to_int[self._get_visibility()] - tri_to_int[rev_dep]) > 0: + return rev_dep + return None + + def get_assignable_values(self): + """For string/hex/int symbols and for bool and tristate symbols that + cannot be modified (see is_modifiable()), returns the empty list. + + Otherwise, returns a list containing the user values that can be + assigned to the symbol (that won't be truncated). Usage example: + + if "m" in sym.get_assignable_values(): + sym.set_user_value("m") + + This is basically a more convenient interface to + get_lower/upper_bound() when wanting to test if a particular tristate + value can be assigned.""" + if self.type != BOOL and self.type != TRISTATE: + return [] + rev_dep = self.config._eval_expr(self.rev_dep) + # A bool selected to "m" gets promoted to "y" + if self.type == BOOL and rev_dep == "m": + rev_dep = "y" + res = ["n", "m", "y"][tri_to_int[rev_dep] : + tri_to_int[self._get_visibility()] + 1] + return res if len(res) > 1 else [] + + def get_type(self): + """Returns the type of the symbol: one of UNKNOWN, BOOL, TRISTATE, + STRING, HEX, or INT. These are defined at the top level of the module, + so you'd do something like + + if sym.get_type() == kconfiglib.STRING: + ...""" + return self.type + + def get_visibility(self): + """Returns the visibility of the symbol: one of "n", "m" or "y". For + bool and tristate symbols, this is an upper bound on the value users + can set for the symbol. For other types of symbols, a visibility of "n" + means the user value will be ignored. A visibility of "n" corresponds + to not being visible in the 'make *config' interfaces. + + Example (assuming we're running with modules enabled -- i.e., MODULES + set to 'y'): + + # Assume this has been assigned 'n' + config N_SYM + tristate "N_SYM" + + # Assume this has been assigned 'm' + config M_SYM + tristate "M_SYM" + + # Has visibility 'n' + config A + tristate "A" + depends on N_SYM + + # Has visibility 'm' + config B + tristate "B" + depends on M_SYM + + # Has visibility 'y' + config C + tristate "C" + + # Has no prompt, and hence visibility 'n' + config D + tristate + + Having visibility be tri-valued ensures that e.g. a symbol cannot be + set to "y" by the user if it depends on a symbol with value "m", which + wouldn't be safe. + + You should probably look at get_lower/upper_bound(), + get_assignable_values() and is_modifiable() before using this.""" + return self._get_visibility() + + def get_parent(self): + """Returns the menu or choice statement that contains the symbol, or + None if the symbol is at the top level. Note that if statements are + treated as syntactic and do not have an explicit class + representation.""" + return self.parent + + def get_referenced_symbols(self, refs_from_enclosing = False): + """Returns the set() of all symbols referenced by this symbol. For + example, the symbol defined by + + config FOO + bool + prompt "foo" if A && B + default C if D + depends on E + select F if G + + references the symbols A through G. + + refs_from_enclosing (default: False) -- If True, the symbols + referenced by enclosing menus and if's will be + included in the result.""" + return self.all_referenced_syms if refs_from_enclosing else self.referenced_syms + + def get_selected_symbols(self): + """Returns the set() of all symbols X for which this symbol has a + 'select X' or 'select X if Y' (regardless of whether Y is satisfied or + not). This is a subset of the symbols returned by + get_referenced_symbols().""" + return self.selected_syms + + def get_help(self): + """Returns the help text of the symbol, or None if the symbol has no + help text.""" + return self.help + + def get_config(self): + """Returns the Config instance this symbol is from.""" + return self.config + + def get_def_locations(self): + """Returns a list of (filename, linenr) tuples, where filename (string) + and linenr (int) represent a location where the symbol is defined. For + the vast majority of symbols this list will only contain one element. + For the following Kconfig, FOO would get two entries: the lines marked + with *. + + config FOO * + bool "foo prompt 1" + + config FOO * + bool "foo prompt 2" + """ + return self.def_locations + + def get_ref_locations(self): + """Returns a list of (filename, linenr) tuples, where filename (string) + and linenr (int) represent a location where the symbol is referenced in + the configuration. For example, the lines marked by * would be included + for FOO below: + + config A + bool + default BAR || FOO * + + config B + tristate + depends on FOO * + default m if FOO * + + if FOO * + config A + bool "A" + endif + + config FOO (definition not included) + bool + """ + return self.ref_locations + + def is_modifiable(self): + """Returns True if the value of the symbol could be modified by calling + Symbol.set_user_value() and False otherwise. + + For bools and tristates, this corresponds to the symbol being visible + in the 'make menuconfig' interface and not already being pinned to a + specific value (e.g. because it is selected by another symbol). + + For strings and numbers, this corresponds to just being visible. (See + Symbol.get_visibility().)""" + if self.is_special_: + return False + if self.type == BOOL or self.type == TRISTATE: + rev_dep = self.config._eval_expr(self.rev_dep) + # A bool selected to "m" gets promoted to "y" + if self.type == BOOL and rev_dep == "m": + rev_dep = "y" + return (tri_to_int[self._get_visibility()] - + tri_to_int[rev_dep]) > 0 + return self._get_visibility() != "n" + + def is_defined(self): + """Returns False if the symbol is referred to in the Kconfig but never + actually defined, otherwise True.""" + return self.is_defined_ + + def is_special(self): + """Returns True if the symbol is one of the special symbols n, m, y, or + UNAME_RELEASE, or gets its value from the environment. Otherwise, + returns False.""" + return self.is_special_ + + def is_from_environment(self): + """Returns True if the symbol gets its value from the environment. + Otherwise, returns False.""" + return self.is_from_env + + def has_ranges(self): + """Returns True if the symbol is of type INT or HEX and has ranges that + limits what values it can take on, otherwise False.""" + return self.ranges != [] + + def is_choice_symbol(self): + """Returns True if the symbol is in a choice statement and is an actual + choice symbol (see Choice.get_symbols()); otherwise, returns + False.""" + return self.is_choice_symbol_ + + def is_choice_selection(self): + """Returns True if the symbol is contained in a choice statement and is + the selected item, otherwise False. Equivalent to 'sym.is_choice_symbol() + and sym.get_parent().get_selection() is sym'.""" + return self.is_choice_symbol_ and self.parent.get_selection() is self + + def __str__(self): + """Returns a string containing various information about the symbol.""" + return self.config._get_sym_or_choice_str(self) + + # + # Private methods + # + + def __init__(self): + """Symbol constructor -- not intended to be called directly by + kconfiglib clients.""" + + # Set default values + _HasVisibility.__init__(self) + + self.config = None + + self.parent = None + self.name = None + self.type = UNKNOWN + + self.def_exprs = [] + self.ranges = [] + self.rev_dep = "n" + + # The prompt, default value and select conditions without any + # dependencies from menus or if's propagated to them + + self.orig_prompts = [] + self.orig_def_exprs = [] + self.orig_selects = [] + + # Dependencies inherited from containing menus and if's + self.deps_from_containing = None + + self.help = None + + # The set of symbols referenced by this symbol (see + # get_referenced_symbols()) + self.referenced_syms = set() + + # The set of symbols selected by this symbol (see + # get_selected_symbols()) + self.selected_syms = set() + + # Like 'referenced_syms', but includes symbols from + # dependencies inherited from enclosing menus and if's + self.all_referenced_syms = set() + + # This is set to True for "actual" choice symbols. See + # Choice._determine_actual_symbols(). The trailing underscore avoids a + # collision with is_choice_symbol(). + self.is_choice_symbol_ = False + + # This records only dependencies specified with 'depends on'. Needed + # when determining actual choice items (hrrrr...). See also + # Choice._determine_actual_symbols(). + self.menu_dep = None + + # See Symbol.get_ref/def_locations(). + self.def_locations = [] + self.ref_locations = [] + + self.user_val = None + + # Flags + + # Should the symbol get an entry in .config? + self.write_to_conf = False + + # Caches the calculated value + self.cached_value = None + + # Note: An instance variable 'self.dep' gets set on the Symbol in + # Config._build_dep(), linking the symbol to the symbols that + # immediately depend on it (in a caching/invalidation sense). The total + # set of dependent symbols for the symbol (the transitive closure) is + # calculated on an as-needed basis in _get_dependent(). + + # Caches the total list of dependent symbols. Calculated in + # _get_dependent(). + self.cached_deps = None + + # Does the symbol have an entry in the Kconfig file? The trailing + # underscore avoids a collision with is_defined(). + self.is_defined_ = False + + # Does the symbol get its value in some special way, e.g. from the + # environment or by being one of the special symbols n, m, and y? If + # so, the value is stored in self.cached_value, which is never + # invalidated. The trailing underscore avoids a collision with + # is_special(). + self.is_special_ = False + + # Does the symbol get its value from the environment? + self.is_from_env = False + + def _invalidate(self): + if self.is_special_: + return + + if self.is_choice_symbol_: + self.parent._invalidate() + + _HasVisibility._invalidate(self) + + self.write_to_conf = False + self.cached_value = None + + def _invalidate_dependent(self): + for sym in self._get_dependent(): + sym._invalidate() + + def _set_user_value_no_invalidate(self, v, suppress_load_warnings): + """Like set_user_value(), but does not invalidate any symbols. + + suppress_load_warnings -- + some warnings are annoying when loading a .config that can be helpful + when manually invoking set_user_value(). This flag is set to True to + suppress such warnings. + + Perhaps this could be made optional for load_config() instead.""" + + if self.is_special_: + if self.is_from_env: + self.config._warn('attempt to assign the value "{0}" to the ' + 'symbol {1}, which gets its value from the ' + 'environment. Assignment ignored.' + .format(v, self.name)) + else: + self.config._warn('attempt to assign the value "{0}" to the ' + 'special symbol {1}. Assignment ignored.' + .format(v, self.name)) + + return + + + if not self.is_defined_: + filename, linenr = self.ref_locations[0] + + self.config._undef_assign('attempt to assign the value "{0}" to {1}, ' + "which is referenced at {2}:{3} but never " + "defined. Assignment ignored." + .format(v, self.name, filename, linenr)) + return + + # Check if the value is valid for our type + + if not (( self.type == BOOL and (v == "n" or v == "y") ) or + ( self.type == TRISTATE and (v == "n" or v == "m" or + v == "y") ) or + ( self.type == STRING ) or + ( self.type == INT and _is_base_n(v, 10) ) or + ( self.type == HEX and _is_base_n(v, 16) )): + + self.config._warn('the value "{0}" is invalid for {1}, which has type {2}. ' + "Assignment ignored." + .format(v, self.name, typename[self.type])) + return + + if self.prompts == [] and not suppress_load_warnings: + self.config._warn('assigning "{0}" to the symbol {1} which ' + 'lacks prompts and thus has visibility "n". ' + 'The assignment will have no effect.' + .format(v, self.name)) + + self.user_val = v + + if self.is_choice_symbol_ and (self.type == BOOL or + self.type == TRISTATE): + choice = self.parent + if v == "y": + choice.user_val = self + choice.user_mode = "y" + elif v == "m": + choice.user_val = None + choice.user_mode = "m" + + def _unset_user_value_no_recursive_invalidate(self): + self._invalidate() + self.user_val = None + + if self.is_choice_symbol_: + self.parent._unset_user_value() + + def _make_conf(self): + if self.already_written: + return [] + + self.already_written = True + + # Note: write_to_conf is determined in get_value() + val = self.get_value() + if not self.write_to_conf: + return [] + + if self.type == BOOL or self.type == TRISTATE: + if val == "m" or val == "y": + return ["CONFIG_{0}={1}".format(self.name, val)] + return ["# CONFIG_{0} is not set".format(self.name)] + + elif self.type == STRING: + # Escape \ and " + return ['CONFIG_{0}="{1}"' + .format(self.name, + val.replace("\\", "\\\\").replace('"', '\\"'))] + + elif self.type == INT or self.type == HEX: + return ["CONFIG_{0}={1}".format(self.name, val)] + + else: + _internal_error('Internal error while creating .config: unknown type "{0}".' + .format(self.type)) + + def _get_dependent(self): + """Returns the set of symbols that should be invalidated if the value + of the symbol changes, because they might be affected by the change. + Note that this is an internal API -- it's probably of limited + usefulness to clients.""" + if self.cached_deps is not None: + return self.cached_deps + + res = set() + + self._add_dependent_ignore_siblings(res) + if self.is_choice_symbol_: + for s in self.parent.get_symbols(): + if s is not self: + res.add(s) + s._add_dependent_ignore_siblings(res) + + self.cached_deps = res + return res + + def _add_dependent_ignore_siblings(self, to): + """Calculating dependencies gets a bit tricky for choice items as they + all depend on each other, potentially leading to infinite recursion. + This helper function calculates dependencies ignoring the other symbols + in the choice. It also works fine for symbols that are not choice + items.""" + for s in self.dep: + to.add(s) + to |= s._get_dependent() + + def _has_auto_menu_dep_on(self, on): + """See Choice._determine_actual_symbols().""" + if not isinstance(self.parent, Choice): + _internal_error("Attempt to determine auto menu dependency for symbol ouside of choice.") + + if self.prompts == []: + # If we have no prompt, use the menu dependencies instead (what was + # specified with 'depends on') + return self.menu_dep is not None and \ + self.config._expr_depends_on(self.menu_dep, on) + + for (_, cond_expr) in self.prompts: + if self.config._expr_depends_on(cond_expr, on): + return True + + return False + +class Menu(Item): + + """Represents a menu statement.""" + + # + # Public interface + # + + def get_config(self): + """Return the Config instance this menu is from.""" + return self.config + + def get_visibility(self): + """Returns the visibility of the menu. This also affects the visibility + of subitems. See also Symbol.get_visibility().""" + return self.config._eval_expr(self.dep_expr) + + def get_visible_if_visibility(self): + """Returns the visibility the menu gets from its 'visible if' + condition. "y" if the menu has no 'visible if' condition.""" + return self.config._eval_expr(self.visible_if_expr) + + def get_items(self, recursive = False): + """Returns a list containing the items (symbols, menus, choice + statements and comments) in in the menu, in the same order that the + items appear within the menu. + + recursive (default: False) -- True if items contained in items within + the menu should be included + recursively (preorder).""" + + if not recursive: + return self.block.get_items() + + res = [] + for item in self.block.get_items(): + res.append(item) + if isinstance(item, Menu): + res.extend(item.get_items(True)) + elif isinstance(item, Choice): + res.extend(item.get_items()) + return res + + def get_symbols(self, recursive = False): + """Returns a list containing the symbols in the menu, in the same order + that they appear within the menu. + + recursive (default: False) -- True if symbols contained in items within + the menu should be included + recursively.""" + + return [item for item in self.get_items(recursive) if isinstance(item, Symbol)] + + def get_title(self): + """Returns the title text of the menu.""" + return self.title + + def get_parent(self): + """Returns the menu or choice statement that contains the menu, or + None if the menu is at the top level. Note that if statements are + treated as syntactic sugar and do not have an explicit class + representation.""" + return self.parent + + def get_referenced_symbols(self, refs_from_enclosing = False): + """See Symbol.get_referenced_symbols().""" + return self.all_referenced_syms if refs_from_enclosing else self.referenced_syms + + def get_location(self): + """Returns the location of the menu as a (filename, linenr) tuple, + where filename is a string and linenr an int.""" + return (self.filename, self.linenr) + + def __str__(self): + """Returns a string containing various information about the menu.""" + depends_on_str = self.config._expr_val_str(self.orig_deps, + "(no dependencies)") + visible_if_str = self.config._expr_val_str(self.visible_if_expr, + "(no dependencies)") + + additional_deps_str = " " + self.config._expr_val_str(self.deps_from_containing, + "(no additional dependencies)") + + return _sep_lines("Menu", + "Title : " + self.title, + "'depends on' dependencies : " + depends_on_str, + "'visible if' dependencies : " + visible_if_str, + "Additional dependencies from enclosing menus and if's:", + additional_deps_str, + "Location: {0}:{1}".format(self.filename, self.linenr)) + + # + # Private methods + # + + def __init__(self): + """Menu constructor -- not intended to be called directly by + kconfiglib clients.""" + + self.config = None + + self.parent = None + self.title = None + self.block = None + self.dep_expr = None + + # Dependency expression without dependencies from enclosing menus and + # if's propagated + self.orig_deps = None + + # Dependencies inherited from containing menus and if's + self.deps_from_containing = None + + # The 'visible if' expression + self.visible_if_expr = None + + # The set of symbols referenced by this menu (see + # get_referenced_symbols()) + self.referenced_syms = set() + + # Like 'referenced_syms', but includes symbols from + # dependencies inherited from enclosing menus and if's + self.all_referenced_syms = None + + self.filename = None + self.linenr = None + + def _make_conf(self): + item_conf = self.block._make_conf() + + if self.config._eval_expr(self.dep_expr) != "n" and \ + self.config._eval_expr(self.visible_if_expr) != "n": + return ["\n#\n# {0}\n#".format(self.title)] + item_conf + return item_conf + +class Choice(Item, _HasVisibility): + + """Represents a choice statement. A choice can be in one of three modes: + + "n" - The choice is not visible and no symbols can be selected. + + "m" - Any number of symbols can be set to "m". The rest will be "n". This + is safe since potentially conflicting options don't actually get + compiled into the kernel simultaneously with "m". + + "y" - One symbol will be "y" while the rest are "n". + + Only tristate choices can be in "m" mode, and the visibility of the choice + is an upper bound on the mode, so that e.g. a choice that depends on a + symbol with value "m" will be in "m" mode. + + The mode changes automatically when a value is assigned to a symbol within + the choice. + + See Symbol.get_visibility() too.""" + + # + # Public interface + # + + def get_selection(self): + """Returns the symbol selected (either by the user or through + defaults), or None if either no symbol is selected or the mode is not + "y".""" + if self.cached_selection is not None: + if self.cached_selection == NO_SELECTION: + return None + return self.cached_selection + + if self.get_mode() != "y": + return self._cache_ret(None) + + # User choice available? + if self.user_val is not None and \ + self.user_val._get_visibility() == "y": + return self._cache_ret(self.user_val) + + if self.optional: + return self._cache_ret(None) + + return self._cache_ret(self.get_selection_from_defaults()) + + def get_selection_from_defaults(self): + """Like Choice.get_selection(), but acts as if no symbol has been + selected by the user and no 'optional' flag is in effect.""" + + if self.actual_symbols == []: + return None + + for (symbol, cond_expr) in self.def_exprs: + if self.config._eval_expr(cond_expr) != "n": + chosen_symbol = symbol + break + else: + chosen_symbol = self.actual_symbols[0] + + # Is the chosen symbol visible? + if chosen_symbol._get_visibility() != "n": + return chosen_symbol + # Otherwise, pick the first visible symbol + for sym in self.actual_symbols: + if sym._get_visibility() != "n": + return sym + return None + + def get_user_selection(self): + """If the choice is in "y" mode and has a user-selected symbol, returns + that symbol. Otherwise, returns None.""" + return self.user_val + + def get_config(self): + """Returns the Config instance this choice is from.""" + return self.config + + def get_name(self): + """For named choices, returns the name. Returns None for unnamed + choices. No named choices appear anywhere in the kernel Kconfig files + as of Linux 3.7.0-rc8.""" + return self.name + + def get_help(self): + """Returns the help text of the choice, or None if the choice has no + help text.""" + return self.help + + def get_type(self): + """Returns the type of the choice. See Symbol.get_type().""" + return self.type + + def get_items(self): + """Gets all items contained in the choice in the same order as within + the configuration ("items" instead of "symbols" since choices and + comments might appear within choices. This only happens in one place as + of Linux 3.7.0-rc8, in drivers/usb/gadget/Kconfig).""" + return self.block.get_items() + + def get_symbols(self): + """Returns a list containing the choice's symbols. + + A quirk (perhaps a bug) of Kconfig is that you can put items within a + choice that will not be considered members of the choice insofar as + selection is concerned. This happens for example if one symbol within a + choice 'depends on' the symbol preceding it, or if you put non-symbol + items within choices. + + As of Linux 3.7.0-rc8, this seems to be used intentionally in one + place: drivers/usb/gadget/Kconfig. + + This function returns the "proper" symbols of the choice in the order + they appear in the choice, excluding such items. If you want all items + in the choice, use get_items().""" + return self.actual_symbols + + def get_parent(self): + """Returns the menu or choice statement that contains the choice, or + None if the choice is at the top level. Note that if statements are + treated as syntactic sugar and do not have an explicit class + representation.""" + return self.parent + + def get_referenced_symbols(self, refs_from_enclosing = False): + """See Symbol.get_referenced_symbols().""" + return self.all_referenced_syms if refs_from_enclosing else self.referenced_syms + + def get_def_locations(self): + """Returns a list of (filename, linenr) tuples, where filename (string) + and linenr (int) represent a location where the choice is defined. For + the vast majority of choices (all of them as of Linux 3.7.0-rc8) this + list will only contain one element, but its possible for named choices + to be defined in multiple locations.""" + return self.def_locations + + def get_visibility(self): + """Returns the visibility of the choice statement: one of "n", "m" or + "y". This acts as an upper limit on the mode of the choice (though bool + choices can only have the mode "y"). See the class documentation for an + explanation of modes.""" + return self._get_visibility() + + def get_mode(self): + """Returns the mode of the choice. See the class documentation for + an explanation of modes.""" + minimum_mode = "n" if self.optional else "m" + mode = self.user_mode if self.user_mode is not None else minimum_mode + mode = self.config._eval_min(mode, self._get_visibility()) + + # Promote "m" to "y" for boolean choices + if mode == "m" and self.type == BOOL: + return "y" + + return mode + + def is_optional(self): + """Returns True if the symbol has the optional flag set (and so will default + to "n" mode). Otherwise, returns False.""" + return self.optional + + def __str__(self): + """Returns a string containing various information about the choice + statement.""" + return self.config._get_sym_or_choice_str(self) + + # + # Private methods + # + + def __init__(self): + """Choice constructor -- not intended to be called directly by + kconfiglib clients.""" + + _HasVisibility.__init__(self) + + self.config = None + + self.parent = None + self.name = None # Yes, choices can be named + self.type = UNKNOWN + self.def_exprs = [] + self.help = None + self.optional = False + self.block = None + + # The prompts and default values without any dependencies from + # enclosing menus or if's propagated + + self.orig_prompts = [] + self.orig_def_exprs = [] + + # Dependencies inherited from containing menus and if's + self.deps_from_containing = None + + # We need to filter out symbols that appear within the choice block but + # are not considered choice items (see + # Choice._determine_actual_symbols()) This list holds the "actual" choice + # items. + self.actual_symbols = [] + + # The set of symbols referenced by this choice (see + # get_referenced_symbols()) + self.referenced_syms = set() + + # Like 'referenced_syms', but includes symbols from + # dependencies inherited from enclosing menus and if's + self.all_referenced_syms = set() + + # See Choice.get_def_locations() + self.def_locations = [] + + self.user_val = None + self.user_mode = None + + self.cached_selection = None + + def _determine_actual_symbols(self): + """If a symbol's visibility depends on the preceding symbol within a + choice, it is no longer viewed as a choice item (quite possibly a bug, + but some things consciously use it.. ugh. It stems from automatic + submenu creation). In addition, it's possible to have choices and + comments within choices, and those shouldn't be considered as choice + items either. Only drivers/usb/gadget/Kconfig seems to depend on any of + this. This method computes the "actual" items in the choice and sets + the is_choice_symbol_ flag on them (retrieved via is_choice_symbol()). + + Don't let this scare you: an earlier version simply checked for a + sequence of symbols where all symbols after the first appeared in the + 'depends on' expression of the first, and that worked fine. The added + complexity is to be future-proof in the event that + drivers/usb/gadget/Kconfig turns even more sinister. It might very well + be overkilling things (especially if that file is refactored ;).""" + + items = self.block.get_items() + + # Items might depend on each other in a tree structure, so we need a + # stack to keep track of the current tentative parent + stack = [] + + for item in items: + if not isinstance(item, Symbol): + stack = [] + continue + + while stack != []: + if item._has_auto_menu_dep_on(stack[-1]): + # The item should not be viewed as a choice item, so don't + # set item.is_choice_symbol_. + stack.append(item) + break + else: + stack.pop() + else: + item.is_choice_symbol_ = True + self.actual_symbols.append(item) + stack.append(item) + + def _cache_ret(self, selection): + # As None is used to indicate the lack of a cached value we can't use + # that to cache the fact that the choice has no selection. Instead, we + # use the symbolic constant NO_SELECTION. + if selection is None: + self.cached_selection = NO_SELECTION + else: + self.cached_selection = selection + + return selection + + def _invalidate(self): + _HasVisibility._invalidate(self) + self.cached_selection = None + + def _unset_user_value(self): + self._invalidate() + self.user_val = None + self.user_mode = None + + def _make_conf(self): + return self.block._make_conf() + +class Comment(Item): + + """Represents a comment statement.""" + + # + # Public interface + # + + def get_config(self): + """Returns the Config instance this comment is from.""" + return self.config + + def get_visibility(self): + """Returns the visibility of the comment. See also + Symbol.get_visibility().""" + return self.config._eval_expr(self.dep_expr) + + def get_text(self): + """Returns the text of the comment.""" + return self.text + + def get_parent(self): + """Returns the menu or choice statement that contains the comment, or + None if the comment is at the top level. Note that if statements are + treated as syntactic sugar and do not have an explicit class + representation.""" + return self.parent + + def get_referenced_symbols(self, refs_from_enclosing = False): + """See Symbol.get_referenced_symbols().""" + return self.all_referenced_syms if refs_from_enclosing else self.referenced_syms + + def get_location(self): + """Returns the location of the comment as a (filename, linenr) tuple, + where filename is a string and linenr an int.""" + return (self.filename, self.linenr) + + def __str__(self): + """Returns a string containing various information about the comment.""" + dep_str = self.config._expr_val_str(self.orig_deps, "(no dependencies)") + + additional_deps_str = " " + self.config._expr_val_str(self.deps_from_containing, + "(no additional dependencies)") + + return _sep_lines("Comment", + "Text: " + str(self.text), + "Dependencies: " + dep_str, + "Additional dependencies from enclosing menus and if's:", + additional_deps_str, + "Location: {0}:{1}".format(self.filename, self.linenr)) + + # + # Private methods + # + + def __init__(self): + """Comment constructor -- not intended to be called directly by + kconfiglib clients.""" + + self.config = None + + self.parent = None + self.text = None + self.dep_expr = None + + # Dependency expression without dependencies from enclosing menus and + # if's propagated + self.orig_deps = None + + # Dependencies inherited from containing menus and if's + self.deps_from_containing = None + + # The set of symbols referenced by this comment (see + # get_referenced_symbols()) + self.referenced_syms = set() + + # Like 'referenced_syms', but includes symbols from + # dependencies inherited from enclosing menus and if's + self.all_referenced_syms = None + + self.filename = None + self.linenr = None + + def _make_conf(self): + if self.config._eval_expr(self.dep_expr) != "n": + return ["\n#\n# {0}\n#".format(self.text)] + return [] + +class _Feed: + + """Class for working with sequences in a stream-like fashion; handy for tokens.""" + + def __init__(self, items): + self.items = items + self.length = len(self.items) + self.i = 0 + + def get_next(self): + if self.i >= self.length: + return None + + item = self.items[self.i] + self.i += 1 + return item + + def peek_next(self): + return None if self.i >= self.length else self.items[self.i] + + def go_to_start(self): + self.i = 0 + + def __getitem__(self, index): + return self.items[index] + + def __len__(self): + return len(self.items) + + def is_empty(self): + return self.items == [] + + def check(self, token): + """Check if the next token is 'token'. If so, remove it from the token + feed and return True. Otherwise, leave it in and return False.""" + if self.i >= self.length: + return None + + if self.items[self.i] == token: + self.i += 1 + return True + + return False + + def remove_while(self, pred): + while self.i < self.length and pred(self.items[self.i]): + self.i += 1 + + def go_back(self): + if self.i <= 0: + _internal_error("Attempt to move back in Feed while already at the beginning.") + self.i -= 1 + +class _FileFeed(_Feed): + + """Feed subclass that keeps track of the current filename and line + number.""" + + def __init__(self, lines, filename): + self.filename = _clean_up_path(filename) + _Feed.__init__(self, lines) + + def get_filename(self): + return self.filename + + def get_linenr(self): + return self.i + +# +# Misc. public global utility functions +# + +def tri_less(v1, v2): + """Returns True if the tristate v1 is less than the tristate v2, where "n", + "m" and "y" are ordered from lowest to highest. Otherwise, returns + False.""" + return tri_to_int[v1] < tri_to_int[v2] + +def tri_less_eq(v1, v2): + """Returns True if the tristate v1 is less than or equal to the tristate + v2, where "n", "m" and "y" are ordered from lowest to highest. Otherwise, + returns False.""" + return tri_to_int[v1] <= tri_to_int[v2] + +def tri_greater(v1, v2): + """Returns True if the tristate v1 is greater than the tristate v2, where + "n", "m" and "y" are ordered from lowest to highest. Otherwise, returns + False.""" + return tri_to_int[v1] > tri_to_int[v2] + +def tri_greater_eq(v1, v2): + """Returns True if the tristate v1 is greater than or equal to the tristate + v2, where "n", "m" and "y" are ordered from lowest to highest. Otherwise, + returns False.""" + return tri_to_int[v1] >= tri_to_int[v2] + +# +# Helper functions, mostly related to text processing +# + +def _strip_quotes(s, line, filename, linenr): + """Removes any quotes surrounding 's' if it has them; otherwise returns 's' + unmodified.""" + s = s.strip() + if not s: + return "" + if s[0] == '"' or s[0] == "'": + if len(s) < 2 or s[-1] != s[0]: + _parse_error(line, + "malformed string literal", + filename, + linenr) + return s[1:-1] + return s + +def _indentation(line): + """Returns the indentation of the line, treating tab stops as being spaced + 8 characters apart.""" + if line.isspace(): + _internal_error("Attempt to take indentation of blank line.") + indent = 0 + for c in line: + if c == " ": + indent += 1 + elif c == "\t": + # Go to the next tab stop + indent = (indent + 8) & ~7 + else: + return indent + +def _deindent(line, indent): + """Deindent 'line' by 'indent' spaces.""" + line = line.expandtabs() + if len(line) <= indent: + return line + return line[indent:] + +def _is_base_n(s, n): + try: + int(s, n) + return True + except ValueError: + return False + +def _sep_lines(*args): + """Returns a string comprised of all arguments, with newlines inserted + between them.""" + return "\n".join(args) + +def _comment(s): + """Returns a new string with "#" inserted before each line in 's'.""" + if not s: + return "#" + res = "".join(["#" + line for line in s.splitlines(True)]) + if s.endswith("\n"): + return res + "#" + return res + +def _get_lines(filename): + """Returns a list of lines from 'filename', joining any line ending in \\ + with the following line.""" + with open(filename, "r") as f: + lines = [] + accum = "" + while 1: + line = f.readline() + + if line == "": + return lines + + if line.endswith("\\\n"): + accum += line[:-2] + else: + accum += line + lines.append(accum) + accum = "" + +def _strip_trailing_slash(path): + """Removes any trailing slash from 'path'.""" + return path[:-1] if path.endswith("/") else path + +def _clean_up_path(path): + """Strips any initial "./" and trailing slash from 'path'.""" + if path.startswith("./"): + path = path[2:] + return _strip_trailing_slash(path) + +# +# Error handling +# + +class Kconfig_Syntax_Error(Exception): + """Exception raised for syntax errors.""" + pass + +class Internal_Error(Exception): + """Exception raised for internal errors.""" + pass + +def _tokenization_error(s, index, filename, linenr): + if filename is not None: + assert linenr is not None + sys.stderr.write("{0}:{1}:\n".format(filename, linenr)) + + if s.endswith("\n"): + s = s[:-1] + + # Calculate the visual offset corresponding to index 'index' in 's' + # assuming tabstops are spaced 8 characters apart + vis_index = 0 + for c in s[:index]: + if c == "\t": + vis_index = (vis_index + 8) & ~7 + else: + vis_index += 1 + + # Don't output actual tabs to be independent of how the terminal renders + # them + s = s.expandtabs() + + raise Kconfig_Syntax_Error, ( + _sep_lines("Error during tokenization at location indicated by caret.\n", + s, + " " * vis_index + "^\n")) + +def _parse_error(s, msg, filename, linenr): + error_str = "" + + if filename is not None: + assert linenr is not None + error_str += "{0}:{1}: ".format(filename, linenr) + + if s.endswith("\n"): + s = s[:-1] + + error_str += 'Error while parsing "{0}"'.format(s) + \ + ("." if msg is None else ": " + msg) + + raise Kconfig_Syntax_Error, error_str + +def _internal_error(msg): + msg += "\nSorry! You may want to send an email to kconfiglib@gmail.com " \ + "to tell me about this. Include the message above and the stack " \ + "trace and describe what you were doing." + + raise Internal_Error, msg + +if use_psyco: + import psyco + + Config._tokenize = psyco.proxy(Config._tokenize) + Config._eval_expr = psyco.proxy(Config._eval_expr) + + _indentation = psyco.proxy(_indentation) + _get_lines = psyco.proxy(_get_lines) diff --git a/scripts/mkmakefile b/support/scripts/mkmakefile similarity index 86% rename from scripts/mkmakefile rename to support/scripts/mkmakefile index 38d8268533..27b15073f3 100755 --- a/scripts/mkmakefile +++ b/support/scripts/mkmakefile @@ -1,7 +1,7 @@ #!/bin/sh # Generates a small Makefile used in the root of the output # directory, to allow make to be started from there. -# The Makefile also allow for more convinient build of external modules +# The Makefile also allow for more convenient build of external modules # Usage # $1 - Kernel src directory @@ -32,16 +32,16 @@ MAKEFLAGS += --no-print-directory .PHONY: all \$(MAKECMDGOALS) -all := \$(filter-out all Makefile,\$(MAKECMDGOALS)) +all := \$(filter-out Makefile,\$(MAKECMDGOALS)) -all: +_all: \$(MAKE) \$(MAKEARGS) \$(all) Makefile:; -\$(all): all +\$(all): _all @: -%/: all +%/: _all @: EOF diff --git a/support/scripts/mkusers b/support/scripts/mkusers new file mode 100755 index 0000000000..19aa085e10 --- /dev/null +++ b/support/scripts/mkusers @@ -0,0 +1,409 @@ +#!/bin/bash +set -e +myname="${0##*/}" + +#---------------------------------------------------------------------------- +# Configurable items +MIN_UID=1000 +MAX_UID=1999 +MIN_GID=1000 +MAX_GID=1999 +# No more is configurable below this point +#---------------------------------------------------------------------------- + +#---------------------------------------------------------------------------- +error() { + local fmt="${1}" + shift + + printf "%s: " "${myname}" >&2 + printf "${fmt}" "${@}" >&2 +} +fail() { + error "$@" + exit 1 +} + +#---------------------------------------------------------------------------- +if [ ${#} -ne 2 ]; then + fail "usage: %s USERS_TABLE TARGET_DIR\n" +fi +USERS_TABLE="${1}" +TARGET_DIR="${2}" +shift 2 +PASSWD="${TARGET_DIR}/etc/passwd" +SHADOW="${TARGET_DIR}/etc/shadow" +GROUP="${TARGET_DIR}/etc/group" +# /etc/gshadow is not part of the standard skeleton, so not everybody +# will have it, but some may hav it, and its content must be in sync +# with /etc/group, so any use of gshadow must be conditional. +GSHADOW="${TARGET_DIR}/etc/gshadow" + +# We can't simply source ${BUILDROOT_CONFIG} as it may contains constructs +# such as: +# BR2_DEFCONFIG="$(CONFIG_DIR)/defconfig" +# which when sourced from a shell script will eventually try to execute +# a command name 'CONFIG_DIR', which is plain wrong for virtually every +# systems out there. +# So, we have to scan that file instead. Sigh... :-( +PASSWD_METHOD="$( sed -r -e '/^BR2_TARGET_GENERIC_PASSWD_METHOD="(.*)"$/!d;' \ + -e 's//\1/;' \ + "${BUILDROOT_CONFIG}" \ + )" + +#---------------------------------------------------------------------------- +get_uid() { + local username="${1}" + + awk -F: -v username="${username}" \ + '$1 == username { printf( "%d\n", $3 ); }' "${PASSWD}" +} + +#---------------------------------------------------------------------------- +get_ugid() { + local username="${1}" + + awk -F:i -v username="${username}" \ + '$1 == username { printf( "%d\n", $4 ); }' "${PASSWD}" +} + +#---------------------------------------------------------------------------- +get_gid() { + local group="${1}" + + awk -F: -v group="${group}" \ + '$1 == group { printf( "%d\n", $3 ); }' "${GROUP}" +} + +#---------------------------------------------------------------------------- +get_username() { + local uid="${1}" + + awk -F: -v uid="${uid}" \ + '$3 == uid { printf( "%s\n", $1 ); }' "${PASSWD}" +} + +#---------------------------------------------------------------------------- +get_group() { + local gid="${1}" + + awk -F: -v gid="${gid}" \ + '$3 == gid { printf( "%s\n", $1 ); }' "${GROUP}" +} + +#---------------------------------------------------------------------------- +get_ugroup() { + local username="${1}" + local ugid + + ugid="$( get_ugid "${username}" )" + if [ -n "${ugid}" ]; then + get_group "${ugid}" + fi +} + +#---------------------------------------------------------------------------- +# Sanity-check the new user/group: +# - check the gid is not already used for another group +# - check the group does not already exist with another gid +# - check the user does not already exist with another gid +# - check the uid is not already used for another user +# - check the user does not already exist with another uid +# - check the user does not already exist in another group +check_user_validity() { + local username="${1}" + local uid="${2}" + local group="${3}" + local gid="${4}" + local _uid _ugid _gid _username _group _ugroup + + _group="$( get_group "${gid}" )" + _gid="$( get_gid "${group}" )" + _ugid="$( get_ugid "${username}" )" + _username="$( get_username "${uid}" )" + _uid="$( get_uid "${username}" )" + _ugroup="$( get_ugroup "${username}" )" + + if [ "${username}" = "root" ]; then + fail "invalid username '%s\n'" "${username}" + fi + + if [ ${gid} -lt -1 -o ${gid} -eq 0 ]; then + fail "invalid gid '%d'\n" ${gid} + elif [ ${gid} -ne -1 ]; then + # check the gid is not already used for another group + if [ -n "${_group}" -a "${_group}" != "${group}" ]; then + fail "gid is already used by group '${_group}'\n" + fi + + # check the group does not already exists with another gid + if [ -n "${_gid}" -a ${_gid} -ne ${gid} ]; then + fail "group already exists with gid '${_gid}'\n" + fi + + # check the user does not already exists with another gid + if [ -n "${_ugid}" -a ${_ugid} -ne ${gid} ]; then + fail "user already exists with gid '${_ugid}'\n" + fi + fi + + if [ ${uid} -lt -1 -o ${uid} -eq 0 ]; then + fail "invalid uid '%d'\n" ${uid} + elif [ ${uid} -ne -1 ]; then + # check the uid is not already used for another user + if [ -n "${_username}" -a "${_username}" != "${username}" ]; then + fail "uid is already used by user '${_username}'\n" + fi + + # check the user does not already exists with another uid + if [ -n "${_uid}" -a ${_uid} -ne ${uid} ]; then + fail "user already exists with uid '${_uid}'\n" + fi + fi + + # check the user does not already exist in another group + if [ -n "${_ugroup}" -a "${_ugroup}" != "${group}" ]; then + fail "user already exists with group '${_ugroup}'\n" + fi + + return 0 +} + +#---------------------------------------------------------------------------- +# Generate a unique GID for given group. If the group already exists, +# then simply report its current GID. Otherwise, generate the lowest GID +# that is: +# - not 0 +# - comprised in [MIN_GID..MAX_GID] +# - not already used by a group +generate_gid() { + local group="${1}" + local gid + + gid="$( get_gid "${group}" )" + if [ -z "${gid}" ]; then + for(( gid=MIN_GID; gid<=MAX_GID; gid++ )); do + if [ -z "$( get_group "${gid}" )" ]; then + break + fi + done + if [ ${gid} -gt ${MAX_GID} ]; then + fail "can not allocate a GID for group '%s'\n" "${group}" + fi + fi + printf "%d\n" "${gid}" +} + +#---------------------------------------------------------------------------- +# Add a group; if it does already exist, remove it first +add_one_group() { + local group="${1}" + local gid="${2}" + local _f + + # Generate a new GID if needed + if [ ${gid} -eq -1 ]; then + gid="$( generate_gid "${group}" )" + fi + + # Remove any previous instance of this group, and re-add the new one + sed -i -e '/^'"${group}"':.*/d;' "${GROUP}" + printf "%s:x:%d:\n" "${group}" "${gid}" >>"${GROUP}" + + # Ditto for /etc/gshadow if it exists + if [ -f "${GSHADOW}" ]; then + sed -i -e '/^'"${group}"':.*/d;' "${GSHADOW}" + printf "%s:*::\n" "${group}" >>"${GSHADOW}" + fi +} + +#---------------------------------------------------------------------------- +# Generate a unique UID for given username. If the username already exists, +# then simply report its current UID. Otherwise, generate the lowest UID +# that is: +# - not 0 +# - comprised in [MIN_UID..MAX_UID] +# - not already used by a user +generate_uid() { + local username="${1}" + local uid + + uid="$( get_uid "${username}" )" + if [ -z "${uid}" ]; then + for(( uid=MIN_UID; uid<=MAX_UID; uid++ )); do + if [ -z "$( get_username "${uid}" )" ]; then + break + fi + done + if [ ${uid} -gt ${MAX_UID} ]; then + fail "can not allocate a UID for user '%s'\n" "${username}" + fi + fi + printf "%d\n" "${uid}" +} + +#---------------------------------------------------------------------------- +# Add given user to given group, if not already the case +add_user_to_group() { + local username="${1}" + local group="${2}" + local _f + + for _f in "${GROUP}" "${GSHADOW}"; do + [ -f "${_f}" ] || continue + sed -r -i -e 's/^('"${group}"':.*:)(([^:]+,)?)'"${username}"'(,[^:]+*)?$/\1\2\4/;' \ + -e 's/^('"${group}"':.*)$/\1,'"${username}"'/;' \ + -e 's/,+/,/' \ + -e 's/:,/:/' \ + "${_f}" + done +} + +#---------------------------------------------------------------------------- +# Encode a password +encode_password() { + local passwd="${1}" + + mkpasswd -m "${PASSWD_METHOD}" "${passwd}" +} + +#---------------------------------------------------------------------------- +# Add a user; if it does already exist, remove it first +add_one_user() { + local username="${1}" + local uid="${2}" + local group="${3}" + local gid="${4}" + local passwd="${5}" + local home="${6}" + local shell="${7}" + local groups="${8}" + local comment="${9}" + local _f _group _home _shell _gid _passwd + + # First, sanity-check the user + check_user_validity "${username}" "${uid}" "${group}" "${gid}" + + # Generate a new UID if needed + if [ ${uid} -eq -1 ]; then + uid="$( generate_uid "${username}" )" + fi + + # Remove any previous instance of this user + for _f in "${PASSWD}" "${SHADOW}"; do + sed -r -i -e '/^'"${username}"':.*/d;' "${_f}" + done + + _gid="$( get_gid "${group}" )" + _shell="${shell}" + if [ "${shell}" = "-" ]; then + _shell="/bin/false" + fi + case "${home}" in + -) _home="/";; + /) fail "home can not explicitly be '/'\n";; + /*) _home="${home}";; + *) fail "home must be an absolute path\n";; + esac + case "${passwd}" in + !=*) + _passwd='!'"$( encode_passwd "${passwd#!=}" )" + ;; + =*) + _passwd="$( encode_passwd "${passwd#=}" )" + ;; + *) + _passwd="${passwd}" + ;; + esac + + printf "%s:x:%d:%d:%s:%s:%s\n" \ + "${username}" "${uid}" "${_gid}" \ + "${comment}" "${_home}" "${_shell}" \ + >>"${PASSWD}" + printf "%s:%s:::::::\n" \ + "${username}" "${_passwd}" \ + >>"${SHADOW}" + + # Add the user to its additional groups + if [ "${groups}" != "-" ]; then + for _group in ${groups//,/ }; do + add_user_to_group "${username}" "${_group}" + done + fi + + # If the user has a home, chown it + # (Note: stdout goes to the fakeroot-script) + if [ "${home}" != "-" ]; then + mkdir -p "${TARGET_DIR}/${home}" + printf "chown -R %d:%d '%s'\n" "${uid}" "${_gid}" "${TARGET_DIR}/${home}" + fi +} + +#---------------------------------------------------------------------------- +main() { + local username uid group gid passwd home shell groups comment + + # Some sanity checks + if [ ${MIN_UID} -le 0 ]; then + fail "MIN_UID must be >0 (currently %d)\n" ${MIN_UID} + fi + if [ ${MIN_GID} -le 0 ]; then + fail "MIN_GID must be >0 (currently %d)\n" ${MIN_GID} + fi + + # We first create groups whose gid is not -1, and then we create groups + # whose gid is -1 (automatic), so that, if a group is defined both with + # a specified gid and an automatic gid, we ensure the specified gid is + # used, rather than a different automatic gid is computed. + + # First, create all the main groups which gid is *not* automatic + while read username uid group gid passwd home shell groups comment; do + [ -n "${username}" ] || continue # Package with no user + [ ${gid} -ge 0 ] || continue # Automatic gid + add_one_group "${group}" "${gid}" + done <"${USERS_TABLE}" + + # Then, create all the main groups which gid *is* automatic + while read username uid group gid passwd home shell groups comment; do + [ -n "${username}" ] || continue # Package with no user + [ ${gid} -eq -1 ] || continue # Non-automatic gid + add_one_group "${group}" "${gid}" + done <"${USERS_TABLE}" + + # Then, create all the additional groups + # If any additional group is already a main group, we should use + # the gid of that main group; otherwise, we can use any gid + while read username uid group gid passwd home shell groups comment; do + [ -n "${username}" ] || continue # Package with no user + if [ "${groups}" != "-" ]; then + for g in ${groups//,/ }; do + add_one_group "${g}" -1 + done + fi + done <"${USERS_TABLE}" + + # When adding users, we do as for groups, in case two packages create + # the same user, one with an automatic uid, the other with a specified + # uid, to ensure the specified uid is used, rather than an incompatible + # uid be generated. + + # Now, add users whose uid is *not* automatic + while read username uid group gid passwd home shell groups comment; do + [ -n "${username}" ] || continue # Package with no user + [ ${uid} -ge 0 ] || continue # Automatic uid + add_one_user "${username}" "${uid}" "${group}" "${gid}" "${passwd}" \ + "${home}" "${shell}" "${groups}" "${comment}" + done <"${USERS_TABLE}" + + # Finally, add users whose uid *is* automatic + while read username uid group gid passwd home shell groups comment; do + [ -n "${username}" ] || continue # Package with no user + [ ${uid} -eq -1 ] || continue # Non-automatic uid + add_one_user "${username}" "${uid}" "${group}" "${gid}" "${passwd}" \ + "${home}" "${shell}" "${groups}" "${comment}" + done <"${USERS_TABLE}" +} + +#---------------------------------------------------------------------------- +main "${@}" diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats new file mode 100755 index 0000000000..4effa597af --- /dev/null +++ b/support/scripts/pkg-stats @@ -0,0 +1,279 @@ +#!/bin/bash + +# Copyright (C) 2009 by Thomas Petazzoni +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# This script generates an HTML file that contains a report about all +# Buildroot packages, their usage of the different package +# infrastructure and possible cleanup actions +# +# Run the script from the Buildroot toplevel directory: +# +# ./support/scripts/pkg-stats > /tmp/pkg.html +# + +echo " + +Statistics of Buildroot packages + + +Results
      + + + + + + + + + + +" + +autotools_packages=0 +cmake_packages=0 +generic_packages=0 +manual_packages=0 +packages_with_licence=0 +packages_without_licence=0 +packages_with_license_files=0 +packages_without_license_files=0 +total_patch_count=0 +cnt=0 + +for i in $(find boot/ linux/ package/ -name '*.mk' | sort) ; do + + if test \ + $i = "boot/common.mk" -o \ + $i = "linux/linux-ext-xenomai.mk" -o \ + $i = "linux/linux-ext-rtai.mk" -o \ + $i = "package/efl/efl.mk" -o \ + $i = "package/freescale-imx/freescale-imx.mk" -o \ + $i = "package/gcc/gcc.mk" -o \ + $i = "package/gstreamer/gstreamer.mk" -o \ + $i = "package/gstreamer1/gstreamer1.mk" -o \ + $i = "package/gtk2-themes/gtk2-themes.mk" -o \ + $i = "package/matchbox/matchbox.mk" -o \ + $i = "package/opengl/opengl.mk" -o \ + $i = "package/qt5/qt5.mk" -o \ + $i = "package/x11r7/x11r7.mk" -o \ + $i = "package/pkg-autotools.mk" -o \ + $i = "package/pkg-cmake.mk" -o \ + $i = "package/pkg-download.mk" -o \ + $i = "package/pkg-generic.mk" -o \ + $i = "package/pkg-utils.mk" ; then + echo "skipping $i" 1>&2 + continue + fi + + cnt=$((cnt+1)) + + hashost=0 + hastarget=0 + infratype="" + + # Determine package infrastructure + if grep -E "\(host-autotools-package\)" $i > /dev/null ; then + infratype="autotools" + hashost=1 + fi + + if grep -E "\(autotools-package\)" $i > /dev/null ; then + infratype="autotools" + hastarget=1 + fi + + if grep -E "\(host-generic-package\)" $i > /dev/null ; then + infratype="generic" + hashost=1 + fi + + if grep -E "\(generic-package\)" $i > /dev/null ; then + infratype="generic" + hastarget=1 + fi + + if grep -E "\(host-cmake-package\)" $i > /dev/null ; then + infratype="cmake" + hashost=1 + fi + + if grep -E "\(cmake-package\)" $i > /dev/null ; then + infratype="cmake" + hastarget=1 + fi + + pkg=$(basename $i) + pkg=${pkg%.mk} + pkgvariable=$(echo ${pkg} | tr "a-z-" "A-Z_") + + + # Count packages per infrastructure + if [ -z ${infratype} ] ; then + infratype="manual" + manual_packages=$(($manual_packages+1)) + elif [ ${infratype} = "autotools" ]; then + autotools_packages=$(($autotools_packages+1)) + elif [ ${infratype} = "cmake" ]; then + cmake_packages=$(($cmake_packages+1)) + elif [ ${infratype} = "generic" ]; then + generic_packages=$(($generic_packages+1)) + fi + + if grep -qE "^${pkgvariable}_LICENSE[ ]*=" $i ; then + packages_with_license=$(($packages_with_license+1)) + license=1 + else + packages_without_license=$(($packages_without_license+1)) + license=0 + fi + + if grep -qE "^${pkgvariable}_LICENSE_FILES[ ]*=" $i ; then + packages_with_license_files=$(($packages_with_license_files+1)) + license_files=1 + else + packages_without_license_files=$(($packages_without_license_files+1)) + license_files=0 + fi + + echo "" + + echo "" + echo "" + + package_dir=$(dirname $i) + patch_count=$(find ${package_dir} -name '*.patch' | wc -l) + total_patch_count=$(($total_patch_count+$patch_count)) + + if test $patch_count -lt 1 ; then + patch_count_class="nopatches" + elif test $patch_count -lt 5 ; then + patch_count_class="somepatches" + else + patch_count_class="lotsofpatches" + fi + + echo "" + + if [ ${infratype} = "manual" ] ; then + echo "" + else + echo "" + fi + + if [ ${license} -eq 0 ] ; then + echo "" + else + echo "" + fi + + if [ ${license_files} -eq 0 ] ; then + echo "" + else + echo "" + fi + + echo "" + +done +echo "
      IdPackagePatch countInfrastructureLicenseLicense files
      $cnt$i" + echo "$patch_count" + echo "manual" + echo "${infratype}
      " + if [ ${hashost} -eq 1 -a ${hastarget} -eq 1 ]; then + echo "target + host" + elif [ ${hashost} -eq 1 ]; then + echo "host" + else + echo "target" + fi + echo "
      NoYesNoYes
      " + +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "
      Packages using the generic infrastructure$generic_packages
      Packages using the cmake infrastructure$cmake_packages
      Packages using the autotools infrastructure$autotools_packages
      Packages not using any infrastructure$manual_packages
      Packages having license information$packages_with_license
      Packages not having licence information$packages_without_license
      Packages having license files information$packages_with_license_files
      Packages not having licence files information$packages_without_license_files
      Number of patches in all packages$total_patch_count
      TOTAL$cnt
      " + +echo "
      " +echo "Updated on $(LANG=C date), Git commit $(git log master -n 1 --pretty=format:%H)" +echo "" +echo "" \ No newline at end of file diff --git a/support/scripts/readme.kconfiglib b/support/scripts/readme.kconfiglib new file mode 100644 index 0000000000..5c82b6f71a --- /dev/null +++ b/support/scripts/readme.kconfiglib @@ -0,0 +1,30 @@ +Readme +====== + +Kconfiglib +---------- + +This python module, developped by Ulf Magnusson and released under the ISC +license, is fetched from: + +https://github.com/ulfalizer/Kconfiglib +commit: 02103fba9ae32a78291af53e50ee5d4bb3f69c1e + +Kconfiglib license +~~~~~~~~~~~~~~~~~~ + +License (ISC) + +Copyright (c) 2011-2013, Ulf Magnusson + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/support/scripts/setlocalversion b/support/scripts/setlocalversion new file mode 100755 index 0000000000..adeeb781e7 --- /dev/null +++ b/support/scripts/setlocalversion @@ -0,0 +1,82 @@ +#!/bin/sh +# +# This scripts adds local version information from the version +# control systems git, mercurial (hg) and subversion (svn). +# +# If something goes wrong, send a mail the kernel build mailinglist +# (see MAINTAINERS) and CC Nico Schottelius +# . +# +# + +usage() { + echo "Usage: $0 [srctree]" >&2 + exit 1 +} + +cd "${1:-.}" || usage + +# Check for git and a git repo. +if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then + + # If we are at a tagged commit (like "v2.6.30-rc6"), we ignore it, + # because this version is defined in the top level Makefile. + if [ -z "`git describe --exact-match 2>/dev/null`" ]; then + + # If we are past a tagged commit (like "v2.6.30-rc5-302-g72357d5"), + # we pretty print it. + if atag="`git describe 2>/dev/null`"; then + echo "$atag" | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}' + + # If we don't have a tag at all we print -g{commitish}. + else + printf '%s%s' -g $head + fi + fi + + # Is this git on svn? + if git config --get svn-remote.svn.url >/dev/null; then + printf -- '-svn%s' "`git svn find-rev $head`" + fi + + # Update index only on r/w media + [ -w . ] && git update-index --refresh --unmerged > /dev/null + + # Check for uncommitted changes + if git diff-index --name-only HEAD | grep -v "^scripts/package" \ + | read dummy; then + printf '%s' -dirty + fi + + # All done with git + exit +fi + +# Check for mercurial and a mercurial repo. +if hgid=`hg id 2>/dev/null`; then + tag=`printf '%s' "$hgid" | cut -d' ' -f2` + + # Do we have an untagged version? + if [ -z "$tag" -o "$tag" = tip ]; then + id=`printf '%s' "$hgid" | sed 's/[+ ].*//'` + printf '%s%s' -hg "$id" + fi + + # Are there uncommitted changes? + # These are represented by + after the changeset id. + case "$hgid" in + *+|*+\ *) printf '%s' -dirty ;; + esac + + # All done with mercurial + exit +fi + +# Check for svn and a svn repo. +if rev=`LC_ALL=C svn info 2>/dev/null | grep '^Last Changed Rev'`; then + rev=`echo $rev | awk '{print $NF}'` + printf -- '-svn%s' "$rev" + + # All done with svn + exit +fi diff --git a/support/scripts/xorg-release b/support/scripts/xorg-release new file mode 100755 index 0000000000..70ba41c08b --- /dev/null +++ b/support/scripts/xorg-release @@ -0,0 +1,176 @@ +#!/usr/bin/python + +# This script generates a report on the packaging status of X.org +# releases in Buildroot. It does so by downloading the list of +# tarballs that are part of a given X.org release, and compare that +# with the packages that are available in Buildroot. + +import BeautifulSoup +import re +import os +import urllib + +# This can be customized +XORG_VERSION = "X11R7.7" + +# Key names in dictionaries +XORG_VERSION_KEY = "xorg-version" +BR_VERSION_KEY = "br-version" +BR_NAME_KEY = "br-name" + +# Packages part of X.org releases that we do not want to package in +# Buildroot (old drivers for hardware unlikely to be used in embedded +# contexts). +XORG_EXCEPTIONS = [ + 'xf86-video-suncg6', + 'xf86-video-sunffb', +] + +# Get the list of tarballs of a X.org release, parse it, and return a +# dictionary of dictionaries, of the form: +# +# { : { XORG_VERSION_KEY: }, +# : { XORG_VERSION_KEY: }} +# +def get_xorg_release_pkgs(): + u = urllib.URLopener().open("http://www.x.org/releases/%s/src/everything/" % XORG_VERSION) + b = BeautifulSoup.BeautifulSoup() + b.feed(u.read()) + links = b.findAll("a") + packages = {} + r = re.compile("(.*)-([0-9\.]*).tar.bz2") + # We now have a list of all links. + for link in links: + href = link.get("href") + # Skip everything but tarballs + if not href.endswith(".tar.bz2"): + continue + # Separate the name and the version + groups = r.match(href) + if not groups: + continue + name = groups.group(1) + version = groups.group(2) + # Skip packages we don't want to hear about + if name in XORG_EXCEPTIONS: + continue + packages[name] = { XORG_VERSION_KEY : version } + return packages + +# Files and directories in package/x11r7/ that should be ignored in +# our processing. +BUILDROOT_EXCEPTIONS = [ + "mcookie", # Code is directly in package directory + "x11r7.mk", + "Config.in", + "xdriver_xf86-input-tslib", # From Pengutronix, not part of X.org releases +] + +# Prefixes of directories in package/x11r7/ that must be stripped +# before trying to match Buildroot package names with X.org tarball +# names. +BUILDROOT_PREFIXES = [ + "xapp", + "xdriver", + "xfont", + "xlib", + "xserver", + "xutil", + "xproto", +] + +# From a Buildroot package name, try to see if a prefix should be +# stripped from it. For example, passing "xapp_xlsfonts" as argument +# to this function will return "xlsfonts". +def buildroot_strip_prefix(dirname): + for prefix in BUILDROOT_PREFIXES: + if dirname.startswith(prefix + "_"): + return dirname[len(prefix) + 1:] + return dirname + +# From a Buildroot package name, parse its .mk file to find the +# Buildroot version of the package by looking at the _VERSION +# line. +def buildroot_get_version(dirname): + f = open(os.path.join("package", "x11r7", dirname, dirname + ".mk")) + r = re.compile("^([A-Z0-9_]*)_VERSION = ([0-9\.]*)$") + for l in f.readlines(): + m = r.match(l) + if m: + return m.group(2) + return None + +# Augment the informations of the X.org list of packages (given as +# argument) by details about their packaging in Buildroot. Those +# details are found by looking at the contents of package/x11r7/. +def get_buildroot_pkgs(packages): + dirs = os.listdir(os.path.join(os.getcwd(), "package", "x11r7")) + for d in dirs: + # Skip exceptions + if d in BUILDROOT_EXCEPTIONS: + continue + pkgname = buildroot_strip_prefix(d) + version = buildroot_get_version(d) + if packages.has_key(pkgname): + # There is a X.org package of the same name, so we just + # add informations to the existing dict entry. + packages[pkgname]['br-version'] = version + packages[pkgname]['br-name'] = d + else: + # There is no X.org package with this name, so we add a + # new dict entry. + packages[pkgname] = { BR_VERSION_KEY: version, + BR_NAME_KEY : d } + return packages + +def show_summary(packages): + FORMAT_STRING = "%40s | %15s | %15s | %-30s" + print FORMAT_STRING % ("Package name", "Vers in BR", "Vers in X.org", "Action") + print FORMAT_STRING % ("-" * 40, "-" * 15, "-" * 15, "-" * 30) + pkgs = packages.keys() + pkgs.sort() + total_pkgs = 0 + upgrade_pkgs = 0 + add_pkgs = 0 + remove_pkgs = 0 + nothing_todo_pkgs = 0 + for pkgname in pkgs: + pkg = packages[pkgname] + total_pkgs += 1 + if pkg.has_key(XORG_VERSION_KEY) and not pkg.has_key(BR_VERSION_KEY): + xorg_version = pkg[XORG_VERSION_KEY] + br_version = "N/A" + action = "Add to Buildroot" + add_pkgs += 1 + elif not pkg.has_key(XORG_VERSION_KEY) and pkg.has_key(BR_VERSION_KEY): + br_version = pkg[BR_VERSION_KEY] + xorg_version = "N/A" + action = "Remove from Buildroot" + remove_pkgs += 1 + # For now, we assume that if a package version is different, + # it's because an upgrade is needed. + elif pkg[XORG_VERSION_KEY] != pkg[BR_VERSION_KEY]: + br_version = pkg[BR_VERSION_KEY] + xorg_version = pkg[XORG_VERSION_KEY] + action = "Upgrade" + upgrade_pkgs += 1 + else: + br_version = pkg[BR_VERSION_KEY] + xorg_version = pkg[XORG_VERSION_KEY] + action = "-" + nothing_todo_pkgs += 1 + + print FORMAT_STRING % (pkgname, br_version.center(15), xorg_version.center(15), action) + print FORMAT_STRING % ("-" * 40, "-" * 15, "-" * 15, "-" * 30) + STAT_FORMAT_STRING = "%40s : %3d" + print STAT_FORMAT_STRING % ("Total number of packages", total_pkgs) + print STAT_FORMAT_STRING % ("Packages to upgrade", upgrade_pkgs) + print STAT_FORMAT_STRING % ("Packages to add", add_pkgs) + print STAT_FORMAT_STRING % ("Packages to remove", remove_pkgs) + print STAT_FORMAT_STRING % ("Packages with nothing to do", nothing_todo_pkgs) + +packages = get_xorg_release_pkgs() +packages = get_buildroot_pkgs(packages) +# print packages +show_summary(packages) + diff --git a/system/Config.in b/system/Config.in new file mode 100644 index 0000000000..7d8d86f41d --- /dev/null +++ b/system/Config.in @@ -0,0 +1,346 @@ +menu "System configuration" + +choice + prompt "Board Type" + default BR2_BOARD_TYPE_AMLOGIC_M3 + help + Set the board type + +config BR2_BOARD_TYPE_AMLOGIC_M3 + bool "Amlogic M3" + +config BR2_BOARD_TYPE_AMLOGIC_M1 + bool "Amlogic M1" + +endchoice + +config BR2_TARGET_GENERIC_HOSTNAME + string "System hostname" + default "buildroot" + help + Select system hostname to be stored in /etc/hostname. + +config BR2_TARGET_GENERIC_ISSUE + string "System banner" + default "Welcome to Buildroot" + help + Select system banner (/etc/issue) to be displayed at login. + +choice + bool "Passwords encoding" + default BR2_TARGET_GENERIC_PASSWD_MD5 + help + Choose the password encoding scheme to use when Buildroot + needs to encode a password (eg. the root password, below). + + Note: this is used at build-time, and *not* at runtime. + +config BR2_TARGET_GENERIC_PASSWD_DES + bool "des" + help + Use standard 56-bit DES-based crypt(3) to encode passwords. + + Old, wildly available, but also the weakest, very susceptible to + brute-force attacks. + +config BR2_TARGET_GENERIC_PASSWD_MD5 + bool "md5" + help + Use MD5 to encode passwords. + + The default. Wildly available, and pretty good. + Although pretty strong, MD5 is now an old hash function, and + suffers from some weaknesses, which makes it susceptible to + brute-force attacks. + +config BR2_TARGET_GENERIC_PASSWD_SHA256 + bool "sha-256" + help + Use SHA256 to encode passwords. + + Very strong, but not ubiquitous, although available in glibc + for some time now. Choose only if you are sure your C library + understands SHA256 passwords. + +config BR2_TARGET_GENERIC_PASSWD_SHA512 + bool "sha-512" + help + Use SHA512 to encode passwords. + + Extremely strong, but not ubiquitous, although available in glibc + for some time now. Choose only if you are sure your C library + understands SHA512 passwords. + +endchoice # Passwd encoding + +config BR2_TARGET_GENERIC_PASSWD_METHOD + string + default "des" if BR2_TARGET_GENERIC_PASSWD_DES + default "md5" if BR2_TARGET_GENERIC_PASSWD_MD5 + default "sha-256" if BR2_TARGET_GENERIC_PASSWD_SHA256 + default "sha-512" if BR2_TARGET_GENERIC_PASSWD_SHA512 + +choice + prompt "Init system" + default BR2_INIT_BUSYBOX + +config BR2_INIT_BUSYBOX + bool "Busybox" + select BR2_PACKAGE_BUSYBOX + +config BR2_INIT_SYSV + bool "systemV" + select BR2_PACKAGE_SYSVINIT + +config BR2_INIT_SYSTEMD + bool "systemd" + depends on BR2_LARGEFILE + depends on BR2_USE_WCHAR + depends on BR2_INET_IPV6 + depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU + select BR2_PACKAGE_DBUS + select BR2_PACKAGE_SYSTEMD + +comment 'systemd needs udev /dev management and a toolchain w/ largefile, wchar, IPv6, threads' + depends on BR2_USE_MMU + depends on !(BR2_LARGEFILE && BR2_USE_WCHAR && \ + BR2_INET_IPV6 && BR2_TOOLCHAIN_HAS_THREADS && \ + BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV) + +config BR2_INIT_NONE + bool "None" + +endchoice + +choice + prompt "/dev management" + default BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS + +config BR2_ROOTFS_DEVICE_CREATION_STATIC + bool "Static using device table" + +config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS + bool "Dynamic using devtmpfs only" + +config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV + bool "Dynamic using mdev" + select BR2_PACKAGE_BUSYBOX + +config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV + bool "Dynamic using udev" + depends on BR2_LARGEFILE # udev + depends on BR2_USE_WCHAR # udev + depends on !BR2_PREFER_STATIC_LIB # udev -> kmod + select BR2_PACKAGE_UDEV + +comment "udev needs a toolchain w/ largefile, wchar" + depends on !(BR2_LARGEFILE && BR2_USE_WCHAR) + +comment "udev doesn't work with 'prefer static libraries'" + depends on BR2_PREFER_STATIC_LIB + +endchoice + +config BR2_ROOTFS_DEVICE_TABLE + string "Path to the permission tables" + default "system/device_table.txt" + help + Specify a space-separated list of permission table locations, + that will be passed to the makedevs utility to assign + correct owners and permissions on various files in the + target filesystem. + + See package/makedevs/README for details on the usage and + syntax of these files. + +config BR2_ROOTFS_STATIC_DEVICE_TABLE + string "Path to the device tables" + default "system/device_table_dev.txt" + depends on BR2_ROOTFS_DEVICE_CREATION_STATIC + help + Specify a space-separated list of device table locations, + that will be passed to the makedevs utility to create all + the special device files under /dev. + + See package/makedevs/README for details on the usage and + syntax of these files. + +choice + prompt "Root FS skeleton" + +config BR2_ROOTFS_SKELETON_DEFAULT + bool "default target skeleton" + help + Use default target skeleton + +config BR2_ROOTFS_SKELETON_CUSTOM + bool "custom target skeleton" + help + Use custom target skeleton. + +endchoice + +if BR2_ROOTFS_SKELETON_CUSTOM +config BR2_ROOTFS_SKELETON_CUSTOM_PATH + string "custom target skeleton path" + default "system/skeleton" + help + Path custom target skeleton. +endif + +if BR2_ROOTFS_SKELETON_DEFAULT + +config BR2_TARGET_GENERIC_ROOT_PASSWD + string "Root password" + default "" + help + Set the initial root password (in clear). It will be md5-encrypted. + + If set to empty (the default), then no root password will be set, + and root will need no password to log in. + + WARNING! WARNING! + Although pretty strong, MD5 is now an old hash function, and + suffers from some weaknesses, which makes it susceptible to attacks. + It is showing its age, so this root password should not be trusted + to properly secure any product that can be shipped to the wide, + hostile world. + + WARNING! WARNING! + The password appears in clear in the .config file, and may appear + in the build log! Avoid using a valuable password if either the + .config file or the build log may be distributed! + +config BR2_TARGET_GENERIC_GETTY + bool "Run a getty (login prompt) after boot" + default y + +if BR2_TARGET_GENERIC_GETTY +menu "getty options" +config BR2_TARGET_GENERIC_GETTY_PORT + string "TTY port" + default "ttyS0" + help + Specify a port to run a getty on. + +choice + prompt "Baudrate" + default BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200 + help + Select a baudrate to use. + +config BR2_TARGET_GENERIC_GETTY_BAUDRATE_KEEP + bool "keep kernel default" +config BR2_TARGET_GENERIC_GETTY_BAUDRATE_9600 + bool "9600" +config BR2_TARGET_GENERIC_GETTY_BAUDRATE_19200 + bool "19200" +config BR2_TARGET_GENERIC_GETTY_BAUDRATE_38400 + bool "38400" +config BR2_TARGET_GENERIC_GETTY_BAUDRATE_57600 + bool "57600" +config BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200 + bool "115200" +endchoice + +config BR2_TARGET_GENERIC_GETTY_BAUDRATE + string + default "0" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_KEEP + default "9600" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_9600 + default "19200" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_19200 + default "38400" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_38400 + default "57600" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_57600 + default "115200" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200 + +config BR2_TARGET_GENERIC_GETTY_TERM + string "TERM environment variable" + default "vt100" + help + Specify a TERM type. + +config BR2_TARGET_GENERIC_GETTY_OPTIONS + string "other options to pass to getty" + default "" + help + Any other flags you want to pass to getty, + Refer to getty --help for details. +endmenu +endif + +config BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW + bool "remount root filesystem read-write during boot" + default y + help + The root filesystem is typically mounted read-only at boot. + By default, buildroot remounts it in read-write mode early during the + boot process. + Say no here if you would rather like your root filesystem to remain + read-only. + If unsure, say Y. + +endif # BR2_ROOTFS_SKELETON_DEFAULT + +config BR2_ROOTFS_OVERLAY + string "Root filesystem overlay directories" + default "" + help + Specify a list of directories that are copied over the target + root filesystem after the build has finished and before it is + packed into the selected filesystem images. + + They are copied as-is into the rootfs, excluding files ending with + ~ and .git, .svn and .hg directories. + +config BR2_ROOTFS_POST_BUILD_SCRIPT + string "Custom scripts to run before creating filesystem images" + default "" + help + Specify a space-separated list of scripts to be run after the build + has finished and before Buildroot starts packing the files into + selected filesystem images. + + This gives users the oportunity to do board-specific cleanups, + add-ons and the like, so the generated files can be used directly + without further processing. + + These scripts are called with the target directory name as first + argument. Make sure the exit code of those scripts are 0, otherwise + make will stop after calling them. + +config BR2_ROOTFS_POST_IMAGE_SCRIPT + string "Custom scripts to run after creating filesystem images" + default "" + help + Specify a space-separated list of scripts to be run after + the build has finished and after Buildroot has packed the + files into selected filesystem images. + + This can for example be used to call a tool building a + firmware image from different images generated by Buildroot, + or automatically extract the tarball root filesystem image + into some location exported by NFS, or any other custom + action. + + These scripts are called with the images directory name as + first argument. The script is executed from the main Buildroot + source directory as the current directory. + +config BR2_ROOTFS_POST_SCRIPT_ARGS + string "Extra post-{build,image} arguments" + depends on BR2_ROOTFS_POST_BUILD_SCRIPT != "" || BR2_ROOTFS_POST_IMAGE_SCRIPT != "" + help + Pass these aditional arguments to each post-build or post-image + scripts. + + Note that all the post-build and post-image scripts will be passed + the same set of arguments, you can not pass different arguments to + each script. + + Note also, as stated in their respective help text, that the first + argument to each post-build or post-image script is the target + directory / images directory. The arguments in this option will be + passed *after* those. + +endmenu diff --git a/system/device_table.txt b/system/device_table.txt new file mode 100644 index 0000000000..7ae4b071b9 --- /dev/null +++ b/system/device_table.txt @@ -0,0 +1,24 @@ +# See package/makedevs/README for details +# +# This device table is used to assign proper ownership and permissions +# on various files. It doesn't create any device file, as it is used +# in both static device configurations (where /dev/ is static) and in +# dynamic configurations (where devtmpfs, mdev or udev are used). +# +# +/dev d 755 0 0 - - - - - +/tmp d 1777 0 0 - - - - - +/etc d 755 0 0 - - - - - +/root d 700 0 0 - - - - - +/home/default d 755 1000 1000 - - - - - +/var/www d 755 33 33 - - - - - +/etc/shadow f 600 0 0 - - - - - +/etc/passwd f 644 0 0 - - - - - +/etc/network/if-up.d d 755 0 0 - - - - - +/etc/network/if-pre-up.d d 755 0 0 - - - - - +/etc/network/if-post-up.d d 755 0 0 - - - - - +/etc/network/if-down.d d 755 0 0 - - - - - +/etc/network/if-pre-down.d d 755 0 0 - - - - - +/etc/network/if-post-down.d d 755 0 0 - - - - - +# uncomment this to allow starting x as non-root +#/usr/X11R6/bin/Xfbdev f 4755 0 0 - - - - - diff --git a/system/device_table_dev.txt b/system/device_table_dev.txt new file mode 100644 index 0000000000..95079393e6 --- /dev/null +++ b/system/device_table_dev.txt @@ -0,0 +1,146 @@ +# See package/makedevs/README for details +# +# This device table is used only to create device files when a static +# device configuration is used (entries in /dev are static). +# +# + +# Normal system devices +/dev/mem c 640 0 0 1 1 0 0 - +/dev/kmem c 640 0 0 1 2 0 0 - +/dev/null c 666 0 0 1 3 0 0 - +/dev/zero c 666 0 0 1 5 0 0 - +/dev/random c 666 0 0 1 8 0 0 - +/dev/urandom c 666 0 0 1 9 0 0 - +/dev/ram b 640 0 0 1 1 0 0 - +/dev/ram b 640 0 0 1 0 0 1 4 +/dev/loop b 640 0 0 7 0 0 1 2 +/dev/rtc c 640 0 0 10 135 - - - +/dev/console c 666 0 0 5 1 - - - +/dev/tty c 666 0 0 5 0 - - - +/dev/tty c 666 0 0 4 0 0 1 8 +/dev/ttyp c 666 0 0 3 0 0 1 10 +/dev/ptyp c 666 0 0 2 0 0 1 10 +/dev/ptmx c 666 0 0 5 2 - - - +/dev/ttyP c 666 0 0 57 0 0 1 4 +/dev/ttyS c 666 0 0 4 64 0 1 4 +/dev/fb c 640 0 5 29 0 0 1 4 +#/dev/ttySA c 666 0 0 204 5 0 1 3 +/dev/psaux c 666 0 0 10 1 0 0 - +#/dev/ppp c 666 0 0 108 0 - - - +/dev/ttyAM c 666 0 0 204 16 0 1 3 +/dev/ttyCPM c 666 0 0 204 46 0 1 4 +/dev/ttyAMA c 666 0 0 204 64 0 1 4 +/dev/ttySAC c 666 0 0 204 64 0 1 4 +/dev/ttySC c 666 0 0 204 8 0 1 8 +/dev/ttyPSC c 666 0 0 204 148 0 1 4 +/dev/ttyUL c 666 0 0 204 187 0 1 4 +/dev/ttymxc c 666 0 0 207 16 0 1 4 + +# Input stuff +/dev/input d 755 0 0 - - - - - +/dev/input/mice c 640 0 0 13 63 0 0 - +/dev/input/mouse c 660 0 0 13 32 0 1 4 +/dev/input/event c 660 0 0 13 64 0 1 4 +#/dev/input/js c 660 0 0 13 0 0 1 4 + + +# MTD stuff +/dev/mtd c 640 0 0 90 0 0 2 4 +/dev/mtdblock b 640 0 0 31 0 0 1 4 + +#Tun/tap driver +/dev/net d 755 0 0 - - - - - +/dev/net/tun c 660 0 0 10 200 - - - + +# Audio stuff +#/dev/audio c 666 0 29 14 4 - - - +#/dev/audio1 c 666 0 29 14 20 - - - +#/dev/dsp c 666 0 29 14 3 - - - +#/dev/dsp1 c 666 0 29 14 19 - - - +#/dev/sndstat c 666 0 29 14 6 - - - + +# User-mode Linux stuff +#/dev/ubda b 640 0 0 98 0 0 0 - +#/dev/ubda b 640 0 0 98 1 1 1 15 + +# IDE Devices +/dev/hda b 640 0 0 3 0 0 0 - +/dev/hda b 640 0 0 3 1 1 1 15 +/dev/hdb b 640 0 0 3 64 0 0 - +/dev/hdb b 640 0 0 3 65 1 1 15 +#/dev/hdc b 640 0 0 22 0 0 0 - +#/dev/hdc b 640 0 0 22 1 1 1 15 +#/dev/hdd b 640 0 0 22 64 0 0 - +#/dev/hdd b 640 0 0 22 65 1 1 15 +#/dev/hde b 640 0 0 33 0 0 0 - +#/dev/hde b 640 0 0 33 1 1 1 15 +#/dev/hdf b 640 0 0 33 64 0 0 - +#/dev/hdf b 640 0 0 33 65 1 1 15 +#/dev/hdg b 640 0 0 34 0 0 0 - +#/dev/hdg b 640 0 0 34 1 1 1 15 +#/dev/hdh b 640 0 0 34 64 0 0 - +#/dev/hdh b 640 0 0 34 65 1 1 15 + +# SCSI Devices +/dev/sda b 640 0 0 8 0 0 0 - +/dev/sda b 640 0 0 8 1 1 1 15 +/dev/sdb b 640 0 0 8 16 0 0 - +/dev/sdb b 640 0 0 8 17 1 1 15 +#/dev/sdc b 640 0 0 8 32 0 0 - +#/dev/sdc b 640 0 0 8 33 1 1 15 +#/dev/sdd b 640 0 0 8 48 0 0 - +#/dev/sdd b 640 0 0 8 49 1 1 15 +#/dev/sde b 640 0 0 8 64 0 0 - +#/dev/sde b 640 0 0 8 65 1 1 15 +#/dev/sdf b 640 0 0 8 80 0 0 - +#/dev/sdf b 640 0 0 8 81 1 1 15 +#/dev/sdg b 640 0 0 8 96 0 0 - +#/dev/sdg b 640 0 0 8 97 1 1 15 +#/dev/sdh b 640 0 0 8 112 0 0 - +#/dev/sdh b 640 0 0 8 113 1 1 15 +#/dev/sg c 640 0 0 21 0 0 1 15 +#/dev/scd b 640 0 0 11 0 0 1 15 +#/dev/st c 640 0 0 9 0 0 1 8 +#/dev/nst c 640 0 0 9 128 0 1 8 +#/dev/st c 640 0 0 9 32 1 1 4 +#/dev/st c 640 0 0 9 64 1 1 4 +#/dev/st c 640 0 0 9 96 1 1 4 + +# USB block devices (ub driver) +/dev/uba b 640 0 0 180 0 0 0 - +/dev/uba b 640 0 0 180 1 1 1 6 +/dev/ubb b 640 0 0 180 8 0 0 - +/dev/ubb b 640 0 0 180 65 1 1 6 + +# Floppy disk devices +#/dev/fd b 640 0 0 2 0 0 1 2 +#/dev/fd0d360 b 640 0 0 2 4 0 0 - +#/dev/fd1d360 b 640 0 0 2 5 0 0 - +#/dev/fd0h1200 b 640 0 0 2 8 0 0 - +#/dev/fd1h1200 b 640 0 0 2 9 0 0 - +#/dev/fd0u1440 b 640 0 0 2 28 0 0 - +#/dev/fd1u1440 b 640 0 0 2 29 0 0 - +#/dev/fd0u2880 b 640 0 0 2 32 0 0 - +#/dev/fd1u2880 b 640 0 0 2 33 0 0 - + +# All the proprietary cdrom devices in the world +#/dev/aztcd b 640 0 0 29 0 0 0 - +#/dev/bpcd b 640 0 0 41 0 0 0 - +#/dev/capi20 c 640 0 0 68 0 0 1 2 +#/dev/cdu31a b 640 0 0 15 0 0 0 - +#/dev/cdu535 b 640 0 0 24 0 0 0 - +#/dev/cm206cd b 640 0 0 32 0 0 0 - +#/dev/sjcd b 640 0 0 18 0 0 0 - +#/dev/sonycd b 640 0 0 15 0 0 0 - +#/dev/gscd b 640 0 0 16 0 0 0 - +#/dev/sbpcd b 640 0 0 25 0 0 0 - +#/dev/sbpcd b 640 0 0 25 0 0 1 4 +#/dev/mcd b 640 0 0 23 0 0 0 - +#/dev/optcd b 640 0 0 17 0 0 0 - + +# I2C device nodes +/dev/i2c- c 666 0 0 89 0 0 1 4 + +# v4l device nodes +/dev/video c 666 0 0 81 0 0 1 4 diff --git a/fs/skeleton/bin/.empty b/system/skeleton/bin/.empty similarity index 100% rename from fs/skeleton/bin/.empty rename to system/skeleton/bin/.empty diff --git a/fs/skeleton/dev/log b/system/skeleton/dev/log similarity index 100% rename from fs/skeleton/dev/log rename to system/skeleton/dev/log diff --git a/fs/skeleton/dev/pts/.empty b/system/skeleton/dev/pts/.empty similarity index 100% rename from fs/skeleton/dev/pts/.empty rename to system/skeleton/dev/pts/.empty diff --git a/fs/skeleton/etc/fstab b/system/skeleton/etc/fstab similarity index 85% rename from fs/skeleton/etc/fstab rename to system/skeleton/etc/fstab index 87d9da08ee..a2f56ffa65 100644 --- a/fs/skeleton/etc/fstab +++ b/system/skeleton/etc/fstab @@ -4,5 +4,6 @@ /dev/root / ext2 rw,noauto 0 1 proc /proc proc defaults 0 0 devpts /dev/pts devpts defaults,gid=5,mode=620 0 0 +tmpfs /dev/shm tmpfs mode=0777 0 0 tmpfs /tmp tmpfs defaults 0 0 sysfs /sys sysfs defaults 0 0 diff --git a/system/skeleton/etc/group b/system/skeleton/etc/group new file mode 100644 index 0000000000..864d1dbd03 --- /dev/null +++ b/system/skeleton/etc/group @@ -0,0 +1,29 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +kmem:x:9: +wheel:x:10:root +cdrom:x:11: +dialout:x:18: +floppy:x:19: +video:x:28: +audio:x:29: +tape:x:32: +www-data:x:33: +utmp:x:43: +plugdev:x:46: +staff:x:50: +lock:x:54: +haldaemon:x:68: +dbus:x:81: +netdev:x:82: +ftp:x:83 +nobody:x:99: +nogroup:x:99: +users:x:100: +default:x:1000: diff --git a/fs/skeleton/etc/hosts b/system/skeleton/etc/hosts similarity index 100% rename from fs/skeleton/etc/hosts rename to system/skeleton/etc/hosts diff --git a/fs/skeleton/etc/init.d/S20urandom b/system/skeleton/etc/init.d/S20urandom similarity index 100% rename from fs/skeleton/etc/init.d/S20urandom rename to system/skeleton/etc/init.d/S20urandom diff --git a/fs/skeleton/etc/init.d/S40network b/system/skeleton/etc/init.d/S40network similarity index 85% rename from fs/skeleton/etc/init.d/S40network rename to system/skeleton/etc/init.d/S40network index ad6d250b5b..e69e61340a 100755 --- a/fs/skeleton/etc/init.d/S40network +++ b/system/skeleton/etc/init.d/S40network @@ -17,7 +17,7 @@ case "$1" in "$0" start ;; *) - echo $"Usage: $0 {start|stop|restart}" + echo "Usage: $0 {start|stop|restart}" exit 1 esac diff --git a/system/skeleton/etc/init.d/rcK b/system/skeleton/etc/init.d/rcK new file mode 100755 index 0000000000..59e9c54ff9 --- /dev/null +++ b/system/skeleton/etc/init.d/rcK @@ -0,0 +1,27 @@ +#!/bin/sh + + +# Stop all init scripts in /etc/init.d +# executing them in reversed numerical order. +# +for i in $(ls -r /etc/init.d/S??*) ;do + + # Ignore dangling symlinks (if any). + [ ! -f "$i" ] && continue + + case "$i" in + *.sh) + # Source shell script for speed. + ( + trap - INT QUIT TSTP + set stop + . $i + ) + ;; + *) + # No sh extension, so fork subprocess. + $i stop + ;; + esac +done + diff --git a/fs/skeleton/etc/init.d/rcS b/system/skeleton/etc/init.d/rcS similarity index 100% rename from fs/skeleton/etc/init.d/rcS rename to system/skeleton/etc/init.d/rcS diff --git a/system/skeleton/etc/inittab b/system/skeleton/etc/inittab new file mode 100644 index 0000000000..85881f4607 --- /dev/null +++ b/system/skeleton/etc/inittab @@ -0,0 +1,36 @@ +# /etc/inittab +# +# Copyright (C) 2001 Erik Andersen +# +# Note: BusyBox init doesn't support runlevels. The runlevels field is +# completely ignored by BusyBox init. If you want runlevels, use +# sysvinit. +# +# Format for each entry: ::: +# +# id == tty to run on, or empty for /dev/console +# runlevels == ignored +# action == one of sysinit, respawn, askfirst, wait, and once +# process == program to run + +# Startup the system +null::sysinit:/bin/mount -t proc proc /proc +null::sysinit:/bin/mount -o remount,rw / # REMOUNT_ROOTFS_RW +null::sysinit:/bin/mkdir -p /dev/pts +null::sysinit:/bin/mkdir -p /dev/shm +null::sysinit:/bin/mount -a +null::sysinit:/bin/hostname -F /etc/hostname +# now run any rc scripts +::sysinit:/etc/init.d/rcS + +# Put a getty on the serial port +#ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 # GENERIC_SERIAL + +# Stuff to do for the 3-finger salute +::ctrlaltdel:/sbin/reboot + +# Stuff to do before rebooting +null::shutdown:/etc/init.d/rcK +null::shutdown:/bin/umount -a -r +null::shutdown:/sbin/swapoff -a + diff --git a/fs/skeleton/etc/inputrc b/system/skeleton/etc/inputrc similarity index 100% rename from fs/skeleton/etc/inputrc rename to system/skeleton/etc/inputrc diff --git a/fs/skeleton/etc/issue b/system/skeleton/etc/issue similarity index 100% rename from fs/skeleton/etc/issue rename to system/skeleton/etc/issue diff --git a/fs/skeleton/etc/ld.so.conf.d/.empty b/system/skeleton/etc/ld.so.conf.d/.empty similarity index 100% rename from fs/skeleton/etc/ld.so.conf.d/.empty rename to system/skeleton/etc/ld.so.conf.d/.empty diff --git a/system/skeleton/etc/mtab b/system/skeleton/etc/mtab new file mode 120000 index 0000000000..4c0a0948bc --- /dev/null +++ b/system/skeleton/etc/mtab @@ -0,0 +1 @@ +/proc/mounts \ No newline at end of file diff --git a/fs/skeleton/etc/network/if-down.d/.empty b/system/skeleton/etc/network/if-down.d/.empty similarity index 100% rename from fs/skeleton/etc/network/if-down.d/.empty rename to system/skeleton/etc/network/if-down.d/.empty diff --git a/fs/skeleton/etc/network/if-post-down.d/.empty b/system/skeleton/etc/network/if-post-down.d/.empty similarity index 100% rename from fs/skeleton/etc/network/if-post-down.d/.empty rename to system/skeleton/etc/network/if-post-down.d/.empty diff --git a/fs/skeleton/etc/network/if-pre-up.d/.empty b/system/skeleton/etc/network/if-pre-up.d/.empty similarity index 100% rename from fs/skeleton/etc/network/if-pre-up.d/.empty rename to system/skeleton/etc/network/if-pre-up.d/.empty diff --git a/fs/skeleton/etc/network/if-up.d/.empty b/system/skeleton/etc/network/if-up.d/.empty similarity index 100% rename from fs/skeleton/etc/network/if-up.d/.empty rename to system/skeleton/etc/network/if-up.d/.empty diff --git a/fs/skeleton/etc/network/interfaces b/system/skeleton/etc/network/interfaces similarity index 100% rename from fs/skeleton/etc/network/interfaces rename to system/skeleton/etc/network/interfaces diff --git a/system/skeleton/etc/nsswitch.conf b/system/skeleton/etc/nsswitch.conf new file mode 100644 index 0000000000..d81e2f053e --- /dev/null +++ b/system/skeleton/etc/nsswitch.conf @@ -0,0 +1,17 @@ +# /etc/nsswitch.conf +# +# Example configuration of GNU Name Service Switch functionality. +# If you have the `glibc-doc-reference' and `info' packages installed, try: +# `info libc "Name Service Switch"' for information about this file. + +passwd: files +group: files +shadow: files +hosts: files dns +networks: files + +protocols: files +services: files +ethers: files +rpc: files + diff --git a/fs/skeleton/etc/passwd b/system/skeleton/etc/passwd similarity index 94% rename from fs/skeleton/etc/passwd rename to system/skeleton/etc/passwd index 377d4df5b4..ed7006a29c 100644 --- a/fs/skeleton/etc/passwd +++ b/system/skeleton/etc/passwd @@ -10,6 +10,7 @@ backup:x:34:34:backup:/var/backups:/bin/sh operator:x:37:37:Operator:/var:/bin/sh haldaemon:x:68:68:hald:/:/bin/sh dbus:x:81:81:dbus:/var/run/dbus:/bin/sh +ftp:x:83:83:ftp:/home/ftp:/bin/sh nobody:x:99:99:nobody:/home:/bin/sh sshd:x:103:99:Operator:/var:/bin/sh default:x:1000:1000:Default non-root user:/home/default:/bin/sh diff --git a/fs/skeleton/etc/profile b/system/skeleton/etc/profile similarity index 92% rename from fs/skeleton/etc/profile rename to system/skeleton/etc/profile index cc2e0beb87..31d3180c0d 100644 --- a/fs/skeleton/etc/profile +++ b/system/skeleton/etc/profile @@ -46,3 +46,10 @@ if [ "$PS1" ]; then alias calc='calc -Cd ' alias bc='calc -Cd ' fi; + +# Source configuration files from /etc/profile.d +for i in /etc/profile.d/*.sh ; do + if [ -r "$i" ]; then + . $i + fi +done diff --git a/system/skeleton/etc/protocols b/system/skeleton/etc/protocols new file mode 100644 index 0000000000..cfdd5adb65 --- /dev/null +++ b/system/skeleton/etc/protocols @@ -0,0 +1,61 @@ +# Internet (IP) protocols +# +# Updated from http://www.iana.org/assignments/protocol-numbers and other +# sources. + +ip 0 IP # internet protocol, pseudo protocol number +hopopt 0 HOPOPT # IPv6 Hop-by-Hop Option [RFC1883] +icmp 1 ICMP # internet control message protocol +igmp 2 IGMP # Internet Group Management +ggp 3 GGP # gateway-gateway protocol +ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'') +st 5 ST # ST datagram mode +tcp 6 TCP # transmission control protocol +egp 8 EGP # exterior gateway protocol +igp 9 IGP # any private interior gateway (Cisco) +pup 12 PUP # PARC universal packet protocol +udp 17 UDP # user datagram protocol +hmp 20 HMP # host monitoring protocol +xns-idp 22 XNS-IDP # Xerox NS IDP +rdp 27 RDP # "reliable datagram" protocol +iso-tp4 29 ISO-TP4 # ISO Transport Protocol class 4 [RFC905] +dccp 33 DCCP # Datagram Congestion Control Prot. [RFC4340] +xtp 36 XTP # Xpress Transfer Protocol +ddp 37 DDP # Datagram Delivery Protocol +idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport +ipv6 41 IPv6 # Internet Protocol, version 6 +ipv6-route 43 IPv6-Route # Routing Header for IPv6 +ipv6-frag 44 IPv6-Frag # Fragment Header for IPv6 +idrp 45 IDRP # Inter-Domain Routing Protocol +rsvp 46 RSVP # Reservation Protocol +gre 47 GRE # General Routing Encapsulation +esp 50 IPSEC-ESP # Encap Security Payload [RFC2406] +ah 51 IPSEC-AH # Authentication Header [RFC2402] +skip 57 SKIP # SKIP +ipv6-icmp 58 IPv6-ICMP # ICMP for IPv6 +ipv6-nonxt 59 IPv6-NoNxt # No Next Header for IPv6 +ipv6-opts 60 IPv6-Opts # Destination Options for IPv6 +rspf 73 RSPF CPHB # Radio Shortest Path First (officially CPHB) +vmtp 81 VMTP # Versatile Message Transport +eigrp 88 EIGRP # Enhanced Interior Routing Protocol (Cisco) +ospf 89 OSPFIGP # Open Shortest Path First IGP +ax.25 93 AX.25 # AX.25 frames +ipip 94 IPIP # IP-within-IP Encapsulation Protocol +etherip 97 ETHERIP # Ethernet-within-IP Encapsulation [RFC3378] +encap 98 ENCAP # Yet Another IP encapsulation [RFC1241] +# 99 # any private encryption scheme +pim 103 PIM # Protocol Independent Multicast +ipcomp 108 IPCOMP # IP Payload Compression Protocol +vrrp 112 VRRP # Virtual Router Redundancy Protocol [RFC5798] +l2tp 115 L2TP # Layer Two Tunneling Protocol [RFC2661] +isis 124 ISIS # IS-IS over IPv4 +sctp 132 SCTP # Stream Control Transmission Protocol +fc 133 FC # Fibre Channel +mobility-header 135 Mobility-Header # Mobility Support for IPv6 [RFC3775] +udplite 136 UDPLite # UDP-Lite [RFC3828] +mpls-in-ip 137 MPLS-in-IP # MPLS-in-IP [RFC4023] +manet 138 # MANET Protocols [RFC5498] +hip 139 HIP # Host Identity Protocol +shim6 140 Shim6 # Shim6 Protocol [RFC5533] +wesp 141 WESP # Wrapped Encapsulating Security Payload +rohc 142 ROHC # Robust Header Compression diff --git a/fs/skeleton/etc/random-seed b/system/skeleton/etc/random-seed similarity index 100% rename from fs/skeleton/etc/random-seed rename to system/skeleton/etc/random-seed diff --git a/fs/skeleton/etc/securetty b/system/skeleton/etc/securetty similarity index 78% rename from fs/skeleton/etc/securetty rename to system/skeleton/etc/securetty index fd0ec8ee9f..5a3d0c648e 100644 --- a/fs/skeleton/etc/securetty +++ b/system/skeleton/etc/securetty @@ -22,6 +22,8 @@ ttyUL0 ttyUL1 ttyUL2 ttyUL3 +ttyPS0 +ttyPS1 ttyPSC0 ttyPSC1 ttyPSC2 @@ -40,3 +42,12 @@ ttyO3 ttyAM0 ttyAM1 ttyAM2 +ttySC0 +ttySC1 +ttySC2 +ttySC3 +ttySC4 +ttySC5 +ttySC6 +ttySC7 +ttyGS0 diff --git a/fs/skeleton/etc/services b/system/skeleton/etc/services similarity index 100% rename from fs/skeleton/etc/services rename to system/skeleton/etc/services diff --git a/fs/skeleton/etc/shadow b/system/skeleton/etc/shadow similarity index 92% rename from fs/skeleton/etc/shadow rename to system/skeleton/etc/shadow index 4941a1ac53..67b67c1960 100644 --- a/fs/skeleton/etc/shadow +++ b/system/skeleton/etc/shadow @@ -8,5 +8,6 @@ shutdown:*:10933:0:99999:7::: halt:*:10933:0:99999:7::: uucp:*:10933:0:99999:7::: operator:*:10933:0:99999:7::: +ftp:*:10933:0:99999:7::: nobody:*:10933:0:99999:7::: default::10933:0:99999:7::: diff --git a/fs/skeleton/home/.empty b/system/skeleton/home/ftp/.empty similarity index 100% rename from fs/skeleton/home/.empty rename to system/skeleton/home/ftp/.empty diff --git a/fs/skeleton/lib/.empty b/system/skeleton/lib/.empty similarity index 100% rename from fs/skeleton/lib/.empty rename to system/skeleton/lib/.empty diff --git a/fs/skeleton/mnt/.empty b/system/skeleton/media/.empty similarity index 100% rename from fs/skeleton/mnt/.empty rename to system/skeleton/media/.empty diff --git a/fs/skeleton/opt/.empty b/system/skeleton/mnt/.empty similarity index 100% rename from fs/skeleton/opt/.empty rename to system/skeleton/mnt/.empty diff --git a/fs/skeleton/proc/.empty b/system/skeleton/opt/.empty similarity index 100% rename from fs/skeleton/proc/.empty rename to system/skeleton/opt/.empty diff --git a/fs/skeleton/root/.empty b/system/skeleton/proc/.empty similarity index 100% rename from fs/skeleton/root/.empty rename to system/skeleton/proc/.empty diff --git a/fs/skeleton/root/.bash_history b/system/skeleton/root/.bash_history similarity index 100% rename from fs/skeleton/root/.bash_history rename to system/skeleton/root/.bash_history diff --git a/fs/skeleton/root/.bash_logout b/system/skeleton/root/.bash_logout similarity index 100% rename from fs/skeleton/root/.bash_logout rename to system/skeleton/root/.bash_logout diff --git a/fs/skeleton/root/.bash_profile b/system/skeleton/root/.bash_profile similarity index 100% rename from fs/skeleton/root/.bash_profile rename to system/skeleton/root/.bash_profile diff --git a/fs/skeleton/sbin/.empty b/system/skeleton/root/.empty similarity index 100% rename from fs/skeleton/sbin/.empty rename to system/skeleton/root/.empty diff --git a/system/skeleton/run b/system/skeleton/run new file mode 120000 index 0000000000..1c2f433de1 --- /dev/null +++ b/system/skeleton/run @@ -0,0 +1 @@ +tmp \ No newline at end of file diff --git a/fs/skeleton/sys/.empty b/system/skeleton/sbin/.empty similarity index 100% rename from fs/skeleton/sys/.empty rename to system/skeleton/sbin/.empty diff --git a/fs/skeleton/tmp/.empty b/system/skeleton/sys/.empty similarity index 100% rename from fs/skeleton/tmp/.empty rename to system/skeleton/sys/.empty diff --git a/fs/skeleton/usr/bin/.empty b/system/skeleton/tmp/.empty similarity index 100% rename from fs/skeleton/usr/bin/.empty rename to system/skeleton/tmp/.empty diff --git a/fs/skeleton/usr/lib/.empty b/system/skeleton/usr/bin/.empty similarity index 100% rename from fs/skeleton/usr/lib/.empty rename to system/skeleton/usr/bin/.empty diff --git a/fs/skeleton/usr/sbin/.empty b/system/skeleton/usr/lib/.empty similarity index 100% rename from fs/skeleton/usr/sbin/.empty rename to system/skeleton/usr/lib/.empty diff --git a/package/customize/source/.empty b/system/skeleton/usr/sbin/.empty similarity index 100% rename from package/customize/source/.empty rename to system/skeleton/usr/sbin/.empty diff --git a/fs/skeleton/var/cache b/system/skeleton/var/cache similarity index 100% rename from fs/skeleton/var/cache rename to system/skeleton/var/cache diff --git a/fs/skeleton/var/lib/pcmcia b/system/skeleton/var/lib/misc similarity index 100% rename from fs/skeleton/var/lib/pcmcia rename to system/skeleton/var/lib/misc diff --git a/system/skeleton/var/lib/pcmcia b/system/skeleton/var/lib/pcmcia new file mode 120000 index 0000000000..f1fde8c107 --- /dev/null +++ b/system/skeleton/var/lib/pcmcia @@ -0,0 +1 @@ +../../tmp \ No newline at end of file diff --git a/fs/skeleton/var/lock b/system/skeleton/var/lock similarity index 100% rename from fs/skeleton/var/lock rename to system/skeleton/var/lock diff --git a/fs/skeleton/var/log b/system/skeleton/var/log similarity index 100% rename from fs/skeleton/var/log rename to system/skeleton/var/log diff --git a/fs/skeleton/var/pcmcia b/system/skeleton/var/pcmcia similarity index 100% rename from fs/skeleton/var/pcmcia rename to system/skeleton/var/pcmcia diff --git a/fs/skeleton/var/run b/system/skeleton/var/run similarity index 100% rename from fs/skeleton/var/run rename to system/skeleton/var/run diff --git a/fs/skeleton/var/spool b/system/skeleton/var/spool similarity index 100% rename from fs/skeleton/var/spool rename to system/skeleton/var/spool diff --git a/fs/skeleton/var/tmp b/system/skeleton/var/tmp similarity index 100% rename from fs/skeleton/var/tmp rename to system/skeleton/var/tmp diff --git a/system/system.mk b/system/system.mk new file mode 100644 index 0000000000..01a6c3a627 --- /dev/null +++ b/system/system.mk @@ -0,0 +1,74 @@ +TARGET_GENERIC_HOSTNAME = $(call qstrip,$(BR2_TARGET_GENERIC_HOSTNAME)) +TARGET_GENERIC_ISSUE = $(call qstrip,$(BR2_TARGET_GENERIC_ISSUE)) +TARGET_GENERIC_ROOT_PASSWD = $(call qstrip,$(BR2_TARGET_GENERIC_ROOT_PASSWD)) +TARGET_GENERIC_PASSWD_METHOD = $(call qstrip,$(BR2_TARGET_GENERIC_PASSWD_METHOD)) +TARGET_GENERIC_GETTY_PORT = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)) +TARGET_GENERIC_GETTY_BAUDRATE = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE)) +TARGET_GENERIC_GETTY_TERM = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_TERM)) +TARGET_GENERIC_GETTY_OPTIONS = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_OPTIONS)) + +target-generic-securetty: + grep -q '^$(TARGET_GENERIC_GETTY_PORT)$$' $(TARGET_DIR)/etc/securetty || \ + echo '$(TARGET_GENERIC_GETTY_PORT)' >> $(TARGET_DIR)/etc/securetty + +target-generic-hostname: + mkdir -p $(TARGET_DIR)/etc + echo "$(TARGET_GENERIC_HOSTNAME)" > $(TARGET_DIR)/etc/hostname + $(SED) '$$a \127.0.1.1\t$(TARGET_GENERIC_HOSTNAME)' \ + -e '/^127.0.1.1/d' $(TARGET_DIR)/etc/hosts + +target-generic-issue: + mkdir -p $(TARGET_DIR)/etc + echo "$(TARGET_GENERIC_ISSUE)" > $(TARGET_DIR)/etc/issue + +ifneq ($(TARGET_GENERIC_ROOT_PASSWD),) +target-root-passwd: host-mkpasswd +endif +target-root-passwd: + [ -n "$(TARGET_GENERIC_ROOT_PASSWD)" ] && \ + TARGET_GENERIC_ROOT_PASSWD_HASH=$$($(MKPASSWD) -m "$(TARGET_GENERIC_PASSWD_METHOD)" "$(TARGET_GENERIC_ROOT_PASSWD)"); \ + $(SED) "s,^root:[^:]*:,root:$$TARGET_GENERIC_ROOT_PASSWD_HASH:," $(TARGET_DIR)/etc/shadow + +target-generic-getty-busybox: + $(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(TARGET_GENERIC_GETTY_PORT)::respawn:/sbin/getty -L $(TARGET_GENERIC_GETTY_OPTIONS) $(TARGET_GENERIC_GETTY_PORT) $(TARGET_GENERIC_GETTY_BAUDRATE) $(TARGET_GENERIC_GETTY_TERM) #~' \ + $(TARGET_DIR)/etc/inittab + +# In sysvinit inittab, the "id" must not be longer than 4 bytes, so we +# skip the "tty" part and keep only the remaining. +target-generic-getty-sysvinit: + $(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(shell echo $(TARGET_GENERIC_GETTY_PORT) | tail -c+4)::respawn:/sbin/getty -L $(TARGET_GENERIC_GETTY_OPTIONS) $(TARGET_GENERIC_GETTY_PORT) $(TARGET_GENERIC_GETTY_BAUDRATE) $(TARGET_GENERIC_GETTY_TERM) #~' \ + $(TARGET_DIR)/etc/inittab + +# Find commented line, if any, and remove leading '#'s +target-generic-do-remount-rw: + $(SED) '/^#.*# REMOUNT_ROOTFS_RW$$/s~^#\+~~' $(TARGET_DIR)/etc/inittab + +# Find uncommented line, if any, and add a leading '#' +target-generic-dont-remount-rw: + $(SED) '/^[^#].*# REMOUNT_ROOTFS_RW$$/s~^~#~' $(TARGET_DIR)/etc/inittab + +ifeq ($(BR2_TARGET_GENERIC_GETTY),y) +TARGETS += target-generic-securetty +endif + +ifneq ($(TARGET_GENERIC_HOSTNAME),) +TARGETS += target-generic-hostname +endif + +ifneq ($(TARGET_GENERIC_ISSUE),) +TARGETS += target-generic-issue +endif + +ifeq ($(BR2_ROOTFS_SKELETON_DEFAULT),y) +TARGETS += target-root-passwd + +ifeq ($(BR2_TARGET_GENERIC_GETTY),y) +TARGETS += target-generic-getty-$(if $(BR2_PACKAGE_SYSVINIT),sysvinit,busybox) +endif + +ifeq ($(BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW),y) +TARGETS += target-generic-do-remount-rw +else +TARGETS += target-generic-dont-remount-rw +endif +endif diff --git a/target/Config.in.arch b/target/Config.in.arch deleted file mode 100644 index 7c80945f5c..0000000000 --- a/target/Config.in.arch +++ /dev/null @@ -1,701 +0,0 @@ -config BR2_ARCH_IS_64 - bool - -choice - prompt "Target Architecture" - default BR2_i386 - help - Select the target architecture family to build for. - -config BR2_arm - bool "arm" -config BR2_armeb - bool "armeb" -config BR2_avr32 - bool "avr32" - select BR2_SOFT_FLOAT -config BR2_bfin - bool "bfin" -config BR2_i386 - bool "i386" -config BR2_m68k - bool "m68k" - depends on BROKEN # ice in uclibc / inet_ntoa_r -config BR2_mips - bool "mips" -config BR2_mipsel - bool "mipsel" -config BR2_powerpc - bool "powerpc" -config BR2_sh - bool "superh" -config BR2_sh64 - bool "superh64" -config BR2_sparc - bool "sparc" -config BR2_x86_64 - bool "x86_64" - select BR2_ARCH_IS_64 -config BR2_xtensa - bool "xtensa" -endchoice - -# -# Keep the variants separate, there's no need to clutter everything else. -# sh is fairly "special" in this regard, as virtually everyone else has -# things kept down to a _sensible_ number of target variants. No such -# luck for sh.. -# -choice - prompt "Target Architecture Variant" - depends on BR2_arm || BR2_armeb - default BR2_generic_arm - help - Specific CPU variant to use - -config BR2_generic_arm - bool "generic_arm" -config BR2_arm7tdmi - bool "arm7tdmi" -config BR2_arm610 - bool "arm610" -config BR2_arm710 - bool "arm710" -config BR2_arm720t - bool "arm720t" -config BR2_arm920t - bool "arm920t" -config BR2_arm922t - bool "arm922t" -config BR2_arm926t - bool "arm926t" -config BR2_arm10t - bool "arm10t" -config BR2_arm1136jf_s - bool "arm1136jf_s" -config BR2_arm1176jz_s - bool "arm1176jz-s" -config BR2_arm1176jzf_s - bool "arm1176jzf-s" -comment "cortex-A8/A9 needs gcc >= 4.4.x" -config BR2_cortex_a8 - bool "cortex-A8" -config BR2_cortex_a9 - bool "cortex-A9" -config BR2_sa110 - bool "sa110" -config BR2_sa1100 - bool "sa1100" -config BR2_xscale - bool "xscale" -config BR2_iwmmxt - bool "iwmmxt" -endchoice - -config BR2_ARM_TYPE - string - default GENERIC_ARM if BR2_generic_arm - default ARM610 if BR2_arm610 - default ARM710 if BR2_arm710 - default ARM7TDMI if BR2_arm7tdmi - default ARM720T if BR2_arm720t - default ARM920T if BR2_arm920t - default ARM922T if BR2_arm922t - default ARM926T if BR2_arm926t - default ARM10T if BR2_arm10t - default ARM1136JF_S if BR2_arm1136jf_s - default ARM1176JZ_S if BR2_arm1176jz_s - default ARM1176JZF_S if BR2_arm1176jzf_s - default ARM_SA110 if BR2_sa110 - default ARM_SA1100 if BR2_sa1100 - default ARM_XSCALE if BR2_xscale - default ARM_IWMMXT if BR2_iwmmxt - default ARM_CORTEXA8 if BR2_cortex_a8 - default ARM_CORTEXA9 if BR2_cortex_a9 - -choice - prompt "Target ABI" - depends on BR2_arm || BR2_armeb - default BR2_ARM_EABI - help - Application Binary Interface to use - - Note: - Using OABI is discouraged. - -config BR2_ARM_EABI - bool "EABI" -config BR2_ARM_OABI - bool "OABI" -endchoice - -choice - prompt "Target ABI" - depends on BR2_bfin - default BR2_BFIN_FLAT -config BR2_BFIN_FDPIC - bool "FDPIC" -config BR2_BFIN_FLAT - bool "FLAT" -config BR2_BFIN_FLAT_SEP_DATA - bool "FLAT (Separate data)" -config BR2_BFIN_SHARED_FLAT - bool "Shared FLAT" -endchoice - -choice - prompt "Target Architecture Variant" - depends on BR2_mips || BR2_mipsel - default BR2_mips_3 if BR2_mips - default BR2_mips_1 if BR2_mipsel - help - Specific CPU variant to use - - 64bit cabable: 3, 4, 64, 64r2 - non-64bit capable: 1, 2, 32, 32r2 - -config BR2_mips_1 - bool "mips I (generic)" -config BR2_mips_2 - bool "mips II" -config BR2_mips_3 - bool "mips III" -config BR2_mips_4 - bool "mips IV" -config BR2_mips_32 - bool "mips 32" -config BR2_mips_32r2 - bool "mips 32r2" -config BR2_mips_64 - bool "mips 64" -config BR2_mips_64r2 - bool "mips 64r2" -config BR2_mips_16 - bool "mips 16" -endchoice - - -choice - prompt "Target ABI" - depends on BR2_mips || BR2_mipsel - default BR2_MIPS_OABI32 if BR_mips_32 || BR_mips_32r2 - default BR2_MIPS_ABI32 if BR_mips_64 || BR_mips_64r2 - help - Application Binary Interface to use - -config BR2_MIPS_OABI32 - bool "o32" -config BR2_MIPS_ABI32 - bool "n32" - depends on BR2_mips_3 || BR2_mips_4 || BR2_mips_64 || BR2_mips_64r2 || BR2_mips_16 -config BR2_MIPS_EABI - bool "eabi" - depends on BR2_mips_3 || BR2_mips_4 || BR2_mips_64 || BR2_mips_64r2 || BR2_mips_16 -config BR2_MIPS_ABI64 - bool "n64" - depends on BR2_mips_3 || BR2_mips_4 || BR2_mips_64 || BR2_mips_64r2 || BR2_mips_16 -config BR2_MIPS_OABI64 - bool "o64" - depends on BR2_mips_3 || BR2_mips_4 || BR2_mips_64 || BR2_mips_64r2 || BR2_mips_16 -config BR2_MIPS_ABI_none - bool "unspecified" - depends on BR2_mips_16 - help - Unspecified ABI leaves ABI selection blank. -endchoice - -choice - prompt "Target Architecture Variant" - depends on BR2_sh - default BR2_sh4 - help - Specific CPU variant to use - -config BR2_sh2a_nofpueb - bool "sh2a_nofpueb" -config BR2_sh2eb - bool "sh2eb" -config BR2_sh3 - bool "sh3" -config BR2_sh3eb - bool "sh3eb" -config BR2_sh4 - bool "sh4" -config BR2_sh4eb - bool "sh4eb" -endchoice - -# -# gcc builds libstdc++ differently depending on the -# host tuplet given to it, so let people choose -# -choice - prompt "Target Architecture Variant" - depends on BR2_i386 - default BR2_x86_i386 - help - Specific CPU variant to use - -config BR2_x86_i386 - bool "i386" -config BR2_x86_i486 - bool "i486" -config BR2_x86_i586 - bool "i586" -config BR2_x86_i686 - bool "i686" -config BR2_x86_pentiumpro - bool "pentium pro" -config BR2_x86_pentium_mmx - bool "pentium MMX" -config BR2_x86_pentium_m - bool "pentium mobile" -config BR2_x86_pentium2 - bool "pentium2" -config BR2_x86_pentium3 - bool "pentium3" -config BR2_x86_pentium4 - bool "pentium4" -config BR2_x86_prescott - bool "prescott" -config BR2_x86_nocona - bool "nocona" -config BR2_x86_core2 - bool "core2" -config BR2_x86_k6 - bool "k6" -config BR2_x86_k6_2 - bool "k6-2" -config BR2_x86_athlon - bool "athlon" -config BR2_x86_athlon_4 - bool "athlon-4" -config BR2_x86_opteron - bool "opteron" -config BR2_x86_opteron_sse3 - bool "opteron w/ SSE3" -config BR2_x86_barcelona - bool "barcelona" -config BR2_x86_geode - bool "geode" -config BR2_x86_c3 - bool "Via/Cyrix C3 (Samuel/Ezra cores)" -config BR2_x86_c32 - bool "Via C3-2 (Nehemiah cores)" -config BR2_x86_winchip_c6 - bool "IDT Winchip C6" -config BR2_x86_winchip2 - bool "IDT Winchip 2" -endchoice - -choice - prompt "Target Architecture Variant" - depends on BR2_x86_64 - default BR2_x86_64_generic - help - Specific CPU variant to use - -config BR2_x86_64_generic - bool "generic" -config BR2_x86_64_barcelona - bool "barcelona" -config BR2_x86_64_opteron_sse3 - bool "opteron w/ sse3" -config BR2_x86_64_opteron - bool "opteron" -config BR2_x86_64_nocona - bool "nocona" -config BR2_x86_64_core2 - bool "core2" -endchoice - -choice - prompt "Target Architecture Variant" - depends on BR2_sparc - default BR2_sparc_v7 - help - Specific CPU variant to use - -config BR2_sparc_v7 - bool "v7" -config BR2_sparc_cypress - bool "cypress" -config BR2_sparc_v8 - bool "v8" -comment "LEON SPARC needs gcc = 4.4.x" -config BR2_sparc_sparchfleon - bool "hfleon" -config BR2_sparc_sparchfleonv8 - bool "hfleonv8" -config BR2_sparc_sparcsfleon - bool "sfleon" -config BR2_sparc_sparcsfleonv8 - bool "sfleonv8" -config BR2_sparc_supersparc - bool "supersparc" -config BR2_sparc_sparclite - bool "sparclite" -config BR2_sparc_f930 - bool "f930" -config BR2_sparc_f934 - bool "f934" -config BR2_sparc_hypersparc - bool "hypersparc" -config BR2_sparc_sparclite86x - bool "sparclite86x" -config BR2_sparc_sparclet - bool "sparclet" -config BR2_sparc_tsc701 - bool "tsc701" -endchoice - -config BR2_SPARC_TYPE - string - default V7 if BR2_sparc_v7 || BR2_sparc_cypress || BR2_sparc_sparclite || BR2_sparc_f930 || BR2_sparc_f934 || BR2_sparc_sparclite86x || BR2_sparc_sparclet || BR2_sparc_tsc701 || BR2_sparc_sparchfleon || BR2_sparc_sparcsfleon - default V8 if BR2_sparc_v8 || BR2_sparc_supersparc || BR2_sparc_hypersparc || BR2_sparc_sparchfleonv8 || BR2_sparc_sparcsfleonv8 - -choice - prompt "Target Architecture Variant" - depends on BR2_xtensa - default BR2_xtensa_dc232b - help - Specific CPU variant to use - -config BR2_xtensa_custom - bool "Custom Xtensa processor configuration" -config BR2_xtensa_dc232a - bool "dc232a - Diamond 232L Standard Core Rev.A (LE)" -config BR2_xtensa_dc232b - bool "dc232b - Diamond 232L Standard Core Rev.B (LE)" -#config BR2_xtensa_s5000 -# bool "s5000 - Stretch S5000" -endchoice - -config BR2_xtensa_custom_name - string "Custom Xtensa processor configuration name" - depends on BR2_xtensa_custom - default "" - help - Name given to a custom Xtensa processor configuration. - This is used to select the correct overlay. - -config BR2_xtensa_core_name - string - default BR2_xtensa_custom_name if BR2_xtensa_custom - default "dc232a" if BR2_xtensa_dc232a - default "dc232b" if BR2_xtensa_dc232b -# default "s5000" if BR2_xtensa_s5000 - -choice - prompt "Target Architecture Variant" - depends on BR2_powerpc - default BR2_generic_powerpc - help - Specific CPU variant to use -config BR2_generic_powerpc - bool "generic" -config BR2_powerpc_401 - bool "401" -config BR2_powerpc_403 - bool "403" -config BR2_powerpc_405 - bool "405" -config BR2_powerpc_405fp - bool "405 with FPU" -config BR2_powerpc_440 - bool "440" -config BR2_powerpc_440fp - bool "440 with FPU" -config BR2_powerpc_505 - bool "505" -config BR2_powerpc_601 - bool "601" -config BR2_powerpc_602 - bool "602" -config BR2_powerpc_603 - bool "603" -config BR2_powerpc_603e - bool "603e" -config BR2_powerpc_604 - bool "604" -config BR2_powerpc_604e - bool "604e" -config BR2_powerpc_620 - bool "620" -config BR2_powerpc_630 - bool "630" -config BR2_powerpc_740 - bool "740" -config BR2_powerpc_7400 - bool "7400" -config BR2_powerpc_7450 - bool "7450" -config BR2_powerpc_750 - bool "750" -config BR2_powerpc_801 - bool "801" -config BR2_powerpc_821 - bool "821" -config BR2_powerpc_823 - bool "823" -config BR2_powerpc_860 - bool "860" -config BR2_powerpc_970 - bool "970" -config BR2_powerpc_8540 - bool "8540" -comment "e300c2 needs gcc >= 4.4.x" -config BR2_powerpc_e300c2 - bool "e300c2" -comment "e300c3 needs gcc >= 4.4.x" -config BR2_powerpc_e300c3 - bool "e300c3" -comment "e500mc needs gcc >= 4.4.x" -config BR2_powerpc_e500mc - bool "e500mc" -endchoice - -config BR2_ARCH - string - default "arm" if BR2_arm - default "armeb" if BR2_armeb - default "avr32" if BR2_avr32 - default "bfin" if BR2_bfin - default "i386" if BR2_x86_i386 - default "i486" if BR2_x86_i486 - default "i586" if BR2_x86_i586 - default "i586" if BR2_x86_pentium_mmx - default "i586" if BR2_x86_geode - default "i586" if BR2_x86_c3 - default "i686" if BR2_x86_c32 - default "i586" if BR2_x86_winchip_c6 - default "i586" if BR2_x86_winchip2 - default "i686" if BR2_x86_i686 - default "i686" if BR2_x86_pentium2 - default "i686" if BR2_x86_pentium3 - default "i686" if BR2_x86_pentium4 - default "i686" if BR2_x86_pentium_m - default "i686" if BR2_x86_pentiumpro - default "i686" if BR2_x86_nocona - default "i686" if BR2_x86_core2 - default "m68k" if BR2_m68k - default "mips" if BR2_mips - default "mipsel" if BR2_mipsel - default "powerpc" if BR2_powerpc - default "sh2a_nofpueb" if BR2_sh2a_nofpueb - default "sh2eb" if BR2_sh2eb - default "sh3" if BR2_sh3 - default "sh3eb" if BR2_sh3eb - default "sh4" if BR2_sh4 - default "sh4eb" if BR2_sh4eb - default "sh64" if BR2_sh64 - default "sparc" if BR2_sparc - default "x86_64" if BR2_x86_64 - default "x86_64" if BR2_x86_64_generic - default "x86_64" if BR2_x86_64_nocona - default "x86_64" if BR2_x86_64_core2 - default "x86_64" if BR2_x86_64_opteron - default "x86_64" if BR2_x86_64_opteron_sse3 - default "x86_64" if BR2_x86_64_barcelona - default "xtensa" if BR2_xtensa - - -config BR2_ENDIAN - string - default "LITTLE" if BR2_arm || BR2_bfin || BR2_i386 || BR2_mipsel || \ - BR2_sh3 || BR2_sh4 || BR2_x86_64 || BR2_sh64 - default "BIG" if BR2_armeb || BR2_avr32 || BR2_m68k || BR2_mips || \ - BR2_powerpc || BR2_sh2a_nofpueb || BR2_sh2eb || \ - BR2_sh3eb || BR2_sh4eb || BR2_sparc - -config BR2_GCC_TARGET_TUNE - string - default i386 if BR2_x86_i386 - default i486 if BR2_x86_i486 - default i586 if BR2_x86_i586 - default pentium-mmx if BR2_x86_pentium_mmx - default i686 if BR2_x86_i686 - default pentiumpro if BR2_x86_pentiumpro - default pentium-m if BR2_x86_pentium_m - default pentium2 if BR2_x86_pentium2 - default pentium3 if BR2_x86_pentium3 - default pentium4 if BR2_x86_pentium4 - default prescott if BR2_x86_prescott - default nocona if BR2_x86_nocona - default core2 if BR2_x86_core2 - default k8 if BR2_x86_opteron - default k8-sse3 if BR2_x86_opteron_sse3 - default barcelona if BR2_x86_barcelona - default k6 if BR2_x86_k6 - default k6-2 if BR2_x86_k6_2 - default athlon if BR2_x86_athlon - default athlon-4 if BR2_x86_athlon_4 - default winchip-c6 if BR2_x86_winchip_c6 - default winchip2 if BR2_x86_winchip2 - default c3 if BR2_x86_c3 - default c3-2 if BR2_x86_c32 - default geode if BR2_x86_geode - default generic if BR2_x86_64_generic - default nocona if BR2_x86_64_nocona - default core2 if BR2_x86_64_core2 - default k8 if BR2_x86_64_opteron - default k8-sse3 if BR2_x86_64_opteron_sse3 - default barcelona if BR2_x86_64_barcelona - default arm600 if BR2_arm600 - default arm610 if BR2_arm610 - default arm620 if BR2_arm620 - default arm7tdmi if BR2_arm7tdmi - default arm7tdmi if BR2_arm720t - default arm7tdmi if BR2_arm740t - default arm920 if BR2_arm920 - default arm920t if BR2_arm920t - default arm922t if BR2_arm922t - default arm926ej-s if BR2_arm926t - default arm1136j-s if BR2_arm1136j_s - default arm1136jf-s if BR2_arm1136jf_s - default arm1176jz-s if BR2_arm1176jz_s - default arm1176jzf-s if BR2_arm1176jzf_s - default cortex-a8 if BR2_cortex_a8 - default cortex-a9 if BR2_cortex_a9 - default strongarm110 if BR2_sa110 - default strongarm1100 if BR2_sa1100 - default xscale if BR2_xscale - default iwmmxt if BR2_iwmmxt - default 68000 if BR2_m68k_68000 - default 68010 if BR2_m68k_68010 - default 68020 if BR2_m68k_68020 - default 68030 if BR2_m68k_68030 - default 68040 if BR2_m68k_68040 - default 68060 if BR2_m68k_68060 - default mips1 if BR2_mips_1 - default mips2 if BR2_mips_2 - default mips3 if BR2_mips_3 - default mips4 if BR2_mips_4 - default mips32 if BR2_mips_32 - default mips32r2 if BR2_mips_32r2 - default mips64 if BR2_mips_64 - default mips64r2 if BR2_mips_64r2 - default mips16 if BR2_mips_16 - default 401 if BR2_powerpc_401 - default 403 if BR2_powerpc_403 - default 405 if BR2_powerpc_405 - default 405fp if BR2_powerpc_405fp - default 440 if BR2_powerpc_440 - default 440fp if BR2_powerpc_440fp - default 505 if BR2_powerpc_505 - default 601 if BR2_powerpc_601 - default 602 if BR2_powerpc_602 - default 603 if BR2_powerpc_603 - default 603e if BR2_powerpc_603e - default 604 if BR2_powerpc_604 - default 604e if BR2_powerpc_604e - default 620 if BR2_powerpc_620 - default 630 if BR2_powerpc_630 - default 740 if BR2_powerpc_740 - default 7400 if BR2_powerpc_7400 - default 7450 if BR2_powerpc_7450 - default 750 if BR2_powerpc_750 - default 801 if BR2_powerpc_801 - default 821 if BR2_powerpc_821 - default 823 if BR2_powerpc_823 - default 860 if BR2_powerpc_860 - default 970 if BR2_powerpc_970 - default 8540 if BR2_powerpc_8540 - default e300c2 if BR2_powerpc_e300c2 - default e300c3 if BR2_powerpc_e300c3 - default e500mc if BR2_powerpc_e500mc - default v7 if BR2_sparc_v7 - default cypress if BR2_sparc_cypress - default v8 if BR2_sparc_v8 - default supersparc if BR2_sparc_supersparc - default hypersparc if BR2_sparc_hypersparc - default sparclite if BR2_sparc_sparclite - default f930 if BR2_sparc_f930 - default f934 if BR2_sparc_f934 - default sparclite86x if BR2_sparc_sparclite86x - default sparclet if BR2_sparc_sparclet - default tsc701 if BR2_sparc_tsc701 - default v9 if BR2_sparc_v9 - default v9 if BR2_sparc_v9a - default v9 if BR2_sparc_v9b - default ultrasparc if BR2_sparc_ultrasparc - default ultrasparc3 if BR2_sparc_ultrasparc3 - default niagara if BR2_sparc_niagara - -config BR2_GCC_TARGET_ARCH - string - default i386 if BR2_x86_i386 - default i486 if BR2_x86_i486 - default i586 if BR2_x86_i586 - default pentium-mmx if BR2_x86_pentium_mmx - default i686 if BR2_x86_i686 - default pentiumpro if BR2_x86_pentiumpro - default pentium-m if BR2_x86_pentium_m - default pentium2 if BR2_x86_pentium2 - default pentium3 if BR2_x86_pentium3 - default pentium4 if BR2_x86_pentium4 - default prescott if BR2_x86_prescott - default nocona if BR2_x86_nocona - default core2 if BR2_x86_core2 - default k8 if BR2_x86_opteron - default k8-sse3 if BR2_x86_opteron_sse3 - default barcelona if BR2_x86_barcelona - default k6 if BR2_x86_k6 - default k6-2 if BR2_x86_k6_2 - default athlon if BR2_x86_athlon - default athlon-4 if BR2_x86_athlon_4 - default winchip-c6 if BR2_x86_winchip_c6 - default winchip2 if BR2_x86_winchip2 - default c3 if BR2_x86_c3 - default c3-2 if BR2_x86_c32 - default geode if BR2_x86_geode - default armv4t if BR2_arm7tdmi - default armv3 if BR2_arm610 - default armv3 if BR2_arm710 - default armv4t if BR2_arm720t - default armv4t if BR2_arm920t - default armv4t if BR2_arm922t - default armv5te if BR2_arm926t - default armv5t if BR2_arm10t - default armv6j if BR2_arm1136jf_s - default armv6zk if BR2_arm1176jz_s - default armv6zk if BR2_arm1176jzf_s - default armv7-a if BR2_cortex_a8 - default armv7-a if BR2_cortex_a9 - default armv4 if BR2_sa110 - default armv4 if BR2_sa1100 - default armv5te if BR2_xscale - default iwmmxt if BR2_iwmmxt - default 68000 if BR2_m68k_68000 - default 68010 if BR2_m68k_68010 - default 68020 if BR2_m68k_68020 - default 68030 if BR2_m68k_68030 - default 68040 if BR2_m68k_68040 - default 68060 if BR2_m68k_68060 - -config BR2_GCC_TARGET_ABI - string - default apcs-gnu if BR2_ARM_OABI - default atpcs if BR2_arm_dunno - default aapcs if BR2_arm_dunno - default aapcs-linux if BR2_ARM_EABI - default 32 if BR2_MIPS_OABI32 - default n32 if BR2_MIPS_ABI32 - default eabi if BR2_MIPS_EABI - default o64 if BR2_MIPS_OABI64 - default n64 if BR2_MIPS_ABI64 - default mmixware if BR2_mmix && BR2_MMIX_ABI_native - default gnu if BR2_mmix && !BR2_MMIX_ABI_native - default altivec if BR2_powerpc && BR2_PPC_ABI_altivec - default no-altivec if BR2_powerpc && BR2_PPC_ABI_no-altivec - default spe if BR2_powerpc && BR2_PPC_ABI_spe - default no-spe if BR2_powerpc && BR2_PPC_ABI_no-spe - default ibmlongdouble if BR2_powerpc && BR2_PPC_ABI_ibmlongdouble - default ieeelongdouble if BR2_powerpc && BR2_PPC_ABI_ieeelongdouble - -config BR2_GCC_TARGET_CPU - string - default sparchfleon if BR2_sparc_sparchfleon - default sparchfleonv8 if BR2_sparc_sparchfleonv8 - default sparcsfleon if BR2_sparc_sparcsfleon - default sparcsfleonv8 if BR2_sparc_sparcsfleonv8 diff --git a/target/Makefile.in b/target/Makefile.in deleted file mode 100644 index 915d62538c..0000000000 --- a/target/Makefile.in +++ /dev/null @@ -1,3 +0,0 @@ -# make sure to put everything that is board-specific before the tarroot targets -include target/generic/Makefile.in - diff --git a/target/device/xtensa/device_table.txt b/target/device/xtensa/device_table.txt deleted file mode 100644 index d0c7467973..0000000000 --- a/target/device/xtensa/device_table.txt +++ /dev/null @@ -1,189 +0,0 @@ -# When building a target filesystem, it is desirable to not have to -# become root and then run 'mknod' a thousand times. Using a device -# table you can create device nodes and directories "on the fly". -# -# This is a sample device table file for use with genext2fs. You can -# do all sorts of interesting things with a device table file. For -# example, if you want to adjust the permissions on a particular file -# you can just add an entry like: -# /sbin/foobar f 2755 0 0 - - - - - -# and (assuming the file /sbin/foobar exists) it will be made setuid -# root (regardless of what its permissions are on the host filesystem. -# Furthermore, you can use a single table entry to create a many device -# minors. For example, if I wanted to create /dev/hda and /dev/hda[0-15] -# I could just use the following two table entries: -# /dev/hda b 640 0 0 3 0 0 0 - -# /dev/hda b 640 0 0 3 1 1 1 15 -# -# Device table entries take the form of: -# -# where name is the file name, type can be one of: -# f A regular file -# d Directory -# c Character special device file -# b Block special device file -# p Fifo (named pipe) -# uid is the user id for the target file, gid is the group id for the -# target file. The rest of the entries (major, minor, etc) apply only -# to device special files. - -# Have fun -# -Erik Andersen -# - -# -/dev d 755 0 0 - - - - - -/dev/pts d 755 0 0 - - - - - -/dev/shm d 755 0 0 - - - - - -/tmp d 1777 0 0 - - - - - -/etc d 755 0 0 - - - - - -/home/default d 2755 1000 1000 - - - - - -# -/bin/busybox f 4755 0 0 - - - - - -/etc/shadow f 600 0 0 - - - - - -/etc/passwd f 644 0 0 - - - - - -/etc/network/if-up.d d 755 0 0 - - - - - -/etc/network/if-pre-up.d d 755 0 0 - - - - - -/etc/network/if-down.d d 755 0 0 - - - - - -/etc/network/if-post-down.d d 755 0 0 - - - - - -/usr/share/udhcpc/default.script f 755 0 0 - - - - - -# uncomment this to allow starting x as non-root -#/usr/X11R6/bin/Xfbdev f 4755 0 0 - - - - - -# Normal system devices -/dev/mem c 640 0 0 1 1 0 0 - -/dev/kmem c 640 0 0 1 2 0 0 - -/dev/null c 666 0 0 1 3 0 0 - -/dev/zero c 666 0 0 1 5 0 0 - -/dev/random c 666 0 0 1 8 0 0 - -/dev/urandom c 666 0 0 1 9 0 0 - -/dev/ram b 640 0 0 1 1 0 0 - -/dev/ram b 640 0 0 1 0 0 1 4 -/dev/loop b 640 0 0 7 0 0 1 2 -/dev/rtc c 640 0 0 10 135 - - - -/dev/console c 666 0 0 5 1 - - - -/dev/tty c 666 0 0 5 0 - - - -/dev/tty c 666 0 0 4 0 0 1 8 -/dev/ttyp c 666 0 0 3 0 0 1 10 -/dev/ptyp c 666 0 0 2 0 0 1 10 -/dev/ptmx c 666 0 0 5 2 - - - -/dev/ttyP c 666 0 0 57 0 0 1 4 -/dev/ttyS c 666 0 0 4 64 0 1 4 -/dev/fb c 640 0 5 29 0 0 1 4 -#/dev/ttySA c 666 0 0 204 5 0 1 3 -/dev/psaux c 666 0 0 10 1 0 0 - -#/dev/ppp c 666 0 0 108 0 - - - -/dev/ttyCPM c 666 0 0 204 46 0 1 4 -/dev/ttyAMA c 666 0 0 204 64 0 1 4 -/dev/ttySAC c 666 0 0 204 64 0 1 4 -/dev/ttyPSC c 666 0 0 204 148 0 1 4 -/dev/ttyUL c 666 0 0 204 187 0 1 4 -/dev/ttymxc c 666 0 0 207 16 0 1 3 - -# Input stuff -/dev/input d 755 0 0 - - - - - -/dev/input/mice c 640 0 0 13 63 0 0 - -/dev/input/mouse c 660 0 0 13 32 0 1 4 -/dev/input/event c 660 0 0 13 64 0 1 4 -#/dev/input/js c 660 0 0 13 0 0 1 4 - - -# MTD stuff -/dev/mtd c 640 0 0 90 0 0 2 4 -/dev/mtdblock b 640 0 0 31 0 0 1 4 - -#Tun/tap driver -/dev/net d 755 0 0 - - - - - -/dev/net/tun c 660 0 0 10 200 - - - - -# Audio stuff -#/dev/audio c 666 0 29 14 4 - - - -#/dev/audio1 c 666 0 29 14 20 - - - -#/dev/dsp c 666 0 29 14 3 - - - -#/dev/dsp1 c 666 0 29 14 19 - - - -#/dev/sndstat c 666 0 29 14 6 - - - - -# User-mode Linux stuff -#/dev/ubda b 640 0 0 98 0 0 0 - -#/dev/ubda b 640 0 0 98 1 1 1 15 - -# IDE Devices -/dev/hda b 640 0 0 3 0 0 0 - -/dev/hda b 640 0 0 3 1 1 1 15 -/dev/hdb b 640 0 0 3 64 0 0 - -/dev/hdb b 640 0 0 3 65 1 1 15 -#/dev/hdc b 640 0 0 22 0 0 0 - -#/dev/hdc b 640 0 0 22 1 1 1 15 -#/dev/hdd b 640 0 0 22 64 0 0 - -#/dev/hdd b 640 0 0 22 65 1 1 15 -#/dev/hde b 640 0 0 33 0 0 0 - -#/dev/hde b 640 0 0 33 1 1 1 15 -#/dev/hdf b 640 0 0 33 64 0 0 - -#/dev/hdf b 640 0 0 33 65 1 1 15 -#/dev/hdg b 640 0 0 34 0 0 0 - -#/dev/hdg b 640 0 0 34 1 1 1 15 -#/dev/hdh b 640 0 0 34 64 0 0 - -#/dev/hdh b 640 0 0 34 65 1 1 15 - -# SCSI Devices -/dev/sda b 640 0 0 8 0 0 0 - -/dev/sda b 640 0 0 8 1 1 1 15 -/dev/sdb b 640 0 0 8 16 0 0 - -/dev/sdb b 640 0 0 8 17 1 1 15 -#/dev/sdc b 640 0 0 8 32 0 0 - -#/dev/sdc b 640 0 0 8 33 1 1 15 -#/dev/sdd b 640 0 0 8 48 0 0 - -#/dev/sdd b 640 0 0 8 49 1 1 15 -#/dev/sde b 640 0 0 8 64 0 0 - -#/dev/sde b 640 0 0 8 65 1 1 15 -#/dev/sdf b 640 0 0 8 80 0 0 - -#/dev/sdf b 640 0 0 8 81 1 1 15 -#/dev/sdg b 640 0 0 8 96 0 0 - -#/dev/sdg b 640 0 0 8 97 1 1 15 -#/dev/sdh b 640 0 0 8 112 0 0 - -#/dev/sdh b 640 0 0 8 113 1 1 15 -#/dev/sg c 640 0 0 21 0 0 1 15 -#/dev/scd b 640 0 0 11 0 0 1 15 -#/dev/st c 640 0 0 9 0 0 1 8 -#/dev/nst c 640 0 0 9 128 0 1 8 -#/dev/st c 640 0 0 9 32 1 1 4 -#/dev/st c 640 0 0 9 64 1 1 4 -#/dev/st c 640 0 0 9 96 1 1 4 - -# USB block devices (ub driver) -/dev/uba b 640 0 0 180 0 0 0 - -/dev/uba b 640 0 0 180 1 1 1 6 -/dev/ubb b 640 0 0 180 8 0 0 - -/dev/ubb b 640 0 0 180 65 1 1 6 - -# Floppy disk devices -#/dev/fd b 640 0 0 2 0 0 1 2 -#/dev/fd0d360 b 640 0 0 2 4 0 0 - -#/dev/fd1d360 b 640 0 0 2 5 0 0 - -#/dev/fd0h1200 b 640 0 0 2 8 0 0 - -#/dev/fd1h1200 b 640 0 0 2 9 0 0 - -#/dev/fd0u1440 b 640 0 0 2 28 0 0 - -#/dev/fd1u1440 b 640 0 0 2 29 0 0 - -#/dev/fd0u2880 b 640 0 0 2 32 0 0 - -#/dev/fd1u2880 b 640 0 0 2 33 0 0 - - -# All the proprietary cdrom devices in the world -#/dev/aztcd b 640 0 0 29 0 0 0 - -#/dev/bpcd b 640 0 0 41 0 0 0 - -#/dev/capi20 c 640 0 0 68 0 0 1 2 -#/dev/cdu31a b 640 0 0 15 0 0 0 - -#/dev/cdu535 b 640 0 0 24 0 0 0 - -#/dev/cm206cd b 640 0 0 32 0 0 0 - -#/dev/sjcd b 640 0 0 18 0 0 0 - -#/dev/sonycd b 640 0 0 15 0 0 0 - -#/dev/gscd b 640 0 0 16 0 0 0 - -#/dev/sbpcd b 640 0 0 25 0 0 0 - -#/dev/sbpcd b 640 0 0 25 0 0 1 4 -#/dev/mcd b 640 0 0 23 0 0 0 - -#/dev/optcd b 640 0 0 17 0 0 0 - - -# I2C device nodes -/dev/i2c- c 666 0 0 89 0 0 1 4 - -# Xtensa special devices -/dev/simdisk0 b 640 0 0 240 0 0 0 -/dev/simdisk1 b 640 0 0 240 1 0 0 diff --git a/target/generic/Config.in b/target/generic/Config.in deleted file mode 100644 index 2ce7a42b8d..0000000000 --- a/target/generic/Config.in +++ /dev/null @@ -1,71 +0,0 @@ -menu "System configuration" - -choice - prompt "Board Type" - default BR2_BOARD_TYPE_AMLOGIC_M3 - help - Set the board type - -config BR2_BOARD_TYPE_AMLOGIC_M3 - bool "Amlogic M3" - -config BR2_BOARD_TYPE_AMLOGIC_M1 - bool "Amlogic M1" - -endchoice - -config BR2_TARGET_GENERIC_HOSTNAME - string "System hostname" - default "buildroot" - help - Select system hostname to be stored in /etc/hostname. - -config BR2_TARGET_GENERIC_ISSUE - string "System banner" - default "Welcome to Buildroot" - help - Select system banner (/etc/issue) to be displayed at login. - -menuconfig BR2_TARGET_GENERIC_GETTY - bool "Generic serial port config" - -if BR2_TARGET_GENERIC_GETTY - -config BR2_TARGET_GENERIC_GETTY_PORT - string "Serial port to run a getty on" - default "ttyS0" - help - Specify a port to run a getty (login prompt) on. - -choice - prompt "Baudrate to use" - default BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200 - help - Select a baudrate to use. - -config BR2_TARGET_GENERIC_GETTY_BAUDRATE_KEEP - bool "keep kernel default" -config BR2_TARGET_GENERIC_GETTY_BAUDRATE_9600 - bool "9600" -config BR2_TARGET_GENERIC_GETTY_BAUDRATE_19200 - bool "19200" -config BR2_TARGET_GENERIC_GETTY_BAUDRATE_38400 - bool "38400" -config BR2_TARGET_GENERIC_GETTY_BAUDRATE_57600 - bool "57600" -config BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200 - bool "115200" -endchoice - -config BR2_TARGET_GENERIC_GETTY_BAUDRATE - string - default "0" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_KEEP - default "9600" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_9600 - default "19200" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_19200 - default "38400" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_38400 - default "57600" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_57600 - default "115200" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200 - -endif # BR2_TARGET_GENERIC_GETTY - -endmenu diff --git a/target/generic/Makefile.in b/target/generic/Makefile.in deleted file mode 100644 index 3a750c3b44..0000000000 --- a/target/generic/Makefile.in +++ /dev/null @@ -1,38 +0,0 @@ -TARGET_GENERIC_HOSTNAME:=$(call qstrip,$(BR2_TARGET_GENERIC_HOSTNAME)) -TARGET_GENERIC_ISSUE:=$(call qstrip,$(BR2_TARGET_GENERIC_ISSUE)) -TARGET_GENERIC_GETTY:=$(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)) -TARGET_GENERIC_GETTY_BAUDRATE:=$(call qstrip,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE)) - -target-generic-hostname: - mkdir -p $(TARGET_DIR)/etc - echo "$(TARGET_GENERIC_HOSTNAME)" > $(TARGET_DIR)/etc/hostname - -target-generic-issue: - mkdir -p $(TARGET_DIR)/etc - echo "$(TARGET_GENERIC_ISSUE)" > $(TARGET_DIR)/etc/issue - -target-generic-getty-busybox: - $(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(TARGET_GENERIC_GETTY)::respawn:/sbin/getty -L $(TARGET_GENERIC_GETTY) $(TARGET_GENERIC_GETTY_BAUDRATE) vt100 #~' \ - $(TARGET_DIR)/etc/inittab - -# In sysvinit inittab, the "id" must not be longer than 4 bytes, so we -# skip the "tty" part and keep only the remaining. -target-generic-getty-sysvinit: - $(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(shell echo $(TARGET_GENERIC_GETTY) | tail -c+4)::respawn:/sbin/getty -L $(TARGET_GENERIC_GETTY) $(TARGET_GENERIC_GETTY_BAUDRATE) vt100 #~' \ - $(TARGET_DIR)/etc/inittab - -ifneq ($(TARGET_GENERIC_HOSTNAME),) -TARGETS += target-generic-hostname -endif - -ifneq ($(TARGET_GENERIC_ISSUE),) -TARGETS += target-generic-issue -endif - -ifeq ($(BR2_TARGET_GENERIC_GETTY),y) -ifeq ($(BR2_PACKAGE_SYSVINIT),y) -TARGETS += target-generic-getty-sysvinit -else -TARGETS += target-generic-getty-busybox -endif -endif diff --git a/target/generic/device_table.txt b/target/generic/device_table.txt deleted file mode 100644 index 15132f9a84..0000000000 --- a/target/generic/device_table.txt +++ /dev/null @@ -1,186 +0,0 @@ -# When building a target filesystem, it is desirable to not have to -# become root and then run 'mknod' a thousand times. Using a device -# table you can create device nodes and directories "on the fly". -# -# This is a sample device table file for use with genext2fs. You can -# do all sorts of interesting things with a device table file. For -# example, if you want to adjust the permissions on a particular file -# you can just add an entry like: -# /sbin/foobar f 2755 0 0 - - - - - -# and (assuming the file /sbin/foobar exists) it will be made setuid -# root (regardless of what its permissions are on the host filesystem. -# Furthermore, you can use a single table entry to create a many device -# minors. For example, if I wanted to create /dev/hda and /dev/hda[0-15] -# I could just use the following two table entries: -# /dev/hda b 640 0 0 3 0 0 0 - -# /dev/hda b 640 0 0 3 1 1 1 15 -# -# Device table entries take the form of: -# -# where name is the file name, type can be one of: -# f A regular file -# d Directory -# c Character special device file -# b Block special device file -# p Fifo (named pipe) -# uid is the user id for the target file, gid is the group id for the -# target file. The rest of the entries (major, minor, etc) apply only -# to device special files. - -# Have fun -# -Erik Andersen -# - -# -/dev d 755 0 0 - - - - - -/dev/pts d 755 0 0 - - - - - -/dev/shm d 755 0 0 - - - - - -/tmp d 1777 0 0 - - - - - -/etc d 755 0 0 - - - - - -/home/default d 2755 1000 1000 - - - - - -# -/bin/busybox f 4755 0 0 - - - - - -/etc/shadow f 600 0 0 - - - - - -/etc/passwd f 644 0 0 - - - - - -/etc/network/if-up.d d 755 0 0 - - - - - -/etc/network/if-pre-up.d d 755 0 0 - - - - - -/etc/network/if-down.d d 755 0 0 - - - - - -/etc/network/if-post-down.d d 755 0 0 - - - - - -/usr/share/udhcpc/default.script f 755 0 0 - - - - - -# uncomment this to allow starting x as non-root -#/usr/X11R6/bin/Xfbdev f 4755 0 0 - - - - - -# Normal system devices -/dev/mem c 640 0 0 1 1 0 0 - -/dev/kmem c 640 0 0 1 2 0 0 - -/dev/null c 666 0 0 1 3 0 0 - -/dev/zero c 666 0 0 1 5 0 0 - -/dev/random c 666 0 0 1 8 0 0 - -/dev/urandom c 666 0 0 1 9 0 0 - -/dev/ram b 640 0 0 1 1 0 0 - -/dev/ram b 640 0 0 1 0 0 1 4 -/dev/loop b 640 0 0 7 0 0 1 2 -/dev/rtc c 640 0 0 10 135 - - - -/dev/console c 666 0 0 5 1 - - - -/dev/tty c 666 0 0 5 0 - - - -/dev/tty c 666 0 0 4 0 0 1 8 -/dev/ttyp c 666 0 0 3 0 0 1 10 -/dev/ptyp c 666 0 0 2 0 0 1 10 -/dev/ptmx c 666 0 0 5 2 - - - -/dev/ttyP c 666 0 0 57 0 0 1 4 -/dev/ttyS c 666 0 0 4 64 0 1 4 -/dev/fb c 640 0 5 29 0 0 1 4 -#/dev/ttySA c 666 0 0 204 5 0 1 3 -/dev/psaux c 666 0 0 10 1 0 0 - -#/dev/ppp c 666 0 0 108 0 - - - -/dev/ttyAM c 666 0 0 204 16 0 1 3 -/dev/ttyCPM c 666 0 0 204 46 0 1 4 -/dev/ttyAMA c 666 0 0 204 64 0 1 4 -/dev/ttySAC c 666 0 0 204 64 0 1 4 -/dev/ttyPSC c 666 0 0 204 148 0 1 4 -/dev/ttyUL c 666 0 0 204 187 0 1 4 -/dev/ttymxc c 666 0 0 207 16 0 1 3 - -# Input stuff -/dev/input d 755 0 0 - - - - - -/dev/input/mice c 640 0 0 13 63 0 0 - -/dev/input/mouse c 660 0 0 13 32 0 1 4 -/dev/input/event c 660 0 0 13 64 0 1 4 -#/dev/input/js c 660 0 0 13 0 0 1 4 - - -# MTD stuff -/dev/mtd c 640 0 0 90 0 0 2 4 -/dev/mtdblock b 640 0 0 31 0 0 1 4 - -#Tun/tap driver -/dev/net d 755 0 0 - - - - - -/dev/net/tun c 660 0 0 10 200 - - - - -# Audio stuff -#/dev/audio c 666 0 29 14 4 - - - -#/dev/audio1 c 666 0 29 14 20 - - - -#/dev/dsp c 666 0 29 14 3 - - - -#/dev/dsp1 c 666 0 29 14 19 - - - -#/dev/sndstat c 666 0 29 14 6 - - - - -# User-mode Linux stuff -#/dev/ubda b 640 0 0 98 0 0 0 - -#/dev/ubda b 640 0 0 98 1 1 1 15 - -# IDE Devices -/dev/hda b 640 0 0 3 0 0 0 - -/dev/hda b 640 0 0 3 1 1 1 15 -/dev/hdb b 640 0 0 3 64 0 0 - -/dev/hdb b 640 0 0 3 65 1 1 15 -#/dev/hdc b 640 0 0 22 0 0 0 - -#/dev/hdc b 640 0 0 22 1 1 1 15 -#/dev/hdd b 640 0 0 22 64 0 0 - -#/dev/hdd b 640 0 0 22 65 1 1 15 -#/dev/hde b 640 0 0 33 0 0 0 - -#/dev/hde b 640 0 0 33 1 1 1 15 -#/dev/hdf b 640 0 0 33 64 0 0 - -#/dev/hdf b 640 0 0 33 65 1 1 15 -#/dev/hdg b 640 0 0 34 0 0 0 - -#/dev/hdg b 640 0 0 34 1 1 1 15 -#/dev/hdh b 640 0 0 34 64 0 0 - -#/dev/hdh b 640 0 0 34 65 1 1 15 - -# SCSI Devices -/dev/sda b 640 0 0 8 0 0 0 - -/dev/sda b 640 0 0 8 1 1 1 15 -/dev/sdb b 640 0 0 8 16 0 0 - -/dev/sdb b 640 0 0 8 17 1 1 15 -#/dev/sdc b 640 0 0 8 32 0 0 - -#/dev/sdc b 640 0 0 8 33 1 1 15 -#/dev/sdd b 640 0 0 8 48 0 0 - -#/dev/sdd b 640 0 0 8 49 1 1 15 -#/dev/sde b 640 0 0 8 64 0 0 - -#/dev/sde b 640 0 0 8 65 1 1 15 -#/dev/sdf b 640 0 0 8 80 0 0 - -#/dev/sdf b 640 0 0 8 81 1 1 15 -#/dev/sdg b 640 0 0 8 96 0 0 - -#/dev/sdg b 640 0 0 8 97 1 1 15 -#/dev/sdh b 640 0 0 8 112 0 0 - -#/dev/sdh b 640 0 0 8 113 1 1 15 -#/dev/sg c 640 0 0 21 0 0 1 15 -#/dev/scd b 640 0 0 11 0 0 1 15 -#/dev/st c 640 0 0 9 0 0 1 8 -#/dev/nst c 640 0 0 9 128 0 1 8 -#/dev/st c 640 0 0 9 32 1 1 4 -#/dev/st c 640 0 0 9 64 1 1 4 -#/dev/st c 640 0 0 9 96 1 1 4 - -# USB block devices (ub driver) -/dev/uba b 640 0 0 180 0 0 0 - -/dev/uba b 640 0 0 180 1 1 1 6 -/dev/ubb b 640 0 0 180 8 0 0 - -/dev/ubb b 640 0 0 180 65 1 1 6 - -# Floppy disk devices -#/dev/fd b 640 0 0 2 0 0 1 2 -#/dev/fd0d360 b 640 0 0 2 4 0 0 - -#/dev/fd1d360 b 640 0 0 2 5 0 0 - -#/dev/fd0h1200 b 640 0 0 2 8 0 0 - -#/dev/fd1h1200 b 640 0 0 2 9 0 0 - -#/dev/fd0u1440 b 640 0 0 2 28 0 0 - -#/dev/fd1u1440 b 640 0 0 2 29 0 0 - -#/dev/fd0u2880 b 640 0 0 2 32 0 0 - -#/dev/fd1u2880 b 640 0 0 2 33 0 0 - - -# All the proprietary cdrom devices in the world -#/dev/aztcd b 640 0 0 29 0 0 0 - -#/dev/bpcd b 640 0 0 41 0 0 0 - -#/dev/capi20 c 640 0 0 68 0 0 1 2 -#/dev/cdu31a b 640 0 0 15 0 0 0 - -#/dev/cdu535 b 640 0 0 24 0 0 0 - -#/dev/cm206cd b 640 0 0 32 0 0 0 - -#/dev/sjcd b 640 0 0 18 0 0 0 - -#/dev/sonycd b 640 0 0 15 0 0 0 - -#/dev/gscd b 640 0 0 16 0 0 0 - -#/dev/sbpcd b 640 0 0 25 0 0 0 - -#/dev/sbpcd b 640 0 0 25 0 0 1 4 -#/dev/mcd b 640 0 0 23 0 0 0 - -#/dev/optcd b 640 0 0 17 0 0 0 - - -# I2C device nodes -/dev/i2c- c 666 0 0 89 0 0 1 4 diff --git a/target/xtensa/.gitignore b/target/xtensa/.gitignore deleted file mode 100644 index cff61bf9ec..0000000000 --- a/target/xtensa/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/busybox-config diff --git a/target/xtensa/Makefile.in b/target/xtensa/Makefile.in deleted file mode 100644 index 8a654b9980..0000000000 --- a/target/xtensa/Makefile.in +++ /dev/null @@ -1 +0,0 @@ --include target/xtensa/*/*.mk diff --git a/target/xtensa/defconfig b/target/xtensa/defconfig deleted file mode 100644 index 0eee5c0f57..0000000000 --- a/target/xtensa/defconfig +++ /dev/null @@ -1,129 +0,0 @@ -# Default buildroot configuration for running Linux on an Xtensa processor -# on an LX60 board. - -# -# Project Options -# -BR2_BANNER="Welcome to your custom Xtensa processor based uClibc environment." -BR2_HAVE_DOT_CONFIG=y -BR2_xtensa=y -BR2_xtensa_dc232b=y -BR2_xtensa_core_name="dc232b" -BR2_ARCH="xtensa" - -# -# Build options -# -BR2_WGET="wget --passive-ftp" -# BR2_STRIP_strip is not set -# BR2_STRIP_none=y - -## Added by Maxim - -# -# Kernel Header Options -# -BR2_KERNEL_none=y -BR2_KERNEL_HEADERS_2_6_22_1=y -BR2_DEFAULT_KERNEL_HEADERS="2.6.22.1" - -# -# uClibc Options -# -BR2_UCLIBC_VERSION_0_9_30=y -# BR2_UCLIBC_VERSION_SNAPSHOT is not set -BR2_UCLIBC_CONFIG="target/xtensa/uClibc-0.9.30.config" -BR2_PTHREADS_OLD=y -# BR2_PTHREADS_NATIVE is not set -BR2_PTHREAD_DEBUG=y - -# -# Binutils Options -# -BR2_BINUTILS_VERSION_2_19=y -BR2_BINUTILS_VERSION="2.19" -BR2_EXTRA_BINUTILS_CONFIG_OPTIONS="" - -# -# Gcc Options -# -BR2_GCC_VERSION_4_3_2=y -# BR2_GCC_IS_SNAP is not set -BR2_GCC_VERSION="4.3.2" -BR2_TOOLCHAIN_SYSROOT=y -BR2_EXTRA_GCC_CONFIG_OPTIONS="" -BR2_GCC_CROSS_CXX=y -BR2_INSTALL_LIBSTDCPP=y -BR2_GCC_SHARED_LIBGCC=y - -# -# Gdb Options -# -BR2_PACKAGE_GDB=y -BR2_PACKAGE_GDB_SERVER=y -BR2_PACKAGE_GDB_HOST=y -# BR2_GDB_VERSION_6_2_1 is not set -# BR2_GDB_VERSION_6_3 is not set -# BR2_GDB_VERSION_6_4 is not set -# BR2_GDB_VERSION_6_5 is not set -# BR2_GDB_VERSION_6_6 is not set -# BR2_GDB_VERSION_6_7_1 is not set -BR2_GDB_VERSION_6_8=y -# BR2_GDB_VERSION_SNAPSHOT is not set -BR2_GDB_VERSION="6.8" - -# -# Common Toolchain Options -# -# BR2_PACKAGE_SSTRIP_TARGET is not set -# BR2_PACKAGE_SSTRIP_HOST is not set -BR2_LARGEFILE=y -BR2_INET_RPC=y -BR2_TARGET_OPTIMIZATION="-Os -pipe" - - -## Added by Maxim -BR2_TOOLCHAIN_BUILDROOT=y - - -# BR2_PACKAGE_BUSYBOX_SHOW_OTHERS is not set - -# -# Other development stuff -# -# BR2_PACKAGE_LIBINTL is not set -# For NFS mount: -BR2_PACKAGE_PORTMAP=y - -# -# Other stuff -# - -# -# filesystem for target device -# -BR2_ROOTFS_DEVICE_TABLE="target/device/xtensa/device_table.txt" -BR2_TARGET_ROOTFS_CPIO=y -BR2_TARGET_ROOTFS_CPIO_GZIP=y -BR2_TARGET_ROOTFS_INITRAMFS=y - -# -# Linux Options -# -# BR2_PACKAGE_LINUX is not set - -# -# Board Support Options -# -BR2_TARGET_XTENSA=y - -# -# Tensilica Xtensa/Diamond based Device Support -# -BR2_TARGET_XTENSA_XTAV60=y - -# -# Compressors / decompressors -# - -BR2_PACKAGE_ZLIB=y diff --git a/target/xtensa/patch.in b/target/xtensa/patch.in deleted file mode 100644 index 3fe5cc80dc..0000000000 --- a/target/xtensa/patch.in +++ /dev/null @@ -1,33 +0,0 @@ -ifneq ($(filter xtensa%,$(ARCH)),) -############################################################# -# -# Xtensa processor architecture (including Diamond Standard cores) -# -############################################################# - -# The following defines a function to be used like this: -# $(call XTENSA_PATCH, , , ) -# which returns the first overlay patch file for found -# in the list of directories which are -# relative to (itself either absolute or relative to the -# current directory). The returned filename is relative to . -# For example: -# $(call XTENSA_PATCH, binutils, some/dir/path, . ..) -# (no commas between directory paths in the list). -# -# A selected overlay patch must exist ("fsf" means no specific -# overlay is selected). So the function emits a Makefile error -# if a selected patch file is not found. - -XTENSA_CORENAME:=$(call qstrip,$(BR2_xtensa_core_name)) -ifeq ($(XTENSA_CORENAME),fsf) -XTENSA_PATCH = -else -XTENSA_PATCH_SUFFIX = $(1)-xtensa_$(XTENSA_CORENAME).tgz -XTENSA_PATCH_FILE = $(firstword $(wildcard $(patsubst %,$(2)/%/*$(XTENSA_PATCH_SUFFIX),$(3)))) -# FULLPATH = $(if $(filter /%,$(1)),$(1),$(PWD)/$(1)) -XTENSA_PATCH = $(if $(XTENSA_PATCH_FILE),$(patsubst $(2)/%,%,$(XTENSA_PATCH_FILE)),\ - $(error Missing $(1) patch for Xtensa $(XTENSA_CORENAME) processor (*$(XTENSA_PATCH_SUFFIX) in $(addprefix $(2)/,$(3))))) -endif - -endif diff --git a/target/xtensa/setup-config b/target/xtensa/setup-config deleted file mode 100644 index 7ef8fe86ee..0000000000 --- a/target/xtensa/setup-config +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh - -# Convenience script for setting up a default buildroot config -# for Xtensa processor targets.. - -usage() { - echo "Usage (invoke from top of buildroot tree):" - echo " ./target/xtensa/setup-config " - #echo " ./target/xtensa/setup-config []" - echo "where:" - echo " is the Xtensa core overlay name, as specified in the -c option" - echo " of the ./target/xtensa/xt-buildroot-overlay-install script." - echo "" - echo "For example:" - echo " ./target/xtensa/setup-config dc232b" - echo "" - echo "Currently installed (available) core overlay names are:" - echo " " `ls toolchain/binutils/binutils-xtensa_*.tgz | sed -e 's,toolchain\/binutils\/binutils-xtensa_\(.*\)\.tgz,\1,g'` - exit 1 -} - -if [ $# -ne 1 ]; then - usage -fi - -core=$1 ; shift - -if [ ! -f toolchain/binutils/binutils-xtensa_${core}.tgz \ - -o ! -f toolchain/gcc/gcc-xtensa_${core}.tgz \ - -o ! -f toolchain/gdb/gdb-xtensa_${core}.tgz ]; then - echo "ERROR: Did not find an installed Xtensa core overlay named '${core}'." - echo "ERROR: Please install it first with ./target/xtensa/xt-buildroot-overlay-install" - echo "" - usage -fi - -# Use preset buildroot config: -cp target/xtensa/defconfig .defconfig-xtensa -# Set core name: -sed -i -e 's,^BR2_xtensa_\(.*\)=y,BR2_xtensa_custom=y\nBR2_xtensa_custom_name="'${core}'",' .defconfig-xtensa -## sed -i -e 's,^.*BR2_xtensa_core_name.*,BR_xtensa_core_name="'${core}'",' .defconfig-xtensa -# Create full .config with defaults: -make clean defconfig CONFIG_DEFCONFIG=.defconfig-xtensa || exit 1 - -# Busybox adjustments: turn off 'ar' (can't create archives yet overrides real one) -# and turn on NFS mounting (Xtensa defconfig turns on RPC so this can work): -# -bborig=`grep '^BR2_PACKAGE_BUSYBOX_CONFIG=' .config | sed -e 's,.*"\(.*\)".*,\1,'` -bbconf=target/xtensa/busybox-config -cp $bborig $bbconf -sed -i -e 's,^CONFIG_AR=y,# CONFIG_AR is not set,' $bbconf -sed -i -e 's,^.*CONFIG_FEATURE_MOUNT_NFS.*,CONFIG_FEATURE_MOUNT_NFS=y,' $bbconf -# Make use of above busybox adjustments: -sed -i -e 's,.*\(BR2_PACKAGE_BUSYBOX_CONFIG\).*,\1="'$bbconf'",' .config - -echo "Done." - diff --git a/target/xtensa/uClibc-0.9.30.config b/target/xtensa/uClibc-0.9.30.config deleted file mode 100644 index cc6815d07e..0000000000 --- a/target/xtensa/uClibc-0.9.30.config +++ /dev/null @@ -1,245 +0,0 @@ -# -# Automatically generated make config: don't edit -# Thu Jan 23 14:50:00 2009 -# -# TARGET_alpha is not set -# TARGET_arm is not set -# TARGET_avr32 is not set -# TARGET_bfin is not set -# TARGET_cris is not set -# TARGET_e1 is not set -# TARGET_frv is not set -# TARGET_h8300 is not set -# TARGET_hppa is not set -# TARGET_i386 is not set -# TARGET_i960 is not set -# TARGET_ia64 is not set -# TARGET_m68k is not set -# TARGET_microblaze is not set -# TARGET_mips is not set -# TARGET_nios is not set -# TARGET_nios2 is not set -# TARGET_powerpc is not set -# TARGET_sh is not set -# TARGET_sh64 is not set -# TARGET_sparc is not set -# TARGET_v850 is not set -# TARGET_vax is not set -# TARGET_x86_64 is not set -TARGET_xtensa=y - -# -# Target Architecture Features and Options -# -TARGET_ARCH="xtensa" -FORCE_OPTIONS_FOR_ARCH=y -# ARCH_LITTLE_ENDIAN is not set -# ARCH_BIG_ENDIAN is not set -# ARCH_WANTS_LITTLE_ENDIAN is not set -# ARCH_WANTS_BIG_ENDIAN is not set - -# -# Using ELF file format -# -ARCH_HAS_MMU=y -ARCH_USE_MMU=y -UCLIBC_HAS_FLOATS=y -UCLIBC_HAS_FPU=y -DO_C99_MATH=y -# UCLIBC_HAS_FENV is not set -UCLIBC_HAS_LONG_DOUBLE_MATH=y -KERNEL_HEADERS="/usr/src/linux/include" -HAVE_DOT_CONFIG=y - -# -# General Library Settings -# -# HAVE_NO_PIC is not set -DOPIC=y -# ARCH_HAS_NO_SHARED is not set -# ARCH_HAS_NO_LDSO is not set -HAVE_SHARED=y -# FORCE_SHAREABLE_TEXT_SEGMENTS is not set -LDSO_LDD_SUPPORT=y -LDSO_CACHE_SUPPORT=y -# LDSO_PRELOAD_FILE_SUPPORT is not set -LDSO_BASE_FILENAME="ld.so" -# UCLIBC_STATIC_LDCONFIG is not set -# LDSO_RUNPATH is not set -UCLIBC_CTOR_DTOR=y -# LDSO_GNU_HASH_SUPPORT is not set -# HAS_NO_THREADS is not set -UCLIBC_HAS_THREADS=y -PTHREADS_DEBUG_SUPPORT=y -LINUXTHREADS_OLD=y -UCLIBC_HAS_SYSLOG=y -UCLIBC_HAS_LFS=y -# MALLOC is not set -# MALLOC_SIMPLE is not set -MALLOC_STANDARD=y -MALLOC_GLIBC_COMPAT=y -UCLIBC_DYNAMIC_ATEXIT=y -# COMPAT_ATEXIT is not set -UCLIBC_SUSV3_LEGACY=y -UCLIBC_SUSV3_LEGACY_MACROS=y -# UCLIBC_HAS_STUBS is not set -UCLIBC_HAS_SHADOW=y -# UCLIBC_HAS_PROGRAM_INVOCATION_NAME is not set -UCLIBC_HAS___PROGNAME=y -UCLIBC_HAS_PTY=y -UNIX98PTY_ONLY=y -# UCLIBC_HAS_GETPT is not set -ASSUME_DEVPTS=y -UCLIBC_HAS_TM_EXTENSIONS=y -UCLIBC_HAS_TZ_CACHING=y -UCLIBC_HAS_TZ_FILE=y -UCLIBC_HAS_TZ_FILE_READ_MANY=y -UCLIBC_TZ_FILE_PATH="/etc/TZ" - -# -# Advanced Library Settings -# -UCLIBC_PWD_BUFFER_SIZE=256 -UCLIBC_GRP_BUFFER_SIZE=256 -UCLIBC_HAS_NONREENTRANT=y - -# -# Networking Support -# - -UCLIBC_LINUX_MODULE_24=y -UCLIBC_LINUX_SPECIFIC=y -UCLIBC_HAS_GNU_ERROR=y -UCLIBC_BSD_SPECIFIC=y -UCLIBC_HAS_BSD_ERR=y -UCLIBC_HAS_OBSOLETE_BSD_SIGNAL=y -UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL=y -# UCLIBC_NTP_LEGACY is not set -# UCLIBC_SV4_DEPRECATED is not set -UCLIBC_HAS_REALTIME=y -UCLIBC_HAS_ADVANCED_REALTIME=y -UCLIBC_HAS_EPOLL=y -UCLIBC_HAS_XATTR=y -UCLIBC_HAS_PROFILING=y -UCLIBC_HAS_CRYPT_IMPL=y -UCLIBC_HAS_CRYPT=y -UCLIBC_HAS_NETWORK_SUPPORT=y -UCLIBC_HAS_SOCKET=y -UCLIBC_HAS_IPV4=y -UCLIBC_HAS_IPV6=y -UCLIBC_HAS_RPC=y -UCLIBC_HAS_FULL_RPC=y -UCLIBC_HAS_REENTRANT_RPC=y -UCLIBC_USE_NETLINK=y -# UCLIBC_SUPPORT_AI_ADDRCONFIG is not set -# UCLIBC_HAS_BSD_RES_CLOSE is not set - - -# -# String and Stdio Support -# -# UCLIBC_HAS_STRING_GENERIC_OPT is not set -# UCLIBC_HAS_STRING_ARCH_OPT is not set -UCLIBC_HAS_CTYPE_TABLES=y -UCLIBC_HAS_CTYPE_SIGNED=y -# UCLIBC_HAS_CTYPE_UNSAFE is not set -# UCLIBC_HAS_CTYPE_CHECKED is not set -# UCLIBC_HAS_CTYPE_ENFORCED is not set -# UCLIBC_HAS_WCHAR is not set -# UCLIBC_HAS_LOCALE is not set -UCLIBC_HAS_HEXADECIMAL_FLOATS=y -UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y -# USE_OLD_VFPRINTF is not set -UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9 -UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y -# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set -# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set -# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set -# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set -# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set -UCLIBC_HAS_STDIO_BUFSIZ_4096=y -# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set -UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y -# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set -# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set -# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set -# UCLIBC_HAS_STDIO_GETC_MACRO is not set -# UCLIBC_HAS_STDIO_PUTC_MACRO is not set -UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y -# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set -UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y -UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y -UCLIBC_HAS_PRINTF_M_SPEC=y -UCLIBC_HAS_ERRNO_MESSAGES=y -# UCLIBC_HAS_SYS_ERRLIST is not set -UCLIBC_HAS_SIGNUM_MESSAGES=y -# UCLIBC_HAS_SYS_SIGLIST is not set -UCLIBC_HAS_GNU_GETOPT=y -# UCLIBC_HAS_GNU_GETSUBOPT is not set - -# -# Big and Tall -# -UCLIBC_HAS_REGEX=y -# UCLIBC_HAS_REGEX_OLD is not set -UCLIBC_HAS_FNMATCH=y -# UCLIBC_HAS_FNMATCH_OLD is not set -# UCLIBC_HAS_WORDEXP is not set -UCLIBC_HAS_FTW=y -UCLIBC_HAS_GLOB=y -UCLIBC_HAS_GNU_GLOB=y - -# -# Library Installation Options -# -SHARED_LIB_LOADER_PREFIX="/lib" -RUNTIME_PREFIX="/" -DEVEL_PREFIX="/usr/" - -# -# Security options -# -# UCLIBC_BUILD_PIE is not set -UCLIBC_HAS_ARC4RANDOM=y -# HAVE_NO_SSP is not set -# UCLIBC_HAS_SSP is not set -UCLIBC_BUILD_RELRO=y -UCLIBC_BUILD_NOW=y -# UCLIBC_BUILD_NOEXECSTACK is not set - -# -# uClibc development/debugging options -# -CROSS_COMPILER_PREFIX="" -UCLIBC_EXTRA_CFLAGS="" -# DODEBUG is not set -# DODEBUG_PT is not set -DOSTRIP=y -# DOASSERTS is not set -# SUPPORT_LD_DEBUG is not set -# SUPPORT_LD_DEBUG_EARLY is not set -# UCLIBC_MALLOC_DEBUGGING is not set -WARNINGS="-Wall" -# EXTRA_WARNINGS is not set -# DOMULTI is not set -# UCLIBC_MJN3_ONLY is not set - -# USE_BX is not set -# CONFIG_GENERIC_ARM is not set -# CONFIG_ARM610 is not set -# CONFIG_ARM710 is not set -# CONFIG_ARM7TDMI is not set -# CONFIG_ARM720T is not set -# CONFIG_ARM920T is not set -# CONFIG_ARM922T is not set -# CONFIG_ARM926T is not set -# CONFIG_ARM10T is not set -# CONFIG_ARM1136JF_S is not set -# CONFIG_ARM1176JZ_S is not set -# CONFIG_ARM1176JZF_S is not set -# CONFIG_ARM_CORTEX_M3 is not set -# CONFIG_ARM_CORTEX_M1 is not set -# CONFIG_ARM_SA110 is not set -# CONFIG_ARM_SA1100 is not set -# CONFIG_ARM_XSCALE is not set -# CONFIG_ARM_IWMMXT is not set diff --git a/target/xtensa/uClibc.config b/target/xtensa/uClibc.config deleted file mode 100644 index 546a045347..0000000000 --- a/target/xtensa/uClibc.config +++ /dev/null @@ -1,190 +0,0 @@ -# -# Automatically generated make config: don't edit -# Thu Jan 10 00:46:51 2008 -# -# TARGET_alpha is not set -# TARGET_arm is not set -# TARGET_avr32 is not set -# TARGET_bfin is not set -# TARGET_cris is not set -# TARGET_e1 is not set -# TARGET_frv is not set -# TARGET_h8300 is not set -# TARGET_hppa is not set -# TARGET_i386 is not set -# TARGET_i960 is not set -# TARGET_ia64 is not set -# TARGET_m68k is not set -# TARGET_microblaze is not set -# TARGET_mips is not set -# TARGET_nios is not set -# TARGET_nios2 is not set -# TARGET_powerpc is not set -# TARGET_sh is not set -# TARGET_sh64 is not set -# TARGET_sparc is not set -# TARGET_v850 is not set -# TARGET_vax is not set -# TARGET_x86_64 is not set -TARGET_xtensa=y - -# -# Target Architecture Features and Options -# -TARGET_ARCH="xtensa" -TARGET_SUBARCH="" - -# -# Using ELF file format -# -ARCH_HAS_MMU=y -ARCH_USE_MMU=y -UCLIBC_HAS_FLOATS=y -UCLIBC_HAS_FPU=y -DO_C99_MATH=y -KERNEL_HEADERS="/usr/src/linux/include" -HAVE_DOT_CONFIG=y - -# -# General Library Settings -# -# HAVE_NO_PIC is not set -DOPIC=y -# HAVE_NO_SHARED is not set -# ARCH_HAS_NO_LDSO is not set -HAVE_SHARED=y -# FORCE_SHAREABLE_TEXT_SEGMENTS is not set -LDSO_LDD_SUPPORT=y -LDSO_CACHE_SUPPORT=y -# LDSO_PRELOAD_FILE_SUPPORT is not set -LDSO_BASE_FILENAME="ld.so" -# UCLIBC_STATIC_LDCONFIG is not set -# LDSO_RUNPATH is not set -UCLIBC_CTOR_DTOR=y -# HAS_NO_THREADS is not set -UCLIBC_HAS_THREADS=y -PTHREADS_DEBUG_SUPPORT=y -LINUXTHREADS_OLD=y -UCLIBC_HAS_LFS=y -# MALLOC is not set -# MALLOC_SIMPLE is not set -MALLOC_STANDARD=y -MALLOC_GLIBC_COMPAT=y -UCLIBC_DYNAMIC_ATEXIT=y -# COMPAT_ATEXIT is not set -# UCLIBC_SUSV3_LEGACY is not set -UCLIBC_SUSV3_LEGACY_MACROS=y -UCLIBC_HAS_SHADOW=y -# UCLIBC_HAS_PROGRAM_INVOCATION_NAME is not set -UCLIBC_HAS___PROGNAME=y -# UNIX98PTY_ONLY is not set -ASSUME_DEVPTS=y -UCLIBC_HAS_TM_EXTENSIONS=y -UCLIBC_HAS_TZ_CACHING=y -UCLIBC_HAS_TZ_FILE=y -UCLIBC_HAS_TZ_FILE_READ_MANY=y -UCLIBC_TZ_FILE_PATH="/etc/TZ" - -# -# Advanced Library Settings -# -UCLIBC_PWD_BUFFER_SIZE=256 -UCLIBC_GRP_BUFFER_SIZE=256 - -# -# Networking Support -# -UCLIBC_HAS_IPV6=y -UCLIBC_HAS_RPC=y -UCLIBC_HAS_FULL_RPC=y -UCLIBC_HAS_REENTRANT_RPC=y -# UCLIBC_USE_NETLINK is not set -# UCLIBC_HAS_BSD_RES_CLOSE is not set - -# -# String and Stdio Support -# -UCLIBC_HAS_STRING_GENERIC_OPT=y -UCLIBC_HAS_STRING_ARCH_OPT=y -UCLIBC_HAS_CTYPE_TABLES=y -UCLIBC_HAS_CTYPE_SIGNED=y -# UCLIBC_HAS_CTYPE_UNSAFE is not set -UCLIBC_HAS_CTYPE_CHECKED=y -# UCLIBC_HAS_CTYPE_ENFORCED is not set -# UCLIBC_HAS_WCHAR is not set -# UCLIBC_HAS_LOCALE is not set -UCLIBC_HAS_HEXADECIMAL_FLOATS=y -UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y -# USE_OLD_VFPRINTF is not set -UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9 -UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y -# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set -# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set -# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set -# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set -# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set -UCLIBC_HAS_STDIO_BUFSIZ_4096=y -# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set -UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y -# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set -# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set -# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set -UCLIBC_HAS_STDIO_GETC_MACRO=y -UCLIBC_HAS_STDIO_PUTC_MACRO=y -UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y -# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set -UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y -UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y -UCLIBC_HAS_PRINTF_M_SPEC=y -UCLIBC_HAS_ERRNO_MESSAGES=y -# UCLIBC_HAS_SYS_ERRLIST is not set -UCLIBC_HAS_SIGNUM_MESSAGES=y -# UCLIBC_HAS_SYS_SIGLIST is not set -UCLIBC_HAS_GNU_GETOPT=y -UCLIBC_HAS_GNU_GETSUBOPT=y - -# -# Big and Tall -# -UCLIBC_HAS_REGEX=y -UCLIBC_HAS_REGEX_OLD=y -UCLIBC_HAS_FNMATCH=y -UCLIBC_HAS_FNMATCH_OLD=y -# UCLIBC_HAS_WORDEXP is not set -UCLIBC_HAS_FTW=y -UCLIBC_HAS_GLOB=y -UCLIBC_HAS_GNU_GLOB=y - -# -# Library Installation Options -# -SHARED_LIB_LOADER_PREFIX="/lib" -RUNTIME_PREFIX="/" -DEVEL_PREFIX="/usr/" - -# -# Security options -# -# UCLIBC_HAS_ARC4RANDOM is not set -# HAVE_NO_SSP is not set -# UCLIBC_HAS_SSP is not set -UCLIBC_BUILD_RELRO=y -UCLIBC_BUILD_NOW=y -# UCLIBC_BUILD_NOEXECSTACK is not set - -# -# uClibc development/debugging options -# -CROSS_COMPILER_PREFIX="" -UCLIBC_EXTRA_CFLAGS="" -# DODEBUG is not set -# DOSTRIP is not set -# DODEBUG_PT is not set -# DOASSERTS is not set -SUPPORT_LD_DEBUG=y -# SUPPORT_LD_DEBUG_EARLY is not set -# UCLIBC_MALLOC_DEBUGGING is not set -WARNINGS="-Wall" -EXTRA_WARNINGS=y -# DOMULTI is not set -# UCLIBC_MJN3_ONLY is not set diff --git a/target/xtensa/xt-buildroot-overlay-install b/target/xtensa/xt-buildroot-overlay-install deleted file mode 100644 index d2afce124a..0000000000 --- a/target/xtensa/xt-buildroot-overlay-install +++ /dev/null @@ -1,488 +0,0 @@ -#!/bin/sh -# Not every host installs perl at the same location, handle many locations: -PATH=/usr/bin:/usr/local/bin:$PATH -exec perl -x -S $0 ${1+"$@"} -exit $? -#!perl -w -#line 8 - -# xt-buildroot-overlay-install [-t overlay_tarball] [-b buildroot_dir] \ -# [-k kernel_dir] \ -# [-c config_name] [-l long_name] [-f] [--help] -# -# Creates individual overlay tarballs for gcc, binutils, gdb, and -# the Linux kernel, out of the Xtensa Configuration Overlay tarball from -# a Tensilica Core Package. And installs these individual tarballs -# at the appropriate locations within a buildroot source tree. -# -# The Xtensa configuration overlay tarball is located in: -# /src/xtensa-config-overlay.tar.gz -# where is the path to the Tensilica Core Package. -# -# Copyright (c) 2003-2009 by Tensilica Inc. -# History: -# 2007-NOV-08 1.0 meg Initial version -# 2007-NOV-21 1.1 meg Add -k parameter -# 2007-DEC-06 1.2 meg Make -k and -b optional, check overlay sw vers. -# 2008-FEB-27 1.3 meg Accept Xtensa Tools RB-2008.3 overlays - -$progvers = "1.3"; -$progname = $0; -$progname =~ s|.*[/\\:]||; - - -###################################################################### -# -# Parse cmdline -# - -my $overlay_tarball = undef; -my $buildroot_dir = undef; -my $kernel_dir = undef; -my $config_name = undef; -my $config_long_name = undef; -my $force_clobber = 0; -my $prompt = 1; # undocumented option - -sub usage { - print "$progname version $progvers\n" - ."Usage: $progname []\n" - ."Where are:\n" - ." -t file.tgz Specify path to the Xtensa Linux overlay tarball, typically\n" - ." /src/xtensa-config-overlay.tar.gz\n" - ." -b dir Path to the base of the buildroot source tree, in which\n" - ." package specific overlay tarballs get installed.\n" - ." -k dir Path to the base of the Linux kernel source tree, in which\n" - ." the Linux kernel specific overlay gets installed.\n" - ." -c config_name Name for the Xtensa processor configuration as it will be\n" - ." known to the open source community. Must be a lowercase\n" - ." identifier, starting with a letter, consisting of letters\n" - ." and numbers and underscores, not ending with underscore\n" - ." and not containing consecutive underscores. For examples:\n" - ." dc232b , dc232b_be , mmubasele , fsf , s5000 .\n" - ." -l long_name Long name for the Xtensa processor configuration, human-\n" - ." readable with spaces etc allowed (must be quoted).\n" - ." For example: 'Diamond 232L Standard Core Rev.B (LE)'\n" - ." Try to keep it within approximately 40 characters.\n" - ."And are:\n" - ." -f If package specific overlay tarballs already exist in\n" - ." the destination source tree, overwrite them without asking.\n" - ." --help Show this usage message.\n"; -} - -# Get arguments: -if (!@ARGV) { - usage(); - exit 0; -} -while( defined($_ = shift) ) { - if( /^-[tbclk]$/ ) { # option taking an argument - my $arg = shift; - if( !defined($arg) ) { - print STDERR "$progname: ERROR: missing parameter after '$_' option\n\n"; - usage(); - exit 1; - } - $overlay_tarball = $arg if $_ eq "-t"; - $buildroot_dir = $arg if $_ eq "-b"; - $kernel_dir = $arg if $_ eq "-k"; - $config_name = $arg if $_ eq "-c"; - $config_long_name = $arg if $_ eq "-l"; - next; - } - if( /^-f$/ ) { - $force_clobber = 1; - next; - } - if( /^--[m-t]{8}$/ && /[new]([wow])([pup])[fur]\1[maze]\2[tuff]/ ) { - $prompt = 0; - next; - } - if( /^-(h|help|\-h|\-help|\?)$/i ) { - usage(); - exit 0; - } - print STDERR "$progname: ERROR: unrecognized option or argument '$_'\n\n"; - usage(); - exit 1; -} - - -###################################################################### -# -# Validate cmdline arguments -# - -ErrorU("missing -c argument (core name)") - unless defined($config_name); -# Try to enforce reasonable names: -ErrorU("-c: malformed core name '$config_name' (must be lowercase, letter followed by letters/digits, may contain underscore separators)") - unless $config_name =~ /^[a-z][a-z0-9]*(_[a-z0-9]+)*$/; -ErrorU("-c: core name too short '$config_name'") - unless length($config_name) >= 2; -ErrorU("-c: core name too long '$config_name'") - unless length($config_name) <= 16; - - -ErrorU("missing -l argument (core long name)") - unless defined($config_long_name); -$config_long_name =~ s/^\s+//; # trim extra whitespace... -$config_long_name =~ s/\s+$//; -$config_long_name =~ s/\s+/ /g; -# Try to enforce reasonable names: -ErrorU("-l: invalid (non-ASCII-printable) characters in core long name '$config_long_name'") - unless $config_long_name =~ /^[\x20-\x7E]+$/; -ErrorU("-l: disallowed characters (\"\'\\) in core long name '$config_long_name'") - if $config_long_name =~ /[\'\"\\]/; -ErrorU("-l: core long name too short '$config_long_name'") - unless length($config_long_name) >= 5; -ErrorU("-l: core long name too long '$config_long_name'") - unless length($config_long_name) <= 60; - - -#ErrorU("missing -b argument (buildroot source tree directory)") -# unless defined($buildroot_dir); -if (defined($buildroot_dir)) { - ErrorU("-b: not a directory: $buildroot_dir") - unless -d $buildroot_dir; - foreach my $p ("toolchain/gcc", "toolchain/binutils", "toolchain/gdb", "target/xtensa") { - ErrorU("-b: not a buildroot directory: missing $buildroot_dir/$p") - unless -d $buildroot_dir . "/" . $p; - } -} - - -#ErrorU("missing -k argument (Linux kernel source tree directory)") -# unless defined($kernel_dir); -if (defined($kernel_dir)) { - ErrorU("-k: not a directory: $kernel_dir") - unless -d $kernel_dir; - foreach my $p ("kernel", "arch/xtensa/kernel", "include/asm-xtensa") { - ErrorU("-k: not a Linux kernel directory: missing $kernel_dir/$p") - unless -d $kernel_dir . "/" . $p; - } -} - - -if (!defined($buildroot_dir) and !defined($kernel_dir)) { - print STDERR "$progname: WARNING:\n"; - print STDERR "$progname: WARNING: Test run only, NOTHING WILL BE INSTALLED\n"; - print STDERR "$progname: WARNING: (use -b and -k to specify install destination)\n"; - print STDERR "$progname: WARNING:\n"; -} - - -my @ovpaths = ( "/src/xtensa-config-overlay.tar.gz", - "/xtensa-elf/src/linux/misc/linux-overlay.tar.gz" ); -if (!defined($overlay_tarball)) { - # Try to locate the overlay tarball based on XTENSA_SYSTEM and XTENSA_CORE - # settings: - my $xtensa_root = `xt-xcc --show-config=config 2>/dev/null`; - $xtensa_root = "" unless defined($xtensa_root); - chomp($xtensa_root); - if ($xtensa_root ne "") { - ($overlay_tarball) = grep(-f $xtensa_root.$_, @ovpaths); - if (!defined($overlay_tarball)) { - ErrorU("Xtensa configuration overlay tarball not found: ".$xtensa_root.$ovpaths[0]) - } - } else { - ErrorU("missing -t argument (Xtensa configuration overlay tarball filename)\n" - ."and no default Xtensa Core Package defined in the environment"); - } -} else { - foreach my $p ("", @ovpaths) { - if (-f $overlay_tarball.$p) { - $overlay_tarball .= $p; - last; - } - } - ErrorU("-t: file not found: $overlay_tarball") unless -f $overlay_tarball; -} - - -###################################################################### -# -# Misc -# - -my $overlay_unpacked = 0; -my $ovdir; - -sub cleanup { - if ($overlay_unpacked) { - system("rm -rf '$ovdir' 2>/dev/null"); - } -} - -sub ErrorEmit { - my ($msg,$usage) = @_; - $msg =~ s|\n|"\n${progname}: ERROR: "|ge; - print STDERR "$progname: ERROR: $msg\n"; - if ($usage) { - print "\n"; - usage(); - } - cleanup(); - exit 1; -} -sub ErrorU { ErrorEmit(shift,1); } -sub Error { ErrorEmit(shift); } - - -# Read specified file (as binary), returning contents. -# -sub readfile { - my ($filename) = @_; - # Read the file: - open(INFILE,"<$filename") or Error("error reading from '$filename': $!"); - my $savesep = $/; - undef $/; - my $file = ; - $/ = $savesep; - close(INFILE); - $file; -} - -# Write specified file (as binary) with first argument (string). -# -sub writefile { - my ($filename, $file) = @_; - # Read the file: - open(INFILE,">$filename") or Error("error writing to '$filename': $!"); - print INFILE $file; - close(INFILE) or Error("error closing file '$filename': $!"); -} - - -###################################################################### -# -# Determine a temporary directory. -# - -my $tmpdir = "/tmp"; -if (defined($ENV{"TMP"}) and -d $ENV{"TMP"}) { - $tmpdir = $ENV{"TMP"}; -} elsif (defined($ENV{"TEMP"}) and -d $ENV{"TEMP"}) { - $tmpdir = $ENV{"TEMP"}; -} - - -###################################################################### -# -# Unpack the general overlay tarball -# - -my $user = defined($ENV{"USER"}) ? $ENV{"USER"} : "xtensa"; -$ovdir = $tmpdir."/tmp-overlay-${user}-$$"; -mkdir $ovdir or Error("cannot create directory $ovdir"); -$overlay_unpacked = 1; -system("tar xfz '$overlay_tarball' -C '$ovdir'") - and Error("tar failed..."); - - -###################################################################### -# -# Define and sanity check contents of overlay -# - -my $oldpack = -f $ovdir."/xtensa-elf/src/linux/misc/core.h"; -my $pf1 = ($oldpack ? "src/" : ""); -my $pf2 = ($oldpack ? "xtensa-elf/src/linux/misc/" : "config/"); - -my @packages = ( - ["binutils", "toolchain/binutils", - ["${pf1}/binutils/xtensa-modules.c", "bfd/"], - ["${pf1}/binutils/xtensa-config.h", "include/"], - #["${pf1}/binutils/xtensa-config.sh", "ld/emulparams/"], - ], - ["gcc", "toolchain/gcc", - ["${pf1}/gcc/xtensa-config.h", "include/"], - ], - ["gdb", "toolchain/gdb", - ["${pf1}/gdb/xtensa-modules.c", "bfd/"], - ["${pf1}/gdb/xtensa-config.h", "include/"], - ["${pf1}/gdb/xtensa-config.c", "gdb/"], - ["${pf1}/gdb/xtensa-regmap.c", "gdb/gdbserver/"], - ["${pf1}/gdb/xtensa-regmap.c", "gdb/gdbserver/xtensa-xtregs.c"], # for GDB 6.8 - ["${pf1}/gdb/xtensa-regmap.c", "gdb/xtensa-xtregs.c"], # for GDB 6.8 - ["${pf1}/gdb/reg-xtensa.dat", "gdb/regformats/"], - ], - ["kernel", "target/xtensa", # ??? - ["${pf2}core.h", "include/asm-xtensa/variant-${config_name}/"], - ["${pf2}tie.h", "include/asm-xtensa/variant-${config_name}/"], - ["${pf2}tie-asm.h", "include/asm-xtensa/variant-${config_name}/"], - ], -); - -# Check that all files are present ... -foreach my $pack (@packages) { - my ($pname, $buildroot_subdir, @files) = @$pack; - print "Checking files for $pname ...\n"; - foreach my $f (@files) { - my ($src, $dst) = @$f; - -f $ovdir."/".$src or Error("missing '$src' in overlay tarball"); - } -} - - -###################################################################### -# -# Extract some useful information -# - -# Extract core name as specified in the build. -my $coreh = readfile($ovdir."/".$pf2."core.h"); - -$coreh =~ /^\s*\#\s*define\s+XCHAL_SW_VERSION\s+(\w+)/m; -my $swversion = $1; -defined($swversion) or Error("missing XCHAL_SW_VERSION in overlay core.h file;\n" - ."overlay is too old, need RB-2008.3 (SW version 7.1.1) or later"); - -$coreh =~ /^\s*\#\s*define\s+XCHAL_CORE_ID\s+"([^"]+)"/m; -my $coreid = $1; -defined($coreid) or Error("missing XCHAL_CORE_ID in overlay core.h file"); - -$coreh =~ /^\s*\#\s*define\s+XCHAL_HW_VERSION_NAME\s+"([^"]+)"/m; -my $hwversion = $1; -defined($hwversion) or Error("missing XCHAL_HW_VERSION_NAME in overlay core.h file"); - - -$swvers_human = sprintf("%u.%u.%u", - $swversion/100000, (($swversion/1000) % 100), ($swversion % 1000)); -my $release = "software version $swvers_human"; -if (-f $ovdir."/release") { - $release = readfile($ovdir."/release"); - chomp($release); -} - - -###################################################################### -# -# Prompt user to be sure this is what he wants to do -# - -# Catch Ctrl-C so we can do a proper cleanup: -sub catch_term { - my $signame = shift; - #print STDERR "whoa!\n"; - cleanup(); - print STDERR "\n$progname: Cleaned up.\n"; - exit 3; -} -$SIG{TERM} = \&catch_term; -$SIG{HUP} = \&catch_term; -$SIG{INT} = \&catch_term; - -$| = 1; -print "\n", - "About to generate package-specific overlay tarballs for the following:\n", - "\n", - " Xtensa processor short name: $config_name\n"; -print " This short name overrides the name specified in the XPG: $coreid\n" if $coreid ne $config_name; -#print " Please ensure that's the name you want. If submitted to the open source\n", -# " community, it can be a hassle to change later on.\n"; -print " Xtensa processor description: $config_long_name\n", - " Targeting Xtensa HW version: $hwversion\n", - " Xtensa configuration overlay: $overlay_tarball\n", - " (release of overlay): $release\n", - " Destination buildroot dir: ".(defined($buildroot_dir)?$buildroot_dir:"(none, not installed)")."\n", - " Destination Linux kernel dir: ".(defined($kernel_dir)?$kernel_dir:"(none, not installed)")."\n", - "\n", - "Are you sure? (y/n) "; -if ($prompt) { - my $line = ; - chomp($line); - if ($line !~ /^y(es)?$/i) { - print "\nInstallation aborted.\n"; - cleanup(); - exit 2; - } -} else { - print "YES [no prompt]\n"; -} -print "\n"; - - -###################################################################### -# -# Now generate the tarballs -# - -# Now generate each tarball ... -foreach my $pack (@packages) { - my ($pname, $buildroot_subdir, @files) = @$pack; - my $tarname = "${pname}-xtensa_${config_name}.tgz"; - my $fulltarname; - if (defined($buildroot_dir)) { - my $tarsubname = $buildroot_subdir . "/" . $tarname; - print "Generating and installing $tarsubname ...\n"; - $fulltarname = $buildroot_dir . "/" . $tarsubname; - } else { - print "Generating $tarname ...\n"; - $fulltarname = $ovdir . "/" . $tarname; - } - if (-e $fulltarname) { - if ($force_clobber or !defined($buildroot_dir)) { - unlink($fulltarname) or Error("could not delete '$fulltarname': $!"); - } else { - Error("destination tarball already exists: '$fulltarname'"); - } - } - my $pdir = $ovdir."/tmp-".$pname; - system("rm -fr '${pdir}' 2>/dev/null"); - mkdir $pdir or Error("cannot create directory $pdir"); - foreach my $f (@files) { - my ($src, $dst) = @$f; - # If $dst ends in / , take filename from $src : - if ($dst =~ m|/$|) { - my $fname = $src; - $fname =~ s|^.*/||; - $dst .= $fname; - } - # Ensure destination directory exists: - my $dstdir = $pdir; - while ($dst =~ s|^([^/]+)/+||) { - $dstdir .= "/" . $1; - mkdir($dstdir); - } - # Read file: - my $content = readfile($ovdir."/".$src); - - # Adjust contents of file. - # Fix-up typo: - $content =~ s/XCHAL_SA_(NCP|CP\d+)_/XCHAL_$1_SA_/g; - # Update core name info: - my $iscore = ($content =~ s/^(\s*\#\s*define\s+XCHAL_CORE_ID\s+)"[^"]+"/$1"$config_name"/mg); - $iscore or $content =~ s{^(\s*\#\s*define\s+XCHAL_INST_FETCH_WIDTH\s+\S+\s*(/\*[^\*]*\*/)?\s*$)} - {$1\n\#undef XCHAL_CORE_ID\n\#define XCHAL_CORE_ID\t\t\t"$config_name"\n}smg; - # Update core description info: - $content =~ s/^(\s*\#\s*define\s+XCHAL_CORE_DESCRIPTION\s+)"[^"]+"/$1"$config_long_name"/mg - or $content =~ s{^(\s*\#\s*define\s+XCHAL_CORE_ID\s+\S+\s*(/\*[^\*]*\*/)?\s*$)} - {"$1\n" . ($iscore ? "" : "\n\#undef XCHAL_CORE_DESCRIPTION\n") - . "\#define XCHAL_CORE_DESCRIPTION\t\t\"${config_long_name}\""}smge; - - # Write (possibly modified) file: - writefile($dstdir."/".$dst, $content); - } - my $tarcmd = "tar cfz '${fulltarname}' -C '${pdir}' ."; - system($tarcmd) and Error("failed executing: $tarcmd"); - - # Install Linux kernel overlay: - if ($pname eq "kernel" and defined($kernel_dir)) { - print "Installing Linux kernel overlay from $tarname ...\n"; - my $untarcmd = "tar xfz '${fulltarname}' -C '${kernel_dir}' ."; - system($untarcmd) and Error("failed executing: $tarcmd"); - } - # Possible TODO: update arch/xtensa/{Kconfig,Makefile} to add this config? -} - - -###################################################################### -# -# The End -# - -cleanup(); -print "Done.\n"; -exit 0; - diff --git a/toolchain/Config.in b/toolchain/Config.in index 8baa0c14ca..3980d790a4 100644 --- a/toolchain/Config.in +++ b/toolchain/Config.in @@ -1,4 +1,29 @@ menu "Toolchain" + +# Should be selected for glibc or eglibc +config BR2_TOOLCHAIN_USES_GLIBC + bool + select BR2_LARGEFILE + select BR2_INET_IPV6 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS + select BR2_TOOLCHAIN_HAS_SSP + +config BR2_TOOLCHAIN_USES_UCLIBC + bool + +config BR2_TOOLCHAIN_USES_MUSL + bool + select BR2_LARGEFILE + select BR2_INET_IPV6 + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + choice prompt "Toolchain type" help @@ -10,6 +35,8 @@ choice config BR2_TOOLCHAIN_BUILDROOT bool "Buildroot toolchain" + depends on !BR2_microblaze && !BR2_aarch64 && !BR2_nios2 + select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS config BR2_TOOLCHAIN_EXTERNAL bool "External toolchain" @@ -18,20 +45,10 @@ config BR2_TOOLCHAIN_EXTERNAL toolchain. Buildroot can either download automatically a toolchain, or use an already installed toolchain. -config BR2_TOOLCHAIN_CTNG - bool "Crosstool-NG toolchain" - help - Say 'y' if you want to generate the toolchain with crosstool-NG - ( http://ymorin.is-a-geek.org/projects/crosstool ) - - This is considered experimental, and you can expect some breakage. - endchoice source "toolchain/toolchain-buildroot/Config.in" source "toolchain/toolchain-external/Config.in" -source "toolchain/toolchain-crosstool-ng/Config.in" source "toolchain/toolchain-common.in" -source "toolchain/toolchain-buildroot/Config.in.2" endmenu diff --git a/toolchain/Makefile.in b/toolchain/Makefile.in deleted file mode 100644 index a7ca5589e4..0000000000 --- a/toolchain/Makefile.in +++ /dev/null @@ -1,6 +0,0 @@ -BR2_CONFIGURE_DEVEL_SYSROOT=--with-sysroot=$(TOOLCHAIN_DIR)/uClibc_dev/ -BR2_CONFIGURE_STAGING_SYSROOT=--with-sysroot=$(STAGING_DIR) -BR2_CONFIGURE_BUILD_TOOLS=--with-build-time-tools=$(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/bin - -# gcc has a bunch of needed stuff.... -include toolchain/gcc/Makefile.in diff --git a/toolchain/dependencies/check-host-lzma.sh b/toolchain/dependencies/check-host-lzma.sh deleted file mode 100755 index 34e8f03792..0000000000 --- a/toolchain/dependencies/check-host-lzma.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -ok="" - -for bin in /usr/bin/lzma $LZMA -do -# TODO: add check for proper functionality here.. - $bin --version > /dev/null 2>&1 && ok="$bin" - if test "x$ok" != "x" ; then - break - fi -done -echo "$ok" diff --git a/toolchain/dependencies/dependencies.mk b/toolchain/dependencies/dependencies.mk deleted file mode 100644 index 6eac05df8d..0000000000 --- a/toolchain/dependencies/dependencies.mk +++ /dev/null @@ -1,39 +0,0 @@ -###################################################################### -# -# Check buildroot dependencies and bail out if the user's -# system is judged to be lacking.... -# -###################################################################### - -DEPENDENCIES_HOST_PREREQ:= -ifeq ($(BR2_STRIP_sstrip),y) -DEPENDENCIES_HOST_PREREQ+=host-sstrip -endif - -# Remove duplicate entries from $(DL_TOOLS_DEPENDENCIES) -DL_TOOLS = \ - $(findstring svn,$(DL_TOOLS_DEPENDENCIES)) \ - $(findstring git,$(DL_TOOLS_DEPENDENCIES)) \ - $(findstring bzr,$(DL_TOOLS_DEPENDENCIES)) - -dependencies: $(DEPENDENCIES_HOST_PREREQ) - @HOSTCC="$(firstword $(HOSTCC))" MAKE="$(MAKE)" \ - CONFIG_FILE="$(CONFIG_DIR)/.config" \ - DL_TOOLS="$(DL_TOOLS)" \ - $(TOPDIR)/toolchain/dependencies/dependencies.sh - -dependencies-source: - -dependencies-clean: - rm -f $(SSTRIP_TARGET) - -dependencies-dirclean: - true - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -.PHONY: dependencies - diff --git a/toolchain/dependencies/dependencies.sh b/toolchain/dependencies/dependencies.sh deleted file mode 100755 index 74ab2137ab..0000000000 --- a/toolchain/dependencies/dependencies.sh +++ /dev/null @@ -1,152 +0,0 @@ -#!/bin/sh -# vi: set sw=4 ts=4: -#set -x - -export LC_ALL=C - -# Verify that grep works -echo "WORKS" | grep "WORKS" >/dev/null 2>&1 -if test $? != 0 ; then - /bin/echo -e "\ngrep doesn't work\n" - exit 1 -fi - -# sanity check for CWD in LD_LIBRARY_PATH -# try not to rely on egrep.. -if test -n "$LD_LIBRARY_PATH" ; then - /bin/echo TRiGGER_start"$LD_LIBRARY_PATH"TRiGGER_end | /bin/grep ':\.:' >/dev/null 2>&1 || - /bin/echo TRiGGER_start"$LD_LIBRARY_PATH"TRiGGER_end | /bin/grep 'TRiGGER_start\.:' >/dev/null 2>&1 || - /bin/echo TRiGGER_start"$LD_LIBRARY_PATH"TRiGGER_end | /bin/grep ':\.TRiGGER_end' >/dev/null 2>&1 || - /bin/echo TRiGGER_start"$LD_LIBRARY_PATH"TRiGGER_end | /bin/grep 'TRiGGER_start\.TRiGGER_end' >/dev/null 2>&1 - if test $? = 0; then - /bin/echo -e "\nYou seem to have the current working directory in your" - /bin/echo -e "LD_LIBRARY_PATH environment variable. This doesn't work.\n" - exit 1; - fi -fi; - -# sanity check for CWD in PATH. Having the current working directory -# in the PATH makes the toolchain build process break. -# try not to rely on egrep.. -if test -n "$PATH" ; then - /bin/echo TRiGGER_start"$PATH"TRiGGER_end | /bin/grep ':\.:' >/dev/null 2>&1 || - /bin/echo TRiGGER_start"$PATH"TRiGGER_end | /bin/grep 'TRiGGER_start\.:' >/dev/null 2>&1 || - /bin/echo TRiGGER_start"$PATH"TRiGGER_end | /bin/grep ':\.TRiGGER_end' >/dev/null 2>&1 || - /bin/echo TRiGGER_start"$PATH"TRiGGER_end | /bin/grep 'TRiGGER_start\.TRiGGER_end' >/dev/null 2>&1 - if test $? = 0; then - /bin/echo -e "\nYou seem to have the current working directory in your" - /bin/echo -e "PATH environment variable. This doesn't work.\n" - exit 1; - fi -fi; - -# Verify that which is installed -if ! which which > /dev/null ; then - /bin/echo -e "\nYou must install 'which' on your build machine\n"; - exit 1; -fi; - -if ! which sed > /dev/null ; then - /bin/echo -e "\nYou must install 'sed' on your build machine\n" - exit 1 -fi - -# Check make -MAKE=$(which make 2> /dev/null) -if [ -z "$MAKE" ] ; then - /bin/echo -e "\nYou must install 'make' on your build machine\n"; - exit 1; -fi; -MAKE_VERSION=$($MAKE --version 2>&1 | sed -e 's/^.* \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q') -if [ -z "$MAKE_VERSION" ] ; then - /bin/echo -e "\nYou must install 'make' on your build machine\n"; - exit 1; -fi; -MAKE_MAJOR=$(echo $MAKE_VERSION | sed -e "s/\..*//g") -MAKE_MINOR=$(echo $MAKE_VERSION | sed -e "s/^$MAKE_MAJOR\.//g" -e "s/\..*//g" -e "s/[a-zA-Z].*//g") -if [ $MAKE_MAJOR -lt 3 ] || [ $MAKE_MAJOR -eq 3 -a $MAKE_MINOR -lt 81 ] ; then - /bin/echo -e "\nYou have make '$MAKE_VERSION' installed. GNU make >=3.81 is required\n" - exit 1; -fi; - -# Check host gcc -COMPILER=$(which $HOSTCC_NOCCACHE 2> /dev/null) -if [ -z "$COMPILER" ] ; then - COMPILER=$(which cc 2> /dev/null) -fi; -if [ -z "$COMPILER" ] ; then - /bin/echo -e "\nYou must install 'gcc' on your build machine\n"; - exit 1; -fi; - -COMPILER_VERSION=$($COMPILER -v 2>&1 | sed -n '/^gcc version/p' | - sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q') -if [ -z "$COMPILER_VERSION" ] ; then - /bin/echo -e "\nYou must install 'gcc' on your build machine\n"; - exit 1; -fi; -COMPILER_MAJOR=$(echo $COMPILER_VERSION | sed -e "s/\..*//g") -COMPILER_MINOR=$(echo $COMPILER_VERSION | sed -e "s/^$COMPILER_MAJOR\.//g" -e "s/\..*//g") -if [ $COMPILER_MAJOR -lt 3 -o $COMPILER_MAJOR -eq 2 -a $COMPILER_MINOR -lt 95 ] ; then - echo "\nYou have gcc '$COMPILER_VERSION' installed. gcc >= 2.95 is required\n" - exit 1; -fi; - -# check for host CXX -CXXCOMPILER=$(which $HOSTCXX 2> /dev/null) -if [ -z "$CXXCOMPILER" ] ; then - CXXCOMPILER=$(which c++ 2> /dev/null) -fi -if [ -z "$CXXCOMPILER" ] ; then - /bin/echo -e "\nYou may have to install 'g++' on your build machine\n" - #exit 1 -fi -if [ ! -z "$CXXCOMPILER" ] ; then - CXXCOMPILER_VERSION=$($CXXCOMPILER -v 2>&1 | sed -n '/^gcc version/p' | - sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q') - if [ -z "$CXXCOMPILER_VERSION" ] ; then - /bin/echo -e "\nYou may have to install 'g++' on your build machine\n" - fi - - CXXCOMPILER_MAJOR=$(echo $CXXCOMPILER_VERSION | sed -e "s/\..*//g") - CXXCOMPILER_MINOR=$(echo $CXXCOMPILER_VERSION | sed -e "s/^$CXXCOMPILER_MAJOR\.//g" -e "s/\..*//g") - if [ $CXXCOMPILER_MAJOR -lt 3 -o $CXXCOMPILER_MAJOR -eq 2 -a $CXXCOMPILER_MINOR -lt 95 ] ; then - /bin/echo -e "\nYou have g++ '$CXXCOMPILER_VERSION' installed. g++ >= 2.95 is required\n" - exit 1 - fi -fi - -# Check bash -if ! $SHELL --version 2>&1 | grep -q '^GNU bash'; then - /bin/echo -e "\nYou must install 'bash' on your build machine\n"; - exit 1; -fi; - -# Check that a few mandatory programs are installed -for prog in awk bison flex msgfmt makeinfo patch gzip bzip2 perl tar wget cpio python unzip ${DL_TOOLS} ; do - if ! which $prog > /dev/null ; then - /bin/echo -e "\nYou must install '$prog' on your build machine"; - if test $prog = "makeinfo" ; then - /bin/echo -e "makeinfo is usually part of the texinfo package in your distribution\n" - elif test $prog = "msgfmt" ; then - /bin/echo -e "msgfmt is usually part of the gettext package in your distribution\n" - elif test $prog = "svn" ; then - /bin/echo -e "svn is usually part of the subversion package in your distribution\n" - else - /bin/echo -e "\n" - fi - exit 1; - fi -done - -if grep ^BR2_TOOLCHAIN_BUILDROOT=y $CONFIG_FILE > /dev/null && \ - grep ^BR2_ENABLE_LOCALE=y $CONFIG_FILE > /dev/null ; then - if ! which locale > /dev/null ; then - /bin/echo -e "\nYou need locale support on your build machine to build a toolchain supporting locales\n" - exit 1 ; - fi - if ! locale -a | grep -i utf8$ ; then - /bin/echo -e "\nYou need at least one UTF8 locale to build a toolchain supporting locales\n" - exit 1 ; - fi -fi diff --git a/toolchain/elf2flt/Config.in b/toolchain/elf2flt/Config.in deleted file mode 100644 index b4e450a646..0000000000 --- a/toolchain/elf2flt/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_ELF2FLT - bool "Enable elf2flt support?" - depends on BR2_arm || BR2_sh || BR2_sparc - help - uCLinux uses a Binary Flat format commonly known as BFLT. It - is a relatively simple and lightweight executable format - based on the original a.out format. - - This option compiles the required tools and makes the required - modifications on your toolchain (linker). diff --git a/toolchain/elf2flt/elf2flt.mk b/toolchain/elf2flt/elf2flt.mk deleted file mode 100644 index 7fecf3ea8b..0000000000 --- a/toolchain/elf2flt/elf2flt.mk +++ /dev/null @@ -1,49 +0,0 @@ -############################################################# -# -# elf2flt -# -############################################################# - -# we keep a local checkout of uClinux CVS -ELF2FLT_SOURCE:=$(ELF2FLT_DIR)/elf2flt -ELF2FLT_DIR:=$(TOOLCHAIN_DIR)/elf2flt -ELF2FLT_BINARY:=elf2flt - -$(ELF2FLT_DIR)/.unpacked: - cp -r toolchain/elf2flt/elf2flt "$(TOOLCHAIN_DIR)/elf2flt" - touch $@ - -$(ELF2FLT_DIR)/.patched: $(ELF2FLT_DIR)/.unpacked - $(CONFIG_UPDATE) $(@D) - touch $@ - -$(ELF2FLT_DIR)/.configured: $(ELF2FLT_DIR)/.patched - (cd $(ELF2FLT_DIR); rm -rf config.cache; \ - LDFLAGS=-lz \ - $(ELF2FLT_DIR)/configure $(QUIET) \ - --with-bfd-include-dir=$(BINUTILS_DIR1)/bfd/ \ - --with-binutils-include-dir=$(BINUTILS_DIR)/include/ \ - --target=$(REAL_GNU_TARGET_NAME) \ - --with-libbfd=$(BINUTILS_DIR1)/bfd/libbfd.a \ - --with-libiberty=$(BINUTILS_DIR1)/libiberty/libiberty.a \ - --prefix=$(STAGING_DIR)/usr) - touch $@ - -$(ELF2FLT_DIR)/$(ELF2FLT_BINARY): $(ELF2FLT_DIR)/.configured - $(MAKE) -C $(ELF2FLT_DIR) all - $(MAKE) -C $(ELF2FLT_DIR) install - ln -snf $(REAL_GNU_TARGET_NAME)-elf2flt $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-elf2flt - ln -snf $(REAL_GNU_TARGET_NAME)-flthdr $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-flthdr - ln -snf $(REAL_GNU_TARGET_NAME)-ld.real $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-ld.real - -elf2flt: uclibc_target uclibc-configured binutils gcc $(ELF2FLT_DIR)/$(ELF2FLT_BINARY) - -elf2flt-clean: - rm -rf $(ELF2FLT_SOURCE) - -elf2flt-dirclean: - rm -rf $(ELF2FLT_SOURCE) - -ifeq ($(BR2_ELF2FLT),y) -TARGETS+=elf2flt -endif diff --git a/toolchain/elf2flt/elf2flt/.cvsignore b/toolchain/elf2flt/elf2flt/.cvsignore deleted file mode 100644 index 18cff9ae11..0000000000 --- a/toolchain/elf2flt/elf2flt/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -.cvsignore -.svn -maketarball.sh diff --git a/toolchain/elf2flt/elf2flt/CVS/Entries b/toolchain/elf2flt/elf2flt/CVS/Entries deleted file mode 100644 index 1b3750f10c..0000000000 --- a/toolchain/elf2flt/elf2flt/CVS/Entries +++ /dev/null @@ -1,17 +0,0 @@ -/LICENSE.TXT/1.1/Tue Jan 10 04:34:09 2006// -/README/1.5/Tue Jan 10 04:34:09 2006/-ko/ -/config.guess/1.2/Tue Jan 10 04:34:08 2006/-ko/ -/e1-elf2flt.ld/1.1/Tue Jan 10 04:34:09 2006// -/flat.h/1.6/Tue Jan 10 04:34:08 2006/-ko/ -/install-sh/1.1.1.1/Tue Jan 10 04:34:08 2006/-ko/ -/stubs.c/1.1/Tue Jan 10 04:34:08 2006// -/config.sub/1.8/Wed Jan 11 13:36:39 2006/-ko/ -/cygwin-elf.h/1.4/Wed Jan 11 13:36:39 2006// -/Makefile.in/1.17/Result of merge/-ko/ -/configure/1.12/Sun Jan 28 05:27:28 2007/-ko/ -/configure.in/1.10/Sun Jan 28 05:27:28 2007/-ko/ -/elf2flt.c/1.46/Result of merge/-ko/ -/elf2flt.ld/1.15/Sun Jan 28 05:27:28 2007/-ko/ -/flthdr.c/1.10/Sun Jan 28 05:27:28 2007/-ko/ -/ld-elf2flt.in/1.15/Sun Jan 28 05:27:28 2007// -D diff --git a/toolchain/elf2flt/elf2flt/CVS/Repository b/toolchain/elf2flt/elf2flt/CVS/Repository deleted file mode 100644 index 61a695f7c2..0000000000 --- a/toolchain/elf2flt/elf2flt/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -elf2flt diff --git a/toolchain/elf2flt/elf2flt/CVS/Root b/toolchain/elf2flt/elf2flt/CVS/Root deleted file mode 100644 index 0b9f52725e..0000000000 --- a/toolchain/elf2flt/elf2flt/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:pserver:anonymous@cvs.uclinux.org:/var/cvs diff --git a/toolchain/elf2flt/elf2flt/LICENSE.TXT b/toolchain/elf2flt/elf2flt/LICENSE.TXT deleted file mode 100644 index 5b6e7c66c2..0000000000 --- a/toolchain/elf2flt/elf2flt/LICENSE.TXT +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/toolchain/elf2flt/elf2flt/Makefile.in b/toolchain/elf2flt/elf2flt/Makefile.in deleted file mode 100644 index acead9f6f9..0000000000 --- a/toolchain/elf2flt/elf2flt/Makefile.in +++ /dev/null @@ -1,81 +0,0 @@ -srcdir = @srcdir@ -VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -libdir = @libdir@ -includedir = @includedir@ - -CC = @CC@ -CPU = @target_cpu@ -TARGET = @target_alias@ -CFLAGS = @CFLAGS@ -INCLUDES = @bfd_include_dir@ @binutils_include_dir@ -CPPFLAGS = @CPPFLAGS@ -LDFLAGS = @LDFLAGS@ -LIBS = @LIBS@ -INSTALL = @INSTALL@ -DEFS = @DEFS@ -DTARGET_$(CPU) -EXEEXT = @EXEEXT@ -OBJEXT = @OBJEXT@ - -HOST = @host_alias@ - -ifneq (,$(findstring mingw32,$(HOST))) - LIBS := $(LIBS) -lws2_32 -endif - -# force link order under cygwin to avoid getopts / libiberty clash -ifneq ($(strip $(shell gcc -v 2>&1 | grep "cygwin")),) - LIBS := -lcygwin $(LIBS) -endif - -CCFLAGS = $(CFLAGS) $(DEFS) $(INCLUDES) - -LDFILE= elf2flt.ld -ifeq ($(strip $(CPU)),e1) -SRC_LDFILE= $(CPU)-elf2flt.ld -else -SRC_LDFILE= elf2flt.ld -endif - -target_bindir = $(prefix)/$(TARGET)/bin -target_libdir = $(prefix)/$(TARGET)/lib - - -PROG_ELF2FLT = elf2flt$(EXEEXT) -PROG_FLTHDR = flthdr$(EXEEXT) -PROGS = $(PROG_ELF2FLT) $(PROG_FLTHDR) - -all: $(PROGS) - -$(PROG_ELF2FLT): elf2flt.c stubs.c Makefile - $(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $(srcdir)/elf2flt.c $(srcdir)/stubs.c $(LIBS) - -$(PROG_FLTHDR): flthdr.c Makefile - $(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $(srcdir)/flthdr.c $(LIBS) - -clean: - -rm -f $(PROGS) *.$(OBJEXT) - -distclean: clean - -rm -f Makefile config.log config.status config.cache ld-elf2flt - -install: - $(INSTALL) -d $(bindir) - $(INSTALL) -d $(target_bindir) - $(INSTALL) -d $(target_libdir) - $(INSTALL) -m 755 $(PROG_FLTHDR) $(bindir)/$(TARGET)-$(PROG_FLTHDR) - $(INSTALL) -m 755 $(PROG_FLTHDR) $(target_bindir)/$(PROG_FLTHDR) - $(INSTALL) -m 755 $(PROG_ELF2FLT) $(bindir)/$(TARGET)-$(PROG_ELF2FLT) - $(INSTALL) -m 755 $(PROG_ELF2FLT) $(target_bindir)/$(PROG_ELF2FLT) - [ -f $(bindir)/$(TARGET)-ld.real$(EXEEXT) ] || \ - mv $(bindir)/$(TARGET)-ld$(EXEEXT) $(bindir)/$(TARGET)-ld.real$(EXEEXT) - [ -f $(target_bindir)/ld.real$(EXEEXT) ] || \ - mv $(target_bindir)/ld$(EXEEXT) $(target_bindir)/ld.real$(EXEEXT) - $(INSTALL) -m 755 ld-elf2flt $(bindir)/$(TARGET)-ld - $(INSTALL) -m 755 ld-elf2flt $(target_bindir)/ld - $(INSTALL) -m 644 $(srcdir)/$(SRC_LDFILE) $(target_libdir)/$(LDFILE) - - diff --git a/toolchain/elf2flt/elf2flt/README b/toolchain/elf2flt/elf2flt/README deleted file mode 100644 index 6e8a687e10..0000000000 --- a/toolchain/elf2flt/elf2flt/README +++ /dev/null @@ -1,62 +0,0 @@ - -README - elf2flt ----------------- - -Copyright (C) 2001-2003, SnapGear (www.snapgear.com) -davidm@snapgear.com -gerg@snapgear.com - -This is Free Software, under the GNU Public Licence v2 or greater. See -LICENSE.TXT for more details. - -Elf2flt with PIC, ZFLAT and full reloc support. Currently supported -targets include: m68k/ColdFire, ARM, Sparc, NEC v850, MicroBlaze, -h8300 and SuperH. - -COMPILING: - -You need an appropriate libbfd.a and libiberty.a for your target to -build this tool. They are normally part of the binutils package. - -To compile elf2flt do: - - ./configure --target= --with-libbfd= --with-libiberty= - make - make install - -The argument to configure specifies what the target architecture is. -This should be the same target as you used to build the binutils and gcc -cross development tools. The --with-libbfd and --with-libiberty arguments -specify where the libbfd.a and libiberty.a library files are to use. - - -FILES: - -README - this file -configure - autoconf configuration shell script -configure.in- original autoconf file -config.* - autoconf support scripts -Makefile.in - Makefile template used by configure -elf2flt.c - the source -flthdr.c - flat header manipulation program -flat.h - header from uClinux kernel sources -elf2flt.ld - an example linker script that works for C/C++ and uClinux -ld-elf2flt - A linker replacement that implements a -elf2flt option for the - linker and runs elf2flt automatically for you. It auto - detects PIC/non-PIC code and adjusts its option accordingly. - It uses the environment variable FLTFLAGS when running - elf2flt. It runs /.../m68k-elf-ld.real to do the actual - linking. - -TIPS: - -The ld-elf2flt produces 2 files as output. The binary flat file X, and -X.gdb which is used for debugging and PIC purposes. - -The '-p' option requires an elf executable linked at address 0. The -elf2flt.ld provided will generate the correct format binary when linked -with the real linker with *no* '-r' option for the linker. - -The '-r' flag can be added to PIC builds to get contiguous code/data. This -is good for loading application symbols into gdb (add-symbol-file XXX.gdb). - diff --git a/toolchain/elf2flt/elf2flt/config.guess b/toolchain/elf2flt/elf2flt/config.guess deleted file mode 100755 index afcb19c1d7..0000000000 --- a/toolchain/elf2flt/elf2flt/config.guess +++ /dev/null @@ -1,1418 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. - -timestamp='2003-10-16' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; - --version | -v ) - echo "$version" ; exit 0 ;; - --help | --h* | -h ) - echo "$usage"; exit 0 ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - macppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvmeppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mipseb-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit 0 ;; - Alpha*:OpenVMS:*:*) - echo alpha-hp-vms - exit 0 ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit 0 ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit 0 ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit 0;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit 0 ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit 0 ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit 0 ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit 0;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit 0 ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit 0 ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit 0 ;; - DRS?6000:UNIX_SV:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7 && exit 0 ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit 0 ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit 0 ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit 0 ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit 0 ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c \ - && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && exit 0 - echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit 0 ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit 0 ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit 0 ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit 0 ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit 0 ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit 0 ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit 0 ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit 0 ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit 0 ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit 0 ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit 0 ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit 0 ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit 0 ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit 0 ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 - echo rs6000-ibm-aix3.2.5 - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit 0 ;; - *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit 0 ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit 0 ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit 0 ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit 0 ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit 0 ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit 0 ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - # avoid double evaluation of $set_cc_for_build - test -n "$CC_FOR_BUILD" || eval $set_cc_for_build - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit 0 ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 - echo unknown-hitachi-hiuxwe2 - exit 0 ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit 0 ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit 0 ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit 0 ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit 0 ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit 0 ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit 0 ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit 0 ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit 0 ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit 0 ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit 0 ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit 0 ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - *:UNICOS/mp:*:*) - echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - *:FreeBSD:*:*) - # Determine whether the default compiler uses glibc. - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #if __GLIBC__ >= 2 - LIBC=gnu - #else - LIBC= - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - # GNU/KFreeBSD systems have a "k" prefix to indicate we are using - # FreeBSD's kernel, but not the complete OS. - case ${LIBC} in gnu) kernel_only='k' ;; esac - echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} - exit 0 ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; - x86:Interix*:[34]*) - echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' - exit 0 ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit 0 ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit 0 ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit 0 ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit 0 ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit 0 ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit 0 ;; - arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit 0 ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 - ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit 0 ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit 0 ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit 0 ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit 0 ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit 0 ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit 0 ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit 0 ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit 0 ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit 0 ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #ifdef __INTEL_COMPILER - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit 0 ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit 0 ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit 0 ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit 0 ;; - i*86:*:5:[78]*) - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit 0 ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit 0 ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit 0 ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit 0 ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit 0 ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit 0 ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit 0 ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit 0 ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit 0 ;; - M68*:*:R3V[567]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit 0 ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit 0 ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit 0 ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit 0 ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit 0 ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit 0 ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit 0 ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit 0 ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit 0 ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit 0 ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit 0 ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit 0 ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit 0 ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit 0 ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit 0 ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit 0 ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; - *:Darwin:*:*) - case `uname -p` in - *86) UNAME_PROCESSOR=i686 ;; - powerpc) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit 0 ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit 0 ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit 0 ;; - NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit 0 ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit 0 ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit 0 ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit 0 ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit 0 ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit 0 ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit 0 ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit 0 ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit 0 ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit 0 ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit 0 ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit 0 ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit 0 ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - c34*) - echo c34-convex-bsd - exit 0 ;; - c38*) - echo c38-convex-bsd - exit 0 ;; - c4*) - echo c4-convex-bsd - exit 0 ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/toolchain/elf2flt/elf2flt/config.sub b/toolchain/elf2flt/elf2flt/config.sub deleted file mode 100755 index 4279c84913..0000000000 --- a/toolchain/elf2flt/elf2flt/config.sub +++ /dev/null @@ -1,1577 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. - -timestamp='2005-04-22' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; - --version | -v ) - echo "$version" ; exit 0 ;; - --help | --h* | -h ) - echo "$usage"; exit 0 ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit 0;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ - kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | openrisc | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b \ - | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | microblaze \ - | we32k \ - | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m32c) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa-* \ - | ymp-* \ - | z8k-*) - ;; - m32c-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16c) - basic_machine=cr16c-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - or32 | or32-*) - basic_machine=or32-unknown - os=-coff - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/toolchain/elf2flt/elf2flt/configure b/toolchain/elf2flt/elf2flt/configure deleted file mode 100755 index d672662bc6..0000000000 --- a/toolchain/elf2flt/elf2flt/configure +++ /dev/null @@ -1,4719 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59. -# -# Copyright (C) 2003 Free Software Foundation, Inc. -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi -DUALCASE=1; export DUALCASE # for MKS sh - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\n,, - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.file - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -exec 6>&1 - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_config_libobj_dir=. -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= - -ac_unique_file="elf2flt.c" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#if HAVE_SYS_TYPES_H -# include -#endif -#if HAVE_SYS_STAT_H -# include -#endif -#if STDC_HEADERS -# include -# include -#else -# if HAVE_STDLIB_H -# include -# endif -#endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H -# include -# endif -# include -#endif -#if HAVE_STRINGS_H -# include -#endif -#if HAVE_INTTYPES_H -# include -#else -# if HAVE_STDINT_H -# include -# endif -#endif -#if HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CPP EGREP bfd_include_dir binutils_include_dir binutils_ldscript_dir got_check emit_relocs LIBOBJS LTLIBOBJS' -ac_subst_files='' - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -ac_prev= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_option in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; - - -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "enable_$ac_feature='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } -fi - -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 - { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi -fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 - { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -_ACEOF - - cat <<_ACEOF -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] -_ACEOF - - cat <<\_ACEOF - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] - --target=TARGET configure for building compilers for TARGET [HOST] -_ACEOF -fi - -if test -n "$ac_init_help"; then - - cat <<\_ACEOF - -Optional Features: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-got-check - disable check for GOT (needed on H8) - --disable-emit-relocs - don't use the --emit-relocs (-q) linker option - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-libbfd= path to libbfd.a library to use - --with-libiberty= path to libiberty.a library to use - --with-bfd-include-dir= include path for correct bfd.h - --with-binutils-include-dir= include path for binutils headers - --with-binutils-ldscript-dir= path to install elf2flt.ld - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -_ACEOF -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - ac_popdir=`pwd` - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help - else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir - done -fi - -test -n "$ac_init_help" && exit 0 -if $ac_init_version; then - cat <<\_ACEOF - -Copyright (C) 2003 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit 0 -fi -exec 5>config.log -cat >&5 <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was - - $ $0 $@ - -_ACEOF -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_sep= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -{ - (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) - sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; - *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - sed "/^$/d" confdefs.h | sort - echo - fi - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status - ' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; - esac - fi -else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" - case $ac_old_set,$ac_new_set in - set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - - - - - - - - - - - - - - - -# Check whether --with-libbfd or --without-libbfd was given. -if test "${with_libbfd+set}" = set; then - withval="$with_libbfd" - ac_libbfd=$withval -else - ac_libbfd=NONE - -fi; - - -# Check whether --with-libiberty or --without-libiberty was given. -if test "${with_libiberty+set}" = set; then - withval="$with_libiberty" - ac_libiberty=$withval -else - ac_libiberty=NONE - -fi; - - -# Check whether --with-bfd-include-dir or --without-bfd-include-dir was given. -if test "${with_bfd_include_dir+set}" = set; then - withval="$with_bfd_include_dir" - ac_bfd_include_dir=$withval -else - ac_bfd_include_dir=NONE - -fi; - - -# Check whether --with-binutils-include-dir or --without-binutils-include-dir was given. -if test "${with_binutils_include_dir+set}" = set; then - withval="$with_binutils_include_dir" - ac_binutils_include_dir=$withval -else - ac_binutils_include_dir=NONE - -fi; - - -# Check whether --with-binutils-ldscript-dir or --without-binutils-ldscript-dir was given. -if test "${with_binutils_ldscript_dir+set}" = set; then - withval="$with_binutils_ldscript_dir" - ac_binutils_ldscript_dir=$withval -else - ac_binutils_ldscript_dir=NONE - -fi; - -# Check whether --enable-got-check or --disable-got-check was given. -if test "${enable_got_check+set}" = set; then - enableval="$enable_got_check" - got_check=$enableval -else - got_check=yes - -fi; - -# Check whether --enable-emit_relocs or --disable-emit_relocs was given. -if test "${enable_emit_relocs+set}" = set; then - enableval="$enable_emit_relocs" - emit_relocs=$enableval -else - emit_relocs=yes - -fi; - -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f $ac_dir/shtool; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 -echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} - { (exit 1); exit 1; }; } -fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. - -# Make sure we can run config.sub. -$ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 -echo "$as_me: error: cannot run $ac_config_sub" >&2;} - { (exit 1); exit 1; }; } - -echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6 -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_build_alias=$build_alias -test -z "$ac_cv_build_alias" && - ac_cv_build_alias=`$ac_config_guess` -test -z "$ac_cv_build_alias" && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6 -build=$ac_cv_build -build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - -echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6 -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_host_alias=$host_alias -test -z "$ac_cv_host_alias" && - ac_cv_host_alias=$ac_cv_build_alias -ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6 -host=$ac_cv_host -host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - -echo "$as_me:$LINENO: checking target system type" >&5 -echo $ECHO_N "checking target system type... $ECHO_C" >&6 -if test "${ac_cv_target+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_target_alias=$target_alias -test "x$ac_cv_target_alias" = "x" && - ac_cv_target_alias=$ac_cv_host_alias -ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -echo "$as_me:$LINENO: result: $ac_cv_target" >&5 -echo "${ECHO_T}$ac_cv_target" >&6 -target=$ac_cv_target -target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -test -n "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi - -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$ac_ct_CC" && break -done - - CC=$ac_ct_CC -fi - -fi - - -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - -# Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext - break;; - * ) - break;; - esac -done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } -fi - -ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 - -# Check the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - fi - fi -fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -rm -f a.out a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext - break;; - * ) break;; - esac -done -else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 -if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_compiler_gnu=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 -GCC=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_prog_cc_g=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_stdc=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext -done -rm -f conftest.$ac_ext conftest.$ac_objext -CC=$ac_save_CC - -fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; - *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; -esac - -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - done - done - ;; -esac -done - - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL=$ac_install_sh - fi -fi -echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - - -if test "$ac_libiberty" = "NONE"; then - - -echo "$as_me:$LINENO: checking for objalloc_create in -liberty" >&5 -echo $ECHO_N "checking for objalloc_create in -liberty... $ECHO_C" >&6 -if test "${ac_cv_lib_iberty_objalloc_create+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-liberty $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char objalloc_create (); -int -main () -{ -objalloc_create (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_iberty_objalloc_create=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_iberty_objalloc_create=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_iberty_objalloc_create" >&5 -echo "${ECHO_T}$ac_cv_lib_iberty_objalloc_create" >&6 -if test $ac_cv_lib_iberty_objalloc_create = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBIBERTY 1 -_ACEOF - - LIBS="-liberty $LIBS" - -fi - - ac_libiberty=auto -else - LIBS="$ac_libiberty $LIBS" -fi -if test "$ac_libbfd" = "NONE"; then - -echo "$as_me:$LINENO: checking for bfd_openr in -lbfd" >&5 -echo $ECHO_N "checking for bfd_openr in -lbfd... $ECHO_C" >&6 -if test "${ac_cv_lib_bfd_bfd_openr+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lbfd $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char bfd_openr (); -int -main () -{ -bfd_openr (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_bfd_bfd_openr=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_bfd_bfd_openr=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bfd_bfd_openr" >&5 -echo "${ECHO_T}$ac_cv_lib_bfd_bfd_openr" >&6 -if test $ac_cv_lib_bfd_bfd_openr = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBBFD 1 -_ACEOF - - LIBS="-lbfd $LIBS" - -fi - - ac_libbfd=auto -else - LIBS="$ac_libbfd $LIBS" -fi - -bfd_include_dir= -if test "$ac_bfd_include_dir" != "NONE"; then - bfd_include_dir="-I$ac_bfd_include_dir" -fi - -binutils_include_dir= -if test "$ac_binutils_include_dir" != "NONE"; then - binutils_include_dir="-I$ac_binutils_include_dir" -fi - -binutils_ldscript_dir= -if test "$ac_binutils_ldscript_dir" = "NONE"; then - ac_binutils_ldscript_dir="\${TOOLDIR}/../${target_alias}/lib" -fi -binutils_ldscript_dir="$ac_binutils_ldscript_dir" - -if test "$ac_libbfd" = "NONE" -o "$ac_libiberty" = "NONE" ; then - { { echo "$as_me:$LINENO: error: - -You need to specify the location of the libfd.a and libiberty.a -host libraries from the binutils package. - -Run configure again specifying these options: - - ./configure --target= --with-bfd-include-dir= --with-libbfd= --with-libiberty= -" >&5 -echo "$as_me: error: - -You need to specify the location of the libfd.a and libiberty.a -host libraries from the binutils package. - -Run configure again specifying these options: - - ./configure --target= --with-bfd-include-dir= --with-libbfd= --with-libiberty= -" >&2;} - { (exit 1); exit 1; }; } -fi - -if test "$ac_bfd_include_dir" = "NONE" ; then - { { echo "$as_me:$LINENO: error: - -You need to specify the location of the bfd.h header from a -configured/compiled version of the binutils package for your target. -Without this your elf2flt may crash as it will try to use the -systems bfd.h which may be from a different binutils package. - -Run configure again specifying these options: - - ./configure --target= --with-bfd-include-dir= --with-libbfd= --with-libiberty= -" >&5 -echo "$as_me: error: - -You need to specify the location of the bfd.h header from a -configured/compiled version of the binutils package for your target. -Without this your elf2flt may crash as it will try to use the -systems bfd.h which may be from a different binutils package. - -Run configure again specifying these options: - - ./configure --target= --with-bfd-include-dir= --with-libbfd= --with-libiberty= -" >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' - fi -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep - - -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_header_stdc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_header_stdc=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_Header=no" -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - - -for ac_header in fcntl.h unistd.h bfd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 -echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 -if test "${ac_cv_c_const+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset x; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *ccp; - char **p; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - ccp = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++ccp; - p = (char**) ccp; - ccp = (char const *const *) p; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - } -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_const=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_c_const=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 -echo "${ECHO_T}$ac_cv_c_const" >&6 -if test $ac_cv_c_const = no; then - -cat >>confdefs.h <<\_ACEOF -#define const -_ACEOF - -fi - - - -for ac_func in vprintf -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -echo "$as_me:$LINENO: checking for _doprnt" >&5 -echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6 -if test "${ac_cv_func__doprnt+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define _doprnt to an innocuous variant, in case declares _doprnt. - For example, HP-UX 11i declares gettimeofday. */ -#define _doprnt innocuous__doprnt - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char _doprnt (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef _doprnt - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char _doprnt (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub__doprnt) || defined (__stub____doprnt) -choke me -#else -char (*f) () = _doprnt; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != _doprnt; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func__doprnt=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func__doprnt=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 -echo "${ECHO_T}$ac_cv_func__doprnt" >&6 -if test $ac_cv_func__doprnt = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DOPRNT 1 -_ACEOF - -fi - -fi -done - - - - -for ac_func in dcgettext -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - - - - - - - - - - - - ac_config_files="$ac_config_files Makefile ld-elf2flt" -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -{ - (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} | - sed ' - t clear - : clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" - cat confcache >$cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g -t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g -t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed - - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - -: ${CONFIG_STATUS=./config.status} -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi -DUALCASE=1; export DUALCASE # for MKS sh - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\n,, - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.file - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - -exec 6>&1 - -# Open the log real soon, to keep \$[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - -This file was extended by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 -_ACEOF - -# Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi - -cat >>$CONFIG_STATUS <<\_ACEOF - -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTIONS] [FILE]... - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Report bugs to ." -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF -ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2003 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir -INSTALL="$INSTALL" -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` - ac_shift=: - ;; - -*) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; - esac - - case $ac_option in - # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi - -_ACEOF - - - - - -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_config_target in $ac_config_targets -do - case "$ac_config_target" in - # Handling of arguments. - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "ld-elf2flt" ) CONFIG_FILES="$CONFIG_FILES ld-elf2flt" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. -$debug || -{ - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} - -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - -# -# CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@build@,$build,;t t -s,@build_cpu@,$build_cpu,;t t -s,@build_vendor@,$build_vendor,;t t -s,@build_os@,$build_os,;t t -s,@host@,$host,;t t -s,@host_cpu@,$host_cpu,;t t -s,@host_vendor@,$host_vendor,;t t -s,@host_os@,$host_os,;t t -s,@target@,$target,;t t -s,@target_cpu@,$target_cpu,;t t -s,@target_vendor@,$target_vendor,;t t -s,@target_os@,$target_os,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t -s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t -s,@INSTALL_DATA@,$INSTALL_DATA,;t t -s,@CPP@,$CPP,;t t -s,@EGREP@,$EGREP,;t t -s,@bfd_include_dir@,$bfd_include_dir,;t t -s,@binutils_include_dir@,$binutils_include_dir,;t t -s,@binutils_ldscript_dir@,$binutils_ldscript_dir,;t t -s,@got_check@,$got_check,;t t -s,@emit_relocs@,$emit_relocs,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat - fi -fi # test -n "$CONFIG_FILES" - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; - esac - - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -s,@INSTALL@,$ac_INSTALL,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF - -{ (exit 0); exit 0; } -_ACEOF -chmod +x $CONFIG_STATUS -ac_clean_files=$ac_clean_files_save - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } -fi - - diff --git a/toolchain/elf2flt/elf2flt/configure.in b/toolchain/elf2flt/elf2flt/configure.in deleted file mode 100644 index 73443c6a3b..0000000000 --- a/toolchain/elf2flt/elf2flt/configure.in +++ /dev/null @@ -1,134 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -AC_INIT(elf2flt.c) - -AC_ARG_WITH(libbfd, - [ --with-libbfd= path to libbfd.a library to use ], - [ ac_libbfd=$withval ], - [ ac_libbfd=NONE ] -) - -AC_ARG_WITH(libiberty, - [ --with-libiberty= path to libiberty.a library to use ], - [ ac_libiberty=$withval ], - [ ac_libiberty=NONE ] -) - -AC_ARG_WITH(bfd-include-dir, - [ --with-bfd-include-dir= include path for correct bfd.h ], - [ ac_bfd_include_dir=$withval ], - [ ac_bfd_include_dir=NONE ] -) - -AC_ARG_WITH(binutils-include-dir, - [ --with-binutils-include-dir= include path for binutils headers ], - [ ac_binutils_include_dir=$withval ], - [ ac_binutils_include_dir=NONE ] -) - -AC_ARG_WITH(binutils-ldscript-dir, - [ --with-binutils-ldscript-dir= path to install elf2flt.ld ], - [ ac_binutils_ldscript_dir=$withval ], - [ ac_binutils_ldscript_dir=NONE ] -) - -AC_ARG_ENABLE(got-check, - [ --disable-got-check - disable check for GOT (needed on H8) ], - [ got_check=$enableval ], - [ got_check=yes ] -) - -AC_ARG_ENABLE(emit_relocs, - [ --disable-emit-relocs - don't use the --emit-relocs (-q) linker option ], - [ emit_relocs=$enableval ], - [ emit_relocs=yes ] -) - -AC_CANONICAL_HOST -AC_CANONICAL_TARGET - -dnl Checks for programs. -AC_PROG_CC -AC_PROG_INSTALL - -dnl Checks for libraries. -if test "$ac_libiberty" = "NONE"; then - AC_CHECK_LIB(iberty, objalloc_create) - ac_libiberty=auto -else - LIBS="$ac_libiberty $LIBS" -fi -if test "$ac_libbfd" = "NONE"; then - AC_CHECK_LIB(bfd, bfd_openr) - ac_libbfd=auto -else - LIBS="$ac_libbfd $LIBS" -fi - -bfd_include_dir= -if test "$ac_bfd_include_dir" != "NONE"; then - bfd_include_dir="-I$ac_bfd_include_dir" -fi - -binutils_include_dir= -if test "$ac_binutils_include_dir" != "NONE"; then - binutils_include_dir="-I$ac_binutils_include_dir" -fi - -binutils_ldscript_dir= -if test "$ac_binutils_ldscript_dir" = "NONE"; then - ac_binutils_ldscript_dir="\${TOOLDIR}/../${target_alias}/lib" -fi -binutils_ldscript_dir="$ac_binutils_ldscript_dir" - -if test "$ac_libbfd" = "NONE" -o "$ac_libiberty" = "NONE" ; then - AC_MSG_ERROR([ - -You need to specify the location of the libfd.a and libiberty.a -host libraries from the binutils package. - -Run configure again specifying these options: - - ./configure --target= --with-bfd-include-dir= --with-libbfd= --with-libiberty= -]) -fi - -if test "$ac_bfd_include_dir" = "NONE" ; then - AC_MSG_ERROR([ - -You need to specify the location of the bfd.h header from a -configured/compiled version of the binutils package for your target. -Without this your elf2flt may crash as it will try to use the -systems bfd.h which may be from a different binutils package. - -Run configure again specifying these options: - - ./configure --target= --with-bfd-include-dir= --with-libbfd= --with-libiberty= -]) -fi - -dnl Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS(fcntl.h unistd.h bfd.h) - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST - -dnl Checks for library functions. -AC_FUNC_VPRINTF - -AC_CHECK_FUNCS(dcgettext) - -dnl Subsitute values -AC_SUBST(target) -AC_SUBST(target_alias) -AC_SUBST(target_cpu) -AC_SUBST(target_os) -AC_SUBST(target_vendor) -AC_SUBST(bfd_include_dir) -AC_SUBST(binutils_include_dir) -AC_SUBST(binutils_ldscript_dir) -AC_SUBST(got_check) -AC_SUBST(emit_relocs) - -AC_OUTPUT(Makefile ld-elf2flt) - diff --git a/toolchain/elf2flt/elf2flt/cygwin-elf.h b/toolchain/elf2flt/elf2flt/cygwin-elf.h deleted file mode 100644 index 2523c0e04b..0000000000 --- a/toolchain/elf2flt/elf2flt/cygwin-elf.h +++ /dev/null @@ -1,2171 +0,0 @@ -/* This file defines standard ELF types, structures, and macros. - Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _ELF_H -#define _ELF_H 1 - -#if defined(__MINGW32__) -#include -typedef uint16_t u_int16_t; -typedef uint32_t u_int32_t; -typedef uint64_t u_int64_t; -#else -#include -#endif -/* Standard ELF types. */ - -#include - -/* Type for a 16-bit quantity. */ -typedef u_int16_t Elf32_Half; -typedef u_int16_t Elf64_Half; - -/* Types for signed and unsigned 32-bit quantities. */ -typedef u_int32_t Elf32_Word; -typedef int32_t Elf32_Sword; -typedef u_int32_t Elf64_Word; -typedef int32_t Elf64_Sword; - -/* Types for signed and unsigned 64-bit quantities. */ -typedef u_int64_t Elf32_Xword; -typedef int64_t Elf32_Sxword; -typedef u_int64_t Elf64_Xword; -typedef int64_t Elf64_Sxword; - -/* Type of addresses. */ -typedef u_int32_t Elf32_Addr; -typedef u_int64_t Elf64_Addr; - -/* Type of file offsets. */ -typedef u_int32_t Elf32_Off; -typedef u_int64_t Elf64_Off; - -/* Type for section indices, which are 16-bit quantities. */ -typedef u_int16_t Elf32_Section; -typedef u_int16_t Elf64_Section; - -/* Type for version symbol information. */ -typedef Elf32_Half Elf32_Versym; -typedef Elf64_Half Elf64_Versym; - - -/* The ELF file header. This appears at the start of every ELF file. */ - -#define EI_NIDENT (16) - -typedef struct -{ - unsigned char e_ident[EI_NIDENT]; /* Magic number and other info */ - Elf32_Half e_type; /* Object file type */ - Elf32_Half e_machine; /* Architecture */ - Elf32_Word e_version; /* Object file version */ - Elf32_Addr e_entry; /* Entry point virtual address */ - Elf32_Off e_phoff; /* Program header table file offset */ - Elf32_Off e_shoff; /* Section header table file offset */ - Elf32_Word e_flags; /* Processor-specific flags */ - Elf32_Half e_ehsize; /* ELF header size in bytes */ - Elf32_Half e_phentsize; /* Program header table entry size */ - Elf32_Half e_phnum; /* Program header table entry count */ - Elf32_Half e_shentsize; /* Section header table entry size */ - Elf32_Half e_shnum; /* Section header table entry count */ - Elf32_Half e_shstrndx; /* Section header string table index */ -} Elf32_Ehdr; - -typedef struct -{ - unsigned char e_ident[EI_NIDENT]; /* Magic number and other info */ - Elf64_Half e_type; /* Object file type */ - Elf64_Half e_machine; /* Architecture */ - Elf64_Word e_version; /* Object file version */ - Elf64_Addr e_entry; /* Entry point virtual address */ - Elf64_Off e_phoff; /* Program header table file offset */ - Elf64_Off e_shoff; /* Section header table file offset */ - Elf64_Word e_flags; /* Processor-specific flags */ - Elf64_Half e_ehsize; /* ELF header size in bytes */ - Elf64_Half e_phentsize; /* Program header table entry size */ - Elf64_Half e_phnum; /* Program header table entry count */ - Elf64_Half e_shentsize; /* Section header table entry size */ - Elf64_Half e_shnum; /* Section header table entry count */ - Elf64_Half e_shstrndx; /* Section header string table index */ -} Elf64_Ehdr; - -/* Fields in the e_ident array. The EI_* macros are indices into the - array. The macros under each EI_* macro are the values the byte - may have. */ - -#define EI_MAG0 0 /* File identification byte 0 index */ -#define ELFMAG0 0x7f /* Magic number byte 0 */ - -#define EI_MAG1 1 /* File identification byte 1 index */ -#define ELFMAG1 'E' /* Magic number byte 1 */ - -#define EI_MAG2 2 /* File identification byte 2 index */ -#define ELFMAG2 'L' /* Magic number byte 2 */ - -#define EI_MAG3 3 /* File identification byte 3 index */ -#define ELFMAG3 'F' /* Magic number byte 3 */ - -/* Conglomeration of the identification bytes, for easy testing as a word. */ -#define ELFMAG "\177ELF" -#define SELFMAG 4 - -#define EI_CLASS 4 /* File class byte index */ -#define ELFCLASSNONE 0 /* Invalid class */ -#define ELFCLASS32 1 /* 32-bit objects */ -#define ELFCLASS64 2 /* 64-bit objects */ -#define ELFCLASSNUM 3 - -#define EI_DATA 5 /* Data encoding byte index */ -#define ELFDATANONE 0 /* Invalid data encoding */ -#define ELFDATA2LSB 1 /* 2's complement, little endian */ -#define ELFDATA2MSB 2 /* 2's complement, big endian */ -#define ELFDATANUM 3 - -#define EI_VERSION 6 /* File version byte index */ - /* Value must be EV_CURRENT */ - -#define EI_OSABI 7 /* OS ABI identification */ -#define ELFOSABI_SYSV 0 /* UNIX System V ABI */ -#define ELFOSABI_HPUX 1 /* HP-UX */ -#define ELFOSABI_ARM 97 /* ARM */ -#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */ - -#define EI_ABIVERSION 8 /* ABI version */ - -#define EI_PAD 9 /* Byte index of padding bytes */ - -/* Legal values for e_type (object file type). */ - -#define ET_NONE 0 /* No file type */ -#define ET_REL 1 /* Relocatable file */ -#define ET_EXEC 2 /* Executable file */ -#define ET_DYN 3 /* Shared object file */ -#define ET_CORE 4 /* Core file */ -#define ET_NUM 5 /* Number of defined types */ -#define ET_LOOS 0xfe00 /* OS-specific range start */ -#define ET_HIOS 0xfeff /* OS-specific range end */ -#define ET_LOPROC 0xff00 /* Processor-specific range start */ -#define ET_HIPROC 0xffff /* Processor-specific range end */ - -/* Legal values for e_machine (architecture). */ - -#define EM_NONE 0 /* No machine */ -#define EM_M32 1 /* AT&T WE 32100 */ -#define EM_SPARC 2 /* SUN SPARC */ -#define EM_386 3 /* Intel 80386 */ -#define EM_68K 4 /* Motorola m68k family */ -#define EM_88K 5 /* Motorola m88k family */ -#define EM_860 7 /* Intel 80860 */ -#define EM_MIPS 8 /* MIPS R3000 big-endian */ -#define EM_S370 9 /* IBM System/370 */ -#define EM_MIPS_RS3_LE 10 /* MIPS R3000 little-endian */ - -#define EM_PARISC 15 /* HPPA */ -#define EM_VPP500 17 /* Fujitsu VPP500 */ -#define EM_SPARC32PLUS 18 /* Sun's "v8plus" */ -#define EM_960 19 /* Intel 80960 */ -#define EM_PPC 20 /* PowerPC */ -#define EM_PPC64 21 /* PowerPC 64-bit */ -#define EM_S390 22 /* IBM S390 */ - -#define EM_V800 36 /* NEC V800 series */ -#define EM_FR20 37 /* Fujitsu FR20 */ -#define EM_RH32 38 /* TRW RH-32 */ -#define EM_RCE 39 /* Motorola RCE */ -#define EM_ARM 40 /* ARM */ -#define EM_FAKE_ALPHA 41 /* Digital Alpha */ -#define EM_SH 42 /* Hitachi SH */ -#define EM_SPARCV9 43 /* SPARC v9 64-bit */ -#define EM_TRICORE 44 /* Siemens Tricore */ -#define EM_ARC 45 /* Argonaut RISC Core */ -#define EM_H8_300 46 /* Hitachi H8/300 */ -#define EM_H8_300H 47 /* Hitachi H8/300H */ -#define EM_H8S 48 /* Hitachi H8S */ -#define EM_H8_500 49 /* Hitachi H8/500 */ -#define EM_IA_64 50 /* Intel Merced */ -#define EM_MIPS_X 51 /* Stanford MIPS-X */ -#define EM_COLDFIRE 52 /* Motorola Coldfire */ -#define EM_68HC12 53 /* Motorola M68HC12 */ -#define EM_MMA 54 /* Fujitsu MMA Multimedia Accelerator*/ -#define EM_PCP 55 /* Siemens PCP */ -#define EM_NCPU 56 /* Sony nCPU embeeded RISC */ -#define EM_NDR1 57 /* Denso NDR1 microprocessor */ -#define EM_STARCORE 58 /* Motorola Start*Core processor */ -#define EM_ME16 59 /* Toyota ME16 processor */ -#define EM_ST100 60 /* STMicroelectronic ST100 processor */ -#define EM_TINYJ 61 /* Advanced Logic Corp. Tinyj emb.fam*/ -#define EM_X86_64 62 /* AMD x86-64 architecture */ -#define EM_PDSP 63 /* Sony DSP Processor */ - -#define EM_FX66 66 /* Siemens FX66 microcontroller */ -#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 mc */ -#define EM_ST7 68 /* STmicroelectronics ST7 8 bit mc */ -#define EM_68HC16 69 /* Motorola MC68HC16 microcontroller */ -#define EM_68HC11 70 /* Motorola MC68HC11 microcontroller */ -#define EM_68HC08 71 /* Motorola MC68HC08 microcontroller */ -#define EM_68HC05 72 /* Motorola MC68HC05 microcontroller */ -#define EM_SVX 73 /* Silicon Graphics SVx */ -#define EM_AT19 74 /* STMicroelectronics ST19 8 bit mc */ -#define EM_VAX 75 /* Digital VAX */ -#define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */ -#define EM_JAVELIN 77 /* Infineon Technologies 32-bit embedded processor */ -#define EM_FIREPATH 78 /* Element 14 64-bit DSP Processor */ -#define EM_ZSP 79 /* LSI Logic 16-bit DSP Processor */ -#define EM_MMIX 80 /* Donald Knuth's educational 64-bit processor */ -#define EM_HUANY 81 /* Harvard University machine-independent object files */ -#define EM_PRISM 82 /* SiTera Prism */ -#define EM_AVR 83 /* Atmel AVR 8-bit microcontroller */ -#define EM_FR30 84 /* Fujitsu FR30 */ -#define EM_D10V 85 /* Mitsubishi D10V */ -#define EM_D30V 86 /* Mitsubishi D30V */ -#define EM_V850 87 /* NEC v850 */ -#define EM_M32R 88 /* Mitsubishi M32R */ -#define EM_MN10300 89 /* Matsushita MN10300 */ -#define EM_MN10200 90 /* Matsushita MN10200 */ -#define EM_PJ 91 /* picoJava */ -#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */ -#define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */ -#define EM_XTENSA 94 /* Tensilica Xtensa Architecture */ -#define EM_NUM 95 - -/* If it is necessary to assign new unofficial EM_* values, please - pick large random numbers (0x8523, 0xa7f2, etc.) to minimize the - chances of collision with official or non-GNU unofficial values. */ - -#define EM_ALPHA 0x9026 - -/* Legal values for e_version (version). */ - -#define EV_NONE 0 /* Invalid ELF version */ -#define EV_CURRENT 1 /* Current version */ -#define EV_NUM 2 - -/* Section header. */ - -typedef struct -{ - Elf32_Word sh_name; /* Section name (string tbl index) */ - Elf32_Word sh_type; /* Section type */ - Elf32_Word sh_flags; /* Section flags */ - Elf32_Addr sh_addr; /* Section virtual addr at execution */ - Elf32_Off sh_offset; /* Section file offset */ - Elf32_Word sh_size; /* Section size in bytes */ - Elf32_Word sh_link; /* Link to another section */ - Elf32_Word sh_info; /* Additional section information */ - Elf32_Word sh_addralign; /* Section alignment */ - Elf32_Word sh_entsize; /* Entry size if section holds table */ -} Elf32_Shdr; - -typedef struct -{ - Elf64_Word sh_name; /* Section name (string tbl index) */ - Elf64_Word sh_type; /* Section type */ - Elf64_Xword sh_flags; /* Section flags */ - Elf64_Addr sh_addr; /* Section virtual addr at execution */ - Elf64_Off sh_offset; /* Section file offset */ - Elf64_Xword sh_size; /* Section size in bytes */ - Elf64_Word sh_link; /* Link to another section */ - Elf64_Word sh_info; /* Additional section information */ - Elf64_Xword sh_addralign; /* Section alignment */ - Elf64_Xword sh_entsize; /* Entry size if section holds table */ -} Elf64_Shdr; - -/* Special section indices. */ - -#define SHN_UNDEF 0 /* Undefined section */ -#define SHN_LORESERVE 0xff00 /* Start of reserved indices */ -#define SHN_LOPROC 0xff00 /* Start of processor-specific */ -#define SHN_HIPROC 0xff1f /* End of processor-specific */ -#define SHN_LOOS 0xff20 /* Start of OS-specific */ -#define SHN_HIOS 0xff3f /* End of OS-specific */ -#define SHN_ABS 0xfff1 /* Associated symbol is absolute */ -#define SHN_COMMON 0xfff2 /* Associated symbol is common */ -#define SHN_XINDEX 0xffff /* Index is in extra table. */ -#define SHN_HIRESERVE 0xffff /* End of reserved indices */ - -/* Legal values for sh_type (section type). */ - -#define SHT_NULL 0 /* Section header table entry unused */ -#define SHT_PROGBITS 1 /* Program data */ -#define SHT_SYMTAB 2 /* Symbol table */ -#define SHT_STRTAB 3 /* String table */ -#define SHT_RELA 4 /* Relocation entries with addends */ -#define SHT_HASH 5 /* Symbol hash table */ -#define SHT_DYNAMIC 6 /* Dynamic linking information */ -#define SHT_NOTE 7 /* Notes */ -#define SHT_NOBITS 8 /* Program space with no data (bss) */ -#define SHT_REL 9 /* Relocation entries, no addends */ -#define SHT_SHLIB 10 /* Reserved */ -#define SHT_DYNSYM 11 /* Dynamic linker symbol table */ -#define SHT_INIT_ARRAY 14 /* Array of constructors */ -#define SHT_FINI_ARRAY 15 /* Array of destructors */ -#define SHT_PREINIT_ARRAY 16 /* Array of pre-constructors */ -#define SHT_GROUP 17 /* Section group */ -#define SHT_SYMTAB_SHNDX 18 /* Extended section indeces */ -#define SHT_NUM 19 /* Number of defined types. */ -#define SHT_LOOS 0x60000000 /* Start OS-specific */ -#define SHT_CHECKSUM 0x6ffffff8 /* Checksum for DSO content. */ -#define SHT_LOSUNW 0x6ffffffa /* Sun-specific low bound. */ -#define SHT_SUNW_move 0x6ffffffa -#define SHT_SUNW_COMDAT 0x6ffffffb -#define SHT_SUNW_syminfo 0x6ffffffc -#define SHT_GNU_verdef 0x6ffffffd /* Version definition section. */ -#define SHT_GNU_verneed 0x6ffffffe /* Version needs section. */ -#define SHT_GNU_versym 0x6fffffff /* Version symbol table. */ -#define SHT_HISUNW 0x6fffffff /* Sun-specific high bound. */ -#define SHT_HIOS 0x6fffffff /* End OS-specific type */ -#define SHT_LOPROC 0x70000000 /* Start of processor-specific */ -#define SHT_HIPROC 0x7fffffff /* End of processor-specific */ -#define SHT_LOUSER 0x80000000 /* Start of application-specific */ -#define SHT_HIUSER 0x8fffffff /* End of application-specific */ - -/* Legal values for sh_flags (section flags). */ - -#define SHF_WRITE (1 << 0) /* Writable */ -#define SHF_ALLOC (1 << 1) /* Occupies memory during execution */ -#define SHF_EXECINSTR (1 << 2) /* Executable */ -#define SHF_MERGE (1 << 4) /* Might be merged */ -#define SHF_STRINGS (1 << 5) /* Contains nul-terminated strings */ -#define SHF_INFO_LINK (1 << 6) /* `sh_info' contains SHT index */ -#define SHF_LINK_ORDER (1 << 7) /* Preserve order after combining */ -#define SHF_OS_NONCONFORMING (1 << 8) /* Non-standard OS specific handling - required */ -#define SHF_MASKOS 0x0ff00000 /* OS-specific. */ -#define SHF_MASKPROC 0xf0000000 /* Processor-specific */ - -/* Section group handling. */ -#define GRP_COMDAT 0x1 /* Mark group as COMDAT. */ - -/* Symbol table entry. */ - -typedef struct -{ - Elf32_Word st_name; /* Symbol name (string tbl index) */ - Elf32_Addr st_value; /* Symbol value */ - Elf32_Word st_size; /* Symbol size */ - unsigned char st_info; /* Symbol type and binding */ - unsigned char st_other; /* Symbol visibility */ - Elf32_Section st_shndx; /* Section index */ -} Elf32_Sym; - -typedef struct -{ - Elf64_Word st_name; /* Symbol name (string tbl index) */ - unsigned char st_info; /* Symbol type and binding */ - unsigned char st_other; /* Symbol visibility */ - Elf64_Section st_shndx; /* Section index */ - Elf64_Addr st_value; /* Symbol value */ - Elf64_Xword st_size; /* Symbol size */ -} Elf64_Sym; - -/* The syminfo section if available contains additional information about - every dynamic symbol. */ - -typedef struct -{ - Elf32_Half si_boundto; /* Direct bindings, symbol bound to */ - Elf32_Half si_flags; /* Per symbol flags */ -} Elf32_Syminfo; - -typedef struct -{ - Elf64_Half si_boundto; /* Direct bindings, symbol bound to */ - Elf64_Half si_flags; /* Per symbol flags */ -} Elf64_Syminfo; - -/* Possible values for si_boundto. */ -#define SYMINFO_BT_SELF 0xffff /* Symbol bound to self */ -#define SYMINFO_BT_PARENT 0xfffe /* Symbol bound to parent */ -#define SYMINFO_BT_LOWRESERVE 0xff00 /* Beginning of reserved entries */ - -/* Possible bitmasks for si_flags. */ -#define SYMINFO_FLG_DIRECT 0x0001 /* Direct bound symbol */ -#define SYMINFO_FLG_PASSTHRU 0x0002 /* Pass-thru symbol for translator */ -#define SYMINFO_FLG_COPY 0x0004 /* Symbol is a copy-reloc */ -#define SYMINFO_FLG_LAZYLOAD 0x0008 /* Symbol bound to object to be lazy - loaded */ -/* Syminfo version values. */ -#define SYMINFO_NONE 0 -#define SYMINFO_CURRENT 1 -#define SYMINFO_NUM 2 - - -/* Special section index. */ - -#define SHN_UNDEF 0 /* No section, undefined symbol. */ - -/* How to extract and insert information held in the st_info field. */ - -#define ELF32_ST_BIND(val) (((unsigned char) (val)) >> 4) -#define ELF32_ST_TYPE(val) ((val) & 0xf) -#define ELF32_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf)) - -/* Both Elf32_Sym and Elf64_Sym use the same one-byte st_info field. */ -#define ELF64_ST_BIND(val) ELF32_ST_BIND (val) -#define ELF64_ST_TYPE(val) ELF32_ST_TYPE (val) -#define ELF64_ST_INFO(bind, type) ELF32_ST_INFO ((bind), (type)) - -/* Legal values for ST_BIND subfield of st_info (symbol binding). */ - -#define STB_LOCAL 0 /* Local symbol */ -#define STB_GLOBAL 1 /* Global symbol */ -#define STB_WEAK 2 /* Weak symbol */ -#define STB_NUM 3 /* Number of defined types. */ -#define STB_LOOS 10 /* Start of OS-specific */ -#define STB_HIOS 12 /* End of OS-specific */ -#define STB_LOPROC 13 /* Start of processor-specific */ -#define STB_HIPROC 15 /* End of processor-specific */ - -/* Legal values for ST_TYPE subfield of st_info (symbol type). */ - -#define STT_NOTYPE 0 /* Symbol type is unspecified */ -#define STT_OBJECT 1 /* Symbol is a data object */ -#define STT_FUNC 2 /* Symbol is a code object */ -#define STT_SECTION 3 /* Symbol associated with a section */ -#define STT_FILE 4 /* Symbol's name is file name */ -#define STT_COMMON 5 /* Symbol is a common data object */ -#define STT_NUM 6 /* Number of defined types. */ -#define STT_LOOS 10 /* Start of OS-specific */ -#define STT_HIOS 12 /* End of OS-specific */ -#define STT_LOPROC 13 /* Start of processor-specific */ -#define STT_HIPROC 15 /* End of processor-specific */ - - -/* Symbol table indices are found in the hash buckets and chain table - of a symbol hash table section. This special index value indicates - the end of a chain, meaning no further symbols are found in that bucket. */ - -#define STN_UNDEF 0 /* End of a chain. */ - - -/* How to extract and insert information held in the st_other field. */ - -#define ELF32_ST_VISIBILITY(o) ((o) & 0x03) - -/* For ELF64 the definitions are the same. */ -#define ELF64_ST_VISIBILITY(o) ELF32_ST_VISIBILITY (o) - -/* Symbol visibility specification encoded in the st_other field. */ -#define STV_DEFAULT 0 /* Default symbol visibility rules */ -#define STV_INTERNAL 1 /* Processor specific hidden class */ -#define STV_HIDDEN 2 /* Sym unavailable in other modules */ -#define STV_PROTECTED 3 /* Not preemptible, not exported */ - - -/* Relocation table entry without addend (in section of type SHT_REL). */ - -typedef struct -{ - Elf32_Addr r_offset; /* Address */ - Elf32_Word r_info; /* Relocation type and symbol index */ -} Elf32_Rel; - -/* I have seen two different definitions of the Elf64_Rel and - Elf64_Rela structures, so we'll leave them out until Novell (or - whoever) gets their act together. */ -/* The following, at least, is used on Sparc v9, MIPS, and Alpha. */ - -typedef struct -{ - Elf64_Addr r_offset; /* Address */ - Elf64_Xword r_info; /* Relocation type and symbol index */ -} Elf64_Rel; - -/* Relocation table entry with addend (in section of type SHT_RELA). */ - -typedef struct -{ - Elf32_Addr r_offset; /* Address */ - Elf32_Word r_info; /* Relocation type and symbol index */ - Elf32_Sword r_addend; /* Addend */ -} Elf32_Rela; - -typedef struct -{ - Elf64_Addr r_offset; /* Address */ - Elf64_Xword r_info; /* Relocation type and symbol index */ - Elf64_Sxword r_addend; /* Addend */ -} Elf64_Rela; - -/* How to extract and insert information held in the r_info field. */ - -#define ELF32_R_SYM(val) ((val) >> 8) -#define ELF32_R_TYPE(val) ((val) & 0xff) -#define ELF32_R_INFO(sym, type) (((sym) << 8) + ((type) & 0xff)) - -#define ELF64_R_SYM(i) ((i) >> 32) -#define ELF64_R_TYPE(i) ((i) & 0xffffffff) -#define ELF64_R_INFO(sym,type) ((((Elf64_Xword) (sym)) << 32) + (type)) - -/* Program segment header. */ - -typedef struct -{ - Elf32_Word p_type; /* Segment type */ - Elf32_Off p_offset; /* Segment file offset */ - Elf32_Addr p_vaddr; /* Segment virtual address */ - Elf32_Addr p_paddr; /* Segment physical address */ - Elf32_Word p_filesz; /* Segment size in file */ - Elf32_Word p_memsz; /* Segment size in memory */ - Elf32_Word p_flags; /* Segment flags */ - Elf32_Word p_align; /* Segment alignment */ -} Elf32_Phdr; - -typedef struct -{ - Elf64_Word p_type; /* Segment type */ - Elf64_Word p_flags; /* Segment flags */ - Elf64_Off p_offset; /* Segment file offset */ - Elf64_Addr p_vaddr; /* Segment virtual address */ - Elf64_Addr p_paddr; /* Segment physical address */ - Elf64_Xword p_filesz; /* Segment size in file */ - Elf64_Xword p_memsz; /* Segment size in memory */ - Elf64_Xword p_align; /* Segment alignment */ -} Elf64_Phdr; - -/* Legal values for p_type (segment type). */ - -#define PT_NULL 0 /* Program header table entry unused */ -#define PT_LOAD 1 /* Loadable program segment */ -#define PT_DYNAMIC 2 /* Dynamic linking information */ -#define PT_INTERP 3 /* Program interpreter */ -#define PT_NOTE 4 /* Auxiliary information */ -#define PT_SHLIB 5 /* Reserved */ -#define PT_PHDR 6 /* Entry for header table itself */ -#define PT_NUM 7 /* Number of defined types */ -#define PT_LOOS 0x60000000 /* Start of OS-specific */ -#define PT_HIOS 0x6fffffff /* End of OS-specific */ -#define PT_LOPROC 0x70000000 /* Start of processor-specific */ -#define PT_HIPROC 0x7fffffff /* End of processor-specific */ - -/* Legal values for p_flags (segment flags). */ - -#define PF_X (1 << 0) /* Segment is executable */ -#define PF_W (1 << 1) /* Segment is writable */ -#define PF_R (1 << 2) /* Segment is readable */ -#define PF_MASKOS 0x0ff00000 /* OS-specific */ -#define PF_MASKPROC 0xf0000000 /* Processor-specific */ - -/* Legal values for note segment descriptor types for core files. */ - -#define NT_PRSTATUS 1 /* Contains copy of prstatus struct */ -#define NT_FPREGSET 2 /* Contains copy of fpregset struct */ -#define NT_PRPSINFO 3 /* Contains copy of prpsinfo struct */ -#define NT_PRXREG 4 /* Contains copy of prxregset struct */ -#define NT_PLATFORM 5 /* String from sysinfo(SI_PLATFORM) */ -#define NT_AUXV 6 /* Contains copy of auxv array */ -#define NT_GWINDOWS 7 /* Contains copy of gwindows struct */ -#define NT_PSTATUS 10 /* Contains copy of pstatus struct */ -#define NT_PSINFO 13 /* Contains copy of psinfo struct */ -#define NT_PRCRED 14 /* Contains copy of prcred struct */ -#define NT_UTSNAME 15 /* Contains copy of utsname struct */ -#define NT_LWPSTATUS 16 /* Contains copy of lwpstatus struct */ -#define NT_LWPSINFO 17 /* Contains copy of lwpinfo struct */ -#define NT_PRFPXREG 20 /* Contains copy of fprxregset struct*/ - -/* Legal values for the note segment descriptor types for object files. */ - -#define NT_VERSION 1 /* Contains a version string. */ - - -/* Dynamic section entry. */ - -typedef struct -{ - Elf32_Sword d_tag; /* Dynamic entry type */ - union - { - Elf32_Word d_val; /* Integer value */ - Elf32_Addr d_ptr; /* Address value */ - } d_un; -} Elf32_Dyn; - -typedef struct -{ - Elf64_Sxword d_tag; /* Dynamic entry type */ - union - { - Elf64_Xword d_val; /* Integer value */ - Elf64_Addr d_ptr; /* Address value */ - } d_un; -} Elf64_Dyn; - -/* Legal values for d_tag (dynamic entry type). */ - -#define DT_NULL 0 /* Marks end of dynamic section */ -#define DT_NEEDED 1 /* Name of needed library */ -#define DT_PLTRELSZ 2 /* Size in bytes of PLT relocs */ -#define DT_PLTGOT 3 /* Processor defined value */ -#define DT_HASH 4 /* Address of symbol hash table */ -#define DT_STRTAB 5 /* Address of string table */ -#define DT_SYMTAB 6 /* Address of symbol table */ -#define DT_RELA 7 /* Address of Rela relocs */ -#define DT_RELASZ 8 /* Total size of Rela relocs */ -#define DT_RELAENT 9 /* Size of one Rela reloc */ -#define DT_STRSZ 10 /* Size of string table */ -#define DT_SYMENT 11 /* Size of one symbol table entry */ -#define DT_INIT 12 /* Address of init function */ -#define DT_FINI 13 /* Address of termination function */ -#define DT_SONAME 14 /* Name of shared object */ -#define DT_RPATH 15 /* Library search path (deprecated) */ -#define DT_SYMBOLIC 16 /* Start symbol search here */ -#define DT_REL 17 /* Address of Rel relocs */ -#define DT_RELSZ 18 /* Total size of Rel relocs */ -#define DT_RELENT 19 /* Size of one Rel reloc */ -#define DT_PLTREL 20 /* Type of reloc in PLT */ -#define DT_DEBUG 21 /* For debugging; unspecified */ -#define DT_TEXTREL 22 /* Reloc might modify .text */ -#define DT_JMPREL 23 /* Address of PLT relocs */ -#define DT_BIND_NOW 24 /* Process relocations of object */ -#define DT_INIT_ARRAY 25 /* Array with addresses of init fct */ -#define DT_FINI_ARRAY 26 /* Array with addresses of fini fct */ -#define DT_INIT_ARRAYSZ 27 /* Size in bytes of DT_INIT_ARRAY */ -#define DT_FINI_ARRAYSZ 28 /* Size in bytes of DT_FINI_ARRAY */ -#define DT_RUNPATH 29 /* Library search path */ -#define DT_FLAGS 30 /* Flags for the object being loaded */ -#define DT_ENCODING 32 /* Start of encoded range */ -#define DT_PREINIT_ARRAY 32 /* Array with addresses of preinit fct*/ -#define DT_PREINIT_ARRAYSZ 33 /* size in bytes of DT_PREINIT_ARRAY */ -#define DT_NUM 34 /* Number used */ -#define DT_LOOS 0x60000000 /* Start of OS-specific */ -#define DT_HIOS 0x6fffffff /* End of OS-specific */ -#define DT_LOPROC 0x70000000 /* Start of processor-specific */ -#define DT_HIPROC 0x7fffffff /* End of processor-specific */ -#define DT_PROCNUM DT_MIPS_NUM /* Most used by any processor */ - -/* DT_* entries which fall between DT_VALRNGHI & DT_VALRNGLO use the - Dyn.d_un.d_val field of the Elf*_Dyn structure. This follows Sun's - approach. */ -#define DT_VALRNGLO 0x6ffffd00 -#define DT_CHECKSUM 0x6ffffdf8 -#define DT_PLTPADSZ 0x6ffffdf9 -#define DT_MOVEENT 0x6ffffdfa -#define DT_MOVESZ 0x6ffffdfb -#define DT_FEATURE_1 0x6ffffdfc /* Feature selection (DTF_*). */ -#define DT_POSFLAG_1 0x6ffffdfd /* Flags for DT_* entries, effecting - the following DT_* entry. */ -#define DT_SYMINSZ 0x6ffffdfe /* Size of syminfo table (in bytes) */ -#define DT_SYMINENT 0x6ffffdff /* Entry size of syminfo */ -#define DT_VALRNGHI 0x6ffffdff - -/* DT_* entries which fall between DT_ADDRRNGHI & DT_ADDRRNGLO use the - Dyn.d_un.d_ptr field of the Elf*_Dyn structure. - - If any adjustment is made to the ELF object after it has been - built these entries will need to be adjusted. */ -#define DT_ADDRRNGLO 0x6ffffe00 -#define DT_CONFIG 0x6ffffefa /* Configuration information. */ -#define DT_DEPAUDIT 0x6ffffefb /* Dependency auditing. */ -#define DT_AUDIT 0x6ffffefc /* Object auditing. */ -#define DT_PLTPAD 0x6ffffefd /* PLT padding. */ -#define DT_MOVETAB 0x6ffffefe /* Move table. */ -#define DT_SYMINFO 0x6ffffeff /* Syminfo table. */ -#define DT_ADDRRNGHI 0x6ffffeff - -/* The versioning entry types. The next are defined as part of the - GNU extension. */ -#define DT_VERSYM 0x6ffffff0 - -#define DT_RELACOUNT 0x6ffffff9 -#define DT_RELCOUNT 0x6ffffffa - -/* These were chosen by Sun. */ -#define DT_FLAGS_1 0x6ffffffb /* State flags, see DF_1_* below. */ -#define DT_VERDEF 0x6ffffffc /* Address of version definition - table */ -#define DT_VERDEFNUM 0x6ffffffd /* Number of version definitions */ -#define DT_VERNEED 0x6ffffffe /* Address of table with needed - versions */ -#define DT_VERNEEDNUM 0x6fffffff /* Number of needed versions */ -#define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag)) /* Reverse order! */ -#define DT_VERSIONTAGNUM 16 - -/* Sun added these machine-independent extensions in the "processor-specific" - range. Be compatible. */ -#define DT_AUXILIARY 0x7ffffffd /* Shared object to load before self */ -#define DT_FILTER 0x7fffffff /* Shared object to get values from */ -#define DT_EXTRATAGIDX(tag) ((Elf32_Word)-((Elf32_Sword) (tag) <<1>>1)-1) -#define DT_EXTRANUM 3 - -/* Values of `d_un.d_val' in the DT_FLAGS entry. */ -#define DF_ORIGIN 0x00000001 /* Object may use DF_ORIGIN */ -#define DF_SYMBOLIC 0x00000002 /* Symbol resolutions starts here */ -#define DF_TEXTREL 0x00000004 /* Object contains text relocations */ -#define DF_BIND_NOW 0x00000008 /* No lazy binding for this object */ - -/* State flags selectable in the `d_un.d_val' element of the DT_FLAGS_1 - entry in the dynamic section. */ -#define DF_1_NOW 0x00000001 /* Set RTLD_NOW for this object. */ -#define DF_1_GLOBAL 0x00000002 /* Set RTLD_GLOBAL for this object. */ -#define DF_1_GROUP 0x00000004 /* Set RTLD_GROUP for this object. */ -#define DF_1_NODELETE 0x00000008 /* Set RTLD_NODELETE for this object.*/ -#define DF_1_LOADFLTR 0x00000010 /* Trigger filtee loading at runtime.*/ -#define DF_1_INITFIRST 0x00000020 /* Set RTLD_INITFIRST for this object*/ -#define DF_1_NOOPEN 0x00000040 /* Set RTLD_NOOPEN for this object. */ -#define DF_1_ORIGIN 0x00000080 /* $ORIGIN must be handled. */ -#define DF_1_DIRECT 0x00000100 /* Direct binding enabled. */ -#define DF_1_TRANS 0x00000200 -#define DF_1_INTERPOSE 0x00000400 /* Object is used to interpose. */ -#define DF_1_NODEFLIB 0x00000800 /* Ignore default lib search path. */ -#define DF_1_NODUMP 0x00001000 /* Object can't be dldump'ed. */ -#define DF_1_CONFALT 0x00002000 /* Configuration alternative created.*/ -#define DF_1_ENDFILTEE 0x00004000 /* Filtee terminates filters search. */ -#define DF_1_DISPRELDNE 0x00008000 /* Disp reloc applied at build time. */ -#define DF_1_DISPRELPND 0x00010000 /* Disp reloc applied at run-time. */ - -/* Flags for the feature selection in DT_FEATURE_1. */ -#define DTF_1_PARINIT 0x00000001 -#define DTF_1_CONFEXP 0x00000002 - -/* Flags in the DT_POSFLAG_1 entry effecting only the next DT_* entry. */ -#define DF_P1_LAZYLOAD 0x00000001 /* Lazyload following object. */ -#define DF_P1_GROUPPERM 0x00000002 /* Symbols from next object are not - generally available. */ - -/* Version definition sections. */ - -typedef struct -{ - Elf32_Half vd_version; /* Version revision */ - Elf32_Half vd_flags; /* Version information */ - Elf32_Half vd_ndx; /* Version Index */ - Elf32_Half vd_cnt; /* Number of associated aux entries */ - Elf32_Word vd_hash; /* Version name hash value */ - Elf32_Word vd_aux; /* Offset in bytes to verdaux array */ - Elf32_Word vd_next; /* Offset in bytes to next verdef - entry */ -} Elf32_Verdef; - -typedef struct -{ - Elf64_Half vd_version; /* Version revision */ - Elf64_Half vd_flags; /* Version information */ - Elf64_Half vd_ndx; /* Version Index */ - Elf64_Half vd_cnt; /* Number of associated aux entries */ - Elf64_Word vd_hash; /* Version name hash value */ - Elf64_Word vd_aux; /* Offset in bytes to verdaux array */ - Elf64_Word vd_next; /* Offset in bytes to next verdef - entry */ -} Elf64_Verdef; - - -/* Legal values for vd_version (version revision). */ -#define VER_DEF_NONE 0 /* No version */ -#define VER_DEF_CURRENT 1 /* Current version */ -#define VER_DEF_NUM 2 /* Given version number */ - -/* Legal values for vd_flags (version information flags). */ -#define VER_FLG_BASE 0x1 /* Version definition of file itself */ -#define VER_FLG_WEAK 0x2 /* Weak version identifier */ - -/* Versym symbol index values. */ -#define VER_NDX_LOCAL 0 /* Symbol is local. */ -#define VER_NDX_GLOBAL 1 /* Symbol is global. */ -#define VER_NDX_LORESERVE 0xff00 /* Beginning of reserved entries. */ -#define VER_NDX_ELIMINATE 0xff01 /* Symbol is to be eliminated. */ - -/* Auxialiary version information. */ - -typedef struct -{ - Elf32_Word vda_name; /* Version or dependency names */ - Elf32_Word vda_next; /* Offset in bytes to next verdaux - entry */ -} Elf32_Verdaux; - -typedef struct -{ - Elf64_Word vda_name; /* Version or dependency names */ - Elf64_Word vda_next; /* Offset in bytes to next verdaux - entry */ -} Elf64_Verdaux; - - -/* Version dependency section. */ - -typedef struct -{ - Elf32_Half vn_version; /* Version of structure */ - Elf32_Half vn_cnt; /* Number of associated aux entries */ - Elf32_Word vn_file; /* Offset of filename for this - dependency */ - Elf32_Word vn_aux; /* Offset in bytes to vernaux array */ - Elf32_Word vn_next; /* Offset in bytes to next verneed - entry */ -} Elf32_Verneed; - -typedef struct -{ - Elf64_Half vn_version; /* Version of structure */ - Elf64_Half vn_cnt; /* Number of associated aux entries */ - Elf64_Word vn_file; /* Offset of filename for this - dependency */ - Elf64_Word vn_aux; /* Offset in bytes to vernaux array */ - Elf64_Word vn_next; /* Offset in bytes to next verneed - entry */ -} Elf64_Verneed; - - -/* Legal values for vn_version (version revision). */ -#define VER_NEED_NONE 0 /* No version */ -#define VER_NEED_CURRENT 1 /* Current version */ -#define VER_NEED_NUM 2 /* Given version number */ - -/* Auxiliary needed version information. */ - -typedef struct -{ - Elf32_Word vna_hash; /* Hash value of dependency name */ - Elf32_Half vna_flags; /* Dependency specific information */ - Elf32_Half vna_other; /* Unused */ - Elf32_Word vna_name; /* Dependency name string offset */ - Elf32_Word vna_next; /* Offset in bytes to next vernaux - entry */ -} Elf32_Vernaux; - -typedef struct -{ - Elf64_Word vna_hash; /* Hash value of dependency name */ - Elf64_Half vna_flags; /* Dependency specific information */ - Elf64_Half vna_other; /* Unused */ - Elf64_Word vna_name; /* Dependency name string offset */ - Elf64_Word vna_next; /* Offset in bytes to next vernaux - entry */ -} Elf64_Vernaux; - - -/* Legal values for vna_flags. */ -#define VER_FLG_WEAK 0x2 /* Weak version identifier */ - - -/* Auxiliary vector. */ - -/* This vector is normally only used by the program interpreter. The - usual definition in an ABI supplement uses the name auxv_t. The - vector is not usually defined in a standard file, but it - can't hurt. We rename it to avoid conflicts. The sizes of these - types are an arrangement between the exec server and the program - interpreter, so we don't fully specify them here. */ - -typedef struct -{ - int a_type; /* Entry type */ - union - { - long int a_val; /* Integer value */ - void *a_ptr; /* Pointer value */ - void (*a_fcn) (void); /* Function pointer value */ - } a_un; -} Elf32_auxv_t; - -typedef struct -{ - long int a_type; /* Entry type */ - union - { - long int a_val; /* Integer value */ - void *a_ptr; /* Pointer value */ - void (*a_fcn) (void); /* Function pointer value */ - } a_un; -} Elf64_auxv_t; - -/* Legal values for a_type (entry type). */ - -#define AT_NULL 0 /* End of vector */ -#define AT_IGNORE 1 /* Entry should be ignored */ -#define AT_EXECFD 2 /* File descriptor of program */ -#define AT_PHDR 3 /* Program headers for program */ -#define AT_PHENT 4 /* Size of program header entry */ -#define AT_PHNUM 5 /* Number of program headers */ -#define AT_PAGESZ 6 /* System page size */ -#define AT_BASE 7 /* Base address of interpreter */ -#define AT_FLAGS 8 /* Flags */ -#define AT_ENTRY 9 /* Entry point of program */ -#define AT_NOTELF 10 /* Program is not ELF */ -#define AT_UID 11 /* Real uid */ -#define AT_EUID 12 /* Effective uid */ -#define AT_GID 13 /* Real gid */ -#define AT_EGID 14 /* Effective gid */ -#define AT_CLKTCK 17 /* Frequency of times() */ - -/* Some more special a_type values describing the hardware. */ -#define AT_PLATFORM 15 /* String identifying platform. */ -#define AT_HWCAP 16 /* Machine dependent hints about - processor capabilities. */ - -/* This entry gives some information about the FPU initialization - performed by the kernel. */ -#define AT_FPUCW 18 /* Used FPU control word. */ - -/* Cache block sizes. */ -#define AT_DCACHEBSIZE 19 /* Data cache block size. */ -#define AT_ICACHEBSIZE 20 /* Instruction cache block size. */ -#define AT_UCACHEBSIZE 21 /* Unified cache block size. */ - -/* A special ignored value for PPC, used by the kernel to control the - interpretation of the AUXV. Must be > 16. */ -#define AT_IGNOREPPC 22 /* Entry should be ignored */ - - -/* Note section contents. Each entry in the note section begins with - a header of a fixed form. */ - -typedef struct -{ - Elf32_Word n_namesz; /* Length of the note's name. */ - Elf32_Word n_descsz; /* Length of the note's descriptor. */ - Elf32_Word n_type; /* Type of the note. */ -} Elf32_Nhdr; - -typedef struct -{ - Elf64_Word n_namesz; /* Length of the note's name. */ - Elf64_Word n_descsz; /* Length of the note's descriptor. */ - Elf64_Word n_type; /* Type of the note. */ -} Elf64_Nhdr; - -/* Known names of notes. */ - -/* Solaris entries in the note section have this name. */ -#define ELF_NOTE_SOLARIS "SUNW Solaris" - -/* Note entries for GNU systems have this name. */ -#define ELF_NOTE_GNU "GNU" - - -/* Defined types of notes for Solaris. */ - -/* Value of descriptor (one word) is desired pagesize for the binary. */ -#define ELF_NOTE_PAGESIZE_HINT 1 - - -/* Defined note types for GNU systems. */ - -/* ABI information. The descriptor consists of words: - word 0: OS descriptor - word 1: major version of the ABI - word 2: minor version of the ABI - word 3: subminor version of the ABI -*/ -#define ELF_NOTE_ABI 1 - -/* Known OSes. These value can appear in word 0 of an ELF_NOTE_ABI - note section entry. */ -#define ELF_NOTE_OS_LINUX 0 -#define ELF_NOTE_OS_GNU 1 -#define ELF_NOTE_OS_SOLARIS2 2 - - -/* Move records. */ -typedef struct -{ - Elf32_Xword m_value; /* Symbol value. */ - Elf32_Word m_info; /* Size and index. */ - Elf32_Word m_poffset; /* Symbol offset. */ - Elf32_Half m_repeat; /* Repeat count. */ - Elf32_Half m_stride; /* Stride info. */ -} Elf32_Move; - -typedef struct -{ - Elf64_Xword m_value; /* Symbol value. */ - Elf64_Xword m_info; /* Size and index. */ - Elf64_Xword m_poffset; /* Symbol offset. */ - Elf64_Half m_repeat; /* Repeat count. */ - Elf64_Half m_stride; /* Stride info. */ -} Elf64_Move; - -/* Macro to construct move records. */ -#define ELF32_M_SYM(info) ((info) >> 8) -#define ELF32_M_SIZE(info) ((unsigned char) (info)) -#define ELF32_M_INFO(sym, size) (((sym) << 8) + (unsigned char) (size)) - -#define ELF64_M_SYM(info) ELF32_M_SYM (info) -#define ELF64_M_SIZE(info) ELF32_M_SIZE (info) -#define ELF64_M_INFO(sym, size) ELF32_M_INFO (sym, size) - - -/* Motorola 68k specific definitions. */ - -/* Values for Elf32_Ehdr.e_flags. */ -#define EF_CPU32 0x00810000 - -/* m68k relocs. */ - -#define R_68K_NONE 0 /* No reloc */ -#define R_68K_32 1 /* Direct 32 bit */ -#define R_68K_16 2 /* Direct 16 bit */ -#define R_68K_8 3 /* Direct 8 bit */ -#define R_68K_PC32 4 /* PC relative 32 bit */ -#define R_68K_PC16 5 /* PC relative 16 bit */ -#define R_68K_PC8 6 /* PC relative 8 bit */ -#define R_68K_GOT32 7 /* 32 bit PC relative GOT entry */ -#define R_68K_GOT16 8 /* 16 bit PC relative GOT entry */ -#define R_68K_GOT8 9 /* 8 bit PC relative GOT entry */ -#define R_68K_GOT32O 10 /* 32 bit GOT offset */ -#define R_68K_GOT16O 11 /* 16 bit GOT offset */ -#define R_68K_GOT8O 12 /* 8 bit GOT offset */ -#define R_68K_PLT32 13 /* 32 bit PC relative PLT address */ -#define R_68K_PLT16 14 /* 16 bit PC relative PLT address */ -#define R_68K_PLT8 15 /* 8 bit PC relative PLT address */ -#define R_68K_PLT32O 16 /* 32 bit PLT offset */ -#define R_68K_PLT16O 17 /* 16 bit PLT offset */ -#define R_68K_PLT8O 18 /* 8 bit PLT offset */ -#define R_68K_COPY 19 /* Copy symbol at runtime */ -#define R_68K_GLOB_DAT 20 /* Create GOT entry */ -#define R_68K_JMP_SLOT 21 /* Create PLT entry */ -#define R_68K_RELATIVE 22 /* Adjust by program base */ -/* Keep this the last entry. */ -#define R_68K_NUM 23 - -/* Intel 80386 specific definitions. */ - -/* i386 relocs. */ - -#define R_386_NONE 0 /* No reloc */ -#define R_386_32 1 /* Direct 32 bit */ -#define R_386_PC32 2 /* PC relative 32 bit */ -#define R_386_GOT32 3 /* 32 bit GOT entry */ -#define R_386_PLT32 4 /* 32 bit PLT address */ -#define R_386_COPY 5 /* Copy symbol at runtime */ -#define R_386_GLOB_DAT 6 /* Create GOT entry */ -#define R_386_JMP_SLOT 7 /* Create PLT entry */ -#define R_386_RELATIVE 8 /* Adjust by program base */ -#define R_386_GOTOFF 9 /* 32 bit offset to GOT */ -#define R_386_GOTPC 10 /* 32 bit PC relative offset to GOT */ -/* Keep this the last entry. */ -#define R_386_NUM 11 - -/* SUN SPARC specific definitions. */ - -/* Legal values for ST_TYPE subfield of st_info (symbol type). */ - -#define STT_REGISTER 13 /* Global register reserved to app. */ - -/* Values for Elf64_Ehdr.e_flags. */ - -#define EF_SPARCV9_MM 3 -#define EF_SPARCV9_TSO 0 -#define EF_SPARCV9_PSO 1 -#define EF_SPARCV9_RMO 2 -#define EF_SPARC_LEDATA 0x800000 /* little endian data */ -#define EF_SPARC_EXT_MASK 0xFFFF00 -#define EF_SPARC_32PLUS 0x000100 /* generic V8+ features */ -#define EF_SPARC_SUN_US1 0x000200 /* Sun UltraSPARC1 extensions */ -#define EF_SPARC_HAL_R1 0x000400 /* HAL R1 extensions */ -#define EF_SPARC_SUN_US3 0x000800 /* Sun UltraSPARCIII extensions */ - -/* SPARC relocs. */ - -#define R_SPARC_NONE 0 /* No reloc */ -#define R_SPARC_8 1 /* Direct 8 bit */ -#define R_SPARC_16 2 /* Direct 16 bit */ -#define R_SPARC_32 3 /* Direct 32 bit */ -#define R_SPARC_DISP8 4 /* PC relative 8 bit */ -#define R_SPARC_DISP16 5 /* PC relative 16 bit */ -#define R_SPARC_DISP32 6 /* PC relative 32 bit */ -#define R_SPARC_WDISP30 7 /* PC relative 30 bit shifted */ -#define R_SPARC_WDISP22 8 /* PC relative 22 bit shifted */ -#define R_SPARC_HI22 9 /* High 22 bit */ -#define R_SPARC_22 10 /* Direct 22 bit */ -#define R_SPARC_13 11 /* Direct 13 bit */ -#define R_SPARC_LO10 12 /* Truncated 10 bit */ -#define R_SPARC_GOT10 13 /* Truncated 10 bit GOT entry */ -#define R_SPARC_GOT13 14 /* 13 bit GOT entry */ -#define R_SPARC_GOT22 15 /* 22 bit GOT entry shifted */ -#define R_SPARC_PC10 16 /* PC relative 10 bit truncated */ -#define R_SPARC_PC22 17 /* PC relative 22 bit shifted */ -#define R_SPARC_WPLT30 18 /* 30 bit PC relative PLT address */ -#define R_SPARC_COPY 19 /* Copy symbol at runtime */ -#define R_SPARC_GLOB_DAT 20 /* Create GOT entry */ -#define R_SPARC_JMP_SLOT 21 /* Create PLT entry */ -#define R_SPARC_RELATIVE 22 /* Adjust by program base */ -#define R_SPARC_UA32 23 /* Direct 32 bit unaligned */ - -/* Additional Sparc64 relocs. */ - -#define R_SPARC_PLT32 24 /* Direct 32 bit ref to PLT entry */ -#define R_SPARC_HIPLT22 25 /* High 22 bit PLT entry */ -#define R_SPARC_LOPLT10 26 /* Truncated 10 bit PLT entry */ -#define R_SPARC_PCPLT32 27 /* PC rel 32 bit ref to PLT entry */ -#define R_SPARC_PCPLT22 28 /* PC rel high 22 bit PLT entry */ -#define R_SPARC_PCPLT10 29 /* PC rel trunc 10 bit PLT entry */ -#define R_SPARC_10 30 /* Direct 10 bit */ -#define R_SPARC_11 31 /* Direct 11 bit */ -#define R_SPARC_64 32 /* Direct 64 bit */ -#define R_SPARC_OLO10 33 /* 10bit with secondary 13bit addend */ -#define R_SPARC_HH22 34 /* Top 22 bits of direct 64 bit */ -#define R_SPARC_HM10 35 /* High middle 10 bits of ... */ -#define R_SPARC_LM22 36 /* Low middle 22 bits of ... */ -#define R_SPARC_PC_HH22 37 /* Top 22 bits of pc rel 64 bit */ -#define R_SPARC_PC_HM10 38 /* High middle 10 bit of ... */ -#define R_SPARC_PC_LM22 39 /* Low miggle 22 bits of ... */ -#define R_SPARC_WDISP16 40 /* PC relative 16 bit shifted */ -#define R_SPARC_WDISP19 41 /* PC relative 19 bit shifted */ -#define R_SPARC_7 43 /* Direct 7 bit */ -#define R_SPARC_5 44 /* Direct 5 bit */ -#define R_SPARC_6 45 /* Direct 6 bit */ -#define R_SPARC_DISP64 46 /* PC relative 64 bit */ -#define R_SPARC_PLT64 47 /* Direct 64 bit ref to PLT entry */ -#define R_SPARC_HIX22 48 /* High 22 bit complemented */ -#define R_SPARC_LOX10 49 /* Truncated 11 bit complemented */ -#define R_SPARC_H44 50 /* Direct high 12 of 44 bit */ -#define R_SPARC_M44 51 /* Direct mid 22 of 44 bit */ -#define R_SPARC_L44 52 /* Direct low 10 of 44 bit */ -#define R_SPARC_REGISTER 53 /* Global register usage */ -#define R_SPARC_UA64 54 /* Direct 64 bit unaligned */ -#define R_SPARC_UA16 55 /* Direct 16 bit unaligned */ -/* Keep this the last entry. */ -#define R_SPARC_NUM 56 - -/* For Sparc64, legal values for d_tag of Elf64_Dyn. */ - -#define DT_SPARC_REGISTER 0x70000001 -#define DT_SPARC_NUM 2 - -/* Bits present in AT_HWCAP, primarily for Sparc32. */ - -#define HWCAP_SPARC_FLUSH 1 /* The cpu supports flush insn. */ -#define HWCAP_SPARC_STBAR 2 -#define HWCAP_SPARC_SWAP 4 -#define HWCAP_SPARC_MULDIV 8 -#define HWCAP_SPARC_V9 16 /* The cpu is v9, so v8plus is ok. */ -#define HWCAP_SPARC_ULTRA3 32 - -/* MIPS R3000 specific definitions. */ - -/* Legal values for e_flags field of Elf32_Ehdr. */ - -#define EF_MIPS_NOREORDER 1 /* A .noreorder directive was used */ -#define EF_MIPS_PIC 2 /* Contains PIC code */ -#define EF_MIPS_CPIC 4 /* Uses PIC calling sequence */ -#define EF_MIPS_XGOT 8 -#define EF_MIPS_64BIT_WHIRL 16 -#define EF_MIPS_ABI2 32 -#define EF_MIPS_ABI_ON32 64 -#define EF_MIPS_ARCH 0xf0000000 /* MIPS architecture level */ - -/* Legal values for MIPS architecture level. */ - -#define EF_MIPS_ARCH_1 0x00000000 /* -mips1 code. */ -#define EF_MIPS_ARCH_2 0x10000000 /* -mips2 code. */ -#define EF_MIPS_ARCH_3 0x20000000 /* -mips3 code. */ -#define EF_MIPS_ARCH_4 0x30000000 /* -mips4 code. */ -#define EF_MIPS_ARCH_5 0x40000000 /* -mips5 code. */ -#define EF_MIPS_ARCH_32 0x60000000 /* MIPS32 code. */ -#define EF_MIPS_ARCH_64 0x70000000 /* MIPS64 code. */ - -/* The following are non-official names and should not be used. */ - -#define E_MIPS_ARCH_1 0x00000000 /* -mips1 code. */ -#define E_MIPS_ARCH_2 0x10000000 /* -mips2 code. */ -#define E_MIPS_ARCH_3 0x20000000 /* -mips3 code. */ -#define E_MIPS_ARCH_4 0x30000000 /* -mips4 code. */ -#define E_MIPS_ARCH_5 0x40000000 /* -mips5 code. */ -#define E_MIPS_ARCH_32 0x60000000 /* MIPS32 code. */ -#define E_MIPS_ARCH_64 0x70000000 /* MIPS64 code. */ - -/* Special section indices. */ - -#define SHN_MIPS_ACOMMON 0xff00 /* Allocated common symbols */ -#define SHN_MIPS_TEXT 0xff01 /* Allocated test symbols. */ -#define SHN_MIPS_DATA 0xff02 /* Allocated data symbols. */ -#define SHN_MIPS_SCOMMON 0xff03 /* Small common symbols */ -#define SHN_MIPS_SUNDEFINED 0xff04 /* Small undefined symbols */ - -/* Legal values for sh_type field of Elf32_Shdr. */ - -#define SHT_MIPS_LIBLIST 0x70000000 /* Shared objects used in link */ -#define SHT_MIPS_MSYM 0x70000001 -#define SHT_MIPS_CONFLICT 0x70000002 /* Conflicting symbols */ -#define SHT_MIPS_GPTAB 0x70000003 /* Global data area sizes */ -#define SHT_MIPS_UCODE 0x70000004 /* Reserved for SGI/MIPS compilers */ -#define SHT_MIPS_DEBUG 0x70000005 /* MIPS ECOFF debugging information*/ -#define SHT_MIPS_REGINFO 0x70000006 /* Register usage information */ -#define SHT_MIPS_PACKAGE 0x70000007 -#define SHT_MIPS_PACKSYM 0x70000008 -#define SHT_MIPS_RELD 0x70000009 -#define SHT_MIPS_IFACE 0x7000000b -#define SHT_MIPS_CONTENT 0x7000000c -#define SHT_MIPS_OPTIONS 0x7000000d /* Miscellaneous options. */ -#define SHT_MIPS_SHDR 0x70000010 -#define SHT_MIPS_FDESC 0x70000011 -#define SHT_MIPS_EXTSYM 0x70000012 -#define SHT_MIPS_DENSE 0x70000013 -#define SHT_MIPS_PDESC 0x70000014 -#define SHT_MIPS_LOCSYM 0x70000015 -#define SHT_MIPS_AUXSYM 0x70000016 -#define SHT_MIPS_OPTSYM 0x70000017 -#define SHT_MIPS_LOCSTR 0x70000018 -#define SHT_MIPS_LINE 0x70000019 -#define SHT_MIPS_RFDESC 0x7000001a -#define SHT_MIPS_DELTASYM 0x7000001b -#define SHT_MIPS_DELTAINST 0x7000001c -#define SHT_MIPS_DELTACLASS 0x7000001d -#define SHT_MIPS_DWARF 0x7000001e /* DWARF debugging information. */ -#define SHT_MIPS_DELTADECL 0x7000001f -#define SHT_MIPS_SYMBOL_LIB 0x70000020 -#define SHT_MIPS_EVENTS 0x70000021 /* Event section. */ -#define SHT_MIPS_TRANSLATE 0x70000022 -#define SHT_MIPS_PIXIE 0x70000023 -#define SHT_MIPS_XLATE 0x70000024 -#define SHT_MIPS_XLATE_DEBUG 0x70000025 -#define SHT_MIPS_WHIRL 0x70000026 -#define SHT_MIPS_EH_REGION 0x70000027 -#define SHT_MIPS_XLATE_OLD 0x70000028 -#define SHT_MIPS_PDR_EXCEPTION 0x70000029 - -/* Legal values for sh_flags field of Elf32_Shdr. */ - -#define SHF_MIPS_GPREL 0x10000000 /* Must be part of global data area */ -#define SHF_MIPS_MERGE 0x20000000 -#define SHF_MIPS_ADDR 0x40000000 -#define SHF_MIPS_STRINGS 0x80000000 -#define SHF_MIPS_NOSTRIP 0x08000000 -#define SHF_MIPS_LOCAL 0x04000000 -#define SHF_MIPS_NAMES 0x02000000 -#define SHF_MIPS_NODUPE 0x01000000 - - -/* Symbol tables. */ - -/* MIPS specific values for `st_other'. */ -#define STO_MIPS_DEFAULT 0x0 -#define STO_MIPS_INTERNAL 0x1 -#define STO_MIPS_HIDDEN 0x2 -#define STO_MIPS_PROTECTED 0x3 -#define STO_MIPS_SC_ALIGN_UNUSED 0xff - -/* MIPS specific values for `st_info'. */ -#define STB_MIPS_SPLIT_COMMON 13 - -/* Entries found in sections of type SHT_MIPS_GPTAB. */ - -typedef union -{ - struct - { - Elf32_Word gt_current_g_value; /* -G value used for compilation */ - Elf32_Word gt_unused; /* Not used */ - } gt_header; /* First entry in section */ - struct - { - Elf32_Word gt_g_value; /* If this value were used for -G */ - Elf32_Word gt_bytes; /* This many bytes would be used */ - } gt_entry; /* Subsequent entries in section */ -} Elf32_gptab; - -/* Entry found in sections of type SHT_MIPS_REGINFO. */ - -typedef struct -{ - Elf32_Word ri_gprmask; /* General registers used */ - Elf32_Word ri_cprmask[4]; /* Coprocessor registers used */ - Elf32_Sword ri_gp_value; /* $gp register value */ -} Elf32_RegInfo; - -/* Entries found in sections of type SHT_MIPS_OPTIONS. */ - -typedef struct -{ - unsigned char kind; /* Determines interpretation of the - variable part of descriptor. */ - unsigned char size; /* Size of descriptor, including header. */ - Elf32_Section section; /* Section header index of section affected, - 0 for global options. */ - Elf32_Word info; /* Kind-specific information. */ -} Elf_Options; - -/* Values for `kind' field in Elf_Options. */ - -#define ODK_NULL 0 /* Undefined. */ -#define ODK_REGINFO 1 /* Register usage information. */ -#define ODK_EXCEPTIONS 2 /* Exception processing options. */ -#define ODK_PAD 3 /* Section padding options. */ -#define ODK_HWPATCH 4 /* Hardware workarounds performed */ -#define ODK_FILL 5 /* record the fill value used by the linker. */ -#define ODK_TAGS 6 /* reserve space for desktop tools to write. */ -#define ODK_HWAND 7 /* HW workarounds. 'AND' bits when merging. */ -#define ODK_HWOR 8 /* HW workarounds. 'OR' bits when merging. */ - -/* Values for `info' in Elf_Options for ODK_EXCEPTIONS entries. */ - -#define OEX_FPU_MIN 0x1f /* FPE's which MUST be enabled. */ -#define OEX_FPU_MAX 0x1f00 /* FPE's which MAY be enabled. */ -#define OEX_PAGE0 0x10000 /* page zero must be mapped. */ -#define OEX_SMM 0x20000 /* Force sequential memory mode? */ -#define OEX_FPDBUG 0x40000 /* Force floating point debug mode? */ -#define OEX_PRECISEFP OEX_FPDBUG -#define OEX_DISMISS 0x80000 /* Dismiss invalid address faults? */ - -#define OEX_FPU_INVAL 0x10 -#define OEX_FPU_DIV0 0x08 -#define OEX_FPU_OFLO 0x04 -#define OEX_FPU_UFLO 0x02 -#define OEX_FPU_INEX 0x01 - -/* Masks for `info' in Elf_Options for an ODK_HWPATCH entry. */ - -#define OHW_R4KEOP 0x1 /* R4000 end-of-page patch. */ -#define OHW_R8KPFETCH 0x2 /* may need R8000 prefetch patch. */ -#define OHW_R5KEOP 0x4 /* R5000 end-of-page patch. */ -#define OHW_R5KCVTL 0x8 /* R5000 cvt.[ds].l bug. clean=1. */ - -#define OPAD_PREFIX 0x1 -#define OPAD_POSTFIX 0x2 -#define OPAD_SYMBOL 0x4 - -/* Entry found in `.options' section. */ - -typedef struct -{ - Elf32_Word hwp_flags1; /* Extra flags. */ - Elf32_Word hwp_flags2; /* Extra flags. */ -} Elf_Options_Hw; - -/* Masks for `info' in ElfOptions for ODK_HWAND and ODK_HWOR entries. */ - -#define OHWA0_R4KEOP_CHECKED 0x00000001 -#define OHWA1_R4KEOP_CLEAN 0x00000002 - -/* MIPS relocs. */ - -#define R_MIPS_NONE 0 /* No reloc */ -#define R_MIPS_16 1 /* Direct 16 bit */ -#define R_MIPS_32 2 /* Direct 32 bit */ -#define R_MIPS_REL32 3 /* PC relative 32 bit */ -#define R_MIPS_26 4 /* Direct 26 bit shifted */ -#define R_MIPS_HI16 5 /* High 16 bit */ -#define R_MIPS_LO16 6 /* Low 16 bit */ -#define R_MIPS_GPREL16 7 /* GP relative 16 bit */ -#define R_MIPS_LITERAL 8 /* 16 bit literal entry */ -#define R_MIPS_GOT16 9 /* 16 bit GOT entry */ -#define R_MIPS_PC16 10 /* PC relative 16 bit */ -#define R_MIPS_CALL16 11 /* 16 bit GOT entry for function */ -#define R_MIPS_GPREL32 12 /* GP relative 32 bit */ - -#define R_MIPS_SHIFT5 16 -#define R_MIPS_SHIFT6 17 -#define R_MIPS_64 18 -#define R_MIPS_GOT_DISP 19 -#define R_MIPS_GOT_PAGE 20 -#define R_MIPS_GOT_OFST 21 -#define R_MIPS_GOT_HI16 22 -#define R_MIPS_GOT_LO16 23 -#define R_MIPS_SUB 24 -#define R_MIPS_INSERT_A 25 -#define R_MIPS_INSERT_B 26 -#define R_MIPS_DELETE 27 -#define R_MIPS_HIGHER 28 -#define R_MIPS_HIGHEST 29 -#define R_MIPS_CALL_HI16 30 -#define R_MIPS_CALL_LO16 31 -#define R_MIPS_SCN_DISP 32 -#define R_MIPS_REL16 33 -#define R_MIPS_ADD_IMMEDIATE 34 -#define R_MIPS_PJUMP 35 -#define R_MIPS_RELGOT 36 -#define R_MIPS_JALR 37 -/* Keep this the last entry. */ -#define R_MIPS_NUM 38 - -/* Legal values for p_type field of Elf32_Phdr. */ - -#define PT_MIPS_REGINFO 0x70000000 /* Register usage information */ -#define PT_MIPS_RTPROC 0x70000001 /* Runtime procedure table. */ -#define PT_MIPS_OPTIONS 0x70000002 - -/* Special program header types. */ - -#define PF_MIPS_LOCAL 0x10000000 - -/* Legal values for d_tag field of Elf32_Dyn. */ - -#define DT_MIPS_RLD_VERSION 0x70000001 /* Runtime linker interface version */ -#define DT_MIPS_TIME_STAMP 0x70000002 /* Timestamp */ -#define DT_MIPS_ICHECKSUM 0x70000003 /* Checksum */ -#define DT_MIPS_IVERSION 0x70000004 /* Version string (string tbl index) */ -#define DT_MIPS_FLAGS 0x70000005 /* Flags */ -#define DT_MIPS_BASE_ADDRESS 0x70000006 /* Base address */ -#define DT_MIPS_MSYM 0x70000007 -#define DT_MIPS_CONFLICT 0x70000008 /* Address of CONFLICT section */ -#define DT_MIPS_LIBLIST 0x70000009 /* Address of LIBLIST section */ -#define DT_MIPS_LOCAL_GOTNO 0x7000000a /* Number of local GOT entries */ -#define DT_MIPS_CONFLICTNO 0x7000000b /* Number of CONFLICT entries */ -#define DT_MIPS_LIBLISTNO 0x70000010 /* Number of LIBLIST entries */ -#define DT_MIPS_SYMTABNO 0x70000011 /* Number of DYNSYM entries */ -#define DT_MIPS_UNREFEXTNO 0x70000012 /* First external DYNSYM */ -#define DT_MIPS_GOTSYM 0x70000013 /* First GOT entry in DYNSYM */ -#define DT_MIPS_HIPAGENO 0x70000014 /* Number of GOT page table entries */ -#define DT_MIPS_RLD_MAP 0x70000016 /* Address of run time loader map. */ -#define DT_MIPS_DELTA_CLASS 0x70000017 /* Delta C++ class definition. */ -#define DT_MIPS_DELTA_CLASS_NO 0x70000018 /* Number of entries in - DT_MIPS_DELTA_CLASS. */ -#define DT_MIPS_DELTA_INSTANCE 0x70000019 /* Delta C++ class instances. */ -#define DT_MIPS_DELTA_INSTANCE_NO 0x7000001a /* Number of entries in - DT_MIPS_DELTA_INSTANCE. */ -#define DT_MIPS_DELTA_RELOC 0x7000001b /* Delta relocations. */ -#define DT_MIPS_DELTA_RELOC_NO 0x7000001c /* Number of entries in - DT_MIPS_DELTA_RELOC. */ -#define DT_MIPS_DELTA_SYM 0x7000001d /* Delta symbols that Delta - relocations refer to. */ -#define DT_MIPS_DELTA_SYM_NO 0x7000001e /* Number of entries in - DT_MIPS_DELTA_SYM. */ -#define DT_MIPS_DELTA_CLASSSYM 0x70000020 /* Delta symbols that hold the - class declaration. */ -#define DT_MIPS_DELTA_CLASSSYM_NO 0x70000021 /* Number of entries in - DT_MIPS_DELTA_CLASSSYM. */ -#define DT_MIPS_CXX_FLAGS 0x70000022 /* Flags indicating for C++ flavor. */ -#define DT_MIPS_PIXIE_INIT 0x70000023 -#define DT_MIPS_SYMBOL_LIB 0x70000024 -#define DT_MIPS_LOCALPAGE_GOTIDX 0x70000025 -#define DT_MIPS_LOCAL_GOTIDX 0x70000026 -#define DT_MIPS_HIDDEN_GOTIDX 0x70000027 -#define DT_MIPS_PROTECTED_GOTIDX 0x70000028 -#define DT_MIPS_OPTIONS 0x70000029 /* Address of .options. */ -#define DT_MIPS_INTERFACE 0x7000002a /* Address of .interface. */ -#define DT_MIPS_DYNSTR_ALIGN 0x7000002b -#define DT_MIPS_INTERFACE_SIZE 0x7000002c /* Size of the .interface section. */ -#define DT_MIPS_RLD_TEXT_RESOLVE_ADDR 0x7000002d /* Address of rld_text_rsolve - function stored in GOT. */ -#define DT_MIPS_PERF_SUFFIX 0x7000002e /* Default suffix of dso to be added - by rld on dlopen() calls. */ -#define DT_MIPS_COMPACT_SIZE 0x7000002f /* (O32)Size of compact rel section. */ -#define DT_MIPS_GP_VALUE 0x70000030 /* GP value for aux GOTs. */ -#define DT_MIPS_AUX_DYNAMIC 0x70000031 /* Address of aux .dynamic. */ -#define DT_MIPS_NUM 0x32 - -/* Legal values for DT_MIPS_FLAGS Elf32_Dyn entry. */ - -#define RHF_NONE 0 /* No flags */ -#define RHF_QUICKSTART (1 << 0) /* Use quickstart */ -#define RHF_NOTPOT (1 << 1) /* Hash size not power of 2 */ -#define RHF_NO_LIBRARY_REPLACEMENT (1 << 2) /* Ignore LD_LIBRARY_PATH */ -#define RHF_NO_MOVE (1 << 3) -#define RHF_SGI_ONLY (1 << 4) -#define RHF_GUARANTEE_INIT (1 << 5) -#define RHF_DELTA_C_PLUS_PLUS (1 << 6) -#define RHF_GUARANTEE_START_INIT (1 << 7) -#define RHF_PIXIE (1 << 8) -#define RHF_DEFAULT_DELAY_LOAD (1 << 9) -#define RHF_REQUICKSTART (1 << 10) -#define RHF_REQUICKSTARTED (1 << 11) -#define RHF_CORD (1 << 12) -#define RHF_NO_UNRES_UNDEF (1 << 13) -#define RHF_RLD_ORDER_SAFE (1 << 14) - -/* Entries found in sections of type SHT_MIPS_LIBLIST. */ - -typedef struct -{ - Elf32_Word l_name; /* Name (string table index) */ - Elf32_Word l_time_stamp; /* Timestamp */ - Elf32_Word l_checksum; /* Checksum */ - Elf32_Word l_version; /* Interface version */ - Elf32_Word l_flags; /* Flags */ -} Elf32_Lib; - -typedef struct -{ - Elf64_Word l_name; /* Name (string table index) */ - Elf64_Word l_time_stamp; /* Timestamp */ - Elf64_Word l_checksum; /* Checksum */ - Elf64_Word l_version; /* Interface version */ - Elf64_Word l_flags; /* Flags */ -} Elf64_Lib; - - -/* Legal values for l_flags. */ - -#define LL_NONE 0 -#define LL_EXACT_MATCH (1 << 0) /* Require exact match */ -#define LL_IGNORE_INT_VER (1 << 1) /* Ignore interface version */ -#define LL_REQUIRE_MINOR (1 << 2) -#define LL_EXPORTS (1 << 3) -#define LL_DELAY_LOAD (1 << 4) -#define LL_DELTA (1 << 5) - -/* Entries found in sections of type SHT_MIPS_CONFLICT. */ - -typedef Elf32_Addr Elf32_Conflict; - - -/* HPPA specific definitions. */ - -/* Legal values for e_flags field of Elf32_Ehdr. */ - -#define EF_PARISC_TRAPNIL 0x00010000 /* Trap nil pointer dereference. */ -#define EF_PARISC_EXT 0x00020000 /* Program uses arch. extensions. */ -#define EF_PARISC_LSB 0x00040000 /* Program expects little endian. */ -#define EF_PARISC_WIDE 0x00080000 /* Program expects wide mode. */ -#define EF_PARISC_NO_KABP 0x00100000 /* No kernel assisted branch - prediction. */ -#define EF_PARISC_LAZYSWAP 0x00400000 /* Allow lazy swapping. */ -#define EF_PARISC_ARCH 0x0000ffff /* Architecture version. */ - -/* Defined values for `e_flags & EF_PARISC_ARCH' are: */ - -#define EFA_PARISC_1_0 0x020b /* PA-RISC 1.0 big-endian. */ -#define EFA_PARISC_1_1 0x0210 /* PA-RISC 1.1 big-endian. */ -#define EFA_PARISC_2_0 0x0214 /* PA-RISC 2.0 big-endian. */ - -/* Additional section indeces. */ - -#define SHN_PARISC_ANSI_COMMON 0xff00 /* Section for tenatively declared - symbols in ANSI C. */ -#define SHN_PARISC_HUGE_COMMON 0xff01 /* Common blocks in huge model. */ - -/* Legal values for sh_type field of Elf32_Shdr. */ - -#define SHT_PARISC_EXT 0x70000000 /* Contains product specific ext. */ -#define SHT_PARISC_UNWIND 0x70000001 /* Unwind information. */ -#define SHT_PARISC_DOC 0x70000002 /* Debug info for optimized code. */ - -/* Legal values for sh_flags field of Elf32_Shdr. */ - -#define SHF_PARISC_SHORT 0x20000000 /* Section with short addressing. */ -#define SHF_PARISC_HUGE 0x40000000 /* Section far from gp. */ -#define SHF_PARISC_SBP 0x80000000 /* Static branch prediction code. */ - -/* Legal values for ST_TYPE subfield of st_info (symbol type). */ - -#define STT_PARISC_MILLICODE 13 /* Millicode function entry point. */ - -#define STT_HP_OPAQUE (STT_LOOS + 0x1) -#define STT_HP_STUB (STT_LOOS + 0x2) - -/* HPPA relocs. */ - -#define R_PARISC_NONE 0 /* No reloc. */ -#define R_PARISC_DIR32 1 /* Direct 32-bit reference. */ -#define R_PARISC_DIR21L 2 /* Left 21 bits of eff. address. */ -#define R_PARISC_DIR17R 3 /* Right 17 bits of eff. address. */ -#define R_PARISC_DIR17F 4 /* 17 bits of eff. address. */ -#define R_PARISC_DIR14R 6 /* Right 14 bits of eff. address. */ -#define R_PARISC_PCREL32 9 /* 32-bit rel. address. */ -#define R_PARISC_PCREL21L 10 /* Left 21 bits of rel. address. */ -#define R_PARISC_PCREL17R 11 /* Right 17 bits of rel. address. */ -#define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */ -#define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */ -#define R_PARISC_DPREL21L 18 /* Left 21 bits of rel. address. */ -#define R_PARISC_DPREL14R 22 /* Right 14 bits of rel. address. */ -#define R_PARISC_GPREL21L 26 /* GP-relative, left 21 bits. */ -#define R_PARISC_GPREL14R 30 /* GP-relative, right 14 bits. */ -#define R_PARISC_LTOFF21L 34 /* LT-relative, left 21 bits. */ -#define R_PARISC_LTOFF14R 38 /* LT-relative, right 14 bits. */ -#define R_PARISC_SECREL32 41 /* 32 bits section rel. address. */ -#define R_PARISC_SEGBASE 48 /* No relocation, set segment base. */ -#define R_PARISC_SEGREL32 49 /* 32 bits segment rel. address. */ -#define R_PARISC_PLTOFF21L 50 /* PLT rel. address, left 21 bits. */ -#define R_PARISC_PLTOFF14R 54 /* PLT rel. address, right 14 bits. */ -#define R_PARISC_LTOFF_FPTR32 57 /* 32 bits LT-rel. function pointer. */ -#define R_PARISC_LTOFF_FPTR21L 58 /* LT-rel. fct ptr, left 21 bits. */ -#define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */ -#define R_PARISC_FPTR64 64 /* 64 bits function address. */ -#define R_PARISC_PLABEL32 65 /* 32 bits function address. */ -#define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */ -#define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */ -#define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */ -#define R_PARISC_PCREL14DR 76 /* PC rel. address, right 14 bits. */ -#define R_PARISC_PCREL16F 77 /* 16 bits PC-rel. address. */ -#define R_PARISC_PCREL16WF 78 /* 16 bits PC-rel. address. */ -#define R_PARISC_PCREL16DF 79 /* 16 bits PC-rel. address. */ -#define R_PARISC_DIR64 80 /* 64 bits of eff. address. */ -#define R_PARISC_DIR14WR 83 /* 14 bits of eff. address. */ -#define R_PARISC_DIR14DR 84 /* 14 bits of eff. address. */ -#define R_PARISC_DIR16F 85 /* 16 bits of eff. address. */ -#define R_PARISC_DIR16WF 86 /* 16 bits of eff. address. */ -#define R_PARISC_DIR16DF 87 /* 16 bits of eff. address. */ -#define R_PARISC_GPREL64 88 /* 64 bits of GP-rel. address. */ -#define R_PARISC_GPREL14WR 91 /* GP-rel. address, right 14 bits. */ -#define R_PARISC_GPREL14DR 92 /* GP-rel. address, right 14 bits. */ -#define R_PARISC_GPREL16F 93 /* 16 bits GP-rel. address. */ -#define R_PARISC_GPREL16WF 94 /* 16 bits GP-rel. address. */ -#define R_PARISC_GPREL16DF 95 /* 16 bits GP-rel. address. */ -#define R_PARISC_LTOFF64 96 /* 64 bits LT-rel. address. */ -#define R_PARISC_LTOFF14WR 99 /* LT-rel. address, right 14 bits. */ -#define R_PARISC_LTOFF14DR 100 /* LT-rel. address, right 14 bits. */ -#define R_PARISC_LTOFF16F 101 /* 16 bits LT-rel. address. */ -#define R_PARISC_LTOFF16WF 102 /* 16 bits LT-rel. address. */ -#define R_PARISC_LTOFF16DF 103 /* 16 bits LT-rel. address. */ -#define R_PARISC_SECREL64 104 /* 64 bits section rel. address. */ -#define R_PARISC_SEGREL64 112 /* 64 bits segment rel. address. */ -#define R_PARISC_PLTOFF14WR 115 /* PLT-rel. address, right 14 bits. */ -#define R_PARISC_PLTOFF14DR 116 /* PLT-rel. address, right 14 bits. */ -#define R_PARISC_PLTOFF16F 117 /* 16 bits LT-rel. address. */ -#define R_PARISC_PLTOFF16WF 118 /* 16 bits PLT-rel. address. */ -#define R_PARISC_PLTOFF16DF 119 /* 16 bits PLT-rel. address. */ -#define R_PARISC_LTOFF_FPTR64 120 /* 64 bits LT-rel. function ptr. */ -#define R_PARISC_LTOFF_FPTR14WR 123 /* LT-rel. fct. ptr., right 14 bits. */ -#define R_PARISC_LTOFF_FPTR14DR 124 /* LT-rel. fct. ptr., right 14 bits. */ -#define R_PARISC_LTOFF_FPTR16F 125 /* 16 bits LT-rel. function ptr. */ -#define R_PARISC_LTOFF_FPTR16WF 126 /* 16 bits LT-rel. function ptr. */ -#define R_PARISC_LTOFF_FPTR16DF 127 /* 16 bits LT-rel. function ptr. */ -#define R_PARISC_LORESERVE 128 -#define R_PARISC_COPY 128 /* Copy relocation. */ -#define R_PARISC_IPLT 129 /* Dynamic reloc, imported PLT */ -#define R_PARISC_EPLT 130 /* Dynamic reloc, exported PLT */ -#define R_PARISC_TPREL32 153 /* 32 bits TP-rel. address. */ -#define R_PARISC_TPREL21L 154 /* TP-rel. address, left 21 bits. */ -#define R_PARISC_TPREL14R 158 /* TP-rel. address, right 14 bits. */ -#define R_PARISC_LTOFF_TP21L 162 /* LT-TP-rel. address, left 21 bits. */ -#define R_PARISC_LTOFF_TP14R 166 /* LT-TP-rel. address, right 14 bits.*/ -#define R_PARISC_LTOFF_TP14F 167 /* 14 bits LT-TP-rel. address. */ -#define R_PARISC_TPREL64 216 /* 64 bits TP-rel. address. */ -#define R_PARISC_TPREL14WR 219 /* TP-rel. address, right 14 bits. */ -#define R_PARISC_TPREL14DR 220 /* TP-rel. address, right 14 bits. */ -#define R_PARISC_TPREL16F 221 /* 16 bits TP-rel. address. */ -#define R_PARISC_TPREL16WF 222 /* 16 bits TP-rel. address. */ -#define R_PARISC_TPREL16DF 223 /* 16 bits TP-rel. address. */ -#define R_PARISC_LTOFF_TP64 224 /* 64 bits LT-TP-rel. address. */ -#define R_PARISC_LTOFF_TP14WR 227 /* LT-TP-rel. address, right 14 bits.*/ -#define R_PARISC_LTOFF_TP14DR 228 /* LT-TP-rel. address, right 14 bits.*/ -#define R_PARISC_LTOFF_TP16F 229 /* 16 bits LT-TP-rel. address. */ -#define R_PARISC_LTOFF_TP16WF 230 /* 16 bits LT-TP-rel. address. */ -#define R_PARISC_LTOFF_TP16DF 231 /* 16 bits LT-TP-rel. address. */ -#define R_PARISC_HIRESERVE 255 - -/* Legal values for p_type field of Elf32_Phdr/Elf64_Phdr. */ - -#define PT_HP_TLS (PT_LOOS + 0x0) -#define PT_HP_CORE_NONE (PT_LOOS + 0x1) -#define PT_HP_CORE_VERSION (PT_LOOS + 0x2) -#define PT_HP_CORE_KERNEL (PT_LOOS + 0x3) -#define PT_HP_CORE_COMM (PT_LOOS + 0x4) -#define PT_HP_CORE_PROC (PT_LOOS + 0x5) -#define PT_HP_CORE_LOADABLE (PT_LOOS + 0x6) -#define PT_HP_CORE_STACK (PT_LOOS + 0x7) -#define PT_HP_CORE_SHM (PT_LOOS + 0x8) -#define PT_HP_CORE_MMF (PT_LOOS + 0x9) -#define PT_HP_PARALLEL (PT_LOOS + 0x10) -#define PT_HP_FASTBIND (PT_LOOS + 0x11) -#define PT_HP_OPT_ANNOT (PT_LOOS + 0x12) -#define PT_HP_HSL_ANNOT (PT_LOOS + 0x13) -#define PT_HP_STACK (PT_LOOS + 0x14) - -#define PT_PARISC_ARCHEXT 0x70000000 -#define PT_PARISC_UNWIND 0x70000001 - -/* Legal values for p_flags field of Elf32_Phdr/Elf64_Phdr. */ - -#define PF_PARISC_SBP 0x08000000 - -#define PF_HP_PAGE_SIZE 0x00100000 -#define PF_HP_FAR_SHARED 0x00200000 -#define PF_HP_NEAR_SHARED 0x00400000 -#define PF_HP_CODE 0x01000000 -#define PF_HP_MODIFY 0x02000000 -#define PF_HP_LAZYSWAP 0x04000000 -#define PF_HP_SBP 0x08000000 - - -/* Alpha specific definitions. */ - -/* Legal values for e_flags field of Elf64_Ehdr. */ - -#define EF_ALPHA_32BIT 1 /* All addresses must be < 2GB. */ -#define EF_ALPHA_CANRELAX 2 /* Relocations for relaxing exist. */ - -/* Legal values for sh_type field of Elf64_Shdr. */ - -/* These two are primerily concerned with ECOFF debugging info. */ -#define SHT_ALPHA_DEBUG 0x70000001 -#define SHT_ALPHA_REGINFO 0x70000002 - -/* Legal values for sh_flags field of Elf64_Shdr. */ - -#define SHF_ALPHA_GPREL 0x10000000 - -/* Legal values for st_other field of Elf64_Sym. */ -#define STO_ALPHA_NOPV 0x80 /* No PV required. */ -#define STO_ALPHA_STD_GPLOAD 0x88 /* PV only used for initial ldgp. */ - -/* Alpha relocs. */ - -#define R_ALPHA_NONE 0 /* No reloc */ -#define R_ALPHA_REFLONG 1 /* Direct 32 bit */ -#define R_ALPHA_REFQUAD 2 /* Direct 64 bit */ -#define R_ALPHA_GPREL32 3 /* GP relative 32 bit */ -#define R_ALPHA_LITERAL 4 /* GP relative 16 bit w/optimization */ -#define R_ALPHA_LITUSE 5 /* Optimization hint for LITERAL */ -#define R_ALPHA_GPDISP 6 /* Add displacement to GP */ -#define R_ALPHA_BRADDR 7 /* PC+4 relative 23 bit shifted */ -#define R_ALPHA_HINT 8 /* PC+4 relative 16 bit shifted */ -#define R_ALPHA_SREL16 9 /* PC relative 16 bit */ -#define R_ALPHA_SREL32 10 /* PC relative 32 bit */ -#define R_ALPHA_SREL64 11 /* PC relative 64 bit */ -#define R_ALPHA_OP_PUSH 12 /* OP stack push */ -#define R_ALPHA_OP_STORE 13 /* OP stack pop and store */ -#define R_ALPHA_OP_PSUB 14 /* OP stack subtract */ -#define R_ALPHA_OP_PRSHIFT 15 /* OP stack right shift */ -#define R_ALPHA_GPVALUE 16 -#define R_ALPHA_GPRELHIGH 17 -#define R_ALPHA_GPRELLOW 18 -#define R_ALPHA_IMMED_GP_16 19 -#define R_ALPHA_IMMED_GP_HI32 20 -#define R_ALPHA_IMMED_SCN_HI32 21 -#define R_ALPHA_IMMED_BR_HI32 22 -#define R_ALPHA_IMMED_LO32 23 -#define R_ALPHA_COPY 24 /* Copy symbol at runtime */ -#define R_ALPHA_GLOB_DAT 25 /* Create GOT entry */ -#define R_ALPHA_JMP_SLOT 26 /* Create PLT entry */ -#define R_ALPHA_RELATIVE 27 /* Adjust by program base */ -/* Keep this the last entry. */ -#define R_ALPHA_NUM 28 - - -/* PowerPC specific declarations */ - -/* Values for Elf32/64_Ehdr.e_flags. */ -#define EF_PPC_EMB 0x80000000 /* PowerPC embedded flag */ - -/* Cygnus local bits below */ -#define EF_PPC_RELOCATABLE 0x00010000 /* PowerPC -mrelocatable flag*/ -#define EF_PPC_RELOCATABLE_LIB 0x00008000 /* PowerPC -mrelocatable-lib - flag */ - -/* PowerPC relocations defined by the ABIs */ -#define R_PPC_NONE 0 -#define R_PPC_ADDR32 1 /* 32bit absolute address */ -#define R_PPC_ADDR24 2 /* 26bit address, 2 bits ignored. */ -#define R_PPC_ADDR16 3 /* 16bit absolute address */ -#define R_PPC_ADDR16_LO 4 /* lower 16bit of absolute address */ -#define R_PPC_ADDR16_HI 5 /* high 16bit of absolute address */ -#define R_PPC_ADDR16_HA 6 /* adjusted high 16bit */ -#define R_PPC_ADDR14 7 /* 16bit address, 2 bits ignored */ -#define R_PPC_ADDR14_BRTAKEN 8 -#define R_PPC_ADDR14_BRNTAKEN 9 -#define R_PPC_REL24 10 /* PC relative 26 bit */ -#define R_PPC_REL14 11 /* PC relative 16 bit */ -#define R_PPC_REL14_BRTAKEN 12 -#define R_PPC_REL14_BRNTAKEN 13 -#define R_PPC_GOT16 14 -#define R_PPC_GOT16_LO 15 -#define R_PPC_GOT16_HI 16 -#define R_PPC_GOT16_HA 17 -#define R_PPC_PLTREL24 18 -#define R_PPC_COPY 19 -#define R_PPC_GLOB_DAT 20 -#define R_PPC_JMP_SLOT 21 -#define R_PPC_RELATIVE 22 -#define R_PPC_LOCAL24PC 23 -#define R_PPC_UADDR32 24 -#define R_PPC_UADDR16 25 -#define R_PPC_REL32 26 -#define R_PPC_PLT32 27 -#define R_PPC_PLTREL32 28 -#define R_PPC_PLT16_LO 29 -#define R_PPC_PLT16_HI 30 -#define R_PPC_PLT16_HA 31 -#define R_PPC_SDAREL16 32 -#define R_PPC_SECTOFF 33 -#define R_PPC_SECTOFF_LO 34 -#define R_PPC_SECTOFF_HI 35 -#define R_PPC_SECTOFF_HA 36 -/* Keep this the last entry. */ -#define R_PPC_NUM 37 - -/* The remaining relocs are from the Embedded ELF ABI, and are not - in the SVR4 ELF ABI. */ -#define R_PPC_EMB_NADDR32 101 -#define R_PPC_EMB_NADDR16 102 -#define R_PPC_EMB_NADDR16_LO 103 -#define R_PPC_EMB_NADDR16_HI 104 -#define R_PPC_EMB_NADDR16_HA 105 -#define R_PPC_EMB_SDAI16 106 -#define R_PPC_EMB_SDA2I16 107 -#define R_PPC_EMB_SDA2REL 108 -#define R_PPC_EMB_SDA21 109 /* 16 bit offset in SDA */ -#define R_PPC_EMB_MRKREF 110 -#define R_PPC_EMB_RELSEC16 111 -#define R_PPC_EMB_RELST_LO 112 -#define R_PPC_EMB_RELST_HI 113 -#define R_PPC_EMB_RELST_HA 114 -#define R_PPC_EMB_BIT_FLD 115 -#define R_PPC_EMB_RELSDA 116 /* 16 bit relative offset in SDA */ - -/* Diab tool relocations. */ -#define R_PPC_DIAB_SDA21_LO 180 /* like EMB_SDA21, but lower 16 bit */ -#define R_PPC_DIAB_SDA21_HI 181 /* like EMB_SDA21, but high 16 bit */ -#define R_PPC_DIAB_SDA21_HA 182 /* like EMB_SDA21, adjusted high 16 */ -#define R_PPC_DIAB_RELSDA_LO 183 /* like EMB_RELSDA, but lower 16 bit */ -#define R_PPC_DIAB_RELSDA_HI 184 /* like EMB_RELSDA, but high 16 bit */ -#define R_PPC_DIAB_RELSDA_HA 185 /* like EMB_RELSDA, adjusted high 16 */ - -/* This is a phony reloc to handle any old fashioned TOC16 references - that may still be in object files. */ -#define R_PPC_TOC16 255 - - -/* ARM specific declarations */ - -/* Processor specific flags for the ELF header e_flags field. */ -#define EF_ARM_RELEXEC 0x01 -#define EF_ARM_HASENTRY 0x02 -#define EF_ARM_INTERWORK 0x04 -#define EF_ARM_APCS_26 0x08 -#define EF_ARM_APCS_FLOAT 0x10 -#define EF_ARM_PIC 0x20 -#define EF_ARM_ALIGN8 0x40 /* 8-bit structure alignment is in use */ -#define EF_ARM_NEW_ABI 0x80 -#define EF_ARM_OLD_ABI 0x100 - -/* Other constants defined in the ARM ELF spec. version B-01. */ -/* NB. These conflict with values defined above. */ -#define EF_ARM_SYMSARESORTED 0x04 -#define EF_ARM_DYNSYMSUSESEGIDX 0x08 -#define EF_ARM_MAPSYMSFIRST 0x10 -#define EF_ARM_EABIMASK 0XFF000000 - -#define EF_ARM_EABI_VERSION(flags) ((flags) & EF_ARM_EABIMASK) -#define EF_ARM_EABI_UNKNOWN 0x00000000 -#define EF_ARM_EABI_VER1 0x01000000 -#define EF_ARM_EABI_VER2 0x02000000 - -/* Additional symbol types for Thumb */ -#define STT_ARM_TFUNC 0xd - -/* ARM-specific values for sh_flags */ -#define SHF_ARM_ENTRYSECT 0x10000000 /* Section contains an entry point */ -#define SHF_ARM_COMDEF 0x80000000 /* Section may be multiply defined - in the input to a link step */ - -/* ARM-specific program header flags */ -#define PF_ARM_SB 0x10000000 /* Segment contains the location - addressed by the static base */ - -/* ARM relocs. */ -#define R_ARM_NONE 0 /* No reloc */ -#define R_ARM_PC24 1 /* PC relative 26 bit branch */ -#define R_ARM_ABS32 2 /* Direct 32 bit */ -#define R_ARM_REL32 3 /* PC relative 32 bit */ -#define R_ARM_PC13 4 -#define R_ARM_ABS16 5 /* Direct 16 bit */ -#define R_ARM_ABS12 6 /* Direct 12 bit */ -#define R_ARM_THM_ABS5 7 -#define R_ARM_ABS8 8 /* Direct 8 bit */ -#define R_ARM_SBREL32 9 -#define R_ARM_THM_PC22 10 -#define R_ARM_THM_PC8 11 -#define R_ARM_AMP_VCALL9 12 -#define R_ARM_SWI24 13 -#define R_ARM_THM_SWI8 14 -#define R_ARM_XPC25 15 -#define R_ARM_THM_XPC22 16 -#define R_ARM_COPY 20 /* Copy symbol at runtime */ -#define R_ARM_GLOB_DAT 21 /* Create GOT entry */ -#define R_ARM_JUMP_SLOT 22 /* Create PLT entry */ -#define R_ARM_RELATIVE 23 /* Adjust by program base */ -#define R_ARM_GOTOFF 24 /* 32 bit offset to GOT */ -#define R_ARM_GOTPC 25 /* 32 bit PC relative offset to GOT */ -#define R_ARM_GOT32 26 /* 32 bit GOT entry */ -#define R_ARM_PLT32 27 /* 32 bit PLT address */ -#define R_ARM_ALU_PCREL_7_0 32 -#define R_ARM_ALU_PCREL_15_8 33 -#define R_ARM_ALU_PCREL_23_15 34 -#define R_ARM_LDR_SBREL_11_0 35 -#define R_ARM_ALU_SBREL_19_12 36 -#define R_ARM_ALU_SBREL_27_20 37 -#define R_ARM_GNU_VTENTRY 100 -#define R_ARM_GNU_VTINHERIT 101 -#define R_ARM_THM_PC11 102 /* thumb unconditional branch */ -#define R_ARM_THM_PC9 103 /* thumb conditional branch */ -#define R_ARM_RXPC25 249 -#define R_ARM_RSBREL32 250 -#define R_ARM_THM_RPC22 251 -#define R_ARM_RREL32 252 -#define R_ARM_RABS22 253 -#define R_ARM_RPC24 254 -#define R_ARM_RBASE 255 -/* Keep this the last entry. */ -#define R_ARM_NUM 256 - -/* IA-64 specific declarations. */ - -/* Processor specific flags for the Ehdr e_flags field. */ -#define EF_IA_64_MASKOS 0x0000000f /* os-specific flags */ -#define EF_IA_64_ABI64 0x00000010 /* 64-bit ABI */ -#define EF_IA_64_ARCH 0xff000000 /* arch. version mask */ - -/* Processor specific values for the Phdr p_type field. */ -#define PT_IA_64_ARCHEXT (PT_LOPROC + 0) /* arch extension bits */ -#define PT_IA_64_UNWIND (PT_LOPROC + 1) /* ia64 unwind bits */ - -/* Processor specific flags for the Phdr p_flags field. */ -#define PF_IA_64_NORECOV 0x80000000 /* spec insns w/o recovery */ - -/* Processor specific values for the Shdr sh_type field. */ -#define SHT_IA_64_EXT (SHT_LOPROC + 0) /* extension bits */ -#define SHT_IA_64_UNWIND (SHT_LOPROC + 1) /* unwind bits */ - -/* Processor specific flags for the Shdr sh_flags field. */ -#define SHF_IA_64_SHORT 0x10000000 /* section near gp */ -#define SHF_IA_64_NORECOV 0x20000000 /* spec insns w/o recovery */ - -/* Processor specific values for the Dyn d_tag field. */ -#define DT_IA_64_PLT_RESERVE (DT_LOPROC + 0) -#define DT_IA_64_NUM 1 - -/* IA-64 relocations. */ -#define R_IA64_NONE 0x00 /* none */ -#define R_IA64_IMM14 0x21 /* symbol + addend, add imm14 */ -#define R_IA64_IMM22 0x22 /* symbol + addend, add imm22 */ -#define R_IA64_IMM64 0x23 /* symbol + addend, mov imm64 */ -#define R_IA64_DIR32MSB 0x24 /* symbol + addend, data4 MSB */ -#define R_IA64_DIR32LSB 0x25 /* symbol + addend, data4 LSB */ -#define R_IA64_DIR64MSB 0x26 /* symbol + addend, data8 MSB */ -#define R_IA64_DIR64LSB 0x27 /* symbol + addend, data8 LSB */ -#define R_IA64_GPREL22 0x2a /* @gprel(sym + add), add imm22 */ -#define R_IA64_GPREL64I 0x2b /* @gprel(sym + add), mov imm64 */ -#define R_IA64_GPREL32MSB 0x2c /* @gprel(sym + add), data4 MSB */ -#define R_IA64_GPREL32LSB 0x2d /* @gprel(sym + add), data4 LSB */ -#define R_IA64_GPREL64MSB 0x2e /* @gprel(sym + add), data8 MSB */ -#define R_IA64_GPREL64LSB 0x2f /* @gprel(sym + add), data8 LSB */ -#define R_IA64_LTOFF22 0x32 /* @ltoff(sym + add), add imm22 */ -#define R_IA64_LTOFF64I 0x33 /* @ltoff(sym + add), mov imm64 */ -#define R_IA64_PLTOFF22 0x3a /* @pltoff(sym + add), add imm22 */ -#define R_IA64_PLTOFF64I 0x3b /* @pltoff(sym + add), mov imm64 */ -#define R_IA64_PLTOFF64MSB 0x3e /* @pltoff(sym + add), data8 MSB */ -#define R_IA64_PLTOFF64LSB 0x3f /* @pltoff(sym + add), data8 LSB */ -#define R_IA64_FPTR64I 0x43 /* @fptr(sym + add), mov imm64 */ -#define R_IA64_FPTR32MSB 0x44 /* @fptr(sym + add), data4 MSB */ -#define R_IA64_FPTR32LSB 0x45 /* @fptr(sym + add), data4 LSB */ -#define R_IA64_FPTR64MSB 0x46 /* @fptr(sym + add), data8 MSB */ -#define R_IA64_FPTR64LSB 0x47 /* @fptr(sym + add), data8 LSB */ -#define R_IA64_PCREL60B 0x48 /* @pcrel(sym + add), brl */ -#define R_IA64_PCREL21B 0x49 /* @pcrel(sym + add), ptb, call */ -#define R_IA64_PCREL21M 0x4a /* @pcrel(sym + add), chk.s */ -#define R_IA64_PCREL21F 0x4b /* @pcrel(sym + add), fchkf */ -#define R_IA64_PCREL32MSB 0x4c /* @pcrel(sym + add), data4 MSB */ -#define R_IA64_PCREL32LSB 0x4d /* @pcrel(sym + add), data4 LSB */ -#define R_IA64_PCREL64MSB 0x4e /* @pcrel(sym + add), data8 MSB */ -#define R_IA64_PCREL64LSB 0x4f /* @pcrel(sym + add), data8 LSB */ -#define R_IA64_LTOFF_FPTR22 0x52 /* @ltoff(@fptr(s+a)), imm22 */ -#define R_IA64_LTOFF_FPTR64I 0x53 /* @ltoff(@fptr(s+a)), imm64 */ -#define R_IA64_LTOFF_FPTR32MSB 0x54 /* @ltoff(@fptr(s+a)), data4 MSB */ -#define R_IA64_LTOFF_FPTR32LSB 0x55 /* @ltoff(@fptr(s+a)), data4 LSB */ -#define R_IA64_LTOFF_FPTR64MSB 0x56 /* @ltoff(@fptr(s+a)), data8 MSB */ -#define R_IA64_LTOFF_FPTR64LSB 0x57 /* @ltoff(@fptr(s+a)), data8 LSB */ -#define R_IA64_SEGREL32MSB 0x5c /* @segrel(sym + add), data4 MSB */ -#define R_IA64_SEGREL32LSB 0x5d /* @segrel(sym + add), data4 LSB */ -#define R_IA64_SEGREL64MSB 0x5e /* @segrel(sym + add), data8 MSB */ -#define R_IA64_SEGREL64LSB 0x5f /* @segrel(sym + add), data8 LSB */ -#define R_IA64_SECREL32MSB 0x64 /* @secrel(sym + add), data4 MSB */ -#define R_IA64_SECREL32LSB 0x65 /* @secrel(sym + add), data4 LSB */ -#define R_IA64_SECREL64MSB 0x66 /* @secrel(sym + add), data8 MSB */ -#define R_IA64_SECREL64LSB 0x67 /* @secrel(sym + add), data8 LSB */ -#define R_IA64_REL32MSB 0x6c /* data 4 + REL */ -#define R_IA64_REL32LSB 0x6d /* data 4 + REL */ -#define R_IA64_REL64MSB 0x6e /* data 8 + REL */ -#define R_IA64_REL64LSB 0x6f /* data 8 + REL */ -#define R_IA64_LTV32MSB 0x74 /* symbol + addend, data4 MSB */ -#define R_IA64_LTV32LSB 0x75 /* symbol + addend, data4 LSB */ -#define R_IA64_LTV64MSB 0x76 /* symbol + addend, data8 MSB */ -#define R_IA64_LTV64LSB 0x77 /* symbol + addend, data8 LSB */ -#define R_IA64_PCREL21BI 0x79 /* @pcrel(sym + add), 21bit inst */ -#define R_IA64_PCREL22 0x7a /* @pcrel(sym + add), 22bit inst */ -#define R_IA64_PCREL64I 0x7b /* @pcrel(sym + add), 64bit inst */ -#define R_IA64_IPLTMSB 0x80 /* dynamic reloc, imported PLT, MSB */ -#define R_IA64_IPLTLSB 0x81 /* dynamic reloc, imported PLT, LSB */ -#define R_IA64_COPY 0x84 /* copy relocation */ -#define R_IA64_SUB 0x85 /* Addend and symbol difference */ -#define R_IA64_LTOFF22X 0x86 /* LTOFF22, relaxable. */ -#define R_IA64_LDXMOV 0x87 /* Use of LTOFF22X. */ -#define R_IA64_TPREL14 0x91 /* @tprel(sym + add), imm14 */ -#define R_IA64_TPREL22 0x92 /* @tprel(sym + add), imm22 */ -#define R_IA64_TPREL64I 0x93 /* @tprel(sym + add), imm64 */ -#define R_IA64_TPREL64MSB 0x96 /* @tprel(sym + add), data8 MSB */ -#define R_IA64_TPREL64LSB 0x97 /* @tprel(sym + add), data8 LSB */ -#define R_IA64_LTOFF_TPREL22 0x9a /* @ltoff(@tprel(s+a)), imm2 */ -#define R_IA64_DTPMOD64MSB 0xa6 /* @dtpmod(sym + add), data8 MSB */ -#define R_IA64_DTPMOD64LSB 0xa7 /* @dtpmod(sym + add), data8 LSB */ -#define R_IA64_LTOFF_DTPMOD22 0xaa /* @ltoff(@dtpmod(sym + add)), imm22 */ -#define R_IA64_DTPREL14 0xb1 /* @dtprel(sym + add), imm14 */ -#define R_IA64_DTPREL22 0xb2 /* @dtprel(sym + add), imm22 */ -#define R_IA64_DTPREL64I 0xb3 /* @dtprel(sym + add), imm64 */ -#define R_IA64_DTPREL32MSB 0xb4 /* @dtprel(sym + add), data4 MSB */ -#define R_IA64_DTPREL32LSB 0xb5 /* @dtprel(sym + add), data4 LSB */ -#define R_IA64_DTPREL64MSB 0xb6 /* @dtprel(sym + add), data8 MSB */ -#define R_IA64_DTPREL64LSB 0xb7 /* @dtprel(sym + add), data8 LSB */ -#define R_IA64_LTOFF_DTPREL22 0xba /* @ltoff(@dtprel(s+a)), imm22 */ - -/* SH specific declarations */ - -/* SH relocs. */ -#define R_SH_NONE 0 -#define R_SH_DIR32 1 -#define R_SH_REL32 2 -#define R_SH_DIR8WPN 3 -#define R_SH_IND12W 4 -#define R_SH_DIR8WPL 5 -#define R_SH_DIR8WPZ 6 -#define R_SH_DIR8BP 7 -#define R_SH_DIR8W 8 -#define R_SH_DIR8L 9 -#define R_SH_SWITCH16 25 -#define R_SH_SWITCH32 26 -#define R_SH_USES 27 -#define R_SH_COUNT 28 -#define R_SH_ALIGN 29 -#define R_SH_CODE 30 -#define R_SH_DATA 31 -#define R_SH_LABEL 32 -#define R_SH_SWITCH8 33 -#define R_SH_GNU_VTINHERIT 34 -#define R_SH_GNU_VTENTRY 35 -#define R_SH_GOT32 160 -#define R_SH_PLT32 161 -#define R_SH_COPY 162 -#define R_SH_GLOB_DAT 163 -#define R_SH_JMP_SLOT 164 -#define R_SH_RELATIVE 165 -#define R_SH_GOTOFF 166 -#define R_SH_GOTPC 167 -/* Keep this the last entry. */ -#define R_SH_NUM 256 - -/* Additional s390 relocs */ - -#define R_390_NONE 0 /* No reloc. */ -#define R_390_8 1 /* Direct 8 bit. */ -#define R_390_12 2 /* Direct 12 bit. */ -#define R_390_16 3 /* Direct 16 bit. */ -#define R_390_32 4 /* Direct 32 bit. */ -#define R_390_PC32 5 /* PC relative 32 bit. */ -#define R_390_GOT12 6 /* 12 bit GOT offset. */ -#define R_390_GOT32 7 /* 32 bit GOT offset. */ -#define R_390_PLT32 8 /* 32 bit PC relative PLT address. */ -#define R_390_COPY 9 /* Copy symbol at runtime. */ -#define R_390_GLOB_DAT 10 /* Create GOT entry. */ -#define R_390_JMP_SLOT 11 /* Create PLT entry. */ -#define R_390_RELATIVE 12 /* Adjust by program base. */ -#define R_390_GOTOFF 13 /* 32 bit offset to GOT. */ -#define R_390_GOTPC 14 /* 32 bit PC relative offset to GOT. */ -#define R_390_GOT16 15 /* 16 bit GOT offset. */ -#define R_390_PC16 16 /* PC relative 16 bit. */ -#define R_390_PC16DBL 17 /* PC relative 16 bit shifted by 1. */ -#define R_390_PLT16DBL 18 /* 16 bit PC rel. PLT shifted by 1. */ -#define R_390_PC32DBL 19 /* PC relative 32 bit shifted by 1. */ -#define R_390_PLT32DBL 20 /* 32 bit PC rel. PLT shifted by 1. */ -#define R_390_GOTPCDBL 21 /* 32 bit PC rel. GOT shifted by 1. */ -#define R_390_64 22 /* Direct 64 bit. */ -#define R_390_PC64 23 /* PC relative 64 bit. */ -#define R_390_GOT64 24 /* 64 bit GOT offset. */ -#define R_390_PLT64 25 /* 64 bit PC relative PLT address. */ -#define R_390_GOTENT 26 /* 32 bit PC rel. to GOT entry >> 1. */ - -/* Keep this the last entry. */ -#define R_390_NUM 19 - -/* CRIS relocations. */ -#define R_CRIS_NONE 0 -#define R_CRIS_8 1 -#define R_CRIS_16 2 -#define R_CRIS_32 3 -#define R_CRIS_8_PCREL 4 -#define R_CRIS_16_PCREL 5 -#define R_CRIS_32_PCREL 6 -#define R_CRIS_GNU_VTINHERIT 7 -#define R_CRIS_GNU_VTENTRY 8 -#define R_CRIS_COPY 9 -#define R_CRIS_GLOB_DAT 10 -#define R_CRIS_JUMP_SLOT 11 -#define R_CRIS_RELATIVE 12 -#define R_CRIS_16_GOT 13 -#define R_CRIS_32_GOT 14 -#define R_CRIS_16_GOTPLT 15 -#define R_CRIS_32_GOTPLT 16 -#define R_CRIS_32_GOTREL 17 -#define R_CRIS_32_PLT_GOTREL 18 -#define R_CRIS_32_PLT_PCREL 19 - -#define R_CRIS_NUM 20 - -#define R_MICROBLAZE_NONE 0 -#define R_MICROBLAZE_32 1 -#define R_MICROBLAZE_32_PCREL 2 -#define R_MICROBLAZE_64_PCREL 3 -#define R_MICROBLAZE_32_PCREL_LO 4 -#define R_MICROBLAZE_64 5 -#define R_MICROBLAZE_32_LO 6 -#define R_MICROBLAZE_SRO32 7 -#define R_MICROBLAZE_SRW32 8 -#define R_MICROBLAZE_64_NONE 9 -#define R_MICROBLAZE_32_SYM_OP_SYM 10 -#define R_MICROBLAZE_GNU_VTINHERIT 11 -#define R_MICROBLAZE_GNU_VTENTRY 12 - -#define R_MICROBLAZE_NUM 13 - -/* Altera NIOS specific definitions. */ - -#define FLAT_NIOS2_R_32 0 /* Normal 32-bit reloc */ -#define FLAT_NIOS2_R_HI_LO 1 -#define FLAT_NIOS2_R_HIADJ_LO 2 -#define FLAT_NIOS2_R_CALL26 4 - -/* NIOS relocations. */ -#define R_NIOS_NONE 0 -#define R_NIOS_32 1 /* A 32 bit absolute relocation.*/ -#define R_NIOS_LO16_LO5 2 /* A LO-16 5 bit absolute relocation. */ -#define R_NIOS_LO16_HI11 3 /* A LO-16 top 11 bit absolute relocation. */ -#define R_NIOS_HI16_LO5 4 /* A HI-16 5 bit absolute relocation. */ -#define R_NIOS_HI16_HI11 5 /* A HI-16 top 11 bit absolute relocation. */ -#define R_NIOS_PCREL6 6 /* A 6 bit relative relocation. */ -#define R_NIOS_PCREL8 7 /* An 8 bit relative relocation. */ -#define R_NIOS_PCREL11 8 /* An 11 bit relative relocation. */ -#define R_NIOS_16 9 /* A 16 bit absolute relocation. */ -#define R_NIOS_H_LO5 10 /* Low 5-bits of absolute relocation in halfwords. */ -#define R_NIOS_H_HI11 11 /* Top 11 bits of 16-bit absolute relocation in halfwords. */ -#define R_NIOS_H_XLO5 12 /* Low 5 bits of top 16-bits of 32-bit absolute relocation in halfwords. */ -#define R_NIOS_H_XHI11 13 /* Top 11 bits of top 16-bits of 32-bit absolute relocation in halfwords. */ -#define R_NIOS_H_16 14 /* Half-word @h value */ -#define R_NIOS_H_32 15 /* Word @h value */ -#define R_NIOS_GNU_VTINHERIT 200 /* GNU extension to record C++ vtable hierarchy */ -#define R_NIOS_GNU_VTENTRY 201 /* GNU extension to record C++ vtable member usage */ -/* Keep this the last entry. */ -#define R_NIOS_NUM 202 - -/* NIOS II relocations */ -#define R_NIOS2_NONE 0 -#define R_NIOS2_S16 1 -#define R_NIOS2_U16 2 -#define R_NIOS2_PCREL16 3 -#define R_NIOS2_CALL26 4 -#define R_NIOS2_IMM5 5 -#define R_NIOS2_CACHE_OPX 6 -#define R_NIOS2_IMM6 7 -#define R_NIOS2_IMM8 8 -#define R_NIOS2_HI16 9 -#define R_NIOS2_LO16 10 -#define R_NIOS2_HIADJ16 11 -#define R_NIOS2_BFD_RELOC_32 12 -#define R_NIOS2_BFD_RELOC_16 13 -#define R_NIOS2_BFD_RELOC_8 14 -#define R_NIOS2_GPREL 15 -#define R_NIOS2_GNU_VTINHERIT 16 -#define R_NIOS2_GNU_VTENTRY 17 -#define R_NIOS2_UJMP 18 -#define R_NIOS2_CJMP 19 -#define R_NIOS2_CALLR 20 -#define R_NIOS2_ALIGN 21 -/* Keep this the last entry. */ -#define R_NIOS2_NUM 22 - -#endif /* elf.h */ diff --git a/toolchain/elf2flt/elf2flt/e1-elf2flt.ld b/toolchain/elf2flt/elf2flt/e1-elf2flt.ld deleted file mode 100644 index a88fc4ffeb..0000000000 --- a/toolchain/elf2flt/elf2flt/e1-elf2flt.ld +++ /dev/null @@ -1,161 +0,0 @@ - -ENTRY (__start) - -MEMORY { - flatmem : ORIGIN = 0x0, LENGTH = 0xfffffff -} - -SECTIONS { - .G6 (DEFINED(G6Base) ? G6Base : 0x0) : { - *(.G6) - } - .G7 (DEFINED(G7Base) ? G7Base : 0x0) : { - *(.G7) - } - .G8 (DEFINED(G8Base) ? G8Base : 0x0) : { - *(.G8) - } - .G9 (DEFINED(G9Base) ? G9Base : 0) : { - *(.G9) - } - .G10 (DEFINED(G10Base) ? G10Base : 0) : { - *(.G10) - } - .G11 (DEFINED(G11Base) ? G11Base : 0) : { - *(.G11) - } - .G12 (DEFINED(G12Base) ? G12Base : 0) : { - *(.G12) - } - .G13 (DEFINED(G13Base) ? G13Base : 0) : { - *(.G13) - } - .text 0x0 : { - . = . + 4; - . = ALIGN(0x4) ; - _stext = . ; - *(.text) - *(.text.*) - *(.gnu.warning) - *(.stub) - *(.gnu.linkonce.t*) - *(.glue_7t) - *(.glue_7) - *(.jcr) - *(.init) - *(.fini) - -W_RODAT *(.rodata) -W_RODAT *(.rodata1) -W_RODAT *(.rodata.*) - - /* This is special code area at the end of the normal - text section. It contains a small lookup table at - the start followed by the code pointed to by entries - in the lookup table. */ - . = ALIGN (4) ; - PROVIDE(__ctbp = .); - *(.call_table_data) - *(.call_table_text) - - . = ALIGN(0x20) ; - _etext = . ; - } > flatmem - .data : { - . = ALIGN(0x4) ; - _sdata = . ; - __data_start = . ; - data_start = . ; - *(.got.plt) - *(.got) - FILL(0) ; - . = ALIGN(0x20) ; - LONG(-1) - . = ALIGN(0x20) ; -R_RODAT *(.rodata) -R_RODAT *(.rodata1) -R_RODAT *(.rodata.*) - *(.gnu.linkonce.r*) - *(.data) - *(.data1) - *(.data.*) - *(.gnu.linkonce.d*) - *(.data1) - *(.eh_frame) - *(.gcc_except_table) - - /* Microblaze has .sdata and .sbss (small bss). They must - be contiguous, so please don't move any of this. JW */ - _ssrw = . ; - *(.sdata) - *(.sdata.*) - *(.sbss) /* Don't move this! */ - _essrw = . ; - - _ssrw_size = _essrw - _ssrw; - PROVIDE(_SDA_BASE_ = _ssrw + (_ssrw_size / 2)); - - *(.gnu.linkonce.s.*) - *(__libc_atexit) - *(__libc_subinit) - *(__libc_subfreeres) - *(.note.ABI-tag) - - /* microblaze-specific read-only small data area - and associated locating symbols */ - _ssro = . ; - *(.sdata2) - _essro = . ; - _ssro_size = _essro - _ssro; - PROVIDE(_SDA2_BASE_ = _ssro + (_ssro_size / 2)); - - . = ALIGN(4) ; - __CTOR_LIST__ = .; - LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) - *(.ctors) - LONG(0) - __CTOR_END__ = .; - __DTOR_LIST__ = .; - LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) - *(.dtors) - LONG(0) - __DTOR_END__ = .; - - . = ALIGN(0x10) ; - _edata = . ; - } > flatmem - .bss : { - . = ALIGN(0x4) ; - _sbss = ALIGN(0x4) ; - __bss_start = . ; - *(.dynsbss) - *(.sbss) - *(.sbss.*) - *(.scommon) - *(.dynbss) - *(.bss) - *(.bss.*) - *(.bss*) - *(.gnu.linkonce.b*) - *(COMMON) - . = ALIGN(0x10) ; - _ebss = . ; - _end = . ; - end = . ; - } > flatmem - - .junk 0 : { *(.rel*) *(.rela*) } - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/toolchain/elf2flt/elf2flt/elf2flt.c b/toolchain/elf2flt/elf2flt/elf2flt.c deleted file mode 100644 index 65a116c6c5..0000000000 --- a/toolchain/elf2flt/elf2flt/elf2flt.c +++ /dev/null @@ -1,2152 +0,0 @@ -/* - * elf2flt.c: Convert ELF (or any BFD format) to FLAT binary format - * - * (c) 1999-2002, Greg Ungerer - * Created elf2flt from coff2flt (see copyrights below). Added all the - * ELF format file handling. Extended relocation support for all of - * text and data. - * - * (c) 2006 Support the -a (use_resolved) option for TARGET_arm. - * Shaun Jackman - * (c) 2004, Nios II support, Wentao Xu - * (c) 2003, H8 support, ktrace - * (c) 2003-2004, MicroBlaze support, John Williams - * (c) 2001-2003, arm/arm-pic/arm-big-endian support - * (c) 2001, v850 changes, Mile Bader - * (c) 2003, SuperH support, Paul Mundt - * (c) 2001, zflat support - * (c) 2001, Changes for GOT entries Paul Dale and - * David McCullough - * - * Now supports PIC with GOT tables. This works by taking a '.elf' file - * and a fully linked elf executable (at address 0) and produces a flat - * file that can be loaded with some fixups. It still supports the old - * style fully relocatable elf format files. - * - * Originally obj-res.c - * - * (c) 1998, Kenneth Albanowski - * (c) 1998, D. Jeff Dionne - * (c) 1998, The Silver Hammer Group Ltd. - * (c) 1996, 1997 Dionne & Associates - * - * This is Free Software, under the GNU Public Licence v2 or greater. - * - * Relocation added March 1997, Kresten Krab Thorup - * krab@california.daimi.aau.dk - */ - -#include /* Userland pieces of the ANSI C standard I/O package */ -#include /* Userland prototypes of the ANSI C std lib functions */ -#include /* Allows va_list to exist in the these namespaces */ -#include /* Userland prototypes of the string handling funcs */ -#include -#include /* Userland prototypes of the Unix std system calls */ -#include /* Flag value for file handling functions */ -#include -#ifndef WIN32 -#include /* Consts and structs defined by the internet system */ -#define BINARY_FILE_OPTS -#else -#include -#define BINARY_FILE_OPTS "b" -#endif - -/* from $(INSTALLDIR)/include */ -#include /* Main header file for the BFD library */ - -#if defined(TARGET_h8300) -#include /* TARGET_* ELF support for the BFD library */ -#elif defined(__CYGWIN__) || defined(__MINGW32__) || defined(TARGET_nios) || defined(TARGET_nios2) -#include "cygwin-elf.h" /* Cygwin uses a local copy */ -#elif defined(TARGET_microblaze) -#include /* TARGET_* ELF support for the BFD library */ -#elif defined(TARGET_bfin) -#include "elf/bfin.h" -#else -#include /* TARGET_* ELF support for the BFD library */ -#endif - -#if defined(__MINGW32__) -#include -#endif - -/* from uClinux-x.x.x/include/linux */ -#include "flat.h" /* Binary flat header description */ - -#ifdef TARGET_e1 -#include -#endif - -#ifdef TARGET_v850e -#define TARGET_v850 -#endif - -#if defined(TARGET_m68k) -#define ARCH "m68k/coldfire" -#elif defined(TARGET_arm) -#define ARCH "arm" -#elif defined(TARGET_sparc) -#define ARCH "sparc" -#elif defined(TARGET_v850) -#define ARCH "v850" -#elif defined(TARGET_sh) -#define ARCH "sh" -#elif defined(TARGET_h8300) -#define ARCH "h8300" -#elif defined(TARGET_microblaze) -#define ARCH "microblaze" -#elif defined(TARGET_e1) -#define ARCH "e1-coff" -#elif defined(TARGET_bfin) -#define ARCH "bfin" -#define FLAT_RELOC_TYPE_TEXT 0 -#define FLAT_RELOC_TYPE_DATA 1 -#define FLAT_RELOC_TYPE_BSS 2 -#define FLAT_RELOC_TYPE_STACK 3 -#define FLAT_RELOC_PART_LO 0 -#define FLAT_RELOC_PART_HI 1 -#define PCREL24_MAGIC_OFFSET -1 -#elif defined(TARGET_nios) -#define ARCH "nios" -#elif defined(TARGET_nios2) -#define ARCH "nios2" -#else -#error "Don't know how to support your CPU architecture??" -#endif - -#if defined(TARGET_m68k) || defined(TARGET_h8300) || defined(TARGET_bfin) -/* - * Define a maximum number of bytes allowed in the offset table. - * We'll fail if the table is larger than this. - * - * This limit may be different for platforms other than m68k, but - * 8000 entries is a lot, trust me :-) (davidm) - */ -#define GOT_LIMIT 32767 -/* - * we have to mask out the shared library id here and there, this gives - * us the real address bits when needed - */ -#define real_address_bits(x) (pic_with_got ? ((x) & 0xffffff) : (x)) -#else -#define real_address_bits(x) (x) -#endif - -#ifndef O_BINARY -#define O_BINARY 0 -#endif - - -int verbose = 0; /* extra output when running */ -int pic_with_got = 0; /* do elf/got processing with PIC code */ -int load_to_ram = 0; /* instruct loader to allocate everything into RAM */ -int ktrace = 0; /* instruct loader output kernel trace on load */ -int compress = 0; /* 1 = compress everything, 2 = compress data only */ -int use_resolved = 0; /* If true, get the value of symbol references from */ - /* the program contents, not from the relocation table. */ - /* In this case, the input ELF file must be already */ - /* fully resolved (using the `-q' flag with recent */ - /* versions of GNU ld will give you a fully resolved */ - /* output file with relocation entries). */ - -const char *progname, *filename; -int lineno; - -int nerrors = 0; -int nwarnings = 0; - -static char where[200]; - -enum { - /* Use exactly one of these: */ - E_NOFILE = 0, /* "progname: " */ - E_FILE = 1, /* "filename: " */ - E_FILELINE = 2, /* "filename:lineno: " */ - E_FILEWHERE = 3, /* "filename:%s: " -- set %s with ewhere() */ - - /* Add in any of these with |': */ - E_WARNING = 0x10, - E_PERROR = 0x20 -}; - -void ewhere (const char *format, ...); -void einfo (int type, const char *format, ...); - - -void -ewhere (const char *format, ...) { - va_list args; - va_start (args, format); - vsprintf (where, format, args); - va_end (args); -} - - -void -einfo (int type, const char *format, ...) { - va_list args; - - switch (type & 0x0f) { - case E_NOFILE: - fprintf (stderr, "%s: ", progname); - break; - case E_FILE: - fprintf (stderr, "%s: ", filename); - break; - case E_FILELINE: - ewhere ("%d", lineno); - /* fall-through */ - case E_FILEWHERE: - fprintf (stderr, "%s:%s: ", filename, where); - break; - } - - if (type & E_WARNING) { - fprintf (stderr, "warning: "); - nwarnings++; - } else { - nerrors++; - } - - va_start (args, format); - vfprintf (stderr, format, args); - va_end (args); - - if (type & E_PERROR) - perror (""); - else - fprintf (stderr, "\n"); -} - - -asymbol** -get_symbols (bfd *abfd, long *num) -{ - long storage_needed; - asymbol **symbol_table; - long number_of_symbols; - - storage_needed = bfd_get_symtab_upper_bound (abfd); - - if (storage_needed < 0) - abort (); - - if (storage_needed == 0) - return NULL; - - symbol_table = (asymbol **) malloc (storage_needed); - - number_of_symbols = bfd_canonicalize_symtab (abfd, symbol_table); - - if (number_of_symbols < 0) - abort (); - - *num = number_of_symbols; - return symbol_table; -} - - - -int -dump_symbols(asymbol **symbol_table, long number_of_symbols) -{ - long i; - printf("SYMBOL TABLE:\n"); - for (i=0; iname, - symbol_table[i]->value); - } - printf("\n"); - return(0); -} - - - -long -get_symbol_offset(char *name, asection *sec, asymbol **symbol_table, long number_of_symbols) -{ - long i; - for (i=0; isection == sec) { - if (!strcmp(symbol_table[i]->name, name)) { - return symbol_table[i]->value; - } - } - } - return -1; -} - - - -long -get_gp_value(asymbol **symbol_table, long number_of_symbols) -{ - long i; - for (i=0; iname, "_gp")) - return symbol_table[i]->value; - } - return -1; -} - - - -long -add_com_to_bss(asymbol **symbol_table, long number_of_symbols, long bss_len) -{ - long i, comsize; - long offset; - - comsize = 0; - for (i=0; isection->name) == 0) { - offset = bss_len + comsize; - comsize += symbol_table[i]->value; - symbol_table[i]->value = offset; - } - } - return comsize; -} - -#ifdef TARGET_bfin -/* FUNCTION : weak_und_symbol - ABSTRACT : return true if symbol is weak and undefined. -*/ -static int -weak_und_symbol(const char *reloc_section_name, - struct bfd_symbol *symbol) -{ - if (!(strstr (reloc_section_name, "text") - || strstr (reloc_section_name, "data") - || strstr (reloc_section_name, "bss"))) { - if (symbol->flags & BSF_WEAK) { -#ifdef DEBUG_BFIN - fprintf(stderr, "found weak undefined symbol %s\n", symbol->name); -#endif - return TRUE; - } - } - return FALSE; -} - -static int -bfin_set_reloc (uint32_t *reloc, - const char *reloc_section_name, - const char *sym_name, - struct bfd_symbol *symbol, - int sp, int hilo, int32_t offset) -{ - unsigned int type; - uint32_t val; - - if (strstr (reloc_section_name, "text")) - type = FLAT_RELOC_TYPE_TEXT; - else if (strstr (reloc_section_name, "data")) - type = FLAT_RELOC_TYPE_DATA; - else if (strstr (reloc_section_name, "bss")) - type = FLAT_RELOC_TYPE_BSS; - else if (strstr (reloc_section_name, "stack")) - type = FLAT_RELOC_TYPE_STACK; - else if (symbol->flags & BSF_WEAK){ - /* weak symbol support ... if a weak symbol is undefined at the - end of a final link, it should return 0 rather than error - We will assume text section for the moment. - */ - type = FLAT_RELOC_TYPE_TEXT; - } else if (strstr (reloc_section_name, "*ABS*")){ - /* (A data section initialization of something in the shared libc's text section - does not resolve - i.e. a global pointer to function initialized with - a libc function). - The text section here is appropriate as the section information - of the shared library is lost. The loader will do some calcs. - */ - type = FLAT_RELOC_TYPE_TEXT; - } else { - printf ("Unknown Type - relocation for %s in bad section - %s\n", sym_name, reloc_section_name); - return 1; - } - - val = (offset & ((1 << 26) - 1)) << 6; - val |= (sp & (1 << 3) - 1) << 3; - val |= (hilo & 1) << 2; - val |= (type & (1 << 2) - 1); - *reloc = val; - return 0; -} -#endif - - -uint32_t * -output_relocs ( - bfd *abs_bfd, - asymbol **symbols, - int number_of_symbols, - unsigned long *n_relocs, - unsigned char *text, int text_len, unsigned long text_vma, - unsigned char *data, int data_len, unsigned long data_vma, - bfd *rel_bfd) -{ - uint32_t *flat_relocs; - asection *a, *sym_section, *r; - arelent **relpp, **p, *q; - const char *sym_name, *section_name; - unsigned char *sectionp; - unsigned long pflags; - char addstr[16]; - long sym_addr, sym_vma, section_vma; - int relsize, relcount; - int flat_reloc_count; - int sym_reloc_size, rc; - int got_size = 0; - int bad_relocs = 0; - asymbol **symb; - long nsymb; - -#if 0 - printf("%s(%d): output_relocs(abs_bfd=%d,synbols=0x%x,number_of_symbols=%d" - "n_relocs=0x%x,text=0x%x,text_len=%d,data=0x%x,data_len=%d)\n", - __FILE__, __LINE__, abs_bfd, symbols, number_of_symbols, n_relocs, - text, text_len, data, data_len); -#endif - -#if 0 -dump_symbols(symbols, number_of_symbols); -#endif - - *n_relocs = 0; - flat_relocs = NULL; - flat_reloc_count = 0; - rc = 0; - pflags = 0; - - /* Determine how big our offset table is in bytes. - * This isn't too difficult as we've terminated the table with -1. - * Also note that both the relocatable and absolute versions have this - * terminator even though the relocatable one doesn't have the GOT! - */ - if (pic_with_got && !use_resolved) { - unsigned long *lp = (unsigned long *)data; - /* Should call ntohl(*lp) here but is isn't going to matter */ - while (*lp != 0xffffffff) lp++; - got_size = ((unsigned char *)lp) - data; - if (verbose) - printf("GOT table contains %d entries (%d bytes)\n", - got_size/sizeof(unsigned long), got_size); -#ifdef TARGET_m68k - if (got_size > GOT_LIMIT) { - fprintf(stderr, "GOT too large: %d bytes (limit = %d bytes)\n", - got_size, GOT_LIMIT); - exit(1); - } -#endif - } - - for (a = abs_bfd->sections; (a != (asection *) NULL); a = a->next) { - section_vma = bfd_section_vma(abs_bfd, a); - - if (verbose) - printf("SECTION: %s [0x%x]: flags=0x%x vma=0x%x\n", a->name, a, - a->flags, section_vma); - -// if (bfd_is_abs_section(a)) -// continue; - if (bfd_is_und_section(a)) - continue; - if (bfd_is_com_section(a)) - continue; -// if ((a->flags & SEC_RELOC) == 0) -// continue; - - /* - * Only relocate things in the data sections if we are PIC/GOT. - * otherwise do text as well - */ - if (!pic_with_got && (a->flags & SEC_CODE)) - sectionp = text + (a->vma - text_vma); - else if (a->flags & SEC_DATA) - sectionp = data + (a->vma - data_vma); - else - continue; - - /* Now search for the equivalent section in the relocation binary - * and use that relocation information to build reloc entries - * for this one. - */ - for (r=rel_bfd->sections; r != NULL; r=r->next) - if (strcmp(a->name, r->name) == 0) - break; - if (r == NULL) - continue; - if (verbose) - printf(" RELOCS: %s [0x%x]: flags=0x%x vma=0x%x\n", r->name, r, - r->flags, bfd_section_vma(abs_bfd, r)); - if ((r->flags & SEC_RELOC) == 0) - continue; - relsize = bfd_get_reloc_upper_bound(rel_bfd, r); - if (relsize <= 0) { - if (verbose) - printf("%s(%d): no relocation entries section=0x%x\n", - __FILE__, __LINE__, r->name); - continue; - } - - symb = get_symbols(rel_bfd, &nsymb); - relpp = (arelent **) xmalloc(relsize); - relcount = bfd_canonicalize_reloc(rel_bfd, r, relpp, symb); - if (relcount <= 0) { - if (verbose) - printf("%s(%d): no relocation entries section=%s\n", - __FILE__, __LINE__, r->name); - continue; - } else { - for (p = relpp; (relcount && (*p != NULL)); p++, relcount--) { - unsigned char *r_mem; - int relocation_needed = 0; - -#ifdef TARGET_microblaze - /* The MICROBLAZE_XX_NONE relocs can be skipped. - They represent PC relative branches that the - linker has already resolved */ - - switch ((*p)->howto->type) - { - case R_MICROBLAZE_NONE: - case R_MICROBLAZE_64_NONE: - continue; - } -#endif /* TARGET_microblaze */ - -#ifdef TARGET_v850 - /* Skip this relocation entirely if possible (we - do this early, before doing any other - processing on it). */ - switch ((*p)->howto->type) { -#ifdef R_V850_9_PCREL - case R_V850_9_PCREL: -#endif -#ifdef R_V850_22_PCREL - case R_V850_22_PCREL: -#endif -#ifdef R_V850_SDA_16_16_OFFSET - case R_V850_SDA_16_16_OFFSET: -#endif -#ifdef R_V850_SDA_15_16_OFFSET - case R_V850_SDA_15_16_OFFSET: -#endif -#ifdef R_V850_ZDA_15_16_OFFSET - case R_V850_ZDA_15_16_OFFSET: -#endif -#ifdef R_V850_TDA_6_8_OFFSET - case R_V850_TDA_6_8_OFFSET: -#endif -#ifdef R_V850_TDA_7_8_OFFSET - case R_V850_TDA_7_8_OFFSET: -#endif -#ifdef R_V850_TDA_7_7_OFFSET - case R_V850_TDA_7_7_OFFSET: -#endif -#ifdef R_V850_TDA_16_16_OFFSET - case R_V850_TDA_16_16_OFFSET: -#endif -#ifdef R_V850_TDA_4_5_OFFSET - case R_V850_TDA_4_5_OFFSET: -#endif -#ifdef R_V850_TDA_4_4_OFFSET - case R_V850_TDA_4_4_OFFSET: -#endif -#ifdef R_V850_SDA_16_16_SPLIT_OFFSET - case R_V850_SDA_16_16_SPLIT_OFFSET: -#endif -#ifdef R_V850_CALLT_6_7_OFFSET - case R_V850_CALLT_6_7_OFFSET: -#endif -#ifdef R_V850_CALLT_16_16_OFFSET - case R_V850_CALLT_16_16_OFFSET: -#endif - /* These are relative relocations, which - have already been fixed up by the - linker at this point, so just ignore - them. */ - continue; - } -#endif /* USE_V850_RELOCS */ - - q = *p; - if (q->sym_ptr_ptr && *q->sym_ptr_ptr) { - sym_name = (*(q->sym_ptr_ptr))->name; - sym_section = (*(q->sym_ptr_ptr))->section; - section_name=(*(q->sym_ptr_ptr))->section->name; - } else { - printf("ERROR: undefined relocation entry\n"); - rc = -1; - continue; - } -#ifndef TARGET_bfin - /* Adjust the address to account for the GOT table which wasn't - * present in the relative file link. - */ - if (pic_with_got && !use_resolved) - q->address += got_size; -#endif - - /* A pointer to what's being relocated, used often - below. */ - r_mem = sectionp + q->address; - - /* - * Fixup offset in the actual section. - */ - addstr[0] = 0; -#ifndef TARGET_e1 - if ((sym_addr = get_symbol_offset((char *) sym_name, - sym_section, symbols, number_of_symbols)) == -1) { - sym_addr = 0; - } -#else - sym_addr = (*(q->sym_ptr_ptr))->value; -#endif - if (use_resolved) { - /* Use the address of the symbol already in - the program text. How this is handled may - still depend on the particular relocation - though. */ - switch (q->howto->type) { - int r2_type; -#ifdef TARGET_v850 - case R_V850_HI16_S: - /* We specially handle adjacent - HI16_S/ZDA_15_16_OFFSET and - HI16_S/LO16 pairs that reference the - same address (these are usually - movhi/ld and movhi/movea pairs, - respectively). */ - if (relcount == 0) - r2_type = R_V850_NONE; - else - r2_type = p[1]->howto->type; - if ((r2_type == R_V850_ZDA_15_16_OFFSET - || r2_type == R_V850_LO16) - && (p[0]->sym_ptr_ptr - == p[1]->sym_ptr_ptr) - && (p[0]->addend == p[1]->addend)) - { - relocation_needed = 1; - - switch (r2_type) { - case R_V850_ZDA_15_16_OFFSET: - pflags = 0x10000000; - break; - case R_V850_LO16: - pflags = 0x20000000; - break; - } - - /* We don't really need the - actual value -- the bits - produced by the linker are - what we want in the final - flat file -- but get it - anyway if useful for - debugging. */ - if (verbose) { - unsigned char *r2_mem = - sectionp - + p[1]->address; - /* little-endian */ - int hi = r_mem[0] - + (r_mem[1] << 8); - int lo = r2_mem[0] - + (r2_mem[1] << 8); - /* Sign extend LO. */ - lo = (lo ^ 0x8000) - - 0x8000; - - /* Maybe ignore the LSB - of LO, which is - actually part of the - instruction. */ - if (r2_type != R_V850_LO16) - lo &= ~1; - - sym_addr = - (hi << 16) - + lo; - } - } else - goto bad_resolved_reloc; - break; - - case R_V850_LO16: - /* See if this is actually the - 2nd half of a pair. */ - if (p > relpp - && (p[-1]->howto->type - == R_V850_HI16_S) - && (p[-1]->sym_ptr_ptr - == p[0]->sym_ptr_ptr) - && (p[-1]->addend == p[0]->addend)) - break; /* not an error */ - else - goto bad_resolved_reloc; - - case R_V850_HI16: - goto bad_resolved_reloc; - default: - goto good_32bit_resolved_reloc; -#elif defined(TARGET_arm) - case R_ARM_ABS32: - relocation_needed = 1; - break; - case R_ARM_REL32: - case R_ARM_THM_PC11: - case R_ARM_THM_PC22: - relocation_needed = 0; - break; - default: - goto bad_resolved_reloc; -#elif defined(TARGET_m68k) - case R_68K_32: - goto good_32bit_resolved_reloc; - case R_68K_PC32: - case R_68K_PC16: - /* The linker has already resolved - PC relocs for us. In PIC links, - the symbol must be in the data - segment. */ - case R_68K_NONE: - continue; - default: - goto bad_resolved_reloc; -#else - default: - /* The default is to assume that the - relocation is relative and has - already been fixed up by the - linker (perhaps we ought to make - give an error by default, and - require `safe' relocations to be - enumberated explicitly?). */ - goto good_32bit_resolved_reloc; -#endif - good_32bit_resolved_reloc: - if (bfd_big_endian (abs_bfd)) - sym_addr = - (r_mem[0] << 24) - + (r_mem[1] << 16) - + (r_mem[2] << 8) - + r_mem[3]; - else - sym_addr = - r_mem[0] - + (r_mem[1] << 8) - + (r_mem[2] << 16) - + (r_mem[3] << 24); - relocation_needed = 1; - break; - - bad_resolved_reloc: - printf("ERROR: reloc type %s unsupported in this context\n", - q->howto->name); - bad_relocs++; - break; - } - } else { - /* Calculate the sym address ourselves. */ - sym_reloc_size = bfd_get_reloc_size(q->howto); - -#if !defined(TARGET_h8300) && !defined(TARGET_e1) && !defined(TARGET_bfin) && !defined(TARGET_m68k) - if (sym_reloc_size != 4) { - printf("ERROR: bad reloc type %d size=%d for symbol=%s\n", - (*p)->howto->type, sym_reloc_size, sym_name); - bad_relocs++; - rc = -1; - continue; - } -#endif - - switch ((*p)->howto->type) { - -#if defined(TARGET_m68k) - case R_68K_32: - relocation_needed = 1; - sym_vma = bfd_section_vma(abs_bfd, sym_section); - sym_addr += sym_vma + q->addend; - break; - case R_68K_PC16: - case R_68K_PC32: - sym_vma = 0; - sym_addr += sym_vma + q->addend; - sym_addr -= q->address; - break; -#endif - -#if defined(TARGET_arm) - case R_ARM_ABS32: - relocation_needed = 1; - if (verbose) - fprintf(stderr, - "%s vma=0x%x, value=0x%x, address=0x%x " - "sym_addr=0x%x rs=0x%x, opcode=0x%x\n", - "ABS32", - sym_vma, (*(q->sym_ptr_ptr))->value, - q->address, sym_addr, - (*p)->howto->rightshift, - *(unsigned long *)r_mem); - sym_vma = bfd_section_vma(abs_bfd, sym_section); - sym_addr += sym_vma + q->addend; - break; - case R_ARM_GOT32: - case R_ARM_GOTPC: - /* Should be fine as is */ - break; - case R_ARM_PLT32: - if (verbose) - fprintf(stderr, - "%s vma=0x%x, value=0x%x, address=0x%x " - "sym_addr=0x%x rs=0x%x, opcode=0x%x\n", - "PLT32", - sym_vma, (*(q->sym_ptr_ptr))->value, - q->address, sym_addr, - (*p)->howto->rightshift, - *(unsigned long *)r_mem); - case R_ARM_PC24: - sym_vma = 0; - sym_addr = (sym_addr-q->address)>>(*p)->howto->rightshift; - break; -#endif - -#ifdef TARGET_v850 - case R_V850_32: - relocation_needed = 1; - sym_vma = bfd_section_vma(abs_bfd, sym_section); - sym_addr += sym_vma + q->addend; - break; -#if defined(R_V850_ZDA_16_16_OFFSET) || defined(R_V850_ZDA_16_16_SPLIT_OFFSET) -#ifdef R_V850_ZDA_16_16_OFFSET - case R_V850_ZDA_16_16_OFFSET: -#endif -#ifdef R_V850_ZDA_16_16_SPLIT_OFFSET - case R_V850_ZDA_16_16_SPLIT_OFFSET: -#endif - /* Can't support zero-relocations. */ - printf ("ERROR: %s+0x%x: zero relocations not supported\n", - sym_name, q->addend); - continue; -#endif /* R_V850_ZDA_16_16_OFFSET || R_V850_ZDA_16_16_SPLIT_OFFSET */ -#endif /* TARGET_v850 */ - -#ifdef TARGET_h8300 - case R_H8_DIR24R8: - if (sym_reloc_size != 4) { - printf("R_H8_DIR24R8 size %d\n", sym_reloc_size); - bad_relocs++; - continue; - } - relocation_needed = 1; - sym_addr = (*(q->sym_ptr_ptr))->value; - q->address -= 1; - r_mem -= 1; /* tracks q->address */ - sym_vma = bfd_section_vma(abs_bfd, sym_section); - sym_addr += sym_vma + q->addend; - sym_addr |= (*(unsigned char *)r_mem<<24); - break; - case R_H8_DIR24A8: - if (sym_reloc_size != 4) { - printf("R_H8_DIR24A8 size %d\n", sym_reloc_size); - bad_relocs++; - continue; - } - /* Absolute symbol done not relocation */ - relocation_needed = !bfd_is_abs_section(sym_section); - sym_addr = (*(q->sym_ptr_ptr))->value; - sym_vma = bfd_section_vma(abs_bfd, sym_section); - sym_addr += sym_vma + q->addend; - break; - case R_H8_DIR32: - case R_H8_DIR32A16: /* currently 32, could be made 16 */ - if (sym_reloc_size != 4) { - printf("R_H8_DIR32 size %d\n", sym_reloc_size); - bad_relocs++; - continue; - } - relocation_needed = 1; - sym_addr = (*(q->sym_ptr_ptr))->value; - sym_vma = bfd_section_vma(abs_bfd, sym_section); - sym_addr += sym_vma + q->addend; - break; - case R_H8_PCREL16: - sym_vma = 0; - sym_addr = (*(q->sym_ptr_ptr))->value; - sym_addr += sym_vma + q->addend; - sym_addr -= (q->address + 2); - if (bfd_big_endian(abs_bfd)) - *(unsigned short *)r_mem = - bfd_big_endian(abs_bfd) ? htons(sym_addr) : sym_addr; - continue; - case R_H8_PCREL8: - sym_vma = 0; - sym_addr = (*(q->sym_ptr_ptr))->value; - sym_addr += sym_vma + q->addend; - sym_addr -= (q->address + 1); - *(unsigned char *)r_mem = sym_addr; - continue; -#endif - -#ifdef TARGET_microblaze - case R_MICROBLAZE_64: - /* The symbol is split over two consecutive instructions. - Flag this to the flat loader by setting the high bit of - the relocation symbol. */ - { - unsigned char *p = r_mem; - unsigned long offset; - pflags=0x80000000; - - /* work out the relocation */ - sym_vma = bfd_section_vma(abs_bfd, sym_section); - /* grab any offset from the text */ - offset = (p[2]<<24) + (p[3] << 16) + (p[6] << 8) + (p[7]); - /* Update the address */ - sym_addr += offset + sym_vma + q->addend; - /* Write relocated pointer back */ - p[2] = (sym_addr >> 24) & 0xff; - p[3] = (sym_addr >> 16) & 0xff; - p[6] = (sym_addr >> 8) & 0xff; - p[7] = sym_addr & 0xff; - - /* create a new reloc entry */ - flat_relocs = realloc(flat_relocs, - (flat_reloc_count + 1) * sizeof(uint32_t)); - flat_relocs[flat_reloc_count] = pflags | (section_vma + q->address); - flat_reloc_count++; - relocation_needed = 0; - pflags = 0; - sprintf(&addstr[0], "+0x%x", sym_addr - (*(q->sym_ptr_ptr))->value - - bfd_section_vma(abs_bfd, sym_section)); - if (verbose) - printf(" RELOC[%d]: offset=0x%x symbol=%s%s " - "section=%s size=%d " - "fixup=0x%x (reloc=0x%x)\n", flat_reloc_count, - q->address, sym_name, addstr, - section_name, sym_reloc_size, - sym_addr, section_vma + q->address); - if (verbose) - printf("reloc[%d] = 0x%x\n", flat_reloc_count, - section_vma + q->address); - - continue; - } - case R_MICROBLAZE_32: - { - unsigned char *p = r_mem; - unsigned long offset; - - /* grab any offset from the text */ - offset = (p[0]<<24) + (p[1] << 16) + (p[2] << 8) + (p[3]); - sym_vma = bfd_section_vma(abs_bfd, sym_section); - /* This is a horrible kludge. For some - reason, *sometimes* the offset is in - both addend and the code. Detect - it, and cancel the effect. Otherwise - the offset gets added twice - ouch. - There should be a better test - for this condition, based on the - BFD data structures */ - if(offset==q->addend) - offset=0; - - sym_addr += offset + sym_vma + q->addend; - relocation_needed = 1; - break; - } - case R_MICROBLAZE_64_PCREL: - sym_vma = 0; - //sym_addr = (*(q->sym_ptr_ptr))->value; - sym_addr += sym_vma + q->addend; - sym_addr -= (q->address + 4); - sym_addr = htonl(sym_addr); - /* insert 16 MSB */ - * ((unsigned short *) (r_mem+2)) |= (sym_addr) & 0xFFFF; - /* then 16 LSB */ - * ((unsigned short *) (r_mem+6)) |= (sym_addr >> 16) & 0xFFFF; - /* We've done all the work, so continue - to next reloc instead of break */ - continue; - -#endif /* TARGET_microblaze */ - -#ifdef TARGET_nios2 -#define htoniosl(x) (x) -#define niostohl(x) (x) - case R_NIOS2_BFD_RELOC_32: - relocation_needed = 1; - pflags = (FLAT_NIOS2_R_32 << 28); - sym_vma = bfd_section_vma(abs_bfd, sym_section); - sym_addr += sym_vma + q->addend; - /* modify target, in target order */ - *(unsigned long *)r_mem = htoniosl(sym_addr); - break; - case R_NIOS2_CALL26: - { - unsigned long exist_val; - relocation_needed = 1; - pflags = (FLAT_NIOS2_R_CALL26 << 28); - sym_vma = bfd_section_vma(abs_bfd, sym_section); - sym_addr += sym_vma + q->addend; - - /* modify target, in target order */ - // exist_val = niostohl(*(unsigned long *)r_mem); - exist_val = ((sym_addr >> 2) << 6); - *(unsigned long *)r_mem = htoniosl(exist_val); - break; - } - case R_NIOS2_HIADJ16: - case R_NIOS2_HI16: - { - unsigned long exist_val; - int r2_type; - /* handle the adjacent HI/LO pairs */ - if (relcount == 0) - r2_type = R_NIOS2_NONE; - else - r2_type = p[1]->howto->type; - if ((r2_type == R_NIOS2_LO16) - && (p[0]->sym_ptr_ptr == p[1]->sym_ptr_ptr) - && (p[0]->addend == p[1]->addend)) - { - unsigned char * r2_mem = sectionp + p[1]->address; - if (p[1]->address - q->address!=4) - printf("Err: HI/LO not adjacent %d\n", p[1]->address - q->address); - relocation_needed = 1; - pflags = (q->howto->type == R_NIOS2_HIADJ16) - ? FLAT_NIOS2_R_HIADJ_LO : FLAT_NIOS2_R_HI_LO; - pflags <<= 28; - - sym_vma = bfd_section_vma(abs_bfd, sym_section); - sym_addr += sym_vma + q->addend; - - /* modify high 16 bits, in target order */ - exist_val = niostohl(*(unsigned long *)r_mem); - exist_val = ((exist_val >> 22) << 22) | (exist_val & 0x3f); - if (q->howto->type == R_NIOS2_HIADJ16) - exist_val |= ((((sym_addr >> 16) + ((sym_addr >> 15) & 1)) & 0xFFFF) << 6); - else - exist_val |= (((sym_addr >> 16) & 0xFFFF) << 6); - *(unsigned long *)r_mem = htoniosl(exist_val); - - /* modify low 16 bits, in target order */ - exist_val = niostohl(*(unsigned long *)r2_mem); - exist_val = ((exist_val >> 22) << 22) | (exist_val & 0x3f); - exist_val |= ((sym_addr & 0xFFFF) << 6); - *(unsigned long *)r2_mem = htoniosl(exist_val); - - } else - goto NIOS2_RELOC_ERR; - } - break; - - case R_NIOS2_GPREL: - { - unsigned long exist_val, temp; - //long gp = get_symbol_offset("_gp", sym_section, symbols, number_of_symbols); - long gp = get_gp_value(symbols, number_of_symbols); - if (gp == -1) { - printf("Err: unresolved symbol _gp when relocating %s\n", sym_name); - goto NIOS2_RELOC_ERR; - } - /* _gp holds a absolute value, otherwise the ld cannot generate correct code */ - sym_vma = bfd_section_vma(abs_bfd, sym_section); - //printf("sym=%x, %d, _gp=%x, %d\n", sym_addr+sym_vma, sym_addr+sym_vma, gp, gp); - sym_addr += sym_vma + q->addend; - sym_addr -= gp; - //printf("sym - _gp=%x, %d\n", sym_addr, sym_addr); - /* modify the target, in target order (little_endian) */ - exist_val = niostohl(*(unsigned long *)r_mem); - temp = ((exist_val >> 6) & 0x3ff0000) | (sym_addr & 0xffff); - temp <<= 6; - temp |= (exist_val & 0x3f); - *(unsigned long *)r_mem = htoniosl(temp); - if (verbose) - printf("omit: offset=0x%x symbol=%s%s " - "section=%s size=%d " - "fixup=0x%x (reloc=0x%x) GPREL\n", - q->address, sym_name, addstr, - section_name, sym_reloc_size, - sym_addr, section_vma + q->address); - continue; - } - case R_NIOS2_PCREL16: - { - unsigned long exist_val; - sym_vma = 0; - sym_addr += sym_vma + q->addend; - sym_addr -= (q->address + 4); - /* modify the target, in target order (little_endian) */ - exist_val = niostohl(*(unsigned long *)r_mem); - exist_val = ((exist_val >> 22) << 22) | (exist_val & 0x3f); - exist_val |= ((sym_addr & 0xFFFF) << 6); - *(unsigned long *)r_mem = htoniosl(exist_val); - if (verbose) - printf("omit: offset=0x%x symbol=%s%s " - "section=%s size=%d " - "fixup=0x%x (reloc=0x%x) PCREL\n", - q->address, sym_name, addstr, - section_name, sym_reloc_size, - sym_addr, section_vma + q->address); - continue; - } - - case R_NIOS2_LO16: - /* check if this is actually the 2nd half of a pair */ - if ((p > relpp) - && ((p[-1]->howto->type == R_NIOS2_HIADJ16) - || (p[-1]->howto->type == R_NIOS2_HI16)) - && (p[-1]->sym_ptr_ptr == p[0]->sym_ptr_ptr) - && (p[-1]->addend == p[0]->addend)) { - if (verbose) - printf("omit: offset=0x%x symbol=%s%s " - "section=%s size=%d LO16\n", - q->address, sym_name, addstr, - section_name, sym_reloc_size); - continue; - } - - /* error, fall through */ - - case R_NIOS2_S16: - case R_NIOS2_U16: - case R_NIOS2_CACHE_OPX: - case R_NIOS2_IMM5: - case R_NIOS2_IMM6: - case R_NIOS2_IMM8: - case R_NIOS2_BFD_RELOC_16: - case R_NIOS2_BFD_RELOC_8: - case R_NIOS2_GNU_VTINHERIT: - case R_NIOS2_GNU_VTENTRY: - case R_NIOS2_UJMP: - case R_NIOS2_CJMP: - case R_NIOS2_CALLR: -NIOS2_RELOC_ERR: - printf("Err: unexpected reloc type %s(%d)\n", q->howto->name, q->howto->type); - bad_relocs++; - continue; -#endif /* TARGET_nios2 */ - -#ifdef TARGET_sparc - case R_SPARC_32: - case R_SPARC_UA32: - relocation_needed = 1; - sym_vma = bfd_section_vma(abs_bfd, sym_section); - sym_addr += sym_vma + q->addend; - break; - case R_SPARC_PC22: - sym_vma = 0; - sym_addr += sym_vma + q->addend; - sym_addr -= q->address; - break; - case R_SPARC_WDISP30: - sym_addr = (((*(q->sym_ptr_ptr))->value- - q->address) >> 2) & 0x3fffffff; - sym_addr |= ( - ntohl(*(unsigned long *)r_mem) - & 0xc0000000 - ); - break; - case R_SPARC_HI22: - relocation_needed = 1; - pflags = 0x80000000; - sym_vma = bfd_section_vma(abs_bfd, sym_section); - sym_addr += sym_vma + q->addend; - sym_addr |= ( - htonl(*(unsigned long *)r_mem) - & 0xffc00000 - ); - break; - case R_SPARC_LO10: - relocation_needed = 1; - pflags = 0x40000000; - sym_vma = bfd_section_vma(abs_bfd, sym_section); - sym_addr += sym_vma + q->addend; - sym_addr &= 0x000003ff; - sym_addr |= ( - htonl(*(unsigned long *)r_mem) - & 0xfffffc00 - ); - break; -#endif /* TARGET_sparc */ - -#ifdef TARGET_bfin - case R_pcrel12_jump: - case R_pcrel12_jump_s: - case R_pcrel24: - case R_pcrel24_jump_l: - case R_pcrel24_jump_x: - case R_pcrel24_call_x: - case R_pcrel10: - case R_pcrel11: - case R_pcrel5m2: - sym_addr += q->addend;// get the symbol addr - sym_vma = bfd_section_vma(abs_bfd, sym_section); - sym_addr -= q->address; // make it PC relative - // implicitly assumes code section and symbol section are same - break; - case R_got: - /* Ignore these. */ - break; - - case R_rimm16: - sym_addr += q->addend; - if(weak_und_symbol(sym_section->name, (*(q->sym_ptr_ptr)))) - continue; - if(0xFFFF0000 & sym_addr){ - fprintf (stderr, "Relocation overflow for rN = %s\n",sym_name); - bad_relocs++; - } - flat_relocs = (uint32_t *) - (realloc (flat_relocs, (flat_reloc_count + 1) * sizeof (uint32_t))); - if (bfin_set_reloc (flat_relocs + flat_reloc_count, - sym_section->name, sym_name, - (*(q->sym_ptr_ptr)), - 0, FLAT_RELOC_PART_LO, - section_vma + q->address)) - bad_relocs++; - flat_reloc_count++; - break; - - case R_luimm16: - case R_huimm16: - { - unsigned int sp; - unsigned int reloc_count_incr; - unsigned int hi_lo; - - if (q->howto->type == R_luimm16) - hi_lo = FLAT_RELOC_PART_LO; - else - hi_lo = FLAT_RELOC_PART_HI; - - sym_addr += q->addend; - - flat_relocs = (uint32_t *) - (realloc (flat_relocs, (flat_reloc_count + 2) * sizeof (uint32_t))); - reloc_count_incr = 1; - if (weak_und_symbol (sym_section->name, (*(q->sym_ptr_ptr)))) - continue; - if (0xFFFF0000 & sym_addr) { - /* value is > 16 bits - use an extra field */ - /* see if we have already output that symbol */ - /* reloc may be addend from symbol and */ - /* we can only store 16 bit offsets */ - sp = 1; - if ((*(q->sym_ptr_ptr))->udata.i == 0 - || flat_relocs[(*(q->sym_ptr_ptr))->udata.i] != sym_addr - || ((*(q->sym_ptr_ptr))->udata.i & 0xFFFF0000)) - { - reloc_count_incr = 2; - flat_relocs[flat_reloc_count + 1] = sym_addr; - (*(q->sym_ptr_ptr))->udata.i = flat_reloc_count + 1; - sym_addr = 0; // indication to loader to read next - } else{ - sym_addr = (*(q->sym_ptr_ptr))->udata.i; - } - } else { - sp = 0; - } - - if (bfin_set_reloc (flat_relocs + flat_reloc_count, - sym_section->name, sym_name, - (*(q->sym_ptr_ptr)), - sp, hi_lo, - section_vma + q->address)) - bad_relocs++; - flat_reloc_count += reloc_count_incr; - break; - } - case R_byte4_data: - sym_addr += q->addend; - - if (weak_und_symbol (sym_section->name, *q->sym_ptr_ptr)) - continue; - - flat_relocs = (uint32_t *) - (realloc (flat_relocs, (flat_reloc_count + 1) * sizeof (uint32_t))); - if (bfin_set_reloc (flat_relocs + flat_reloc_count, - sym_section->name, sym_name, - (*(q->sym_ptr_ptr)), - 2, FLAT_RELOC_PART_LO, - section_vma + q->address)) - bad_relocs++; - - flat_reloc_count++; - break; - -#endif //TARGET_bfin - -#ifdef TARGET_sh - case R_SH_DIR32: - relocation_needed = 1; - sym_vma = bfd_section_vma(abs_bfd, sym_section); - sym_addr += sym_vma + q->addend; - break; - case R_SH_REL32: - sym_vma = 0; - sym_addr += sym_vma + q->addend; - sym_addr -= q->address; - break; -#endif /* TARGET_sh */ - -#ifdef TARGET_e1 -#define htoe1l(x) htonl(x) - -#if 0 -#define DEBUG_E1 -#endif - -#ifdef DEBUG_E1 -#define DBG_E1 printf -#else -#define DBG_E1(x, ... ) -#endif - -#define _32BITS_RELOC 0x00000000 -#define _30BITS_RELOC 0x80000000 -#define _28BITS_RELOC 0x40000000 - { - char *p; - unsigned long sec_vma, exist_val, S; - case R_E1_CONST31: - relocation_needed = 1; - DBG_E1("Handling Reloc \n"); - sec_vma = bfd_section_vma(abs_bfd, sym_section); - DBG_E1("sec_vma : [0x%x], sym_addr : [0x%x], q->address : [0x%x]\n", - sec_vma, sym_addr, q->address); - sym_addr = sec_vma + sym_addr; - exist_val = *(unsigned long*)((unsigned long)sectionp + q->address + 2); - DBG_E1("Orig:exist_val : [0x%08x]\n", exist_val); - exist_val = htoe1l(exist_val); - DBG_E1("HtoBE:exist_val : [0x%08x]\n", exist_val); - sym_addr += exist_val; - pflags = _30BITS_RELOC; - break; - case R_E1_CONST31_PCREL: - relocation_needed = 0; - DBG_E1("Handling Reloc \n"); - DBG_E1("DONT RELOCATE AT LOADING\n"); - sec_vma = bfd_section_vma(abs_bfd, sym_section); - DBG_E1("sec_vma : [0x%x], sym_addr : [0x%x], q->address : [0x%x]\n", - sec_vma, sym_addr, q->address); - sym_addr = sec_vma + sym_addr; - DBG_E1("sym_addr = sec_vma + sym_addr : [0x%x]\n", sym_addr ); - - DBG_E1("q->address : 0x%x, section_vma : 0x%x\n", q->address, - section_vma ); - q->address = q->address + section_vma; - DBG_E1("q->address += section_vma : 0x%x\n", q->address ); - - if( (sym_addr = (sym_addr - q->address - 6)) < 0 ) - DBG_E1("NEGATIVE OFFSET in PC Relative instruction\n"); - DBG_E1( "sym_addr := sym_addr - q->address - " - "sizeof(CONST31_PCREL): [0x%x]\n", - sym_addr ); - exist_val = *(unsigned long*)((unsigned long)sectionp + q->address + 2); - DBG_E1("Orig:exist_val : [0x%08x]\n", exist_val); - exist_val = htoe1l(exist_val); - DBG_E1("HtoBE:exist_val : [0x%08x]\n", exist_val); - sym_addr |= exist_val; - DBG_E1("sym_addr |= exist_val) : [0x%x]\n", sym_addr ); - break; - case R_E1_DIS29W_PCREL: - relocation_needed = 0; - DBG_E1("Handling Reloc \n"); - DBG_E1("DONT RELOCATE AT LOADING\n"); - sec_vma = bfd_section_vma(abs_bfd, sym_section); - DBG_E1("sec_vma : [0x%x], sym_addr : [0x%x], q->address : [0x%x]\n", - sec_vma, sym_addr, q->address); - sym_addr = sec_vma + sym_addr; - DBG_E1("sym_addr = sec_vma + sym_addr : [0x%x]\n", sym_addr ); - - DBG_E1("q->address : 0x%x, section_vma : 0x%x\n", q->address, - section_vma ); - q->address = q->address + section_vma; - DBG_E1("q->address += section_vma : 0x%x\n", q->address ); - - if( (sym_addr = (sym_addr - q->address - 6)) < 0 ) - DBG_E1("NEGATIVE OFFSET in PC Relative instruction\n"); - DBG_E1( "sym_addr := sym_addr - q->address - " - "sizeof(CONST31_PCREL): [0x%x]\n", - sym_addr ); - DBG_E1("sectionp:[0x%x], q->address:[0x%x]\n", sectionp, q->address ); - exist_val = *(unsigned long*)((unsigned long)sectionp + q->address + 2); - DBG_E1("Original:exist_val : [0x%08x]\n",exist_val); - exist_val = htoe1l(exist_val); - DBG_E1("HtoBE:exist_val : [0x%08x]\n",exist_val); - sym_addr += exist_val; - break; - case R_E1_DIS29W: - DBG_E1("Handling Reloc \n"); - goto DIS29_RELOCATION; - case R_E1_DIS29H: - DBG_E1("Handling Reloc \n"); - goto DIS29_RELOCATION; - case R_E1_DIS29B: - DBG_E1("Handling Reloc \n"); -DIS29_RELOCATION: - relocation_needed = 1; - sec_vma = bfd_section_vma(abs_bfd, sym_section); - DBG_E1("sec_vma : [0x%x], sym_addr : [0x%08x]\n", - sec_vma, sym_addr); - sym_addr = sec_vma + sym_addr; - DBG_E1("sym_addr = sec_vma + sym_addr : [0x%08x]\n", sym_addr); - exist_val = *(unsigned long*)((unsigned long)sectionp + q->address + 2); - DBG_E1("Orig:exist_val : [0x%08x]\n", exist_val); - exist_val = htoe1l(exist_val); - DBG_E1("HtoBE:exist_val : [0x%08x]\n", exist_val); - sym_addr += exist_val; - DBG_E1("sym_addr += exist_val : [0x%08x]\n", sym_addr); - pflags = _28BITS_RELOC; - break; - case R_E1_IMM32_PCREL: - relocation_needed = 0; - DBG_E1("Handling Reloc \n"); - DBG_E1("DONT RELOCATE AT LOADING\n"); - sec_vma = bfd_section_vma(abs_bfd, sym_section); - DBG_E1("sec_vma : [0x%x], sym_addr : [0x%x]\n", - sec_vma, sym_addr); - sym_addr = sec_vma + sym_addr; - - DBG_E1("sym_addr = sec_vma + sym_addr : [0x%x]\n", sym_addr ); - DBG_E1("q->address : 0x%x, section_vma : 0x%x\n", q->address, - section_vma ); - q->address = q->address + section_vma; - DBG_E1("q->address += section_vma : 0x%x\n", q->address ); - - if( (sym_addr = (sym_addr - q->address - 6 )) < 0 ) - DBG_E1("NEGATIVE OFFSET in PC Relative instruction\n"); - DBG_E1( "sym_addr := sym_addr - q->address - " - "sizeof(CONST31_PCREL): [0x%x]\n", - sym_addr ); - DBG_E1("sectionp:[0x%x], q->address:[0x%x]\n", sectionp, q->address ); - exist_val = *(unsigned long*)((unsigned long)sectionp + q->address + 2); - DBG_E1("Original:exist_val : [0x%08x]\n",exist_val); - exist_val = htoe1l(exist_val); - DBG_E1("HtoBE:exist_val : [0x%08x]\n",exist_val); - sym_addr += exist_val; - break; - case R_E1_IMM32: - relocation_needed = 1; - DBG_E1("Handling Reloc \n"); - sec_vma = bfd_section_vma(abs_bfd, sym_section); - DBG_E1("sec_vma : [0x%x], sym_addr : [0x%x]\n", - sec_vma, sym_addr); - sym_addr = sec_vma + sym_addr; - DBG_E1("sym_addr = sec_vma + sym_addr : [0x%x]\n", sym_addr ); - DBG_E1("sectionp:[0x%x], q->address:[0x%x]\n", sectionp, q->address ); - exist_val = *(unsigned long*)((unsigned long)sectionp + q->address + 2); - DBG_E1("Original:exist_val : [0x%08x]\n",exist_val); - exist_val = htoe1l(exist_val); - DBG_E1("HtoBE:exist_val : [0x%08x]\n",exist_val); - sym_addr += exist_val; - pflags = _32BITS_RELOC; - break; - case R_E1_WORD: - relocation_needed = 1; - DBG_E1("Handling Reloc \n"); - sec_vma = bfd_section_vma(abs_bfd, sym_section); - DBG_E1("sec_vma : [0x%x], sym_addr : [0x%x]\n", - sec_vma, sym_addr); - sym_addr = sec_vma + sym_addr; - DBG_E1("sym_addr = sec_vma + sym_addr : [0x%x]\n", sym_addr ); - exist_val = *(unsigned long*)((unsigned long)sectionp + q->address ); - DBG_E1("Orig:exist_val : [0x%08x]\n", exist_val); - exist_val = htoe1l(exist_val); - DBG_E1("HtoBE:exist_val : [0x%08x]\n", exist_val); - sym_addr += exist_val; - DBG_E1("sym_addr += exist_val : [0x%08x]\n", sym_addr); - pflags = _32BITS_RELOC; - break; - } -#undef _32BITS_RELOC -#undef _30BITS_RELOC -#undef _28BITS_RELOC -#endif - default: - /* missing support for other types of relocs */ - printf("ERROR: bad reloc type %d\n", (*p)->howto->type); - bad_relocs++; - continue; - } - } - - sprintf(&addstr[0], "+0x%x", sym_addr - (*(q->sym_ptr_ptr))->value - - bfd_section_vma(abs_bfd, sym_section)); - - - /* - * for full elf relocation we have to write back the - * start_code relative value to use. - */ - if (!pic_with_got) { -#if defined(TARGET_arm) - union { - unsigned char c[4]; - unsigned long l; - } tmp; - long hl; - int i0, i1, i2, i3; - - /* - * horrible nasty hack to support different endianess - */ - if (!bfd_big_endian(abs_bfd)) { - i0 = 0; - i1 = 1; - i2 = 2; - i3 = 3; - } else { - i0 = 3; - i1 = 2; - i2 = 1; - i3 = 0; - } - - tmp.l = *(unsigned long *)r_mem; - hl = tmp.c[i0] | (tmp.c[i1] << 8) | (tmp.c[i2] << 16); - if (use_resolved || - (((*p)->howto->type != R_ARM_PC24) && - ((*p)->howto->type != R_ARM_PLT32))) - hl |= (tmp.c[i3] << 24); - else if (tmp.c[i2] & 0x80) - hl |= 0xff000000; /* sign extend */ - if (!use_resolved) - hl += sym_addr; - tmp.c[i0] = hl & 0xff; - tmp.c[i1] = (hl >> 8) & 0xff; - tmp.c[i2] = (hl >> 16) & 0xff; - if (use_resolved || - (((*p)->howto->type != R_ARM_PC24) && - ((*p)->howto->type != R_ARM_PLT32))) - tmp.c[i3] = (hl >> 24) & 0xff; - if ((*p)->howto->type == R_ARM_ABS32) - *(unsigned long *)r_mem = htonl(hl); - else - *(unsigned long *)r_mem = tmp.l; - -#elif defined(TARGET_bfin) - if ((*p)->howto->type == R_pcrel24 - || (*p)->howto->type == R_pcrel24_jump_l - || (*p)->howto->type == R_pcrel24_jump_x - || (*p)->howto->type == R_pcrel24_call_x) - { - sym_addr += 2*-1*PCREL24_MAGIC_OFFSET; - *((unsigned short *)(sectionp + q->address) + 1 + PCREL24_MAGIC_OFFSET) - = (sym_addr >> 1) & 0xffff; - *((unsigned short *)(sectionp + q->address) + PCREL24_MAGIC_OFFSET) - = (0xff00 & *((unsigned short *) (sectionp + q->address) + PCREL24_MAGIC_OFFSET) - | ((sym_addr >> 17) & 0xff)); - } else if ((*p)->howto->type == R_byte4_data) { - *((uint32_t *)(sectionp + q->address)) = sym_addr; - } else if ((*p)->howto->type == R_pcrel12_jump - || (*p)->howto->type == R_pcrel12_jump_s) { - *((unsigned short *)(sectionp + q->address)) - = (0xf000 & *((unsigned short *)(sectionp + q->address)) - | ((sym_addr >> 1) & 0xfff)); - } else if ((*p)->howto->type == R_pcrel10) { - *((unsigned short *)(sectionp + q->address)) - = (~0x3ff & *((unsigned short *)(sectionp + q->address)) - | ((sym_addr >> 1) & 0x3ff)); - } else if ((*p)->howto->type == R_rimm16 - || (*p)->howto->type == R_huimm16 - || (*p)->howto->type == R_luimm16) { - /* for l and h we set the lower 16 bits which is only when it will be used */ - *((unsigned short *) (sectionp + q->address)) = (unsigned short) sym_addr; - } else if ((*p)->howto->type == R_pcrel5m2) { - *((unsigned short *)(sectionp + q->address)) - = (0xfff0 & *((unsigned short *)(sectionp + q->address)) - | ((sym_addr >> 1) & 0xf)); - } else if ((*p)->howto->type == R_pcrel11){ - *((unsigned short *)(sectionp + q->address)) - = (0xfc00 & *((unsigned short *)(sectionp + q->address)) - | ((sym_addr >> 1) & 0x3ff)); - } else if (0xE0 <= (*p)->howto->type && 0xF3 >= (*p)->howto->type) { - //arith relocs dont generate a real relocation - } else { - printf("Blackfin relocation fail for reloc type: 0x%x\n", (*p)->howto->type); - } -#elif defined(TARGET_e1) -#define OPCODE_SIZE 2 /* Add 2 bytes, counting the opcode size*/ - switch ((*p)->howto->type) { - case R_E1_CONST31: - case R_E1_CONST31_PCREL: - case R_E1_DIS29W_PCREL: - case R_E1_DIS29W: - case R_E1_DIS29H: - case R_E1_DIS29B: - case R_E1_IMM32_PCREL: - case R_E1_IMM32: - DBG_E1("In addr + 2:[0x%x] <- write [0x%x]\n", - (sectionp + q->address + 2), sym_addr ); - *((unsigned long *) (sectionp + q->address + OPCODE_SIZE)) = - htonl(sym_addr); - break; - case R_E1_WORD: - DBG_E1("In addr : [0x%x] <- write [0x%x]\n", - (sectionp + q->address), sym_addr ); - *((unsigned long *) (sectionp + q->address )) = htonl(sym_addr); - break; - default: - printf("ERROR:Unhandled Relocation. Exiting...\n"); - exit(0); - break; - } -#else /* ! TARGET_arm && ! TARGET_e1 */ - - switch (q->howto->type) { -#ifdef TARGET_v850 - case R_V850_HI16_S: - case R_V850_HI16: - case R_V850_LO16: - /* Do nothing -- for cases we handle, - the bits produced by the linker are - what we want in the final flat file - (and other cases are errors). Note - that unlike most relocated values, - it is stored in little-endian order, - but this is necessary to avoid - trashing the low-bit, and the float - loaders knows about it. */ - break; -#endif /* TARGET_V850 */ - -#ifdef TARGET_nios2 - case R_NIOS2_BFD_RELOC_32: - case R_NIOS2_CALL26: - case R_NIOS2_HIADJ16: - case R_NIOS2_HI16: - /* do nothing */ - break; -#endif /* TARGET_nios2 */ - -#if defined(TARGET_m68k) - case R_68K_PC16: - if (sym_addr < -0x8000 || sym_addr > 0x7fff) { - fprintf (stderr, "Relocation overflow for R_68K_PC16 relocation against %s\n", sym_name); - bad_relocs++; - } else { - r_mem[0] = (sym_addr >> 8) & 0xff; - r_mem[1] = sym_addr & 0xff; - } - break; -#endif - - default: - /* The alignment of the build host - might be stricter than that of the - target, so be careful. We store in - network byte order. */ - r_mem[0] = (sym_addr >> 24) & 0xff; - r_mem[1] = (sym_addr >> 16) & 0xff; - r_mem[2] = (sym_addr >> 8) & 0xff; - r_mem[3] = sym_addr & 0xff; - } -#endif /* !TARGET_arm */ - } - -#ifdef TARGET_bfin - else { - if ((*p)->howto->type == R_rimm16 - || (*p)->howto->type == R_huimm16 - || (*p)->howto->type == R_luimm16) - { - /* for l and h we set the lower 16 bits which is only when it will be used */ - *((unsigned short *) (sectionp + q->address)) = (unsigned short) sym_addr; - } else if ((*p)->howto->type == R_byte4_data) { - *((uint32_t *)(sectionp + q->address)) = sym_addr; - } - } -#endif - if (verbose) - printf(" RELOC[%d]: offset=0x%x symbol=%s%s " - "section=%s size=%d " - "fixup=0x%x (reloc=0x%x)\n", flat_reloc_count, - q->address, sym_name, addstr, - section_name, sym_reloc_size, - sym_addr, section_vma + q->address); - - /* - * Create relocation entry (PC relative doesn't need this). - */ - if (relocation_needed) { -#ifndef TARGET_bfin - flat_relocs = realloc(flat_relocs, - (flat_reloc_count + 1) * sizeof(uint32_t)); -#ifndef TARGET_e1 - flat_relocs[flat_reloc_count] = pflags | - (section_vma + q->address); - - if (verbose) - printf("reloc[%d] = 0x%x\n", flat_reloc_count, - section_vma + q->address); -#else - switch ((*p)->howto->type) { - case R_E1_CONST31: - case R_E1_CONST31_PCREL: - case R_E1_DIS29W_PCREL: - case R_E1_DIS29W: - case R_E1_DIS29H: - case R_E1_DIS29B: - case R_E1_IMM32_PCREL: - case R_E1_IMM32: - flat_relocs[flat_reloc_count] = pflags | - (section_vma + q->address + OPCODE_SIZE); - if (verbose) - printf("RELOCATION TABLE : reloc[%d] = [0x%x]\n", flat_reloc_count, - flat_relocs[flat_reloc_count] ); - break; - case R_E1_WORD: - flat_relocs[flat_reloc_count] = pflags | - (section_vma + q->address); - if (verbose) - printf("RELOCATION TABLE : reloc[%d] = [0x%x]\n", flat_reloc_count, - flat_relocs[flat_reloc_count] ); - break; - } -#endif - flat_reloc_count++; -#endif - relocation_needed = 0; - pflags = 0; - } - -#if 0 -printf("%s(%d): symbol name=%s address=0x%x section=%s -> RELOC=0x%x\n", - __FILE__, __LINE__, sym_name, q->address, section_name, - flat_relocs[flat_reloc_count]); -#endif - } - } - } - - if (bad_relocs) { - printf("%d bad relocs\n", bad_relocs); - exit(1); - } - - if (rc < 0) - return(0); - - *n_relocs = flat_reloc_count; - return flat_relocs; -} - - - -static char * program; - -static void usage(void) -{ - fprintf(stderr, "Usage: %s [vrzd] [-p ] [-s stack-size] " - "[-o ] \n\n" - " -v : verbose operation\n" - " -r : force load to RAM\n" - " -k : enable kernel trace on load (for debug)\n" - " -z : compress code/data/relocs\n" - " -d : compress data/relocs\n" - " -a : use existing symbol references\n" - " instead of recalculating from\n" - " relocation info\n" - " -R reloc-file : read relocations from a separate file\n" - " -p abs-pic-file : GOT/PIC processing with files\n" - " -s stacksize : set application stack size\n" - " -o output-file : output file name\n\n", - program); - fprintf(stderr, "Compiled for " ARCH " architecture\n\n"); - exit(2); -} - - -/* Write NUM zeroes to STREAM. */ -static void write_zeroes (unsigned long num, FILE *stream) -{ - char zeroes[1024]; - if (num > 0) { - /* It'd be nice if we could just use fseek, but that doesn't seem to - work for stdio output files. */ - memset(zeroes, 0x00, 1024); - while (num > sizeof(zeroes)) { - fwrite(zeroes, sizeof(zeroes), 1, stream); - num -= sizeof(zeroes); - } - if (num > 0) - fwrite(zeroes, num, 1, stream); - } -} - - -int main(int argc, char *argv[]) -{ - int fd; - bfd *rel_bfd, *abs_bfd; - asection *s; - char *ofile=NULL, *pfile=NULL, *abs_file = NULL, *rel_file = NULL; - char *fname = NULL; - int opt; - int i; - int stack; - char cmd[1024]; - FILE *gf = NULL; - - asymbol **symbol_table; - long number_of_symbols; - - unsigned long data_len = 0; - unsigned long bss_len = 0; - unsigned long text_len = 0; - unsigned long reloc_len; - - unsigned long data_vma = ~0; - unsigned long bss_vma = ~0; - unsigned long text_vma = ~0; - - unsigned long text_offs; - - void *text; - void *data; - uint32_t *reloc; - - struct flat_hdr hdr; - - int gf_is_pipe = 0; - - program = argv[0]; - progname = argv[0]; - - if (argc < 2) - usage(); - - if (sizeof(hdr) != 64) { - fprintf(stderr, - "Potential flat header incompatibility detected\n" - "header size should be 64 but is %d\n", - sizeof(hdr)); - exit(64); - } - -#ifndef TARGET_e1 - stack = 4096; -#else /* We need plenty of stack for both of them (Aggregate and Register) */ - stack = 0x2020; -#endif - - while ((opt = getopt(argc, argv, "avzdrkp:s:o:R:")) != -1) { - switch (opt) { - case 'v': - verbose++; - break; - case 'r': - load_to_ram++; - break; - case 'k': - ktrace++; - break; - case 'z': - compress = 1; - break; - case 'd': - compress = 2; - break; - case 'p': - pfile = optarg; - break; - case 'o': - ofile = optarg; - break; - case 'a': - use_resolved = 1; - break; - case 's': - stack = atoi(optarg); - break; - case 'R': - rel_file = optarg; - break; - default: - fprintf(stderr, "%s Unknown option\n", argv[0]); - usage(); - break; - } - } - - /* - * if neither the -r or -p options was given, default to - * a RAM load as that is the only option that makes sense. - */ - if (!load_to_ram && !pfile) - load_to_ram = 1; - - filename = fname = argv[argc-1]; - - if (pfile) { - pic_with_got = 1; - abs_file = pfile; - } else - abs_file = fname; - - if (! rel_file) - rel_file = fname; - - if (!(rel_bfd = bfd_openr(rel_file, 0))) { - fprintf(stderr, "Can't open %s\n", rel_file); - exit(1); - } - - if (bfd_check_format (rel_bfd, bfd_object) == 0) { - fprintf(stderr, "File is not an object file\n"); - exit(2); - } - - if (abs_file == rel_file) - abs_bfd = rel_bfd; /* one file does all */ - else { - if (!(abs_bfd = bfd_openr(abs_file, 0))) { - fprintf(stderr, "Can't open %s\n", abs_file); - exit(1); - } - - if (bfd_check_format (abs_bfd, bfd_object) == 0) { - fprintf(stderr, "File is not an object file\n"); - exit(2); - } - } - - if (! (bfd_get_file_flags(rel_bfd) & HAS_RELOC)) { - fprintf (stderr, "%s: Input file contains no relocation info\n", rel_file); - exit (2); - } - - if (use_resolved && !(bfd_get_file_flags(abs_bfd) & EXEC_P)) { - /* `Absolute' file is not absolute, so neither are address - contained therein. */ - fprintf (stderr, - "%s: `-a' option specified with non-fully-resolved input file\n", - bfd_get_filename (abs_bfd)); - exit (2); - } - - symbol_table = get_symbols(abs_bfd, &number_of_symbols); - - /* Group output sections into text, data, and bss, and calc their sizes. */ - for (s = abs_bfd->sections; s != NULL; s = s->next) { - unsigned long *vma, *len; - bfd_size_type sec_size; - bfd_vma sec_vma; - - if (s->flags & SEC_CODE) { - vma = &text_vma; - len = &text_len; - } else if (s->flags & SEC_DATA) { - vma = &data_vma; - len = &data_len; - } else if (s->flags & SEC_ALLOC) { - vma = &bss_vma; - len = &bss_len; - } else - continue; - - sec_size = bfd_section_size(abs_bfd, s); - sec_vma = bfd_section_vma(abs_bfd, s); - - if (sec_vma < *vma) { - if (*len > 0) - *len += sec_vma - *vma; - else - *len = sec_size; - *vma = sec_vma; - } else if (sec_vma + sec_size > *vma + *len) - *len = sec_vma + sec_size - *vma; - } - - if (text_len == 0) { - fprintf (stderr, "%s: no .text section", abs_file); - exit (2); - } - - text = malloc(text_len); - - if (verbose) - printf("TEXT -> vma=0x%x len=0x%x\n", text_vma, text_len); - - /* Read in all text sections. */ - for (s = abs_bfd->sections; s != NULL; s = s->next) - if (s->flags & SEC_CODE) - if (!bfd_get_section_contents(abs_bfd, s, - text + (s->vma - text_vma), 0, - bfd_section_size(abs_bfd, s))) - { - fprintf(stderr, "read error section %s\n", s->name); - exit(2); - } - - if (data_len == 0) { - fprintf (stderr, "%s: no .data section", abs_file); - exit (2); - } - data = malloc(data_len); - - if (verbose) - printf("DATA -> vma=0x%x len=0x%x\n", data_vma, data_len); - - if ((text_vma + text_len) != data_vma) { - if ((text_vma + text_len) > data_vma) { - printf("ERROR: text=0x%x overlaps data=0x%x ?\n", text_len, data_vma); - exit(1); - } - if (verbose) - printf("WARNING: data=0x%x does not directly follow text=0x%x\n", - data_vma, text_len); - text_len = data_vma - text_vma; - } - - /* Read in all data sections. */ - for (s = abs_bfd->sections; s != NULL; s = s->next) - if (s->flags & SEC_DATA) - if (!bfd_get_section_contents(abs_bfd, s, - data + (s->vma - data_vma), 0, - bfd_section_size(abs_bfd, s))) - { - fprintf(stderr, "read error section %s\n", s->name); - exit(2); - } - - /* Put common symbols in bss. */ - bss_len += add_com_to_bss(symbol_table, number_of_symbols, bss_len); - - if (verbose) - printf("BSS -> vma=0x%x len=0x%x\n", bss_vma, bss_len); - - if ((data_vma + data_len) != bss_vma) { - if ((data_vma + data_len) > bss_vma) { - printf("ERROR: text=0x%x + data=0x%x overlaps bss=0x%x ?\n", text_len, - data_len, bss_vma); - exit(1); - } - if (verbose) - printf("WARNING: bss=0x%x does not directly follow text=0x%x + data=0x%x(0x%x)\n", - bss_vma, text_len, data_len, text_len + data_len); - data_len = bss_vma - data_vma; - } - - reloc = output_relocs(abs_bfd, symbol_table, number_of_symbols, &reloc_len, - text, text_len, text_vma, data, data_len, data_vma, - rel_bfd); - - if (reloc == NULL) - printf("No relocations in code!\n"); - - text_offs = real_address_bits(text_vma); - - /* Fill in the binflt_flat header */ - memcpy(hdr.magic,"bFLT",4); - hdr.rev = htonl(FLAT_VERSION); - hdr.entry = htonl(sizeof(hdr) + bfd_get_start_address(abs_bfd)); - hdr.data_start = htonl(sizeof(hdr) + text_offs + text_len); - hdr.data_end = htonl(sizeof(hdr) + text_offs + text_len +data_len); - hdr.bss_end = htonl(sizeof(hdr) + text_offs + text_len +data_len+bss_len); - hdr.stack_size = htonl(stack); /* FIXME */ - hdr.reloc_start = htonl(sizeof(hdr) + text_offs + text_len +data_len); - hdr.reloc_count = htonl(reloc_len); - hdr.flags = htonl(0 - | (load_to_ram ? FLAT_FLAG_RAM : 0) - | (ktrace ? FLAT_FLAG_KTRACE : 0) - | (pic_with_got ? FLAT_FLAG_GOTPIC : 0) - | (compress ? (compress == 2 ? FLAT_FLAG_GZDATA : FLAT_FLAG_GZIP) : 0) - ); - hdr.build_date = htonl((unsigned long)time(NULL)); - memset(hdr.filler, 0x00, sizeof(hdr.filler)); - - for (i=0; i> %s", ofile); - -#define START_COMPRESSOR do { \ - if (gf) \ - if (gf_is_pipe) \ - pclose(gf); \ - else \ - fclose(gf); \ - if (!(gf = popen(cmd, "w" BINARY_FILE_OPTS))) { \ - fprintf(stderr, "Can't run cmd %s\n", cmd); \ - exit(4); \ - } \ - gf_is_pipe = 1; \ - } while (0) - - gf = fopen(ofile, "ab"); /* Add 'b' to support non-posix (ie windows) */ - if (!gf) { - fprintf(stderr, "Can't open file %s for writing\n", ofile); \ - exit(4); - } - - if (compress == 1) - START_COMPRESSOR; - - /* Fill in any hole at the beginning of the text segment. */ - if (verbose) - printf("ZERO before text len=0x%x\n", text_offs); - write_zeroes(text_offs, gf); - - /* Write the text segment. */ - fwrite(text, text_len, 1, gf); - - if (compress == 2) - START_COMPRESSOR; - - /* Write the data segment. */ - fwrite(data, data_len, 1, gf); - - if (reloc) - fwrite(reloc, reloc_len * 4, 1, gf); - - if(gf_is_pipe) - pclose(gf); - else - fclose(gf); - - exit(0); -} - - -/* - * this __MUST__ be at the VERY end of the file - do NOT move!! - * - * Local Variables: - * c-basic-offset: 4 - * tab-width: 8 - * end: - * vi: tabstop=8 shiftwidth=4 textwidth=79 noexpandtab - */ diff --git a/toolchain/elf2flt/elf2flt/elf2flt.ld b/toolchain/elf2flt/elf2flt/elf2flt.ld deleted file mode 100644 index cd4e652c30..0000000000 --- a/toolchain/elf2flt/elf2flt/elf2flt.ld +++ /dev/null @@ -1,179 +0,0 @@ - -ENTRY (_start) - -MEMORY { - flatmem : ORIGIN = 0x0, LENGTH = 0xfffffff -} - -SECTIONS { - - .text 0x0 : { - . = . + 4; - . = ALIGN(0x4) ; - _stext = . ; - *(.text) - *(.text.*) - *(.gnu.warning) - *(.stub) - *(.gnu.linkonce.t*) - *(.glue_7t) - *(.glue_7) - *(.jcr) - *(.init) - *(.fini) - -W_RODAT *(.rodata) -W_RODAT *(.rodata1) -W_RODAT *(.rodata.*) -W_RODAT *(.gnu.linkonce.r*) - - /* This is special code area at the end of the normal - text section. It contains a small lookup table at - the start followed by the code pointed to by entries - in the lookup table. */ - . = ALIGN (4) ; - PROVIDE(__ctbp = .); - *(.call_table_data) - *(.call_table_text) - - . = ALIGN(0x20) ; - _etext = . ; - } > flatmem - - .data : { - . = ALIGN(0x4) ; - _sdata = . ; - __data_start = . ; - data_start = . ; - *(.got.plt) - *(.got) - FILL(0) ; - . = ALIGN(0x20) ; - LONG(-1) - . = ALIGN(0x20) ; -R_RODAT *(.rodata) -R_RODAT *(.rodata1) -R_RODAT *(.rodata.*) -R_RODAT *(.gnu.linkonce.r*) - *(.data) - *(.data1) - *(.data.*) - *(.gnu.linkonce.d*) - *(.data1) - *(.eh_frame) - *(.gcc_except_table) - - /* Microblaze has .sdata and .sbss (small bss). They must - be contiguous, so please don't move any of this. JW */ - _ssrw = . ; - *(.sdata) - *(.sdata.*) - *(.sbss) /* Don't move this! */ - _essrw = . ; - - _ssrw_size = _essrw - _ssrw; - PROVIDE(_SDA_BASE_ = _ssrw + (_ssrw_size / 2)); - - *(.gnu.linkonce.s.*) - *(__libc_atexit) - *(__libc_subinit) - *(__libc_subfreeres) - *(.note.ABI-tag) - - /* microblaze-specific read-only small data area - and associated locating symbols */ - _ssro = . ; - *(.sdata2) - _essro = . ; - _ssro_size = _essro - _ssro; - PROVIDE(_SDA2_BASE_ = _ssro + (_ssro_size / 2)); - - . = ALIGN(4) ; - __CTOR_LIST__ = .; - LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) -SINGLE_LINK: /* gcc uses crtbegin.o to find the start of -SINGLE_LINK: the constructors, so we make sure it is -SINGLE_LINK: first. Because this is a wildcard, it -SINGLE_LINK: doesn't matter if the user does not -SINGLE_LINK: actually link against crtbegin.o; the -SINGLE_LINK: linker won't look for a file to match a -SINGLE_LINK: wildcard. The wildcard also means that it -SINGLE_LINK: doesn't matter which directory crtbegin.o -SINGLE_LINK: is in. */ -SINGLE_LINK: KEEP (*crtbegin*.o(.ctors)) -SINGLE_LINK: /* We don't want to include the .ctor section from -SINGLE_LINK: from the crtend.o file until after the sorted ctors. -SINGLE_LINK: The .ctor section from the crtend file contains the -SINGLE_LINK: end of ctors marker and it must be last */ -SINGLE_LINK: KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors)) -SINGLE_LINK: KEEP (*(SORT(.ctors.*))) - KEEP (*(.ctors)) - LONG(0) - __CTOR_END__ = .; - __DTOR_LIST__ = .; - LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) -SINGLE_LINK: KEEP (*crtbegin*.o(.dtors)) -SINGLE_LINK: KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors)) -SINGLE_LINK: KEEP (*(SORT(.dtors.*))) - KEEP (*(.dtors)) - LONG(0) - __DTOR_END__ = .; - - PROVIDE (__preinit_array_start = .); - KEEP (*(.preinit_array)) - PROVIDE (__preinit_array_end = .); - - PROVIDE (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array)) - PROVIDE (__init_array_end = .); - - PROVIDE (__fini_array_start = .); - KEEP (*(.fini_array)) - KEEP (*(SORT(.fini_array.*))) - PROVIDE (__fini_array_end = .); - - . = ALIGN(0x10) ; - _edata = . ; - } > flatmem - - .bss : { - . = ALIGN(0x4) ; - _sbss = ALIGN(0x4) ; - __bss_start = . ; - *(.dynsbss) - *(.sbss) - *(.sbss.*) - *(.scommon) - *(.dynbss) - *(.bss) - *(.bss.*) - *(.bss*) - *(.gnu.linkonce.b*) - *(COMMON) - . = ALIGN(0x10) ; - _ebss = . ; - _end = . ; - end = . ; - } > flatmem - - .stack : { - . = ALIGN(0x4); - __stack_start = .; - } - - .junk 0 : { *(.rel*) *(.rela*) } - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/toolchain/elf2flt/elf2flt/flat.h b/toolchain/elf2flt/elf2flt/flat.h deleted file mode 100644 index 3cc502d7c7..0000000000 --- a/toolchain/elf2flt/elf2flt/flat.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (C) 2002-2005 David McCullough - * Copyright (C) 1998 Kenneth Albanowski - * The Silver Hammer Group, Ltd. - * - * This file provides the definitions and structures needed to - * support uClinux flat-format executables. - * - * This is Free Software, under the GNU Public Licence v2 or greater. - * - */ - -#ifndef _LINUX_FLAT_H -#define _LINUX_FLAT_H - -#ifdef __KERNEL__ -#include -#include -#endif - -#define FLAT_VERSION 0x00000004L - -#ifdef CONFIG_BINFMT_SHARED_FLAT -#define MAX_SHARED_LIBS (4) -#else -#define MAX_SHARED_LIBS (1) -#endif - -/* - * To make everything easier to port and manage cross platform - * development, all fields are in network byte order. - */ - -struct flat_hdr { - char magic[4]; - uint32_t rev; /* version (as above) */ - uint32_t entry; /* Offset of first executable instruction - with text segment from beginning of file */ - uint32_t data_start; /* Offset of data segment from beginning of - file */ - uint32_t data_end; /* Offset of end of data segment from beginning - of file */ - uint32_t bss_end; /* Offset of end of bss segment from beginning - of file */ - - /* (It is assumed that data_end through bss_end forms the bss segment.) */ - - uint32_t stack_size; /* Size of stack, in bytes */ - uint32_t reloc_start; /* Offset of relocation records from beginning - of file */ - uint32_t reloc_count; /* Number of relocation records */ - uint32_t flags; - uint32_t build_date; /* When the program/library was built */ - uint32_t filler[5]; /* Reservered, set to zero */ -}; - -#define FLAT_FLAG_RAM 0x0001 /* load program entirely into RAM */ -#define FLAT_FLAG_GOTPIC 0x0002 /* program is PIC with GOT */ -#define FLAT_FLAG_GZIP 0x0004 /* all but the header is compressed */ -#define FLAT_FLAG_GZDATA 0x0008 /* only data/relocs are compressed (for XIP) */ -#define FLAT_FLAG_KTRACE 0x0010 /* output useful kernel trace for debugging */ - -#ifdef __KERNEL__ /* so systems without linux headers can compile the apps */ -/* - * While it would be nice to keep this header clean, users of older - * tools still need this support in the kernel. So this section is - * purely for compatibility with old tool chains. - * - * DO NOT make changes or enhancements to the old format please, just work - * with the format above, except to fix bugs with old format support. - */ - -#include - -#define OLD_FLAT_VERSION 0x00000002L -#define OLD_FLAT_RELOC_TYPE_TEXT 0 -#define OLD_FLAT_RELOC_TYPE_DATA 1 -#define OLD_FLAT_RELOC_TYPE_BSS 2 - -typedef union { - uint32_t value; - struct { -# if defined(mc68000) && !defined(CONFIG_COLDFIRE) - int32_t offset : 30; - uint32_t type : 2; -# define OLD_FLAT_FLAG_RAM 0x1 /* load program entirely into RAM */ -# elif defined(__BIG_ENDIAN_BITFIELD) - uint32_t type : 2; - int32_t offset : 30; -# define OLD_FLAT_FLAG_RAM 0x1 /* load program entirely into RAM */ -# elif defined(__LITTLE_ENDIAN_BITFIELD) - int32_t offset : 30; - uint32_t type : 2; -# define OLD_FLAT_FLAG_RAM 0x1 /* load program entirely into RAM */ -# else -# error "Unknown bitfield order for flat files." -# endif - } reloc; -} flat_v2_reloc_t; - -#endif /* __KERNEL__ */ - -#endif /* _LINUX_FLAT_H */ - -/* this __MUST__ be at the VERY end of the file - do NOT move!! - * Local Variables: - * c-basic-offset: 4 - * tab-width: 8 - * end: - * vi: tabstop=8 shiftwidth=4 textwidth=79 noexpandtab - */ diff --git a/toolchain/elf2flt/elf2flt/flthdr.c b/toolchain/elf2flt/elf2flt/flthdr.c deleted file mode 100644 index 967d64063a..0000000000 --- a/toolchain/elf2flt/elf2flt/flthdr.c +++ /dev/null @@ -1,382 +0,0 @@ -/****************************************************************************/ -/* - * A simple program to manipulate flat files - * - * Copyright (C) 2001-2003 SnapGear Inc, davidm@snapgear.com - * Copyright (C) 2001 Lineo, davidm@lineo.com - * - * This is Free Software, under the GNU Public Licence v2 or greater. - * - */ -/****************************************************************************/ - -#include /* Userland pieces of the ANSI C standard I/O package */ -#include /* Userland prototypes of the Unix std system calls */ -#include -#include /* exit() */ -#include /* strcat(), strcpy() */ - -/* macros for conversion between host and (internet) network byte order */ -#ifndef WIN32 -#include /* Consts and structs defined by the internet system */ -#define BINARY_FILE_OPTS -#else -#include -#define BINARY_FILE_OPTS "b" -#endif - -/* from uClinux-x.x.x/include/linux */ -#include "flat.h" /* Binary flat header description */ - -#if defined(__MINGW32__) -#include - -#define mkstemp(p) mktemp(p) - -#endif - -/****************************************************************************/ - -char *program_name; - -static char cmd[1024]; -static int print = 0, compress = 0, ramload = 0, stacksize = 0, ktrace = 0; -static int short_format = 0; - -/****************************************************************************/ - -void -transferr(FILE *ifp, FILE *ofp, int count) -{ - int n, num; - - while (count == -1 || count > 0) { - if (count == -1 || count > sizeof(cmd)) - num = sizeof(cmd); - else - num = count; - n = fread(cmd, 1, num, ifp); - if (n == 0) - break; - if (fwrite(cmd, n, 1, ofp) != 1) { - fprintf(stderr, "Write failed :-(\n"); - exit(1); - } - if (count != -1) - count -= n; - } - if (count > 0) { - fprintf(stderr, "Failed to transferr %d bytes\n", count); - exit(1); - } -} - -/****************************************************************************/ - -void -process_file(char *ifile, char *ofile) -{ - int old_flags, old_stack, new_flags, new_stack; - FILE *ifp, *ofp; - int ofp_is_pipe = 0; - struct flat_hdr old_hdr, new_hdr; - char tfile[256]; - char tfile2[256]; - - *tfile = *tfile2 = '\0'; - - if ((ifp = fopen(ifile, "r" BINARY_FILE_OPTS)) == NULL) { - fprintf(stderr, "Cannot open %s\n", ifile); - return; - } - - if (fread(&old_hdr, sizeof(old_hdr), 1, ifp) != 1) { - fprintf(stderr, "Cannot read header of %s\n", ifile); - return; - } - - if (strncmp(old_hdr.magic, "bFLT", 4) != 0) { - fprintf(stderr, "Cannot read header of %s\n", ifile); - return; - } - - new_flags = old_flags = ntohl(old_hdr.flags); - new_stack = old_stack = ntohl(old_hdr.stack_size); - new_hdr = old_hdr; - - if (compress == 1) { - new_flags |= FLAT_FLAG_GZIP; - new_flags &= ~FLAT_FLAG_GZDATA; - } else if (compress == 2) { - new_flags |= FLAT_FLAG_GZDATA; - new_flags &= ~FLAT_FLAG_GZIP; - } else if (compress < 0) - new_flags &= ~(FLAT_FLAG_GZIP|FLAT_FLAG_GZDATA); - - if (ramload > 0) - new_flags |= FLAT_FLAG_RAM; - else if (ramload < 0) - new_flags &= ~FLAT_FLAG_RAM; - - if (ktrace > 0) - new_flags |= FLAT_FLAG_KTRACE; - else if (ktrace < 0) - new_flags &= ~FLAT_FLAG_KTRACE; - - if (stacksize) - new_stack = stacksize; - - if (print == 1) { - time_t t; - - printf("%s\n", ifile); - printf(" Magic: %4.4s\n", old_hdr.magic); - printf(" Rev: %d\n", ntohl(old_hdr.rev)); - t = (time_t) htonl(old_hdr.build_date); - printf(" Build Date: %s", t?ctime(&t):"not specified\n"); - printf(" Entry: 0x%x\n", ntohl(old_hdr.entry)); - printf(" Data Start: 0x%x\n", ntohl(old_hdr.data_start)); - printf(" Data End: 0x%x\n", ntohl(old_hdr.data_end)); - printf(" BSS End: 0x%x\n", ntohl(old_hdr.bss_end)); - printf(" Stack Size: 0x%x\n", ntohl(old_hdr.stack_size)); - printf(" Reloc Start: 0x%x\n", ntohl(old_hdr.reloc_start)); - printf(" Reloc Count: 0x%x\n", ntohl(old_hdr.reloc_count)); - printf(" Flags: 0x%x ( ", ntohl(old_hdr.flags)); - if (old_flags) { - if (old_flags & FLAT_FLAG_RAM) - printf("Load-to-Ram "); - if (old_flags & FLAT_FLAG_GOTPIC) - printf("Has-PIC-GOT "); - if (old_flags & FLAT_FLAG_GZIP) - printf("Gzip-Compressed "); - if (old_flags & FLAT_FLAG_GZDATA) - printf("Gzip-Data-Compressed "); - if (old_flags & FLAT_FLAG_KTRACE) - printf("Kernel-Traced-Load "); - printf(")\n"); - } - } else if (print > 1) { - static int first = 1; - unsigned int text, data, bss, stk, rel, tot; - - if (first) { - printf("Flag Rev Text Data BSS Stack Relocs RAM Filename\n"); - printf("-----------------------------------------------------------\n"); - first = 0; - } - *tfile = '\0'; - strcat(tfile, (old_flags & FLAT_FLAG_KTRACE) ? "k" : ""); - strcat(tfile, (old_flags & FLAT_FLAG_RAM) ? "r" : ""); - strcat(tfile, (old_flags & FLAT_FLAG_GOTPIC) ? "p" : ""); - strcat(tfile, (old_flags & FLAT_FLAG_GZIP) ? "z" : - ((old_flags & FLAT_FLAG_GZDATA) ? "d" : "")); - printf("-%-3.3s ", tfile); - printf("%3d ", ntohl(old_hdr.rev)); - printf("%6d ", text=ntohl(old_hdr.data_start)-sizeof(struct flat_hdr)); - printf("%6d ", data=ntohl(old_hdr.data_end)-ntohl(old_hdr.data_start)); - printf("%6d ", bss=ntohl(old_hdr.bss_end)-ntohl(old_hdr.data_end)); - printf("%6d ", stk=ntohl(old_hdr.stack_size)); - printf("%6d ", rel=ntohl(old_hdr.reloc_count) * 4); - /* - * work out how much RAM is needed per invocation, this - * calculation is dependent on the binfmt_flat implementation - */ - tot = data; /* always need data */ - - if (old_flags & (FLAT_FLAG_RAM|FLAT_FLAG_GZIP)) - tot += text + sizeof(struct flat_hdr); - - if (bss + stk > rel) /* which is bigger ? */ - tot += bss + stk; - else - tot += rel; - - printf("%6d ", tot); - /* - * the total depends on whether the relocs are smaller/bigger than - * the BSS - */ - printf("%s\n", ifile); - } - - /* if there is nothing else to do, leave */ - if (new_flags == old_flags && new_stack == old_stack) - return; - - new_hdr.flags = htonl(new_flags); - new_hdr.stack_size = htonl(new_stack); - - strcpy(tfile, "/tmp/flatXXXXXX"); - mkstemp(tfile); - if ((ofp = fopen(tfile, "w" BINARY_FILE_OPTS)) == NULL) { - fprintf(stderr, "Failed to open %s for writing\n", tfile); - unlink(tfile); - unlink(tfile2); - exit(1); - } - - if (fwrite(&new_hdr, sizeof(new_hdr), 1, ofp) != 1) { - fprintf(stderr, "Failed to write to %s\n", tfile); - unlink(tfile); - unlink(tfile2); - exit(1); - } - - /* - * get ourselves a fully uncompressed copy of the text/data/relocs - * so that we can manipulate it more easily - */ - if (old_flags & (FLAT_FLAG_GZIP|FLAT_FLAG_GZDATA)) { - FILE *tfp; - - strcpy(tfile2, "/tmp/flat2XXXXXX"); - mkstemp(tfile2); - - if (old_flags & FLAT_FLAG_GZDATA) { - tfp = fopen(tfile2, "w" BINARY_FILE_OPTS); - if (!tfp) { - fprintf(stderr, "Failed to open %s for writing\n", tfile2); - exit(1); - } - transferr(ifp, tfp, ntohl(old_hdr.data_start) - - sizeof(struct flat_hdr)); - fclose(tfp); - } - - sprintf(cmd, "gunzip >> %s", tfile2); - tfp = popen(cmd, "w" BINARY_FILE_OPTS); - if(!tfp) { - perror("popen"); - exit(1); - } - transferr(ifp, tfp, -1); - pclose(tfp); - - fclose(ifp); - ifp = fopen(tfile2, "r" BINARY_FILE_OPTS); - if (!ifp) { - fprintf(stderr, "Failed to open %s for reading\n", tfile2); - unlink(tfile); - unlink(tfile2); - exit(1); - } - } - - if (new_flags & FLAT_FLAG_GZIP) { - printf("zflat %s --> %s\n", ifile, ofile); - fclose(ofp); - sprintf(cmd, "gzip -9 -f >> %s", tfile); - ofp = popen(cmd, "w" BINARY_FILE_OPTS); - ofp_is_pipe = 1; - } else if (new_flags & FLAT_FLAG_GZDATA) { - printf("zflat-data %s --> %s\n", ifile, ofile); - transferr(ifp, ofp, ntohl(new_hdr.data_start) - - sizeof(struct flat_hdr)); - fclose(ofp); - sprintf(cmd, "gzip -9 -f >> %s", tfile); - ofp = popen(cmd, "w" BINARY_FILE_OPTS); - ofp_is_pipe = 1; - } - - if (!ofp) { /* can only happen if using gzip/gunzip */ - fprintf(stderr, "Can't run cmd %s\n", cmd); - unlink(tfile); - unlink(tfile2); - exit(1); - } - - transferr(ifp, ofp, -1); - - if (ferror(ifp) || ferror(ofp)) { - fprintf(stderr, "Error on file pointer%s%s\n", - ferror(ifp) ? " input" : "", ferror(ofp) ? " output" : ""); - unlink(tfile); - unlink(tfile2); - exit(1); - } - - fclose(ifp); - if (ofp_is_pipe) - pclose(ofp); - else - fclose(ofp); - - /* cheat a little here to preserve file permissions */ - sprintf(cmd, "cp %s %s", tfile, ofile); - system(cmd); - unlink(tfile); - unlink(tfile2); -} - -/****************************************************************************/ - -void -usage(char *s) -{ - if (s) - fprintf(stderr, "%s\n", s); - fprintf(stderr, "usage: %s [options] flat-file\n", program_name); - fprintf(stderr, " Allows you to change an existing flat file\n\n"); - fprintf(stderr, " -p : print current settings\n"); - fprintf(stderr, " -z : compressed flat file\n"); - fprintf(stderr, " -d : compressed data-only flat file\n"); - fprintf(stderr, " -Z : un-compressed flat file\n"); - fprintf(stderr, " -r : ram load\n"); - fprintf(stderr, " -R : do not RAM load\n"); - fprintf(stderr, " -k : kernel traced load (for debug)\n"); - fprintf(stderr, " -K : normal non-kernel traced load\n"); - fprintf(stderr, " -s size : stack size\n"); - fprintf(stderr, " -o file : output-file\n" - " (default is to modify input file)\n"); - exit(1); -} - -/****************************************************************************/ - -int -main(int argc, char *argv[]) -{ - int c; - char *ofile = NULL, *ifile; - - program_name = argv[0]; - - while ((c = getopt(argc, argv, "pdzZrRkKs:o:")) != EOF) { - switch (c) { - case 'p': print = 1; break; - case 'z': compress = 1; break; - case 'd': compress = 2; break; - case 'Z': compress = -1; break; - case 'r': ramload = 1; break; - case 'R': ramload = -1; break; - case 'k': ktrace = 1; break; - case 'K': ktrace = -1; break; - case 's': stacksize = atoi(optarg); break; - case 'o': ofile = optarg; break; - default: - usage("invalid option"); - break; - } - } - - if (optind >= argc) - usage("No input files provided"); - - if (ofile && argc - optind > 1) - usage("-o can only be used with a single file"); - - if (!print && !compress && !ramload && !stacksize) /* no args == print */ - print = argc - optind; /* greater than 1 is short format */ - - for (c = optind; c < argc; c++) { - ifile = argv[c]; - if (!ofile) - ofile = ifile; - process_file(ifile, ofile); - ofile = NULL; - } - - exit(0); -} - -/****************************************************************************/ diff --git a/toolchain/elf2flt/elf2flt/install-sh b/toolchain/elf2flt/elf2flt/install-sh deleted file mode 100755 index 398a88e142..0000000000 --- a/toolchain/elf2flt/elf2flt/install-sh +++ /dev/null @@ -1,251 +0,0 @@ -#!/bin/sh -# -# install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. - - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - : -fi - -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - chmodcmd="" - else - instcmd=$mkdirprog - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src -o -d $src ] - then - : - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - : - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - : - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' - ' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - : - fi - - pathcomp="${pathcomp}/" -done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - : - fi - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && - -# Now rename the file to the real destination. - - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile - -fi && - - -exit 0 diff --git a/toolchain/elf2flt/elf2flt/ld-elf2flt.in b/toolchain/elf2flt/elf2flt/ld-elf2flt.in deleted file mode 100644 index b876636007..0000000000 --- a/toolchain/elf2flt/elf2flt/ld-elf2flt.in +++ /dev/null @@ -1,219 +0,0 @@ -#!/bin/sh -# -# allow us to do flat processing if the flag -Wl,-elf2flt or -elf2flt to -# the 'C' compiler or linker respectively -# -# uses the env. var FLTFLAGS as extra parameters to pass to elf2flt -# arguments given like -Wl,-elf2flt="-b 10000 -v" are given before FLTFLAGS -# -# Copyright (C) 2002,2003 David McCullough -# Copyright (C) 2000, Lineo. davidm@lineo.com -# -# This is Free Software, under the GNU Public Licence v2 or greater. -# - -LINKER="$0.real" # the original renamed-linker -ELF2FLT="`expr $0 : '\(.*\)ld'`elf2flt" -NM="`expr $0 : '\(.*\)ld'`nm" -TOOLDIR="`dirname $0`" # let gcc find the tools for us -OBJCOPY="`expr $0 : '\(.*\)ld'`objcopy" -[ -f "$OBJCOPY" ] || OBJCOPY="$TOOLDIR/../../bin/@target_alias@-objcopy" -OBJDUMP="`expr $OBJCOPY : '\(.*\)objcopy'`objdump" -LDSCRIPTPATH="@binutils_ldscript_dir@" # and the scripts -SHARED_ID="" -NEWLDSCRIPT="" - -# check TOOLDIR from prefix/bin/ or prefix/target-alias/bin/ -[ -d "${LDSCRIPTPATH}" ] || LDSCRIPTPATH="${TOOLDIR}/../lib" - -# -# if we have the elf2flt options, run it -# - -if expr "$*" : ".*-elf2flt.*" > /dev/null -then - ARG1= - ARG2= - OFILE="a.out" - PIC= - SDIRS= - LDSCRIPT= - FINAL="yes" - FINAL_ONLY= - MOVDAT= - VERBOSE= - - while [ $# -ne 0 ] - do - case "$1" in - - -elf2flt) ;; # we already know this - -elf2flt*)FLTFLAGS="`expr \"$1\" : '-elf2flt=\(.*\)'` $FLTFLAGS";; - - -move-rodata) - MOVDAT="y";; # Put rodata in ROM if possible - - -shared-lib-id) - shift; SHARED_ID="$1";; # Shared library ID - - -o) shift; OFILE="$1";; # the final outfile - -o*) OFILE="`expr \"$1\" : '-o\(.*\)'`";; - - -T) shift; LDSCRIPT="$1";; # they have a linker script - -c) shift; LDSCRIPT="$1";; - - -L) ARG1="$ARG1 $1" # remember search dirs - shift; - ARG1="$ARG1 $1" - SDIRS="$SDIRS -L$1" - ;; - -L*) ARG1="$ARG1 $1"; SDIRS="$SDIRS $1";; - - -EB) ARG1="$ARG1 $1"; SDIRS="$SDIRS $1";; # arm big endian - - -relax) ;; # eat this for microblaze - - -r|-Ur) FINAL="" # this is not a final link - ARG1="$ARG1 $1" - ;; - - -v) ARG1="$ARG1 $1" - VERBOSE="y" - ;; - - -m) shift; EMUL="-m $1";; # ld emulations for h8300 - -m*) EMUL=$1;; - - *) ARG1="$ARG1 $1" - ;; - esac - shift - done - - if [ "$FINAL" = "yes" ] - then - [ "$VERBOSE" = "y" ] && set -x - ARG1="$ARG1 $FINAL_ONLY" - NEWLDSCRIPT=`mktemp /tmp/flt-XXXXXX` - SEDOP=" -e s/^R_RODAT// -e /^W_RODAT/d" - OBJCOPYOP="" - if [ "$MOVDAT" ] - then - $LINKER -r -d -o "$OFILE.elf2flt" $ARG1 || exit $? - if [ "`$OBJDUMP -h "$OFILE.elf2flt" | \ - egrep -A1 '[.]rodata' | grep RELOC`" ] - then - echo "warning: .rodata section contains relocations" - else - SEDOP="-e /^R_RODAT/d -e s/^W_RODAT//" - fi - fi - if [ "$SHARED_ID" ] - then - # Massage the linker script into something useful. These - # regexps are ugly due to some bizzare shell quoting rules. - # SEDOP="$SEDOP -e \"s/ORIGIN = 0x0,/ORIGIN = 0x${SHARED_ID}000000,/\"" - # SEDOP="$SEDOP -e \"s/.text 0x0 :/.text 0x${SHARED_ID}000000 :/\"" - SEDOP="$SEDOP -e s/\\(ORIGIN.=.0\\)x0,/\\1x${SHARED_ID}000000,/" - SEDOP="$SEDOP -e s/\\([.]text.0\\)x0[^0-9]:/\\1x${SHARED_ID}000000:/" - - if [ "$SHARED_ID" -gt 0 ] - then - # Non application modules enter via main not _start - # SEDOP="$SEDOP -e 's/ENTRY (_start)/ENTRY (main)/'" - SEDOP="$SEDOP -e s/\\(ENTRY.\\)(_start)/\1(lib_main)/" - OBJCOPYOP="--localize-hidden --weaken" - fi - - # Provide the magic parameter that defines the library data segment pointer offset - case "@target_cpu@" in - h8300) GOT_OFFSET="__current_shared_library_er5_offset_";; - *) GOT_OFFSET="_current_shared_library_a5_offset_";; - esac - ARG1="$ARG1 -defsym $GOT_OFFSET=`expr ${SHARED_ID} '*' -4 - 4`" - fi - if [ "@emit_relocs@" = "yes" ] - then - SEDOP="$SEDOP -e s/^SINGLE_LINK://" - else - SEDOP="$SEDOP -e /^SINGLE_LINK:/d" - fi - - # provide a default linker script, we usually need one - [ -z "$LDSCRIPT" ] && LDSCRIPT="${LDSCRIPTPATH}/elf2flt.ld" - - # if we can find the linker script we preprocess it, otherwise - # we assume the user knows what they are doing - if [ -f "$LDSCRIPT" ]; then - sed $SEDOP < "$LDSCRIPT" > "$NEWLDSCRIPT" - LDSCRIPT="$NEWLDSCRIPT" - elif [ -f "${LDSCRIPTPATH}/$LDSCRIPT" ]; then - sed $SEDOP < "${LDSCRIPTPATH}/$LDSCRIPT" > "$NEWLDSCRIPT" - LDSCRIPT="$NEWLDSCRIPT" - elif [ -f "${LDSCRIPTPATH}/ldscripts/$LDSCRIPT" ]; then - sed $SEDOP < "${LDSCRIPTPATH}/ldscripts/$LDSCRIPT" > "$NEWLDSCRIPT" - LDSCRIPT="$NEWLDSCRIPT" - fi - - if [ "@emit_relocs@" = "yes" ] - then - $LINKER $EMUL $SDIRS -T $LDSCRIPT -q -o "$OFILE.gdb" $ARG1 ||exit $? - RFILE="$OFILE.gdb" - FLTFLAGS="$FLTFLAGS -a" - else - if [ "@got_check@" = "no" ] - then - $LINKER $EMUL $SDIRS -T $LDSCRIPT -Ur -d -o "$OFILE.elf" $ARG1 ||exit $? - $LINKER $EMUL $SDIRS -T $LDSCRIPT -o "$OFILE.gdb" $ARG1 ||exit $? - else - $LINKER $EMUL -r -d -o "$OFILE.elf2flt" $ARG1 ||exit $? - $LINKER $EMUL $SDIRS -T $LDSCRIPT -Ur -o "$OFILE.elf" "$OFILE.elf2flt" ||exit $? - $LINKER $EMUL $SDIRS -T $LDSCRIPT -o "$OFILE.gdb" "$OFILE.elf2flt" ||exit $? - rm -f "$OFILE.elf2flt" - fi - RFILE="$OFILE.elf" - fi - if $NM "$OFILE.gdb" | grep _GLOBAL_OFFSET_TABLE_ > /dev/null - then - $ELF2FLT $FLTFLAGS -o "$OFILE" -p "$OFILE.gdb" "$RFILE" || exit $? - else - $ELF2FLT $FLTFLAGS -o "$OFILE" -r "$RFILE" || exit $? - fi - if [ "$OBJCOPYOP" ] - then - if $OBJCOPY $OBJCOPYOP --help > /dev/null 2>&1 - then - $OBJCOPY $OBJCOPYOP "$OFILE.gdb" ||exit $? - else - case " $OBJCOPYOP " in - *" --localize-hidden "*) - SYMS=`mktemp /tmp/flt-XXXXXX` - $OBJDUMP --syms "$OFILE.gdb" > "$SYMS" ||exit $? - sed -n 's/.*\(\.hidden\|\.internal\) \(.*\)/-L \2/p' < "$SYMS" > "$SYMS.hidden" ||exit $? - if [ -s "$SYMS.hidden" ] - then - xargs ${VERBOSE:+-t} $OBJCOPY "$OFILE.gdb" < "$SYMS.hidden" ||exit $? - fi - rm -f "$SYMS" "$SYMS.hidden" - ;; - esac - case " $OBJCOPYOP " in - *" --weaken "*) - $OBJCOPY --weaken "$OFILE.gdb" ||exit $? - ;; - esac - fi - fi - [ "$RFILE" = "$OFILE.gdb" ] || rm -f "$RFILE" # not needed for any reason - rm -f "$NEWLDSCRIPT" - exit 0 - fi - - exec $LINKER -o "$OFILE" $ARG1 -fi - -# -# otherwise pretend we aren't here -# - -exec $LINKER "$@" diff --git a/toolchain/elf2flt/elf2flt/maketarball.sh b/toolchain/elf2flt/elf2flt/maketarball.sh deleted file mode 100755 index 10148608aa..0000000000 --- a/toolchain/elf2flt/elf2flt/maketarball.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -cvs_stamp=$(cut -d/ -f4 CVS/Entries | sort | tail -n 1) -stamp=$(date +%Y%m%d --date="${cvs_stamp}") - -p="elf2flt-${stamp}" -rm -f elf2flt-*.tar.bz2 -mkdir ../${p} -cp -r * ../${p}/ || exit 1 -tar jcf ${p}.tar.bz2 --exclude .svn -C .. ${p} -rm -r ../${p} || exit 1 -du -b ${p}.tar.bz2 diff --git a/toolchain/elf2flt/elf2flt/stubs.c b/toolchain/elf2flt/elf2flt/stubs.c deleted file mode 100644 index fb14d6319b..0000000000 --- a/toolchain/elf2flt/elf2flt/stubs.c +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef HAVE_DCGETTEXT -const char *dcgettext (const char *domain, const char *msg, int category) -{ - return msg; -} -#endif /* !HAVE_DCGETTEXT */ diff --git a/toolchain/gcc/4.2.4/100-uclibc-conf.patch b/toolchain/gcc/4.2.4/100-uclibc-conf.patch deleted file mode 100644 index 4243ff7b91..0000000000 --- a/toolchain/gcc/4.2.4/100-uclibc-conf.patch +++ /dev/null @@ -1,200 +0,0 @@ ---- gcc/libgomp/configure -+++ gcc/libgomp/configure -@@ -3771,7 +3771,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/gcc/config/cris/linux.h -+++ gcc/gcc/config/cris/linux.h -@@ -74,7 +74,11 @@ - #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG - - #undef CRIS_SUBTARGET_VERSION --#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu" -+#if UCLIBC_DEFAULT -+# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc" -+#else -+# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu" -+#endif - - #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" - ---- gcc/libstdc++-v3/configure -+++ gcc/libstdc++-v3/configure -@@ -4276,7 +4276,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/zlib/configure -+++ gcc/zlib/configure -@@ -3422,7 +3422,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/libobjc/configure -+++ gcc/libobjc/configure -@@ -3309,7 +3309,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/libgfortran/configure -+++ gcc/libgfortran/configure -@@ -3695,7 +3695,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/libmudflap/configure -+++ gcc/libmudflap/configure -@@ -5378,7 +5378,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/boehm-gc/configure -+++ gcc/boehm-gc/configure -@@ -4316,7 +4316,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/libffi/configure -+++ gcc/libffi/configure -@@ -3453,7 +3453,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/libssp/configure -+++ gcc/libssp/configure -@@ -4409,7 +4409,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/contrib/regression/objs-gcc.sh -+++ gcc/contrib/regression/objs-gcc.sh -@@ -105,6 +105,10 @@ - then - make all-gdb all-dejagnu all-ld || exit 1 - make install-gdb install-dejagnu install-ld || exit 1 -+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] -+ then -+ make all-gdb all-dejagnu all-ld || exit 1 -+ make install-gdb install-dejagnu install-ld || exit 1 - elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then - make bootstrap || exit 1 - make install || exit 1 ---- gcc/libjava/classpath/ltconfig -+++ gcc/libjava/classpath/ltconfig -@@ -603,7 +603,7 @@ - - # Transform linux* to *-*-linux-gnu*, to support old configure scripts. - case $host_os in --linux-gnu*) ;; -+linux-gnu*|linux-uclibc*) ;; - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` - esac - -@@ -1251,7 +1251,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - version_type=linux - need_lib_prefix=no - need_version=no ---- gcc/libjava/classpath/configure -+++ gcc/libjava/classpath/configure -@@ -4665,7 +4665,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/libjava/configure -+++ gcc/libjava/configure -@@ -5212,7 +5212,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/libtool.m4 -+++ gcc/libtool.m4 -@@ -739,7 +739,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - lt_cv_deplibs_check_method=pass_all - ;; - ---- gcc/ltconfig -+++ gcc/ltconfig -@@ -603,7 +603,7 @@ - - # Transform linux* to *-*-linux-gnu*, to support old configure scripts. - case $host_os in --linux-gnu*) ;; -+linux-gnu*|linux-uclibc*) ;; - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` - esac - -@@ -1251,7 +1251,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - version_type=linux - need_lib_prefix=no - need_version=no diff --git a/toolchain/gcc/4.2.4/1000-aapcs-linux.patch b/toolchain/gcc/4.2.4/1000-aapcs-linux.patch deleted file mode 100644 index 80c5afc19f..0000000000 --- a/toolchain/gcc/4.2.4/1000-aapcs-linux.patch +++ /dev/null @@ -1,17 +0,0 @@ -2008-10-07 Bernhard Reutner-Fischer - - * config.gcc (arm*-*-*): Add aapcs-linux to supported ABIs. - -Index: gcc/gcc/config.gcc -=================================================================== ---- gcc/gcc/config.gcc (revision 140935) -+++ gcc/gcc/config.gcc (revision 140936) -@@ -2656,7 +2656,7 @@ - - case "$with_abi" in - "" \ -- | apcs-gnu | atpcs | aapcs | iwmmxt ) -+ | apcs-gnu | atpcs | aapcs | iwmmxt | aapcs-linux ) - #OK - ;; - *) diff --git a/toolchain/gcc/4.2.4/1001-gcc-4.2.x-inhibit-libc.patch b/toolchain/gcc/4.2.4/1001-gcc-4.2.x-inhibit-libc.patch deleted file mode 100644 index b039dfc3d7..0000000000 --- a/toolchain/gcc/4.2.4/1001-gcc-4.2.x-inhibit-libc.patch +++ /dev/null @@ -1,66 +0,0 @@ ---- gcc-4.2.4/gcc/unwind-sjlj.c.khem 2010-08-11 12:45:28.000000000 -0700 -+++ gcc-4.2.4/gcc/unwind-sjlj.c 2010-08-11 12:45:50.000000000 -0700 -@@ -28,6 +28,8 @@ - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ - -+#ifndef inhibit_libc -+ - #include "tconfig.h" - #include "tsystem.h" - #include "coretypes.h" -@@ -326,3 +328,4 @@ uw_identify_context (struct _Unwind_Cont - #include "unwind.inc" - - #endif /* USING_SJLJ_EXCEPTIONS */ -+#endif ---- gcc-4.2.4/gcc/unwind-dw2.c.khem 2010-08-11 12:42:45.000000000 -0700 -+++ gcc-4.2.4/gcc/unwind-dw2.c 2010-08-11 12:43:17.000000000 -0700 -@@ -28,6 +28,8 @@ - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ - -+#ifndef inhibit_libc -+ - #include "tconfig.h" - #include "tsystem.h" - #include "coretypes.h" -@@ -1537,3 +1539,5 @@ alias (_Unwind_SetIP); - #endif - - #endif /* !USING_SJLJ_EXCEPTIONS */ -+#endif -+ ---- gcc-4.2.4/gcc/unwind-dw2-fde-glibc.c.khem 2010-08-11 12:44:25.000000000 -0700 -+++ gcc-4.2.4/gcc/unwind-dw2-fde-glibc.c 2010-08-11 12:44:48.000000000 -0700 -@@ -29,6 +29,8 @@ - segment and dl_iterate_phdr to avoid register/deregister calls at - DSO load/unload. */ - -+#ifndef inhibit_libc -+ - #ifndef _GNU_SOURCE - #define _GNU_SOURCE 1 - #endif -@@ -438,3 +440,4 @@ _Unwind_Find_FDE (void *pc, struct dwarf - #if defined (USE_GAS_SYMVER) && defined (SHARED) && defined (USE_LIBUNWIND_EXCEPTIONS) - alias (_Unwind_Find_FDE); - #endif -+#endif ---- gcc-4.2.4/gcc/unwind-dw2-fde.c 2005-06-25 03:02:01.000000000 +0100 -+++ gcc-4.2.4/gcc/unwind-dw2-fde.c 2010-08-12 10:43:24.221690613 +0100 -@@ -29,6 +29,8 @@ - Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ - -+#ifndef inhibit_libc -+ - #ifndef _Unwind_Find_FDE - #include "tconfig.h" - #include "tsystem.h" -@@ -1028,3 +1030,5 @@ - - return f; - } -+ -+#endif diff --git a/toolchain/gcc/4.2.4/103-uclibc-conf-noupstream.patch b/toolchain/gcc/4.2.4/103-uclibc-conf-noupstream.patch deleted file mode 100644 index 09c9bbecfb..0000000000 --- a/toolchain/gcc/4.2.4/103-uclibc-conf-noupstream.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gcc/gcc/config.gcc.uclibc100-sh~ 2006-03-06 20:46:56 +0100 -+++ gcc/gcc/config.gcc 2006-03-10 15:02:41 +0100 -@@ -1905,7 +1905,7 @@ - ;; - sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \ - sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \ -- sh-*-linux* | sh[346lbe]*-*-linux* | \ -+ sh*-*-linux* | sh[346lbe]*-*-linux* | \ - sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \ - sh64-*-netbsd* | sh64l*-*-netbsd*) - tmake_file="${tmake_file} sh/t-sh sh/t-elf" diff --git a/toolchain/gcc/4.2.4/200-uclibc-locale.patch b/toolchain/gcc/4.2.4/200-uclibc-locale.patch deleted file mode 100644 index ea21388b75..0000000000 --- a/toolchain/gcc/4.2.4/200-uclibc-locale.patch +++ /dev/null @@ -1,2790 +0,0 @@ ---- gcc/libstdc++-v3/acinclude.m4 -+++ gcc/libstdc++-v3/acinclude.m4 -@@ -1369,7 +1369,7 @@ - AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [ - GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@], - [use MODEL for target locale package], -- [permit generic|gnu|ieee_1003.1-2001|yes|no|auto]) -+ [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto]) - - # Deal with gettext issues. Default to not using it (=no) until we detect - # support for it later. Let the user turn it off via --e/d, but let that -@@ -1385,6 +1385,9 @@ - # Default to "generic". - if test $enable_clocale_flag = auto; then - case ${target_os} in -+ *-uclibc*) -+ enable_clocale_flag=uclibc -+ ;; - linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) - AC_EGREP_CPP([_GLIBCXX_ok], [ - #include -@@ -1528,6 +1531,40 @@ - CTIME_CC=config/locale/generic/time_members.cc - CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h - ;; -+ uclibc) -+ AC_MSG_RESULT(uclibc) -+ -+ # Declare intention to use gettext, and add support for specific -+ # languages. -+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT -+ ALL_LINGUAS="de fr" -+ -+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. -+ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no) -+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then -+ USE_NLS=yes -+ fi -+ # Export the build objects. -+ for ling in $ALL_LINGUAS; do \ -+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ -+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ -+ done -+ AC_SUBST(glibcxx_MOFILES) -+ AC_SUBST(glibcxx_POFILES) -+ -+ CLOCALE_H=config/locale/uclibc/c_locale.h -+ CLOCALE_CC=config/locale/uclibc/c_locale.cc -+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc -+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc -+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc -+ CMESSAGES_H=config/locale/uclibc/messages_members.h -+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc -+ CMONEY_CC=config/locale/uclibc/monetary_members.cc -+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc -+ CTIME_H=config/locale/uclibc/time_members.h -+ CTIME_CC=config/locale/uclibc/time_members.cc -+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h -+ ;; - esac - - # This is where the testsuite looks for locale catalogs, using the ---- gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h -+++ gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h -@@ -0,0 +1,63 @@ -+// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*- -+ -+// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// Written by Jakub Jelinek -+ -+#include -+#include -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning clean this up -+#endif -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ -+extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l; -+extern "C" __typeof(strcoll_l) __strcoll_l; -+extern "C" __typeof(strftime_l) __strftime_l; -+extern "C" __typeof(strtod_l) __strtod_l; -+extern "C" __typeof(strtof_l) __strtof_l; -+extern "C" __typeof(strtold_l) __strtold_l; -+extern "C" __typeof(strxfrm_l) __strxfrm_l; -+extern "C" __typeof(newlocale) __newlocale; -+extern "C" __typeof(freelocale) __freelocale; -+extern "C" __typeof(duplocale) __duplocale; -+extern "C" __typeof(uselocale) __uselocale; -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+extern "C" __typeof(iswctype_l) __iswctype_l; -+extern "C" __typeof(towlower_l) __towlower_l; -+extern "C" __typeof(towupper_l) __towupper_l; -+extern "C" __typeof(wcscoll_l) __wcscoll_l; -+extern "C" __typeof(wcsftime_l) __wcsftime_l; -+extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l; -+extern "C" __typeof(wctype_l) __wctype_l; -+#endif -+ -+#endif // GLIBC 2.3 and later ---- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc -+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc -@@ -0,0 +1,160 @@ -+// Wrapper for underlying C-language localization -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.8 Standard locale categories. -+// -+ -+// Written by Benjamin Kosnik -+ -+#include // For errno -+#include -+#include -+#include -+#include -+ -+#ifndef __UCLIBC_HAS_XLOCALE__ -+#define __strtol_l(S, E, B, L) strtol((S), (E), (B)) -+#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B)) -+#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B)) -+#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B)) -+#define __strtof_l(S, E, L) strtof((S), (E)) -+#define __strtod_l(S, E, L) strtod((S), (E)) -+#define __strtold_l(S, E, L) strtold((S), (E)) -+#warning should dummy __newlocale check for C|POSIX ? -+#define __newlocale(a, b, c) NULL -+#define __freelocale(a) ((void)0) -+#define __duplocale(a) __c_locale() -+#endif -+ -+namespace std -+{ -+ template<> -+ void -+ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, -+ const __c_locale& __cloc) -+ { -+ if (!(__err & ios_base::failbit)) -+ { -+ char* __sanity; -+ errno = 0; -+ float __f = __strtof_l(__s, &__sanity, __cloc); -+ if (__sanity != __s && errno != ERANGE) -+ __v = __f; -+ else -+ __err |= ios_base::failbit; -+ } -+ } -+ -+ template<> -+ void -+ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, -+ const __c_locale& __cloc) -+ { -+ if (!(__err & ios_base::failbit)) -+ { -+ char* __sanity; -+ errno = 0; -+ double __d = __strtod_l(__s, &__sanity, __cloc); -+ if (__sanity != __s && errno != ERANGE) -+ __v = __d; -+ else -+ __err |= ios_base::failbit; -+ } -+ } -+ -+ template<> -+ void -+ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err, -+ const __c_locale& __cloc) -+ { -+ if (!(__err & ios_base::failbit)) -+ { -+ char* __sanity; -+ errno = 0; -+ long double __ld = __strtold_l(__s, &__sanity, __cloc); -+ if (__sanity != __s && errno != ERANGE) -+ __v = __ld; -+ else -+ __err |= ios_base::failbit; -+ } -+ } -+ -+ void -+ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s, -+ __c_locale __old) -+ { -+ __cloc = __newlocale(1 << LC_ALL, __s, __old); -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ if (!__cloc) -+ { -+ // This named locale is not supported by the underlying OS. -+ __throw_runtime_error(__N("locale::facet::_S_create_c_locale " -+ "name not valid")); -+ } -+#endif -+ } -+ -+ void -+ locale::facet::_S_destroy_c_locale(__c_locale& __cloc) -+ { -+ if (_S_get_c_locale() != __cloc) -+ __freelocale(__cloc); -+ } -+ -+ __c_locale -+ locale::facet::_S_clone_c_locale(__c_locale& __cloc) -+ { return __duplocale(__cloc); } -+} // namespace std -+ -+namespace __gnu_cxx -+{ -+ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] = -+ { -+ "LC_CTYPE", -+ "LC_NUMERIC", -+ "LC_TIME", -+ "LC_COLLATE", -+ "LC_MONETARY", -+ "LC_MESSAGES", -+#if _GLIBCXX_NUM_CATEGORIES != 0 -+ "LC_PAPER", -+ "LC_NAME", -+ "LC_ADDRESS", -+ "LC_TELEPHONE", -+ "LC_MEASUREMENT", -+ "LC_IDENTIFICATION" -+#endif -+ }; -+} -+ -+namespace std -+{ -+ const char* const* const locale::_S_categories = __gnu_cxx::category_names; -+} // namespace std ---- gcc/libstdc++-v3/config/locale/uclibc/c_locale.h -+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.h -@@ -0,0 +1,117 @@ -+// Wrapper for underlying C-language localization -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.8 Standard locale categories. -+// -+ -+// Written by Benjamin Kosnik -+ -+#ifndef _C_LOCALE_H -+#define _C_LOCALE_H 1 -+ -+#pragma GCC system_header -+ -+#include // get std::strlen -+#include // get std::snprintf or std::sprintf -+#include -+#include // For codecvt -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix this -+#endif -+#ifdef __UCLIBC_HAS_LOCALE__ -+#include // For codecvt using iconv, iconv_t -+#endif -+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ -+#include // For messages -+#endif -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning what is _GLIBCXX_C_LOCALE_GNU for -+#endif -+#define _GLIBCXX_C_LOCALE_GNU 1 -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix categories -+#endif -+// #define _GLIBCXX_NUM_CATEGORIES 6 -+#define _GLIBCXX_NUM_CATEGORIES 0 -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+namespace __gnu_cxx -+{ -+ extern "C" __typeof(uselocale) __uselocale; -+} -+#endif -+ -+namespace std -+{ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ typedef __locale_t __c_locale; -+#else -+ typedef int* __c_locale; -+#endif -+ -+ // Convert numeric value of type _Tv to string and return length of -+ // string. If snprintf is available use it, otherwise fall back to -+ // the unsafe sprintf which, in general, can be dangerous and should -+ // be avoided. -+ template -+ int -+ __convert_from_v(char* __out, -+ const int __size __attribute__ ((__unused__)), -+ const char* __fmt, -+#ifdef __UCLIBC_HAS_XCLOCALE__ -+ _Tv __v, const __c_locale& __cloc, int __prec) -+ { -+ __c_locale __old = __gnu_cxx::__uselocale(__cloc); -+#else -+ _Tv __v, const __c_locale&, int __prec) -+ { -+# ifdef __UCLIBC_HAS_LOCALE__ -+ char* __old = std::setlocale(LC_ALL, NULL); -+ char* __sav = new char[std::strlen(__old) + 1]; -+ std::strcpy(__sav, __old); -+ std::setlocale(LC_ALL, "C"); -+# endif -+#endif -+ -+ const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v); -+ -+#ifdef __UCLIBC_HAS_XCLOCALE__ -+ __gnu_cxx::__uselocale(__old); -+#elif defined __UCLIBC_HAS_LOCALE__ -+ std::setlocale(LC_ALL, __sav); -+ delete [] __sav; -+#endif -+ return __ret; -+ } -+} -+ -+#endif ---- gcc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc -+++ gcc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc -@@ -0,0 +1,306 @@ -+// std::codecvt implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2002, 2003 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.1.5 - Template class codecvt -+// -+ -+// Written by Benjamin Kosnik -+ -+#include -+#include -+ -+namespace std -+{ -+ // Specializations. -+#ifdef _GLIBCXX_USE_WCHAR_T -+ codecvt_base::result -+ codecvt:: -+ do_out(state_type& __state, const intern_type* __from, -+ const intern_type* __from_end, const intern_type*& __from_next, -+ extern_type* __to, extern_type* __to_end, -+ extern_type*& __to_next) const -+ { -+ result __ret = ok; -+ state_type __tmp_state(__state); -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_codecvt); -+#endif -+ -+ // wcsnrtombs is *very* fast but stops if encounters NUL characters: -+ // in case we fall back to wcrtomb and then continue, in a loop. -+ // NB: wcsnrtombs is a GNU extension -+ for (__from_next = __from, __to_next = __to; -+ __from_next < __from_end && __to_next < __to_end -+ && __ret == ok;) -+ { -+ const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0', -+ __from_end - __from_next); -+ if (!__from_chunk_end) -+ __from_chunk_end = __from_end; -+ -+ __from = __from_next; -+ const size_t __conv = wcsnrtombs(__to_next, &__from_next, -+ __from_chunk_end - __from_next, -+ __to_end - __to_next, &__state); -+ if (__conv == static_cast(-1)) -+ { -+ // In case of error, in order to stop at the exact place we -+ // have to start again from the beginning with a series of -+ // wcrtomb. -+ for (; __from < __from_next; ++__from) -+ __to_next += wcrtomb(__to_next, *__from, &__tmp_state); -+ __state = __tmp_state; -+ __ret = error; -+ } -+ else if (__from_next && __from_next < __from_chunk_end) -+ { -+ __to_next += __conv; -+ __ret = partial; -+ } -+ else -+ { -+ __from_next = __from_chunk_end; -+ __to_next += __conv; -+ } -+ -+ if (__from_next < __from_end && __ret == ok) -+ { -+ extern_type __buf[MB_LEN_MAX]; -+ __tmp_state = __state; -+ const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state); -+ if (__conv > static_cast(__to_end - __to_next)) -+ __ret = partial; -+ else -+ { -+ memcpy(__to_next, __buf, __conv); -+ __state = __tmp_state; -+ __to_next += __conv; -+ ++__from_next; -+ } -+ } -+ } -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ -+ return __ret; -+ } -+ -+ codecvt_base::result -+ codecvt:: -+ do_in(state_type& __state, const extern_type* __from, -+ const extern_type* __from_end, const extern_type*& __from_next, -+ intern_type* __to, intern_type* __to_end, -+ intern_type*& __to_next) const -+ { -+ result __ret = ok; -+ state_type __tmp_state(__state); -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_codecvt); -+#endif -+ -+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters: -+ // in case we store a L'\0' and then continue, in a loop. -+ // NB: mbsnrtowcs is a GNU extension -+ for (__from_next = __from, __to_next = __to; -+ __from_next < __from_end && __to_next < __to_end -+ && __ret == ok;) -+ { -+ const extern_type* __from_chunk_end; -+ __from_chunk_end = static_cast(memchr(__from_next, '\0', -+ __from_end -+ - __from_next)); -+ if (!__from_chunk_end) -+ __from_chunk_end = __from_end; -+ -+ __from = __from_next; -+ size_t __conv = mbsnrtowcs(__to_next, &__from_next, -+ __from_chunk_end - __from_next, -+ __to_end - __to_next, &__state); -+ if (__conv == static_cast(-1)) -+ { -+ // In case of error, in order to stop at the exact place we -+ // have to start again from the beginning with a series of -+ // mbrtowc. -+ for (;; ++__to_next, __from += __conv) -+ { -+ __conv = mbrtowc(__to_next, __from, __from_end - __from, -+ &__tmp_state); -+ if (__conv == static_cast(-1) -+ || __conv == static_cast(-2)) -+ break; -+ } -+ __from_next = __from; -+ __state = __tmp_state; -+ __ret = error; -+ } -+ else if (__from_next && __from_next < __from_chunk_end) -+ { -+ // It is unclear what to return in this case (see DR 382). -+ __to_next += __conv; -+ __ret = partial; -+ } -+ else -+ { -+ __from_next = __from_chunk_end; -+ __to_next += __conv; -+ } -+ -+ if (__from_next < __from_end && __ret == ok) -+ { -+ if (__to_next < __to_end) -+ { -+ // XXX Probably wrong for stateful encodings -+ __tmp_state = __state; -+ ++__from_next; -+ *__to_next++ = L'\0'; -+ } -+ else -+ __ret = partial; -+ } -+ } -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ -+ return __ret; -+ } -+ -+ int -+ codecvt:: -+ do_encoding() const throw() -+ { -+ // XXX This implementation assumes that the encoding is -+ // stateless and is either single-byte or variable-width. -+ int __ret = 0; -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_codecvt); -+#endif -+ if (MB_CUR_MAX == 1) -+ __ret = 1; -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ return __ret; -+ } -+ -+ int -+ codecvt:: -+ do_max_length() const throw() -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_codecvt); -+#endif -+ // XXX Probably wrong for stateful encodings. -+ int __ret = MB_CUR_MAX; -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ return __ret; -+ } -+ -+ int -+ codecvt:: -+ do_length(state_type& __state, const extern_type* __from, -+ const extern_type* __end, size_t __max) const -+ { -+ int __ret = 0; -+ state_type __tmp_state(__state); -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_codecvt); -+#endif -+ -+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters: -+ // in case we advance past it and then continue, in a loop. -+ // NB: mbsnrtowcs is a GNU extension -+ -+ // A dummy internal buffer is needed in order for mbsnrtocws to consider -+ // its fourth parameter (it wouldn't with NULL as first parameter). -+ wchar_t* __to = static_cast(__builtin_alloca(sizeof(wchar_t) -+ * __max)); -+ while (__from < __end && __max) -+ { -+ const extern_type* __from_chunk_end; -+ __from_chunk_end = static_cast(memchr(__from, '\0', -+ __end -+ - __from)); -+ if (!__from_chunk_end) -+ __from_chunk_end = __end; -+ -+ const extern_type* __tmp_from = __from; -+ size_t __conv = mbsnrtowcs(__to, &__from, -+ __from_chunk_end - __from, -+ __max, &__state); -+ if (__conv == static_cast(-1)) -+ { -+ // In case of error, in order to stop at the exact place we -+ // have to start again from the beginning with a series of -+ // mbrtowc. -+ for (__from = __tmp_from;; __from += __conv) -+ { -+ __conv = mbrtowc(NULL, __from, __end - __from, -+ &__tmp_state); -+ if (__conv == static_cast(-1) -+ || __conv == static_cast(-2)) -+ break; -+ } -+ __state = __tmp_state; -+ __ret += __from - __tmp_from; -+ break; -+ } -+ if (!__from) -+ __from = __from_chunk_end; -+ -+ __ret += __from - __tmp_from; -+ __max -= __conv; -+ -+ if (__from < __end && __max) -+ { -+ // XXX Probably wrong for stateful encodings -+ __tmp_state = __state; -+ ++__from; -+ ++__ret; -+ --__max; -+ } -+ } -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ -+ return __ret; -+ } -+#endif -+} ---- gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc -+++ gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc -@@ -0,0 +1,80 @@ -+// std::collate implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.4.1.2 collate virtual functions -+// -+ -+// Written by Benjamin Kosnik -+ -+#include -+#include -+ -+#ifndef __UCLIBC_HAS_XLOCALE__ -+#define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) -+#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) -+#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) -+#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) -+#endif -+ -+namespace std -+{ -+ // These are basically extensions to char_traits, and perhaps should -+ // be put there instead of here. -+ template<> -+ int -+ collate::_M_compare(const char* __one, const char* __two) const -+ { -+ int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate); -+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); -+ } -+ -+ template<> -+ size_t -+ collate::_M_transform(char* __to, const char* __from, -+ size_t __n) const -+ { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); } -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+ template<> -+ int -+ collate::_M_compare(const wchar_t* __one, -+ const wchar_t* __two) const -+ { -+ int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate); -+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); -+ } -+ -+ template<> -+ size_t -+ collate::_M_transform(wchar_t* __to, const wchar_t* __from, -+ size_t __n) const -+ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); } -+#endif -+} ---- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc -+++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc -@@ -0,0 +1,300 @@ -+// std::ctype implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions. -+// -+ -+// Written by Benjamin Kosnik -+ -+#define _LIBC -+#include -+#undef _LIBC -+#include -+ -+#ifndef __UCLIBC_HAS_XLOCALE__ -+#define __wctype_l(S, L) wctype((S)) -+#define __towupper_l(C, L) towupper((C)) -+#define __towlower_l(C, L) towlower((C)) -+#define __iswctype_l(C, M, L) iswctype((C), (M)) -+#endif -+ -+namespace std -+{ -+ // NB: The other ctype specializations are in src/locale.cc and -+ // various /config/os/* files. -+ template<> -+ ctype_byname::ctype_byname(const char* __s, size_t __refs) -+ : ctype(0, false, __refs) -+ { -+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) -+ { -+ this->_S_destroy_c_locale(this->_M_c_locale_ctype); -+ this->_S_create_c_locale(this->_M_c_locale_ctype, __s); -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper; -+ this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower; -+ this->_M_table = this->_M_c_locale_ctype->__ctype_b; -+#endif -+ } -+ } -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+ ctype::__wmask_type -+ ctype::_M_convert_to_wmask(const mask __m) const -+ { -+ __wmask_type __ret; -+ switch (__m) -+ { -+ case space: -+ __ret = __wctype_l("space", _M_c_locale_ctype); -+ break; -+ case print: -+ __ret = __wctype_l("print", _M_c_locale_ctype); -+ break; -+ case cntrl: -+ __ret = __wctype_l("cntrl", _M_c_locale_ctype); -+ break; -+ case upper: -+ __ret = __wctype_l("upper", _M_c_locale_ctype); -+ break; -+ case lower: -+ __ret = __wctype_l("lower", _M_c_locale_ctype); -+ break; -+ case alpha: -+ __ret = __wctype_l("alpha", _M_c_locale_ctype); -+ break; -+ case digit: -+ __ret = __wctype_l("digit", _M_c_locale_ctype); -+ break; -+ case punct: -+ __ret = __wctype_l("punct", _M_c_locale_ctype); -+ break; -+ case xdigit: -+ __ret = __wctype_l("xdigit", _M_c_locale_ctype); -+ break; -+ case alnum: -+ __ret = __wctype_l("alnum", _M_c_locale_ctype); -+ break; -+ case graph: -+ __ret = __wctype_l("graph", _M_c_locale_ctype); -+ break; -+ default: -+ __ret = __wmask_type(); -+ } -+ return __ret; -+ } -+ -+ wchar_t -+ ctype::do_toupper(wchar_t __c) const -+ { return __towupper_l(__c, _M_c_locale_ctype); } -+ -+ const wchar_t* -+ ctype::do_toupper(wchar_t* __lo, const wchar_t* __hi) const -+ { -+ while (__lo < __hi) -+ { -+ *__lo = __towupper_l(*__lo, _M_c_locale_ctype); -+ ++__lo; -+ } -+ return __hi; -+ } -+ -+ wchar_t -+ ctype::do_tolower(wchar_t __c) const -+ { return __towlower_l(__c, _M_c_locale_ctype); } -+ -+ const wchar_t* -+ ctype::do_tolower(wchar_t* __lo, const wchar_t* __hi) const -+ { -+ while (__lo < __hi) -+ { -+ *__lo = __towlower_l(*__lo, _M_c_locale_ctype); -+ ++__lo; -+ } -+ return __hi; -+ } -+ -+ bool -+ ctype:: -+ do_is(mask __m, wchar_t __c) const -+ { -+ // Highest bitmask in ctype_base == 10, but extra in "C" -+ // library for blank. -+ bool __ret = false; -+ const size_t __bitmasksize = 11; -+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) -+ if (__m & _M_bit[__bitcur] -+ && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) -+ { -+ __ret = true; -+ break; -+ } -+ return __ret; -+ } -+ -+ const wchar_t* -+ ctype:: -+ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const -+ { -+ for (; __lo < __hi; ++__vec, ++__lo) -+ { -+ // Highest bitmask in ctype_base == 10, but extra in "C" -+ // library for blank. -+ const size_t __bitmasksize = 11; -+ mask __m = 0; -+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) -+ if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype)) -+ __m |= _M_bit[__bitcur]; -+ *__vec = __m; -+ } -+ return __hi; -+ } -+ -+ const wchar_t* -+ ctype:: -+ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const -+ { -+ while (__lo < __hi && !this->do_is(__m, *__lo)) -+ ++__lo; -+ return __lo; -+ } -+ -+ const wchar_t* -+ ctype:: -+ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const -+ { -+ while (__lo < __hi && this->do_is(__m, *__lo) != 0) -+ ++__lo; -+ return __lo; -+ } -+ -+ wchar_t -+ ctype:: -+ do_widen(char __c) const -+ { return _M_widen[static_cast(__c)]; } -+ -+ const char* -+ ctype:: -+ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const -+ { -+ while (__lo < __hi) -+ { -+ *__dest = _M_widen[static_cast(*__lo)]; -+ ++__lo; -+ ++__dest; -+ } -+ return __hi; -+ } -+ -+ char -+ ctype:: -+ do_narrow(wchar_t __wc, char __dfault) const -+ { -+ if (__wc >= 0 && __wc < 128 && _M_narrow_ok) -+ return _M_narrow[__wc]; -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_ctype); -+#endif -+ const int __c = wctob(__wc); -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ return (__c == EOF ? __dfault : static_cast(__c)); -+ } -+ -+ const wchar_t* -+ ctype:: -+ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault, -+ char* __dest) const -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_ctype); -+#endif -+ if (_M_narrow_ok) -+ while (__lo < __hi) -+ { -+ if (*__lo >= 0 && *__lo < 128) -+ *__dest = _M_narrow[*__lo]; -+ else -+ { -+ const int __c = wctob(*__lo); -+ *__dest = (__c == EOF ? __dfault : static_cast(__c)); -+ } -+ ++__lo; -+ ++__dest; -+ } -+ else -+ while (__lo < __hi) -+ { -+ const int __c = wctob(*__lo); -+ *__dest = (__c == EOF ? __dfault : static_cast(__c)); -+ ++__lo; -+ ++__dest; -+ } -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ return __hi; -+ } -+ -+ void -+ ctype::_M_initialize_ctype() -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_ctype); -+#endif -+ wint_t __i; -+ for (__i = 0; __i < 128; ++__i) -+ { -+ const int __c = wctob(__i); -+ if (__c == EOF) -+ break; -+ else -+ _M_narrow[__i] = static_cast(__c); -+ } -+ if (__i == 128) -+ _M_narrow_ok = true; -+ else -+ _M_narrow_ok = false; -+ for (size_t __j = 0; -+ __j < sizeof(_M_widen) / sizeof(wint_t); ++__j) -+ _M_widen[__j] = btowc(__j); -+ -+ for (size_t __k = 0; __k <= 11; ++__k) -+ { -+ _M_bit[__k] = static_cast(_ISbit(__k)); -+ _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]); -+ } -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#endif -+ } -+#endif // _GLIBCXX_USE_WCHAR_T -+} ---- gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc -+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc -@@ -0,0 +1,100 @@ -+// std::messages implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.7.1.2 messages virtual functions -+// -+ -+// Written by Benjamin Kosnik -+ -+#include -+#include -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix gettext stuff -+#endif -+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ -+extern "C" char *__dcgettext(const char *domainname, -+ const char *msgid, int category); -+#undef gettext -+#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES) -+#else -+#undef gettext -+#define gettext(msgid) (msgid) -+#endif -+ -+namespace std -+{ -+ // Specializations. -+ template<> -+ string -+ messages::do_get(catalog, int, int, const string& __dfault) const -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_messages); -+ const char* __msg = const_cast(gettext(__dfault.c_str())); -+ __uselocale(__old); -+ return string(__msg); -+#elif defined __UCLIBC_HAS_LOCALE__ -+ char* __old = strdup(setlocale(LC_ALL, NULL)); -+ setlocale(LC_ALL, _M_name_messages); -+ const char* __msg = gettext(__dfault.c_str()); -+ setlocale(LC_ALL, __old); -+ free(__old); -+ return string(__msg); -+#else -+ const char* __msg = gettext(__dfault.c_str()); -+ return string(__msg); -+#endif -+ } -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+ template<> -+ wstring -+ messages::do_get(catalog, int, int, const wstring& __dfault) const -+ { -+# ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(_M_c_locale_messages); -+ char* __msg = gettext(_M_convert_to_char(__dfault)); -+ __uselocale(__old); -+ return _M_convert_from_char(__msg); -+# elif defined __UCLIBC_HAS_LOCALE__ -+ char* __old = strdup(setlocale(LC_ALL, NULL)); -+ setlocale(LC_ALL, _M_name_messages); -+ char* __msg = gettext(_M_convert_to_char(__dfault)); -+ setlocale(LC_ALL, __old); -+ free(__old); -+ return _M_convert_from_char(__msg); -+# else -+ char* __msg = gettext(_M_convert_to_char(__dfault)); -+ return _M_convert_from_char(__msg); -+# endif -+ } -+#endif -+} ---- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h -+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h -@@ -0,0 +1,118 @@ -+// std::messages implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.7.1.2 messages functions -+// -+ -+// Written by Benjamin Kosnik -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix prototypes for *textdomain funcs -+#endif -+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ -+extern "C" char *__textdomain(const char *domainname); -+extern "C" char *__bindtextdomain(const char *domainname, -+ const char *dirname); -+#else -+#undef __textdomain -+#undef __bindtextdomain -+#define __textdomain(D) ((void)0) -+#define __bindtextdomain(D,P) ((void)0) -+#endif -+ -+ // Non-virtual member functions. -+ template -+ messages<_CharT>::messages(size_t __refs) -+ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), -+ _M_name_messages(_S_get_c_name()) -+ { } -+ -+ template -+ messages<_CharT>::messages(__c_locale __cloc, const char* __s, -+ size_t __refs) -+ : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)), -+ _M_name_messages(__s) -+ { -+ char* __tmp = new char[std::strlen(__s) + 1]; -+ std::strcpy(__tmp, __s); -+ _M_name_messages = __tmp; -+ } -+ -+ template -+ typename messages<_CharT>::catalog -+ messages<_CharT>::open(const basic_string& __s, const locale& __loc, -+ const char* __dir) const -+ { -+ __bindtextdomain(__s.c_str(), __dir); -+ return this->do_open(__s, __loc); -+ } -+ -+ // Virtual member functions. -+ template -+ messages<_CharT>::~messages() -+ { -+ if (_M_name_messages != _S_get_c_name()) -+ delete [] _M_name_messages; -+ _S_destroy_c_locale(_M_c_locale_messages); -+ } -+ -+ template -+ typename messages<_CharT>::catalog -+ messages<_CharT>::do_open(const basic_string& __s, -+ const locale&) const -+ { -+ // No error checking is done, assume the catalog exists and can -+ // be used. -+ __textdomain(__s.c_str()); -+ return 0; -+ } -+ -+ template -+ void -+ messages<_CharT>::do_close(catalog) const -+ { } -+ -+ // messages_byname -+ template -+ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) -+ : messages<_CharT>(__refs) -+ { -+ if (this->_M_name_messages != locale::facet::_S_get_c_name()) -+ delete [] this->_M_name_messages; -+ char* __tmp = new char[std::strlen(__s) + 1]; -+ std::strcpy(__tmp, __s); -+ this->_M_name_messages = __tmp; -+ -+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) -+ { -+ this->_S_destroy_c_locale(this->_M_c_locale_messages); -+ this->_S_create_c_locale(this->_M_c_locale_messages, __s); -+ } -+ } ---- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc -+++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc -@@ -0,0 +1,692 @@ -+// std::moneypunct implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions -+// -+ -+// Written by Benjamin Kosnik -+ -+#define _LIBC -+#include -+#undef _LIBC -+#include -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning optimize this for uclibc -+#warning tailor for stub locale support -+#endif -+ -+#ifndef __UCLIBC_HAS_XLOCALE__ -+#define __nl_langinfo_l(N, L) nl_langinfo((N)) -+#endif -+ -+namespace std -+{ -+ // Construct and return valid pattern consisting of some combination of: -+ // space none symbol sign value -+ money_base::pattern -+ money_base::_S_construct_pattern(char __precedes, char __space, char __posn) -+ { -+ pattern __ret; -+ -+ // This insanely complicated routine attempts to construct a valid -+ // pattern for use with monyepunct. A couple of invariants: -+ -+ // if (__precedes) symbol -> value -+ // else value -> symbol -+ -+ // if (__space) space -+ // else none -+ -+ // none == never first -+ // space never first or last -+ -+ // Any elegant implementations of this are welcome. -+ switch (__posn) -+ { -+ case 0: -+ case 1: -+ // 1 The sign precedes the value and symbol. -+ __ret.field[0] = sign; -+ if (__space) -+ { -+ // Pattern starts with sign. -+ if (__precedes) -+ { -+ __ret.field[1] = symbol; -+ __ret.field[3] = value; -+ } -+ else -+ { -+ __ret.field[1] = value; -+ __ret.field[3] = symbol; -+ } -+ __ret.field[2] = space; -+ } -+ else -+ { -+ // Pattern starts with sign and ends with none. -+ if (__precedes) -+ { -+ __ret.field[1] = symbol; -+ __ret.field[2] = value; -+ } -+ else -+ { -+ __ret.field[1] = value; -+ __ret.field[2] = symbol; -+ } -+ __ret.field[3] = none; -+ } -+ break; -+ case 2: -+ // 2 The sign follows the value and symbol. -+ if (__space) -+ { -+ // Pattern either ends with sign. -+ if (__precedes) -+ { -+ __ret.field[0] = symbol; -+ __ret.field[2] = value; -+ } -+ else -+ { -+ __ret.field[0] = value; -+ __ret.field[2] = symbol; -+ } -+ __ret.field[1] = space; -+ __ret.field[3] = sign; -+ } -+ else -+ { -+ // Pattern ends with sign then none. -+ if (__precedes) -+ { -+ __ret.field[0] = symbol; -+ __ret.field[1] = value; -+ } -+ else -+ { -+ __ret.field[0] = value; -+ __ret.field[1] = symbol; -+ } -+ __ret.field[2] = sign; -+ __ret.field[3] = none; -+ } -+ break; -+ case 3: -+ // 3 The sign immediately precedes the symbol. -+ if (__precedes) -+ { -+ __ret.field[0] = sign; -+ __ret.field[1] = symbol; -+ if (__space) -+ { -+ __ret.field[2] = space; -+ __ret.field[3] = value; -+ } -+ else -+ { -+ __ret.field[2] = value; -+ __ret.field[3] = none; -+ } -+ } -+ else -+ { -+ __ret.field[0] = value; -+ if (__space) -+ { -+ __ret.field[1] = space; -+ __ret.field[2] = sign; -+ __ret.field[3] = symbol; -+ } -+ else -+ { -+ __ret.field[1] = sign; -+ __ret.field[2] = symbol; -+ __ret.field[3] = none; -+ } -+ } -+ break; -+ case 4: -+ // 4 The sign immediately follows the symbol. -+ if (__precedes) -+ { -+ __ret.field[0] = symbol; -+ __ret.field[1] = sign; -+ if (__space) -+ { -+ __ret.field[2] = space; -+ __ret.field[3] = value; -+ } -+ else -+ { -+ __ret.field[2] = value; -+ __ret.field[3] = none; -+ } -+ } -+ else -+ { -+ __ret.field[0] = value; -+ if (__space) -+ { -+ __ret.field[1] = space; -+ __ret.field[2] = symbol; -+ __ret.field[3] = sign; -+ } -+ else -+ { -+ __ret.field[1] = symbol; -+ __ret.field[2] = sign; -+ __ret.field[3] = none; -+ } -+ } -+ break; -+ default: -+ ; -+ } -+ return __ret; -+ } -+ -+ template<> -+ void -+ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, -+ const char*) -+ { -+ if (!_M_data) -+ _M_data = new __moneypunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_data->_M_decimal_point = '.'; -+ _M_data->_M_thousands_sep = ','; -+ _M_data->_M_grouping = ""; -+ _M_data->_M_grouping_size = 0; -+ _M_data->_M_curr_symbol = ""; -+ _M_data->_M_curr_symbol_size = 0; -+ _M_data->_M_positive_sign = ""; -+ _M_data->_M_positive_sign_size = 0; -+ _M_data->_M_negative_sign = ""; -+ _M_data->_M_negative_sign_size = 0; -+ _M_data->_M_frac_digits = 0; -+ _M_data->_M_pos_format = money_base::_S_default_pattern; -+ _M_data->_M_neg_format = money_base::_S_default_pattern; -+ -+ for (size_t __i = 0; __i < money_base::_S_end; ++__i) -+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i]; -+ } -+ else -+ { -+ // Named locale. -+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, -+ __cloc)); -+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, -+ __cloc)); -+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); -+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); -+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign); -+ -+ char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); -+ if (!__nposn) -+ _M_data->_M_negative_sign = "()"; -+ else -+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, -+ __cloc); -+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign); -+ -+ // _Intl == true -+ _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc); -+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol); -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, -+ __cloc)); -+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); -+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); -+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, -+ __pposn); -+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); -+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, -+ __nposn); -+ } -+ } -+ -+ template<> -+ void -+ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, -+ const char*) -+ { -+ if (!_M_data) -+ _M_data = new __moneypunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_data->_M_decimal_point = '.'; -+ _M_data->_M_thousands_sep = ','; -+ _M_data->_M_grouping = ""; -+ _M_data->_M_grouping_size = 0; -+ _M_data->_M_curr_symbol = ""; -+ _M_data->_M_curr_symbol_size = 0; -+ _M_data->_M_positive_sign = ""; -+ _M_data->_M_positive_sign_size = 0; -+ _M_data->_M_negative_sign = ""; -+ _M_data->_M_negative_sign_size = 0; -+ _M_data->_M_frac_digits = 0; -+ _M_data->_M_pos_format = money_base::_S_default_pattern; -+ _M_data->_M_neg_format = money_base::_S_default_pattern; -+ -+ for (size_t __i = 0; __i < money_base::_S_end; ++__i) -+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i]; -+ } -+ else -+ { -+ // Named locale. -+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, -+ __cloc)); -+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, -+ __cloc)); -+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); -+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); -+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign); -+ -+ char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); -+ if (!__nposn) -+ _M_data->_M_negative_sign = "()"; -+ else -+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, -+ __cloc); -+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign); -+ -+ // _Intl == false -+ _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc); -+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol); -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc)); -+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); -+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); -+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, -+ __pposn); -+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); -+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, -+ __nposn); -+ } -+ } -+ -+ template<> -+ moneypunct::~moneypunct() -+ { delete _M_data; } -+ -+ template<> -+ moneypunct::~moneypunct() -+ { delete _M_data; } -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+ template<> -+ void -+ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ const char*) -+#else -+ const char* __name) -+#endif -+ { -+ if (!_M_data) -+ _M_data = new __moneypunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_data->_M_decimal_point = L'.'; -+ _M_data->_M_thousands_sep = L','; -+ _M_data->_M_grouping = ""; -+ _M_data->_M_grouping_size = 0; -+ _M_data->_M_curr_symbol = L""; -+ _M_data->_M_curr_symbol_size = 0; -+ _M_data->_M_positive_sign = L""; -+ _M_data->_M_positive_sign_size = 0; -+ _M_data->_M_negative_sign = L""; -+ _M_data->_M_negative_sign_size = 0; -+ _M_data->_M_frac_digits = 0; -+ _M_data->_M_pos_format = money_base::_S_default_pattern; -+ _M_data->_M_neg_format = money_base::_S_default_pattern; -+ -+ // Use ctype::widen code without the facet... -+ for (size_t __i = 0; __i < money_base::_S_end; ++__i) -+ _M_data->_M_atoms[__i] = -+ static_cast(money_base::_S_atoms[__i]); -+ } -+ else -+ { -+ // Named locale. -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(__cloc); -+#else -+ // Switch to named locale so that mbsrtowcs will work. -+ char* __old = strdup(setlocale(LC_ALL, NULL)); -+ setlocale(LC_ALL, __name); -+#endif -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix this... should be monetary -+#endif -+#ifdef __UCLIBC__ -+# ifdef __UCLIBC_HAS_XLOCALE__ -+ _M_data->_M_decimal_point = __cloc->decimal_point_wc; -+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; -+# else -+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; -+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; -+# endif -+#else -+ union { char *__s; wchar_t __w; } __u; -+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); -+ _M_data->_M_decimal_point = __u.__w; -+ -+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); -+ _M_data->_M_thousands_sep = __u.__w; -+#endif -+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); -+ -+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); -+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc); -+ const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc); -+ -+ wchar_t* __wcs_ps = 0; -+ wchar_t* __wcs_ns = 0; -+ const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); -+ try -+ { -+ mbstate_t __state; -+ size_t __len = strlen(__cpossign); -+ if (__len) -+ { -+ ++__len; -+ memset(&__state, 0, sizeof(mbstate_t)); -+ __wcs_ps = new wchar_t[__len]; -+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state); -+ _M_data->_M_positive_sign = __wcs_ps; -+ } -+ else -+ _M_data->_M_positive_sign = L""; -+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); -+ -+ __len = strlen(__cnegsign); -+ if (!__nposn) -+ _M_data->_M_negative_sign = L"()"; -+ else if (__len) -+ { -+ ++__len; -+ memset(&__state, 0, sizeof(mbstate_t)); -+ __wcs_ns = new wchar_t[__len]; -+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state); -+ _M_data->_M_negative_sign = __wcs_ns; -+ } -+ else -+ _M_data->_M_negative_sign = L""; -+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign); -+ -+ // _Intl == true. -+ __len = strlen(__ccurr); -+ if (__len) -+ { -+ ++__len; -+ memset(&__state, 0, sizeof(mbstate_t)); -+ wchar_t* __wcs = new wchar_t[__len]; -+ mbsrtowcs(__wcs, &__ccurr, __len, &__state); -+ _M_data->_M_curr_symbol = __wcs; -+ } -+ else -+ _M_data->_M_curr_symbol = L""; -+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); -+ } -+ catch (...) -+ { -+ delete _M_data; -+ _M_data = 0; -+ delete __wcs_ps; -+ delete __wcs_ns; -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#else -+ setlocale(LC_ALL, __old); -+ free(__old); -+#endif -+ __throw_exception_again; -+ } -+ -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, -+ __cloc)); -+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); -+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); -+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, -+ __pposn); -+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); -+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, -+ __nposn); -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#else -+ setlocale(LC_ALL, __old); -+ free(__old); -+#endif -+ } -+ } -+ -+ template<> -+ void -+ moneypunct::_M_initialize_moneypunct(__c_locale __cloc, -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ const char*) -+#else -+ const char* __name) -+#endif -+ { -+ if (!_M_data) -+ _M_data = new __moneypunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_data->_M_decimal_point = L'.'; -+ _M_data->_M_thousands_sep = L','; -+ _M_data->_M_grouping = ""; -+ _M_data->_M_grouping_size = 0; -+ _M_data->_M_curr_symbol = L""; -+ _M_data->_M_curr_symbol_size = 0; -+ _M_data->_M_positive_sign = L""; -+ _M_data->_M_positive_sign_size = 0; -+ _M_data->_M_negative_sign = L""; -+ _M_data->_M_negative_sign_size = 0; -+ _M_data->_M_frac_digits = 0; -+ _M_data->_M_pos_format = money_base::_S_default_pattern; -+ _M_data->_M_neg_format = money_base::_S_default_pattern; -+ -+ // Use ctype::widen code without the facet... -+ for (size_t __i = 0; __i < money_base::_S_end; ++__i) -+ _M_data->_M_atoms[__i] = -+ static_cast(money_base::_S_atoms[__i]); -+ } -+ else -+ { -+ // Named locale. -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __c_locale __old = __uselocale(__cloc); -+#else -+ // Switch to named locale so that mbsrtowcs will work. -+ char* __old = strdup(setlocale(LC_ALL, NULL)); -+ setlocale(LC_ALL, __name); -+#endif -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix this... should be monetary -+#endif -+#ifdef __UCLIBC__ -+# ifdef __UCLIBC_HAS_XLOCALE__ -+ _M_data->_M_decimal_point = __cloc->decimal_point_wc; -+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; -+# else -+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; -+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; -+# endif -+#else -+ union { char *__s; wchar_t __w; } __u; -+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); -+ _M_data->_M_decimal_point = __u.__w; -+ -+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); -+ _M_data->_M_thousands_sep = __u.__w; -+#endif -+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); -+ -+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); -+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc); -+ const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc); -+ -+ wchar_t* __wcs_ps = 0; -+ wchar_t* __wcs_ns = 0; -+ const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); -+ try -+ { -+ mbstate_t __state; -+ size_t __len; -+ __len = strlen(__cpossign); -+ if (__len) -+ { -+ ++__len; -+ memset(&__state, 0, sizeof(mbstate_t)); -+ __wcs_ps = new wchar_t[__len]; -+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state); -+ _M_data->_M_positive_sign = __wcs_ps; -+ } -+ else -+ _M_data->_M_positive_sign = L""; -+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); -+ -+ __len = strlen(__cnegsign); -+ if (!__nposn) -+ _M_data->_M_negative_sign = L"()"; -+ else if (__len) -+ { -+ ++__len; -+ memset(&__state, 0, sizeof(mbstate_t)); -+ __wcs_ns = new wchar_t[__len]; -+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state); -+ _M_data->_M_negative_sign = __wcs_ns; -+ } -+ else -+ _M_data->_M_negative_sign = L""; -+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign); -+ -+ // _Intl == true. -+ __len = strlen(__ccurr); -+ if (__len) -+ { -+ ++__len; -+ memset(&__state, 0, sizeof(mbstate_t)); -+ wchar_t* __wcs = new wchar_t[__len]; -+ mbsrtowcs(__wcs, &__ccurr, __len, &__state); -+ _M_data->_M_curr_symbol = __wcs; -+ } -+ else -+ _M_data->_M_curr_symbol = L""; -+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); -+ } -+ catch (...) -+ { -+ delete _M_data; -+ _M_data = 0; -+ delete __wcs_ps; -+ delete __wcs_ns; -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#else -+ setlocale(LC_ALL, __old); -+ free(__old); -+#endif -+ __throw_exception_again; -+ } -+ -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc)); -+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); -+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); -+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, -+ __pposn); -+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); -+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, -+ __nposn); -+ -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __uselocale(__old); -+#else -+ setlocale(LC_ALL, __old); -+ free(__old); -+#endif -+ } -+ } -+ -+ template<> -+ moneypunct::~moneypunct() -+ { -+ if (_M_data->_M_positive_sign_size) -+ delete [] _M_data->_M_positive_sign; -+ if (_M_data->_M_negative_sign_size -+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0) -+ delete [] _M_data->_M_negative_sign; -+ if (_M_data->_M_curr_symbol_size) -+ delete [] _M_data->_M_curr_symbol; -+ delete _M_data; -+ } -+ -+ template<> -+ moneypunct::~moneypunct() -+ { -+ if (_M_data->_M_positive_sign_size) -+ delete [] _M_data->_M_positive_sign; -+ if (_M_data->_M_negative_sign_size -+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0) -+ delete [] _M_data->_M_negative_sign; -+ if (_M_data->_M_curr_symbol_size) -+ delete [] _M_data->_M_curr_symbol; -+ delete _M_data; -+ } -+#endif -+} ---- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc -+++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc -@@ -0,0 +1,160 @@ -+// std::numpunct implementation details, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions -+// -+ -+// Written by Benjamin Kosnik -+ -+#define _LIBC -+#include -+#undef _LIBC -+#include -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning tailor for stub locale support -+#endif -+#ifndef __UCLIBC_HAS_XLOCALE__ -+#define __nl_langinfo_l(N, L) nl_langinfo((N)) -+#endif -+ -+namespace std -+{ -+ template<> -+ void -+ numpunct::_M_initialize_numpunct(__c_locale __cloc) -+ { -+ if (!_M_data) -+ _M_data = new __numpunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_data->_M_grouping = ""; -+ _M_data->_M_grouping_size = 0; -+ _M_data->_M_use_grouping = false; -+ -+ _M_data->_M_decimal_point = '.'; -+ _M_data->_M_thousands_sep = ','; -+ -+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) -+ _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i]; -+ -+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) -+ _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j]; -+ } -+ else -+ { -+ // Named locale. -+ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT, -+ __cloc)); -+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP, -+ __cloc)); -+ -+ // Check for NULL, which implies no grouping. -+ if (_M_data->_M_thousands_sep == '\0') -+ _M_data->_M_grouping = ""; -+ else -+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); -+ } -+ -+ // NB: There is no way to extact this info from posix locales. -+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc); -+ _M_data->_M_truename = "true"; -+ _M_data->_M_truename_size = 4; -+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc); -+ _M_data->_M_falsename = "false"; -+ _M_data->_M_falsename_size = 5; -+ } -+ -+ template<> -+ numpunct::~numpunct() -+ { delete _M_data; } -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+ template<> -+ void -+ numpunct::_M_initialize_numpunct(__c_locale __cloc) -+ { -+ if (!_M_data) -+ _M_data = new __numpunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_data->_M_grouping = ""; -+ _M_data->_M_grouping_size = 0; -+ _M_data->_M_use_grouping = false; -+ -+ _M_data->_M_decimal_point = L'.'; -+ _M_data->_M_thousands_sep = L','; -+ -+ // Use ctype::widen code without the facet... -+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) -+ _M_data->_M_atoms_out[__i] = -+ static_cast(__num_base::_S_atoms_out[__i]); -+ -+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) -+ _M_data->_M_atoms_in[__j] = -+ static_cast(__num_base::_S_atoms_in[__j]); -+ } -+ else -+ { -+ // Named locale. -+ // NB: In the GNU model wchar_t is always 32 bit wide. -+ union { char *__s; wchar_t __w; } __u; -+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc); -+ _M_data->_M_decimal_point = __u.__w; -+ -+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc); -+ _M_data->_M_thousands_sep = __u.__w; -+ -+ if (_M_data->_M_thousands_sep == L'\0') -+ _M_data->_M_grouping = ""; -+ else -+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); -+ } -+ -+ // NB: There is no way to extact this info from posix locales. -+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc); -+ _M_data->_M_truename = L"true"; -+ _M_data->_M_truename_size = 4; -+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc); -+ _M_data->_M_falsename = L"false"; -+ _M_data->_M_falsename_size = 5; -+ } -+ -+ template<> -+ numpunct::~numpunct() -+ { delete _M_data; } -+ #endif -+} ---- gcc/libstdc++-v3/config/locale/uclibc/time_members.cc -+++ gcc/libstdc++-v3/config/locale/uclibc/time_members.cc -@@ -0,0 +1,406 @@ -+// std::time_get, std::time_put implementation, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions -+// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions -+// -+ -+// Written by Benjamin Kosnik -+ -+#include -+#include -+ -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning tailor for stub locale support -+#endif -+#ifndef __UCLIBC_HAS_XLOCALE__ -+#define __nl_langinfo_l(N, L) nl_langinfo((N)) -+#endif -+ -+namespace std -+{ -+ template<> -+ void -+ __timepunct:: -+ _M_put(char* __s, size_t __maxlen, const char* __format, -+ const tm* __tm) const -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm, -+ _M_c_locale_timepunct); -+#else -+ char* __old = strdup(setlocale(LC_ALL, NULL)); -+ setlocale(LC_ALL, _M_name_timepunct); -+ const size_t __len = strftime(__s, __maxlen, __format, __tm); -+ setlocale(LC_ALL, __old); -+ free(__old); -+#endif -+ // Make sure __s is null terminated. -+ if (__len == 0) -+ __s[0] = '\0'; -+ } -+ -+ template<> -+ void -+ __timepunct::_M_initialize_timepunct(__c_locale __cloc) -+ { -+ if (!_M_data) -+ _M_data = new __timepunct_cache; -+ -+ if (!__cloc) -+ { -+ // "C" locale -+ _M_c_locale_timepunct = _S_get_c_locale(); -+ -+ _M_data->_M_date_format = "%m/%d/%y"; -+ _M_data->_M_date_era_format = "%m/%d/%y"; -+ _M_data->_M_time_format = "%H:%M:%S"; -+ _M_data->_M_time_era_format = "%H:%M:%S"; -+ _M_data->_M_date_time_format = ""; -+ _M_data->_M_date_time_era_format = ""; -+ _M_data->_M_am = "AM"; -+ _M_data->_M_pm = "PM"; -+ _M_data->_M_am_pm_format = ""; -+ -+ // Day names, starting with "C"'s Sunday. -+ _M_data->_M_day1 = "Sunday"; -+ _M_data->_M_day2 = "Monday"; -+ _M_data->_M_day3 = "Tuesday"; -+ _M_data->_M_day4 = "Wednesday"; -+ _M_data->_M_day5 = "Thursday"; -+ _M_data->_M_day6 = "Friday"; -+ _M_data->_M_day7 = "Saturday"; -+ -+ // Abbreviated day names, starting with "C"'s Sun. -+ _M_data->_M_aday1 = "Sun"; -+ _M_data->_M_aday2 = "Mon"; -+ _M_data->_M_aday3 = "Tue"; -+ _M_data->_M_aday4 = "Wed"; -+ _M_data->_M_aday5 = "Thu"; -+ _M_data->_M_aday6 = "Fri"; -+ _M_data->_M_aday7 = "Sat"; -+ -+ // Month names, starting with "C"'s January. -+ _M_data->_M_month01 = "January"; -+ _M_data->_M_month02 = "February"; -+ _M_data->_M_month03 = "March"; -+ _M_data->_M_month04 = "April"; -+ _M_data->_M_month05 = "May"; -+ _M_data->_M_month06 = "June"; -+ _M_data->_M_month07 = "July"; -+ _M_data->_M_month08 = "August"; -+ _M_data->_M_month09 = "September"; -+ _M_data->_M_month10 = "October"; -+ _M_data->_M_month11 = "November"; -+ _M_data->_M_month12 = "December"; -+ -+ // Abbreviated month names, starting with "C"'s Jan. -+ _M_data->_M_amonth01 = "Jan"; -+ _M_data->_M_amonth02 = "Feb"; -+ _M_data->_M_amonth03 = "Mar"; -+ _M_data->_M_amonth04 = "Apr"; -+ _M_data->_M_amonth05 = "May"; -+ _M_data->_M_amonth06 = "Jun"; -+ _M_data->_M_amonth07 = "Jul"; -+ _M_data->_M_amonth08 = "Aug"; -+ _M_data->_M_amonth09 = "Sep"; -+ _M_data->_M_amonth10 = "Oct"; -+ _M_data->_M_amonth11 = "Nov"; -+ _M_data->_M_amonth12 = "Dec"; -+ } -+ else -+ { -+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc); -+ -+ _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc); -+ _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc); -+ _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc); -+ _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc); -+ _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc); -+ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT, -+ __cloc); -+ _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc); -+ _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc); -+ _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc); -+ -+ // Day names, starting with "C"'s Sunday. -+ _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc); -+ _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc); -+ _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc); -+ _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc); -+ _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc); -+ _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc); -+ _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc); -+ -+ // Abbreviated day names, starting with "C"'s Sun. -+ _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc); -+ _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc); -+ _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc); -+ _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc); -+ _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc); -+ _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc); -+ _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc); -+ -+ // Month names, starting with "C"'s January. -+ _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc); -+ _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc); -+ _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc); -+ _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc); -+ _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc); -+ _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc); -+ _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc); -+ _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc); -+ _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc); -+ _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc); -+ _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc); -+ _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc); -+ -+ // Abbreviated month names, starting with "C"'s Jan. -+ _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc); -+ _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc); -+ _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc); -+ _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc); -+ _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc); -+ _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc); -+ _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc); -+ _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc); -+ _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc); -+ _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc); -+ _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc); -+ _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc); -+ } -+ } -+ -+#ifdef _GLIBCXX_USE_WCHAR_T -+ template<> -+ void -+ __timepunct:: -+ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, -+ const tm* __tm) const -+ { -+#ifdef __UCLIBC_HAS_XLOCALE__ -+ __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct); -+ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm, -+ _M_c_locale_timepunct); -+#else -+ char* __old = strdup(setlocale(LC_ALL, NULL)); -+ setlocale(LC_ALL, _M_name_timepunct); -+ const size_t __len = wcsftime(__s, __maxlen, __format, __tm); -+ setlocale(LC_ALL, __old); -+ free(__old); -+#endif -+ // Make sure __s is null terminated. -+ if (__len == 0) -+ __s[0] = L'\0'; -+ } -+ -+ template<> -+ void -+ __timepunct::_M_initialize_timepunct(__c_locale __cloc) -+ { -+ if (!_M_data) -+ _M_data = new __timepunct_cache; -+ -+#warning wide time stuff -+// if (!__cloc) -+ { -+ // "C" locale -+ _M_c_locale_timepunct = _S_get_c_locale(); -+ -+ _M_data->_M_date_format = L"%m/%d/%y"; -+ _M_data->_M_date_era_format = L"%m/%d/%y"; -+ _M_data->_M_time_format = L"%H:%M:%S"; -+ _M_data->_M_time_era_format = L"%H:%M:%S"; -+ _M_data->_M_date_time_format = L""; -+ _M_data->_M_date_time_era_format = L""; -+ _M_data->_M_am = L"AM"; -+ _M_data->_M_pm = L"PM"; -+ _M_data->_M_am_pm_format = L""; -+ -+ // Day names, starting with "C"'s Sunday. -+ _M_data->_M_day1 = L"Sunday"; -+ _M_data->_M_day2 = L"Monday"; -+ _M_data->_M_day3 = L"Tuesday"; -+ _M_data->_M_day4 = L"Wednesday"; -+ _M_data->_M_day5 = L"Thursday"; -+ _M_data->_M_day6 = L"Friday"; -+ _M_data->_M_day7 = L"Saturday"; -+ -+ // Abbreviated day names, starting with "C"'s Sun. -+ _M_data->_M_aday1 = L"Sun"; -+ _M_data->_M_aday2 = L"Mon"; -+ _M_data->_M_aday3 = L"Tue"; -+ _M_data->_M_aday4 = L"Wed"; -+ _M_data->_M_aday5 = L"Thu"; -+ _M_data->_M_aday6 = L"Fri"; -+ _M_data->_M_aday7 = L"Sat"; -+ -+ // Month names, starting with "C"'s January. -+ _M_data->_M_month01 = L"January"; -+ _M_data->_M_month02 = L"February"; -+ _M_data->_M_month03 = L"March"; -+ _M_data->_M_month04 = L"April"; -+ _M_data->_M_month05 = L"May"; -+ _M_data->_M_month06 = L"June"; -+ _M_data->_M_month07 = L"July"; -+ _M_data->_M_month08 = L"August"; -+ _M_data->_M_month09 = L"September"; -+ _M_data->_M_month10 = L"October"; -+ _M_data->_M_month11 = L"November"; -+ _M_data->_M_month12 = L"December"; -+ -+ // Abbreviated month names, starting with "C"'s Jan. -+ _M_data->_M_amonth01 = L"Jan"; -+ _M_data->_M_amonth02 = L"Feb"; -+ _M_data->_M_amonth03 = L"Mar"; -+ _M_data->_M_amonth04 = L"Apr"; -+ _M_data->_M_amonth05 = L"May"; -+ _M_data->_M_amonth06 = L"Jun"; -+ _M_data->_M_amonth07 = L"Jul"; -+ _M_data->_M_amonth08 = L"Aug"; -+ _M_data->_M_amonth09 = L"Sep"; -+ _M_data->_M_amonth10 = L"Oct"; -+ _M_data->_M_amonth11 = L"Nov"; -+ _M_data->_M_amonth12 = L"Dec"; -+ } -+#if 0 -+ else -+ { -+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc); -+ -+ union { char *__s; wchar_t *__w; } __u; -+ -+ __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc); -+ _M_data->_M_date_format = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc); -+ _M_data->_M_date_era_format = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc); -+ _M_data->_M_time_format = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc); -+ _M_data->_M_time_era_format = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc); -+ _M_data->_M_date_time_format = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc); -+ _M_data->_M_date_time_era_format = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc); -+ _M_data->_M_am = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc); -+ _M_data->_M_pm = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc); -+ _M_data->_M_am_pm_format = __u.__w; -+ -+ // Day names, starting with "C"'s Sunday. -+ __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc); -+ _M_data->_M_day1 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc); -+ _M_data->_M_day2 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc); -+ _M_data->_M_day3 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc); -+ _M_data->_M_day4 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc); -+ _M_data->_M_day5 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc); -+ _M_data->_M_day6 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc); -+ _M_data->_M_day7 = __u.__w; -+ -+ // Abbreviated day names, starting with "C"'s Sun. -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc); -+ _M_data->_M_aday1 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc); -+ _M_data->_M_aday2 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc); -+ _M_data->_M_aday3 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc); -+ _M_data->_M_aday4 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc); -+ _M_data->_M_aday5 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc); -+ _M_data->_M_aday6 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc); -+ _M_data->_M_aday7 = __u.__w; -+ -+ // Month names, starting with "C"'s January. -+ __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc); -+ _M_data->_M_month01 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc); -+ _M_data->_M_month02 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc); -+ _M_data->_M_month03 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc); -+ _M_data->_M_month04 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc); -+ _M_data->_M_month05 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc); -+ _M_data->_M_month06 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc); -+ _M_data->_M_month07 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc); -+ _M_data->_M_month08 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc); -+ _M_data->_M_month09 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc); -+ _M_data->_M_month10 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc); -+ _M_data->_M_month11 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc); -+ _M_data->_M_month12 = __u.__w; -+ -+ // Abbreviated month names, starting with "C"'s Jan. -+ __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc); -+ _M_data->_M_amonth01 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc); -+ _M_data->_M_amonth02 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc); -+ _M_data->_M_amonth03 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc); -+ _M_data->_M_amonth04 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc); -+ _M_data->_M_amonth05 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc); -+ _M_data->_M_amonth06 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc); -+ _M_data->_M_amonth07 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc); -+ _M_data->_M_amonth08 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc); -+ _M_data->_M_amonth09 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc); -+ _M_data->_M_amonth10 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc); -+ _M_data->_M_amonth11 = __u.__w; -+ __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc); -+ _M_data->_M_amonth12 = __u.__w; -+ } -+#endif // 0 -+ } -+#endif -+} ---- gcc/libstdc++-v3/config/locale/uclibc/time_members.h -+++ gcc/libstdc++-v3/config/locale/uclibc/time_members.h -@@ -0,0 +1,68 @@ -+// std::time_get, std::time_put implementation, GNU version -*- C++ -*- -+ -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -+// -+// This file is part of the GNU ISO C++ Library. This library is free -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.2.5.1.2 - time_get functions -+// ISO C++ 14882: 22.2.5.3.2 - time_put functions -+// -+ -+// Written by Benjamin Kosnik -+ -+ template -+ __timepunct<_CharT>::__timepunct(size_t __refs) -+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), -+ _M_name_timepunct(_S_get_c_name()) -+ { _M_initialize_timepunct(); } -+ -+ template -+ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) -+ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), -+ _M_name_timepunct(_S_get_c_name()) -+ { _M_initialize_timepunct(); } -+ -+ template -+ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, -+ size_t __refs) -+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), -+ _M_name_timepunct(__s) -+ { -+ char* __tmp = new char[std::strlen(__s) + 1]; -+ std::strcpy(__tmp, __s); -+ _M_name_timepunct = __tmp; -+ _M_initialize_timepunct(__cloc); -+ } -+ -+ template -+ __timepunct<_CharT>::~__timepunct() -+ { -+ if (_M_name_timepunct != _S_get_c_name()) -+ delete [] _M_name_timepunct; -+ delete _M_data; -+ _S_destroy_c_locale(_M_c_locale_timepunct); -+ } ---- gcc/libstdc++-v3/configure -+++ gcc/libstdc++-v3/configure -@@ -5764,7 +5764,7 @@ - enableval="$enable_clocale" - - case "$enableval" in -- generic|gnu|ieee_1003.1-2001|yes|no|auto) ;; -+ generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;; - *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5 - echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;} - { (exit 1); exit 1; }; } ;; -@@ -5789,6 +5789,9 @@ - # Default to "generic". - if test $enable_clocale_flag = auto; then - case ${target_os} in -+ linux-uclibc*) -+ enable_clocale_flag=uclibc -+ ;; - linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ -@@ -6019,6 +6022,76 @@ - CTIME_CC=config/locale/generic/time_members.cc - CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h - ;; -+ uclibc) -+ echo "$as_me:$LINENO: result: uclibc" >&5 -+echo "${ECHO_T}uclibc" >&6 -+ -+ # Declare intention to use gettext, and add support for specific -+ # languages. -+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT -+ ALL_LINGUAS="de fr" -+ -+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. -+ # Extract the first word of "msgfmt", so it can be a program name with args. -+set dummy msgfmt; ac_word=$2 -+echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+if test "${ac_cv_prog_check_msgfmt+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ if test -n "$check_msgfmt"; then -+ ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_check_msgfmt="yes" -+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+ -+ test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no" -+fi -+fi -+check_msgfmt=$ac_cv_prog_check_msgfmt -+if test -n "$check_msgfmt"; then -+ echo "$as_me:$LINENO: result: $check_msgfmt" >&5 -+echo "${ECHO_T}$check_msgfmt" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+ -+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then -+ USE_NLS=yes -+ fi -+ # Export the build objects. -+ for ling in $ALL_LINGUAS; do \ -+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ -+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ -+ done -+ -+ -+ -+ CLOCALE_H=config/locale/uclibc/c_locale.h -+ CLOCALE_CC=config/locale/uclibc/c_locale.cc -+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc -+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc -+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc -+ CMESSAGES_H=config/locale/uclibc/messages_members.h -+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc -+ CMONEY_CC=config/locale/uclibc/monetary_members.cc -+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc -+ CTIME_H=config/locale/uclibc/time_members.h -+ CTIME_CC=config/locale/uclibc/time_members.cc -+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h -+ ;; - esac - - # This is where the testsuite looks for locale catalogs, using the ---- gcc/libstdc++-v3/include/c_compatibility/wchar.h -+++ gcc/libstdc++-v3/include/c_compatibility/wchar.h -@@ -101,7 +101,9 @@ - using std::wmemcpy; - using std::wmemmove; - using std::wmemset; -+#if _GLIBCXX_HAVE_WCSFTIME - using std::wcsftime; -+#endif - - #if _GLIBCXX_USE_C99 - using std::wcstold; ---- gcc/libstdc++-v3/include/c_std/std_cwchar.h -+++ gcc/libstdc++-v3/include/c_std/std_cwchar.h -@@ -182,7 +182,9 @@ - using ::wcscoll; - using ::wcscpy; - using ::wcscspn; -+#if _GLIBCXX_HAVE_WCSFTIME - using ::wcsftime; -+#endif - using ::wcslen; - using ::wcsncat; - using ::wcsncmp; diff --git a/toolchain/gcc/4.2.4/203-uclibc-locale-no__x.patch b/toolchain/gcc/4.2.4/203-uclibc-locale-no__x.patch deleted file mode 100644 index 6ba47003b3..0000000000 --- a/toolchain/gcc/4.2.4/203-uclibc-locale-no__x.patch +++ /dev/null @@ -1,213 +0,0 @@ ---- gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2006-03-10 15:32:37 +0100 -@@ -60,4 +60,49 @@ - extern "C" __typeof(wctype_l) __wctype_l; - #endif - -+# define __nl_langinfo_l nl_langinfo_l -+# define __strcoll_l strcoll_l -+# define __strftime_l strftime_l -+# define __strtod_l strtod_l -+# define __strtof_l strtof_l -+# define __strtold_l strtold_l -+# define __strxfrm_l strxfrm_l -+# define __newlocale newlocale -+# define __freelocale freelocale -+# define __duplocale duplocale -+# define __uselocale uselocale -+ -+# ifdef _GLIBCXX_USE_WCHAR_T -+# define __iswctype_l iswctype_l -+# define __towlower_l towlower_l -+# define __towupper_l towupper_l -+# define __wcscoll_l wcscoll_l -+# define __wcsftime_l wcsftime_l -+# define __wcsxfrm_l wcsxfrm_l -+# define __wctype_l wctype_l -+# endif -+ -+#else -+# define __nl_langinfo_l(N, L) nl_langinfo((N)) -+# define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) -+# define __strtod_l(S, E, L) strtod((S), (E)) -+# define __strtof_l(S, E, L) strtof((S), (E)) -+# define __strtold_l(S, E, L) strtold((S), (E)) -+# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) -+# warning should dummy __newlocale check for C|POSIX ? -+# define __newlocale(a, b, c) NULL -+# define __freelocale(a) ((void)0) -+# define __duplocale(a) __c_locale() -+//# define __uselocale ? -+// -+# ifdef _GLIBCXX_USE_WCHAR_T -+# define __iswctype_l(C, M, L) iswctype((C), (M)) -+# define __towlower_l(C, L) towlower((C)) -+# define __towupper_l(C, L) towupper((C)) -+# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) -+//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T)) -+# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) -+# define __wctype_l(S, L) wctype((S)) -+# endif -+ - #endif // GLIBC 2.3 and later ---- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-10 15:32:37 +0100 -@@ -39,20 +39,6 @@ - #include - #include - --#ifndef __UCLIBC_HAS_XLOCALE__ --#define __strtol_l(S, E, B, L) strtol((S), (E), (B)) --#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B)) --#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B)) --#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B)) --#define __strtof_l(S, E, L) strtof((S), (E)) --#define __strtod_l(S, E, L) strtod((S), (E)) --#define __strtold_l(S, E, L) strtold((S), (E)) --#warning should dummy __newlocale check for C|POSIX ? --#define __newlocale(a, b, c) NULL --#define __freelocale(a) ((void)0) --#define __duplocale(a) __c_locale() --#endif -- - namespace std - { - template<> ---- gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc 2006-03-10 15:32:37 +0100 -@@ -36,13 +36,6 @@ - #include - #include - --#ifndef __UCLIBC_HAS_XLOCALE__ --#define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) --#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) --#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) --#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) --#endif -- - namespace std - { - // These are basically extensions to char_traits, and perhaps should ---- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:32:37 +0100 -@@ -43,10 +43,6 @@ - #warning tailor for stub locale support - #endif - --#ifndef __UCLIBC_HAS_XLOCALE__ --#define __nl_langinfo_l(N, L) nl_langinfo((N)) --#endif -- - namespace std - { - // Construct and return valid pattern consisting of some combination of: ---- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:32:37 +0100 -@@ -41,9 +41,6 @@ - #ifdef __UCLIBC_MJN3_ONLY__ - #warning tailor for stub locale support - #endif --#ifndef __UCLIBC_HAS_XLOCALE__ --#define __nl_langinfo_l(N, L) nl_langinfo((N)) --#endif - - namespace std - { ---- gcc/libstdc++-v3/config/locale/uclibc/time_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/time_members.cc 2006-03-10 15:32:37 +0100 -@@ -40,9 +40,6 @@ - #ifdef __UCLIBC_MJN3_ONLY__ - #warning tailor for stub locale support - #endif --#ifndef __UCLIBC_HAS_XLOCALE__ --#define __nl_langinfo_l(N, L) nl_langinfo((N)) --#endif - - namespace std - { ---- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-10 15:32:37 +0100 -@@ -38,13 +38,6 @@ - #undef _LIBC - #include - --#ifndef __UCLIBC_HAS_XLOCALE__ --#define __wctype_l(S, L) wctype((S)) --#define __towupper_l(C, L) towupper((C)) --#define __towlower_l(C, L) towlower((C)) --#define __iswctype_l(C, M, L) iswctype((C), (M)) --#endif -- - namespace std - { - // NB: The other ctype specializations are in src/locale.cc and ---- gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc 2006-03-10 15:32:37 +0100 -@@ -39,13 +39,10 @@ - #ifdef __UCLIBC_MJN3_ONLY__ - #warning fix gettext stuff - #endif --#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ --extern "C" char *__dcgettext(const char *domainname, -- const char *msgid, int category); - #undef gettext --#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES) -+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ -+#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES) - #else --#undef gettext - #define gettext(msgid) (msgid) - #endif - ---- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-03-10 15:32:37 +0100 -@@ -36,15 +36,11 @@ - #ifdef __UCLIBC_MJN3_ONLY__ - #warning fix prototypes for *textdomain funcs - #endif --#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ --extern "C" char *__textdomain(const char *domainname); --extern "C" char *__bindtextdomain(const char *domainname, -- const char *dirname); --#else --#undef __textdomain --#undef __bindtextdomain --#define __textdomain(D) ((void)0) --#define __bindtextdomain(D,P) ((void)0) -+#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__ -+#undef textdomain -+#undef bindtextdomain -+#define textdomain(D) ((void)0) -+#define bindtextdomain(D,P) ((void)0) - #endif - - // Non-virtual member functions. -@@ -70,7 +66,7 @@ - messages<_CharT>::open(const basic_string& __s, const locale& __loc, - const char* __dir) const - { -- __bindtextdomain(__s.c_str(), __dir); -+ bindtextdomain(__s.c_str(), __dir); - return this->do_open(__s, __loc); - } - -@@ -90,7 +86,7 @@ - { - // No error checking is done, assume the catalog exists and can - // be used. -- __textdomain(__s.c_str()); -+ textdomain(__s.c_str()); - return 0; - } - ---- gcc/libstdc++-v3/config/locale/uclibc/c_locale.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-03-10 15:32:37 +0100 -@@ -68,6 +68,7 @@ - { - extern "C" __typeof(uselocale) __uselocale; - } -+#define __uselocale uselocale - #endif - - namespace std diff --git a/toolchain/gcc/4.2.4/204-uclibc-locale-wchar_fix.patch b/toolchain/gcc/4.2.4/204-uclibc-locale-wchar_fix.patch deleted file mode 100644 index 160ab35bb3..0000000000 --- a/toolchain/gcc/4.2.4/204-uclibc-locale-wchar_fix.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200_wchar~ 2006-03-10 15:32:37 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:37:27 +0100 -@@ -401,7 +401,7 @@ - # ifdef __UCLIBC_HAS_XLOCALE__ - _M_data->_M_decimal_point = __cloc->decimal_point_wc; - _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; --# else -+# elif defined __UCLIBC_HAS_LOCALE__ - _M_data->_M_decimal_point = __global_locale->decimal_point_wc; - _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; - # endif -@@ -556,7 +556,7 @@ - # ifdef __UCLIBC_HAS_XLOCALE__ - _M_data->_M_decimal_point = __cloc->decimal_point_wc; - _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; --# else -+# elif defined __UCLIBC_HAS_LOCALE__ - _M_data->_M_decimal_point = __global_locale->decimal_point_wc; - _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; - # endif ---- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200_wchar~ 2006-03-10 15:32:37 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:37:27 +0100 -@@ -127,12 +127,25 @@ - { - // Named locale. - // NB: In the GNU model wchar_t is always 32 bit wide. -+#ifdef __UCLIBC_MJN3_ONLY__ -+#warning fix this... should be numeric -+#endif -+#ifdef __UCLIBC__ -+# ifdef __UCLIBC_HAS_XLOCALE__ -+ _M_data->_M_decimal_point = __cloc->decimal_point_wc; -+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; -+# elif defined __UCLIBC_HAS_LOCALE__ -+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; -+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; -+# endif -+#else - union { char *__s; wchar_t __w; } __u; - __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc); - _M_data->_M_decimal_point = __u.__w; - - __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc); - _M_data->_M_thousands_sep = __u.__w; -+#endif - - if (_M_data->_M_thousands_sep == L'\0') - _M_data->_M_grouping = ""; diff --git a/toolchain/gcc/4.2.4/205-uclibc-locale-update.patch b/toolchain/gcc/4.2.4/205-uclibc-locale-update.patch deleted file mode 100644 index 86b2844554..0000000000 --- a/toolchain/gcc/4.2.4/205-uclibc-locale-update.patch +++ /dev/null @@ -1,347 +0,0 @@ ---- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc.uclibc200_update~ 2006-03-10 15:32:37 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-10 15:39:14 +0100 -@@ -46,16 +47,13 @@ - __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, - const __c_locale& __cloc) - { -- if (!(__err & ios_base::failbit)) -- { -- char* __sanity; -- errno = 0; -- float __f = __strtof_l(__s, &__sanity, __cloc); -- if (__sanity != __s && errno != ERANGE) -- __v = __f; -- else -- __err |= ios_base::failbit; -- } -+ char* __sanity; -+ errno = 0; -+ float __f = __strtof_l(__s, &__sanity, __cloc); -+ if (__sanity != __s && errno != ERANGE) -+ __v = __f; -+ else -+ __err |= ios_base::failbit; - } - - template<> -@@ -63,16 +61,13 @@ - __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, - const __c_locale& __cloc) - { -- if (!(__err & ios_base::failbit)) -- { -- char* __sanity; -- errno = 0; -- double __d = __strtod_l(__s, &__sanity, __cloc); -- if (__sanity != __s && errno != ERANGE) -- __v = __d; -- else -- __err |= ios_base::failbit; -- } -+ char* __sanity; -+ errno = 0; -+ double __d = __strtod_l(__s, &__sanity, __cloc); -+ if (__sanity != __s && errno != ERANGE) -+ __v = __d; -+ else -+ __err |= ios_base::failbit; - } - - template<> -@@ -80,16 +75,13 @@ - __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err, - const __c_locale& __cloc) - { -- if (!(__err & ios_base::failbit)) -- { -- char* __sanity; -- errno = 0; -- long double __ld = __strtold_l(__s, &__sanity, __cloc); -- if (__sanity != __s && errno != ERANGE) -- __v = __ld; -- else -- __err |= ios_base::failbit; -- } -+ char* __sanity; -+ errno = 0; -+ long double __ld = __strtold_l(__s, &__sanity, __cloc); -+ if (__sanity != __s && errno != ERANGE) -+ __v = __ld; -+ else -+ __err |= ios_base::failbit; - } - - void -@@ -110,7 +102,7 @@ - void - locale::facet::_S_destroy_c_locale(__c_locale& __cloc) - { -- if (_S_get_c_locale() != __cloc) -+ if (__cloc && _S_get_c_locale() != __cloc) - __freelocale(__cloc); - } - ---- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc.uclibc200_update~ 2006-03-10 15:32:37 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-10 15:39:14 +0100 -@@ -33,9 +33,14 @@ - - // Written by Benjamin Kosnik - -+#include -+#ifdef __UCLIBC_HAS_LOCALE__ - #define _LIBC - #include - #undef _LIBC -+#else -+#include -+#endif - #include - - namespace std -@@ -138,20 +143,34 @@ - ctype:: - do_is(mask __m, wchar_t __c) const - { -- // Highest bitmask in ctype_base == 10, but extra in "C" -- // library for blank. -+ // The case of __m == ctype_base::space is particularly important, -+ // due to its use in many istream functions. Therefore we deal with -+ // it first, exploiting the knowledge that on GNU systems _M_bit[5] -+ // is the mask corresponding to ctype_base::space. NB: an encoding -+ // change would not affect correctness! - bool __ret = false; -- const size_t __bitmasksize = 11; -- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) -- if (__m & _M_bit[__bitcur] -- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) -- { -- __ret = true; -- break; -- } -+ if (__m == _M_bit[5]) -+ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype); -+ else -+ { -+ // Highest bitmask in ctype_base == 10, but extra in "C" -+ // library for blank. -+ const size_t __bitmasksize = 11; -+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) -+ if (__m & _M_bit[__bitcur]) -+ { -+ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) -+ { -+ __ret = true; -+ break; -+ } -+ else if (__m == _M_bit[__bitcur]) -+ break; -+ } -+ } - return __ret; - } -- -+ - const wchar_t* - ctype:: - do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const ---- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h.uclibc200_update~ 2006-03-10 15:32:37 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-03-10 15:39:14 +0100 -@@ -47,18 +47,21 @@ - template - messages<_CharT>::messages(size_t __refs) - : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), -- _M_name_messages(_S_get_c_name()) -+ _M_name_messages(_S_get_c_name()) - { } - - template - messages<_CharT>::messages(__c_locale __cloc, const char* __s, - size_t __refs) -- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)), -- _M_name_messages(__s) -+ : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL) - { -- char* __tmp = new char[std::strlen(__s) + 1]; -- std::strcpy(__tmp, __s); -+ const size_t __len = std::strlen(__s) + 1; -+ char* __tmp = new char[__len]; -+ std::memcpy(__tmp, __s, __len); - _M_name_messages = __tmp; -+ -+ // Last to avoid leaking memory if new throws. -+ _M_c_locale_messages = _S_clone_c_locale(__cloc); - } - - template ---- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200_update~ 2006-03-10 15:37:27 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:39:14 +0100 -@@ -33,9 +33,14 @@ - - // Written by Benjamin Kosnik - -+#include -+#ifdef __UCLIBC_HAS_LOCALE__ - #define _LIBC - #include - #undef _LIBC -+#else -+#include -+#endif - #include - - #ifdef __UCLIBC_MJN3_ONLY__ -@@ -206,7 +211,7 @@ - } - break; - default: -- ; -+ __ret = pattern(); - } - return __ret; - } ---- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200_update~ 2006-03-10 15:37:27 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:39:14 +0100 -@@ -33,9 +33,14 @@ - - // Written by Benjamin Kosnik - -+#include -+#ifdef __UCLIBC_HAS_LOCALE__ - #define _LIBC - #include - #undef _LIBC -+#else -+#include -+#endif - #include - - #ifdef __UCLIBC_MJN3_ONLY__ ---- gcc/libstdc++-v3/config/locale/uclibc/time_members.h.uclibc200_update~ 2006-03-10 15:06:17 +0100 -+++ gcc/libstdc++-v3/config/locale/uclibc/time_members.h 2006-03-10 15:39:14 +0100 -@@ -37,25 +37,33 @@ - template - __timepunct<_CharT>::__timepunct(size_t __refs) - : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), -- _M_name_timepunct(_S_get_c_name()) -+ _M_name_timepunct(_S_get_c_name()) - { _M_initialize_timepunct(); } - - template - __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) - : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), -- _M_name_timepunct(_S_get_c_name()) -+ _M_name_timepunct(_S_get_c_name()) - { _M_initialize_timepunct(); } - - template - __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, - size_t __refs) - : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), -- _M_name_timepunct(__s) -+ _M_name_timepunct(NULL) - { -- char* __tmp = new char[std::strlen(__s) + 1]; -- std::strcpy(__tmp, __s); -+ const size_t __len = std::strlen(__s) + 1; -+ char* __tmp = new char[__len]; -+ std::memcpy(__tmp, __s, __len); - _M_name_timepunct = __tmp; -- _M_initialize_timepunct(__cloc); -+ -+ try -+ { _M_initialize_timepunct(__cloc); } -+ catch(...) -+ { -+ delete [] _M_name_timepunct; -+ __throw_exception_again; -+ } - } - - template ---- gcc-4.2/libstdc++-v3/config/locale/uclibc/c_locale.h.old 2006-09-28 11:39:00.000000000 +0200 -+++ gcc-4.2/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-09-28 12:10:41.000000000 +0200 -@@ -39,21 +39,23 @@ - #pragma GCC system_header - - #include // get std::strlen --#include // get std::snprintf or std::sprintf -+#include // get std::vsnprintf or std::vsprintf - #include - #include // For codecvt - #ifdef __UCLIBC_MJN3_ONLY__ - #warning fix this - #endif --#ifdef __UCLIBC_HAS_LOCALE__ -+#ifdef _GLIBCXX_USE_ICONV - #include // For codecvt using iconv, iconv_t - #endif --#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ --#include // For messages -+#ifdef HAVE_LIBINTL_H -+#include // For messages - #endif -+#include - - #ifdef __UCLIBC_MJN3_ONLY__ - #warning what is _GLIBCXX_C_LOCALE_GNU for -+// psm: used in os/gnu-linux/ctype_noninline.h - #endif - #define _GLIBCXX_C_LOCALE_GNU 1 - -@@ -62,7 +64,7 @@ - #endif - // #define _GLIBCXX_NUM_CATEGORIES 6 - #define _GLIBCXX_NUM_CATEGORIES 0 -- -+ - #ifdef __UCLIBC_HAS_XLOCALE__ - namespace __gnu_cxx - { -@@ -79,22 +81,24 @@ - typedef int* __c_locale; - #endif - -- // Convert numeric value of type _Tv to string and return length of -- // string. If snprintf is available use it, otherwise fall back to -- // the unsafe sprintf which, in general, can be dangerous and should -+ // Convert numeric value of type double to string and return length of -+ // string. If vsnprintf is available use it, otherwise fall back to -+ // the unsafe vsprintf which, in general, can be dangerous and should - // be avoided. -- template -- int -- __convert_from_v(char* __out, -- const int __size __attribute__ ((__unused__)), -- const char* __fmt, --#ifdef __UCLIBC_HAS_XCLOCALE__ -- _Tv __v, const __c_locale& __cloc, int __prec) -+ inline int -+ __convert_from_v(const __c_locale& -+#ifndef __UCLIBC_HAS_XCLOCALE__ -+ __cloc __attribute__ ((__unused__)) -+#endif -+ , -+ char* __out, -+ const int __size, -+ const char* __fmt, ...) - { -+ va_list __args; -+#ifdef __UCLIBC_HAS_XCLOCALE__ - __c_locale __old = __gnu_cxx::__uselocale(__cloc); - #else -- _Tv __v, const __c_locale&, int __prec) -- { - # ifdef __UCLIBC_HAS_LOCALE__ - char* __old = std::setlocale(LC_ALL, NULL); - char* __sav = new char[std::strlen(__old) + 1]; -@@ -103,7 +107,9 @@ - # endif - #endif - -- const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v); -+ va_start(__args, __fmt); -+ const int __ret = std::vsnprintf(__out, __size, __fmt, __args); -+ va_end(__args); - - #ifdef __UCLIBC_HAS_XCLOCALE__ - __gnu_cxx::__uselocale(__old); diff --git a/toolchain/gcc/4.2.4/300-libstdc++-pic.patch b/toolchain/gcc/4.2.4/300-libstdc++-pic.patch deleted file mode 100644 index 560bcb237b..0000000000 --- a/toolchain/gcc/4.2.4/300-libstdc++-pic.patch +++ /dev/null @@ -1,50 +0,0 @@ -# DP: Build and install libstdc++_pic.a library. - ---- gcc/libstdc++-v3/src/Makefile.am -+++ gcc/libstdc++-v3/src/Makefile.am -@@ -214,6 +214,12 @@ - $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@ - - -+install-exec-local: -+ifeq ($(enable_shared),yes) -+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o -+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) -+endif -+ - # Added bits to build debug library. - if GLIBCXX_BUILD_DEBUG - all-local: build_debug ---- gcc/libstdc++-v3/src/Makefile.in -+++ gcc/libstdc++-v3/src/Makefile.in -@@ -627,7 +627,7 @@ - - install-data-am: install-data-local - --install-exec-am: install-toolexeclibLTLIBRARIES -+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local - - install-info: install-info-am - -@@ -660,6 +660,7 @@ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-data-local install-exec \ -+ install-exec-local \ - install-exec-am install-info install-info-am install-man \ - install-strip install-toolexeclibLTLIBRARIES installcheck \ - installcheck-am installdirs maintainer-clean \ -@@ -743,6 +743,13 @@ - install_debug: - (cd ${debugdir} && $(MAKE) \ - toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install) -+ -+install-exec-local: -+ifeq ($(enable_shared),yes) -+ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o -+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) -+endif -+ - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. - .NOEXPORT: diff --git a/toolchain/gcc/4.2.4/302-c99-snprintf.patch b/toolchain/gcc/4.2.4/302-c99-snprintf.patch deleted file mode 100644 index dfb22d681b..0000000000 --- a/toolchain/gcc/4.2.4/302-c99-snprintf.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500 -+++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500 -@@ -142,7 +142,7 @@ - using ::vsprintf; - } - --#if _GLIBCXX_USE_C99 -+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__) - - #undef snprintf - #undef vfscanf diff --git a/toolchain/gcc/4.2.4/303-c99-complex-ugly-hack.patch b/toolchain/gcc/4.2.4/303-c99-complex-ugly-hack.patch deleted file mode 100644 index 2ccc80d9bb..0000000000 --- a/toolchain/gcc/4.2.4/303-c99-complex-ugly-hack.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500 -+++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500 -@@ -7194,6 +7194,9 @@ - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include -+#ifdef __UCLIBC__ -+#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs -+#endif - int - main () - { diff --git a/toolchain/gcc/4.2.4/304-index_macro.patch b/toolchain/gcc/4.2.4/304-index_macro.patch deleted file mode 100644 index d8e476555d..0000000000 --- a/toolchain/gcc/4.2.4/304-index_macro.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100 -+++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100 -@@ -59,6 +59,9 @@ - #include - #include - -+/* cope w/ index defined as macro, SuSv3 proposal */ -+#undef index -+ - # ifdef __GC - # define __GC_CONST const - # else ---- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100 -+++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100 -@@ -53,6 +53,9 @@ - #include // For uninitialized_copy_n - #include // For power - -+/* cope w/ index defined as macro, SuSv3 proposal */ -+#undef index -+ - _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) - - using std::size_t; diff --git a/toolchain/gcc/4.2.4/306-libstdc++-namespace.patch b/toolchain/gcc/4.2.4/306-libstdc++-namespace.patch deleted file mode 100644 index 69587ca63a..0000000000 --- a/toolchain/gcc/4.2.4/306-libstdc++-namespace.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h ---- gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-12-22 13:06:56.000000000 +0100 -+++ gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-12-22 15:23:41.000000000 +0100 -@@ -32,7 +32,8 @@ - // - - // Written by Benjamin Kosnik -- -+namespace std -+{ - #ifdef __UCLIBC_MJN3_ONLY__ - #warning fix prototypes for *textdomain funcs - #endif -@@ -115,3 +116,4 @@ - this->_S_create_c_locale(this->_M_c_locale_messages, __s); - } - } -+} -diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/time_members.h ---- gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2006-12-22 13:06:56.000000000 +0100 -+++ gcc-4.2/libstdc++-v3/config/locale/uclibc/time_members.h 2006-12-22 15:20:31.000000000 +0100 -@@ -33,7 +33,8 @@ - // - - // Written by Benjamin Kosnik -- -+namespace std -+{ - template - __timepunct<_CharT>::__timepunct(size_t __refs) - : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), -@@ -74,3 +75,4 @@ - delete _M_data; - _S_destroy_c_locale(_M_c_locale_timepunct); - } -+} diff --git a/toolchain/gcc/4.2.4/307-locale_facets.patch b/toolchain/gcc/4.2.4/307-locale_facets.patch deleted file mode 100644 index 412f8657dc..0000000000 --- a/toolchain/gcc/4.2.4/307-locale_facets.patch +++ /dev/null @@ -1,26 +0,0 @@ -This patch fixes a bug into ostream::operator<<(double) due to the wrong size -passed into the __convert_from_v method. The wrong size is then passed to -std::snprintf function, that, on uClibc, doens't handle sized 0 buffer. - -Signed-off-by: Carmelo Amoroso - ---- gcc-4.2.1/libstdc++-v3/include/bits/locale_facets.tcc 2006-10-17 18:43:47.000000000 +0200 -+++ gcc-4.2.1-st/libstdc++-v3/include/bits/locale_facets.tcc 2007-08-22 18:54:23.000000000 +0200 -@@ -1143,7 +1143,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE - const int __cs_size = __fixed ? __max_exp + __prec + 4 - : __max_digits * 2 + __prec; - char* __cs = static_cast(__builtin_alloca(__cs_size)); -- __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, __fbuf, -+ __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf, - __prec, __v); - #endif - -@@ -1777,7 +1777,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE - // max_exponent10 + 1 for the integer part, + 2 for sign and '\0'. - const int __cs_size = numeric_limits::max_exponent10 + 3; - char* __cs = static_cast(__builtin_alloca(__cs_size)); -- int __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, "%.*Lf", -+ int __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, "%.*Lf", - 0, __units); - #endif - string_type __digits(__len, char_type()); diff --git a/toolchain/gcc/4.2.4/402-libbackend_dep_gcov-iov.h.patch b/toolchain/gcc/4.2.4/402-libbackend_dep_gcov-iov.h.patch deleted file mode 100644 index 0bf115c45d..0000000000 --- a/toolchain/gcc/4.2.4/402-libbackend_dep_gcov-iov.h.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: gcc-4.2/gcc/Makefile.in -=================================================================== ---- gcc-4.2/gcc/Makefile.in (revision 121758) -+++ gcc-4.2/gcc/Makefile.in (working copy) -@@ -2658,7 +2658,7 @@ mips-tdump.o : mips-tdump.c $(CONFIG_H) - # FIXME: writing proper dependencies for this is a *LOT* of work. - libbackend.o : $(OBJS-common:.o=.c) $(out_file) \ - insn-config.h insn-flags.h insn-codes.h insn-constants.h \ -- insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE) -+ insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE) gcov-iov.h - $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \ - -DTARGET_NAME=\"$(target_noncanonical)\" \ - -DLOCALEDIR=\"$(localedir)\" \ diff --git a/toolchain/gcc/4.2.4/800-arm-bigendian.patch b/toolchain/gcc/4.2.4/800-arm-bigendian.patch deleted file mode 100644 index 07c6093379..0000000000 --- a/toolchain/gcc/4.2.4/800-arm-bigendian.patch +++ /dev/null @@ -1,67 +0,0 @@ -By Lennert Buytenhek -Adds support for arm*b-linux* big-endian ARM targets - -See http://gcc.gnu.org/PR16350 - ---- gcc-4.2.0/gcc/config/arm/linux-elf.h -+++ gcc-4.2.0/gcc/config/arm/linux-elf.h -@@ -28,19 +28,33 @@ - #undef TARGET_VERSION - #define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr); - -+/* -+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-* -+ * (big endian) configurations. -+ */ -+#if TARGET_BIG_ENDIAN_DEFAULT -+#define TARGET_ENDIAN_DEFAULT MASK_BIG_END -+#define TARGET_ENDIAN_OPTION "mbig-endian" -+#define TARGET_LINKER_EMULATION "armelfb_linux" -+#else -+#define TARGET_ENDIAN_DEFAULT 0 -+#define TARGET_ENDIAN_OPTION "mlittle-endian" -+#define TARGET_LINKER_EMULATION "armelf_linux" -+#endif -+ - #undef TARGET_DEFAULT_FLOAT_ABI - #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD - - #undef TARGET_DEFAULT --#define TARGET_DEFAULT (0) -+#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT) - - #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6 - --#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p" -+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p" - - #undef MULTILIB_DEFAULTS - #define MULTILIB_DEFAULTS \ -- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" } -+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" } - - /* Now we define the strings used to build the spec file. */ - #undef LIB_SPEC -@@ -61,7 +75,7 @@ - %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "} \ - -X \ -- %{mbig-endian:-EB}" \ -+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \ - SUBTARGET_EXTRA_LINK_SPEC - - #undef LINK_SPEC ---- gcc-4.2.0/gcc/config.gcc.orig 2006-09-22 14:53:41.000000000 +0200 -+++ gcc-4.2.0/gcc/config.gcc 2006-09-25 10:45:21.000000000 +0200 -@@ -696,6 +696,11 @@ - tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" - tmake_file="${tmake_file} t-linux arm/t-arm" - case ${target} in -+ arm*b-*) -+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" -+ ;; -+ esac -+ case ${target} in - arm*-*-linux-*eabi) - tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h" - tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi" diff --git a/toolchain/gcc/4.2.4/904-flatten-switch-stmt-00.patch b/toolchain/gcc/4.2.4/904-flatten-switch-stmt-00.patch deleted file mode 100644 index 8fac37c4df..0000000000 --- a/toolchain/gcc/4.2.4/904-flatten-switch-stmt-00.patch +++ /dev/null @@ -1,153 +0,0 @@ -Hi, - -The attached patch makes sure that we create smaller object code for -simple switch statements. We just make sure to flatten the switch -statement into an if-else chain, basically. - -This fixes a size-regression as compared to gcc-3.4, as can be seen -below. - -2007-04-15 Bernhard Fischer <..> - - * stmt.c (expand_case): Do not create a complex binary tree when - optimizing for size but rather use the simple ordered list. - (emit_case_nodes): do not emit jumps to the default_label when - optimizing for size. - -Not regtested so far. -Comments? - -Attached is the test switch.c mentioned below. - -$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do -gcc-$i -DCHAIN -Os -o switch-CHAIN-$i.o -c switch.c ;done -$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do -gcc-$i -UCHAIN -Os -o switch-$i.o -c switch.c ;done - -$ size switch-*.o - text data bss dec hex filename - 169 0 0 169 a9 switch-2.95.o - 115 0 0 115 73 switch-3.3.o - 103 0 0 103 67 switch-3.4.o - 124 0 0 124 7c switch-4.0.o - 124 0 0 124 7c switch-4.1.o - 124 0 0 124 7c switch-4.2.orig-HEAD.o - 95 0 0 95 5f switch-4.3-HEAD.o - 124 0 0 124 7c switch-4.3.orig-HEAD.o - 166 0 0 166 a6 switch-CHAIN-2.95.o - 111 0 0 111 6f switch-CHAIN-3.3.o - 95 0 0 95 5f switch-CHAIN-3.4.o - 95 0 0 95 5f switch-CHAIN-4.0.o - 95 0 0 95 5f switch-CHAIN-4.1.o - 95 0 0 95 5f switch-CHAIN-4.2.orig-HEAD.o - 95 0 0 95 5f switch-CHAIN-4.3-HEAD.o - 95 0 0 95 5f switch-CHAIN-4.3.orig-HEAD.o - - -Content-Type: text/x-diff; charset=us-ascii -Content-Disposition: attachment; filename="gcc-4.3.gcc-flatten-switch-stmt.00.diff" - -Index: gcc-4.2.0/gcc/stmt.c -=================================================================== ---- gcc-4.2.0.orig/gcc/stmt.c (revision 123843) -+++ gcc-4.2.0/gcc/stmt.c (working copy) -@@ -2517,7 +2517,11 @@ expand_case (tree exp) - use_cost_table - = (TREE_CODE (orig_type) != ENUMERAL_TYPE - && estimate_case_costs (case_list)); -- balance_case_nodes (&case_list, NULL); -+ /* When optimizing for size, we want a straight list to avoid -+ jumps as much as possible. This basically creates an if-else -+ chain. */ -+ if (!optimize_size) -+ balance_case_nodes (&case_list, NULL); - emit_case_nodes (index, case_list, default_label, index_type); - emit_jump (default_label); - } -@@ -3075,6 +3079,7 @@ emit_case_nodes (rtx index, case_node_pt - { - if (!node_has_low_bound (node, index_type)) - { -+ if (!optimize_size) /* don't jl to the .default_label. */ - emit_cmp_and_jump_insns (index, - convert_modes - (mode, imode, - - -Content-Type: text/x-csrc; charset=us-ascii -Content-Disposition: attachment; filename="switch.c" - -int -commutative_tree_code (int code) -{ -#define CASE(val, ret) case val:/* __asm__("# val="#val ",ret="#ret);*/ return ret; -#ifndef CHAIN - switch (code) - { -# if 1 - CASE(1,3) - CASE(3,2) - CASE(5,8) - CASE(7,1) - CASE(33,4) - CASE(44,9) - CASE(55,10) - CASE(66,-1) - CASE(77,99) - CASE(666,0) -# else - case 1: - return 3; - case 3: - return 2; - case 5: - return 8; - case 7: - return 1; - case 33: - return 4; - case 44: - return 9; - case 55: - return 10; - case 66: - return -1; - case 77: - return 99; - case 666: - return 0; -# endif - default: - break; - } - return 4711; - -#else - if (code == 1) - return 3; - else if (code == 3) - return 2; - else if (code == 5) - return 8; - else if (code == 7) - return 1; - else if (code == 33) - return 4; - else if (code == 44) - return 9; - else if (code == 55) - return 10; - else if (code == 66) - return -1; - else if (code == 77) - return 99; - else if (code == 666) - return 0; - else - return 4711; -#endif -} - - ---AhhlLboLdkugWU4S-- - diff --git a/toolchain/gcc/4.2.4/910-soft-float.patch b/toolchain/gcc/4.2.4/910-soft-float.patch deleted file mode 100644 index 3f886acbf5..0000000000 --- a/toolchain/gcc/4.2.4/910-soft-float.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- gcc-4.2-20061205/gcc/config/arm/t-linux 2006-12-08 15:18:33.000000000 -0800 -+++ gcc-4.2-20061205/gcc/config/arm/t-linux 2006-12-08 15:18:33.000000000 -0800 -@@ -4,7 +4,10 @@ - LIBGCC2_DEBUG_CFLAGS = -g0 - - LIB1ASMSRC = arm/lib1funcs.asm --LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx -+LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \ -+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \ -+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \ -+ _fixsfsi _fixunssfsi _floatdidf _floatundidf _floatdisf _floatundisf - - # MULTILIB_OPTIONS = mhard-float/msoft-float - # MULTILIB_DIRNAMES = hard-float soft-float - ---- gcc-4.2-20061205/gcc/config/arm/linux-elf.h 2006-12-08 15:18:33.000000000 -0800 -+++ gcc-4.2-20061205/gcc/config/arm/linux-elf.h 2006-12-08 15:18:33.000000000 -0800 -@@ -63,7 +63,7 @@ - %{shared:-lc} \ - %{!shared:%{profile:-lc_p}%{!profile:-lc}}" - --#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc" -+#define LIBGCC_SPEC "-lgcc" - - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - diff --git a/toolchain/gcc/4.2.4/920-soft-float.patch b/toolchain/gcc/4.2.4/920-soft-float.patch deleted file mode 100644 index 4287bfae27..0000000000 --- a/toolchain/gcc/4.2.4/920-soft-float.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -uNpr gcc-4.2.1_orig/gcc/config/rs6000/darwin-ldouble.c gcc-4.2.1/gcc/config/rs6000/darwin-ldouble.c ---- gcc-4.2.1_orig/gcc/config/rs6000/darwin-ldouble.c 2007-03-05 11:54:00.000000000 -0500 -+++ gcc-4.2.1/gcc/config/rs6000/darwin-ldouble.c 2008-01-31 17:51:24.000000000 -0500 -@@ -70,6 +70,8 @@ Software Foundation, 51 Franklin Street, - but GCC currently generates poor code when a union is used to turn - a long double into a pair of doubles. */ - -+#if defined (_SOFT_FLOAT) && defined (__LONG_DOUBLE_128__) -+ - long double __gcc_qadd (double, double, double, double); - long double __gcc_qsub (double, double, double, double); - long double __gcc_qmul (double, double, double, double); -@@ -219,8 +221,6 @@ __gcc_qdiv (double a, double b, double c - return z.ldval; - } - --#if defined (_SOFT_FLOAT) && defined (__LONG_DOUBLE_128__) -- - long double __gcc_qneg (double, double); - int __gcc_qeq (double, double, double, double); - int __gcc_qne (double, double, double, double); diff --git a/toolchain/gcc/4.3.5/100-uclibc-conf.patch b/toolchain/gcc/4.3.5/100-uclibc-conf.patch deleted file mode 100644 index cca8c82292..0000000000 --- a/toolchain/gcc/4.3.5/100-uclibc-conf.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- gcc/gcc/config/--- gcc/contrib/regression/objs-gcc.sh -+++ gcc/contrib/regression/objs-gcc.sh -@@ -105,6 +105,10 @@ - then - make all-gdb all-dejagnu all-ld || exit 1 - make install-gdb install-dejagnu install-ld || exit 1 -+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] -+ then -+ make all-gdb all-dejagnu all-ld || exit 1 -+ make install-gdb install-dejagnu install-ld || exit 1 - elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then - make bootstrap || exit 1 - make install || exit 1 ---- gcc/libjava/classpath/ltconfig -+++ gcc/libjava/classpath/ltconfig -@@ -603,7 +603,7 @@ - - # Transform linux* to *-*-linux-gnu*, to support old configure scripts. - case $host_os in --linux-gnu*) ;; -+linux-gnu*|linux-uclibc*) ;; - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` - esac - -@@ -1251,7 +1251,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - version_type=linux - need_lib_prefix=no - need_version=no diff --git a/toolchain/gcc/4.3.5/104-gnuhurd-uclibc-conf.patch b/toolchain/gcc/4.3.5/104-gnuhurd-uclibc-conf.patch deleted file mode 100644 index c04dd9ff00..0000000000 --- a/toolchain/gcc/4.3.5/104-gnuhurd-uclibc-conf.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -rdup gcc-4.2.1.oorig/gcc/config.gcc gcc-4.2.1/gcc/config.gcc ---- gcc-4.2.1.oorig/gcc/config.gcc 2007-10-01 11:52:52.000000000 +0200 -+++ gcc-4.2.1/gcc/config.gcc 2007-10-01 13:22:12.000000000 +0200 -@@ -494,6 +494,9 @@ case ${target} in - alpha*) - tm_file="${cpu_type}/${cpu_type}.h alpha/elf.h alpha/linux.h alpha/linux-elf.h gnu.h ${tm_file}" - ;; -+ i[34567]86-*hurd*-*) -+ tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/gnu.h gnu.h ${tm_file}" -+ ;; - i[34567]86-*-*) - tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h gnu.h ${tm_file}" - ;; diff --git a/toolchain/gcc/4.4.5/100-uclibc-conf.patch b/toolchain/gcc/4.4.5/100-uclibc-conf.patch deleted file mode 100644 index cca8c82292..0000000000 --- a/toolchain/gcc/4.4.5/100-uclibc-conf.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- gcc/gcc/config/--- gcc/contrib/regression/objs-gcc.sh -+++ gcc/contrib/regression/objs-gcc.sh -@@ -105,6 +105,10 @@ - then - make all-gdb all-dejagnu all-ld || exit 1 - make install-gdb install-dejagnu install-ld || exit 1 -+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] -+ then -+ make all-gdb all-dejagnu all-ld || exit 1 -+ make install-gdb install-dejagnu install-ld || exit 1 - elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then - make bootstrap || exit 1 - make install || exit 1 ---- gcc/libjava/classpath/ltconfig -+++ gcc/libjava/classpath/ltconfig -@@ -603,7 +603,7 @@ - - # Transform linux* to *-*-linux-gnu*, to support old configure scripts. - case $host_os in --linux-gnu*) ;; -+linux-gnu*|linux-uclibc*) ;; - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` - esac - -@@ -1251,7 +1251,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - version_type=linux - need_lib_prefix=no - need_version=no diff --git a/toolchain/gcc/4.5.2/100-uclibc-conf.patch b/toolchain/gcc/4.5.2/100-uclibc-conf.patch deleted file mode 100644 index cca8c82292..0000000000 --- a/toolchain/gcc/4.5.2/100-uclibc-conf.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- gcc/gcc/config/--- gcc/contrib/regression/objs-gcc.sh -+++ gcc/contrib/regression/objs-gcc.sh -@@ -105,6 +105,10 @@ - then - make all-gdb all-dejagnu all-ld || exit 1 - make install-gdb install-dejagnu install-ld || exit 1 -+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] -+ then -+ make all-gdb all-dejagnu all-ld || exit 1 -+ make install-gdb install-dejagnu install-ld || exit 1 - elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then - make bootstrap || exit 1 - make install || exit 1 ---- gcc/libjava/classpath/ltconfig -+++ gcc/libjava/classpath/ltconfig -@@ -603,7 +603,7 @@ - - # Transform linux* to *-*-linux-gnu*, to support old configure scripts. - case $host_os in --linux-gnu*) ;; -+linux-gnu*|linux-uclibc*) ;; - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` - esac - -@@ -1251,7 +1251,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - version_type=linux - need_lib_prefix=no - need_version=no diff --git a/toolchain/gcc/4.5.2/850-arm-pr44392.patch b/toolchain/gcc/4.5.2/850-arm-pr44392.patch deleted file mode 100644 index 4ad6c448d9..0000000000 --- a/toolchain/gcc/4.5.2/850-arm-pr44392.patch +++ /dev/null @@ -1,70 +0,0 @@ ->From d0557763b0713a4c006bd2405eede3924569cafd Mon Sep 17 00:00:00 2001 -From: Ramana Radhakrishnan -Date: Mon, 5 Jul 2010 11:28:49 +0100 -Subject: [PATCH 2/2] Fix PR44392 - ---- - gcc/config/arm/arm.md | 43 +++++++++++++++++++------------------------ - 1 files changed, 19 insertions(+), 24 deletions(-) - -diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md -index 2096ec6..f0348f3 100644 ---- a/gcc/config/arm/arm.md -+++ b/gcc/config/arm/arm.md -@@ -11318,34 +11318,29 @@ - (define_expand "bswapsi2" - [(set (match_operand:SI 0 "s_register_operand" "=r") - (bswap:SI (match_operand:SI 1 "s_register_operand" "r")))] --"TARGET_EITHER" -+"TARGET_EITHER && (arm_arch6 || !optimize_size)" - " -- if (!arm_arch6) -- { -- if (!optimize_size) -- { -- rtx op2 = gen_reg_rtx (SImode); -- rtx op3 = gen_reg_rtx (SImode); -+ if (!arm_arch6) -+ { -+ rtx op2 = gen_reg_rtx (SImode); -+ rtx op3 = gen_reg_rtx (SImode); - -- if (TARGET_THUMB) -- { -- rtx op4 = gen_reg_rtx (SImode); -- rtx op5 = gen_reg_rtx (SImode); -+ if (TARGET_THUMB) -+ { -+ rtx op4 = gen_reg_rtx (SImode); -+ rtx op5 = gen_reg_rtx (SImode); - -- emit_insn (gen_thumb_legacy_rev (operands[0], operands[1], -- op2, op3, op4, op5)); -- } -- else -- { -- emit_insn (gen_arm_legacy_rev (operands[0], operands[1], -- op2, op3)); -- } -+ emit_insn (gen_thumb_legacy_rev (operands[0], operands[1], -+ op2, op3, op4, op5)); -+ } -+ else -+ { -+ emit_insn (gen_arm_legacy_rev (operands[0], operands[1], -+ op2, op3)); -+ } - -- DONE; -- } -- else -- FAIL; -- } -+ DONE; -+ } - " - ) - --- -1.6.2 - diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in deleted file mode 100644 index 7a1905fb55..0000000000 --- a/toolchain/gcc/Config.in +++ /dev/null @@ -1,118 +0,0 @@ -# Choose gcc version. - -comment "GCC Options" - -choice - prompt "GCC compiler Version" - default BR2_GCC_VERSION_4_3_X if !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 - default BR2_GCC_VERSION_4_4_X if BR2_sparc_sparchfleon || BR2_sparc_sparchfleonv8 || BR2_sparc_sparcsfleon || BR2_sparc_sparcsfleonv8 - default BR2_GCC_VERSION_4_2_2_AVR32_2_1_5 if BR2_avr32 - help - Select the version of gcc you wish to use. - - config BR2_GCC_VERSION_4_2_2_AVR32_2_1_5 - depends on BR2_avr32 - bool "gcc 4.2.2-avr32-2.1.5" - - config BR2_GCC_VERSION_4_2_4 - depends on !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 - bool "gcc 4.2.4" - - config BR2_GCC_VERSION_4_3_X - depends on !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 - bool "gcc 4.3.x" - - config BR2_GCC_VERSION_4_4_X - depends on !BR2_avr32 - bool "gcc 4.4.x" - - config BR2_GCC_VERSION_4_5_X - depends on !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 - bool "gcc 4.5.x" - - config BR2_GCC_VERSION_SNAP - depends on !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 - bool "gcc snapshot" -endchoice - -config BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE - bool - default y if !BR2_GCC_VERSION_4_2_1 && !BR2_GCC_VERSION_4_2_2 && !BR2_GCC_VERSION_4_2_3 && !BR2_GCC_VERSION_4_2_4 && !BR2_GCC_VERSION_4_2_2_AVR32_2_1_5 - -config BR2_GCC_SNAP_DATE - string "GCC snapshot date" - default "20070921" - depends on BR2_GCC_VERSION_SNAP - help - Enter snapshot date to use for gcc. Format is: - YYYYMMDD - -config BR2_GCC_VERSION - string - default "4.2.2-avr32-2.1.5" if BR2_GCC_VERSION_4_2_2_AVR32_2_1_5 - default "4.2.4" if BR2_GCC_VERSION_4_2_4 - default "4.3.5" if BR2_GCC_VERSION_4_3_X - default "4.4.5" if BR2_GCC_VERSION_4_4_X - default "4.5.2" if BR2_GCC_VERSION_4_5_X - default $BR2_GCC_SNAP_DATE if BR2_GCC_VERSION_SNAP - -config BR2_EXTRA_GCC_CONFIG_OPTIONS - string "Additional gcc options" - default "" - help - Any additional gcc configure options you may want to include.... - -config BR2_GCC_CROSS_OBJC - bool "Objective-C cross-compiler support" - depends on !BR2_avr32 - help - Build an Objective-C cross-compiler - -config BR2_GCC_CROSS_FORTRAN - bool "Fortran cross-compiler support" - depends on !BR2_avr32 - help - Build a Fortran cross-compiler - -config BR2_GCC_CROSS_JAVA - bool - -config BR2_INSTALL_LIBGCJ - bool "Build/install java compiler and libgcj?" - depends on !BR2_avr32 && BR2_INSTALL_LIBSTDCPP - select BR2_GCC_CROSS_JAVA - select BR2_LARGEFILE - depends on BROKEN - help - Build/install java compiler and libgcj? - -config BR2_INSTALL_OBJC - bool "Build/install Objective-C compiler and runtime?" - depends on !BR2_avr32 - help - Build/install Objective-C compiler and runtime? - -config BR2_INSTALL_FORTRAN - bool "Build/install Fortran compiler and runtime?" - depends on !BR2_avr32 - select BR2_PACKAGE_LIBMPFR - help - Build/install Fortran compiler and runtime? - Note that it is highly recommended NOT to use gfortran - from gcc older than 4.2.0 - -config BR2_GCC_SHARED_LIBGCC - bool "Build/install a shared libgcc?" - depends on !BR2_PREFER_STATIC_LIB - default y - depends on !BR2_sparc - help - Build/install a shared libgcc library - -config BR2_GCC_ENABLE_TLS - bool "Enable compiler tls support" - default y - depends on BR2_PTHREADS_NATIVE - help - Enable the compiler to generate code for accessing - thread local storage variables diff --git a/toolchain/gcc/Config.in.2 b/toolchain/gcc/Config.in.2 deleted file mode 100644 index 705506b689..0000000000 --- a/toolchain/gcc/Config.in.2 +++ /dev/null @@ -1,23 +0,0 @@ -config BR2_PACKAGE_GCC_TARGET - bool "native toolchain in the target filesystem" - depends on BR2_HAVE_DEVFILES - select BR2_PACKAGE_BINUTILS - select BR2_PACKAGE_BINUTILS_TARGET - select BR2_PACKAGE_MPC if BR2_GCC_VERSION_4_5_X - select BR2_PACKAGE_MPFR - select BR2_PACKAGE_GMP - help - If you want the target system to be able to run - binutils/gcc and compile native code, say Y here. - -config BR2_EXTRA_TARGET_GCC_CONFIG_OPTIONS - string "Additional target gcc options" - default "" - depends on BR2_PACKAGE_GCC_TARGET - help - Any additional target gcc options you may want to include.... - Including, but not limited to --disable-checking etc. - Refer to */configure in your gcc sources. - -comment "native toolchain needs development files in target filesystem" - depends on !BR2_HAVE_DEVFILES diff --git a/toolchain/gcc/Makefile.in b/toolchain/gcc/Makefile.in deleted file mode 100644 index 2e55ed0f7b..0000000000 --- a/toolchain/gcc/Makefile.in +++ /dev/null @@ -1,65 +0,0 @@ -# gcc has a bunch of options that need to be shared with -# both gcc-uclibc-4.x.mk, and are use by other packages... -# So include them in this file and arrange to include it -# soon after invoking make from the top level. - -GCC_VERSION:=$(call qstrip,$(BR2_GCC_VERSION)) -TARGET_OPTIMIZATION:=$(call qstrip,$(BR2_TARGET_OPTIMIZATION)) -EXTRA_GCC_CONFIG_OPTIONS:=$(call qstrip,$(BR2_EXTRA_GCC_CONFIG_OPTIONS)) - -ifeq ($(call qstrip,$(BR2_GCC_VERSION_SNAP)),y) -GCC_SNAP_DATE:=$(call qstrip,$(BR2_GCC_SNAP_DATE)) -else -GCC_SNAP_DATE:= -endif - -ifeq ($(BR2_SOFT_FLOAT),y) -SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft -ifeq ($(BR2_arm)$(BR2_armeb),y) # only set float-abi for arm -TARGET_SOFT_FLOAT:=-mfloat-abi=soft -else -TARGET_SOFT_FLOAT:=-msoft-float -endif -ARCH_FPU_SUFFIX:=_nofpu -else # no softfloat support -SOFT_FLOAT_CONFIG_OPTION:= -TARGET_SOFT_FLOAT:= -ARCH_FPU_SUFFIX:= -endif - -# some additional defaults -ifneq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),) -GCC_WITH_ARCH:=--with-arch=$(BR2_GCC_TARGET_ARCH) -endif -ifneq ($(call qstrip,$(BR2_GCC_TARGET_TUNE)),) -GCC_WITH_TUNE:=--with-tune=$(BR2_GCC_TARGET_TUNE) -endif -ifneq ($(call qstrip,$(BR2_GCC_TARGET_ABI)),) -GCC_WITH_ABI:=--with-abi=$(BR2_GCC_TARGET_ABI) -endif -ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU)),) -GCC_WITH_CPU:=--with-cpu=$(BR2_GCC_TARGET_CPU) -endif - -# AVR32 GCC configuration -ifeq ($(BR2_avr32),y) -EXTRA_GCC_CONFIG_OPTIONS+=--disable-libmudflap -SOFT_FLOAT_CONFIG_OPTION:= -endif - -ifeq ($(BR2_PACKAGE_GCC_TARGET),y) -EXTRA_TARGET_GCC_CONFIG_OPTIONS:= - -# AVR32 target GCC configuration -ifeq ($(BR2_avr32),y) -EXTRA_TARGET_GCC_CONFIG_OPTIONS+=--disable-libmudflap -EXTRA_TARGET_GCC_CONFIG_OPTIONS+=--with-build-time-tools=$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin \ -EXTRA_TARGET_GCC_CONFIG_OPTIONS+=--with-as=$(TARGET_CROSS)as -endif - - -# and finally pull in config opts from the user -EXTRA_TARGET_GCC_CONFIG_OPTIONS+=$(call qstrip,$(BR2_EXTRA_TARGET_GCC_CONFIG_OPTIONS)) - -TARGETS+=gcc_target -endif diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk deleted file mode 100644 index 96bebd616c..0000000000 --- a/toolchain/gcc/gcc-uclibc-4.x.mk +++ /dev/null @@ -1,568 +0,0 @@ -# Makefile for to build a gcc/uClibc toolchain -# -# Copyright (C) 2002-2003 Erik Andersen -# Copyright (C) 2004 Manuel Novoa III -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -ifneq ($(GCC_SNAP_DATE),) - GCC_SITE:=ftp://sources.redhat.com/pub/gcc/snapshots/$(GCC_VERSION) -else ifeq ($(findstring avr32,$(GCC_VERSION)),avr32) - GCC_SITE:=ftp://www.at91.com/pub/buildroot/ -else - GCC_SITE:=$(BR2_GNU_MIRROR)/gcc/gcc-$(GCC_VERSION) -endif - -ifneq ($(filter xtensa%,$(ARCH)),) -include target/xtensa/patch.in -GCC_PATCH_EXTRA:=$(call XTENSA_PATCH,gcc,$(GCC_PATCH_DIR),. ..) -endif - -GCC_SOURCE:=gcc-$(GCC_VERSION).tar.bz2 -GCC_PATCH_DIR:=toolchain/gcc/$(GCC_VERSION) -GCC_DIR:=$(TOOLCHAIN_DIR)/gcc-$(GCC_VERSION) -GCC_CAT:=$(BZCAT) -GCC_STRIP_HOST_BINARIES:=nope -GCC_SRC_DIR:=$(GCC_DIR) - -# Branding works on >= 4.3 -ifneq ($(findstring x4.2.,x$(GCC_VERSION)),x4.2.) -EXTRA_GCC_CONFIG_OPTIONS+=--with-pkgversion="Buildroot $(BR2_VERSION_FULL)" \ - --with-bugurl="http://bugs.buildroot.net/" -endif - -# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43810 -# Workaround until it's fixed in 4.5.2 or later -ifeq ($(ARCH),powerpc) -ifeq ($(findstring x4.5.,x$(GCC_VERSION)),x4.5.) -GCC_OPTSPACE=--disable-target-optspace -endif -else -GCC_OPTSPACE=--enable-target-optspace -endif - -############################################################# -# -# Setup some initial stuff -# -############################################################# - -GCC_STAGING_PREREQ+=$(STAGING_DIR)/usr/lib/libc.a - -GCC_TARGET_LANGUAGES:=c - -GCC_CROSS_LANGUAGES:=c -ifeq ($(BR2_INSTALL_LIBSTDCPP),y) -GCC_CROSS_LANGUAGES:=$(GCC_CROSS_LANGUAGES),c++ -endif -ifeq ($(BR2_GCC_CROSS_FORTRAN),y) -GCC_CROSS_LANGUAGES:=$(GCC_CROSS_LANGUAGES),fortran -endif -ifeq ($(BR2_GCC_CROSS_JAVA),y) -GCC_CROSS_LANGUAGES:=$(GCC_CROSS_LANGUAGES),java -endif -ifeq ($(BR2_GCC_CROSS_OBJC),y) -GCC_CROSS_LANGUAGES:=$(GCC_CROSS_LANGUAGES),objc -endif - -GCC_COMMON_PREREQ=$(wildcard $(BR2_DEPENDS_DIR)/br2/install/libstdcpp*)\ -$(wildcard $(BR2_DEPENDS_DIR)/br2/install/libgcj*)\ -$(wildcard $(BR2_DEPENDS_DIR)/br2/install/objc*)\ -$(wildcard $(BR2_DEPENDS_DIR)/br2/install/fortran*)\ -$(wildcard $(BR2_DEPENDS_DIR)/br2/prefer/ima*)\ -$(wildcard $(BR2_DEPENDS_DIR)/br2/toolchain/sysroot*)\ -$(wildcard $(BR2_DEPENDS_DIR)/br2/use/sjlj/exceptions*)\ -$(wildcard $(BR2_DEPENDS_DIR)/br2/gcc/shared/libgcc*) -GCC_TARGET_PREREQ+=$(GCC_COMMON_PREREQ) \ -$(wildcard $(BR2_DEPENDS_DIR)/br2/extra/target/gcc/config/options*) -GCC_STAGING_PREREQ+=$(GCC_COMMON_PREREQ) \ -$(wildcard $(BR2_DEPENDS_DIR)/br2/extra/gcc/config/options*)\ -$(wildcard $(BR2_DEPENDS_DIR)/br2/gcc/cross/*) - -ifeq ($(BR2_INSTALL_LIBSTDCPP),y) -GCC_TARGET_LANGUAGES:=$(GCC_TARGET_LANGUAGES),c++ -endif - -ifeq ($(BR2_INSTALL_LIBGCJ),y) -GCC_TARGET_LANGUAGES:=$(GCC_TARGET_LANGUAGES),java -endif - -ifeq ($(BR2_INSTALL_OBJC),y) -GCC_TARGET_LANGUAGES:=$(GCC_TARGET_LANGUAGES),objc -endif - -ifeq ($(BR2_INSTALL_FORTRAN),y) -GCC_TARGET_LANGUAGES:=$(GCC_TARGET_LANGUAGES),fortran -endif - -GCC_WITH_HOST_GMP = --with-gmp=$(HOST_DIR)/usr -GCC_WITH_HOST_MPFR = --with-mpfr=$(HOST_DIR)/usr -ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) -HOST_SOURCE += host-gmp-source host-mpfr-source -endif -GCC_HOST_PREREQ = host-gmp host-mpfr - -ifeq ($(findstring x4.5.,x$(GCC_VERSION)),x4.5.) -GCC_WITH_HOST_MPC = --with-mpc=$(HOST_DIR)/usr -ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) -HOST_SOURCE += host-mpc-source -endif -GCC_HOST_PREREQ += host-mpc -endif - -GCC_TARGET_PREREQ += mpfr gmp -ifeq ($(findstring x4.5.,x$(GCC_VERSION)),x4.5.) -GCC_TARGET_PREREQ += mpc -endif - -ifeq ($(BR2_GCC_SHARED_LIBGCC),y) -GCC_SHARED_LIBGCC:=--enable-shared -else -GCC_SHARED_LIBGCC:=--disable-shared -endif - -ifeq ($(BR2_GCC_ENABLE_TLS),y) -GCC_TLS:=--enable-tls -else -GCC_TLS:=--disable-tls -endif - -ifeq ($(BR2_PTHREADS_NONE),y) -THREADS:=--disable-threads --disable-libgomp -else -THREADS:=--enable-threads -endif - -ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y) -GCC_DECIMAL_FLOAT:=--disable-decimal-float -endif - -# gcc version < 4.2.0 don't have -Wno-overlength-strings and the configure -# script has problems detecting it, so help it -ifeq ($(shell test $(HOSTCC_VERSION) -lt 420 && echo OLD),OLD) -GCC_CONF_ENV:=acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings=no \ - acx_cv_prog_cc_warning__Wno_overlength_strings=no -endif - -ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) -HOST_SOURCE+=gcc-source -endif - -$(DL_DIR)/$(GCC_SOURCE): - mkdir -p $(DL_DIR) - $(call DOWNLOAD,$(GCC_SITE),$(GCC_SOURCE)) - -gcc-unpacked: $(GCC_DIR)/.patched -$(GCC_DIR)/.unpacked: $(DL_DIR)/$(GCC_SOURCE) - mkdir -p $(TOOLCHAIN_DIR) - rm -rf $(GCC_DIR) - $(GCC_CAT) $(DL_DIR)/$(GCC_SOURCE) | tar -C $(TOOLCHAIN_DIR) $(TAR_OPTIONS) - - $(CONFIG_UPDATE) $(@D) - touch $@ - -gcc-patched: $(GCC_DIR)/.patched -$(GCC_DIR)/.patched: $(GCC_DIR)/.unpacked - # Apply any files named gcc-*.patch from the source directory to gcc -ifneq ($(wildcard $(GCC_PATCH_DIR)),) - toolchain/patch-kernel.sh $(GCC_DIR) $(GCC_PATCH_DIR) \*.patch $(GCC_PATCH_EXTRA) -endif - - # Note: The soft float situation has improved considerably with gcc 3.4.x. - # We can dispense with the custom spec files, as well as libfloat for the arm case. - # However, we still need a patch for arm. There's a similar patch for gcc 3.3.x - # which needs to be integrated so we can kill of libfloat for good, except for - # anyone (?) who might still be using gcc 2.95. mjn3 -ifeq ($(BR2_SOFT_FLOAT),y) -ifeq ("$(strip $(ARCH))","arm") - toolchain/patch-kernel.sh $(GCC_DIR) toolchain/gcc/$(GCC_VERSION) arm-softfloat.patch.conditional -endif -ifeq ("$(strip $(ARCH))","armeb") - toolchain/patch-kernel.sh $(GCC_DIR) toolchain/gcc/$(GCC_VERSION) arm-softfloat.patch.conditional -endif -endif -ifeq ($(ARCH)-$(BR2_GCC_SHARED_LIBGCC),powerpc-y) -ifneq ($(BR2_SOFT_FLOAT),) - toolchain/patch-kernel.sh $(GCC_DIR) toolchain/gcc/$(GCC_VERSION) powerpc-link-with-math-lib.patch.conditional -endif -endif - touch $@ - -############################################################# -# -# build the first pass gcc compiler -# -############################################################# -GCC_BUILD_DIR1:=$(TOOLCHAIN_DIR)/gcc-$(GCC_VERSION)-initial - -$(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched - mkdir -p $(GCC_BUILD_DIR1) - (cd $(GCC_BUILD_DIR1); rm -rf config.cache; \ - $(HOST_CONFIGURE_OPTS) \ - $(GCC_DIR)/configure $(QUIET) \ - --prefix=$(HOST_DIR)/usr \ - --build=$(GNU_HOST_NAME) \ - --host=$(GNU_HOST_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - --enable-languages=c \ - $(BR2_CONFIGURE_DEVEL_SYSROOT) \ - --disable-__cxa_atexit \ - $(GCC_OPTSPACE) \ - --with-gnu-ld \ - --disable-shared \ - --disable-libssp \ - --without-headers \ - --with-newlib \ - --disable-multilib \ - $(GCC_TLS) \ - $(GCC_WITH_HOST_GMP) \ - $(GCC_WITH_HOST_MPFR) \ - $(GCC_WITH_HOST_MPC) \ - $(DISABLE_NLS) \ - $(THREADS) \ - $(GCC_DECIMAL_FLOAT) \ - $(SOFT_FLOAT_CONFIG_OPTION) \ - $(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) $(GCC_WITH_CPU) \ - $(EXTRA_GCC_CONFIG_OPTIONS) \ - $(EXTRA_GCC1_CONFIG_OPTIONS) \ - $(QUIET) \ - ) - touch $@ - -$(GCC_BUILD_DIR1)/.compiled: $(GCC_BUILD_DIR1)/.configured -ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y) - $(GCC_CONF_ENV) $(MAKE) -C $(GCC_BUILD_DIR1) all-gcc -else - $(MAKE) -C $(GCC_BUILD_DIR1) all-gcc -endif - touch $@ - -gcc_initial=$(GCC_BUILD_DIR1)/.installed -$(gcc_initial) $(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc: $(GCC_BUILD_DIR1)/.compiled - PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR1) install-gcc - touch $(gcc_initial) - -gcc_initial: $(GCC_HOST_PREREQ) host-binutils $(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc - -gcc_initial-clean: - rm -rf $(GCC_BUILD_DIR1) - -gcc_initial-dirclean: - rm -rf $(GCC_BUILD_DIR1) $(GCC_DIR) - -############################################################# -# -# build the second pass gcc compiler -# -############################################################# -GCC_BUILD_DIR2:=$(TOOLCHAIN_DIR)/gcc-$(GCC_VERSION)-intermediate - -# The --without-headers option stopped working with gcc 3.0 and has never been -# fixed, so we need to actually have working C library header files prior to -# the step or libgcc will not build... - -$(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched - mkdir -p $(GCC_BUILD_DIR2) - (cd $(GCC_BUILD_DIR2); rm -rf config.cache; \ - $(HOST_CONFIGURE_OPTS) \ - $(GCC_DIR)/configure $(QUIET) \ - --prefix=$(HOST_DIR)/usr \ - --build=$(GNU_HOST_NAME) \ - --host=$(GNU_HOST_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - --enable-languages=c \ - $(BR2_CONFIGURE_DEVEL_SYSROOT) \ - --disable-__cxa_atexit \ - $(GCC_OPTSPACE) \ - --with-gnu-ld \ - --enable-shared \ - --disable-libssp \ - --disable-multilib \ - $(GCC_TLS) \ - $(GCC_WITH_HOST_GMP) \ - $(GCC_WITH_HOST_MPFR) \ - $(GCC_WITH_HOST_MPC) \ - $(DISABLE_NLS) \ - $(THREADS) \ - $(MULTILIB) \ - $(GCC_DECIMAL_FLOAT) \ - $(SOFT_FLOAT_CONFIG_OPTION) \ - $(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) $(GCC_WITH_CPU) \ - $(EXTRA_GCC_CONFIG_OPTIONS) \ - $(EXTRA_GCC2_CONFIG_OPTIONS) \ - $(QUIET) \ - ) - touch $@ - -$(GCC_BUILD_DIR2)/.compiled: $(GCC_BUILD_DIR2)/.configured - # gcc >= 4.3.0 have to also build all-target-libgcc -ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y) - $(GCC_CONF_ENV) $(MAKE) -C $(GCC_BUILD_DIR2) all-gcc all-target-libgcc -else - $(MAKE) -C $(GCC_BUILD_DIR2) all-gcc -endif - touch $@ - -gcc_intermediate=$(GCC_BUILD_DIR2)/.installed -$(gcc_intermediate): $(GCC_BUILD_DIR2)/.compiled - # gcc >= 4.3.0 have to also install install-target-libgcc -ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y) - PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR2) install-gcc install-target-libgcc -else - PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR2) install-gcc -endif - touch $(gcc_intermediate) - -gcc_intermediate: uclibc-configured $(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc - -gcc_intermediate-clean: - rm -rf $(GCC_BUILD_DIR2) - -gcc_intermediate-dirclean: - rm -rf $(GCC_BUILD_DIR2) $(GCC_DIR) - -############################################################# -# -# third pass compiler build. Build the compiler targeting -# the newly built shared uClibc library. -# -############################################################# -# -# Sigh... I had to rework things because using --with-gxx-include-dir -# causes issues with include dir search order for g++. This seems to -# have something to do with "path translations" and possibly doesn't -# affect gcc-target. However, I haven't tested gcc-target yet so no -# guarantees. mjn3 - -GCC_BUILD_DIR3:=$(TOOLCHAIN_DIR)/gcc-$(GCC_VERSION)-final -$(GCC_BUILD_DIR3)/.configured: $(GCC_SRC_DIR)/.patched $(GCC_STAGING_PREREQ) - mkdir -p $(GCC_BUILD_DIR3) - # Important! Required for limits.h to be fixed. - ln -snf ../include/ $(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/sys-include - (cd $(GCC_BUILD_DIR3); rm -rf config.cache; \ - $(HOST_CONFIGURE_OPTS) \ - $(GCC_SRC_DIR)/configure $(QUIET) \ - --prefix=$(HOST_DIR)/usr \ - --build=$(GNU_HOST_NAME) \ - --host=$(GNU_HOST_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - --enable-languages=$(GCC_CROSS_LANGUAGES) \ - $(BR2_CONFIGURE_STAGING_SYSROOT) \ - $(BR2_CONFIGURE_BUILD_TOOLS) \ - --disable-__cxa_atexit \ - $(GCC_OPTSPACE) \ - --with-gnu-ld \ - --disable-libssp \ - --disable-multilib \ - $(GCC_TLS) \ - $(GCC_SHARED_LIBGCC) \ - $(GCC_WITH_HOST_GMP) \ - $(GCC_WITH_HOST_MPFR) \ - $(GCC_WITH_HOST_MPC) \ - $(DISABLE_NLS) \ - $(THREADS) \ - $(GCC_DECIMAL_FLOAT) \ - $(SOFT_FLOAT_CONFIG_OPTION) \ - $(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) $(GCC_WITH_CPU) \ - $(DISABLE_LARGEFILE) \ - $(EXTRA_GCC_CONFIG_OPTIONS) \ - $(EXTRA_GCC2_CONFIG_OPTIONS) \ - ) - touch $@ - -$(GCC_BUILD_DIR3)/.compiled: $(GCC_BUILD_DIR3)/.configured - $(GCC_CONF_ENV) $(MAKE) -C $(GCC_BUILD_DIR3) all - touch $@ - -$(GCC_BUILD_DIR3)/.installed: $(GCC_BUILD_DIR3)/.compiled - PATH=$(TARGET_PATH) $(MAKE) \ - -C $(GCC_BUILD_DIR3) install - if [ -d "$(STAGING_DIR)/lib64" ]; then \ - if [ ! -e "$(STAGING_DIR)/lib" ]; then \ - mkdir -p "$(STAGING_DIR)/lib"; \ - fi; \ - mv "$(STAGING_DIR)/lib64/"* "$(STAGING_DIR)/lib/"; \ - rmdir "$(STAGING_DIR)/lib64"; \ - rm "$(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib64";\ - fi - # Strip the host binaries -ifeq ($(GCC_STRIP_HOST_BINARIES),true) - strip --strip-all -R .note -R .comment $(filter-out %-gccbug %-embedspu,$(wildcard $(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-*)) -endif - # Make sure we have 'cc'. - if [ ! -e $(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-cc ]; then \ - ln -snf $(REAL_GNU_TARGET_NAME)-gcc \ - $(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-cc; \ - fi - if [ ! -e $(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/bin/cc ]; then \ - ln -snf gcc $(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/bin/cc; \ - fi - # Set up the symlinks to enable lying about target name. - set -e; \ - (cd $(HOST_DIR)/usr; \ - ln -snf $(REAL_GNU_TARGET_NAME) $(GNU_TARGET_NAME); \ - cd bin; \ - for app in $(REAL_GNU_TARGET_NAME)-*; do \ - ln -snf $${app} \ - $(GNU_TARGET_NAME)$${app##$(REAL_GNU_TARGET_NAME)}; \ - done; \ - ) - - mkdir -p $(TARGET_DIR)/usr/lib $(TARGET_DIR)/usr/sbin - touch $@ - -$(STAMP_DIR)/gcc_libs_target_installed: $(GCC_BUILD_DIR3)/.installed -ifeq ($(BR2_GCC_SHARED_LIBGCC),y) - # These go in /lib, so... - rm -rf $(TARGET_DIR)/usr/lib/libgcc_s*.so* - -cp -dpf $(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib*/libgcc_s* \ - $(STAGING_DIR)/lib/ - -cp -dpf $(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib*/libgcc_s* \ - $(TARGET_DIR)/lib/ - -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/lib/libgcc_s* -endif -ifeq ($(BR2_INSTALL_LIBSTDCPP),y) -ifeq ($(BR2_GCC_SHARED_LIBGCC),y) - mkdir -p $(TARGET_DIR)/usr/lib - -cp -dpf $(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib*/libstdc++.so* \ - $(STAGING_DIR)/usr/lib/ - -cp -dpf $(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib*/libstdc++.so* \ - $(TARGET_DIR)/usr/lib/ - -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libstdc++.so* -endif -endif -ifeq ($(BR2_INSTALL_LIBGCJ),y) - cp -dpf $(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib*/libgcj.so* $(STAGING_DIR)/usr/lib/ - cp -dpf $(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib*/libgcj.so* $(TARGET_DIR)/usr/lib/ - mkdir -p $(STAGING_DIR)/usr/lib/security - mkdir -p $(TARGET_DIR)/usr/lib/security - cp -dpf $(HOST_DIR)/usr/lib/security/classpath.security \ - $(STAGING_DIR)/usr/lib/security/ - cp -dpf $(HOST_DIR)/usr/lib/security/classpath.security \ - $(TARGET_DIR)/usr/lib/security/ - -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libgcj.so* -endif - mkdir -p $(@D) - touch $@ - -cross_compiler:=$(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc -cross_compiler gcc: gcc_intermediate \ - $(LIBFLOAT_TARGET) uclibc $(GCC_BUILD_DIR3)/.installed \ - $(STAMP_DIR)/gcc_libs_target_installed \ - $(GCC_TARGETS) - -gcc-source: $(DL_DIR)/$(GCC_SOURCE) - -gcc-clean: - rm -rf $(GCC_BUILD_DIR3) - for prog in cpp gcc gcc-[0-9]* protoize unprotoize gcov gccbug cc; do \ - rm -f $(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-$$prog; \ - rm -f $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-$$prog; \ - done - -gcc-dirclean: gcc_initial-dirclean - rm -rf $(GCC_BUILD_DIR3) - -############################################################# -# -# Next build target gcc compiler -# -############################################################# -GCC_BUILD_DIR4:=$(BUILD_DIR)/gcc-$(GCC_VERSION)-target - -$(GCC_BUILD_DIR4)/.prepared: $(STAMP_DIR)/gcc_libs_target_installed - mkdir -p $(GCC_BUILD_DIR4) - touch $@ - -$(GCC_BUILD_DIR4)/.configured: $(GCC_BUILD_DIR4)/.prepared - (cd $(GCC_BUILD_DIR4); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - $(TARGET_CONFIGURE_ARGS) \ - CFLAGS_FOR_TARGET="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \ - CXXFLAGS_FOR_TARGET="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \ - CFLAGS="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \ - BOOT_CFLAGS="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \ - GCC_FOR_TARGET="$(TARGET_CC)" \ - CC_FOR_TARGET="$(TARGET_CC)" \ - CXX_FOR_TARGET="$(TARGET_CXX)" \ - $(GCC_SRC_DIR)/configure $(QUIET) \ - --prefix=/usr \ - --build=$(GNU_HOST_NAME) \ - --host=$(REAL_GNU_TARGET_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - --enable-languages=$(GCC_TARGET_LANGUAGES) \ - --with-gxx-include-dir=/usr/include/c++ \ - --disable-__cxa_atexit \ - --with-gnu-ld \ - --disable-libssp \ - --disable-multilib \ - $(GCC_TLS) \ - $(GCC_SHARED_LIBGCC) \ - $(DISABLE_NLS) \ - $(THREADS) \ - $(GCC_DECIMAL_FLOAT) \ - $(SOFT_FLOAT_CONFIG_OPTION) \ - $(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) $(GCC_WITH_CPU) \ - $(DISABLE_LARGEFILE) \ - $(EXTRA_GCC_CONFIG_OPTIONS) \ - $(EXTRA_TARGET_GCC_CONFIG_OPTIONS) \ - $(EXTRA_GCC4_CONFIG_OPTIONS) \ - ) - touch $@ - -$(GCC_BUILD_DIR4)/.compiled: $(GCC_BUILD_DIR4)/.configured - PATH=$(TARGET_PATH) \ - $(MAKE) -C $(GCC_BUILD_DIR4) all - touch $@ - -GCC_LIB_SUBDIR=lib/gcc/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION) -ifeq ($(findstring x4.2,x$(GCC_VERSION)),x4.2) -GCC_INCLUDE_DIR:=include -else -GCC_INCLUDE_DIR:=include-fixed -endif - -$(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR4)/.compiled - PATH=$(TARGET_PATH) DESTDIR=$(TARGET_DIR) \ - $(MAKE1) -C $(GCC_BUILD_DIR4) install - # Remove broken specs file (cross compile flag is set). - rm -f $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR)/specs - - # Remove useless copies of gcc, c++, g++ - rm -f $(TARGET_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc* - rm -f $(TARGET_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-g++* - rm -f $(TARGET_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-c++* - - # Work around problem of missing syslimits.h - if [ ! -f $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR)/$(GCC_INCLUDE_DIR)/syslimits.h ]; then \ - echo "warning: working around missing syslimits.h"; \ - cp -f $(HOST_DIR)/$(GCC_LIB_SUBDIR)/$(GCC_INCLUDE_DIR)/syslimits.h \ - $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR)/$(GCC_INCLUDE_DIR)/; \ - fi - # Make sure we have 'cc'. - if [ ! -e $(TARGET_DIR)/usr/bin/cc ]; then \ - ln -snf gcc $(TARGET_DIR)/usr/bin/cc; \ - fi - # These are in /lib, so... - #rm -rf $(TARGET_DIR)/usr/lib/libgcc_s*.so* - touch -c $@ - -gcc_target: $(STAMP_DIR)/gcc_libs_target_installed $(GCC_TARGET_PREREQ) binutils $(TARGET_DIR)/usr/bin/gcc - -gcc_target-clean: - rm -rf $(GCC_BUILD_DIR4) - rm -f $(TARGET_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)* - -gcc_target-dirclean: - rm -rf $(GCC_BUILD_DIR4) diff --git a/toolchain/gdb/6.7.1/600-fix-compile-flag-mismatch.patch b/toolchain/gdb/6.7.1/600-fix-compile-flag-mismatch.patch deleted file mode 100644 index 13b72bb96d..0000000000 --- a/toolchain/gdb/6.7.1/600-fix-compile-flag-mismatch.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/gdb/gdbserver/configure -+++ b/gdb/gdbserver/configure -@@ -1239,7 +1239,7 @@ - ac_cache_corrupted=: ;; - ,);; - *) -- if test "x$ac_old_val" != "x$ac_new_val"; then -+ if test "`echo x$ac_old_val`" != "`echo x$ac_new_val`"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 - echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 ---- a/gdb/configure -+++ b/gdb/configure -@@ -272,7 +272,7 @@ - PACKAGE_BUGREPORT= - - ac_unique_file="main.c" --ac_subdirs_all="$ac_subdirs_all doc testsuite" -+ac_subdirs_all="$ac_subdirs_all doc" - # Factoring default headers for most tests. - ac_includes_default="\ - #include -@@ -3077,7 +3077,7 @@ - - - --subdirs="$subdirs doc testsuite" -+subdirs="$subdirs doc" - - - # Provide defaults for some variables set by the per-host and per-target diff --git a/toolchain/gdb/6.8/600-fix-compile-flag-mismatch.patch b/toolchain/gdb/6.8/600-fix-compile-flag-mismatch.patch deleted file mode 100644 index 13b72bb96d..0000000000 --- a/toolchain/gdb/6.8/600-fix-compile-flag-mismatch.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/gdb/gdbserver/configure -+++ b/gdb/gdbserver/configure -@@ -1239,7 +1239,7 @@ - ac_cache_corrupted=: ;; - ,);; - *) -- if test "x$ac_old_val" != "x$ac_new_val"; then -+ if test "`echo x$ac_old_val`" != "`echo x$ac_new_val`"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 - echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 ---- a/gdb/configure -+++ b/gdb/configure -@@ -272,7 +272,7 @@ - PACKAGE_BUGREPORT= - - ac_unique_file="main.c" --ac_subdirs_all="$ac_subdirs_all doc testsuite" -+ac_subdirs_all="$ac_subdirs_all doc" - # Factoring default headers for most tests. - ac_includes_default="\ - #include -@@ -3077,7 +3077,7 @@ - - - --subdirs="$subdirs doc testsuite" -+subdirs="$subdirs doc" - - - # Provide defaults for some variables set by the per-host and per-target diff --git a/toolchain/gdb/Config.in b/toolchain/gdb/Config.in deleted file mode 100644 index 845b9e8a00..0000000000 --- a/toolchain/gdb/Config.in +++ /dev/null @@ -1,71 +0,0 @@ -comment "Gdb Options" - -config BR2_PACKAGE_GDB - bool "Build gdb debugger for the Target" - select BR2_PACKAGE_NCURSES - depends on BR2_USE_WCHAR - help - Build the full gdb debugger to run on the target. - -comment "Gdb debugger for the target needs WCHAR support in toolchain" - depends on !BR2_USE_WCHAR - -config BR2_PACKAGE_GDB_SERVER - bool "Build gdb server for the Target" - help - Build the gdbserver stub to run on the target. - A full gdb is needed to debug the progam. - -config BR2_PACKAGE_GDB_HOST - bool "Build gdb for the Host" - # cross-gdb is supposed to be part of the external - # toolchain. And the build currently fails. - #depends on !BR2_TOOLCHAIN_EXTERNAL - help - Build gdb to run on the host to debug programs run on the target. - -choice - prompt "GDB debugger Version" - default BR2_GDB_VERSION_6_8 if !BR2_avr32 - default BR2_GDB_VERSION_6_7_1_AVR32_2_1_5 if BR2_avr32 - depends on BR2_PACKAGE_GDB || BR2_PACKAGE_GDB_SERVER || BR2_PACKAGE_GDB_HOST - help - Select the version of gdb you wish to use. - - config BR2_GDB_VERSION_6_6 - bool "gdb 6.6" - depends on !BR2_avr32 - depends on BR2_DEPRECATED || BR2_bfin - - config BR2_GDB_VERSION_6_7_1 - depends on !(BR2_avr32 || BR2_bfin) - bool "gdb 6.7.1" - - config BR2_GDB_VERSION_6_7_1_AVR32_2_1_5 - depends on BR2_avr32 - bool "gdb 6.7.1-avr32-2.1.5" - - config BR2_GDB_VERSION_6_8 - bool "gdb 6.8" - depends on !(BR2_avr32 || BR2_bfin) - - config BR2_GDB_VERSION_7_0_1 - bool "gdb 7.0.1" - depends on !BR2_bfin - select BR2_PTHREAD_DEBUG if !BR2_PTHREADS_NONE - - config BR2_GDB_VERSION_7_1 - bool "gdb 7.1" - depends on !BR2_bfin - select BR2_PTHREAD_DEBUG if !BR2_PTHREADS_NONE - -endchoice - -config BR2_GDB_VERSION - string - default "6.6" if BR2_GDB_VERSION_6_6 - default "6.7.1" if BR2_GDB_VERSION_6_7_1 - default "6.7.1-avr32-2.1.5" if BR2_GDB_VERSION_6_7_1_AVR32_2_1_5 - default "6.8" if BR2_GDB_VERSION_6_8 - default "7.0.1" if BR2_GDB_VERSION_7_0_1 - default "7.1" if BR2_GDB_VERSION_7_1 diff --git a/toolchain/gdb/gdb.mk b/toolchain/gdb/gdb.mk deleted file mode 100644 index caf3e364d9..0000000000 --- a/toolchain/gdb/gdb.mk +++ /dev/null @@ -1,236 +0,0 @@ -###################################################################### -# -# gdb -# -###################################################################### -GDB_VERSION:=$(call qstrip,$(BR2_GDB_VERSION)) - -GDB_SOURCE:=gdb-$(GDB_VERSION).tar.bz2 -GDB_CAT:=$(BZCAT) - -ifeq ($(findstring avr32,$(GDB_VERSION)),avr32) - GDB_SITE:=ftp://www.at91.com/pub/buildroot/ - GDB_PATCH_DIR:=toolchain/gdb/$(GDB_VERSION) -else - GDB_SITE:=$(BR2_GNU_MIRROR)/gdb - GDB_PATCH_DIR:=toolchain/gdb/$(GDB_VERSION) -endif - -ifneq ($(filter xtensa%,$(ARCH)),) -include target/xtensa/patch.in -GDB_PATCH_EXTRA:=$(call XTENSA_PATCH,gdb,$(GDB_PATCH_DIR),. ..) -endif - -GDB_DIR:=$(TOOLCHAIN_DIR)/gdb-$(GDB_VERSION) - -$(DL_DIR)/$(GDB_SOURCE): - $(call DOWNLOAD,$(GDB_SITE),$(GDB_SOURCE)) - -gdb-unpacked: $(GDB_DIR)/.unpacked -$(GDB_DIR)/.unpacked: $(DL_DIR)/$(GDB_SOURCE) - mkdir -p $(TOOLCHAIN_DIR) - $(GDB_CAT) $(DL_DIR)/$(GDB_SOURCE) | tar -C $(TOOLCHAIN_DIR) $(TAR_OPTIONS) - -ifeq ($(GDB_VERSION),snapshot) - GDB_REAL_DIR=$(shell \ - tar jtf $(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1) - ln -sf $(TOOLCHAIN_DIR)/$(shell tar jtf $(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1) $(GDB_DIR) -endif -ifneq ($(wildcard $(GDB_PATCH_DIR)),) - toolchain/patch-kernel.sh $(GDB_DIR) $(GDB_PATCH_DIR) \*.patch $(GDB_PATCH_EXTRA) -endif - $(CONFIG_UPDATE) $(@D) - touch $@ - -gdb-patched: $(GDB_DIR)/.unpacked - -gdb-source: $(DL_DIR)/$(GDB_SOURCE) -gdb-dirclean: - rm -rf $(GDB_DIR) - -###################################################################### -# -# gdb target -# -###################################################################### - -GDB_TARGET_DIR:=$(BUILD_DIR)/gdb-$(GDB_VERSION)-target - -GDB_TARGET_CONFIGURE_VARS:= \ - ac_cv_type_uintptr_t=yes \ - gt_cv_func_gettext_libintl=yes \ - ac_cv_func_dcgettext=yes \ - gdb_cv_func_sigsetjmp=yes \ - bash_cv_func_strcoll_broken=no \ - bash_cv_must_reinstall_sighandlers=no \ - bash_cv_func_sigsetjmp=present \ - bash_cv_have_mbstate_t=yes - -$(GDB_TARGET_DIR)/.configured: $(GDB_DIR)/.unpacked - mkdir -p $(GDB_TARGET_DIR) - (cd $(GDB_TARGET_DIR); \ - gdb_cv_func_sigsetjmp=yes \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS_FOR_TARGET="$(TARGET_CFLAGS) $(TARGET_LDFLAGS) -Wno-error" \ - CFLAGS="$(TARGET_CFLAGS) $(TARGET_LDFLAGS) -Wno-error" \ - $(GDB_TARGET_CONFIGURE_VARS) \ - $(GDB_DIR)/configure $(QUIET) \ - --cache-file=/dev/null \ - --build=$(GNU_HOST_NAME) \ - --host=$(REAL_GNU_TARGET_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - --prefix=/usr \ - $(DISABLE_NLS) \ - --without-uiout $(DISABLE_GDBMI) \ - --disable-tui --disable-gdbtk --without-x \ - --disable-sim --enable-gdbserver \ - --without-included-gettext \ - --disable-werror \ - $(QUIET) \ - ) -ifeq ($(BR2_ENABLE_LOCALE),y) - -$(SED) "s,^INTL *=.*,INTL = -lintl,g;" $(GDB_DIR)/gdb/Makefile -endif - touch $@ - -$(GDB_TARGET_DIR)/gdb/gdb: $(GDB_TARGET_DIR)/.configured - # force ELF support since it fails due to BFD linking problems - gdb_cv_var_elf=yes \ - $(MAKE) CC="$(TARGET_CC)" MT_CFLAGS="$(TARGET_CFLAGS)" \ - -C $(GDB_TARGET_DIR) - -$(TARGET_DIR)/usr/bin/gdb: $(GDB_TARGET_DIR)/gdb/gdb - install -c -D $(GDB_TARGET_DIR)/gdb/gdb $(TARGET_DIR)/usr/bin/gdb - -gdb_target: ncurses $(TARGET_DIR)/usr/bin/gdb - -gdb_target-source: $(DL_DIR)/$(GDB_SOURCE) - -gdb_target-clean: - -$(MAKE) -C $(GDB_DIR) clean - -gdb_target-dirclean: - rm -rf $(GDB_DIR) - -###################################################################### -# -# gdbserver -# -###################################################################### - -GDB_SERVER_DIR:=$(BUILD_DIR)/gdbserver-$(GDB_VERSION) - -$(GDB_SERVER_DIR)/.configured: $(GDB_DIR)/.unpacked - mkdir -p $(GDB_SERVER_DIR) - (cd $(GDB_SERVER_DIR); \ - $(TARGET_CONFIGURE_OPTS) \ - gdb_cv_func_sigsetjmp=yes \ - bash_cv_have_mbstate_t=yes \ - $(GDB_DIR)/gdb/gdbserver/configure $(QUIET) \ - --cache-file=/dev/null \ - --build=$(GNU_HOST_NAME) \ - --host=$(REAL_GNU_TARGET_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - --includedir=$(STAGING_DIR)/usr/include \ - $(DISABLE_NLS) \ - --without-uiout $(DISABLE_GDBMI) \ - --disable-tui --disable-gdbtk --without-x \ - --without-included-gettext \ - ) - touch $@ - -$(GDB_SERVER_DIR)/gdbserver: $(GDB_SERVER_DIR)/.configured - $(MAKE) CC="$(TARGET_CC)" MT_CFLAGS="$(TARGET_CFLAGS)" \ - -C $(GDB_SERVER_DIR) - -$(TARGET_DIR)/usr/bin/gdbserver: $(GDB_SERVER_DIR)/gdbserver -ifeq ($(BR2_CROSS_TOOLCHAIN_TARGET_UTILS),y) - mkdir -p $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/target_utils - install -c $(GDB_SERVER_DIR)/gdbserver \ - $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/target_utils/gdbserver -endif - install -c -D $(GDB_SERVER_DIR)/gdbserver $(TARGET_DIR)/usr/bin/gdbserver - -gdbserver: $(TARGET_DIR)/usr/bin/gdbserver - -gdbserver-source: $(DL_DIR)/$(GDB_SOURCE) - -gdbserver-clean: - -$(MAKE) -C $(GDB_SERVER_DIR) clean - -gdbserver-dirclean: - rm -rf $(GDB_SERVER_DIR) - -###################################################################### -# -# gdb on host -# -###################################################################### - -GDB_HOST_DIR:=$(TOOLCHAIN_DIR)/gdbhost-$(GDB_VERSION) - -$(GDB_HOST_DIR)/.configured: $(GDB_DIR)/.unpacked - mkdir -p $(GDB_HOST_DIR) - (cd $(GDB_HOST_DIR); \ - gdb_cv_func_sigsetjmp=yes \ - bash_cv_have_mbstate_t=yes \ - $(HOST_CONFIGURE_OPTS) \ - $(GDB_DIR)/configure $(QUIET) \ - --cache-file=/dev/null \ - --prefix=$(STAGING_DIR) \ - --build=$(GNU_HOST_NAME) \ - --host=$(GNU_HOST_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - $(DISABLE_NLS) \ - --without-uiout $(DISABLE_GDBMI) \ - --disable-tui --disable-gdbtk --without-x \ - --without-included-gettext \ - --enable-threads \ - --disable-werror \ - ) - touch $@ - -$(GDB_HOST_DIR)/gdb/gdb: $(GDB_HOST_DIR)/.configured - $(MAKE) -C $(GDB_HOST_DIR) - strip $(GDB_HOST_DIR)/gdb/gdb - -$(TARGET_CROSS)gdb: $(GDB_HOST_DIR)/gdb/gdb - install -c $(GDB_HOST_DIR)/gdb/gdb $(TARGET_CROSS)gdb - ln -snf $(REAL_GNU_TARGET_NAME)-gdb \ - $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-gdb - -gdbhost: host-expat $(TARGET_CROSS)gdb - -gdbhost-source: $(DL_DIR)/$(GDB_SOURCE) - -gdbhost-clean: - -$(MAKE) -C $(GDB_HOST_DIR) clean - -gdbhost-dirclean: - rm -rf $(GDB_HOST_DIR) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_GDB),y) -TARGETS+=gdb_target -endif - -ifeq ($(BR2_PACKAGE_GDB_SERVER),y) -TARGETS+=gdbserver -endif - -ifeq ($(BR2_PACKAGE_GDB_HOST),y) -TARGETS+=gdbhost -endif diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk index db7c7f1c5f..a8944ce0f6 100644 --- a/toolchain/helpers.mk +++ b/toolchain/helpers.mk @@ -1,46 +1,83 @@ -# This Makefile fragment declares helper functions, usefull to handle -# non- buildroot-built toolchains, eg. purely external toolchains or -# toolchains (internally) built using crosstool-NG. +# This Makefile fragment declares toolchain related helper functions. +# The copy_toolchain_lib_root function copies a toolchain library and +# its symbolic links from the sysroot directory to the target +# directory. Note that this function is used both by the external +# toolchain logic, and the glibc package, so care must be taken when +# changing this function. # -# Copy a toolchain library and its symbolic links from the sysroot -# directory to the target directory. Also optionaly strips the -# library. +# Most toolchains (CodeSourcery ones) have their libraries either in +# /lib or /usr/lib relative to their ARCH_SYSROOT_DIR, so we search +# libraries in: # -# Most toolchains have their libraries either in /lib or /usr/lib -# relative to their ARCH_SYSROOT_DIR. Buildroot toolchains, however, -# have basic libraries in /lib, and libstdc++/libgcc_s in -# /usr//lib(64). +# $${ARCH_LIB_DIR} +# usr/$${ARCH_LIB_DIR} +# +# Buildroot toolchains, however, have basic libraries in /lib, and +# libstdc++/libgcc_s in /usr//lib(64), so we also need to +# search libraries in: +# +# usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/$${ARCH_LIB_DIR} +# +# Linaro toolchains have most libraries in lib//, so we +# need to search libraries in: +# +# $${ARCH_LIB_DIR}/$(TOOLCHAIN_EXTERNAL_PREFIX) +# +# And recent Linaro toolchains have the GCC support libraries +# (libstdc++, libgcc_s, etc.) into a separate directory, outside of +# the sysroot, that we called the "SUPPORT_LIB_DIR", into which we +# need to search as well. +# +# Thanks to ARCH_LIB_DIR we also take into account toolchains that +# have the libraries in lib64 and usr/lib64. +# +# Please be very careful to check the major toolchain sources: +# Buildroot, Crosstool-NG, CodeSourcery and Linaro before doing any +# modification on the below logic. # # $1: arch specific sysroot directory -# $2: library name -# $3: destination directory of the libary, relative to $(TARGET_DIR) +# $2: support libraries directory (can be empty) +# $3: library directory ('lib' or 'lib64') from which libraries must be copied +# $4: library name +# $5: destination directory of the libary, relative to $(TARGET_DIR) # copy_toolchain_lib_root = \ ARCH_SYSROOT_DIR="$(strip $1)"; \ - LIB="$(strip $2)"; \ - DESTDIR="$(strip $3)" ; \ + SUPPORT_LIB_DIR="$(strip $2)" ; \ + ARCH_LIB_DIR="$(strip $3)" ; \ + LIB="$(strip $4)"; \ + DESTDIR="$(strip $5)" ; \ \ - LIBS=`(cd $${ARCH_SYSROOT_DIR}; \ - find -L . -path "./lib/$${LIB}.*" -o \ - -path "./usr/lib/$${LIB}.*" -o \ - -path "./usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib*/$${LIB}.*" \ - )` ; \ - for FILE in $${LIBS} ; do \ - LIB=`basename $${FILE}`; \ - LIBDIR=`dirname $${FILE}` ; \ - while test \! -z "$${LIB}"; do \ - FULLPATH="$${ARCH_SYSROOT_DIR}/$${LIBDIR}/$${LIB}" ; \ - rm -fr $(TARGET_DIR)/$${DESTDIR}/$${LIB}; \ - mkdir -p $(TARGET_DIR)/$${DESTDIR}; \ - if test -h $${FULLPATH} ; then \ - cp -d $${FULLPATH} $(TARGET_DIR)/$${DESTDIR}/; \ - elif test -f $${FULLPATH}; then \ - $(INSTALL) -D -m0755 $${FULLPATH} $(TARGET_DIR)/$${DESTDIR}/$${LIB}; \ + for dir in \ + $${ARCH_SYSROOT_DIR}/$${ARCH_LIB_DIR}/$(TOOLCHAIN_EXTERNAL_PREFIX) \ + $${ARCH_SYSROOT_DIR}/usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/$${ARCH_LIB_DIR} \ + $${ARCH_SYSROOT_DIR}/$${ARCH_LIB_DIR} \ + $${ARCH_SYSROOT_DIR}/usr/$${ARCH_LIB_DIR} \ + $${SUPPORT_LIB_DIR} ; do \ + LIBSPATH=`find $${dir} -maxdepth 1 -name "$${LIB}" 2>/dev/null` ; \ + if test -n "$${LIBSPATH}" ; then \ + break ; \ + fi \ + done ; \ + mkdir -p $(TARGET_DIR)/$${DESTDIR}; \ + for LIBPATH in $${LIBSPATH} ; do \ + while true ; do \ + LIBNAME=`basename $${LIBPATH}`; \ + LIBDIR=`dirname $${LIBPATH}` ; \ + LINKTARGET=`readlink $${LIBPATH}` ; \ + rm -fr $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \ + if test -h $${LIBPATH} ; then \ + ln -sf `basename $${LINKTARGET}` $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME} ; \ + elif test -f $${LIBPATH}; then \ + $(INSTALL) -D -m0755 $${LIBPATH} $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \ else \ exit -1; \ fi; \ - LIB="`readlink $${FULLPATH}`"; \ + if test -z "$${LINKTARGET}" ; then \ + break ; \ + fi ; \ + LIBPATH="`readlink -f $${LIBPATH}`"; \ done; \ done; \ \ @@ -79,54 +116,83 @@ copy_toolchain_lib_root = \ # non-default architecture variant is used. Without this, the # compiler fails to find libraries and headers. # +# Some toolchains (i.e Linaro binary toolchains) store support +# libraries (libstdc++, libgcc_s) outside of the sysroot, so we simply +# copy all the libraries from the "support lib directory" into our +# sysroot. +# +# Note that the 'locale' directories are not copied. They are huge +# (400+MB) in CodeSourcery toolchains, and they are not really useful. +# # $1: main sysroot directory of the toolchain # $2: arch specific sysroot directory of the toolchain # $3: arch specific subdirectory in the sysroot -# +# $4: directory of libraries ('lib', 'lib32' or 'lib64') +# $5: support lib directories (for toolchains storing libgcc_s, +# libstdc++ and other gcc support libraries outside of the +# sysroot) copy_toolchain_sysroot = \ SYSROOT_DIR="$(strip $1)"; \ ARCH_SYSROOT_DIR="$(strip $2)"; \ ARCH_SUBDIR="$(strip $3)"; \ - for i in etc lib sbin usr ; do \ + ARCH_LIB_DIR="$(strip $4)" ; \ + SUPPORT_LIB_DIR="$(strip $5)" ; \ + for i in etc $${ARCH_LIB_DIR} sbin usr usr/$${ARCH_LIB_DIR}; do \ if [ -d $${ARCH_SYSROOT_DIR}/$$i ] ; then \ - cp -a $${ARCH_SYSROOT_DIR}/$$i $(STAGING_DIR)/ ; \ + rsync -au --chmod=Du+w --exclude 'usr/lib/locale' \ + --exclude lib --exclude lib32 --exclude lib64 \ + $${ARCH_SYSROOT_DIR}/$$i/ $(STAGING_DIR)/$$i/ ; \ fi ; \ done ; \ if [ `readlink -f $${SYSROOT_DIR}` != `readlink -f $${ARCH_SYSROOT_DIR}` ] ; then \ if [ ! -d $${ARCH_SYSROOT_DIR}/usr/include ] ; then \ cp -a $${SYSROOT_DIR}/usr/include $(STAGING_DIR)/usr ; \ fi ; \ - ln -s . $(STAGING_DIR)/$${ARCH_SUBDIR} ; \ + mkdir -p `dirname $(STAGING_DIR)/$${ARCH_SUBDIR}` ; \ + relpath="./" ; \ + nbslashs=`echo -n $${ARCH_SUBDIR} | sed 's%[^/]%%g' | wc -c` ; \ + for slash in `seq 1 $${nbslashs}` ; do \ + relpath=$${relpath}"../" ; \ + done ; \ + ln -s $${relpath} $(STAGING_DIR)/$${ARCH_SUBDIR} ; \ + echo "Symlinking $(STAGING_DIR)/$${ARCH_SUBDIR} -> $${relpath}" ; \ + fi ; \ + if test -n "$${SUPPORT_LIB_DIR}" ; then \ + cp -a $${SUPPORT_LIB_DIR}/* $(STAGING_DIR)/lib/ ; \ fi ; \ find $(STAGING_DIR) -type d | xargs chmod 755 # -# Create lib64 -> lib and usr/lib64 -> usr/lib symbolic links in the -# target and staging directories. This is needed for some 64 bits -# toolchains such as the Crosstool-NG toolchains, for which the path -# to the dynamic loader and other libraries is /lib64, but the -# libraries are stored in /lib. -# -create_lib64_symlinks = \ - (cd $(TARGET_DIR) ; ln -s lib lib64) ; \ - (cd $(TARGET_DIR)/usr ; ln -s lib lib64) ; \ - (cd $(STAGING_DIR) ; ln -s lib lib64) ; \ - (cd $(STAGING_DIR)/usr ; ln -s lib lib64) - -# -# Check the availability of a particular glibc feature. We assume that -# all Buildroot toolchain options are supported by glibc, so we just -# check that they are enabled. +# Check the availability of a particular glibc feature. This function +# is used to check toolchain options that are always supported by +# glibc, so we simply check that the corresponding option is properly +# enabled. # # $1: Buildroot option name # $2: feature description # check_glibc_feature = \ - if [ x$($(1)) != x"y" ] ; then \ + if [ "$($(1))" != "y" ] ; then \ echo "$(2) available in C library, please enable $(1)" ; \ exit 1 ; \ fi +# +# Check the availability of RPC support in a glibc toolchain +# +# $1: sysroot directory +# +check_glibc_rpc_feature = \ + IS_IN_LIBC=`test -f $(1)/usr/include/rpc/rpc.h && echo y` ; \ + if [ "$(BR2_TOOLCHAIN_HAS_NATIVE_RPC)" != "y" -a "$${IS_IN_LIBC}" = "y" ] ; then \ + echo "RPC support available in C library, please enable BR2_TOOLCHAIN_HAS_NATIVE_RPC" ; \ + exit 1 ; \ + fi ; \ + if [ "$(BR2_TOOLCHAIN_HAS_NATIVE_RPC)" = "y" -a "$${IS_IN_LIBC}" != "y" ] ; then \ + echo "RPC support not available in C library, please disable BR2_TOOLCHAIN_HAS_NATIVE_RPC" ; \ + exit 1 ; \ + fi + # # Check the correctness of a glibc external toolchain configuration. # 1. Check that the C library selected in Buildroot matches the one @@ -138,17 +204,23 @@ check_glibc_feature = \ # check_glibc = \ SYSROOT_DIR="$(strip $1)"; \ - if ! test -f $${SYSROOT_DIR}/lib/ld-linux*.so.* -o -f $${SYSROOT_DIR}/lib/ld.so.* ; then \ + if test `find $${SYSROOT_DIR}/ -maxdepth 2 -name 'ld-linux*.so.*' -o -name 'ld.so.*' | wc -l` -eq 0 ; then \ echo "Incorrect selection of the C library"; \ exit -1; \ fi; \ - $(call check_glibc_feature,BR2_LARGEFILE,Large file support) ;\ - $(call check_glibc_feature,BR2_INET_IPV6,IPv6 support) ;\ - $(call check_glibc_feature,BR2_INET_RPC,RPC support) ;\ - $(call check_glibc_feature,BR2_ENABLE_LOCALE,Locale support) ;\ $(call check_glibc_feature,BR2_USE_MMU,MMU support) ;\ - $(call check_glibc_feature,BR2_USE_WCHAR,Wide char support) ;\ - $(call check_glibc_feature,BR2_PROGRAM_INVOCATION,Program invocation support) + $(call check_glibc_rpc_feature,$${SYSROOT_DIR}) + +# +# Check that the selected C library really is musl +# +# $1: sysroot directory +check_musl = \ + SYSROOT_DIR="$(strip $1)"; \ + if test ! -f $${SYSROOT_DIR}/lib/libc.so -o -e $${SYSROOT_DIR}/lib/libm.so ; then \ + echo "Incorrect selection of the C library" ; \ + exit -1; \ + fi # # Check the conformity of Buildroot configuration with regard to the @@ -162,11 +234,11 @@ check_glibc = \ # check_uclibc_feature = \ IS_IN_LIBC=`grep -q "\#define $(1) 1" $(3) && echo y` ; \ - if [ x$($(2)) != x"y" -a x$${IS_IN_LIBC} = x"y" ] ; then \ + if [ "$($(2))" != "y" -a "$${IS_IN_LIBC}" = "y" ] ; then \ echo "$(4) available in C library, please enable $(2)" ; \ exit 1 ; \ fi ; \ - if [ x$($(2)) = x"y" -a x$${IS_IN_LIBC} != x"y" ] ; then \ + if [ "$($(2))" = "y" -a "$${IS_IN_LIBC}" != "y" ] ; then \ echo "$(4) not available in C library, please disable $(2)" ; \ exit 1 ; \ fi @@ -183,7 +255,7 @@ check_uclibc_feature = \ # check_uclibc = \ SYSROOT_DIR="$(strip $1)"; \ - if ! test -f $${SYSROOT_DIR}/lib/ld*-uClibc.so.* ; then \ + if ! test -f $${SYSROOT_DIR}/usr/include/bits/uClibc_config.h ; then \ echo "Incorrect selection of the C library"; \ exit -1; \ fi; \ @@ -191,37 +263,50 @@ check_uclibc = \ $(call check_uclibc_feature,__ARCH_USE_MMU__,BR2_USE_MMU,$${UCLIBC_CONFIG_FILE},MMU support) ;\ $(call check_uclibc_feature,__UCLIBC_HAS_LFS__,BR2_LARGEFILE,$${UCLIBC_CONFIG_FILE},Large file support) ;\ $(call check_uclibc_feature,__UCLIBC_HAS_IPV6__,BR2_INET_IPV6,$${UCLIBC_CONFIG_FILE},IPv6 support) ;\ - $(call check_uclibc_feature,__UCLIBC_HAS_RPC__,BR2_INET_RPC,$${UCLIBC_CONFIG_FILE},RPC support) ;\ + $(call check_uclibc_feature,__UCLIBC_HAS_RPC__,BR2_TOOLCHAIN_HAS_NATIVE_RPC,$${UCLIBC_CONFIG_FILE},RPC support) ;\ $(call check_uclibc_feature,__UCLIBC_HAS_LOCALE__,BR2_ENABLE_LOCALE,$${UCLIBC_CONFIG_FILE},Locale support) ;\ $(call check_uclibc_feature,__UCLIBC_HAS_WCHAR__,BR2_USE_WCHAR,$${UCLIBC_CONFIG_FILE},Wide char support) ;\ - $(call check_uclibc_feature,__UCLIBC_HAS_PROGRAM_INVOCATION_NAME__,BR2_PROGRAM_INVOCATION,$${UCLIBC_CONFIG_FILE},Program invocation support) ;\ - $(call check_uclibc_feature,__UCLIBC_HAS_THREADS__,BR2_TOOLCHAIN_HAS_THREADS,$${UCLIBC_CONFIG_FILE},Thread support) + $(call check_uclibc_feature,__UCLIBC_HAS_THREADS__,BR2_TOOLCHAIN_HAS_THREADS,$${UCLIBC_CONFIG_FILE},Thread support) ;\ + $(call check_uclibc_feature,__PTHREADS_DEBUG_SUPPORT__,BR2_TOOLCHAIN_HAS_THREADS_DEBUG,$${UCLIBC_CONFIG_FILE},Thread debugging support) ;\ + $(call check_uclibc_feature,__UCLIBC_HAS_SSP__,BR2_TOOLCHAIN_HAS_SSP,$${UCLIBC_CONFIG_FILE},Stack Smashing Protection support) # # Check that the Buildroot configuration of the ABI matches the # configuration of the external toolchain. # +# $1: cross-gcc path +# check_arm_abi = \ - EXT_TOOLCHAIN_TARGET=$(shell LANG=C $(TARGET_CC) -v 2>&1 | grep ^Target | cut -f2 -d ' ') ; \ - if echo $${EXT_TOOLCHAIN_TARGET} | grep -q 'eabi$$' ; then \ - EXT_TOOLCHAIN_ABI="eabi" ; \ + __CROSS_CC=$(strip $1) ; \ + __CROSS_READELF=$(strip $2) ; \ + EXT_TOOLCHAIN_TARGET=`LANG=C $${__CROSS_CC} -v 2>&1 | grep ^Target | cut -f2 -d ' '` ; \ + if ! echo $${EXT_TOOLCHAIN_TARGET} | grep -qE 'eabi(hf)?$$' ; then \ + echo "External toolchain uses the unsuported OABI" ; \ + exit 1 ; \ + fi ; \ + EXT_TOOLCHAIN_CRT1=`LANG=C $${__CROSS_CC} -print-file-name=crt1.o` ; \ + if $${__CROSS_READELF} -A $${EXT_TOOLCHAIN_CRT1} | grep -q "Tag_ABI_VFP_args:" ; then \ + EXT_TOOLCHAIN_ABI="eabihf" ; \ else \ - EXT_TOOLCHAIN_ABI="oabi" ; \ + EXT_TOOLCHAIN_ABI="eabi" ; \ fi ; \ - if [ x$(BR2_ARM_OABI) = x"y" -a $${EXT_TOOLCHAIN_ABI} = "eabi" ] ; then \ - echo "Incorrect ABI setting" ; \ + if [ "$(BR2_ARM_EABI)" = "y" -a "$${EXT_TOOLCHAIN_ABI}" = "eabihf" ] ; then \ + echo "Incorrect ABI setting: EABI selected, but toolchain uses EABIhf" ; \ exit 1 ; \ fi ; \ - if [ x$(BR2_ARM_EABI) = x"y" -a $${EXT_TOOLCHAIN_ABI} = "oabi" ] ; then \ - echo "Incorrect ABI setting" ; \ + if [ "$(BR2_ARM_EABIHF)" = "y" -a "$${EXT_TOOLCHAIN_ABI}" = "eabi" ] ; then \ + echo "Incorrect ABI setting: EABIhf selected, but toolchain uses EABI" ; \ exit 1 ; \ fi # # Check that the external toolchain supports C++ # +# $1: cross-g++ path +# check_cplusplus = \ - $(TARGET_CXX) -v > /dev/null 2>&1 ; \ + __CROSS_CXX=$(strip $1) ; \ + $${__CROSS_CXX} -v > /dev/null 2>&1 ; \ if test $$? -ne 0 ; then \ echo "C++ support is selected but is not available in external toolchain" ; \ exit 1 ; \ @@ -230,9 +315,30 @@ check_cplusplus = \ # # Check that the cross-compiler given in the configuration exists # +# $1: cross-gcc path +# check_cross_compiler_exists = \ - $(TARGET_CC) -v > /dev/null 2>&1 ; \ + __CROSS_CC=$(strip $1) ; \ + $${__CROSS_CC} -v > /dev/null 2>&1 ; \ if test $$? -ne 0 ; then \ - echo "Cannot execute cross-compiler '$(TARGET_CC)'" ; \ + echo "Cannot execute cross-compiler '$${__CROSS_CC}'" ; \ + exit 1 ; \ + fi + +# +# Check for toolchains known not to work with Buildroot. For now, we +# only check for Angstrom toolchains, by looking at the vendor part of +# the host tuple. +# +# $1: cross-gcc path +# +check_unusable_toolchain = \ + __CROSS_CC=$(strip $1) ; \ + vendor=`$${__CROSS_CC} -dumpmachine | cut -f2 -d'-'` ; \ + if test "$${vendor}" = "angstrom" ; then \ + echo "Angstrom toolchains are not pure toolchains: they contain" ; \ + echo "many other libraries than just the C library, which makes" ; \ + echo "them unsuitable as external toolchains for build systems" ; \ + echo "such as Buildroot." ; \ exit 1 ; \ fi diff --git a/toolchain/kernel-headers/Config.in b/toolchain/kernel-headers/Config.in deleted file mode 100644 index 087549f2c3..0000000000 --- a/toolchain/kernel-headers/Config.in +++ /dev/null @@ -1,52 +0,0 @@ -# Choose the kernel headers to use for kernel-headers target. This is -# ignored if you are building your own kernel or using the system kernel. -# - -comment "Kernel Header Options" - -choice - prompt "Kernel Headers" - default BR2_KERNEL_HEADERS_2_6_37 - help - Select the version of kernel header files you wish to use. - You must select the correct set of header files to match - the kernel you intend to use on your target system. - - For the snapshot, you have to provide the - linux-2.6.tar.bz2 tarball in your download dir. - - config BR2_KERNEL_HEADERS_2_6_34 - depends on BR2_DEPRECATED - bool "Linux 2.6.34.x kernel headers" - - config BR2_KERNEL_HEADERS_2_6_35 - bool "Linux 2.6.35.x kernel headers" - - config BR2_KERNEL_HEADERS_2_6_36 - bool "Linux 2.6.36.x kernel headers" - - config BR2_KERNEL_HEADERS_2_6_37 - bool "Linux 2.6.37.x kernel headers" - - config BR2_KERNEL_HEADERS_VERSION - bool "Linux 2.6 (manually specified version)" - - config BR2_KERNEL_HEADERS_SNAP - bool "Local Linux snapshot (linux-2.6.tar.bz2)" -endchoice - -config BR2_DEFAULT_KERNEL_VERSION - string "linux version" - depends on BR2_KERNEL_HEADERS_VERSION - help - Specify the version you want to use. - E.G.: 2.6.37 - -config BR2_DEFAULT_KERNEL_HEADERS - string - default "2.6.34.8" if BR2_KERNEL_HEADERS_2_6_34 - default "2.6.35.11" if BR2_KERNEL_HEADERS_2_6_35 - default "2.6.36.4" if BR2_KERNEL_HEADERS_2_6_36 - default "2.6.37.2" if BR2_KERNEL_HEADERS_2_6_37 - default "2.6" if BR2_KERNEL_HEADERS_SNAP - default $BR2_DEFAULT_KERNEL_VERSION if BR2_KERNEL_HEADERS_VERSION diff --git a/toolchain/kernel-headers/kernel-headers.mk b/toolchain/kernel-headers/kernel-headers.mk deleted file mode 100644 index 7d2e45bf5e..0000000000 --- a/toolchain/kernel-headers/kernel-headers.mk +++ /dev/null @@ -1,93 +0,0 @@ -############################################################# -# -# Setup the kernel headers. I include a generic package of -# kernel headers here, so you shouldn't need to include your -# own. Be aware these kernel headers _will_ get blown away -# by a 'make clean' so don't put anything sacred in here... -# -############################################################# - -DEFAULT_KERNEL_HEADERS:=$(call qstrip,$(BR2_DEFAULT_KERNEL_HEADERS)) - -LINUX_HEADERS_SITE:=127.0.0.1 -LINUX_HEADERS_SOURCE:=unspecified-kernel-headers -LINUX_HEADERS_UNPACK_DIR:=$(TOOLCHAIN_DIR)/linux-libc-headers-null - -# parse linux version string -LNXVER:=$(subst ., , $(strip $(DEFAULT_KERNEL_HEADERS))) -VERSION:=$(word 1, $(LNXVER)) -PATCHLEVEL:=$(word 2, $(LNXVER)) -SUBLEVEL:=$(word 3, $(LNXVER)) -EXTRAVERSION:=$(word 4, $(LNXVER)) -LOCALVERSION:= - -# should contain prepended dot -SUBLEVEL:=$(if $(SUBLEVEL),.$(SUBLEVEL),) -EXTRAVERSION:=$(if $(EXTRAVERSION),.$(EXTRAVERSION),) - -LINUX_HEADERS_VERSION:=$(VERSION).$(PATCHLEVEL)$(SUBLEVEL)$(EXTRAVERSION) -LINUX_HEADERS_SITE:=$(BR2_KERNEL_MIRROR)/linux/kernel/v2.6/ -LINUX_HEADERS_SOURCE:=linux-$(LINUX_HEADERS_VERSION).tar.bz2 -LINUX_HEADERS_CAT:=$(BZCAT) -LINUX_HEADERS_UNPACK_DIR:=$(TOOLCHAIN_DIR)/linux-$(LINUX_HEADERS_VERSION) -LINUX_HEADERS_DIR:=$(TOOLCHAIN_DIR)/linux - -# long term support kernels are stored in a longterm/v2.6.x subdir -ifeq ($(BR2_KERNEL_HEADERS_2_6_34)$(BR2_KERNEL_HEADERS_2_6_35),y) -DEFAULT_KERNEL_HEADERS_MAJOR := \ - $(shell echo $(DEFAULT_KERNEL_HEADERS) | sed 's/\.[0-9]*$$//') -# += adds a space between -LINUX_HEADERS_SITE:= \ - $(LINUX_HEADERS_SITE)longterm/v$(DEFAULT_KERNEL_HEADERS_MAJOR)/ -endif - -LINUX_HEADERS_DEPENDS:= - -$(LINUX_HEADERS_UNPACK_DIR)/.unpacked: $(DL_DIR)/$(LINUX_HEADERS_SOURCE) - rm -rf $(LINUX_HEADERS_DIR) - $(INSTALL) -d $(@D) - $(LINUX_HEADERS_CAT) $(DL_DIR)/$(LINUX_HEADERS_SOURCE) | \ - tar $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) - - touch $@ - -$(LINUX_HEADERS_UNPACK_DIR)/.patched: $(LINUX_HEADERS_UNPACK_DIR)/.unpacked $(LINUX_HEADERS_DEPENDS) - toolchain/patch-kernel.sh $(LINUX_HEADERS_UNPACK_DIR) toolchain/kernel-headers \ - linux-$(LINUX_HEADERS_VERSION)-\*.patch{,.gz,.bz2} -ifneq ($(KERNEL_HEADERS_PATCH_DIR),) - toolchain/patch-kernel.sh $(LINUX_HEADERS_UNPACK_DIR) $(KERNEL_HEADERS_PATCH_DIR) \ - linux-$(LINUX_HEADERS_VERSION)-\*.patch{,.gz,.bz2} -endif - touch $@ - -$(LINUX_HEADERS_DIR)/.configured: $(LINUX_HEADERS_UNPACK_DIR)/.patched - (cd $(LINUX_HEADERS_UNPACK_DIR); \ - $(MAKE) ARCH=$(KERNEL_ARCH) \ - HOSTCC="$(HOSTCC)" HOSTCFLAGS="$(HOSTCFLAGS)" \ - HOSTCXX="$(HOSTCXX)" \ - INSTALL_HDR_PATH=$(LINUX_HEADERS_DIR) headers_install; \ - ) -ifeq ($(BR2_ARCH),"cris") - ln -s $(LINUX_HEADERS_DIR)/include/arch-v10/arch $(LINUX_HEADERS_DIR)/include/arch - cp -a $(LINUX_HEADERS_UNPACK_DIR)/include/linux/user.h $(LINUX_HEADERS_DIR)/include/linux - $(SED) "/^#include /d" $(LINUX_HEADERS_DIR)/include/asm/user.h -endif - touch $@ - -$(DL_DIR)/$(LINUX_HEADERS_SOURCE): -ifeq ($(BR2_KERNEL_HEADERS_SNAP),y) - $(error No local $@ found, cannot continue. Are you sure you wanted to enable BR2_KERNEL_HEADERS_SNAP?) -endif - $(call DOWNLOAD,$(LINUX_HEADERS_SITE),$(LINUX_HEADERS_SOURCE)) - -kernel-headers: $(LINUX_HEADERS_DIR)/.configured - -kernel-headers-source: $(DL_DIR)/$(LINUX_HEADERS_SOURCE) - -kernel-headers-clean: clean - rm -rf $(LINUX_HEADERS_DIR) - -kernel-headers-dirclean: - rm -rf $(LINUX_HEADERS_DIR) - rm -rf $(LINUX_HEADERS_UNPACK_DIR) - -.PHONY: kernel-headers diff --git a/toolchain/kernel-headers/linux-2.6.34.8-scsi-use-__uX-types-for-headers-exported-to-user-space.patch b/toolchain/kernel-headers/linux-2.6.34.8-scsi-use-__uX-types-for-headers-exported-to-user-space.patch deleted file mode 100644 index 1089c71067..0000000000 --- a/toolchain/kernel-headers/linux-2.6.34.8-scsi-use-__uX-types-for-headers-exported-to-user-space.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 877aa0313e7d22b88d04ebef76392e1688fffff9 Mon Sep 17 00:00:00 2001 -From: Peter Korsgaard -Date: Fri, 27 Nov 2009 11:20:54 +0100 -Subject: [PATCH] scsi: use __uX types for headers exported to user space -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Commit 9e4f5e29 (FC Pass Thru support) exported a number of header files -in include/scsi to user space, but didn't change the uX types to the -userspace-compatible __uX types. Without that you'll get compile errors -when including them - E.G.: - -/tmp/include/scsi/scsi.h:145: error: expected specifier-qualifier-list -before ‘u8’ - -Signed-off-by: Peter Korsgaard ---- - include/scsi/scsi.h | 8 ++++---- - include/scsi/scsi_netlink.h | 4 ++-- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h -index 8b4deca..ec3053e 100644 ---- a/include/scsi/scsi.h -+++ b/include/scsi/scsi.h -@@ -149,10 +149,10 @@ struct scsi_cmnd; - - /* defined in T10 SCSI Primary Commands-2 (SPC2) */ - struct scsi_varlen_cdb_hdr { -- u8 opcode; /* opcode always == VARIABLE_LENGTH_CMD */ -- u8 control; -- u8 misc[5]; -- u8 additional_cdb_length; /* total cdb length - 8 */ -+ __u8 opcode; /* opcode always == VARIABLE_LENGTH_CMD */ -+ __u8 control; -+ __u8 misc[5]; -+ __u8 additional_cdb_length; /* total cdb length - 8 */ - __be16 service_action; - /* service specific data follows */ - }; -diff --git a/include/scsi/scsi_netlink.h b/include/scsi/scsi_netlink.h -index 536752c..58ce8fe 100644 ---- a/include/scsi/scsi_netlink.h -+++ b/include/scsi/scsi_netlink.h -@@ -105,8 +105,8 @@ struct scsi_nl_host_vendor_msg { - * PCI : ID data is the 16 bit PCI Registered Vendor ID - */ - #define SCSI_NL_VID_TYPE_SHIFT 56 --#define SCSI_NL_VID_TYPE_MASK ((u64)0xFF << SCSI_NL_VID_TYPE_SHIFT) --#define SCSI_NL_VID_TYPE_PCI ((u64)0x01 << SCSI_NL_VID_TYPE_SHIFT) -+#define SCSI_NL_VID_TYPE_MASK ((__u64)0xFF << SCSI_NL_VID_TYPE_SHIFT) -+#define SCSI_NL_VID_TYPE_PCI ((__u64)0x01 << SCSI_NL_VID_TYPE_SHIFT) - #define SCSI_NL_VID_ID_MASK (~ SCSI_NL_VID_TYPE_MASK) - - --- -1.7.0 - diff --git a/toolchain/kernel-headers/linux-2.6.35.11-scsi-use-__uX-types-for-headers-exported-to-user-space.patch b/toolchain/kernel-headers/linux-2.6.35.11-scsi-use-__uX-types-for-headers-exported-to-user-space.patch deleted file mode 100644 index 1089c71067..0000000000 --- a/toolchain/kernel-headers/linux-2.6.35.11-scsi-use-__uX-types-for-headers-exported-to-user-space.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 877aa0313e7d22b88d04ebef76392e1688fffff9 Mon Sep 17 00:00:00 2001 -From: Peter Korsgaard -Date: Fri, 27 Nov 2009 11:20:54 +0100 -Subject: [PATCH] scsi: use __uX types for headers exported to user space -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Commit 9e4f5e29 (FC Pass Thru support) exported a number of header files -in include/scsi to user space, but didn't change the uX types to the -userspace-compatible __uX types. Without that you'll get compile errors -when including them - E.G.: - -/tmp/include/scsi/scsi.h:145: error: expected specifier-qualifier-list -before ‘u8’ - -Signed-off-by: Peter Korsgaard ---- - include/scsi/scsi.h | 8 ++++---- - include/scsi/scsi_netlink.h | 4 ++-- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h -index 8b4deca..ec3053e 100644 ---- a/include/scsi/scsi.h -+++ b/include/scsi/scsi.h -@@ -149,10 +149,10 @@ struct scsi_cmnd; - - /* defined in T10 SCSI Primary Commands-2 (SPC2) */ - struct scsi_varlen_cdb_hdr { -- u8 opcode; /* opcode always == VARIABLE_LENGTH_CMD */ -- u8 control; -- u8 misc[5]; -- u8 additional_cdb_length; /* total cdb length - 8 */ -+ __u8 opcode; /* opcode always == VARIABLE_LENGTH_CMD */ -+ __u8 control; -+ __u8 misc[5]; -+ __u8 additional_cdb_length; /* total cdb length - 8 */ - __be16 service_action; - /* service specific data follows */ - }; -diff --git a/include/scsi/scsi_netlink.h b/include/scsi/scsi_netlink.h -index 536752c..58ce8fe 100644 ---- a/include/scsi/scsi_netlink.h -+++ b/include/scsi/scsi_netlink.h -@@ -105,8 +105,8 @@ struct scsi_nl_host_vendor_msg { - * PCI : ID data is the 16 bit PCI Registered Vendor ID - */ - #define SCSI_NL_VID_TYPE_SHIFT 56 --#define SCSI_NL_VID_TYPE_MASK ((u64)0xFF << SCSI_NL_VID_TYPE_SHIFT) --#define SCSI_NL_VID_TYPE_PCI ((u64)0x01 << SCSI_NL_VID_TYPE_SHIFT) -+#define SCSI_NL_VID_TYPE_MASK ((__u64)0xFF << SCSI_NL_VID_TYPE_SHIFT) -+#define SCSI_NL_VID_TYPE_PCI ((__u64)0x01 << SCSI_NL_VID_TYPE_SHIFT) - #define SCSI_NL_VID_ID_MASK (~ SCSI_NL_VID_TYPE_MASK) - - --- -1.7.0 - diff --git a/toolchain/mklibs/Config.in b/toolchain/mklibs/Config.in deleted file mode 100644 index 2298a3e515..0000000000 --- a/toolchain/mklibs/Config.in +++ /dev/null @@ -1,5 +0,0 @@ -config BR2_MKLIBS - bool "Run mklibs on the built root filesystem" - help - Recompiles all the shared libraries to only include the - symbols actually needed to run the binaries on the target diff --git a/toolchain/mklibs/mklibs.mk b/toolchain/mklibs/mklibs.mk deleted file mode 100644 index 2dac984605..0000000000 --- a/toolchain/mklibs/mklibs.mk +++ /dev/null @@ -1,49 +0,0 @@ -###################################################################### -# -# mklibs -# -###################################################################### -MKLIBS_PROGRAM:=$(STAGING_DIR)/bin/mklibs.py - -$(MKLIBS_PROGRAM): toolchain/mklibs/mklibs.py - cp -dpf toolchain/mklibs/mklibs.py $@ - -mklibs-clean: - rm -f $(MKLIBS_PROGRAM) - -mklibs-dirclean: - true - -############################################################# -# -# Run mklibs -# -############################################################# -MKLIBS_PYTHON:=$(shell which python) -ifeq ($(MKLIBS_PYTHON),) - MKLIBS_PYTHON=/usr/bin/python -endif - -$(STAGING_DIR)/mklibs-stamp: $(MKLIBS_PROGRAM) $(MKLIBS_PYTHON) $(STAGING_DIR)/lib/* - find $(TARGET_DIR) -type f -perm +100 -exec \ - file -r -N -F '' {} + | \ - awk ' /executable.*dynamically/ { print $$1 }' > $(STAGING_DIR)/mklibs-progs - cd $(TARGET_DIR); PATH=$(PATH):$(STAGING_DIR)/bin $(MKLIBS_PYTHON) $(MKLIBS_PROGRAM) \ - --target $(REAL_GNU_TARGET_NAME) --root $(STAGING_DIR) -d ./ \ - `cat $(STAGING_DIR)/mklibs-progs` - touch $@ - -# this empty target allows a mklibs dependeny to be included in the -# target targets, but it will be only invoked if BR2_MKLIBS is conf'ed -.PHONY: mklibs -mklibs: - -############################################################# -# -# Toplevel Makefile options -# -############################################################# - -ifeq ($(BR2_MKLIBS),y) -mklibs: $(STAGING_DIR)/mklibs-stamp -endif diff --git a/toolchain/mklibs/mklibs.py b/toolchain/mklibs/mklibs.py deleted file mode 100644 index a84fd42fa2..0000000000 --- a/toolchain/mklibs/mklibs.py +++ /dev/null @@ -1,597 +0,0 @@ -#! /usr/bin/python - -# mklibs.py: An automated way to create a minimal /lib/ directory. -# -# Copyright 2001 by Falk Hueffner -# & Goswin Brederlow -# -# mklibs.sh by Marcus Brinkmann -# used as template -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -# HOW IT WORKS -# -# - Gather all unresolved symbols and libraries needed by the programs -# and reduced libraries -# - Gather all symbols provided by the already reduced libraries -# (none on the first pass) -# - If all symbols are provided we are done -# - go through all libraries and remember what symbols they provide -# - go through all unresolved/needed symbols and mark them as used -# - for each library: -# - find pic file (if not present copy and strip the so) -# - compile in only used symbols -# - strip -# - back to the top - -# TODO -# * complete argument parsing as given as comment in main - -import commands -import string -import re -import sys -import os -import glob -import getopt -from stat import * - -DEBUG_NORMAL = 1 -DEBUG_VERBOSE = 2 -DEBUG_SPAM = 3 - -debuglevel = DEBUG_NORMAL - -def debug(level, *msg): - if debuglevel >= level: - print string.join(msg) - -# A simple set class. It should be replaced with the standard sets.Set -# type as soon as Python 2.3 is out. -class Set: - def __init__(self): - self.__dict = {} - - def add(self, obj): - self.__dict[obj] = 1 - - def contains(self, obj): - return self.__dict.has_key(obj) - - def merge(self, s): - for e in s.elems(): - self.add(e) - - def elems(self): - return self.__dict.keys() - - def size(self): - return len(self.__dict) - - def __eq__(self, other): - return self.__dict == other.__dict - - def __str__(self): - return `self.__dict.keys()` - - def __repr__(self): - return `self.__dict.keys()` - -# return a list of lines of output of the command -def command(command, *args): - debug(DEBUG_SPAM, "calling", command, string.join(args)) - (status, output) = commands.getstatusoutput(command + ' ' + string.join(args)) - if os.WEXITSTATUS(status) != 0: - print "Command failed with status", os.WEXITSTATUS(status), ":", \ - command, string.join(args) - print "With output:", output - sys.exit(1) - return string.split(output, '\n') - -# Filter a list according to a regexp containing a () group. Return -# a Set. -def regexpfilter(list, regexp, groupnr = 1): - pattern = re.compile(regexp) - result = Set() - for x in list: - match = pattern.match(x) - if match: - result.add(match.group(groupnr)) - - return result - -# Return a Set of rpath strings for the passed object -def rpath(obj): - if not os.access(obj, os.F_OK): - raise "Cannot find lib: " + obj - output = command(target + "objdump", "--private-headers", obj) - return map(lambda x: root + "/" + x, regexpfilter(output, ".*RPATH\s*(\S+)$").elems()) - -# Return a Set of libraries the passed objects depend on. -def library_depends(obj): - if not os.access(obj, os.F_OK): - raise "Cannot find lib: " + obj - output = command(target + "objdump", "--private-headers", obj) - return regexpfilter(output, ".*NEEDED\s*(\S+)$") - -# Return a list of libraries the passed objects depend on. The -# libraries are in "-lfoo" format suitable for passing to gcc. -def library_depends_gcc_libnames(obj): - if not os.access(obj, os.F_OK): - raise "Cannot find lib: " + obj - output = command(target + "objdump", "--private-headers", obj) - output = regexpfilter(output, ".*NEEDED\s*lib(\S+)\.so.*$") - if not output.elems(): - return "" - else: - return "-l" + string.join(output.elems(), " -l") - -# Scan readelf output. Example: -# Num: Value Size Type Bind Vis Ndx Name -# 1: 000000012002ab48 168 FUNC GLOBAL DEFAULT UND strchr@GLIBC_2.0 (2) -symline_regexp = \ - re.compile("\s*\d+: .+\s+\d+\s+\w+\s+(\w+)+\s+\w+\s+(\w+)\s+([^\s@]+)") - -# Return undefined symbols in an object as a Set of tuples (name, weakness) -def undefined_symbols(obj): - if not os.access(obj, os.F_OK): - raise "Cannot find lib" + obj - - result = Set() - output = command(target + "readelf", "-s", "-W", obj) - for line in output: - match = symline_regexp.match(line) - if match: - bind, ndx, name = match.groups() - if ndx == "UND": - result.add((name, bind == "WEAK")) - return result - -# Return a Set of symbols provided by a library -def provided_symbols(obj): - if not os.access(obj, os.F_OK): - raise "Cannot find lib" + obj - - result = Set() - debug(DEBUG_SPAM, "provided_symbols result = ", `result`) - output = command(target + "readelf", "-s", "-W", obj) - for line in output: - match = symline_regexp.match(line) - if match: - bind, ndx, name = match.groups() - if bind != "LOCAL" and not ndx in ("UND", "ABS"): - debug(DEBUG_SPAM, "provided_symbols adding ", `name`) - result.add(name) - return result - -# Return real target of a symlink -def resolve_link(file): - debug(DEBUG_SPAM, "resolving", file) - while S_ISLNK(os.lstat(file)[ST_MODE]): - new_file = os.readlink(file) - if new_file[0] != "/": - file = os.path.join(os.path.dirname(file), new_file) - else: - file = new_file - debug(DEBUG_SPAM, "resolved to", file) - return file - -# Find complete path of a library, by searching in lib_path -def find_lib(lib): - for path in lib_path: - if os.access(path + "/" + lib, os.F_OK): - return path + "/" + lib - - return "" - -# Find a PIC archive for the library -def find_pic(lib): - base_name = so_pattern.match(lib).group(1) - for path in lib_path: - for file in glob.glob(path + "/" + base_name + "_pic.a"): - if os.access(file, os.F_OK): - return resolve_link(file) - return "" - -# Find a PIC .map file for the library -def find_pic_map(lib): - base_name = so_pattern.match(lib).group(1) - for path in lib_path: - for file in glob.glob(path + "/" + base_name + "_pic.map"): - if os.access(file, os.F_OK): - return resolve_link(file) - return "" - -def extract_soname(so_file): - soname_data = regexpfilter(command(target + "readelf", "--all", "-W", so_file), - ".*SONAME.*\[(.*)\].*") - if soname_data.elems(): - return soname_data.elems()[0] - - return "" -def usage(was_err): - if was_err: - outfd = sys.stderr - else: - outfd = sys.stdout - print >> outfd, "Usage: mklibs [OPTION]... -d DEST FILE ..." - print >> outfd, "Make a set of minimal libraries for FILE(s) in DEST." - print >> outfd, "" - print >> outfd, " -d, --dest-dir DIRECTORY create libraries in DIRECTORY" - print >> outfd, " -D, --no-default-lib omit default libpath (", string.join(default_lib_path, " : "), ")" - print >> outfd, " -L DIRECTORY[:DIRECTORY]... add DIRECTORY(s) to the library search path" - print >> outfd, " --ldlib LDLIB use LDLIB for the dynamic linker" - print >> outfd, " --libc-extras-dir DIRECTORY look for libc extra files in DIRECTORY" - # Ugh... Adding the trailing '-' breaks common practice. - #print >> outfd, " --target TARGET prepend TARGET- to the gcc and binutils calls" - print >> outfd, " --target TARGET prepend TARGET to the gcc and binutils calls" - print >> outfd, " --root ROOT search in ROOT for library rpaths" - print >> outfd, " -v, --verbose explain what is being done" - print >> outfd, " -h, --help display this help and exit" - sys.exit(was_err) - -def version(vers): - print "mklibs: version ",vers - print "" - -#################### main #################### -## Usage: ./mklibs.py [OPTION]... -d DEST FILE ... -## Make a set of minimal libraries for FILE ... in directory DEST. -## -## Options: -## -L DIRECTORY Add DIRECTORY to library search path. -## -D, --no-default-lib Do not use default lib directories of /lib:/usr/lib -## -n, --dry-run Don't actually run any commands; just print them. -## -v, --verbose Print additional progress information. -## -V, --version Print the version number and exit. -## -h, --help Print this help and exit. -## --ldlib Name of dynamic linker (overwrites environment variable ldlib) -## --libc-extras-dir Directory for libc extra files -## --target Use as prefix for gcc or binutils calls -## -## -d, --dest-dir DIRECTORY Create libraries in DIRECTORY. -## -## Required arguments for long options are also mandatory for the short options. - -# Clean the environment -vers="0.12 with uClibc fixes" -os.environ['LC_ALL'] = "C" - -# Argument parsing -opts = "L:DnvVhd:r:" -longopts = ["no-default-lib", "dry-run", "verbose", "version", "help", - "dest-dir=", "ldlib=", "libc-extras-dir=", "target=", "root="] - -# some global variables -lib_rpath = [] -lib_path = [] -dest_path = "DEST" -ldlib = "LDLIB" -include_default_lib_path = "yes" -default_lib_path = ["/lib/", "/usr/lib/", "/usr/X11R6/lib/"] -libc_extras_dir = "/usr/lib/libc_pic" -target = "" -root = "" -so_pattern = re.compile("((lib|ld).*)\.so(\..+)*") -script_pattern = re.compile("^#!\s*/") - -try: - optlist, proglist = getopt.getopt(sys.argv[1:], opts, longopts) -except getopt.GetoptError, msg: - print >> sys.stderr, msg - usage(1) - -for opt, arg in optlist: - if opt in ("-v", "--verbose"): - if debuglevel < DEBUG_SPAM: - debuglevel = debuglevel + 1 - elif opt == "-L": - lib_path.extend(string.split(arg, ":")) - elif opt in ("-d", "--dest-dir"): - dest_path = arg - elif opt in ("-D", "--no-default-lib"): - include_default_lib_path = "no" - elif opt == "--ldlib": - ldlib = arg - elif opt == "--libc-extras-dir": - libc_extras_dir = arg - elif opt == "--target": - #target = arg + "-" - target = arg - elif opt in ("-r", "--root"): - root = arg - elif opt in ("--help", "-h"): - usage(0) - sys.exit(0) - elif opt in ("--version", "-V"): - version(vers) - sys.exit(0) - else: - print "WARNING: unknown option: " + opt + "\targ: " + arg - -if include_default_lib_path == "yes": - lib_path.extend(default_lib_path) - -if ldlib == "LDLIB": - ldlib = os.getenv("ldlib") - -objects = {} # map from inode to filename -for prog in proglist: - inode = os.stat(prog)[ST_INO] - if objects.has_key(inode): - debug(DEBUG_SPAM, prog, "is a hardlink to", objects[inode]) - elif so_pattern.match(prog): - debug(DEBUG_SPAM, prog, "is a library") - elif script_pattern.match(open(prog).read(256)): - debug(DEBUG_SPAM, prog, "is a script") - else: - objects[inode] = prog - -if not ldlib: - pattern = re.compile(".*Requesting program interpreter:.*/([^\]/]+).*") - for obj in objects.values(): - output = command(target + "readelf", "--program-headers", obj) - for x in output: - match = pattern.match(x) - if match: - ldlib = match.group(1) - break - if ldlib: - break - -if not ldlib: - sys.exit("E: Dynamic linker not found, aborting.") - -debug(DEBUG_NORMAL, "I: Using", ldlib, "as dynamic linker.") - -pattern = re.compile(".*ld-uClibc.*"); -if pattern.match(ldlib): - uclibc = 1 -else: - uclibc = 0 - -# Check for rpaths -for obj in objects.values(): - rpath_val = rpath(obj) - if rpath_val: - if root: - if debuglevel >= DEBUG_VERBOSE: - print "Adding rpath " + string.join(rpath_val, ":") + " for " + obj - lib_rpath.extend(rpath_val) - else: - print "warning: " + obj + " may need rpath, but --root not specified" - -lib_path.extend(lib_rpath) - -passnr = 1 -previous_pass_unresolved = Set() -while 1: - debug(DEBUG_NORMAL, "I: library reduction pass", `passnr`) - if debuglevel >= DEBUG_VERBOSE: - print "Objects:", - for obj in objects.values(): - print obj[string.rfind(obj, '/') + 1:], - print - - passnr = passnr + 1 - # Gather all already reduced libraries and treat them as objects as well - small_libs = [] - for lib in regexpfilter(os.listdir(dest_path), "(.*-so-stripped)$").elems(): - obj = dest_path + "/" + lib - small_libs.append(obj) - inode = os.stat(obj)[ST_INO] - if objects.has_key(inode): - debug(DEBUG_SPAM, obj, "is hardlink to", objects[inode]) - else: - objects[inode] = obj - - # DEBUG - for obj in objects.values(): - small_libs.append(obj) - debug(DEBUG_VERBOSE, "Object:", obj) - - # calculate what symbols and libraries are needed - needed_symbols = Set() # Set of (name, weakness-flag) - libraries = Set() - for obj in objects.values(): - needed_symbols.merge(undefined_symbols(obj)) - libraries.merge(library_depends(obj)) - - # FIXME: on i386 this is undefined but not marked UND - # I don't know how to detect those symbols but this seems - # to be the only one and including it on alpha as well - # doesn't hurt. I guess all archs can live with this. - needed_symbols.add(("sys_siglist", 1)) - - # calculate what symbols are present in small_libs - present_symbols = Set() - for lib in small_libs: - present_symbols.merge(provided_symbols(lib)) - - # are we finished? - using_ctor_dtor = 0 - num_unresolved = 0 - present_symbols_elems = present_symbols.elems() - unresolved = Set() - for (symbol, is_weak) in needed_symbols.elems(): - if not symbol in present_symbols_elems: - debug(DEBUG_SPAM, "Still need:", symbol, `is_weak`) - unresolved.add((symbol, is_weak)) - num_unresolved = num_unresolved + 1 - - debug (DEBUG_NORMAL, `needed_symbols.size()`, "symbols,", - `num_unresolved`, "unresolved") - - if num_unresolved == 0: - break - - if unresolved == previous_pass_unresolved: - # No progress in last pass. Verify all remaining symbols are weak. - for (symbol, is_weak) in unresolved.elems(): - if not is_weak: - raise "Unresolvable symbol " + symbol - break - - previous_pass_unresolved = unresolved - - library_symbols = {} - library_symbols_used = {} - symbol_provider = {} - - # Calculate all symbols each library provides - for library in libraries.elems(): - path = find_lib(library) - if not path: - sys.exit("Library not found: " + library + " in path: " - + string.join(lib_path, " : ")) - symbols = provided_symbols(path) - library_symbols[library] = Set() - library_symbols_used[library] = Set() - for symbol in symbols.elems(): - if symbol_provider.has_key(symbol): - # in doubt, prefer symbols from libc - if re.match("^libc[\.-]", library): - library_symbols[library].add(symbol) - symbol_provider[symbol] = library - else: - debug(DEBUG_SPAM, "duplicate symbol", symbol, "in", - symbol_provider[symbol], "and", library) - else: - library_symbols[library].add(symbol) - symbol_provider[symbol] = library - - # Fixup support for constructors and destructors - if symbol_provider.has_key("_init"): - debug(DEBUG_VERBOSE, library, ": Library has a constructor!"); - using_ctor_dtor = 1 - library_symbols[library].add("_init") - symbol_provider["_init"] = library - library_symbols_used[library].add("_init") - - if symbol_provider.has_key("_fini"): - debug(DEBUG_VERBOSE, library, ": Library has a destructor!"); - using_ctor_dtor = 1 - library_symbols[library].add("_fini") - symbol_provider["_fini"] = library - library_symbols_used[library].add("_fini") - - # which symbols are actually used from each lib - for (symbol, is_weak) in needed_symbols.elems(): - if not symbol_provider.has_key(symbol): - if not is_weak: - if not uclibc or (symbol != "main"): - raise "No library provides non-weak " + symbol - else: - lib = symbol_provider[symbol] - library_symbols_used[lib].add(symbol) - - # reduce libraries - for library in libraries.elems(): - debug(DEBUG_VERBOSE, "reducing", library) - debug(DEBUG_SPAM, "using: " + string.join(library_symbols_used[library].elems())) - so_file = find_lib(library) - if root and (re.compile("^" + root).search(so_file)): - debug(DEBUG_VERBOSE, "no action required for " + so_file) - continue - so_file_name = os.path.basename(so_file) - if not so_file: - sys.exit("File not found:" + library) - pic_file = find_pic(library) - if not pic_file: - # No pic file, so we have to use the .so file, no reduction - debug(DEBUG_VERBOSE, "No pic file found for", so_file, "; copying") - command(target + "objcopy", "--strip-unneeded -R .note -R .comment", - so_file, dest_path + "/" + so_file_name + "-so-stripped") - else: - # we have a pic file, recompile - debug(DEBUG_SPAM, "extracting from:", pic_file, "so_file:", so_file) - soname = extract_soname(so_file) - if soname == "": - debug(DEBUG_VERBOSE, so_file, " has no soname, copying") - continue - debug(DEBUG_SPAM, "soname:", soname) - base_name = so_pattern.match(library).group(1) - # libc needs its soinit.o and sofini.o as well as the pic - if (base_name == "libc") and not uclibc: - # force dso_handle.os to be included, otherwise reduced libc - # may segfault in ptmalloc_init due to undefined weak reference - extra_flags = find_lib(ldlib) + " -u __dso_handle" - extra_pre_obj = libc_extras_dir + "/soinit.o" - extra_post_obj = libc_extras_dir + "/sofini.o" - else: - extra_flags = "" - extra_pre_obj = "" - extra_post_obj = "" - map_file = find_pic_map(library) - if map_file: - extra_flags = extra_flags + " -Wl,--version-script=" + map_file - if library_symbols_used[library].elems(): - joined_symbols = "-u" + string.join(library_symbols_used[library].elems(), " -u") - else: - joined_symbols = "" - if using_ctor_dtor == 1: - extra_flags = extra_flags + " -shared" - # compile in only used symbols - command(target + "gcc", - "-nostdlib -nostartfiles -shared -Wl,-soname=" + soname,\ - joined_symbols, \ - "-o", dest_path + "/" + so_file_name + "-so", \ - extra_pre_obj, \ - pic_file, \ - extra_post_obj, \ - extra_flags, \ - "-lgcc -L", dest_path, \ - "-L" + string.join(lib_path, " -L"), \ - library_depends_gcc_libnames(so_file)) - # strip result - command(target + "objcopy", "--strip-unneeded -R .note -R .comment", - dest_path + "/" + so_file_name + "-so", - dest_path + "/" + so_file_name + "-so-stripped") - ## DEBUG - debug(DEBUG_VERBOSE, so_file, "\t", `os.stat(so_file)[ST_SIZE]`) - debug(DEBUG_VERBOSE, dest_path + "/" + so_file_name + "-so", "\t", - `os.stat(dest_path + "/" + so_file_name + "-so")[ST_SIZE]`) - debug(DEBUG_VERBOSE, dest_path + "/" + so_file_name + "-so-stripped", - "\t", `os.stat(dest_path + "/" + so_file_name + "-so-stripped")[ST_SIZE]`) - -# Finalising libs and cleaning up -for lib in regexpfilter(os.listdir(dest_path), "(.*)-so-stripped$").elems(): - os.rename(dest_path + "/" + lib + "-so-stripped", dest_path + "/" + lib) -for lib in regexpfilter(os.listdir(dest_path), "(.*-so)$").elems(): - os.remove(dest_path + "/" + lib) - -# Canonicalize library names. -for lib in regexpfilter(os.listdir(dest_path), "(.*so[.\d]*)$").elems(): - this_lib_path = dest_path + "/" + lib - if os.path.islink(this_lib_path): - debug(DEBUG_VERBOSE, "Unlinking %s." % lib) - os.remove(this_lib_path) - continue - soname = extract_soname(this_lib_path) - if soname: - debug(DEBUG_VERBOSE, "Moving %s to %s." % (lib, soname)) - os.rename(dest_path + "/" + lib, dest_path + "/" + soname) - -# Make sure the dynamic linker is present and is executable -ld_file = find_lib(ldlib) -ld_file_name = os.path.basename(ld_file) - -if not os.access(dest_path + "/" + ld_file_name, os.F_OK): - debug(DEBUG_NORMAL, "I: stripping and copying dynamic linker.") - command(target + "objcopy", "--strip-unneeded -R .note -R .comment", - ld_file, dest_path + "/" + ld_file_name) - -os.chmod(dest_path + "/" + ld_file_name, 0755) diff --git a/toolchain/patch-kernel.sh b/toolchain/patch-kernel.sh deleted file mode 100755 index 76cb9f7533..0000000000 --- a/toolchain/patch-kernel.sh +++ /dev/null @@ -1,66 +0,0 @@ -#! /bin/bash -# A little script I whipped up to make it easy to -# patch source trees and have sane error handling -# -Erik -# -# (c) 2002 Erik Andersen - -# Set directories from arguments, or use defaults. -targetdir=${1-.} -patchdir=${2-../kernel-patches} -shift 2 -patchpattern=${@-*} - -if [ ! -d "${targetdir}" ] ; then - echo "Aborting. '${targetdir}' is not a directory." - exit 1 -fi -if [ ! -d "${patchdir}" ] ; then - echo "Aborting. '${patchdir}' is not a directory." - exit 1 -fi - -for i in `cd ${patchdir}; ls -d ${patchpattern} 2> /dev/null` ; do - apply="patch -p1 -E -d" - uncomp_parm="" - if [ -d "${patchdir}/$i" ] ; then - type="directory overlay" - uncomp="tar cf - --exclude=.svn --no-anchored -C" - uncomp_parm="." - apply="tar xvf - -C" - else case "$i" in - *.gz) - type="gzip"; uncomp="gunzip -dc"; ;; - *.bz) - type="bzip"; uncomp="bunzip -dc"; ;; - *.bz2) - type="bzip2"; uncomp="bunzip2 -dc"; ;; - *.zip) - type="zip"; uncomp="unzip -d"; ;; - *.Z) - type="compress"; uncomp="uncompress -c"; ;; - *.tgz) - type="tar gzip"; uncomp="gunzip -dc"; apply="tar xvf - -C"; ;; - *.tar) - type="tar"; uncomp="cat"; apply="tar xvf - -C"; ;; - *) - type="plaintext"; uncomp="cat"; ;; - esac fi - echo "" - echo "Applying ${i} using ${type}: " - echo ${i} | cat >> ${targetdir}/.applied_patches_list - ${uncomp} ${patchdir}/${i} ${uncomp_parm} | ${apply} ${targetdir} - if [ $? != 0 ] ; then - echo "Patch failed! Please fix $i!" - exit 1 - fi -done - -# Check for rejects... -if [ "`find $targetdir/ '(' -name '*.rej' -o -name '.*.rej' ')' -print`" ] ; then - echo "Aborting. Reject files found." - exit 1 -fi - -# Remove backup files -find $targetdir/ '(' -name '*.orig' -o -name '.*.orig' ')' -exec rm -f {} \; diff --git a/toolchain/toolchain-buildroot.mk b/toolchain/toolchain-buildroot.mk deleted file mode 100644 index c611562765..0000000000 --- a/toolchain/toolchain-buildroot.mk +++ /dev/null @@ -1,9 +0,0 @@ -# Include files required for the internal toolchain backend - -include toolchain/dependencies/dependencies.mk -include toolchain/elf2flt/elf2flt.mk -include toolchain/gcc/gcc-uclibc-4.x.mk -include toolchain/gdb/gdb.mk -include toolchain/kernel-headers/kernel-headers.mk -include toolchain/mklibs/mklibs.mk -include toolchain/uClibc/uclibc.mk diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in index 38948904fe..81593f145b 100644 --- a/toolchain/toolchain-buildroot/Config.in +++ b/toolchain/toolchain-buildroot/Config.in @@ -1,8 +1,71 @@ # Config entries for internal toolchain backend if BR2_TOOLCHAIN_BUILDROOT -source "toolchain/kernel-headers/Config.in" -source "toolchain/uClibc/Config.in" +source "package/linux-headers/Config.in.host" + +choice + prompt "C library" + +config BR2_TOOLCHAIN_BUILDROOT_UCLIBC + bool "uClibc" + select BR2_TOOLCHAIN_USES_UCLIBC + help + This option selects uClibc as the C library for the + cross-compilation toolchain. + + http://uclibc.org + +config BR2_TOOLCHAIN_BUILDROOT_EGLIBC + bool "eglibc" + depends on BR2_arm || BR2_armeb || BR2_aarch64 || \ + BR2_i386 || BR2_mips || BR2_mipsel || \ + BR2_mips64 || BR2_mips64el || BR2_powerpc || \ + BR2_sh || BR2_sh64 || BR2_sparc || \ + BR2_x86_64 + depends on BR2_USE_MMU + depends on !BR2_PREFER_STATIC_LIB + select BR2_TOOLCHAIN_USES_GLIBC + # our eglibc.mk enables RPC support + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + This option selects eglibc as the C library for the + cross-compilation toolchain. + + http://eglibc.org + +config BR2_TOOLCHAIN_BUILDROOT_GLIBC + bool "glibc" + depends on BR2_arm || BR2_armeb || BR2_aarch64 || \ + BR2_i386 || BR2_mips || BR2_mipsel || \ + BR2_mips64 || BR2_mips64el || BR2_powerpc || \ + BR2_sh || BR2_sh64 || BR2_sparc || \ + BR2_x86_64 + select BR2_TOOLCHAIN_USES_GLIBC + depends on !BR2_PREFER_STATIC_LIB + # our glibc.mk enables RPC support + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + This option selects glibc as the C library for the + cross-compilation toolchain. + + http://www.gnu.org/software/libc/ + +comment "(e)glibc only available with shared lib support" + depends on BR2_PREFER_STATIC_LIB + +endchoice + +config BR2_TOOLCHAIN_BUILDROOT_LIBC + string + default "uclibc" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC + # Both glibc and eglibc are handled by the package called + # 'glibc' + default "glibc" if BR2_TOOLCHAIN_BUILDROOT_EGLIBC + default "glibc" if BR2_TOOLCHAIN_BUILDROOT_GLIBC + +source "package/uclibc/Config.in" + source "package/binutils/Config.in.host" -source "toolchain/gcc/Config.in" +source "package/gcc/Config.in.host" +source "package/elf2flt/Config.in.host" endif diff --git a/toolchain/toolchain-buildroot/Config.in.2 b/toolchain/toolchain-buildroot/Config.in.2 deleted file mode 100644 index 3fd433ac44..0000000000 --- a/toolchain/toolchain-buildroot/Config.in.2 +++ /dev/null @@ -1,121 +0,0 @@ -# Buildroot backend specific options - -if BR2_TOOLCHAIN_BUILDROOT - -comment "Toolchain Options" - -config BR2_TOOLCHAIN_BUILDROOT_LARGEFILE - bool "Enable large file (files > 2 GB) support" - select BR2_LARGEFILE - help - Enable this option if you want your toolchain to support - files bigger than 2 GB. - -config BR2_TOOLCHAIN_BUILDROOT_INET_IPV6 - bool "Enable IPv6 support" - select BR2_INET_IPV6 - help - Enable this option if you want your toolchain to support - IPv6. - -config BR2_TOOLCHAIN_BUILDROOT_INET_RPC - bool "Enable RPC support" - select BR2_INET_RPC - help - Enable this option if you want your toolchain to support - RPC (needed for NFS, for example). - -config BR2_TOOLCHAIN_BUILDROOT_WCHAR - bool "Enable WCHAR support" - select BR2_USE_WCHAR - help - Enable this option if you want your toolchain to support - wide characters (i.e characters longer than 8 bits, needed - for locale support). - -config BR2_TOOLCHAIN_BUILDROOT_LOCALE - bool "Enable toolchain locale/i18n support" - select BR2_TOOLCHAIN_BUILDROOT_WCHAR - select BR2_ENABLE_LOCALE - help - Enable this option if you want your toolchain to support - localization and internationalization. - -config BR2_TOOLCHAIN_BUILDROOT_PROGRAM_INVOCATION - bool "Enable 'program invocation name' support" - select BR2_PROGRAM_INVOCATION - help - Enable this option if you want your toolchain to support the - GNU-specific program_invocation_name and - program_invocation_short_name strings. Some GNU packages - (like tar and coreutils) utilize these for extra useful - output, but in general are not required. - -config BR2_TOOLCHAIN_BUILDROOT_CXX - bool "Enable C++ support" - select BR2_INSTALL_LIBSTDCPP - depends on !(! BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE && \ - BR2_TOOLCHAIN_BUILDROOT_LOCALE && \ - BR2_UCLIBC_VERSION_0_9_31) - help - Enable this option if you want your toolchain to support the - C++ language and you want C++ libraries to be installed on - your target system. - -comment "C++ support broken in uClibc 0.9.31 with locale enabled with gcc 4.2" - depends on !BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE && \ - BR2_TOOLCHAIN_BUILDROOT_LOCALE && \ - BR2_UCLIBC_VERSION_0_9_31 - -config BR2_TOOLCHAIN_BUILDROOT_USE_SSP - bool "Enable stack protection support" - help - Enable stack smashing protection support using GCCs - -fstack-protector[-all] option. - - See http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt - for details. - -choice - prompt "Thread library implementation" - default BR2_PTHREADS_OLD - help - Use this option to select the thread library implementation - that should be used in your toolchain. Not all thread - variants work with all versions of uClibc, the "linuxthreads - (stable/old)" may be a working fallback if you need - threading at all. - - config BR2_PTHREADS_NONE - bool "none" - - config BR2_PTHREADS - bool "linuxthreads" - select BR2_TOOLCHAIN_HAS_THREADS - - config BR2_PTHREADS_OLD - bool "linuxthreads (stable/old)" - select BR2_TOOLCHAIN_HAS_THREADS - - config BR2_PTHREADS_NATIVE - bool "Native POSIX Threading (NPTL)" - select BR2_TOOLCHAIN_HAS_THREADS - depends on BR2_UCLIBC_VERSION_SNAPSHOT || BR2_UCLIBC_VERSION_0_9_32 -endchoice - -source "toolchain/elf2flt/Config.in" -source "toolchain/mklibs/Config.in" - -config BR2_VFP_FLOAT - bool "Use ARM Vector Floating Point unit" - depends on !BR2_SOFT_FLOAT - depends on BR2_arm || BR2_armeb - help - Setting this option will enable the "-mfpu=vfp" option. - If your ARM CPU has a Vector Floating Point Unit (VFP) - and the toolchain supports the option, then the - code can be optimized. - - Most people will answer N. - -endif diff --git a/toolchain/toolchain-buildroot/toolchain-buildroot.mk b/toolchain/toolchain-buildroot/toolchain-buildroot.mk new file mode 100644 index 0000000000..f1f07a9c93 --- /dev/null +++ b/toolchain/toolchain-buildroot/toolchain-buildroot.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# toolchain-buildroot +# +################################################################################ + +TOOLCHAIN_BUILDROOT_SOURCE = + +BUILDROOT_LIBC = $(call qstrip,$(BR2_TOOLCHAIN_BUILDROOT_LIBC)) + +# Triggering the build of the host-gcc-final will automatically do the +# build of binutils, uClibc, kernel headers and all the intermediate +# gcc steps. + +TOOLCHAIN_BUILDROOT_DEPENDENCIES = host-gcc-final + +$(eval $(generic-package)) diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in index ec8dcc79ae..c5735ba5cc 100644 --- a/toolchain/toolchain-common.in +++ b/toolchain/toolchain-common.in @@ -3,7 +3,7 @@ # we want gdb config in the middle of both source and external # toolchains, but mconf won't let us source the same file twice, # so put it here instead -source "toolchain/gdb/Config.in" +source "package/gdb/Config.in.host" config BR2_LARGEFILE bool @@ -11,7 +11,7 @@ config BR2_LARGEFILE config BR2_INET_IPV6 bool -config BR2_INET_RPC +config BR2_TOOLCHAIN_HAS_NATIVE_RPC bool config BR2_USE_WCHAR @@ -20,15 +20,21 @@ config BR2_USE_WCHAR config BR2_ENABLE_LOCALE bool -config BR2_PROGRAM_INVOCATION - bool - config BR2_INSTALL_LIBSTDCPP bool config BR2_TOOLCHAIN_HAS_THREADS bool +config BR2_TOOLCHAIN_HAS_THREADS_DEBUG + bool + +config BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS + bool + +config BR2_TOOLCHAIN_HAS_SSP + bool + config BR2_ENABLE_LOCALE_PURGE bool "Purge unwanted locales" help @@ -50,6 +56,18 @@ config BR2_ENABLE_LOCALE_WHITELIST will be available on the target - That purely depends on the support for that locale in the selected packages. +config BR2_GENERATE_LOCALE + string "Generate locale data" + default "" + depends on \ + BR2_TOOLCHAIN_BUILDROOT || \ + BR2_TOOLCHAIN_USES_GLIBC + help + Generate support for a list of locales. Locales can be + specified with or without encoding, when no encoding is + specified, UTF-8 is assumed. Examples of locales: en_US, + fr_FR.UTF-8. + config BR2_EXT_TOOL_DIRS_EXTRA string "Additional dirs to copy from toolchain" default "" @@ -67,9 +85,7 @@ config BR2_EXT_TOOL_DIRS_EXTRA config BR2_NEEDS_GETTEXT bool - default y if BR2_TOOLCHAIN_BUILDROOT - default y if BR2_TOOLCHAIN_EXTERNAL_UCLIBC - default y if BR2_TOOLCHAIN_CTNG_uClibc + default y if BR2_TOOLCHAIN_USES_UCLIBC config BR2_NEEDS_GETTEXT_IF_LOCALE bool @@ -82,23 +98,21 @@ config BR2_USE_MMU If your target has a MMU, you should say Y here. If you are unsure, just say Y. -config BR2_PREFER_SOFT_FLOAT - bool - default y if BR2_arm || BR2_armeb || BR2_avr32 || BR2_mips || BR2_mipsel - -config BR2_SOFT_FLOAT - bool "Use software floating point by default" - depends on BR2_arm || BR2_armeb || BR2_avr32 || BR2_mips || BR2_mipsel || BR2_powerpc - default $(BR2_PREFER_SOFT_FLOAT) - help - If your target CPU does not have a Floating Point Unit (FPU) or a - kernel FPU emulator, but you still wish to support floating point - functions, then everything will need to be compiled with soft - floating point support (-msoft-float). - config BR2_TARGET_OPTIMIZATION string "Target Optimizations" default "-pipe" help Optimizations to use when building for the target host. NOTE: gcc optimization level is defined in build options. + +config BR2_TARGET_LDFLAGS + string "Target linker options" + help + Extra options to pass to the linker when building for the target. + +config BR2_ECLIPSE_REGISTER + bool "Register toolchain within Eclipse Buildroot plug-in" + help + This options tells Buildroot to generate the necessary + configuration files to make your toolchain appear within + Eclipse, through the Eclipse Buildroot plugin. diff --git a/toolchain/toolchain-crosstool-ng.mk b/toolchain/toolchain-crosstool-ng.mk deleted file mode 100644 index e480da981c..0000000000 --- a/toolchain/toolchain-crosstool-ng.mk +++ /dev/null @@ -1,11 +0,0 @@ -# Required includes for the external toolchain backend - -# Explicit ordering: -include toolchain/helpers.mk -include toolchain/dependencies/dependencies.mk -include toolchain/elf2flt/elf2flt.mk -include toolchain/gcc/gcc-uclibc-4.x.mk -include toolchain/gdb/gdb.mk -include toolchain/toolchain-crosstool-ng/crosstool-ng.mk -include toolchain/mklibs/mklibs.mk -include toolchain/uClibc/uclibc.mk diff --git a/toolchain/toolchain-crosstool-ng/001-no-cvs.patch b/toolchain/toolchain-crosstool-ng/001-no-cvs.patch deleted file mode 100644 index c82d359415..0000000000 --- a/toolchain/toolchain-crosstool-ng/001-no-cvs.patch +++ /dev/null @@ -1,15 +0,0 @@ -Remove dependency on cvs. - -cvs is used to retrieve newlib, which is not supported -under Buildroot, so cvs is not required. - ---- crosstool-ng-1.8.0/configure.orig 2010-11-27 15:43:52.000000000 +0000 -+++ crosstool-ng-1.8.0/configure 2010-11-27 15:44:10.000000000 +0000 -@@ -359,7 +359,6 @@ - err="'libtool' 1.5.26 or above was not found" - has_or_abort prog=stat - has_or_abort prog="curl wget" --has_or_abort prog=cvs - has_or_abort prog=patch - has_or_abort prog=tar - has_or_abort prog=gzip diff --git a/toolchain/toolchain-crosstool-ng/Config.in b/toolchain/toolchain-crosstool-ng/Config.in deleted file mode 100644 index 1a1041630b..0000000000 --- a/toolchain/toolchain-crosstool-ng/Config.in +++ /dev/null @@ -1,145 +0,0 @@ -# Selection options for crosstool-NG - -if BR2_TOOLCHAIN_CTNG - -choice - prompt "Crosstool-NG C library" - -config BR2_TOOLCHAIN_CTNG_uClibc - bool "uClibc" - -# Although eglibc can be configured to opt-out some features, -# let's not deal with that for the time being, it's complex... -config BR2_TOOLCHAIN_CTNG_eglibc - bool "eglibc" - select BR2_LARGEFILE - select BR2_INET_IPV6 - select BR2_INET_RPC - select BR2_ENABLE_LOCALE - select BR2_USE_WCHAR - select BR2_PROGRAM_INVOCATION - -config BR2_TOOLCHAIN_CTNG_glibc - bool "glibc" - select BR2_LARGEFILE - select BR2_INET_IPV6 - select BR2_INET_RPC - select BR2_ENABLE_LOCALE - select BR2_USE_WCHAR - select BR2_PROGRAM_INVOCATION - -endchoice # C library - -config BR2_TOOLCHAIN_CTNG_LIBC - string - default "uClibc" if BR2_TOOLCHAIN_CTNG_uClibc - default "eglibc" if BR2_TOOLCHAIN_CTNG_eglibc - default "glibc" if BR2_TOOLCHAIN_CTNG_glibc - -config BR2_TOOLCHAIN_CTNG_CONFIG - string "crosstool-NG configuration file to use" - default "toolchain/toolchain-crosstool-ng/crosstool-ng.config" - help - Enter here the crosstool-NG's .config file to use. - If unsure, use the default. - To finetune your toolchain, you can also call: - make ctng-menuconfig - -if BR2_TOOLCHAIN_CTNG_uClibc - -comment "Toolchain Options" - -config BR2_TOOLCHAIN_CTNG_uClibc_LARGEFILE - bool "Enable large file (files > 2 GB) support" - select BR2_LARGEFILE - help - Enable this option if you want your toolchain to support - files bigger than 2 GB. - -config BR2_TOOLCHAIN_CTNG_uClibc_INET_IPV6 - bool "Enable IPv6 support" - select BR2_INET_IPV6 - help - Enable this option if you want your toolchain to support - IPv6. - -config BR2_TOOLCHAIN_CTNG_uClibc_INET_RPC - bool "Enable RPC support" - select BR2_INET_RPC - help - Enable this option if you want your toolchain to support - RPC (needed for NFS, for example). - -config BR2_TOOLCHAIN_CTNG_uClibc_WCHAR - bool "Enable WCHAR support" - select BR2_USE_WCHAR - help - Enable this option if you want your toolchain to support - wide characters (i.e characters longer than 8 bits, needed - for locale support). - -config BR2_TOOLCHAIN_CTNG_uClibc_LOCALE - bool "Enable toolchain locale/i18n support" - select BR2_TOOLCHAIN_CTNG_uClibc_WCHAR - select BR2_ENABLE_LOCALE - help - Enable this option if you want your toolchain to support - localization and internationalization. - -config BR2_TOOLCHAIN_CTNG_uClibc_PROGRAM_INVOCATION - bool "Enable 'program invocation name' support" - select BR2_PROGRAM_INVOCATION - help - Enable this option if you want your toolchain to support the - GNU-specific program_invocation_name and - program_invocation_short_name strings. Some GNU packages - (like tar and coreutils) utilize these for extra useful - output, but in general are not required. - -endif # BR2_TOOLCHAIN_CTNG_uClibc - -config BR2_TOOLCHAIN_CTNG_CXX - bool "Enable C++ support" - select BR2_INSTALL_LIBSTDCPP - help - Enable this option if you want your toolchain to support the - C++ language and you want C++ libraries to be installed on - your target system. - -choice - prompt "Thread library implementation" - default BR2_TOOLCHAIN_CTNG_THREADS_PTHREADS_OLD \ - if BR2_TOOLCHAIN_CTNG_uClibc - default BR2_TOOLCHAIN_CTNG_THREADS_NPTL \ - if BR2_TOOLCHAIN_CTNG_eglibc || \ - BR2_TOOLCHAIN_CTNG_glibc - help - Enable thread support and select thread implementation. With - glibc, thread support is mandatory but several - implementations are available. With uClibc, thread support - is optional, and when enabled, several implementations are - available. However, not all thread variants work with all - versions of uClibc for all architectures, the "linuxthreads - (stable/old)" may be a working fallback. - - config BR2_TOOLCHAIN_CTNG_THREADS_NONE - bool "none" - depends on BR2_TOOLCHAIN_CTNG_uClibc - - config BR2_TOOLCHAIN_CTNG_THREADS_PTHREADS - bool "linuxthreads" - select BR2_TOOLCHAIN_HAS_THREADS - - config BR2_TOOLCHAIN_CTNG_THREADS_PTHREADS_OLD - bool "linuxthreads (stable/old)" - select BR2_TOOLCHAIN_HAS_THREADS - depends on BR2_TOOLCHAIN_CTNG_uClibc - - config BR2_TOOLCHAIN_CTNG_THREADS_NPTL - bool "Native POSIX Threading (NPTL)" - select BR2_TOOLCHAIN_HAS_THREADS - depends on BR2_TOOLCHAIN_CTNG_eglibc || \ - BR2_TOOLCHAIN_CTNG_glibc -endchoice - -endif # BR2_TOOLCHAIN_CTNG diff --git a/toolchain/toolchain-crosstool-ng/crosstool-ng.config b/toolchain/toolchain-crosstool-ng/crosstool-ng.config deleted file mode 100644 index 5f6aefed12..0000000000 --- a/toolchain/toolchain-crosstool-ng/crosstool-ng.config +++ /dev/null @@ -1,377 +0,0 @@ -# -# Automatically generated make config: don't edit -# crosstool-NG version: 1.10.0 -# Mon Feb 7 14:03:32 2011 -# -CT_BACKEND=y -CT_MODULES=y - -# -# Paths and misc options -# - -# -# crosstool-NG behavior -# -# CT_OBSOLETE is not set -# CT_EXPERIMENTAL is not set - -# -# Paths -# -CT_LOCAL_TARBALLS_DIR="" -CT_SAVE_TARBALLS=y -CT_WORK_DIR="${CT_TOP_DIR}/.build" -CT_PREFIX_DIR="${HOME}/x-tools/${CT_TARGET}" -CT_INSTALL_DIR="${CT_PREFIX_DIR}" -CT_REMOVE_DOCS=y -# CT_INSTALL_DIR_RO is not set -# CT_STRIP_ALL_TOOLCHAIN_EXECUTABLES is not set - -# -# Downloading -# -# CT_FORBID_DOWNLOAD is not set -# CT_FORCE_DOWNLOAD is not set -# CT_USE_MIRROR is not set -CT_CONNECT_TIMEOUT=10 -# CT_ONLY_DOWNLOAD is not set - -# -# Extracting -# -# CT_FORCE_EXTRACT is not set -CT_OVERIDE_CONFIG_GUESS_SUB=y -# CT_ONLY_EXTRACT is not set -CT_PATCH_BUNDLED=y -# CT_PATCH_LOCAL is not set -# CT_PATCH_BUNDLED_LOCAL is not set -# CT_PATCH_LOCAL_BUNDLED is not set -# CT_PATCH_BUNDLED_FALLBACK_LOCAL is not set -# CT_PATCH_LOCAL_FALLBACK_BUNDLED is not set -# CT_PATCH_NONE is not set -CT_PATCH_ORDER="bundled" -# CT_PATCH_SINGLE is not set -# CT_PATCH_USE_LOCAL is not set - -# -# Build behavior -# - -# -# Build options hiden -# -CT_PARALLEL_JOBS=1 -CT_LOAD=0 -CT_USE_PIPES=y -CT_CONFIG_SHELL="custom" -CT_CONFIG_SHELL_CUSTOM_PATH="/bin/sh" - -# -# Logging -# -# CT_LOG_ERROR is not set -# CT_LOG_WARN is not set -# CT_LOG_INFO is not set -# CT_LOG_EXTRA is not set -CT_LOG_ALL=y -# CT_LOG_DEBUG is not set -CT_LOG_LEVEL_MAX="ALL" -# CT_LOG_SEE_TOOLS_WARN is not set -CT_LOG_TO_FILE=y -CT_LOG_FILE_COMPRESS=y - -# -# Target options -# -CT_ARCH="blackfin" -# CT_ARCH_SUPPORTS_BOTH_MMU is not set -# CT_ARCH_SUPPORTS_BOTH_ENDIAN is not set -CT_ARCH_SUPPORTS_32=y -# CT_ARCH_SUPPORTS_64 is not set -CT_ARCH_SUPPORT_ARCH=y -# CT_ARCH_SUPPORT_ABI is not set -CT_ARCH_SUPPORT_CPU=y -CT_ARCH_SUPPORT_TUNE=y -CT_ARCH_SUPPORT_FPU=y -# CT_ARCH_DEFAULT_HAS_MMU is not set -# CT_ARCH_DEFAULT_BE is not set -CT_ARCH_DEFAULT_LE=y -CT_ARCH_DEFAULT_32=y -# CT_ARCH_DEFAULT_64 is not set -CT_ARCH_ARCH="" -CT_ARCH_CPU="" -CT_ARCH_TUNE="" -CT_ARCH_FPU="" -CT_ARCH_32=y -# CT_ARCH_64 is not set -CT_ARCH_BITNESS=32 -CT_ARCH_FLOAT_HW=y -# CT_ARCH_FLOAT_SW is not set -CT_TARGET_CFLAGS="" -CT_TARGET_LDFLAGS="" - -# -# General target options -# -# CT_ARCH_alpha is not set -# CT_ARCH_arm is not set -# CT_ARCH_avr32 is not set -CT_ARCH_blackfin=y -# CT_ARCH_m68k is not set -# CT_ARCH_mips is not set -# CT_ARCH_powerpc is not set -# CT_ARCH_s390 is not set -# CT_ARCH_sh is not set -# CT_ARCH_x86 is not set -CT_ARCH_alpha_AVAILABLE=y -CT_ARCH_arm_AVAILABLE=y -CT_ARCH_avr32_AVAILABLE=y -CT_ARCH_blackfin_AVAILABLE=y -CT_ARCH_m68k_AVAILABLE=y -CT_ARCH_mips_AVAILABLE=y -CT_ARCH_powerpc_AVAILABLE=y -CT_ARCH_s390_AVAILABLE=y -CT_ARCH_sh_AVAILABLE=y -CT_ARCH_x86_AVAILABLE=y -# CT_ARCH_USE_MMU is not set - -# -# Target optimisations -# - -# -# Toolchain options -# - -# -# General toolchain options -# -CT_FORCE_SYSROOT=y -CT_USE_SYSROOT=y -CT_SYSROOT_NAME="sysroot" -CT_SYSROOT_DIR_PREFIX="" - -# -# Tuple completion and aliasing -# -CT_TARGET_VENDOR="unknown" -CT_TARGET_ALIAS_SED_EXPR="" -CT_TARGET_ALIAS="" - -# -# Toolchain type -# -# CT_NATIVE is not set -CT_CROSS=y -# CT_CROSS_NATIVE is not set -# CT_CANADIAN is not set -CT_TOOLCHAIN_TYPE="cross" - -# -# Build system -# -CT_BUILD="" -CT_BUILD_PREFIX="" -CT_BUILD_SUFFIX="" - -# -# Operating System -# -CT_BARE_METAL=y -# CT_MINGW32 is not set -# CT_KERNEL_SUPPORTS_SHARED_LIBS is not set -CT_KERNEL="bare-metal" -CT_KERNEL_bare_metal=y -# CT_KERNEL_linux is not set -# CT_KERNEL_mingw32 is not set -CT_KERNEL_bare_metal_AVAILABLE=y -CT_KERNEL_linux_AVAILABLE=y -# CT_KERNEL_LINUX_INSTALL is not set -# CT_KERNEL_V_2_6_37 is not set -# CT_KERNEL_V_2_6_36_3 is not set -# CT_KERNEL_V_2_6_36_2 is not set -# CT_KERNEL_V_2_6_36_1 is not set -# CT_KERNEL_V_2_6_36 is not set -# CT_KERNEL_V_2_6_35_10 is not set -# CT_KERNEL_V_2_6_34_8 is not set -# CT_KERNEL_V_2_6_33_7 is not set -# CT_KERNEL_V_2_6_32_28 is not set -# CT_KERNEL_V_2_6_31_14 is not set -# CT_KERNEL_V_2_6_27_57 is not set -# CT_KERNEL_LINUX_CUSTOM is not set -# CT_KERNEL_LINUX_VERBOSITY_0 is not set -# CT_KERNEL_LINUX_VERBOSITY_1 is not set -# CT_KERNEL_LINUX_VERBOSITY_2 is not set -# CT_KERNEL_LINUX_USE_CUSTOM_HEADERS is not set -CT_KERNEL_mingw32_AVAILABLE=y - -# -# Common kernel options -# - -# -# Binary utilities -# -CT_ARCH_BINFMT_ELF=y -# CT_ARCH_BINFMT_FLAT is not set -# CT_ARCH_BINFMT_FDPIC is not set - -# -# GNU binutils -# -# CT_BINUTILS_V_2_21 is not set -# CT_BINUTILS_V_2_20_1 is not set -CT_BINUTILS_V_2_20=y -# CT_BINUTILS_V_2_19_1 is not set -# CT_BINUTILS_V_2_19 is not set -# CT_BINUTILS_V_2_18 is not set -# CT_BINUTILS_V_2_17 is not set -# CT_BINUTILS_V_2_16_1 is not set -CT_BINUTILS_VERSION="2.20" -CT_BINUTILS_EXTRA_CONFIG="" - -# -# C compiler -# -CT_CC="gcc" -CT_CC_VERSION="4.4.3" -CT_CC_gcc=y -# CT_CC_V_4_5_2 is not set -# CT_CC_V_4_5_1 is not set -# CT_CC_V_4_5_0 is not set -# CT_CC_V_4_4_5 is not set -# CT_CC_V_4_4_4 is not set -CT_CC_V_4_4_3=y -# CT_CC_V_4_4_2 is not set -# CT_CC_V_4_4_1 is not set -# CT_CC_V_4_4_0 is not set -# CT_CC_V_4_3_5 is not set -# CT_CC_V_4_3_4 is not set -# CT_CC_V_4_3_3 is not set -# CT_CC_V_4_3_2 is not set -# CT_CC_V_4_3_1 is not set -# CT_CC_V_4_2_4 is not set -# CT_CC_V_4_2_3 is not set -# CT_CC_V_4_2_2 is not set -# CT_CC_V_4_2_1 is not set -# CT_CC_V_4_2_0 is not set -# CT_CC_V_4_1_2 is not set -# CT_CC_V_4_0_4 is not set -# CT_CC_V_3_4_6 is not set -CT_CC_GCC_4_2_or_later=y -CT_CC_GCC_4_3_or_later=y -CT_CC_GCC_4_4_or_later=y -# CT_CC_GCC_4_5_or_later is not set -CT_CC_GCC_HAS_GRAPHITE=y -# CT_CC_GCC_HAS_LTO is not set -CT_CC_GCC_USE_GMP_MPFR=y -CT_CC_GCC_USE_PPL_CLOOG=y -# CT_CC_GCC_USE_MPC is not set -# CT_CC_GCC_USE_LIBELF is not set -CT_CC_PKGVERSION="crosstool-NG-${CT_VERSION}" -CT_CC_BUGURL="" -CT_CC_ENABLE_CXX_FLAGS="" -CT_CC_CORE_EXTRA_CONFIG="" -CT_CC_SUPPORT_CXX=y -CT_CC_SUPPORT_FORTRAN=y -CT_CC_SUPPORT_JAVA=y -CT_CC_SUPPORT_ADA=y -CT_CC_SUPPORT_OBJC=y -CT_CC_SUPPORT_OBJCXX=y - -# -# Additional supported languages: -# -# CT_CC_LANG_CXX is not set - -# -# gcc other options -# -CT_CC_GCC_ENABLE_TARGET_OPTSPACE=y -CT_CC_GCC_USE_GRAPHITE=y -CT_CC_STATIC_LIBSTDCXX=y -# CT_CC_GCC_LIBMUDFLAP is not set -# CT_CC_GCC_LIBGOMP is not set -# CT_CC_GCC_LIBSSP is not set - -# -# Misc. obscure options. -# -# CT_CC_GCC_DISABLE_PCH is not set -CT_CC_GCC_LDBL_128=m - -# -# C-library -# -CT_LIBC="none" -# CT_LIBC_eglibc is not set -# CT_LIBC_glibc is not set -# CT_LIBC_mingw is not set -# CT_LIBC_newlib is not set -CT_LIBC_none=y -# CT_LIBC_uClibc is not set -CT_LIBC_eglibc_AVAILABLE=y -CT_LIBC_glibc_AVAILABLE=y -CT_LIBC_mingw_AVAILABLE=y -CT_LIBC_newlib_AVAILABLE=y -CT_LIBC_none_AVAILABLE=y -CT_LIBC_uClibc_AVAILABLE=y -# CT_LIBC_SUPPORT_THREADS_ANY is not set -# CT_LIBC_SUPPORT_NPTL is not set -# CT_LIBC_SUPPORT_LINUXTHREADS is not set -# CT_LIBC_SUPPORT_WIN32THREADS is not set -# CT_LIBC_SUPPORT_THREADS_NONE is not set -CT_THREADS="none" - -# -# Debug facilities -# -# CT_DEBUG_gdb is not set - -# -# Companion libraries -# -CT_COMPLIBS_NEEDED=y -CT_GMP_NEEDED=y -CT_MPFR_NEEDED=y -CT_PPL_NEEDED=y -CT_CLOOG_NEEDED=y -# CT_MPC_NEEDED is not set -# CT_LIBELF_NEEDED is not set -CT_COMPLIBS=y -# CT_WRAPPER_NEEDED is not set -CT_GMP=y -CT_MPFR=y -CT_PPL=y -CT_CLOOG=y -# CT_GMP_V_5_0_1 is not set -CT_GMP_V_4_3_2=y -# CT_GMP_V_4_3_1 is not set -# CT_GMP_V_4_3_0 is not set -# CT_GMP_V_4_2_4 is not set -# CT_GMP_V_4_2_2 is not set -CT_GMP_VERSION="4.3.2" -# CT_MPFR_V_3_0_0 is not set -CT_MPFR_V_2_4_2=y -# CT_MPFR_V_2_4_1 is not set -# CT_MPFR_V_2_4_0 is not set -# CT_MPFR_V_2_3_2 is not set -# CT_MPFR_V_2_3_1 is not set -CT_MPFR_VERSION="2.4.2" -# CT_PPL_V_0_11 is not set -CT_PPL_V_0_10_2=y -CT_PPL_VERSION="0.10.2" -# CT_CLOOG_V_0_15_10 is not set -CT_CLOOG_V_0_15_9=y -# CT_CLOOG_V_0_15_8 is not set -# CT_CLOOG_V_0_15_7 is not set -# CT_CLOOG_V_0_15_6 is not set -CT_CLOOG_VERSION="0.15.9" - -# -# Companion libraries common options -# -CT_COMPLIBS_BACKUP=y -# CT_COMPLIBS_CHECK is not set -# CT_COMPLIBS_SHARED is not set diff --git a/toolchain/toolchain-crosstool-ng/crosstool-ng.mk b/toolchain/toolchain-crosstool-ng/crosstool-ng.mk deleted file mode 100644 index edd643baae..0000000000 --- a/toolchain/toolchain-crosstool-ng/crosstool-ng.mk +++ /dev/null @@ -1,408 +0,0 @@ -# Makefile fragment for building toolchain with crosstool-NG - -# As a reference, you can look at toolchain/toolchain-external/ext-tool.mk -# for a generic approach to external toolchains. -# crosstool-NG as a backend is but a kind of external toolchains, -# except that it is not pre-built. - -#----------------------------------------------------------------------------- -# 'uclibc' is the target to depend on to get the toolchain and prepare -# the staging directory and co. -uclibc: dependencies $(STAMP_DIR)/ct-ng-toolchain-installed - -#----------------------------------------------------------------------------- -# Internal variables - -# Crostool-NG hard-coded configuration options -CTNG_VERSION:=1.10.0 -CTNG_SITE:=http://ymorin.is-a-geek.org/download/crosstool-ng/ -CTNG_SOURCE:=crosstool-ng-$(CTNG_VERSION).tar.bz2 -CTNG_DIR:=$(BUILD_DIR)/crosstool-ng-$(CTNG_VERSION) -CTNG_CAT:=bzcat -CTNG_PATCH_DIR:=toolchain/toolchain-crosstool-ng -CTNG_CONFIG_FILE:=$(call qstrip,$(BR2_TOOLCHAIN_CTNG_CONFIG)) -CTNG_UCLIBC_CONFIG_FILE := $(TOPDIR)/toolchain/toolchain-crosstool-ng/uClibc.config - -# Hack! ct-ng is in fact a Makefile script. As such, it accepts all -# make options, such as -C, which makes it uneeded to chdir prior -# to calling ct-ng. -# $1: the set of arguments to pass to ct-ng -define ctng -PATH=$(HOST_PATH) $(CTNG_DIR)/ct-ng -C $(CTNG_DIR) --no-print-directory $(1) -endef - -#----------------------------------------------------------------------------- -# Installing the libs to target/ and staging/ - -#-------------- -# The generic system libraries (in /lib) -CTNG_LIBS_LIB := libc.so libcrypt.so libdl.so libgcc_s.so libm.so libnsl.so libpthread.so libresolv.so librt.so libutil.so - -#-------------- -# The libc-specific system libraries (in /lib) -# Note: it may be needed to tweak the NSS libs in the glibc and eglibc cases... -CTNG_LIBS_uClibc := ld-uClibc.so -CTNG_LIBS_glibc := ld-linux.so libnss_files.so libnss_dns.so -CTNG_LIBS_eglibc := $(CTNG_LIBS_glibc) - -#-------------- -# All that we need in /lib -CTNG_LIBS_LIB += $(CTNG_LIBS_$(call qstrip,$(BR2_TOOLCHAIN_CTNG_LIBC))) - -#-------------- -# All that we need in /usr/lib -ifneq ($(BR2_INSTALL_LIBSTDCPP),) -CTNG_LIBS_USR_LIB += libstdc++.so -endif - -#-------------- -# Actual copy -$(STAMP_DIR)/ct-ng-toolchain-installed: $(STAMP_DIR)/ct-ng-toolchain-built - $(Q)mkdir -p $(TARGET_DIR)/lib - $(Q)CTNG_TUPLE="$$( $(call ctng,show-tuple) )"; \ - CTNG_SYSROOT="$(HOST_DIR)/usr/$${CTNG_TUPLE}/sys-root"; \ - echo "CTNG_TUPLE='$${CTNG_TUPLE}'"; \ - echo "CTNG_SYSROOT='$${CTNG_SYSROOT}'"; \ - echo "Copy external toolchain libraries to target..."; \ - for libs in $(CTNG_LIBS_LIB); do \ - $(call copy_toolchain_lib_root,$${CTNG_SYSROOT},$$libs,/lib); \ - done; \ - for libs in $(CTNG_LIBS_USR_LIB); do \ - $(call copy_toolchain_lib_root,$${CTNG_SYSROOT},$$libs,/usr/lib); \ - done; - $(Q)touch $@ - -#----------------------------------------------------------------------------- -# Building the toolchain -# Note: $(STAMP_DIR)/ct-ng-toolchain-built can have more dependencies, -# depending on the selected C library. Those deps are added later - -$(STAMP_DIR)/ct-ng-toolchain-built: $(CTNG_DIR)/.config - $(Q)$(call ctng,build.$(BR2_JLEVEL)) - $(Q)printf "\n" - $(Q)touch $@ - -#----------------------------------------------------------------------------- -# Configuring the toolchain - -#-------------- -# We push BR options down to CT-NG, munging the default configuration -# with sed expressions. -# - first one for non-path options -# - second for path options (because they have no prompt, they -# always get set to the default value) -# - third for C library .config (if it has one, eg. uClibc) -CTNG_FIX_DOT_CONFIG_SED := -CTNG_FIX_DOT_CONFIG_PATHS_SED := -CTNG_FIX_DOT_CONFIG_LIBC_SED := - -#-------------- -# A few generic functions - -# Munge a config file, given a sed expression -# $1: the .config file to munge -# $2: the sed expression to apply -define ctng-fix-dot-config - $(Q)sed -r -e '$(2)' $(1) >$(1).sed - $(Q)cmp $(1) $(1).sed >/dev/null 2>&1 && rm -f $(1).sed || mv -f $(1).sed $(1) -endef - -# This function checks the .config did actually change -# If not changed, then current .config will be touched with reference to the -# stamp file. If the configuration did change, nothing is done. -# $1: the current .config to check -# $2: the time-stamped .config file -define ctng-check-config-changed - $(Q)old_md5="$$( grep -v -E '^(#|$$)' $(2) 2>/dev/null \ - |md5sum \ - |cut -d ' ' -f 1 \ - )"; \ - new_md5="$$( grep -v -E '^(#|$$)' $(1) 2>/dev/null \ - |md5sum \ - |cut -d ' ' -f 1 \ - )"; \ - if [ $${old_md5} = $${new_md5} -a -f $(2) ]; then \ - touch -r $(2) $(1); \ - fi -endef - -#-------------- -# Massage BR2_ARCH so that it matches CT-NG's ARCH -# -# Note: a lot of the following tricks would become unneeded if one day -# buildroot and crosstool-NG had matching options, especially for the -# target description: arch name, bitness, endianness... -# -# Note-2: missing conformity check between BR's .config and libc features. -# Use check_uclibc or check_glibc. - -# Defaults: -CTNG_ARCH := $(CTNG_BR2_ARCH) -CTNG_ENDIAN := -CTNG_BIT := -# Architecture overides, only overide pertinent vars: -ifeq ($(BR2_arm),y) -CTNG_ARCH := arm -CTNG_ENDIAN := LE -else ifeq ($(BR2_armeb),y) -CTNG_ARCH := arm -CTNG_ENDIAN := BE -else ifeq ($(BR2_i386),y) -CTNG_ARCH := x86 -CTNG_BIT := 32 -else ifeq ($(BR2_mips),y) -CTNG_ARCH := mips -CTNG_ENDIAN := BE -else ifeq ($(BR2_mipsel),y) -CTNG_ARCH := mips -CTNG_ENDIAN := LE -else ifeq ($(BR2_powerpc),y) -CTNG_ARCH := powerpc -CTNG_BIT := 32 -else ifeq ($(BR2_x86_64),y) -CTNG_ARCH := x86 -CTNG_BIT := 64 -# Add other architecture overides below: -# - keep alphabetic order -# - duplicate next 4 lines, and uncomment -# else ifeq ($(BR2_),y) -# CTNG_ARCH := -# CTNG_ENDIAN := -# CTNG_BIT := -# - remove unneeded vars -# - add BR arch-name on ifeq line -# - fill-in required CTNG_* vars -endif - -#-------------- -# Massage BR options into CTNG .config file -# CT_ARCH : handled by the backend mechanism -# CT_ARCH_[BL]E : endianness -# CT_ARCH_(32|64) : bitness -# CT_PREFIX_DIR : install into BR's toolchain dir -# CT_INSTALL_DIR_RO : do *not* chmod a-w the toolchain dir -# CT_LOCAL_TARBALLS_DIR : share downloads with BR -# CT_SYSROOT_DIR_PREFIX : no prefix needed, really -# CT_TARGET_VENDOR : try to set a unique vendor string, to avoid clashing with BR's vendor string -# CT_TARGET_ALIAS : set the target tuple alias to REAL_GNU_TARGET_NAME so that packages' ./configure find the compiler -# CT_DEBUG_gdb : deselect gdb+gdbserver if buildroot builds its own -# CT_CC_LANG_CXX : required if we copy libstdc++.so, and build C++ -# CT_LIBC_UCLIBC_CONFIG_FILE: uClibc config file, if needed -# -# Lots of other awfull sed manipulations go here, to override CT-NG's .config -# with BR2 config options. -# Known missing: arch options, uClibc/eglibc config... -# -CTNG_FIX_DOT_CONFIG_SED += s:^(CT_INSTALL_DIR_RO)=y:\# \1 is not set:; -CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_ARCH_[BL]E).*:\# \2 is not set:; -CTNG_FIX_DOT_CONFIG_SED += s:^\# (CT_ARCH_$(CTNG_ENDIAN)) is not set:\1=y:; -CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_ARCH_(32|64)).*:\# \2 is not set:; -CTNG_FIX_DOT_CONFIG_SED += s:^\# (CT_ARCH_$(CTNG_BIT)) is not set:\1=y:; -CTNG_FIX_DOT_CONFIG_SED += s:^(CT_TARGET_VENDOR)=.*:\1="unknown":; -CTNG_FIX_DOT_CONFIG_SED += s:^(CT_TARGET_ALIAS)=.*:\1="$(GNU_TARGET_NAME)":; -CTNG_FIX_DOT_CONFIG_SED += s:^(CT_CC_PKGVERSION)="(.*)":\1="crosstool-NG $(CTNG_VERSION) - buildroot $(BR2_VERSION_FULL)":; -ifneq ($(call qstrip,$(BR2_USE_MMU)),) -CTNG_FIX_DOT_CONFIG_SED += s:^\# (CT_ARCH_USE_MMU) is not set:\1=y:; -else -CTNG_FIX_DOT_CONFIG_SED += s:^(CT_ARCH_USE_MMU)=y:\# \1 is not set:; -endif -ifneq ($(call qstrip,$(BR2_PACKAGE_GDB_SERVER))$(call qstrip,$(BR2_PACKAGE_GDB_HOST)),) -CTNG_FIX_DOT_CONFIG_SED += s:^(CT_DEBUG_gdb)=.*:\# \1 is not set:; -endif -ifeq ($(call qstrip,$(BR2_TOOLCHAIN_CTNG_CXX)),y) -CTNG_FIX_DOT_CONFIG_SED += s:^\# (CT_CC_LANG_CXX) is not set:\1=y:; -else -CTNG_FIX_DOT_CONFIG_SED += s:^(CT_CC_LANG_CXX)=.*:\# \1 is not set:; -endif - -# Shoe-horn CPU variant now -ifneq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),) -CTNG_FIX_DOT_CONFIG_SED += s:^(CT_ARCH_ARCH)=.*:\1=$(BR2_GCC_TARGET_ARCH):; -endif -ifneq ($(call qstrip,$(BR2_GCC_TARGET_TUNE)),) -CTNG_FIX_DOT_CONFIG_SED += s:^(CT_ARCH_TUNE)=.*:\1=$(BR2_GCC_TARGET_TUNE):; -endif - -# And floating point now -ifeq ($(call qstrip,$(BR2_SOFT_FLOAT)),) -CTNG_FIX_DOT_CONFIG_SED += s:^\# (CT_ARCH_FLOAT_HW) is not set:\1=y:; -CTNG_FIX_DOT_CONFIG_SED += s:^(CT_ARCH_FLOAT_SW)=y:\# \1 is not set:; -else -CTNG_FIX_DOT_CONFIG_SED += s:^(CT_ARCH_FLOAT_HW)=y:\# \1 is not set:; -CTNG_FIX_DOT_CONFIG_SED += s:^\# (CT_ARCH_FLOAT_SW) is not set:\1=y:; -endif - -# Thread implementation selection -CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_THREADS_NONE).*:\# \2 is not set:; -CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_THREADS_LINUXTHREADS).*:\# \2 is not set:; -CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_THREADS_NPTL).*:\# \2 is not set:; -ifneq ($(call qstrip,$(BR2_TOOLCHAIN_CTNG_THREADS_PTHREADS))$(call qstrip,$(BR2_TOOLCHAIN_CTNG_THREADS_PTHREADS_OLD)),) -CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_THREADS_LINUXTHREADS).*:\2=y:; - ifneq ($(call qstrip,$(BR2_TOOLCHAIN_CTNG_uClibc)),) - ifneq ($(call qstrip,$(BR2_TOOLCHAIN_CTNG_THREADS_PTHREADS_OLD)),) -CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_LIBC_UCLIBC_LNXTHRD_NEW).*:\# \2 is not set:; -CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_LIBC_UCLIBC_LNXTHRD_OLD).*:\2=y:; - else -CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_LIBC_UCLIBC_LNXTHRD_OLD).*:\# \2 is not set:; -CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_LIBC_UCLIBC_LNXTHRD_NEW).*:\2=y:; - endif - endif -else ifneq ($(call qstrip,$(BR2_TOOLCHAIN_CTNG_THREADS_NPTL)),) -CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_THREADS_NPTL).*:\2=y:; -else ifneq ($(call qstrip,$(BR2_TOOLCHAIN_CTNG_THREADS_NONE)),) -CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_THREADS_NONE).*:\2=y:; -endif - -#-------------- -# And the specials for paths -CTNG_FIX_DOT_CONFIG_PATHS_SED += s:^(CT_PREFIX_DIR)=.*:\1="$(HOST_DIR)/usr":; -CTNG_FIX_DOT_CONFIG_PATHS_SED += s:^(CT_LOCAL_TARBALLS_DIR)=.*:\1="$(DL_DIR)":; -CTNG_FIX_DOT_CONFIG_PATHS_SED += s:^(CT_SYSROOT_DIR_PREFIX)=.*:\1="":; - -#-------------- -# uClibc specific options -ifeq ($(BR2_TOOLCHAIN_CTNG_uClibc),y) - -# Handle the locales option -ifneq ($(call qstrip,$(BR2_ENABLE_LOCALE)),) -CTNG_FIX_DOT_CONFIG_SED += s:^\# (CT_LIBC_UCLIBC_LOCALES) is not set:\1=y\n\# CT_LIBC_UCLIBC_LOCALES_PREGEN_DATA is not set:; -CTNG_FIX_DOT_CONFIG_SED += s:^(CT_LIBC_UCLIBC_LOCALES_PREGEN_DATA)=.*:\# \1 is not set:; -else -CTNG_FIX_DOT_CONFIG_SED += s:^(CT_LIBC_UCLIBC_LOCALES)=.*:\# \1 is not set:; -endif - -# Handle the wide-char option -ifneq ($(call qstrip,$(BR2_USE_WCHAR)),) -CTNG_FIX_DOT_CONFIG_SED += s:^\# (CT_LIBC_UCLIBC_WCHAR) is not set:\1=y:; -else -CTNG_FIX_DOT_CONFIG_SED += s:^(CT_LIBC_UCLIBC_WCHAR)=.*:\# \1 is not set:; -endif - -# Handle the LFS option -ifneq ($(call qstrip,$(BR2_LARGEFILE)),) -CTNG_FIX_DOT_CONFIG_LIBC_SED += s:^\# (UCLIBC_HAS_LFS) is not set:\1=y:; -else -CTNG_FIX_DOT_CONFIG_LIBC_SED += s:^(UCLIBC_HAS_LFS)=.*:\# \1 is not set:; -endif - -# Handle the IPv6 option -ifneq ($(call qstrip,$(BR2_INET_IPV6)),) -CTNG_FIX_DOT_CONFIG_LIBC_SED += s:^\# (UCLIBC_HAS_IPV6) is not set:\1=y:; -else -CTNG_FIX_DOT_CONFIG_LIBC_SED += s:^(UCLIBC_HAS_IPV6)=.*:\# \1 is not set:; -endif - -# Handle the RPC option -ifneq ($(call qstrip,$(BR2_INET_RPC)),) -CTNG_FIX_DOT_CONFIG_LIBC_SED += s:^\# (UCLIBC_HAS_RPC) is not set:\1=y\nUCLIBC_HAS_FULL_RPC=y\nUCLIBC_HAS_REENTRANT_RPC=y:; -CTNG_FIX_DOT_CONFIG_LIBC_SED += s:^\# (UCLIBC_HAS_FULL_RPC) is not set:\1=y:; -CTNG_FIX_DOT_CONFIG_LIBC_SED += s:^\# (UCLIBC_HAS_REENTRANT_RPC) is not set:\1=y:; -else -CTNG_FIX_DOT_CONFIG_LIBC_SED += s:^(UCLIBC_HAS_RPC)=.*:\# \1 is not set:; -endif - -# Handle the program_invocation_name option -ifneq ($(call qstrip,$(BR2_PROGRAM_INVOCATION)),) -CTNG_FIX_DOT_CONFIG_LIBC_SED += s:^\# (UCLIBC_HAS_PROGRAM_INVOCATION_NAME) is not set:\1=y:; -else -CTNG_FIX_DOT_CONFIG_LIBC_SED += s:^(UCLIBC_HAS_PROGRAM_INVOCATION_NAME)=y:\# \1 is not set:; -endif - -# Instruct CT-NG's .config where to find the uClibc's .config -CTNG_FIX_DOT_CONFIG_PATHS_SED += s:^(CT_LIBC_UCLIBC_CONFIG_FILE)=.*:\1="$(CTNG_DIR)/libc.config":; - -# And add this to the toolchain build dependency -$(STAMP_DIR)/ct-ng-toolchain-built: $(CTNG_DIR)/libc.config - -# And here is how we get this uClibc's .config -$(CTNG_DIR)/libc.config: $(CTNG_UCLIBC_CONFIG_FILE) $(CONFIG_DIR)/.config - -$(Q)cp -a $@ $@.timestamp - $(Q)cp -f $< $@ - $(call ctng-fix-dot-config,$@,$(CTNG_FIX_DOT_CONFIG_LIBC_SED)) - $(call ctng-check-config-changed,$@,$@.timestamp) - $(Q)rm -f $@.timestamp - -endif # LIBC is uClibc - -#-------------- -# Small functions to shoe-horn the above into crosstool-NG's .config - -# Function to update the .config -# We first munge the .config to shoe-horn defaults, then we push that unto -# crosstool-NG's oldconfig process, to sort out wizy-wazy deps, and then we -# shoe-horn paths again, as they get ripped-out by oldconfig (is that a bug -# or a feature of kconfig?) -# $1: the .config file to munge -define ctng-oldconfig - $(call ctng-fix-dot-config,$(1),$(CTNG_FIX_DOT_CONFIG_SED)) - $(Q)yes '' |\ - $(call ctng,CT_IS_A_BACKEND=y \ - CT_BACKEND_ARCH=$(CTNG_ARCH) \ - CT_BACKEND_KERNEL=linux \ - CT_BACKEND_LIBC=$(BR2_TOOLCHAIN_CTNG_LIBC) \ - oldconfig ) - $(call ctng-fix-dot-config,$(1),$(CTNG_FIX_DOT_CONFIG_PATHS_SED)) -endef - -# Default configuration -# Depends on top-level .config because it has options we have to shoe-horn -# into crosstool-NG's .config -# Only copy the original .config file if we don't have one already -# We need to call oldconfig twice in a row to ensure the options -# are correctly set ( eg. if an option is new, then the initial sed -# can't do anything about it ) Ideally, this should go in oldconfig -# itself, but it's much easier to handle here. -$(CTNG_DIR)/.config: $(CTNG_CONFIG_FILE) $(CTNG_DIR)/ct-ng $(CONFIG_DIR)/.config - $(Q)[ -f $@ ] && cp -a $@ $@.timestamp || cp -f $< $@ - $(call ctng-oldconfig,$@) - $(call ctng-oldconfig,$@) - $(call ctng-check-config-changed,$@,$@.timestamp) - $(Q)rm -f $@.timestamp - -# Manual configuration -ctng-menuconfig: $(CTNG_DIR)/.config - $(Q)cp -a $< $<.timestamp - $(Q)$(call ctng,CT_IS_A_BACKEND=y \ - CT_BACKEND_ARCH=$(CTNG_ARCH) \ - CT_BACKEND_KERNEL=linux \ - CT_BACKEND_LIBC=$(BR2_TOOLCHAIN_CTNG_LIBC) \ - menuconfig ) - $(call ctng-oldconfig,$<) - $(call ctng-check-config-changed,$<,$<.timestamp) - $(Q)rm -f $<.timestamp - -#----------------------------------------------------------------------------- -# Retrieving, configuring and building crosstool-NG (as a package) - -$(DL_DIR)/$(CTNG_SOURCE): - $(Q)$(call DOWNLOAD,$(CTNG_SITE),$(CTNG_SOURCE)) - -$(CTNG_DIR)/.unpacked: $(DL_DIR)/$(CTNG_SOURCE) - $(Q)rm -rf $(CTNG_DIR) - $(Q)mkdir -p $(BUILD_DIR) - $(Q)$(CTNG_CAT) $(DL_DIR)/$(CTNG_SOURCE) |tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - $(Q)touch $@ - -$(CTNG_DIR)/.patched: $(CTNG_DIR)/.unpacked - $(Q)toolchain/patch-kernel.sh $(CTNG_DIR) \ - $(CTNG_PATCH_DIR) \ - \*.patch \ - \*.patch.$(ARCH) - $(Q)touch $@ - -# Use order-only dependencies on host-* as they -# are virtual targets with no rules, and so are -# considered always remade. But we do not want -# to reconfigure and rebuild ct-ng every time -# we need to run it... -$(CTNG_DIR)/.configured: | $(if $(BR2_CCACHE),host-ccache) \ - host-gawk \ - host-automake - -$(CTNG_DIR)/.configured: $(CTNG_DIR)/.patched - $(Q)cd $(CTNG_DIR) && PATH=$(HOST_PATH) ./configure --local - $(Q)touch $@ - -$(CTNG_DIR)/ct-ng: $(CTNG_DIR)/.configured - $(Q)$(MAKE) -C $(CTNG_DIR) --no-print-directory - $(Q)touch $@ diff --git a/toolchain/toolchain-crosstool-ng/uClibc.config b/toolchain/toolchain-crosstool-ng/uClibc.config deleted file mode 100644 index f1163ae84c..0000000000 --- a/toolchain/toolchain-crosstool-ng/uClibc.config +++ /dev/null @@ -1,245 +0,0 @@ -# -# Automatically generated make config: don't edit -# Version: 0.9.30 -# Fri Nov 21 09:26:34 2008 -# -# TARGET_alpha is not set -# TARGET_arm is not set -# TARGET_avr32 is not set -# TARGET_bfin is not set -# TARGET_cris is not set -# TARGET_e1 is not set -# TARGET_frv is not set -# TARGET_h8300 is not set -# TARGET_hppa is not set -# TARGET_i386 is not set -# TARGET_i960 is not set -# TARGET_ia64 is not set -# TARGET_m68k is not set -# TARGET_microblaze is not set -# TARGET_mips is not set -# TARGET_nios is not set -# TARGET_nios2 is not set -# TARGET_powerpc is not set -# TARGET_sh is not set -# TARGET_sh64 is not set -# TARGET_sparc is not set -# TARGET_v850 is not set -# TARGET_vax is not set -TARGET_x86_64=y -# TARGET_xtensa is not set - -# -# Target Architecture Features and Options -# -TARGET_ARCH="x86_64" -FORCE_OPTIONS_FOR_ARCH=y -# CONFIG_ARM_OABI is not set -# CONFIG_ARM_EABI is not set -# CONFIG_GENERIC_ARM is not set -# CONFIG_ARM610 is not set -# CONFIG_ARM710 is not set -# CONFIG_ARM7TDMI is not set -# CONFIG_ARM720T is not set -# CONFIG_ARM920T is not set -# CONFIG_ARM922T is not set -# CONFIG_ARM926T is not set -# CONFIG_ARM10T is not set -# CONFIG_ARM1136JF_S is not set -# CONFIG_ARM1176JZ_S is not set -# CONFIG_ARM1176JZF_S is not set -# CONFIG_ARM_CORTEX_M3 is not set -# CONFIG_ARM_CORTEX_M1 is not set -# CONFIG_ARM_SA110 is not set -# CONFIG_ARM_SA1100 is not set -# CONFIG_ARM_XSCALE is not set -# CONFIG_ARM_IWMMXT is not set -TARGET_SUBARCH="" - -# -# Using ELF file format -# -ARCH_LITTLE_ENDIAN=y -# ARCH_WANTS_BIG_ENDIAN is not set -# ARCH_WANTS_LITTLE_ENDIAN is not set - -# -# Using Little Endian -# -ARCH_HAS_MMU=y -ARCH_USE_MMU=y -UCLIBC_HAS_FLOATS=y -UCLIBC_HAS_FPU=y -DO_C99_MATH=y -UCLIBC_HAS_FENV=y -UCLIBC_HAS_LONG_DOUBLE_MATH=y -KERNEL_HEADERS="/usr/include" -HAVE_DOT_CONFIG=y - -# -# General Library Settings -# -# HAVE_NO_PIC is not set -DOPIC=y -# ARCH_HAS_NO_SHARED is not set -# ARCH_HAS_NO_LDSO is not set -HAVE_SHARED=y -# FORCE_SHAREABLE_TEXT_SEGMENTS is not set -LDSO_LDD_SUPPORT=y -LDSO_CACHE_SUPPORT=y -# LDSO_PRELOAD_FILE_SUPPORT is not set -LDSO_BASE_FILENAME="ld.so" -UCLIBC_STATIC_LDCONFIG=y -# LDSO_RUNPATH is not set -UCLIBC_CTOR_DTOR=y -# LDSO_GNU_HASH_SUPPORT is not set -# HAS_NO_THREADS is not set -UCLIBC_HAS_THREADS=y -# PTHREADS_DEBUG_SUPPORT is not set -LINUXTHREADS_OLD=y -UCLIBC_HAS_SYSLOG=y -UCLIBC_HAS_LFS=y -# MALLOC is not set -# MALLOC_SIMPLE is not set -MALLOC_STANDARD=y -# MALLOC_GLIBC_COMPAT is not set -UCLIBC_DYNAMIC_ATEXIT=y -# COMPAT_ATEXIT is not set -# UCLIBC_SUSV3_LEGACY is not set -# UCLIBC_SUSV3_LEGACY_MACROS is not set -# UCLIBC_HAS_STUBS is not set -UCLIBC_HAS_SHADOW=y -# UCLIBC_HAS_PROGRAM_INVOCATION_NAME is not set -UCLIBC_HAS_PTY=y -ASSUME_DEVPTS=y -UNIX98PTY_ONLY=y -# UCLIBC_HAS_GETPT is not set -UCLIBC_HAS_TM_EXTENSIONS=y -UCLIBC_HAS_TZ_CACHING=y -UCLIBC_HAS_TZ_FILE=y -UCLIBC_HAS_TZ_FILE_READ_MANY=y -UCLIBC_TZ_FILE_PATH="/etc/TZ" - -# -# Advanced Library Settings -# -UCLIBC_PWD_BUFFER_SIZE=256 -UCLIBC_GRP_BUFFER_SIZE=256 - -# -# Support various families of functions -# -UCLIBC_LINUX_MODULE_24=y -UCLIBC_LINUX_SPECIFIC=y -UCLIBC_HAS_GNU_ERROR=y -# UCLIBC_BSD_SPECIFIC is not set -UCLIBC_HAS_BSD_ERR=y -# UCLIBC_HAS_OBSOLETE_BSD_SIGNAL is not set -# UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL is not set -# UCLIBC_NTP_LEGACY is not set -# UCLIBC_SV4_DEPRECATED is not set -UCLIBC_HAS_REALTIME=y -UCLIBC_HAS_ADVANCED_REALTIME=y -UCLIBC_HAS_EPOLL=y -UCLIBC_HAS_XATTR=y -UCLIBC_HAS_PROFILING=y -UCLIBC_HAS_CRYPT_IMPL=y -UCLIBC_HAS_CRYPT=y -UCLIBC_HAS_NETWORK_SUPPORT=y -UCLIBC_HAS_SOCKET=y -UCLIBC_HAS_IPV4=y -# UCLIBC_HAS_IPV6 is not set -UCLIBC_HAS_RPC=y -UCLIBC_HAS_FULL_RPC=y -UCLIBC_HAS_REENTRANT_RPC=y -UCLIBC_USE_NETLINK=y -UCLIBC_SUPPORT_AI_ADDRCONFIG=y -# UCLIBC_HAS_BSD_RES_CLOSE is not set - -# -# String and Stdio Support -# -UCLIBC_HAS_STRING_GENERIC_OPT=y -UCLIBC_HAS_STRING_ARCH_OPT=y -UCLIBC_HAS_CTYPE_TABLES=y -UCLIBC_HAS_CTYPE_SIGNED=y -# UCLIBC_HAS_CTYPE_UNSAFE is not set -# UCLIBC_HAS_CTYPE_CHECKED is not set -UCLIBC_HAS_CTYPE_ENFORCED=y -# UCLIBC_HAS_WCHAR is not set -# UCLIBC_HAS_LOCALE is not set -# UCLIBC_HAS_HEXADECIMAL_FLOATS is not set -UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y -# USE_OLD_VFPRINTF is not set -UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9 -# UCLIBC_HAS_SCANF_GLIBC_A_FLAG is not set -# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set -# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set -# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set -# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set -# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set -UCLIBC_HAS_STDIO_BUFSIZ_4096=y -# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set -UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y -# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set -# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set -# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set -UCLIBC_HAS_STDIO_GETC_MACRO=y -UCLIBC_HAS_STDIO_PUTC_MACRO=y -UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y -# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set -# UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE is not set -# UCLIBC_HAS_GLIBC_CUSTOM_STREAMS is not set -UCLIBC_HAS_PRINTF_M_SPEC=y -UCLIBC_HAS_ERRNO_MESSAGES=y -# UCLIBC_HAS_SYS_ERRLIST is not set -UCLIBC_HAS_SIGNUM_MESSAGES=y -# UCLIBC_HAS_SYS_SIGLIST is not set -UCLIBC_HAS_GNU_GETOPT=y -UCLIBC_HAS_GNU_GETSUBOPT=y - -# -# Big and Tall -# -UCLIBC_HAS_REGEX=y -UCLIBC_HAS_REGEX_OLD=y -UCLIBC_HAS_FNMATCH=y -UCLIBC_HAS_FNMATCH_OLD=y -# UCLIBC_HAS_WORDEXP is not set -# UCLIBC_HAS_FTW is not set -UCLIBC_HAS_GLOB=y -UCLIBC_HAS_GNU_GLOB=y - -# -# Library Installation Options -# -SHARED_LIB_LOADER_PREFIX="$(RUNTIME_PREFIX)lib" -RUNTIME_PREFIX="/usr/$(TARGET_ARCH)-linux-uclibc/" -DEVEL_PREFIX="/usr/$(TARGET_ARCH)-linux-uclibc/usr/" - -# -# Security options -# -# UCLIBC_HAS_ARC4RANDOM is not set -# HAVE_NO_SSP is not set -# UCLIBC_HAS_SSP is not set -UCLIBC_BUILD_RELRO=y -# UCLIBC_BUILD_NOW is not set -UCLIBC_BUILD_NOEXECSTACK=y - -# -# uClibc development/debugging options -# -CROSS_COMPILER_PREFIX="" -UCLIBC_EXTRA_CFLAGS="" -# DODEBUG is not set -# DODEBUG_PT is not set -# DOSTRIP is not set -# DOASSERTS is not set -# SUPPORT_LD_DEBUG is not set -# SUPPORT_LD_DEBUG_EARLY is not set -# UCLIBC_MALLOC_DEBUGGING is not set -WARNINGS="-Wall" -# EXTRA_WARNINGS is not set -# DOMULTI is not set -# UCLIBC_MJN3_ONLY is not set diff --git a/toolchain/toolchain-external.mk b/toolchain/toolchain-external.mk deleted file mode 100644 index d67405b00b..0000000000 --- a/toolchain/toolchain-external.mk +++ /dev/null @@ -1,11 +0,0 @@ -# Required includes for the external toolchain backend - -include toolchain/helpers.mk -include toolchain/dependencies/dependencies.mk -include toolchain/elf2flt/elf2flt.mk -include toolchain/gcc/gcc-uclibc-4.x.mk -include toolchain/gdb/gdb.mk -include toolchain/kernel-headers/kernel-headers.mk -include toolchain/mklibs/mklibs.mk -include toolchain/toolchain-external/ext-tool.mk -include toolchain/uClibc/uclibc.mk diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in index 2ed65bf305..22e3fb2562 100644 --- a/toolchain/toolchain-external/Config.in +++ b/toolchain/toolchain-external/Config.in @@ -3,128 +3,832 @@ if BR2_TOOLCHAIN_EXTERNAL choice prompt "Toolchain" -config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201009 - bool "CodeSourcery ARM 2010.09" +comment "(e)glibc toolchains only available with shared lib support" + depends on BR2_PREFER_STATIC_LIB + +config BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_09 + bool "Linaro 2013.09" + depends on BR2_arm + depends on BR2_GCC_TARGET_ARCH = "armv7-a" + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on BR2_ARM_EABIHF + depends on !BR2_PREFER_STATIC_LIB + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + help + Linaro toolchain for the ARM architecture. It uses Linaro + GCC 2013.09 (based on gcc 4.8), Linaro GDB 2013.05 (based on + GDB 7.6), eglibc 2.17, Binutils 2013.06 (based on 2.23). It + generates code that runs on all Cortex-A profile devices, + but tuned for the Cortex-A9. The code generated is Thumb 2, + with the hard floating point calling convention, and uses + the VFPv3-D16 FPU instructions. + + To use this toolchain, you must disable soft float usage. + +config BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_08 + bool "Linaro 2013.08" + depends on BR2_arm + depends on BR2_GCC_TARGET_ARCH = "armv7-a" + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on BR2_ARM_EABIHF + depends on !BR2_PREFER_STATIC_LIB + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + help + Linaro toolchain for the ARM architecture. It uses Linaro + GCC 2013.08 (based on gcc 4.8), Linaro GDB 2013.05 (based on + GDB 7.6), eglibc 2.17, Binutils 2013.06 (based on 2.23). It + generates code that runs on all Cortex-A profile devices, + but tuned for the Cortex-A9. The code generated is Thumb 2, + with the hard floating point calling convention, and uses + the VFPv3-D16 FPU instructions. + + To use this toolchain, you must disable soft float usage. + +config BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_07 + bool "Linaro 2013.07" + depends on BR2_arm + depends on BR2_GCC_TARGET_ARCH = "armv7-a" + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on BR2_ARM_EABIHF + depends on !BR2_PREFER_STATIC_LIB + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + help + Linaro toolchain for the ARM architecture. It uses Linaro + GCC 2013.07 (based on gcc 4.8), Linaro GDB 2013.05 (based on + GDB 7.6), eglibc 2.17, Binutils 2013.06 (based on 2.23). It + generates code that runs on all Cortex-A profile devices, + but tuned for the Cortex-A9. The code generated is Thumb 2, + with the hard floating point calling convention, and uses + the VFPv3-D16 FPU instructions. + + To use this toolchain, you must disable soft float usage. + +comment "Linaro toolchains available for Cortex-A + EABIhf" + depends on BR2_arm + depends on BR2_GCC_TARGET_ARCH != "armv7-a" || !BR2_ARM_EABIHF + depends on !BR2_PREFER_STATIC_LIB + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201305 + bool "Sourcery CodeBench ARM 2013.05" + depends on BR2_arm + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on BR2_ARM_EABI + depends on !BR2_PREFER_STATIC_LIB + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + help + Sourcery CodeBench toolchain for the ARM architecture, from + Mentor Graphics. It uses gcc 4.7.3, binutils 2.23.52, glibc + 2.17 and gdb 7.4.50, kernel headers 3.8.2. It has support + for the following variants: + - ARMv5TE, little endian, soft-float, glibc + Select ARM926T, ARM10T, XScale or another ARMv5 core + Select BR2_SOFT_FLOAT + - ARMv4T, little endian, soft-float, glibc + Select ARM720T, ARM920T, ARM922T or another ARMv4 core + Select BR2_SOFT_FLOAT + - ARMv7-A, Thumb 2, little endian, soft-float, glibc + Select Cortex-A8, Cortex-A9 or another ARMv7-A core + Select BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mthumb + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201203 + bool "Sourcery CodeBench ARM 2012.03" + depends on BR2_arm + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on BR2_ARM_EABI + depends on !BR2_PREFER_STATIC_LIB + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + help + Sourcery CodeBench toolchain for the ARM architecture, from + Mentor Graphics. It uses gcc 4.6.3, binutils 2.21.53, glibc + 2.15 and gdb 7.2.50, kernel headers 3.2.10. It has support + for the following variants: + - ARMv5TE, little endian, soft-float, glibc + Select ARM926T, ARM10T, XScale or another ARMv5 core + Select BR2_SOFT_FLOAT + - ARMv4T, little endian, soft-float, glibc + Select ARM720T, ARM920T, ARM922T or another ARMv4 core + Select BR2_SOFT_FLOAT + - ARMv7-A, Thumb 2, little endian, soft-float, glibc + Select Cortex-A8, Cortex-A9 or another ARMv7-A core + Select BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mthumb + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201109 + bool "Sourcery CodeBench ARM 2011.09" depends on BR2_arm + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on BR2_ARM_EABI + depends on !BR2_PREFER_STATIC_LIB select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS help - Toolchain for the ARM architecture, from CodeSourcery. It - uses gcc 4.5.1, binutils 2.20, glibc 2.11 and gdb 7.2.50, - kernel headers 2.6.35.2. It has support for the following - variants: - - ARMv5TE, little endian, soft-float, glibc - - ARMv4T, little endian, soft-float, glibc - - ARMv7-A, Thumb 2, little endian, soft-float, glibc + Sourcery CodeBench toolchain for the ARM architecture, from + Mentor Graphics. It uses gcc 4.6.1, binutils 2.21.53, glibc + 2.13 and gdb 7.2.50, kernel headers 3.0.1. It has support + for the following variants: + - ARMv5TE, little endian, soft-float, glibc + Select ARM926T, ARM10T, XScale or another ARMv5 core + Select BR2_SOFT_FLOAT + - ARMv4T, little endian, soft-float, glibc + Select ARM720T, ARM920T, ARM922T or another ARMv4 core + Select BR2_SOFT_FLOAT + - ARMv7-A, Thumb 2, little endian, soft-float, glibc + Select Cortex-A8, Cortex-A9 or another ARMv7-A core + Select BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mthumb + +comment "Sourcery CodeBench toolchains available for the EABI ABI" + depends on BR2_arm + depends on !BR2_ARM_EABI + depends on !BR2_PREFER_STATIC_LIB -config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2010Q1 - bool "CodeSourcery ARM 2010q1" +config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A_201109 + bool "Arago ARMv7 2011.09" depends on BR2_arm + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on BR2_GCC_TARGET_ARCH = "armv7-a" + depends on BR2_ARM_EABI + depends on BR2_ARM_CPU_HAS_VFPV3 || BR2_ARM_CPU_MAYBE_HAS_VFPV3 + depends on !BR2_PREFER_STATIC_LIB select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS help - Toolchain for the ARM architecture, from CodeSourcery. It - uses gcc 4.4.1, binutils 2.19, glibc 2.11, gdb 7.0.50 and - kernel headers 2.6.32. It has support for the following - variants: - - ARMv5T, little endian, soft-float, glibc - - ARMv4T, little endian, soft-float, glibc - - ARMv7-A, Thumb 2, little endian, soft-float, glibc + Texas Instruments Arago 2011.09 toolchain, with gcc 4.5.3, + binutils 2.20.1, glibc 2.12, gdb 7.2. + + This toolchain uses -mfloat-abi=softfp (i.e can use FPU + instructions, but passes floating point function arguments + in integer registers), and requires a VFPv3 floating point + unit to work properly. This unit is available on most + Cortex-A ARM processors, but not all. -config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2009Q1 - bool "CodeSourcery ARM 2009q1" +config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE_201109 + bool "Arago ARMv5 2011.09" depends on BR2_arm + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on BR2_GCC_TARGET_ARCH != "armv4t" && \ + BR2_GCC_TARGET_ARCH != "armv4" && \ + BR2_GCC_TARGET_ARCH != "armv5t" + depends on BR2_ARM_EABI + depends on !BR2_PREFER_STATIC_LIB select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS help - Toolchain for the ARM architecture, from CodeSourcery. It - uses gcc 4.3.3, binutils 2.19, glibc 2.8 and gdb 6.8 and - kernel headers 2.6.30. It has support for the following - variants: - - ARMv5T, little endian, soft-float, glibc - - ARMv4T, little endian, soft-float, glibc - - ARMv7-A, Thumb 2, little endian, soft-float, glibc + Texas Instruments Arago ARMv5 2011.09 toolchain, with gcc + 4.5.3, binutils 2.20.1, glibc 2.12, gdb 7.2. + + This toolchain uses software-floating point. -config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS44 - bool "CodeSourcery MIPS 4.4" +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201305 + bool "Sourcery CodeBench MIPS 2013.05" + depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_MIPS_NABI32 + depends on !BR2_PREFER_STATIC_LIB + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + help + Sourcery CodeBench toolchain for the MIPS architecture, from + Mentor Graphics. It uses gcc 4.7.3, binutils 2.23.52, glibc + 2.17, uClibc 0.9.30 and gdb 7.4.50, kernel headers + 3.8.2. It has support for the following variants: + - MIPS32 O32 big endian glibc + Select a MIPS generic core + Disable BR2_SOFT_FLOAT + - MIPS64 big endian glibc + Select a MIPS64 generic core + Select the n64 ABI + Disable BR2_SOFT_FLOAT + - MIPS32 O32 little endian glibc + Select a MIPS generic core + Disable BR2_SOFT_FLOAT + - MIPS64 little endian glibc + Select a MIPS64 generic core + Select the n64 ABI + Disable BR2_SOFT_FLOAT + - MIPS32 big endian soft float glibc + Select a MIPS generic core + Select BR2_SOFT_FLOAT + - MIPS64 big endian soft float glibc + Select a MIPS64 generic core + Select the n64 ABI + Select BR2_SOFT_FLOAT + - MIPS32 little endian soft float glibc + Select a MIPS generic core + Select BR2_SOFT_FLOAT + - MIPS64 little endian soft float glibc + Select a MIPS64 generic core + Select the n64 ABI + Select BR2_SOFT_FLOAT + - MIPS32 big endian microMIPS glibc + Select a MIPS generic core + Disable BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mips16 + - MIPS32 little endian microMIPS glibc + Select a MIPS generic core + Disable BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mips16 + - MIPS32 big endian soft float microMIPS glibc + Select a MIPS generic core + Select BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mips16 + - MIPS32 little endian soft float microMIPS glibc + Select a MIPS generic core + Select BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mips16 + - MIPS32 big endian uclibc + Not usable in Buildroot yet. + - MIPS32 little endian uclibc + Not usable in Buildroot yet. + - MIPS32 big endian soft float uclibc + Not usable in Buildroot yet. + - MIPS32 little endian soft float uclibc + Not usable in Buildroot yet. + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201209 + bool "Sourcery CodeBench MIPS 2012.09" depends on BR2_mips || BR2_mipsel + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_MIPS_NABI32 + depends on !BR2_PREFER_STATIC_LIB + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + help + Sourcery CodeBench toolchain for the MIPS architecture, from + Mentor Graphics. It uses gcc 4.7.2, binutils 2.23.51, glibc + 2.16, uClibc 0.9.30 and gdb 7.4.50, kernel headers + 3.5.4. It has support for the following variants: + - MIPS32 O32 big endian glibc + Select a MIPS generic core + Disable BR2_SOFT_FLOAT + - MIPS64 big endian glibc + Select a MIPS generic core + Select the n64 ABI + Disable BR2_SOFT_FLOAT + - MIPS32 O32 little endian glibc + Select a MIPS generic core + Disable BR2_SOFT_FLOAT + - MIPS64 little endian glibc + Select a MIPS generic core + Select the n64 ABI + Disable BR2_SOFT_FLOAT + - MIPS32 big endian soft float glibc + Select a MIPS generic core + Select BR2_SOFT_FLOAT + - MIPS64 big endian soft float glibc + Select a MIPS generic core + Select the n64 ABI + Select BR2_SOFT_FLOAT + - MIPS32 little endian soft float glibc + Select a MIPS generic core + Select BR2_SOFT_FLOAT + - MIPS64 little endian soft float glibc + Select a MIPS generic core + Select the n64 ABI + Select BR2_SOFT_FLOAT + - MIPS32 big endian microMIPS glibc + Select a MIPS generic core + Disable BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mips16 + - MIPS32 little endian microMIPS glibc + Select a MIPS generic core + Disable BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mips16 + - MIPS32 big endian soft float microMIPS glibc + Select a MIPS generic core + Select BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mips16 + - MIPS32 little endian soft float microMIPS glibc + Select a MIPS generic core + Select BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mips16 + - MIPS32 big endian uclibc + Not usable in Buildroot yet. + - MIPS32 little endian uclibc + Not usable in Buildroot yet. + - MIPS32 big endian soft float uclibc + Not usable in Buildroot yet. + - MIPS32 little endian soft float uclibc + Not usable in Buildroot yet. + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201203 + bool "Sourcery CodeBench MIPS 2012.03" + depends on BR2_mips || BR2_mipsel + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_MIPS_NABI32 + depends on !BR2_PREFER_STATIC_LIB + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + help + Sourcery CodeBench toolchain for the MIPS architecture, from + Mentor Graphics. It uses gcc 4.6.3, binutils 2.21.53, glibc + 2.15, uClibc 0.9.30 and gdb 7.2.50, kernel headers + 3.2.10. It has support for the following variants: + - MIPS32 O32 big endian glibc + Select a MIPS generic core + Disable BR2_SOFT_FLOAT + - MIPS64 big endian glibc + Select a MIPS generic core + Select the n64 ABI + Disable BR2_SOFT_FLOAT + - MIPS32 O32 little endian glibc + Select a MIPS generic core + Disable BR2_SOFT_FLOAT + - MIPS64 little endian glibc + Select a MIPS generic core + Select the n64 ABI + Disable BR2_SOFT_FLOAT + - MIPS32 big endian soft float glibc + Select a MIPS generic core + Select BR2_SOFT_FLOAT + - MIPS64 big endian soft float glibc + Select a MIPS generic core + Select the n64 ABI + Select BR2_SOFT_FLOAT + - MIPS32 little endian soft float glibc + Select a MIPS generic core + Select BR2_SOFT_FLOAT + - MIPS64 little endian soft float glibc + Select a MIPS generic core + Select the n64 ABI + Select BR2_SOFT_FLOAT + - MIPS32 big endian microMIPS glibc + Select a MIPS generic core + Disable BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mips16 + - MIPS32 little endian microMIPS glibc + Select a MIPS generic core + Disable BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mips16 + - MIPS32 big endian soft float microMIPS glibc + Select a MIPS generic core + Select BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mips16 + - MIPS32 little endian soft float microMIPS glibc + Select a MIPS generic core + Select BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mips16 + - MIPS32 big endian uclibc + Not usable in Buildroot yet. + - MIPS32 little endian uclibc + Not usable in Buildroot yet. + - MIPS32 big endian soft float uclibc + Not usable in Buildroot yet. + - MIPS32 little endian soft float uclibc + Not usable in Buildroot yet. + +comment "Sourcery CodeBench toolchains are only available for MIPS/MIPS64 o32 and n64" + depends on BR2_MIPS_NABI32 + depends on !BR2_PREFER_STATIC_LIB + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + bool "Sourcery CodeBench Nios-II 2013.05" + depends on BR2_nios2 + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_PREFER_STATIC_LIB + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + help + Sourcery CodeBench toolchain for the Nios-II architecture, + from Mentor Graphics. It uses gcc 4.7.3, binutils 2.23.52, + glibc 2.17, gdb 7.4.50 and kernel headers 3.7.0. + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103 + bool "Sourcery CodeBench PowerPC 2011.03" + depends on BR2_powerpc + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_PREFER_STATIC_LIB select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS help - Toolchain for the MIPS architecture, from CodeSourcery. It - uses gcc 4.4.1, binutils 2.19, glibc 2.11, uClibc 0.9.30 and - gdb 7.0, kernel headers 2.6.32. It has support for the - following variants: - - MIPS32 O32 big endian glibc - - MIPS32 O32 little endian glibc - - MIPS32 big endian soft float glibc - - MIPS32 little endian soft float glibc - - MIPS32 big endian microMIPS glibc - - MIPS32 little endian microMIPS glibc - - MIPS32 big endian soft float microMIPS glibc - - MIPS32 little endian soft float microMIPS glibc - - MIPS32 big endian uclibc - - MIPS32 little endian uclibc - - MIPS32 big endian soft float uclibc - - MIPS32 little endian soft float uclibc + Sourcery CodeBench toolchain for the PowerPC architecture, + from Mentor Graphics. It uses gcc 4.5.2, binutils 2.20.51, + glibc 2.13, gdb 7.2.50 and kernel headers 2.6.38. It has + support for the following variants: + - 603 glibc, 32 bits + Select a generic PowerPC core + Disable BR2_SOFT_FLOAT + - 603 soft float glibc, 32 bits + Select a generic PowerPC core + Enable BR2_SOFT_FLOAT + - e600 altivec glibc, 32 bits + Set BR2_TARGET_OPTIMIZATION to -te600 + - e500v1 glibc, 32 bits + Set BR2_TARGET_OPTIMIZATION to -te500v1 + - e500v2 glibc, 32 bits + Set BR2_TARGET_OPTIMIZATION to -te500v2 + - e500mc glibc, 32 bits + Set BR2_TARGET_OPTIMIZATION to -te500mc + - 970 glibc hard-float, 64 bits + Set BR2_TARGET_OPTIMIZATION to -m64 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009 - bool "CodeSoucery PowerPC 2010.09" + bool "Sourcery CodeBench PowerPC 2010.09" depends on BR2_powerpc + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_PREFER_STATIC_LIB select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS help - Toolchain for the PowerPC architecture, from - CodeSourcery. It uses gcc 4.5.1, binutils 2.20, glibc 2.11, - gdb 7.2.50 and kernel headers 2.6.35.2. It has support for - the following variants: - - 603 glibc, 32 bits - - 603 soft float glibc, 32 bits - - e600 altivec glibc, 32 bits - - e500v1 glibc, 32 bits - - e500v2 glibc, 32 bits - - e500mc glibc, 32 bits - - 970 glibc hard-float, 64 bits + Sourcery CodeBench toolchain for the PowerPC architecture, + from Mentor Graphics. It uses gcc 4.5.1, binutils 2.20, + glibc 2.11, gdb 7.2.50 and kernel headers 2.6.35.2. It has + support for the following variants: + - 603 glibc, 32 bits + Select a generic PowerPC core + Disable BR2_SOFT_FLOAT + - 603 soft float glibc, 32 bits + Select a generic PowerPC core + Enable BR2_SOFT_FLOAT + - e600 altivec glibc, 32 bits + Set BR2_TARGET_OPTIMIZATION to -te600 + - e500v1 glibc, 32 bits + Set BR2_TARGET_OPTIMIZATION to -te500v1 + - e500v2 glibc, 32 bits + Set BR2_TARGET_OPTIMIZATION to -te500v2 + - e500mc glibc, 32 bits + Set BR2_TARGET_OPTIMIZATION to -te500mc + - 970 glibc hard-float, 64 bits + Set BR2_TARGET_OPTIMIZATION to -m64 -config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009 - bool "CodeSoucery PowerPC 2010.09" - depends on BR2_sh +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201209 + bool "Sourcery CodeBench SH 2012.09" + depends on BR2_sh4a || BR2_sh4aeb + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_PREFER_STATIC_LIB select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS help - Toolchain for the SuperH architecture, from CodeSourcery. It - uses gcc 4.5.1, binutils 2.20, glibc 2.11, uClibc 0.9.30, - gdb 7.2.50 and kernel headers 2.6.35.2. It has support for - the following variants: - - SH4A, glibc, little endian - - SH4A, glibc, big endian + Sourcery CodeBench toolchain for the SuperH architecture, + from Mentor Graphics. It uses gcc 4.7.2, binutils 2.23.51, + glibc 2.16, uClibc 0.9.30, gdb 7.4.50 and kernel headers + 3.5.4. It has support for the following variants: + - SH4A, glibc, little endian + Default. + - SH4A, glibc, big endian + Add -mb to BR2_TARGET_OPTIMIZATION - SH4A, uClibc, little endian - - SH4A, uClibc, big endian + Not usable in Buildroot yet. + - SH4A, uClibc, big endian + Not usable in Buildroot yet. + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201203 + bool "Sourcery CodeBench SH 2012.03" + depends on BR2_sh4a || BR2_sh4aeb + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_PREFER_STATIC_LIB + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + help + Sourcery CodeBench toolchain for the SuperH architecture, + from Mentor Graphics. It uses gcc 4.6.3, binutils 2.21.53, + glibc 2.15, uClibc 0.9.30, gdb 7.2.50 and kernel headers + 3.2.10. It has support for the following variants: + - SH4A, glibc, little endian + Default. + - SH4A, glibc, big endian + Add -mb to BR2_TARGET_OPTIMIZATION + - SH4A, uClibc, little endian + Not usable in Buildroot yet. + - SH4A, uClibc, big endian + Not usable in Buildroot yet. + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201103 + bool "Sourcery CodeBench SH 2011.03" + depends on BR2_sh4a || BR2_sh4aeb + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_PREFER_STATIC_LIB + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + help + Sourcery CodeBench toolchain for the SuperH architecture, + from Mentor Graphics. It uses gcc 4.5.2, binutils 2.20, + glibc 2.13, uClibc 0.9.30, gdb 7.2.50 and kernel headers + 2.6.38. It has support for the following variants: + - SH4A, glibc, little endian + Default. + - SH4A, glibc, big endian + Add -mb to BR2_TARGET_OPTIMIZATION + - SH4A, uClibc, little endian + Not usable in Buildroot yet. + - SH4A, uClibc, big endian + Not usable in Buildroot yet. + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103 + bool "Sourcery CodeBench SH 2011.03" + depends on BR2_sh2a + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + select BR2_LARGEFILE + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_USE_WCHAR + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + help + Sourcery CodeBench toolchain for the SuperH architecture, + from Mentor Graphics. It uses gcc 4.5.2, binutils 2.20, + uClibc 0.9.30, gdb 7.2.50 and kernel headers 2.6.38. It has + support for the following variants: + - SH2A, uClibc, big endian + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009 + bool "Sourcery CodeBench SH 2010.09" + depends on BR2_sh2a + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + select BR2_LARGEFILE + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_USE_WCHAR + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + help + Sourcery CodeBench toolchain for the SuperH architecture, + from Mentor Graphics. It uses gcc 4.5.1, binutils 2.20, + uClibc 0.9.30, gdb 7.2.50 and kernel headers 2.6.35.2. It + has support for the following variants: + - SH2A, uClibc, big endian + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201209 + bool "Sourcery CodeBench x86/x86_64 2012.09" + depends on BR2_i386 || BR2_x86_64 + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_PREFER_STATIC_LIB + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + help + Sourcery CodeBench toolchain for the x86/x86_64 + architectures, from Mentor Graphics. It uses gcc 4.7.2, + binutils 2.23.51, glibc 2.16, gdb 7.4.50 and kernel headers + 3.5.4. It has support for the following variants: + - Intel Pentium 4, glibc, 32 bits + Default for x86, nothing special to do. + - Intel Atom, glibc, 32 bits + Select an Atom core + - Intel Xeon, glibc, 64 bits + Default for x86_64, nothing special to do. + - Intel Core 2, glibc, 64 bits + Select a Core 2 core + Other architecture variants (beyond Pentium-4/Xeon) are + supported as well, but glibc is not optimised for it. + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201203 + bool "Sourcery CodeBench x86/x86_64 2012.03" + depends on BR2_i386 || BR2_x86_64 + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_PREFER_STATIC_LIB + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + help + Sourcery CodeBench toolchain for the x86/x86_64 + architectures, from Mentor Graphics. It uses gcc 4.6.3, + binutils 2.21.53, glibc 2.15, gdb 7.2.50 and kernel headers + 3.2.10. It has support for the following variants: + - Intel Pentium 4, glibc, 32 bits + Default for x86, nothing special to do. + - Intel Atom, glibc, 32 bits + Select an Atom core + - Intel Xeon, glibc, 64 bits + Default for x86_64, nothing special to do. + - Intel Core 2, glibc, 64 bits + Select a Core 2 core + Other architecture variants (beyond Pentium-4/Xeon) are + supported as well, but glibc is not optimised for it. + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201109 + bool "Sourcery CodeBench x86/x86_64 2011.09" + depends on BR2_i386 || BR2_x86_64 + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_PREFER_STATIC_LIB + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + help + Sourcery CodeBench toolchain for the x86/x86_64 + architectures, from Mentor Graphics. It uses gcc 4.6.1, + binutils 2.21.53, glibc 2.13, gdb 7.2.50 and kernel headers + 3.0.1. It has support for the following variants: + - Intel Pentium 4, glibc, 32 bits + Default for x86, nothing special to do. + - Intel Atom, glibc, 32 bits + Select an Atom core + - Intel Xeon, glibc, 64 bits + Default for x86_64, nothing special to do. + - Intel Core 2, glibc, 64 bits + Select a Core 2 core + Other architecture variants (beyond Pentium-4/Xeon) are + supported as well, but glibc is not optimised for it. + +config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 + bool "Blackfin.uclinux.org 2012R2-RC2" + depends on BR2_bfin + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + select BR2_INSTALL_LIBSTDCPP + select BR2_LARGEFILE + select BR2_INET_IPV6 + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_USE_WCHAR + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_HOSTARCH_NEEDS_IA32_LIBS + help + Toolchain for the Blackfin architecture, from + http://blackfin.uclinux.org. + +config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1 + bool "Blackfin.uclinux.org 2012R1-RC2" + depends on BR2_bfin + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + select BR2_INSTALL_LIBSTDCPP + select BR2_LARGEFILE + select BR2_INET_IPV6 + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_USE_WCHAR + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_HOSTARCH_NEEDS_IA32_LIBS + help + Toolchain for the Blackfin architecture, from + http://blackfin.uclinux.org. + +config BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEEL_14_3 + bool "Xilinx Little Endian Microblaze GNU Tools 14.3" + depends on BR2_microblazeel + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_PREFER_STATIC_LIB + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_HOSTARCH_NEEDS_IA32_LIBS + help + Toolchain for the Microblaze architecture, from + http://git.xilinx.com/?p=microblaze-gnu.git;a=tree;f=binaries. It + uses gcc 4.6.2, binutils 2.21.53, glibc 2.14 and gdb 7.4.50. + +config BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEEL_V2 + bool "Xilinx Little Endian Microblaze GNU Tools v2" + depends on BR2_microblazeel + depends on BR2_HOSTARCH = "x86_64" + depends on !BR2_PREFER_STATIC_LIB + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Toolchain for the Microblaze architecture, from + http://wiki.xilinx.com/mb-gnu-tools + +config BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEBE_14_3 + bool "Xilinx Big Endian Microblaze GNU Tools" + depends on BR2_microblazebe + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_PREFER_STATIC_LIB + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_HOSTARCH_NEEDS_IA32_LIBS + help + Toolchain for the Microblaze architecture, from + http://git.xilinx.com/?p=microblaze-gnu.git;a=tree;f=binaries. It + uses gcc 4.6.2, binutils 2.21.53, glibc 2.14 and gdb 7.4.50. + +config BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEBE_V2 + bool "Xilinx Big Endian Microblaze GNU Tools" + depends on BR2_microblazebe + depends on BR2_HOSTARCH = "x86_64" + depends on !BR2_PREFER_STATIC_LIB + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Toolchain for the Microblaze architecture, from + http://wiki.xilinx.com/mb-gnu-tools + +config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_09 + bool "Linaro AArch64 13.09" + depends on BR2_aarch64 + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_PREFER_STATIC_LIB + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Toolchain for the AArch64 architecture, from + http://www.linaro.org/engineering/armv8/ + +config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_08 + bool "Linaro AArch64 13.08" + depends on BR2_aarch64 + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_PREFER_STATIC_LIB + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Toolchain for the AArch64 architecture, from + http://www.linaro.org/engineering/armv8/ + +config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_07 + bool "Linaro AArch64 13.07" + depends on BR2_aarch64 + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_PREFER_STATIC_LIB + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Toolchain for the AArch64 architecture, from + http://www.linaro.org/engineering/armv8/ config BR2_TOOLCHAIN_EXTERNAL_CUSTOM - bool "Custom toolchain" - help - Use this option to use a custom toolchain pre-installed on - your system. + bool "Custom toolchain" + help + Use this option to use a custom toolchain pre-installed on + your system. endchoice +choice + prompt "Toolchain origin" + # Keep compatibility with old defconfig files that are using + # custom toolchains, and which are therefore assuming that + # "preinstalled" in the default choice. + default BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED if BR2_TOOLCHAIN_EXTERNAL_CUSTOM + config BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD - bool "Download toolchain automatically" - default y - depends on !BR2_TOOLCHAIN_EXTERNAL_CUSTOM + bool "Toolchain to be downloaded and installed" + help + Select this option if you want Buildroot to download and install the + toolchain. If you have selected a custom toolchain, specify the URL + in BR2_TOOLCHAIN_EXTERNAL_URL. + +config BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED + bool "Pre-installed toolchain" help - When enabled, Buildroot will automatically download and - install the selected external toolchain. When disabled, - Buildroot will use a pre-installed toolchain. + Select this option if you want to use a pre-installed toolchain. + Specify the path to this toolchain in BR2_TOOLCHAIN_EXTERNAL_PATH. + +endchoice config BR2_TOOLCHAIN_EXTERNAL_PATH string "Toolchain path" default "/path/to/toolchain/usr" - depends on !BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD + depends on BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED help Path to where the external toolchain is installed. +config BR2_TOOLCHAIN_EXTERNAL_URL + string "Toolchain URL" + depends on BR2_TOOLCHAIN_EXTERNAL_CUSTOM && BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD + help + URL of the custom toolchain tarball to download and install. + config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX string "Toolchain prefix" depends on BR2_TOOLCHAIN_EXTERNAL_CUSTOM @@ -132,27 +836,53 @@ config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX config BR2_TOOLCHAIN_EXTERNAL_PREFIX string - default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2009Q1 - default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2010Q1 - default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201009 - default "mips-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS44 + default "arm-linux-gnueabihf" if BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_09 + default "arm-linux-gnueabihf" if BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_08 + default "arm-linux-gnueabihf" if BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_07 + default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201109 + default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201203 + default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201305 + default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A_201109 + default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE_201109 + default "aarch64-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_09 + default "aarch64-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_08 + default "aarch64-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_07 + default "microblazeel-unknown-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEEL_14_3 + default "microblazeel-unknown-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEEL_V2 + default "microblaze-unknown-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEBE_14_3 + default "microblaze-unknown-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEBE_V2 + default "mips-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201203 + default "mips-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201209 + default "mips-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201305 + default "nios2-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 default "powerpc-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009 - default "sh4-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009 - default $(BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX) \ + default "powerpc-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103 + default "sh-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201103 + default "sh-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201203 + default "sh-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201209 + default "sh-uclinux" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009 + default "sh-uclinux" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103 + default "i686-pc-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201109 + default "i686-pc-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201203 + default "i686-pc-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201209 + default "bfin-uclinux" if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1 && BR2_BINFMT_FLAT + default "bfin-linux-uclibc" if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1 && BR2_BINFMT_FDPIC + default "bfin-uclinux" if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 && BR2_BINFMT_FLAT + default "bfin-linux-uclibc" if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 && BR2_BINFMT_FDPIC + default BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX \ if BR2_TOOLCHAIN_EXTERNAL_CUSTOM config BR2_TOOLCHAIN_EXTERNAL_GLIBC bool - select BR2_LARGEFILE - select BR2_INET_IPV6 - select BR2_INET_RPC - select BR2_USE_WCHAR - select BR2_ENABLE_LOCALE - select BR2_PROGRAM_INVOCATION - select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_USES_GLIBC config BR2_TOOLCHAIN_EXTERNAL_UCLIBC bool + select BR2_TOOLCHAIN_USES_UCLIBC + +config BR2_TOOLCHAIN_EXTERNAL_MUSL + bool + select BR2_TOOLCHAIN_USES_MUSL if BR2_TOOLCHAIN_EXTERNAL_CUSTOM @@ -163,10 +893,36 @@ choice config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC bool "uClibc" select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + # For the time being, we assume that all custom external + # toolchains have shadow password support. + select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS + help + Select this option if your external toolchain uses the + uClibc C library (available from http://www.uclibc.org/). config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC - bool "glibc" + bool "glibc/eglibc" + depends on !BR2_PREFER_STATIC_LIB select BR2_TOOLCHAIN_EXTERNAL_GLIBC + help + Select this option if your external toolchain uses the GNU C + library (available from https://www.gnu.org/software/libc/) + or its variant the eglibc library (http://www.eglibc.org/). + + Note: eglibc is a variant of glibc that (among other things) + can be configured to exclude some of its features. Using a + toolchain with eglibc configured to exclude key features may + cause build failures to some packages. + +comment "(e)glibc only available with shared lib support" + depends on BR2_PREFER_STATIC_LIB + +config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL + bool "musl" + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Select this option if your external toolchain uses the + 'musl' C library, available from http://www.musl-libc.org/. endchoice @@ -188,14 +944,6 @@ config BR2_TOOLCHAIN_EXTERNAL_INET_IPV6 IPv6. If you don't know, leave the default value, Buildroot will tell you if it's correct or not. -config BR2_TOOLCHAIN_EXTERNAL_INET_RPC - bool "Toolchain has RPC support ?" - select BR2_INET_RPC - help - Select this option if your external toolchain supports - RPC. If you don't know, leave the default value, Buildroot - will tell you if it's correct or not. - config BR2_TOOLCHAIN_EXTERNAL_WCHAR bool "Toolchain has WCHAR support?" select BR2_USE_WCHAR @@ -213,24 +961,46 @@ config BR2_TOOLCHAIN_EXTERNAL_LOCALE support. If you don't know, leave the default value, Buildroot will tell you if it's correct or not. -config BR2_TOOLCHAIN_EXTERNAL_PROGRAM_INVOCATION - bool "Toolchain has program invocation support?" - select BR2_PROGRAM_INVOCATION - help - Select this option if your external toolchain has program - invocation support. If you don't know, leave the default - value, Buildroot will tell you if it's correct or not. - config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS bool "Toolchain has threads support?" select BR2_TOOLCHAIN_HAS_THREADS + default y help Select this option if your external toolchain has thread support. If you don't know, leave the default value, Buildroot will tell you if it's correct or not. +config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG + bool "Toolchain has threads debugging support?" + depends on BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + default y + help + Select this option if your external toolchain has thread + debugging support. If you don't know, leave the default + value, Buildroot will tell you if it's correct or not. + +config BR2_TOOLCHAIN_EXTERNAL_HAS_SSP + bool "Toolchain has SSP support?" + select BR2_TOOLCHAIN_HAS_SSP + help + Selection this option if your external toolchain has Stack + Smashing Protection support enabled. If you don't know, + leave the default value, Buildroot will tell you if it's + correct or not. + endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC +config BR2_TOOLCHAIN_EXTERNAL_INET_RPC + bool "Toolchain has RPC support?" + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + depends on !BR2_TOOLCHAIN_EXTERNAL_MUSL + default y if BR2_TOOLCHAIN_EXTERNAL_GLIBC + help + Select this option if your external toolchain supports + RPC. If you don't know, leave the default value, Buildroot + will tell you if it's correct or not. + config BR2_TOOLCHAIN_EXTERNAL_CXX bool "Toolchain has C++ support?" select BR2_INSTALL_LIBSTDCPP @@ -239,7 +1009,49 @@ config BR2_TOOLCHAIN_EXTERNAL_CXX support. If you don't know, leave the default value, Buildroot will tell you if it's correct or not. +config BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS + string "Extra toolchain libraries to be copied to target" + help + If your external toolchain provides extra libraries that + need to be copied to the target filesystem, enter them + here, separated by spaces. They will be copied to the + target's /lib directory. + endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM +config BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY + bool "Copy gdb server to the Target" + depends on BR2_TOOLCHAIN_EXTERNAL + help + Copy the gdbserver provided by the external toolchain to the + target. + +# When the FDPIC shared binary format is used, the corresponding libraries are +# always installed. When a different binary format is used, we offer the option +# of installing the FDPIC shared libraries. +config BR2_BFIN_INSTALL_FDPIC_SHARED + bool "Install FDPIC shared libraries" + depends on BR2_bfin && !BR2_BINFMT_FDPIC + help + The Linux kernel supports running both FDPIC and FLAT applications + concurrently if the binary format specific libraries are installed + properly. This option allows developer to install FDPIC libraries + into a buildroot rootfs image built with binary format that is not + FDPIC. + +# When the FLAT shared binary format is used, we force the installation +# of the corresponding libraries. When a different binary format is +# used, we offer the option of installing the FLAT shared libraries. +config BR2_BFIN_INSTALL_FLAT_SHARED + bool "Install FLAT shared libraries" if !BR2_BINFMT_FLAT_SHARED + depends on BR2_bfin + default y if BR2_BINFMT_FLAT_SHARED + help + The Linux kernel supports running both FDPIC and FLAT applications + concurrently if the binary format specific libraries are installed + properly. This option allows developer to install FLAT libraries + into a buildroot rootfs image built with binary format that is not + shared FLAT. + endif # BR2_TOOLCHAIN_EXTERNAL diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk deleted file mode 100644 index 158453071a..0000000000 --- a/toolchain/toolchain-external/ext-tool.mk +++ /dev/null @@ -1,211 +0,0 @@ - -# -# This file implements the support for external toolchains, i.e -# toolchains that have not been produced by Buildroot itself and that -# Buildroot can download from the Web or that are already available on -# the system on which Buildroot runs. So far, we have tested this -# with: -# -# * Toolchains generated by Crosstool-NG -# * Toolchains generated by Buildroot -# * ARM, MIPS and PowerPC toolchains made available by -# Codesourcery. For the MIPS toolchain, the -muclibc variant isn't -# supported yet, only the default glibc-based variant is. -# -# The basic principle is the following -# -# 1. a. For toolchains downloaded from the Web, Buildroot already -# knows their configuration, so it just downloads them and extract -# them in $(TOOLCHAIN_EXTERNAL_DIR). -# -# 1. b. For pre-installed toolchains, perform some checks on the -# conformity between the toolchain configuration described in the -# Buildroot menuconfig system, and the real configuration of the -# external toolchain. This is for example important to make sure that -# the Buildroot configuration system knows whether the toolchain -# supports RPC, IPv6, locales, large files, etc. Unfortunately, these -# things cannot be detected automatically, since the value of these -# options (such as BR2_INET_RPC) are needed at configuration time -# because these options are used as dependencies for other -# options. And at configuration time, we are not able to retrieve the -# external toolchain configuration. -# -# 2. Copy the libraries needed at runtime to the target directory, -# $(TARGET_DIR). Obviously, things such as the C library, the dynamic -# loader and a few other utility libraries are needed if dynamic -# applications are to be executed on the target system. -# -# 3. Copy the libraries and headers to the staging directory. This -# will allow all further calls to gcc to be made using --sysroot -# $(STAGING_DIR), which greatly simplifies the compilation of the -# packages when using external toolchains. So in the end, only the -# cross-compiler binaries remains external, all libraries and headers -# are imported into the Buildroot tree. - -uclibc: dependencies $(STAMP_DIR)/ext-toolchain-installed - -LIB_EXTERNAL_LIBS=ld*.so libc.so libcrypt.so libdl.so libgcc_s.so libm.so libnsl.so libresolv.so librt.so libutil.so -ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC),y) -LIB_EXTERNAL_LIBS+=libnss_files.so libnss_dns.so -endif - -ifeq ($(BR2_INSTALL_LIBSTDCPP),y) -USR_LIB_EXTERNAL_LIBS+=libstdc++.so -endif - -ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) -LIB_EXTERNAL_LIBS+=libpthread.so -ifeq ($(BR2_PACKAGE_GDB_SERVER),y) -LIB_EXTERNAL_LIBS+=libthread_db.so -endif # gdbserver -endif # ! no threads - -# Details about sysroot directory selection. -# -# To find the sysroot directory: -# -# * We first try the -print-sysroot option, available in gcc 4.4.x -# and in some Codesourcery toolchains. -# -# * If this option is not available, we fallback to the value of -# --with-sysroot as visible in CROSS-gcc -v. -# -# When doing those tests, we don't pass any option to gcc that could -# select a multilib variant (such as -march) as we want the "main" -# sysroot, which contains all variants of the C library in the case of -# multilib toolchains. We use the TARGET_CC_NO_SYSROOT variable, which -# is the path of the cross-compiler, without the -# --sysroot=$(STAGING_DIR), since what we want to find is the location -# of the original toolchain sysroot. This "main" sysroot directory is -# stored in SYSROOT_DIR. -# -# Then, multilib toolchains are a little bit more complicated, since -# they in fact have multiple sysroots, one for each variant supported -# by the toolchain. So we need to find the particular sysroot we're -# interested in. -# -# To do so, we ask the compiler where its sysroot is by passing all -# flags (including -march and al.), except the --sysroot flag since we -# want to the compiler to tell us where its original sysroot -# is. ARCH_SUBDIR will contain the subdirectory, in the main -# SYSROOT_DIR, that corresponds to the selected architecture -# variant. ARCH_SYSROOT_DIR will contain the full path to this -# location. -# -# One might wonder why we don't just bother with ARCH_SYSROOT_DIR. The -# fact is that in multilib toolchains, the header files are often only -# present in the main sysroot, and only the libraries are available in -# each variant-specific sysroot directory. - -TARGET_CC_NO_SYSROOT=$(filter-out --sysroot=%,$(TARGET_CC_NOCCACHE)) - -ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y) -TOOLCHAIN_EXTERNAL_DEPENDENCIES = $(TOOLCHAIN_EXTERNAL_DIR)/.extracted -else -TOOLCHAIN_EXTERNAL_DEPENDENCIES = $(STAMP_DIR)/ext-toolchain-checked -endif - -ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2009Q1),y) -TOOLCHAIN_EXTERNAL_SITE=http://www.codesourcery.com/sgpp/lite/arm/portal/package5383/public/arm-none-linux-gnueabi/ -TOOLCHAIN_EXTERNAL_SOURCE=arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 -else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2010Q1),y) -TOOLCHAIN_EXTERNAL_SITE=http://www.codesourcery.com/sgpp/lite/arm/portal/package6488/public/arm-none-linux-gnueabi/ -TOOLCHAIN_EXTERNAL_SOURCE=arm-2010q1-202-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 -else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201009),y) -TOOLCHAIN_EXTERNAL_SITE=http://www.codesourcery.com/sgpp/lite/arm/portal/package7851/public/arm-none-linux-gnueabi/ -TOOLCHAIN_EXTERNAL_SOURCE=arm-2010.09-50-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 -else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS44),y) -TOOLCHAIN_EXTERNAL_SITE=http://www.codesourcery.com/sgpp/lite/mips/portal/package7401/public/mips-linux-gnu/ -TOOLCHAIN_EXTERNAL_SOURCE=mips-4.4-303-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2 -else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009),y) -TOOLCHAIN_EXTERNAL_SITE=http://www.codesourcery.com/sgpp/lite/power/portal/package7703/public/powerpc-linux-gnu/ -TOOLCHAIN_EXTERNAL_SOURCE=freescale-2010.09-55-powerpc-linux-gnu-i686-pc-linux-gnu.tar.bz2 -else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009),y) -TOOLCHAIN_EXTERNAL_SITE=http://www.codesourcery.com/sgpp/lite/superh/portal/package7783/public/sh-linux-gnu/ -TOOLCHAIN_EXTERNAL_SOURCE=renesas-2010.09-45-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2 -else -# A value must be set (even if unused), otherwise the -# $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE) rule would override the main -# $(DL_DIR) rule -TOOLCHAIN_EXTERNAL_SOURCE=none -endif - -# Download and extraction of a toolchain -$(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE): - $(call DOWNLOAD,$(TOOLCHAIN_EXTERNAL_SITE),$(TOOLCHAIN_EXTERNAL_SOURCE)) - -$(TOOLCHAIN_EXTERNAL_DIR)/.extracted: $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE) - mkdir -p $(@D) - $(INFLATE$(suffix $(TOOLCHAIN_EXTERNAL_SOURCE))) $^ | $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) - - $(Q)touch $@ - -# Checks for an already installed toolchain: check the toolchain -# location, check that it supports sysroot, and then verify that it -# matches the configuration provided in Buildroot: ABI, C++ support, -# type of C library and all C library features. -$(STAMP_DIR)/ext-toolchain-checked: - @echo "Checking external toolchain settings" - $(Q)$(call check_cross_compiler_exists) - $(Q)SYSROOT_DIR=`$(TARGET_CC_NO_SYSROOT) -print-sysroot 2>/dev/null` ; \ - if test -z "$${SYSROOT_DIR}" ; then \ - SYSROOT_DIR=`readlink -f $$(LANG=C $(TARGET_CC_NO_SYSROOT) -print-file-name=libc.a) |sed -r -e 's:usr/lib/libc\.a::;'` ; \ - fi ; \ - if test -z "$${SYSROOT_DIR}" ; then \ - @echo "External toolchain doesn't support --sysroot. Cannot use." ; \ - exit 1 ; \ - fi ; \ - if test x$(BR2_arm) == x"y" ; then \ - $(call check_arm_abi) ; \ - fi ; \ - if test x$(BR2_INSTALL_LIBSTDCPP) == x"y" ; then \ - $(call check_cplusplus) ; \ - fi ; \ - if test x$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC) == x"y" ; then \ - $(call check_uclibc,$${SYSROOT_DIR}) ; \ - else \ - $(call check_glibc,$${SYSROOT_DIR}) ; \ - fi - $(Q)touch $@ - -# Integration of the toolchain into Buildroot: find the main sysroot -# and the variant-specific sysroot, then copy the needed libraries to -# the $(TARGET_DIR) and copy the whole sysroot (libraries and headers) -# to $(STAGING_DIR). -$(STAMP_DIR)/ext-toolchain-installed: $(TOOLCHAIN_EXTERNAL_DEPENDENCIES) - $(Q)SYSROOT_DIR=`$(TARGET_CC_NO_SYSROOT) -print-sysroot 2>/dev/null` ; \ - if test -z "$${SYSROOT_DIR}" ; then \ - SYSROOT_DIR=`readlink -f $$(LANG=C $(TARGET_CC_NO_SYSROOT) -print-file-name=libc.a) |sed -r -e 's:usr/lib/libc\.a::;'` ; \ - fi ; \ - if test -z "$${SYSROOT_DIR}" ; then \ - @echo "External toolchain doesn't support --sysroot. Cannot use." ; \ - exit 1 ; \ - fi ; \ - ARCH_SUBDIR=`$(TARGET_CC_NO_SYSROOT) $(TARGET_CFLAGS) -print-multi-directory` ; \ - ARCH_SYSROOT_DIR=$${SYSROOT_DIR}/$${ARCH_SUBDIR} ; \ - mkdir -p $(TARGET_DIR)/lib ; \ - echo "Copy external toolchain libraries to target..." ; \ - for libs in $(LIB_EXTERNAL_LIBS); do \ - $(call copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$$libs,/lib); \ - done ; \ - for libs in $(USR_LIB_EXTERNAL_LIBS); do \ - $(call copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$$libs,/usr/lib); \ - done ; \ - for d in $(call qstrip,$(BR2_EXT_TOOL_DIRS_EXTRA)); do \ - if [ -d "$${ARCH_SYSROOT_DIR}$${d}" ]; then \ - mkdir -p "$(TARGET_DIR)$${d}"; \ - echo "Copying extra directory '$${d}' to target from toolchain"; \ - cp -a "$${ARCH_SYSROOT_DIR}$${d}/" "$(TARGET_DIR)$${d}/../"; \ - else \ - echo "No such directory '$${d}' while trying to copy from toolchain"; \ - fi; \ - done; \ - echo "Copy external toolchain sysroot to staging..." ; \ - $(call copy_toolchain_sysroot,$${SYSROOT_DIR},$${ARCH_SYSROOT_DIR},$${ARCH_SUBDIR}) ; \ - if [ -L $${ARCH_SYSROOT_DIR}/lib64 ] ; then \ - $(call create_lib64_symlinks) ; \ - fi ; \ - if test x$(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2010Q1) == x"y" ; then \ - mkdir -p "${TARGET_DIR}/usr/lib/locale"; \ - localedef --quiet --prefix="${TARGET_DIR}" --add-to-archive "$${ARCH_SYSROOT_DIR}"/usr/lib/locale/*.utf8; \ - fi ; \ - touch $@ diff --git a/toolchain/toolchain-external/ext-toolchain-wrapper.c b/toolchain/toolchain-external/ext-toolchain-wrapper.c new file mode 100644 index 0000000000..d54f1f5db6 --- /dev/null +++ b/toolchain/toolchain-external/ext-toolchain-wrapper.c @@ -0,0 +1,190 @@ +/** + * Buildroot wrapper for external toolchains. This simply executes the real + * toolchain with a number of arguments (sysroot/arch/..) hardcoded, + * to ensure the external toolchain uses the correct configuration. + * The hardcoded path arguments are defined relative to the actual location + * of the binary. + * + * (C) 2011 Peter Korsgaard + * (C) 2011 Daniel Nyström + * (C) 2012 Arnout Vandecappelle (Essensium/Mind) + * (C) 2013 Spenser Gilliland + * + * This file is licensed under the terms of the GNU General Public License + * version 2. This program is licensed "as is" without any warranty of any + * kind, whether express or implied. + */ + +#include +#include +#include +#include +#include + +static char path[PATH_MAX]; +static char sysroot[PATH_MAX]; + +/** + * GCC errors out with certain combinations of arguments (examples are + * -mabi-float={hard|soft} and -m{little|big}-endian), so we have to ensure + * that we only pass the predefined one to the real compiler if the inverse + * option isn't in the argument list. + * This specifies the worst case number of extra arguments we might pass + */ +#define EXCLUSIVE_ARGS 1 + +static char *predef_args[] = { + path, + "--sysroot", sysroot, +#ifdef BR_ARCH + "-march=" BR_ARCH, +#endif /* BR_ARCH */ +#ifdef BR_TUNE + "-mtune=" BR_TUNE, +#endif /* BR_TUNE */ +#ifdef BR_CPU + "-mcpu=" BR_CPU, +#endif +#ifdef BR_ABI + "-mabi=" BR_ABI, +#endif +#ifdef BR_FPU + "-mfpu=" BR_FPU, +#endif +#ifdef BR_SOFTFLOAT + "-msoft-float", +#endif /* BR_SOFTFLOAT */ +#ifdef BR_MODE + "-m" BR_MODE, +#endif +#ifdef BR_64 + "-m64", +#endif +#ifdef BR_BINFMT_FLAT + "-Wl,-elf2flt", +#endif +#ifdef BR_MIPS_TARGET_LITTLE_ENDIAN + "-EL", +#endif +#ifdef BR_MIPS_TARGET_BIG_ENDIAN + "-EB", +#endif +#ifdef BR_ADDITIONAL_CFLAGS + BR_ADDITIONAL_CFLAGS +#endif +}; + +int main(int argc, char **argv) +{ + char **args, **cur; + char *relbasedir, *absbasedir; + char *progpath = argv[0]; + char *basename; + char *env_debug; + int ret, i, count = 0, debug; + + /* Calculate the relative paths */ + basename = strrchr(progpath, '/'); + if (basename) { + *basename = '\0'; + basename++; + relbasedir = malloc(strlen(progpath) + 7); + if (relbasedir == NULL) { + perror(__FILE__ ": malloc"); + return 2; + } + sprintf(relbasedir, "%s/../..", argv[0]); + absbasedir = realpath(relbasedir, NULL); + } else { + basename = progpath; + absbasedir = malloc(PATH_MAX + 1); + ret = readlink("/proc/self/exe", absbasedir, PATH_MAX); + if (ret < 0) { + perror(__FILE__ ": readlink"); + return 2; + } + absbasedir[ret] = '\0'; + for (i = ret; i > 0; i--) { + if (absbasedir[i] == '/') { + absbasedir[i] = '\0'; + if (++count == 3) + break; + } + } + } + if (absbasedir == NULL) { + perror(__FILE__ ": realpath"); + return 2; + } + + /* Fill in the relative paths */ +#ifdef BR_CROSS_PATH_REL + ret = snprintf(path, sizeof(path), "%s/" BR_CROSS_PATH_REL "/%s", absbasedir, basename); +#else /* BR_CROSS_PATH_ABS */ + ret = snprintf(path, sizeof(path), BR_CROSS_PATH_ABS "/%s", basename); +#endif + if (ret >= sizeof(path)) { + perror(__FILE__ ": overflow"); + return 3; + } + ret = snprintf(sysroot, sizeof(sysroot), "%s/" BR_SYSROOT, absbasedir); + if (ret >= sizeof(sysroot)) { + perror(__FILE__ ": overflow"); + return 3; + } + + cur = args = malloc(sizeof(predef_args) + + (sizeof(char *) * (argc + EXCLUSIVE_ARGS))); + if (args == NULL) { + perror(__FILE__ ": malloc"); + return 2; + } + + /* start with predefined args */ + memcpy(cur, predef_args, sizeof(predef_args)); + cur += sizeof(predef_args) / sizeof(predef_args[0]); + +#ifdef BR_FLOAT_ABI + /* add float abi if not overridden in args */ + for (i = 1; i < argc; i++) { + if (!strncmp(argv[i], "-mfloat-abi=", strlen("-mfloat-abi=")) || + !strcmp(argv[i], "-msoft-float") || + !strcmp(argv[i], "-mhard-float")) + break; + } + + if (i == argc) + *cur++ = "-mfloat-abi=" BR_FLOAT_ABI; +#endif + + /* append forward args */ + memcpy(cur, &argv[1], sizeof(char *) * (argc - 1)); + cur += argc - 1; + + /* finish with NULL termination */ + *cur = NULL; + + /* Debug the wrapper to see actual arguments passed to + * the compiler: + * unset, empty, or 0: do not trace + * set to 1 : trace all arguments on a single line + * set to 2 : trace one argument per line + */ + if ((env_debug = getenv("BR_DEBUG_WRAPPER"))) { + debug = atoi(env_debug); + if (debug > 0) { + fprintf(stderr, "Toolchain wrapper executing:"); + for (i = 0; args[i]; i++) + fprintf(stderr, "%s'%s'", + (debug == 2) ? "\n " : " ", args[i]); + fprintf(stderr, "\n"); + } + } + + if (execv(path, args)) + perror(path); + + free(args); + + return 2; +} diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk new file mode 100644 index 0000000000..c8375c267c --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external.mk @@ -0,0 +1,628 @@ +################################################################################ +# +# toolchain-external +# +################################################################################ + +# +# This package implements the support for external toolchains, i.e +# toolchains that have not been produced by Buildroot itself and that +# Buildroot can download from the Web or that are already available on +# the system on which Buildroot runs. So far, we have tested this +# with: +# +# * Toolchains generated by Crosstool-NG +# * Toolchains generated by Buildroot +# * Toolchains provided by Linaro for the ARM and AArch64 +# architectures +# * Sourcery CodeBench toolchains (from Mentor Graphics) for the ARM, +# MIPS, PowerPC, x86, x86_64 and NIOS 2 architectures. For the MIPS +# toolchain, the -muclibc variant isn't supported yet, only the +# default glibc-based variant is. +# * Analog Devices toolchains for the Blackfin architecture +# * Xilinx toolchains for the Microblaze architecture +# +# The basic principle is the following +# +# 1. If the toolchain is not pre-installed, download and extract it +# in $(TOOLCHAIN_EXTERNAL_INSTALL_DIR). Otherwise, +# $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) points to were the toolchain has +# already been installed by the user. +# +# 2. For all external toolchains, perform some checks on the +# conformity between the toolchain configuration described in the +# Buildroot menuconfig system, and the real configuration of the +# external toolchain. This is for example important to make sure that +# the Buildroot configuration system knows whether the toolchain +# supports RPC, IPv6, locales, large files, etc. Unfortunately, these +# things cannot be detected automatically, since the value of these +# options (such as BR2_TOOLCHAIN_HAS_NATIVE_RPC) are needed at +# configuration time because these options are used as dependencies +# for other options. And at configuration time, we are not able to +# retrieve the external toolchain configuration. +# +# 3. Copy the libraries needed at runtime to the target directory, +# $(TARGET_DIR). Obviously, things such as the C library, the dynamic +# loader and a few other utility libraries are needed if dynamic +# applications are to be executed on the target system. +# +# 4. Copy the libraries and headers to the staging directory. This +# will allow all further calls to gcc to be made using --sysroot +# $(STAGING_DIR), which greatly simplifies the compilation of the +# packages when using external toolchains. So in the end, only the +# cross-compiler binaries remains external, all libraries and headers +# are imported into the Buildroot tree. +# +# 5. Build a toolchain wrapper which executes the external toolchain +# with a number of arguments (sysroot/march/mtune/..) hardcoded, +# so we're sure the correct configuration is always used and the +# toolchain behaves similar to an internal toolchain. +# This toolchain wrapper and symlinks are installed into +# $(HOST_DIR)/usr/bin like for the internal toolchains, and the rest +# of Buildroot is handled identical for the 2 toolchain types. + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y) +LIB_EXTERNAL_LIBS+=libc.so.* libcrypt.so.* libdl.so.* libgcc_s.so.* libm.so.* libnsl.so.* libresolv.so.* librt.so.* libutil.so.* +ifeq ($(BR2_ARM_EABIHF),y) +LIB_EXTERNAL_LIBS+=ld-linux-armhf.so.* +else +LIB_EXTERNAL_LIBS+=ld*.so.* +endif +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +LIB_EXTERNAL_LIBS+=libpthread.so.* +ifneq ($(BR2_PACKAGE_GDB)$(BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY),) +LIB_EXTERNAL_LIBS+=libthread_db.so.* +endif # gdbserver +endif # ! no threads +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC),y) +LIB_EXTERNAL_LIBS+=libnss_files.so.* libnss_dns.so.* +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL),y) +LIB_EXTERNAL_LIBS += libc.so libgcc_s.so.* +endif + +ifeq ($(BR2_INSTALL_LIBSTDCPP),y) +USR_LIB_EXTERNAL_LIBS+=libstdc++.so.* +endif + +LIB_EXTERNAL_LIBS+=$(call qstrip,$(BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS)) + +# Details about sysroot directory selection. +# +# To find the sysroot directory, we use the trick of looking for the +# 'libc.a' file with the -print-file-name gcc option, and then +# mangling the path to find the base directory of the sysroot. +# +# Note that we do not use the -print-sysroot option, because it is +# only available since gcc 4.4.x, and we still support 4.2.x (for +# AVR32) and 4.3.x. +# +# When doing this, we don't pass any option to gcc that could select a +# multilib variant (such as -march) as we want the "main" sysroot, +# which contains all variants of the C library in the case of multilib +# toolchains. We use the TARGET_CC_NO_SYSROOT variable, which is the +# path of the cross-compiler, without the --sysroot=$(STAGING_DIR), +# since what we want to find is the location of the original toolchain +# sysroot. This "main" sysroot directory is stored in SYSROOT_DIR. +# +# Then, multilib toolchains are a little bit more complicated, since +# they in fact have multiple sysroots, one for each variant supported +# by the toolchain. So we need to find the particular sysroot we're +# interested in. +# +# To do so, we ask the compiler where its sysroot is by passing all +# flags (including -march and al.), except the --sysroot flag since we +# want to the compiler to tell us where its original sysroot +# is. ARCH_SUBDIR will contain the subdirectory, in the main +# SYSROOT_DIR, that corresponds to the selected architecture +# variant. ARCH_SYSROOT_DIR will contain the full path to this +# location. +# +# One might wonder why we don't just bother with ARCH_SYSROOT_DIR. The +# fact is that in multilib toolchains, the header files are often only +# present in the main sysroot, and only the libraries are available in +# each variant-specific sysroot directory. + + +TOOLCHAIN_EXTERNAL_PREFIX=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX)) +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y) +TOOLCHAIN_EXTERNAL_INSTALL_DIR=$(HOST_DIR)/opt/ext-toolchain +else +TOOLCHAIN_EXTERNAL_INSTALL_DIR=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH)) +endif + +ifeq ($(TOOLCHAIN_EXTERNAL_INSTALL_DIR),) +ifneq ($(TOOLCHAIN_EXTERNAL_PREFIX),) +# if no path set, figure it out from path +TOOLCHAIN_EXTERNAL_BIN := $(shell dirname $(shell which $(TOOLCHAIN_EXTERNAL_PREFIX)-gcc)) +endif +else +ifeq ($(BR2_bfin),y) +TOOLCHAIN_EXTERNAL_BIN := $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/$(TOOLCHAIN_EXTERNAL_PREFIX)/bin +else +TOOLCHAIN_EXTERNAL_BIN := $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/bin +endif +endif + +TOOLCHAIN_EXTERNAL_CROSS=$(TOOLCHAIN_EXTERNAL_BIN)/$(TOOLCHAIN_EXTERNAL_PREFIX)- +TOOLCHAIN_EXTERNAL_CC=$(TOOLCHAIN_EXTERNAL_CROSS)gcc +TOOLCHAIN_EXTERNAL_CXX=$(TOOLCHAIN_EXTERNAL_CROSS)g++ +TOOLCHAIN_EXTERNAL_READELF=$(TOOLCHAIN_EXTERNAL_CROSS)readelf +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS = -DBR_SYSROOT='"$(STAGING_SUBDIR)"' + +ifeq ($(filter $(HOST_DIR)/%,$(TOOLCHAIN_EXTERNAL_BIN)),) +# TOOLCHAIN_EXTERNAL_BIN points outside HOST_DIR => absolute path +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += \ + -DBR_CROSS_PATH_ABS='"$(TOOLCHAIN_EXTERNAL_BIN)"' +else +# TOOLCHAIN_EXTERNAL_BIN points inside HOST_DIR => relative path +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += \ + -DBR_CROSS_PATH_REL='"$(TOOLCHAIN_EXTERNAL_BIN:$(HOST_DIR)/%=%)"' +endif + +CC_TARGET_TUNE_:=$(call qstrip,$(BR2_GCC_TARGET_TUNE)) +ifeq ($(call qstrip,$(BR2_GCC_TARGET_CPU_REVISION)),) +CC_TARGET_CPU_:=$(call qstrip,$(BR2_GCC_TARGET_CPU)) +else +CC_TARGET_CPU_:=$(call qstrip,$(BR2_GCC_TARGET_CPU)-$(BR2_GCC_TARGET_CPU_REVISION)) +endif +CC_TARGET_ARCH_:=$(call qstrip,$(BR2_GCC_TARGET_ARCH)) +CC_TARGET_ABI_:=$(call qstrip,$(BR2_GCC_TARGET_ABI)) +CC_TARGET_FPU_:=$(call qstrip,$(BR2_GCC_TARGET_FPU)) +CC_TARGET_FLOAT_ABI_:=$(call qstrip,$(BR2_GCC_TARGET_FLOAT_ABI)) +CC_TARGET_MODE_:=$(call qstrip,$(BR2_GCC_TARGET_MODE)) + +# march/mtune/floating point mode needs to be passed to the external toolchain +# to select the right multilib variant +ifeq ($(BR2_x86_64),y) +TOOLCHAIN_EXTERNAL_CFLAGS += -m64 +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_64 +endif +ifneq ($(CC_TARGET_TUNE_),) +TOOLCHAIN_EXTERNAL_CFLAGS += -mtune=$(CC_TARGET_TUNE_) +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_TUNE='"$(CC_TARGET_TUNE_)"' +endif +ifneq ($(CC_TARGET_ARCH_),) +TOOLCHAIN_EXTERNAL_CFLAGS += -march=$(CC_TARGET_ARCH_) +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ARCH='"$(CC_TARGET_ARCH_)"' +endif +ifneq ($(CC_TARGET_CPU_),) +TOOLCHAIN_EXTERNAL_CFLAGS += -mcpu=$(CC_TARGET_CPU_) +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_CPU='"$(CC_TARGET_CPU_)"' +endif +ifneq ($(CC_TARGET_ABI_),) +TOOLCHAIN_EXTERNAL_CFLAGS += -mabi=$(CC_TARGET_ABI_) +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ABI='"$(CC_TARGET_ABI_)"' +endif +ifneq ($(CC_TARGET_FPU_),) +TOOLCHAIN_EXTERNAL_CFLAGS += -mfpu=$(CC_TARGET_FPU_) +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_FPU='"$(CC_TARGET_FPU_)"' +endif +ifneq ($(CC_TARGET_FLOAT_ABI_),) +TOOLCHAIN_EXTERNAL_CFLAGS += -mfloat-abi=$(CC_TARGET_FLOAT_ABI_) +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_FLOAT_ABI='"$(CC_TARGET_FLOAT_ABI_)"' +endif +ifneq ($(CC_TARGET_MODE_),) +TOOLCHAIN_EXTERNAL_CFLAGS += -m$(CC_TARGET_MODE_) +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_MODE='"$(CC_TARGET_MODE_)"' +endif +ifeq ($(BR2_BINFMT_FLAT),y) +TOOLCHAIN_EXTERNAL_CFLAGS += -Wl,-elf2flt +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_BINFMT_FLAT +endif +ifeq ($(BR2_mipsel)$(BR2_mips64el),y) +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_MIPS_TARGET_LITTLE_ENDIAN +TOOLCHAIN_EXTERNAL_CFLAGS += -EL +endif +ifeq ($(BR2_mips)$(BR2_mips64),y) +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_MIPS_TARGET_BIG_ENDIAN +TOOLCHAIN_EXTERNAL_CFLAGS += -EB +endif +ifneq ($(BR2_TARGET_OPTIMIZATION),) +TOOLCHAIN_EXTERNAL_CFLAGS += $(call qstrip,$(BR2_TARGET_OPTIMIZATION)) +# We create a list like '"-mfoo", "-mbar", "-mbarfoo"' so that each +# flag is a separate argument when used in execv() by the external +# toolchain wrapper. +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ADDITIONAL_CFLAGS='$(foreach f,$(call qstrip,$(BR2_TARGET_OPTIMIZATION)),"$(f)",)' +endif + +ifeq ($(BR2_SOFT_FLOAT),y) +TOOLCHAIN_EXTERNAL_CFLAGS += -msoft-float +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_SOFTFLOAT=1 +endif + +# The Linaro ARMhf toolchain expects the libraries in +# {/usr,}/lib/arm-linux-gnueabihf, but Buildroot copies them to +# {/usr,}/lib, so we need to create a symbolic link. +define TOOLCHAIN_EXTERNAL_LINARO_ARMHF_SYMLINK + ln -sf . $(TARGET_DIR)/lib/arm-linux-gnueabihf + ln -sf . $(TARGET_DIR)/usr/lib/arm-linux-gnueabihf +endef + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201109),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi/ +TOOLCHAIN_EXTERNAL_SOURCE = arm-2011.09-70-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201203),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi/ +TOOLCHAIN_EXTERNAL_SOURCE = arm-2012.03-57-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201305),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi/ +TOOLCHAIN_EXTERNAL_SOURCE = arm-2013.05-24-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A_201109),y) +TOOLCHAIN_EXTERNAL_SITE = http://software-dl.ti.com/sdoemb/sdoemb_public_sw/arago_toolchain/2011_09/exports/ +TOOLCHAIN_EXTERNAL_SOURCE = arago-2011.09-armv7a-linux-gnueabi-sdk.tar.bz2 +define TOOLCHAIN_EXTERNAL_FIXUP_CMDS + mv $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/arago-2011.09/armv7a/* $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/ + rm -rf $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/arago-2011.09/ +endef +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE_201109),y) +TOOLCHAIN_EXTERNAL_SITE = http://software-dl.ti.com/sdoemb/sdoemb_public_sw/arago_toolchain/2011_09/exports/ +TOOLCHAIN_EXTERNAL_SOURCE = arago-2011.09-armv5te-linux-gnueabi-sdk.tar.bz2 +define TOOLCHAIN_EXTERNAL_FIXUP_CMDS + mv $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/arago-2011.09/armv5te/* $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/ + rm -rf $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/arago-2011.09/ +endef +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_07),y) +TOOLCHAIN_EXTERNAL_SITE = http://releases.linaro.org/13.07/components/toolchain/binaries/ +TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-arm-linux-gnueabihf-4.8-2013.07-1_linux.tar.xz +TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_LINARO_ARMHF_SYMLINK +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_08),y) +TOOLCHAIN_EXTERNAL_SITE = http://releases.linaro.org/13.08/components/toolchain/binaries/ +TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-arm-linux-gnueabihf-4.8-2013.08_linux.tar.xz +TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_LINARO_ARMHF_SYMLINK +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_09),y) +TOOLCHAIN_EXTERNAL_SITE = http://releases.linaro.org/13.09/components/toolchain/binaries/ +TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux.tar.xz +TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_LINARO_ARMHF_SYMLINK +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201203),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/mips-linux-gnu/ +TOOLCHAIN_EXTERNAL_SOURCE = mips-2012.03-63-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201209),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/mips-linux-gnu/ +TOOLCHAIN_EXTERNAL_SOURCE = mips-2012.09-99-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201305),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/mips-linux-gnu/ +TOOLCHAIN_EXTERNAL_SOURCE = mips-2013.05-66-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/nios2-linux-gnu/ +TOOLCHAIN_EXTERNAL_SOURCE = sourceryg++-2013.05-43-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/powerpc-linux-gnu/ +TOOLCHAIN_EXTERNAL_SOURCE = freescale-2010.09-55-powerpc-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/powerpc-linux-gnu/ +TOOLCHAIN_EXTERNAL_SOURCE = freescale-2011.03-38-powerpc-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201103),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/sh-linux-gnu/ +TOOLCHAIN_EXTERNAL_SOURCE = renesas-2011.03-37-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201203),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/sh-linux-gnu/ +TOOLCHAIN_EXTERNAL_SOURCE = renesas-2012.03-35-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201209),y) +TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/sh-linux-gnu/ +TOOLCHAIN_EXTERNAL_SOURCE = renesas-2012.09-61-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/sh-uclinux/ +TOOLCHAIN_EXTERNAL_SOURCE = renesas-2010.09-60-sh-uclinux-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/sh-uclinux/ +TOOLCHAIN_EXTERNAL_SOURCE = renesas-2011.03-36-sh-uclinux-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201109),y) +TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/i686-pc-linux-gnu/ +TOOLCHAIN_EXTERNAL_SOURCE = ia32-2011.09-24-i686-pc-linux-gnu-i386-linux.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201203),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/i686-pc-linux-gnu/ +TOOLCHAIN_EXTERNAL_SOURCE = ia32-2012.03-27-i686-pc-linux-gnu-i386-linux.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201209),y) +TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/i686-pc-linux-gnu/ +TOOLCHAIN_EXTERNAL_SOURCE = ia32-2012.09-62-i686-pc-linux-gnu-i386-linux.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1),y) +TOOLCHAIN_EXTERNAL_SITE = http://downloads.sourceforge.net/projects/adi-toolchain/files/2012R1-BF60X/2012R1-RC2-BF60X/i386/ +TOOLCHAIN_EXTERNAL_SOURCE = blackfin-toolchain-2012R1-RC2.i386.tar.bz2 +TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS = blackfin-toolchain-uclibc-full-2012R1-RC2.i386.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2),y) +TOOLCHAIN_EXTERNAL_SITE = http://downloads.sourceforge.net/project/adi-toolchain/2012R2/2012R2-RC2/i386/ +TOOLCHAIN_EXTERNAL_SOURCE = blackfin-toolchain-2012R2-RC2.i386.tar.bz2 +TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS = blackfin-toolchain-uclibc-full-2012R2-RC2.i386.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEEL_14_3),y) +TOOLCHAIN_EXTERNAL_SITE = http://sources.buildroot.net/ +TOOLCHAIN_EXTERNAL_SOURCE = lin32-microblazeel-unknown-linux-gnu_14.3_early.tar.xz +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEEL_V2),y) +TOOLCHAIN_EXTERNAL_SITE = http://sources.buildroot.net/ +TOOLCHAIN_EXTERNAL_SOURCE = microblazeel-unknown-linux-gnu.tgz +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEBE_14_3),y) +TOOLCHAIN_EXTERNAL_SITE = http://sources.buildroot.net/ +TOOLCHAIN_EXTERNAL_SOURCE = lin32-microblaze-unknown-linux-gnu_14.3_early.tar.xz +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEBE_V2),y) +TOOLCHAIN_EXTERNAL_SITE = http://sources.buildroot.net/ +TOOLCHAIN_EXTERNAL_SOURCE = microblaze-unknown-linux-gnu.tgz +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_07),y) +TOOLCHAIN_EXTERNAL_SITE = http://releases.linaro.org/13.07/components/toolchain/binaries/ +TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-aarch64-linux-gnu-4.8-2013.07-1_linux.tar.xz +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_08),y) +TOOLCHAIN_EXTERNAL_SITE = http://releases.linaro.org/13.08/components/toolchain/binaries/ +TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-aarch64-linux-gnu-4.8-2013.08_linux.tar.xz +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_09),y) +TOOLCHAIN_EXTERNAL_SITE = http://releases.linaro.org/13.09/components/toolchain/binaries/ +TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-aarch64-linux-gnu-4.8-2013.09_linux.tar.xz +else +# Custom toolchain +TOOLCHAIN_EXTERNAL_SITE = $(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))) +TOOLCHAIN_EXTERNAL_SOURCE = $(notdir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))) +endif + +# In fact, we don't need to download the toolchain, since it is already +# available on the system, so force the site and source to be empty so +# that nothing will be downloaded/extracted. +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED),y) +TOOLCHAIN_EXTERNAL_SITE = +TOOLCHAIN_EXTERNAL_SOURCE = +endif + +TOOLCHAIN_EXTERNAL_INSTALL_STAGING = YES + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1)$(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2),y) +# Special handling for Blackfin toolchain, because of the split in two +# tarballs, and the organization of tarball contents. The tarballs +# contain ./opt/uClinux/{bfin-uclinux,bfin-linux-uclibc} directories, +# which themselves contain the toolchain. This is why we strip more +# components than usual. +define TOOLCHAIN_EXTERNAL_EXTRACT_CMDS + mkdir -p $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) + $(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_SOURCE)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE) | \ + $(TAR) $(TAR_STRIP_COMPONENTS)=3 --hard-dereference -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) - + $(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS) | \ + $(TAR) $(TAR_STRIP_COMPONENTS)=3 --hard-dereference -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) - +endef +else ifneq ($(TOOLCHAIN_EXTERNAL_SOURCE),) +# Normal handling of toolchain tarball extraction. +define TOOLCHAIN_EXTERNAL_EXTRACT_CMDS + mkdir -p $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) + $(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_SOURCE)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE) | \ + $(TAR) $(TAR_STRIP_COMPONENTS)=1 --exclude='usr/lib/locale/*' -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) - + $(TOOLCHAIN_EXTERNAL_FIXUP_CMDS) +endef +endif + +# Returns the location of the libc.a file for the given compiler + flags +define toolchain_find_libc_a +$$(readlink -f $$(LANG=C $(1) -print-file-name=libc.a)) +endef + +# Returns the sysroot location for the given compiler + flags +define toolchain_find_sysroot +$$(echo -n $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:(usr/)?lib(32|64)?/([^/]*/)?libc\.a::') +endef + +# Returns the lib subdirectory for the given compiler + flags (i.e +# typically lib32 or lib64 for some toolchains) +define toolchain_find_libdir +$$(echo -n $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:.*/(usr/)?(lib(32|64)?)/([^/]*/)?libc.a:\2:') +endef + +# Checks for an already installed toolchain: check the toolchain +# location, check that it supports sysroot, and then verify that it +# matches the configuration provided in Buildroot: ABI, C++ support, +# type of C library and all C library features. +define TOOLCHAIN_EXTERNAL_CONFIGURE_CMDS + $(Q)$(call check_cross_compiler_exists,$(TOOLCHAIN_EXTERNAL_CC)) + $(Q)$(call check_unusable_toolchain,$(TOOLCHAIN_EXTERNAL_CC)) + $(Q)SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC))" ; \ + if test -z "$${SYSROOT_DIR}" ; then \ + @echo "External toolchain doesn't support --sysroot. Cannot use." ; \ + exit 1 ; \ + fi ; \ + if test "$(BR2_arm)" = "y" ; then \ + $(call check_arm_abi,\ + "$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS)",\ + $(TOOLCHAIN_EXTERNAL_READELF)) ; \ + fi ; \ + if test "$(BR2_INSTALL_LIBSTDCPP)" = "y" ; then \ + $(call check_cplusplus,$(TOOLCHAIN_EXTERNAL_CXX)) ; \ + fi ; \ + if test "$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)" = "y" ; then \ + $(call check_uclibc,$${SYSROOT_DIR}) ; \ + elif test "$(BR2_TOOLCHAIN_EXTERNAL_MUSL)" = "y" ; then \ + $(call check_musl,$${SYSROOT_DIR}) ; \ + else \ + $(call check_glibc,$${SYSROOT_DIR}) ; \ + fi +endef + +# With the musl C library, the libc.so library directly plays the role +# of the dynamic library loader. We just need to create a symbolic +# link to libc.so with the appropriate name. +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL),y) +define TOOLCHAIN_EXTERNAL_MUSL_LD_LINK + ln -sf libc.so $(TARGET_DIR)/lib/ld-musl-$(ARCH).so.1 +endef +TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_MUSL_LD_LINK +endif + +# Integration of the toolchain into Buildroot: find the main sysroot +# and the variant-specific sysroot, then copy the needed libraries to +# the $(TARGET_DIR) and copy the whole sysroot (libraries and headers) +# to $(STAGING_DIR). +# +# Variables are defined as follows: +# +# LIBC_A_LOCATION: location of the libc.a file in the default +# multilib variant (allows to find the main +# sysroot directory) +# Ex: /x-tools/mips-2011.03/mips-linux-gnu/libc/usr/lib/libc.a +# +# SYSROOT_DIR: the main sysroot directory, deduced from +# LIBC_A_LOCATION by removing the +# usr/lib[32|64]/libc.a part of the path. +# Ex: /x-tools/mips-2011.03/mips-linux-gnu/libc/ +# +# ARCH_LIBC_A_LOCATION: location of the libc.a file in the selected +# multilib variant (taking into account the +# CFLAGS). Allows to find the sysroot of the +# selected multilib variant. +# Ex: /x-tools/mips-2011.03/mips-linux-gnu/libc/mips16/soft-float/el/usr/lib/libc.a +# +# ARCH_SYSROOT_DIR: the sysroot of the selected multilib variant, +# deduced from ARCH_LIBC_A_LOCATION by removing +# usr/lib[32|64]/libc.a at the end of the path. +# Ex: /x-tools/mips-2011.03/mips-linux-gnu/libc/mips16/soft-float/el/ +# +# ARCH_LIB_DIR: 'lib', 'lib32' or 'lib64' depending on where libraries +# are stored. Deduced from ARCH_LIBC_A_LOCATION by +# looking at usr/lib??/libc.a. +# Ex: lib +# +# ARCH_SUBDIR: the relative location of the sysroot of the selected +# multilib variant compared to the main sysroot. +# Ex: mips16/soft-float/el +# +# SUPPORT_LIB_DIR: some toolchains, such as recent Linaro toolchains, +# store GCC support libraries (libstdc++, +# libgcc_s, etc.) outside of the sysroot. In +# this case, SUPPORT_LIB_DIR is set to a +# non-empty value, and points to the directory +# where these support libraries are +# available. Those libraries will be copied to +# our sysroot, and the directory will also be +# considered when searching libraries for copy +# to the target filesystem. + +define TOOLCHAIN_EXTERNAL_INSTALL_CORE + $(Q)SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC))" ; \ + if test -z "$${SYSROOT_DIR}" ; then \ + @echo "External toolchain doesn't support --sysroot. Cannot use." ; \ + exit 1 ; \ + fi ; \ + ARCH_SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \ + ARCH_LIB_DIR="$(call toolchain_find_libdir,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \ + SUPPORT_LIB_DIR="" ; \ + if test `find $${ARCH_SYSROOT_DIR} -name 'libstdc++.a' | wc -l` -eq 0 ; then \ + LIBSTDCPP_A_LOCATION=$$(LANG=C $(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS) -print-file-name=libstdc++.a) ; \ + if [ -e "$${LIBSTDCPP_A_LOCATION}" ]; then \ + SUPPORT_LIB_DIR=`readlink -f $${LIBSTDCPP_A_LOCATION} | sed -r -e 's:libstdc\+\+\.a::'` ; \ + fi ; \ + fi ; \ + ARCH_SUBDIR=`echo $${ARCH_SYSROOT_DIR} | sed -r -e "s:^$${SYSROOT_DIR}(.*)/$$:\1:"` ; \ + if test -z "$(BR2_PREFER_STATIC_LIB)" ; then \ + $(call MESSAGE,"Copying external toolchain libraries to target...") ; \ + for libs in $(LIB_EXTERNAL_LIBS); do \ + $(call copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$${SUPPORT_LIB_DIR},$${ARCH_LIB_DIR},$$libs,/lib); \ + done ; \ + for libs in $(USR_LIB_EXTERNAL_LIBS); do \ + $(call copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$${SUPPORT_LIB_DIR},$${ARCH_LIB_DIR},$$libs,/usr/lib); \ + done ; \ + fi ; \ + for d in $(call qstrip,$(BR2_EXT_TOOL_DIRS_EXTRA)); do \ + if [ -d "$${ARCH_SYSROOT_DIR}$${d}" ]; then \ + mkdir -p "$(TARGET_DIR)$${d}"; \ + echo "Copying extra directory '$${d}' to target from toolchain"; \ + cp -a "$${ARCH_SYSROOT_DIR}$${d}/" "$(TARGET_DIR)$${d}/../"; \ + else \ + echo "No such directory '$${d}' while trying to copy from toolchain"; \ + fi; \ + done; \ + $(call MESSAGE,"Copying external toolchain sysroot to staging...") ; \ + $(call copy_toolchain_sysroot,$${SYSROOT_DIR},$${ARCH_SYSROOT_DIR},$${ARCH_SUBDIR},$${ARCH_LIB_DIR},$${SUPPORT_LIB_DIR}) ; \ + if test "$(BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY)" = "y"; then \ + $(call MESSAGE,"Copying gdbserver") ; \ + gdbserver_found=0 ; \ + for d in $${ARCH_SYSROOT_DIR}/usr $${ARCH_SYSROOT_DIR}/../debug-root/usr $${ARCH_SYSROOT_DIR}/usr/$${ARCH_LIB_DIR} ; do \ + if test -f $${d}/bin/gdbserver ; then \ + install -m 0755 -D $${d}/bin/gdbserver $(TARGET_DIR)/usr/bin/gdbserver ; \ + gdbserver_found=1 ; \ + break ; \ + fi ; \ + done ; \ + if [ $${gdbserver_found} -eq 0 ] ; then \ + echo "Could not find gdbserver in external toolchain" ; \ + exit 1 ; \ + fi ; \ + fi +endef + +# Special installation target used on the Blackfin architecture when +# FDPIC is not the primary binary format being used, but the user has +# nonetheless requested the installation of the FDPIC libraries to the +# target filesystem. +ifeq ($(BR2_BFIN_INSTALL_FDPIC_SHARED),y) +define TOOLCHAIN_EXTERNAL_INSTALL_BFIN_FDPIC + $(Q)$(call MESSAGE,"Install external toolchain FDPIC libraries to target...") ; \ + FDPIC_EXTERNAL_CC=$(dir $(TOOLCHAIN_EXTERNAL_CC))/../../bfin-linux-uclibc/bin/bfin-linux-uclibc-gcc ; \ + FDPIC_SYSROOT_DIR="$(call toolchain_find_sysroot,$${FDPIC_EXTERNAL_CC} $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \ + FDPIC_LIB_DIR="$(call toolchain_find_libdir,$${FDPIC_EXTERNAL_CC} $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \ + FDPIC_SUPPORT_LIB_DIR="" ; \ + if test `find $${FDPIC_SYSROOT_DIR} -name 'libstdc++.a' | wc -l` -eq 0 ; then \ + FDPIC_LIBSTDCPP_A_LOCATION=$$(LANG=C $${FDPIC_EXTERNAL_CC} $(TOOLCHAIN_EXTERNAL_CFLAGS) -print-file-name=libstdc++.a) ; \ + if [ -e "$${FDPIC_LIBSTDCPP_A_LOCATION}" ]; then \ + FDPIC_SUPPORT_LIB_DIR=`readlink -f $${FDPIC_LIBSTDCPP_A_LOCATION} | sed -r -e 's:libstdc\+\+\.a::'` ; \ + fi ; \ + fi ; \ + for libs in $(LIB_EXTERNAL_LIBS); do \ + $(call copy_toolchain_lib_root,$${FDPIC_SYSROOT_DIR},$${FDPIC_SUPPORT_LIB_DIR},$${FDPIC_LIB_DIR},$$libs,/lib); \ + done ; \ + for libs in $(USR_LIB_EXTERNAL_LIBS); do \ + $(call copy_toolchain_lib_root,$${FDPIC_SYSROOT_DIR},$${FDPIC_SUPPORT_LIB_DIR},$${FDPIC_LIB_DIR},$$libs,/usr/lib); \ + done +endef +endif + +# Special installation target used on the Blackfin architecture when +# shared FLAT is not the primary format being used, but the user has +# nonetheless requested the installation of the shared FLAT libraries +# to the target filesystem. The flat libraries are found and linked +# according to the index in name "libN.so". Index 1 is reserved for +# the standard C library. Customer libraries can use 4 and above. +ifeq ($(BR2_BFIN_INSTALL_FLAT_SHARED),y) +define TOOLCHAIN_EXTERNAL_INSTALL_BFIN_FLAT + $(Q)$(call MESSAGE,"Install external toolchain FLAT libraries to target...") ; \ + FLAT_EXTERNAL_CC=$(dir $(TOOLCHAIN_EXTERNAL_CC))../../bfin-uclinux/bin/bfin-uclinux-gcc ; \ + FLAT_LIBC_A_LOCATION=`$${FLAT_EXTERNAL_CC} $(TOOLCHAIN_EXTERNAL_CFLAGS) -mid-shared-library -print-file-name=libc`; \ + if [ -f $${FLAT_LIBC_A_LOCATION} -a ! -h $${FLAT_LIBC_A_LOCATION} ] ; then \ + $(INSTALL) -D $${FLAT_LIBC_A_LOCATION} $(TARGET_DIR)/lib/lib1.so; \ + fi +endef +endif + +# Build toolchain wrapper for preprocessor, C and C++ compiler and setup +# symlinks for everything else. Skip gdb symlink when we are building our +# own gdb to prevent two gdb's in output/host/usr/bin. +define TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER + $(Q)$(call MESSAGE,"Building ext-toolchain wrapper") + mkdir -p $(HOST_DIR)/usr/bin; cd $(HOST_DIR)/usr/bin; \ + for i in $(TOOLCHAIN_EXTERNAL_CROSS)*; do \ + base=$${i##*/}; \ + case "$$base" in \ + *cc|*cc-*|*++|*++-*|*cpp) \ + ln -sf ext-toolchain-wrapper $$base; \ + ;; \ + *gdb|*gdbtui) \ + if test "$(BR2_PACKAGE_HOST_GDB)" != "y"; then \ + ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%../..%') .; \ + fi \ + ;; \ + *) \ + ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%../..%') .; \ + ;; \ + esac; \ + done ; + # We use --hash-style=both to increase the compatibility of + # the generated binary with older platforms + $(HOSTCC) $(HOST_CFLAGS) $(TOOLCHAIN_EXTERNAL_WRAPPER_ARGS) -s -Wl,--hash-style=both \ + toolchain/toolchain-external/ext-toolchain-wrapper.c \ + -o $(HOST_DIR)/usr/bin/ext-toolchain-wrapper +endef + +# Even though we're installing things in both the staging, the host +# and the target directory, we do everything within the +# install-staging step, arbitrarily. +define TOOLCHAIN_EXTERNAL_INSTALL_STAGING_CMDS + $(TOOLCHAIN_EXTERNAL_INSTALL_CORE) + $(TOOLCHAIN_EXTERNAL_INSTALL_BFIN_FDPIC) + $(TOOLCHAIN_EXTERNAL_INSTALL_BFIN_FLAT) + $(TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER) +endef + +$(eval $(generic-package)) diff --git a/toolchain/toolchain/toolchain.mk b/toolchain/toolchain/toolchain.mk new file mode 100644 index 0000000000..44ed62987c --- /dev/null +++ b/toolchain/toolchain/toolchain.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# toolchain +# +################################################################################ + +TOOLCHAIN_SOURCE = + +ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) +TOOLCHAIN_DEPENDENCIES += toolchain-buildroot +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) +TOOLCHAIN_DEPENDENCIES += toolchain-external +endif + +$(eval $(generic-package)) + +toolchain-source: prepare dirs dependencies $(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake + diff --git a/toolchain/uClibc/Config.in b/toolchain/uClibc/Config.in deleted file mode 100644 index 3b31900a44..0000000000 --- a/toolchain/uClibc/Config.in +++ /dev/null @@ -1,80 +0,0 @@ -# Choose uClibc options -# - -comment "uClibc Options" - -choice - prompt "uClibc C library Version" - default BR2_UCLIBC_VERSION_0_9_31 - help - Select the version of uClibc you wish to use. - - config BR2_UCLIBC_VERSION_0_9_29 - depends on !BR2_avr32 - depends on BR2_DEPRECATED - bool "uClibc 0.9.29" - - config BR2_UCLIBC_VERSION_0_9_30 - bool "uClibc 0.9.30.x" - - config BR2_UCLIBC_VERSION_0_9_31 - bool "uClibc 0.9.31.x" - - config BR2_UCLIBC_VERSION_0_9_32 - bool "uClibc 0.9.32-rc2" - - config BR2_UCLIBC_VERSION_SNAPSHOT - bool "daily snapshot" - -endchoice - -config BR2_USE_UCLIBC_SNAPSHOT - string "Date (yyyymmdd) of snapshot or 'snapshot' for latest" - default "snapshot" - depends on BR2_UCLIBC_VERSION_SNAPSHOT - help - Use latest snapshot or one from a specific date? - -config BR2_UCLIBC_VERSION_STRING - string - default 0.9.29 if BR2_UCLIBC_VERSION_0_9_29 - default 0.9.30.3 if BR2_UCLIBC_VERSION_0_9_30 - default 0.9.31 if BR2_UCLIBC_VERSION_0_9_31 - default 0.9.32-rc2 if BR2_UCLIBC_VERSION_0_9_32 - default $BR2_USE_UCLIBC_SNAPSHOT if BR2_UCLIBC_VERSION_SNAPSHOT - -config BR2_UCLIBC_CONFIG - string "uClibc configuration file to use?" - default "toolchain/uClibc/uClibc-0.9.29.config" if BR2_UCLIBC_VERSION_0_9_29 - default "toolchain/uClibc/uClibc-0.9.30.config" if BR2_UCLIBC_VERSION_0_9_30 - default "toolchain/uClibc/uClibc-0.9.31.config" if BR2_UCLIBC_VERSION_0_9_31 - default "toolchain/uClibc/uClibc-0.9.32.config" if BR2_UCLIBC_VERSION_0_9_32 - default "toolchain/uClibc/uClibc-snapshot.config" if BR2_UCLIBC_VERSION_SNAPSHOT - help - Some people may wish to use their own modified uClibc configuration - file and will specify their config file location with this option. - See also docs/README in this package. - If unsure, use the default. - -config BR2_PTHREAD_DEBUG - bool "Thread library debugging" - depends on BR2_PTHREADS || BR2_PTHREADS_OLD || BR2_PTHREADS_NATIVE - help - Build the thread library with debugging enabled. - -config BR2_UCLIBC_INSTALL_TEST_SUITE - bool "Compile and install uClibc tests" - select BR2_PACKAGE_MAKE - help - Enabling this option will compile and install the uClibc test suite. - This is useful if you want to check if the uClibc library is working - for your architecture and/or help developing uClibc. - - The test suite will be installed into /root/uClibc directory. To run - the test suite enter the /root/uClibc/test directory and type - "make UCLIBC_ONLY=1 CC=/bin/true check". - - See the /root/uClibc/test/README for additional information. - - This is not needed at all for normal builds, so you can safely say no - if you do not plan to dig into your C library. diff --git a/toolchain/uClibc/uClibc-0.9.29-001-fix-mmap.patch b/toolchain/uClibc/uClibc-0.9.29-001-fix-mmap.patch deleted file mode 100644 index 4775e8c332..0000000000 --- a/toolchain/uClibc/uClibc-0.9.29-001-fix-mmap.patch +++ /dev/null @@ -1,91 +0,0 @@ ---- uClibc-0.9.29.oorig/test/mmap/mmap2.c (revision 0) -+++ uClibc-0.9.29/test/mmap/mmap2.c (revision 18616) -@@ -0,0 +1,41 @@ -+/* When trying to map /dev/mem with offset 0xFFFFF000 on the ARM platform, mmap -+ * returns -EOVERFLOW. -+ * -+ * Since off_t is defined as a long int and the sign bit is set in the address, -+ * the shift operation shifts in ones instead of zeroes -+ * from the left. This results the offset sent to the kernel function becomes -+ * 0xFFFFFFFF instead of 0x000FFFFF with MMAP2_PAGE_SHIFT set to 12. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#define FATAL do { fprintf(stderr, "Error at line %d, file %s (%d) [%s]\n", \ -+ __LINE__, __FILE__, errno, strerror(errno)); exit(1); } while(0) -+ -+#define MAP_SIZE 4096UL -+#define MAP_MASK (MAP_SIZE - 1) -+ -+int main(int argc, char **argv) { -+ void* map_base = 0; -+ int fd; -+ off_t target = 0xfffff000; -+ if((fd = open("/dev/mem", O_RDWR | O_SYNC)) == -1) FATAL; -+ printf("/dev/mem opened.\n"); -+ fflush(stdout); -+ -+ /* Map one page */ -+ map_base = mmap(0, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, -+ fd, target & ~MAP_MASK); -+ if(map_base == (void *) -1) FATAL; -+ printf("Memory mapped at address %p.\n", map_base); -+ fflush(stdout); -+ if(munmap(map_base, MAP_SIZE) == -1) FATAL; -+ close(fd); -+ return 0; -+} ---- uClibc-0.9.29.oorig/libc/sysdeps/linux/arm/mmap.c (revision 18615) -+++ uClibc-0.9.29/libc/sysdeps/linux/arm/mmap.c (revision 18616) -@@ -27,7 +27,6 @@ __ptr_t mmap(__ptr_t addr, size_t len, i - - #elif defined (__NR_mmap2) - #define __NR__mmap __NR_mmap2 -- - #ifndef MMAP2_PAGE_SHIFT - # define MMAP2_PAGE_SHIFT 12 - #endif -@@ -39,9 +38,17 @@ __ptr_t mmap(__ptr_t addr, size_t len, i - { - /* check if offset is page aligned */ - if (offset & ((1 << MMAP2_PAGE_SHIFT) - 1)) -+ { -+ __set_errno(EINVAL); - return MAP_FAILED; -+ } -+#ifdef __USE_FILE_OFFSET64 -+ return (__ptr_t) _mmap (addr, len, prot, flags, -+ fd,((__u_quad_t) offset >> MMAP2_PAGE_SHIFT)); -+#else - return (__ptr_t) _mmap (addr, len, prot, flags, -- fd,(off_t) (offset >> MMAP2_PAGE_SHIFT)); -+ fd,((__u_long) offset >> MMAP2_PAGE_SHIFT)); -+#endif - } - #elif defined (__NR_mmap) - # define __NR__mmap __NR_mmap ---- uClibc-0.9.29.oorig/libc/sysdeps/linux/common/mmap64.c (revision 18615) -+++ uClibc-0.9.29/libc/sysdeps/linux/common/mmap64.c (revision 18616) -@@ -58,8 +58,13 @@ __ptr_t mmap64(__ptr_t addr, size_t len, - __set_errno(EINVAL); - return MAP_FAILED; - } -- -- return __syscall_mmap2(addr, len, prot, flags, fd, (off_t) (offset >> MMAP2_PAGE_SHIFT)); -+#ifdef __USE_FILE_OFFSET64 -+ return __syscall_mmap2(addr, len, prot, flags, -+ fd,((__u_quad_t)offset >> MMAP2_PAGE_SHIFT)); -+#else -+ return __syscall_mmap2(addr, len, prot, flags, -+ fd,((__u_long)offset >> MMAP2_PAGE_SHIFT)); -+#endif - } - - # endif diff --git a/toolchain/uClibc/uClibc-0.9.29-arch.patch.avr32 b/toolchain/uClibc/uClibc-0.9.29-arch.patch.avr32 deleted file mode 100644 index d275ac2302..0000000000 --- a/toolchain/uClibc/uClibc-0.9.29-arch.patch.avr32 +++ /dev/null @@ -1,3546 +0,0 @@ -diff --git a/Rules.mak b/Rules.mak -index d054bbb..55381cf 100644 ---- a/Rules.mak -+++ b/Rules.mak -@@ -313,6 +313,12 @@ ifeq ($(TARGET_ARCH),frv) - UCLIBC_LDSO=ld.so.1 - endif - -+ifeq ($(strip $(TARGET_ARCH)),avr32) -+ CPU_CFLAGS-$(CONFIG_AVR32_AP7) += -march=ap -+ CPU_CFLAGS-$(CONFIG_LINKRELAX) += -mrelax -+ CPU_LDFLAGS-$(CONFIG_LINKRELAX) += --relax -+endif -+ - # Keep the check_gcc from being needlessly executed - ifndef PIEFLAG - ifneq ($(UCLIBC_BUILD_PIE),y) -diff --git a/extra/Configs/Config.avr32 b/extra/Configs/Config.avr32 -new file mode 100644 -index 0000000..8d70e6e ---- /dev/null -+++ b/extra/Configs/Config.avr32 -@@ -0,0 +1,31 @@ -+# -+# For a description of the syntax of this configuration file, -+# see extra/config/Kconfig-language.txt -+# -+ -+config TARGET_ARCH -+ string -+ default "avr32" -+ -+config FORCE_OPTIONS_FOR_ARCH -+ bool -+ default y -+ select ARCH_BIG_ENDIAN -+ select FORCE_SHAREABLE_TEXT_SEGMENTS -+ -+config ARCH_CFLAGS -+ string -+ -+choice -+ prompt "Target CPU Type" -+ default CONFIG_AVR32_AP7 -+ -+config CONFIG_AVR32_AP7 -+ bool "AVR32 AP7" -+ select ARCH_HAS_MMU -+ -+endchoice -+ -+config LINKRELAX -+ bool "Enable linker optimizations" -+ default y -diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in -index 8eab394..10c9f7b 100644 ---- a/extra/Configs/Config.in -+++ b/extra/Configs/Config.in -@@ -16,6 +16,9 @@ config TARGET_alpha - config TARGET_arm - bool "arm" - -+config TARGET_avr32 -+ bool "avr32" -+ - config TARGET_bfin - bool "bfin" - -@@ -92,6 +95,10 @@ if TARGET_arm - source "extra/Configs/Config.arm" - endif - -+if TARGET_avr32 -+source "extra/Configs/Config.avr32" -+endif -+ - if TARGET_bfin - source "extra/Configs/Config.bfin" - endif -diff --git a/extra/Configs/defconfigs/avr32 b/extra/Configs/defconfigs/avr32 -new file mode 100644 -index 0000000..0b890a2 ---- /dev/null -+++ b/extra/Configs/defconfigs/avr32 -@@ -0,0 +1 @@ -+TARGET_avr32=y -diff --git a/include/elf.h b/include/elf.h -index 19805d7..ab90160 100644 ---- a/include/elf.h -+++ b/include/elf.h -@@ -354,6 +354,8 @@ typedef struct - /* NIOS magic number - no EABI available. */ - #define EM_NIOS32 0xFEBB - -+#define EM_AVR32 0x18ad -+ - /* V850 backend magic number. Written in the absense of an ABI. */ - #define EM_CYGNUS_V850 0x9080 - -@@ -2828,6 +2830,55 @@ typedef Elf32_Addr Elf32_Conflict; - /* Keep this the last entry. */ - #define R_V850_NUM 25 - -+/* Atmel AVR32 relocations. */ -+#define R_AVR32_NONE 0 -+#define R_AVR32_32 1 -+#define R_AVR32_16 2 -+#define R_AVR32_8 3 -+#define R_AVR32_32_PCREL 4 -+#define R_AVR32_16_PCREL 5 -+#define R_AVR32_8_PCREL 6 -+#define R_AVR32_DIFF32 7 -+#define R_AVR32_DIFF16 8 -+#define R_AVR32_DIFF8 9 -+#define R_AVR32_GOT32 10 -+#define R_AVR32_GOT16 11 -+#define R_AVR32_GOT8 12 -+#define R_AVR32_21S 13 -+#define R_AVR32_16U 14 -+#define R_AVR32_16S 15 -+#define R_AVR32_8S 16 -+#define R_AVR32_8S_EXT 17 -+#define R_AVR32_22H_PCREL 18 -+#define R_AVR32_18W_PCREL 19 -+#define R_AVR32_16B_PCREL 20 -+#define R_AVR32_16N_PCREL 21 -+#define R_AVR32_14UW_PCREL 22 -+#define R_AVR32_11H_PCREL 23 -+#define R_AVR32_10UW_PCREL 24 -+#define R_AVR32_9H_PCREL 25 -+#define R_AVR32_9UW_PCREL 26 -+#define R_AVR32_HI16 27 -+#define R_AVR32_LO16 28 -+#define R_AVR32_GOTPC 29 -+#define R_AVR32_GOTCALL 30 -+#define R_AVR32_LDA_GOT 31 -+#define R_AVR32_GOT21S 32 -+#define R_AVR32_GOT18SW 33 -+#define R_AVR32_GOT16S 34 -+#define R_AVR32_GOT7UW 35 -+#define R_AVR32_32_CPENT 36 -+#define R_AVR32_CPCALL 37 -+#define R_AVR32_16_CP 38 -+#define R_AVR32_9W_CP 39 -+#define R_AVR32_RELATIVE 40 -+#define R_AVR32_GLOB_DAT 41 -+#define R_AVR32_JMP_SLOT 42 -+#define R_AVR32_ALIGN 43 -+#define R_AVR32_NUM 44 -+ -+/* AVR32 dynamic tags */ -+#define DT_AVR32_GOTSZ 0x70000001 /* Total size of GOT in bytes */ - - /* Renesas H8/300 Relocations */ - #define R_H8_NONE 0 -diff --git a/ldso/include/dl-string.h b/ldso/include/dl-string.h -index 32c5bf8..eb43bd9 100644 ---- a/ldso/include/dl-string.h -+++ b/ldso/include/dl-string.h -@@ -285,7 +285,8 @@ static __always_inline char * _dl_simple_ltoahex(char * local, unsigned long i) - /* On some arches constant strings are referenced through the GOT. - * This requires that load_addr must already be defined... */ - #if defined(mc68000) || defined(__arm__) || defined(__thumb__) || \ -- defined(__mips__) || defined(__sh__) || defined(__powerpc__) -+ defined(__mips__) || defined(__sh__) || defined(__powerpc__) || \ -+ defined(__avr32__) - # define CONSTANT_STRING_GOT_FIXUP(X) \ - if ((X) < (const char *) load_addr) (X) += load_addr - # define NO_EARLY_SEND_STDERR -diff --git a/ldso/include/dl-syscall.h b/ldso/include/dl-syscall.h -index b42416a..4404219 100644 ---- a/ldso/include/dl-syscall.h -+++ b/ldso/include/dl-syscall.h -@@ -55,69 +55,69 @@ - dynamic linking at all, so we cannot return any error codes. - We just punt if there is an error. */ - #define __NR__dl_exit __NR_exit --static inline _syscall1(void, _dl_exit, int, status); -+static __always_inline _syscall1(void, _dl_exit, int, status); - - #define __NR__dl_close __NR_close --static inline _syscall1(int, _dl_close, int, fd); -+static __always_inline _syscall1(int, _dl_close, int, fd); - - #define __NR__dl_open __NR_open --static inline _syscall3(int, _dl_open, const char *, fn, int, flags, -+static __always_inline _syscall3(int, _dl_open, const char *, fn, int, flags, - __kernel_mode_t, mode); - - #define __NR__dl_write __NR_write --static inline _syscall3(unsigned long, _dl_write, int, fd, -+static __always_inline _syscall3(unsigned long, _dl_write, int, fd, - const void *, buf, unsigned long, count); - - #define __NR__dl_read __NR_read --static inline _syscall3(unsigned long, _dl_read, int, fd, -+static __always_inline _syscall3(unsigned long, _dl_read, int, fd, - const void *, buf, unsigned long, count); - - #define __NR__dl_mprotect __NR_mprotect --static inline _syscall3(int, _dl_mprotect, const void *, addr, -+static __always_inline _syscall3(int, _dl_mprotect, const void *, addr, - unsigned long, len, int, prot); - - #define __NR__dl_stat __NR_stat --static inline _syscall2(int, _dl_stat, const char *, file_name, -+static __always_inline _syscall2(int, _dl_stat, const char *, file_name, - struct stat *, buf); - - #define __NR__dl_fstat __NR_fstat --static inline _syscall2(int, _dl_fstat, int, fd, struct stat *, buf); -+static __always_inline _syscall2(int, _dl_fstat, int, fd, struct stat *, buf); - - #define __NR__dl_munmap __NR_munmap --static inline _syscall2(int, _dl_munmap, void *, start, unsigned long, length); -+static __always_inline _syscall2(int, _dl_munmap, void *, start, unsigned long, length); - - #ifdef __NR_getxuid - # define __NR_getuid __NR_getxuid - #endif - #define __NR__dl_getuid __NR_getuid --static inline _syscall0(uid_t, _dl_getuid); -+static __always_inline _syscall0(uid_t, _dl_getuid); - - #ifndef __NR_geteuid - # define __NR_geteuid __NR_getuid - #endif - #define __NR__dl_geteuid __NR_geteuid --static inline _syscall0(uid_t, _dl_geteuid); -+static __always_inline _syscall0(uid_t, _dl_geteuid); - - #ifdef __NR_getxgid - # define __NR_getgid __NR_getxgid - #endif - #define __NR__dl_getgid __NR_getgid --static inline _syscall0(gid_t, _dl_getgid); -+static __always_inline _syscall0(gid_t, _dl_getgid); - - #ifndef __NR_getegid - # define __NR_getegid __NR_getgid - #endif - #define __NR__dl_getegid __NR_getegid --static inline _syscall0(gid_t, _dl_getegid); -+static __always_inline _syscall0(gid_t, _dl_getegid); - - #ifdef __NR_getxpid - # define __NR_getpid __NR_getxpid - #endif - #define __NR__dl_getpid __NR_getpid --static inline _syscall0(gid_t, _dl_getpid); -+static __always_inline _syscall0(gid_t, _dl_getpid); - - #define __NR__dl_readlink __NR_readlink --static inline _syscall3(int, _dl_readlink, const char *, path, char *, buf, -+static __always_inline _syscall3(int, _dl_readlink, const char *, path, char *, buf, - size_t, bufsiz); - - #ifdef __UCLIBC_HAS_SSP__ -@@ -146,14 +146,14 @@ static inline _syscall2(int, _dl_gettimeofday, struct timeval *, tv, - #if defined(__UCLIBC_MMAP_HAS_6_ARGS__) && defined(__NR_mmap) - - # define __NR__dl_mmap __NR_mmap --static inline _syscall6(void *, _dl_mmap, void *, start, size_t, length, -+static __always_inline _syscall6(void *, _dl_mmap, void *, start, size_t, length, - int, prot, int, flags, int, fd, off_t, offset); - - /* then try mmap2() */ - #elif defined(__NR_mmap2) - - # define __NR___syscall_mmap2 __NR_mmap2 --static inline _syscall6(__ptr_t, __syscall_mmap2, __ptr_t, addr, size_t, len, -+static __always_inline _syscall6(__ptr_t, __syscall_mmap2, __ptr_t, addr, size_t, len, - int, prot, int, flags, int, fd, off_t, offset); - - /* Some architectures always use 12 as page shift for mmap2() eventhough the -@@ -164,7 +164,7 @@ static inline _syscall6(__ptr_t, __syscall_mmap2, __ptr_t, addr, size_t, len, - # define MMAP2_PAGE_SHIFT 12 - #endif - --static inline void * _dl_mmap(void * addr, unsigned long size, int prot, -+static __always_inline void * _dl_mmap(void * addr, unsigned long size, int prot, - int flags, int fd, unsigned long offset) - { - if (offset & ((1 << MMAP2_PAGE_SHIFT) - 1)) -@@ -177,8 +177,8 @@ static inline void * _dl_mmap(void * addr, unsigned long size, int prot, - #elif defined(__NR_mmap) - - # define __NR__dl_mmap_real __NR_mmap --static inline _syscall1(void *, _dl_mmap_real, unsigned long *, buffer); --static inline void * _dl_mmap(void * addr, unsigned long size, int prot, -+static __always_inline _syscall1(void *, _dl_mmap_real, unsigned long *, buffer); -+static __always_inline void * _dl_mmap(void * addr, unsigned long size, int prot, - int flags, int fd, unsigned long offset) - { - unsigned long buffer[6]; -diff --git a/ldso/ldso/avr32/dl-debug.h b/ldso/ldso/avr32/dl-debug.h -new file mode 100644 -index 0000000..fe35539 ---- /dev/null -+++ b/ldso/ldso/avr32/dl-debug.h -@@ -0,0 +1,45 @@ -+/* -+ * AVR32 ELF shared libary loader support -+ * -+ * Copyright (C) 2005-2007 Atmel Corporation -+ * All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * 2. The name of the above contributors may not be -+ * used to endorse or promote products derived from this software -+ * without specific prior written permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND -+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -+ * ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE -+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -+ * SUCH DAMAGE. -+ */ -+ -+static const char *_dl_reltypes_tab[] = { -+ "R_AVR32_NONE", -+ "R_AVR32_32", "R_AVR32_16", "R_AVR32_8", -+ "R_AVR32_32_PCREL", "R_AVR32_16_PCREL", "R_AVR32_8_PCREL", -+ "R_AVR32_DIFF32", "R_AVR32_DIFF16", "R_AVR32_DIFF8", -+ "R_AVR32_GOT32", "R_AVR32_GOT16", "R_AVR32_GOT8", -+ "R_AVR32_21S", "R_AVR32_16U", "R_AVR32_16S", "R_AVR32_8S", "R_AVR32_8S_EXT", -+ "R_AVR32_22H_PCREL", "R_AVR32_18W_PCREL", "R_AVR32_16B_PCREL", -+ "R_AVR32_16N_PCREL", "R_AVR32_14UW_PCREL", "R_AVR32_11H_PCREL", -+ "R_AVR32_10UW_PCREL", "R_AVR32_9H_PCREL", "R_AVR32_9UW_PCREL", -+ "R_AVR32_HI16", "R_AVR32_LO16", -+ "R_AVR32_GOTPC", "R_AVR32_GOTCALL", "R_AVR32_LDA_GOT", -+ "R_AVR32_GOT21S", "R_AVR32_GOT18SW", "R_AVR32_GOT16S", "R_AVR32_GOT7UW", -+ "R_AVR32_32_CPENT", "R_AVR32_CPCALL", "R_AVR32_16_CP", "R_AVR32_9W_CP", -+ "R_AVR32_RELATIVE", "R_AVR32_GLOB_DAT", "R_AVR32_JMP_SLOT", -+ "R_AVR32_ALIGN", -+}; -diff --git a/ldso/ldso/avr32/dl-startup.h b/ldso/ldso/avr32/dl-startup.h -new file mode 100644 -index 0000000..3b9a641 ---- /dev/null -+++ b/ldso/ldso/avr32/dl-startup.h -@@ -0,0 +1,112 @@ -+/* -+ * Architecture specific code used by dl-startup.c -+ * -+ * Copyright (C) 2005-2007 Atmel Corporation -+ * -+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -+ */ -+ -+/* This is the library loader's main entry point. Let _dl_boot2 do its -+ * initializations and jump to the application's entry point -+ * afterwards. */ -+asm( " .text\n" -+ " .global _start\n" -+ " .type _start,@function\n" -+ "_start:\n" -+ /* All arguments are on the stack initially */ -+ " mov r12, sp\n" -+ " rcall _dl_start\n" -+ /* Returns user entry point in r12. Save it. */ -+ " mov r0, r12\n" -+ /* We're PIC, so get the Global Offset Table */ -+ " lddpc r6, .L_GOT\n" -+ ".L_RGOT:\n" -+ " rsub r6, pc\n" -+ /* Adjust argc and argv according to _dl_skip_args */ -+ " ld.w r1, r6[_dl_skip_args@got]\n" -+ " ld.w r1, r1[0]\n" -+ " ld.w r2, sp++\n" -+ " sub r2, r1\n" -+ " add sp, sp, r1 << 2\n" -+ " st.w --sp, r2\n" -+ /* Load the finalizer function */ -+ " ld.w r12, r6[_dl_fini@got]\n" -+ /* Jump to the user's entry point */ -+ " mov pc, r0\n\n" -+ -+ " .align 2\n" -+ ".L_GOT:" -+ " .long .L_RGOT - _GLOBAL_OFFSET_TABLE_\n" -+ " .size _start, . - _start\n" -+ " .previous\n"); -+ -+/* Get a pointer to the argv array. On many platforms this can be just -+ * the address if the first argument, on other platforms we need to -+ * do something a little more subtle here. */ -+#define GET_ARGV(ARGVP, ARGS) ARGVP = ((unsigned long *)ARGS + 1) -+ -+ -+/* We can't call functions before the GOT has been initialized */ -+#define NO_FUNCS_BEFORE_BOOTSTRAP -+ -+/* -+ * Relocate the GOT during dynamic loader bootstrap. This will add -+ * the load address to all entries in the GOT, which is necessary -+ * because the linker doesn't generate R_AVR32_RELATIVE relocs for the -+ * GOT. -+ */ -+static __always_inline -+void PERFORM_BOOTSTRAP_GOT(struct elf_resolve *tpnt) -+{ -+ Elf32_Addr i, nr_got; -+ register Elf32_Addr *__r6 __asm__("r6"); -+ Elf32_Addr *got = __r6; -+ -+ nr_got = tpnt->dynamic_info[DT_AVR32_GOTSZ_IDX] / sizeof(*got); -+ for (i = 2; i < nr_got; i++) -+ got[i] += tpnt->loadaddr; -+} -+ -+#define PERFORM_BOOTSTRAP_GOT(tpnt) PERFORM_BOOTSTRAP_GOT(tpnt) -+ -+/* Handle relocation of the symbols in the dynamic loader. */ -+static __always_inline -+void PERFORM_BOOTSTRAP_RELOC(ELF_RELOC *rpnt, unsigned long *reloc_addr, -+ unsigned long symbol_addr, -+ unsigned long load_addr, Elf32_Sym *symtab) -+{ -+ switch(ELF32_R_TYPE(rpnt->r_info)) { -+ case R_AVR32_NONE: -+ break; -+ case R_AVR32_GLOB_DAT: -+ case R_AVR32_JMP_SLOT: -+ *reloc_addr = symbol_addr; -+ break; -+ case R_AVR32_RELATIVE: -+ SEND_STDERR_DEBUG("Applying RELATIVE relocation: "); -+ SEND_ADDRESS_STDERR_DEBUG(load_addr, 0); -+ SEND_STDERR_DEBUG(" + "); -+ SEND_ADDRESS_STDERR_DEBUG(rpnt->r_addend, 1); -+ *reloc_addr = load_addr + rpnt->r_addend; -+ break; -+ default: -+ SEND_STDERR("BOOTSTRAP_RELOC: unhandled reloc_type "); -+ SEND_NUMBER_STDERR(ELF32_R_TYPE(rpnt->r_info), 1); -+ SEND_STDERR("REL, SYMBOL, LOAD: "); -+ SEND_ADDRESS_STDERR(reloc_addr, 0); -+ SEND_STDERR(", "); -+ SEND_ADDRESS_STDERR(symbol_addr, 0); -+ SEND_STDERR(", "); -+ SEND_ADDRESS_STDERR(load_addr, 1); -+ _dl_exit(1); -+ } -+} -+ -+/* Transfer control to the user's application, once the dynamic loader -+ * is done. This routine has to exit the current function, then call -+ * the _dl_elf_main function. -+ * -+ * Since our _dl_boot will simply call whatever is returned by -+ * _dl_boot2, we can just return the address we're supposed to -+ * call. */ -+#define START() return _dl_elf_main; -diff --git a/ldso/ldso/avr32/dl-syscalls.h b/ldso/ldso/avr32/dl-syscalls.h -new file mode 100644 -index 0000000..996bb87 ---- /dev/null -+++ b/ldso/ldso/avr32/dl-syscalls.h -@@ -0,0 +1,6 @@ -+/* We can't use the real errno in ldso, since it has not yet -+ * been dynamicly linked in yet. */ -+#include "sys/syscall.h" -+extern int _dl_errno; -+#undef __set_errno -+#define __set_errno(X) {(_dl_errno) = (X);} -diff --git a/ldso/ldso/avr32/dl-sysdep.h b/ldso/ldso/avr32/dl-sysdep.h -new file mode 100644 -index 0000000..1a30172 ---- /dev/null -+++ b/ldso/ldso/avr32/dl-sysdep.h -@@ -0,0 +1,105 @@ -+/* -+ * Various assembly language/system dependent hacks that are required -+ * so that we can minimize the amount of platform specific code. -+ * -+ * Copyright (C) 2004-2007 Atmel Corporation -+ * -+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -+ */ -+ -+/* Define this if the system uses RELOCA. */ -+#define ELF_USES_RELOCA -+ -+#include -+ -+#define ARCH_NUM 1 -+#define DT_AVR32_GOTSZ_IDX (DT_NUM + OS_NUM) -+ -+#define ARCH_DYNAMIC_INFO(dpnt, dynamic, debug_addr) \ -+ do { \ -+ if (dpnt->d_tag == DT_AVR32_GOTSZ) \ -+ dynamic[DT_AVR32_GOTSZ_IDX] = dpnt->d_un.d_val; \ -+ } while (0) -+ -+/* Initialization sequence for the application/library GOT. */ -+#define INIT_GOT(GOT_BASE,MODULE) \ -+ do { \ -+ unsigned long i, nr_got; \ -+ \ -+ GOT_BASE[0] = (unsigned long) _dl_linux_resolve; \ -+ GOT_BASE[1] = (unsigned long) MODULE; \ -+ \ -+ /* Add load address displacement to all GOT entries */ \ -+ nr_got = MODULE->dynamic_info[DT_AVR32_GOTSZ_IDX] / 4; \ -+ for (i = 2; i < nr_got; i++) \ -+ GOT_BASE[i] += (unsigned long)MODULE->loadaddr; \ -+ } while (0) -+ -+#define do_rem(result, n, base) ((result) = (n) % (base)) -+ -+/* Here we define the magic numbers that this dynamic loader should accept */ -+#define MAGIC1 EM_AVR32 -+#undef MAGIC2 -+ -+/* Used for error messages */ -+#define ELF_TARGET "AVR32" -+ -+unsigned long _dl_linux_resolver(unsigned long got_offset, unsigned long *got); -+ -+/* 4096 bytes alignment */ -+#define PAGE_ALIGN 0xfffff000 -+#define ADDR_ALIGN 0xfff -+#define OFFS_ALIGN 0x7ffff000 -+ -+#define elf_machine_type_class(type) \ -+ ((type == R_AVR32_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) -+ -+/* AVR32 doesn't need any COPY relocs */ -+#define DL_NO_COPY_RELOCS -+ -+/* Return the link-time address of _DYNAMIC. Conveniently, this is the -+ first element of the GOT. This must be inlined in a function which -+ uses global data. */ -+static inline Elf32_Addr -+elf_machine_dynamic (void) -+{ -+ register Elf32_Addr *got asm ("r6"); -+ return *got; -+} -+ -+/* Return the run-time load address of the shared object. */ -+static inline Elf32_Addr -+elf_machine_load_address (void) -+{ -+ extern void __dl_start asm("_dl_start"); -+ Elf32_Addr got_addr = (Elf32_Addr) &__dl_start; -+ Elf32_Addr pcrel_addr; -+ -+ asm (" lddpc %0, 2f\n" -+ "1: add %0, pc\n" -+ " rjmp 3f\n" -+ " .align 2\n" -+ "2: .long _dl_start - 1b\n" -+ "3:\n" -+ : "=r"(pcrel_addr) : : "cc"); -+ -+ return pcrel_addr - got_addr; -+} -+ -+/* -+ * Perform any RELATIVE relocations specified by DT_RELCOUNT. -+ * Currently, we don't use that tag, but we might in the future as -+ * this would reduce the startup time somewhat (although probably not by much). -+ */ -+static inline void -+elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr, -+ Elf32_Word relative_count) -+{ -+ Elf32_Rela *rpnt = (void *)rel_addr; -+ -+ do { -+ Elf32_Addr *reloc_addr; -+ reloc_addr = (void *)(load_off + (rpnt++)->r_offset); -+ *reloc_addr = load_off + rpnt->r_addend; -+ } while (--relative_count); -+} -diff --git a/ldso/ldso/avr32/elfinterp.c b/ldso/ldso/avr32/elfinterp.c -new file mode 100644 -index 0000000..196292b ---- /dev/null -+++ b/ldso/ldso/avr32/elfinterp.c -@@ -0,0 +1,191 @@ -+/* -+ * AVR32 ELF shared library loader suppport -+ * -+ * Copyright (C) 2004-2006 Atmel Corporation -+ * -+ * All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * 2. The name of the above contributors may not be -+ * used to endorse or promote products derived from this software -+ * without specific prior written permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND -+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -+ * ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE -+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -+ * SUCH DAMAGE. -+ */ -+ -+unsigned long _dl_linux_resolver(unsigned long got_offset, unsigned long *got) -+{ -+ struct elf_resolve *tpnt = (struct elf_resolve *)got[1]; -+ Elf32_Sym *sym; -+ unsigned long local_gotno; -+ unsigned long gotsym; -+ unsigned long new_addr; -+ char *strtab, *symname; -+ unsigned long *entry; -+ unsigned long sym_index = got_offset / 4; -+ -+#if 0 -+ local_gotno = tpnt->dynamic_info[DT_AVR32_LOCAL_GOTNO]; -+ gotsym = tpnt->dynamic_info[DT_AVR32_GOTSYM]; -+ -+ sym = ((Elf32_Sym *)(tpnt->dynamic_info[DT_SYMTAB] + tpnt->loadaddr)) -+ + sym_index; -+ strtab = (char *)(tpnt->dynamic_info[DT_STRTAB] + tpnt->loadaddr); -+ symname = strtab + sym->st_name; -+ -+#if 0 -+ new_addr = (unsigned long) _dl_find_hash(strtab + sym->st_name, -+ tpnt->symbol_scope, tpnt, -+ resolver); -+#endif -+ -+ entry = (unsigned long *)(got + local_gotno + sym_index - gotsym); -+ *entry = new_addr; -+#endif -+ -+ return new_addr; -+} -+ -+static int -+_dl_parse(struct elf_resolve *tpnt, struct dyn_elf *scope, -+ unsigned long rel_addr, unsigned long rel_size, -+ int (*reloc_func)(struct elf_resolve *tpnt, struct dyn_elf *scope, -+ Elf32_Rela *rpnt, Elf32_Sym *symtab, char *strtab)) -+{ -+ Elf32_Sym *symtab; -+ Elf32_Rela *rpnt; -+ char *strtab; -+ int i; -+ -+ rpnt = (Elf32_Rela *)rel_addr; -+ rel_size /= sizeof(Elf32_Rela); -+ symtab = (Elf32_Sym *)tpnt->dynamic_info[DT_SYMTAB]; -+ strtab = (char *)tpnt->dynamic_info[DT_STRTAB]; -+ -+ for (i = 0; i < rel_size; i++, rpnt++) { -+ int symtab_index, res; -+ -+ symtab_index = ELF32_R_SYM(rpnt->r_info); -+ -+ debug_sym(symtab, strtab, symtab_index); -+ debug_reloc(symtab, strtab, rpnt); -+ -+ res = reloc_func(tpnt, scope, rpnt, symtab, strtab); -+ -+ if (res == 0) -+ continue; -+ -+ _dl_dprintf(2, "\n%s: ", _dl_progname); -+ -+ if (symtab_index) -+ _dl_dprintf(2, "symbol '%s': ", -+ strtab + symtab[symtab_index].st_name); -+ -+ if (res < 0) { -+ int reloc_type = ELF32_R_TYPE(rpnt->r_info); -+#if defined(__SUPPORT_LD_DEBUG__) -+ _dl_dprintf(2, "can't handle reloc type %s\n", -+ _dl_reltypes(reloc_type)); -+#else -+ _dl_dprintf(2, "can't handle reloc type %x\n", -+ reloc_type); -+#endif -+ _dl_exit(-res); -+ } else { -+ _dl_dprintf(2, "can't resolve symbol\n"); -+ return res; -+ } -+ } -+ -+ return 0; -+} -+ -+static int _dl_do_reloc(struct elf_resolve *tpnt, struct dyn_elf *scope, -+ Elf32_Rela *rpnt, Elf32_Sym *symtab, char *strtab) -+{ -+ int reloc_type; -+ int symtab_index; -+ char *symname; -+ unsigned long *reloc_addr; -+ unsigned long symbol_addr; -+#if defined(__SUPPORT_LD_DEBUG__) -+ unsigned long old_val; -+#endif -+ -+ reloc_addr = (unsigned long *)(tpnt->loadaddr + rpnt->r_offset); -+ reloc_type = ELF32_R_TYPE(rpnt->r_info); -+ symtab_index = ELF32_R_SYM(rpnt->r_info); -+ symbol_addr = 0; -+ symname = strtab + symtab[symtab_index].st_name; -+ -+ if (symtab_index) { -+ symbol_addr = (unsigned long) -+ _dl_find_hash(strtab + symtab[symtab_index].st_name, -+ tpnt->symbol_scope, tpnt, -+ elf_machine_type_class(reloc_type)); -+ -+ /* Allow undefined references to weak symbols */ -+ if (!symbol_addr && -+ ELF32_ST_BIND(symtab[symtab_index].st_info) != STB_WEAK) { -+ _dl_dprintf(2, "%s: can't resolve symbol '%s'\n", -+ _dl_progname, symname); -+ return 0; -+ } -+ } -+ -+#if defined(__SUPPORT_LD_DEBUG__) -+ old_val = *reloc_addr; -+#endif -+ switch (reloc_type) { -+ case R_AVR32_NONE: -+ break; -+ case R_AVR32_GLOB_DAT: -+ case R_AVR32_JMP_SLOT: -+ *reloc_addr = symbol_addr + rpnt->r_addend; -+ break; -+ case R_AVR32_RELATIVE: -+ *reloc_addr = (unsigned long)tpnt->loadaddr -+ + rpnt->r_addend; -+ break; -+ default: -+ return -1; -+ } -+ -+#if defined(__SUPPORT_LD_DEBUG__) -+ if (_dl_debug_reloc && _dl_debug_detail) -+ _dl_dprintf(_dl_debug_file, "\tpatched: %x ==> %x @ %x\n", -+ old_val, *reloc_addr); -+#endif -+ -+ return 0; -+} -+ -+void _dl_parse_lazy_relocation_information(struct dyn_elf *rpnt, -+ unsigned long rel_addr, -+ unsigned long rel_size) -+{ -+ /* TODO: Might want to support this in order to get faster -+ * startup times... */ -+} -+ -+int _dl_parse_relocation_information(struct dyn_elf *rpnt, -+ unsigned long rel_addr, -+ unsigned long rel_size) -+{ -+ return _dl_parse(rpnt->dyn, rpnt->dyn->symbol_scope, rel_addr, rel_size, -+ _dl_do_reloc); -+} -diff --git a/ldso/ldso/avr32/resolve.S b/ldso/ldso/avr32/resolve.S -new file mode 100644 -index 0000000..e3cb7f4 ---- /dev/null -+++ b/ldso/ldso/avr32/resolve.S -@@ -0,0 +1,28 @@ -+/* -+ * Linux dynamic resolving code for AVR32. Fixes up the GOT entry as -+ * indicated in register r12 and jumps to the resolved address. -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ * -+ * Copyright (C) 2004-2007 Atmel Corporation -+ */ -+ -+#define ip r5 -+ -+ .text -+ .global _dl_linux_resolve -+ .type _dl_linux_resolve,@function -+_dl_linux_resolve: -+ /* The PLT code pushed r8 for us. It contains the address of this -+ function's GOT entry, that is entry 0. ip contains the address -+ of the GOT entry of the function we wanted to call. */ -+ stm --sp, r9-r12, lr -+ mov r11, r8 -+ sub r12, ip, r8 -+ rcall _dl_linux_resolver -+ mov ip, r12 -+ popm r8-r12,lr -+ mov pc, ip -+ .size _dl_linux_resolve, . - _dl_linux_resolve -diff --git a/ldso/ldso/dl-startup.c b/ldso/ldso/dl-startup.c -index 5cf1d04..d4294ec 100644 ---- a/ldso/ldso/dl-startup.c -+++ b/ldso/ldso/dl-startup.c -@@ -217,7 +217,9 @@ DL_START(unsigned long args) - /* some arches (like MIPS) we have to tweak the GOT before relocations */ - PERFORM_BOOTSTRAP_GOT(tpnt); - --#else -+#endif -+ -+#if !defined(PERFORM_BOOTSTRAP_GOT) || defined(__avr32__) - - /* OK, now do the relocations. We do not do a lazy binding here, so - that once we are done, we have considerably more flexibility. */ -diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c -index f4e6cac..9cdc3fe 100644 ---- a/libc/inet/resolv.c -+++ b/libc/inet/resolv.c -@@ -1643,7 +1643,7 @@ int attribute_hidden __read_etc_hosts_r(FILE * fp, const char * name, int type, - *result=result_buf; - ret=NETDB_SUCCESS; - #ifdef __UCLIBC_HAS_IPV6__ -- } else if (type == AF_INET6 && inet_pton(AF_INET6, alias[0], in6) > 0) { -+ } else if (type == AF_INET6 && inet_pton(AF_INET6, alias[0], in6) > 0) { - DPRINTF("Found INET6\n"); - addr_list6[0] = in6; - addr_list6[1] = 0; -@@ -1658,8 +1658,8 @@ int attribute_hidden __read_etc_hosts_r(FILE * fp, const char * name, int type, - } else { - DPRINTF("Error\n"); - ret=TRY_AGAIN; -- break; /* bad ip address */ -- } -+ continue; /* bad ip address, keep searching */ -+ } - - if (action!=GETHOSTENT) { - fclose(fp); -diff --git a/libc/string/avr32/Makefile b/libc/string/avr32/Makefile -new file mode 100644 -index 0000000..e19e9d9 ---- /dev/null -+++ b/libc/string/avr32/Makefile -@@ -0,0 +1,26 @@ -+# Makefile for uClibc -+# -+# Copyright (C) 2000-2003 Erik Andersen -+# -+# This program is free software; you can redistribute it and/or modify it under -+# the terms of the GNU Library General Public License as published by the Free -+# Software Foundation; either version 2 of the License, or (at your option) any -+# later version. -+# -+# This program is distributed in the hope that it will be useful, but WITHOUT -+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -+# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more -+# details. -+# -+# You should have received a copy of the GNU Library General Public License -+# along with this program; if not, write to the Free Software Foundation, Inc., -+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ -+top_srcdir := ../../../ -+top_builddir := ../../../ -+ -+all: objs -+ -+include $(top_builddir)Rules.mak -+include ../Makefile.in -+include $(top_srcdir)Makerules -diff --git a/libc/string/avr32/bcopy.S b/libc/string/avr32/bcopy.S -new file mode 100644 -index 0000000..87c1e04 ---- /dev/null -+++ b/libc/string/avr32/bcopy.S -@@ -0,0 +1,26 @@ -+/* -+ * Copyright (C) 2004-2007 Atmel Corporation -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ */ -+ -+#include -+ -+#ifdef __UCLIBC_SUSV3_LEGACY__ -+ -+ .text -+ .global bcopy -+ .type bcopy, @function -+ .align 1 -+bcopy: -+ /* Swap the first two arguments */ -+ eor r11, r12 -+ eor r12, r11 -+ eor r11, r12 -+ rjmp __GI_memmove -+ -+ .size bcopy, . - bcopy -+ -+#endif /* __UCLIBC_SUSV3_LEGACY__ */ -diff --git a/libc/string/avr32/bzero.S b/libc/string/avr32/bzero.S -new file mode 100644 -index 0000000..c999e65 ---- /dev/null -+++ b/libc/string/avr32/bzero.S -@@ -0,0 +1,22 @@ -+/* -+ * Copyright (C) 2004-2007 Atmel Corporation -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ */ -+ -+#ifdef __UCLIBC_SUSV3_LEGACY__ -+ -+ .text -+ .global bzero -+ .type bzero, @function -+ .align 1 -+bzero: -+ mov r10, r11 -+ mov r11, 0 -+ rjmp __memset -+ -+ .size bzero, . - bzero -+ -+#endif /* __UCLIBC_SUSV3_LEGACY__ */ -diff --git a/libc/string/avr32/memcmp.S b/libc/string/avr32/memcmp.S -new file mode 100644 -index 0000000..ae6cc91 ---- /dev/null -+++ b/libc/string/avr32/memcmp.S -@@ -0,0 +1,61 @@ -+/* -+ * Copyright (C) 2004-2007 Atmel Corporation -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ */ -+ -+#include -+ -+#define s1 r12 -+#define s2 r11 -+#define len r10 -+ -+ .text -+ .global memcmp -+ .type memcmp, @function -+ .align 1 -+memcmp: -+ sub len, 4 -+ brlt .Lless_than_4 -+ -+1: ld.w r8, s1++ -+ ld.w r9, s2++ -+ cp.w r8, r9 -+ brne .Lfound_word -+ sub len, 4 -+ brge 1b -+ -+.Lless_than_4: -+ sub len, -4 -+ reteq 0 -+ -+1: ld.ub r8, s1++ -+ ld.ub r9, s2++ -+ sub r8, r9 -+ retne r8 -+ sub len, 1 -+ brgt 1b -+ -+ retal 0 -+ -+.Lfound_word: -+ mov len, 4 -+ -+2: bfextu r11, r9, 24, 8 -+ bfextu r12, r8, 24, 8 -+ sub r12, r11 -+ retne r12 -+ lsl r8, 8 -+ lsl r9, 8 -+ sub len, 1 -+ brne 2b -+ retal r12 -+ -+ .size memcmp, . - memcmp -+ -+libc_hidden_def(memcmp) -+#ifdef __UCLIBC_SUSV3_LEGACY__ -+strong_alias(memcmp,bcmp) -+#endif -diff --git a/libc/string/avr32/memcpy.S b/libc/string/avr32/memcpy.S -new file mode 100644 -index 0000000..bf091ab ---- /dev/null -+++ b/libc/string/avr32/memcpy.S -@@ -0,0 +1,111 @@ -+/* -+ * Copyright (C) 2004-2007 Atmel Corporation -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ */ -+ -+/* Don't use r12 as dst since we must return it unmodified */ -+#define dst r9 -+#define src r11 -+#define len r10 -+ -+ .text -+ .global memcpy -+ .type memcpy, @function -+memcpy: -+ pref src[0] -+ mov dst, r12 -+ -+ /* If we have less than 32 bytes, don't do anything fancy */ -+ cp.w len, 32 -+ brge .Lmore_than_31 -+ -+ sub len, 1 -+ retlt r12 -+1: ld.ub r8, src++ -+ st.b dst++, r8 -+ sub len, 1 -+ brge 1b -+ retal r12 -+ -+.Lmore_than_31: -+ pushm r0-r7, lr -+ -+ /* Check alignment */ -+ mov r8, src -+ andl r8, 31, COH -+ brne .Lunaligned_src -+ mov r8, dst -+ andl r8, 3, COH -+ brne .Lunaligned_dst -+ -+.Laligned_copy: -+ sub len, 32 -+ brlt .Lless_than_32 -+ -+1: /* Copy 32 bytes at a time */ -+ ldm src, r0-r7 -+ sub src, -32 -+ stm dst, r0-r7 -+ sub dst, -32 -+ sub len, 32 -+ brge 1b -+ -+.Lless_than_32: -+ /* Copy 16 more bytes if possible */ -+ sub len, -16 -+ brlt .Lless_than_16 -+ ldm src, r0-r3 -+ sub src, -16 -+ sub len, 16 -+ stm dst, r0-r3 -+ sub dst, -16 -+ -+.Lless_than_16: -+ /* Do the remaining as byte copies */ -+ neg len -+ add pc, pc, len << 2 -+ .rept 15 -+ ld.ub r0, src++ -+ st.b dst++, r0 -+ .endr -+ -+ popm r0-r7, pc -+ -+.Lunaligned_src: -+ /* Make src cacheline-aligned. r8 = (src & 31) */ -+ rsub r8, r8, 32 -+ sub len, r8 -+1: ld.ub r0, src++ -+ st.b dst++, r0 -+ sub r8, 1 -+ brne 1b -+ -+ /* If dst is word-aligned, we're ready to go */ -+ pref src[0] -+ mov r8, 3 -+ tst dst, r8 -+ breq .Laligned_copy -+ -+.Lunaligned_dst: -+ /* src is aligned, but dst is not. Expect bad performance */ -+ sub len, 4 -+ brlt 2f -+1: ld.w r0, src++ -+ st.w dst++, r0 -+ sub len, 4 -+ brge 1b -+ -+2: neg len -+ add pc, pc, len << 2 -+ .rept 3 -+ ld.ub r0, src++ -+ st.b dst++, r0 -+ .endr -+ -+ popm r0-r7, pc -+ .size memcpy, . - memcpy -+ -+libc_hidden_def(memcpy) -diff --git a/libc/string/avr32/memmove.S b/libc/string/avr32/memmove.S -new file mode 100644 -index 0000000..98287c5 ---- /dev/null -+++ b/libc/string/avr32/memmove.S -@@ -0,0 +1,116 @@ -+/* -+ * Copyright (C) 2004-2007 Atmel Corporation -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ */ -+ -+#define dst r12 -+#define src r11 -+#define len r10 -+ -+ .text -+ .global memmove -+ .type memmove, @function -+memmove: -+ cp.w src, dst -+ brge __GI_memcpy -+ -+ add dst, len -+ add src, len -+ pref src[-1] -+ -+ /* -+ * The rest is basically the same as in memcpy.S except that -+ * the direction is reversed. -+ */ -+ cp.w len, 32 -+ brge .Lmore_than_31 -+ -+ sub len, 1 -+ retlt r12 -+1: ld.ub r8, --src -+ st.b --dst, r8 -+ sub len, 1 -+ brge 1b -+ retal r12 -+ -+.Lmore_than_31: -+ pushm r0-r7, lr -+ -+ /* Check alignment */ -+ mov r8, src -+ andl r8, 31, COH -+ brne .Lunaligned_src -+ mov r8, r12 -+ andl r8, 3, COH -+ brne .Lunaligned_dst -+ -+.Laligned_copy: -+ sub len, 32 -+ brlt .Lless_than_32 -+ -+1: /* Copy 32 bytes at a time */ -+ sub src, 32 -+ ldm src, r0-r7 -+ sub dst, 32 -+ sub len, 32 -+ stm dst, r0-r7 -+ brge 1b -+ -+.Lless_than_32: -+ /* Copy 16 more bytes if possible */ -+ sub len, -16 -+ brlt .Lless_than_16 -+ sub src, 16 -+ ldm src, r0-r3 -+ sub dst, 16 -+ sub len, 16 -+ stm dst, r0-r3 -+ -+.Lless_than_16: -+ /* Do the remaining as byte copies */ -+ sub len, -16 -+ breq 2f -+1: ld.ub r0, --src -+ st.b --dst, r0 -+ sub len, 1 -+ brne 1b -+ -+2: popm r0-r7, pc -+ -+.Lunaligned_src: -+ /* Make src cacheline-aligned. r8 = (src & 31) */ -+ sub len, r8 -+1: ld.ub r0, --src -+ st.b --dst, r0 -+ sub r8, 1 -+ brne 1b -+ -+ /* If dst is word-aligned, we're ready to go */ -+ pref src[-4] -+ mov r8, 3 -+ tst dst, r8 -+ breq .Laligned_copy -+ -+.Lunaligned_dst: -+ /* src is aligned, but dst is not. Expect bad performance */ -+ sub len, 4 -+ brlt 2f -+1: ld.w r0, --src -+ st.w --dst, r0 -+ sub len, 4 -+ brge 1b -+ -+2: neg len -+ add pc, pc, len << 2 -+ .rept 3 -+ ld.ub r0, --src -+ st.b --dst, r0 -+ .endr -+ -+ popm r0-r7, pc -+ .size memmove, . - memmove -+ -+libc_hidden_def(memmove) -diff --git a/libc/string/avr32/memset.S b/libc/string/avr32/memset.S -new file mode 100644 -index 0000000..33cfaed ---- /dev/null -+++ b/libc/string/avr32/memset.S -@@ -0,0 +1,70 @@ -+/* -+ * Copyright (C) 2004-2007 Atmel Corporation -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ */ -+ -+#include -+ -+#define s r12 -+#define c r11 -+#define n r10 -+ -+ .text -+ .global memset -+ .type memset, @function -+ -+ .global __memset -+ .hidden __memset -+ .type __memset, @function -+ -+ .align 1 -+memset: -+__memset: -+ cp.w n, 32 -+ mov r9, s -+ brge .Llarge_memset -+ -+ sub n, 1 -+ retlt s -+1: st.b s++, c -+ sub n, 1 -+ brge 1b -+ -+ retal r9 -+ -+.Llarge_memset: -+ mov r8, r11 -+ mov r11, 3 -+ bfins r8, r8, 8, 8 -+ bfins r8, r8, 16, 16 -+ tst s, r11 -+ breq 2f -+ -+1: st.b s++, r8 -+ sub n, 1 -+ tst s, r11 -+ brne 1b -+ -+2: mov r11, r9 -+ mov r9, r8 -+ sub n, 8 -+ -+3: st.d s++, r8 -+ sub n, 8 -+ brge 3b -+ -+ /* If we are done, n == -8 and we'll skip all st.b insns below */ -+ neg n -+ lsl n, 1 -+ add pc, n -+ .rept 7 -+ st.b s++, r8 -+ .endr -+ retal r11 -+ -+ .size memset, . - memset -+ -+libc_hidden_def(memset) -diff --git a/libc/string/avr32/strcmp.S b/libc/string/avr32/strcmp.S -new file mode 100644 -index 0000000..f73bd43 ---- /dev/null -+++ b/libc/string/avr32/strcmp.S -@@ -0,0 +1,91 @@ -+/* -+ * Copyright (C) 2004-2007 Atmel Corporation -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ */ -+ -+#include -+ -+#define s1 r12 -+#define s2 r11 -+#define len r10 -+ -+ .text -+ .global strcmp -+ .type strcmp, @function -+ .align 1 -+strcmp: -+ mov r8, 3 -+ tst s1, r8 -+ brne .Lunaligned_s1 -+ tst s2, r8 -+ brne .Lunaligned_s2 -+ -+1: ld.w r8, s1++ -+ ld.w r9, s2++ -+ cp.w r8, r9 -+ brne 2f -+ tnbz r8 -+ brne 1b -+ retal 0 -+ -+2: bfextu r12, r8, 24, 8 -+ bfextu r11, r9, 24, 8 -+ sub r12, r11 -+ retne r12 -+ cp.w r11, 0 -+ reteq 0 -+ bfextu r12, r8, 16, 8 -+ bfextu r11, r9, 16, 8 -+ sub r12, r11 -+ retne r12 -+ cp.w r11, 0 -+ reteq 0 -+ bfextu r12, r8, 8, 8 -+ bfextu r11, r9, 8, 8 -+ sub r12, r11 -+ retne r12 -+ cp.w r11, 0 -+ reteq 0 -+ bfextu r12, r8, 0, 8 -+ bfextu r11, r9, 0, 8 -+ sub r12, r11 -+ retal r12 -+ -+.Lunaligned_s1: -+3: tst s1, r8 -+ breq 4f -+ ld.ub r10, s1++ -+ ld.ub r9, s2++ -+ sub r10, r9 -+ retne r10 -+ cp.w r9, 0 -+ brne 3b -+ retal r10 -+ -+4: tst s2, r8 -+ breq 1b -+ -+.Lunaligned_s2: -+ /* -+ * s1 and s2 can't both be aligned, and unaligned word loads -+ * can trigger spurious exceptions if we cross a page boundary. -+ * Do it the slow way... -+ */ -+1: ld.ub r8, s1++ -+ ld.ub r9, s2++ -+ sub r8, r9 -+ retne r8 -+ cp.w r9, 0 -+ brne 1b -+ retal 0 -+ -+ .size strcmp, . - strcmp -+ -+libc_hidden_def(strcmp) -+#ifndef __UCLIBC_HAS_LOCALE__ -+strong_alias(strcmp, strcoll) -+libc_hidden_def(strcoll) -+#endif -diff --git a/libc/string/avr32/strlen.S b/libc/string/avr32/strlen.S -new file mode 100644 -index 0000000..5223e53 ---- /dev/null -+++ b/libc/string/avr32/strlen.S -@@ -0,0 +1,62 @@ -+/* -+ * Copyright (C) 2004-2007 Atmel Corporation -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ */ -+ -+#include -+ -+#define str r12 -+ -+ .text -+ .global strlen -+ .type strlen, @function -+strlen: -+ mov r11, r12 -+ -+ mov r9, str -+ andl r9, 3, COH -+ brne .Lunaligned_str -+ -+1: ld.w r8, str++ -+ tnbz r8 -+ brne 1b -+ -+ sub r12, r11 -+ bfextu r9, r8, 24, 8 -+ cp.w r9, 0 -+ subeq r12, 4 -+ reteq r12 -+ bfextu r9, r8, 16, 8 -+ cp.w r9, 0 -+ subeq r12, 3 -+ reteq r12 -+ bfextu r9, r8, 8, 8 -+ cp.w r9, 0 -+ subeq r12, 2 -+ reteq r12 -+ sub r12, 1 -+ retal r12 -+ -+.Lunaligned_str: -+ add pc, pc, r9 << 3 -+ sub r0, r0, 0 /* 4-byte nop */ -+ ld.ub r8, str++ -+ sub r8, r8, 0 -+ breq 1f -+ ld.ub r8, str++ -+ sub r8, r8, 0 -+ breq 1f -+ ld.ub r8, str++ -+ sub r8, r8, 0 -+ brne 1b -+ -+1: sub r12, 1 -+ sub r12, r11 -+ retal r12 -+ -+ .size strlen, . - strlen -+ -+libc_hidden_def(strlen) -diff --git a/libc/sysdeps/linux/avr32/Makefile b/libc/sysdeps/linux/avr32/Makefile -new file mode 100644 -index 0000000..338abc0 ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/Makefile -@@ -0,0 +1,25 @@ -+# Makefile for uClibc -+# -+# Copyright (C) 2000-2003 Erik Andersen -+# -+# This program is free software; you can redistribute it and/or modify it under -+# the terms of the GNU Library General Public License as published by the Free -+# Software Foundation; either version 2 of the License, or (at your option) any -+# later version. -+# -+# This program is distributed in the hope that it will be useful, but WITHOUT -+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -+# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more -+# details. -+# -+# You should have received a copy of the GNU Library General Public License -+# along with this program; if not, write to the Free Software Foundation, Inc., -+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ -+top_srcdir=../../../../ -+top_builddir=../../../../ -+all: objs -+ -+include $(top_builddir)Rules.mak -+include Makefile.arch -+include $(top_srcdir)Makerules -diff --git a/libc/sysdeps/linux/avr32/Makefile.arch b/libc/sysdeps/linux/avr32/Makefile.arch -new file mode 100644 -index 0000000..44fc01e ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/Makefile.arch -@@ -0,0 +1,13 @@ -+# Makefile for uClibc -+# -+# Copyright (C) 2000-2005 Erik Andersen -+# -+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -+# -+ -+CSRC := brk.c clone.c mmap.c sigaction.c -+ -+SSRC := __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \ -+ sigrestorer.S syscall.S vfork.S -+ -+include $(top_srcdir)/libc/sysdeps/linux/Makefile.commonarch -diff --git a/libc/sysdeps/linux/avr32/__longjmp.S b/libc/sysdeps/linux/avr32/__longjmp.S -new file mode 100644 -index 0000000..6154bb2 ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/__longjmp.S -@@ -0,0 +1,21 @@ -+/* -+ * Copyright (C) 2004-2007 Atmel Corporation -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ */ -+ -+ .global __longjmp -+ .type __longjmp,"function" -+ .align 1 -+__longjmp: -+ ldm r12++, r0-r8,sp,lr -+ mustr r8 /* restore status register (lower half) */ -+ cp r11, 0 /* can't return zero */ -+ frs -+ moveq r11, 1 -+ retal r11 -+ .size __longjmp, . - __longjmp -+ -+libc_hidden_def(__longjmp) -diff --git a/libc/sysdeps/linux/avr32/bits/atomic.h b/libc/sysdeps/linux/avr32/bits/atomic.h -new file mode 100644 -index 0000000..e6be41f ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/bits/atomic.h -@@ -0,0 +1,120 @@ -+/* -+ * Copyright (C) 2007 Atmel Corporation -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ */ -+#ifndef _AVR32_BITS_ATOMIC_H -+#define _AVR32_BITS_ATOMIC_H 1 -+ -+#include -+ -+typedef int32_t atomic32_t; -+typedef uint32_t uatomic32_t; -+typedef int_fast32_t atomic_fast32_t; -+typedef uint_fast32_t uatomic_fast32_t; -+ -+typedef intptr_t atomicptr_t; -+typedef uintptr_t uatomicptr_t; -+typedef intmax_t atomic_max_t; -+typedef uintmax_t uatomic_max_t; -+ -+#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \ -+ (abort(), 0) -+ -+#define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \ -+ (abort(), 0) -+ -+#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ -+ ({ \ -+ __typeof__(*(mem)) __prev; \ -+ __asm__ __volatile__( \ -+ "/* __arch_compare_and_exchange_val_32_acq */\n" \ -+ "1: ssrf 5\n" \ -+ " ld.w %[result], %[m]\n" \ -+ " cp.w %[result], %[old]\n" \ -+ " brne 2f\n" \ -+ " stcond %[m], %[new]\n" \ -+ " brne 1b\n" \ -+ "2:" \ -+ : [result] "=&r"(__result), [m] "=m"(*(mem)) \ -+ : "m"(*(mem)), [old] "ir"(oldval), \ -+ [new] "r"(newval) \ -+ : "memory", "cc"); \ -+ __prev; \ -+ }) -+ -+#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ -+ (abort(), 0) -+ -+#define __arch_exchange_32_acq(mem, newval) \ -+ ({ \ -+ __typeof__(*(mem)) __oldval; \ -+ __asm__ __volatile__( \ -+ "/*__arch_exchange_32_acq */\n" \ -+ " xchg %[old], %[m], %[new]" \ -+ : [old] "=&r"(__oldval) \ -+ : [m] "r"(mem), [new] "r"(newval) \ -+ : "memory"); \ -+ __oldval; \ -+ }) -+ -+#define __arch_atomic_exchange_and_add_32(mem, value) \ -+ ({ \ -+ __typeof__(*(mem)) __oldval, __tmp; \ -+ __asm__ __volatile__( \ -+ "/* __arch_atomic_exchange_and_add_32 */\n" \ -+ "1: ssrf 5\n" \ -+ " ld.w %[old], %[m]\n" \ -+ " add %[tmp], %[old], %[val]\n" \ -+ " stcond %[m], %[tmp]\n" \ -+ " brne 1b" \ -+ : [old] "=&r"(__oldval), [tmp] "=&r"(__tmp), \ -+ [m] "=m"(*(mem)) \ -+ : "m"(*(mem)), [val] "r"(value) \ -+ : "memory", "cc"); \ -+ __oldval; \ -+ }) -+ -+#define __arch_atomic_decrement_if_positive_32(mem) \ -+ ({ \ -+ __typeof__(*(mem)) __oldval, __tmp; \ -+ __asm__ __volatile__( \ -+ "/* __arch_atomic_decrement_if_positive_32 */\n" \ -+ "1: ssrf 5\n" \ -+ " ld.w %[old], %[m]\n" \ -+ " sub %[tmp], %[old], 1\n" \ -+ " brlt 2f\n" \ -+ " stcond %[m], %[tmp]\n" \ -+ " brne 1b" \ -+ "2:" \ -+ : [old] "=&r"(__oldval), [tmp] "=&r"(__tmp), \ -+ [m] "=m"(*(mem)) \ -+ : "m"(*(mem)) \ -+ : "memory", "cc"); \ -+ __oldval; \ -+ }) -+ -+#define atomic_exchange_acq(mem, newval) \ -+ ({ \ -+ if (sizeof(*(mem)) != 4) \ -+ abort(); \ -+ __arch_exchange_32_acq(mem, newval); \ -+ }) -+ -+#define atomic_exchange_and_add(mem, newval) \ -+ ({ \ -+ if (sizeof(*(mem)) != 4) \ -+ abort(); \ -+ __arch_atomic_exchange_and_add_32(mem, newval); \ -+ }) -+ -+#define atomic_decrement_if_positive(mem) \ -+ ({ \ -+ if (sizeof(*(mem)) != 4) \ -+ abort(); \ -+ __arch_atomic_decrement_if_positive_32(mem); \ -+ }) -+ -+#endif /* _AVR32_BITS_ATOMIC_H */ -diff --git a/libc/sysdeps/linux/avr32/bits/byteswap.h b/libc/sysdeps/linux/avr32/bits/byteswap.h -new file mode 100644 -index 0000000..1c030b9 ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/bits/byteswap.h -@@ -0,0 +1,70 @@ -+/* -+ * Copyright (C) 2005 Atmel Corporation -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ */ -+ -+#if !defined _BYTESWAP_H && !defined _NETINET_IN_H -+# error "Never use directly; include instead." -+#endif -+ -+#ifndef _BITS_BYTESWAP_H -+#define _BITS_BYTESWAP_H 1 -+ -+/* Swap bytes in 16 bit value. */ -+#if defined __GNUC__ -+# define __bswap_16(x) (__extension__ __builtin_bswap_16(x)) -+#else -+/* This is better than nothing. */ -+static __inline unsigned short int -+__bswap_16 (unsigned short int __bsx) -+{ -+ return ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8)); -+} -+#endif -+ -+/* Swap bytes in 32 bit value. */ -+#if defined __GNUC__ -+# define __bswap_32(x) (__extension__ __builtin_bswap_32(x)) -+#else -+static __inline unsigned int -+__bswap_32 (unsigned int __bsx) -+{ -+ return ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | -+ (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); -+} -+#endif -+ -+#if defined __GNUC__ -+/* Swap bytes in 64 bit value. */ -+# define __bswap_constant_64(x) \ -+ ((((x) & 0xff00000000000000ull) >> 56) \ -+ | (((x) & 0x00ff000000000000ull) >> 40) \ -+ | (((x) & 0x0000ff0000000000ull) >> 24) \ -+ | (((x) & 0x000000ff00000000ull) >> 8) \ -+ | (((x) & 0x00000000ff000000ull) << 8) \ -+ | (((x) & 0x0000000000ff0000ull) << 24) \ -+ | (((x) & 0x000000000000ff00ull) << 40) \ -+ | (((x) & 0x00000000000000ffull) << 56)) -+ -+# define __bswap_64(x) \ -+ (__extension__ \ -+ ({ \ -+ union { \ -+ __extension__ unsigned long long int __ll; \ -+ unsigned int __l[2]; \ -+ } __w, __r; \ -+ if (__builtin_constant_p(x)) \ -+ __r.__ll = __bswap_constant_64(x); \ -+ else { \ -+ __w.__ll = (x); \ -+ __r.__l[0] = __bswap_32(__w.__l[1]); \ -+ __r.__l[1] = __bswap_32(__w.__l[0]); \ -+ } \ -+ __r.__ll; \ -+ })) -+#endif -+ -+#endif /* _BITS_BYTESWAP_H */ -diff --git a/libc/sysdeps/linux/avr32/bits/endian.h b/libc/sysdeps/linux/avr32/bits/endian.h -new file mode 100644 -index 0000000..7bb6358 ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/bits/endian.h -@@ -0,0 +1,7 @@ -+/* AVR32 is big-endian */ -+ -+#ifndef _ENDIAN_H -+# error "Never use directly; include instead." -+#endif -+ -+#define __BYTE_ORDER __BIG_ENDIAN -diff --git a/libc/sysdeps/linux/avr32/bits/fcntl.h b/libc/sysdeps/linux/avr32/bits/fcntl.h -new file mode 100644 -index 0000000..1abff17 ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/bits/fcntl.h -@@ -0,0 +1,165 @@ -+#ifndef _FCNTL_H -+# error "Never use directly; include instead." -+#endif -+ -+#include -+ -+/* -+ * open/fcntl - O_SYNC is only implemented on blocks devices and on files -+ * located on an ext2 file system -+ */ -+#define O_ACCMODE 00000003 -+#define O_RDONLY 00000000 -+#define O_WRONLY 00000001 -+#define O_RDWR 00000002 -+#define O_CREAT 00000100 /* not fcntl */ -+#define O_EXCL 00000200 /* not fcntl */ -+#define O_NOCTTY 00000400 /* not fcntl */ -+#define O_TRUNC 00001000 /* not fcntl */ -+#define O_APPEND 00002000 -+#define O_NONBLOCK 00004000 -+#define O_NDELAY O_NONBLOCK -+#define O_SYNC 00010000 -+#define O_ASYNC 00020000 -+ -+#ifdef __USE_GNU -+# define O_DIRECT 00040000 /* must be a directory */ -+# define O_DIRECTORY 00200000 /* direct disk access */ -+# define O_NOFOLLOW 00400000 /* don't follow links */ -+# define O_NOATIME 01000000 /* don't set atime */ -+#endif -+ -+#ifdef __USE_LARGEFILE64 -+# define O_LARGEFILE 00100000 -+#endif -+ -+/* For now Linux has synchronisity options for data and read operations. -+ We define the symbols here but let them do the same as O_SYNC since -+ this is a superset. */ -+#if defined __USE_POSIX199309 || defined __USE_UNIX98 -+# define O_DSYNC O_SYNC /* Synchronize data. */ -+# define O_RSYNC O_SYNC /* Synchronize read operations. */ -+#endif -+ -+#define F_DUPFD 0 /* dup */ -+#define F_GETFD 1 /* get close_on_exec */ -+#define F_SETFD 2 /* set/clear close_on_exec */ -+#define F_GETFL 3 /* get file->f_flags */ -+#define F_SETFL 4 /* set file->f_flags */ -+ -+#ifndef __USE_FILE_OFFSET64 -+# define F_GETLK 5 -+# define F_SETLK 6 -+# define F_SETLKW 7 -+#else -+# define F_GETLK F_GETLK64 -+# define F_SETLK F_SETLK64 -+# define F_SETLKW F_SETLKW64 -+#endif -+#define F_GETLK64 12 /* using 'struct flock64' */ -+#define F_SETLK64 13 -+#define F_SETLKW64 14 -+ -+#if defined __USE_BSD || defined __USE_XOPEN2K -+# define F_SETOWN 8 /* for sockets. */ -+# define F_GETOWN 9 /* for sockets. */ -+#endif -+ -+#ifdef __USE_GNU -+# define F_SETSIG 10 /* for sockets. */ -+# define F_GETSIG 11 /* for sockets. */ -+#endif -+ -+#ifdef __USE_GNU -+# define F_SETLEASE 1024 /* Set a lease. */ -+# define F_GETLEASE 1025 /* Enquire what lease is active. */ -+# define F_NOTIFY 1026 /* Request notfications on a directory. */ -+#endif -+ -+/* for F_[GET|SET]FL */ -+#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ -+ -+/* for posix fcntl() and lockf() */ -+#define F_RDLCK 0 -+#define F_WRLCK 1 -+#define F_UNLCK 2 -+ -+/* for old implementation of bsd flock () */ -+#define F_EXLCK 4 /* or 3 */ -+#define F_SHLCK 8 /* or 4 */ -+ -+/* for leases */ -+#define F_INPROGRESS 16 -+ -+#ifdef __USE_BSD -+/* operations for bsd flock(), also used by the kernel implementation */ -+# define LOCK_SH 1 /* shared lock */ -+# define LOCK_EX 2 /* exclusive lock */ -+# define LOCK_NB 4 /* or'd with one of the above to prevent -+ blocking */ -+# define LOCK_UN 8 /* remove lock */ -+#endif -+ -+#ifdef __USE_GNU -+# define LOCK_MAND 32 /* This is a mandatory flock */ -+# define LOCK_READ 64 /* ... Which allows concurrent -+ read operations */ -+# define LOCK_WRITE 128 /* ... Which allows concurrent -+ write operations */ -+# define LOCK_RW 192 /* ... Which allows concurrent -+ read & write ops */ -+#endif -+ -+#ifdef __USE_GNU -+/* Types of directory notifications that may be requested with F_NOTIFY. */ -+# define DN_ACCESS 0x00000001 /* File accessed. */ -+# define DN_MODIFY 0x00000002 /* File modified. */ -+# define DN_CREATE 0x00000004 /* File created. */ -+# define DN_DELETE 0x00000008 /* File removed. */ -+# define DN_RENAME 0x00000010 /* File renamed. */ -+# define DN_ATTRIB 0x00000020 /* File changed attibutes. */ -+# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ -+#endif -+ -+struct flock { -+ short l_type; -+ short l_whence; -+#ifndef __USE_FILE_OFFSET64 -+ __off_t l_start; -+ __off_t l_len; -+#else -+ __off64_t l_start; -+ __off64_t l_len; -+#endif -+ __pid_t l_pid; -+}; -+ -+#ifdef __USE_LARGEFILE64 -+struct flock64 { -+ short l_type; -+ short l_whence; -+ __off64_t l_start; -+ __off64_t l_len; -+ __pid_t l_pid; -+}; -+#endif -+ -+/* Define some more compatibility macros to be backward compatible with -+ * BSD systems which did not managed to hide these kernel macros. */ -+#ifdef __USE_BSD -+# define FAPPEND O_APPEND -+# define FFSYNC O_FSYNC -+# define FASYNC O_ASYNC -+# define FNONBLOCK O_NONBLOCK -+# define FNDELAY O_NDELAY -+#endif /* Use BSD. */ -+ -+/* Advise to `posix_fadvise'. */ -+#ifdef __USE_XOPEN2K -+# define POSIX_FADV_NORMAL 0 /* No further special treatment. */ -+# define POSIX_FADV_RANDOM 1 /* Expect random page references. */ -+# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ -+# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ -+# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ -+# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ -+#endif -diff --git a/libc/sysdeps/linux/avr32/bits/kernel_stat.h b/libc/sysdeps/linux/avr32/bits/kernel_stat.h -new file mode 100644 -index 0000000..f97d23b ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/bits/kernel_stat.h -@@ -0,0 +1,67 @@ -+#ifndef _BITS_STAT_STRUCT_H -+#define _BITS_STAT_STRUCT_H -+ -+#ifndef _LIBC -+#error bits/kernel_stat.h is for internal uClibc use only! -+#endif -+ -+/* -+ * This file provides struct stat, taken from kernel 2.6.4. Verified -+ * to match kernel 2.6.22. -+ */ -+ -+struct kernel_stat { -+ unsigned long st_dev; -+ unsigned long st_ino; -+ unsigned short st_mode; -+ unsigned short st_nlink; -+ unsigned short st_uid; -+ unsigned short st_gid; -+ unsigned long st_rdev; -+ unsigned long st_size; -+ unsigned long st_blksize; -+ unsigned long st_blocks; -+ unsigned long st_atime; -+ unsigned long st_atime_nsec; -+ unsigned long st_mtime; -+ unsigned long st_mtime_nsec; -+ unsigned long st_ctime; -+ unsigned long st_ctime_nsec; -+ unsigned long __unused4; -+ unsigned long __unused5; -+}; -+ -+#define STAT_HAVE_NSEC 1 -+ -+struct kernel_stat64 { -+ unsigned long long st_dev; -+ -+ unsigned long long st_ino; -+ unsigned int st_mode; -+ unsigned int st_nlink; -+ -+ unsigned long st_uid; -+ unsigned long st_gid; -+ -+ unsigned long long st_rdev; -+ -+ long long st_size; -+ unsigned long __pad1; -+ unsigned long st_blksize; -+ -+ unsigned long long st_blocks; -+ -+ unsigned long st_atime; -+ unsigned long st_atime_nsec; -+ -+ unsigned long st_mtime; -+ unsigned long st_mtime_nsec; -+ -+ unsigned long st_ctime; -+ unsigned long st_ctime_nsec; -+ -+ unsigned long __unused1; -+ unsigned long __unused2; -+}; -+ -+#endif /* _BITS_STAT_STRUCT_H */ -diff --git a/libc/sysdeps/linux/avr32/bits/kernel_types.h b/libc/sysdeps/linux/avr32/bits/kernel_types.h -new file mode 100644 -index 0000000..f7d8b52 ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/bits/kernel_types.h -@@ -0,0 +1,55 @@ -+/* Note that we use the exact same include guard #define names -+ * as asm/posix_types.h. This will avoid gratuitous conflicts -+ * with the posix_types.h kernel header, and will ensure that -+ * our private content, and not the kernel header, will win. -+ * -Erik -+ */ -+#ifndef __ASM_AVR32_POSIX_TYPES_H -+#define __ASM_AVR32_POSIX_TYPES_H -+ -+/* -+ * This file is generally used by user-level software, so you need to -+ * be a little careful about namespace pollution etc. Also, we cannot -+ * assume GCC is being used. -+ */ -+ -+typedef unsigned long __kernel_dev_t; -+typedef unsigned long __kernel_ino_t; -+typedef unsigned short __kernel_mode_t; -+typedef unsigned short __kernel_nlink_t; -+typedef long __kernel_off_t; -+typedef int __kernel_pid_t; -+typedef unsigned short __kernel_ipc_pid_t; -+typedef unsigned int __kernel_uid_t; -+typedef unsigned int __kernel_gid_t; -+typedef unsigned long __kernel_size_t; -+typedef long __kernel_ssize_t; -+typedef int __kernel_ptrdiff_t; -+typedef long __kernel_time_t; -+typedef long __kernel_suseconds_t; -+typedef long __kernel_clock_t; -+typedef int __kernel_timer_t; -+typedef int __kernel_clockid_t; -+typedef int __kernel_daddr_t; -+typedef char * __kernel_caddr_t; -+typedef unsigned short __kernel_uid16_t; -+typedef unsigned short __kernel_gid16_t; -+typedef unsigned int __kernel_uid32_t; -+typedef unsigned int __kernel_gid32_t; -+typedef unsigned short __kernel_old_uid_t; -+typedef unsigned short __kernel_old_gid_t; -+typedef unsigned short __kernel_old_dev_t; -+ -+#ifdef __GNUC__ -+typedef long long __kernel_loff_t; -+#endif -+ -+typedef struct { -+#if defined(__USE_ALL) -+ int val[2]; -+#else -+ int __val[2]; -+#endif -+} __kernel_fsid_t; -+ -+#endif /* __ASM_AVR32_POSIX_TYPES_H */ -diff --git a/libc/sysdeps/linux/avr32/bits/mman.h b/libc/sysdeps/linux/avr32/bits/mman.h -new file mode 100644 -index 0000000..5f6e3c3 ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/bits/mman.h -@@ -0,0 +1,103 @@ -+/* Definitions for POSIX memory map interface. Linux/AVR32 version. -+ Copyright (C) 1997, 2000 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#ifndef _SYS_MMAN_H -+# error "Never include this file directly. Use instead" -+#endif -+ -+/* The following definitions basically come from the kernel headers. -+ But the kernel header is not namespace clean. */ -+ -+ -+/* Protections are chosen from these bits, OR'd together. The -+ implementation does not necessarily support PROT_EXEC or PROT_WRITE -+ without PROT_READ. The only guarantees are that no writing will be -+ allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ -+ -+#define PROT_READ 0x1 /* Page can be read. */ -+#define PROT_WRITE 0x2 /* Page can be written. */ -+#define PROT_EXEC 0x4 /* Page can be executed. */ -+#define PROT_NONE 0x0 /* Page can not be accessed. */ -+#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of -+ growsdown vma (mprotect only). */ -+#define PROT_GROWSUP 0x02000000 /* Extend change to start of -+ growsup vma (mprotect only). */ -+ -+/* Sharing types (must choose one and only one of these). */ -+#define MAP_SHARED 0x01 /* Share changes. */ -+#define MAP_PRIVATE 0x02 /* Changes are private. */ -+#ifdef __USE_MISC -+# define MAP_TYPE 0x0f /* Mask for type of mapping. */ -+#endif -+ -+/* Other flags. */ -+#define MAP_FIXED 0x10 /* Interpret addr exactly. */ -+#ifdef __USE_MISC -+# define MAP_FILE 0 -+# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ -+# define MAP_ANON MAP_ANONYMOUS -+#endif -+ -+/* These are Linux-specific. */ -+#ifdef __USE_MISC -+# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */ -+# define MAP_DENYWRITE 0x0800 /* ETXTBSY */ -+# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */ -+# define MAP_LOCKED 0x2000 /* Lock the mapping. */ -+# define MAP_NORESERVE 0x4000 /* Don't check for reservations. */ -+# define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ -+# define MAP_NONBLOCK 0x10000 /* do not block on IO */ -+#endif -+ -+/* Flags to `msync'. */ -+#define MS_ASYNC 1 /* Sync memory asynchronously. */ -+#define MS_SYNC 4 /* Synchronous memory sync. */ -+#define MS_INVALIDATE 2 /* Invalidate the caches. */ -+ -+/* Flags for `mlockall'. */ -+#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ -+#define MCL_FUTURE 2 /* Lock all additions to address -+ space. */ -+ -+/* Flags for `mremap'. */ -+#ifdef __USE_GNU -+# define MREMAP_MAYMOVE 1 -+# define MREMAP_FIXED 2 -+#endif -+ -+/* Advise to `madvise'. */ -+#ifdef __USE_BSD -+# define MADV_NORMAL 0 /* No further special treatment. */ -+# define MADV_RANDOM 1 /* Expect random page references. */ -+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -+# define MADV_WILLNEED 3 /* Will need these pages. */ -+# define MADV_DONTNEED 4 /* Don't need these pages. */ -+# define MADV_REMOVE 9 /* Remove these pages and resources. */ -+# define MADV_DONTFORK 10 /* Do not inherit across fork. */ -+# define MADV_DOFORK 11 /* Do inherit across fork. */ -+#endif -+ -+/* The POSIX people had to invent similar names for the same things. */ -+#ifdef __USE_XOPEN2K -+# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ -+# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ -+# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ -+# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ -+# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ -+#endif -diff --git a/libc/sysdeps/linux/avr32/bits/setjmp.h b/libc/sysdeps/linux/avr32/bits/setjmp.h -new file mode 100644 -index 0000000..78348a3 ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/bits/setjmp.h -@@ -0,0 +1,30 @@ -+/* -+ * Copyright (C) 2004-2005 Atmel Corporation -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ */ -+#ifndef _BITS_SETJMP_H -+#define _BITS_SETJMP_H 1 -+ -+#if !defined _SETJMP_H && !defined _PTHREAD_H -+# error "Never include directly; use instead." -+#endif -+ -+#ifndef _ASM -+/* -+ * The jump buffer contains r0-r7, sr, sp and lr. Other registers are -+ * not saved. -+ */ -+typedef int __jmp_buf[11]; -+#endif -+ -+#define __JMP_BUF_SP 4 -+ -+/* Test if longjmp to JMPBUF would unwind the frame containing a local -+ variable at ADDRESS. */ -+#define _JMPBUF_UNWINDS(jmpbuf, address) \ -+ ((void *)(address) < (void *)(jmpbuf[__JMP_BUF_SP])) -+ -+#endif /* _BITS_SETJMP_H */ -diff --git a/libc/sysdeps/linux/avr32/bits/stackinfo.h b/libc/sysdeps/linux/avr32/bits/stackinfo.h -new file mode 100644 -index 0000000..29b8452 ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/bits/stackinfo.h -@@ -0,0 +1,28 @@ -+/* Copyright (C) 1999 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+/* This file contains a bit of information about the stack allocation -+ of the processor. */ -+ -+#ifndef _STACKINFO_H -+#define _STACKINFO_H 1 -+ -+/* On AVR32 the stack grows down. */ -+#define _STACK_GROWS_DOWN 1 -+ -+#endif /* stackinfo.h */ -diff --git a/libc/sysdeps/linux/avr32/bits/syscalls.h b/libc/sysdeps/linux/avr32/bits/syscalls.h -new file mode 100644 -index 0000000..22ac059 ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/bits/syscalls.h -@@ -0,0 +1,143 @@ -+#ifndef _BITS_SYSCALLS_H -+#define _BITS_SYSCALLS_H -+#ifndef _SYSCALL_H -+# error "Never use directly; include instead." -+#endif -+ -+/* -+ * This includes the `__NR_' syscall numbers taken from the -+ * Linux kernel header files. It also defines the traditional -+ * `SYS_' macros for older programs. -+ */ -+#include -+ -+#ifndef __ASSEMBLER__ -+ -+#include -+ -+#define SYS_ify(syscall_name) (__NR_##syscall_name) -+ -+#undef _syscall0 -+#define _syscall0(type,name) \ -+ type name(void) \ -+ { \ -+ return (type)(INLINE_SYSCALL(name, 0)); \ -+ } -+ -+#undef _syscall1 -+#define _syscall1(type,name,type1,arg1) \ -+ type name(type1 arg1) \ -+ { \ -+ return (type)(INLINE_SYSCALL(name, 1, arg1)); \ -+ } -+ -+#undef _syscall2 -+#define _syscall2(type,name,type1,arg1,type2,arg2) \ -+ type name(type1 arg1, type2 arg2) \ -+ { \ -+ return (type)(INLINE_SYSCALL(name, 2, arg1, arg2)); \ -+ } -+ -+#undef _syscall3 -+#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ -+ type name(type1 arg1, type2 arg2, type3 arg3) \ -+ { \ -+ return (type)(INLINE_SYSCALL(name, 3, arg1, \ -+ arg2, arg3)); \ -+ } -+ -+#undef _syscall4 -+#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3, \ -+ type4,arg4) \ -+ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ -+ { \ -+ return (type)(INLINE_SYSCALL(name, 4, arg1, arg2, \ -+ arg3, arg4)); \ -+ } -+ -+#undef _syscall5 -+#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3, \ -+ type4,arg4,type5,arg5) \ -+ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ -+ type5 arg5) \ -+ { \ -+ return (type)(INLINE_SYSCALL(name, 5, arg1, arg2, \ -+ arg3, arg4, arg5)); \ -+ } -+ -+#undef _syscall6 -+#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3, \ -+ type4,arg4,type5,arg5,type6,arg6) \ -+ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ -+ type5 arg5, type6 arg6) \ -+ { \ -+ return (type)(INLINE_SYSCALL(name, 6, arg1, arg2, arg3, \ -+ arg4, arg5, arg6)); \ -+ } -+ -+#undef unlikely -+#define unlikely(x) __builtin_expect((x), 0) -+ -+#undef INLINE_SYSCALL -+#define INLINE_SYSCALL(name, nr, args...) \ -+ ({ \ -+ unsigned _sys_result = INTERNAL_SYSCALL(name, , nr, args); \ -+ if (unlikely(INTERNAL_SYSCALL_ERROR_P(_sys_result, ))) { \ -+ __set_errno(INTERNAL_SYSCALL_ERRNO(_sys_result, )); \ -+ _sys_result = (unsigned int) -1; \ -+ } \ -+ (int) _sys_result; \ -+ }) -+ -+#undef INTERNAL_SYSCALL_DECL -+#define INTERNAL_SYSCALL_DECL(err) do { } while(0) -+ -+#undef INTERNAL_SYSCALL -+#define INTERNAL_SYSCALL(name, err, nr, args...) \ -+ ({ \ -+ register int _a1 asm ("r12"); \ -+ register int _scno asm("r8") = SYS_ify(name); \ -+ LOAD_ARGS_##nr (args); \ -+ asm volatile ("scall /* syscall " #name " */" \ -+ : "=r" (_a1) \ -+ : "r"(_scno) ASM_ARGS_##nr \ -+ : "cc", "memory"); \ -+ _a1; \ -+ }) -+ -+#undef INTERNAL_SYSCALL_ERROR_P -+#define INTERNAL_SYSCALL_ERROR_P(val, err) \ -+ ((unsigned int)(val) >= 0xfffff001U) -+ -+#undef INTERNAL_SYSCALL_ERRNO -+#define INTERNAL_SYSCALL_ERRNO(val, errr) (-(val)) -+ -+#define LOAD_ARGS_0() do { } while(0) -+#define ASM_ARGS_0 -+#define LOAD_ARGS_1(a1) \ -+ _a1 = (int) (a1); \ -+ LOAD_ARGS_0() -+#define ASM_ARGS_1 ASM_ARGS_0, "r"(_a1) -+#define LOAD_ARGS_2(a1, a2) \ -+ register int _a2 asm("r11") = (int)(a2); \ -+ LOAD_ARGS_1(a1) -+#define ASM_ARGS_2 ASM_ARGS_1, "r"(_a2) -+#define LOAD_ARGS_3(a1, a2, a3) \ -+ register int _a3 asm("r10") = (int)(a3); \ -+ LOAD_ARGS_2(a1, a2) -+#define ASM_ARGS_3 ASM_ARGS_2, "r"(_a3) -+#define LOAD_ARGS_4(a1, a2, a3, a4) \ -+ register int _a4 asm("r9") = (int)(a4); \ -+ LOAD_ARGS_3(a1, a2, a3) -+#define ASM_ARGS_4 ASM_ARGS_3, "r"(_a4) -+#define LOAD_ARGS_5(a1, a2, a3, a4, a5) \ -+ register int _a5 asm("r5") = (int)(a5); \ -+ LOAD_ARGS_4(a1, a2, a3, a4) -+#define ASM_ARGS_5 ASM_ARGS_4, "r"(_a5) -+#define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6) \ -+ register int _a6 asm("r3") = (int)(a6); \ -+ LOAD_ARGS_5(a1, a2, a3, a4, a5) -+#define ASM_ARGS_6 ASM_ARGS_5, "r"(_a6) -+ -+#endif /* __ASSEMBLER__ */ -+#endif /* _BITS_SYSCALLS_H */ -diff --git a/libc/sysdeps/linux/avr32/bits/uClibc_arch_features.h b/libc/sysdeps/linux/avr32/bits/uClibc_arch_features.h -new file mode 100644 -index 0000000..e95e8a5 ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/bits/uClibc_arch_features.h -@@ -0,0 +1,45 @@ -+/* -+ * Track misc arch-specific features that aren't config options -+ */ -+ -+#ifndef _BITS_UCLIBC_ARCH_FEATURES_H -+#define _BITS_UCLIBC_ARCH_FEATURES_H -+ -+/* instruction used when calling abort() to kill yourself */ -+/* trigger illegal instruction exception, same as BUG in Linux */ -+#define __UCLIBC_ABORT_INSTRUCTION__ ".short 0x5df0" -+ -+/* can your target use syscall6() for mmap ? */ -+#define __UCLIBC_MMAP_HAS_6_ARGS__ -+ -+/* does your target use syscall4() for truncate64 ? (32bit arches only) */ -+#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__ -+ -+/* does your target have a broken create_module() ? */ -+#undef __UCLIBC_BROKEN_CREATE_MODULE__ -+ -+/* does your target have to worry about older [gs]etrlimit() ? */ -+#undef __UCLIBC_HANDLE_OLDER_RLIMIT__ -+ -+/* does your target prefix all symbols with an _ ? */ -+#define __UCLIBC_NO_UNDERSCORES__ -+ -+/* does your target have an asm .set ? */ -+#define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ -+ -+/* define if target doesn't like .global */ -+#undef __UCLIBC_ASM_GLOBAL_DIRECTIVE__ -+ -+/* define if target supports .weak */ -+#define __UCLIBC_HAVE_ASM_WEAK_DIRECTIVE__ -+ -+/* define if target supports .weakext */ -+#undef __UCLIBC_HAVE_ASM_WEAKEXT_DIRECTIVE__ -+ -+/* needed probably only for ppc64 */ -+#undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__ -+ -+/* define if target supports IEEE signed zero floats */ -+#define __UCLIBC_HAVE_SIGNED_ZERO__ -+ -+#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */ -diff --git a/libc/sysdeps/linux/avr32/bits/wordsize.h b/libc/sysdeps/linux/avr32/bits/wordsize.h -new file mode 100644 -index 0000000..1b5842a ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/bits/wordsize.h -@@ -0,0 +1 @@ -+#define __WORDSIZE 32 -diff --git a/libc/sysdeps/linux/avr32/brk.c b/libc/sysdeps/linux/avr32/brk.c -new file mode 100644 -index 0000000..a54b49a ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/brk.c -@@ -0,0 +1,31 @@ -+/* -+ * Copyright (C) 2004-2007 Atmel Corporation -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ */ -+#include -+#include -+#include -+ -+libc_hidden_proto(brk) -+ -+void *__curbrk attribute_hidden = 0; -+ -+int brk (void *addr) -+{ -+ void *newbrk; -+ -+ newbrk = (void *)INLINE_SYSCALL(brk, 1, addr); -+ -+ __curbrk = newbrk; -+ -+ if (newbrk < addr) { -+ __set_errno (ENOMEM); -+ return -1; -+ } -+ -+ return 0; -+} -+libc_hidden_def(brk) -diff --git a/libc/sysdeps/linux/avr32/bsd-_setjmp.S b/libc/sysdeps/linux/avr32/bsd-_setjmp.S -new file mode 100644 -index 0000000..be66a10 ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/bsd-_setjmp.S -@@ -0,0 +1,16 @@ -+/* -+ * Copyright (C) 2004-2007 Atmel Corporation -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ */ -+ -+ /* This just does a tail-call to __sigsetjmp(env, 0) */ -+ .global _setjmp -+ .type _setjmp,"function" -+ .align 1 -+_setjmp: -+ mov r11, 0 -+ bral __GI___sigsetjmp -+ .size _setjmp, . - _setjmp -diff --git a/libc/sysdeps/linux/avr32/bsd-setjmp.S b/libc/sysdeps/linux/avr32/bsd-setjmp.S -new file mode 100644 -index 0000000..4635eeb ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/bsd-setjmp.S -@@ -0,0 +1,16 @@ -+/* -+ * Copyright (C) 2004-2007 Atmel Corporation -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ */ -+ -+ /* This just does a tail-call to __sigsetjmp(env, 1) */ -+ .global setjmp -+ .type setjmp,"function" -+ .align 1 -+setjmp: -+ mov r11, 1 -+ bral __GI___sigsetjmp -+ .size setjmp, . - setjmp -diff --git a/libc/sysdeps/linux/avr32/clone.c b/libc/sysdeps/linux/avr32/clone.c -new file mode 100644 -index 0000000..e43b0f3 ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/clone.c -@@ -0,0 +1,41 @@ -+/* -+ * Copyright (C) 2004 Atmel Corporation -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ */ -+#include -+#include -+#include -+ -+/* -+ * I don't know if we can be absolutely certain that the fn and arg -+ * parameters are preserved when returning as the child. If the -+ * compiler stores them in registers (r0-r7), they should be. -+ */ -+int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) -+{ -+ register int (*_fn)(void *arg) = fn; -+ register void *_arg = arg; -+ int err; -+ -+ /* Sanity check the arguments */ -+ err = -EINVAL; -+ if (!fn) -+ goto syscall_error; -+ if (!child_stack) -+ goto syscall_error; -+ -+ err = INLINE_SYSCALL(clone, 2, flags, child_stack); -+ if (err < 0) -+ goto syscall_error; -+ else if (err != 0) -+ return err; -+ -+ _exit(_fn(_arg)); -+ -+syscall_error: -+ __set_errno (-err); -+ return -1; -+} -diff --git a/libc/sysdeps/linux/avr32/crt1.S b/libc/sysdeps/linux/avr32/crt1.S -new file mode 100644 -index 0000000..ca1fa7a ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/crt1.S -@@ -0,0 +1,97 @@ -+/* -+ * Copyright (C) 2004-2007 Atmel Corporation -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ * -+ * When we enter _start, the stack looks like this: -+ * argc argument counter -+ * argv[0] pointer to program name -+ * argv[1..argc-1] pointers to program args -+ * NULL -+ * env[0..N] pointers to environment variables -+ * NULL -+ * -+ * r12 contains a function pointer to be registered with `atexit'. -+ * This is how the dynamic linker arranges to have DT_FINI functions -+ * called for shared libraries that have been loaded before this -+ * code runs. -+ * -+ * We're going to call the following function: -+ * __uClibc_main(int (*main)(int, char **, char **), int argc, -+ * char **argv, void (*app_init)(void), void (*app_fini)(void), -+ * void (*rtld_fini)(void), void *stack_end) -+ * -+ * So we need to set up things as follows: -+ * r12 = address of main -+ * r11 = argc -+ * r10 = &argv[0] -+ * r9 = address of _init -+ * r8 = address of _fini -+ * sp[0] = whatever we got passed in r12 -+ */ -+ -+#include -+ -+ .text -+ .global _start -+ .type _start, @function -+_start: -+ /* Clear the frame pointer and link register since this is the outermost frame. */ -+ mov r7, 0 -+ mov lr, 0 -+ -+ ld.w r11, sp++ /* argc */ -+ mov r10, sp /* &argv[0] */ -+ -+ st.w --sp, r10 /* stack_end */ -+ st.w --sp, r12 /* rtld_fini */ -+ -+#ifdef __PIC__ -+ lddpc r6, .L_GOT -+.L_RGOT: -+ rsub r6, pc -+ lda.w r9, _init -+ lda.w r8, _fini -+ lda.w r12, main -+ -+ /* Ok, now run uClibc's main() -- should not return */ -+ call __uClibc_main -+ -+ .align 2 -+.L_GOT: -+ .long .L_RGOT - _GLOBAL_OFFSET_TABLE_ -+#else -+ lddpc r9, __init_addr /* app_init */ -+ lddpc r8, __fini_addr /* app_fini */ -+ lddpc r12, __main_addr /* main */ -+ -+ /* Ok, now run uClibc's main() -- should not return */ -+ lddpc pc, ___uClibc_main_addr -+ -+ .align 2 -+__init_addr: -+ .long _init -+__fini_addr: -+ .long _fini -+__main_addr: -+ .long main -+___uClibc_main_addr: -+ .long __uClibc_main -+#endif -+ .size _start, . - _start -+ -+ /* -+ * The LSB says we need this. -+ */ -+ .section ".note.ABI-tag", "a" -+ .align 4 -+ .long 2f - 1f /* namesz */ -+ .long 4f - 3f /* descsz */ -+ .long 1 /* type */ -+1: .asciz "GNU" /* name */ -+2: .align 4 -+3: .long 0 /* Linux executable */ -+ .long 2,6,0 /* Earliest compatible kernel */ -+4: .align 4 -diff --git a/libc/sysdeps/linux/avr32/crti.S b/libc/sysdeps/linux/avr32/crti.S -new file mode 100644 -index 0000000..660f47c ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/crti.S -@@ -0,0 +1,26 @@ -+ -+ .section .init -+ .align 2 -+ .global _init -+ .type _init, @function -+_init: -+ stm --sp, r6, lr -+ lddpc r6, 2f -+1: rsub r6, pc -+ rjmp 3f -+ .align 2 -+2: .long 1b - _GLOBAL_OFFSET_TABLE_ -+3: -+ -+ .section .fini -+ .align 2 -+ .global _fini -+ .type _fini, @function -+_fini: -+ stm --sp, r6, lr -+ lddpc r6, 2f -+1: rsub r6, pc -+ rjmp 3f -+ .align 2 -+2: .long 1b - _GLOBAL_OFFSET_TABLE_ -+3: -diff --git a/libc/sysdeps/linux/avr32/crtn.S b/libc/sysdeps/linux/avr32/crtn.S -new file mode 100644 -index 0000000..f7d1040 ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/crtn.S -@@ -0,0 +1,14 @@ -+ -+ .section .init -+ .align 2 -+ .global _init -+ .type _init, @function -+ ldm sp++, r6, pc -+ .size _init, . - _init -+ -+ .section .fini -+ .align 2 -+ .global _fini -+ .type _fini, @function -+ ldm sp++, r6, pc -+ .size _fini, . - _fini -diff --git a/libc/sysdeps/linux/avr32/mmap.c b/libc/sysdeps/linux/avr32/mmap.c -new file mode 100644 -index 0000000..2ee025a ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/mmap.c -@@ -0,0 +1,33 @@ -+/* -+ * Copyright (C) 2004-2007 Atmel Corporation -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ */ -+ -+#include -+#include -+#include -+#include -+ -+libc_hidden_proto(mmap) -+ -+static _syscall6(__ptr_t, mmap2, __ptr_t, addr, size_t, len, int, prot, -+ int, flags, int, fd, __off_t, pgoff); -+ -+__ptr_t mmap(__ptr_t addr, size_t len, int prot, int flags, int fd, __off_t offset) -+{ -+ unsigned long page_size = sysconf(_SC_PAGESIZE); -+ unsigned long pgoff; -+ -+ if (offset & (page_size - 1)) { -+ __set_errno(EINVAL); -+ return MAP_FAILED; -+ } -+ -+ pgoff = (unsigned long)offset >> (31 - __builtin_clz(page_size)); -+ -+ return mmap2(addr, len, prot, flags, fd, pgoff); -+} -+libc_hidden_def(mmap) -diff --git a/libc/sysdeps/linux/avr32/setjmp.S b/libc/sysdeps/linux/avr32/setjmp.S -new file mode 100644 -index 0000000..7d0354b ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/setjmp.S -@@ -0,0 +1,29 @@ -+/* -+ * Copyright (C) 2004-2007 Atmel Corporation -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ */ -+#define _SETJMP_H -+#define _ASM -+#include -+ -+ .text -+ -+ .global __sigsetjmp -+ .type __sigsetjmp,"function" -+ -+ .align 1 -+__sigsetjmp: -+ mustr r8 -+ stm r12, r0,r1,r2,r3,r4,r5,r6,r7,r8,sp,lr -+ -+ /* -+ * Make a tail call to __sigjmp_save; it takes the same args -+ * and is hidden so we don't need to mess around with the GOT. -+ */ -+ rjmp __sigjmp_save -+ .size __sigsetjmp, . - __sigsetjmp -+ -+libc_hidden_def(__sigsetjmp) -diff --git a/libc/sysdeps/linux/avr32/sigaction.c b/libc/sysdeps/linux/avr32/sigaction.c -new file mode 100644 -index 0000000..a97ff3d ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/sigaction.c -@@ -0,0 +1,59 @@ -+/* -+ * Copyright (C) 2004-2007 Atmel Corporation -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ */ -+#include -+#include -+#include -+#include -+#include -+ -+#define SA_RESTORER 0x04000000 -+extern void __default_rt_sa_restorer(void); -+ -+libc_hidden_proto(memcpy) -+ -+/* -+ * If act is not NULL, change the action for sig to *act. -+ * If oact is not NULL, put the old action for sig in *oact. -+ */ -+int __libc_sigaction(int signum, const struct sigaction *act, -+ struct sigaction *oldact) -+{ -+ struct kernel_sigaction kact, koact; -+ int result; -+ -+ if (act) { -+ kact.k_sa_handler = act->sa_handler; -+ memcpy(&kact.sa_mask, &act->sa_mask, sizeof (kact.sa_mask)); -+ kact.sa_flags = act->sa_flags; -+ if (kact.sa_flags & (SA_RESTORER | SA_ONSTACK)) -+ kact.sa_restorer = act->sa_restorer; -+ else -+ kact.sa_restorer = __default_rt_sa_restorer; -+ kact.sa_flags |= SA_RESTORER; -+ } -+ -+ result = __syscall_rt_sigaction(signum, act ? __ptrvalue(&kact) : NULL, -+ oldact ? __ptrvalue(&koact) : NULL, -+ _NSIG / 8); -+ -+ if (oldact && result >= 0) { -+ oldact->sa_handler = koact.k_sa_handler; -+ memcpy(&oldact->sa_mask, &koact.sa_mask, -+ sizeof(oldact->sa_mask)); -+ oldact->sa_flags = koact.sa_flags; -+ oldact->sa_restorer = koact.sa_restorer; -+ } -+ -+ return result; -+} -+ -+#ifndef LIBC_SIGACTION -+libc_hidden_proto(sigaction) -+weak_alias(__libc_sigaction, sigaction) -+libc_hidden_weak(sigaction) -+#endif -diff --git a/libc/sysdeps/linux/avr32/sigrestorer.S b/libc/sysdeps/linux/avr32/sigrestorer.S -new file mode 100644 -index 0000000..df6a1ba ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/sigrestorer.S -@@ -0,0 +1,15 @@ -+/* -+ * Copyright (C) 2004 Atmel Corporation -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ */ -+#include -+ -+ .global __default_rt_sa_restorer -+ .type __default_rt_sa_restorer,"function" -+ .align 1 -+__default_rt_sa_restorer: -+ mov r8, __NR_rt_sigreturn -+ scall -diff --git a/libc/sysdeps/linux/avr32/sys/elf.h b/libc/sysdeps/linux/avr32/sys/elf.h -new file mode 100644 -index 0000000..faa7310 ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/sys/elf.h -@@ -0,0 +1,26 @@ -+/* Copyright (C) 1996, 1997, 1999, 2001 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#ifndef _SYS_ELF_H -+#define _SYS_ELF_H 1 -+ -+#warning "This header is obsolete; use instead." -+ -+#include -+ -+#endif /* sys/elf.h */ -diff --git a/libc/sysdeps/linux/avr32/sys/procfs.h b/libc/sysdeps/linux/avr32/sys/procfs.h -new file mode 100644 -index 0000000..3b37363 ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/sys/procfs.h -@@ -0,0 +1,123 @@ -+/* Copyright (C) 1996, 1997, 1999, 2001 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#ifndef _SYS_PROCFS_H -+#define _SYS_PROCFS_H 1 -+ -+/* This is somewhat modelled after the file of the same name on SVR4 -+ systems. It provides a definition of the core file format for ELF -+ used on Linux. It doesn't have anything to do with the /proc file -+ system, even though Linux has one. -+ -+ Anyway, the whole purpose of this file is for GDB and GDB only. -+ Don't read too much into it. Don't use it for anything other than -+ GDB unless you know what you are doing. */ -+ -+#include -+#include -+#include -+#include -+ -+__BEGIN_DECLS -+ -+/* Type for a general-purpose register. */ -+typedef unsigned long elf_greg_t; -+ -+/* And the whole bunch of them. We could have used `struct -+ user_regs' directly in the typedef, but tradition says that -+ the register set is an array, which does have some peculiar -+ semantics, so leave it that way. */ -+#define ELF_NGREG (sizeof (struct user_regs) / sizeof(elf_greg_t)) -+typedef elf_greg_t elf_gregset_t[ELF_NGREG]; -+ -+/* Register set for the floating-point registers. */ -+typedef struct user_fpregs elf_fpregset_t; -+ -+/* Signal info. */ -+struct elf_siginfo -+ { -+ int si_signo; /* Signal number. */ -+ int si_code; /* Extra code. */ -+ int si_errno; /* Errno. */ -+ }; -+ -+/* Definitions to generate Intel SVR4-like core files. These mostly -+ have the same names as the SVR4 types with "elf_" tacked on the -+ front to prevent clashes with Linux definitions, and the typedef -+ forms have been avoided. This is mostly like the SVR4 structure, -+ but more Linuxy, with things that Linux does not support and which -+ GDB doesn't really use excluded. */ -+ -+struct elf_prstatus -+ { -+ struct elf_siginfo pr_info; /* Info associated with signal. */ -+ short int pr_cursig; /* Current signal. */ -+ unsigned long int pr_sigpend; /* Set of pending signals. */ -+ unsigned long int pr_sighold; /* Set of held signals. */ -+ __pid_t pr_pid; -+ __pid_t pr_ppid; -+ __pid_t pr_pgrp; -+ __pid_t pr_sid; -+ struct timeval pr_utime; /* User time. */ -+ struct timeval pr_stime; /* System time. */ -+ struct timeval pr_cutime; /* Cumulative user time. */ -+ struct timeval pr_cstime; /* Cumulative system time. */ -+ elf_gregset_t pr_reg; /* GP registers. */ -+ int pr_fpvalid; /* True if math copro being used. */ -+ }; -+ -+ -+#define ELF_PRARGSZ (80) /* Number of chars for args. */ -+ -+struct elf_prpsinfo -+ { -+ char pr_state; /* Numeric process state. */ -+ char pr_sname; /* Char for pr_state. */ -+ char pr_zomb; /* Zombie. */ -+ char pr_nice; /* Nice val. */ -+ unsigned long int pr_flag; /* Flags. */ -+ unsigned short int pr_uid; -+ unsigned short int pr_gid; -+ int pr_pid, pr_ppid, pr_pgrp, pr_sid; -+ /* Lots missing */ -+ char pr_fname[16]; /* Filename of executable. */ -+ char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ -+ }; -+ -+/* The rest of this file provides the types for emulation of the -+ Solaris interfaces that should be implemented by -+ users of libthread_db. */ -+ -+/* Addresses. */ -+typedef void *psaddr_t; -+ -+/* Register sets. Linux has different names. */ -+typedef elf_gregset_t prgregset_t; -+typedef elf_fpregset_t prfpregset_t; -+ -+/* We don't have any differences between processes and threads, -+ therefore have only one PID type. */ -+typedef __pid_t lwpid_t; -+ -+/* Process status and info. In the end we do provide typedefs for them. */ -+typedef struct elf_prstatus prstatus_t; -+typedef struct elf_prpsinfo prpsinfo_t; -+ -+__END_DECLS -+ -+#endif /* sys/procfs.h */ -diff --git a/libc/sysdeps/linux/avr32/sys/ucontext.h b/libc/sysdeps/linux/avr32/sys/ucontext.h -new file mode 100644 -index 0000000..82c7fe2 ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/sys/ucontext.h -@@ -0,0 +1,90 @@ -+/* Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+/* Linux/AVR32 ABI compliant context switching support. */ -+ -+#ifndef _SYS_UCONTEXT_H -+#define _SYS_UCONTEXT_H 1 -+ -+#include -+#include -+#include -+#include -+ -+typedef int greg_t; -+ -+/* Number of general registers. */ -+#define NGREG 16 -+ -+/* Container for all general registers. */ -+typedef elf_gregset_t gregset_t; -+ -+/* Number of each register is the `gregset_t' array. */ -+enum -+{ -+ R0 = 0, -+#define R0 R0 -+ R1 = 1, -+#define R1 R1 -+ R2 = 2, -+#define R2 R2 -+ R3 = 3, -+#define R3 R3 -+ R4 = 4, -+#define R4 R4 -+ R5 = 5, -+#define R5 R5 -+ R6 = 6, -+#define R6 R6 -+ R7 = 7, -+#define R7 R7 -+ R8 = 8, -+#define R8 R8 -+ R9 = 9, -+#define R9 R9 -+ R10 = 10, -+#define R10 R10 -+ R11 = 11, -+#define R11 R11 -+ R12 = 12, -+#define R12 R12 -+ R13 = 13, -+#define R13 R13 -+ R14 = 14, -+#define R14 R14 -+ R15 = 15 -+#define R15 R15 -+}; -+ -+/* Structure to describe FPU registers. */ -+typedef elf_fpregset_t fpregset_t; -+ -+/* Context to describe whole processor state. */ -+typedef struct sigcontext mcontext_t; -+ -+/* Userlevel context. */ -+typedef struct ucontext -+{ -+ unsigned long uc_flags; -+ struct ucontext *uc_link; -+ stack_t uc_stack; -+ mcontext_t uc_mcontext; -+ sigset_t uc_sigmask; /* mask last for extensibility */ -+} ucontext_t; -+ -+#endif /* sys/ucontext.h */ -diff --git a/libc/sysdeps/linux/avr32/sys/user.h b/libc/sysdeps/linux/avr32/sys/user.h -new file mode 100644 -index 0000000..c0b3d38 ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/sys/user.h -@@ -0,0 +1,46 @@ -+#ifndef _SYS_USER_H -+#define _SYS_USER_H -+ -+struct user_fpregs -+{ -+ -+}; -+ -+struct user_regs -+{ -+ unsigned long sr; -+ unsigned long pc; -+ unsigned long lr; -+ unsigned long sp; -+ unsigned long r12; -+ unsigned long r11; -+ unsigned long r10; -+ unsigned long r9; -+ unsigned long r8; -+ unsigned long r7; -+ unsigned long r6; -+ unsigned long r5; -+ unsigned long r4; -+ unsigned long r3; -+ unsigned long r2; -+ unsigned long r1; -+ unsigned long r0; -+ unsigned long r12_orig; -+}; -+ -+struct user -+{ -+ struct user_regs regs; /* general registers */ -+ size_t u_tsize; /* text size (pages) */ -+ size_t u_dsize; /* data size (pages) */ -+ size_t u_ssize; /* stack size (pages) */ -+ unsigned long start_code; /* text starting address */ -+ unsigned long start_data; /* data starting address */ -+ unsigned long start_stack; /* stack starting address */ -+ long int signal; /* signal causing core dump */ -+ struct user_regs * u_ar0; /* help gdb find registers */ -+ unsigned long magic; /* identifies a core file */ -+ char u_comm[32]; /* user command name */ -+}; -+ -+#endif /* _SYS_USER_H */ -diff --git a/libc/sysdeps/linux/avr32/syscall.S b/libc/sysdeps/linux/avr32/syscall.S -new file mode 100644 -index 0000000..55c1b1f ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/syscall.S -@@ -0,0 +1,71 @@ -+/* -+ * Copyright (C) 2004-2007 Atmel Corporation -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ */ -+#include -+ -+ .text -+ -+ /* -+ * long int syscall(long int sysno, ...) -+ */ -+ .global syscall -+ .type syscall, @function -+ .align 2 -+syscall: -+ stm --sp, r3,r5,r6,lr -+ sub lr, sp, -16 -+ mov r8, r12 -+ ldm lr, r3,r5,r9-r12 -+ scall -+ cp.w r12, -4095 -+ brlo .Ldone -+ -+#ifdef __PIC__ -+ lddpc r6, .Lgot -+.Lgotcalc: -+ rsub r6, pc -+# ifdef __UCLIBC_HAS_THREADS__ -+ rsub r3, r12, 0 -+ mcall r6[__errno_location@got] -+ st.w r12[0], r3 -+# else -+ ld.w r3, r6[errno@got] -+ neg r12 -+ st.w r3[0], r12 -+# endif -+#else -+# ifdef __UCLIBC_HAS_THREADS__ -+ rsub r3, r12, 0 -+ mcall .Lerrno_location -+ st.w r12[0], r3 -+# else -+ lddpc r3, .Lerrno -+ neg r12 -+ st.w r3[0], r12 -+# endif -+#endif -+ mov r12, -1 -+ -+.Ldone: -+ ldm sp++, r3,r5,r6,pc -+ -+ .align 2 -+#ifdef __PIC__ -+.Lgot: -+ .long .Lgotcalc - _GLOBAL_OFFSET_TABLE_ -+#else -+# ifdef __UCLIBC_HAS_THREADS__ -+.Lerrno_location: -+ .long __errno_location -+# else -+.Lerrno: -+ .long errno -+# endif -+#endif -+ -+ -+ .size syscall, . - syscall -diff --git a/libc/sysdeps/linux/avr32/vfork.S b/libc/sysdeps/linux/avr32/vfork.S -new file mode 100644 -index 0000000..03ca99f ---- /dev/null -+++ b/libc/sysdeps/linux/avr32/vfork.S -@@ -0,0 +1,58 @@ -+/* -+ * Copyright (C) 2005 Atmel Corporation -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ */ -+ -+/* -+ * Clone the process without copying the address space. The -+ * calling process is suspended until the child either exits -+ * or calls execve. -+ * -+ * This all means that we cannot rely on the stack to store -+ * away registers, since they will be overwritten by the child -+ * as soon as it makes another function call (e.g. execve()). -+ * Fortunately, the Linux kernel preserves LR across system calls. -+ */ -+ -+#include -+#include -+ -+ .global __vfork -+ .type __vfork,@function -+ .align 1 -+__vfork: -+ mov r8, __NR_vfork -+ scall -+ cp.w r12, -4096 -+ retls r12 -+ -+ /* vfork failed, so we may use the stack freely */ -+ pushm r4-r7,lr -+#ifdef __PIC__ -+ lddpc r6, .L_GOT -+ rsub r4, r12, 0 -+.L_RGOT: -+ rsub r6, pc -+ mcall r6[__errno_location@got] -+#else -+ rsub r4, r12, 0 -+ mcall .L__errno_location -+#endif -+ st.w r12[0], r4 -+ popm r4-r7,pc,r12=-1 -+ -+ .align 2 -+#ifdef __PIC__ -+.L_GOT: -+ .long .L_RGOT - _GLOBAL_OFFSET_TABLE_ -+#else -+.L__errno_location: -+ .long __errno_location -+#endif -+ .size __vfork, . - __vfork -+ -+weak_alias(__vfork,vfork) -+libc_hidden_weak(vfork) -diff --git a/libpthread/linuxthreads.old/sysdeps/avr32/pt-machine.h b/libpthread/linuxthreads.old/sysdeps/avr32/pt-machine.h -new file mode 100644 -index 0000000..eccf329 ---- /dev/null -+++ b/libpthread/linuxthreads.old/sysdeps/avr32/pt-machine.h -@@ -0,0 +1,73 @@ -+/* Machine-dependent pthreads configuration and inline functions. -+ * -+ * Copyright (C) 2005-2007 Atmel Corporation -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ */ -+#ifndef _PT_MACHINE_H -+#define _PT_MACHINE_H 1 -+ -+#include -+ -+static inline int -+_test_and_set (int *p, int v) -+{ -+ int result; -+ -+ __asm__ __volatile__( -+ "/* Inline test and set */\n" -+ " xchg %[old], %[mem], %[new]" -+ : [old] "=&r"(result) -+ : [mem] "r"(p), [new] "r"(v) -+ : "memory"); -+ -+ return result; -+} -+ -+#ifndef PT_EI -+# define PT_EI extern inline -+#endif -+ -+extern long int testandset (int *spinlock); -+extern int __compare_and_swap (long int *p, long int oldval, long int newval); -+ -+/* Spinlock implementation; required. */ -+PT_EI long int -+testandset (int *spinlock) -+{ -+ return _test_and_set(spinlock, 1); -+} -+ -+ -+/* Get some notion of the current stack. Need not be exactly the top -+ of the stack, just something somewhere in the current frame. */ -+#define CURRENT_STACK_FRAME stack_pointer -+register char * stack_pointer __asm__ ("sp"); -+ -+/* Compare-and-swap for semaphores. */ -+ -+#define HAS_COMPARE_AND_SWAP -+PT_EI int -+__compare_and_swap(long int *p, long int oldval, long int newval) -+{ -+ long int result; -+ -+ __asm__ __volatile__( -+ "/* Inline compare and swap */\n" -+ "1: ssrf 5\n" -+ " ld.w %[result], %[mem]\n" -+ " eor %[result], %[old]\n" -+ " brne 2f\n" -+ " stcond %[mem], %[new]\n" -+ " brne 1b\n" -+ "2:" -+ : [result] "=&r"(result), [mem] "=m"(*p) -+ : "m"(*p), [new] "r"(newval), [old] "r"(oldval) -+ : "cc", "memory"); -+ -+ return result == 0; -+} -+ -+#endif /* pt-machine.h */ -diff --git a/libpthread/linuxthreads/sysdeps/avr32/pt-machine.h b/libpthread/linuxthreads/sysdeps/avr32/pt-machine.h -new file mode 100644 -index 0000000..fe12bf8 ---- /dev/null -+++ b/libpthread/linuxthreads/sysdeps/avr32/pt-machine.h -@@ -0,0 +1,73 @@ -+/* Machine-dependent pthreads configuration and inline functions. -+ * -+ * Copyright (C) 2005-2007 Atmel Corporation -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ */ -+#ifndef _PT_MACHINE_H -+#define _PT_MACHINE_H 1 -+ -+#include -+ -+static inline int -+_test_and_set (int *p, int v) __THROW -+{ -+ int result; -+ -+ __asm__ __volatile__( -+ "/* Inline test and set */\n" -+ " xchg %[old], %[mem], %[new]" -+ : [old] "=&r"(result) -+ : [mem] "r"(p), [new] "r"(v) -+ : "memory"); -+ -+ return result; -+} -+ -+#ifndef PT_EI -+# define PT_EI extern inline -+#endif -+ -+extern long int testandset (int *spinlock); -+extern int __compare_and_swap (long int *p, long int oldval, long int newval); -+ -+/* Spinlock implementation; required. */ -+PT_EI long int -+testandset (int *spinlock) -+{ -+ return _test_and_set(spinlock, 1); -+} -+ -+ -+/* Get some notion of the current stack. Need not be exactly the top -+ of the stack, just something somewhere in the current frame. */ -+#define CURRENT_STACK_FRAME stack_pointer -+register char * stack_pointer __asm__ ("sp"); -+ -+/* Compare-and-swap for semaphores. */ -+ -+#define HAS_COMPARE_AND_SWAP -+PT_EI int -+__compare_and_swap(long int *p, long int oldval, long int newval) -+{ -+ int result; -+ -+ __asm__ __volatile__( -+ "/* Inline compare and swap */\n" -+ "1: ssrf 5\n" -+ " ld.w %[result], %[mem]\n" -+ " eor %[result], %[old]\n" -+ " brne 2f\n" -+ " stcond %[mem], %[new]\n" -+ " brne 1b\n" -+ "2:" -+ : [result] "=&r"(result), [mem] "=m"(*p) -+ : "m"(*p), [new] "r"(newval), [old] "r"(oldval) -+ : "cc", "memory"); -+ -+ return result == 0; -+} -+ -+#endif /* pt-machine.h */ -diff --git a/utils/ldd.c b/utils/ldd.c -index 75ad628..e34acd9 100644 ---- a/utils/ldd.c -+++ b/utils/ldd.c -@@ -44,6 +44,11 @@ - #define ELFCLASSM ELFCLASS32 - #endif - -+#if defined(__avr32__) -+#define MATCH_MACHINE(x) (x == EM_AVR32) -+#define ELFCLASSM ELFCLASS32 -+#endif -+ - #if defined(__s390__) - #define MATCH_MACHINE(x) (x == EM_S390) - #define ELFCLASSM ELFCLASS32 diff --git a/toolchain/uClibc/uClibc-0.9.29-conditional-sched_affinity.patch b/toolchain/uClibc/uClibc-0.9.29-conditional-sched_affinity.patch deleted file mode 100644 index 509c42af52..0000000000 --- a/toolchain/uClibc/uClibc-0.9.29-conditional-sched_affinity.patch +++ /dev/null @@ -1,53 +0,0 @@ -diff -ur uClibc-0.9.29/libc/sysdeps/linux/common/sched_getaffinity.c uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_getaffinity.c ---- uClibc-0.9.29/libc/sysdeps/linux/common/sched_getaffinity.c 2007-02-12 16:52:32.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_getaffinity.c 2007-05-09 18:05:09.397411811 -0500 -@@ -29,6 +29,7 @@ - #include - #include - -+#ifdef __NR_sched_getaffinity - libc_hidden_proto(memset) - - #define __NR___syscall_sched_getaffinity __NR_sched_getaffinity -@@ -48,5 +49,15 @@ - } - return res; - } -+#else -+/* -+int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *cpuset) -+{ -+ __set_errno(ENOSYS); -+ return -1; -+} -+*/ - #endif - #endif -+ -+#endif -diff -ur uClibc-0.9.29/libc/sysdeps/linux/common/sched_setaffinity.c uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_setaffinity.c ---- uClibc-0.9.29/libc/sysdeps/linux/common/sched_setaffinity.c 2007-02-12 16:52:32.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_setaffinity.c 2007-05-09 18:05:09.397411811 -0500 -@@ -31,6 +31,7 @@ - #include - #include - -+#ifdef __NR_sched_setaffinity - libc_hidden_proto(getpid) - - #define __NR___syscall_sched_setaffinity __NR_sched_setaffinity -@@ -74,5 +75,14 @@ - - return INLINE_SYSCALL (sched_setaffinity, 3, pid, cpusetsize, cpuset); - } -+#else -+/* -+int sched_setaffinity(pid_t pid, size_t cpusetsize, const cpu_set_t *cpuset) -+{ -+ __set_errno(ENOSYS); -+ return -1; -+} -+*/ -+#endif - #endif - #endif diff --git a/toolchain/uClibc/uClibc-0.9.29-filter-gnu99-from-assembly-flags.patch b/toolchain/uClibc/uClibc-0.9.29-filter-gnu99-from-assembly-flags.patch deleted file mode 100644 index d1a7e3ac41..0000000000 --- a/toolchain/uClibc/uClibc-0.9.29-filter-gnu99-from-assembly-flags.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur uClibc-0.9.29/Makerules uClibc-0.9.29-patched/Makerules ---- uClibc-0.9.29/Makerules 2006-12-10 18:25:23.000000000 -0600 -+++ uClibc-0.9.29-patched/Makerules 2008-01-26 17:04:50.965699518 -0600 -@@ -96,7 +96,7 @@ - disp_ld = $($(DISP)_disp_ld) - - cmd_compile.c = $(CC) -c $< -o $@ $(CFLAGS) $(ARCH_CFLAGS) $(CFLAGS-$(suffix $@)) $(filter-out $(CFLAGS-OMIT-$(notdir $<)),$(CFLAGS-$(notdir $(^D)))) $(CFLAGS-$(subst $(top_srcdir),,$(dir $<))) $(CFLAGS-$(notdir $<)) $(CFLAGS-$(notdir $@)) --cmd_compile.S = $(cmd_compile.c) -D__ASSEMBLER__ $(ASFLAGS) $(ARCH_ASFLAGS) $(ASFLAGS-$(suffix $@)) $(ASFLAGS-$(notdir $<)) $(ASFLAGS-$(notdir $@)) -+cmd_compile.S = $(filter-out -std=gnu99, $(cmd_compile.c)) -D__ASSEMBLER__ $(ASFLAGS) $(ARCH_ASFLAGS) $(ASFLAGS-$(suffix $@)) $(ASFLAGS-$(notdir $<)) $(ASFLAGS-$(notdir $@)) - cmd_compile.m = $(cmd_compile.c) -DL_$(patsubst %$(suffix $(notdir $@)),%,$(notdir $@)) - cmd_compile-m = $(CC) $^ -c -o $@ $(CFLAGS) $(ARCH_CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(notdir $(@D))) $(CFLAGS-$(notdir $@)) - cmd_strip = $(STRIPTOOL) $(STRIP_FLAGS) $^ diff --git a/toolchain/uClibc/uClibc-0.9.29-fix-fget_putc.diff b/toolchain/uClibc/uClibc-0.9.29-fix-fget_putc.diff deleted file mode 100644 index 15d61490b3..0000000000 --- a/toolchain/uClibc/uClibc-0.9.29-fix-fget_putc.diff +++ /dev/null @@ -1,396 +0,0 @@ -diff -ur uClibc-0.9.29/libc/inet/rpc/rcmd.c uClibc-0.9.29-patched/libc/inet/rpc/rcmd.c ---- uClibc-0.9.29/libc/inet/rpc/rcmd.c 2007-01-10 11:46:19.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/inet/rpc/rcmd.c 2007-05-09 18:05:21.638421151 -0500 -@@ -126,7 +126,7 @@ - libc_hidden_proto(listen) - libc_hidden_proto(sigsetmask) - libc_hidden_proto(getc_unlocked) --libc_hidden_proto(__fgetc_unlocked) -+//libc_hidden_proto(fgetc_unlocked) - libc_hidden_proto(fopen) - libc_hidden_proto(fclose) - libc_hidden_proto(fprintf) -diff -ur uClibc-0.9.29/libc/inet/rpc/ruserpass.c uClibc-0.9.29-patched/libc/inet/rpc/ruserpass.c ---- uClibc-0.9.29/libc/inet/rpc/ruserpass.c 2006-03-23 05:14:16.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/inet/rpc/ruserpass.c 2007-05-09 18:05:21.638421151 -0500 -@@ -63,7 +63,7 @@ - libc_hidden_proto(fopen) - libc_hidden_proto(fclose) - libc_hidden_proto(getc_unlocked) --libc_hidden_proto(__fgetc_unlocked) -+//libc_hidden_proto(__fgetc_unlocked) - - #define _(X) (X) - /* #include "ftp_var.h" */ -diff -ur uClibc-0.9.29/libc/misc/error/error.c uClibc-0.9.29-patched/libc/misc/error/error.c ---- uClibc-0.9.29/libc/misc/error/error.c 2006-05-04 09:44:13.000000000 -0500 -+++ uClibc-0.9.29-patched/libc/misc/error/error.c 2007-05-09 18:05:21.646421810 -0500 -@@ -30,11 +30,14 @@ - libc_hidden_proto(strerror) - libc_hidden_proto(fprintf) - libc_hidden_proto(exit) -+//#undef putc - libc_hidden_proto(putc) -+libc_hidden_proto(fputc) - libc_hidden_proto(vfprintf) - libc_hidden_proto(fflush) --libc_hidden_proto(fputc) --libc_hidden_proto(__fputc_unlocked) -+//#ifdef __UCLIBC_HAS_STDIO_PUTC_MACRO__ -+libc_hidden_proto(fputc_unlocked) -+//#endif - - /* This variable is incremented each time `error' is called. */ - unsigned int error_message_count = 0; -diff -ur uClibc-0.9.29/libc/misc/ttyent/getttyent.c uClibc-0.9.29-patched/libc/misc/ttyent/getttyent.c ---- uClibc-0.9.29/libc/misc/ttyent/getttyent.c 2006-12-07 17:24:02.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/misc/ttyent/getttyent.c 2007-05-09 18:05:21.646421810 -0500 -@@ -44,8 +44,10 @@ - libc_hidden_proto(__fsetlocking) - libc_hidden_proto(rewind) - libc_hidden_proto(fgets_unlocked) -+//#undef getc_unlocked - libc_hidden_proto(getc_unlocked) --libc_hidden_proto(__fgetc_unlocked) -+//#undef fgetc_unlocked -+libc_hidden_proto(fgetc_unlocked) - libc_hidden_proto(fopen) - libc_hidden_proto(fclose) - libc_hidden_proto(abort) -diff -ur uClibc-0.9.29/libc/pwd_grp/pwd_grp.c uClibc-0.9.29-patched/libc/pwd_grp/pwd_grp.c ---- uClibc-0.9.29/libc/pwd_grp/pwd_grp.c 2007-04-13 03:32:18.000000000 -0500 -+++ uClibc-0.9.29-patched/libc/pwd_grp/pwd_grp.c 2007-05-09 18:05:21.638421151 -0500 -@@ -43,11 +43,12 @@ - libc_hidden_proto(strtoul) - libc_hidden_proto(rewind) - libc_hidden_proto(fgets_unlocked) --libc_hidden_proto(__fputc_unlocked) - libc_hidden_proto(sprintf) - libc_hidden_proto(fopen) - libc_hidden_proto(fclose) - libc_hidden_proto(fprintf) -+//#undef fputc_unlocked -+libc_hidden_proto(fputc_unlocked) - #ifdef __UCLIBC_HAS_XLOCALE__ - libc_hidden_proto(__ctype_b_loc) - #elif __UCLIBC_HAS_CTYPE_TABLES__ -@@ -801,7 +802,7 @@ - - do { - if (!*m) { -- if (__fputc_unlocked('\n', f) >= 0) { -+ if (fputc_unlocked('\n', f) >= 0) { - rv = 0; - } - break; -@@ -867,7 +868,7 @@ - goto DO_UNLOCK; - } - -- if (__fputc_unlocked('\n', stream) > 0) { -+ if (fputc_unlocked('\n', stream) > 0) { - rv = 0; - } - -diff -ur uClibc-0.9.29/libc/stdio/_scanf.c uClibc-0.9.29-patched/libc/stdio/_scanf.c ---- uClibc-0.9.29/libc/stdio/_scanf.c 2007-01-20 12:32:10.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/stdio/_scanf.c 2007-05-09 18:05:21.642421481 -0500 -@@ -86,7 +86,8 @@ - libc_hidden_proto(vsscanf) - libc_hidden_proto(fclose) - libc_hidden_proto(getc_unlocked) --libc_hidden_proto(__fgetc_unlocked) -+//#undef fgetc_unlocked -+libc_hidden_proto(fgetc_unlocked) - #ifdef __UCLIBC_HAS_WCHAR__ - libc_hidden_proto(wcslen) - libc_hidden_proto(vfwscanf) -diff -ur uClibc-0.9.29/libc/stdio/fgetc.c uClibc-0.9.29-patched/libc/stdio/fgetc.c ---- uClibc-0.9.29/libc/stdio/fgetc.c 2006-01-15 16:41:03.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/stdio/fgetc.c 2007-05-09 18:05:21.642421481 -0500 -@@ -13,13 +13,13 @@ - #undef getc - #undef getc_unlocked - --libc_hidden_proto(__fgetc_unlocked) -+libc_hidden_proto(fgetc_unlocked) - - #ifdef __DO_UNLOCKED - - libc_hidden_proto(fflush_unlocked) - --int __fgetc_unlocked(FILE *stream) -+int fgetc_unlocked(FILE *stream) - { - __STDIO_STREAM_VALIDATE(stream); - -@@ -73,26 +73,22 @@ - - return EOF; - } --libc_hidden_def(__fgetc_unlocked) -- --libc_hidden_proto(fgetc_unlocked) --strong_alias(__fgetc_unlocked,fgetc_unlocked) - libc_hidden_def(fgetc_unlocked) - - //libc_hidden_proto(__getc_unlocked) --//strong_alias(__fgetc_unlocked,__getc_unlocked) -+//strong_alias(fgetc_unlocked,__getc_unlocked) - //libc_hidden_def(__getc_unlocked) - - libc_hidden_proto(getc_unlocked) --strong_alias(__fgetc_unlocked,getc_unlocked) -+strong_alias(fgetc_unlocked,getc_unlocked) - libc_hidden_def(getc_unlocked) - - #ifndef __UCLIBC_HAS_THREADS__ - libc_hidden_proto(fgetc) --strong_alias(__fgetc_unlocked,fgetc) -+strong_alias(fgetc_unlocked,fgetc) - libc_hidden_def(fgetc) - --strong_alias(__fgetc_unlocked,getc) -+strong_alias(fgetc_unlocked,getc) - #endif - - #elif defined __UCLIBC_HAS_THREADS__ -diff -ur uClibc-0.9.29/libc/stdio/fgets.c uClibc-0.9.29-patched/libc/stdio/fgets.c ---- uClibc-0.9.29/libc/stdio/fgets.c 2006-01-15 16:41:03.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/stdio/fgets.c 2007-05-09 18:05:21.638421151 -0500 -@@ -10,8 +10,7 @@ - libc_hidden_proto(fgets_unlocked) - - #ifdef __DO_UNLOCKED -- --libc_hidden_proto(__fgetc_unlocked) -+libc_hidden_proto(fgetc_unlocked) - - char *fgets_unlocked(char *__restrict s, int n, - register FILE * __restrict stream) -@@ -38,7 +37,7 @@ - break; - } - } else { -- if ((c = __fgetc_unlocked(stream)) == EOF) { -+ if ((c = fgetc_unlocked(stream)) == EOF) { - if (__FERROR_UNLOCKED(stream)) { - goto ERROR; - } -diff -ur uClibc-0.9.29/libc/stdio/fputc.c uClibc-0.9.29-patched/libc/stdio/fputc.c ---- uClibc-0.9.29/libc/stdio/fputc.c 2007-04-14 12:03:18.000000000 -0500 -+++ uClibc-0.9.29-patched/libc/stdio/fputc.c 2007-05-09 20:50:51.350629927 -0500 -@@ -16,7 +16,7 @@ - - #ifdef __DO_UNLOCKED - --int __fputc_unlocked(int c, register FILE *stream) -+int fputc_unlocked(int c, register FILE *stream) - { - __STDIO_STREAM_VALIDATE(stream); - -@@ -70,22 +70,22 @@ - BAD: - return EOF; - } --libc_hidden_def(__fputc_unlocked) -+libc_hidden_def(fputc_unlocked) - - /* exposing these would be fundamentally *wrong*! fix you, instead! */ - /* libc_hidden_proto(fputc_unlocked) */ --strong_alias(__fputc_unlocked,fputc_unlocked) -+/* strong_alias(__fputc_unlocked,fputc_unlocked) */ - /* exposing these would be fundamentally *wrong*! fix you, instead! */ - /* libc_hidden_def(fputc_unlocked) */ - - libc_hidden_proto(putc_unlocked) --strong_alias(__fputc_unlocked,putc_unlocked) -+strong_alias(fputc_unlocked,putc_unlocked) - libc_hidden_def(putc_unlocked) - #ifndef __UCLIBC_HAS_THREADS__ --strong_alias(__fputc_unlocked,fputc) -+strong_alias(fputc_unlocked,fputc) - - libc_hidden_proto(putc) --strong_alias(__fputc_unlocked,putc) -+strong_alias(fputc_unlocked,putc) - libc_hidden_def(putc) - #endif - -diff -ur uClibc-0.9.29/libc/stdio/getchar.c uClibc-0.9.29-patched/libc/stdio/getchar.c ---- uClibc-0.9.29/libc/stdio/getchar.c 2006-12-19 22:30:25.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/stdio/getchar.c 2007-05-09 18:05:21.642421481 -0500 -@@ -7,7 +7,8 @@ - - #include "_stdio.h" - --libc_hidden_proto(__fgetc_unlocked) -+//#undef fgetc_unlocked -+libc_hidden_proto(fgetc_unlocked) - - #undef getchar - #ifdef __DO_UNLOCKED -diff -ur uClibc-0.9.29/libc/stdio/getdelim.c uClibc-0.9.29-patched/libc/stdio/getdelim.c ---- uClibc-0.9.29/libc/stdio/getdelim.c 2006-02-13 02:52:46.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/stdio/getdelim.c 2007-05-09 18:05:21.642421481 -0500 -@@ -11,8 +11,8 @@ - #include "_stdio.h" - - libc_hidden_proto(getdelim) -- --libc_hidden_proto(__fgetc_unlocked) -+//#undef fgetc_unlocked -+libc_hidden_proto(fgetc_unlocked) - - /* Note: There is a defect in this function. (size_t vs ssize_t). */ - -diff -ur uClibc-0.9.29/libc/stdio/old_vfprintf.c uClibc-0.9.29-patched/libc/stdio/old_vfprintf.c ---- uClibc-0.9.29/libc/stdio/old_vfprintf.c 2006-01-22 13:35:08.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/stdio/old_vfprintf.c 2007-05-09 18:05:21.642421481 -0500 -@@ -149,7 +149,8 @@ - libc_hidden_proto(strnlen) - libc_hidden_proto(memcpy) - libc_hidden_proto(putc_unlocked) --libc_hidden_proto(__fputc_unlocked) -+//#undef fputc_unlocked -+libc_hidden_proto(fputc_unlocked) - libc_hidden_proto(__glibc_strerror_r) - - /* #undef __UCLIBC_HAS_FLOATS__ */ -diff -ur uClibc-0.9.29/libc/stdio/putchar.c uClibc-0.9.29-patched/libc/stdio/putchar.c ---- uClibc-0.9.29/libc/stdio/putchar.c 2006-01-13 18:58:03.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/stdio/putchar.c 2007-05-09 18:05:21.642421481 -0500 -@@ -7,7 +7,8 @@ - - #include "_stdio.h" - --libc_hidden_proto(__fputc_unlocked) -+//#undef fputc_unlocked -+libc_hidden_proto(fputc_unlocked) - - #undef putchar - #ifdef __DO_UNLOCKED -diff -ur uClibc-0.9.29/libc/stdio/puts.c uClibc-0.9.29-patched/libc/stdio/puts.c ---- uClibc-0.9.29/libc/stdio/puts.c 2006-01-13 18:58:03.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/stdio/puts.c 2007-05-09 18:05:21.642421481 -0500 -@@ -7,7 +7,8 @@ - - #include "_stdio.h" - --libc_hidden_proto(__fputc_unlocked) -+//#undef fputc_unlocked -+libc_hidden_proto(fputc_unlocked) - libc_hidden_proto(fputs_unlocked) - - int puts(register const char * __restrict s) -@@ -25,7 +26,7 @@ - /* Note: Nonportable as fputs need only return nonnegative on success. */ - if ((n = fputs_unlocked(s, stream)) != EOF) { - ++n; -- if (__fputc_unlocked('\n', stream) == EOF) { -+ if (fputc_unlocked('\n', stream) == EOF) { - n = EOF; - } - } -diff -ur uClibc-0.9.29/libc/stdio/putwchar.c uClibc-0.9.29-patched/libc/stdio/putwchar.c ---- uClibc-0.9.29/libc/stdio/putwchar.c 2006-01-14 14:16:19.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/stdio/putwchar.c 2007-05-09 18:05:21.642421481 -0500 -@@ -22,7 +22,8 @@ - - #elif defined __UCLIBC_HAS_THREADS__ - --libc_hidden_proto(__fputc_unlocked) -+//#undef fputc_unlocked -+libc_hidden_proto(fputc_unlocked) - /* psm: should this be fputwc? */ - libc_hidden_proto(fputc) - -diff -ur uClibc-0.9.29/libc/sysdeps/linux/common/bits/uClibc_stdio.h uClibc-0.9.29-patched/libc/sysdeps/linux/common/bits/uClibc_stdio.h ---- uClibc-0.9.29/libc/sysdeps/linux/common/bits/uClibc_stdio.h 2007-01-28 07:16:58.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/sysdeps/linux/common/bits/uClibc_stdio.h 2007-05-09 20:56:02.408110608 -0500 -@@ -381,33 +381,29 @@ - # define __FEOF(__stream) __FEOF_UNLOCKED(__stream) - #endif - --extern int __fgetc_unlocked(FILE *__stream); --extern int __fputc_unlocked(int __c, FILE *__stream); -- - /* First define the default definitions. - They are overridden below as necessary. */ --#define __FGETC_UNLOCKED(__stream) (__fgetc_unlocked)((__stream)) -+#define __FGETC_UNLOCKED(__stream) (fgetc_unlocked)((__stream)) - #define __FGETC(__stream) (fgetc)((__stream)) --#define __GETC_UNLOCKED_MACRO(__stream) (__fgetc_unlocked)((__stream)) --#define __GETC_UNLOCKED(__stream) (__fgetc_unlocked)((__stream)) -+#define __GETC_UNLOCKED_MACRO(__stream) (fgetc_unlocked)((__stream)) -+#define __GETC_UNLOCKED(__stream) (fgetc_unlocked)((__stream)) - #define __GETC(__stream) (fgetc)((__stream)) - --#define __FPUTC_UNLOCKED(__c, __stream) (__fputc_unlocked)((__c),(__stream)) -+#define __FPUTC_UNLOCKED(__c, __stream) (fputc_unlocked)((__c),(__stream)) - #define __FPUTC(__c, __stream) (fputc)((__c),(__stream)) --#define __PUTC_UNLOCKED_MACRO(__c, __stream) (__fputc_unlocked)((__c),(__stream)) --#define __PUTC_UNLOCKED(__c, __stream) (__fputc_unlocked)((__c),(__stream)) -+#define __PUTC_UNLOCKED_MACRO(__c, __stream) (fputc_unlocked)((__c),(__stream)) -+#define __PUTC_UNLOCKED(__c, __stream) (fputc_unlocked)((__c),(__stream)) - #define __PUTC(__c, __stream) (fputc)((__c),(__stream)) - - - #ifdef __STDIO_GETC_MACRO -- - extern FILE *__stdin; /* For getchar() macro. */ - - # undef __GETC_UNLOCKED_MACRO - # define __GETC_UNLOCKED_MACRO(__stream) \ - ( ((__stream)->__bufpos < (__stream)->__bufgetc_u) \ - ? (*(__stream)->__bufpos++) \ -- : __fgetc_unlocked(__stream) ) -+ : fgetc_unlocked(__stream) ) - - # if 0 - /* Classic macro approach. getc{_unlocked} can have side effects. */ -@@ -453,20 +449,17 @@ - # endif - # endif - --#else -- - #endif /* __STDIO_GETC_MACRO */ - - - #ifdef __STDIO_PUTC_MACRO -- - extern FILE *__stdout; /* For putchar() macro. */ - - # undef __PUTC_UNLOCKED_MACRO - # define __PUTC_UNLOCKED_MACRO(__c, __stream) \ - ( ((__stream)->__bufpos < (__stream)->__bufputc_u) \ - ? (*(__stream)->__bufpos++) = (__c) \ -- : __fputc_unlocked((__c),(__stream)) ) -+ : (fputc_unlocked((__c),(__stream)) ) - - # if 0 - /* Classic macro approach. putc{_unlocked} can have side effects.*/ -@@ -489,7 +482,8 @@ - }) ) - - # undef __PUTC_UNLOCKED --# define __PUTC_UNLOCKED(__c, __stream) __FPUTC_UNLOCKED((__c), (__stream)) -+# define __PUTC_UNLOCKED(__c, __stream) \ -+ __FPUTC_UNLOCKED((__c), (__stream)) - - # ifdef __UCLIBC_HAS_THREADS__ - # undef __FPUTC -diff -ur uClibc-0.9.29/libc/unistd/getpass.c uClibc-0.9.29-patched/libc/unistd/getpass.c ---- uClibc-0.9.29/libc/unistd/getpass.c 2006-07-05 05:58:38.000000000 -0500 -+++ uClibc-0.9.29-patched/libc/unistd/getpass.c 2007-05-09 18:05:21.642421481 -0500 -@@ -36,7 +36,8 @@ - libc_hidden_proto(fputs) - libc_hidden_proto(fputc) - libc_hidden_proto(putc) --libc_hidden_proto(__fputc_unlocked) -+//#undef fputc_unlocked -+libc_hidden_proto(fputc_unlocked) - - /* It is desirable to use this bit on systems that have it. - The only bit of terminal state we want to twiddle is echoing, which is diff --git a/toolchain/uClibc/uClibc-0.9.29-fix-gethostent_r-failure-retval.patch b/toolchain/uClibc/uClibc-0.9.29-fix-gethostent_r-failure-retval.patch deleted file mode 100644 index 7b246c1ad7..0000000000 --- a/toolchain/uClibc/uClibc-0.9.29-fix-gethostent_r-failure-retval.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur uClibc-0.9.29/libc/inet/resolv.c uClibc-0.9.29-patched/libc/inet/resolv.c ---- uClibc-0.9.29/libc/inet/resolv.c 2007-04-23 12:01:05.000000000 -0500 -+++ uClibc-0.9.29-patched/libc/inet/resolv.c 2007-05-09 18:05:33.563404419 -0500 -@@ -1700,7 +1700,7 @@ - int gethostent_r(struct hostent *result_buf, char *buf, size_t buflen, - struct hostent **result, int *h_errnop) - { -- int ret; -+ int ret = HOST_NOT_FOUND; - - __UCLIBC_MUTEX_LOCK(mylock); - if (__gethostent_fp == NULL) { diff --git a/toolchain/uClibc/uClibc-0.9.29-fix-internal_function-definition.patch b/toolchain/uClibc/uClibc-0.9.29-fix-internal_function-definition.patch deleted file mode 100644 index 9b88d826f1..0000000000 --- a/toolchain/uClibc/uClibc-0.9.29-fix-internal_function-definition.patch +++ /dev/null @@ -1,51 +0,0 @@ -Index: uClibc/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h -=================================================================== ---- uClibc/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h (revision 18898) -+++ uClibc/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h (working copy) -@@ -42,6 +42,8 @@ - /* define if target supports IEEE signed zero floats */ - #define __UCLIBC_HAVE_SIGNED_ZERO__ - -+#if defined _LIBC - #define internal_function __attribute__ ((regparm (3), stdcall)) -+#endif - - #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */ -Index: uClibc/include/libc-symbols.h -=================================================================== ---- uClibc/include/libc-symbols.h (revision 18898) -+++ uClibc/include/libc-symbols.h (working copy) -@@ -22,6 +22,16 @@ - #ifndef _LIBC_SYMBOLS_H - #define _LIBC_SYMBOLS_H 1 - -+/* This is defined for the compilation of all C library code. features.h -+ tests this to avoid inclusion of stubs.h while compiling the library, -+ before stubs.h has been generated. Some library code that is shared -+ with other packages also tests this symbol to see if it is being -+ compiled as part of the C library. We must define this before including -+ config.h, because it makes some definitions conditional on whether libc -+ itself is being compiled, or just some generator program. */ -+#define _LIBC 1 -+ -+ - /* This file's macros are included implicitly in the compilation of every - file in the C library by -imacros. - -@@ -40,16 +50,6 @@ - - #include - -- --/* This is defined for the compilation of all C library code. features.h -- tests this to avoid inclusion of stubs.h while compiling the library, -- before stubs.h has been generated. Some library code that is shared -- with other packages also tests this symbol to see if it is being -- compiled as part of the C library. We must define this before including -- config.h, because it makes some definitions conditional on whether libc -- itself is being compiled, or just some generator program. */ --#define _LIBC 1 -- - /* Enable declarations of GNU extensions, since we are compiling them. */ - #define _GNU_SOURCE 1 - diff --git a/toolchain/uClibc/uClibc-0.9.29-fix-sa_onstack.patch.avr32 b/toolchain/uClibc/uClibc-0.9.29-fix-sa_onstack.patch.avr32 deleted file mode 100644 index 722decdbd7..0000000000 --- a/toolchain/uClibc/uClibc-0.9.29-fix-sa_onstack.patch.avr32 +++ /dev/null @@ -1,31 +0,0 @@ -From 974a769cc135bcfb1ea751db34a84ed6b5ceb509 Mon Sep 17 00:00:00 2001 -From: Haavard Skinnemoen -Date: Fri, 7 Dec 2007 14:02:19 +0100 -Subject: [PATCH] AVR32: Fix sa_restorer when SA_ONSTACK is set - -I don't remember exactly why we decided to pick the caller's value of -sa_restorer when SA_ONSTACK is set, but it seems to break LTP's -sigaltstack testcase. Some users have reported problems with -sigaltstack as well; hopefully this will fix it. - -Signed-off-by: Haavard Skinnemoen ---- - libc/sysdeps/linux/avr32/sigaction.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/libc/sysdeps/linux/avr32/sigaction.c b/libc/sysdeps/linux/avr32/sigaction.c -index a97ff3d..6dcca91 100644 ---- a/libc/sysdeps/linux/avr32/sigaction.c -+++ b/libc/sysdeps/linux/avr32/sigaction.c -@@ -30,7 +30,7 @@ int __libc_sigaction(int signum, const struct sigaction *act, - kact.k_sa_handler = act->sa_handler; - memcpy(&kact.sa_mask, &act->sa_mask, sizeof (kact.sa_mask)); - kact.sa_flags = act->sa_flags; -- if (kact.sa_flags & (SA_RESTORER | SA_ONSTACK)) -+ if (kact.sa_flags & SA_RESTORER) - kact.sa_restorer = act->sa_restorer; - else - kact.sa_restorer = __default_rt_sa_restorer; --- -1.5.3.4 - diff --git a/toolchain/uClibc/uClibc-0.9.29-linuxthreads.patch b/toolchain/uClibc/uClibc-0.9.29-linuxthreads.patch deleted file mode 100644 index 8ce2439b46..0000000000 --- a/toolchain/uClibc/uClibc-0.9.29-linuxthreads.patch +++ /dev/null @@ -1,145 +0,0 @@ ---- a/libpthread/linuxthreads.old/attr.c 2006-01-24 12:41:01.000000000 -0500 -+++ b/libpthread/linuxthreads.old/attr.c 2008-02-10 11:35:32.000000000 -0500 -@@ -25,6 +25,14 @@ - #include "pthread.h" - #include "internals.h" - -+#include -+#include -+#include -+#include -+#include -+#include -+ -+ - /* NOTE: With uClibc I don't think we need this versioning stuff. - * Therefore, define the function pthread_attr_init() here using - * a strong symbol. */ -@@ -209,4 +217,94 @@ int __pthread_attr_getstacksize(const pt - *stacksize = attr->__stacksize; - return 0; - } -+ -+ -+extern int *__libc_stack_end; -+ - weak_alias (__pthread_attr_getstacksize, pthread_attr_getstacksize) -+void* pthread_getattr_np(pthread_t thread, pthread_attr_t *attr) -+{ -+ static void *stackBase = 0; -+ static size_t stackSize = 0; -+ int ret = 0; -+ /* Stack size limit. */ -+ struct rlimit rl; -+ -+ /* The safest way to get the top of the stack is to read -+ /proc/self/maps and locate the line into which -+ __libc_stack_end falls. */ -+ FILE *fp = fopen("/proc/self/maps", "rc"); -+ if (fp == NULL) -+ ret = errno; -+ /* We need the limit of the stack in any case. */ -+ else if (getrlimit (RLIMIT_STACK, &rl) != 0) -+ ret = errno; -+ else { -+ /* We need no locking. */ -+ __fsetlocking (fp, FSETLOCKING_BYCALLER); -+ -+ /* Until we found an entry (which should always be the case) -+ mark the result as a failure. */ -+ ret = ENOENT; -+ -+ char *line = NULL; -+ size_t linelen = 0; -+ uintptr_t last_to = 0; -+ -+ while (! feof_unlocked (fp)) { -+ if (getdelim (&line, &linelen, '\n', fp) <= 0) -+ break; -+ -+ uintptr_t from; -+ uintptr_t to; -+ if (sscanf (line, "%x-%x", &from, &to) != 2) -+ continue; -+ if (from <= (uintptr_t) __libc_stack_end -+ && (uintptr_t) __libc_stack_end < to) { -+ /* Found the entry. Now we have the info we need. */ -+ attr->__stacksize = rl.rlim_cur; -+#ifdef _STACK_GROWS_UP -+ /* Don't check to enforce a limit on the __stacksize */ -+ attr->__stackaddr = (void *) from; -+#else -+ attr->__stackaddr = (void *) to; -+ -+ /* The limit might be too high. */ -+ if ((size_t) attr->__stacksize > (size_t) attr->__stackaddr - last_to) -+ attr->__stacksize = (size_t) attr->__stackaddr - last_to; -+#endif -+ -+ /* We succeed and no need to look further. */ -+ ret = 0; -+ break; -+ } -+ last_to = to; -+ } -+ -+ fclose (fp); -+ free (line); -+ } -+#ifndef _STACK_GROWS_UP -+ stackBase = (char *) attr->__stackaddr - attr->__stacksize; -+#else -+ stackBase = attr->__stackaddr; -+#endif -+ stackSize = attr->__stacksize; -+ return (void*)(stackBase + stackSize); -+} -+ -+int __pthread_attr_getstack (const pthread_attr_t *attr, void **stackaddr, -+ size_t *stacksize) -+{ -+ /* XXX This function has a stupid definition. The standard specifies -+ no error value but what is if no stack address was set? We simply -+ return the value we have in the member. */ -+#ifndef _STACK_GROWS_UP -+ *stackaddr = (char *) attr->__stackaddr - attr->__stacksize; -+#else -+ *stackaddr = attr->__stackaddr; -+#endif -+ *stacksize = attr->__stacksize; -+ return 0; -+} -+weak_alias (__pthread_attr_getstack, pthread_attr_getstack) - ---- a/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h 2006-12-07 22:19:36.000000000 -0500 -+++ b/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h 2008-02-10 11:42:35.000000000 -0500 -@@ -288,15 +288,11 @@ extern int pthread_attr_getstacksize (__ - __attr, size_t *__restrict __stacksize) - __THROW; - --#if 0 --/* Not yet implemented in uClibc! */ -- - #ifdef __USE_GNU - /* Initialize thread attribute *ATTR with attributes corresponding to the - already running thread TH. It shall be called on unitialized ATTR - and destroyed with pthread_attr_destroy when no longer needed. */ --extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) __THROW; --#endif -+extern void* pthread_getattr_np(pthread_t thread, pthread_attr_t *attr); - #endif - - /* Functions for scheduling control. */ -@@ -599,6 +595,11 @@ extern int pthread_cancel (pthread_t __c - cancelled. */ - extern void pthread_testcancel (void); - -+/* Return the previously set address for the stack. */ -+extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, -+ void **__restrict __stackaddr, -+ size_t *__restrict __stacksize) __THROW; -+ - - /* Install a cleanup handler: ROUTINE will be called with arguments ARG - when the thread is cancelled or calls pthread_exit. ROUTINE will also - diff --git a/toolchain/uClibc/uClibc-0.9.29-rm-whitespace.patch b/toolchain/uClibc/uClibc-0.9.29-rm-whitespace.patch deleted file mode 100644 index 6004f91e32..0000000000 --- a/toolchain/uClibc/uClibc-0.9.29-rm-whitespace.patch +++ /dev/null @@ -1,86 +0,0 @@ -diff -urN uClibc-0.9.29-0rig/include/assert.h uClibc-0.9.29/include/assert.h ---- uClibc-0.9.29-0rig/include/assert.h 2005-11-03 23:42:46.000000000 +0100 -+++ uClibc-0.9.29/include/assert.h 2007-08-13 19:10:57.000000000 +0200 -@@ -31,7 +31,7 @@ - #define _ASSERT_H 1 - #include - --#if defined __cplusplus && __GNUC_PREREQ (2,95) -+#if defined __cplusplus && __GNUC_PREREQ(2,95) - # define __ASSERT_VOID_CAST static_cast - #else - # define __ASSERT_VOID_CAST (void) -@@ -59,13 +59,17 @@ - (__ASSERT_VOID_CAST ((expr) ? 0 : \ - (__assert (__STRING(expr), __FILE__, __LINE__, \ - __ASSERT_FUNCTION), 0))) -- -+ -+/* Define some temporaries to workaround tinyx makedepend bug */ -+#define __GNUC_PREREQ_2_6 __GNUC_PREREQ(2, 6) -+#define __GNUC_PREREQ_2_4 __GNUC_PREREQ(2, 4) - /* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__' - which contains the name of the function currently being defined. - This is broken in G++ before version 2.6. - C9x has a similar variable called __func__, but prefer the GCC one since - it demangles C++ function names. */ --# if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4) -+ -+# if defined __cplusplus ? __GNUC_PREREQ_2_6 : __GNUC_PREREQ_2_4 - # define __ASSERT_FUNCTION __PRETTY_FUNCTION__ - # else - # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L -diff -urN uClibc-0.9.29-0rig/include/complex.h uClibc-0.9.29/include/complex.h ---- uClibc-0.9.29-0rig/include/complex.h 2002-05-09 10:15:21.000000000 +0200 -+++ uClibc-0.9.29/include/complex.h 2007-08-13 17:55:29.000000000 +0200 -@@ -33,7 +33,7 @@ - /* We might need to add support for more compilers here. But since ISO - C99 is out hopefully all maintained compilers will soon provide the data - types `float complex' and `double complex'. */ --#if __GNUC_PREREQ (2, 7) && !__GNUC_PREREQ (2, 97) -+#if __GNUC_PREREQ(2, 7) && !__GNUC_PREREQ(2, 97) - # define _Complex __complex__ - #endif - -diff -urN uClibc-0.9.29-0rig/include/features.h uClibc-0.9.29/include/features.h ---- uClibc-0.9.29-0rig/include/features.h 2006-11-29 22:10:04.000000000 +0100 -+++ uClibc-0.9.29/include/features.h 2007-08-13 17:55:51.000000000 +0200 -@@ -143,7 +143,7 @@ - - /* Convenience macros to test the versions of glibc and gcc. - Use them like this: -- #if __GNUC_PREREQ (2,8) -+ #if __GNUC_PREREQ(2,8) - ... code requiring gcc 2.8 or later ... - #endif - Note - they won't work for gcc1 or glibc1, since the _MINOR macros -@@ -297,7 +297,7 @@ - /* uClibc does not support _FORTIFY_SOURCE */ - #undef _FORTIFY_SOURCE - #if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \ -- && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0 -+ && __GNUC_PREREQ(4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0 - # if _FORTIFY_SOURCE > 1 - # define __USE_FORTIFY_LEVEL 2 - # else -@@ -366,7 +366,7 @@ - #endif /* !ASSEMBLER */ - - /* Decide whether we can define 'extern inline' functions in headers. */ --#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \ -+#if __GNUC_PREREQ(2, 7) && defined __OPTIMIZE__ \ - && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__ - # define __USE_EXTERN_INLINES 1 - #endif -diff -urN uClibc-0.9.29-0rig/include/tgmath.h uClibc-0.9.29/include/tgmath.h ---- uClibc-0.9.29-0rig/include/tgmath.h 2002-05-09 10:15:21.000000000 +0200 -+++ uClibc-0.9.29/include/tgmath.h 2007-08-13 17:56:17.000000000 +0200 -@@ -34,7 +34,7 @@ - do not try this for now and instead concentrate only on GNU CC. Once - we have more information support for other compilers might follow. */ - --#if __GNUC_PREREQ (2, 7) -+#if __GNUC_PREREQ(2, 7) - - # ifdef __NO_LONG_DOUBLE_MATH - # define __tgml(fct) fct diff --git a/toolchain/uClibc/uClibc-0.9.29.config b/toolchain/uClibc/uClibc-0.9.29.config deleted file mode 100644 index 3e43059e9f..0000000000 --- a/toolchain/uClibc/uClibc-0.9.29.config +++ /dev/null @@ -1,207 +0,0 @@ -# -# Automatically generated make config: don't edit -# -# TARGET_alpha is not set -# TARGET_arm is not set -# TARGET_avr32 is not set -# TARGET_bfin is not set -# TARGET_cris is not set -# TARGET_e1 is not set -# TARGET_frv is not set -# TARGET_h8300 is not set -# TARGET_hppa is not set -# TARGET_i386 is not set -# TARGET_i960 is not set -# TARGET_ia64 is not set -# TARGET_m68k is not set -# TARGET_microblaze is not set -# TARGET_mips is not set -# TARGET_nios is not set -# TARGET_nios2 is not set -# TARGET_powerpc is not set -# TARGET_sh is not set -# TARGET_sh64 is not set -# TARGET_sparc is not set -# TARGET_v850 is not set -# TARGET_vax is not set -# TARGET_x86_64 is not set - -# -# Target Architecture Features and Options -# -TARGET_ARCH="none" -FORCE_OPTIONS_FOR_ARCH=y -# ARCH_LITTLE_ENDIAN is not set -# ARCH_BIG_ENDIAN is not set -# ARCH_WANTS_LITTLE_ENDIAN is not set -# ARCH_WANTS_BIG_ENDIAN is not set - -# -# Using Little Endian -# -ARCH_HAS_MMU=y -ARCH_USE_MMU=y -UCLIBC_HAS_FLOATS=y -UCLIBC_HAS_FPU=y -DO_C99_MATH=y -KERNEL_SOURCE="/usr/src/linux" -KERNEL_HEADERS="/usr/src/linux/include" -HAVE_DOT_CONFIG=y - -# -# General Library Settings -# -# HAVE_NO_PIC is not set -DOPIC=y -# LINKRELAX is not set -# HAVE_NO_SHARED is not set -# ARCH_HAS_NO_LDSO is not set -BUILD_UCLIBC_LDSO=y -HAVE_SHARED=y -# FORCE_SHAREABLE_TEXT_SEGMENTS is not set -LDSO_LDD_SUPPORT=y -LDSO_CACHE_SUPPORT=y -# LDSO_PRELOAD_FILE_SUPPORT is not set -LDSO_BASE_FILENAME="ld.so" -# UCLIBC_STATIC_LDCONFIG is not set -LDSO_RUNPATH=y -# DL_FINI_CRT_COMPAT is not set -UCLIBC_CTOR_DTOR=y -# HAS_NO_THREADS is not set -UCLIBC_HAS_THREADS=y -# PTHREADS_DEBUG_SUPPORT is not set -LINUXTHREADS_OLD=y -UCLIBC_HAS_LFS=y -# MALLOC is not set -# MALLOC_SIMPLE is not set -MALLOC_STANDARD=y -MALLOC_GLIBC_COMPAT=y -UCLIBC_DYNAMIC_ATEXIT=y -# COMPAT_ATEXIT is not set -HAS_SHADOW=y -# UCLIBC_SUSV3_LEGACY is not set -# UCLIBC_SUSV3_LEGACY_MACROS is not set -UCLIBC_HAS_SHADOW=y -# UCLIBC_HAS_PROGRAM_INVOCATION_NAME is not set -UCLIBC_HAS___PROGNAME=y -# UNIX98PTY_ONLY is not set -ASSUME_DEVPTS=y -UCLIBC_HAS_TM_EXTENSIONS=y -UCLIBC_HAS_TZ_CACHING=y -UCLIBC_HAS_TZ_FILE=y -UCLIBC_HAS_TZ_FILE_READ_MANY=y -UCLIBC_TZ_FILE_PATH="/etc/TZ" - -# -# Advanced Library Settings -# -UCLIBC_PWD_BUFFER_SIZE=256 -UCLIBC_GRP_BUFFER_SIZE=256 - -# -# Networking Support -# -UCLIBC_HAS_IPV6=y -UCLIBC_HAS_RPC=y -UCLIBC_HAS_FULL_RPC=y -UCLIBC_HAS_REENTRANT_RPC=y -# UCLIBC_USE_NETLINK is not set -# UCLIBC_HAS_BSD_RES_CLOSE is not set - -# -# String and Stdio Support -# -UCLIBC_HAS_STRING_GENERIC_OPT=y -UCLIBC_HAS_STRING_ARCH_OPT=y -UCLIBC_HAS_CTYPE_TABLES=y -UCLIBC_HAS_CTYPE_SIGNED=y -# UCLIBC_HAS_CTYPE_UNSAFE is not set -UCLIBC_HAS_CTYPE_CHECKED=y -# UCLIBC_HAS_CTYPE_ENFORCED is not set -# UCLIBC_HAS_WCHAR is not set -# UCLIBC_HAS_LOCALE is not set -UCLIBC_HAS_HEXADECIMAL_FLOATS=y -UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y -# USE_OLD_VFPRINTF is not set -UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9 -UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y -# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set -# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set -# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set -# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set -# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set -UCLIBC_HAS_STDIO_BUFSIZ_4096=y -# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set -UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y -# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set -# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set -# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set -UCLIBC_HAS_STDIO_GETC_MACRO=y -UCLIBC_HAS_STDIO_PUTC_MACRO=y -UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y -# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set -UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y -UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y -UCLIBC_HAS_PRINTF_M_SPEC=y -UCLIBC_HAS_ERRNO_MESSAGES=y -# UCLIBC_HAS_SYS_ERRLIST is not set -UCLIBC_HAS_SIGNUM_MESSAGES=y -# UCLIBC_HAS_SYS_SIGLIST is not set -UCLIBC_HAS_GNU_GETOPT=y -# UCLIBC_HAS_GETTEXT_AWARENESS is not set -UCLIBC_HAS_GNU_GETSUBOPT=y - -# -# Big and Tall -# -UCLIBC_HAS_REGEX=y -UCLIBC_HAS_REGEX_OLD=y -UCLIBC_HAS_FNMATCH=y -UCLIBC_HAS_FNMATCH_OLD=y -# UCLIBC_HAS_WORDEXP is not set -UCLIBC_HAS_FTW=y -UCLIBC_HAS_GLOB=y -UCLIBC_HAS_GNU_GLOB=y - -# -# Library Installation Options -# -SHARED_LIB_LOADER_PREFIX="/lib" -RUNTIME_PREFIX="/" -DEVEL_PREFIX="/usr/" - -# -# uClibc security related options -# -# UCLIBC_BUILD_PIE is not set -# UCLIBC_HAS_ARC4RANDOM is not set -# HAVE_NO_SSP is not set -UCLIBC_HAS_SSP=y -# UCLIBC_HAS_SSP_COMPAT is not set -# SSP_QUICK_CANARY is not set -PROPOLICE_BLOCK_ABRT=y -# PROPOLICE_BLOCK_SEGV is not set -# UCLIBC_BUILD_SSP is not set -UCLIBC_BUILD_RELRO=y -UCLIBC_BUILD_NOW=y -UCLIBC_BUILD_NOEXECSTACK=y - -# -# uClibc development/debugging options -# -CROSS_COMPILER_PREFIX="" -UCLIBC_EXTRA_CFLAGS="" -# DODEBUG is not set -# DODEBUG_PT is not set -DOSTRIP=y -# DOASSERTS is not set -# SUPPORT_LD_DEBUG is not set -# SUPPORT_LD_DEBUG_EARLY is not set -# UCLIBC_MALLOC_DEBUGGING is not set -WARNINGS="-Wall" -# EXTRA_WARNINGS is not set -# DOMULTI is not set -# UCLIBC_MJN3_ONLY is not set - -# USE_BX is not set - diff --git a/toolchain/uClibc/uClibc-0.9.30.3-fix-error-locale-utf-8.patch b/toolchain/uClibc/uClibc-0.9.30.3-fix-error-locale-utf-8.patch deleted file mode 100644 index 2fe6c508cb..0000000000 --- a/toolchain/uClibc/uClibc-0.9.30.3-fix-error-locale-utf-8.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - extra/locale/gen_wc8bit.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: uClibc-0.9.30.3/extra/locale/gen_wc8bit.c -=================================================================== ---- uClibc-0.9.30.3.orig/extra/locale/gen_wc8bit.c -+++ uClibc-0.9.30.3/extra/locale/gen_wc8bit.c -@@ -119,7 +119,7 @@ - } - - locale_failure: -- printf("could not find a UTF8 locale ... please enable en_US.UTF-8\n"); -+ fprintf(stderr, "could not find a UTF8 locale ... please enable en_US.UTF-8\n"); - return EXIT_FAILURE; - locale_success: - pclose(fp); diff --git a/toolchain/uClibc/uClibc-0.9.30.3-xtensa-000p-fix-procfs.patch b/toolchain/uClibc/uClibc-0.9.30.3-xtensa-000p-fix-procfs.patch deleted file mode 100644 index 8e62d205f9..0000000000 --- a/toolchain/uClibc/uClibc-0.9.30.3-xtensa-000p-fix-procfs.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- uClibc-0.9.29-orig/libc/sysdeps/linux/xtensa/sys/procfs.h 2007-11-16 23:21:00.000000000 -0800 -+++ uClibc-0.9.29/libc/sysdeps/linux/xtensa/sys/procfs.h 2007-11-16 23:26:59.000000000 -0800 -@@ -32,19 +32,11 @@ - #include - #include - #include -+#include - - __BEGIN_DECLS - --/* Type for a general-purpose register. */ --typedef unsigned long elf_greg_t; -- --#define ELF_NGREG 128 --typedef elf_greg_t elf_gregset_t[ELF_NGREG]; -- --/* Register set for the floating-point registers. */ --#define ELF_NFPREG 18 --typedef unsigned long elf_fpreg_t; --typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; -+/* Note: we get elf_gregset_t and elf_fpregset_t from . */ - - /* Signal info. */ - struct elf_siginfo diff --git a/toolchain/uClibc/uClibc-0.9.30.3-xtensa-005-sigcontext.patch b/toolchain/uClibc/uClibc-0.9.30.3-xtensa-005-sigcontext.patch deleted file mode 100644 index 7d7d684b1f..0000000000 --- a/toolchain/uClibc/uClibc-0.9.30.3-xtensa-005-sigcontext.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -u /dev/null uClibc-0.9.30/libc/sysdeps/linux/xtensa/bits/sigcontext.h ---- /dev/null -+++ uClibc-0.9.30/libc/sysdeps/linux/xtensa/bits/sigcontext.h -@@ -0,0 +1,41 @@ -+/* Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 51 Franklin Street - Fifth Floor, -+ Boston, MA 02110-1301, USA. */ -+ -+#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H -+# error "Never use directly; include instead." -+#endif -+ -+#ifndef _BITS_SIGCONTEXT_H -+#define _BITS_SIGCONTEXT_H 1 -+ -+struct sigcontext -+{ -+ unsigned long sc_pc; -+ unsigned long sc_ps; -+ unsigned long sc_lbeg; -+ unsigned long sc_lend; -+ unsigned long sc_lcount; -+ unsigned long sc_sar; -+ unsigned long sc_acclo; -+ unsigned long sc_acchi; -+ void *sc_xtregs; -+ unsigned long sc_a[16]; -+}; -+ -+#endif /* _BITS_SIGCONTEXT_H */ -+ diff --git a/toolchain/uClibc/uClibc-0.9.30.3-xtensa-009-testandset.patch b/toolchain/uClibc/uClibc-0.9.30.3-xtensa-009-testandset.patch deleted file mode 100644 index f0e4eb272b..0000000000 --- a/toolchain/uClibc/uClibc-0.9.30.3-xtensa-009-testandset.patch +++ /dev/null @@ -1,59 +0,0 @@ ---- uClibc-0.9.29/libpthread/linuxthreads.old/sysdeps/xtensa/pt-machine.h.orig 2008-09-12 09:51:50.000000000 -0700 -+++ uClibc-0.9.29/libpthread/linuxthreads.old/sysdeps/xtensa/pt-machine.h 2008-10-04 12:14:57.000000000 -0700 -@@ -26,19 +26,51 @@ - #include - - #ifndef PT_EI --# define PT_EI __extern_always_inline -+# define PT_EI extern inline __attribute__ ((gnu_inline)) - #endif - --/* Memory barrier. */ - #define MEMORY_BARRIER() __asm__ ("memw" : : : "memory") -+#define HAS_COMPARE_AND_SWAP -+ -+extern long int testandset (int *spinlock); -+extern int __compare_and_swap (long int *p, long int oldval, long int newval); - - /* Spinlock implementation; required. */ - PT_EI long int - testandset (int *spinlock) - { -- int unused = 0; -- return INTERNAL_SYSCALL (xtensa, , 4, SYS_XTENSA_ATOMIC_SET, -- spinlock, 1, unused); -+ unsigned long tmp; -+ __asm__ volatile ( -+" movi %0, 0 \n" -+" wsr %0, SCOMPARE1 \n" -+" movi %0, 1 \n" -+" s32c1i %0, %1, 0 \n" -+ : "=&a" (tmp) -+ : "a" (spinlock) -+ : "memory" -+ ); -+ return tmp; -+} -+ -+PT_EI int -+__compare_and_swap (long int *p, long int oldval, long int newval) -+{ -+ unsigned long tmp; -+ unsigned long value; -+ __asm__ volatile ( -+"1: l32i %0, %2, 0 \n" -+" bne %0, %4, 2f \n" -+" wsr %0, SCOMPARE1 \n" -+" mov %1, %0 \n" -+" mov %0, %3 \n" -+" s32c1i %0, %2, 0 \n" -+" bne %1, %0, 1b \n" -+"2: \n" -+ : "=&a" (tmp), "=&a" (value) -+ : "a" (p), "a" (newval), "a" (oldval) -+ : "memory" ); -+ -+ return tmp == oldval; - } - - /* Get some notion of the current stack. Need not be exactly the top diff --git a/toolchain/uClibc/uClibc-0.9.30.3-xtensa-010-sigaction.c.patch b/toolchain/uClibc/uClibc-0.9.30.3-xtensa-010-sigaction.c.patch deleted file mode 100644 index 5717c2582c..0000000000 --- a/toolchain/uClibc/uClibc-0.9.30.3-xtensa-010-sigaction.c.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libc/sysdeps/linux/xtensa/sigaction.c 2008-09-23 21:11:02.000000000 -0700 -+++ b/libc/sysdeps/linux/xtensa/sigaction.c 2008-09-23 21:12:31.000000000 -0700 -@@ -17,6 +17,8 @@ - - #define SA_RESTORER 0x04000000 - -+extern __typeof(sigaction) __libc_sigaction; -+ - extern void __default_sa_restorer (void); - - libc_hidden_proto(memcpy) diff --git a/toolchain/uClibc/uClibc-0.9.30.3-xtensa-011-sysdep.h.patch b/toolchain/uClibc/uClibc-0.9.30.3-xtensa-011-sysdep.h.patch deleted file mode 100644 index 692b0a7222..0000000000 --- a/toolchain/uClibc/uClibc-0.9.30.3-xtensa-011-sysdep.h.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/libc/sysdeps/linux/xtensa/sysdep.h 2008-09-23 21:17:42.000000000 -0700 -+++ b/libc/sysdeps/linux/xtensa/sysdep.h 2008-09-23 21:17:59.000000000 -0700 -@@ -114,15 +114,7 @@ - - #define ret_ERRVAL retw - --#if RTLD_PRIVATE_ERRNO --# define SYSCALL_ERROR_HANDLER \ --0: movi a4, rtld_errno; \ -- neg a2, a2; \ -- s32i a2, a4, 0; \ -- movi a2, -1; \ -- j .Lpseudo_end; -- --#elif defined _LIBC_REENTRANT -+#if defined _LIBC_REENTRANT - - # if USE___THREAD - # ifndef NOT_IN_libc diff --git a/toolchain/uClibc/uClibc-0.9.30.3-xtensa-012-fnmatch_old.c.patch b/toolchain/uClibc/uClibc-0.9.30.3-xtensa-012-fnmatch_old.c.patch deleted file mode 100644 index 66cb1f6092..0000000000 --- a/toolchain/uClibc/uClibc-0.9.30.3-xtensa-012-fnmatch_old.c.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libc/misc/fnmatch/fnmatch_old.c 2008-09-23 21:23:13.000000000 -0700 -+++ b/libc/misc/fnmatch/fnmatch_old.c 2008-09-23 21:23:33.000000000 -0700 -@@ -15,7 +15,7 @@ - not, write to the Free Software Foundation, Inc., 675 Mass Ave, - Cambridge, MA 02139, USA. */ - --#if HAVE_CONFIG_H -+#ifdef HAVE_CONFIG_H - # include - #endif - diff --git a/toolchain/uClibc/uClibc-0.9.30.3-xtensa-013-atomic.h.patch b/toolchain/uClibc/uClibc-0.9.30.3-xtensa-013-atomic.h.patch deleted file mode 100644 index fd2037111d..0000000000 --- a/toolchain/uClibc/uClibc-0.9.30.3-xtensa-013-atomic.h.patch +++ /dev/null @@ -1,165 +0,0 @@ ---- /dev/null 2008-09-18 06:50:54.356228028 -0700 -+++ uClibc-0.9.29/libc/sysdeps/linux/xtensa/bits/atomic.h 2008-10-04 11:40:21.000000000 -0700 -@@ -0,0 +1,162 @@ -+/* -+ * Copyright (C) 2008 Tensilica, Inc. -+ * Contributed by Joe Taylor 2008 -+ * -+ * This file is subject to the terms and conditions of the GNU Lesser General -+ * Public License. See the file "COPYING.LIB" in the main directory of this -+ * archive for more details. -+ */ -+ -+#ifndef _XTENSA_BITS_ATOMIC_H -+#define _XTENSA_BITS_ATOMIC_H 1 -+ -+/* Xtensa has only a 32-bit form of a store-conditional instruction, -+ so just stub out the rest. */ -+ -+/* Atomically store NEWVAL in *MEM if *MEM is equal to OLDVAL. -+ Return the old *MEM value. */ -+ -+#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ -+ ({__typeof__(*(mem)) __tmp, __value; \ -+ __asm__ __volatile__( \ -+ "1: l32i %1, %2, 0 \n" \ -+ " bne %1, %4, 2f \n" \ -+ " wsr %1, SCOMPARE1 \n" \ -+ " mov %0, %1 \n" \ -+ " mov %1, %3 \n" \ -+ " s32c1i %1, %2, 0 \n" \ -+ " bne %0, %1, 1b \n" \ -+ "2: \n" \ -+ : "=&a" (__value), "=&a" (__tmp) \ -+ : "a" (mem), "a" (newval), "a" (oldval) \ -+ : "memory" ); \ -+ __tmp; \ -+ }) -+ -+/* Atomically store NEWVAL in *MEM if *MEM is equal to OLDVAL. -+ Return zero if *MEM was changed or non-zero if no exchange happened. */ -+ -+#define __arch_compare_and_exchange_bool_32_acq(mem, newval, oldval) \ -+ ({__typeof__(*(mem)) __tmp, __value; \ -+ __asm__ __volatile__( \ -+ "1: l32i %0, %2, 0 \n" \ -+ " sub %1, %4, %0 \n" \ -+ " bnez %1, 2f \n" \ -+ " wsr %0, SCOMPARE1 \n" \ -+ " mov %1, %3 \n" \ -+ " s32c1i %1, %2, 0 \n" \ -+ " bne %0, %1, 1b \n" \ -+ " movi %1, 0 \n" \ -+ "2: \n" \ -+ : "=&a" (__value), "=&a" (__tmp) \ -+ : "a" (mem), "a" (newval), "a" (oldval) \ -+ : "memory" ); \ -+ __tmp != 0; \ -+ }) -+ -+/* Store NEWVALUE in *MEM and return the old value. */ -+ -+#define __arch_exchange_32_acq(mem, newval) \ -+ ({__typeof__(*(mem)) __tmp, __value; \ -+ __asm__ __volatile__( \ -+ "1: l32i %0, %2, 0 \n" \ -+ " wsr %0, SCOMPARE1 \n" \ -+ " mov %1, %3 \n" \ -+ " s32c1i %1, %2, 0 \n" \ -+ " bne %0, %1, 1b \n" \ -+ : "=&a" (__value), "=&a" (__tmp) \ -+ : "a" (mem), "a" (newval) \ -+ : "memory" ); \ -+ __tmp; \ -+ }) -+ -+/* Add VALUE to *MEM and return the old value of *MEM. */ -+ -+#define __arch_atomic_exchange_and_add_32(mem, value) \ -+ ({__typeof__(*(mem)) __tmp, __value; \ -+ __asm__ __volatile__( \ -+ "1: l32i %0, %2, 0 \n" \ -+ " wsr %0, SCOMPARE1 \n" \ -+ " add %1, %0, %3 \n" \ -+ " s32c1i %1, %2, 0 \n" \ -+ " bne %0, %1, 1b \n" \ -+ : "=&a" (__value), "=&a" (__tmp) \ -+ : "a" (mem), "a" (value) \ -+ : "memory" ); \ -+ __tmp; \ -+ }) -+ -+/* Subtract VALUE from *MEM and return the old value of *MEM. */ -+ -+#define __arch_atomic_exchange_and_sub_32(mem, value) \ -+ ({__typeof__(*(mem)) __tmp, __value; \ -+ __asm__ __volatile__( \ -+ "1: l32i %0, %2, 0 \n" \ -+ " wsr %0, SCOMPARE1 \n" \ -+ " sub %1, %0, %3 \n" \ -+ " s32c1i %1, %2, 0 \n" \ -+ " bne %0, %1, 1b \n" \ -+ : "=&a" (__value), "=&a" (__tmp) \ -+ : "a" (mem), "a" (value) \ -+ : "memory" ); \ -+ __tmp; \ -+ }) -+ -+/* Decrement *MEM if it is > 0, and return the old value. */ -+ -+#define __arch_atomic_decrement_if_positive_32(mem) \ -+ ({__typeof__(*(mem)) __tmp, __value; \ -+ __asm__ __volatile__( \ -+ "1: l32i %0, %2, 0 \n" \ -+ " blti %0, 1, 2f \n" \ -+ " wsr %0, SCOMPARE1 \n" \ -+ " addi %1, %0, -1 \n" \ -+ " s32c1i %1, %2, 0 \n" \ -+ " bne %0, %1, 1b \n" \ -+ "2: \n" \ -+ : "=&a" (__value), "=&a" (__tmp) \ -+ : "a" (mem) \ -+ : "memory" ); \ -+ __tmp; \ -+ }) -+ -+ -+/* These are the preferred public interfaces: */ -+ -+#define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \ -+ ({ \ -+ if (sizeof (*mem) != 4) \ -+ abort(); \ -+ __arch_compare_and_exchange_val_32_acq(mem, newval, oldval); \ -+ }) -+ -+#define atomic_exchange_acq(mem, newval) \ -+ ({ \ -+ if (sizeof(*(mem)) != 4) \ -+ abort(); \ -+ __arch_exchange_32_acq(mem, newval); \ -+ }) -+ -+#define atomic_exchange_and_add(mem, newval) \ -+ ({ \ -+ if (sizeof(*(mem)) != 4) \ -+ abort(); \ -+ __arch_atomic_exchange_and_add_32(mem, newval); \ -+ }) -+ -+#define atomic_exchange_and_sub(mem, newval) \ -+ ({ \ -+ if (sizeof(*(mem)) != 4) \ -+ abort(); \ -+ __arch_atomic_exchange_and_sub_32(mem, newval); \ -+ }) -+ -+#define atomic_decrement_if_positive(mem) \ -+ ({ \ -+ if (sizeof(*(mem)) != 4) \ -+ abort(); \ -+ __arch_atomic_decrement_if_positive_32(mem); \ -+ }) -+ -+#endif /* _XTENSA_BITS_ATOMIC_H */ -+ diff --git a/toolchain/uClibc/uClibc-0.9.30.3-xtensa-014-setjump.S.patch b/toolchain/uClibc/uClibc-0.9.30.3-xtensa-014-setjump.S.patch deleted file mode 100644 index 720b44b581..0000000000 --- a/toolchain/uClibc/uClibc-0.9.30.3-xtensa-014-setjump.S.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- uClibc-0.9.30/libc/sysdeps/linux/xtensa/setjmp.S.orig 2009-05-01 16:57:16.195893000 -0700 -+++ uClibc-0.9.30/libc/sysdeps/linux/xtensa/setjmp.S 2009-05-01 16:58:03.885160000 -0700 -@@ -86,7 +86,7 @@ ENTRY (__sigsetjmp) - /* Copy 0-8 words from the register overflow area. */ - extui a3, a0, 30, 2 - blti a3, 2, .Lendsj -- l32i a7, a1, 4 -+ l32i a7, a5, 4 - slli a4, a3, 4 - sub a5, a7, a4 - addi a6, a2, 16 diff --git a/toolchain/uClibc/uClibc-0.9.30.config b/toolchain/uClibc/uClibc-0.9.30.config deleted file mode 100644 index 2202b9e14f..0000000000 --- a/toolchain/uClibc/uClibc-0.9.30.config +++ /dev/null @@ -1,247 +0,0 @@ -# -# Automatically generated make config: don't edit -# -# TARGET_alpha is not set -# TARGET_arm is not set -# TARGET_avr32 is not set -# TARGET_bfin is not set -# TARGET_cris is not set -# TARGET_e1 is not set -# TARGET_frv is not set -# TARGET_h8300 is not set -# TARGET_hppa is not set -# TARGET_i386 is not set -# TARGET_i960 is not set -# TARGET_ia64 is not set -# TARGET_m68k is not set -# TARGET_microblaze is not set -# TARGET_mips is not set -# TARGET_nios is not set -# TARGET_nios2 is not set -# TARGET_powerpc is not set -# TARGET_sh is not set -# TARGET_sh64 is not set -# TARGET_sparc is not set -# TARGET_v850 is not set -# TARGET_vax is not set -# TARGET_x86_64 is not set -# TARGET_xtensa is not set - -# -# Target Architecture Features and Options -# -TARGET_ARCH="none" -FORCE_OPTIONS_FOR_ARCH=y -# ARCH_LITTLE_ENDIAN is not set -# ARCH_BIG_ENDIAN is not set -# ARCH_WANTS_LITTLE_ENDIAN is not set -# ARCH_WANTS_BIG_ENDIAN is not set - -# -# Using Little Endian -# -ARCH_HAS_MMU=y -ARCH_USE_MMU=y -UCLIBC_HAS_FLOATS=y -UCLIBC_HAS_FPU=y -DO_C99_MATH=y -# UCLIBC_HAS_FENV is not set -UCLIBC_HAS_LONG_DOUBLE_MATH=y -KERNEL_HEADERS="/usr/src/linux/include" -HAVE_DOT_CONFIG=y - -# -# General Library Settings -# -# HAVE_NO_PIC is not set -DOPIC=y -# ARCH_HAS_NO_SHARED is not set -# ARCH_HAS_NO_LDSO is not set -HAVE_SHARED=y -FORCE_SHAREABLE_TEXT_SEGMENTS=y -LDSO_LDD_SUPPORT=y -# LDSO_CACHE_SUPPORT is not set -# LDSO_PRELOAD_FILE_SUPPORT is not set -# UCLIBC_STATIC_LDCONFIG is not set -LDSO_RUNPATH=y -UCLIBC_CTOR_DTOR=y -# LDSO_GNU_HASH_SUPPORT is not set -# HAS_NO_THREADS is not set -UCLIBC_HAS_THREADS=y -# PTHREADS_DEBUG_SUPPORT is not set -LINUXTHREADS_OLD=y -UCLIBC_HAS_SYSLOG=y -UCLIBC_HAS_LFS=y -# MALLOC is not set -# MALLOC_SIMPLE is not set -MALLOC_STANDARD=y -MALLOC_GLIBC_COMPAT=y -UCLIBC_DYNAMIC_ATEXIT=y -# COMPAT_ATEXIT is not set -# UCLIBC_SUSV3_LEGACY is not set -# UCLIBC_SUSV3_LEGACY_MACROS is not set -# UCLIBC_HAS_STUBS is not set -UCLIBC_HAS_SHADOW=y -# UCLIBC_HAS_PROGRAM_INVOCATION_NAME is not set -UCLIBC_HAS___PROGNAME=y -UCLIBC_HAS_PTY=y -ASSUME_DEVPTS=y -UNIX98PTY_ONLY=y -UCLIBC_HAS_GETPT=y -UCLIBC_HAS_TM_EXTENSIONS=y -UCLIBC_HAS_TZ_CACHING=y -UCLIBC_HAS_TZ_FILE=y -UCLIBC_HAS_TZ_FILE_READ_MANY=y -UCLIBC_TZ_FILE_PATH="/etc/TZ" - -# -# Advanced Library Settings -# -UCLIBC_PWD_BUFFER_SIZE=256 -UCLIBC_GRP_BUFFER_SIZE=256 -UCLIBC_HAS_NONREENTRANT=y - -# -# Support various families of functions -# -UCLIBC_LINUX_MODULE_24=y -UCLIBC_LINUX_SPECIFIC=y -UCLIBC_HAS_GNU_ERROR=y -UCLIBC_BSD_SPECIFIC=y -UCLIBC_HAS_BSD_ERR=y -# UCLIBC_HAS_OBSOLETE_BSD_SIGNAL is not set -# UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL is not set -# UCLIBC_NTP_LEGACY is not set -# UCLIBC_SV4_DEPRECATED is not set -UCLIBC_HAS_REALTIME=y -UCLIBC_HAS_ADVANCED_REALTIME=y -UCLIBC_HAS_EPOLL=y -UCLIBC_HAS_XATTR=y -UCLIBC_HAS_PROFILING=y -UCLIBC_HAS_CRYPT_IMPL=y -UCLIBC_HAS_CRYPT=y -UCLIBC_HAS_NETWORK_SUPPORT=y -UCLIBC_HAS_SOCKET=y -UCLIBC_HAS_IPV4=y -# UCLIBC_HAS_IPV6 is not set -# UCLIBC_HAS_RPC is not set -# UCLIBC_HAS_FULL_RPC is not set -# UCLIBC_HAS_REENTRANT_RPC is not set -UCLIBC_USE_NETLINK=y -# UCLIBC_SUPPORT_AI_ADDRCONFIG is not set -# UCLIBC_HAS_BSD_RES_CLOSE is not set - -# -# String and Stdio Support -# -# UCLIBC_HAS_STRING_GENERIC_OPT is not set -UCLIBC_HAS_STRING_ARCH_OPT=y -UCLIBC_HAS_CTYPE_TABLES=y -UCLIBC_HAS_CTYPE_SIGNED=y -# UCLIBC_HAS_CTYPE_UNSAFE is not set -# UCLIBC_HAS_CTYPE_CHECKED is not set -UCLIBC_HAS_CTYPE_ENFORCED=y -# UCLIBC_HAS_WCHAR is not set -# UCLIBC_HAS_LOCALE is not set -UCLIBC_HAS_HEXADECIMAL_FLOATS=y -UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y -# USE_OLD_VFPRINTF is not set -UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9 -UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y -# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set -# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set -# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set -# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set -# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set -UCLIBC_HAS_STDIO_BUFSIZ_4096=y -# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set -UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y -# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set -# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set -# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set -# UCLIBC_HAS_STDIO_GETC_MACRO is not set -# UCLIBC_HAS_STDIO_PUTC_MACRO is not set -UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y -# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set -UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y -UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y -UCLIBC_HAS_PRINTF_M_SPEC=y -UCLIBC_HAS_ERRNO_MESSAGES=y -# UCLIBC_HAS_SYS_ERRLIST is not set -UCLIBC_HAS_SIGNUM_MESSAGES=y -# UCLIBC_HAS_SYS_SIGLIST is not set -UCLIBC_HAS_GNU_GETOPT=y -# UCLIBC_HAS_GNU_GETSUBOPT is not set - -# -# Big and Tall -# -UCLIBC_HAS_REGEX=y -# UCLIBC_HAS_REGEX_OLD is not set -UCLIBC_HAS_FNMATCH=y -# UCLIBC_HAS_FNMATCH_OLD is not set -# UCLIBC_HAS_WORDEXP is not set -UCLIBC_HAS_FTW=y -UCLIBC_HAS_GLOB=y -UCLIBC_HAS_GNU_GLOB=y - -# -# Library Installation Options -# -SHARED_LIB_LOADER_PREFIX="/lib" -RUNTIME_PREFIX="/" -DEVEL_PREFIX="/usr/" - -# -# Security options -# -# UCLIBC_BUILD_PIE is not set -# UCLIBC_HAS_ARC4RANDOM is not set -# HAVE_NO_SSP is not set -UCLIBC_HAS_SSP=y -# UCLIBC_HAS_SSP_COMPAT is not set -# SSP_QUICK_CANARY is not set -PROPOLICE_BLOCK_ABRT=y -# PROPOLICE_BLOCK_SEGV is not set -# UCLIBC_BUILD_SSP is not set -UCLIBC_BUILD_RELRO=y -UCLIBC_BUILD_NOW=y -UCLIBC_BUILD_NOEXECSTACK=y - -# -# uClibc development/debugging options -# -CROSS_COMPILER_PREFIX="" -UCLIBC_EXTRA_CFLAGS="" -# DODEBUG is not set -# DODEBUG_PT is not set -DOSTRIP=y -# DOASSERTS is not set -# SUPPORT_LD_DEBUG is not set -# SUPPORT_LD_DEBUG_EARLY is not set -# UCLIBC_MALLOC_DEBUGGING is not set -WARNINGS="-Wall" -# EXTRA_WARNINGS is not set -# DOMULTI is not set -# UCLIBC_MJN3_ONLY is not set - -# USE_BX is not set -# CONFIG_GENERIC_ARM is not set -# CONFIG_ARM610 is not set -# CONFIG_ARM710 is not set -# CONFIG_ARM7TDMI is not set -# CONFIG_ARM720T is not set -# CONFIG_ARM920T is not set -# CONFIG_ARM922T is not set -# CONFIG_ARM926T is not set -# CONFIG_ARM10T is not set -# CONFIG_ARM1136JF_S is not set -# CONFIG_ARM1176JZ_S is not set -# CONFIG_ARM1176JZF_S is not set -# CONFIG_ARM_CORTEX_M3 is not set -# CONFIG_ARM_CORTEX_M1 is not set -# CONFIG_ARM_SA110 is not set -# CONFIG_ARM_SA1100 is not set -# CONFIG_ARM_XSCALE is not set -# CONFIG_ARM_IWMMXT is not set - diff --git a/toolchain/uClibc/uClibc-0.9.31-dnslookup-use-after-free.patch b/toolchain/uClibc/uClibc-0.9.31-dnslookup-use-after-free.patch deleted file mode 100644 index 9956d591a0..0000000000 --- a/toolchain/uClibc/uClibc-0.9.31-dnslookup-use-after-free.patch +++ /dev/null @@ -1,36 +0,0 @@ -From eb1d8c8289f466ba3ad10b9a88ab2e426b8a9dc7 Mon Sep 17 00:00:00 2001 -From: Gabor Juhos -Date: Tue, 6 Apr 2010 09:55:19 +0200 -Subject: [PATCH] Fix use-after-free bug in __dns_lookup - -If the type of the first answer does not match with the requested type, -then the dotted name was freed. If there are no further answers in -the DNS reply, this pointer was used later on in the same function. -Additionally it is passed to the caller, and caused strange -behaviour. - -Signed-off-by: Gabor Juhos -Signed-off-by: Bernhard Reutner-Fischer ---- - libc/inet/resolv.c | 4 +--- - 1 files changed, 1 insertions(+), 3 deletions(-) - -diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c -index 056539f..9459199 100644 ---- a/libc/inet/resolv.c -+++ b/libc/inet/resolv.c -@@ -1517,10 +1517,8 @@ int attribute_hidden __dns_lookup(const char *name, - memcpy(a, &ma, sizeof(ma)); - if (a->atype != T_SIG && (NULL == a->buf || (type != T_A && type != T_AAAA))) - break; -- if (a->atype != type) { -- free(a->dotted); -+ if (a->atype != type) - continue; -- } - a->add_count = h.ancount - j - 1; - if ((a->rdlength + sizeof(struct in_addr*)) * a->add_count > a->buflen) - break; --- -1.7.0 - diff --git a/toolchain/uClibc/uClibc-0.9.31-fix-fcntl64-for-64-bit-targets.patch b/toolchain/uClibc/uClibc-0.9.31-fix-fcntl64-for-64-bit-targets.patch deleted file mode 100644 index 763bfd39d7..0000000000 --- a/toolchain/uClibc/uClibc-0.9.31-fix-fcntl64-for-64-bit-targets.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 6f1daaaf2d94c1e6184add44eda38b0781b88cf0 Mon Sep 17 00:00:00 2001 -From: Rob Landley -Date: Sun, 16 May 2010 21:41:36 +0000 -Subject: Fix fcntl64 for 64 bit targets. - -64 bit targets often don't have a separate fcntl64() system call, because they don't need one. - -Signed-off-by: Rob Landley -Signed-off-by: Austin Foxley ---- -diff --git a/include/fcntl.h b/include/fcntl.h -index e37073f..3cfb25f 100644 ---- a/include/fcntl.h -+++ b/include/fcntl.h -@@ -73,7 +73,7 @@ __BEGIN_DECLS - - This function is a cancellation point and therefore not marked with - __THROW. */ --#ifndef __USE_FILE_OFFSET64 -+#if !defined(__USE_FILE_OFFSET64) || defined(__LP64__) - extern int fcntl (int __fd, int __cmd, ...); - libc_hidden_proto(fcntl) - #else -@@ -83,7 +83,7 @@ extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64); - # define fcntl fcntl64 - # endif - #endif --#ifdef __USE_LARGEFILE64 -+#if defined(__USE_LARGEFILE64) && !defined(__LP64__) - extern int fcntl64 (int __fd, int __cmd, ...); - libc_hidden_proto(fcntl64) - #endif --- -cgit v0.8.2.1 diff --git a/toolchain/uClibc/uClibc-0.9.31-powerpc-ptrace-fix.patch b/toolchain/uClibc/uClibc-0.9.31-powerpc-ptrace-fix.patch deleted file mode 100644 index a5ccecaa3f..0000000000 --- a/toolchain/uClibc/uClibc-0.9.31-powerpc-ptrace-fix.patch +++ /dev/null @@ -1,62 +0,0 @@ -[PATCH] powerpc: add PTRACE_EVENT_ defines needed by ltrace - -Equivalent to the common version and kernel headers. - -Signed-off-by: Peter Korsgaard ---- - libc/sysdeps/linux/powerpc/sys/ptrace.h | 41 +++++++++++++++++++++++++++++++- - 1 file changed, 40 insertions(+), 1 deletion(-) - -Index: uClibc-0.9.31/libc/sysdeps/linux/powerpc/sys/ptrace.h -=================================================================== ---- uClibc-0.9.31.orig/libc/sysdeps/linux/powerpc/sys/ptrace.h -+++ uClibc-0.9.31/libc/sysdeps/linux/powerpc/sys/ptrace.h -@@ -79,8 +79,47 @@ enum __ptrace_request - #define PT_DETACH PTRACE_DETACH - - /* Continue and stop at the next (return from) syscall. */ -- PTRACE_SYSCALL = 24 -+ PTRACE_SYSCALL = 24, - #define PT_SYSCALL PTRACE_SYSCALL -+ -+ /* Set ptrace filter options. */ -+ PTRACE_SETOPTIONS = 0x4200, -+#define PT_SETOPTIONS PTRACE_SETOPTIONS -+ -+ /* Get last ptrace message. */ -+ PTRACE_GETEVENTMSG = 0x4201, -+#define PT_GETEVENTMSG PTRACE_GETEVENTMSG -+ -+ /* Get siginfo for process. */ -+ PTRACE_GETSIGINFO = 0x4202, -+#define PT_GETSIGINFO PTRACE_GETSIGINFO -+ -+ /* Set new siginfo for process. */ -+ PTRACE_SETSIGINFO = 0x4203 -+#define PT_SETSIGINFO PTRACE_SETSIGINFO -+}; -+ -+ -+/* Options set using PTRACE_SETOPTIONS. */ -+enum __ptrace_setoptions { -+ PTRACE_O_TRACESYSGOOD = 0x00000001, -+ PTRACE_O_TRACEFORK = 0x00000002, -+ PTRACE_O_TRACEVFORK = 0x00000004, -+ PTRACE_O_TRACECLONE = 0x00000008, -+ PTRACE_O_TRACEEXEC = 0x00000010, -+ PTRACE_O_TRACEVFORKDONE = 0x00000020, -+ PTRACE_O_TRACEEXIT = 0x00000040, -+ PTRACE_O_MASK = 0x0000007f -+}; -+ -+/* Wait extended result codes for the above trace options. */ -+enum __ptrace_eventcodes { -+ PTRACE_EVENT_FORK = 1, -+ PTRACE_EVENT_VFORK = 2, -+ PTRACE_EVENT_CLONE = 3, -+ PTRACE_EVENT_EXEC = 4, -+ PTRACE_EVENT_VFORK_DONE = 5, -+ PTRACE_EVENT_EXIT = 6 - }; - - /* Perform process tracing functions. REQUEST is one of the values diff --git a/toolchain/uClibc/uClibc-0.9.31-quad-routines.patch b/toolchain/uClibc/uClibc-0.9.31-quad-routines.patch deleted file mode 100644 index de37c30370..0000000000 --- a/toolchain/uClibc/uClibc-0.9.31-quad-routines.patch +++ /dev/null @@ -1,7393 +0,0 @@ -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/Makefile.arch uClibc-0.9.31/libc/sysdeps/linux/sparc/Makefile.arch ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/Makefile.arch 2010-10-14 14:03:46.000000000 +0200 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/Makefile.arch 2010-10-14 14:36:34.000000000 +0200 -@@ -5,8 +5,15 @@ - # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. - # - --CSRC := brk.c __syscall_error.c qp_ops.c sigaction.c -+CSRC := brk.c __syscall_error.c sigaction.c - - SSRC := \ - __longjmp.S fork.S vfork.S clone.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \ - syscall.S urem.S udiv.S umul.S sdiv.S rem.S pipe.S -+ -+CSRC += $(foreach f, \ -+ q_div.c q_fle.c q_mul.c q_qtoll.c q_stoq.c \ -+ mp_clz_tab.c q_dtoq.c q_flt.c q_neg.c q_qtos.c q_sub.c \ -+ q_add.c q_feq.c q_fne.c q_qtod.c q_qtou.c q_ulltoq.c \ -+ q_cmp.c q_fge.c q_itoq.c q_qtoull.c q_util.c \ -+ q_cmpe.c q_fgt.c q_lltoq.c q_qtoi.c q_sqrt.c q_utoq.c, soft-fp/$(f)) -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/double.h uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/double.h ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/double.h 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/double.h 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,264 @@ -+/* Software floating-point emulation. -+ Definitions for IEEE Double Precision -+ Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com), -+ Jakub Jelinek (jj@ultra.linux.cz), -+ David S. Miller (davem@redhat.com) and -+ Peter Maydell (pmaydell@chiark.greenend.org.uk). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ In addition to the permissions in the GNU Lesser General Public -+ License, the Free Software Foundation gives you unlimited -+ permission to link the compiled version of this file into -+ combinations with other programs, and to distribute those -+ combinations without any restriction coming from the use of this -+ file. (The Lesser General Public License restrictions do apply in -+ other respects; for example, they cover modification of the file, -+ and distribution when not linked into a combine executable.) -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, -+ MA 02110-1301, USA. */ -+ -+#if _FP_W_TYPE_SIZE < 32 -+#error "Here's a nickel kid. Go buy yourself a real computer." -+#endif -+ -+#if _FP_W_TYPE_SIZE < 64 -+#define _FP_FRACTBITS_D (2 * _FP_W_TYPE_SIZE) -+#else -+#define _FP_FRACTBITS_D _FP_W_TYPE_SIZE -+#endif -+ -+#define _FP_FRACBITS_D 53 -+#define _FP_FRACXBITS_D (_FP_FRACTBITS_D - _FP_FRACBITS_D) -+#define _FP_WFRACBITS_D (_FP_WORKBITS + _FP_FRACBITS_D) -+#define _FP_WFRACXBITS_D (_FP_FRACTBITS_D - _FP_WFRACBITS_D) -+#define _FP_EXPBITS_D 11 -+#define _FP_EXPBIAS_D 1023 -+#define _FP_EXPMAX_D 2047 -+ -+#define _FP_QNANBIT_D \ -+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_D-2) % _FP_W_TYPE_SIZE) -+#define _FP_QNANBIT_SH_D \ -+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_D-2+_FP_WORKBITS) % _FP_W_TYPE_SIZE) -+#define _FP_IMPLBIT_D \ -+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_D-1) % _FP_W_TYPE_SIZE) -+#define _FP_IMPLBIT_SH_D \ -+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_D-1+_FP_WORKBITS) % _FP_W_TYPE_SIZE) -+#define _FP_OVERFLOW_D \ -+ ((_FP_W_TYPE)1 << _FP_WFRACBITS_D % _FP_W_TYPE_SIZE) -+ -+typedef float DFtype __attribute__((mode(DF))); -+ -+#if _FP_W_TYPE_SIZE < 64 -+ -+union _FP_UNION_D -+{ -+ DFtype flt; -+ struct { -+#if __BYTE_ORDER == __BIG_ENDIAN -+ unsigned sign : 1; -+ unsigned exp : _FP_EXPBITS_D; -+ unsigned frac1 : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0) - _FP_W_TYPE_SIZE; -+ unsigned frac0 : _FP_W_TYPE_SIZE; -+#else -+ unsigned frac0 : _FP_W_TYPE_SIZE; -+ unsigned frac1 : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0) - _FP_W_TYPE_SIZE; -+ unsigned exp : _FP_EXPBITS_D; -+ unsigned sign : 1; -+#endif -+ } bits __attribute__((packed)); -+}; -+ -+#define FP_DECL_D(X) _FP_DECL(2,X) -+#define FP_UNPACK_RAW_D(X,val) _FP_UNPACK_RAW_2(D,X,val) -+#define FP_UNPACK_RAW_DP(X,val) _FP_UNPACK_RAW_2_P(D,X,val) -+#define FP_PACK_RAW_D(val,X) _FP_PACK_RAW_2(D,val,X) -+#define FP_PACK_RAW_DP(val,X) \ -+ do { \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_2_P(D,val,X); \ -+ } while (0) -+ -+#define FP_UNPACK_D(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_2(D,X,val); \ -+ _FP_UNPACK_CANONICAL(D,2,X); \ -+ } while (0) -+ -+#define FP_UNPACK_DP(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_2_P(D,X,val); \ -+ _FP_UNPACK_CANONICAL(D,2,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_D(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_2(D,X,val); \ -+ _FP_UNPACK_SEMIRAW(D,2,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_DP(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_2_P(D,X,val); \ -+ _FP_UNPACK_SEMIRAW(D,2,X); \ -+ } while (0) -+ -+#define FP_PACK_D(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(D,2,X); \ -+ _FP_PACK_RAW_2(D,val,X); \ -+ } while (0) -+ -+#define FP_PACK_DP(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(D,2,X); \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_2_P(D,val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_D(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(D,2,X); \ -+ _FP_PACK_RAW_2(D,val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_DP(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(D,2,X); \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_2_P(D,val,X); \ -+ } while (0) -+ -+#define FP_ISSIGNAN_D(X) _FP_ISSIGNAN(D,2,X) -+#define FP_NEG_D(R,X) _FP_NEG(D,2,R,X) -+#define FP_ADD_D(R,X,Y) _FP_ADD(D,2,R,X,Y) -+#define FP_SUB_D(R,X,Y) _FP_SUB(D,2,R,X,Y) -+#define FP_MUL_D(R,X,Y) _FP_MUL(D,2,R,X,Y) -+#define FP_DIV_D(R,X,Y) _FP_DIV(D,2,R,X,Y) -+#define FP_SQRT_D(R,X) _FP_SQRT(D,2,R,X) -+#define _FP_SQRT_MEAT_D(R,S,T,X,Q) _FP_SQRT_MEAT_2(R,S,T,X,Q) -+ -+#define FP_CMP_D(r,X,Y,un) _FP_CMP(D,2,r,X,Y,un) -+#define FP_CMP_EQ_D(r,X,Y) _FP_CMP_EQ(D,2,r,X,Y) -+#define FP_CMP_UNORD_D(r,X,Y) _FP_CMP_UNORD(D,2,r,X,Y) -+ -+#define FP_TO_INT_D(r,X,rsz,rsg) _FP_TO_INT(D,2,r,X,rsz,rsg) -+#define FP_FROM_INT_D(X,r,rs,rt) _FP_FROM_INT(D,2,X,r,rs,rt) -+ -+#define _FP_FRAC_HIGH_D(X) _FP_FRAC_HIGH_2(X) -+#define _FP_FRAC_HIGH_RAW_D(X) _FP_FRAC_HIGH_2(X) -+ -+#else -+ -+union _FP_UNION_D -+{ -+ DFtype flt; -+ struct { -+#if __BYTE_ORDER == __BIG_ENDIAN -+ unsigned sign : 1; -+ unsigned exp : _FP_EXPBITS_D; -+ _FP_W_TYPE frac : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0); -+#else -+ _FP_W_TYPE frac : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0); -+ unsigned exp : _FP_EXPBITS_D; -+ unsigned sign : 1; -+#endif -+ } bits __attribute__((packed)); -+}; -+ -+#define FP_DECL_D(X) _FP_DECL(1,X) -+#define FP_UNPACK_RAW_D(X,val) _FP_UNPACK_RAW_1(D,X,val) -+#define FP_UNPACK_RAW_DP(X,val) _FP_UNPACK_RAW_1_P(D,X,val) -+#define FP_PACK_RAW_D(val,X) _FP_PACK_RAW_1(D,val,X) -+#define FP_PACK_RAW_DP(val,X) \ -+ do { \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_1_P(D,val,X); \ -+ } while (0) -+ -+#define FP_UNPACK_D(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_1(D,X,val); \ -+ _FP_UNPACK_CANONICAL(D,1,X); \ -+ } while (0) -+ -+#define FP_UNPACK_DP(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_1_P(D,X,val); \ -+ _FP_UNPACK_CANONICAL(D,1,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_D(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_2(1,X,val); \ -+ _FP_UNPACK_SEMIRAW(D,1,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_DP(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_2_P(1,X,val); \ -+ _FP_UNPACK_SEMIRAW(D,1,X); \ -+ } while (0) -+ -+#define FP_PACK_D(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(D,1,X); \ -+ _FP_PACK_RAW_1(D,val,X); \ -+ } while (0) -+ -+#define FP_PACK_DP(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(D,1,X); \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_1_P(D,val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_D(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(D,1,X); \ -+ _FP_PACK_RAW_1(D,val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_DP(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(D,1,X); \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_1_P(D,val,X); \ -+ } while (0) -+ -+#define FP_ISSIGNAN_D(X) _FP_ISSIGNAN(D,1,X) -+#define FP_NEG_D(R,X) _FP_NEG(D,1,R,X) -+#define FP_ADD_D(R,X,Y) _FP_ADD(D,1,R,X,Y) -+#define FP_SUB_D(R,X,Y) _FP_SUB(D,1,R,X,Y) -+#define FP_MUL_D(R,X,Y) _FP_MUL(D,1,R,X,Y) -+#define FP_DIV_D(R,X,Y) _FP_DIV(D,1,R,X,Y) -+#define FP_SQRT_D(R,X) _FP_SQRT(D,1,R,X) -+#define _FP_SQRT_MEAT_D(R,S,T,X,Q) _FP_SQRT_MEAT_1(R,S,T,X,Q) -+ -+/* The implementation of _FP_MUL_D and _FP_DIV_D should be chosen by -+ the target machine. */ -+ -+#define FP_CMP_D(r,X,Y,un) _FP_CMP(D,1,r,X,Y,un) -+#define FP_CMP_EQ_D(r,X,Y) _FP_CMP_EQ(D,1,r,X,Y) -+#define FP_CMP_UNORD_D(r,X,Y) _FP_CMP_UNORD(D,1,r,X,Y) -+ -+#define FP_TO_INT_D(r,X,rsz,rsg) _FP_TO_INT(D,1,r,X,rsz,rsg) -+#define FP_FROM_INT_D(X,r,rs,rt) _FP_FROM_INT(D,1,X,r,rs,rt) -+ -+#define _FP_FRAC_HIGH_D(X) _FP_FRAC_HIGH_1(X) -+#define _FP_FRAC_HIGH_RAW_D(X) _FP_FRAC_HIGH_1(X) -+ -+#endif /* W_TYPE_SIZE < 64 */ -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/extended.h uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/extended.h ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/extended.h 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/extended.h 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,431 @@ -+/* Software floating-point emulation. -+ Definitions for IEEE Extended Precision. -+ Copyright (C) 1999,2006,2007 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ In addition to the permissions in the GNU Lesser General Public -+ License, the Free Software Foundation gives you unlimited -+ permission to link the compiled version of this file into -+ combinations with other programs, and to distribute those -+ combinations without any restriction coming from the use of this -+ file. (The Lesser General Public License restrictions do apply in -+ other respects; for example, they cover modification of the file, -+ and distribution when not linked into a combine executable.) -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, -+ MA 02110-1301, USA. */ -+ -+#if _FP_W_TYPE_SIZE < 32 -+#error "Here's a nickel, kid. Go buy yourself a real computer." -+#endif -+ -+#if _FP_W_TYPE_SIZE < 64 -+#define _FP_FRACTBITS_E (4*_FP_W_TYPE_SIZE) -+#else -+#define _FP_FRACTBITS_E (2*_FP_W_TYPE_SIZE) -+#endif -+ -+#define _FP_FRACBITS_E 64 -+#define _FP_FRACXBITS_E (_FP_FRACTBITS_E - _FP_FRACBITS_E) -+#define _FP_WFRACBITS_E (_FP_WORKBITS + _FP_FRACBITS_E) -+#define _FP_WFRACXBITS_E (_FP_FRACTBITS_E - _FP_WFRACBITS_E) -+#define _FP_EXPBITS_E 15 -+#define _FP_EXPBIAS_E 16383 -+#define _FP_EXPMAX_E 32767 -+ -+#define _FP_QNANBIT_E \ -+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_E-2) % _FP_W_TYPE_SIZE) -+#define _FP_QNANBIT_SH_E \ -+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_E-2+_FP_WORKBITS) % _FP_W_TYPE_SIZE) -+#define _FP_IMPLBIT_E \ -+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_E-1) % _FP_W_TYPE_SIZE) -+#define _FP_IMPLBIT_SH_E \ -+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_E-1+_FP_WORKBITS) % _FP_W_TYPE_SIZE) -+#define _FP_OVERFLOW_E \ -+ ((_FP_W_TYPE)1 << (_FP_WFRACBITS_E % _FP_W_TYPE_SIZE)) -+ -+typedef float XFtype __attribute__((mode(XF))); -+ -+#if _FP_W_TYPE_SIZE < 64 -+ -+union _FP_UNION_E -+{ -+ XFtype flt; -+ struct -+ { -+#if __BYTE_ORDER == __BIG_ENDIAN -+ unsigned long pad1 : _FP_W_TYPE_SIZE; -+ unsigned long pad2 : (_FP_W_TYPE_SIZE - 1 - _FP_EXPBITS_E); -+ unsigned long sign : 1; -+ unsigned long exp : _FP_EXPBITS_E; -+ unsigned long frac1 : _FP_W_TYPE_SIZE; -+ unsigned long frac0 : _FP_W_TYPE_SIZE; -+#else -+ unsigned long frac0 : _FP_W_TYPE_SIZE; -+ unsigned long frac1 : _FP_W_TYPE_SIZE; -+ unsigned exp : _FP_EXPBITS_E; -+ unsigned sign : 1; -+#endif /* not bigendian */ -+ } bits __attribute__((packed)); -+}; -+ -+ -+#define FP_DECL_E(X) _FP_DECL(4,X) -+ -+#define FP_UNPACK_RAW_E(X, val) \ -+ do { \ -+ union _FP_UNION_E _flo; _flo.flt = (val); \ -+ \ -+ X##_f[2] = 0; X##_f[3] = 0; \ -+ X##_f[0] = _flo.bits.frac0; \ -+ X##_f[1] = _flo.bits.frac1; \ -+ X##_e = _flo.bits.exp; \ -+ X##_s = _flo.bits.sign; \ -+ } while (0) -+ -+#define FP_UNPACK_RAW_EP(X, val) \ -+ do { \ -+ union _FP_UNION_E *_flo = \ -+ (union _FP_UNION_E *)(val); \ -+ \ -+ X##_f[2] = 0; X##_f[3] = 0; \ -+ X##_f[0] = _flo->bits.frac0; \ -+ X##_f[1] = _flo->bits.frac1; \ -+ X##_e = _flo->bits.exp; \ -+ X##_s = _flo->bits.sign; \ -+ } while (0) -+ -+#define FP_PACK_RAW_E(val, X) \ -+ do { \ -+ union _FP_UNION_E _flo; \ -+ \ -+ if (X##_e) X##_f[1] |= _FP_IMPLBIT_E; \ -+ else X##_f[1] &= ~(_FP_IMPLBIT_E); \ -+ _flo.bits.frac0 = X##_f[0]; \ -+ _flo.bits.frac1 = X##_f[1]; \ -+ _flo.bits.exp = X##_e; \ -+ _flo.bits.sign = X##_s; \ -+ \ -+ (val) = _flo.flt; \ -+ } while (0) -+ -+#define FP_PACK_RAW_EP(val, X) \ -+ do { \ -+ if (!FP_INHIBIT_RESULTS) \ -+ { \ -+ union _FP_UNION_E *_flo = \ -+ (union _FP_UNION_E *)(val); \ -+ \ -+ if (X##_e) X##_f[1] |= _FP_IMPLBIT_E; \ -+ else X##_f[1] &= ~(_FP_IMPLBIT_E); \ -+ _flo->bits.frac0 = X##_f[0]; \ -+ _flo->bits.frac1 = X##_f[1]; \ -+ _flo->bits.exp = X##_e; \ -+ _flo->bits.sign = X##_s; \ -+ } \ -+ } while (0) -+ -+#define FP_UNPACK_E(X,val) \ -+ do { \ -+ FP_UNPACK_RAW_E(X,val); \ -+ _FP_UNPACK_CANONICAL(E,4,X); \ -+ } while (0) -+ -+#define FP_UNPACK_EP(X,val) \ -+ do { \ -+ FP_UNPACK_RAW_EP(X,val); \ -+ _FP_UNPACK_CANONICAL(E,4,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_E(X,val) \ -+ do { \ -+ FP_UNPACK_RAW_E(X,val); \ -+ _FP_UNPACK_SEMIRAW(E,4,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_EP(X,val) \ -+ do { \ -+ FP_UNPACK_RAW_EP(X,val); \ -+ _FP_UNPACK_SEMIRAW(E,4,X); \ -+ } while (0) -+ -+#define FP_PACK_E(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(E,4,X); \ -+ FP_PACK_RAW_E(val,X); \ -+ } while (0) -+ -+#define FP_PACK_EP(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(E,4,X); \ -+ FP_PACK_RAW_EP(val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_E(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(E,4,X); \ -+ FP_PACK_RAW_E(val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_EP(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(E,4,X); \ -+ FP_PACK_RAW_EP(val,X); \ -+ } while (0) -+ -+#define FP_ISSIGNAN_E(X) _FP_ISSIGNAN(E,4,X) -+#define FP_NEG_E(R,X) _FP_NEG(E,4,R,X) -+#define FP_ADD_E(R,X,Y) _FP_ADD(E,4,R,X,Y) -+#define FP_SUB_E(R,X,Y) _FP_SUB(E,4,R,X,Y) -+#define FP_MUL_E(R,X,Y) _FP_MUL(E,4,R,X,Y) -+#define FP_DIV_E(R,X,Y) _FP_DIV(E,4,R,X,Y) -+#define FP_SQRT_E(R,X) _FP_SQRT(E,4,R,X) -+ -+/* -+ * Square root algorithms: -+ * We have just one right now, maybe Newton approximation -+ * should be added for those machines where division is fast. -+ * This has special _E version because standard _4 square -+ * root would not work (it has to start normally with the -+ * second word and not the first), but as we have to do it -+ * anyway, we optimize it by doing most of the calculations -+ * in two UWtype registers instead of four. -+ */ -+ -+#define _FP_SQRT_MEAT_E(R, S, T, X, q) \ -+ do { \ -+ q = (_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE - 1); \ -+ _FP_FRAC_SRL_4(X, (_FP_WORKBITS)); \ -+ while (q) \ -+ { \ -+ T##_f[1] = S##_f[1] + q; \ -+ if (T##_f[1] <= X##_f[1]) \ -+ { \ -+ S##_f[1] = T##_f[1] + q; \ -+ X##_f[1] -= T##_f[1]; \ -+ R##_f[1] += q; \ -+ } \ -+ _FP_FRAC_SLL_2(X, 1); \ -+ q >>= 1; \ -+ } \ -+ q = (_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE - 1); \ -+ while (q) \ -+ { \ -+ T##_f[0] = S##_f[0] + q; \ -+ T##_f[1] = S##_f[1]; \ -+ if (T##_f[1] < X##_f[1] || \ -+ (T##_f[1] == X##_f[1] && \ -+ T##_f[0] <= X##_f[0])) \ -+ { \ -+ S##_f[0] = T##_f[0] + q; \ -+ S##_f[1] += (T##_f[0] > S##_f[0]); \ -+ _FP_FRAC_DEC_2(X, T); \ -+ R##_f[0] += q; \ -+ } \ -+ _FP_FRAC_SLL_2(X, 1); \ -+ q >>= 1; \ -+ } \ -+ _FP_FRAC_SLL_4(R, (_FP_WORKBITS)); \ -+ if (X##_f[0] | X##_f[1]) \ -+ { \ -+ if (S##_f[1] < X##_f[1] || \ -+ (S##_f[1] == X##_f[1] && \ -+ S##_f[0] < X##_f[0])) \ -+ R##_f[0] |= _FP_WORK_ROUND; \ -+ R##_f[0] |= _FP_WORK_STICKY; \ -+ } \ -+ } while (0) -+ -+#define FP_CMP_E(r,X,Y,un) _FP_CMP(E,4,r,X,Y,un) -+#define FP_CMP_EQ_E(r,X,Y) _FP_CMP_EQ(E,4,r,X,Y) -+#define FP_CMP_UNORD_E(r,X,Y) _FP_CMP_UNORD(E,4,r,X,Y) -+ -+#define FP_TO_INT_E(r,X,rsz,rsg) _FP_TO_INT(E,4,r,X,rsz,rsg) -+#define FP_FROM_INT_E(X,r,rs,rt) _FP_FROM_INT(E,4,X,r,rs,rt) -+ -+#define _FP_FRAC_HIGH_E(X) (X##_f[2]) -+#define _FP_FRAC_HIGH_RAW_E(X) (X##_f[1]) -+ -+#else /* not _FP_W_TYPE_SIZE < 64 */ -+union _FP_UNION_E -+{ -+ XFtype flt; -+ struct { -+#if __BYTE_ORDER == __BIG_ENDIAN -+ _FP_W_TYPE pad : (_FP_W_TYPE_SIZE - 1 - _FP_EXPBITS_E); -+ unsigned sign : 1; -+ unsigned exp : _FP_EXPBITS_E; -+ _FP_W_TYPE frac : _FP_W_TYPE_SIZE; -+#else -+ _FP_W_TYPE frac : _FP_W_TYPE_SIZE; -+ unsigned exp : _FP_EXPBITS_E; -+ unsigned sign : 1; -+#endif -+ } bits; -+}; -+ -+#define FP_DECL_E(X) _FP_DECL(2,X) -+ -+#define FP_UNPACK_RAW_E(X, val) \ -+ do { \ -+ union _FP_UNION_E _flo; _flo.flt = (val); \ -+ \ -+ X##_f0 = _flo.bits.frac; \ -+ X##_f1 = 0; \ -+ X##_e = _flo.bits.exp; \ -+ X##_s = _flo.bits.sign; \ -+ } while (0) -+ -+#define FP_UNPACK_RAW_EP(X, val) \ -+ do { \ -+ union _FP_UNION_E *_flo = \ -+ (union _FP_UNION_E *)(val); \ -+ \ -+ X##_f0 = _flo->bits.frac; \ -+ X##_f1 = 0; \ -+ X##_e = _flo->bits.exp; \ -+ X##_s = _flo->bits.sign; \ -+ } while (0) -+ -+#define FP_PACK_RAW_E(val, X) \ -+ do { \ -+ union _FP_UNION_E _flo; \ -+ \ -+ if (X##_e) X##_f0 |= _FP_IMPLBIT_E; \ -+ else X##_f0 &= ~(_FP_IMPLBIT_E); \ -+ _flo.bits.frac = X##_f0; \ -+ _flo.bits.exp = X##_e; \ -+ _flo.bits.sign = X##_s; \ -+ \ -+ (val) = _flo.flt; \ -+ } while (0) -+ -+#define FP_PACK_RAW_EP(fs, val, X) \ -+ do { \ -+ if (!FP_INHIBIT_RESULTS) \ -+ { \ -+ union _FP_UNION_E *_flo = \ -+ (union _FP_UNION_E *)(val); \ -+ \ -+ if (X##_e) X##_f0 |= _FP_IMPLBIT_E; \ -+ else X##_f0 &= ~(_FP_IMPLBIT_E); \ -+ _flo->bits.frac = X##_f0; \ -+ _flo->bits.exp = X##_e; \ -+ _flo->bits.sign = X##_s; \ -+ } \ -+ } while (0) -+ -+ -+#define FP_UNPACK_E(X,val) \ -+ do { \ -+ FP_UNPACK_RAW_E(X,val); \ -+ _FP_UNPACK_CANONICAL(E,2,X); \ -+ } while (0) -+ -+#define FP_UNPACK_EP(X,val) \ -+ do { \ -+ FP_UNPACK_RAW_EP(X,val); \ -+ _FP_UNPACK_CANONICAL(E,2,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_E(X,val) \ -+ do { \ -+ FP_UNPACK_RAW_E(X,val); \ -+ _FP_UNPACK_SEMIRAW(E,2,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_EP(X,val) \ -+ do { \ -+ FP_UNPACK_RAW_EP(X,val); \ -+ _FP_UNPACK_SEMIRAW(E,2,X); \ -+ } while (0) -+ -+#define FP_PACK_E(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(E,2,X); \ -+ FP_PACK_RAW_E(val,X); \ -+ } while (0) -+ -+#define FP_PACK_EP(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(E,2,X); \ -+ FP_PACK_RAW_EP(val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_E(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(E,2,X); \ -+ FP_PACK_RAW_E(val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_EP(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(E,2,X); \ -+ FP_PACK_RAW_EP(val,X); \ -+ } while (0) -+ -+#define FP_ISSIGNAN_E(X) _FP_ISSIGNAN(E,2,X) -+#define FP_NEG_E(R,X) _FP_NEG(E,2,R,X) -+#define FP_ADD_E(R,X,Y) _FP_ADD(E,2,R,X,Y) -+#define FP_SUB_E(R,X,Y) _FP_SUB(E,2,R,X,Y) -+#define FP_MUL_E(R,X,Y) _FP_MUL(E,2,R,X,Y) -+#define FP_DIV_E(R,X,Y) _FP_DIV(E,2,R,X,Y) -+#define FP_SQRT_E(R,X) _FP_SQRT(E,2,R,X) -+ -+/* -+ * Square root algorithms: -+ * We have just one right now, maybe Newton approximation -+ * should be added for those machines where division is fast. -+ * We optimize it by doing most of the calculations -+ * in one UWtype registers instead of two, although we don't -+ * have to. -+ */ -+#define _FP_SQRT_MEAT_E(R, S, T, X, q) \ -+ do { \ -+ q = (_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE - 1); \ -+ _FP_FRAC_SRL_2(X, (_FP_WORKBITS)); \ -+ while (q) \ -+ { \ -+ T##_f0 = S##_f0 + q; \ -+ if (T##_f0 <= X##_f0) \ -+ { \ -+ S##_f0 = T##_f0 + q; \ -+ X##_f0 -= T##_f0; \ -+ R##_f0 += q; \ -+ } \ -+ _FP_FRAC_SLL_1(X, 1); \ -+ q >>= 1; \ -+ } \ -+ _FP_FRAC_SLL_2(R, (_FP_WORKBITS)); \ -+ if (X##_f0) \ -+ { \ -+ if (S##_f0 < X##_f0) \ -+ R##_f0 |= _FP_WORK_ROUND; \ -+ R##_f0 |= _FP_WORK_STICKY; \ -+ } \ -+ } while (0) -+ -+#define FP_CMP_E(r,X,Y,un) _FP_CMP(E,2,r,X,Y,un) -+#define FP_CMP_EQ_E(r,X,Y) _FP_CMP_EQ(E,2,r,X,Y) -+#define FP_CMP_UNORD_E(r,X,Y) _FP_CMP_UNORD(E,2,r,X,Y) -+ -+#define FP_TO_INT_E(r,X,rsz,rsg) _FP_TO_INT(E,2,r,X,rsz,rsg) -+#define FP_FROM_INT_E(X,r,rs,rt) _FP_FROM_INT(E,2,X,r,rs,rt) -+ -+#define _FP_FRAC_HIGH_E(X) (X##_f1) -+#define _FP_FRAC_HIGH_RAW_E(X) (X##_f0) -+ -+#endif /* not _FP_W_TYPE_SIZE < 64 */ -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/longlong.h uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/longlong.h ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/longlong.h 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/longlong.h 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,1461 @@ -+/* longlong.h -- definitions for mixed size 32/64 bit arithmetic. -+ Copyright (C) 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -+ 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -+ -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+/* You have to define the following before including this file: -+ -+ UWtype -- An unsigned type, default type for operations (typically a "word") -+ UHWtype -- An unsigned type, at least half the size of UWtype. -+ UDWtype -- An unsigned type, at least twice as large a UWtype -+ W_TYPE_SIZE -- size in bits of UWtype -+ -+ UQItype -- Unsigned 8 bit type. -+ SItype, USItype -- Signed and unsigned 32 bit types. -+ DItype, UDItype -- Signed and unsigned 64 bit types. -+ -+ On a 32 bit machine UWtype should typically be USItype; -+ on a 64 bit machine, UWtype should typically be UDItype. */ -+ -+#define __BITS4 (W_TYPE_SIZE / 4) -+#define __ll_B ((UWtype) 1 << (W_TYPE_SIZE / 2)) -+#define __ll_lowpart(t) ((UWtype) (t) & (__ll_B - 1)) -+#define __ll_highpart(t) ((UWtype) (t) >> (W_TYPE_SIZE / 2)) -+ -+#ifndef W_TYPE_SIZE -+#define W_TYPE_SIZE 32 -+#define UWtype USItype -+#define UHWtype USItype -+#define UDWtype UDItype -+#endif -+ -+extern const UQItype __clz_tab[256] attribute_hidden; -+ -+/* Define auxiliary asm macros. -+ -+ 1) umul_ppmm(high_prod, low_prod, multiplier, multiplicand) multiplies two -+ UWtype integers MULTIPLIER and MULTIPLICAND, and generates a two UWtype -+ word product in HIGH_PROD and LOW_PROD. -+ -+ 2) __umulsidi3(a,b) multiplies two UWtype integers A and B, and returns a -+ UDWtype product. This is just a variant of umul_ppmm. -+ -+ 3) udiv_qrnnd(quotient, remainder, high_numerator, low_numerator, -+ denominator) divides a UDWtype, composed by the UWtype integers -+ HIGH_NUMERATOR and LOW_NUMERATOR, by DENOMINATOR and places the quotient -+ in QUOTIENT and the remainder in REMAINDER. HIGH_NUMERATOR must be less -+ than DENOMINATOR for correct operation. If, in addition, the most -+ significant bit of DENOMINATOR must be 1, then the pre-processor symbol -+ UDIV_NEEDS_NORMALIZATION is defined to 1. -+ -+ 4) sdiv_qrnnd(quotient, remainder, high_numerator, low_numerator, -+ denominator). Like udiv_qrnnd but the numbers are signed. The quotient -+ is rounded towards 0. -+ -+ 5) count_leading_zeros(count, x) counts the number of zero-bits from the -+ msb to the first nonzero bit in the UWtype X. This is the number of -+ steps X needs to be shifted left to set the msb. Undefined for X == 0, -+ unless the symbol COUNT_LEADING_ZEROS_0 is defined to some value. -+ -+ 6) count_trailing_zeros(count, x) like count_leading_zeros, but counts -+ from the least significant end. -+ -+ 7) add_ssaaaa(high_sum, low_sum, high_addend_1, low_addend_1, -+ high_addend_2, low_addend_2) adds two UWtype integers, composed by -+ HIGH_ADDEND_1 and LOW_ADDEND_1, and HIGH_ADDEND_2 and LOW_ADDEND_2 -+ respectively. The result is placed in HIGH_SUM and LOW_SUM. Overflow -+ (i.e. carry out) is not stored anywhere, and is lost. -+ -+ 8) sub_ddmmss(high_difference, low_difference, high_minuend, low_minuend, -+ high_subtrahend, low_subtrahend) subtracts two two-word UWtype integers, -+ composed by HIGH_MINUEND_1 and LOW_MINUEND_1, and HIGH_SUBTRAHEND_2 and -+ LOW_SUBTRAHEND_2 respectively. The result is placed in HIGH_DIFFERENCE -+ and LOW_DIFFERENCE. Overflow (i.e. carry out) is not stored anywhere, -+ and is lost. -+ -+ If any of these macros are left undefined for a particular CPU, -+ C macros are used. */ -+ -+/* The CPUs come in alphabetical order below. -+ -+ Please add support for more CPUs here, or improve the current support -+ for the CPUs below! -+ (E.g. WE32100, IBM360.) */ -+ -+#if defined (__GNUC__) && !defined (NO_ASM) -+ -+/* We sometimes need to clobber "cc" with gcc2, but that would not be -+ understood by gcc1. Use cpp to avoid major code duplication. */ -+#if __GNUC__ < 2 -+#define __CLOBBER_CC -+#define __AND_CLOBBER_CC -+#else /* __GNUC__ >= 2 */ -+#define __CLOBBER_CC : "cc" -+#define __AND_CLOBBER_CC , "cc" -+#endif /* __GNUC__ < 2 */ -+ -+#if defined (__alpha) && W_TYPE_SIZE == 64 -+#define umul_ppmm(ph, pl, m0, m1) \ -+ do { \ -+ UDItype __m0 = (m0), __m1 = (m1); \ -+ (ph) = __builtin_alpha_umulh (__m0, __m1); \ -+ (pl) = __m0 * __m1; \ -+ } while (0) -+#define UMUL_TIME 46 -+#ifndef LONGLONG_STANDALONE -+#define udiv_qrnnd(q, r, n1, n0, d) \ -+ do { UDItype __r; \ -+ (q) = __udiv_qrnnd (&__r, (n1), (n0), (d)); \ -+ (r) = __r; \ -+ } while (0) -+extern UDItype __udiv_qrnnd (UDItype *, UDItype, UDItype, UDItype); -+#define UDIV_TIME 220 -+#endif /* LONGLONG_STANDALONE */ -+#ifdef __alpha_cix__ -+#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clzl (X)) -+#define count_trailing_zeros(COUNT,X) ((COUNT) = __builtin_ctzl (X)) -+#define COUNT_LEADING_ZEROS_0 64 -+#else -+#define count_leading_zeros(COUNT,X) \ -+ do { \ -+ UDItype __xr = (X), __t, __a; \ -+ __t = __builtin_alpha_cmpbge (0, __xr); \ -+ __a = __clz_tab[__t ^ 0xff] - 1; \ -+ __t = __builtin_alpha_extbl (__xr, __a); \ -+ (COUNT) = 64 - (__clz_tab[__t] + __a*8); \ -+ } while (0) -+#define count_trailing_zeros(COUNT,X) \ -+ do { \ -+ UDItype __xr = (X), __t, __a; \ -+ __t = __builtin_alpha_cmpbge (0, __xr); \ -+ __t = ~__t & -~__t; \ -+ __a = ((__t & 0xCC) != 0) * 2; \ -+ __a += ((__t & 0xF0) != 0) * 4; \ -+ __a += ((__t & 0xAA) != 0); \ -+ __t = __builtin_alpha_extbl (__xr, __a); \ -+ __a <<= 3; \ -+ __t &= -__t; \ -+ __a += ((__t & 0xCC) != 0) * 2; \ -+ __a += ((__t & 0xF0) != 0) * 4; \ -+ __a += ((__t & 0xAA) != 0); \ -+ (COUNT) = __a; \ -+ } while (0) -+#endif /* __alpha_cix__ */ -+#endif /* __alpha */ -+ -+#if defined (__arc__) && W_TYPE_SIZE == 32 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("add.f %1, %4, %5\n\tadc %0, %2, %3" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "%r" ((USItype) (ah)), \ -+ "rIJ" ((USItype) (bh)), \ -+ "%r" ((USItype) (al)), \ -+ "rIJ" ((USItype) (bl))) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("sub.f %1, %4, %5\n\tsbc %0, %2, %3" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "r" ((USItype) (ah)), \ -+ "rIJ" ((USItype) (bh)), \ -+ "r" ((USItype) (al)), \ -+ "rIJ" ((USItype) (bl))) -+/* Call libgcc routine. */ -+#define umul_ppmm(w1, w0, u, v) \ -+do { \ -+ DWunion __w; \ -+ __w.ll = __umulsidi3 (u, v); \ -+ w1 = __w.s.high; \ -+ w0 = __w.s.low; \ -+} while (0) -+#define __umulsidi3 __umulsidi3 -+UDItype __umulsidi3 (USItype, USItype); -+#endif -+ -+#if defined (__arm__) && !defined (__thumb__) && W_TYPE_SIZE == 32 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("adds %1, %4, %5\n\tadc %0, %2, %3" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "%r" ((USItype) (ah)), \ -+ "rI" ((USItype) (bh)), \ -+ "%r" ((USItype) (al)), \ -+ "rI" ((USItype) (bl)) __CLOBBER_CC) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("subs %1, %4, %5\n\tsbc %0, %2, %3" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "r" ((USItype) (ah)), \ -+ "rI" ((USItype) (bh)), \ -+ "r" ((USItype) (al)), \ -+ "rI" ((USItype) (bl)) __CLOBBER_CC) -+#define umul_ppmm(xh, xl, a, b) \ -+{register USItype __t0, __t1, __t2; \ -+ __asm__ ("%@ Inlined umul_ppmm\n" \ -+ " mov %2, %5, lsr #16\n" \ -+ " mov %0, %6, lsr #16\n" \ -+ " bic %3, %5, %2, lsl #16\n" \ -+ " bic %4, %6, %0, lsl #16\n" \ -+ " mul %1, %3, %4\n" \ -+ " mul %4, %2, %4\n" \ -+ " mul %3, %0, %3\n" \ -+ " mul %0, %2, %0\n" \ -+ " adds %3, %4, %3\n" \ -+ " addcs %0, %0, #65536\n" \ -+ " adds %1, %1, %3, lsl #16\n" \ -+ " adc %0, %0, %3, lsr #16" \ -+ : "=&r" ((USItype) (xh)), \ -+ "=r" ((USItype) (xl)), \ -+ "=&r" (__t0), "=&r" (__t1), "=r" (__t2) \ -+ : "r" ((USItype) (a)), \ -+ "r" ((USItype) (b)) __CLOBBER_CC );} -+#define UMUL_TIME 20 -+#define UDIV_TIME 100 -+#endif /* __arm__ */ -+ -+#if defined(__arm__) -+/* Let gcc decide how best to implement count_leading_zeros. */ -+#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X)) -+#define COUNT_LEADING_ZEROS_0 32 -+#endif -+ -+#if defined (__CRIS__) && __CRIS_arch_version >= 3 -+#define count_leading_zeros(COUNT, X) ((COUNT) = __builtin_clz (X)) -+#if __CRIS_arch_version >= 8 -+#define count_trailing_zeros(COUNT, X) ((COUNT) = __builtin_ctz (X)) -+#endif -+#endif /* __CRIS__ */ -+ -+#if defined (__hppa) && W_TYPE_SIZE == 32 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("add %4,%5,%1\n\taddc %2,%3,%0" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "%rM" ((USItype) (ah)), \ -+ "rM" ((USItype) (bh)), \ -+ "%rM" ((USItype) (al)), \ -+ "rM" ((USItype) (bl))) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("sub %4,%5,%1\n\tsubb %2,%3,%0" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "rM" ((USItype) (ah)), \ -+ "rM" ((USItype) (bh)), \ -+ "rM" ((USItype) (al)), \ -+ "rM" ((USItype) (bl))) -+#if defined (_PA_RISC1_1) -+#define umul_ppmm(w1, w0, u, v) \ -+ do { \ -+ union \ -+ { \ -+ UDItype __f; \ -+ struct {USItype __w1, __w0;} __w1w0; \ -+ } __t; \ -+ __asm__ ("xmpyu %1,%2,%0" \ -+ : "=x" (__t.__f) \ -+ : "x" ((USItype) (u)), \ -+ "x" ((USItype) (v))); \ -+ (w1) = __t.__w1w0.__w1; \ -+ (w0) = __t.__w1w0.__w0; \ -+ } while (0) -+#define UMUL_TIME 8 -+#else -+#define UMUL_TIME 30 -+#endif -+#define UDIV_TIME 40 -+#define count_leading_zeros(count, x) \ -+ do { \ -+ USItype __tmp; \ -+ __asm__ ( \ -+ "ldi 1,%0\n" \ -+" extru,= %1,15,16,%%r0 ; Bits 31..16 zero?\n" \ -+" extru,tr %1,15,16,%1 ; No. Shift down, skip add.\n"\ -+" ldo 16(%0),%0 ; Yes. Perform add.\n" \ -+" extru,= %1,23,8,%%r0 ; Bits 15..8 zero?\n" \ -+" extru,tr %1,23,8,%1 ; No. Shift down, skip add.\n"\ -+" ldo 8(%0),%0 ; Yes. Perform add.\n" \ -+" extru,= %1,27,4,%%r0 ; Bits 7..4 zero?\n" \ -+" extru,tr %1,27,4,%1 ; No. Shift down, skip add.\n"\ -+" ldo 4(%0),%0 ; Yes. Perform add.\n" \ -+" extru,= %1,29,2,%%r0 ; Bits 3..2 zero?\n" \ -+" extru,tr %1,29,2,%1 ; No. Shift down, skip add.\n"\ -+" ldo 2(%0),%0 ; Yes. Perform add.\n" \ -+" extru %1,30,1,%1 ; Extract bit 1.\n" \ -+" sub %0,%1,%0 ; Subtract it.\n" \ -+ : "=r" (count), "=r" (__tmp) : "1" (x)); \ -+ } while (0) -+#endif -+ -+#if (defined (__i370__) || defined (__s390__) || defined (__mvs__)) && W_TYPE_SIZE == 32 -+#define smul_ppmm(xh, xl, m0, m1) \ -+ do { \ -+ union {DItype __ll; \ -+ struct {USItype __h, __l;} __i; \ -+ } __x; \ -+ __asm__ ("lr %N0,%1\n\tmr %0,%2" \ -+ : "=&r" (__x.__ll) \ -+ : "r" (m0), "r" (m1)); \ -+ (xh) = __x.__i.__h; (xl) = __x.__i.__l; \ -+ } while (0) -+#define sdiv_qrnnd(q, r, n1, n0, d) \ -+ do { \ -+ union {DItype __ll; \ -+ struct {USItype __h, __l;} __i; \ -+ } __x; \ -+ __x.__i.__h = n1; __x.__i.__l = n0; \ -+ __asm__ ("dr %0,%2" \ -+ : "=r" (__x.__ll) \ -+ : "0" (__x.__ll), "r" (d)); \ -+ (q) = __x.__i.__l; (r) = __x.__i.__h; \ -+ } while (0) -+#endif -+ -+#if (defined (__i386__) || defined (__i486__)) && W_TYPE_SIZE == 32 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("add{l} {%5,%1|%1,%5}\n\tadc{l} {%3,%0|%0,%3}" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "%0" ((USItype) (ah)), \ -+ "g" ((USItype) (bh)), \ -+ "%1" ((USItype) (al)), \ -+ "g" ((USItype) (bl))) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("sub{l} {%5,%1|%1,%5}\n\tsbb{l} {%3,%0|%0,%3}" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "0" ((USItype) (ah)), \ -+ "g" ((USItype) (bh)), \ -+ "1" ((USItype) (al)), \ -+ "g" ((USItype) (bl))) -+#define umul_ppmm(w1, w0, u, v) \ -+ __asm__ ("mul{l} %3" \ -+ : "=a" ((USItype) (w0)), \ -+ "=d" ((USItype) (w1)) \ -+ : "%0" ((USItype) (u)), \ -+ "rm" ((USItype) (v))) -+#define udiv_qrnnd(q, r, n1, n0, dv) \ -+ __asm__ ("div{l} %4" \ -+ : "=a" ((USItype) (q)), \ -+ "=d" ((USItype) (r)) \ -+ : "0" ((USItype) (n0)), \ -+ "1" ((USItype) (n1)), \ -+ "rm" ((USItype) (dv))) -+#define count_leading_zeros(count, x) ((count) = __builtin_clz (x)) -+#define count_trailing_zeros(count, x) ((count) = __builtin_ctz (x)) -+#define UMUL_TIME 40 -+#define UDIV_TIME 40 -+#endif /* 80x86 */ -+ -+#if (defined (__x86_64__) || defined (__i386__)) && W_TYPE_SIZE == 64 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("add{q} {%5,%1|%1,%5}\n\tadc{q} {%3,%0|%0,%3}" \ -+ : "=r" ((UDItype) (sh)), \ -+ "=&r" ((UDItype) (sl)) \ -+ : "%0" ((UDItype) (ah)), \ -+ "rme" ((UDItype) (bh)), \ -+ "%1" ((UDItype) (al)), \ -+ "rme" ((UDItype) (bl))) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("sub{q} {%5,%1|%1,%5}\n\tsbb{q} {%3,%0|%0,%3}" \ -+ : "=r" ((UDItype) (sh)), \ -+ "=&r" ((UDItype) (sl)) \ -+ : "0" ((UDItype) (ah)), \ -+ "rme" ((UDItype) (bh)), \ -+ "1" ((UDItype) (al)), \ -+ "rme" ((UDItype) (bl))) -+#define umul_ppmm(w1, w0, u, v) \ -+ __asm__ ("mul{q} %3" \ -+ : "=a" ((UDItype) (w0)), \ -+ "=d" ((UDItype) (w1)) \ -+ : "%0" ((UDItype) (u)), \ -+ "rm" ((UDItype) (v))) -+#define udiv_qrnnd(q, r, n1, n0, dv) \ -+ __asm__ ("div{q} %4" \ -+ : "=a" ((UDItype) (q)), \ -+ "=d" ((UDItype) (r)) \ -+ : "0" ((UDItype) (n0)), \ -+ "1" ((UDItype) (n1)), \ -+ "rm" ((UDItype) (dv))) -+#define count_leading_zeros(count, x) ((count) = __builtin_clzl (x)) -+#define count_trailing_zeros(count, x) ((count) = __builtin_ctzl (x)) -+#define UMUL_TIME 40 -+#define UDIV_TIME 40 -+#endif /* x86_64 */ -+ -+#if defined (__i960__) && W_TYPE_SIZE == 32 -+#define umul_ppmm(w1, w0, u, v) \ -+ ({union {UDItype __ll; \ -+ struct {USItype __l, __h;} __i; \ -+ } __xx; \ -+ __asm__ ("emul %2,%1,%0" \ -+ : "=d" (__xx.__ll) \ -+ : "%dI" ((USItype) (u)), \ -+ "dI" ((USItype) (v))); \ -+ (w1) = __xx.__i.__h; (w0) = __xx.__i.__l;}) -+#define __umulsidi3(u, v) \ -+ ({UDItype __w; \ -+ __asm__ ("emul %2,%1,%0" \ -+ : "=d" (__w) \ -+ : "%dI" ((USItype) (u)), \ -+ "dI" ((USItype) (v))); \ -+ __w; }) -+#endif /* __i960__ */ -+ -+#if defined (__M32R__) && W_TYPE_SIZE == 32 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ /* The cmp clears the condition bit. */ \ -+ __asm__ ("cmp %0,%0\n\taddx %1,%5\n\taddx %0,%3" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "0" ((USItype) (ah)), \ -+ "r" ((USItype) (bh)), \ -+ "1" ((USItype) (al)), \ -+ "r" ((USItype) (bl)) \ -+ : "cbit") -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ /* The cmp clears the condition bit. */ \ -+ __asm__ ("cmp %0,%0\n\tsubx %1,%5\n\tsubx %0,%3" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "0" ((USItype) (ah)), \ -+ "r" ((USItype) (bh)), \ -+ "1" ((USItype) (al)), \ -+ "r" ((USItype) (bl)) \ -+ : "cbit") -+#endif /* __M32R__ */ -+ -+#if defined (__mc68000__) && W_TYPE_SIZE == 32 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("add%.l %5,%1\n\taddx%.l %3,%0" \ -+ : "=d" ((USItype) (sh)), \ -+ "=&d" ((USItype) (sl)) \ -+ : "%0" ((USItype) (ah)), \ -+ "d" ((USItype) (bh)), \ -+ "%1" ((USItype) (al)), \ -+ "g" ((USItype) (bl))) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("sub%.l %5,%1\n\tsubx%.l %3,%0" \ -+ : "=d" ((USItype) (sh)), \ -+ "=&d" ((USItype) (sl)) \ -+ : "0" ((USItype) (ah)), \ -+ "d" ((USItype) (bh)), \ -+ "1" ((USItype) (al)), \ -+ "g" ((USItype) (bl))) -+ -+/* The '020, '030, '040, '060 and CPU32 have 32x32->64 and 64/32->32q-32r. */ -+#if (defined (__mc68020__) && !defined (__mc68060__)) -+#define umul_ppmm(w1, w0, u, v) \ -+ __asm__ ("mulu%.l %3,%1:%0" \ -+ : "=d" ((USItype) (w0)), \ -+ "=d" ((USItype) (w1)) \ -+ : "%0" ((USItype) (u)), \ -+ "dmi" ((USItype) (v))) -+#define UMUL_TIME 45 -+#define udiv_qrnnd(q, r, n1, n0, d) \ -+ __asm__ ("divu%.l %4,%1:%0" \ -+ : "=d" ((USItype) (q)), \ -+ "=d" ((USItype) (r)) \ -+ : "0" ((USItype) (n0)), \ -+ "1" ((USItype) (n1)), \ -+ "dmi" ((USItype) (d))) -+#define UDIV_TIME 90 -+#define sdiv_qrnnd(q, r, n1, n0, d) \ -+ __asm__ ("divs%.l %4,%1:%0" \ -+ : "=d" ((USItype) (q)), \ -+ "=d" ((USItype) (r)) \ -+ : "0" ((USItype) (n0)), \ -+ "1" ((USItype) (n1)), \ -+ "dmi" ((USItype) (d))) -+ -+#elif defined (__mcoldfire__) /* not mc68020 */ -+ -+#define umul_ppmm(xh, xl, a, b) \ -+ __asm__ ("| Inlined umul_ppmm\n" \ -+ " move%.l %2,%/d0\n" \ -+ " move%.l %3,%/d1\n" \ -+ " move%.l %/d0,%/d2\n" \ -+ " swap %/d0\n" \ -+ " move%.l %/d1,%/d3\n" \ -+ " swap %/d1\n" \ -+ " move%.w %/d2,%/d4\n" \ -+ " mulu %/d3,%/d4\n" \ -+ " mulu %/d1,%/d2\n" \ -+ " mulu %/d0,%/d3\n" \ -+ " mulu %/d0,%/d1\n" \ -+ " move%.l %/d4,%/d0\n" \ -+ " clr%.w %/d0\n" \ -+ " swap %/d0\n" \ -+ " add%.l %/d0,%/d2\n" \ -+ " add%.l %/d3,%/d2\n" \ -+ " jcc 1f\n" \ -+ " add%.l %#65536,%/d1\n" \ -+ "1: swap %/d2\n" \ -+ " moveq %#0,%/d0\n" \ -+ " move%.w %/d2,%/d0\n" \ -+ " move%.w %/d4,%/d2\n" \ -+ " move%.l %/d2,%1\n" \ -+ " add%.l %/d1,%/d0\n" \ -+ " move%.l %/d0,%0" \ -+ : "=g" ((USItype) (xh)), \ -+ "=g" ((USItype) (xl)) \ -+ : "g" ((USItype) (a)), \ -+ "g" ((USItype) (b)) \ -+ : "d0", "d1", "d2", "d3", "d4") -+#define UMUL_TIME 100 -+#define UDIV_TIME 400 -+#else /* not ColdFire */ -+/* %/ inserts REGISTER_PREFIX, %# inserts IMMEDIATE_PREFIX. */ -+#define umul_ppmm(xh, xl, a, b) \ -+ __asm__ ("| Inlined umul_ppmm\n" \ -+ " move%.l %2,%/d0\n" \ -+ " move%.l %3,%/d1\n" \ -+ " move%.l %/d0,%/d2\n" \ -+ " swap %/d0\n" \ -+ " move%.l %/d1,%/d3\n" \ -+ " swap %/d1\n" \ -+ " move%.w %/d2,%/d4\n" \ -+ " mulu %/d3,%/d4\n" \ -+ " mulu %/d1,%/d2\n" \ -+ " mulu %/d0,%/d3\n" \ -+ " mulu %/d0,%/d1\n" \ -+ " move%.l %/d4,%/d0\n" \ -+ " eor%.w %/d0,%/d0\n" \ -+ " swap %/d0\n" \ -+ " add%.l %/d0,%/d2\n" \ -+ " add%.l %/d3,%/d2\n" \ -+ " jcc 1f\n" \ -+ " add%.l %#65536,%/d1\n" \ -+ "1: swap %/d2\n" \ -+ " moveq %#0,%/d0\n" \ -+ " move%.w %/d2,%/d0\n" \ -+ " move%.w %/d4,%/d2\n" \ -+ " move%.l %/d2,%1\n" \ -+ " add%.l %/d1,%/d0\n" \ -+ " move%.l %/d0,%0" \ -+ : "=g" ((USItype) (xh)), \ -+ "=g" ((USItype) (xl)) \ -+ : "g" ((USItype) (a)), \ -+ "g" ((USItype) (b)) \ -+ : "d0", "d1", "d2", "d3", "d4") -+#define UMUL_TIME 100 -+#define UDIV_TIME 400 -+ -+#endif /* not mc68020 */ -+ -+/* The '020, '030, '040 and '060 have bitfield insns. -+ cpu32 disguises as a 68020, but lacks them. */ -+#if defined (__mc68020__) && !defined (__mcpu32__) -+#define count_leading_zeros(count, x) \ -+ __asm__ ("bfffo %1{%b2:%b2},%0" \ -+ : "=d" ((USItype) (count)) \ -+ : "od" ((USItype) (x)), "n" (0)) -+/* Some ColdFire architectures have a ff1 instruction supported via -+ __builtin_clz. */ -+#elif defined (__mcfisaaplus__) || defined (__mcfisac__) -+#define count_leading_zeros(count,x) ((count) = __builtin_clz (x)) -+#define COUNT_LEADING_ZEROS_0 32 -+#endif -+#endif /* mc68000 */ -+ -+#if defined (__m88000__) && W_TYPE_SIZE == 32 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("addu.co %1,%r4,%r5\n\taddu.ci %0,%r2,%r3" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "%rJ" ((USItype) (ah)), \ -+ "rJ" ((USItype) (bh)), \ -+ "%rJ" ((USItype) (al)), \ -+ "rJ" ((USItype) (bl))) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("subu.co %1,%r4,%r5\n\tsubu.ci %0,%r2,%r3" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "rJ" ((USItype) (ah)), \ -+ "rJ" ((USItype) (bh)), \ -+ "rJ" ((USItype) (al)), \ -+ "rJ" ((USItype) (bl))) -+#define count_leading_zeros(count, x) \ -+ do { \ -+ USItype __cbtmp; \ -+ __asm__ ("ff1 %0,%1" \ -+ : "=r" (__cbtmp) \ -+ : "r" ((USItype) (x))); \ -+ (count) = __cbtmp ^ 31; \ -+ } while (0) -+#define COUNT_LEADING_ZEROS_0 63 /* sic */ -+#if defined (__mc88110__) -+#define umul_ppmm(wh, wl, u, v) \ -+ do { \ -+ union {UDItype __ll; \ -+ struct {USItype __h, __l;} __i; \ -+ } __xx; \ -+ __asm__ ("mulu.d %0,%1,%2" \ -+ : "=r" (__xx.__ll) \ -+ : "r" ((USItype) (u)), \ -+ "r" ((USItype) (v))); \ -+ (wh) = __xx.__i.__h; \ -+ (wl) = __xx.__i.__l; \ -+ } while (0) -+#define udiv_qrnnd(q, r, n1, n0, d) \ -+ ({union {UDItype __ll; \ -+ struct {USItype __h, __l;} __i; \ -+ } __xx; \ -+ USItype __q; \ -+ __xx.__i.__h = (n1); __xx.__i.__l = (n0); \ -+ __asm__ ("divu.d %0,%1,%2" \ -+ : "=r" (__q) \ -+ : "r" (__xx.__ll), \ -+ "r" ((USItype) (d))); \ -+ (r) = (n0) - __q * (d); (q) = __q; }) -+#define UMUL_TIME 5 -+#define UDIV_TIME 25 -+#else -+#define UMUL_TIME 17 -+#define UDIV_TIME 150 -+#endif /* __mc88110__ */ -+#endif /* __m88000__ */ -+ -+#if defined (__mips__) && W_TYPE_SIZE == 32 -+#define umul_ppmm(w1, w0, u, v) \ -+ do { \ -+ UDItype __x = (UDItype) (USItype) (u) * (USItype) (v); \ -+ (w1) = (USItype) (__x >> 32); \ -+ (w0) = (USItype) (__x); \ -+ } while (0) -+#define UMUL_TIME 10 -+#define UDIV_TIME 100 -+ -+#if (__mips == 32 || __mips == 64) && ! __mips16 -+#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X)) -+#define COUNT_LEADING_ZEROS_0 32 -+#endif -+#endif /* __mips__ */ -+ -+#if defined (__ns32000__) && W_TYPE_SIZE == 32 -+#define umul_ppmm(w1, w0, u, v) \ -+ ({union {UDItype __ll; \ -+ struct {USItype __l, __h;} __i; \ -+ } __xx; \ -+ __asm__ ("meid %2,%0" \ -+ : "=g" (__xx.__ll) \ -+ : "%0" ((USItype) (u)), \ -+ "g" ((USItype) (v))); \ -+ (w1) = __xx.__i.__h; (w0) = __xx.__i.__l;}) -+#define __umulsidi3(u, v) \ -+ ({UDItype __w; \ -+ __asm__ ("meid %2,%0" \ -+ : "=g" (__w) \ -+ : "%0" ((USItype) (u)), \ -+ "g" ((USItype) (v))); \ -+ __w; }) -+#define udiv_qrnnd(q, r, n1, n0, d) \ -+ ({union {UDItype __ll; \ -+ struct {USItype __l, __h;} __i; \ -+ } __xx; \ -+ __xx.__i.__h = (n1); __xx.__i.__l = (n0); \ -+ __asm__ ("deid %2,%0" \ -+ : "=g" (__xx.__ll) \ -+ : "0" (__xx.__ll), \ -+ "g" ((USItype) (d))); \ -+ (r) = __xx.__i.__l; (q) = __xx.__i.__h; }) -+#define count_trailing_zeros(count,x) \ -+ do { \ -+ __asm__ ("ffsd %2,%0" \ -+ : "=r" ((USItype) (count)) \ -+ : "0" ((USItype) 0), \ -+ "r" ((USItype) (x))); \ -+ } while (0) -+#endif /* __ns32000__ */ -+ -+/* FIXME: We should test _IBMR2 here when we add assembly support for the -+ system vendor compilers. -+ FIXME: What's needed for gcc PowerPC VxWorks? __vxworks__ is not good -+ enough, since that hits ARM and m68k too. */ -+#if (defined (_ARCH_PPC) /* AIX */ \ -+ || defined (_ARCH_PWR) /* AIX */ \ -+ || defined (_ARCH_COM) /* AIX */ \ -+ || defined (__powerpc__) /* gcc */ \ -+ || defined (__POWERPC__) /* BEOS */ \ -+ || defined (__ppc__) /* Darwin */ \ -+ || (defined (PPC) && ! defined (CPU_FAMILY)) /* gcc 2.7.x GNU&SysV */ \ -+ || (defined (PPC) && defined (CPU_FAMILY) /* VxWorks */ \ -+ && CPU_FAMILY == PPC) \ -+ ) && W_TYPE_SIZE == 32 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ do { \ -+ if (__builtin_constant_p (bh) && (bh) == 0) \ -+ __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2" \ -+ : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\ -+ else if (__builtin_constant_p (bh) && (bh) == ~(USItype) 0) \ -+ __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2" \ -+ : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\ -+ else \ -+ __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3" \ -+ : "=r" (sh), "=&r" (sl) \ -+ : "%r" (ah), "r" (bh), "%r" (al), "rI" (bl)); \ -+ } while (0) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ do { \ -+ if (__builtin_constant_p (ah) && (ah) == 0) \ -+ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2" \ -+ : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\ -+ else if (__builtin_constant_p (ah) && (ah) == ~(USItype) 0) \ -+ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2" \ -+ : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\ -+ else if (__builtin_constant_p (bh) && (bh) == 0) \ -+ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2" \ -+ : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\ -+ else if (__builtin_constant_p (bh) && (bh) == ~(USItype) 0) \ -+ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2" \ -+ : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\ -+ else \ -+ __asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2" \ -+ : "=r" (sh), "=&r" (sl) \ -+ : "r" (ah), "r" (bh), "rI" (al), "r" (bl)); \ -+ } while (0) -+#define count_leading_zeros(count, x) \ -+ __asm__ ("{cntlz|cntlzw} %0,%1" : "=r" (count) : "r" (x)) -+#define COUNT_LEADING_ZEROS_0 32 -+#if defined (_ARCH_PPC) || defined (__powerpc__) || defined (__POWERPC__) \ -+ || defined (__ppc__) \ -+ || (defined (PPC) && ! defined (CPU_FAMILY)) /* gcc 2.7.x GNU&SysV */ \ -+ || (defined (PPC) && defined (CPU_FAMILY) /* VxWorks */ \ -+ && CPU_FAMILY == PPC) -+#define umul_ppmm(ph, pl, m0, m1) \ -+ do { \ -+ USItype __m0 = (m0), __m1 = (m1); \ -+ __asm__ ("mulhwu %0,%1,%2" : "=r" (ph) : "%r" (m0), "r" (m1)); \ -+ (pl) = __m0 * __m1; \ -+ } while (0) -+#define UMUL_TIME 15 -+#define smul_ppmm(ph, pl, m0, m1) \ -+ do { \ -+ SItype __m0 = (m0), __m1 = (m1); \ -+ __asm__ ("mulhw %0,%1,%2" : "=r" (ph) : "%r" (m0), "r" (m1)); \ -+ (pl) = __m0 * __m1; \ -+ } while (0) -+#define SMUL_TIME 14 -+#define UDIV_TIME 120 -+#elif defined (_ARCH_PWR) -+#define UMUL_TIME 8 -+#define smul_ppmm(xh, xl, m0, m1) \ -+ __asm__ ("mul %0,%2,%3" : "=r" (xh), "=q" (xl) : "r" (m0), "r" (m1)) -+#define SMUL_TIME 4 -+#define sdiv_qrnnd(q, r, nh, nl, d) \ -+ __asm__ ("div %0,%2,%4" : "=r" (q), "=q" (r) : "r" (nh), "1" (nl), "r" (d)) -+#define UDIV_TIME 100 -+#endif -+#endif /* 32-bit POWER architecture variants. */ -+ -+/* We should test _IBMR2 here when we add assembly support for the system -+ vendor compilers. */ -+#if (defined (_ARCH_PPC64) || defined (__powerpc64__)) && W_TYPE_SIZE == 64 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ do { \ -+ if (__builtin_constant_p (bh) && (bh) == 0) \ -+ __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2" \ -+ : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\ -+ else if (__builtin_constant_p (bh) && (bh) == ~(UDItype) 0) \ -+ __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2" \ -+ : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\ -+ else \ -+ __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3" \ -+ : "=r" (sh), "=&r" (sl) \ -+ : "%r" (ah), "r" (bh), "%r" (al), "rI" (bl)); \ -+ } while (0) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ do { \ -+ if (__builtin_constant_p (ah) && (ah) == 0) \ -+ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2" \ -+ : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\ -+ else if (__builtin_constant_p (ah) && (ah) == ~(UDItype) 0) \ -+ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2" \ -+ : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\ -+ else if (__builtin_constant_p (bh) && (bh) == 0) \ -+ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2" \ -+ : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\ -+ else if (__builtin_constant_p (bh) && (bh) == ~(UDItype) 0) \ -+ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2" \ -+ : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\ -+ else \ -+ __asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2" \ -+ : "=r" (sh), "=&r" (sl) \ -+ : "r" (ah), "r" (bh), "rI" (al), "r" (bl)); \ -+ } while (0) -+#define count_leading_zeros(count, x) \ -+ __asm__ ("cntlzd %0,%1" : "=r" (count) : "r" (x)) -+#define COUNT_LEADING_ZEROS_0 64 -+#define umul_ppmm(ph, pl, m0, m1) \ -+ do { \ -+ UDItype __m0 = (m0), __m1 = (m1); \ -+ __asm__ ("mulhdu %0,%1,%2" : "=r" (ph) : "%r" (m0), "r" (m1)); \ -+ (pl) = __m0 * __m1; \ -+ } while (0) -+#define UMUL_TIME 15 -+#define smul_ppmm(ph, pl, m0, m1) \ -+ do { \ -+ DItype __m0 = (m0), __m1 = (m1); \ -+ __asm__ ("mulhd %0,%1,%2" : "=r" (ph) : "%r" (m0), "r" (m1)); \ -+ (pl) = __m0 * __m1; \ -+ } while (0) -+#define SMUL_TIME 14 /* ??? */ -+#define UDIV_TIME 120 /* ??? */ -+#endif /* 64-bit PowerPC. */ -+ -+#if defined (__ibm032__) /* RT/ROMP */ && W_TYPE_SIZE == 32 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("a %1,%5\n\tae %0,%3" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "%0" ((USItype) (ah)), \ -+ "r" ((USItype) (bh)), \ -+ "%1" ((USItype) (al)), \ -+ "r" ((USItype) (bl))) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("s %1,%5\n\tse %0,%3" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "0" ((USItype) (ah)), \ -+ "r" ((USItype) (bh)), \ -+ "1" ((USItype) (al)), \ -+ "r" ((USItype) (bl))) -+#define umul_ppmm(ph, pl, m0, m1) \ -+ do { \ -+ USItype __m0 = (m0), __m1 = (m1); \ -+ __asm__ ( \ -+ "s r2,r2\n" \ -+" mts r10,%2\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" cas %0,r2,r0\n" \ -+" mfs r10,%1" \ -+ : "=r" ((USItype) (ph)), \ -+ "=r" ((USItype) (pl)) \ -+ : "%r" (__m0), \ -+ "r" (__m1) \ -+ : "r2"); \ -+ (ph) += ((((SItype) __m0 >> 31) & __m1) \ -+ + (((SItype) __m1 >> 31) & __m0)); \ -+ } while (0) -+#define UMUL_TIME 20 -+#define UDIV_TIME 200 -+#define count_leading_zeros(count, x) \ -+ do { \ -+ if ((x) >= 0x10000) \ -+ __asm__ ("clz %0,%1" \ -+ : "=r" ((USItype) (count)) \ -+ : "r" ((USItype) (x) >> 16)); \ -+ else \ -+ { \ -+ __asm__ ("clz %0,%1" \ -+ : "=r" ((USItype) (count)) \ -+ : "r" ((USItype) (x))); \ -+ (count) += 16; \ -+ } \ -+ } while (0) -+#endif -+ -+#if defined(__sh__) && !__SHMEDIA__ && W_TYPE_SIZE == 32 -+#ifndef __sh1__ -+#define umul_ppmm(w1, w0, u, v) \ -+ __asm__ ( \ -+ "dmulu.l %2,%3\n\tsts%M1 macl,%1\n\tsts%M0 mach,%0" \ -+ : "=r<" ((USItype)(w1)), \ -+ "=r<" ((USItype)(w0)) \ -+ : "r" ((USItype)(u)), \ -+ "r" ((USItype)(v)) \ -+ : "macl", "mach") -+#define UMUL_TIME 5 -+#endif -+ -+/* This is the same algorithm as __udiv_qrnnd_c. */ -+#define UDIV_NEEDS_NORMALIZATION 1 -+ -+#define udiv_qrnnd(q, r, n1, n0, d) \ -+ do { \ -+ extern UWtype __udiv_qrnnd_16 (UWtype, UWtype) \ -+ __attribute__ ((visibility ("hidden"))); \ -+ /* r0: rn r1: qn */ /* r0: n1 r4: n0 r5: d r6: d1 */ /* r2: __m */ \ -+ __asm__ ( \ -+ "mov%M4 %4,r5\n" \ -+" swap.w %3,r4\n" \ -+" swap.w r5,r6\n" \ -+" jsr @%5\n" \ -+" shll16 r6\n" \ -+" swap.w r4,r4\n" \ -+" jsr @%5\n" \ -+" swap.w r1,%0\n" \ -+" or r1,%0" \ -+ : "=r" (q), "=&z" (r) \ -+ : "1" (n1), "r" (n0), "rm" (d), "r" (&__udiv_qrnnd_16) \ -+ : "r1", "r2", "r4", "r5", "r6", "pr"); \ -+ } while (0) -+ -+#define UDIV_TIME 80 -+ -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("clrt;subc %5,%1; subc %4,%0" \ -+ : "=r" (sh), "=r" (sl) \ -+ : "0" (ah), "1" (al), "r" (bh), "r" (bl)) -+ -+#endif /* __sh__ */ -+ -+#if defined (__SH5__) && __SHMEDIA__ && W_TYPE_SIZE == 32 -+#define __umulsidi3(u,v) ((UDItype)(USItype)u*(USItype)v) -+#define count_leading_zeros(count, x) \ -+ do \ -+ { \ -+ UDItype x_ = (USItype)(x); \ -+ SItype c_; \ -+ \ -+ __asm__ ("nsb %1, %0" : "=r" (c_) : "r" (x_)); \ -+ (count) = c_ - 31; \ -+ } \ -+ while (0) -+#define COUNT_LEADING_ZEROS_0 32 -+#endif -+ -+#if defined (__sparc__) && !defined (__arch64__) && !defined (__sparcv9) \ -+ && W_TYPE_SIZE == 32 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("addcc %r4,%5,%1\n\taddx %r2,%3,%0" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "%rJ" ((USItype) (ah)), \ -+ "rI" ((USItype) (bh)), \ -+ "%rJ" ((USItype) (al)), \ -+ "rI" ((USItype) (bl)) \ -+ __CLOBBER_CC) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("subcc %r4,%5,%1\n\tsubx %r2,%3,%0" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "rJ" ((USItype) (ah)), \ -+ "rI" ((USItype) (bh)), \ -+ "rJ" ((USItype) (al)), \ -+ "rI" ((USItype) (bl)) \ -+ __CLOBBER_CC) -+#if defined (__sparc_v8__) -+#define umul_ppmm(w1, w0, u, v) \ -+ __asm__ ("umul %2,%3,%1;rd %%y,%0" \ -+ : "=r" ((USItype) (w1)), \ -+ "=r" ((USItype) (w0)) \ -+ : "r" ((USItype) (u)), \ -+ "r" ((USItype) (v))) -+#define udiv_qrnnd(__q, __r, __n1, __n0, __d) \ -+ __asm__ ("mov %2,%%y;nop;nop;nop;udiv %3,%4,%0;umul %0,%4,%1;sub %3,%1,%1"\ -+ : "=&r" ((USItype) (__q)), \ -+ "=&r" ((USItype) (__r)) \ -+ : "r" ((USItype) (__n1)), \ -+ "r" ((USItype) (__n0)), \ -+ "r" ((USItype) (__d))) -+#else -+#if defined (__sparclite__) -+/* This has hardware multiply but not divide. It also has two additional -+ instructions scan (ffs from high bit) and divscc. */ -+#define umul_ppmm(w1, w0, u, v) \ -+ __asm__ ("umul %2,%3,%1;rd %%y,%0" \ -+ : "=r" ((USItype) (w1)), \ -+ "=r" ((USItype) (w0)) \ -+ : "r" ((USItype) (u)), \ -+ "r" ((USItype) (v))) -+#define udiv_qrnnd(q, r, n1, n0, d) \ -+ __asm__ ("! Inlined udiv_qrnnd\n" \ -+" wr %%g0,%2,%%y ! Not a delayed write for sparclite\n" \ -+" tst %%g0\n" \ -+" divscc %3,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%0\n" \ -+" rd %%y,%1\n" \ -+" bl,a 1f\n" \ -+" add %1,%4,%1\n" \ -+"1: ! End of inline udiv_qrnnd" \ -+ : "=r" ((USItype) (q)), \ -+ "=r" ((USItype) (r)) \ -+ : "r" ((USItype) (n1)), \ -+ "r" ((USItype) (n0)), \ -+ "rI" ((USItype) (d)) \ -+ : "g1" __AND_CLOBBER_CC) -+#define UDIV_TIME 37 -+#define count_leading_zeros(count, x) \ -+ do { \ -+ __asm__ ("scan %1,1,%0" \ -+ : "=r" ((USItype) (count)) \ -+ : "r" ((USItype) (x))); \ -+ } while (0) -+/* Early sparclites return 63 for an argument of 0, but they warn that future -+ implementations might change this. Therefore, leave COUNT_LEADING_ZEROS_0 -+ undefined. */ -+#else -+/* SPARC without integer multiplication and divide instructions. -+ (i.e. at least Sun4/20,40,60,65,75,110,260,280,330,360,380,470,490) */ -+#define umul_ppmm(w1, w0, u, v) \ -+ __asm__ ("! Inlined umul_ppmm\n" \ -+" wr %%g0,%2,%%y ! SPARC has 0-3 delay insn after a wr\n"\ -+" sra %3,31,%%o5 ! Don't move this insn\n" \ -+" and %2,%%o5,%%o5 ! Don't move this insn\n" \ -+" andcc %%g0,0,%%g1 ! Don't move this insn\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,0,%%g1\n" \ -+" add %%g1,%%o5,%0\n" \ -+" rd %%y,%1" \ -+ : "=r" ((USItype) (w1)), \ -+ "=r" ((USItype) (w0)) \ -+ : "%rI" ((USItype) (u)), \ -+ "r" ((USItype) (v)) \ -+ : "g1", "o5" __AND_CLOBBER_CC) -+#define UMUL_TIME 39 /* 39 instructions */ -+/* It's quite necessary to add this much assembler for the sparc. -+ The default udiv_qrnnd (in C) is more than 10 times slower! */ -+#define udiv_qrnnd(__q, __r, __n1, __n0, __d) \ -+ __asm__ ("! Inlined udiv_qrnnd\n" \ -+" mov 32,%%g1\n" \ -+" subcc %1,%2,%%g0\n" \ -+"1: bcs 5f\n" \ -+" addxcc %0,%0,%0 ! shift n1n0 and a q-bit in lsb\n" \ -+" sub %1,%2,%1 ! this kills msb of n\n" \ -+" addx %1,%1,%1 ! so this can't give carry\n" \ -+" subcc %%g1,1,%%g1\n" \ -+"2: bne 1b\n" \ -+" subcc %1,%2,%%g0\n" \ -+" bcs 3f\n" \ -+" addxcc %0,%0,%0 ! shift n1n0 and a q-bit in lsb\n" \ -+" b 3f\n" \ -+" sub %1,%2,%1 ! this kills msb of n\n" \ -+"4: sub %1,%2,%1\n" \ -+"5: addxcc %1,%1,%1\n" \ -+" bcc 2b\n" \ -+" subcc %%g1,1,%%g1\n" \ -+"! Got carry from n. Subtract next step to cancel this carry.\n" \ -+" bne 4b\n" \ -+" addcc %0,%0,%0 ! shift n1n0 and a 0-bit in lsb\n" \ -+" sub %1,%2,%1\n" \ -+"3: xnor %0,0,%0\n" \ -+" ! End of inline udiv_qrnnd" \ -+ : "=&r" ((USItype) (__q)), \ -+ "=&r" ((USItype) (__r)) \ -+ : "r" ((USItype) (__d)), \ -+ "1" ((USItype) (__n1)), \ -+ "0" ((USItype) (__n0)) : "g1" __AND_CLOBBER_CC) -+#define UDIV_TIME (3+7*32) /* 7 instructions/iteration. 32 iterations. */ -+#endif /* __sparclite__ */ -+#endif /* __sparc_v8__ */ -+#endif /* sparc32 */ -+ -+#if ((defined (__sparc__) && defined (__arch64__)) || defined (__sparcv9)) \ -+ && W_TYPE_SIZE == 64 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("addcc %r4,%5,%1\n\t" \ -+ "add %r2,%3,%0\n\t" \ -+ "bcs,a,pn %%xcc, 1f\n\t" \ -+ "add %0, 1, %0\n" \ -+ "1:" \ -+ : "=r" ((UDItype)(sh)), \ -+ "=&r" ((UDItype)(sl)) \ -+ : "%rJ" ((UDItype)(ah)), \ -+ "rI" ((UDItype)(bh)), \ -+ "%rJ" ((UDItype)(al)), \ -+ "rI" ((UDItype)(bl)) \ -+ __CLOBBER_CC) -+ -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("subcc %r4,%5,%1\n\t" \ -+ "sub %r2,%3,%0\n\t" \ -+ "bcs,a,pn %%xcc, 1f\n\t" \ -+ "sub %0, 1, %0\n\t" \ -+ "1:" \ -+ : "=r" ((UDItype)(sh)), \ -+ "=&r" ((UDItype)(sl)) \ -+ : "rJ" ((UDItype)(ah)), \ -+ "rI" ((UDItype)(bh)), \ -+ "rJ" ((UDItype)(al)), \ -+ "rI" ((UDItype)(bl)) \ -+ __CLOBBER_CC) -+ -+#define umul_ppmm(wh, wl, u, v) \ -+ do { \ -+ UDItype tmp1, tmp2, tmp3, tmp4; \ -+ __asm__ __volatile__ ( \ -+ "srl %7,0,%3\n\t" \ -+ "mulx %3,%6,%1\n\t" \ -+ "srlx %6,32,%2\n\t" \ -+ "mulx %2,%3,%4\n\t" \ -+ "sllx %4,32,%5\n\t" \ -+ "srl %6,0,%3\n\t" \ -+ "sub %1,%5,%5\n\t" \ -+ "srlx %5,32,%5\n\t" \ -+ "addcc %4,%5,%4\n\t" \ -+ "srlx %7,32,%5\n\t" \ -+ "mulx %3,%5,%3\n\t" \ -+ "mulx %2,%5,%5\n\t" \ -+ "sethi %%hi(0x80000000),%2\n\t" \ -+ "addcc %4,%3,%4\n\t" \ -+ "srlx %4,32,%4\n\t" \ -+ "add %2,%2,%2\n\t" \ -+ "movcc %%xcc,%%g0,%2\n\t" \ -+ "addcc %5,%4,%5\n\t" \ -+ "sllx %3,32,%3\n\t" \ -+ "add %1,%3,%1\n\t" \ -+ "add %5,%2,%0" \ -+ : "=r" ((UDItype)(wh)), \ -+ "=&r" ((UDItype)(wl)), \ -+ "=&r" (tmp1), "=&r" (tmp2), "=&r" (tmp3), "=&r" (tmp4) \ -+ : "r" ((UDItype)(u)), \ -+ "r" ((UDItype)(v)) \ -+ __CLOBBER_CC); \ -+ } while (0) -+#define UMUL_TIME 96 -+#define UDIV_TIME 230 -+#endif /* sparc64 */ -+ -+#if defined (__vax__) && W_TYPE_SIZE == 32 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("addl2 %5,%1\n\tadwc %3,%0" \ -+ : "=g" ((USItype) (sh)), \ -+ "=&g" ((USItype) (sl)) \ -+ : "%0" ((USItype) (ah)), \ -+ "g" ((USItype) (bh)), \ -+ "%1" ((USItype) (al)), \ -+ "g" ((USItype) (bl))) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("subl2 %5,%1\n\tsbwc %3,%0" \ -+ : "=g" ((USItype) (sh)), \ -+ "=&g" ((USItype) (sl)) \ -+ : "0" ((USItype) (ah)), \ -+ "g" ((USItype) (bh)), \ -+ "1" ((USItype) (al)), \ -+ "g" ((USItype) (bl))) -+#define umul_ppmm(xh, xl, m0, m1) \ -+ do { \ -+ union { \ -+ UDItype __ll; \ -+ struct {USItype __l, __h;} __i; \ -+ } __xx; \ -+ USItype __m0 = (m0), __m1 = (m1); \ -+ __asm__ ("emul %1,%2,$0,%0" \ -+ : "=r" (__xx.__ll) \ -+ : "g" (__m0), \ -+ "g" (__m1)); \ -+ (xh) = __xx.__i.__h; \ -+ (xl) = __xx.__i.__l; \ -+ (xh) += ((((SItype) __m0 >> 31) & __m1) \ -+ + (((SItype) __m1 >> 31) & __m0)); \ -+ } while (0) -+#define sdiv_qrnnd(q, r, n1, n0, d) \ -+ do { \ -+ union {DItype __ll; \ -+ struct {SItype __l, __h;} __i; \ -+ } __xx; \ -+ __xx.__i.__h = n1; __xx.__i.__l = n0; \ -+ __asm__ ("ediv %3,%2,%0,%1" \ -+ : "=g" (q), "=g" (r) \ -+ : "g" (__xx.__ll), "g" (d)); \ -+ } while (0) -+#endif /* __vax__ */ -+ -+#if defined (__xtensa__) && W_TYPE_SIZE == 32 -+/* This code is not Xtensa-configuration-specific, so rely on the compiler -+ to expand builtin functions depending on what configuration features -+ are available. This avoids library calls when the operation can be -+ performed in-line. */ -+#define umul_ppmm(w1, w0, u, v) \ -+ do { \ -+ DWunion __w; \ -+ __w.ll = __builtin_umulsidi3 (u, v); \ -+ w1 = __w.s.high; \ -+ w0 = __w.s.low; \ -+ } while (0) -+#define __umulsidi3(u, v) __builtin_umulsidi3 (u, v) -+#define count_leading_zeros(COUNT, X) ((COUNT) = __builtin_clz (X)) -+#define count_trailing_zeros(COUNT, X) ((COUNT) = __builtin_ctz (X)) -+#endif /* __xtensa__ */ -+ -+#if defined (__z8000__) && W_TYPE_SIZE == 16 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("add %H1,%H5\n\tadc %H0,%H3" \ -+ : "=r" ((unsigned int)(sh)), \ -+ "=&r" ((unsigned int)(sl)) \ -+ : "%0" ((unsigned int)(ah)), \ -+ "r" ((unsigned int)(bh)), \ -+ "%1" ((unsigned int)(al)), \ -+ "rQR" ((unsigned int)(bl))) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("sub %H1,%H5\n\tsbc %H0,%H3" \ -+ : "=r" ((unsigned int)(sh)), \ -+ "=&r" ((unsigned int)(sl)) \ -+ : "0" ((unsigned int)(ah)), \ -+ "r" ((unsigned int)(bh)), \ -+ "1" ((unsigned int)(al)), \ -+ "rQR" ((unsigned int)(bl))) -+#define umul_ppmm(xh, xl, m0, m1) \ -+ do { \ -+ union {long int __ll; \ -+ struct {unsigned int __h, __l;} __i; \ -+ } __xx; \ -+ unsigned int __m0 = (m0), __m1 = (m1); \ -+ __asm__ ("mult %S0,%H3" \ -+ : "=r" (__xx.__i.__h), \ -+ "=r" (__xx.__i.__l) \ -+ : "%1" (__m0), \ -+ "rQR" (__m1)); \ -+ (xh) = __xx.__i.__h; (xl) = __xx.__i.__l; \ -+ (xh) += ((((signed int) __m0 >> 15) & __m1) \ -+ + (((signed int) __m1 >> 15) & __m0)); \ -+ } while (0) -+#endif /* __z8000__ */ -+ -+#endif /* __GNUC__ */ -+ -+/* If this machine has no inline assembler, use C macros. */ -+ -+#if !defined (add_ssaaaa) -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ do { \ -+ UWtype __x; \ -+ __x = (al) + (bl); \ -+ (sh) = (ah) + (bh) + (__x < (al)); \ -+ (sl) = __x; \ -+ } while (0) -+#endif -+ -+#if !defined (sub_ddmmss) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ do { \ -+ UWtype __x; \ -+ __x = (al) - (bl); \ -+ (sh) = (ah) - (bh) - (__x > (al)); \ -+ (sl) = __x; \ -+ } while (0) -+#endif -+ -+/* If we lack umul_ppmm but have smul_ppmm, define umul_ppmm in terms of -+ smul_ppmm. */ -+#if !defined (umul_ppmm) && defined (smul_ppmm) -+#define umul_ppmm(w1, w0, u, v) \ -+ do { \ -+ UWtype __w1; \ -+ UWtype __xm0 = (u), __xm1 = (v); \ -+ smul_ppmm (__w1, w0, __xm0, __xm1); \ -+ (w1) = __w1 + (-(__xm0 >> (W_TYPE_SIZE - 1)) & __xm1) \ -+ + (-(__xm1 >> (W_TYPE_SIZE - 1)) & __xm0); \ -+ } while (0) -+#endif -+ -+/* If we still don't have umul_ppmm, define it using plain C. */ -+#if !defined (umul_ppmm) -+#define umul_ppmm(w1, w0, u, v) \ -+ do { \ -+ UWtype __x0, __x1, __x2, __x3; \ -+ UHWtype __ul, __vl, __uh, __vh; \ -+ \ -+ __ul = __ll_lowpart (u); \ -+ __uh = __ll_highpart (u); \ -+ __vl = __ll_lowpart (v); \ -+ __vh = __ll_highpart (v); \ -+ \ -+ __x0 = (UWtype) __ul * __vl; \ -+ __x1 = (UWtype) __ul * __vh; \ -+ __x2 = (UWtype) __uh * __vl; \ -+ __x3 = (UWtype) __uh * __vh; \ -+ \ -+ __x1 += __ll_highpart (__x0);/* this can't give carry */ \ -+ __x1 += __x2; /* but this indeed can */ \ -+ if (__x1 < __x2) /* did we get it? */ \ -+ __x3 += __ll_B; /* yes, add it in the proper pos. */ \ -+ \ -+ (w1) = __x3 + __ll_highpart (__x1); \ -+ (w0) = __ll_lowpart (__x1) * __ll_B + __ll_lowpart (__x0); \ -+ } while (0) -+#endif -+ -+#if !defined (__umulsidi3) -+#define __umulsidi3(u, v) \ -+ ({DWunion __w; \ -+ umul_ppmm (__w.s.high, __w.s.low, u, v); \ -+ __w.ll; }) -+#endif -+ -+/* Define this unconditionally, so it can be used for debugging. */ -+#define __udiv_qrnnd_c(q, r, n1, n0, d) \ -+ do { \ -+ UWtype __d1, __d0, __q1, __q0; \ -+ UWtype __r1, __r0, __m; \ -+ __d1 = __ll_highpart (d); \ -+ __d0 = __ll_lowpart (d); \ -+ \ -+ __r1 = (n1) % __d1; \ -+ __q1 = (n1) / __d1; \ -+ __m = (UWtype) __q1 * __d0; \ -+ __r1 = __r1 * __ll_B | __ll_highpart (n0); \ -+ if (__r1 < __m) \ -+ { \ -+ __q1--, __r1 += (d); \ -+ if (__r1 >= (d)) /* i.e. we didn't get carry when adding to __r1 */\ -+ if (__r1 < __m) \ -+ __q1--, __r1 += (d); \ -+ } \ -+ __r1 -= __m; \ -+ \ -+ __r0 = __r1 % __d1; \ -+ __q0 = __r1 / __d1; \ -+ __m = (UWtype) __q0 * __d0; \ -+ __r0 = __r0 * __ll_B | __ll_lowpart (n0); \ -+ if (__r0 < __m) \ -+ { \ -+ __q0--, __r0 += (d); \ -+ if (__r0 >= (d)) \ -+ if (__r0 < __m) \ -+ __q0--, __r0 += (d); \ -+ } \ -+ __r0 -= __m; \ -+ \ -+ (q) = (UWtype) __q1 * __ll_B | __q0; \ -+ (r) = __r0; \ -+ } while (0) -+ -+/* If the processor has no udiv_qrnnd but sdiv_qrnnd, go through -+ __udiv_w_sdiv (defined in libgcc or elsewhere). */ -+#if !defined (udiv_qrnnd) && defined (sdiv_qrnnd) -+#define udiv_qrnnd(q, r, nh, nl, d) \ -+ do { \ -+ USItype __r; \ -+ (q) = __udiv_w_sdiv (&__r, nh, nl, d); \ -+ (r) = __r; \ -+ } while (0) -+#endif -+ -+/* If udiv_qrnnd was not defined for this processor, use __udiv_qrnnd_c. */ -+#if !defined (udiv_qrnnd) -+#define UDIV_NEEDS_NORMALIZATION 1 -+#define udiv_qrnnd __udiv_qrnnd_c -+#endif -+ -+#if !defined (count_leading_zeros) -+#define count_leading_zeros(count, x) \ -+ do { \ -+ UWtype __xr = (x); \ -+ UWtype __a; \ -+ \ -+ if (W_TYPE_SIZE <= 32) \ -+ { \ -+ __a = __xr < ((UWtype)1<<2*__BITS4) \ -+ ? (__xr < ((UWtype)1<<__BITS4) ? 0 : __BITS4) \ -+ : (__xr < ((UWtype)1<<3*__BITS4) ? 2*__BITS4 : 3*__BITS4); \ -+ } \ -+ else \ -+ { \ -+ for (__a = W_TYPE_SIZE - 8; __a > 0; __a -= 8) \ -+ if (((__xr >> __a) & 0xff) != 0) \ -+ break; \ -+ } \ -+ \ -+ (count) = W_TYPE_SIZE - (__clz_tab[__xr >> __a] + __a); \ -+ } while (0) -+#define COUNT_LEADING_ZEROS_0 W_TYPE_SIZE -+#endif -+ -+#if !defined (count_trailing_zeros) -+/* Define count_trailing_zeros using count_leading_zeros. The latter might be -+ defined in asm, but if it is not, the C version above is good enough. */ -+#define count_trailing_zeros(count, x) \ -+ do { \ -+ UWtype __ctz_x = (x); \ -+ UWtype __ctz_c; \ -+ count_leading_zeros (__ctz_c, __ctz_x & -__ctz_x); \ -+ (count) = W_TYPE_SIZE - 1 - __ctz_c; \ -+ } while (0) -+#endif -+ -+#ifndef UDIV_NEEDS_NORMALIZATION -+#define UDIV_NEEDS_NORMALIZATION 0 -+#endif -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/mp_clz_tab.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/mp_clz_tab.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/mp_clz_tab.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/mp_clz_tab.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,37 @@ -+/* __clz_tab -- support for longlong.h -+ Copyright (C) 1991, 1993, 1994, 1997 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. Its master source is NOT part of -+ the C library, however. The master source lives in the GNU MP Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#if 0 -+#include -+#include "gmp-impl.h" -+#endif -+ -+const -+unsigned char __clz_tab[] = -+{ -+ 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -+ 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, -+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, -+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, -+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -+}; -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/op-1.h uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/op-1.h ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/op-1.h 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/op-1.h 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,302 @@ -+/* Software floating-point emulation. -+ Basic one-word fraction declaration and manipulation. -+ Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com), -+ Jakub Jelinek (jj@ultra.linux.cz), -+ David S. Miller (davem@redhat.com) and -+ Peter Maydell (pmaydell@chiark.greenend.org.uk). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ In addition to the permissions in the GNU Lesser General Public -+ License, the Free Software Foundation gives you unlimited -+ permission to link the compiled version of this file into -+ combinations with other programs, and to distribute those -+ combinations without any restriction coming from the use of this -+ file. (The Lesser General Public License restrictions do apply in -+ other respects; for example, they cover modification of the file, -+ and distribution when not linked into a combine executable.) -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, -+ MA 02110-1301, USA. */ -+ -+#define _FP_FRAC_DECL_1(X) _FP_W_TYPE X##_f -+#define _FP_FRAC_COPY_1(D,S) (D##_f = S##_f) -+#define _FP_FRAC_SET_1(X,I) (X##_f = I) -+#define _FP_FRAC_HIGH_1(X) (X##_f) -+#define _FP_FRAC_LOW_1(X) (X##_f) -+#define _FP_FRAC_WORD_1(X,w) (X##_f) -+ -+#define _FP_FRAC_ADDI_1(X,I) (X##_f += I) -+#define _FP_FRAC_SLL_1(X,N) \ -+ do { \ -+ if (__builtin_constant_p(N) && (N) == 1) \ -+ X##_f += X##_f; \ -+ else \ -+ X##_f <<= (N); \ -+ } while (0) -+#define _FP_FRAC_SRL_1(X,N) (X##_f >>= N) -+ -+/* Right shift with sticky-lsb. */ -+#define _FP_FRAC_SRST_1(X,S,N,sz) __FP_FRAC_SRST_1(X##_f, S, N, sz) -+#define _FP_FRAC_SRS_1(X,N,sz) __FP_FRAC_SRS_1(X##_f, N, sz) -+ -+#define __FP_FRAC_SRST_1(X,S,N,sz) \ -+do { \ -+ S = (__builtin_constant_p(N) && (N) == 1 \ -+ ? X & 1 : (X << (_FP_W_TYPE_SIZE - (N))) != 0); \ -+ X = X >> (N); \ -+} while (0) -+ -+#define __FP_FRAC_SRS_1(X,N,sz) \ -+ (X = (X >> (N) | (__builtin_constant_p(N) && (N) == 1 \ -+ ? X & 1 : (X << (_FP_W_TYPE_SIZE - (N))) != 0))) -+ -+#define _FP_FRAC_ADD_1(R,X,Y) (R##_f = X##_f + Y##_f) -+#define _FP_FRAC_SUB_1(R,X,Y) (R##_f = X##_f - Y##_f) -+#define _FP_FRAC_DEC_1(X,Y) (X##_f -= Y##_f) -+#define _FP_FRAC_CLZ_1(z, X) __FP_CLZ(z, X##_f) -+ -+/* Predicates */ -+#define _FP_FRAC_NEGP_1(X) ((_FP_WS_TYPE)X##_f < 0) -+#define _FP_FRAC_ZEROP_1(X) (X##_f == 0) -+#define _FP_FRAC_OVERP_1(fs,X) (X##_f & _FP_OVERFLOW_##fs) -+#define _FP_FRAC_CLEAR_OVERP_1(fs,X) (X##_f &= ~_FP_OVERFLOW_##fs) -+#define _FP_FRAC_EQ_1(X, Y) (X##_f == Y##_f) -+#define _FP_FRAC_GE_1(X, Y) (X##_f >= Y##_f) -+#define _FP_FRAC_GT_1(X, Y) (X##_f > Y##_f) -+ -+#define _FP_ZEROFRAC_1 0 -+#define _FP_MINFRAC_1 1 -+#define _FP_MAXFRAC_1 (~(_FP_WS_TYPE)0) -+ -+/* -+ * Unpack the raw bits of a native fp value. Do not classify or -+ * normalize the data. -+ */ -+ -+#define _FP_UNPACK_RAW_1(fs, X, val) \ -+ do { \ -+ union _FP_UNION_##fs _flo; _flo.flt = (val); \ -+ \ -+ X##_f = _flo.bits.frac; \ -+ X##_e = _flo.bits.exp; \ -+ X##_s = _flo.bits.sign; \ -+ } while (0) -+ -+#define _FP_UNPACK_RAW_1_P(fs, X, val) \ -+ do { \ -+ union _FP_UNION_##fs *_flo = \ -+ (union _FP_UNION_##fs *)(val); \ -+ \ -+ X##_f = _flo->bits.frac; \ -+ X##_e = _flo->bits.exp; \ -+ X##_s = _flo->bits.sign; \ -+ } while (0) -+ -+/* -+ * Repack the raw bits of a native fp value. -+ */ -+ -+#define _FP_PACK_RAW_1(fs, val, X) \ -+ do { \ -+ union _FP_UNION_##fs _flo; \ -+ \ -+ _flo.bits.frac = X##_f; \ -+ _flo.bits.exp = X##_e; \ -+ _flo.bits.sign = X##_s; \ -+ \ -+ (val) = _flo.flt; \ -+ } while (0) -+ -+#define _FP_PACK_RAW_1_P(fs, val, X) \ -+ do { \ -+ union _FP_UNION_##fs *_flo = \ -+ (union _FP_UNION_##fs *)(val); \ -+ \ -+ _flo->bits.frac = X##_f; \ -+ _flo->bits.exp = X##_e; \ -+ _flo->bits.sign = X##_s; \ -+ } while (0) -+ -+ -+/* -+ * Multiplication algorithms: -+ */ -+ -+/* Basic. Assuming the host word size is >= 2*FRACBITS, we can do the -+ multiplication immediately. */ -+ -+#define _FP_MUL_MEAT_1_imm(wfracbits, R, X, Y) \ -+ do { \ -+ R##_f = X##_f * Y##_f; \ -+ /* Normalize since we know where the msb of the multiplicands \ -+ were (bit B), we know that the msb of the of the product is \ -+ at either 2B or 2B-1. */ \ -+ _FP_FRAC_SRS_1(R, wfracbits-1, 2*wfracbits); \ -+ } while (0) -+ -+/* Given a 1W * 1W => 2W primitive, do the extended multiplication. */ -+ -+#define _FP_MUL_MEAT_1_wide(wfracbits, R, X, Y, doit) \ -+ do { \ -+ _FP_W_TYPE _Z_f0, _Z_f1; \ -+ doit(_Z_f1, _Z_f0, X##_f, Y##_f); \ -+ /* Normalize since we know where the msb of the multiplicands \ -+ were (bit B), we know that the msb of the of the product is \ -+ at either 2B or 2B-1. */ \ -+ _FP_FRAC_SRS_2(_Z, wfracbits-1, 2*wfracbits); \ -+ R##_f = _Z_f0; \ -+ } while (0) -+ -+/* Finally, a simple widening multiply algorithm. What fun! */ -+ -+#define _FP_MUL_MEAT_1_hard(wfracbits, R, X, Y) \ -+ do { \ -+ _FP_W_TYPE _xh, _xl, _yh, _yl, _z_f0, _z_f1, _a_f0, _a_f1; \ -+ \ -+ /* split the words in half */ \ -+ _xh = X##_f >> (_FP_W_TYPE_SIZE/2); \ -+ _xl = X##_f & (((_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE/2)) - 1); \ -+ _yh = Y##_f >> (_FP_W_TYPE_SIZE/2); \ -+ _yl = Y##_f & (((_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE/2)) - 1); \ -+ \ -+ /* multiply the pieces */ \ -+ _z_f0 = _xl * _yl; \ -+ _a_f0 = _xh * _yl; \ -+ _a_f1 = _xl * _yh; \ -+ _z_f1 = _xh * _yh; \ -+ \ -+ /* reassemble into two full words */ \ -+ if ((_a_f0 += _a_f1) < _a_f1) \ -+ _z_f1 += (_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE/2); \ -+ _a_f1 = _a_f0 >> (_FP_W_TYPE_SIZE/2); \ -+ _a_f0 = _a_f0 << (_FP_W_TYPE_SIZE/2); \ -+ _FP_FRAC_ADD_2(_z, _z, _a); \ -+ \ -+ /* normalize */ \ -+ _FP_FRAC_SRS_2(_z, wfracbits - 1, 2*wfracbits); \ -+ R##_f = _z_f0; \ -+ } while (0) -+ -+ -+/* -+ * Division algorithms: -+ */ -+ -+/* Basic. Assuming the host word size is >= 2*FRACBITS, we can do the -+ division immediately. Give this macro either _FP_DIV_HELP_imm for -+ C primitives or _FP_DIV_HELP_ldiv for the ISO function. Which you -+ choose will depend on what the compiler does with divrem4. */ -+ -+#define _FP_DIV_MEAT_1_imm(fs, R, X, Y, doit) \ -+ do { \ -+ _FP_W_TYPE _q, _r; \ -+ X##_f <<= (X##_f < Y##_f \ -+ ? R##_e--, _FP_WFRACBITS_##fs \ -+ : _FP_WFRACBITS_##fs - 1); \ -+ doit(_q, _r, X##_f, Y##_f); \ -+ R##_f = _q | (_r != 0); \ -+ } while (0) -+ -+/* GCC's longlong.h defines a 2W / 1W => (1W,1W) primitive udiv_qrnnd -+ that may be useful in this situation. This first is for a primitive -+ that requires normalization, the second for one that does not. Look -+ for UDIV_NEEDS_NORMALIZATION to tell which your machine needs. */ -+ -+#define _FP_DIV_MEAT_1_udiv_norm(fs, R, X, Y) \ -+ do { \ -+ _FP_W_TYPE _nh, _nl, _q, _r, _y; \ -+ \ -+ /* Normalize Y -- i.e. make the most significant bit set. */ \ -+ _y = Y##_f << _FP_WFRACXBITS_##fs; \ -+ \ -+ /* Shift X op correspondingly high, that is, up one full word. */ \ -+ if (X##_f < Y##_f) \ -+ { \ -+ R##_e--; \ -+ _nl = 0; \ -+ _nh = X##_f; \ -+ } \ -+ else \ -+ { \ -+ _nl = X##_f << (_FP_W_TYPE_SIZE - 1); \ -+ _nh = X##_f >> 1; \ -+ } \ -+ \ -+ udiv_qrnnd(_q, _r, _nh, _nl, _y); \ -+ R##_f = _q | (_r != 0); \ -+ } while (0) -+ -+#define _FP_DIV_MEAT_1_udiv(fs, R, X, Y) \ -+ do { \ -+ _FP_W_TYPE _nh, _nl, _q, _r; \ -+ if (X##_f < Y##_f) \ -+ { \ -+ R##_e--; \ -+ _nl = X##_f << _FP_WFRACBITS_##fs; \ -+ _nh = X##_f >> _FP_WFRACXBITS_##fs; \ -+ } \ -+ else \ -+ { \ -+ _nl = X##_f << (_FP_WFRACBITS_##fs - 1); \ -+ _nh = X##_f >> (_FP_WFRACXBITS_##fs + 1); \ -+ } \ -+ udiv_qrnnd(_q, _r, _nh, _nl, Y##_f); \ -+ R##_f = _q | (_r != 0); \ -+ } while (0) -+ -+ -+/* -+ * Square root algorithms: -+ * We have just one right now, maybe Newton approximation -+ * should be added for those machines where division is fast. -+ */ -+ -+#define _FP_SQRT_MEAT_1(R, S, T, X, q) \ -+ do { \ -+ while (q != _FP_WORK_ROUND) \ -+ { \ -+ T##_f = S##_f + q; \ -+ if (T##_f <= X##_f) \ -+ { \ -+ S##_f = T##_f + q; \ -+ X##_f -= T##_f; \ -+ R##_f += q; \ -+ } \ -+ _FP_FRAC_SLL_1(X, 1); \ -+ q >>= 1; \ -+ } \ -+ if (X##_f) \ -+ { \ -+ if (S##_f < X##_f) \ -+ R##_f |= _FP_WORK_ROUND; \ -+ R##_f |= _FP_WORK_STICKY; \ -+ } \ -+ } while (0) -+ -+/* -+ * Assembly/disassembly for converting to/from integral types. -+ * No shifting or overflow handled here. -+ */ -+ -+#define _FP_FRAC_ASSEMBLE_1(r, X, rsize) (r = X##_f) -+#define _FP_FRAC_DISASSEMBLE_1(X, r, rsize) (X##_f = r) -+ -+ -+/* -+ * Convert FP values between word sizes -+ */ -+ -+#define _FP_FRAC_COPY_1_1(D, S) (D##_f = S##_f) -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/op-2.h uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/op-2.h ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/op-2.h 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/op-2.h 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,617 @@ -+/* Software floating-point emulation. -+ Basic two-word fraction declaration and manipulation. -+ Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com), -+ Jakub Jelinek (jj@ultra.linux.cz), -+ David S. Miller (davem@redhat.com) and -+ Peter Maydell (pmaydell@chiark.greenend.org.uk). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ In addition to the permissions in the GNU Lesser General Public -+ License, the Free Software Foundation gives you unlimited -+ permission to link the compiled version of this file into -+ combinations with other programs, and to distribute those -+ combinations without any restriction coming from the use of this -+ file. (The Lesser General Public License restrictions do apply in -+ other respects; for example, they cover modification of the file, -+ and distribution when not linked into a combine executable.) -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, -+ MA 02110-1301, USA. */ -+ -+#define _FP_FRAC_DECL_2(X) _FP_W_TYPE X##_f0, X##_f1 -+#define _FP_FRAC_COPY_2(D,S) (D##_f0 = S##_f0, D##_f1 = S##_f1) -+#define _FP_FRAC_SET_2(X,I) __FP_FRAC_SET_2(X, I) -+#define _FP_FRAC_HIGH_2(X) (X##_f1) -+#define _FP_FRAC_LOW_2(X) (X##_f0) -+#define _FP_FRAC_WORD_2(X,w) (X##_f##w) -+ -+#define _FP_FRAC_SLL_2(X,N) \ -+(void)(((N) < _FP_W_TYPE_SIZE) \ -+ ? ({ \ -+ if (__builtin_constant_p(N) && (N) == 1) \ -+ { \ -+ X##_f1 = X##_f1 + X##_f1 + (((_FP_WS_TYPE)(X##_f0)) < 0); \ -+ X##_f0 += X##_f0; \ -+ } \ -+ else \ -+ { \ -+ X##_f1 = X##_f1 << (N) | X##_f0 >> (_FP_W_TYPE_SIZE - (N)); \ -+ X##_f0 <<= (N); \ -+ } \ -+ 0; \ -+ }) \ -+ : ({ \ -+ X##_f1 = X##_f0 << ((N) - _FP_W_TYPE_SIZE); \ -+ X##_f0 = 0; \ -+ })) -+ -+ -+#define _FP_FRAC_SRL_2(X,N) \ -+(void)(((N) < _FP_W_TYPE_SIZE) \ -+ ? ({ \ -+ X##_f0 = X##_f0 >> (N) | X##_f1 << (_FP_W_TYPE_SIZE - (N)); \ -+ X##_f1 >>= (N); \ -+ }) \ -+ : ({ \ -+ X##_f0 = X##_f1 >> ((N) - _FP_W_TYPE_SIZE); \ -+ X##_f1 = 0; \ -+ })) -+ -+/* Right shift with sticky-lsb. */ -+#define _FP_FRAC_SRST_2(X,S, N,sz) \ -+(void)(((N) < _FP_W_TYPE_SIZE) \ -+ ? ({ \ -+ S = (__builtin_constant_p(N) && (N) == 1 \ -+ ? X##_f0 & 1 \ -+ : (X##_f0 << (_FP_W_TYPE_SIZE - (N))) != 0); \ -+ X##_f0 = (X##_f1 << (_FP_W_TYPE_SIZE - (N)) | X##_f0 >> (N)); \ -+ X##_f1 >>= (N); \ -+ }) \ -+ : ({ \ -+ S = ((((N) == _FP_W_TYPE_SIZE \ -+ ? 0 \ -+ : (X##_f1 << (2*_FP_W_TYPE_SIZE - (N)))) \ -+ | X##_f0) != 0); \ -+ X##_f0 = (X##_f1 >> ((N) - _FP_W_TYPE_SIZE)); \ -+ X##_f1 = 0; \ -+ })) -+ -+#define _FP_FRAC_SRS_2(X,N,sz) \ -+(void)(((N) < _FP_W_TYPE_SIZE) \ -+ ? ({ \ -+ X##_f0 = (X##_f1 << (_FP_W_TYPE_SIZE - (N)) | X##_f0 >> (N) | \ -+ (__builtin_constant_p(N) && (N) == 1 \ -+ ? X##_f0 & 1 \ -+ : (X##_f0 << (_FP_W_TYPE_SIZE - (N))) != 0)); \ -+ X##_f1 >>= (N); \ -+ }) \ -+ : ({ \ -+ X##_f0 = (X##_f1 >> ((N) - _FP_W_TYPE_SIZE) | \ -+ ((((N) == _FP_W_TYPE_SIZE \ -+ ? 0 \ -+ : (X##_f1 << (2*_FP_W_TYPE_SIZE - (N)))) \ -+ | X##_f0) != 0)); \ -+ X##_f1 = 0; \ -+ })) -+ -+#define _FP_FRAC_ADDI_2(X,I) \ -+ __FP_FRAC_ADDI_2(X##_f1, X##_f0, I) -+ -+#define _FP_FRAC_ADD_2(R,X,Y) \ -+ __FP_FRAC_ADD_2(R##_f1, R##_f0, X##_f1, X##_f0, Y##_f1, Y##_f0) -+ -+#define _FP_FRAC_SUB_2(R,X,Y) \ -+ __FP_FRAC_SUB_2(R##_f1, R##_f0, X##_f1, X##_f0, Y##_f1, Y##_f0) -+ -+#define _FP_FRAC_DEC_2(X,Y) \ -+ __FP_FRAC_DEC_2(X##_f1, X##_f0, Y##_f1, Y##_f0) -+ -+#define _FP_FRAC_CLZ_2(R,X) \ -+ do { \ -+ if (X##_f1) \ -+ __FP_CLZ(R,X##_f1); \ -+ else \ -+ { \ -+ __FP_CLZ(R,X##_f0); \ -+ R += _FP_W_TYPE_SIZE; \ -+ } \ -+ } while(0) -+ -+/* Predicates */ -+#define _FP_FRAC_NEGP_2(X) ((_FP_WS_TYPE)X##_f1 < 0) -+#define _FP_FRAC_ZEROP_2(X) ((X##_f1 | X##_f0) == 0) -+#define _FP_FRAC_OVERP_2(fs,X) (_FP_FRAC_HIGH_##fs(X) & _FP_OVERFLOW_##fs) -+#define _FP_FRAC_CLEAR_OVERP_2(fs,X) (_FP_FRAC_HIGH_##fs(X) &= ~_FP_OVERFLOW_##fs) -+#define _FP_FRAC_EQ_2(X, Y) (X##_f1 == Y##_f1 && X##_f0 == Y##_f0) -+#define _FP_FRAC_GT_2(X, Y) \ -+ (X##_f1 > Y##_f1 || (X##_f1 == Y##_f1 && X##_f0 > Y##_f0)) -+#define _FP_FRAC_GE_2(X, Y) \ -+ (X##_f1 > Y##_f1 || (X##_f1 == Y##_f1 && X##_f0 >= Y##_f0)) -+ -+#define _FP_ZEROFRAC_2 0, 0 -+#define _FP_MINFRAC_2 0, 1 -+#define _FP_MAXFRAC_2 (~(_FP_WS_TYPE)0), (~(_FP_WS_TYPE)0) -+ -+/* -+ * Internals -+ */ -+ -+#define __FP_FRAC_SET_2(X,I1,I0) (X##_f0 = I0, X##_f1 = I1) -+ -+#define __FP_CLZ_2(R, xh, xl) \ -+ do { \ -+ if (xh) \ -+ __FP_CLZ(R,xh); \ -+ else \ -+ { \ -+ __FP_CLZ(R,xl); \ -+ R += _FP_W_TYPE_SIZE; \ -+ } \ -+ } while(0) -+ -+#if 0 -+ -+#ifndef __FP_FRAC_ADDI_2 -+#define __FP_FRAC_ADDI_2(xh, xl, i) \ -+ (xh += ((xl += i) < i)) -+#endif -+#ifndef __FP_FRAC_ADD_2 -+#define __FP_FRAC_ADD_2(rh, rl, xh, xl, yh, yl) \ -+ (rh = xh + yh + ((rl = xl + yl) < xl)) -+#endif -+#ifndef __FP_FRAC_SUB_2 -+#define __FP_FRAC_SUB_2(rh, rl, xh, xl, yh, yl) \ -+ (rh = xh - yh - ((rl = xl - yl) > xl)) -+#endif -+#ifndef __FP_FRAC_DEC_2 -+#define __FP_FRAC_DEC_2(xh, xl, yh, yl) \ -+ do { \ -+ UWtype _t = xl; \ -+ xh -= yh + ((xl -= yl) > _t); \ -+ } while (0) -+#endif -+ -+#else -+ -+#undef __FP_FRAC_ADDI_2 -+#define __FP_FRAC_ADDI_2(xh, xl, i) add_ssaaaa(xh, xl, xh, xl, 0, i) -+#undef __FP_FRAC_ADD_2 -+#define __FP_FRAC_ADD_2 add_ssaaaa -+#undef __FP_FRAC_SUB_2 -+#define __FP_FRAC_SUB_2 sub_ddmmss -+#undef __FP_FRAC_DEC_2 -+#define __FP_FRAC_DEC_2(xh, xl, yh, yl) sub_ddmmss(xh, xl, xh, xl, yh, yl) -+ -+#endif -+ -+/* -+ * Unpack the raw bits of a native fp value. Do not classify or -+ * normalize the data. -+ */ -+ -+#define _FP_UNPACK_RAW_2(fs, X, val) \ -+ do { \ -+ union _FP_UNION_##fs _flo; _flo.flt = (val); \ -+ \ -+ X##_f0 = _flo.bits.frac0; \ -+ X##_f1 = _flo.bits.frac1; \ -+ X##_e = _flo.bits.exp; \ -+ X##_s = _flo.bits.sign; \ -+ } while (0) -+ -+#define _FP_UNPACK_RAW_2_P(fs, X, val) \ -+ do { \ -+ union _FP_UNION_##fs *_flo = \ -+ (union _FP_UNION_##fs *)(val); \ -+ \ -+ X##_f0 = _flo->bits.frac0; \ -+ X##_f1 = _flo->bits.frac1; \ -+ X##_e = _flo->bits.exp; \ -+ X##_s = _flo->bits.sign; \ -+ } while (0) -+ -+ -+/* -+ * Repack the raw bits of a native fp value. -+ */ -+ -+#define _FP_PACK_RAW_2(fs, val, X) \ -+ do { \ -+ union _FP_UNION_##fs _flo; \ -+ \ -+ _flo.bits.frac0 = X##_f0; \ -+ _flo.bits.frac1 = X##_f1; \ -+ _flo.bits.exp = X##_e; \ -+ _flo.bits.sign = X##_s; \ -+ \ -+ (val) = _flo.flt; \ -+ } while (0) -+ -+#define _FP_PACK_RAW_2_P(fs, val, X) \ -+ do { \ -+ union _FP_UNION_##fs *_flo = \ -+ (union _FP_UNION_##fs *)(val); \ -+ \ -+ _flo->bits.frac0 = X##_f0; \ -+ _flo->bits.frac1 = X##_f1; \ -+ _flo->bits.exp = X##_e; \ -+ _flo->bits.sign = X##_s; \ -+ } while (0) -+ -+ -+/* -+ * Multiplication algorithms: -+ */ -+ -+/* Given a 1W * 1W => 2W primitive, do the extended multiplication. */ -+ -+#define _FP_MUL_MEAT_2_wide(wfracbits, R, X, Y, doit) \ -+ do { \ -+ _FP_FRAC_DECL_4(_z); _FP_FRAC_DECL_2(_b); _FP_FRAC_DECL_2(_c); \ -+ \ -+ doit(_FP_FRAC_WORD_4(_z,1), _FP_FRAC_WORD_4(_z,0), X##_f0, Y##_f0); \ -+ doit(_b_f1, _b_f0, X##_f0, Y##_f1); \ -+ doit(_c_f1, _c_f0, X##_f1, Y##_f0); \ -+ doit(_FP_FRAC_WORD_4(_z,3), _FP_FRAC_WORD_4(_z,2), X##_f1, Y##_f1); \ -+ \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \ -+ _FP_FRAC_WORD_4(_z,1), 0, _b_f1, _b_f0, \ -+ _FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \ -+ _FP_FRAC_WORD_4(_z,1)); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \ -+ _FP_FRAC_WORD_4(_z,1), 0, _c_f1, _c_f0, \ -+ _FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \ -+ _FP_FRAC_WORD_4(_z,1)); \ -+ \ -+ /* Normalize since we know where the msb of the multiplicands \ -+ were (bit B), we know that the msb of the of the product is \ -+ at either 2B or 2B-1. */ \ -+ _FP_FRAC_SRS_4(_z, wfracbits-1, 2*wfracbits); \ -+ R##_f0 = _FP_FRAC_WORD_4(_z,0); \ -+ R##_f1 = _FP_FRAC_WORD_4(_z,1); \ -+ } while (0) -+ -+/* Given a 1W * 1W => 2W primitive, do the extended multiplication. -+ Do only 3 multiplications instead of four. This one is for machines -+ where multiplication is much more expensive than subtraction. */ -+ -+#define _FP_MUL_MEAT_2_wide_3mul(wfracbits, R, X, Y, doit) \ -+ do { \ -+ _FP_FRAC_DECL_4(_z); _FP_FRAC_DECL_2(_b); _FP_FRAC_DECL_2(_c); \ -+ _FP_W_TYPE _d; \ -+ int _c1, _c2; \ -+ \ -+ _b_f0 = X##_f0 + X##_f1; \ -+ _c1 = _b_f0 < X##_f0; \ -+ _b_f1 = Y##_f0 + Y##_f1; \ -+ _c2 = _b_f1 < Y##_f0; \ -+ doit(_d, _FP_FRAC_WORD_4(_z,0), X##_f0, Y##_f0); \ -+ doit(_FP_FRAC_WORD_4(_z,2), _FP_FRAC_WORD_4(_z,1), _b_f0, _b_f1); \ -+ doit(_c_f1, _c_f0, X##_f1, Y##_f1); \ -+ \ -+ _b_f0 &= -_c2; \ -+ _b_f1 &= -_c1; \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \ -+ _FP_FRAC_WORD_4(_z,1), (_c1 & _c2), 0, _d, \ -+ 0, _FP_FRAC_WORD_4(_z,2), _FP_FRAC_WORD_4(_z,1)); \ -+ __FP_FRAC_ADDI_2(_FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \ -+ _b_f0); \ -+ __FP_FRAC_ADDI_2(_FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \ -+ _b_f1); \ -+ __FP_FRAC_DEC_3(_FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \ -+ _FP_FRAC_WORD_4(_z,1), \ -+ 0, _d, _FP_FRAC_WORD_4(_z,0)); \ -+ __FP_FRAC_DEC_3(_FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \ -+ _FP_FRAC_WORD_4(_z,1), 0, _c_f1, _c_f0); \ -+ __FP_FRAC_ADD_2(_FP_FRAC_WORD_4(_z,3), _FP_FRAC_WORD_4(_z,2), \ -+ _c_f1, _c_f0, \ -+ _FP_FRAC_WORD_4(_z,3), _FP_FRAC_WORD_4(_z,2)); \ -+ \ -+ /* Normalize since we know where the msb of the multiplicands \ -+ were (bit B), we know that the msb of the of the product is \ -+ at either 2B or 2B-1. */ \ -+ _FP_FRAC_SRS_4(_z, wfracbits-1, 2*wfracbits); \ -+ R##_f0 = _FP_FRAC_WORD_4(_z,0); \ -+ R##_f1 = _FP_FRAC_WORD_4(_z,1); \ -+ } while (0) -+ -+#define _FP_MUL_MEAT_2_gmp(wfracbits, R, X, Y) \ -+ do { \ -+ _FP_FRAC_DECL_4(_z); \ -+ _FP_W_TYPE _x[2], _y[2]; \ -+ _x[0] = X##_f0; _x[1] = X##_f1; \ -+ _y[0] = Y##_f0; _y[1] = Y##_f1; \ -+ \ -+ mpn_mul_n(_z_f, _x, _y, 2); \ -+ \ -+ /* Normalize since we know where the msb of the multiplicands \ -+ were (bit B), we know that the msb of the of the product is \ -+ at either 2B or 2B-1. */ \ -+ _FP_FRAC_SRS_4(_z, wfracbits-1, 2*wfracbits); \ -+ R##_f0 = _z_f[0]; \ -+ R##_f1 = _z_f[1]; \ -+ } while (0) -+ -+/* Do at most 120x120=240 bits multiplication using double floating -+ point multiplication. This is useful if floating point -+ multiplication has much bigger throughput than integer multiply. -+ It is supposed to work for _FP_W_TYPE_SIZE 64 and wfracbits -+ between 106 and 120 only. -+ Caller guarantees that X and Y has (1LLL << (wfracbits - 1)) set. -+ SETFETZ is a macro which will disable all FPU exceptions and set rounding -+ towards zero, RESETFE should optionally reset it back. */ -+ -+#define _FP_MUL_MEAT_2_120_240_double(wfracbits, R, X, Y, setfetz, resetfe) \ -+ do { \ -+ static const double _const[] = { \ -+ /* 2^-24 */ 5.9604644775390625e-08, \ -+ /* 2^-48 */ 3.5527136788005009e-15, \ -+ /* 2^-72 */ 2.1175823681357508e-22, \ -+ /* 2^-96 */ 1.2621774483536189e-29, \ -+ /* 2^28 */ 2.68435456e+08, \ -+ /* 2^4 */ 1.600000e+01, \ -+ /* 2^-20 */ 9.5367431640625e-07, \ -+ /* 2^-44 */ 5.6843418860808015e-14, \ -+ /* 2^-68 */ 3.3881317890172014e-21, \ -+ /* 2^-92 */ 2.0194839173657902e-28, \ -+ /* 2^-116 */ 1.2037062152420224e-35}; \ -+ double _a240, _b240, _c240, _d240, _e240, _f240, \ -+ _g240, _h240, _i240, _j240, _k240; \ -+ union { double d; UDItype i; } _l240, _m240, _n240, _o240, \ -+ _p240, _q240, _r240, _s240; \ -+ UDItype _t240, _u240, _v240, _w240, _x240, _y240 = 0; \ -+ \ -+ if (wfracbits < 106 || wfracbits > 120) \ -+ abort(); \ -+ \ -+ setfetz; \ -+ \ -+ _e240 = (double)(long)(X##_f0 & 0xffffff); \ -+ _j240 = (double)(long)(Y##_f0 & 0xffffff); \ -+ _d240 = (double)(long)((X##_f0 >> 24) & 0xffffff); \ -+ _i240 = (double)(long)((Y##_f0 >> 24) & 0xffffff); \ -+ _c240 = (double)(long)(((X##_f1 << 16) & 0xffffff) | (X##_f0 >> 48)); \ -+ _h240 = (double)(long)(((Y##_f1 << 16) & 0xffffff) | (Y##_f0 >> 48)); \ -+ _b240 = (double)(long)((X##_f1 >> 8) & 0xffffff); \ -+ _g240 = (double)(long)((Y##_f1 >> 8) & 0xffffff); \ -+ _a240 = (double)(long)(X##_f1 >> 32); \ -+ _f240 = (double)(long)(Y##_f1 >> 32); \ -+ _e240 *= _const[3]; \ -+ _j240 *= _const[3]; \ -+ _d240 *= _const[2]; \ -+ _i240 *= _const[2]; \ -+ _c240 *= _const[1]; \ -+ _h240 *= _const[1]; \ -+ _b240 *= _const[0]; \ -+ _g240 *= _const[0]; \ -+ _s240.d = _e240*_j240;\ -+ _r240.d = _d240*_j240 + _e240*_i240;\ -+ _q240.d = _c240*_j240 + _d240*_i240 + _e240*_h240;\ -+ _p240.d = _b240*_j240 + _c240*_i240 + _d240*_h240 + _e240*_g240;\ -+ _o240.d = _a240*_j240 + _b240*_i240 + _c240*_h240 + _d240*_g240 + _e240*_f240;\ -+ _n240.d = _a240*_i240 + _b240*_h240 + _c240*_g240 + _d240*_f240; \ -+ _m240.d = _a240*_h240 + _b240*_g240 + _c240*_f240; \ -+ _l240.d = _a240*_g240 + _b240*_f240; \ -+ _k240 = _a240*_f240; \ -+ _r240.d += _s240.d; \ -+ _q240.d += _r240.d; \ -+ _p240.d += _q240.d; \ -+ _o240.d += _p240.d; \ -+ _n240.d += _o240.d; \ -+ _m240.d += _n240.d; \ -+ _l240.d += _m240.d; \ -+ _k240 += _l240.d; \ -+ _s240.d -= ((_const[10]+_s240.d)-_const[10]); \ -+ _r240.d -= ((_const[9]+_r240.d)-_const[9]); \ -+ _q240.d -= ((_const[8]+_q240.d)-_const[8]); \ -+ _p240.d -= ((_const[7]+_p240.d)-_const[7]); \ -+ _o240.d += _const[7]; \ -+ _n240.d += _const[6]; \ -+ _m240.d += _const[5]; \ -+ _l240.d += _const[4]; \ -+ if (_s240.d != 0.0) _y240 = 1; \ -+ if (_r240.d != 0.0) _y240 = 1; \ -+ if (_q240.d != 0.0) _y240 = 1; \ -+ if (_p240.d != 0.0) _y240 = 1; \ -+ _t240 = (DItype)_k240; \ -+ _u240 = _l240.i; \ -+ _v240 = _m240.i; \ -+ _w240 = _n240.i; \ -+ _x240 = _o240.i; \ -+ R##_f1 = (_t240 << (128 - (wfracbits - 1))) \ -+ | ((_u240 & 0xffffff) >> ((wfracbits - 1) - 104)); \ -+ R##_f0 = ((_u240 & 0xffffff) << (168 - (wfracbits - 1))) \ -+ | ((_v240 & 0xffffff) << (144 - (wfracbits - 1))) \ -+ | ((_w240 & 0xffffff) << (120 - (wfracbits - 1))) \ -+ | ((_x240 & 0xffffff) >> ((wfracbits - 1) - 96)) \ -+ | _y240; \ -+ resetfe; \ -+ } while (0) -+ -+/* -+ * Division algorithms: -+ */ -+ -+#define _FP_DIV_MEAT_2_udiv(fs, R, X, Y) \ -+ do { \ -+ _FP_W_TYPE _n_f2, _n_f1, _n_f0, _r_f1, _r_f0, _m_f1, _m_f0; \ -+ if (_FP_FRAC_GT_2(X, Y)) \ -+ { \ -+ _n_f2 = X##_f1 >> 1; \ -+ _n_f1 = X##_f1 << (_FP_W_TYPE_SIZE - 1) | X##_f0 >> 1; \ -+ _n_f0 = X##_f0 << (_FP_W_TYPE_SIZE - 1); \ -+ } \ -+ else \ -+ { \ -+ R##_e--; \ -+ _n_f2 = X##_f1; \ -+ _n_f1 = X##_f0; \ -+ _n_f0 = 0; \ -+ } \ -+ \ -+ /* Normalize, i.e. make the most significant bit of the \ -+ denominator set. */ \ -+ _FP_FRAC_SLL_2(Y, _FP_WFRACXBITS_##fs); \ -+ \ -+ udiv_qrnnd(R##_f1, _r_f1, _n_f2, _n_f1, Y##_f1); \ -+ umul_ppmm(_m_f1, _m_f0, R##_f1, Y##_f0); \ -+ _r_f0 = _n_f0; \ -+ if (_FP_FRAC_GT_2(_m, _r)) \ -+ { \ -+ R##_f1--; \ -+ _FP_FRAC_ADD_2(_r, Y, _r); \ -+ if (_FP_FRAC_GE_2(_r, Y) && _FP_FRAC_GT_2(_m, _r)) \ -+ { \ -+ R##_f1--; \ -+ _FP_FRAC_ADD_2(_r, Y, _r); \ -+ } \ -+ } \ -+ _FP_FRAC_DEC_2(_r, _m); \ -+ \ -+ if (_r_f1 == Y##_f1) \ -+ { \ -+ /* This is a special case, not an optimization \ -+ (_r/Y##_f1 would not fit into UWtype). \ -+ As _r is guaranteed to be < Y, R##_f0 can be either \ -+ (UWtype)-1 or (UWtype)-2. But as we know what kind \ -+ of bits it is (sticky, guard, round), we don't care. \ -+ We also don't care what the reminder is, because the \ -+ guard bit will be set anyway. -jj */ \ -+ R##_f0 = -1; \ -+ } \ -+ else \ -+ { \ -+ udiv_qrnnd(R##_f0, _r_f1, _r_f1, _r_f0, Y##_f1); \ -+ umul_ppmm(_m_f1, _m_f0, R##_f0, Y##_f0); \ -+ _r_f0 = 0; \ -+ if (_FP_FRAC_GT_2(_m, _r)) \ -+ { \ -+ R##_f0--; \ -+ _FP_FRAC_ADD_2(_r, Y, _r); \ -+ if (_FP_FRAC_GE_2(_r, Y) && _FP_FRAC_GT_2(_m, _r)) \ -+ { \ -+ R##_f0--; \ -+ _FP_FRAC_ADD_2(_r, Y, _r); \ -+ } \ -+ } \ -+ if (!_FP_FRAC_EQ_2(_r, _m)) \ -+ R##_f0 |= _FP_WORK_STICKY; \ -+ } \ -+ } while (0) -+ -+ -+#define _FP_DIV_MEAT_2_gmp(fs, R, X, Y) \ -+ do { \ -+ _FP_W_TYPE _x[4], _y[2], _z[4]; \ -+ _y[0] = Y##_f0; _y[1] = Y##_f1; \ -+ _x[0] = _x[3] = 0; \ -+ if (_FP_FRAC_GT_2(X, Y)) \ -+ { \ -+ R##_e++; \ -+ _x[1] = (X##_f0 << (_FP_WFRACBITS_##fs-1 - _FP_W_TYPE_SIZE) | \ -+ X##_f1 >> (_FP_W_TYPE_SIZE - \ -+ (_FP_WFRACBITS_##fs-1 - _FP_W_TYPE_SIZE))); \ -+ _x[2] = X##_f1 << (_FP_WFRACBITS_##fs-1 - _FP_W_TYPE_SIZE); \ -+ } \ -+ else \ -+ { \ -+ _x[1] = (X##_f0 << (_FP_WFRACBITS_##fs - _FP_W_TYPE_SIZE) | \ -+ X##_f1 >> (_FP_W_TYPE_SIZE - \ -+ (_FP_WFRACBITS_##fs - _FP_W_TYPE_SIZE))); \ -+ _x[2] = X##_f1 << (_FP_WFRACBITS_##fs - _FP_W_TYPE_SIZE); \ -+ } \ -+ \ -+ (void) mpn_divrem (_z, 0, _x, 4, _y, 2); \ -+ R##_f1 = _z[1]; \ -+ R##_f0 = _z[0] | ((_x[0] | _x[1]) != 0); \ -+ } while (0) -+ -+ -+/* -+ * Square root algorithms: -+ * We have just one right now, maybe Newton approximation -+ * should be added for those machines where division is fast. -+ */ -+ -+#define _FP_SQRT_MEAT_2(R, S, T, X, q) \ -+ do { \ -+ while (q) \ -+ { \ -+ T##_f1 = S##_f1 + q; \ -+ if (T##_f1 <= X##_f1) \ -+ { \ -+ S##_f1 = T##_f1 + q; \ -+ X##_f1 -= T##_f1; \ -+ R##_f1 += q; \ -+ } \ -+ _FP_FRAC_SLL_2(X, 1); \ -+ q >>= 1; \ -+ } \ -+ q = (_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE - 1); \ -+ while (q != _FP_WORK_ROUND) \ -+ { \ -+ T##_f0 = S##_f0 + q; \ -+ T##_f1 = S##_f1; \ -+ if (T##_f1 < X##_f1 || \ -+ (T##_f1 == X##_f1 && T##_f0 <= X##_f0)) \ -+ { \ -+ S##_f0 = T##_f0 + q; \ -+ S##_f1 += (T##_f0 > S##_f0); \ -+ _FP_FRAC_DEC_2(X, T); \ -+ R##_f0 += q; \ -+ } \ -+ _FP_FRAC_SLL_2(X, 1); \ -+ q >>= 1; \ -+ } \ -+ if (X##_f0 | X##_f1) \ -+ { \ -+ if (S##_f1 < X##_f1 || \ -+ (S##_f1 == X##_f1 && S##_f0 < X##_f0)) \ -+ R##_f0 |= _FP_WORK_ROUND; \ -+ R##_f0 |= _FP_WORK_STICKY; \ -+ } \ -+ } while (0) -+ -+ -+/* -+ * Assembly/disassembly for converting to/from integral types. -+ * No shifting or overflow handled here. -+ */ -+ -+#define _FP_FRAC_ASSEMBLE_2(r, X, rsize) \ -+(void)((rsize <= _FP_W_TYPE_SIZE) \ -+ ? ({ r = X##_f0; }) \ -+ : ({ \ -+ r = X##_f1; \ -+ r <<= _FP_W_TYPE_SIZE; \ -+ r += X##_f0; \ -+ })) -+ -+#define _FP_FRAC_DISASSEMBLE_2(X, r, rsize) \ -+ do { \ -+ X##_f0 = r; \ -+ X##_f1 = (rsize <= _FP_W_TYPE_SIZE ? 0 : r >> _FP_W_TYPE_SIZE); \ -+ } while (0) -+ -+/* -+ * Convert FP values between word sizes -+ */ -+ -+#define _FP_FRAC_COPY_1_2(D, S) (D##_f = S##_f0) -+ -+#define _FP_FRAC_COPY_2_1(D, S) ((D##_f0 = S##_f), (D##_f1 = 0)) -+ -+#define _FP_FRAC_COPY_2_2(D,S) _FP_FRAC_COPY_2(D,S) -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/op-4.h uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/op-4.h ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/op-4.h 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/op-4.h 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,688 @@ -+/* Software floating-point emulation. -+ Basic four-word fraction declaration and manipulation. -+ Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com), -+ Jakub Jelinek (jj@ultra.linux.cz), -+ David S. Miller (davem@redhat.com) and -+ Peter Maydell (pmaydell@chiark.greenend.org.uk). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ In addition to the permissions in the GNU Lesser General Public -+ License, the Free Software Foundation gives you unlimited -+ permission to link the compiled version of this file into -+ combinations with other programs, and to distribute those -+ combinations without any restriction coming from the use of this -+ file. (The Lesser General Public License restrictions do apply in -+ other respects; for example, they cover modification of the file, -+ and distribution when not linked into a combine executable.) -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, -+ MA 02110-1301, USA. */ -+ -+#define _FP_FRAC_DECL_4(X) _FP_W_TYPE X##_f[4] -+#define _FP_FRAC_COPY_4(D,S) \ -+ (D##_f[0] = S##_f[0], D##_f[1] = S##_f[1], \ -+ D##_f[2] = S##_f[2], D##_f[3] = S##_f[3]) -+#define _FP_FRAC_SET_4(X,I) __FP_FRAC_SET_4(X, I) -+#define _FP_FRAC_HIGH_4(X) (X##_f[3]) -+#define _FP_FRAC_LOW_4(X) (X##_f[0]) -+#define _FP_FRAC_WORD_4(X,w) (X##_f[w]) -+ -+#define _FP_FRAC_SLL_4(X,N) \ -+ do { \ -+ _FP_I_TYPE _up, _down, _skip, _i; \ -+ _skip = (N) / _FP_W_TYPE_SIZE; \ -+ _up = (N) % _FP_W_TYPE_SIZE; \ -+ _down = _FP_W_TYPE_SIZE - _up; \ -+ if (!_up) \ -+ for (_i = 3; _i >= _skip; --_i) \ -+ X##_f[_i] = X##_f[_i-_skip]; \ -+ else \ -+ { \ -+ for (_i = 3; _i > _skip; --_i) \ -+ X##_f[_i] = X##_f[_i-_skip] << _up \ -+ | X##_f[_i-_skip-1] >> _down; \ -+ X##_f[_i--] = X##_f[0] << _up; \ -+ } \ -+ for (; _i >= 0; --_i) \ -+ X##_f[_i] = 0; \ -+ } while (0) -+ -+/* This one was broken too */ -+#define _FP_FRAC_SRL_4(X,N) \ -+ do { \ -+ _FP_I_TYPE _up, _down, _skip, _i; \ -+ _skip = (N) / _FP_W_TYPE_SIZE; \ -+ _down = (N) % _FP_W_TYPE_SIZE; \ -+ _up = _FP_W_TYPE_SIZE - _down; \ -+ if (!_down) \ -+ for (_i = 0; _i <= 3-_skip; ++_i) \ -+ X##_f[_i] = X##_f[_i+_skip]; \ -+ else \ -+ { \ -+ for (_i = 0; _i < 3-_skip; ++_i) \ -+ X##_f[_i] = X##_f[_i+_skip] >> _down \ -+ | X##_f[_i+_skip+1] << _up; \ -+ X##_f[_i++] = X##_f[3] >> _down; \ -+ } \ -+ for (; _i < 4; ++_i) \ -+ X##_f[_i] = 0; \ -+ } while (0) -+ -+ -+/* Right shift with sticky-lsb. -+ * What this actually means is that we do a standard right-shift, -+ * but that if any of the bits that fall off the right hand side -+ * were one then we always set the LSbit. -+ */ -+#define _FP_FRAC_SRST_4(X,S,N,size) \ -+ do { \ -+ _FP_I_TYPE _up, _down, _skip, _i; \ -+ _FP_W_TYPE _s; \ -+ _skip = (N) / _FP_W_TYPE_SIZE; \ -+ _down = (N) % _FP_W_TYPE_SIZE; \ -+ _up = _FP_W_TYPE_SIZE - _down; \ -+ for (_s = _i = 0; _i < _skip; ++_i) \ -+ _s |= X##_f[_i]; \ -+ if (!_down) \ -+ for (_i = 0; _i <= 3-_skip; ++_i) \ -+ X##_f[_i] = X##_f[_i+_skip]; \ -+ else \ -+ { \ -+ _s |= X##_f[_i] << _up; \ -+ for (_i = 0; _i < 3-_skip; ++_i) \ -+ X##_f[_i] = X##_f[_i+_skip] >> _down \ -+ | X##_f[_i+_skip+1] << _up; \ -+ X##_f[_i++] = X##_f[3] >> _down; \ -+ } \ -+ for (; _i < 4; ++_i) \ -+ X##_f[_i] = 0; \ -+ S = (_s != 0); \ -+ } while (0) -+ -+#define _FP_FRAC_SRS_4(X,N,size) \ -+ do { \ -+ int _sticky; \ -+ _FP_FRAC_SRST_4(X, _sticky, N, size); \ -+ X##_f[0] |= _sticky; \ -+ } while (0) -+ -+#define _FP_FRAC_ADD_4(R,X,Y) \ -+ __FP_FRAC_ADD_4(R##_f[3], R##_f[2], R##_f[1], R##_f[0], \ -+ X##_f[3], X##_f[2], X##_f[1], X##_f[0], \ -+ Y##_f[3], Y##_f[2], Y##_f[1], Y##_f[0]) -+ -+#define _FP_FRAC_SUB_4(R,X,Y) \ -+ __FP_FRAC_SUB_4(R##_f[3], R##_f[2], R##_f[1], R##_f[0], \ -+ X##_f[3], X##_f[2], X##_f[1], X##_f[0], \ -+ Y##_f[3], Y##_f[2], Y##_f[1], Y##_f[0]) -+ -+#define _FP_FRAC_DEC_4(X,Y) \ -+ __FP_FRAC_DEC_4(X##_f[3], X##_f[2], X##_f[1], X##_f[0], \ -+ Y##_f[3], Y##_f[2], Y##_f[1], Y##_f[0]) -+ -+#define _FP_FRAC_ADDI_4(X,I) \ -+ __FP_FRAC_ADDI_4(X##_f[3], X##_f[2], X##_f[1], X##_f[0], I) -+ -+#define _FP_ZEROFRAC_4 0,0,0,0 -+#define _FP_MINFRAC_4 0,0,0,1 -+#define _FP_MAXFRAC_4 (~(_FP_WS_TYPE)0), (~(_FP_WS_TYPE)0), (~(_FP_WS_TYPE)0), (~(_FP_WS_TYPE)0) -+ -+#define _FP_FRAC_ZEROP_4(X) ((X##_f[0] | X##_f[1] | X##_f[2] | X##_f[3]) == 0) -+#define _FP_FRAC_NEGP_4(X) ((_FP_WS_TYPE)X##_f[3] < 0) -+#define _FP_FRAC_OVERP_4(fs,X) (_FP_FRAC_HIGH_##fs(X) & _FP_OVERFLOW_##fs) -+#define _FP_FRAC_CLEAR_OVERP_4(fs,X) (_FP_FRAC_HIGH_##fs(X) &= ~_FP_OVERFLOW_##fs) -+ -+#define _FP_FRAC_EQ_4(X,Y) \ -+ (X##_f[0] == Y##_f[0] && X##_f[1] == Y##_f[1] \ -+ && X##_f[2] == Y##_f[2] && X##_f[3] == Y##_f[3]) -+ -+#define _FP_FRAC_GT_4(X,Y) \ -+ (X##_f[3] > Y##_f[3] || \ -+ (X##_f[3] == Y##_f[3] && (X##_f[2] > Y##_f[2] || \ -+ (X##_f[2] == Y##_f[2] && (X##_f[1] > Y##_f[1] || \ -+ (X##_f[1] == Y##_f[1] && X##_f[0] > Y##_f[0]) \ -+ )) \ -+ )) \ -+ ) -+ -+#define _FP_FRAC_GE_4(X,Y) \ -+ (X##_f[3] > Y##_f[3] || \ -+ (X##_f[3] == Y##_f[3] && (X##_f[2] > Y##_f[2] || \ -+ (X##_f[2] == Y##_f[2] && (X##_f[1] > Y##_f[1] || \ -+ (X##_f[1] == Y##_f[1] && X##_f[0] >= Y##_f[0]) \ -+ )) \ -+ )) \ -+ ) -+ -+ -+#define _FP_FRAC_CLZ_4(R,X) \ -+ do { \ -+ if (X##_f[3]) \ -+ { \ -+ __FP_CLZ(R,X##_f[3]); \ -+ } \ -+ else if (X##_f[2]) \ -+ { \ -+ __FP_CLZ(R,X##_f[2]); \ -+ R += _FP_W_TYPE_SIZE; \ -+ } \ -+ else if (X##_f[1]) \ -+ { \ -+ __FP_CLZ(R,X##_f[1]); \ -+ R += _FP_W_TYPE_SIZE*2; \ -+ } \ -+ else \ -+ { \ -+ __FP_CLZ(R,X##_f[0]); \ -+ R += _FP_W_TYPE_SIZE*3; \ -+ } \ -+ } while(0) -+ -+ -+#define _FP_UNPACK_RAW_4(fs, X, val) \ -+ do { \ -+ union _FP_UNION_##fs _flo; _flo.flt = (val); \ -+ X##_f[0] = _flo.bits.frac0; \ -+ X##_f[1] = _flo.bits.frac1; \ -+ X##_f[2] = _flo.bits.frac2; \ -+ X##_f[3] = _flo.bits.frac3; \ -+ X##_e = _flo.bits.exp; \ -+ X##_s = _flo.bits.sign; \ -+ } while (0) -+ -+#define _FP_UNPACK_RAW_4_P(fs, X, val) \ -+ do { \ -+ union _FP_UNION_##fs *_flo = \ -+ (union _FP_UNION_##fs *)(val); \ -+ \ -+ X##_f[0] = _flo->bits.frac0; \ -+ X##_f[1] = _flo->bits.frac1; \ -+ X##_f[2] = _flo->bits.frac2; \ -+ X##_f[3] = _flo->bits.frac3; \ -+ X##_e = _flo->bits.exp; \ -+ X##_s = _flo->bits.sign; \ -+ } while (0) -+ -+#define _FP_PACK_RAW_4(fs, val, X) \ -+ do { \ -+ union _FP_UNION_##fs _flo; \ -+ _flo.bits.frac0 = X##_f[0]; \ -+ _flo.bits.frac1 = X##_f[1]; \ -+ _flo.bits.frac2 = X##_f[2]; \ -+ _flo.bits.frac3 = X##_f[3]; \ -+ _flo.bits.exp = X##_e; \ -+ _flo.bits.sign = X##_s; \ -+ (val) = _flo.flt; \ -+ } while (0) -+ -+#define _FP_PACK_RAW_4_P(fs, val, X) \ -+ do { \ -+ union _FP_UNION_##fs *_flo = \ -+ (union _FP_UNION_##fs *)(val); \ -+ \ -+ _flo->bits.frac0 = X##_f[0]; \ -+ _flo->bits.frac1 = X##_f[1]; \ -+ _flo->bits.frac2 = X##_f[2]; \ -+ _flo->bits.frac3 = X##_f[3]; \ -+ _flo->bits.exp = X##_e; \ -+ _flo->bits.sign = X##_s; \ -+ } while (0) -+ -+/* -+ * Multiplication algorithms: -+ */ -+ -+/* Given a 1W * 1W => 2W primitive, do the extended multiplication. */ -+ -+#define _FP_MUL_MEAT_4_wide(wfracbits, R, X, Y, doit) \ -+ do { \ -+ _FP_FRAC_DECL_8(_z); _FP_FRAC_DECL_2(_b); _FP_FRAC_DECL_2(_c); \ -+ _FP_FRAC_DECL_2(_d); _FP_FRAC_DECL_2(_e); _FP_FRAC_DECL_2(_f); \ -+ \ -+ doit(_FP_FRAC_WORD_8(_z,1), _FP_FRAC_WORD_8(_z,0), X##_f[0], Y##_f[0]); \ -+ doit(_b_f1, _b_f0, X##_f[0], Y##_f[1]); \ -+ doit(_c_f1, _c_f0, X##_f[1], Y##_f[0]); \ -+ doit(_d_f1, _d_f0, X##_f[1], Y##_f[1]); \ -+ doit(_e_f1, _e_f0, X##_f[0], Y##_f[2]); \ -+ doit(_f_f1, _f_f0, X##_f[2], Y##_f[0]); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,3),_FP_FRAC_WORD_8(_z,2), \ -+ _FP_FRAC_WORD_8(_z,1), 0,_b_f1,_b_f0, \ -+ 0,0,_FP_FRAC_WORD_8(_z,1)); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,3),_FP_FRAC_WORD_8(_z,2), \ -+ _FP_FRAC_WORD_8(_z,1), 0,_c_f1,_c_f0, \ -+ _FP_FRAC_WORD_8(_z,3),_FP_FRAC_WORD_8(_z,2), \ -+ _FP_FRAC_WORD_8(_z,1)); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,4),_FP_FRAC_WORD_8(_z,3), \ -+ _FP_FRAC_WORD_8(_z,2), 0,_d_f1,_d_f0, \ -+ 0,_FP_FRAC_WORD_8(_z,3),_FP_FRAC_WORD_8(_z,2)); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,4),_FP_FRAC_WORD_8(_z,3), \ -+ _FP_FRAC_WORD_8(_z,2), 0,_e_f1,_e_f0, \ -+ _FP_FRAC_WORD_8(_z,4),_FP_FRAC_WORD_8(_z,3), \ -+ _FP_FRAC_WORD_8(_z,2)); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,4),_FP_FRAC_WORD_8(_z,3), \ -+ _FP_FRAC_WORD_8(_z,2), 0,_f_f1,_f_f0, \ -+ _FP_FRAC_WORD_8(_z,4),_FP_FRAC_WORD_8(_z,3), \ -+ _FP_FRAC_WORD_8(_z,2)); \ -+ doit(_b_f1, _b_f0, X##_f[0], Y##_f[3]); \ -+ doit(_c_f1, _c_f0, X##_f[3], Y##_f[0]); \ -+ doit(_d_f1, _d_f0, X##_f[1], Y##_f[2]); \ -+ doit(_e_f1, _e_f0, X##_f[2], Y##_f[1]); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,5),_FP_FRAC_WORD_8(_z,4), \ -+ _FP_FRAC_WORD_8(_z,3), 0,_b_f1,_b_f0, \ -+ 0,_FP_FRAC_WORD_8(_z,4),_FP_FRAC_WORD_8(_z,3)); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,5),_FP_FRAC_WORD_8(_z,4), \ -+ _FP_FRAC_WORD_8(_z,3), 0,_c_f1,_c_f0, \ -+ _FP_FRAC_WORD_8(_z,5),_FP_FRAC_WORD_8(_z,4), \ -+ _FP_FRAC_WORD_8(_z,3)); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,5),_FP_FRAC_WORD_8(_z,4), \ -+ _FP_FRAC_WORD_8(_z,3), 0,_d_f1,_d_f0, \ -+ _FP_FRAC_WORD_8(_z,5),_FP_FRAC_WORD_8(_z,4), \ -+ _FP_FRAC_WORD_8(_z,3)); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,5),_FP_FRAC_WORD_8(_z,4), \ -+ _FP_FRAC_WORD_8(_z,3), 0,_e_f1,_e_f0, \ -+ _FP_FRAC_WORD_8(_z,5),_FP_FRAC_WORD_8(_z,4), \ -+ _FP_FRAC_WORD_8(_z,3)); \ -+ doit(_b_f1, _b_f0, X##_f[2], Y##_f[2]); \ -+ doit(_c_f1, _c_f0, X##_f[1], Y##_f[3]); \ -+ doit(_d_f1, _d_f0, X##_f[3], Y##_f[1]); \ -+ doit(_e_f1, _e_f0, X##_f[2], Y##_f[3]); \ -+ doit(_f_f1, _f_f0, X##_f[3], Y##_f[2]); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,6),_FP_FRAC_WORD_8(_z,5), \ -+ _FP_FRAC_WORD_8(_z,4), 0,_b_f1,_b_f0, \ -+ 0,_FP_FRAC_WORD_8(_z,5),_FP_FRAC_WORD_8(_z,4)); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,6),_FP_FRAC_WORD_8(_z,5), \ -+ _FP_FRAC_WORD_8(_z,4), 0,_c_f1,_c_f0, \ -+ _FP_FRAC_WORD_8(_z,6),_FP_FRAC_WORD_8(_z,5), \ -+ _FP_FRAC_WORD_8(_z,4)); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,6),_FP_FRAC_WORD_8(_z,5), \ -+ _FP_FRAC_WORD_8(_z,4), 0,_d_f1,_d_f0, \ -+ _FP_FRAC_WORD_8(_z,6),_FP_FRAC_WORD_8(_z,5), \ -+ _FP_FRAC_WORD_8(_z,4)); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,7),_FP_FRAC_WORD_8(_z,6), \ -+ _FP_FRAC_WORD_8(_z,5), 0,_e_f1,_e_f0, \ -+ 0,_FP_FRAC_WORD_8(_z,6),_FP_FRAC_WORD_8(_z,5)); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,7),_FP_FRAC_WORD_8(_z,6), \ -+ _FP_FRAC_WORD_8(_z,5), 0,_f_f1,_f_f0, \ -+ _FP_FRAC_WORD_8(_z,7),_FP_FRAC_WORD_8(_z,6), \ -+ _FP_FRAC_WORD_8(_z,5)); \ -+ doit(_b_f1, _b_f0, X##_f[3], Y##_f[3]); \ -+ __FP_FRAC_ADD_2(_FP_FRAC_WORD_8(_z,7),_FP_FRAC_WORD_8(_z,6), \ -+ _b_f1,_b_f0, \ -+ _FP_FRAC_WORD_8(_z,7),_FP_FRAC_WORD_8(_z,6)); \ -+ \ -+ /* Normalize since we know where the msb of the multiplicands \ -+ were (bit B), we know that the msb of the of the product is \ -+ at either 2B or 2B-1. */ \ -+ _FP_FRAC_SRS_8(_z, wfracbits-1, 2*wfracbits); \ -+ __FP_FRAC_SET_4(R, _FP_FRAC_WORD_8(_z,3), _FP_FRAC_WORD_8(_z,2), \ -+ _FP_FRAC_WORD_8(_z,1), _FP_FRAC_WORD_8(_z,0)); \ -+ } while (0) -+ -+#define _FP_MUL_MEAT_4_gmp(wfracbits, R, X, Y) \ -+ do { \ -+ _FP_FRAC_DECL_8(_z); \ -+ \ -+ mpn_mul_n(_z_f, _x_f, _y_f, 4); \ -+ \ -+ /* Normalize since we know where the msb of the multiplicands \ -+ were (bit B), we know that the msb of the of the product is \ -+ at either 2B or 2B-1. */ \ -+ _FP_FRAC_SRS_8(_z, wfracbits-1, 2*wfracbits); \ -+ __FP_FRAC_SET_4(R, _FP_FRAC_WORD_8(_z,3), _FP_FRAC_WORD_8(_z,2), \ -+ _FP_FRAC_WORD_8(_z,1), _FP_FRAC_WORD_8(_z,0)); \ -+ } while (0) -+ -+/* -+ * Helper utility for _FP_DIV_MEAT_4_udiv: -+ * pppp = m * nnn -+ */ -+#define umul_ppppmnnn(p3,p2,p1,p0,m,n2,n1,n0) \ -+ do { \ -+ UWtype _t; \ -+ umul_ppmm(p1,p0,m,n0); \ -+ umul_ppmm(p2,_t,m,n1); \ -+ __FP_FRAC_ADDI_2(p2,p1,_t); \ -+ umul_ppmm(p3,_t,m,n2); \ -+ __FP_FRAC_ADDI_2(p3,p2,_t); \ -+ } while (0) -+ -+/* -+ * Division algorithms: -+ */ -+ -+#define _FP_DIV_MEAT_4_udiv(fs, R, X, Y) \ -+ do { \ -+ int _i; \ -+ _FP_FRAC_DECL_4(_n); _FP_FRAC_DECL_4(_m); \ -+ _FP_FRAC_SET_4(_n, _FP_ZEROFRAC_4); \ -+ if (_FP_FRAC_GT_4(X, Y)) \ -+ { \ -+ _n_f[3] = X##_f[0] << (_FP_W_TYPE_SIZE - 1); \ -+ _FP_FRAC_SRL_4(X, 1); \ -+ } \ -+ else \ -+ R##_e--; \ -+ \ -+ /* Normalize, i.e. make the most significant bit of the \ -+ denominator set. */ \ -+ _FP_FRAC_SLL_4(Y, _FP_WFRACXBITS_##fs); \ -+ \ -+ for (_i = 3; ; _i--) \ -+ { \ -+ if (X##_f[3] == Y##_f[3]) \ -+ { \ -+ /* This is a special case, not an optimization \ -+ (X##_f[3]/Y##_f[3] would not fit into UWtype). \ -+ As X## is guaranteed to be < Y, R##_f[_i] can be either \ -+ (UWtype)-1 or (UWtype)-2. */ \ -+ R##_f[_i] = -1; \ -+ if (!_i) \ -+ break; \ -+ __FP_FRAC_SUB_4(X##_f[3], X##_f[2], X##_f[1], X##_f[0], \ -+ Y##_f[2], Y##_f[1], Y##_f[0], 0, \ -+ X##_f[2], X##_f[1], X##_f[0], _n_f[_i]); \ -+ _FP_FRAC_SUB_4(X, Y, X); \ -+ if (X##_f[3] > Y##_f[3]) \ -+ { \ -+ R##_f[_i] = -2; \ -+ _FP_FRAC_ADD_4(X, Y, X); \ -+ } \ -+ } \ -+ else \ -+ { \ -+ udiv_qrnnd(R##_f[_i], X##_f[3], X##_f[3], X##_f[2], Y##_f[3]); \ -+ umul_ppppmnnn(_m_f[3], _m_f[2], _m_f[1], _m_f[0], \ -+ R##_f[_i], Y##_f[2], Y##_f[1], Y##_f[0]); \ -+ X##_f[2] = X##_f[1]; \ -+ X##_f[1] = X##_f[0]; \ -+ X##_f[0] = _n_f[_i]; \ -+ if (_FP_FRAC_GT_4(_m, X)) \ -+ { \ -+ R##_f[_i]--; \ -+ _FP_FRAC_ADD_4(X, Y, X); \ -+ if (_FP_FRAC_GE_4(X, Y) && _FP_FRAC_GT_4(_m, X)) \ -+ { \ -+ R##_f[_i]--; \ -+ _FP_FRAC_ADD_4(X, Y, X); \ -+ } \ -+ } \ -+ _FP_FRAC_DEC_4(X, _m); \ -+ if (!_i) \ -+ { \ -+ if (!_FP_FRAC_EQ_4(X, _m)) \ -+ R##_f[0] |= _FP_WORK_STICKY; \ -+ break; \ -+ } \ -+ } \ -+ } \ -+ } while (0) -+ -+ -+/* -+ * Square root algorithms: -+ * We have just one right now, maybe Newton approximation -+ * should be added for those machines where division is fast. -+ */ -+ -+#define _FP_SQRT_MEAT_4(R, S, T, X, q) \ -+ do { \ -+ while (q) \ -+ { \ -+ T##_f[3] = S##_f[3] + q; \ -+ if (T##_f[3] <= X##_f[3]) \ -+ { \ -+ S##_f[3] = T##_f[3] + q; \ -+ X##_f[3] -= T##_f[3]; \ -+ R##_f[3] += q; \ -+ } \ -+ _FP_FRAC_SLL_4(X, 1); \ -+ q >>= 1; \ -+ } \ -+ q = (_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE - 1); \ -+ while (q) \ -+ { \ -+ T##_f[2] = S##_f[2] + q; \ -+ T##_f[3] = S##_f[3]; \ -+ if (T##_f[3] < X##_f[3] || \ -+ (T##_f[3] == X##_f[3] && T##_f[2] <= X##_f[2])) \ -+ { \ -+ S##_f[2] = T##_f[2] + q; \ -+ S##_f[3] += (T##_f[2] > S##_f[2]); \ -+ __FP_FRAC_DEC_2(X##_f[3], X##_f[2], \ -+ T##_f[3], T##_f[2]); \ -+ R##_f[2] += q; \ -+ } \ -+ _FP_FRAC_SLL_4(X, 1); \ -+ q >>= 1; \ -+ } \ -+ q = (_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE - 1); \ -+ while (q) \ -+ { \ -+ T##_f[1] = S##_f[1] + q; \ -+ T##_f[2] = S##_f[2]; \ -+ T##_f[3] = S##_f[3]; \ -+ if (T##_f[3] < X##_f[3] || \ -+ (T##_f[3] == X##_f[3] && (T##_f[2] < X##_f[2] || \ -+ (T##_f[2] == X##_f[2] && T##_f[1] <= X##_f[1])))) \ -+ { \ -+ S##_f[1] = T##_f[1] + q; \ -+ S##_f[2] += (T##_f[1] > S##_f[1]); \ -+ S##_f[3] += (T##_f[2] > S##_f[2]); \ -+ __FP_FRAC_DEC_3(X##_f[3], X##_f[2], X##_f[1], \ -+ T##_f[3], T##_f[2], T##_f[1]); \ -+ R##_f[1] += q; \ -+ } \ -+ _FP_FRAC_SLL_4(X, 1); \ -+ q >>= 1; \ -+ } \ -+ q = (_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE - 1); \ -+ while (q != _FP_WORK_ROUND) \ -+ { \ -+ T##_f[0] = S##_f[0] + q; \ -+ T##_f[1] = S##_f[1]; \ -+ T##_f[2] = S##_f[2]; \ -+ T##_f[3] = S##_f[3]; \ -+ if (_FP_FRAC_GE_4(X,T)) \ -+ { \ -+ S##_f[0] = T##_f[0] + q; \ -+ S##_f[1] += (T##_f[0] > S##_f[0]); \ -+ S##_f[2] += (T##_f[1] > S##_f[1]); \ -+ S##_f[3] += (T##_f[2] > S##_f[2]); \ -+ _FP_FRAC_DEC_4(X, T); \ -+ R##_f[0] += q; \ -+ } \ -+ _FP_FRAC_SLL_4(X, 1); \ -+ q >>= 1; \ -+ } \ -+ if (!_FP_FRAC_ZEROP_4(X)) \ -+ { \ -+ if (_FP_FRAC_GT_4(X,S)) \ -+ R##_f[0] |= _FP_WORK_ROUND; \ -+ R##_f[0] |= _FP_WORK_STICKY; \ -+ } \ -+ } while (0) -+ -+ -+/* -+ * Internals -+ */ -+ -+#define __FP_FRAC_SET_4(X,I3,I2,I1,I0) \ -+ (X##_f[3] = I3, X##_f[2] = I2, X##_f[1] = I1, X##_f[0] = I0) -+ -+#ifndef __FP_FRAC_ADD_3 -+#define __FP_FRAC_ADD_3(r2,r1,r0,x2,x1,x0,y2,y1,y0) \ -+ do { \ -+ _FP_W_TYPE _c1, _c2; \ -+ r0 = x0 + y0; \ -+ _c1 = r0 < x0; \ -+ r1 = x1 + y1; \ -+ _c2 = r1 < x1; \ -+ r1 += _c1; \ -+ _c2 |= r1 < _c1; \ -+ r2 = x2 + y2 + _c2; \ -+ } while (0) -+#endif -+ -+#ifndef __FP_FRAC_ADD_4 -+#define __FP_FRAC_ADD_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \ -+ do { \ -+ _FP_W_TYPE _c1, _c2, _c3; \ -+ r0 = x0 + y0; \ -+ _c1 = r0 < x0; \ -+ r1 = x1 + y1; \ -+ _c2 = r1 < x1; \ -+ r1 += _c1; \ -+ _c2 |= r1 < _c1; \ -+ r2 = x2 + y2; \ -+ _c3 = r2 < x2; \ -+ r2 += _c2; \ -+ _c3 |= r2 < _c2; \ -+ r3 = x3 + y3 + _c3; \ -+ } while (0) -+#endif -+ -+#ifndef __FP_FRAC_SUB_3 -+#define __FP_FRAC_SUB_3(r2,r1,r0,x2,x1,x0,y2,y1,y0) \ -+ do { \ -+ _FP_W_TYPE _c1, _c2; \ -+ r0 = x0 - y0; \ -+ _c1 = r0 > x0; \ -+ r1 = x1 - y1; \ -+ _c2 = r1 > x1; \ -+ r1 -= _c1; \ -+ _c2 |= _c1 && (y1 == x1); \ -+ r2 = x2 - y2 - _c2; \ -+ } while (0) -+#endif -+ -+#ifndef __FP_FRAC_SUB_4 -+#define __FP_FRAC_SUB_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \ -+ do { \ -+ _FP_W_TYPE _c1, _c2, _c3; \ -+ r0 = x0 - y0; \ -+ _c1 = r0 > x0; \ -+ r1 = x1 - y1; \ -+ _c2 = r1 > x1; \ -+ r1 -= _c1; \ -+ _c2 |= _c1 && (y1 == x1); \ -+ r2 = x2 - y2; \ -+ _c3 = r2 > x2; \ -+ r2 -= _c2; \ -+ _c3 |= _c2 && (y2 == x2); \ -+ r3 = x3 - y3 - _c3; \ -+ } while (0) -+#endif -+ -+#ifndef __FP_FRAC_DEC_3 -+#define __FP_FRAC_DEC_3(x2,x1,x0,y2,y1,y0) \ -+ do { \ -+ UWtype _t0, _t1, _t2; \ -+ _t0 = x0, _t1 = x1, _t2 = x2; \ -+ __FP_FRAC_SUB_3 (x2, x1, x0, _t2, _t1, _t0, y2, y1, y0); \ -+ } while (0) -+#endif -+ -+#ifndef __FP_FRAC_DEC_4 -+#define __FP_FRAC_DEC_4(x3,x2,x1,x0,y3,y2,y1,y0) \ -+ do { \ -+ UWtype _t0, _t1, _t2, _t3; \ -+ _t0 = x0, _t1 = x1, _t2 = x2, _t3 = x3; \ -+ __FP_FRAC_SUB_4 (x3,x2,x1,x0,_t3,_t2,_t1,_t0, y3,y2,y1,y0); \ -+ } while (0) -+#endif -+ -+#ifndef __FP_FRAC_ADDI_4 -+#define __FP_FRAC_ADDI_4(x3,x2,x1,x0,i) \ -+ do { \ -+ UWtype _t; \ -+ _t = ((x0 += i) < i); \ -+ x1 += _t; _t = (x1 < _t); \ -+ x2 += _t; _t = (x2 < _t); \ -+ x3 += _t; \ -+ } while (0) -+#endif -+ -+/* Convert FP values between word sizes. This appears to be more -+ * complicated than I'd have expected it to be, so these might be -+ * wrong... These macros are in any case somewhat bogus because they -+ * use information about what various FRAC_n variables look like -+ * internally [eg, that 2 word vars are X_f0 and x_f1]. But so do -+ * the ones in op-2.h and op-1.h. -+ */ -+#define _FP_FRAC_COPY_1_4(D, S) (D##_f = S##_f[0]) -+ -+#define _FP_FRAC_COPY_2_4(D, S) \ -+do { \ -+ D##_f0 = S##_f[0]; \ -+ D##_f1 = S##_f[1]; \ -+} while (0) -+ -+/* Assembly/disassembly for converting to/from integral types. -+ * No shifting or overflow handled here. -+ */ -+/* Put the FP value X into r, which is an integer of size rsize. */ -+#define _FP_FRAC_ASSEMBLE_4(r, X, rsize) \ -+ do { \ -+ if (rsize <= _FP_W_TYPE_SIZE) \ -+ r = X##_f[0]; \ -+ else if (rsize <= 2*_FP_W_TYPE_SIZE) \ -+ { \ -+ r = X##_f[1]; \ -+ r <<= _FP_W_TYPE_SIZE; \ -+ r += X##_f[0]; \ -+ } \ -+ else \ -+ { \ -+ /* I'm feeling lazy so we deal with int == 3words (implausible)*/ \ -+ /* and int == 4words as a single case. */ \ -+ r = X##_f[3]; \ -+ r <<= _FP_W_TYPE_SIZE; \ -+ r += X##_f[2]; \ -+ r <<= _FP_W_TYPE_SIZE; \ -+ r += X##_f[1]; \ -+ r <<= _FP_W_TYPE_SIZE; \ -+ r += X##_f[0]; \ -+ } \ -+ } while (0) -+ -+/* "No disassemble Number Five!" */ -+/* move an integer of size rsize into X's fractional part. We rely on -+ * the _f[] array consisting of words of size _FP_W_TYPE_SIZE to avoid -+ * having to mask the values we store into it. -+ */ -+#define _FP_FRAC_DISASSEMBLE_4(X, r, rsize) \ -+ do { \ -+ X##_f[0] = r; \ -+ X##_f[1] = (rsize <= _FP_W_TYPE_SIZE ? 0 : r >> _FP_W_TYPE_SIZE); \ -+ X##_f[2] = (rsize <= 2*_FP_W_TYPE_SIZE ? 0 : r >> 2*_FP_W_TYPE_SIZE); \ -+ X##_f[3] = (rsize <= 3*_FP_W_TYPE_SIZE ? 0 : r >> 3*_FP_W_TYPE_SIZE); \ -+ } while (0); -+ -+#define _FP_FRAC_COPY_4_1(D, S) \ -+do { \ -+ D##_f[0] = S##_f; \ -+ D##_f[1] = D##_f[2] = D##_f[3] = 0; \ -+} while (0) -+ -+#define _FP_FRAC_COPY_4_2(D, S) \ -+do { \ -+ D##_f[0] = S##_f0; \ -+ D##_f[1] = S##_f1; \ -+ D##_f[2] = D##_f[3] = 0; \ -+} while (0) -+ -+#define _FP_FRAC_COPY_4_4(D,S) _FP_FRAC_COPY_4(D,S) -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/op-8.h uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/op-8.h ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/op-8.h 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/op-8.h 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,111 @@ -+/* Software floating-point emulation. -+ Basic eight-word fraction declaration and manipulation. -+ Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com), -+ Jakub Jelinek (jj@ultra.linux.cz) and -+ Peter Maydell (pmaydell@chiark.greenend.org.uk). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ In addition to the permissions in the GNU Lesser General Public -+ License, the Free Software Foundation gives you unlimited -+ permission to link the compiled version of this file into -+ combinations with other programs, and to distribute those -+ combinations without any restriction coming from the use of this -+ file. (The Lesser General Public License restrictions do apply in -+ other respects; for example, they cover modification of the file, -+ and distribution when not linked into a combine executable.) -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, -+ MA 02110-1301, USA. */ -+ -+/* We need just a few things from here for op-4, if we ever need some -+ other macros, they can be added. */ -+#define _FP_FRAC_DECL_8(X) _FP_W_TYPE X##_f[8] -+#define _FP_FRAC_HIGH_8(X) (X##_f[7]) -+#define _FP_FRAC_LOW_8(X) (X##_f[0]) -+#define _FP_FRAC_WORD_8(X,w) (X##_f[w]) -+ -+#define _FP_FRAC_SLL_8(X,N) \ -+ do { \ -+ _FP_I_TYPE _up, _down, _skip, _i; \ -+ _skip = (N) / _FP_W_TYPE_SIZE; \ -+ _up = (N) % _FP_W_TYPE_SIZE; \ -+ _down = _FP_W_TYPE_SIZE - _up; \ -+ if (!_up) \ -+ for (_i = 7; _i >= _skip; --_i) \ -+ X##_f[_i] = X##_f[_i-_skip]; \ -+ else \ -+ { \ -+ for (_i = 7; _i > _skip; --_i) \ -+ X##_f[_i] = X##_f[_i-_skip] << _up \ -+ | X##_f[_i-_skip-1] >> _down; \ -+ X##_f[_i--] = X##_f[0] << _up; \ -+ } \ -+ for (; _i >= 0; --_i) \ -+ X##_f[_i] = 0; \ -+ } while (0) -+ -+#define _FP_FRAC_SRL_8(X,N) \ -+ do { \ -+ _FP_I_TYPE _up, _down, _skip, _i; \ -+ _skip = (N) / _FP_W_TYPE_SIZE; \ -+ _down = (N) % _FP_W_TYPE_SIZE; \ -+ _up = _FP_W_TYPE_SIZE - _down; \ -+ if (!_down) \ -+ for (_i = 0; _i <= 7-_skip; ++_i) \ -+ X##_f[_i] = X##_f[_i+_skip]; \ -+ else \ -+ { \ -+ for (_i = 0; _i < 7-_skip; ++_i) \ -+ X##_f[_i] = X##_f[_i+_skip] >> _down \ -+ | X##_f[_i+_skip+1] << _up; \ -+ X##_f[_i++] = X##_f[7] >> _down; \ -+ } \ -+ for (; _i < 8; ++_i) \ -+ X##_f[_i] = 0; \ -+ } while (0) -+ -+ -+/* Right shift with sticky-lsb. -+ * What this actually means is that we do a standard right-shift, -+ * but that if any of the bits that fall off the right hand side -+ * were one then we always set the LSbit. -+ */ -+#define _FP_FRAC_SRS_8(X,N,size) \ -+ do { \ -+ _FP_I_TYPE _up, _down, _skip, _i; \ -+ _FP_W_TYPE _s; \ -+ _skip = (N) / _FP_W_TYPE_SIZE; \ -+ _down = (N) % _FP_W_TYPE_SIZE; \ -+ _up = _FP_W_TYPE_SIZE - _down; \ -+ for (_s = _i = 0; _i < _skip; ++_i) \ -+ _s |= X##_f[_i]; \ -+ if (!_down) \ -+ for (_i = 0; _i <= 7-_skip; ++_i) \ -+ X##_f[_i] = X##_f[_i+_skip]; \ -+ else \ -+ { \ -+ _s |= X##_f[_i] << _up; \ -+ for (_i = 0; _i < 7-_skip; ++_i) \ -+ X##_f[_i] = X##_f[_i+_skip] >> _down \ -+ | X##_f[_i+_skip+1] << _up; \ -+ X##_f[_i++] = X##_f[7] >> _down; \ -+ } \ -+ for (; _i < 8; ++_i) \ -+ X##_f[_i] = 0; \ -+ /* don't fix the LSB until the very end when we're sure f[0] is stable */ \ -+ X##_f[0] |= (_s != 0); \ -+ } while (0) -+ -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/op-common.h uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/op-common.h ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/op-common.h 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/op-common.h 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,1359 @@ -+/* Software floating-point emulation. Common operations. -+ Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com), -+ Jakub Jelinek (jj@ultra.linux.cz), -+ David S. Miller (davem@redhat.com) and -+ Peter Maydell (pmaydell@chiark.greenend.org.uk). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ In addition to the permissions in the GNU Lesser General Public -+ License, the Free Software Foundation gives you unlimited -+ permission to link the compiled version of this file into -+ combinations with other programs, and to distribute those -+ combinations without any restriction coming from the use of this -+ file. (The Lesser General Public License restrictions do apply in -+ other respects; for example, they cover modification of the file, -+ and distribution when not linked into a combine executable.) -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, -+ MA 02110-1301, USA. */ -+ -+#define _FP_DECL(wc, X) \ -+ _FP_I_TYPE X##_c __attribute__((unused)), X##_s, X##_e; \ -+ _FP_FRAC_DECL_##wc(X) -+ -+/* -+ * Finish truely unpacking a native fp value by classifying the kind -+ * of fp value and normalizing both the exponent and the fraction. -+ */ -+ -+#define _FP_UNPACK_CANONICAL(fs, wc, X) \ -+do { \ -+ switch (X##_e) \ -+ { \ -+ default: \ -+ _FP_FRAC_HIGH_RAW_##fs(X) |= _FP_IMPLBIT_##fs; \ -+ _FP_FRAC_SLL_##wc(X, _FP_WORKBITS); \ -+ X##_e -= _FP_EXPBIAS_##fs; \ -+ X##_c = FP_CLS_NORMAL; \ -+ break; \ -+ \ -+ case 0: \ -+ if (_FP_FRAC_ZEROP_##wc(X)) \ -+ X##_c = FP_CLS_ZERO; \ -+ else \ -+ { \ -+ /* a denormalized number */ \ -+ _FP_I_TYPE _shift; \ -+ _FP_FRAC_CLZ_##wc(_shift, X); \ -+ _shift -= _FP_FRACXBITS_##fs; \ -+ _FP_FRAC_SLL_##wc(X, (_shift+_FP_WORKBITS)); \ -+ X##_e -= _FP_EXPBIAS_##fs - 1 + _shift; \ -+ X##_c = FP_CLS_NORMAL; \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ } \ -+ break; \ -+ \ -+ case _FP_EXPMAX_##fs: \ -+ if (_FP_FRAC_ZEROP_##wc(X)) \ -+ X##_c = FP_CLS_INF; \ -+ else \ -+ { \ -+ X##_c = FP_CLS_NAN; \ -+ /* Check for signaling NaN */ \ -+ if (!(_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs)) \ -+ FP_SET_EXCEPTION(FP_EX_INVALID); \ -+ } \ -+ break; \ -+ } \ -+} while (0) -+ -+/* Finish unpacking an fp value in semi-raw mode: the mantissa is -+ shifted by _FP_WORKBITS but the implicit MSB is not inserted and -+ other classification is not done. */ -+#define _FP_UNPACK_SEMIRAW(fs, wc, X) _FP_FRAC_SLL_##wc(X, _FP_WORKBITS) -+ -+/* A semi-raw value has overflowed to infinity. Adjust the mantissa -+ and exponent appropriately. */ -+#define _FP_OVERFLOW_SEMIRAW(fs, wc, X) \ -+do { \ -+ if (FP_ROUNDMODE == FP_RND_NEAREST \ -+ || (FP_ROUNDMODE == FP_RND_PINF && !X##_s) \ -+ || (FP_ROUNDMODE == FP_RND_MINF && X##_s)) \ -+ { \ -+ X##_e = _FP_EXPMAX_##fs; \ -+ _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \ -+ } \ -+ else \ -+ { \ -+ X##_e = _FP_EXPMAX_##fs - 1; \ -+ _FP_FRAC_SET_##wc(X, _FP_MAXFRAC_##wc); \ -+ } \ -+ FP_SET_EXCEPTION(FP_EX_INEXACT); \ -+ FP_SET_EXCEPTION(FP_EX_OVERFLOW); \ -+} while (0) -+ -+/* Check for a semi-raw value being a signaling NaN and raise the -+ invalid exception if so. */ -+#define _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, X) \ -+do { \ -+ if (X##_e == _FP_EXPMAX_##fs \ -+ && !_FP_FRAC_ZEROP_##wc(X) \ -+ && !(_FP_FRAC_HIGH_##fs(X) & _FP_QNANBIT_SH_##fs)) \ -+ FP_SET_EXCEPTION(FP_EX_INVALID); \ -+} while (0) -+ -+/* Choose a NaN result from an operation on two semi-raw NaN -+ values. */ -+#define _FP_CHOOSENAN_SEMIRAW(fs, wc, R, X, Y, OP) \ -+do { \ -+ /* _FP_CHOOSENAN expects raw values, so shift as required. */ \ -+ _FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \ -+ _FP_FRAC_SRL_##wc(Y, _FP_WORKBITS); \ -+ _FP_CHOOSENAN(fs, wc, R, X, Y, OP); \ -+ _FP_FRAC_SLL_##wc(R, _FP_WORKBITS); \ -+} while (0) -+ -+/* Test whether a biased exponent is normal (not zero or maximum). */ -+#define _FP_EXP_NORMAL(fs, wc, X) (((X##_e + 1) & _FP_EXPMAX_##fs) > 1) -+ -+/* Prepare to pack an fp value in semi-raw mode: the mantissa is -+ rounded and shifted right, with the rounding possibly increasing -+ the exponent (including changing a finite value to infinity). */ -+#define _FP_PACK_SEMIRAW(fs, wc, X) \ -+do { \ -+ _FP_ROUND(wc, X); \ -+ if (_FP_FRAC_HIGH_##fs(X) \ -+ & (_FP_OVERFLOW_##fs >> 1)) \ -+ { \ -+ _FP_FRAC_HIGH_##fs(X) &= ~(_FP_OVERFLOW_##fs >> 1); \ -+ X##_e++; \ -+ if (X##_e == _FP_EXPMAX_##fs) \ -+ _FP_OVERFLOW_SEMIRAW(fs, wc, X); \ -+ } \ -+ _FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \ -+ if (!_FP_EXP_NORMAL(fs, wc, X) && !_FP_FRAC_ZEROP_##wc(X)) \ -+ { \ -+ if (X##_e == 0) \ -+ FP_SET_EXCEPTION(FP_EX_UNDERFLOW); \ -+ else \ -+ { \ -+ if (!_FP_KEEPNANFRACP) \ -+ { \ -+ _FP_FRAC_SET_##wc(X, _FP_NANFRAC_##fs); \ -+ X##_s = _FP_NANSIGN_##fs; \ -+ } \ -+ else \ -+ _FP_FRAC_HIGH_RAW_##fs(X) |= _FP_QNANBIT_##fs; \ -+ } \ -+ } \ -+} while (0) -+ -+/* -+ * Before packing the bits back into the native fp result, take care -+ * of such mundane things as rounding and overflow. Also, for some -+ * kinds of fp values, the original parts may not have been fully -+ * extracted -- but that is ok, we can regenerate them now. -+ */ -+ -+#define _FP_PACK_CANONICAL(fs, wc, X) \ -+do { \ -+ switch (X##_c) \ -+ { \ -+ case FP_CLS_NORMAL: \ -+ X##_e += _FP_EXPBIAS_##fs; \ -+ if (X##_e > 0) \ -+ { \ -+ _FP_ROUND(wc, X); \ -+ if (_FP_FRAC_OVERP_##wc(fs, X)) \ -+ { \ -+ _FP_FRAC_CLEAR_OVERP_##wc(fs, X); \ -+ X##_e++; \ -+ } \ -+ _FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \ -+ if (X##_e >= _FP_EXPMAX_##fs) \ -+ { \ -+ /* overflow */ \ -+ switch (FP_ROUNDMODE) \ -+ { \ -+ case FP_RND_NEAREST: \ -+ X##_c = FP_CLS_INF; \ -+ break; \ -+ case FP_RND_PINF: \ -+ if (!X##_s) X##_c = FP_CLS_INF; \ -+ break; \ -+ case FP_RND_MINF: \ -+ if (X##_s) X##_c = FP_CLS_INF; \ -+ break; \ -+ } \ -+ if (X##_c == FP_CLS_INF) \ -+ { \ -+ /* Overflow to infinity */ \ -+ X##_e = _FP_EXPMAX_##fs; \ -+ _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \ -+ } \ -+ else \ -+ { \ -+ /* Overflow to maximum normal */ \ -+ X##_e = _FP_EXPMAX_##fs - 1; \ -+ _FP_FRAC_SET_##wc(X, _FP_MAXFRAC_##wc); \ -+ } \ -+ FP_SET_EXCEPTION(FP_EX_OVERFLOW); \ -+ FP_SET_EXCEPTION(FP_EX_INEXACT); \ -+ } \ -+ } \ -+ else \ -+ { \ -+ /* we've got a denormalized number */ \ -+ X##_e = -X##_e + 1; \ -+ if (X##_e <= _FP_WFRACBITS_##fs) \ -+ { \ -+ _FP_FRAC_SRS_##wc(X, X##_e, _FP_WFRACBITS_##fs); \ -+ _FP_ROUND(wc, X); \ -+ if (_FP_FRAC_HIGH_##fs(X) \ -+ & (_FP_OVERFLOW_##fs >> 1)) \ -+ { \ -+ X##_e = 1; \ -+ _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \ -+ } \ -+ else \ -+ { \ -+ X##_e = 0; \ -+ _FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \ -+ FP_SET_EXCEPTION(FP_EX_UNDERFLOW); \ -+ } \ -+ } \ -+ else \ -+ { \ -+ /* underflow to zero */ \ -+ X##_e = 0; \ -+ if (!_FP_FRAC_ZEROP_##wc(X)) \ -+ { \ -+ _FP_FRAC_SET_##wc(X, _FP_MINFRAC_##wc); \ -+ _FP_ROUND(wc, X); \ -+ _FP_FRAC_LOW_##wc(X) >>= (_FP_WORKBITS); \ -+ } \ -+ FP_SET_EXCEPTION(FP_EX_UNDERFLOW); \ -+ } \ -+ } \ -+ break; \ -+ \ -+ case FP_CLS_ZERO: \ -+ X##_e = 0; \ -+ _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \ -+ break; \ -+ \ -+ case FP_CLS_INF: \ -+ X##_e = _FP_EXPMAX_##fs; \ -+ _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \ -+ break; \ -+ \ -+ case FP_CLS_NAN: \ -+ X##_e = _FP_EXPMAX_##fs; \ -+ if (!_FP_KEEPNANFRACP) \ -+ { \ -+ _FP_FRAC_SET_##wc(X, _FP_NANFRAC_##fs); \ -+ X##_s = _FP_NANSIGN_##fs; \ -+ } \ -+ else \ -+ _FP_FRAC_HIGH_RAW_##fs(X) |= _FP_QNANBIT_##fs; \ -+ break; \ -+ } \ -+} while (0) -+ -+/* This one accepts raw argument and not cooked, returns -+ * 1 if X is a signaling NaN. -+ */ -+#define _FP_ISSIGNAN(fs, wc, X) \ -+({ \ -+ int __ret = 0; \ -+ if (X##_e == _FP_EXPMAX_##fs) \ -+ { \ -+ if (!_FP_FRAC_ZEROP_##wc(X) \ -+ && !(_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs)) \ -+ __ret = 1; \ -+ } \ -+ __ret; \ -+}) -+ -+ -+ -+ -+ -+/* Addition on semi-raw values. */ -+#define _FP_ADD_INTERNAL(fs, wc, R, X, Y, OP) \ -+do { \ -+ if (X##_s == Y##_s) \ -+ { \ -+ /* Addition. */ \ -+ R##_s = X##_s; \ -+ int ediff = X##_e - Y##_e; \ -+ if (ediff > 0) \ -+ { \ -+ R##_e = X##_e; \ -+ if (Y##_e == 0) \ -+ { \ -+ /* Y is zero or denormalized. */ \ -+ if (_FP_FRAC_ZEROP_##wc(Y)) \ -+ { \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, X); \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ goto add_done; \ -+ } \ -+ else \ -+ { \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ ediff--; \ -+ if (ediff == 0) \ -+ { \ -+ _FP_FRAC_ADD_##wc(R, X, Y); \ -+ goto add3; \ -+ } \ -+ if (X##_e == _FP_EXPMAX_##fs) \ -+ { \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, X); \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ goto add_done; \ -+ } \ -+ goto add1; \ -+ } \ -+ } \ -+ else if (X##_e == _FP_EXPMAX_##fs) \ -+ { \ -+ /* X is NaN or Inf, Y is normal. */ \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, X); \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ goto add_done; \ -+ } \ -+ \ -+ /* Insert implicit MSB of Y. */ \ -+ _FP_FRAC_HIGH_##fs(Y) |= _FP_IMPLBIT_SH_##fs; \ -+ \ -+ add1: \ -+ /* Shift the mantissa of Y to the right EDIFF steps; \ -+ remember to account later for the implicit MSB of X. */ \ -+ if (ediff <= _FP_WFRACBITS_##fs) \ -+ _FP_FRAC_SRS_##wc(Y, ediff, _FP_WFRACBITS_##fs); \ -+ else if (!_FP_FRAC_ZEROP_##wc(Y)) \ -+ _FP_FRAC_SET_##wc(Y, _FP_MINFRAC_##wc); \ -+ _FP_FRAC_ADD_##wc(R, X, Y); \ -+ } \ -+ else if (ediff < 0) \ -+ { \ -+ ediff = -ediff; \ -+ R##_e = Y##_e; \ -+ if (X##_e == 0) \ -+ { \ -+ /* X is zero or denormalized. */ \ -+ if (_FP_FRAC_ZEROP_##wc(X)) \ -+ { \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, Y); \ -+ _FP_FRAC_COPY_##wc(R, Y); \ -+ goto add_done; \ -+ } \ -+ else \ -+ { \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ ediff--; \ -+ if (ediff == 0) \ -+ { \ -+ _FP_FRAC_ADD_##wc(R, Y, X); \ -+ goto add3; \ -+ } \ -+ if (Y##_e == _FP_EXPMAX_##fs) \ -+ { \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, Y); \ -+ _FP_FRAC_COPY_##wc(R, Y); \ -+ goto add_done; \ -+ } \ -+ goto add2; \ -+ } \ -+ } \ -+ else if (Y##_e == _FP_EXPMAX_##fs) \ -+ { \ -+ /* Y is NaN or Inf, X is normal. */ \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, Y); \ -+ _FP_FRAC_COPY_##wc(R, Y); \ -+ goto add_done; \ -+ } \ -+ \ -+ /* Insert implicit MSB of X. */ \ -+ _FP_FRAC_HIGH_##fs(X) |= _FP_IMPLBIT_SH_##fs; \ -+ \ -+ add2: \ -+ /* Shift the mantissa of X to the right EDIFF steps; \ -+ remember to account later for the implicit MSB of Y. */ \ -+ if (ediff <= _FP_WFRACBITS_##fs) \ -+ _FP_FRAC_SRS_##wc(X, ediff, _FP_WFRACBITS_##fs); \ -+ else if (!_FP_FRAC_ZEROP_##wc(X)) \ -+ _FP_FRAC_SET_##wc(X, _FP_MINFRAC_##wc); \ -+ _FP_FRAC_ADD_##wc(R, Y, X); \ -+ } \ -+ else \ -+ { \ -+ /* ediff == 0. */ \ -+ if (!_FP_EXP_NORMAL(fs, wc, X)) \ -+ { \ -+ if (X##_e == 0) \ -+ { \ -+ /* X and Y are zero or denormalized. */ \ -+ R##_e = 0; \ -+ if (_FP_FRAC_ZEROP_##wc(X)) \ -+ { \ -+ if (!_FP_FRAC_ZEROP_##wc(Y)) \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ _FP_FRAC_COPY_##wc(R, Y); \ -+ goto add_done; \ -+ } \ -+ else if (_FP_FRAC_ZEROP_##wc(Y)) \ -+ { \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ goto add_done; \ -+ } \ -+ else \ -+ { \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ _FP_FRAC_ADD_##wc(R, X, Y); \ -+ if (_FP_FRAC_HIGH_##fs(R) & _FP_IMPLBIT_SH_##fs) \ -+ { \ -+ /* Normalized result. */ \ -+ _FP_FRAC_HIGH_##fs(R) \ -+ &= ~(_FP_W_TYPE)_FP_IMPLBIT_SH_##fs; \ -+ R##_e = 1; \ -+ } \ -+ goto add_done; \ -+ } \ -+ } \ -+ else \ -+ { \ -+ /* X and Y are NaN or Inf. */ \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, X); \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, Y); \ -+ R##_e = _FP_EXPMAX_##fs; \ -+ if (_FP_FRAC_ZEROP_##wc(X)) \ -+ _FP_FRAC_COPY_##wc(R, Y); \ -+ else if (_FP_FRAC_ZEROP_##wc(Y)) \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ else \ -+ _FP_CHOOSENAN_SEMIRAW(fs, wc, R, X, Y, OP); \ -+ goto add_done; \ -+ } \ -+ } \ -+ /* The exponents of X and Y, both normal, are equal. The \ -+ implicit MSBs will always add to increase the \ -+ exponent. */ \ -+ _FP_FRAC_ADD_##wc(R, X, Y); \ -+ R##_e = X##_e + 1; \ -+ _FP_FRAC_SRS_##wc(R, 1, _FP_WFRACBITS_##fs); \ -+ if (R##_e == _FP_EXPMAX_##fs) \ -+ /* Overflow to infinity (depending on rounding mode). */ \ -+ _FP_OVERFLOW_SEMIRAW(fs, wc, R); \ -+ goto add_done; \ -+ } \ -+ add3: \ -+ if (_FP_FRAC_HIGH_##fs(R) & _FP_IMPLBIT_SH_##fs) \ -+ { \ -+ /* Overflow. */ \ -+ _FP_FRAC_HIGH_##fs(R) &= ~(_FP_W_TYPE)_FP_IMPLBIT_SH_##fs; \ -+ R##_e++; \ -+ _FP_FRAC_SRS_##wc(R, 1, _FP_WFRACBITS_##fs); \ -+ if (R##_e == _FP_EXPMAX_##fs) \ -+ /* Overflow to infinity (depending on rounding mode). */ \ -+ _FP_OVERFLOW_SEMIRAW(fs, wc, R); \ -+ } \ -+ add_done: ; \ -+ } \ -+ else \ -+ { \ -+ /* Subtraction. */ \ -+ int ediff = X##_e - Y##_e; \ -+ if (ediff > 0) \ -+ { \ -+ R##_e = X##_e; \ -+ R##_s = X##_s; \ -+ if (Y##_e == 0) \ -+ { \ -+ /* Y is zero or denormalized. */ \ -+ if (_FP_FRAC_ZEROP_##wc(Y)) \ -+ { \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, X); \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ goto sub_done; \ -+ } \ -+ else \ -+ { \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ ediff--; \ -+ if (ediff == 0) \ -+ { \ -+ _FP_FRAC_SUB_##wc(R, X, Y); \ -+ goto sub3; \ -+ } \ -+ if (X##_e == _FP_EXPMAX_##fs) \ -+ { \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, X); \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ goto sub_done; \ -+ } \ -+ goto sub1; \ -+ } \ -+ } \ -+ else if (X##_e == _FP_EXPMAX_##fs) \ -+ { \ -+ /* X is NaN or Inf, Y is normal. */ \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, X); \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ goto sub_done; \ -+ } \ -+ \ -+ /* Insert implicit MSB of Y. */ \ -+ _FP_FRAC_HIGH_##fs(Y) |= _FP_IMPLBIT_SH_##fs; \ -+ \ -+ sub1: \ -+ /* Shift the mantissa of Y to the right EDIFF steps; \ -+ remember to account later for the implicit MSB of X. */ \ -+ if (ediff <= _FP_WFRACBITS_##fs) \ -+ _FP_FRAC_SRS_##wc(Y, ediff, _FP_WFRACBITS_##fs); \ -+ else if (!_FP_FRAC_ZEROP_##wc(Y)) \ -+ _FP_FRAC_SET_##wc(Y, _FP_MINFRAC_##wc); \ -+ _FP_FRAC_SUB_##wc(R, X, Y); \ -+ } \ -+ else if (ediff < 0) \ -+ { \ -+ ediff = -ediff; \ -+ R##_e = Y##_e; \ -+ R##_s = Y##_s; \ -+ if (X##_e == 0) \ -+ { \ -+ /* X is zero or denormalized. */ \ -+ if (_FP_FRAC_ZEROP_##wc(X)) \ -+ { \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, Y); \ -+ _FP_FRAC_COPY_##wc(R, Y); \ -+ goto sub_done; \ -+ } \ -+ else \ -+ { \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ ediff--; \ -+ if (ediff == 0) \ -+ { \ -+ _FP_FRAC_SUB_##wc(R, Y, X); \ -+ goto sub3; \ -+ } \ -+ if (Y##_e == _FP_EXPMAX_##fs) \ -+ { \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, Y); \ -+ _FP_FRAC_COPY_##wc(R, Y); \ -+ goto sub_done; \ -+ } \ -+ goto sub2; \ -+ } \ -+ } \ -+ else if (Y##_e == _FP_EXPMAX_##fs) \ -+ { \ -+ /* Y is NaN or Inf, X is normal. */ \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, Y); \ -+ _FP_FRAC_COPY_##wc(R, Y); \ -+ goto sub_done; \ -+ } \ -+ \ -+ /* Insert implicit MSB of X. */ \ -+ _FP_FRAC_HIGH_##fs(X) |= _FP_IMPLBIT_SH_##fs; \ -+ \ -+ sub2: \ -+ /* Shift the mantissa of X to the right EDIFF steps; \ -+ remember to account later for the implicit MSB of Y. */ \ -+ if (ediff <= _FP_WFRACBITS_##fs) \ -+ _FP_FRAC_SRS_##wc(X, ediff, _FP_WFRACBITS_##fs); \ -+ else if (!_FP_FRAC_ZEROP_##wc(X)) \ -+ _FP_FRAC_SET_##wc(X, _FP_MINFRAC_##wc); \ -+ _FP_FRAC_SUB_##wc(R, Y, X); \ -+ } \ -+ else \ -+ { \ -+ /* ediff == 0. */ \ -+ if (!_FP_EXP_NORMAL(fs, wc, X)) \ -+ { \ -+ if (X##_e == 0) \ -+ { \ -+ /* X and Y are zero or denormalized. */ \ -+ R##_e = 0; \ -+ if (_FP_FRAC_ZEROP_##wc(X)) \ -+ { \ -+ _FP_FRAC_COPY_##wc(R, Y); \ -+ if (_FP_FRAC_ZEROP_##wc(Y)) \ -+ R##_s = (FP_ROUNDMODE == FP_RND_MINF); \ -+ else \ -+ { \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ R##_s = Y##_s; \ -+ } \ -+ goto sub_done; \ -+ } \ -+ else if (_FP_FRAC_ZEROP_##wc(Y)) \ -+ { \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ R##_s = X##_s; \ -+ goto sub_done; \ -+ } \ -+ else \ -+ { \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ _FP_FRAC_SUB_##wc(R, X, Y); \ -+ R##_s = X##_s; \ -+ if (_FP_FRAC_HIGH_##fs(R) & _FP_IMPLBIT_SH_##fs) \ -+ { \ -+ /* |X| < |Y|, negate result. */ \ -+ _FP_FRAC_SUB_##wc(R, Y, X); \ -+ R##_s = Y##_s; \ -+ } \ -+ else if (_FP_FRAC_ZEROP_##wc(R)) \ -+ R##_s = (FP_ROUNDMODE == FP_RND_MINF); \ -+ goto sub_done; \ -+ } \ -+ } \ -+ else \ -+ { \ -+ /* X and Y are NaN or Inf, of opposite signs. */ \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, X); \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, Y); \ -+ R##_e = _FP_EXPMAX_##fs; \ -+ if (_FP_FRAC_ZEROP_##wc(X)) \ -+ { \ -+ if (_FP_FRAC_ZEROP_##wc(Y)) \ -+ { \ -+ /* Inf - Inf. */ \ -+ R##_s = _FP_NANSIGN_##fs; \ -+ _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \ -+ _FP_FRAC_SLL_##wc(R, _FP_WORKBITS); \ -+ FP_SET_EXCEPTION(FP_EX_INVALID); \ -+ } \ -+ else \ -+ { \ -+ /* Inf - NaN. */ \ -+ R##_s = Y##_s; \ -+ _FP_FRAC_COPY_##wc(R, Y); \ -+ } \ -+ } \ -+ else \ -+ { \ -+ if (_FP_FRAC_ZEROP_##wc(Y)) \ -+ { \ -+ /* NaN - Inf. */ \ -+ R##_s = X##_s; \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ } \ -+ else \ -+ { \ -+ /* NaN - NaN. */ \ -+ _FP_CHOOSENAN_SEMIRAW(fs, wc, R, X, Y, OP); \ -+ } \ -+ } \ -+ goto sub_done; \ -+ } \ -+ } \ -+ /* The exponents of X and Y, both normal, are equal. The \ -+ implicit MSBs cancel. */ \ -+ R##_e = X##_e; \ -+ _FP_FRAC_SUB_##wc(R, X, Y); \ -+ R##_s = X##_s; \ -+ if (_FP_FRAC_HIGH_##fs(R) & _FP_IMPLBIT_SH_##fs) \ -+ { \ -+ /* |X| < |Y|, negate result. */ \ -+ _FP_FRAC_SUB_##wc(R, Y, X); \ -+ R##_s = Y##_s; \ -+ } \ -+ else if (_FP_FRAC_ZEROP_##wc(R)) \ -+ { \ -+ R##_e = 0; \ -+ R##_s = (FP_ROUNDMODE == FP_RND_MINF); \ -+ goto sub_done; \ -+ } \ -+ goto norm; \ -+ } \ -+ sub3: \ -+ if (_FP_FRAC_HIGH_##fs(R) & _FP_IMPLBIT_SH_##fs) \ -+ { \ -+ int diff; \ -+ /* Carry into most significant bit of larger one of X and Y, \ -+ canceling it; renormalize. */ \ -+ _FP_FRAC_HIGH_##fs(R) &= _FP_IMPLBIT_SH_##fs - 1; \ -+ norm: \ -+ _FP_FRAC_CLZ_##wc(diff, R); \ -+ diff -= _FP_WFRACXBITS_##fs; \ -+ _FP_FRAC_SLL_##wc(R, diff); \ -+ if (R##_e <= diff) \ -+ { \ -+ /* R is denormalized. */ \ -+ diff = diff - R##_e + 1; \ -+ _FP_FRAC_SRS_##wc(R, diff, _FP_WFRACBITS_##fs); \ -+ R##_e = 0; \ -+ } \ -+ else \ -+ { \ -+ R##_e -= diff; \ -+ _FP_FRAC_HIGH_##fs(R) &= ~(_FP_W_TYPE)_FP_IMPLBIT_SH_##fs; \ -+ } \ -+ } \ -+ sub_done: ; \ -+ } \ -+} while (0) -+ -+#define _FP_ADD(fs, wc, R, X, Y) _FP_ADD_INTERNAL(fs, wc, R, X, Y, '+') -+#define _FP_SUB(fs, wc, R, X, Y) \ -+ do { \ -+ if (!(Y##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(Y))) Y##_s ^= 1; \ -+ _FP_ADD_INTERNAL(fs, wc, R, X, Y, '-'); \ -+ } while (0) -+ -+ -+/* -+ * Main negation routine. FIXME -- when we care about setting exception -+ * bits reliably, this will not do. We should examine all of the fp classes. -+ */ -+ -+#define _FP_NEG(fs, wc, R, X) \ -+ do { \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ R##_c = X##_c; \ -+ R##_e = X##_e; \ -+ R##_s = 1 ^ X##_s; \ -+ } while (0) -+ -+ -+/* -+ * Main multiplication routine. The input values should be cooked. -+ */ -+ -+#define _FP_MUL(fs, wc, R, X, Y) \ -+do { \ -+ R##_s = X##_s ^ Y##_s; \ -+ switch (_FP_CLS_COMBINE(X##_c, Y##_c)) \ -+ { \ -+ case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_NORMAL): \ -+ R##_c = FP_CLS_NORMAL; \ -+ R##_e = X##_e + Y##_e + 1; \ -+ \ -+ _FP_MUL_MEAT_##fs(R,X,Y); \ -+ \ -+ if (_FP_FRAC_OVERP_##wc(fs, R)) \ -+ _FP_FRAC_SRS_##wc(R, 1, _FP_WFRACBITS_##fs); \ -+ else \ -+ R##_e--; \ -+ break; \ -+ \ -+ case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_NAN): \ -+ _FP_CHOOSENAN(fs, wc, R, X, Y, '*'); \ -+ break; \ -+ \ -+ case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_NORMAL): \ -+ case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_INF): \ -+ case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_ZERO): \ -+ R##_s = X##_s; \ -+ \ -+ case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_INF): \ -+ case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_NORMAL): \ -+ case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_NORMAL): \ -+ case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_ZERO): \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ R##_c = X##_c; \ -+ break; \ -+ \ -+ case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_NAN): \ -+ case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_NAN): \ -+ case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_NAN): \ -+ R##_s = Y##_s; \ -+ \ -+ case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_INF): \ -+ case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_ZERO): \ -+ _FP_FRAC_COPY_##wc(R, Y); \ -+ R##_c = Y##_c; \ -+ break; \ -+ \ -+ case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_ZERO): \ -+ case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_INF): \ -+ R##_s = _FP_NANSIGN_##fs; \ -+ R##_c = FP_CLS_NAN; \ -+ _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \ -+ FP_SET_EXCEPTION(FP_EX_INVALID); \ -+ break; \ -+ \ -+ default: \ -+ abort(); \ -+ } \ -+} while (0) -+ -+ -+/* -+ * Main division routine. The input values should be cooked. -+ */ -+ -+#define _FP_DIV(fs, wc, R, X, Y) \ -+do { \ -+ R##_s = X##_s ^ Y##_s; \ -+ switch (_FP_CLS_COMBINE(X##_c, Y##_c)) \ -+ { \ -+ case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_NORMAL): \ -+ R##_c = FP_CLS_NORMAL; \ -+ R##_e = X##_e - Y##_e; \ -+ \ -+ _FP_DIV_MEAT_##fs(R,X,Y); \ -+ break; \ -+ \ -+ case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_NAN): \ -+ _FP_CHOOSENAN(fs, wc, R, X, Y, '/'); \ -+ break; \ -+ \ -+ case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_NORMAL): \ -+ case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_INF): \ -+ case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_ZERO): \ -+ R##_s = X##_s; \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ R##_c = X##_c; \ -+ break; \ -+ \ -+ case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_NAN): \ -+ case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_NAN): \ -+ case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_NAN): \ -+ R##_s = Y##_s; \ -+ _FP_FRAC_COPY_##wc(R, Y); \ -+ R##_c = Y##_c; \ -+ break; \ -+ \ -+ case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_INF): \ -+ case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_INF): \ -+ case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_NORMAL): \ -+ R##_c = FP_CLS_ZERO; \ -+ break; \ -+ \ -+ case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_ZERO): \ -+ FP_SET_EXCEPTION(FP_EX_DIVZERO); \ -+ case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_ZERO): \ -+ case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_NORMAL): \ -+ R##_c = FP_CLS_INF; \ -+ break; \ -+ \ -+ case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_INF): \ -+ case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_ZERO): \ -+ R##_s = _FP_NANSIGN_##fs; \ -+ R##_c = FP_CLS_NAN; \ -+ _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \ -+ FP_SET_EXCEPTION(FP_EX_INVALID); \ -+ break; \ -+ \ -+ default: \ -+ abort(); \ -+ } \ -+} while (0) -+ -+ -+/* -+ * Main differential comparison routine. The inputs should be raw not -+ * cooked. The return is -1,0,1 for normal values, 2 otherwise. -+ */ -+ -+#define _FP_CMP(fs, wc, ret, X, Y, un) \ -+ do { \ -+ /* NANs are unordered */ \ -+ if ((X##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(X)) \ -+ || (Y##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(Y))) \ -+ { \ -+ ret = un; \ -+ } \ -+ else \ -+ { \ -+ int __is_zero_x; \ -+ int __is_zero_y; \ -+ \ -+ __is_zero_x = (!X##_e && _FP_FRAC_ZEROP_##wc(X)) ? 1 : 0; \ -+ __is_zero_y = (!Y##_e && _FP_FRAC_ZEROP_##wc(Y)) ? 1 : 0; \ -+ \ -+ if (__is_zero_x && __is_zero_y) \ -+ ret = 0; \ -+ else if (__is_zero_x) \ -+ ret = Y##_s ? 1 : -1; \ -+ else if (__is_zero_y) \ -+ ret = X##_s ? -1 : 1; \ -+ else if (X##_s != Y##_s) \ -+ ret = X##_s ? -1 : 1; \ -+ else if (X##_e > Y##_e) \ -+ ret = X##_s ? -1 : 1; \ -+ else if (X##_e < Y##_e) \ -+ ret = X##_s ? 1 : -1; \ -+ else if (_FP_FRAC_GT_##wc(X, Y)) \ -+ ret = X##_s ? -1 : 1; \ -+ else if (_FP_FRAC_GT_##wc(Y, X)) \ -+ ret = X##_s ? 1 : -1; \ -+ else \ -+ ret = 0; \ -+ } \ -+ } while (0) -+ -+ -+/* Simplification for strict equality. */ -+ -+#define _FP_CMP_EQ(fs, wc, ret, X, Y) \ -+ do { \ -+ /* NANs are unordered */ \ -+ if ((X##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(X)) \ -+ || (Y##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(Y))) \ -+ { \ -+ ret = 1; \ -+ } \ -+ else \ -+ { \ -+ ret = !(X##_e == Y##_e \ -+ && _FP_FRAC_EQ_##wc(X, Y) \ -+ && (X##_s == Y##_s || (!X##_e && _FP_FRAC_ZEROP_##wc(X)))); \ -+ } \ -+ } while (0) -+ -+/* Version to test unordered. */ -+ -+#define _FP_CMP_UNORD(fs, wc, ret, X, Y) \ -+ do { \ -+ ret = ((X##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(X)) \ -+ || (Y##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(Y))); \ -+ } while (0) -+ -+/* -+ * Main square root routine. The input value should be cooked. -+ */ -+ -+#define _FP_SQRT(fs, wc, R, X) \ -+do { \ -+ _FP_FRAC_DECL_##wc(T); _FP_FRAC_DECL_##wc(S); \ -+ _FP_W_TYPE q; \ -+ switch (X##_c) \ -+ { \ -+ case FP_CLS_NAN: \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ R##_s = X##_s; \ -+ R##_c = FP_CLS_NAN; \ -+ break; \ -+ case FP_CLS_INF: \ -+ if (X##_s) \ -+ { \ -+ R##_s = _FP_NANSIGN_##fs; \ -+ R##_c = FP_CLS_NAN; /* NAN */ \ -+ _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \ -+ FP_SET_EXCEPTION(FP_EX_INVALID); \ -+ } \ -+ else \ -+ { \ -+ R##_s = 0; \ -+ R##_c = FP_CLS_INF; /* sqrt(+inf) = +inf */ \ -+ } \ -+ break; \ -+ case FP_CLS_ZERO: \ -+ R##_s = X##_s; \ -+ R##_c = FP_CLS_ZERO; /* sqrt(+-0) = +-0 */ \ -+ break; \ -+ case FP_CLS_NORMAL: \ -+ R##_s = 0; \ -+ if (X##_s) \ -+ { \ -+ R##_c = FP_CLS_NAN; /* sNAN */ \ -+ R##_s = _FP_NANSIGN_##fs; \ -+ _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \ -+ FP_SET_EXCEPTION(FP_EX_INVALID); \ -+ break; \ -+ } \ -+ R##_c = FP_CLS_NORMAL; \ -+ if (X##_e & 1) \ -+ _FP_FRAC_SLL_##wc(X, 1); \ -+ R##_e = X##_e >> 1; \ -+ _FP_FRAC_SET_##wc(S, _FP_ZEROFRAC_##wc); \ -+ _FP_FRAC_SET_##wc(R, _FP_ZEROFRAC_##wc); \ -+ q = _FP_OVERFLOW_##fs >> 1; \ -+ _FP_SQRT_MEAT_##wc(R, S, T, X, q); \ -+ } \ -+ } while (0) -+ -+/* -+ * Convert from FP to integer. Input is raw. -+ */ -+ -+/* RSIGNED can have following values: -+ * 0: the number is required to be 0..(2^rsize)-1, if not, NV is set plus -+ * the result is either 0 or (2^rsize)-1 depending on the sign in such -+ * case. -+ * 1: the number is required to be -(2^(rsize-1))..(2^(rsize-1))-1, if not, -+ * NV is set plus the result is either -(2^(rsize-1)) or (2^(rsize-1))-1 -+ * depending on the sign in such case. -+ * -1: the number is required to be -(2^(rsize-1))..(2^rsize)-1, if not, NV is -+ * set plus the result is either -(2^(rsize-1)) or (2^(rsize-1))-1 -+ * depending on the sign in such case. -+ */ -+#define _FP_TO_INT(fs, wc, r, X, rsize, rsigned) \ -+do { \ -+ if (X##_e < _FP_EXPBIAS_##fs) \ -+ { \ -+ r = 0; \ -+ if (X##_e == 0) \ -+ { \ -+ if (!_FP_FRAC_ZEROP_##wc(X)) \ -+ { \ -+ FP_SET_EXCEPTION(FP_EX_INEXACT); \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ } \ -+ } \ -+ else \ -+ FP_SET_EXCEPTION(FP_EX_INEXACT); \ -+ } \ -+ else if (X##_e >= _FP_EXPBIAS_##fs + rsize - (rsigned > 0 || X##_s) \ -+ || (!rsigned && X##_s)) \ -+ { \ -+ /* Overflow or converting to the most negative integer. */ \ -+ if (rsigned) \ -+ { \ -+ r = 1; \ -+ r <<= rsize - 1; \ -+ r -= 1 - X##_s; \ -+ } else { \ -+ r = 0; \ -+ if (X##_s) \ -+ r = ~r; \ -+ } \ -+ \ -+ if (rsigned && X##_s && X##_e == _FP_EXPBIAS_##fs + rsize - 1) \ -+ { \ -+ /* Possibly converting to most negative integer; check the \ -+ mantissa. */ \ -+ int inexact = 0; \ -+ (void)((_FP_FRACBITS_##fs > rsize) \ -+ ? ({ _FP_FRAC_SRST_##wc(X, inexact, \ -+ _FP_FRACBITS_##fs - rsize, \ -+ _FP_FRACBITS_##fs); 0; }) \ -+ : 0); \ -+ if (!_FP_FRAC_ZEROP_##wc(X)) \ -+ FP_SET_EXCEPTION(FP_EX_INVALID); \ -+ else if (inexact) \ -+ FP_SET_EXCEPTION(FP_EX_INEXACT); \ -+ } \ -+ else \ -+ FP_SET_EXCEPTION(FP_EX_INVALID); \ -+ } \ -+ else \ -+ { \ -+ _FP_FRAC_HIGH_RAW_##fs(X) |= _FP_IMPLBIT_##fs; \ -+ if (X##_e >= _FP_EXPBIAS_##fs + _FP_FRACBITS_##fs - 1) \ -+ { \ -+ _FP_FRAC_ASSEMBLE_##wc(r, X, rsize); \ -+ r <<= X##_e - _FP_EXPBIAS_##fs - _FP_FRACBITS_##fs + 1; \ -+ } \ -+ else \ -+ { \ -+ int inexact; \ -+ _FP_FRAC_SRST_##wc(X, inexact, \ -+ (_FP_FRACBITS_##fs + _FP_EXPBIAS_##fs - 1 \ -+ - X##_e), \ -+ _FP_FRACBITS_##fs); \ -+ if (inexact) \ -+ FP_SET_EXCEPTION(FP_EX_INEXACT); \ -+ _FP_FRAC_ASSEMBLE_##wc(r, X, rsize); \ -+ } \ -+ if (rsigned && X##_s) \ -+ r = -r; \ -+ } \ -+} while (0) -+ -+/* Convert integer to fp. Output is raw. RTYPE is unsigned even if -+ input is signed. */ -+#define _FP_FROM_INT(fs, wc, X, r, rsize, rtype) \ -+ do { \ -+ if (r) \ -+ { \ -+ rtype ur_; \ -+ \ -+ if ((X##_s = (r < 0))) \ -+ r = -(rtype)r; \ -+ \ -+ ur_ = (rtype) r; \ -+ (void)((rsize <= _FP_W_TYPE_SIZE) \ -+ ? ({ \ -+ int lz_; \ -+ __FP_CLZ(lz_, (_FP_W_TYPE)ur_); \ -+ X##_e = _FP_EXPBIAS_##fs + _FP_W_TYPE_SIZE - 1 - lz_; \ -+ }) \ -+ : ((rsize <= 2 * _FP_W_TYPE_SIZE) \ -+ ? ({ \ -+ int lz_; \ -+ __FP_CLZ_2(lz_, (_FP_W_TYPE)(ur_ >> _FP_W_TYPE_SIZE), \ -+ (_FP_W_TYPE)ur_); \ -+ X##_e = (_FP_EXPBIAS_##fs + 2 * _FP_W_TYPE_SIZE - 1 \ -+ - lz_); \ -+ }) \ -+ : (abort(), 0))); \ -+ \ -+ if (rsize - 1 + _FP_EXPBIAS_##fs >= _FP_EXPMAX_##fs \ -+ && X##_e >= _FP_EXPMAX_##fs) \ -+ { \ -+ /* Exponent too big; overflow to infinity. (May also \ -+ happen after rounding below.) */ \ -+ _FP_OVERFLOW_SEMIRAW(fs, wc, X); \ -+ goto pack_semiraw; \ -+ } \ -+ \ -+ if (rsize <= _FP_FRACBITS_##fs \ -+ || X##_e < _FP_EXPBIAS_##fs + _FP_FRACBITS_##fs) \ -+ { \ -+ /* Exactly representable; shift left. */ \ -+ _FP_FRAC_DISASSEMBLE_##wc(X, ur_, rsize); \ -+ _FP_FRAC_SLL_##wc(X, (_FP_EXPBIAS_##fs \ -+ + _FP_FRACBITS_##fs - 1 - X##_e)); \ -+ } \ -+ else \ -+ { \ -+ /* More bits in integer than in floating type; need to \ -+ round. */ \ -+ if (_FP_EXPBIAS_##fs + _FP_WFRACBITS_##fs - 1 < X##_e) \ -+ ur_ = ((ur_ >> (X##_e - _FP_EXPBIAS_##fs \ -+ - _FP_WFRACBITS_##fs + 1)) \ -+ | ((ur_ << (rsize - (X##_e - _FP_EXPBIAS_##fs \ -+ - _FP_WFRACBITS_##fs + 1))) \ -+ != 0)); \ -+ _FP_FRAC_DISASSEMBLE_##wc(X, ur_, rsize); \ -+ if ((_FP_EXPBIAS_##fs + _FP_WFRACBITS_##fs - 1 - X##_e) > 0) \ -+ _FP_FRAC_SLL_##wc(X, (_FP_EXPBIAS_##fs \ -+ + _FP_WFRACBITS_##fs - 1 - X##_e)); \ -+ _FP_FRAC_HIGH_##fs(X) &= ~(_FP_W_TYPE)_FP_IMPLBIT_SH_##fs; \ -+ pack_semiraw: \ -+ _FP_PACK_SEMIRAW(fs, wc, X); \ -+ } \ -+ } \ -+ else \ -+ { \ -+ X##_s = 0; \ -+ X##_e = 0; \ -+ _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \ -+ } \ -+ } while (0) -+ -+ -+/* Extend from a narrower floating-point format to a wider one. Input -+ and output are raw. */ -+#define FP_EXTEND(dfs,sfs,dwc,swc,D,S) \ -+do { \ -+ if (_FP_FRACBITS_##dfs < _FP_FRACBITS_##sfs \ -+ || (_FP_EXPMAX_##dfs - _FP_EXPBIAS_##dfs \ -+ < _FP_EXPMAX_##sfs - _FP_EXPBIAS_##sfs) \ -+ || (_FP_EXPBIAS_##dfs < _FP_EXPBIAS_##sfs + _FP_FRACBITS_##sfs - 1 \ -+ && _FP_EXPBIAS_##dfs != _FP_EXPBIAS_##sfs)) \ -+ abort(); \ -+ D##_s = S##_s; \ -+ _FP_FRAC_COPY_##dwc##_##swc(D, S); \ -+ if (_FP_EXP_NORMAL(sfs, swc, S)) \ -+ { \ -+ D##_e = S##_e + _FP_EXPBIAS_##dfs - _FP_EXPBIAS_##sfs; \ -+ _FP_FRAC_SLL_##dwc(D, (_FP_FRACBITS_##dfs - _FP_FRACBITS_##sfs)); \ -+ } \ -+ else \ -+ { \ -+ if (S##_e == 0) \ -+ { \ -+ if (_FP_FRAC_ZEROP_##swc(S)) \ -+ D##_e = 0; \ -+ else if (_FP_EXPBIAS_##dfs \ -+ < _FP_EXPBIAS_##sfs + _FP_FRACBITS_##sfs - 1) \ -+ { \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ _FP_FRAC_SLL_##dwc(D, (_FP_FRACBITS_##dfs \ -+ - _FP_FRACBITS_##sfs)); \ -+ D##_e = 0; \ -+ } \ -+ else \ -+ { \ -+ int _lz; \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ _FP_FRAC_CLZ_##swc(_lz, S); \ -+ _FP_FRAC_SLL_##dwc(D, \ -+ _lz + _FP_FRACBITS_##dfs \ -+ - _FP_FRACTBITS_##sfs); \ -+ D##_e = (_FP_EXPBIAS_##dfs - _FP_EXPBIAS_##sfs + 1 \ -+ + _FP_FRACXBITS_##sfs - _lz); \ -+ } \ -+ } \ -+ else \ -+ { \ -+ D##_e = _FP_EXPMAX_##dfs; \ -+ if (!_FP_FRAC_ZEROP_##swc(S)) \ -+ { \ -+ if (!(_FP_FRAC_HIGH_RAW_##sfs(S) & _FP_QNANBIT_##sfs)) \ -+ FP_SET_EXCEPTION(FP_EX_INVALID); \ -+ _FP_FRAC_SLL_##dwc(D, (_FP_FRACBITS_##dfs \ -+ - _FP_FRACBITS_##sfs)); \ -+ } \ -+ } \ -+ } \ -+} while (0) -+ -+/* Truncate from a wider floating-point format to a narrower one. -+ Input and output are semi-raw. */ -+#define FP_TRUNC(dfs,sfs,dwc,swc,D,S) \ -+do { \ -+ if (_FP_FRACBITS_##sfs < _FP_FRACBITS_##dfs \ -+ || (_FP_EXPBIAS_##sfs < _FP_EXPBIAS_##dfs + _FP_FRACBITS_##dfs - 1 \ -+ && _FP_EXPBIAS_##sfs != _FP_EXPBIAS_##dfs)) \ -+ abort(); \ -+ D##_s = S##_s; \ -+ if (_FP_EXP_NORMAL(sfs, swc, S)) \ -+ { \ -+ D##_e = S##_e + _FP_EXPBIAS_##dfs - _FP_EXPBIAS_##sfs; \ -+ if (D##_e >= _FP_EXPMAX_##dfs) \ -+ _FP_OVERFLOW_SEMIRAW(dfs, dwc, D); \ -+ else \ -+ { \ -+ if (D##_e <= 0) \ -+ { \ -+ if (D##_e < 1 - _FP_FRACBITS_##dfs) \ -+ { \ -+ _FP_FRAC_SET_##swc(S, _FP_ZEROFRAC_##swc); \ -+ _FP_FRAC_LOW_##swc(S) |= 1; \ -+ } \ -+ else \ -+ { \ -+ _FP_FRAC_HIGH_##sfs(S) |= _FP_IMPLBIT_SH_##sfs; \ -+ _FP_FRAC_SRS_##swc(S, (_FP_WFRACBITS_##sfs \ -+ - _FP_WFRACBITS_##dfs + 1 - D##_e), \ -+ _FP_WFRACBITS_##sfs); \ -+ } \ -+ D##_e = 0; \ -+ } \ -+ else \ -+ _FP_FRAC_SRS_##swc(S, (_FP_WFRACBITS_##sfs \ -+ - _FP_WFRACBITS_##dfs), \ -+ _FP_WFRACBITS_##sfs); \ -+ _FP_FRAC_COPY_##dwc##_##swc(D, S); \ -+ } \ -+ } \ -+ else \ -+ { \ -+ if (S##_e == 0) \ -+ { \ -+ D##_e = 0; \ -+ if (_FP_FRAC_ZEROP_##swc(S)) \ -+ _FP_FRAC_SET_##dwc(D, _FP_ZEROFRAC_##dwc); \ -+ else \ -+ { \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ if (_FP_EXPBIAS_##sfs \ -+ < _FP_EXPBIAS_##dfs + _FP_FRACBITS_##dfs - 1) \ -+ { \ -+ _FP_FRAC_SRS_##swc(S, (_FP_WFRACBITS_##sfs \ -+ - _FP_WFRACBITS_##dfs), \ -+ _FP_WFRACBITS_##sfs); \ -+ _FP_FRAC_COPY_##dwc##_##swc(D, S); \ -+ } \ -+ else \ -+ { \ -+ _FP_FRAC_SET_##dwc(D, _FP_ZEROFRAC_##dwc); \ -+ _FP_FRAC_LOW_##dwc(D) |= 1; \ -+ } \ -+ } \ -+ } \ -+ else \ -+ { \ -+ D##_e = _FP_EXPMAX_##dfs; \ -+ if (_FP_FRAC_ZEROP_##swc(S)) \ -+ _FP_FRAC_SET_##dwc(D, _FP_ZEROFRAC_##dwc); \ -+ else \ -+ { \ -+ _FP_CHECK_SIGNAN_SEMIRAW(sfs, swc, S); \ -+ _FP_FRAC_SRL_##swc(S, (_FP_WFRACBITS_##sfs \ -+ - _FP_WFRACBITS_##dfs)); \ -+ _FP_FRAC_COPY_##dwc##_##swc(D, S); \ -+ /* Semi-raw NaN must have all workbits cleared. */ \ -+ _FP_FRAC_LOW_##dwc(D) \ -+ &= ~(_FP_W_TYPE) ((1 << _FP_WORKBITS) - 1); \ -+ _FP_FRAC_HIGH_##dfs(D) |= _FP_QNANBIT_SH_##dfs; \ -+ } \ -+ } \ -+ } \ -+} while (0) -+ -+/* -+ * Helper primitives. -+ */ -+ -+/* Count leading zeros in a word. */ -+ -+#ifndef __FP_CLZ -+/* GCC 3.4 and later provide the builtins for us. */ -+#define __FP_CLZ(r, x) \ -+ do { \ -+ if (sizeof (_FP_W_TYPE) == sizeof (unsigned int)) \ -+ r = __builtin_clz (x); \ -+ else if (sizeof (_FP_W_TYPE) == sizeof (unsigned long)) \ -+ r = __builtin_clzl (x); \ -+ else if (sizeof (_FP_W_TYPE) == sizeof (unsigned long long)) \ -+ r = __builtin_clzll (x); \ -+ else \ -+ abort (); \ -+ } while (0) -+#endif /* ndef __FP_CLZ */ -+ -+#define _FP_DIV_HELP_imm(q, r, n, d) \ -+ do { \ -+ q = n / d, r = n % d; \ -+ } while (0) -+ -+ -+/* A restoring bit-by-bit division primitive. */ -+ -+#define _FP_DIV_MEAT_N_loop(fs, wc, R, X, Y) \ -+ do { \ -+ int count = _FP_WFRACBITS_##fs; \ -+ _FP_FRAC_DECL_##wc (u); \ -+ _FP_FRAC_DECL_##wc (v); \ -+ _FP_FRAC_COPY_##wc (u, X); \ -+ _FP_FRAC_COPY_##wc (v, Y); \ -+ _FP_FRAC_SET_##wc (R, _FP_ZEROFRAC_##wc); \ -+ /* Normalize U and V. */ \ -+ _FP_FRAC_SLL_##wc (u, _FP_WFRACXBITS_##fs); \ -+ _FP_FRAC_SLL_##wc (v, _FP_WFRACXBITS_##fs); \ -+ /* First round. Since the operands are normalized, either the \ -+ first or second bit will be set in the fraction. Produce a \ -+ normalized result by checking which and adjusting the loop \ -+ count and exponent accordingly. */ \ -+ if (_FP_FRAC_GE_1 (u, v)) \ -+ { \ -+ _FP_FRAC_SUB_##wc (u, u, v); \ -+ _FP_FRAC_LOW_##wc (R) |= 1; \ -+ count--; \ -+ } \ -+ else \ -+ R##_e--; \ -+ /* Subsequent rounds. */ \ -+ do { \ -+ int msb = (_FP_WS_TYPE) _FP_FRAC_HIGH_##wc (u) < 0; \ -+ _FP_FRAC_SLL_##wc (u, 1); \ -+ _FP_FRAC_SLL_##wc (R, 1); \ -+ if (msb || _FP_FRAC_GE_1 (u, v)) \ -+ { \ -+ _FP_FRAC_SUB_##wc (u, u, v); \ -+ _FP_FRAC_LOW_##wc (R) |= 1; \ -+ } \ -+ } while (--count > 0); \ -+ /* If there's anything left in U, the result is inexact. */ \ -+ _FP_FRAC_LOW_##wc (R) |= !_FP_FRAC_ZEROP_##wc (u); \ -+ } while (0) -+ -+#define _FP_DIV_MEAT_1_loop(fs, R, X, Y) _FP_DIV_MEAT_N_loop (fs, 1, R, X, Y) -+#define _FP_DIV_MEAT_2_loop(fs, R, X, Y) _FP_DIV_MEAT_N_loop (fs, 2, R, X, Y) -+#define _FP_DIV_MEAT_4_loop(fs, R, X, Y) _FP_DIV_MEAT_N_loop (fs, 4, R, X, Y) -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_add.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_add.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_add.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_add.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,39 @@ -+/* Software floating-point emulation. -+ Return a + b -+ Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+long double _Q_add(const long double a, const long double b) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(C); -+ long double c; -+ -+ FP_INIT_ROUNDMODE; -+ FP_UNPACK_SEMIRAW_Q(A, a); -+ FP_UNPACK_SEMIRAW_Q(B, b); -+ FP_ADD_Q(C, A, B); -+ FP_PACK_SEMIRAW_Q(c, C); -+ FP_HANDLE_EXCEPTIONS; -+ return c; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_cmp.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_cmp.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_cmp.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_cmp.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,41 @@ -+/* Software floating-point emulation. -+ Compare a and b, return float condition code. -+ Copyright (C) 1997,1999 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+int _Q_cmp(const long double a, const long double b) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(B); -+ int r; -+ -+ FP_UNPACK_RAW_Q(A, a); -+ FP_UNPACK_RAW_Q(B, b); -+ FP_CMP_Q(r, B, A, 3); -+ if (r == -1) r = 2; -+ if (r == 3 && (FP_ISSIGNAN_Q(A) || FP_ISSIGNAN_Q(B))) -+ FP_SET_EXCEPTION(FP_EX_INVALID); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return r; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_cmpe.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_cmpe.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_cmpe.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_cmpe.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,42 @@ -+/* Software floating-point emulation. -+ Compare a and b, return float condition code. -+ Signal exception (unless masked) if unordered. -+ Copyright (C) 1997,1999 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+int _Q_cmpe(const long double a, const long double b) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(B); -+ int r; -+ -+ FP_UNPACK_RAW_Q(A, a); -+ FP_UNPACK_RAW_Q(B, b); -+ FP_CMP_Q(r, B, A, 3); -+ if (r == -1) r = 2; -+ if (r == 3) -+ FP_SET_EXCEPTION(FP_EX_INVALID); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return r; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_div.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_div.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_div.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_div.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,39 @@ -+/* Software floating-point emulation. -+ Return a / b -+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+long double _Q_div(const long double a, const long double b) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(C); -+ long double c; -+ -+ FP_INIT_ROUNDMODE; -+ FP_UNPACK_Q(A, a); -+ FP_UNPACK_Q(B, b); -+ FP_DIV_Q(C, A, B); -+ FP_PACK_Q(c, C); -+ FP_HANDLE_EXCEPTIONS; -+ return c; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_dtoq.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_dtoq.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_dtoq.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_dtoq.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,44 @@ -+/* Software floating-point emulation. -+ Return (long double)(a) -+ Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "double.h" -+#include "quad.h" -+ -+long double _Q_dtoq(const double a) -+{ -+ FP_DECL_EX; -+ FP_DECL_D(A); -+ FP_DECL_Q(C); -+ long double c; -+ -+ FP_INIT_ROUNDMODE; -+ FP_UNPACK_RAW_D(A, a); -+#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q -+ FP_EXTEND(Q,D,4,2,C,A); -+#else -+ FP_EXTEND(Q,D,2,1,C,A); -+#endif -+ FP_PACK_RAW_Q(c, C); -+ FP_HANDLE_EXCEPTIONS; -+ return c; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_feq.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_feq.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_feq.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_feq.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,40 @@ -+/* Software floating-point emulation. -+ Return 1 if a == b -+ Copyright (C) 1997,1999 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+int _Q_feq(const long double a, const long double b) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(B); -+ int r; -+ -+ FP_UNPACK_RAW_Q(A, a); -+ FP_UNPACK_RAW_Q(B, b); -+ FP_CMP_EQ_Q(r, A, B); -+ if (r && (FP_ISSIGNAN_Q(A) || FP_ISSIGNAN_Q(B))) -+ FP_SET_EXCEPTION(FP_EX_INVALID); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return !r; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_fge.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_fge.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_fge.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_fge.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,40 @@ -+/* Software floating-point emulation. -+ Return 1 if a >= b -+ Copyright (C) 1997,1999 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+int _Q_fge(const long double a, const long double b) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(B); -+ int r; -+ -+ FP_UNPACK_RAW_Q(A, a); -+ FP_UNPACK_RAW_Q(B, b); -+ FP_CMP_Q(r, B, A, 3); -+ if (r == 3) -+ FP_SET_EXCEPTION(FP_EX_INVALID); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return (r <= 0); -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_fgt.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_fgt.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_fgt.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_fgt.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,40 @@ -+/* Software floating-point emulation. -+ Return 1 if a > b -+ Copyright (C) 1997,1999 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+int _Q_fgt(const long double a, const long double b) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(B); -+ int r; -+ -+ FP_UNPACK_RAW_Q(A, a); -+ FP_UNPACK_RAW_Q(B, b); -+ FP_CMP_Q(r, B, A, 3); -+ if (r == 3) -+ FP_SET_EXCEPTION(FP_EX_INVALID); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return (r == -1); -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_fle.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_fle.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_fle.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_fle.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,40 @@ -+/* Software floating-point emulation. -+ Return 1 if a <= b -+ Copyright (C) 1997,1999 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+int _Q_fle(const long double a, const long double b) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(B); -+ int r; -+ -+ FP_UNPACK_RAW_Q(A, a); -+ FP_UNPACK_RAW_Q(B, b); -+ FP_CMP_Q(r, B, A, -2); -+ if (r == -2) -+ FP_SET_EXCEPTION(FP_EX_INVALID); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return (r >= 0); -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_flt.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_flt.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_flt.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_flt.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,40 @@ -+/* Software floating-point emulation. -+ Return 1 if a < b -+ Copyright (C) 1997,1999 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+int _Q_flt(const long double a, const long double b) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(B); -+ int r; -+ -+ FP_UNPACK_RAW_Q(A, a); -+ FP_UNPACK_RAW_Q(B, b); -+ FP_CMP_Q(r, B, A, 3); -+ if (r == 3) -+ FP_SET_EXCEPTION(FP_EX_INVALID); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return (r == 1); -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_fne.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_fne.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_fne.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_fne.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,40 @@ -+/* Software floating-point emulation. -+ Return 1 if a != b -+ Copyright (C) 1997,1999 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+int _Q_fne(const long double a, const long double b) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(B); -+ int r; -+ -+ FP_UNPACK_RAW_Q(A, a); -+ FP_UNPACK_RAW_Q(B, b); -+ FP_CMP_EQ_Q(r, A, B); -+ if (r && (FP_ISSIGNAN_Q(A) || FP_ISSIGNAN_Q(B))) -+ FP_SET_EXCEPTION(FP_EX_INVALID); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return r; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_itoq.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_itoq.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_itoq.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_itoq.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,38 @@ -+/* Software floating-point emulation. -+ Return (long double)(a) -+ Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+long double _Q_itoq(const int a) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(C); -+ int b = a; -+ long double c; -+ -+ FP_FROM_INT_Q(C, b, 32, unsigned int); -+ FP_PACK_RAW_Q(c, C); -+ FP_CLEAR_EXCEPTIONS; -+ FP_HANDLE_EXCEPTIONS; -+ return c; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_lltoq.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_lltoq.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_lltoq.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_lltoq.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,38 @@ -+/* Software floating-point emulation. -+ Return (long double)a -+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+long double _Q_lltoq(const long long a) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(C); -+ long double c; -+ long long b = a; -+ -+ FP_FROM_INT_Q(C, b, 64, unsigned long long); -+ FP_PACK_RAW_Q(c, C); -+ FP_CLEAR_EXCEPTIONS; -+ FP_HANDLE_EXCEPTIONS; -+ return c; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_mul.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_mul.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_mul.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_mul.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,39 @@ -+/* Software floating-point emulation. -+ Return a * b -+ Copyright (C) 1997,1999 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+long double _Q_mul(const long double a, const long double b) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(C); -+ long double c; -+ -+ FP_INIT_ROUNDMODE; -+ FP_UNPACK_Q(A, a); -+ FP_UNPACK_Q(B, b); -+ FP_MUL_Q(C, A, B); -+ FP_PACK_Q(c, C); -+ FP_HANDLE_EXCEPTIONS; -+ return c; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_neg.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_neg.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_neg.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_neg.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,47 @@ -+/* Software floating-point emulation. -+ Return !a -+ Copyright (C) 1997,1999 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+long double _Q_neg(const long double a) -+{ -+ FP_DECL_EX; -+ long double c = a; -+ -+#if (__BYTE_ORDER == __BIG_ENDIAN) -+ ((UWtype *)&c)[0] ^= (((UWtype)1) << (W_TYPE_SIZE - 1)); -+#elif (__BYTE_ORDER == __LITTLE_ENDIAN) && (W_TYPE_SIZE == 64) -+ ((UWtype *)&c)[1] ^= (((UWtype)1) << (W_TYPE_SIZE - 1)); -+#elif (__BYTE_ORDER == __LITTLE_ENDIAN) && (W_TYPE_SIZE == 32) -+ ((UWtype *)&c)[3] ^= (((UWtype)1) << (W_TYPE_SIZE - 1)); -+#else -+ FP_DECL_Q(A); FP_DECL_Q(C); -+ -+ FP_UNPACK_Q(A, a); -+ FP_NEG_Q(C, A); -+ FP_PACK_Q(c, C); -+#endif -+ FP_CLEAR_EXCEPTIONS; -+ FP_HANDLE_EXCEPTIONS; -+ return c; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_qtod.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_qtod.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_qtod.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_qtod.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,45 @@ -+/* Software floating-point emulation. -+ Return (double)a -+ Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "double.h" -+#include "quad.h" -+ -+double _Q_qtod(const long double a) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); -+ FP_DECL_D(R); -+ double r; -+ -+ FP_INIT_ROUNDMODE; -+ FP_UNPACK_SEMIRAW_Q(A, a); -+#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q -+ FP_TRUNC(D,Q,2,4,R,A); -+#else -+ FP_TRUNC(D,Q,1,2,R,A); -+#endif -+ FP_PACK_SEMIRAW_D(r, R); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return r; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_qtoi.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_qtoi.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_qtoi.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_qtoi.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,38 @@ -+/* Software floating-point emulation. -+ Return (int)a -+ Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#define FP_ROUNDMODE FP_RND_ZERO -+#include "soft-fp.h" -+#include "quad.h" -+ -+int _Q_qtoi(const long double a) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); -+ unsigned int r; -+ -+ FP_UNPACK_RAW_Q(A, a); -+ FP_TO_INT_Q(r, A, 32, 1); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return r; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_qtoll.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_qtoll.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_qtoll.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_qtoll.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,38 @@ -+/* Software floating-point emulation. -+ Return (long long)a -+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#define FP_ROUNDMODE FP_RND_ZERO -+#include "soft-fp.h" -+#include "quad.h" -+ -+long long _Q_qtoll(const long double a) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); -+ unsigned long long r; -+ -+ FP_UNPACK_RAW_Q(A, a); -+ FP_TO_INT_Q(r, A, 64, 1); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return r; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_qtos.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_qtos.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_qtos.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_qtos.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,45 @@ -+/* Software floating-point emulation. -+ Return (float)a -+ Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "single.h" -+#include "quad.h" -+ -+float _Q_qtos(const long double a) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); -+ FP_DECL_S(R); -+ float r; -+ -+ FP_INIT_ROUNDMODE; -+ FP_UNPACK_SEMIRAW_Q(A, a); -+#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q -+ FP_TRUNC(S,Q,1,4,R,A); -+#else -+ FP_TRUNC(S,Q,1,2,R,A); -+#endif -+ FP_PACK_SEMIRAW_S(r, R); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return r; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_qtou.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_qtou.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_qtou.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_qtou.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,38 @@ -+/* Software floating-point emulation. -+ Return (unsigned int)a -+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#define FP_ROUNDMODE FP_RND_ZERO -+#include "soft-fp.h" -+#include "quad.h" -+ -+unsigned int _Q_qtou(const long double a) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); -+ unsigned int r; -+ -+ FP_UNPACK_RAW_Q(A, a); -+ FP_TO_INT_Q(r, A, 32, -1); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return r; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_qtoull.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_qtoull.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_qtoull.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_qtoull.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,38 @@ -+/* Software floating-point emulation. -+ Return (unsigned long long)a -+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#define FP_ROUNDMODE FP_RND_ZERO -+#include "soft-fp.h" -+#include "quad.h" -+ -+unsigned long long _Q_qtoull(const long double a) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); -+ unsigned long long r; -+ -+ FP_UNPACK_RAW_Q(A, a); -+ FP_TO_INT_Q(r, A, 64, -1); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return r; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_sqrt.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_sqrt.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_sqrt.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_sqrt.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,39 @@ -+/* Software floating-point emulation. -+ Return sqrtl(a) -+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+long double _Q_sqrt(const long double a) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(C); -+ long double c; -+ -+ FP_INIT_ROUNDMODE; -+ FP_UNPACK_Q(A, a); -+ FP_SQRT_Q(C, A); -+ FP_PACK_Q(c, C); -+ FP_HANDLE_EXCEPTIONS; -+ return c; -+} -+strong_alias (_Q_sqrt, __ieee754_sqrtl); -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_stoq.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_stoq.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_stoq.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_stoq.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,43 @@ -+/* Software floating-point emulation. -+ c = (long double)(a) -+ Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "single.h" -+#include "quad.h" -+ -+long double _Q_stoq(const float a) -+{ -+ FP_DECL_EX; -+ FP_DECL_S(A); -+ FP_DECL_Q(C); -+ long double c; -+ -+ FP_UNPACK_RAW_S(A, a); -+#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q -+ FP_EXTEND(Q,S,4,1,C,A); -+#else -+ FP_EXTEND(Q,S,2,1,C,A); -+#endif -+ FP_PACK_RAW_Q(c, C); -+ FP_HANDLE_EXCEPTIONS; -+ return c; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_sub.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_sub.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_sub.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_sub.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,39 @@ -+/* Software floating-point emulation. -+ c = a - b -+ Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+long double _Q_sub(const long double a, const long double b) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(C); -+ long double c; -+ -+ FP_INIT_ROUNDMODE; -+ FP_UNPACK_SEMIRAW_Q(A, a); -+ FP_UNPACK_SEMIRAW_Q(B, b); -+ FP_SUB_Q(C, A, B); -+ FP_PACK_SEMIRAW_Q(c, C); -+ FP_HANDLE_EXCEPTIONS; -+ return c; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_ulltoq.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_ulltoq.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_ulltoq.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_ulltoq.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,38 @@ -+/* Software floating-point emulation. -+ Return (long double)(a) -+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+long double _Q_ulltoq(const unsigned long long a) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(C); -+ long double c; -+ unsigned long long b = a; -+ -+ FP_FROM_INT_Q(C, b, 64, unsigned long long); -+ FP_PACK_RAW_Q(c, C); -+ FP_CLEAR_EXCEPTIONS; -+ FP_HANDLE_EXCEPTIONS; -+ return c; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_util.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_util.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_util.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_util.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,57 @@ -+/* Software floating-point emulation. -+ Helper routine for _Q_* routines. -+ Simulate exceptions using double arithmetics. -+ Copyright (C) 1999 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+ -+unsigned long long ___Q_numbers [] = { -+0x0000000000000000ULL, /* Zero */ -+0x0010100000000000ULL, /* Very tiny number */ -+0x0010000000000000ULL, /* Minimum normalized number */ -+0x7fef000000000000ULL, /* A huge double number */ -+}; -+ -+double ___Q_simulate_exceptions(int exceptions) -+{ -+ double d, *p = (double *)___Q_numbers; -+ if (exceptions & FP_EX_INVALID) -+ d = p[0]/p[0]; -+ if (exceptions & FP_EX_OVERFLOW) -+ { -+ d = p[3] + p[3]; -+ exceptions &= ~FP_EX_INEXACT; -+ } -+ if (exceptions & FP_EX_UNDERFLOW) -+ { -+ if (exceptions & FP_EX_INEXACT) -+ { -+ d = p[2] * p[2]; -+ exceptions &= ~FP_EX_INEXACT; -+ } -+ else -+ d = p[1] - p[2]; -+ } -+ if (exceptions & FP_EX_DIVZERO) -+ d = 1.0/p[0]; -+ if (exceptions & FP_EX_INEXACT) -+ d = p[3] - p[2]; -+ return d; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_utoq.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_utoq.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_utoq.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_utoq.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,38 @@ -+/* Software floating-point emulation. -+ c = (long double)(a) -+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+long double _Q_utoq(const unsigned int a) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(C); -+ long double c; -+ unsigned int b = a; -+ -+ FP_FROM_INT_Q(C, b, 32, unsigned int); -+ FP_PACK_RAW_Q(c, C); -+ FP_CLEAR_EXCEPTIONS; -+ FP_HANDLE_EXCEPTIONS; -+ return c; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/quad.h uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/quad.h ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/quad.h 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/quad.h 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,271 @@ -+/* Software floating-point emulation. -+ Definitions for IEEE Quad Precision. -+ Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com), -+ Jakub Jelinek (jj@ultra.linux.cz), -+ David S. Miller (davem@redhat.com) and -+ Peter Maydell (pmaydell@chiark.greenend.org.uk). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ In addition to the permissions in the GNU Lesser General Public -+ License, the Free Software Foundation gives you unlimited -+ permission to link the compiled version of this file into -+ combinations with other programs, and to distribute those -+ combinations without any restriction coming from the use of this -+ file. (The Lesser General Public License restrictions do apply in -+ other respects; for example, they cover modification of the file, -+ and distribution when not linked into a combine executable.) -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, -+ MA 02110-1301, USA. */ -+ -+#if _FP_W_TYPE_SIZE < 32 -+#error "Here's a nickel, kid. Go buy yourself a real computer." -+#endif -+ -+#if _FP_W_TYPE_SIZE < 64 -+#define _FP_FRACTBITS_Q (4*_FP_W_TYPE_SIZE) -+#else -+#define _FP_FRACTBITS_Q (2*_FP_W_TYPE_SIZE) -+#endif -+ -+#define _FP_FRACBITS_Q 113 -+#define _FP_FRACXBITS_Q (_FP_FRACTBITS_Q - _FP_FRACBITS_Q) -+#define _FP_WFRACBITS_Q (_FP_WORKBITS + _FP_FRACBITS_Q) -+#define _FP_WFRACXBITS_Q (_FP_FRACTBITS_Q - _FP_WFRACBITS_Q) -+#define _FP_EXPBITS_Q 15 -+#define _FP_EXPBIAS_Q 16383 -+#define _FP_EXPMAX_Q 32767 -+ -+#define _FP_QNANBIT_Q \ -+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_Q-2) % _FP_W_TYPE_SIZE) -+#define _FP_QNANBIT_SH_Q \ -+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_Q-2+_FP_WORKBITS) % _FP_W_TYPE_SIZE) -+#define _FP_IMPLBIT_Q \ -+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_Q-1) % _FP_W_TYPE_SIZE) -+#define _FP_IMPLBIT_SH_Q \ -+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_Q-1+_FP_WORKBITS) % _FP_W_TYPE_SIZE) -+#define _FP_OVERFLOW_Q \ -+ ((_FP_W_TYPE)1 << (_FP_WFRACBITS_Q % _FP_W_TYPE_SIZE)) -+ -+typedef float TFtype __attribute__((mode(TF))); -+ -+#if _FP_W_TYPE_SIZE < 64 -+ -+union _FP_UNION_Q -+{ -+ TFtype flt; -+ struct -+ { -+#if __BYTE_ORDER == __BIG_ENDIAN -+ unsigned sign : 1; -+ unsigned exp : _FP_EXPBITS_Q; -+ unsigned long frac3 : _FP_FRACBITS_Q - (_FP_IMPLBIT_Q != 0)-(_FP_W_TYPE_SIZE * 3); -+ unsigned long frac2 : _FP_W_TYPE_SIZE; -+ unsigned long frac1 : _FP_W_TYPE_SIZE; -+ unsigned long frac0 : _FP_W_TYPE_SIZE; -+#else -+ unsigned long frac0 : _FP_W_TYPE_SIZE; -+ unsigned long frac1 : _FP_W_TYPE_SIZE; -+ unsigned long frac2 : _FP_W_TYPE_SIZE; -+ unsigned long frac3 : _FP_FRACBITS_Q - (_FP_IMPLBIT_Q != 0)-(_FP_W_TYPE_SIZE * 3); -+ unsigned exp : _FP_EXPBITS_Q; -+ unsigned sign : 1; -+#endif /* not bigendian */ -+ } bits __attribute__((packed)); -+}; -+ -+ -+#define FP_DECL_Q(X) _FP_DECL(4,X) -+#define FP_UNPACK_RAW_Q(X,val) _FP_UNPACK_RAW_4(Q,X,val) -+#define FP_UNPACK_RAW_QP(X,val) _FP_UNPACK_RAW_4_P(Q,X,val) -+#define FP_PACK_RAW_Q(val,X) _FP_PACK_RAW_4(Q,val,X) -+#define FP_PACK_RAW_QP(val,X) \ -+ do { \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_4_P(Q,val,X); \ -+ } while (0) -+ -+#define FP_UNPACK_Q(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_4(Q,X,val); \ -+ _FP_UNPACK_CANONICAL(Q,4,X); \ -+ } while (0) -+ -+#define FP_UNPACK_QP(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_4_P(Q,X,val); \ -+ _FP_UNPACK_CANONICAL(Q,4,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_Q(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_4(Q,X,val); \ -+ _FP_UNPACK_SEMIRAW(Q,4,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_QP(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_4_P(Q,X,val); \ -+ _FP_UNPACK_SEMIRAW(Q,4,X); \ -+ } while (0) -+ -+#define FP_PACK_Q(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(Q,4,X); \ -+ _FP_PACK_RAW_4(Q,val,X); \ -+ } while (0) -+ -+#define FP_PACK_QP(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(Q,4,X); \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_4_P(Q,val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_Q(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(Q,4,X); \ -+ _FP_PACK_RAW_4(Q,val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_QP(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(Q,4,X); \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_4_P(Q,val,X); \ -+ } while (0) -+ -+#define FP_ISSIGNAN_Q(X) _FP_ISSIGNAN(Q,4,X) -+#define FP_NEG_Q(R,X) _FP_NEG(Q,4,R,X) -+#define FP_ADD_Q(R,X,Y) _FP_ADD(Q,4,R,X,Y) -+#define FP_SUB_Q(R,X,Y) _FP_SUB(Q,4,R,X,Y) -+#define FP_MUL_Q(R,X,Y) _FP_MUL(Q,4,R,X,Y) -+#define FP_DIV_Q(R,X,Y) _FP_DIV(Q,4,R,X,Y) -+#define FP_SQRT_Q(R,X) _FP_SQRT(Q,4,R,X) -+#define _FP_SQRT_MEAT_Q(R,S,T,X,Q) _FP_SQRT_MEAT_4(R,S,T,X,Q) -+ -+#define FP_CMP_Q(r,X,Y,un) _FP_CMP(Q,4,r,X,Y,un) -+#define FP_CMP_EQ_Q(r,X,Y) _FP_CMP_EQ(Q,4,r,X,Y) -+#define FP_CMP_UNORD_Q(r,X,Y) _FP_CMP_UNORD(Q,4,r,X,Y) -+ -+#define FP_TO_INT_Q(r,X,rsz,rsg) _FP_TO_INT(Q,4,r,X,rsz,rsg) -+#define FP_FROM_INT_Q(X,r,rs,rt) _FP_FROM_INT(Q,4,X,r,rs,rt) -+ -+#define _FP_FRAC_HIGH_Q(X) _FP_FRAC_HIGH_4(X) -+#define _FP_FRAC_HIGH_RAW_Q(X) _FP_FRAC_HIGH_4(X) -+ -+#else /* not _FP_W_TYPE_SIZE < 64 */ -+union _FP_UNION_Q -+{ -+ TFtype flt /* __attribute__((mode(TF))) */ ; -+ struct { -+ _FP_W_TYPE a, b; -+ } longs; -+ struct { -+#if __BYTE_ORDER == __BIG_ENDIAN -+ unsigned sign : 1; -+ unsigned exp : _FP_EXPBITS_Q; -+ _FP_W_TYPE frac1 : _FP_FRACBITS_Q - (_FP_IMPLBIT_Q != 0) - _FP_W_TYPE_SIZE; -+ _FP_W_TYPE frac0 : _FP_W_TYPE_SIZE; -+#else -+ _FP_W_TYPE frac0 : _FP_W_TYPE_SIZE; -+ _FP_W_TYPE frac1 : _FP_FRACBITS_Q - (_FP_IMPLBIT_Q != 0) - _FP_W_TYPE_SIZE; -+ unsigned exp : _FP_EXPBITS_Q; -+ unsigned sign : 1; -+#endif -+ } bits; -+}; -+ -+#define FP_DECL_Q(X) _FP_DECL(2,X) -+#define FP_UNPACK_RAW_Q(X,val) _FP_UNPACK_RAW_2(Q,X,val) -+#define FP_UNPACK_RAW_QP(X,val) _FP_UNPACK_RAW_2_P(Q,X,val) -+#define FP_PACK_RAW_Q(val,X) _FP_PACK_RAW_2(Q,val,X) -+#define FP_PACK_RAW_QP(val,X) \ -+ do { \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_2_P(Q,val,X); \ -+ } while (0) -+ -+#define FP_UNPACK_Q(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_2(Q,X,val); \ -+ _FP_UNPACK_CANONICAL(Q,2,X); \ -+ } while (0) -+ -+#define FP_UNPACK_QP(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_2_P(Q,X,val); \ -+ _FP_UNPACK_CANONICAL(Q,2,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_Q(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_2(Q,X,val); \ -+ _FP_UNPACK_SEMIRAW(Q,2,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_QP(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_2_P(Q,X,val); \ -+ _FP_UNPACK_SEMIRAW(Q,2,X); \ -+ } while (0) -+ -+#define FP_PACK_Q(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(Q,2,X); \ -+ _FP_PACK_RAW_2(Q,val,X); \ -+ } while (0) -+ -+#define FP_PACK_QP(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(Q,2,X); \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_2_P(Q,val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_Q(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(Q,2,X); \ -+ _FP_PACK_RAW_2(Q,val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_QP(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(Q,2,X); \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_2_P(Q,val,X); \ -+ } while (0) -+ -+#define FP_ISSIGNAN_Q(X) _FP_ISSIGNAN(Q,2,X) -+#define FP_NEG_Q(R,X) _FP_NEG(Q,2,R,X) -+#define FP_ADD_Q(R,X,Y) _FP_ADD(Q,2,R,X,Y) -+#define FP_SUB_Q(R,X,Y) _FP_SUB(Q,2,R,X,Y) -+#define FP_MUL_Q(R,X,Y) _FP_MUL(Q,2,R,X,Y) -+#define FP_DIV_Q(R,X,Y) _FP_DIV(Q,2,R,X,Y) -+#define FP_SQRT_Q(R,X) _FP_SQRT(Q,2,R,X) -+#define _FP_SQRT_MEAT_Q(R,S,T,X,Q) _FP_SQRT_MEAT_2(R,S,T,X,Q) -+ -+#define FP_CMP_Q(r,X,Y,un) _FP_CMP(Q,2,r,X,Y,un) -+#define FP_CMP_EQ_Q(r,X,Y) _FP_CMP_EQ(Q,2,r,X,Y) -+#define FP_CMP_UNORD_Q(r,X,Y) _FP_CMP_UNORD(Q,2,r,X,Y) -+ -+#define FP_TO_INT_Q(r,X,rsz,rsg) _FP_TO_INT(Q,2,r,X,rsz,rsg) -+#define FP_FROM_INT_Q(X,r,rs,rt) _FP_FROM_INT(Q,2,X,r,rs,rt) -+ -+#define _FP_FRAC_HIGH_Q(X) _FP_FRAC_HIGH_2(X) -+#define _FP_FRAC_HIGH_RAW_Q(X) _FP_FRAC_HIGH_2(X) -+ -+#endif /* not _FP_W_TYPE_SIZE < 64 */ -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/sfp-machine.h uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/sfp-machine.h ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/sfp-machine.h 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/sfp-machine.h 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,213 @@ -+/* Machine-dependent software floating-point definitions. -+ Sparc userland (_Q_*) version. -+ Copyright (C) 1997,1998,1999, 2002, 2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com), -+ Jakub Jelinek (jj@ultra.linux.cz) and -+ David S. Miller (davem@redhat.com). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+ -+#define _FP_W_TYPE_SIZE 32 -+#define _FP_W_TYPE unsigned long -+#define _FP_WS_TYPE signed long -+#define _FP_I_TYPE long -+ -+#define _FP_MUL_MEAT_S(R,X,Y) \ -+ _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm) -+#define _FP_MUL_MEAT_D(R,X,Y) \ -+ _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm) -+#define _FP_MUL_MEAT_Q(R,X,Y) \ -+ _FP_MUL_MEAT_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm) -+ -+#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_udiv(S,R,X,Y) -+#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_2_udiv(D,R,X,Y) -+#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_4_udiv(Q,R,X,Y) -+ -+#define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1) -+#define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1), -1 -+#define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1 -+#define _FP_NANSIGN_S 0 -+#define _FP_NANSIGN_D 0 -+#define _FP_NANSIGN_Q 0 -+ -+#define _FP_KEEPNANFRACP 1 -+ -+/* If one NaN is signaling and the other is not, -+ * we choose that one, otherwise we choose X. -+ */ -+/* For _Qp_* and _Q_*, this should prefer X, for -+ * CPU instruction emulation this should prefer Y. -+ * (see SPAMv9 B.2.2 section). -+ */ -+#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \ -+ do { \ -+ if ((_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs) \ -+ && !(_FP_FRAC_HIGH_RAW_##fs(Y) & _FP_QNANBIT_##fs)) \ -+ { \ -+ R##_s = Y##_s; \ -+ _FP_FRAC_COPY_##wc(R,Y); \ -+ } \ -+ else \ -+ { \ -+ R##_s = X##_s; \ -+ _FP_FRAC_COPY_##wc(R,X); \ -+ } \ -+ R##_c = FP_CLS_NAN; \ -+ } while (0) -+ -+/* Some assembly to speed things up. */ -+#define __FP_FRAC_ADD_3(r2,r1,r0,x2,x1,x0,y2,y1,y0) \ -+ __asm__ ("addcc %r7,%8,%2\n\ -+ addxcc %r5,%6,%1\n\ -+ addx %r3,%4,%0" \ -+ : "=r" ((USItype)(r2)), \ -+ "=&r" ((USItype)(r1)), \ -+ "=&r" ((USItype)(r0)) \ -+ : "%rJ" ((USItype)(x2)), \ -+ "rI" ((USItype)(y2)), \ -+ "%rJ" ((USItype)(x1)), \ -+ "rI" ((USItype)(y1)), \ -+ "%rJ" ((USItype)(x0)), \ -+ "rI" ((USItype)(y0)) \ -+ : "cc") -+ -+#define __FP_FRAC_SUB_3(r2,r1,r0,x2,x1,x0,y2,y1,y0) \ -+ __asm__ ("subcc %r7,%8,%2\n\ -+ subxcc %r5,%6,%1\n\ -+ subx %r3,%4,%0" \ -+ : "=r" ((USItype)(r2)), \ -+ "=&r" ((USItype)(r1)), \ -+ "=&r" ((USItype)(r0)) \ -+ : "%rJ" ((USItype)(x2)), \ -+ "rI" ((USItype)(y2)), \ -+ "%rJ" ((USItype)(x1)), \ -+ "rI" ((USItype)(y1)), \ -+ "%rJ" ((USItype)(x0)), \ -+ "rI" ((USItype)(y0)) \ -+ : "cc") -+ -+#define __FP_FRAC_ADD_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \ -+ do { \ -+ /* We need to fool gcc, as we need to pass more than 10 \ -+ input/outputs. */ \ -+ register USItype _t1 __asm__ ("g1"), _t2 __asm__ ("g2"); \ -+ __asm__ __volatile__ ("\ -+ addcc %r8,%9,%1\n\ -+ addxcc %r6,%7,%0\n\ -+ addxcc %r4,%5,%%g2\n\ -+ addx %r2,%3,%%g1" \ -+ : "=&r" ((USItype)(r1)), \ -+ "=&r" ((USItype)(r0)) \ -+ : "%rJ" ((USItype)(x3)), \ -+ "rI" ((USItype)(y3)), \ -+ "%rJ" ((USItype)(x2)), \ -+ "rI" ((USItype)(y2)), \ -+ "%rJ" ((USItype)(x1)), \ -+ "rI" ((USItype)(y1)), \ -+ "%rJ" ((USItype)(x0)), \ -+ "rI" ((USItype)(y0)) \ -+ : "cc", "g1", "g2"); \ -+ __asm__ __volatile__ ("" : "=r" (_t1), "=r" (_t2)); \ -+ r3 = _t1; r2 = _t2; \ -+ } while (0) -+ -+#define __FP_FRAC_SUB_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \ -+ do { \ -+ /* We need to fool gcc, as we need to pass more than 10 \ -+ input/outputs. */ \ -+ register USItype _t1 __asm__ ("g1"), _t2 __asm__ ("g2"); \ -+ __asm__ __volatile__ ("\ -+ subcc %r8,%9,%1\n\ -+ subxcc %r6,%7,%0\n\ -+ subxcc %r4,%5,%%g2\n\ -+ subx %r2,%3,%%g1" \ -+ : "=&r" ((USItype)(r1)), \ -+ "=&r" ((USItype)(r0)) \ -+ : "%rJ" ((USItype)(x3)), \ -+ "rI" ((USItype)(y3)), \ -+ "%rJ" ((USItype)(x2)), \ -+ "rI" ((USItype)(y2)), \ -+ "%rJ" ((USItype)(x1)), \ -+ "rI" ((USItype)(y1)), \ -+ "%rJ" ((USItype)(x0)), \ -+ "rI" ((USItype)(y0)) \ -+ : "cc", "g1", "g2"); \ -+ __asm__ __volatile__ ("" : "=r" (_t1), "=r" (_t2)); \ -+ r3 = _t1; r2 = _t2; \ -+ } while (0) -+ -+#define __FP_FRAC_DEC_3(x2,x1,x0,y2,y1,y0) __FP_FRAC_SUB_3(x2,x1,x0,x2,x1,x0,y2,y1,y0) -+ -+#define __FP_FRAC_DEC_4(x3,x2,x1,x0,y3,y2,y1,y0) __FP_FRAC_SUB_4(x3,x2,x1,x0,x3,x2,x1,x0,y3,y2,y1,y0) -+ -+#define __FP_FRAC_ADDI_4(x3,x2,x1,x0,i) \ -+ __asm__ ("addcc %3,%4,%3\n\ -+ addxcc %2,%%g0,%2\n\ -+ addxcc %1,%%g0,%1\n\ -+ addx %0,%%g0,%0" \ -+ : "=&r" ((USItype)(x3)), \ -+ "=&r" ((USItype)(x2)), \ -+ "=&r" ((USItype)(x1)), \ -+ "=&r" ((USItype)(x0)) \ -+ : "rI" ((USItype)(i)), \ -+ "0" ((USItype)(x3)), \ -+ "1" ((USItype)(x2)), \ -+ "2" ((USItype)(x1)), \ -+ "3" ((USItype)(x0)) \ -+ : "cc") -+ -+/* Obtain the current rounding mode. */ -+#ifndef FP_ROUNDMODE -+#define FP_ROUNDMODE ((_fcw >> 30) & 0x3) -+#endif -+ -+/* Exception flags. */ -+#define FP_EX_INVALID (1 << 4) -+#define FP_EX_OVERFLOW (1 << 3) -+#define FP_EX_UNDERFLOW (1 << 2) -+#define FP_EX_DIVZERO (1 << 1) -+#define FP_EX_INEXACT (1 << 0) -+ -+#define _FP_DECL_EX fpu_control_t _fcw -+ -+#define FP_INIT_ROUNDMODE \ -+do { \ -+ _FPU_GETCW(_fcw); \ -+} while (0) -+ -+/* Simulate exceptions using double arithmetics. */ -+extern double ___Q_simulate_exceptions(int exc); -+ -+#define FP_HANDLE_EXCEPTIONS \ -+do { \ -+ if (!_fex) \ -+ { \ -+ /* This is the common case, so we do it inline. \ -+ * We need to clear cexc bits if any. \ -+ */ \ -+ extern unsigned long long ___Q_numbers[]; \ -+ __asm__ __volatile__("\ -+ ldd [%0], %%f30\n\ -+ faddd %%f30, %%f30, %%f30\ -+ " : : "r" (___Q_numbers) : "f30"); \ -+ } \ -+ else \ -+ ___Q_simulate_exceptions (_fex); \ -+} while (0) -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/single.h uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/single.h ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/single.h 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/single.h 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,151 @@ -+/* Software floating-point emulation. -+ Definitions for IEEE Single Precision. -+ Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com), -+ Jakub Jelinek (jj@ultra.linux.cz), -+ David S. Miller (davem@redhat.com) and -+ Peter Maydell (pmaydell@chiark.greenend.org.uk). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ In addition to the permissions in the GNU Lesser General Public -+ License, the Free Software Foundation gives you unlimited -+ permission to link the compiled version of this file into -+ combinations with other programs, and to distribute those -+ combinations without any restriction coming from the use of this -+ file. (The Lesser General Public License restrictions do apply in -+ other respects; for example, they cover modification of the file, -+ and distribution when not linked into a combine executable.) -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, -+ MA 02110-1301, USA. */ -+ -+#if _FP_W_TYPE_SIZE < 32 -+#error "Here's a nickel kid. Go buy yourself a real computer." -+#endif -+ -+#define _FP_FRACTBITS_S _FP_W_TYPE_SIZE -+ -+#define _FP_FRACBITS_S 24 -+#define _FP_FRACXBITS_S (_FP_FRACTBITS_S - _FP_FRACBITS_S) -+#define _FP_WFRACBITS_S (_FP_WORKBITS + _FP_FRACBITS_S) -+#define _FP_WFRACXBITS_S (_FP_FRACTBITS_S - _FP_WFRACBITS_S) -+#define _FP_EXPBITS_S 8 -+#define _FP_EXPBIAS_S 127 -+#define _FP_EXPMAX_S 255 -+#define _FP_QNANBIT_S ((_FP_W_TYPE)1 << (_FP_FRACBITS_S-2)) -+#define _FP_QNANBIT_SH_S ((_FP_W_TYPE)1 << (_FP_FRACBITS_S-2+_FP_WORKBITS)) -+#define _FP_IMPLBIT_S ((_FP_W_TYPE)1 << (_FP_FRACBITS_S-1)) -+#define _FP_IMPLBIT_SH_S ((_FP_W_TYPE)1 << (_FP_FRACBITS_S-1+_FP_WORKBITS)) -+#define _FP_OVERFLOW_S ((_FP_W_TYPE)1 << (_FP_WFRACBITS_S)) -+ -+/* The implementation of _FP_MUL_MEAT_S and _FP_DIV_MEAT_S should be -+ chosen by the target machine. */ -+ -+typedef float SFtype __attribute__((mode(SF))); -+ -+union _FP_UNION_S -+{ -+ SFtype flt; -+ struct { -+#if __BYTE_ORDER == __BIG_ENDIAN -+ unsigned sign : 1; -+ unsigned exp : _FP_EXPBITS_S; -+ unsigned frac : _FP_FRACBITS_S - (_FP_IMPLBIT_S != 0); -+#else -+ unsigned frac : _FP_FRACBITS_S - (_FP_IMPLBIT_S != 0); -+ unsigned exp : _FP_EXPBITS_S; -+ unsigned sign : 1; -+#endif -+ } bits __attribute__((packed)); -+}; -+ -+#define FP_DECL_S(X) _FP_DECL(1,X) -+#define FP_UNPACK_RAW_S(X,val) _FP_UNPACK_RAW_1(S,X,val) -+#define FP_UNPACK_RAW_SP(X,val) _FP_UNPACK_RAW_1_P(S,X,val) -+#define FP_PACK_RAW_S(val,X) _FP_PACK_RAW_1(S,val,X) -+#define FP_PACK_RAW_SP(val,X) \ -+ do { \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_1_P(S,val,X); \ -+ } while (0) -+ -+#define FP_UNPACK_S(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_1(S,X,val); \ -+ _FP_UNPACK_CANONICAL(S,1,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SP(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_1_P(S,X,val); \ -+ _FP_UNPACK_CANONICAL(S,1,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_S(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_1(S,X,val); \ -+ _FP_UNPACK_SEMIRAW(S,1,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_SP(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_1_P(S,X,val); \ -+ _FP_UNPACK_SEMIRAW(S,1,X); \ -+ } while (0) -+ -+#define FP_PACK_S(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(S,1,X); \ -+ _FP_PACK_RAW_1(S,val,X); \ -+ } while (0) -+ -+#define FP_PACK_SP(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(S,1,X); \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_1_P(S,val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_S(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(S,1,X); \ -+ _FP_PACK_RAW_1(S,val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_SP(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(S,1,X); \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_1_P(S,val,X); \ -+ } while (0) -+ -+#define FP_ISSIGNAN_S(X) _FP_ISSIGNAN(S,1,X) -+#define FP_NEG_S(R,X) _FP_NEG(S,1,R,X) -+#define FP_ADD_S(R,X,Y) _FP_ADD(S,1,R,X,Y) -+#define FP_SUB_S(R,X,Y) _FP_SUB(S,1,R,X,Y) -+#define FP_MUL_S(R,X,Y) _FP_MUL(S,1,R,X,Y) -+#define FP_DIV_S(R,X,Y) _FP_DIV(S,1,R,X,Y) -+#define FP_SQRT_S(R,X) _FP_SQRT(S,1,R,X) -+#define _FP_SQRT_MEAT_S(R,S,T,X,Q) _FP_SQRT_MEAT_1(R,S,T,X,Q) -+ -+#define FP_CMP_S(r,X,Y,un) _FP_CMP(S,1,r,X,Y,un) -+#define FP_CMP_EQ_S(r,X,Y) _FP_CMP_EQ(S,1,r,X,Y) -+#define FP_CMP_UNORD_S(r,X,Y) _FP_CMP_UNORD(S,1,r,X,Y) -+ -+#define FP_TO_INT_S(r,X,rsz,rsg) _FP_TO_INT(S,1,r,X,rsz,rsg) -+#define FP_FROM_INT_S(X,r,rs,rt) _FP_FROM_INT(S,1,X,r,rs,rt) -+ -+#define _FP_FRAC_HIGH_S(X) _FP_FRAC_HIGH_1(X) -+#define _FP_FRAC_HIGH_RAW_S(X) _FP_FRAC_HIGH_1(X) -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/soft-fp.h uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/soft-fp.h ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/soft-fp.h 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/soft-fp.h 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,205 @@ -+/* Software floating-point emulation. -+ Copyright (C) 1997,1998,1999,2000,2002,2003,2005,2006,2007 -+ Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com), -+ Jakub Jelinek (jj@ultra.linux.cz), -+ David S. Miller (davem@redhat.com) and -+ Peter Maydell (pmaydell@chiark.greenend.org.uk). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ In addition to the permissions in the GNU Lesser General Public -+ License, the Free Software Foundation gives you unlimited -+ permission to link the compiled version of this file into -+ combinations with other programs, and to distribute those -+ combinations without any restriction coming from the use of this -+ file. (The Lesser General Public License restrictions do apply in -+ other respects; for example, they cover modification of the file, -+ and distribution when not linked into a combine executable.) -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, -+ MA 02110-1301, USA. */ -+ -+#ifndef SOFT_FP_H -+#define SOFT_FP_H -+ -+#include "sfp-machine.h" -+ -+/* Allow sfp-machine to have its own byte order definitions. */ -+#ifndef __BYTE_ORDER -+#ifdef _LIBC -+#include -+#else -+#error "endianness not defined by sfp-machine.h" -+#endif -+#endif -+ -+#define _FP_WORKBITS 3 -+#define _FP_WORK_LSB ((_FP_W_TYPE)1 << 3) -+#define _FP_WORK_ROUND ((_FP_W_TYPE)1 << 2) -+#define _FP_WORK_GUARD ((_FP_W_TYPE)1 << 1) -+#define _FP_WORK_STICKY ((_FP_W_TYPE)1 << 0) -+ -+#ifndef FP_RND_NEAREST -+# define FP_RND_NEAREST 0 -+# define FP_RND_ZERO 1 -+# define FP_RND_PINF 2 -+# define FP_RND_MINF 3 -+#endif -+#ifndef FP_ROUNDMODE -+# define FP_ROUNDMODE FP_RND_NEAREST -+#endif -+ -+/* By default don't care about exceptions. */ -+#ifndef FP_EX_INVALID -+#define FP_EX_INVALID 0 -+#endif -+#ifndef FP_EX_OVERFLOW -+#define FP_EX_OVERFLOW 0 -+#endif -+#ifndef FP_EX_UNDERFLOW -+#define FP_EX_UNDERFLOW 0 -+#endif -+#ifndef FP_EX_DIVZERO -+#define FP_EX_DIVZERO 0 -+#endif -+#ifndef FP_EX_INEXACT -+#define FP_EX_INEXACT 0 -+#endif -+#ifndef FP_EX_DENORM -+#define FP_EX_DENORM 0 -+#endif -+ -+#ifdef _FP_DECL_EX -+#define FP_DECL_EX \ -+ int _fex = 0; \ -+ _FP_DECL_EX -+#else -+#define FP_DECL_EX int _fex = 0 -+#endif -+ -+#ifndef FP_INIT_ROUNDMODE -+#define FP_INIT_ROUNDMODE do {} while (0) -+#endif -+ -+#ifndef FP_HANDLE_EXCEPTIONS -+#define FP_HANDLE_EXCEPTIONS do {} while (0) -+#endif -+ -+#ifndef FP_INHIBIT_RESULTS -+/* By default we write the results always. -+ * sfp-machine may override this and e.g. -+ * check if some exceptions are unmasked -+ * and inhibit it in such a case. -+ */ -+#define FP_INHIBIT_RESULTS 0 -+#endif -+ -+#define FP_SET_EXCEPTION(ex) \ -+ _fex |= (ex) -+ -+#define FP_UNSET_EXCEPTION(ex) \ -+ _fex &= ~(ex) -+ -+#define FP_CLEAR_EXCEPTIONS \ -+ _fex = 0 -+ -+#define _FP_ROUND_NEAREST(wc, X) \ -+do { \ -+ if ((_FP_FRAC_LOW_##wc(X) & 15) != _FP_WORK_ROUND) \ -+ _FP_FRAC_ADDI_##wc(X, _FP_WORK_ROUND); \ -+} while (0) -+ -+#define _FP_ROUND_ZERO(wc, X) (void)0 -+ -+#define _FP_ROUND_PINF(wc, X) \ -+do { \ -+ if (!X##_s && (_FP_FRAC_LOW_##wc(X) & 7)) \ -+ _FP_FRAC_ADDI_##wc(X, _FP_WORK_LSB); \ -+} while (0) -+ -+#define _FP_ROUND_MINF(wc, X) \ -+do { \ -+ if (X##_s && (_FP_FRAC_LOW_##wc(X) & 7)) \ -+ _FP_FRAC_ADDI_##wc(X, _FP_WORK_LSB); \ -+} while (0) -+ -+#define _FP_ROUND(wc, X) \ -+do { \ -+ if (_FP_FRAC_LOW_##wc(X) & 7) \ -+ FP_SET_EXCEPTION(FP_EX_INEXACT); \ -+ switch (FP_ROUNDMODE) \ -+ { \ -+ case FP_RND_NEAREST: \ -+ _FP_ROUND_NEAREST(wc,X); \ -+ break; \ -+ case FP_RND_ZERO: \ -+ _FP_ROUND_ZERO(wc,X); \ -+ break; \ -+ case FP_RND_PINF: \ -+ _FP_ROUND_PINF(wc,X); \ -+ break; \ -+ case FP_RND_MINF: \ -+ _FP_ROUND_MINF(wc,X); \ -+ break; \ -+ } \ -+} while (0) -+ -+#define FP_CLS_NORMAL 0 -+#define FP_CLS_ZERO 1 -+#define FP_CLS_INF 2 -+#define FP_CLS_NAN 3 -+ -+#define _FP_CLS_COMBINE(x,y) (((x) << 2) | (y)) -+ -+#include "op-1.h" -+#include "op-2.h" -+#include "op-4.h" -+#include "op-8.h" -+#include "op-common.h" -+ -+/* Sigh. Silly things longlong.h needs. */ -+#define UWtype _FP_W_TYPE -+#define W_TYPE_SIZE _FP_W_TYPE_SIZE -+ -+typedef int QItype __attribute__((mode(QI))); -+typedef int SItype __attribute__((mode(SI))); -+typedef int DItype __attribute__((mode(DI))); -+typedef unsigned int UQItype __attribute__((mode(QI))); -+typedef unsigned int USItype __attribute__((mode(SI))); -+typedef unsigned int UDItype __attribute__((mode(DI))); -+#if _FP_W_TYPE_SIZE == 32 -+typedef unsigned int UHWtype __attribute__((mode(HI))); -+#elif _FP_W_TYPE_SIZE == 64 -+typedef USItype UHWtype; -+#endif -+ -+#ifndef CMPtype -+#define CMPtype int -+#endif -+ -+#define SI_BITS (__CHAR_BIT__ * (int)sizeof(SItype)) -+#define DI_BITS (__CHAR_BIT__ * (int)sizeof(DItype)) -+ -+#ifndef umul_ppmm -+#include "longlong.h" -+#endif -+ -+#ifdef _LIBC -+#include -+#else -+extern void abort (void); -+#endif -+ -+#endif diff --git a/toolchain/uClibc/uclibc.mk b/toolchain/uClibc/uclibc.mk deleted file mode 100644 index 19256bb905..0000000000 --- a/toolchain/uClibc/uclibc.mk +++ /dev/null @@ -1,580 +0,0 @@ -############################################################# -# -# uClibc (the C library) -# -############################################################# - -ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) - -# specifying UCLIBC_CONFIG_FILE on the command-line overrides the .config -# setting. -ifndef UCLIBC_CONFIG_FILE -UCLIBC_CONFIG_FILE=$(call qstrip,$(BR2_UCLIBC_CONFIG)) -endif - -UCLIBC_VERSION:=$(call qstrip,$(BR2_UCLIBC_VERSION_STRING)) - -ifeq ($(BR2_UCLIBC_VERSION_SNAPSHOT),y) -UCLIBC_SITE:=http://www.uclibc.org/downloads/snapshots -UCLIBC_DIR:=$(TOOLCHAIN_DIR)/uClibc -else -UCLIBC_SITE:=http://www.uclibc.org/downloads -UCLIBC_DIR:=$(TOOLCHAIN_DIR)/uClibc-$(UCLIBC_VERSION) -endif - -UCLIBC_PATCH_DIR:=toolchain/uClibc/ -UCLIBC_SOURCE:=uClibc-$(UCLIBC_VERSION).tar.bz2 - -UCLIBC_CAT:=$(BZCAT) - -UCLIBC_TARGET_ARCH:=$(shell $(SHELL) -c "echo $(ARCH) | sed \ - -e 's/-.*//' \ - -e 's/i.86/i386/' \ - -e 's/sparc.*/sparc/' \ - -e 's/arm.*/arm/g' \ - -e 's/m68k.*/m68k/' \ - -e 's/ppc/powerpc/g' \ - -e 's/v850.*/v850/g' \ - -e 's/sh[234].*/sh/' \ - -e 's/mips.*/mips/' \ - -e 's/mipsel.*/mips/' \ - -e 's/cris.*/cris/' \ - -e 's/xtensa.*/xtensa/' \ -") -# just handle the ones that can be big or little -UCLIBC_TARGET_ENDIAN:=$(shell $(SHELL) -c "echo $(ARCH) | sed \ - -e 's/armeb/BIG/' \ - -e 's/arm/LITTLE/' \ - -e 's/mipsel/LITTLE/' \ - -e 's/mips/BIG/' \ - -e 's/sh.*eb/BIG/' \ - -e 's/sh.*/LITTLE/' \ - -e 's/sparc.*/BIG/' \ -") - -ifneq ($(UCLIBC_TARGET_ENDIAN),LITTLE) -ifneq ($(UCLIBC_TARGET_ENDIAN),BIG) -UCLIBC_TARGET_ENDIAN:= -endif -endif -ifeq ($(UCLIBC_TARGET_ENDIAN),LITTLE) -UCLIBC_NOT_TARGET_ENDIAN:=BIG -else -UCLIBC_NOT_TARGET_ENDIAN:=LITTLE -endif - -UCLIBC_ARM_TYPE:=CONFIG_$(call qstrip,$(BR2_ARM_TYPE)) -UCLIBC_SPARC_TYPE:=CONFIG_SPARC_$(call qstrip,$(BR2_SPARC_TYPE)) - -$(DL_DIR)/$(UCLIBC_SOURCE): - $(call DOWNLOAD,$(UCLIBC_SITE),$(UCLIBC_SOURCE)) - -uclibc-unpacked: $(UCLIBC_DIR)/.unpacked -$(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE) - mkdir -p $(TOOLCHAIN_DIR) - rm -rf $(UCLIBC_DIR) - $(UCLIBC_CAT) $(DL_DIR)/$(UCLIBC_SOURCE) | tar -C $(TOOLCHAIN_DIR) $(TAR_OPTIONS) - - touch $@ - -uclibc-patched: $(UCLIBC_DIR)/.patched -$(UCLIBC_DIR)/.patched: $(UCLIBC_DIR)/.unpacked -ifneq ($(BR2_UCLIBC_VERSION_SNAPSHOT),y) - toolchain/patch-kernel.sh $(UCLIBC_DIR) $(UCLIBC_PATCH_DIR) \ - uClibc-$(UCLIBC_VERSION)-\*.patch \ - uClibc-$(UCLIBC_VERSION)-\*.patch.$(ARCH) -else - toolchain/patch-kernel.sh $(UCLIBC_DIR) $(UCLIBC_PATCH_DIR) \ - uClibc.\*.patch uClibc.\*.patch.$(ARCH) -endif - touch $@ - - -# Some targets may wish to provide their own UCLIBC_CONFIG_FILE... -$(UCLIBC_DIR)/.oldconfig: $(UCLIBC_DIR)/.patched $(UCLIBC_CONFIG_FILE) - cp -f $(UCLIBC_CONFIG_FILE) $(UCLIBC_DIR)/.oldconfig - $(SED) 's,^CROSS_COMPILER_PREFIX=.*,CROSS_COMPILER_PREFIX="$(TARGET_CROSS)",g' \ - -e 's,# TARGET_$(UCLIBC_TARGET_ARCH) is not set,TARGET_$(UCLIBC_TARGET_ARCH)=y,g' \ - -e 's,^TARGET_ARCH=".*",TARGET_ARCH=\"$(UCLIBC_TARGET_ARCH)\",g' \ - -e 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE=\"$(LINUX_HEADERS_DIR)\",g' \ - -e 's,^KERNEL_HEADERS=.*,KERNEL_HEADERS=\"$(LINUX_HEADERS_DIR)/include\",g' \ - -e 's,^RUNTIME_PREFIX=.*,RUNTIME_PREFIX=\"/\",g' \ - -e 's,^DEVEL_PREFIX=.*,DEVEL_PREFIX=\"/usr/\",g' \ - -e 's,^SHARED_LIB_LOADER_PREFIX=.*,SHARED_LIB_LOADER_PREFIX=\"/lib\",g' \ - $(UCLIBC_DIR)/.oldconfig -ifeq ($(UCLIBC_TARGET_ARCH),arm) - (/bin/echo "# CONFIG_GENERIC_ARM is not set"; \ - /bin/echo "# CONFIG_ARM610 is not set"; \ - /bin/echo "# CONFIG_ARM710 is not set"; \ - /bin/echo "# CONFIG_ARM7TDMI is not set"; \ - /bin/echo "# CONFIG_ARM720T is not set"; \ - /bin/echo "# CONFIG_ARM920T is not set"; \ - /bin/echo "# CONFIG_ARM922T is not set"; \ - /bin/echo "# CONFIG_ARM926T is not set"; \ - /bin/echo "# CONFIG_ARM10T is not set"; \ - /bin/echo "# CONFIG_ARM1136JF_S is not set"; \ - /bin/echo "# CONFIG_ARM1176JZ_S is not set"; \ - /bin/echo "# CONFIG_ARM1176JZF_S is not set"; \ - /bin/echo "# CONFIG_ARM_SA110 is not set"; \ - /bin/echo "# CONFIG_ARM_SA1100 is not set"; \ - /bin/echo "# CONFIG_ARM_XSCALE is not set"; \ - /bin/echo "# CONFIG_ARM_IWMMXT is not set"; \ - ) >> $(UCLIBC_DIR)/.oldconfig - $(SED) 's/^\(CONFIG_[^_]*[_]*ARM[^=]*\)=.*/# \1 is not set/g' \ - $(UCLIBC_DIR)/.oldconfig - $(SED) 's/^.*$(UCLIBC_ARM_TYPE).*/$(UCLIBC_ARM_TYPE)=y/g' $(UCLIBC_DIR)/.oldconfig - $(SED) '/CONFIG_ARM_.ABI/d' $(UCLIBC_DIR)/.oldconfig -ifeq ($(BR2_ARM_EABI),y) - /bin/echo "# CONFIG_ARM_OABI is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "CONFIG_ARM_EABI=y" >> $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_ARM_OABI),y) - /bin/echo "CONFIG_ARM_OABI=y" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# CONFIG_ARM_EABI is not set" >> $(UCLIBC_DIR)/.oldconfig -endif -endif -ifeq ($(UCLIBC_TARGET_ARCH),mips) - $(SED) '/CONFIG_MIPS_[NO].._ABI/d' $(UCLIBC_DIR)/.oldconfig - $(SED) '/CONFIG_MIPS_ISA_.*/d' $(UCLIBC_DIR)/.oldconfig - (/bin/echo "# CONFIG_MIPS_O32_ABI is not set"; \ - /bin/echo "# CONFIG_MIPS_N32_ABI is not set"; \ - /bin/echo "# CONFIG_MIPS_N64_ABI is not set"; \ - /bin/echo "# CONFIG_MIPS_ISA_1 is not set"; \ - /bin/echo "# CONFIG_MIPS_ISA_2 is not set"; \ - /bin/echo "# CONFIG_MIPS_ISA_3 is not set"; \ - /bin/echo "# CONFIG_MIPS_ISA_4 is not set"; \ - /bin/echo "# CONFIG_MIPS_ISA_MIPS32 is not set"; \ - /bin/echo "# CONFIG_MIPS_ISA_MIPS32R2 is not set"; \ - /bin/echo "# CONFIG_MIPS_ISA_MIPS64 is not set"; \ - ) >> $(UCLIBC_DIR)/.oldconfig -ifeq ($(BR2_MIPS_OABI),y) - $(SED) 's/.*\(CONFIG_MIPS_O32_ABI\).*/\1=y/' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_MIPS_EABI),y) - $(SED) 's/.*\(CONFIG_MIPS_N32_ABI\).*/\1=y/' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_MIPS_ABI64),y) - $(SED) 's/.*\(CONFIG_MIPS_N64_ABI\).*/\1=y/' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_mips_1),y) - $(SED) 's/.*\(CONFIG_MIPS_ISA_1\).*/\1=y/' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_mips_2),y) - $(SED) 's/.*\(CONFIG_MIPS_ISA_2\).*/\1=y/' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_mips_3),y) - $(SED) 's/.*\(CONFIG_MIPS_ISA_3\).*/\1=y/' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_mips_4),y) - $(SED) 's/.*\(CONFIG_MIPS_ISA_4\).*/\1=y/' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_mips_32),y) - $(SED) 's/.*\(CONFIG_MIPS_ISA_MIPS32\)[^R].*/\1=y/' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_mips_32r2),y) - $(SED) 's/.*\(CONFIG_MIPS_ISA_MIPS32R2\).*/\1=y/' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_mips_64),y) - $(SED) 's/.*\(CONFIG_MIPS_ISA_MIPS64\).*/\1=y/' $(UCLIBC_DIR)/.oldconfig -endif -endif -ifeq ($(UCLIBC_TARGET_ARCH),sh) - /bin/echo "# CONFIG_SH2A is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# CONFIG_SH2 is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# CONFIG_SH3 is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# CONFIG_SH4 is not set" >> $(UCLIBC_DIR)/.oldconfig -ifeq ($(BR2_sh2a_nofpueb),y) - $(SED) 's,# CONFIG_SH2A is not set,CONFIG_SH2A=y,g' $(UCLIBC_DIR)/.oldconfig - /bin/echo "# UCLIBC_FORMAT_FDPIC_ELF is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# UCLIBC_FORMAT_FLAT is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# UCLIBC_FORMAT_FLAT_SEP_DATA is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# UCLIBC_FORMAT_SHARED_FLAT is not set" >> $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_sh2eb),y) - $(SED) 's,# CONFIG_SH2 is not set,CONFIG_SH2=y,g' $(UCLIBC_DIR)/.oldconfig - /bin/echo "# UCLIBC_FORMAT_FDPIC_ELF is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# UCLIBC_FORMAT_FLAT is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# UCLIBC_FORMAT_FLAT_SEP_DATA is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# UCLIBC_FORMAT_SHARED_FLAT is not set" >> $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_sh3eb),y) - $(SED) 's,# CONFIG_SH3 is not set,CONFIG_SH3=y,g' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_sh3),y) - $(SED) 's,# CONFIG_SH3 is not set,CONFIG_SH3=y,g' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_sh4eb),y) - $(SED) 's,# CONFIG_SH4 is not set,CONFIG_SH4=y,g' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_sh4),y) - $(SED) 's,# CONFIG_SH4 is not set,CONFIG_SH4=y,g' $(UCLIBC_DIR)/.oldconfig -endif -endif -ifeq ($(UCLIBC_TARGET_ARCH),sparc) - $(SED) 's/^\(CONFIG_[^_]*[_]*SPARC[^=]*\)=.*/# \1 is not set/g' \ - $(UCLIBC_DIR)/.oldconfig - for i in V7 V8 V9 V9B; do echo "# CONFIG_SPARC_$$i is not set"; done \ - >> $(UCLIBC_DIR)/.oldconfig - $(SED) 's/^.*$(UCLIBC_SPARC_TYPE)[^B].*/$(UCLIBC_SPARC_TYPE)=y/g' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(UCLIBC_TARGET_ARCH),powerpc) -ifeq ($(BR2_powerpc_8540)$(BR2_powerpc_e500mc),y) - /bin/echo "# CONFIG_CLASSIC is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "CONFIG_E500=y" >> $(UCLIBC_DIR)/.oldconfig -else - /bin/echo "CONFIG_CLASSIC=y" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# CONFIG_E500 is not set" >> $(UCLIBC_DIR)/.oldconfig -endif -endif -ifeq ($(UCLIBC_TARGET_ARCH),avr32) - /bin/echo "LINKRELAX=y" >> $(UCLIBC_DIR)/.oldconfig -endif -ifneq ($(UCLIBC_TARGET_ENDIAN),) - # The above doesn't work for me, so redo - $(SED) 's/.*\(ARCH_$(UCLIBC_NOT_TARGET_ENDIAN)_ENDIAN\).*/# \1 is not set/g' \ - -e 's/.*\(ARCH_WANTS_$(UCLIBC_NOT_TARGET_ENDIAN)_ENDIAN\).*/# \1 is not set/g' \ - -e 's/.*\(ARCH_$(UCLIBC_TARGET_ENDIAN)_ENDIAN\).*/\1=y/g' \ - -e 's/.*\(ARCH_WANTS_$(UCLIBC_TARGET_ENDIAN)_ENDIAN\).*/\1=y/g' \ - $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_LARGEFILE),y) - $(SED) 's,.*UCLIBC_HAS_LFS.*,UCLIBC_HAS_LFS=y,g' $(UCLIBC_DIR)/.oldconfig -else - $(SED) 's,.*UCLIBC_HAS_LFS.*,UCLIBC_HAS_LFS=n,g' $(UCLIBC_DIR)/.oldconfig - $(SED) '/.*UCLIBC_HAS_FOPEN_LARGEFILE_MODE.*/d' $(UCLIBC_DIR)/.oldconfig - echo "# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set" >> $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_INET_IPV6),y) - $(SED) 's,^.*UCLIBC_HAS_IPV6.*,UCLIBC_HAS_IPV6=y,g' $(UCLIBC_DIR)/.oldconfig -else - $(SED) 's,^.*UCLIBC_HAS_IPV6.*,UCLIBC_HAS_IPV6=n,g' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_INET_RPC),y) - $(SED) 's,^.*UCLIBC_HAS_RPC.*,UCLIBC_HAS_RPC=y,g' \ - -e 's,^.*UCLIBC_HAS_FULL_RPC.*,UCLIBC_HAS_FULL_RPC=y,g' \ - -e 's,^.*UCLIBC_HAS_REENTRANT_RPC.*,UCLIBC_HAS_REENTRANT_RPC=y,g' \ - $(UCLIBC_DIR)/.oldconfig -else - $(SED) 's,^.*UCLIBC_HAS_RPC.*,UCLIBC_HAS_RPC=n,g' \ - -e 's,^.*UCLIBC_HAS_FULL_RPC.*,UCLIBC_HAS_FULL_RPC=n,g' \ - -e 's,^.*UCLIBC_HAS_REENTRANT_RPC.*,UCLIBC_HAS_REENTRANT_RPC=n,g' \ - $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_SOFT_FLOAT),y) - $(SED) 's,.*UCLIBC_HAS_FPU.*,UCLIBC_HAS_FPU=n,g' \ - -e 's,^[^_]*HAS_FPU.*,HAS_FPU=n,g' \ - -e 's,.*UCLIBC_HAS_FLOATS.*,UCLIBC_HAS_FLOATS=y,g' \ - -e 's,.*DO_C99_MATH.*,DO_C99_MATH=y,g' \ - $(UCLIBC_DIR)/.oldconfig - #$(SED) 's,.*UCLIBC_HAS_FPU.*,UCLIBC_HAS_FPU=n\nHAS_FPU=n\nUCLIBC_HAS_FLOATS=y\nUCLIBC_HAS_SOFT_FLOAT=y,g' $(UCLIBC_DIR)/.oldconfig -else - $(SED) '/UCLIBC_HAS_FLOATS/d' \ - -e 's,.*UCLIBC_HAS_FPU.*,UCLIBC_HAS_FPU=y\nHAS_FPU=y\nUCLIBC_HAS_FLOATS=y\n,g' \ - $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_TOOLCHAIN_BUILDROOT_USE_SSP),y) - $(SED) 's,^.*UCLIBC_HAS_SSP[^_].*,UCLIBC_HAS_SSP=y,g' $(UCLIBC_DIR)/.oldconfig -else - $(SED) 's,^.*UCLIBC_HAS_SSP[^_].*,UCLIBC_HAS_SSP=n,g' $(UCLIBC_DIR)/.oldconfig -endif - $(SED) '/UCLIBC_HAS_THREADS/d' $(UCLIBC_DIR)/.oldconfig - $(SED) '/LINUXTHREADS/d' $(UCLIBC_DIR)/.oldconfig - $(SED) '/LINUXTHREADS_OLD/d' $(UCLIBC_DIR)/.oldconfig - $(SED) '/PTHREADS_DEBUG_SUPPORT/d' $(UCLIBC_DIR)/.oldconfig - $(SED) '/UCLIBC_HAS_THREADS_NATIVE/d' $(UCLIBC_DIR)/.oldconfig -ifeq ($(BR2_PTHREADS_NONE),y) - echo "# UCLIBC_HAS_THREADS is not set" >> $(UCLIBC_DIR)/.oldconfig -else - echo "UCLIBC_HAS_THREADS=y" >> $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_PTHREADS),y) - echo "LINUXTHREADS=y" >> $(UCLIBC_DIR)/.oldconfig - echo "LINUXTHREADS_NEW=y" >> $(UCLIBC_DIR)/.oldconfig -else - echo "# LINUXTHREADS is not set" >> $(UCLIBC_DIR)/.oldconfig - echo "# LINUXTHREADS_NEW is not set" >> $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_PTHREADS_OLD),y) - echo "LINUXTHREADS_OLD=y" >> $(UCLIBC_DIR)/.oldconfig -else - echo "# LINUXTHREADS_OLD is not set" >> $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_PTHREADS_NATIVE),y) - echo "UCLIBC_HAS_THREADS_NATIVE=y" >> $(UCLIBC_DIR)/.oldconfig -else - echo "# UCLIBC_HAS_THREADS_NATIVE is not set" >> $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_PTHREAD_DEBUG),y) - echo "PTHREADS_DEBUG_SUPPORT=y" >> $(UCLIBC_DIR)/.oldconfig -else - echo "# PTHREADS_DEBUG_SUPPORT is not set" >> $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_ENABLE_LOCALE),y) - $(SED) 's,^.*UCLIBC_HAS_LOCALE.*,UCLIBC_HAS_LOCALE=y\n# UCLIBC_BUILD_ALL_LOCALE is not set\nUCLIBC_BUILD_MINIMAL_LOCALE=y\nUCLIBC_BUILD_MINIMAL_LOCALES="en_US"\nUCLIBC_PREGENERATED_LOCALE_DATA=n\nUCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA=n\nUCLIBC_HAS_XLOCALE=y\nUCLIBC_HAS_GLIBC_DIGIT_GROUPING=n\n,g' $(UCLIBC_DIR)/.oldconfig -else - $(SED) 's,^.*UCLIBC_HAS_LOCALE.*,UCLIBC_HAS_LOCALE=n,g' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_USE_WCHAR),y) - $(SED) 's,^.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y,g' $(UCLIBC_DIR)/.oldconfig -else - $(SED) 's,^.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=n,g' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_PROGRAM_INVOCATION),y) - $(SED) 's,^.*UCLIBC_HAS_PROGRAM_INVOCATION_NAME.*,UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y,g' $(UCLIBC_DIR)/.oldconfig - $(SED) 's,^.*UCLIBC_HAS___PROGNAME.*,UCLIBC_HAS___PROGNAME=y,g' $(UCLIBC_DIR)/.oldconfig -else - $(SED) 's,^.*UCLIBC_HAS_PROGRAM_INVOCATION_NAME.*,UCLIBC_HAS_PROGRAM_INVOCATION_NAME=n,g' $(UCLIBC_DIR)/.oldconfig - $(SED) 's,^.*UCLIBC_HAS___PROGNAME.*,UCLIBC_HAS___PROGNAME=n,g' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ("$(KERNEL_ARCH)","i386") - /bin/echo "# CONFIG_GENERIC_386 is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# CONFIG_386 is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# CONFIG_486 is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# CONFIG_586 is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# CONFIG_586MMX is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# CONFIG_686 is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# CONFIG_PENTIUMII is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# CONFIG_PENTIUMIII is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# CONFIG_PENTIUM4 is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# CONFIG_K6 is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# CONFIG_K7 is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# CONFIG_ELAN is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# CONFIG_CRUSOE is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# CONFIG_WINCHIPC6 is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# CONFIG_WINCHIP2 is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# CONFIG_CYRIXIII is not set" >> $(UCLIBC_DIR)/.oldconfig - /bin/echo "# CONFIG_NEHEMIAH is not set" >> $(UCLIBC_DIR)/.oldconfig -ifeq ($(BR2_x86_i386),y) - $(SED) 's,# CONFIG_386 is not set,CONFIG_386=y,g' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_x86_i486),y) - $(SED) 's,# CONFIG_486 is not set,CONFIG_486=y,g' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_x86_i586),y) - $(SED) 's,# CONFIG_586 is not set,CONFIG_586=y,g' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_x86_pentium_mmx),y) - $(SED) 's,# CONFIG_586MMX is not set,CONFIG_586MMX=y,g' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_x86_i686),y) - $(SED) 's,# CONFIG_686 is not set,CONFIG_686=y,g' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_x86_pentiumpro),y) - $(SED) 's,# CONFIG_686 is not set,CONFIG_686=y,g' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_x86_pentium2),y) - $(SED) 's,# CONFIG_PENTIUMII is not set,CONFIG_PENTIUMII=y,g' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_x86_pentium3),y) - $(SED) 's,# CONFIG_PENTIUMIII is not set,CONFIG_PENTIUMIII=y,g' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_x86_pentium4),y) - $(SED) 's,# CONFIG_PENTIUM4 is not set,CONFIG_PENTIUM4=y,g' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_x86_pentium_m),y) - $(SED) 's,# CONFIG_PENTIUM4 is not set,CONFIG_PENTIUM4=y,g' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_x86_nocona),y) - $(SED) 's,# CONFIG_PENTIUM4 is not set,CONFIG_PENTIUM4=y,g' $(UCLIBC_DIR)/.oldconfig -endif -ifeq ($(BR2_x86_core2),y) - $(SED) 's,# CONFIG_PENTIUM4 is not set,CONFIG_PENTIUM4=y,g' $(UCLIBC_DIR)/.oldconfig -endif -endif - -$(UCLIBC_DIR)/.config: $(UCLIBC_DIR)/.oldconfig - cp -f $(UCLIBC_DIR)/.oldconfig $(UCLIBC_DIR)/.config - mkdir -p $(TOOLCHAIN_DIR)/uClibc_dev/usr/include - mkdir -p $(TOOLCHAIN_DIR)/uClibc_dev/usr/lib - mkdir -p $(TOOLCHAIN_DIR)/uClibc_dev/lib - $(MAKE1) -C $(UCLIBC_DIR) \ - ARCH="$(UCLIBC_TARGET_ARCH)" \ - PREFIX=$(TOOLCHAIN_DIR)/uClibc_dev/ \ - DEVEL_PREFIX=/usr/ \ - RUNTIME_PREFIX=$(TOOLCHAIN_DIR)/uClibc_dev/ \ - HOSTCC="$(HOSTCC)" \ - oldconfig - touch $@ - -ifeq ($(BR2_CCACHE),y) -# we'll need ccache for the host built before make oldconfig -# if configured, otherwise uclibc-menuconfig will fail. -# Use order-only dependency as host-ccache is a virtual target -$(UCLIBC_DIR)/.config: | host-ccache -endif - -$(UCLIBC_DIR)/.configured: $(LINUX_HEADERS_DIR)/.configured $(UCLIBC_DIR)/.config - $(MAKE1) -C $(UCLIBC_DIR) \ - ARCH="$(UCLIBC_TARGET_ARCH)" \ - PREFIX=$(TOOLCHAIN_DIR)/uClibc_dev/ \ - DEVEL_PREFIX=/usr/ \ - RUNTIME_PREFIX=$(TOOLCHAIN_DIR)/uClibc_dev/ \ - HOSTCC="$(HOSTCC)" headers \ - lib/crt1.o lib/crti.o lib/crtn.o \ - install_headers - # Install the kernel headers to the first stage gcc include dir - # if necessary - if [ ! -f $(TOOLCHAIN_DIR)/uClibc_dev/usr/include/linux/version.h ]; then \ - cp -pLR $(LINUX_HEADERS_DIR)/include/* \ - $(TOOLCHAIN_DIR)/uClibc_dev/usr/include/; \ - fi - $(TARGET_CROSS)gcc -nostdlib -nostartfiles -shared -x c /dev/null -o $(TOOLCHAIN_DIR)/uClibc_dev/usr/lib/libc.so - $(TARGET_CROSS)gcc -nostdlib -nostartfiles -shared -x c /dev/null -o $(TOOLCHAIN_DIR)/uClibc_dev/usr/lib/libm.so - cp -pLR $(UCLIBC_DIR)/lib/crt[1in].o $(TOOLCHAIN_DIR)/uClibc_dev/usr/lib/ - touch $@ - -$(UCLIBC_DIR)/lib/libc.a: $(UCLIBC_DIR)/.configured $(gcc_intermediate) $(LIBFLOAT_TARGET) - $(MAKE1) -C $(UCLIBC_DIR) \ - ARCH="$(UCLIBC_TARGET_ARCH)" \ - PREFIX= \ - DEVEL_PREFIX=/ \ - RUNTIME_PREFIX=/ \ - HOSTCC="$(HOSTCC)" \ - all - touch -c $@ - -uclibc-menuconfig: dirs $(UCLIBC_DIR)/.config - $(MAKE1) -C $(UCLIBC_DIR) \ - ARCH="$(UCLIBC_TARGET_ARCH)" \ - PREFIX=$(TOOLCHAIN_DIR)/uClibc_dev/ \ - DEVEL_PREFIX=/usr/ \ - RUNTIME_PREFIX=$(TOOLCHAIN_DIR)/uClibc_dev/ \ - HOSTCC="$(HOSTCC)" \ - menuconfig && \ - touch -c $(UCLIBC_DIR)/.config - - -$(STAGING_DIR)/usr/lib/libc.a: $(UCLIBC_DIR)/lib/libc.a - $(MAKE1) -C $(UCLIBC_DIR) \ - ARCH="$(UCLIBC_TARGET_ARCH)" \ - PREFIX=$(STAGING_DIR) \ - DEVEL_PREFIX=/usr/ \ - RUNTIME_PREFIX=/ \ - install_runtime install_dev - # Install the kernel headers to the staging dir if necessary - if [ ! -f $(STAGING_DIR)/usr/include/linux/version.h ]; then \ - cp -pLR $(LINUX_HEADERS_DIR)/include/* \ - $(STAGING_DIR)/usr/include/; \ - fi - # Build the host utils. Need to add an install target... - $(MAKE1) -C $(UCLIBC_DIR)/utils \ - PREFIX=$(HOST_DIR) \ - HOSTCC="$(HOSTCC)" \ - hostutils - if [ -f $(UCLIBC_DIR)/utils/ldd.host ]; then \ - install -D $(UCLIBC_DIR)/utils/ldd.host $(HOST_DIR)/usr/bin/ldd; \ - ln -sf ldd $(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-ldd; \ - fi - if [ -f $(UCLIBC_DIR)/utils/ldconfig.host ]; then \ - install -D $(UCLIBC_DIR)/utils/ldconfig.host $(HOST_DIR)/usr/bin/ldconfig; \ - ln -sf ldconfig $(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-ldconfig; \ - ln -sf ldconfig $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldconfig; \ - fi - touch -c $@ - -ifneq ($(TARGET_DIR),) -$(TARGET_DIR)/lib/libc.so.0: $(STAGING_DIR)/usr/lib/libc.a - $(MAKE1) -C $(UCLIBC_DIR) \ - ARCH="$(UCLIBC_TARGET_ARCH)" \ - PREFIX=$(TARGET_DIR) \ - DEVEL_PREFIX=/usr/ \ - RUNTIME_PREFIX=/ \ - install_runtime - touch -c $@ - -$(TARGET_DIR)/usr/bin/ldd: $(cross_compiler) - $(MAKE1) -C $(UCLIBC_DIR) CC=$(TARGET_CROSS)gcc \ - CPP=$(TARGET_CROSS)cpp LD=$(TARGET_CROSS)ld \ - ARCH="$(UCLIBC_TARGET_ARCH)" \ - PREFIX=$(TARGET_DIR) utils install_utils - touch -c $@ - -ifneq ($(BR2_PREFER_STATIC_LIB),y) -UCLIBC_TARGETS=$(TARGET_DIR)/lib/libc.so.0 -endif - -ifeq ($(BR2_UCLIBC_INSTALL_TEST_SUITE),y) -UCLIBC_TARGETS+=uclibc-test -endif -endif - -uclibc: $(gcc_intermediate) $(STAGING_DIR)/usr/lib/libc.a $(UCLIBC_TARGETS) - -uclibc-source: $(DL_DIR)/$(UCLIBC_SOURCE) - -uclibc-unpacked: $(UCLIBC_DIR)/.unpacked - -uclibc-config: $(UCLIBC_DIR)/.config - -uclibc-oldconfig: $(UCLIBC_DIR)/.oldconfig - -uclibc-update: uclibc-config - cp -f $(UCLIBC_DIR)/.config $(UCLIBC_CONFIG_FILE) - -uclibc-configured: gcc_initial kernel-headers $(UCLIBC_DIR)/.configured - -uclibc-configured-source: uclibc-source - -uclibc-clean: uclibc-test-clean - -$(MAKE1) -C $(UCLIBC_DIR) ARCH="$(UCLIBC_TARGET_ARCH)" clean - rm -f $(UCLIBC_DIR)/.config - -uclibc-dirclean: uclibc-test-dirclean - rm -rf $(UCLIBC_DIR) - -uclibc-target-utils: $(TARGET_DIR)/usr/bin/ldd - -uclibc-target-utils-source: $(DL_DIR)/$(UCLIBC_SOURCE) - -$(UCLIBC_DIR)/test/unistd/errno: - $(MAKE) -C $(UCLIBC_DIR)/test \ - ARCH_CFLAGS=-I$(STAGING_DIR)/usr/include \ - UCLIBC_ONLY=1 TEST_INSTALLED_UCLIBC=1 compile - -$(TARGET_DIR)/root/uClibc/test/unistd/errno: $(UCLIBC_DIR)/test/unistd/errno - mkdir -p $(TARGET_DIR)/root/uClibc - cp -rdpf $(UCLIBC_DIR)/test $(TARGET_DIR)/root/uClibc - $(INSTALL) $(UCLIBC_DIR)/Rules.mak $(TARGET_DIR)/root/uClibc - $(INSTALL) $(UCLIBC_DIR)/.config $(TARGET_DIR)/root/uClibc - -uclibc-test: $(STAGING_DIR)/usr/lib/libc.a $(TARGET_DIR)/root/uClibc/test/unistd/errno - -uclibc-test-source: uclibc-source - -uclibc-test-clean: - -$(MAKE) -C $(UCLIBC_DIR)/test clean - rm -rf $(TARGET_DIR)/root/uClibc - -uclibc-test-dirclean: - rm -rf $(TARGET_DIR)/root/uClibc - -############################################################# -# -# uClibc for the target just needs its header files -# and whatnot installed. -# -############################################################# - -$(TARGET_DIR)/usr/lib/libc.a: $(STAGING_DIR)/usr/lib/libc.a - $(MAKE1) -C $(UCLIBC_DIR) \ - ARCH="$(UCLIBC_TARGET_ARCH)" \ - PREFIX=$(TARGET_DIR) \ - DEVEL_PREFIX=/usr/ \ - RUNTIME_PREFIX=/ \ - install_dev - # Install the kernel headers to the target dir if necessary - if [ ! -f $(TARGET_DIR)/usr/include/linux/version.h ]; then \ - cp -pLR $(LINUX_HEADERS_DIR)/include/* \ - $(TARGET_DIR)/usr/include/; \ - fi - touch -c $@ - -uclibc_target: cross_compiler uclibc $(TARGET_DIR)/usr/lib/libc.a $(TARGET_DIR)/usr/bin/ldd - -uclibc_target-clean: uclibc-test-clean - rm -rf $(TARGET_DIR)/usr/include \ - $(TARGET_DIR)/usr/lib/libc.a $(TARGET_DIR)/usr/bin/ldd - -uclibc_target-dirclean: uclibc-test-dirclean - rm -rf $(TARGET_DIR)/usr/include - -endif